<?xml version="1.0" encoding="utf-8"?>
<posthistory>
  <row Id="1" PostHistoryTypeId="2" PostId="1" RevisionGUID="7a760e29-e532-4ab5-a9c0-3a7f757ad31c" CreationDate="2010-07-14T19:10:32.290" UserId="7" Text="I'd like to read up on path finding algorithms. Is there a primer available or any material or tutorials on the Internet that is good start for me?" />
  <row Id="2" PostHistoryTypeId="1" PostId="1" RevisionGUID="7a760e29-e532-4ab5-a9c0-3a7f757ad31c" CreationDate="2010-07-14T19:10:32.290" UserId="7" Text="What path finding algorithms are there?" />
  <row Id="3" PostHistoryTypeId="3" PostId="1" RevisionGUID="7a760e29-e532-4ab5-a9c0-3a7f757ad31c" CreationDate="2010-07-14T19:10:32.290" UserId="7" Text="&lt;path-finding&gt;&lt;tutorials&gt;" />
  <row Id="4" PostHistoryTypeId="2" PostId="2" RevisionGUID="492820e5-5269-4491-aa2c-a13040836692" CreationDate="2010-07-14T19:13:08.730" UserId="14" Text="The only thing I know of is the A* pathfinding algorithm. You can find a beginners tutorial on it right here: http://www.policyalmanac.org/games/aStarTutorial.htm" />
  <row Id="5" PostHistoryTypeId="2" PostId="3" RevisionGUID="1c99e7d7-473e-4431-a6c6-9431dd5cac29" CreationDate="2010-07-14T19:15:51.483" UserId="19" Text="Pathfinding algorithms are basically a graph search problem solving algorithms. &#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Pathfinding#Algorithms&#xD;&#xA;&#xD;&#xA;Most known being Djikstra's algorithm: http://en.wikipedia.org/wiki/Dijkstra's_algorithm&#xD;&#xA;&#xD;&#xA;and its variant A* search algorithm: http://en.wikipedia.org/wiki/A*" />
  <row Id="6" PostHistoryTypeId="2" PostId="4" RevisionGUID="145304b0-61bb-4b80-b62a-f19b0f3d0a1d" CreationDate="2010-07-14T19:16:01.657" UserId="10" Text="Here's a tutorial on using [Dijkstra's Algorithm for pathfinding.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedeveloperskills.com/?p=13" />
  <row Id="7" PostHistoryTypeId="2" PostId="5" RevisionGUID="30f1e458-ec38-4a21-aed8-5caf49f515a8" CreationDate="2010-07-14T19:16:52.637" UserId="15" Text="What are your favorite game development resources for the iPhone? I'll start with [cocos2d for the iPhone][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/" />
  <row Id="8" PostHistoryTypeId="1" PostId="5" RevisionGUID="30f1e458-ec38-4a21-aed8-5caf49f515a8" CreationDate="2010-07-14T19:16:52.637" UserId="15" Text="What are the best iPhone game development resources?" />
  <row Id="9" PostHistoryTypeId="3" PostId="5" RevisionGUID="30f1e458-ec38-4a21-aed8-5caf49f515a8" CreationDate="2010-07-14T19:16:52.637" UserId="15" Text="&lt;iphone&gt;&lt;subjective&gt;" />
  <row Id="10" PostHistoryTypeId="2" PostId="6" RevisionGUID="a383fa3d-d09a-4c88-9f96-fb4a656c166e" CreationDate="2010-07-14T19:17:07.160" UserId="42" Text="There are quite a few pathfinding algorithms out there, Wikipedia has a good list [here][1].  As far as I know, A* and D* are both pretty popular.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pathfinding" />
  <row Id="11" PostHistoryTypeId="2" PostId="7" RevisionGUID="ee167c74-ebaf-4a36-9694-4e6b68949fe3" CreationDate="2010-07-14T19:17:14.430" UserId="13" Text="What pitfalls did you encounter when writing games with interpreted Languages like C# or Java and how did you solve them?" />
  <row Id="12" PostHistoryTypeId="1" PostId="7" RevisionGUID="ee167c74-ebaf-4a36-9694-4e6b68949fe3" CreationDate="2010-07-14T19:17:14.430" UserId="13" Text="What are typical pitfalls when writing games with interpreted Languages like C# or Java?" />
  <row Id="13" PostHistoryTypeId="3" PostId="7" RevisionGUID="ee167c74-ebaf-4a36-9694-4e6b68949fe3" CreationDate="2010-07-14T19:17:14.430" UserId="13" Text="&lt;c#&gt;&lt;java&gt;&lt;interpreted-language&gt;&lt;pitfalls&gt;" />
  <row Id="14" PostHistoryTypeId="2" PostId="8" RevisionGUID="d0f371df-506c-4c5e-8cb6-43450fe1104e" CreationDate="2010-07-14T19:17:15.397" UserId="47" Text="I need some sound effects for my game.  Where can I find some?  Or any programs that can easily generate them?" />
  <row Id="15" PostHistoryTypeId="1" PostId="8" RevisionGUID="d0f371df-506c-4c5e-8cb6-43450fe1104e" CreationDate="2010-07-14T19:17:15.397" UserId="47" Text="Where can I find free sounds for my game?" />
  <row Id="16" PostHistoryTypeId="3" PostId="8" RevisionGUID="d0f371df-506c-4c5e-8cb6-43450fe1104e" CreationDate="2010-07-14T19:17:15.397" UserId="47" Text="&lt;sounds&gt;" />
  <row Id="17" PostHistoryTypeId="2" PostId="9" RevisionGUID="41101797-5239-49e1-84c8-0b1b733e14ab" CreationDate="2010-07-14T19:17:34.833" UserId="29" Text="The last time I checked in on terrain rendering, ROAM was the new hotness.  Yes, that was a long time ago.  I liked ROAM a lot, though, because it was extremely simple to program, and gave pretty decent results.  I imagine that the technology has improved quite a bit now.  What are the most popular methods for terrain rendering these days?" />
  <row Id="18" PostHistoryTypeId="1" PostId="9" RevisionGUID="41101797-5239-49e1-84c8-0b1b733e14ab" CreationDate="2010-07-14T19:17:34.833" UserId="29" Text="What's the newest trend / method for terrain rendering?" />
  <row Id="19" PostHistoryTypeId="3" PostId="9" RevisionGUID="41101797-5239-49e1-84c8-0b1b733e14ab" CreationDate="2010-07-14T19:17:34.833" UserId="29" Text="&lt;terrain-rendering&gt;&lt;3d&gt;" />
  <row Id="20" PostHistoryTypeId="2" PostId="10" RevisionGUID="9d81c36f-e0a9-40bb-83ac-36f66487847e" CreationDate="2010-07-14T19:17:57.470" UserId="47" Text="Here is a nifty random sound generator: http://www.drpetter.se/project_sfxr.html" />
  <row Id="21" PostHistoryTypeId="2" PostId="11" RevisionGUID="7ce72cf2-e033-4d59-9184-2013c23fa7e4" CreationDate="2010-07-14T19:18:17.283" UserId="45" Text="In what cases are what scripting languages better than others?&#xD;&#xA;&#xD;&#xA;All answers are appreciated, please provide a description, and describe in what cases the language excels in.&#xD;&#xA;&#xD;&#xA;(Remember, one language per answer)" />
  <row Id="22" PostHistoryTypeId="1" PostId="11" RevisionGUID="7ce72cf2-e033-4d59-9184-2013c23fa7e4" CreationDate="2010-07-14T19:18:17.283" UserId="45" Text="What scripting language should I choose for my game?" />
  <row Id="23" PostHistoryTypeId="3" PostId="11" RevisionGUID="7ce72cf2-e033-4d59-9184-2013c23fa7e4" CreationDate="2010-07-14T19:18:17.283" UserId="45" Text="&lt;scripting&gt;" />
  <row Id="24" PostHistoryTypeId="2" PostId="12" RevisionGUID="328886c7-753c-4ed6-a3cb-3be1b17a9424" CreationDate="2010-07-14T19:18:46.250" UserId="41" Text="Working with the Wii I often find it necessary to recognize simple gestures, so far I've been able to mainly look at magnitude of acceleration in order to recognize the gestures called out for in our game design documents, but I'd like to create a more robust system that allows &quot;recording&quot; of example gestures and recognition of complex gestures.&#xD;&#xA;&#xD;&#xA;What strategies have you used in the past? Why did they work? Why didn't they work? What would you do differently?" />
  <row Id="25" PostHistoryTypeId="1" PostId="12" RevisionGUID="328886c7-753c-4ed6-a3cb-3be1b17a9424" CreationDate="2010-07-14T19:18:46.250" UserId="41" Text="Gesture Recognition Strategies" />
  <row Id="26" PostHistoryTypeId="3" PostId="12" RevisionGUID="328886c7-753c-4ed6-a3cb-3be1b17a9424" CreationDate="2010-07-14T19:18:46.250" UserId="41" Text="&lt;motion-control&gt;&lt;algorithm&gt;&lt;hmm&gt;" />
  <row Id="27" PostHistoryTypeId="2" PostId="13" RevisionGUID="ae35b8f8-ff94-42b9-85f3-fc5964b0aa3e" CreationDate="2010-07-14T19:19:03.363" UserId="10" Text="I have been working with SFML(C++) and Flash(AS3) and usually creating prototypes for some ideas I have.&#xD;&#xA;&#xD;&#xA;Is it better to use the language you are going to use in the end (C++ usually) or use something simple and quick (AS3, Python, etc) to get it working and then start from scratch when you start on the main product?" />
  <row Id="28" PostHistoryTypeId="1" PostId="13" RevisionGUID="ae35b8f8-ff94-42b9-85f3-fc5964b0aa3e" CreationDate="2010-07-14T19:19:03.363" UserId="10" Text="When creating quick prototypes, is it better to use the language you are going to use in the end?" />
  <row Id="29" PostHistoryTypeId="3" PostId="13" RevisionGUID="ae35b8f8-ff94-42b9-85f3-fc5964b0aa3e" CreationDate="2010-07-14T19:19:03.363" UserId="10" Text="&lt;prototypes&gt;&lt;language-choice&gt;&lt;development-speed&gt;" />
  <row Id="30" PostHistoryTypeId="2" PostId="14" RevisionGUID="b0c39e46-1d06-47b6-97e0-574e50e85813" CreationDate="2010-07-14T19:19:08.450" UserId="47" Text="I'm in need of some tunes for my game.  Where can I procure some, preferably for free?" />
  <row Id="31" PostHistoryTypeId="1" PostId="14" RevisionGUID="b0c39e46-1d06-47b6-97e0-574e50e85813" CreationDate="2010-07-14T19:19:08.450" UserId="47" Text="Where can I find free music for my game?" />
  <row Id="32" PostHistoryTypeId="3" PostId="14" RevisionGUID="b0c39e46-1d06-47b6-97e0-574e50e85813" CreationDate="2010-07-14T19:19:08.450" UserId="47" Text="&lt;music&gt;" />
  <row Id="33" PostHistoryTypeId="2" PostId="15" RevisionGUID="6a362afd-e163-4b76-b5b1-84451d9823cc" CreationDate="2010-07-14T19:19:35.533" UserId="37" Text="I would like to understand on a fundamental level the way in which A* pathfinding works. Any code or psuedo-code implementations as well as visualizations would be helpful." />
  <row Id="34" PostHistoryTypeId="1" PostId="15" RevisionGUID="6a362afd-e163-4b76-b5b1-84451d9823cc" CreationDate="2010-07-14T19:19:35.533" UserId="37" Text="How does A* pathfinding work?" />
  <row Id="35" PostHistoryTypeId="3" PostId="15" RevisionGUID="6a362afd-e163-4b76-b5b1-84451d9823cc" CreationDate="2010-07-14T19:19:35.533" UserId="37" Text="&lt;path-finding&gt;&lt;algorithm&gt;&lt;computer-science&gt;" />
  <row Id="36" PostHistoryTypeId="2" PostId="16" RevisionGUID="7aea0ce9-25c0-4cc0-8998-e3f08af921d1" CreationDate="2010-07-14T19:20:13.970" UserId="30" Text="I'm looking for a 2D game engine that would allow me to release to Windows, Mac and the iPhone, much the way Unity does for 3D.&#xD;&#xA;&#xD;&#xA;Is there a good engine that does this and is specific to 2D?" />
  <row Id="37" PostHistoryTypeId="1" PostId="16" RevisionGUID="7aea0ce9-25c0-4cc0-8998-e3f08af921d1" CreationDate="2010-07-14T19:20:13.970" UserId="30" Text="Cross Platform 2D Engines" />
  <row Id="38" PostHistoryTypeId="3" PostId="16" RevisionGUID="7aea0ce9-25c0-4cc0-8998-e3f08af921d1" CreationDate="2010-07-14T19:20:13.970" UserId="30" Text="&lt;iphone&gt;&lt;2d&gt;&lt;engine&gt;&lt;windows&gt;" />
  <row Id="39" PostHistoryTypeId="2" PostId="17" RevisionGUID="76aabbcf-b9ec-4ac9-8cba-cc493d431c47" CreationDate="2010-07-14T19:20:46.607" UserId="47" Text="Are there any existing frameworks I can build on?  Should I build my own?  How can I prevent fake scores from being posted to it?" />
  <row Id="40" PostHistoryTypeId="1" PostId="17" RevisionGUID="76aabbcf-b9ec-4ac9-8cba-cc493d431c47" CreationDate="2010-07-14T19:20:46.607" UserId="47" Text="How can I implement a global high score ladder?" />
  <row Id="41" PostHistoryTypeId="3" PostId="17" RevisionGUID="76aabbcf-b9ec-4ac9-8cba-cc493d431c47" CreationDate="2010-07-14T19:20:46.607" UserId="47" Text="&lt;leaderboards&gt;" />
  <row Id="42" PostHistoryTypeId="2" PostId="18" RevisionGUID="c595df08-29ad-4e73-bd1b-0e0212ea9a0d" CreationDate="2010-07-14T19:20:57.557" UserId="30" Text="For 3D games, I like [Unity][1]&#xD;&#xA;&#xD;&#xA;It allows me to code in C#, and make releases for alot of different targets, including iPhone, Windows, Mac, and their proprietary web browser player.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="43" PostHistoryTypeId="2" PostId="19" RevisionGUID="1f27d8a9-7d5f-4ad8-a8e7-658bab230e34" CreationDate="2010-07-14T19:21:06.230" UserId="38" Text="I know these aren't free now, but they are relatively cheap.  I've used them for a few things, and I like the quality.  http://www.soundsnap.com/" />
  <row Id="44" PostHistoryTypeId="2" PostId="20" RevisionGUID="9b1a4938-e258-4830-9c9a-61aa96274c04" CreationDate="2010-07-14T19:21:07.323" UserId="35" Text="I need sprites and images, such as characters, landscapes and others, where can i find them?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="45" PostHistoryTypeId="1" PostId="20" RevisionGUID="9b1a4938-e258-4830-9c9a-61aa96274c04" CreationDate="2010-07-14T19:21:07.323" UserId="35" Text="Where can i find free sprites and images?" />
  <row Id="46" PostHistoryTypeId="3" PostId="20" RevisionGUID="9b1a4938-e258-4830-9c9a-61aa96274c04" CreationDate="2010-07-14T19:21:07.323" UserId="35" Text="&lt;assets&gt;" />
  <row Id="47" PostHistoryTypeId="2" PostId="21" RevisionGUID="f9ce0ebd-bdc1-4bb2-92e9-f7e9841ab11f" CreationDate="2010-07-14T19:21:17.290" UserId="48" Text="I want to try my hand at writing a 3D game. However I don't want to start at such a low level of drawing individual triangles and writing my own 3D object loader and so on. I've heard of things like [Irrlicht][1], [Crystal Space 3D][2], and [Cafu][3], but I don't have any experience with any of them. I'm looking for suggestions from people who have experience with these or other engines on which ones are well written, and are easy to get started using, without having to learn a ton of 3D math theory and how GPU's work internally.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net&#xD;&#xA;  [2]: http://www.crystalspace3d.org&#xD;&#xA;  [3]: http://www.cafu.de" />
  <row Id="48" PostHistoryTypeId="1" PostId="21" RevisionGUID="f9ce0ebd-bdc1-4bb2-92e9-f7e9841ab11f" CreationDate="2010-07-14T19:21:17.290" UserId="48" Text="Easy to use cross-platform 3D engines for C++ game development?" />
  <row Id="49" PostHistoryTypeId="3" PostId="21" RevisionGUID="f9ce0ebd-bdc1-4bb2-92e9-f7e9841ab11f" CreationDate="2010-07-14T19:21:17.290" UserId="48" Text="&lt;3d&gt;&lt;engine&gt;&lt;c++&gt;&lt;libraries&gt;" />
  <row Id="50" PostHistoryTypeId="2" PostId="22" RevisionGUID="39784621-d229-4e88-9555-d8c9a1b942f6" CreationDate="2010-07-14T19:21:47.367" UserId="51" Text="It heavily depends on what your goals are.  &#xD;&#xA;&#xD;&#xA;If you're trying to prove gameplay, speed of iteration is probably your most important goal and therefore you should pick a language and environment to suit that.  &#xD;&#xA;&#xD;&#xA;If you're trying to prove tech (using middleware or otherwise), then your goals would also include choosing what language to use." />
  <row Id="51" PostHistoryTypeId="2" PostId="23" RevisionGUID="59a78c57-5484-4b7a-9843-9f1901b34c57" CreationDate="2010-07-14T19:21:56.930" UserId="35" Text="I've heard about SSAO and it looks nice, but what exactly is it?" />
  <row Id="52" PostHistoryTypeId="1" PostId="23" RevisionGUID="59a78c57-5484-4b7a-9843-9f1901b34c57" CreationDate="2010-07-14T19:21:56.930" UserId="35" Text="What is ambient occlusion?" />
  <row Id="53" PostHistoryTypeId="3" PostId="23" RevisionGUID="59a78c57-5484-4b7a-9843-9f1901b34c57" CreationDate="2010-07-14T19:21:56.930" UserId="35" Text="&lt;graphics&gt;&lt;rendering&gt;" />
  <row Id="54" PostHistoryTypeId="2" PostId="24" RevisionGUID="baf9c043-1c09-40a4-9312-f11fe6a077c0" CreationDate="2010-07-14T19:22:10.610" UserId="13" Text="The idea of prototyping is to get a quick and dirty working version of your idea **and then to dispose the prototype** in order to create a solid architecture for your final product.&#xD;&#xA;&#xD;&#xA;It is important to acknowledge that a Prototype is not meant to be (and should never be) refactored into a product, so it is not necessary to write it in the same language you want to write your final game. It's better to choose a programming language that allows for fast development, like Flash as you mentioned.&#xD;&#xA;&#xD;&#xA;If you want to build something that you may want to further use, this is not a Prototype but rather a [Tracer Bullet as Andy Hunt and Dave Thomascall it in The Pragmatic Programmer][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.artima.com/intv/tracerP.html" />
  <row Id="55" PostHistoryTypeId="2" PostId="25" RevisionGUID="bed81672-7ee5-421b-9598-bc93aca409a6" CreationDate="2010-07-14T19:22:41.890" UserId="55" Text="This is the one I hit up the most: [The Free Sound Project][1]&#xD;&#xA;&#xD;&#xA;Some others:&#xD;&#xA;&#xD;&#xA;http://www.partnersinrhyme.com/pir/PIRsfx.shtml&#xD;&#xA;&#xD;&#xA;http://www.pacdv.com/sounds/index.html&#xD;&#xA;&#xD;&#xA;http://amazingsounds.iespana.es/en/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freesound.org/" />
  <row Id="56" PostHistoryTypeId="2" PostId="26" RevisionGUID="566da1e6-1549-4251-bb7b-d5827027f2f3" CreationDate="2010-07-14T19:22:50.767" UserId="37" Text="When comparing the web to other platforms (such as consoles or the iPhone) what are the trade-offs? What does the web excel at most? What are the weaknesses of using the web as a platform?" />
  <row Id="57" PostHistoryTypeId="1" PostId="26" RevisionGUID="566da1e6-1549-4251-bb7b-d5827027f2f3" CreationDate="2010-07-14T19:22:50.767" UserId="37" Text="What are the advantages and disadvantages of the Web as a platform?" />
  <row Id="58" PostHistoryTypeId="3" PostId="26" RevisionGUID="566da1e6-1549-4251-bb7b-d5827027f2f3" CreationDate="2010-07-14T19:22:50.767" UserId="37" Text="&lt;web&gt;&lt;platform&gt;" />
  <row Id="59" PostHistoryTypeId="2" PostId="27" RevisionGUID="24758b0a-86f9-4785-9619-fff356312683" CreationDate="2010-07-14T19:23:01.873" UserId="53" Text="I'm wanting to test my hand at writing an RTS (something I've never gotten very far with), and so I'm looking for an indie engine that would give me the most success with a quick setup that I can then tweak and start to get the ins and outs of RTS design/development.&#xD;&#xA;&#xD;&#xA;I've had a bit of familiarity with both [Torque][1] and [Unity][2] both, but never from that perspective.&#xD;&#xA;&#xD;&#xA;Which would get me closer to base prototype faster?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com&#xD;&#xA;  [2]: http://www.unity3d.com" />
  <row Id="60" PostHistoryTypeId="1" PostId="27" RevisionGUID="24758b0a-86f9-4785-9619-fff356312683" CreationDate="2010-07-14T19:23:01.873" UserId="53" Text="Which for basic RTS prototype: Unity or Torque?" />
  <row Id="61" PostHistoryTypeId="3" PostId="27" RevisionGUID="24758b0a-86f9-4785-9619-fff356312683" CreationDate="2010-07-14T19:23:01.873" UserId="53" Text="&lt;prototypes&gt;&lt;rts&gt;&lt;torque&gt;&lt;unity&gt;" />
  <row Id="62" PostHistoryTypeId="2" PostId="28" RevisionGUID="6037ad87-35fa-4c0b-9ee1-4db2b6e9f2c1" CreationDate="2010-07-14T19:23:06.367" UserId="10" Text="[Box2D][1] is used for many platforms. Including the iPhone. But you'd have to find a way to display those objects. Since Box2D handles only 2D physics simulation.&#xD;&#xA;&#xD;&#xA;That is where you can look at [Troll2D][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Box2D&#xD;&#xA;  [2]: http://code.google.com/p/troll2d/" />
  <row Id="63" PostHistoryTypeId="2" PostId="29" RevisionGUID="9b6e3fdc-e314-45ff-b94b-ad1d18c8c62a" CreationDate="2010-07-14T19:23:26.957" UserId="29" Text="The general advice with prototypes is to use something that's completely throw-away.  The goal for a prototype when developing games is to simply make sure you're brining the fun.  Does the main game mechanic that your software relies on actually make for a fun game?  That's an important question, and one that you want answered as quickly as possible.  Use whatever means are necessary to get to that answer." />
  <row Id="64" PostHistoryTypeId="2" PostId="30" RevisionGUID="efb57e1d-73ff-4d12-b793-6fee21f900e5" CreationDate="2010-07-14T19:23:29.313" UserId="14" Text="When it comes to music that is mostly original, I am very fond of the [Newgrounds Audio Portal][1]. Of course you have to ask for permission first, and abide by the Creative Commons restrictions that the creator has placed, but in general its very nice.&#xD;&#xA;&#xD;&#xA;There is alot of talent there though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.newgrounds.com/audio/" />
  <row Id="65" PostHistoryTypeId="2" PostId="31" RevisionGUID="762e63d4-322f-4b41-9cdb-85937cf0aeba" CreationDate="2010-07-14T19:24:16.143" UserId="47" Text="What is the best way to implement a dialog tree system into my game where a NPC would talk to the Player and give them different sets of responses, some which may only appear when the Player has an item or a previous event has occurred." />
  <row Id="66" PostHistoryTypeId="1" PostId="31" RevisionGUID="762e63d4-322f-4b41-9cdb-85937cf0aeba" CreationDate="2010-07-14T19:24:16.143" UserId="47" Text="How can I implement dialog trees into my game?" />
  <row Id="67" PostHistoryTypeId="3" PostId="31" RevisionGUID="762e63d4-322f-4b41-9cdb-85937cf0aeba" CreationDate="2010-07-14T19:24:16.143" UserId="47" Text="&lt;dialogtree&gt;" />
  <row Id="68" PostHistoryTypeId="2" PostId="32" RevisionGUID="7c054cb9-5fab-4d02-a233-32765c4417cd" CreationDate="2010-07-14T19:24:18.063" UserId="48" Text="There's always the old standby, [SDL][1]. It's fairly low level, but that simplicity is what allows it to be ported to bajillions of platforms (including windows, linux, mac, nintendo DS, wii, etc etc). There is an [iPhone port][2], which I haven't used, but [seems mature enough.][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://code.google.com/p/iphone-sdl-1-3/&#xD;&#xA;  [3]: http://stackoverflow.com/questions/597459/how-mature-is-sdl-for-iphone" />
  <row Id="69" PostHistoryTypeId="2" PostId="33" RevisionGUID="bedae2ae-cf2a-417c-a429-b3a3a636cb82" CreationDate="2010-07-14T19:24:22.183" UserId="51" Text="There really isn't any reason you can't use Unity3D to create &quot;2D&quot; games.  You can use textured quads and an orthographic camera, and you have yourself a 2D game.  There are even some unique solutions like using a skeletal animation system and putting sprites on top of different joints, or using a really tight perspective camera to get cheap parallaxing.&#xD;&#xA;&#xD;&#xA;There are even middleware providers for Unity to provide better sprite management solutions.  Like &lt;a href=&quot;http://www.anbsoft.com/middleware/sm2/&quot;&gt;sprite manager 2&lt;/a&gt;." />
  <row Id="70" PostHistoryTypeId="2" PostId="34" RevisionGUID="f35875b0-d924-4970-af71-d48aae8d7fe9" CreationDate="2010-07-14T19:24:36.767" UserId="19" Text="Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios. &#xD;&#xA;&#xD;&#xA;In a 3D game you might have a HUD or menu GUI based on raster graphics, and in a 2D game you might have a bunch of quads which are vessels for sprites. &#xD;&#xA;&#xD;&#xA;So my question is, how do you approach designing and operating content across various resolutions and aspect ratio? Let's assume you have a sprite character that is 300x400 pixels sprite and surrounded by a level made of tiles. On different resolutions/aspect ratios you'd see a different FOV altogether. Or if you have a HUD or a GUI menu, you'd want to keep some stuff at same positions and of same size relative to the screen. Yet, graphics source is raster bitmaps, not vector. &#xD;&#xA;&#xD;&#xA;Obviously, problem has been addressed numerous times. I'm interested to hear abut various approaches that worked for you so far. Do you keep an arbitrary dimension agnostic 'pixel' unit that you magically transform into needed dimensions via formula based on res and aspect ratio or other approaches?" />
  <row Id="71" PostHistoryTypeId="1" PostId="34" RevisionGUID="f35875b0-d924-4970-af71-d48aae8d7fe9" CreationDate="2010-07-14T19:24:36.767" UserId="19" Text="How do you approach resolution independence in raster based graphics content?" />
  <row Id="72" PostHistoryTypeId="3" PostId="34" RevisionGUID="f35875b0-d924-4970-af71-d48aae8d7fe9" CreationDate="2010-07-14T19:24:36.767" UserId="19" Text="&lt;2d&gt;&lt;sprites&gt;&lt;gui&gt;" />
  <row Id="73" PostHistoryTypeId="2" PostId="35" RevisionGUID="8a6de7b3-3926-4e7f-b7cc-e57d9f65f21f" CreationDate="2010-07-14T19:24:55.533" UserId="35" Text="I have some Unity project without any version control, and i need to share it with another fellow developer, so both of us can work in the project.&#xD;&#xA;&#xD;&#xA;Do you recommend any version control that will play well with Unity Asserts?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="74" PostHistoryTypeId="1" PostId="35" RevisionGUID="8a6de7b3-3926-4e7f-b7cc-e57d9f65f21f" CreationDate="2010-07-14T19:24:55.533" UserId="35" Text="Teamwork in Unity" />
  <row Id="75" PostHistoryTypeId="3" PostId="35" RevisionGUID="8a6de7b3-3926-4e7f-b7cc-e57d9f65f21f" CreationDate="2010-07-14T19:24:55.533" UserId="35" Text="&lt;assets&gt;&lt;unity&gt;&lt;version-control&gt;" />
  <row Id="76" PostHistoryTypeId="2" PostId="36" RevisionGUID="18a6e7bb-aeb9-4a54-8cf8-e621660d3f92" CreationDate="2010-07-14T19:25:00.073" UserId="64" Text="I think the answer here depends somewhat on how comfortable you are in the various languages, and on the technical needs of the final product.  With many small-budget games these days, there really isn't any need to code in C++ - you're never going to need the speed it affords you.&#xD;&#xA;&#xD;&#xA;My experience has been that if you are jamming hard to get a prototype to work, you've made all sorts of compromises in your code quality to get there.  I like to throw out those prototypes and recode them; with the lessons I've learned from those, coding what I want again (regardless of the language it is in) will be pretty fast &amp; have a much higher code quality." />
  <row Id="77" PostHistoryTypeId="2" PostId="37" RevisionGUID="182309c8-61b4-4802-82cc-66abf9170483" CreationDate="2010-07-14T19:25:11.853" UserId="20" Text="There are several path finding algorithms out there. &#xD;&#xA;&#xD;&#xA;One of the most popular ones is probably A* ([A-Star][1]). It's a very useful algorithm if you have a heuristic function that can give you estimated costs to reach a goal (example would be the line-of-sight distance to the target).&#xD;&#xA;A* is very useful to find the shortest path from a start to an end point.&#xD;&#xA;&#xD;&#xA;Other than that there's also [Dijkstra's algorithm][2] which is very useful to find the nearest item out of several items. Eg. if you want to find out which power-up (or similar) is closest to your gaming character.&#xD;&#xA;&#xD;&#xA;There are several other algorithms out there, but I guess A* is by far the most popular one. Mat Buckland has an excellent chapter about Path-Finding in his Book *[Programming Game AI by Example][3]*. I strongly encourage you to get a copy of it. Otherwise you'll find loads of information online by searching for &quot;A Star search&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A*_search_algorithm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm&#xD;&#xA;  [3]: http://www.ai-junkie.com/books/toc_pgaibe.html" />
  <row Id="78" PostHistoryTypeId="2" PostId="38" RevisionGUID="356704cb-b7f3-4b74-9b8d-2c2febc5316e" CreationDate="2010-07-14T19:25:37.093" UserId="30" Text="Unfortunately, finding free music is difficult, but you can at least find some royalty-free music. Here's a site I came across yesterday.&#xD;&#xA;&#xD;&#xA;[http://www.stockmusic.net/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stockmusic.net/" />
  <row Id="79" PostHistoryTypeId="2" PostId="39" RevisionGUID="e4521378-c612-4baa-b7da-9768fb18c3bd" CreationDate="2010-07-14T19:25:37.500" UserId="45" Text="[LÖVE][1] is a 2D engine that allows easy and fast development of games in the [Lua][2] language.&#xD;&#xA;&#xD;&#xA;It runs on Mac (PPC and Intel), Windows and Linux (32 and 64bit) and games are easily distributed as one-file-runs-on-all-platforms &quot;.love&quot; files.&#xD;&#xA;&#xD;&#xA;They are basically a zipped version of your game with the *zip* extension renamed to *love*.&#xD;&#xA;&#xD;&#xA;Unfortunately, there is no iPhone port (so far).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/&#xD;&#xA;  [2]: http://www.lua.org/" />
  <row Id="80" PostHistoryTypeId="6" PostId="16" RevisionGUID="ad145b72-732c-4d43-bf06-72940e5438ff" CreationDate="2010-07-14T19:25:46.733" UserId="43" Comment="edited tags" Text="&lt;iphone&gt;&lt;2d&gt;&lt;engine&gt;&lt;windows&gt;&lt;cross-platform&gt;" />
  <row Id="81" PostHistoryTypeId="2" PostId="40" RevisionGUID="13fde310-e77a-487f-948b-92653bbddb67" CreationDate="2010-07-14T19:25:48.620" UserId="51" Text="The obvious initial suggestion is &lt;a href=&quot;http://www.ogre3d.org/&quot;&gt;Ogre3D&lt;/a&gt;. " />
  <row Id="82" PostHistoryTypeId="2" PostId="41" RevisionGUID="389da4db-cbe0-4e74-93f4-36660168b2b8" CreationDate="2010-07-14T19:26:03.957" UserId="37" Text="I'm looking for books, websites, tutorials, anything that will aid in begining the journey from novice to expert." />
  <row Id="83" PostHistoryTypeId="1" PostId="41" RevisionGUID="389da4db-cbe0-4e74-93f4-36660168b2b8" CreationDate="2010-07-14T19:26:03.957" UserId="37" Text="What are some good resources in getting a beginner started in developing games?" />
  <row Id="84" PostHistoryTypeId="3" PostId="41" RevisionGUID="389da4db-cbe0-4e74-93f4-36660168b2b8" CreationDate="2010-07-14T19:26:03.957" UserId="37" Text="&lt;education&gt;&lt;learning&gt;&lt;best-practices&gt;" />
  <row Id="85" PostHistoryTypeId="16" PostId="41" RevisionGUID="389da4db-cbe0-4e74-93f4-36660168b2b8" CreationDate="2010-07-14T19:26:03.957" UserId="37" />
  <row Id="86" PostHistoryTypeId="2" PostId="42" RevisionGUID="5ff974c4-c136-485b-94df-7c5fc3d81d63" CreationDate="2010-07-14T19:26:11.773" UserId="33" Text="There are a couple of libraries I have used myself when developing games in Actionscript:&#xD;&#xA;&#xD;&#xA; - [Flixel][1]: Created by Adam Atomic, well known as the library created for Cannabalt. Very special for pixel art-like games.&#xD;&#xA; - [FlashPunk][2]: Created as an alternative to Flixel.&#xD;&#xA;&#xD;&#xA;Do you use any other library to develop games in Actionscript? (2 or 3)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org&#xD;&#xA;  [2]: http://flashpunk.net/" />
  <row Id="87" PostHistoryTypeId="1" PostId="42" RevisionGUID="5ff974c4-c136-485b-94df-7c5fc3d81d63" CreationDate="2010-07-14T19:26:11.773" UserId="33" Text="What libraries do you use for developing games in Actionscript?" />
  <row Id="88" PostHistoryTypeId="3" PostId="42" RevisionGUID="5ff974c4-c136-485b-94df-7c5fc3d81d63" CreationDate="2010-07-14T19:26:11.773" UserId="33" Text="&lt;actionscript&gt;&lt;flex&gt;&lt;actionscript-3&gt;&lt;flash&gt;&lt;swf&gt;" />
  <row Id="89" PostHistoryTypeId="6" PostId="21" RevisionGUID="2bbc3e88-6d6d-4197-b30a-a2f75fd40d38" CreationDate="2010-07-14T19:26:16.890" UserId="43" Comment="edited tags" Text="&lt;3d&gt;&lt;engine&gt;&lt;c++&gt;&lt;libraries&gt;&lt;cross-platform&gt;" />
  <row Id="90" PostHistoryTypeId="2" PostId="43" RevisionGUID="b45e86a6-b4d9-4d24-a230-4f9fe19c10e4" CreationDate="2010-07-14T19:26:26.903" UserId="67" Text="I'm looking to create a text based MUD, so a lot of the elements of the XNA framework seem appropriate to what I need.  Especially things like the general game loop, networking, etc.  It looks like XNA is tightly coupled to an interactive environment with UI and audio, so I'm not sure if it's the right way to go.&#xD;&#xA;&#xD;&#xA;Would it be easier to just recreate these types of aspects myself, attempt to bend the XNA framework to what I need, or is there a better framework for this type of work?" />
  <row Id="91" PostHistoryTypeId="1" PostId="43" RevisionGUID="b45e86a6-b4d9-4d24-a230-4f9fe19c10e4" CreationDate="2010-07-14T19:26:26.903" UserId="67" Text="Is the XNA framework appropriate for server side programming?" />
  <row Id="92" PostHistoryTypeId="3" PostId="43" RevisionGUID="b45e86a6-b4d9-4d24-a230-4f9fe19c10e4" CreationDate="2010-07-14T19:26:26.903" UserId="67" Text="&lt;c#&gt;&lt;xna&gt;" />
  <row Id="93" PostHistoryTypeId="2" PostId="44" RevisionGUID="18ccbd24-da85-49ca-8c61-ed889a3e67cc" CreationDate="2010-07-14T19:26:45.577" UserId="35" Text="Do you have any Linux-specific game development resources?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="94" PostHistoryTypeId="1" PostId="44" RevisionGUID="18ccbd24-da85-49ca-8c61-ed889a3e67cc" CreationDate="2010-07-14T19:26:45.577" UserId="35" Text="Linux Game Development Resources" />
  <row Id="95" PostHistoryTypeId="3" PostId="44" RevisionGUID="18ccbd24-da85-49ca-8c61-ed889a3e67cc" CreationDate="2010-07-14T19:26:45.577" UserId="35" Text="&lt;linux&gt;&lt;gamedev&gt;" />
  <row Id="96" PostHistoryTypeId="2" PostId="45" RevisionGUID="a4e2ac71-5be7-40ac-b3dd-e184cba33da4" CreationDate="2010-07-14T19:27:36.450" UserId="30" Text="Unity has a built in facility for supporting version control properly.&#xD;&#xA;&#xD;&#xA;Just go into the File-&gt;Project Settings-&gt;Editor and enable external version control." />
  <row Id="97" PostHistoryTypeId="2" PostId="46" RevisionGUID="99feba69-93fc-4266-b8e7-baae02dd6dff" CreationDate="2010-07-14T19:27:41.643" UserId="14" Text="Unity 3.0 is configured to play nicely with subversion. (At-least nicer than before) I don't know if this is only in the pro version or not, I'll have to check.&#xD;&#xA;&#xD;&#xA;In general though, the most recommend version control system is the Unity Asset Server." />
  <row Id="98" PostHistoryTypeId="5" PostId="24" RevisionGUID="2899be8c-13c2-42de-8424-e2f63d9be1d7" CreationDate="2010-07-14T19:28:02.890" UserId="13" Comment="added 72 characters in body" Text="The idea of prototyping is to get a quick and dirty working version of your idea **and then to dispose the prototype** in order to create a solid architecture for your final product.&#xD;&#xA;&#xD;&#xA;It is important to acknowledge that a Prototype is not meant to be (and should never be) refactored into a product, so it is not necessary to write it in the same language you want to write your final game. It's better to choose a programming language that allows for fast development, like Flash as you mentioned.&#xD;&#xA;&#xD;&#xA;If you want to build something that you may want to further use, this is not a Prototype but rather a [Tracer Bullet][1] as Andy Hunt and Dave Thomas call it in the book [The Pragmatic Programmer][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.artima.com/intv/tracerP.html&#xD;&#xA;  [2]: http://www.pragprog.com/the-pragmatic-programmer" />
  <row Id="99" PostHistoryTypeId="2" PostId="47" RevisionGUID="fa162769-bb73-41b7-992f-e88449153d7b" CreationDate="2010-07-14T19:29:55.693" UserId="35" Text="I've heard about this concept, but what is it?" />
  <row Id="100" PostHistoryTypeId="1" PostId="47" RevisionGUID="fa162769-bb73-41b7-992f-e88449153d7b" CreationDate="2010-07-14T19:29:55.693" UserId="35" Text="What is a texture atlas?" />
  <row Id="101" PostHistoryTypeId="3" PostId="47" RevisionGUID="fa162769-bb73-41b7-992f-e88449153d7b" CreationDate="2010-07-14T19:29:55.693" UserId="35" Text="&lt;rendering&gt;&lt;textures&gt;" />
  <row Id="102" PostHistoryTypeId="5" PostId="16" RevisionGUID="5cb96c29-09e4-4142-ad12-6db86029c5c3" CreationDate="2010-07-14T19:30:13.493" UserId="30" Comment="Clarified that I'm looking specifically for a graphics engine" Text="I'm looking for a 2D graphics engine that would allow me to release to Windows, Mac and the iPhone, much the way Unity does for 3D.&#xD;&#xA;&#xD;&#xA;Is there a good engine that does this and is specific to 2D?" />
  <row Id="103" PostHistoryTypeId="6" PostId="16" RevisionGUID="5cb96c29-09e4-4142-ad12-6db86029c5c3" CreationDate="2010-07-14T19:30:13.493" UserId="30" Comment="Clarified that I'm looking specifically for a graphics engine" Text="&lt;iphone&gt;&lt;2d&gt;&lt;engine&gt;&lt;cross-platform&gt;&lt;windows&gt;" />
  <row Id="104" PostHistoryTypeId="2" PostId="48" RevisionGUID="76bdec60-09dd-4600-a306-d1681bdf9ce6" CreationDate="2010-07-14T19:30:31.560" UserId="48" Text="The [pygame site][1] has tons of links to resources. Be very careful though...I'm not sure how well they vet the links, some might have content which you are not legally allowed to use. It's fine to use them for your little game clone, but if you put it online &amp; it gets popular, you might run into trouble.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/wiki/resources" />
  <row Id="105" PostHistoryTypeId="2" PostId="49" RevisionGUID="90354f23-0d26-469e-8179-859c09ff5c69" CreationDate="2010-07-14T19:31:13.537" UserId="15" Text="I'm not sure there is one framework that spans multiple platforms but there are platform specific frameworks for sure. Two that come to mind for the iPhone are [Scoreloop][1] and [OpenFeint][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scoreloop.com/&#xD;&#xA;  [2]: http://www.openfeint.com/developers" />
  <row Id="106" PostHistoryTypeId="2" PostId="50" RevisionGUID="24f5bdbc-3b0b-490a-bb31-9d6b5cbfcc06" CreationDate="2010-07-14T19:31:19.530" UserId="55" Text="[Lua is widely used in the game industry][1].  From independent games ([Aquaria][2]) to AAA titles (Civilization). &#xD;&#xA;&#xD;&#xA;The core reason?  I would say because it is easy to learn and easy to incorporate into your games. But the same could be said for Python, I'm sure. Scripting, in general, isn't difficult. I think the real reason you should go with Lua is because it's proven which results in much more resources out there for you to learn from.. If you feel like experimenting with something outside of the norm then I would start messing with another language.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Category:Lua-scripted_video_games&#xD;&#xA;  [2]: http://www.bit-blot.com/aquaria/" />
  <row Id="107" PostHistoryTypeId="2" PostId="51" RevisionGUID="ce7c0502-14f5-42ab-a83b-114274541984" CreationDate="2010-07-14T19:31:19.700" UserId="47" Text="For instance, the Motorola Droid is as wide as the G1, but has more height.&#xD;&#xA;&#xD;&#xA;Should I try to spread the UI out across the extra height found on the Motorola Droid?  How do others handle this problem?&#xD;&#xA;&#xD;&#xA;I'm not using OpenGL, but a SurfaceView for a 2D game." />
  <row Id="108" PostHistoryTypeId="1" PostId="51" RevisionGUID="ce7c0502-14f5-42ab-a83b-114274541984" CreationDate="2010-07-14T19:31:19.700" UserId="47" Text="How can I develop my Android game for different phone resolutions?" />
  <row Id="109" PostHistoryTypeId="3" PostId="51" RevisionGUID="ce7c0502-14f5-42ab-a83b-114274541984" CreationDate="2010-07-14T19:31:19.700" UserId="47" Text="&lt;resolution&gt;" />
  <row Id="110" PostHistoryTypeId="2" PostId="52" RevisionGUID="ad52ed45-cec2-420f-9a9c-ce7df53d7254" CreationDate="2010-07-14T19:31:46.297" UserId="51" Text="Well first off it depends on what subset of game development you're talking about.  The path is going to be different if you're trying to become an artist, designer, programmer, etc.&#xD;&#xA;&#xD;&#xA;Either way, though, the best resource is experience.  Try, fail, research, try again.  " />
  <row Id="111" PostHistoryTypeId="16" PostId="52" RevisionGUID="ad52ed45-cec2-420f-9a9c-ce7df53d7254" CreationDate="2010-07-14T19:31:46.297" UserId="-1" />
  <row Id="112" PostHistoryTypeId="2" PostId="53" RevisionGUID="95a1cf11-c5c8-4eca-aff2-1935a25d6bb5" CreationDate="2010-07-14T19:31:54.083" UserDisplayName="Buss" Text="Following the line of Creative Commons license, you can find a lot of content here:&#xD;&#xA;http://labs.creativecommons.org/demos/search/search1/?q=" />
  <row Id="113" PostHistoryTypeId="2" PostId="54" RevisionGUID="7d7f121b-01c9-45a1-bbbf-5a14b2061b42" CreationDate="2010-07-14T19:32:18.573" UserId="10" Text="Ambient occlusion is a method to approximate how bright light should be shining on any specific part of a surface, based on the light and it's environment. This is used to add realism.&#xD;&#xA;&#xD;&#xA;[Wikipedia][1] has a nice paragraph that explains what is done.&#xD;&#xA;&#xD;&#xA;&gt; Ambient occlusion is most often calculated by casting rays in every direction from the surface. Rays which reach the background or “sky” increase the brightness of the surface, whereas a ray which hits any other object contributes no illumination. As a result, points surrounded by a large amount of geometry are rendered dark, whereas points with little geometry on the visible hemisphere appear light.&#xD;&#xA;&#xD;&#xA;[Here is a highly technical article about it.][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Ambient_occlusion#Method_of_implementation&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems/gpugems_ch17.html" />
  <row Id="114" PostHistoryTypeId="2" PostId="55" RevisionGUID="e3933eff-08fa-4e38-b5c1-c19ab5286147" CreationDate="2010-07-14T19:32:33.380" UserId="48" Text="There's lots of links to various resources (sound, music, art, etc) on the [pygame site.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/wiki/resources" />
  <row Id="117" PostHistoryTypeId="2" PostId="57" RevisionGUID="0430f18f-a76e-4990-a139-a4b018ab6ad5" CreationDate="2010-07-14T19:32:44.050" UserId="27" Text="If you're looking to research and learn about pathfinding in general, I'd definitely suggest learning more than just one algorithm. You'll want to understand the overall concepts but be able to apply them to whatever it is you are working on. Most game developers who need to do any serious pathfinding end up writing their own custom algorithms, although highly based on known solutions, every game is different and will have different requirements.&#xD;&#xA;&#xD;&#xA;I'd start by reading up on some of the more well know methods like A*, Dijkstra's Algorithm, Depth and Breadth-First searches. There's a lot of good information on the internet on each of these. (http://en.wikipedia.org/wiki/Pathfinding)&#xD;&#xA;&#xD;&#xA;While reading them, take note on what the upsides and downsides are to each approach, as well as the type of data the algorithm can operate on. Can it be applied to 3-dimensional paths? Can it be modified to account for our human AI who wants to avoid the landmines in the map?&#xD;&#xA;&#xD;&#xA;When it comes to pathfinding, A* is pretty much the golden ticket that everyone uses. You should definitely know how it works. (http://en.wikipedia.org/wiki/A*_search_algorithm)&#xD;&#xA;&#xD;&#xA;Here's a good example of A* as it applies to RTS game, which need to take entities of different size into account: http://aigamedev.com/open/tutorials/clearance-based-pathfinding/&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="118" PostHistoryTypeId="6" PostId="11" RevisionGUID="17c7328f-f719-425e-99dd-2707d4399ca6" CreationDate="2010-07-14T19:32:55.563" UserId="45" Comment="added tag" Text="&lt;scripting&gt;&lt;language-choice&gt;" />
  <row Id="119" PostHistoryTypeId="2" PostId="58" RevisionGUID="4abdc579-1fca-4a55-97e8-c5ffc178f243" CreationDate="2010-07-14T19:33:15.030" UserId="14" Text="Personally, I would recommend Unity. In comparison to Torque I've been able to get basic proofs-of-concepts running far faster than before. (Of course, there is a bit of bias as I was far younger when experimenting with Torque)&#xD;&#xA;&#xD;&#xA;But in general, it's been a far more pleasing experience to work with. Also in comparison to what I remember from the community at Garage Games, the Unity community is far more available to help with issues that my arise." />
  <row Id="121" PostHistoryTypeId="5" PostId="38" RevisionGUID="55302d82-5929-497f-889f-3e78163e933d" CreationDate="2010-07-14T19:33:43.110" UserId="30" Comment="added 41 characters in body" Text="Unfortunately, finding free music is difficult, but you can at least find some royalty-free music. Here's a site I came across yesterday that had some really good sounding stuff.&#xD;&#xA;&#xD;&#xA;[http://www.stockmusic.net/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stockmusic.net/" />
  <row Id="122" PostHistoryTypeId="2" PostId="59" RevisionGUID="e5eba853-fd6e-475d-b4a1-d083c27aec9b" CreationDate="2010-07-14T19:33:51.240" UserId="35" Text="I made a nice game, and i want to port it to Playstation 3, what do i need in terms of hardware, money, licenses and such?" />
  <row Id="123" PostHistoryTypeId="1" PostId="59" RevisionGUID="e5eba853-fd6e-475d-b4a1-d083c27aec9b" CreationDate="2010-07-14T19:33:51.240" UserId="35" Text="What do i need to develop for Playstation 3?" />
  <row Id="124" PostHistoryTypeId="3" PostId="59" RevisionGUID="e5eba853-fd6e-475d-b4a1-d083c27aec9b" CreationDate="2010-07-14T19:33:51.240" UserId="35" Text="&lt;porting&gt;&lt;playstation3&gt;" />
  <row Id="125" PostHistoryTypeId="2" PostId="60" RevisionGUID="a7406588-eb45-4630-89e8-e3458059eb45" CreationDate="2010-07-14T19:33:51.660" UserId="89" Text="I have browsed some of these things. If nothing else, it'll give you a list of things you probably want to look up ^^ &#xD;&#xA;&#xD;&#xA;http://www-cs-students.stanford.edu/~amitp/gameprog.html" />
  <row Id="126" PostHistoryTypeId="16" PostId="60" RevisionGUID="a7406588-eb45-4630-89e8-e3458059eb45" CreationDate="2010-07-14T19:33:51.660" UserId="-1" />
  <row Id="127" PostHistoryTypeId="2" PostId="61" RevisionGUID="848dfc41-760d-45eb-b79d-db607cd1ce93" CreationDate="2010-07-14T19:34:17.570" UserId="34" Text="A texture atlas is simply a way to stuff multiple sprites into a single texture.  You also will need an index into the texture so that you can find where each of the sprites are located.&#xD;&#xA;&#xD;&#xA;The reason these are used is because it's more efficient to bind a texture once and change the UV values being used than to bind multiple textures for each sprite you draw.&#xD;&#xA;&#xD;&#xA;Here is an [article][1] from Gamasutra on texture atlases that helped me a lot when I was first getting started &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/features/20060126/ivanov_01.shtml" />
  <row Id="128" PostHistoryTypeId="2" PostId="62" RevisionGUID="0c402c8a-4c0f-4ec7-8453-5158c92baa4c" CreationDate="2010-07-14T19:34:37.617" UserId="35" Text="One way is to make the image assets in a vectorial format (SVG, Illustrator, etc) and convert them into raster images as needed by the different versions of the game." />
  <row Id="129" PostHistoryTypeId="6" PostId="17" RevisionGUID="1aa2c2b3-31fb-44ab-95f2-16f697bcb82e" CreationDate="2010-07-14T19:34:38.897" UserId="78" Comment="edited tags" Text="&lt;java&gt;&lt;leaderboards&gt;&lt;android&gt;" />
  <row Id="130" PostHistoryTypeId="2" PostId="63" RevisionGUID="93e7affb-9f02-444e-8f8a-5a632bb4a2f1" CreationDate="2010-07-14T19:34:52.547" UserId="48" Text="[SFXR][1] is a neat little tool for quickly &amp; easily generating basic sound effects. It's a downloadable tool, but someone ported it to Flash, so you can [use it online][2] as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;  [2]: http://www.superflashbros.net/as3sfxr/" />
  <row Id="131" PostHistoryTypeId="2" PostId="64" RevisionGUID="b3a2c245-0130-4943-8618-2cb1ffba250e" CreationDate="2010-07-14T19:35:19.097" UserId="15" Text="I know of [Wario Ware DIY][1] but is this the only option?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wariowarediy.com/" />
  <row Id="132" PostHistoryTypeId="1" PostId="64" RevisionGUID="b3a2c245-0130-4943-8618-2cb1ffba250e" CreationDate="2010-07-14T19:35:19.097" UserId="15" Text="What options are there for developing on the Nintendo platforms?" />
  <row Id="133" PostHistoryTypeId="3" PostId="64" RevisionGUID="b3a2c245-0130-4943-8618-2cb1ffba250e" CreationDate="2010-07-14T19:35:19.097" UserId="15" Text="&lt;nintendo&gt;&lt;console&gt;" />
  <row Id="134" PostHistoryTypeId="2" PostId="65" RevisionGUID="c5b1ece1-656e-4061-9147-6e5402818a4b" CreationDate="2010-07-14T19:35:46.227" UserId="23" Text="I would look into a embedding a scripting language like lua or ruby and coding dialog interactions in that.&#xD;&#xA;&#xD;&#xA;Thus a dialog script could look like:&#xD;&#xA;&#xD;&#xA;    switch showDialog &quot;Why don't you just leave me along!&quot;, &quot;Okay&quot;, &quot;But I found your dog!&quot;&#xD;&#xA;        case 1:&#xD;&#xA;            showDialog &quot;And stay gone!&quot;&#xD;&#xA;        case 2:&#xD;&#xA;            if playerHasObject &quot;dog&quot;&#xD;&#xA;                showDialog &quot;Thank you!&quot;&#xD;&#xA;            else&#xD;&#xA;                showDialog &quot;Liar!&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This also works well for coding AI and other simple things that are useful to tweak during run time.  You can even add an editor built into your application that can be invoked when running in debug (or as an Easter Egg)." />
  <row Id="135" PostHistoryTypeId="2" PostId="66" RevisionGUID="a3104d49-85a9-410c-ba09-6768dc16d6ca" CreationDate="2010-07-14T19:35:46.350" UserId="19" Text="Ambient occlusion is a method to compute lighting on a surface of an object that takes into account light brightness due to occlusion of the surface in relation to light source. &#xD;&#xA;&#xD;&#xA;That is, ambient occlusion is a shading method that is global in nature which means light/illumination from each point in a scene can influence other points in a scene. In contrast with local shading methods like Phong/Blinn, this means shading with ambient occlusion adds more realism.&#xD;&#xA;&#xD;&#xA;Here is a bit of a simplified explanation. Ambient occlusion is a neat trick way of simulating global lighting which is faster than other methods we have so far. Rays are cast from every direction from a surface point 'up' in relation to the surface. Rays that do not reach any object in its path, that is they reach the background void threshold (the 'sky'), increase the brightness of the surface. Rays which, on the other hand, hit geometry when cast from surface, add no brightness to surface. So surface points which are surrounded by lots of other geometry are kind of in a shade. &#xD;&#xA;&#xD;&#xA;SSAO is just one way of doing ambient occlusion." />
  <row Id="136" PostHistoryTypeId="2" PostId="67" RevisionGUID="b4df1c35-fccd-4968-b98d-ef16966ba006" CreationDate="2010-07-14T19:35:49.127" UserId="47" Text="Here is a good example of A* being used in a game with some psuedo code: http://www.anotherearlymorning.com/2009/02/pathfinding-with-a-star/" />
  <row Id="137" PostHistoryTypeId="5" PostId="24" RevisionGUID="7f0f9164-04ec-4109-b749-bda62b66c9cb" CreationDate="2010-07-14T19:36:07.443" UserId="13" Comment="added 338 characters in body" Text="The idea of prototyping is to get a quick and dirty working version of your idea **and then to dispose the prototype** in order to create a solid architecture for your final product.&#xD;&#xA;&#xD;&#xA;It is important to acknowledge that a Prototype is not meant to be (and should never be) refactored into a product, so it is not necessary to write it in the same language you want to write your final game. It's better to choose a programming language that allows for fast development, like Flash as you mentioned.&#xD;&#xA;&#xD;&#xA;&gt; Prototypes by their nature are not designed to be long lasting code. Prototypes are designed to be thrown away. They're one-offs. It is inappropriate to over-engineer a prototype. A prototype is like a town in a western movie. It's all facade. There's nothing behind it. You cannot move in and raise a family in one of those houses.&#xD;&#xA;&#xD;&#xA;If you want to build something that you may want to further use, this is not a Prototype but rather a [Tracer Bullet][1] as Andy Hunt and Dave Thomas call it in the book [The Pragmatic Programmer][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.artima.com/intv/tracerP.html&#xD;&#xA;  [2]: http://www.pragprog.com/the-pragmatic-programmer" />
  <row Id="138" PostHistoryTypeId="2" PostId="68" RevisionGUID="987e8fee-abbe-4a5f-aca2-4caab6873a36" CreationDate="2010-07-14T19:36:15.117" UserId="56" Text="I want to learn how to create custom graphics, not use freely available resources. But I have been looking around for articles or tutorials on how to start with 2D game design in general, and I can't seem to find a good starting point — books or otherwise. I mostly come across resources for those that have had formal studies in graphic design (advanced stuff), but I won't have the luxury of formal studies for a good while (if at all). On the other hand, I find resources for learning the programming side of things, but not on how to create the graphics you'll manipulate.&#xD;&#xA;&#xD;&#xA;Are there any good resources for learning game oriented graphic design? Specifically 2D, which is the one I'm most interested in, but 3D is also welcome. " />
  <row Id="139" PostHistoryTypeId="1" PostId="68" RevisionGUID="987e8fee-abbe-4a5f-aca2-4caab6873a36" CreationDate="2010-07-14T19:36:15.117" UserId="56" Text="Where do I start if I want to independently learn game graphic design?" />
  <row Id="140" PostHistoryTypeId="3" PostId="68" RevisionGUID="987e8fee-abbe-4a5f-aca2-4caab6873a36" CreationDate="2010-07-14T19:36:15.117" UserId="56" Text="&lt;tutorials&gt;&lt;graphics&gt;" />
  <row Id="141" PostHistoryTypeId="2" PostId="69" RevisionGUID="7d9103ab-8bf4-4e90-9732-69387a5cabbb" CreationDate="2010-07-14T19:36:41.480" UserId="89" Text="My Digital Media friends are currently using Unity for their game development. They seem to like it because it makes it relatively simple to add and use custom 3D objects and the script is rather easy to handle( none of them like programming, but they seem to be doing an OK job at learning the scripting in a semester's time ).&#xD;&#xA;&#xD;&#xA;I don't have first-hand experience of the engine itself, but it definitely sounds like it's worth some experimentation." />
  <row Id="142" PostHistoryTypeId="2" PostId="70" RevisionGUID="d1d983ef-9f4e-4660-ba93-26f47fdf5be3" CreationDate="2010-07-14T19:36:50.640" UserId="79" Text="http://en.wikipedia.org/wiki/Ambient_occlusion&#xD;&#xA;&#xD;&#xA;Ambient occlusion usually means applying data that represents how much ambient light hits a surface. That data is usually a gray scale texture or vertex colors depending on the implementation.&#xD;&#xA;&#xD;&#xA;To compute the data the most common way is the render the scene with with a solid white texture and 1 point light multiple times, moving the point light each time to a different location on a sphere or hemisphere. The results of all the renders are averaged and that gives you the data about each particular location in the scene and how much light hits that location. &#xD;&#xA;&#xD;&#xA;For example a place in the scene that in always bright no matter where you put the light will be bright where as a place that is dark no matter where you put the light will be dark. The result is that you get something that will put dark shadows in crevices and cracks and soft lighting where objects would generally cast a shadow.&#xD;&#xA;" />
  <row Id="143" PostHistoryTypeId="6" PostId="13" RevisionGUID="814989cc-ae31-4700-950d-766208246c99" CreationDate="2010-07-14T19:37:17.253" UserId="43" Comment="edited tags" Text="&lt;language-choice&gt;&lt;development-speed&gt;&lt;prototyping&gt;" />
  <row Id="144" PostHistoryTypeId="2" PostId="71" RevisionGUID="93819c1d-b601-4275-8f3f-07dd8a444d76" CreationDate="2010-07-14T19:37:19.857" UserId="33" Text="**Pros of using the Web as a platform:**&#xD;&#xA;&#xD;&#xA; - *Instant accessible distribution channel:* You can easily give the URL of your game to anyone to play it.&#xD;&#xA; - *Low entry barrier:* The tools available are free or available at a low cost, and you don't need a license to develop on the web. Just a server and a domain.&#xD;&#xA;&#xD;&#xA;**Cons:**&#xD;&#xA;&#xD;&#xA; - *Perception of &quot;Cheap&quot; games:* the low entry barrier has made that a lot of games out there are not very good or don't look very good, plus they're free. That makes a difficult problem to figure out how to charge for your game.&#xD;&#xA;&#xD;&#xA; - *Performance dependent on client configuration:* In contrast to a console, such as an Xbox 360, or a cell phone, there are a lot of configurations of PCs, each one with its own performance. You might find that your game runs well on your special developer machine, but won't run as well on your mother's Pentium Celeron. This is typical of PC development, and you should make sure when developing web games that yours does not hog too much resources.&#xD;&#xA;&#xD;&#xA;I recommend you to read the Flash Love Letter ([Part 1][1] and [Part 2][2]) which I think they're great articles that speak of web game development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/2009/07/flash-love-letter-2009-part-1.html&#xD;&#xA;  [2]: http://www.lostgarden.com/2009/08/flash-love-letter-2009-part-2.html" />
  <row Id="145" PostHistoryTypeId="2" PostId="72" RevisionGUID="74502b77-0f64-40be-be01-a5506a22c678" CreationDate="2010-07-14T19:38:12.773" UserId="14" Text="Officially, &quot;yes&quot;. While you can run homebrew games with adequate hacks that is the only legitimate way of developing to those platforms without Nintendo's blessing as an official developer." />
  <row Id="146" PostHistoryTypeId="2" PostId="73" RevisionGUID="347e3942-949f-49f6-86cd-14f4d30d8c91" CreationDate="2010-07-14T19:38:18.390" UserId="27" Text="Are you interested in developing for PSN, or as a retail game people buy in stores?&#xD;&#xA;&#xD;&#xA;To develop for PSN, you'll need to start by contacting Sony and becoming a licensed developer.&#xD;&#xA;To develop a retail game, you'll most likely need to contact a publisher who will distribute the game.&#xD;&#xA;&#xD;&#xA;In either case, be prepared to demo the game and you're company to either Sony or a publisher for approval.&#xD;&#xA;&#xD;&#xA;Once you've made this first step, Sony or the publisher will be able to help answer all of your questions regarding getting development hardware, costs, etc.&#xD;&#xA;&#xD;&#xA;Good luck." />
  <row Id="147" PostHistoryTypeId="6" PostId="27" RevisionGUID="871b1bb2-532d-45f2-a4c9-9266db613649" CreationDate="2010-07-14T19:38:28.170" UserId="43" Comment="edited tags" Text="&lt;unity&gt;&lt;prototyping&gt;&lt;rts&gt;&lt;torque&gt;" />
  <row Id="148" PostHistoryTypeId="6" PostId="59" RevisionGUID="6d36d8d4-9349-4d58-b732-56c56268e18c" CreationDate="2010-07-14T19:38:41.010" UserId="15" Comment="edited tags" Text="&lt;porting&gt;&lt;playstation3&gt;&lt;console&gt;" />
  <row Id="149" PostHistoryTypeId="2" PostId="74" RevisionGUID="01e7e752-ec41-4f5c-a529-33425c2908b6" CreationDate="2010-07-14T19:38:55.500" UserId="51" Text="I've heard about deferred rendering and how using it can allow for &quot;lots&quot; of lights in a scene without a huge performance hit, but what is it and (from a high level) how is it implemented?" />
  <row Id="150" PostHistoryTypeId="1" PostId="74" RevisionGUID="01e7e752-ec41-4f5c-a529-33425c2908b6" CreationDate="2010-07-14T19:38:55.500" UserId="51" Text="What is deferred rendering?" />
  <row Id="151" PostHistoryTypeId="3" PostId="74" RevisionGUID="01e7e752-ec41-4f5c-a529-33425c2908b6" CreationDate="2010-07-14T19:38:55.500" UserId="51" Text="&lt;rendering&gt;&lt;deferred-rendering&gt;" />
  <row Id="155" PostHistoryTypeId="2" PostId="76" RevisionGUID="09a6c048-2e6e-4962-9540-f6eaf64f1ef8" CreationDate="2010-07-14T19:39:35.593" UserId="9" Text="I'd say the biggest problems I've encountered writing games in C# has been the lack of decent libraries. Most I've found are either direct ports, but incomplete, or wrappers over a C++ library that incur a heavy performance penalty for marshaling. (I'm speaking specifically about MOgre and Axiom for the OGRE library, and BulletSharp for the Bullet physics library)&#xD;&#xA;&#xD;&#xA;Managed languages (as distinct from Interpreted - neither Java nor C# are actually interpreted anymore) can be just as fast as native languages if you have a good understanding of what actually makes them slow (marshaling, garbage collection). The real problem, I think, is that library developers haven't realized that yet." />
  <row Id="156" PostHistoryTypeId="2" PostId="77" RevisionGUID="2848e702-0f82-41f6-9042-761e67f89bb7" CreationDate="2010-07-14T19:39:41.630" UserId="34" Text="How would you store your game state at exit for an iPhone game written in Objective-C?" />
  <row Id="157" PostHistoryTypeId="1" PostId="77" RevisionGUID="2848e702-0f82-41f6-9042-761e67f89bb7" CreationDate="2010-07-14T19:39:41.630" UserId="34" Text="Storing game state at exit on the iPhone with Objective-C" />
  <row Id="158" PostHistoryTypeId="3" PostId="77" RevisionGUID="2848e702-0f82-41f6-9042-761e67f89bb7" CreationDate="2010-07-14T19:39:41.630" UserId="34" Text="&lt;iphone&gt;&lt;objective-c&gt;" />
  <row Id="162" PostHistoryTypeId="2" PostId="79" RevisionGUID="bce3a24d-a452-4695-a6cc-be59d0e75910" CreationDate="2010-07-14T19:39:52.037" UserId="68" Text="I was having a discussion at work today on how to improve room acoustic modelling.  It was suggested that very little work appears to have been done on the subject yet tonnes has been done in graphics.  It was further suggested that as sound and light are just wave forms it might be possible to use things like ray tracing and radios to get a good approximation.&#xD;&#xA;&#xD;&#xA;At this point I began thinking about spherical harmonics to simulate this behaviour.  You could simultaneously do specular-esque reflections as well as audio scattering modelled as diffuse reflections.  As a bonus you'd also get obstructions blocking sound transfer.  The only problem was how to handle the attenuation of multiple frequencies.  Surely though this could be modelled by applying some form of transform to the audio spectrum (FFT).&#xD;&#xA;&#xD;&#xA;Anyway does anybody know of any papers on this subject, especially on how it would be performed in real-time.  Failing that anybody got any advice or useful general information?" />
  <row Id="163" PostHistoryTypeId="1" PostId="79" RevisionGUID="bce3a24d-a452-4695-a6cc-be59d0e75910" CreationDate="2010-07-14T19:39:52.037" UserId="68" Text="Using spherical harmonics to build complex sound scapes" />
  <row Id="164" PostHistoryTypeId="3" PostId="79" RevisionGUID="bce3a24d-a452-4695-a6cc-be59d0e75910" CreationDate="2010-07-14T19:39:52.037" UserId="68" Text="&lt;audio&gt;&lt;language-agnostic&gt;" />
  <row Id="166" PostHistoryTypeId="2" PostId="81" RevisionGUID="07d04ffe-6cce-4698-a47c-975322d0dd98" CreationDate="2010-07-14T19:40:10.473" UserId="98" Text="SDL, Allegro, OpenGL" />
  <row Id="167" PostHistoryTypeId="2" PostId="82" RevisionGUID="c7381d18-984f-403d-b741-cb1762bbd5ac" CreationDate="2010-07-14T19:40:15.217" UserId="67" Text="There are similar questions about finding existing resources that are free for use ([free sprites/images][1], [music][2], [sound][3]), but I'm interested in creating the resources myself.  What tools do you use for asset creation/modification?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please only put one tool per answer.  Also try to include the following information:&#xD;&#xA;&#xD;&#xA;*Product Name*&#xD;&#xA;&#xD;&#xA;*Link to website*&#xD;&#xA;&#xD;&#xA;*Type of assets is can create (2D images, 3D images, audio, etc)*&#xD;&#xA;&#xD;&#xA;*OS(s) supported*&#xD;&#xA;&#xD;&#xA;*Cost*&#xD;&#xA;&#xD;&#xA;*License (if free/open source)*&#xD;&#xA;&#xD;&#xA;*General summary*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/8/where-can-i-find-free-sounds-for-my-game" />
  <row Id="168" PostHistoryTypeId="1" PostId="82" RevisionGUID="c7381d18-984f-403d-b741-cb1762bbd5ac" CreationDate="2010-07-14T19:40:15.217" UserId="67" Text="Tools for creating assets?" />
  <row Id="169" PostHistoryTypeId="3" PostId="82" RevisionGUID="c7381d18-984f-403d-b741-cb1762bbd5ac" CreationDate="2010-07-14T19:40:15.217" UserId="67" Text="&lt;assets&gt;&lt;tools&gt;" />
  <row Id="170" PostHistoryTypeId="16" PostId="82" RevisionGUID="c7381d18-984f-403d-b741-cb1762bbd5ac" CreationDate="2010-07-14T19:40:15.217" UserId="67" />
  <row Id="171" PostHistoryTypeId="6" PostId="7" RevisionGUID="51e9c94f-f3b3-44d0-94b5-064a114274ad" CreationDate="2010-07-14T19:40:40.677" UserId="9" Comment="edited tags" Text="&lt;c#&gt;&lt;java&gt;&lt;interpreted-language&gt;&lt;pitfalls&gt;&lt;managed&gt;" />
  <row Id="172" PostHistoryTypeId="2" PostId="83" RevisionGUID="c8543139-2c2c-4e6f-b65d-992ab89d4ed2" CreationDate="2010-07-14T19:40:44.967" UserId="94" Text="I lean towards saying &quot;create from scratch&quot;, but that's just a gut feeling based on having worked with C# and MUD code separately.  You'll have more control and learn more from rolling your own versions of whatever you might be able to use from XNA, anyway.&#xD;&#xA;&#xD;&#xA;Any reason you're not using an existing MUD engine, at least for reference?" />
  <row Id="173" PostHistoryTypeId="2" PostId="84" RevisionGUID="670fbdea-48e7-4431-bbb5-612198552e4a" CreationDate="2010-07-14T19:41:00.393" UserId="33" Text="I think the best place to start learning to develop games is Gamedev.net, specially its For Beginners section: http://www.gamedev.net/reference/start_here/&#xD;&#xA;&#xD;&#xA;If you already know how to program, I found this article specially enlightening when I started: http://www.gamedev.net/reference/design/features/makegames. It tells you the path you have to follow to start programming the most simple game ever.&#xD;&#xA;&#xD;&#xA;After you start doing your first game, you will find that the GameDev forums are very good to search for questions and asking for them (but probably this Q&amp;A site will set a higher bar ;-) )." />
  <row Id="174" PostHistoryTypeId="16" PostId="84" RevisionGUID="670fbdea-48e7-4431-bbb5-612198552e4a" CreationDate="2010-07-14T19:41:00.393" UserId="-1" />
  <row Id="175" PostHistoryTypeId="2" PostId="85" RevisionGUID="382f4a7c-97cc-405f-b899-efb2dd9503b3" CreationDate="2010-07-14T19:41:10.160" UserId="13" Text="What are your tips and tricks to successfully finish a hobby game project in your freetime?&#xD;&#xA;How do you motivate yourself to keep it up and drive right through to the finish without losing interest or motivation along the way?" />
  <row Id="176" PostHistoryTypeId="1" PostId="85" RevisionGUID="382f4a7c-97cc-405f-b899-efb2dd9503b3" CreationDate="2010-07-14T19:41:10.160" UserId="13" Text="How can I effectively manage a hobby game project?" />
  <row Id="177" PostHistoryTypeId="3" PostId="85" RevisionGUID="382f4a7c-97cc-405f-b899-efb2dd9503b3" CreationDate="2010-07-14T19:41:10.160" UserId="13" Text="&lt;hobby-development&gt;&lt;time-management&gt;&lt;motivation&gt;" />
  <row Id="178" PostHistoryTypeId="2" PostId="86" RevisionGUID="ba1e8bcd-812b-486e-aec0-46bc8ae23ca1" CreationDate="2010-07-14T19:41:19.457" UserId="48" Text="You can write your own games from scratch for many of the Nintendo platforms. [devkitPro][1] provides devkitARM, which can compile for the Gameboy Advance and the Nintendo DS, as well as devkitPPC, which can compile for the GameCube and the Wii. There are also utility libraries to help you access the hardware.&#xD;&#xA;&#xD;&#xA;Running your games is very simple on the GBA and NDS, you simply buy an adapter that will load the compiled games off of a microSD card. It takes a little more work for GameCube and Wii, but it's not too bad.&#xD;&#xA;&#xD;&#xA;(Unfortunately as of this post, the devkitpro.org site seems to be in the middle of rebuilding? All the usual download links and info pages seem to be missing, it's just a plain forum.)&#xD;&#xA;&#xD;&#xA;  [1]: http://devkitpro.org/" />
  <row Id="179" PostHistoryTypeId="2" PostId="87" RevisionGUID="2e3912b2-9bf0-4d99-8aba-005855d855cb" CreationDate="2010-07-14T19:41:35.947" UserId="88" Text=" - [Wikipedia Game Development][1] : Overview on how computer games are made.&#xD;&#xA; - [Game Programming Wiki][2] : Information for beginning game developers.&#xD;&#xA; - [GameDev.net][3] : Site with news, articles, forums, ... on game development.&#xD;&#xA; - [Gamasutra][4] : News and articles for game developers.&#xD;&#xA; - [DevMaster.net][5] : Database of game engines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Game_development&#xD;&#xA;  [2]: http://gpwiki.org/&#xD;&#xA;  [3]: http://www.gamedev.net/&#xD;&#xA;  [4]: http://gamasutra.com/&#xD;&#xA;  [5]: http://www.devmaster.net/" />
  <row Id="180" PostHistoryTypeId="16" PostId="87" RevisionGUID="2e3912b2-9bf0-4d99-8aba-005855d855cb" CreationDate="2010-07-14T19:41:35.947" UserId="-1" />
  <row Id="181" PostHistoryTypeId="2" PostId="88" RevisionGUID="699ea085-cae4-4579-bc1e-c1436114ceae" CreationDate="2010-07-14T19:41:38.897" UserId="20" Text="Depends on what you mean by &quot;libraries&quot;. Flixel and FlashPunk are basically Game-Engines and have implementations for collision-detection, particles, animation, save-games, audio playback etc.&#xD;&#xA;&#xD;&#xA;Other than these two you mentioned, there's also the [Push Button Engine][1] which is more modular than the other two.&#xD;&#xA;&#xD;&#xA;If you're interested in learning Flixel or FlashPunk, you should have a look at their collaborative Website [Flash Game Dojo][2] which is a good resource for Actionscript based games (especially if you're developing with Flixel or FlashPunk).&#xD;&#xA;&#xD;&#xA;There are several specialized libraries that are very useful for flash game-developers too:&#xD;&#xA;&#xD;&#xA; - [Polygonal Datastructures][3] implementations of several commonly used data-structures. Optimized for speed.&#xD;&#xA; - [Turbosignals][4] a signal/slot implementation that's optimized for speed. Very useful for games and a great replacement for flash events.&#xD;&#xA; - ... and of course libraries like [Away3D][5] or [TweenLite][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pushbuttonengine.com/&#xD;&#xA;  [2]: http://flashgamedojo.com/&#xD;&#xA;  [3]: http://code.google.com/p/polygonal/wiki/DataStructures&#xD;&#xA;  [4]: http://jacksondunstan.com/turbosignals&#xD;&#xA;  [5]: http://away3d.com/&#xD;&#xA;  [6]: http://blog.greensock.com/tweenlite/" />
  <row Id="182" PostHistoryTypeId="2" PostId="89" RevisionGUID="6cb88027-87ce-4582-a66d-10e78c7e8845" CreationDate="2010-07-14T19:41:49.893" UserId="47" Text="Are any such things available to help me build my Android game?" />
  <row Id="183" PostHistoryTypeId="1" PostId="89" RevisionGUID="6cb88027-87ce-4582-a66d-10e78c7e8845" CreationDate="2010-07-14T19:41:49.893" UserId="47" Text="Are there any 2D gaming libraries/frameworks/engines for Android?" />
  <row Id="184" PostHistoryTypeId="3" PostId="89" RevisionGUID="6cb88027-87ce-4582-a66d-10e78c7e8845" CreationDate="2010-07-14T19:41:49.893" UserId="47" Text="&lt;2d&gt;&lt;android&gt;&lt;game-engine&gt;" />
  <row Id="185" PostHistoryTypeId="2" PostId="90" RevisionGUID="5c13822c-b615-438e-a95c-787d0a9f3d3c" CreationDate="2010-07-14T19:41:52.437" UserId="35" Text="I want to develop a MMO like World of Warcraft, but some basic research says that is going to take months (if not years) and cost a lot of money. I'd like to know why." />
  <row Id="186" PostHistoryTypeId="1" PostId="90" RevisionGUID="5c13822c-b615-438e-a95c-787d0a9f3d3c" CreationDate="2010-07-14T19:41:52.437" UserId="35" Text="Why is so hard to develop a MMO?" />
  <row Id="187" PostHistoryTypeId="3" PostId="90" RevisionGUID="5c13822c-b615-438e-a95c-787d0a9f3d3c" CreationDate="2010-07-14T19:41:52.437" UserId="35" Text="&lt;game-engine&gt;&lt;mmo&gt;" />
  <row Id="188" PostHistoryTypeId="5" PostId="7" RevisionGUID="89e639f6-c4ed-4ba4-8aba-a7ce23805902" CreationDate="2010-07-14T19:42:20.173" UserId="13" Comment="deleted 4 characters in body; edited title; edited tags" Text="What pitfalls did you encounter when writing games with managed Languages like C# or Java and how did you solve them?" />
  <row Id="189" PostHistoryTypeId="4" PostId="7" RevisionGUID="89e639f6-c4ed-4ba4-8aba-a7ce23805902" CreationDate="2010-07-14T19:42:20.173" UserId="13" Comment="deleted 4 characters in body; edited title; edited tags" Text="What are typical pitfalls when writing games with managed Languages like C# or Java?" />
  <row Id="190" PostHistoryTypeId="2" PostId="91" RevisionGUID="4fd6434e-18b6-4377-86ff-2c465afdbd59" CreationDate="2010-07-14T19:42:26.240" UserId="96" Text="[SpriteLib][1] is a GPL-licensed library of sprites that you can use in your game. A big (but now slightly outdated) public domain texture set is [the Golgotha texture pack][2]. You can also browse an artist storefront such as [Turbo Squid][3] for free stuff.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flyingyogi.com/fun/spritelib.html&#xD;&#xA;  [2]: http://www.wolfiesden.com/golgotha/golgotha.asp&#xD;&#xA;  [3]: http://www.turbosquid.com/" />
  <row Id="191" PostHistoryTypeId="2" PostId="92" RevisionGUID="5e0142b1-e717-4ea7-91a1-08cbdd66a42a" CreationDate="2010-07-14T19:42:27.520" UserId="79" Text="That depends on the game and its target platform.&#xD;&#xA;&#xD;&#xA;A game that runs 100 non-player characters (RTS games) has different needs from a game that runs just 2 (Street Fighter).  A game that runs on a PC has different needs than a game that runs on a console. &#xD;&#xA;&#xD;&#xA;Lua is popular &#xD;&#xA;&#xD;&#xA;[GameMonkey][1] is used by several teams. It's faster than Lua and better at threading.&#xD;&#xA;&#xD;&#xA;Python has been used in several games.&#xD;&#xA;&#xD;&#xA;JavaScript is a possible option as you can download JavaScript engines. There are more JavaScript programmers than any other type of programer.&#xD;&#xA;&#xD;&#xA;There are also specialized languages.&#xD;&#xA;&#xD;&#xA;SCUMM has been used in several adventure games and it is particularly suited to those games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.somedude.net/gamemonkey/" />
  <row Id="192" PostHistoryTypeId="6" PostId="7" RevisionGUID="89e639f6-c4ed-4ba4-8aba-a7ce23805902" CreationDate="2010-07-14T19:42:20.173" UserId="13" Comment="deleted 4 characters in body; edited title; edited tags" Text="&lt;c#&gt;&lt;java&gt;&lt;pitfalls&gt;&lt;managed&gt;" />
  <row Id="193" PostHistoryTypeId="2" PostId="93" RevisionGUID="7c9c884a-f55d-47ab-af21-cebcbf0e46b8" CreationDate="2010-07-14T19:42:55.053" UserId="48" Text="The [pygame site][1] has lots of links to music resources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/wiki/resources" />
  <row Id="194" PostHistoryTypeId="2" PostId="94" RevisionGUID="9122ef40-9b12-4a81-8d00-35e8e183b823" CreationDate="2010-07-14T19:43:02.090" UserId="27" Text="Nintendo supports developers with their DSiWare and WiiWare for people wanting to make a game downloadable through the console or handheld.&#xD;&#xA;&#xD;&#xA;The first step is to contact Nintendo to become a licensed developer (http://warioworld.com/). After you've made this important first step then Nintendo will be able to answer all of your questions.&#xD;&#xA;&#xD;&#xA;Be prepared that they will want you to demonstrate your ability to make a fully playable game for the platform, as well as information about your company for approval." />
  <row Id="195" PostHistoryTypeId="2" PostId="95" RevisionGUID="82edf107-f93a-4e06-ad71-023d203f8208" CreationDate="2010-07-14T19:43:24.040" UserId="21" Text="At minimum, an OpenGL Android game has a UI thread and a Renderer thread created by `GLSurfaceView`.  `Renderer.onDrawFrame() ` should be doing a minimum of work to get the higest FPS.  The physics, AI, etc. don't need to run every frame, so we can put those in another thread.  Now we have:&#xD;&#xA;&#xD;&#xA;1. Renderer thread - Update animations and draw polys&#xD;&#xA;2. Game thread - Logic &amp; periodic physics, AI, etc. updates&#xD;&#xA;3. UI thread - Android UI interaction only&#xD;&#xA;&#xD;&#xA;Since you don't ever want to block the UI thread, I run one more thread for the game logic.  Maybe that's not necessary though?  Is there ever a reason to run game logic in the renderer thread?" />
  <row Id="196" PostHistoryTypeId="1" PostId="95" RevisionGUID="82edf107-f93a-4e06-ad71-023d203f8208" CreationDate="2010-07-14T19:43:24.040" UserId="21" Text="How many threads should an Android game use?" />
  <row Id="197" PostHistoryTypeId="3" PostId="95" RevisionGUID="82edf107-f93a-4e06-ad71-023d203f8208" CreationDate="2010-07-14T19:43:24.040" UserId="21" Text="&lt;android&gt;&lt;multithreading&gt;&lt;opengl&gt;" />
  <row Id="198" PostHistoryTypeId="2" PostId="96" RevisionGUID="b5c0427f-acf4-4bb2-b396-669570b76a9c" CreationDate="2010-07-14T19:43:34.070" UserId="93" Text="I don't think the XNA framework would offer you much of use for the server side of a text based game, no. You should look at the standard .NET framework class libraries for that use case.&#xD;&#xA;&#xD;&#xA;But widening out the question a bit, although the XNA frameworks are really intended for clientside 2d and 3d game development, there might be cause to use parts of them on the server-side of a 2d or 3d game. It is common to re-use parts of the graphics engine on the server because the server has a need to do things like visibility and collision testing just as much as the client does. In that scenario, if your engine has used the math library from XNA, you'll need to link that in your server code too." />
  <row Id="199" PostHistoryTypeId="5" PostId="72" RevisionGUID="a76bdb37-eb0a-444e-947f-f5eb6e334314" CreationDate="2010-07-14T19:43:51.480" UserId="14" Comment="added 175 characters in body" Text="There is also [Wiiware][1] &amp; You -could- run a homebrew game, but that brings forward all sort of ethical questions, and I really don't know much about it.&#xD;&#xA;&#xD;&#xA;To develop for Wiiware you have to be approved as a licensed developer for Nintendo. Information on the process can be found here: http://www.warioworld.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wiiware" />
  <row Id="200" PostHistoryTypeId="2" PostId="97" RevisionGUID="4bcd7ceb-9b87-4636-a5ed-817d271c94d3" CreationDate="2010-07-14T19:44:08.140" UserId="91" Text="What are the methods/tools for generating realistic skies with clouds and atmospheric shading?&#xD;&#xA;&#xD;&#xA;FOSS alternatives and spherical projections get extra points." />
  <row Id="201" PostHistoryTypeId="1" PostId="97" RevisionGUID="4bcd7ceb-9b87-4636-a5ed-817d271c94d3" CreationDate="2010-07-14T19:44:08.140" UserId="91" Text="How can I create my own sky maps?" />
  <row Id="202" PostHistoryTypeId="3" PostId="97" RevisionGUID="4bcd7ceb-9b87-4636-a5ed-817d271c94d3" CreationDate="2010-07-14T19:44:08.140" UserId="91" Text="&lt;rendering&gt;&lt;textures&gt;&lt;sky&gt;" />
  <row Id="203" PostHistoryTypeId="2" PostId="98" RevisionGUID="df5879e3-75ff-4e07-ab0a-56df12713492" CreationDate="2010-07-14T19:44:19.403" UserId="33" Text="Has anyone used [WiiFlash][1] for developing Flash games? Any pointers on how to begin developing games for the Opera channel for the Wii?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wiiflash.bytearray.org/" />
  <row Id="204" PostHistoryTypeId="1" PostId="98" RevisionGUID="df5879e3-75ff-4e07-ab0a-56df12713492" CreationDate="2010-07-14T19:44:19.403" UserId="33" Text="Developing Flash games on the Wii" />
  <row Id="205" PostHistoryTypeId="3" PostId="98" RevisionGUID="df5879e3-75ff-4e07-ab0a-56df12713492" CreationDate="2010-07-14T19:44:19.403" UserId="33" Text="&lt;actionscript&gt;&lt;flash&gt;&lt;wii&gt;" />
  <row Id="206" PostHistoryTypeId="2" PostId="99" RevisionGUID="d5df13b1-26b0-4623-acee-0a46fca14750" CreationDate="2010-07-14T19:44:52.087" UserId="43" Text="One reason that mmos are expensive and lengthy to create is the need to have great amounts of commercial quality content such as visuals and gameplay." />
  <row Id="207" PostHistoryTypeId="2" PostId="100" RevisionGUID="32b3dc68-a460-496a-b8a7-c9723c291583" CreationDate="2010-07-14T19:45:07.500" UserId="67" Text="Product: [Audacity][1]&#xD;&#xA;&#xD;&#xA;Assets created: Audio&#xD;&#xA;&#xD;&#xA;OS(s) Supported: Windows, Linux, Mac&#xD;&#xA;&#xD;&#xA;License: GPL2&#xD;&#xA;&#xD;&#xA;Summary: Lets you apply effects to an existing sound file, as well as record sounds from the sound card.&#xD;&#xA;&#xD;&#xA;  [1]: http://audacity.sourceforge.net/" />
  <row Id="208" PostHistoryTypeId="16" PostId="100" RevisionGUID="32b3dc68-a460-496a-b8a7-c9723c291583" CreationDate="2010-07-14T19:45:07.500" UserId="-1" />
  <row Id="209" PostHistoryTypeId="5" PostId="81" RevisionGUID="f8714ce0-4c9e-48a7-9c50-c13d2bafbb37" CreationDate="2010-07-14T19:45:54.173" UserId="98" Comment="SDL allegro OpenGL" Text="SDL, Allegro, OpenGL  &#xD;&#xA;SDL and Allegro are not only graphic libs, but whole game development libs.  &#xD;&#xA;One down side of SDL is that it takes over your main() and redefines it, making it hard to combine it with other libraries. (QT in my experience)  &#xD;&#xA;Another bad thing is that SDL only allows one window (this is stable version 1.2, the development version 1.3 does, but it's not fully supported or documented yet)  &#xD;&#xA;I can name SDL's weak points because I know it best and worked with it, but despite that, it's very powerful, many emulators, including a port of Mame and ScummVM, as well as games use it.  &#xD;&#xA;OpenGL, despite its popular 3D use, is a graphical library, and as such, also allows 2D graphics through surfaces pixel-level manipulation, and makes extensive use of hardware acceleration both in 3D and 2D." />
  <row Id="210" PostHistoryTypeId="2" PostId="101" RevisionGUID="b84d4f2a-132f-4697-9cd6-d6930348f782" CreationDate="2010-07-14T19:47:03.377" UserId="89" Text="Well, in my case, before I got accepted into Digital Media I had to present a folder of various 2D and 3D projects. Therefore, it's imperative that you try and get some of that formal training yourself, which isn't hard.&#xD;&#xA;&#xD;&#xA;It really depends what you're looking for. Vector and raster art are both big fields to work in, so I recommend programs like InkScape(Adobe illustrator) or Gimp 2.0(Photoshop).&#xD;&#xA;&#xD;&#xA;To do graphic design, you really need to know art. The best way to do art is to look at art from other's to create a personal taste (www.conceptart.org)/(www.deviantart.com) and then do it yourself! Study a lot from real-life and models so that, when you actually get to doing things digitally and free-form, you actually have some knowledge.&#xD;&#xA;&#xD;&#xA;If you want to learn photoshop, there are a wealth of websites to do this with. Tutorials on DeviantArt are probably the most common source, but I would also recommend:&#xD;&#xA;&#xD;&#xA;http://www.photoshoplady.com/&#xD;&#xA;&#xD;&#xA;http://www.1stwebdesigner.com/design/30-useful-sites-where-to-submit-your-tutorials/&#xD;&#xA;&#xD;&#xA;The second link is a bunch of links to photoshop tutorials. You will definitely figure out how to use photoshop and nifty techniques with those! &#xD;&#xA;&#xD;&#xA;Some fine (free) 3D applications would be Blender and Google SketchUp, the latter was used to create my 3D model for the college entrance. I hadn't used it before, but found it to be intuitive and easy to learn. &#xD;&#xA;&#xD;&#xA;These are the basics. You can always branch out to game graphic design after you have some of that formal training. There are many pixel editors if that's your kind of thing. If you try to jump into free-form game graphic design without any sort of training, then you will likely produce sub-par results that will simply demotivate you until you don't want to do any more.&#xD;&#xA;&#xD;&#xA;Of course, you can be stubborn and try to do it anyway. Best of luck in any case ^^" />
  <row Id="211" PostHistoryTypeId="2" PostId="102" RevisionGUID="cc170002-0349-4002-8176-21b82e0c20d6" CreationDate="2010-07-14T19:47:05.433" UserId="82" Text="I am reading a book on Game Development in which they show you how to make scripts for your game in LUA... They program LUA and use it from C++ but I was wondering if there is a library or API to use LUA from C# ... specifically from XNA to develop games for PC AND XBox360?" />
  <row Id="212" PostHistoryTypeId="1" PostId="102" RevisionGUID="cc170002-0349-4002-8176-21b82e0c20d6" CreationDate="2010-07-14T19:47:05.433" UserId="82" Text="Is there any LUA API that works with C# for PC &amp; XBox 360 Development?" />
  <row Id="213" PostHistoryTypeId="3" PostId="102" RevisionGUID="cc170002-0349-4002-8176-21b82e0c20d6" CreationDate="2010-07-14T19:47:05.433" UserId="82" Text="&lt;c#&gt;&lt;lua&gt;&lt;xbox360&gt;&lt;pc&gt;&lt;api&gt;" />
  <row Id="214" PostHistoryTypeId="2" PostId="103" RevisionGUID="31305bb7-00bf-499f-bfeb-718f22356c1f" CreationDate="2010-07-14T19:47:30.630" UserId="35" Text="I have cube maps in lat/long format, and i need to convert them to Horizontal/Vertical Cross, and individual cross images, is there an utility to do that?" />
  <row Id="215" PostHistoryTypeId="1" PostId="103" RevisionGUID="31305bb7-00bf-499f-bfeb-718f22356c1f" CreationDate="2010-07-14T19:47:30.630" UserId="35" Text="Converting Cube Maps" />
  <row Id="216" PostHistoryTypeId="3" PostId="103" RevisionGUID="31305bb7-00bf-499f-bfeb-718f22356c1f" CreationDate="2010-07-14T19:47:30.630" UserId="35" Text="&lt;rendering&gt;&lt;cubemap&gt;" />
  <row Id="217" PostHistoryTypeId="2" PostId="104" RevisionGUID="4e775247-9779-4588-aa35-bf50ff52a7d3" CreationDate="2010-07-14T19:47:34.513" UserId="23" Text="That would largely depend on how your game was coded.  Are you keeping track of a few ivars or something more substantial?&#xD;&#xA;&#xD;&#xA;If it's just a few ivars, I'd probably write them to a plist on background and load that upon startup.&#xD;&#xA;&#xD;&#xA;If there's more ivars, you might be better off with CoreData (and/or saving their values as they change instead of trying to fit everything into the close window)." />
  <row Id="218" PostHistoryTypeId="2" PostId="105" RevisionGUID="4c98ab3d-569e-475f-a8eb-7f286029358b" CreationDate="2010-07-14T19:47:52.983" UserId="51" Text="How to store game state is a complex question that's heavily dependent on how you set up your game itself.&#xD;&#xA;&#xD;&#xA;On the iPhone specifically, you would just have to hook into &lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/applicationWillTerminate:&quot;&gt;`-(void)applicationWillTerminate:`&lt;/a&gt; in your `UIApplicationDelegate` to catch when the application will exit, from user action or otherwise.  You have a short amount of time to do your work before the OS will kill your process, though." />
  <row Id="219" PostHistoryTypeId="2" PostId="106" RevisionGUID="516ef6d3-93e1-42af-b550-7276f0160541" CreationDate="2010-07-14T19:48:17.553" UserId="88" Text="[Lost Garden][1] has lots of free graphics that you can use in your games.&#xD;&#xA;&#xD;&#xA;For RPG Games you have a [cool 32x32 tileset][2] and lots of [free to use sprites, objects, icons, etc.][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/search/label/free%20game%20graphics&#xD;&#xA;  [2]: http://www.rpg-palace.com/artists/xpexterior.php&#xD;&#xA;  [3]: http://untamed.wild-refuge.net/rmxpresources.php?characters" />
  <row Id="220" PostHistoryTypeId="2" PostId="107" RevisionGUID="27aecb32-d44e-4521-83ed-a38acb5af12f" CreationDate="2010-07-14T19:48:50.173" UserId="27" Text="I worked on Snapshot (www.retroaffect.com) in addition to my full time job for almost 8 months before turning it into my full time job. I would work all day, then come home and work on Snapshot until I fell asleep. Sometimes it was a little too much, but other times (most of the time) it was awesome.&#xD;&#xA;&#xD;&#xA;I'd definitely suggest reading over this: http://positech.co.uk/cliffsblog/?p=753&#xD;&#xA;&#xD;&#xA;Also remember that if it is something you are just doing for fun, remember to keep it that...   fun. If you burn yourself out then your project with either never be finished or it will show in the final product." />
  <row Id="222" PostHistoryTypeId="2" PostId="109" RevisionGUID="178361cd-a67d-495a-83e0-e8964fb78d73" CreationDate="2010-07-14T19:49:47.690" UserId="13" Text="As games are based on many different subsystems things like graphics (DirectX, OpenGL, ...), sound (OpenAL, Ogg Vorbis, ...) or physics (collisions, ...), what libraries do you know that are useful for game development in C# and what benefits do they offer?" />
  <row Id="223" PostHistoryTypeId="1" PostId="109" RevisionGUID="178361cd-a67d-495a-83e0-e8964fb78d73" CreationDate="2010-07-14T19:49:47.690" UserId="13" Text="What C# libraries can be used to support game development?" />
  <row Id="224" PostHistoryTypeId="3" PostId="109" RevisionGUID="178361cd-a67d-495a-83e0-e8964fb78d73" CreationDate="2010-07-14T19:49:47.690" UserId="13" Text="&lt;c#&gt;&lt;libraries&gt;" />
  <row Id="225" PostHistoryTypeId="2" PostId="110" RevisionGUID="39ef8bfd-4ad9-431d-9878-7f57dfecca15" CreationDate="2010-07-14T19:50:19.343" UserId="112" Text="[Cocos2D][1] originated under Mac/Windows in Python and is available in an Objective-C flavor [under the iPhone][2]. It's popular in 2D iPhone game development. Ray Wenderlich has some great [Cocos2D tutorials for the iPhone][3].&#xD;&#xA;&#xD;&#xA;Because they moved from Python to Objective-C, I suspect you're not going to be able to cross-compile between all platforms anymore from the same code base.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cocos2d.org/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [3]: http://www.raywenderlich.com/tag/cocos2d" />
  <row Id="226" PostHistoryTypeId="2" PostId="111" RevisionGUID="94ac3a18-6d81-4cd5-934a-791e91714e53" CreationDate="2010-07-14T19:50:37.907" UserId="97" Text="If you're going to independently develop an MMO, you will likely be using pre-existing libraries and API's and engines instead of creating your own from scratch, which is what takes a good deal of time for developers like Blizzard.&#xD;&#xA;&#xD;&#xA;However, it's unlikely that you are going to find your own custom-built MMO Engine online all ready for you to take and use yourself.&#xD;&#xA;&#xD;&#xA;It requires massive amounts of architecture and design.  Have you ever tried programming a simple game?  If you have, I doubt that you would be asking this question.&#xD;&#xA;&#xD;&#xA;Once you have that down, there is the question of art design.  Artists cost money.  And if you are going to do the art yourself, it'll take time.  Lots of time.  Imagine drawing everything in WoW from scratch -- every single item, character, every detail of the world.  Art itself is what will take a large portion of the time.&#xD;&#xA;&#xD;&#xA;Of course, you don't need art.  You can just release a wireframe game.  But good luck getting people to play your game then.&#xD;&#xA;&#xD;&#xA;With Blizzard, especially, there is the fine-tuning of gameplay.  Blizzard has to test and run through and explore every single possibility of their gameplay for months and months just to make sure that it's fair.  That nobody can find some exploit and ruin the game for everybody else; that things are balanced and fun to play.  And even with all that playtesting, things can still slip through.  You can't *possibly* know how the player's full gaming experience will be, once they are interacting with thousands of other players, with just a few weeks of testing.&#xD;&#xA;&#xD;&#xA;In addition, it takes a lot of money to run a server that is powerful enough to host your MMO." />
  <row Id="228" PostHistoryTypeId="2" PostId="113" RevisionGUID="84277230-a94b-4ec1-a41f-ae566bdb6fe0" CreationDate="2010-07-14T19:51:15.533" UserId="6" Text="C# and Java are not interpreted. They're compiled to an intermediate bytecode which, after [JIT][1], becomes just as fast as native code (or near enough to be insignificant)&#xD;&#xA;&#xD;&#xA;The biggest pitfall I've found is in freeing resources that directly affect user experience. These languages do not automatically support [deterministic finalization][2] like C++ does, which if you're not expecting it can lead to things like meshes floating about the scene after you thought they were destroyed. (C# accomplishes deterministic finalization through [IDisposable][3], I'm not sure what Java does.)&#xD;&#xA;&#xD;&#xA;Other than that, managed languages are really quite a lot more capable of handling the kind of performance that games require than they get credit for. Well written managed code is much faster than poorly written native code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Just-in-time_compilation&#xD;&#xA;  [2]: http://geekswithblogs.net/csano/archive/2004/01/14/1286.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/system.idisposable.aspx" />
  <row Id="231" PostHistoryTypeId="2" PostId="115" RevisionGUID="0af1c6e8-e814-4283-88b0-a07a07c733c2" CreationDate="2010-07-14T19:51:50.227" UserId="107" Text="I think you could use the game [Replica Island][1] from [Chris Pruett][2] as an example of a 2d game. I think it is supposed to be a base for other games as it is explained in this [video][4] from the Google I/O 2010. You could watch the game [here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/replicaisland/&#xD;&#xA;  [2]: http://replicaisland.blogspot.com/&#xD;&#xA;  [3]: http://replicaisland.net/&#xD;&#xA;  [4]: http://www.youtube.com/watch?v=7-62tRHLcHk&amp;feature=player_embedded" />
  <row Id="232" PostHistoryTypeId="2" PostId="116" RevisionGUID="3789c800-373c-4fb7-a065-03228536fb97" CreationDate="2010-07-14T19:52:03.473" UserId="35" Text="What is the best (as in most used by professional game developers and/or companies) software development methodology used in game development?&#xD;&#xA;&#xD;&#xA;I've heard that SCRUM is popular, but i'm not sure." />
  <row Id="233" PostHistoryTypeId="1" PostId="116" RevisionGUID="3789c800-373c-4fb7-a065-03228536fb97" CreationDate="2010-07-14T19:52:03.473" UserId="35" Text="Best Methodology for Game Development?" />
  <row Id="234" PostHistoryTypeId="3" PostId="116" RevisionGUID="3789c800-373c-4fb7-a065-03228536fb97" CreationDate="2010-07-14T19:52:03.473" UserId="35" Text="&lt;methodology&gt;&lt;management&gt;" />
  <row Id="235" PostHistoryTypeId="2" PostId="117" RevisionGUID="26a7a10c-252a-4a93-ac5e-1895ac89f7b6" CreationDate="2010-07-14T19:52:16.000" UserId="89" Text="I would like to point you to an article by Shamus Young of Twenty Sided on the issue of server population in MMOs:&#xD;&#xA;&#xD;&#xA;http://www.shamusyoung.com/twentysidedtale/?p=6185&#xD;&#xA;&#xD;&#xA;This is one reason. Other's are the overpopulation of MMOs(seriously, do you not see enough ads of MMOs already?) and the strain to provide a lag-free, scalar game that can be improved over and over again.&#xD;&#xA;&#xD;&#xA;The market is difficult, the management is difficult, the users are difficult lots of times and the profit is often lackluster (P2P or the usual market that uses real money for premium items a la Atlantica Online)." />
  <row Id="236" PostHistoryTypeId="2" PostId="118" RevisionGUID="4cd04504-dc28-4bfc-a013-ccd4345b5f88" CreationDate="2010-07-14T19:52:38.603" UserId="94" Text="Even &quot;simple&quot; indie games take months for a small team to make.  This goes into design, programming, art, audio, business, marketing, etc.  With MMOs, the complexity is greater -- you need a rock-solid (ideally, exploit-proof) game client and server, plus a billing system, a back-end database that can handle a large number of players, etc.  These take time to make, test, debug, and sometimes remake from scratch.&#xD;&#xA;&#xD;&#xA;The fact that games cost money to make comes mainly from the fact that people need to eat (and developers are people).  Even with a team of three, you need a few thousand dollars a month for housing, food, and other necessities." />
  <row Id="237" PostHistoryTypeId="2" PostId="119" RevisionGUID="6907d0ee-0e53-473e-bdc2-ce7cfea6728b" CreationDate="2010-07-14T19:52:56.107" UserId="96" Text="The first problem is that the software itself is very complicated, particularly for a new or inexperienced game developer. You have to maintain (at the very least) a client and server application while providing more content than you would expect for a &quot;regular&quot; multiplayer or single-player game.&#xD;&#xA;&#xD;&#xA;Even on their own as a single player game, an RPG with the complexity of a World of Warcraft would take professional teams years to develop to the same level of polish: an enormous content investment, lots of work up front and afterward with balancing and playtesting, and some of the most complicated interactions of any game genre. These are commercial-level games, and while yours might be smaller, it will still require a lot of effort just to be a good *game* before you pour in the extra work to make it become a good multiplayer game.&#xD;&#xA;&#xD;&#xA;Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.&#xD;&#xA;&#xD;&#xA;Building it shouldn't be your sole concern for manpower and money, either; also consider the costs of running it *after* it's developed. Even a small massively multiplayer online game will need constant improvements to its hardware/software to keep up with demand and staff to manage the game and provide support for your players.&#xD;&#xA;&#xD;&#xA;Think about the following:&#xD;&#xA;&#xD;&#xA; - Hosting - Where are you going to host the servers? How will you pay for the bandwidth? How will you load balance players between servers and keep a minority of players from monopolizing the resources of the game? You'll need people to keep an eye on the condition of your hardware and software hosting the game in order to make sure that it will continue to work well.&#xD;&#xA; - Technical support - Not just getting the game to run, but dealing with problems between players and handling player feedback in a way that will keep them loyal. If you're charging money (say, for a subscription), the billing system will be even more complicated (and most likely require legal assistance and possibly international representation and banking/processing fees). People who deal with these things need salaries.&#xD;&#xA; - Security - Not just of their game accounts, but you have to consider cheat prevention and doing frequent repairs and community maintenance effort whenever a new exploit is discovered by players." />
  <row Id="238" PostHistoryTypeId="2" PostId="120" RevisionGUID="597fa03e-c485-45b1-9ac5-b4b1740f299d" CreationDate="2010-07-14T19:53:03.487" UserId="119" Text="There doesn't seem to be one central hub for this unfortunately. A few examples that I've come across though:&#xD;&#xA;&#xD;&#xA;http://www.gamepoetry.com/blog/2008/06/27/free-rpg-tilesheets/&#xD;&#xA;&#xD;&#xA;http://www.flyingyogi.com/fun/spritelib.html&#xD;&#xA;&#xD;&#xA;http://www.lostgarden.com/2007/04/free-game-graphics-tyrian-ships-and.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="239" PostHistoryTypeId="2" PostId="121" RevisionGUID="545a17ab-3ec0-4fe3-a019-b8ce6f16823c" CreationDate="2010-07-14T19:53:18.290" UserId="79" Text="Neither Java nor C# are interpreted. Both of them get compiled into native machine code.&#xD;&#xA;&#xD;&#xA;The biggest problem with both of them and games is having to code in such a way that they never garbage collect during game play. The number of hoops you have to jump through to accomplish that nearly out ways the benefits of using them in the first place. Most of the features that make those language fun to use for application or server programming have to be avoided for game programming otherwise you'll get long pauses during game play as they go off and garbage collect." />
  <row Id="240" PostHistoryTypeId="2" PostId="122" RevisionGUID="e63d1d89-1e4d-4ac9-ba46-92600edf6226" CreationDate="2010-07-14T19:53:22.503" UserId="106" Text="You can find 2D art, including textures and others at a number of sites:&#xD;&#xA;&#xD;&#xA; - http://opengameart.org&#xD;&#xA; - http://www.cgtextures.com/&#xD;&#xA; - http://www.lemog.fr/lemog_textures/index.php&#xD;&#xA; - http://www.spiralgraphics.biz/packs/&#xD;&#xA; - http://developer.nvidia.com/object/IO_TTVol_01.html (Free textures from NVidia)&#xD;&#xA;&#xD;&#xA;Google is your friend, but always read the license agreements carefully. Even if you are careful, there is a chance that the source of any texture found online might indirectly come from a copyrighted source. " />
  <row Id="241" PostHistoryTypeId="2" PostId="123" RevisionGUID="c4485c89-6d96-401c-9b09-3d735398b620" CreationDate="2010-07-14T19:53:42.393" UserId="55" Text="My post is directed in how to approach game development.  &#xD;&#xA;&#xD;&#xA;**New to programming? How about a Language**  &#xD;&#xA;Decide what language you would like to use. The basis for this answer will revolve around what you really want to do. Do you want to create XBLA games? Then you're going to learn C#. Do you want to create Android games? Then you're going to need to learn Java. How about iPhone games? You'll need to learn Objective-C.&#xD;&#xA;&#xD;&#xA;At this point I wouldn't worry about what is hard and what is not. If you really want to make games pick a language and go. There are plenty of resources out there which will teach you the syntax.&#xD;&#xA;&#xD;&#xA;**Starting on the right foot**  &#xD;&#xA;Many people have really ambitious dreams when they start game development. &quot;I want to create a Game Engine!&quot;  You absolutely need to start small. Learn the boring stuff and attempt to find ways to give yourself some eye candy.&#xD;&#xA;&#xD;&#xA;What this means is that if you choose C++, spend a lot of time with the language. Learn pointers, learn memory management, play with complexity of algorithms. Go find an open source project, download it, and see how they structured their game. &#xD;&#xA;&#xD;&#xA;Along the way, do fun things. Create a console based adventure game that actually uses what you've learned. &#xD;&#xA;&#xD;&#xA;**If you have experience programming**  &#xD;&#xA;Create a clone of a 2D game (2D! NOT 4D!). Pick one. Breakout? Tetris? Add your own twist to the game. The biggest key that I can tell you is to start small and work your way up. Create a project, show it to some people on [gamedev.net][1] and get feedback. &#xD;&#xA;&#xD;&#xA;Once you think you've got it down, then jump into the 3D realm. 3D is extremely hard. If you're new you are going to face plant yourself just has hard.&#xD;&#xA;&#xD;&#xA;**But I'm an Artist, or Sound guy!**  &#xD;&#xA;There are plenty of programmers out there that are tired of looking at their own programmer art and listening to some really crappy effects they found online. Go to tigsource.com and meet some people. But be humble about it. If you have no experience in games and little industry experience, don't expect to get paid. Independents love what they do. So much that they don't really focus on the money initially. &#xD;&#xA;&#xD;&#xA;**Conclusion**  &#xD;&#xA;&#xD;&#xA; - Be prepared to experiment a lot&#xD;&#xA; - Crawl before you walk&#xD;&#xA; - Be humble and help people for free to get experience&#xD;&#xA; - Be patient&#xD;&#xA; - Be a regular on [tigsource.com][2] and [gamedev.net][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net&#xD;&#xA;  [2]: http://www.tigsource.com&#xD;&#xA;  [3]: http://www.gamedev.net" />
  <row Id="242" PostHistoryTypeId="16" PostId="123" RevisionGUID="c4485c89-6d96-401c-9b09-3d735398b620" CreationDate="2010-07-14T19:53:42.393" UserId="-1" />
  <row Id="244" PostHistoryTypeId="2" PostId="125" RevisionGUID="a431315f-3ee3-4cb3-b1f9-7f5c62d947ae" CreationDate="2010-07-14T19:54:21.063" UserId="10" Text="[The Spiral model][1] is very popular for game development. Due to the fast changing development cycle and the size of most game projects.&#xD;&#xA;&#xD;&#xA;Since game development is a living project and most game projects are not defined well before the project starts. The spiral model allows for fast changes and a flexible project.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Spiral_model" />
  <row Id="245" PostHistoryTypeId="2" PostId="126" RevisionGUID="e4bd25e0-a2ca-4b57-b5c2-df604459d9ed" CreationDate="2010-07-14T19:55:03.217" UserId="38" Text="This is were I would point you (http://www.xnua.com/xna_lua_xnua), but it hasn't been updated for a long time.&#xD;&#xA;&#xD;&#xA;C# is great language, and could in a sense be used as a scripting language within your c# game.  Nick Gravelyn has created some nice tutorials about tile engine (http://blog.nickgravelyn.com/downloads/#tileengine) and used a custom scripting engine to fire off dialog.  He has also has a basic example when he learned about the &quot;yield&quot; keyword: http://blog.nickgravelyn.com/2010/02/the-magic-of-yield/" />
  <row Id="246" PostHistoryTypeId="2" PostId="127" RevisionGUID="0eda0f11-7222-4f2d-8ae9-d756f0f49633" CreationDate="2010-07-14T19:55:51.967" UserId="14" Text="The cost is related most intensely to the labor required for developing assets. The cost of most tools pale in comparison to what it costs to pay people to use them and produce assets.&#xD;&#xA;&#xD;&#xA;Consider that the cost of one fulltime developer can be anywhere between 20k - 100k+. This already equates to very high budgets for normal games, but MMOs require significantly more assets to create. This longer development time means more cost paying the workers, and significantly higher overhead.&#xD;&#xA;&#xD;&#xA;That wouldn't really be all that bad though, but until recently, the 'wheel' so to speak wasn't readily available. So each group that has had to create a MMO has had to essentially create their own. Flying blind means alot of work that may be unnecessary gets created, and things that later on are discovered to be very necessary are overlooked. &#xD;&#xA;&#xD;&#xA;The process of wasting time on things that you don't need, and having to painfully go back and create things where you should have before (introducing further complexity in the form of bugs and whatever else) becomes **very** expensive. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That's how it is for most big teams. But Indie/hobbiest teams also run into a few more issues. Usually the big one is not looking at it realistically. People have the tendency of looking at finished, (sometimes) polished work and dramatically underestimating the work that went into creating it. Indie teams usually fail because they do just that, they believe that reaching X level of status would be easy, even with all of their other potential commitments (as most Indies aren't fulltime). &#xD;&#xA;&#xD;&#xA;Eventually not being able to completely objectively look at the project discourages them, and they fall apart. " />
  <row Id="247" PostHistoryTypeId="2" PostId="128" RevisionGUID="8fb1dacd-1e96-49ef-9c4e-f2a08f58e339" CreationDate="2010-07-14T19:55:58.283" UserId="88" Text="You can take a look at the [Dlgedit][1] tool of the Open Source RPG engine [Adonthell][2]. It's very advanced and should contain everything you need (including sources ;))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://adonthell.berlios.de/doc/index.php/Tools:Dlgedit:Contents&#xD;&#xA;  [2]: http://adonthell.berlios.de/doc/index.php/Main_Page" />
  <row Id="248" PostHistoryTypeId="2" PostId="129" RevisionGUID="438ab859-fcc3-4624-b058-6fddf30437ae" CreationDate="2010-07-14T19:56:58.173" UserId="34" Text="Here is the method I used in my games.&#xD;&#xA;&#xD;&#xA;First, every object that needs to be persisted must implement the NSCoding protocol.  You want to only store your model data and nothing specific to the current process.  This means that you can't persist pointers or any resource ids that the OS gives you at runtime.  For the pointers you can fix this easily by just making sure that you encode the objects that they point to instead of the pointers themselves.  For other resources, you will need a way to hook up your object to the new resource at runtime.&#xD;&#xA;&#xD;&#xA;Second, make sure that all of your game objects can be accessed through a single root object.  This object could be a master object for the entire game state, for example.  Another possibility is that you could store them in one of the Foundation collection classes (NSMutableArray, NSMutableSet, NSMutableDictionary).  &#xD;&#xA;&#xD;&#xA;When you get notified that your application is moving into the background (applicationDidEnterBackground), you will need to use NSKeyedArchiver to save the entire state to a file.  That file should be in the documents directory for your application.  Here is a bit of code to show how that is done:&#xD;&#xA;&#xD;&#xA;    NSArray *docDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);&#xD;&#xA;    NSString *docsPath = [docDirectories objectAtIndex:0];&#xD;&#xA;    NSString *saveFile = [docsPath stringByAppendingPathComponent:SAVE_STATE_FILENAME];&#xD;&#xA;    [NSKeyedArchiver archiveRootObject:gameState toFile:saveFile;&#xD;&#xA;&#xD;&#xA;When you detect that you have gone back to the foreground, you should remove the save file to prevent any confusion the next time your application is launched.&#xD;&#xA;&#xD;&#xA;On application start up, you need to check for the existence of the save file.  If you have one, you load it up like this:&#xD;&#xA;&#xD;&#xA;    NSArray *docDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);&#xD;&#xA;    NSString *docsPath = [docDirectories objectAtIndex:0];&#xD;&#xA;    NSString *saveFile = [docsPath stringByAppendingPathComponent:SAVE_STATE_FILENAME];&#xD;&#xA;    [gameState release];&#xD;&#xA;    gameState = [[NSKeyedArchiver unarchiveObjectWithFile:saveFile] retain];&#xD;&#xA;&#xD;&#xA;Depending on your design, you may need to walk through the game state and re-connect up any resources that you could not persist.  This really depends on how cleanly separated your model code is from your rendering code.&#xD;&#xA;&#xD;&#xA;At this point, you may want to put your game into a paused state, depending on what kind of game you are making.&#xD;&#xA;&#xD;&#xA;Hopefully this helps someone else out there who is trying to implement game saving on the iPhone.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="249" PostHistoryTypeId="2" PostId="130" RevisionGUID="f056781d-91a5-4de4-9521-a8304e5e1895" CreationDate="2010-07-14T19:57:02.120" UserId="35" Text="What is the minimum content that a game design document should have?" />
  <row Id="250" PostHistoryTypeId="1" PostId="130" RevisionGUID="f056781d-91a5-4de4-9521-a8304e5e1895" CreationDate="2010-07-14T19:57:02.120" UserId="35" Text="Design Document Contents" />
  <row Id="251" PostHistoryTypeId="3" PostId="130" RevisionGUID="f056781d-91a5-4de4-9521-a8304e5e1895" CreationDate="2010-07-14T19:57:02.120" UserId="35" Text="&lt;game-design&gt;" />
  <row Id="252" PostHistoryTypeId="2" PostId="131" RevisionGUID="0c3ff0ff-72ac-4acb-a5fb-3951bb9061ae" CreationDate="2010-07-14T19:57:09.607" UserId="119" Text="There are lots of great tutorials around on the web for achieving different graphical styles. You'll want to pick up a copy of PhotoShop and start learning it if you already haven't. A few links to get you started:&#xD;&#xA;&#xD;&#xA;http://tutorialblog.org/pixel-art-tutorials/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="253" PostHistoryTypeId="2" PostId="132" RevisionGUID="4717cdc2-0a3a-4ba7-a051-1edf67f1d8db" CreationDate="2010-07-14T19:57:30.013" UserId="47" Text="Some sites I found:&#xD;&#xA;&#xD;&#xA; - http://lunar.lostgarden.com/labels/free%20game%20graphics.html&#xD;&#xA; - http://www.molotov.nu/?page=graphics" />
  <row Id="254" PostHistoryTypeId="5" PostId="85" RevisionGUID="789b9bd1-bb8e-414a-b8eb-15da9f8e6f96" CreationDate="2010-07-14T19:57:46.203" UserId="13" Comment="deleted 61 characters in body" Text="What are your tips and tricks to successfully finish a hobby game project in your freetime?&#xD;&#xA;How do you manage your project to keep it up and drive it to the finish?" />
  <row Id="255" PostHistoryTypeId="2" PostId="133" RevisionGUID="b00964af-9cd3-4ace-b687-1205f3b2f728" CreationDate="2010-07-14T19:57:50.790" UserId="30" Text="While Scrum is fairly popular, in my experience it only works if both the team and the management are willing to stick to the plan." />
  <row Id="256" PostHistoryTypeId="6" PostId="31" RevisionGUID="ce8645d3-eca0-4c75-8fef-28e436c2427f" CreationDate="2010-07-14T19:58:00.527" UserId="43" Comment="edited tags" Text="&lt;untagged&gt;" />
  <row Id="257" PostHistoryTypeId="2" PostId="134" RevisionGUID="cd33aca9-04d4-4d23-b357-fb3f41315e0e" CreationDate="2010-07-14T19:58:29.387" UserId="123" Text="Product: Blender&#xD;&#xA;&#xD;&#xA;Website: http://www.blender.org/&#xD;&#xA;&#xD;&#xA;OS(s) Supported: Windows, Mac, Linux, Solaris, IRIX&#xD;&#xA;&#xD;&#xA;License: Blender License http://www.blender.org/BL/&#xD;&#xA;&#xD;&#xA;Summary: Powerful 3D modeller, renderer, animator and generally great 3D package." />
  <row Id="258" PostHistoryTypeId="16" PostId="134" RevisionGUID="cd33aca9-04d4-4d23-b357-fb3f41315e0e" CreationDate="2010-07-14T19:58:29.387" UserId="-1" />
  <row Id="259" PostHistoryTypeId="2" PostId="135" RevisionGUID="b46a2cac-6fc8-46f8-955e-168a5006c246" CreationDate="2010-07-14T19:59:19.757" UserId="111" Text="Also referred to as Deferred Shading, Deferred Rendering refers to a wide set of possible rendering paths that store intermediate results into textures, then complete the rendering equation later by sampling the intermediate data.&#xD;&#xA;&#xD;&#xA;Geometry buffers are an early example, where the scene is rendered into a series of buffers that contain e.g. the position, normal, and base texture of opaque geometry. Lighting has not been applied, and the final color is not known. In subsequent passes lights are rendered, and the geometry buffers are sampled. This means that large numbers of lights can be rendered with a fixed cost of number of lights possibly visible on a screen pixel. Traditional rendering would have evaluated all light sources for surfaces that were occluded and never seen on screen.&#xD;&#xA;&#xD;&#xA;Many variations exist, including rendering light information first for example.&#xD;&#xA;&#xD;&#xA;See for more information:&#xD;&#xA;http://en.wikipedia.org/wiki/Deferred_shading&#xD;&#xA;http://delicious.com/aancsiid/deferred-shading&#xD;&#xA;" />
  <row Id="261" PostHistoryTypeId="5" PostId="125" RevisionGUID="30ae111b-a2e3-434b-9880-0c591aa34cf7" CreationDate="2010-07-14T19:59:51.317" UserId="10" Comment="added 2 characters in body" Text="[The Spiral model][1] is very popular for game development. Due to the fast changing development cycle and the size of most game projects.&#xD;&#xA;&#xD;&#xA;Since game development is a living project and most game projects are not defined well before the project starts. The spiral model allows for fast changes and flexible development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Spiral_model" />
  <row Id="263" PostHistoryTypeId="2" PostId="137" RevisionGUID="e10395fe-aaf4-45a1-b958-d29ad71f295f" CreationDate="2010-07-14T20:00:14.203" UserId="19" Text="Obviously there is XNA from microsoft itself: http://creators.xna.com/en-US/ &#xD;&#xA;Games made with XNA work on Windows and (via Creators club) on Xbox360. I think this is perfect to get one's feet wet in rapid game development. I haven't got my feet wet in XNA properly yet, so I can't judge it yet. But, looking from sidelines it looks like best thing since sliced bread. Sure, you can't do everythign with it. But you can make fast prototypes and working games of indie quality and beyond.&#xD;&#xA;&#xD;&#xA;Other library is SlimDX - http://slimdx.org/ which some might say is closer to metal/reality if you don't want to work with XNA. Thus, great for doing fast prototyping - especially if your primary game development is C or C++. Also, great for doing tools." />
  <row Id="264" PostHistoryTypeId="2" PostId="138" RevisionGUID="b3964fd2-161f-4ffb-b20d-16568ad166cb" CreationDate="2010-07-14T20:00:29.397" UserId="35" Text="I want to make a game that uses motion tracking as a innovative feature, but i don't know what technologies i can use to make it true.&#xD;&#xA;&#xD;&#xA;I want to use a video camera to track user movement, but i'm open to any ideas." />
  <row Id="265" PostHistoryTypeId="1" PostId="138" RevisionGUID="b3964fd2-161f-4ffb-b20d-16568ad166cb" CreationDate="2010-07-14T20:00:29.397" UserId="35" Text="Motion Tracking Technologies" />
  <row Id="266" PostHistoryTypeId="3" PostId="138" RevisionGUID="b3964fd2-161f-4ffb-b20d-16568ad166cb" CreationDate="2010-07-14T20:00:29.397" UserId="35" Text="&lt;motion-control&gt;" />
  <row Id="267" PostHistoryTypeId="2" PostId="139" RevisionGUID="37f32462-0c66-4fe1-8cc1-5ba07249021b" CreationDate="2010-07-14T20:00:37.617" UserId="55" Text="The biggest one (and most proven) to this day is the XNA framework. You can even take advantage of XNA to build your tool sets. The benefit is you have a framework that includes the libraries you need (physics, sound, graphics) wrapped in one package and the huge plus is that if you do something really well you can try and pump it into XBLA.&#xD;&#xA;" />
  <row Id="268" PostHistoryTypeId="2" PostId="140" RevisionGUID="395e3754-2d54-43b0-857d-250b69949e21" CreationDate="2010-07-14T20:01:06.493" UserId="47" Text="[XNA][1] is a pretty big library for PC/Xbox360, handling your graphics, sound, input, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/" />
  <row Id="269" PostHistoryTypeId="2" PostId="141" RevisionGUID="9bfbddcc-05d5-43f8-bd37-34838916a748" CreationDate="2010-07-14T20:01:12.217" UserDisplayName="Thomas" Text="You can also ask beginner artists to make some stuff. I know a lot of them would love to work on a game. You may even find some who are very talented. There are many sites out there where you can find people like this." />
  <row Id="270" PostHistoryTypeId="2" PostId="142" RevisionGUID="6f859021-d193-401f-a5ae-4edc4133b30a" CreationDate="2010-07-14T20:01:13.060" UserId="14" Text="At the very MINIMUM, it should have enough to clearly define the scope of the project itself. Including, but not limited to how the gameplay works, why it works, and why it's fun." />
  <row Id="271" PostHistoryTypeId="2" PostId="143" RevisionGUID="92bf623c-a1fd-4979-9a10-31779a94fe10" CreationDate="2010-07-14T20:01:40.080" UserId="27" Text="Lots of reasons:&#xD;&#xA;&#xD;&#xA;Supporting hundreds or thousands of players introduces a lot of problems. For the programmers, its essentially a giant N^2 problem. For example, imagine something as simple as updating a players position. In addition to dealing with internet latencies, once the position update reaches the server from the player's machine it now needs to be sent to all other player's machines. That's N number of messages being sent, for each player potentially 10 times a second.&#xD;&#xA;&#xD;&#xA;Content for an MMO needs to support all these players as well, and provide enough play experience so that players don't &quot;beat the game&quot; after only 40 hours.&#xD;&#xA;&#xD;&#xA;Server hardware to run an MMO as well as bandwidth costs are typically very expensive.&#xD;&#xA;&#xD;&#xA;TLDR: MMOs are big and complex." />
  <row Id="272" PostHistoryTypeId="2" PostId="144" RevisionGUID="7c610635-2fcd-4339-928a-c68d30991326" CreationDate="2010-07-14T20:02:17.037" UserId="122" Text="SoulBeaver was correct to point out that you need to know art.&#xD;&#xA;A lot of the tutorials online will give you a mechanical guide on how to achieve a certain effect or how to draw with a tablet etc but if you don't know how to draw then you won't be able to produce much.&#xD;&#xA;&#xD;&#xA;By all means learn the software, if you want to do spriting then you need to know how to use something like Photoshop, Paint.net Gimp, graphics gale etc but don't neglect your drawing skills and you're ability to interpret what you have in you head into something tangible.&#xD;&#xA;&#xD;&#xA;Someone on Reddit university is starting a course on [Video game concept art and drawing][1]&#xD;&#xA;It might not be exactly what you're looking for but it's free and might be worth a look.&#xD;&#xA;&#xD;&#xA;  [1]: http://universityofreddit.com/v2/class.php?id=55" />
  <row Id="273" PostHistoryTypeId="2" PostId="145" RevisionGUID="6389116c-b474-42bd-be5a-bcbacc4f5711" CreationDate="2010-07-14T20:02:57.923" UserId="97" Text="[**OpenCV**](http://sourceforge.net/projects/opencvlibrary/) is developed by Intel and is open source, so that's always cool." />
  <row Id="274" PostHistoryTypeId="2" PostId="146" RevisionGUID="8069ad02-908d-48f5-9cf3-1c3c0bc77424" CreationDate="2010-07-14T20:03:36.690" UserId="10" Text="There are no minimum / maximum. It should contain everything you need to start work on the game. Nothing more and nothing less.&#xD;&#xA;&#xD;&#xA;You should not require yourself to add information that you think you need just because some template has it." />
  <row Id="275" PostHistoryTypeId="2" PostId="147" RevisionGUID="fe08322d-1160-44b8-a92c-d31e5666ca1b" CreationDate="2010-07-14T20:04:06.500" UserId="119" Text="Start by creating a game that is stupidly simple, and get it finished and published online somewhere. Remember that even something seemingly simple like pong could turn out to be quite complex if you're new game development, and starting with a simple game will show you whether you have the patience to take on a bigger project.&#xD;&#xA;" />
  <row Id="276" PostHistoryTypeId="2" PostId="148" RevisionGUID="74a75d75-b15f-4f70-a467-bdd99375d69a" CreationDate="2010-07-14T20:04:17.687" UserId="18" Text="Google's Chris Pruett talks about this issue in his [Replica Island blog](http://replicaisland.blogspot.com/2009/10/rendering-with-two-threads.html). Because eglSwapBuffers() is a blocking call in the GLSurfaceView thread, having game logic code in another thread allows it to run while the swap buffers call is blocking. This is important if your game is complex and you want to achieve 60 frames per second. &#xD;&#xA;&#xD;&#xA;You can download the [source code](http://code.google.com/p/replicaisland/) for Replica Island and see how they did it. I've implemented something similar for my game (with the three threads you talked about) and it works great.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="277" PostHistoryTypeId="2" PostId="149" RevisionGUID="1ef4ec92-431b-492a-aa00-1de7892752c7" CreationDate="2010-07-14T20:05:54.640" UserId="127" Text="I like to have headings related to what Art, Sound and Storyline I'll need going forward as well as a basic coding design I can follow when I am coding the engine. &#xD;&#xA;&#xD;&#xA;However it is a personal thing and everyone varies on how much detail they put in. Mine are fairly short since I like to jump straight into the code rather than dwelling on design." />
  <row Id="278" PostHistoryTypeId="2" PostId="150" RevisionGUID="61eb2787-c623-4ccb-9d3f-036994ab3fc7" CreationDate="2010-07-14T20:06:32.423" UserId="35" Text="Android uses OpenGL ES, what is the difference between it and OpenGL?" />
  <row Id="279" PostHistoryTypeId="1" PostId="150" RevisionGUID="61eb2787-c623-4ccb-9d3f-036994ab3fc7" CreationDate="2010-07-14T20:06:32.423" UserId="35" Text="What is the difference between OpenGL ES and OpenGL?" />
  <row Id="280" PostHistoryTypeId="3" PostId="150" RevisionGUID="61eb2787-c623-4ccb-9d3f-036994ab3fc7" CreationDate="2010-07-14T20:06:32.423" UserId="35" Text="&lt;opengl&gt;&lt;opengl-es&gt;" />
  <row Id="281" PostHistoryTypeId="2" PostId="151" RevisionGUID="bea54c9e-b678-4065-b3a2-406fac179c2d" CreationDate="2010-07-14T20:06:33.203" UserId="119" Text="I'd say you should work out what the gameplay is, who your character is, and what the environment is like. But my advice would be to start making playable prototypes as early as possible." />
  <row Id="282" PostHistoryTypeId="2" PostId="152" RevisionGUID="abcd8a9e-5c85-4e90-9e18-1af020b41876" CreationDate="2010-07-14T20:08:00.923" UserId="55" Text="It's far from the best, but this an implementation I did of [A* in Python][1] a few years ago.&#xD;&#xA;&#xD;&#xA;It's probably better that I point you to resources than attempt to explain the entire algorithm.  Also, as you read through the wiki article, play with the demo and see if you can visualize how it is working. Leave a comment if you have a specific question.&#xD;&#xA;&#xD;&#xA; 1. [A* on Wikipedia][2]&#xD;&#xA; 2. [A* Java demonstration][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://folio.david-mcgraw.com/Sample/C++__AStar.txt&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A*&#xD;&#xA;  [3]: http://www.vision.ee.ethz.ch/~cvcourse/astar/AStar.html" />
  <row Id="283" PostHistoryTypeId="2" PostId="153" RevisionGUID="09a8d585-5408-476f-9ea7-48d901d18e0c" CreationDate="2010-07-14T20:08:12.903" UserId="113" Text="This isn't much of a primer, but we discussed graph algorithms extensively in our algorithms class last Fall 2009.  We used this book,&#xD;&#xA;&#xD;&#xA;Introduction to Algorithms, Third Edition by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein&#xD;&#xA;&#xD;&#xA;http://mitpress.mit.edu/algorithms/&#xD;&#xA;&#xD;&#xA;and it also has accompanying youtube lectures from an MIT class.&#xD;&#xA;&#xD;&#xA;http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/&#xD;&#xA;&#xD;&#xA;Chapters 17, 18, and 19 dealt with shortest paths." />
  <row Id="284" PostHistoryTypeId="2" PostId="154" RevisionGUID="0e7660db-1df8-4667-982e-d52ece6d592f" CreationDate="2010-07-14T20:08:16.787" UserId="94" Text="Blender might be worth checking out, both for asset creation and for the game engine it offers." />
  <row Id="285" PostHistoryTypeId="2" PostId="155" RevisionGUID="acbf8983-46e1-424f-984b-c63083807732" CreationDate="2010-07-14T20:08:25.710" UserId="31" Text="This depends on what you actually need it for. As David points out, Lua is very popular, although one game developer noted to me that he wasn't entirely sure why. I think its lightness is a common reason, but at that this point, I would expect a lot of people use Lua because that's become the de facto standard. It seems best for very lightweight modification.&#xD;&#xA;&#xD;&#xA;For a more fully-fledged approach, I'd say Python is the right choice. Civ IV used it to decent effect." />
  <row Id="286" PostHistoryTypeId="2" PostId="156" RevisionGUID="51ba5ff9-27b4-49e1-a4b7-1ec9977e432c" CreationDate="2010-07-14T20:08:27.863" UserId="122" Text="[Rokon][1] looks pretty good, haven't tried it myself but it seems pretty active.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rokonandroid.com/" />
  <row Id="287" PostHistoryTypeId="2" PostId="157" RevisionGUID="70358e19-8c67-453d-bef8-f7bc66200cbf" CreationDate="2010-07-14T20:08:46.117" UserId="47" Text="For a really good example of what I'm talking about, see how the developer of Replica Island does it based off of Player deaths: http://www.youtube.com/watch?v=7-62tRHLcHk&amp;feature=player_embedded#t=37m&#xD;&#xA;&#xD;&#xA;How can I easily produce heatmaps based off of data that I pass in?&#xD;&#xA;&#xD;&#xA;Halo 3 is another good example of heatmap usage in game data reporting: http://www.bungie.net/Online/Heatmaps.aspx" />
  <row Id="288" PostHistoryTypeId="1" PostId="157" RevisionGUID="70358e19-8c67-453d-bef8-f7bc66200cbf" CreationDate="2010-07-14T20:08:46.117" UserId="47" Text="How can I produce heatmaps based off of player reported data?" />
  <row Id="289" PostHistoryTypeId="3" PostId="157" RevisionGUID="70358e19-8c67-453d-bef8-f7bc66200cbf" CreationDate="2010-07-14T20:08:46.117" UserId="47" />
  <row Id="290" PostHistoryTypeId="2" PostId="158" RevisionGUID="449f588d-2d4f-40eb-bf03-1dc19da2629d" CreationDate="2010-07-14T20:09:19.500" UserId="19" Text="I come from a different stream of life (TV Production), but it's basically the same. &#xD;&#xA;You need a production bible. But, to put it more simply - you need what you need and nothing more.&#xD;&#xA;&#xD;&#xA; - Character list&#xD;&#xA; - Levels list with each level set list (areas that need/deserve special attention)&#xD;&#xA; - Prop list&#xD;&#xA;&#xD;&#xA;Each list contains layout sheets (or character layouts for characters - front, side, 3/4), notes, mechanics notes for animation, etc. Whatever you need or might need. &#xD;&#xA;&#xD;&#xA;Story/Game production sheet.&#xD;&#xA;&#xD;&#xA; - Screenplay and X-Sheets for animators if you have a story and dialog/VO&#xD;&#xA; - Run through screenplay which describes game as though linearly progressed (if game is intricate enough to need it and is, of course, linear in nature)&#xD;&#xA; - Game mechanics per game/level/mini game with set goals, obstacles, rewards - you can do this per level list and only a big idea in run through screenplay&#xD;&#xA;&#xD;&#xA;In short, whatever works for you and size/scope of your team.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="291" PostHistoryTypeId="2" PostId="159" RevisionGUID="59769857-02c5-46ef-a4a6-ff9533d8ee89" CreationDate="2010-07-14T20:09:33.337" UserId="100" Text="I was wondering what kind of roles do exist for a game project. I know you can be a programmer, a designer, tester etc.  &#xD;&#xA;But I'd like to know all of them, and what activities are in charge of each one. If possible, also I'd like to see some web resources for each one as an entry point to the game industry." />
  <row Id="292" PostHistoryTypeId="1" PostId="159" RevisionGUID="59769857-02c5-46ef-a4a6-ff9533d8ee89" CreationDate="2010-07-14T20:09:33.337" UserId="100" Text="Game industry specialties" />
  <row Id="293" PostHistoryTypeId="3" PostId="159" RevisionGUID="59769857-02c5-46ef-a4a6-ff9533d8ee89" CreationDate="2010-07-14T20:09:33.337" UserId="100" Text="&lt;management&gt;" />
  <row Id="294" PostHistoryTypeId="2" PostId="160" RevisionGUID="638615bf-ead2-4c94-8e8c-7e82a7011e6b" CreationDate="2010-07-14T20:11:04.097" UserId="127" Text="I would just like someone to explain in relativly clear terms how hardware tessellation works considering it is the new buzzword with DX11. &#xD;&#xA;&#xD;&#xA;Thanks. " />
  <row Id="295" PostHistoryTypeId="1" PostId="160" RevisionGUID="638615bf-ead2-4c94-8e8c-7e82a7011e6b" CreationDate="2010-07-14T20:11:04.097" UserId="127" Text="How does hardware tessellation work?" />
  <row Id="296" PostHistoryTypeId="3" PostId="160" RevisionGUID="638615bf-ead2-4c94-8e8c-7e82a7011e6b" CreationDate="2010-07-14T20:11:04.097" UserId="127" Text="&lt;dx11&gt;&lt;hardware&gt;&lt;tessellation&gt;" />
  <row Id="297" PostHistoryTypeId="2" PostId="161" RevisionGUID="f337a02b-563d-42ab-9815-ab53e3c33ad3" CreationDate="2010-07-14T20:11:48.073" UserId="10" Text="OpenGL ES (Embedded Systems) is a stripped down version of OpenGL. There are a lot of differences between those two and if you want to go way into the details, [then you can read this 128 specification paper.][1] But ES is a subset of OpenGL so all ES apps work on non ES systems but not the opposite.&#xD;&#xA;&#xD;&#xA;There is no one place where you can easily define what is in ES and what is not. Even one definition is &quot;OpenGL-ES is just like OpenGL, but without a lot of stuff. For example, there's no glBegin or glEnd.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.khronos.org/registry/gles/specs/1.1/es_cm_spec_1.1.12.pdf" />
  <row Id="298" PostHistoryTypeId="2" PostId="162" RevisionGUID="c8b77418-d92b-4d9e-a0a6-d2ffe74e307e" CreationDate="2010-07-14T20:11:49.820" UserId="94" Text="AngelXNA (http://www.jeffongames.com/2009/05/angelxna-v10/) is a nice prototype-oriented library/engine built on XNA, if you're looking for something more high-level." />
  <row Id="300" PostHistoryTypeId="2" PostId="164" RevisionGUID="e9b1ca90-adc1-4965-898d-a6a390e21ada" CreationDate="2010-07-14T20:12:52.220" UserId="119" Text="ActionScript is a hybrid dynamic/static typed language used to create Flash games, which can be widely distributed on the web. It is fairly well supported with libraries like Flixel, FlashPunk and Box2d." />
  <row Id="302" PostHistoryTypeId="2" PostId="165" RevisionGUID="fd7fa409-2622-4fc0-b205-d464bf6ba95f" CreationDate="2010-07-14T20:12:56.137" UserId="127" Text="EA covers it pretty well -&gt; https://jobs.ea.com/students/roles/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="303" PostHistoryTypeId="2" PostId="166" RevisionGUID="e7ae7208-4f57-4f49-9eb2-407f9a42e327" CreationDate="2010-07-14T20:13:57.070" UserId="73" Text="**Websites:**&#xD;&#xA;&#xD;&#xA;[GameDev.net][1] is definitely [one of] the best websites out there to begin your journey. As a matter of fact, I'd recommend reading the whole beginner's section and continue with the book section to get the idea on what you want to get specialized.&#xD;&#xA;&#xD;&#xA;It's important to participate actively on forums. You get help from others and eventually you'll start helping other people; and that's how you learn the most: helping and teaching.&#xD;&#xA;&#xD;&#xA;[Game Career Guide][2] IMHO, is the number one resource to find schools on game development around the globe and get first-hand information on how to get &quot;the party&quot; started in the academia. They also got a good deal of articles that are worth reading.&#xD;&#xA;&#xD;&#xA;[Gamasutra][3] is a great portal for game development professionals. You can find job offers, news about the industry, game's postmortems, in-depth analysis (from the development side). That information help not only the professional, but the aspiring professional to get an idea about the field.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Books**&#xD;&#xA;&#xD;&#xA;I'd recommend reading &quot;[Game Development Essentials: An Introduction][4]&quot; and continue with &quot;[Introduction to Game Development][5]&quot;. Why? Because these books talk about the whole deal. Games are software, but you also have to know about the jobs your partners from design, art and sound do.&#xD;&#xA;&#xD;&#xA;From that point, you'll decide what suits you best: Coding/Designing/Art/Sound, DirectX/OpenGL, XNA/SDL/Allegro, etc.&#xD;&#xA;&#xD;&#xA;A common recommendation among experienced developers: specialize. If you like programming, learn how to program well first (math, algorithms, graphs, object-oriented programming) and continue with games (because you need to know how to solve problems which get down to these 'basic' stuff). However, you can make games with the system console ;-). Use your imagination.&#xD;&#xA;&#xD;&#xA;The same happens with art/graphic design, sound, writing. You'll get a wider set of tools on your field if you open your mind and absorb all the knowledge you can on your area of expertise.&#xD;&#xA;&#xD;&#xA;Finally, I agree with Tetrad: &quot;the best resource is experience&quot;. Hope it helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/&#xD;&#xA;  [2]: http://www.gamecareerguide.com/&#xD;&#xA;  [3]: http://www.gamasutra.com/&#xD;&#xA;  [4]: http://www.amazon.com/gp/product/1418042080?ie=UTF8&amp;tag=pctrostudi-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1418042080&#xD;&#xA;  [5]: http://www.amazon.com/gp/product/1584506792?ie=UTF8&amp;tag=pctrostudi-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1584506792" />
  <row Id="304" PostHistoryTypeId="16" PostId="166" RevisionGUID="e7ae7208-4f57-4f49-9eb2-407f9a42e327" CreationDate="2010-07-14T20:13:57.070" UserId="-1" />
  <row Id="305" PostHistoryTypeId="2" PostId="167" RevisionGUID="912c6239-4a34-4c47-808f-321f76961f6d" CreationDate="2010-07-14T20:13:57.617" UserId="47" Text="Unity3D (which can technically be used to make 2D games) is &quot;coming soon&quot; for Android: http://unity3d.com/" />
  <row Id="306" PostHistoryTypeId="2" PostId="168" RevisionGUID="1b69ee2a-6da1-4cb8-89fd-ca0e180d85ba" CreationDate="2010-07-14T20:15:14.913" UserId="31" Text="Having just begun studying design documents, I've come to the conclusion that no-one really knows what goes in them.&#xD;&#xA;&#xD;&#xA;The design document itself should be what you need to progress from pre-production to production. How do you turn the game design from this nebulous idea to something that can be created and executed? Too little detail and there's too much ambiguity, creating uneven results, too much detail and you limit possible creativity from your team.&#xD;&#xA;&#xD;&#xA;It's not easy, and the science of game design documents is woefully under-explored in comparison to other software domains.&#xD;&#xA;&#xD;&#xA;A good paper on this is [Requirements Engineering and the Creative Process in the Video Game Industry][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.2801&amp;rep=rep1&amp;type=pdf" />
  <row Id="307" PostHistoryTypeId="2" PostId="169" RevisionGUID="b8436e95-b05d-4121-9602-4b33d4707862" CreationDate="2010-07-14T20:15:47.223" UserId="106" Text="I asked myself the same question a long time ago. The best way to answer it is this: Design the simplest, dumbest MMO you can imagine. Say, each player is a little ball rolling around, doing absolutely nothing but watch other players. Use, no textures, just solid colors. No lighting, no combat, no interactions. Nothing. Simple, right? Now write it, complete it to the point where you can distribute it online and people can install it, play with it and report errors. See how that goes. This world is about 3 orders of magnitude simpler than WoW, so factor that in and you'll get your answer.  Only with experience you will see what a giant time sink building games to completion is.  Ask any good developer how long it took them to finish a prototype of their game that looked *almost* as what they imagined the final version would look like. Then ask them how long it took to finish the game." />
  <row Id="308" PostHistoryTypeId="2" PostId="170" RevisionGUID="2d4458b1-5ae1-4dd4-ae43-bd02f2be3933" CreationDate="2010-07-14T20:15:48.610" UserId="6" Text="If you're looking for scripting in C#, definitely take a look at [IronPython][1]. It's not just a python API for C#, it is actually a completely separate python implementation which compiles to the same CLR assembly (with the same performance) that C# does, but can be interfaced with as a scripting language. Any Lua wrapper for C# would be much slow due to the overhead of Marshalling.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ironpython.net/" />
  <row Id="309" PostHistoryTypeId="2" PostId="171" RevisionGUID="52f06915-61f5-493d-acc1-9b4be10fdddc" CreationDate="2010-07-14T20:16:24.787" UserId="19" Text="For example, get coordinates on a designated event in the game. For example when player dies, you get coordinates in your scenegraph where player died.&#xD;&#xA;&#xD;&#xA;So once you have values you need in your database, enumerate each coordinate how many times it appears in your list/database. You'll have a list something like:&#xD;&#xA;&#xD;&#xA;- 15: 1,5&#xD;&#xA;- 10: 6.15&#xD;&#xA;-  3: 27,58&#xD;&#xA;&#xD;&#xA;or whatever your values are. You'll have a frequency paired with coordinate like a key-&gt;value pair. You can then quantify key scale to a color. For example key of 0 is black and maximum key you have in your key-value list is red, and everything between is a gradient between black, mid point yellow and max point red. Quantify each result to a color and there you have it." />
  <row Id="310" PostHistoryTypeId="2" PostId="172" RevisionGUID="8e87f2ce-ed46-4862-b0aa-056a3b094140" CreationDate="2010-07-14T20:16:38.967" UserId="120" Text="[torque2D][1] supports PC and mac out of the box. The iTorque2D supports deployment to the iphone. Its also possible to get console deployment.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torquepowered.com/products/torque-2d" />
  <row Id="311" PostHistoryTypeId="2" PostId="173" RevisionGUID="47c15e49-df31-4788-9fc4-481c8824f347" CreationDate="2010-07-14T20:16:42.213" UserId="30" Text="Here's an article which has a pretty good rundown of the various roles, with a link to a PDF containing a more exhaustive list.&#xD;&#xA;&#xD;&#xA;[http://www.skillset.org/games/careers/article_2768_1.asp][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.skillset.org/games/careers/article_2768_1.asp" />
  <row Id="312" PostHistoryTypeId="2" PostId="174" RevisionGUID="e1fa7ffa-a396-4adc-9ad2-f3a9cd8f0f90" CreationDate="2010-07-14T20:17:42.087" UserId="122" Text="There's also a port of the C Library SDL to .NET, [SDL.NET][1]. &#xD;&#xA;I personally would use XNA in C# because it's just a well put together library, very customizable and also beginner friendly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cs-sdl.sourceforge.net/index.php/Main_Page" />
  <row Id="313" PostHistoryTypeId="2" PostId="175" RevisionGUID="40cfb84a-72c3-44b9-b1e8-9db456f31d4d" CreationDate="2010-07-14T20:18:11.537" UserId="138" Text="I'm not sure if you're looking for some sort of app or an algorithm for this one. I've actually had the pleasure of building custom heat map visualization software and it's a lot of fun.&#xD;&#xA;&#xD;&#xA;A quick Google search revealed [HeatMap API][1] which could be an appropriate solution if you don't want to roll your own.&#xD;&#xA;&#xD;&#xA;Maybe if you explain exactly what you're looking for (application-wise or programming-wise) we can help you better?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.heatmapapi.com/" />
  <row Id="314" PostHistoryTypeId="2" PostId="176" RevisionGUID="1e6c3389-12c6-40b3-bdb9-0ae949f2ca65" CreationDate="2010-07-14T20:18:13.677" UserId="119" Text="Pain.NET&#xD;&#xA;&#xD;&#xA;http://www.getpaint.net/&#xD;&#xA;&#xD;&#xA;2D Graphics&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;FREE!&#xD;&#xA;&#xD;&#xA;MIT?&#xD;&#xA;&#xD;&#xA;Free alternative to Photoshop for basic tasks." />
  <row Id="315" PostHistoryTypeId="16" PostId="176" RevisionGUID="1e6c3389-12c6-40b3-bdb9-0ae949f2ca65" CreationDate="2010-07-14T20:18:13.677" UserId="-1" />
  <row Id="316" PostHistoryTypeId="2" PostId="177" RevisionGUID="7c7a62fe-e896-4792-830c-df96a87cf5dc" CreationDate="2010-07-14T20:18:20.353" UserId="38" Text="Anyone have any good examples, tutorials, or snippets to share that preferably in C# or C/C++?" />
  <row Id="317" PostHistoryTypeId="1" PostId="177" RevisionGUID="7c7a62fe-e896-4792-830c-df96a87cf5dc" CreationDate="2010-07-14T20:18:20.353" UserId="38" Text="What is some good examples about creating 2D fluids?" />
  <row Id="318" PostHistoryTypeId="3" PostId="177" RevisionGUID="7c7a62fe-e896-4792-830c-df96a87cf5dc" CreationDate="2010-07-14T20:18:20.353" UserId="38" Text="&lt;2d&gt;&lt;simulations&gt;" />
  <row Id="319" PostHistoryTypeId="6" PostId="157" RevisionGUID="238d9733-f93b-4929-b8b2-1eb280601146" CreationDate="2010-07-14T20:18:46.793" UserId="35" Comment="edited tags" Text="&lt;visualization&gt;" />
  <row Id="320" PostHistoryTypeId="2" PostId="178" RevisionGUID="d7c00d5d-f9f3-4f45-a28d-590e9bd5f1f9" CreationDate="2010-07-14T20:19:11.253" UserId="9" Text="Suppose you've got an object floating freely in space. You have a vector you want this object to point towards, and a vector representing the direction it's currently facing. From these two, you can get the rotation (matrix, quaternion, whatever) that represents the change in orientation to bring the two vectors into alignment.&#xD;&#xA;&#xD;&#xA;If you only have the ability to apply torque (derivative of angular velocity) to your object, what's a good algorithm for applying torque over time that won't over/undershoot the destination?&#xD;&#xA;&#xD;&#xA;(In this case, it's a space ship that wants to automatically orient itself in the direction of travel using thrusters. Roll is irrelevant.)" />
  <row Id="321" PostHistoryTypeId="1" PostId="178" RevisionGUID="d7c00d5d-f9f3-4f45-a28d-590e9bd5f1f9" CreationDate="2010-07-14T20:19:11.253" UserId="9" Text="Changing orientation by applying torques" />
  <row Id="322" PostHistoryTypeId="3" PostId="178" RevisionGUID="d7c00d5d-f9f3-4f45-a28d-590e9bd5f1f9" CreationDate="2010-07-14T20:19:11.253" UserId="9" Text="&lt;torque&gt;&lt;orientation&gt;&lt;physics&gt;" />
  <row Id="323" PostHistoryTypeId="2" PostId="179" RevisionGUID="7b18212d-c1d6-45a2-9494-be0cbe5e0f12" CreationDate="2010-07-14T20:20:02.220" UserId="43" Text="Product: sfxr&#xD;&#xA;&#xD;&#xA;Website: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;&#xD;&#xA;OS(s) Supported: Windows, Linux, Mac&#xD;&#xA;&#xD;&#xA;License: MIT&#xD;&#xA;&#xD;&#xA;Summary:  Provide a simple means of generating basic sound effects." />
  <row Id="324" PostHistoryTypeId="16" PostId="179" RevisionGUID="7b18212d-c1d6-45a2-9494-be0cbe5e0f12" CreationDate="2010-07-14T20:20:02.220" UserId="-1" />
  <row Id="325" PostHistoryTypeId="2" PostId="180" RevisionGUID="726d87f6-5da5-43a3-85ef-c2a400b7c663" CreationDate="2010-07-14T20:20:04.187" UserId="19" Text="As Justing said, OpenCV. But if you want to get your feet wet quickly, I suggest you try dabbling with [openFrameworks][1] It has an addon that wraps OpenCV and you will learn a lot from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.openframeworks.cc/" />
  <row Id="326" PostHistoryTypeId="2" PostId="181" RevisionGUID="174b0192-f374-4f14-b4c1-58071c3d35a9" CreationDate="2010-07-14T20:23:12.930" UserId="145" Text="http://www.opengameart.org has lots of art available under many licenses" />
  <row Id="328" PostHistoryTypeId="2" PostId="183" RevisionGUID="1af59657-647e-48b6-aaa9-6655054527ff" CreationDate="2010-07-14T20:23:34.287" UserId="19" Text="PixelJunk shooter from Q-Games has nice set of fluids. There is a GDC paper they have published here: http://fumufumu.q-games.com/gdc2010/shooterGDC.pdf (PDF!)&#xD;&#xA;&#xD;&#xA;Jos Stam from Alias Maya fame (now Autodesk) wrote paper on real time fluids in games here: http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf (PDF!)&#xD;&#xA;&#xD;&#xA;And he wrote a simple FFT fluid solver here: http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/jgt01.pdf (PDF!) where he included source in that PDF at the end.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="329" PostHistoryTypeId="2" PostId="184" RevisionGUID="29f45047-4943-4965-8463-beb4892a0cf3" CreationDate="2010-07-14T20:24:09.980" UserId="101" Text="The defining characteristic of deferred rendering is that it essentially changes the complexity of scene rendering from O(geometry * lights) to O(geometry + lights).&#xD;&#xA;&#xD;&#xA;This is achieved by first rendering the scene using shaders designed to output basic attributes such as (at a minimum) position*, normal, and diffuse color. Other attributes might include per-pixel specular values and other material properties. These are stored in full screen render targets, collectively known as the G-buffer.&#xD;&#xA;&#xD;&#xA;(*: *It's worth noting that developers will more commonly opt to store depth, and use that to reconstruct position, since having depth available is useful for so many other effects.*)&#xD;&#xA;&#xD;&#xA;Once the G-buffer has been generated, it's possible to compute a fully lit result for any pixel on the screen by solving the BRDF exactly once per pixel per light. In other words, if you have 20 meshes that each are affected by 20 lights, traditional (&quot;forward&quot;) rendering would demand that you re-render each mesh several times in order to accumulate the result of each light affecting it. In the worst case, this would be one draw call per mesh per light, or 400 total draw calls! For each of these draw calls, you're redundantly retransforming the vertices of the mesh. There's also a good chance that you'll be shading pixels that aren't actually affected by the light, or won't be visible in the final result (because they'll be occluded by other geometry in the scene). Each of these results in wasted GPU resources.&#xD;&#xA;&#xD;&#xA;Compare to deferred rendering: You only have to render the meshes once to populate the G-buffer. After that, for each light, you render a bounding shape that represents the extents of the light's influence. For a point light, this could be a small sphere, or for a directional light, it would be a full screen quad, since the entire scene is affected.&#xD;&#xA;&#xD;&#xA;Then, when you're executing the pixel/fragment shader for that light's bounding volume, you read the geometry attributes from the appropriate position in the G-buffer textures, and use those values to determine the lighting result. Only the scene pixels that are visible in the final result are shaded, and they are shaded exactly once per light. This represents a potentially huge savings.&#xD;&#xA;&#xD;&#xA;However, it's not without drawbacks. It's a paradigm which is very difficult to extend to handle transparent geometry (see: depth peeling). So difficult, in fact, that virtually all deferred rendering implementations fall back to forward rendering for the transparent portions of the scene. Deferred rendering also consumes a large amount of VRAM and frame buffer bandwidth, which leads to developers going to great lengths to cleverly pack and compress G-buffer attributes into the smallest/fewest components possible." />
  <row Id="330" PostHistoryTypeId="2" PostId="185" RevisionGUID="11074131-ad3e-4bf6-ac66-4d6c552c2a5a" CreationDate="2010-07-14T20:26:40.003" UserId="144" Text="I love the netlabels section of Archive.org for this purpose. Lots and lots of interesting music that is [mostly] freely available for use (check individual licenses). Great search capability too.&#xD;&#xA;&#xD;&#xA;http://www.archive.org/search.php?query=collection:%22netlabels%22&#xD;&#xA;&#xD;&#xA;I would say it is for background pieces or ambiance more than anything." />
  <row Id="331" PostHistoryTypeId="2" PostId="186" RevisionGUID="d3db4527-97e6-405f-a026-8da41215f544" CreationDate="2010-07-14T20:27:20.220" UserId="18" Text="The biggest problem with hobby projects is not having a well defined scope. Many people start by wanting to make the best game ever with hours of gameplay and all the cool ideas they have. Instead, you should try to scale down your idea to something manageable and then come up with a reasonable schedule. It's true that deadlines are at odds with the game being a hobby project and not a full time job, but they are good for staying motivated and breaking down big tasks into small manageable ones.&#xD;&#xA;&#xD;&#xA;You can also keep a version history file that is updated every time you add something to the game. Better yet, you should use version control and use the commit history for that. It's a good way of measuring your progress and staying motivated later (by looking at all the stuff you already did)." />
  <row Id="332" PostHistoryTypeId="2" PostId="187" RevisionGUID="451f168d-020b-4666-87ac-564427af19a8" CreationDate="2010-07-14T20:27:45.180" UserId="55" Text="I actually just wrote a blog about how I [approached the design and development][1] for my latest iPhone project. You might find value in reading it. &#xD;&#xA;&#xD;&#xA;A few thoughts to leave here are&#xD;&#xA;&#xD;&#xA;- Use an application like [Things][2] or a free todo application off of [sourceforge.net][3]&#xD;&#xA;- Break down your tasks into very tiny chunks. This way you will see progress which will help motivate you.&#xD;&#xA;- Early eye-candy. It's important for me to see how the game is going to look early. This will adds as motivation.&#xD;&#xA;- Work with other people if you're not (jump over to tigsource.com or gamedev.net)&#xD;&#xA;- Be reasonable with the scope of your project and team size. Don't try to create Starcraft III if you don't have the resources.&#xD;&#xA;- Regularly playtest your game with people so you can start getting immediate feedback&#xD;&#xA;- Start a blog and talk about what you're doing... [www.wolfire.com][4] is pure win at this. &#xD;&#xA;- For every mundane or difficult task you do try and follow it with a fun task. Save state -&gt; Implementing animations for the GUI system.&#xD;&#xA;- Take a break. If your mind isn't into the project at a specific time don't try and force it. Get up and go for a walk or take a quick nap. That's the luxury you have as being independent.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.david-mcgraw.com/2010/07/13/approaching-design-for-an-ios-project/&#xD;&#xA;  [2]: http://culturedcode.com/things/&#xD;&#xA;  [3]: http://sourceforge.net&#xD;&#xA;  [4]: http://www.wolfire.com" />
  <row Id="334" PostHistoryTypeId="2" PostId="189" RevisionGUID="0e0338be-4e8c-4b82-9059-f0c322736ae4" CreationDate="2010-07-14T20:29:42.227" UserId="10" Text="[Here is a little article][1] with an animated GIF that show's Dijkstra's Algorithm in motion.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.sunysb.edu/~skiena/combinatorica/animations/dijkstra.html" />
  <row Id="335" PostHistoryTypeId="2" PostId="190" RevisionGUID="fe16b3ea-2569-4d5f-8743-66cc83fa240e" CreationDate="2010-07-14T20:29:52.773" UserId="119" Text="Gamepad for input - http://blog.iainlobb.com/2010/04/introducing-gamepad.html (my project)&#xD;&#xA;&#xD;&#xA;Box2d for physics - http://www.box2dflash.org/&#xD;&#xA;&#xD;&#xA;TweenMax for animation - http://www.greensock.com/tweenmax/&#xD;&#xA;&#xD;&#xA;Signals for eventing - http://github.com/robertpenner/as3-signals" />
  <row Id="338" PostHistoryTypeId="2" PostId="192" RevisionGUID="3fe6a181-06d4-41e5-bc74-214b91bda865" CreationDate="2010-07-14T20:30:53.770" UserDisplayName="Blackbone" Text="Choosing one scripting language over another is dependent on your specific requirements.&#xD;&#xA;&#xD;&#xA;Some of the options you have to choose between could be:&#xD;&#xA;&#xD;&#xA;Speed of the interpreter - if the feature of scripting is solely used i.e. by developers to script static behaviour, then speed and a fully-fledged and extendable API may be the most important aspect. I had some good experiences with LUA there.&#xD;&#xA;&#xD;&#xA;Easy to learn, accessibility - for a content-/leveldesigner it may be hard to learn more complex scripting languages (depends on the background) to generate dynamic behaviour. In that case, the use of easy to learn (i.e. commonly used) and well documented languages could be more appropriate here. JavaScript or Python could be a good solution here.&#xD;&#xA;&#xD;&#xA;Workflow integration - if you have a specific production pipeline with already existing tools, it could be a bad idea to use a language which seems to work best for a given case if the other tools are working with a completely different one. This is especially valid if you have several programmers working on the different tools. In that case, it could be more efficient to use the &quot;not quite fitting&quot; language.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="339" PostHistoryTypeId="2" PostId="193" RevisionGUID="e1fd3f77-8cc5-492e-a322-56d2e74dbd94" CreationDate="2010-07-14T20:34:10.097" UserId="136" Text="As Sean said, IronPython is worth looking at.  IronPython is actually one of a few dynamic language implementations for .NET targeting the Dynamic Language Runtime (DLR).  There is at least one open source project aimed at implementing Lua on the DLR (like [this one][1]), but I'm not sure if there are any implementations near completion.  A well-implemented set of DLR bindings for Lua should provide performance on par with IronPython and IronRuby, and would be much faster than a Lua wrapper.  For the sake of comparison, IronPython generally performs better than CPython (sometimes significantly better).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/ironlua/" />
  <row Id="340" PostHistoryTypeId="2" PostId="194" RevisionGUID="01f84318-f0d9-4aaa-a10d-f5404096d1e6" CreationDate="2010-07-14T20:34:52.060" UserId="119" Text="Pick up a cheap microphone, download Audacity and go wild!" />
  <row Id="341" PostHistoryTypeId="2" PostId="195" RevisionGUID="2856fef8-9602-43a2-ac43-9c37ee1b2c20" CreationDate="2010-07-14T20:37:25.017" UserId="35" Text="Do you have any tips/recommendations when creating a cross-platform game in C/C++?" />
  <row Id="342" PostHistoryTypeId="1" PostId="195" RevisionGUID="2856fef8-9602-43a2-ac43-9c37ee1b2c20" CreationDate="2010-07-14T20:37:25.017" UserId="35" Text="Any tips for creating cross-platform games?" />
  <row Id="343" PostHistoryTypeId="3" PostId="195" RevisionGUID="2856fef8-9602-43a2-ac43-9c37ee1b2c20" CreationDate="2010-07-14T20:37:25.017" UserId="35" Text="&lt;cross-platform&gt;&lt;c++&gt;&lt;c&gt;" />
  <row Id="344" PostHistoryTypeId="2" PostId="196" RevisionGUID="3f920468-ec73-49fb-8d8e-3d0f49070f94" CreationDate="2010-07-14T20:37:25.610" UserId="73" Text="I'm not much of a Linux guy, but these are my recommendations based on research and experience:&#xD;&#xA;&#xD;&#xA;**Programming**&#xD;&#xA;&#xD;&#xA;- Eclipse IDE for code editing and project management.&#xD;&#xA;- Java.&#xD;&#xA;- GCC.&#xD;&#xA;- Python.&#xD;&#xA;- OpenGL.&#xD;&#xA;&#xD;&#xA;**Programming Libraries**&#xD;&#xA;&#xD;&#xA;- Java2D.&#xD;&#xA;- SDL.&#xD;&#xA;- PyGame.&#xD;&#xA;- Allegro.&#xD;&#xA;&#xD;&#xA;**Art**&#xD;&#xA;&#xD;&#xA;- The Gimp (bitmap).&#xD;&#xA;- Inkscape (vector graphics).&#xD;&#xA;- Blender (3D).&#xD;&#xA;&#xD;&#xA;**Sound**&#xD;&#xA;&#xD;&#xA;- Audacity.&#xD;&#xA;- LMMS (Linux Multimedia Studio)." />
  <row Id="345" PostHistoryTypeId="2" PostId="197" RevisionGUID="c99f8a04-d896-44b8-a0d4-9aadc44dab2a" CreationDate="2010-07-14T20:38:10.087" UserId="47" Text="Let's say I have three layers: a foreground, an intermediate-ground and a background.  What is involved in using these three layers to create parallax scrolling?" />
  <row Id="346" PostHistoryTypeId="1" PostId="197" RevisionGUID="c99f8a04-d896-44b8-a0d4-9aadc44dab2a" CreationDate="2010-07-14T20:38:10.087" UserId="47" Text="How can I implement parallax scrolling into my 2D game?" />
  <row Id="347" PostHistoryTypeId="3" PostId="197" RevisionGUID="c99f8a04-d896-44b8-a0d4-9aadc44dab2a" CreationDate="2010-07-14T20:38:10.087" UserId="47" Text="&lt;2d&gt;&lt;parallaxscrolling&gt;" />
  <row Id="348" PostHistoryTypeId="2" PostId="198" RevisionGUID="ca0535d4-ab2c-44a0-83e1-eaf31c659d41" CreationDate="2010-07-14T20:39:12.690" UserId="138" Text="Honestly, it depends on the size and history of the team.&#xD;&#xA;&#xD;&#xA;Most of the large teams I've worked on have utilized an adapted version of Scrum. Often, a studio will bring in Scrum instructors or require producers to get &quot;Scrum Master&quot; certification.&#xD;&#xA;&#xD;&#xA;As noted above, Spiral is an option.&#xD;&#xA;&#xD;&#xA;Generally, some sort of [Agile development][1] is used that involves stand-ups, product owners, etc.&#xD;&#xA;&#xD;&#xA;There really isn't a &quot;best methodology.&quot; Team size and experience dictate the correct process to use. If you're a believer in [Lean][2], you'll also understand that process is very specific to the tasks at hand.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Agile_development&#xD;&#xA;  [2]: http://www.lean.org/whatslean/" />
  <row Id="349" PostHistoryTypeId="8" PostId="85" RevisionGUID="1c736261-0a4b-4740-89a4-1ee4f1e7539e" CreationDate="2010-07-14T20:39:38.850" UserId="13" Comment="Rollback to [382f4a7c-97cc-405f-b899-efb2dd9503b3]" Text="What are your tips and tricks to successfully finish a hobby game project in your freetime?&#xD;&#xA;How do you motivate yourself to keep it up and drive right through to the finish without losing interest or motivation along the way?" />
  <row Id="350" PostHistoryTypeId="2" PostId="199" RevisionGUID="9f7e33b9-bfd9-4fd7-9f11-0e76ac7e6c59" CreationDate="2010-07-14T20:40:22.733" UserId="9" Text="A layer that's &quot;further back&quot; would need to scroll at a fraction of the speed of the foreground layer. Half the speed implies double the distance. Other effects like tinting to simulate fog, etc, might also add to the illusion." />
  <row Id="351" PostHistoryTypeId="2" PostId="200" RevisionGUID="67693847-2936-4d45-a776-af3be5aa4dae" CreationDate="2010-07-14T20:41:15.243" UserId="30" Text="Basically you want objects to move faster, the closer they are to the 'camera'. How you implement that is up to you. &#xD;&#xA;&#xD;&#xA;I assign each of my layers a depth, and then as I scroll the scene, for each layer I divide that scroll by the depth of the layer, so that layers that are further away move slower." />
  <row Id="352" PostHistoryTypeId="2" PostId="201" RevisionGUID="0718e394-1835-46c2-a24f-8800d2106f1b" CreationDate="2010-07-14T20:41:35.693" UserId="19" Text="**Autodesk Maya**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897&#xD;&#xA;&#xD;&#xA;3D and to an extent 2D (via paint)&#xD;&#xA;&#xD;&#xA;Win, OSX, Linux&#xD;&#xA;&#xD;&#xA;4090$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package that has almost everything in it. &#xD;&#xA;&#xD;&#xA;**Autodesk Mudbox**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13565063&#xD;&#xA;&#xD;&#xA;3D texturing and Surface detailing&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;745$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Detailing which can be exported as normal maps. Also great for texturing.&#xD;&#xA;&#xD;&#xA;**Adobe CS5 Master Collection**&#xD;&#xA;&#xD;&#xA;https://store1.adobe.com/cfusion/store/html/index.cfm?event=displayProduct&amp;categoryOID=4244037&amp;store=OLS-US&#xD;&#xA;&#xD;&#xA;Design, textures, video, audio.&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;2599$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Comprehensive package that has Photoshop and Illustrator for both vector and raster imagery/design work. After effects for video post production. Premiere for video editing. Soundbooth for audio. Media Encoder for encoding videos, etc... Some of apps might not be best in their domain (You could buy SoundForge from sony instead of soundbooth, or Avid instead of Premiere), but it is very well rounded for that price. &#xD;&#xA;&#xD;&#xA;This is pretty much all you need. Other applications which might be of interest are: &#xD;&#xA;&#xD;&#xA; - Other Autodesk 3D packages: [3dsmax][1], [Softimage][2]&#xD;&#xA; - [Maxon Cinema4D][3] instead of Autodesk&#xD;&#xA; - [Blender][4] - great free 3D application, if you can stomach through interface&#xD;&#xA; - [Luxology Modo][5] - great modeling application&#xD;&#xA; - [Newtek Lightwave][6] - still has great poly modeling module (might also be best for your buck, along with modo)&#xD;&#xA; - [SideFX Houdini][7] - for 3D procedural magic&#xD;&#xA; - [Mari][8] - for texturing&#xD;&#xA; - [Zbrush][9] - instead of Mudbox&#xD;&#xA; - [Topogun][10] - for retopology of high res models to low res for in-game usage&#xD;&#xA; - [SoundForge][11] - for sound work&#xD;&#xA; - [Nuendo][12] - for sound work along with a bazillion of VSTi and libraries&#xD;&#xA; - [Final Draft][13] - if you want to write screenplays in an industry standard format and software&#xD;&#xA;&#xD;&#xA;There are lots of others I haven't mentioned, but these are pretty much standard and will take you far and beyond of what you need. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13567410&#xD;&#xA;  [2]: http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13571168&#xD;&#xA;  [3]: http://www.maxon.net/&#xD;&#xA;  [4]: http://blender.org&#xD;&#xA;  [5]: http://www.luxology.com/&#xD;&#xA;  [6]: http://www.newtek.com&#xD;&#xA;  [7]: http://www.sidefx.com&#xD;&#xA;  [8]: http://www.thefoundry.co.uk/pkg_overview.aspx?ui=3366FFA1-E59B-4772-9BB3-94F496491576&#xD;&#xA;  [9]: http://www.pixologic.com/home.php&#xD;&#xA;  [10]: http://www.topogun.com/&#xD;&#xA;  [11]: http://www.sonycreativesoftware.com/soundforgesoftware&#xD;&#xA;  [12]: http://www.steinberg.net/en/products/nuendo.html&#xD;&#xA;  [13]: http://www.finaldraft.com/" />
  <row Id="353" PostHistoryTypeId="16" PostId="201" RevisionGUID="0718e394-1835-46c2-a24f-8800d2106f1b" CreationDate="2010-07-14T20:41:35.693" UserId="-1" />
  <row Id="354" PostHistoryTypeId="2" PostId="202" RevisionGUID="acdc71ab-376f-439c-85fd-b3f396c1e751" CreationDate="2010-07-14T20:44:03.347" UserId="9" Text="One thing that's important to visualize when dealing with A* and Dijkstra's Algorithm is that A* is directed; it tries to find the shortest path to a particular point by &quot;guessing&quot; which direction to look. Dijkstra's Algorithm finds the shortest path to /every/ point." />
  <row Id="355" PostHistoryTypeId="2" PostId="203" RevisionGUID="e7923aec-2f35-4d0d-a67f-c55dde8a8f1e" CreationDate="2010-07-14T20:44:12.753" UserId="127" Text="&#xD;&#xA;&#xD;&#xA; - Use an api like opengl/sdl which will give you minimum hassle when going from platform to platform.&#xD;&#xA;&#xD;&#xA; - Make sure you know what platforms you want to support. Don't use opengl just because you think you might want to support multi platform in the future. Start as you mean to go on.&#xD;&#xA;&#xD;&#xA; - Know what hardware limitations are on each of the platforms you want to support. " />
  <row Id="356" PostHistoryTypeId="2" PostId="204" RevisionGUID="bf7b110e-ad7f-4540-9880-27733613d69f" CreationDate="2010-07-14T20:44:39.010" UserId="51" Text="If you have any experience with any MMO middleware packages and have any positive or negative experiences with them, your feedback will be appreciated.&#xD;&#xA;&#xD;&#xA;Specifically I'm looking for server packages.  Price, functionality, speed, and ease of use would all be useful metrics to know about.&#xD;&#xA;&#xD;&#xA;For example, doing some preliminary research has led me to some packages like &lt;a href=&quot;http://exitgames.com/Photon&quot;&gt;Exit Game's Photon&lt;/a&gt;,  &lt;a href=&quot;http://www.reddwarfserver.org/&quot;&gt;RedDwarf Server&lt;/a&gt;, and &lt;a href=&quot;http://www.smartfoxserver.com/&quot;&gt;SmartFoxServer&lt;/a&gt;." />
  <row Id="357" PostHistoryTypeId="1" PostId="204" RevisionGUID="bf7b110e-ad7f-4540-9880-27733613d69f" CreationDate="2010-07-14T20:44:39.010" UserId="51" Text="What are some good MMO middleware packages?" />
  <row Id="358" PostHistoryTypeId="3" PostId="204" RevisionGUID="bf7b110e-ad7f-4540-9880-27733613d69f" CreationDate="2010-07-14T20:44:39.010" UserId="51" Text="&lt;mmo&gt;&lt;middleware&gt;" />
  <row Id="359" PostHistoryTypeId="2" PostId="205" RevisionGUID="da346c5c-796c-4c1f-ac44-aae9455096b9" CreationDate="2010-07-14T20:45:36.590" UserId="35" Text="A tipical performance pitfall is not considering the garbage collector in the design/development of the game. Producing too much garbage can lead to &quot;hiccups&quot; in the game, which happen when the GC runs for a considerable long time.&#xD;&#xA;&#xD;&#xA;For C#, using value objects and the &quot;using&quot; statement can alleviate pressure from the GC." />
  <row Id="360" PostHistoryTypeId="2" PostId="206" RevisionGUID="fb9ec853-5ec8-4ea2-931c-b2980b180598" CreationDate="2010-07-14T20:49:44.940" UserId="148" Text="These tips apply to any hobby software project, and not just games.&#xD;&#xA;&#xD;&#xA;* **Set tiny milestones.** Having a goal like &quot;item system works in my RPG game&quot; is all well and good, but that implies a whole lot of under-specified functionality that you probably didn't even know you needed. What about &quot;graphics environment set up&quot;? Or, &quot;A sprite is displayed on the screen.&quot;&#xD;&#xA;&#xD;&#xA;* **Do a little bit each day.** Marathon sessions are great and all, but you're trying to squeeze a long-term commitment into an already crowded life. If you do a little bit each day you are making measurable progress and establishing a structure within which you can achieve your milestones. &#xD;&#xA;&#xD;&#xA;* **Scale yourself back.** Whatever your grand vision is, try and figure out what the smallest achievable portion is and do that. Making an RPG? Start with one quest and no NPCs. Making a platformer? Start with one level and no enemies.&#xD;&#xA;&#xD;&#xA;* **Prototype early.** Before you sink a bunch of your hard-earned hobby hours into a game, figure out if it'd be fun first. There's nothing so dispiriting as working your ass off on something for dozens of hours only to find that the basic concept sucks.&#xD;&#xA;&#xD;&#xA;* **Develop something iterable.** My favorite hobby software projects are the ones where the basic concept allows for later tinkering. Is your game like that? Can you ship something and then revisit it later and add cool stuff?&#xD;&#xA;&#xD;&#xA;* **Don't build an engine or a framework.** You don't want an engine, you want a game. Don't worry about the framework-y, reusable bits until after your game is shipping. Once you start on the second game, then you can go back to your first and see if there's anything you could bring over. That's not to say that you shouldn't use sound software development praxis, but don't start by writing a Sprite class until you know what you need your sprites to do -- you'd be surprised how little it'll turn out to be. Start with a Hero class, then a Monster class, and then -- oh look! -- there's some common stuff!&#xD;&#xA;&#xD;&#xA;* **Shipping is a feature.** You're never going to finish your game, you're only going to abandon it. ( = What is the minimum amount you can do before you're not completely embarrassed to show your game to someone else? Chances are, you can do less than that and still have a game to be proud of." />
  <row Id="361" PostHistoryTypeId="2" PostId="207" RevisionGUID="00006753-4a2c-4274-a3b4-cdce5cf3c7ca" CreationDate="2010-07-14T20:50:09.683" UserId="119" Text="You want to create a couple of variables representing the camera position - cameraX and cameraY. You then want to set these to equal the position of your character, possibly adding on a bit extra in the direction of movement. &#xD;&#xA;&#xD;&#xA;To position the main layer, it's just:&#xD;&#xA;&#xD;&#xA;mainLayer.x = -cameraX;&#xD;&#xA;&#xD;&#xA;for the middle layer, something like:&#xD;&#xA;&#xD;&#xA;middleLayer.x = -cameraX * 0.5;&#xD;&#xA;&#xD;&#xA;for the far layer:&#xD;&#xA;&#xD;&#xA;farLayer.x = -cameraX * 0.2;" />
  <row Id="362" PostHistoryTypeId="2" PostId="208" RevisionGUID="adb67797-36c5-4e72-a5ad-ee3e0f0bb745" CreationDate="2010-07-14T20:51:04.580" UserId="163" Text="The best way to do this is to simply render sprites as billboarded quads in 3D. The &quot;gameplay&quot; can happen all on one plane, while the background and foreground can be positioned closer or further in 3d space. That way, the parallax effect is handled for you without you having to do any special coding :-)" />
  <row Id="363" PostHistoryTypeId="2" PostId="209" RevisionGUID="caaa79fa-dd4a-42a1-820f-67cdf63a2aff" CreationDate="2010-07-14T20:51:29.210" UserId="9" Text="There are plenty of libraries that are themselves cross-platform; you don't need to write directly in OpenGL to run anywhere. OGRE is a great example of a rendering engine that works on any platform you'd care to name. &#xD;&#xA;&#xD;&#xA;In my experience, the biggest concern is your build system. If you develop on Windows with Visual Studio, your *code* might compile in Linux, but you'll have a tough time getting it to *build* easily. Look at build systems like CMake that can use the same build instructions to generate platform-specific project files (makefiles on linux, VS Projects on windows, XCode Projects on Mac, etc)." />
  <row Id="364" PostHistoryTypeId="2" PostId="210" RevisionGUID="331b9562-1626-4261-a7d7-ff700c262d2d" CreationDate="2010-07-14T20:52:06.463" UserId="120" Text="I dont know much about java, so this is from the point of view of a .net dev.&#xD;&#xA;&#xD;&#xA;The biggest one by far is garbage. the .net garbage collector on windows does a fantastic job, and you can get away without baby sitting it for the most part. On the xbox/winPhone7 thats a different matter. If you get stalls every few frames, garbage collection might be causing you problems. At the moment it triggers after every 1mb allocation.&#xD;&#xA;&#xD;&#xA;Heres some tips for dealing with garbage. You shouldn't have to worry about most of these in reality, but they may come in handy one day.&#xD;&#xA;&#xD;&#xA; - Draw the contents of GC.GetTotalMemory() to the screen. This gives you an approximation of the ammount of allocated bytes your game uses. If it hardly moves, your doing ok. If its going up fast, you have issues.&#xD;&#xA; - try to allocate all your *heap* objects up front. If you do allocate eveything before the game starts, everytime you hit a meg of allocations, your going to stall. No allocations, no collections. as simple as that.&#xD;&#xA; - After loading, call GC.Collect(). If you know most of your big allocations are out the way, its only nice to let the system know.&#xD;&#xA; - DO NOT CALL GC.Collect() every frame. It might seem like a good idea, keeping on top of your garbage and all that, but remember the only with worse than a garbage collection is over garbage collection. &#xD;&#xA; - Look for where your garbage is coming from. There are some common causes like concatnating strings instead of useing [StringBuilder][1] or using foreach loops over collections that use the IEnumerable interface can also create garbage without you knowing (for eaxmple, `foreach (EffectPass pass in effect.CurrentTechnique.Passes)` is a common one)&#xD;&#xA; - Use tools like the [CLR memory profiler][2] to figure out where memory is being allocated. There are loads of tutorials out there on how to use this tool.&#xD;&#xA; - When you know where your allocating during gameplay, see if you can use tricks like pooling objects to lower that allocation count.&#xD;&#xA; - If all else fails, make your collections run faster! The GC on the compact framework follows evey reference in your code to figure out what objects are not in use anymore. Refactor your code use less references!&#xD;&#xA; - Remember to use IDisposable on classes that contain unmanaged resources. You can use these to clean up memory the GC cannot free up itself.&#xD;&#xA;&#xD;&#xA;The other thing to think about is floating point performance. While the .net JITer does a fair amount of processor specific optimisations, cannot use SSE or any other SIMD instruction sets to speed up your floating point maths. This can cause quite a big speed difference between C++ and C# for games. If your using mono, they have some special SIMD maths libraries you can take advantage of.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&amp;DisplayLang=en" />
  <row Id="365" PostHistoryTypeId="2" PostId="211" RevisionGUID="f4842bed-0f6e-4438-8744-7c2f3ea1f84e" CreationDate="2010-07-14T20:52:25.123" UserId="55" Text="Data drive your characters with LUA scripts or even XML files. When you interact with an NPC, grab the file that is attached to it, read it in, adjust for any game variables that may have been triggered, and product the valid response.&#xD;&#xA;&#xD;&#xA;The biggest gain from doing it this way is you can easily go in and manipulate the dialog, add new characters, etc. You also avoid mucking up your code base with special logic in handling each and every case." />
  <row Id="366" PostHistoryTypeId="2" PostId="212" RevisionGUID="6364bea1-113d-4e3f-b85e-bb8ab4e14f1a" CreationDate="2010-07-14T20:53:00.127" UserId="160" Text="**Hide anything platform-specific behind abstraction layers**&#xD;&#xA;&#xD;&#xA;This means stuff like rendering, audio, user input, and file IO. One common trick to abstracting that without inducing a run-time performance penalty is platform-agnostic headers with platform-specific implementation files:&#xD;&#xA;&#xD;&#xA;    // FileSystem.h&#xD;&#xA;    class FileSystem {&#xD;&#xA;    public:&#xD;&#xA;        FileHandle OpenFile(const char * path);&#xD;&#xA;        // other stuff...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // FileSystemWindows.cpp&#xD;&#xA;    FileHandle FileSystem::OpenFile(const char * path) {&#xD;&#xA;        // call windows API...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then configure the builds for each platform to build against the proper .cpp file.&#xD;&#xA;&#xD;&#xA;**Make your content pipelines read in platform-independent assets and output platform-specific content for each platform**&#xD;&#xA;&#xD;&#xA;For example, author your textures as .tga or just .psd, then have a pipeline that can automatically convert those to the different platform-specific formats you need.&#xD;&#xA;&#xD;&#xA;**Don't assume a specific memory layout or endianness in your data**&#xD;&#xA;&#xD;&#xA;Platforms may vary in byte order, padding, alignment, and word size. Any code that cares about that must be thoroughly tested on all platforms.&#xD;&#xA;&#xD;&#xA;**Test on all platforms, all the time**&#xD;&#xA;&#xD;&#xA;You *will* get bitten by platform-specific bugs. Would you rather get bitten now, or right when you're trying to get the game out the door?" />
  <row Id="367" PostHistoryTypeId="2" PostId="213" RevisionGUID="08784415-1925-4b26-9e80-94cd118d42f5" CreationDate="2010-07-14T20:53:56.507" UserId="157" Text="This is a hypothetical question, but one I always wanted to know about.  Suppose I wanted to create a game in the same fantasy style as [Battle for Wesnoth][1].  Having no arts skills myself, I could write the code for the game engine and borrow (steal?) their artwork and use it myself.  IIRC, their stuff is licensed under the LGPL, so if my game were LGPL'ed I should be fine legally.&#xD;&#xA;&#xD;&#xA;My question is: just because I *can* do that, should I?  What's the expected procedure for borrowing some other game's art assets?  Do I need to formally ask permission first?&#xD;&#xA;&#xD;&#xA;Obviously I would credit their work before making anything public.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wesnoth.org" />
  <row Id="368" PostHistoryTypeId="1" PostId="213" RevisionGUID="08784415-1925-4b26-9e80-94cd118d42f5" CreationDate="2010-07-14T20:53:56.507" UserId="157" Text="What's the right way to re-use open source game assets?" />
  <row Id="369" PostHistoryTypeId="3" PostId="213" RevisionGUID="08784415-1925-4b26-9e80-94cd118d42f5" CreationDate="2010-07-14T20:53:56.507" UserId="157" Text="&lt;assets&gt;&lt;licensing&gt;" />
  <row Id="370" PostHistoryTypeId="2" PostId="214" RevisionGUID="733564c2-4e80-404a-8a60-7e282cf168f5" CreationDate="2010-07-14T20:54:45.333" UserId="160" Text="Like others have said, GC collection pauses are the biggest issue. Using [object pools](http://gameprogrammingpatterns.com/object-pool.html) is one typical solution." />
  <row Id="371" PostHistoryTypeId="2" PostId="215" RevisionGUID="4ddf4784-765f-48f8-ae75-344551395991" CreationDate="2010-07-14T20:55:53.943" UserId="101" Text="I assume your source image is in [equirectangular projection][1]. You might try [PTStitcher][2], part of the Panorama Tools package. It's designed to be controlled via script files, but there's a batch file located [here][3] called &quot;Pano2Faces.bat&quot; which is designed to simplify the use of PTStitcher to do an equirectangular-to-rectilinear conversion (although it probably won't work out-of-the-box on any version of Windows more recent than XP).&#xD;&#xA;&#xD;&#xA;You can probably find a more user-friendly option somewhere on [this page][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.panotools.org/Equirectangular_Projection&#xD;&#xA;  [2]: http://www.all-in-one.ee/~dersch/ &quot;Panorama Tools home page&quot;&#xD;&#xA;  [3]: http://www.pinlady.net/vr/#anchor3 &quot;OS Utilities for Panoramas&quot;&quot;&#xD;&#xA;  [4]: http://wiki.panotools.org/Extracting_and_inserting_rectilinear_Views" />
  <row Id="372" PostHistoryTypeId="2" PostId="216" RevisionGUID="988f2cc2-2735-4ab9-91f7-4f385d7bc871" CreationDate="2010-07-14T20:59:01.860" UserId="35" Text="If the assets are licensed  under the LGPL, then you don't have to ask permission, just abide to the license by using the assets under the LGPL in your new project, and of course, provide credit to the original project/author.&#xD;&#xA;&#xD;&#xA;About if you should, if you're willing to make your project under the LGPL license, i believe you should do it, it will allow any legal problems in the future, and the Open Source Community encourages this type of collaborative work." />
  <row Id="373" PostHistoryTypeId="2" PostId="217" RevisionGUID="27aee852-d36d-4570-9ec4-60d793440460" CreationDate="2010-07-14T20:59:32.267" UserId="51" Text="In the past I've used simple systems like finite state machines (FSMs) or hierarchical FSMs to control AI behavior.  For any complex system, this pattern falls apart very quickly.&#xD;&#xA;&#xD;&#xA;I've heard about &lt;a href=&quot;http://aigamedev.com/open/articles/behavior-trees-part1/&quot;&gt;behavior trees&lt;/a&gt; and it seems like that's the next obvious step, but haven't seen a working implementation or really tried going down that route yet.&#xD;&#xA;&#xD;&#xA;Are there any other patterns to making manageable yet complex AI behaviors?" />
  <row Id="374" PostHistoryTypeId="1" PostId="217" RevisionGUID="27aee852-d36d-4570-9ec4-60d793440460" CreationDate="2010-07-14T20:59:32.267" UserId="51" Text="What are some ways of making manageable complex AI?" />
  <row Id="375" PostHistoryTypeId="3" PostId="217" RevisionGUID="27aee852-d36d-4570-9ec4-60d793440460" CreationDate="2010-07-14T20:59:32.267" UserId="51" Text="&lt;language-agnostic&gt;&lt;ai&gt;&lt;behavior&gt;" />
  <row Id="376" PostHistoryTypeId="2" PostId="218" RevisionGUID="be97418e-f17e-4f59-ad66-364868729736" CreationDate="2010-07-14T21:00:47.597" UserId="168" Text="I've been hearing a lot about [MonoTouch][1] lately for people doing iPhone and iPod touch development. The Framework is on top of Mono, which is already cross platform compatible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://monotouch.net/DownloadTrial" />
  <row Id="377" PostHistoryTypeId="2" PostId="219" RevisionGUID="aedb83da-e8cc-4537-8592-59b1f5bb017e" CreationDate="2010-07-14T21:01:08.003" UserId="119" Text="I wouldn't use anything that doesn't come with a license file explaining the license. If it meets your requirements then go ahead, but other than for a hobby project I don't see the point, as you're not going to end up with something unique." />
  <row Id="378" PostHistoryTypeId="2" PostId="220" RevisionGUID="87238263-c70b-42fa-a495-16fdaf48438d" CreationDate="2010-07-14T21:04:06.343" UserId="101" Text="[This][1] is one of the most elucidating overviews I've seen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimerendering.com/blog/direct3d-11-details-part-ii-tessellation/" />
  <row Id="379" PostHistoryTypeId="2" PostId="221" RevisionGUID="54cb6076-fcb1-4d3b-8edf-4246c836940d" CreationDate="2010-07-14T21:04:37.010" UserId="106" Text="Fast iteration times are key to developing games, much more so than fancy graphics and engines with truckloads of features in my opinion.  No wonder many small developers choose scripting languages.  The Unity 3D way of being able to pause a game and modify assets AND code, then continue and have the changes take effect immediately is absolutely great for this.  My question is, has anybody implemented a similar system on C++ game engines?  I have heard that some really super high end engines do, but I am more interested in finding out if there is a way to do it in a home-grown engine or game.  Obviously there would be tradeoffs, and I can't imagine that you can just recompile your code while the game is paused, have it reloaded and working under every circumstance or every platform.  But perhaps it's possible for AI programming and simple level logic modules.  It's not as if I want to do that in any project in the short (or long term), but I was curious.  " />
  <row Id="380" PostHistoryTypeId="1" PostId="221" RevisionGUID="54cb6076-fcb1-4d3b-8edf-4246c836940d" CreationDate="2010-07-14T21:04:37.010" UserId="106" Text="How to implement hot-swappable C++ modules?" />
  <row Id="381" PostHistoryTypeId="3" PostId="221" RevisionGUID="54cb6076-fcb1-4d3b-8edf-4246c836940d" CreationDate="2010-07-14T21:04:37.010" UserId="106" Text="&lt;game-engine&gt;&lt;c++&gt;" />
  <row Id="382" PostHistoryTypeId="16" PostId="204" RevisionGUID="6090e70a-4d12-496f-9abd-b3730b832182" CreationDate="2010-07-14T21:04:50.163" UserId="51" />
  <row Id="383" PostHistoryTypeId="2" PostId="222" RevisionGUID="dbcfc50c-57db-40be-b3d7-409f3a0193c2" CreationDate="2010-07-14T21:05:54.060" UserId="170" Text="What's the best place for tutorials &amp; other learning resources for unity3d?" />
  <row Id="384" PostHistoryTypeId="1" PostId="222" RevisionGUID="dbcfc50c-57db-40be-b3d7-409f3a0193c2" CreationDate="2010-07-14T21:05:54.060" UserId="170" Text="Best place for learning how to write games in Unity3d" />
  <row Id="385" PostHistoryTypeId="3" PostId="222" RevisionGUID="dbcfc50c-57db-40be-b3d7-409f3a0193c2" CreationDate="2010-07-14T21:05:54.060" UserId="170" Text="&lt;tutorials&gt;&lt;unity&gt;" />
  <row Id="386" PostHistoryTypeId="2" PostId="223" RevisionGUID="7aa5a2ac-8d8d-4283-901b-54fa139a10a4" CreationDate="2010-07-14T21:05:58.397" UserDisplayName="Negs" Text="The tool we use for this is HDR Shop located here. http://ict.debevec.org/~debevec/HDRShop/&#xD;&#xA;&#xD;&#xA;Version 1 of it is free. The option to use is &quot;Panoramic Transformation&quot;. I can't say that this is the easiest tool to use in the world but its what we do." />
  <row Id="387" PostHistoryTypeId="2" PostId="224" RevisionGUID="cf30fbee-7d43-4c93-9d6a-640352a6c5c1" CreationDate="2010-07-14T21:08:22.510" UserId="14" Text="Unity has it's own excellent documentation: http://unity3d.com/support/documentation/" />
  <row Id="388" PostHistoryTypeId="2" PostId="225" RevisionGUID="3fb6ccf4-bcb5-4576-a75d-696ed47bd4a0" CreationDate="2010-07-14T21:09:19.637" UserId="159" Text="What are some tools I can use to create 2d tile based maps? &#xD;&#xA;&#xD;&#xA;Please provide the information below, and try to limit to one tool per answer.&#xD;&#xA;&#xD;&#xA; - Name&#xD;&#xA; - Link to website&#xD;&#xA; - General features&#xD;&#xA; - Export format&#xD;&#xA; - Anything else you deem noteworthy" />
  <row Id="389" PostHistoryTypeId="1" PostId="225" RevisionGUID="3fb6ccf4-bcb5-4576-a75d-696ed47bd4a0" CreationDate="2010-07-14T21:09:19.637" UserId="159" Text="Tools for creating 2d tile based maps" />
  <row Id="390" PostHistoryTypeId="3" PostId="225" RevisionGUID="3fb6ccf4-bcb5-4576-a75d-696ed47bd4a0" CreationDate="2010-07-14T21:09:19.637" UserId="159" Text="&lt;tools&gt;" />
  <row Id="391" PostHistoryTypeId="16" PostId="225" RevisionGUID="3fb6ccf4-bcb5-4576-a75d-696ed47bd4a0" CreationDate="2010-07-14T21:09:19.637" UserId="159" />
  <row Id="392" PostHistoryTypeId="2" PostId="226" RevisionGUID="308ea9c7-0718-4d42-9a91-092e84c82c4d" CreationDate="2010-07-14T21:09:21.633" UserId="120" Text="Graphics/Sound&#xD;&#xA;&#xD;&#xA; - [XNA][1]  High level wrapper on DirectX9. Allows you to get up and running quickly. Supports PC, Xbox360 and windows phone 7. Support Xact audio aswell as its own SoundEffect API.&#xD;&#xA; - [SlimDX][2] Lower level wrapper on DX9/10/11. If its in the DX SDK, its wrapped here.&#xD;&#xA; - [OpenTK][3] Wrapper on OpenGL/AL.&#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [TorqueX][4] A 2D/3D engine for XNA. Good editor suppport, garage games have recently reinvested in the engine after a period of neglect.&#xD;&#xA; - [truevision 3d][5] C++ game engine with c# bindings&#xD;&#xA; - [Axiom][6] A rewrite of Ogre in c#. Supports numerous backed rendering APIs.&#xD;&#xA;&#xD;&#xA;Physics&#xD;&#xA; - [Farseer][7] A popular 2D physics engine, supports .net(desktop), compact(xbox) and micro(silverlight).&#xD;&#xA;&#xD;&#xA;- [Jitter][8] a realitivly new 3D physics engine, Much better than its completion.&#xD;&#xA;- [Box2Dx][9] A dirct port of box2D&#xD;&#xA;- [JigLib][10]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com&#xD;&#xA;  [2]: http://slimdx.org&#xD;&#xA;  [3]: http://www.opentk.com/&#xD;&#xA;  [4]: http://www.torquepowered.com/products/torquex-3d&#xD;&#xA;  [5]: http://www.truevision3d.com/&#xD;&#xA;  [6]: http://axiom3d.net/&#xD;&#xA;  [7]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [8]: http://www.jitter-physics.com/&#xD;&#xA;  [9]: http://code.google.com/p/box2dx&#xD;&#xA;  [10]: http://jiglibx.codeplex.com/" />
  <row Id="393" PostHistoryTypeId="2" PostId="227" RevisionGUID="91bfe9fe-38e7-4fde-8387-237a2832dc8a" CreationDate="2010-07-14T21:11:05.357" UserId="162" Text="This is from my experience as a server programmer for a commercial MMO:&#xD;&#xA;&#xD;&#xA;MMO middleware is not a well established commercial field, and there have been very few successful attempts to use mmo-specific middleware, at least within the realm of large scale MMOs such as your World of Warcraft. &#xD;&#xA;&#xD;&#xA;[Multiverse][1] has been used in a few smaller MMOs and I believe is free for noncommercial MMOs. However, the graphics are somewhat dated and it is not designed for large scale deployment.&#xD;&#xA;&#xD;&#xA;[Hero Engine][2] has been around for several years, and has some very good content creation tools. I have no direct knowledge but have heard disappointing information about the usefulness of the back end server package, and I am yet to see a shipped game using this middleware. The upcoming The Old Republic MMO is using this engine, although I do not know to what extent.&#xD;&#xA;&#xD;&#xA;[BigWorld][3] has been integrated into several actually shipped medium-scale MMOs so has a bit of a leg up. I again have no personal knowledge other than being impressed by their content creation tool at GDC. I suspect they are not particularly cheap.&#xD;&#xA;&#xD;&#xA;In general, I would be extremely skeptical of using any Middleware solution that has not been used in actual shipping product. There is a huge gap between making content creation tools and making a scalable, working server architecture. Until an MMO has gone public and been hit with real users there's no way of knowing if the tech is good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.multiverse.net/index.html&#xD;&#xA;  [2]: http://http://www.heroengine.com/&#xD;&#xA;  [3]: http://www.bigworldtech.com/index/index.php" />
  <row Id="394" PostHistoryTypeId="16" PostId="227" RevisionGUID="91bfe9fe-38e7-4fde-8387-237a2832dc8a" CreationDate="2010-07-14T21:11:05.357" UserId="-1" />
  <row Id="395" PostHistoryTypeId="2" PostId="228" RevisionGUID="d7200171-a51d-44cc-92e8-bf2534db5e21" CreationDate="2010-07-14T21:11:43.873" UserId="160" Text="If your resolutions are similar to each other, you can just the same art across all of them with maybe some downscaling at runtime for the smaller screens. If they differ by more than say a factor of 2x, you're going to need to author (or at least have an artist tweak) separate assets for the different resolutions.&#xD;&#xA;&#xD;&#xA;With 2D, resolution has a huge affect on how you design images. A sprite that looks richly detailed and realistic at high-res will be muddy and indecipherable scaled down. Likewise, a sprite that's clean and sharp looking at low-res will look cheap and overly-simple at high-res." />
  <row Id="396" PostHistoryTypeId="2" PostId="229" RevisionGUID="c927dfb7-59ab-4eb3-ae27-c83b184c8458" CreationDate="2010-07-14T21:12:53.687" UserId="160" Text="It isn't finished, but [my book](http://gameprogrammingpatterns.com/) has some chapters online that may help you." />
  <row Id="397" PostHistoryTypeId="16" PostId="229" RevisionGUID="c927dfb7-59ab-4eb3-ae27-c83b184c8458" CreationDate="2010-07-14T21:12:53.687" UserId="-1" />
  <row Id="398" PostHistoryTypeId="2" PostId="230" RevisionGUID="ddcf84ac-8af4-4b1c-a915-7a402f4ad370" CreationDate="2010-07-14T21:13:09.197" UserId="109" Text="If you're interested in creating a large amount of music (for one game or many in the future), I'd recommend grabbing some easy to use music creation software (like GarageBand on OSX, or ACID on Windows). It's pretty easy to create some basic tracks with the included samples, and you can pretty affordably find more samples.&#xD;&#xA;&#xD;&#xA;Don't think you can write music? Do what I've done for a long time: stitch together the classics. Go to your local music store and find some sheet music for Beethoven or other copyright-expired orchestrations. Don't borrow the whole arrangements (they're often copyrighted), but grab a few bars of the melody or harmony. Shift it a few keys or try it with some odd instrumentation. The results can be pretty solid." />
  <row Id="399" PostHistoryTypeId="2" PostId="231" RevisionGUID="099c2220-3067-46d4-84c6-0bd75580ade2" CreationDate="2010-07-14T21:13:30.787" UserId="119" Text="If you're not worried about iPhone there's always Flash packaged as AIR - you lose iPhone but you gain Linux and web deployment. You can then choose game/physics/rendering engines that suit your project, eg. FlashPunk, Flixel, Box2d." />
  <row Id="400" PostHistoryTypeId="2" PostId="232" RevisionGUID="a1987551-5683-4774-bbce-8f2186208c2c" CreationDate="2010-07-14T21:13:35.543" UserId="19" Text=" - [Unity Documentation][1]&#xD;&#xA; - [Learn Unity 3D][2]&#xD;&#xA; - [Jason 3D Buzz unity videos][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/&#xD;&#xA;  [2]: http://learnunity3d.com/&#xD;&#xA;  [3]: http://forum.unity3d.com/viewtopic.php?t=39327" />
  <row Id="401" PostHistoryTypeId="2" PostId="233" RevisionGUID="3274de7a-ffbd-4ca7-81de-75fc3ff2c16c" CreationDate="2010-07-14T21:14:12.893" UserId="97" Text="This can be handled like the similar case for linear acceleration.&#xD;&#xA;&#xD;&#xA;First fact to note: Because the ship starts off with an angular velocity of zero, an you want it to end up with an angular velocity of zero, this means that the total change in velocity must equal zero.&#xD;&#xA;&#xD;&#xA;From this we can see that the integral of the acceleration over time must equal zero -- there must be exactly as &quot;much&quot; positive acceleration as there is negative acceleration.&#xD;&#xA;&#xD;&#xA;Therefore, your solution, whatever it is, must be constrained to this property: Equal &quot;total&quot; acceleration forwards and backwards.&#xD;&#xA;&#xD;&#xA;Looking at this, there are so many possible forms and shapes your acceleration could be in!  Let us make some assumptions for the shape of acceleration that you want, in order to give an easy/concise answer.&#xD;&#xA;&#xD;&#xA;For the sake of a simple answer, I will have acceleration be in one of three states: forwards, backwards, or zero.  Forwards and backwards will be at equal magnitude, and the states can be switched instantaneously. (there is no gradual ramping up of acceleration)&#xD;&#xA;&#xD;&#xA;You can find the change in distance for a given acceleration over a given period of time with this equation:&#xD;&#xA;&#xD;&#xA;    s = 0.5*a*t^2" />
  <row Id="402" PostHistoryTypeId="2" PostId="234" RevisionGUID="ad0b5520-7b6f-4626-81b0-3b348d8ae137" CreationDate="2010-07-14T21:14:41.520" UserId="18" Text="[Tiled Map Editor](http://www.mapeditor.org/)&#xD;&#xA;&#xD;&#xA;From the website:&#xD;&#xA;&#xD;&#xA;&gt;* General purpose tile map editor with XML-based map format&#xD;&#xA;* Supports orthogonal and isometric maps&#xD;&#xA;* Custom objects can be placed with pixel precision&#xD;&#xA;* Full undo/redo and copy/paste support&#xD;&#xA;* Add custom properties to tiles, layers, objects or the map&#xD;&#xA;* Automatically reloads tilesets when changed externally&#xD;&#xA;* Resize or offset your tile map later as needed&#xD;&#xA;* Efficient tile editing tools like stamp and fill brushes&#xD;&#xA;* Supports input/output plugins to open and save files in custom formats&#xD;&#xA;" />
  <row Id="403" PostHistoryTypeId="16" PostId="234" RevisionGUID="ad0b5520-7b6f-4626-81b0-3b348d8ae137" CreationDate="2010-07-14T21:14:41.520" UserId="-1" />
  <row Id="404" PostHistoryTypeId="2" PostId="235" RevisionGUID="a925a732-0063-4ec4-99c7-893235a38fc0" CreationDate="2010-07-14T21:15:23.800" UserId="35" Text="You can do something like hot-swapping modules at runtime implementing the modules as dynamic link libraries (or shared libraries on UNIX), and using dlopen() and dlsym() to load functions dinamically from the library.&#xD;&#xA;&#xD;&#xA;For Windows, the equivalents are LoadLibrary and GetProcAddress.&#xD;&#xA;&#xD;&#xA;This is a C method, and has some pitfalls by using it in C++, you can read about that [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tldp.org/HOWTO/C++-dlopen/" />
  <row Id="405" PostHistoryTypeId="2" PostId="236" RevisionGUID="9b553225-5d7e-4ea7-85a6-4e97d9a2b1c5" CreationDate="2010-07-14T21:15:27.480" UserId="170" Text="I'm fairly new to game development, played around with xna before and just learning OpenGL &amp; c now and I'm interested to know which c/c++ based model animation libraries are out there and which you would recommend? I don't have any particular model format in mind yet but probably a format that is supported by a free modelling tool like Blender." />
  <row Id="406" PostHistoryTypeId="1" PostId="236" RevisionGUID="9b553225-5d7e-4ea7-85a6-4e97d9a2b1c5" CreationDate="2010-07-14T21:15:27.480" UserId="170" Text="Which c/c++ model animation library for OpenGL" />
  <row Id="407" PostHistoryTypeId="3" PostId="236" RevisionGUID="9b553225-5d7e-4ea7-85a6-4e97d9a2b1c5" CreationDate="2010-07-14T21:15:27.480" UserId="170" Text="&lt;c++&gt;&lt;libraries&gt;&lt;opengl&gt;&lt;c&gt;&lt;models&gt;" />
  <row Id="408" PostHistoryTypeId="2" PostId="237" RevisionGUID="50396493-4d5a-4799-89bf-283bcc5ab387" CreationDate="2010-07-14T21:18:20.073" UserId="120" Text="Behaviour trees are a really great way to manage AI, and Ai Game dev is the best place to learn about them! There are tonnes of example implementations out there on places like Codeplex, or even AIGD's own Sandbox engines implementation (which admitedly is fairly complex and can be hard to follow).&#xD;&#xA;&#xD;&#xA;Last year at the game AI confrence there was alot of excitement about [planners][1], but this year alot of that had fallen away. Best tip seemed to be just to start simple. The whole 20% of the work to get you 80% there thing seems to totaly hold true in most cases&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aigamedev.com/open/coverage/killzone2/" />
  <row Id="409" PostHistoryTypeId="2" PostId="238" RevisionGUID="b2973d75-ce3d-4296-afd0-60046ba03452" CreationDate="2010-07-14T21:18:29.073" UserId="136" Text="I'll give you the &quot;simple&quot; version and let someone else fill you in on the details if you're interested :).&#xD;&#xA;&#xD;&#xA;There are basically two ways to model 3D objects.  The first is one you don't see a lot of in games, and it involves using precise, mathematically defined curves to define the shape of an object.  Using this method, the level of detail is (practically speaking) &quot;infinite&quot;.  Take a cylinder for example.  A cylinder can be defined in very simple mathematical terms: all you really need to know is the radius at the ends and the length of the cylinder.  In terms of the geometry, this information is all we need in order to render the cylinder in a 3D scene.  Moreover, we can easily scale the cylinder to make it larger or smaller; all we need to do is maintain the ratio of the length to the radius.  We can use the same formulas to represent the geometry, but with different parameters.  We can represent a torus (&quot;donut&quot; shape) easily as well: we simply need to know the inner radius and outer radius.  From that, we can compute the diameter (and therefore the radius) of the &quot;donut&quot; by subtracting the inner radius from the outer radius.  The inner diameter is the inner edge, around which the circular body wraps.  This type of 3D definition is nice because it is relatively simple (resulting in a small model file), and there is no significant limit to the level of detail.  The downside is that today's video hardware isn't designed to process these types of models efficiently (if a all).&#xD;&#xA;&#xD;&#xA;The other way is to combine simple geometry to approximate the shape we want to represent.  We do this with a process called *tessellation*.  We could *tessellate* a cylinder by breaking it down into more primitive shapes: two circles and a series of long rectangles, which wrap around the outer edge.  The circles can be further broken down into many tiny triangles, as can the rectangles along the edge.  The end result is a model comprised *only* of triangles:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The good news is that video hardware is optimized to handle this sort of geometry.  Today's GPUs have no trouble churning out tons and tons of triangles every second.  However, there's an obvious problem: we are trying to represent curved surfaces using shapes that have flat edges.  In order for our cylinder to *look* like a cylinder (as opposed to a cube), we want to break it down into a *lot* of little triangles.  Well, how many do we want?  It depends.  What kind of hardware will be used to render the scene?  Faster hardware can render triangles faster than slower hardware, producing faster frame rates.  There are other factors to consider, like how many other objects will be present in the scene, and how complex will they be?  In games, there are typically a lot of objects in a given scene.  Moreover, objects may travel through different scenes, each with different levels of visual complexity.  It's hard to figure out the *level of detail* to use when we tessellate our models.&#xD;&#xA;&#xD;&#xA;Another problem is that of geometric complexity: whereas a simple, curve-based definition of a cylinder was very simple (radius and length), our tessellated definition combines hundreds of triangles, each of which needs to be defined independently.  Consequently, our tessellated model file will be much, much larger.  Let's say we have a mathematically defined model of something complex, like a person.  Our model file may be a mere 24kb in size.  Well, once that model is tessellated, the resulting file could be 24mb (24,000kb).  That's quite a difference.&#xD;&#xA;&#xD;&#xA;Hardware tessellation takes advantage of *geometry shaders* to perform hardware-assisted tessellation *in real time* (or in nearly real time).  Essentially, it provides a mechanism to take a mathematically defined 3D model and transform it into a tessellated format that the video card can handle.  Traditionally, game developers have performed tessellation themselves at the studio, and shipped the tessellated models with the game.  Hardware tessellation allows us to defer this process until the game is *actually running* on the player's computer.  This has some serious benefits:&#xD;&#xA;&#xD;&#xA; 1. The size of the game's 3D content decreases dramatically (fewer discs or smaller downloads, and less hard disk space required).&#xD;&#xA;&#xD;&#xA; 2. We can control the level of detail *in real time*.  Are we running on a cutting-edge beast of a gaming machine?  If so, we can tessellate using a very high level of detail.  Are we running on an old laptop with integrated graphics?  If so, we can reduce the level of detail to boost performance.&#xD;&#xA;&#xD;&#xA;So that's the gist of it.  It's probably not 100% accurate, as I am not a 3D programmer, but that should give you a better idea of what all the fuss is about :).&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Mike&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ligno3d.com/images/STLcylinder.gif" />
  <row Id="410" PostHistoryTypeId="2" PostId="239" RevisionGUID="1b49f09c-a7ae-4eab-9cf9-635a413d1809" CreationDate="2010-07-14T21:18:30.900" UserId="160" Text="World of Warcraft has:&#xD;&#xA;&#xD;&#xA;* **5,500,000 – Lines of code**&#xD;&#xA;* **1,500,000 – Art assets**&#xD;&#xA;* 33,681 – Production tasks&#xD;&#xA;* 70,167 – Spells&#xD;&#xA;* 37,537 – NPCs (non-player characters)&#xD;&#xA;* **27 – Hours of music**&#xD;&#xA;* 2600 – Quests in the original World of Warcraft&#xD;&#xA;* 2700+ - Additional quests in WoW: The Burning Crusade&#xD;&#xA;* 2350+ - Additional quests in WoW: Wrath of the Lich King&#xD;&#xA;* 7650+ - Quests total (how many have you finished?)&#xD;&#xA;* 4,449,680,399 – Achievements earned by players since their implementation (this figure is already a few days old, and therefore outdated)&#xD;&#xA;&#xD;&#xA;Patches:&#xD;&#xA;&#xD;&#xA;* 4.7– Petabytes (4700 terabytes) of data delivered to players through patches&#xD;&#xA;* **126 – Different versions issued of every patch**, including those streamed to players and issued as self-extracting executables&#xD;&#xA;* Half – Of every patch’s size is audio&#xD;&#xA;&#xD;&#xA;Servers:&#xD;&#xA;&#xD;&#xA;* 13,250 – Server blades running WoW servers, with a total of&#xD;&#xA;* 75,000 – CPU cores, and&#xD;&#xA;* 112.5 – Terabytes of RAM&#xD;&#xA;&#xD;&#xA;Support:&#xD;&#xA;&#xD;&#xA;* **179,184 – Bugs tracked by Blizzard** (most of which have been fixed, according to the presenters)&#xD;&#xA;* 2,056 – Game masters&#xD;&#xA;* 340 – Employees in the billing department&#xD;&#xA;* 2,584 – Total customer service employees&#xD;&#xA;&#xD;&#xA;International:&#xD;&#xA;&#xD;&#xA;* 10 – Languages into which WoW is translated&#xD;&#xA;&#xD;&#xA;Blizzard Online:&#xD;&#xA;&#xD;&#xA;* 12,000,000+ – Battle.net accounts&#xD;&#xA;* 900,000+ - Files on WorldofWarcraft.com&#xD;&#xA;&#xD;&#xA;Source: [World of Warcraft by the Numbers by The Game Reviews](http://www.thegamereviews.com/article-1515-World-of-Warcraft-by-the-Numbers.html)&#xD;&#xA;" />
  <row Id="411" PostHistoryTypeId="2" PostId="240" RevisionGUID="cefdffde-11fc-4417-8678-62135cbdc36e" CreationDate="2010-07-14T21:18:56.390" UserId="178" Text="Inkscape&#xD;&#xA;&#xD;&#xA;http://www.inkscape.org&#xD;&#xA;&#xD;&#xA;2D / vector graphics&#xD;&#xA;&#xD;&#xA;Linux / OSX / Windows&#xD;&#xA;&#xD;&#xA;free&#xD;&#xA;&#xD;&#xA;GPL&#xD;&#xA;&#xD;&#xA;very good and easy to learn svg editor&#xD;&#xA;" />
  <row Id="412" PostHistoryTypeId="16" PostId="240" RevisionGUID="cefdffde-11fc-4417-8678-62135cbdc36e" CreationDate="2010-07-14T21:18:56.390" UserId="-1" />
  <row Id="413" PostHistoryTypeId="2" PostId="241" RevisionGUID="4a3a25a4-bbf6-4501-8ff5-949e32d87ebc" CreationDate="2010-07-14T21:19:16.500" UserId="109" Text="[Ogmo Editor][1]&#xD;&#xA;&#xD;&#xA;From the website:&#xD;&#xA;&#xD;&#xA;&gt;**Here's How It Works**&#xD;&#xA;&#xD;&#xA;&gt;After deciding to use Ogmo Editor for a game, the first step is to write up a &quot;project file&quot; for that game. A project file is just an XML file defining all the tilesets, objects, layers and settings for a project. Once you've got that done, you open it in the editor and you're good to go - you can start creating, editing, saving and re-opening levels. If you need to, you can add new tilesets and objects to your project along the way and all your old levels remain compatible, so you aren't required to define every asset you'll eventually use right away.&#xD;&#xA;&#xD;&#xA;&gt;**Getting Your Levels Into Your Game**&#xD;&#xA;&#xD;&#xA;&gt;Exported levels are just XML files, and the format is largely defined by you in the project file. Ogmo Editor was designed with Flash in mind, but most modern programming languages have robust XML support. If you're lost, check out the tutorials section - there might be an article on using Ogmo Editor with your language or library of choice.&#xD;&#xA;&#xD;&#xA;  [1]: http://ogmoeditor.com/" />
  <row Id="414" PostHistoryTypeId="16" PostId="241" RevisionGUID="4a3a25a4-bbf6-4501-8ff5-949e32d87ebc" CreationDate="2010-07-14T21:19:16.500" UserId="-1" />
  <row Id="415" PostHistoryTypeId="2" PostId="242" RevisionGUID="d45a9bed-779f-46aa-bbec-4a36142401b1" CreationDate="2010-07-14T21:19:32.943" UserId="119" Text="It might be worth creating your own level editor and integrating into your game - then you can also allow players to create their own levels." />
  <row Id="416" PostHistoryTypeId="16" PostId="242" RevisionGUID="d45a9bed-779f-46aa-bbec-4a36142401b1" CreationDate="2010-07-14T21:19:32.943" UserId="-1" />
  <row Id="417" PostHistoryTypeId="2" PostId="243" RevisionGUID="03ea5ca9-a9da-49f2-b311-facb9c057ef8" CreationDate="2010-07-14T21:19:39.293" UserId="10" Text="Have a look at [Open Asset Import Library][1], see if it has the features you are looking for. There is also [Animaded][2] for skeletal animation but it's not been updated in a while&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://assimp.sourceforge.net/&#xD;&#xA;  [2]: http://animadead.sourceforge.net/" />
  <row Id="418" PostHistoryTypeId="6" PostId="222" RevisionGUID="607cd57c-8f2e-404d-a7ba-364938962f57" CreationDate="2010-07-14T21:20:19.263" UserId="159" Comment="edited tags" Text="&lt;tutorials&gt;&lt;unity&gt;&lt;subjective&gt;" />
  <row Id="419" PostHistoryTypeId="2" PostId="244" RevisionGUID="85c45d8f-1e13-4b56-83b6-b0984438f66e" CreationDate="2010-07-14T21:20:54.147" UserId="55" Text="I would like to brainstorm a few ways of handling how to detect a collision between a sprite and a user generated shape of some sort.&#xD;&#xA;&#xD;&#xA;For example. There are 3 objects on the screen. The user takes their finger and draws an abnormal shape around 2 of the objects. I need to detect those 2 objects.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Anyone have any good ideas on how to approach this efficiently using Cocos2D?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://desmond.yfrog.com/Himg339/scaled.php?tn=0&amp;server=339&amp;filename=f2i.png&amp;xsize=640&amp;ysize=640" />
  <row Id="420" PostHistoryTypeId="1" PostId="244" RevisionGUID="85c45d8f-1e13-4b56-83b6-b0984438f66e" CreationDate="2010-07-14T21:20:54.147" UserId="55" Text="Cocos2D collision detection against a random shape" />
  <row Id="421" PostHistoryTypeId="3" PostId="244" RevisionGUID="85c45d8f-1e13-4b56-83b6-b0984438f66e" CreationDate="2010-07-14T21:20:54.147" UserId="55" Text="&lt;objective-c&gt;&lt;cocos2d&gt;&lt;collision-detection&gt;" />
  <row Id="422" PostHistoryTypeId="5" PostId="233" RevisionGUID="e734c0f0-fabc-4509-8e07-92e4437963c6" CreationDate="2010-07-14T21:21:21.137" UserId="97" Comment="added 452 characters in body" Text="This can be handled like the similar case for linear acceleration.&#xD;&#xA;&#xD;&#xA;First fact to note: Because the ship starts off with an angular velocity of zero, an you want it to end up with an angular velocity of zero, this means that the total change in velocity must equal zero.&#xD;&#xA;&#xD;&#xA;From this we can see that the integral of the acceleration over time must equal zero -- there must be exactly as &quot;much&quot; positive acceleration as there is negative acceleration.&#xD;&#xA;&#xD;&#xA;Therefore, your solution, whatever it is, must be constrained to this property: Equal &quot;total&quot; acceleration forwards and backwards.&#xD;&#xA;&#xD;&#xA;Looking at this, there are so many possible forms and shapes your acceleration could be in!  Let us make some assumptions for the shape of acceleration that you want, in order to give an easy/concise answer.&#xD;&#xA;&#xD;&#xA;For the sake of a simple answer, I will have acceleration be in one of three states: forwards, backwards, or zero.  Forwards and backwards will be at equal magnitude, and the states can be switched instantaneously. (there is no gradual ramping up of acceleration)&#xD;&#xA;&#xD;&#xA;You can find the change in distance for a given acceleration over a given period of time with this equation:&#xD;&#xA;&#xD;&#xA;    s = 0.5*a*t^2&#xD;&#xA;&#xD;&#xA;The simplest solution here would be to accelerate until you reach the halfway point, then decelerate the rest of the way.&#xD;&#xA;&#xD;&#xA;We will take `P` as the total distance you want to move:&#xD;&#xA;&#xD;&#xA;    s = P/2&#xD;&#xA;    P/2 = 0.5*a*t^2&#xD;&#xA;    P = a*t^2&#xD;&#xA;    t^2 = P/a&#xD;&#xA;    t = sqrt(P/a)&#xD;&#xA;&#xD;&#xA;So basically:&#xD;&#xA;&#xD;&#xA;1. Accelerate at `a` for `sqrt(P/a)` units of time (units based off your units for acceleration)&#xD;&#xA;2. Decelerate at the same magnitude for the same amount of time" />
  <row Id="423" PostHistoryTypeId="2" PostId="245" RevisionGUID="5889f9c8-2244-4654-8f40-952bce5685ce" CreationDate="2010-07-14T21:22:04.177" UserId="165" Text="What are some good (free or open-source) Version-control packages?" />
  <row Id="424" PostHistoryTypeId="1" PostId="245" RevisionGUID="5889f9c8-2244-4654-8f40-952bce5685ce" CreationDate="2010-07-14T21:22:04.177" UserId="165" Text="What are some good (free) Version-control systems?" />
  <row Id="425" PostHistoryTypeId="3" PostId="245" RevisionGUID="5889f9c8-2244-4654-8f40-952bce5685ce" CreationDate="2010-07-14T21:22:04.177" UserId="165" Text="&lt;version-control&gt;" />
  <row Id="426" PostHistoryTypeId="2" PostId="246" RevisionGUID="3555b365-9aed-4f6e-9340-1aa1c4626fbe" CreationDate="2010-07-14T21:22:14.333" UserId="165" Text="One of the best packages is [Subversion][1], an open-source, multi-platform version-control package. There's an excellent (Windows) front-end for it, called [TortoiseSVN][2] plus a free on-line book at [*Version Control with Subversion*][3]. For a general introduction to how VC works, see [An Introduction to Version Control][4].&#xD;&#xA;&#xD;&#xA;[Git][5] is a fairly [popular package][6], originally developed Linus Torvalds for Linux kernel development.&#xD;&#xA;&#xD;&#xA;Another package that is growing rapidly is [Mercurial][7], a *distributed* VCS. If you're a solo developer, the distributed capability may be overkill, but a team may find it useful. Joel Spoelsky wrote a [Subversion to Mercurial tutorial][8], showing the differences&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://subversion.apache.org/&#xD;&#xA;  [2]: http://tortoisesvn.tigris.org/&#xD;&#xA;  [3]: http://svnbook.red-bean.com/&#xD;&#xA;  [4]: http://subversion.open.collab.net/articles/IntroductionToVersionControl.html&#xD;&#xA;  [5]: http://git-scm.com/&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Git_(software)&#xD;&#xA;  [7]: http://mercurial.selenic.com/&#xD;&#xA;  [8]: http://hginit.com/00.html" />
  <row Id="427" PostHistoryTypeId="2" PostId="247" RevisionGUID="d517d402-5db8-432c-8072-4cfae0b4cd9c" CreationDate="2010-07-14T21:22:33.990" UserId="120" Text="get a [camera][1] ;) */cheeky off*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2008/11/11/the-sky-s-the-limit.aspx" />
  <row Id="428" PostHistoryTypeId="2" PostId="248" RevisionGUID="e419c377-fe7b-48f3-a848-de8dc30757c5" CreationDate="2010-07-14T21:22:35.270" UserId="178" Text="Gimp&#xD;&#xA;&#xD;&#xA;http://www.gimp.org&#xD;&#xA;&#xD;&#xA;2D / raster graphics&#xD;&#xA;&#xD;&#xA;Linux / OSX / Windows&#xD;&#xA;&#xD;&#xA;free&#xD;&#xA;&#xD;&#xA;GPL&#xD;&#xA;&#xD;&#xA;free photoshop alternative" />
  <row Id="429" PostHistoryTypeId="16" PostId="248" RevisionGUID="e419c377-fe7b-48f3-a848-de8dc30757c5" CreationDate="2010-07-14T21:22:35.270" UserId="-1" />
  <row Id="430" PostHistoryTypeId="5" PostId="201" RevisionGUID="fdac2d3e-b99b-4e07-98bf-5d6fdfeeba77" CreationDate="2010-07-14T21:23:07.097" UserId="19" Comment="deleted 2562 characters in body" Text="**Autodesk Maya**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897&#xD;&#xA;&#xD;&#xA;3D and to an extent 2D (via paint)&#xD;&#xA;&#xD;&#xA;Win, OSX, Linux&#xD;&#xA;&#xD;&#xA;4090$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package that has almost everything in it. " />
  <row Id="431" PostHistoryTypeId="2" PostId="249" RevisionGUID="8ad00d23-b473-435c-96c7-b05a1d8e915f" CreationDate="2010-07-14T21:23:24.147" UserId="158" Text="Based on http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo:&#xD;&#xA;&#xD;&#xA;&gt; Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I know the theory about sockets, servers, clients, protocols, connections and such things.&#xD;&#xA;&#xD;&#xA;Now I wonder how one can learn to write a network game:&#xD;&#xA;&#xD;&#xA;* How to balance load problems?&#xD;&#xA;* How to manage the game state?&#xD;&#xA;* How to keep things synchronized?&#xD;&#xA;* How to protect the communication and client from reverse engineering?&#xD;&#xA;* How to work around latency problems?&#xD;&#xA;* Which things should be computed local and which things on the server?&#xD;&#xA;* ...&#xD;&#xA;&#xD;&#xA;Are there any sites, tutorials, interesting articles or other questions regarding this?" />
  <row Id="432" PostHistoryTypeId="1" PostId="249" RevisionGUID="8ad00d23-b473-435c-96c7-b05a1d8e915f" CreationDate="2010-07-14T21:23:24.147" UserId="158" Text="How to write a network game?" />
  <row Id="433" PostHistoryTypeId="3" PostId="249" RevisionGUID="8ad00d23-b473-435c-96c7-b05a1d8e915f" CreationDate="2010-07-14T21:23:24.147" UserId="158" Text="&lt;tutorials&gt;&lt;network&gt;&lt;game&gt;&lt;development&gt;&lt;articles&gt;" />
  <row Id="434" PostHistoryTypeId="2" PostId="250" RevisionGUID="5217b449-f28b-45c6-9df0-40b7f42d4e20" CreationDate="2010-07-14T21:23:30.823" UserId="162" Text="In addition to the technical and logistics reasons mentioned above there is another huge one:&#xD;&#xA;&#xD;&#xA;MMOs are designed to satisfy a large and diverse set of people. To get an MMO going you need to satisfy at least several of the types of players from the [Bartle Test][1]. So you're game is going to need to include some social features, some exploration features such as art, and probably some competition features.&#xD;&#xA;&#xD;&#xA;Much like the audience for an MMO, the creative team needed to build an MMO has to be very diverse. They have to include some really strong engineers to solve the technical issues above. You need some great artists to make a living, breathing world. You need some designers who can both crank out tons of content and make it engaging over long periods of time. You need a full QA and CSR architecture to deal with player feedback and the tons of bugs that will result. Very likely, all of these creators will be interested in the design direction of the project and will either like or dislike whatever direction is chosen. Put all that together and you need a creative team with the ability to drive that diverse collection of people towards a common goal.&#xD;&#xA;&#xD;&#xA;There's simply no way to make an MMO of any scale with an &quot;indie&quot; style team. As your team scales up various creative and personal issues tend to spiral out and the rigors of running a business can really get in the way of building a game. Even if you have all the components above it's very difficult to bring it all together to make a successful, launched MMO.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bartle_Test" />
  <row Id="435" PostHistoryTypeId="5" PostId="238" RevisionGUID="38bdf68a-be71-4488-9297-85ef439aed4d" CreationDate="2010-07-14T21:23:32.243" UserId="136" Comment="added 1 characters in body; added 18 characters in body; deleted 9 characters in body" Text="I'll give you the &quot;simple&quot; version and let someone else fill you in on the details if you're interested :).&#xD;&#xA;&#xD;&#xA;There are basically two ways to model 3D objects.  The first is one you don't see a lot of in games, and it involves using precise, mathematically defined curves to define the shape of an object.  Using this method, the level of detail is (practically speaking) &quot;infinite&quot;.  Take a cylinder for example.  A cylinder can be defined in very simple mathematical terms: all you really need to know is the radius at the ends and the length of the cylinder.  In terms of the geometry, this information is all we need in order to render the cylinder in a 3D scene.  Moreover, we can easily scale the cylinder to make it larger or smaller; all we need to do is maintain the ratio of the length to the radius.  We can use the same formulas to represent the geometry, but with different parameters.  We can represent a torus (&quot;donut&quot; shape) easily as well: we simply need to know the inner radius and outer radius.  From that, we can compute the diameter (and therefore the radius) of the donut's body (the &quot;cake&quot;) by subtracting the inner radius from the outer radius.  The circular body wraps along the arc defined by the inner radius.  This type of 3D definition is nice because it is relatively simple (resulting in a small model file), and there is no significant limit to the level of detail.  The downside is that today's video hardware isn't designed to process these types of models efficiently (if at all).&#xD;&#xA;&#xD;&#xA;The other way is to combine simple geometry to approximate the shape we want to represent.  We do this with a process called *tessellation*.  We could *tessellate* a cylinder by breaking it down into more primitive shapes: two circles and a series of long rectangles, which wrap around the outer edge.  The circles can be further broken down into many tiny triangles, as can the rectangles along the edge.  The end result is a model comprised *only* of triangles:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The good news is that video hardware is optimized to handle this sort of geometry.  Today's GPUs have no trouble churning out tons and tons of triangles every second.  However, there's an obvious problem: we are trying to represent curved surfaces using shapes that have flat edges.  In order for our cylinder to *look* like a cylinder (as opposed to a cube), we want to break it down into a *lot* of little triangles.  Well, how many do we want?  It depends.  What kind of hardware will be used to render the scene?  Faster hardware can render triangles faster than slower hardware, producing faster frame rates.  There are other factors to consider, like how many other objects will be present in the scene, and how complex will they be?  In games, there are typically a lot of objects in a given scene.  Moreover, objects may travel through different scenes, each with different levels of visual complexity.  It's hard to figure out the *level of detail* to use when we tessellate our models.&#xD;&#xA;&#xD;&#xA;Another problem is that of geometric complexity: whereas a simple, curve-based definition of a cylinder was very simple (radius and length), our tessellated definition combines hundreds of triangles, each of which needs to be defined independently.  Consequently, our tessellated model file will be much, much larger.  Let's say we have a mathematically defined model of something complex, like a person.  Our model file may be a mere 24kb in size.  Well, once that model is tessellated, the resulting file could be 24mb (24,000kb).  That's quite a difference.&#xD;&#xA;&#xD;&#xA;Hardware tessellation takes advantage of *geometry shaders* to perform hardware-assisted tessellation *in real time* (or in nearly real time).  Essentially, it provides a mechanism to take a mathematically defined 3D model and transform it into a tessellated format that the video card can handle.  Traditionally, game developers have performed tessellation themselves at the studio, and shipped the tessellated models with the game.  Hardware tessellation allows us to defer this process until the game is *actually running* on the player's computer.  This has some serious benefits:&#xD;&#xA;&#xD;&#xA; 1. The size of the game's 3D content decreases dramatically (fewer discs or smaller downloads, and less hard disk space required).&#xD;&#xA;&#xD;&#xA; 2. We can control the level of detail *in real time*.  Are we running on a cutting-edge beast of a gaming machine?  If so, we can tessellate using a very high level of detail.  Are we running on an old laptop with integrated graphics?  If so, we can reduce the level of detail to boost performance.&#xD;&#xA;&#xD;&#xA;So that's the gist of it.  It's probably not 100% accurate, as I am not a 3D programmer, but that should give you a better idea of what all the fuss is about :).&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Mike&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ligno3d.com/images/STLcylinder.gif" />
  <row Id="436" PostHistoryTypeId="2" PostId="251" RevisionGUID="9429f65c-7713-47a7-b12f-430fa64bce1c" CreationDate="2010-07-14T21:23:36.690" UserId="19" Text="**Autodesk Mudbox**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13565063&#xD;&#xA;&#xD;&#xA;3D texturing and Surface detailing&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;745$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Detailing which can be exported as normal maps. Also great for texturing." />
  <row Id="437" PostHistoryTypeId="16" PostId="251" RevisionGUID="9429f65c-7713-47a7-b12f-430fa64bce1c" CreationDate="2010-07-14T21:23:36.690" UserId="-1" />
  <row Id="438" PostHistoryTypeId="2" PostId="252" RevisionGUID="0498461d-a7ca-4d90-8ea3-36154b3b611f" CreationDate="2010-07-14T21:24:06.753" UserId="19" Text="**Adobe CS5 Master Collection**&#xD;&#xA;&#xD;&#xA;https://store1.adobe.com/cfusion/store/html/index.cfm?event=displayProduct&amp;categoryOID=4244037&amp;store=OLS-US&#xD;&#xA;&#xD;&#xA;Design, textures, video, audio.&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;2599$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Comprehensive package that has Photoshop and Illustrator for both vector and raster imagery/design work. After effects for video post production. Premiere for video editing. Soundbooth for audio. Media Encoder for encoding videos, etc... Some of apps might not be best in their domain (You could buy SoundForge from sony instead of soundbooth, or Avid instead of Premiere), but it is very well rounded for that price. " />
  <row Id="439" PostHistoryTypeId="16" PostId="252" RevisionGUID="0498461d-a7ca-4d90-8ea3-36154b3b611f" CreationDate="2010-07-14T21:24:06.753" UserId="-1" />
  <row Id="440" PostHistoryTypeId="2" PostId="253" RevisionGUID="21536685-ad4d-4b6a-b93a-7e422f4a66d6" CreationDate="2010-07-14T21:24:56.863" UserId="18" Text="[cocos2d for Android](http://code.google.com/p/cocos2d-android/) is based on the [iPhone cocos2d](http://www.cocos2d-iphone.org/) library. I'm not sure how usable it is at the moment but it's worth checking out." />
  <row Id="441" PostHistoryTypeId="5" PostId="233" RevisionGUID="4395da9c-b262-41d4-acc4-901bce935191" CreationDate="2010-07-14T21:26:56.507" UserId="97" Comment="added 527 characters in body" Text="This can be handled like the similar case for linear acceleration.&#xD;&#xA;&#xD;&#xA;First fact to note: Because the ship starts off with an angular velocity of zero, an you want it to end up with an angular velocity of zero, this means that the total change in velocity must equal zero.&#xD;&#xA;&#xD;&#xA;From this we can see that the integral of the acceleration over time must equal zero -- there must be exactly as &quot;much&quot; positive acceleration as there is negative acceleration.&#xD;&#xA;&#xD;&#xA;Therefore, your solution, whatever it is, must be constrained to this property: Equal &quot;total&quot; acceleration forwards and backwards.&#xD;&#xA;&#xD;&#xA;Looking at this, there are so many possible forms and shapes your acceleration could be in!  Let us make some assumptions for the shape of acceleration that you want, in order to give an easy/concise answer.&#xD;&#xA;&#xD;&#xA;For the sake of a simple answer, I will have acceleration be in one of three states: forwards, backwards, or zero.  Forwards and backwards will be at equal magnitude, and the states can be switched instantaneously. (there is no gradual ramping up of acceleration)&#xD;&#xA;&#xD;&#xA;You can find the change in distance for a given acceleration over a given period of time with this equation:&#xD;&#xA;&#xD;&#xA;    s = 0.5*a*t^2&#xD;&#xA;&#xD;&#xA;The simplest solution here would be to accelerate until you reach the halfway point, then decelerate the rest of the way.&#xD;&#xA;&#xD;&#xA;We will take `P` as the total distance you want to move:&#xD;&#xA;&#xD;&#xA;    s = P/2&#xD;&#xA;    P/2 = 0.5*a*t^2&#xD;&#xA;    P = a*t^2&#xD;&#xA;    t^2 = P/a&#xD;&#xA;    t = sqrt(P/a)&#xD;&#xA;&#xD;&#xA;So basically:&#xD;&#xA;&#xD;&#xA;1. Accelerate at `a` for `sqrt(P/a)` units of time (units based off your units for acceleration)&#xD;&#xA;2. Decelerate at the same magnitude for the same amount of time&#xD;&#xA;&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;This is not the only solution.  It will get you there in the fastest amount of time (`2*sqrt(P/a)`).  But what if you want a more relaxed version?&#xD;&#xA;&#xD;&#xA;In this case, you can accelerate 1/3rd of the way, coast for the 1/3rd, and decelerate the rest of the third.  Or 1/4th, coast for 1/2, decelerate 1/4th as well.&#xD;&#xA;&#xD;&#xA;Or maybe you could accelerate for a fixed amount of time, and then decelerate for a fixed amount of time, but wait until you arrive at the exact position before you start decelerating." />
  <row Id="442" PostHistoryTypeId="2" PostId="254" RevisionGUID="6a78117d-e183-4cb3-9b4b-4f075e28fdc3" CreationDate="2010-07-14T21:26:58.080" UserId="19" Text="**Autodesk 3dsmax**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13567410&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win&#xD;&#xA;&#xD;&#xA;3495$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Strength lies in numerous 3rd party plugins and strong game development presence." />
  <row Id="443" PostHistoryTypeId="16" PostId="254" RevisionGUID="6a78117d-e183-4cb3-9b4b-4f075e28fdc3" CreationDate="2010-07-14T21:26:58.080" UserId="-1" />
  <row Id="444" PostHistoryTypeId="2" PostId="255" RevisionGUID="c514ebcf-6933-457c-913e-46e640e4f111" CreationDate="2010-07-14T21:27:28.253" UserId="160" Text="John's post covers it. One important consideration: if you're going to have a *lot* of assets (gigs and gigs), like many games do, you will probably want to steer away from a DVCS. They aren't designed for many large binary files and don't tend to handle them well.&#xD;&#xA;&#xD;&#xA;The non-free industry standard for games is [Perforce](http://perforce.com/)." />
  <row Id="445" PostHistoryTypeId="2" PostId="256" RevisionGUID="ffe760d3-456c-4a4e-a680-69293ac20bf3" CreationDate="2010-07-14T21:28:33.947" UserId="101" Text="You should definitely check out the Halo Wars GDC presentation, &quot;[The Terrain of Next-Gen][1].&quot; It discusses using full vector field displacement instead of simple height field displacement.&#xD;&#xA;&#xD;&#xA;For something a little less revolutionary, maybe check into geometry clipmaps. There's a good article in GPU Gems 2 [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdcvault.com/play/1277/HALO-WARS-The-Terrain-of&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter02.html" />
  <row Id="446" PostHistoryTypeId="2" PostId="257" RevisionGUID="06871951-150f-4ddd-baad-96c1454b46c1" CreationDate="2010-07-14T21:28:34.447" UserId="19" Text="**Autodesk softimage**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13571168&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win, Linux&#xD;&#xA;&#xD;&#xA;2995$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Grandaddy of animation (IK was first developed for SI|3D). Very versatile and powerful package that has strong game dev tools support." />
  <row Id="447" PostHistoryTypeId="16" PostId="257" RevisionGUID="06871951-150f-4ddd-baad-96c1454b46c1" CreationDate="2010-07-14T21:28:34.447" UserId="-1" />
  <row Id="448" PostHistoryTypeId="5" PostId="238" RevisionGUID="071e47f9-3768-4f0f-a152-20b52ba9fd1a" CreationDate="2010-07-14T21:29:41.233" UserId="136" Comment="added 152 characters in body; deleted 4 characters in body; added 12 characters in body" Text="I'll give you the &quot;simple&quot; version and let someone else fill you in on the details if you're interested :).&#xD;&#xA;&#xD;&#xA;There are basically two ways to model 3D objects.  The first is one you don't see a lot of in games, and it involves using precise, mathematically defined curves to define the shape of an object.  Using this method, the level of detail is (practically speaking) &quot;infinite&quot;.  Take a cylinder for example.  A cylinder can be defined in very simple mathematical terms: all you really need to know is the radius at the ends and the length of the cylinder.  In terms of the geometry, this information is all we need in order to render the cylinder in a 3D scene.  Moreover, we can easily scale the cylinder to make it larger or smaller; all we need to do is maintain the ratio of the length to the radius.  We can use the same formulas to represent the geometry, but with different parameters.  We can represent a torus (&quot;donut&quot; shape) easily as well: we simply need to know the inner radius and outer radius.  From that, we can compute the diameter (and therefore the radius) of the donut's body (the &quot;cake&quot;) by subtracting the inner radius from the outer radius.  The circular body wraps along the arc defined by the inner radius.  This type of 3D definition is nice because it is relatively simple (resulting in a small model file), and there is no significant limit to the level of detail.  The downside is that today's video hardware isn't designed to process these types of models efficiently (if at all).&#xD;&#xA;&#xD;&#xA;The other way is to combine simple geometry to approximate the shape we want to represent.  We do this with a process called *tessellation*.  We could *tessellate* a cylinder by breaking it down into more primitive shapes: two circles and a series of long rectangles, which wrap around the outer edge.  The circles can be further broken down into many tiny triangles, as can the rectangles along the edge.  The end result is a model comprised *only* of triangles:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Or, for the torus:&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The good news is that video hardware is optimized to handle this sort of geometry.  Today's GPUs have no trouble churning out tons and tons of triangles every second.  However, there's an obvious problem: we are trying to represent curved surfaces using shapes that have flat edges.  In order for our cylinder to *look* like a cylinder (as opposed to a cube), we want to break it down into a *lot* of little triangles.  Well, how many do we want?  It depends.  What kind of hardware will be used to render the scene?  Faster hardware can render triangles faster than slower hardware, producing faster frame rates.  There are other factors to consider, like how many other objects will be present in the scene, and how complex will they be?  In games, there are typically a lot of objects in a given scene.  Moreover, objects may travel through different scenes, each with different levels of visual complexity.  It's hard to figure out the *level of detail* to use when we tessellate our models.&#xD;&#xA;&#xD;&#xA;Another problem is that of geometric complexity: whereas a curve-based definition of a cylinder is very simple (radius and length), a tessellated definition likely combines hundreds of triangles, each of which needs to be defined independently.  Consequently, our tessellated model file will be much, much larger.  Let's say we have a mathematically defined model of something complex, like a person.  Our model file may be a mere 24kb in size.  Well, once that model is tessellated, the resulting file could be 24mb (24,000kb).  That's quite a difference.&#xD;&#xA;&#xD;&#xA;Hardware tessellation takes advantage of *geometry shaders* to perform hardware-assisted tessellation *in real time* (or in nearly real time).  Essentially, it provides a mechanism to take a mathematically defined 3D model and transform it into a tessellated format that the video card can render efficiently.  Traditionally, game developers have performed tessellation at the studio and shipped the tessellated models with the game.  Hardware tessellation allows us to defer this process until the game is *actually running* on the player's computer.  This has some serious benefits:&#xD;&#xA;&#xD;&#xA; 1. The size of the game's 3D content decreases dramatically (fewer discs or smaller downloads, and less hard disk space required).&#xD;&#xA;&#xD;&#xA; 2. We can control the level of detail *in real time*.  Are we running on a cutting-edge beast of a gaming machine?  If so, we can tessellate using a very high level of detail.  Are we running on an old laptop with integrated graphics?  No problem; we can simply reduce the level of detail to boost performance.&#xD;&#xA;&#xD;&#xA;So that's the gist of it.  It's probably not 100% accurate, as I am not a 3D programmer, but that should give you a better idea of what all the fuss is about :).&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Mike&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ligno3d.com/images/STLcylinder.gif&#xD;&#xA;  [2]: http://nihongo.istockphoto.com/file_thumbview_approve/353482/2/istockphoto_353482-3d-torus-vector.jpg" />
  <row Id="449" PostHistoryTypeId="2" PostId="258" RevisionGUID="9814a6c6-f319-4464-9ed4-a8253d189bde" CreationDate="2010-07-14T21:31:19.987" UserId="19" Text="**Maxon Cinema4D**&#xD;&#xA;&#xD;&#xA;http://www.maxon.net/&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;995$ for core 2495$ for XL and 3695$ for studio bundle.&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Bodypaint3D included in more expensive packages was considered best 3D paint package for quite some time." />
  <row Id="450" PostHistoryTypeId="16" PostId="258" RevisionGUID="9814a6c6-f319-4464-9ed4-a8253d189bde" CreationDate="2010-07-14T21:31:19.987" UserId="-1" />
  <row Id="451" PostHistoryTypeId="5" PostId="245" RevisionGUID="c08b437b-d65f-43dd-8cd4-fb7c8dfbb445" CreationDate="2010-07-14T21:32:38.770" UserId="165" Comment="added 74 characters in body; edited title" Text="What are some good (free or open-source) Version-control packages for developing games, and what are any game-specific issues in using them?" />
  <row Id="452" PostHistoryTypeId="4" PostId="245" RevisionGUID="c08b437b-d65f-43dd-8cd4-fb7c8dfbb445" CreationDate="2010-07-14T21:32:38.770" UserId="165" Comment="added 74 characters in body; edited title" Text="What Version-control systems work best with games?" />
  <row Id="453" PostHistoryTypeId="5" PostId="28" RevisionGUID="26c78b10-8945-4c09-844c-da325a5c1955" CreationDate="2010-07-14T21:32:39.673" UserId="10" Comment="deleted 14 characters in body" Text="You can look at [Troll2D][2]&#xD;&#xA;&#xD;&#xA;[Box2D][1] is used for many platforms. Including the iPhone. But you'd have to find a way to display those objects. Since Box2D handles only 2D physics simulation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Box2D&#xD;&#xA;  [2]: http://code.google.com/p/troll2d/" />
  <row Id="454" PostHistoryTypeId="5" PostId="246" RevisionGUID="be1eac51-9b1d-41b9-bd6d-8664b6ae8f67" CreationDate="2010-07-14T21:33:03.230" UserId="165" Comment="deleted 383 characters in body; added 125 characters in body" Text="One of the best packages is [Subversion][1], an open-source, multi-platform version-control package. There's an excellent (Windows) front-end for it, called [TortoiseSVN][2] plus a free on-line book at [*Version Control with Subversion*][3]. For a general introduction to how VC works, see [An Introduction to Version Control][4].&#xD;&#xA;&#xD;&#xA;I've had no problems using Subversion with Blender .blend files, I can't say how well it does with other binary data types.&#xD;&#xA;&#xD;&#xA;  [1]: http://subversion.apache.org/&#xD;&#xA;  [2]: http://tortoisesvn.tigris.org/&#xD;&#xA;  [3]: http://svnbook.red-bean.com/&#xD;&#xA;  [4]: http://subversion.open.collab.net/articles/IntroductionToVersionControl.html&#xD;&#xA;  [5]: http://git-scm.com/&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Git_(software)&#xD;&#xA;  [7]: http://mercurial.selenic.com/&#xD;&#xA;  [8]: http://hginit.com/00.html" />
  <row Id="455" PostHistoryTypeId="2" PostId="259" RevisionGUID="3cc611b8-9ee2-4e71-817c-ae43cf50b5a7" CreationDate="2010-07-14T21:33:25.117" UserId="19" Text="**Luxology Modo**&#xD;&#xA;&#xD;&#xA;http://www.luxology.com/store/modo/&#xD;&#xA;&#xD;&#xA;3D modeling / painting&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;995$&#xD;&#xA;&#xD;&#xA;Commercial, has a trial&#xD;&#xA;&#xD;&#xA;3D modeling application. Strong modeling tools.&#xD;&#xA;" />
  <row Id="456" PostHistoryTypeId="16" PostId="259" RevisionGUID="3cc611b8-9ee2-4e71-817c-ae43cf50b5a7" CreationDate="2010-07-14T21:33:25.117" UserId="-1" />
  <row Id="457" PostHistoryTypeId="5" PostId="176" RevisionGUID="90c2ace2-5357-4f48-a33a-c7ff1e77bef1" CreationDate="2010-07-14T21:36:29.237" UserId="51" Comment="added 1 characters in body" Text="Paint.NET&#xD;&#xA;&#xD;&#xA;http://www.getpaint.net/&#xD;&#xA;&#xD;&#xA;2D Graphics&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;FREE!&#xD;&#xA;&#xD;&#xA;MIT?&#xD;&#xA;&#xD;&#xA;Free alternative to Photoshop for basic tasks." />
  <row Id="458" PostHistoryTypeId="5" PostId="238" RevisionGUID="b2b13b27-c6dc-47ab-bf8f-4d447bfa3558" CreationDate="2010-07-14T21:36:49.937" UserId="136" Comment="added 2 characters in body" Text="I'll give you the &quot;simple&quot; version and let someone else fill you in on the details if you're interested :).&#xD;&#xA;&#xD;&#xA;There are basically two ways to model 3D objects.  The first is one you don't see a lot of in games, and it involves using precise, mathematically defined curves to define the shape of an object.  Using this method, the level of detail is (practically speaking) &quot;infinite&quot;.  Take a cylinder for example.  A cylinder can be defined in very simple mathematical terms: all you really need to know is the radius at the ends and the length of the cylinder.  In terms of the geometry, this information is all we need in order to render the cylinder in a 3D scene.  Moreover, we can easily scale the cylinder to make it larger or smaller; all we need to do is maintain the ratio of the length to the radius.  We can use the same formulas to represent the geometry, but with different parameters.  We can represent a torus (&quot;donut&quot; shape) easily as well: we simply need to know the inner radius and outer radius.  From that, we can compute the diameter (and therefore the radius) of the donut's body (the &quot;cake&quot;) by subtracting the inner radius from the outer radius.  The circular body wraps along the arc defined by the inner radius.  This type of 3D definition is nice because it is relatively simple (resulting in a small model file), and there is no significant limit to the level of detail.  The downside is that today's video hardware isn't designed to process these types of models efficiently (if at all).&#xD;&#xA;&#xD;&#xA;The other way is to combine simple geometry to approximate the shape we want to represent.  We do this with a process called *tessellation*.  We could *tessellate* a cylinder by breaking it down into more primitive shapes: two circles and a series of long rectangles, which wrap around the outer edge.  The circles can be further broken down into many tiny triangles, as can the rectangles along the edge.  The end result is a model comprised *only* of triangles:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Or, for the torus:&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The good news is that video hardware is optimized to handle this sort of geometry.  Today's GPUs have no trouble churning out tons and tons of triangles every second.  However, there's an obvious problem: we are trying to represent curved surfaces using shapes that have flat edges.  In order for our cylinder to *look* like a cylinder (as opposed to a cube), we want to break it down into a *lot* of little triangles.  Well, how many do we want?  It depends.  What kind of hardware will be used to render the scene?  Faster hardware can render triangles faster than slower hardware, producing faster frame rates.  There are other factors to consider, like how many other objects will be present in the scene, and how complex will they be?  In games, there are typically a lot of objects in a given scene.  Moreover, objects may travel through different scenes, each with different levels of visual complexity.  It's hard to figure out the *level of detail* to use when we tessellate our models.&#xD;&#xA;&#xD;&#xA;Another problem is that of geometric complexity: whereas a curve-based definition of a cylinder is very simple (radius and length), a tessellated definition likely combines hundreds of triangles, each of which needs to be defined independently.  Consequently, our tessellated model file will be much, much larger.  Let's say we have a mathematically defined model of something complex, like a person.  Our model file may be a mere 24kb in size.  Well, once that model is tessellated, the resulting file could be 24mb (24,000kb).  That's quite a difference.&#xD;&#xA;&#xD;&#xA;Hardware tessellation takes advantage of *geometry shaders* to perform hardware-assisted tessellation *in real time* (or in nearly real time).  Essentially, it provides a mechanism to take a mathematically defined 3D model and transform it into a tessellated format that the video card can render efficiently.  Traditionally, game developers have performed tessellation at the studio and shipped the tessellated models with the game.  Hardware tessellation allows us to defer this process until the game is *actually running* on the player's computer.  This has some serious benefits:&#xD;&#xA;&#xD;&#xA; 1. The size of the game's 3D content decreases dramatically (fewer discs or smaller downloads, and less hard disk space required).&#xD;&#xA;&#xD;&#xA; 2. We can control the level of detail *in real time*.  Are we running on a cutting-edge beast of a gaming machine?  If so, we can tessellate using a very high level of detail.  Are we running on an old laptop with integrated graphics?  No problem; we can simply reduce the level of detail to boost performance.&#xD;&#xA;&#xD;&#xA;So that's the gist of it.  It's probably not 100% accurate, as I am not a 3D programmer, but that should give you a better idea of what all the fuss is about :).&#xD;&#xA;&#xD;&#xA;Cheers,  &#xD;&#xA;Mike&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ligno3d.com/images/STLcylinder.gif&#xD;&#xA;  [2]: http://nihongo.istockphoto.com/file_thumbview_approve/353482/2/istockphoto_353482-3d-torus-vector.jpg" />
  <row Id="459" PostHistoryTypeId="5" PostId="179" RevisionGUID="85b70663-b82c-4562-923a-4afa574034d8" CreationDate="2010-07-14T21:36:58.223" UserId="43" Comment="added 8 characters in body" Text="Product: sfxr&#xD;&#xA;&#xD;&#xA;Website: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;&#xD;&#xA;OS(s) Supported: Windows, Linux, Mac&#xD;&#xA;&#xD;&#xA;Free&#xD;&#xA;&#xD;&#xA;License: MIT&#xD;&#xA;&#xD;&#xA;Summary:  Provide a simple means of generating basic sound effects." />
  <row Id="460" PostHistoryTypeId="5" PostId="176" RevisionGUID="f25ac1e3-9af2-4999-a88e-a1bda12717d6" CreationDate="2010-07-14T21:38:18.893" UserId="43" Comment="added 52 characters in body" Text="Paint.NET&#xD;&#xA;&#xD;&#xA;http://www.getpaint.net/&#xD;&#xA;&#xD;&#xA;2D Graphics&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;Free&#xD;&#xA;&#xD;&#xA;[Paint.net License](http://www.getpaint.net/license.html)&#xD;&#xA;&#xD;&#xA;Free alternative to Photoshop for basic tasks." />
  <row Id="461" PostHistoryTypeId="2" PostId="260" RevisionGUID="4f5b64c8-c5b4-4ae8-a61c-74ea27d72857" CreationDate="2010-07-14T21:39:28.177" UserId="51" Text="There's a very easy solution for that particular example.&#xD;&#xA;&#xD;&#xA;I'm assuming your arbitrary shape is just a series of points.&#xD;&#xA;&#xD;&#xA;Draw a ray from each of your objects in any direction.  If the number of times it intersects a line segment on your shape is even (including zero), you are outside of the shape.&#xD;&#xA;&#xD;&#xA;If the number of times you intersect is odd, you are inside the object.&#xD;&#xA;&#xD;&#xA;Ray/line segment collision is a pretty easy algorithm to find/implement." />
  <row Id="462" PostHistoryTypeId="5" PostId="233" RevisionGUID="233ed7f5-02f9-49b0-af54-a36fc37f23b8" CreationDate="2010-07-14T21:39:33.103" UserId="97" Comment="added picture" Text="This can be handled like the similar case for linear acceleration.&#xD;&#xA;&#xD;&#xA;First fact to note: Because the ship starts off with an angular velocity of zero, an you want it to end up with an angular velocity of zero, this means that the total change in velocity must equal zero.&#xD;&#xA;&#xD;&#xA;From this we can see that the integral of the acceleration over time must equal zero -- there must be exactly as &quot;much&quot; positive acceleration as there is negative acceleration.&#xD;&#xA;&#xD;&#xA;Therefore, your solution, whatever it is, must be constrained to this property: Equal &quot;total&quot; acceleration forwards and backwards.&#xD;&#xA;&#xD;&#xA;Here is what the shape of your acceleration over time graph should follow:&#xD;&#xA;&#xD;&#xA;![](http://img101.imageshack.us/img101/2324/accel.png)&#xD;&#xA;&#xD;&#xA;Looking at this, there are so many possible forms and shapes your acceleration could be in!  Let us make some assumptions for the shape of acceleration that you want, in order to give an easy/concise answer.&#xD;&#xA;&#xD;&#xA;For the sake of a simple answer, I will have acceleration be in one of three states: forwards, backwards, or zero.  Forwards and backwards will be at equal magnitude, and the states can be switched instantaneously. (there is no gradual ramping up of acceleration)&#xD;&#xA;&#xD;&#xA;You can find the change in distance for a given acceleration over a given period of time with this equation:&#xD;&#xA;&#xD;&#xA;    s = 0.5*a*t^2&#xD;&#xA;&#xD;&#xA;The simplest solution here would be to accelerate until you reach the halfway point, then decelerate the rest of the way.&#xD;&#xA;&#xD;&#xA;We will take `P` as the total distance you want to move:&#xD;&#xA;&#xD;&#xA;    s = P/2&#xD;&#xA;    P/2 = 0.5*a*t^2&#xD;&#xA;    P = a*t^2&#xD;&#xA;    t^2 = P/a&#xD;&#xA;    t = sqrt(P/a)&#xD;&#xA;&#xD;&#xA;So basically:&#xD;&#xA;&#xD;&#xA;1. Accelerate at `a` for `sqrt(P/a)` units of time (units based off your units for acceleration)&#xD;&#xA;2. Decelerate at the same magnitude for the same amount of time&#xD;&#xA;&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;This is not the only solution.  It will get you there in the fastest amount of time (`2*sqrt(P/a)`).  But what if you want a more relaxed version?&#xD;&#xA;&#xD;&#xA;In this case, you can accelerate 1/3rd of the way, coast for the 1/3rd, and decelerate the rest of the third.  Or 1/4th, coast for 1/2, decelerate 1/4th as well.&#xD;&#xA;&#xD;&#xA;Or maybe you could accelerate for a fixed amount of time, and then decelerate for a fixed amount of time, but wait until you arrive at the exact position before you start decelerating." />
  <row Id="463" PostHistoryTypeId="2" PostId="261" RevisionGUID="0d408c96-aaa7-41a0-bb32-21980fde5a4a" CreationDate="2010-07-14T21:39:51.250" UserId="162" Text="If you are using Visual Studio C++ you can in fact pause and recompile your code under certain circumstances. Visual Studio supports [Edit and Continue][1]. Attach to your game in the debugger, make it stop at a breakpoint, and then modify the code after your breakpoint. If you are to save and then continue, Visual Studio will attempt to recompile the code, reinsert it into the running executable, and continue. If all goes well the change you made will live apply to the running game without having to do an entire compile-build-test cycle. However, the following will stop this from working:&#xD;&#xA;&#xD;&#xA; 1. Changing callback functions will not work properly. E&amp;C works by adding a new chunk of code and changing the call table to point to the new block. For callbacks and anything using function pointers it will still be executing the old, unmodified calls. To fix this you can have a wrapper callback function that calls a static function&#xD;&#xA; 2. Modifying header files will almost never work. This is designed for modifying actual function calls.&#xD;&#xA; 3. Various language constructs will cause it to mysteriously fail. From my personal experience pre-declaring things like enums will often do this. &#xD;&#xA; &#xD;&#xA;I have used Edit and Continue to dramatically improve the speed of things like UI iteration. Let's say you have a working UI built entirely in code except that you accidentally swapped the draw order of two boxes so you can't see anything. By changing 2 lines of code live you can save yourself a 20 minute compile/build/test cycle to check a trivial UI fix.&#xD;&#xA;&#xD;&#xA;This is NOT a full solution for a production environment, and I've found the best solution there is to move as much of your logic as possible into data files and then making those data files reloadable.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBoQFjAA&amp;url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fbcew296c(VS.80).aspx&amp;ei=6iw-TLv9H8Kblgfl1fz6BQ&amp;usg=AFQjCNE8Aiz86aClKWrhj1P0aRNX55ORqA" />
  <row Id="464" PostHistoryTypeId="6" PostId="7" RevisionGUID="59106b54-c350-4a1a-ba83-2329257667b0" CreationDate="2010-07-14T21:43:02.997" UserId="120" Comment="edited tags" Text="&lt;c#&gt;&lt;java&gt;&lt;pitfalls&gt;&lt;xna&gt;&lt;managed&gt;" />
  <row Id="465" PostHistoryTypeId="2" PostId="262" RevisionGUID="d9432990-61d1-4e31-b30c-0484206ffb16" CreationDate="2010-07-14T21:45:10.780" UserId="119" Text="The WiiFlash project was for using the wiimote on PC/Mac games. I think you want to look at the MarioToo project for creating wii browser games. To be honest though, why bother? You've got a much bigger audience to target with Flash by going for the general PC/Mac/Linux audience." />
  <row Id="466" PostHistoryTypeId="5" PostId="193" RevisionGUID="e2fb5430-d3c5-441a-a59c-940294682446" CreationDate="2010-07-14T21:45:21.997" UserId="136" Comment="added 617 characters in body; added 2 characters in body; added 43 characters in body" Text="As Sean said, IronPython is worth looking at.  IronPython is actually one of a few dynamic language implementations for .NET targeting the Dynamic Language Runtime (DLR).  There is at least one open source project aimed at implementing Lua on the DLR (like [this one][1]), but I'm not sure if there are any implementations near completion.  A well-implemented set of DLR bindings for Lua should provide performance on par with IronPython and IronRuby, and would be much faster than a Lua wrapper.  For the sake of comparison, IronPython generally performs better than CPython (sometimes significantly better).&#xD;&#xA;&#xD;&#xA;**Note:** As ElementCy states below, DLR languages are generally not supported on the Xbox 360.  However, there *is* an &quot;interpreted mode&quot; in the DLR.  I don't know enough about it to say for sure, but it might be possible to get IronPython (or other DLR language implementations) to run on the Xbox 360 in interpreted mode, though performance would certainly suffer.  It might be worth asking someone on the DLR team whether they know this to be possible.  If not, the Xbox 360 *should* get Reflection.Emit support as part of upcoming Silverlight support.  If and when that happens, I imagine getting the DLR up and running on the Xbox 360 won't be a problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/ironlua/" />
  <row Id="467" PostHistoryTypeId="5" PostId="249" RevisionGUID="128ac351-5a1f-4740-8ad1-e170dfa53a6b" CreationDate="2010-07-14T21:47:47.877" UserId="158" Comment="added 7 characters in body; edited tags" Text="Based on http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo:&#xD;&#xA;&#xD;&#xA;&gt; Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I know the theory about sockets, servers, clients, protocols, connections and such things.&#xD;&#xA;&#xD;&#xA;Now I wonder how one can learn to write a network game:&#xD;&#xA;&#xD;&#xA;* How to balance load problems?&#xD;&#xA;* How to manage the game state?&#xD;&#xA;* How to keep things synchronized?&#xD;&#xA;* How to protect the communication and client from reverse engineering?&#xD;&#xA;* How to work around latency problems?&#xD;&#xA;* Which things should be computed local and which things on the server?&#xD;&#xA;* ...&#xD;&#xA;&#xD;&#xA;Are there any books, tutorials, sites, interesting articles or other questions regarding this?" />
  <row Id="468" PostHistoryTypeId="6" PostId="249" RevisionGUID="128ac351-5a1f-4740-8ad1-e170dfa53a6b" CreationDate="2010-07-14T21:47:47.877" UserId="158" Comment="added 7 characters in body; edited tags" Text="&lt;network&gt;&lt;game&gt;&lt;development&gt;&lt;articles&gt;&lt;books&gt;" />
  <row Id="469" PostHistoryTypeId="2" PostId="263" RevisionGUID="b63bf350-0d88-432b-b475-66738057eb0d" CreationDate="2010-07-14T21:48:49.313" UserId="170" Text="I've been programming business applications for Windows for a decade now &amp; thinking it might be time for a change &amp; considering game dev. I've played around in XNA and really enjoyed it. I've mainly programmed in Delphi but my favourite language is C# and I've never worked in C/C++.&#xD;&#xA;&#xD;&#xA;My perception though is that most game companies write in C/C++ and would only use something like XNA for tools development/fast prototyping.&#xD;&#xA;&#xD;&#xA;So my question is can you be taken seriously applying for game programming jobs having just self-taught games experience in XNA or should I really learn C/C++ &amp; OpenGL/DirectX? What other recommendations would you make for increasing ones chances of getting hired?" />
  <row Id="470" PostHistoryTypeId="1" PostId="263" RevisionGUID="b63bf350-0d88-432b-b475-66738057eb0d" CreationDate="2010-07-14T21:48:49.313" UserId="170" Text="How to go about getting hired by a game company" />
  <row Id="471" PostHistoryTypeId="3" PostId="263" RevisionGUID="b63bf350-0d88-432b-b475-66738057eb0d" CreationDate="2010-07-14T21:48:49.313" UserId="170" Text="&lt;career&gt;" />
  <row Id="472" PostHistoryTypeId="6" PostId="249" RevisionGUID="ec54b515-912d-417f-b0f9-6c7fbccafa0a" CreationDate="2010-07-14T21:50:30.077" UserId="189" Comment="edited tags" Text="&lt;network&gt;&lt;articles&gt;&lt;books&gt;" />
  <row Id="473" PostHistoryTypeId="5" PostId="228" RevisionGUID="72fe21f6-ee98-4978-8c40-94fb95167b24" CreationDate="2010-07-14T21:51:19.233" UserId="160" Comment="added 4 characters in body" Text="If your resolutions are similar to each other, you can just use the same art across all of them with maybe some downscaling at runtime for the smaller screens. If they differ by more than say a factor of 2x, you're going to need to author (or at least have an artist tweak) separate assets for the different resolutions.&#xD;&#xA;&#xD;&#xA;With 2D, resolution has a huge affect on how you design images. A sprite that looks richly detailed and realistic at high-res will be muddy and indecipherable scaled down. Likewise, a sprite that's clean and sharp looking at low-res will look cheap and overly-simple at high-res." />
  <row Id="474" PostHistoryTypeId="2" PostId="264" RevisionGUID="69dbdfbd-70d9-4227-93e3-888c03a5f42f" CreationDate="2010-07-14T21:51:28.593" UserId="158" Text="Just like any other Flash game, just play test it a lot on the Opera channel to make sure that it fits that rather than your browser. Please note that Flash game can not detect all buttons and swings..." />
  <row Id="475" PostHistoryTypeId="2" PostId="265" RevisionGUID="57d2c122-27e2-4397-9f53-89459a8f1ad4" CreationDate="2010-07-14T21:51:46.503" UserId="30" Text="You could try working for a casual games company first. If you can find one in your area that's hiring, you can get experience writing smaller games for a couple of years, and that can then help you get that entry level position at a studio that makes larger games." />
  <row Id="476" PostHistoryTypeId="6" PostId="249" RevisionGUID="4c7c9608-11d8-4c14-8af1-6f6392dbbf21" CreationDate="2010-07-14T21:52:18.140" UserId="158" Comment="edited tags; added 5 characters in body" Text="&lt;tutorials&gt;&lt;network&gt;&lt;articles&gt;&lt;books&gt;&lt;sites&gt;" />
  <row Id="477" PostHistoryTypeId="5" PostId="249" RevisionGUID="4c7c9608-11d8-4c14-8af1-6f6392dbbf21" CreationDate="2010-07-14T21:52:18.140" UserId="158" Comment="edited tags; added 5 characters in body" Text="Based on http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo:&#xD;&#xA;&#xD;&#xA;&gt; Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I know the theory about sockets, servers, clients, protocols, connections and such things.&#xD;&#xA;&#xD;&#xA;Now I wonder how one can learn to write a network game:&#xD;&#xA;&#xD;&#xA;* How to balance load problems?&#xD;&#xA;* How to manage the game state?&#xD;&#xA;* How to keep things synchronized?&#xD;&#xA;* How to protect the communication and client from reverse engineering?&#xD;&#xA;* How to work around latency problems?&#xD;&#xA;* Which things should be computed local and which things on the server?&#xD;&#xA;* ...&#xD;&#xA;&#xD;&#xA;Are there any good books, tutorials, sites, interesting articles or other questions regarding this?" />
  <row Id="478" PostHistoryTypeId="5" PostId="34" RevisionGUID="bd247e72-ba49-499b-a267-e6fb1bebdc05" CreationDate="2010-07-14T21:52:54.363" UserId="19" Comment="conclusion and image clarification" Text="Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios. &#xD;&#xA;&#xD;&#xA;In a 3D game you might have a HUD or menu GUI based on raster graphics, and in a 2D game you might have a bunch of quads which are vessels for sprites. &#xD;&#xA;&#xD;&#xA;So my question is, how do you approach designing and operating content across various resolutions and aspect ratio? Let's assume you have a sprite character that is 300x400 pixels sprite and surrounded by a level made of tiles. On different resolutions/aspect ratios you'd see a different FOV altogether. Or if you have a HUD or a GUI menu, you'd want to keep some stuff at same positions and of same size relative to the screen. Yet, graphics source is raster bitmaps, not vector. &#xD;&#xA;&#xD;&#xA;Obviously, problem has been addressed numerous times. I'm interested to hear abut various approaches that worked for you so far. Do you keep an arbitrary dimension agnostic 'pixel' unit that you magically transform into needed dimensions via formula based on res and aspect ratio or other approaches?&#xD;&#xA;&#xD;&#xA;**edit:**&#xD;&#xA;&#xD;&#xA;So, conclusion is to enumerate your aspect ratios. Lowest combination of aspect:resolution is the one you design important stuff into. A safe area if you will. Same aspect ratios, but higher resolutions are simple scaling issues. Art content is designed for highest resolution. Larger aspect ratios simply show more of level/FOV with information presented which is not critical as is the one in safe area. [Something like in this image I made][1].&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://imgur.com/5XHnl.png&#xD;&#xA;  [2]: http://imgur.com/5XHnl.png" />
  <row Id="479" PostHistoryTypeId="2" PostId="266" RevisionGUID="467d575c-4445-46d3-a4d9-52cd1263e267" CreationDate="2010-07-14T21:52:55.067" UserId="165" Text="There's a great (long) list of music/sound sources at UnityAnswers: [Where can I find music or sound effects for my game?][1]. A sampler of some of the free ones:&#xD;&#xA;&#xD;&#xA;  - [8bit-collective][2]&#xD;&#xA;  - [ccmixter.org][3]&#xD;&#xA;  - [Flash Kit sound effects][4]&#xD;&#xA;  - [HartwigMedia][5]&#xD;&#xA;  - [Freesound.org][6]&#xD;&#xA;  - [Musopen classical music][7]&#xD;&#xA;  - [Open Music Archive][8]&#xD;&#xA;  - [Incompetech.com][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com/questions/225/where-can-i-find-music-or-sound-effects-for-my-games/226#226&#xD;&#xA;  [2]: http://8bitcollective.com/&#xD;&#xA;  [3]: http://ccmixter.org/&#xD;&#xA;  [4]: http://www.flashkit.com/soundfx/&#xD;&#xA;  [5]: http://www.hartwigmedia.com/Index/index.php?option=com_rokdownloads&amp;view=folder&amp;Itemid=109&amp;lang=en&#xD;&#xA;  [6]: http://www.freesound.org/&#xD;&#xA;  [7]: http://musopen.com/&#xD;&#xA;  [8]: http://openmusicarchive.org/&#xD;&#xA;  [9]: http://incompetech.com/" />
  <row Id="480" PostHistoryTypeId="2" PostId="267" RevisionGUID="72e64d45-9de3-4fb5-a762-7fc9ac12e4cc" CreationDate="2010-07-14T21:54:42.087" UserId="10" Text="**Create games.**&#xD;&#xA;&#xD;&#xA;Can't stress that enough. Even if they are small prototype fun things or small finished games.&#xD;&#xA;&#xD;&#xA;If you are applying for a programmer job, show your skill in that area by doing a well programmed game. The graphics do not need to be good." />
  <row Id="481" PostHistoryTypeId="2" PostId="268" RevisionGUID="8edd07e0-2e64-4f24-bdc4-53a2fbc97185" CreationDate="2010-07-14T21:55:24.630" UserId="160" Text="Every programming language has its standard library of containers, algorithms, and other helpful stuff. With languages like C#, Java, and Python, it's practically inconceivable to use the language *without* its standard lib.&#xD;&#xA;&#xD;&#xA;Yet, on many C++ games I've worked on, we either didn't use the STL at all, used a tiny fraction of it, or used our own implementation. It's hard to tell if that was a sound decision for our games, or one simply made out of ignorance of the STL.&#xD;&#xA;&#xD;&#xA;So... is the STL a good fit or not?" />
  <row Id="482" PostHistoryTypeId="1" PostId="268" RevisionGUID="8edd07e0-2e64-4f24-bdc4-53a2fbc97185" CreationDate="2010-07-14T21:55:24.630" UserId="160" Text="STL for games, yay or nay?" />
  <row Id="483" PostHistoryTypeId="3" PostId="268" RevisionGUID="8edd07e0-2e64-4f24-bdc4-53a2fbc97185" CreationDate="2010-07-14T21:55:24.630" UserId="160" Text="&lt;c++&gt;" />
  <row Id="484" PostHistoryTypeId="2" PostId="269" RevisionGUID="21fde03e-912e-470c-bb73-54edd89fa430" CreationDate="2010-07-14T21:55:40.493" UserId="189" Text="Most, if not all, game programming positions should state the language you will be working in. In order to apply for the job, you should probably have a decent understanding of the language, even if you made a conscious choice to do your game programming in a different language. It seems unlikely to me that they would hire you for a C++ position if you didn't know C++ at all. However, if you knew the C++ language from some prior business app development but you have a good portfolio of XNA apps, I think any reasonable company would hire you.&#xD;&#xA;&#xD;&#xA;There are certainly game programming concepts which transcend the programming language level, but in order to be productive to the company, you need to be able to write those concepts in the language they want." />
  <row Id="485" PostHistoryTypeId="5" PostId="257" RevisionGUID="8e7e2cc9-395d-4a9b-9171-ddd59ad745a8" CreationDate="2010-07-14T21:57:28.183" UserId="43" Comment="edited body" Text="**Autodesk Softimage**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13571168&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win, Linux&#xD;&#xA;&#xD;&#xA;2995$&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Grandaddy of animation (IK was first developed for SI|3D). Very versatile and powerful package that has strong game dev tools support." />
  <row Id="486" PostHistoryTypeId="2" PostId="270" RevisionGUID="238f69b3-97cc-4913-a44d-8bb489f2392b" CreationDate="2010-07-14T21:58:46.717" UserId="189" Text="If you find yourself rewriting something that already exists in the STL, for any reason, **stop**. Use the STL.&#xD;&#xA;&#xD;&#xA;The STL has been optimized over years of analysis and time, and it's a safe bet you're probably not going to write something that's more efficient. That's not to say you should use STL where a simpler solution may be possible (i.e. use an array when you have a known quantity of things, not a stl::list), but if you're writing your own implementation of a map (the basic data structure, not a game world map), you're doing it wrong." />
  <row Id="487" PostHistoryTypeId="2" PostId="271" RevisionGUID="47dff7c7-e068-428d-84df-1732a8310c02" CreationDate="2010-07-14T21:58:50.213" UserId="30" Text="I've built games using STL and I like it, and it seems to perform well." />
  <row Id="488" PostHistoryTypeId="2" PostId="272" RevisionGUID="81abba41-7755-46c4-98dd-d884807b4600" CreationDate="2010-07-14T21:59:49.307" UserId="120" Text="Play to your strengths. Check websites like develop that have jobs listings and look for jobs that want the skills you have. Ok, most devs would only hire C# programmers for tooling positioons, but at least you then have that all important foot in the door! You never know what might come up when your on the inside. &#xD;&#xA;&#xD;&#xA;Also, might sound silly but keep your eyes on the xna creators club forums job section. I got a 6 month contract position there on a xna powerd serious game. 8 months later and ive wound up being permanent staff on the project. " />
  <row Id="489" PostHistoryTypeId="2" PostId="273" RevisionGUID="362263fe-1a3a-4eb0-8c14-179fc523478e" CreationDate="2010-07-14T22:00:27.917" UserId="162" Text="The default STL has a fair number of issues that make it difficult to use with games, especially when it comes to memory alignment.&#xD;&#xA;&#xD;&#xA;A customized variant such as the [EA STL][1] is specially designed for games and can get you much better memory performance and console usability. I haven't seen an open source gaming STL variant, but it would not be impossible to replace piecemeal the important bits.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html" />
  <row Id="490" PostHistoryTypeId="2" PostId="274" RevisionGUID="5982c38b-ba9c-4dc7-9c05-31139e5a603b" CreationDate="2010-07-14T22:01:32.223" UserId="30" Text="In addition to the documentation and the unity forums, I recommend the Unity StackExchange site:&#xD;&#xA;&#xD;&#xA;[http://answers.unity3d.com/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com/" />
  <row Id="491" PostHistoryTypeId="2" PostId="275" RevisionGUID="f5b97e9e-75ea-448a-9fdf-b6a25ac09d74" CreationDate="2010-07-14T22:02:47.980" UserId="136" Text="Depending on the type of game you're writing, you may be able to avoid some of the low-level network programming.  Some types of games do not require a lot of back-and-forth communication between the clients and the server.  In such cases, one could opt to use a higher level framework.  For example, I am developing a turn-based strategy game in C#/.NET.  Turn-based strategy games are somewhat unique in that the vast majority of client/server communication occurs at the beginning and end of a turn, with relatively little in between.  Thus, I opted to use the Windows Communication Foundation (WCF), a high-level communications framework designed primarily for web services.  Instead of working directly with sockets and all of that low-level networking gunk, I can make what appear to be standard method calls, and let WCF deal with the protocol and transport layers for me.  The only time I've had to deal with the low-level network stuff was when I configured my endpoints, which is pretty much a one-time deal in a config file.  It may still be necessary to implement some custom serialization logic, but you'd need to do that sort of thing regardless." />
  <row Id="492" PostHistoryTypeId="2" PostId="276" RevisionGUID="7df1b3e7-d1c5-4516-b9f4-3274c32d3bb0" CreationDate="2010-07-14T22:03:37.573" UserId="19" Text="You are making a 3d engine. You want best of multiplatform worlds. Suddenly you realize that if you want to use Direct3D on Windows machines and OpenGL on OSX/Linux, you'll have to sacrifice supported features of both to least common denominator. &#xD;&#xA;&#xD;&#xA;Some may use OpenGL across three OS', since it appears to be least common denominator by itself. All is good. Then, you have to port your graphics API backend to Nintendo's GX, you also have to make a PS3 and Xbox360 path. &#xD;&#xA;&#xD;&#xA;What do you do? Do you design your own API which is least common denominator in itself and write backend implementations for it for each platform or do you write for each platform it's own branch?&#xD;&#xA;&#xD;&#xA;If you opt to design your own API, do you use bridge pattern or your own voodoo? Where does madness stop where you realize everything and kitchen sink approach must stop and you basically have separate engine for each platform as a branch. Or you stick to everything and kitchen sink and keep platform specifics in backend module specializations for each platform." />
  <row Id="493" PostHistoryTypeId="1" PostId="276" RevisionGUID="7df1b3e7-d1c5-4516-b9f4-3274c32d3bb0" CreationDate="2010-07-14T22:03:37.573" UserId="19" Text="API agnostic bridges (ie. OpenGL/D3D/Whatever). Do you use them, how you make them. Pro's and Con's." />
  <row Id="494" PostHistoryTypeId="3" PostId="276" RevisionGUID="7df1b3e7-d1c5-4516-b9f4-3274c32d3bb0" CreationDate="2010-07-14T22:03:37.573" UserId="19" Text="&lt;opengl&gt;&lt;api&gt;&lt;directx&gt;&lt;patterns&gt;" />
  <row Id="495" PostHistoryTypeId="2" PostId="277" RevisionGUID="f29fadaa-6cd3-4f20-96b7-406ccc112c54" CreationDate="2010-07-14T22:09:01.703" UserId="73" Text="IMHO I'd say it's a good fit since STL already works well and is optimized for the tasks it's made for. Besides, you're working on a game so, use the tools you have at hand that makes your life easier and your code less prone to bugs.&#xD;&#xA;&#xD;&#xA;Why bother reinventing the wheel when you can be working on something else like the game's AI, user experience, or better yet; testing and debugging?" />
  <row Id="496" PostHistoryTypeId="2" PostId="278" RevisionGUID="6b477609-1a12-4c93-875d-0667878807ff" CreationDate="2010-07-14T22:10:08.440" UserId="51" Text="I've seen very few reasons not to use the STL for games.&#xD;&#xA;&#xD;&#xA;For the memory allocation issues, many people don't know this but you can write custom allocators for your STL container classes.  Allocators are basically policy classes you pass into your templates to determine how allocations are performed.  Using these you can usually work around whatever memory issues are problematic on your platform of choice.&#xD;&#xA;&#xD;&#xA;Of course, if you're using the STL and doing dumb things like maps of strings to large, non-pointer types, then you have bigger problems on your hand." />
  <row Id="497" PostHistoryTypeId="16" PostId="249" RevisionGUID="fb2de501-b926-402e-ac08-8cf73a924da3" CreationDate="2010-07-14T22:10:43.400" UserId="158" />
  <row Id="498" PostHistoryTypeId="5" PostId="265" RevisionGUID="d6efd392-033a-407b-b0c7-01856818f531" CreationDate="2010-07-14T22:10:57.817" UserId="30" Comment="added 11 characters in body" Text="You could try applying to work for a casual games company first, if you can find one in your area that's hiring. That way, you can get experience writing smaller games for a couple of years, which may help you get that entry level position at a studio that makes larger games." />
  <row Id="499" PostHistoryTypeId="2" PostId="279" RevisionGUID="f350c105-e93d-40ae-b99a-c89c4febee1f" CreationDate="2010-07-14T22:13:55.940" UserId="19" Text="Here is what Mike Acton (Engine Director at Insomniac Games of Spyro the Dragon, Ratchet &amp; Clank and Resistance fame) had to say about this when asked [here][1]. Note he was asked about both STL and Boost in general as related to usage in game dev.&#xD;&#xA;&#xD;&#xA;**STL/Boost, does it belong into gamedev? If only parts of it, which ones?**&#xD;&#xA;&#xD;&#xA;&gt; You're asking about two different&#xD;&#xA;&gt; things here, right? STL and Boost,&#xD;&#xA;&gt; separately. But really, my answer is&#xD;&#xA;&gt; the same: There's nothing *wrong* with&#xD;&#xA;&gt; either one per se, but I discourage&#xD;&#xA;&gt; their use. Use of either encourages&#xD;&#xA;&gt; people to *fit* a solution to a&#xD;&#xA;&gt; problem rather than *finding* a&#xD;&#xA;&gt; solution to a problem. The solution&#xD;&#xA;&gt; should always be appropriate for the&#xD;&#xA;&gt; data at hand and the constraints of&#xD;&#xA;&gt; the hardware, etc. Both STL and Boost&#xD;&#xA;&gt; have an extremely narrow view of the&#xD;&#xA;&gt; &quot;world&quot; and their appropriate use is&#xD;&#xA;&gt; limited. Really, I discourage them&#xD;&#xA;&gt; because they lead programmers down the&#xD;&#xA;&gt; wrong direction right away, I often&#xD;&#xA;&gt; say if you feel like you need either&#xD;&#xA;&gt; one you probably don't really&#xD;&#xA;&gt; understand the problem that you're&#xD;&#xA;&gt; trying to solve.&#xD;&#xA;&#xD;&#xA;I have also noticed that most pro game developers strive more towards C than C++.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.formspring.me/macton" />
  <row Id="500" PostHistoryTypeId="5" PostId="249" RevisionGUID="d14367ac-955d-48ef-8c86-67902b6914bf" CreationDate="2010-07-14T22:14:02.540" UserId="158" Comment="added 90 characters in body" Text="Based on http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo:&#xD;&#xA;&#xD;&#xA;&gt; Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I know the theory about sockets, servers, clients, protocols, connections and such things.&#xD;&#xA;&#xD;&#xA;Now I wonder how one can learn to write a network game:&#xD;&#xA;&#xD;&#xA;* How to balance load problems?&#xD;&#xA;* How to manage the game state?&#xD;&#xA;* How to keep things synchronized?&#xD;&#xA;* How to protect the communication and client from reverse engineering?&#xD;&#xA;* How to work around latency problems?&#xD;&#xA;* Which things should be computed local and which things on the server?&#xD;&#xA;* ...&#xD;&#xA;&#xD;&#xA;Are there any good books, tutorials, sites, interesting articles or other questions regarding this?&#xD;&#xA;&#xD;&#xA;I'm looking for broad answers, but specific ones are fine too to learn the difference." />
  <row Id="501" PostHistoryTypeId="6" PostId="14" RevisionGUID="20e93164-6a80-48ae-9888-dced67b42250" CreationDate="2010-07-14T22:17:11.837" UserId="162" Comment="edited tags" Text="&lt;assets&gt;&lt;music&gt;" />
  <row Id="502" PostHistoryTypeId="2" PostId="280" RevisionGUID="28269814-f77f-42c8-b179-ebc3e9a93223" CreationDate="2010-07-14T22:17:30.057" UserId="165" Text="Where can I find information on the legal or business aspects of running a game production company?" />
  <row Id="503" PostHistoryTypeId="1" PostId="280" RevisionGUID="28269814-f77f-42c8-b179-ebc3e9a93223" CreationDate="2010-07-14T22:17:30.057" UserId="165" Text="Where can I find legal or business resources for a game production company?" />
  <row Id="504" PostHistoryTypeId="3" PostId="280" RevisionGUID="28269814-f77f-42c8-b179-ebc3e9a93223" CreationDate="2010-07-14T22:17:30.057" UserId="165" Text="&lt;legal&gt;&lt;business&gt;" />
  <row Id="505" PostHistoryTypeId="2" PostId="281" RevisionGUID="e21bd37a-8e8b-4209-8241-c6725cc17bd0" CreationDate="2010-07-14T22:17:39.807" UserId="165" Text="Yes, I'm making the Answer a *wiki* - feel free to update this post rather than start new answers.&#xD;&#xA;&#xD;&#xA;  - **Books**  &#xD;&#xA;[Business and Legal Primer for Game Development][1]  &#xD;&#xA;[Secrets of the Game Business][2]  &#xD;&#xA;[Indie Game Development Survival Guide][3]&#xD;&#xA;&#xD;&#xA;  - **Websites**  &#xD;&#xA;[Tom Buscaglia: The Game Attorney][4]  &#xD;&#xA;[Game Company Legal Kits][5] - sold by same author above, different site.&#xD;&#xA;&#xD;&#xA;And the usual disclaimer: [Caveat Emptor][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Business-Legal-Primer-Game-Development/dp/1584504927/&#xD;&#xA;  [2]: http://www.amazon.com/Secrets-Game-Business-2nd-Ed/dp/1584503998/&#xD;&#xA;  [3]: http://www.amazon.com/Indie-Game-Development-Survival-Guide/dp/1584502142/&#xD;&#xA;  [4]: http://gameattorney.com/blog/&#xD;&#xA;  [5]: http://www.gamedevkit.com/index.html&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Caveat_emptor" />
  <row Id="506" PostHistoryTypeId="16" PostId="281" RevisionGUID="e21bd37a-8e8b-4209-8241-c6725cc17bd0" CreationDate="2010-07-14T22:17:39.807" UserId="165" />
  <row Id="507" PostHistoryTypeId="5" PostId="210" RevisionGUID="70595c14-227c-447a-ab00-190c4c33cf57" CreationDate="2010-07-14T22:21:37.650" UserId="120" Comment="added 194 characters in body" Text="I dont know much about java, so this is from the point of view of a .net dev.&#xD;&#xA;&#xD;&#xA;The biggest one by far is garbage. the .net garbage collector on windows does a fantastic job, and you can get away without baby sitting it for the most part. On the xbox/winPhone7 thats a different matter. If you get stalls every few frames, garbage collection might be causing you problems. At the moment it triggers after every 1mb allocation.&#xD;&#xA;&#xD;&#xA;Heres some tips for dealing with garbage. You shouldn't have to worry about most of these in reality, but they may come in handy one day.&#xD;&#xA;&#xD;&#xA; - Draw the contents of GC.GetTotalMemory() to the screen. This gives you an approximation of the ammount of allocated bytes your game uses. If it hardly moves, your doing ok. If its going up fast, you have issues.&#xD;&#xA; - try to allocate all your *heap* objects up front. If you do allocate eveything before the game starts, everytime you hit a meg of allocations, your going to stall. No allocations, no collections. as simple as that.&#xD;&#xA; - After loading, call GC.Collect(). If you know most of your big allocations are out the way, its only nice to let the system know.&#xD;&#xA; - DO NOT CALL GC.Collect() every frame. It might seem like a good idea, keeping on top of your garbage and all that, but remember the only with worse than a garbage collection is over garbage collection. &#xD;&#xA; - Look for where your garbage is coming from. There are some common causes like concatnating strings instead of useing [StringBuilder][1] (bewhere, StringBuilder isnt a magic bullet, and can still [cause allocations!][2]) or using foreach loops over collections that use the IEnumerable interface can also create garbage without you knowing (for eaxmple, `foreach (EffectPass pass in effect.CurrentTechnique.Passes)` is a common one)&#xD;&#xA; - Use tools like the [CLR memory profiler][3] to figure out where memory is being allocated. There are loads of tutorials out there on how to use this tool.&#xD;&#xA; - When you know where your allocating during gameplay, see if you can use tricks like pooling objects to lower that allocation count.&#xD;&#xA; - If all else fails, make your collections run faster! The GC on the compact framework follows evey reference in your code to figure out what objects are not in use anymore. Refactor your code use less references!&#xD;&#xA; - Remember to use IDisposable on classes that contain unmanaged resources. You can use these to clean up memory the GC cannot free up itself.&#xD;&#xA;&#xD;&#xA;The other thing to think about is floating point performance. While the .net JITer does a fair amount of processor specific optimisations, cannot use SSE or any other SIMD instruction sets to speed up your floating point maths. This can cause quite a big speed difference between C++ and C# for games. If your using mono, they have some special SIMD maths libraries you can take advantage of.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx&#xD;&#xA;  [2]: http://www.musictomakegamesby.com/2010/04/01/xnac-avoiding-garbage-when-working-with-stringbuilder/&#xD;&#xA;  [3]: http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&amp;DisplayLang=en" />
  <row Id="508" PostHistoryTypeId="2" PostId="282" RevisionGUID="bf55f864-5a44-430f-a3cf-794c13439ab2" CreationDate="2010-07-14T22:24:10.940" UserId="51" Text="I work for a relatively small company.  We don't get a lot of resumes from people with experience, yet we're in a position where we should hire people to grow.  We pretty frequently get resumes from people just out of school.  &#xD;&#xA;&#xD;&#xA;We'd like to try to find the diamonds in the rough, but flying non-local people out and taking a day out of several people's week to do a sit-down, in person interview is expensive.  We also do phone interviews for any semi-promising candidates, but those can take a while to set up, and are usually a couple of man hours lost.&#xD;&#xA;&#xD;&#xA;We've considered implementing a programmer test, but we have yet to figure out a good one that other studios aren't using.&#xD;&#xA;&#xD;&#xA;What are some practices that your studios use to look through these people, with minimal internal overhead?" />
  <row Id="509" PostHistoryTypeId="1" PostId="282" RevisionGUID="bf55f864-5a44-430f-a3cf-794c13439ab2" CreationDate="2010-07-14T22:24:10.940" UserId="51" Text="What are some ways of sorting through zero-experience programming candidates?" />
  <row Id="510" PostHistoryTypeId="3" PostId="282" RevisionGUID="bf55f864-5a44-430f-a3cf-794c13439ab2" CreationDate="2010-07-14T22:24:10.940" UserId="51" Text="&lt;management&gt;&lt;hiring&gt;" />
  <row Id="511" PostHistoryTypeId="2" PostId="283" RevisionGUID="a1f8baf0-3f56-4fea-a9ec-a6b705306de3" CreationDate="2010-07-14T22:24:30.300" UserId="136" Text="If an open source game's resources and source code appear to be governed by the same license, I would suggest you contact one of the project leads and verify that this is actually the case.  The LGPL, and other open source licenses, are generally intended to govern the use of source code.  Many open-source games adopt separate licenses for the source code and the content.  In such arrangements, the content is often distributed under one of the many [Creative Commons][1] licenses.  The CC licenses are relatively short and concise, outlining in plain English exactly how you may or may not reuse the content.  Most of the open source projects I have worked with have used CC licenses which allow you to reuse any content you like, as long as you attribute the original author(s).  To fulfill this stipulation, simply include the author(s) in your game's credits, along with a description of the borrowed content.  Note that some licenses include a *non-commercial* stipulation, which bars reuse or redistribution with any commercial product.  In such cases, you can still borrow content for freeware or open source projects.  However, if you use the content in an open-source project which you later decide to sell, you will (as I understand it) need to remove/replace that content in the version you sell.&#xD;&#xA;&#xD;&#xA;As to whether or not you *should* use open source game assets, I would say &quot;absolutely&quot;.  If you do not have the talent yourself (or on your team) to produce better assets yourself, using open source assets will enable you to deliver a better game whilst giving the original content author(s) greater exposure.&#xD;&#xA;&#xD;&#xA;  [1]: http://creativecommons.org/" />
  <row Id="512" PostHistoryTypeId="6" PostId="280" RevisionGUID="1bdc2f28-2cae-4b2d-8b4f-b838af7a5a04" CreationDate="2010-07-14T22:24:30.347" UserId="165" Comment="edited tags" Text="&lt;books&gt;&lt;legal&gt;&lt;business&gt;" />
  <row Id="513" PostHistoryTypeId="2" PostId="284" RevisionGUID="e4d6d784-5654-47ad-a920-e861b34a5803" CreationDate="2010-07-14T22:24:52.577" UserId="19" Text="Be aware of density independence (basically resolution) as described here: http://developer.android.com/guide/practices/screens_support.html&#xD;&#xA;&#xD;&#xA;And as related to aspect ratio, pick your minimal target aspect ratio and design within it as sort of a safe frame. When confrontend with wider aspect ratio, show more of the game which is not critical to gameplay. I have posted a similar question here and described what I'd do: http://gamedev.stackexchange.com/questions/34/how-do-you-approach-resolution-independence-in-raster-based-graphics-content" />
  <row Id="514" PostHistoryTypeId="2" PostId="285" RevisionGUID="1339601f-d95f-4480-948d-21716ec3235f" CreationDate="2010-07-14T22:28:29.563" UserId="174" Text="This guy:&#xD;&#xA;&#xD;&#xA;http://www.pronobozo.com/&#xD;&#xA;&#xD;&#xA;Posted this on Happy Penguin some time ago:&#xD;&#xA;&#xD;&#xA;http://happypenguin.org/forums/viewtopic.php?t=1724&#xD;&#xA;&#xD;&#xA;Offering his music for free in games, so long as they complied with some sort of FOSS licence." />
  <row Id="515" PostHistoryTypeId="2" PostId="286" RevisionGUID="fa33fb28-550c-4dff-8932-08cad079912e" CreationDate="2010-07-14T22:29:47.987" UserId="188" Text="All I can say is take a look at [Ogre3D][1]. It's written in C++, Open source (MIT License now) and  runs on every major platform out of the box. It abstracts out the rendering api and can switch from using DirectX to OpenGL with just a couple of settings. However, I do not know enough about the differences between feature sets of DirectX and OpenGL to say that it does or does not support a specific feature. &#xD;&#xA;&#xD;&#xA;[Torchlight][2] by Runic Games was written using Ogre and I've played that on Mac and PC and it runs very well on both.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://www.torchlightgame.com/" />
  <row Id="516" PostHistoryTypeId="2" PostId="287" RevisionGUID="48fa8593-71c5-45e1-bdb8-56287be0a38d" CreationDate="2010-07-14T22:31:10.327" UserId="19" Text="We have a mixed art/tech environment, but hiring process is always the same. Cull interesting resumes and offer candidates a task from start to finish on his own where you give him only a high concept. For programmers a small game that can be made in several days (can use programmer art or stock) where you give him a concept of what it should do and tech to do it with. A really basic game. For artists it's either a spec work or a pitch for concept. &#xD;&#xA;&#xD;&#xA;They can work on their own on that, can use whatever help they need (google, ask around, whatever) as long as they finish on scheduled deadline. Test consists of first cull if project is actually what it was supposed to be (does it work at all etc.) and where you go through process he used to make it and code review where you discuss his decisions while making it." />
  <row Id="517" PostHistoryTypeId="2" PostId="288" RevisionGUID="4d1f7043-5958-4bf9-8a4a-2bcc5e5185d9" CreationDate="2010-07-14T22:34:40.963" UserId="120" Text="Ive read a few articles about [SSAO][1], and i would like to implement it in to 3d engine at work, which runs on top of DX9. Can you give me an tips on getting the simplest implementation possible up and running using shader model 3, and how would you upgrade this implementation over time to tackle artefacts like haloing?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/23/what-is-ambient-occlusion" />
  <row Id="518" PostHistoryTypeId="1" PostId="288" RevisionGUID="4d1f7043-5958-4bf9-8a4a-2bcc5e5185d9" CreationDate="2010-07-14T22:34:40.963" UserId="120" Text="How to implement SSAO in Shader Model 3/ DX9?" />
  <row Id="519" PostHistoryTypeId="3" PostId="288" RevisionGUID="4d1f7043-5958-4bf9-8a4a-2bcc5e5185d9" CreationDate="2010-07-14T22:34:40.963" UserId="120" Text="&lt;graphics&gt;&lt;dx9&gt;&lt;shadermodel3&gt;" />
  <row Id="520" PostHistoryTypeId="2" PostId="289" RevisionGUID="57e593d2-7f35-44de-8c18-a5e49f841fd3" CreationDate="2010-07-14T22:36:03.443" UserId="188" Text="I have been using [Mercurial][1] for a bit now with some of the XNA development I've been working on with a friend. We don't have Gigs of stuff though so we haven't had any problems.&#xD;&#xA;&#xD;&#xA;Besides Perforce as munificent mentioned another non-free (although it also has a 2 user non-expiring license) is [AlienBrain][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mercurial.selenic.com/&#xD;&#xA;  [2]: http://www.nxn-software.com/" />
  <row Id="521" PostHistoryTypeId="2" PostId="290" RevisionGUID="2d460bae-790a-40cb-bf2f-880cfa84bbd9" CreationDate="2010-07-14T22:43:44.650" UserId="188" Text="Whatever methodology you choose, you need to keep in mind that a game at all stages, needs to be fun. The methodology you use will really come down to the team members involved and how many of them are, but at all points you should be able to &quot;play&quot; the game in some form to evaluate if something is working or not. That great design idea that takes weeks of development and does not add to the fun factor is wasted time. Having an Agile methodology should enable you to evaluate each feature of the game as it is developed.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="522" PostHistoryTypeId="2" PostId="291" RevisionGUID="82997d6d-3d0d-46b6-93f7-7ec48ffc4dc9" CreationDate="2010-07-14T22:48:31.243" UserId="9" Text="I've seen someone generate impressive skymaps by modeling a scene in Blender, complete with elaborate particles, shaders, post processing, etc., and then use six 90-degree cameras to render out the skybox (which you could then convert to spherical, if you wanted. Might even be able to render directly to spherical.) This is of course most useful if you've got some kind of fantasy or surreal environment that'd be difficult to capture with photography." />
  <row Id="523" PostHistoryTypeId="2" PostId="292" RevisionGUID="7aacc164-03a4-4f98-8921-7934ed71aea7" CreationDate="2010-07-14T22:52:00.817" UserId="18" Text="What are some good resources (tutorials, code, papers, etc.) for learning about [voxel](http://en.wikipedia.org/wiki/Voxel) rendering?" />
  <row Id="524" PostHistoryTypeId="1" PostId="292" RevisionGUID="7aacc164-03a4-4f98-8921-7934ed71aea7" CreationDate="2010-07-14T22:52:00.817" UserId="18" Text="What are some good resources for building a voxel engine?" />
  <row Id="525" PostHistoryTypeId="3" PostId="292" RevisionGUID="7aacc164-03a4-4f98-8921-7934ed71aea7" CreationDate="2010-07-14T22:52:00.817" UserId="18" Text="&lt;tutorials&gt;&lt;voxels&gt;&lt;beginner&gt;" />
  <row Id="527" PostHistoryTypeId="2" PostId="293" RevisionGUID="35f13a71-54ad-4983-98e2-3c15c78817b9" CreationDate="2010-07-14T22:55:32.997" UserId="169" Text="If the 3D package you are using supports render-to-texture functionality you could always unwrap a sphere/hemisphere and bake an environment (your skybox in this case) to the unwrapped sphere texture. You can do this with a 6-sided box as well. I've played around with this in 3DS Max but I think Blender can do it too." />
  <row Id="528" PostHistoryTypeId="2" PostId="294" RevisionGUID="2a885f31-3dc6-4c7b-99f6-1f59228ba136" CreationDate="2010-07-14T23:02:04.407" UserId="19" Text="Terragen Classic is free for personal and non-commercial use: http://www.planetside.co.uk/content/view/19/31/&#xD;&#xA;&#xD;&#xA;There are tutorials [how to do it][1] around the net.&#xD;&#xA;&#xD;&#xA;Then, of course, there is [Terragen 2][2], [e-on Vue][3], and [Bryce][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Skybox_(2D)_with_Terragen&#xD;&#xA;  [2]: http://www.planetside.co.uk/content/view/15/27/&#xD;&#xA;  [3]: http://www.e-onsoftware.com/&#xD;&#xA;  [4]: http://www.daz3d.com/i.x/software/bryce/-/" />
  <row Id="529" PostHistoryTypeId="2" PostId="295" RevisionGUID="43431b38-2bf5-4f66-bfb3-eef33c74236d" CreationDate="2010-07-14T23:05:00.157" UserId="10" Text="[Here is a 10 year old tutorial][1] that goes pretty deep into Voxel rendering as a technology. It's still a good read.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/voxtut/" />
  <row Id="530" PostHistoryTypeId="2" PostId="296" RevisionGUID="120f5306-bffd-4f0c-aea4-f991e500a0d8" CreationDate="2010-07-14T23:08:35.550" UserId="83" Text="The answers here are great but if you really want to build a MMO I would start small and build parts that you can. What is the end goal by the way. Is it to have a large MMO that is popular or have fun making the game you like to make. " />
  <row Id="531" PostHistoryTypeId="2" PostId="297" RevisionGUID="4516f8a1-39f8-44bb-b4b8-0e5f561c95d7" CreationDate="2010-07-14T23:11:32.347" UserId="37" Text="When creating a free game what revenue options are there and how successful are they? What are the pros and cons of different revenue models such as ad-supported, freemium, partnerships, merchandising, virtual goods, etc.? &#xD;&#xA;&#xD;&#xA;If possible, give specific examples of games using different revenue models and provide data as evidence (otherwise it could get quite subjective)." />
  <row Id="532" PostHistoryTypeId="1" PostId="297" RevisionGUID="4516f8a1-39f8-44bb-b4b8-0e5f561c95d7" CreationDate="2010-07-14T23:11:32.347" UserId="37" Text="What are some common ways to generate revenue from a free game?" />
  <row Id="533" PostHistoryTypeId="3" PostId="297" RevisionGUID="4516f8a1-39f8-44bb-b4b8-0e5f561c95d7" CreationDate="2010-07-14T23:11:32.347" UserId="37" Text="&lt;revenue&gt;&lt;monetization&gt;" />
  <row Id="534" PostHistoryTypeId="2" PostId="298" RevisionGUID="dc7ee7ef-6054-48ff-92e1-9f01ecb6afc0" CreationDate="2010-07-14T23:15:04.087" UserId="73" Text="No professional experience doesn't mean no experience at all. Check if the candidates have participated in any local/global event such as the global game jam, the independent games festival or they just come up with a website with their portfolio. &#xD;&#xA;&#xD;&#xA;On the other hand, some programmers just love programming competitions; check that too (ACM, TopCoder, Google Code Jam, UVa, SPOJ, to name a few). Experience on this kind of competitions make up for any weird test in fashion and will probably help you get some resumes out.&#xD;&#xA;&#xD;&#xA;All in all, I think [this post][1] from Joel Spolsky always help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.joelonsoftware.com/articles/FindingGreatDevelopers.html" />
  <row Id="535" PostHistoryTypeId="2" PostId="299" RevisionGUID="61f213e2-dd4c-4930-a254-237f5f690d51" CreationDate="2010-07-14T23:15:40.890" UserId="19" Text="Check out this simple fragment shader implementation with explanation on why's and how's http://www.coniserver.net/wiki/index.php/Screen_Space_Ambient_Occlusion_Shader Although it is fragment/GL and not D3d9, it's simple as it gets, so you should be able to understand what you need to do." />
  <row Id="536" PostHistoryTypeId="2" PostId="300" RevisionGUID="920f514e-70f3-4526-ab0a-cdb6dfa87b55" CreationDate="2010-07-14T23:16:04.273" UserId="188" Text="I have participated in Ludum Dare a couple of times and plan on doing more. I know of the following contests:&#xD;&#xA;&#xD;&#xA; - [Ludum Dare][1] 48 Hour&#xD;&#xA; - [Java4k][2]&#xD;&#xA; - [7DRL][3] (7 Day Roguelike)&#xD;&#xA; - [Dream Build Play][4]&#xD;&#xA;&#xD;&#xA;Any others that you have participated in and had a good time with?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ludumdare.com&#xD;&#xA;  [2]: http://www.java4k.com/index.php?action=home&#xD;&#xA;  [3]: http://roguebasin.roguelikedevelopment.org/index.php?title=7DRL&#xD;&#xA;  [4]: http://www.dreambuildplay.com/main/default.aspx" />
  <row Id="537" PostHistoryTypeId="1" PostId="300" RevisionGUID="920f514e-70f3-4526-ab0a-cdb6dfa87b55" CreationDate="2010-07-14T23:16:04.273" UserId="188" Text="What are your favorite gamedev related contests?" />
  <row Id="538" PostHistoryTypeId="3" PostId="300" RevisionGUID="920f514e-70f3-4526-ab0a-cdb6dfa87b55" CreationDate="2010-07-14T23:16:04.273" UserId="188" Text="&lt;untagged&gt;" />
  <row Id="539" PostHistoryTypeId="2" PostId="301" RevisionGUID="d424598e-8e0e-4e34-9435-5f6cb68eacc2" CreationDate="2010-07-14T23:16:20.263" UserId="208" Text="Based on my own experience it's easier to stay motivated if you've got others working with you. So:&#xD;&#xA;&#xD;&#xA; - Get a few other developers who can share your excitement about the game. Excitement can be contagious!&#xD;&#xA; - Set up a mailing list (Google groups are easy to set up), and post to it often to keep momentum going.&#xD;&#xA; - Start by getting something simple that works. When I was working on Trosnoth (side-scrolling platformer), the starting point was just a single stick figure who moved left and right and jumped. From there, we slowly all added bits and pieces until it did just about everything.&#xD;&#xA;&#xD;&#xA;Certainly my key tips would be **share your excitement** and **keep the project in a state that works**." />
  <row Id="540" PostHistoryTypeId="2" PostId="302" RevisionGUID="af22b429-0fde-4a89-8550-a278519cc3bd" CreationDate="2010-07-14T23:20:33.750" UserId="58" Text="Is there an industry standard file format for texture atlases?&#xD;&#xA;&#xD;&#xA;What are the apps that take a directory of images and turns it into a texture atlas png and a text file describing what's on it?&#xD;&#xA;&#xD;&#xA;This is primarily for use in OpenGL iPhone/Objective-C, but it seems like there ought to be a standard across many platforms.  I can create these by hand or by writing a script to simply tile them, but it seems like there would be some tools already made for this." />
  <row Id="541" PostHistoryTypeId="1" PostId="302" RevisionGUID="af22b429-0fde-4a89-8550-a278519cc3bd" CreationDate="2010-07-14T23:20:33.750" UserId="58" Text="Are there apps and standard file formats for generating texture atlases/sprites from source images?" />
  <row Id="542" PostHistoryTypeId="3" PostId="302" RevisionGUID="af22b429-0fde-4a89-8550-a278519cc3bd" CreationDate="2010-07-14T23:20:33.750" UserId="58" Text="&lt;iphone&gt;&lt;textures&gt;&lt;sprites&gt;" />
  <row Id="546" PostHistoryTypeId="2" PostId="304" RevisionGUID="cc800c90-c082-4eee-a9f1-82e488b11448" CreationDate="2010-07-14T23:23:28.270" UserId="19" Text="I personally use Mercurial. There is an asset management oriented VCS from AVID called Alienbrain http://www.nxn-software.com/ which used to be heavily marketed towards game developers." />
  <row Id="547" PostHistoryTypeId="2" PostId="305" RevisionGUID="f1d65a13-c9f2-4593-982b-72bc319f33d3" CreationDate="2010-07-14T23:23:40.097" UserId="208" Text="If you're going to have multiple people working on your game it's *much, much easier* in my experience to use a distributed version control system (I use Mercurial) just because it makes merges so much simpler.&#xD;&#xA;&#xD;&#xA;But remember, you can use a different version control system for your binary assets. For instance, you can get the Mercurial bigfiles extension ( http://mercurial.selenic.com/wiki/BigfilesExtension ) to have your assets stored in the same Mercurial repo, but only fetch the binaries you need when you need them.&#xD;&#xA;&#xD;&#xA;After changing from Subversion to Mercurial for my hobby game project, I would **never go back** to Subversion because of how much easier it is to merge changes made by different developers in a distributed system like Mercurial." />
  <row Id="548" PostHistoryTypeId="2" PostId="306" RevisionGUID="84476342-3b7e-4062-b0ff-d46e6b386e87" CreationDate="2010-07-14T23:23:40.470" UserId="140" Text="GraphicsGale&#xD;&#xA;&#xD;&#xA;Site: [http://www.humanbalance.net/gale/us/][1]&#xD;&#xA;&#xD;&#xA;2D Pixel Art&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;Free version, and Commercial version.&#xD;&#xA;&#xD;&#xA;GraphicsGale is a fantastic 2D Pixel Editor. The commercial version supports editing cursors and animated GIFs but for game development the free version is perfectly fine.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.humanbalance.net/gale/us/" />
  <row Id="549" PostHistoryTypeId="16" PostId="306" RevisionGUID="84476342-3b7e-4062-b0ff-d46e6b386e87" CreationDate="2010-07-14T23:23:40.470" UserId="-1" />
  <row Id="550" PostHistoryTypeId="2" PostId="307" RevisionGUID="62bafbeb-eb41-4b33-a158-b0b1f46dbd6d" CreationDate="2010-07-14T23:24:10.920" UserId="51" Text="Monetization heavily depends on the platform, but for the iPhone specifically, freemium (specifically, buying into something that lets you play more effectively) has proven itself to be probably the most viable strategy for games in which it fits.&#xD;&#xA;&#xD;&#xA;A few sample points:&#xD;&#xA;&#xD;&#xA;* http://gamesfromwithin.com/the-power-of-free - a blog post talking about revenue in a freemium app, with increased sales even after making the game non-free&#xD;&#xA;* ng:moco has switched all their future games to be freemium, and their shooter Eliminate showed up in the top 100 revenue generating apps despite being free.&#xD;&#xA;&#xD;&#xA;Of course, in the iPhone marketplace, monetization of microtransactions is fairly easy since it's all handled through iTunes and most users already have a credit card tied to their iTunes account.  I'm sure you'll see similar stories coming from Facebook once there's a unified way of purchasing things on there instead of a bunch of different mechanisms.&#xD;&#xA;&#xD;&#xA;As far as ad-supported, there are conflicting reports on that matter.&#xD;&#xA;&#xD;&#xA;Here's one that says ads are good: http://www.macrumors.com/2009/05/06/adwhirl-free-ad-supported-iphone-apps-can-very-lucrative/&#xD;&#xA;&#xD;&#xA;And here's one that says ads aren't worth it: http://www.macrumors.com/2009/02/20/appstore-secrets-price-drops-usage-and-ad-supported-models/&#xD;&#xA;&#xD;&#xA;Of course both of those are before iAd came out." />
  <row Id="551" PostHistoryTypeId="2" PostId="308" RevisionGUID="fcf9af5a-10c4-4875-9c4c-73b8e6d6ae30" CreationDate="2010-07-14T23:26:41.510" UserId="205" Text="Dialog Trees should be done using XML. You store the conditions for the responses and the response in nested trees with a reference to a script file if you need to do something more complex.&#xD;&#xA;&#xD;&#xA;You should keep the scripts and dialog separate especially if you are putting together an RPG which has a metric ton worth of conversations. You can then use a library like simpleXML to read the XML file.&#xD;&#xA;&#xD;&#xA;There's a similar question over on SO with an example:&#xD;&#xA;http://stackoverflow.com/questions/372915/game-logic-in-xml-files" />
  <row Id="552" PostHistoryTypeId="2" PostId="309" RevisionGUID="fbca3bb1-6269-4184-af34-9e5106cb595a" CreationDate="2010-07-14T23:27:21.417" UserId="122" Text="**Graphics Gale**&#xD;&#xA;&#xD;&#xA;[http://www.humanbalance.net/gale/us/][1]&#xD;&#xA;&#xD;&#xA;2b Pixel art&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;Free version and Paid version (don't need any of the paid features to makes complete sprites)&#xD;&#xA;&#xD;&#xA;2D pixel art tool, great for creating animated sprites.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.humanbalance.net/gale/us/" />
  <row Id="553" PostHistoryTypeId="16" PostId="309" RevisionGUID="fbca3bb1-6269-4184-af34-9e5106cb595a" CreationDate="2010-07-14T23:27:21.417" UserId="-1" />
  <row Id="554" PostHistoryTypeId="2" PostId="310" RevisionGUID="c8126844-2dde-421b-9a0e-8f6c2bcfe233" CreationDate="2010-07-14T23:28:30.057" UserId="165" Text="What the heck... :)&#xD;&#xA;&#xD;&#xA;[How to Recruit Great Developers][1]&#xD;&#xA;&#xD;&#xA;[What process do you use to recruit programmers][2]&#xD;&#xA;&#xD;&#xA;[What is the best way to tell an excellent programmer in a job interview?][3]&#xD;&#xA;&#xD;&#xA;[How long should it take a senior developer to solve FizzBuzz in an interview?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1451216/how-to-recruit-great-developers&#xD;&#xA;  [2]: http://stackoverflow.com/questions/69238/what-process-do-you-use-to-recruit-programmers&#xD;&#xA;  [3]: http://stackoverflow.com/questions/239185/what-is-the-best-way-to-tell-an-excellent-programmer-in-a-job-interview&#xD;&#xA;  [4]: http://stackoverflow.com/questions/1060366/how-long-should-it-take-a-senior-developer-to-solve-fizzbuzz-during-an-interview" />
  <row Id="555" PostHistoryTypeId="2" PostId="311" RevisionGUID="3a2fb4b0-5c8a-4596-b61c-1c22c494fc3a" CreationDate="2010-07-14T23:28:40.680" UserId="120" Text="I recently did some experimentation with voxels for rendering terrian, with support for overhangs. I pritty much used these articles to build my prototype.&#xD;&#xA;&#xD;&#xA; - This [GPU gems 3 chapter][1] on generating procedural terrain on the GPU. Even though my solution was CPU based (i work with shader model 3, so I couldn't reuse any of there shaders). Theres alot of good information buried in here!&#xD;&#xA; - The wikipedia enty on [the marching cubes][2] algorithm. Great set of references, such as to [this site that has a good pictorial overview][3] on how things work.&#xD;&#xA; - for any procedural work, your going to need a good noise library like [Lib noise][4] ([also has a c# version][5])&#xD;&#xA;&#xD;&#xA;something to look out for, i could never get normal generation to work correctly once i had generated a mesh from my voxels. If anyone can give any pointers for this, id be grateful. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Marching_cubes&#xD;&#xA;  [3]: http://users.polytech.unice.fr/~lingrand/MarchingCubes/algo.html&#xD;&#xA;  [4]: http://libnoise.sourceforge.net/&#xD;&#xA;  [5]: http://libnoisedotnet.codeplex.com/" />
  <row Id="556" PostHistoryTypeId="6" PostId="77" RevisionGUID="19098842-a515-41c3-8ee1-a0d5da0d8022" CreationDate="2010-07-14T23:30:15.060" UserId="55" Comment="edited tags" Text="&lt;iphone&gt;&lt;objective-c&gt;&lt;state&gt;" />
  <row Id="557" PostHistoryTypeId="6" PostId="51" RevisionGUID="dc3b51ab-f3e1-4567-9b08-c61a46257afa" CreationDate="2010-07-14T23:30:52.457" UserId="55" Comment="edited tags" Text="&lt;android&gt;&lt;resolution&gt;" />
  <row Id="558" PostHistoryTypeId="2" PostId="312" RevisionGUID="38cfa440-4bec-47d5-bde5-96cc09273636" CreationDate="2010-07-14T23:38:32.847" UserId="120" Text="http://spritesheetpacker.codeplex.com/ heres a link to an extendible tile sheet packer. It can export sheet look up tables in a text format and in XML by default, but you can write plug ins in c# to add new export formats." />
  <row Id="559" PostHistoryTypeId="6" PostId="102" RevisionGUID="1e657355-e87f-4472-b40c-3d29904c3657" CreationDate="2010-07-14T23:40:43.297" UserId="120" Comment="edited tags" Text="&lt;c#&gt;&lt;xna&gt;&lt;lua&gt;&lt;xbox360&gt;&lt;pc&gt;" />
  <row Id="560" PostHistoryTypeId="5" PostId="210" RevisionGUID="6cb36ad7-f7e1-4f0e-a115-7fa9c96577b5" CreationDate="2010-07-14T23:47:45.423" UserId="120" Comment="added 116 characters in body" Text="I dont know much about java, so this is from the point of view of a .net dev.&#xD;&#xA;&#xD;&#xA;The biggest one by far is garbage. the .net garbage collector on windows does a fantastic job, and you can get away without baby sitting it for the most part. On the xbox/winPhone7 thats a different matter. If you get stalls every few frames, garbage collection might be causing you problems. At the moment it triggers after every 1mb allocation.&#xD;&#xA;&#xD;&#xA;Heres some tips for dealing with garbage. You shouldn't have to worry about most of these in reality, but they may come in handy one day.&#xD;&#xA;&#xD;&#xA; - Draw the contents of GC.GetTotalMemory() to the screen. This gives you an approximation of the ammount of allocated bytes your game uses. If it hardly moves, your doing ok. If its going up fast, you have issues.&#xD;&#xA; - try to allocate all your *heap* objects up front. If you do allocate eveything before the game starts, everytime you hit a meg of allocations, your going to stall. No allocations, no collections. as simple as that.&#xD;&#xA; - After loading, call GC.Collect(). If you know most of your big allocations are out the way, its only nice to let the system know.&#xD;&#xA; - DO NOT CALL GC.Collect() every frame. It might seem like a good idea, keeping on top of your garbage and all that, but remember the only with worse than a garbage collection is over garbage collection. &#xD;&#xA; - Look for where your garbage is coming from. There are some common causes like concatnating strings instead of useing [StringBuilder][1] (bewhere, StringBuilder isnt a magic bullet, and can still [cause allocations!][2]. This means simple operations like adding a number to the end of a string can create surprising amounts of garbage.) or using foreach loops over collections that use the IEnumerable interface can also create garbage without you knowing (for eaxmple, `foreach (EffectPass pass in effect.CurrentTechnique.Passes)` is a common one)&#xD;&#xA; - Use tools like the [CLR memory profiler][3] to figure out where memory is being allocated. There are loads of tutorials out there on how to use this tool.&#xD;&#xA; - When you know where your allocating during gameplay, see if you can use tricks like pooling objects to lower that allocation count.&#xD;&#xA; - If all else fails, make your collections run faster! The GC on the compact framework follows evey reference in your code to figure out what objects are not in use anymore. Refactor your code use less references!&#xD;&#xA; - Remember to use IDisposable on classes that contain unmanaged resources. You can use these to clean up memory the GC cannot free up itself.&#xD;&#xA;&#xD;&#xA;The other thing to think about is floating point performance. While the .net JITer does a fair amount of processor specific optimisations, cannot use SSE or any other SIMD instruction sets to speed up your floating point maths. This can cause quite a big speed difference between C++ and C# for games. If your using mono, they have some special SIMD maths libraries you can take advantage of.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx&#xD;&#xA;  [2]: http://www.musictomakegamesby.com/2010/04/01/xnac-avoiding-garbage-when-working-with-stringbuilder/&#xD;&#xA;  [3]: http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&amp;DisplayLang=en" />
  <row Id="561" PostHistoryTypeId="2" PostId="313" RevisionGUID="d4b8248b-0a3c-4fd3-9463-eb68a3392cc9" CreationDate="2010-07-14T23:49:27.120" UserId="204" Text="If (for the purpose of collision detection) 3D objects are represented in a game by spheres, what is a good algorithm to detect a collision between spheres? &#xD;&#xA;&#xD;&#xA;If each object has a position as of the last frame and a new (desired) position, what is a good algorithm that will identify collisions where the spheres didn't intersect in the previous frame, and they may not intersect in the second frame, but they did intersect somewhere in between?" />
  <row Id="562" PostHistoryTypeId="1" PostId="313" RevisionGUID="d4b8248b-0a3c-4fd3-9463-eb68a3392cc9" CreationDate="2010-07-14T23:49:27.120" UserId="204" Text="What is a good algorithm to detect collision between moving spheres?" />
  <row Id="563" PostHistoryTypeId="3" PostId="313" RevisionGUID="d4b8248b-0a3c-4fd3-9463-eb68a3392cc9" CreationDate="2010-07-14T23:49:27.120" UserId="204" Text="&lt;collision-detection&gt;" />
  <row Id="564" PostHistoryTypeId="2" PostId="314" RevisionGUID="000bfd4c-e6f5-4a18-a5de-fe845532b938" CreationDate="2010-07-14T23:51:06.273" UserId="140" Text="**Tile Studio**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Site: [http://tilestudio.sourceforge.net/][1]&#xD;&#xA;&#xD;&#xA;2D Tile Mapping tool&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;Free, Open Source&#xD;&#xA;&#xD;&#xA;Lets you import a texture map, create tiles and assemble levels from them, then export code blocks in the language you develop in. A very useful tool for tile-based game development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tilestudio.sourceforge.net/" />
  <row Id="565" PostHistoryTypeId="16" PostId="314" RevisionGUID="000bfd4c-e6f5-4a18-a5de-fe845532b938" CreationDate="2010-07-14T23:51:06.273" UserId="-1" />
  <row Id="566" PostHistoryTypeId="2" PostId="315" RevisionGUID="566e66c3-66df-46f0-bde4-18fca91196a1" CreationDate="2010-07-14T23:56:39.867" UserId="19" Text="Toon Boom Animate&#xD;&#xA;&#xD;&#xA;http://www.toonboom.com/main/&#xD;&#xA;&#xD;&#xA;2D Animation&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;700$ (frequent actions which bring price to 499$)&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Great (and i mean great!) 2D animation package." />
  <row Id="567" PostHistoryTypeId="16" PostId="315" RevisionGUID="566e66c3-66df-46f0-bde4-18fca91196a1" CreationDate="2010-07-14T23:56:39.867" UserId="-1" />
  <row Id="568" PostHistoryTypeId="2" PostId="316" RevisionGUID="6d1d1194-def0-462d-920d-1609eacd476b" CreationDate="2010-07-14T23:58:29.487" UserId="51" Text="Basically you're looking for a trace.&#xD;&#xA;&#xD;&#xA;This page will probably help you:  http://www.realtimerendering.com/intersections.html&#xD;&#xA;&#xD;&#xA;&gt; Moving Sphere/Sphere: (location) Add the radius of the moving sphere to the static sphere, and treat the moving sphere as a ray. Use this ray to perform ray/sphere intersection. See Gomez; Schroeder for code (article has bug in derivation, code is fine); and RTR2, p. 622.&#xD;&#xA;" />
  <row Id="569" PostHistoryTypeId="5" PostId="232" RevisionGUID="ff3f5518-f01c-47fa-9366-f8d54b31598d" CreationDate="2010-07-14T23:59:49.360" UserId="19" Comment="added 183 characters in body" Text=" - [Unity Documentation][1]&#xD;&#xA; - [Learn Unity 3D][2]&#xD;&#xA; - [Jason 3D Buzz unity videos][3]&#xD;&#xA; - [Introduction to Game Development Using Unity 3D][4] (Commercial video tutorial)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/&#xD;&#xA;  [2]: http://learnunity3d.com/&#xD;&#xA;  [3]: http://forum.unity3d.com/viewtopic.php?t=39327&#xD;&#xA;  [4]: http://www.vtc.com/products/introduction-to-game-development-using-unity-3d-tutorials.htm" />
  <row Id="570" PostHistoryTypeId="2" PostId="317" RevisionGUID="c447885b-7e47-437f-a7f8-bc5a44f9a73b" CreationDate="2010-07-15T00:02:43.160" UserId="18" Text="Use a sweep test as demonstrated in [this](http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php?page=2) Gamasutra article. " />
  <row Id="571" PostHistoryTypeId="2" PostId="318" RevisionGUID="f6540b94-b860-4be0-b7db-d56a50bdf017" CreationDate="2010-07-15T00:11:49.163" UserId="214" Text="I'm looking for a physics engine to use in an XNA project (2D or 3D). Because it's for XNA, it needs to fulfill some requirements:&#xD;&#xA;&#xD;&#xA;1. Not necessarily free, but close to it is obviously preferred&#xD;&#xA;2. Managed code only (or it won't run on the 360)&#xD;&#xA;&#xD;&#xA;For 3D I know of&#xD;&#xA;- [BulletX][1] (It works, and I'm using it now, but it's not active and could use more work)&#xD;&#xA;&#xD;&#xA;For 2D I know of &#xD;&#xA;- [Farseer][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnadevru.codeplex.com/wikipage?title=Managed%20Bullet%20Physics%20Library&amp;ProjectName=xnadevru&#xD;&#xA;  [2]: http://farseerphysics.codeplex.com/" />
  <row Id="572" PostHistoryTypeId="1" PostId="318" RevisionGUID="f6540b94-b860-4be0-b7db-d56a50bdf017" CreationDate="2010-07-15T00:11:49.163" UserId="214" Text="What are some known 2D/3D physics engines for XNA?" />
  <row Id="573" PostHistoryTypeId="3" PostId="318" RevisionGUID="f6540b94-b860-4be0-b7db-d56a50bdf017" CreationDate="2010-07-15T00:11:49.163" UserId="214" Text="&lt;c#&gt;&lt;xna&gt;&lt;physics-engine&gt;" />
  <row Id="574" PostHistoryTypeId="2" PostId="319" RevisionGUID="9453ecbf-b4ac-46a5-b366-ee7c1d1634af" CreationDate="2010-07-15T00:13:50.160" UserId="18" Text="[Box2D.XNA](http://box2dxna.codeplex.com/) is an XNA port of the popular [Box2D physics engine](http://www.box2d.org/)." />
  <row Id="575" PostHistoryTypeId="16" PostId="319" RevisionGUID="9453ecbf-b4ac-46a5-b366-ee7c1d1634af" CreationDate="2010-07-15T00:13:50.160" UserId="18" />
  <row Id="576" PostHistoryTypeId="2" PostId="320" RevisionGUID="2006bf17-5200-4ede-8700-0f372738709f" CreationDate="2010-07-15T00:14:32.047" UserId="10" Text="There is a Box2D C# version called [Box2DX][1]. Since it's free and I know Box2D is good, it is probably worth it to check out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/box2dx/" />
  <row Id="577" PostHistoryTypeId="2" PostId="321" RevisionGUID="dd5e8c4a-316d-4662-8e1b-1670c5263543" CreationDate="2010-07-15T00:15:48.453" UserId="188" Text="I've used [Farseer][1] for XNA and it worked great. Comes with lots of example code as well so you can see it in action and has pretty good documentation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com/" />
  <row Id="578" PostHistoryTypeId="16" PostId="318" RevisionGUID="f6540b94-b860-4be0-b7db-d56a50bdf017" CreationDate="2010-07-15T00:16:44.943" UserId="214" />
  <row Id="579" PostHistoryTypeId="2" PostId="322" RevisionGUID="9622e793-15b0-43fb-8883-919685a591a1" CreationDate="2010-07-15T00:21:14.980" UserId="214" Text="I am familiar with how the common ones technically work (BFS, DFS, Dijkstra, A*) but as far as their realistic benefits I don't quite see the need for them. Considering that, given the right heuristics, A* is more performant then why bother with any others?" />
  <row Id="580" PostHistoryTypeId="1" PostId="322" RevisionGUID="9622e793-15b0-43fb-8883-919685a591a1" CreationDate="2010-07-15T00:21:14.980" UserId="214" Text="In what instances would you want to use path-finding algorithms other than A*?" />
  <row Id="581" PostHistoryTypeId="3" PostId="322" RevisionGUID="9622e793-15b0-43fb-8883-919685a591a1" CreationDate="2010-07-15T00:21:14.980" UserId="214" Text="&lt;path-finding&gt;&lt;algorithm&gt;&lt;graphs&gt;&lt;search&gt;" />
  <row Id="582" PostHistoryTypeId="2" PostId="323" RevisionGUID="cff49c22-b43d-42c9-9097-e633b869abea" CreationDate="2010-07-15T00:23:15.227" UserId="120" Text="2D&#xD;&#xA;&#xD;&#xA; - [Farseer][1] is based on box2d but has lot of its own improvements and innovations.&#xD;&#xA; - [Box2Dx][2] &amp; [Box2D.Xna][3] are both ports of box 2D&#xD;&#xA; - i think theres a port of chipmunk physics out there, but i cant find the link&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA; - [JigLib][5] one of the earliest 3d physics engines for xna, been used quite a bit&#xD;&#xA; - [Jitter][4] Quite a new engine, but more per formant than JigLib&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [2]: http://code.google.com/p/box2dx/&#xD;&#xA;  [3]: http://box2dxna.codeplex.com/&#xD;&#xA;  [4]: http://www.jitter-physics.com/&#xD;&#xA;  [5]: http://jiglibx.codeplex.com/" />
  <row Id="583" PostHistoryTypeId="16" PostId="323" RevisionGUID="cff49c22-b43d-42c9-9097-e633b869abea" CreationDate="2010-07-15T00:23:15.227" UserId="-1" />
  <row Id="584" PostHistoryTypeId="2" PostId="324" RevisionGUID="fa47b132-8cfb-486a-b8c8-ac4dcdc7ede4" CreationDate="2010-07-15T00:25:27.327" UserId="10" Text="I'm not very familiar with many of them but I have seen the usage of Dijkstra's algorithm not for pathfinding but for finding the nearest X to you. For example, what powerup is closest to you or what enemy is closest to you out of a group of enemies. So a &quot;target nearest enemy&quot; function often uses that." />
  <row Id="585" PostHistoryTypeId="5" PostId="226" RevisionGUID="e058b268-1f87-4ee8-8b5e-afe0ec3e6a80" CreationDate="2010-07-15T00:25:27.653" UserId="120" Comment="deleted 1 characters in body" Text="Graphics/Sound&#xD;&#xA;&#xD;&#xA; - [XNA][1]  High level wrapper on DirectX9. Allows you to get up and running quickly. Supports PC, Xbox360 and windows phone 7. Support Xact audio aswell as its own SoundEffect API.&#xD;&#xA; - [SlimDX][2] Lower level wrapper on DX9/10/11. If its in the DX SDK, its wrapped here.&#xD;&#xA; - [OpenTK][3] Wrapper on OpenGL/AL.&#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [TorqueX][4] A 2D/3D engine for XNA. Good editor suppport, garage games have recently reinvested in the engine after a period of neglect.&#xD;&#xA; - [truevision 3d][5] C++ game engine with c# bindings&#xD;&#xA; - [Axiom][6] A rewrite of Ogre in c#. Supports numerous backed rendering APIs.&#xD;&#xA;&#xD;&#xA;Physics&#xD;&#xA;&#xD;&#xA;- [Farseer][7] A popular 2D physics engine, supports .net(desktop), compact(xbox) and micro(silverlight).&#xD;&#xA;- [Jitter][8] a realitivly new 3D physics engine, Much better than its completion.&#xD;&#xA;- [Box2Dx][9] A dirct port of box2D&#xD;&#xA;- [JigLib][10]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com&#xD;&#xA;  [2]: http://slimdx.org&#xD;&#xA;  [3]: http://www.opentk.com/&#xD;&#xA;  [4]: http://www.torquepowered.com/products/torquex-3d&#xD;&#xA;  [5]: http://www.truevision3d.com/&#xD;&#xA;  [6]: http://axiom3d.net/&#xD;&#xA;  [7]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [8]: http://www.jitter-physics.com/&#xD;&#xA;  [9]: http://code.google.com/p/box2dx&#xD;&#xA;  [10]: http://jiglibx.codeplex.com/" />
  <row Id="586" PostHistoryTypeId="2" PostId="325" RevisionGUID="eed4e401-0149-4d9d-9a36-0b3149a15c4f" CreationDate="2010-07-15T00:29:38.397" UserId="195" Text="I've been playing with writing flash games in my spare time, but up to this point, I've just been using a trial version of Adobe Flash Professional. I'm aware of [FlashDevelop][1], but their documentation is basically [non-existent when it comes to the workflow of developing purely with FlashDevelop][2].&#xD;&#xA;&#xD;&#xA;Does anyone know of any good tutorials for developing Flash games purely with FlashDevelop?&#xD;&#xA;&#xD;&#xA;Alternatively, does anyone have any other free/cheap software recommendations to use in place of Flash Professional?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page&#xD;&#xA;  [2]: http://www.flashdevelop.org/wikidocs/index.php?title=AS3#Workflows" />
  <row Id="587" PostHistoryTypeId="1" PostId="325" RevisionGUID="eed4e401-0149-4d9d-9a36-0b3149a15c4f" CreationDate="2010-07-15T00:29:38.397" UserId="195" Text="How can I develop Flash games without expensive software?" />
  <row Id="588" PostHistoryTypeId="3" PostId="325" RevisionGUID="eed4e401-0149-4d9d-9a36-0b3149a15c4f" CreationDate="2010-07-15T00:29:38.397" UserId="195" Text="&lt;flash&gt;&lt;tools&gt;&lt;actionscript-3&gt;&lt;flash-develop&gt;&lt;flash-professional&gt;" />
  <row Id="589" PostHistoryTypeId="2" PostId="326" RevisionGUID="d6a4d6ec-edb6-4d95-81ff-3b574375fb04" CreationDate="2010-07-15T00:32:45.253" UserId="10" Text="[Here is an article][1] about setting up the environment for FlashDevelop so you are purely working with it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.devmag.org.za/articles/27-FLASH-FOR-FREE" />
  <row Id="590" PostHistoryTypeId="2" PostId="327" RevisionGUID="536adf42-192f-4c55-97c6-d1fae1144fe6" CreationDate="2010-07-15T00:33:37.467" UserId="214" Text="I recall some time ago that procedurally generated textures were becoming a big deal that a lot of people/companies were really interested in with some serious benefits (smaller deployments, potentially faster loading, higher quality, scalable textures, potentially cheaper to produce, etc.).&#xD;&#xA;&#xD;&#xA;From what I can tell, the buzz is dead and no games on my radar are using them. What happened?&#xD;&#xA;&#xD;&#xA;I was hoping I'd see procedural textures go the way that NaturalMotion's stuff has (slow but steady adoption)." />
  <row Id="591" PostHistoryTypeId="1" PostId="327" RevisionGUID="536adf42-192f-4c55-97c6-d1fae1144fe6" CreationDate="2010-07-15T00:33:37.467" UserId="214" Text="What happened to procedurally generated textures?" />
  <row Id="592" PostHistoryTypeId="3" PostId="327" RevisionGUID="536adf42-192f-4c55-97c6-d1fae1144fe6" CreationDate="2010-07-15T00:33:37.467" UserId="214" Text="&lt;procedural&gt;&lt;textures&gt;&lt;generated&gt;" />
  <row Id="593" PostHistoryTypeId="2" PostId="328" RevisionGUID="3d4650a2-f956-4898-b1c2-0e1befd64d3b" CreationDate="2010-07-15T00:34:30.180" UserId="19" Text="If you're looking for free, you can take a look at [haXe][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://haxe.org/" />
  <row Id="594" PostHistoryTypeId="2" PostId="329" RevisionGUID="edf7c1d7-9653-456c-b660-b076d72288cb" CreationDate="2010-07-15T00:35:28.117" UserId="97" Text="What you are really listing are, rather, graph search algorithms, which are a part of Graph Theory.  A* happens to be one which is optimized for &quot;pathfinding&quot; applications.&#xD;&#xA;&#xD;&#xA;Why bother?  Those algorithms are good for much, much more than simple pathfinding.  In fact, there is an entire branch of mathematics devoted to studying graph theory and its properties.&#xD;&#xA;&#xD;&#xA;BFS and DFS, in particular, are one of the most basic and powerful tools of graph theory application." />
  <row Id="595" PostHistoryTypeId="2" PostId="330" RevisionGUID="04ae2d65-a931-4ad5-8972-a8577d6259c4" CreationDate="2010-07-15T00:39:18.267" UserId="10" Text="Basically, the big guns aren't supporting it, so it's not being used much. There have been cool things (albeit a little old), like [.kkrieger][1] but the loading time on that (back in the day) was reaaaaally slow, since it had to generate all the textures at loading time.&#xD;&#xA;&#xD;&#xA;We might see something or other in next generation engines (Unreal 4 etc) but I don't think that the gain vs development is big enough.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/.kkrieger" />
  <row Id="596" PostHistoryTypeId="2" PostId="331" RevisionGUID="08843cf3-6967-4bee-b46c-e01bd9b791fa" CreationDate="2010-07-15T00:40:22.273" UserId="154" Text="The size and scale of the project documentation completely depends on the size of team and the scope of the project.&#xD;&#xA;&#xD;&#xA;Typically large games aren't built off monolithic design documents, but a distributed document system. Either a series of smaller targeted docs or a wiki. Personally I prefer the wiki approach as allows readers to quickly jump between related topics which maps well to system designs which are often integrated.&#xD;&#xA;&#xD;&#xA;When using a Wiki there are a few guidelines that can help with:&#xD;&#xA;&#xD;&#xA; - One Wiki Page per system/character/level/...&#xD;&#xA; - Keep the Wiki highly organized and structured, each content type should have a defined template. You need at least one WikiNazi to keep the site clean. &#xD;&#xA; - Describe the design briefly and with bullet points, a design document is not the place for narrative text&#xD;&#xA; - Keep pages short and focused, the goal being no longer than 1-2x screen height. &#xD;&#xA; - Pictures are indeed worth 1000 words, use diagrams to help get your point across.&#xD;&#xA;" />
  <row Id="597" PostHistoryTypeId="2" PostId="332" RevisionGUID="314ce2aa-de6b-4813-baf9-90f5b8a69f82" CreationDate="2010-07-15T00:45:02.920" UserId="217" Text="This is a hot topic in game development.  I personally don't recommend it, except perhaps for EASTL as mentioned above.  I have two main problems with STL (technically &quot;The C++ Standard Library&quot;, as STL is no longer the name) in games.  1) Dynamic memory allocation often wastes a lot of runtime in games when STL is used.  2) Use of STL encourages an array-of-structs approach to game architecture, whereas a struct-of-arrays approach is much more cache friendly.&#xD;&#xA;" />
  <row Id="598" PostHistoryTypeId="5" PostId="330" RevisionGUID="6c2dba5a-d0c5-43c3-a849-d79160cfd698" CreationDate="2010-07-15T00:46:25.723" UserId="10" Comment="added 149 characters in body" Text="Basically, the big guns aren't supporting it, so it's not being used much. There have been cool things (albeit a little old), like [.kkrieger][1] but the loading time on that (back in the day) was reaaaaally slow, since it had to generate all the textures at loading time.&#xD;&#xA;&#xD;&#xA;We might see something or other in next generation engines (Unreal 4 etc) but I don't think that the gain vs development is big enough.&#xD;&#xA;&#xD;&#xA;There are examples out there in the AAA world, for example Spore has procedurally generated textures and animation for the creatures you created.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/.kkrieger" />
  <row Id="599" PostHistoryTypeId="2" PostId="333" RevisionGUID="1ffbe3a8-bd52-4d94-9d8b-0e20eb817bf3" CreationDate="2010-07-15T00:47:59.763" UserId="154" Text="Content creation tools for procedural texturing have been the biggest roadblock. Artist are very fast putting things together in Photoshop and the potential gains with procedural texturing haven't outweighed the increased content creation time.&#xD;&#xA;&#xD;&#xA;Allegorithmic ([http://www.allegorithmic.com/][1]) has some interesting tools they've developed to try and make procedural options more user friendly. Haven't played with them enough to really comment on their usability though.&#xD;&#xA;&#xD;&#xA;[1]: http://www.allegorithmic.com/" />
  <row Id="600" PostHistoryTypeId="2" PostId="334" RevisionGUID="6c7aa948-7ce6-444b-8aac-baad04b8fe72" CreationDate="2010-07-15T00:55:00.153" UserId="195" Text="I'm looking at hosting my flash game on a site like Kongregate or NewGrounds, but with so many choices, I'm left wondering what are the pros &amp; cons of the various options?&#xD;&#xA;&#xD;&#xA;I'm interested in:&#xD;&#xA;&#xD;&#xA; - Reaching the biggest audience&#xD;&#xA; - Making some money (eg. I know that Kongregate shares ad revenue)&#xD;&#xA; - Other features/benefits of the site (eg integration APIs for high scores, micro payments, etc)" />
  <row Id="601" PostHistoryTypeId="1" PostId="334" RevisionGUID="6c7aa948-7ce6-444b-8aac-baad04b8fe72" CreationDate="2010-07-15T00:55:00.153" UserId="195" Text="Where should I host my flash games?" />
  <row Id="602" PostHistoryTypeId="3" PostId="334" RevisionGUID="6c7aa948-7ce6-444b-8aac-baad04b8fe72" CreationDate="2010-07-15T00:55:00.153" UserId="195" Text="&lt;flash&gt;&lt;monetization&gt;&lt;hosting&gt;&lt;publishing&gt;&lt;release&gt;" />
  <row Id="603" PostHistoryTypeId="6" PostId="302" RevisionGUID="e8dd0594-3481-4bc2-bb20-96c53626ece3" CreationDate="2010-07-15T00:56:17.903" UserId="58" Comment="edited tags" Text="&lt;iphone&gt;&lt;textures&gt;&lt;objective-c&gt;&lt;sprites&gt;" />
  <row Id="604" PostHistoryTypeId="2" PostId="335" RevisionGUID="6e214e85-871e-4824-82f4-52c429c33c78" CreationDate="2010-07-15T01:00:48.817" UserId="195" Text="Has anyone come across a software package that allows you to build animations in a similar way to how you can in Flash (i.e. using techniques such as tweens &amp; bones &amp; easings, etc) and then have the result exported as a sprite sheet?" />
  <row Id="605" PostHistoryTypeId="1" PostId="335" RevisionGUID="6e214e85-871e-4824-82f4-52c429c33c78" CreationDate="2010-07-15T01:00:48.817" UserId="195" Text="What is a good tool for producing animated sprites?" />
  <row Id="606" PostHistoryTypeId="3" PostId="335" RevisionGUID="6e214e85-871e-4824-82f4-52c429c33c78" CreationDate="2010-07-15T01:00:48.817" UserId="195" Text="&lt;tools&gt;&lt;sprites&gt;&lt;animation&gt;" />
  <row Id="607" PostHistoryTypeId="2" PostId="336" RevisionGUID="a8cff53a-65a3-45d6-8703-a0fdcdabd6a8" CreationDate="2010-07-15T01:04:40.120" UserId="222" Text="I've been trying to work on a game with the look of an 8-bit game using XNA, specifically using the NES as a guide.&#xD;&#xA;&#xD;&#xA;The NES has a very specific palette and each sprite can use up to 4 colors from that palette. How could I emulate this? The current way I accomplish this is I have a texture with defined values which act as indexes to an array of colors I pass to the GPU. I imagine there must be a better way than this, but maybe this is the best way?&#xD;&#xA;&#xD;&#xA;I don't want to simply make sure I draw every sprite with the right colors because I want to be able to dynamically alter the palette. I'd also prefer not to alter the texture directly using the CPU." />
  <row Id="608" PostHistoryTypeId="1" PostId="336" RevisionGUID="a8cff53a-65a3-45d6-8703-a0fdcdabd6a8" CreationDate="2010-07-15T01:04:40.120" UserId="222" Text="What is a good method for coloring textures based on a palette in XNA?" />
  <row Id="609" PostHistoryTypeId="3" PostId="336" RevisionGUID="a8cff53a-65a3-45d6-8703-a0fdcdabd6a8" CreationDate="2010-07-15T01:04:40.120" UserId="222" Text="&lt;xna&gt;&lt;textures&gt;&lt;palette&gt;" />
  <row Id="610" PostHistoryTypeId="2" PostId="337" RevisionGUID="07bcc908-cc7f-44c7-8106-bf4c953a0d6a" CreationDate="2010-07-15T01:16:32.747" UserId="160" Text="I'm not an expert, but I can see [Floyd-Warshall](http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm) being better in some situations where you can afford to just precalculate *all* best paths up front and then reuse them." />
  <row Id="611" PostHistoryTypeId="2" PostId="338" RevisionGUID="057ec03d-5457-4240-abf6-4bfba8bca40e" CreationDate="2010-07-15T01:24:31.247" UserId="10" Text="Would it be to slow to create a composite class that can contain up to 4 objects that are one of each color for the sprite and combine that into the sprite that gets drawn. So each sprite is a composite of up to 4 sprites combined and then drawn.&#xD;&#xA;&#xD;&#xA;Then you could change 1 color via that class and the entire sprite would change.&#xD;&#xA;&#xD;&#xA;(note, I haven't done XNA but this might spark some ideas with you.)" />
  <row Id="612" PostHistoryTypeId="2" PostId="339" RevisionGUID="6017dfb2-49f3-4cce-a82d-38846ae61d86" CreationDate="2010-07-15T01:30:38.720" UserId="226" Text="When I took my Java courses a year ago, I was told that Java is used mostly in the overseas gaming companies while C++ is used here in the US. What languages should I focus on learning in-depth?" />
  <row Id="613" PostHistoryTypeId="1" PostId="339" RevisionGUID="6017dfb2-49f3-4cce-a82d-38846ae61d86" CreationDate="2010-07-15T01:30:38.720" UserId="226" Text="What are the most commonly used programming languages?" />
  <row Id="614" PostHistoryTypeId="3" PostId="339" RevisionGUID="6017dfb2-49f3-4cce-a82d-38846ae61d86" CreationDate="2010-07-15T01:30:38.720" UserId="226" Text="&lt;c++&gt;&lt;java&gt;&lt;languages&gt;&lt;coding&gt;&lt;companies&gt;" />
  <row Id="615" PostHistoryTypeId="2" PostId="340" RevisionGUID="986a6f8a-0263-4288-b985-ab4e5160e9ec" CreationDate="2010-07-15T01:34:03.827" UserId="225" Text="Not exactly what you asked but [Unity][1] is a game engine that supports scripting in c#&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/features/scripting" />
  <row Id="616" PostHistoryTypeId="2" PostId="341" RevisionGUID="9b1504cb-5856-4cda-b916-dd34e2e16906" CreationDate="2010-07-15T01:35:30.703" UserId="10" Text="C++ is fairly prominent in the current gaming market. Thought C is still widely used.&#xD;&#xA;&#xD;&#xA;When making games, your main focus should not be language but the end product. Never start a project thinking &quot;How can we make this in language X?&quot; but &quot;How can we make this in the best way possible?&quot;" />
  <row Id="617" PostHistoryTypeId="2" PostId="342" RevisionGUID="55451e1f-737e-4095-ab91-6f66ee48fe9c" CreationDate="2010-07-15T01:38:05.330" UserId="211" Text="The STL is a good fit for your game if the STL is a good fit for your game.&#xD;&#xA;&#xD;&#xA;As with all technology choices made during development, you need to weigh up the pros and cons -- will rolling my own library give me more beneficial memory usage, performance, and productivity than simply using the STL? Possibly; though it's just as easy to create a `vector` implementation that uses more memory, is slower, and requires large amounts of maintenance to remain function compared to what already exists.&#xD;&#xA;&#xD;&#xA;People should not avoid using the STL in their games because other people avoid using the STL in games; they should avoid using it if they've weighed up all of their options and they *genuinely believe* that another implementation will improve the quality of their product." />
  <row Id="618" PostHistoryTypeId="2" PostId="343" RevisionGUID="9b254ee0-4410-485e-96d3-5bd2c8aaae3b" CreationDate="2010-07-15T01:39:31.083" UserId="204" Text="Back when I worked in professional game development, STL was too immature and bloated. But that was &gt;10 years ago.&#xD;&#xA;&#xD;&#xA;Now I work in military simulation, which has even tougher performance requirements (like the framerate can never go below some FPS). In military simulation STL is used all over the place. &#xD;&#xA;&#xD;&#xA;Some of the people who tell you not to use STL use the argument that it's not always the perfect or even the best solution to the problem. But that isn't an answer to the question. The question should be: Is there something inherently wrong with using STL in games? I'd say no, STL is most of the time a better implementation than what a user would come up with on their own. &#xD;&#xA;&#xD;&#xA;Just make sure you know how to use the STL, and use it in your game. Read some books and look at the implementation code in the STL you are using." />
  <row Id="619" PostHistoryTypeId="2" PostId="344" RevisionGUID="1b9a78e0-2083-4488-922a-3748ac422904" CreationDate="2010-07-15T01:41:06.603" UserId="165" Text="The *ultimate* source is the [**TIOBE Index**][1]. Granted it won't tell you what each language is being used for...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html" />
  <row Id="620" PostHistoryTypeId="2" PostId="345" RevisionGUID="48ad42bf-1da2-4d28-9cb5-ca90fb9fd911" CreationDate="2010-07-15T01:52:07.497" UserId="73" Text="In the Flash world, one size certainly does not fit all. That's the point, for reaching the biggest audience you should publish it on every site you can. You are &#xD;&#xA;&#xD;&#xA;The best way, I've found, to go is trying to sell your game for the best price on a site like [FlashGameLicense][1]. If that doesn't suits your needs or works for you, it's time to go crazy on publishing it. How?&#xD;&#xA;&#xD;&#xA;- Add MochiMedia to your game.&#xD;&#xA;- Make a list of the sites you want to publish it on.&#xD;&#xA;- Evaluate the best bet (make it exclusive to one site or not).&#xD;&#xA;&#xD;&#xA;In case you choose not to make it exclusive:&#xD;&#xA;&#xD;&#xA;- Block MochiMedia ads for sites that already have deals with it or any other ad system.&#xD;&#xA;- Submit your game to those sites.&#xD;&#xA;- Recommend it to family and friends through social networks.&#xD;&#xA;&#xD;&#xA;Finally, a list of sites where you can publish it (not the ultimate list, but I think will suffice):&#xD;&#xA;&#xD;&#xA;- [Kongregate][2].&#xD;&#xA;- [Newgrounds][3].&#xD;&#xA;- [Armor Games][4].&#xD;&#xA;- [Addicting Games][5].&#xD;&#xA;- [Game Jolt][6].&#xD;&#xA;- [Big Fish Games][7].&#xD;&#xA;- [Shockwave][8].&#xD;&#xA;- [Bubble Box][9].&#xD;&#xA;- [Miniclip][10].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flashgamelicense.com/&#xD;&#xA;  [2]: http://www.kongregate.com/&#xD;&#xA;  [3]: http://www.newgrounds.com/&#xD;&#xA;  [4]: http://armorgames.com/&#xD;&#xA;  [5]: http://www.addictinggames.com&#xD;&#xA;  [6]: http://gamejolt.com/&#xD;&#xA;  [7]: http://www.bigfishgames.com/&#xD;&#xA;  [8]: http://www.shockwave.com/&#xD;&#xA;  [9]: http://www.bubblebox.com/&#xD;&#xA;  [10]: http://www.miniclip.com/" />
  <row Id="621" PostHistoryTypeId="2" PostId="346" RevisionGUID="13e86f07-f95f-4aa1-8ae8-63dc1b1abd7f" CreationDate="2010-07-15T02:14:08.990" UserId="160" Text="C++ is the lingua franca of the console game industry. C# is used pretty heavily for tools and pipelines." />
  <row Id="622" PostHistoryTypeId="2" PostId="347" RevisionGUID="f7119f6b-eb5e-4171-a1c7-30777ee86296" CreationDate="2010-07-15T02:23:00.760" UserId="51" Text="There's a giant community wiki of tutorials and resources on Unity's answer's site:&#xD;&#xA;&#xD;&#xA;http://answers.unity3d.com/questions/4897/how-can-i-start-learning-unity-fast-list-of-tutorials/7235#7235&#xD;&#xA;&#xD;&#xA;" />
  <row Id="623" PostHistoryTypeId="2" PostId="348" RevisionGUID="6ddc83bd-7593-422b-8b74-2e100ac82d6b" CreationDate="2010-07-15T02:34:37.863" UserId="140" Text="While those techniques work well for vector graphics, they don't translate well to pixel art. Sprites don't tend to handle rotation or scaling without distortion, so hand editing is essential.&#xD;&#xA;&#xD;&#xA;Two products worth looking into for spriting are Cosmigo's [ProMotion][1] and [GraphicsGale][2]. Onion skinning and other features are available. But if you want clean pixel art, automation isn't going to do the job. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cosmigo.com/promotion/index.php&#xD;&#xA;  [2]: http://www.humanbalance.net/gale/us/" />
  <row Id="624" PostHistoryTypeId="2" PostId="349" RevisionGUID="4dba3b31-ff25-43eb-a30f-9cee56ed34f1" CreationDate="2010-07-15T02:35:17.283" UserId="51" Text="The way we make our animated sprites is by rendering out frames from a 3D modeling program." />
  <row Id="625" PostHistoryTypeId="5" PostId="345" RevisionGUID="0bf79192-1c3b-402c-bea8-1b9908ac23e7" CreationDate="2010-07-15T02:39:36.120" UserId="73" Comment="typo" Text="In the Flash world, one size certainly does not fit all. That's the point, for reaching the biggest audience you should publish it on every site you can.&#xD;&#xA;&#xD;&#xA;The best way, I've found, to go is trying to sell your game for the best price on a site like [FlashGameLicense][1]. If that doesn't suits your needs or works for you, it's time to go crazy on publishing it. How?&#xD;&#xA;&#xD;&#xA;- Add MochiMedia to your game.&#xD;&#xA;- Make a list of the sites you want to publish it on.&#xD;&#xA;- Evaluate the best bet (make it exclusive to one site or not).&#xD;&#xA;&#xD;&#xA;In case you choose not to make it exclusive:&#xD;&#xA;&#xD;&#xA;- Block MochiMedia ads for sites that already have deals with it or any other ad system.&#xD;&#xA;- Submit your game to those sites.&#xD;&#xA;- Recommend it to family and friends through social networks.&#xD;&#xA;&#xD;&#xA;Finally, a list of sites where you can publish it (not the ultimate list, but I think will suffice):&#xD;&#xA;&#xD;&#xA;- [Kongregate][2].&#xD;&#xA;- [Newgrounds][3].&#xD;&#xA;- [Armor Games][4].&#xD;&#xA;- [Addicting Games][5].&#xD;&#xA;- [Game Jolt][6].&#xD;&#xA;- [Big Fish Games][7].&#xD;&#xA;- [Shockwave][8].&#xD;&#xA;- [Bubble Box][9].&#xD;&#xA;- [Miniclip][10].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flashgamelicense.com/&#xD;&#xA;  [2]: http://www.kongregate.com/&#xD;&#xA;  [3]: http://www.newgrounds.com/&#xD;&#xA;  [4]: http://armorgames.com/&#xD;&#xA;  [5]: http://www.addictinggames.com&#xD;&#xA;  [6]: http://gamejolt.com/&#xD;&#xA;  [7]: http://www.bigfishgames.com/&#xD;&#xA;  [8]: http://www.shockwave.com/&#xD;&#xA;  [9]: http://www.bubblebox.com/&#xD;&#xA;  [10]: http://www.miniclip.com/" />
  <row Id="626" PostHistoryTypeId="2" PostId="350" RevisionGUID="258d57bb-6295-419b-bd7f-0d703ff6a4fb" CreationDate="2010-07-15T02:42:42.057" UserId="51" Text="We've all come across bugs in the course of development of any major game when you're working on a feature and something just isn't quite right.  Some of these turn out to be quite amusing, but of course all obvious bugs like these should be fixed so the general public usually never sees them.&#xD;&#xA;&#xD;&#xA;What is your best story?" />
  <row Id="627" PostHistoryTypeId="1" PostId="350" RevisionGUID="258d57bb-6295-419b-bd7f-0d703ff6a4fb" CreationDate="2010-07-15T02:42:42.057" UserId="51" Text="What was the funniest development bug you've seen?" />
  <row Id="628" PostHistoryTypeId="3" PostId="350" RevisionGUID="258d57bb-6295-419b-bd7f-0d703ff6a4fb" CreationDate="2010-07-15T02:42:42.057" UserId="51" Text="&lt;subjective&gt;&lt;fun&gt;" />
  <row Id="629" PostHistoryTypeId="16" PostId="350" RevisionGUID="258d57bb-6295-419b-bd7f-0d703ff6a4fb" CreationDate="2010-07-15T02:42:42.057" UserId="51" />
  <row Id="630" PostHistoryTypeId="5" PostId="348" RevisionGUID="3d503dab-2d3f-47f9-a214-e23260747f38" CreationDate="2010-07-15T02:45:13.080" UserId="140" Comment="added 214 characters in body" Text="While those techniques work well for vector graphics, they don't translate well to pixel art. Sprites don't tend to handle rotation or scaling without distortion, so hand editing is essential.&#xD;&#xA;&#xD;&#xA;Two products worth looking into for spriting are Cosmigo's [ProMotion][1] and [GraphicsGale][2]. Onion skinning and other features are available. But if you want clean pixel art, automation isn't going to do the job. &#xD;&#xA;&#xD;&#xA;edit: Okay, my brain is tired. A cup of coffee later and I realize what you're looking for. You could try out [SynFig][3], which looks like it might be adaptable to your needs :) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cosmigo.com/promotion/index.php&#xD;&#xA;  [2]: http://www.humanbalance.net/gale/us/&#xD;&#xA;  [3]: http://www.synfig.org/" />
  <row Id="631" PostHistoryTypeId="2" PostId="351" RevisionGUID="bc04f1b2-07b3-43eb-8690-eb3807fc7059" CreationDate="2010-07-15T02:48:46.940" UserId="231" Text="I normally code my admittedly simple games by hand in either Assembly or C but I'm looking to go a little more high level. I also want to build more modern skills so I'm looking at UDK. What are the pro's and cons of it for indie 3D development. I plan to use graphics, control and physics from the engine so I'm wondering if I should also consider source engine or anything else?" />
  <row Id="632" PostHistoryTypeId="1" PostId="351" RevisionGUID="bc04f1b2-07b3-43eb-8690-eb3807fc7059" CreationDate="2010-07-15T02:48:46.940" UserId="231" Text="Pro's and Con's of Various 3D Game Engines" />
  <row Id="633" PostHistoryTypeId="3" PostId="351" RevisionGUID="bc04f1b2-07b3-43eb-8690-eb3807fc7059" CreationDate="2010-07-15T02:48:46.940" UserId="231" Text="&lt;3d&gt;&lt;udk&gt;" />
  <row Id="634" PostHistoryTypeId="2" PostId="352" RevisionGUID="51f7033b-f004-4929-966a-1d5ded441ba3" CreationDate="2010-07-15T02:56:57.967" UserId="231" Text="When attempting to implement an combat engine for a text based RPG (yes I've been making games for 20 years) I had some odd bug that would cause mobs to suddenly rise from the dead and attack many round after they where killed. I thought it was funny. I don't think I ever fixed it." />
  <row Id="635" PostHistoryTypeId="16" PostId="352" RevisionGUID="51f7033b-f004-4929-966a-1d5ded441ba3" CreationDate="2010-07-15T02:56:57.967" UserId="-1" />
  <row Id="639" PostHistoryTypeId="5" PostId="283" RevisionGUID="329c976c-f049-4b26-8b20-df106256bebd" CreationDate="2010-07-15T03:04:03.253" UserId="136" Comment="added 455 characters in body" Text="If an open source game's resources and source code appear to be governed by the same license, I would suggest you contact one of the project leads and verify that this is actually the case.  The LGPL, and other open source licenses, are generally intended to govern the use of source code.  Many open-source games adopt separate licenses for the source code and the content.  In such arrangements, the content is often distributed under one of the many [Creative Commons][1] licenses.  The CC licenses are relatively short and concise, outlining in plain English exactly how you may or may not reuse the content.  Most of the open source projects I have worked with have used CC licenses which allow you to reuse any content you like, as long as you attribute the original author(s).  To fulfill this stipulation, simply include the author(s) in your game's credits, along with a description of the borrowed content.  Note that some licenses include a *non-commercial* stipulation, which bars reuse or redistribution with any commercial product.  In such cases, you can still borrow content for freeware or open source projects.  However, if you use the content in an open-source project which you later decide to sell, you will (as I understand it) need to remove/replace that content in the version you sell.&#xD;&#xA;&#xD;&#xA;If the assets of an open source game are governed by an open source license, or a license such as the Creative Commons, you generally do not need to ask permission.  The only exception would be if you do not fully understand the terms of the license.  This shouldn't be the case with a CC license, but some open source licenses are more verbose and filled with legalese.  If your redistribution rights are unclear, it never hurts to ask the author(s).&#xD;&#xA;&#xD;&#xA;As to whether or not you *should* use open source game assets, I would say &quot;absolutely&quot;.  If you do not have the talent yourself (or on your team) to produce better assets yourself, using open source assets will enable you to deliver a better game whilst giving the original content author(s) greater exposure.&#xD;&#xA;&#xD;&#xA;  [1]: http://creativecommons.org/" />
  <row Id="640" PostHistoryTypeId="5" PostId="283" RevisionGUID="1c29ea5a-4fc8-4eff-985c-41bc02e644b0" CreationDate="2010-07-15T03:09:45.050" UserId="136" Comment="added 700 characters in body" Text="If an open source game's resources and source code appear to be governed by the same license, I would suggest you contact one of the project leads and verify that this is actually the case.  The LGPL, and other open source licenses, are generally intended to govern the use of source code.  Many open-source games adopt separate licenses for the source code and the content.  In such arrangements, the content is often distributed under one of the many [Creative Commons][1] licenses.  The CC licenses are relatively short and concise, outlining in plain English exactly how you may or may not reuse the content.  Most of the open source projects I have worked with have used CC licenses which allow you to reuse any content you like, as long as you attribute the original author(s).  To fulfill this stipulation, simply include the author(s) in your game's credits, along with a description of the borrowed content.  Note that some licenses include a *non-commercial* stipulation, which bars reuse or redistribution with any commercial product.  In such cases, you can still borrow content for freeware or open source projects.  However, if you use the content in an open-source project which you later decide to sell, you will (as I understand it) need to remove/replace that content in the version you sell.&#xD;&#xA;&#xD;&#xA;If the assets of an open source game are governed by an open source license, or a license such as the Creative Commons, you generally do not need to ask permission.  The only exception would be if you do not fully understand the terms of the license.  This shouldn't be the case with a CC license, but some open source licenses are more verbose and filled with legalese.  If your redistribution rights are unclear, it never hurts to ask the author(s).&#xD;&#xA;&#xD;&#xA;As to whether or not you *should* use open source game assets, I would say &quot;absolutely&quot;.  If you do not have the talent yourself (or on your team) to produce better assets yourself, using open source assets will enable you to deliver a better game whilst giving the original content author(s) greater exposure.&#xD;&#xA;&#xD;&#xA;One last note: if you find that a game's assets *are* licensed under a FOSS license, be wary of stipulations concerning the relationship between your game's license and the source game's license.  Some licenses only allow code and assets to be used in other projects that are governed *by the same license* or a similar license (i.e. both licenses are permissive or both licenses are reciprocal).  Be careful not to back yourself into a license that you're not completely comfortable using, all for the sake of using someone else's assets.  If you detect a possible license conflict, you can always ask the original author(s) for permission to redistribute the assets under a different license.  &#xD;&#xA;&#xD;&#xA;  [1]: http://creativecommons.org/" />
  <row Id="644" PostHistoryTypeId="2" PostId="355" RevisionGUID="e8f4b1cf-0bbe-4926-8ef6-229907b30827" CreationDate="2010-07-15T03:11:46.480" UserId="100" Text="Are there good free ebooks on game development? I don't care if they are theoretical or technology specific, I want to start reading one free book that worth it.&#xD;&#xA;" />
  <row Id="645" PostHistoryTypeId="1" PostId="355" RevisionGUID="e8f4b1cf-0bbe-4926-8ef6-229907b30827" CreationDate="2010-07-15T03:11:46.480" UserId="100" Text="Free ebooks about game development" />
  <row Id="646" PostHistoryTypeId="3" PostId="355" RevisionGUID="e8f4b1cf-0bbe-4926-8ef6-229907b30827" CreationDate="2010-07-15T03:11:46.480" UserId="100" Text="&lt;books&gt;" />
  <row Id="647" PostHistoryTypeId="2" PostId="356" RevisionGUID="32f86273-29ae-4f11-b594-6d3245fab5fe" CreationDate="2010-07-15T03:15:20.227" UserId="231" Text="Not a book but an online place to start possibly http://udn.epicgames.com/Three/DevelopmentKitHome.html&#xD;&#xA;" />
  <row Id="648" PostHistoryTypeId="2" PostId="357" RevisionGUID="2b5fd3fd-d2a3-4298-9f0f-c0d6ee6b109b" CreationDate="2010-07-15T03:29:39.017" UserDisplayName="avee" Text="UDK is a proven SDK, used in many AAA titles. But as with any other professional tools, it has a quite steep learning curve. The 25% royalty term in the Commercial Licensing is also kind of painful. We evaluated it when we were planning to build a game for presentation purposes in our company.&#xD;&#xA;&#xD;&#xA;There are other good alternatives : &#xD;&#xA;&#xD;&#xA; - [Unity][1], mature, cross-platform (Windows, Mac, Web, iPhone, iPad, and even Android), it also has a free version. I think this would suit your needs better, this is what we finally end up with.&#xD;&#xA; - [Torque Game Engine][2], IMHO not as polished as Unity, but worth a look.&#xD;&#xA;&#xD;&#xA;There is also another good, lower-level library that you might be interested to check out:&#xD;&#xA;&#xD;&#xA; - [Ogre3D][3], open-source 3D rendering engine. It is a mature, stable rendering engine that has a very large user base. We used it in our projects. It is easily integrated with OIS for input, has bindings for Newton, PhysX, ODE &amp; Bullet physics engines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com&#xD;&#xA;  [2]: http://www.torquepowered.com&#xD;&#xA;  [3]: http://www.ogre3d.org" />
  <row Id="649" PostHistoryTypeId="16" PostId="357" RevisionGUID="2b5fd3fd-d2a3-4298-9f0f-c0d6ee6b109b" CreationDate="2010-07-15T03:29:54.197" UserDisplayName="avee" />
  <row Id="650" PostHistoryTypeId="2" PostId="358" RevisionGUID="d75cc1bd-8935-4959-a811-6f532210c5a7" CreationDate="2010-07-15T03:32:44.883" UserId="136" Text="**One that you don't host yourself.**  If your game is open source, I recommend going with public VCS hosting for the added piece of mind that comes from knowing your house could burn down and your work would not be lost.  CodePlex, SourceForge, and Google Code are all fine choices.  Personally, I use CodePlex.  I can't speak to the others, but CodePlex natively supports Mercurial and Team Foundation Server (TFS).  They also provide Subversion support via a SVN&lt;-&gt;TFS bridge; in other words, if you use their TFS hosting option, you can use any SVN client instead of a TFS client.&#xD;&#xA;&#xD;&#xA;Personally, I would recommend Mercurial, for the many reasons others have listed here.  It also gives you a fallback measure should the host's (i.e. CodePlex's) servers ever get hit by a meteor: you will still have your local Mercurial repository and history.  However, I am still using TFS and have had a great experience with it.  While not a distributed VCS, TFS does have a nifty feature called 'shelf sets', which enables you to push sets of changes to the server without actually checking them in.  This gives you a means of &quot;backing up&quot; unfinished work without actually committing it, or sharing unfinished work with other team members (shelve sets are shareable)." />
  <row Id="651" PostHistoryTypeId="5" PostId="358" RevisionGUID="12f1dc90-00f4-4f87-8e8b-d48f9f40ff02" CreationDate="2010-07-15T03:39:16.943" UserId="136" Comment="added 124 characters in body; added 4 characters in body" Text="**One that you don't host yourself.**  If your game is open source, I recommend going with public VCS hosting for the added piece of mind that comes from knowing your house could burn down and your work would not be lost.  CodePlex, SourceForge, and Google Code are all fine choices.  Personally, I use CodePlex.  I can't speak to the others, but CodePlex natively supports Mercurial and Team Foundation Server (TFS).  They also provide Subversion support via a SVN&lt;-&gt;TFS bridge; in other words, if you use their TFS hosting option, you can use any SVN client instead of a TFS client.  If your game is *not* open source, you still might consider using a &quot;closed&quot; VCS hosting service to get the same security.&#xD;&#xA;&#xD;&#xA;Personally, I would recommend Mercurial, for the many reasons others have listed here.  It also gives you a fallback measure should the host's (i.e. CodePlex's) servers ever get hit by a meteor: you will still have your local Mercurial repository and history.  However, I am still using TFS and have had a great experience with it.  While not a distributed VCS, TFS does have a nifty feature called 'shelve sets', which enables you to push ('shelve') changes to the server without actually checking them in.  This gives you a means of &quot;backing up&quot; unfinished work without actually committing it, or sharing unfinished work with other team members (shelve sets are shareable)." />
  <row Id="652" PostHistoryTypeId="2" PostId="359" RevisionGUID="56f44f29-8f0f-4c63-92a6-c1f9a771402a" CreationDate="2010-07-15T03:40:46.490" UserDisplayName="avee" Text="**Pixelmator**&#xD;&#xA;&#xD;&#xA;http://www.pixelmator.com/&#xD;&#xA;&#xD;&#xA;2D Graphics&#xD;&#xA;&#xD;&#xA;Mac OS X only, the latest version only supports Snow Leopard&#xD;&#xA;&#xD;&#xA;$59&#xD;&#xA;&#xD;&#xA;Commercial with trial available&#xD;&#xA;&#xD;&#xA;Photoshop alternative with very nice UI." />
  <row Id="653" PostHistoryTypeId="16" PostId="359" RevisionGUID="56f44f29-8f0f-4c63-92a6-c1f9a771402a" CreationDate="2010-07-15T03:40:46.490" UserId="-1" />
  <row Id="654" PostHistoryTypeId="2" PostId="360" RevisionGUID="7b5822fc-0ece-48d4-87f3-0104c1efad78" CreationDate="2010-07-15T03:56:31.383" UserId="208" Text="I want to be able to release my game as open source, and I need to be able to distribute font files with my game. Where can I find fonts which I can use in this way, and what font licenses should I be looking for?&#xD;&#xA;&#xD;&#xA;Are there any further considerations if I want to release my game under GPL rather than a less restrictive open source license such as BSD?" />
  <row Id="655" PostHistoryTypeId="1" PostId="360" RevisionGUID="7b5822fc-0ece-48d4-87f3-0104c1efad78" CreationDate="2010-07-15T03:56:31.383" UserId="208" Text="Where can I find fonts which I can distribute with an open source game?" />
  <row Id="656" PostHistoryTypeId="3" PostId="360" RevisionGUID="7b5822fc-0ece-48d4-87f3-0104c1efad78" CreationDate="2010-07-15T03:56:31.383" UserId="208" Text="&lt;assets&gt;&lt;licensing&gt;&lt;fonts&gt;&lt;open-source&gt;" />
  <row Id="657" PostHistoryTypeId="2" PostId="361" RevisionGUID="93753dce-9f9f-40ac-b106-55edc6cec95f" CreationDate="2010-07-15T04:29:16.553" UserId="240" Text="[Here is a link][1] that you might find useful.&#xD;&#xA;&#xD;&#xA;Seriously, though -- what did you try?!  Maybe I don't understand your question, but it seems to me that the answer is all-over everywhere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lmgtfy.com/?q=open+source+fonts" />
  <row Id="658" PostHistoryTypeId="2" PostId="362" RevisionGUID="a70fd22f-86ff-4683-a94d-e872e5534927" CreationDate="2010-07-15T04:31:14.897" UserId="211" Text="Where I've worked, I have encountered Perforce, Subversion (with TortoiseSVN) and Git. I've been using Git only a fraction of the time I've worked with Perforce and Subversion, but for source control, I prefer it over the other two hands-down.&#xD;&#xA;&#xD;&#xA;Git has a steep learning curve, but it offers the most flexibility, especially with regard to working on parallel features collaboratively; I find Perforce and Subversion's branching capabilities to be lacking.&#xD;&#xA;&#xD;&#xA;What Git isn't good at is asset storage. Both Perforce and Subversion are better than Git in this regard, and I've seen both used for the task -- TortoiseSVN is great for non-programmers to work with when they just want to &quot;get their stuff in&quot;." />
  <row Id="659" PostHistoryTypeId="16" PostId="42" RevisionGUID="0099a86c-13da-4276-b355-6bd666c1dbe0" CreationDate="2010-07-15T04:36:07.950" UserId="33" />
  <row Id="660" PostHistoryTypeId="6" PostId="42" RevisionGUID="0099a86c-13da-4276-b355-6bd666c1dbe0" CreationDate="2010-07-15T04:36:07.950" UserId="33" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript&gt;&lt;flex&gt;&lt;actionscript-3&gt;&lt;swf&gt;" />
  <row Id="661" PostHistoryTypeId="2" PostId="363" RevisionGUID="ab06dc85-2a70-4ff9-b459-8e9fac4cbc54" CreationDate="2010-07-15T04:38:29.133" UserId="240" Text="In very broad terms, you probably want to define a gesture as a direction, followed by a [possibly very-short] delay, followed by another direction (and the relative angles between the directions, etc., until the end.&#xD;&#xA;&#xD;&#xA;For example, making a &quot;t&quot; with your wand (and don't forget that some people are lefties, so your definitions should not be hand-dependant!) is a vertical swoosh, short delay, reversal curving out, short delay, reversal headed horizontal, abrupt [near] stop.&#xD;&#xA;&#xD;&#xA;As you read the gesture, you want to see how closely the pattern read matches the pattern description.&#xD;&#xA;&#xD;&#xA;In general terms, you can first cull the definition dictionary by eliminating obvious mis-matches (ones that don't even being correctly, or that are too long or too short by far), then &quot;score&quot; the gesture against the remaining definitions.  Score the gesture by rating each portion as to how well it matched the definition (0-100%) and RMS-ing that (take the errors, squared, sum them, then take the square root of that sum.)&#xD;&#xA;&#xD;&#xA;Using RMS accentuates large differences (resulting in a lower score), while tending to gloss over small differences (resulting in a better match.)&#xD;&#xA;&#xD;&#xA;There's a ton of material on this stuff -- Google gesture recognition.  Don't worry if it's for a stylus or other non-Wii thing, the principles adapt well.&#xD;&#xA;" />
  <row Id="662" PostHistoryTypeId="2" PostId="364" RevisionGUID="1a6522ad-b0ad-48f9-ab0c-5a0c33e6d21d" CreationDate="2010-07-15T04:46:26.907" UserId="240" Text="The same way you save it when the user bumps a save-game without exiting.&#xD;&#xA;&#xD;&#xA;Is this question about how to save game state?  Or how to do something at app-exit?&#xD;&#xA;&#xD;&#xA;For the latter, the answer is: appWillTerminate (or appWillResignActive.)  In iOS4 or later, you can request extra time (Google &quot;iOS-4 request extra time&quot;) if your save-game takes a while.&#xD;&#xA;&#xD;&#xA;If you're asking how to save game-state at all, I'm a big fan of NSDictionary to store values easily re-read by the game-engine on continue.&#xD;&#xA;&#xD;&#xA;    NSMutableDictionary *saveDict = [NSMutableDictionary dictionary];&#xD;&#xA;    [saveDict setValue: [NSNumber numberWithInt: currentScore] forKey: @&quot;currentScore&quot;];&#xD;&#xA;    // etc...&#xD;&#xA;    [saveDict writeToFile: saveFilePath atomically: YES];&#xD;&#xA;&#xD;&#xA;If you want, you can add a &quot;signature&quot; (*i.e.*, like md5 or similar) to verify on game continue to make sure that someone hasn't mucked with the file to try to cheat.&#xD;&#xA;" />
  <row Id="663" PostHistoryTypeId="2" PostId="365" RevisionGUID="ac9d21f9-a104-4078-a81c-d1246aecec29" CreationDate="2010-07-15T04:52:35.857" UserId="211" Text="Hot-swapping is a very, very difficult problem to solve with binary code. Even if your code is placed into separate dynamic link libraries, your code needs to ensure that there are no direct references to functions in memory (as the address of functions can change with a recompile). This essentially means not using virtual functions, and anything that uses function pointers do so via some sort of dispatch table.&#xD;&#xA;&#xD;&#xA;Hairy, constraining stuff. It's better to use a scripting language for code that needs fast iteration.&#xD;&#xA;&#xD;&#xA;At work, our current code base is a mix of C++ and Lua. Lua is no small part of our project, either -- it's almost a 50/50 split. We've implemented on-the-fly reloading of Lua, such that you can change a line of code, reload, and keep going. In fact, you can do this in order to fix crash bugs that occur in Lua code, without restarting the game!" />
  <row Id="664" PostHistoryTypeId="2" PostId="366" RevisionGUID="9077e106-8b60-4ebf-9e3d-b132f8fe22d1" CreationDate="2010-07-15T05:23:05.337" UserId="13" Text="I want to load a mesh into my game but am not sure what mesh formats there are, how easy/hard it is to read them and what the difference is between those formats. &#xD;&#xA;&#xD;&#xA;Or is it best to write my own mesh format?" />
  <row Id="665" PostHistoryTypeId="1" PostId="366" RevisionGUID="9077e106-8b60-4ebf-9e3d-b132f8fe22d1" CreationDate="2010-07-15T05:23:05.337" UserId="13" Text="What 3d mesh formats are there?" />
  <row Id="666" PostHistoryTypeId="3" PostId="366" RevisionGUID="9077e106-8b60-4ebf-9e3d-b132f8fe22d1" CreationDate="2010-07-15T05:23:05.337" UserId="13" Text="&lt;3d-meshes&gt;&lt;mesh&gt;" />
  <row Id="667" PostHistoryTypeId="5" PostId="366" RevisionGUID="451d489d-698f-44fe-9426-33341d39608f" CreationDate="2010-07-15T05:38:40.680" UserId="13" Comment="added 44 characters in body; edited tags" Text="I want to load a mesh into my game (written in C#) but am not sure what mesh formats to use. What mesh formats are there and how easy/hard it is to read them and what the difference is between those formats?&#xD;&#xA;&#xD;&#xA;Or is it best to write my own mesh format?" />
  <row Id="668" PostHistoryTypeId="6" PostId="366" RevisionGUID="451d489d-698f-44fe-9426-33341d39608f" CreationDate="2010-07-15T05:38:40.680" UserId="13" Comment="added 44 characters in body; edited tags" Text="&lt;c#&gt;&lt;3d-meshes&gt;&lt;mesh&gt;" />
  <row Id="669" PostHistoryTypeId="2" PostId="367" RevisionGUID="e42b0014-4409-4491-9d61-2784fb183f51" CreationDate="2010-07-15T05:39:02.707" UserId="214" Text="[BulletX][1] is a 100% C# port of Bullet Physics, which is usable with XNA.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnadevru.codeplex.com/wikipage?title=Managed%20Bullet%20Physics%20Library&amp;ProjectName=xnadevru" />
  <row Id="670" PostHistoryTypeId="2" PostId="368" RevisionGUID="6d65b59c-1410-428a-aae2-4933b510f500" CreationDate="2010-07-15T05:40:58.053" UserId="241" Text="For a novice coming into Game Design, and not necessarily programming so much, [The Art of Game Design][1] is one of my favorite books(!) of all time. It's good to remember that game design can be done with pen and paper and that a finished game doesn't need to involve programming at all. Jesse Schell has incredible insight into the design and development process, and most of all about how to make games fun and rewarding. The added card deck of 'lenses' accessory is worth it too. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://artofgamedesign.com/ &quot;The Art of Game Design&quot;" />
  <row Id="671" PostHistoryTypeId="16" PostId="368" RevisionGUID="6d65b59c-1410-428a-aae2-4933b510f500" CreationDate="2010-07-15T05:40:58.053" UserId="-1" />
  <row Id="672" PostHistoryTypeId="2" PostId="369" RevisionGUID="11e5969d-9c40-4d7b-aa7f-23198a1a8b00" CreationDate="2010-07-15T05:52:09.423" UserId="88" Text="[dafont.com][1] is a great site for finding cool fonts. Each font comes with a license, so just make sure that the font you choose is free to use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dafont.com" />
  <row Id="673" PostHistoryTypeId="2" PostId="370" RevisionGUID="0a8258c3-15b7-4ec8-a627-204fafc9c3eb" CreationDate="2010-07-15T05:57:23.343" UserId="245" Text="Consider your own format only if you can articulate demands that are very unique to your scenario, and even then - (good) mesh formats are extensible and would probably suit your needs. &#xD;&#xA;&#xD;&#xA;If you're developing in the MS universe there's DirectX's own [.X format][1], which personally I think is very well designed. It supports animation, optional compression, and is highly flexible - you can define and register your own template and use whatever extra data you can't find in the presets. &#xD;&#xA;Since it's fully open, there's even some work on [using it without DirectX][2]. It's main shortcoming is the somewhat lacking MSDN documentation - but that's more than compensated by online content similar to the links.&#xD;&#xA;&#xD;&#xA;Beyond that there's obj and stl which are portable but rather primitive (stl in particular), 3dstudio's 3ds and really, [tons more][3]. What the world needs is *not* another mesh format..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/articles/article2079.asp&#xD;&#xA;  [2]: http://www.gamedev.net/reference/programming/features/xfilepc/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Category:CAD_file_formats" />
  <row Id="674" PostHistoryTypeId="2" PostId="371" RevisionGUID="aa88b031-e159-49da-8307-6e04bcea7e06" CreationDate="2010-07-15T06:14:17.100" UserId="250" Text="Even though C++ appears to be king, from what I've been told C is still widely used in games, especially on the consoles. However, would writing an entire game engine in C be unreasonable today? What are, if any, some advantages that C has over C++? Why would someone possibly want to use C over C++?" />
  <row Id="675" PostHistoryTypeId="1" PostId="371" RevisionGUID="aa88b031-e159-49da-8307-6e04bcea7e06" CreationDate="2010-07-15T06:14:17.100" UserId="250" Text="Is it reasonable to write a game engine in C?" />
  <row Id="676" PostHistoryTypeId="3" PostId="371" RevisionGUID="aa88b031-e159-49da-8307-6e04bcea7e06" CreationDate="2010-07-15T06:14:17.100" UserId="250" Text="&lt;game-engine&gt;&lt;subjective&gt;&lt;c&gt;" />
  <row Id="677" PostHistoryTypeId="5" PostId="187" RevisionGUID="d3141b09-90e5-4c9f-b805-d852d3dceec7" CreationDate="2010-07-15T06:17:33.537" UserId="55" Comment="improved formatting from posting this on my blog" Text="I actually just wrote a blog about how I [approached the design and development][1] for my latest iPhone project. You might find value in reading it. &#xD;&#xA;&#xD;&#xA;A few thoughts to leave here are&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;To-do Application&lt;/strong&gt;  &#xD;&#xA;I use [Things][2]. Alternatively, you can jump onto [sourceforge.net][3] to grab a to-do application. You will have a lot of sketches, ideas, design information that really needs to be aggregated into one spot. Having an application like this with your feature list will help you stay focused.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Small Tasks&lt;/strong&gt;  &#xD;&#xA;&quot;Implement Leaderboard View&quot; is not a sufficient task.  What does that involve? Break it down -&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;    &lt;li&gt;Create background artwork for leaderboard view&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Create class methods that fetch score data&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Create class methods that post score data&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Create a view controller which will display a back button, reload button, and a table view&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Implement the table view to load in the data from the model&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;Seeing the picture in finer detail will reduce your chances of missing a key element of your implementation and will provide you motivation as you tick off each task.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Keep the Scope Small&lt;/strong&gt;  &#xD;&#xA;Don't try to build Starcraft III if it is just you, scruffy, and purrdoodle.  It's just not feasible. Lower your expectations and find something you would still enjoy building. &#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Eye-candy&lt;/strong&gt;  &#xD;&#xA;Get something on the screen -- you may be surprised on how big of a jolt to your motivation it will be.  I tend to focus on getting artwork early.  In addition I also am able to work with a musician who starts showing me stuff relatively early as well. &#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Have fun&lt;/strong&gt;  &#xD;&#xA;If you're slaving over your save state system all of this week be sure to follow it up next week with something that is fun.  One of my fun moments was redesigning the animation system for my user interface. &#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Collaborate&lt;/strong&gt;  &#xD;&#xA;You don't technically need to start adding people to your team, but talk to other people about what you are doing.  Jump over to [tigsource.com][4] or [gamedev.net][5] and start networking.&#xD;&#xA; &#xD;&#xA;&lt;strong&gt;Playtest&lt;/strong&gt;  &#xD;&#xA;Start getting early feedback on your game. I'm talking about right after you finish your initial prototype. Let some of your friends mess around with what you have, get feedback, take notes, and revise your plan if needed.  Be sure to test outside of your realm of comfort and cast a net that includes other game developers.  Sometimes friends and loved ones are just not critical people.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Start a Blog&lt;/strong&gt;  &#xD;&#xA;Talking about what you're doing allows you to build a brand for yourself.  This is priceless when it comes time to shipping your product.  Just look at what [Wolfire][6] is doing. They are absolutely pure win at building a brand for themselves.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Take a Break&lt;/strong&gt;  &#xD;&#xA;If your mind isn't into the project at a specific time don't try and force it.  Get up and go for a walk or take a quick nap.  That is the luxury of being an independent.  In the end you'll create a better product for doing so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.david-mcgraw.com/2010/07/13/approaching-design-for-an-ios-project/&#xD;&#xA;  [2]: http://culturedcode.com/things/&#xD;&#xA;  [3]: http://sourceforge.net&#xD;&#xA;  [4]: http://www.tigsource.com&#xD;&#xA;  [5]: http://www.gamedev.net&#xD;&#xA;  [6]: http://www.wolfire.com" />
  <row Id="678" PostHistoryTypeId="2" PostId="372" RevisionGUID="0739f44a-f4c8-4e09-bbda-a765a716d17f" CreationDate="2010-07-15T06:28:35.543" UserId="199" Text="Now that Flash is largely being replaced with HTML5 elements (video, audio, canvas, etc.) are there any good examples of web-based games built on completely open standards (meaning Javascript, HTML and CSS)? I see a lot of examples of pure HTML5 implementations of what was once only in Flash (like stuff here: http://www.html5rocks.com/) but not many games, a domain which still seem dominated by Flash. I'm curious what's possible and what the limitations are." />
  <row Id="679" PostHistoryTypeId="1" PostId="372" RevisionGUID="0739f44a-f4c8-4e09-bbda-a765a716d17f" CreationDate="2010-07-15T06:28:35.543" UserId="199" Text="Examples of good Javascript/HTML5 based games" />
  <row Id="680" PostHistoryTypeId="3" PostId="372" RevisionGUID="0739f44a-f4c8-4e09-bbda-a765a716d17f" CreationDate="2010-07-15T06:28:35.543" UserId="199" Text="&lt;subjective&gt;&lt;flash&gt;&lt;web&gt;" />
  <row Id="681" PostHistoryTypeId="6" PostId="372" RevisionGUID="67bf700e-204e-462a-a996-6f2c29f0aa03" CreationDate="2010-07-15T06:30:07.927" UserId="195" Comment="edited tags" Text="&lt;subjective&gt;&lt;flash&gt;&lt;web&gt;&lt;html5&gt;&lt;javascript&gt;" />
  <row Id="682" PostHistoryTypeId="2" PostId="373" RevisionGUID="6871ba4a-63a7-42e9-9d6d-99dafd26cd32" CreationDate="2010-07-15T06:41:23.550" UserId="160" Text="&gt; However, would writing an entire game engine in C be unreasonable today?&#xD;&#xA;&#xD;&#xA;It's reasonable, but the question is what does it buy you? You likely don't need the extreme portability C offers, and it's a shame to give up all of the features C++ offers unless you're really philosophically set against it.&#xD;&#xA;&#xD;&#xA;&gt; What are, if any, some advantages that C has over C++?&#xD;&#xA;&#xD;&#xA;Better compilation time?&#xD;&#xA;&#xD;&#xA;&gt; Why would someone possibly want to use C over C++?&#xD;&#xA;&#xD;&#xA;I think it's mostly an aesthetic choice. Many people like C because it's simple and minimal and feels clean. C++ has a lot of nice features (namespaces alone make it worth using), but it's also big and messy." />
  <row Id="683" PostHistoryTypeId="2" PostId="374" RevisionGUID="3c0027dd-b3b5-4a13-a1ad-7e7f380d8169" CreationDate="2010-07-15T06:53:50.870" UserId="254" Text="While I know that functional languages aren't the most commonly used for game writing, there are a lot of benefits associate with them that seem like they would be interesting in any programming context. Especially the ease of parallelization I would think could be very useful as focus is moving toward more and more processors. &#xD;&#xA;&#xD;&#xA;Also, with F# as a new member of the .NET family, it can be used directly with XNA, for example, which lowers the threshold quite a bit, as opposed to going with LISP, Haskell, Erlang, etc.&#xD;&#xA;&#xD;&#xA;If anyone has experience writing games with functional code, what has turned out to be the positives and negatives. What was it suited for, what not?" />
  <row Id="684" PostHistoryTypeId="1" PostId="374" RevisionGUID="3c0027dd-b3b5-4a13-a1ad-7e7f380d8169" CreationDate="2010-07-15T06:53:50.870" UserId="254" Text="What are the challenges and benefits of writing games with a functional language?" />
  <row Id="685" PostHistoryTypeId="3" PostId="374" RevisionGUID="3c0027dd-b3b5-4a13-a1ad-7e7f380d8169" CreationDate="2010-07-15T06:53:50.870" UserId="254" Text="&lt;functional&gt;" />
  <row Id="686" PostHistoryTypeId="2" PostId="375" RevisionGUID="82961c0d-8084-402b-b427-962dcad6038b" CreationDate="2010-07-15T06:59:58.110" UserId="255" Text="On the tools side an incredible useful library is the &quot;[Managed Extensibility Framework][1]&quot;, which is now actually part of .Net 4.0.&#xD;&#xA;It allows you to create plug-ins or automatic discovery of instances of classes ridiculously easily, which is -very- useful for your tools.&#xD;&#xA;&#xD;&#xA;  [1]: http://mef.codeplex.com/" />
  <row Id="687" PostHistoryTypeId="2" PostId="376" RevisionGUID="a0651687-e1b6-45cd-8245-f9ea39ac7260" CreationDate="2010-07-15T07:00:17.047" UserId="231" Text="Yes and no. Yes I have done it a few years back but I needed my game to run in 3D on a unix (not linux) 64 bit remote server with the players on dumb terminals. It was non trivial. C can be nice is you want to integrate LUA but I eventually got lua to work in C++ so I would say yes it is possible but don't do it." />
  <row Id="688" PostHistoryTypeId="2" PostId="377" RevisionGUID="510a5cde-04e0-40b5-bb24-8c61d8d3f00d" CreationDate="2010-07-15T07:05:02.950" UserId="256" Text="Coincidentally, there was a question on Slashdot today about html5/javascript gaming:&#xD;&#xA;&#xD;&#xA;http://ask.slashdot.org/story/10/07/14/0632238/JavaScriptHTML-5-Gaming&#xD;&#xA;&#xD;&#xA;It mentions specifically Galactic Plunder, a side-scrolling space shooter:&#xD;&#xA;&#xD;&#xA;http://dougx.net/plunder/plunder.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="689" PostHistoryTypeId="16" PostId="377" RevisionGUID="510a5cde-04e0-40b5-bb24-8c61d8d3f00d" CreationDate="2010-07-15T07:05:02.950" UserId="256" />
  <row Id="690" PostHistoryTypeId="2" PostId="378" RevisionGUID="a1ff64b6-3a27-4756-931a-4b667df65c47" CreationDate="2010-07-15T07:05:24.103" UserId="252" Text="[git](http://www.git-scm.org) using [github](http://github.com/) as host" />
  <row Id="691" PostHistoryTypeId="2" PostId="379" RevisionGUID="0ea683f2-3aaa-49bb-99be-1b018ea71200" CreationDate="2010-07-15T07:09:18.867" UserId="255" Text="For completeness sake, another option is [mono-script][1], which allows you to use the Novell implementation of the .NET framework for scripting.&#xD;&#xA;It's what [Unity][2] uses.&#xD;&#xA;Here's another page about [embedding mono][3] in your application.&#xD;&#xA;&#xD;&#xA;The Mono framework is faster than most (perhaps all?) of scripting languages out there because it's not interpreted, and because there's a layer between the compiler and the instruction set, it allows you to program in a variety of languages including C# and dialects of Python, Lua and Javascript.&#xD;&#xA;&#xD;&#xA;I'm not sure if it's free on all platforms however.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Scripting_With_Mono&#xD;&#xA;  [2]: http://unity3d.com/&#xD;&#xA;  [3]: http://www.mono-project.com/Embedding_Mono" />
  <row Id="692" PostHistoryTypeId="2" PostId="380" RevisionGUID="53797eba-5a54-439e-a9ba-b1692f6a22fb" CreationDate="2010-07-15T07:12:03.230" UserId="231" Text="I have written simple games in LISP and it was fun but not something I would recommend. Functional programming is all about the end result. So it's very handy for processing data and making decisions but I found it made it hard to do simple clean code like a basic control loop.  &#xD;&#xA;&#xD;&#xA;I have not learned F# though so it may be a lot easier to work with." />
  <row Id="693" PostHistoryTypeId="2" PostId="381" RevisionGUID="0ab21040-58ac-4b65-9bbf-04f37d8c5f6f" CreationDate="2010-07-15T07:14:33.863" UserId="252" Text="I'd like to have as little portability issues as possible but supports hardware acceleration. The main priority is on PC and having a game run on Windows, Linux and MacOS. Porting to consoles would however be great, too." />
  <row Id="694" PostHistoryTypeId="1" PostId="381" RevisionGUID="0ab21040-58ac-4b65-9bbf-04f37d8c5f6f" CreationDate="2010-07-15T07:14:33.863" UserId="252" Text="Which frameworks are system agnostic?" />
  <row Id="695" PostHistoryTypeId="3" PostId="381" RevisionGUID="0ab21040-58ac-4b65-9bbf-04f37d8c5f6f" CreationDate="2010-07-15T07:14:33.863" UserId="252" Text="&lt;framework&gt;" />
  <row Id="696" PostHistoryTypeId="2" PostId="382" RevisionGUID="a301900d-6b6c-413e-8567-096b175ac7f4" CreationDate="2010-07-15T07:14:57.230" UserId="252" Text="[libsdl](http://www.libsdl.org/) is very portable and supports openGL" />
  <row Id="697" PostHistoryTypeId="2" PostId="383" RevisionGUID="058d5653-85e3-4843-a68a-bc64a88ae16c" CreationDate="2010-07-15T07:19:48.030" UserId="255" Text="I don't think anyone uses C exclusively these days, it's usually mixed together with a higher level language.&#xD;&#xA;&#xD;&#xA;Programming in C has some benefits over, say, programming in C++.&#xD;&#xA;C++ *can* do lot of things under the hood that are invisible to the user, which can hurt performance if you're not careful.&#xD;&#xA;C++ *can* also be terrible when it comes to cache usage, which again can hurt your performance.&#xD;&#xA;&#xD;&#xA;So it may bring some benefits to write the performance critical parts of a game in a C-like way, rather than in a traditional C++ way.&#xD;&#xA;I've never heard of anyone, in recent years, actually writing an entire game in C however.&#xD;&#xA;&#xD;&#xA;On some platforms, like the iPhone, using C++ can increase your executable size with a certain chunk of kilobytes (I forgot how much, sorry), which is a reason why some iPhone developers choose to write their code in a mix of C and Objective-C." />
  <row Id="698" PostHistoryTypeId="2" PostId="384" RevisionGUID="207b4d08-af9b-433a-b277-5b3ecda0597e" CreationDate="2010-07-15T07:30:24.697" UserId="20" Text="Have a look at these websites:&#xD;&#xA;&#xD;&#xA; - http://html5games.com/&#xD;&#xA; - http://web.appstorm.net/roundups/browsers/10-html5-games-paving-the-way/" />
  <row Id="699" PostHistoryTypeId="2" PostId="385" RevisionGUID="b516724c-8d0f-4fa8-a627-ed087a8be768" CreationDate="2010-07-15T07:35:53.890" UserId="20" Text="You can use Flash, a 3D Tool or even Photoshops animation feature. Then render the frames to images and combine them to a sprite-sheet.&#xD;&#xA;&#xD;&#xA;[ImageMagick][1] has a great tool for that purpose called *montage*.&#xD;&#xA;Here's a blog post explaining how to use it to create a sprite sheet:&#xD;&#xA;http://www.bensnider.com/2010/02/09/imagemagick-split-and-join-a-sprite-sheet/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imagemagick.org/" />
  <row Id="700" PostHistoryTypeId="2" PostId="386" RevisionGUID="421c15af-ab5b-4682-b3b1-223382f5e5e1" CreationDate="2010-07-15T07:37:13.200" UserId="258" Text="I'll give you a couple more reasons why it would be unreasonable to write a game engine in C instead of C++ today: STL and BOOST.&#xD;&#xA;&#xD;&#xA;I can't imagine how it would be worth writing yet another &lt;code&gt;list&lt;/code&gt; implementation when you could rely on code that works out of the box (and that you don't have to write!)" />
  <row Id="701" PostHistoryTypeId="2" PostId="387" RevisionGUID="b34210f8-4216-451d-8ac0-185936f8658d" CreationDate="2010-07-15T07:38:25.880" UserId="7" Text="Supreme Commander 2 has something called *flow field* path finding. How does it work? Is there some article available I can read up on how it works?" />
  <row Id="702" PostHistoryTypeId="1" PostId="387" RevisionGUID="b34210f8-4216-451d-8ac0-185936f8658d" CreationDate="2010-07-15T07:38:25.880" UserId="7" Text="How does Flow Field pathfinding work?" />
  <row Id="703" PostHistoryTypeId="3" PostId="387" RevisionGUID="b34210f8-4216-451d-8ac0-185936f8658d" CreationDate="2010-07-15T07:38:25.880" UserId="7" Text="&lt;path-finding&gt;" />
  <row Id="704" PostHistoryTypeId="2" PostId="388" RevisionGUID="fbfb13d3-2cff-4fd3-b848-334ed029aef0" CreationDate="2010-07-15T07:43:53.963" UserId="211" Text="As already mentioned, C++ is essentially *the* language to learn; the major consoles all host a C++ development environment, for better or worse. C# is starting to take off, in XNA-powered games, but is most often also used for tools development.&#xD;&#xA;&#xD;&#xA;Lua is also one of the most commonly used scripting languages in games; it's helpful to have at least a passing familiarity with it.&#xD;&#xA;&#xD;&#xA;Often the build chain used to build the game will contain scripts written in Python or Perl; it's helpful to be familiar with those too (though it's not a requirement)." />
  <row Id="705" PostHistoryTypeId="2" PostId="389" RevisionGUID="950e8901-96f2-48fa-b76e-d2f36b7f2db4" CreationDate="2010-07-15T07:50:21.467" UserId="7" Text="The creator of Grauioutous Space Battles game, a lone indie developer, summed up some handy tips about making your own game in a blog post. Some of them can be motivating even for hobby projects.&#xD;&#xA;&#xD;&#xA;[Cliffski's Blog: How to stay motivated whilst programming a game][1]&#xD;&#xA;&#xD;&#xA;Excerpt:&#xD;&#xA;&#xD;&#xA;&gt; 1. Code something you like&#xD;&#xA;&gt; 2. Surround yourself with inspiration&#xD;&#xA;&gt; 3. Keep a log of what you did each day.&#xD;&#xA;&gt; 4. Do some shiny&#xD;&#xA;&gt; 5. Hard lessons in money&#xD;&#xA;&gt; 6. Stay aware how high the bar is (know your competition)&#xD;&#xA;&gt; 7. Take short breaks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://positech.co.uk/cliffsblog/?p=753" />
  <row Id="706" PostHistoryTypeId="5" PostId="329" RevisionGUID="2f175c49-6ce9-4ad9-9447-a470e5453d0b" CreationDate="2010-07-15T07:51:01.920" UserId="97" Comment="added 233 characters in body" Text="What you are really listing are, rather, graph search algorithms, which are a part of Graph Theory.  A* happens to be one which is optimized for &quot;pathfinding&quot; applications.&#xD;&#xA;&#xD;&#xA;Why bother?  Those algorithms are good for much, much more than simple pathfinding.  In fact, there is an entire branch of mathematics devoted to studying graph theory and its properties.&#xD;&#xA;&#xD;&#xA;BFS and DFS, in particular, are one of the most basic and powerful tools of graph theory application.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;It is of use to note that A* is rather weak when the shape and nature of the obstacles to be navigated around is dynamic and changing.  In this case, it is usually a good bet to look into other pathfinding algorithms." />
  <row Id="707" PostHistoryTypeId="2" PostId="390" RevisionGUID="ed1002d7-0b8d-4eef-b76f-a4bd2f2329af" CreationDate="2010-07-15T07:55:04.810" UserId="259" Text="I've been looking for this term as well, and this paper is the only major one I could find that references flow fields directly:&#xD;&#xA;http://www.aaai.org/Papers/AIIDE/2008/AIIDE08-031.pdf&#xD;&#xA;&#xD;&#xA;This approach involves each pathfinding agent being influenced by a global vector field, and in turn influencing that field with their resulting path.  You still need some basic object avoidance code to kick things off, so is only really applicable for swarms crossing paths, rather than individual agents.&#xD;&#xA;&#xD;&#xA;However, the SupComm2 guys mention research from the University of Washington directly, and this is the most applicable paper that I could find from that institution:&#xD;&#xA;http://grail.cs.washington.edu/projects/crowd-flows/&#xD;&#xA;&#xD;&#xA;This approach seems more promising but I need to read more about it." />
  <row Id="708" PostHistoryTypeId="2" PostId="391" RevisionGUID="289a5d69-a28e-41e7-9162-fb263128cd45" CreationDate="2010-07-15T07:55:50.863" UserId="97" Text="The official specs of the pathfinding algorithm in Supreme Commander 2 refer to the [**Crowd Continuum Study**](http://grail.cs.washington.edu/projects/crowd-flows/) at University of Washington.&#xD;&#xA;&#xD;&#xA;There are several papers and demonstrations at that link." />
  <row Id="709" PostHistoryTypeId="2" PostId="392" RevisionGUID="1f459c8e-4bb2-4747-8310-5b646ab6d2e2" CreationDate="2010-07-15T08:04:01.437" UserId="251" Text="It sounds like an interesting problem, though I am wondering how much accuracy you will need before people just can't tell. Anyway, this answer focuses on the &quot;real time&quot; part, but I don't know of any papers as it isn't something I've investigated.&#xD;&#xA;&#xD;&#xA;Obviously if you want to calculate this accurately in real time, with mobile sound sources, calculating reflection would be fastest using the graphics card. For example if you have a simplified version of the world running simultaneously, you could use it to render &quot;reflection patterns&quot; to a texture or cubemap and infer from that texture how you should output the sound. Sounds (or separate frequency bands of sounds) in that model would be point light sources. With only basic (1 bounce) reflections you might find that you don't need any more accuracy anyway, while this should be very quick especially with simplified geometry and reduced resolution. I'm not entirely sure if there are performance problems with multiple scenes on one graphics card, though.&#xD;&#xA;&#xD;&#xA;Getting further into areas I know little about, a BSP tree seems like it could be useful for waves that bend around corners as (I think) it defines volumes and their connections to other volumes.&#xD;&#xA;&#xD;&#xA;Depending on the situation, a further optimisation would be to cache results from the above tests. For example, storing a cubemap of sound that could be rotated based on the players orientation but not recalculated entirely, or a couple of cubemaps that you can interpolate between based on the player's position." />
  <row Id="710" PostHistoryTypeId="2" PostId="393" RevisionGUID="2a0c2666-162b-498d-9ee9-e5b484381ba2" CreationDate="2010-07-15T08:10:53.993" UserId="260" Text="If you're working on a title for Windows and writing managed code running on top of the Common Language Runtime (CLR) - let's say e.g. in C# - I'd suggest you have a look at integrating (Iron)Python as scripting language. &#xD;&#xA;&#xD;&#xA;In my experience, Python is very easy to teach to non-programmers/designers. It is even easier to pick up for developers since it essentially reads like pseudocode. Being dynamically typed is just one of the aspects that help to get people with little to no prior coding experience up and running fast with the language.&#xD;&#xA;&#xD;&#xA;In addition to the language being easy to learn and powerful, the CLR and language teams at Microsoft (Anders Hejlsberg, Eric Lippert, Mads Torgersen, Jim Hugunin et al.) have done some great work in exposing compiler and runtime features via the new Dynamic Language Runtime (DLR) in .NET 4, making interoperability between statically typed code and dynamically typed code much more straightforward. From what I've seen and tried so far, boilerplate code is reduced to a minimum. It'll keep your codebase clean and maintainable.&#xD;&#xA;&#xD;&#xA;You can utilize this to keep the friction between the scripted parts of your game and the engine very low. Having both run within the same VM will also make it possible for the runtime to optimize more of your code during execution." />
  <row Id="711" PostHistoryTypeId="2" PostId="394" RevisionGUID="12738e71-757a-4836-a098-71eff1d420a2" CreationDate="2010-07-15T08:12:41.837" UserId="102" Text="I'm looking for any network layers that are available to add to my game, either free or with fair pricing for indie games.&#xD;&#xA;&#xD;&#xA;By network layers I mean some sort of library which I can interface with, that I will be able to send messages to and receive messages from, and it will handle all the low-level information by itself.&#xD;&#xA;&#xD;&#xA;I'm especially looking for:&#xD;&#xA;&#xD;&#xA;* High quality libraries that understand and deal with complex things such as network congestion.&#xD;&#xA;* Scalable libraries, that will allow me to have a lot of players playing together.&#xD;&#xA;* Preferably a peer-to-peer solution, and not a server based one.&#xD;&#xA;* Preferably a library that has binding for high-level languages (such as Java or C#).&#xD;&#xA;&#xD;&#xA;An example of what I'm looking for is [Grapple][1], but I know there are other libraries available.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Grapple_%28network_layer%29" />
  <row Id="712" PostHistoryTypeId="1" PostId="394" RevisionGUID="12738e71-757a-4836-a098-71eff1d420a2" CreationDate="2010-07-15T08:12:41.837" UserId="102" Text="Network layer libraries" />
  <row Id="713" PostHistoryTypeId="3" PostId="394" RevisionGUID="12738e71-757a-4836-a098-71eff1d420a2" CreationDate="2010-07-15T08:12:41.837" UserId="102" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;peer-to-peer&gt;" />
  <row Id="714" PostHistoryTypeId="2" PostId="395" RevisionGUID="06778571-5262-42a5-9d14-cff5ee332f8a" CreationDate="2010-07-15T08:13:35.687" UserId="259" Text="A*, because of the closed and open lists, can be more memory intensive than a well-implemented Dijkstra.  However both are probably processor-bound anyway so you might as well go for the flexibility of A*." />
  <row Id="715" PostHistoryTypeId="10" PostId="245" RevisionGUID="6e513305-b5e9-483f-b842-df6cba4a3022" CreationDate="2010-07-15T08:14:11.020" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:158,&quot;DisplayName&quot;:&quot;TomWij&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:43,&quot;DisplayName&quot;:&quot;Fire&quot;},{&quot;Id&quot;:252,&quot;DisplayName&quot;:&quot;Tobias Kienzler&quot;},{&quot;Id&quot;:102,&quot;DisplayName&quot;:&quot;Oak&quot;}]" />
  <row Id="716" PostHistoryTypeId="2" PostId="396" RevisionGUID="d8e7742f-b494-4520-89a5-5e97fa50886e" CreationDate="2010-07-15T08:18:13.197" UserId="119" Text="I'm pretty Sure you can use Flash and go file &gt; export movie&gt; png sequence. Then combine the pngs using Photoshop to make your sprite sheet. Also check out the animation features of fireworks." />
  <row Id="717" PostHistoryTypeId="2" PostId="397" RevisionGUID="c7177372-0069-4b99-9ddc-be1b2537860a" CreationDate="2010-07-15T08:20:53.860" UserId="162" Text="I have worked extensively with a pure-C game engine that has shipped several products, so it is absolutely possible. Here's my personal experience with working in both C vs C++ engines:&#xD;&#xA;&#xD;&#xA; 1. Using pure-C structures allows you to take advantage of knowledge about the alignment of structures, and you can then use this information to build your object persistence and serialization layers. The engine I worked with had some simple header parsers that would automatically create this metadata about structures, and it made certain types of data operations trivial. Parsing arbitrary C++ header files is essentially impossible, and as soon as you add inheritance and virtual functions you lose the ability to know exactly where things are in memory&#xD;&#xA; 2. Compile team is significantly shorter because you can keep your header files very compact and take advantage of forward declarations of structures.&#xD;&#xA; 3. Debugging can be improved because without the use of templates and inheritance it is very easy to figure out exactly what a certain object is and what it's doing.&#xD;&#xA;&#xD;&#xA;All 3 of these benefits could also be achieved just as easily using restrained c++ code that refrains from using templates and inheritance on serialized objects, but it was the CTO's decision that it would be easier to enforce the simplicity if the more confusing elements of C++ were not available.&#xD;&#xA;&#xD;&#xA;Personally I think this was slightly extreme, as I really missed the ability to sanely declare variables in for loops and the many completely legitimate uses for inheritance. But, it really didn't cost us much productivity in the end all things considered" />
  <row Id="718" PostHistoryTypeId="2" PostId="398" RevisionGUID="dcdfc898-08e1-46e4-a6f7-36155cefe9d7" CreationDate="2010-07-15T08:24:52.367" UserId="162" Text="I've used the [BitStream Vera fonts][1] in several open-source game projects, and they're quite nice. The license should be good for just about any game, and the gnome project has already worked out the legal issues and currently ship them. Full unicode support which is very rare for free fonts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gnome.org/fonts/" />
  <row Id="719" PostHistoryTypeId="2" PostId="399" RevisionGUID="f8d9e292-ca1a-419a-84b8-4425294011c5" CreationDate="2010-07-15T08:31:46.923" UserId="259" Text="One think I think is important is to seperate why an agent wants to acomplish something from how it does it.  Goal-orientated Action Planners (http://web.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf) do this well, but there are also other solutions.  This gives you great flexibility for constructing agents as you can pick and choose from a bucket of goals and a bucket of actions.&#xD;&#xA;&#xD;&#xA;Behaviour trees are designed to ecompass the whole solution - decision making as well as actions - and as such can be hard to maintain.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="720" PostHistoryTypeId="2" PostId="400" RevisionGUID="bf9c5128-37f4-4997-85a8-4096bce07f65" CreationDate="2010-07-15T08:36:38.563" UserId="119" Text="I've only done this with the mouse, but my solution worked really well. I created a join the dots pattern of points to represent the gesture - this is the shape to draw. Then I stored the path of the cursor as it moved around. Next I scaled this mouse path so that it has the same width and height as the target pattern. Every update I looped through all the points of my cursor path making sure they were each within a certain distance of a gesture path node, looking at each gesture path point in order." />
  <row Id="721" PostHistoryTypeId="2" PostId="401" RevisionGUID="8d750bcd-5cf3-4727-a9c7-10cffe6ec670" CreationDate="2010-07-15T08:41:38.443" UserId="120" Text="[ToonBoom studio][1] is a flash like  animation tool and can export sprite sheets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.toonboom.com/products/toonBoomStudio/" />
  <row Id="722" PostHistoryTypeId="5" PostId="399" RevisionGUID="110aa81a-3b49-4bc1-bf7e-02fcb3d83dfa" CreationDate="2010-07-15T08:44:10.667" UserId="259" Comment="fix hyperlink to orkin paper" Text="One think I think is important is to seperate why an agent wants to acomplish something from how it does it.  [Goal-orientated Action Planners][1] do this well, but there are also other solutions.  This gives you great flexibility for constructing agents as you can pick and choose from a bucket of goals and a bucket of actions.&#xD;&#xA;&#xD;&#xA;Behaviour trees are designed to ecompass the whole solution - decision making as well as actions - and as such can be hard to maintain.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://web.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf" />
  <row Id="723" PostHistoryTypeId="2" PostId="402" RevisionGUID="2c8e60a4-e2ed-47ad-8208-84b6bd3e60d5" CreationDate="2010-07-15T08:45:05.033" UserId="266" Text="As someone else pointed out, C++ brings the advantage of big shoulders on which you can stand (BOOST, STL etc.). In the end, it is a personal choice, but I would choose C++ because of the available resources. If there are features in C++ that you don't wish to use, then don't use them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="724" PostHistoryTypeId="2" PostId="403" RevisionGUID="32fecd2f-9acc-461a-8394-98b37d5196ce" CreationDate="2010-07-15T08:51:30.243" UserId="267" Text="Since you mentioned Java I'd suggest to look into JGN (http://forum.captiveimagination.com/index.php/board,4.0.html), I've never really used it personally but I've heard good things about it on the JME forum. Documentation seems to be scarce though." />
  <row Id="725" PostHistoryTypeId="2" PostId="404" RevisionGUID="cedb1ca5-0350-420f-a86c-9b6ec3c57cd1" CreationDate="2010-07-15T08:51:52.740" UserId="202" Text="From my point of view the biggest challenges will be:&#xD;&#xA;&#xD;&#xA;- **Statelessness** of functional languages: The idea in games is that each entity has a state and this state is being modified from frame to frame. There are mechanics to mimic that behavior in some languages (for example functions with a &quot;!&quot; in plt scheme) but it feals kind of unnaturally.&#xD;&#xA;- **Order of execution**: In games some code parts depend on other code parts to be finished before executing. Functional languages generally don't make any guarantees about the order of execution of the arguments of a function. There are ways to mimic this behavior (for example &quot;&lt;code&gt;(begin...&lt;/code&gt;&quot; in plt scheme).&#xD;&#xA;&#xD;&#xA;Feel free to extend this list (and maybe to add some positive points^^)." />
  <row Id="726" PostHistoryTypeId="16" PostId="404" RevisionGUID="cedb1ca5-0350-420f-a86c-9b6ec3c57cd1" CreationDate="2010-07-15T08:51:52.740" UserId="202" />
  <row Id="727" PostHistoryTypeId="2" PostId="405" RevisionGUID="979fb4ab-474b-4598-9758-24d751ea96cf" CreationDate="2010-07-15T08:52:49.447" UserId="119" Text="There is a lot of hype around HTML5 but to say that Flash is largely being replaced by it is an overstatement. While video and audio tags may gain traction, gaming will be one area that holds out for a long time, not just because of better tooling and performance, but also because there is a business infrastructure built around distributing Swf files, that wouldn't easily adapt to HTML and js. The html5 games I have seen using canvas are roughly where flash was 7 years ago, and by the time ie9 is widely distributed enough that canvas is a viable option, Flash will have already introduced it's planned 3d and possibly hardware acceleration features.  " />
  <row Id="728" PostHistoryTypeId="2" PostId="406" RevisionGUID="b72ba06f-dbe9-4037-9d7e-fc70967c2b6d" CreationDate="2010-07-15T08:53:32.127" UserId="266" Text="The answer very much depends on your environment. I am currently working with Unity, so I use a mono based language (in my case C#, but Javascript and Boo are also options). &#xD;&#xA;The answer depends entirely on your specific circumstances.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="729" PostHistoryTypeId="2" PostId="407" RevisionGUID="2dd3a98c-1d24-440f-961e-e7efa3be9fde" CreationDate="2010-07-15T08:57:34.583" UserId="267" Text="You may want to look into Java solutions. LWJGL is a pretty decent OpenGL binding and was used for a number of commercial games already. There's also the official OpenGL binding called JOGL however afaik it's not as mature as LWJGL. You may also want to look at Jmonkeyengine which is a Scenegraph-API/Game Engine. Obviously since it's based on Java there are very few portability issues and with a decent VM (i.e. Suns 1.6 VM) performance is more than good enough for most cases. " />
  <row Id="730" PostHistoryTypeId="2" PostId="408" RevisionGUID="d899d044-4ceb-4209-a696-d782fbb7ca19" CreationDate="2010-07-15T09:10:53.070" UserId="266" Text="I have a good imagination, but poor organising skills.&#xD;&#xA;On the creative side, I have found it helpful in my case to use a tool to help me keep track of everything, and impose some overall structure. I use Writer's Café, which is flexible enough to be adapted for game design. I'm sure there are other tools available.&#xD;&#xA;Most important, I think, is to set milestones. That keeps you focussed, will allow you to measure progress, and should give you a sense of achievement when you reach them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="731" PostHistoryTypeId="2" PostId="409" RevisionGUID="c887566b-8332-47ef-a552-7235aa5d71f0" CreationDate="2010-07-15T09:14:33.210" UserId="72" Text="What things would you consider “a must” if you had to design an ATC Simulation?&#xD;&#xA;&#xD;&#xA;I’d come up with:&#xD;&#xA;&#xD;&#xA;* Scenario properties (location of runaways, obstacles,etc)&#xD;&#xA;* Aircrafts (operating limits, heading, fuel, altitude, speed, name…) &#xD;&#xA;* Aircraft AI (ability for the ‘pilots’ to obey your instructions with precision)&#xD;&#xA;* Weather (windspeed, visibility, clouds?, temperature?&#xD;&#xA;* …?&#xD;&#xA;&#xD;&#xA;Anything else you can come up with? If this turns to be a long list, we can always turn it into a community wiki.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="732" PostHistoryTypeId="1" PostId="409" RevisionGUID="c887566b-8332-47ef-a552-7235aa5d71f0" CreationDate="2010-07-15T09:14:33.210" UserId="72" Text="Air Traffic Simulation Design ideas" />
  <row Id="733" PostHistoryTypeId="3" PostId="409" RevisionGUID="c887566b-8332-47ef-a552-7235aa5d71f0" CreationDate="2010-07-15T09:14:33.210" UserId="72" Text="&lt;game-design&gt;" />
  <row Id="734" PostHistoryTypeId="2" PostId="410" RevisionGUID="fe640685-f8a7-40cc-bf5b-9cc412f6e49c" CreationDate="2010-07-15T09:19:33.307" UserId="266" Text="I also recommend Unity. The free version provides about 80% of the features of the paid version, and there is a large, active online support community.&#xD;&#xA;" />
  <row Id="735" PostHistoryTypeId="5" PostId="226" RevisionGUID="1f4cfd70-3343-4222-b476-9b78a1f0d583" CreationDate="2010-07-15T09:26:59.193" UserId="120" Comment="Merged in a few links from the other answers in this question, just to make sure nobody misses anything" Text="Graphics/Sound&#xD;&#xA;&#xD;&#xA; - [XNA][1]  High level wrapper on DirectX9. Allows you to get up and running quickly. Supports PC, Xbox360 and windows phone 7. Support Xact audio aswell as its own SoundEffect API.&#xD;&#xA; - [SlimDX][2] Lower level wrapper on DX9/10/11. If its in the DX SDK, its wrapped here.&#xD;&#xA; - [OpenTK][3] Wrapper on OpenGL/AL.&#xD;&#xA; - [SDL.net][4] A port of thr popular SDL lib.&#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [TorqueX][5] A 2D/3D engine for XNA. Good editor suppport, garage games have recently reinvested in the engine after a period of neglect.&#xD;&#xA; - [truevision 3d][6] C++ game engine with c# bindings&#xD;&#xA; - [Axiom][7] A rewrite of Ogre in c#. Supports numerous backed rendering APIs.&#xD;&#xA; - [Unity][8] is a C++ graphics/game engine that supports gameplay scripting in C#&#xD;&#xA; - [AngelXNA][9] A port of EALA's open source angle protoypeing framework&#xD;&#xA;&#xD;&#xA;Physics&#xD;&#xA;&#xD;&#xA;- [Farseer][10] A popular 2D physics engine, supports .net(desktop), compact(xbox) and micro(silverlight).&#xD;&#xA;- [Jitter][11] a realitivly new 3D physics engine, Much better than its completion.&#xD;&#xA;- [Box2Dx][12] A dirct port of box2D&#xD;&#xA;- [JigLib][13]&#xD;&#xA;- [BulletX][14] A c# port of Bullet, seems to be abandoned. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com&#xD;&#xA;  [2]: http://slimdx.org&#xD;&#xA;  [3]: http://www.opentk.com/&#xD;&#xA;  [4]: http://cs-sdl.sourceforge.net/index.php/Main_Page&#xD;&#xA;  [5]: http://www.torquepowered.com/products/torquex-3d&#xD;&#xA;  [6]: http://www.truevision3d.com/&#xD;&#xA;  [7]: http://axiom3d.net/&#xD;&#xA;  [8]: http://unity3d.com/&#xD;&#xA;  [9]: http://www.jeffongames.com/2009/05/angelxna-v10&#xD;&#xA;  [10]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [11]: http://www.jitter-physics.com/&#xD;&#xA;  [12]: http://code.google.com/p/box2dx&#xD;&#xA;  [13]: http://jiglibx.codeplex.com/&#xD;&#xA;  [14]: http://xnadevru.codeplex.com/wikipage?title=Managed%20Bullet%20Physics%20Library&amp;ProjectName=xnadevru" />
  <row Id="736" PostHistoryTypeId="2" PostId="411" RevisionGUID="cd912832-db67-412f-9d7a-c0eef0ab742c" CreationDate="2010-07-15T09:34:37.433" UserId="18" Text="The Real-Time Rendering website has a good list of [free books](http://realtimerendering.com/index.html#books). They're mostly about writing shaders, including books from the GPU Gems and ShaderX series." />
  <row Id="737" PostHistoryTypeId="16" PostId="411" RevisionGUID="cd912832-db67-412f-9d7a-c0eef0ab742c" CreationDate="2010-07-15T09:34:37.433" UserId="18" />
  <row Id="738" PostHistoryTypeId="2" PostId="412" RevisionGUID="1484acdb-84c6-484d-9682-661dab34719e" CreationDate="2010-07-15T09:41:43.863" UserId="269" Text="I have written some simple apps following the tutorials on http://learningwebgl.com. What is the simplest way to load and display Collada model files, particularly the files available from Google 3D Warehouse?" />
  <row Id="739" PostHistoryTypeId="1" PostId="412" RevisionGUID="1484acdb-84c6-484d-9682-661dab34719e" CreationDate="2010-07-15T09:41:43.863" UserId="269" Text="How do I load Collada models into a WebGL app?" />
  <row Id="740" PostHistoryTypeId="3" PostId="412" RevisionGUID="1484acdb-84c6-484d-9682-661dab34719e" CreationDate="2010-07-15T09:41:43.863" UserId="269" Text="&lt;webgl&gt;&lt;collada&gt;" />
  <row Id="741" PostHistoryTypeId="2" PostId="413" RevisionGUID="88c481ff-924b-4e52-936f-89d27f8533e2" CreationDate="2010-07-15T09:56:09.507" UserId="10" Text="[Blambot][1] has a nice selection free of fonts that are under it's [Free License][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blambot.com/fonts_dialogue.shtml&#xD;&#xA;  [2]: http://www.blambot.com/license.shtml" />
  <row Id="742" PostHistoryTypeId="2" PostId="414" RevisionGUID="f70a6bf1-6f50-453c-856e-16a349633de3" CreationDate="2010-07-15T10:17:01.120" UserId="259" Text="So let's say you've got a spline-based racing AI.  Assume it can already handle the basics of braking and steering around the track.&#xD;&#xA;&#xD;&#xA;How would you structure and implement collision avoidance, overtaking, drafting, blocking and other behaviours so your cars remain competitive but make interesting races?&#xD;&#xA;&#xD;&#xA;Links to papers/implementations would be awesome." />
  <row Id="743" PostHistoryTypeId="1" PostId="414" RevisionGUID="f70a6bf1-6f50-453c-856e-16a349633de3" CreationDate="2010-07-15T10:17:01.120" UserId="259" Text="Patterns for racing AI behaviour" />
  <row Id="744" PostHistoryTypeId="3" PostId="414" RevisionGUID="f70a6bf1-6f50-453c-856e-16a349633de3" CreationDate="2010-07-15T10:17:01.120" UserId="259" Text="&lt;ai&gt;&lt;programming&gt;" />
  <row Id="745" PostHistoryTypeId="16" PostId="414" RevisionGUID="f70a6bf1-6f50-453c-856e-16a349633de3" CreationDate="2010-07-15T10:17:01.120" UserId="259" />
  <row Id="746" PostHistoryTypeId="5" PostId="374" RevisionGUID="ca3b054f-bc93-4955-a171-415d3140b160" CreationDate="2010-07-15T10:33:11.497" UserId="254" Comment="Little grammar bit." Text="While I know that functional languages aren't the most commonly used for game writing, there are a lot of benefits associate with them that seem like they would be interesting in any programming context. Especially the ease of parallelization I would think could be very useful as focus is moving toward more and more processors. &#xD;&#xA;&#xD;&#xA;Also, with F# as a new member of the .NET family, it can be used directly with XNA, for example, which lowers the threshold quite a bit, as opposed to going with LISP, Haskell, Erlang, etc.&#xD;&#xA;&#xD;&#xA;If anyone has experience writing games with functional code, what has turned out to be the positives and negatives? What was it suited for, what not?" />
  <row Id="747" PostHistoryTypeId="2" PostId="415" RevisionGUID="1f615920-0fe2-4c86-baaa-e47a18bd1894" CreationDate="2010-07-15T10:49:58.090" UserId="252" Text="- Catastrophes. Volcanoes, you know ;)&#xD;&#xA;- Animations&#xD;&#xA;- consider sophisticated voice control for realism&#xD;&#xA;" />
  <row Id="748" PostHistoryTypeId="2" PostId="416" RevisionGUID="100413eb-d149-4791-8e94-7b3ef9a80508" CreationDate="2010-07-15T10:58:14.023" UserId="252" Text="There's a lot of open source resources at [osflash.org](http://osflash.org./), I remember having seen a Flash with Eclipse tutorial but can't find it right now...&#xD;&#xA;&#xD;&#xA;**edit** http://osflash.org./getting_started_with_fames" />
  <row Id="749" PostHistoryTypeId="2" PostId="417" RevisionGUID="264524a8-aee8-4e8e-bcde-5a432a50cf11" CreationDate="2010-07-15T11:17:49.420" UserId="18" Text="Some tutorials and other resources from my browser bookmarks:&#xD;&#xA;&#xD;&#xA;- [3D Vector Math Tutorial](http://chortle.ccsu.edu/VectorLessons/vectorIndex.html)&#xD;&#xA;- [Sin &amp; Cos: The Programmer's Pals!](http://pixwiki.bafsoft.com/mags/5/articles/circle/sincos.htm)&#xD;&#xA;- [Matrix and Quaternion FAQ](http://www.flipcode.com/documents/matrfaq.html)&#xD;&#xA;- [3D World Simulation](http://www.euclideanspace.com/)&#xD;&#xA;- [Game Rendering](http://www.gamerendering.com/)&#xD;&#xA;- [HyperGraph Computer Graphics](http://www.siggraph.org/education/materials/HyperGraph/toc.htm)&#xD;&#xA;- [Ray Casting Tutorial](http://www.permadi.com/tutorial/raycast/)&#xD;&#xA;- [Real-Time Rendering Resources](http://realtimerendering.com/index.html)&#xD;&#xA;- [Computer Graphics Algorithms Wiki](http://www.cgafaq.info/wiki/Main_Page)&#xD;&#xA;- [A* Pathfinding for Beginners](http://www.policyalmanac.org/games/aStarTutorial.htm)&#xD;&#xA;- [C++ FAQ LITE](http://www.parashift.com/c++-faq-lite/index.html)&#xD;&#xA;- [Modern C++](http://wiki.gamedev.net/index.php/C_plus_plus:Modern_C_plus_plus)&#xD;&#xA;- [Game Dev Wiki](http://wiki.gamedev.net/index.php/Main_Page)&#xD;&#xA;- [DevMaster Articles](http://www.devmaster.net/articles.php)&#xD;&#xA;- [Multi-threaded programming resources](http://www.geeks3d.com/20100418/game-engine-multi-threading-programming-resources/)&#xD;&#xA;- [ToyMaker Direct X Programming Tutorial](http://www.toymaker.info/Games/index.html)&#xD;&#xA;- [XBDEV](http://www.xbdev.net/index.php)&#xD;&#xA;- [Triple Buffer DirectX Tutorials](http://triplebuffer.devmaster.net/list.php?display=s&amp;page=0)&#xD;&#xA;- [32Bits.co.uk DirectX Tutorials](http://www.32bits.co.uk/)&#xD;&#xA;- [Programing DirectX Shaders](http://wiki.gamedev.net/index.php/D3DBook:Book_Cover)&#xD;&#xA;- [HLSL Shaders - Google Knol](http://knol.google.com/k/hlsl-shaders#)&#xD;&#xA;- [Riemers XNA Tutorials](http://www.riemers.net/)&#xD;&#xA;- [Introduction to Modern OpenGL](http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html)&#xD;&#xA;- [3D OpenGL Tutorials](http://www.falloutsoftware.com/3D-OpenGL-Tutorials.htm)&#xD;&#xA;- [Omniverous OpenGL FAQ](http://www.sjbaker.org/steve/omniv/)&#xD;&#xA;- [Swiftless OpenGL Tutorials](http://www.swiftless.com/)&#xD;&#xA;- [Song Ho's OpenGL Tutorials](http://www.songho.ca/opengl/index.html)&#xD;&#xA;- [Lighthouse 3D OpenGL Tutorials](http://www.lighthouse3d.com/opengl/tutorials.shtml)&#xD;&#xA;- [OpenGL Wiki](http://www.opengl3.org/wiki/Main_Page)&#xD;&#xA;- [Learning WebGL](http://learningwebgl.com/blog/)&#xD;&#xA;- [OpenGL ES Tutorial for Android](http://blog.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/)&#xD;&#xA;- [Tile Based Games in Flash](http://www.tonypa.pri.ee/tbw/start.html)&#xD;&#xA;- [Lazy Foo SDL tutorials](http://lazyfoo.net/SDL_tutorials/index.php)&#xD;&#xA;- [SDL and OSG Tutorials](http://www.cs.clemson.edu/~malloy/courses/3dgames-2007/tutor/)&#xD;&#xA;- [Implementing a Scripting Engine](http://www.flipcode.com/articles/scripting_issue01.shtml)&#xD;&#xA;- [Programming in Lua](http://www.lua.org/pil/index.html)&#xD;&#xA;- [3D Graphics Programming Tutorials](http://www.ozone3d.net/tutorials/)&#xD;&#xA;- [Game Programming Patterns](http://gameprogrammingpatterns.com/index.html)&#xD;&#xA;- [Reddit - Professional Game Loop](http://www.reddit.com/r/programming/comments/akmli/ask_proggit_how_do_professional_game_loops_work/)&#xD;&#xA;- [Aurora 3D Engine Tutorials](http://gamecode.tripod.com/tut/)&#xD;&#xA;- [Indie Gamedev Resources](http://www.gaminghorror.net/indie-game-developer-resources/)&#xD;&#xA;- [Sloperama Game Design FAQ](http://www.sloperama.com/advice.html)" />
  <row Id="750" PostHistoryTypeId="16" PostId="417" RevisionGUID="264524a8-aee8-4e8e-bcde-5a432a50cf11" CreationDate="2010-07-15T11:17:49.420" UserId="-1" />
  <row Id="751" PostHistoryTypeId="2" PostId="418" RevisionGUID="cc49089d-8146-45d1-b243-801ed0823db2" CreationDate="2010-07-15T11:21:24.423" UserId="279" Text="As above really, &#xD;&#xA;&#xD;&#xA;I'm writing an android based game in my spare time (android because it's free and I've no real aspirations to do anything commercial).&#xD;&#xA;&#xD;&#xA;The game logic comes from a very typical component based model whereby entities exist and have components attached to them and messages are sent to and fro in order to make things happen.&#xD;&#xA;&#xD;&#xA;Obviously the layer for actually performing that is thin, and if I were to write an iPhone version of this app, I'd have to re-write the renderer and core driver (of this component based system) in Objective C.&#xD;&#xA;&#xD;&#xA;The entities are just flat files determining the names of the components to be added, and the components themselves are simple, single-purpose objects containing the logic for the entity. &#xD;&#xA;&#xD;&#xA;Now, if I write all the logic for those components in Java, then I'd have to re-write them on Objective C if I decided to do an iPhone port. As the bulk of the application logic is contained within these components, they would, in an ideal world, be written in some platform-agnostic language/script/DSL which could then just be loaded into the app on whatever platform.&#xD;&#xA;&#xD;&#xA;I've been led to believe however that this is not an ideal world though, and that Lua performance etc on mobile devices still isn't up to scratch, that the overhead is too much and that I'd run into troubles later if I went down that route?&#xD;&#xA;&#xD;&#xA;Is this actually the case? Obviously this is just a hypothetical question, I'm happy writing them all in Java as it's simple and easy get things off the ground, but say I actually enjoy making this game (unlikely, given how much I'm currently disliking having to deal with all those different mobile devices) and I wanted to make a commercially viable game - would I use Lua or would I just take the hit when it came to porting and just re-write all the code?" />
  <row Id="752" PostHistoryTypeId="1" PostId="418" RevisionGUID="cc49089d-8146-45d1-b243-801ed0823db2" CreationDate="2010-07-15T11:21:24.423" UserId="279" Text="Should I be using Lua for game logic on mobile devices?" />
  <row Id="753" PostHistoryTypeId="3" PostId="418" RevisionGUID="cc49089d-8146-45d1-b243-801ed0823db2" CreationDate="2010-07-15T11:21:24.423" UserId="279" Text="&lt;android&gt;&lt;lua&gt;&lt;porting&gt;" />
  <row Id="754" PostHistoryTypeId="5" PostId="41" RevisionGUID="a3f1fcc1-fd63-4e1e-8c9a-0e34aae538b0" CreationDate="2010-07-15T11:31:35.043" UserId="278" Comment="spelling" Text="I'm looking for books, websites, tutorials, anything that will aid in beginning the journey from novice to expert." />
  <row Id="755" PostHistoryTypeId="4" PostId="41" RevisionGUID="a3f1fcc1-fd63-4e1e-8c9a-0e34aae538b0" CreationDate="2010-07-15T11:31:35.043" UserId="278" Comment="spelling" Text="What are some good resources for getting a beginner started in developing games?" />
  <row Id="758" PostHistoryTypeId="2" PostId="420" RevisionGUID="41e31eb6-1fa5-48e3-8f93-4826d75d98dd" CreationDate="2010-07-15T11:41:42.110" UserId="249" Text="There was a session partly about that at this year's AI Game Dev conference in Paris. You can find the slides and a summary here:&#xD;&#xA;&#xD;&#xA;http://aigamedev.com/open/coverage/paris10-report/#session9" />
  <row Id="759" PostHistoryTypeId="16" PostId="420" RevisionGUID="41e31eb6-1fa5-48e3-8f93-4826d75d98dd" CreationDate="2010-07-15T11:41:42.110" UserId="-1" />
  <row Id="760" PostHistoryTypeId="2" PostId="421" RevisionGUID="e04656b0-231a-4a9b-a1da-87909153eed2" CreationDate="2010-07-15T11:56:29.727" UserId="10" Text="Let's say I have a game written in C++. But I want to add some modding or scripting functionality to it. How would one go about adding a scripting functionality to your game?" />
  <row Id="761" PostHistoryTypeId="1" PostId="421" RevisionGUID="e04656b0-231a-4a9b-a1da-87909153eed2" CreationDate="2010-07-15T11:56:29.727" UserId="10" Text="How do you add a scripting language to a game?" />
  <row Id="762" PostHistoryTypeId="3" PostId="421" RevisionGUID="e04656b0-231a-4a9b-a1da-87909153eed2" CreationDate="2010-07-15T11:56:29.727" UserId="10" Text="&lt;c++&gt;&lt;scripting&gt;&lt;modification&gt;" />
  <row Id="763" PostHistoryTypeId="2" PostId="422" RevisionGUID="541b3eff-6311-4564-a6bb-29144ae86da0" CreationDate="2010-07-15T12:02:06.830" UserId="158" Text="**The most popular language:**&#xD;&#xA;&#xD;&#xA;See [Lua (Programming language)][1]  &#xD;&#xA;and [Lua (Programming langugae) - C API][2]&#xD;&#xA;&#xD;&#xA;**Example:**&#xD;&#xA;&#xD;&#xA;IBM has a great article on this: [Embedding LUA][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Lua_(programming_language)&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Lua_(programming_language)#C_API&#xD;&#xA;  [3]: http://www.ibm.com/developerworks/opensource/library/l-embed-lua/index.html" />
  <row Id="764" PostHistoryTypeId="2" PostId="423" RevisionGUID="aa24892e-904e-4b4d-98ee-1d0d4cd2e196" CreationDate="2010-07-15T12:09:25.927" UserId="259" Text="Lua's C implementation is specifically designed to run on embedded devices.  It's small and fast (for a scripting language).  I would have thought it was fine for at least light tasks." />
  <row Id="765" PostHistoryTypeId="5" PostId="264" RevisionGUID="ac61aba7-e9a9-4cbd-a121-e5efff5a6d6e" CreationDate="2010-07-15T12:20:17.527" UserId="158" Comment="added 2 characters in body" Text="Just like any other Flash game, just play test it a lot on the Opera channel to make sure that it fits that rather than your browser. Please note that a Flash game can not detect all buttons and swings..." />
  <row Id="766" PostHistoryTypeId="16" PostId="355" RevisionGUID="a39550be-1532-4711-aefa-8f29c337c6d9" CreationDate="2010-07-15T12:22:11.360" UserId="100" />
  <row Id="767" PostHistoryTypeId="16" PostId="159" RevisionGUID="88e15ae2-2a21-4356-b923-928a6a592142" CreationDate="2010-07-15T12:22:54.433" UserId="100" />
  <row Id="768" PostHistoryTypeId="2" PostId="424" RevisionGUID="ab042eda-a949-45d2-8a5f-3a8e96c6b8d7" CreationDate="2010-07-15T12:25:47.360" UserId="229" Text="[Action Arcade Adventure Set][1] by Dianna Gruber is a very detailed introduction to game development. Source code for a full-featured 2d side-scrolling game is developed over several chapters. Several more general topics are also covered, like marketing and the history of side-scrolling games.&#xD;&#xA;&#xD;&#xA;The book is now freely available online, but here is the [Amazon link][2] for reference.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fastgraph.com/makegames/sidescroller/contents.html&#xD;&#xA;  [2]: http://www.amazon.com/Action-Arcade-Adventure-Set-Create/dp/1883577063/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279196372&amp;sr=8-1" />
  <row Id="769" PostHistoryTypeId="16" PostId="424" RevisionGUID="ab042eda-a949-45d2-8a5f-3a8e96c6b8d7" CreationDate="2010-07-15T12:25:47.360" UserId="-1" />
  <row Id="770" PostHistoryTypeId="5" PostId="404" RevisionGUID="d97478fe-85e7-4c37-8ae0-ab2e49f12cca" CreationDate="2010-07-15T12:26:04.223" UserId="202" Comment="spelling" Text="From my point of view the biggest challenges will be:&#xD;&#xA;&#xD;&#xA;- **Statelessness** of functional languages: The idea in games is that each entity has a state and this state is being modified from frame to frame. There are mechanics to mimic that behavior in some languages (for example functions with a &quot;!&quot; in plt scheme) but it feels kind of unnaturally.&#xD;&#xA;- **Order of execution**: In games some code parts depend on other code parts to be finished before executing. Functional languages generally don't make any guarantees about the order of execution of the arguments of a function. There are ways to mimic this behavior (for example &quot;&lt;code&gt;(begin...&lt;/code&gt;&quot; in plt scheme).&#xD;&#xA;&#xD;&#xA;Feel free to extend this list (and maybe to add some positive points^^)." />
  <row Id="771" PostHistoryTypeId="2" PostId="425" RevisionGUID="f3307e88-9c3f-46eb-b785-9f4845d67a87" CreationDate="2010-07-15T12:27:43.377" UserId="18" Text="First of all, you should decide what part of your game is scripted. One option is to have a fully scripted game in the sense that while the time-critical backend operations are coded in C++, all the game logic is in the scripting language. Designers use the backend as a library called from the high level scripting language. On the other extreme, you can have few specific places where scripts are used, such as the user interface or scripted sequences, with the majority of the game code is still in C++. There are advantages to each approach (speed, flexibility, compilation time, scope of game, etc.), but you need to decide that beforehand.&#xD;&#xA;&#xD;&#xA;Once you know how you want to use scripting, you now need to decide if you're going to use an existing scripting language or your own. Today there are many scripting languages to choose from with different design goals and target audiences, so I'm not sure if it's worth creating your own anymore. You can read about implementing your own scripting engine [here](http://www.flipcode.com/articles/scripting_issue01.shtml).&#xD;&#xA;&#xD;&#xA;Some popular scripting languages include [Lua](http://www.lua.org/), which is lightweight and easy to embed. It uses a stack for communication between the host and embedded language and it was successfully used in many professional games. Another option is [AngelCode](http://www.angelcode.com/angelscript/), which allows you to call C and C++ functions directly. [Python](http://www.python.org/) and [Ruby](http://www.ruby-lang.org/en/) are a bit more complex to embed but once you have done that they are very pleasant to program in. If you want to embed Python then take a look at [Boost.Python](http://www.boost.org/doc/libs/1_43_0/libs/python/doc/index.html). You can also try embedding JavaScript and take advantage of the fast scripting engines developed for browsers. For my game we are using Google's [V8](http://code.google.com/p/v8/) engine which is very fast and easy to embed, but  Mozilla's [SpiderMonkey](http://www.mozilla.org/js/spidermonkey/) is another option." />
  <row Id="772" PostHistoryTypeId="2" PostId="426" RevisionGUID="e3f506a5-c332-4a28-af48-de73b55a31fc" CreationDate="2010-07-15T12:47:09.423" UserId="117" Text="A friend and I are doing a 2D XNA game. Thus far, the API seems really cool and performance is acceptable.  My question is more towards the release of it though.  As other developers how have done games, how well have they done for you on PC (as far as downloads, sales, etc)?  I know the statistics about the Xbox360 from seeing it personally but, I was curious as to how successful these were on PC?  " />
  <row Id="773" PostHistoryTypeId="1" PostId="426" RevisionGUID="e3f506a5-c332-4a28-af48-de73b55a31fc" CreationDate="2010-07-15T12:47:09.423" UserId="117" Text="Feasibility of an XNA game on PC" />
  <row Id="774" PostHistoryTypeId="3" PostId="426" RevisionGUID="e3f506a5-c332-4a28-af48-de73b55a31fc" CreationDate="2010-07-15T12:47:09.423" UserId="117" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;pc&gt;" />
  <row Id="775" PostHistoryTypeId="2" PostId="427" RevisionGUID="df9236ca-61fe-4f00-892f-573a4655978f" CreationDate="2010-07-15T12:53:01.033" UserId="282" Text="Must have:&#xD;&#xA;&#xD;&#xA; - realistic aircraft callsigns eg KL645&#xD;&#xA;         http://en.wikipedia.org/wiki/ICAO_airline_designator#ICAO_airline_designator&#xD;&#xA; - realistic airport and route points (ICAO routes, eg WSSS REDIX SJ WSSL)&#xD;&#xA;         http://en.wikipedia.org/wiki/International_Civil_Aviation_Organization_airport_code&#xD;&#xA;&#xD;&#xA;Things to consider:&#xD;&#xA;&#xD;&#xA; - geographic information about routes, airways, airspace sectors, uncontrolled airspace&#xD;&#xA; - hand-off of aircraft control between ATC Centers&#xD;&#xA; - simulation of aircraft emergency, eg. hijack, engine failure, etc&#xD;&#xA; - radar coverage and different types of surveillance&#xD;&#xA;" />
  <row Id="776" PostHistoryTypeId="2" PostId="428" RevisionGUID="4129b5f4-fbaf-4573-8711-0994975b3813" CreationDate="2010-07-15T12:58:48.073" UserId="120" Text="No idea on actual stats, but it might be worth seing if you can find anything about [blueberry garden][1] and [flotilla][2]. Both are written with XNA and both are avalible on steam. Flotilla even has steamworks support built in&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/app/29160/&#xD;&#xA;  [2]: http://store.steampowered.com/app/55000/" />
  <row Id="777" PostHistoryTypeId="5" PostId="428" RevisionGUID="ab5dfdb5-f064-4eee-858e-6611d73cc768" CreationDate="2010-07-15T13:04:00.090" UserId="120" Comment="added 33 characters in body" Text="No idea on actual stats, but it might be worth seing if you can find anything about [blueberry garden][1] and [flotilla][2]. Both are written with XNA and both are avalible on steam. Flotilla even has some steamworks (just friendlist i believe) support built in&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/app/29160/&#xD;&#xA;  [2]: http://store.steampowered.com/app/55000/" />
  <row Id="778" PostHistoryTypeId="2" PostId="429" RevisionGUID="c157f2ec-0434-49a8-aec1-8d22fbd224b6" CreationDate="2010-07-15T13:10:25.320" UserId="10" Text="I've been looking at Lua and Löve for developing simple 2D games. But since Lua is interpreted and I know it can be compiled to some point, but how secure is that to decompiling. Or is there a better way to distribute the game?" />
  <row Id="779" PostHistoryTypeId="1" PostId="429" RevisionGUID="c157f2ec-0434-49a8-aec1-8d22fbd224b6" CreationDate="2010-07-15T13:10:25.320" UserId="10" Text="Is it possible to develop a game with Lua/Löve and have the source code compiled?" />
  <row Id="780" PostHistoryTypeId="3" PostId="429" RevisionGUID="c157f2ec-0434-49a8-aec1-8d22fbd224b6" CreationDate="2010-07-15T13:10:25.320" UserId="10" Text="&lt;lua&gt;&lt;compile&gt;&lt;distribution&gt;" />
  <row Id="781" PostHistoryTypeId="2" PostId="430" RevisionGUID="2893ebb5-e48f-45cb-bff9-84c0a44b3bb3" CreationDate="2010-07-15T13:10:52.667" UserId="229" Text="**I chose [Zoidcom][1] because it is well-designed has excellent documentation and examples:**&#xD;&#xA;&#xD;&#xA;&gt; The Zoidcom network library is a&#xD;&#xA;&gt; high-level, UDP based networking&#xD;&#xA;&gt; library providing features for&#xD;&#xA;&gt; automatic replication of gameobjects&#xD;&#xA;&gt; and synchronization of their states&#xD;&#xA;&gt; over a network connection in a highly&#xD;&#xA;&gt; bandwidth efficient manner. This is&#xD;&#xA;&gt; achieved by multiplexing and&#xD;&#xA;&gt; demultiplexing object information from&#xD;&#xA;&gt; and into bitstreams, which make it&#xD;&#xA;&gt; easily possible to avoid sending&#xD;&#xA;&gt; redundant data. Bools only take one&#xD;&#xA;&gt; single bit, integers and floats are&#xD;&#xA;&gt; stripped down to as many bits as&#xD;&#xA;&gt; needed.&#xD;&#xA;&gt; &#xD;&#xA;&gt; A great deal of the tedious work that&#xD;&#xA;&gt; appears when attempting to develop an&#xD;&#xA;&gt; efficient network protocol is handled&#xD;&#xA;&gt; by Zoidcom, e.g. deciding when to send&#xD;&#xA;&gt; which data to which client, how to get&#xD;&#xA;&gt; it efficiently and reliably through&#xD;&#xA;&gt; the line, what to do when data gets&#xD;&#xA;&gt; lost and a lot more.&#xD;&#xA;&#xD;&#xA;**Some open source games made using Zoidcom:**&#xD;&#xA;&#xD;&#xA;- [Gusanos][2]&#xD;&#xA;- [Hovercraft Universe][3]&#xD;&#xA;&#xD;&#xA;**License:**&#xD;&#xA;&#xD;&#xA;&gt; Zoidcom is freely available for&#xD;&#xA;&gt; noncommercial use and will stay so.&#xD;&#xA;&gt; Commercial and shareware licenses are&#xD;&#xA;&gt; available on request, official licence&#xD;&#xA;&gt; announcement will be made available&#xD;&#xA;&gt; with release 1.0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zoidcom.com/&#xD;&#xA;  [2]: http://gusanos.sourceforge.net/&#xD;&#xA;  [3]: http://code.google.com/p/uhasseltaacgua/" />
  <row Id="782" PostHistoryTypeId="4" PostId="302" RevisionGUID="5c91ffce-e861-43a8-81ad-46f1b7fb4b1d" CreationDate="2010-07-15T13:16:56.850" UserId="58" Comment="shortened title" Text="Tools for generating texture atlases/sprites from source images?" />
  <row Id="783" PostHistoryTypeId="2" PostId="431" RevisionGUID="ee452d24-b1d4-4fd1-bc2c-1ae883e1418b" CreationDate="2010-07-15T13:19:12.150" UserId="204" Text="Back in the day, TCP connections over dialup/ISDN/slow broadband resulted in choppy, laggy games because a single dropped packet resulted in a resync. That meant a lot of game developers had to implement their own reliability layer on top of UDP, or they used UDP for messages that could be dropped or received out of order, and used a parallel TCP connection for information that must be reliable.&#xD;&#xA;&#xD;&#xA;Given the average user has faster network connections now, can a real time game such as an FPS give good performance over a TCP connection?" />
  <row Id="784" PostHistoryTypeId="1" PostId="431" RevisionGUID="ee452d24-b1d4-4fd1-bc2c-1ae883e1418b" CreationDate="2010-07-15T13:19:12.150" UserId="204" Text="Is the TCP protocol good enough for real-time multiplayer games?" />
  <row Id="785" PostHistoryTypeId="3" PostId="431" RevisionGUID="ee452d24-b1d4-4fd1-bc2c-1ae883e1418b" CreationDate="2010-07-15T13:19:12.150" UserId="204" Text="&lt;network&gt;" />
  <row Id="786" PostHistoryTypeId="2" PostId="432" RevisionGUID="0820650b-a939-403e-b008-efbd37fe4e25" CreationDate="2010-07-15T13:19:53.317" UserId="259" Text="You can precompile lua using the luac tool in the standard distribution:&#xD;&#xA;&#xD;&#xA;    luac myluafile.lua -o mycompiledluafile.luac&#xD;&#xA;&#xD;&#xA;To obfusticate the file, use the `-s` option to remove all the debug info.  This won't make you immune to [decompiling][1], but why does that matter?&#xD;&#xA;&#xD;&#xA;The `-l` option produces an annotated bytefile, which is really nice for learning how lua works deep down.&#xD;&#xA;&#xD;&#xA;The main advantages of compiling are faster loading times and smaller disk space.  However you don't get a performance increase after that - the lua compiler does very little optimisations, even to the point of still including `if(false)` branches and the like.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://luadec.luaforge.net/" />
  <row Id="787" PostHistoryTypeId="2" PostId="433" RevisionGUID="1c781c4a-bfda-4598-92a5-f58a766890f8" CreationDate="2010-07-15T13:22:43.373" UserId="283" Text="I have added some social features to an iPhone game (Lexitect if you're curious), such as email, Twitter, and Facebook integration for sharing high scores.  Along with these features, I am measuring how many times users make it to each step. The goal of these features are to make the game more viral, and I am trying to get to a measure of game virality.&#xD;&#xA;&#xD;&#xA;I would think that a game virality metric would produce a number based on 1.0, where 1.0 = zero viral growth, and 1.01 would represent 1% viral growth over some unit of time.&#xD;&#xA;&#xD;&#xA;How is virality normally measured, and in what units?  How is time capped on the metric?  i.e. if I gave each player a year to determine how many recommendations they make, I wouldn't get any real numbers for a year from the time I start tracking it.  Are there any standards for tracking virality in a meaningful way?" />
  <row Id="788" PostHistoryTypeId="1" PostId="433" RevisionGUID="1c781c4a-bfda-4598-92a5-f58a766890f8" CreationDate="2010-07-15T13:22:43.373" UserId="283" Text="What is a good way to measure game virality?" />
  <row Id="789" PostHistoryTypeId="3" PostId="433" RevisionGUID="1c781c4a-bfda-4598-92a5-f58a766890f8" CreationDate="2010-07-15T13:22:43.373" UserId="283" Text="&lt;social&gt;&lt;facebook&gt;&lt;twitter&gt;" />
  <row Id="790" PostHistoryTypeId="6" PostId="7" RevisionGUID="ba0a31f1-2513-4f46-a79c-2a69fa7ac91f" CreationDate="2010-07-15T13:31:47.377" UserId="283" Comment="edited tags" Text="&lt;c#&gt;&lt;xna&gt;&lt;java&gt;&lt;pitfalls&gt;&lt;belongsonstackoverflow&gt;" />
  <row Id="791" PostHistoryTypeId="2" PostId="434" RevisionGUID="091c637f-9346-4509-b3db-800b5b12419a" CreationDate="2010-07-15T13:33:02.363" UserId="6" Text="I would say no. Spacial information of game objects need to be as fast as possible, and for that it's better to use UDP, because reliability is not 100% crutial. Even on modern connections, UDP is still slow enough that you have to make some special considerations for interpolation and such. Even just in terms of the amount of data transferred, TCP would add significant overhead to this.&#xD;&#xA;&#xD;&#xA;However, TCP is perfectly acceptable for non-realtime things, such as multiplayer negotiation, chat messages, score updates, etc." />
  <row Id="792" PostHistoryTypeId="6" PostId="433" RevisionGUID="e45ae5a9-cb76-482c-ba00-405366151d44" CreationDate="2010-07-15T13:34:49.630" UserId="283" Comment="edited tags" Text="&lt;social&gt;&lt;facebook&gt;&lt;twitter&gt;&lt;marketing&gt;" />
  <row Id="793" PostHistoryTypeId="2" PostId="435" RevisionGUID="aad3fa6a-ebe6-4342-b9be-9f4484461474" CreationDate="2010-07-15T13:48:26.697" UserId="119" Text="As Flash doesn't support UDP, by looking at multiplayer Flash games you can get a pretty good idea of what's possible with TCP/IP and what isn't. Basically you can create real time games, as long as they don't rely on lightning-fast response times. A couple of examples:&#xD;&#xA;&#xD;&#xA;http://www.xgenstudios.com/play/stickarena&#xD;&#xA;&#xD;&#xA;http://everybodyedits.com/&#xD;&#xA;&#xD;&#xA;If you have the option of using UDP, you really should, but with Flash you sadly don't get that option.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="794" PostHistoryTypeId="2" PostId="436" RevisionGUID="b3b5f9b3-ff9f-46e4-a56b-cff2cf94d436" CreationDate="2010-07-15T13:48:50.407" UserId="6" Text="As far as scripting languages go, Lua is very fast, but like anything it varies depending on the processor. For example, Lua would not be great on a console platform because it tends to be very branchy, and some console platforms branch very slowly. To best answer your question, I would suggest running some benchmarks. See how fast Lua performs some various algorithms on the device. I suspect you'd be fine as long as you're not doing any heavy math or iteration in your script code. (You shouldn't be doing that anyway. They're scripts. Do calculations in the engine.)&#xD;&#xA;&#xD;&#xA;That said, scripting isn't a silver bullet for platform independence. You may need to rewrite in Obj-C anyway if you port to iPhone due to Apple's restrictions on executing dynamic code. I don't have a link offhand, but it may be worth reading into. Apple *barely* allows managed code (you have to get special permission to run a special distribution). They most certainly will not allow a Lua implementation into the app store." />
  <row Id="795" PostHistoryTypeId="2" PostId="437" RevisionGUID="a63c80ca-0ef3-4a45-8267-1c6985559bdd" CreationDate="2010-07-15T13:49:29.767" UserId="286" Text="With me going it alone in development I only have limited resources at my disposal i.e one pc with which I develop and test the game. so I only know for certain my game works with that setup.&#xD;&#xA;&#xD;&#xA;What options have I got in testing the game on the many different hardware/operating system combinations? Its a windows desktop game." />
  <row Id="796" PostHistoryTypeId="1" PostId="437" RevisionGUID="a63c80ca-0ef3-4a45-8267-1c6985559bdd" CreationDate="2010-07-15T13:49:29.767" UserId="286" Text="How do I determine my games minimum hardware/software requirements?" />
  <row Id="797" PostHistoryTypeId="3" PostId="437" RevisionGUID="a63c80ca-0ef3-4a45-8267-1c6985559bdd" CreationDate="2010-07-15T13:49:29.767" UserId="286" Text="&lt;hardware&gt;&lt;requirements&gt;&lt;testing&gt;" />
  <row Id="798" PostHistoryTypeId="2" PostId="438" RevisionGUID="714e5223-023e-4628-a58b-ae4116cd1125" CreationDate="2010-07-15T13:52:02.723" UserId="165" Text="The creator of [Sirlin Games][1] has posted a great book on-line called [Playing To Win][2]. It comes in three forms, a book from Lulu, an e-book from Amazon (not free), and on-line as HTML. So even if it's not a free e-book as in the OP, it's still free to read (and you could download all the HTML pages if you really wanted to read if offline).&#xD;&#xA;&#xD;&#xA;It's purely the psychology of *competitive* game design, no code. Definitely orth reading.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sirlin.net/&#xD;&#xA;  [2]: http://www.sirlin.net/ptw/" />
  <row Id="799" PostHistoryTypeId="16" PostId="438" RevisionGUID="714e5223-023e-4628-a58b-ae4116cd1125" CreationDate="2010-07-15T13:52:02.723" UserId="-1" />
  <row Id="800" PostHistoryTypeId="2" PostId="439" RevisionGUID="317356b6-4f6e-4459-bb70-35d76e23c916" CreationDate="2010-07-15T13:55:15.917" UserId="267" Text="Off the top of my head I'd suggest trying to run the game on a few other PCs from friends or relatives. After that you might want to consider some form of beta test, i.e. publishing a demo or something so you can get community feedback." />
  <row Id="801" PostHistoryTypeId="2" PostId="440" RevisionGUID="ddbe5eba-7ecd-415a-b3bb-40329e74c226" CreationDate="2010-07-15T13:58:47.640" UserId="159" Text="By creating your game using XNA, you are not going to hurt your sales too much. (Granted, users on Mac/Linux won't be able to play). What is going to be a bigger factor is the advertising, teasers, demo, and actual game play. &#xD;&#xA;&#xD;&#xA;Most windows users are going to have everything they need to play your game. If you want to be really cautious I ubelieve you can have the installer check for requirements such as .net, xna runtime, directX, etc... And prompt them to install it.&#xD;&#xA;&#xD;&#xA;Essentially, don't think that by using XNA, pure DirectX, or Direct3D that you will get bigger sales. You do get a bigger audience, but that doesn't equate to sales.&#xD;&#xA;&#xD;&#xA;Focus on making a great game, invest some money in advertising (create a Facebook fan page and see if you can create some buzz there), spend time making a good teaser video, and most of all build a fun demo.    " />
  <row Id="802" PostHistoryTypeId="5" PostId="438" RevisionGUID="fb383459-a19b-4a52-a876-f9af81eaf6d8" CreationDate="2010-07-15T14:04:28.420" UserId="165" Comment="added 1 characters in body" Text="The creator of [Sirlin Games][1] has posted a great book on-line called [Playing To Win][2]. It comes in three forms, a book from Lulu, an e-book from Amazon (not free), and on-line as HTML. So even if it's not a free e-book as in the OP, it's still free to read (and you could download all the HTML pages if you really wanted to read if offline).&#xD;&#xA;&#xD;&#xA;It's purely the psychology of *competitive* game design, no code. Definitely worth reading.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sirlin.net/&#xD;&#xA;  [2]: http://www.sirlin.net/ptw/" />
  <row Id="803" PostHistoryTypeId="2" PostId="441" RevisionGUID="3e0d7103-a3e2-49a6-af1b-955d3464df22" CreationDate="2010-07-15T14:06:10.820" UserId="202" Text="&lt;h3&gt;Anti-Pattern: Opponents adapting their speed&lt;/h3&gt;&#xD;&#xA;&lt;p&gt;Unfortunately I'm not able to give You patterns, but I would like to name an anti pattern. Please do not try to adapt the speed of the AI drivers to the one of the human player. The idea behind this is to create fair racing conditions for amateurs as well as pros and to abandon the need of multiple difficulty levels (and their implementation).&lt;/p&gt;&#xD;&#xA;&lt;p&gt;However, what sounds good on paper turns out to be awful in practice and the &lt;a href=&quot;http://en.wikipedia.org/wiki/MotoGP_07&quot;&gt;MotoGP series&lt;/a&gt; failed miserably at implementing this behavior. It ended up in the opponents driving at 5mp/h when you stood still for a couple of seconds and the impossibility to tell whether you've improved in the game (very bad feedback wise)&lt;/p&gt;" />
  <row Id="804" PostHistoryTypeId="16" PostId="441" RevisionGUID="3e0d7103-a3e2-49a6-af1b-955d3464df22" CreationDate="2010-07-15T14:06:10.820" UserId="-1" />
  <row Id="805" PostHistoryTypeId="6" PostId="351" RevisionGUID="5faa667e-43d3-4557-8795-4750d13efeda" CreationDate="2010-07-15T14:07:31.610" UserId="165" Comment="edited tags" Text="&lt;game-engine&gt;&lt;3d&gt;" />
  <row Id="806" PostHistoryTypeId="2" PostId="442" RevisionGUID="9e35a04e-16b5-4403-b35f-3a4f0a463834" CreationDate="2010-07-15T14:11:14.537" UserId="165" Text="[Google Pacman][1] has to be one of the more impressive JS/HTML5 games I've seen (granted, it's the *only* one I've seen, but it's still *really* impressive :)&#xD;&#xA;&#xD;&#xA;[Source Code locations][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/pacman/&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2890937/pacman-on-google-homepage-how-is-it-implemented" />
  <row Id="807" PostHistoryTypeId="2" PostId="443" RevisionGUID="888bbe49-4476-4456-a362-ec5dd84cad16" CreationDate="2010-07-15T14:18:17.763" UserId="100" Text="Now we have a lot of information on the internet, out there is plenty of engines, SDKs, fancy IDEs, etc.    &#xD;&#xA;But how the people managed to develop games in the past? Are there 'famous' tools? What was the most used programming language? how was the deployment into cartridges?" />
  <row Id="808" PostHistoryTypeId="1" PostId="443" RevisionGUID="888bbe49-4476-4456-a362-ec5dd84cad16" CreationDate="2010-07-15T14:18:17.763" UserId="100" Text="How was the 8-bits and 16-bits game development?" />
  <row Id="809" PostHistoryTypeId="3" PostId="443" RevisionGUID="888bbe49-4476-4456-a362-ec5dd84cad16" CreationDate="2010-07-15T14:18:17.763" UserId="100" Text="&lt;old-school&gt;" />
  <row Id="810" PostHistoryTypeId="16" PostId="443" RevisionGUID="888bbe49-4476-4456-a362-ec5dd84cad16" CreationDate="2010-07-15T14:18:17.763" UserId="100" />
  <row Id="811" PostHistoryTypeId="2" PostId="444" RevisionGUID="feb35ec3-9450-4159-8216-8fbfcceb2354" CreationDate="2010-07-15T14:23:16.503" UserId="10" Text="Assembly and C were the languages often. For example: [RollerCoaster Tycoon][1] was written by 1 guy in assembly.&#xD;&#xA;&#xD;&#xA;You can look at this [Nes Dev site][2] that goes into the development of homebrew NES games. I even found this [Source Code for an old SNES game][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/RollerCoaster_Tycoon&#xD;&#xA;  [2]: http://nesdev.parodius.com/&#xD;&#xA;  [3]: http://eludevisibility.org/spacy-funky-bob-source-code/" />
  <row Id="812" PostHistoryTypeId="16" PostId="444" RevisionGUID="feb35ec3-9450-4159-8216-8fbfcceb2354" CreationDate="2010-07-15T14:23:16.503" UserId="-1" />
  <row Id="813" PostHistoryTypeId="6" PostId="7" RevisionGUID="40e00698-e826-4ee6-a81a-36b7a52d8fa5" CreationDate="2010-07-15T14:23:55.910" UserId="288" Comment="edited tags" Text="&lt;c#&gt;&lt;xna&gt;&lt;java&gt;&lt;pitfalls&gt;" />
  <row Id="814" PostHistoryTypeId="2" PostId="445" RevisionGUID="0c67e22e-a299-497d-9ade-a0399f8dbe00" CreationDate="2010-07-15T14:29:17.237" UserId="289" Text="what is wrong with Linux/*nix family for game? what make the development of game in this platform too slow compared to windows or even osx?" />
  <row Id="815" PostHistoryTypeId="1" PostId="445" RevisionGUID="0c67e22e-a299-497d-9ade-a0399f8dbe00" CreationDate="2010-07-15T14:29:17.237" UserId="289" Text="why lack of game in linux?" />
  <row Id="816" PostHistoryTypeId="3" PostId="445" RevisionGUID="0c67e22e-a299-497d-9ade-a0399f8dbe00" CreationDate="2010-07-15T14:29:17.237" UserId="289" Text="&lt;windows&gt;&lt;platform&gt;&lt;linux&gt;&lt;operating-system&gt;" />
  <row Id="817" PostHistoryTypeId="2" PostId="446" RevisionGUID="e194d356-9b46-44bd-b716-3e0d1e3ff377" CreationDate="2010-07-15T14:33:39.067" UserId="289" Text="the positive would be **performance** and **portability** and the negative would be **managing complexity**, game today are seriously complex and need tools or programming language that can manage the complexity better, such as object-oriented methodology or generic programming which is hard to implement in functional programming language." />
  <row Id="818" PostHistoryTypeId="2" PostId="447" RevisionGUID="60a2ae96-8a97-4c6e-b2aa-7fcf1243743d" CreationDate="2010-07-15T14:34:47.850" UserId="291" Text="For game clients, it mostly has to do with culture, leading to difficult monetization strategies. &#xD;&#xA;&#xD;&#xA;Servers for multiplayer games, on the other hand, have gotten a lot of traction for linux/nix, it is a very attractive platform for developing server technology. &#xD;&#xA;&#xD;&#xA;There is hope that eventual release of Steam for Linux will help change that culture when it comes to clients, and provide developers and publishers a more monetarily viable platform for distributing games." />
  <row Id="819" PostHistoryTypeId="2" PostId="448" RevisionGUID="43e7438c-ec19-4532-b197-c442ee1e9d26" CreationDate="2010-07-15T14:36:07.720" UserId="267" Text="What do you mean with too slow? I don't think that gamedev for linux is any slower than for other operating systems. If you meant to ask why there are no commercial games developed for linux I'd guess it's mostly because the market is too small. There was a company that started to port commercial windows games to linux but they closed down because they hadn't any success selling those games iirc. &#xD;&#xA;Futhermore if you want to develop a game for linux you still need to provide it for windows as well if you want to make enough money, however developing it in such a cross-platform manner is even more costly and the linux market is probably not worth it. &#xD;&#xA;So I'd say it's just not cost-effective." />
  <row Id="820" PostHistoryTypeId="2" PostId="449" RevisionGUID="f35e5133-aa09-4419-9c77-2b79e362c82e" CreationDate="2010-07-15T14:36:34.427" UserId="10" Text="The common game user is not a linux user. So the market is not there and not wise to spend money trying to focus on that market.&#xD;&#xA;&#xD;&#xA;I know that id Software try to release a linux client of their games, just because they are awesome and love the platform." />
  <row Id="821" PostHistoryTypeId="2" PostId="450" RevisionGUID="413b27a1-46b4-420d-9c97-42d638c09cf3" CreationDate="2010-07-15T14:38:52.160" UserId="292" Text="There's nothing wrong with the Linux/*nix family of OSes for game development except for perceived audience.  Most devs feel that the effort to create games for Linux won't translate into copies sold of their games, especially in the AAA communities.&#xD;&#xA;&#xD;&#xA;Even several companies that just ported even AAA games to linux (didn't even pay the upfront cost of developing the game) have not been able to generate enough sales on that platform to stay afloat.&#xD;&#xA;&#xD;&#xA;That said, Linux can be a boon to many indie devs, because there are some Linux zealots will buy a game simply because it comes out on Linux." />
  <row Id="822" PostHistoryTypeId="5" PostId="436" RevisionGUID="53097dcf-3446-46aa-8b41-4c14e9a7de48" CreationDate="2010-07-15T14:38:52.223" UserId="6" Comment="added 102 characters in body" Text="As far as scripting languages go, Lua is very fast, but like anything it varies depending on the processor. For example, Lua would not be great on a console platform because it tends to be very branchy, and some console platforms branch very slowly. To best answer your question, I would suggest running some benchmarks. See how fast Lua performs some various algorithms on the device. I suspect you'd be fine as long as you're not doing any heavy math or iteration in your script code. (You shouldn't be doing that anyway. They're scripts. Do calculations in the engine.)&#xD;&#xA;&#xD;&#xA;That said, scripting isn't a silver bullet for platform independence. You may need to rewrite in Obj-C anyway if you port to iPhone due to Apple's restrictions on executing dynamic code. I don't have a link offhand, but it may be worth reading into. Apple *barely* allows managed code (you have to get special permission to run a special distribution). They most certainly will not allow a Lua implementation into the app store.&#xD;&#xA;&#xD;&#xA;[edit] Apparently I was mistaken about the Lua on iphone thing. Take a look at the comments below." />
  <row Id="829" PostHistoryTypeId="2" PostId="453" RevisionGUID="83bee92b-30f6-4d66-a751-b4ef5e422017" CreationDate="2010-07-15T14:47:51.607" UserId="204" Text="Punkbuster exists just to prevent cheating, and yet cheating is common in punkbuster enabled games. Modern Warefare 2 is seriously locked down from the end user running their own server or making any mods, and cheating happens constantly.&#xD;&#xA;&#xD;&#xA;For a multiplayer game where each client is running on a PC, what can be done to reduce or eliminate cheating?" />
  <row Id="830" PostHistoryTypeId="1" PostId="453" RevisionGUID="83bee92b-30f6-4d66-a751-b4ef5e422017" CreationDate="2010-07-15T14:47:51.607" UserId="204" Text="What are some ways to prevent or reduce cheating in online multiplayer games?" />
  <row Id="831" PostHistoryTypeId="3" PostId="453" RevisionGUID="83bee92b-30f6-4d66-a751-b4ef5e422017" CreationDate="2010-07-15T14:47:51.607" UserId="204" Text="&lt;multiplayer&gt;&lt;anti-cheat&gt;&lt;security&gt;" />
  <row Id="832" PostHistoryTypeId="2" PostId="454" RevisionGUID="ccbc9dbb-a79d-4d16-b117-2cd54a2429f3" CreationDate="2010-07-15T14:56:19.340" UserId="51" Text="At the most extreme solution, you basically never trust the client.  For games like MMOs, users don't run their servers, and any gameplay logic is handled server side.  Never give the client the authority to say &quot;I have X health&quot; or &quot;I have X ammo&quot;, etc." />
  <row Id="833" PostHistoryTypeId="2" PostId="455" RevisionGUID="c25d985b-d6e2-4041-b521-3e5278ab7c84" CreationDate="2010-07-15T14:59:15.013" UserId="8" Text="Are there any good resources for learning about game architectures? I am looking for high level overviews of different architectures. I tend to find information about the various pieces of a game such as entities, physics engines, scripting, etc but not about how to bring all of the pieces together.&#xD;&#xA;&#xD;&#xA;As a bonus, how does the type of game influence this? For example, a platformer and an MMO would have differences" />
  <row Id="834" PostHistoryTypeId="1" PostId="455" RevisionGUID="c25d985b-d6e2-4041-b521-3e5278ab7c84" CreationDate="2010-07-15T14:59:15.013" UserId="8" Text="Game Architecture" />
  <row Id="835" PostHistoryTypeId="3" PostId="455" RevisionGUID="c25d985b-d6e2-4041-b521-3e5278ab7c84" CreationDate="2010-07-15T14:59:15.013" UserId="8" Text="&lt;books&gt;&lt;game-design&gt;&lt;articles&gt;&lt;architecture&gt;" />
  <row Id="836" PostHistoryTypeId="2" PostId="456" RevisionGUID="ae9a8e9c-0da9-4368-b2f1-69254093bf5c" CreationDate="2010-07-15T15:00:01.330" UserId="279" Text="It depends how they're cheating, focusing on one of the primary ways of creating cheats, other processes latching into your application and modifying it - you can enumerate through all other processes, and hook their memory manipulation methods, and their keyboard/mouse emulation methods. &#xD;&#xA;&#xD;&#xA;Wallhacks are typically written by injecting code between your process and the DirectX/GL libraries to set the transparency on materials so they can be seen through. You can add some code to your scenegraph/culling system to specifically not draw other players/useful entities if they're behind walls (to prevent cheating that way).&#xD;&#xA;&#xD;&#xA;If you're going multiplayer and want to prevent packets being modified between client/server, then creating a checksum of the data you're sending via some algorithm of your own and checking this as it comes through on the other side can be effective. (You will probably end up doing this anyway for various QA purposes). &#xD;&#xA;&#xD;&#xA;The same goes for most of your in-memory resources, creating a checksum at the beginning of a frame, and verifying it at various stages can yield in some pretty handy memory manipulation detection.&#xD;&#xA;&#xD;&#xA;This is quite an involved topic, but hopefully this sets you in a vaguely acceptable direction.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="837" PostHistoryTypeId="2" PostId="457" RevisionGUID="1c376dc0-7ba5-41e0-9815-1e5b6dc55b76" CreationDate="2010-07-15T15:01:26.130" UserId="247" Text="Objective-C for iPhone of course." />
  <row Id="839" PostHistoryTypeId="2" PostId="458" RevisionGUID="8eed740a-03fe-49f0-b5d2-30bd1298082a" CreationDate="2010-07-15T15:10:25.097" UserId="279" Text="I think for *overall* architectural knowledge, experience/trial/error are the main resources.&#xD;&#xA;&#xD;&#xA;Because the overall architecture WILL change so much based on the kind of game you're writing, looking at resources/papers on entity systems/engines/scripting/etc and putting it together into something that has meaning in your own application is the best way to learn.&#xD;&#xA;&#xD;&#xA;That said, I really like the Game Programming Gems books for going into depth on the individual components that you can use in your games, I still commonly use a lot of the ideas published in them across my professional activities, as well as in my hobby-code." />
  <row Id="840" PostHistoryTypeId="2" PostId="459" RevisionGUID="b1d5c829-412b-4ea0-94ad-a90a317c2e8c" CreationDate="2010-07-15T15:10:40.087" UserId="292" Text="My good friend Joel posted a talk he gave at a conference concerning the architecture he ended up using on some PS1 games.  Though the talk is specific, he ends up bringing it all back to general advice about what to look for in a good architecture.&#xD;&#xA;&#xD;&#xA;Talk is here:&#xD;&#xA;http://jdinolt.tumblr.com/post/756062883/hrraaah-ego-trippin-my-first-talk-at-the-igad" />
  <row Id="841" PostHistoryTypeId="2" PostId="460" RevisionGUID="3e2bc62e-a3c8-46dd-89f8-1d02cd0a12e7" CreationDate="2010-07-15T15:11:02.583" UserId="194" Text="For one, the geometry pipeline needs to be as simple as possible and just push geometry to the GPU with quite basic LOD management on it.&#xD;&#xA;&#xD;&#xA;I did a presentation at Siggraph 2007 titled [Terrain Rendering in Frostbite using Procedural Shader Splatting][1] which goes into some detail of how we handle both the geometry LOD and the general texture and shading of the terrain. We use a combination of semi-procedural shaders in multiple layers. This is also covered in some more detail in the course notes for the talk ([pdf][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://repi.blogspot.com/2009/01/conference-slides.html&#xD;&#xA;  [2]: http://ati.amd.com/developer/SIGGRAPH07/Chapter5-Andersson-Terrain_Rendering_in_Frostbite.pdf" />
  <row Id="843" PostHistoryTypeId="5" PostId="455" RevisionGUID="cc3ba975-f545-4e5d-b669-900699630d4f" CreationDate="2010-07-15T15:15:24.393" UserId="8" Comment="Added period at the end of the last sentence." Text="Are there any good resources for learning about game architectures? I am looking for high level overviews of different architectures. I tend to find information about the various pieces of a game such as entities, physics engines, scripting, etc but not about how to bring all of the pieces together.&#xD;&#xA;&#xD;&#xA;As a bonus, how does the type of game influence this? For example, a platformer and an MMO would have differences." />
  <row Id="845" PostHistoryTypeId="2" PostId="462" RevisionGUID="1567bf39-a2a4-4358-9130-2744b181d34b" CreationDate="2010-07-15T15:21:27.423" UserId="288" Text="I don't have any stats to compare the differences between XNA and non-XNA game sales - I'd suggest that data is impossible to come by - but I imagine it would show there is no difference for equivalent games. So let me answer your question with a run through of the major issues specific to distribution of XNA games on PC (particularly online):&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;First of all: For an XNA game to run the system needs to have installed: the XNA Framework, and the .NET Framework.&#xD;&#xA;&#xD;&#xA;The XNA Framework is a fairly small download, easy to install, but will requires admin privileges - so will cause a UAC prompt as well as a EULA prompt. The framework is not upwards or downwards compatible - but can be installed side-by-side. (ie: a XNA 3.1 game needs XNA 3.1 and won't run on XNA 4.0).&#xD;&#xA;&#xD;&#xA;The .NET Framework 2.0 is bundled on Vista and above, so I recommend targeting that (Project Properties -&gt; Target Framework).&#xD;&#xA;&#xD;&#xA;The .NET 3.5 installation is very, very slow - I recommend avoiding it. I'm not sure about the full 4.0 installation, but the 4.0 Client Profile install is fast enough if you need newer .NET features (you probably don't - you can still use [lambdas][1] and [extension methods][2] in .NET 2.0).&#xD;&#xA;&#xD;&#xA;A .NET Framework install will of course cause a UAC and EULA prompt. It can also cause a reboot.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Currently the &quot;standard&quot; way to distribute XNA games is with ClickOnce. You can do an online install - the downside is that your user gets a small &quot;bootstrap&quot; installer executable that pulls all the loose game files from your website. Alternately you can just distribute all those loose files and the installer in a zip. Neither of these is a self-contained executable file like users expect from most games.&#xD;&#xA;&#xD;&#xA;A major pain of ClickOnce is that it will display several warnings about downloading unsigned software, which can look quite scary.&#xD;&#xA;&#xD;&#xA;Another other downside of ClickOnce is that you don't have much control over things like, for example, what start menu entries you have.&#xD;&#xA;&#xD;&#xA;The upside to using ClickOnce is that it's very easy to set up, and it will automatically download and install the required frameworks from Microsoft's website.&#xD;&#xA;&#xD;&#xA;I am under the impression that these issues with ClickOnce can be solved by using an MSI instead - and it can still automatically download and install the required frameworks. I'm afraid I don't have specific instructions for this on hand.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you do your own installation, or no installation at all, you need to be aware that your game executable will crash with an extremely unhelpful error message if the required frameworks are missing!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Oh, and your install might be a bit bigger (or a lot, if you include frameworks). If you're using XNA's built in content stuff (and why not, it's there and it's easy) your user might have more to download because the files aren't compressed as well as they might be if you handled it yourself (especially audio).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That's about it. Once the game is installed you're in pretty much an identical situation to any other native DirectX game (ie: most of them).&#xD;&#xA;&#xD;&#xA;(If you're doing something like CD-ROM distribution, instead of online distribution, you may face some of the same issues I described - but you can put everything that would otherwise need to be to be downloaded onto your CD instead, including the required frameworks.)&#xD;&#xA;&#xD;&#xA;If you're doing downloadable shareware you're basically trying to get users along a chain from finding out about your software, to playing the demo, to buying the full game. The downside of XNA is that it makes the installation step in this chain a bit harder to polish.&#xD;&#xA;&#xD;&#xA;(IMO the upside of easier development and XBox compatibility is well worth it.)&#xD;&#xA;&#xD;&#xA;So to bring this back around to your question: using XNA might make a tiny difference - but not enough that it matters. So any stats you find about PC game sales should be applicable to XNA games on PC.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.danielmoth.com/Blog/using-c-30-from-net-20.aspx&#xD;&#xA;  [2]: http://www.danielmoth.com/Blog/Using-Extension-Methods-In-Fx-20-Projects.aspx" />
  <row Id="846" PostHistoryTypeId="5" PostId="462" RevisionGUID="be19b7cd-4d9a-40c8-88ee-17661dc8afc4" CreationDate="2010-07-15T15:27:41.780" UserId="288" Comment="added 32 characters in body" Text="I don't have any stats to compare the differences between XNA and non-XNA game sales - I'd suggest that data is impossible to come by - but I imagine it would show there is no difference for equivalent games. So let me answer your question with a run through of the major issues specific to distribution of XNA games on PC (particularly online):&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;First of all: For an XNA game to run the system needs to have installed: the XNA Framework, and the .NET Framework.&#xD;&#xA;&#xD;&#xA;The XNA Framework is a fairly small download, easy to install, but will requires admin privileges - so will cause a UAC prompt as well as a EULA prompt. The framework is not upwards or downwards compatible - but can be installed side-by-side. (ie: a XNA 3.1 game needs XNA 3.1 and won't run on XNA 4.0).&#xD;&#xA;&#xD;&#xA;The .NET Framework 2.0 is bundled on Vista and above, so I recommend targeting that (Project Properties -&gt; Target Framework).&#xD;&#xA;&#xD;&#xA;The .NET 3.5 installation is very, very slow - I recommend avoiding it. I'm not sure about the full 4.0 installation, but the 4.0 Client Profile install is fast enough if you need newer .NET features (you probably don't - you can still use [lambdas][1] and [extension methods][2] in .NET 2.0).&#xD;&#xA;&#xD;&#xA;A .NET Framework install will of course cause a UAC and EULA prompt. It can also cause a reboot.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Currently the &quot;standard&quot; way to distribute XNA games is with ClickOnce. You can do an online install - the downside is that your user gets a small &quot;bootstrap&quot; installer executable that pulls all the loose game files from your website. Alternately you can just distribute all those loose files and the installer in a zip. Neither of these is a self-contained executable file like users expect from most games.&#xD;&#xA;&#xD;&#xA;A major pain of ClickOnce is that it will display several warnings about downloading unsigned software, which can look quite scary.&#xD;&#xA;&#xD;&#xA;Another other downside of ClickOnce is that you don't have much control over things like, for example, what start menu entries you have.&#xD;&#xA;&#xD;&#xA;The upside to using ClickOnce is that it's very easy to set up, and it will automatically download and install the required frameworks from Microsoft's website.&#xD;&#xA;&#xD;&#xA;I am under the impression that these issues with ClickOnce can be solved by using an MSI instead - and it can still automatically download and install the required frameworks. I'm afraid I don't have specific instructions for this on hand.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you do your own installation, or no installation at all, you need to be aware that your game executable will crash with an extremely unhelpful error message if the required frameworks are missing!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Oh, and your install might be a bit bigger (or a lot, if you include frameworks). If you're using XNA's built in content stuff (and why not, it's there and it's easy) your user might have more to download because the files aren't compressed as well as they might be if you handled it yourself (especially audio).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That's about it. Once the game is installed you're in pretty much an identical situation to any other game using native DirectX (ie: most of them).&#xD;&#xA;&#xD;&#xA;(If you're doing something like CD-ROM distribution, instead of online distribution, you may face some of the same issues I described - but you can put everything that would otherwise need to be to be downloaded onto your CD instead, including the required frameworks.)&#xD;&#xA;&#xD;&#xA;If you're doing downloadable shareware you're basically trying to get users along a chain from finding out about your software, to playing the demo, to buying the full game. The downside of XNA is that it makes the installation step in this chain a bit harder to polish - but it's still possible.&#xD;&#xA;&#xD;&#xA;(IMO the upside of easier development and XBox compatibility is well worth it.)&#xD;&#xA;&#xD;&#xA;So to bring this back around to your question: using XNA might make a tiny difference - but not enough that it matters. So any stats you find about PC game sales should be applicable to XNA games on PC.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.danielmoth.com/Blog/using-c-30-from-net-20.aspx&#xD;&#xA;  [2]: http://www.danielmoth.com/Blog/Using-Extension-Methods-In-Fx-20-Projects.aspx" />
  <row Id="847" PostHistoryTypeId="2" PostId="463" RevisionGUID="66f0856f-c578-404d-b93e-5811f331c52a" CreationDate="2010-07-15T15:29:12.890" UserId="259" Text="[Scene graphs][1] ftw.  These can be used for game logic as well as rendering, and they let you really optimise your pipeline.  If you're going to use them, you want to do it from the start.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scene_graph" />
  <row Id="848" PostHistoryTypeId="2" PostId="464" RevisionGUID="3c294059-d0fb-4e3d-8fd5-9a7906a321fc" CreationDate="2010-07-15T15:34:36.087" UserId="290" Text="Are there any libraries or frameworks readily available that handle player metrics, rankings, matching, tournaments, etc? Anything for managing the player community? (Please don't say [DotNetNuke][1])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dotnetnuke.com/" />
  <row Id="849" PostHistoryTypeId="1" PostId="464" RevisionGUID="3c294059-d0fb-4e3d-8fd5-9a7906a321fc" CreationDate="2010-07-15T15:34:36.087" UserId="290" Text="What middle tier and backend libraries exist for handling player matching and out of game information?" />
  <row Id="850" PostHistoryTypeId="3" PostId="464" RevisionGUID="3c294059-d0fb-4e3d-8fd5-9a7906a321fc" CreationDate="2010-07-15T15:34:36.087" UserId="290" Text="&lt;libraries&gt;&lt;framework&gt;&lt;ranking&gt;&lt;tournament&gt;" />
  <row Id="851" PostHistoryTypeId="2" PostId="465" RevisionGUID="9f711a5f-2d6c-45a1-b8f2-ab7e799e04a2" CreationDate="2010-07-15T15:45:20.203" UserId="107" Text="Some examples could be the animations framework used in [Aquaria][1], or in [Crimson Legend][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bit-blot.com/aquaria/&#xD;&#xA;  [2]: http://marctenbosch.com/skeletal2d/" />
  <row Id="852" PostHistoryTypeId="1" PostId="465" RevisionGUID="9f711a5f-2d6c-45a1-b8f2-ab7e799e04a2" CreationDate="2010-07-15T15:45:20.203" UserId="107" Text="anyone knows any open skeletal/bones 2d animations framework for java?" />
  <row Id="853" PostHistoryTypeId="3" PostId="465" RevisionGUID="9f711a5f-2d6c-45a1-b8f2-ab7e799e04a2" CreationDate="2010-07-15T15:45:20.203" UserId="107" Text="&lt;2d&gt;&lt;java&gt;&lt;framework&gt;&lt;animation&gt;&lt;skeletal&gt;" />
  <row Id="854" PostHistoryTypeId="2" PostId="466" RevisionGUID="efb38cc8-9632-4dcc-9e29-228dfeb7ea5d" CreationDate="2010-07-15T15:49:37.393" UserId="35" Text="[Game Engine Architecture][1] by Jason Gregory is a good book in this topic. You can read it in [Google Books][2] before buying it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameenginebook.com/&#xD;&#xA;  [2]: http://books.google.cl/books?id=LJ20tsePKk4C&amp;printsec=frontcover&amp;dq=game+engine+architecture&amp;hl=es&amp;ei=oC0_TL2DHYOclgfYutSrCA&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=2&amp;ved=0CC0Q6AEwAQ#v=onepage&amp;q&amp;f=false" />
  <row Id="855" PostHistoryTypeId="2" PostId="467" RevisionGUID="4b5195b7-c2a5-43c5-b91d-531e03c48cdb" CreationDate="2010-07-15T15:52:40.403" UserId="283" Text="I would say don't.  Save it when it makes sense for the game, not when the app is exiting.  For example, if this is a turn based game, then save at the end of each turn.  If it's a level based game, save at the end of each level.  There a couple of reasons for this:&#xD;&#xA;&#xD;&#xA; - Mobile usage is very unpredictable.  Yes, you get notified by the iPhone SDK when the app is closing, but it could be in the middle of anything, and the transition is not just &quot;exiting&quot; it is also receiving a call, getting a text, etc.&#xD;&#xA; - You have very limited time and resources to shut your game down on app exit.  Most of that will probably be consumed just with pausing your game and cleaning up memory.  No need to add to that load by saving game state.&#xD;&#xA; - Most games have natural pauses that make sense for saving.  You can take advantage of these pauses to seamlessly store game state, and the user will never notice that you are consuming extra resources.&#xD;&#xA; - By saving incrementally during game play, the amount of data to be saved will be smaller per save.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="857" PostHistoryTypeId="2" PostId="468" RevisionGUID="13fb2812-c2d0-491d-8761-d0ce9e96fedf" CreationDate="2010-07-15T16:15:30.263" UserId="202" Text="&lt;a href=&quot;http://www.gamedev.net/reference/programming/features/enginuity1/&quot;&gt;Enginuity&lt;/a&gt; is one of the best free tutorials on game engine design. Behold, this is not exactly what You asked for. It's a tutorial on writing a game engine down to the low level aspects - however - it's a **general purpose** engine and You might be able to derive a greatest common divisor for every game.&#xD;&#xA;&#xD;&#xA;Just read through the introduction and stop when it becomes too detailed for Your taste ;)" />
  <row Id="858" PostHistoryTypeId="2" PostId="469" RevisionGUID="1a7f9a29-f0c1-4763-bfb6-26e11c1a782b" CreationDate="2010-07-15T16:20:20.757" UserId="196" Text="It depends.&#xD;&#xA;&#xD;&#xA;Games like World of Warcraft use TCP for their communication, because you circumvent many problems by using it. There may be a higher ping as a result, but for many games, this is acceptable. You need to do spatial interpolation even when you use UDP as your protocol." />
  <row Id="859" PostHistoryTypeId="2" PostId="470" RevisionGUID="dde4ba40-dfd3-4d64-8f52-c274dbb1791c" CreationDate="2010-07-15T16:21:06.887" UserId="202" Text="Well, actually the **newest** trend is to use &lt;a href=&quot;http://www.pcper.com/article.php?aid=532&quot;&gt;raytracing into a sparse voxel octree&lt;/a&gt; for the terrain in combination with rasterization of triangle meshes for all the rest. id software currently works on this technology to implement it in their upcoming engine." />
  <row Id="860" PostHistoryTypeId="2" PostId="471" RevisionGUID="03c13c8f-4317-4b7b-b731-ff242c1b1d3e" CreationDate="2010-07-15T16:30:33.480" UserId="117" Text="For FPS games we always use UDP.  Especially if you are doing a twitch shooter where pings matter. " />
  <row Id="861" PostHistoryTypeId="2" PostId="472" RevisionGUID="85d454b2-9f77-4cca-b4e8-f09fa649f053" CreationDate="2010-07-15T16:32:56.987" UserId="10" Text="Working on a prototype for a Flash game that will use networking communication. It would be better to use Peer 2 Peer connection, since it will be a multiplayer game.&#xD;&#xA;&#xD;&#xA;Has anyone used [Stratus][1] or tried to make a multiplayer game via the built in socket?&#xD;&#xA;&#xD;&#xA;The game will be a turn based game, similar speed to poker but if I could get faster turns that would be great.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://labs.adobe.com/technologies/stratus/" />
  <row Id="862" PostHistoryTypeId="1" PostId="472" RevisionGUID="85d454b2-9f77-4cca-b4e8-f09fa649f053" CreationDate="2010-07-15T16:32:56.987" UserId="10" Text="Networking in Flash games. Socket or Stratus?" />
  <row Id="863" PostHistoryTypeId="3" PostId="472" RevisionGUID="85d454b2-9f77-4cca-b4e8-f09fa649f053" CreationDate="2010-07-15T16:32:56.987" UserId="10" Text="&lt;flash&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="864" PostHistoryTypeId="2" PostId="473" RevisionGUID="af5ce91a-6d22-4e3a-bc61-f4bcc550f04d" CreationDate="2010-07-15T16:35:47.203" UserId="67" Text="Having talked with employees of small game development shops around my area, they said they tend to favor those applicants that have some proof of the work they've done before.  For example, making mods for an existing game or being behind a game engine that someone besides yourself has heard of.&#xD;&#xA;&#xD;&#xA;As far as development knowledge, C/C++ is still the leading technology to know simply because it allows for total control of what's going on and so many of the popular engines are built in it.  XNA is useful, but you're at the whim of the framework for a number of things.  When you're dealing with a limited number of updates per second it pays to have complete control." />
  <row Id="865" PostHistoryTypeId="5" PostId="187" RevisionGUID="6c507911-a739-4e4e-8fde-6fb9a1474225" CreationDate="2010-07-15T16:52:41.253" UserId="55" Comment="adding ToDoList" Text="I actually just wrote a blog about how I [approached the design and development][1] for my latest iPhone project. You might find value in reading it. &#xD;&#xA;&#xD;&#xA;A few thoughts to leave here are&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;To-do Application&lt;/strong&gt;  &#xD;&#xA;I use [Things][2] for Mac and [ToDoList][3] (free) for Windows.. Alternatively, you can jump onto [sourceforge.net][4] or [codeproject.com][5] to grab a to-do application.  I like ToDoList. You will have a lot of sketches, ideas, design information that really needs to be aggregated into one spot. Having an application like this with your feature list will help you stay focused.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Small Tasks&lt;/strong&gt;  &#xD;&#xA;&quot;Implement Leaderboard View&quot; is not a sufficient task.  What does that involve? Break it down -&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;    &lt;li&gt;Create background artwork for leaderboard view&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Create class methods that fetch score data&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Create class methods that post score data&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Create a view controller which will display a back button, reload button, and a table view&lt;/li&gt;&#xD;&#xA;    &lt;li&gt;Implement the table view to load in the data from the model&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;Seeing the picture in finer detail will reduce your chances of missing a key element of your implementation and will provide you motivation as you tick off each task.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Keep the Scope Small&lt;/strong&gt;  &#xD;&#xA;Don't try to build Starcraft III if it is just you, scruffy, and purrdoodle.  It's just not feasible. Lower your expectations and find something you would still enjoy building. &#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Eye-candy&lt;/strong&gt;  &#xD;&#xA;Get something on the screen -- you may be surprised on how big of a jolt to your motivation it will be.  I tend to focus on getting artwork early.  In addition I also am able to work with a musician who starts showing me stuff relatively early as well. &#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Have fun&lt;/strong&gt;  &#xD;&#xA;If you're slaving over your save state system all of this week be sure to follow it up next week with something that is fun.  One of my fun moments was redesigning the animation system for my user interface. &#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Collaborate&lt;/strong&gt;  &#xD;&#xA;You don't technically need to start adding people to your team, but talk to other people about what you are doing.  Jump over to [tigsource.com][6] or [gamedev.net][7] and start networking.&#xD;&#xA; &#xD;&#xA;&lt;strong&gt;Playtest&lt;/strong&gt;  &#xD;&#xA;Start getting early feedback on your game. I'm talking about right after you finish your initial prototype. Let some of your friends mess around with what you have, get feedback, take notes, and revise your plan if needed.  Be sure to test outside of your realm of comfort and cast a net that includes other game developers.  Sometimes friends and loved ones are just not critical people.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Start a Blog&lt;/strong&gt;  &#xD;&#xA;Talking about what you're doing allows you to build a brand for yourself.  This is priceless when it comes time to shipping your product.  Just look at what [Wolfire][8] is doing. They are absolutely pure win at building a brand for themselves.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Take a Break&lt;/strong&gt;  &#xD;&#xA;If your mind isn't into the project at a specific time don't try and force it.  Get up and go for a walk or take a quick nap.  That is the luxury of being an independent.  In the end you'll create a better product for doing so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.david-mcgraw.com/2010/07/13/approaching-design-for-an-ios-project/&#xD;&#xA;  [2]: http://culturedcode.com/things/&#xD;&#xA;  [3]: http://bit.ly/9dAelc&#xD;&#xA;  [4]: http://sourceforge.net&#xD;&#xA;  [5]: http://www.codeproject.com&#xD;&#xA;  [6]: http://www.tigsource.com&#xD;&#xA;  [7]: http://www.gamedev.net&#xD;&#xA;  [8]: http://www.wolfire.com" />
  <row Id="866" PostHistoryTypeId="2" PostId="474" RevisionGUID="fd25f335-78c4-47ec-a42d-ea65f00bf3ce" CreationDate="2010-07-15T16:59:55.690" UserId="51" Text="One time I was implementing some skeletal animation code that would procedurally allow a character to look at an object while blending with whatever animation was currently playing.&#xD;&#xA;&#xD;&#xA;For a while, t would begin to work until the angle between the head and what the character wanted to look at passed some threshold, and then it would kick into full-on Exorcist mode where the head would spin around really, really fast.  Quite amusing, especially since our character was something from a children's book." />
  <row Id="867" PostHistoryTypeId="16" PostId="474" RevisionGUID="fd25f335-78c4-47ec-a42d-ea65f00bf3ce" CreationDate="2010-07-15T16:59:55.690" UserId="-1" />
  <row Id="868" PostHistoryTypeId="2" PostId="475" RevisionGUID="f3c3f0cc-16dd-45eb-b033-aa7919669678" CreationDate="2010-07-15T17:04:16.027" UserId="267" Text="It's probably not what you're looking for but JME has support for skeletal animation: http://www.jmonkeyengine.com/wiki/doku.php/animation." />
  <row Id="869" PostHistoryTypeId="11" PostId="245" RevisionGUID="5b4ed989-c562-4a71-8d86-f8a9d4210a2a" CreationDate="2010-07-15T17:08:51.773" UserId="-1" Text="[{&quot;Id&quot;:7,&quot;DisplayName&quot;:&quot;Spoike&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:297,&quot;DisplayName&quot;:&quot;280Z28&quot;},{&quot;Id&quot;:67,&quot;DisplayName&quot;:&quot;Agent_9191&quot;},{&quot;Id&quot;:123,&quot;DisplayName&quot;:&quot;Simon&quot;}]" />
  <row Id="870" PostHistoryTypeId="2" PostId="476" RevisionGUID="f06d5dd6-caaa-4dc4-b45c-64c24bf4286b" CreationDate="2010-07-15T17:13:16.057" UserId="193" Text="There's a lot of learning material in the DirectX world that uses .fx files to manage shaders, and .fx seems to be well integrated with 3D packages such as Maya and 3D Studio Max&#xD;&#xA;&#xD;&#xA;What do larger OpenGL projects use? Do they all have a bespoke format or are there any common standards in use that might have some tools to go with them?&#xD;&#xA;&#xD;&#xA;I have found a 404 page on http://www.khronos.org/glfx/ and http://sourceforge.net/projects/glfx/files/ has no files at all in the download section.&#xD;&#xA;&#xD;&#xA;Can you use .fx files with Cg as the languages are so close syntactically?  I hear that Cg has poor performance on the ATI Linux drivers but at least it my help me get going on my own Nvidia system." />
  <row Id="871" PostHistoryTypeId="1" PostId="476" RevisionGUID="f06d5dd6-caaa-4dc4-b45c-64c24bf4286b" CreationDate="2010-07-15T17:13:16.057" UserId="193" Text="OpenGL equivalent of .fx files in GLSL or Cg?" />
  <row Id="872" PostHistoryTypeId="3" PostId="476" RevisionGUID="f06d5dd6-caaa-4dc4-b45c-64c24bf4286b" CreationDate="2010-07-15T17:13:16.057" UserId="193" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;cg&gt;" />
  <row Id="873" PostHistoryTypeId="2" PostId="477" RevisionGUID="54841022-f493-49f6-97f5-b00ec1fb7df9" CreationDate="2010-07-15T17:15:17.630" UserId="299" Text="[Henge3D][1] has been my library of choice.  What sold me was the price (free) and the multi-threading capabilities.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://henge3d.codeplex.com/ &quot;Henge3D&quot;" />
  <row Id="874" PostHistoryTypeId="16" PostId="477" RevisionGUID="54841022-f493-49f6-97f5-b00ec1fb7df9" CreationDate="2010-07-15T17:15:17.630" UserId="-1" />
  <row Id="875" PostHistoryTypeId="5" PostId="323" RevisionGUID="73a6ea5b-8839-4252-b6f3-35ab335d9ef8" CreationDate="2010-07-15T17:17:28.360" UserId="299" Comment="Added Henge3D" Text="2D&#xD;&#xA;&#xD;&#xA; - [Farseer][1] is based on box2d but has lot of its own improvements and innovations.&#xD;&#xA; - [Box2Dx][2] &amp; [Box2D.Xna][3] are both ports of box 2D&#xD;&#xA; - i think theres a port of chipmunk physics out there, but i cant find the link&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA; - [JigLib][4] one of the earliest 3d physics engines for xna, been used quite a bit&#xD;&#xA; - [Jitter][5] Quite a new engine, but more per formant than JigLib&#xD;&#xA; - [Henge3D][6] A newer engine to the scene, impressive multi-threading&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [2]: http://code.google.com/p/box2dx/&#xD;&#xA;  [3]: http://box2dxna.codeplex.com/&#xD;&#xA;  [4]: http://jiglibx.codeplex.com/&#xD;&#xA;  [5]: http://www.jitter-physics.com/&#xD;&#xA;  [6]: http://henge3d.codeplex.com/" />
  <row Id="876" PostHistoryTypeId="2" PostId="478" RevisionGUID="83d6604f-575e-4404-9853-897d639319a6" CreationDate="2010-07-15T17:18:38.450" UserId="168" Text="One large pitfall I see from making games with languages like these (or using tools like XNA, TorqueX engine, etc.) is that you will be hard pressed to find a team of good people with the expertise needed to create an equivalent game to what would be fairly easy to find people for in C++ and OpenGL/DirectX.&#xD;&#xA;&#xD;&#xA;The game dev industry is still very heavily steeped in C++ as most of the tools and pipelines that are used to push out big or just well polished small games were written in C++, and as far as I know ALL of the official dev kits you can get for XBox, PS3, and Wii are released only with compatibility for C++ (XBox toolset may be more managed nowadays, anyone know more?)&#xD;&#xA;&#xD;&#xA;If you want to develop games for consoles right now you pretty much get XNA and C# on the XBox and then only in a side part of the games library called XBox Live Indie Games. Some who win contests etc. get picked to port their game to the real XBox Live Arcade. Other than that plan on making a game for PC." />
  <row Id="877" PostHistoryTypeId="2" PostId="479" RevisionGUID="66e265eb-3433-44b2-a090-7f5999e4d1ac" CreationDate="2010-07-15T17:18:56.297" UserId="35" Text="There is nothing equivalent in the OpenGL world, rolling your own format and loader is fine.&#xD;&#xA;&#xD;&#xA;A effect format/library for OpenGL is lacking, and would make a good (FOSS) development." />
  <row Id="878" PostHistoryTypeId="5" PostId="430" RevisionGUID="0f87b4bf-7c29-4d1f-87a7-e9b111f81c04" CreationDate="2010-07-15T17:26:12.823" UserId="229" Comment="added 8 characters in body" Text="**I chose [Zoidcom][1] (C++) because it is well-designed and has excellent documentation + examples:**&#xD;&#xA;&#xD;&#xA;&gt; The Zoidcom network library is a&#xD;&#xA;&gt; high-level, UDP based networking&#xD;&#xA;&gt; library providing features for&#xD;&#xA;&gt; automatic replication of gameobjects&#xD;&#xA;&gt; and synchronization of their states&#xD;&#xA;&gt; over a network connection in a highly&#xD;&#xA;&gt; bandwidth efficient manner. This is&#xD;&#xA;&gt; achieved by multiplexing and&#xD;&#xA;&gt; demultiplexing object information from&#xD;&#xA;&gt; and into bitstreams, which make it&#xD;&#xA;&gt; easily possible to avoid sending&#xD;&#xA;&gt; redundant data. Bools only take one&#xD;&#xA;&gt; single bit, integers and floats are&#xD;&#xA;&gt; stripped down to as many bits as&#xD;&#xA;&gt; needed.&#xD;&#xA;&gt; &#xD;&#xA;&gt; A great deal of the tedious work that&#xD;&#xA;&gt; appears when attempting to develop an&#xD;&#xA;&gt; efficient network protocol is handled&#xD;&#xA;&gt; by Zoidcom, e.g. deciding when to send&#xD;&#xA;&gt; which data to which client, how to get&#xD;&#xA;&gt; it efficiently and reliably through&#xD;&#xA;&gt; the line, what to do when data gets&#xD;&#xA;&gt; lost and a lot more.&#xD;&#xA;&#xD;&#xA;**Some open source games made using Zoidcom:**&#xD;&#xA;&#xD;&#xA;- [Gusanos][2]&#xD;&#xA;- [Hovercraft Universe][3]&#xD;&#xA;&#xD;&#xA;**License:**&#xD;&#xA;&#xD;&#xA;&gt; Zoidcom is freely available for&#xD;&#xA;&gt; noncommercial use and will stay so.&#xD;&#xA;&gt; Commercial and shareware licenses are&#xD;&#xA;&gt; available on request, official licence&#xD;&#xA;&gt; announcement will be made available&#xD;&#xA;&gt; with release 1.0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zoidcom.com/&#xD;&#xA;  [2]: http://gusanos.sourceforge.net/&#xD;&#xA;  [3]: http://code.google.com/p/uhasseltaacgua/" />
  <row Id="879" PostHistoryTypeId="2" PostId="480" RevisionGUID="5e9c1938-554a-45b2-b800-acddd4b5f3ad" CreationDate="2010-07-15T17:36:06.083" UserId="165" Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/" />
  <row Id="880" PostHistoryTypeId="1" PostId="480" RevisionGUID="5e9c1938-554a-45b2-b800-acddd4b5f3ad" CreationDate="2010-07-15T17:36:06.083" UserId="165" Text="Version control for game development - issues and solutions?" />
  <row Id="881" PostHistoryTypeId="3" PostId="480" RevisionGUID="5e9c1938-554a-45b2-b800-acddd4b5f3ad" CreationDate="2010-07-15T17:36:06.083" UserId="165" Text="&lt;version-control&gt;&lt;gamedev&gt;" />
  <row Id="882" PostHistoryTypeId="16" PostId="480" RevisionGUID="5e9c1938-554a-45b2-b800-acddd4b5f3ad" CreationDate="2010-07-15T17:36:06.083" UserId="165" />
  <row Id="883" PostHistoryTypeId="2" PostId="481" RevisionGUID="0e25c674-52e4-48f3-b61b-e53ebe4fbc21" CreationDate="2010-07-15T17:36:17.690" UserId="165" Text="**Subversion**  &#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - ???&#xD;&#xA;" />
  <row Id="884" PostHistoryTypeId="16" PostId="481" RevisionGUID="0e25c674-52e4-48f3-b61b-e53ebe4fbc21" CreationDate="2010-07-15T17:36:17.690" UserId="-1" />
  <row Id="885" PostHistoryTypeId="2" PostId="482" RevisionGUID="8994ac24-992e-46ba-ac14-ad24f56ed296" CreationDate="2010-07-15T17:37:22.617" UserId="8" Text="What are some good podcasts for game developers to listen to? This could include specific game dev, general dev or general game podcasts.&#xD;&#xA;&#xD;&#xA;Please provide a brief description along with links." />
  <row Id="886" PostHistoryTypeId="1" PostId="482" RevisionGUID="8994ac24-992e-46ba-ac14-ad24f56ed296" CreationDate="2010-07-15T17:37:22.617" UserId="8" Text="Game Dev Podcasts" />
  <row Id="887" PostHistoryTypeId="3" PostId="482" RevisionGUID="8994ac24-992e-46ba-ac14-ad24f56ed296" CreationDate="2010-07-15T17:37:22.617" UserId="8" Text="&lt;learning&gt;" />
  <row Id="888" PostHistoryTypeId="5" PostId="480" RevisionGUID="b449b63d-4d0c-4ba0-ae42-e5ca56dca16c" CreationDate="2010-07-15T17:39:06.110" UserId="14" Comment="Made the instructions bold, to draw the eye. " Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;**For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.**&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/" />
  <row Id="889" PostHistoryTypeId="5" PostId="245" RevisionGUID="ed8c6b2d-b84d-4861-88b8-d71aa16192af" CreationDate="2010-07-15T17:39:30.040" UserId="165" Comment="added 333 characters in body" Text="What are some good (free or open-source) Version-control packages for developing games, and what are any game-specific issues in using them?&#xD;&#xA;&#xD;&#xA;**Update** I am going to delete this Question in 72 hours - there is a better version at [Version Control Issues][1]. If you want to copy over your Answers/Comments from here to there - the clock is ticking... :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/480/version-control-for-game-development-issues-and-solutions" />
  <row Id="890" PostHistoryTypeId="2" PostId="483" RevisionGUID="ab61b953-d689-402f-aab2-c4c19ac7dbf1" CreationDate="2010-07-15T17:46:00.810" UserId="297" Text="Perforce is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;2. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;3. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce." />
  <row Id="891" PostHistoryTypeId="16" PostId="483" RevisionGUID="ab61b953-d689-402f-aab2-c4c19ac7dbf1" CreationDate="2010-07-15T17:46:00.810" UserId="-1" />
  <row Id="897" PostHistoryTypeId="5" PostId="480" RevisionGUID="e90fddcc-bf64-4ef2-b33a-2904127e427b" CreationDate="2010-07-15T17:49:07.120" UserId="165" Comment="added 143 characters in body" Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;**For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.**&#xD;&#xA;&#xD;&#xA;Also, please list some brief details in your answer, about whether your VCS is free or commercial, distributed versus single-site (?), etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/" />
  <row Id="898" PostHistoryTypeId="5" PostId="481" RevisionGUID="c931d7dd-e6cb-4f88-9407-49f7fa1bc8fb" CreationDate="2010-07-15T17:49:51.957" UserId="165" Comment="added 85 characters in body" Text="**Subversion**  &#xD;&#xA;&#xD;&#xA;  - Open-source, Non-distributed (not sure what the opposite of distributed is :)&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - ???&#xD;&#xA;" />
  <row Id="899" PostHistoryTypeId="5" PostId="483" RevisionGUID="8cd0bd64-e4a6-4a2e-b275-dd83bead3b29" CreationDate="2010-07-15T17:52:05.353" UserId="297" Comment="added 41 characters in body; added 192 characters in body; added 15 characters in body" Text="[Perforce][1] (commercial/closed-source, central server) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support (at least in theory - never seen anyone use it).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="900" PostHistoryTypeId="5" PostId="483" RevisionGUID="09825fc1-2e86-4aea-acfc-483d14f43b3e" CreationDate="2010-07-15T17:54:41.883" UserId="305" Comment="Added info about Perforce's cost-per-user." Text="Perforce is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;2. It supports changelists *very well*.&#xD;&#xA;3. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;4. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;Perforce is a commercial product, although you can download and try a 2-user version for free. The more user accounts you need to have active at the same time, the more expensive the license." />
  <row Id="901" PostHistoryTypeId="5" PostId="481" RevisionGUID="143b8df4-9c3c-498d-b85c-184b6b290902" CreationDate="2010-07-15T17:54:45.457" UserId="297" Comment="deleted 53 characters in body" Text="**Subversion**  &#xD;&#xA;&#xD;&#xA;  - Open-source, centralized&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - ???&#xD;&#xA;" />
  <row Id="902" PostHistoryTypeId="8" PostId="483" RevisionGUID="d0a10905-524e-4c71-96a4-ad5472d22df8" CreationDate="2010-07-15T17:55:20.790" UserId="297" Comment="Rollback to [8cd0bd64-e4a6-4a2e-b275-dd83bead3b29]" Text="[Perforce][1] (commercial/closed-source, central server) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support (at least in theory - never seen anyone use it).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="903" PostHistoryTypeId="5" PostId="483" RevisionGUID="68296441-bfe9-493d-a340-51b14a2667ac" CreationDate="2010-07-15T17:55:38.277" UserId="297" Comment="deleted 3 characters in body" Text="[Perforce][1] (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support (at least in theory - never seen anyone use it).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="904" PostHistoryTypeId="2" PostId="486" RevisionGUID="6d6791ea-7b0a-43fb-a860-bd43950cd8c2" CreationDate="2010-07-15T17:56:28.870" UserId="292" Text="We were using RakNet for a while and enjoyed it, and got positive review from other studios using it.&#xD;&#xA;http://www.jenkinssoftware.com/&#xD;&#xA;&#xD;&#xA;The nice thing about RakNet is that it's cross platform for the most part, so if you're looking to enter the console space, it's a good possibility." />
  <row Id="905" PostHistoryTypeId="5" PostId="483" RevisionGUID="69afa513-74c1-4016-b5a3-852e1ee480af" CreationDate="2010-07-15T18:00:15.303" UserId="305" Comment="Moved commercial info into bullet point 1." Text="[Perforce][1] (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. You can download and evaluate a 2-user version for free, as well as any number of copies of their client. You have to pay for your server license, based on the number of active user accounts you need. Open-source projects may be eligible for a free server license. &#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="906" PostHistoryTypeId="5" PostId="480" RevisionGUID="95c6a8f9-21b4-4fbc-80a3-3ef8c8f14271" CreationDate="2010-07-15T18:03:03.690" UserId="165" Comment="deleted 4 characters in body" Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;**For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.**&#xD;&#xA;&#xD;&#xA;Also, please list some brief details in your answer, about whether your VCS is free or commercial, distributed versus centralized, etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/" />
  <row Id="907" PostHistoryTypeId="5" PostId="483" RevisionGUID="40713644-844b-4f22-aa5f-3e08ac9ba738" CreationDate="2010-07-15T18:03:46.997" UserId="14" Comment="I like formatting :p" Text="#[Perforce][1]#&#xD;&#xA;(commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. You can download and evaluate a 2-user version for free, as well as any number of copies of their client. You have to pay for your server license, based on the number of active user accounts you need. Open-source projects may be eligible for a free server license. &#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="908" PostHistoryTypeId="5" PostId="481" RevisionGUID="c4551c44-0af8-4c9c-a4df-472725c5d727" CreationDate="2010-07-15T18:04:18.480" UserId="14" Comment="deleted 3 characters in body" Text="#Subversion  &#xD;&#xA;&#xD;&#xA;  - Open-source, centralized&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - ???&#xD;&#xA;" />
  <row Id="909" PostHistoryTypeId="5" PostId="483" RevisionGUID="6db8ba86-e6d3-4fbf-be12-c1949635989c" CreationDate="2010-07-15T18:05:22.017" UserId="297" Comment="deleted 179 characters in body; added 14 characters in body" Text="# [Perforce][1]&#xD;&#xA;&#xD;&#xA;Perforce (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. Open-source projects may be eligible for a free license (minus the technical support).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="910" PostHistoryTypeId="5" PostId="481" RevisionGUID="22645e69-ae70-4566-a5b1-e8ff66d5a689" CreationDate="2010-07-15T18:08:20.530" UserId="165" Comment="added 43 characters in body; deleted 11 characters in body" Text="**Subversion**  &#xD;&#xA;&#xD;&#xA;  - Open-source, centralized&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - ???&#xD;&#xA;" />
  <row Id="911" PostHistoryTypeId="2" PostId="487" RevisionGUID="5fd85c4b-9238-47e9-a46d-7d1230ffbf30" CreationDate="2010-07-15T18:09:07.283" UserId="305" Text="Maybe not &quot;funniest&quot; but definitely &quot;funnest.&quot; I worked on an RPG in which we were trying to get the NPCs to spot when you were in range, walk up to you, and strike up a conversation with you by activating the dialog system. &#xD;&#xA;&#xD;&#xA;We forgot to add code to distinguish NPCs from PCs, so we'd walk into town and all the NPCs would be talking with each other. Because all NPC AI code used the same dialog template, they actually got a few sentences in before the conversations became nonsensical. And because character dialog was broadcast, you could read everything they said if you were in range.&#xD;&#xA;&#xD;&#xA;We decided to turn that bug into a major feature." />
  <row Id="912" PostHistoryTypeId="16" PostId="487" RevisionGUID="5fd85c4b-9238-47e9-a46d-7d1230ffbf30" CreationDate="2010-07-15T18:09:07.283" UserId="-1" />
  <row Id="915" PostHistoryTypeId="2" PostId="488" RevisionGUID="6c71d7b4-4dfc-4cc4-b9d2-0b946806893c" CreationDate="2010-07-15T18:19:24.110" UserId="154" Text="Linux accounts for roughly 1% of total end users accessing the internet ([OS Marketshare][1]). It's usage increases significantly when talking about servers, but it's just not a big consumer OS.&#xD;&#xA;&#xD;&#xA;  [1]: http://marketshare.hitslink.com/operating-system-market-share.aspx?qprid=8" />
  <row Id="916" PostHistoryTypeId="10" PostId="350" RevisionGUID="3a482abb-7317-40af-a5f1-1820154a139b" CreationDate="2010-07-15T18:23:09.253" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:159,&quot;DisplayName&quot;:&quot;Joe&quot;},{&quot;Id&quot;:214,&quot;DisplayName&quot;:&quot;SnOrfus&quot;},{&quot;Id&quot;:195,&quot;DisplayName&quot;:&quot;Alconja&quot;},{&quot;Id&quot;:10,&quot;DisplayName&quot;:&quot;Ólafur Waage&quot;},{&quot;Id&quot;:120,&quot;DisplayName&quot;:&quot;Cubed2D&quot;}]" />
  <row Id="917" PostHistoryTypeId="2" PostId="489" RevisionGUID="c0e718f8-7d9d-43f8-9592-f9eba0af050d" CreationDate="2010-07-15T18:23:33.150" UserId="55" Text="I would really like to hear how other independents generally approach marketing their game with limited resources. I know how critical marketing is since I've seen it first hand on several fronts. I've been part of teams that didn't put an ounce of marketing into their project and didn't come close to meeting expectations. I've also poured a lot of time into visiting forums to discuss our previous title which resulted in minor bumps over time.&#xD;&#xA;&#xD;&#xA;I really think Wolfire is doing some amazing grass roots marketing with the way they are managing their community around their Blog. They've massed a following that is willing to pay (far in advance) them for their game before they finish it to help support them. That's awesome.&#xD;&#xA;&#xD;&#xA;But how many people are really willing to divulge such information that early? Should that be a concern? Should I start talking about my next project before I really have anything implemented? &#xD;&#xA;&#xD;&#xA;What has worked for you? I would be particularly interested to hear people approach Apple's iTunes store. I believe we're looking at around 33,000 games on the store these days.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="918" PostHistoryTypeId="1" PostId="489" RevisionGUID="c0e718f8-7d9d-43f8-9592-f9eba0af050d" CreationDate="2010-07-15T18:23:33.150" UserId="55" Text="Effective marketing strategies for independent game projects" />
  <row Id="919" PostHistoryTypeId="3" PostId="489" RevisionGUID="c0e718f8-7d9d-43f8-9592-f9eba0af050d" CreationDate="2010-07-15T18:23:33.150" UserId="55" Text="&lt;marketing&gt;" />
  <row Id="920" PostHistoryTypeId="2" PostId="490" RevisionGUID="70a4f911-8096-4eef-ad93-cf3df84c756c" CreationDate="2010-07-15T18:25:01.527" UserId="10" Text="I've listened to some of the [GameDevRadio][1] ones, there are not a lot and they come rarely but they are often fun to check out.&#xD;&#xA;&#xD;&#xA;They talk about varied topics, the ones there now are Flash (2 part), SDL, Unity, Push Button Engine for example.&#xD;&#xA;&#xD;&#xA;The shows are roughly an hour, often more.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedevradio.net/" />
  <row Id="921" PostHistoryTypeId="2" PostId="491" RevisionGUID="32fad401-ac16-4735-bc3d-2c512b9a273a" CreationDate="2010-07-15T18:25:25.253" UserId="300" Text="Back when I was working on a 3D RPG in the '90s, we had a Quake-esque engine for indoor areas. I shared an office with another engineer working on the engine. One morning, our boss (Abe, not his real name) walks in and says &quot;Damn it, Ben [also not his real name], what the hell did you check in last night?!&quot;. &quot;Nothing,&quot; said Ben, &quot;what are you talking about?&quot;. &quot;Look at this!&quot;&#xD;&#xA;&#xD;&#xA;We look. There's a window-dressing rat walking along the floor towards a wall. It hits the wall and proceeds to walk up it. Then across the ceiling, back down the other wall, and across the floor again for another turn.&#xD;&#xA;&#xD;&#xA;&quot;I didn't do a damned thing.&quot; says Ben, &quot;What did *you* change last night?&quot; Abe says, &quot;Walking up stairs looked like hell. It jumped too much. All I did was add some code to smooth that out.&quot; Ben smiles, &quot;Did you ever stop to think that this code wasn't the walking-up-stairs code, but was rather general collision-detection and path code?&quot;&#xD;&#xA;&#xD;&#xA;You can see where this goes. It really exhibited how different people think. Our boss was incredibly smart, but very literal and straightforward. He could write enormous amounts of convoluted code and keep track of all of the relationships in his head, but he had no formal CS training. So when he was debugging the game to discover how to smooth out the stair-step problem, he figured he had stumbled upon the code for, well, &quot;stairs&quot;. Needless to say, his change caused collateral damage all over the game and we had to back it out. Ben fixed the stair problem himself." />
  <row Id="922" PostHistoryTypeId="16" PostId="491" RevisionGUID="32fad401-ac16-4735-bc3d-2c512b9a273a" CreationDate="2010-07-15T18:25:25.253" UserId="-1" />
  <row Id="923" PostHistoryTypeId="16" PostId="245" RevisionGUID="b628e5a3-5b1d-4741-8a56-1e808dd39056" CreationDate="2010-07-15T18:39:00.810" UserId="165" />
  <row Id="924" PostHistoryTypeId="16" PostId="246" RevisionGUID="9450039c-227b-4710-bcdb-89cfbfedd854" CreationDate="2010-07-15T18:39:20.093" UserId="165" />
  <row Id="925" PostHistoryTypeId="5" PostId="245" RevisionGUID="125b3593-2a56-4616-9e6d-92ccad57e2c6" CreationDate="2010-07-15T18:41:25.970" UserId="165" Comment="deleted 23 characters in body" Text="What are some good (free or open-source) Version-control packages for developing games, and what are any game-specific issues in using them?&#xD;&#xA;&#xD;&#xA;**Update** There is a better version at [Version Control Issues][1]. If you want to copy over your Answers/Comments from here to there, please do so now. Then vote to close *this* Question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/480/version-control-for-game-development-issues-and-solutions" />
  <row Id="929" PostHistoryTypeId="2" PostId="493" RevisionGUID="c9ae741b-036f-41ce-beea-f1a223b0561d" CreationDate="2010-07-15T18:51:08.213" UserId="55" Text="Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging.&#xD;&#xA;&#xD;&#xA;It isn't like one is better than the other. Just choose which way you prefer to work. They all will help you get where you want to go, they just do it in a different way." />
  <row Id="930" PostHistoryTypeId="16" PostId="493" RevisionGUID="c9ae741b-036f-41ce-beea-f1a223b0561d" CreationDate="2010-07-15T18:51:08.213" UserId="-1" />
  <row Id="931" PostHistoryTypeId="5" PostId="489" RevisionGUID="b95dba8b-a009-41ee-8475-9d8548bb4dd3" CreationDate="2010-07-15T18:52:16.353" UserId="55" Comment="added 4 characters in body" Text="I would really like to hear how other independents generally approach marketing their game with limited resources. I know how critical marketing is since I've seen it first hand on several fronts. I've been part of teams that didn't put an ounce of marketing into their project and didn't come close to meeting expectations. I've also poured a lot of time into visiting forums to discuss our previous title which resulted in minor bumps over time.&#xD;&#xA;&#xD;&#xA;I really think Wolfire is doing some amazing grass roots marketing with the way they are managing their community around their Blog. They've massed a following that is willing to pay (far in advance) them for their game before they finish it to help support them. That's awesome.&#xD;&#xA;&#xD;&#xA;But how many people are really willing to divulge such information that early? Should that be a concern? Should I start talking about my next project before I really have anything implemented? &#xD;&#xA;&#xD;&#xA;What has worked for you? I would be particularly interested to hear how people approach Apple's iTunes store. I believe we're looking at around 33,000 games on the store these days.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="932" PostHistoryTypeId="2" PostId="494" RevisionGUID="4e908cee-efda-4281-b953-3fca4a67f6a1" CreationDate="2010-07-15T18:52:32.967" UserId="154" Text="As to the famous tools question, DPaint (aka [Deluxe Paint][1]) fits the bill on the art side. &#xD;&#xA;&#xD;&#xA; [1]: http://en.wikipedia.org/wiki/Deluxe_Paint" />
  <row Id="933" PostHistoryTypeId="16" PostId="494" RevisionGUID="4e908cee-efda-4281-b953-3fca4a67f6a1" CreationDate="2010-07-15T18:52:32.967" UserId="-1" />
  <row Id="934" PostHistoryTypeId="2" PostId="495" RevisionGUID="7f34fb5e-af13-4467-af40-585e8424d050" CreationDate="2010-07-15T18:54:21.683" UserId="310" Text="I am planning on developing my first iPhone game, and I was wanting to know whether I should use OpenGL or CoreGraphics for a 2D game.  An outline of the benefits would also be helpful." />
  <row Id="935" PostHistoryTypeId="1" PostId="495" RevisionGUID="7f34fb5e-af13-4467-af40-585e8424d050" CreationDate="2010-07-15T18:54:21.683" UserId="310" Text="For a 2D game on the iphone would I better using OpenGL or CoreGraphics?" />
  <row Id="936" PostHistoryTypeId="3" PostId="495" RevisionGUID="7f34fb5e-af13-4467-af40-585e8424d050" CreationDate="2010-07-15T18:54:21.683" UserId="310" Text="&lt;iphone&gt;&lt;graphics&gt;" />
  <row Id="937" PostHistoryTypeId="5" PostId="493" RevisionGUID="46d9c8f2-709c-4df9-a13f-648dca50fb31" CreationDate="2010-07-15T18:57:07.403" UserId="165" Comment="added 9 characters in body" Text="# GIT  &#xD;&#xA;Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging.&#xD;&#xA;&#xD;&#xA;It isn't like one is better than the other. Just choose which way you prefer to work. They all will help you get where you want to go, they just do it in a different way." />
  <row Id="938" PostHistoryTypeId="2" PostId="496" RevisionGUID="7a302b64-0fa5-4379-ae38-0256d9b52721" CreationDate="2010-07-15T18:57:15.360" UserId="310" Text="I have a limited experience in game development and would like to get involved with open source game project.  Where should I look and how should I begin?" />
  <row Id="939" PostHistoryTypeId="1" PostId="496" RevisionGUID="7a302b64-0fa5-4379-ae38-0256d9b52721" CreationDate="2010-07-15T18:57:15.360" UserId="310" Text="Open Source game projects" />
  <row Id="940" PostHistoryTypeId="3" PostId="496" RevisionGUID="7a302b64-0fa5-4379-ae38-0256d9b52721" CreationDate="2010-07-15T18:57:15.360" UserId="310" Text="&lt;open-source&gt;" />
  <row Id="942" PostHistoryTypeId="2" PostId="497" RevisionGUID="285919b1-98fd-41fa-bc3b-56d49a4b45eb" CreationDate="2010-07-15T19:00:28.490" UserId="310" Text="I have some experience in creating, however I like to have some well written reference material to help me produce better products.  Are there any game design books that are not aimed at a particular programming language?" />
  <row Id="943" PostHistoryTypeId="1" PostId="497" RevisionGUID="285919b1-98fd-41fa-bc3b-56d49a4b45eb" CreationDate="2010-07-15T19:00:28.490" UserId="310" Text="Good game design books?" />
  <row Id="944" PostHistoryTypeId="3" PostId="497" RevisionGUID="285919b1-98fd-41fa-bc3b-56d49a4b45eb" CreationDate="2010-07-15T19:00:28.490" UserId="310" Text="&lt;tutorials&gt;&lt;books&gt;&lt;game-design&gt;" />
  <row Id="945" PostHistoryTypeId="2" PostId="498" RevisionGUID="2f0ce128-6368-4843-bc41-a5513802350c" CreationDate="2010-07-15T19:02:14.053" UserId="301" Text="SourceForge could be an idea, [browse][1] it and try to find a project that is active, interesting and may be accepting people, and get in contact with the current maintainers. You could branch off another project to add your own features, and merge in later.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/softwaremap/?&amp;fq[]=trove%3A80" />
  <row Id="946" PostHistoryTypeId="2" PostId="499" RevisionGUID="5b62d294-3749-42c8-bcf3-695f2f0c1417" CreationDate="2010-07-15T19:04:31.723" UserId="51" Text="From my experience, most 2D games on the iPhone are written in OpenGL ES.  Their 2D game demo is also written in OpenGL.  I would go with OpenGL, if only because you're more likely to find a lot more resources for game-related problems in OGL instead of CoreGraphics.&#xD;&#xA;&#xD;&#xA;There are also some OS level features that make working in OpenGL less painful than on a few other platforms.  For example, you can use the NSString class to render to an OpenGL context, and get full, dynamic, Unicode support right off the bat.&#xD;&#xA;" />
  <row Id="947" PostHistoryTypeId="16" PostId="497" RevisionGUID="285919b1-98fd-41fa-bc3b-56d49a4b45eb" CreationDate="2010-07-15T19:04:35.063" UserId="310" />
  <row Id="948" PostHistoryTypeId="2" PostId="500" RevisionGUID="a5df8316-0066-4675-b5d7-b484135038b5" CreationDate="2010-07-15T19:11:32.130" UserId="55" Text="It depends on what you're building. You may even be able to get away with just using Core Animation if it is not graphic intensive (my last two games were based off of taking advantage of Core Animation).&#xD;&#xA;&#xD;&#xA;If you do plan to push a lot of graphics, I would highly recommend [Cocos2D][1] for your 2D game. It's based off of OpenGL ES and so far I am really enjoying it. The learning curve has been relatively smooth.&#xD;&#xA;&#xD;&#xA;- Integrated [Box2D][2] or [Chipmunk][3].&#xD;&#xA;- Scene Management&#xD;&#xA;- Quite a few effects built in already (even for transitions)&#xD;&#xA;- Particle System&#xD;&#xA;- High Score Server (CocosLive) that is free for you to use&#xD;&#xA;- Text rendering support&#xD;&#xA;&#xD;&#xA;And much more. I'd download it and play with some of the samples they have included that demos much of it's functionality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [2]: http://www.box2d.org/&#xD;&#xA;  [3]: http://code.google.com/p/chipmunk-physics/" />
  <row Id="949" PostHistoryTypeId="5" PostId="493" RevisionGUID="4dccc1ac-9454-4f92-b930-31db438357bf" CreationDate="2010-07-15T19:12:39.427" UserId="181" Comment="Added a comment on it keeping the whole history" Text="# GIT  &#xD;&#xA;Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging.&#xD;&#xA;&#xD;&#xA;A major downside of GIT is that it stores the entire history locally. (Yes, you can perform surgery to cut that down, but it's the default behavior). It's not a problem at all for source files, but if you have a large project with gigabytes of asset data, it becomes a problem quickly. In my current experience, I'd recommend GIT only for smaller or source-only repos.&#xD;&#xA;It isn't like one is better than the other. Just choose which way you prefer to work. They all will help you get where you want to go, they just do it in a different way." />
  <row Id="950" PostHistoryTypeId="2" PostId="501" RevisionGUID="59fcf495-f4c2-4ab2-a3ec-52ffca366881" CreationDate="2010-07-15T19:15:52.133" UserId="214" Text="[Codeplex][1] is another open source hosting provider that has a number of projects from games to windowing systems to all sorts of other things if you don't want to dive into a complete game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeplex.com/" />
  <row Id="951" PostHistoryTypeId="5" PostId="493" RevisionGUID="01eb013c-cf94-42ed-90bb-6cd03973ecd4" CreationDate="2010-07-15T19:21:55.753" UserId="55" Comment="reorganize paragraphs" Text="# GIT  &#xD;&#xA;Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging. &#xD;&#xA;&#xD;&#xA;It isn't like one is better than the other. Just choose which way you prefer to work. They all will help you get where you want to go, they just do it in a different way.&#xD;&#xA;&#xD;&#xA;A major downside of GIT is that it stores the entire history locally. (Yes, you can perform surgery to cut that down, but it's the default behavior). It's not a problem at all for source files, but if you have a large project with gigabytes of asset data, it becomes a problem quickly. In my current experience, I'd recommend GIT only for smaller or source-only repos. " />
  <row Id="952" PostHistoryTypeId="2" PostId="502" RevisionGUID="2dfd21f6-e245-4c10-82ca-f5f9a24cc470" CreationDate="2010-07-15T19:23:33.643" UserId="300" Text="In the interest of exploring just how far you can take the newest crop of browsers, I and some colleagues cross-compiled the open-source Java port of Quake II to Safari/Chrome (it ought to work on Firefox at some point as well, though it didn't initially, largely for performance reasons). The project is here: http://code.google.com/p/quake2-gwt-port/&#xD;&#xA;&#xD;&#xA;It still requires some care and feeding to get it up and running (e.g., WebGL still isn't enabled by default in any shipping browser), but we uploaded a video here: http://www.youtube.com/watch?v=XhMN0wlITLk (sorry it's so dark -- gamma issues remain) and you can see our Google I/O talk here: http://code.google.com/intl/fr-FR/events/io/2010/sessions/gwt-html5.html&#xD;&#xA;&#xD;&#xA;I don't know how long it's going to be before we can realistically depend on all these new browser features (WebGL, WebSocket, audio/video, local storage, et al), but if it all comes together it could make a huge difference in the ability to ship games directly on the web. But there are still a lot of hurdles that remain (e.g., don't hold your breath for Microsoft to implement WebGL in IE10)." />
  <row Id="953" PostHistoryTypeId="2" PostId="503" RevisionGUID="ccddcc20-2363-41e4-8ce2-02294638444b" CreationDate="2010-07-15T19:26:34.713" UserId="117" Text="For Wii games, you might want to check out [**Unity**][1]. It's pretty easy to work with and has portability to the Wii that you can buy.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="954" PostHistoryTypeId="2" PostId="504" RevisionGUID="6e2ef2c0-ccd3-4303-9ed8-5a401888aa02" CreationDate="2010-07-15T19:29:30.120" UserId="29" Text="I looked into this a while back for a small project, but didn't get too far.  I'd like to create a small program that lets a user draw a train track and then allows a &quot;train&quot; to follow said track on a 2D plane.  I'd like the track to be pretty free form and result in a nice smooth line.  I played around with cubic splines and had decent results, but had a ton of trouble getting the train to follow the spline.  I also had a lot of trouble creating multiple tracks and switching a train from one track to another.  &#xD;&#xA;&#xD;&#xA;Does anyone have advice, articles, or source code that can help me figure something out?  Thanks!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="955" PostHistoryTypeId="1" PostId="504" RevisionGUID="6e2ef2c0-ccd3-4303-9ed8-5a401888aa02" CreationDate="2010-07-15T19:29:30.120" UserId="29" Text="What are some methods to represent train tracks?" />
  <row Id="956" PostHistoryTypeId="3" PostId="504" RevisionGUID="6e2ef2c0-ccd3-4303-9ed8-5a401888aa02" CreationDate="2010-07-15T19:29:30.120" UserId="29" Text="&lt;math&gt;" />
  <row Id="957" PostHistoryTypeId="2" PostId="505" RevisionGUID="72180dad-44ac-430b-a993-b0b9b4c6f082" CreationDate="2010-07-15T19:37:06.590" UserId="55" Text="I have yet to participate in any contest, but would love to given I find the right team. I would add to your list:&#xD;&#xA;&#xD;&#xA;- [Kokoromi Gamma][1] - Last context was to create a one button game!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kokoromi.org/" />
  <row Id="958" PostHistoryTypeId="2" PostId="506" RevisionGUID="1d9af866-6b45-48bb-bbe0-00af05e9635d" CreationDate="2010-07-15T19:39:01.097" UserId="127" Text="[This][1] is the best game design book I have. Although it does use C++ for it's examples there are not many. It talks much more about the how to go about doing things, which can be applied to any language. It's also great value (800+ pages I think).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=pd_sim_b_1 &quot;This&quot;&#xD;&#xA;" />
  <row Id="959" PostHistoryTypeId="16" PostId="506" RevisionGUID="1d9af866-6b45-48bb-bbe0-00af05e9635d" CreationDate="2010-07-15T19:39:01.097" UserId="-1" />
  <row Id="960" PostHistoryTypeId="2" PostId="507" RevisionGUID="12ef1599-5140-4bfa-ad41-6e8674d71650" CreationDate="2010-07-15T19:39:12.483" UserId="119" Text="You could try a grid based approach where each square can link to one or more other squares. You could then have some pieces that cover multiple squares, to create some smoother curves. Basically modular, like a train set." />
  <row Id="961" PostHistoryTypeId="2" PostId="508" RevisionGUID="cb85765c-67fc-4716-8c78-68775f06bf88" CreationDate="2010-07-15T19:43:07.543" UserId="297" Text="Game development is a large process. In your experience, how are the total hours for releasing a game divided over the following major areas. I believe this is useful because few people (none?) are really good at all the areas, so this helps me balance the cost of items I'm not so good at when estimating the complexity of creating a game.&#xD;&#xA;&#xD;&#xA;* Modeling and raw asset creation (textures, audio)&#xD;&#xA;* Level design&#xD;&#xA;* Gameplay design&#xD;&#xA;* Programming&#xD;&#xA;* Testing&#xD;&#xA;* Marketing" />
  <row Id="962" PostHistoryTypeId="1" PostId="508" RevisionGUID="cb85765c-67fc-4716-8c78-68775f06bf88" CreationDate="2010-07-15T19:43:07.543" UserId="297" Text="Where is the time spent?" />
  <row Id="963" PostHistoryTypeId="3" PostId="508" RevisionGUID="cb85765c-67fc-4716-8c78-68775f06bf88" CreationDate="2010-07-15T19:43:07.543" UserId="297" Text="&lt;time-management&gt;&lt;project-management&gt;" />
  <row Id="964" PostHistoryTypeId="2" PostId="509" RevisionGUID="fb06c457-ae7e-435c-9518-dc1014fdcc1b" CreationDate="2010-07-15T19:44:29.303" UserId="181" Text="In a nutshell, they focus on different purposes.&#xD;&#xA;&#xD;&#xA;CoreGraphics: Compositing and vector graphics. If you just need those, CoreGraphics is a good choice.&#xD;&#xA;&#xD;&#xA;CoreAnimation: Animate layers of 2D objects. &#xD;&#xA;&#xD;&#xA;OpenGL sits below those two (and CoreImage/CoreVideo, too). By virtue of being lower level, it gives you a larger degree of control. And requires you to do more work when implementing things. &#xD;&#xA;&#xD;&#xA;So really, it depends on what you need to do. And as soon as you're considering porting that game to other platforms, OpenGL looks much more attractive, since it's supported pretty much everywhere." />
  <row Id="966" PostHistoryTypeId="2" PostId="510" RevisionGUID="29590e29-df56-4926-a773-9c3b46b68c3f" CreationDate="2010-07-15T19:49:11.803" UserId="29" Text="Google Sketchup is about the only 3d cad program I can use, because I suck.  Do any 3d engines natively import Sketchup models?  Are there any major caveats when doing so?" />
  <row Id="967" PostHistoryTypeId="1" PostId="510" RevisionGUID="29590e29-df56-4926-a773-9c3b46b68c3f" CreationDate="2010-07-15T19:49:11.803" UserId="29" Text="Do any 3d engines natively import Google Sketchup models" />
  <row Id="968" PostHistoryTypeId="3" PostId="510" RevisionGUID="29590e29-df56-4926-a773-9c3b46b68c3f" CreationDate="2010-07-15T19:49:11.803" UserId="29" Text="&lt;game-engine&gt;&lt;3d-meshes&gt;&lt;3d-engines&gt;" />
  <row Id="969" PostHistoryTypeId="2" PostId="511" RevisionGUID="0ed64ff8-5f08-4416-a56b-f3922e167083" CreationDate="2010-07-15T19:52:08.397" UserId="127" Text="Feel free to flame but in my experience:&#xD;&#xA;&#xD;&#xA;    * Modeling and raw asset creation - 30%&#xD;&#xA;    * Level design - 10%&#xD;&#xA;    * Gameplay design - 10%&#xD;&#xA;    * Programming - 45%&#xD;&#xA;    * Testing - 10%&#xD;&#xA;    * Marketing - 5%&#xD;&#xA;&#xD;&#xA;This varies largely on the complexity of the project however. &#xD;&#xA;" />
  <row Id="970" PostHistoryTypeId="16" PostId="482" RevisionGUID="d5fe0e73-77f9-40b1-84ee-c7c9cb418515" CreationDate="2010-07-15T19:55:11.463" UserId="8" />
  <row Id="971" PostHistoryTypeId="2" PostId="512" RevisionGUID="64609081-5d0b-4e5c-bc18-7654615a3cfe" CreationDate="2010-07-15T19:59:40.827" UserId="181" Text="I'm taking a wild guess at your train following spline issue here - one of the common problems with this is that maintaining constant speed along a spline is a bit tricky. Basically, if F(t) is your spline function over time, distance travelled and time elapsed are not linearly correlated.&#xD;&#xA;&#xD;&#xA;Thankfully, there's a good article on how to solve that: http://community.spinxengine.com/content/19-constant-speed-cubic-spline-interpolation.html.&#xD;&#xA;&#xD;&#xA;Depending on how detailed your sim is, you'll face other issues, like the fact that a wagon really connects with the rail on two points, too much curvature makes wagons intersect, etc...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="975" PostHistoryTypeId="2" PostId="513" RevisionGUID="a85ff914-00d9-4662-af7c-63f9175c09b9" CreationDate="2010-07-15T20:03:12.567" UserId="235" Text="  - I have a basic idea of a game I would like to play. It is very simple - basic mario style.&#xD;&#xA;&#xD;&#xA;  - I want to develop it in C++.&#xD;&#xA;&#xD;&#xA;What all things do I need to get this game up and running?&#xD;&#xA;&#xD;&#xA;Can this be done patching up some code from the existing C++ libraries? Is that a good idea? What all libraries should I work with?&#xD;&#xA;&#xD;&#xA;How should I get started on this?" />
  <row Id="976" PostHistoryTypeId="1" PostId="513" RevisionGUID="a85ff914-00d9-4662-af7c-63f9175c09b9" CreationDate="2010-07-15T20:03:12.567" UserId="235" Text="How should  I get started on this very simple game?" />
  <row Id="977" PostHistoryTypeId="3" PostId="513" RevisionGUID="a85ff914-00d9-4662-af7c-63f9175c09b9" CreationDate="2010-07-15T20:03:12.567" UserId="235" Text="&lt;c++&gt;&lt;learning&gt;&lt;beginner&gt;&lt;best-practice&gt;&lt;mario&gt;" />
  <row Id="978" PostHistoryTypeId="2" PostId="514" RevisionGUID="cbbf6ab9-5e08-448d-8cbc-037f2dfa0f49" CreationDate="2010-07-15T20:03:22.830" UserId="181" Text="Since SketchUp can export in 3DS format, I'd believe many engines can take that. It's a fairly common data exchange format. " />
  <row Id="979" PostHistoryTypeId="2" PostId="515" RevisionGUID="8c04b5b0-03f9-47e7-8a91-586957352ef1" CreationDate="2010-07-15T20:08:59.993" UserId="182" Text="I have participated in [uDevGames][1] a couple times. It's an annual 3-month contest for Mac games with a voting period after. Developers are required to make their code open source, and winners are asked to write postmortems. I had a blast, and the other participants are great. The web site and contest itself seem to have fallen to some mismaintainance lately, and the contest is not what it once was, but if you're looking for a slightly longer contest than most others and can target Mac, it's still a fun contest.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://udevgames.com/" />
  <row Id="980" PostHistoryTypeId="2" PostId="516" RevisionGUID="52a85b7e-f7fa-4030-a200-cf38bdd271b4" CreationDate="2010-07-15T20:11:28.427" UserId="127" Text="If this is your first ever game then even Mario is probably too complex. Pong or something equally simple would be a better bet. Lazyfoo has a good article -&gt; http://lazyfoo.net/articles/article01/index.php&#xD;&#xA;&#xD;&#xA;You will need an graphics library to draw things. SDL/Allegro are good starting options. There are great tutorials for them all over the web. It will require work on your part, not just using someone else's code." />
  <row Id="981" PostHistoryTypeId="2" PostId="517" RevisionGUID="55cf6075-0c28-4539-bad1-71cde089c155" CreationDate="2010-07-15T20:12:07.770" UserId="154" Text="Sketchup can export to Collada (.dae) which I know is readable by Unity. Sketchup Pro will export to .3ds, .dxf, .fbx, .obj which gives you plenty of options for other engines.&#xD;&#xA;&#xD;&#xA;That said the automatic triangulation in Sketchup can sometimes create some weird topography. Not that big a deal if you just want to import some shapes, but if you are doing mesh collision it can lead to unexpected behaviors. " />
  <row Id="982" PostHistoryTypeId="2" PostId="518" RevisionGUID="3265e6cf-fc84-4152-899f-49685745717c" CreationDate="2010-07-15T20:14:06.470" UserId="55" Text="Well... My advice is:&#xD;&#xA;&#xD;&#xA; 1. Learn C++ well enough that you can talk to me about inheritance, pointers, and memory management.&#xD;&#xA; 2. Download a graphics library like Simple DirectMedia Layer, which is great for 2D games&#xD;&#xA; 3. Learn how to use SDL through some outstanding tutorials by [Lazy Foo'][1]&#xD;&#xA; 4. Go create some art resources or find free resources online&#xD;&#xA; 5. Break down each element of your game into very small chunks and start programming&#xD;&#xA;&#xD;&#xA;Those elements could be:&#xD;&#xA;&#xD;&#xA; 1. Get the background on the screen&#xD;&#xA; 2. Get a character on the screen, moving left and right&#xD;&#xA; 3. Apply simple physics to the character to allow for jumping around&#xD;&#xA; 4. Work on collision detection layers so you can jump from one platform to another&#xD;&#xA; 5. More...&#xD;&#xA;&#xD;&#xA;And finally. Ask questions when you get stuck. Good luck / Have fun.&#xD;&#xA;&#xD;&#xA;  [1]: http://lazyfoo.net/SDL_tutorials/" />
  <row Id="983" PostHistoryTypeId="2" PostId="519" RevisionGUID="e463998b-7c69-44a0-8029-2a0ceebbcad0" CreationDate="2010-07-15T20:15:35.063" UserId="182" Text="Linux gaming is a largely untapped market, in my opinion, especially for indies. If you look at the numbers as [reported][1] by [Hemisphere Games][2] for [Osmos][3] and the numbers [reported][4] by [Wolfire Games][5] for the [Humble Indie Bundle][6] (especially the total revenue for each platform), you can see that Linux users can be pretty eager to support those who support Linux.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hemispheregames.com/2010/06/23/linux-the-numbers/&#xD;&#xA;  [2]: http://www.hemispheregames.com/&#xD;&#xA;  [3]: http://www.hemispheregames.com/osmos/&#xD;&#xA;  [4]: http://blog.wolfire.com/2010/05/The-state-of-Mac-and-Linux-gaming&#xD;&#xA;  [5]: http://www.wolfire.com/&#xD;&#xA;  [6]: http://www.wolfire.com/humble" />
  <row Id="984" PostHistoryTypeId="2" PostId="520" RevisionGUID="4ed737ed-0467-474e-9a44-9a2cff44c3d4" CreationDate="2010-07-15T20:20:47.157" UserId="154" Text="There is a lot of variation based on the genre and scale of the project. On the indie/flash/iPhone side the amount of time spent on programming tends to be a larger percentage of the whole. With big console projects the majority of the time is spent on content development." />
  <row Id="985" PostHistoryTypeId="6" PostId="339" RevisionGUID="b925aba1-a5ca-40f3-8edc-54ed9f08ece1" CreationDate="2010-07-15T20:42:00.243" UserId="318" Comment="edited tags" Text="&lt;beginner&gt;&lt;languages&gt;&lt;coding&gt;&lt;programming&gt;" />
  <row Id="986" PostHistoryTypeId="6" PostId="339" RevisionGUID="74489a69-ab09-4a3c-80da-5de81609cd41" CreationDate="2010-07-15T20:42:34.593" UserId="318" Comment="edited tags" Text="&lt;beginner&gt;&lt;programming&gt;&lt;languages&gt;" />
  <row Id="987" PostHistoryTypeId="2" PostId="521" RevisionGUID="d0123e80-6dcf-45f2-9ec1-9526e01a92c1" CreationDate="2010-07-15T20:44:18.600" UserId="154" Text="Nearly everything listed here can be found in [Tracon I/II][1]. These were DOS ATC simulators although I recall a Win3.X version of Tracon II. You might be able to find an abandon-ware copy these days as they are 20 years old now. &#xD;&#xA;&#xD;&#xA;These games include audible responses from pilots and the second one even did speech recognition which was very impressive for the early 90's.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tracon_II" />
  <row Id="988" PostHistoryTypeId="2" PostId="522" RevisionGUID="1c51c889-7485-48ae-9f36-62cb8f6e1f03" CreationDate="2010-07-15T20:44:48.957" UserId="318" Text="It is best not to learn one language, but to learn different programming concepts and how to apply them in a few different languages, frameworks and enviroments." />
  <row Id="989" PostHistoryTypeId="2" PostId="523" RevisionGUID="6c84843a-116d-4b34-af76-eaf41667c4ba" CreationDate="2010-07-15T20:47:45.783" UserId="159" Text="I don't know how effective this idea is (I haven't tried it yet) but for my current project I am going to advertise on Facebook. Let me explain.&#xD;&#xA;&#xD;&#xA;Essentially I am going to create a fan page, and run an ad campaign on Facebook. What I figure is I can spend like $30/mo (or what ever you want) for advertising. As people become a &quot;fan&quot; of the page, a lot of other people will see that. So basically, if that $30/mo generates 5 fans *directly*, it could generate 50 fans *indirectly*. I figure I could also do some fun stuff with the fan page such as give away copies, solicit ideas, etc...&#xD;&#xA;&#xD;&#xA;Like I said above, I haven't tried this so I don't know if it will work. However, I will let you know in the near future. :)" />
  <row Id="990" PostHistoryTypeId="2" PostId="524" RevisionGUID="2cbf53ab-26e7-4264-97d2-66f3624839fa" CreationDate="2010-07-15T20:49:18.523" UserId="154" Text="EA's [Lord of Ultima][1] is probably the most visually impressive Javascript/HTML based game I've seen. &#xD;&#xA;&#xD;&#xA;Note: It a strategy game and not an action title so while it has a nice smooth scrolling map, there isn't anything beyond clicking on buttons as far as direct interactivity goes.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lordofultima.com/en" />
  <row Id="991" PostHistoryTypeId="2" PostId="525" RevisionGUID="4423aad5-8e98-4a35-aed0-00e36c7dc04e" CreationDate="2010-07-15T21:05:22.027" UserId="19" Text="Even though controls are screwed up/need work, I am fond of Akihabara - http://www.kesiev.com/akihabara/" />
  <row Id="992" PostHistoryTypeId="2" PostId="526" RevisionGUID="1902d06b-c22c-4bdd-95cc-4217f0c9e9cb" CreationDate="2010-07-15T21:18:06.947" UserId="19" Text="SD021 gave you good tips lazyfoo tuts on SDL and you can try Allegro. Also, you may look into source and demos of HGE http://hge.relishgames.com/ which is neat and tidy, albeit looks like unsupported." />
  <row Id="993" PostHistoryTypeId="2" PostId="527" RevisionGUID="3a7e819c-68f6-4929-a2a2-a3dbed4367a8" CreationDate="2010-07-15T21:28:16.470" UserId="303" Text="Keep in mind that the Internet Channel (Opera browser) uses Adobe Flash Lite 3.1; Basically Flash 8 with some Flash 9 features.&#xD;&#xA;&#xD;&#xA;I would perhaps target the Wii but make the game accessible to any browser.  Best of both worlds.  Think of it more like a regular browser on an ancient machine using the Flash 8 plugin and you shouldn't have too much trouble.&#xD;&#xA;&#xD;&#xA;I've never used WiiFlash but it might be interesting for testing locally; If you have a Wii already you'd be better off setting up a local webserver and pointing the Wii browser to that local address for testing.&#xD;&#xA;&#xD;&#xA;If you were ever going to do a 3D game you'd have to drop Flash entirely and go with [Unity3D][1] or some similar engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com" />
  <row Id="994" PostHistoryTypeId="2" PostId="528" RevisionGUID="45036fa1-e44f-4ecd-a5f9-e91c863022a5" CreationDate="2010-07-15T21:35:09.513" UserId="19" Text="I am not sure flash allows P2P without Stratus (and v10+ only). But if you want to go socket route I suggest you give Red5 a shot http://osflash.org/red5 . I wrote a small how-to on installing it on ubuntu here: http://www.vga.hr/blog/?p=65 It's a bit old, but should still be valid. If I were to make a networked flash game today I'd weigh my options between RED5 and SmartfoxServer http://www.smartfoxserver.com/" />
  <row Id="995" PostHistoryTypeId="2" PostId="529" RevisionGUID="fcd19f35-68aa-463e-b433-79fc451e50ec" CreationDate="2010-07-15T21:38:11.497" UserDisplayName="Alex Koloskov" Text="Here's Top 3 books on game design that I'd recommend:&#xD;&#xA;&#xD;&#xA;- [The Art of Game Design: A book of lenses][1] (and I suggest to purchase actual lenses deck on [Art of Game Design website][2]&#xD;&#xA;- [Game Design Workshop, Second Edition: A Playcentric Approach to Creating Innovative Games][3]&#xD;&#xA;- [Challenges for Game Designers][4]&#xD;&#xA;&#xD;&#xA;Now, probably the most important thing is that game design as a discipline is pretty thin, but it draws a lot from other areas like art, history, economics, math (specifically theory of probabilities &amp; statistics), psychology, writing and even music &amp; filmmaking. So good books in all those disciplines probably would be equally important for a game designer as well as specific game design books. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/dp/0123694965/?tag=xenocidslair-20&#xD;&#xA;  [2]: http://artofgamedesign.com/cards/&#xD;&#xA;  [3]: http://www.amazon.com/dp/0240809742/?tag=xenocidslair-20&#xD;&#xA;  [4]: http://www.amazon.com/dp/158450580X/?tag=xenocidslair-20" />
  <row Id="996" PostHistoryTypeId="16" PostId="529" RevisionGUID="fcd19f35-68aa-463e-b433-79fc451e50ec" CreationDate="2010-07-15T21:38:11.497" UserId="-1" />
  <row Id="997" PostHistoryTypeId="2" PostId="530" RevisionGUID="876b3bd1-ed84-4895-9ebe-469f439c143c" CreationDate="2010-07-15T21:42:05.040" UserId="51" Text="Not specific to game design, but &lt;a href=&quot;http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746&quot;&gt;The Design of Everyday Things&lt;/a&gt; is a good book to get you thinking about user interactions in general." />
  <row Id="998" PostHistoryTypeId="16" PostId="530" RevisionGUID="876b3bd1-ed84-4895-9ebe-469f439c143c" CreationDate="2010-07-15T21:42:05.040" UserId="-1" />
  <row Id="999" PostHistoryTypeId="2" PostId="531" RevisionGUID="b175eaaa-eb2e-4496-881d-6ba373f0e459" CreationDate="2010-07-15T21:42:26.863" UserId="22" Text="If I understand correctly, there are two major kinds of artists involved in game development - 2D and 3D.  &#xD;&#xA;I think I somewhat understand, that if I want to go 3D, I should learn some 3D modeling package really well and that would be it. Please correct me if I am wrong.  &#xD;&#xA;With 2D I am completely lost. There are a lot of tutorials on the web describing so many different topics like general drawing, vector graphics, raster graphics, pixel art and a whole lot of other things.   &#xD;&#xA;So what tools and techniques are most commonly used by professional 2D artists and if I wanted to become one, exactly were should I start(like tomorrow) and what should my goals be?&#xD;&#xA;" />
  <row Id="1000" PostHistoryTypeId="1" PostId="531" RevisionGUID="b175eaaa-eb2e-4496-881d-6ba373f0e459" CreationDate="2010-07-15T21:42:26.863" UserId="22" Text="How to become a Game Artist?" />
  <row Id="1001" PostHistoryTypeId="3" PostId="531" RevisionGUID="b175eaaa-eb2e-4496-881d-6ba373f0e459" CreationDate="2010-07-15T21:42:26.863" UserId="22" Text="&lt;assets&gt;&lt;art&gt;" />
  <row Id="1002" PostHistoryTypeId="2" PostId="532" RevisionGUID="9719fb97-b8cb-44bc-ae77-b3861b40f783" CreationDate="2010-07-15T21:50:31.107" UserId="127" Text="As always Tom Sloper has a good article about it:&#xD;&#xA;http://www.sloperama.com/advice/lesson53.htm&#xD;&#xA;&#xD;&#xA;For 2D art usually artists start with pixel art for 2D games. The guy who does art for my games uses photoshop. This is industry standard and is widely used. 3D modelers use programs like 3DS Max or Maya. Blender is a good free alternative.&#xD;&#xA;&#xD;&#xA;This is a good article on Raster/Vector graphics -&gt; http://www.sketchpad.net/basics1.htm" />
  <row Id="1003" PostHistoryTypeId="2" PostId="533" RevisionGUID="95182c6e-df36-4134-a358-f70c60ea3377" CreationDate="2010-07-15T21:50:57.863" UserId="19" Text="I was very fond of [Andrew Rollings and Ernest Adams on Game Design][1]. It goes into depths of interactive game mechanics as related to player, which is the only unique element to game development as editing is to movies. &#xD;&#xA;&#xD;&#xA;Having said that I'd consider suggesting screenplay writing material as it shows you what connects with people and what doesn't. I'm not talking about linear progress material here like stories, but what kind of characters connect with people, themes, motifs etc. &#xD;&#xA;In that area I suggest these: &#xD;&#xA;&#xD;&#xA; - [Screenplay: The Foundations of Screenwriting][2]&#xD;&#xA; - [Save The Cat!][3]&#xD;&#xA; - [The Writers Journey][4]&#xD;&#xA;&#xD;&#xA;If you're really interested in technical aspects of screenwriting you can also take a look at [Screenwriter's Bible][5] - but that one is more oriented towards technical aspects of screenplay formats and structures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Andrew-Rollings-Ernest-Adams-Design/dp/1592730019/ref=sr_1_28?ie=UTF8&amp;s=books&amp;qid=1279230298&amp;sr=8-28&#xD;&#xA;  [2]: http://www.amazon.com/Screenplay-Foundations-Screenwriting-step-step/dp/0440576474&#xD;&#xA;  [3]: http://www.amazon.com/Save-Last-Book-Screenwriting-Youll/dp/1932907009/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279230513&amp;sr=1-1&#xD;&#xA;  [4]: http://www.amazon.com/Writers-Journey-Mythic-Structure-2nd/dp/0941188701&#xD;&#xA;  [5]: http://www.amazon.com/Screenwriters-Bible-Complete-Writing-Formatting/dp/1879505843/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279230615&amp;sr=1-1" />
  <row Id="1004" PostHistoryTypeId="16" PostId="533" RevisionGUID="95182c6e-df36-4134-a358-f70c60ea3377" CreationDate="2010-07-15T21:50:57.863" UserId="-1" />
  <row Id="1005" PostHistoryTypeId="2" PostId="534" RevisionGUID="2c660fdf-610f-43c0-a5f2-25b17dfd194f" CreationDate="2010-07-15T21:51:28.597" UserId="97" Text="The different topics are basically different styles of art.  Every game will demand its own style, so your best bet is to look into all of them.&#xD;&#xA;&#xD;&#xA;However, some common threads will pervade amongst everything.  &quot;General drawing&quot;, as you say, will probably be something that will be useful wherever you are.&#xD;&#xA;&#xD;&#xA;As for vector vs raster, it really does depend on what developers you work with.  Many games on the Flash platform will tend to ask for vector art (moreso than other platforms, in my experience).  Even still, vector graphics are an important part of modeling and you might be able to get away with doing everything as vector graphics and exporting it to raster (which is much harder to do the other way around).  It'll be cleaner.&#xD;&#xA;&#xD;&#xA;But yes, it depends a lot on the specific game or developers you will be working with.  Until then, there is nothing wrong with looking into a bit of everything." />
  <row Id="1006" PostHistoryTypeId="2" PostId="535" RevisionGUID="9f019344-5cef-4709-bd49-4b2a85c6dbe5" CreationDate="2010-07-15T21:52:56.990" UserId="301" Text="To start, a website displaying your portfolio and what work you have done for clients. &#xD;&#xA;&#xD;&#xA;To get your first clients, you could start by donating artwork to places like [OpenGameArt][1], and then when your art is used, you can add that to your resume. Now that you have some sort of background, in that you can point to say that you have made this and this, you could try to offer your services at a number of game development sites. Just keep going like this, getting a larger and more impressive portfolio.&#xD;&#xA;&#xD;&#xA;Otherwise, I can't help you much on the &quot;tools&quot; side, but that seems like what you should do to get started as an artist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opengameart.org/" />
  <row Id="1007" PostHistoryTypeId="2" PostId="536" RevisionGUID="e886eaf1-9388-40b5-a109-26f11ac2c5c1" CreationDate="2010-07-15T21:56:57.300" UserId="294" Text="**What high-level game engine would you recommend to develop a 2D game prototype on windows? (or mac/linux if you wish)**&#xD;&#xA;&#xD;&#xA;The kind of things I mean by &quot;high-level&quot; includes (but is definitely not limited to):&#xD;&#xA;&#xD;&#xA;* not having to manage low-level stuff like screen buffers, graphics contexts&#xD;&#xA;* having an API to draw geometric shapes&#xD;&#xA;* well, I was going to omit it but I guess being based on an actual &quot;high-level&quot; language is a plus (automatic resource management and the existence a reasonable set of data structures in the standard library come to mind).&#xD;&#xA;&#xD;&#xA;It seems to me that Flash is the proverbial elephant in the room for this query but I'd very much like to see different answers based on all kinds of languages or SDKs.&#xD;&#xA;" />
  <row Id="1008" PostHistoryTypeId="1" PostId="536" RevisionGUID="e886eaf1-9388-40b5-a109-26f11ac2c5c1" CreationDate="2010-07-15T21:56:57.300" UserId="294" Text="Recommended 2D Game Engine for prototyping" />
  <row Id="1009" PostHistoryTypeId="3" PostId="536" RevisionGUID="e886eaf1-9388-40b5-a109-26f11ac2c5c1" CreationDate="2010-07-15T21:56:57.300" UserId="294" Text="&lt;2d&gt;&lt;prototyping&gt;" />
  <row Id="1010" PostHistoryTypeId="2" PostId="537" RevisionGUID="edb815dc-bb82-4ceb-ab12-d51aa03bbc76" CreationDate="2010-07-15T22:00:28.750" UserId="10" Text="If you want to look at other things. You can check out [Löve (which uses Lua)][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/" />
  <row Id="1011" PostHistoryTypeId="2" PostId="538" RevisionGUID="fd4d13b9-fe35-4ee3-9d26-e229879ea285" CreationDate="2010-07-15T22:00:34.913" UserId="138" Text="Common programming languages can be broken up by &quot;type&quot; of game development.&#xD;&#xA;&#xD;&#xA;Large, triple-A games that are pushing the envelope when it comes to graphics typically utilized a mixture of straight C and C++ for the majority of the project. Often, a scripting language will be involved--though, this isn't necessarily true of all engines.&#xD;&#xA;&#xD;&#xA;Gameplay code is often written in a proprietary language (UnrealScript), Python, Lua (CryTek, Spark Engine), or, in some cases, C# (The Sims 2). A few game engines are starting to support JavaScript (Unity, etc.).&#xD;&#xA;&#xD;&#xA;Shader languages are also utilized, of course.&#xD;&#xA;&#xD;&#xA;In the mobile realm, iPhones are dominated by objective-C while most other cellphones utilize Java (Android, Brew-based, etc.).&#xD;&#xA;&#xD;&#xA;As for indies or small companies, they can be utilizing pretty much anything depending on their target platforms. For instance, C# is common with small time Live developers. Flash developers obviously use ActionScript.&#xD;&#xA;&#xD;&#xA;So, there you go. Hope that helps." />
  <row Id="1012" PostHistoryTypeId="5" PostId="531" RevisionGUID="a8b3eb41-d577-4fcb-82ba-c3a7f95f8c1c" CreationDate="2010-07-15T22:01:33.493" UserId="22" Comment="added 3 characters in body" Text="If I understand correctly, there are two major kinds of artists involved in game development - 2D and 3D.&#xD;&#xA;  &#xD;&#xA;I think I somewhat understand, that if I want to go 3D, I should learn some 3D modeling package really well and that would be it. Please correct me if I am wrong.&#xD;&#xA;  &#xD;&#xA;With 2D I am completely lost. There are a lot of tutorials on the web describing so many different topics like general drawing, vector graphics, raster graphics, pixel art and a whole lot of other things.&#xD;&#xA;&#xD;&#xA;So what tools and techniques are most commonly used by professional 2D artists and if I wanted to become one, exactly were should I start(like tomorrow) and what should my goals be?&#xD;&#xA;" />
  <row Id="1013" PostHistoryTypeId="2" PostId="539" RevisionGUID="2a27e621-4916-43f5-b7d2-2ba19ba92aeb" CreationDate="2010-07-15T22:02:19.173" UserId="19" Text="&gt;  think I somewhat understand, that if I want to go 3D, I should learn some 3D modeling package really well and that would be it. Please correct me if I am wrong.&#xD;&#xA;&#xD;&#xA;I'll correct you, since you are wrong. Let's assume you want to become a writer, a good one. Do you just need to learn to read and write and type fast on keyboard and that would be it? Of course not. &#xD;&#xA;&#xD;&#xA;If you want to become an artist SERIOUSLY consider going through real, traditional art lessons. Drawing, figure drawing especially, doodle in your notebook, give yourself tasks etc. Constantly draw and paint whatever you want to make. Parallel to that you can teach yourself some poly modeling program along with detailing program - a combo of maya+zbrush or maya+mudbox or 3dsmax+mudbox or modo+zbrush or whatever. &#xD;&#xA;&#xD;&#xA;You see, you need only a few weeks at most to learn any of these programs sufficiently to know pretty much everything you need to know. What then? You are an artist all of a sudden? Just like by learning Word you are a writer? You, hopefully, understand what I'm talking about. &#xD;&#xA;&#xD;&#xA;I'd suggest a plan:&#xD;&#xA;&#xD;&#xA; - pick up a program or two and stick with it. I suggest Maya or Max along with Mudbox or Zbrush. You can't go wrong with either. You can do magic with any of them. See which you like more and stick to it. &#xD;&#xA; - Look at gnomon or digital tutorials or 3dbuzz VMTs (good intro to maya they have) programs and go through basics of program. Doodle with it, play with it. Sing a long with those tutorials&#xD;&#xA; - Next step is give yourself a task and go from start to finish with it. 'I wan't to make a car' and make it. Try to go after original, your own designs (this is more appreciated). Avoid knitting models over blueprints and sketches that are not your own. Unless you want to be a drone later on.&#xD;&#xA; - Specialize in something. Maybe you like robots, maybe you like animals... draw them, design them, make them alive - models, textures, lights. Maybe you like designing environments, make them. &#xD;&#xA; - Work work and work. You WILL suck hard at it first, but you will get better. Ask for criticism around and take it in and work on it more to make it better. Never get criticism as personal insults or any of that, it's not.&#xD;&#xA; - Take a drawing class and life drawing lessons.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1014" PostHistoryTypeId="2" PostId="540" RevisionGUID="c2d301f7-9c3d-48df-a59a-d3f31bb17aca" CreationDate="2010-07-15T22:18:37.223" UserId="138" Text="It depends on the studio.&#xD;&#xA;&#xD;&#xA;The studios I've worked for wouldn't hire you. They require extensive and very solid C/C++ knowledge coupled with 3D math and prefer candidates experienced with the middleware engine they utilize.&#xD;&#xA;&#xD;&#xA;That being said, there are a lot of studios out there. I'd highly suggest listing the studios you're entertaining the idea of applying for and seeing what they ask for in their job listings. At that point, you can buff up whatever knowledge you so require.&#xD;&#xA;&#xD;&#xA;In general, solid C skills are amazingly beneficial. Every interview I've ever had (games and otherwise) has involved straight C programming." />
  <row Id="1015" PostHistoryTypeId="5" PostId="506" RevisionGUID="a7e32eae-c254-4636-b74e-51f08d8e8274" CreationDate="2010-07-15T22:26:12.023" UserId="165" Comment="added 16 characters in body" Text="[Game Coding Complete][1] is the best game design book I have. Although it does use C++ for it's examples there are not many. It talks much more about the how to go about doing things, which can be applied to any language. It's also great value (800+ pages I think).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=pd_sim_b_1 &quot;This&quot;&#xD;&#xA;" />
  <row Id="1016" PostHistoryTypeId="2" PostId="541" RevisionGUID="433f0c3e-26d0-41c2-9381-bb7f71f33bab" CreationDate="2010-07-15T22:30:56.370" UserId="140" Text="[Tile Studio][1]&#xD;&#xA;&#xD;&#xA;Free, Open Source&#xD;&#xA;&#xD;&#xA;Basic pixel editing features for creating tiles. Supports importing from BMP,PNG,etc.&#xD;&#xA;Exports your tile maps as *source code* in various languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tilestudio.sourceforge.net/" />
  <row Id="1017" PostHistoryTypeId="16" PostId="541" RevisionGUID="433f0c3e-26d0-41c2-9381-bb7f71f33bab" CreationDate="2010-07-15T22:30:56.370" UserId="-1" />
  <row Id="1018" PostHistoryTypeId="2" PostId="542" RevisionGUID="5b50ee8e-f2b8-44b0-b3af-a6be619df40e" CreationDate="2010-07-15T22:36:33.247" UserId="159" Text="I find &lt;a href=&quot;http://creators.xna.com&quot;&gt;XNA&lt;/A&gt; to be a very nice language to prototype in. It is easy to throw together quick ideas to see how the game play/mechanics would work, and strong enough to really get the job done. It also has a great community at the forums for help, and several 3rd party tools (physics engines/helper libraries/etc..)" />
  <row Id="1019" PostHistoryTypeId="11" PostId="350" RevisionGUID="c791dbf1-ff22-4776-8154-e3f42525575f" CreationDate="2010-07-15T22:48:28.223" UserId="-1" Text="[{&quot;Id&quot;:18,&quot;DisplayName&quot;:&quot;Firas Assaad&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;},{&quot;Id&quot;:300,&quot;DisplayName&quot;:&quot;Joel Webber&quot;},{&quot;Id&quot;:120,&quot;DisplayName&quot;:&quot;Cubed2D&quot;}]" />
  <row Id="1020" PostHistoryTypeId="2" PostId="543" RevisionGUID="b2faf9c1-eea3-4877-9705-df317a2c689b" CreationDate="2010-07-15T23:19:54.243" UserId="208" Text="[Open Font Library][1] seems pretty good now that it's working (last time I looked there it was broken). All its fonts are licensed under the [Open Font License][2] or are in the public domain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://openfontlibrary.org/&#xD;&#xA;  [2]: http://openfontlibrary.org/wiki/Open_Font_License" />
  <row Id="1021" PostHistoryTypeId="2" PostId="544" RevisionGUID="55ae0310-b07d-40ef-ac3e-f029f4104bdc" CreationDate="2010-07-15T23:29:26.193" UserId="140" Text="I'm only just learning to code myself, but CVs passed through my hand for several years at a moderately sized (50+) company. Most CVs went into a storage box or archive directory, never to see the light of day again. &#xD;&#xA;&#xD;&#xA;Research the studios that you want to work for and find out how they break down their coding tasks.&#xD;&#xA;&#xD;&#xA;First, learn C++. In the industry it will be absolutely necessary. If you only know how to work in C# and a job opportunity arises, you don't want to miss out. If you plan on working independently long term, learn whatever works for you.&#xD;&#xA;&#xD;&#xA;If you don't have strong 3D and graphics coding skills and you apply for one of those positions, expect it to be discarded. If you do have strong skills in those fields, *absolutely* include a demo or a link to your website showing those skills/projects in action.&#xD;&#xA;&#xD;&#xA;But you don't *have* to have leet 3D-fu skills to get picked up. Tools programmers work very closely with the designers and artists, and you get constant feedback on your work. If you like working with people and your portfolio shows that you developed game design tools this can be a rewarding experience. If you don't handle criticism well, it's not the role for you.&#xD;&#xA;&#xD;&#xA;Sound, animation, scripting - depending on the project you may find positions dedicated specifically to those fields, especially if there's an engine in development or heavy modification of one.&#xD;&#xA;&#xD;&#xA;Unlike 10 years ago where a bit of enthusiasm and just showing up with something cool could land you a job in-house, now roles are quite specialized. If you settle on one or two that you find exciting and hone those you can expand your skills as you go.&#xD;&#xA;&#xD;&#xA;Additionally, expect a coding test. If you walk in off the street for your interview and show off something impressive, it doesn't mean it's yours. They *will* want to see what you can do. You can expect 3 or more hours of problem solving or code refactoring to satisfy your interviewers.&#xD;&#xA;&#xD;&#xA;Good luck :)" />
  <row Id="1022" PostHistoryTypeId="2" PostId="545" RevisionGUID="ed082a7d-6b3a-49aa-b897-6cc086853fee" CreationDate="2010-07-15T23:37:27.710" UserId="208" Text="I've used [pygame][1] extensively, and it lots of positives:&#xD;&#xA;&#xD;&#xA; - it's a library for Python, which is a high-level language&#xD;&#xA; - it's got good clear [documentation][2]&#xD;&#xA; - it's got an active community&#xD;&#xA;&#xD;&#xA;Pygame is a wrapper around SDL, a cross-platform 2D graphics library. Pygame also has wrappers for sound, music etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/&#xD;&#xA;  [2]: http://www.pygame.org/docs/" />
  <row Id="1023" PostHistoryTypeId="2" PostId="546" RevisionGUID="196e074d-799b-4a09-8db0-936267bbb31d" CreationDate="2010-07-15T23:43:40.303" UserId="244" Text="I would like to create a simple multiplayer game server for a simple game:&#xD;&#xA;&#xD;&#xA;The game is supposed to be similar to Command &amp; Conquer, you have a few tanks and a few soldiers. You can select one soldier and than click on the map, to where the soldier should go. If the soldier comes to an area where he could not go, he walks around. And soldiers can be shot down by enemies.&#xD;&#xA;&#xD;&#xA;How should I structure the game server, and what should be done at the client?&#xD;&#xA;&#xD;&#xA;I.e if a soldier moves from X to Y but around building Z, I guess the server has to be able to calculate exactly where the soldier is located (in case an enemy shot at him), and the client also has to know the position for painting the soldier.&#xD;&#xA;&#xD;&#xA;What should be done at the server and I think I have to desing a protocol for this. I think the server has to keep track of the game state and the time. Is anyone having suggestions on how to do this? or could recommend some reading?" />
  <row Id="1024" PostHistoryTypeId="1" PostId="546" RevisionGUID="196e074d-799b-4a09-8db0-936267bbb31d" CreationDate="2010-07-15T23:43:40.303" UserId="244" Text="How to structure a simple game server for a multiplayer game?" />
  <row Id="1025" PostHistoryTypeId="3" PostId="546" RevisionGUID="196e074d-799b-4a09-8db0-936267bbb31d" CreationDate="2010-07-15T23:43:40.303" UserId="244" Text="&lt;multiplayer&gt;&lt;architecture&gt;&lt;state&gt;&lt;game-server&gt;" />
  <row Id="1029" PostHistoryTypeId="2" PostId="548" RevisionGUID="57187317-408e-4459-97d0-9a440d9e8f4c" CreationDate="2010-07-15T23:50:59.823" UserId="164" Text="Blender is one of those applications that you either love or hate. I know it is great for 3D modeling and and animations and there is a lot said about the UI and its steep learning curve.&#xD;&#xA;&#xD;&#xA;I am more interested in how Blender stands out as far as Game Development goes. So my question is, what would be the Pros and Cons of choosing to use Blender to develop a high performance 3D game?" />
  <row Id="1030" PostHistoryTypeId="1" PostId="548" RevisionGUID="57187317-408e-4459-97d0-9a440d9e8f4c" CreationDate="2010-07-15T23:50:59.823" UserId="164" Text="Blender For Game Development, Pros And Cons" />
  <row Id="1031" PostHistoryTypeId="3" PostId="548" RevisionGUID="57187317-408e-4459-97d0-9a440d9e8f4c" CreationDate="2010-07-15T23:50:59.823" UserId="164" Text="&lt;gamedev&gt;&lt;tools&gt;&lt;blender&gt;" />
  <row Id="1032" PostHistoryTypeId="2" PostId="549" RevisionGUID="5233d58e-b856-4e16-8f1e-e4b244f06efc" CreationDate="2010-07-16T00:27:20.607" UserId="101" Text="The Cg toolkit supports its own version of effect files, CgFX. These support techniques, states, annotations...&#xD;&#xA;&#xD;&#xA;I don't have any experience with them personally, but they are supported by FX Composer, at least.&#xD;&#xA;&#xD;&#xA;    CGeffect cgCreateEffectFromFile( CGcontext context,&#xD;&#xA;                                     const char * filename,&#xD;&#xA;                                     const char ** args );&#xD;&#xA;&#xD;&#xA;According to the [Cg Toolkit 2.2 manual][1], &quot;cgCreateEffectFromFile was introduced in Cg 1.4.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_February2010_ReferenceManual.pdf" />
  <row Id="1034" PostHistoryTypeId="2" PostId="550" RevisionGUID="ee215180-70a7-417e-ac12-7307b5918f65" CreationDate="2010-07-16T01:05:41.153" UserId="209" Text="I pretty much have [Theory of Fun][1] by my side all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.theoryoffun.com/" />
  <row Id="1035" PostHistoryTypeId="16" PostId="550" RevisionGUID="ee215180-70a7-417e-ac12-7307b5918f65" CreationDate="2010-07-16T01:05:41.153" UserId="-1" />
  <row Id="1036" PostHistoryTypeId="2" PostId="551" RevisionGUID="431f820e-7a12-4eff-b671-578752ad6725" CreationDate="2010-07-16T01:07:21.900" UserId="288" Text="I think what you are doing is just fine.&#xD;&#xA;&#xD;&#xA;If you had more than four colours I might suggest doing a dependent texture read: Instead of using the value of the texture to look up an array of colours (I assume you are passing these as shader parameters), you could use it to look up a colour in another 1D texture containing your palette.&#xD;&#xA;&#xD;&#xA;But this has some performance implications - and I think it limits you to PS 2.0.&#xD;&#xA;&#xD;&#xA;(There are some other sneaky optimisations possible if you're having to switch palettes every sprite and all the extra batches are killing performance. But I imagine in a NES-like game this is not the case.)&#xD;&#xA;&#xD;&#xA;I think what might be useful in your situation is to use the XNA content pipeline to take an easily editable, colour version of the sprite, check it only uses four colours, convert it to a texture with your four levels of grayscale (usable by your shader), and perhaps also output the original colour palette along side the texture.&#xD;&#xA;&#xD;&#xA;The Creators Club [samples for the content pipeline][1] might be a good place to start.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/education/catalog/?contenttype=0&amp;devarea=13&amp;sort=1" />
  <row Id="1037" PostHistoryTypeId="2" PostId="552" RevisionGUID="1f0348a0-bca6-4948-9567-a52ecc0b25b2" CreationDate="2010-07-16T01:21:38.047" UserId="321" Text="What is the best way for keeping all clients synchronized with a server and with each other?&#xD;&#xA;&#xD;&#xA;Currently, we have two approaches in mind:&#xD;&#xA;&#xD;&#xA;1. When a client sends something to the server, the server immediately sends out messages to all clients, which react immediately.&#xD;&#xA;2. Introducing some time delay, whereby the server sends out messages to all clients, with the directive, &quot;act upon this at time `t`.&#xD;&#xA;&#xD;&#xA;The second approach seems like it would more likely keep the clients all in better synchronization (since it caters for some degree of lag); but I wonder whether responsiveness would be lost to too high a degree (i.e. the user clicks 'jump' and there is a noticeable gap between pressing the button and actually jumping).&#xD;&#xA;&#xD;&#xA;There is also the possibility of having clients calculate their own position (and not wait for servers to say &quot;you have jumped&quot;); but because of the inevitable lag, clients would get very out-of-sync. &#xD;&#xA;&#xD;&#xA;Then there's the whole TCP vs. UDP question; because we want it fast, but I'd also hate for the server to say you're in a completely different location than you thought you were.&#xD;&#xA;&#xD;&#xA;With all of these competing demands, it all gets very uncertain. Which of these approaches (or any other) would be best for keeping clients and server all in sync?" />
  <row Id="1038" PostHistoryTypeId="1" PostId="552" RevisionGUID="1f0348a0-bca6-4948-9567-a52ecc0b25b2" CreationDate="2010-07-16T01:21:38.047" UserId="321" Text="Synchronizing clients with a server and with each other" />
  <row Id="1039" PostHistoryTypeId="3" PostId="552" RevisionGUID="1f0348a0-bca6-4948-9567-a52ecc0b25b2" CreationDate="2010-07-16T01:21:38.047" UserId="321" Text="&lt;architecture&gt;&lt;synchronization&gt;&lt;server&gt;&lt;client&gt;" />
  <row Id="1040" PostHistoryTypeId="2" PostId="553" RevisionGUID="812aa259-ab27-4bcc-bcc9-054e02da1cbb" CreationDate="2010-07-16T01:27:10.153" UserId="321" Text="By profiling my game, I see that the vast majority of the execution time of my hobby game is between the blit and the flip calls. Currently, it's only running at around 13fps. My video card is fairly decent, so my guess is that pygame is not using it.&#xD;&#xA;&#xD;&#xA;Does anyone know of any graphics/display options I need to set in pygame to make this faster? Or is this just something that I have to live with since I've chosen pygame?" />
  <row Id="1041" PostHistoryTypeId="1" PostId="553" RevisionGUID="812aa259-ab27-4bcc-bcc9-054e02da1cbb" CreationDate="2010-07-16T01:27:10.153" UserId="321" Text="Make pygame's frame rate faster" />
  <row Id="1042" PostHistoryTypeId="3" PostId="553" RevisionGUID="812aa259-ab27-4bcc-bcc9-054e02da1cbb" CreationDate="2010-07-16T01:27:10.153" UserId="321" Text="&lt;graphics&gt;&lt;pygame&gt;&lt;optimization&gt;&lt;frame-rate&gt;" />
  <row Id="1043" PostHistoryTypeId="2" PostId="554" RevisionGUID="5dcd6145-e30a-4bf3-9664-dadfa6db7bb8" CreationDate="2010-07-16T01:37:10.847" UserId="323" Text="It depends vastly on the kind of game and the tools you're working with. If you're making a first-person shooter in raw C++, you're going to spend a ton of time on programming. If you're making a 2d MMORPG in an existing game framework for 2d MMORPGs, it's going to be pretty much all asset creation of one kind or another. If you're making a puzzle game in an existing framework, you'll be spending pretty much all of it on level design.&#xD;&#xA;&#xD;&#xA;There's just no good answer without knowing, at the very least, the genre, scope, and tools involved." />
  <row Id="1044" PostHistoryTypeId="2" PostId="555" RevisionGUID="2761fc9e-832f-40f8-901d-8b8df37606a9" CreationDate="2010-07-16T01:46:43.447" UserId="323" Text="A friend of mine told me about a flight simulator he'd been a tester on.&#xD;&#xA;&#xD;&#xA;The &quot;landing&quot; algorithm was pretty simple.&#xD;&#xA;&#xD;&#xA;* Make sure the landing gear is down.&#xD;&#xA;* Make sure the plane's vertical velocity was small.&#xD;&#xA;* Make sure the plane's horizontal velocity was small.&#xD;&#xA;* Check the magnitude of the cross product of the plane's vertical normal and the ground's vertical normal. If it's too large, then the plane is at too much of an angle to land.&#xD;&#xA;&#xD;&#xA;See the bug?&#xD;&#xA;&#xD;&#xA;My friend did. He spent a few hours trying to duplicate it and finally succeeded.&#xD;&#xA;&#xD;&#xA;He walked into the lead tester's office with a printout of the screenshot. There's the runway, with the plane sitting on it *upside down*. Landing gear sticking straight up in the air. And giant text over the page:&#xD;&#xA;&#xD;&#xA;MISSION SUCCESSFUL." />
  <row Id="1045" PostHistoryTypeId="16" PostId="555" RevisionGUID="2761fc9e-832f-40f8-901d-8b8df37606a9" CreationDate="2010-07-16T01:46:43.447" UserId="-1" />
  <row Id="1046" PostHistoryTypeId="10" PostId="245" RevisionGUID="c193fe11-52aa-4d1e-9c53-214c952090ef" CreationDate="2010-07-16T01:49:10.477" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:18,&quot;DisplayName&quot;:&quot;Firas Assaad&quot;},{&quot;Id&quot;:97,&quot;DisplayName&quot;:&quot;Justin L.&quot;},{&quot;Id&quot;:301,&quot;DisplayName&quot;:&quot;MechP&quot;},{&quot;Id&quot;:159,&quot;DisplayName&quot;:&quot;Joe&quot;},{&quot;Id&quot;:323,&quot;DisplayName&quot;:&quot;ZorbaTHut&quot;}]" />
  <row Id="1047" PostHistoryTypeId="5" PostId="245" RevisionGUID="ca377c93-6232-42ea-9c76-c86fd1905a1d" CreationDate="2010-07-16T01:49:10.583" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Version control for game development - issues and solutions?](http://gamedev.stackexchange.com/questions/480/version-control-for-game-development-issues-and-solutions)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;What are some good (free or open-source) Version-control packages for developing games, and what are any game-specific issues in using them?&#xD;&#xA;&#xD;&#xA;**Update** There is a better version at [Version Control Issues][1]. If you want to copy over your Answers/Comments from here to there, please do so now. Then vote to close *this* Question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/480/version-control-for-game-development-issues-and-solutions" />
  <row Id="1049" PostHistoryTypeId="2" PostId="557" RevisionGUID="3a54bcf5-4e21-4ff3-b564-cbfa427a7bca" CreationDate="2010-07-16T02:20:09.887" UserId="325" Text="I've got two:&#xD;&#xA;&#xD;&#xA;I worked on Rally Cross for the PlayStation, and there was a snow level with falling snowflakes. A bug came back: &quot;no two snowflakes must look alike, as in nature&quot;.&#xD;&#xA;&#xD;&#xA;I worked on CART World Series also for the PlayStation. After shipping in North America, we did a Japanese version. We would receive bug reports directly from Japan. One particular bug noted an issue with the &quot;rap records&quot;. (Should have been &quot;lap&quot;.)" />
  <row Id="1050" PostHistoryTypeId="16" PostId="557" RevisionGUID="3a54bcf5-4e21-4ff3-b564-cbfa427a7bca" CreationDate="2010-07-16T02:20:09.887" UserId="-1" />
  <row Id="1051" PostHistoryTypeId="2" PostId="558" RevisionGUID="681e8b35-1ec4-432c-bb33-b82fd0c645c3" CreationDate="2010-07-16T02:25:32.540" UserId="288" Text="I've been trying out some rope-physics stuff recently, and I've found that the &quot;standard&quot; solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. This is especially the case when the rope is relevant to gameplay.&#xD;&#xA;&#xD;&#xA;(I don't really care about sagging, coiling up, etc - those are more visual effects anyway.)&#xD;&#xA;&#xD;&#xA;The behaviour of the &quot;Ninja Rope&quot; in Worms was very good for the player to swing on (which is what I am trying to achieve). Basically it was a straight line, like a wire, that could wrap around the environment (and subsequently unwrap), hold up an object, and change length.&#xD;&#xA;&#xD;&#xA;What I'd like to do is implement that kind of behaviour on a physics engine (specifically Farseer). My world is made up of convex polygons (I'm using SAT in Farseer).&#xD;&#xA;&#xD;&#xA;The first part of my question (easy) is: How would you implement this for a static environment?&#xD;&#xA;&#xD;&#xA;And the second part (hard) is: How would you extend this for a dynamic environment? Specifically: What if the objects the rope is wrapped around can move? And also how to make the rope exert a force on the objects it is wrapped around, based on the weight/pull of the thing swinging on the end of it?&#xD;&#xA;&#xD;&#xA;(For example: Imagine a weight hanging on a rope. A similarly sized object flies in from the side - it deforms the rope where it hits and is then pushed back out. This causes the weight on the rope to swing like a pendulum, but there is no need to simulate a wave being introduced to the rope.)" />
  <row Id="1052" PostHistoryTypeId="1" PostId="558" RevisionGUID="681e8b35-1ec4-432c-bb33-b82fd0c645c3" CreationDate="2010-07-16T02:25:32.540" UserId="288" Text="Implementing a Worms-like Ninja Rope on a 2D physics engine" />
  <row Id="1053" PostHistoryTypeId="3" PostId="558" RevisionGUID="681e8b35-1ec4-432c-bb33-b82fd0c645c3" CreationDate="2010-07-16T02:25:32.540" UserId="288" Text="&lt;physics&gt;&lt;farseer-physics-engine&gt;&lt;2d-physics&gt;" />
  <row Id="1054" PostHistoryTypeId="6" PostId="548" RevisionGUID="db1e26d6-7569-4fae-a402-92cc72be8c8b" CreationDate="2010-07-16T02:27:41.740" UserId="321" Comment="edited tags" Text="&lt;tools&gt;&lt;blender&gt;" />
  <row Id="1055" PostHistoryTypeId="6" PostId="480" RevisionGUID="3b1451fe-6ba1-47b7-817f-35f1993f70d7" CreationDate="2010-07-16T02:28:20.070" UserId="321" Comment="edited tags" Text="&lt;version-control&gt;" />
  <row Id="1056" PostHistoryTypeId="6" PostId="44" RevisionGUID="0382c169-9d08-41fa-9f0e-ab9f38eb21c2" CreationDate="2010-07-16T02:28:49.600" UserId="321" Comment="edited tags" Text="&lt;linux&gt;" />
  <row Id="1057" PostHistoryTypeId="2" PostId="559" RevisionGUID="a37d9897-c5ab-4f1e-8acc-58f812ffbcd9" CreationDate="2010-07-16T02:37:16.617" UserId="211" Text="The quick answer is: there is no best approach.&#xD;&#xA;&#xD;&#xA;Games all contain different architecture; every game will choose different sets of data to send in order to synchronize itself with other machines, which will affect the choices that you can make when choosing how to deal with lag.&#xD;&#xA;&#xD;&#xA;What you specify in option #2 -- that clients send messages to be acted on at a future time -- is definitely one approach. In fact, the Source engine uses a [variant of this approach][1], where rendering is always 100ms behind local client actions; all machines attempt to operate on the same actions at the same time. This adds an artificial, imperceptible lag to the game in order to hide actual network latency.&#xD;&#xA;&#xD;&#xA;If you can't take this approach, you can also choose option #1, simply sending the most up-to-date data and upon receipt, use interpolation and extrapolation (client-side prediction) to try to hide latency. I've used this approach in at least one shipping game -- but again, it all depends on *your* game; there may be other approaches you can take.&#xD;&#xA;&#xD;&#xA;Finally, when choosing between TCP and UDP -- you probably want UDP. There are scenarios where TCP *is* a viable option for networking your game, but when you're making an action game, you want the latest data as soon as possible. If you can deal with dropped packets yourself, UDP is the better choice. (There are libraries, such as [ENet][2], that provide a wrapper around UDP to replace functionality from TCP, such as reliable packets.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking&#xD;&#xA;  [2]: http://enet.bespin.org/" />
  <row Id="1058" PostHistoryTypeId="6" PostId="513" RevisionGUID="d4dc8d24-614f-4e7b-9c1f-b5912d2678b8" CreationDate="2010-07-16T02:50:04.277" UserId="195" Comment="edited tags" Text="&lt;c++&gt;&lt;learning&gt;&lt;beginner&gt;&lt;mario&gt;&lt;best-practices&gt;" />
  <row Id="1059" PostHistoryTypeId="2" PostId="560" RevisionGUID="39518f73-a58e-4497-8da5-87e535a8c229" CreationDate="2010-07-16T02:53:56.623" UserId="326" Text="As most of you know, embedded interpreters for languages like Lua and Python are widely used for scripting game logic, but I haven't seen much information on people going with domain-specific languages for their scripts, e.g. building a little logic scripting 'dialect' on top of the language used for the rest of the game, using macros or fluent programming or whatnot.&#xD;&#xA;&#xD;&#xA;So my questions are as follows:&#xD;&#xA;&#xD;&#xA;- What examples of such DSLs have you seen in real-world games?&#xD;&#xA;- What problems were run into?&#xD;&#xA;- Would you recommend this route for other game developers, and in what circumstances?&#xD;&#xA;- Do you see this becoming more common as game development moves toward more metaprogramming-friendly languages, e.g. Boo?" />
  <row Id="1060" PostHistoryTypeId="1" PostId="560" RevisionGUID="39518f73-a58e-4497-8da5-87e535a8c229" CreationDate="2010-07-16T02:53:56.623" UserId="326" Text="Domain-specific languages for scripting" />
  <row Id="1061" PostHistoryTypeId="3" PostId="560" RevisionGUID="39518f73-a58e-4497-8da5-87e535a8c229" CreationDate="2010-07-16T02:53:56.623" UserId="326" Text="&lt;scripting&gt;&lt;language-agnostic&gt;&lt;logic&gt;" />
  <row Id="1062" PostHistoryTypeId="5" PostId="552" RevisionGUID="2f2f1749-d47d-4193-a2d8-9b23ff94507f" CreationDate="2010-07-16T03:01:34.937" UserId="321" Comment="added 80 characters in body" Text="What is the best way for keeping all clients synchronized with a server and with each other?&#xD;&#xA;&#xD;&#xA;Currently, we have two approaches in mind:&#xD;&#xA;&#xD;&#xA;1. When a client sends something to the server, the server immediately sends out messages to all clients, which react immediately.&#xD;&#xA;2. Introducing some time delay, whereby the server sends out messages to all clients, with the directive, &quot;act upon this at time `t`.&#xD;&#xA;&#xD;&#xA;The second approach seems like it would more likely keep the clients all in better synchronization (since it caters for some degree of lag); but I wonder whether responsiveness would be lost to too high a degree (i.e. the user clicks 'jump' and there is a noticeable gap between pressing the button and actually jumping).&#xD;&#xA;&#xD;&#xA;There is also the possibility of having clients calculate their own position (and not wait for servers to say &quot;you have jumped&quot;); but because of the inevitable lag, clients would get very out-of-sync. &#xD;&#xA;&#xD;&#xA;Then there's the whole TCP vs. UDP question; because we want it fast, but I'd also hate for the server to say you're in a completely different location than you thought you were.&#xD;&#xA;&#xD;&#xA;With all of these competing demands, it all gets very uncertain how we should approach this issue. Which of these approaches (or any other) would be best for keeping clients and server all in sync? Which ones are actually used in the industry?" />
  <row Id="1063" PostHistoryTypeId="6" PostId="531" RevisionGUID="caed861e-4f0d-4d13-9e96-d7768fe0d103" CreationDate="2010-07-16T03:07:45.560" UserId="165" Comment="edited tags" Text="&lt;assets&gt;&lt;art&gt;" />
  <row Id="1064" PostHistoryTypeId="6" PostId="531" RevisionGUID="96399ffa-fc2a-493b-aa13-0b32cb2adb96" CreationDate="2010-07-16T03:08:19.397" UserId="165" Comment="edited tags" Text="&lt;assets&gt;&lt;art&gt;&lt;2d-textures&gt;" />
  <row Id="1065" PostHistoryTypeId="6" PostId="531" RevisionGUID="a32eb5a3-72ba-4464-9341-0a4b5b569d57" CreationDate="2010-07-16T03:09:37.803" UserId="165" Comment="edited tags" Text="&lt;assets&gt;&lt;art&gt;" />
  <row Id="1066" PostHistoryTypeId="2" PostId="561" RevisionGUID="a1ffcad2-dfee-4aae-ace3-9179d0040d46" CreationDate="2010-07-16T03:22:01.330" UserId="208" Text="If you're running in full-screen mode, you can use the `pygame.HWSURFACE` flag when you initialise the display to tell pygame to try to use a hardware surface. I believe that if a hardware surface can't be used, pygame will silently use a software surface.&#xD;&#xA;&#xD;&#xA;If you're not using a hardware surface, consider using `pygame.display.update(rectangle)` rather than `pygame.display.flip()`. This will only update the given rectangle rather than the whole display, which can increase your performance quite a bit unless your game actually needs to update the whole display.&#xD;&#xA;&#xD;&#xA;If you are using a hardware or OpenGL surface, there's also the `pygame.DOUBLEBUF` which uses hardware double buffering, meaning that your drawing functions will draw to one of the two buffers and `flip()` will swap which buffer is visible." />
  <row Id="1067" PostHistoryTypeId="5" PostId="545" RevisionGUID="7bf5e854-d7c5-4336-82af-09301193f265" CreationDate="2010-07-16T03:24:09.647" UserId="208" Comment="fixed grammar" Text="I've used [pygame][1] extensively, and it has lots of positives:&#xD;&#xA;&#xD;&#xA; - it's a library for Python, which is a high-level language&#xD;&#xA; - it's got good clear [documentation][2]&#xD;&#xA; - it's got an active community&#xD;&#xA;&#xD;&#xA;Pygame is a wrapper around SDL, a cross-platform 2D graphics library. Pygame also has wrappers for sound, music etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/&#xD;&#xA;  [2]: http://www.pygame.org/docs/" />
  <row Id="1068" PostHistoryTypeId="2" PostId="562" RevisionGUID="0508a6d3-8a02-4d6f-ae51-4a803db0e59e" CreationDate="2010-07-16T03:58:46.973" UserId="326" Text="In addition to talljosh's answer, I'd like to throw in a few more suggestions:&#xD;&#xA;&#xD;&#xA;Avoid rotations and scaling wherever you possibly can.  Such operations are done purely on the CPU and tend to be very, very slow.&#xD;&#xA;&#xD;&#xA;If you're doing direct pixel reads/modifications, use the `Surface.get_buffer()` method and work with that, rather than using the `Surface.set_at()/get_at()` methods." />
  <row Id="1069" PostHistoryTypeId="16" PostId="18" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-16T04:08:00.167" UserId="2" />
  <row Id="1070" PostHistoryTypeId="16" PostId="5" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-16T04:08:00.167" UserId="2" />
  <row Id="1071" PostHistoryTypeId="2" PostId="563" RevisionGUID="c9f7634b-d061-4e4c-a1d2-2732becff8a8" CreationDate="2010-07-16T04:23:33.163" UserId="94" Text="[Angel][1] (C++) and [AngelXNA][2] (C#) are worth looking at.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/&#xD;&#xA;  [2]: http://www.jeffongames.com/2009/05/angelxna-v10/" />
  <row Id="1072" PostHistoryTypeId="2" PostId="564" RevisionGUID="0e64a53c-989a-4935-b3e1-83930f959e93" CreationDate="2010-07-16T04:33:31.407" UserId="94" Text="The [Zero Budget Indie Marketing Guide][1] is a great read.  Besides that, definitely start building buzz as soon as you have anything to show, and do your best to keep the buzz up.  Demos, trailers, articles, blog posts, whatever you can get to drive traffic and interest.  From what I've heard, paid advertising is not very effective for indie games, so you may want to avoid it.  Focus instead on building organic and genuine interest.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.devmag.org.za/articles/78-ZERO-BUDGET-INDIE-MARKETING-GUIDE/" />
  <row Id="1073" PostHistoryTypeId="2" PostId="565" RevisionGUID="d61dda40-3589-44ae-a8b6-e83352d9249e" CreationDate="2010-07-16T04:39:46.800" UserId="94" Text="I'm not aware of any, so I'm building something in this vein more or less from scratch.  Currently just using libcurl on the client side and Django on the server side as bases." />
  <row Id="1074" PostHistoryTypeId="2" PostId="566" RevisionGUID="ae8f326e-1db8-4353-a422-23b9822b0b9d" CreationDate="2010-07-16T05:05:37.543" UserId="160" Text="&gt; I haven't seen much information on people going with domain-specific languages for their scripts, e.g. building a little logic scripting 'dialect' on top of the language used for the rest of the game, using macros or fluent programming or whatnot.&#xD;&#xA;&#xD;&#xA;Scripting languages tend to be an expensive proposition in games. Even Lua, which is quite fast, is still very much slower than native code. Game teams are typically only willing to take that hit because it buys them two very big benefits in return:&#xD;&#xA;&#xD;&#xA;1. The ability to change scripts without having to recompile and reload the game.&#xD;&#xA;2. The ability for non-programmers to write scripts.&#xD;&#xA;&#xD;&#xA;DSLs don't give you that, unfortunately." />
  <row Id="1075" PostHistoryTypeId="5" PostId="481" RevisionGUID="28d38876-fad1-4e5c-be52-19424a47b53b" CreationDate="2010-07-16T05:06:00.350" UserId="94" Comment="added 162 characters in body" Text="**Subversion**  &#xD;&#xA;&#xD;&#xA;  - Open-source, centralized&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - It works, though it can get quirky.  It's definitely *able* to handle repositories of at least 5.5 GB (total size of repository dir on server; mostly binary assets).&#xD;&#xA;" />
  <row Id="1076" PostHistoryTypeId="2" PostId="567" RevisionGUID="4653e8c0-109b-4309-b6b1-9228f0ae1577" CreationDate="2010-07-16T05:12:02.057" UserId="160" Text="You could try letting the user author the tracks using [Cornu spirals](http://en.wikipedia.org/wiki/Cornu_spiral). You'll find next-to-no literature about it online, because splines are the de facto way of representing curves in software. Nonetheless, they are how actual railroad tracks are pathed. Raph Levien has done a lot of work [popularizing them](http://www.levien.com/spiro/)." />
  <row Id="1077" PostHistoryTypeId="5" PostId="443" RevisionGUID="d842c89a-94fb-4c22-b880-579339eb5b12" CreationDate="2010-07-16T05:13:34.567" UserId="160" Comment="deleted 10 characters in body; edited title" Text="We have a lot of information on the internet out there on plenty of engines, SDKs, fancy IDEs, etc.&#xD;&#xA;But how did people manage to develop games in the past? Are there 'famous' tools? What was the most used programming language? how were they deployed into cartridges?" />
  <row Id="1078" PostHistoryTypeId="4" PostId="443" RevisionGUID="d842c89a-94fb-4c22-b880-579339eb5b12" CreationDate="2010-07-16T05:13:34.567" UserId="160" Comment="deleted 10 characters in body; edited title" Text="How were 8-bit and 16-bit games developed?" />
  <row Id="1079" PostHistoryTypeId="2" PostId="568" RevisionGUID="bc9312b0-07ce-4102-a987-37ff281dee6d" CreationDate="2010-07-16T05:15:22.377" UserId="160" Text="My book, [Game Programming Patterns](http://gameprogrammingpatterns.com/), is incomplete and on hiatus, but what I have is freely available online. You may get some use out of it." />
  <row Id="1080" PostHistoryTypeId="2" PostId="569" RevisionGUID="374b070c-e454-4c81-b5ee-3187cf1bf029" CreationDate="2010-07-16T05:34:04.890" UserId="242" Text="If you want to design a good game you may want to look at resources that have nothing to do with programming, but focus on the ideas behind your game idea.&#xD;&#xA;&#xD;&#xA;Such as war gaming, a classic book on War Games is [&quot;The Complete Wargames Handbook&quot;][1]. The only version I have read is the 1st edition, but it has had 3 edition total. Any edition will be useful and I have enjoyed the book.&#xD;&#xA;&#xD;&#xA;The Author, James F Dunnigan, is a long-time war game designer, actually almost a legend in the number of War games he has designed. He writes outside of games on the theory of War also. So if you game is a War game you would get a lot traction by getting at least one of James' books.&#xD;&#xA;&#xD;&#xA;The later editions of this book do deal with how Computer can and are used with this type of game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Complete-Wargames-Handbook-Play-Design/dp/0688103685" />
  <row Id="1081" PostHistoryTypeId="16" PostId="569" RevisionGUID="374b070c-e454-4c81-b5ee-3187cf1bf029" CreationDate="2010-07-16T05:34:04.890" UserId="-1" />
  <row Id="1082" PostHistoryTypeId="2" PostId="570" RevisionGUID="04fd5a82-1b98-443d-916e-46e19f684890" CreationDate="2010-07-16T05:39:44.257" UserId="294" Text="I find it curious that your question limits itself to **internal** DSLs, since I'd rather advocate the use of an *external* DSL in order to get the ability to load scripts at runtime and especially to allow non-devs to write game logic in the DSL.&#xD;&#xA;&#xD;&#xA;For instance, my current project is using a (for now) simple external DSL to specify part of the game logic that allows game designers to make balance tests mostly without dev intervention.&#xD;&#xA;&#xD;&#xA;On course you'll need to write a parser; to that end, I think the most recommended tool is [ANTLR][1] which targets [quite a few languages][2]. On my project though we went the parser combinator route with [jParsec][3] (our backend is Java, there are variants in other languages) which is quite nice for its close relationship with [BNF][4] but perhaps less well documented.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.antlr.org/ &quot;ANTLR&quot;&#xD;&#xA;  [2]: http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets&#xD;&#xA;  [3]: http://jparsec.codehaus.org/ &quot;jParsec&quot;&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form" />
  <row Id="1083" PostHistoryTypeId="2" PostId="571" RevisionGUID="669d7322-a376-486e-aa39-00d084a7eccb" CreationDate="2010-07-16T06:08:17.697" UserId="208" Text="[Mercurial][1]&#xD;&#xA;-------------&#xD;&#xA;&#xD;&#xA;Key features:&#xD;&#xA;&#xD;&#xA; - Distributed VCS&#xD;&#xA; - Free, open source&#xD;&#xA; - Plugin scripts can be written in Python or as shell scripts&#xD;&#xA; - There are many plugin scripts already freely available &#xD;&#xA;&#xD;&#xA;With regard to the use of non-text files, there is a bigfiles extension ( http://mercurial.selenic.com/wiki/BigfilesExtension ) which lets you store your assets in the same Mercurial repo, but only fetch the binaries you need when you need them.&#xD;&#xA;&#xD;&#xA;  [1]: http://mercurial.selenic.com/" />
  <row Id="1084" PostHistoryTypeId="16" PostId="571" RevisionGUID="669d7322-a376-486e-aa39-00d084a7eccb" CreationDate="2010-07-16T06:08:17.697" UserId="-1" />
  <row Id="1085" PostHistoryTypeId="5" PostId="571" RevisionGUID="3790be00-0a5f-48d1-a12b-b6c98bbff8a2" CreationDate="2010-07-16T06:13:57.810" UserId="208" Comment="added 211 characters in body" Text="[Mercurial][1]&#xD;&#xA;-------------&#xD;&#xA;&#xD;&#xA;Key features:&#xD;&#xA;&#xD;&#xA; - Distributed VCS&#xD;&#xA; - Free, open source&#xD;&#xA; - Plugin scripts are easy to write---can be written in Python or as shell scripts&#xD;&#xA; - There are many plugin scripts already freely available&#xD;&#xA; - Lots of documentation available, including [this book][2] (highly recommended)&#xD;&#xA;&#xD;&#xA;With regard to the use of non-text files, there is a bigfiles extension ( http://mercurial.selenic.com/wiki/BigfilesExtension ) which lets you store your assets in the same Mercurial repo, but only fetch the binaries you need when you need them.&#xD;&#xA;&#xD;&#xA;I have not encountered any issues with regard to large projects.&#xD;&#xA;&#xD;&#xA;  [1]: http://mercurial.selenic.com/&#xD;&#xA;  [2]: http://hgbook.red-bean.com/read/" />
  <row Id="1086" PostHistoryTypeId="5" PostId="481" RevisionGUID="ceb1828e-c198-4c67-bab4-b94f5d59b605" CreationDate="2010-07-16T06:16:02.783" UserId="208" Comment="Added link, changed title formatting." Text="[Subversion][1]&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;  - Open-source, centralized&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - It works, though it can get quirky.  It's definitely *able* to handle repositories of at least 5.5 GB (total size of repository dir on server; mostly binary assets).&#xD;&#xA;&#xD;&#xA;[1]: http://subversion.tigris.org/" />
  <row Id="1087" PostHistoryTypeId="5" PostId="571" RevisionGUID="93726b74-8f89-4f4c-8fbf-82e907351071" CreationDate="2010-07-16T06:19:15.177" UserId="208" Comment="+ mention of a large project that uses Mercurial" Text="[Mercurial][1]&#xD;&#xA;-------------&#xD;&#xA;&#xD;&#xA;Key features:&#xD;&#xA;&#xD;&#xA; - Distributed VCS&#xD;&#xA; - Free, open source&#xD;&#xA; - Plugin scripts are easy to write---can be written in Python or as shell scripts&#xD;&#xA; - There are many plugin scripts already freely available&#xD;&#xA; - Lots of documentation available, including [this book][2] (highly recommended)&#xD;&#xA;&#xD;&#xA;With regard to the use of non-text files, there is a bigfiles extension ( http://mercurial.selenic.com/wiki/BigfilesExtension ) which lets you store your assets in the same Mercurial repo, but only fetch the binaries you need when you need them.&#xD;&#xA;&#xD;&#xA;I am not aware of any issues with regard to large projects beyond those related to having large binary files. The Python project is a large project and [uses Mercurial][3].&#xD;&#xA;&#xD;&#xA;  [1]: http://mercurial.selenic.com/&#xD;&#xA;  [2]: http://hgbook.red-bean.com/read/&#xD;&#xA;  [3]: http://code.python.org/hg" />
  <row Id="1088" PostHistoryTypeId="2" PostId="572" RevisionGUID="94622fbe-3015-4e3a-93c2-e0886e392980" CreationDate="2010-07-16T06:27:18.283" UserId="229" Text="**Check out how the ninja rope in [Gusanos][1] was implemented:**&#xD;&#xA;&#xD;&#xA;- The rope acts like a particle until it attaches to something.&#xD;&#xA;- Once attached, the rope just applies a force onto the worm.&#xD;&#xA;- Attaching to dynamic objects (like other worms) is still a TODO: in this code.&#xD;&#xA;- I can't recall if wrapping around objects/corners is supported...&#xD;&#xA;&#xD;&#xA;**Relevant excerpt from [ninjarope.cpp][2]:**&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;    void NinjaRope::think()&#xD;&#xA;    {&#xD;&#xA;    	if ( m_length &gt; game.options.ninja_rope_maxLength )&#xD;&#xA;    		m_length = game.options.ninja_rope_maxLength;&#xD;&#xA;    &#xD;&#xA;    	if (!active)&#xD;&#xA;    		return;&#xD;&#xA;    		&#xD;&#xA;    	if ( justCreated &amp;&amp; m_type-&gt;creation )&#xD;&#xA;    	{&#xD;&#xA;    		m_type-&gt;creation-&gt;run(this);&#xD;&#xA;    		justCreated = false;&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	for ( int i = 0; !deleteMe &amp;&amp; i &lt; m_type-&gt;repeat; ++i)&#xD;&#xA;    	{&#xD;&#xA;    		pos += spd;&#xD;&#xA;    		&#xD;&#xA;    		BaseVec&lt;long&gt; ipos(pos);&#xD;&#xA;    		&#xD;&#xA;    		// TODO: Try to attach to worms/objects&#xD;&#xA;    				&#xD;&#xA;    		Vec diff(m_worm-&gt;pos, pos);&#xD;&#xA;    		float curLen = diff.length();&#xD;&#xA;    		Vec force(diff * game.options.ninja_rope_pullForce);&#xD;&#xA;    		&#xD;&#xA;    		if(!game.level.getMaterial( ipos.x, ipos.y ).particle_pass)&#xD;&#xA;    		{&#xD;&#xA;    			if(!attached)&#xD;&#xA;    			{&#xD;&#xA;    				m_length = 450.f / 16.f - 1.0f;&#xD;&#xA;    				attached = true;&#xD;&#xA;    				spd.zero();&#xD;&#xA;    				if ( m_type-&gt;groundCollision  )&#xD;&#xA;    					m_type-&gt;groundCollision-&gt;run(this);&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		else&#xD;&#xA;    			attached = false;&#xD;&#xA;    			&#xD;&#xA;    		if(attached)&#xD;&#xA;    		{&#xD;&#xA;    			if(curLen &gt; m_length)&#xD;&#xA;    			{&#xD;&#xA;    				m_worm-&gt;addSpeed(force / curLen);&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		else&#xD;&#xA;    		{&#xD;&#xA;    			spd.y += m_type-&gt;gravity;&#xD;&#xA;    			&#xD;&#xA;    			if(curLen &gt; m_length)&#xD;&#xA;    			{&#xD;&#xA;    				spd -= force / curLen;&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gusanos.sourceforge.net/&#xD;&#xA;  [2]: http://gusanos.cvs.sourceforge.net/viewvc/gusanos/Goop/ninjarope.cpp?view=markup" />
  <row Id="1089" PostHistoryTypeId="5" PostId="483" RevisionGUID="97611f9d-9e99-4f07-bb34-e7859c0c1911" CreationDate="2010-07-16T07:28:23.093" UserId="249" Comment="added a section on branching" Text="# [Perforce][1]&#xD;&#xA;&#xD;&#xA;Perforce (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. Open-source projects may be eligible for a free license (minus the technical support).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;Another drawback with Perforce is that branching in it tends to be a huge pain, especially if you have large trees. Almost every other vcs is better at branching and merging. This is usually a small price to pay for the above advantages though.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="1090" PostHistoryTypeId="2" PostId="573" RevisionGUID="7c89acb7-b1f3-4476-b5a4-0bb538f95588" CreationDate="2010-07-16T07:30:57.813" UserId="20" Text="Some of the open-source game projects have wiki pages or bug-trackers where you can find out about stuff to be done and where to contribute.&#xD;&#xA;I think in all cases it's a good idea to first get familiar with the game. Download and play it (if it's already in a playable stage), get familiar with the code, file bug-requests or try to fix open bugs. Get in touch with the developers.&#xD;&#xA;&#xD;&#xA;Here are two links to (rather big) open-source game projects, but of course there are plenty others out there:&#xD;&#xA;&#xD;&#xA; - [UFO Alien Invasion][1]. A game based on the X-COM Series. They also have a wiki page about contributing to the project: http://ufoai.ninex.info/wiki/index.php/Contribute&#xD;&#xA; - [Freeciv][2]. An open-source strategy game like &quot;Civilization&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ufoai.ninex.info/wiki/index.php/News&#xD;&#xA;  [2]: http://www.freeciv.net/" />
  <row Id="1091" PostHistoryTypeId="2" PostId="574" RevisionGUID="2c0959b0-57a2-4788-8087-6d37cb50fd4b" CreationDate="2010-07-16T07:35:27.210" UserId="249" Text="What are your experiences with automated testing of games? What worked, what didn't work?&#xD;&#xA;&#xD;&#xA;Please mention what kind of game you were working on, what the target platforms were, the team size, project time span and any other relevant information about the project." />
  <row Id="1092" PostHistoryTypeId="1" PostId="574" RevisionGUID="2c0959b0-57a2-4788-8087-6d37cb50fd4b" CreationDate="2010-07-16T07:35:27.210" UserId="249" Text="Automated testing of games" />
  <row Id="1093" PostHistoryTypeId="3" PostId="574" RevisionGUID="2c0959b0-57a2-4788-8087-6d37cb50fd4b" CreationDate="2010-07-16T07:35:27.210" UserId="249" Text="&lt;testing&gt;" />
  <row Id="1094" PostHistoryTypeId="2" PostId="575" RevisionGUID="76043867-06a7-41e6-933b-67dfa34bd992" CreationDate="2010-07-16T07:46:02.847" UserId="249" Text="In general that's a very complex subject. You have two conflicting aims (at least if you don't plan on running every single game on a dedicated server):&#xD;&#xA;&#xD;&#xA;1. You'll want as much as possible done on the server, both to prevent cheating and to make sure all clients see the same things.&#xD;&#xA;2. But you also want things to be fair, which means if one person has a 0-time ping to the server while others have network lag, when both issue a command to their units at the same time, the &quot;server&quot; player has an advantage.&#xD;&#xA;&#xD;&#xA;I can't exactly say how to solve that for an RTS. What we do for our FPS firing is have the server save a complete world state a while back and let the client timestamp every shot. When the network message for &quot;I fired!&quot; reaches the server, the server can roll back the world and do collision tests etc on the world &quot;as it looked for the client when the shot was fired&quot;.&#xD;&#xA;&#xD;&#xA;If you're planning on having lots of units, you'll also have the problem of potentially having too much processing for the server to handle. If you're not terribly worried about hacking or cheating, I'd suggest doing pathfinding on the clients, and sending the results of that over to the server.&#xD;&#xA;&#xD;&#xA;Yet another option might be to go peer2peer on it instead, letting each client deal with the updates for the local teams, but that then opens up the question of how to determines who hits what and so on.&#xD;&#xA;&#xD;&#xA;Depending on how complex this project is and how much effort you're willing to spend on it, my best suggestion would be to decide something preliminary and start working on it to test it." />
  <row Id="1095" PostHistoryTypeId="5" PostId="554" RevisionGUID="87afe9e6-eb91-4a1b-a258-292778c4a6c7" CreationDate="2010-07-16T07:50:32.073" UserId="323" Comment="deleted 5 characters in body" Text="It depends vastly on the kind of game and the tools you're working with. If you're making a first-person shooter in raw C++, you're going to spend a ton of time on programming. If you're making a 2d MMORPG in an existing game framework for 2d MMORPGs, it's going to be pretty much all asset creation of one kind or another. If you're making a puzzle game in an existing framework, you'll be spending nearly all of it on level design.&#xD;&#xA;&#xD;&#xA;There's just no good answer without knowing, at the very least, the genre, scope, and tools involved." />
  <row Id="1096" PostHistoryTypeId="2" PostId="576" RevisionGUID="6f14ac16-ef3c-4658-8151-16402296794d" CreationDate="2010-07-16T07:51:42.880" UserId="259" Text="We had a openworld shooter (x360,PS3,PC) that used a quick smoketest on the build server - it loaded the game, stepped through the front end, ran forwards, dumped a screenshot, and exited.  If cctray detected the clean exit the build was a success.&#xD;&#xA;&#xD;&#xA;We ran it for about the last year of the project, and with a team size of ~100 devs.&#xD;&#xA;&#xD;&#xA;It was effective at catching showstopping bugs but it was easy to create a build that passed the smoketest but failed most &quot;real&quot; levels, or didn't work in multiplayer, or nobbled the AI, so it wasn't perfect.  It was definitely worth doing.&#xD;&#xA;&#xD;&#xA;I've heard since I left they've started running a larger range of smoketests, farmed out to multiple PCs.  Apparently maintaining the smoketests is an issue, and there's a small team dedicated to just keeping the build servers and software maintained, so I can't say if that's been a success or not." />
  <row Id="1097" PostHistoryTypeId="2" PostId="577" RevisionGUID="e47d34be-70f9-42f8-a9bd-c385360535ee" CreationDate="2010-07-16T07:55:31.780" UserId="323" Text="One-person independent game. It was a multiplayer tank game with destructible terrain, and the destructible terrain and collision code proved somewhat flaky.&#xD;&#xA;&#xD;&#xA;I ended up rigging up some basic dumb AIs (by &quot;dumb&quot;, I mean &quot;absolutely idiotic&quot; - they would randomly choose &quot;drive towards an enemy tank&quot;, &quot;drive away from an enemy tank&quot;, and &quot;drive in a random direction&quot;, while randomly firing the main weapon) and playing the game at maximum framerate while recording keypresses. I got about 10-15x realtime. The code was heavily asserted, so if anything went wrong, it would dump the entire keypress log to disk along with an error report and the initial random seed. I could then go and replay the keypress log to duplicate the state exactly, or just debug from the error report.&#xD;&#xA;&#xD;&#xA;I left it running constantly for literally months. At the beginning it would rarely get an hour without crashing - I had to sit there and babysit it for a week, killing several obscure bugs per day. Eventually it got to the point where it was running for a week between failures, which translates to about 1500 player hours per crash.&#xD;&#xA;&#xD;&#xA;It was invaluable and I heartily recommend it." />
  <row Id="1098" PostHistoryTypeId="2" PostId="578" RevisionGUID="3ea5830d-f1db-4399-ae46-b00f1b5c3317" CreationDate="2010-07-16T07:59:05.813" UserId="259" Text="Getting involved in the modding community might be a good option.  &#xD;&#xA;&#xD;&#xA;Alternatively there's a tradition of grabbing the source for games like [Nethack][1], tweaking the source to add cool features, and releasing the changes as a patch.  The community is pretty friendly to boot.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nethack.org/" />
  <row Id="1099" PostHistoryTypeId="2" PostId="579" RevisionGUID="5f273bb6-c11f-411b-b57d-8b78aed3e7a5" CreationDate="2010-07-16T08:02:38.080" UserId="323" Text="My advice would be &quot;don't&quot;.&#xD;&#xA;&#xD;&#xA;I've used a domain-specific markup language for game data. It was a pain. I spent days designing it, and then every week or two I needed to tweak it to add more features. At one point I realized I needed to automatically generate some of my game data, and I ended up writing a small program to parse input files in the markup language, massage them, and output different files also in the markup language.&#xD;&#xA;&#xD;&#xA;I honestly have no idea what I was thinking. The entire thing would have been simpler, more efficient, less bugprone, and far far less time-consuming if I'd just used Lua.&#xD;&#xA;&#xD;&#xA;If you're working on such a restricted system that you can't start up a Lua environment, then perhaps you should use a DSL, but be prepared for agony. Otherwise I firmly believe you should just use Lua. Lua was originally designed as a simple data markup language and is still extremely conducive to using as such, and when (not if) you realize you need something more complicated, you've already got it. All of my current game development is done in Lua and I've never been more efficient or less bugprone.&#xD;&#xA;&#xD;&#xA;I cannot recommend against DSLs strongly enough." />
  <row Id="1100" PostHistoryTypeId="2" PostId="580" RevisionGUID="07d19ba1-c110-4500-ad04-787775c59717" CreationDate="2010-07-16T08:15:52.760" UserId="323" Text="Platformers are surprisingly difficult to write. Physics is tricky, and platformers rely more on physics than you'd expect (yes, even SMB1-era platformers - getting the feel right is quite tricky.)&#xD;&#xA;&#xD;&#xA;Pong, Tetris, and Galaga are classic start points. I'd start with those and come on from there.&#xD;&#xA;&#xD;&#xA;I'd also personally recommend against starting with C++, as it provides very little benefit for a one-man team. Use something higher-level like the Lua Love engine or Python Pygame. Switch back to C++ once you grok game layout, if you absolutely must." />
  <row Id="1101" PostHistoryTypeId="2" PostId="581" RevisionGUID="e7391e60-2e8e-4af2-98a5-10874c458931" CreationDate="2010-07-16T08:38:57.760" UserId="262" Text="I have built a couple of games on the iPad using core animation, but for my next project I would like to built a 3D game. I am not really comfortable with programming OpenGL directly and would also like the toolset that usually comes with a mature 3D engine project. I have used Ogre3D on the PC before and was very happy with that, but I wasn't sure if it had been ported to the iPad specifically and if there were better alternatives available.  &#xD;&#xA;&#xD;&#xA;What engines have used and can recommend? Specifically I am interested in:&#xD;&#xA;&#xD;&#xA;- Cost&#xD;&#xA;- Tool support&#xD;&#xA;- Data import functionality" />
  <row Id="1102" PostHistoryTypeId="1" PostId="581" RevisionGUID="e7391e60-2e8e-4af2-98a5-10874c458931" CreationDate="2010-07-16T08:38:57.760" UserId="262" Text="Which 3D Engine for iPad development?" />
  <row Id="1103" PostHistoryTypeId="3" PostId="581" RevisionGUID="e7391e60-2e8e-4af2-98a5-10874c458931" CreationDate="2010-07-16T08:38:57.760" UserId="262" Text="&lt;3d-engines&gt;&lt;ipad&gt;" />
  <row Id="1104" PostHistoryTypeId="2" PostId="582" RevisionGUID="600fcb6d-7b25-4d32-acaf-7d44461c359e" CreationDate="2010-07-16T08:42:18.343" UserId="178" Text="Blender can be easily extended via python and so it fits in virtually every content creation pipeline. You can write your own custom exporters, or even add your own UI-elements for tweaking game-specific properties. With version 2.5 the UI has got a major overhaul and is much more intuitive now.&#xD;&#xA;&#xD;&#xA;On the con side, many existing game engines don't provide really good exporters for blender, especially the commercial ones (but then, you can always write your own)." />
  <row Id="1105" PostHistoryTypeId="2" PostId="583" RevisionGUID="6eedd661-1f3f-4328-af25-cb483b94e166" CreationDate="2010-07-16T08:53:47.117" UserId="119" Text="You should ask yourself, do I want to learn C++ or do I want to make a game, because if you just want to make your 1st game, the best place to start would be Gamemaker, Unity, torque, xna or Flash. C++ is one of the harder languages to learn, so probably something to move on to when you have a bit more experience." />
  <row Id="1106" PostHistoryTypeId="2" PostId="584" RevisionGUID="4a7d1982-9af9-45d2-ba7e-0f874b32f2fa" CreationDate="2010-07-16T08:58:14.843" UserId="119" Text="Gamefeel by Steve Swink completely changed they way I think about developing games." />
  <row Id="1107" PostHistoryTypeId="16" PostId="584" RevisionGUID="4a7d1982-9af9-45d2-ba7e-0f874b32f2fa" CreationDate="2010-07-16T08:58:14.843" UserId="-1" />
  <row Id="1108" PostHistoryTypeId="2" PostId="585" RevisionGUID="7832db7c-ce73-4451-b9cd-1d865c5b05fb" CreationDate="2010-07-16T09:09:26.733" UserId="261" Text="We are in Pre-alpha stage of a game development project and haven´t yet got reply from Valve about how it works to distribute through Steam. We need this information to do a business model with all the different costs of developing and distributing this game.&#xD;&#xA;&#xD;&#xA;So my question is, what is the pricing structure? Do they take a per cent of our sale? If so, how much?&#xD;&#xA;&#xD;&#xA;Thanks Felix " />
  <row Id="1109" PostHistoryTypeId="1" PostId="585" RevisionGUID="7832db7c-ce73-4451-b9cd-1d865c5b05fb" CreationDate="2010-07-16T09:09:26.733" UserId="261" Text="Distribute through Steam" />
  <row Id="1110" PostHistoryTypeId="3" PostId="585" RevisionGUID="7832db7c-ce73-4451-b9cd-1d865c5b05fb" CreationDate="2010-07-16T09:09:26.733" UserId="261" Text="&lt;gamedev&gt;&lt;steam&gt;&lt;valve&gt;&lt;costs&gt;" />
  <row Id="1111" PostHistoryTypeId="6" PostId="546" RevisionGUID="b66ecb70-135c-4042-b9a8-696f0907f149" CreationDate="2010-07-16T09:13:42.957" UserId="244" Comment="edited tags" Text="&lt;multiplayer&gt;&lt;architecture&gt;&lt;state&gt;&lt;game-server&gt;&lt;mmorts&gt;" />
  <row Id="1112" PostHistoryTypeId="2" PostId="586" RevisionGUID="43352934-68ff-4d42-ba67-9d7c06ba6f19" CreationDate="2010-07-16T09:16:54.533" UserId="119" Text="Assume that each Box object has the properties x, y, width, height and have their origin at their center." />
  <row Id="1113" PostHistoryTypeId="1" PostId="586" RevisionGUID="43352934-68ff-4d42-ba67-9d7c06ba6f19" CreationDate="2010-07-16T09:16:54.533" UserId="119" Text="What is the fastest way to work out bounding box intersection?" />
  <row Id="1114" PostHistoryTypeId="3" PostId="586" RevisionGUID="43352934-68ff-4d42-ba67-9d7c06ba6f19" CreationDate="2010-07-16T09:16:54.533" UserId="119" Text="&lt;collision-detection&gt;&lt;optimization&gt;" />
  <row Id="1115" PostHistoryTypeId="2" PostId="587" RevisionGUID="59f99e4b-7594-4e6b-a9af-8a18a6df8c77" CreationDate="2010-07-16T09:21:39.903" UserId="323" Text="(C-ish pseudocode that does not correlate to any particular language - adapt language optimizations as appropriate)&#xD;&#xA;&#xD;&#xA;    bool DoBoxesIntersect(Box a, Box b) {&#xD;&#xA;      return (abs(a.x - b.x) * 2 &lt; (a.width + b.width)) &amp;&amp;&#xD;&#xA;             (abs(a.y - b.y) * 2 &lt; (a.height + b.height));&#xD;&#xA;    }" />
  <row Id="1116" PostHistoryTypeId="2" PostId="588" RevisionGUID="f633aa2f-9fa1-40c7-a370-fecb0767082e" CreationDate="2010-07-16T09:24:28.547" UserId="276" Text="Working on a 4x strategy game with 3d combat (think Homeworld meets Masters Of Orion) that unfortunately never saw the light of day as the company ran out of funding..&#xD;&#xA;&#xD;&#xA;I always ensured that you could play the game without human players so we could leave the game running overnight.&#xD;&#xA;&#xD;&#xA;We could turn off the 3d combat (simplified to a random result) and we left the AI strategy engine playing itself.  This found numerous bugs and issues.  Not only show stopper bugs but strategy bugs where the (eg) AI strategies would get deadlocked and spend 1000s of turns not doing &quot;the right thing&quot;.  These sort of bugs were difficult to spot just &quot;playing the game&quot;." />
  <row Id="1117" PostHistoryTypeId="2" PostId="589" RevisionGUID="e18d0dfa-7a99-4eeb-a4ee-313205968c82" CreationDate="2010-07-16T09:24:34.460" UserId="119" Text="Edge ran a story on how Gauntlet was made. All the art was drawn on graph paper and manually programmed in!" />
  <row Id="1118" PostHistoryTypeId="16" PostId="589" RevisionGUID="e18d0dfa-7a99-4eeb-a4ee-313205968c82" CreationDate="2010-07-16T09:24:34.460" UserId="-1" />
  <row Id="1119" PostHistoryTypeId="2" PostId="590" RevisionGUID="ebc7c818-315c-413b-bd16-5a4a9ab820c2" CreationDate="2010-07-16T09:24:41.450" UserId="323" Text="Speaking as someone who's done this: *it's not worth the hassle*. Unless your game design absolutely needs it, and it almost certainly doesn't, you'll spend far more effort getting sweeping working than you really expect. And it will be slower than you wanted it to be." />
  <row Id="1120" PostHistoryTypeId="2" PostId="591" RevisionGUID="98aae01f-3bea-46ce-ada9-a797b6e05ca1" CreationDate="2010-07-16T09:28:31.483" UserId="261" Text="If we use Cryengine 3 for game development and make the game 3D compatible. Because 3D sends out two pictures, will this mean that you need a computer with twice the &quot;power&quot;? So if you get 30 fps when playing normal you will need 60 fps for playing with 3D? &#xD;&#xA;&#xD;&#xA;Thanks Felix " />
  <row Id="1121" PostHistoryTypeId="1" PostId="591" RevisionGUID="98aae01f-3bea-46ce-ada9-a797b6e05ca1" CreationDate="2010-07-16T09:28:31.483" UserId="261" Text="Cryengine 3 3D double requirement " />
  <row Id="1122" PostHistoryTypeId="3" PostId="591" RevisionGUID="98aae01f-3bea-46ce-ada9-a797b6e05ca1" CreationDate="2010-07-16T09:28:31.483" UserId="261" Text="&lt;3d&gt;&lt;cryengine&gt;&lt;3&gt;&lt;requirements&gt;" />
  <row Id="1123" PostHistoryTypeId="5" PostId="587" RevisionGUID="6527e819-c549-47b0-a92a-6abc4b0b0d52" CreationDate="2010-07-16T09:30:34.947" UserId="323" Comment="added a bit of description; deleted 51 characters in body" Text="(C-ish pseudocode - adapt language optimizations as appropriate)&#xD;&#xA;&#xD;&#xA;    bool DoBoxesIntersect(Box a, Box b) {&#xD;&#xA;      return (abs(a.x - b.x) * 2 &lt; (a.width + b.width)) &amp;&amp;&#xD;&#xA;             (abs(a.y - b.y) * 2 &lt; (a.height + b.height));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In English: On each axis, check to see if the centers of the boxes are close enough that they'll intersect. If they intersect on both axes, then the boxes intersect. If they don't, then they don't.&#xD;&#xA;&#xD;&#xA;You can change the &lt;'s to &lt;= if you want to count edge-touching as intersecting. If you want a specific edge-touch formula, you can't use == - that will tell you if the corners touch, not if the edges touch. You'd want to do something like `return DoBoxesIntersectOrTouch(a, b) &amp;&amp; !DoBoxesIntersect(a, b)`." />
  <row Id="1124" PostHistoryTypeId="2" PostId="592" RevisionGUID="4b23cd8a-595b-48e3-a032-567607b8c2a0" CreationDate="2010-07-16T09:33:57.600" UserId="323" Text="I've heard it's around 30%, but like all sites of this type, the actual pricing structures are under an NDA." />
  <row Id="1125" PostHistoryTypeId="2" PostId="593" RevisionGUID="e13e4bf6-fe87-40ba-9324-b61e29c56423" CreationDate="2010-07-16T09:41:41.923" UserId="119" Text="For a turn based game you don't need the extra speed of peer to peer, and you want to use the server to do some cheat detection. Electroserver, player.io, smartfox and red5 will all do the job." />
  <row Id="1126" PostHistoryTypeId="2" PostId="594" RevisionGUID="e631c359-3763-4bb9-b7bf-7779ff6ffdfd" CreationDate="2010-07-16T09:51:44.543" UserId="259" Text="If you want object-aligned bounding boxes, try this tutorial on the **seperation axis theorem** by metanet:&#xD;&#xA;http://www.metanetsoftware.com/technique/tutorialA.html&#xD;&#xA;&#xD;&#xA;SAT isn't the fastest solution, but it's relatively simple.  You're trying to find a single line (or a plane if 3D) that will seperate your objects.  If this line exists it's guarenteed to be paralell to the edge of one of your boxes, so you iterate through all edges testing to see if it seperates the boxes.&#xD;&#xA;&#xD;&#xA;This also works for axis-aligned boxes by constraining to just the x/y axis." />
  <row Id="1127" PostHistoryTypeId="2" PostId="595" RevisionGUID="a39f64b2-c8f3-4214-9bfa-d618d369bcb6" CreationDate="2010-07-16T10:38:58.953" UserId="263" Text="I have not worked with Valve or released a game on Steam, but I attended a talk given by some guys that just released their first indie game on Steam.&#xD;&#xA;&#xD;&#xA;I doubt you'll hear much from them if you're in pre-alpha. He said that when they first contacted Valve, they were told not to send screenshots or demos or anything due to legal reasons. They didn't get much attention from Valve until they ignored that and started emailing screenshots and demos anyway (they were near the end of beta). Valve liked what they saw and hooked them up.&#xD;&#xA;&#xD;&#xA;From what they said, Valve is very friendly towards indie developers. They said selling on Steam has been a great experience and they made back all their development costs within a month of their game being on sale.&#xD;&#xA;&#xD;&#xA;However, he said that they get tons of spam to that email address from people who just have game ideas and not an actual game, so if you are in pre-alpha my guess is you'll get the cold shoulder. They have to filter people out somehow. But go back when you've got a solid beta or a demo and they'll probably welcome you with open arms." />
  <row Id="1128" PostHistoryTypeId="6" PostId="8" RevisionGUID="0034b248-3c17-44bc-b551-6980e20d3563" CreationDate="2010-07-16T10:49:42.683" UserId="323" Comment="edited tags" Text="&lt;sound&gt;" />
  <row Id="1130" PostHistoryTypeId="2" PostId="596" RevisionGUID="47eef880-84da-411b-a76c-e7c7b936dcda" CreationDate="2010-07-16T10:51:06.083" UserId="82" Text="There are some programs that allow you to design some menus/hud/interfaces in flash and then insert them into your game. But is there something similar for making all of this stuff in Silverlight and then mount that content in your XNA game?" />
  <row Id="1131" PostHistoryTypeId="1" PostId="596" RevisionGUID="47eef880-84da-411b-a76c-e7c7b936dcda" CreationDate="2010-07-16T10:51:06.083" UserId="82" Text="How can I add a Silverlight menu/hud/interface to an XNA game?" />
  <row Id="1132" PostHistoryTypeId="3" PostId="596" RevisionGUID="47eef880-84da-411b-a76c-e7c7b936dcda" CreationDate="2010-07-16T10:51:06.083" UserId="82" Text="&lt;flash&gt;&lt;xna&gt;&lt;silverlight&gt;" />
  <row Id="1133" PostHistoryTypeId="6" PostId="130" RevisionGUID="e369f690-71aa-4c40-892f-531e1aa3c56b" CreationDate="2010-07-16T10:51:10.200" UserId="323" Comment="edited tags" Text="&lt;game-design&gt;&lt;design-document&gt;" />
  <row Id="1134" PostHistoryTypeId="6" PostId="409" RevisionGUID="5449e583-00ff-4b7b-b7af-bf1594cec4ab" CreationDate="2010-07-16T10:51:22.963" UserId="323" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="1135" PostHistoryTypeId="6" PostId="497" RevisionGUID="1a025e13-3391-402f-8d08-f043a426c73d" CreationDate="2010-07-16T10:51:44.380" UserId="323" Comment="edited tags" Text="&lt;tutorials&gt;&lt;books&gt;&lt;game-design&gt;" />
  <row Id="1136" PostHistoryTypeId="6" PostId="90" RevisionGUID="920cb0be-6d4a-4f05-a96e-57c3a0d49ae7" CreationDate="2010-07-16T10:54:44.160" UserId="323" Comment="edited tags" Text="&lt;engine&gt;&lt;mmo&gt;" />
  <row Id="1137" PostHistoryTypeId="6" PostId="371" RevisionGUID="c55fe65a-6a24-4cf8-a1a6-8b614daaacd2" CreationDate="2010-07-16T10:54:59.527" UserId="323" Comment="edited tags" Text="&lt;subjective&gt;&lt;engine&gt;&lt;c&gt;" />
  <row Id="1138" PostHistoryTypeId="6" PostId="351" RevisionGUID="612f95f8-7adf-413a-a145-520404ee777e" CreationDate="2010-07-16T10:55:10.227" UserId="323" Comment="edited tags" Text="&lt;3d&gt;&lt;engine&gt;" />
  <row Id="1140" PostHistoryTypeId="6" PostId="221" RevisionGUID="63aef713-e437-4d88-983c-a7ec31a51b85" CreationDate="2010-07-16T10:55:34.297" UserId="323" Comment="edited tags" Text="&lt;c++&gt;&lt;engine&gt;" />
  <row Id="1141" PostHistoryTypeId="6" PostId="546" RevisionGUID="7d99cef5-5700-47a3-8ce0-ea920cef275c" CreationDate="2010-07-16T10:56:16.997" UserId="323" Comment="edited tags" Text="&lt;multiplayer&gt;&lt;architecture&gt;&lt;state&gt;&lt;server&gt;&lt;mmorts&gt;" />
  <row Id="1142" PostHistoryTypeId="6" PostId="510" RevisionGUID="6312d646-ba84-46aa-9d68-1830bedd8309" CreationDate="2010-07-16T10:56:32.220" UserId="323" Comment="edited tags" Text="&lt;3d-meshes&gt;&lt;3d-engines&gt;&lt;engines&gt;" />
  <row Id="1143" PostHistoryTypeId="6" PostId="510" RevisionGUID="35643fee-5a49-47ef-b076-9a5858416990" CreationDate="2010-07-16T10:56:44.263" UserId="323" Comment="edited tags" Text="&lt;engine&gt;&lt;3d-meshes&gt;&lt;3d-engines&gt;" />
  <row Id="1144" PostHistoryTypeId="6" PostId="585" RevisionGUID="2d3d0174-d4d8-45c4-8992-7384127d241c" CreationDate="2010-07-16T10:57:09.770" UserId="323" Comment="edited tags" Text="&lt;steam&gt;&lt;valve&gt;&lt;costs&gt;" />
  <row Id="1145" PostHistoryTypeId="6" PostId="90" RevisionGUID="9e4dc6c6-ce38-44a8-a817-513e145d2f16" CreationDate="2010-07-16T10:59:56.117" UserId="323" Comment="edited tags" Text="&lt;engine&gt;&lt;mmo&gt;&lt;costs&gt;" />
  <row Id="1146" PostHistoryTypeId="2" PostId="597" RevisionGUID="4aca2342-3ff2-4c51-b7cb-ccf69a9286c5" CreationDate="2010-07-16T11:10:26.910" UserId="120" Text="Not really, there is no elegent way to make silverlight/wpf and xna live side by side like that. At work we reimplemented some of WPFs basic controls to do in game 2D layout, but thats over most peoples needs. You better off rolling your own game specific UI code.&#xD;&#xA;&#xD;&#xA;Might be an idea to keep you eyes on [RedBadgers XPF][1] project, but its going to be a long wait :P (the company was founded by the guy who did our wpf/xna implementation at work)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://red-badger.com/product" />
  <row Id="1147" PostHistoryTypeId="2" PostId="598" RevisionGUID="22dbc44c-98a7-4fd2-9db7-3fd2be1e8f4a" CreationDate="2010-07-16T11:12:47.343" UserId="83" Text="Gamedev.net has a great introduction [here][1]&#xD;&#xA;&#xD;&#xA;Also as far as what games to start with I would reference this [article][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/start_here/&#xD;&#xA;  [2]: http://www.gamedev.net/reference/design/features/makegames/" />
  <row Id="1148" PostHistoryTypeId="16" PostId="7" RevisionGUID="fddc8124-abcb-4f65-b62c-1cd2856c9505" CreationDate="2010-07-16T11:13:11.553" UserId="13" />
  <row Id="1149" PostHistoryTypeId="6" PostId="7" RevisionGUID="fddc8124-abcb-4f65-b62c-1cd2856c9505" CreationDate="2010-07-16T11:13:11.553" UserId="13" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;java&gt;&lt;pitfalls&gt;" />
  <row Id="1150" PostHistoryTypeId="2" PostId="599" RevisionGUID="e617ff82-e0d1-4a07-8e34-eae8426dd1c5" CreationDate="2010-07-16T11:36:34.760" UserDisplayName="Darren Torpey" Text="Are you looking to contribute to a general framework as a way to learn about game programming? Or are you looking for an open-source-style community to help you learn?&#xD;&#xA;&#xD;&#xA;If the latter (and maybe the former?), I recommend Pygame: http://www.pygame.org/&#xD;&#xA;&#xD;&#xA;I got started with Pygame (for traditional game dev) many years ago for the original Boston Game Jam, and I found it to be a great tool for learning basic game development concepts.&#xD;&#xA;&#xD;&#xA;Also, if you decide to try Pygame, don't miss the tutorials here: http://www.pygame.org/wiki/tutorials" />
  <row Id="1152" PostHistoryTypeId="2" PostId="600" RevisionGUID="fd5b2939-fe1b-4cc0-b1f0-20fb1516eabd" CreationDate="2010-07-16T11:58:59.400" UserId="127" Text="I read an article just yesterday about it. It should explain all -&gt; http://game-linchpin.com/2010/07/are-you-good-enough-to-make-3d-games.html&#xD;&#xA;&#xD;&#xA;In short, to answer your question, yes you will need to be outputting 60fps to have the effect of 30fps. " />
  <row Id="1153" PostHistoryTypeId="5" PostId="586" RevisionGUID="ce0c6ca9-a194-4a27-9400-9ac9a846c499" CreationDate="2010-07-16T12:13:15.907" UserId="119" Comment="added 60 characters in body" Text="Assume that each Box object has the properties x, y, width, height and have their origin at their center, and that neither the objects nor the bounding boxes rotate." />
  <row Id="1154" PostHistoryTypeId="16" PostId="495" RevisionGUID="9e897015-d0d2-401d-9b82-8b88104810e1" CreationDate="2010-07-16T12:35:12.260" UserId="310" />
  <row Id="1155" PostHistoryTypeId="5" PostId="495" RevisionGUID="9e897015-d0d2-401d-9b82-8b88104810e1" CreationDate="2010-07-16T12:35:12.260" UserId="310" Comment="Added to community wiki" Text="I am planning on developing my first iPhone game, and I was wanting to know whether I should use OpenGL or CoreGraphics for a 2D game.  An outline of the benefits would also be helpful.&#xD;&#xA;&#xD;&#xA;Edit: Set this for the community wiki as the answer will be too subjective" />
  <row Id="1156" PostHistoryTypeId="6" PostId="495" RevisionGUID="9e897015-d0d2-401d-9b82-8b88104810e1" CreationDate="2010-07-16T12:35:12.260" UserId="310" Comment="Added to community wiki" Text="&lt;graphics&gt;&lt;iphone&gt;" />
  <row Id="1157" PostHistoryTypeId="2" PostId="601" RevisionGUID="cd1d1c2e-2ddc-4d3a-8de6-4f0269567f57" CreationDate="2010-07-16T12:39:55.853" UserId="174" Text="I'm making a point and click adventure game, and I'm currently trying to figure out the best way to implement a command system.&#xD;&#xA;&#xD;&#xA;Assume a Monkey Island or Maniac Mansion style interface, with a palette of verbs, and objects in the scene and in the inventory. Clicking on these, you build up a sentence to execute.&#xD;&#xA;&#xD;&#xA;for example, you might click `look at` and then a tree to get &quot;look at tree&quot; or click on an apple, and then `give`, and then a girl, to get &quot;give apple to girl&quot;.&#xD;&#xA;&#xD;&#xA;There are three possible forms of a sentence:&#xD;&#xA;&#xD;&#xA;- `verb`, for example &quot;save&quot;&#xD;&#xA;- `verb noun`, for example &quot;pick up apple&quot;, &quot;look at octopus&quot;&#xD;&#xA;- `verb noun noun`, for example &quot;give pickle to rabid dog&quot;, &quot;use crowbar with pickle jar&quot;&#xD;&#xA;&#xD;&#xA;In different situations, I'll want the action to be carried out to be defined by different objects.&#xD;&#xA;&#xD;&#xA;For example, for the `give` verb, there might be a default action defined that makes the character say something like &quot;I'd prefer to hang on to that&quot;, or the rabid dog might define an action where it eats anything you attempt to give it.&#xD;&#xA;&#xD;&#xA;If the interface is to work like Maniac Mansion, then you build the sentence, and then tell it to execute (in Maniac Mansion, by either clicking the sentence, or clicking again on the last thing you clicked on).&#xD;&#xA;&#xD;&#xA;If it's to work like Monkey Island, the sentence executes as soon as it's complete, which poses a problem for verbs like `use` which might sometimes take one noun, and other times two.&#xD;&#xA;&#xD;&#xA;So how would you implement a system that handles this?" />
  <row Id="1158" PostHistoryTypeId="1" PostId="601" RevisionGUID="cd1d1c2e-2ddc-4d3a-8de6-4f0269567f57" CreationDate="2010-07-16T12:39:55.853" UserId="174" Text="How can I implement a command system for a point-and-click style adventure game?" />
  <row Id="1159" PostHistoryTypeId="3" PostId="601" RevisionGUID="cd1d1c2e-2ddc-4d3a-8de6-4f0269567f57" CreationDate="2010-07-16T12:39:55.853" UserId="174" Text="&lt;engine&gt;&lt;game-design&gt;&lt;adventure&gt;" />
  <row Id="1160" PostHistoryTypeId="2" PostId="602" RevisionGUID="c5d43a29-be00-4ca4-bdba-f1c66312423b" CreationDate="2010-07-16T12:43:23.133" UserId="119" Text="Yeah doesn't sound like that would be possible as they're both going to fight over control of directX I think. At least XNA has a decent 2D API for you to work with. You could make some simple components like a numerical display, bar display etc and possibly a little an application to visually drag them around and arrange them, then spit out an XML file with the configuration." />
  <row Id="1161" PostHistoryTypeId="5" PostId="576" RevisionGUID="93a97ea6-9f26-4e5c-b66b-5356a79d4b23" CreationDate="2010-07-16T13:13:27.310" UserId="259" Comment="removed ambiguity about the thing with the thing" Text="We had a openworld shooter (x360,PS3,PC) that used a quick smoketest on the build server - it loaded the game, stepped through the front end, ran [the avatar] forwards, dumped a screenshot, and exited.  If cctray detected the clean exit the build was a success.&#xD;&#xA;&#xD;&#xA;We ran it for about the last year of the project, and with a team size of ~100 devs.&#xD;&#xA;&#xD;&#xA;It was effective at catching showstopping bugs but it was easy to create a build that passed the smoketest but failed most &quot;real&quot; levels, or didn't work in multiplayer, or nobbled the AI, so it wasn't perfect.  It was definitely worth doing.&#xD;&#xA;&#xD;&#xA;I've heard since I left they've started running a larger range of smoketests, farmed out to multiple PCs.  Apparently maintaining the smoketests is an issue, and there's a small team dedicated to just keeping the build servers and software maintained, so I can't say if that's been a success or not." />
  <row Id="1162" PostHistoryTypeId="2" PostId="603" RevisionGUID="9fb5af2a-b03e-49c3-a65c-ef49d113e300" CreationDate="2010-07-16T13:16:06.197" UserId="119" Text="This question really doesn't have an answer, but it's an interesting discussion anyway.&#xD;&#xA;&#xD;&#xA;Modeling and raw asset creation (textures, audio)&#xD;&#xA;&#xD;&#xA; - this could take literally years, if you're a single person trying to make a make professional quality 3D models for a whole game. On the other hand, many indie games use retro pixel art, 3D primitives or hand drawn graphics, and then you could have all your art done in a matter of days! It's normally more cost effective to purchase royalty free audio from a site like http://www.soundrangers.com than professionally record yourself, although something like Garage Band or Sony Acid is great for music. You can also buy packs of off-the-shelf 3D models for under $100 dollars, but this will make your game a lot more generic and less unique. There are many good sites with free textures though.&#xD;&#xA;&#xD;&#xA;Level design&#xD;&#xA;&#xD;&#xA; - this depends on how big your game is an how much of the fun comes from puzzles and challenges incorporated into the level design. If you can create a system that is lego-like and doesn't require special programming for each level, you can hand level-design over to other, less technical (ie cheaper!) team members. Some really fun games, like Spelunky, use algorithms to auto-generate levels, and that would certainly save you some time.&#xD;&#xA;&#xD;&#xA;Gameplay design&#xD;&#xA;&#xD;&#xA; - Gameplay can actually come to together in a matter of hours by just playing around and hacking code. It can even happen by accident sometimes when you find an unexpected behaviour that is more fun than you were actually going for. That said, you want to put a lot of thought it to things like - how does the character interact with terrain, walls, ledges, water etc. It's better to design the game through your code than do too much on paper&#xD;&#xA;&#xD;&#xA;Programming&#xD;&#xA;&#xD;&#xA; - For indie games it's normally better to use a pre-existing engine to handle the solved problems like collision detection etc&#xD;&#xA;&#xD;&#xA;Testing&#xD;&#xA;&#xD;&#xA; - Testing playability is really important. For indie games you should be able to get friends and fans to do this for free. At the design agency I worked at we'd get the receptionist, project managers and interns to do testing.&#xD;&#xA;&#xD;&#xA;Marketing&#xD;&#xA;&#xD;&#xA; - Keeping a blog, twitter account etc is a good idea, but don't let it stop you finishing your game. Buying ads costs money but shouldn't take up any time." />
  <row Id="1163" PostHistoryTypeId="2" PostId="604" RevisionGUID="de4bc5d7-a451-4743-aad2-507371450213" CreationDate="2010-07-16T13:16:10.080" UserId="288" Text="I'm using Farseer Physics Engine quite extensively at the moment, and I've noticed that it seems to store a lot of temporaries as members of the class, and not on the stack as one might expect.&#xD;&#xA;&#xD;&#xA;Here is an example from the `Body` class (the function in question is `GetWorldPosition`)&#xD;&#xA;&#xD;&#xA;    private Vector2 _worldPositionTemp = Vector2.Zero;&#xD;&#xA;    private Matrix _bodyMatrixTemp = Matrix.Identity;&#xD;&#xA;&#xD;&#xA;    public void GetBodyMatrix(out Matrix bodyMatrix)&#xD;&#xA;    {&#xD;&#xA;        Matrix.CreateTranslation(position.X, position.Y, 0, out _translationMatrixTemp);&#xD;&#xA;        Matrix.CreateRotationZ(rotation, out _rotationMatrixTemp);&#xD;&#xA;        Matrix.Multiply(ref _rotationMatrixTemp, ref _translationMatrixTemp, out bodyMatrix);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Vector2 GetWorldPosition(Vector2 localPosition)&#xD;&#xA;    {&#xD;&#xA;        GetBodyMatrix(out _bodyMatrixTemp);&#xD;&#xA;        Vector2.Transform(ref localPosition, ref _bodyMatrixTemp, out _worldPositionTemp);&#xD;&#xA;        return _worldPositionTemp;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It looks like its a by-hand performance optimisation. But I don't see how this could possibly help performance? (If anything I think it would hurt by making objects much larger)." />
  <row Id="1164" PostHistoryTypeId="1" PostId="604" RevisionGUID="de4bc5d7-a451-4743-aad2-507371450213" CreationDate="2010-07-16T13:16:10.080" UserId="288" Text="Why does Farseer store temporaries as members and not on the stack? (.NET)" />
  <row Id="1165" PostHistoryTypeId="3" PostId="604" RevisionGUID="de4bc5d7-a451-4743-aad2-507371450213" CreationDate="2010-07-16T13:16:10.080" UserId="288" Text="&lt;xna&gt;&lt;c#&gt;&lt;farseer-physics-engine&gt;&lt;.net&gt;" />
  <row Id="1167" PostHistoryTypeId="6" PostId="109" RevisionGUID="32fe30ff-a562-46e9-afe8-442801a4934f" CreationDate="2010-07-16T13:19:49.493" UserId="13" Comment="edited tags" Text="&lt;c#&gt;&lt;libraries&gt;&lt;.net&gt;" />
  <row Id="1168" PostHistoryTypeId="6" PostId="366" RevisionGUID="47221566-aeb6-4a0c-b8f4-2a6551180ec5" CreationDate="2010-07-16T13:20:22.957" UserId="13" Comment="edited tags" Text="&lt;c#&gt;&lt;3d-meshes&gt;&lt;.net&gt;&lt;mesh&gt;&lt;mesh-formats&gt;" />
  <row Id="1170" PostHistoryTypeId="2" PostId="606" RevisionGUID="a92d7f45-0ca6-4568-b983-d4eebe21149e" CreationDate="2010-07-16T13:23:27.550" UserId="259" Text="There's two problems here:  Interpretting the player's input into a syntax tree, then exectuing that tree.&#xD;&#xA;&#xD;&#xA;For the first stage, I'd have each verb button create a concrete verb instance derived from some verb interface.  That instance would be passed further nouns or verbs for validation.  If valid, it would attach the noun to its internal syntax tree, else it would reject with an appropriate error.&#xD;&#xA;&#xD;&#xA;After each button press, you could ask the verb tree if it was in a valid state to proceed (for the Monkey Island-style input).&#xD;&#xA;&#xD;&#xA;Once on to the second stage, the concrete verb would be responsible for parsing its own tree and updating the game state.  &#xD;&#xA;&#xD;&#xA;A more complex solution would involve parsing the tree externally to the verb.  Each tree element would be responsible for small actions that together produced the desired result.  This approach would allow you to make more emergent sentences from small building blocks.&#xD;&#xA;&#xD;&#xA;Check out the [Interpreter][1] pattern for more info on the parsing stage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Interpreter_pattern" />
  <row Id="1171" PostHistoryTypeId="2" PostId="607" RevisionGUID="63b7bcb9-ab63-47de-92f1-1a5164636dd1" CreationDate="2010-07-16T13:24:43.413" UserId="335" Text="There are basically two approaches:&#xD;&#xA;&#xD;&#xA;1. Trusted client&#xD;&#xA;2. Untrusted client&#xD;&#xA;&#xD;&#xA;The trusted client is a little bit more complex, but has the advantage that you can offload a lot of your computation from the server.&#xD;&#xA;Cost of server operation is one of the biggest problems for multiplayer games and will seriously reduce your scalability.&#xD;&#xA;&#xD;&#xA;A good approach (for beginners) is to let each players client handle it's own units.&#xD;&#xA;In the next step you can use spare cycles to let players clients verify other clients actions.&#xD;&#xA;Server shouldn't need to do more than exchanging messages, keeping sync and ensuring persistence (e.g. database).&#xD;&#xA;&#xD;&#xA;If you plan to have some kind of lobby or chat then then handle each of these topics&#xD;&#xA;in an extra server. It will make things a lot easier down the road.&#xD;&#xA;" />
  <row Id="1172" PostHistoryTypeId="2" PostId="608" RevisionGUID="92fd8c49-4199-4ad5-a98c-0a4730aae771" CreationDate="2010-07-16T13:30:07.520" UserId="335" Text="I have worked in various companies that used blender extensively for their game development.&#xD;&#xA;Most of them used their own exporters, but the reasons for that start to diminish,&#xD;&#xA;since blenders collada exporter is becoming better.&#xD;&#xA;&#xD;&#xA;If you are talking about GameBlender (&quot;running games in blender&quot;) I like it for rapid prototyping, but not for final products (due to the plugin dependency).&#xD;&#xA;&#xD;&#xA;If you just want it to create assets, then it doesn't matter where your data comes from,&#xD;&#xA;since your engine will make the difference.&#xD;&#xA;" />
  <row Id="1173" PostHistoryTypeId="5" PostId="558" RevisionGUID="02ee6412-0283-4fd3-b2ed-8b20a90b09cc" CreationDate="2010-07-16T13:30:51.043" UserId="288" Comment="added 2 characters in body; deleted 2 characters in body; added 4 characters in body" Text="I've been trying out some rope-physics stuff recently, and I've found that the &quot;standard&quot; solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. This is especially the case when the rope is relevant to gameplay.&#xD;&#xA;&#xD;&#xA;(I don't really care about sagging, coiling up, etc - those are more visual effects anyway.)&#xD;&#xA;&#xD;&#xA;The behaviour of the &quot;Ninja Rope&quot; in Worms was very good for the player to swing on (which is what I am trying to achieve). Basically it was a straight line, like a wire, that could **wrap around the environment** (and subsequently unwrap), hold up an object, and change length.&#xD;&#xA;&#xD;&#xA;What I'd like to do is implement that kind of behaviour on a physics engine (specifically Farseer). My world is made up of convex polygons (I'm using SAT in Farseer).&#xD;&#xA;&#xD;&#xA;The first part of my question (easy) is: How would you implement this for a static environment?&#xD;&#xA;&#xD;&#xA;And the second part (hard) is: How would you extend this for a dynamic environment? Specifically: What if the objects the rope is wrapped around can move? And also how to make the rope exert a force on the objects it is wrapped around, based on the weight/pull of the thing swinging on the end of it?&#xD;&#xA;&#xD;&#xA;(For example: Imagine a weight hanging on a rope. A similarly sized object flies in from the side - it deforms the rope where it hits and is then pushed back out. This causes the weight on the rope to swing like a pendulum, but there is no need to simulate a wave being introduced to the rope.)" />
  <row Id="1174" PostHistoryTypeId="2" PostId="609" RevisionGUID="aecbcf77-57c9-4def-a346-83e0f0218571" CreationDate="2010-07-16T13:32:17.920" UserId="20" Text="I'm going to give the obvious answer here, which is [Ogre3D][1]. It's a feature rich and mature 3D graphics engine/framework, written in C++.&#xD;&#xA;&#xD;&#xA;It runs on Windows, Linux and Mac OS X and even on iPhone and other devices. There are also wrappers for Java, .NET and Python out there (see: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Alternative+Languages), so you are even free to choose your programming language to some degree.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/" />
  <row Id="1175" PostHistoryTypeId="2" PostId="610" RevisionGUID="cc23d790-f5e3-4573-84ce-64644094dfeb" CreationDate="2010-07-16T13:37:29.827" UserId="118" Text="I want to develop a world map where each tile is a 800x600 png image and the size of the grid is at least 10x10. My solution for this is to load only the tiles that are the immediate neighbors of the tile where the player is. As he navigates the map, relevant tiles get loaded into memory while the rest are unloaded. &#xD;&#xA;&#xD;&#xA;For example, here is the player in tile (3,3):&#xD;&#xA;&#xD;&#xA;![Player at (3,3)](http://img138.imageshack.us/img138/7067/tilemaphelp1.png)&#xD;&#xA;&#xD;&#xA;As he moves from his tile to the tile on the right (4,3), the three tiles at the far left are deallocated while the three tiles at the right are allocated:&#xD;&#xA;&#xD;&#xA;![Player moves to (4,3)](http://img682.imageshack.us/img682/7206/tilemaphelp2.png)&#xD;&#xA;&#xD;&#xA;I was thinking that there should be a threshold in a tile that triggers the loading and unloading of these tiles. Also, this loading would probably be in a separate thread.&#xD;&#xA;&#xD;&#xA;So, my two main questions are:&#xD;&#xA;&#xD;&#xA;**How should I design this?**  &#xD;&#xA;And, since my target platform is the XBOX 360, **how does threading work?**&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="1176" PostHistoryTypeId="1" PostId="610" RevisionGUID="cc23d790-f5e3-4573-84ce-64644094dfeb" CreationDate="2010-07-16T13:37:29.827" UserId="118" Text="XNA: Stream loading a HUGE tile map" />
  <row Id="1177" PostHistoryTypeId="3" PostId="610" RevisionGUID="cc23d790-f5e3-4573-84ce-64644094dfeb" CreationDate="2010-07-16T13:37:29.827" UserId="118" Text="&lt;xna&gt;" />
  <row Id="1178" PostHistoryTypeId="2" PostId="611" RevisionGUID="f5226ac5-a969-49b1-9246-049d84c5ef84" CreationDate="2010-07-16T13:40:49.507" UserId="335" Text="Have a look at the [opencollada][1] site.&#xD;&#xA;&#xD;&#xA;The SDK is licensed under MIT license and should get you a good start.&#xD;&#xA;&#xD;&#xA;If you are planning to make a game (and not just a viewer app),&#xD;&#xA;you should run the converter offline (during the build)&#xD;&#xA;and load your optimized model format during runtime.&#xD;&#xA;&#xD;&#xA;Parsing collada is inefficient and shipping collada files is just wasted space.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opencollada.org/" />
  <row Id="1179" PostHistoryTypeId="5" PostId="558" RevisionGUID="051ebdd6-eed3-49a7-b670-461e99b154ee" CreationDate="2010-07-16T13:41:34.637" UserId="288" Comment="deleted 57 characters in body; edited title; added 6 characters in body" Text="I've been trying out some rope-physics stuff recently, and I've found that the &quot;standard&quot; solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. This is especially the case when the rope is relevant to gameplay.&#xD;&#xA;&#xD;&#xA;(I don't really care about sagging, coiling up, etc - those are more visual effects anyway. I've also tried the other end of the spectrum - using a simple spring - but that is also unsatisfying.)&#xD;&#xA;&#xD;&#xA;What I'd like to implement is something like the &quot;Ninja Rope&quot; from Worms. Basically it was a straight line, like a wire, that could **wrap around the environment** (and subsequently unwrap).&#xD;&#xA;&#xD;&#xA;The environment in this case is made up of convex polygons (specifically I am using SAT in Farseer).&#xD;&#xA;&#xD;&#xA;The first part of my question (easy) is: How would you implement this for a static environment?&#xD;&#xA;&#xD;&#xA;And the second part (hard) is: How would you extend this for a dynamic environment? Specifically: What if the objects the rope is wrapped around can move? And also how to make the rope exert a force on the objects it is wrapped around, based on the weight/pull of the thing swinging on the end of it?&#xD;&#xA;&#xD;&#xA;(For example: Imagine a weight hanging on a rope. A similarly sized object flies in from the side - it deforms the rope where it hits and is then pushed back out. This causes the weight on the rope to swing like a pendulum, but there is no need to simulate a wave being introduced to the rope.)" />
  <row Id="1180" PostHistoryTypeId="4" PostId="558" RevisionGUID="051ebdd6-eed3-49a7-b670-461e99b154ee" CreationDate="2010-07-16T13:41:34.637" UserId="288" Comment="deleted 57 characters in body; edited title; added 6 characters in body" Text="Implementing a Worms-like Ninja Rope in a 2D physics engine" />
  <row Id="1181" PostHistoryTypeId="5" PostId="555" RevisionGUID="6663f60a-75bb-4976-a57b-c6f299ccf572" CreationDate="2010-07-16T13:58:02.820" UserId="323" Comment="added 14 characters in body" Text="A friend of mine told me about a flight simulator he'd been a tester on.&#xD;&#xA;&#xD;&#xA;The &quot;landing&quot; algorithm was pretty simple.&#xD;&#xA;&#xD;&#xA;* Make sure the landing gear is down.&#xD;&#xA;* Make sure the plane's vertical velocity was small enough.&#xD;&#xA;* Make sure the plane's horizontal velocity was small enough.&#xD;&#xA;* Check the magnitude of the cross product of the plane's vertical normal and the ground's vertical normal. If it's too large, then the plane is at too much of an angle to land.&#xD;&#xA;&#xD;&#xA;See the bug?&#xD;&#xA;&#xD;&#xA;My friend did. He spent a few hours trying to duplicate it and finally succeeded.&#xD;&#xA;&#xD;&#xA;He walked into the lead tester's office with a printout of the screenshot. There's the runway, with the plane sitting on it *upside down*. Landing gear sticking straight up in the air. And giant text over the page:&#xD;&#xA;&#xD;&#xA;MISSION SUCCESSFUL." />
  <row Id="1182" PostHistoryTypeId="2" PostId="612" RevisionGUID="b315dd93-207b-4c2d-9fda-b47d64527b3a" CreationDate="2010-07-16T13:58:24.923" UserId="335" Text="If you have an existing team that will use the scripting language or a lead (level)designer that will use the scripting,&#xD;&#xA;then go with whatever their language of choice is.&#xD;&#xA;They will be spending their time with it, so they should be catered to.&#xD;&#xA;&#xD;&#xA;[grain of salt]&#xD;&#xA;If you don't have anybody or plan long term,&#xD;&#xA;then&#xD;&#xA;**roll your own**. yes, writing a compiler and/or interpreter for a scripting language might take a week or two, but in the long run the flexibility will pay of many times.&#xD;&#xA;Just don't go to far astray and reinvent brainfuck.&#xD;&#xA;[/grain of salt]&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1183" PostHistoryTypeId="2" PostId="613" RevisionGUID="f1cf03c8-7613-4cde-b05d-7b61fe31928e" CreationDate="2010-07-16T14:01:40.797" UserId="335" Text="If your client/server architecture is clean, the transport layer (almost) doesn't matter.&#xD;&#xA;&#xD;&#xA;TCP has some drawbacks, but these are easily cirumvented.&#xD;&#xA;&#xD;&#xA;So yes, TCP and a brain is all you need.&#xD;&#xA;&#xD;&#xA;With common network setups (proxies, firewalls, etc) today UDP is pretty much useless for all but local (read: LAN) games." />
  <row Id="1185" PostHistoryTypeId="2" PostId="615" RevisionGUID="d51bb7a4-65be-4c9c-a939-6c157f9631e2" CreationDate="2010-07-16T14:22:33.290" UserId="159" Text="What you want to do is pretty common. For a nice tutorial on this and other common techniques, check out &lt;a href=&quot;http://blog.nickgravelyn.com/downloads/&quot;&gt;this tile engine series&lt;/a&gt;. &#xD;&#xA;&#xD;&#xA;If you haven't done anything like this before, I recommend watching the series. However, if you wanted you could get the last tutorials code. If you do the later, check out the draw method. &#xD;&#xA;&#xD;&#xA;In a nutshell, you need to find your min and max X/Y points around the player. Once you have that you just loop through each one and draw that tile.  &#xD;&#xA;&#xD;&#xA;    public override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        Point min = currentMap.WorldPointToTileIndex(camera.Position);&#xD;&#xA;        Point max = currentMap.WorldPointToTileIndex( camera.Position +&#xD;&#xA;            new Vector2(&#xD;&#xA;                ScreenManager.Viewport.Width + currentMap.TileWidth,&#xD;&#xA;                ScreenManager.Viewport.Height + currentMap.TileHeight));&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        min.X = (int)Math.Max(min.X, 0);&#xD;&#xA;        min.Y = (int)Math.Max(min.Y, 0);&#xD;&#xA;        max.X = (int)Math.Min(max.X, currentMap.Width);&#xD;&#xA;        max.Y = (int)Math.Min(max.Y, currentMap.Height + 100);&#xD;&#xA;    &#xD;&#xA;        ScreenManager.SpriteBatch.Begin(SpriteBlendMode.AlphaBlend&#xD;&#xA;                                        , SpriteSortMode.Immediate&#xD;&#xA;                                        , SaveStateMode.None&#xD;&#xA;                                        , camera.TransformMatrix);&#xD;&#xA;        for (int x = min.X; x &lt; max.X; x++)&#xD;&#xA;        {&#xD;&#xA;            for (int y = min.Y; y &lt; max.Y; y++)&#xD;&#xA;            {&#xD;&#xA;    &#xD;&#xA;                Tile tile = Tiles[x, y];&#xD;&#xA;                if (tile == null)&#xD;&#xA;                    continue;&#xD;&#xA;    &#xD;&#xA;                Rectangle currentPos = new Rectangle(x * currentMap.TileWidth, y * currentMap.TileHeight, currentMap.TileWidth, currentMap.TileHeight);&#xD;&#xA;                ScreenManager.SpriteBatch.Draw(tile.Texture, currentPos, tile.Source, Color.White);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        ScreenManager.SpriteBatch.End();&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Point WorldPointToTileIndex(Vector2 worldPoint)&#xD;&#xA;    {&#xD;&#xA;        worldPoint.X = MathHelper.Clamp(worldPoint.X, 0, Width * TileWidth);&#xD;&#xA;        worldPoint.Y = MathHelper.Clamp(worldPoint.Y, 0, Height * TileHeight);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	Point p = new Point();&#xD;&#xA;    			&#xD;&#xA;    	// simple conversion to tile indices&#xD;&#xA;    	p.X = (int)Math.Floor(worldPoint.X / TileWidth);&#xD;&#xA;    	p.Y = (int)Math.Floor(worldPoint.Y / TileWidth);&#xD;&#xA;    &#xD;&#xA;    	return p;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As you can see there is a lot going on. You need a camera that is going to create your matrix, you need to convert your current pixel location to a tile index, you find your min/max points ( I add a little to my MAX so it draws beyond the visible screen a little bit), and then you can draw it.&#xD;&#xA;&#xD;&#xA;I really suggest watching the tutorial series. He covers your current problem, how to create a tile editor, keeping the player within bounds, sprite animation, AI interaction, etc...&#xD;&#xA;&#xD;&#xA;On a side note &lt;a href=&quot;http://tiledlib.codeplex.com/&quot;&gt;TiledLib&lt;/a&gt; has this built in. You could study their code as well." />
  <row Id="1186" PostHistoryTypeId="2" PostId="616" RevisionGUID="ef1d14f9-18c2-403b-abe8-28aaf17b1e25" CreationDate="2010-07-16T14:45:13.203" UserId="69" Text="I've been out of hobby Game Development for quite a while now.  Back when I did it, most people used Direct Draw to create 2D games.  By the time I stopped people were saying OpenGL or Direct3D with an orthogonal projection is just the way to go.&#xD;&#xA;&#xD;&#xA;I'm thinking about getting back into creating 2D games, in particular on mobile phone but maybe on the XNA platform as well.  To make something using OpenGL I'd have a (hopefullly) small learning curve to acclimate myself to 3D development.&#xD;&#xA;&#xD;&#xA;Is there any reason to skip that and instead work with a 2D framework where I just have a Width x Height frame buffer I need to fill with pixels?" />
  <row Id="1187" PostHistoryTypeId="1" PostId="616" RevisionGUID="ef1d14f9-18c2-403b-abe8-28aaf17b1e25" CreationDate="2010-07-16T14:45:13.203" UserId="69" Text="For 2D games, is there any reason NOT to use a 3D API like Direct3D or OpenGL?" />
  <row Id="1188" PostHistoryTypeId="3" PostId="616" RevisionGUID="ef1d14f9-18c2-403b-abe8-28aaf17b1e25" CreationDate="2010-07-16T14:45:13.203" UserId="69" Text="&lt;2d&gt;&lt;opengl&gt;&lt;beginner&gt;&lt;directx&gt;" />
  <row Id="1189" PostHistoryTypeId="2" PostId="617" RevisionGUID="f149314e-8d99-4126-9751-1dc73624899c" CreationDate="2010-07-16T14:52:40.800" UserId="323" Text="No, there isn't. You'll get better effects and faster rendering by using a 3d renderer. For example, [here][1] is a 2d game I made a few weeks ago (in one weekend) - the orb effects lean heavily on 3d shaders, even though in many ways they're 2d effects. Similarly, I made extensive use of the available rendering technology for [this game][2] - there's three or four different pixel shader effects going on there, all of which let me develop faster and make it prettier.&#xD;&#xA;&#xD;&#xA;Embrace the 3d and love it, but love it with one fewer axis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mandible.net/wp-content/uploads/2010/06/ramsgate.png&#xD;&#xA;  [2]: http://www.mandible.net/2010/01/25/mr-mcdougals-marvelous-upside-down-electrotree/" />
  <row Id="1190" PostHistoryTypeId="2" PostId="618" RevisionGUID="1524546d-e845-4cf0-892d-db0724e07e27" CreationDate="2010-07-16T15:12:14.280" UserId="34" Text="You should definitely be using something that uses a 3D renderer on the backend.  But in your higher level code, you shouldn't even see the Z axis.  All of that should be abstracted away at the lower levels.  If you are manipulating pixels directly, you are probably doing something wrong.&#xD;&#xA;&#xD;&#xA;For my own games, I built up a set of classes for dealing with 2D objects.  My game logic was only dealing with x and y coordinates.  My classes also handled things like rotation, scaling, blend modes, etc, etc.  &#xD;&#xA;&#xD;&#xA;Of course, there are also existing 2D libraries that you can use as well -- Cocos2D is a popular one on the iPhone.  Most, if not all, of these libraries will be built upon the lower level 3D APIs so that they benefit from the acceleration available.  " />
  <row Id="1191" PostHistoryTypeId="2" PostId="619" RevisionGUID="5aa1ed06-876d-4b62-874b-9f8da07e7027" CreationDate="2010-07-16T15:16:34.533" UserId="136" Text="3D APIs are generally the way to go.  Today's GPUs are designed to render 3D graphics, so you're guaranteed pretty solid performance.  And as ZorbaTHut said, going the 3D route lets you take advantage of things like pixel shaders.&#xD;&#xA;&#xD;&#xA;There really aren't that many 2D APIs out there anymore.  DirectDraw has been deprecated, and most of the 2D/vector-based libraries out there use OpenGL or Direct3D to perform their rendering anyway.  Even modern UI toolkits are leveraging 3D APIs to do their rendering and compositing.  Take WPF (Microsoft's latest UI framework) for example: it uses Direct3D for rendering." />
  <row Id="1192" PostHistoryTypeId="2" PostId="620" RevisionGUID="55abda95-4de2-4a4e-ae89-6fe7233e1531" CreationDate="2010-07-16T15:22:31.853" UserId="136" Text="You should choose a scripting language that has stable and well-supported bindings to your game's primary development language.  If you are writing your game in C or C++, then there are pretty solid bindings available for Python and Lua.  If you are writing your game for the .NET platform (using C# or another language), then I highly recommend using either IronPython or IronRuby.  Both are complete language implementations that leverage Microsoft's Dynamic Language Runtime (DLR), which provides excellent performance and very tight integration with the .NET Framework.  Interoperability between C# and IronPython/IronRuby is pretty smooth these days, especially with the introduction of dynamic callsite binding in C# 4.0." />
  <row Id="1193" PostHistoryTypeId="6" PostId="591" RevisionGUID="50f74137-318a-4bd6-a4f0-120c249bf7bb" CreationDate="2010-07-16T15:23:27.080" UserId="51" Comment="edited tags" Text="&lt;3d&gt;&lt;requirements&gt;" />
  <row Id="1194" PostHistoryTypeId="2" PostId="621" RevisionGUID="99c411e5-9ff9-4202-82c3-b608c25e4807" CreationDate="2010-07-16T15:25:03.337" UserId="247" Text="Cowboy seems to be popular..." />
  <row Id="1195" PostHistoryTypeId="2" PostId="622" RevisionGUID="11b8324f-d5c8-4b71-9570-1f3106dec9fb" CreationDate="2010-07-16T15:29:15.930" UserId="136" Text="If you are using C#, you should just consider using WCF to abstract away the networking layer.  A MUD wouldn't have a whole lot of network traffic, relatively speaking, so going this route could make things a lot easier for you.  I've been using WCF for a turn-based strategy game, and it's worked out pretty well for me." />
  <row Id="1196" PostHistoryTypeId="5" PostId="239" RevisionGUID="64524c99-f88f-4436-94f3-13913e31b650" CreationDate="2010-07-16T15:29:25.073" UserId="160" Comment="added 4 characters in body" Text="World of Warcraft has:&#xD;&#xA;&#xD;&#xA;* **5,500,000 – Lines of code**&#xD;&#xA;* **1,500,000 – Art assets**&#xD;&#xA;* 33,681 – Production tasks&#xD;&#xA;* 70,167 – Spells&#xD;&#xA;* 37,537 – NPCs (non-player characters)&#xD;&#xA;* **27 – Hours of music**&#xD;&#xA;* 2600 – Quests in the original World of Warcraft&#xD;&#xA;* 2700+ - Additional quests in WoW: The Burning Crusade&#xD;&#xA;* 2350+ - Additional quests in WoW: Wrath of the Lich King&#xD;&#xA;* 7650+ - Quests total (how many have you finished?)&#xD;&#xA;* 4,449,680,399 – Achievements earned by players since their implementation (this figure is already a few days old, and therefore outdated)&#xD;&#xA;&#xD;&#xA;Patches:&#xD;&#xA;&#xD;&#xA;* 4.7– Petabytes (4700 terabytes) of data delivered to players through patches&#xD;&#xA;* **126 – Different versions issued of every patch**, including those streamed to players and issued as self-extracting executables&#xD;&#xA;* Half – Of every patch’s size is audio&#xD;&#xA;&#xD;&#xA;Servers:&#xD;&#xA;&#xD;&#xA;* **13,250 – Server blades** running WoW servers, with a total of&#xD;&#xA;* 75,000 – CPU cores, and&#xD;&#xA;* 112.5 – Terabytes of RAM&#xD;&#xA;&#xD;&#xA;Support:&#xD;&#xA;&#xD;&#xA;* **179,184 – Bugs tracked by Blizzard** (most of which have been fixed, according to the presenters)&#xD;&#xA;* 2,056 – Game masters&#xD;&#xA;* 340 – Employees in the billing department&#xD;&#xA;* 2,584 – Total customer service employees&#xD;&#xA;&#xD;&#xA;International:&#xD;&#xA;&#xD;&#xA;* 10 – Languages into which WoW is translated&#xD;&#xA;&#xD;&#xA;Blizzard Online:&#xD;&#xA;&#xD;&#xA;* 12,000,000+ – Battle.net accounts&#xD;&#xA;* 900,000+ - Files on WorldofWarcraft.com&#xD;&#xA;&#xD;&#xA;Source: [World of Warcraft by the Numbers by The Game Reviews](http://www.thegamereviews.com/article-1515-World-of-Warcraft-by-the-Numbers.html)&#xD;&#xA;" />
  <row Id="1197" PostHistoryTypeId="2" PostId="623" RevisionGUID="7f8cffaf-b2dd-4e1c-a474-42710babef3c" CreationDate="2010-07-16T15:36:06.900" UserId="160" Text="Your may find it easier to use if you reverse the selection order. So the user clicks a *noun* and then the game displays the set of verbs that can be performed on that noun. If the verb requires an object (i.e. &quot;give to \_\_\_&quot;, then the game waits for the user to select the object before performing the action.&#xD;&#xA;&#xD;&#xA;Something like:&#xD;&#xA;&#xD;&#xA;1. User clicks a cheeseburger.&#xD;&#xA;2. Game shows a menu: &quot;pick up, eat, look at, give to \_\_\_&quot;.&#xD;&#xA;3. User selects &quot;give to \_\_\_&quot;.&#xD;&#xA;4. Game says &quot;give to whom?&quot; and waits for the user to click another noun (or a cancel button).&#xD;&#xA;5. User clicks a monkey.&#xD;&#xA;6. Game gives the cheeseburger to the monkey.&#xD;&#xA;&#xD;&#xA;Implementation-wise, each object in the game needs to have data for:&#xD;&#xA;&#xD;&#xA;1. Which set of verbs you can apply to it.&#xD;&#xA;2. For verbs it allows that take an object, which set of objects can be applied.&#xD;&#xA;3. For each verb or verb-object pair, the behavior to perform when the user does that.&#xD;&#xA;&#xD;&#xA;Since the grammar doesn't really nest or anything, you shouldn't need something as complicated as an interpreter pattern." />
  <row Id="1198" PostHistoryTypeId="2" PostId="624" RevisionGUID="4ab38f80-fdd3-4dd8-be22-8be3d0fdac76" CreationDate="2010-07-16T15:39:03.093" UserId="262" Text="The biggest problem for me as a game programmer (who isn't also an artist) is getting hold of good quality 3D models. I have checked out some of the 3D model market places like &lt;a href=&quot;http://www.the3dstudio.com/&quot;&gt;The 3D Studio&lt;/a&gt; and &lt;a href=&quot;http://www.top3dmodels.com&quot;&gt;Top 3D Models&lt;/a&gt; but I have had difficulty finding the artwork I am looking for and, when I do find something I like, getting the level of detail appropriate for my platform.&#xD;&#xA;&#xD;&#xA;Do people have any suggestions for sites they have dealt with successfully in the past? Am I better off building a relationship with an individual artist?" />
  <row Id="1199" PostHistoryTypeId="1" PostId="624" RevisionGUID="4ab38f80-fdd3-4dd8-be22-8be3d0fdac76" CreationDate="2010-07-16T15:39:03.093" UserId="262" Text="Where should I go looking for low poly 3D assets" />
  <row Id="1200" PostHistoryTypeId="3" PostId="624" RevisionGUID="4ab38f80-fdd3-4dd8-be22-8be3d0fdac76" CreationDate="2010-07-16T15:39:03.093" UserId="262" Text="&lt;assets&gt;&lt;3d-meshes&gt;&lt;low-poly&gt;&lt;art&gt;" />
  <row Id="1201" PostHistoryTypeId="2" PostId="625" RevisionGUID="ee82d323-445c-4f3f-96ec-8897ba577d8f" CreationDate="2010-07-16T15:46:20.927" UserId="247" Text="The only way to really test it is to measure the outcome of those messages.&#xD;&#xA;Eg is there a way to correlate the number of tweets to the number of new downloads.&#xD;&#xA;&#xD;&#xA;Speaking purely about twitter, the easiest way to measure virality is to see how often a tweet gets retweeted.&#xD;&#xA;&#xD;&#xA;For example, I have a website whendidyoujointwitter.com - it has a 'tweet this' type of link. Often when someone tweets that link, some of their followers will go the link in their tweet and in turn tweet their own message. We can then measure the virality if we see on average how many followers do this 'retweet'.&#xD;&#xA;&#xD;&#xA;Eg if someone with 1000 followers tweets it and then 10 of their followers tweet it as well, this is a success rate of 1%.&#xD;&#xA;&#xD;&#xA;Now, this is still not a virality percentage. We have to go a step further by asking how many followers does the average twitter user have? If everyone had 1000 followers, then those 10 retweets would result in 100 retweets which would result in 1000, etc (until it peters out - there are only so many twitter users/people in the world) - ie very viral by most standards.&#xD;&#xA;&#xD;&#xA;BUT not all twitter users have 1000 followers. What we can try to calculate is a tipping point. With a success rate of 1%, how many followers would the average user need to have in order for the meme to keep spreading?&#xD;&#xA;&#xD;&#xA;If the average is 100, then 1% means a tweet would result in 1 more tweet - ie the meme would be kept alive. If the average is less than that, then the meme is sure to die out.&#xD;&#xA;&#xD;&#xA;Now, going in reverse, the latest stats I can find show the average follower count is 70. So a success rate of 1% is not enough to go viral - it would need to be up around 2% or above.&#xD;&#xA;&#xD;&#xA;Uhhhhm so thinking about, I guess it's a logarithmic/exponential thing.&#xD;&#xA;&#xD;&#xA; - 100% success rate (all retweet) =&#xD;&#xA;   viral maximum&#xD;&#xA; - 10-99% = extremely&#xD;&#xA;   viral through this whole range&#xD;&#xA; - 2% success rate = viral minimum&#xD;&#xA; - 1% or less = not viral" />
  <row Id="1202" PostHistoryTypeId="2" PostId="626" RevisionGUID="9afd2408-6699-4bdb-aa68-a6036ddfd941" CreationDate="2010-07-16T15:48:10.380" UserId="276" Text="There is [Industry Broadcast][1] which describes itself as &quot;Bringing the Collective Insight of the Gaming Industry to your ears&quot;.&#xD;&#xA;&#xD;&#xA;Basically it features audio versions of existing online articles ... if you prefer to listen rather than read or you have time to kill on your commute then they may be of some use!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.industrybroadcast.com/ " />
  <row Id="1203" PostHistoryTypeId="16" PostId="626" RevisionGUID="9afd2408-6699-4bdb-aa68-a6036ddfd941" CreationDate="2010-07-16T15:48:10.380" UserId="-1" />
  <row Id="1204" PostHistoryTypeId="2" PostId="627" RevisionGUID="91c77ed6-0d64-43f3-aebf-1e0f8d0252ef" CreationDate="2010-07-16T15:55:56.443" UserId="136" Text="Good question.  I'm a pretty sharp C#/.NET guy and a bit of a performance nut, and this seems like a rather odd design decision to me.  The first thing that jumps out at me is that this code is in no way thread safe.  I don't know if that's an issue in a Physics system, but storing temporary data outside the scope of a method is often a recipe for disaster.&#xD;&#xA;&#xD;&#xA;Honestly, if I regularly encountered this kind of code in a third-party framework, I would probably try to find another framework." />
  <row Id="1205" PostHistoryTypeId="2" PostId="628" RevisionGUID="2f2f0eae-e9ae-4ada-a3af-87dc4d703b49" CreationDate="2010-07-16T16:09:55.407" UserId="214" Text="The GC on the 360 basically only does GEN 2 collections, which are expensive, so temporary variables that get created and removed every frame (like temp objects) cause a whole collections to run, which will kill performance really fast.&#xD;&#xA;&#xD;&#xA;I suspect they did it this way to reuse that object and not have it collected." />
  <row Id="1206" PostHistoryTypeId="2" PostId="629" RevisionGUID="786e8d6d-e8a9-4919-b7ec-e621ff2d63ae" CreationDate="2010-07-16T16:12:51.330" UserId="136" Text="There are some open source UI toolkits for XNA, but none that would give you the richness of Silverlight (or WPF for that matter).  WPF is capable of hosting Direct3D content, and I've seen it hacked to support XNA, but the performance isn't great.  The screen updates are effectively limited by the frame rate of WPF, as the hosted 3D scene is composited into the WPF scene.  The same would go for Silverlight, if it were to support this kind of integration.  What you would *really* want is to be able to host the Silverlight content within XNA, and not the other way around.  Unfortunately, this capability does not appear to be on the road map.&#xD;&#xA;&#xD;&#xA;If you really want to leverage the layout and templating capabilities of Silverlight, you might consider implementing them yourself, as [Cubed2D][1]'s team did for their project.  That may be overkill, though.  But if you do decide to go that route, you might want to check out [this][2] WPF implementation for C++/Win32.  You won't be able to use any of the code, as it's all C++/Direct3D, but it could give you some hints for how the tessellation, rendering, and compositing are done.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/596/how-can-i-add-a-silverlight-menu-hud-interface-to-an-xna-game/597#597&#xD;&#xA;  [2]: http://wpfg.codeplex.com/" />
  <row Id="1207" PostHistoryTypeId="2" PostId="630" RevisionGUID="f15800eb-25b0-4d71-a006-dd9881f2d71f" CreationDate="2010-07-16T16:33:58.177" UserId="165" Text="It's not so much hard to develop an MMO, as to develop another **World of Warcraft**. If you're willing to settle for only having a few thousand players, you *can* make an MMO, such as: &#xD;&#xA;&#xD;&#xA;  - [A Tale in the Desert][1] (created by one person)  &#xD;&#xA;[ATITD Wikipedia][2]&#xD;&#xA;&#xD;&#xA;  - [Sherwood Dungeon][3] (created by one person)  &#xD;&#xA;[How one man made an MMO][4]  &#xD;&#xA;[Maid Marion Wikipedia][5]&#xD;&#xA;&#xD;&#xA;  - [Runescape][6] (created by two people)  &#xD;&#xA;[Runescape Wikipedia][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://atitd.com/index.shtml&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A_Tale_in_the_Desert&#xD;&#xA;  [3]: http://www.sherwooddungeon.com/&#xD;&#xA;  [4]: http://hanfordlemoore.com/v/how-one-man-made-an-mmo-an-interview-with-gene-endrody&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Maid_Marian_Entertainment&#xD;&#xA;  [6]: http://www.runescape.com/title.ws&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/RuneScape" />
  <row Id="1208" PostHistoryTypeId="2" PostId="631" RevisionGUID="e92514fe-937b-4c45-a11a-72a7408deb4c" CreationDate="2010-07-16T16:42:08.793" UserId="328" Text="&quot;Hard&quot; in terms of:&#xD;&#xA;&#xD;&#xA; * Amount/complexity of the code&#xD;&#xA; * Level of math skills required&#xD;&#xA; * Time involved in making art assets" />
  <row Id="1209" PostHistoryTypeId="1" PostId="631" RevisionGUID="e92514fe-937b-4c45-a11a-72a7408deb4c" CreationDate="2010-07-16T16:42:08.793" UserId="328" Text="How hard is 3D game development versus 2D?" />
  <row Id="1210" PostHistoryTypeId="3" PostId="631" RevisionGUID="e92514fe-937b-4c45-a11a-72a7408deb4c" CreationDate="2010-07-16T16:42:08.793" UserId="328" Text="&lt;2d&gt;&lt;3d&gt;" />
  <row Id="1211" PostHistoryTypeId="5" PostId="630" RevisionGUID="1c774054-fbbc-47d9-916a-78abf89c364c" CreationDate="2010-07-16T16:45:29.990" UserId="165" Comment="added 127 characters in body" Text="It's not so much hard to develop an MMO, as to develop another **World of Warcraft**. If you're willing to settle for only having a few thousand players, you *can* make an MMO, such as: &#xD;&#xA;&#xD;&#xA;  - [A Tale in the Desert][1] (created by one person)  &#xD;&#xA;[ATITD Wikipedia][2]&#xD;&#xA;&#xD;&#xA;  - [Sherwood Dungeon][3] (created by one person)  &#xD;&#xA;[How one man made an MMO][4]  &#xD;&#xA;[Maid Marion Wikipedia][5]&#xD;&#xA;&#xD;&#xA;  - [Runescape][6] (created by two people)  &#xD;&#xA;[Runescape Wikipedia][7]&#xD;&#xA;&#xD;&#xA;Not that I'm saying it was *easy* to make those games :) But it can be done by a small number of (skilled, dedicated) people.&#xD;&#xA;&#xD;&#xA;  [1]: http://atitd.com/index.shtml&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A_Tale_in_the_Desert&#xD;&#xA;  [3]: http://www.sherwooddungeon.com/&#xD;&#xA;  [4]: http://hanfordlemoore.com/v/how-one-man-made-an-mmo-an-interview-with-gene-endrody&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Maid_Marian_Entertainment&#xD;&#xA;  [6]: http://www.runescape.com/title.ws&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/RuneScape" />
  <row Id="1212" PostHistoryTypeId="6" PostId="68" RevisionGUID="516db85c-e0ff-49c8-b480-a7ba203beb95" CreationDate="2010-07-16T16:56:53.110" UserId="56" Comment="edited tags" Text="&lt;2d&gt;&lt;graphics&gt;&lt;tutorials&gt;&lt;3d&gt;&lt;2.5d&gt;" />
  <row Id="1213" PostHistoryTypeId="2" PostId="632" RevisionGUID="8036bc1e-862f-4e82-98f1-63bab6bb8fab" CreationDate="2010-07-16T17:38:14.027" UserId="10" Text="Making games is not a one man show. So doing it yourself you will always lack some assets, be it code, graphics, models, sound, animation, marketing, support.&#xD;&#xA;&#xD;&#xA;So building a relationship with an artist is a good plan.&#xD;&#xA;&#xD;&#xA;You can check out the [polycount forums for some great modelers / artists][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.polycount.com/forum/" />
  <row Id="1214" PostHistoryTypeId="2" PostId="633" RevisionGUID="ba2f3c19-b30c-4843-b31d-7d8c64930698" CreationDate="2010-07-16T17:44:08.227" UserId="64" Text="Virality is usually measured by it's [K-Factor][1].  The two links in the wikipedia article there are helpful as well - [the article on viral app objectives][2] lays out things, and [Jon Radoff's spreadsheet][3] can be interesting to play with to figure out some of the interconnections between various factors.&#xD;&#xA;&#xD;&#xA;K-Factor represents the lifetime number of infections that a single infected person makes.  So, if your K-Factor is 1.1, then each infected person will infect 1.1 other people - in other words, you are headed for exponential growth.  K-Factor does not include the mean time to infection, that's a separate (but obviously important) item.&#xD;&#xA;&#xD;&#xA;Truly measuring virality, from what I understand, can be difficult because it depends on your metrics tracking being in place in the right spots, and then you have to keep and correlate a lot of disparate user data.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/K-factor_(marketing)&#xD;&#xA;  [2]: http://framethink.wordpress.com/2008/01/15/the-four-viral-app-objectives-aka-social-network-application-virality-101/&#xD;&#xA;  [3]: http://radoff.com/blog/2010/06/11/social-applicationgame-growth-model-spreadsheet/" />
  <row Id="1215" PostHistoryTypeId="5" PostId="442" RevisionGUID="0dd00806-3040-4573-a1dd-e07b93a4c77c" CreationDate="2010-07-16T17:48:19.157" UserId="165" Comment="deleted 1 characters in body" Text="[Google Pacman][1] has to be one of the more impressive JS/HTML games I've seen (granted, it's the *only* one I've seen, but it's still *really* impressive :)&#xD;&#xA;&#xD;&#xA;[Source Code locations][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/pacman/&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2890937/pacman-on-google-homepage-how-is-it-implemented" />
  <row Id="1216" PostHistoryTypeId="5" PostId="480" RevisionGUID="d8dd6b36-4aae-473c-a729-d1bc97db1384" CreationDate="2010-07-16T17:51:34.593" UserId="165" Comment="added 79 characters in body" Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4], plus commercial ones such as [Perforce][5]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;**For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.**&#xD;&#xA;&#xD;&#xA;Also, please list some brief details in your answer, about whether your VCS is free or commercial, distributed versus centralized, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/&#xD;&#xA;  [5]: http://www.perforce.com/" />
  <row Id="1217" PostHistoryTypeId="2" PostId="634" RevisionGUID="be14382b-1d16-43af-ad8c-b82483bd8eea" CreationDate="2010-07-16T17:52:03.190" UserId="275" Text="This is a highly subjective question, since the answer depends on personal preference/experience/knowledge/intelligence.&#xD;&#xA;&#xD;&#xA;I will try to answer neutrally, but since I am only a programmer and not an artist i can only hypothesize for the last point.&#xD;&#xA;&#xD;&#xA;Code complexity should not be so very different, except in maths and maybe rendering/physics. Game Logic isn't so much different if you take a healthy level of abstraction (not too much - you're trying to make a game not an engine, at least I guess from your question.) Obviously its a lot easier to calculate movement in 2D because you have limited perspective. Physics is WAY more difficult when dealing in three axes. Also, loading a Sprite from a Bitmap is more difficult than loading a 3D Model (and possibly texturing).&#xD;&#xA;&#xD;&#xA;Maths is more complicated for 3D (a no-brainer really - quaternions, vectors, matrices. 'nuff said)&#xD;&#xA;&#xD;&#xA;For art, I think it must be more difficult for 3D too, since you need to create art that looks good from every possible viewing angle (or at least a wide range), and you usually want to texture things too. Animating a mesh is no picnic to get realistic, and getting the texture to play along isn't either.&#xD;&#xA;" />
  <row Id="1218" PostHistoryTypeId="5" PostId="493" RevisionGUID="cbecaf77-047d-4f2b-b757-f47fd44c1526" CreationDate="2010-07-16T17:52:34.297" UserId="165" Comment="added URL" Text="# [GIT][1]  &#xD;&#xA;Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging. &#xD;&#xA;&#xD;&#xA;It isn't like one is better than the other. Just choose which way you prefer to work. They all will help you get where you want to go, they just do it in a different way.&#xD;&#xA;&#xD;&#xA;A major downside of GIT is that it stores the entire history locally. (Yes, you can perform surgery to cut that down, but it's the default behavior). It's not a problem at all for source files, but if you have a large project with gigabytes of asset data, it becomes a problem quickly. In my current experience, I'd recommend GIT only for smaller or source-only repos. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://git-scm.com/" />
  <row Id="1219" PostHistoryTypeId="5" PostId="571" RevisionGUID="925793e1-2355-4b85-bb84-fdfe22d4dafb" CreationDate="2010-07-16T17:55:33.137" UserId="165" Comment="added 131 characters in body" Text="[Mercurial][1]&#xD;&#xA;-------------&#xD;&#xA;&#xD;&#xA;Key features:&#xD;&#xA;&#xD;&#xA; - Distributed VCS&#xD;&#xA; - Free, open source&#xD;&#xA; - Plugin scripts are easy to write---can be written in Python or as shell scripts&#xD;&#xA; - There are many plugin scripts already freely available&#xD;&#xA; - Lots of documentation available, including [this book][2] (highly recommended)&#xD;&#xA;&#xD;&#xA;With regard to the use of non-text files, there is a bigfiles extension ( http://mercurial.selenic.com/wiki/BigfilesExtension ) which lets you store your assets in the same Mercurial repo, but only fetch the binaries you need when you need them.&#xD;&#xA;&#xD;&#xA;I am not aware of any issues with regard to large projects beyond those related to having large binary files. The Python project is a large project and [uses Mercurial][3].&#xD;&#xA;&#xD;&#xA;Joel Spolsky has written a mini-tutorial on using Mercurial at [Subversion Re-education][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mercurial.selenic.com/&#xD;&#xA;  [2]: http://hgbook.red-bean.com/read/&#xD;&#xA;  [3]: http://code.python.org/hg&#xD;&#xA;  [4]: http://hginit.com/00.html" />
  <row Id="1220" PostHistoryTypeId="2" PostId="635" RevisionGUID="17c3466d-a987-45fb-b18e-60df524a016d" CreationDate="2010-07-16T18:01:30.020" UserId="275" Text="Blender is great if you know how to use it. (I suppose you mean as a modeling software, not the GE)&#xD;&#xA;&#xD;&#xA;Here's some reasons:&#xD;&#xA;&#xD;&#xA;  * It can export to many file formats out of the box, and many you can find, and many you can write your own scripts for importing&#xD;&#xA;  * You can usually find a lot of free models to build on or use as placeholders&#xD;&#xA;  * It's free (as in speech)&#xD;&#xA;  * You can find a lot of extra features implemented by someone, and build your own collection tailored to your needs&#xD;&#xA;  * You get a huge community for support.&#xD;&#xA;&#xD;&#xA;Of course, these are reasons Blender works, not reasons Maya or 3DS doesn't." />
  <row Id="1221" PostHistoryTypeId="2" PostId="636" RevisionGUID="9b319cc9-ee29-437b-821b-da126f3a065f" CreationDate="2010-07-16T18:29:49.510" UserId="303" Text="[Unity 3d][1] - I've played around with the engine on PC and Mac, but not the iPad/iPhone.  I have used games on the iPod touch made with this engine though.  Works very well from what I've seen.&#xD;&#xA;&#xD;&#xA;Unity iPhone 1.7 works with the iPad.  You can use basic Unity3D for free to develop/prototype a game, then upgrade/buy the iPhone version.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com" />
  <row Id="1222" PostHistoryTypeId="2" PostId="637" RevisionGUID="eb72c553-f263-49d3-b45f-da9537d9e81b" CreationDate="2010-07-16T18:40:13.153" UserId="160" Text="An order of magnitude:&#xD;&#xA;&#xD;&#xA;**Programming:**&#xD;&#xA;&#xD;&#xA;* **The math is significantly more complex** for rendering, physics, collision, etc. Hope you like matrices and vectors!&#xD;&#xA;* Because of the previous point, **good performance is much more difficult to attain**. With today's hardware, you can make a nice-looking 2D game without having to think about performance at all beyond not being actively stupid. With 3D, you will have to do some optimization.&#xD;&#xA;* **The data structures are much more complex.** Because of the previous point, you'll need to think about culling, space partitioning, etc. all of which are more challenging then a simple &quot;here's a list of everything in the level&quot;.&#xD;&#xA;* **Animation is much more complicated.** Animation in 2D is just a filmstrip of frames with possibly different positions for each frame. With 3D, you'll need to deal with separate animation assets, bones, skinning, etc.&#xD;&#xA;* **The volume of data is much higher.** You'll have to do intelligent resource management. Games ship with gigs of content, but consoles sure as hell don't have gigs of memory.&#xD;&#xA;* **The pipelines are more complex to develop and maintain.** You'll need code to get assets into your engine's preferred format. That code doesn't write itself.&#xD;&#xA;&#xD;&#xA;**Art:**&#xD;&#xA;&#xD;&#xA;* **The assets are, of course, much more complex.** You'll need textures, models, rigs/skeletons, animation, etc. The tools are much more complex and expensive, and the skills to use them harder to find.&#xD;&#xA;* **The set of skills needed is wider.** Good animators aren't often good texture artists. Good lighters may not be good riggers.&#xD;&#xA;* **The dependencies between the assets are more complex.** With 2D, you can partition your assets across different artists cleanly: this guy does level one, this guy does enemies, etc. With 3D, the animation affects the skeleton affects which affects the model which affects the textures which affect the lighting... Your art team with have to coordinate carefully and constantly.&#xD;&#xA;* **The technical limitations are more complex to deal with.** With 2D it's basically &quot;here's your palette and your max sprite size&quot;. With 3D, your artists will have to balance texture size (for multiple textures: specular, color, normal, etc.), polygon count, keyframe count, bone count, etc. The particulars of the engine will place random weird requirements on them (&quot;Engine X blows up if you have more than 23 bones!&quot;).&#xD;&#xA;* **Asset processing takes longer.** Pipelines to convert 3D assets to game-ready format are complex, slow, and often buggy. This makes it take much longer for artists to see their changes in game, which slows them down.&#xD;&#xA;&#xD;&#xA;**Design:**&#xD;&#xA;&#xD;&#xA;* **User input is bitch.** You have to deal with camera tracking, converting user input into the character's space intuitively, projecting 2D selections into world space, etc.&#xD;&#xA;* **Levels are hard to author.** Your level designers basically need the skills of a game designer and an architect. They have to take into account players getting lost, visibility, etc. when building levels.&#xD;&#xA;* **Level physics is tedious to author.** You'll have to check and recheck and recheck again to make sure there aren't gaps and bugs in the level physics where players can get stuck or fall through the world.&#xD;&#xA;* **Tools are much harder.** Most games need their own tools for authoring things like levels. Since the content is so much more complex, the tools are more work to create. That usually results in tools that are buggier, incomplete, and harder to use.&#xD;&#xA;" />
  <row Id="1223" PostHistoryTypeId="2" PostId="638" RevisionGUID="499f3a59-0708-4e00-8216-38c75a4daff5" CreationDate="2010-07-16T18:57:15.383" UserId="117" Text="I would suggest meeting artists and building relationships.  One of my friends is big on asking them to do a trade off.  He'll do some game programming for them and, in return, they give him some art or models he needs for his games.  It's worth a shot.  &#xD;&#xA;&#xD;&#xA;Also, I've used [TurboSquid][1] to get some assets for prototyping and demos. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com/" />
  <row Id="1224" PostHistoryTypeId="2" PostId="639" RevisionGUID="28244bd2-c2ea-43e6-a458-d339598d5d12" CreationDate="2010-07-16T19:01:42.500" UserId="138" Text="You can go the XNA route and just use the particular elements you desire (audio, networking, etc.); but, it's increasing the complexity of your project and decreasing your &quot;immediate understanding&quot; of the codebase.&#xD;&#xA;&#xD;&#xA;Basically, as you add more middleware, your knowledge of the way your code is actually operating diminishes -- unless you delve into the middleware's implementation. As you distance yourself, you lose efficiency, ability, and understanding.&#xD;&#xA;&#xD;&#xA;So, as stated above, it would be far more beneficial for you to use C# and the appropriate non-XNA libraries.&#xD;&#xA;&#xD;&#xA;If you're doing this for your own edification, you might as well roll your own where you're interested in the area -- you'll learn more this way.&#xD;&#xA;&#xD;&#xA;Go for it! Have fun!" />
  <row Id="1225" PostHistoryTypeId="2" PostId="640" RevisionGUID="2ac44060-99fc-4296-89cf-299a21bdac13" CreationDate="2010-07-16T19:51:35.377" UserId="159" Text="What is the biggest tip you have for someone who is new to game development? It could be anything from motivation, to technique, to team building. " />
  <row Id="1226" PostHistoryTypeId="1" PostId="640" RevisionGUID="2ac44060-99fc-4296-89cf-299a21bdac13" CreationDate="2010-07-16T19:51:35.377" UserId="159" Text="Tips for someone new to game development" />
  <row Id="1227" PostHistoryTypeId="3" PostId="640" RevisionGUID="2ac44060-99fc-4296-89cf-299a21bdac13" CreationDate="2010-07-16T19:51:35.377" UserId="159" Text="&lt;subjective&gt;&lt;learning&gt;&lt;tips&gt;" />
  <row Id="1228" PostHistoryTypeId="16" PostId="640" RevisionGUID="2ac44060-99fc-4296-89cf-299a21bdac13" CreationDate="2010-07-16T19:51:35.377" UserId="159" />
  <row Id="1229" PostHistoryTypeId="6" PostId="195" RevisionGUID="b79a0758-3589-4836-bbb3-e72b39c1d64f" CreationDate="2010-07-16T19:52:25.670" UserId="159" Comment="edited tags" Text="&lt;c++&gt;&lt;cross-platform&gt;&lt;c&gt;&lt;tips&gt;" />
  <row Id="1230" PostHistoryTypeId="5" PostId="637" RevisionGUID="1e012798-477c-41c2-86b8-b40346ba05c5" CreationDate="2010-07-16T20:08:37.473" UserId="160" Comment="added 14 characters in body" Text="An order of magnitude:&#xD;&#xA;&#xD;&#xA;**Programming:**&#xD;&#xA;&#xD;&#xA;* **The math is significantly more complex** for rendering, physics, collision, etc. Hope you like matrices and vectors!&#xD;&#xA;* Because of the previous point, **good performance is much more difficult to attain**. With today's hardware, you can make a nice-looking 2D game without having to think about performance at all beyond not being actively stupid. With 3D, you will have to do some optimization.&#xD;&#xA;* **The data structures are much more complex.** Because of the previous point, you'll need to think about culling, space partitioning, etc. all of which are more challenging then a simple &quot;here's a list of everything in the level&quot;.&#xD;&#xA;* **Animation is much more complicated.** Animation in 2D is just a filmstrip of frames with possibly different positions for each frame. With 3D, you'll need to deal with separate animation assets, bones, skinning, etc.&#xD;&#xA;* **The volume of data is much higher.** You'll have to do intelligent resource management. Games ship with gigs of content, but consoles sure as hell don't have gigs of memory.&#xD;&#xA;* **The pipelines are more complex to develop and maintain.** You'll need code to get assets into your engine's preferred format. That code doesn't write itself.&#xD;&#xA;&#xD;&#xA;**Art:**&#xD;&#xA;&#xD;&#xA;* **The assets are, of course, much more complex.** You'll need textures, models, rigs/skeletons, animation, etc. The tools are much more complex and expensive, and the skills to use them harder to find.&#xD;&#xA;* **The set of skills needed is wider.** Good animators aren't often good texture artists. Good lighters may not be good riggers.&#xD;&#xA;* **The dependencies between the assets are more complex.** With 2D, you can partition your assets across different artists cleanly: this guy does level one, this guy does enemies, etc. With 3D, the animation affects the rig which affects the skeleton which affects the model which affects the textures which affect the lighting... Your art team with have to coordinate carefully and constantly.&#xD;&#xA;* **The technical limitations are more complex to deal with.** With 2D it's basically &quot;here's your palette and your max sprite size&quot;. With 3D, your artists will have to balance texture size (for multiple textures: specular, color, normal, etc.), polygon count, keyframe count, bone count, etc. The particulars of the engine will place random weird requirements on them (&quot;Engine X blows up if you have more than 23 bones!&quot;).&#xD;&#xA;* **Asset processing takes longer.** Pipelines to convert 3D assets to game-ready format are complex, slow, and often buggy. This makes it take much longer for artists to see their changes in game, which slows them down.&#xD;&#xA;&#xD;&#xA;**Design:**&#xD;&#xA;&#xD;&#xA;* **User input is bitch.** You have to deal with camera tracking, converting user input into the character's space intuitively, projecting 2D selections into world space, etc.&#xD;&#xA;* **Levels are hard to author.** Your level designers basically need the skills of a game designer and an architect. They have to take into account players getting lost, visibility, etc. when building levels.&#xD;&#xA;* **Level physics is tedious to author.** You'll have to check and recheck and recheck again to make sure there aren't gaps and bugs in the level physics where players can get stuck or fall through the world.&#xD;&#xA;* **Tools are much harder.** Most games need their own tools for authoring things like levels. Since the content is so much more complex, the tools are more work to create. That usually results in tools that are buggier, incomplete, and harder to use.&#xD;&#xA;" />
  <row Id="1231" PostHistoryTypeId="2" PostId="641" RevisionGUID="f646392d-41b0-4918-9c73-837eb8b731fd" CreationDate="2010-07-16T20:28:22.013" UserId="6" Text="Don't build an MMO. Everyone wants to build an MMO, but it is far, far too expensive (time, money, learning curve) for a single person or a small team to develop, and even if you do, you run into the paradox of needing players to get more players. Blizzard can do it because they already had a massive fan base that would buy anything that came out their doors. Other companies spend tons of money on marketing and get lucky. If you're serious about game development, save the MMO ambitions for after you have a substantial and reliable fan base." />
  <row Id="1232" PostHistoryTypeId="16" PostId="641" RevisionGUID="f646392d-41b0-4918-9c73-837eb8b731fd" CreationDate="2010-07-16T20:28:22.013" UserId="-1" />
  <row Id="1233" PostHistoryTypeId="2" PostId="642" RevisionGUID="3c2c51b7-186e-4af1-bb58-6b02c03e0a11" CreationDate="2010-07-16T20:34:10.377" UserId="188" Text="Everyone is going to say this, but start small. I started out by just building a couple of clones, Tetris, Asteroids etc.. &#xD;&#xA;&#xD;&#xA;It doesn't matter what framework or language you start with, just build something and...here's the important part...FINISH IT! &#xD;&#xA;&#xD;&#xA;Also, don't worry about doing it the right way or making sure your architecture is good. Just start writing and refactor as you go. You don't want to get caught in &quot;architecture paralysis&quot; where you are constantly working on the architecture of the project and not getting anywhere with the actual game.&#xD;&#xA;&#xD;&#xA;On that note, it helps me to be able to at any point in time to run the game and see something. I want to be able to always &quot;play&quot; what I'm working on. It keeps me motivated when I can see it progressing." />
  <row Id="1234" PostHistoryTypeId="16" PostId="642" RevisionGUID="3c2c51b7-186e-4af1-bb58-6b02c03e0a11" CreationDate="2010-07-16T20:34:10.377" UserId="-1" />
  <row Id="1235" PostHistoryTypeId="5" PostId="72" RevisionGUID="8b5c8865-6f2c-4225-ab19-80866aa9ed44" CreationDate="2010-07-16T20:36:33.320" UserId="14" Comment="deleted 55 characters in body" Text="There is also [Wiiware][1] &amp; You -could- run a homebrew game, but I really don't know much about it.&#xD;&#xA;&#xD;&#xA;To develop for Wiiware you have to be approved as a licensed developer for Nintendo. Information on the process can be found here: http://www.warioworld.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wiiware" />
  <row Id="1236" PostHistoryTypeId="2" PostId="643" RevisionGUID="37022a23-55f7-4c7a-9fa2-c4e7682a2724" CreationDate="2010-07-16T20:43:05.283" UserId="117" Text="[Unity][1] provides Wii and Wiiware licenses but, I'd imagine they come at a hefty price.  Still if you have the cash, it is a great environment to work in. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/" />
  <row Id="1237" PostHistoryTypeId="2" PostId="644" RevisionGUID="0d32bcb2-4f06-467a-b8d6-8cdd2788c2d1" CreationDate="2010-07-16T20:58:40.270" UserId="148" Text="So, I'm not sure what you mean by &quot;virality&quot;. I'm going to assume you mean, &quot;I want to track how often my players recommend my game to their friends and *track how many of those recommendations turn into conversions*.&quot;&#xD;&#xA;&#xD;&#xA;Check out [Google Analytics][ga] and [Omniture][omniture]. They provide a great way to track stats across a variety of platforms and also provide ways to visualize those stats. Really, though, you could roll your own without too much effort.&#xD;&#xA;&#xD;&#xA;Let's take one case: Player A downloads your game and starts playing. As part of being run for the first time, your game generates a unique ID.&#xD;&#xA;&#xD;&#xA;Now suppose Player A is playing your game and it sends out a &quot;I reached level 12! Play with me!&quot; notification to the social network du jour. But wait! Each link embeds another unique code in the link to your homepage from which players can buy your app -- via an iTunes link or whatever. This second unique code includes the first (which uniquely identifies a player) plus some extra stuff (what level they're at, etc).&#xD;&#xA;&#xD;&#xA;Along comes some of Player A's friends imaginatively named B, C, and D. Each one of them clicks this link and is directed to your homepage.&#xD;&#xA;&#xD;&#xA;You can then see if this person clicks the link to buy your app. By tracking the &quot;arrived at your homepage with unique code&quot; numbers versus the &quot;bought your app&quot; numbers, you could come up with a rough, continuous measure of how often you're converting random people to game players.&#xD;&#xA;&#xD;&#xA;**EDIT**: By the way, if I'm completely misunderstanding your question please comment and I'll pull this answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [ga]: http://www.google.com/analytics/product.html&#xD;&#xA;  [omniture]: http://www.omniture.com/en/" />
  <row Id="1238" PostHistoryTypeId="2" PostId="645" RevisionGUID="47fa8227-5e7d-47e1-a681-2e158f1e661a" CreationDate="2010-07-16T21:13:07.667" UserId="303" Text="I see a lot of examples and tutorials for 3D engines like Unity3D, UDK, Source etc.  They all seem to be under the assumption that you are making a game for current(ish) hardware.&#xD;&#xA;&#xD;&#xA;I would like some tips or tutorials on how to develop a game using UDK, Unity3D or any other modern game engine while targeting what might be considered ancient hardware.&#xD;&#xA;&#xD;&#xA;Hardware specs might be as low as&#xD;&#xA;&#xD;&#xA; - 1GHz-1.8GHz single core CPU&#xD;&#xA; - 8MB-64MB Video chip&#xD;&#xA; - 512MB-1GB RAM&#xD;&#xA;&#xD;&#xA;Thinking along the lines of older laptops or old business class machines that might have, at most, an Intel GMA900 chip or a ATI Radeon 9000 chip onboard." />
  <row Id="1239" PostHistoryTypeId="1" PostId="645" RevisionGUID="47fa8227-5e7d-47e1-a681-2e158f1e661a" CreationDate="2010-07-16T21:13:07.667" UserId="303" Text="Tips for developing 3D games on newer engines targeting old hardware" />
  <row Id="1240" PostHistoryTypeId="3" PostId="645" RevisionGUID="47fa8227-5e7d-47e1-a681-2e158f1e661a" CreationDate="2010-07-16T21:13:07.667" UserId="303" Text="&lt;engine&gt;&lt;tutorials&gt;&lt;beginner&gt;&lt;game-design&gt;&lt;best-practices&gt;" />
  <row Id="1241" PostHistoryTypeId="16" PostId="645" RevisionGUID="47fa8227-5e7d-47e1-a681-2e158f1e661a" CreationDate="2010-07-16T21:13:07.667" UserId="303" />
  <row Id="1242" PostHistoryTypeId="6" PostId="455" RevisionGUID="29f9a58c-a6d7-4d88-b88c-9acc0b799cd6" CreationDate="2010-07-16T21:13:51.613" UserId="159" Comment="edited tags" Text="&lt;books&gt;&lt;game-design&gt;&lt;architecture&gt;&lt;articles&gt;" />
  <row Id="1243" PostHistoryTypeId="6" PostId="89" RevisionGUID="ba9b255b-093b-4112-a958-59e5596e2bc3" CreationDate="2010-07-16T21:14:15.873" UserId="159" Comment="edited tags" Text="&lt;2d&gt;&lt;engine&gt;&lt;android&gt;" />
  <row Id="1244" PostHistoryTypeId="2" PostId="646" RevisionGUID="87a8a1a4-2a11-4259-a61c-08d005a6cf1b" CreationDate="2010-07-16T22:26:11.943" UserDisplayName="Gorkem Pacaci" Text="Milkshape&#xD;&#xA;&#xD;&#xA;3D models, quite easy interface. Not for pros, I guess. Good for programmers.&#xD;&#xA;&#xD;&#xA;http://chumbalum.swissquake.ch/ms3d/download.html&#xD;&#xA;&#xD;&#xA;Win&#xD;&#xA;&#xD;&#xA;Free" />
  <row Id="1245" PostHistoryTypeId="16" PostId="646" RevisionGUID="87a8a1a4-2a11-4259-a61c-08d005a6cf1b" CreationDate="2010-07-16T22:26:11.943" UserId="-1" />
  <row Id="1246" PostHistoryTypeId="10" PostId="631" RevisionGUID="fd455b66-3667-4049-b894-cd6e1692e921" CreationDate="2010-07-16T22:33:19.503" UserId="-1" CloseReasonId="3" Text="[{&quot;Id&quot;:10,&quot;DisplayName&quot;:&quot;Ólafur Waage&quot;},{&quot;Id&quot;:30,&quot;DisplayName&quot;:&quot;Kevin Laity&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;},{&quot;Id&quot;:326,&quot;DisplayName&quot;:&quot;Cody Brocious&quot;}]" />
  <row Id="1247" PostHistoryTypeId="2" PostId="647" RevisionGUID="9ab6027c-6e16-478d-9e54-3d6aa8879b28" CreationDate="2010-07-16T22:43:15.733" UserId="187" Text="3D-Coat&#xD;&#xA;&#xD;&#xA;http://www.3d-coat.com/&#xD;&#xA;&#xD;&#xA;3D Models and UV-mapped textures&#xD;&#xA;&#xD;&#xA;Windows 2000, XP, Vista, Mac OS 10.4.5 (Intel) or later&#xD;&#xA;&#xD;&#xA;$285 Professional / $140 Educational&#xD;&#xA;&#xD;&#xA;Unique and relatively inexpensive sculpting modeller with UV mapping, retopology, and painting." />
  <row Id="1248" PostHistoryTypeId="16" PostId="647" RevisionGUID="9ab6027c-6e16-478d-9e54-3d6aa8879b28" CreationDate="2010-07-16T22:43:15.733" UserId="-1" />
  <row Id="1249" PostHistoryTypeId="2" PostId="648" RevisionGUID="4e64a529-8bfe-4ab8-9909-cb14da43f2db" CreationDate="2010-07-16T22:48:18.457" UserId="187" Text="Paint Tool SAI&#xD;&#xA;&#xD;&#xA;http://www.systemax.jp/en/sai/ &amp; http://sai.detstwo.com/sai/ (English downloads)&#xD;&#xA;&#xD;&#xA;2D Images&#xD;&#xA;&#xD;&#xA;Windows 98/2000/XP/Vista&#xD;&#xA;&#xD;&#xA;5250 JPY (~$60US)&#xD;&#xA;&#xD;&#xA;Fast, inexpensive painting software with excellent tablet support." />
  <row Id="1250" PostHistoryTypeId="16" PostId="648" RevisionGUID="4e64a529-8bfe-4ab8-9909-cb14da43f2db" CreationDate="2010-07-16T22:48:18.457" UserId="-1" />
  <row Id="1251" PostHistoryTypeId="2" PostId="649" RevisionGUID="0121de54-de20-4809-8cbb-c12c82476ad6" CreationDate="2010-07-16T23:09:04.790" UserId="187" Text="There also exists a light-weight alternative to Ogre3D, &lt;a href=&quot;http://www.horde3d.org/&quot;&gt;Horde3D&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - The design is sound and will likely outperform Ogre3D for heavy rendering (if it doesn't already)&#xD;&#xA; - C API, making bindings for languages like Python simple and easy to maintain (internal code is C++)&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - Requires at least OpenGL 2.0 support&#xD;&#xA; - Smaller community&#xD;&#xA; - Unstable code base (major architectural changes are still occurring)" />
  <row Id="1252" PostHistoryTypeId="2" PostId="650" RevisionGUID="afb97a85-eb79-45a9-990a-46e43c53a15a" CreationDate="2010-07-16T23:11:01.480" UserId="160" Text="My advice: *get cracking.*&#xD;&#xA;&#xD;&#xA;I see a lot of people asking how to get started, how to make games, what to read, etc. The truth is, no one can just give you the knowledge to do this, and talking about it on the web won't get you that far. If you really want to do this (and you won't know for sure until you try), *start slinging some code.*" />
  <row Id="1253" PostHistoryTypeId="16" PostId="650" RevisionGUID="afb97a85-eb79-45a9-990a-46e43c53a15a" CreationDate="2010-07-16T23:11:01.480" UserId="-1" />
  <row Id="1254" PostHistoryTypeId="2" PostId="651" RevisionGUID="13e61664-497f-4fb5-b1f2-a414bf7b2988" CreationDate="2010-07-16T23:18:28.097" UserId="29" Text="Can anyone recommend some good tips, articles, sites, etc. for writing the main game loop?  What are some things that you should do in the game loop, and what are some things that you shouldn't do in the game loop?  I've written plenty of these, but I've never really read up on game loops, so I'm sure I could improve them considerably." />
  <row Id="1255" PostHistoryTypeId="1" PostId="651" RevisionGUID="13e61664-497f-4fb5-b1f2-a414bf7b2988" CreationDate="2010-07-16T23:18:28.097" UserId="29" Text="Tips for writing the main game loop?" />
  <row Id="1256" PostHistoryTypeId="3" PostId="651" RevisionGUID="13e61664-497f-4fb5-b1f2-a414bf7b2988" CreationDate="2010-07-16T23:18:28.097" UserId="29" Text="&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="1257" PostHistoryTypeId="5" PostId="649" RevisionGUID="3fba1a8e-7791-41e5-a8e6-1801af260709" CreationDate="2010-07-16T23:30:59.357" UserId="187" Comment="added 415 characters in body" Text="In terms of game engines:&#xD;&#xA;&#xD;&#xA; - &lt;a href=&quot;http://www.torquepowered.com/products/torque-3d&quot;&gt;Torque3D&lt;/a&gt;: Lots of features, but some would consider the code difficult to work with.&#xD;&#xA; - &lt;a href=&quot;http://www.terathon.com/c4engine/&quot;&gt;C4 Engine&lt;/a&gt;:  Inexpensive, excellent author support, but the tools could use a bit of work.&#xD;&#xA; - DIY: Select a set of libraries and glue them together with your game.&#xD;&#xA;&#xD;&#xA;Since Ogre3D was suggested, there also exists a light-weight alternative &lt;a href=&quot;http://www.horde3d.org/&quot;&gt;Horde3D&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - The design is sound and will likely outperform Ogre3D for heavy rendering (if it doesn't already)&#xD;&#xA; - C API, making bindings for languages like Python simple and easy to maintain (internal code is C++)&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - Requires at least OpenGL 2.0 support&#xD;&#xA; - Smaller community&#xD;&#xA; - Unstable code base (major architectural changes are still occurring)" />
  <row Id="1258" PostHistoryTypeId="2" PostId="652" RevisionGUID="6b230793-c329-4ff8-8c77-8dafa18c5b77" CreationDate="2010-07-17T00:10:51.043" UserId="101" Text="I'd recommend Glenn Fiedler's article about robust framerate independence, &quot;[Fix Your Timestep!][1]&quot;&#xD;&#xA;&#xD;&#xA;(Less relevant to the topic at hand, but the other articles in [the series][2] are also quite good - as is everything on his site!)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.wordpress.com/fix-your-timestep&#xD;&#xA;  [2]: http://gafferongames.com/game-physics/&#xD;&#xA;  [3]: http://gafferongames.com/networking-for-game-programmers/" />
  <row Id="1259" PostHistoryTypeId="2" PostId="653" RevisionGUID="58afb3ce-5c3f-45e9-80cd-76f9c91daef3" CreationDate="2010-07-17T00:12:59.323" UserId="187" Text="It depends. How big is the project, what platform(s), and what is the timeline?&#xD;&#xA;&#xD;&#xA;If you're working on a large project, on platforms with limited resources, with a significant timeline and budget, then you can save yourself a lot of trouble by avoiding the inevitable hell that will be looking at a half a million line code base that's littered with STL, can't keep a framerate above 30, eats enough RAM to fit several more assets, and takes 2 hours to build.&#xD;&#xA;&#xD;&#xA;In other situations however, STL and even Boost can be very useful when applied appropriately. I've worked on titles that used a selection of STL/Boost, and were an absolute dream to code for: fewer bugs/leaks and easy to maintain code means more time coding fun new features! For hobby projects especially, that's a huge win in the motivation department.&#xD;&#xA;&#xD;&#xA;Know when to trade performance for convenience!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1260" PostHistoryTypeId="2" PostId="654" RevisionGUID="de5f80bf-174d-4ef6-bf57-59a7733cd432" CreationDate="2010-07-17T00:28:36.453" UserId="193" Text="I have seen a lot of Z-Brush artists use Blender for unwrapping UVs. It seems particularly good at things like creating the seams on low poly characters " />
  <row Id="1261" PostHistoryTypeId="2" PostId="655" RevisionGUID="2c4dae24-4089-4ced-8dfb-f40e17fe0616" CreationDate="2010-07-17T00:37:55.077" UserId="187" Text="If C# isn't a problem, you could check out &lt;a href=&quot;http://code.google.com/p/lidgren-network-gen3/&quot;&gt;Lidgren&lt;/a&gt;. Currently in it's 3rd generation, it features (among other things):&#xD;&#xA;&#xD;&#xA; - MIT License&#xD;&#xA; - Peer-to-Peer (NetClient/NetServer are based on NetPeer)&#xD;&#xA; - Lag simulation&#xD;&#xA; - Packet encryption&#xD;&#xA; - Very efficient (buffers reused for zero garbage)&#xD;&#xA; - Active and responsive developer!&#xD;&#xA;" />
  <row Id="1262" PostHistoryTypeId="2" PostId="656" RevisionGUID="08e09e24-64e8-4e4a-be9d-b628463d98bd" CreationDate="2010-07-17T00:40:28.597" UserId="229" Text="**The main game loop handles three major tasks:**&#xD;&#xA;&#xD;&#xA;1. Get user input&#xD;&#xA;2. Update the game state&#xD;&#xA;3. Draw the game&#xD;&#xA;&#xD;&#xA;**A simple game loop just mushes these three tasks into one while loop. This has some undesired results:**&#xD;&#xA;&#xD;&#xA;1. Game runs at different speeds on different computers.&#xD;&#xA;2. CPU is stuck at 100% usage.&#xD;&#xA;4. &quot;Game states&quot;/menus are missing or mixed with game code.&#xD;&#xA;3. Main game loop is very long and hard to maintain.&#xD;&#xA;5. Code is difficult to extend/port to other platforms.&#xD;&#xA;&#xD;&#xA;**Advanced gamed loops address the issues listed above.** Here are some useful articles:&#xD;&#xA;&#xD;&#xA;- [deWiTTERS Game Loop][1]&#xD;&#xA;- [Integrating a timer into a game loop][2]&#xD;&#xA;- [Managing Game States in C++][3]&#xD;&#xA;- [XNA Game State Management][4] and [Network Game State Management][5]&#xD;&#xA;&#xD;&#xA;**For an excellent example game loop, take a look at the Allegro skater demo game:**&#xD;&#xA;&#xD;&#xA;- Game loop code is in [framewk.c][6].&#xD;&#xA;- Browse full source code [here][7].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Game loops often do the same type of work for most games, so I have been thinking of a way to make a generalized game framework.** It is better to write one implementation of a game loop and share it between games. It saves work when creating a new game, and improvements to the shared game loop can be shared by all games (for example, adding a FPS counter or screen capture feature).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dev.koonsolo.com/7/dewitters-gameloop/&#xD;&#xA;  [2]: http://wiki.allegro.cc/index.php?title=Timers#How_to_use_them.3F&#xD;&#xA;  [3]: http://gamedevgeek.com/tutorials/managing-game-states-in-c/&#xD;&#xA;  [4]: http://creators.xna.com/en-US/samples/gamestatemanagement&#xD;&#xA;  [5]: http://creators.xna.com/en-us/sample/network_game_state_mgt_sample&#xD;&#xA;  [6]: https://alleg.svn.sourceforge.net/svnroot/alleg/demos/skater/src/framewk.c&#xD;&#xA;  [7]: https://alleg.svn.sourceforge.net/svnroot/alleg/demos/skater/" />
  <row Id="1263" PostHistoryTypeId="2" PostId="657" RevisionGUID="7a0a705b-4668-468a-a728-c7e289761af0" CreationDate="2010-07-17T00:46:57.150" UserId="55" Text="As designers there has to be some ways you've approached establishing the 'fun-factor' in your games. You've likely done something in one game that may very well transfer into the future games you've worked on. You've likely played a game that did something really fun and you noticed that formula being applied to other games.&#xD;&#xA;&#xD;&#xA;What are some ways to improve the fun-factor in game design? What makes Zynga games on Facebook so popular? Do rewards lead to more fun? Does failure lead to more fun? Does making a player come back in 2 hours lead to more fun? Have you read any good quotes or thoughts that really sticks in your mind?&#xD;&#xA;&#xD;&#xA;There could be a good list of things to think about when approaching fun." />
  <row Id="1264" PostHistoryTypeId="1" PostId="657" RevisionGUID="7a0a705b-4668-468a-a728-c7e289761af0" CreationDate="2010-07-17T00:46:57.150" UserId="55" Text="Aproaching the Fun Factor in Game Design" />
  <row Id="1265" PostHistoryTypeId="3" PostId="657" RevisionGUID="7a0a705b-4668-468a-a728-c7e289761af0" CreationDate="2010-07-17T00:46:57.150" UserId="55" Text="&lt;fun&gt;&lt;game-design&gt;" />
  <row Id="1266" PostHistoryTypeId="2" PostId="658" RevisionGUID="d7b5b9aa-4250-4b48-b8fa-11b581cb5be2" CreationDate="2010-07-17T01:04:05.240" UserId="148" Text="I didn't see a language requirement, so I'll throw out something for the Pythonistas. There are also [Pygame][pygame] and [Pyglet][pyglet].&#xD;&#xA;&#xD;&#xA;Pygame relies on the SDL under the covers so has some added dependencies when going cross-platform. Pygame is arguable more mature and there are tons of examples online.&#xD;&#xA;&#xD;&#xA;Pyglet has no external dependencies and is a breeze to distribute with. Pyglet seems more pythonic and has very clean documentation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   [pygame]: http://www.pygame.org/&#xD;&#xA;   [pyglet]: http://www.pyglet.org/" />
  <row Id="1267" PostHistoryTypeId="2" PostId="659" RevisionGUID="8d13feec-90e8-4fb1-89e4-684e4b4b4ab9" CreationDate="2010-07-17T01:06:17.107" UserId="55" Text="I have seen a couple of things in the past where I have seen a crowd majority buck their heads. One really sticks out in my mind:&#xD;&#xA;&#xD;&#xA;**Little Challenge**  &#xD;&#xA;In a prior project, I leaned against the word 'casual' a little too much. I imagined people picking up this game and simply solving a simple feat and moving on. I didn't integrate any kind of losing mechanism per say, but left that for the player to determine. A 'did the player meet his/her expectation' type of situation. &#xD;&#xA;&#xD;&#xA;Judging from the feedback I received I see not giving a clear losing mechanism a mistake and a missed opportunity. It seemed that those players who wanted a way to lose actually enjoy knowing they've lost.&#xD;&#xA;&#xD;&#xA;I guess that may sound obvious, but I wasn't quite thing about it that way.&#xD;&#xA;&#xD;&#xA;**Reward a Player**  &#xD;&#xA;By nature humans are always trying to achieve that next best thing. I think there are some instincts at play there. At a young age our mind was a buzz when we got a new toy, for example.&#xD;&#xA;&#xD;&#xA;So in a game I imagine that a player who is given something along the way will improve the fun-factor. I assume this is exactly what Achievements are targeting - a direct reward." />
  <row Id="1268" PostHistoryTypeId="2" PostId="660" RevisionGUID="758f179f-fbf7-432f-8196-6ed54b89670d" CreationDate="2010-07-17T01:33:20.833" UserId="187" Text=" 1. Test, test, test! Find someone with or buy an old laptop, if you're looking to sell your creation, the expense is worth it.&#xD;&#xA;&#xD;&#xA; 2. Keep polygon counts low! Many older Intel devices run vertex shaders on the CPU, which can very quickly become the bottleneck.&#xD;&#xA;&#xD;&#xA; 3. Use appropriately sized textures! Texture bandwidth on older hardware isn't great, so avoid using more pixels than will be displayed on screen.&#xD;&#xA;&#xD;&#xA; 4.  Avoid complex pixel shaders/materials! Stick to simple blending operations, and reuse them as much as possible.&#xD;&#xA;&#xD;&#xA; 5. Profile! If possible, provide special development modes to help find bottlenecks like:&#xD;&#xA;  - Replacing all textures with a single 1x1 texture&#xD;&#xA;  - Swaping all models with a simple cube&#xD;&#xA;  - Replace all shaders/materials with minimal versions&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1269" PostHistoryTypeId="16" PostId="660" RevisionGUID="758f179f-fbf7-432f-8196-6ed54b89670d" CreationDate="2010-07-17T01:33:20.833" UserId="-1" />
  <row Id="1270" PostHistoryTypeId="2" PostId="661" RevisionGUID="d5578e02-0376-4901-89c9-df2e073200d7" CreationDate="2010-07-17T01:33:25.497" UserId="148" Text="Suppose a player can construct a robot built from various parts and each part costs money. How would you balance the cost of a weapon against its capabilities? What about balancing weapons against other parts?&#xD;&#xA;&#xD;&#xA;The base case seems pretty easy: imagine the player can only buy weapons and everything else on the robot is the same. A machine gun that fires 1 bullet per second costs $100. A super machine gun that fires twice as fast could cost twice as much. But what about an ultra machine gun that has four times the range?&#xD;&#xA;&#xD;&#xA;Now imagine the player can add other capabilities to the robot like better speed or armor. How do you relate the cost of a machine gun against the ability to move very quickly, or to be stealthed against radar?&#xD;&#xA;&#xD;&#xA;I understand that there's a later stage of experimentation where costs and capabilities are adjusted, but where do you start from?&#xD;&#xA;" />
  <row Id="1271" PostHistoryTypeId="1" PostId="661" RevisionGUID="d5578e02-0376-4901-89c9-df2e073200d7" CreationDate="2010-07-17T01:33:25.497" UserId="148" Text="Balancing a game about gladiatorial robot combat" />
  <row Id="1272" PostHistoryTypeId="3" PostId="661" RevisionGUID="d5578e02-0376-4901-89c9-df2e073200d7" CreationDate="2010-07-17T01:33:25.497" UserId="148" Text="&lt;game-design&gt;&lt;balance&gt;" />
  <row Id="1273" PostHistoryTypeId="2" PostId="662" RevisionGUID="a3b242cb-6dc3-478b-97de-5ac41ecb7c4d" CreationDate="2010-07-17T01:46:09.180" UserId="51" Text="Pick arbitrary figures and follow a tight test/iterate loop.&#xD;&#xA;&#xD;&#xA;Sure you can do some initial math (like you suggested for pure damage based items), but at the end of the day the best thing you can do is put it in front of people constantly and tweak them after the fact." />
  <row Id="1274" PostHistoryTypeId="2" PostId="663" RevisionGUID="05fa5e46-9222-4667-85e5-edf2589a4e66" CreationDate="2010-07-17T01:52:22.457" UserId="51" Text="One design goal that I've seen pretty be successful is to get players into a tight retry loop.  &#xD;&#xA;&#xD;&#xA;It's very disheartening as a gamer to be playing something, lose, and then have to go through a lot of rigamarole to get back to where they were.  &quot;Just one more time&quot; isn't really what people think if it takes them a few minutes to get back to the fun stuff.&#xD;&#xA;&#xD;&#xA;Some examples in various genres:&#xD;&#xA;&#xD;&#xA;* &quot;rewind time&quot; in games like Dirt 2/Grid, or Prince of Persia: Sands of Time&#xD;&#xA;* near-instant retry in games like Canabalt&#xD;&#xA;* quicksaves that are frequent and generous in pretty much most modern games&#xD;&#xA;&#xD;&#xA;I realize this is sort of meta-level on the fun factor, but it does help keep people glued to the game for a longer period of time." />
  <row Id="1275" PostHistoryTypeId="2" PostId="664" RevisionGUID="ce23c30a-0916-4c71-a2d8-1a4b6df5e135" CreationDate="2010-07-17T01:54:35.650" UserId="211" Text="I feel the need to add [ENet][1] to this list. Granted, it does not come with bindings to other languages, but given that it's written in C, creating bindings for it is trivial.&#xD;&#xA;&#xD;&#xA;I've found ENet to be robust, well-written, and scalable, and handles peer-to-peer gaming very well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://enet.bespin.org/" />
  <row Id="1276" PostHistoryTypeId="2" PostId="665" RevisionGUID="c05e5a26-7bbf-44d2-88f5-b01147047889" CreationDate="2010-07-17T02:12:20.740" UserId="225" Text="[Panda3d][1] is a free game engine that works in Linux, Windows and Mac OS X&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.panda3d.org" />
  <row Id="1277" PostHistoryTypeId="5" PostId="604" RevisionGUID="32909271-f8fa-4c9d-b54a-39c9265f52d1" CreationDate="2010-07-17T02:19:46.150" UserId="288" Comment="added 12 characters in body; edited tags" Text="I'm using Farseer Physics Engine quite extensively at the moment, and I've noticed that it seems to store a lot of temporary *value types* as members of the class, and not on the stack as one might expect.&#xD;&#xA;&#xD;&#xA;Here is an example from the `Body` class (the function in question is `GetWorldPosition`)&#xD;&#xA;&#xD;&#xA;    private Vector2 _worldPositionTemp = Vector2.Zero;&#xD;&#xA;    private Matrix _bodyMatrixTemp = Matrix.Identity;&#xD;&#xA;&#xD;&#xA;    public void GetBodyMatrix(out Matrix bodyMatrix)&#xD;&#xA;    {&#xD;&#xA;        Matrix.CreateTranslation(position.X, position.Y, 0, out _translationMatrixTemp);&#xD;&#xA;        Matrix.CreateRotationZ(rotation, out _rotationMatrixTemp);&#xD;&#xA;        Matrix.Multiply(ref _rotationMatrixTemp, ref _translationMatrixTemp, out bodyMatrix);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Vector2 GetWorldPosition(Vector2 localPosition)&#xD;&#xA;    {&#xD;&#xA;        GetBodyMatrix(out _bodyMatrixTemp);&#xD;&#xA;        Vector2.Transform(ref localPosition, ref _bodyMatrixTemp, out _worldPositionTemp);&#xD;&#xA;        return _worldPositionTemp;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It looks like its a by-hand performance optimisation. But I don't see how this could possibly help performance? (If anything I think it would hurt by making objects much larger)." />
  <row Id="1278" PostHistoryTypeId="6" PostId="604" RevisionGUID="32909271-f8fa-4c9d-b54a-39c9265f52d1" CreationDate="2010-07-17T02:19:46.150" UserId="288" Comment="added 12 characters in body; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;.net&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="1279" PostHistoryTypeId="2" PostId="666" RevisionGUID="3ff9b973-94f5-4bac-a95d-e3ce9c709d33" CreationDate="2010-07-17T02:48:30.140" UserId="250" Text="[SFML][1] is a great framework written in C++. It currently supports Linux, OS X, and Windows. It has bindings to C, D, Ruby and Python. It's also released under zlib/png license. &#xD;&#xA;&#xD;&#xA;In comparison to say, SDL, the only downside it has is using window input on win32, rather than DirectInput. It also is not one large library, but a group of them, which allows a more modular approach to which libraries you use :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sfml-dev.org &quot;SFML&quot;" />
  <row Id="1280" PostHistoryTypeId="2" PostId="667" RevisionGUID="76b46b1c-4d9d-4cc4-aef9-46869504beca" CreationDate="2010-07-17T02:57:24.237" UserId="83" Text="[Allegro][1] will work on Windows, OS X, Linux, DOS and some others. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.allegro.cc/" />
  <row Id="1281" PostHistoryTypeId="2" PostId="668" RevisionGUID="5308b678-6c72-43b2-931b-c6db1e8044ad" CreationDate="2010-07-17T03:00:32.917" UserId="83" Text="In Mihaly Csikszentmihalyi's book [Flow][1], he talks about the area between the players skill and the challenge. The key is to keep the player in this area. As their skill increases so should the challenge. &#xD;&#xA;&#xD;&#xA;If there is too much challenge then the player may give up. If the player is too skilled they may get bored. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Flow-Psychology-Experience-Mihaly-Csikszentmihalyi/dp/0060920432" />
  <row Id="1283" PostHistoryTypeId="2" PostId="669" RevisionGUID="e953ff80-e33a-41f5-8486-98e9b43f6377" CreationDate="2010-07-17T04:09:56.053" UserId="176" Text="Not game-related, actually, but an invaluable resource for any programmer: [The Pragmatic Programmer: From Journeyman to Master][1]. It won't tell you how to write a 3D pipeline--rather, it will take you on a tour of the principles that underly good software architecture.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pragprog.com/titles/tpp/the-pragmatic-programmer &quot;The Pragmatic Programmer: From Journeyman to Master&quot;" />
  <row Id="1284" PostHistoryTypeId="2" PostId="670" RevisionGUID="936abe1a-03da-4aeb-a4dc-3e3f1bbf1c7b" CreationDate="2010-07-17T04:19:21.787" UserId="176" Text="[Game Programming: The Express Line to Learning][1] provides a nice, beginner-level introduction to a basic game engine structure the author calls &quot;IDEA/ALTER&quot;:&#xD;&#xA;&#xD;&#xA; - I – Import and initialize&#xD;&#xA; - D – Display configuration&#xD;&#xA; - E – Entities&#xD;&#xA; - A – Action (broken into ALTER steps)&#xD;&#xA;   - A – Assign values to key variables&#xD;&#xA;   - L – Loop (setup main Loop)&#xD;&#xA;   - T – Timer to set frame rate&#xD;&#xA;   - E – Event handling&#xD;&#xA;   - R - Refresh the display&#xD;&#xA;&#xD;&#xA;The book walks through a complete example game implemented in Python/Pygame.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470068221,subjectCd-PH30,descCd-google_preview.html" />
  <row Id="1285" PostHistoryTypeId="2" PostId="671" RevisionGUID="e2d98430-6b64-4323-9087-d8e7b5e352d2" CreationDate="2010-07-17T04:26:46.757" UserId="162" Text="Zynga games are an interesting case because they are NOT fun as it is described in Flow or is present in a game like tetris or space invaders. It's not about matching skill to challenge. Frankly Farmville is not &quot;fun&quot; at all in that sense.&#xD;&#xA;&#xD;&#xA;Instead, Facebook games are designed to be engaging, which is subtly different. An engaging game is one that draws people to come back to it regularly, and there are several factors that can increase the level of engagement. In the case of Farmville, it's a combination of Relatedness and Autonomy that really keeps the players coming back. The autonomy (which is a fancy way of saying allowing a player to have their choices be reflected in a game) comes into play with the aesthetic elements of building a farm featuring the crops and decorations that each player wants. This is inherently satisfying. Relatedness is even more important for Farmville, as people come back because Farmville is really a channel for being social with other players. Features such as gifts between players encourage social reciprocation, and the every-two-hours pacing encourages players to come back and &quot;keep up their garden&quot;, and be a good citizen. The 3rd pillar of engagement is increasing competence, but FarmVille isn't really about that.&#xD;&#xA;&#xD;&#xA;I recommend this [gamasutra article][1] as a good overview of the interaction of those factors to create long term engagement. Basically it's about applying concepts from the field of motivational psychology to game design, and I think it goes a long way to explain why games like Civilization and RPGs are as compelling as they are.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/features/20070116/rigby_01.shtml" />
  <row Id="1286" PostHistoryTypeId="2" PostId="672" RevisionGUID="4e709ede-b846-4d25-b891-50f3af706b34" CreationDate="2010-07-17T04:42:54.277" UserId="162" Text="Here's a rough strategy I've used to balance similar systems in the past:&#xD;&#xA;&#xD;&#xA;Decide on a base metric of balance value. A good first pass if you don't have a better idea is &quot;damage done to others&quot;. So a power that only does 10 points of damage is worth 10 &quot;balance points&quot;. Now, you need to compare armor to damage in usefuless, so see if you can come up with a good metric to convert it. For instance, let's say that the average robot does 10 damage per second and has a total of 100 hit points. So each robot can last an average of 10 seconds under direct fire. An ability that increases your survivability from 10 to 12 seconds is then worth 2 seconds of damage, or 20 &quot;balance points&quot;. You then modify these balance points based on the cost it takes to execute, so for instance an ability that does 10 damage with a 5 second recharge can be worth 1/5 as much as an ability that does 10 damage with a 1 second recharge. You can create similar conversions for abilities such as movement (which increases damage given and reduces damage taken) and stealth (that can reduce damage taken) and make up some initial factors.&#xD;&#xA;&#xD;&#xA;An important thing to remember is that all of these initial conversions WILL be thrown away eventually. It's very unlikely that 2 seconds of survivability is ACTUALLY worth 2 seconds worth of average damage, and your testing will show which of your base assumptions are incorrect. But, this gives you a system for creating initial values and one for evaluating the results that fall outside your expected balance." />
  <row Id="1287" PostHistoryTypeId="2" PostId="673" RevisionGUID="a55985b4-5b92-4d42-bfd4-524b2a12caee" CreationDate="2010-07-17T04:58:09.090" UserId="162" Text="For an MMO I worked on (100ish developers, PC focused), we tried to add a huge variety of automated testing with varying success. Here's what worked:&#xD;&#xA;&#xD;&#xA; - Basic tests during our automated build process were a huge win. This included tasks such as creating a character, transferring maps, running some scriptable UI tests and looking for expected behavior. This caught a huge number of bugs before they actually got to the rest of the company.&#xD;&#xA; - On the server infrastructure end, we developed a bunch of different automated tests that simulated typical MMO server transactions. We could then play these back under a variety of circumstances to compare performance or ensure safety. Over time these tests became more and more accurate until it turned into a playback of live recorded data&#xD;&#xA; - We wrote a &quot;fake player&quot; that would randomly roam around the world, jump, kill things, and say random things in chat. This found a huge number of physics and infrastructure issues.&#xD;&#xA;&#xD;&#xA;What didn't work:&#xD;&#xA;&#xD;&#xA; - We tried to add some very specific combat-oriented automated tests to the automated builder, but this basically never worked. It would work for about 3 days after being implemented, until a designer or artist changed something and the test would fail, throwing off the build failed alarms. 90% of the time it wasn't a real problem. These tests were too fragile, and actually testing specific gameplay on a specific map with specific powers can be unmaintainable&#xD;&#xA; - We tried implementing an automated performance test that would compare client performance (average FPS, etc) against recorded performance from a week ago. This was also fairly fragile as the demos we used for this tended to rot fairly often, and it was difficult to ascertain if a slowdown was caused by an actual loss in performance or some side effect of the test process.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1289" PostHistoryTypeId="5" PostId="604" RevisionGUID="df7ebc2e-a46b-4195-88b9-0af53655668b" CreationDate="2010-07-17T06:22:59.080" UserId="288" Comment="added 75 characters in body" Text="I'm using Farseer Physics Engine quite extensively at the moment, and I've noticed that it seems to store a lot of temporary *value types* as members of the class, and not on the stack as one might expect.&#xD;&#xA;&#xD;&#xA;Here is an example from the `Body` class:&#xD;&#xA;&#xD;&#xA;    private Vector2 _worldPositionTemp = Vector2.Zero;&#xD;&#xA;&#xD;&#xA;    private Matrix _bodyMatrixTemp = Matrix.Identity;&#xD;&#xA;    private Matrix _rotationMatrixTemp = Matrix.Identity;&#xD;&#xA;    private Matrix _translationMatrixTemp = Matrix.Identity;&#xD;&#xA;&#xD;&#xA;    public void GetBodyMatrix(out Matrix bodyMatrix)&#xD;&#xA;    {&#xD;&#xA;        Matrix.CreateTranslation(position.X, position.Y, 0, out _translationMatrixTemp);&#xD;&#xA;        Matrix.CreateRotationZ(rotation, out _rotationMatrixTemp);&#xD;&#xA;        Matrix.Multiply(ref _rotationMatrixTemp, ref _translationMatrixTemp, out bodyMatrix);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Vector2 GetWorldPosition(Vector2 localPosition)&#xD;&#xA;    {&#xD;&#xA;        GetBodyMatrix(out _bodyMatrixTemp);&#xD;&#xA;        Vector2.Transform(ref localPosition, ref _bodyMatrixTemp, out _worldPositionTemp);&#xD;&#xA;        return _worldPositionTemp;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It looks like its a by-hand performance optimisation. But I don't see how this could possibly help performance? (If anything I think it would hurt by making objects much larger)." />
  <row Id="1290" PostHistoryTypeId="6" PostId="657" RevisionGUID="c999ec76-a29e-4c1b-a990-78e763bd58c3" CreationDate="2010-07-17T06:44:34.700" UserId="159" Comment="edited tags" Text="&lt;game-design&gt;&lt;fun&gt;" />
  <row Id="1291" PostHistoryTypeId="6" PostId="20" RevisionGUID="c00c1abd-3bf2-4953-b37c-c210a7cc6cee" CreationDate="2010-07-17T06:57:02.210" UserId="244" Comment="edited tags" Text="&lt;assets&gt;&lt;graphics&gt;" />
  <row Id="1292" PostHistoryTypeId="5" PostId="610" RevisionGUID="37a19549-0e87-4e4e-8cdd-005cde6f2f86" CreationDate="2010-07-17T07:07:57.740" UserId="118" Comment="deleted 49 characters in body; edited title" Text="I want to develop a huge world map which is at least 8000x6000 pixels in size. I have broken it into a 10x10 grid of 800x600 pixels PNG images. To avoid loading everything into memory, the images should be loaded and unloaded depending on the player's position in the grid. &#xD;&#xA;&#xD;&#xA;For example, here is the player position (3,3):&#xD;&#xA;&#xD;&#xA;![Player at (3,3)](http://img138.imageshack.us/img138/7067/tilemaphelp1.png)&#xD;&#xA;&#xD;&#xA;As he moves to the right (4,3), the three images at the far left are deallocated while the three images at the right are allocated:&#xD;&#xA;&#xD;&#xA;![Player moves to (4,3)](http://img682.imageshack.us/img682/7206/tilemaphelp2.png)&#xD;&#xA;&#xD;&#xA;I was thinking that there should be a threshold inside each cell of the grid that triggers the loading and unloading of the images. Also, this loading would probably be in a separate thread.&#xD;&#xA;&#xD;&#xA;So, my two main questions are:&#xD;&#xA;&#xD;&#xA;**How should I design this?**  &#xD;&#xA;And, since my target platform is the XBOX 360, **how does threading work?**&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="1293" PostHistoryTypeId="4" PostId="610" RevisionGUID="37a19549-0e87-4e4e-8cdd-005cde6f2f86" CreationDate="2010-07-17T07:07:57.740" UserId="118" Comment="deleted 49 characters in body; edited title" Text="XNA: Stream loading a HUGE 2D world map" />
  <row Id="1294" PostHistoryTypeId="6" PostId="610" RevisionGUID="a0f3b3ca-6a7d-4aaf-a619-afc1a97cbd1a" CreationDate="2010-07-17T09:16:49.540" UserId="260" Comment="edited tags" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;tiles&gt;" />
  <row Id="1295" PostHistoryTypeId="2" PostId="675" RevisionGUID="6b01851e-4a9a-4c7d-a5ea-78076e3c496b" CreationDate="2010-07-17T10:15:12.977" UserId="204" Text="When writing your functions for saving and loading files, or communicating over a network, don't forget about [endianness][1]. &#xD;&#xA;&#xD;&#xA;Instead of reading a big structure with a single call to fread/fwrite or something low level like that, create a ReadByte/WriteByte and ReadFloat/WriteFloat. Then you will have fewer places to make changes if you decide to target a different platform later.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Endianness" />
  <row Id="1296" PostHistoryTypeId="5" PostId="481" RevisionGUID="65aa08c6-f1e3-46c0-9c82-418af85d174b" CreationDate="2010-07-17T10:19:06.577" UserId="204" Comment="Added a section about the pristine copies SVN keeps in the workspace." Text="[Subversion][1]&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;  - Open-source, centralized&#xD;&#xA;&#xD;&#xA;  - Blender files - I'm not entirely sure if .blend files are binary (they look like it), but I have had no problems adding them to Subversion. Having done a few experiments, the file size increase for changed files appears nominal, so it's not simply copying in the entire file.  &#xD;&#xA;&#xD;&#xA;  - Large projects - It works, though it can get quirky.  It's definitely *able* to handle repositories of at least 5.5 GB (total size of repository dir on server; mostly binary assets).&#xD;&#xA;&#xD;&#xA;  - Duplicated Data on the Client - Subversion keeps a duplicate copy of every file in the user's workspace as a pristine copy. The advantage of this is you can do a diff or revert without going back to the server. The disadvantage is that your 10 gig of working files takes 20 gig of disk space.&#xD;&#xA;&#xD;&#xA;[1]: http://subversion.tigris.org/" />
  <row Id="1298" PostHistoryTypeId="2" PostId="676" RevisionGUID="ed2fcf9e-dd97-4969-abe0-e94f350b0976" CreationDate="2010-07-17T10:31:27.673" UserId="204" Text="On a first person shooter I worked on (Descent 3), the demo recording/playback capability turned out to be extremely useful. I made an option where you could playback the demo as fast as the game could render frames, and that became a great way to verify performance after a bunch of things changed.&#xD;&#xA;&#xD;&#xA;It also exercised a lot of the code beyond the rendering system, so it was a nice sanity check. After making a bunch of changes I could just run the demo playback of 10 minutes of gameplay. Many times it would catch a bug in an area I wouldn't have thought to check myself." />
  <row Id="1299" PostHistoryTypeId="2" PostId="677" RevisionGUID="b4964cef-bd58-4771-94d8-0363ba4d7017" CreationDate="2010-07-17T11:50:37.023" UserId="83" Text="I would recommend [Zwoptex][1]. I think it would do exactly what you want for your iPhone game. And if you have not tried [cocos2d][2] yet, Zwoptex is supported by it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zwoptexapp.com/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/" />
  <row Id="1300" PostHistoryTypeId="2" PostId="678" RevisionGUID="3659e30d-6b73-48cb-9154-e9539cb99401" CreationDate="2010-07-17T12:03:06.217" UserId="83" Text="Sure, I had to figure that out for my game Star Catch. There may be better ways of doing it but this is how I did it. I actually found the algorithm online (sorry I can't remember the source) I did a search for detecting a point inside a polygon. &#xD;&#xA;&#xD;&#xA;I created a NSMutableArray to hold my point. I add the points in my touchevents. &#xD;&#xA;&#xD;&#xA;    - (BOOL) testNodeInLoop:(CCNode *)node {&#xD;&#xA;&#xD;&#xA;	    CGPoint prev;&#xD;&#xA;	&#xD;&#xA;	    // This is more accurate point for the node&#xD;&#xA;	    CGPoint absPoint = [node convertToWorldSpace:CGPointZero];&#xD;&#xA;	&#xD;&#xA;	    float x = absPoint.x;&#xD;&#xA;	    float y = absPoint.y;&#xD;&#xA;	&#xD;&#xA;	    BOOL isIn = NO;&#xD;&#xA;	&#xD;&#xA;	    CGPoint cp;&#xD;&#xA;	&#xD;&#xA;	    for(int i = 0, j = [points count] - 1; i &lt; [points count]; j = i++) {&#xD;&#xA;		    [[points objectAtIndex:i] getValue:&amp;cp];&#xD;&#xA;		    [[points objectAtIndex:j] getValue:&amp;prev];&#xD;&#xA;		&#xD;&#xA;		    if( ((cp.y &gt; y) != (prev.y &gt; y)) &amp;&amp; (x &lt; (prev.x -cp.x) * (y - cp.y) / (prev.y - cp.y) + cp.x)) {&#xD;&#xA;			    isIn = !isIn;&#xD;&#xA;		    }&#xD;&#xA;	    }&#xD;&#xA;	    return isIn;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Let me know if this is helpful.&#xD;&#xA;" />
  <row Id="1301" PostHistoryTypeId="5" PostId="483" RevisionGUID="a974e974-9871-4985-94f6-cc01cf70e4c9" CreationDate="2010-07-17T12:12:43.937" UserId="137" Comment="added 249 characters in body" Text="# [Perforce][1]&#xD;&#xA;&#xD;&#xA;Perforce (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. Open-source projects may be eligible for a free license (minus the technical support).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;It is worth noting however that their merge tool, P4Merge (used for diffing and merging) is excellent and far superior to the likes of Tortoise Merge. Surprisingly, this component is available for free as part of the P4 Visual Tools package.&#xD;&#xA;&#xD;&#xA;Another drawback with Perforce is that branching in it tends to be a huge pain, especially if you have large trees. Almost every other vcs is better at branching and merging. This is usually a small price to pay for the above advantages though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="1302" PostHistoryTypeId="2" PostId="679" RevisionGUID="2bfd7050-96d8-4be4-ad73-a6dd12b16428" CreationDate="2010-07-17T12:15:44.773" UserId="204" Text="Many projects don't think about localization until the game is done. Then localization is done as a hack, and it's obvious that it was added on later. Some specific areas of concern:&#xD;&#xA;&#xD;&#xA; - Text strings (obviously)&#xD;&#xA; - Audio clips such as music and/or narratives&#xD;&#xA; - Text rendered on textures (e.g. a label on a crate)&#xD;&#xA; - Text rendered in frames in pre-rendered movies&#xD;&#xA; - Fonts/Character sets for different languages&#xD;&#xA; - Etc.&#xD;&#xA;&#xD;&#xA;What are some good ways to prepare for these challenges in the initial development stages, so you can make it easier without incurring too much cost up front?" />
  <row Id="1303" PostHistoryTypeId="1" PostId="679" RevisionGUID="2bfd7050-96d8-4be4-ad73-a6dd12b16428" CreationDate="2010-07-17T12:15:44.773" UserId="204" Text="How to prepare a game for localization?" />
  <row Id="1304" PostHistoryTypeId="3" PostId="679" RevisionGUID="2bfd7050-96d8-4be4-ad73-a6dd12b16428" CreationDate="2010-07-17T12:15:44.773" UserId="204" Text="&lt;language-agnostic&gt;&lt;languages&gt;&lt;localization&gt;" />
  <row Id="1305" PostHistoryTypeId="2" PostId="680" RevisionGUID="f9af5c21-15ce-48ba-9bd4-d3e4247d59fd" CreationDate="2010-07-17T12:27:49.957" UserId="118" Text="I would like to implement threading in my XNA game but I'm not sure how things work when compiling for the XBOX 360. Could someone elaborate on this? &#xD;&#xA;&#xD;&#xA;For example, how many threads does XBOX support? I realize that XNA uses a special version of the Compact Framework. How does this affect the code during development? Do I implement things differently when developing for XBOX than Windows?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="1306" PostHistoryTypeId="1" PostId="680" RevisionGUID="f9af5c21-15ce-48ba-9bd4-d3e4247d59fd" CreationDate="2010-07-17T12:27:49.957" UserId="118" Text="XNA: How does threading work?" />
  <row Id="1307" PostHistoryTypeId="3" PostId="680" RevisionGUID="f9af5c21-15ce-48ba-9bd4-d3e4247d59fd" CreationDate="2010-07-17T12:27:49.957" UserId="118" Text="&lt;xna&gt;&lt;multithreading&gt;" />
  <row Id="1308" PostHistoryTypeId="2" PostId="681" RevisionGUID="7ee9e181-21f9-4515-b29c-e8ff00f6f0ce" CreationDate="2010-07-17T12:36:10.863" UserId="204" Text="Even games that are 100% client/server sometimes have issues when the client is behind NAT. Peee-peer games are even a bigger issues. Some games need to use multiple transports (such as UDP and TCP) or multiple connections (such as a different UDP port for voice).&#xD;&#xA;&#xD;&#xA;What are some ways to make sure a game works reliably when running behind a NAT router?&#xD;&#xA;&#xD;&#xA; - Peer-Peer: No centralized server exists. Player A starts a game and Player B wants to join&#xD;&#xA; - Client-Server: A centralized server on a well known address (hostname) accepts all incoming connections. Each client only communicates with that server.&#xD;&#xA; - Combo: Where the server is just matchmaking, but game updates are peer-peer. Different peers may see each player with a different IP/port potentially (e.g. some clients are behind the same NAT and some are on a different router)" />
  <row Id="1309" PostHistoryTypeId="1" PostId="681" RevisionGUID="7ee9e181-21f9-4515-b29c-e8ff00f6f0ce" CreationDate="2010-07-17T12:36:10.863" UserId="204" Text="How to make a multiplayer game work reliably behind NAT?" />
  <row Id="1310" PostHistoryTypeId="3" PostId="681" RevisionGUID="7ee9e181-21f9-4515-b29c-e8ff00f6f0ce" CreationDate="2010-07-17T12:36:10.863" UserId="204" Text="&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="1311" PostHistoryTypeId="5" PostId="610" RevisionGUID="0d50d869-dbe5-45a5-adb4-9806e0127de3" CreationDate="2010-07-17T12:39:54.990" UserId="118" Comment="deleted 86 characters in body" Text="I want to develop a huge world map which is at least 8000x6000 pixels in size. I have broken it into a 10x10 grid of 800x600 pixels PNG images. To avoid loading everything into memory, the images should be loaded and unloaded depending on the player's position in the grid. &#xD;&#xA;&#xD;&#xA;For example, here is the player position (3,3):&#xD;&#xA;&#xD;&#xA;![Player at (3,3)](http://img138.imageshack.us/img138/7067/tilemaphelp1.png)&#xD;&#xA;&#xD;&#xA;As he moves to the right (4,3), the three images at the far left are deallocated while the three images at the right are allocated:&#xD;&#xA;&#xD;&#xA;![Player moves to (4,3)](http://img682.imageshack.us/img682/7206/tilemaphelp2.png)&#xD;&#xA;&#xD;&#xA;I was thinking that there should be a threshold inside each cell of the grid that triggers the loading and unloading of the images. Also, this loading would probably be in a separate thread.&#xD;&#xA;&#xD;&#xA;So, my main question is: **How should I design this?**  &#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="1312" PostHistoryTypeId="2" PostId="682" RevisionGUID="e2dfa304-927e-4cbb-8d86-4a5c0ead31bc" CreationDate="2010-07-17T12:40:31.603" UserId="204" Text=" - Don't have a client inform the server or peer of its own address. In other words, don't embed client A's IP in a game packet and have client B or the server reply to that address. Always reply to the address/port that the message originated from.&#xD;&#xA;&#xD;&#xA; - Minimize the different UDP or TCP ports used for the game. This makes setting up NAT rules easier.&#xD;&#xA;&#xD;&#xA; - Allow the user to override the default port used in the game. This way several servers can be hosted behind the same NAT." />
  <row Id="1313" PostHistoryTypeId="2" PostId="683" RevisionGUID="e3147abc-e14f-441f-828a-e42d3134c01f" CreationDate="2010-07-17T12:58:17.167" UserId="68" Text="Funniest I've seen was when a colleague was working on copying colour channels around on PS2.  At some point he recompiled and the blue channel went missing.  So he started to debug what had happened to the channel.  An hour later I suggested he go and try asking the Tech Director (who was a genius debugger).&#xD;&#xA;&#xD;&#xA;So they both sat down trying to figure out where the channel had gone.  Roughly an hour later, they'd got nowhere further than confirming that the blue ought to be there.  I decided to get up and go out for a smoke.  On walking back in I went round to see what the problem was and said &quot;I reckon I know what it is!&quot; and lent over his TV screen and pushed the SCART back in properly.&#xD;&#xA;&#xD;&#xA;Bingo.&#xD;&#xA;&#xD;&#xA;There were a couple of embarrassed faces there ;)" />
  <row Id="1314" PostHistoryTypeId="16" PostId="683" RevisionGUID="e3147abc-e14f-441f-828a-e42d3134c01f" CreationDate="2010-07-17T12:58:17.167" UserId="-1" />
  <row Id="1315" PostHistoryTypeId="2" PostId="684" RevisionGUID="b3a719bd-3999-4eb6-b9e0-43cf1108a32b" CreationDate="2010-07-17T12:59:58.490" UserId="68" Text="Well given that unity targets iPhone then iPhone 3G (not S) has pretty ancient fixed function style hardware.  You should have no trouble getting software written for an iPhone 3G to run on older hardware.&#xD;&#xA;&#xD;&#xA;Beware the driver bugs though!!" />
  <row Id="1316" PostHistoryTypeId="16" PostId="684" RevisionGUID="b3a719bd-3999-4eb6-b9e0-43cf1108a32b" CreationDate="2010-07-17T12:59:58.490" UserId="-1" />
  <row Id="1317" PostHistoryTypeId="2" PostId="685" RevisionGUID="bfa9dd88-f298-41b7-82fc-ad76ceaa716b" CreationDate="2010-07-17T13:12:04.223" UserId="202" Text="[Wil Shipley](http://wilshipley.com/blog/2009/10/pimp-my-code-part-17-lost-in.html) has by far the best guide on localization I've ever read. Unfortunately it's iPhone specific, but one can still derive commonly useful information. Further, he addresses the localization of assets - one of the bigger challenges in game localization I can imagine." />
  <row Id="1318" PostHistoryTypeId="2" PostId="686" RevisionGUID="f6aa57e5-d6a4-4dfd-95ae-9ca94837db5f" CreationDate="2010-07-17T14:26:52.093" UserId="120" Text="Basicly, the xbox 360 has 6 hardware threads, spread over 3 cores. Two of these are reserved for the xna framework and general system use. Threading works the same as it does on the .net framework on windows,except you get an extra methods, [SetProcessorAffinity][1]. Unlike windows, the xbox dosnt do any fancy thread scheduling for you, so you have to tell it what hardware thread to run your thread on.&#xD;&#xA;&#xD;&#xA;There are some good xbox aware thread pools out there, have a look on google if you need some example code, but if your confident with threading in windows that msdn page should give you all you need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.net_cf.system.threading.thread.setprocessoraffinity.aspx" />
  <row Id="1319" PostHistoryTypeId="5" PostId="584" RevisionGUID="a8402cdf-da90-45b7-a575-ba986d8efb9f" CreationDate="2010-07-17T14:32:27.290" UserId="165" Comment="added 92 characters in body" Text="[Gamefeel][1] by Steve Swink completely changed they way I think about developing games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Feel-Designers-Sensation-Kaufmann/dp/0123743281" />
  <row Id="1320" PostHistoryTypeId="2" PostId="687" RevisionGUID="7d7639fb-8204-4389-96c0-ff5115a4ba09" CreationDate="2010-07-17T14:41:46.300" UserId="321" Text="I am working on a network game project in python which we want to keep synchronized. I would assume we should use Network Time Protocol to cater for different levels of lag.&#xD;&#xA;&#xD;&#xA;That being the case, is there an implementation for Network Time Protocol in python?" />
  <row Id="1321" PostHistoryTypeId="1" PostId="687" RevisionGUID="7d7639fb-8204-4389-96c0-ff5115a4ba09" CreationDate="2010-07-17T14:41:46.300" UserId="321" Text="Game clock Synchronization in python" />
  <row Id="1322" PostHistoryTypeId="3" PostId="687" RevisionGUID="7d7639fb-8204-4389-96c0-ff5115a4ba09" CreationDate="2010-07-17T14:41:46.300" UserId="321" Text="&lt;network&gt;&lt;synchronization&gt;&lt;python&gt;" />
  <row Id="1323" PostHistoryTypeId="2" PostId="688" RevisionGUID="747197e4-8c96-4adf-8f2b-b75f7b4ffea2" CreationDate="2010-07-17T14:45:25.420" UserId="202" Text="I can't believe nobody mentioned [Game Programming Gems](http://www.amazon.com/Game-Programming-Gems-Adam-Lake/dp/1584507020/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1279377864&amp;sr=8-2) yet. I always considered it to be the standard when it comes to game design." />
  <row Id="1324" PostHistoryTypeId="16" PostId="688" RevisionGUID="747197e4-8c96-4adf-8f2b-b75f7b4ffea2" CreationDate="2010-07-17T14:45:25.420" UserId="-1" />
  <row Id="1325" PostHistoryTypeId="2" PostId="689" RevisionGUID="5929a820-6f29-44cb-ba2a-6794a5a0a112" CreationDate="2010-07-17T15:42:18.300" UserId="187" Text="Although in .NET value types are stored on the stack, resulting in a minimal allocation cost, it does not however eliminate the cost of initialization.&#xD;&#xA;&#xD;&#xA;In this case we have a set of functions using one or two temporary matrices, which would result in the initialization of 16-32 floats per call. While this may seem insignificant, if the methods are used often enough (say, thousands and thousands of times per frame), the total overhead can have a meaningful impact. If such a technique is used systematically across all such methods, the overhead eliminated can be considerable.&#xD;&#xA;&#xD;&#xA;While use of such a technique eliminates the ability to provide thread safety at a per-object level, it is generally unwise to provide that guarantee at such a granular level." />
  <row Id="1326" PostHistoryTypeId="2" PostId="690" RevisionGUID="f29a1c6e-b4e4-4e72-8a90-e3afe0ab34e7" CreationDate="2010-07-17T15:45:52.527" UserId="281" Text="I've been working on something very similar for my current project. This is a quick run down of how I'm doing it, with some side notes on how to make things a bit easier on yourself.&#xD;&#xA;&#xD;&#xA;For me, the first problem was breaking the world into smaller chunks that would be appropriate to load and unload on the fly. Since you're using a tile based map, that step becomes significantly easier. Rather than considering the positions of each 3D object in the level, you already have your level split nicely into tiles. This lets you simply break up the world into X by Y tile chunks, and load those.&#xD;&#xA;&#xD;&#xA;You're going to want to do that automatically, rather than by hand. Since you're using XNA, you have an option of using the Content Pipeline with a custom exporter for your level content. Unless you know of some way to run the export process without recompiling, I'd honestly recommend against it. While C# isn't nearly as slow to compile as C++ tends to be, you still don't want to have to load Visual Studio and recompile your game every time you make a minor change to the map.&#xD;&#xA;&#xD;&#xA;Another important thing here is to make sure you use a good naming convention for the files containing your level's chunks. You want to be able to know that you want to load or unload chunk C, and then generate the filename you need to load to do that at run time. Finally, think of any little things that might help you down the road. It's really nice to be able to change how large a chunk is, re-export, and then see the effects of that on performance immediately.&#xD;&#xA;&#xD;&#xA;At run time, it's still pretty straightforward. You'll need some way to asynchronously load and unload chunks, but this is highly dependent on how your game or engine works. Your second image is exactly correct -- you need to determine what chunks should be loaded or unloaded, and make the appropriate requests to make that the case if it is not already. Depending on how many chunks you have loaded at one time, you could just do this whenever the player cross a boundary from one chunk to the next. After all, either way, you want to make sure that enough is loaded that even in the worst (reasonable) load time, the chunk is still loaded before the player can see it. You're probably going to want to play with this number a lot until you get a good balance between performance and memory consumption.&#xD;&#xA;&#xD;&#xA;As far as actual architecture goes, you're going to want to abstract the process of actually loading and unloading the data from memory from the process of determining what should be loaded/unloaded. For your first iteration, I wouldn't even worry about performance of loading/unloading and just get the simplest thing that could possibly work, and ensure that you are generating the appropriate requests at the appropriate times. After that, you can look at optimizing how you load to minimize garbage.&#xD;&#xA;&#xD;&#xA;I ran into a lot of additional complexity due to the engine I was using, but that's pretty implementation specific. If you've got any questions about what I did, please comment and I'll do what I can to help out." />
  <row Id="1327" PostHistoryTypeId="2" PostId="691" RevisionGUID="847ec218-39c3-4426-b96d-1fb87e2f3423" CreationDate="2010-07-17T16:30:27.300" UserId="34" Text="You probably won't be able to use NTP directly -- for one, you need to have a server that is guaranteed to be available to all of your clients.  Second, it's really overkill for what you need.  What you want to really do is come up with some sort of common time stamp that all of the clients can agree on. &#xD;&#xA;&#xD;&#xA;Based on the method from http://www.mine-control.com/zack/timesync/timesync.html,  here is what I would do (modified slightly):&#xD;&#xA;&#xD;&#xA;&gt; 1. Client stamps current local time on a &quot;time request&quot; packet and sends to server&#xD;&#xA;2. Upon receipt by server, server stamps server-time and returns&#xD;&#xA;3. Upon receipt by client, client subtracts current time from sent time and divides by two to compute latency. It subtracts current time from server time to determine client-server time delta and adds in the half-latency to get the correct clock delta. (So far this algothim is very similar to SNTP)&#xD;&#xA;4. The client repeats steps 1 through 3 five or more times, pausing a few seconds each time. Other traffic may be allowed in the interim, but should be minimized for best results&#xD;&#xA;The results of the packet receipts are accumulated and sorted in lowest-latency to highest-latency order. The median latency is determined by picking the mid-point sample from this ordered list.&#xD;&#xA;5. All samples above approximately 1 standard-deviation from the median are discarded and the remaining samples are averaged using an arithmetic mean.&#xD;&#xA;&#xD;&#xA;The only difference is that you shouldn't try to set the system time -- most users would consider this to be bad behavior and besides, it's most likely something that would require admin privileges and your game shouldn't need to do anything that requires admin privileges.&#xD;&#xA;&#xD;&#xA;I would probably add that you should do some time synchronization periodically within the game as well, especially if it's been going on for a while.  You should be able to find a point in the game where the action isn't as heavy and it's a good time to sync.&#xD;&#xA;&#xD;&#xA;Alternatively, you could time stamp all packets from the client and the server and build your time synchronization code so that any packet can be used to determine the current latency and what the common game clock should be.&#xD;&#xA;" />
  <row Id="1328" PostHistoryTypeId="2" PostId="692" RevisionGUID="c04e38f0-d9e4-4b76-b868-2b8f95e9cc7a" CreationDate="2010-07-17T16:44:38.470" UserId="187" Text="Most developers simply create their own tools; there is no standard format that I know of.&#xD;&#xA;&#xD;&#xA;Part of the reason for that is it's a relatively straight-forward task once you have written the code to display such a keyframe. It's a trivial step from that to add some basic functionality to move and rotate each bone, and save the set of transforms as a keyframe. From there, you need only add some controls for the timeline, and you have yourself an editor!&#xD;&#xA;&#xD;&#xA;That said, I was able to find this editor, though you'll have to write the loading routines yourself:&#xD;&#xA;http://www.allegro.cc/forums/thread/590509" />
  <row Id="1329" PostHistoryTypeId="5" PostId="363" RevisionGUID="e5b9d447-24d2-44de-82a2-5c63e9966862" CreationDate="2010-07-17T16:52:51.063" UserId="240" Comment="fix typo" Text="In very broad terms, you probably want to define a gesture as a direction, followed by a [possibly very-short] delay, followed by another direction (and the relative angles between the directions, etc., until the end.&#xD;&#xA;&#xD;&#xA;For example, making a &quot;t&quot; with your wand (and don't forget that some people are lefties, so your definitions should not be hand-dependant!) is a vertical swoosh, short delay, reversal curving out, short delay, reversal headed horizontal, abrupt [near] stop.&#xD;&#xA;&#xD;&#xA;As you read the gesture, you want to see how closely the pattern read matches the pattern description.&#xD;&#xA;&#xD;&#xA;In general terms, you can first cull the definition dictionary by eliminating obvious mis-matches (ones that don't even begin correctly, or that are too long or too short by far), then &quot;score&quot; the gesture against the remaining definitions.  Score the gesture by rating each portion as to how well it matched the definition (0-100%) and RMS-ing that (take the errors, squared, sum them, then take the square root of that sum.)&#xD;&#xA;&#xD;&#xA;Using RMS accentuates large differences (resulting in a lower score), while tending to gloss over small differences (resulting in a better match.)&#xD;&#xA;&#xD;&#xA;There's a ton of material on this stuff -- Google gesture recognition.  Don't worry if it's for a stylus or other non-Wii thing, the principles adapt well.&#xD;&#xA;" />
  <row Id="1330" PostHistoryTypeId="2" PostId="693" RevisionGUID="6b8f222a-8680-468d-af32-db52260804bb" CreationDate="2010-07-17T17:07:06.143" UserId="346" Text="&lt;a href=&quot;http://gamedesignadvance.com/?page_id=1616&quot;&gt;Another Castle&lt;/a&gt; is a game design podcast that focuses on the game development scene in the New York area. Sometime the audio isn't that good (they record a lot in restaurants) but the interviewees are always interesting." />
  <row Id="1331" PostHistoryTypeId="16" PostId="693" RevisionGUID="6b8f222a-8680-468d-af32-db52260804bb" CreationDate="2010-07-17T17:07:06.143" UserId="-1" />
  <row Id="1332" PostHistoryTypeId="5" PostId="663" RevisionGUID="b9dee047-7fd2-4f67-998e-8e239c2825bf" CreationDate="2010-07-17T17:53:05.380" UserId="51" Comment="edited body; added 54 characters in body" Text="One design goal that I've seen be pretty successful is to get players into a tight retry loop.  &#xD;&#xA;&#xD;&#xA;It's very disheartening as a gamer to be playing something, lose, and then have to go through a lot of rigamarole to get back to where they were.  &quot;Just one more time&quot; isn't really what people think if it takes them a few minutes to get back to the fun stuff.&#xD;&#xA;&#xD;&#xA;Some examples in various genres that try to get the player back into the game quickly:&#xD;&#xA;&#xD;&#xA;* &quot;rewind time&quot; in games like Dirt 2/Grid, or Prince of Persia: Sands of Time&#xD;&#xA;* near-instant retry in games like Canabalt&#xD;&#xA;* quicksaves that are frequent and generous in pretty much most modern games&#xD;&#xA;&#xD;&#xA;I realize this is sort of meta-level on the fun factor, but it does help keep people glued to the game for a longer period of time." />
  <row Id="1333" PostHistoryTypeId="2" PostId="694" RevisionGUID="f92e1706-b0c7-4fcb-bb8f-052c83a7b260" CreationDate="2010-07-17T18:11:49.303" UserId="160" Text="I'm not an expert, but here's some basic stuff:&#xD;&#xA;&#xD;&#xA;**Make sure your strings can handle more than just ASCII**&#xD;&#xA;&#xD;&#xA;You're going to need some spécîål characters that don't fit in ASCII and your string class better not barf on them. UTF-8 is a common encoding because it's space-efficient. Whatever you do, test early and iron out the kinks.&#xD;&#xA;&#xD;&#xA;It's a really good idea to use an actual string class and not just `char *` everywhere or you're going to be in a world of pain.&#xD;&#xA;&#xD;&#xA;Don't forget your fonts. Make sure all of the fonts you're using have the characters you need.&#xD;&#xA;&#xD;&#xA;**Pull your strings out of code**&#xD;&#xA;&#xD;&#xA;This is the most important one. Make sure your text strings are all stored outside of code in some data file you can swap out. Getting a pipeline set up for this can be a chore up front, but will save you a ton of time later. You'll want some simple API so that any time you need a string in code, it's as simple as:&#xD;&#xA;&#xD;&#xA;    String text = Locale::getString(&quot;some unique identifier&quot;);&#xD;&#xA;&#xD;&#xA;**Don't concatenate or build strings in code**&#xD;&#xA;&#xD;&#xA;It's important not to make any assumptions about how a piece of text is built out of smaller words. Even something as innocuous as:&#xD;&#xA;&#xD;&#xA;    String currency = Locale::getCurrencyString() + money.toString();&#xD;&#xA;    // creates $123&#xD;&#xA;&#xD;&#xA;is a problem because other languages may place the currency mark after the number. Instead, use format strings which are themselves localized like:&#xD;&#xA;&#xD;&#xA;    String format = Locale::get(&quot;currency format&quot;); // returns &quot;${0}&quot; in English&#xD;&#xA;    String currency = String::Format(format, money.toString());&#xD;&#xA;&#xD;&#xA;That way, localizers can rearrange words within the format string.&#xD;&#xA;&#xD;&#xA;**Minimize the amount of text that appears in art, especially video**&#xD;&#xA;&#xD;&#xA;Forking art assets is a chore. You'll likely need to do it at least a little for some UI elements, but it's a hassle. Forking FMV is a *huge* pain because now you have to render and store duplicate copies of your FMV.&#xD;&#xA;&#xD;&#xA;**Test in different languages thoroughly**&#xD;&#xA;&#xD;&#xA;In most codebases, it's all too easy to just say `printf(&quot;Hi there&quot;);` or `loadTexture(&quot;someTexture&quot;);` and forget that those need to go through your localization API. Someone will forget and you'll end up with something that's correct in your primary language but wrong in others. The only way to find these is to have your testers test in non-primary languages.&#xD;&#xA;&#xD;&#xA;**Make missing localized text obvious**&#xD;&#xA;&#xD;&#xA;You typically translate your text late in the cycle, so for much of the time, there will just be no data for some languages. That's fine because it lets you iterate on your content without having to constantly retranslate. The downside is it means it's easy for you to miss things and forget to translate some stuff.&#xD;&#xA;&#xD;&#xA;One cheap thing you can do is make missing text show up very obviously like &quot;!!!TRANSLATION NEEDED FOR ID #blah blah!!!&quot; in the game when it's missing.&#xD;&#xA;&#xD;&#xA;**Design your UI around the worst case language**&#xD;&#xA;&#xD;&#xA;Different languages tend to have longer or shorter words. A UI that looks beautiful in English may have text that runs past its boundaries, gets cropped, or wraps incorrectly in a longer language. You'll have to make UI changes to accommodate the worst-case language (or fork your UI, but that's probably *not* what you want to do.)&#xD;&#xA;&#xD;&#xA;Annoyingly, English is often the *shortest* language of the ones typically localized, so your designers are probably inadvertantly designing for the best case. Make them use extra long text for their placeholders when they design. Assume any given piece of text can be about 30% longer than it is in English. Google Translate can be good for getting an approximate piece of text for placeholder.&#xD;&#xA;&#xD;&#xA;**Budget time for translation**&#xD;&#xA;&#xD;&#xA;Translating text usually happens late when the team is tired and doesn't really care. Nonetheless, you'll get a *lot* of bugs when it happens. Words will run past boundaries, translators will make mistakes, etc. To make matters worse, the turnaround time for iterating on text can be long if you have to send text to people overseas and wait for their changes. Allocate time for this work." />
  <row Id="1334" PostHistoryTypeId="2" PostId="695" RevisionGUID="b60fe2cb-ad9b-4460-814b-6452fab06ea0" CreationDate="2010-07-17T18:13:51.220" UserId="202" Text="When You ask this question, You'll surely need to test other types of intersections in the future ;). Therefore I suggest [THE LIST](http://www.realtimerendering.com/intersections.html) about Object/Object intersection.&#xD;&#xA;&#xD;&#xA;The table provides intersections between all popular object types (boxes, spheres, triangles, ...) in static as well as dynamic situations. " />
  <row Id="1337" PostHistoryTypeId="5" PostId="685" RevisionGUID="369f9530-0e32-4768-9b35-6eafafcc3a98" CreationDate="2010-07-17T20:34:52.370" UserId="202" Comment="correction" Text="[Wil Shipley](http://wilshipley.com/blog/2009/10/pimp-my-code-part-17-lost-in.html) has by far the best guide on localization I've ever read. Unfortunately it's iPhone specific, but one can still derive commonly useful information. Further, he addresses the localization of assets and the UI - two of the bigger challenges in game localization I can imagine." />
  <row Id="1338" PostHistoryTypeId="2" PostId="696" RevisionGUID="bb350510-bf06-4a16-b734-f3b0a0afebd5" CreationDate="2010-07-17T21:01:22.213" UserId="348" Text="I would say that, off the top of my head, it is a better idea to use the STL unless you know *exactly* why you don't want to use it.&#xD;&#xA;&#xD;&#xA;Here's the thing about the STL: it is developed by people who are smarter than you are. That's not intended to be offensive or anything, it's just that the STL is developed by people whose work is actually building the STL. It's going to be about as practically fast as the platform can allow and will generally be much more robust than a home-rolled solution (and this should be as much of a concern *if not more* than worrying about raw speed--because your game needs robustness a good bit more than you need speed; the latter is meaningless without the former).&#xD;&#xA;&#xD;&#xA;The complaints that the STL enforces a &quot;narrow view of the world&quot; strike me as a little silly. They're containers. They have a limited set of operations because containers have limited sets of operations. What are you doing that doesn't jibe with this?" />
  <row Id="1339" PostHistoryTypeId="2" PostId="697" RevisionGUID="4a4747c1-9954-4e7c-a8d4-cb8f81a7d341" CreationDate="2010-07-17T21:09:12.787" UserId="160" Text="&gt; What makes Zynga games on Facebook so popular?&#xD;&#xA;&#xD;&#xA;I read an article a while back about Zynga, and the thing that stuck with me is that they approach what they do completely as an empirical science. Their back-end systems are set up to track *tons* of metrics about their games. They know which ones gets played the most, by whom, how frequently, which features get the most play, etc.&#xD;&#xA;&#xD;&#xA;Using that, they are in a constant feedback loop of refining their games to improve the metrics they care about. It's not that they have genius game designers, they just have a well-oiled process for responding to what the players are doing." />
  <row Id="1340" PostHistoryTypeId="2" PostId="698" RevisionGUID="a7192c72-87c0-4908-b52f-d251c27183fb" CreationDate="2010-07-17T21:21:54.427" UserId="31" Text="I was taught Game AI by one of the lead developers at [AiLive][1] (he's in some of the videos), and the short answer is that trying to do these gesture recognitions is just too painful to spend your life on. I'd suggest going the middleware route, and getting AiLive's LiveMove suite.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ailive.net/" />
  <row Id="1341" PostHistoryTypeId="2" PostId="699" RevisionGUID="52c052c8-5266-4af9-a207-6506c5b0ed7d" CreationDate="2010-07-17T21:45:04.367" UserId="348" Text="Short answer: it's not doable.&#xD;&#xA;&#xD;&#xA;I actually looked into this myself a little while ago, searching for a .NET-friendly equivalent to Scaleform (the toolkit that I think you're thinking of, embedding a Flash display as your UI--Unreal uses it). The Silverlight stuff won't work, but if you're willing to do some work to achieve your goal, the Mono Project's implementation, Moonlight, might be the way to go. Moonlight uses Cairo for rendering and there are both OpenGL and DirectX backends for Cairo to emit to, and it seems like wiring up UI events should not be too difficult. The main issue is that Moonlight does not compile on Win32. I looked into it and it was more trouble than I wanted to deal with, but it didn't seem *that* hard.&#xD;&#xA;&#xD;&#xA;(Why Moonlight depends on GLib, I'll never know...)" />
  <row Id="1342" PostHistoryTypeId="2" PostId="700" RevisionGUID="34efde76-2a16-4f54-b740-95f007de5d12" CreationDate="2010-07-17T21:50:32.883" UserId="135" Text="In addition to other suggestions, one thing I've done in the past which helps greatly in finding translated text bleeding out of UI components is to have a special language mode for your game which, when displaying any string, looks at all the languages and picks the longest version of that string. That way, once you've made all the strings fit in that mode, you know that you've fixed all the text bleeds in every language." />
  <row Id="1343" PostHistoryTypeId="2" PostId="701" RevisionGUID="9ca02d51-f6a3-4e3b-98de-81fe3744450e" CreationDate="2010-07-17T22:12:09.360" UserId="89" Text="Posting this question here rather than SO because of it's relevance with game development.&#xD;&#xA;&#xD;&#xA;My dilemma is this: It is currently my summer vacation after my first semester of CompSci and I have learned enough C++ to actually get started in a little more advanced stuff. &#xD;&#xA;&#xD;&#xA;I don't want to start games programming yet until I teach myself linear algebra, trigonometry, etc. However, I do want to know the fundamentals, the theory and the methods used in game programming! &#xD;&#xA;&#xD;&#xA;I thought I had some decent books in the college library, but they were horribly outdated with books on game programming or game engines or game/graphic (topic here) from the early 90s to 2002. &#xD;&#xA;&#xD;&#xA;Knowing the volatile state of computer technology, I figured grabbing knowledge on cutting-edge technology from a decade-old book isn't a good idea. Amazon itself leaves me clueless as to what book I want. &#xD;&#xA;&#xD;&#xA;What I don't want:  A platform-dependent book. I'm not out to learn OpenGL, Direct3D or any specific API. I just want to know things like tesselation, how the GPU handles stuff, what goes on under the hood and what kind of raytracing and radiosity methods there are. The basics, the core concepts- those kinds of things. &#xD;&#xA;&#xD;&#xA;I hope that's clear! Books, resources are all welcome. Though I much prefer a book over a website! " />
  <row Id="1344" PostHistoryTypeId="1" PostId="701" RevisionGUID="9ca02d51-f6a3-4e3b-98de-81fe3744450e" CreationDate="2010-07-17T22:12:09.360" UserId="89" Text="Graphic Engine/Programming/Etc resources?" />
  <row Id="1345" PostHistoryTypeId="3" PostId="701" RevisionGUID="9ca02d51-f6a3-4e3b-98de-81fe3744450e" CreationDate="2010-07-17T22:12:09.360" UserId="89" Text="&lt;books&gt;&lt;resources&gt;" />
  <row Id="1346" PostHistoryTypeId="16" PostId="701" RevisionGUID="9ca02d51-f6a3-4e3b-98de-81fe3744450e" CreationDate="2010-07-17T22:12:09.360" UserId="89" />
  <row Id="1347" PostHistoryTypeId="2" PostId="702" RevisionGUID="93877855-c06c-43d0-8a42-5e81b10a4409" CreationDate="2010-07-17T22:17:09.900" UserId="348" Text="Game development is actually one of those cases where unit testing seems to make some sense to me, because the interactions between discrete systems are so common. Design-by-contract is of course a part of this, and should be planned on from day one of development, but I don't see why it couldn't be implemented later assuming the wherewithal to do so exists.&#xD;&#xA;&#xD;&#xA;The hard part is, of course, integration testing. Lots of a game can be tested just by demo-looping it or something, but that stuff is conceptually fairly easy to debug--where I'd be more interested in spending my time is exposing bugs that will happen when a *player* does something, with the mindset that a bug the player never sees is obviously less important than a bug the player does.&#xD;&#xA;&#xD;&#xA;Which is pretty difficult, obviously. Tactics that work on other applications (fuzzing, expected-pass/expected-fail, etc.) don't work so well here. In scriptable systems it seems like building a test set of scripts to simulate a player are the way to go (see JZig's answer). But testing specifically for stuff a player may encounter directly strikes me as the best place to focus your time for both human and automated testing purposes." />
  <row Id="1348" PostHistoryTypeId="2" PostId="703" RevisionGUID="72125076-7404-4ff0-b7ac-adbb935eedd2" CreationDate="2010-07-17T22:58:53.100" UserId="187" Text="If you're interested in a round-trip tour of everything rendering, &lt;a href=&quot;http://www.amazon.com/Real-Time-Rendering-Tomas-MOller/dp/1568814240?tag=realtimerenderin&quot;&gt;Real-Time Rendering&lt;/a&gt; is your best bet.&#xD;&#xA;&#xD;&#xA;In terms of math, there are several good introductory books, ranging from the more gentle &lt;a href=&quot;http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119/ref=pd_sim_b_1&quot;&gt;3D Math Primer for Graphics and Game Development&lt;/a&gt; to the broader &lt;a href=&quot;http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/ref=pd_sim_b_3&quot;&gt;Mathematics for 3D Game Programming and Computer Graphics&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;I also highly recommend &lt;a href=&quot;http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1279406613&amp;sr=1-1&quot;&gt;Game Engine Architecture&lt;/a&gt; if you're interested in that route; it's not an in-depth book on the matter (nor could it be), but it's a solid foundation across a broad range of topics. For a beginner I would consider it invaluable." />
  <row Id="1349" PostHistoryTypeId="16" PostId="703" RevisionGUID="72125076-7404-4ff0-b7ac-adbb935eedd2" CreationDate="2010-07-17T22:58:53.100" UserId="-1" />
  <row Id="1350" PostHistoryTypeId="2" PostId="704" RevisionGUID="dc89db4d-959a-4989-be13-a231a4970267" CreationDate="2010-07-17T23:04:08.643" UserId="263" Text="These are by no means &quot;exhaustive&quot; for games, but they're good books for computer graphics in particular, so here's a start.&#xD;&#xA;&#xD;&#xA;# Fundamentals of Computer Graphics #&#xD;&#xA;### Peter Shirley, Steve Marschner ###&#xD;&#xA;[Amazon Link][1] (Third edition) | [Book Website][2] (Second Edition)&#xD;&#xA;&#xD;&#xA;![Fundamentals of Computer Graphics][3]&#xD;&#xA;&#xD;&#xA;This book covers a ton of information on many areas of computer graphics. &quot;Online&quot; concepts (like real-time) as well as &quot;offline&quot; (like global illumination) are covered, as well as math, shading, the graphics pipeline, textures, data structures, light and color theory, mesh concepts, etc. It's definitely not geared specifically towards games, but rather computer graphics concepts in general. The book isn't written in any specific programming language, but rather the language of math.&#xD;&#xA;&#xD;&#xA;# Real-Time Rendering #&#xD;&#xA;### Tomas Akenine-Moller, Eric Haines, Naty Hoffman ###&#xD;&#xA;[Amazon Link][4] (Third Edition) | [Book Website][5] (Third Edition)&#xD;&#xA;&#xD;&#xA;![Real-Time Rendering][6]&#xD;&#xA;&#xD;&#xA;This book is geared primarily towards &quot;online&quot; (real-time) graphics methods. It covers the graphics pipeline and related math, shading and texturing, lighting, screen-space effects, NPR, meshes and curves, and some acceleration techniques. The chapter on intersection test methods is worth the cost of the book alone, as it's a fantastic reference for testing collisions between just about any type of bounding volume you'd ever want to use. It discusses shaders, where they fit into the pipeline, and what they can be used for (which is essential knowledge in modern graphics work) but you certainly couldn't learn shader programming in any language from this book. It's a high level overview of real-time techniques, not a programming book. Again, the language used in this book is math.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Fundamentals-Computer-Graphics-Peter-Shirley/dp/1568814690/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279406363&amp;sr=8-1&#xD;&#xA;  [2]: http://www.cs.utah.edu/~shirley/books/fcg2/&#xD;&#xA;  [3]: http://ecx.images-amazon.com/images/I/51x7BeKjsCL._SL500_AA300_.jpg&#xD;&#xA;  [4]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279407344&amp;sr=1-1&#xD;&#xA;  [5]: http://www.realtimerendering.com/&#xD;&#xA;  [6]: http://ecx.images-amazon.com/images/I/51vhrgKipCL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg" />
  <row Id="1351" PostHistoryTypeId="16" PostId="704" RevisionGUID="dc89db4d-959a-4989-be13-a231a4970267" CreationDate="2010-07-17T23:04:08.643" UserId="-1" />
  <row Id="1352" PostHistoryTypeId="5" PostId="704" RevisionGUID="c132af3a-0110-4bc6-afdb-6a60d91b0ad3" CreationDate="2010-07-17T23:11:40.393" UserId="263" Comment="added 1303 characters in body" Text="These are by no means &quot;exhaustive&quot; for games, but they're good books for computer graphics in particular, so here's a start.&#xD;&#xA;&#xD;&#xA;# Fundamentals of Computer Graphics #&#xD;&#xA;### Peter Shirley, Steve Marschner ###&#xD;&#xA;[Amazon Link][1] (Third edition) | [Book Website][2] (Second Edition)&#xD;&#xA;&#xD;&#xA;![Fundamentals of Computer Graphics][3]&#xD;&#xA;&#xD;&#xA;This book covers a ton of information on many areas of computer graphics. &quot;Online&quot; concepts (like real-time) as well as &quot;offline&quot; (like global illumination) are covered, as well as math, shading, the graphics pipeline, textures, data structures, light and color theory, mesh concepts, etc. It's definitely not geared specifically towards games, but rather computer graphics concepts in general. The book isn't written in any specific programming language, but rather the language of math.&#xD;&#xA;&#xD;&#xA;# Real-Time Rendering #&#xD;&#xA;### Tomas Akenine-Moller, Eric Haines, Naty Hoffman ###&#xD;&#xA;[Amazon Link][4] (Third Edition) | [Book Website][5] (Third Edition)&#xD;&#xA;&#xD;&#xA;![Real-Time Rendering][6]&#xD;&#xA;&#xD;&#xA;This book is geared primarily towards &quot;online&quot; (real-time) graphics methods. It covers the graphics pipeline and related math, shading and texturing, lighting, screen-space effects, NPR, meshes and curves, and some acceleration techniques. The chapter on intersection test methods is worth the cost of the book alone, as it's a fantastic reference for testing collisions between just about any type of bounding volume you'd ever want to use. It discusses shaders, where they fit into the pipeline, and what they can be used for (which is essential knowledge in modern graphics work) but you certainly couldn't learn shader programming in any language from this book. It's a high level overview of real-time techniques, not a programming book. Again, the language used in this book is math.&#xD;&#xA;&#xD;&#xA;# Game Engine Architecture #&#xD;&#xA;### Jason Gregory ###&#xD;&#xA;[Amazon Link][7] (First Edition) | [Book Website][8] (First Edition)&#xD;&#xA;&#xD;&#xA;![Game Engine Architecture][9]&#xD;&#xA;&#xD;&#xA;I would add this book to your list if you're interested in graphics specifically as they relate to games. Gregory covers large game engine systems from a 10,000 foot view, occasionally giving you code samples in C++ to illustrate his points, but mostly it's an overview of what the major engine subsystems are, how they work, how they fit together, and what things you should think about when designing/building them. 3D math and a C++ refresher (with a specific focus on game programming) is covered, as well as resource managers, simulation loops, input devices, debugging techniques, rendering and animation engines, collisions and rigid body dynamics, and gameplay systems. The only two major engine subsystems missing from this book are audio and networking, which is honest about leaving out because the book is already pushing over 800 pages. It's a great read, I'd highly recommend it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Fundamentals-Computer-Graphics-Peter-Shirley/dp/1568814690/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279406363&amp;sr=8-1&#xD;&#xA;  [2]: http://www.cs.utah.edu/~shirley/books/fcg2/&#xD;&#xA;  [3]: http://ecx.images-amazon.com/images/I/51x7BeKjsCL._SL500_AA300_.jpg&#xD;&#xA;  [4]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279407344&amp;sr=1-1&#xD;&#xA;  [5]: http://www.realtimerendering.com/&#xD;&#xA;  [6]: http://ecx.images-amazon.com/images/I/51vhrgKipCL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg&#xD;&#xA;  [7]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279407875&amp;sr=1-1-spell&#xD;&#xA;  [8]: http://www.gameenginebook.com/&#xD;&#xA;  [9]: http://www.gameenginebook.com/GregoryFrontCover_New_Thumb.jpg" />
  <row Id="1353" PostHistoryTypeId="5" PostId="682" RevisionGUID="cc1dc841-9b89-4e4c-8678-a64baa2aa7a5" CreationDate="2010-07-17T23:53:03.257" UserId="204" Comment="Added a tip from Zorba" Text=" - Don't have a client inform the server or peer of its own address. In other words, don't embed client A's IP in a game packet and have client B or the server reply to that address. Always reply to the address/port that the message originated from.&#xD;&#xA;&#xD;&#xA; - Minimize the different UDP or TCP ports used for the game. This makes setting up NAT rules easier.&#xD;&#xA;&#xD;&#xA; - Allow the user to override the default port used in the game. This way several servers can be hosted behind the same NAT.&#xD;&#xA; - Document the ports and any rules they follow in your game documentation (thanks for that one Zorba). In Descent 3 I went as far as creating a stand alone test application that would help you troubleshoot your router or NAT configuration by sending packets to a test server." />
  <row Id="1354" PostHistoryTypeId="2" PostId="705" RevisionGUID="c0abea99-d23f-4700-8948-ce62f1919385" CreationDate="2010-07-17T23:57:38.413" UserId="350" Text="I find [SFML.Net][1] to be a great choice, and it is what I personally use. Beware though, do not use the binaries provided on the site, but instead get the latest from the SVN. The site version is highly outdated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/" />
  <row Id="1356" PostHistoryTypeId="5" PostId="676" RevisionGUID="cb28179b-29ed-40fc-9698-d2ebd83a1855" CreationDate="2010-07-18T00:35:04.047" UserId="204" Comment="Added info on platforms and team size" Text="On a first person shooter I worked on (Descent 3 -- linux/mac/windows, ~30 people on the team in 1999), the demo recording/playback capability turned out to be extremely useful. I made an option where you could playback the demo as fast as the game could render frames, and that became a great way to verify performance after a bunch of things changed.&#xD;&#xA;&#xD;&#xA;It also exercised a lot of the code beyond the rendering system, so it was a nice sanity check. After making a bunch of changes I could just run the demo playback of 10 minutes of gameplay. Many times it would catch a bug in an area I wouldn't have thought to check myself." />
  <row Id="1357" PostHistoryTypeId="2" PostId="706" RevisionGUID="26e9749d-8f23-44ba-8a11-36be27cf73e2" CreationDate="2010-07-18T00:41:06.077" UserId="34" Text="I'm asking this to get everyone's opinion -- I realize there isn't one &quot;right way&quot; to do this.  I've tried a few ways myself, including using Cocoa for everything including the game itself (good for simpler games, like card games for example), using Cocoa for the screens outside of the game and using my game engine to present game objects on the screen as UI.&#xD;&#xA;&#xD;&#xA;What do people prefer to use for game UI?  I'm particularly interested in hearing about why you chose to go that way and if you found that your choice was a good one after implementing it." />
  <row Id="1358" PostHistoryTypeId="1" PostId="706" RevisionGUID="26e9749d-8f23-44ba-8a11-36be27cf73e2" CreationDate="2010-07-18T00:41:06.077" UserId="34" Text="What does everyone like to use for UI elements for their games on the iPhone?" />
  <row Id="1359" PostHistoryTypeId="3" PostId="706" RevisionGUID="26e9749d-8f23-44ba-8a11-36be27cf73e2" CreationDate="2010-07-18T00:41:06.077" UserId="34" Text="&lt;subjective&gt;&lt;iphone&gt;&lt;cocoa&gt;" />
  <row Id="1360" PostHistoryTypeId="2" PostId="707" RevisionGUID="44d0e1a2-748f-4f84-b965-5d76dd17e02d" CreationDate="2010-07-18T01:48:13.107" UserId="34" Text="I think this question is really a larger unasked question -- should I use &lt;X&gt; in my &lt;Y&gt;?  And the only way to really answer that is to try it for yourself.  For every person you find that says that X works great, you'll find someone who says it's horrible.  And both of them are right -- for their project.&#xD;&#xA;&#xD;&#xA;The great thing about software, unlike most other disciplines, is that you can always change things later on if you find it's not working the way you would like it.  You find out later that STL isn't working for you in this project?  Rip it out, put something else in it's place.  Don't like how you divided the duties among your objects? Refactor.  Don't like that you used objects?  Replace them with straight C methods.  Don't like everything being stored in structs and methods to manipulate them?  Replace them with C++ objects.&#xD;&#xA;" />
  <row Id="1361" PostHistoryTypeId="6" PostId="268" RevisionGUID="df1c6df7-8cf4-451f-b3de-e75d8b615c30" CreationDate="2010-07-18T01:48:26.990" UserId="34" Comment="edited tags" Text="&lt;subjective&gt;&lt;c++&gt;" />
  <row Id="1362" PostHistoryTypeId="16" PostId="222" RevisionGUID="75be26d4-1b42-432e-ba1e-abdd2de85453" CreationDate="2010-07-18T03:11:20.650" UserId="170" />
  <row Id="1363" PostHistoryTypeId="6" PostId="222" RevisionGUID="75be26d4-1b42-432e-ba1e-abdd2de85453" CreationDate="2010-07-18T03:11:20.650" UserId="170" Comment="edited tags" Text="&lt;subjective&gt;&lt;tutorials&gt;&lt;unity&gt;" />
  <row Id="1364" PostHistoryTypeId="2" PostId="708" RevisionGUID="df50adad-5f7e-477e-ab27-d30b7ee35dc2" CreationDate="2010-07-18T04:00:53.423" UserId="187" Text="We chose to use our own in-game UI for a few reasons, the main one being it enables easy ports to the Android platform (hardware diversity issues aside), as well as windows-based builds (very handy for testing), and it allows a great deal of flexibility in terms of bringing game elements into the UI (for example, our particle system was reused to add a bit of flair to the UI).&#xD;&#xA;&#xD;&#xA;Overall I'm very happy with the decision, though it's not without it's caveats. Namely, UI building is much more expensive than it would have been with IB, and the initial time required to build a usable UI system was considerable." />
  <row Id="1365" PostHistoryTypeId="2" PostId="709" RevisionGUID="a6b9ded2-ba54-4561-ad94-39807833e238" CreationDate="2010-07-18T05:29:19.530" UserId="55" Text="I have taken advantage of what apple has provided with UIKit. My last few projects have abused Core Animation/UIKit instead of OpenGL ES. For my case it worked perfectly well. My next project will use OpenGL ES and I'm not quite sure how I will manage the UI yet. I will likely still abuse UIKit. &#xD;&#xA;&#xD;&#xA;I've seen a few developers use OpenGL ES to push their graphics and actually integrate UIKit into the scene to handle the User Interface. If you're interested in hearing a developer talk about the integration [check out this article he wrote][1]. Great guy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/remixing-opengl-and-uikit" />
  <row Id="1366" PostHistoryTypeId="2" PostId="710" RevisionGUID="a1f4c14e-13b3-4336-a0bf-305349071708" CreationDate="2010-07-18T06:36:21.187" UserId="51" Text="For my last iPhone (Dr. Awesome), all the menus before the game started were in UIKit.  I didn't even create the OpenGL context until the game was started.  In our case, it worked out really well as the menus were created really quickly and with a GUI and didn't require a bunch of game-specific UI code.  It's important to note, though, that the design of our game was such that we didn't need to have menus integrated with game art, and the game itself had no buttons (other than a dialog box for the pause menu).&#xD;&#xA;&#xD;&#xA;In retrospect, doing everything in GL and rolling our own UI system would've allowed for more flexibility and portability.  In our case portability wasn't a concern (and I really wanted to learn/abuse Objective-C), and the cost of adding menu code wasn't really worth the added flexibility.  And we weren't in a position to really need to use the code base after that project to amortize the cost of doing our own UI system (since we've switched to Unity as our iPhone engine)." />
  <row Id="1367" PostHistoryTypeId="2" PostId="711" RevisionGUID="5890faa0-9944-4748-b415-5c8a0fca9138" CreationDate="2010-07-18T07:42:13.790" UserId="119" Text="You should check out Gamefeel by Steve Swink. His thesis is basically that a lot of the fun in a game comes from the way the avatar moves, interacts with the world and &quot;feels&quot;. You should tune speed, acceleration etc to this end. " />
  <row Id="1368" PostHistoryTypeId="2" PostId="712" RevisionGUID="22f27913-30e2-4e7e-b8c7-8d142a161a7a" CreationDate="2010-07-18T08:47:58.703" UserId="97" Text="I've played around in the past of the 2D Flash fan-made version of the popular Valve game Portal.  It has basically the exact same mechanics, but as a 2D side-view flash game.&#xD;&#xA;&#xD;&#xA;Lately I've toyed around with creating a simplified flash version of some of my favorite franchises (such as Zelda, Mario, Splinter Cell, etc.).  Of course, nothing is &quot;stopping&quot; me from just using the same mechanics and just changing the name to something not copyrighted.&#xD;&#xA;&#xD;&#xA;I have witnessed projects that have tried to *directly* port a 3D game into a 2D simplified version, with the exact same plot and puzzles (Ocarina of Time in 2D comes to mind), and I have seen them being shut down.  But I am not likely going to exactly duplicate any game...just borrow some of the source material and basic underlying mechanics.&#xD;&#xA;&#xD;&#xA;For example, if I were to make a Zelda-influenced fan game, I would have items such as the Hookshot, Boomerang, and all other sorts of ones from the Gameboy Zeldas; just with a custom plot and dungeons.  With likely the same mechanics.&#xD;&#xA;&#xD;&#xA;What are the legal issues involved in this?  I used to think it was a &quot;Don't do this ever; it's a bad idea.&quot;&#xD;&#xA;&#xD;&#xA;But then I've seen the Portal clone, and now I'm curious." />
  <row Id="1369" PostHistoryTypeId="1" PostId="712" RevisionGUID="22f27913-30e2-4e7e-b8c7-8d142a161a7a" CreationDate="2010-07-18T08:47:58.703" UserId="97" Text="Legal issues for a &quot;fangame&quot; of a commercial franchise?" />
  <row Id="1370" PostHistoryTypeId="3" PostId="712" RevisionGUID="22f27913-30e2-4e7e-b8c7-8d142a161a7a" CreationDate="2010-07-18T08:47:58.703" UserId="97" Text="&lt;flash&gt;&lt;legal&gt;&lt;commercial&gt;" />
  <row Id="1371" PostHistoryTypeId="2" PostId="713" RevisionGUID="b5e4dd1b-b86a-459e-85ea-5a19c15be4ca" CreationDate="2010-07-18T10:16:31.440" UserId="10" Text="[Have a read of this][1]. Here are some quotes.&#xD;&#xA;&#xD;&#xA;&gt; The original copyright holders have full legal justification to order a cease and desist upon fangame projects, as by definition, fangames are unauthorized infringing uses of copyrighted property.&#xD;&#xA;&#xD;&#xA;&gt; Most companies that don't outwardly promote or challenge fangames have in the past exacted a de facto policy of non-involvement or neutrality, officially stating that their copyrighted material may not be used without permission, but refusing to prosecute fangamers for doing so, in much the same way as fanfiction is tolerated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fangame" />
  <row Id="1372" PostHistoryTypeId="2" PostId="714" RevisionGUID="401f2c0c-7ee3-4f9a-9700-1b82ebe41512" CreationDate="2010-07-18T10:16:57.197" UserId="51" Text="Just because things exist doesn't mean that they aren't violating copyrights or trademarks.  I'd recommend reading up on those two terms first and understanding them fully.&#xD;&#xA;&#xD;&#xA;I'm not a lawyer, but from my understanding the breakdown basically goes like this:&#xD;&#xA;&#xD;&#xA;Brand names, logos, etc. fall under trademarks.  So if you call your fan game Sonic anything you can pretty much expect a cease-and-desist from Sega.  Trademarks are funny things in that companies are practically required to defend them lest they end up &lt;a href=&quot;http://en.wikipedia.org/wiki/Trademark_dilution&quot;&gt;losing them&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Things like individual graphics or other art assets, level design, etc. fall under copyright law.  If you aren't the copyright holder, you don't have legal authority to distribute them without the permission of the copyright holder.  However, things like overarching game design are not.&#xD;&#xA;&#xD;&#xA;Then there are a few patents here and there.  These aren't as common, but do exist.  For example, I think the scoring mechanism in Tony Hawk Pro Skater 2 is patented.  &#xD;&#xA;&#xD;&#xA;There are some things that probably fall under both categories.  I'm pretty sure an image of Mario can be seen as both a trademark of Nintendo, as well as a copyright of them.&#xD;&#xA;&#xD;&#xA;So basically, don't do it.  You can use game mechanics, and you can make &quot;spiritual successors&quot; all day long, but don't use the name of the game or any non-generic names of items used in the game, or any graphics/sounds/levels from the game." />
  <row Id="1373" PostHistoryTypeId="2" PostId="715" RevisionGUID="7d647e45-bcb8-4f44-b8ce-29092dd7ad5a" CreationDate="2010-07-18T10:37:48.770" UserId="7" Text="Fangames (or fanart) are really a gray area in copyright laws since that protects the &quot;work&quot; itself. Here is the dirty secret lawyers don't want you to know; *characters cannot be copyrighted*. Character portrayals can be protected by copyright, since that is actual work, which is what lawsuits specifically on copyright usually hinge on. If you are using someone else's actual art assets then that is a direct violation of copyright.&#xD;&#xA;&#xD;&#xA;As Tetrad [mentioned][1] companies usually send out cease-and-desist on trademark issues. The closest anyone got by fully protecting a character was Disney company who managed to trademark Mickey Mouse's ears. Using trademarked names of the game or game characters is an violation of trademark. The reason is that the trademark is rendered useless if the protected name is used regularly in daily speech or denote something different. This is  why Google's lawyers have been so adamant about sending cease-and-desist letters telling people to stop &quot;google&quot; for stuff.&#xD;&#xA;&#xD;&#xA;As far as I know gameplay mechanics could be patented by software patents (something you can ignore if you're not a US-resident). Patenting gameplay mechanics is ludicrous at this point because the gaming industry hinges on copying mechanics between each other.&#xD;&#xA;&#xD;&#xA;The worst thing that could happen is the offended company sends you a cease-and-desist order, in which your response is to stop working and/or spreading your fan game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/712/legal-issues-for-a-fangame-of-a-commercial-franchise/714#714" />
  <row Id="1374" PostHistoryTypeId="2" PostId="716" RevisionGUID="3832a655-7e5e-4999-b426-9752c79520ee" CreationDate="2010-07-18T10:41:07.110" UserId="241" Text="What properties make the main character of a game such that players can easily identify with it? Can the same set properties be used when designing a NPC characters players interact with, or should different set properties be considered? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="1375" PostHistoryTypeId="1" PostId="716" RevisionGUID="3832a655-7e5e-4999-b426-9752c79520ee" CreationDate="2010-07-18T10:41:07.110" UserId="241" Text="What are the makings of a good Character" />
  <row Id="1376" PostHistoryTypeId="3" PostId="716" RevisionGUID="3832a655-7e5e-4999-b426-9752c79520ee" CreationDate="2010-07-18T10:41:07.110" UserId="241" Text="&lt;game-design&gt;&lt;character&gt;" />
  <row Id="1377" PostHistoryTypeId="2" PostId="717" RevisionGUID="d2915bc5-dfcb-4ba3-9911-ab54b934afe4" CreationDate="2010-07-18T10:41:39.010" UserId="241" Text="When one begins the character design process, what are good starting points? Are there well known methodologies or systems to help in this process? How does the design process work in game industry, and are there big differences between the approaches different game producers use?" />
  <row Id="1378" PostHistoryTypeId="1" PostId="717" RevisionGUID="d2915bc5-dfcb-4ba3-9911-ab54b934afe4" CreationDate="2010-07-18T10:41:39.010" UserId="241" Text="Methods for character design" />
  <row Id="1379" PostHistoryTypeId="3" PostId="717" RevisionGUID="d2915bc5-dfcb-4ba3-9911-ab54b934afe4" CreationDate="2010-07-18T10:41:39.010" UserId="241" Text="&lt;game-design&gt;&lt;character&gt;&lt;methodology&gt;" />
  <row Id="1380" PostHistoryTypeId="2" PostId="718" RevisionGUID="d1df4950-f097-41df-88af-43786402891a" CreationDate="2010-07-18T10:41:57.870" UserId="241" Text="How do a characters designed for a game differ from characters made for books or movies? When a book or a movie is converted into a game, what are the differences and similarities that have to be addressed? Are there pitfalls in character design when jumping between these different medias? " />
  <row Id="1381" PostHistoryTypeId="1" PostId="718" RevisionGUID="d1df4950-f097-41df-88af-43786402891a" CreationDate="2010-07-18T10:41:57.870" UserId="241" Text="Game Characters vs Characters in other medias" />
  <row Id="1382" PostHistoryTypeId="3" PostId="718" RevisionGUID="d1df4950-f097-41df-88af-43786402891a" CreationDate="2010-07-18T10:41:57.870" UserId="241" Text="&lt;game-design&gt;&lt;character&gt;&lt;game&gt;&lt;books&gt;" />
  <row Id="1386" PostHistoryTypeId="6" PostId="712" RevisionGUID="ae20870c-9e00-4b50-a57c-d72f73b1fbff" CreationDate="2010-07-18T11:23:41.233" UserId="323" Comment="edited tags" Text="&lt;legal&gt;&lt;commercial&gt;" />
  <row Id="1387" PostHistoryTypeId="6" PostId="718" RevisionGUID="baf81399-ff0c-469b-8545-38c57de2532e" CreationDate="2010-07-18T11:28:12.317" UserId="323" Comment="edited tags" Text="&lt;game-design&gt;&lt;character&gt;&lt;books&gt;" />
  <row Id="1388" PostHistoryTypeId="2" PostId="720" RevisionGUID="2582d94a-ee57-4a2e-a816-4b0dfb4d32a4" CreationDate="2010-07-18T11:51:12.113" UserId="353" Text="There are a few problems to solve here. The first is how to load and unload tiles. The ContentManager by default will not let you unload specific pieces of content. A custom implementation of this, however, will:&#xD;&#xA;&#xD;&#xA;    public class ExclusiveContentManager : ContentManager&#xD;&#xA;    {&#xD;&#xA;        public ExclusiveContentManager(IServiceProvider serviceProvider,&#xD;&#xA;            string RootDirectory) : base(serviceProvider, RootDirectory)&#xD;&#xA;        {&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        public T LoadContentExclusive&lt;T&gt;(string AssetName)&#xD;&#xA;        {&#xD;&#xA;            return ReadAsset&lt;T&gt;(AssetName, null);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        public void Unload(IDisposable ContentItem)&#xD;&#xA;        {&#xD;&#xA;            ContentItem.Dispose();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The second issue is how to decide which tiles to load and unload. The following would solve this problem:&#xD;&#xA;&#xD;&#xA;    public class Tile&#xD;&#xA;    {&#xD;&#xA;        public int X;&#xD;&#xA;        public int Y;&#xD;&#xA;        public Texture2D Texture;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    int playerTileX;&#xD;&#xA;    int playerTileY;&#xD;&#xA;    int width;&#xD;&#xA;    int height;&#xD;&#xA;    &#xD;&#xA;    ExclusiveContentManager contentEx;&#xD;&#xA;    Tile[,] tiles;&#xD;&#xA;    &#xD;&#xA;    void updateLoadedTiles()&#xD;&#xA;    {&#xD;&#xA;        List&lt;Tile&gt; loaded = new List&lt;Tile&gt;();&#xD;&#xA;    &#xD;&#xA;        // Determine which tiles need to be loaded&#xD;&#xA;        for (int x = playerTileX - 1; x &lt;= playerTileX + 1; x++)&#xD;&#xA;            for (int y = playerTileY - 1; y &lt;= playerTileY; y++)&#xD;&#xA;            {&#xD;&#xA;                if (x &lt; 0 || x &gt; width - 1) continue;&#xD;&#xA;                if (y &lt; 0 || y &gt; height - 1) continue;&#xD;&#xA;    &#xD;&#xA;                loaded.Add(tiles[x, y]);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;        // Load and unload as necessary&#xD;&#xA;        for (int x = 0; x &lt; width; x++)&#xD;&#xA;            for (int y = 0; y &lt; height; y++)&#xD;&#xA;            {&#xD;&#xA;                if (loaded.Contains(tiles[x, y]))&#xD;&#xA;                {&#xD;&#xA;                    if (tiles[x, y].Texture == null)&#xD;&#xA;                        loadTile(x, y);&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    if (tiles[x, y].Texture != null)&#xD;&#xA;                        contentEx.Unload(tiles[x, y].Texture);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void loadTile(int x, int y)&#xD;&#xA;    {&#xD;&#xA;        Texture2D tex = contentEx.LoadEx&lt;Texture2D&gt;(&quot;tile_&quot; + x + &quot;_&quot; + y);&#xD;&#xA;        tiles[x, y].Texture = tex;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The final issue is how to decide when to load and unload. This is probably the easiest part. This could simply be done in the Update() method once the player's screen position was determined:&#xD;&#xA;&#xD;&#xA;    int playerScreenX;&#xD;&#xA;    int playerScreenY;&#xD;&#xA;    int tileWidth;&#xD;&#xA;    int tileHeight;&#xD;&#xA;    &#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        // Code to update player position, etc...&#xD;&#xA;    &#xD;&#xA;        // Load/unload&#xD;&#xA;        int newPlayerTileY = (int)((float)playerScreenX / (float)tileWidth);&#xD;&#xA;        int newPlayerTileX = (int)((float)playerScreenY / (float)tileHeight);&#xD;&#xA;    &#xD;&#xA;        if (newPlayerTileX != playerTileX || newPlayerTileY != playerTileY)&#xD;&#xA;            updateLoadedTiles();&#xD;&#xA;    &#xD;&#xA;        base.Update(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course you would also need to draw the tiles, but given tileWidth, tileHeight, and the Tiles[] array, this should be trivial." />
  <row Id="1389" PostHistoryTypeId="2" PostId="721" RevisionGUID="ed1cf0b6-443c-4587-b282-b9546fa39c79" CreationDate="2010-07-18T12:16:56.450" UserId="142" Text="STL is absolutely fine for use in games, as long as you understand it well. Our engine makes pretty extensive use of it and it hasn't ever been an issue. I don't have any experience with console development, which may be an entirely different story, but it is well supported on all of the PC platforms (Windows/Mac/Linux).&#xD;&#xA;&#xD;&#xA;The most important thing is to understand what the strengths and weaknesses of each container type are and pick the correct container for the job you are doing." />
  <row Id="1390" PostHistoryTypeId="2" PostId="722" RevisionGUID="aaa427c4-2a31-41ed-b3dc-4cb545501f4c" CreationDate="2010-07-18T12:31:36.213" UserId="10" Text="You should always have an element that people can relate with. Take for example Fry from Futurama. His main purpose is to be the connection from the 20th century to the 30th century, and without him the viewer would not make much sense from the show.&#xD;&#xA;&#xD;&#xA;This same mentality should be used with game characters, since they often live in environments that do not exist in reality.&#xD;&#xA;&#xD;&#xA;Another example is with Mario. He is italian, a plumber and wears human like clothing. He is the only human element you see in the Super Mario world, and therefor we connect with him very well." />
  <row Id="1391" PostHistoryTypeId="2" PostId="723" RevisionGUID="44515a70-6a25-4abf-96df-843ceaf85501" CreationDate="2010-07-18T12:34:35.770" UserId="142" Text="[Irrational Behavior][1] - Developers at Irrational Games discussing various aspects of development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://irrationalgames.com/insider/irrational-behavior/introducing-irrational-behavior/" />
  <row Id="1392" PostHistoryTypeId="16" PostId="723" RevisionGUID="44515a70-6a25-4abf-96df-843ceaf85501" CreationDate="2010-07-18T12:34:35.770" UserId="-1" />
  <row Id="1393" PostHistoryTypeId="2" PostId="724" RevisionGUID="a6b52ff0-7f5c-453a-9ca3-f93fd857f1a3" CreationDate="2010-07-18T13:37:24.463" UserId="346" Text="&lt;b&gt;AC3D&lt;/b&gt; - &lt;a href=&quot;http://www.inivis.com/&quot;&gt;www.inivis.com&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Assets: 3D&#xD;&#xA;&#xD;&#xA;OS: Windows, Mac OSX &amp; PPC, Linux&#xD;&#xA;&#xD;&#xA;Cost: $79.95 ($20 to add 2nd PC, site/network volume license available)&#xD;&#xA;&#xD;&#xA;License: n/a&#xD;&#xA;&#xD;&#xA;Summary: &#xD;&#xA;&#xD;&#xA; - Drag &amp; drop to move and resize models&#xD;&#xA; - Create smooth shapes from simple underlying models&#xD;&#xA; - Unwrap and map images with texture coordinate editor&#xD;&#xA; - 2D/3D text from TrueType fonts for logos, labeling, dimensions, etc.&#xD;&#xA; - Boolean operations to cut, interset, and join shapes&#xD;&#xA; - As many views as you want&#xD;&#xA; - Spin, fly, and walk-around navigation during creation&#xD;&#xA; - Wrap and bridge non-similar objects&#xD;&#xA; - Polygon reduction to reduce polygon count while retaining shape&#xD;&#xA; - Grab window image to paste into another program&#xD;&#xA; - Name each object and attach text strings&#xD;&#xA; - Grouping objects into hierarchy&#xD;&#xA; - Huge range of output/input formats&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.inivis.com/features.html&quot;&gt;More&lt;/a&gt;" />
  <row Id="1394" PostHistoryTypeId="16" PostId="724" RevisionGUID="a6b52ff0-7f5c-453a-9ca3-f93fd857f1a3" CreationDate="2010-07-18T13:37:24.463" UserId="-1" />
  <row Id="1395" PostHistoryTypeId="2" PostId="725" RevisionGUID="8c9fee29-8bd8-4101-b3ff-d801368d1b71" CreationDate="2010-07-18T13:54:08.340" UserId="274" Text="Try to avoid scattering `#if defined(_FOO_) ... #elif defined(_BAR_) ... #else ... #endif` all over the code. &#xD;&#xA;&#xD;&#xA;Sometimes it looks like the it's the easier way, but it will give you troubles in the long run. You should try to limit them to their own file, so that every platform implementation is self contained.&#xD;&#xA;&#xD;&#xA;Adding a platform should be mostly about adding new implementation files, and just modify the few needed existing ones." />
  <row Id="1396" PostHistoryTypeId="11" PostId="631" RevisionGUID="d5a2747e-f699-40ff-acf4-3ac9fc08b931" CreationDate="2010-07-18T14:19:03.647" UserId="-1" Text="[{&quot;Id&quot;:55,&quot;DisplayName&quot;:&quot;David McGraw&quot;},{&quot;Id&quot;:288,&quot;DisplayName&quot;:&quot;Andrew Russell&quot;},{&quot;Id&quot;:43,&quot;DisplayName&quot;:&quot;Fire&quot;},{&quot;Id&quot;:321,&quot;DisplayName&quot;:&quot;Smashery&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;}]" />
  <row Id="1397" PostHistoryTypeId="2" PostId="726" RevisionGUID="09fc162b-bb90-4ecd-8f72-266be154c725" CreationDate="2010-07-18T14:48:45.557" UserId="8" Text="**Acorn**&#xD;&#xA;&#xD;&#xA;[http://flyingmeat.com/acorn/](http://flyingmeat.com/acorn/)&#xD;&#xA;&#xD;&#xA;2D Graphics&#xD;&#xA;&#xD;&#xA;Mac OS X&#xD;&#xA;&#xD;&#xA;Free / $49.95 for advanced features&#xD;&#xA;&#xD;&#xA;&quot;The image editor for humans.&quot; Pretty simple, but powerful enough for many normal image tasks. Pay features include: Bézier Curve tool, Layered Screen Shots (really nice), Clone Tool, Levels, plugins, and more." />
  <row Id="1398" PostHistoryTypeId="16" PostId="726" RevisionGUID="09fc162b-bb90-4ecd-8f72-266be154c725" CreationDate="2010-07-18T14:48:45.557" UserId="-1" />
  <row Id="1399" PostHistoryTypeId="2" PostId="727" RevisionGUID="9c18dd38-ee2f-4bd1-9d99-9bcda69a152f" CreationDate="2010-07-18T14:50:34.833" UserId="272" Text="One good read that has stayed with me for a long time is [Richard Bartle][1]'s [Hearts, Clubs, Diamonds, Spades: Players Who Suit MUDs][2].&#xD;&#xA;&#xD;&#xA;When designing for &quot;fun&quot;, I always tend to envision some distinct playing styles that I want to cater to.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Richard_Bartle&#xD;&#xA;  [2]: http://www.mud.co.uk/richard/hcds.htm " />
  <row Id="1400" PostHistoryTypeId="2" PostId="728" RevisionGUID="1894ce1c-a2ec-493d-ae27-f9b339266a26" CreationDate="2010-07-18T14:56:19.813" UserId="73" Text="I'm developing a little simon-like game and I'd like to know what the best approach is when it comes down to game states.&#xD;&#xA;&#xD;&#xA;What would be the best approach?&#xD;&#xA;&#xD;&#xA;- Creating different states/screens for 1-player and 2-player game sessions.&#xD;&#xA;- Creating just one state/screen with validation from a variable that holds the selection made by the player on the title screen.&#xD;&#xA;&#xD;&#xA;This is the sketch I've made so far:&#xD;&#xA;&#xD;&#xA;![alt text][1] &#xD;&#xA;&#xD;&#xA; 1. Title screen (here you select single player or 2 players).&#xD;&#xA; 2. Instructions screen.&#xD;&#xA; 3. Main game screen.&#xD;&#xA; 4. Credits screen.&#xD;&#xA; 5. Demo screen (an automatic version of main game with the words &quot;DEMO MODE&quot;).&#xD;&#xA; 6. Program termination.&#xD;&#xA;&#xD;&#xA;  [1]: http://img829.imageshack.us/img829/6974/gamestatesflowgraph.png" />
  <row Id="1401" PostHistoryTypeId="1" PostId="728" RevisionGUID="1894ce1c-a2ec-493d-ae27-f9b339266a26" CreationDate="2010-07-18T14:56:19.813" UserId="73" Text="How to handle game states for a 1/2-player game?" />
  <row Id="1402" PostHistoryTypeId="3" PostId="728" RevisionGUID="1894ce1c-a2ec-493d-ae27-f9b339266a26" CreationDate="2010-07-18T14:56:19.813" UserId="73" Text="&lt;game-design&gt;&lt;best-practices&gt;&lt;programming&gt;" />
  <row Id="1403" PostHistoryTypeId="2" PostId="729" RevisionGUID="f39606ed-a18f-4375-bd89-4bffe41590ff" CreationDate="2010-07-18T15:05:42.177" UserId="353" Text="Generally the game is only &quot;multiplayer&quot; when the game is in the actual gameplay mode--ie state 3. It is fairly common to just allow one player to &quot;drive&quot; in all other states. This is why you are often asked to &quot;Press [button] to continue&quot;: to determine which controller/player is &quot;driving&quot;. Then, when the main gameplay state is reached, the screen is split based on how many controller or players are actually connected." />
  <row Id="1404" PostHistoryTypeId="2" PostId="730" RevisionGUID="1130455f-a025-404b-8e9a-7511708a9566" CreationDate="2010-07-18T15:26:14.217" UserId="353" Text="One of the major differences is that it is much more critical for a player to develop the attitude towards your character that you want them to. For example, if you are developing a character that will be accompanying the player for an entire level, or the entirety of the game, then it is important that the player like the character. If your character manages to get the player to dislike them, then the game will note be much fun.&#xD;&#xA;&#xD;&#xA;This was discussed in the developer commentary for Half Life 2 Episode One. There is a character that accompanies the player for the entirety of the game, and it took several revisions before the player actually learned to like that character. In previous revisions the player would come to find the other character annoying, which made the game experience not very fun.&#xD;&#xA;&#xD;&#xA;A second note is that characters in videogames (or movies) must be much more expressive. While in a book you often get a chance to go inside a character's head, this is not as much of an option in a game. Your characters must explicitly say what they are thinking or feeling or you risk the player not getting the information you want them to." />
  <row Id="1405" PostHistoryTypeId="5" PostId="587" RevisionGUID="cdc45358-4213-4abf-b47e-56e105dd5910" CreationDate="2010-07-18T15:27:08.337" UserId="323" Comment="added 24 characters in body" Text="(C-ish pseudocode - adapt language optimizations as appropriate)&#xD;&#xA;&#xD;&#xA;    bool DoBoxesIntersect(Box a, Box b) {&#xD;&#xA;      return (abs(a.x - b.x) * 2 &lt; (a.width + b.width)) &amp;&amp;&#xD;&#xA;             (abs(a.y - b.y) * 2 &lt; (a.height + b.height));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In English: On each axis, check to see if the centers of the boxes are close enough that they'll intersect. If they intersect on both axes, then the boxes intersect. If they don't, then they don't.&#xD;&#xA;&#xD;&#xA;You can change the &lt;'s to &lt;= if you want to count edge-touching as intersecting. If you want a specific edge-touch-only formula, you can't use == - that will tell you if the corners touch, not if the edges touch. You'd want to do something logically equivalent to `return DoBoxesIntersectOrTouch(a, b) &amp;&amp; !DoBoxesIntersect(a, b)`." />
  <row Id="1406" PostHistoryTypeId="2" PostId="731" RevisionGUID="e3534f68-9d82-4e4d-a869-0fce168b042c" CreationDate="2010-07-18T15:30:49.757" UserId="274" Text="When creating a system abstraction is better to have the platform different APIs hidden by a common interface at the lowest level that makes sense.&#xD;&#xA;&#xD;&#xA;Taking in account the different modern (with no fixed function pipeline) native graphics APIs: OpenGLES 2.0+, OpengGL 3.0+, DirectX 10.0+, Xbox DirectX 9, LibGCM&#xD;&#xA;&#xD;&#xA;If one was to create a _stateless low_ level graphic API to sit on top of them all, what would be the best way to go to make it as thin and as fast as possible?&#xD;&#xA;" />
  <row Id="1407" PostHistoryTypeId="1" PostId="731" RevisionGUID="e3534f68-9d82-4e4d-a869-0fce168b042c" CreationDate="2010-07-18T15:30:49.757" UserId="274" Text="Cross platform low level graphic API" />
  <row Id="1408" PostHistoryTypeId="3" PostId="731" RevisionGUID="e3534f68-9d82-4e4d-a869-0fce168b042c" CreationDate="2010-07-18T15:30:49.757" UserId="274" Text="&lt;graphics&gt;&lt;best-practices&gt;&lt;architecture&gt;&lt;programming&gt;&lt;cross-platform&gt;" />
  <row Id="1409" PostHistoryTypeId="2" PostId="732" RevisionGUID="048bed32-b469-403b-aed2-8c7655f494e7" CreationDate="2010-07-18T16:48:14.447" UserId="127" Text="I see a lot of games in &quot;pre-production&quot; and was just wondering what actually happens in this stage. Is it just planning or does a prototype get made or what?" />
  <row Id="1410" PostHistoryTypeId="1" PostId="732" RevisionGUID="048bed32-b469-403b-aed2-8c7655f494e7" CreationDate="2010-07-18T16:48:14.447" UserId="127" Text="What happens in pre production of a game?" />
  <row Id="1411" PostHistoryTypeId="3" PostId="732" RevisionGUID="048bed32-b469-403b-aed2-8c7655f494e7" CreationDate="2010-07-18T16:48:14.447" UserId="127" Text="&lt;pre&gt;&lt;production&gt;&lt;planning&gt;" />
  <row Id="1412" PostHistoryTypeId="2" PostId="733" RevisionGUID="1f688064-4f3c-4308-80e5-20e360ece1c8" CreationDate="2010-07-18T17:34:56.243" UserId="301" Text="Pre-production is the stage where design documents are written, a production plan is created and often a review of the technology to be used. A proof of concept is also common.&#xD;&#xA;&#xD;&#xA;Basically, getting the ideas down on paper, with the most general version of the concept sorted out." />
  <row Id="1413" PostHistoryTypeId="5" PostId="659" RevisionGUID="02c3a186-5d4b-4daa-94e2-aee26803b391" CreationDate="2010-07-18T17:35:43.450" UserId="55" Comment="spelling" Text="I have seen a couple of things in the past where I have seen a crowd majority buck their heads. One really sticks out in my mind:&#xD;&#xA;&#xD;&#xA;**Little Challenge**  &#xD;&#xA;In a prior project, I leaned against the word 'casual' a little too much. I imagined people picking up this game and simply solving a simple feat and moving on. I didn't integrate any kind of losing mechanism per say, but left that for the player to determine. A 'did the player meet his/her expectation' type of situation. &#xD;&#xA;&#xD;&#xA;Judging from the feedback I received I see not giving a clear losing mechanism a mistake and a missed opportunity. It seemed that those players who wanted a way to lose actually enjoy knowing they've lost.&#xD;&#xA;&#xD;&#xA;I guess that may sound obvious, but I wasn't quite thinking about it that way.&#xD;&#xA;&#xD;&#xA;**Reward a Player**  &#xD;&#xA;By nature humans are always trying to achieve that next best thing. I think there are some instincts at play there. At a young age our mind was a buzz when we got a new toy, for example.&#xD;&#xA;&#xD;&#xA;So in a game I imagine that a player who is given something along the way will improve the fun-factor. I assume this is exactly what Achievements are targeting - a direct reward." />
  <row Id="1414" PostHistoryTypeId="2" PostId="734" RevisionGUID="f9929d78-7980-4aa3-b875-19d1a1985caf" CreationDate="2010-07-18T17:36:40.860" UserId="137" Text="It depends from project to project and from company to company. Typically &quot;production&quot; starts when the main work begins on what you could call the &quot;construction&quot; phase of the project, usually when the main coding work begins.&#xD;&#xA;&#xD;&#xA;In the pre-production phase the groundwork for the project is being laid.&#xD;&#xA;&#xD;&#xA;The core team of designers will be setting out the overall design goals, agreeing on an art style and discussing general technical requirements with the code team (say, deciding that destructible scenery is *needed* as supposed to wanted).&#xD;&#xA;&#xD;&#xA;They will probably be creating design documents for the overall design, and possibly beginning  some detailed design of the very early stages of the game, or more likely, the first parts to be implemented for the VSD.&#xD;&#xA;&#xD;&#xA;Art may be producing some concept art for themes from the design and gathering some source material as reference.&#xD;&#xA;&#xD;&#xA;Code may well be working on existing engine tech, or producing some prototype elements to test feasibility of some required components before the main work begins." />
  <row Id="1415" PostHistoryTypeId="2" PostId="735" RevisionGUID="3367ee2a-1a4b-44ff-9b8b-fb5ca1ae82c5" CreationDate="2010-07-18T18:38:31.063" UserId="119" Text="[Another Castle][1] - Professionals talk game design.&#xD;&#xA;&#xD;&#xA;[Game Developers Radio][2] - Great guests, a different game or development platform discussed each week.&#xD;&#xA;&#xD;&#xA;[Brainy Gamer][3] - Game design from designer, journalist, academic and player perspectives.&#xD;&#xA;&#xD;&#xA;[DigiPen][4] - Professionals and educators talk games.&#xD;&#xA;&#xD;&#xA;[IndieGamePod][5] Interviews with developers about their games.&#xD;&#xA;&#xD;&#xA;[A life well wasted][6] Arty, philosophical trip around gaming culture.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedesignadvance.com/?page_id=1616&#xD;&#xA;  [2]: http://www.gamedevradio.net/&#xD;&#xA;  [3]: http://www.brainygamer.com/the_brainy_gamer/podcast/&#xD;&#xA;  [4]: https://www.digipen.edu/news-and-events/podclass-the-digipen-podcast/&#xD;&#xA;  [5]: http://www.indiegamepod.com/&#xD;&#xA;  [6]: http://alifewellwasted.com/" />
  <row Id="1416" PostHistoryTypeId="16" PostId="735" RevisionGUID="3367ee2a-1a4b-44ff-9b8b-fb5ca1ae82c5" CreationDate="2010-07-18T18:38:31.063" UserId="-1" />
  <row Id="1417" PostHistoryTypeId="2" PostId="736" RevisionGUID="fbb0852f-a1fe-40cb-9b70-bb1848b8cd93" CreationDate="2010-07-18T18:41:43.150" UserId="119" Text="You want your 1 player and 2 player game to be the same class with a 1/2 player toggle. Otherwise your code base is going to be unnecessarily forked." />
  <row Id="1418" PostHistoryTypeId="2" PostId="737" RevisionGUID="21301370-e4ce-4b36-97c3-a708e20d95fe" CreationDate="2010-07-18T18:53:50.083" UserId="119" Text="Some random things I remember reading and have worked for me:&#xD;&#xA;&#xD;&#xA; - a character should be recognisable from just their silhouette.&#xD;&#xA;&#xD;&#xA; - Each character in a group should have their own colour scheme.&#xD;&#xA;&#xD;&#xA; - Simply-drawn characters are more easy for the player to relate to, because they are less specifically one person, and more of a vessel for the player/reader/viewer to project themselves onto.&#xD;&#xA;&#xD;&#xA; - For the same reason as above, characters shouldn't say much - that's the Gordon Freeman effect. Most game characters don't talk, and when they do talk, on spin-off cartoons etc (e.g. Sonic), it's annoying.&#xD;&#xA;&#xD;&#xA; - In games you can express a lot about the character from the way they move and interact with the environment.&#xD;&#xA;&#xD;&#xA; - For unique costumes, raid the history books for crazy armour, uniforms, hats and dresses, and adapt to fit your setting.&#xD;&#xA;&#xD;&#xA; - Don't use anything that is too reminiscent of another famous character, e.g. blue spiky hair, red overalls etc" />
  <row Id="1419" PostHistoryTypeId="5" PostId="631" RevisionGUID="81fddb1f-6cab-4336-9a8c-1f41c39eb62f" CreationDate="2010-07-18T18:56:39.763" UserId="328" Comment="added 87 characters in body; edited title; added 2 characters in body" Text="How much &quot;harder&quot; is 3D than 2D in terms of:&#xD;&#xA;&#xD;&#xA; * Amount/complexity of the code&#xD;&#xA; * Level of math skills required&#xD;&#xA; * Time involved in making art assets&#xD;&#xA;&#xD;&#xA;*Original title: How hard is 3D game development versus 2D?*" />
  <row Id="1420" PostHistoryTypeId="4" PostId="631" RevisionGUID="81fddb1f-6cab-4336-9a8c-1f41c39eb62f" CreationDate="2010-07-18T18:56:39.763" UserId="328" Comment="added 87 characters in body; edited title; added 2 characters in body" Text="What to consider when deciding on 2D vs 3D for a game?" />
  <row Id="1421" PostHistoryTypeId="2" PostId="738" RevisionGUID="fb86f3a4-0171-4aaa-b920-56df94cafbe8" CreationDate="2010-07-18T19:27:21.273" UserId="33" Text="I cannot imagine creating a wrapper for both OpenGL and DirectX, having such different philosophies of creation (DirectX is Windows-only, while OpenGL strives for cross-platform-ness).&#xD;&#xA;&#xD;&#xA;You might want to check out the [SDL library][1] or [Allegro][2]. Both of them are low level, highly-portable game libraries, which have a way to plug them in an OpenGL context so you can render your graphics there. SDL has the fame of being used by he defunct Loki Games to port some popular games from the 2000s to Linux, and Allegro has a lot of time running on and has a great community of amateur game developers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://libsdl.org&#xD;&#xA;  [2]: http://alleg.sourceforge.net/" />
  <row Id="1422" PostHistoryTypeId="2" PostId="739" RevisionGUID="086cc75a-372b-4f23-a784-087e3a925381" CreationDate="2010-07-18T20:21:29.240" UserId="353" Text="To start with, each API does things differently so it should go without saying that wrapping all of the above APIs would be difficult. That said, it is sometimes necessary to do so: at some point a game simply needs to run on more than one platform regardless of how hard it is to do so.&#xD;&#xA;&#xD;&#xA;I think the best way to go about doing this is to come up with the functionality that can be implemented on all of the underlying API's and abstract that and only that. If you are developing a multiplatform game, you wouldn't implement every obscure piece of functionality that each API supports, you would only implement what you need. This also helps to keep the API small and fast.&#xD;&#xA;&#xD;&#xA;To avoid the clutter of each different API's implementation being packed into the output, compiling should be done with platform neutral header files and platform specific code files. Then, the code file specific to the target platform would be the only one compiled keeping the API small." />
  <row Id="1423" PostHistoryTypeId="2" PostId="740" RevisionGUID="f7c48f26-a901-43fe-82b2-ec64918b39dc" CreationDate="2010-07-18T21:09:42.977" UserId="187" Text="Given the broad range of APIs you wish to cover, the typical wrapping approach is likely to be inefficient and prone to difficulty in mapping API concepts across several other APIs which may or may not support particular functions to varying degrees.&#xD;&#xA;&#xD;&#xA;As a result, the most sensible approach would be to create a **feature-centric** API. While this approach prevents the API user from utilizing all available functionality, it greatly simplifies the implementation of each backend, and enables backend-specific optimizations that would not otherwise be possible. &#xD;&#xA;&#xD;&#xA;It also greatly simplifies management of unsupported functionality for the API user; they no longer have to check if function X exists, and determine which features are affected, but instead need only query the feature itself to see if it is supported with the current configuration. Even if you support partial or limited modes for features, the context provided makes it much easier to manage." />
  <row Id="1424" PostHistoryTypeId="6" PostId="381" RevisionGUID="6576cb5d-3b35-47a0-bfc5-cfd0bb18aa1a" CreationDate="2010-07-18T22:22:40.497" UserId="43" Comment="edited tags" Text="&lt;cross-platform&gt;&lt;framework&gt;" />
  <row Id="1427" PostHistoryTypeId="2" PostId="741" RevisionGUID="2832b7d3-91ba-453f-98b8-a8dadf53525b" CreationDate="2010-07-18T22:47:55.207" UserId="165" Text="**[GameMaker][1]** looks like a good introductory game-prototyping or building tool. It is based on drag-and-drop &quot;without the need to write a single line of code&quot;, so looks to be aimed at beginners. (I've never used it, just happened across it - but their website certainly looks slick. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com/gamemaker/" />
  <row Id="1428" PostHistoryTypeId="2" PostId="742" RevisionGUID="62d6f2e3-cda8-43ce-a7b4-9e3e97ad4f6e" CreationDate="2010-07-18T22:54:24.577" UserId="302" Text="**Ogmo Editor**&#xD;&#xA;&#xD;&#xA;http://ogmoeditor.com/&#xD;&#xA;&#xD;&#xA;2D tile map editor.&#xD;&#xA;&#xD;&#xA;Runs on Adobe AIR.&#xD;&#xA;&#xD;&#xA;Freeware / Donationware&#xD;&#xA;&#xD;&#xA;The author asks for a donation if you profit from using it.&#xD;&#xA;&#xD;&#xA;2D tile map editor with an XML-based project setup. You define your tilesets, layers and grid sizes in XML. This way all the maps you create for a particular project will have a common internal structure and same tilesets. Also supports separate object layers for added flexibility." />
  <row Id="1429" PostHistoryTypeId="16" PostId="742" RevisionGUID="62d6f2e3-cda8-43ce-a7b4-9e3e97ad4f6e" CreationDate="2010-07-18T22:54:24.577" UserId="-1" />
  <row Id="1430" PostHistoryTypeId="2" PostId="743" RevisionGUID="706ea47b-4e36-4474-8b8f-3f4e4c8fe2cb" CreationDate="2010-07-18T23:02:37.917" UserId="302" Text="**Allegro Sprite Editor**&#xD;&#xA;&#xD;&#xA;http://www.aseprite.org/&#xD;&#xA;&#xD;&#xA;2D pixel art and animation&#xD;&#xA;&#xD;&#xA;Windows, Mac OS X, Linux&#xD;&#xA;&#xD;&#xA;Open Source&#xD;&#xA;&#xD;&#xA;GNU GPLv2&#xD;&#xA;&#xD;&#xA;Supports layers, animation, various effects using convolution matrices, onion skinning, alpha channel, paletted and truecolor images." />
  <row Id="1431" PostHistoryTypeId="16" PostId="743" RevisionGUID="706ea47b-4e36-4474-8b8f-3f4e4c8fe2cb" CreationDate="2010-07-18T23:02:37.917" UserId="-1" />
  <row Id="1432" PostHistoryTypeId="2" PostId="744" RevisionGUID="207e8de4-a8e9-4350-a84f-cc785164aa09" CreationDate="2010-07-18T23:07:19.530" UserId="302" Text="**Tiled**&#xD;&#xA;&#xD;&#xA;http://mapeditor.org/&#xD;&#xA;&#xD;&#xA;2D tile map editor&#xD;&#xA;&#xD;&#xA;Windows, Mac OS X, Linux&#xD;&#xA;&#xD;&#xA;Open source, GNU GPLv2&#xD;&#xA;&#xD;&#xA;General purpose 2D tile map editor. Supports orthogonal and isometric maps, pixel-perfect object placement, layers, undo/redo, multi-tile &quot;stamps&quot;." />
  <row Id="1433" PostHistoryTypeId="16" PostId="744" RevisionGUID="207e8de4-a8e9-4350-a84f-cc785164aa09" CreationDate="2010-07-18T23:07:19.530" UserId="-1" />
  <row Id="1434" PostHistoryTypeId="2" PostId="745" RevisionGUID="54c182f8-d217-4638-9416-fe6fbd38e9b5" CreationDate="2010-07-18T23:24:03.823" UserId="213" Text="I saw it mentioned on [this question][1], but no one explained what it is.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9/whats-the-newest-trend-method-for-terrain-rendering" />
  <row Id="1435" PostHistoryTypeId="1" PostId="745" RevisionGUID="54c182f8-d217-4638-9416-fe6fbd38e9b5" CreationDate="2010-07-18T23:24:03.823" UserId="213" Text="What is &quot;ROAM&quot; related to terrain rendering?" />
  <row Id="1436" PostHistoryTypeId="3" PostId="745" RevisionGUID="54c182f8-d217-4638-9416-fe6fbd38e9b5" CreationDate="2010-07-18T23:24:03.823" UserId="213" Text="&lt;terrain-rendering&gt;" />
  <row Id="1437" PostHistoryTypeId="5" PostId="483" RevisionGUID="c05afdbb-8b5b-490a-88b0-925ecf4d5312" CreationDate="2010-07-18T23:33:15.680" UserId="297" Comment="added 39 characters in body" Text="# [Perforce][1]&#xD;&#xA;&#xD;&#xA;Perforce (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. Open-source projects may be eligible for a free license (minus the technical support).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;Comment by xan: It is worth noting however that their merge tool, P4Merge (used for diffing and merging) is excellent and far superior to the likes of Tortoise Merge. Surprisingly, this component is available for free as part of the P4 Visual Tools package.&#xD;&#xA;&#xD;&#xA;Comment by slicedlime: Another drawback with Perforce is that branching in it tends to be a huge pain, especially if you have large trees. Almost every other vcs is better at branching and merging. This is usually a small price to pay for the above advantages though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="1438" PostHistoryTypeId="2" PostId="746" RevisionGUID="ef42e093-a29d-4543-bd0a-b198bbf595a0" CreationDate="2010-07-18T23:37:42.910" UserId="353" Text="ROAM stands for &quot;Real-time Optimally Adapting Meshes.&quot; It is a level of detail algorithm for rendering large terrains. It's somewhat complicated so I'll link to some more in depth explanations:&#xD;&#xA;&#xD;&#xA;Here is the paper: https://graphics.llnl.gov/ROAM/roam.pdf&#xD;&#xA;&#xD;&#xA;The following is a slightly less academic explanation: http://www.yaldex.com/game-programming/0131020099_ch14lev1sec4.html" />
  <row Id="1439" PostHistoryTypeId="2" PostId="747" RevisionGUID="c9c3c34d-d952-4dce-9b17-e9ee0d592855" CreationDate="2010-07-19T00:08:01.430" UserId="356" Text="You could try the [Angel Engine][1]. It's based on C++, OpenGL, Box2D, and it uses Python for scripting. It's mostly for prototyping, but the recent versions seem to focus on making full games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/" />
  <row Id="1446" PostHistoryTypeId="5" PostId="637" RevisionGUID="3c0b3102-8d41-4586-a8f8-7b1d539b9041" CreationDate="2010-07-19T02:53:12.970" UserId="160" Comment="added 21 characters in body" Text="3D is an order of magnitude harder than 2D:&#xD;&#xA;&#xD;&#xA;**Programming:**&#xD;&#xA;&#xD;&#xA;* **The math is significantly more complex** for rendering, physics, collision, etc. Hope you like matrices and vectors!&#xD;&#xA;* Because of the previous point, **good performance is much more difficult to attain**. With today's hardware, you can make a nice-looking 2D game without having to think about performance at all beyond not being actively stupid. With 3D, you will have to do some optimization.&#xD;&#xA;* **The data structures are much more complex.** Because of the previous point, you'll need to think about culling, space partitioning, etc. all of which are more challenging then a simple &quot;here's a list of everything in the level&quot;.&#xD;&#xA;* **Animation is much more complicated.** Animation in 2D is just a filmstrip of frames with possibly different positions for each frame. With 3D, you'll need to deal with separate animation assets, bones, skinning, etc.&#xD;&#xA;* **The volume of data is much higher.** You'll have to do intelligent resource management. Games ship with gigs of content, but consoles sure as hell don't have gigs of memory.&#xD;&#xA;* **The pipelines are more complex to develop and maintain.** You'll need code to get assets into your engine's preferred format. That code doesn't write itself.&#xD;&#xA;&#xD;&#xA;**Art:**&#xD;&#xA;&#xD;&#xA;* **The assets are, of course, much more complex.** You'll need textures, models, rigs/skeletons, animation, etc. The tools are much more complex and expensive, and the skills to use them harder to find.&#xD;&#xA;* **The set of skills needed is wider.** Good animators aren't often good texture artists. Good lighters may not be good riggers.&#xD;&#xA;* **The dependencies between the assets are more complex.** With 2D, you can partition your assets across different artists cleanly: this guy does level one, this guy does enemies, etc. With 3D, the animation affects the rig which affects the skeleton which affects the model which affects the textures which affect the lighting... Your art team with have to coordinate carefully and constantly.&#xD;&#xA;* **The technical limitations are more complex to deal with.** With 2D it's basically &quot;here's your palette and your max sprite size&quot;. With 3D, your artists will have to balance texture size (for multiple textures: specular, color, normal, etc.), polygon count, keyframe count, bone count, etc. The particulars of the engine will place random weird requirements on them (&quot;Engine X blows up if you have more than 23 bones!&quot;).&#xD;&#xA;* **Asset processing takes longer.** Pipelines to convert 3D assets to game-ready format are complex, slow, and often buggy. This makes it take much longer for artists to see their changes in game, which slows them down.&#xD;&#xA;&#xD;&#xA;**Design:**&#xD;&#xA;&#xD;&#xA;* **User input is bitch.** You have to deal with camera tracking, converting user input into the character's space intuitively, projecting 2D selections into world space, etc.&#xD;&#xA;* **Levels are hard to author.** Your level designers basically need the skills of a game designer and an architect. They have to take into account players getting lost, visibility, etc. when building levels.&#xD;&#xA;* **Level physics is tedious to author.** You'll have to check and recheck and recheck again to make sure there aren't gaps and bugs in the level physics where players can get stuck or fall through the world.&#xD;&#xA;* **Tools are much harder.** Most games need their own tools for authoring things like levels. Since the content is so much more complex, the tools are more work to create. That usually results in tools that are buggier, incomplete, and harder to use.&#xD;&#xA;" />
  <row Id="1449" PostHistoryTypeId="2" PostId="751" RevisionGUID="e90c8b9b-5473-4e9a-936d-9b9b28ae17f8" CreationDate="2010-07-19T04:26:38.713" UserId="181" Text="The lowest level that makes sense from my point of view is something that talks about the resources involved in rendering - vb/ib, render surfaces, textures, shaders, state blocks, etc.&#xD;&#xA;&#xD;&#xA;The problem here is that some of these need to be in different formats, depending on the API - that's where it gets a bit tricky. The easiest way around it is to pre-process static resources for the respective API. For dynamic ones, use *only* shaders to generate them - that makes it fairly straightforward to stay in native formats.&#xD;&#xA;&#xD;&#xA;All you then do on the higher level is set up pipelines with attached resources and hand them to the GPU. You'll find that not everything can be abstracted out nicely in that way, especially if you take advantage of hardware-specific tricks. But it's a good start. &#xD;&#xA;&#xD;&#xA;(Sidenote: if you treat platform-specific tricks as a special kind of resource, you can push this whole concept quite far. )&#xD;&#xA;&#xD;&#xA;So in a way, you'll create two things: A hardware resource manager, plus a toolkit to set up a DAG of these resources. " />
  <row Id="1450" PostHistoryTypeId="2" PostId="752" RevisionGUID="abc5b6a6-795f-4b58-80a1-b92534e36bfd" CreationDate="2010-07-19T04:30:04.467" UserId="181" Text="It depends entirely on the game team what *exactly* pre-production is. Its intent is always the same: To prove out that this game can be made, within the given constraints, and has a chance at being a success.&#xD;&#xA;&#xD;&#xA;In my opinion, preproduction means that you've established the entire pipeline from initial art &amp; design work into the final engine, the core of your game engine, and you've proven that the core mechanics are fun. When prepro is done, you should be able to fairly painlessly ramp up the team size and create the game without any majore surprises." />
  <row Id="1451" PostHistoryTypeId="12" PostId="478" RevisionGUID="34132235-c2c0-48c0-8d4a-692ad5e590b5" CreationDate="2010-07-19T05:54:07.400" UserId="168" Text="[{&quot;Id&quot;:168,&quot;DisplayName&quot;:&quot;mikeschuld&quot;}]" />
  <row Id="1452" PostHistoryTypeId="13" PostId="478" RevisionGUID="dd60449f-b542-4d71-b8d3-9af5032f5906" CreationDate="2010-07-19T05:54:11.550" UserId="168" Text="[{&quot;Id&quot;:168,&quot;DisplayName&quot;:&quot;mikeschuld&quot;}]" />
  <row Id="1455" PostHistoryTypeId="2" PostId="754" RevisionGUID="60fccd23-2ade-4a88-be58-3d7552e61d02" CreationDate="2010-07-19T06:25:46.213" UserId="274" Text="This paper by Jon Olick is pretty interesting:&#xD;&#xA;http://s08.idav.ucdavis.edu/olick-current-and-next-generation-parallelism-in-games.pdf&#xD;&#xA;&#xD;&#xA;And those two forum threads about it:&#xD;&#xA;http://ompf.org/forum/viewtopic.php?f=3&amp;t=904&#xD;&#xA;&#xD;&#xA;and:&#xD;&#xA;https://mollyrocket.com/forums/viewtopic.php?t=551&#xD;&#xA;&#xD;&#xA;It gives you a nice overview about how things could be done in a modern voxel engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1456" PostHistoryTypeId="2" PostId="755" RevisionGUID="46d1bcd7-4133-48ea-b7ae-29962be4e072" CreationDate="2010-07-19T06:34:03.403" UserId="274" Text="There is an article on GPU Pro about this, by Emil Persson (Humus)&#xD;&#xA;&#xD;&#xA;http://gpupro.blogspot.com/2009/12/making-it-large-beautiful-fast-and.html&#xD;&#xA;&#xD;&#xA;&gt; A cross-platform interface for rendering. The advantages of having one, and how we crammed DX10 into a common interface with DX9 consoles and maintained good performance.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1457" PostHistoryTypeId="6" PostId="732" RevisionGUID="cc256ccc-db27-4502-be96-9e97dea648c8" CreationDate="2010-07-19T07:15:18.337" UserId="51" Comment="edited tags" Text="&lt;planning&gt;" />
  <row Id="1458" PostHistoryTypeId="2" PostId="756" RevisionGUID="380430c7-30b1-41a7-8aac-cc801a96e2ee" CreationDate="2010-07-19T07:16:45.027" UserId="328" Text="I hear a lot about &quot;procedural maps&quot; and &quot;procedural textures&quot;. What does that mean exactly, and what resources are there for learning these techniques in a game?" />
  <row Id="1459" PostHistoryTypeId="1" PostId="756" RevisionGUID="380430c7-30b1-41a7-8aac-cc801a96e2ee" CreationDate="2010-07-19T07:16:45.027" UserId="328" Text="What is &quot;procedural generation&quot; and how is it done?" />
  <row Id="1460" PostHistoryTypeId="3" PostId="756" RevisionGUID="380430c7-30b1-41a7-8aac-cc801a96e2ee" CreationDate="2010-07-19T07:16:45.027" UserId="328" Text="&lt;procedural-generation&gt;" />
  <row Id="1461" PostHistoryTypeId="2" PostId="757" RevisionGUID="9da8b980-ab16-4812-afb9-3bfa394dcf0c" CreationDate="2010-07-19T07:24:07.927" UserId="51" Text="The textbook definition of &quot;procedural&quot; is something that's generated from some kind of algorithm instead of predefined, i.e. from a level editor or image editing program.&#xD;&#xA;&#xD;&#xA;See also this question, specifically for procedural textures: http://gamedev.stackexchange.com/questions/327/what-happened-to-procedurally-generated-textures&#xD;&#xA;&#xD;&#xA;For procedural maps, there are a lot of techniques you can use.  In a basic example, you can do things like create some kind of grid that you pseudo-randomly lay down paths for.  You can set up a bunch of prefabricated pieces that have certain areas tagged as doors, etc, and just randomly throw them together.&#xD;&#xA;&#xD;&#xA;In a way, you're writing an AI to design your levels on the fly.&#xD;&#xA;&#xD;&#xA;If you're planning on doing this at run time on the user's machine, you lose the ability to precompute things across the map.  For example, you have to lose or find alternate solutions to things like visibility, navigation data, and lightmaps.   &#xD;&#xA;&#xD;&#xA;However there is a benefit to procedurally generate content during production and then use that as a seed to making data.  For example, you can procedurally place trees on a terrain to create a forest, and then save that as your map, instead of placing all the trees by hand.&#xD;&#xA;&#xD;&#xA;At the end of the day, though, how you do it is heavily dependent on what your game design needs are.  I'm personally of the opinion that procedural maps are usually not worth it as a level designer can make more fun, better looking, maps in less time than it would be to set up a system to make anything close, but there's room for debate on that." />
  <row Id="1462" PostHistoryTypeId="2" PostId="758" RevisionGUID="7591fd1f-df79-4325-b9a3-a70057907494" CreationDate="2010-07-19T08:30:34.570" UserId="353" Text="What are some pitfalls or pieces of good advice when designing levels or maps for a (presumeably 3D but not necessarily) game?&#xD;&#xA;&#xD;&#xA;Some I've come across (for 3D, linear FPS style games):&#xD;&#xA;&#xD;&#xA;- Make use of &quot;arenas&quot;--confined spaces where the player must solve some puzzle, fight some enemy, etc to move on. This is often referred to as &quot;gating&quot; the player, ie barring their progress until they have completed their task. This helps to create a sense of accomplishment when the player is allowed to continue, and makes for easy save/retry loops. The &quot;arena&quot; does not have to be an &quot;arena&quot; in the classical sense, it simply refers to any confined space where the player has to complete a task--it could be a courtyard that has no exit until an enemy bashes through a wall, for example.&#xD;&#xA;&#xD;&#xA;- Block the area behind the player as much as possible (within reason). Playtesting has demonstrated that players are more confident about moving forward in a level if the amount of backtracking available to them is limited. This also plays nicely with the &quot;arena&quot; concept--an explosion in the tunnel a player just exited confines them to the next area of the map, creating a new &quot;arena&quot;.&#xD;&#xA;&#xD;&#xA;- Following along the same lines as the second point, carefully limit the number of paths available to a player. While it is common these days to advertise that there are multiple paths through the game, this is frustrating to players who want to ensure that they are seeing everything the game has to offer. Some branching, however, can make the game more interesting and is more practical as it provides multiple path options to AI, etc, and gives the player some freedom of choice." />
  <row Id="1463" PostHistoryTypeId="1" PostId="758" RevisionGUID="7591fd1f-df79-4325-b9a3-a70057907494" CreationDate="2010-07-19T08:30:34.570" UserId="353" Text="Level Design Tips" />
  <row Id="1464" PostHistoryTypeId="3" PostId="758" RevisionGUID="7591fd1f-df79-4325-b9a3-a70057907494" CreationDate="2010-07-19T08:30:34.570" UserId="353" Text="&lt;game-design&gt;&lt;level&gt;" />
  <row Id="1465" PostHistoryTypeId="2" PostId="759" RevisionGUID="b375c2c5-bccc-4b78-a83d-7328f4d99054" CreationDate="2010-07-19T09:33:23.173" UserId="353" Text="There are a number of frameworks depending on the target platform. &#xD;&#xA;&#xD;&#xA;- On PC, you can use [Steamworks][1]&#xD;&#xA;- Xbox 360 and PS3 both have matchmaking for full-on developers&#xD;&#xA;- For independent games, XNA allows acess to a limited set of Xbox Live features&#xD;&#xA;&#xD;&#xA;I can't think of any others, so beyond these you'd likely have to build your own.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.steampowered.com/steamworks/" />
  <row Id="1467" PostHistoryTypeId="5" PostId="758" RevisionGUID="da790a11-779a-4efb-8254-7bd23e49166d" CreationDate="2010-07-19T09:49:26.660" UserId="353" Comment="deleted 1534 characters in body" Text="What are some pitfalls or pieces of good advice when designing levels or maps for a (presumeably 3D but not necessarily) game?" />
  <row Id="1468" PostHistoryTypeId="2" PostId="760" RevisionGUID="6d8a3bbb-39f8-4aaa-9609-6e38cef9cabe" CreationDate="2010-07-19T09:49:40.577" UserId="353" Text="- Make use of &quot;arenas&quot;--confined spaces where the player must solve some puzzle, fight some enemy, etc to move on. This is often referred to as &quot;gating&quot; the player, ie barring their progress until they have completed their task. This helps to create a sense of accomplishment when the player is allowed to continue, and makes for easy save/retry loops. The &quot;arena&quot; does not have to be an &quot;arena&quot; in the classical sense, it simply refers to any confined space where the player has to complete a task--it could be a courtyard that has no exit until an enemy bashes through a wall, for example.&#xD;&#xA;&#xD;&#xA;- Block the area behind the player as much as possible (within reason). Playtesting has demonstrated that players are more confident about moving forward in a level if the amount of backtracking available to them is limited. This also plays nicely with the &quot;arena&quot; concept--an explosion in the tunnel a player just exited confines them to the next area of the map, creating a new &quot;arena&quot;.&#xD;&#xA;&#xD;&#xA;- Following along the same lines as the second point, carefully limit the number of paths available to a player. While it is common these days to advertise that there are multiple paths through the game, this is frustrating to players who want to ensure that they are seeing everything the game has to offer. Some branching, however, can make the game more interesting and is more practical as it provides multiple path options to AI, etc, and gives the player some freedom of choice." />
  <row Id="1469" PostHistoryTypeId="2" PostId="761" RevisionGUID="c902d968-3873-4f63-8709-137fe8f420a1" CreationDate="2010-07-19T09:58:55.860" UserId="288" Text="Valve's games with developer commentary (particularly: Half Life 2: Lost Coast, Episode 1 and Episode 2, and Team Fortress 2) are well worth checking out for some good tips on level design.&#xD;&#xA;&#xD;&#xA;(L4D also has commentry, but I can't remember if it had much about level design in it.)" />
  <row Id="1470" PostHistoryTypeId="4" PostId="586" RevisionGUID="7354abaf-3d90-4e38-b10d-52b239909124" CreationDate="2010-07-19T10:11:44.747" UserId="119" Comment="edited title" Text="What is the fastest way to work out 2D bounding box intersection?" />
  <row Id="1471" PostHistoryTypeId="6" PostId="758" RevisionGUID="89d4473b-61b7-442c-90e4-6a81f1681afd" CreationDate="2010-07-19T10:26:10.570" UserId="353" Comment="edited tags; edited tags; edited tags" Text="&lt;game-design&gt;&lt;tips&gt;&lt;levels&gt;&lt;maps&gt;" />
  <row Id="1472" PostHistoryTypeId="6" PostId="586" RevisionGUID="e86f1546-682d-4aa8-8ad9-6c80a04e466e" CreationDate="2010-07-19T10:27:20.333" UserId="353" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;optimization&gt;&lt;bounding-boxes&gt;" />
  <row Id="1473" PostHistoryTypeId="6" PostId="745" RevisionGUID="d2e71082-fa45-4a5c-8c7c-9d40a715f955" CreationDate="2010-07-19T10:28:43.717" UserId="353" Comment="edited tags" Text="&lt;terrain-rendering&gt;&lt;level-of-detail&gt;" />
  <row Id="1474" PostHistoryTypeId="6" PostId="728" RevisionGUID="2f1dcd3b-4a48-450d-8738-dd747d2d07bf" CreationDate="2010-07-19T10:29:25.683" UserId="353" Comment="edited tags" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;best-practices&gt;&lt;programming&gt;" />
  <row Id="1475" PostHistoryTypeId="2" PostId="762" RevisionGUID="9ff2d945-cf23-41f2-8ab8-566504b1ca3a" CreationDate="2010-07-19T10:29:40.597" UserId="358" Text="It largely depends on your requirements.&#xD;&#xA;&#xD;&#xA;If you are interested in supporting audio, friend invites, et cetera than I believe XNA is the way to go.&#xD;&#xA;&#xD;&#xA;The major limitation you face with using XNA for networking is the player limit of 32 players per game.&#xD;&#xA;&#xD;&#xA;When you develop a game with the XNA framework, it isn't absolutely necessary to be coupled to all the various APIs. Many people use the XNA framework but rely on other frameworks for networking.&#xD;&#xA;&#xD;&#xA;My suggestion is to physically (write them down in notepad or something) list your needs and wants for the networking aspect. Then compare and contrast the various frameworks." />
  <row Id="1478" PostHistoryTypeId="5" PostId="587" RevisionGUID="a9050176-4c4c-4652-af4f-99a9b9b7d054" CreationDate="2010-07-19T10:52:56.603" UserId="323" Comment="added 186 characters in body; added 96 characters in body" Text="(C-ish pseudocode - adapt language optimizations as appropriate)&#xD;&#xA;&#xD;&#xA;    bool DoBoxesIntersect(Box a, Box b) {&#xD;&#xA;      return (abs(a.x - b.x) * 2 &lt; (a.width + b.width)) &amp;&amp;&#xD;&#xA;             (abs(a.y - b.y) * 2 &lt; (a.height + b.height));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In English: On each axis, check to see if the centers of the boxes are close enough that they'll intersect. If they intersect on both axes, then the boxes intersect. If they don't, then they don't.&#xD;&#xA;&#xD;&#xA;You can change the &lt;'s to &lt;= if you want to count edge-touching as intersecting. If you want a specific edge-touch-only formula, you can't use == - that will tell you if the corners touch, not if the edges touch. You'd want to do something logically equivalent to `return DoBoxesIntersectOrTouch(a, b) &amp;&amp; !DoBoxesIntersect(a, b)`.&#xD;&#xA;&#xD;&#xA;It's worth mentioning that you can get a small but significant speed increase by storing the half-width and half-height in addition to (or instead of) the full width and full height. On the other hand, it's rare for 2d bounding box intersection to be the performance bottleneck." />
  <row Id="1479" PostHistoryTypeId="2" PostId="764" RevisionGUID="5bb688fa-5583-414d-b1bb-4d45eb3acdd9" CreationDate="2010-07-19T13:46:48.667" UserId="288" Text="My #1 biggest tip: **Disconnect your network cable!**&#xD;&#xA;&#xD;&#xA;I have a ritual of disconnecting my network cable before I go to bed. The next morning - I'm not online, so I have no sites to visit, no emails to read, no people to chat to, etc. So I naturally get straight to work on my game.&#xD;&#xA;&#xD;&#xA;I don't connect again until I absolutely have to. If there's something I need online - I write it down to look up later, or use my iPhone's browser.&#xD;&#xA;&#xD;&#xA;It helps to have things like MSDN downloaded and available offline." />
  <row Id="1480" PostHistoryTypeId="5" PostId="738" RevisionGUID="4b1906ce-82c6-42fc-8192-22c3428d5310" CreationDate="2010-07-19T13:51:25.613" UserId="33" Comment="deleted 188 characters in body" Text="You might want to check out the [SDL library][1] or [Allegro][2]. Both of them are low level, highly-portable game libraries, which have a way to plug them in an OpenGL context so you can render your graphics there. SDL has the fame of being used by he defunct Loki Games to port some popular games from the 2000s to Linux, and Allegro has a lot of time running on and has a great community of amateur game developers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://libsdl.org&#xD;&#xA;  [2]: http://alleg.sourceforge.net/" />
  <row Id="1481" PostHistoryTypeId="2" PostId="765" RevisionGUID="38d74f93-8378-4336-8027-4c2967a13714" CreationDate="2010-07-19T15:16:14.317" UserId="288" Text="What are some of the biggest - and better yet: insidious and unexpected - mistakes that indie game developers make? Especially when making the transition from hobbyist to full-time indie?" />
  <row Id="1482" PostHistoryTypeId="1" PostId="765" RevisionGUID="38d74f93-8378-4336-8027-4c2967a13714" CreationDate="2010-07-19T15:16:14.317" UserId="288" Text="What things should an indie game developer never do?" />
  <row Id="1483" PostHistoryTypeId="3" PostId="765" RevisionGUID="38d74f93-8378-4336-8027-4c2967a13714" CreationDate="2010-07-19T15:16:14.317" UserId="288" Text="&lt;subjective&gt;&lt;best-practices&gt;&lt;tips&gt;&lt;business&gt;&lt;productivity&gt;" />
  <row Id="1484" PostHistoryTypeId="2" PostId="766" RevisionGUID="dd1d063e-42bb-4de1-a07a-d9f2a2831f97" CreationDate="2010-07-19T15:34:22.223" UserId="274" Text="One of the major pitfalls is focusing too much on developing the framework / tools / engine, and too little about making the actual game.&#xD;&#xA;&#xD;&#xA;You risk to get all entangled up into that and to lost focus. Never forget you are first and foremost making a game not making a middle-ware component.&#xD;&#xA;&#xD;&#xA;i.e. You should not start by coding the math library but instead by figuring out how to make the game entertaining." />
  <row Id="1485" PostHistoryTypeId="2" PostId="767" RevisionGUID="42e9c465-d8b6-469a-863d-7d8fac4d93fc" CreationDate="2010-07-19T15:51:31.293" UserId="305" Text="Never steal code from another indie developer.&#xD;&#xA;&#xD;&#xA;Sure, it applies to non-indie developers as well, but the indie development community is already a very collaborative and sharing environment for a creative individual. It's easier to ask nicely, and more often than not, folks will be quite happy to tell you how it's done. You might even find a teammate in the process.&#xD;&#xA;&#xD;&#xA;Even if you're using code that other developers have made available on their websites, be sure to credit them, and send them an email to let them know you appreciate the resource." />
  <row Id="1486" PostHistoryTypeId="2" PostId="768" RevisionGUID="25ae0f9b-23c8-4a96-aa76-d5b1937ef5ef" CreationDate="2010-07-19T16:05:39.773" UserId="47" Text="Don't burnout early.&#xD;&#xA;&#xD;&#xA;You don't want to get started an awesome game idea and then burnout after a couple of weeks because of poor planning.  Games take a long time to make, so make small, realistic goals." />
  <row Id="1487" PostHistoryTypeId="2" PostId="769" RevisionGUID="589d00bd-e484-4e68-893d-164b7139fca3" CreationDate="2010-07-19T16:24:26.827" UserId="289" Text="until now I've seen that many games are still compiled in 32-bit architecture although nearly 50% of current windows users are on 64-bit O/S? why is it? if the reason is for getting larger audience (since 32-bit app could run on 64) why don't they make two version of it, since it is more or less about recompilation and running 64 bit apps could give performance benefit due to more available cpu register and other features." />
  <row Id="1488" PostHistoryTypeId="1" PostId="769" RevisionGUID="589d00bd-e484-4e68-893d-164b7139fca3" CreationDate="2010-07-19T16:24:26.827" UserId="289" Text="64-bit platform for game?" />
  <row Id="1489" PostHistoryTypeId="3" PostId="769" RevisionGUID="589d00bd-e484-4e68-893d-164b7139fca3" CreationDate="2010-07-19T16:24:26.827" UserId="289" Text="&lt;architecture&gt;&lt;platform&gt;&lt;operating-system&gt;&lt;compilation&gt;" />
  <row Id="1490" PostHistoryTypeId="2" PostId="770" RevisionGUID="395a9083-09d3-4a8d-9cc4-4e3a5a782cbb" CreationDate="2010-07-19T16:28:45.950" UserId="51" Text="* Players never look up -- Avoid putting enemies or solutions to problems above the top of the screen when player is looking straight out.  Unless, of course, you've taught the player that it's necessary to do so (i.e. Portal).&#xD;&#xA;&#xD;&#xA;* Use lighting to highlight important features or the way to go.  Players are very receptive to going down a path if there's a light in it.  You can use this to help players not get lost in seemingly complicated areas.&#xD;&#xA;&#xD;&#xA;* Don't spawn/place enemies behind the player.  That's just frustrating.&#xD;&#xA;&#xD;&#xA;* Add quick saves often (assuming your game has that feature)." />
  <row Id="1491" PostHistoryTypeId="2" PostId="771" RevisionGUID="1550e7de-854b-4171-891e-2773dc01af6b" CreationDate="2010-07-19T16:29:42.873" UserId="204" Text="This [MSDN blog][1] about why there isn't a 64 bit Visual Studio version addresses many of the issues that also affect games. The gist of it is that going to 64 bit may actually hurt performance in many cases because of the effect on the processor's cache (more data with 64 bits, but the same size cache).&#xD;&#xA;&#xD;&#xA;The additional addressable memory could help, but few consumer machines have more than 4 gigs of memory anyway. Add that to the pain of distributing two binaries for Windows, and it's easy to decide that the time isn't right for 64 bit games (yet). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/ricom/archive/2009/06/10/visual-studio-why-is-there-no-64-bit-version.aspx" />
  <row Id="1492" PostHistoryTypeId="2" PostId="772" RevisionGUID="dae2d2c5-b874-48c2-9fb2-f3e0a05860c4" CreationDate="2010-07-19T16:30:13.543" UserId="274" Text="If it was simply a matter of recompilation we would have 64bit version of all the games.&#xD;&#xA;&#xD;&#xA;Unfortunately it's not that easy, specially with game engines with an older code-base.&#xD;&#xA;&#xD;&#xA;Porting to 64bit would take lots of effort in this case. Simply put the advantages for now weren't enough for this to be worth.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1493" PostHistoryTypeId="2" PostId="773" RevisionGUID="5e7370b7-bd07-4aa0-9fed-7f8008090704" CreationDate="2010-07-19T16:37:24.393" UserId="328" Text="The last time I tried learning HLSL, I made a few shaders and mostly understood what I was doing, but I still felt like I was stumbling in the dark. Most of what I learned I got from various blog posts that didn't explain things very well.&#xD;&#xA;&#xD;&#xA;Also, the documentation on MSDN seems to be more of a function reference.&#xD;&#xA;&#xD;&#xA;Where can I learn to not only write HLSL, but learn techniques for writing shaders?" />
  <row Id="1494" PostHistoryTypeId="1" PostId="773" RevisionGUID="5e7370b7-bd07-4aa0-9fed-7f8008090704" CreationDate="2010-07-19T16:37:24.393" UserId="328" Text="What are some good resources for learning HLSL?" />
  <row Id="1495" PostHistoryTypeId="3" PostId="773" RevisionGUID="5e7370b7-bd07-4aa0-9fed-7f8008090704" CreationDate="2010-07-19T16:37:24.393" UserId="328" Text="&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="1496" PostHistoryTypeId="2" PostId="774" RevisionGUID="d8dc5016-9823-4550-b340-61c023bd2742" CreationDate="2010-07-19T16:41:17.180" UserId="10" Text="When I was reading about HLSL [I found this tutorial back in the day.][1] I liked it since it tried to explain every part of what it was doing.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.neatware.com/lbstudio/web/hlsl.html" />
  <row Id="1497" PostHistoryTypeId="2" PostId="775" RevisionGUID="21d052a9-b691-41ea-8f35-42b583655460" CreationDate="2010-07-19T16:46:39.420" UserId="328" Text="I ask &quot;how&quot; rather than &quot;where&quot; because there are undoubtedly lots of artists that are just plain lousy or unreliable.&#xD;&#xA;&#xD;&#xA;Let's assume both paying and non-paying (mods, free games/open-source) positions." />
  <row Id="1498" PostHistoryTypeId="1" PostId="775" RevisionGUID="21d052a9-b691-41ea-8f35-42b583655460" CreationDate="2010-07-19T16:46:39.420" UserId="328" Text="How do I find artists to work on my game?" />
  <row Id="1499" PostHistoryTypeId="3" PostId="775" RevisionGUID="21d052a9-b691-41ea-8f35-42b583655460" CreationDate="2010-07-19T16:46:39.420" UserId="328" Text="&lt;art&gt;" />
  <row Id="1500" PostHistoryTypeId="2" PostId="776" RevisionGUID="db103c2a-c4e9-4bb2-9f59-081879471589" CreationDate="2010-07-19T16:49:04.113" UserId="353" Text="- The API reference from Microsoft is great: http://msdn.microsoft.com/en-us/library/bb509561%28v=VS.85%29.aspx&#xD;&#xA;- For help with some more advanced effects, the entirety of &quot;GPU Gems&quot; is available online: http://http.developer.nvidia.com/GPUGems/gpugems_part01.html" />
  <row Id="1501" PostHistoryTypeId="2" PostId="777" RevisionGUID="5a2a40ba-76f4-4f46-8ffc-08a9d6db477e" CreationDate="2010-07-19T16:49:15.987" UserId="289" Text="for me its easier to learn GLSL first, and since HLSL and GLSL is similar. once you understand the whole concept, the pipeline, the hardware and how the inner shader language work it's easy for you to use another language such as HLSL or even Cg.&#xD;&#xA;&#xD;&#xA;I propose GLSL because it has a very good book such as the orange and red book of openGL and its easy to learn for beginner." />
  <row Id="1502" PostHistoryTypeId="2" PostId="778" RevisionGUID="3839c94f-abdd-42a2-b6bc-3577d7b07a13" CreationDate="2010-07-19T16:54:07.587" UserId="10" Text="For modelers/texturers. There is no better place than [polycount.][1] Check out the Work Opportunity forums. A lot of people there and you can ask to see examples.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.polycount.com/forum/" />
  <row Id="1503" PostHistoryTypeId="5" PostId="776" RevisionGUID="a6ee0460-2e98-419b-bc45-9abbf2ca7a26" CreationDate="2010-07-19T17:17:03.553" UserId="353" Comment="added 177 characters in body" Text="- The API reference from Microsoft is great: http://msdn.microsoft.com/en-us/library/bb509561%28v=VS.85%29.aspx&#xD;&#xA;- For help with some more advanced effects, the entirety of &quot;GPU Gems&quot; is available online: http://http.developer.nvidia.com/GPUGems/gpugems_part01.html&#xD;&#xA;&#xD;&#xA;Those two noted, I consistently come back to the following article almost every time I write a generic shader:&#xD;&#xA;&#xD;&#xA;- http://www.gamasutra.com/features/20030418/engel_01.shtml" />
  <row Id="1504" PostHistoryTypeId="2" PostId="779" RevisionGUID="d52c2802-d9a6-4489-8e45-e9da67435ac9" CreationDate="2010-07-19T17:26:57.860" UserId="353" Text="One tip I've heard is to **build as much of the game as possible before looking for artists**. Build the game with placeholder art before you post about the game so that artists can get a feel for the game, it's play style and environment, etc before building assets for it. They can also use the prototype to decide if it's a project they'd actually like to work on.&#xD;&#xA;&#xD;&#xA;Another tip I've heard is to avoid asking for people to &quot;join your team&quot; as this seems &quot;noobish&quot;. Instead post the prototype and say that you need an artist or artists to finish it. If you post at the right communities someone will almost always come along who is interested.&#xD;&#xA;&#xD;&#xA;You can, of course, pay an artist per asset, etc from a more &quot;professional&quot; site. This is really a personal choice. Modelers, musicians, voice actors, etc can all be hired from sites that can be found with some quick googling. However keep in mind that you should still provide these people with as much of a game as possible so they can create something that &quot;fits&quot;. You can also easily determine if a model will deform properly, light well, etc before accepting the asset if you have build as much of the game as possible beforehand.&#xD;&#xA;&#xD;&#xA;One final note, if you are building any artist tools, be sure to have them rock solid and well documented before sending them to an artist, or you will waste time and money sending them revised versions of the tool or having them rebuild assets." />
  <row Id="1505" PostHistoryTypeId="5" PostId="634" RevisionGUID="6e8860f1-dffb-47ef-8165-ae6b76ed546e" CreationDate="2010-07-19T18:41:45.993" UserId="275" Comment="sprites are easier than models, not vice versa. little mental error, I hope it harmed nobody." Text="This is a highly subjective question, since the answer depends on personal preference/experience/knowledge/intelligence.&#xD;&#xA;&#xD;&#xA;I will try to answer neutrally, but since I am only a programmer and not an artist i can only hypothesize for the last point.&#xD;&#xA;&#xD;&#xA;Code complexity should not be so very different, except in maths and maybe rendering/physics. Game Logic isn't so much different if you take a healthy level of abstraction (not too much - you're trying to make a game not an engine, at least I guess from your question.) Obviously its a lot easier to calculate movement in 2D because you have limited perspective. Physics is WAY more difficult when dealing in three axes. Also, loading a Sprite from a Bitmap is a lot easier than loading a 3D Model (and possibly texturing).&#xD;&#xA;&#xD;&#xA;Maths is more complicated for 3D (a no-brainer really - quaternions, vectors, matrices. 'nuff said)&#xD;&#xA;&#xD;&#xA;For art, I think it must be more difficult for 3D too, since you need to create art that looks good from every possible viewing angle (or at least a wide range), and you usually want to texture things too. Animating a mesh is no picnic to get realistic, and getting the texture to play along isn't either.&#xD;&#xA;" />
  <row Id="1506" PostHistoryTypeId="2" PostId="780" RevisionGUID="dcf7140f-ddde-4ca2-b983-37063e0d7637" CreationDate="2010-07-19T18:44:54.460" UserId="55" Text="I'm no artist, but I'm a iOS developer who is approached fairly regularly. The problem with programming and artwork is that everyone expects free work...&#xD;&#xA;&#xD;&#xA;I find it very difficult to randomly jump on a project with a random individual. Why? I don't know anything about them. Are they passionate? Do they have a portfolio of completed projects? Do they really have a specification for what they want to do? I mean, we **all** have a bag of ideas.&#xD;&#xA;&#xD;&#xA;You may find someone willing to join your project for free but they will likely have little to no experience, and there is absolutely no promise they'll stick around. It's generally useful for the guy with the artistic direction to stick around. It's up to you to discern what you want/need.&#xD;&#xA;&#xD;&#xA;I would be much more inclined to work on a project with a friend... So -- &#xD;&#xA;&#xD;&#xA;My single, biggest piece of advice to find artist's (or programmers, or audio guys, or ... :&#xD;&#xA;&#xD;&#xA;**Network**  &#xD;&#xA;Have you ever been to the Game Developers Conference? You'll meet some amazing independents there and you don't have to fork out the money to get the top tier pass to meet them (scout events, meet-ups, etc). But if you do pay for a good pass, you might be inclined to jump in an art session to network. ;)&#xD;&#xA;&#xD;&#xA;GDC isn't in everyone's bag-o-tricks so I'd be on the look-out for any game development related events around you. &#xD;&#xA;&#xD;&#xA;If you're in school you can try to put together a meet-up on your campus to bring people out.&#xD;&#xA;&#xD;&#xA;Get yourself out on the web and abuse the forums around you. If you've seen an artist's work send them a message and say hi. They might not be available but they may know a few artists that are.&#xD;&#xA;&#xD;&#xA;**Alternatively**  &#xD;&#xA;&#xD;&#xA;As you pointed out... &#xD;&#xA;&#xD;&#xA;**Pay For One**  &#xD;&#xA;If you don't put in the time to network, you're flat out going to pay for your artwork on freelance websites like odesk, guru, craigslist, or others.&#xD;&#xA;" />
  <row Id="1507" PostHistoryTypeId="2" PostId="781" RevisionGUID="c614cd33-b2a2-469b-ae23-2ba4616e8d7a" CreationDate="2010-07-19T19:07:20.010" UserId="275" Text="What code philosophy/structure of abstraction/program design would allow a game to be used with both 2D and 3D graphics (seperately) WITHOUT having to re-code the Game logic? &#xD;&#xA;&#xD;&#xA;We're talking taking the same code, changing a minimum of things (for example, exchange filenames for 2D assets with filenames for 3D assets), and maybe pluggind in a few specialisations of a base class per generics/templates.&#xD;&#xA;&#xD;&#xA;To put it in a real context where it makes sense: imagine a LAN-multiplayer game where there is one top-notch, performance-hungry 3D client for the players with some really good Gamer Rigs, and a more humble 2D client for the old dusty boxes that someone found in their attic. But it's still the same game - the same events are registered (someone picked up a coin), the same Network protocol is used, the worlds are proportional, etc.&#xD;&#xA;&#xD;&#xA;To put it in an MVC context: The Controllers are the exact same (pressing the &quot;Up&quot; Key will set the players accelleration at 3.5 units/second), the Views are totally different (2D versus 3D), and the Model is the same except for anything directly related to graphics. (a collision check for the environment is performed every 5 seconds, and it uses the same algorithm. Note that this would mean there IS a Z-coordinate for all the Game Objects in the 2D version, but it's just ignored or displayed to the user in another way, for example by a shadow that is displayed further left when the player is in the air)&#xD;&#xA;&#xD;&#xA;What makes this such a fascinating topic is that it would FORCE the developer to have a very clear idea of how his data is structured and how control flows. Note that this does not imply using anything other than a graphics library like SDL, D3DX or OpenGL. No Game Engines!&#xD;&#xA;&#xD;&#xA;Since this is a mostly theoretical question, I'll leave programming languages out of it, but if you want to give an example you can use any language you like, C++ if you want to go the whole hog, or even brainfuck if you feel up to the challenge. (Any concrete answers will be appreciated, as well as any abstract ones!)" />
  <row Id="1508" PostHistoryTypeId="1" PostId="781" RevisionGUID="c614cd33-b2a2-469b-ae23-2ba4616e8d7a" CreationDate="2010-07-19T19:07:20.010" UserId="275" Text="Same game logic on two seperate graphics libraries" />
  <row Id="1509" PostHistoryTypeId="3" PostId="781" RevisionGUID="c614cd33-b2a2-469b-ae23-2ba4616e8d7a" CreationDate="2010-07-19T19:07:20.010" UserId="275" Text="&lt;architecture&gt;" />
  <row Id="1510" PostHistoryTypeId="2" PostId="782" RevisionGUID="80d70e7d-47fc-4248-8393-fa95d4c9e24b" CreationDate="2010-07-19T19:10:30.113" UserId="55" Text="I'm looking for some quality audio/soundtracks as inspiration. &#xD;&#xA;&#xD;&#xA;Can you think of some really good puzzle games that went above and beyond in the audio category? &#xD;&#xA;&#xD;&#xA;If you're an audio guy, is there anything you specifically think about when designing music for puzzle games? &#xD;&#xA;&#xD;&#xA;If you know of examples for various styles, like dark/evil and bright/uppity, that would be great.&#xD;&#xA;&#xD;&#xA;Audio can set the mood and drive the story you are trying to tell and I find many games not spending any time really thinking through the audio portion of their process. This is especially visible in iOS development where developers tend to get lazy because most are under the assumption that the user is just going to turn off the audio and turn on their iPod." />
  <row Id="1511" PostHistoryTypeId="1" PostId="782" RevisionGUID="80d70e7d-47fc-4248-8393-fa95d4c9e24b" CreationDate="2010-07-19T19:10:30.113" UserId="55" Text="What are some good audio pieces that worked well for puzzle games?" />
  <row Id="1512" PostHistoryTypeId="3" PostId="782" RevisionGUID="80d70e7d-47fc-4248-8393-fa95d4c9e24b" CreationDate="2010-07-19T19:10:30.113" UserId="55" Text="&lt;audio&gt;" />
  <row Id="1513" PostHistoryTypeId="2" PostId="783" RevisionGUID="70d0b387-c0a5-49c8-8a07-a2bf7a964647" CreationDate="2010-07-19T19:12:44.770" UserId="101" Text="Cg is not technically HLSL, but syntactically they are virtually identical.&#xD;&#xA;&#xD;&#xA;Having said that, it's an older book, but NVIDIA has made &quot;[The Cg Tutorial][1]&quot; free to read online. It's covers the basics of the programmable pipeline in a very comprehensive fashion, and it should all translate to HLSL with minimal effort.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html" />
  <row Id="1514" PostHistoryTypeId="2" PostId="784" RevisionGUID="7ba62362-b5d0-42aa-a741-b8d199e54a47" CreationDate="2010-07-19T19:17:53.230" UserId="55" Text="A few things come to mind&#xD;&#xA;&#xD;&#xA; 1. [Introduction to 3D Game Programming With DirectX 9.0][1] (awesome)&#xD;&#xA; 2. [NVIDIA FX Composer][2] (good for examples)&#xD;&#xA; 3. There was a Shader X2 intro paper on ATI's website, but it's been removed... [Ah! Found it here!][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1279566827&amp;sr=8-2&#xD;&#xA;  [2]: http://developer.nvidia.com/object/fx_composer_home.html&#xD;&#xA;  [3]: http://www.cs.lth.se/DAT135/papers/ShaderX2_IntroductionToHLSL.pdf" />
  <row Id="1515" PostHistoryTypeId="2" PostId="785" RevisionGUID="7cc70ac7-3794-47de-bb5b-8d5a4310e654" CreationDate="2010-07-19T19:30:30.750" UserId="162" Text="When it comes to audio in puzzle games, the two most effective soundtracks are still the [Tetris][1] and [Dr. Mario][2] themes. So the question is why do these work so well? One key factor is that they have a driving rhythm. The music of a puzzle game needs to reinforce the natural pace of the game, as players will tend to make moves at around the tempo of the musical piece. So a slow ambient piece can be great for a turn based puzzle, but for a real time puzzle you want a nice quick rhythm.&#xD;&#xA;&#xD;&#xA;Another key factor is the layered nature of the two compositions. Puzzle game music will be listened to for an extended period of time, so it needs to be the kind of music the ear will dissect and find new elements to catch on to over the hours a player might be playing a game. The tetris theme is based on a russian folk song and features some simple but interesting harmonies that make it kind of like a stripped down classical piece. The Dr. Mario Chill theme is a bit jazzier but still throws in interesting harmonic changes and switches structure a few times.&#xD;&#xA;&#xD;&#xA;In my opinion the worst kind of music for a puzzle game is the &quot;ambient classical&quot;-type game music that seems to be of prominence now. That kind of music just fades into the background, and for a puzzle game you need music that engages the player a bit more because they won't be distracted by tons of explosions or voiced dialogue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=NmCCQxVBfyM&amp;feature=related&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=RsBtQCDbTWc" />
  <row Id="1516" PostHistoryTypeId="2" PostId="786" RevisionGUID="935059e1-9596-4b9e-9780-5b7b4cb787c9" CreationDate="2010-07-19T19:38:10.390" UserId="62" Text="There are also many types of aim-assist hacks for first person shooters that also work by hooking into graphics library calls. OGC Hook for Counter-Strike / HL1 had a multitude of options beyond making walls transparent.&#xD;&#xA;&#xD;&#xA;If the location info for enemies is at some point passed to a lower level library which has widely available code, those calls can be hooked into and the location, scale, rotation, etc. data can be used to precisely calculate the best vector for firing upon that enemy.&#xD;&#xA;Anti-cheat systems like PunkBuster often include heuristic-type detection (how often does this player get a perfect shot, how often do they spin around 180 degress to land a one-shot kill, etc.) in addition to memory and process monitoring.&#xD;&#xA;&#xD;&#xA;Ultimately the task of preventing cheating in multiplayer games is a game of cat and mouse. As new cheats are developed, new anti-cheat methods are created, and then new cheats are built to avoid the new anti-cheat technologies.&#xD;&#xA;&#xD;&#xA;As Tetrad said in his response, the only hard and fast rules for &quot;game security&quot; are to provide the client as little information as possible, and to trust the client as little as possible. Different types of games will have different requirements that can impact how well you can adhere to these rules, though.&#xD;&#xA;&#xD;&#xA;In an FPS game, because the speed of gameplay is so fast, it is often not possible to only provide the client with data it should know about this exact instant. If you don't tell the client there is an enemy around the corner and the player does go around that corner you suddenly have to send them that information in a matter of milliseconds or risk having the player be killed by an enemy they didn't ever see.&#xD;&#xA;&#xD;&#xA;The only &quot;fix&quot; for these issues that is currently available would probably be OnLive. Because that service only delivers audio and video content from a client running safely in the datacenter the only means for cheating would be to essentially create a human AI that could analyse the incoming video stream and take action based upon that -- a task that few, if any, cheaters are up to." />
  <row Id="1517" PostHistoryTypeId="2" PostId="787" RevisionGUID="8e017333-4124-4165-86fd-dc5bdbe61541" CreationDate="2010-07-19T19:42:59.130" UserId="55" Text="Imagine writing a book. If you can put together a very short story about your character (1-2 pages), hand it off to somebody and they start to feel for this character, you win...&#xD;&#xA;&#xD;&#xA;Your goal is developing a full-blown character that you could see in the real world. That means you are going to want to break down every component of a real world person into bits and pieces and use that model the look and behavior of your own character for a game. &#xD;&#xA;&#xD;&#xA;When you think about describing yourself, or somebody you see, what do you think about? Well, immediately our attention is drawn to what we can see. This is a good place to start.&#xD;&#xA;&#xD;&#xA;  - Describe hair, eyes, ears, nose&#xD;&#xA;  - Describe body type (skinny, athletic, muscular)&#xD;&#xA;  - Describe height and weight&#xD;&#xA;  - Describe clothes that your character wears&#xD;&#xA;&#xD;&#xA;Don't ignore details... Short fingers? Scars? Tattoos? Missing eyeball? One leg? Tearful body odor? &#xD;&#xA;&#xD;&#xA;You can now use those descriptors to assist in bringing your character a personality. &#xD;&#xA;&#xD;&#xA;If you're designing a combat game, you can take the fact that you know your character has scars to describe a hard-fought battle the character was in back during Vietnam. Now that we know that, maybe your character has PTSD which will influence certain game mechanics.&#xD;&#xA;&#xD;&#xA;If you're developing a puzzle game, maybe your character got those scars from a science experiment gone wrong.&#xD;&#xA;&#xD;&#xA;The goal is getting all of the possible creative juice out of you that describes every single detail that you possible can about this character. Give your other designers all of the information that they could possibly need to fit your character into the game world. &#xD;&#xA;&#xD;&#xA;If an Artist is modeling your character they can simply look at your descriptors and recognize the look. They can read a short bio and realize that this guy is a thug or an innocent/clumsy scientist. &#xD;&#xA;&#xD;&#xA;If a musician needs to compose a piece that focuses on your character, they can discern the mood they need from reading a short bio.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1518" PostHistoryTypeId="2" PostId="788" RevisionGUID="ae5204d5-c0f9-4d0d-bc0f-354b4b09aa40" CreationDate="2010-07-19T19:52:45.313" UserId="202" Text="I found [Riemers.net](http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/HLSL_introduction.php) has a very good introductory tutorial on HLSL as part of its XNA tutorials. The author, Riemer Grootjans, also wrote the recommendable book [XNA 3.0 Game Programming Recipes](http://www.amazon.com/XNA-Game-Programming-Recipes-Problem-Solution/dp/143021855X) - if You like the recipe approach." />
  <row Id="1519" PostHistoryTypeId="2" PostId="789" RevisionGUID="267dc17a-0c03-4544-9940-60d8f9b32767" CreationDate="2010-07-19T20:04:16.973" UserId="55" Text="Two things... The first one being the most critical  &#xD;&#xA;&#xD;&#xA;**Don't Ignore Marketing**  &#xD;&#xA;You're indie. Nobody knows you. You absolutely need to get yourself out and start building your brand as early as you possibly can. You can't expect to have the next big hit so you need to start dipping your toes into the water early. Marketing is hard. Building a brand can be a full-time position. Spend an hour or two everyday talking to your community or other people to help them discover you.&#xD;&#xA;&#xD;&#xA;Nothing sucks worse than spending a year making something and you don't meet a fraction of your expectations or even reaching anything close to your potential.&#xD;&#xA;&#xD;&#xA;**Don't Sacrifice Quality**  &#xD;&#xA;Don't fall into the trap of thinking that just because you're independent that you can't produce something of extremely good quality. Yes, it **will** take you more time to develop than someone with a powerhouse of developers, but you're just going to have to be more creative. If you don't like your artistic style, fix it. If your procedural algorithm routine sucks, fix it. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="1520" PostHistoryTypeId="6" PostId="745" RevisionGUID="b7899264-ee90-484a-ab48-a6ed565b227d" CreationDate="2010-07-19T20:28:19.830" UserId="181" Comment="edited tags" Text="&lt;graphics&gt;&lt;terrain-rendering&gt;&lt;level-of-detail&gt;" />
  <row Id="1521" PostHistoryTypeId="2" PostId="790" RevisionGUID="073caab1-b425-492f-8f59-894db0a72a8f" CreationDate="2010-07-19T20:38:45.050" UserId="181" Text="The technique most commonly used is referred to as NAT punch-through. Here's a decent intro: http://www.mindcontrol.org/~hplus/nat-punch.html&#xD;&#xA;&#xD;&#xA;There's an OSS project at least for UDP: http://udt.sourceforge.net/index.html&#xD;&#xA;&#xD;&#xA;RakNet supports punch-through, too, I believe. It's commercial, but has a free &quot;Indie&quot; license. See here: http://www.jenkinssoftware.com/&#xD;&#xA;&#xD;&#xA;Googling for &quot;NAT punch&quot; will get you plenty more reading material" />
  <row Id="1522" PostHistoryTypeId="2" PostId="791" RevisionGUID="5bdb902d-85c9-41ad-a329-ebc741d04057" CreationDate="2010-07-19T20:38:54.143" UserId="97" Text="I think that all (?) you would need would be a layer of abstraction wrapping your graphics library; you would need a new one for each library you would be using, and each one would need to have the exact same external API.&#xD;&#xA;&#xD;&#xA;Think of localization of strings: instead of hard-coding the string &quot;Inventory&quot; into your game, you would instead call your (possibly custom-built) localization library, which would do some processes and return a proper string, depending on the context of the game.&#xD;&#xA;&#xD;&#xA;In the same way, all calls to your graphics engine would be made *through* your wrapper around it.&#xD;&#xA;&#xD;&#xA;In doing this, you limit/restrict what commands you can give your graphics engine.  Here are some essential ones:&#xD;&#xA;&#xD;&#xA;1. Draw (graphic object) at (location)&#xD;&#xA;2. Modify (alpha, rotation, etc.) property of (graphic object)&#xD;&#xA;3. Move (graphic object) to (location)&#xD;&#xA;4. Build map of (level name/data structure)&#xD;&#xA;&#xD;&#xA;And some others, which you will find as you work on your project.&#xD;&#xA;&#xD;&#xA;If you are using a Strict-Typed Object-Oriented Language, you would call the above commands the **interface** that your wrappers will all implement.  Preferably, these will be the **only** un-protected/public methods.&#xD;&#xA;&#xD;&#xA;Now, create a new wrapper for each of your graphics libraries, and **implement the API**.  When a command to draw ____ at ____ is given to you, you must use code to create the sprite or model, and draw it into your environment.  This might require some trickery, such as storing each sprite in a hash to be re-accessible at another time by a given symbol.&#xD;&#xA;&#xD;&#xA;As for building maps, the most efficient way would be to pre-build each map for each graphics engine before-hand and do a lookup.  Alternatively you could store the map in your own custom data structure and then use your wrapper to build a map from that data structure.&#xD;&#xA;&#xD;&#xA;Hope this helps gets you started =]" />
  <row Id="1523" PostHistoryTypeId="5" PostId="715" RevisionGUID="fc4e326d-e867-4ae8-b921-a797eca0827f" CreationDate="2010-07-19T20:44:31.493" UserId="7" Comment="fixed grammar a bit" Text="Fangames (or fanart) are really a gray area in copyright laws since that protects the &quot;work&quot; itself. Here is the dirty secret lawyers don't want you to know; *characters cannot be copyrighted*. Character portrayals can be protected by copyright, since that is actual work, which is what lawsuits specifically on copyright usually hinge on. If you are using someone else's actual art assets then that is a direct violation of copyright.&#xD;&#xA;&#xD;&#xA;The closest anyone got by fully protecting a character portrayal was Disney company who managed to trademark Mickey Mouse's ears. Which is, as Tetrad [mentioned][1], the reason why companies usually send out cease-and-desist on *trademark issues*. Using trademarked names of the game or game characters is an violation of trademark. The reason is that the trademark is rendered useless if the protected name is used regularly in daily speech or denote something different. This is why Google's lawyers have been so adamant about sending cease-and-desist letters telling people to stop &quot;google&quot; for stuff. Another well-known example of trademark under fire has been Xerox.&#xD;&#xA;&#xD;&#xA;As far as I know gameplay mechanics could be patented by software patents (something you can ignore if you're not a US-resident). Patenting gameplay mechanics is ludicrous at this point because the gaming industry hinges on copying mechanics between each other.&#xD;&#xA;&#xD;&#xA;The worst thing that could happen is the offended company sends you a cease-and-desist order, in which your response is to stop working and/or spreading your fan game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/712/legal-issues-for-a-fangame-of-a-commercial-franchise/714#714" />
  <row Id="1525" PostHistoryTypeId="2" PostId="792" RevisionGUID="6dff03b6-d1ef-40ec-a930-53f740a3c6b3" CreationDate="2010-07-19T20:55:32.840" UserId="353" Text="I think you've pretty much answered your own question:&#xD;&#xA;&#xD;&#xA;&gt; To put it in an MVC context: The&#xD;&#xA;&gt; Controllers are the exact same&#xD;&#xA;&gt; (pressing the &quot;Up&quot; Key will set the&#xD;&#xA;&gt; players accelleration at 3.5&#xD;&#xA;&gt; units/second), the Views are totally&#xD;&#xA;&gt; different (2D versus 3D), and the&#xD;&#xA;&gt; Model is the same except for anything&#xD;&#xA;&gt; directly related to graphics.&#xD;&#xA;&#xD;&#xA;So, by providing an adequate abstraction between input, game logic, etc and graphics, you will have solved the problem.&#xD;&#xA;&#xD;&#xA;This is basically the point of the MVC model, especially as it pertains to desktop and web applications: there can be multiple clients accessing and manipulating the same data (a web interface, mobile client, and desktop client for email, for example)." />
  <row Id="1526" PostHistoryTypeId="2" PostId="793" RevisionGUID="8232c538-341f-4d65-a631-2caa894e303d" CreationDate="2010-07-19T20:59:06.293" UserId="162" Text="At my previous job we ported our entire engine (MMO) to 64bit, and ended up running a 64bit client in a few places as part of the development pipeline in order to preprocess data. But, we would never ship a 64bit client to end users. &#xD;&#xA;&#xD;&#xA;First, the performance improvement is very minor, and most PC games end up being GPU limited in any case.&#xD;&#xA;&#xD;&#xA;Second, very few end users have enough ram to take advantage of a 64bit executable, and any engine that is even vaguely designed for consoles (which max at 512mb remember) is not going to be optimized for large available memory.&#xD;&#xA;&#xD;&#xA;Finally, having 2 executables in your distribution pipeline is a giant pain in the ass. You can't only ship a 64bit executable, because then 30% of your audience can't run it. So you have to ship both a 64bit and a 32bit executable, as well as some sort of wrapper that runs the correct one. If you're an online game that means an extra multi-megabyte file to patch every time any code changes, and additional complexity in making sure the right version gets to the right player. It's just not worth the effort for the minor benefits." />
  <row Id="1527" PostHistoryTypeId="2" PostId="794" RevisionGUID="6ffcd772-30b5-452e-a6d2-390487796f01" CreationDate="2010-07-19T21:18:41.400" UserId="47" Text="As an Android game developer, what should I keep in mind while developing my game if I ever wanted to cross-platform the game to the iPhone?  Any strategies, tips, etc. on porting to both of these mobile platforms?" />
  <row Id="1528" PostHistoryTypeId="1" PostId="794" RevisionGUID="6ffcd772-30b5-452e-a6d2-390487796f01" CreationDate="2010-07-19T21:18:41.400" UserId="47" Text="As an Android dev, what should I keep in mind for porting to iPhone?" />
  <row Id="1529" PostHistoryTypeId="3" PostId="794" RevisionGUID="6ffcd772-30b5-452e-a6d2-390487796f01" CreationDate="2010-07-19T21:18:41.400" UserId="47" Text="&lt;iphone&gt;&lt;android&gt;" />
  <row Id="1530" PostHistoryTypeId="5" PostId="789" RevisionGUID="681c0dae-c814-4808-ae89-7ce699b8b80b" CreationDate="2010-07-19T21:35:37.043" UserId="55" Comment="deleted 3 characters in body" Text="Two things... The first one being the most critical  &#xD;&#xA;&#xD;&#xA;**Don't Ignore Marketing**  &#xD;&#xA;You're indie. Nobody knows you. You absolutely need to get yourself out and start building your brand as early as you possibly can. You can't expect to have the next big hit so you need to start dipping your toes into the water early. Marketing is hard. Building a brand can be a full-time position. Spend an hour or two everyday talking to your community or other people to help them discover you.&#xD;&#xA;&#xD;&#xA;Nothing sucks worse than spending a year making something and you don't meet a fraction of your expectations or even reach anything close to your potential.&#xD;&#xA;&#xD;&#xA;**Don't Sacrifice Quality**  &#xD;&#xA;Don't fall into the trap of thinking that just because you're independent that you can't produce something of extremely good quality. Yes, it **will** take you more time to develop than someone with a powerhouse of developers, but you're just going to have to be more creative. If you don't like your artistic style, fix it. If your procedural algorithm routine sucks, fix it. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="1531" PostHistoryTypeId="5" PostId="787" RevisionGUID="6d0a02a7-c4c1-4fc2-98db-7a99f9205c3a" CreationDate="2010-07-19T21:38:33.240" UserId="55" Comment="added 4 characters in body" Text="Imagine writing a book. If you can put together a very short story about your character (1-2 pages), hand it off to somebody and they start to feel for this character, you win...&#xD;&#xA;&#xD;&#xA;Your goal is developing a full-blown character that you could see in the real world. That means you are going to want to break down every component of a real world person into bits and pieces and use that model to mold look and behavior of your own character for a game. &#xD;&#xA;&#xD;&#xA;When you think about describing yourself, or somebody you see, what do you think about? Well, immediately our attention is drawn to what we can see. This is a good place to start.&#xD;&#xA;&#xD;&#xA;  - Describe hair, eyes, ears, nose&#xD;&#xA;  - Describe body type (skinny, athletic, muscular)&#xD;&#xA;  - Describe height and weight&#xD;&#xA;  - Describe clothes that your character wears&#xD;&#xA;&#xD;&#xA;Don't ignore details... Short fingers? Scars? Tattoos? Missing eyeball? One leg? Tearful body odor? &#xD;&#xA;&#xD;&#xA;You can now use those descriptors to assist in bringing your character a personality. &#xD;&#xA;&#xD;&#xA;If you're designing a combat game, you can take the fact that you know your character has scars to describe a hard-fought battle the character was in back during Vietnam. Now that we know that, maybe your character has PTSD which will influence certain game mechanics.&#xD;&#xA;&#xD;&#xA;If you're developing a puzzle game, maybe your character got those scars from a science experiment gone wrong.&#xD;&#xA;&#xD;&#xA;The goal is getting all of the possible creative juice out of you that describes every single detail that you possible can about this character. Give your other designers all of the information that they could possibly need to fit your character into the game world. &#xD;&#xA;&#xD;&#xA;If an Artist is modeling your character they can simply look at your descriptors and recognize the look. They can read a short bio and realize that this guy is a thug or an innocent/clumsy scientist. &#xD;&#xA;&#xD;&#xA;If a musician needs to compose a piece that focuses on your character, they can discern the mood they need from reading a short bio.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1532" PostHistoryTypeId="2" PostId="795" RevisionGUID="36da19ac-da9c-4e5f-8c92-2f5cbf21f90c" CreationDate="2010-07-19T21:52:39.007" UserId="55" Text="That will be a largely painful process going from Java &gt; Objective-C.&#xD;&#xA;&#xD;&#xA;**Data Driven**  &#xD;&#xA;Build a game that is largely data driven. I think this speaks for itself, but this direction leads to less work you must completely re-implement.&#xD;&#xA;&#xD;&#xA;**High and Tight**  &#xD;&#xA;Keep things very small and modularized. I say this because it will be much easier to port if you can easily take a component and implement just it, test and repeat.&#xD;&#xA;&#xD;&#xA;**Conract Work**  &#xD;&#xA;Play your cards right and you might know someone who can take care of this for you. If you're best friends with an iPhone developer you might be able to buy him/her some dr. pepper to help migrate your code over.&#xD;&#xA;&#xD;&#xA;**Conversion /shudder/ Tool**  &#xD;&#xA;And my least favorite recommendation is that you could use some sort of conversion tool to at least get your models converted from Java &gt; C... But... I don't endorse that." />
  <row Id="1533" PostHistoryTypeId="5" PostId="795" RevisionGUID="092554b4-2bf6-486d-9c81-c27eedabcf5f" CreationDate="2010-07-19T22:02:33.833" UserId="55" Comment="added 1 characters in body" Text="That will be a largely painful process going from Java &gt; Objective-C.&#xD;&#xA;&#xD;&#xA;**Data Driven**  &#xD;&#xA;Build a game that is largely data driven. I think this speaks for itself, but this direction leads to less work you must completely re-implement.&#xD;&#xA;&#xD;&#xA;**High and Tight**  &#xD;&#xA;Keep things very small and modularized. I say this because it will be much easier to port if you can easily take a component and implement just it, test and repeat.&#xD;&#xA;&#xD;&#xA;**Contract Work**  &#xD;&#xA;Play your cards right and you might know someone who can take care of this for you. If you're best friends with an iPhone developer you might be able to buy him/her some dr. pepper to help migrate your code over.&#xD;&#xA;&#xD;&#xA;**Conversion /shudder/ Tool**  &#xD;&#xA;And my least favorite recommendation is that you could use some sort of conversion tool to at least get your models converted from Java &gt; C... But... I don't endorse that." />
  <row Id="1534" PostHistoryTypeId="5" PostId="795" RevisionGUID="e09c3021-b084-4e3f-b08e-b221adbf695a" CreationDate="2010-07-19T22:10:50.750" UserId="55" Comment="added multi-platform engine" Text="That will be a largely painful process going from Java &gt; Objective-C.&#xD;&#xA;&#xD;&#xA;**Data Driven**  &#xD;&#xA;Build a game that is largely data driven. I think this speaks for itself, but this direction leads to less work you must completely re-implement.&#xD;&#xA;&#xD;&#xA;**High and Tight**  &#xD;&#xA;Keep things very small and modularized. I say this because it will be much easier to port if you can easily take a component and implement just it, test and repeat.&#xD;&#xA;&#xD;&#xA;**Contract Work**  &#xD;&#xA;Play your cards right and you might know someone who can take care of this for you. If you're best friends with an iPhone developer you might be able to buy him/her some dr. pepper to help migrate your code over. &#xD;&#xA;&#xD;&#xA;**Use a Multi-Platform Engine**  &#xD;&#xA;If you've got a project in motion already then it doesn't make much sense. But if you're about to do a project, that you absolutely know will be ported to other platforms, then it might be worthwhile to take advantage of existing technology to help put your world together. [Unity3D][1] will be getting Android support with Unity 3.0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Conversion /shudder/ Tool**  &#xD;&#xA;And my least favorite recommendation is that you could use some sort of conversion tool to at least get your models converted from Java &gt; C... But... I don't endorse that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/company/news/unity-unveils-3rd-generation-platform-press.html" />
  <row Id="1535" PostHistoryTypeId="5" PostId="360" RevisionGUID="c79c143f-1f47-4f97-9e31-ca755bc8da6f" CreationDate="2010-07-19T23:31:00.357" UserId="208" Comment="added 536 characters in body; edited tags" Text="I want to be able to release my game as open source, and I need to be able to distribute font files with my game. Where can I find fonts which I can use in this way, and what font licenses should I be looking for?&#xD;&#xA;&#xD;&#xA;Are there any further considerations if I want to release my game under GPL rather than a less restrictive open source license such as BSD?&#xD;&#xA;&#xD;&#xA;**Edit:** In response to Olie saying that the question is unclear: My main problem is that fonts which I find on the Internet either do not clearly state their licenses, or have licenses which do not make it clear whether I can distribute the font with software. I know very little about font licenses, but I am looking for sources of fonts which guarantee that the fonts are basically open source / creative commons / public domain / some other font license which allows me to distribute it with a game without paying license fees." />
  <row Id="1536" PostHistoryTypeId="6" PostId="360" RevisionGUID="c79c143f-1f47-4f97-9e31-ca755bc8da6f" CreationDate="2010-07-19T23:31:00.357" UserId="208" Comment="added 536 characters in body; edited tags" Text="&lt;assets&gt;&lt;licensing&gt;&lt;open-source&gt;&lt;fonts&gt;" />
  <row Id="1537" PostHistoryTypeId="2" PostId="796" RevisionGUID="ebe7f269-0867-42fe-ad1f-833cfcb72ef1" CreationDate="2010-07-20T01:09:25.587" UserId="62" Text="Building your game's architecture with a paradigm close enough to MVC to allow complete abstraction of the display code would likely be quite difficult for any large project. However, it seems like the biggest impediment to creating a game that supports both a 2D and 3D client would be designing a game in which both clients are equally capable.&#xD;&#xA;&#xD;&#xA;It would be necessary to begin your game's design with the full intention of creating and supporting the two clients, and it would probably be safest to restrict all game functionality to what makes sense for the 2D client.&#xD;&#xA;&#xD;&#xA;As an example pitfall, if you were not designing to a restricted functionality set you might create levels in which important information or objects were only visible from specific angles. While that would be fine for 3D clients that have 360 degree viewing freedom unless your 2D client explicitly supported a viewing angle that had visibility on each of those important objects, you would be impairing users of the client.&#xD;&#xA;&#xD;&#xA;It would be best to set out a specific number of viewing angles for the 2D client (8 or 16 or such) and develop all content to fit within those constraints. Unfortunately if you have levels and objects that are designed to be viewable only from a specific set of angles, it can look quite odd from within a 3D client.&#xD;&#xA;&#xD;&#xA;In my opinion it would be a poor choice attempt a game design allowing for 2D and 3D clients that are intended to have equal capabilities. I think it would be a better use of resources to design asymmetrical gameplay options, and allow each client to play to its strengths. For example if the 2D client were primarily focused on a strategic-level perspective on the game world, with the 3D client being used for tactical-level gameplay." />
  <row Id="1538" PostHistoryTypeId="6" PostId="758" RevisionGUID="96b62e45-7e2c-4a80-9719-70c761276ef2" CreationDate="2010-07-20T02:42:13.990" UserId="159" Comment="edited tags" Text="&lt;game-design&gt;&lt;tips&gt;&lt;levels&gt;&lt;maps&gt;" />
  <row Id="1539" PostHistoryTypeId="2" PostId="797" RevisionGUID="c689796e-58b3-4262-8be3-cb8b662a8a78" CreationDate="2010-07-20T04:06:08.037" UserId="111" Text="What is an easy way to have sprites collide and react to the collision? E.g. if I'm writing a game in XNA or with Canvas 2D and need to write the code myself very simply. " />
  <row Id="1540" PostHistoryTypeId="1" PostId="797" RevisionGUID="c689796e-58b3-4262-8be3-cb8b662a8a78" CreationDate="2010-07-20T04:06:08.037" UserId="111" Text="Collision and response between sprites?" />
  <row Id="1541" PostHistoryTypeId="3" PostId="797" RevisionGUID="c689796e-58b3-4262-8be3-cb8b662a8a78" CreationDate="2010-07-20T04:06:08.037" UserId="111" Text="&lt;sprites&gt;&lt;collision-detection&gt;" />
  <row Id="1542" PostHistoryTypeId="2" PostId="798" RevisionGUID="1942c2d4-9e6e-4adb-871c-146d97aeed30" CreationDate="2010-07-20T04:17:46.597" UserId="111" Text="Keep it simple if you want it simple: &#xD;&#xA;- Write the game logic to move the objects. Don't store any data on them that is related to rendering. &#xD;&#xA;- Write renderers that are given a chance to look at the state of the game data and draw it.&#xD;&#xA;&#xD;&#xA;You can use more or less complicated programming techniques for this. The only thing you need is a way to get to &quot;extra&quot; data you need to render for each game object. The simplest way is to have zero extra data required! If the game object is a &quot;Wizard&quot;, draw a Wizard. &#xD;&#xA;&#xD;&#xA;If you need more complicated methods, consider polymorphism, memento pattern, hash tables, void* pointers, etc. Don't over engineer it (most of these methods are over engineered)." />
  <row Id="1543" PostHistoryTypeId="5" PostId="761" RevisionGUID="5160b624-326c-4df6-9bb5-de37a12e2914" CreationDate="2010-07-20T04:56:40.027" UserId="288" Comment="Added &quot;Portal&quot; - whoops!" Text="Valve's games with developer commentary (particularly: Half Life 2: Lost Coast, Episode 1 and Episode 2, Team Fortress 2 and Portal) are well worth checking out for some good tips on level design.&#xD;&#xA;&#xD;&#xA;(L4D also has commentry, but I can't remember if it had much about level design in it.)" />
  <row Id="1544" PostHistoryTypeId="2" PostId="799" RevisionGUID="51b6443c-a379-4043-a1b0-14c76b0628e9" CreationDate="2010-07-20T06:08:55.600" UserId="353" Text="The XNA collision series is very thorough for 2D collisions, covering collisions between bounding boxes, heightmaps, and per pixel collsion. The sample is for XNA but the concepts can be transferred elsewhere.&#xD;&#xA;&#xD;&#xA;http://creators.xna.com/en-US/tutorial/collision2drectangle" />
  <row Id="1545" PostHistoryTypeId="2" PostId="800" RevisionGUID="e7b2d8ff-9855-4974-872c-335e23cad84c" CreationDate="2010-07-20T06:30:39.440" UserId="274" Text="After the game is done (either shipped or the project was canned), what is the best way  to make the post mortem, so that it maximizes the chances to never make the same mistakes again?&#xD;&#xA;&#xD;&#xA;1. How do you gather all the needed informations from the team?&#xD;&#xA;2. How do you condense them in the final postmortem?&#xD;&#xA;3. How do you avoid to make the same mistakes in the following project?" />
  <row Id="1546" PostHistoryTypeId="1" PostId="800" RevisionGUID="e7b2d8ff-9855-4974-872c-335e23cad84c" CreationDate="2010-07-20T06:30:39.440" UserId="274" Text="Game Post Mortem" />
  <row Id="1547" PostHistoryTypeId="3" PostId="800" RevisionGUID="e7b2d8ff-9855-4974-872c-335e23cad84c" CreationDate="2010-07-20T06:30:39.440" UserId="274" Text="&lt;learning&gt;&lt;project-management&gt;" />
  <row Id="1548" PostHistoryTypeId="2" PostId="801" RevisionGUID="fbaa6bbb-7525-4c59-901e-58dcec4d9008" CreationDate="2010-07-20T06:44:00.723" UserId="274" Text="While developing the assets for the game, (meshes, textures, sounds, videos) ho do you manage them?&#xD;&#xA;&#xD;&#xA; 1. Keeping them together with the source code&#xD;&#xA;    inside the versioning system? (perforce, git, etc…)&#xD;&#xA; 2. Or having a central back-upped, database&#xD;&#xA;    dedicated to the assets and having&#xD;&#xA;    the editors always work liked to it?&#xD;&#xA;    (PostgreSQL, MySQL, etc…)&#xD;&#xA; 3. Other?&#xD;&#xA;&#xD;&#xA;What are the pro and cons of each, and why one should choose it over the other/s?" />
  <row Id="1549" PostHistoryTypeId="1" PostId="801" RevisionGUID="fbaa6bbb-7525-4c59-901e-58dcec4d9008" CreationDate="2010-07-20T06:44:00.723" UserId="274" Text="Assets Management, database or versioning system?" />
  <row Id="1550" PostHistoryTypeId="3" PostId="801" RevisionGUID="fbaa6bbb-7525-4c59-901e-58dcec4d9008" CreationDate="2010-07-20T06:44:00.723" UserId="274" Text="&lt;assets&gt;&lt;best-practices&gt;" />
  <row Id="1551" PostHistoryTypeId="2" PostId="802" RevisionGUID="492e2aeb-d698-482f-b50e-fcacf5e6d56b" CreationDate="2010-07-20T07:09:26.050" UserId="55" Text="You're gaining valuable insight as you work through the process. For any good business man that works on a project it's fairly easy to tear your project to pieces when analyzing what you did wrong. Figuring out want went right is a little harder.&#xD;&#xA;&#xD;&#xA;How I would approach a thorough postmortem &#xD;&#xA;&#xD;&#xA;**Get All Perspectives in Writing**  &#xD;&#xA;Ask each team member to write a few pages on project observations. Instead of randomly laying a trail for them to fulfill I would ask exact questions that you want to know about. You can supplement this with a meeting, but I rather get someones sole attention without distraction. &#xD;&#xA;&#xD;&#xA;The most obvious questions would be  &#xD;&#xA;&#xD;&#xA; - List your top 5 items you feel went right with the project?&#xD;&#xA; - List your top 5 items you feel went wrong with the project?&#xD;&#xA;&#xD;&#xA;I would supplement those questions with specific questions relating to the team and project that you personally want to know from a management position.&#xD;&#xA;&#xD;&#xA; - How did you feel about working with Box2D instead of Chipmunk? Would you use (x) again?&#xD;&#xA; - Do you feel the project management was able to do x, y, and z for you?&#xD;&#xA;&#xD;&#xA;**&lt;strike&gt;Fail Early&lt;/strike&gt;, Fail Often**  &#xD;&#xA;Well, it is pretty hard to 'fail early' when your project is out of the door. Hopefully the feedback you gain from the above will shed light on processes that may have been pretty dark to you.&#xD;&#xA;&#xD;&#xA;There are problems that you will run against that will sting pretty bad. It'll be pretty difficult to just forget those. &#xD;&#xA;&#xD;&#xA;To make sure that you don't forget the problem areas it could be handy to write a 'Core Value' type list that you keep at arms reach. Keep them available for others to see and for you to see. When the your next project starts I might be inclined to bring some of these to the table to get other people's perspectives. If you have new eyes on the project you might get feedback that could shed new light on solving a particular issue. &#xD;&#xA;&#xD;&#xA;As long as you're aware, and you keep your problems in the light, you're bound to solve those issues.&#xD;&#xA;&#xD;&#xA;**Write It**  &#xD;&#xA;Grab all of the writings and bring it all together. &#xD;&#xA;&#xD;&#xA; 1. Introduction to the project, goals, and anything you feel like sharing about the project process&#xD;&#xA; 2. Top 5 - What went right?&#xD;&#xA; 3. Top 5 - What went wrong?&#xD;&#xA; 4. Conclusion... Bringing it to the end.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1552" PostHistoryTypeId="2" PostId="803" RevisionGUID="2218416a-aa00-4884-89dc-b5e1ed81e5c9" CreationDate="2010-07-20T07:15:01.217" UserId="174" Text="Avoid slippery-slidey ice levels.&#xD;&#xA;&#xD;&#xA;Or at least keep the ice to a minimum." />
  <row Id="1553" PostHistoryTypeId="2" PostId="804" RevisionGUID="c4105409-9e6d-45c2-9e98-771597304768" CreationDate="2010-07-20T07:39:34.560" UserId="140" Text="If you're thinking of porting to the iPhone and your game is still in development, then switch to C++ if you haven't already.&#xD;&#xA;It will make your code significantly more portable when the time comes." />
  <row Id="1554" PostHistoryTypeId="5" PostId="780" RevisionGUID="3650f7b0-3bb4-422a-9523-97f4ea0b2744" CreationDate="2010-07-20T07:40:33.510" UserId="55" Comment="focusing the scope" Text="I find it very difficult to randomly jump on a project with a random individual for free. &#xD;&#xA;&#xD;&#xA;You may find someone willing to join your project for free but they will likely have little to no experience and there is no promise they'll stick around.&#xD;&#xA;&#xD;&#xA;My single, biggest piece of advice to find artist's (or programmers, or audio guys, or ... :&#xD;&#xA;&#xD;&#xA;**Network**  &#xD;&#xA;Have you ever been to the Game Developers Conference? You'll meet some amazing independents there and you don't have to fork out the money to get the top tier pass to meet them (scout events, meet-ups, etc). But if you do pay for a good pass, you might be inclined to jump in an art session to network. ;)&#xD;&#xA;&#xD;&#xA;GDC isn't in everyone's bag-o-tricks so I'd be on the look-out for any game development related events around you. &#xD;&#xA;&#xD;&#xA;If you're in school you can try to put together a meet-up on your campus to bring people out.&#xD;&#xA;&#xD;&#xA;Get yourself out on the web and abuse the forums around you. If you've seen an artist's work send them a message and say hi. They might not be available but they may know a few artists that are.&#xD;&#xA;&#xD;&#xA;While you're developing, thing about starting a development journal on [gamedev.net][1] or blog. My dev journal was what led me to join an independent team from a friendship that sparked.&#xD;&#xA; &#xD;&#xA;**Help Wanted Forums**  &#xD;&#xA;[tigsource.com][2] and [gamedev.net][3] have some pretty friendly help wanted areas. I posted on tigsource for some artistic help and I received a couple of responses. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Contract Work**  &#xD;&#xA;If you don't put in the time to network, you're flat out going to pay for your artwork on freelance websites like odesk, guru, craigslist, or others.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net&#xD;&#xA;  [2]: http://www.tigsource.com/&#xD;&#xA;  [3]: http://www.gamedev.net/" />
  <row Id="1555" PostHistoryTypeId="2" PostId="805" RevisionGUID="1891a5f2-b62e-48bc-a073-dc7c89e58928" CreationDate="2010-07-20T08:28:08.593" UserId="179" Text="Versioning system. With a roll-your-own approach you'd effectively end up rolling a versioning system, so better to use an off the shelf one that's already had years of design/code/test cycles. Keep the assets in a separate repository from the source, to make it easier to keep checkout / sync times to a minimum and take different decisions on how much history to retain (though disk space is cheap, retain it all whenever feasible. Individual textures don't change that much over the life of a project). Mark XML files as binary, merge tools tend to be very bad at merging nested markup and artists aren't likely to spot broken markup if the tool thinks there are no conflicts. If you can, arrange a syntax check or even asset build on every commit and reject the commit with an email back to the person committing if it fails; this will save a great deal of team time." />
  <row Id="1556" PostHistoryTypeId="5" PostId="805" RevisionGUID="348becfc-a962-472b-bdd8-2f817b48baa0" CreationDate="2010-07-20T08:43:26.760" UserId="179" Comment="added 16 characters in body" Text="Versioning system. &#xD;&#xA;&#xD;&#xA;With a roll-your-own approach you'd effectively end up rolling a versioning system, so better to use an off the shelf one that's already had years of design/code/test cycles. &#xD;&#xA;&#xD;&#xA;Keep the assets in a separate repository from the source, to make it easier to keep checkout / sync times to a minimum and take different decisions on how much history to retain (though disk space is cheap, retain it all whenever feasible. Individual textures don't change that much over the life of a project). &#xD;&#xA;&#xD;&#xA;Mark XML files as binary, merge tools tend to be very bad at merging nested markup and artists aren't likely to spot broken markup if the tool thinks there are no conflicts. &#xD;&#xA;&#xD;&#xA;If you can, arrange a syntax check or even asset build on every commit and reject the commit with an email back to the person committing if it fails; this will save a great deal of team time." />
  <row Id="1557" PostHistoryTypeId="2" PostId="806" RevisionGUID="7e7d3a88-138b-446c-b618-40fea84c856b" CreationDate="2010-07-20T13:11:36.100" UserId="288" Text="If what you are after is &quot;shader technique&quot;, rather than mere language reference (read the question, people), I recommend (from easy to advanced):&#xD;&#xA;&#xD;&#xA; - The [Shader section][1] of the XNA samples (obviously requires you use XNA)&#xD;&#xA; - The tutorial series by Petri Wilhelmsen, [starting here][2] (gets more advanced later; is also XNA based)&#xD;&#xA; - The [Nvidia FX Composer][3]'s bundled samples&#xD;&#xA;&#xD;&#xA;And basically either: Try things out and practice, all while absorbing how the &quot;pros&quot; do things. Or pick and choose things that are similar to what you're trying to achieve and work from there.&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/education/catalog/?contenttype=0&amp;devarea=14&amp;sort=1&#xD;&#xA;  [2]: http://digierr.spaces.live.com/blog/cns!2B7007E9EC2AE37B!424.entry&#xD;&#xA;  [3]: http://developer.nvidia.com/object/fx_composer_home.html" />
  <row Id="1558" PostHistoryTypeId="2" PostId="807" RevisionGUID="19562d8a-595d-4509-9b33-925d50d19a3a" CreationDate="2010-07-20T13:13:16.720" UserId="233" Text="I believe that my current game project is very well-suited for educational gaming; so well-suited, in fact, that I know of several different schools (one community college and at least one or two high schools) that have used versions of it at some time or another. And that's without any such marketing on my part.&#xD;&#xA;&#xD;&#xA;I'd like to expand on this part of the potential user base. But I have absolutely no experience in dealing with school administrations. How can I break into this market enough to be noticed?&#xD;&#xA;&#xD;&#xA;And on a side note, could marketing the game as educational kill the gamers market?" />
  <row Id="1559" PostHistoryTypeId="1" PostId="807" RevisionGUID="19562d8a-595d-4509-9b33-925d50d19a3a" CreationDate="2010-07-20T13:13:16.720" UserId="233" Text="How can I get into the educational market?" />
  <row Id="1560" PostHistoryTypeId="3" PostId="807" RevisionGUID="19562d8a-595d-4509-9b33-925d50d19a3a" CreationDate="2010-07-20T13:13:16.720" UserId="233" Text="&lt;marketing&gt;&lt;education&gt;" />
  <row Id="1561" PostHistoryTypeId="2" PostId="808" RevisionGUID="225f1e81-bfa4-4948-ba31-bc0636972b3e" CreationDate="2010-07-20T13:24:27.257" UserId="47" Text="Although dated (2006), this looks to be a good read: http://genyes.com/programs/supplemental/edgames&#xD;&#xA;&#xD;&#xA;**Schools are cheap**: They're on a budget.  Why would they want your game X when they could find something similar for free on the internet?&#xD;&#xA;&#xD;&#xA;And if you are looking into getting your game into non-school markets, take note how few console games have educational games.  You are more likely to see them in handheld or mobile devices.  You might want to consider the iPhone or Android markets." />
  <row Id="1562" PostHistoryTypeId="2" PostId="809" RevisionGUID="821bae4d-af5d-4874-8dd9-8c49dbd74978" CreationDate="2010-07-20T14:51:07.487" UserId="288" Text="In an MMO (not even necessarily an MMORPG) what are some techniques for dealing with players disconnecting in the middle of PvP?&#xD;&#xA;&#xD;&#xA;In particular - how do you avoid adversely affecting people who get disconnected due to network (or even real-life) issues, while not adversely affecting those people that are engaging them?&#xD;&#xA;&#xD;&#xA;And, importantly, how do you ensure that disconnecting cannot be used as a method of cheating?&#xD;&#xA;" />
  <row Id="1563" PostHistoryTypeId="1" PostId="809" RevisionGUID="821bae4d-af5d-4874-8dd9-8c49dbd74978" CreationDate="2010-07-20T14:51:07.487" UserId="288" Text="How do/should MMOs handle disconnection during PvP?" />
  <row Id="1564" PostHistoryTypeId="3" PostId="809" RevisionGUID="821bae4d-af5d-4874-8dd9-8c49dbd74978" CreationDate="2010-07-20T14:51:07.487" UserId="288" Text="&lt;game-design&gt;&lt;network&gt;&lt;mmo&gt;&lt;balance&gt;&lt;pvp&gt;" />
  <row Id="1565" PostHistoryTypeId="2" PostId="810" RevisionGUID="d920168b-8e6f-4c7f-add2-9e6681f5736d" CreationDate="2010-07-20T15:32:00.240" UserId="34" Text="**Write it in C/C++** -- this is the biggest thing you can do.  Both platforms support C and C++, though in different ways.  On Android, you'll be using the NDK.  On the iPhone, it can be compiled along with the Objective-C code.  &#xD;&#xA;&#xD;&#xA;You'll need to invest some time building the scaffolding around your C/C++ code for each platform.  You should be able to be fairly generic in this area, since it's really just connecting up the OS specific functionality into your game code.  Don't skimp in this area unless you're only planning to do one cross-platform project or that you don't mind re-inventing the wheel for every project you do.  &#xD;&#xA;&#xD;&#xA;**Use OpenGL ES** -- both platforms have OpenGL ES support.  Take advantage of it.  This will minimize the amount of code that you need to re-write.  You will still have some differences on each platform, but overall most of your code will work on both.&#xD;&#xA;&#xD;&#xA;**Avoid platform/language specific APIs** -- this should go without saying, but it's easy to be sucked into using the Java collection classes while you are working in Java.  Of course, if you followed the first rule above, you won't be doing much in Java.  Same goes from the opposite way -- as nice as the Foundation classes are in iOS, if you want to port to another platform, avoid them.&#xD;&#xA;&#xD;&#xA;As you can see, there is a lot of things to worry about by going cross-platform.  If you are a small indie developer, it may not even be worth your time.  You will have to evaluate if you really want to blaze your own trail so that you can target multiple platforms.  It may be worth taking advantage of what each platform has to offer in order to have a faster development cycle.&#xD;&#xA;&#xD;&#xA;Good Luck!" />
  <row Id="1566" PostHistoryTypeId="6" PostId="794" RevisionGUID="ef576a14-0f07-4386-b3b8-1884e689442c" CreationDate="2010-07-20T15:32:41.240" UserId="34" Comment="edited tags" Text="&lt;iphone&gt;&lt;android&gt;&lt;cross-platform&gt;" />
  <row Id="1567" PostHistoryTypeId="5" PostId="707" RevisionGUID="7364d20b-5e09-4bae-ada9-91f008d7202c" CreationDate="2010-07-20T15:34:56.857" UserId="34" Comment="added 4 characters in body" Text="I think this question is really a larger unasked question -- should I use **X** in my **Y**?  And the only way to really answer that is to try it for yourself.  For every person you find that says that X works great, you'll find someone who says it's horrible.  And both of them are right -- for their project.&#xD;&#xA;&#xD;&#xA;The great thing about software, unlike most other disciplines, is that you can always change things later on if you find it's not working the way you would like it.  You find out later that STL isn't working for you in this project?  Rip it out, put something else in it's place.  Don't like how you divided the duties among your objects? Refactor.  Don't like that you used objects?  Replace them with straight C methods.  Don't like everything being stored in structs and methods to manipulate them?  Replace them with C++ objects.&#xD;&#xA;" />
  <row Id="1568" PostHistoryTypeId="2" PostId="811" RevisionGUID="fa0ec02f-bd33-4e91-8245-96b8e8564429" CreationDate="2010-07-20T15:35:56.153" UserId="288" Text="For many of us - especially working on smaller games - you **absolutely should have assets in the same repository as your source**.&#xD;&#xA;&#xD;&#xA;The suggestion that assets belong in a separate repository only makes sense for very large sets of assets, or for somewhat-large sets of assets when there's a clearly defined engine/data boundary. Unless there's a specific technical reason for it - it's bad advice!&#xD;&#xA;&#xD;&#xA;You want your version control to *behave like version control*. You want to be able to rewind and fast-forward and branch and merge revisions and still have your game working. And your code and assets *will* depend on each other.&#xD;&#xA;&#xD;&#xA;For example: Your code might expect to be able to set a parameter on a shader, and that shader might depend on a texture being there. Or maybe the data format of your levels might depend on a particular version of your game code.&#xD;&#xA;&#xD;&#xA;It almost certainly will get messy. And you have better things to do than to try and keep it tidy.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Now, as Mike Wagner commented ([on this answer][1]) - you don't want or need all the &quot;in progress&quot; versions of your assets under version control! Just the final/working version, as used by your code, will do - often this is what you export from your tool.&#xD;&#xA;&#xD;&#xA;(Although if you do want to version-control the in-progress versions of assets - that's fine. And well suited to a separate repository. I personally find that good folder organisation and a proper backup system suffices.)&#xD;&#xA;&#xD;&#xA;That being said - it's sometimes nice to have the option to just stick &quot;in progress&quot; assets under version control. Typically this involves having a content pipeline that can handle any 'export' steps for you - for example: flatting a multi-layer image to a single texture.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/801/assets-management-database-or-versioning-system/805#805" />
  <row Id="1569" PostHistoryTypeId="5" PostId="811" RevisionGUID="8f610f31-605b-45a4-822e-b909ee8e5b84" CreationDate="2010-07-20T15:46:48.280" UserId="288" Comment="added 2 characters in body" Text="For many of us - especially working on smaller games - you **absolutely should have assets in the same repository as your source**.&#xD;&#xA;&#xD;&#xA;The suggestion that assets belong in a separate repository only makes sense for very large sets of assets, or for somewhat-large sets of assets when there's a clearly defined engine/data boundary. Unless there's a specific technical reason for it - it's bad advice!&#xD;&#xA;&#xD;&#xA;You want your version control to *behave like version control*. You want to be able to rewind and fast-forward and branch and merge revisions and still have your game working. And your code and assets *will* depend on each other.&#xD;&#xA;&#xD;&#xA;For example: Your code might expect to be able to set a parameter on a shader, and that shader might depend on a texture being there. Or maybe the data format of your levels might depend on a particular version of your game code.&#xD;&#xA;&#xD;&#xA;It almost certainly will get messy. And you have better things to do than to try and keep it tidy.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Now, as Mike Wagner commented ([on this answer][1]) - you don't want or need all the &quot;in progress&quot; versions of your assets under version control! Just the final/working version, as used by your code, will do - often this is what you export from your tool.&#xD;&#xA;&#xD;&#xA;(Although if you do want to version-control the in-progress versions of assets - that's fine. And well suited to a separate repository. I personally find that good folder organisation and a proper backup system suffices.)&#xD;&#xA;&#xD;&#xA;That being said - it's sometimes nice to have the option to just stick &quot;in progress&quot; assets under version control. Typically this involves having a content pipeline that can handle any 'export' steps for you - for example: flattening a multi-layer image to a single texture.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/801/assets-management-database-or-versioning-system/805#805" />
  <row Id="1570" PostHistoryTypeId="2" PostId="812" RevisionGUID="cc7775d8-5c36-47f8-9592-78f38a9763d7" CreationDate="2010-07-20T15:57:32.547" UserId="350" Text="Popular MMORPG [RuneScape][1] uses a 1 minute timer. When you disconnect, your character remains in the world for a full minute, vulnerable to attacks and what not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://runescape.com" />
  <row Id="1571" PostHistoryTypeId="2" PostId="813" RevisionGUID="24aeba2f-22fb-4bf3-b7b2-42ddcfabd68a" CreationDate="2010-07-20T16:25:42.150" UserId="323" Text="The one who disconnected will die once he gets stabbed enough, and the other one will be credited for the kill. Anything more lenient will be exploited.&#xD;&#xA;&#xD;&#xA;Generally there's a 1- to 5-minute timer before your body leaves the world." />
  <row Id="1572" PostHistoryTypeId="2" PostId="814" RevisionGUID="7d42a84c-f71d-4d57-9a38-881c83bb7184" CreationDate="2010-07-20T16:28:22.163" UserId="47" Text="There is no way to determine what caused the disconnection (did the power go off? did I rage throw my machine against a wall?), so you can only assume that the user is trying (or would try) to cheat and make them vulnerable for X minutes." />
  <row Id="1573" PostHistoryTypeId="5" PostId="768" RevisionGUID="634a8713-ef5d-475d-b0bd-1fcf23539281" CreationDate="2010-07-20T16:30:11.523" UserId="47" Comment="added 4 characters in body" Text="**Don't burnout early.**&#xD;&#xA;&#xD;&#xA;You don't want to get started an awesome game idea and then burnout after a couple of weeks because of poor planning.  Games take a long time to make, so make small, realistic goals." />
  <row Id="1574" PostHistoryTypeId="2" PostId="815" RevisionGUID="fd52d8c4-e29b-416a-ac0e-9d4bfa62311e" CreationDate="2010-07-20T16:31:14.487" UserId="323" Text="If you've got a system where the logic is expensive and must be done mostly on the client to save server cycles, you can implement a probabilistic cheat detection system. Every few minutes it chooses a different few players to inspect closely and consistency-check on the server. Since cheaters rarely limit their cheating to short and rare periods of time, they *will* be caught eventually.&#xD;&#xA;&#xD;&#xA;Another benefit to this is that they won't have a rapid turnaround cycle for development - if it takes 10 hours of gameplay on average for the server to pay attention to you, then that's a 10-hour turnaround cycle every time you want to see if something worked. And if it *did* work, it's even longer because they won't know if the server has given them a thumbs-up or just hasn't gotten around to them." />
  <row Id="1575" PostHistoryTypeId="2" PostId="816" RevisionGUID="6c851828-8de4-47c2-aa46-bd50b8820ed0" CreationDate="2010-07-20T16:32:00.087" UserId="47" Text="**Don't make a bunch of &quot;jump&quot; puzzles.**  &#xD;&#xA;&#xD;&#xA;There is nothing more frustrating than having to do the same jump about ten times until you get it perfectly right (or you have to redo previous jumps because you missed the Xth jump and have to start over)." />
  <row Id="1576" PostHistoryTypeId="2" PostId="817" RevisionGUID="1c4db6ad-e4ac-4668-9cd9-7db26254606d" CreationDate="2010-07-20T17:10:34.997" UserId="222" Text="I think the only way to pull this off would be a matter of the structure of your game. Theres' two ways to make cheating less desirable: punishment or reward. So if you don't want adverse punishment think of ways to reward the player who didn't drop.&#xD;&#xA;&#xD;&#xA;Instead of the reward from PvP being the loot of the conquered's body (which makes dropping a very bad thing) make winning bestow some reward like exp., gold, or something else entirely (Points? Ranking?). If one of the players is kicked off then the remaining player receives the reward and the player who was kicked off gains nothing but loses nothing. Unless it's a ranking system in which case the player leaving might lose some ranking points." />
  <row Id="1577" PostHistoryTypeId="2" PostId="818" RevisionGUID="2b4c52ed-cec2-4676-b75a-85c027a86056" CreationDate="2010-07-20T17:26:42.910" UserId="222" Text="Give the player the information they need to succeed. If the solution to a level relies on something obscure or some new ability then teach the player about it. There doesn't have to be some specific tutorial where you spell it out, rather you can teach the player using cut scenes or making small puzzles at the start of the level that introduce new concepts at a basic but explicit level." />
  <row Id="1578" PostHistoryTypeId="2" PostId="819" RevisionGUID="8cce9c0c-a1ab-4afc-a98d-1c6065e59d53" CreationDate="2010-07-20T17:50:54.817" UserId="14" Text="Were they your previous versions? If so, can you build a marketing agenda based on them? (Use cases, testimonials, and what not)&#xD;&#xA;&#xD;&#xA;If not, then the first step I recommend doing is:&#xD;&#xA;&#xD;&#xA;Find a decent sized school, and offer it to them for free. Like Bryan said before me, schools are cheap. The administration already has enough trouble without wondering why they should purchase your product. By removing that, they will be a little bit warmer to a pitch. &#xD;&#xA;&#xD;&#xA;You do of course, still have to pitch &lt;sup&gt;:1&lt;/sup&gt;. But in it, you would want to maybe work out an arrangement where you can collect relevant data for future pitches and what not. Impact on Student Education overall &lt;sup&gt;:2&lt;/sup&gt;, student/teacher testimonials.&#xD;&#xA;&#xD;&#xA;Why? &#xD;&#xA;&#xD;&#xA;Schools seem very receptive to what other schools are doing, students are very social and there always seems to be talk about what other people have. I've noticed that among colleges a good deal of the intranet is shared (same email solution, same billing, same online courses). Or even to use a bigger *and far more broken example*, look at how quickly Facebook took off among college students.&#xD;&#xA;&#xD;&#xA;After your foot is in the door, you can refer back to how it helped this school (because if something is beneficial and THEY have it, WE want it too. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;As for your sidenote. IMO:&#xD;&#xA;&#xD;&#xA;It may drive off some 'core' gamers (*The group that commonly considers themselves the majority of gamers.*) but looking at the success of casual games. The numbers seem to say that either the larger part of the market is of a younger / older age. Or they are the only people spending the money :p&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1579" PostHistoryTypeId="2" PostId="820" RevisionGUID="2d082383-2e05-4bdf-843d-c8c76be0efd6" CreationDate="2010-07-20T17:58:13.120" UserId="55" Text="It would be an advantage if you could get with the schools that you know who use your product and get them to write a recommendation about it. Use that when you are out pitching to other schools. If you can find hard numbers / results that would be extremely helpful. &#xD;&#xA;&#xD;&#xA;You need to turn yourself into a door-to-door salesman. It'll be a lot of foot work and a lot of convincing revolving around why they should use your product. Call schools and ask if you can get a moment of the deans, assistant dean, principle, etc time to talk about a very useful product you feel would be a very important learning tool. If you can't get them, then someone else that represents the school.&#xD;&#xA;&#xD;&#xA;A plus on the university front is that you can approach the separate colleges within the university and pitch to their staff, which is probably what you want to do for a game project. You figure you can approach one University and have 6 or so meetings/potential clients. Not bad.&#xD;&#xA;&#xD;&#xA;I've been on this road before but my buddy was selling an application vs. a game product. Games will be a tough sell unless you can really show what it can do. I might market it under a different buzzword instead of purely 'Game.' Simulation? Serious Game Project?" />
  <row Id="1580" PostHistoryTypeId="2" PostId="821" RevisionGUID="34080f4a-5162-48d2-b29b-0cc964738527" CreationDate="2010-07-20T18:50:39.377" UserId="290" Text="How about attending a conference like this one from the [American Association of School Administrators][1] in February?  As [David][2] mentioned, get references if possible and then set up a booth and sell it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.aasa.org/nce/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/users/55/david-mcgraw" />
  <row Id="1581" PostHistoryTypeId="2" PostId="822" RevisionGUID="e981ccfa-5de8-46ab-85fb-df791be56b3f" CreationDate="2010-07-20T19:37:54.353" UserId="10" Text="Let's say you have a game board that you look at. It does not move but there is some action going on. For example Chess, Checkers, Solitaire. The game I'm working on is not one of this but it's a good reference.&#xD;&#xA;&#xD;&#xA;What are some methods you can apply to the game or the design that increases the appeal of the user to the game.&#xD;&#xA;&#xD;&#xA;Of course you can make it prettier but what are some other methods you can use? &#xD;&#xA;&#xD;&#xA;For example: Visual queues, game design changes, user interface arrangement, etc." />
  <row Id="1582" PostHistoryTypeId="1" PostId="822" RevisionGUID="e981ccfa-5de8-46ab-85fb-df791be56b3f" CreationDate="2010-07-20T19:37:54.353" UserId="10" Text="When dealing with a static game board, what are some methods to make it more interesting?" />
  <row Id="1583" PostHistoryTypeId="3" PostId="822" RevisionGUID="e981ccfa-5de8-46ab-85fb-df791be56b3f" CreationDate="2010-07-20T19:37:54.353" UserId="10" Text="&lt;game-design&gt;" />
  <row Id="1584" PostHistoryTypeId="2" PostId="823" RevisionGUID="5181fefa-e52f-497d-97d3-56c0a9afa447" CreationDate="2010-07-20T20:14:15.187" UserId="162" Text="One thing that many strategy games do is to provide a series of informational overlays that you can filter on top of a static board. Playing a game like Europa Universalis 3, it has a wide variety of filters that really let you delve into the deeper structure of the game. You have your simple &quot;what country owns this province&quot; layer, but you can also have it colored according to economic strength or etc. For a game like chess, you could add an overlay that indicates relative strength of positioning, which could help players learn about setting up mutually reinforcing positions. Since we're talking a video game here you could make some really interesting, user tweakable overlays if you devoted development time to it.&#xD;&#xA;&#xD;&#xA;Another interesting idea I saw recently was in a XBLA strategy game called Greed Corp. If you watch a [video][1] of it being played, you can see that it takes place on a turn based hex grid similar to any number of board games. But, there's an interesting game design choice that makes it work significantly better in video game form: the board changes as you perform actions. &quot;mining&quot; a square lowers the height of adjacent tiles and by the end of the game the terrain is drastically different from when it started. This isn't really a &quot;static&quot; board, but you can apply a similar concept (such as outlawing certain squares temporarily) to any board game design to make it more dynamic and suited to video game form.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.giantbomb.com/quick-look-ex-greed-corp/17-1898/" />
  <row Id="1585" PostHistoryTypeId="2" PostId="824" RevisionGUID="e5c890c6-e051-4604-96c1-269d37929f6f" CreationDate="2010-07-20T20:32:36.483" UserId="162" Text="A variety of video games use uniformly distributed numbers to decide the outcome of an event, such as a &quot;50% chance to hit&quot; almost always means to check if a random floating point number from 0-1 is greater than 0.5. Many games will layer a few of these uniform percentages on top of each other, for instance a D&amp;D hit roll is a uniformly distributed number from 1-20, except that 1 and 20 have special outcomes. To my mind it seems like things like critical hits are added by designers to try and emulate the fact that in reality hitting/missing or winning/losing is not actually a binary outcome.&#xD;&#xA;&#xD;&#xA;In many cases the real life amount of &quot;damage&quot; done by an attack would likely be closer to a gaussian/bell curve distribution, which many results in the middle but the occasional very exciting outlier and smooth curve connecting them. Dice games like Settlers of Catan emulate gaussian distributions by adding together multiple independent rolls, but I feel like I've almost never seen this mechanic in video games. &#xD;&#xA;&#xD;&#xA;It seems like games like Civilization (Sid Meier talked extensively at GDC about player perception not matching the actual math used in the game) would benefit from results that matched how things work in the real world. Have any video games used a gaussian or otherwise non-uniform distribution of random numbers in interesting ways? " />
  <row Id="1586" PostHistoryTypeId="1" PostId="824" RevisionGUID="e5c890c6-e051-4604-96c1-269d37929f6f" CreationDate="2010-07-20T20:32:36.483" UserId="162" Text="Have any video game designs used non-uniform random numbers in interesting ways?" />
  <row Id="1587" PostHistoryTypeId="3" PostId="824" RevisionGUID="e5c890c6-e051-4604-96c1-269d37929f6f" CreationDate="2010-07-20T20:32:36.483" UserId="162" Text="&lt;game-design&gt;&lt;random&gt;" />
  <row Id="1588" PostHistoryTypeId="2" PostId="825" RevisionGUID="c178a2e8-e07b-485a-95b9-d0ad59584eb2" CreationDate="2010-07-20T20:43:58.533" UserId="8" Text="As a player, one thing that makes some games stand apart from others is getting the movement animations right. They must feel natural and not forced or be distracting. A few examples:&#xD;&#xA;&#xD;&#xA;* In checkers, the piece should not move in a direct line from square to square. Instead, make it move as if the player would move it, in an arc. But too big an arc becomes distracting.&#xD;&#xA;* The way gems fall in Bejeweled sets it apart from many of its clones.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I don't really have any tips on exactly how to achieve this, though. A lot of it must be attention to detail combined with trial and error." />
  <row Id="1589" PostHistoryTypeId="2" PostId="826" RevisionGUID="d2424ea2-caf4-4d59-b4a1-c7f6fe9f7648" CreationDate="2010-07-20T20:47:49.473" UserId="353" Text="The way this is handled by EVE Online is as follows:&#xD;&#xA;&#xD;&#xA;- Ship starts to engage warp 15 seconds after disconnect. If it is warp scrambled  the ship will not warp away. (Your character's ship will start to &quot;run away&quot; after 15 seconds, unless it is &quot;trapped&quot; by another player)&#xD;&#xA;&#xD;&#xA;- PVP timer (time until player &quot;runs away&quot; while engaged in PvP combat) is set to 3 minutes. (This is to counter a number of other timers).&#xD;&#xA;&#xD;&#xA;- NPC timer stays at 1 minute, but ship warps away after 15 seconds unless warp scrambled by NPC.&#xD;&#xA;&#xD;&#xA;- When a ship is target locked by player, it should switch to the pvp timer (to counter it using the 1 min timer if it disconnects under circumstances where it isn't targetable until the timer is set)." />
  <row Id="1590" PostHistoryTypeId="5" PostId="822" RevisionGUID="5aa941a2-7a30-40ec-bd9f-423312ddc07a" CreationDate="2010-07-20T20:55:09.520" UserId="10" Comment="deleted 2 characters in body" Text="Let's say you have a game board that you look at. It does not move but there is some action going on. For example Chess, Checkers, Solitaire. The game I'm working on is not one of this but it's a good reference.&#xD;&#xA;&#xD;&#xA;What are some methods you can apply to the game or the design that increases the appeal of the user to the game.&#xD;&#xA;&#xD;&#xA;Of course you can make it prettier but what are some other methods you can use? &#xD;&#xA;&#xD;&#xA;For example: Visual cues, game design changes, user interface arrangement, etc." />
  <row Id="1591" PostHistoryTypeId="2" PostId="827" RevisionGUID="1db1befd-81a7-47de-9080-cef140a65991" CreationDate="2010-07-20T21:45:07.843" UserId="34" Text="Don't underestimate the power of having good sound effects.  Combined with good animations, the sound effects can provide a bit of realism to your game.  And don't simply use the same ones over and over -- for each sound that you have in the game, you should have a few different versions that you randomly pick for each one.  If you can adjust the volume and panning based on where the sound is coming from, even better." />
  <row Id="1592" PostHistoryTypeId="2" PostId="828" RevisionGUID="711a2dd4-4242-4b0b-b6a6-2f8046e9df91" CreationDate="2010-07-20T21:46:00.993" UserId="222" Text="The chief difference between movies &amp; books and games is interactivity. The player of a game has an active involvement in the world and is (usually) not just an observer of events. Other than this a game character is much like a movie character and should be created and thought about in much the same way. For instance, expressiveness like [Sean James mentions][1]. There's also creating realistic dialog, good acting (vocal, if present, as well as physical movements), etc.&#xD;&#xA;&#xD;&#xA;With that being said, the main problem in such an interactive environment is keeping [suspension of disbelief][2]. It's extremely easy to be knocked out of the game world when a character repeats themselves countless times, walks into walls, generally acts stupid. Care should be given to ensuring that the character behaves properly when interacting with the game's world, environment, and characters.&#xD;&#xA;&#xD;&#xA;Also, a lot of care should be taken into considering how the player will interact with this character and how the character should react when the player does whatever they do. If you foresee something the player might try to do to the character and the character reacts in a way consistent with their personality then you have a believable character and the player will be that much more sucked into the world you're creating. For instance, if a player whacks an NPC have them yell &quot;Stop it!&quot; and then &quot;I'm warning you!&quot; and then start fighting back.&#xD;&#xA;&#xD;&#xA;Of course, if the game is presented in scripted events (like RPGs), it's even easier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/718/game-characters-vs-characters-in-other-medias/730#730&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Suspension_of_disbelief" />
  <row Id="1593" PostHistoryTypeId="2" PostId="829" RevisionGUID="280dbbae-d6a0-4287-b29b-bafb3451e4a4" CreationDate="2010-07-20T21:47:26.127" UserId="190" Text="Shooters often use Gaussian random distribution for weapon accuracy. (If you use linear random numbers and you have bullet decals, it's very easy for a player to see that the accuracy distribution is square, which &quot;feels wrong.&quot;)&#xD;&#xA;&#xD;&#xA;One interesting random selection method that you don't mention, but which shows up fairly often in games, is &quot;random without replacement.&quot; This is analogous to drawing cards from a deck; the game runs in random order through a set of possible outcomes (put together with the desired distribution) and then &quot;reshuffles.&quot; This is done to reduce the chance of lucky or unlucky streaks." />
  <row Id="1594" PostHistoryTypeId="2" PostId="830" RevisionGUID="f3a704af-d6f6-485d-a1d7-7f1f3ea8f81f" CreationDate="2010-07-20T21:57:10.380" UserId="363" Text="Which [continuous integration][1] technology &amp; software would you recommend for use with games?&#xD;&#xA;&#xD;&#xA;Also are there any build technology libraries or specific languages you would recommend to use when a custom part of the game asset pipeline needs to be coded in-house?&#xD;&#xA;&#xD;&#xA;Are there any good resources for demonstrating the business case for using continuous and automated build systems for games?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Continuous_integration" />
  <row Id="1595" PostHistoryTypeId="1" PostId="830" RevisionGUID="f3a704af-d6f6-485d-a1d7-7f1f3ea8f81f" CreationDate="2010-07-20T21:57:10.380" UserId="363" Text="What continuous integration technology is used for games?" />
  <row Id="1596" PostHistoryTypeId="3" PostId="830" RevisionGUID="f3a704af-d6f6-485d-a1d7-7f1f3ea8f81f" CreationDate="2010-07-20T21:57:10.380" UserId="363" Text="&lt;assets&gt;&lt;languages&gt;&lt;pipeline&gt;" />
  <row Id="1597" PostHistoryTypeId="2" PostId="831" RevisionGUID="aa7f447b-6738-441b-8b1f-10b6c4d32292" CreationDate="2010-07-20T22:25:48.157" UserId="305" Text="Characters in videogames are strongly defined by what they **do**, particularly player characters. Lara Croft jumps, grabs, swims, and shoots. Mario's original name is &quot;Jumpman.&quot; Megaman bosses are defined by their attacks. In other media, other qualities may come to the fore, such as character history, personality, perspective on life, or inner conflict. For visual media (e.g. animation and film), appearance is paramount, and in audio storytelling formats (e.g. radio drama), just the voice can be a defining characteristic.&#xD;&#xA;&#xD;&#xA;Games are about verbs, so when you adapt a character from other media into games, think about what kinds of actions are unique to that character and make him or her distinctive. Spider-Man slings webs. James Bond shoots, drives, quips, and seduces. Transformers... well, you know. One pitfall in adaptation would be to faithfully copy a character's appearance, environment, voice, and even personality, while giving them an action set that is irrelevant or even antithetical to his or her character. This may not necessarily result in a bad game per se, but it would probably be a poor adaptation.&#xD;&#xA;&#xD;&#xA;This is a huge generalization, of course. Certain genres of film, e.g. Asian kung-fu cinema, are hugely based on verbs. Conversely, non-action qualities are still valuable for game character design. Still, &quot;what does this character **do?**&quot; is a very useful question to be asking in pre-production." />
  <row Id="1600" PostHistoryTypeId="2" PostId="833" RevisionGUID="94fd9808-53e7-44b9-a5e5-e88e4ecd8f3c" CreationDate="2010-07-20T23:29:43.247" UserId="211" Text="[CruiseControl.NET][1] is a good choice that we've used in-house a few times; it's free, and it comes with a desktop app that clearly shows you when people are breaking the build.&#xD;&#xA;&#xD;&#xA;There's also [Pulse][2], which is extremely well featured and has a spiffy web interface. It's comes with a cost, however, as you need a license to run it per build server.&#xD;&#xA;&#xD;&#xA;We use our CI servers to build our code whenever anyone makes a commit, which is the standard use case - but all of our game assets are set up to be built by our CI servers, and we're about to hook up daily disc builds, so that our QA team has an ISO build ready to test every morning.&#xD;&#xA;&#xD;&#xA;It saves a lot of programmer time (invariably, it's always a programmer that does this stuff) in having to manually build code/assets/discs all the time.&#xD;&#xA;&#xD;&#xA;  [1]: http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET&#xD;&#xA;  [2]: http://zutubi.com/products/pulse/" />
  <row Id="1604" PostHistoryTypeId="2" PostId="835" RevisionGUID="60946191-d127-4e1f-a14b-023b11e9f7a8" CreationDate="2010-07-21T00:31:11.960" UserId="55" Text="**Buildbot**  &#xD;&#xA;I know several studios in games and visual effects that use Buildbot. &#xD;&#xA;&#xD;&#xA;Over the past year I've worked with our build system to implement a continuous integration strategy for the studio. We are a multi-platform studio (win, lin, osx) which Buildbot can handle well. I'm able to fire up slaves on multiple boxes, execute, and report back to the master so it can display the results. I can see box execution logs from the master whenever I want. I can hook into other slaves so when one slave finishes it fires off a signal for other slaves to start. &#xD;&#xA;&#xD;&#xA;So far I have really enjoyed using it and still don't really know it's absolute capabilities. I think the biggest pain will be setup. I wasn't involved in setting the one at my studio up, but it sounded like a pain.&#xD;&#xA;&#xD;&#xA; - Example: http://build.webkit.org/waterfall" />
  <row Id="1605" PostHistoryTypeId="5" PostId="831" RevisionGUID="29619a37-8611-4a46-97d5-e8353bfe9b26" CreationDate="2010-07-21T00:56:17.883" UserId="305" Comment="Overused the word &quot;character&quot;. Tried some other synonyms." Text="Characters in videogames are strongly defined by what they **do**, particularly player characters. Lara Croft jumps, grabs, swims, and shoots. Mario's original name is &quot;Jumpman.&quot; Megaman bosses are defined by their attacks. In other media, other qualities may come to the fore, such as character history, personality, perspective on life, or inner conflict. For visual media (e.g. animation and film), appearance is paramount, and in audio storytelling formats (e.g. radio drama), just the voice can be a defining characteristic.&#xD;&#xA;&#xD;&#xA;Games are about verbs, so when you adapt a character from other media into games, think about what kinds of actions are unique to that character and make him or her distinctive. Spider-Man slings webs. James Bond shoots, drives, quips, and seduces. Transformers... well, you know. One pitfall would be to faithfully reproduce a character's appearance, environment, voice, and even personality to a game, while giving him or her an action set that is irrelevant or even antithetical to his or her behavior from the source material. This may not necessarily result in a bad game per se, but it would probably be a poor adaptation.&#xD;&#xA;&#xD;&#xA;This is a huge generalization, of course. Certain genres of film, e.g. Asian kung-fu cinema, are hugely based on verbs. Conversely, non-action qualities are still valuable for game character design. Still, &quot;what does this character **do?**&quot; is a very useful question to be asking in pre-production." />
  <row Id="1606" PostHistoryTypeId="2" PostId="836" RevisionGUID="67f3cd11-961f-4baf-a9c4-7618d9a1597b" CreationDate="2010-07-21T01:04:00.893" UserId="189" Text="**[Hudson][1]** is by far the best continuous integration app ever.&#xD;&#xA;&#xD;&#xA;It's free (open source I think), and it comes packaged in a single .war file, or you can opt for the standalone package with a small Tomcat (I think) application server -- either way, super easy install.&#xD;&#xA;&#xD;&#xA;The user interface is amazing. The list of plugins goes on and on (it'll be compatible with whatever systems you use - bug trackers, source control systems, etc.). You can have multiple user accounts with different permissions. Adding a project, tweaking settings, or viewing previous runs is all really easy to do through the browser.&#xD;&#xA;&#xD;&#xA;You really just have to try it. Don't bother configuring text files like Cruise Control requires; Hudson is a night-and-day difference from that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hudson-ci.org/" />
  <row Id="1609" PostHistoryTypeId="2" PostId="837" RevisionGUID="d7f6ce3c-a4d7-433b-bd8d-8ce47ce6b039" CreationDate="2010-07-21T02:40:51.957" UserId="288" Text="One example of a game that does this, that it worth looking at, is the card game &quot;Magic: The Gathering – Duels of the Planeswalkers&quot;. Particle effects, sound effects, and lots and lots of animation paths for the cards." />
  <row Id="1610" PostHistoryTypeId="4" PostId="7" RevisionGUID="207c362e-df06-48b9-8172-31aa03931807" CreationDate="2010-07-21T05:15:07.437" UserId="13" Comment="edited tags; edited title" Text="What are typical pitfalls when writing games with a managed Languages like C#?" />
  <row Id="1611" PostHistoryTypeId="6" PostId="7" RevisionGUID="207c362e-df06-48b9-8172-31aa03931807" CreationDate="2010-07-21T05:15:07.437" UserId="13" Comment="edited tags; edited title" Text="&lt;xna&gt;&lt;c#&gt;&lt;pitfalls&gt;" />
  <row Id="1612" PostHistoryTypeId="2" PostId="838" RevisionGUID="759ad2f0-d0c4-439f-9e32-d6ce2b748ca8" CreationDate="2010-07-21T05:57:33.230" UserId="362" Text="**No water levels please.**  &#xD;&#xA;  &#xD;&#xA;You can generalize this to a few good tips:  &#xD;&#xA;  &#xD;&#xA;* Don't make the levels frustrating -- Don't make the player needlessly backtrack around the level. Don't make the level dependent on some split second timing to get right (and screwed if you don't). Play through the level a few times. Get others to play through it as well. Make sure that you all find it fun. If you don't, chances are not good that the majority of people will either.  &#xD;&#xA;  &#xD;&#xA;* Don't make all the typical levels -- Underwater, on ice or snow, surrounded by fire, moving platforms with bottomless pits, etc. It's okay to have some to provide familiarity, but of course you want your game to stand out. For that, you're gonna have to come up with some sort of setting and mechanic that is unique and interesting (while keeping point#1 in mind).  &#xD;&#xA;  &#xD;&#xA;* When introducing a new mechanic (player moves differently, player gets a new tool, etc.), don't make the level hard. Keep it simple. Allow the player time to adjust and learn what you have just thrown into the game. You can then reuse the mechanic in a later level and ramp up difficulty then.  &#xD;&#xA;  &#xD;&#xA;* Make levels meaningful and have purpose that fits in with the overall game or story. Don't make the player go in the water just because you can. And definitely don't make any items suddenly not work just for the sake of &quot;making the level harder&quot;. Find some other way, or don't do the level. People don't like levels that suddenly make everything they've been using up to that point useless. It makes the whole level seem like torture.&#xD;&#xA;&#xD;&#xA;There are other things you can learn about how (not) to design levels if you just do research (by which I mean Google) on &quot;why water levels suck&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1613" PostHistoryTypeId="2" PostId="839" RevisionGUID="e9dd45fc-3dbc-4a93-add0-420a0ebfb11d" CreationDate="2010-07-21T06:50:40.423" UserId="362" Text="* Kill X number of monsters.  &#xD;&#xA;* Gather Y number of items (usually by killing X number of monsters). &#xD;&#xA;* Deliver this NPC's package to this other NPC who is far far away.  &#xD;&#xA;* etc.  &#xD;&#xA;  &#xD;&#xA;Yeah. These quests are easy to implement, easy to complete, but also very boring after the first few times. It's kind of disingenuous to call them quests really; they're more like chores or errands.&#xD;&#xA;&#xD;&#xA;**What ideas for quests have people seen that were well designed, immersive, and rewarding? What specific things did the developers do that made it so?**  &#xD;&#xA;  &#xD;&#xA;**What are some ideas you would use (or have used) to make quests more interesting?**" />
  <row Id="1614" PostHistoryTypeId="1" PostId="839" RevisionGUID="e9dd45fc-3dbc-4a93-add0-420a0ebfb11d" CreationDate="2010-07-21T06:50:40.423" UserId="362" Text="Creating meaningful and engaging quests." />
  <row Id="1615" PostHistoryTypeId="3" PostId="839" RevisionGUID="e9dd45fc-3dbc-4a93-add0-420a0ebfb11d" CreationDate="2010-07-21T06:50:40.423" UserId="362" Text="&lt;game-design&gt;" />
  <row Id="1616" PostHistoryTypeId="2" PostId="840" RevisionGUID="84ca5759-cef1-445d-bf19-3c68cde2f5a9" CreationDate="2010-07-21T07:30:43.467" UserId="51" Text="The things I've seen that have made quests more engaging are not necessarily about the quests themselves, but more that you're doing multiple steps to achieve some big-picture goal.  Or more specifically, that they are part of a longer quest chain that ends with some kind of payoff.&#xD;&#xA;&#xD;&#xA;So the typical &quot;engaging quest line&quot; template looks something like this&#xD;&#xA;&#xD;&#xA;* (optional) person in a highly visible area tells you a brief synopsis of something that you can do, and to talk to the quest giver who's probably off in some hard to get to area&#xD;&#xA;* quest giver starts talking about something &quot;big&quot; that needs happening&#xD;&#xA;* (repeat X times) small quests that are somehow related to the big something that needs happening, i.e. collecting parts for some machine/incantation/spell/potion, or collecting &quot;signatures&quot; from various other NPCs that also have some say in the story line, etc.&#xD;&#xA;* major payoff for the player&#xD;&#xA;&#xD;&#xA;The last quest can take many forms.  If you can, give the player something permanent that's not just loot, like a new spell/ability, or access to a new area.  Otherwise, try to make the quest result in something that happens specifically in the world for that quest.  Some common examples from WoW are things like giving you the ability to see spirits in the world, or doing some kind of arena-style battle, or maybe even a world boss (who usually announces themselves across the entire zone).&#xD;&#xA;&#xD;&#xA;That way the individual quests are mostly the simple ones that you outlined, but it's wrapped in some kind of fiction that makes sense, and is hopefully topped off with some kind of reward to make the effort feel worth it." />
  <row Id="1617" PostHistoryTypeId="2" PostId="841" RevisionGUID="5ee4fb41-c172-4662-89a8-de00eb93a122" CreationDate="2010-07-21T07:40:51.477" UserId="162" Text="A key factor to making quests involving is to have a clear and logical motivation for the actions of a quest. Collecting 10 pieces of loot is pretty dang boring, but if it's for a very specific reason it's interesting. For example, I found grinding for cloth for the server-wide Gates of Ahn'Qiraj event in World of Warcraft way more engaging than similar quests, because there was a very specific game-wide goal that I was concretely helping to advance. Another good example I can remember from WoW is in the dwarven area where you have to collect some potion ingredients. But, when you hand them to the goblin you actually saw him use that potion to extract information from an enemy agent. All that work you did have a real narrative payoff in the form of a in-world skit.&#xD;&#xA;&#xD;&#xA;Now, every quest does NOT need to be a &quot;world changing event&quot;, and in fact that strategy can completely backfire on you. Many games go for a false sense of urgency in an attempt to make things engaging (You have to do this RIGHT NOW! unless you want to go sidequest for 20 hours... we'll wait...), and if a player notices the discrepancies it can shatter the suspension of disbelief. Nothing kills engagement more than directly lying to a player, because that leads to them to doubting the honesty of the game and it's designers." />
  <row Id="1618" PostHistoryTypeId="2" PostId="842" RevisionGUID="f7840a7c-4231-4fc3-84a5-fe9de1dc4b7f" CreationDate="2010-07-21T07:47:27.043" UserId="119" Text="In most action/adventure games there are a few basic goals. &#xD;&#xA;&#xD;&#xA; - Collect items (like PACman)&#xD;&#xA; - Reach Location (like Mario)&#xD;&#xA; - kill enemies (like space invaders)&#xD;&#xA;&#xD;&#xA;even a game like Gears of War is basically made up of just these goals - get to the extraction point while picking up weapons and ammo and killing locusts. But that's not what makes GoW exciting or fun - it's the obstacles that get in your way - environmental puzzles to solve, enemy behaviour to study and overcome, and the twitch skill you need to survive.&#xD;&#xA;&#xD;&#xA;The problem with RPG quests, is that they often remove all the obstacles, puzzle solving and skill that GoW requires, so that all that's left is repetative grind. If the quest designer has the tools to make an interesting journey for the player, they can make something rewarding - if they are only able to define basic kill 10 rats scenarios, then the experience will be a chore.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="1619" PostHistoryTypeId="2" PostId="843" RevisionGUID="fe2cc40c-21fa-4354-8ba8-3d741c86e104" CreationDate="2010-07-21T08:37:04.647" UserId="252" Text="Is one allowed to make a similar game or even a sequel which would usually require obtaining a license? Who keeps the license in the end, i.e. who is to be asked for permission in such cases?" />
  <row Id="1620" PostHistoryTypeId="1" PostId="843" RevisionGUID="fe2cc40c-21fa-4354-8ba8-3d741c86e104" CreationDate="2010-07-21T08:37:04.647" UserId="252" Text="What happens to a license if both the publisher and the developer are bankrupt?" />
  <row Id="1621" PostHistoryTypeId="3" PostId="843" RevisionGUID="fe2cc40c-21fa-4354-8ba8-3d741c86e104" CreationDate="2010-07-21T08:37:04.647" UserId="252" Text="&lt;licensing&gt;" />
  <row Id="1622" PostHistoryTypeId="2" PostId="844" RevisionGUID="a045372a-d3ef-43fb-aaf8-7eb5bed6558a" CreationDate="2010-07-21T08:40:11.690" UserId="252" Text="I know FreeToPlay games are financed by advertisements and/or selling additional content, but what about an Open Source single player game to which several people have contributed? And how can a fair sharing be determined?" />
  <row Id="1623" PostHistoryTypeId="1" PostId="844" RevisionGUID="a045372a-d3ef-43fb-aaf8-7eb5bed6558a" CreationDate="2010-07-21T08:40:11.690" UserId="252" Text="Is there any way to earn money with an open source game?" />
  <row Id="1624" PostHistoryTypeId="3" PostId="844" RevisionGUID="a045372a-d3ef-43fb-aaf8-7eb5bed6558a" CreationDate="2010-07-21T08:40:11.690" UserId="252" Text="&lt;open-source&gt;&lt;free-to-play&gt;&lt;money&gt;" />
  <row Id="1625" PostHistoryTypeId="2" PostId="845" RevisionGUID="9c3c9731-98f6-466b-b856-c73b79f98e79" CreationDate="2010-07-21T09:01:43.683" UserId="119" Text="When a company goes busts all assets are sold off to help pay some of their debts. This would include any intellectual property like a game. So no, it's not open season, it's still owned by someone." />
  <row Id="1626" PostHistoryTypeId="5" PostId="845" RevisionGUID="f1dd1f71-b21a-47b3-a7d1-21584d09ef72" CreationDate="2010-07-21T10:36:08.960" UserId="119" Comment="deleted 1 characters in body" Text="When a company goes bust all assets are sold off to help pay some of their debts. This would include any intellectual property like a game. So no, it's not open season, it's still owned by someone." />
  <row Id="1628" PostHistoryTypeId="2" PostId="847" RevisionGUID="112157dd-d6f6-49f1-9d39-85e2eaa6f045" CreationDate="2010-07-21T10:41:49.310" UserId="323" Text="It's certainly *possible* to make money with it. At the very least you can ask for donations or distribute a version with advertisements. It will be difficult, and there's no guarantee you can make the same amount of money, but it's possible.&#xD;&#xA;&#xD;&#xA;If all the contributors agree, you can always close the source, improve it, and then sell that. That's probably a much better approach.&#xD;&#xA;&#xD;&#xA;I'd try to split &quot;fair sharing&quot; based on how much time the various contributors spent on it. It's quite possible nobody involved will be happy with the results and there will be no agreement that can be made. On the other hand, if it's open-source, they also can't stop you from making money off it - selling open-source software isn't illegal as long as you leave it open. If you can come up with a method to make it profitable, then you'd deserve the money earned from it.&#xD;&#xA;&#xD;&#xA;Without knowing more about the situation and the game, there's not much more we can say." />
  <row Id="1629" PostHistoryTypeId="2" PostId="848" RevisionGUID="6173c54f-64df-4d78-bd5e-481f1c6a28c1" CreationDate="2010-07-21T10:50:17.273" UserId="323" Text="Which of these questlines is more fun:&#xD;&#xA;&#xD;&#xA;* &quot;Please deliver this BOX to the DEMOLITIONS AGENT.&quot;&#xD;&#xA;* &quot;Thank you for the BOX. Please kill twenty DEMON COMMANDOS within five minutes.&quot;&#xD;&#xA;* &quot;Good job. I found this CRYSTAL. Please bring it to your COMMANDING OFFICER.&quot;&#xD;&#xA;&#xD;&#xA;Alternatively:&#xD;&#xA;&#xD;&#xA;* &quot;We've gotten an infiltrator inside the demon base. Unfortunately the team sent to bring him explosives has failed. We need for you to get in there and deliver this BOX to him - he can blow the core sky-high and end this menace once and for all.&quot;&#xD;&#xA;* &quot;Thank God you're here! They've been assaulting me for the last hour, and I couldn't hold out much longer. It's going to take me five minutes to rig up these explosives, and before they go off, we need to clear out the area so they can't defuse the bomb. Get to it!&quot;&#xD;&#xA;* &quot;I can't believe it. It didn't work. The core's shattered but the demons keep coming. And there's . . . what are these? Crystals? Look, we need to get this to command. You take it - you're a better fighter than I am. I'll . . . guard your back. Just get back safely, you hear me?&quot;&#xD;&#xA;&#xD;&#xA;They're the same quests, but one is far more exciting. A lot of it comes down to writing - don't tell them &quot;go kill thirty rams&quot;, tell them &quot;we need warm ramhide clothing for our army, and you're the only one we can spare to get it&quot;. It's a lot more motivating.&#xD;&#xA;&#xD;&#xA;If you look at recent WoW quests, the vast majority are still &quot;kill X&quot;, &quot;acquire Y&quot;, or &quot;speak to Z&quot;, but they're couched in terms and plotlines that make them more enjoyable." />
  <row Id="1630" PostHistoryTypeId="2" PostId="849" RevisionGUID="196d02c5-a39f-4d9f-ad89-984f36cd23c1" CreationDate="2010-07-21T10:58:35.467" UserId="259" Text="The way people like Red Hat make money from open source is by providing support contracts.  It's obviously not practical to charge customers like this, but if someone wants to base a game off your code, why not set up a formal support contract?&#xD;&#xA;&#xD;&#xA;For more traditional revenue, why not open-source the game code, but charge for content packs and art?  If people want to improve your code, or provide their own content, great, but your's is going to be the best, most fun and most professional, natch.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1631" PostHistoryTypeId="2" PostId="850" RevisionGUID="bc13d376-1fd5-451c-b900-9f04e7861b61" CreationDate="2010-07-21T11:37:10.193" UserId="353" Text="I would suggest that you sell:&#xD;&#xA;&#xD;&#xA;- **Distributions of the source:** Build versions of the source code, tools, etc that people can work with. If they are modifying the source themselves then this won't help them, but if they just want to include a dll for example, this can simply things especially if your build process is complex. Another options is to sell incremental revisions of the source and open source previous versions.&#xD;&#xA;&#xD;&#xA;- **Art, Basic Levels, etc:** As mentioned above, providing art resources and building block maps, objects, and other assets simplify development for others.&#xD;&#xA;&#xD;&#xA;- **Server Rental:** If your game is an open source multiplayer game, you can rent out time on servers you run. This makes supporting the game easier for people building off of your game, and ensures stability (this relies on you of course) for multiplayer games.&#xD;&#xA;&#xD;&#xA;- **Advertising:** A no brainer, advertising on your site and support forums could earn you something&#xD;&#xA;&#xD;&#xA;- **Support:** While I generally view selling support as evil, perhaps selling room in online training sessions, access to advanced tutorials, or &quot;1 on 1&quot;-ish support wouldn't be so bad (likely more like 1-or-2-on-team but hopefully you get the idea).&#xD;&#xA;&#xD;&#xA;- **Microtransactions:** You could sell content in game, or only provide certain content in the &quot;premium&quot; version of the game that YOU built. People building off of the game would have to either go without said content or pay you to include it.&#xD;&#xA;&#xD;&#xA;- **Commercial Licences:** While your game could be open sourced for non-commerical purposes, you could require that you be paid a certain amount or a cut of the profits for people planning to sell derivatives of your work.&#xD;&#xA;&#xD;&#xA;- **Promotional Items:** If your game gets popular enough, you could sell T-Shirts, etc relating to the original game.&#xD;&#xA;&#xD;&#xA;- **Sponsorship Period:** Following along the lines of point 1, you could sell the game for a certain amount of time and THEN open source it.&#xD;&#xA;&#xD;&#xA;I'm sure there are more ways I didn't even think of as well." />
  <row Id="1632" PostHistoryTypeId="5" PostId="850" RevisionGUID="f83a3f4e-1da2-4a6b-b07e-b5be7bbd2852" CreationDate="2010-07-21T11:49:18.127" UserId="353" Comment="added 168 characters in body; added 192 characters in body" Text="I would suggest that you sell:&#xD;&#xA;&#xD;&#xA;- **Distributions of the source:** Build versions of the source code, tools, etc that people can work with. If they are modifying the source themselves then this won't help them, but if they just want to include a dll for example, this can simply things especially if your build process is complex. Another options is to sell incremental revisions of the source and open source previous versions.&#xD;&#xA;&#xD;&#xA;- **Art, Basic Levels, etc:** As mentioned above, providing art resources and building block maps, objects, and other assets simplify development for others.&#xD;&#xA;&#xD;&#xA;- **Server Rental:** If your game is an open source multiplayer game, you can rent out time on servers you run. This makes supporting the game easier for people building off of your game, and ensures stability (this relies on you of course) for multiplayer games.&#xD;&#xA;&#xD;&#xA;- **Advertising:** A no brainer, advertising on your site and support forums could earn you something&#xD;&#xA;&#xD;&#xA;- **Support:** While I generally view selling support as evil, perhaps selling room in online training sessions, access to advanced tutorials, or &quot;1 on 1&quot;-ish support wouldn't be so bad (likely more like 1-or-2-on-team but hopefully you get the idea).&#xD;&#xA;&#xD;&#xA;- **Microtransactions:** You could sell content in game, or only provide certain content in the &quot;premium&quot; version of the game that YOU built. People building off of the game would have to either go without said content or pay you to include it.&#xD;&#xA;&#xD;&#xA;- **Commercial Licences:** While your game could be open sourced for non-commerical purposes, you could require that you be paid a certain amount or a cut of the profits for people planning to sell derivatives of your work.&#xD;&#xA;&#xD;&#xA;- **Promotional Items:** If your game gets popular enough, you could sell T-Shirts, etc relating to the original game.&#xD;&#xA;&#xD;&#xA;- **Sponsorship Period:** Following along the lines of point 1, you could sell the game for a certain amount of time and THEN open source it.&#xD;&#xA;&#xD;&#xA;- **Donations:** Simple--ask for donations to your project (this would probably look bad if you were doing too many of the other things but it may be worth a shot).&#xD;&#xA;&#xD;&#xA;I'm sure there are more ways I didn't even think of as well. As for sharing, that's really up to your team and you but as this is an open source project and not something built in a corporate environment it would presumably be split evenly amongst you." />
  <row Id="1633" PostHistoryTypeId="2" PostId="851" RevisionGUID="6e10f269-eb54-4206-ac70-a4b4c35c97c3" CreationDate="2010-07-21T12:48:42.487" UserId="267" Text="can you recommend a good C# game engine for cross platform (Win/Mac/Linux, I don't care about consoles) development? &#xD;&#xA;&#xD;&#xA;I've got some experience with raw OpenGL and I played around with Java bindings and the JMonkeyEngine. However I'm somewhat disappointed by Java solutions and I tried Ogre3D which seemed really promising but I would rather not have to develop with the PITA that is C++.&#xD;&#xA;&#xD;&#xA;I've had a look at http://gpwiki.org/index.php/Game_Engines but this list is pretty overwhelming. I'm not looking for a all-in-one solution, i.e. I don't really require support for networking, audio and all that jazz but it wouldn't hurt if it's supported.&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;&#xD;&#xA;Raoul" />
  <row Id="1634" PostHistoryTypeId="1" PostId="851" RevisionGUID="6e10f269-eb54-4206-ac70-a4b4c35c97c3" CreationDate="2010-07-21T12:48:42.487" UserId="267" Text="C# (Mono) Game Engine recommendation" />
  <row Id="1635" PostHistoryTypeId="3" PostId="851" RevisionGUID="6e10f269-eb54-4206-ac70-a4b4c35c97c3" CreationDate="2010-07-21T12:48:42.487" UserId="267" Text="&lt;engine&gt;&lt;c#&gt;&lt;cross-platform&gt;&lt;opengl&gt;&lt;mono&gt;" />
  <row Id="1636" PostHistoryTypeId="16" PostId="851" RevisionGUID="6e10f269-eb54-4206-ac70-a4b4c35c97c3" CreationDate="2010-07-21T12:48:42.487" UserId="267" />
  <row Id="1637" PostHistoryTypeId="2" PostId="852" RevisionGUID="4c15c636-d132-4175-9861-1eae12dd69d7" CreationDate="2010-07-21T12:49:02.657" UserId="47" Text="How about quests that are more than just a success or fail?  **Give the player options**.  Maybe they can betray their allies because they were tempted by the &quot;power&quot; of the dark side.  Maybe add real time sensitive decisions.  Sure you can do the quest later, but the town might be razed by then.&#xD;&#xA;&#xD;&#xA;Let every decision, even indecision, have small impacts on the quest and its reward." />
  <row Id="1638" PostHistoryTypeId="2" PostId="853" RevisionGUID="c2fbf9c0-fc48-434f-a5f4-5fbd40bc71c9" CreationDate="2010-07-21T13:27:18.997" UserId="259" Text="Assuming you already have the best-choice althorythm, what low-level solutions can you offer for squeezing the last few drops of sweet sweet framerate out of code?  " />
  <row Id="1639" PostHistoryTypeId="1" PostId="853" RevisionGUID="c2fbf9c0-fc48-434f-a5f4-5fbd40bc71c9" CreationDate="2010-07-21T13:27:18.997" UserId="259" Text="Optimisation tips" />
  <row Id="1640" PostHistoryTypeId="3" PostId="853" RevisionGUID="c2fbf9c0-fc48-434f-a5f4-5fbd40bc71c9" CreationDate="2010-07-21T13:27:18.997" UserId="259" Text="&lt;optimisation&gt;" />
  <row Id="1641" PostHistoryTypeId="16" PostId="853" RevisionGUID="c2fbf9c0-fc48-434f-a5f4-5fbd40bc71c9" CreationDate="2010-07-21T13:27:26.157" UserId="259" />
  <row Id="1642" PostHistoryTypeId="2" PostId="854" RevisionGUID="858712b7-0e02-4a20-b3bf-530ccd17d465" CreationDate="2010-07-21T13:28:03.720" UserId="277" Text="I believe that in order to become a good game developer, you need to make games. &#xD;&#xA;&#xD;&#xA;From a *programmer's perspective*, what are some good entry level games to get your hands dirty? What skills and challenges do each of these games teach you? " />
  <row Id="1643" PostHistoryTypeId="1" PostId="854" RevisionGUID="858712b7-0e02-4a20-b3bf-530ccd17d465" CreationDate="2010-07-21T13:28:03.720" UserId="277" Text="What are good games to &quot;earn your wings&quot; with?" />
  <row Id="1644" PostHistoryTypeId="3" PostId="854" RevisionGUID="858712b7-0e02-4a20-b3bf-530ccd17d465" CreationDate="2010-07-21T13:28:03.720" UserId="277" Text="&lt;beginner&gt;&lt;programming&gt;&lt;hobby-development&gt;" />
  <row Id="1645" PostHistoryTypeId="2" PostId="855" RevisionGUID="637c09d9-6402-4660-ae3a-903c1ac81178" CreationDate="2010-07-21T13:38:00.733" UserId="259" Text="**Branches**&#xD;&#xA;&#xD;&#xA;On some platforms and with some compilers, branches can throw away your whole pipeline, so even insignificant if() blocks can be expensive.&#xD;&#xA;&#xD;&#xA;The PowerPC architecture (PS3/x360) offers the floating-point select instruction, `fsel`.  This can be used in the place of a branch if the blocks are simple assignments:&#xD;&#xA;&#xD;&#xA;    float result = 0;&#xD;&#xA;    if (foo &gt; bar) { result = 2.0f; }&#xD;&#xA;    else { result = 1.0f; }&#xD;&#xA;&#xD;&#xA;Becomes:&#xD;&#xA;&#xD;&#xA;    float result = fsel(foo-bar, 2.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;When the first parameter is greater than or equal to 0, the second paramter is returned, else the third.&#xD;&#xA;&#xD;&#xA;Sometimes your compiler has already done this work, so check your assembly first.&#xD;&#xA;&#xD;&#xA;Here's more information on branching and fsel:&#xD;&#xA;&#xD;&#xA;http://assemblyrequired.crashworks.org/tag/intrinsics/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1646" PostHistoryTypeId="16" PostId="855" RevisionGUID="637c09d9-6402-4660-ae3a-903c1ac81178" CreationDate="2010-07-21T13:38:00.733" UserId="-1" />
  <row Id="1647" PostHistoryTypeId="5" PostId="853" RevisionGUID="c02640f5-3b97-494d-9c55-5adeb7a0916b" CreationDate="2010-07-21T13:38:34.197" UserId="259" Comment="added 133 characters in body; edited tags" Text="Assuming you already have the best-choice althorythm, what low-level solutions can you offer for squeezing the last few drops of sweet sweet framerate out of code?  &#xD;&#xA;&#xD;&#xA;It goes without saying that these tips only apply to that critical code section that you've already highlighted in your profiler." />
  <row Id="1648" PostHistoryTypeId="6" PostId="853" RevisionGUID="c02640f5-3b97-494d-9c55-5adeb7a0916b" CreationDate="2010-07-21T13:38:34.197" UserId="259" Comment="added 133 characters in body; edited tags" Text="&lt;c++&gt;&lt;optimisation&gt;" />
  <row Id="1649" PostHistoryTypeId="5" PostId="855" RevisionGUID="30a1881a-ac3f-45f6-849b-70bf2cdb74f7" CreationDate="2010-07-21T13:44:51.263" UserId="259" Comment="added 197 characters in body" Text="**Branches**&#xD;&#xA;&#xD;&#xA;On some platforms and with some compilers, branches can throw away your whole pipeline, so even insignificant if() blocks can be expensive.&#xD;&#xA;&#xD;&#xA;The PowerPC architecture (PS3/x360) offers the floating-point select instruction, `fsel`.  This can be used in the place of a branch if the blocks are simple assignments:&#xD;&#xA;&#xD;&#xA;    float result = 0;&#xD;&#xA;    if (foo &gt; bar) { result = 2.0f; }&#xD;&#xA;    else { result = 1.0f; }&#xD;&#xA;&#xD;&#xA;Becomes:&#xD;&#xA;&#xD;&#xA;    float result = fsel(foo-bar, 2.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;When the first parameter is greater than or equal to 0, the second paramter is returned, else the third.&#xD;&#xA;&#xD;&#xA;The price of losing the branch is that both the if{} and the else{} block will be executed, so if one is an expensive operation or dereferences a NULL pointer this optimisation is not suitable.&#xD;&#xA;&#xD;&#xA;Sometimes your compiler has already done this work, so check your assembly first.&#xD;&#xA;&#xD;&#xA;Here's more information on branching and fsel:&#xD;&#xA;&#xD;&#xA;http://assemblyrequired.crashworks.org/tag/intrinsics/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1650" PostHistoryTypeId="2" PostId="856" RevisionGUID="15b561d3-3fd5-4414-96e1-f1bbe262acbc" CreationDate="2010-07-21T13:55:02.237" UserId="47" Text="**Tetris**&#xD;&#xA;&#xD;&#xA;Very common game, lots of open source clones out there to rip apart if you get stuck.  Teaches basics of 2D graphics, input handling, scoring, etc.&#xD;&#xA;&#xD;&#xA;Then take this original idea and put it on a spin.  I learned the basics of 3D graphics/opengl by writing a [3D version of Tetris][1] for my computer graphics class in college.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bryandenny.com/index.php/3d-tetris/" />
  <row Id="1652" PostHistoryTypeId="2" PostId="857" RevisionGUID="6d08b34e-aafa-4a3f-902a-6e58e3639255" CreationDate="2010-07-21T13:56:51.657" UserId="29" Text="I like to start all my guys with Monopoly.  I usually use [Brett Schuchert's Monopoly &quot;code kata&quot;][1] as the basis of the exercise, but I add a lot onto it.  There are several reasons why I really like doing this.&#xD;&#xA;&#xD;&#xA;1. I care deeply about good coding practices (design patterns, TDD, SOLID, continuous integration, etc.) and put a lot of constraints on my developers when they do this exercise.  &#xD;&#xA;&#xD;&#xA;2. Pretty much everyone knows the rules of Monopoly, and the entire game can be completed in a single day.  This gives new developers a quick win and really gets their engagement up.&#xD;&#xA;&#xD;&#xA;3. The initial requirements start off with keyboard controls, but then I add a requirement for mouse controls later. This gets developers thinking about several things, how to refactor existing code, programming changing parts of the system to interfaces instead of concrete classes, better/proper abstractions, what to unit test, what not to unit test, WHY to unit test, and what makes for GOOD unit tests.&#xD;&#xA;&#xD;&#xA;Sometimes we plug in more sophisticated AI, sometimes we don't.  Sometimes we work with other board games with slightly more complex logic like Chutes and Ladders or something.  Sometimes we break away from board games completely, and do a poker game or blackjack.&#xD;&#xA;&#xD;&#xA;The really important part, for me, is that people get a quick win, and they see how flexible you can make software when you follow good programming standards.  These exercises build confidence very quickly.  Sometimes, the more experienced developers like to do these on their own, just to get a break from more complicated projects or to practice a new technique they've just learned (law of demeter?).&#xD;&#xA;&#xD;&#xA;  [1]: http://schuchert.wikispaces.com/Katas.MonopolyTheGame(r)" />
  <row Id="1653" PostHistoryTypeId="2" PostId="858" RevisionGUID="967dfd5e-4415-47ad-aba8-9a622712977e" CreationDate="2010-07-21T13:58:13.273" UserId="119" Text="Something like Gauntlet, because you need an entity system, enemy AI, pickups, tile-maps, collision detection, scoring etc. It's got it all, but not in a way that is overwhelming." />
  <row Id="1654" PostHistoryTypeId="2" PostId="859" RevisionGUID="30572d5b-cb53-4855-9e80-e321a4ad454f" CreationDate="2010-07-21T14:01:55.370" UserId="216" Text="How do I know whether or not to use a game engine? I want to make a relatively complex 2D game for Android. What factors should I weigh to decide whether to find, install and learn a game engine or just do everything manually?" />
  <row Id="1655" PostHistoryTypeId="1" PostId="859" RevisionGUID="30572d5b-cb53-4855-9e80-e321a4ad454f" CreationDate="2010-07-21T14:01:55.370" UserId="216" Text="What are the advantages and disadvantages to using a game engine?" />
  <row Id="1656" PostHistoryTypeId="3" PostId="859" RevisionGUID="30572d5b-cb53-4855-9e80-e321a4ad454f" CreationDate="2010-07-21T14:01:55.370" UserId="216" Text="&lt;engine&gt;" />
  <row Id="1657" PostHistoryTypeId="2" PostId="860" RevisionGUID="9a3f524a-570e-4dbd-b758-998d466fa2ee" CreationDate="2010-07-21T14:03:04.603" UserId="353" Text="A lot of people start with Breakout because it features:&#xD;&#xA;&#xD;&#xA;- Input: moving a paddle back and forth&#xD;&#xA;- Simple Collision: ball bouncing off of paddle, bricks, and wall&#xD;&#xA;- Changing &quot;Game State:&quot; Updating score when the ball hits bricks and removing the bricks, decrementing number of balls when ball hits the bottom of the screen, losing the game when the number of balls == 0, etc.&#xD;&#xA;- It is also a fairly gentle introduction to graphics as it's all rectangle and circles" />
  <row Id="1658" PostHistoryTypeId="2" PostId="861" RevisionGUID="9ac661d6-160c-4528-bf11-3109dacf01f4" CreationDate="2010-07-21T14:04:10.483" UserId="7" Text="**Choose-Your-Adventure**&#xD;&#xA;&#xD;&#xA;Got this tip from a friend who started programming by creating a game, much akin to a [choose your adventure book][1]. It is basically a simple text adventure game with a output like this:&#xD;&#xA;&#xD;&#xA;    You are standing in a forest clearing in the middle of the night. You hear&#xD;&#xA;    some wolves howl in the distance. Should you:&#xD;&#xA;    a) make camp for the night&#xD;&#xA;    b) go further north&#xD;&#xA;    &gt; _&#xD;&#xA;&#xD;&#xA;Making such a game should teach you to make a gameloop, basic console input and basic scripting. It is quite simple to implement and easy for a beginner to jump into *since you don't need a graphics engine* to write the game. Advanced beginners would probably write a scripting engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Choose_Your_Own_Adventure&#xD;&#xA;" />
  <row Id="1659" PostHistoryTypeId="2" PostId="862" RevisionGUID="4ef99c66-1009-4e6c-8afd-796bc6f2f2f6" CreationDate="2010-07-21T14:04:12.760" UserId="34" Text="**Breakout**&#xD;&#xA;&#xD;&#xA;Easy game since you don't have much state to worry about (it's an array of brick values -- if you only have one brick color, it's an array of flags), there isn't any AI, and you get to do a little bit of physics to get the ball to bounce correctly.&#xD;&#xA;&#xD;&#xA;**Solitaire**&#xD;&#xA;&#xD;&#xA;The rules are a bit more complex than Breakout and the interface to it is a lot different.  It forces you to think about different methods of implementing a game.  i.e, what works in one game isn't necessarily what you would use in another.&#xD;&#xA;&#xD;&#xA;**Pac-Man**&#xD;&#xA;&#xD;&#xA;This one is nice because you get to work on a little bit of AI.  Having the ghosts follow the player (but not too well - you want the player to have a chance) can be quickly implemented, and you will have a fun little game that you can tweak and show off to friends and family (positive feedback is always a good thing when you are starting out).&#xD;&#xA;&#xD;&#xA;I find that if you look for inspiration in early video games, you can find tons of ideas that are relatively simple to implement.  Plus, you can get away with super simple artwork and sounds because you're copying something so simple anyway.  This allows you to focus on the basics first -- getting your game loop up and running, figuring out how to get your pixels to the screen, playing a sound, keeping score, getting the player's input into the game.  &#xD;&#xA;&#xD;&#xA;It almost really doesn't matter which game you choose first -- just make sure you pick something simple that you can get quick results with, that way you can move on the next day and make another one.  And another.  And another -- the more you make, the more you'll push yourself, and eventually you'll be making complex games before you know it." />
  <row Id="1660" PostHistoryTypeId="5" PostId="853" RevisionGUID="263c0b33-6787-4fc6-8140-d0bfe98b1bce" CreationDate="2010-07-21T14:06:08.327" UserId="353" Comment="edited body; edited title; edited tags" Text="Assuming you already have the best-choice algorithm, what low-level solutions can you offer for squeezing the last few drops of sweet sweet frame rate out of code?  &#xD;&#xA;&#xD;&#xA;It goes without saying that these tips only apply to that critical code section that you've already highlighted in your profiler." />
  <row Id="1661" PostHistoryTypeId="4" PostId="853" RevisionGUID="263c0b33-6787-4fc6-8140-d0bfe98b1bce" CreationDate="2010-07-21T14:06:08.327" UserId="353" Comment="edited body; edited title; edited tags" Text="Optimization tips" />
  <row Id="1662" PostHistoryTypeId="2" PostId="863" RevisionGUID="6466bd06-bee8-4738-9a2a-c9e328b08e37" CreationDate="2010-07-21T14:08:43.950" UserId="202" Text="Utilizing SIMD (by using SSE), if You don't do already. [Gamasutra](http://www.gamasutra.com/view/feature/4248/designing_fast_crossplatform_simd_.php) has a nice article on this. You can download the source code from the presented library at the end of the article." />
  <row Id="1663" PostHistoryTypeId="16" PostId="863" RevisionGUID="6466bd06-bee8-4738-9a2a-c9e328b08e37" CreationDate="2010-07-21T14:08:43.950" UserId="-1" />
  <row Id="1664" PostHistoryTypeId="6" PostId="853" RevisionGUID="263c0b33-6787-4fc6-8140-d0bfe98b1bce" CreationDate="2010-07-21T14:06:08.327" UserId="353" Comment="edited body; edited title; edited tags" Text="&lt;c++&gt;&lt;optimization&gt;" />
  <row Id="1665" PostHistoryTypeId="2" PostId="864" RevisionGUID="e687f760-5937-48ac-8fc4-c6ea5048d367" CreationDate="2010-07-21T14:12:03.927" UserId="34" Text="Don't overlook your compiler -- if you are using gcc on Intel, you could easily get a performance gain by switching to the Intel C/C++ Compiler, for example.  If you are targeting an ARM platform, check out ARM's commercial compiler.  If you are on the iPhone, Apple just allowed Clang to be used starting with the iOS 4.0 SDK.  &#xD;&#xA;&#xD;&#xA;One issue that you will probably come into with optimization, especially on the x86, is that a lot of intuitive things end up working against you on modern CPU implementations.  Unfortunately for most of us, the ability to out optimize the compiler is long gone.  The compiler can schedule instructions in the stream based on it's own internal knowledge of the CPU.  In addition, the CPU can also re-schedule instructions based on it's own needs.  Even if you think of an optimal way to arrange a method, chances are the compiler or CPU has already come up with that on it's own and has already performed that optimization.&#xD;&#xA;&#xD;&#xA;My best advice would be to ignore the low-level optimizations and focus on the higher level ones.  The compiler and CPU can't change your algorithm from an O(n^2) to an O(1) algorithm, no matter how good they get.  That's going to require you to look at exactly what you are trying to do and find a better way to do it.  Let the compiler and CPU worry about the low level and you focus on the mid to high levels." />
  <row Id="1666" PostHistoryTypeId="16" PostId="864" RevisionGUID="e687f760-5937-48ac-8fc4-c6ea5048d367" CreationDate="2010-07-21T14:12:03.927" UserId="-1" />
  <row Id="1667" PostHistoryTypeId="2" PostId="865" RevisionGUID="a8c8eb77-94b2-48ac-85df-938cdb7e4dec" CreationDate="2010-07-21T14:17:27.940" UserId="353" Text="**Advantages:**&#xD;&#xA;&#xD;&#xA;- Most if not all of the coding is done for you, so all you have to worry about is content, level layout, etc.&#xD;&#xA;&#xD;&#xA;- Along those lines, memory management, asset loading, lighting (in complex engines), etc has all been designed and tested thoroughly (hopefully).&#xD;&#xA;&#xD;&#xA;- As mentioned below, if the engine is cross platform you will have to do little to no work to port your game.&#xD;&#xA;&#xD;&#xA;**Disadvantages:**&#xD;&#xA;&#xD;&#xA;- If you are modifying anything, you now need to become familiar with a new codebase.&#xD;&#xA;- If there is a bug in the engine, unless it is open source you can't fix it.&#xD;&#xA;- The engine was not designed specifically for your game, so it may be less efficient than code you write specifically for your game.&#xD;&#xA;- Game engines generally are not free.&#xD;&#xA;- If a game is small, the overhead of using an engine may not be worth the time invested to write code yourself.&#xD;&#xA;- If your game engine also has any editors or tools, you will have to build and test those as well before turning them over to artists or relying on them yourself.&#xD;&#xA;&#xD;&#xA;Don't let the fact that the list of disadvantages is longer: when the time spent coding and testing all the systems you need is too long for your production cycle, or if you have more skill with art than code, using a game engine is definitely a good idea.&#xD;&#xA;&#xD;&#xA;A comparison of game engines is in the works in this question: http://gamedev.stackexchange.com/questions/351/pros-and-cons-of-various-3d-game-engines" />
  <row Id="1668" PostHistoryTypeId="2" PostId="866" RevisionGUID="42c84c9d-a474-4f3a-b478-e7832f712247" CreationDate="2010-07-21T14:17:57.627" UserId="47" Text="The biggest advantage: a lot of things are done for you.  You don't have to keep re-inventing the wheel.&#xD;&#xA;&#xD;&#xA;Another advantage: The game engine might also be cross-platform (Unity).&#xD;&#xA;&#xD;&#xA;Disadvantages?  Control?  The engine is taking care of some things for you (such as rendering) so if it has bugs or performance issues, then you can't simply fix it yourself." />
  <row Id="1669" PostHistoryTypeId="5" PostId="853" RevisionGUID="fb04ce93-3c98-4320-8af5-4328b69d6c0d" CreationDate="2010-07-21T14:18:19.293" UserId="259" Comment="better explaination of the type of optimisations I'm looking for" Text="Assuming you already have the best-choice algorithm, what low-level solutions can you offer for squeezing the last few drops of sweet sweet frame rate out of C++ code?  &#xD;&#xA;&#xD;&#xA;It goes without saying that these tips only apply to that critical code section that you've already highlighted in your profiler, but they should be low-level non-structural improvements.  I've seeded an example." />
  <row Id="1670" PostHistoryTypeId="4" PostId="853" RevisionGUID="fb04ce93-3c98-4320-8af5-4328b69d6c0d" CreationDate="2010-07-21T14:18:19.293" UserId="259" Comment="better explaination of the type of optimisations I'm looking for" Text="C++ low-level optimization tips" />
  <row Id="1671" PostHistoryTypeId="5" PostId="855" RevisionGUID="1412921a-6c39-4be4-96ee-f61945db0aaf" CreationDate="2010-07-21T14:34:43.873" UserId="259" Comment="added 19 characters in body" Text="**Remove unnecessary branches**&#xD;&#xA;&#xD;&#xA;On some platforms and with some compilers, branches can throw away your whole pipeline, so even insignificant if() blocks can be expensive.&#xD;&#xA;&#xD;&#xA;The PowerPC architecture (PS3/x360) offers the floating-point select instruction, `fsel`.  This can be used in the place of a branch if the blocks are simple assignments:&#xD;&#xA;&#xD;&#xA;    float result = 0;&#xD;&#xA;    if (foo &gt; bar) { result = 2.0f; }&#xD;&#xA;    else { result = 1.0f; }&#xD;&#xA;&#xD;&#xA;Becomes:&#xD;&#xA;&#xD;&#xA;    float result = fsel(foo-bar, 2.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;When the first parameter is greater than or equal to 0, the second paramter is returned, else the third.&#xD;&#xA;&#xD;&#xA;The price of losing the branch is that both the if{} and the else{} block will be executed, so if one is an expensive operation or dereferences a NULL pointer this optimisation is not suitable.&#xD;&#xA;&#xD;&#xA;Sometimes your compiler has already done this work, so check your assembly first.&#xD;&#xA;&#xD;&#xA;Here's more information on branching and fsel:&#xD;&#xA;&#xD;&#xA;http://assemblyrequired.crashworks.org/tag/intrinsics/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1672" PostHistoryTypeId="5" PostId="851" RevisionGUID="0ed7222f-08a7-4168-a199-2b136749c968" CreationDate="2010-07-21T14:37:32.243" UserId="267" Comment="added 80 characters in body; edited tags; edited title; edited tags" Text="can you recommend a good C# game engine for cross platform (Win/Mac/Linux, I don't care about consoles) development? &#xD;&#xA;&#xD;&#xA;I've got some experience with raw OpenGL and I played around with Java bindings and the JMonkeyEngine. However I'm somewhat disappointed those solutions and I tried Ogre3D which seemed really promising but I would rather not have to develop with the PITA that is C++.&#xD;&#xA;&#xD;&#xA;I've had a look at http://gpwiki.org/index.php/Game_Engines but this list is pretty overwhelming. I'm not looking for a all-in-one solution, i.e. I don't really require support for networking, audio and all that jazz but it wouldn't hurt if it's supported.&#xD;&#xA;&#xD;&#xA;Maybe there's also an awesome Java solution out there that I don't know about?&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;&#xD;&#xA;Raoul" />
  <row Id="1673" PostHistoryTypeId="4" PostId="851" RevisionGUID="0ed7222f-08a7-4168-a199-2b136749c968" CreationDate="2010-07-21T14:37:32.243" UserId="267" Comment="added 80 characters in body; edited tags; edited title; edited tags" Text="C# (Mono)/Java 3D Game Engine recommendation" />
  <row Id="1674" PostHistoryTypeId="6" PostId="851" RevisionGUID="0ed7222f-08a7-4168-a199-2b136749c968" CreationDate="2010-07-21T14:37:32.243" UserId="267" Comment="added 80 characters in body; edited tags; edited title; edited tags" Text="&lt;engine&gt;&lt;c#&gt;&lt;cross-platform&gt;&lt;java&gt;&lt;mono&gt;" />
  <row Id="1675" PostHistoryTypeId="2" PostId="867" RevisionGUID="1741f9ac-6a15-4bce-a866-03c2d3227bd8" CreationDate="2010-07-21T14:58:09.620" UserId="189" Text="[JMonkeyEngine][1] is really the most recommended 3D engine for Java. [Xith3D][2] is sometimes recommended as an alternative, as it is also a scenegraph style graphics engine.&#xD;&#xA;&#xD;&#xA;You could go with [LWJGL][3] or [JOGL][4] but those aren't engines so much as libraries, and you'd be writing raw OpenGL.&#xD;&#xA;&#xD;&#xA;I don't recommend [Java3D][5] though, I think it's all but abandoned.&#xD;&#xA;&#xD;&#xA;I think LWJGL is the best you're going to get, but again, it's a game library, not a graphics engine. OGRE is a scenegraph graphics engine like JMonkeyEngine; LWJGL is to Java what [SDL][6] is to C++. It provides functions for OpenGL, audio and input, and you are expected to run with that. I personally like that kind of power.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/&#xD;&#xA;  [2]: http://xith.org/&#xD;&#xA;  [3]: http://www.lwjgl.org/&#xD;&#xA;  [4]: http://jogamp.org/jogl/www/&#xD;&#xA;  [5]: http://java.sun.com/javase/technologies/desktop/java3d/&#xD;&#xA;  [6]: http://www.libsdl.org/" />
  <row Id="1676" PostHistoryTypeId="16" PostId="867" RevisionGUID="1741f9ac-6a15-4bce-a866-03c2d3227bd8" CreationDate="2010-07-21T14:58:09.620" UserId="-1" />
  <row Id="1677" PostHistoryTypeId="2" PostId="868" RevisionGUID="0fc927c6-87b6-4ee7-a797-429bd57ccf1a" CreationDate="2010-07-21T14:59:32.003" UserId="259" Text="**Remove unnecessary virtual function calls**&#xD;&#xA;&#xD;&#xA;The dispatch of a virtual function can be very slow.  [This][1] article gives a good explaination of why.  If possible, for functions that are called many many many times per frame, avoid them.&#xD;&#xA;&#xD;&#xA;You can do this in a couple of ways.  Sometimes you can just rewrite the classes to not need inheritence - maybe it turns out that MachineGun is the only subclass of Weapon, and you can amalgamate them.  &#xD;&#xA;&#xD;&#xA;You can use templates to replace run-time polymorphism with compile-time polymorphism.  This only works if you know the subtype of your objects at runtime, and can be a major rewrite.&#xD;&#xA;&#xD;&#xA;  [1]: http://thetweaker.wordpress.com/2010/06/03/on-_purecall-and-the-overheads-of-virtual-functions/" />
  <row Id="1678" PostHistoryTypeId="16" PostId="868" RevisionGUID="0fc927c6-87b6-4ee7-a797-429bd57ccf1a" CreationDate="2010-07-21T14:59:32.003" UserId="-1" />
  <row Id="1679" PostHistoryTypeId="2" PostId="869" RevisionGUID="989db0df-7d41-4785-887c-9a53881f1117" CreationDate="2010-07-21T15:08:00.877" UserId="189" Text="In my case, I spent a lot of time (months) floundering around getting nothing done because of game engines. I now typically avoid them like the plague, though I understand they should be used wisely and in moderation.&#xD;&#xA;&#xD;&#xA;For me, I'd get obsessed over all the **possibilities**! Looking at a long list of features in engine X, it's like &quot;Wow I could do all this! My game could be great!&quot; So I'd download it, run the demos and be dazzled by those features in action, etc. Then I'd create a new project in my IDE and wouldn't know where to start. I'd write some code, I might learn from and base it off of the demo projects, but those were just demos.&#xD;&#xA;&#xD;&#xA;I didn't know how to start from nothing and make something. I didn't know the first step. I loved the idea of an engine, it impressed me and got me motivated to make something, but my knowledge of actual development was so limited that even after knowing how to add the engine to the build path, and maybe writing a few lines to start the engine and then shut it down again, beyond that I never made anything worthwhile.&#xD;&#xA;&#xD;&#xA;I'm much more of a baby step kind of person. I'd rather make my own game one step at a time, refactoring out useful functions and collecting those functions into a library which one day I might consider an &quot;engine&quot;. So for now, I avoid the engine hype and just stick with the low-level stuff.&#xD;&#xA;&#xD;&#xA;And engines do have their place. If you find an engine and think to yourself, &quot;This is exactly what I would write! They've already done the work for me, I don't have to reinvent the wheel, and I know exactly how to hook it into the game that I've already started [or at least fully planned and am ready to start]&quot; then it's probably a good fit. You'll know exactly how to use it, and how to write your own code to use the engine to create something useful. But if you get an engine just cause it has everything but the kitchen sink and you think you're standing on the shoulders of giants, you're very mistaken. **You have a giant standing in front of you, and you need to climb up to its shoulders.**&#xD;&#xA;&#xD;&#xA;So the huge disadvantage for me: don't get caught up in all the things you could do. Whatever engine you might choose, it will have tons of potential. But if you don't know how to actually harness the potential, if it doesn't make your live easier or help you get your work done, **then why are you using it?**" />
  <row Id="1680" PostHistoryTypeId="2" PostId="870" RevisionGUID="1cb200c7-273b-4fcb-a321-4ef218494e99" CreationDate="2010-07-21T15:30:57.073" UserId="288" Text="**Optimise your data layout!** (This applies to more languages than just C++)&#xD;&#xA;&#xD;&#xA;You can go pretty deep making this specifically tuned for your data, your processor, handling multi-core nicely, etc. But the basic concept is this:&#xD;&#xA;&#xD;&#xA;When you are processing things in a tight loop, you want to make the data for each iteration as small as possible, and as close together as possible in memory. That means the ideal is an array or vector of objects (not pointers) that contain only the data necessary for the calculation.&#xD;&#xA;&#xD;&#xA;This way, when the CPU fetches the data for the first iteration of your loop, the next several iterations worth of data will get loaded into the cache with it.&#xD;&#xA;&#xD;&#xA;Really the CPU is fast and the compiler is good. There's not really much you can do with using fewer and faster instructions. [Cache coherence][1] is where it's at (that's a random article I Googled - it contains a good example of getting cache coherency for an algorithm that doesn't simply run through data linearly).&#xD;&#xA;&#xD;&#xA;  [1]: http://supercomputingblog.com/optimization/taking-advantage-of-cache-coherence-in-your-programs/" />
  <row Id="1681" PostHistoryTypeId="16" PostId="870" RevisionGUID="1cb200c7-273b-4fcb-a321-4ef218494e99" CreationDate="2010-07-21T15:30:57.073" UserId="-1" />
  <row Id="1682" PostHistoryTypeId="2" PostId="871" RevisionGUID="b5562570-7e82-4771-b83b-ae0c7eb6bf81" CreationDate="2010-07-21T16:02:46.727" UserId="323" Text="A very, very low-level tip, but once that can come in handy:&#xD;&#xA;&#xD;&#xA;Most compilers support some form of explicit conditional hinting. GCC has a function called __builtin_expect which lets you inform the compiler what the value of a result probably is. GCC can use that data to optimize conditionals to perform as quickly as possible in the expected case, with slightly slower execution in the unexpected case.&#xD;&#xA;&#xD;&#xA;    if(__builtin_expect(entity-&gt;extremely_unlikely_flag, 0)) {&#xD;&#xA;      // code that is rarely run&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I've seen a 10-20% speedup with proper use of this." />
  <row Id="1683" PostHistoryTypeId="16" PostId="871" RevisionGUID="b5562570-7e82-4771-b83b-ae0c7eb6bf81" CreationDate="2010-07-21T16:02:46.727" UserId="-1" />
  <row Id="1684" PostHistoryTypeId="2" PostId="872" RevisionGUID="7deaa7ae-9519-436e-9cfa-6959e470c365" CreationDate="2010-07-21T16:02:50.703" UserId="233" Text="My basic principle is: *don't do anything that's not necessary*.&#xD;&#xA;&#xD;&#xA;If you've found that a particular function is a bottleneck, you could optimize the function -- or you could try to keep it from being called in the first place.&#xD;&#xA;&#xD;&#xA;This does not necessarily mean you're using a bad algorithm. It might mean that you are running calculations every frame that could be cached for a short while (or entirely precalculated), for example.&#xD;&#xA;&#xD;&#xA;I always try this approach before any attempts at really low-level optimization." />
  <row Id="1685" PostHistoryTypeId="16" PostId="872" RevisionGUID="7deaa7ae-9519-436e-9cfa-6959e470c365" CreationDate="2010-07-21T16:02:50.703" UserId="-1" />
  <row Id="1686" PostHistoryTypeId="2" PostId="873" RevisionGUID="fbb15328-5906-49bd-8255-025f542c6269" CreationDate="2010-07-21T16:10:58.590" UserId="292" Text="Unity is actually using Mono in its back end.  Though a lot of its scripting tutorials use  JavaScript, you can actually program Unity completely in C# / Mono." />
  <row Id="1687" PostHistoryTypeId="16" PostId="873" RevisionGUID="fbb15328-5906-49bd-8255-025f542c6269" CreationDate="2010-07-21T16:10:58.590" UserId="-1" />
  <row Id="1688" PostHistoryTypeId="2" PostId="874" RevisionGUID="575f73bc-a82a-49b7-b1ea-c5151ed7e84f" CreationDate="2010-07-21T16:18:12.530" UserId="292" Text="**Cruise (Now Renamed Go)**&#xD;&#xA;&#xD;&#xA;http://www.thoughtworks-studios.com/go-agile-release-management&#xD;&#xA;&#xD;&#xA;Cruise is quite possibly the best CI I've used because it understands a release pipeline, which allows you to set up a set of rules for moving a particular packaged build from stage to stage, and allows people to grab build artifacts at any stage through REST.  It also supports distributing jobs across multiple agents in its Pro version.&#xD;&#xA;&#xD;&#xA;That said, Cruise is DEFINITELY meant for enterprise developers, and thus it's expensive.  I've been meaning to talk to them about changing their pricing plan to get game companies into the fold, but so far, no luck." />
  <row Id="1689" PostHistoryTypeId="2" PostId="875" RevisionGUID="01cc3ef1-6fc9-4aab-994b-1b3f99058147" CreationDate="2010-07-21T16:29:11.273" UserId="189" Text="A top-down space shooter like Galaga is pretty easy and teaches collision detection fairly well! It can also vary in difficulty, from a level with stationary enemies, to multiple levels which weapon upgrades and enemies that move in special patterns." />
  <row Id="1690" PostHistoryTypeId="2" PostId="876" RevisionGUID="3f049669-d629-40c8-8f53-1dc869de3d7d" CreationDate="2010-07-21T16:35:44.903" UserId="259" Text="**Reduce boolean expression evaluation**&#xD;&#xA;&#xD;&#xA;This one is really desperate, as it's a very subtle but dangerous change to your code.  However if you have a conditional that is evaluated an inordinate number of times, you can reduce the overhead of boolean evaluation by using bitwise operators instead.  So:&#xD;&#xA;&#xD;&#xA;    if ((foo &amp;&amp; bar) || blah) { ... } &#xD;&#xA;&#xD;&#xA;Becomes:&#xD;&#xA;&#xD;&#xA;    if ((foo &amp; bar) | blah) { ... }&#xD;&#xA;&#xD;&#xA;Using integer arithmetic instead.  If your foos and bars are constants or evaluated before the if(), this could be faster than the normal boolean version.&#xD;&#xA;&#xD;&#xA;The big downside is that you lose lazy evaluation - the whole block is evaluated, so you can't do `foo != NULL &amp; foo-&gt;dereference()`.  Because of this, it's arguable that this is hard to maintain, and so the trade-off may be too great.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="1691" PostHistoryTypeId="16" PostId="876" RevisionGUID="3f049669-d629-40c8-8f53-1dc869de3d7d" CreationDate="2010-07-21T16:35:44.903" UserId="-1" />
  <row Id="1692" PostHistoryTypeId="2" PostId="877" RevisionGUID="3aa46bbf-86b1-4c9d-ab0b-b499d2493420" CreationDate="2010-07-21T17:16:33.813" UserId="8" Text="[GameDev.net][1] has a [good article recommending a progression of games][2] to incrementally learn about game development. My favorite advice from the list is to actually polish these games. Completely finish, to a releasable state.&#xD;&#xA;&#xD;&#xA;The list is as follows (some of these have been given in other answers):&#xD;&#xA;&#xD;&#xA;1. Tetris&#xD;&#xA;2. Breakout&#xD;&#xA;3. Side Scroller / Platformer&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.net&#xD;&#xA;  [2]: http://www.gamedev.net/reference/design/features/makegames/" />
  <row Id="1693" PostHistoryTypeId="2" PostId="878" RevisionGUID="29fb03d6-05f6-4d7c-a6cf-07bae8e80094" CreationDate="2010-07-21T17:20:17.677" UserId="55" Text="There's nothing quite like the routine of tweaking a variable, compiling code that takes a few minutes, executing the code, realizing that your tweak was in the wrong direction and repeating the process all over again.&#xD;&#xA;&#xD;&#xA;I would like to start interacting with my game logic while a session is in progress. What are some of the ways you've handled doing this? &#xD;&#xA;&#xD;&#xA;I would be open to hear solutions for iOS, C/C++ and C#/XNA. " />
  <row Id="1694" PostHistoryTypeId="1" PostId="878" RevisionGUID="29fb03d6-05f6-4d7c-a6cf-07bae8e80094" CreationDate="2010-07-21T17:20:17.677" UserId="55" Text="Real-time Debugging Techniques" />
  <row Id="1695" PostHistoryTypeId="3" PostId="878" RevisionGUID="29fb03d6-05f6-4d7c-a6cf-07bae8e80094" CreationDate="2010-07-21T17:20:17.677" UserId="55" Text="&lt;network&gt;&lt;debug&gt;" />
  <row Id="1696" PostHistoryTypeId="2" PostId="879" RevisionGUID="556ad86d-5973-4e43-8609-97951311b458" CreationDate="2010-07-21T17:20:18.067" UserId="276" Text="Depending on your target market (I assume it isn't cutting edge 3d ie. expensive graphics cards needed), I'd look at picking up a selection of older graphics cards from somewhere like EBay so that you can test on both NVidia and ATi cards.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1697" PostHistoryTypeId="2" PostId="880" RevisionGUID="642902a3-a6eb-4704-936f-a5aa017b2b6e" CreationDate="2010-07-21T17:28:20.207" UserId="259" Text="One solution I've seen in multiple studios is an external debugging app that attaches to your program using the network.  This app shows specific exposed variables, and allows you to edit them in real time.  Adding new variables is a matter of adding some macros to the game code.&#xD;&#xA;&#xD;&#xA;The initial set-up of the game-side macros, server/client protocol (the solutions I've seen just serialise xml back and forth), and writing the client, is large.  However it's extremely useful, especially as using the network for communication means you can work on any platform.&#xD;&#xA;" />
  <row Id="1698" PostHistoryTypeId="2" PostId="881" RevisionGUID="135bce24-5404-4010-b394-9890dd7077d0" CreationDate="2010-07-21T17:33:39.090" UserId="55" Text="Just discovered this for iOS Developers -&#xD;&#xA;&#xD;&#xA;**AsyncSocket**  &#xD;&#xA;You set up a server in your application and connect to it via terminal. You can then pump over remote commands and start manipulating variables in real-time.  Pretty slick.&#xD;&#xA;&#xD;&#xA; - [Mystery Coconut Games blog post about it][1]&#xD;&#xA; - [Google Code page for AsyncSocket][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mysterycoconut.com/blog/2010/07/tweak-away/&#xD;&#xA;  [2]: http://code.google.com/p/cocoaasyncsocket/" />
  <row Id="1699" PostHistoryTypeId="2" PostId="882" RevisionGUID="f969b39d-ea98-43d3-9861-08f81da465f1" CreationDate="2010-07-21T17:36:35.200" UserId="353" Text="Well as far as C++, C#, and C# with XNA are concerned, Visual Studio has excellent debugging tools--pause the application in real time at any point in the code, see the values assigned to variables at any time, step through function calls, analyze the call stack, and more. In addition, tools like Pix and the CLR Profiler make development with DirectX (Pix) and CLR based languages (CLR Profiler) great.&#xD;&#xA;&#xD;&#xA;In addition, one especially useful part of working with games is that we have this giant area to write debug text, graphics, etc to. Realtime graphs of memory usage, number of objects/vertices drawn, framerate, etc are common things to draw to the screen." />
  <row Id="1700" PostHistoryTypeId="2" PostId="883" RevisionGUID="e0a4f6f3-ee07-43bb-abc3-8438619ab4bb" CreationDate="2010-07-21T17:57:47.003" UserId="34" Text="One reason that I think Linux doesn't get as much attention is simply that most people who run Linux can also choose to run Windows via a dual-boot setup to run games.  This also effects Mac users as well to some extent, but due to the less technical make up of the userbase (not saying this as a slight to Mac users -- it's more that Linux users tend to be the kind of people who don't mind doing all sorts of arcane technical tasks to get something working), there are less people willing to install Windows on their machine.&#xD;&#xA;&#xD;&#xA;Closely related is that anyone who is interested in PC games is probably going to buy a PC with Windows on it.  Since they have a Windows machine already, they aren't going to be demanding native Linux or Mac versions.   " />
  <row Id="1701" PostHistoryTypeId="2" PostId="884" RevisionGUID="dfe842eb-f710-4722-ba82-2dbbd22899ae" CreationDate="2010-07-21T18:05:56.923" UserId="48" Text="In my experience with novice programmers, the progression usually seems to go something like this:&#xD;&#xA;&#xD;&#xA;1. Pong&#xD;&#xA;2. Tetris&#xD;&#xA;3. Huge amazing awesome 50 hours of gameplay 3D RPG (note: most people give up programming part way through this step)" />
  <row Id="1702" PostHistoryTypeId="2" PostId="885" RevisionGUID="0c5f54ab-53e8-40d8-99b8-218003a29476" CreationDate="2010-07-21T18:47:54.577" UserId="138" Text="Integrating a fully interpreted language can allow you to rewrite game elements very, very easily on the fly.&#xD;&#xA;&#xD;&#xA;Python, Lua, etc. can all be utilized expressly for this. [Angel Engine][1] probably can serve as an example.&#xD;&#xA;&#xD;&#xA;Hot loading is another element to check out (basically, an event is fired off telling you an asset has changed--a config file, an art element, etc.--and you run it through a series of conditioners that modify it for the final format before replacing the existing with the new.&#xD;&#xA;&#xD;&#xA;I've worked with a rapid prototyping engine that used hot loading and it was a pleasure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/" />
  <row Id="1703" PostHistoryTypeId="2" PostId="886" RevisionGUID="f405cf95-eaf6-4b31-a168-015fd1a61e61" CreationDate="2010-07-21T18:52:23.850" UserId="162" Text="The basic answer is that in 90% of the cases, it is essentially impossible to figure out who owns the license, due to it possibly being sold to a string of liquidators. This is where the concept of [Abandonware][1] originally came from, and there are tons of early PC games with completely unclear ownership. To make any sort official sequel you will have to track down the current rights holder, which may very well be absolutely impossible.&#xD;&#xA;&#xD;&#xA;If you put some effort into tracking down an owner and cannot, it is very likely that the current owner is not aware that it owns a certain property or does not care. In this case it may not be &quot;legal&quot; to reuse aspects of the game but there is essentially 0 chance of any legal issues. However, if your clone/sequel manages to become a financial success be prepared for the rights owner to show up one day and demand a huge cut of the profits.&#xD;&#xA;&#xD;&#xA;Also, making a similar game, even a spiritual sequel, is unlikely to actually be actionable in court even if they do show up. Reuse of any specific asset (art, music, text) is very easy to prove as illegal infringement, but doing a gameplay clone of an abandoned property is generally safe, based on the thousands of such PC games in existence.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Abandonware" />
  <row Id="1704" PostHistoryTypeId="2" PostId="887" RevisionGUID="c6d59145-8adb-451f-ad46-e1b673f78ec7" CreationDate="2010-07-21T18:54:56.840" UserId="318" Text="Look at http://www.devmaster.net/engines/search.php&#xD;&#xA;and also check out the XNA framework." />
  <row Id="1705" PostHistoryTypeId="16" PostId="887" RevisionGUID="c6d59145-8adb-451f-ad46-e1b673f78ec7" CreationDate="2010-07-21T18:54:56.840" UserId="-1" />
  <row Id="1706" PostHistoryTypeId="2" PostId="888" RevisionGUID="6f1e51eb-eadb-48ea-a313-645dc3713af7" CreationDate="2010-07-21T19:14:40.843" UserId="318" Text="Check how much memory it takes,&lt;BR&gt;&#xD;&#xA; - Minimum frame rate / Current frame rate * (CPU speed * numbers of cores you use),&lt;BR&gt;&#xD;&#xA; - what level of opengl/directx/cuda your game engine requires from the graphics adaptor,&lt;BR&gt;&#xD;&#xA; - how much disk space the installation + user info takes...&lt;BR&gt;&#xD;&#xA;&#xD;&#xA;Also test on various hardware configurations." />
  <row Id="1707" PostHistoryTypeId="2" PostId="889" RevisionGUID="783f63c4-4a3c-4a40-a05c-e892e8c2a65d" CreationDate="2010-07-21T19:18:31.737" UserId="370" Text="When optimizing the frame rate of a game, when should I focus on a large&#xD;&#xA;FPS and when should I focus on a consistent frame rate.&#xD;&#xA;&#xD;&#xA;This is often a hotly contested issue, so please note I'm **not** asking which&#xD;&#xA;is better.&#xD;&#xA;&#xD;&#xA;What are the pros and cons of each?  &#xD;&#xA;In which situations is one preferred over the other?&#xD;&#xA;&#xD;&#xA;Also note: my input polling/processing, physics, and game update rates are&#xD;&#xA;independent of my frame rate.  The only thing the FPS affects is how often a&#xD;&#xA;screen is rendered.p" />
  <row Id="1708" PostHistoryTypeId="1" PostId="889" RevisionGUID="783f63c4-4a3c-4a40-a05c-e892e8c2a65d" CreationDate="2010-07-21T19:18:31.737" UserId="370" Text="Large FPS vs consistent FPS. " />
  <row Id="1709" PostHistoryTypeId="3" PostId="889" RevisionGUID="783f63c4-4a3c-4a40-a05c-e892e8c2a65d" CreationDate="2010-07-21T19:18:31.737" UserId="370" Text="&lt;optimization&gt;&lt;frame-rate&gt;" />
  <row Id="1710" PostHistoryTypeId="2" PostId="890" RevisionGUID="05176ac8-a43a-4c06-974e-1d0913f7093f" CreationDate="2010-07-21T19:22:52.383" UserId="240" Text="There are some good suggestions in the other answers, but I just want to toss in my vote for: Start with something that seems too-puny to deal with.&#xD;&#xA;&#xD;&#xA;Pong is a good example.&#xD;&#xA;&#xD;&#xA;The goal is: make the game-design and rules-set so brain-dead that you can focus all of your attention on learning the new thing that you're learning (a language, a platform, an API) and not have to constantly take breaks to figure out how the game works.&#xD;&#xA;&#xD;&#xA;Once you get going, you'll find that pong is actually slightly more complicated than it seems at first blush.  (I'm teaching a guy programming and he's using pong as his learning project.  We added some features, and now he's getting distracted from learning to program by learning how to do all these cool features :)&#xD;&#xA;&#xD;&#xA;Anyone, once you've done app#1 all the way through until it's ready to give/sell to others, *THEN* take on something a little more complicated (Tetris, adventure or whatever you like) but, to get started learning a new technology, make the thing that you program brain-dead simple.&#xD;&#xA;&#xD;&#xA;Other examples:&#xD;&#xA;&#xD;&#xA;* Guess the number (between 1 &amp; 1000)&#xD;&#xA;* Mastermind (advanced guess the number.)&#xD;&#xA;* SimplePaint&#xD;&#xA;* Snake/worm/whatever-you-call-it.&#xD;&#xA;&#xD;&#xA;But, again -- start with something that's way-too-easy, so that you can actually complete something and look back and see what's involved.  The difference between having written ONE app in a language/platform/SDK/engine and having written ZERO apps is **HUGE**.  The difference between 1 &amp; 2, or 2 &amp; 5, much less so, so you can take bigger steps, but make the 0 to 1 step be a teeny-tiny one; it'll be bigger than you think!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1711" PostHistoryTypeId="2" PostId="891" RevisionGUID="11f4e176-9ac1-463f-a81a-3cbc2673d2bf" CreationDate="2010-07-21T19:26:31.047" UserId="23" Text="Consider contacting a publisher.&#xD;&#xA;&#xD;&#xA;Full Disclosure: I work for a place called Attainment Company. We specialize in Special Education products.  We sell both software and physical products (books, games, etc.), we distribute catalogs semi-frequently (worldwide) and also do some web sales.  A lot of our software is done in house, but we do sell some applications from other companies as well.  I don't know 100% how that works because I'm not at all involved with the catalog and all that (Software Engingeer), but I imagine that there are similar companies for the general education market.  Though if you feel your product would be applicable to special education I can see if I can find someone to get in touch with." />
  <row Id="1712" PostHistoryTypeId="2" PostId="892" RevisionGUID="d9d7b334-9c55-422c-b9a7-9a64191d419c" CreationDate="2010-07-21T19:27:29.050" UserId="292" Text="In our custom assertion handler, I'd like to display a message box asking to see whether or not this failure can be ignored.  However, when our DirectX game is full screen, I can't get the MessageBox function to display above the full screen.&#xD;&#xA;&#xD;&#xA;Note: The first parameter to MessageBox is the the HWND used to create the device, and it still does not work.&#xD;&#xA;&#xD;&#xA;Is this even possible?" />
  <row Id="1713" PostHistoryTypeId="1" PostId="892" RevisionGUID="d9d7b334-9c55-422c-b9a7-9a64191d419c" CreationDate="2010-07-21T19:27:29.050" UserId="292" Text="Display a Message Box over a Full Screen DirectX application" />
  <row Id="1714" PostHistoryTypeId="3" PostId="892" RevisionGUID="d9d7b334-9c55-422c-b9a7-9a64191d419c" CreationDate="2010-07-21T19:27:29.050" UserId="292" Text="&lt;programming&gt;&lt;windows&gt;&lt;directx&gt;" />
  <row Id="1716" PostHistoryTypeId="2" PostId="894" RevisionGUID="cabd2a16-329f-4ce8-a167-01e6275d5f7a" CreationDate="2010-07-21T19:29:17.873" UserId="240" Text="This is subjective, of course, but I think that consistency is much more important to game play than speed.&#xD;&#xA;&#xD;&#xA;Basically, players will put up with a slower frame-rate if the game is consistent, fun to play and not jarring.  However, even if the game totally rocks, if it gives people headaches to look at because it bursts, and/or they can't control things, they will become annoyed &amp; stop playing.&#xD;&#xA;&#xD;&#xA;So...&#xD;&#xA;&#xD;&#xA;Focus on consistent FPS throughout design &amp; development.&#xD;&#xA;&#xD;&#xA;Focus on faster (but still consistent) FPS when the game is nearly done, and you have time to improve performance without worrying about bug fixes, etc.&#xD;&#xA;&#xD;&#xA;One way to get better performance is to use callbacks/delegates/interrupts (depending on your language/platform) rather than polling.&#xD;&#xA;" />
  <row Id="1717" PostHistoryTypeId="5" PostId="876" RevisionGUID="7a4cf3f0-ee6f-4f6d-a0d6-56799cfd39fc" CreationDate="2010-07-21T19:29:42.897" UserId="370" Comment="bitwise has less branches than boolean" Text="**Reduce boolean expression evaluation**&#xD;&#xA;&#xD;&#xA;This one is really desperate, as it's a very subtle but dangerous change to your code.  However if you have a conditional that is evaluated an inordinate number of times, you can reduce the overhead of boolean evaluation by using bitwise operators instead.  So:&#xD;&#xA;&#xD;&#xA;    if ((foo &amp;&amp; bar) || blah) { ... } &#xD;&#xA;&#xD;&#xA;Becomes:&#xD;&#xA;&#xD;&#xA;    if ((foo &amp; bar) | blah) { ... }&#xD;&#xA;&#xD;&#xA;Using integer arithmetic instead.  If your foos and bars are constants or evaluated before the if(), this could be faster than the normal boolean version.&#xD;&#xA;&#xD;&#xA;As a bonus the arithmetic version has less branches than the regular boolean version.  Which is another way to [optimize][1].&#xD;&#xA;&#xD;&#xA;The big downside is that you lose lazy evaluation - the whole block is evaluated, so you can't do `foo != NULL &amp; foo-&gt;dereference()`.  Because of this, it's arguable that this is hard to maintain, and so the trade-off may be too great.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/853/c-low-level-optimization-tips/855#855" />
  <row Id="1718" PostHistoryTypeId="2" PostId="895" RevisionGUID="5e4f30ac-5811-4bcf-96bb-b9d88e10cad3" CreationDate="2010-07-21T19:31:13.267" UserId="398" Text="Both.  I'd say ideally, consistently over 60 frames per second.  Realistically, consistently over 30 frames per second.  Under 30 frames per second and it starts affecting how well the player can perform (I'm thinking of FPS/twitch-based games by the way, strategy games can probably get by on lower).&#xD;&#xA;&#xD;&#xA;If you really had to say one or the other, I'd go with consistency.  If you can guarantee a frame rate, then you can focus on moving that guaranteed framerate higher." />
  <row Id="1719" PostHistoryTypeId="2" PostId="896" RevisionGUID="38bc44e1-4305-4530-b463-e513fd92a329" CreationDate="2010-07-21T19:31:31.613" UserDisplayName="OnePercentZombie" Text="For very obscure properties, like sprinting or limited stealth, you may have to try random numbers or rough guesses that you tweak.&#xD;&#xA;&#xD;&#xA;I'd highly recommend setting up a way to repeat tests with robots of various configurations under AI control. Run numerous trials with a configuration to find out how powerful it compares to some baseline robot, and then you can improve the baseline along established upgrade paths (higher damage, higher fire rate) until the match becomes more even. That helps you figure out the equivalence of stranger abilities that are harder to quantify.&#xD;&#xA;&#xD;&#xA;A similar trial set-up with a human player going up against AI could be helpful, by repeating with increasingly improved AI robots. The performance curve will shed some light on the impact of a given upgrade." />
  <row Id="1720" PostHistoryTypeId="2" PostId="897" RevisionGUID="61bf2aaa-38f0-4919-b2c1-dbb500db0928" CreationDate="2010-07-21T19:32:23.373" UserId="389" Text="[Amit's A* Pages][1] were a good introduction for me. You can find a lot of good visualizations searching for [AStar Algorithm][2] on youtube.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://theory.stanford.edu/~amitp/GameProgramming/#S1&#xD;&#xA;  [2]: http://www.youtube.com/results?search_query=astar+algorithm" />
  <row Id="1721" PostHistoryTypeId="2" PostId="898" RevisionGUID="aec3752e-f832-46ce-a019-368da693ff11" CreationDate="2010-07-21T19:33:43.323" UserId="395" Text="As far as I was able to tell last time we tried this, it isn't possible." />
  <row Id="1722" PostHistoryTypeId="2" PostId="899" RevisionGUID="da21006f-8472-4705-ac40-ec54c6830c01" CreationDate="2010-07-21T19:33:58.563" UserId="240" Text="In addition to Iain's and Ben's very good answers, an important concept is the differentiation between &quot;what is legal&quot; and &quot;what is enforceable.&quot;&#xD;&#xA;&#xD;&#xA;Just because no one has a particular interest in enforcing their Intellectual Property rights doesn't mean they don't own them and couldn't suddenly change their mind about where to put their legal focus.  It's safest (and most ethical) to make an honest attempt to seek permission from the rightful owner.  This may involve cost to you, as to hire someone to find the rightful owner.&#xD;&#xA;&#xD;&#xA;Of course, you can choose to &quot;live life on the edge&quot; and just go for it, but the legal/right thing to do is to put in the effort.&#xD;&#xA;&#xD;&#xA;Btw, I have some experience with asking for permission to clone what you might think of as abandonware, and the rightful owner telling me &quot;no problem, we're totally done with that IP, now&quot;, so don't think it can't happen." />
  <row Id="1723" PostHistoryTypeId="2" PostId="900" RevisionGUID="c883a537-ab99-4818-8ce0-03bea3710e62" CreationDate="2010-07-21T19:35:16.050" UserId="400" Text="I saw a talk at GDC on this 5 or six years back.  I'm looking for references now.&#xD;&#xA;&#xD;&#xA;[This paper][1] might be related.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.princeton.edu/~funk/acoustics.html" />
  <row Id="1724" PostHistoryTypeId="2" PostId="901" RevisionGUID="48b4383f-f132-4d3a-96b7-0dda5e9a0009" CreationDate="2010-07-21T19:38:18.023" UserId="386" Text="It sounds like you've got at least two threads of execution, with your rendering on its own thread. If that's the case, then you actually have two frame rates to worry about. You'll want both to be as fast as possible. However, it also depends on the kind of game you're building. &#xD;&#xA;&#xD;&#xA;Are you building a first-person shooter, where small drops in frame rate could give an opponent an advantage? If so, then you'll want to make sure your average fps is high enough, but also worry about your worst-case frame times. Are you building a board game? If so, the occasional frame time spike isn't going to kill the user experience.&#xD;&#xA;&#xD;&#xA;In my own games, my process is usually something like this:&#xD;&#xA;&#xD;&#xA;- Run a profiler on the code&#xD;&#xA;- Look at the average frame rate. If it's too low on average, bring the averate fps up by optimizing the slow stuff.&#xD;&#xA;- Once average fps is high enough, look for worst-case frame times (frames where you see big spikes in computational or rendering time). Try to optimize those worst-case scenarios to improve worst-case frame time.&#xD;&#xA;&#xD;&#xA;If you're at 30 fps most of the time, but you spike to 200ms every 10 seconds, that's going to cause problems. But if you're averaging 15 fps, bring your average fps up first.&#xD;&#xA;&#xD;&#xA;So, the short answer would probably be: optimize whatever makes the biggest improvement to the user experience first." />
  <row Id="1725" PostHistoryTypeId="2" PostId="902" RevisionGUID="6861d385-2e37-4fbf-86b5-74f7bf716ba1" CreationDate="2010-07-21T19:38:20.847" UserId="353" Text="Locking your FPS to a consistent number allows you to:&#xD;&#xA;&#xD;&#xA;- Maintain a smooth visual appearance&#xD;&#xA;- Keep animations running in linear time, physics objects falling at a consistent rate between frames, etc.&#xD;&#xA;- However, the most useful part of locking your FPS is that on frames where you have some down time you can do other work--collect garbage, work on streaming in the next area of the map, etc and you will have some headroom when rendering something big and shiny or when knocking down a pile of boxes." />
  <row Id="1726" PostHistoryTypeId="2" PostId="903" RevisionGUID="a60ae4fd-7936-4d74-b89f-1e0a518e71f4" CreationDate="2010-07-21T19:39:12.187" UserId="47" Text="I would think you would want both a consistent and larger FPS.  The smoother the graphics (due to refresh rate), the better.  If it starts dropping below 30FPS your users are going to start to notice the jitteriness and will become frustrated with lack of response time to actions." />
  <row Id="1727" PostHistoryTypeId="2" PostId="904" RevisionGUID="eaaa2437-78df-466b-a26f-3ae89d4ffbf9" CreationDate="2010-07-21T19:39:21.390" UserDisplayName="Borut" Text="Yeah, you very well may be out of luck - (although there's a MessageBoxOptions that allows you to specify ServiceNotification, which might do the right thing http://msdn.microsoft.com/en-us/library/system.windows.forms.messageboxoptions.aspx)&#xD;&#xA;&#xD;&#xA;Typically I write my own message rendering at that point (to make sure you can use the assert anywhere, on xbox, whatever). " />
  <row Id="1728" PostHistoryTypeId="2" PostId="905" RevisionGUID="ebcc8236-7da1-4664-8cbf-f3b4e31f6a4a" CreationDate="2010-07-21T19:43:37.060" UserDisplayName="thyrgle" Text="Check out this website:[12 Computer science game project ideas&#xD;&#xA;][1]&#xD;&#xA;&#xD;&#xA;Some of these games include what others have said like:&#xD;&#xA;&#xD;&#xA;1. Pacman&#xD;&#xA;2. Tetris&#xD;&#xA;3. Pong&#xD;&#xA;&#xD;&#xA;But it also talks about some other games you could try making such as:&#xD;&#xA;&#xD;&#xA;1. Tic-Tac-Toe&#xD;&#xA;2. Who wants to be a millionaire?&#xD;&#xA;3. And a Mario clone.&#xD;&#xA;&#xD;&#xA;Also, it gives a sense of what you should try doing first since it gives a sense of difficulties for each game (and therefore a plan of how you should tackle the games): &#xD;&#xA;&#xD;&#xA;1. Beginner&#xD;&#xA;2. Intermediate&#xD;&#xA;3. Advanced&#xD;&#xA;4. Best&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://compsci.ca/blog/12-computer-science-game-project-ideas/" />
  <row Id="1729" PostHistoryTypeId="2" PostId="906" RevisionGUID="c9d06c4e-70a7-4474-913a-35e474a7f274" CreationDate="2010-07-21T19:43:49.663" UserId="318" Text="Try writing a WPF GUI instead (start with a prototype).&lt;BR/&gt;&#xD;&#xA;That should fix your problem.&lt;BR/&gt;&#xD;&#xA;(Render to a full screen WPF's DirectX surface and not directly to screen.)&lt;BR/&gt;" />
  <row Id="1730" PostHistoryTypeId="5" PostId="900" RevisionGUID="ef4dec11-fe50-4408-b91a-c45f99b314a2" CreationDate="2010-07-21T19:44:35.793" UserId="400" Comment="linkage" Text="I saw a talk at GDC on this 6 or 7 years back.  Possibly this one: [Geometric Modeling of&#xD;&#xA;Sound Propagation in &#xD;&#xA;3D Games][1].&#xD;&#xA;&#xD;&#xA;Others by the same author:  &#xD;&#xA;&#xD;&#xA; - [Priority-Driven Acoustic Modeling&#xD;&#xA;   for Virtual Environments][2] &#xD;&#xA; - [Interactive Acoustic Modeling for&#xD;&#xA;   Virtual Environments][3]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/gdcarchive/2003/Funkhouser_Thomas.pdf&#xD;&#xA;  [2]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.40.1430&amp;rep=rep1&amp;type=pdf&#xD;&#xA;  [3]: http://www.cs.princeton.edu/~funk/acoustics.html" />
  <row Id="1731" PostHistoryTypeId="2" PostId="907" RevisionGUID="b750de10-6bf9-4375-bdcd-f7d82f81b0bd" CreationDate="2010-07-21T19:45:43.123" UserId="395" Text="A mini Zelda clone is good and exercises some skills that haven't been mentioned much here. Scrolling a big map of tiles and simple 8-way movement controls are good to know. Bonus points if you can do enemies, but I wouldn't worry too much about that." />
  <row Id="1732" PostHistoryTypeId="2" PostId="908" RevisionGUID="c7a8e34e-a8d7-4cd7-813a-e28ca775f667" CreationDate="2010-07-21T19:49:02.100" UserId="402" Text="Specifically, what is the best way to implement an achievement system flexible enough to handle going beyond simple statistics-driven achievements such as &quot;kill &lt;em&gt;x&lt;/enemies.&quot;" />
  <row Id="1733" PostHistoryTypeId="1" PostId="908" RevisionGUID="c7a8e34e-a8d7-4cd7-813a-e28ca775f667" CreationDate="2010-07-21T19:49:02.100" UserId="402" Text="What is the best way to implement achievements?" />
  <row Id="1734" PostHistoryTypeId="3" PostId="908" RevisionGUID="c7a8e34e-a8d7-4cd7-813a-e28ca775f667" CreationDate="2010-07-21T19:49:02.100" UserId="402" Text="&lt;architecture&gt;" />
  <row Id="1735" PostHistoryTypeId="2" PostId="909" RevisionGUID="1c765d3d-a2bc-46b8-b56e-28c3c656d1a6" CreationDate="2010-07-21T19:49:18.467" UserId="374" Text="## The short and sweet question ##&#xD;&#xA;I'm new to game programming in general, so how do I go about making GOOD QUALITY opensource games?&#xD;&#xA;&#xD;&#xA;## What I have come across ##&#xD;&#xA;There are a multitude of games that I have played on Linux that are just downright shameful. The graphics are terrible, the AI is lacking, and the replayability is little to none. Don't get me wrong; I have played some good opensource games such as World of Goo, Gish, and Aquaria; but I'm really missing out on good games over here in my Linux hut.&#xD;&#xA;&#xD;&#xA;## What I have found ##&#xD;&#xA;So, I did a little research on how the games mentioned were made. Thus, I have started learning OpenGL and SDL using my C++ programming experience (which is about a year of programming, not much). I also picked up the following books, which were recommended from programmers on stack overflow:&#xD;&#xA;&#xD;&#xA; - [Focus on SDL][1] (The only let me post one link for now...)&#xD;&#xA; - The OpenGL Super bible&#xD;&#xA; - GEB and CODE&#xD;&#xA;&#xD;&#xA;## What I have been recommended ##&#xD;&#xA;I have also talked to someone who is a fairly experienced programmer who recommends that I take the C++ route to gaming, and that OpenGL and SDL would be a good way to go. He also recommended that I start using versioning control with my programs (Git particularly). What are your opinions on that?&#xD;&#xA;&#xD;&#xA;Hope that was clear, guys.&lt;br&gt;&lt;br&gt;&#xD;&#xA;Let me know,&lt;br&gt;&#xD;&#xA;Immanu'el&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Focus-Premier-Press-Game-Development/dp/1592000304" />
  <row Id="1736" PostHistoryTypeId="1" PostId="909" RevisionGUID="1c765d3d-a2bc-46b8-b56e-28c3c656d1a6" CreationDate="2010-07-21T19:49:18.467" UserId="374" Text="How can I get into opensource game development?" />
  <row Id="1737" PostHistoryTypeId="3" PostId="909" RevisionGUID="1c765d3d-a2bc-46b8-b56e-28c3c656d1a6" CreationDate="2010-07-21T19:49:18.467" UserId="374" Text="&lt;c++&gt;&lt;opengl&gt;&lt;open-source&gt;" />
  <row Id="1738" PostHistoryTypeId="2" PostId="910" RevisionGUID="7031810b-9841-4c19-8b9e-8c93009a40fe" CreationDate="2010-07-21T19:49:21.773" UserId="389" Text="What algorithm have you used in the past to generate a simple 2d maze? &#xD;&#xA;" />
  <row Id="1739" PostHistoryTypeId="1" PostId="910" RevisionGUID="7031810b-9841-4c19-8b9e-8c93009a40fe" CreationDate="2010-07-21T19:49:21.773" UserId="389" Text="Algorithm for generating a 2d maze" />
  <row Id="1740" PostHistoryTypeId="3" PostId="910" RevisionGUID="7031810b-9841-4c19-8b9e-8c93009a40fe" CreationDate="2010-07-21T19:49:21.773" UserId="389" Text="&lt;algorithm&gt;&lt;procedural-generation&gt;" />
  <row Id="1741" PostHistoryTypeId="2" PostId="911" RevisionGUID="90210613-0a02-43bb-8332-728f03b9d143" CreationDate="2010-07-21T19:49:43.427" UserDisplayName="neilogd" Text="**Keep an eye on your stack usage**&#xD;&#xA;&#xD;&#xA;Everything you add to the stack is an extra push and construction when a function is called. When a large amount of stack space is required, it can sometimes be beneficial to allocate working memory ahead of time, and if the platform you're working on has fast RAM available for use - all the better!" />
  <row Id="1742" PostHistoryTypeId="16" PostId="911" RevisionGUID="90210613-0a02-43bb-8332-728f03b9d143" CreationDate="2010-07-21T19:49:43.427" UserId="-1" />
  <row Id="1745" PostHistoryTypeId="18" PostId="91" RevisionGUID="d0cbfeab-307d-44a6-a1e5-cb5c61c4625b" CreationDate="2010-07-21T19:52:34.980" UserId="155" Comment="from http://gamedev.stackexchange.com/questions/78/where-can-i-find-free-2d-graphics-for-my-game" Text="[{&quot;Id&quot;:155,&quot;DisplayName&quot;:&quot;Kevin Montrose&quot;}]" />
  <row Id="1746" PostHistoryTypeId="18" PostId="122" RevisionGUID="d0cbfeab-307d-44a6-a1e5-cb5c61c4625b" CreationDate="2010-07-21T19:52:34.980" UserId="155" Comment="from http://gamedev.stackexchange.com/questions/78/where-can-i-find-free-2d-graphics-for-my-game" Text="[{&quot;Id&quot;:155,&quot;DisplayName&quot;:&quot;Kevin Montrose&quot;}]" />
  <row Id="1747" PostHistoryTypeId="18" PostId="132" RevisionGUID="d0cbfeab-307d-44a6-a1e5-cb5c61c4625b" CreationDate="2010-07-21T19:52:34.980" UserId="155" Comment="from http://gamedev.stackexchange.com/questions/78/where-can-i-find-free-2d-graphics-for-my-game" Text="[{&quot;Id&quot;:155,&quot;DisplayName&quot;:&quot;Kevin Montrose&quot;}]" />
  <row Id="1748" PostHistoryTypeId="18" PostId="141" RevisionGUID="d0cbfeab-307d-44a6-a1e5-cb5c61c4625b" CreationDate="2010-07-21T19:52:34.980" UserId="155" Comment="from http://gamedev.stackexchange.com/questions/78/where-can-i-find-free-2d-graphics-for-my-game" Text="[{&quot;Id&quot;:155,&quot;DisplayName&quot;:&quot;Kevin Montrose&quot;}]" />
  <row Id="1749" PostHistoryTypeId="18" PostId="20" RevisionGUID="d0cbfeab-307d-44a6-a1e5-cb5c61c4625b" CreationDate="2010-07-21T19:52:34.980" UserId="155" Comment="from http://gamedev.stackexchange.com/questions/78/where-can-i-find-free-2d-graphics-for-my-game" Text="[{&quot;Id&quot;:155,&quot;DisplayName&quot;:&quot;Kevin Montrose&quot;}]" />
  <row Id="1751" PostHistoryTypeId="2" PostId="912" RevisionGUID="fe22de75-bb6b-4a52-9bcb-84f091319638" CreationDate="2010-07-21T19:55:17.110" UserId="400" Text="**Use Compiler Intrinsics.**&#xD;&#xA;&#xD;&#xA;Ensure that the compiler is generating the most efficient assembly for certain operations by using intrinsics - constructs that look like function calls that the compiler turns into optimized assembly:&#xD;&#xA;&#xD;&#xA;[Here's a reference for Visual Studio][1], and [here's one for GCC][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/26td21ds(VS.80).aspx&#xD;&#xA;  [2]: http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/X86-Built-in-Functions.html" />
  <row Id="1752" PostHistoryTypeId="16" PostId="912" RevisionGUID="fe22de75-bb6b-4a52-9bcb-84f091319638" CreationDate="2010-07-21T19:55:17.110" UserId="-1" />
  <row Id="1753" PostHistoryTypeId="2" PostId="913" RevisionGUID="f040e21f-5ec6-464f-bff8-5a85a38cefd7" CreationDate="2010-07-21T19:55:23.833" UserId="373" Text="This works for two rectangles aligned with the X and Y axis.  &#xD;&#xA;Each rectangle has the properties:  &#xD;&#xA;&quot;left&quot;, the x coordinate of it's left side,  &#xD;&#xA;&quot;top&quot;, the y coordinate of it's top side,  &#xD;&#xA;&quot;right&quot;, the x coordinate of it's right side,  &#xD;&#xA;&quot;bottom&quot;, the y coordinate of it's bottom side,  &#xD;&#xA;&#xD;&#xA;    function IntersectRect(r1:Rectangle, r2:Rectangle):Boolean {&#xD;&#xA;        return !(r2.left &gt; r1.right&#xD;&#xA;            || r2.right &lt; r1.left&#xD;&#xA;            || r2.top &gt; r1.bottom&#xD;&#xA;            || r2.bottom &lt; r1.top);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I found the original function here: http://tekpool.wordpress.com/2006/10/11/rectangle-intersection-determine-if-two-given-rectangles-intersect-each-other-or-not/  &#xD;&#xA;A description of how it works can also be found there." />
  <row Id="1754" PostHistoryTypeId="2" PostId="914" RevisionGUID="6ebce254-6788-4089-bd6b-a2794fd08ce4" CreationDate="2010-07-21T19:55:34.380" UserId="426" Text="I have used a depth first search] one time to good effect. It generates a good, random-looking maze.&#xD;&#xA;&#xD;&#xA;Also available is a method where you recursively subdivide rectangles, which produces long corridors. This is called the recursive division method.&#xD;&#xA;&#xD;&#xA;[These algorithms and more can be found here.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Maze_generation" />
  <row Id="1755" PostHistoryTypeId="2" PostId="915" RevisionGUID="742b6a50-85cb-4ecc-8e79-89349d22399c" CreationDate="2010-07-21T19:56:04.330" UserId="51" Text="There are a lot of various ways of making mazes.  There's a huge list of them and their descriptions here: http://www.astrolog.org/labyrnth/algrithm.htm&#xD;&#xA;&#xD;&#xA;I think I used the one described under &quot;Perfect&quot;." />
  <row Id="1756" PostHistoryTypeId="2" PostId="916" RevisionGUID="3f8ce543-2179-414c-8340-87dde8d77d51" CreationDate="2010-07-21T19:56:09.167" UserId="216" Text="[AndEngine][1] is pretty new, but it is open source and looks promising.&#xD;&#xA;&#xD;&#xA;Self-description:&#xD;&#xA;&#xD;&#xA;&gt; Free Android 2D OpenGL Game Engine. AndEngine is developed by Nicolas Gramlich.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.andengine.org" />
  <row Id="1757" PostHistoryTypeId="2" PostId="917" RevisionGUID="e16b43b0-21c1-4ef6-b2f9-082a74521f92" CreationDate="2010-07-21T19:57:54.857" UserId="382" Text="If you are doing *any* sort of software development then version control is essential. You have to be able to track changes and if necessary roll-back to previous, known stable, versions.&#xD;&#xA;&#xD;&#xA;This is doubly true (if that's possible) with open source development as you are effectively in a distributed team, possibly in different countries, time zones or continents." />
  <row Id="1758" PostHistoryTypeId="2" PostId="918" RevisionGUID="7d692a84-4109-4dfb-989a-25b8e53bc723" CreationDate="2010-07-21T19:58:51.033" UserId="422" Text="There have been some great answers, specifically: concentrate on making a fun game instead of working forever on your own developer tools (like an engine) and focusing on marketing.&#xD;&#xA;&#xD;&#xA;However in regards to, &quot;when making the transition from hobbyist to full-time indie?&quot;, here's what I think is the biggest mistake:&#xD;&#xA;&#xD;&#xA;-- Do not go fulltime indie unless you have enough money to keep you afloat for years. --&#xD;&#xA;&#xD;&#xA;You should hope for the best (selling tons of games) and prepare for the worst (losing money every single month for a long time). You don't need the additional stress of not knowing if you'll be able to afford rent when trying to make it on your own. Just find the money somehow; be responsible with your dreams." />
  <row Id="1759" PostHistoryTypeId="2" PostId="919" RevisionGUID="0ed964e7-e5df-4ba9-808d-dd07d467d5af" CreationDate="2010-07-21T19:59:19.907" UserDisplayName="thyrgle" Text="**Use silence to you advantage!**&#xD;&#xA;&#xD;&#xA;If your game is going to be scary in anyway silence is key! With a long duration of silence the player gets stressed and scared wondering when something is going to happen. So right in the middle of the level make some guard &quot;Hey! Get back here!&quot; or make some explosion out of no where happen near the players character.&#xD;&#xA;&#xD;&#xA;Be careful though. Because where you place the sound is very important. It is entirely an art. I can only give one piece of advice that is essential for the silence to pay off:&#xD;&#xA;&#xD;&#xA;**Make sure the player cannot see right away where the sound is coming from. Otherwise the scariness will be less intense.**&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1760" PostHistoryTypeId="2" PostId="920" RevisionGUID="bc8e51bb-b8cf-41a4-a4ba-be3278f6ce18" CreationDate="2010-07-21T19:59:35.697" UserId="47" Text="Well, in short, achievements are unlocked when a certain condition is met.  So you need to be able to produce if statements to check the condition you want.&#xD;&#xA;&#xD;&#xA;For example, if you want to know that a level was completed or a boss was defeated, you'd need to have boolean flag turn true when these events happen.&#xD;&#xA;&#xD;&#xA;Then:&#xD;&#xA;&#xD;&#xA;    if(GlobalFlags.MasterBossDefeated == true)&#xD;&#xA;    {&#xD;&#xA;        AchievementClass.MasterBossDefeatedAchievement = true;&#xD;&#xA;        showModalPopUp(&quot;You defeated the Master Boss!  30 gamerscore&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can make this as complex or simplistic as needed to match the condition that you're wanting.&#xD;&#xA;&#xD;&#xA;Some info on Xbox 360 achievements can be found [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xbox.com/en-US/live/engineeringblog/achievements-unlocked.htm" />
  <row Id="1761" PostHistoryTypeId="2" PostId="921" RevisionGUID="a98e2ecb-6796-40c2-9405-60c577fdfa2f" CreationDate="2010-07-21T19:59:46.897" UserId="23" Text="I'd set up a few automated test.&#xD;&#xA;&#xD;&#xA; 1. Two robots, exactly the same.  The win/lose ration should be exactly 50/50.  Then give the new item to one of them and see how much the ratio changes.&#xD;&#xA; 2. Two robots, one slightly better than the other to guarantee that it always wins, generally taking X seconds to win.  Give the item to the better robot and see how much faster (if any) the average kill takes.&#xD;&#xA; 3. Same as 2, but giving the item to the weaker robot, see how much longer it lives and/or if it starts winning now.&#xD;&#xA;&#xD;&#xA;You now know how much of an improvement an item is in various conditions (even matched opponent, better matched opponent, weaker opponent) and can price the item accordingly based on your intuition.  These tests should be run many times (possibly overnight) and the results averaged together for best results." />
  <row Id="1762" PostHistoryTypeId="5" PostId="908" RevisionGUID="19831d88-4944-40c4-b822-6d98cece286e" CreationDate="2010-07-21T20:01:22.820" UserId="402" Comment="Spacing" Text="Specifically, what is the best way to implement an achievement system flexible enough to handle going beyond simple statistics-driven achievements such as &quot;kill &lt;em&gt;x&lt;/em&gt; enemies.&quot;" />
  <row Id="1763" PostHistoryTypeId="2" PostId="922" RevisionGUID="e6216617-705b-4af1-93c0-57352412d79a" CreationDate="2010-07-21T20:02:50.460" UserId="47" Text="Looking for a tool that will randomly generate an image of a world map." />
  <row Id="1764" PostHistoryTypeId="1" PostId="922" RevisionGUID="e6216617-705b-4af1-93c0-57352412d79a" CreationDate="2010-07-21T20:02:50.460" UserId="47" Text="Tools for generating random world maps?" />
  <row Id="1765" PostHistoryTypeId="3" PostId="922" RevisionGUID="e6216617-705b-4af1-93c0-57352412d79a" CreationDate="2010-07-21T20:02:50.460" UserId="47" Text="&lt;tools&gt;&lt;random&gt;&lt;maps&gt;" />
  <row Id="1766" PostHistoryTypeId="2" PostId="923" RevisionGUID="65dedc0f-d73e-4433-ae1b-118b847e4435" CreationDate="2010-07-21T20:03:31.647" UserId="47" Text="[Hero Extant: World Generator][1] looks nice and it's open source.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tophatstuff.co.uk/?p=99" />
  <row Id="1767" PostHistoryTypeId="2" PostId="924" RevisionGUID="bb4d0acb-84d6-4e37-8745-9c4746e892c1" CreationDate="2010-07-21T20:06:17.083" UserId="433" Text="I would say a Tower Defense kind of game is the best place to start at. You can also start by modding already existing games/engines (WarCraft III/HalfLife2 SDK/ etc.) to understand the  overall logic needed, then move on to using your own code base." />
  <row Id="1768" PostHistoryTypeId="2" PostId="925" RevisionGUID="4f8bc02c-9c0c-4cf5-9ef7-4420c1e94f1b" CreationDate="2010-07-21T20:08:46.983" UserId="393" Text=" - Build your art in modular pieces that can be reused throughout the level (or multiple levels)&#xD;&#xA; - Create &quot;Hero&quot; or detail pieces that really stand out and can act as a point of reference for the player.&#xD;&#xA; - Use dirtmaps/detail maps that can overlay your modular pieces to break up any tiling effects.&#xD;&#xA; - Be conscious of your far plane and draw distance.&#xD;&#xA; - Find ways to create depth in your level.  Juxtapose near and far objects to show distance&#xD;&#xA; - Think of your level like a movie-set; are you ever going to go behind something?  No? Then don't model it!&#xD;&#xA; - S-Curves are your friend.  They help with occlusion and with streaming." />
  <row Id="1769" PostHistoryTypeId="2" PostId="926" RevisionGUID="c5d66156-13e2-4b8c-b023-d619670bd35f" CreationDate="2010-07-21T20:09:26.000" UserDisplayName="thyrgle" Text="Have you tried: &#xD;&#xA;http://www.cgtextures.com/" />
  <row Id="1770" PostHistoryTypeId="2" PostId="927" RevisionGUID="3a914617-b8ee-4249-8185-37c7ad7b0f7e" CreationDate="2010-07-21T20:09:35.297" UserId="403" Text="In order to design meaningful quests, the player must be able to do meaningful things.&#xD;&#xA;You must make the most of the design blocks that are available to you and give them meaning inside the context of your quests.&#xD;&#xA;Say, if the player only has access to (moving around), (inflicting damage) and (giving objects), try ascribing additional meaning to these actions. Of course, it all depends on the level of control you have over the creatures' behaviors in your game, but here are a few variation on a herding quest:&#xD;&#xA;&#xD;&#xA; - Damage as behavioral trigger: In this quest, damage = pain. Herd some mobs toward a goal using pain as a motivator, but you must be careful to deal the right amount. Too little and the mobs will not fear/flee you, too much and you might kill them, diminish their value or turn them against you.&#xD;&#xA; - Moving as a behavioral trigger: Mobs follow you when you're in front of them and above them. Find vantage points along the path from which to guide the mobs. Unfortunately, they're occupied by viciously territorial predators.&#xD;&#xA; - Objects as a behavioral trigger: Mobs only follow you for a little while after you've fed them redsilk plums. Collect plums along the way from poisonous and animated redsilk trees.&#xD;&#xA;&#xD;&#xA;However, there's not much more you can do with such primitives. If you have this opportunity, ask your team for more meaningful behavioral primitives that can be exploited in many ways. For instance:&#xD;&#xA;&#xD;&#xA; - Creatures that react to what you're wearing or wielding.&#xD;&#xA; - Creatures that react to existing spells - maybe an ailing salamander *wants* to be engulfed in flames to heal itself.&#xD;&#xA; - Creatures that react to the type of terrain they're on.&#xD;&#xA; - Creatures with medium-term memories that can combine several of the above stimuli.&#xD;&#xA; - Etc.&#xD;&#xA;&#xD;&#xA;Once you have more primitives, you'll find it much easier to create meaningful quests - by following the great pieces of advice on this page - since you'll have access to many more potentially meaningful actions.&#xD;&#xA;&#xD;&#xA;Finally, if you're designing a game, think about these action primitives from the start. That's how you can create a synergy between the game story, the game content and the player's experience. It's much easier to design a meaningful world when you know in advance the kind of (meaningful) things the players will be able to do in it." />
  <row Id="1771" PostHistoryTypeId="2" PostId="928" RevisionGUID="1f05477c-5fbd-444f-b5d2-fe2a2b2f03fb" CreationDate="2010-07-21T20:12:34.463" UserId="371" Text="Plain and simple, the best way to get into opensource gaming is to do it. &#xD;&#xA;&#xD;&#xA;Git is a fine choice for version control and you should start using it immediately. It'll be something you use constantly throughout development and so the sooner you're familiar with it the better. As an added bonus you can host your source on a site like [GitHub][1] so other people can clone, work on and check code into your repository.&#xD;&#xA;&#xD;&#xA;The c++/sdl route is a good one and one that's been relatively well traveled. You should be able to find a good amount of resources on most topics. &#xD;&#xA;&#xD;&#xA;When aiming to get an open source project going, keep in mind that there could be any number of contributors from all different cultures, backgrounds, etc. Their ideas may not necessarily mesh with what you have in mind for the project. You need to keep a balance between maintaining contributors and steering the project towards that final goal.&#xD;&#xA;&#xD;&#xA;I believe the above is why we see relatively low quality open sources games. You have so many cooks contributing while anyone with a strong drive towards a particular idea (which is something I feel a game needs) may become alienated at some point during development.&#xD;&#xA;&#xD;&#xA;I may be wrong here but Gish and Aquaria were only recently open-sourced and were developed by a closed team. I'm also pretty sure that World of Goo source is still closed.&#xD;&#xA;&#xD;&#xA;It may be preferential to not let your first foray into gaming be your first foray into open-sourcing a game as well. It won't hurt to throw it on a public repository, but I've found, much like baking, the first one gets 'thrown away'. It's a learning experience - getting the processes, techniques and math needed to get something usable out. Don't expect your first game to trump the likes of 0 A.D., Battle for Wesnoth or FreeCiv.&#xD;&#xA;&#xD;&#xA;You may want to look intro contributing towards one of the above games, that would be invaluable experience if you want to run a similar project at some point.&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/" />
  <row Id="1772" PostHistoryTypeId="5" PostId="920" RevisionGUID="3ddc138b-1488-4c9b-8c65-d722a3a5aab0" CreationDate="2010-07-21T20:14:11.433" UserId="47" Comment="added 59 characters in body" Text="Well, in short, achievements are unlocked when a certain condition is met.  So you need to be able to produce if statements to check the condition you want.&#xD;&#xA;&#xD;&#xA;For example, if you want to know that a level was completed or a boss was defeated, you'd need to have boolean flag turn true when these events happen.&#xD;&#xA;&#xD;&#xA;Then:&#xD;&#xA;&#xD;&#xA;    if(GlobalFlags.MasterBossDefeated == true &amp;&amp; AchievementClass.MasterBossDefeatedAchievement == false)&#xD;&#xA;    {&#xD;&#xA;        AchievementClass.MasterBossDefeatedAchievement = true;&#xD;&#xA;        showModalPopUp(&quot;You defeated the Master Boss!  30 gamerscore&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can make this as complex or simplistic as needed to match the condition that you're wanting.&#xD;&#xA;&#xD;&#xA;Some info on Xbox 360 achievements can be found [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xbox.com/en-US/live/engineeringblog/achievements-unlocked.htm" />
  <row Id="1773" PostHistoryTypeId="2" PostId="929" RevisionGUID="4bfc39e9-40b0-4fbe-8311-8f84733a679d" CreationDate="2010-07-21T20:14:47.577" UserId="435" Text="Most of the postmortems I've read seem to follow a format of:&#xD;&#xA;&#xD;&#xA;- What we did&#xD;&#xA;- What went well&#xD;&#xA;- What could have gone better&#xD;&#xA;- Conclusion (what was learned, and will be applied next time)&#xD;&#xA;&#xD;&#xA;I'd get all the people involved on the project to toss in their $0.02 and see what they have to say about those things, then compile everything into one big, exciting to read document.&#xD;&#xA;&#xD;&#xA;I guess in answer to your questions:&#xD;&#xA;1. How do you gather all the needed informations from the team? &#xD;&#xA;Ask them.  Email, sit down and chat with them individually and as a team.&#xD;&#xA;&#xD;&#xA;2. How do you condense them in the final postmortem?&#xD;&#xA;Lump together common responses.  Chances are you will be able to recognize general trends (ie: people having the same issues).  Focus on the big/important ones.&#xD;&#xA;&#xD;&#xA;3. How do you avoid to make the same mistakes in the following project?&#xD;&#xA;That's a bit of a tricky one.  Maybe write up a single 8x11&quot; sheet of paper to pin in your cubicle as a reminder to avoid those specific previous mistakes?  I've got a few sticky notes like that just below my monitors, and they seem to do a decent job of reminding me to do certain things." />
  <row Id="1774" PostHistoryTypeId="2" PostId="930" RevisionGUID="1b9ce60b-1bfe-44f3-b897-023fbb8a92f8" CreationDate="2010-07-21T20:16:15.267" UserId="422" Text="I recently started learning spriting/pixel art to help propel my game development endeavors and I've gotten to the point where I'd like to start sharing it for comments, critiques and other feedback.&#xD;&#xA;&#xD;&#xA;I've got a pretty good awareness of some art sites out there but none of them have really struck me as ideal so I'm looking for suggestions from you guys!" />
  <row Id="1775" PostHistoryTypeId="1" PostId="930" RevisionGUID="1b9ce60b-1bfe-44f3-b897-023fbb8a92f8" CreationDate="2010-07-21T20:16:15.267" UserId="422" Text="What's the best place to showcase my pixel art?" />
  <row Id="1776" PostHistoryTypeId="3" PostId="930" RevisionGUID="1b9ce60b-1bfe-44f3-b897-023fbb8a92f8" CreationDate="2010-07-21T20:16:15.267" UserId="422" Text="&lt;assets&gt;&lt;graphics&gt;&lt;sprites&gt;" />
  <row Id="1777" PostHistoryTypeId="2" PostId="931" RevisionGUID="b03f6f30-2ce5-4849-b13f-17bb04609a1a" CreationDate="2010-07-21T20:20:52.010" UserId="55" Text="There are some really great indies over on tigsource.com ([art board][1]). I've seen a lot of those guys pump out some really cool pixel art. I'm sure you'll find a fair amount of people willing to give you advice. You might check out [gamedev.net][2] as well. I know Mark Eugn does a LOT of epic pixel art ([gd.net journal][3]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/index.php?board=24.0&#xD;&#xA;  [2]: http://www.gamedev.net&#xD;&#xA;  [3]: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=398180" />
  <row Id="1778" PostHistoryTypeId="2" PostId="932" RevisionGUID="9f3c6ce3-6265-461e-8fd5-fea64bbb916d" CreationDate="2010-07-21T20:21:31.773" UserId="403" Text="I wholeheartedly recommend **Better game characters by design: a psychological approach** by Katherine Isbister&#xD;&#xA;&#xD;&#xA;http://books.google.com/books?id=TGBTzVj47ZcC&#xD;&#xA;&#xD;&#xA;It covers the whole design process, from cultural preferences to physical features, in exhaustive details.&#xD;&#xA;It also differentiates PC design from NPC design, details the psycho-sociological aspects of each of the design choices, and explains how to evaluate your character design.&#xD;&#xA;&#xD;&#xA;An essential read." />
  <row Id="1779" PostHistoryTypeId="2" PostId="933" RevisionGUID="b3e835aa-c633-4228-b353-d20a968a88d2" CreationDate="2010-07-21T20:21:54.957" UserId="353" Text="A* path finding is a best-first type search that uses an additional heuristic.&#xD;&#xA;&#xD;&#xA;Starting at a given starting &quot;tile&quot;:&#xD;&#xA;&#xD;&#xA;- The 8 tiles around the starting tile are &quot;scored&quot; based on a) the cost of moving from the current tile to the next tile (generally 1 for horizontal or vertical movements, sqrt(2) for diagonal movement).&#xD;&#xA;&#xD;&#xA;- Each tile is then assigned an additional &quot;heuristic&quot; score--an approximation of the relative worth of moving to each tile. Different heuristics are used, the simplest being the straight-line distance between the centers of the start and end tile.&#xD;&#xA;&#xD;&#xA;- The current tile is then &quot;closed&quot;, and the agent moves to the neighboring tile that is open, has the lowest movement score, and the lowest heuristic score.&#xD;&#xA;&#xD;&#xA;- This process is repeated until the goal node is reached, or there are no more open nodes (meaning the agent is blocked).&#xD;&#xA;&#xD;&#xA;There are some improvements that can be made, mainly in improving the heuristic:&#xD;&#xA;&#xD;&#xA;- Taking into account terrain differences, roughness, steepness, etc.&#xD;&#xA;&#xD;&#xA;- It is also sometimes useful to do a &quot;sweep&quot; across the grid to block out areas of the map that are not efficient paths: a U shape facing the agent, for example. Without a sweep test, the agent would first enter the U, turn around, then leave and go around the edge of the U. A &quot;real&quot; intelligent agent would note the U shaped trap and simply avoid it. Sweeping can help simulate this." />
  <row Id="1780" PostHistoryTypeId="2" PostId="934" RevisionGUID="be968a07-0b4d-4d24-9f75-6e36b3ef2452" CreationDate="2010-07-21T20:22:46.077" UserId="370" Text="Wikipedia has a great resource on [maze generation][1].  I've use [randomized prims algorithm][2] with great results.  The division algorithm looks looks interesting but I've never used it.&#xD;&#xA;&#xD;&#xA;Here is wikipedia example of prim's at work.&#xD;&#xA;&#xD;&#xA;![Wikipedia's image][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Maze_generation_algorithm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Maze_generation_algorithm#Randomized_Prim.27s_algorithm&#xD;&#xA;  [3]: http://upload.wikimedia.org/wikipedia/commons/2/28/Prim_Maze.svg" />
  <row Id="1781" PostHistoryTypeId="2" PostId="935" RevisionGUID="d4a94513-4ccf-42bc-b2c9-3e6346309605" CreationDate="2010-07-21T20:25:53.683" UserId="393" Text="There are excellent tutorials for the Akihabara Libraries put together by [Darius Kazemi][1] and [Darren Torpey][2] at:  [Akihabara Tutorials][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tinysubversions.com/&#xD;&#xA;  [2]: http://darrentorpey.com/&#xD;&#xA;  [3]: http://bostongamejams.com/akihabara-tutorials/akihabara-1/" />
  <row Id="1782" PostHistoryTypeId="2" PostId="936" RevisionGUID="a8aa774a-9c00-4941-af8c-d1ec70102e62" CreationDate="2010-07-21T20:27:34.600" UserId="422" Text="&quot;I'm curious what's possible and what the limitations are.&quot;&#xD;&#xA;&#xD;&#xA;The limitations are browser-based. If you're using something hot like the Webkit nightlies, there's basically nothing that flash can do that the browser can't do natively, such as:&#xD;&#xA;&#xD;&#xA;- 2d Graphics (via canvas) with rotation, scaling, opacity, etc.&#xD;&#xA;- 3d (via canvas and WebGL)&#xD;&#xA;- Audio (via the audio tag, though it currently sucks even in browsers that support it)&#xD;&#xA;- HTTP (via XMLHTTPRequest)&#xD;&#xA;- Local Storage (via the localStorage API)&#xD;&#xA;- Sockets (via Web Sockets)&#xD;&#xA;- SVG&#xD;&#xA;- Video (via the video tag)&#xD;&#xA;&#xD;&#xA;AFAIK that's all possible in Google Chrome as well (and if it's not, it will be soon). Sounds like a complete gaming environment to me :)&#xD;&#xA;&#xD;&#xA;(I included links to all this stuff in my first draft but StackExchange wouldn't let me post them since I'm new; sorry!)" />
  <row Id="1783" PostHistoryTypeId="5" PostId="933" RevisionGUID="9f944991-0af1-4820-bfe6-cde6a35b6c30" CreationDate="2010-07-21T20:27:36.767" UserId="353" Comment="added 5 characters in body" Text="A* path finding is a best-first type search that uses an additional heuristic.&#xD;&#xA;&#xD;&#xA;Starting at a given starting &quot;tile&quot;:&#xD;&#xA;&#xD;&#xA;- The 8 tiles around the starting tile are &quot;scored&quot; based on a) the cost of moving from the current tile to the next tile (generally 1 for horizontal or vertical movements, sqrt(2) for diagonal movement).&#xD;&#xA;&#xD;&#xA;- Each tile is then assigned an additional &quot;heuristic&quot; score--an approximation of the relative worth of moving to each tile. Different heuristics are used, the simplest being the straight-line distance between the centers of the given tile and end tile.&#xD;&#xA;&#xD;&#xA;- The current tile is then &quot;closed&quot;, and the agent moves to the neighboring tile that is open, has the lowest movement score, and the lowest heuristic score.&#xD;&#xA;&#xD;&#xA;- This process is repeated until the goal node is reached, or there are no more open nodes (meaning the agent is blocked).&#xD;&#xA;&#xD;&#xA;There are some improvements that can be made, mainly in improving the heuristic:&#xD;&#xA;&#xD;&#xA;- Taking into account terrain differences, roughness, steepness, etc.&#xD;&#xA;&#xD;&#xA;- It is also sometimes useful to do a &quot;sweep&quot; across the grid to block out areas of the map that are not efficient paths: a U shape facing the agent, for example. Without a sweep test, the agent would first enter the U, turn around, then leave and go around the edge of the U. A &quot;real&quot; intelligent agent would note the U shaped trap and simply avoid it. Sweeping can help simulate this." />
  <row Id="1784" PostHistoryTypeId="2" PostId="937" RevisionGUID="03ceb575-ad07-4483-9e40-bb2ea90aa110" CreationDate="2010-07-21T20:27:47.000" UserId="241" Text="What kind of methods are best used managing complex story lines in a game? A simple story is basically linear line with stops, so that would not be that difficult, but a more complex one is basically an elaborate directed graph, with certain requirements to move between nodes. So how does one effectively store and maintain a complex game storyline that has multitude of paths and goals? " />
  <row Id="1785" PostHistoryTypeId="1" PostId="937" RevisionGUID="03ceb575-ad07-4483-9e40-bb2ea90aa110" CreationDate="2010-07-21T20:27:47.000" UserId="241" Text="Managing a complex game storyline or quests system" />
  <row Id="1786" PostHistoryTypeId="3" PostId="937" RevisionGUID="03ceb575-ad07-4483-9e40-bb2ea90aa110" CreationDate="2010-07-21T20:27:47.000" UserId="241" Text="&lt;management&gt;" />
  <row Id="1787" PostHistoryTypeId="2" PostId="938" RevisionGUID="799d660c-935f-4bad-b283-0a66f3e2ceff" CreationDate="2010-07-21T20:29:19.023" UserId="454" Text="There's also ardor3d which is being used by NASA and few other projects: http://ardor3d.com/" />
  <row Id="1788" PostHistoryTypeId="16" PostId="938" RevisionGUID="799d660c-935f-4bad-b283-0a66f3e2ceff" CreationDate="2010-07-21T20:29:19.023" UserId="-1" />
  <row Id="1790" PostHistoryTypeId="2" PostId="940" RevisionGUID="60e76b37-1955-4b57-a3c1-f7e72172aa90" CreationDate="2010-07-21T20:33:47.283" UserId="449" Text="You might find ActiveTut's article on [Path Finding][1] useful. It goes over both A* and Dijkstra's Algorithm and the differences between them. It's geared toward Flash developers, but it should provide some good insight on the theory even if you don't use Flash.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://active.tutsplus.com/tutorials/games/artificial-intelligence-series-part-1-path-finding/" />
  <row Id="1791" PostHistoryTypeId="2" PostId="941" RevisionGUID="b7b47b87-2891-45d7-8fcf-370824671f8a" CreationDate="2010-07-21T20:36:13.157" UserId="452" Text="You need to detail what you mean by &quot;complex&quot;. A good game engine takes care of all the following:&#xD;&#xA;&#xD;&#xA;- Rendering on a stable framerate&#xD;&#xA;- Input handling&#xD;&#xA;- User interface&#xD;&#xA;- Sounds/music&#xD;&#xA;- Resource management (images, sound, data files)&#xD;&#xA;- Saving/loading your game&#xD;&#xA;- Physics (2d or 3d)&#xD;&#xA;&#xD;&#xA;Think to yourself, do I know how to code each of these? How long will I take to program each, and how long will I take to learn how to make an engine do each of these?" />
  <row Id="1792" PostHistoryTypeId="2" PostId="942" RevisionGUID="b7255454-e4e4-4134-9dad-dc1546f00aca" CreationDate="2010-07-21T20:37:01.097" UserId="458" Text="&gt; How do you gather all the needed&#xD;&#xA;&gt; informations from the team?&#xD;&#xA;&#xD;&#xA;I like to have everyone write down their list privately first. On the last project I did a post-mortem for, we had four sections:&#xD;&#xA;1) Things that went right, because we did things in an awesome way&#xD;&#xA;2) Things that went wrong, because we screwed up&#xD;&#xA;3) Things that went right from our partners (outsourcing houses, publishers, etc.)&#xD;&#xA;4) Things that went wrong with our partners because THEY screwed up&#xD;&#xA;&#xD;&#xA;The first two help us to adjust our own behavior. The last two help us to pick better partners (or manage our existing ones better) next time.&#xD;&#xA;&#xD;&#xA;&gt; How do you condense them in the final&#xD;&#xA;&gt; postmortem?&#xD;&#xA;&#xD;&#xA;Have everyone email their lists to one sucker^H^H^H^H^H^H volunteer, who then condenses and anonymizes the lists. The collated list is then sent to everyone and discussed.&#xD;&#xA;&#xD;&#xA;&gt; How do you avoid to make the same&#xD;&#xA;&gt; mistakes in the following project?&#xD;&#xA;&#xD;&#xA;In my experience, you don't :)&#xD;&#xA;In seriousness, when I start a job at a new game company, the first thing I take a look at is the previous post-mortems (if they have them on file somewhere). Usually I see common themes throughout all projects, which tells me ahead of time what kinds of challenges to expect on the current one.&#xD;&#xA;If I were running my own studio, my first instinct would be to start the kickoff of each new project with a re-reading of previous post-mortems, and a discussion of how not to do the same dumb things a fifth time... and then re-visit the hot-button post-mortem issues at each milestone in the project." />
  <row Id="1793" PostHistoryTypeId="2" PostId="943" RevisionGUID="a72c9829-2a5d-430d-a821-b821d78b4c49" CreationDate="2010-07-21T20:38:11.610" UserId="389" Text="The [Pixelation][1] forum has lower traffic but, has always been a good place for honest critiques. [DeviantArt][2] isn't geared specifically towards pixel art but, it's a great place to showcase and interact with other artists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wayofthepixel.net/pixelation/index.php&#xD;&#xA;  [2]: http://www.deviantart.com/" />
  <row Id="1794" PostHistoryTypeId="2" PostId="944" RevisionGUID="a5d2db2c-eef1-4e81-a73e-25608e45ec91" CreationDate="2010-07-21T20:39:48.190" UserId="162" Text="The Neverwinter Nights toolset includes an interesting attempt to solve this problem, known as the Plot Wizard. It didn't originally ship with the toolset, so you may need to try it again if you did some module development years ago. Here's a [lengthy tutorial][1] that goes over the different components designed to engineer an RPG plot.&#xD;&#xA;&#xD;&#xA;The basic summary is that the &quot;plot wizard&quot; allows you to construct storyline and quests from the top down. For instance you can tell it to generate the relevant scripting for a &quot;fetch 10 things&quot; quest, which leads into a fedex, which leads into a custom scripted thing. The wizard will then generate a series of linked components that are tied to the plot script, and then allows you to place them in the world. This allows you to easily move NPCs or enemies around in the world without breaking any scripting connections.&#xD;&#xA;&#xD;&#xA;I don't know of any other commercial games that use this technique (most seem to use a ton of one off variables that are checked via scripts), but I've always felt this was a reasonable base for building a complete rpg or adventure-style game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nwn.bioware.com/builders/plotwizard_tutorial.html" />
  <row Id="1795" PostHistoryTypeId="2" PostId="945" RevisionGUID="d8194eed-35c0-4342-8eac-45e7dd2bec18" CreationDate="2010-07-21T20:41:50.430" UserId="452" Text="I posted this ladder at TIGsource a while ago. It starts from the very basic to the very complex.&#xD;&#xA;&#xD;&#xA;* **&quot;Guess the number&quot; / Hangman** (basic interface, select data from a database)&#xD;&#xA;* **Tic-Tac-Toe / Rock-Paper-Scissors** (turn-based gameplay, opponent AI)&#xD;&#xA;* **Arkanoid / Pong** (collisions, stable frame rate, score, levels)&#xD;&#xA;* **Tetris** (data structures and how they relate to gaming)&#xD;&#xA;* **1942 / Shoot-em-up** (enemies, bullets)&#xD;&#xA;* **simple platformer / pinball game** if your engine does platformers (gravity-based collisions)&#xD;&#xA;* **Bomberman / Pacman** (tile-based movement, complex enemy AI)&#xD;&#xA;* **Two-player game** of any of the types above (two player inputs)&#xD;&#xA;* **Roguelike / Diablo** (Inventory management, multiple enemy AIs, saving and loading complex game states)&#xD;&#xA;* **Faceball / Wolfenstein 3D** (basic 3d movement and rendering)&#xD;&#xA;* **Network turn-based game** (basic networking)&#xD;&#xA;* **Gimmicky 3D third-person platformer** (physics, complex 3d movement)&#xD;&#xA;* **Network real-time game** (Client-server synchronism, lag)&#xD;&#xA;* **MMORPG** (Persistent world)&#xD;&#xA;" />
  <row Id="1796" PostHistoryTypeId="2" PostId="946" RevisionGUID="5650bc0f-e1c7-494c-b520-2794d86f51c6" CreationDate="2010-07-21T20:42:55.717" UserDisplayName="thyrgle" Text="You might try use made skins and create a community for that. &#xD;&#xA;&#xD;&#xA;A lot of people like designing stuff for their games. Such as the example of chess or checkers they should be able to draw their own custom board tiles or make their own custom pieces (with that though, if you let the make their own custom pieces be sure to be careful on what your animations are like as they can be easily made to look awkward). (A very good example of this is Spore).&#xD;&#xA;&#xD;&#xA;Also, you should really add a community for showing of their custom skins. Their was a racing game (called Forza or something like that) that gave players the ability to paint cars and show them off or sell them on the community market. Even though this isn't a racing community your targeting, almost all communities like to this kind of interaction.&#xD;&#xA;&#xD;&#xA;In addition communities can help with multiplayer challenges, leader boards etc. Computers just are not the same as human players. Look at Call of Duty as a good success of multiplayer. I mostly play that game for the multiplayer as well as others too." />
  <row Id="1797" PostHistoryTypeId="2" PostId="947" RevisionGUID="e6da5176-3852-423c-b32c-bf38c5dc7e8f" CreationDate="2010-07-21T20:45:42.793" UserId="400" Text="It appears that there are ways to make money with flash games through portal and aggregator sites and embedded ads.  &#xD;&#xA;&#xD;&#xA;But I do my programming in C and C++.  I've started a prototype which relies on a few existing C++ SDK's.  The game would have to be downloadable.   Is this just a labor of love, or are there any ways to make money from this type of game?  Does anyone pay for shareware anymore?  What other options are there?   " />
  <row Id="1798" PostHistoryTypeId="1" PostId="947" RevisionGUID="e6da5176-3852-423c-b32c-bf38c5dc7e8f" CreationDate="2010-07-21T20:45:42.793" UserId="400" Text="Is there a way to make money from indie downloadable games?" />
  <row Id="1799" PostHistoryTypeId="3" PostId="947" RevisionGUID="e6da5176-3852-423c-b32c-bf38c5dc7e8f" CreationDate="2010-07-21T20:45:42.793" UserId="400" Text="&lt;marketing&gt;&lt;money&gt;" />
  <row Id="1800" PostHistoryTypeId="2" PostId="948" RevisionGUID="616c407d-bb32-4272-bf9a-1c2abdf90946" CreationDate="2010-07-21T20:47:48.870" UserId="458" Text="The most important rule of learning game programming: learning programming is hard. Learning game design is hard. Learning how to make good game art or audio is hard. Trying to do all of these things at the same time is a recipe for failure. Learn one thing at a time.&#xD;&#xA;&#xD;&#xA;Corollary: program a game where the design, art and sound are already done. Make clones, not original games.&#xD;&#xA;&#xD;&#xA;In my classes, I always recommend these games to start, in order:&#xD;&#xA;&#xD;&#xA;1) Tetris. The art is colored rectangles, which even a total klutz can draw in Microsoft Paint. You don't need sound. The programming is relatively simple, but still requires a few key things: understanding the difference between the internal game state and what's drawn on the screen; being able to draw on the screen, period (probably involving sprites and blitting); being able to accept user input in realtime rather than just using getch() or scanf() where you have to wait for them.&#xD;&#xA;&#xD;&#xA;2) Breakout/Arkanoid. The art is still colored rectangles, and you still don't need sound. Uses all of the basic concepts of Tetris, plus some basic collision detection and 2D physics since the ball has to move and bounce smoothly.&#xD;&#xA;&#xD;&#xA;3) Gradius/R-Type. You can probably find some freeware tilesets to make this. Here the background is scrolling, so you have to learn a bit more about how graphics memory works, using techniques like page-flipping and double-buffering and drawing stuff outside the boundaries of the visible screen. You also tend to have dynamic enemy and bullet spawns, so you'll need to learn to clean up after yourself (i.e. get rid of enemies and bullets that leave the screen so your game doesn't leak memory like a sieve).&#xD;&#xA;&#xD;&#xA;4) Super Mario Bros. Similar to the previous scrolling project, except the scrolling is now under player control and not automatic. You also have to deal with gravity and all the fun collision stuff that goes along with it (like not falling through the floor just because you were a few pixels above in the last frame and want to move to a few pixels below in the next frame). Also note that gravity is conditional: it affects the player and some enemies, but typically not the platforms or floating coins or whatever, which is a bit different from the real world.&#xD;&#xA;&#xD;&#xA;If you can do all four of those, you should be able to do pretty much any 2D game you want; all the tools are there. If you want to make a 3D game... learn 2D first because it's much easier and you don't need to understand the math as in-depth and you need to understand the 2D stuff anyway... and then when you're comfortable with that, start working with some basic 3D tools (either libraries like Torque or Unity, or open-source games like the original Doom and Quake).&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="1801" PostHistoryTypeId="2" PostId="949" RevisionGUID="cc87ce47-c63c-4de5-b3d4-16b24af44502" CreationDate="2010-07-21T20:52:10.797" UserId="353" Text="Apart from selling it, see:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/844/is-there-any-way-to-earn-money-with-an-open-source-game/850#850&#xD;&#xA;&#xD;&#xA;I realize this isn't strictly an open source game but many of the concepts above apply." />
  <row Id="1802" PostHistoryTypeId="2" PostId="950" RevisionGUID="6a55ff7c-1da5-446e-a7cb-4d5b89f4dc51" CreationDate="2010-07-21T20:54:48.793" UserDisplayName="Douglas" Text="try in-game advertising, it fits well to your case" />
  <row Id="1803" PostHistoryTypeId="2" PostId="951" RevisionGUID="0f053b81-3ccd-415a-9498-3f304ee06213" CreationDate="2010-07-21T20:56:01.583" UserId="382" Text="One extra thing to bear in mind:&#xD;&#xA;&#xD;&#xA;Please give the poor player the choice about what level of &quot;interesting&quot; they want. I can't count the number of these sort of games I've given up on because they made (to me) annoying noises and wasted time with unnecessary (again to me) animations. The visuals did attract me to the game in the first place, but they can become tiresome. How many people turn off the Windows sounds as soon as they get a new PC?&#xD;&#xA;&#xD;&#xA;Part of the appeal of this sort of game on the computer is that they are (or should be) quick and easy to play. You might only have 5 minutes to spare and need a distraction, you don't want to be waiting for half that time for the game to load or animate the setting up of the board." />
  <row Id="1804" PostHistoryTypeId="2" PostId="952" RevisionGUID="3f613e9c-884b-4d72-94b2-caca3c3369b0" CreationDate="2010-07-21T20:56:45.900" UserId="400" Text="**Zombies!!**&#xD;&#xA;&#xD;&#xA;Sometimes your AI shouldn't be so &quot;I&quot;.  For certain classes of MOBs (see above), the &quot;Face where you want to go and Advance&quot; algorithm is all you need." />
  <row Id="1805" PostHistoryTypeId="2" PostId="953" RevisionGUID="f2a6eaaf-dab0-4cd8-b180-0de6594501b0" CreationDate="2010-07-21T20:57:45.697" UserDisplayName="jonstout" Text="I think your best bet would be to get into mobile phone development if you'd like to make money. Yes it's tough to get found through all the other crap apps/games, but if your game is good it will see the light of day. Microsoft also has XNA studio. With that you can program for your main platform, say PC, and with the click of a button plus some new code for a controller or touch screen you can port it to their XBOX or new Win7 mobile phone platform." />
  <row Id="1806" PostHistoryTypeId="2" PostId="954" RevisionGUID="eba932fb-4ec5-4f63-b0a2-ba34c6681e37" CreationDate="2010-07-21T20:58:02.123" UserId="455" Text="[donjon.bin.sh][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://donjon.bin.sh/world/&#xD;&#xA;&#xD;&#xA;It does generate many kind of worlds and maps." />
  <row Id="1807" PostHistoryTypeId="2" PostId="955" RevisionGUID="0c8f86da-86b4-4cfc-9f90-6d25d4d8001f" CreationDate="2010-07-21T20:58:15.413" UserId="241" Text="Fractals are a popular method of generating random maps, and there are a few tools that are available. I've used [Donjon][1] with some success to generate base maps. It's not perfect though. [John Olsson][2] used to have another online map generator but it seems to be defunct now, the C code for it is still downloadable on the page.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://donjon.bin.sh/world/  &quot;Donjon&quot;&#xD;&#xA;  [2]: http://www.lysator.liu.se/~johol/fwmg/fwmg.html &quot;John Olsson&quot;" />
  <row Id="1808" PostHistoryTypeId="2" PostId="956" RevisionGUID="2efac187-02df-4bef-b4ee-864870f8f608" CreationDate="2010-07-21T20:58:32.700" UserId="458" Text="Depends on exactly how your system is put together. If it's simple branching, then just treating it as a linear story with some flags to tell exactly what path you're on (or if you prefer to visualize this way, a binary tree structure where each node is a story choice point and the current place in the story is a pointer to one of the nodes). A slightly more involved story with multiple paths that can cross over each other could be modeled as a directed acyclic graph using the same technique.&#xD;&#xA;&#xD;&#xA;What if you have multiple story arcs going on simultaneously, like a typical &quot;open world&quot; quest system where the player may have several quests at once? If the quests don't interact with one another, you can just treat each of them as its own separate linear or branching mini-tree. What if they do modify each other? Here's my preferred option:&#xD;&#xA;&#xD;&#xA;A modified directed graph, where each node represents a quest. Here you have two basic kinds of arrows between nodes: &quot;activate&quot; and &quot;deactivate&quot;. In this way, completing a quest might open up new quests, and it also might invalidate old quests that no longer make sense (for example if you're given a set of quests, each of which is to help a different side of some warring factions, completing one quest might auto-hide the other quests if you want to force the player to pick one side and stick with it). You'll also want to store in each node its current status: active (currently visible to the player), inactive (has never been visible to the player), completed (player has finished the quest), failed (player has seen the quest but it was later inactivated, for example by the completion of a separate competing quest).&#xD;&#xA;&#xD;&#xA;Amusing side note: every system that works for a quest/storyline, also works for an individual conversation tree with an NPC, and vice versa. So if you find a suitable conversation system for your game, ask yourself if it's worth modifying that for the story system as well." />
  <row Id="1809" PostHistoryTypeId="2" PostId="957" RevisionGUID="ea0a124b-bb44-43ea-bb58-2102992c3475" CreationDate="2010-07-21T20:59:58.437" UserId="469" Text="I am making my first indie retail game, I hosted a prototype on www.agfgames.com but I am struggling to find testers...&#xD;&#xA;&#xD;&#xA;Being a company made only of myself, and having no budget (actually, I have huge debts because of college), I cannot hire a testing service, but I am failing to find testers on my own, does not matter how much I try... Sometimes I spend half of the week in marketing, trying to find testers...&#xD;&#xA;&#xD;&#xA;All the ones that tested the game, praised it, thus it is not fault of the game, but fault of me not finding the testers around... But since all the few ones that I found praise the game, this mean that I am not getting meaningful feedback..." />
  <row Id="1810" PostHistoryTypeId="1" PostId="957" RevisionGUID="ea0a124b-bb44-43ea-bb58-2102992c3475" CreationDate="2010-07-21T20:59:58.437" UserId="469" Text="Finding testers" />
  <row Id="1811" PostHistoryTypeId="3" PostId="957" RevisionGUID="ea0a124b-bb44-43ea-bb58-2102992c3475" CreationDate="2010-07-21T20:59:58.437" UserId="469" Text="&lt;marketing&gt;&lt;testing&gt;" />
  <row Id="1812" PostHistoryTypeId="2" PostId="958" RevisionGUID="c2fda247-ab21-4582-a7e0-3b6a4d7a5a39" CreationDate="2010-07-21T21:03:52.530" UserId="458" Text="The biggest disadvantage of a game engine is that you have to learn it. If you're new to programming in general, that may still be faster than learning to write code to do all the stuff that an engine handles for you out of the box, but if you're experienced then it costs you no time to sit down and start coding, but a fair amount of up-front time to learn your way around an unfamiliar engine.&#xD;&#xA;&#xD;&#xA;Biggest thing to look for is support, because game engines are not perfect and they do not read your mind, and you WILL get stuck on SOMETHING at some point. So:&#xD;&#xA;&#xD;&#xA; - Is there documentation?&#xD;&#xA; - Is the documentation actually any&#xD;&#xA;   good?&#xD;&#xA; - Is there technical support (generally not, unless you're paying for it)? What's the turnaround time?&#xD;&#xA; - Are there community forums where you can post questions and get real answers?&#xD;&#xA; - Are there tutorials that show you how to start using the engine? Is sample source code included? How useful do you find these in getting up to speed?" />
  <row Id="1813" PostHistoryTypeId="2" PostId="959" RevisionGUID="8ac95829-8c56-48eb-bb83-0ec3dee104d0" CreationDate="2010-07-21T21:04:41.077" UserDisplayName="thyrgle" Text="The indie market isn't that great for game programming unless you do something that is not desktop specific (mobile is a good option).&#xD;&#xA;&#xD;&#xA;The problem:&#xD;&#xA;&#xD;&#xA;Think in the eyes of the user here. You have the option of getting a game from a well-known company or a some person you've never heard of before. Also, its just that one person vs. a team of people.&#xD;&#xA;&#xD;&#xA;The answer:&#xD;&#xA;&#xD;&#xA;You could go to a mobile device like iPhone or Android. They emphasize the fact (and even pushed it out to the non-programming world a little bit too) that indies can now make great programs to with their help (which is their APIs and Frameworks).&#xD;&#xA;&#xD;&#xA;Also, for mobile development in particular, I know a lot of friends in high school that just think that phones can't really handle the power of really popular games (which is true) and therefore make the conclusion that you only need one or two people to make a very good game for that platform that they would buy.&#xD;&#xA;&#xD;&#xA;So, I would just switch over to another thing like iPhone or Android and use their RAD (Rapid Application Development) technologies." />
  <row Id="1814" PostHistoryTypeId="2" PostId="960" RevisionGUID="1b28d7f2-2d05-4145-8b3a-e482542ca705" CreationDate="2010-07-21T21:05:15.583" UserId="363" Text="I would start searching the blogsphere to find people who have.  Steve Streeting who lead the Ogre project was quite open about his experiences about making money from his open source engine [1].&#xD;&#xA;&#xD;&#xA;Some projects have released older source to stimulate interest and modding after an initial closed-source start.  The people at Wolfire [2] released some source.  Introversion&#xD;&#xA;have been recently selling code for Multiwinia [3].&#xD;&#xA;&#xD;&#xA;Joining an interest group at IGDA [4] or BCS [5] could also be a pro-active step to finding out more, and larger organisations like that may have resources to answer your legal questions about revenue sharing etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stevestreeting.com/&#xD;&#xA;  [2]: http://blog.wolfire.com/&#xD;&#xA;  [3]: http://www.introversion.co.uk/darwinia/&#xD;&#xA;  [4]: http://www.igda.org/&#xD;&#xA;  [5]: http://www.bcs.org/&#xD;&#xA;" />
  <row Id="1815" PostHistoryTypeId="16" PostId="960" RevisionGUID="1b28d7f2-2d05-4145-8b3a-e482542ca705" CreationDate="2010-07-21T21:05:15.583" UserId="363" />
  <row Id="1816" PostHistoryTypeId="2" PostId="961" RevisionGUID="c8f61fa9-8313-474d-8828-b73bde4ae0bf" CreationDate="2010-07-21T21:05:52.773" UserId="395" Text="My company puts up ads on Craigslist and we seem to generally find people. Mention that there is some free pizza in it for them if you need an extra incentive (or money if you happen to have some)." />
  <row Id="1817" PostHistoryTypeId="2" PostId="962" RevisionGUID="67d45461-623a-4499-8aa5-fb75fd802440" CreationDate="2010-07-21T21:06:17.297" UserId="382" Text="Have you considered offering some sort of incentive for people to find defects?&#xD;&#xA;&#xD;&#xA;I wouldn't necessarily use direct financial incentives as they can skew the results (intrinsic vs extrinsic rewards), but you could certainly offer them credit on the game with their name being more prominent the more issues they help find." />
  <row Id="1818" PostHistoryTypeId="2" PostId="963" RevisionGUID="a46536d7-c27c-4ee3-af1f-d4682a4cb0b0" CreationDate="2010-07-21T21:07:40.477" UserId="47" Text="Try some social websites.  Reddit is a really good place to get people to try out your product (if it's interesting enough).  Just make sure you find the right subreddit(s) to post it under.&#xD;&#xA;&#xD;&#xA;Or try some of your inner circle on Twitter/Facebook/etc." />
  <row Id="1819" PostHistoryTypeId="2" PostId="964" RevisionGUID="9d24f2af-63e5-4ea0-8afd-2af819c24f68" CreationDate="2010-07-21T21:10:29.940" UserId="395" Text="The last design I used was based around having a set of per-user persistent counters and then have achievements key off a certain counter hitting a certain value. Most were a single achievement/counter pair where the counter would only ever be 0 or 1 (and the achievement triggered on &gt;=1), but you can use this for &quot;killed X dudes&quot; or &quot;found X chests&quot; too. It also means you can setup counters for something that has no achievements, and it will still be tracked for future use." />
  <row Id="1820" PostHistoryTypeId="2" PostId="965" RevisionGUID="c9dfa7be-b518-41be-b59e-437a2f56974f" CreationDate="2010-07-21T21:10:38.550" UserId="458" Text="Most important thing you can do if you're going from hobbyist to full-time indie: have a business plan. Seriously. What are your revenue streams? Do you have any right now, and if so, realistically how long will they be viable? What's your burn rate, and what are your cash reserves? In other words, how long can you be in development before you have to ship something to pay the bills... and how much do you have to make when that happens? Realistically, how long will it take you to develop your first game, and does that fit within your parameters? If you know these answers, and you're honest about it, then &quot;do I go full-time or not?&quot; should be a no-brainer decision." />
  <row Id="1821" PostHistoryTypeId="2" PostId="966" RevisionGUID="4e28dff7-45cb-418a-b9ee-2b43f4318b04" CreationDate="2010-07-21T21:10:48.643" UserId="470" Text="Breakout, Pong, or Asteroids. &#xD;&#xA;&#xD;&#xA;There is a huge difference between a **game** and a **game prototype**.  If you're serious about finishing your dream game, then you should finish your &quot;entry level&quot; games along the way. Creating the gameplay part of the game is only half the battle. All of the extra things like menus and high scores often get overlooked or ignored, but they take way more time than anyone would expect." />
  <row Id="1822" PostHistoryTypeId="2" PostId="967" RevisionGUID="037c536b-9e43-4076-a2fd-ec1252340ef0" CreationDate="2010-07-21T21:12:15.117" UserId="478" Text="You might want to look at [Pixel Joint][1]. Good place to showcase your pixel art and gather feedback from other artists. Not as crowded as Deviant Art, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pixeljoint.com/" />
  <row Id="1823" PostHistoryTypeId="2" PostId="968" RevisionGUID="c927cbd0-1924-4f99-b49a-cd610d3e69bb" CreationDate="2010-07-21T21:13:52.200" UserId="486" Text="Have you ever considered utilizing kids from a school/club by offering an after school program? If you were to present yourself as a game developer and thought that you could offer a class/club/lecture/whatever and that it would positive for them I bet a lot of places would be interested in having you come on by. They would gladly pass the word along to their kids, and I know when I was younger that I thought it was the coolest thing in the world to test games. I really thought that was the best job in the world at the time. =D&#xD;&#xA;&#xD;&#xA;If you did do something like that maybe you could break up your testing of the game in parts and have each part be a lesson. That way the kids still get to learn something cool and in return they will learn how to be &quot;testers&quot; by testing your game." />
  <row Id="1824" PostHistoryTypeId="2" PostId="969" RevisionGUID="6758bcfb-a92e-428b-b135-9b6d0d00106f" CreationDate="2010-07-21T21:14:40.283" UserId="305" Text="If you are playtesting early builds, it's good to test in-person. You can actually observe players getting frustrated, discovering exploits, or having fun in real-time, and it's easier to ask them questions immediately after they are done testing. For indie games, simpler solutions are often better. &#xD;&#xA;&#xD;&#xA;Put your game on a laptop and go to a place where people are hanging out. If it's summer, head for an ice-cream shop and ask people to play your game. Coffeeshops are great for this too. Check out the location beforehand and verify that there are power outlets and that you can have a conversation without yelling, though.&#xD;&#xA;&#xD;&#xA;You can put up paper posters at local colleges and schools. I strongly recommend reaching out to middle-schoolers, as they have the skills to play pretty complex games with none of the shyness. (They will tell you *exactly* why a game sucks to your face.) Science/technology/math teachers may let you test a game with their students in exchange for a talk about game development or programming.&#xD;&#xA;&#xD;&#xA;Once you're starting to test for stability, definitely put together a friends-and-family email list and send them builds. People who know you will be more likely to get back to you quickly, especially if you need esoteric details from them, such as their processor and graphic specs. &#xD;&#xA;&#xD;&#xA;Of course, you want to be able to reach out to total strangers as well, but don't ignore low-hanging fruit." />
  <row Id="1825" PostHistoryTypeId="5" PostId="931" RevisionGUID="2ce32d3c-1873-4011-98be-12a5ce6d05cc" CreationDate="2010-07-21T21:15:26.587" UserId="55" Comment="Adding carbonmade" Text="There are some really great indies over on tigsource.com ([art board][1]). I've seen a lot of those guys pump out some really cool pixel art. I'm sure you'll find a fair amount of people willing to give you advice. You might check out [gamedev.net][2] as well. I know Mark Eugn does a LOT of epic pixel art ([gd.net journal][3]).&#xD;&#xA;&#xD;&#xA;To showcase your work, http://carbonmade.com/ might be the way to go. You can break what you do down into categories so people can find their focus faster. The interface for the site is nice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/index.php?board=24.0&#xD;&#xA;  [2]: http://www.gamedev.net&#xD;&#xA;  [3]: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=398180" />
  <row Id="1826" PostHistoryTypeId="2" PostId="970" RevisionGUID="6512fbb1-245e-4cc4-85e2-54eefab2bc6a" CreationDate="2010-07-21T21:16:11.720" UserId="395" Text="Over-attention on polish early on. If a game concept isn't fun with blue and red boxes for characters, chances are it won't be fun with 6 weeks of art time." />
  <row Id="1827" PostHistoryTypeId="2" PostId="971" RevisionGUID="bb66524b-25d9-4625-a45f-b747efb771f7" CreationDate="2010-07-21T21:17:25.213" UserId="458" Text="There are tons of interesting mechanics you can integrate into a static board.&#xD;&#xA;&#xD;&#xA;For a positional-based game like Chess or Checkers, you could add terrain or interesting shapes. Note for example how much more interesting the Stratego board is because it has those two lakes in the middle, creating three major choke points.&#xD;&#xA;&#xD;&#xA;For a territory-control game like Risk, structuring the territories to form interesting shapes or clusters and unique landmarks on the board is more interesting than something purely symmetric. In Risk, both South America and Australia are easy to defend but give only a minor bonus, making them natural areas of early-game contention. In Pandemic, South America is an interesting region because it has the only dead-end location that's hard to get to, while Eurasia is also interesting because it has a lot of interconnected cities that lend themselves to major outbreak problems.&#xD;&#xA;&#xD;&#xA;For a roll-and-move game like Monopoly or Life, make the spaces you land on interesting by having them give the players meaningful choices. This is one of the major reasons why the board game Talisman is marginally more palatable than Chutes &amp; Ladders.&#xD;&#xA;&#xD;&#xA;You can also, of course, include mechanics that change the nature of the board over time. Maybe you have some tokens that get placed on the board that make certain spaces temporarily (or permanently) impassable, or adding some additional effect to visiting those spaces. That keeps the board dynamic, even if the original starting game state is always the same." />
  <row Id="1828" PostHistoryTypeId="2" PostId="972" RevisionGUID="2c8eaad6-74a0-47d5-adc7-45428d787e59" CreationDate="2010-07-21T21:17:47.447" UserId="469" Text="I use [ImageMagick][1] myself  it is a commandline tool, but quite good, because it can do craploads of things (even converting between file formats, doing minor edits, some optmizations...)  and because it is commandline you can make scripts to use it in the most awesomenest way possible...&#xD;&#xA;&#xD;&#xA;I made a script geared for my pipeline, that consisted of calling it from a folder full of animations, and the sprite sheet would &quot;pop&quot; out already optmized and in .png, does not matter what was the input frames :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imagemagick.org/script/index.php" />
  <row Id="1829" PostHistoryTypeId="2" PostId="973" RevisionGUID="42f8772a-d0dc-4d50-b29a-2f8d41d05ee9" CreationDate="2010-07-21T21:22:02.223" UserId="181" Text="First step: Think carefully about your data in relation to your algorithms. O(log n) is not always faster than O(n). Simple example: A hash table with only a few keys is often better replaced with a linear search.&#xD;&#xA;&#xD;&#xA;Second step: Look at the assembly generated. C++ brings a lot of implicit code generation to the table. Sometimes, it sneaks up on you without you knowing. &#xD;&#xA;&#xD;&#xA;But assuming it's really pedal-to-the-metal time: Profile. Seriously. Randomly applying &quot;performance tricks&quot; is about as likely to hurt as it is to help. &#xD;&#xA;&#xD;&#xA;Then, everything depends on what your bottlenecks are. &#xD;&#xA;&#xD;&#xA;data cache misses =&gt; optimize your data layout. Here's a good starting point: http://gamesfromwithin.com/data-oriented-design&#xD;&#xA;&#xD;&#xA;code cache misses =&gt; Look at virtual function calls, excessive callstack depth, etc. A common cause for bad performance is the erroneous belief that base classes *must* be virtual. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Other common C++ performance sinks:&#xD;&#xA;&#xD;&#xA;* Excessive allocation/deallocation. If it's performance critical, don't call into the runtime. Ever. &#xD;&#xA;* Copy construction. Avoid wherever you can. If it can be a const reference, make it one.&#xD;&#xA;&#xD;&#xA;All of the above are immediately obvious when you look at the assembly, so see above ;)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1830" PostHistoryTypeId="16" PostId="973" RevisionGUID="42f8772a-d0dc-4d50-b29a-2f8d41d05ee9" CreationDate="2010-07-21T21:22:02.223" UserId="-1" />
  <row Id="1831" PostHistoryTypeId="2" PostId="974" RevisionGUID="bb144f3d-1dfb-4cbc-af65-71dc918a3ab3" CreationDate="2010-07-21T21:22:10.350" UserDisplayName="thyrgle" Text="Related questions under this topic might include:&#xD;&#xA;&#xD;&#xA;1. How should I base how much experience points it takes to get to the next level?&#xD;&#xA;2. What factors are involved int this?&#xD;&#xA;3. How do I keep the player not entertained long enough till he levels up?&#xD;&#xA;4. How can I vary the way the player gets experience points?" />
  <row Id="1832" PostHistoryTypeId="1" PostId="974" RevisionGUID="bb144f3d-1dfb-4cbc-af65-71dc918a3ab3" CreationDate="2010-07-21T21:22:10.350" UserDisplayName="thyrgle" Text="How to determine the amount of experience needed for leveling up." />
  <row Id="1833" PostHistoryTypeId="3" PostId="974" RevisionGUID="bb144f3d-1dfb-4cbc-af65-71dc918a3ab3" CreationDate="2010-07-21T21:22:10.350" UserDisplayName="thyrgle" Text="&lt;game-design&gt;" />
  <row Id="1834" PostHistoryTypeId="2" PostId="975" RevisionGUID="c8d60d1f-3d9c-48e4-b5a7-41cd5b526dc2" CreationDate="2010-07-21T21:22:36.777" UserId="458" Text="Some great answers here. All I can add is that if you specifically market your game as &quot;educational&quot; then yes, I think you're pretty much killing the non-edu market. This is not your fault and has to do with the fact that &quot;edutainment&quot; is usually done so horribly wrong that gamers are accustomed to games either being fun OR educational but never both at the same time.&#xD;&#xA;&#xD;&#xA;The opposite is not true. I know some educators that routinely use entertainment games (they call them &quot;COTS games&quot; - Commercial Off-The-Shelf) in their classes when they see the educational content buried in there. So if you want to reach both markets, consider selling it on its entertainment value first, and then reach out to educators and schools at conferences.&#xD;&#xA;&#xD;&#xA;Another thing to consider, if your game is aimed at K-12, is that there are state standards for the exact subjects that must be covered in each grade, so you should work with some local educators to make sure your game conforms to the standards. Yes, this means making a K-12 game is hard, because the standards vary from state to state, and that's something you'll have to deal with." />
  <row Id="1835" PostHistoryTypeId="2" PostId="976" RevisionGUID="f7c998d2-a970-44a9-ae96-2f22b9ff844e" CreationDate="2010-07-21T21:23:02.020" UserId="395" Text="The best way to make quality indie (opensource or not) games is to make a lot of really bad ones first. Don't remake the same game over and over, but just make lots of little games and learn something new each time." />
  <row Id="1836" PostHistoryTypeId="2" PostId="977" RevisionGUID="f92e7691-c993-4ecc-9b60-419c51ad8b19" CreationDate="2010-07-21T21:23:39.603" UserId="490" Text="One of the fan favorites are Quests which involve a temporary companion. You either care or tend for them not to get hurt, or you fight your way through with them.&#xD;&#xA;&#xD;&#xA;Somewhere in between the situation changes and calls for a different strategy or a different course of action. The helpless companion may turn out to lock himself away because he was greedy and careless. Or he may turn out to be an evil person, once posessing the sword of dark powers he turns on you. And the hardened fighter may find himself to be locked away in a cast of magic, slowly dying as you try to fight your way through to him.&#xD;&#xA;&#xD;&#xA;These are the kind of setups that RPG fans enjoy the most in RPGs. Of course, it's 90% in the writing and if you have voice acting, you need top-notch writing AND top-notch voice-acting.&#xD;&#xA;&#xD;&#xA;However, those kinds of quests tend to be a PITA to implement and debug and tend to have the most exploits. This is why most, and especially MMO RPGs, tend to go with the &quot;fetch x items&quot; quests.&#xD;&#xA;" />
  <row Id="1837" PostHistoryTypeId="2" PostId="978" RevisionGUID="7e0798dd-03fb-4284-94e9-efe64d186d2a" CreationDate="2010-07-21T21:26:08.403" UserId="395" Text="Generally speaking these are done as vaguely exponential curves. http://kol.coldfront.net/thekolwiki/index.php/Advancement#Advancement_Requirements_Overview shows the formulas for Kingdom of Loathing, which are pretty standard for the MMO genre." />
  <row Id="1838" PostHistoryTypeId="2" PostId="979" RevisionGUID="3a263468-1f94-40a2-be88-03b24944dc57" CreationDate="2010-07-21T21:26:17.640" UserId="205" Text="Here's an article from the Procedural Content Generation Wiki for map generation&#xD;&#xA;&#xD;&#xA;http://pcg.wikidot.com/pcg-algorithm:map-generation&#xD;&#xA;&#xD;&#xA;If you need further advice check out their forums. &#xD;&#xA;" />
  <row Id="1841" PostHistoryTypeId="2" PostId="981" RevisionGUID="069ba834-e0b6-4b21-8767-307e617966e9" CreationDate="2010-07-21T21:28:31.650" UserId="458" Text="I've seen critical hits in some action-RPGs before, but usually for action-based games the numbers are kept intentionally simple for a reason: the player is busy running and jumping and dodging and shooting, and they really don't have time to do probability calculations in their head. &#xD;&#xA;&#xD;&#xA;So, you're more likely to see non-uniform numbers in things like turn-based strategy games. A typical example are &quot;rogue-like&quot; games (Nethack, Angband) which have non-uniform weapon damage -- one weapon might do 3d5 damage for example, and another does 4d4, and the game will tell you these numbers and it's up to you to decide which one is better (factoring in other variables like weapon weight, character proficiency, etc.)" />
  <row Id="1842" PostHistoryTypeId="16" PostId="77" RevisionGUID="39118773-4292-434d-a521-2041d2810e84" CreationDate="2010-07-21T21:31:53.910" UserId="34" />
  <row Id="1843" PostHistoryTypeId="16" PostId="706" RevisionGUID="d9f0b910-ff63-443e-a259-99de587512b2" CreationDate="2010-07-21T21:32:26.283" UserId="34" />
  <row Id="1844" PostHistoryTypeId="5" PostId="974" RevisionGUID="91ee58b4-7327-4371-8cef-6ef514638aea" CreationDate="2010-07-21T21:33:47.513" UserDisplayName="thyrgle" Comment="deleted 1 characters in body" Text="Related questions under this topic might include:&#xD;&#xA;&#xD;&#xA;1. How should I base how much experience points it takes to get to the next level?&#xD;&#xA;2. What factors are involved in this?&#xD;&#xA;3. How do I keep the player not entertained long enough till he levels up?&#xD;&#xA;4. How can I vary the way the player gets experience points?" />
  <row Id="1845" PostHistoryTypeId="2" PostId="982" RevisionGUID="717cc1a6-94d0-4a43-8de7-1bce75753954" CreationDate="2010-07-21T21:35:06.033" UserId="458" Text="We had this problem with some online CCGs that I worked on. Best solution I've seen:&#xD;&#xA;&#xD;&#xA;1) Players MUST connect to the server, not to each other directly, and you should NEVER pass IP addresses of opponents in the data you stream to the players. This prevents denial-of-service attacks where a player forces their opponent offline for the win.&#xD;&#xA;&#xD;&#xA;2) Dropped connection = you lose, opponent wins. We must assume that if you dropped, it was a drop to avoid certain loss.&#xD;&#xA;&#xD;&#xA;3) Disconnects attempt to reconnect for a period of time, so that a slight net hiccup doesn't force you to lose through no fault of your own. Ideally, the time is long enough to allow someone to reconnect if they accidentally kicked the cable, but short enough that the opponent doesn't get frustrated and fall asleep while waiting. I think we found about 45 to 60 seconds felt right.&#xD;&#xA;&#xD;&#xA;4) Allow players to report their opponents. This is a necessary catch-all to prevent anyone finding some annoying way around your policy. Like, maybe being so verbally abusive that the opponent drops just to get out of there, or continually disconnecting and reconnecting to stretch the game length, or stonewalling to avoid a loss, or whatever. You can't stop ALL bad behavior, but you can include an in-game mechanism to report it, and then let your customer support department handle the rest." />
  <row Id="1846" PostHistoryTypeId="2" PostId="983" RevisionGUID="355bcccc-5b2d-46d4-bec8-7b97bf53ffde" CreationDate="2010-07-21T21:36:21.820" UserDisplayName="Xaraz" Text="Though very expensive, it blew me away the first time I saw it; [CityEngine][1] by Procedural&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.procedural.com/cityengine" />
  <row Id="1847" PostHistoryTypeId="16" PostId="129" RevisionGUID="550ce55d-c260-4be6-bf52-e5eb24ea3b15" CreationDate="2010-07-21T21:37:45.893" UserId="34" />
  <row Id="1848" PostHistoryTypeId="2" PostId="984" RevisionGUID="c61e7aeb-94f4-44cf-9e84-6710beb870a1" CreationDate="2010-07-21T21:38:47.140" UserId="222" Text="How is game difficulty typically tested/balanced so that there's a steady progression of difficultly, no level is too difficult ahead of its time, no level is too easy, etc.? Are play testers of various skills brought in, or a random sampling of people? What considerations are/should be taken into account during the actual level design process?" />
  <row Id="1849" PostHistoryTypeId="1" PostId="984" RevisionGUID="c61e7aeb-94f4-44cf-9e84-6710beb870a1" CreationDate="2010-07-21T21:38:47.140" UserId="222" Text="How is game difficultly tested/balanced?" />
  <row Id="1850" PostHistoryTypeId="3" PostId="984" RevisionGUID="c61e7aeb-94f4-44cf-9e84-6710beb870a1" CreationDate="2010-07-21T21:38:47.140" UserId="222" Text="&lt;game-design&gt;&lt;balance&gt;&lt;difficultly&gt;" />
  <row Id="1851" PostHistoryTypeId="2" PostId="985" RevisionGUID="7c266e55-2e39-4624-8451-26932ec98d14" CreationDate="2010-07-21T21:39:08.717" UserId="458" Text="Lots harder. If you're not comfortable making a 2D game, you will REALLY not like what it takes to make a 3D game.&#xD;&#xA;&#xD;&#xA;The good news: 99% of the time, you don't really need it. Think of any 3D game you can. Take the camera, fix it on the ceiling looking down so that you're now looking at a 2D plane. Doom becomes Gauntlet. Civ IV becomes Civ I. Metal Gear Solid becomes the original Metal Gear. None of these games are &quot;bad&quot; just because they're 2D; they are perfectly playable and generally have much of the same gameplay." />
  <row Id="1852" PostHistoryTypeId="2" PostId="986" RevisionGUID="3e118a5a-0c15-465e-8c0d-a351105f3c91" CreationDate="2010-07-21T21:39:39.557" UserId="465" Text="I've recently been interviewing design interns and been pitching what I consider fairly easy practical design questions to measure their skill level. I've been shocked by poor quality of answers. Now this may be the quality of the applicants.&#xD;&#xA;&#xD;&#xA;What questions do you ask an entry level games designer to probe for their skill level?" />
  <row Id="1853" PostHistoryTypeId="1" PostId="986" RevisionGUID="3e118a5a-0c15-465e-8c0d-a351105f3c91" CreationDate="2010-07-21T21:39:39.557" UserId="465" Text="What are good questions for design interns?" />
  <row Id="1854" PostHistoryTypeId="3" PostId="986" RevisionGUID="3e118a5a-0c15-465e-8c0d-a351105f3c91" CreationDate="2010-07-21T21:39:39.557" UserId="465" Text="&lt;game-design&gt;" />
  <row Id="1855" PostHistoryTypeId="16" PostId="300" RevisionGUID="d47afb70-7363-4bf8-b504-4498aede31a0" CreationDate="2010-07-21T21:42:19.323" UserId="188" />
  <row Id="1856" PostHistoryTypeId="2" PostId="987" RevisionGUID="bc393bd1-d227-42c4-be8c-6cade50a6eb6" CreationDate="2010-07-21T21:44:57.857" UserId="465" Text="First a quality assurance pass is needed to make sure the tasks are reasonable and completable by your internal QA. &#xD;&#xA;&#xD;&#xA;Now do a sweep on initial difficulty and/or level times, rinse and repeat until diminishing returns mean you need to move on.&#xD;&#xA;&#xD;&#xA;The next step is to use all the other internal staff you can grab for a few play-thoughs. Be sure to record as much as possible for later analysis. Sweep, iterate, repeat.&#xD;&#xA;&#xD;&#xA;Families are a good next line if your on a budget, after that you need to bring in focus groups or outsource testing.&#xD;&#xA;&#xD;&#xA;Remember do small chunks, iterate and repeat.&#xD;&#xA;" />
  <row Id="1857" PostHistoryTypeId="2" PostId="988" RevisionGUID="cbf2a832-2306-4d7b-872f-c326ac54a4b1" CreationDate="2010-07-21T21:45:25.750" UserId="504" Text="[Random encounters][1] in RPG-s are often non-uniform.&#xD;&#xA;&#xD;&#xA;    Set X to a random integer between 64 and 255.&#xD;&#xA;    For each step in plains, decrement X by 4. &#xD;&#xA;    For each step in forest, swamp, or desert, decrement X by 8.&#xD;&#xA;    When X &lt; 0, a fight ensues. Go to step 1.&#xD;&#xA;&#xD;&#xA;This makes encounters more realistic because animals/trees etc. like to have some space between them.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Random_encounter" />
  <row Id="1858" PostHistoryTypeId="2" PostId="989" RevisionGUID="2470e2ea-3357-48bd-a017-85487f29c179" CreationDate="2010-07-21T21:46:12.990" UserId="222" Text="Treat quests as challenges to overcome rather than a job to complete. Have them require skill, thought, or some feat. For instance:&#xD;&#xA;&#xD;&#xA; - A certain dungeon in the far east&#xD;&#xA;   mountains is filled with a poisonous&#xD;&#xA;   fume. Retrieve the rare flower from&#xD;&#xA;   within for the sake of a medicinal&#xD;&#xA;   potion within 30 minutes or risk&#xD;&#xA;   certain doom.&#xD;&#xA; - An evil king guards a&#xD;&#xA;   powerful ring that he stole from a&#xD;&#xA;   village elder. Find some way to steal&#xD;&#xA;   it back whether by brute force,&#xD;&#xA;   stealth, bribery, or...&#xD;&#xA; - A pesky troll&#xD;&#xA;   is blocking one of the exits out of&#xD;&#xA;   town, demanding riddles be answered.&#xD;&#xA;   Be a dear and go play his game until&#xD;&#xA;   he's satisfied enough to leave.&#xD;&#xA;&#xD;&#xA;Truly a quest can be a mini-game and a completely different genre at that. It can require stealth, puzzle solving, skillful playing, etc. I think the best quests are like that and not just busy work for the player to do to fill in content gaps. Some of Elder Scrolls IV: Oblivion's quests get creative like that, though there are the typical &quot;kill X number of Y&quot; or &quot;Go clear X dungeon&quot; quests." />
  <row Id="1859" PostHistoryTypeId="2" PostId="990" RevisionGUID="9f02f71c-c6dd-46c6-b770-562aec85a318" CreationDate="2010-07-21T21:50:10.070" UserId="395" Text="It seems like the status quo in the games industry is to write most software in-house, maybe excluding the engine if you use one of the dozen or so big ones. Before working here I was mostly an open-source developer, so this mindset seems downright crazy to me. Is there any good way we can all stop building things like log viewers, network diagnostics, and patching systems?" />
  <row Id="1860" PostHistoryTypeId="1" PostId="990" RevisionGUID="9f02f71c-c6dd-46c6-b770-562aec85a318" CreationDate="2010-07-21T21:50:10.070" UserId="395" Text="How can non-indie devs stop reinventing the wheel?" />
  <row Id="1861" PostHistoryTypeId="3" PostId="990" RevisionGUID="9f02f71c-c6dd-46c6-b770-562aec85a318" CreationDate="2010-07-21T21:50:10.070" UserId="395" Text="&lt;open-source&gt;" />
  <row Id="1862" PostHistoryTypeId="2" PostId="991" RevisionGUID="39f8d0b8-be2a-4509-8ecf-364cd93d7c4c" CreationDate="2010-07-21T21:50:50.460" UserId="458" Text="&gt; What are some ways to improve the&#xD;&#xA;&gt; fun-factor in game design?&#xD;&#xA;&#xD;&#xA;Iteration on your design. Seriously, that's the best way I've seen. Allow time in your schedule to playtest the game on your own, watch playtesters with the game, and then modify the game based on your results. Every time you do this, the game gets a little better and a little more fun. The more iterative design loops you go through, the better the final game will be.&#xD;&#xA;&#xD;&#xA;The flip side is, know when it's time to kill an idea. Some things are just not fun no matter how much you iterate (I've heard this referred to as &quot;trying to polish a turd&quot;), and you just have to go back to the drawing board and start again.&#xD;&#xA;&#xD;&#xA;So in practice (in my experience, at least) it's a lot of trial-and-error, mostly, and when you do manage to find the fun it's pretty obvious that you found it." />
  <row Id="1863" PostHistoryTypeId="2" PostId="992" RevisionGUID="bc87a878-d69d-4646-8045-71822a09d3c5" CreationDate="2010-07-21T21:51:12.830" UserDisplayName="Darren" Text="Check out Microsoft's XNA.  You may not like the environment/language/etc, but it's a way of getting your game on sale with no effort beyond getting the game working.  Assuming your country is supported and all that." />
  <row Id="1864" PostHistoryTypeId="2" PostId="993" RevisionGUID="25809b26-4589-4eff-b948-a3c046a736cb" CreationDate="2010-07-21T21:52:21.987" UserId="504" Text="Some games adjust the difficulty based on the skill of player during the game.&#xD;&#xA;&#xD;&#xA;For example every time a player dies at a level - difficulty decreases. Every time he finishes - difficulty increases.&#xD;&#xA;&#xD;&#xA;Still this needs some testing to get the decreasing and increasing right.&#xD;&#xA;&#xD;&#xA;This method makes the scoring a little less accurate and harder to compare with others but the game more enjoyable as you won't get totally stuck." />
  <row Id="1865" PostHistoryTypeId="2" PostId="994" RevisionGUID="32ad4ae6-5d7c-4372-b3b4-4de65e14b521" CreationDate="2010-07-21T21:54:33.907" UserId="353" Text="We can stop reinventing the wheel by... ceasing to reinvent the wheel. Use external libraries, game engines, etc.&#xD;&#xA;&#xD;&#xA;I get the sense that people *do* reinvent the wheel to:&#xD;&#xA;&#xD;&#xA;- Avoid copyrights, royalties, etc on libraries or borrowed code&#xD;&#xA;- Avoid paying for a game engine&#xD;&#xA;- Maintain intimate familiarity with the entire codebase--adding external libraries, linking to game engines, etc just means more code to become familiar with" />
  <row Id="1866" PostHistoryTypeId="2" PostId="995" RevisionGUID="c4b36a1f-cb79-43df-99ac-c59484630a99" CreationDate="2010-07-21T21:54:40.723" UserDisplayName="Darren" Text="One easy way is to make a list of north walls and west walls, then permute them. Give each room a number. Then blow up one of the walls in the list, as long as the two rooms don't have the same number, then propagate one of the numbers to all the other rooms with the same number. Keep going until you run out of walls. This works for rectangular mazes or, really, any other maze where you can give a list of &quot;potentially connected rooms&quot;. Plus, it's pretty straightforward to program." />
  <row Id="1867" PostHistoryTypeId="2" PostId="996" RevisionGUID="a279e882-febd-4aab-b6e6-d5a1aafafa84" CreationDate="2010-07-21T21:58:57.383" UserId="458" Text="I'll second the mention of Game Maker. I would say, if every game engine falls on a continuum from &quot;easy to use/learn but limited in what you can do&quot; to &quot;really powerful, but takes a long time to master&quot;... Game Maker is pretty much the definition of the easy-to-use extreme. As Cyclops says, most basic functionality (sprites, creating game objects, movement, collision detection, scorekeeping, etc.) are drag-and-drop icons. It actually does include a fairly robust scripting language you can use too, once you start getting good... but when you start writing your entire game in their embedded scripting language, maybe it's time to &quot;graduate&quot; to a scripting language like Flash or PyGame.&#xD;&#xA;&#xD;&#xA;Still, I've had great success with Game Maker as a beginner, no-programming-needed tool for game design students, and can't recommend it enough." />
  <row Id="1868" PostHistoryTypeId="2" PostId="997" RevisionGUID="ec065424-c3c3-4a66-b8ae-11022a9895e7" CreationDate="2010-07-21T22:05:30.250" UserId="403" Text="I set poorly specified design tasks to see if they ask questions. Skills can be taught. Starting with the impression that you know the answer or that there is a right answer is harder to overcome.&#xD;&#xA;&#xD;&#xA;Also, here's an off-the-wall request that taught me the most about how the minds of the designers I've interviewed worked: &quot;Tell me three things that I don't know.&quot;" />
  <row Id="1869" PostHistoryTypeId="2" PostId="998" RevisionGUID="5e037aa7-5358-4082-b705-f0cfc71b85db" CreationDate="2010-07-21T22:13:33.270" UserId="402" Text="It's not specifically a game engine, but look into [Processing][1]. Some of the good points are:&#xD;&#xA;&#xD;&#xA; - Minimal setup required.  You can have something onscreen in 30 seconds.&#xD;&#xA; - Can dip into Java any time for stuff like collections, but a lot of the drawing, animation and interaction syntax is much less verbose than straight Java.&#xD;&#xA; - Anything you write will be compatible with [Processing.js][2], so you can work with it anywhere you have a modern browser.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://processing.org&#xD;&#xA;  [2]: http://processingjs.org" />
  <row Id="1870" PostHistoryTypeId="2" PostId="999" RevisionGUID="02f24bc9-0e38-4a15-9c8b-5f1cd7dc3f2b" CreationDate="2010-07-21T22:14:26.090" UserId="458" Text="I actually cover this very topic when talking about numeric relationships in games:&#xD;&#xA;http://gamebalanceconcepts.wordpress.com/2010/07/14/level-2-numeric-relationships/&#xD;&#xA;&#xD;&#xA;You can make it however you want, although typically it's on an increasing curve (so each level requires more XP than the last), because encounters/quests tend to give more XP as you progress.&#xD;&#xA;&#xD;&#xA;The key isn't to concentrate solely on the XP-Level curve or the XP-per-encounter curve, but to compare the two of them. If the XP-Level curve increases faster than XP-per-encounter, the player will notice they are gaining levels more slowly over time, which is pretty standard for the genre. However, the danger is that if level ups get TOO few and far between in the endgame, then the player's last memory of your game will be a colossal grind, which you probably don't want either. So figure out how many encounters per level-up are acceptable in the end game, and how many encounters per level up you want in the early game, and interpolate from there.&#xD;&#xA;&#xD;&#xA;Also, I should mention that you CAN have overlapping reward systems other than just XP/Levels. Some RPGs have job points (so you have multiple leveling/advancement systems), so that it might be awhile between (say) leveling up your Fighting skill or your Healing skill, but with enough different things leveling up you're always just a few minutes away from increasing SOMETHING. Other RPGs have random item/equipment drops, so every new encounter doesn't just give XP, but also a small chance of generating some epic loot, so you get some additional random rewards just for playing." />
  <row Id="1871" PostHistoryTypeId="2" PostId="1000" RevisionGUID="2d8d8ede-747b-4670-ac42-414564de2f57" CreationDate="2010-07-21T22:14:44.843" UserId="481" Text="I'd say it's dependent, at least partially, on the type of experience you want to create for the player. Consider two examples, the first of which is a classic turn-based RPG, the second is a [Gradius III][1]-type shooter, in which you'd like the player's power to scale based on progress since his list death, not on powerups (not to say that's a good system, just an example).&#xD;&#xA;&#xD;&#xA;In the case of the RPG, your system probably operates on the assumption that a player never loses experience. Similarly, it will probably want to act based on the assumption that it's relatively easy to gain some level of proficiency in something, but difficult to master it (like most things in the real world). In this case you might want to develop a formula (like coderanger suggested) that is exponential in some regard. Where the amount of experience required to reach the next level is somehow exponentially based on your current level. Important to consider, however the rate at which your player will be receiving experience while playing. For instance, a player killing a level 63 Fire Demon would expect to receive more experience for his kill than if he had killed a level 2 Lady Bug. So when designing your formula, be sure that you take into account your XP system. Particularly since if you do not, then killing the lady bug will be just as profitable as killing harder enemies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Example 1 (Likely not a form you would use):&#xD;&#xA;XP_TO_LEVEL = ((CURRENT_LEVEL + 1) ^ SCALE) * XP_BASE&#xD;&#xA;&#xD;&#xA;Example 2:&#xD;&#xA;XP_TO_LEVEL = (XP_BASE * CURRENT_LEVEL) ^ SCALE&#xD;&#xA;&#xD;&#xA;Where XP_TO_LEVEL is the XP needed to reach the next level.&#xD;&#xA;CURRENT_LEVEL is the player's current level.&#xD;&#xA;XP_BASE is an arbitrary number to decide how much each level is &quot;worth&quot; in XP.&#xD;&#xA;SCALE is the exponent determining how fast to scale the XP needed to level. If SCALE is 1 then each level will take XP_BASE experience. If SCALE is less than 1 then each level will take less experience than the last level. If SCALE is greater than 1 then each level will take more experience than the last level.&#xD;&#xA;&#xD;&#xA;The following table assumes a SCALE of 1.1 and an XP_BASE of 100 using example 2.&#xD;&#xA;&#xD;&#xA;    Current Level   XP Needed   Increase from Last Level&#xD;&#xA;    1               158         0&#xD;&#xA;    2               339         181&#xD;&#xA;    3               530         191&#xD;&#xA;    4               728         198&#xD;&#xA;    5               930         202&#xD;&#xA;    ...&#xD;&#xA;    10              1995        218&#xD;&#xA;&#xD;&#xA;Example 3:&#xD;&#xA;XP_TO_LEVEL = ((CURRENT_LEVEL * SCALE) ^ 1.5) * XP_BASE&#xD;&#xA;&#xD;&#xA;Where SCALE is still determining how fast to scale the XP_TO_LEVEL, but it operates a little differently.&#xD;&#xA;&#xD;&#xA;The following table assumes a SCALE of 22 and an XP_BASE of 10 using example 3. &#xD;&#xA;&#xD;&#xA;    Current Level   XP Needed   Increase from Last Level&#xD;&#xA;    1               28          0&#xD;&#xA;    2               80          52&#xD;&#xA;    3               146         66&#xD;&#xA;    4               226         80&#xD;&#xA;    5               316         90&#xD;&#xA;    ...&#xD;&#xA;    10              894         130&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the case of the Gradius clone, you might take a different strategy. You may want the player to level up consistently, say about every two minutes. In addition, after a play has lost a life and consequently lost all of his gained powers, you may want to help him along by leveling him/her up faster until he reaches an appropriate level for his progress through the game. In this case your formula will likely be more linear, especially since the user doesn't get to see how much experience he's getting per kill. Something like, it takes 50 XP to reach a new level and each enemy is worth 1 XP. This works great providing you are supplying him with a relatively steady stream of enemies. But, when the player dies, he loses it all! What do you do now? Each enemy should be worth more than 1 XP to meet your goal of catching him up so that the game is fair again.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;XP_FROM_EACH_ENEMY = BASE_XP + (CURRENT_LEVEL - DESIRED_LEVEL)&#xD;&#xA;Where XP_FROM_EACH_ENEMY is how much XP an enemy would award when killed.&#xD;&#xA;BASE_XP is how much XP an enemy is worth by default (could vary per-enemy type).&#xD;&#xA;CURRENT_LEVEL is the level of the player&#xD;&#xA;DESIRED_LEVEL is the level you think the player should be at.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gradius_III" />
  <row Id="1872" PostHistoryTypeId="2" PostId="1001" RevisionGUID="547be967-4f6d-4b8e-8bdf-cb4dbd34ac33" CreationDate="2010-07-21T22:17:00.833" UserId="437" Text="There's a few choices that I can think of:&#xD;&#xA;&#xD;&#xA; - Sell your game on a portal, such as bigfishgames.com. It's not for everyone - you lose a degree of control, and the content on these places is decidedly casual. However, they get a lot of traffic and take care of the business of selling.&#xD;&#xA; - Sell your game on a console based portal, such as XBox Indie Games. The problem with this is you end up having to sell a lot of games at a very low price (usually around the $1 mark). &#xD;&#xA; - Sell them yourself. This is probably the hardest, but is the best long-term strategy. A good example of this is [Positech Games][1]. Cliffski has been doing this for a long time, and has built up a following over the years. Spiderweb Software is another good example. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.positech.co.uk/" />
  <row Id="1873" PostHistoryTypeId="2" PostId="1002" RevisionGUID="2f509393-43e8-477f-a89c-b3a79b75fa5c" CreationDate="2010-07-21T22:17:45.043" UserId="395" Text="So just as a first statement, A* is at heart a graph exploration algorithm. Usually in games we use either tiles or other world geometry as the graph, but you can use A* for other things. The two ur-algorithms for graph traversal are depth-first-search and breadth-first-search. In DFS you always fully explore down your current branch before looking at siblings of the current node, and in BFS you always look at siblings first and then children. A* tries to find a middle-ground between these where you explore down a branch (so more like DFS) when you are getting closer to the desired goal but sometimes stop and try a sibling if it might have better results down its branch. The actual math is that you keep a list of possible nodes to explore next where each has a &quot;goodness&quot; score indicating how close (in some kind of abstract sense) it is to the goal, lower scores being better (0 would mean you found the goal). You select which to use next by finding the minimum of the score plus the number of nodes away from the root (which is generally the current configuration, or current position in pathfinding). Each time you explore a node you add all its children to this list and then pick the new best one." />
  <row Id="1874" PostHistoryTypeId="2" PostId="1003" RevisionGUID="4e6ba1cb-f76b-4a0b-a43a-adcacad780c9" CreationDate="2010-07-21T22:18:48.147" UserId="516" Text="I'm making a TD(how original) and I need a good pathing algorithm for it.  &#xD;&#xA;I have thought about Dijksra(or however it spelled) but I need one that can be dynamic, that can update itself when one edge is removed or added without a full recalculation.  &#xD;&#xA;Any ideas?&#xD;&#xA;I'm coding in C# if it helps." />
  <row Id="1875" PostHistoryTypeId="1" PostId="1003" RevisionGUID="4e6ba1cb-f76b-4a0b-a43a-adcacad780c9" CreationDate="2010-07-21T22:18:48.147" UserId="516" Text="Best pathing algorithm for tower defense game" />
  <row Id="1876" PostHistoryTypeId="3" PostId="1003" RevisionGUID="4e6ba1cb-f76b-4a0b-a43a-adcacad780c9" CreationDate="2010-07-21T22:18:48.147" UserId="516" Text="&lt;algorithm&gt;" />
  <row Id="1877" PostHistoryTypeId="2" PostId="1004" RevisionGUID="354d2d84-b28b-4aa8-9f1c-7c8eadb8adab" CreationDate="2010-07-21T22:19:47.787" UserId="469" Text="I use Novashell.&#xD;&#xA;&#xD;&#xA;I used Game Maker as main tool, but I had a issue with YoYo Games (I will not explain here now), then I found Novashell.&#xD;&#xA;&#xD;&#xA;Novashell is REALLY a prototyping tool, it was made by the person that also made &quot;LORD&quot; (Legend of Red Dragon) and &quot;Dink Smallwood&quot; so he could make games fast for Ludumdare (a 48h gamejam competition), it has a map editor, supports LUA scripting, is made in C++, has zlib license (meaning that you can do whatever you want with the source, short of claiming that you invented stuff that you did not), and has a physics engine (Box2D), particle system (Linear Particle for ClanLIB), supports MikMod and Fmod, works in Linux, Mac and Windows, is dead easy to use, and you can ask stuff to Seth!" />
  <row Id="1878" PostHistoryTypeId="6" PostId="1003" RevisionGUID="65ad54e0-2f78-443d-8648-45651d877bcf" CreationDate="2010-07-21T22:22:13.650" UserId="51" Comment="edited tags" Text="&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="1879" PostHistoryTypeId="2" PostId="1005" RevisionGUID="9d580edd-0f4d-4797-ac2b-5ea6ebd391f5" CreationDate="2010-07-21T22:22:36.070" UserId="395" Text="http://gamedev.stackexchange.com/questions/15/how-does-a-pathfinding-work might be a good place to start :-)" />
  <row Id="1880" PostHistoryTypeId="6" PostId="947" RevisionGUID="a39f58a8-eef5-4da0-a676-91a96eff0068" CreationDate="2010-07-21T22:23:25.303" UserId="51" Comment="edited tags" Text="&lt;marketing&gt;&lt;monetization&gt;" />
  <row Id="1881" PostHistoryTypeId="6" PostId="986" RevisionGUID="5c48ba8c-6899-4339-9a7a-6164a8b285f4" CreationDate="2010-07-21T22:24:41.933" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;hiring&gt;" />
  <row Id="1882" PostHistoryTypeId="2" PostId="1006" RevisionGUID="15aa3a59-ef97-4bb0-a76f-75241c6d3e2b" CreationDate="2010-07-21T22:29:44.987" UserId="501" Text="Avoid memory accesses and especially random ones at all costs. &#xD;&#xA;&#xD;&#xA;That's the single most important thing to optimize for on modern CPUs. You can do a shitload of arithmetic and even a lot of wrong predicted branches in the time you wait for data from RAM.&#xD;&#xA;&#xD;&#xA;You can also read this rule the other way around: Do as much calculations as possible between memory accesses." />
  <row Id="1883" PostHistoryTypeId="16" PostId="1006" RevisionGUID="15aa3a59-ef97-4bb0-a76f-75241c6d3e2b" CreationDate="2010-07-21T22:29:44.987" UserId="-1" />
  <row Id="1884" PostHistoryTypeId="2" PostId="1007" RevisionGUID="46658235-6848-409c-aad8-3e88738ad0df" CreationDate="2010-07-21T22:32:20.757" UserId="502" Text="I am trying to figure out a system that can easily modify objects on the fly.&#xD;&#xA;&#xD;&#xA;here is an example, Lets say I have an Entity2D that inherits from Entity. Entity2D has a Position property.&#xD;&#xA;&#xD;&#xA;Now I have a class called ModifyPosition that inherits from Modifier.&#xD;&#xA;&#xD;&#xA;Here is some code&#xD;&#xA;&#xD;&#xA;    public class Entity&#xD;&#xA;    {&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// Applies the modifier to this entity.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    /// &lt;param name=&quot;modifier&quot;&gt;The modifier to apply.&lt;/param&gt;&#xD;&#xA;    public void ApplyModifier(Modifier modifier)&#xD;&#xA;    {&#xD;&#xA;        modifier.Apply(this);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// Modifies an entities position&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    public class ModifyPosition : Modifier&#xD;&#xA;    {&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Initializes a new instance of the &lt;see cref=&quot;ChangePosition&quot;/&gt; class.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;param name=&quot;position&quot;&gt;The position.&lt;/param&gt;&#xD;&#xA;        public ChangePosition(Vector2 position)&#xD;&#xA;        {&#xD;&#xA;            this.Position = position;&#xD;&#xA;            this.IsModifyingChildren = false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Gets the position.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;value&gt;The position.&lt;/value&gt;&#xD;&#xA;        public Vector2 Position { get; private set; }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Applies this change to the specified entity.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;param name=&quot;entity&quot;&gt;The entity.&lt;/param&gt;&#xD;&#xA;        internal override void Apply(Entity entity)&#xD;&#xA;        {&#xD;&#xA;            ((Entity2D)entity).X += this.Position.X;&#xD;&#xA;            ((Entity2D)entity).Y += this.Position.Y;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But if you are calling this multiple times per second i would think that the casting would slow it down.&#xD;&#xA;&#xD;&#xA;Is there another way to go about this without having to cast?" />
  <row Id="1885" PostHistoryTypeId="1" PostId="1007" RevisionGUID="46658235-6848-409c-aad8-3e88738ad0df" CreationDate="2010-07-21T22:32:20.757" UserId="502" Text="Modifier System C#" />
  <row Id="1886" PostHistoryTypeId="3" PostId="1007" RevisionGUID="46658235-6848-409c-aad8-3e88738ad0df" CreationDate="2010-07-21T22:32:20.757" UserId="502" Text="&lt;engine&gt;&lt;c#&gt;" />
  <row Id="1887" PostHistoryTypeId="2" PostId="1008" RevisionGUID="7d494aed-3599-4c85-b491-b0b47d30b7cb" CreationDate="2010-07-21T22:43:17.343" UserId="528" Text="You'll generally want to use A*, unless there's something importantly different you're looking for." />
  <row Id="1888" PostHistoryTypeId="2" PostId="1009" RevisionGUID="c717f180-1538-41ff-bc7e-c5bf55e9ac72" CreationDate="2010-07-21T22:46:57.590" UserId="528" Text="Sell your game through portals (steam will be your best target.)  &#xD;&#xA;&#xD;&#xA;Alternately, you may be able to push it to flash through Alchemy, then leverage the in-game advertising that's available to flash.  &#xD;&#xA;&#xD;&#xA;Some ad vendors will let you use their ad system through embedded MSHTML, which gives you another option.&#xD;&#xA;&#xD;&#xA;Finally, donate boxes and things like kickstarter are often options.  Note that the relatively dim game Minecraft has raised more than a hundred thousand dollars this way, which I completely do not understand." />
  <row Id="1889" PostHistoryTypeId="5" PostId="994" RevisionGUID="ca43f4a1-907e-41ff-80bf-77cb393be928" CreationDate="2010-07-21T22:52:53.557" UserId="353" Comment="added 301 characters in body" Text="We can stop reinventing the wheel by... ceasing to reinvent the wheel. Use external libraries, game engines, etc.&#xD;&#xA;&#xD;&#xA;I get the sense that people *do* reinvent the wheel to:&#xD;&#xA;&#xD;&#xA;- Avoid copyrights, royalties, etc on libraries or borrowed code&#xD;&#xA;- Avoid paying for a game engine (for a full on AAA game, this can be enormously expensive)&#xD;&#xA;- Maintain intimate familiarity with the entire codebase--adding external libraries, linking to game engines, etc just means more code to become familiar with and possibly maintain&#xD;&#xA;- Writing all your code yourself means that you can optimize it specifically for your game&#xD;&#xA;- That code can then be licensed to others if desired, reuse it for other projects, etc while you maintain proprietary control" />
  <row Id="1890" PostHistoryTypeId="2" PostId="1010" RevisionGUID="694c435e-0eaf-4e3f-a6c6-ae55076a6674" CreationDate="2010-07-21T22:53:43.493" UserId="486" Text="I imagine most people don't create indie games necessarily to make money. If they are thinking that way a lot of people might be thinking in long term monetary gains. IE they would rather put a game down on their resume that shows they have experience making a game which could possibly give them a leg up on others who don't. Then you can say you started to make money from your indie game when your employer tells you it was your game you listed on your resume/cover letter that set you apart from others.&#xD;&#xA;&#xD;&#xA;You also got to consider the crowd that your game will be bought by. The most impressionable gamers are probably the younger ones who can't afford games right away and must wait for something like a BDay/XMas or beg their parents to buy it. More than likely the only games they will be subjected too will be the heavy marketed games by those who throw millions into it. That leaves you with a smaller crowd of people who are more curious about what could be fun on an XBox/Mobile device etc. rather than actively seeking out the best indie game ever made. You might even then be hard pressed getting someone to pay more than $5 for a game if they think they won't play it more than a couple of hours or while they are on a plane or something. &#xD;&#xA;&#xD;&#xA;You also must consider that anyone you distribute your game through is probably going to take a cut of your profits as well. Someone may say they have the tools to advertise your game but they sure aren't going to let you use them for free when there are 100's of other good indie games out there that can be sold as well.&#xD;&#xA;&#xD;&#xA;So all in all if you are trying to get into indie games for money you probably have the wrong idea. I think the best thing to do is put it down on a resume. If you think it gives you a leg up in the hiring process then it definitely has a positive expectation on your future monetary gains." />
  <row Id="1891" PostHistoryTypeId="2" PostId="1011" RevisionGUID="e7dac802-592c-4992-b81f-e09157e15745" CreationDate="2010-07-21T22:53:58.000" UserId="284" Text="While it doesn't survive multiplayer that well, riddle-answering quests are often fun.&#xD;&#xA;&#xD;&#xA;Similarly, quests that require game-knowledge (&quot;What word is carved on the top of the highest sandshoal mountain?&quot;) to answer can encourage exploration." />
  <row Id="1892" PostHistoryTypeId="2" PostId="1012" RevisionGUID="4464ad3f-d1dc-4146-a2d9-475debfea263" CreationDate="2010-07-21T23:00:38.583" UserId="469" Text="I am making a breakout-clone, I not want only want it to feel &quot;arcade&quot; for home users, but it will have a arcade version (although probably noone will buy, and I will only use the machine to amuse other people...), this make scoring, and high-scores a important part of it, it has no multiplayer, with the community existing around how to score higher and higher scores.&#xD;&#xA;&#xD;&#xA;Being a breakout game, if the score is just linear, everyone that &quot;finish&quot; the game, will attain the same maximum score... Obviously this is undesirable, specially because the game DOES have a end, you cannot play it forever until you lose...&#xD;&#xA;&#xD;&#xA;So, how to design some decent score system? Currently I added a multiplier, and it increases when you kill several blocks fast, but this has the unintended side effect of creating absurdly high scores near the end of the game when you are highly powerful (yes, my game is not only about batting the ball :P) and can clear a whole bunch of blocks at once...&#xD;&#xA;&#xD;&#xA;To make it more clear, you have 5 frames to kill another block and increase the multiplier, on the start of the game, only batting the ball, this only happen when you manage to get the ball stuck behind the wall (something that is desirable to reward... several players plainly have a CRAVING to attempt that), and if you are a MASTER breakout player, you can score on the first five levels something like 100k points... Yet, on one of the late levels, if you use in a mediocre way (not even good way) the powers, you can easily rack-up 2 million points in a single level (and no, my game does not have points padded with 0! Some stuff DO reward you with 1 point, or 10... It is just the multiplier increase of 5 frame kill that skyrocket...)&#xD;&#xA;&#xD;&#xA;I want to add more mechanics, fix this one, and make lots of stuff rewardable, stuff that make the screen shine, blink, show pretty stuff and make the player go &quot;WOW, DID YOU SEE THAT?&quot; and tap his friend in the shoulder, and then when he make it on purpose he screams: &quot;HAHAAAA, I AM AWESOME AND YOU SUCK!!! DO IT TOO!! I DARE YOU!!!&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: Although the theme here is breakout, no problem in crossing genres, shmups are particularly good in this area, Radiant Silvergun for example was plainly great... But of course, it need to still be applicable on a breakout :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Meta question: How I create tags? If I really can't, can a moderator put some decent tags for me? Like scoring, or chain-system, or stuff like that? Otherwise we will end with thousands of stuff with the same tags: design, writing and C++... or generic stuff like that." />
  <row Id="1893" PostHistoryTypeId="1" PostId="1012" RevisionGUID="4464ad3f-d1dc-4146-a2d9-475debfea263" CreationDate="2010-07-21T23:00:38.583" UserId="469" Text="Designing score system: Combos, chains, multipliers and bonuses..." />
  <row Id="1894" PostHistoryTypeId="3" PostId="1012" RevisionGUID="4464ad3f-d1dc-4146-a2d9-475debfea263" CreationDate="2010-07-21T23:00:38.583" UserId="469" Text="&lt;game-design&gt;" />
  <row Id="1895" PostHistoryTypeId="2" PostId="1013" RevisionGUID="c12c37fa-47a6-4525-b3a9-7fd9495a8c25" CreationDate="2010-07-21T23:01:14.260" UserId="323" Text="Pathfinding is fast, and on something the size of a normal tower defense game, you'll have no trouble running a full A* or Dijkstra pass whenever something changes. We're talking well under a millisecond for a full refresh. Any kind of adaptive pathfinding ends up horrifyingly complicated. Just do it the simple way, unless you're making the world's largest tower defense grid." />
  <row Id="1896" PostHistoryTypeId="2" PostId="1014" RevisionGUID="9ccc2dc4-e0b1-41bc-8bca-477a064736b9" CreationDate="2010-07-21T23:04:03.257" UserId="353" Text="You really shouldn't need to worry about this unless you are doing this millions and millions of times per frame. This graph shows some empirical data about the speed of casting:&#xD;&#xA;&#xD;&#xA;![Casting Speeds][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://img707.imageshack.us/img707/5835/casta.png&#xD;&#xA;&#xD;&#xA;http://www.codeproject.com/KB/cs/csharpcasts.aspx&#xD;&#xA;&#xD;&#xA;Keep in mind that there are about 17 milliseconds per frame at 60 frames per second, and about 33 milliseconds at 30 frames per second." />
  <row Id="1897" PostHistoryTypeId="2" PostId="1015" RevisionGUID="2ecfa66d-5057-4ff8-9855-940ae80fe656" CreationDate="2010-07-21T23:04:19.497" UserId="154" Text="Two big helps in difficulty tuning.&#xD;&#xA;&#xD;&#xA;**Metrics**&#xD;&#xA;&#xD;&#xA;Tracking player data can go a long way to making difficult tuning as objective a process as possible. How long are people staying alive, where are the taking damage or getting killed, how many tries does a section of the level take. Getting good metric data can really help your team see where people are having issues in your game.&#xD;&#xA;&#xD;&#xA;**Kleenex Testers**&#xD;&#xA;&#xD;&#xA;The longer your QA staff plays the game the better they get at it, so it's good to have sessions where you grab new people who have never sat down with the game and have them go through it." />
  <row Id="1898" PostHistoryTypeId="6" PostId="1012" RevisionGUID="4f3c0ab8-2af8-4038-b426-34c1e1d378d7" CreationDate="2010-07-21T23:04:28.687" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;scoring&gt;" />
  <row Id="1899" PostHistoryTypeId="6" PostId="839" RevisionGUID="1460a84c-b828-43d9-b4dc-1395fae66df9" CreationDate="2010-07-21T23:06:03.503" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;quests&gt;" />
  <row Id="1900" PostHistoryTypeId="5" PostId="1004" RevisionGUID="7486ccf5-53a5-4660-8ca0-a8b3a85b8dd0" CreationDate="2010-07-21T23:06:32.257" UserId="469" Comment="added 66 characters in body" Text="I use Novashell.&#xD;&#xA;&#xD;&#xA;I used Game Maker as main tool, but I had a issue with YoYo Games (I will not explain here now), then I found Novashell.&#xD;&#xA;&#xD;&#xA;Novashell is REALLY a prototyping tool, it was made by the person that also made &quot;LORD&quot; (Legend of Red Dragon) and &quot;Dink Smallwood&quot; so he could make games fast for Ludumdare (a 48h gamejam competition), it has a map editor, supports LUA scripting, is made in C++, has zlib license (meaning that you can do whatever you want with the source, short of claiming that you invented stuff that you did not), and has a physics engine (Box2D), particle system (Linear Particle for ClanLIB), supports MikMod and Fmod, works in Linux, Mac and Windows, is dead easy to use, and you can ask stuff to Seth!&#xD;&#xA;&#xD;&#xA;EDIT: Seth is the name of the programmer (that also made LORD)" />
  <row Id="1901" PostHistoryTypeId="2" PostId="1016" RevisionGUID="efad5139-3ca2-4cd5-ba0e-b82575db3ee4" CreationDate="2010-07-21T23:06:45.063" UserId="533" Text="I've been using DarkBASIC Professional for 2 years and really enjoy it. If you can't afford to buy the full version, you can simple download the free ad supported version. The Game Creators, makers of DBPro, also release a regular newsletter which makes pretty good reading, plus they've got a fairly large active community; all of the above can be found here:&#xD;&#xA;&#xD;&#xA;https://www.thegamecreators.com/&#xD;&#xA;&#xD;&#xA;Check it out, hopefully you might find something there.&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;BFM&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1902" PostHistoryTypeId="2" PostId="1017" RevisionGUID="8bbc5d5d-1a39-4dca-a650-ce5398a930c1" CreationDate="2010-07-21T23:08:25.170" UserId="323" Text="I've always rather liked bowling's score system. With bowling, if you get a spare, you get the full ten points for that frame, *plus* the number of pins you knock down on your next ball. If you get a strike, you get the full ten points, *plus* the number of pins you knock down on your next *two* balls. While a full bowling set is 100 pins, the ultimate top score ends up being 300. Despite that, the score going from zero to 300 is surprisingly flat - a novice can reach 100 without too much practice, a skilled player can reach 200, and even the best experts have trouble hitting 300 consistently.&#xD;&#xA;&#xD;&#xA;I don't know what the &quot;frame&quot; equivalent would be with your game, but the basic idea of using additive bonuses rather than multiplicative bonuses might be the right way to go.&#xD;&#xA;&#xD;&#xA;(Apologies for anyone horrified by my bowling terminology, I don't know the game particularly well.)" />
  <row Id="1903" PostHistoryTypeId="2" PostId="1018" RevisionGUID="15fb80c4-7d2d-4a1c-82f6-ddb7fab00288" CreationDate="2010-07-21T23:12:38.593" UserId="539" Text="The [Slick Framework][1] written in Java is a good choice. It's what I first used to learn to program. The benefits are it runs cross platform, can produce applets for the web, and has fantastic tool/library support through Eclipse or whatever else the Java environment has. That said I eventually switched to Flash simply because if you want to distribute your games there's nothing easier or more effective.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/" />
  <row Id="1904" PostHistoryTypeId="2" PostId="1019" RevisionGUID="7458be80-9705-4a98-bcac-3983a87dbcbe" CreationDate="2010-07-21T23:16:44.843" UserId="539" Text="I have made some assets available as well as compiled a list of other assets I know about/techniques for finding artwork:&#xD;&#xA;&#xD;&#xA;  * [How to find and use artwork for tile based games][1]&#xD;&#xA;&#xD;&#xA;Sorry since my rank is low I apparently can't link more stuff. You should be able to get to it from the above though.&#xD;&#xA;&#xD;&#xA;[1]: http://www.anotherearlymorning.com/2008/09/how-to-find-and-use-artwork-for-tile-based-games/&#xD;&#xA;" />
  <row Id="1907" PostHistoryTypeId="2" PostId="1020" RevisionGUID="7e3a6afe-9110-4aaf-b2eb-77382cf930a7" CreationDate="2010-07-21T23:21:26.583" UserId="528" Text="I prefer the tightly wound mazes that Kruskal's Algorithm creates.&#xD;&#xA;&#xD;&#xA;The standard description of Kruskal's Algorithm is inappropriate in that it fails to distinguish locations in the graph from location groups, while relying on a pun about datastructure choice, leading to description ambiguities that confuse novices.  Therefore I reject Kruskal's termonology.&#xD;&#xA;&#xD;&#xA;I will use the following terms:&#xD;&#xA;&#xD;&#xA;- **Graph** &#xD;&#xA;    - the maze itself.  &#xD;&#xA;- **Node**&#xD;&#xA;    - a location in the maze.  On a square maze, this is a square cell.&#xD;&#xA;- **Edge**&#xD;&#xA;    - the connection between two nodes.  On a square maze, this is a 1-length bar.&#xD;&#xA;- **Tree Group**&#xD;&#xA;    - a set of nodes, which may be empty, arranged as a tree&#xD;&#xA;&#xD;&#xA;And from those, we get:&#xD;&#xA;&#xD;&#xA; 1. Create a group **GTG**, for the *Graph Tree Group*, containing tree groups&#xD;&#xA; 2. Populate **GTG** with one tree group containing one node, for every location in your maze&#xD;&#xA; 3. Create an edge set **E**&#xD;&#xA; 4. Populate **E** with every valid edge in your maze&#xD;&#xA; 5. While there is more than one group in **GTG**, and while **E** is not empty:&#xD;&#xA; 6. Pick a random edge **rE** from **E**&#xD;&#xA; 7. Identify endpoints **p1** and **p2** of **rE**&#xD;&#xA; 8. Remove **rE** from **E**&#xD;&#xA; 9. Check which groups **p1** and **p2** belong to (**p1g** and **p2g** respectively).  &#xD;&#xA; 10. If **p1g** and **p2g** are different, join tree group **p1g** and **p2g** at **p1** -&gt; **p2**, and rewrite all group ownership of one tree to the other, thus joining the trees.&#xD;&#xA; 11. Return to step 5.&#xD;&#xA; 12. If you have no edges left, but more than one tree, either the graph is not connected or there's a bug.&#xD;&#xA; 13. If you have just one tree, you have a complete no-loop maze." />
  <row Id="1908" PostHistoryTypeId="2" PostId="1021" RevisionGUID="1f27f4b3-0ad7-4f35-ae59-03c70f77aaad" CreationDate="2010-07-21T23:21:44.540" UserId="542" Text="Waypoint pathfinding would probably be the best for a td game, because generally based on the level the ai follows a direct path. Basically you set your nodes or waypoints then have the &quot;ai&quot; point towards the waypoiny and walk to it, once it gets close enough to that have it go to the next waypoint, face it and move towards it." />
  <row Id="1909" PostHistoryTypeId="2" PostId="1022" RevisionGUID="a1b7e57c-02f1-445e-a345-6e05f2de4c6c" CreationDate="2010-07-21T23:24:26.640" UserId="469" Text="People on the pasted site are people willing to make art for free... They prefer to make logos, but some do sprites too.&#xD;&#xA;&#xD;&#xA;http://nationofdesign.7forum.info/" />
  <row Id="1912" PostHistoryTypeId="5" PostId="914" RevisionGUID="16450af4-f0f5-494a-a3a9-38dcaaeb3c42" CreationDate="2010-07-21T23:28:37.693" UserId="426" Comment="deleted 1 characters in body" Text="I have used a depth first search one time to good effect. It generates a good, random-looking maze.&#xD;&#xA;&#xD;&#xA;Also available is a method where you recursively subdivide rectangles, which produces long corridors. This is called the recursive division method.&#xD;&#xA;&#xD;&#xA;[These algorithms and more can be found here.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Maze_generation" />
  <row Id="1913" PostHistoryTypeId="2" PostId="1023" RevisionGUID="b76b5133-ba15-4f6c-9c5e-401fb74ecea8" CreationDate="2010-07-21T23:30:07.303" UserId="541" Text="Valve just released Alien Swarm on steam, along with all the source code. I would love to build a version of it on my own machine and play a little bit with the code.&#xD;&#xA;&#xD;&#xA;Has anyone here tried to build it yet? Is it easy enough to just build and run it?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="1914" PostHistoryTypeId="1" PostId="1023" RevisionGUID="b76b5133-ba15-4f6c-9c5e-401fb74ecea8" CreationDate="2010-07-21T23:30:07.303" UserId="541" Text="How does one go about building Alien Swarm?" />
  <row Id="1915" PostHistoryTypeId="3" PostId="1023" RevisionGUID="b76b5133-ba15-4f6c-9c5e-401fb74ecea8" CreationDate="2010-07-21T23:30:07.303" UserId="541" Text="&lt;open-source&gt;&lt;valve&gt;" />
  <row Id="1916" PostHistoryTypeId="2" PostId="1024" RevisionGUID="a3f2bd9d-66ce-477c-bf14-aba5a58bd662" CreationDate="2010-07-21T23:34:22.210" UserId="538" Text="If by 5 frames you _actually_ mean 5 render/logic frames , I'd be inclined to say that's way too fast for a human player to understand. My first reflex would be to slow down the rate at which the multiplier increases. &#xD;&#xA;&#xD;&#xA;If you want people to try to exploit your scoring bonus mechanic, you first need to make sure the player will understand perfectly how it works. You also need to show the player what's happening: display somewhere the current multiplier and possibly his state (increased, cooling down, lost).&#xD;&#xA;&#xD;&#xA;To add more mechanics, I believe you first need to be sure the core multiplier mechanic is understood by most. Playtest your game and ask questions like &quot;Can you explain to me how the score for one killed block is calculated?&quot; Then if the multiplier is mentioned, you can follow up with &quot;How do you think this multiplier behaves?&quot;. If you don't get the answer you expected to the first question, your mechanic isn't properly explained and needs more sign/feedback work to be clear. Iterate this playtest scheme if possible.&#xD;&#xA;&#xD;&#xA;Once you get 80% of respondents to give you an good depiction of your system, you can go on developing additional mechanics to give depth to the scoring system. A very good reference on this is Peggle. Their scoring system is quite complex but easy to grasp. Give that game a look for concrete pointers.&#xD;&#xA;&#xD;&#xA;Hope it helps!" />
  <row Id="1917" PostHistoryTypeId="2" PostId="1025" RevisionGUID="f48837a8-9224-4611-a0da-f30caaa52115" CreationDate="2010-07-21T23:46:29.863" UserId="162" Text="The basic answer is that you first have to grab the Alien Swarm SDK. It should be a choice in the &quot;tools&quot; menu of your steam client. Download it, it's not very big. Then run it.&#xD;&#xA;&#xD;&#xA;One of the options is &quot;Create a mod&quot;. This extracts the source code to a useful location for you and sets up some config options. The help guide from that menu has info on how to compile and test it. Or you can view the info on the [valve developer wiki][1]. It's setup for visual studio 2005, but I was able to build it correctly with my copy of Visual Studio 2008. Seems pretty well set up for immediate modding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Swarm_SDK_Create_a_Mod" />
  <row Id="1918" PostHistoryTypeId="2" PostId="1026" RevisionGUID="3b91543e-977b-4a9b-b673-8b37b71b2797" CreationDate="2010-07-21T23:50:47.720" UserId="162" Text="A classic is to ask them about a game they feel strongly about. Ask them why they think certain design choices were made. IE, why can't you jump in Gears of War? You're not looking for right answers, you just want to prove that a given intern can actually think critically about games. If they can't get pat their blinders and identify a flaw in a great game or a positive in a bad one, they may not be able to understand the tradeoffs that go into actual game design." />
  <row Id="1919" PostHistoryTypeId="2" PostId="1027" RevisionGUID="e8d32d26-362b-43e2-90b1-9c003b8ab9c9" CreationDate="2010-07-21T23:56:41.530" UserId="162" Text="One thing you can do is scale the multiplier non-linearly, according to a logarithmic scale of some sort. Let's see every block you kill within a certain time limit raises the multiplayer by one. That leads to the escalation problem you are talking about if you allow it to go too high, and if you put an absolute cap it sets a theoretical skill cap.&#xD;&#xA;&#xD;&#xA;Instead you can set it so raising it to x2 takes one block, raising it from x2 to x3 takes TWO blocks, and raising it from x3 to x4 takes THREE blocks. Or you can modify the equation whenever you want. The basic idea is that the higher your multiplier, the harder it is to raise it. This has the practical effect of capping out a score multiplier without necessarily putting a hard cap.&#xD;&#xA;&#xD;&#xA;You also want to have various likely events that will drop a multiplier. For instance in many vertical shooters using a Bomb will reset or lower your current multiplier, as would dying. Also if you go long enough between bounces it could start to fall. This allows a high score to be two factors: rather they do enough good events to raise the combo, and rather they can keep it going by not failing at various bad events." />
  <row Id="1920" PostHistoryTypeId="2" PostId="1028" RevisionGUID="dc89204d-8bbc-4c18-a088-c9182a26ef43" CreationDate="2010-07-22T00:01:58.320" UserId="452" Text="Simply limit the multiplier to a max of 5x or 10x. If that strikes you as inelegant, you can do something like:&#xD;&#xA;&#xD;&#xA;* Hit 1 block for 2x multiplier&#xD;&#xA;* Hit 2 more blocks for 3x multiplier&#xD;&#xA;* Hit 3 more blocks for 4x multiplier&#xD;&#xA;&#xD;&#xA;And so on.&#xD;&#xA;" />
  <row Id="1921" PostHistoryTypeId="2" PostId="1029" RevisionGUID="5ffe1bd1-0cde-4341-b869-b74bded6b19d" CreationDate="2010-07-22T00:03:22.483" UserId="545" Text="Something that I have done in the past and that World of Warcraft currently does is to increase the chance of a random event based upon the number of tries since the last successful event.  That is for instance, a quest item may have a 20% drop rate on the first NPC kill, a 22% on the 2nd, a 25% on the 3rd, resetting back to 20% when it does drop.  I implemented a tech tree where the chance to discover a tech increased each turn until it was on the order of a 99.9% chance of occurring.&#xD;&#xA;" />
  <row Id="1922" PostHistoryTypeId="2" PostId="1030" RevisionGUID="2cfd2748-c09a-489f-a204-dc6a6c13b001" CreationDate="2010-07-22T00:10:19.880" UserId="188" Text="I would also take a look at some of the algorithms used in Roguelike development. There's a good starting resource at [Rogue Basin][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://roguebasin.roguelikedevelopment.org/i" />
  <row Id="1924" PostHistoryTypeId="2" PostId="1031" RevisionGUID="7c384873-af44-4d7d-9082-efe39b22fd70" CreationDate="2010-07-22T00:21:37.720" UserId="545" Text="The thing to remember is that an MMO is literally the most complicated piece of software one can make. Take every single problem that exists in software engineering, and you have it in an MMO.&#xD;&#xA;&#xD;&#xA;**A) Every problem from a normal game.**&#xD;&#xA;&#xD;&#xA;1) Resource streaming for an open world.&#xD;&#xA;&#xD;&#xA;2) Particle system running on 5 year old commodity hardware&#xD;&#xA;&#xD;&#xA;3) Physics system to handle projectiles (Even if it's not havok you still need something for the characters falling from the sky.)&#xD;&#xA;&#xD;&#xA;**B) Every problem that a business app would have.**&#xD;&#xA;&#xD;&#xA;4) High availability clusters&#xD;&#xA;&#xD;&#xA;5) Billing systems&#xD;&#xA;&#xD;&#xA;6) Massive databases&#xD;&#xA;&#xD;&#xA;7) Customer Support back end&#xD;&#xA;&#xD;&#xA;8) Call center support&#xD;&#xA;&#xD;&#xA;**C) Every problem that 'internet companies' have**&#xD;&#xA;&#xD;&#xA;9) Latency kills&#xD;&#xA;&#xD;&#xA;10) World wide datacenters mapping 1:1 and 1:many architecture pieces&#xD;&#xA;&#xD;&#xA;**D) Some nice unique problems for MMOs only**&#xD;&#xA;&#xD;&#xA;11) Cross server object replication&#xD;&#xA;&#xD;&#xA;12) More hackers targeting it than they would some banks." />
  <row Id="1925" PostHistoryTypeId="2" PostId="1032" RevisionGUID="570a7671-0ef6-4804-b685-448957199439" CreationDate="2010-07-22T00:30:41.010" UserId="552" Text="You don't go into to much detail of what you're looking for, my suggestion would be to use TerraGen ( http://www.planetside.co.uk/ ) which can generate 3d terrain. I would take these renders, view then from a top down angle, and piece together a rather detailed and unique world map myself.&#xD;&#xA;&#xD;&#xA;Or are you looking for something that will create a random 2d map such as the World of Warcraft map?" />
  <row Id="1926" PostHistoryTypeId="2" PostId="1033" RevisionGUID="97f14ac1-3a52-4ae5-97e2-55e3a641e057" CreationDate="2010-07-22T00:46:04.613" UserId="551" Text="I had to tackle this problem once in an online racing game where players who were losing would often turn off their consoles to avoid the loss appearing on their records. However it applies very well for any PvP situation.&#xD;&#xA;&#xD;&#xA;My solution went like this:&#xD;&#xA;&#xD;&#xA;1. At the beginning of the match, once all the players have joined and play is about to begin, calculate what the outcome would be if our player loses the match. &#xD;&#xA;In our racing game, 'lost' means 'came in last place' and the usual outcome would be 'minus N points from the players rank'.&#xD;&#xA;&#xD;&#xA;2. Save the outcome to a secure location (Savegame, leaderboard, Online data area, etc).&#xD;&#xA;&#xD;&#xA;3. Along with the outcome, store a 'GameStarted' flag. This just signifies that the game has begun. We'll need it later on.&#xD;&#xA;&#xD;&#xA;4. When the game completes, calculate the actual outcome and apply it to the players score/stats. Unset the 'GameStarted' flag. This is the normal game-completion process.&#xD;&#xA;&#xD;&#xA;5. However, if the player disconnects, pulls his cable or powers off, eventually they'll return back to the games menu. In the menu code, we do a check for the 'GameStarted' flag. If it is set, we're sure that we've detected an in-game disconnection from earlier.&#xD;&#xA;We can then apply the stored outcome to the players score/stats. It will be the same as if the player lost the game.&#xD;&#xA;It's also a good idea to put up an alert informing the player of what's happening. Then, once he sees that there are consequences for disconnecting mid-game, you'll see that behaviour start to change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1927" PostHistoryTypeId="2" PostId="1034" RevisionGUID="d374f699-2350-4295-82a8-f75cdaffa5c2" CreationDate="2010-07-22T00:54:39.633" UserId="522" Text="A bit of extra work is required to get it building in Visual Studio 2010.  For the client project, you need to either change the name of the project from the default &quot;Client (Swarm)&quot; to just &quot;client&quot;, or change the Target Name property to &quot;client&quot; from the default &quot;$(ProjectName)&quot;.  After this, it builds without a hitch." />
  <row Id="1928" PostHistoryTypeId="2" PostId="1035" RevisionGUID="c2a97ed5-b62c-4ff8-8bc4-fd5d0c566f8a" CreationDate="2010-07-22T01:03:28.413" UserId="560" Text="Moonlander style games are great (where you have a rocketship affected by gravity, players control direction and thrust, limited fuel when using thrust). Gain experience implementing very simple physics and the collision system can be quite primitive. No AI to worry about and most importantly its fun and addictive :)" />
  <row Id="1929" PostHistoryTypeId="2" PostId="1036" RevisionGUID="6ae5962a-2096-4997-b0c4-4f00e12a4c36" CreationDate="2010-07-22T01:17:26.437" UserId="561" Text="I'll start off with John Carmack's Fast Inverse Square Root in Quake III:&#xD;&#xA;&#xD;&#xA;    float Q_rsqrt(float number) {&#xD;&#xA;&#xD;&#xA;      long i;&#xD;&#xA;      float x2, y;&#xD;&#xA;      const float threehalfs = 1.5F;&#xD;&#xA;    &#xD;&#xA;      x2 = number * 0.5F;&#xD;&#xA;      y = number;&#xD;&#xA;      i = * ( long * ) &amp;y;&#xD;&#xA;      i = 0x5f3759df - ( i &gt;&gt; 1 );&#xD;&#xA;      y = * ( float * ) &amp;i;&#xD;&#xA;      y = y * ( threehalfs - ( x2 * y * y ) );&#xD;&#xA; &#xD;&#xA;      return y;&#xD;&#xA;&#xD;&#xA;    }" />
  <row Id="1930" PostHistoryTypeId="1" PostId="1036" RevisionGUID="6ae5962a-2096-4997-b0c4-4f00e12a4c36" CreationDate="2010-07-22T01:17:26.437" UserId="561" Text="What are your favourite game-specific coding gems?" />
  <row Id="1931" PostHistoryTypeId="3" PostId="1036" RevisionGUID="6ae5962a-2096-4997-b0c4-4f00e12a4c36" CreationDate="2010-07-22T01:17:26.437" UserId="561" Text="&lt;algorithm&gt;" />
  <row Id="1932" PostHistoryTypeId="5" PostId="1034" RevisionGUID="1c021cab-6a1d-4af2-a60a-9488e60eb4bc" CreationDate="2010-07-22T01:19:58.147" UserId="522" Comment="added 29 characters in body" Text="In addition to Ben's answer, a bit of extra work is required to get it building in Visual Studio 2010.  For the client project, you need to either change the name of the project from the default &quot;Client (Swarm)&quot; to just &quot;client&quot;, or change the Target Name property to &quot;client&quot; from the default &quot;$(ProjectName)&quot;.  After this, it builds without a hitch." />
  <row Id="1934" PostHistoryTypeId="16" PostId="1036" RevisionGUID="3d22dcce-72de-44ae-9a1a-815149a8ec3f" CreationDate="2010-07-22T01:23:22.943" UserId="561" />
  <row Id="1935" PostHistoryTypeId="2" PostId="1038" RevisionGUID="3af9ffaf-d815-4a1d-aa52-9864c650d02f" CreationDate="2010-07-22T01:27:55.647" UserId="562" Text="[Nibbles][1] and [Space Invaders][2]&#xD;&#xA;&#xD;&#xA;Relatively simple AI, Graphics, Gameplay, Controls, and they don't have to have sound effects or music unless you want to add that in.  I started with these two when learning how to program in QBasic for MS-DOS and I think they are great first games.  Pac-Man would be my other choice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Nibbles_(video_game)&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Space_Invaders" />
  <row Id="1936" PostHistoryTypeId="2" PostId="1039" RevisionGUID="afa39867-4eed-4bcc-9822-628bda7db467" CreationDate="2010-07-22T01:32:53.980" UserId="157" Text="I have to go with [Duff's Device][1].  It was the first block of code that literally made my jaw drop.  *&quot;You can do that?!?&quot;*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Duff's_device" />
  <row Id="1937" PostHistoryTypeId="16" PostId="1039" RevisionGUID="afa39867-4eed-4bcc-9822-628bda7db467" CreationDate="2010-07-22T01:32:53.980" UserId="-1" />
  <row Id="1938" PostHistoryTypeId="2" PostId="1040" RevisionGUID="5480bd2c-7f8f-4788-a810-0ba810157fa9" CreationDate="2010-07-22T01:33:36.973" UserId="573" Text="I have been looking for strong game portals that support Silverlight.  Which ones are currently available?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="1939" PostHistoryTypeId="1" PostId="1040" RevisionGUID="5480bd2c-7f8f-4788-a810-0ba810157fa9" CreationDate="2010-07-22T01:33:36.973" UserId="573" Text="Which game portals support Silverlight games?" />
  <row Id="1940" PostHistoryTypeId="3" PostId="1040" RevisionGUID="5480bd2c-7f8f-4788-a810-0ba810157fa9" CreationDate="2010-07-22T01:33:36.973" UserId="573" Text="&lt;silverlight&gt;&lt;support&gt;" />
  <row Id="1941" PostHistoryTypeId="2" PostId="1041" RevisionGUID="11def4f3-62fa-439c-9b9b-08c1749f5fb5" CreationDate="2010-07-22T01:37:16.233" UserId="164" Text="When simulating an airplane and a missile, to get them moving in the air we apply a force in one direction. Now an airplane has wings that keeps it afloat while a missile can have fins to stabilize it. In both cases when the force is no longer strong enough, the velocity reduces and the projectiles are bound to succumb to gravity. When that happens, the projectiles naturally don't fall directly to the ground disregarding rotation and other spins based on air resistance and whatever momentum there is left. &#xD;&#xA;&#xD;&#xA;My question is, to simulate such behavior how would the [Bullet][1], [Nvidia PhysX][2] and [Havok physics][3] libraries compare against each other especially with emphasis to the following?&#xD;&#xA;&#xD;&#xA;1. Gravitational pull and momentum acting on the projectiles.&#xD;&#xA;2. Air resistance acting on the projectiles.&#xD;&#xA;3. Both 1 and 2 above's behavior can be based on varied levels of a central forward force applied on the projectiles.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bulletphysics.org&#xD;&#xA;  [2]: http://developer.nvidia.com/object/physx.html&#xD;&#xA;  [3]: http://www.havok.com/index.php?page=havok-physics" />
  <row Id="1942" PostHistoryTypeId="1" PostId="1041" RevisionGUID="11def4f3-62fa-439c-9b9b-08c1749f5fb5" CreationDate="2010-07-22T01:37:16.233" UserId="164" Text="Realistic Trajectory of a Projectile" />
  <row Id="1943" PostHistoryTypeId="3" PostId="1041" RevisionGUID="11def4f3-62fa-439c-9b9b-08c1749f5fb5" CreationDate="2010-07-22T01:37:16.233" UserId="164" Text="&lt;libraries&gt;&lt;physics-engine&gt;" />
  <row Id="1944" PostHistoryTypeId="2" PostId="1042" RevisionGUID="e92efad7-34a4-4105-aed3-bcd8992b21ef" CreationDate="2010-07-22T01:42:50.057" UserId="573" Text="You asked  which one I used, so I will make sure to answer that.  I used the [Recursive Backtracker Algorithm][1] in my maze game on [Rootbeer Games][2].&#xD;&#xA;&#xD;&#xA;This is evidence that I used the algorithm, please don't view it as an advertisement of my work.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Maze_generation_algorithm#Recursive_backtracker&#xD;&#xA;  [2]: http://www.rootbeergames.com/games/rootbeerMaze/" />
  <row Id="1945" PostHistoryTypeId="2" PostId="1043" RevisionGUID="0063c081-1cb0-4425-8b45-561cac997e3b" CreationDate="2010-07-22T01:43:26.653" UserId="188" Text="I have made more than a few Tetris clones. Each time I did it I did it slightly different though. Nowadays, I usually make some type of Asteroids clone though. I also have made more than a few Missile Command spinoffs. &#xD;&#xA;&#xD;&#xA;I've started with the basic game play and than moved onto adding more stuff, power ups etc.. to it." />
  <row Id="1947" PostHistoryTypeId="2" PostId="1044" RevisionGUID="9d98f01f-5276-42c7-a1d3-3fb225285328" CreationDate="2010-07-22T01:54:33.990" UserId="573" Text="I'm considering development of some simple Unity games but am worried about distribution.  Which well known game portals currently support unity?" />
  <row Id="1948" PostHistoryTypeId="1" PostId="1044" RevisionGUID="9d98f01f-5276-42c7-a1d3-3fb225285328" CreationDate="2010-07-22T01:54:33.990" UserId="573" Text="Which game portals support Unity games?" />
  <row Id="1949" PostHistoryTypeId="3" PostId="1044" RevisionGUID="9d98f01f-5276-42c7-a1d3-3fb225285328" CreationDate="2010-07-22T01:54:33.990" UserId="573" Text="&lt;unity&gt;&lt;support&gt;" />
  <row Id="1950" PostHistoryTypeId="2" PostId="1045" RevisionGUID="3609c308-beb9-4d88-9313-67f4a6b8a22a" CreationDate="2010-07-22T01:58:59.830" UserId="573" Text="Where may I find quality game music for reasonable fees?  I'm willing to pay for the music, but I hope it is well done." />
  <row Id="1951" PostHistoryTypeId="1" PostId="1045" RevisionGUID="3609c308-beb9-4d88-9313-67f4a6b8a22a" CreationDate="2010-07-22T01:58:59.830" UserId="573" Text="Where is quality paid game music?" />
  <row Id="1952" PostHistoryTypeId="3" PostId="1045" RevisionGUID="3609c308-beb9-4d88-9313-67f4a6b8a22a" CreationDate="2010-07-22T01:58:59.830" UserId="573" Text="&lt;music&gt;" />
  <row Id="1953" PostHistoryTypeId="2" PostId="1046" RevisionGUID="91af7efd-d8af-43ec-bbd8-fc437305ce18" CreationDate="2010-07-22T01:59:18.440" UserId="51" Text="Large community wiki list of that answer here: http://answers.unity3d.com/questions/35/which-game-portal-websites-accept-unity-webplayers" />
  <row Id="1954" PostHistoryTypeId="2" PostId="1047" RevisionGUID="b93827c5-0d98-41ad-b43a-46f234c182cd" CreationDate="2010-07-22T02:03:04.050" UserId="574" Text="I'd strongly recommend that novice programmers should start with the simplest game that **they actually want to write**.  As mentioned by Matt Rix, a **huge** part of writing a *game* vs. a demo is pushing the damn thing through to completion - credits, menus, play testing, high scores, pausing, play testing, difficulty levels, clean game state transitions, play testing, etc.  That stuff takes at least half the time you're going to put in and it just isn't fun.  It isn't.  So unless you love the concept and are really motivated, you will give up and move on before the game is a *game*.&#xD;&#xA;&#xD;&#xA;If you want to write an RPG, figure out the simplest, most manageable RPG concept you can come up with *that you want to do* and do it.  Same if you want to do a sci-fi shooter, or a horror-themed platformer, or whatever.  Pick something you will finish, that you will still want to finish after everything fun is done but you're still looking at dozens of hours of work before you're really done.&#xD;&#xA;&#xD;&#xA;The best game to &quot;earn your wings&quot; with?  The one you completed.  I don't care how many half-done PONG/Breakout/Galaga/Tetris demos you've written, you aren't a game developer until you've released an actual completed game.&#xD;&#xA;&#xD;&#xA;Plus, no one wants to play yet another version of those 40-year-old games, and at least some of the point of writing games is for people to *play*, right?" />
  <row Id="1955" PostHistoryTypeId="2" PostId="1048" RevisionGUID="df3a7376-0f6a-4e09-8ba9-3a6be5a43a8c" CreationDate="2010-07-22T02:09:43.597" UserId="51" Text="Braid licensed tracks from &lt;a href=&quot;https://magnatune.com/&quot;&gt;MagnaTune&lt;/a&gt;.  They have very easy licensing schemes, and you can choose to listen to the entire song on the website before you decide to commit to anything.&#xD;&#xA;&#xD;&#xA;It can get expensive though." />
  <row Id="1956" PostHistoryTypeId="2" PostId="1049" RevisionGUID="e6f31cb6-068b-460d-98a3-c25012e11fa4" CreationDate="2010-07-22T02:12:23.573" UserId="458" Text="Since someone asked, you address dynamically-changing environments by re-computing the path every time the player places or removes a tower, and you just store that path in memory in the mean time. The environment doesn't change on every frame.&#xD;&#xA;&#xD;&#xA;Note that some TD games have a set path and don't allow you to place towers on it, so they solve pathfinding the easy way: by hardcoding a path and not letting you block it :)" />
  <row Id="1957" PostHistoryTypeId="2" PostId="1050" RevisionGUID="34fb23a2-ebbb-4ada-8f64-265233f92b09" CreationDate="2010-07-22T02:13:26.350" UserId="584" Text="I'm a new hobbyist game developer but have yet to come up with something original that I found to be really fun. The hardest part I find about game development is this:&#xD;&#xA;&#xD;&#xA;- You have an idea that in your head looks like it would be really fun.&#xD;&#xA;- You build a quick prototype and you realise that in reality its not so much fun for the user.&#xD;&#xA;- You realise that your brain was tricking you by giving you the impression that you had a complete idea but in reality it was skimming over lots of missing details that prevent you from reaching the fun that you envisaged.&#xD;&#xA;- You come up with lots ideas to fill in the missing gaps and hopefully make it fun.&#xD;&#xA;- You try these ideas one by one but it seems none of them really get you to where you wanted.&#xD;&#xA;&#xD;&#xA;So my question is when do you know to stop trying these ideas and admit the overall game concept sucks or do you just keep on iterating on them and hope you find the magic formula?&#xD;&#xA;&#xD;&#xA;Do people have any rules they follow in this process?&#xD;&#xA;&#xD;&#xA;Perhaps &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="1958" PostHistoryTypeId="1" PostId="1050" RevisionGUID="34fb23a2-ebbb-4ada-8f64-265233f92b09" CreationDate="2010-07-22T02:13:26.350" UserId="584" Text="How to know when your game concept is simply not fun and to stop" />
  <row Id="1959" PostHistoryTypeId="3" PostId="1050" RevisionGUID="34fb23a2-ebbb-4ada-8f64-265233f92b09" CreationDate="2010-07-22T02:13:26.350" UserId="584" Text="&lt;game-design&gt;&lt;best-practices&gt;&lt;prototyping&gt;&lt;methodology&gt;" />
  <row Id="1960" PostHistoryTypeId="2" PostId="1051" RevisionGUID="3751a572-557e-4e0b-80f6-30de8ad8999f" CreationDate="2010-07-22T02:15:40.960" UserId="458" Text="I like a variant of Ben's question: pick a game they really love, then ask what they would change about it. If the answer is &quot;nothing, it's perfect in every way&quot;... well, that's how you tell the difference between a gamer and a designer :)&#xD;&#xA;&#xD;&#xA;For level designers, you could always ask them to, you know, design a level. Or assuming you have them submit level design samples with their application, have them walk through their level explaining the choices they made. Critique their level as you go, to see if they can defend their choices while remaining polite when they know they're right (and to see if they can take constructive criticism when they're actually wrong)." />
  <row Id="1961" PostHistoryTypeId="2" PostId="1052" RevisionGUID="b56f4cbe-d9ab-4cd1-b230-767d5690b5ed" CreationDate="2010-07-22T02:15:47.777" UserId="567" Text="i went thru a lot pages here searching for information about the &quot;server side&quot; of a multiplayer game, while i did found some information they were not exactly what i was looking for.&#xD;&#xA;&#xD;&#xA; - What is the best available options&#xD;&#xA;   for the server communication ?&#xD;&#xA; - Is it worthed to handle a game server with website requests for a mmo or should not even be consider at all ?&#xD;&#xA; - Are you aware of any good material&#xD;&#xA;   regarding the same in C# for a&#xD;&#xA;   headstart on the subject ?&#xD;&#xA; - When should i consider creating multiple servers for example &quot;monsters servers, world drop data and the such&quot; or what should i consider for this (i've seen that some very popular games out there use this sort of thing such as a server for monsters, lineage for example) ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Currently i am developing a game using Tiled and C# for single player but i would like to further turn it into a mmo game but i am very unsure of what a server would look like for this ... Any further knowledge or personal experience you could provide related to the server aspect and options i would appreciate.&#xD;&#xA;&#xD;&#xA;if my question at any point is not good please wrap your comment and i will try to rework it to best fit the community of if you can edit it and correct what you feel like should be changed, please go ahead..." />
  <row Id="1962" PostHistoryTypeId="1" PostId="1052" RevisionGUID="b56f4cbe-d9ab-4cd1-b230-767d5690b5ed" CreationDate="2010-07-22T02:15:47.777" UserId="567" Text="Server related questions and it is available options ?" />
  <row Id="1963" PostHistoryTypeId="3" PostId="1052" RevisionGUID="b56f4cbe-d9ab-4cd1-b230-767d5690b5ed" CreationDate="2010-07-22T02:15:47.777" UserId="567" Text="&lt;c#&gt;&lt;multiplayer&gt;&lt;tips&gt;&lt;server&gt;" />
  <row Id="1964" PostHistoryTypeId="5" PostId="1048" RevisionGUID="6713b7a3-dab5-4e1c-aa4b-1c173c16b53a" CreationDate="2010-07-22T02:16:01.333" UserId="51" Comment="added 120 characters in body" Text="Braid licensed tracks from &lt;a href=&quot;https://magnatune.com/&quot;&gt;MagnaTune&lt;/a&gt;.  They have very easy licensing schemes, and you can choose to listen to the entire song on the website before you decide to commit to anything.&#xD;&#xA;&#xD;&#xA;It can get expensive though.  Quoted rates for a full song for 1 platform at 50k units without being the theme song or used in advertising is $3000." />
  <row Id="1965" PostHistoryTypeId="6" PostId="1045" RevisionGUID="f40e6722-8fd9-46bb-820c-d315f7c34f2d" CreationDate="2010-07-22T02:19:01.890" UserId="573" Comment="Updated to show Flash platform" Text="&lt;flash&gt;&lt;music&gt;" />
  <row Id="1966" PostHistoryTypeId="2" PostId="1053" RevisionGUID="11508a10-8a24-4063-a19e-da6b18a53f2d" CreationDate="2010-07-22T02:20:13.603" UserId="458" Text="Unfortunately, I think a lot of it comes down to experience. If you feel like you're beating your head against a wall and you have no other ideas, it's time to take your baby outside and shoot it.&#xD;&#xA;&#xD;&#xA;On the bright side: you can continue to come up with other ideas. The real limiting step here is not usually ideas, but time to work on them. If you kill one game idea, it gives you the time to work on your others. If you have no other ideas... well, then I guess you keep working on your current one until a new idea occurs to you that you want to try." />
  <row Id="1967" PostHistoryTypeId="2" PostId="1054" RevisionGUID="7284133a-478c-4b0a-89bd-61cbcc854392" CreationDate="2010-07-22T02:22:07.730" UserId="395" Text="http://www.jamendo.com/ is a decent place, no idea on prices though.&#xD;&#xA;&#xD;&#xA;EDIT: Looks like an online game is $36." />
  <row Id="1968" PostHistoryTypeId="2" PostId="1055" RevisionGUID="57fc9549-46b7-4e0d-9d2d-33c3380ff683" CreationDate="2010-07-22T02:27:58.980" UserId="587" Text="I like [GameJolt][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamejolt.com/" />
  <row Id="1969" PostHistoryTypeId="5" PostId="1052" RevisionGUID="57a45257-f09c-47fd-a152-1e3423a415b6" CreationDate="2010-07-22T02:28:44.220" UserId="567" Comment="Last sentence" Text="i went thru a lot pages here searching for information about the &quot;server side&quot; of a multiplayer game, while i did found some information they were not exactly what i was looking for.&#xD;&#xA;&#xD;&#xA; - What is the best available options&#xD;&#xA;   for the server communication ?&#xD;&#xA; - Is it worthed to handle a game server with website requests for a mmo or should not even be consider at all ?&#xD;&#xA; - Are you aware of any good material&#xD;&#xA;   regarding the same in C# for a&#xD;&#xA;   headstart on the subject ?&#xD;&#xA; - When should i consider creating multiple servers for example &quot;monsters servers, world drop data and the such&quot; or what should i consider for this (i've seen that some very popular games out there use this sort of thing such as a server for monsters, lineage for example) ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Currently i am developing a game using Tiled and C# for single player but i would like to further turn it into a mmo game but i am very unsure of what a server would look like for this ... Any further knowledge or personal experience you could provide related to the server aspect and options i would appreciate.&#xD;&#xA;&#xD;&#xA;if my question or english at any point is not good please wrap your comment and i will try to rework it to best fit the community of if you can edit it and correct what you feel like should be changed, please go ahead..." />
  <row Id="1970" PostHistoryTypeId="2" PostId="1056" RevisionGUID="a6c9d43b-be8b-4a97-931d-81955a795d4f" CreationDate="2010-07-22T02:28:52.927" UserId="395" Text="Asking &quot;What server should I use for my game?&quot; is far to generic to get a good answer. The server architecture for a game of the scale of an MMO is enormously complicated (I think we have ~3 dozen different server types) and, more importantly, entirely driven by the needs of your game and style.&#xD;&#xA;&#xD;&#xA;I think part of your question is &quot;Can I use a webapp for the server component of my game?&quot;, to which I would say &quot;Maybe&quot;. What are your latency requirements? For something like simple chat or a shared high-score system that would be perfectly acceptable, for something like communicating player movement (high-volume, low-latency) maybe not so much." />
  <row Id="1971" PostHistoryTypeId="2" PostId="1057" RevisionGUID="2678e2d4-62d5-4307-8c62-0739c2ad193b" CreationDate="2010-07-22T02:35:29.760" UserId="551" Text="Since you mention Clients and Servers, i'm going to assume that you're talking about a Client/Server architecture where the Server is the authority on the state of all objects.&#xD;&#xA;&#xD;&#xA;Note: The alternative is a Peer-To-Peer architecture where the owner of an object is the authority for that object.&#xD;&#xA;&#xD;&#xA;There is already a well proven method for synchronizing moving objects using Client-Server architecture. It's called [Dead Reckoning.][1].&#xD;&#xA;&#xD;&#xA;A good way to implement this in a game would be like this:&#xD;&#xA;&#xD;&#xA; 1. Clients send inputs to the server.  &#xD;&#xA; 2. Server updates the game objects&#xD;&#xA;    (accelerations &amp; directions) and&#xD;&#xA;    sends them back to Clients.&#xD;&#xA; 3. Clients use these updated values to&#xD;&#xA;    simulate the movement of the objects&#xD;&#xA;    locally.    &#xD;&#xA; 4. Occasionally, the server&#xD;&#xA;        sends a position correction to avoid&#xD;&#xA;        drift.&#xD;&#xA; 5. Rinse; repeat.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dead_reckoning" />
  <row Id="1972" PostHistoryTypeId="2" PostId="1058" RevisionGUID="790ea94a-0c26-4da3-b4ea-6c466cb17225" CreationDate="2010-07-22T02:35:37.277" UserId="469" Text="There are Jamendo, or you can hunt people on LinkedIn...&#xD;&#xA;&#xD;&#xA;Also some people are just plain awesome, I recommend:&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;Virt: http://www.biglionmusic.com/ (several musicians envy this guy)&#xD;&#xA;&#xD;&#xA;Emmet Cooke (not a god of music, but his price is cheap for what he do...) http://soundtrack.ie/&#xD;&#xA;&#xD;&#xA;Alexander Brandon (from Deus Ex and JJ2 fame): http://www.alexanderbrandon.net/&#xD;&#xA;&#xD;&#xA;Jeremy Soule (from Total Annihilation, Secret of Evermore): http://www.artistryentertainment.com/index.html &lt;&lt;&lt; note here, Jeremy seemly joined some group, LOTS of artists here, if they all are of the level of Jeremy, you will only find good music!&#xD;&#xA;&#xD;&#xA;Skyrunner (friend of mine, make excellent music, and needs some music job :P) http://www.braincontrol.org/music.php&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;Finally, this site is geared toward games, and is excellent on his own:&#xD;&#xA;http://gamecues.com/&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I remember more, I add later... (I make music too! But I will not sell you, or give... My music is bad enough on my own game :P But I DO know lots of musicians, I only not remember properly now)" />
  <row Id="1973" PostHistoryTypeId="5" PostId="1052" RevisionGUID="e4813c2a-dc4c-49e9-9792-81b3a7c7f500" CreationDate="2010-07-22T02:37:23.157" UserId="567" Comment="Formated the text and separeted it a lil bit" Text="i went thru a lot pages here searching for information about the &quot;server side&quot; of a multiplayer game, while i did found some information they were not exactly what i was looking for.&#xD;&#xA;&#xD;&#xA; - What is the best available options&#xD;&#xA;   for the server communication ?&#xD;&#xA; - Is it worthed to handle a game server with website requests for a mmo or should not even be consider at all ?&#xD;&#xA; - Are you aware of any good material&#xD;&#xA;   regarding the same in C# for a&#xD;&#xA;   headstart on the subject ?&#xD;&#xA; - When should i consider creating multiple servers for example &quot;monsters servers, world drop data and the such&quot; or what should i consider for this (i've seen that some very popular games out there use this sort of thing such as a server for monsters, lineage for example) ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Currently i am developing a 2D game&#xD;&#xA;&gt; using Tiled and C# for single player&#xD;&#xA;&gt; but i would like to further turn it&#xD;&#xA;&gt; into a mmo game but i am very unsure&#xD;&#xA;&gt; of what a server would look like for&#xD;&#xA;&gt; this ... Any further knowledge or&#xD;&#xA;&gt; personal experience you could provide&#xD;&#xA;&gt; related to the server aspect and&#xD;&#xA;&gt; options i would appreciate.&#xD;&#xA;&gt; &#xD;&#xA;&gt; As i said above it is a 2D with&#xD;&#xA;&gt; multiple maps where the user goes&#xD;&#xA;&gt; around as their level grows, each map&#xD;&#xA;&gt; which is not a town has monsters&#xD;&#xA;&gt; spawning and despawning when killed by&#xD;&#xA;&gt; players, players can move around on&#xD;&#xA;&gt; the possible spaces, once a player&#xD;&#xA;&gt; hits the border of the map at defined&#xD;&#xA;&gt; locations it will take them to the&#xD;&#xA;&gt; next map...&#xD;&#xA;&gt; &#xD;&#xA;&gt; Since i am doing it on a 800x600 size&#xD;&#xA;&gt; i guess i will need to limit the&#xD;&#xA;&gt; players per server (or something like&#xD;&#xA;&gt; world's or whatever term is used for&#xD;&#xA;&gt; it..) so it does not over populate the&#xD;&#xA;&gt; screen with players ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if my question or english at any point is not good please wrap your comment and i will try to rework it to best fit the community of if you can edit it and correct what you feel like should be changed, please go ahead..." />
  <row Id="1974" PostHistoryTypeId="5" PostId="1057" RevisionGUID="96f1916e-921c-401b-ad19-e29dc3a05326" CreationDate="2010-07-22T02:42:32.830" UserId="551" Comment="added 38 characters in body" Text="Since you mention Clients and Servers, i'm going to assume that you're talking about a Client/Server architecture where the Server is the authority on the state of all objects.&#xD;&#xA;&#xD;&#xA;Note: The alternative is a Peer-To-Peer architecture where the owner of an object is the authority for that object.&#xD;&#xA;&#xD;&#xA;There is already a well proven method for synchronizing moving objects using Client-Server architecture. It's called [Dead Reckoning.][1].&#xD;&#xA;&#xD;&#xA;A good way to implement this in a game would be like this:&#xD;&#xA;&#xD;&#xA; 1. Clients send inputs to the server.  &#xD;&#xA; 2. Server updates the game objects&#xD;&#xA;    (accelerations &amp; directions) and&#xD;&#xA;    sends them back to Clients.&#xD;&#xA; 3. Clients use these updated values to&#xD;&#xA;    simulate the movement of the objects&#xD;&#xA;    locally.    &#xD;&#xA; 4. Occasionally, the server&#xD;&#xA;        sends a position correction to avoid&#xD;&#xA;        drift.&#xD;&#xA; 5. Rinse; repeat.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3230/dead_reckoning_latency_hiding_for_.php" />
  <row Id="1975" PostHistoryTypeId="2" PostId="1059" RevisionGUID="3580c1e5-07ba-48bf-9452-2771f8fe6b24" CreationDate="2010-07-22T02:43:56.837" UserId="591" Text="What cheap/free tools do you use for 2D art and/or animation? &#xD;&#xA;&#xD;&#xA;I don't really like Gimp's interface, Paint.NET is limited and GraphicsGale is sort of archaic. Cosmigo ProMotion looks like it could be good, anyone use it? Seems a bit pricey at $78/92 but of course cheaper than Photoshop. &#xD;&#xA;&#xD;&#xA;I used to like Jasc Paint Shop Pro 7, but the newer versions Corel makes are more for photos. &#xD;&#xA;&#xD;&#xA;2D Bones support would be handy also. " />
  <row Id="1976" PostHistoryTypeId="1" PostId="1059" RevisionGUID="3580c1e5-07ba-48bf-9452-2771f8fe6b24" CreationDate="2010-07-22T02:43:56.837" UserId="591" Text="What tools do you use for 2D art/sprite creation?" />
  <row Id="1977" PostHistoryTypeId="3" PostId="1059" RevisionGUID="3580c1e5-07ba-48bf-9452-2771f8fe6b24" CreationDate="2010-07-22T02:43:56.837" UserId="591" Text="&lt;2d&gt;&lt;art&gt;" />
  <row Id="1979" PostHistoryTypeId="2" PostId="1061" RevisionGUID="4cd279e7-7966-4edd-b770-ceaf9b657c7c" CreationDate="2010-07-22T02:48:11.490" UserDisplayName="thyrgle" Text="Well, personally for sprite creation I use Adobe Illustrator. It costs a lot of money, but before I got Illustrator I used [Inkscape][1] (which is completely free). You should give that a try.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.inkscape.org/" />
  <row Id="1980" PostHistoryTypeId="2" PostId="1062" RevisionGUID="c5064646-f908-403e-8cfa-3d46c3a7a480" CreationDate="2010-07-22T02:49:19.197" UserId="592" Text="The best tool I use for 2D sprites is honestly MS Paint, It does take a lot of time and patience but in the end I think its worth it. " />
  <row Id="1981" PostHistoryTypeId="2" PostId="1063" RevisionGUID="f0ac7e34-03db-4933-9626-9ad8f8ef3560" CreationDate="2010-07-22T02:50:19.863" UserId="469" Text="I use Graphics Gale and Macromedia (not Adobe) Fireworks.&#xD;&#xA;&#xD;&#xA;I have Pro Motion here, but I don't understood it properly, it is WAAAAY too complex to my taste.&#xD;&#xA;&#xD;&#xA;The reason I use fireworks is that I can mix vector and bitmap freely, and also use photoshop plug-ins without using photoshop itself (and I dislike photoshop itself)" />
  <row Id="1982" PostHistoryTypeId="2" PostId="1064" RevisionGUID="791a072e-283a-475d-bd5f-cbf9a603808c" CreationDate="2010-07-22T02:50:40.767" UserId="395" Text="Even though it isn't maintained anymore, I still love [Pixen](http://opensword.org/pixen/) for simple pixel sprite editing." />
  <row Id="1983" PostHistoryTypeId="2" PostId="1065" RevisionGUID="9316a4b6-7eb9-4dad-9c5e-5cb463a37246" CreationDate="2010-07-22T02:53:58.653" UserId="469" Text="There is a reason to don't use 3D API.&#xD;&#xA;&#xD;&#xA;Only computers in NA, North-west EU and Japan support them...&#xD;&#xA;&#xD;&#xA;I live in Brazil for example, my sister computer is new, has a multi-core processor, several GB ram, and yet it does not run OpenGL games.&#xD;&#xA;&#xD;&#xA;I for example can only play Dwarf Fortress (use OpenGL to render ASCII graphics) on my own computer, on any other computer I find it runs crawling slow.&#xD;&#xA;&#xD;&#xA;And this is not a issue only with Brazil, I asked people around, and it is common in several places of the world... The population that actually own OpenGL or Direct3D compatible cards is a minority...&#xD;&#xA;&#xD;&#xA;Only that this minority get more attention from companies...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But if you are targeting only these &quot;traditional&quot; markets (NA, Northwest EU, JP), then go for it!" />
  <row Id="1984" PostHistoryTypeId="5" PostId="1061" RevisionGUID="91e83a83-89da-45a0-bc7f-3cbd9be131d2" CreationDate="2010-07-22T03:01:18.683" UserDisplayName="thyrgle" Comment="Changed link so it is now set to the download page." Text="Well, personally for sprite creation I use Adobe Illustrator. It costs a lot of money, but before I got Illustrator I used [Inkscape][1] (which is completely free). You should give that a try.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.inkscape.org/download/" />
  <row Id="1985" PostHistoryTypeId="2" PostId="1066" RevisionGUID="e2251aa3-f89f-4baf-8ca6-becd9c0f042e" CreationDate="2010-07-22T03:01:50.117" UserId="561" Text="I've come across this problem before and it would be good to know the different ways of solving this problem." />
  <row Id="1986" PostHistoryTypeId="1" PostId="1066" RevisionGUID="e2251aa3-f89f-4baf-8ca6-becd9c0f042e" CreationDate="2010-07-22T03:01:50.117" UserId="561" Text="What is dead reckoning and how do you deal with it?" />
  <row Id="1987" PostHistoryTypeId="3" PostId="1066" RevisionGUID="e2251aa3-f89f-4baf-8ca6-becd9c0f042e" CreationDate="2010-07-22T03:01:50.117" UserId="561" Text="&lt;multiplayer&gt;" />
  <row Id="1988" PostHistoryTypeId="5" PostId="489" RevisionGUID="a8488c9b-16da-471e-bded-720dcb9f7826" CreationDate="2010-07-22T03:03:06.853" UserId="55" Comment="adding link" Text="I would really like to hear how other independents generally approach marketing their game with limited resources. I know how critical marketing is since I've seen it first hand on several fronts. I've been part of teams that didn't put an ounce of marketing into their project and didn't come close to meeting expectations. I've also poured a lot of time into visiting forums to discuss our previous title which resulted in minor bumps over time.&#xD;&#xA;&#xD;&#xA;I really think [Wolfire][1] is doing some amazing grass roots marketing with the way they are managing their community around their Blog. They've massed a following that is willing to pay (far in advance) them for their game before they finish it to help support them. That's awesome.&#xD;&#xA;&#xD;&#xA;But how many people are really willing to divulge such information that early? Should that be a concern? Should I start talking about my next project before I really have anything implemented? &#xD;&#xA;&#xD;&#xA;What has worked for you? I would be particularly interested to hear how people approach Apple's iTunes store. I believe we're looking at around 33,000 games on the store these days.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolfire.com" />
  <row Id="1989" PostHistoryTypeId="2" PostId="1067" RevisionGUID="afd19a25-fc92-4346-983e-340cdebf44cc" CreationDate="2010-07-22T03:05:15.273" UserId="395" Text="http://gamedev.stackexchange.com/questions/552/synchronizing-clients-with-a-server-and-with-each-other has some tips and links." />
  <row Id="1990" PostHistoryTypeId="2" PostId="1068" RevisionGUID="b98efc9d-e975-422a-9227-6319a923d44e" CreationDate="2010-07-22T03:08:12.393" UserDisplayName="thyrgle" Text="What tips or tricks do you have when it comes to making the &quot;industry standard&quot; (OpenGL) for graphics more efficient?" />
  <row Id="1991" PostHistoryTypeId="1" PostId="1068" RevisionGUID="b98efc9d-e975-422a-9227-6319a923d44e" CreationDate="2010-07-22T03:08:12.393" UserDisplayName="thyrgle" Text="OpenGL optimization tips." />
  <row Id="1992" PostHistoryTypeId="3" PostId="1068" RevisionGUID="b98efc9d-e975-422a-9227-6319a923d44e" CreationDate="2010-07-22T03:08:12.393" UserDisplayName="thyrgle" Text="&lt;opengl&gt;&lt;optimization&gt;" />
  <row Id="1993" PostHistoryTypeId="16" PostId="1068" RevisionGUID="b98efc9d-e975-422a-9227-6319a923d44e" CreationDate="2010-07-22T03:08:12.393" UserDisplayName="thyrgle" />
  <row Id="1996" PostHistoryTypeId="2" PostId="1070" RevisionGUID="573de9cd-7e80-4bc3-b8e2-5fbb87f88460" CreationDate="2010-07-22T03:17:41.517" UserId="51" Text="The standard tip of profile, profile, profile applies just as well here, although the tools are slightly different.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.gremedy.com/&quot;&gt;gDEBugger&lt;/a&gt; is great at helping you see exactly what's going on under the hood.  It's expensive, though." />
  <row Id="1997" PostHistoryTypeId="16" PostId="1070" RevisionGUID="573de9cd-7e80-4bc3-b8e2-5fbb87f88460" CreationDate="2010-07-22T03:17:41.517" UserId="-1" />
  <row Id="1998" PostHistoryTypeId="5" PostId="1068" RevisionGUID="d5f3512d-6f5a-46e5-84dc-4744f95dab0a" CreationDate="2010-07-22T03:18:14.573" UserId="51" Comment="made question cleaner" Text="What tips or tricks do you have when it comes to making the OpenGL more efficient?" />
  <row Id="1999" PostHistoryTypeId="2" PostId="1071" RevisionGUID="39373041-187f-4c3c-8c0e-6d12cc9cbe0e" CreationDate="2010-07-22T03:24:35.623" UserId="262" Text="I have used Photoshop for years through my work, but couldn't quite justify the cost of personal [development][1], so I have taken up [Gimp][2] and [Inkscape][3]. I use Gimp for handrawn stuff and Inkscape for UI elements where vector graphics is a bit more predictable.&#xD;&#xA;&#xD;&#xA;Both have quirks (especially on the Mac) which take some getting used to, but overall I am pretty happy with them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cannonade.net/blog.php?id=1474&#xD;&#xA;  [2]: http://www.gimp.org/&#xD;&#xA;  [3]: http://www.inkscape.org/" />
  <row Id="2000" PostHistoryTypeId="2" PostId="1072" RevisionGUID="42deaf42-26d9-4314-95ad-249023261cb2" CreationDate="2010-07-22T03:25:52.740" UserId="601" Text="I am approaching the point where I can release a playable beta of a very complex game I am making in Flash/AS3. It is fairly involved and the deepest game Ive made so far. I plan on hosting it on my personal site but I want to try and get good feedback on the game elements so far. &#xD;&#xA;&#xD;&#xA;Is it worth it to expose this beta to as many places as possible before the release? What are good communities to do this?&#xD;&#xA;&#xD;&#xA;Please note this will be freeware in its final release" />
  <row Id="2001" PostHistoryTypeId="1" PostId="1072" RevisionGUID="42deaf42-26d9-4314-95ad-249023261cb2" CreationDate="2010-07-22T03:25:52.740" UserId="601" Text="HOw Public should you make your Betas?" />
  <row Id="2002" PostHistoryTypeId="3" PostId="1072" RevisionGUID="42deaf42-26d9-4314-95ad-249023261cb2" CreationDate="2010-07-22T03:25:52.740" UserId="601" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="2004" PostHistoryTypeId="2" PostId="1074" RevisionGUID="76bcc400-80ea-4160-9541-a11c787dfffc" CreationDate="2010-07-22T03:41:18.420" UserId="603" Text="Here's a couple of good links which cover an awful lot of game networking.&#xD;&#xA;&#xD;&#xA;And this is the first part of the more hands on networking series.&#xD;&#xA;http://gafferongames.com/networking-for-game-programmers/udp-vs-tcp/&#xD;&#xA;&#xD;&#xA;For the history.&#xD;&#xA;'we're sorry, but as a spam prevention mechanism, new users can only post a maximum of one hyperlink. Earn 10 reputation to post more hyperlinks.' Just look around his website, anyway." />
  <row Id="2005" PostHistoryTypeId="2" PostId="1075" RevisionGUID="10f980f7-3bf1-479d-9aeb-773362d89e2b" CreationDate="2010-07-22T03:43:04.270" UserId="587" Text="[GameJolt][1] is pretty awesome!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamejolt.com/" />
  <row Id="2006" PostHistoryTypeId="2" PostId="1076" RevisionGUID="4bb6d96d-2af6-48d4-9d39-39cc3907fe88" CreationDate="2010-07-22T03:43:44.860" UserId="51" Text="As long as you aren't representing it as a &quot;final&quot; product, there really isn't any reason to go public with a beta on your own site as soon as it's playable.&#xD;&#xA;&#xD;&#xA;I wouldn't put it on portals or anything like that, as the primary reason for releasing games early is to try to get a tightly knit community around it.  You want people to be getting the game from your site so that when they have issues they know where to turn to for support and feedback.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://blog.wolfire.com/&quot;&gt;Wolfire Games&lt;/a&gt; and &lt;a href=&quot;http://www.taleworlds.com/main.aspx&quot;&gt;TaleWorld&lt;/a&gt; both release their work-in-progress games to their preorder customers, and it works out really well for them." />
  <row Id="2007" PostHistoryTypeId="2" PostId="1077" RevisionGUID="584d177d-832f-4ad8-88df-1383f8c091b3" CreationDate="2010-07-22T03:44:20.073" UserId="162" Text="It's probably good to stage your beta into at least sections. The key issue is that having a &quot;public&quot; beta too early is a bad idea, as it can server as bad word of mouth. The people who are in your public beta test are the same people you want to use to spread some publicity (even for a free game). &#xD;&#xA;&#xD;&#xA;If you need to get some early testing in, I would recommending doing a &quot;friends and family&quot; beta where you hand it out to people you have a relationship with, such as friends in real life or just users on a forum you frequent. Mention that it shouldn't be distributed and you'd really like some feedback. This way you'll get less of a dispersal effect, as being in public beta can make the testers think that they don't have to give feedback (because everyone else is).&#xD;&#xA;&#xD;&#xA;Once your game is fully functional and you want to open it up for either balance or scalability testing, a more public beta is the way to go. Frankly for a freeware game there's not much benefit to actually &quot;releasing&quot; a game, and things like Dwarf Fortress are still technically in Beta despite having thousands of active users. At this point I'd open it up to everyone, and the &quot;beta&quot; label is really just there to let people know that it's not a commercially polished experience. Heck, gmail was in beta for like 5 years." />
  <row Id="2008" PostHistoryTypeId="6" PostId="844" RevisionGUID="0f2894c9-e2b8-4306-a662-3e680545a5dd" CreationDate="2010-07-22T03:48:11.273" UserId="51" Comment="edited tags" Text="&lt;open-source&gt;&lt;monetization&gt;&lt;free-to-play&gt;" />
  <row Id="2009" PostHistoryTypeId="2" PostId="1078" RevisionGUID="03833f90-15d9-437f-89bb-e95f19dfc7b1" CreationDate="2010-07-22T03:48:11.507" UserId="162" Text="I like to analyze any ideas of mine that don't seem fun and break them down into a few components. The reason behind this is that there's probably SOMETHING you can salvage from any given failed game project for a future one. Maybe the arena combat gameplay doesn't match with your theme of atmospheric horror. Maybe most of the game is generic crap but there's on really COOL idea that kept tricking you into thinking the project was going somewhere. Figure out the bit of your concept that's the most interesting to you and see if you can jumble it up with a few ideas from other projects you've worked on our outside sources. &#xD;&#xA;&#xD;&#xA;And by trying to mash up these ideas you may stumble on something that makes your original basic concept work. I'd say the best advice is to not think of games as really having a SINGLE concept, but instead being a collection of ideas that may be better off in a slightly different form." />
  <row Id="2010" PostHistoryTypeId="2" PostId="1079" RevisionGUID="7ab67216-3167-4962-ba5d-115baaf3f919" CreationDate="2010-07-22T03:56:38.367" UserId="51" Text="With your typical MMORPG, players can usually farm the world for raw materials essentially forever.  Monsters/mineral veins/etc are usually on some respawn timer so, other than time, there really isn't a good way to limit the amount of new currency entering the system. &#xD;&#xA;&#xD;&#xA;So that really only leaves money sinks to try to take money out of the system.  What are some strategies to prevent inflation of the in-game currency?" />
  <row Id="2011" PostHistoryTypeId="1" PostId="1079" RevisionGUID="7ab67216-3167-4962-ba5d-115baaf3f919" CreationDate="2010-07-22T03:56:38.367" UserId="51" Text="How do you prevent inflation in a virtual economy?" />
  <row Id="2012" PostHistoryTypeId="3" PostId="1079" RevisionGUID="7ab67216-3167-4962-ba5d-115baaf3f919" CreationDate="2010-07-22T03:56:38.367" UserId="51" Text="&lt;game-design&gt;&lt;mmo&gt;" />
  <row Id="2013" PostHistoryTypeId="2" PostId="1080" RevisionGUID="dddf3715-5575-4599-a14f-29e2241ea84b" CreationDate="2010-07-22T03:59:35.213" UserId="395" Text="The general solution I've seen used is to put anything cool on a separate, untradable currency. You can also go whole-hog like Eve and have a real, deep economy to take care of it. Most MMO economies are just too simple to have things like supply and demand curves, but it is possible." />
  <row Id="2014" PostHistoryTypeId="2" PostId="1081" RevisionGUID="abcaeaf6-3230-4c96-a528-bbf8cb5e597f" CreationDate="2010-07-22T04:00:32.437" UserId="195" Text="I was reading on SO about [native flash rendering vs building a custom `BitmapData` frame buffer][1] and some of the answers were a bit conflicting, so I was wondering:&#xD;&#xA;&#xD;&#xA; 1. Is it generally best practice to go the custom Bitmap buffer route or is it best to leave rendering to the flash engine?&#xD;&#xA; 1. If you're using vector animations (`MovieClip`s) as opposed to sprites, does that change the answer to the above?&#xD;&#xA; 1. If so is it best practice to use sprite based animations?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(I'm targeting Flash 10 if that makes any difference)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1018074/flash-performance-for-game-dev-native-render-vs-bitmapdata-framebuffer" />
  <row Id="2015" PostHistoryTypeId="1" PostId="1081" RevisionGUID="abcaeaf6-3230-4c96-a528-bbf8cb5e597f" CreationDate="2010-07-22T04:00:32.437" UserId="195" Text="Rendering performance for Flash games" />
  <row Id="2016" PostHistoryTypeId="3" PostId="1081" RevisionGUID="abcaeaf6-3230-4c96-a528-bbf8cb5e597f" CreationDate="2010-07-22T04:00:32.437" UserId="195" Text="&lt;flash&gt;&lt;optimization&gt;&lt;sprites&gt;&lt;performance&gt;" />
  <row Id="2017" PostHistoryTypeId="2" PostId="1082" RevisionGUID="863b9753-9309-40d9-a816-5deaa2373723" CreationDate="2010-07-22T04:01:38.737" UserId="582" Text="The only thing I can think of is that using a 3D API over a 2D one adds some base complexity. In OpenGL at least, you have to load and manage textures, and when you draw them you need to get the geometry right. A wrapper layer solves these issues.&#xD;&#xA;&#xD;&#xA;That said, using a 3D graphics back-end seems to have more upsides than downsides, so if you ask me, it's well worth the effort." />
  <row Id="2018" PostHistoryTypeId="2" PostId="1083" RevisionGUID="3b451e08-7ad4-49ee-8c7c-48ea7285b4d1" CreationDate="2010-07-22T04:02:00.737" UserId="51" Text="I think it's pretty much universally agreed that simply mapping the analog stick to rotational speed of the character is not good enough to make console first person shooter feel good.&#xD;&#xA;&#xD;&#xA;So what are some input paradigms that make a modern FPS on the console work well?" />
  <row Id="2019" PostHistoryTypeId="1" PostId="1083" RevisionGUID="3b451e08-7ad4-49ee-8c7c-48ea7285b4d1" CreationDate="2010-07-22T04:02:00.737" UserId="51" Text="What makes aiming in a console first person shooter feel good?" />
  <row Id="2020" PostHistoryTypeId="3" PostId="1083" RevisionGUID="3b451e08-7ad4-49ee-8c7c-48ea7285b4d1" CreationDate="2010-07-22T04:02:00.737" UserId="51" Text="&lt;console&gt;&lt;first-person-shooter&gt;&lt;aiming&gt;" />
  <row Id="2021" PostHistoryTypeId="2" PostId="1084" RevisionGUID="3bf79d92-7ca0-4a39-be58-1fc898463e03" CreationDate="2010-07-22T04:06:19.513" UserId="582" Text="[GraphicsGale](http://www.humanbalance.net/gale/us/). It has:&#xD;&#xA;&#xD;&#xA; * pixel zooming&#xD;&#xA; * layers&#xD;&#xA; * animation support&#xD;&#xA; * real-time animation previews&#xD;&#xA; * onion skinning&#xD;&#xA; * a relatively simple interface&#xD;&#xA;&#xD;&#xA;It's shareware, but the only restrictions are lack of support for *.ico, *.cur, *.ani and animated GIFs." />
  <row Id="2022" PostHistoryTypeId="2" PostId="1085" RevisionGUID="8685287f-b18b-44fc-899b-24aaf6c1f0f3" CreationDate="2010-07-22T04:16:47.167" UserId="568" Text="I'm writing an AI for a card game and after some testing I've discovered that using MTD(f) on my alpha beta algorithm - a series of zero-window searches - is faster than just using alpha-beta by itself.&#xD;&#xA;&#xD;&#xA;The MTD(f) algorithm is described well here http://people.csail.mit.edu/plaat/mtdf.html&#xD;&#xA;&#xD;&#xA;The problem I have is that for each pass in the MTD(f) search (for each guess) I don't reuse any of the previous positions I have stored even though the write up on the link suggests that I should (in fact clearing the table between iterations speeds up the algorithm).&#xD;&#xA;&#xD;&#xA;My problem is that when I store a position and a value in my transposition table I also store the alpha and beta values for which it is valid. Therefore a second pass through the tree with a different guess (and therefore alpha and beta) can't possibly reuse any information. Is this what is to be expected or am I missing something fundamental here?&#xD;&#xA;&#xD;&#xA;For instance if for alpha=3 beta=4 we come to a result of 7 (obviously a cut-off) should I store that in the table as valid for alpha=3 to beta=6? Or beta=7?&#xD;&#xA;&#xD;&#xA;(Copied from stack overflow in hope of answers)&#xD;&#xA;" />
  <row Id="2023" PostHistoryTypeId="1" PostId="1085" RevisionGUID="8685287f-b18b-44fc-899b-24aaf6c1f0f3" CreationDate="2010-07-22T04:16:47.167" UserId="568" Text="How to use transposition tables with MTD(f)" />
  <row Id="2024" PostHistoryTypeId="3" PostId="1085" RevisionGUID="8685287f-b18b-44fc-899b-24aaf6c1f0f3" CreationDate="2010-07-22T04:16:47.167" UserId="568" Text="&lt;algorithm&gt;" />
  <row Id="2025" PostHistoryTypeId="2" PostId="1086" RevisionGUID="dff4398c-b9bd-4d97-ac72-e1f1c8a874aa" CreationDate="2010-07-22T04:35:26.510" UserId="614" Text="I'm building my own game engine in C++ and I'm currently deciding on what user interface I should use. &#xD;&#xA;&#xD;&#xA;Should I use a library? Should I make my own?" />
  <row Id="2026" PostHistoryTypeId="1" PostId="1086" RevisionGUID="dff4398c-b9bd-4d97-ac72-e1f1c8a874aa" CreationDate="2010-07-22T04:35:26.510" UserId="614" Text="What C++ GUI library can you suggest?" />
  <row Id="2027" PostHistoryTypeId="3" PostId="1086" RevisionGUID="dff4398c-b9bd-4d97-ac72-e1f1c8a874aa" CreationDate="2010-07-22T04:35:26.510" UserId="614" Text="&lt;c++&gt;&lt;gui&gt;" />
  <row Id="2028" PostHistoryTypeId="2" PostId="1087" RevisionGUID="f14d455c-02be-4049-aabb-f641b193dfbf" CreationDate="2010-07-22T04:38:48.673" UserId="614" Text="Add a money-sink that trades money for services such as temporary buffs, items, etc. The money disappears and after (say a few minutes or a week), the service disappears.&#xD;&#xA;&#xD;&#xA;Possible services can be:&#xD;&#xA;&#xD;&#xA;* extra experience&#xD;&#xA;* special pet&#xD;&#xA;* access to a dungeon&#xD;&#xA;* speed buff (surprisingly useful in a MMO)&#xD;&#xA;* temporary access to a spell" />
  <row Id="2029" PostHistoryTypeId="2" PostId="1088" RevisionGUID="e3423313-53b7-4bc3-aec7-a8a03119dd44" CreationDate="2010-07-22T04:39:35.583" UserId="614" Text="For console games, you will have to work with an analog stick. While analog sticks feels intuitive for 3D games, it's horrible during intense moments where you need to actually aim. The best solution is to make the stick become accurate during these moments.&#xD;&#xA;&#xD;&#xA;Here's a simple solution: As the crosshair moves closer to an enemy, the sensitivity goes down. This would allow the player be more accurate with his shots.&#xD;&#xA;&#xD;&#xA;You can also implement a &quot;sticky aim&quot;. This becomes very satisfying if there are multiple enemies and the player needs to kill the one immediately in front of them." />
  <row Id="2030" PostHistoryTypeId="2" PostId="1089" RevisionGUID="a649b69d-7370-439e-ad30-73fdda833075" CreationDate="2010-07-22T04:40:34.007" UserId="395" Text="The problem with most GUI libraries (Qt is probably the most popular C++ one that isn't Windows-only) is that most won't integrate well into an engine. Traditionally in a GUI app, the GUI library controls the main loop and you just hook up callbacks to events. In a game engine you generally want to control the loop, so it can be tricky at best. Maybe you are looking for something that will just handle drawing controls and dialogs and such into an 3D context you pass it? Those can be a lot harder to find :-/" />
  <row Id="2031" PostHistoryTypeId="2" PostId="1090" RevisionGUID="39ab8645-9add-4a94-8cce-dc7e08ecc973" CreationDate="2010-07-22T04:48:08.337" UserId="614" Text="A simple solution is to cheat. &#xD;&#xA;&#xD;&#xA;Design the map beforehand to make sure that there is no dead ends. Then in each intersection, add a trigger that makes the character to choose a route (example: always turn left, always turn right, or random)." />
  <row Id="2032" PostHistoryTypeId="2" PostId="1091" RevisionGUID="5bc3d33f-7af2-4485-9d8e-fb5a9e90e4e1" CreationDate="2010-07-22T04:48:48.990" UserId="614" Text="Tell me a game you've enjoyed and tell me what you can do to make it better.&#xD;&#xA;&#xD;&#xA;I believe this is a good question for the following reasons:&#xD;&#xA;&#xD;&#xA;* they choose the game they want to talk about&#xD;&#xA;* you can tell how passionate they are by how they describe the game.&#xD;&#xA;* you can tell that they actually paid attention to the game's design philosophy if they have insights on the game's mistakes" />
  <row Id="2033" PostHistoryTypeId="2" PostId="1092" RevisionGUID="f32c931e-af1f-4889-8887-103625acf678" CreationDate="2010-07-22T04:54:31.633" UserId="614" Text="There are a lot of ways to solve dead reckoning. &#xD;&#xA;&#xD;&#xA;One way is to have the server store the latency of each player as well as past game states (up to the maximum time before disconnecting an inactive player). If a packet is received, the server will check the game state in the past when the player is sent the packet and check for events." />
  <row Id="2034" PostHistoryTypeId="2" PostId="1093" RevisionGUID="1d46647b-9f31-4394-8b86-c3a39b6141f4" CreationDate="2010-07-22T04:56:14.580" UserId="614" Text="Use VBO rather than glStart()/glEnd(). This saves cycles in transferring the data to the GPU's memory." />
  <row Id="2035" PostHistoryTypeId="16" PostId="1093" RevisionGUID="1d46647b-9f31-4394-8b86-c3a39b6141f4" CreationDate="2010-07-22T04:56:14.580" UserId="-1" />
  <row Id="2036" PostHistoryTypeId="2" PostId="1094" RevisionGUID="cd1d11d6-1511-4e5d-b23e-5ef2e043a8e4" CreationDate="2010-07-22T05:01:50.563" UserId="614" Text="Watch someone play but don't talk to them. By not talking to them, you can see things them do things that will make you pull you hair (You: *the solution is obvious. What's wrong with you? #$@!*).&#xD;&#xA;&#xD;&#xA;Instead of saying your thoughts aloud, write down what you want to say. Use this as your basis to guide your game difficulty." />
  <row Id="2037" PostHistoryTypeId="2" PostId="1095" RevisionGUID="5832797c-0fcf-4708-b551-0f1d377c2f90" CreationDate="2010-07-22T05:02:57.457" UserId="614" Text="Give up. Don't ever." />
  <row Id="2038" PostHistoryTypeId="2" PostId="1096" RevisionGUID="46eb11ba-acab-491e-98f1-e121185e5853" CreationDate="2010-07-22T05:04:20.823" UserId="619" Text="http://www.silverarcade.com/ is dedicated to Silverlight only, that's the only one I'm aware of." />
  <row Id="2039" PostHistoryTypeId="2" PostId="1097" RevisionGUID="8c92d2de-97d0-43a6-9b62-fe7c01458495" CreationDate="2010-07-22T05:05:10.633" UserId="614" Text="Battle chess has always been interesting even if it was played in a static game board." />
  <row Id="2040" PostHistoryTypeId="2" PostId="1098" RevisionGUID="a6823ce1-ee8d-45a9-81eb-e1bfd58c191c" CreationDate="2010-07-22T05:07:01.817" UserId="614" Text="What's wrong with an **IF** checks after the achievement event occurs?&#xD;&#xA;&#xD;&#xA;    if (Cinimatics.done)&#xD;&#xA;       Achievement.get(CINIMATICS_SEEN);&#xD;&#xA;&#xD;&#xA;    if (EnemiesKiled &gt; 200)&#xD;&#xA;       Achievement.get(KILLER);&#xD;&#xA;&#xD;&#xA;    if (Damage &gt; 2000 &amp;&amp; TimeSinceFirstDamage &lt; 2000)&#xD;&#xA;       Achievement.get(MEAT_SHIELD);&#xD;&#xA;&#xD;&#xA;    InvitationAccepted = Invite.send(BestFriend);&#xD;&#xA;    if (InvitationAccepted)&#xD;&#xA;       Achievement.get(A_FRIEND_IN_NEED);" />
  <row Id="2041" PostHistoryTypeId="2" PostId="1099" RevisionGUID="0b0f91b7-fa52-4b58-a14f-7c8360691f9c" CreationDate="2010-07-22T05:10:02.547" UserId="581" Text="Money sinks are I guess the only real answer. Which means items or currency getting lost forever. &#xD;&#xA;&#xD;&#xA;Eve Online blatantly has this through the mass destruction of items and ships through pvp (only partially replaced by insurance). Eve also has many other money sinks such as office rent, station fuels, ammunition etc.&#xD;&#xA;&#xD;&#xA;Other games have similar consumables, either necessities like ammo or items that provide buffs etc. (food, potions, pet food, poisons etc.) &#xD;&#xA;&#xD;&#xA;Many games (such as World of Warcraft) feature Bind on Pickup and Bind on Equip items. They are actually money sinks. You can enchant and add gems to your items but at some point you will upgrade it. So upgrading actually destroys the old item along with any value to added to it via enchanting etc. Or in some games you can 'recycle' it for less that the original value.&#xD;&#xA;&#xD;&#xA;This is a nice sink because it doesn't negatively impact players.They only really notice it at the same time as they are cheering about their brand new shiny loot. Also, even if the item is never lost and just remains in a character's backpack it can be considered out of the economy because it will never pass to another player.&#xD;&#xA;&#xD;&#xA;Which brings us to other utility money sinks like increased bank and inventory space. &#xD;&#xA;&#xD;&#xA;Aesthetic upgrades are also a good way to introduce sinks without affecting the gameplay balance of your game. Things like clothing dye or vanity mounts and pets." />
  <row Id="2042" PostHistoryTypeId="2" PostId="1100" RevisionGUID="2829d075-0f57-497e-8d79-5f83e03bcf9d" CreationDate="2010-07-22T05:12:48.580" UserId="603" Text="Sell Out!&#xD;&#xA;&#xD;&#xA;Because you won't be an indie anymore. :(" />
  <row Id="2043" PostHistoryTypeId="2" PostId="1101" RevisionGUID="13a73e5b-ea7b-412a-a2c9-0345899bc3a5" CreationDate="2010-07-22T05:14:04.583" UserId="614" Text="Phoenix Wright*. This is a game where the main character (a lawyer) has to defend his clients from an impossible case where the odds are always stacked against him.&#xD;&#xA;&#xD;&#xA;When the main character gets trapped in a corner with no more evidence to present, the music dies down. Suddenly, the main character gets an inspiration (usually from self-monologues or a twist in the story) and the music suddenly becomes cheery and you feel that you can actually win the case.&#xD;&#xA;&#xD;&#xA;* I see this game as a puzzle game in the vein of point-and-clicks adventure games." />
  <row Id="2044" PostHistoryTypeId="2" PostId="1102" RevisionGUID="33b686b8-643a-4bca-ae4b-53190a158763" CreationDate="2010-07-22T05:15:01.413" UserId="619" Text="Urban Dead doesn't allow trading, doesn't allow storage and the player can only carry a limited number of items. This means the player can't horde items but has to continually search for them." />
  <row Id="2045" PostHistoryTypeId="5" PostId="1101" RevisionGUID="5f0fe15f-2dc2-465e-8ca2-fef94287c056" CreationDate="2010-07-22T05:19:58.287" UserId="614" Comment="added 173 characters in body" Text="Phoenix Wright*. This is a game where the main character (a lawyer) has to defend his clients from an impossible case where the odds are always stacked against him.&#xD;&#xA;&#xD;&#xA;When the main character gets trapped in a corner with no more evidence to present, the music dies down. Suddenly, the main character gets an inspiration (usually from self-monologues or from other characters) and the music suddenly becomes cheery and you feel that you can actually win the case.&#xD;&#xA;&#xD;&#xA;Here's a youtube video of a case where Phoenix is cross-examining a witness. Notice the music change at 0:55. http://www.youtube.com/watch?v=GJWiohNd3Us&amp;feature=related&#xD;&#xA;&#xD;&#xA;* I see this game as a puzzle game in the vein of point-and-clicks adventure games." />
  <row Id="2046" PostHistoryTypeId="2" PostId="1103" RevisionGUID="76a17c83-e69d-497d-92c3-204ae8901c4a" CreationDate="2010-07-22T05:24:45.690" UserId="618" Text="I would say that if you're building a raster based game using sprites, go with building a custom rendering solution using BitmapData. If you're building a vector based game, go with using the built in animation mechanisms using MovieClips.&#xD;&#xA;&#xD;&#xA;If you go with building a custom rendering solution, you pretty much disassociate yourself from Flash using ActionScript alone to accomplish what you need. The &lt;a href=&quot;http://flixel.org/&quot;&gt;flixel engine&lt;/a&gt; uses this method and it's quite nice. I prefer writing my own engine from scratch though, but you get the idea.&#xD;&#xA;&#xD;&#xA;Going with the built in Flash animation mechanisms works best for vector based games because you can easily create your library assets as MovieClips that you can then instantiate in ActionScript on demand. You use the timeline provided the movie clips to handle animation and move the location of the sprite accordingly. All the BattleOn! games like Adventure Quest Worlds use this method. It looks nice also.&#xD;&#xA;&#xD;&#xA;I'm assuming your last question is referring to using the Sprite class instead of the MovieClip class for vector animations. A Sprite is a MovieClip without a timeline, so you would lose the convenience of having the animations managed for you." />
  <row Id="2047" PostHistoryTypeId="2" PostId="1104" RevisionGUID="02b6fb10-8333-4a6b-a9cf-e6971efc3dec" CreationDate="2010-07-22T05:27:44.827" UserId="51" Text="One option that might be worth investigating is using WebKit to render your user interfaces and doing all your UI with CSS/HTML/Javascript.&#xD;&#xA;&#xD;&#xA;Here's an &lt;a href=&quot;http://www.sirikata.com/wiki/index.php?title=Berkelium&quot;&gt;open source implementation (Berkelium)&lt;/a&gt;, and here's a &lt;a href=&quot;http://www.khrona.com/products/awesomium/&quot;&gt;closed source, commercial implemtation (Awesomium)&lt;/a&gt;" />
  <row Id="2048" PostHistoryTypeId="2" PostId="1105" RevisionGUID="96e0296b-fc0b-45fd-9e10-5c06bf149239" CreationDate="2010-07-22T05:37:07.027" UserId="614" Text="I still can't believe how many times I've used the Pythagorean Theorem in my game code. To me, this simple formula is a gem in game development.&#xD;&#xA;&#xD;&#xA;    a^2 + b^2 = c^2&#xD;&#xA;&#xD;&#xA;    or&#xD;&#xA;&#xD;&#xA;    distance = sqrt(x^2 + y^2)" />
  <row Id="2049" PostHistoryTypeId="16" PostId="1105" RevisionGUID="96e0296b-fc0b-45fd-9e10-5c06bf149239" CreationDate="2010-07-22T05:37:07.027" UserId="-1" />
  <row Id="2050" PostHistoryTypeId="2" PostId="1106" RevisionGUID="89955357-ff20-4a66-a8af-b163f7912679" CreationDate="2010-07-22T05:39:04.730" UserId="627" Text="[Don't start off with an MMORPG.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sol.gfxile.net/mmorpg.html" />
  <row Id="2051" PostHistoryTypeId="5" PostId="1087" RevisionGUID="27c252b5-2108-49d7-8c6e-aee473694b5e" CreationDate="2010-07-22T05:40:24.120" UserId="614" Comment="added 5 characters in body" Text="Add a money-sink that trades money for services such as temporary buffs, items, etc. The money disappears and afterwards (say a few minutes or a week), the service disappears.&#xD;&#xA;&#xD;&#xA;Possible services can be:&#xD;&#xA;&#xD;&#xA;* extra experience&#xD;&#xA;* special pet&#xD;&#xA;* access to a dungeon&#xD;&#xA;* speed buff (surprisingly useful in a MMO)&#xD;&#xA;* temporary access to a spell" />
  <row Id="2052" PostHistoryTypeId="2" PostId="1107" RevisionGUID="2749cf8e-a6b9-4d9a-bf35-35ef6b8dbdbf" CreationDate="2010-07-22T05:44:29.417" UserId="43" Text="I'm wondering what options are available for in-game interface libraries (not OS-level interfaces) and what are your opinions about them?&#xD;&#xA;&#xD;&#xA;Please put only one library per answer and follow this template.&#xD;&#xA;&#xD;&#xA;Name&#xD;&#xA;&#xD;&#xA;Link to website&#xD;&#xA;&#xD;&#xA;Cost&#xD;&#xA;&#xD;&#xA;License (if free/open source)&#xD;&#xA;&#xD;&#xA;General summary / Opinion" />
  <row Id="2053" PostHistoryTypeId="1" PostId="1107" RevisionGUID="2749cf8e-a6b9-4d9a-bf35-35ef6b8dbdbf" CreationDate="2010-07-22T05:44:29.417" UserId="43" Text="What in-game user interface are available?" />
  <row Id="2054" PostHistoryTypeId="3" PostId="1107" RevisionGUID="2749cf8e-a6b9-4d9a-bf35-35ef6b8dbdbf" CreationDate="2010-07-22T05:44:29.417" UserId="43" Text="&lt;gui&gt;" />
  <row Id="2055" PostHistoryTypeId="16" PostId="1107" RevisionGUID="2749cf8e-a6b9-4d9a-bf35-35ef6b8dbdbf" CreationDate="2010-07-22T05:47:50.517" UserId="43" />
  <row Id="2056" PostHistoryTypeId="2" PostId="1108" RevisionGUID="7e800def-e4fb-4f3e-a350-2a8f7e0971ce" CreationDate="2010-07-22T05:50:39.497" UserId="458" Text="Money sinks are the obvious answer, as you say. You can do this through incentives (&quot;pay 1M gold for this cool new sword&quot;) or through regular losses (&quot;your weapons and armor degrade over time, pay gold at the blacksmith to restore them&quot;).&#xD;&#xA;&#xD;&#xA;You can also try to find core mechanics that don't involve infinite-spawn -&gt; farm -&gt; net increase in global wealth. Maybe the monsters are limited and can be over-farmed, for example, although of course that creates its own problems.&#xD;&#xA;&#xD;&#xA;You can accept inflation as part of the game, understand the inflation curve, and modify your new-player experience accordingly (e.g. maybe you give new players a gift of Gold, untradeable of course, that is a percent of the total global wealth... so the more you have inflation, the more new players get to start off).&#xD;&#xA;&#xD;&#xA;But mostly, this is an unsolved problem (in MMOs and in the real world)." />
  <row Id="2057" PostHistoryTypeId="2" PostId="1109" RevisionGUID="415c87ec-6191-4400-ae8d-1f60fb524dc0" CreationDate="2010-07-22T05:59:38.323" UserDisplayName="teabee" Text="The OGRE3d engine uses CEGUI (http://www.cegui.org.uk/wiki/index.php/Main_Page). It's FOSS, supports scripting from lua, predefined layouts can be created in XML, supports most of the basic widgets you would need (http://cegui.org.uk/docs/current/fal_baseclass_ref.html). You can also find lots of UI demos using CEGUI on youtube." />
  <row Id="2058" PostHistoryTypeId="16" PostId="1109" RevisionGUID="415c87ec-6191-4400-ae8d-1f60fb524dc0" CreationDate="2010-07-22T05:59:38.323" UserId="-1" />
  <row Id="2059" PostHistoryTypeId="2" PostId="1110" RevisionGUID="ae7df2ad-f0db-495d-ac1a-05d866afbbd8" CreationDate="2010-07-22T06:01:02.377" UserId="195" Text="I personally like the &quot;lock on&quot; paradigm for console shooters. I.e. hold a button to lock onto an enemy roughly in front of you (press multiple times to cycle through multiple enemies) and then your aim just automatically follows them. The first FPS to use it that I can think of (I'm sure there were others before it) was Metroid Prime on GC. Makes the sluggish inaccuracy of the analogue stick not matter. ...not sure how it would translate to multi-player though.&#xD;&#xA;&#xD;&#xA;While we're on Metroid Prime, I also liked the technique they used for platformy bits where the view would automatically angle down slightly when you jumped. It was subtle, but it made the controls feel much more natural.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2060" PostHistoryTypeId="4" PostId="1107" RevisionGUID="48ec4ba7-dd2c-49e1-90da-a1c5cabaa1ca" CreationDate="2010-07-22T06:03:15.773" UserId="370" Comment="grammar" Text="What in-game user interfaces are available?" />
  <row Id="2061" PostHistoryTypeId="2" PostId="1111" RevisionGUID="a4c14bb8-9e8d-472a-91e5-e0c745a468a7" CreationDate="2010-07-22T06:07:52.583" UserId="251" Text="I think one issue here is that minerals and actual currency are separate things. Anyway, one way to combat inflation would be to limit currency generation - in a real economy currency is created at a fixed rate, not when people earn it. Essentially, when you kill an NPC and steal their wallet you would be taking from the &quot;pool&quot; of NPC money. As the NPC money pool decreases, you get less and less money from killing NPCs and vice versa. This could inherently push the game towards PVP as it evolves.&#xD;&#xA;&#xD;&#xA;As for &quot;drops&quot; and various bits of incredible loot, the same system can be applied. If you make most rewards based on increasing your characters skills or something, you can limit the amount of +7 sword of bats without causing too much of a problem." />
  <row Id="2062" PostHistoryTypeId="2" PostId="1112" RevisionGUID="a28323ba-2bd8-472e-9f17-9366d8f21254" CreationDate="2010-07-22T06:10:32.063" UserId="645" Text="When I implemented achievements in my last game, I made it all statistic based. Achievements are unlocked when our statistics reach a certain value. Consider Modern Warfare 2: the game is tracking tons of stats! How many shots have you taken with the SCAR-H? How many miles have you sprinted while using the Lightweight perk?&#xD;&#xA;&#xD;&#xA;So in my implementation, I simply created a statistics engine, then created an achievement manager that runs really simple queries to check the status of achievements throughout gameplay.&#xD;&#xA;&#xD;&#xA;While my implementation is pretty simplistic, it gets the job done. I wrote about it and shared my queries [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.reedolsen.com/how-to-develop-achievements-for-iphone-games/" />
  <row Id="2063" PostHistoryTypeId="2" PostId="1113" RevisionGUID="83ec0c06-2b80-43b7-b4fc-608b57efb590" CreationDate="2010-07-22T06:17:00.740" UserId="644" Text="In fact, Qt widgets can be integrated with OpenGL and OpenGL can be easily integrated with Qt (QGLWidget). Of course, the platform native looking widgets might not be exactly what you are looking for, but do not worry, there are ways to customize them, create your own or use something else which would better suit your needs, such as Qt Quick (which you should be able to integrate as well).&#xD;&#xA;&#xD;&#xA;If you are interested, do not miss these links: **Widgets enter the third dimension: WolfenQt** (http://labs.trolltech.com/blogs/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/) and **Accelerate your widgets with OpenGL** (http://labs.trolltech.com/blogs/2008/06/27/accelerate-your-widgets-with-opengl/)" />
  <row Id="2064" PostHistoryTypeId="5" PostId="1077" RevisionGUID="3c904064-39ca-4ffd-8c7f-1cda026111de" CreationDate="2010-07-22T06:19:23.747" UserId="162" Comment="added 2 characters in body" Text="It's probably good to stage your beta into at least 2 sections. The key issue is that having a &quot;public&quot; beta too early is a bad idea, as it can server as bad word of mouth. The people who are in your public beta test are the same people you want to use to spread some publicity (even for a free game). &#xD;&#xA;&#xD;&#xA;If you need to get some early testing in, I would recommending doing a &quot;friends and family&quot; beta where you hand it out to people you have a relationship with, such as friends in real life or just users on a forum you frequent. Mention that it shouldn't be distributed and you'd really like some feedback. This way you'll get less of a dispersal effect, as being in public beta can make the testers think that they don't have to give feedback (because everyone else is).&#xD;&#xA;&#xD;&#xA;Once your game is fully functional and you want to open it up for either balance or scalability testing, a more public beta is the way to go. Frankly for a freeware game there's not much benefit to actually &quot;releasing&quot; a game, and things like Dwarf Fortress are still technically in Beta despite having thousands of active users. At this point I'd open it up to everyone, and the &quot;beta&quot; label is really just there to let people know that it's not a commercially polished experience. Heck, gmail was in beta for like 5 years." />
  <row Id="2065" PostHistoryTypeId="2" PostId="1114" RevisionGUID="9081b2d9-1261-4166-89ae-be2501e6558d" CreationDate="2010-07-22T06:32:25.933" UserId="402" Text="Don't settle for programmer art.  If you aren't artistically endowed, but there's no way around doing it yourself, work within your limitations for the art direction. Doodle Jump and Desktop Tower Defense are great examples of this.  " />
  <row Id="2066" PostHistoryTypeId="2" PostId="1115" RevisionGUID="f9a29e74-de12-457c-9399-5dbd80046153" CreationDate="2010-07-22T06:32:44.203" UserId="274" Text="I don't think you should write your own, the task of creating a game engine is so huge by itself, if you around there are many many libraries with good licenses that you could use, and modify to your liking.&#xD;&#xA;&#xD;&#xA;For a game engine I would go for an Immediate mode GUI. More informations here:&#xD;&#xA;http://www.mollyrocket.com/forums/viewtopic.php?t=134&#xD;&#xA;&#xD;&#xA;The key idea is to draw the component and control the interaction at the same time:&#xD;&#xA;&#xD;&#xA;    if (button(id, position, size)) &#xD;&#xA;    {&#xD;&#xA;        button_was_pressed();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;For one, Unity uses a similar concept.&#xD;&#xA;&#xD;&#xA;You can find an implementation by NVIDIA, used in their demos:&#xD;&#xA;http://code.google.com/p/nvidia-widgets/&#xD;&#xA;" />
  <row Id="2067" PostHistoryTypeId="2" PostId="1116" RevisionGUID="86f8b3f3-e717-49c9-a38d-0b253bf5c441" CreationDate="2010-07-22T06:35:28.690" UserId="647" Text="Here's one mentioned by Chris Crawford (and apparently used by Atari) which he calls 'A Graphics Trick':&#xD;&#xA;&#xD;&#xA;    LDA FIRST&#xD;&#xA;    EOR SECOND&#xD;&#xA;    AND CONTROL&#xD;&#xA;    EOR SECOND&#xD;&#xA;    STA OUTPUT&#xD;&#xA;&#xD;&#xA;Read the [full article][1] for an explanation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.erasmatazz.com/page78/page31/page272/page282/GraphicsTrick.html" />
  <row Id="2068" PostHistoryTypeId="16" PostId="1116" RevisionGUID="86f8b3f3-e717-49c9-a38d-0b253bf5c441" CreationDate="2010-07-22T06:35:28.690" UserId="-1" />
  <row Id="2069" PostHistoryTypeId="2" PostId="1117" RevisionGUID="dedca89e-386a-4767-a405-f195d72efb80" CreationDate="2010-07-22T06:41:57.460" UserId="402" Text="*Product Name:*  &#xD;&#xA;**[Particle Designer][1]**&#xD;&#xA;&#xD;&#xA;*Type of assets is can create (2D images, 3D images, audio, etc)*  &#xD;&#xA;Particle systems to use in Cocos2d iPhone&#xD;&#xA;&#xD;&#xA;*OS(s) supported*  &#xD;&#xA;Mac OS X&#xD;&#xA;&#xD;&#xA;*Cost*  &#xD;&#xA;$7.99 &#xD;&#xA;&#xD;&#xA;*License (if free/open source)*   &#xD;&#xA;Commercial&#xD;&#xA;&#xD;&#xA;*General summary*  &#xD;&#xA;Lets you create particle systems with a GUI for the parameters and real-time preview.  A nice bonus is the shared user library, which features a great collection of systems to use as a starting point. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://particledesigner.71squared.com" />
  <row Id="2070" PostHistoryTypeId="16" PostId="1117" RevisionGUID="dedca89e-386a-4767-a405-f195d72efb80" CreationDate="2010-07-22T06:41:57.460" UserId="-1" />
  <row Id="2071" PostHistoryTypeId="2" PostId="1118" RevisionGUID="92be15fe-2708-499c-834b-842f26c620eb" CreationDate="2010-07-22T06:48:40.410" UserId="631" Text="I would suggest IUP - Portable User Interface: http://www.tecgraf.puc-rio.br/iup/&#xD;&#xA;&#xD;&#xA;I've only used it with the Lua programming language but it was very easy to use.  It only comes in C, LED and Lua flavors but you can easily make a wrapper for it." />
  <row Id="2072" PostHistoryTypeId="5" PostId="7" RevisionGUID="42b5a734-5eeb-44e5-ae33-4b620ff093bf" CreationDate="2010-07-22T06:56:05.077" UserId="13" Comment="added 3 characters in body; edited tags; edited title" Text="What pitfalls did you encounter when writing games for the PC with managed Languages like C# and how did you solve them?" />
  <row Id="2073" PostHistoryTypeId="4" PostId="7" RevisionGUID="42b5a734-5eeb-44e5-ae33-4b620ff093bf" CreationDate="2010-07-22T06:56:05.077" UserId="13" Comment="added 3 characters in body; edited tags; edited title" Text="What are typical pitfalls when writing games with a managed Language like C#?" />
  <row Id="2074" PostHistoryTypeId="6" PostId="7" RevisionGUID="42b5a734-5eeb-44e5-ae33-4b620ff093bf" CreationDate="2010-07-22T06:56:05.077" UserId="13" Comment="added 3 characters in body; edited tags; edited title" Text="&lt;c#&gt;&lt;xna&gt;&lt;pitfalls&gt;" />
  <row Id="2075" PostHistoryTypeId="2" PostId="1119" RevisionGUID="18d81f9a-9f12-4ddc-808d-1a38620f6793" CreationDate="2010-07-22T07:01:07.500" UserId="370" Text="How do game engine entities communicate?&#xD;&#xA;&#xD;&#xA;Two use cases:&#xD;&#xA;&#xD;&#xA; 1. How would `entity_A` send a `take-damage` message to `entity_B`?  &#xD;&#xA; 2. How would `entity_A` query `entity_B`'s HP?&#xD;&#xA;&#xD;&#xA;What I've come up with so far:&#xD;&#xA;&#xD;&#xA; * [Message queue][1]  &#xD;&#xA;  1. `entity_A` creates a `take-damage` message and posts it to `entity_B`'s message queue.&#xD;&#xA;  2. `entity_A` creates a `query-hp` message and posts it to `entity_B`.  `entity_B` in return creates an `response-hp` message and posts it to `entity_A`.&#xD;&#xA; * [Publish/Subscribe][2]  &#xD;&#xA;   1. `entity_B` subscribes to `take-damage` messages (possibly with some preemptive filtering so only relevant message are delivered).  `entity_A` produces `take-damage` message that references `entity_B`.&#xD;&#xA;   2. `entity_A` subscribes to `update-hp` messages (possibly filtered).  Every frame `entity_B` broadcasts `update-hp` messages.&#xD;&#xA; * [Signal/Slots][3]&#xD;&#xA;  1. ???&#xD;&#xA;  2. `entity_A` connects an `update-hp` slot to `entity_B`'s `update-hp` signal.&#xD;&#xA; * Something better?&#xD;&#xA;&#xD;&#xA;Do I have a correct understanding of how these communication schemes would tie into a game engine's entity system?  &#xD;&#xA;How do entities in commercial game engines communicate?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Message_queue&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Publish/subscribe&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Signals_and_slots" />
  <row Id="2076" PostHistoryTypeId="1" PostId="1119" RevisionGUID="18d81f9a-9f12-4ddc-808d-1a38620f6793" CreationDate="2010-07-22T07:01:07.500" UserId="370" Text="Entity communication: Message queue vs Publish/Subscribe vs Signal/Slots" />
  <row Id="2077" PostHistoryTypeId="3" PostId="1119" RevisionGUID="18d81f9a-9f12-4ddc-808d-1a38620f6793" CreationDate="2010-07-22T07:01:07.500" UserId="370" Text="&lt;game-design&gt;&lt;engine&gt;&lt;architecture&gt;" />
  <row Id="2078" PostHistoryTypeId="5" PostId="7" RevisionGUID="968818cc-2d61-4ebf-a179-b894a07686f7" CreationDate="2010-07-22T07:01:57.107" UserId="13" Comment="fixed grammar" Text="What pitfalls did you encounter when writing games for the PC with a managed Language like C# and how did you solve them?" />
  <row Id="2079" PostHistoryTypeId="2" PostId="1120" RevisionGUID="1afd9b71-4a07-44f0-a132-7fdd18f6016b" CreationDate="2010-07-22T07:03:14.467" UserId="659" Text="Take note of the reply above about not spending too much time on a framework / tools/ engine.&#xD;&#xA;&#xD;&#xA;Then remove the word 'tools' from it!&#xD;&#xA;&#xD;&#xA;While it may be easy to spent way too much time on a well-engineered engine or over-ambitious tech-for-techs-sake, you really don't want to underestimate the importance of decent tools.&#xD;&#xA;&#xD;&#xA;They don't have to be high-tech or optimized - but they need to be stable and very usable. Especially if you're making a game that needs a decent amount of content, or where level design is key.&#xD;&#xA;&#xD;&#xA;And especially if you're working on a team of more than one. If your level-building tool sucks, even the best artists/designers out there will struggle to build good levels." />
  <row Id="2080" PostHistoryTypeId="2" PostId="1121" RevisionGUID="f1df5d29-fc7f-4d3e-b7e5-2356a0b29035" CreationDate="2010-07-22T07:08:15.473" UserId="662" Text="Personally, I would recommend [CEGUI](http://www.cegui.org.uk/). It's open source and pretty good. However, what you have to keep in mind is that it can be very, very verbose if you write out everything by hand.&#xD;&#xA;&#xD;&#xA;But, on the plus side, it has renderers for both OpenGL and DirectX. I managed to put it on top of the template I normally use, which writes to a texture directly using a VBO (it's kind of hacky).&#xD;&#xA;&#xD;&#xA;The game in question was for a networking assignment. The assignment was to have a networked game, with a lobby. I knew the lobby was going to be a pain in the neck to make, so I picked a library that did most of it for me." />
  <row Id="2081" PostHistoryTypeId="5" PostId="1120" RevisionGUID="c2868b5c-77f9-4828-923d-b3681f2d3309" CreationDate="2010-07-22T07:09:12.523" UserId="659" Comment="edited body" Text="Take note of the reply above about not spending too much time on a framework / tools/ engine.&#xD;&#xA;&#xD;&#xA;Then remove the word 'tools' from it!&#xD;&#xA;&#xD;&#xA;While it may be easy to spend way too much time on a well-engineered engine or over-ambitious tech-for-techs-sake, you really don't want to underestimate the importance of decent tools.&#xD;&#xA;&#xD;&#xA;They don't have to be high-tech or optimized - but they need to be stable and very usable. Especially if you're making a game that needs a decent amount of content, or where level design is key.&#xD;&#xA;&#xD;&#xA;And especially if you're working on a team of more than one. If your level-building tool sucks, even the best artists/designers out there will struggle to build good levels." />
  <row Id="2082" PostHistoryTypeId="2" PostId="1122" RevisionGUID="349b4a78-904c-4223-b5e7-676c71496060" CreationDate="2010-07-22T07:15:49.263" UserId="662" Text="What if you every action the player takes posts a message to the `AchievementManager`? Then the manager can check internally whether certain conditions have been met. First objects post messages:&#xD;&#xA;    &#xD;&#xA;    AchievementManager::PostMessage(&quot;Jump&quot;, &quot;162&quot;);&#xD;&#xA;&#xD;&#xA;    AchievementManager::PostMessage(&quot;Slice&quot;, &quot;Strawberry&quot;);&#xD;&#xA;    AchievementManager::PostMessage(&quot;Slice&quot;, &quot;Watermelon&quot;);&#xD;&#xA;&#xD;&#xA;    AchievementManager::PostMessage(&quot;Kill&quot;, &quot;Goomba&quot;);&#xD;&#xA;&#xD;&#xA;And then the `AchievementManager` checks if it needs to do anything:&#xD;&#xA;&#xD;&#xA;    if (!strcmp(m_Message.name, &quot;Slice&quot;) &amp;&amp; !strcmp(m_LastMessage.name, &quot;Slice&quot;))&#xD;&#xA;    {&#xD;&#xA;        if (!strcmp(m_Message.value, &quot;Watermelon&quot;) &amp;&amp; !strcmp(m_LastMessage.value, &quot;Strawberry&quot;))&#xD;&#xA;        {&#xD;&#xA;            // achievement unlocked!&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You'll probably want to do this with enumerations instead of strings though. ;) " />
  <row Id="2083" PostHistoryTypeId="2" PostId="1123" RevisionGUID="6e85aadb-d2f5-43d0-a8e4-c2f606cfc195" CreationDate="2010-07-22T07:17:40.913" UserId="13" Text="As of DirectX10, the usual functions to load a mesh in the .X-format are marked as deprecated and they are DX9 functions anyway. How can I load a mesh from the .X-format into an `ID3DX10Mesh` object using the SlimDX wrapper?&#xD;&#xA;" />
  <row Id="2084" PostHistoryTypeId="1" PostId="1123" RevisionGUID="6e85aadb-d2f5-43d0-a8e4-c2f606cfc195" CreationDate="2010-07-22T07:17:40.913" UserId="13" Text="How to load a mesh from the .X-format in DirectX10 via SlimDX?" />
  <row Id="2085" PostHistoryTypeId="3" PostId="1123" RevisionGUID="6e85aadb-d2f5-43d0-a8e4-c2f606cfc195" CreationDate="2010-07-22T07:17:40.913" UserId="13" Text="&lt;c#&gt;&lt;3d-meshes&gt;&lt;directx&gt;&lt;directx10&gt;&lt;slimdx&gt;" />
  <row Id="2086" PostHistoryTypeId="2" PostId="1124" RevisionGUID="dbf36ce3-f941-418d-927a-a70531123097" CreationDate="2010-07-22T07:20:58.363" UserId="51" Text="**CrazyBump**&#xD;&#xA;&#xD;&#xA;http://www.crazybump.com/&#xD;&#xA;&#xD;&#xA;Creates normal maps from textures&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;$299 per seat for commercial use (volume discounts available)&#xD;&#xA;&#xD;&#xA;Commercial, has demo available&#xD;&#xA;&#xD;&#xA;CrazyBump is the de-facto way of creating normal maps given just straight materials.  Has a lot of adjustment sliders that you can tweak in real time.  The video on the web site gives a good impression of its capabilities." />
  <row Id="2087" PostHistoryTypeId="16" PostId="1124" RevisionGUID="dbf36ce3-f941-418d-927a-a70531123097" CreationDate="2010-07-22T07:20:58.363" UserId="-1" />
  <row Id="2088" PostHistoryTypeId="2" PostId="1125" RevisionGUID="b010243e-9627-45d6-a824-2905b98cc42c" CreationDate="2010-07-22T07:21:55.443" UserId="450" Text="It is possible to limit the speed at which new resources are added to the game. For example limit the number of gold a player can dig per day. A less obvious limit is to apply luck to random events. If a player has lots of karma it is likely that he gets drops, but the karma is used up and has to be renewed by doing quests." />
  <row Id="2089" PostHistoryTypeId="2" PostId="1126" RevisionGUID="f27fabd8-7fad-4893-97a7-09523555b758" CreationDate="2010-07-22T07:22:12.993" UserId="250" Text="These are from Apple's documentation references on OpenGL but every little bit helps right? ;)&#xD;&#xA;&#xD;&#xA;[OpenGL Performance Optimization : The Basics][1]  &#xD;&#xA;[Optimizing OpenGL Data Throughput on OS X][2]  &#xD;&#xA;&#xD;&#xA;(This last one is a sample application)  &#xD;&#xA;[Vertex Optimization][3]&#xD;&#xA;&#xD;&#xA;There are also a very large number of videos available on the subject (Also from Apple) that talk about OpenGL extensions. Some of them are OS X specific, but a few others are more generalized and could most likely be applied to Windows and Linux.&#xD;&#xA;&#xD;&#xA;You can find the videos [here][4]. You do require iTunes and an Apple account to view them however (but they are free! :D)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/mac/library/technotes/tn2004/tn2093.html&#xD;&#xA;  [2]: http://developer.apple.com/graphicsimaging/opengl/optimizingdata.html&#xD;&#xA;  [3]: http://developer.apple.com/mac/library/samplecode/Vertex_Optimization/Introduction/Intro.html&#xD;&#xA;  [4]: http://developer.apple.com/videos/wwdc/2010/" />
  <row Id="2090" PostHistoryTypeId="16" PostId="1126" RevisionGUID="f27fabd8-7fad-4893-97a7-09523555b758" CreationDate="2010-07-22T07:22:12.993" UserId="-1" />
  <row Id="2091" PostHistoryTypeId="2" PostId="1127" RevisionGUID="30f6edfe-2988-4dac-8bb9-095a82a13497" CreationDate="2010-07-22T07:24:33.157" UserId="662" Text="Well, it really, really depends on what you're planning to do, but here are the basics:&#xD;&#xA;&#xD;&#xA;* Your CPU is very precious while your GPU is a hungry beast. Offset as much as you can to the GPU. Nowadays you can do this with excellent libraries like OpenCL, CUDA and Thrust.&#xD;&#xA;&#xD;&#xA;* Do your lighting in a shader. Not only will this help retain your sanity, but it allows you to very cool things like toon shaders and [deferred lighting](http://en.wikipedia.org/wiki/Deferred_shading).&#xD;&#xA;&#xD;&#xA;* Particles suck. Even when using OpenGL point sprites." />
  <row Id="2092" PostHistoryTypeId="16" PostId="1127" RevisionGUID="30f6edfe-2988-4dac-8bb9-095a82a13497" CreationDate="2010-07-22T07:24:33.157" UserId="-1" />
  <row Id="2093" PostHistoryTypeId="2" PostId="1128" RevisionGUID="fffec30b-eaf8-467d-99e0-c655efb19121" CreationDate="2010-07-22T07:26:22.063" UserId="666" Text="I have been using the OpenGL ES on the iphone for a while now and basically i feel pretty lost outside to the small set of commands i've seen in examples and adopted as my own. I would love to use OpenGL in other platforms and have a good understanding of it.&#xD;&#xA;&#xD;&#xA;Every time i search for a book I find this HUGE bibles that seem uninteresting and very hard for a beginner. If I had a couple of weekends to spend on learning OpenGL what would be the best way to spend my time(and money)?&#xD;&#xA;" />
  <row Id="2094" PostHistoryTypeId="1" PostId="1128" RevisionGUID="fffec30b-eaf8-467d-99e0-c655efb19121" CreationDate="2010-07-22T07:26:22.063" UserId="666" Text="What is the best way to learn Open GL?" />
  <row Id="2095" PostHistoryTypeId="3" PostId="1128" RevisionGUID="fffec30b-eaf8-467d-99e0-c655efb19121" CreationDate="2010-07-22T07:26:22.063" UserId="666" Text="&lt;opengl&gt;" />
  <row Id="2096" PostHistoryTypeId="4" PostId="1072" RevisionGUID="39b054d3-c553-40a7-ba63-f9fb1edc80e4" CreationDate="2010-07-22T07:26:39.003" UserId="51" Comment="edited title" Text="How public should you make your betas?" />
  <row Id="2097" PostHistoryTypeId="5" PostId="366" RevisionGUID="0c0bd6a8-51b9-4227-9ced-6eced28b7a16" CreationDate="2010-07-22T07:28:18.593" UserId="13" Comment="added 32 characters in body; edited tags; edited title; deleted 5 characters in body" Text="I want to load a mesh into my game (written in C#, if this matters) but am not sure what mesh format to use. What mesh formats are there, how easy/hard it is to load them into DirectX10 and what's the difference between those formats?&#xD;&#xA;&#xD;&#xA;Or is it best to write my own mesh format?" />
  <row Id="2098" PostHistoryTypeId="4" PostId="366" RevisionGUID="0c0bd6a8-51b9-4227-9ced-6eced28b7a16" CreationDate="2010-07-22T07:28:18.593" UserId="13" Comment="added 32 characters in body; edited tags; edited title; deleted 5 characters in body" Text="What 3d mesh formats usable with DirectX10 are there?" />
  <row Id="2099" PostHistoryTypeId="6" PostId="366" RevisionGUID="0c0bd6a8-51b9-4227-9ced-6eced28b7a16" CreationDate="2010-07-22T07:28:18.593" UserId="13" Comment="added 32 characters in body; edited tags; edited title; deleted 5 characters in body" Text="&lt;c#&gt;&lt;3d-meshes&gt;&lt;.net&gt;&lt;directx10&gt;" />
  <row Id="2100" PostHistoryTypeId="2" PostId="1129" RevisionGUID="4812a9bf-abc9-48b4-a25e-26d0700a3d17" CreationDate="2010-07-22T07:28:43.960" UserId="259" Text="This may be overkill for your solution, but think of routing backwards instead of forwards. &#xD;&#xA;&#xD;&#xA;In a TD game, the enemies are generally trying to get to a specific goal.  Route backwards from that goal to the first enemy, then cache that path.  On path generation for subsequent enemies, use the first path as a starting point, and so on. If you have multiple enemy entrace points, or multiple goals, have a range of pre-cached paths to start from.&#xD;&#xA;" />
  <row Id="2101" PostHistoryTypeId="6" PostId="1128" RevisionGUID="0e2a5755-cf7d-4cee-ac66-b9fa0f9dc495" CreationDate="2010-07-22T07:30:02.990" UserId="51" Comment="edited tags" Text="&lt;opengl&gt;&lt;learning&gt;" />
  <row Id="2102" PostHistoryTypeId="2" PostId="1130" RevisionGUID="6df63c8d-4a78-446c-8f76-8792f97ed3ef" CreationDate="2010-07-22T07:33:46.973" UserId="667" Text="Flash is the dominant engine to develop social games.  While I don't think this will change in the near future, what technologies do you see most transformative in this space and do you believe games that require a proprietary plugin can reach the scale of a game like Farmville or is the acquisition friction simply too high?" />
  <row Id="2103" PostHistoryTypeId="1" PostId="1130" RevisionGUID="6df63c8d-4a78-446c-8f76-8792f97ed3ef" CreationDate="2010-07-22T07:33:46.973" UserId="667" Text="Social Gaming Beyond Flash?" />
  <row Id="2104" PostHistoryTypeId="3" PostId="1130" RevisionGUID="6df63c8d-4a78-446c-8f76-8792f97ed3ef" CreationDate="2010-07-22T07:33:46.973" UserId="667" Text="&lt;flash&gt;&lt;social&gt;" />
  <row Id="2105" PostHistoryTypeId="2" PostId="1131" RevisionGUID="84b1c82f-1665-432d-ab68-c43bb3e3c8b8" CreationDate="2010-07-22T07:35:23.693" UserId="659" Text="**Genetica** (Spiral Graphics)&#xD;&#xA;&#xD;&#xA;http://www.spiralgraphics.biz/genetica.htm&#xD;&#xA;&#xD;&#xA;2D - Texture creation tool&#xD;&#xA;&#xD;&#xA;OS: Windows&#xD;&#xA;&#xD;&#xA;Cost: $149-$899, Demo available&#xD;&#xA;&#xD;&#xA;Tool for creating seamless tiling textures (synthesized from photos, or procedurally generated), normal maps, and HDRI environment maps" />
  <row Id="2106" PostHistoryTypeId="16" PostId="1131" RevisionGUID="84b1c82f-1665-432d-ab68-c43bb3e3c8b8" CreationDate="2010-07-22T07:35:23.693" UserId="-1" />
  <row Id="2107" PostHistoryTypeId="2" PostId="1132" RevisionGUID="f1e9ec4a-a89d-4fc4-887c-5e03c6a8597f" CreationDate="2010-07-22T07:36:18.810" UserId="162" Text="Several of the above answers mention some important ways to reduce inflation but there's a few important money sinks that deserve some more explanation:&#xD;&#xA;&#xD;&#xA; - Economic exchange fees: These are fees from converting a player's wealth from one form to another. A prime example of this in nearly every game is the vendor sell price. NPC vendors will always pay less than a good is &quot;worth&quot;, and in the process players lose a lot of economic value. Players also lose value by using the auction house (posting fees), or enchanting items. You could also charge a fee for mailing items (a twinking fee) without too much complaining I suspect. These fees are great because the player will normally 100% accept them as the price of doing business, as they mirror real world financial transactions.&#xD;&#xA;&#xD;&#xA; - Death Penalty: Many many games (WoW included) take a tax whenever a player dies, often as item repair fees. These fees are great because they help provide players an incentive to not die while not being as prohibitively painful as XP loss or flat out item destruction.&#xD;&#xA;&#xD;&#xA; - Developer-run auctions/lottos: I haven't seen too many games do this, but one way to automatically reduce inflation is to provide some sort of valuable auction that players can bid on, but which is actually run by the developer (so 100% of the value is removed instead of transferred to another player). For instance, you could auction off naming rights for a street in town to the highest-paying guild, or a statue placement, or anything you want. The best part of this is that the cost should automatically adjust to match available player wealth, with no effort on the developer's end. Kingdom of loathing has removed tons of money from the economy in a similar by using a lotto system (100 gold to buy a ticket, can buy as many as you want) for rare aesthetic items." />
  <row Id="2108" PostHistoryTypeId="5" PostId="1124" RevisionGUID="049b7a30-cdf9-44f7-94f9-dac881a9c7a3" CreationDate="2010-07-22T07:37:55.823" UserId="51" Comment="added 49 characters in body" Text="**CrazyBump**&#xD;&#xA;&#xD;&#xA;http://www.crazybump.com/&#xD;&#xA;&#xD;&#xA;Creates normal maps, spec maps, ambient occlusion data, etc. from flat textures.  &#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;$299 per seat for commercial use (volume discounts available)&#xD;&#xA;&#xD;&#xA;Commercial, has demo available&#xD;&#xA;&#xD;&#xA;CrazyBump is the de-facto way of creating normal maps given just straight materials.  Has a lot of adjustment sliders that you can tweak in real time.  The video on the web site gives a good impression of its capabilities." />
  <row Id="2109" PostHistoryTypeId="2" PostId="1133" RevisionGUID="2be51c58-a5f3-42b3-a5a8-c621783bb9e3" CreationDate="2010-07-22T07:42:53.347" UserId="259" Text="    // in entity_a's code:&#xD;&#xA;    entity_b-&gt;takeDamange();&#xD;&#xA;&#xD;&#xA;You asked how comercial games do it. ;)" />
  <row Id="2110" PostHistoryTypeId="2" PostId="1134" RevisionGUID="462d6548-0623-447d-b9d7-612e16cd765a" CreationDate="2010-07-22T07:43:29.900" UserId="614" Text="Possibly HTML5. &#xD;&#xA;&#xD;&#xA;It will work on new web browsers (current web browsers are still work-in-progress) and it'll make it simple to work on mobile phone (where Flash isn't embedded)." />
  <row Id="2111" PostHistoryTypeId="2" PostId="1135" RevisionGUID="a6ac3fdc-767e-4a71-b0e1-fb101a0ddd1f" CreationDate="2010-07-22T07:45:54.417" UserId="662" Text="If you want to learn about the actual physics involved, I would recommend this book: [Mathematics for 3D Game Programming and Computer Graphics, Second Edition](http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Development/dp/1584502770/ref=dp_cp_ob_b_title_2)&#xD;&#xA;&#xD;&#xA;It describes everything from raycasting to box collisions to realistic trajectories. I have had it for three years now and it has never let me down." />
  <row Id="2112" PostHistoryTypeId="2" PostId="1136" RevisionGUID="ccd225cb-ed7e-46cf-9330-53ccfcee9409" CreationDate="2010-07-22T07:46:36.630" UserId="162" Text="HTML5/javascript may be the future of social gaming. Flash has a few issues right now that could conceivably get worse. Namely, it has security issues and does not work on apple mobile devices. In theory there is no reason you could not implement a game such as FarmVille ENTIRELY within the browser as opposed to using a flash plugin, but the market penetration for HTML5 browsers is not quite high enough.&#xD;&#xA;&#xD;&#xA;3 years from now it is very possible that people will be moving away from flash, the way people eventually moved away from Shockwave and other such technologies. Entirely native browser experiences will eventually beat out plugins, but it may take a more time than expected." />
  <row Id="2113" PostHistoryTypeId="2" PostId="1137" RevisionGUID="c9006eab-bab2-4cbe-8e54-2c44d050fd7d" CreationDate="2010-07-22T07:46:45.163" UserId="659" Text="A few years back it was looking like COLLADA was going to be quite a big thing, maybe at last a fairly standardized format for getting 3D assets from a DCC package into the tools pipeline of a game. And it looked like a good option for an indie developer that didn't want to lock themselves into a single 3D package by writing custom export plugins.&#xD;&#xA;&#xD;&#xA;But I've not heard much about it recently. And Feeling Software, who had supported the format with their Max/Maya exporters and FCollada lib appear to have withdrawn any free versions of those tools.&#xD;&#xA;&#xD;&#xA;Is COLLADA seeing much use these days? Are there any free/inexpensive libs/tools to assist in dealing with the format, or are people just reading the raw XML themselves?&#xD;&#xA;&#xD;&#xA;Or is there a better option these days - say for an indie developer that wants to get models/animation from potentially Max, Maya, or Blender into their engine? - FBX? Something else?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2114" PostHistoryTypeId="1" PostId="1137" RevisionGUID="c9006eab-bab2-4cbe-8e54-2c44d050fd7d" CreationDate="2010-07-22T07:46:45.163" UserId="659" Text="What happened to COLLADA?" />
  <row Id="2115" PostHistoryTypeId="3" PostId="1137" RevisionGUID="c9006eab-bab2-4cbe-8e54-2c44d050fd7d" CreationDate="2010-07-22T07:46:45.163" UserId="659" Text="&lt;assets&gt;&lt;tools&gt;&lt;3d-meshes&gt;&lt;collada&gt;" />
  <row Id="2116" PostHistoryTypeId="2" PostId="1138" RevisionGUID="ecfd86cf-d05e-45ef-9d00-a3a9b201e474" CreationDate="2010-07-22T07:47:19.860" UserId="673" Text="Well I have been told over and over that nehe's tutorials are the best, I guess they'll fit for you too !&#xD;&#xA;http://nehe.gamedev.net/&#xD;&#xA;I bought the red book..." />
  <row Id="2117" PostHistoryTypeId="6" PostId="1072" RevisionGUID="a527b577-aa73-4c02-a6a1-b71d044ac46c" CreationDate="2010-07-22T07:47:21.810" UserId="162" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;beta&gt;" />
  <row Id="2118" PostHistoryTypeId="2" PostId="1139" RevisionGUID="0b7278e9-5b7a-401d-a697-172d16f73d5c" CreationDate="2010-07-22T07:47:52.383" UserId="662" Text="The best way to learn OpenGL is to use it. I would recommend writing your own engine. This may seem like a daunting task, and it is. Your first engine won't be very good, but you'll have learned a lot.&#xD;&#xA;&#xD;&#xA;Basically: write an engine, use it for a game, figure out what you don't like about it and rewrite it. Keep doing that and you'll get better at OpenGL. :)" />
  <row Id="2119" PostHistoryTypeId="2" PostId="1140" RevisionGUID="405245e9-796a-4b21-8523-c0159b9bb7bd" CreationDate="2010-07-22T07:49:01.413" UserId="259" Text="A more serious answer:&#xD;&#xA;&#xD;&#xA;I've seen blackboards used a lot. Simple versions are nothing more than struts that are updated with things like an entity's HP, which entities can then query. &#xD;&#xA;&#xD;&#xA;Your blackboards can either be the world's view of this entity (ask B's blackboard what its HP is), or an entity's view of the world (A queries its blackboard to see what the HP of A's target is).&#xD;&#xA;&#xD;&#xA;If you only update the blackboards at a sync point in the frame, you can then read from them at a later point from any thread, making multithreading pretty simple to implement.&#xD;&#xA;&#xD;&#xA;More advanced blackboards may be more like hashtables, mapping strings to values. This is more maintainable but obviously has a run-time cost.&#xD;&#xA;&#xD;&#xA;A blackboard is traditionally only one-way communication - it wouldn't handle the dishing out of damage." />
  <row Id="2120" PostHistoryTypeId="2" PostId="1141" RevisionGUID="2d93a044-3719-4e68-a757-c22c661092b2" CreationDate="2010-07-22T07:49:44.080" UserId="102" Text="I needed to solve a similar problem: pathfinding on a large maze-like grid with constantly changing &quot;costs&quot; and barriers.&#xD;&#xA;&#xD;&#xA;The thing is, in tower defense game the number of entities that need to have the path solved for them is usually much larger than the number of nodes in the graph. A* is **not** the most appropriate algorithm for handling this, because you'll need to solve it anew each time something is changed. Well it is appropriate if you need to find only one path, but in my case I needed to be able to handle entities which can appear in different locations and each has its own path.&#xD;&#xA;&#xD;&#xA;The [Floyd-Warshall][1] algorithm is far more appropriate, though for my issue I wrote a custom algorithm that whenever a node changes, it re-calculates the cost to that node from all its neighbors, and then *if* the neighbors have been changed then it does it recursively for them.&#xD;&#xA;&#xD;&#xA;So in the beginning of the game, I just fire up this algorithm on all my &quot;goal&quot; nodes. Then, whenever a single node changes (for example, because un-passable), I just fire it up on that node and the change is propagated to all the nodes that will be affected, and then stopped. So no need for global recalculation, and the algorithm is completely independent from the number of entities that will require pathfinding.&#xD;&#xA;&#xD;&#xA;So my algorithm was basically something like:&#xD;&#xA;&#xD;&#xA;    update_node(Node n)&#xD;&#xA;        old &lt;- my_score&#xD;&#xA;        find neighbor Node among all neighbors such that&#xD;&#xA;            neighbor.score + distance_to(neighbor) is minimal&#xD;&#xA;        my_score = neighbor.score + distance_to(neighbor)&#xD;&#xA;        next_node = neighbor&#xD;&#xA;        if (my_score != old)&#xD;&#xA;            for each neighbor&#xD;&#xA;                update_node(neighbor)&#xD;&#xA;&#xD;&#xA;With the initial score depending on whether the node is a target or some kind of barrier.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm" />
  <row Id="2121" PostHistoryTypeId="2" PostId="1142" RevisionGUID="6d379a3b-0f69-43a9-97a4-bf4813ab9187" CreationDate="2010-07-22T07:51:48.757" UserId="20" Text="**1. There is no general best practice.** &#xD;&#xA;&#xD;&#xA;If you got a lot of (complex shaped) elements, particles etc. in your game, the bitmap buffer approach is going to be *much* faster. The bitmap buffer will also scale better with increasing complexity of your sprites. The vector renderer *will* become slower with more complex shapes or tween (shape tween) animations, it has some other benefits though: &#xD;&#xA;&#xD;&#xA; - You can freely scale your assets or even zoom into the scene without loss of quality.&#xD;&#xA; - Rotation or other transformations like skewing will be much easier to perform on vector graphics&#xD;&#xA;&#xD;&#xA;So in conclusion, it boils down to what kind of game you're building.&#xD;&#xA;&#xD;&#xA;**2. Using MovieClips instead of bitmap sprite-sheets**&#xD;&#xA;&#xD;&#xA;I guess you meant &quot;bitmap sprite-sheets&quot; and not the AS3 *Sprite* class?&#xD;&#xA;&#xD;&#xA;This doesn't make a difference, really. You can always turn your MovieClip based animations into animated bitmaps. Either manually, [by exporting the movie to frames and turn them into a sprite-sheet][1], or dynamically, by rendering a sprite sheet from your MovieClip at runtime. Here's how I would do this:&#xD;&#xA;&#xD;&#xA; 1. Create an instance of the MovieClip and `stop()` it.&#xD;&#xA; 2. Create a `new BitmapData` object with the same width and height as the Movieclip.&#xD;&#xA; 3. Use the [draw()][2] method, to render the MovieClip to the BitmapData.&#xD;&#xA; 4. Store the BitmapData object in an Array or Vector.&#xD;&#xA; 5. Go to the next frame of your MovieClip and repeat Steps 2 - 4, do this until you reached the last frame of your MovieClip. It's also a good idea to update two variables with the *max width* and *max height* of your MovieClip frames (since these can change from frame to frame).&#xD;&#xA; 6. Now you can combine all the stored BitmapData Objects into a Sprite-Sheet (use [BitmapData.copyPixels()][3])&#xD;&#xA;&#xD;&#xA;**3. Sprite-based animations**&#xD;&#xA;&#xD;&#xA;As mentioned in the answer to your first question, there's no definite answer to that. If you need to perform a lot of transformations with your objects, eg. *scaling* and *rotating* you're probably better off by using the flash native renderer. If you got pre-defined animations that can be baked to sprite-sheets (manually or dynamically), **and** if you need to display hundreds of sprites at the same time, then go for a bitmap-rendering engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/335/what-is-a-good-tool-for-producing-animated-sprites/385#385&#xD;&#xA;  [2]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html?allClasses=1#draw%28%29&#xD;&#xA;  [3]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html?allClasses=1#copyPixels%28%29" />
  <row Id="2122" PostHistoryTypeId="2" PostId="1143" RevisionGUID="f6d3fde4-3ed3-42c8-a2ed-51f25b58aa59" CreationDate="2010-07-22T07:57:55.653" UserId="659" Text="For proper 2D pixelling, I've never seen anything on PC that's a match for the Amiga DPaint series :(&#xD;&#xA;&#xD;&#xA;The number one feature missing from most modern art software is the ability to see two different zoom levels at once (zoomed in close, and maybe a 2x-3x zoom, so see something close to 'actual pixels' at the game's target resolution)&#xD;&#xA;&#xD;&#xA;The number two feature - it may seem a bit too picky - but I've never seen a PC mouse pointer move as smoothly as the Amiga mouse pointer. Even with a high-end 'gaming mouse' claiming silly numbers of DPI and Hz...&#xD;&#xA;&#xD;&#xA;Just rose tinted glasses?  That and that pixel art always looked sweeter on CRT screens, which we were all using back in those days?...&#xD;&#xA;" />
  <row Id="2123" PostHistoryTypeId="2" PostId="1144" RevisionGUID="8ba390e6-51e1-427e-a820-c9a7882bd6aa" CreationDate="2010-07-22T07:59:11.937" UserId="162" Text="I went to a [GDC session][1] this year presented by the guys at sucker punch, discussing how they handled assisted aim and movement for inFamous. My understanding is that Halo uses a very similar system for assisted aiming, and here's the basics:&#xD;&#xA;&#xD;&#xA; - When you hit a button to fire, the shot should always go directly where the reticle is pointing. Otherwise, players would notice any artificial &quot;snapping&quot; and feel like they are not in control. But, the analog stick of a modern console is NOT accurate enough to be depended on, no matter what the skill of the player is. So, you need to do the assist before the point of pressing fire. &#xD;&#xA; - The game has an idea of plausible targets for you to be adjusting your reticle towards, and can weight them appropriately based on your suitability of target as well as the direction you are moving your analog stick. Then when you push a stick towards a valid target it will adjust the game's perceived input to point towards the likely target. Vitally, these adjustments never change the input past what would be physically possible on the controller.&#xD;&#xA; - When passing directly over a target it slows down the reticle speed, giving you more time to accurately press a shot. Also it keeps track of your recent movement and button presses, and if the reticle EVER passed over the target and it was within a certain time delta it registers a hit on the target, as you could have theoretically pressed the button at that point and the controller missed it.&#xD;&#xA; - Finally if there's no valid target around, the reticle controls completely manually, allowing the player full control.&#xD;&#xA;&#xD;&#xA;There are two things that make aiming &quot;feel good&quot;: You need to feel like you're in control, and you need to feel like the game is not lying to you. Adjusting the game's perception of input direction and button timing within tolerances is a great way to do this, as it NEVER results in an impossible situation where the auto aiming is actually performing better than a theoretically perfect controller. If you try to solve it ad-hoc after the input processing is complete you're going to end up with some sketchy situations where the player feels like they have lost control.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://doublebuffered.com/2010/03/21/gdc-2010-reading-the-players-mind-through-his-thumbs-inferring-player-intent-through-controller-input/" />
  <row Id="2124" PostHistoryTypeId="2" PostId="1145" RevisionGUID="c189419e-180e-4dd1-a32c-d9deea57e74a" CreationDate="2010-07-22T08:01:02.400" UserId="674" Text="As already answered, for &quot;classical&quot; social games (in the same way that the current FarmVille and Zynga games), the future is probably something between Flash and HTML5/JS. For example, another popular title from Zynga, Mafia Wars, is designed in HTML and JavaScript. Also, the web-based version of HOMM, Heroes of Might and Magic Kingdoms (by Ubisoft) is mixed Flash and HTML/JS. Technically, this is pretty much awesome.&#xD;&#xA;&#xD;&#xA;But as the social games market is growing, more and more &quot;big&quot; entertainment companies will invest in this area. The main issue for them is regarding workflows and pipelines. Most of those companies are used to 3D games, which means they are employing peoples who design 3D stuff, and program 3D stuff. And those peoples are usually not the same that creates 2D graphics, animations and engines used in &quot;classical&quot; social games.&#xD;&#xA;&#xD;&#xA;Also, those companies are tooled for what they do - 3D &quot;AAA&quot; games. They have pipelines regarding those tools. They have proprietary engines to fasten development. They have knowledge and expertise in those fields. But not in the totally different environment of &quot;classical&quot; social games, centered around Flash and web programming.&#xD;&#xA;&#xD;&#xA;There is two approaches for them, and I think it is a good guess to expect them to go in both. The first one is to hire talented 2D-graphic, programming and designers peoples, and open up new teams, built for this kind of challenge. The other one is to change the way social gaming is designed.&#xD;&#xA;&#xD;&#xA;This is the main reason for the success of Unity, which is a (quite powerful) 3D engine and game development platform for both in-browser applications, Apple devices and PC/Mac. It allows those companies to reuse their people, workflows and tools in this new environment, as well as create &quot;new generation&quot; social games, that may look more appealing to their customers.&#xD;&#xA;&#xD;&#xA;I think that in the mid-term future, classical games and social games are going to meet, and there will be &quot;hardcore&quot; social games, as well as &quot;casual&quot; classical games. And technology between the two are going to be close." />
  <row Id="2125" PostHistoryTypeId="5" PostId="1139" RevisionGUID="187f1e39-e292-4dc3-b3e7-916e2418dd0d" CreationDate="2010-07-22T08:07:08.453" UserId="662" Comment="added 363 characters in body" Text="The best way to learn OpenGL is to use it. I would recommend writing your own engine. This may seem like a daunting task, and it is. Your first engine won't be very good, but you'll have learned a lot.&#xD;&#xA;&#xD;&#xA;Basically: write an engine, use it for a game, figure out what you don't like about it and rewrite it. Keep doing that and you'll get better at OpenGL. :)&#xD;&#xA;&#xD;&#xA;What you will need:&#xD;&#xA;&#xD;&#xA;* Some way to load models (.obj)&#xD;&#xA;* Some way to load textures&#xD;&#xA;* Lighting, either in the fixed function pipeline or in a shader&#xD;&#xA;* For any slightly more complex scenes than a teapot on the screen, a scene graph&#xD;&#xA;* Lots of tiny tools (3d vector class, quaternion class, camera class, scene manager, etc)&#xD;&#xA;&#xD;&#xA;This is already a lot of work." />
  <row Id="2126" PostHistoryTypeId="2" PostId="1146" RevisionGUID="4fdfb03c-3103-4645-a227-81f61525c903" CreationDate="2010-07-22T08:13:44.820" UserId="673" Text="I'm a very beginner in game making, and I was impressed to manage to make something out of pygame so quickly and easily.&#xD;&#xA;Python + &lt;awesome 2d lib&gt; SDL = easiness assured." />
  <row Id="2127" PostHistoryTypeId="2" PostId="1147" RevisionGUID="e3834dd6-0fc3-41a5-88c6-7496701d1d21" CreationDate="2010-07-22T08:14:50.167" UserId="274" Text="Be careful when you look at OpenGL tutorials, because many of them (NeHe) included just teach you things that you shouldn't do anymore. Todays OpenGL is a different beast that it was 10 years ago.&#xD;&#xA;&#xD;&#xA;Some nice examples avoiding the deprecated stuff can be found here:&#xD;&#xA;http://www.g-truc.net/post-tech-content-sample.html&#xD;&#xA;&#xD;&#xA;&gt; The OpenGL Samples Pack 4.0.1.0 is an update that brings the number of samples to a total of 58 samples; including 13 OpenGL 4 samples, 33 OpenGL 3.3 samples and 12 OpenGL 2 samples for Visual Studio 2008 and 2010 in 32 and 64 bits.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2128" PostHistoryTypeId="2" PostId="1148" RevisionGUID="a9c1c8c0-a5f1-4a3d-9d22-ba8729da2332" CreationDate="2010-07-22T08:25:04.167" UserId="662" Text="[Game Maker](http://www.yoyogames.com) is very cool, it basically does everything you've described. It has drag and drop icons for beginners and code for advanced users. However, after having used C++ exclusively for over a year, going back to Game Maker was... painful. &#xD;&#xA;&#xD;&#xA;Downsides:&#xD;&#xA;&#xD;&#xA;* No user defined data structures (nothing like C structs or C++ classes, just &quot;objects&quot;)&#xD;&#xA;* Dynamically typed (type &quot;varAwesome = 0&quot; and oh my god it just appeared)&#xD;&#xA;* YoYo Games is evil&#xD;&#xA;&#xD;&#xA;Upsides:&#xD;&#xA;&#xD;&#xA;* Easy to use, hard to master&#xD;&#xA;* Does a lot of low level stuff for you&#xD;&#xA;* Vibrant and active community&#xD;&#xA;&#xD;&#xA;I started making games using Game Maker in 2002. :)" />
  <row Id="2129" PostHistoryTypeId="2" PostId="1149" RevisionGUID="d4e25053-9177-4978-a433-40d7a5234c7d" CreationDate="2010-07-22T08:26:35.270" UserId="371" Text="As usual the best way to learn is to do it. I would hold off on spending money unless you feel you really benefit from having a textbook to read from, most (if not all) information can be found online. On top of learning OpenGL you may want to brush up on your Linear Algebra as well, it never hurts.&#xD;&#xA;&#xD;&#xA;The big issue I faced is a lot of stuff that's out there has been depricated in recent version of OpenGL.&#xD;&#xA;&#xD;&#xA;The best resource I've been able to find has been at [Joe's Blog][1]. It does it's best to introduce the modern pipeline and get you through some examples in a more readable fashion than what I've been able to find elsewhere. It seems [Nehe][2] has been getting a couple updated recently and while their lessons are still old, some of the news may be of interest. [Lazy Foo'][3] was also a great resource, but like Nehe it's tutorials use depricated material.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html&#xD;&#xA;  [2]: http://nehe.gamedev.net/&#xD;&#xA;  [3]: http://lazyfoo.net/SDL_tutorials/index.php" />
  <row Id="2130" PostHistoryTypeId="2" PostId="1150" RevisionGUID="1ef76b8a-d2d3-48d8-a714-50f8a65274c7" CreationDate="2010-07-22T08:26:42.823" UserId="419" Text="Everything in one repository, if you can afford it in terms of size. I've heard of Subversion repositories in the vicinity of 1 TB. We are currently a bit below 400 GB.&#xD;&#xA;&#xD;&#xA;Also, artists much check in everything, including the 30 rough outlines of a concept; we use separate folder trees for &quot;source assets&quot; and for &quot;exported&quot; - the ones that go into the asset build script. If your artist is hit by a bus tomorrow, you need to be able to have someone continue work on his assets the next day, only looking through the repository (no archeology on his personal machine). Once upon a time when games were 2D and sprites were prerendered from complex animated Max scenes, we had to ship a bunch of units in an RTS game with a bit crappy, and very inconsistent look (vs. the rest of the units), even though it was a matter of re-rendering with slightly different lighting and antialiasing settings - because the original artist had quit, and we didn't have his original Max scenes. Don't let this happen to you." />
  <row Id="2131" PostHistoryTypeId="5" PostId="1149" RevisionGUID="6a0830bc-b7ee-4958-87a1-2236d912f465" CreationDate="2010-07-22T08:31:38.987" UserId="371" Comment="added another para" Text="As usual the best way to learn is to do it. I would hold off on spending money unless you feel you really benefit from having a textbook to read from, most (if not all) information can be found online. On top of learning OpenGL you may want to brush up on your Linear Algebra as well, it never hurts.&#xD;&#xA;&#xD;&#xA;The big issue I faced is a lot of stuff that's out there has been depricated in recent version of OpenGL.&#xD;&#xA;&#xD;&#xA;The best resource I've been able to find has been at [Joe's Blog][1]. It does it's best to introduce the modern pipeline and get you through some examples in a more readable fashion than what I've been able to find elsewhere. It seems [Nehe][2] has been getting a couple updated recently and while their lessons are still old, some of the news may be of interest. [Lazy Foo'][3] was also a great resource, but like Nehe it's tutorials use depricated material.&#xD;&#xA;&#xD;&#xA;I think after a weekend or 2, once you get comfortable go off and do a small project to apply everything. Breakout, or tetris - something where you can concentrate on the code itself. You learn so much more when you go off and try to do an actual project, regardless of how simple.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html&#xD;&#xA;  [2]: http://nehe.gamedev.net/&#xD;&#xA;  [3]: http://lazyfoo.net/SDL_tutorials/index.php" />
  <row Id="2132" PostHistoryTypeId="5" PostId="1113" RevisionGUID="e0c8fd58-8ac3-4dfa-b9f8-45f96f3e38d7" CreationDate="2010-07-22T08:37:15.870" UserId="644" Comment="added 18 characters in body" Text="In fact, Qt widgets can be integrated with OpenGL and OpenGL can be easily integrated with Qt (QGLWidget). Of course, the platform native looking widgets might not be exactly what you are looking for, but do not worry, there are ways to customize them, create your own or use something else which would better suit your needs, such as Qt Quick (which you should be able to integrate as well).&#xD;&#xA;&#xD;&#xA;If you are interested, do not miss these links: [Widgets enter the third dimension: WolfenQt][1] and [Accelerate your widgets with OpenGL][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://labs.trolltech.com/blogs/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/&#xD;&#xA;  [2]: http://labs.trolltech.com/blogs/2008/06/27/accelerate-your-widgets-with-opengl/" />
  <row Id="2133" PostHistoryTypeId="2" PostId="1151" RevisionGUID="e6413815-6d3d-4a35-ba01-bf193124e8f5" CreationDate="2010-07-22T08:55:31.207" UserId="675" Text="maybe [this][1] helps.&#xD;&#xA;&#xD;&#xA;[1]: http://scapecode.com/2009/11/slimdx-direct3d10-x-loader/" />
  <row Id="2134" PostHistoryTypeId="2" PostId="1152" RevisionGUID="d26f5e73-4748-4ed9-881f-5fdbbd3886c0" CreationDate="2010-07-22T09:00:42.973" UserId="323" Text="One crucial aspect that I don't see people mentioning here: make sure you have at least one money sink that scales up automatically as people get richer. Fees for walking around the world and armor repair won't scale up, since they're based on fixed values.&#xD;&#xA;&#xD;&#xA;Special novelty items that you can buy for large amounts of gold *do* scale up, in an economic sense, because as more money floods into the world people will buy more of them. However, this has a firm upper limit, and if *way* too much money floods in, they'll stop scaling.&#xD;&#xA;&#xD;&#xA;The standard scaling-money-sink is auction/market fees. Charge a percentage of the purchase on every successful auction. If people have ten times as much money, then auctioned items will go for ten times as much thanks to supply/demand, and your money sink will pull ten times as much cash out of the economy. Since money sources are almost always constant, this can easily serve to keep a lid on the economy.&#xD;&#xA;&#xD;&#xA;You do have to ensure that people buy and sell things regularly, however - trade skills and consumable items (including gear enchants and gems, in the WoW model) are necessary for this." />
  <row Id="2135" PostHistoryTypeId="2" PostId="1153" RevisionGUID="faa9cb13-1e55-4d8c-a246-7c74eb6447cc" CreationDate="2010-07-22T09:24:54.657" UserId="687" Text="I always used to start with a Tanks / Gorillas / Worms game. It gets you exercise in simple graphical display, and reading user input, plus a game loop applying gravity to the projectile and testing for collision-detection. &#xD;&#xA;&#xD;&#xA;After that would come a game like a very simple platformer or shoot-em-up where you need to read user input in real time, rather than the INPUT statements that work for Gorillas :)" />
  <row Id="2136" PostHistoryTypeId="2" PostId="1154" RevisionGUID="9ed29a3f-8f54-4476-a023-2394d439c495" CreationDate="2010-07-22T10:18:17.233" UserId="711" Text="COLLADA was over-complex in my opinion. Suffered from the designers trying to make it handle every conceivable combination of 3D asset; e.g. every possible vertex/index format and configuration.&#xD;&#xA;&#xD;&#xA;Sounds great but in practice this placed a huge burden on any piece of software that needed to read the format.&#xD;&#xA;&#xD;&#xA;It didn't help that every supposedly compatible tool had its own ideas about things like winding order, axis handedness etc. Trying to use it as an interchange format between DCCs plunged you into a world of miniature upside-down geometry, busted UVs, you name it.&#xD;&#xA;&#xD;&#xA;What we need is a simple designed format that covers 90% of needs in a single, canonical way." />
  <row Id="2137" PostHistoryTypeId="2" PostId="1155" RevisionGUID="dbff2592-b5aa-4183-a535-83f625181214" CreationDate="2010-07-22T10:21:39.447" UserId="705" Text="Concerning the tools, my experience is that the popular solution to access .dae files is [collada-dom](http://sourceforge.net/projects/collada-dom/). It only parses the xml and give you access to the tree structure. Originally developped by Sony, it is now an open-source project (and the reference implementation).&#xD;&#xA;&#xD;&#xA;Recently, opencollada (http://code.google.com/p/opencollada/) seems to get some attention, but I've never used it. It comes with plugins for 3DS, Maya, Blender, and an SDK.&#xD;&#xA;&#xD;&#xA;COLLADA Refinery (http://sourceforge.net/projects/colladarefinery/) is a tool to process `.dae` files (eg, triangulate surfaces).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Concerning its adoption, most mainstream creation tools (3DS, Maya, Houdini, Blender, Sketchup) support it by default.&#xD;&#xA;However, it is possible to have bad results when importing an exported model between different softwares. You also have to be careful with the various concurrent versions that exist in the wild (1.3, 1.4, 1.4.1).&#xD;&#xA;&#xD;&#xA;FWIW, the official twitter account for COLLADA (http://twitter.com/collada) often makes announcement of tools and applications that got COLLADA support. This can give an idea of the support in the industry.&#xD;&#xA;&#xD;&#xA;In my experience, it's a good-enough way to *exchange* data between systems. From a gamedev point of view, I don't think it's a good out-of-the-box solution. It depends on what you do, but at this point, an importer that process the file (or the DOM) for your engine is likely to be necessary. I've also witnessed really slow importers, so for a game engine, I would go with a COLLADA converter, rather than an importer.&#xD;&#xA;" />
  <row Id="2138" PostHistoryTypeId="2" PostId="1156" RevisionGUID="9fdbe39e-0d80-4342-aab6-9cb633ad84a4" CreationDate="2010-07-22T10:28:21.297" UserId="276" Text="Ensure that you change the people playtesting your game.  We shipped a title for the original PSX that was far too difficult (far too tight time limits) as we'd had all the same playtesters testing the game over the development period so they knew the levels backwards.  " />
  <row Id="2139" PostHistoryTypeId="2" PostId="1157" RevisionGUID="dffd450a-ea1f-4891-8b31-2c7fbfd5d48b" CreationDate="2010-07-22T10:34:18.937" UserId="715" Text="I've been thinking about developing a small engine not only to develop small experimental games, but also to serve as a base to test various rendering techniques and things like that. Right now I've been thinking a lot about how to handle textures and stumbled on megatexture, but this is something that is a bit puzzling. There is a lot of talk of it being better than the traditional approach to having a bunch of textures around and loading them as needed, but how does megatexture avoid this, I've read around that they use streaming and you can just stream bits and pieces of it as opposed to loading each texture individually, but how does that offer better performance, and isn't that just another for of tilling?&#xD;&#xA;How do we sample such a texture when in a shader, do we stream part of it into memory then work on it. I've seen the latest videos of Rage and the texture do look great, but is that just the result of great artists or does the tech come into play.&#xD;&#xA;To sum up, how does it work, why is it great and how could I do something similar.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="2140" PostHistoryTypeId="1" PostId="1157" RevisionGUID="dffd450a-ea1f-4891-8b31-2c7fbfd5d48b" CreationDate="2010-07-22T10:34:18.937" UserId="715" Text="How does Magatexture work? " />
  <row Id="2141" PostHistoryTypeId="3" PostId="1157" RevisionGUID="dffd450a-ea1f-4891-8b31-2c7fbfd5d48b" CreationDate="2010-07-22T10:34:18.937" UserId="715" Text="&lt;textures&gt;" />
  <row Id="2142" PostHistoryTypeId="2" PostId="1158" RevisionGUID="d1bf3a4f-de1f-4ea1-9ad7-e56e7e111ea8" CreationDate="2010-07-22T10:44:08.550" UserDisplayName="Tony Albrecht" Text="The first thing you need to understand is the hardware you're running on. How does it handle branching? What about caching? Does it have a SIMD instruction set? How many processors can it use? Does it have to share processor time with anything else?&#xD;&#xA;&#xD;&#xA;You may solve the same problem in very different ways - even your choice of algorithm should be dependant on the hardware. In some cases O(N) can run slower than O(NlogN) (depending on implementation).&#xD;&#xA;&#xD;&#xA;As a crude overview of optimisation, the first thing I would do is look at exactly what problems and what data you are trying to solve for. Then optimise for that. If you want extreme performance then forget about generic solutions - you can special case everything that doesn't match your most used case.&#xD;&#xA;&#xD;&#xA;Then profile. Profile, profile, profile. Look at memory usage, look at branching penalties, Look at function call overhead, look at pipeline utilisation. Work out what is slowing down your code. Its probably data access (I wrote an article called &quot;The Latency Elephant&quot; about the overhead of data access - google it. I can't post 2 links here as I don't have enough &quot;reputation&quot;), so closely examine that and then optimise your data layout ([nice big flat homogeneous arrays are awesome][2]) and data access (prefetch where possible).&#xD;&#xA;&#xD;&#xA;Once you've minimised the overhead of the memory subsystem, try and determine if instructions are now the bottleneck (hopefully they are), then look at SIMD implementations of your algorithm - SOA implementations can be very D and I cache efficient. If SIMD isn't a good match for your problem then intrinsics and asm level coding may be needed.&#xD;&#xA;&#xD;&#xA;If you still need more speed then go parallel. If you have the benefit of running on a PS3 then the SPUs are your friends. Use them, love them. If you've already written a SIMD solution then you'll get a massive benefit moving to SPU.&#xD;&#xA;&#xD;&#xA;And then, profile some more. Test in game scenarios - is this code still the bottleneck? Can you change the way this code is used at a higher level to minimise its usage (actually, this should be your first step)? Can you defer calculations over multiple frames?&#xD;&#xA;&#xD;&#xA;Whatever platform you're on, learn as much as you can about the hardware and the profilers available. Don't assume that you know what the bottleneck is - find it with your profiler. And make sure you have a heuristic to determine if you have actually made your game go faster.&#xD;&#xA;&#xD;&#xA;And then profile it again.&#xD;&#xA;&#xD;&#xA;  [1]: http://seven-degrees-of-freedom.blogspot.com/2009/10/latency-elephant.html&#xD;&#xA;  [2]: http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf" />
  <row Id="2143" PostHistoryTypeId="16" PostId="1158" RevisionGUID="d1bf3a4f-de1f-4ea1-9ad7-e56e7e111ea8" CreationDate="2010-07-22T10:44:08.550" UserId="-1" />
  <row Id="2144" PostHistoryTypeId="2" PostId="1159" RevisionGUID="1ef75c7d-2ba2-4627-9e0f-fb372733ba80" CreationDate="2010-07-22T10:57:14.540" UserId="627" Text="You can think of Megatexture as a sort &quot;streaming&quot; texture. One massive, fully detailed texture image (put simply) that is read in as sections of it are needed to be displayed. I'm sure there's a hell of a lot more to it than that though, such as LOD/mipmapping, loading and resource management among the obvious things.&#xD;&#xA;&#xD;&#xA;Wikipedia has an [article][1] on it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/MegaTexture" />
  <row Id="2145" PostHistoryTypeId="2" PostId="1160" RevisionGUID="afd854ad-c9a8-4d17-9f32-ddb4adfd8cd4" CreationDate="2010-07-22T11:07:30.730" UserId="721" Text="There is two OpenGL ES versions available on Android:&#xD;&#xA;&#xD;&#xA; - OpenGL ES 1.x (1.0 or 1.1): a subset of OpenGL 1.5 without immediate commands&#xD;&#xA;    - no glBegin/glEnd&#xD;&#xA;    - no Quad or Polygon support&#xD;&#xA; - OpenGL ES 2.0: a subset of OpenGL 3.X without fixed pipeline&#xD;&#xA;    - vertex shaders&#xD;&#xA;    - fragment shaders&#xD;&#xA;    - geometry shaders are not available&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Warning, OpenGL ES 2.0 is not compatible with OpenGL ES 1.X!&#xD;&#xA;&#xD;&#xA;Most Android phones have OpenGL 1.X GPU and few have 2.0.&#xD;&#xA;OpenGL ES 2.0 is only available with Android 2.x or newer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="2146" PostHistoryTypeId="2" PostId="1161" RevisionGUID="d9bee23f-711a-4fa7-a6e5-02b6a1509428" CreationDate="2010-07-22T11:08:56.797" UserId="727" Text="While answers will vary depending on the case, I'd love to hear about what people have seen in their past experiences.&#xD;&#xA;The question mainly relates to DirectX though if you have some numbers for any other API (OpenGL, consoles etc) I'd be glad to hear them too.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="2147" PostHistoryTypeId="1" PostId="1161" RevisionGUID="d9bee23f-711a-4fa7-a6e5-02b6a1509428" CreationDate="2010-07-22T11:08:56.797" UserId="727" Text="Any hints about the average renderstate changes per frame ?" />
  <row Id="2148" PostHistoryTypeId="3" PostId="1161" RevisionGUID="d9bee23f-711a-4fa7-a6e5-02b6a1509428" CreationDate="2010-07-22T11:08:56.797" UserId="727" Text="&lt;directx&gt;&lt;performance&gt;" />
  <row Id="2149" PostHistoryTypeId="5" PostId="635" RevisionGUID="5db9ca50-ef58-416f-b6c2-a8baf6ee4e0d" CreationDate="2010-07-22T11:12:37.523" UserId="275" Comment="added 29 characters in body" Text="Blender is great if you know how to use it. (I suppose you mean as a modeling software, not the GE)&#xD;&#xA;&#xD;&#xA;Here's some reasons:&#xD;&#xA;&#xD;&#xA;  * It can export to many file formats out of the box, and many you can find, and many you can write your own scripts for importing&#xD;&#xA;  * You can usually find a lot of free models to build on or use as placeholders&#xD;&#xA;  * It's free (as in speech)&#xD;&#xA;  * Due to the Python interface, you can find a lot of extra features implemented by someone, and build your own collection tailored to your needs&#xD;&#xA;  * You get a huge community for support.&#xD;&#xA;&#xD;&#xA;Of course, these are reasons Blender works, not reasons Maya or 3DS doesn't." />
  <row Id="2150" PostHistoryTypeId="2" PostId="1162" RevisionGUID="0a25afe9-9090-4c17-ad3e-d8f578eadd73" CreationDate="2010-07-22T11:31:57.290" UserId="200" Text="The basic idea of mega textures is the use of a texture atlas where you pack all your different textures into a big one and use UVs to index into this image. Good heuristics are needed to know what part of the texture you need to stream in from disk based on what you see on screen. The upside is that you can have completely unique textures throughout the game world and only keep the visible data in RAM. A good streaming and caching system is needed to make this affordable.&#xD;&#xA;&#xD;&#xA;I recommend going through the material on this page for more detailed info on one approach: [http://silverspaceship.com/src/svt/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://silverspaceship.com/src/svt/" />
  <row Id="2151" PostHistoryTypeId="2" PostId="1163" RevisionGUID="9d81c4b8-3862-4375-9f65-a2a53cca221a" CreationDate="2010-07-22T11:34:21.827" UserId="465" Text="There is a very good article on this topic &lt;a href=&quot;http://www.gamasutra.com/view/feature/5901/evaluating_game_mechanics_for_depth.php&quot;&gt; Evaluating Game Mechanics For Depth by Mike Stout &lt;/a&gt;&#xD;&#xA;" />
  <row Id="2152" PostHistoryTypeId="2" PostId="1164" RevisionGUID="a0799579-8e15-4c63-8d15-9889e35bfe35" CreationDate="2010-07-22T11:43:36.757" UserId="711" Text="Move on to another idea for a bit. If your brain drags you back to the first idea, revisit it. But don't let yourself get stuck." />
  <row Id="2153" PostHistoryTypeId="2" PostId="1165" RevisionGUID="d18dab3a-fd7b-4e3c-a5ca-f79e72643b20" CreationDate="2010-07-22T11:50:59.660" UserId="35" Text="It doesn't matter how much renderstate changes really is, you should always minimize that number, using sorting, etc, as renderstate changes are expensive on most APIs." />
  <row Id="2154" PostHistoryTypeId="2" PostId="1166" RevisionGUID="a3b0c73e-9a93-472c-b63c-997213b79733" CreationDate="2010-07-22T12:09:42.710" UserDisplayName="Rompa" Text="In C/C++ a simple trick is to put your tweakable into a static variable, trigger a breakpoint, change the static in the debugger and it remains persistent until exit." />
  <row Id="2155" PostHistoryTypeId="2" PostId="1167" RevisionGUID="13ed5edd-ed88-45dd-ab6f-0d7107be4789" CreationDate="2010-07-22T12:27:10.833" UserId="741" Text="Solitaire (or really any card game) is a good game to get your hands dirty with a new UI system, as it exercises a lot of the widgets and controller interaction feedback mechanisms you need to use. Plus the logic for it is straightforward and unambiguous, so you can concentrate on the learning and not so much the game design.&#xD;&#xA;&#xD;&#xA;For real time simulation games, I'd always recommend Pong as a good simple starting point, again because the design is straightforward, as well as the controller interface, so you can get to the meat of the system - the physical simulation." />
  <row Id="2156" PostHistoryTypeId="5" PostId="1155" RevisionGUID="c63e2603-0c0e-47b3-b629-f378dea28477" CreationDate="2010-07-22T12:34:53.190" UserId="705" Comment="added clickable links" Text="Concerning the tools, my experience is that the popular solution to access .dae files is [collada-dom](http://sourceforge.net/projects/collada-dom/). It only parses the xml and give you access to the tree structure. Originally developped by Sony, it is now an open-source project (and the reference implementation).&#xD;&#xA;&#xD;&#xA;Recently, [opencollada](http://code.google.com/p/opencollada/) seems to get some attention, but I've never used it. It comes with plugins for 3DS, Maya, Blender, and an SDK.&#xD;&#xA;&#xD;&#xA;[COLLADA Refinery](http://sourceforge.net/projects/colladarefinery/) is a tool to process `.dae` files (eg, triangulate surfaces).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Concerning its adoption, most mainstream creation tools (3DS, Maya, Houdini, Blender, Sketchup) support it by default.&#xD;&#xA;However, it is possible to have bad results when importing an exported model between different softwares. You also have to be careful with the various concurrent versions that exist in the wild (1.3, 1.4, 1.4.1).&#xD;&#xA;&#xD;&#xA;FWIW, the official [twitter account for COLLADA](http://twitter.com/collada) often makes announcement of tools and applications that got COLLADA support. This can give an idea of the support in the industry.&#xD;&#xA;&#xD;&#xA;In my experience, it's a good-enough way to *exchange* data between systems. From a gamedev point of view, I don't think it's a good out-of-the-box solution. It depends on what you do, but at this point, an importer that process the file (or the DOM) for your engine is likely to be necessary. I've also witnessed really slow importers, so for a game engine, I would go with a COLLADA converter, rather than an importer.&#xD;&#xA;" />
  <row Id="2157" PostHistoryTypeId="2" PostId="1168" RevisionGUID="396e31a3-f13d-4e40-82e0-d3cbd9414888" CreationDate="2010-07-22T13:14:33.983" UserId="47" Text="Follow Stackoverflow's example: **release your beta in multiple groups**.  Why?&#xD;&#xA;&#xD;&#xA;Because most likely the user will check your beta out once, poke around, and then is highly likely to not return or keep testing as much as they did when they first began.  Also, new users at different stages of beta development can spot things that, well, only a new user would spot.  Older users will also have learned or become accustomed to the game so they might not spot some issues.&#xD;&#xA;&#xD;&#xA;If you keep getting users in stages during development, you'll always get new fresh eyes and ideas/thoughts/etc. throughout your development." />
  <row Id="2158" PostHistoryTypeId="2" PostId="1169" RevisionGUID="c71da41e-d51d-447e-babf-4782c941fc42" CreationDate="2010-07-22T13:15:28.583" UserId="741" Text="Not mentioned yet are services as money sinks. So the player uses some of the inflated money to buy a service (like health boosts and speed increases), which is essentially intangible and at the end of the service period, value disappears from the economy. This helps to counter the feeling that the player is buying something pointless (such as vanity items) or the feeling of loss they get (such as when the items that they spent lots on get destroyed during PvP).&#xD;&#xA;&#xD;&#xA;Ideally the services provided are ones which don't make it notably easier for the player to then farm more value. Imagine a buff service that increased the speed at which players could dig for currency, resulting in them adding more currency to the economy than is taken away through the price of the service. Net result: hyperinflation as the player can use the extra currency they received to buy more / higher levels of the services, resulting in more currency, etc. " />
  <row Id="2159" PostHistoryTypeId="2" PostId="1170" RevisionGUID="bcd1fd06-2234-457c-9783-63aaf6a48c15" CreationDate="2010-07-22T13:23:28.063" UserId="734" Text="I've been meaning to try out libRocket ([http://librocket.com][1]/), though I haven't done so yet. Seems, it allows to lay out the interface using a subset of HTML + CSS, which could be pretty efficient.&#xD;&#xA;&#xD;&#xA;It's free for download (and comes with source), but AFAIK they use a custom licence, so not sure about what possible caveats there might be.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://librocket.com/" />
  <row Id="2160" PostHistoryTypeId="16" PostId="1170" RevisionGUID="bcd1fd06-2234-457c-9783-63aaf6a48c15" CreationDate="2010-07-22T13:23:28.063" UserId="-1" />
  <row Id="2161" PostHistoryTypeId="2" PostId="1171" RevisionGUID="6777443f-6999-418d-889f-e1117fd629b2" CreationDate="2010-07-22T13:27:38.257" UserId="47" Text="Do I just need to be creating instances of all of my graphics into memory that are loaded from file?  What is the best way to handle this?  Do I just need some sort of assets manager that creates these graphic instances during the loading screen and is then referred to later?&#xD;&#xA;&#xD;&#xA;What are common things that need to be pre-loaded in games?  How  much should I pre-load?&#xD;&#xA;&#xD;&#xA;Is it worth showing some sort of progress bar?  How can I keep load times short?  What should the loading screen look like?&#xD;&#xA;&#xD;&#xA;What are some good examples of loading screens?  Any code examples?&#xD;&#xA;&#xD;&#xA;Specifically, my game is for Andriod (mobile), but feel free to make your answers generic." />
  <row Id="2162" PostHistoryTypeId="1" PostId="1171" RevisionGUID="6777443f-6999-418d-889f-e1117fd629b2" CreationDate="2010-07-22T13:27:38.257" UserId="47" Text="What all should be happening during the &quot;Loading&quot; screen?" />
  <row Id="2163" PostHistoryTypeId="3" PostId="1171" RevisionGUID="6777443f-6999-418d-889f-e1117fd629b2" CreationDate="2010-07-22T13:27:38.257" UserId="47" Text="&lt;assets&gt;&lt;graphics&gt;&lt;android&gt;&lt;loading&gt;&lt;preload&gt;" />
  <row Id="2164" PostHistoryTypeId="2" PostId="1172" RevisionGUID="ebf40a58-1ee5-4bda-8514-be2ec17c9a0c" CreationDate="2010-07-22T13:33:18.803" UserId="47" Text="I learned opengl by writing a &quot;simple&quot; game: [3D Tetris][1]!&#xD;&#xA;&#xD;&#xA;Try creating your own simple game/app:&#xD;&#xA;&#xD;&#xA; - Asteroids&#xD;&#xA; - Pong&#xD;&#xA; - Simple side scroller (you could learn to load in models for the player/enemies.  Don't have any?  Use Quake models)&#xD;&#xA; - 3d terrain generator &#xD;&#xA;&#xD;&#xA;Do something **simple** that interests you!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bryandenny.com/index.php/3d-tetris/" />
  <row Id="2165" PostHistoryTypeId="2" PostId="1173" RevisionGUID="45adc45b-120b-4877-aded-b9f51d7df223" CreationDate="2010-07-22T13:33:40.113" UserId="734" Text="Start with NeHe to quickly get your first triangle on the screen. Do a few of the beginner tutorials there to understand the basic concepts of 3D programming. If, as you imply, mentioning OpenGL ES, you already know the basics of 3D programming (what are matrices, what they're used for, how different matrices are used to project vertices on the screen, what vertices are, etc.), then I suggest you don't waste time with NeHe at all, because it might slow you down (by teaching you things you have to &quot;unlearn&quot; later on).&#xD;&#xA;&#xD;&#xA;Apart from that, I agree that the best way to learn it is by doing. A good first non-hello-world project might be a 2D game (or a 2D game engine). Using modern OpenGL for 2D applications can teach you a lot of the relevant concepts (buffer and shader use, for example), and it will be less daunting than a 3D project. Then, afterwards, you can apply what you've learned in doing a 3D application.&#xD;&#xA;" />
  <row Id="2166" PostHistoryTypeId="5" PostId="1171" RevisionGUID="c1721818-6a73-40ef-8fcf-2549c90adf3f" CreationDate="2010-07-22T13:36:55.677" UserId="47" Comment="added 5 characters in body" Text="Do I just need to be creating instances of all of my graphics into memory that are loaded from file?  What is the best way to handle this?  Do I just need some sort of assets manager that creates these graphic instances during the loading screen and is then referred to later?&#xD;&#xA;&#xD;&#xA;What are common things that need to be pre-loaded in games?  How  much should I pre-load?&#xD;&#xA;&#xD;&#xA;Is it worth showing some sort of progress bar?  How can I keep load times short?  What should the loading screen look like?&#xD;&#xA;&#xD;&#xA;What are some good examples of loading screens?  Any code examples?&#xD;&#xA;&#xD;&#xA;Specifically, my game is for Andriod (Java/mobile), but feel free to make your answers generic." />
  <row Id="2167" PostHistoryTypeId="2" PostId="1174" RevisionGUID="0e23a7b4-f792-4df4-92a1-3389db6d0f13" CreationDate="2010-07-22T13:40:27.507" UserId="721" Text="ScoreLoop is available for Android platform." />
  <row Id="2168" PostHistoryTypeId="2" PostId="1175" RevisionGUID="8c80277e-9c52-4d4a-8472-40632e006b4e" CreationDate="2010-07-22T13:43:26.283" UserId="371" Text="Loading screens can be used to hide pretty much anything; loading of assets, any connections it needs to make (tcp, etc), populating maps with game objects, and initialization.&#xD;&#xA;&#xD;&#xA;The way I tend to go about things is to have some sort of asset manager (or maybe a manager for each asset types - sounds, graphics, etc.) and have them load what is going to be used into memory. Then just have your game pull references out of the managers. &#xD;&#xA;&#xD;&#xA;Showing a progress bar, determining what to preload, etc. seem to be dependent on your project, it's loading times and your tastes. Progress bars are nice if they're accurate and it's a long load (it's nice to know how long you need to wait). &#xD;&#xA;&#xD;&#xA;With that said, on my android phone I tend to favor apps that have their own custom, tastefully done loading screen. It doesn't need a bar, but animation tells the user the programs working. I believe android has a default bar you can use, which does the job fine.&#xD;&#xA;&#xD;&#xA;[Here's][1] a SO question that might interest you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1596947/android-application-loading-screen" />
  <row Id="2169" PostHistoryTypeId="2" PostId="1176" RevisionGUID="d58e3f37-3603-46c7-8d07-955dd3778e70" CreationDate="2010-07-22T13:45:26.153" UserId="119" Text="Even though it is a commonly held belief that blitting is faster, I have not seen any benchmarks proving this. Some developers just prefer blitting because it allows them to treat Flash as more of a generic virtual machine, and control rendering themselves. However, if you like the built-in display list (which I do), Flash can happily move, scale, rotate and apply nice effects to hundreds of on-screen DisplayObjects (e.g. MovieClips, Sprites, Bitmaps) at high frame rates, so long as they are quite small in dimensions, e.g. less than 200x200 pixels each. By setting the stage quality to LOW you will get much better performance at the expense of uglier transforms. Flash will not render any objects that are off screen, so they do not slow you down. &#xD;&#xA;&#xD;&#xA;Where Flash can get slow is moving and transforming very large bitmaps - for example if you have a very large scrolling level, or lots of parallax layers. A hybrid approach of using MovieClips for your game objects while blitting the background from an offscreen buffer may be faster, and will allow you to have infinitely large levels, while still allowing the ease-of-use of standard Sprites and MovieClips." />
  <row Id="2170" PostHistoryTypeId="2" PostId="1177" RevisionGUID="bc4a4257-4ef4-46f0-b7e1-c4bbbf254194" CreationDate="2010-07-22T13:55:16.350" UserId="119" Text="Boring old DHTML (HTML4, JavaScript and CSS) combined with a server language like PHP have powered hundreds of very successful multi-user casual games - all those pre-Zynga-era games where you manage a kingdom / space fleet from static menus. Kingdom of Loathing doesn't use any plug-ins, I don't think. In fact, the Flash elements of Farmville are really a very thin skin on top of essentially server-driven game: all the game logic is server-side." />
  <row Id="2171" PostHistoryTypeId="5" PostId="1174" RevisionGUID="d64c6ad0-4546-4a59-aa07-bdbdf1ceb074" CreationDate="2010-07-22T13:56:42.367" UserId="721" Comment="added 629 characters in body" Text="ScoreLoop is available for Android platform. &#xD;&#xA;&#xD;&#xA;You can use [ScoreNinja][1] too. ScoreNinja offers an easy way to implement global scores but requires to view your score in the ScoreNinja application.&#xD;&#xA;&#xD;&#xA;Otherwise Cocos iphone provides a global score with [CocosLive][2]. You can use CocosLive.net or use your own GoogleApp Engine VM. CocosLive is not available on Android platform but the protocol is REST with JSON and can easily be ported.&#xD;&#xA;&#xD;&#xA;My current solution is CocosLive for Android and iPhone with my own VM but i will use ScoreLoop in my next game for social network integration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/scoreninja/&#xD;&#xA;  [2]: http://www.cocoslive.net/" />
  <row Id="2172" PostHistoryTypeId="2" PostId="1178" RevisionGUID="27288d1c-9f6e-4765-96d7-2cadf81c9965" CreationDate="2010-07-22T14:01:37.973" UserId="653" Text="The typical things to pre-load is anything that you're going to need in realtime. Save for concepts like clipmaps and megatextures (where the idea is to load the parts you need, and iteratively update it as you move around in the world), you're going to want to keep everything you need for your level/area/whatever in memory rather than on disk. IO is sloooow, and you don't want to load your textures when you turn the corner and it is about to be displayed. And by everything, I mean textures, sounds, meshes, meta data... everything.&#xD;&#xA;&#xD;&#xA;If you can show a progress bar (i.e. you have an accurate mapping of loading steps to percentage), then by all means show it. If not, at least show something, like a short text message or a loading indicator, which is updated after each step so you can at least tell *something* is happening.&#xD;&#xA;&#xD;&#xA;If there's something which you know will be needed, but not right away, you can load it in the background, and stall the game (not great, but make sure it rarely happens) if it's needed too early. I don't know much about android development, or if it'll be to much for the device to handle alongside the game, but it's usually rather light on the CPU so there shouldn't be a big problem there." />
  <row Id="2173" PostHistoryTypeId="2" PostId="1179" RevisionGUID="eeabfdc2-dd03-4831-81af-9e02c872789a" CreationDate="2010-07-22T14:06:18.633" UserId="734" Text="Here's a great resource for writing a roguelike that nobody has mentioned yet: [http://rltiles.sourceforge.net/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rltiles.sourceforge.net/" />
  <row Id="2174" PostHistoryTypeId="5" PostId="1178" RevisionGUID="3b7c0839-4fc2-4a6b-8f54-62ca0bbca42a" CreationDate="2010-07-22T14:07:09.877" UserId="653" Comment="added 44 characters in body" Text="The typical things to pre-load is anything that you're going to need in realtime. Save for concepts like clipmaps and megatextures (where the idea is to load the parts you need, and iteratively update it as you move around in the world), you're going to want to keep everything you need for your level/area/whatever in memory rather than on disk. IO is sloooow, and you don't want to load your textures when you turn the corner and it is about to be displayed. And by everything, I mean textures, sounds, meshes, meta data... everything.&#xD;&#xA;&#xD;&#xA;If you can show a progress bar (i.e. you have an accurate mapping of loading steps to percentage), then by all means show it. If not, at least show something, like a short text message or a loading indicator, which is updated after each step so you can at least tell *something* is happening.&#xD;&#xA;&#xD;&#xA;If there's something which you know will be needed, but not right away, you can load it in the background, and stall the game (not great, but make sure it rarely happens) if it's needed too early. This will help you keep the load time down. I don't know much about android development, or if it'll be to much for the device to handle alongside the game, but it's usually rather light on the CPU so there shouldn't be a big problem there." />
  <row Id="2175" PostHistoryTypeId="2" PostId="1180" RevisionGUID="fae678c8-f357-4c9d-8878-95dc1a58d746" CreationDate="2010-07-22T14:07:52.340" UserId="119" Text="I like the selection at:&#xD;&#xA;&#xD;&#xA;http://www.soundrangers.com" />
  <row Id="2176" PostHistoryTypeId="2" PostId="1181" RevisionGUID="8312bbcd-00c2-4fb3-aa3e-5cc4eec180b6" CreationDate="2010-07-22T14:08:04.447" UserId="34" Text="Minimize your state changes.  On a lot of platforms, each state change potentially flushes the pipeline.  It's much better to batch similar items together and change state once." />
  <row Id="2177" PostHistoryTypeId="16" PostId="1181" RevisionGUID="8312bbcd-00c2-4fb3-aa3e-5cc4eec180b6" CreationDate="2010-07-22T14:08:04.447" UserId="-1" />
  <row Id="2178" PostHistoryTypeId="2" PostId="1182" RevisionGUID="06d4a071-f482-419d-997c-0002025a174a" CreationDate="2010-07-22T14:10:04.443" UserId="721" Text="On iphone and Android platforms, you must load all textures and sounds. Loading textures and sounds is really slow on old phones as iphone 2G, 3G or G1. You can't do it in the game." />
  <row Id="2179" PostHistoryTypeId="2" PostId="1183" RevisionGUID="3bfb6133-8184-4593-aa61-53b68dde1fae" CreationDate="2010-07-22T14:10:34.207" UserId="776" Text="Can anyone explain the general architecture typically used for 3D character animation?&#xD;&#xA;&#xD;&#xA;Are movements like walking and falling scripted against the skelton, and simply executed on input?  If so, is the scripting typically actual script or hard code?&#xD;&#xA;&#xD;&#xA;What are common pitfalls or flaws in character animation engines?" />
  <row Id="2180" PostHistoryTypeId="1" PostId="1183" RevisionGUID="3bfb6133-8184-4593-aa61-53b68dde1fae" CreationDate="2010-07-22T14:10:34.207" UserId="776" Text="Character Animation Architecture" />
  <row Id="2181" PostHistoryTypeId="3" PostId="1183" RevisionGUID="3bfb6133-8184-4593-aa61-53b68dde1fae" CreationDate="2010-07-22T14:10:34.207" UserId="776" Text="&lt;3d&gt;&lt;character&gt;&lt;animation&gt;" />
  <row Id="2182" PostHistoryTypeId="2" PostId="1184" RevisionGUID="b66a8ad0-4e6a-4c85-8703-1eea1d51bc96" CreationDate="2010-07-22T14:15:48.297" UserId="119" Text="The biggest one from me was reading about Scott Bilas's GameObject system (http://scottbilas.com/games/dungeon-siege/). Even though I don't use a database system like he does, it stopped me making 6 level inheritance trees and got me creating a component system which is much more manageable and reusable." />
  <row Id="2183" PostHistoryTypeId="16" PostId="1184" RevisionGUID="b66a8ad0-4e6a-4c85-8703-1eea1d51bc96" CreationDate="2010-07-22T14:15:48.297" UserId="-1" />
  <row Id="2184" PostHistoryTypeId="2" PostId="1185" RevisionGUID="94f0d6e7-eb3b-4683-a602-166582a05a1a" CreationDate="2010-07-22T14:18:50.647" UserId="778" Text="After noticing some timing descrepencies with events in my code, I boiled the problem all the way down to my Windows Message Loop.&#xD;&#xA;&#xD;&#xA;Basically, unless I'm doing something strange, I'm experiencing this behaviour:-&#xD;&#xA;&#xD;&#xA;    MSG message;&#xD;&#xA;&#xD;&#xA;    while (PeekMessage(&amp;message, _applicationWindow.Handle, 0, 0, PM_REMOVE))&#xD;&#xA;    {&#xD;&#xA;        int timestamp = timeGetTime();&#xD;&#xA;        bool strange = message.time &gt; timestamp; //strange == true!!!&#xD;&#xA;&#xD;&#xA;        TranslateMessage(&amp;message);&#xD;&#xA;        DispatchMessage(&amp;message);&#xD;&#xA;    }&#xD;&#xA;The only rational conclusion I can draw is that MSG::time uses a different timing mechanism then timeGetTime() and therefore is free to produce differing results. Is this the case or am i missing something fundamental?" />
  <row Id="2185" PostHistoryTypeId="1" PostId="1185" RevisionGUID="94f0d6e7-eb3b-4683-a602-166582a05a1a" CreationDate="2010-07-22T14:18:50.647" UserId="778" Text="MSG::time is later than timeGetTime" />
  <row Id="2186" PostHistoryTypeId="3" PostId="1185" RevisionGUID="94f0d6e7-eb3b-4683-a602-166582a05a1a" CreationDate="2010-07-22T14:18:50.647" UserId="778" Text="&lt;windows&gt;" />
  <row Id="2187" PostHistoryTypeId="2" PostId="1186" RevisionGUID="06aaba65-021c-4987-9a6e-7588f05e9e64" CreationDate="2010-07-22T14:23:17.560" UserId="721" Text="Minimize OpenGL commands is the key. So you must batch all drawing commands. For 2d games, it is a good idea to use Altas Texture and draw all sprites sharing the same texture in one opengl command.&#xD;&#xA;" />
  <row Id="2188" PostHistoryTypeId="16" PostId="1186" RevisionGUID="06aaba65-021c-4987-9a6e-7588f05e9e64" CreationDate="2010-07-22T14:23:17.560" UserId="-1" />
  <row Id="2189" PostHistoryTypeId="2" PostId="1187" RevisionGUID="fe42fc8a-a98d-466a-a882-1f048f94ec05" CreationDate="2010-07-22T14:24:45.827" UserId="779" Text="I liked this question:&#xD;&#xA;http://gamedev.stackexchange.com/questions/1083/what-makes-aiming-in-a-console-first-person-shooter-feel-good&#xD;&#xA;&#xD;&#xA;So here it is for PC (and its not a dupe because a mouse is hugely different from an analog stick)&#xD;&#xA;&#xD;&#xA;You've probably noticed some games &quot;feel better&quot; than others when it comes to aiming using the mouse.  Why is that?&#xD;&#xA;&#xD;&#xA;Some of the best engines are the original Half Life 1 engine and the Quake 3 engine.&#xD;&#xA;&#xD;&#xA;What is the biggest problem?  Laggy input response?" />
  <row Id="2190" PostHistoryTypeId="1" PostId="1187" RevisionGUID="fe42fc8a-a98d-466a-a882-1f048f94ec05" CreationDate="2010-07-22T14:24:45.827" UserId="779" Text="What makes aiming on a PC first person shooter feel good?" />
  <row Id="2191" PostHistoryTypeId="3" PostId="1187" RevisionGUID="fe42fc8a-a98d-466a-a882-1f048f94ec05" CreationDate="2010-07-22T14:24:45.827" UserId="779" Text="&lt;pc&gt;&lt;first-person-shooter&gt;&lt;aiming&gt;" />
  <row Id="2192" PostHistoryTypeId="2" PostId="1188" RevisionGUID="d62924f9-59c0-4a03-96da-54d44566ad20" CreationDate="2010-07-22T14:26:16.087" UserId="292" Text="Personally I'm a big fan of the Mersenne Twister for predictable random numbers, especially if you need to create a several differently seeded instances of Rand&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Mersenne_twister" />
  <row Id="2193" PostHistoryTypeId="16" PostId="1188" RevisionGUID="d62924f9-59c0-4a03-96da-54d44566ad20" CreationDate="2010-07-22T14:26:16.087" UserId="-1" />
  <row Id="2194" PostHistoryTypeId="2" PostId="1189" RevisionGUID="5583fe3e-6ecb-443b-996b-7ea75ab7c3a2" CreationDate="2010-07-22T14:31:14.187" UserId="457" Text="I would recomend starting with this tutorial series, they are good and use more modern features than the nehe ones http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html" />
  <row Id="2195" PostHistoryTypeId="2" PostId="1190" RevisionGUID="60144622-7b59-469d-aaad-135eb2a66819" CreationDate="2010-07-22T14:32:03.873" UserId="784" Text="For input to feel good on consoles you will want to have some processing done to it.&#xD;&#xA;&#xD;&#xA;First we converted the linear input that comes from the analogue sticks into a curve that gives us more sensitivity around the stick center and less sensitivity at the borders. This can be done with small tools that help you create and visualize these curves and spit out code. (http://www.arachnoid.com/polysolve/)&#xD;&#xA;&#xD;&#xA;As a second step we implemented some kind of accelleration. It kicks in after a short amount of time when the stick input is at least 97%, and ramps up the camera rotation over time. &#xD;&#xA;We handled the X and Y axis independently. That allows you to somehow artificially enhance the stick input range. The first 97% can be used for relatively fine adjustments, but due to acceleration you can have fast movements too.&#xD;&#xA;&#xD;&#xA;If you have different camera FOVs (e.g. when aiming/ zooming) then there needs to be a factor that adjusts the cam rotation speed by the FOV currently in use.&#xD;&#xA;&#xD;&#xA;Some other nifty tricks that make the players life easier is &quot;auto centering&quot;. This levels the camera pitch slowly back to the horizon when no input is given. It helps to keep oriented.&#xD;&#xA;&#xD;&#xA;Another thing to take care of on consoles is the dead zone. When a controller gets older the analogue sticks start to loose precision and tend to give &quot;false&quot; input. To prevent this you have to disregard the first few pct (up to 20%) of stick input. &#xD;&#xA;&#xD;&#xA;We also had done some experiments with friction based aiming help as mentioned before (accel input when moving towards enemy on screen, slow down input when moving away) but we had the feeling that this is very noticable to the player. Also the downside is that you dont have smooth cam movement anymore when there is a row of enemies. We opted for a &quot;magnetic bullet&quot; effect, where the bullets itself tend to gravitate towards the enemy within a certain range. However you have to be careful here too.&#xD;&#xA;" />
  <row Id="2196" PostHistoryTypeId="2" PostId="1191" RevisionGUID="af8760ed-a9f2-46ca-bb23-46aec7bfdbf1" CreationDate="2010-07-22T14:35:10.607" UserId="259" Text="mapValue function:&#xD;&#xA;&#xD;&#xA;    float mapValue( float inVal, float inFrom, float inTo, float outFrom, float outTo )&#xD;&#xA;    {&#xD;&#xA;        float inScale = (inFrom != inTo) &#xD;&#xA;            ? ( ( inVal - inFrom ) / ( inTo - inFrom ) ) &#xD;&#xA;            : 0.0f;&#xD;&#xA;        float outVal = outFrom + ( inScale * ( outTo - outFrom ) );&#xD;&#xA;        outVal = (outFrom &lt; outTo ) &#xD;&#xA;            ? clamp( outVal, outFrom, outTo ) &#xD;&#xA;            : clamp( outVal, outTo, outFrom );&#xD;&#xA;        return outVal;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It takes a value, converts it to a proportion within a range, and then scales that relative to another range.  Like a double-lerp.&#xD;&#xA;&#xD;&#xA;You can use it to normalise stuff:&#xD;&#xA;&#xD;&#xA;    float minDamage = 0.0f; float maxDamage = 300.0f;&#xD;&#xA;    float normalisedDamage = mapValue(damange, minDamage, maxDamage, 0.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;Or you can convert from one range to another:&#xD;&#xA;&#xD;&#xA;    float brakeStrength = mapValue(timeToCollision, &#xD;&#xA;        0.0f, 10.0f, // seconds&#xD;&#xA;        1.0f, 0.2f // brake values &#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;Notice in the second example that the out range is a different order to the in range.&#xD;&#xA;&#xD;&#xA;It  doesn't look like much, but I use this little fella all over the place." />
  <row Id="2197" PostHistoryTypeId="16" PostId="1191" RevisionGUID="af8760ed-a9f2-46ca-bb23-46aec7bfdbf1" CreationDate="2010-07-22T14:35:10.607" UserId="-1" />
  <row Id="2198" PostHistoryTypeId="2" PostId="1192" RevisionGUID="79ff47ae-a096-4a91-ac28-dff3c9922d50" CreationDate="2010-07-22T14:36:01.697" UserId="779" Text="About 5-10% of males have some form of colorblindness.  What's the best way to ensure you are not turning away 5-10% of your male population from your game?&#xD;&#xA;&#xD;&#xA;Just to note colorblindness does not mean people see in black and white.  It usually means they see less green and get red/green confused easily.  Colorblindness comes in degrees.  Some forms are mild some are extreme. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(Please edit my tags!  I can't create new ones like colorblindess accessibility color)" />
  <row Id="2199" PostHistoryTypeId="1" PostId="1192" RevisionGUID="79ff47ae-a096-4a91-ac28-dff3c9922d50" CreationDate="2010-07-22T14:36:01.697" UserId="779" Text="What is the best way to avoid colorblind issues?" />
  <row Id="2200" PostHistoryTypeId="3" PostId="1192" RevisionGUID="79ff47ae-a096-4a91-ac28-dff3c9922d50" CreationDate="2010-07-22T14:36:01.697" UserId="779" Text="&lt;visualization&gt;" />
  <row Id="2201" PostHistoryTypeId="2" PostId="1193" RevisionGUID="81bb3490-ad37-4cbb-bbfc-c695fb15b880" CreationDate="2010-07-22T14:36:52.600" UserId="777" Text="I want to parse Blender-Made Files directly into my homemade Lisp program. I've been pulling data out of .X3D files manually. Is this the best format to focus on writing a parser for?&#xD;&#xA;&#xD;&#xA;Thanks! " />
  <row Id="2202" PostHistoryTypeId="1" PostId="1193" RevisionGUID="81bb3490-ad37-4cbb-bbfc-c695fb15b880" CreationDate="2010-07-22T14:36:52.600" UserId="777" Text="What is the simplest 3D file format to parse?" />
  <row Id="2203" PostHistoryTypeId="3" PostId="1193" RevisionGUID="81bb3490-ad37-4cbb-bbfc-c695fb15b880" CreationDate="2010-07-22T14:36:52.600" UserId="777" Text="&lt;3d&gt;" />
  <row Id="2204" PostHistoryTypeId="6" PostId="1192" RevisionGUID="f8faec5d-4c33-488a-b5a2-031e35db7c9c" CreationDate="2010-07-22T14:38:16.807" UserId="8" Comment="edited tags" Text="&lt;visualization&gt;&lt;colorblindness&gt;" />
  <row Id="2205" PostHistoryTypeId="5" PostId="1192" RevisionGUID="18cb2a4f-12c9-419f-a272-3a629b9c4552" CreationDate="2010-07-22T14:40:09.283" UserId="779" Comment="deleted 92 characters in body; edited tags" Text="About 5-10% of males have some form of colorblindness.  What's the best way to ensure you are not turning away 5-10% of your male population from your game?&#xD;&#xA;&#xD;&#xA;Just to note colorblindness does not mean people see in black and white.  It usually means they see less green and get red/green confused easily.  Colorblindness comes in degrees.  Some forms are mild some are extreme. " />
  <row Id="2206" PostHistoryTypeId="6" PostId="1192" RevisionGUID="18cb2a4f-12c9-419f-a272-3a629b9c4552" CreationDate="2010-07-22T14:40:09.283" UserId="779" Comment="deleted 92 characters in body; edited tags" Text="&lt;colorblindness&gt;" />
  <row Id="2207" PostHistoryTypeId="2" PostId="1194" RevisionGUID="e04ff0bd-0672-4182-b77f-dd9d6e83f857" CreationDate="2010-07-22T14:40:32.717" UserId="292" Text="I've always found OBJ files easiest to parse, but they tend to be large because they're &quot;human readable.&quot;  However, they're public and standardized.&#xD;&#xA;&#xD;&#xA;If you need it, the Obj Specification:&#xD;&#xA;&#xD;&#xA;http://local.wasp.uwa.edu.au/~pbourke/dataformats/obj/" />
  <row Id="2208" PostHistoryTypeId="2" PostId="1195" RevisionGUID="3deead99-0d67-4879-b20b-4ad0e05123cd" CreationDate="2010-07-22T14:42:05.160" UserId="47" Text="Don't make game critical functions or gameplay based off of the colors that might confuse players.  &#xD;&#xA;&#xD;&#xA;Let's consider a game like Bejeweled.  Let's say that a color blind person can not determine the difference in the red or green gems.  They are going to have a lot trouble swapping gems if they can't determine what color a gem is.&#xD;&#xA;&#xD;&#xA;You could fix a problem like this by including a second way to differentiate between the red and green gems.  One example would be to give them different **shapes**, such that each color has its own unique shape." />
  <row Id="2209" PostHistoryTypeId="2" PostId="1196" RevisionGUID="b357a945-6dfe-4f9a-92dd-8646557b8bc0" CreationDate="2010-07-22T14:45:26.823" UserId="119" Text="The obvious answer is don't make any gameplay that relies on the ability to differentiate colours - e.g. in a match-3 game, make sure each colour of jewel also has a different shape." />
  <row Id="2210" PostHistoryTypeId="2" PostId="1197" RevisionGUID="02ddec7d-fb9c-4cde-99d3-5663108874ad" CreationDate="2010-07-22T14:48:47.907" UserId="465" Text="Use things other than colours to different key games items.&#xD;&#xA;&#xD;&#xA;Patterns and Shapes are very helpful.&#xD;&#xA;&#xD;&#xA;Also this [Vischeck website][1] provides very good information, and a set of photoshop filters you can use to check your assest&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vischeck.com/downloads/" />
  <row Id="2211" PostHistoryTypeId="2" PostId="1198" RevisionGUID="8acb1af2-38ac-44b9-8464-8ca6dc140e0d" CreationDate="2010-07-22T14:57:29.350" UserId="335" Text="If your game is single player, just use the target objects method (as tenpn suggested).&#xD;&#xA;&#xD;&#xA;If you are (or want to support) multiplayer (multiclient to be exact),&#xD;&#xA;use a command queue.&#xD;&#xA;&#xD;&#xA;- When A does damage to B on client 1 just queue the damage event.&#xD;&#xA;- Synchronize the command queues via the network&#xD;&#xA;- Handle the queued commands on both sides.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2212" PostHistoryTypeId="2" PostId="1199" RevisionGUID="8df28d4d-d4bd-40a7-af5b-2970babcf6c5" CreationDate="2010-07-22T15:04:12.253" UserId="335" Text="Biggest indie mistakes:&#xD;&#xA;&#xD;&#xA;- Choose a too big project.&#xD;&#xA;- Have a too small team. (Lone wolf can work, but adds unneeded problems.)&#xD;&#xA;- Don't set a _fixed_ target date. (Yes, set the release date before starting and stick to it!)&#xD;&#xA;- Keep it secret. (Get it out there, nobody will steal your idea. Ideas are 1%, execution is 99%.)&#xD;&#xA;- Ignore the community. (Get some early alpha testers. Get early versions out to the review sites. They want your previews and will help you!)&#xD;&#xA;- Ignore copyright. (It's not OK to steal code, graphics, sounds, etc...)&#xD;&#xA;- Expect too much money. (Make your first title a gift. Expect nothing in return.)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2213" PostHistoryTypeId="2" PostId="1200" RevisionGUID="b490d9c2-f11c-4ed5-b2c8-d5418ef8fdee" CreationDate="2010-07-22T15:08:14.303" UserId="127" Text="I'm mildly colour blind and always find that I get along best with games that use very contrasting colours. The best example I can think of is TF2 where everything was either red or blue with very little exceptions. You would have to be severely colour blind to have trouble with two very different colours like that.  " />
  <row Id="2214" PostHistoryTypeId="2" PostId="1201" RevisionGUID="788fd111-9f62-4aa5-bfb3-35f7f16973b7" CreationDate="2010-07-22T15:09:52.787" UserId="335" Text="Write an exporter.&#xD;&#xA;No, really.&#xD;&#xA;&#xD;&#xA;That way you can output exactly the data you need in the format you want.&#xD;&#xA;&#xD;&#xA;When you start from one of the existing plugins, it's actually quite easy.&#xD;&#xA;" />
  <row Id="2215" PostHistoryTypeId="2" PostId="1202" RevisionGUID="900ea0fe-5220-4e9b-982a-ceb9c409aed9" CreationDate="2010-07-22T15:11:07.697" UserId="335" Text="Two.&#xD;&#xA;Enabling and disabling depth-testing for the UI.&#xD;&#xA;&#xD;&#xA;Everything else is handled by shaders." />
  <row Id="2216" PostHistoryTypeId="2" PostId="1203" RevisionGUID="d601da9f-1e3e-4713-b925-93972768ade1" CreationDate="2010-07-22T15:11:41.580" UserId="662" Text="The easiest to load is OBJ (which is human readable), others are horribly complex." />
  <row Id="2217" PostHistoryTypeId="2" PostId="1204" RevisionGUID="0fa9f374-46b1-4882-a73f-15f99a9f618c" CreationDate="2010-07-22T15:15:01.660" UserId="441" Text="Dave mentions some excellent points, although I have to point out that Haskell has solved both of his issues. Statelessness can be bypassed using the State monad, and sequencing can be handled using the IO monad. &#xD;&#xA;&#xD;&#xA;The challenges you'll have (and that I've had trying to learn both games programming and Haskell), are more along these lines. (These are all Haskell-specific, since I really haven't gone deep with any other FP languages yet.)&#xD;&#xA;&#xD;&#xA; - **FP Learning curve:** FP requires a complete shift of mindset from iterative programming. Learning to think in terms of maps and folds rather than loops requires a mental workout if you're not used to it. &#xD;&#xA; - **Mathy learning curve:** Haskell is both blessed and cursed by the mathematical sophistication of its designers, because after you learn the basics of FP, you're stuck with monads, morphisms, arrows, and a whole host of other considerations which, while not tough in and of themselves, are very abstract. &#xD;&#xA; - **Monads:** these puppies are not particularly hard to wrap your mind around, especially if you accept [Eric Raymond's statement][1] that they are a &quot;a hack to turn function composition into a way of forcing the sequencing of function calls.&quot; Unfortunately (though this is getting better as Haskell gains in popularity), many explanations of monads either aim way over the head of most programmers (&quot;they're monoids in the category of endofunctors!), or at a completely unhelpful analogy (e.g., Brent Yorgey's distressingly accurate example, &quot;[monads are like burritos][2]!&quot; You think he's kidding? That nobody could ever come up with such a goofy analogy in a tutorial? [Think again][3].)&#xD;&#xA; - **Ecosystem:** If you've managed to get beyond all the other bumps in the road, you will be cheek-and-jowl up against the practical day-to-day reality of working with a still largely experimental language. God help you when you get here. Here's where I started seriously jonesing for Scala, or F#, or some other language where there is at least *some* guarantee of interoperability with other libraries. Once upon a time, I got Haskell to link and load the OpenGL libraries in Windows. That made me feel pretty good. Then the OpenGL bindings were re-released, and broke everything I had done. That's life in Haskell-land. Honestly, it can be a pain. You want a wrapper for the Bullet engine? It's in Hackage -- as [abandonware][4] from November of last year. You like Ogre3d? Hackage has bindings to [only a subset of the library][5].  Bottom line is that if you stick to a language off the beaten path for game development, you will spend a lot more time working on basic plumbing than you would if you just followed the herd and stuck with C++.&#xD;&#xA;&#xD;&#xA;The flip side of this is that things are rapidly improving. And it really all depends on what you want out of the experience. You want to build a game and put it on your website to seek fame and fortune? Stick with C++ or Python. But if you want to learn something new that will require you to innovate your processes, try a functional language. Just have a lot of patience with yourself while you're learning. &#xD;&#xA;&#xD;&#xA;Antti Salonen has an interesting blog detailing his [on-again-off-again affair][6] with Haskell games programming. It's worth reading. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://esr.ibiblio.org/?p=1796&#xD;&#xA;  [2]: http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/&#xD;&#xA;  [3]: http://www.haskell.org/haskellwiki/Meet_Bob_The_Monadic_Lover&#xD;&#xA;  [4]: http://hackage.haskell.org/package/bullet&#xD;&#xA;  [5]: http://hackage.haskell.org/package/hogre&#xD;&#xA;  [6]: http://codeflow.wordpress.com/" />
  <row Id="2218" PostHistoryTypeId="2" PostId="1205" RevisionGUID="4687b805-f781-46cd-bb6a-0adccc1de027" CreationDate="2010-07-22T15:15:58.977" UserDisplayName="Gorkem Pacaci" Text="Milkshape (MS3D) format was quite easy to implement a reader for, in C++ and C#. Here's the spec I used:&#xD;&#xA;&#xD;&#xA;http://chumbalum.swissquake.ch/ms3d/ms3dspec.txt" />
  <row Id="2219" PostHistoryTypeId="2" PostId="1206" RevisionGUID="a95c1c41-cdc1-40b7-aec4-0938b3887ad9" CreationDate="2010-07-22T15:16:29.273" UserId="662" Text="I'm trying to speed up particles, and one way to do that is by precomputing the texture rotations. What I want to do is load the texture, rotate it and save it to a handle.&#xD;&#xA;&#xD;&#xA;How would I go about doing this?&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="2220" PostHistoryTypeId="1" PostId="1206" RevisionGUID="a95c1c41-cdc1-40b7-aec4-0938b3887ad9" CreationDate="2010-07-22T15:16:29.273" UserId="662" Text="OpenGL: Precompute a texture rotation" />
  <row Id="2221" PostHistoryTypeId="3" PostId="1206" RevisionGUID="a95c1c41-cdc1-40b7-aec4-0938b3887ad9" CreationDate="2010-07-22T15:16:29.273" UserId="662" Text="&lt;opengl&gt;&lt;optimization&gt;&lt;3d-engines&gt;&lt;particles&gt;" />
  <row Id="2222" PostHistoryTypeId="5" PostId="1105" RevisionGUID="b3ea5e04-3a5f-4385-ad73-1c6e8a99cb51" CreationDate="2010-07-22T15:17:09.477" UserId="789" Comment="Added math images and relative distance" Text="I still can't believe how many times I've used the Pythagorean Theorem in my game code. To me, this simple formula is a gem in game development.&#xD;&#xA;&#xD;&#xA;![a^2 + b^2 = c^2][1]&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;and when only relative distance matters it can be used without expensive square root operation&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mathurl.com/23fysej.png&#xD;&#xA;  [2]: http://mathurl.com/36qbdda.png&#xD;&#xA;  [3]: http://mathurl.com/244txpz.png" />
  <row Id="2223" PostHistoryTypeId="2" PostId="1207" RevisionGUID="1ae24890-79e6-454e-ab16-51b6bba1a8d2" CreationDate="2010-07-22T15:22:16.487" UserId="335" Text="Larger is always better,&#xD;&#xA;but:&#xD;&#xA;&#xD;&#xA;Inconsistent framerate can lead to motion sickness.&#xD;&#xA;&#xD;&#xA;(We had an internal tester throw up when his framerate jumped between 20 and 60 for 10 seconds.)&#xD;&#xA;" />
  <row Id="2224" PostHistoryTypeId="2" PostId="1208" RevisionGUID="17b76b05-68c2-4e20-897b-a1981c7cd60c" CreationDate="2010-07-22T15:28:38.907" UserId="798" Text="The .obj is of course the easiest to to parse, but if you need something a little more powerful (with animations) then get the .md2 file format.&#xD;&#xA;&#xD;&#xA;[link text][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://tfc.duke.free.fr/coding/md2-specs-en.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I can dig up some of my code from high school I might be able to find a md2 loader I wrote." />
  <row Id="2225" PostHistoryTypeId="2" PostId="1209" RevisionGUID="6f7f95cd-b2b7-44bb-a312-ddbbdcb60eca" CreationDate="2010-07-22T15:32:02.060" UserId="662" Text="What you should do:&#xD;&#xA;&#xD;&#xA;* Lock game *logic* to a fixed framerate&#xD;&#xA;* Render graphics as fast as possible&#xD;&#xA;&#xD;&#xA;That way, if the framerate drops you don't get input lag (I'm looking at you, Just Cause 2), and if the framerate becomes too high (think games from the 90's) the game doesn't become unplayable.&#xD;&#xA;&#xD;&#xA;Here's how I do it:&#xD;&#xA;&#xD;&#xA;    s_PhysicsCurrent = GetTickCount();&#xD;&#xA;    float delta = (float)(s_PhysicsCurrent - s_PhysicsStart);&#xD;&#xA;    s_PhysicsStart = s_PhysicsCurrent;&#xD;&#xA;&#xD;&#xA;    s_PhysicsTime += delta;&#xD;&#xA;&#xD;&#xA;    while (s_PhysicsTime &gt; ONEFRAME)&#xD;&#xA;    {&#xD;&#xA;        // Update&#xD;&#xA;        Game::Tick(ONEFRAME);&#xD;&#xA;&#xD;&#xA;        // Clear input&#xD;&#xA;        Keyboard::Clear();&#xD;&#xA;        Mouse::Clear();&#xD;&#xA;&#xD;&#xA;        s_PhysicsTime -= ONEFRAME;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    s_Window-&gt;Clear();&#xD;&#xA;&#xD;&#xA;    Game::Render();&#xD;&#xA;&#xD;&#xA;    s_Window-&gt;Swap();&#xD;&#xA;&#xD;&#xA;You basically collect a &quot;stack&quot; of frames to do logic for and you can interpolate between them perfectly." />
  <row Id="2227" PostHistoryTypeId="2" PostId="1210" RevisionGUID="ffa1a482-f0fb-4031-8feb-8fa6a81f4463" CreationDate="2010-07-22T15:35:06.240" UserId="798" Text="I've been developing a modification for the Source engine for well over a year, but am now facing some troubles with the weapons, gamemovement (player physics) and player feedback from explosives.&#xD;&#xA;&#xD;&#xA;This is all because of my weakness in mathematics!!!&#xD;&#xA;&#xD;&#xA;What books, tutorials or any  other various texts could you recommend (that have helped you).&#xD;&#xA;" />
  <row Id="2228" PostHistoryTypeId="1" PostId="1210" RevisionGUID="ffa1a482-f0fb-4031-8feb-8fa6a81f4463" CreationDate="2010-07-22T15:35:06.240" UserId="798" Text="Good 3D Math Theory Books" />
  <row Id="2229" PostHistoryTypeId="3" PostId="1210" RevisionGUID="ffa1a482-f0fb-4031-8feb-8fa6a81f4463" CreationDate="2010-07-22T15:35:06.240" UserId="798" Text="&lt;3d&gt;&lt;math&gt;" />
  <row Id="2230" PostHistoryTypeId="2" PostId="1211" RevisionGUID="7a15a730-4275-43a2-961f-f6987132f31c" CreationDate="2010-07-22T15:36:06.567" UserId="35" Text="You can use a Framebufer Object (FBO) to draw the transformed texture into another texture, then you can use the generated texture and draw it to screen." />
  <row Id="2231" PostHistoryTypeId="2" PostId="1212" RevisionGUID="2b20b1ad-fa52-4c5b-b127-e033d2648990" CreationDate="2010-07-22T15:36:13.477" UserId="214" Text="Most application development is based around developing with events, but considering the game-loop style of developing games and the (often) need for high performance/throughput, what role does developing using events have and what are the trade-offs? Does the synchronization/locking that is often involved have a greater impact?&#xD;&#xA;&#xD;&#xA;For instance: &#xD;&#xA;- How does the network [layer] notify the game-loop of data received?&#xD;&#xA;- How does the physics system notify of collisions&#xD;&#xA;&#xD;&#xA;I ask, because I can remember a time when game development using events was a strict no-no. Has this changed?" />
  <row Id="2232" PostHistoryTypeId="1" PostId="1212" RevisionGUID="2b20b1ad-fa52-4c5b-b127-e033d2648990" CreationDate="2010-07-22T15:36:13.477" UserId="214" Text="What role does developing with events have in games?" />
  <row Id="2233" PostHistoryTypeId="3" PostId="1212" RevisionGUID="2b20b1ad-fa52-4c5b-b127-e033d2648990" CreationDate="2010-07-22T15:36:13.477" UserId="214" Text="&lt;game-design&gt;&lt;events&gt;" />
  <row Id="2234" PostHistoryTypeId="2" PostId="1213" RevisionGUID="d5e4efc2-bf00-4be7-8b5e-069618d4b99f" CreationDate="2010-07-22T15:39:49.203" UserId="764" Text="I'm creating an online game and would like to have some forums or a Wiki to allow discussion and gather feedback etc. among the soon-to-be community.&#xD;&#xA;&#xD;&#xA;I'm looking specifically for:&#xD;&#xA;&#xD;&#xA; - Low administrative burden (a hosted solution would be ideal)&#xD;&#xA; - Ability to theme the site / make it look attractive (my game has a &quot;Steampunk&quot; theme) &#xD;&#xA;&#xD;&#xA;What solutions would you recommend?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2235" PostHistoryTypeId="1" PostId="1213" RevisionGUID="d5e4efc2-bf00-4be7-8b5e-069618d4b99f" CreationDate="2010-07-22T15:39:49.203" UserId="764" Text="Setting up forums/wiki for an independent game project" />
  <row Id="2236" PostHistoryTypeId="3" PostId="1213" RevisionGUID="d5e4efc2-bf00-4be7-8b5e-069618d4b99f" CreationDate="2010-07-22T15:39:49.203" UserId="764" Text="&lt;game-design&gt;&lt;web&gt;" />
  <row Id="2237" PostHistoryTypeId="2" PostId="1214" RevisionGUID="bdf52e46-577c-48f8-9baa-33ac053beed0" CreationDate="2010-07-22T15:42:52.353" UserId="801" Text="I was just about to pick up &quot;Tricks of the 3D Game Programming Gurus&quot; (volume II). It seems really good on the 3d theory side and keeps everything simple from what I saw. I tried to pick up Direct3D/OpenGL alone but I'm like you - I had no idea. " />
  <row Id="2238" PostHistoryTypeId="2" PostId="1215" RevisionGUID="cbdb1fdf-3b0b-4d1b-9937-3bf71da0afca" CreationDate="2010-07-22T15:47:35.567" UserId="801" Text="My only book on OpenGL is &quot;OpenGL SuperBible, 4th edition&quot; and 5th is about to be released in a few weeks. I think it's good for both beginners and advanced programmers." />
  <row Id="2239" PostHistoryTypeId="2" PostId="1216" RevisionGUID="c8d0c70e-fa99-4f51-806e-1ddde6a8393c" CreationDate="2010-07-22T15:48:12.633" UserId="214" Text="For some reason, people often underrate the power of design patterns in games. I've seen nearly every single GoF pattern applied with success to games." />
  <row Id="2240" PostHistoryTypeId="16" PostId="1216" RevisionGUID="c8d0c70e-fa99-4f51-806e-1ddde6a8393c" CreationDate="2010-07-22T15:48:12.633" UserId="-1" />
  <row Id="2241" PostHistoryTypeId="2" PostId="1217" RevisionGUID="c905ccb0-a470-4c21-a722-70b6ffe0d767" CreationDate="2010-07-22T15:48:14.957" UserId="465" Text="Events system are powerful, and can be made very fast.&#xD;&#xA;&#xD;&#xA;They also allow you to modulise sections of code in a very loose coupling structure.&#xD;&#xA;They let you job batch things and thread off tasks. The work well with multi-core and asynchronous functions.&#xD;&#xA;&#xD;&#xA;Physics - Collision Callbacks, Activate or Rest Objects translate well to events.&#xD;&#xA;Networking - As much as possible should be an event (voice chat ect.. the exception)&#xD;&#xA;Game Logic - Naturally lends itself to an event model&#xD;&#xA;Menus &amp; UI - Work brilliant in an event based system&#xD;&#xA;&#xD;&#xA;Also many modern consoles, and middle-ware libraries use events.&#xD;&#xA;&#xD;&#xA;The renderer and polling of input devices can be a bit confusing to fit in. Especially if you are using motion controls, as events can introduce a noticeable latency and be counter-intuitive to polling format." />
  <row Id="2242" PostHistoryTypeId="2" PostId="1218" RevisionGUID="58c1f4b3-cde7-45e1-a423-bee0db317c6f" CreationDate="2010-07-22T15:48:30.277" UserId="802" Text="I would say that using the main loop style is still recommended: It is fast, it gives you total control over the order of the actions (this is important in a game) and it is harder to make mistakes coding it. However, if the technology you are using allows you to easily use events, it can be really useful for a lot of things. For instance, I use them to notify when and where the enemies die, when the keyboard keys are pressed... &#xD;&#xA;&#xD;&#xA;In conclusion: Use the game loop to control the main logic of the game, but have in mind that events can be useful in other situations." />
  <row Id="2243" PostHistoryTypeId="4" PostId="20" RevisionGUID="580a61ca-fc43-4064-94d9-a372765460cb" CreationDate="2010-07-22T15:48:31.493" UserId="51" Comment="edited tags; edited title" Text="Where can I find free sprites and images?" />
  <row Id="2244" PostHistoryTypeId="6" PostId="20" RevisionGUID="580a61ca-fc43-4064-94d9-a372765460cb" CreationDate="2010-07-22T15:48:31.493" UserId="51" Comment="edited tags; edited title" Text="&lt;assets&gt;&lt;graphics&gt;&lt;sprites&gt;&lt;textures&gt;" />
  <row Id="2245" PostHistoryTypeId="5" PostId="1157" RevisionGUID="40378459-8b58-46ff-9e60-21acb8c11cf2" CreationDate="2010-07-22T15:50:11.027" UserId="51" Comment="added 4 characters in body; edited tags; edited title" Text="I've been thinking about developing a small engine not only to develop small experimental games, but also to serve as a base to test various rendering techniques and things like that. Right now I've been thinking a lot about how to handle textures and stumbled on megatexture, but this is something that is a bit puzzling. There is a lot of talk of it being better than the traditional approach to having a bunch of textures around and loading them as needed, but how does megatexture avoid this, I've read around that they use streaming and you can just stream bits and pieces of it as opposed to loading each texture individually, but how does that offer better performance, and isn't that just another for of tilling?&#xD;&#xA;&#xD;&#xA;How do we sample such a texture when in a shader, do we stream part of it into memory then work on it. I've seen the latest videos of Rage and the texture do look great, but is that just the result of great artists or does the tech come into play.&#xD;&#xA;&#xD;&#xA;To sum up, how does it work, why is it great and how could I do something similar.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="2246" PostHistoryTypeId="4" PostId="1157" RevisionGUID="40378459-8b58-46ff-9e60-21acb8c11cf2" CreationDate="2010-07-22T15:50:11.027" UserId="51" Comment="added 4 characters in body; edited tags; edited title" Text="How does Megatexture work? " />
  <row Id="2247" PostHistoryTypeId="6" PostId="1157" RevisionGUID="40378459-8b58-46ff-9e60-21acb8c11cf2" CreationDate="2010-07-22T15:50:11.027" UserId="51" Comment="added 4 characters in body; edited tags; edited title" Text="&lt;textures&gt;" />
  <row Id="2248" PostHistoryTypeId="2" PostId="1219" RevisionGUID="3e8e6674-5f48-4056-b9cd-a7d3479ba8db" CreationDate="2010-07-22T15:50:44.893" UserId="13" Text="I faced the same issue some time ago and found those two books which have really good reviews:&#xD;&#xA;&#xD;&#xA; - [3D Math Primer for Graphics and Game Development][1]&#xD;&#xA; - [Essential Mathematics for Games and Interactive Applications][2]&#xD;&#xA;&#xD;&#xA;The first one seems to be easier to understand for math dummies like myself. I already bought that one, alas I didn't have the time to read it up till now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279813716&amp;sr=8-1&#xD;&#xA;  [2]: http://www.amazon.com/Essential-Mathematics-Interactive-Applications-Second/dp/0123742978/ref=sr_1_10?ie=UTF8&amp;s=books&amp;qid=1279813716&amp;sr=8-10" />
  <row Id="2249" PostHistoryTypeId="6" PostId="1185" RevisionGUID="c1c3a775-f879-45c5-adec-b8a46bd16eab" CreationDate="2010-07-22T15:51:19.090" UserId="778" Comment="edited tags" Text="&lt;c++&gt;&lt;windows&gt;" />
  <row Id="2250" PostHistoryTypeId="2" PostId="1220" RevisionGUID="6e5f56c1-b086-4646-8bf7-7d8b8da6c5aa" CreationDate="2010-07-22T15:52:11.180" UserId="804" Text="Also once you have gotten sponsorship (or decided against it) and implemented ads like MochiAds, throw your game onto these two distribution systems, which will let all the many many smaller sites grab your game:&#xD;&#xA;&#xD;&#xA; - [Mochi Game Distribution][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://en.mochimedia.com/developers/distribution.html" />
  <row Id="2252" PostHistoryTypeId="2" PostId="1222" RevisionGUID="41e2f7e8-3230-44f8-843c-7bdf52337305" CreationDate="2010-07-22T16:02:31.050" UserId="522" Text="This question would be much better suited for the [Web Applications][1] Stack Exchange site.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://webapps.stackexchange.com/" />
  <row Id="2253" PostHistoryTypeId="2" PostId="1223" RevisionGUID="accbda24-15a5-4e58-b73e-ed54c5cf7402" CreationDate="2010-07-22T16:05:09.160" UserId="804" Text="[Dwarf Fortress][1] is a good example of a freeware game that started releasing to the public early and then kept being expanded as people tried it. I think you have little to lose if you make it available as soon as it's playable to get early feedback.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bay12games.com/dwarves/" />
  <row Id="2254" PostHistoryTypeId="12" PostId="1214" RevisionGUID="bd5eb7ad-01ca-438d-ae22-e8d3fc5dd9e6" CreationDate="2010-07-22T16:07:19.907" UserId="801" Text="[{&quot;Id&quot;:801,&quot;DisplayName&quot;:&quot;Phil&quot;}]" />
  <row Id="2255" PostHistoryTypeId="2" PostId="1224" RevisionGUID="d098316f-579c-421a-a024-3d598a99944c" CreationDate="2010-07-22T16:07:59.190" UserId="800" Text="These aren't &quot;free&quot; but they might help during developmental stages...&#xD;&#xA;&#xD;&#xA;http://www.gsarchives.net/index2.php&#xD;&#xA;&#xD;&#xA;(Don't release your game to public with these in them... you might get a sued, who knows)" />
  <row Id="2256" PostHistoryTypeId="5" PostId="1215" RevisionGUID="198f4aa6-f853-4fa0-adee-9d949037c5c6" CreationDate="2010-07-22T16:15:46.890" UserId="801" Comment="added 444 characters in body" Text="My only book on OpenGL is &quot;OpenGL SuperBible, 4th edition&quot; and 5th is about to be released in a few weeks. I think it's good for both beginners and advanced programmers.&#xD;&#xA;&#xD;&#xA;Edit: I might add don't go for the latest technology trends if you're just learning to program. Chances are once you become an expert using one methology, 5 new interfaces / versions just released. We've seen shaders advance every 3 months, it seems. So pick what has the best documentation (generally primitives), make a few programs, and gradually advance because more than likely you'll bump into older code in the future. Hope it helps!" />
  <row Id="2257" PostHistoryTypeId="2" PostId="1225" RevisionGUID="1c0d1cce-4ba1-4b77-8e3e-3bd59716eb7a" CreationDate="2010-07-22T16:15:54.130" UserId="804" Text="If you are a programmer then I'd recommend Flex, which is Adobe's free SDK which compiles flex  (essentially ActionScript) projects into Flash SWFs. This way you never have to muck around with the horrible Flash timeline etc.&#xD;&#xA;&#xD;&#xA;The SDK to compile is free, and Adobe sell the IDE Flex Builder (now called Flash Builder for some reason) for loadsa money. But instead you can happily use any IDE you like; I'd recommend FlashDevelop which is totally free and can integrate the Flex compiler. &#xD;&#xA;&#xD;&#xA;I'd also recommend the Flixel framework which works nicely with Flex + FlashDevelop. See http://flashgamedojo.com/wiki/index.php?title=Hello_World_-_FlashDevelop(Flixel)" />
  <row Id="2258" PostHistoryTypeId="2" PostId="1226" RevisionGUID="90b2ef80-5e59-41b7-b06a-8e9fca5bd356" CreationDate="2010-07-22T16:16:42.897" UserId="458" Text="In addition to using additional differentiating features beyond color (such as shape or text), using a different amount of color saturation in different colors will make them look different, even if the colors themselves appear the same." />
  <row Id="2259" PostHistoryTypeId="2" PostId="1227" RevisionGUID="cdef75ad-dd02-4fc9-9b5b-de4e6ec894e9" CreationDate="2010-07-22T16:23:43.887" UserId="251" Text="This is an interesting topic, I often refer back to this page: http://wearecolorblind.com/articles/quick-tips/ and the resources linked above seem quite good too.&#xD;&#xA;&#xD;&#xA;Some of the issues are not as severe as you might think: for example red and green gems in a matching game may be perfectly fine if one is brighter (usually that would be green).&#xD;&#xA;&#xD;&#xA;I actually had the chance to test Audiosurf on a colourblind user for a class, and found there was only one issue. For those who don't know it, Audiosurf involves matching coloured blocks (red, yellow, green, blue and purple) in most modes, however the &quot;mono&quot; mode reduces them to coloured blocks that change colour and grey blocks. In mono mode the objective is to collect all the coloured blocks and avoid all grey ones, but at some points they looked identical to the colour blind user.&#xD;&#xA;&#xD;&#xA;Audiosurf now includes the ability to change block colour settings. Valve games also often have a &quot;colour blind&quot; mode which may be worth looking at. So I'd say with so many colour blind people around, you may be able to find some test subjects of your own and check any gaps with the vischeck plugin linked above." />
  <row Id="2260" PostHistoryTypeId="2" PostId="1228" RevisionGUID="d3d27dc6-b513-42e5-93e5-faec547a2488" CreationDate="2010-07-22T16:29:44.367" UserId="389" Text="I'd like to make an isometric run-jump style platformer. The player should be able to jump on top of platforms above the floor, hit the side of objects etc.   I'm thinking objects in the game should be placed using: x, y, width, height, and z for depth. Using those values, how should I detect collisions?" />
  <row Id="2261" PostHistoryTypeId="1" PostId="1228" RevisionGUID="d3d27dc6-b513-42e5-93e5-faec547a2488" CreationDate="2010-07-22T16:29:44.367" UserId="389" Text="How do I handle Isometric collision detection?" />
  <row Id="2262" PostHistoryTypeId="3" PostId="1228" RevisionGUID="d3d27dc6-b513-42e5-93e5-faec547a2488" CreationDate="2010-07-22T16:29:44.367" UserId="389" Text="&lt;collision-detection&gt;&lt;planning&gt;" />
  <row Id="2263" PostHistoryTypeId="2" PostId="1229" RevisionGUID="87b526b1-b0a0-4fbc-81f1-0237d9b7d7ff" CreationDate="2010-07-22T16:35:54.500" UserId="803" Text="There are a lot of ways you could simplify this. For example, if you didn't allow layers (for example, a bridge you can both walk over and under, you could do all the collision detecting in X/Y dimensions, where you filter the collision set to anything of its height+depth or higher." />
  <row Id="2264" PostHistoryTypeId="16" PostId="1229" RevisionGUID="87b526b1-b0a0-4fbc-81f1-0237d9b7d7ff" CreationDate="2010-07-22T16:35:54.500" UserId="803" />
  <row Id="2265" PostHistoryTypeId="13" PostId="1214" RevisionGUID="7cfe1862-2aaf-42bc-b97f-f1f3f0852310" CreationDate="2010-07-22T16:47:42.537" UserId="801" Text="[{&quot;Id&quot;:801,&quot;DisplayName&quot;:&quot;Phil&quot;}]" />
  <row Id="2266" PostHistoryTypeId="2" PostId="1230" RevisionGUID="dc16ffec-55cc-418e-acf0-d487617b2329" CreationDate="2010-07-22T16:48:25.033" UserId="154" Text="The most common form of colorblindness you have to deal with is red/green. It effects ~7% of the male population in the US, not sure how well that holds up globally, as it's slightly more prevalent in Caucasians. The only other common form is also green oriented. The others are forms are often found in less than 1% of the population.&#xD;&#xA;&#xD;&#xA;Unfortunately Red/Green are used pretty commonly to designate stop/go and bad/good culturally, at least in the US. The three best options as have been mentioned are to include shape differences as well as color, use different values/saturations, and most commonly avoid green as an identifier when possible. Hence the reason good guys &amp; bad guys are often designated as Red vs. Blue in games." />
  <row Id="2269" PostHistoryTypeId="2" PostId="1232" RevisionGUID="1a2822b3-1662-4daf-95fc-6d21a0271eeb" CreationDate="2010-07-22T17:10:10.943" UserId="55" Text="You're in luck! I just discovered some Linear Algebra tutorials on Wolfire's blog that I felt were really good. The guy writing the tutorials, David, has such a killer way to explain the stuff. It's extremely handy for those that are weak at math since it is showing more practical application than theory (which is what someone weak could use)&#xD;&#xA;&#xD;&#xA; - [Part 1][1] - Vectors addition, subtraction, scalar-vector multiplication&#xD;&#xA; - [Part 2][2] - Vectors length, distance, normalization, dot product, cross product&#xD;&#xA; - [Part 3][3] - Basis vectors, matrices, 3d matricies&#xD;&#xA;&#xD;&#xA;Be sure to add this to your RSS reader. He is continually writing new posts. Don't forget to **read the comments**! &#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1&#xD;&#xA;  [2]: http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-2&#xD;&#xA;  [3]: http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-3" />
  <row Id="2270" PostHistoryTypeId="2" PostId="1233" RevisionGUID="db63e2b0-e5bb-4277-98a3-7fece20ddf4b" CreationDate="2010-07-22T17:16:41.150" UserId="400" Text="One of my favorites is the assembly language version of 'Life', and the whole description of optimizing it , in &quot;[The Zen of Code Optimization&quot;][1] by Michael Abrash.   &#xD;&#xA;&#xD;&#xA;I'd recommend any of his books to anyone looking for coding gems.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Zen-Code-Optimization-Ultimate-Software/dp/1883577039" />
  <row Id="2271" PostHistoryTypeId="16" PostId="1233" RevisionGUID="db63e2b0-e5bb-4277-98a3-7fece20ddf4b" CreationDate="2010-07-22T17:16:41.150" UserId="-1" />
  <row Id="2272" PostHistoryTypeId="2" PostId="1234" RevisionGUID="b77cdebc-1ac2-4e8d-9d86-f252ba026c50" CreationDate="2010-07-22T17:16:44.833" UserId="154" Text="The biggest effect on the PC will be input latency and framerate. &#xD;&#xA;&#xD;&#xA;Here is an [article][1] on the subject&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net/blog/?p=30" />
  <row Id="2273" PostHistoryTypeId="2" PostId="1235" RevisionGUID="1edf35fd-9bbc-4993-a891-7d132dbdcaa1" CreationDate="2010-07-22T17:25:07.797" UserId="818" Text="The most difficult part about writing a game--or any software--is figuring out what to do.  *You absolutely need a spec!*  That's the fun part about making a clone of an existing game: the spec already exists.  Your spec is &quot;Product must do everything that Other Product does,&quot; and if you have a copy of the other game on hand, then it's pretty easy to verify that.&#xD;&#xA;&#xD;&#xA;Once you've figured out **what** you need to do, figuring out **how** to do it is really not that difficult if you're a competent programmer.  I don't mean a skilled or experienced programmer; that would imply that you already know how to do most of what you're trying to do.  But you need to understand how to think in abstractions and have the problem-solving and logical thought skills that are fundamental to programming.  If you can do that, then you can do anything.&#xD;&#xA;&#xD;&#xA;Having said that, I disagree with what most people say about trying to learn to write games by writing something really simple.  The reward is directly proportional to the effort you put into it.  If you learn to write games by writing a really simple game, all you'll know at the end is *how to write really simple games,* and that won't do you much good.&#xD;&#xA;&#xD;&#xA;On the other hand, if you start with something overwhelming, you'll never finish it.  So start with something moderately challenging that will make you deal with serious issues.  Building a 2D console-style RPG or a side-scrolling platformer are very good ways to learn real game programming concepts." />
  <row Id="2274" PostHistoryTypeId="2" PostId="1236" RevisionGUID="57446368-a185-495a-8afa-e4d1db2b3815" CreationDate="2010-07-22T17:25:34.897" UserDisplayName="Bonues" Text="Well you could have a separate collision layer above your level that is not visible and use that to check for collision.. You can also use this for multiple layers as long as you know on which layer the player is ;) " />
  <row Id="2275" PostHistoryTypeId="5" PostId="1232" RevisionGUID="d89dec4c-e9a1-442b-ae5a-2e6136ecbd9b" CreationDate="2010-07-22T17:34:03.010" UserId="55" Comment="added 3 characters in body; deleted 1 characters in body; added 1 characters in body; edited body" Text="You're in luck! I just discovered some Linear Algebra tutorials on Wolfire's blog that I felt were really good. The guy writing the tutorials, David, has such a killer way to explain the stuff. It's extremely handy for those that are weak at math since it is showing more practical application than theory (which is what someone weak could use)&#xD;&#xA;&#xD;&#xA; - [Part 1][1] - Vectors addition, subtraction, scalar-vector multiplication&#xD;&#xA; - [Part 2][2] - Vectors length, distance, normalization, dot product, cross product&#xD;&#xA; - [Part 3][3] - Basis vectors, matrices, 3d matricies&#xD;&#xA;&#xD;&#xA;Be sure to add this to your RSS reader. He is continually writing new posts. Don't forget to **read the comments**! &#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;  [2]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/&#xD;&#xA;  [3]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/" />
  <row Id="2276" PostHistoryTypeId="2" PostId="1237" RevisionGUID="6731290c-8a4e-498a-840a-fe9412f0b9e9" CreationDate="2010-07-22T17:36:15.393" UserId="400" Text="You need to be &quot;Reticulating Splines&quot;" />
  <row Id="2277" PostHistoryTypeId="16" PostId="854" RevisionGUID="6c2a7417-79a9-4b91-b06d-7244f7ef525d" CreationDate="2010-07-22T17:38:12.783" UserId="155" />
  <row Id="2278" PostHistoryTypeId="2" PostId="1238" RevisionGUID="ac1031c7-9c0d-403d-ad2e-2c76b16d617e" CreationDate="2010-07-22T17:43:56.050" UserId="824" Text="There's quite a bit of information about this in Game Engine Architecture ( http://www.gameenginebook.com/ ).&#xD;&#xA;&#xD;&#xA;In general you often have a state machine that specifies which animations can transition into which, and how that transition is done. For special cases like the main character, you also often need to hook the transitions into custom hard coded functions for doing various things - there's generally more logic to the main character player mechanics than to NPCs." />
  <row Id="2279" PostHistoryTypeId="2" PostId="1239" RevisionGUID="854a96a2-2088-4501-83ca-d35371a5fd0f" CreationDate="2010-07-22T17:46:50.367" UserId="824" Text="I can see two reasons: Either they use different ways of measuring time (as you suggest), or, you have a AMD chip. These can in some cases have timing bugs that you need to either patch through a driver (I think) or handle in your application logic. Google for &quot;AMD timing&quot; and you will probably find something that might be of use." />
  <row Id="2280" PostHistoryTypeId="2" PostId="1240" RevisionGUID="a2b2acff-5109-4894-a18e-6df7b710e4b4" CreationDate="2010-07-22T17:49:23.217" UserId="181" Text="How does that save any significant amount of time? Presuming you handle the rotation in a vertex shader, that only saves time if you're VS bound.&#xD;&#xA;&#xD;&#xA;If you are talking about a fixed-function pipeline, it's much cheaper to precompute the rotated edge vectors for the quads you are using. Rotating the texture is then done by the GPU. The only way that might incur additional cost is if you use a software renderer.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2281" PostHistoryTypeId="2" PostId="1241" RevisionGUID="05efcc66-4d29-4919-a29a-249127debaa9" CreationDate="2010-07-22T17:53:16.143" UserId="400" Text="The articles about game design on [Lost Garden][1] have a lot of interesting ideas about evaluating fun.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/2008/07/directory-of-posts.html" />
  <row Id="2282" PostHistoryTypeId="2" PostId="1242" RevisionGUID="c815f9aa-c1ce-4c6f-b988-79123c067444" CreationDate="2010-07-22T18:04:42.407" UserId="181" Text="Yes, it does use a different source. If you look at the Windows documentation (http://msdn.microsoft.com/en-us/library/ms725496%28VS.85%29.aspx) you will see that you should use GetTickCount/GetTickCount64 to compare against the message time.&#xD;&#xA;&#xD;&#xA;If you need any kind of precision, I suggest not relying on the message time - GetTickCount has *horrible* resolution. (10-16ms)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2286" PostHistoryTypeId="2" PostId="1244" RevisionGUID="d4a6fdea-9693-42da-b8c8-d7cdfac079d9" CreationDate="2010-07-22T18:10:23.127" UserId="834" Text="Multiple currencies works for a lot of Facebook games. Consider Mafia Wars - when dollars were too inflated, they added &quot;Cuba&quot; which required an entirely separate currency. Then later Bangkok, etc. Also it's fairly standard in Facebook games to have a separate currency that you can only acquire large amounts of by paying real money. This way, the basic currency can inflate a lot without affecting the for-pay currency that much." />
  <row Id="2287" PostHistoryTypeId="2" PostId="1245" RevisionGUID="fe3bf98a-bb3f-4262-b889-8958901c4d66" CreationDate="2010-07-22T18:16:38.233" UserId="712" Text="Can anybody guide me about where can I get the basic starter tutorials for developing using XNA framework?" />
  <row Id="2288" PostHistoryTypeId="1" PostId="1245" RevisionGUID="fe3bf98a-bb3f-4262-b889-8958901c4d66" CreationDate="2010-07-22T18:16:38.233" UserId="712" Text="XNA development tutorials" />
  <row Id="2289" PostHistoryTypeId="3" PostId="1245" RevisionGUID="fe3bf98a-bb3f-4262-b889-8958901c4d66" CreationDate="2010-07-22T18:16:38.233" UserId="712" Text="&lt;c#&gt;&lt;xna&gt;&lt;tutorials&gt;&lt;beginner&gt;" />
  <row Id="2291" PostHistoryTypeId="2" PostId="1247" RevisionGUID="d6c035b0-7066-4dc3-aaa3-f30396b718a4" CreationDate="2010-07-22T18:23:39.920" UserId="825" Text="(Silly that I can only post one link as a &quot;new user&quot;)&#xD;&#xA;&#xD;&#xA;If you haven't already looked through it, the XNA Creator's Club has quite a bit of resources: &#xD;&#xA;http://creators.xna.com/en-US/education/&#xD;&#xA;&#xD;&#xA;Also, the first result when you search Google for &quot;xna shader tutorials&quot; has links to some great tutorials to learn Shader programming for XNA.&#xD;&#xA;&#xD;&#xA;First result when you search Google for &quot;xna development site&quot; has a few tutorials in their Tutorial tab.&#xD;&#xA;&#xD;&#xA;Good luck!  (Sorry again for the lack of links.)" />
  <row Id="2292" PostHistoryTypeId="2" PostId="1248" RevisionGUID="afb5dc61-2727-4da8-a86d-bef0a388359d" CreationDate="2010-07-22T18:24:53.973" UserId="119" Text="2 options:&#xD;&#xA; &#xD;&#xA;- You could treat it as a 3D game with a fixed orthographic camera. Then you could use any standard 3D games resources / books / tutorials / libraries.&#xD;&#xA;&#xD;&#xA;- You could treat it as a top-down 2D game, with an added height property. For example, imagine a 2D grid where each tile has a height value. When moving from one tile to another, you only let a character pass to a particular tile if the characters feet are above of equal to the height of that tile, but if they are jumping and gravity brings them down on top of a tile, you let them remain there. With a bit more work you could make it so you can walk under bridges etc." />
  <row Id="2293" PostHistoryTypeId="5" PostId="1204" RevisionGUID="0e2b4415-6ba2-40a5-ac38-20bbe93f9655" CreationDate="2010-07-22T18:28:41.547" UserId="441" Comment="added 1 characters in body" Text="Dave mentions some excellent points, although I have to point out that Haskell has solved both of his issues. Statelessness can be bypassed using the State monad, and sequencing can be handled using the IO monad. &#xD;&#xA;&#xD;&#xA;The challenges you'll have (and that I've had trying to learn both games programming and Haskell), are more along these lines. (These are all Haskell-specific, since I really haven't gone deep with any other FP languages yet.)&#xD;&#xA;&#xD;&#xA; - **FP Learning curve:** FP requires a complete shift of mindset from iterative programming. Learning to think in terms of maps and folds rather than loops requires a mental workout if you're not used to it. &#xD;&#xA; - **Mathy learning curve:** Haskell is both blessed and cursed by the mathematical sophistication of its designers, because after you learn the basics of FP, you're stuck with monads, morphisms, arrows, and a whole host of other considerations which, while not tough in and of themselves, are very abstract. &#xD;&#xA; - **Monads:** these puppies are not particularly hard to wrap your mind around, especially if you accept [Eric Raymond's statement][1] that they are a &quot;a hack to turn function composition into a way of forcing the sequencing of function calls.&quot; Unfortunately (though this is getting better as Haskell gains in popularity), many explanations of monads either aim way over the head of most programmers (&quot;they're monoids in the category of endofunctors!&quot;), or at a completely unhelpful analogy (e.g., Brent Yorgey's distressingly accurate example, &quot;[monads are like burritos][2]!&quot; You think he's kidding? That nobody could ever come up with such a goofy analogy in a tutorial? [Think again][3].)&#xD;&#xA; - **Ecosystem:** If you've managed to get beyond all the other bumps in the road, you will be cheek-and-jowl up against the practical day-to-day reality of working with a still largely experimental language. God help you when you get here. Here's where I started seriously jonesing for Scala, or F#, or some other language where there is at least *some* guarantee of interoperability with other libraries. Once upon a time, I got Haskell to link and load the OpenGL libraries in Windows. That made me feel pretty good. Then the OpenGL bindings were re-released, and broke everything I had done. That's life in Haskell-land. Honestly, it can be a pain. You want a wrapper for the Bullet engine? It's in Hackage -- as [abandonware][4] from November of last year. You like Ogre3d? Hackage has bindings to [only a subset of the library][5].  Bottom line is that if you stick to a language off the beaten path for game development, you will spend a lot more time working on basic plumbing than you would if you just followed the herd and stuck with C++.&#xD;&#xA;&#xD;&#xA;The flip side of this is that things are rapidly improving. And it really all depends on what you want out of the experience. You want to build a game and put it on your website to seek fame and fortune? Stick with C++ or Python. But if you want to learn something new that will require you to innovate your processes, try a functional language. Just have a lot of patience with yourself while you're learning. &#xD;&#xA;&#xD;&#xA;Antti Salonen has an interesting blog detailing his [on-again-off-again affair][6] with Haskell games programming. It's worth reading. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://esr.ibiblio.org/?p=1796&#xD;&#xA;  [2]: http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/&#xD;&#xA;  [3]: http://www.haskell.org/haskellwiki/Meet_Bob_The_Monadic_Lover&#xD;&#xA;  [4]: http://hackage.haskell.org/package/bullet&#xD;&#xA;  [5]: http://hackage.haskell.org/package/hogre&#xD;&#xA;  [6]: http://codeflow.wordpress.com/" />
  <row Id="2294" PostHistoryTypeId="5" PostId="1248" RevisionGUID="d7e16703-624d-4197-a159-69f82c155048" CreationDate="2010-07-22T18:32:32.630" UserId="119" Comment="added 151 characters in body" Text="2 options:&#xD;&#xA; &#xD;&#xA;- You could treat it as a 3D game with a fixed orthographic camera. Then you could use any standard 3D games resources / books / tutorials / libraries. Even if it rendered in 2D with sprites, the maths for movement etc would still be 3D behind the scene. This would give you the most accurate results.&#xD;&#xA;&#xD;&#xA;- You could treat it as a top-down 2D game, with an added height property. For example, imagine a 2D grid where each tile has a height value. When moving from one tile to another, you only let a character pass to a particular tile if the character's feet are above or equal to the height of that tile, but if they are jumping and gravity brings them down on top of a tile, you let them remain there. With a bit more work you could make it so you can walk under bridges etc." />
  <row Id="2295" PostHistoryTypeId="2" PostId="1249" RevisionGUID="98fe9468-139b-41b0-8cdf-b2352cc8f6d3" CreationDate="2010-07-22T18:43:56.850" UserId="840" Text="Check up clipmapping for the pre-existing SGI hardware implementation.&#xD;&#xA;&#xD;&#xA;More recently Megatexture is being used as a pr name for Sparse Virtual Texturing(SVT)&#xD;&#xA;&#xD;&#xA;SVT render a small resolution camera view, noting which texture and mipmap will be needed. Then a CPU routine issues loads to the disk system to bring those texture/mip chunk into memory (if not in memory) and then the loaded texture chunk is placed into a section of a large texture atlas (usually in chunks of say 128x128)&#xD;&#xA;&#xD;&#xA;As texture chunks are brought in, a redirection texture (a virtual page map) is updated which take a models required textures and redirects it to the particular part of the large texture where its actually stored." />
  <row Id="2297" PostHistoryTypeId="2" PostId="1251" RevisionGUID="53a5683f-21de-468f-9e45-235ac3c621fd" CreationDate="2010-07-22T18:46:22.743" UserId="842" Text="Normally when I approach character design I work on the character model first, once I have a good starting point I start to add &quot;bones&quot; and &quot;weighting&quot; for the &quot;skin&quot; of the model.&#xD;&#xA;&#xD;&#xA;You mentioned a skeleton, and in this regards I believe that these are the same.  The bones act as the handles that you grab to control shaping the model.  I start from the head to the center of the neck, two out to the shoulders and one down to the torso.&#xD;&#xA;&#xD;&#xA;From the shoulders I go out to the elbow and then to the wrist/hand (the hands can be as simple as one bone or as complicated as three in the center of the hand and three for each finger, two for the thumb - but I rarely go that deep).&#xD;&#xA;&#xD;&#xA;From the torso, I do two for the ridged hip and then down to the knee, to the ankle and one for the foot (with shoe or simple, as the hands this can become as complicated as you'd like).&#xD;&#xA;&#xD;&#xA;The less bones you have to place in your character the less you have to deal with in terms of data mechanics/control points.  If you have a lot of bones then it will take more time to map the weighting for the surface material — add as you need to, but keep it simple.&#xD;&#xA;&#xD;&#xA;Depending on what you're doing with the model depends on the next steps.  If you're rendering out the animation sequences you can build out a series of animation types.  One file per animation from a normalized starting point.  Then build out, walking, running, jumping and other animation sequences.  Render out and then create keyframes for moving from one point to another.&#xD;&#xA;&#xD;&#xA;If you're actually building a model to us in a 3D application then the model must be adjusted within the code.  Create a series of animation sequences, much like you would with keyframing, but shorter/in-between steps, and then &quot;tween&quot; the sequences.  This will allow you to start a walking sequence and add a look left to the &quot;animation stack&quot; at the same time without having to write a &quot;walk and look left&quot; sequence.&#xD;&#xA;&#xD;&#xA;Creating animation mix-ins is handled in code and again, this is another good reason to have as little bones as possible in your model.&#xD;&#xA;&#xD;&#xA;You can also create/use motion capture models and attach the model to the keyframe sequence of the bones of your model.  This allows you to use the same &quot;action&quot; on various models (and associated bone rigging).&#xD;&#xA;&#xD;&#xA;And yes, the standard way (in the past) was to keyframe each animation block (and then render it out) and then change from one state to the next, much like Srekel's suggestion.  This goes back to the days of sprite animation where keyframes were used in story boards and the animators just had to fill in the &quot;tweens&quot; or frames in between the two keyframes.  As mentioned this is older and not as flexible as current systems allow.&#xD;&#xA;&#xD;&#xA;Think of a 3D model like an avatar in World of Warcraft or the like.  In the selection screen the model stands there, and at times shifts weight from one foot to the other, or will blink or look in a direction.  These are all small fragments of motion (animation blocks) that are just added in realtime so that the character has a more dynamic appearance and not static like those old Mortal Combat games.  (^_^)&#xD;&#xA;&#xD;&#xA;I'll see if I can find a couple of links for you and try to remember to post them here for you.&#xD;&#xA;&#xD;&#xA;Also, I'm not an expert in this field but I do like to play in it.  So, take my comments with a grain, dash, spoon or pillar of salt and good luck in your animating endevors!&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Kevin" />
  <row Id="2299" PostHistoryTypeId="2" PostId="1253" RevisionGUID="a27f7e38-c60a-4c4d-bd6f-afe341ec1adf" CreationDate="2010-07-22T18:52:06.540" UserId="824" Text="As others have said, if you can load all of a level's data before you start playing it, then you'll have much better performance. It's a common source of hitches in frame time to load assets during gameplay.&#xD;&#xA;&#xD;&#xA;Common things to do during a loading screen is a static background image, a very simple level, some tips and tricks on how to play, quick animations, etc.&#xD;&#xA;&#xD;&#xA;Here's the loading screen for APB. Pretty freaking cool. :)&#xD;&#xA;http://www.youtube.com/watch?v=p5STix1t_1E&amp;feature=related&#xD;&#xA;&#xD;&#xA;Here's some pseudo code for showing a progress bar in a loading screen:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;&#xD;&#xA;LoadScreen::Init()&#xD;&#xA;{&#xD;&#xA;  mAssetsToLoad.add(&quot;Background.png&quot;);&#xD;&#xA;  mAssetsToLoad.add(&quot;Player.png&quot;);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;LoadScreen::Update()&#xD;&#xA;{&#xD;&#xA;  mProgress += 1;&#xD;&#xA;  mAssetManager.load(mAssetsToLoad.top());&#xD;&#xA;  mAssetsToLoad.pop();&#xD;&#xA;&#xD;&#xA;  if mAssetsToLoad.empty()&#xD;&#xA;    mDone = true;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;LoadScreen::Draw()&#xD;&#xA;{&#xD;&#xA;  for( int i = 0; i != mProgress; ++i)&#xD;&#xA;  {&#xD;&#xA;     Vector2 pos(i*mProgressPartTexture.Width, 100);&#xD;&#xA;     DrawProgressBarPart(pos, mProgressPartTexture);&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Ugh, forced to use != because it broke off the code rendering when I used &lt;" />
  <row Id="2302" PostHistoryTypeId="2" PostId="1255" RevisionGUID="00e506c8-057d-42d1-8a88-8b3c91c1fdf2" CreationDate="2010-07-22T18:56:13.940" UserId="452" Text="Yep, an animator creates each animation (falling, walking, idle) in a specialized program, as well as intermediary states between those (idle to combat ready, starting to walk, stopping). A finite state machine is used to describe what animation states can lead to which seamlessly - this can be implemented by the game engine or not.&#xD;&#xA;&#xD;&#xA;Modern engines can interpolate between two animations, so there's no need for the intermediary animations and pretty much any animation can lead to any other. &#xD;&#xA;&#xD;&#xA;Common problems with this method: Animations need to be tailored to each model (or fatter models will intersect themselves when crossing their arms) and don´t adapt themselves to surrounding terrain (walking up a ramp uses the same animation as walking down one)" />
  <row Id="2304" PostHistoryTypeId="2" PostId="1257" RevisionGUID="3e23d00c-cfde-4950-a4e9-59995e5c3535" CreationDate="2010-07-22T19:06:33.623" UserId="165" Text="[**Photoshop Elements**][1] is better than most people think. You can find a lot of negative reviews about it, and for a professional *photographer*, it may not be good enough. It definitely has less capability, like 8-bit color instead of 16-bit color. But for a *game developer*, 8-bit color is plenty :) (That's 8 bits per RGB channel, it's also called 24-bit, or 16 million colors). And the few features that a gamedev would need which *are* missing (like alpha channel masks), can actually be added using simple workarounds.&#xD;&#xA;&#xD;&#xA;(Note the link is for Elements 7 - it's cheaper than version 8, and 8 didn't get great reviews).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Adobe-Photoshop-Elements-OLD-VERSION/dp/B001DMBWXS/" />
  <row Id="2305" PostHistoryTypeId="2" PostId="1258" RevisionGUID="52e4310b-0938-44d0-93b5-04a994abede5" CreationDate="2010-07-22T19:09:14.570" UserId="842" Text="We do some OpenGL(ES) in our Orchard's Craps game for the iPhone but it was handled by a programmer with mad 3D skillz.  So, because of this I've been learning OpenGL(ES) so that I know what I'm talking about and so that I can code along with the team.&#xD;&#xA;&#xD;&#xA;One site I found helpful, with a series of tutorials, is Jeff LaMarche's blog: http://iphonedevelopment.blogspot.com and here is a link for his OpenGL posts:&#xD;&#xA;http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html&#xD;&#xA;&#xD;&#xA;And from OpenGL.org there are these two links that are useful:&#xD;&#xA;http://www.opengl.org/code/ and &#xD;&#xA;http://www.opengl.org/resources/features/&#xD;&#xA;&#xD;&#xA;The best way, was stated above several time.  Jump in and do something small, that's interesting, and work your way up.  It's all about understand the scene, the camera and materials (shaders).  Once you get your head around these concepts you can start to look at physics engines, collision detection, particle effects and the like.  Woot!  (^_^) &#xD;&#xA;&#xD;&#xA;Good luck with all of your endeavors,&#xD;&#xA;Kevin" />
  <row Id="2306" PostHistoryTypeId="2" PostId="1259" RevisionGUID="cecf2eec-a4c8-4b52-b294-dc1b1c43919a" CreationDate="2010-07-22T19:11:26.187" UserId="165" Text="  * [arteriamusic.com][1]&#xD;&#xA;  * [audiojungle.net][2]&#xD;&#xA;  * [beatsuite.com][3]&#xD;&#xA;  * [firstcom.com][4]&#xD;&#xA;  * [ibaudio.com][5]&#xD;&#xA;  * [instantroyaltyfreemusic.com][6]&#xD;&#xA;  * [istockaudio.com][7]&#xD;&#xA;  * [revostock.com][8]&#xD;&#xA;  * [sounddogs.com][9]&#xD;&#xA;  * [soundeffects.com][10]&#xD;&#xA;  * [soundsnap.com][11]&#xD;&#xA;  * [stockmusic.net][12]&#xD;&#xA;  * [tallarico.com][13]&#xD;&#xA;  * [AmppiStore][14]&#xD;&#xA;&#xD;&#xA;That's a list of the paid sources from [where can I find music/sound effects?][15], which see the link for more, including free sources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.arteriamusic.com&#xD;&#xA;  [2]: http://www.audiojungle.net/&#xD;&#xA;  [3]: http://www.beatsuite.com/sounds/bsengine/advsearch.php?advgo=1&amp;sortby=date&#xD;&#xA;  [4]: http://www.firstcom.com/&#xD;&#xA;  [5]: http://www.ibaudio.com/&#xD;&#xA;  [6]: http://www.instantroyaltyfreemusic.com/&#xD;&#xA;  [7]: http://www.istockaudio.com/&#xD;&#xA;  [8]: http://www.revostock.com/&#xD;&#xA;  [9]: http://sounddogs.com&#xD;&#xA;  [10]: http://soundeffects.com&#xD;&#xA;  [11]: http://www.soundsnap.com/&#xD;&#xA;  [12]: http://www.stockmusic.net/&#xD;&#xA;  [13]: http://tallarico.com/&#xD;&#xA;  [14]: http://www.amppistore.com/&#xD;&#xA;  [15]: http://answers.unity3d.com/questions/225/where-can-i-find-music-or-sound-effects-for-my-games/226#226" />
  <row Id="2307" PostHistoryTypeId="2" PostId="1260" RevisionGUID="98f904d0-5860-4a2b-99fa-c85ad4fa1283" CreationDate="2010-07-22T19:15:17.397" UserDisplayName="Alexander Dines" Text="I enjoyed these high quality beginner tutorials.&#xD;&#xA;http://rbwhitaker.wikidot.com/xna-tutorials" />
  <row Id="2308" PostHistoryTypeId="2" PostId="1261" RevisionGUID="63f4628e-2a5c-4e60-b3a4-47e8ba09fdc6" CreationDate="2010-07-22T19:17:22.710" UserId="400" Text="I haven't done this for graphics, but I did create a cross-platform audio toolkit (PC/XBOX/PS2).  We went the route of creating our own API with a least-common-denominator capability as well as optional platform-specific capabilities.   Here are some lessons learned:&#xD;&#xA;&#xD;&#xA;The key is to define a processing path that encapsulates the core capabilities of each platform, and allows growth.   In order to do this, you need to really understand each platform's low level API so that you can identify the right abstractions.   Make sure the chain works for the least capable platform, while providing access to the most capable patform's advanced features.  Do the work to get this right and you will save a lot of effort later.  &#xD;&#xA;&#xD;&#xA;For audio, the chain was something like `SoundSources  -&gt; [Decoders] -&gt; Buffers -&gt; [3D Positioner] -&gt;[Effects] -&gt; Players`. &#xD;&#xA;&#xD;&#xA; For graphics, it may be `Model -&gt; Shapes -&gt; Positioner -&gt; Texturer -&gt; [Lighting] -&gt; [Particle Effects] -&gt; Renderer`. *(This is probably a completely wrong set, I'm not a graphics guy).*&#xD;&#xA;&#xD;&#xA;Write a front-end API which handles your core objects, and a platform-specific back end which maps the API to the low-level capabilities.  Provide a best-effort for each capability.  For instance, on the PC and XBOX the 3D audio positioning was done using the HRTF capabilities of the sound chips, while PS2 used a simple pan and fade.   A graphics engine might do something similar with lighting.&#xD;&#xA;&#xD;&#xA;Implement as much of the front end as possible with platform neutral code.  The code to attatch a reverb object to a sound object, or a texture asset to a shape object should be completely common, as should the code to iterate through and process active objects.  On the other hand, the low level objects can be completely platform specific except for the common interface.  &#xD;&#xA;&#xD;&#xA;Make sure the API, or configuration files, allow the user to specify platform-specific options.  We tried to avoid pushing platform-specific code to the game level by keeping it in configuration files:  One platform's config file can specify &quot;effect: SuperDuperParticleGenerator&quot; while another says &quot;effect: SoftGlow&quot;&#xD;&#xA;&#xD;&#xA;Definitely develop the platforms in parallel.  Make sure that the platform specific interfaces are well defined and testable on their own.  This prevents a lot of the &quot;is it the platform level or the API level?&quot; issues when debugging.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2309" PostHistoryTypeId="2" PostId="1262" RevisionGUID="b4eff6c6-7b2b-4b10-bf9d-a467a40d8bc3" CreationDate="2010-07-22T19:39:59.287" UserId="783" Text="I'm not a fan of the least-common denominator approach. If you do that, you may end up with  crippled features and poor performance.&#xD;&#xA;&#xD;&#xA;Instead, what I've done in the past, is to provide slightly higher level functionality in a library. That library is (mostly) API agnostic and can be used anywhere, but the implementation of the library is completely different for different platforms/graphics backends. So for example, instead of having a SetStateX() function, you have higher functions like RenderMesh(), or CreateRenderTarget().&#xD;&#xA;&#xD;&#xA;It will be more work than a really thin layer whenever you move to a new platform, but it will be completely worth it because you'll be able to implement things in the optimal way for that platform, and you'll be able to take advantage of native, unique features.&#xD;&#xA;&#xD;&#xA;One more thing: Don't be afraid of slightly breaking the encapsulation. There's nothing more frustrating that knowing you're in a platform with certain capabilities and not being able to use them. Leaving a backdoor of some kind so higher-level code can take advantage of the platform is very useful (for example, being able to retrieve the D3D device or OpenGL context)." />
  <row Id="2310" PostHistoryTypeId="5" PostId="1257" RevisionGUID="cca88fc6-5b2e-4c2f-93a4-ab4da5611b1c" CreationDate="2010-07-22T19:52:42.020" UserId="165" Comment="added 14 characters in body" Text="[**Photoshop Elements**][1] (the cut-rate version of Photoshop) is better than most people think. You can find a lot of negative reviews about it, and for a professional *photographer*, it may not be good enough. It definitely has less capability, like 8-bit color instead of 16-bit color. But for a *game developer*, 8-bit color is plenty :) (That's 8 bits per RGB channel, it's also called 24-bit). And the few features that a gamedev would need which *are* missing (like alpha channel masks), can actually be added using simple workarounds.&#xD;&#xA;&#xD;&#xA;(Note the link is for Elements 7 - it's cheaper than version 8, and 8 didn't get great reviews).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Adobe-Photoshop-Elements-OLD-VERSION/dp/B001DMBWXS/" />
  <row Id="2311" PostHistoryTypeId="2" PostId="1263" RevisionGUID="e17d2152-6cb7-443f-a2bd-91bae7871b97" CreationDate="2010-07-22T19:58:50.303" UserId="662" Text="I'm writing an open source game engine called YoghurtGum for mobile platforms (Windows Mobile, Android). This was one of my big big problems. First I solved it like this:&#xD;&#xA;&#xD;&#xA;    class RenderMethod&#xD;&#xA;    {&#xD;&#xA;&#xD;&#xA;    public:&#xD;&#xA;&#xD;&#xA;      virtual bool Init();&#xD;&#xA;      virtual bool Tick();&#xD;&#xA;      virtual bool Render();&#xD;&#xA;&#xD;&#xA;      virtual void* GetSomeData(); &#xD;&#xA;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Did you spot the `void*`? That's because `RenderMethodDirectDraw` returns a DirectDraw surface while `RenderMethodDirect3D` returns a vertex pool. Everything else was split as well. I had a `Sprite` class that had either a `SpriteDirectDraw` pointer or a `SpriteDirect3D` pointer. It kind of sucked.&#xD;&#xA;&#xD;&#xA;So lately, I've been rewriting things a lot. What I have now is a `RenderMethodDirectDraw.dll` and a `RenderMethodDirect3D.dll`. You can, in fact, try to use Direct3D, fail, and use DirectDraw instead. That's because the API remains the same.&#xD;&#xA;&#xD;&#xA;If you want to create a sprite, you don't do it directly but through a factory. The factory then calls the correct function in the DLL and converts it into a parent.&#xD;&#xA;&#xD;&#xA;So, this is in the `RenderMethod` API:&#xD;&#xA;&#xD;&#xA;    virtual Sprite* CreateSprite(const char* a_Name) = 0;&#xD;&#xA;&#xD;&#xA;And this is the definition in `RenderMethodDirectDraw`:&#xD;&#xA;&#xD;&#xA;    Sprite* RenderMethodDirectDraw::CreateSprite(const char* a_Name)&#xD;&#xA;    {&#xD;&#xA;        bool found = false;&#xD;&#xA;        uint32 i;&#xD;&#xA;        for (i = 0; i &lt; m_SpriteDataFilled; i++)&#xD;&#xA;        {&#xD;&#xA;            if (!strcmp(m_SpriteData[i].name, a_Name))&#xD;&#xA;            {&#xD;&#xA;                found = true;&#xD;&#xA;                break;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (!found) &#xD;&#xA;        {&#xD;&#xA;            ERROR_EXPLAIN(&quot;Could not find sprite named '%s'&quot;, a_Name);&#xD;&#xA;            return NULL; &#xD;&#xA;        }&#xD;&#xA;		&#xD;&#xA;        if (m_SpriteList[m_SpriteTotal]) { delete m_SpriteList[m_SpriteTotal]; }&#xD;&#xA;        m_SpriteList[m_SpriteTotal] = new SpriteDirectDraw();&#xD;&#xA;&#xD;&#xA;        ((SpriteDirectDraw*)m_SpriteList[m_SpriteTotal])-&gt;SetData(&amp;m_SpriteData[i]);&#xD;&#xA;&#xD;&#xA;        return (m_SpriteList[m_SpriteTotal++]);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I hope this makes sense. :)&#xD;&#xA;&#xD;&#xA;P.S. I would loved to have used STL for this, but there's no support on Android. :(&#xD;&#xA;&#xD;&#xA;Basically:&#xD;&#xA;&#xD;&#xA;* Keep every render in its own context. Either a DLL, or a static library or just a bunch of headers. As long as you have a RenderMethodX, SpriteX and StuffX you'r golden.&#xD;&#xA;* Steal as much as you can from the Ogre source." />
  <row Id="2312" PostHistoryTypeId="2" PostId="1264" RevisionGUID="4f23accb-156e-42fa-befc-2aae5818edf6" CreationDate="2010-07-22T20:05:01.910" UserId="358" Text="http://sgtconker.com is a good place to start." />
  <row Id="2313" PostHistoryTypeId="2" PostId="1265" RevisionGUID="2eafe03f-fa1d-49b8-90b4-0fa6c48d478c" CreationDate="2010-07-22T20:17:41.460" UserId="666" Text="Lets make a list of the best books that every indie developer should read. The format is open but try to keep 1 book per answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, this is a community wiki =D" />
  <row Id="2314" PostHistoryTypeId="1" PostId="1265" RevisionGUID="2eafe03f-fa1d-49b8-90b4-0fa6c48d478c" CreationDate="2010-07-22T20:17:41.460" UserId="666" Text="Must read Game Dev Books" />
  <row Id="2315" PostHistoryTypeId="3" PostId="1265" RevisionGUID="2eafe03f-fa1d-49b8-90b4-0fa6c48d478c" CreationDate="2010-07-22T20:17:41.460" UserId="666" Text="&lt;learning&gt;&lt;books&gt;" />
  <row Id="2316" PostHistoryTypeId="16" PostId="1265" RevisionGUID="2eafe03f-fa1d-49b8-90b4-0fa6c48d478c" CreationDate="2010-07-22T20:17:41.460" UserId="666" />
  <row Id="2317" PostHistoryTypeId="5" PostId="1263" RevisionGUID="2859daaf-acf7-46a9-924f-416dc1829acc" CreationDate="2010-07-22T20:18:36.340" UserId="662" Comment="added 195 characters in body" Text="I'm writing an open source game engine called YoghurtGum for mobile platforms (Windows Mobile, Android). This was one of my big big problems. First I solved it like this:&#xD;&#xA;&#xD;&#xA;    class RenderMethod&#xD;&#xA;    {&#xD;&#xA;&#xD;&#xA;    public:&#xD;&#xA;&#xD;&#xA;      virtual bool Init();&#xD;&#xA;      virtual bool Tick();&#xD;&#xA;      virtual bool Render();&#xD;&#xA;&#xD;&#xA;      virtual void* GetSomeData(); &#xD;&#xA;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Did you spot the `void*`? That's because `RenderMethodDirectDraw` returns a DirectDraw surface while `RenderMethodDirect3D` returns a vertex pool. Everything else was split as well. I had a `Sprite` class that had either a `SpriteDirectDraw` pointer or a `SpriteDirect3D` pointer. It kind of sucked.&#xD;&#xA;&#xD;&#xA;So lately, I've been rewriting things a lot. What I have now is a `RenderMethodDirectDraw.dll` and a `RenderMethodDirect3D.dll`. You can, in fact, try to use Direct3D, fail, and use DirectDraw instead. That's because the API remains the same.&#xD;&#xA;&#xD;&#xA;If you want to create a sprite, you don't do it directly but through a factory. The factory then calls the correct function in the DLL and converts it into a parent.&#xD;&#xA;&#xD;&#xA;So, this is in the `RenderMethod` API:&#xD;&#xA;&#xD;&#xA;    virtual Sprite* CreateSprite(const char* a_Name) = 0;&#xD;&#xA;&#xD;&#xA;And this is the definition in `RenderMethodDirectDraw`:&#xD;&#xA;&#xD;&#xA;    Sprite* RenderMethodDirectDraw::CreateSprite(const char* a_Name)&#xD;&#xA;    {&#xD;&#xA;        bool found = false;&#xD;&#xA;        uint32 i;&#xD;&#xA;        for (i = 0; i &lt; m_SpriteDataFilled; i++)&#xD;&#xA;        {&#xD;&#xA;            if (!strcmp(m_SpriteData[i].name, a_Name))&#xD;&#xA;            {&#xD;&#xA;                found = true;&#xD;&#xA;                break;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (!found) &#xD;&#xA;        {&#xD;&#xA;            ERROR_EXPLAIN(&quot;Could not find sprite named '%s'&quot;, a_Name);&#xD;&#xA;            return NULL; &#xD;&#xA;        }&#xD;&#xA;		&#xD;&#xA;        if (m_SpriteList[m_SpriteTotal]) { delete m_SpriteList[m_SpriteTotal]; }&#xD;&#xA;        m_SpriteList[m_SpriteTotal] = new SpriteDirectDraw();&#xD;&#xA;&#xD;&#xA;        ((SpriteDirectDraw*)m_SpriteList[m_SpriteTotal])-&gt;SetData(&amp;m_SpriteData[i]);&#xD;&#xA;&#xD;&#xA;        return (m_SpriteList[m_SpriteTotal++]);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I hope this makes sense. :)&#xD;&#xA;&#xD;&#xA;P.S. I would loved to have used STL for this, but there's no support on Android. :(&#xD;&#xA;&#xD;&#xA;Basically:&#xD;&#xA;&#xD;&#xA;* Keep every render in its own context. Either a DLL, or a static library or just a bunch of headers. As long as you have a RenderMethodX, SpriteX and StuffX you'r golden.&#xD;&#xA;* Steal as much as you can from the Ogre source.&#xD;&#xA;&#xD;&#xA;EDIT: Yes it does make sense to have virtual interfaces like this. If your first attempt fails, you can try another render method. This way you can keep all your code render method agnostic. " />
  <row Id="2318" PostHistoryTypeId="2" PostId="1266" RevisionGUID="1ed17758-be9f-4e0e-9f5f-acb5c87baf15" CreationDate="2010-07-22T20:19:42.657" UserId="587" Text=" - [The Art of Game Design: A book of&#xD;&#xA;   lenses][1] &#xD;&#xA; - [A Theory of Fun for Game&#xD;&#xA;   Design][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965&#xD;&#xA;  [2]: http://www.amazon.com/Theory-Fun-Game-Design/dp/1932111972/" />
  <row Id="2319" PostHistoryTypeId="16" PostId="1266" RevisionGUID="1ed17758-be9f-4e0e-9f5f-acb5c87baf15" CreationDate="2010-07-22T20:19:42.657" UserId="-1" />
  <row Id="2320" PostHistoryTypeId="2" PostId="1267" RevisionGUID="2321126d-9552-451e-a33f-70dceebd3bd4" CreationDate="2010-07-22T20:21:37.067" UserId="857" Text="It's pretty easy to get animations rolling from a sprite sheet. Though which ways there are on combining the animations with player dynamics and motion?&#xD;&#xA;&#xD;&#xA;I've figured there's two starting points anyway:&#xD;&#xA;&#xD;&#xA;- Player animation contains motion (the animation slab defines how the sprite moves)&#xD;&#xA;- Player animation does not contain motion&#xD;&#xA;&#xD;&#xA;Simple state machine might do the stuff, but are there alternatives? How would you write the state machine itself for doing it?&#xD;&#xA;&#xD;&#xA;I'm writing a small hack&amp;slash&amp;jump platform game in html5. The player should stay in place when he strikes a sword, perhaps even move a bit (one can accomplish it through a hack), but otherwise move pretty much without limits. I've got couple frames and I'd like it all to mesh together well." />
  <row Id="2321" PostHistoryTypeId="1" PostId="1267" RevisionGUID="2321126d-9552-451e-a33f-70dceebd3bd4" CreationDate="2010-07-22T20:21:37.067" UserId="857" Text="Player sprite animation in 2D platform game" />
  <row Id="2322" PostHistoryTypeId="3" PostId="1267" RevisionGUID="2321126d-9552-451e-a33f-70dceebd3bd4" CreationDate="2010-07-22T20:21:37.067" UserId="857" Text="&lt;game-design&gt;&lt;sprites&gt;&lt;animation&gt;" />
  <row Id="2323" PostHistoryTypeId="2" PostId="1268" RevisionGUID="33dbdc28-1499-4b95-9acd-00455efc3ca1" CreationDate="2010-07-22T20:22:43.647" UserId="818" Text="I like to use [SDL][1] for this.  It's got renderer backends for D3D, OpenGl, OpenGL ES, and a handful of other platform-specific backends, and it's available for all sorts of different platforms, and currently under active development, with bindings to many different languages available.&#xD;&#xA;&#xD;&#xA;It abstracts away the different renderer concepts and makes creating video (as well as handling sound and input and a few other things) available in a simple, cross-platform API.  And it was designed by Sam Lantinga, one of the lead devs at Blizzard, specifically for making porting games and creating cross-platform games easier, so you know you're dealing with a high-quality library.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org" />
  <row Id="2324" PostHistoryTypeId="2" PostId="1269" RevisionGUID="01280a53-e869-43d4-b715-e2cec71a3493" CreationDate="2010-07-22T20:24:18.743" UserId="862" Text="For AI: Programming Game AI by Example - Mat Buckland" />
  <row Id="2325" PostHistoryTypeId="16" PostId="1269" RevisionGUID="01280a53-e869-43d4-b715-e2cec71a3493" CreationDate="2010-07-22T20:24:18.743" UserId="-1" />
  <row Id="2326" PostHistoryTypeId="5" PostId="1265" RevisionGUID="ab23d862-e252-4eba-b3d1-16e5cd290399" CreationDate="2010-07-22T20:24:28.977" UserId="666" Comment="added 66 characters in body" Text="Lets make a list of the best books that every indie developer should read. The format is open but try to keep 1 book per answer.&#xD;&#xA;&#xD;&#xA;EDIT: I guess adding a small comment about the book would desired.&#xD;&#xA;&#xD;&#xA;Also, this is a community wiki =D" />
  <row Id="2327" PostHistoryTypeId="2" PostId="1270" RevisionGUID="94577575-812d-479c-99cd-941cad591b89" CreationDate="2010-07-22T20:27:23.137" UserDisplayName="Catalin Zima" Text="And here's a long list of blogs and sites related to XNA:&#xD;&#xA;http://creators.xna.com/en-US/community_resources" />
  <row Id="2328" PostHistoryTypeId="2" PostId="1271" RevisionGUID="1df7cc9b-c128-41d5-84cd-f733860e1a50" CreationDate="2010-07-22T20:28:33.790" UserId="865" Text="All the Game Programming Gems books. Even just reading them will give you a lot of ideas and insights in different approaches that will spark your thought processes and will give you a nice interdisciplinary toolbag. Also, lots of references to other interesting works." />
  <row Id="2329" PostHistoryTypeId="16" PostId="1271" RevisionGUID="1df7cc9b-c128-41d5-84cd-f733860e1a50" CreationDate="2010-07-22T20:28:33.790" UserId="-1" />
  <row Id="2330" PostHistoryTypeId="2" PostId="1272" RevisionGUID="a92a3d93-dc8c-41c9-8f6a-9e0cec7ed137" CreationDate="2010-07-22T20:31:20.180" UserId="305" Text="Field of view (FOV) plays a big part in game feel for first person shooters on all platforms. Standard horizontal FOV in first person shooters tend to range between 90 degrees to 120 degrees. However, PC and console players sit at different distances from their screens. A 90 degree FOV may be fine for a 30&quot; screen 5 feet away from a console player, but may seem horribly cramped on a 24&quot; screen 2 feet away from a PC player. Unless they have multiple monitors or really close to the screen, players may find FOV more than 120 degrees to be nauseating over time.&#xD;&#xA;&#xD;&#xA;A larger FOV gives the player more peripheral vision, and thus greater situational awareness of objects or characters around them. A smaller FOV makes objects seem closer, because they're rendered larger on screen. Character speed also feels different at different FOVs: moving forward seems faster with larger FOVs, and moving side-by-side seems faster with smaller FOVs, even if all the speeds are actually the same. &#xD;&#xA;&#xD;&#xA;Note that horizontal and vertical FOV are rarely the same number (unless you have a perfectly square or circular viewport) and both PC and console games need to accommodate players with screens of different aspect ratios, and thus different horizontal and vertical FOV settings.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2331" PostHistoryTypeId="2" PostId="1273" RevisionGUID="88a633f3-6f2c-427a-be7d-3a3108cfbc94" CreationDate="2010-07-22T20:31:41.113" UserId="818" Text="I prefer to keep animation and motion separate, since it provides for more flexibility.&#xD;&#xA;&#xD;&#xA;In my game engine I have a concept called an Action Matrix, which is basically an array of arrays of integers, which are index references into the sprite sheet.  Each sub-array is a list of numbers which define the frames of an animation, and each character is assigned an action matrix.&#xD;&#xA;&#xD;&#xA;The movement code is hard-wired to use the first four actions for the animation to be played while the character is moving, (in the four cardinal directions,) and beyond that you can create custom animations which can be invoked by playing a different action from the action matrix.  These can be used with or without also moving the sprite's position, which is controlled by a separate command.&#xD;&#xA;&#xD;&#xA;Also, by playing one of the first four actions in a loop with no movement, you can get a character who seems to be walking in place, or a flying/floating vehicle that just hovers there, or various other other versions of an &quot;idle&quot; animation." />
  <row Id="2332" PostHistoryTypeId="2" PostId="1274" RevisionGUID="22e2cd06-1ddb-42f6-84fb-3ab74ae58af7" CreationDate="2010-07-22T20:35:12.057" UserId="865" Text="It's a trade-off. If you encode motion into the anim you can ensure that there's no moonwalking going on, however, by preventing moonwalking you also take away the ability to tweak speeds :o\&#xD;&#xA;&#xD;&#xA;I'd definitely prefer having them decoupled so you can change speeds when desired. To prevent moonwalking - defer animation until your gameplay has settled down. Blocks are extremely capable of jumping, running and shooting." />
  <row Id="2333" PostHistoryTypeId="2" PostId="1275" RevisionGUID="ff55aa22-3e28-49b0-b39b-12cce0401033" CreationDate="2010-07-22T20:35:18.937" UserId="826" Text="I'm just starting them but the [&quot;Game Development Essentials&quot;][1] series looks promising.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.delmarlearning.com/browse_quicksearch.aspx?search=Game+Development+Essentials" />
  <row Id="2334" PostHistoryTypeId="16" PostId="1275" RevisionGUID="ff55aa22-3e28-49b0-b39b-12cce0401033" CreationDate="2010-07-22T20:35:18.937" UserId="-1" />
  <row Id="2336" PostHistoryTypeId="5" PostId="1232" RevisionGUID="a73a9aab-f9f9-48c9-90e2-e75648108954" CreationDate="2010-07-22T20:43:22.630" UserId="55" Comment="edited body; edited body; deleted 1 characters in body" Text="You're in luck! I just discovered some Linear Algebra tutorials on Wolfire's blog that I felt were really good. The guy writing the tutorials, David, has such a killer way to explain the stuff. It's extremely handy for those that are weak at math since it is showing more practical application than theory (which is what someone weak could use)&#xD;&#xA;&#xD;&#xA; - [Part 1][1] - Vectors addition, subtraction, scalar-vector multiplication&#xD;&#xA; - [Part 2][2] - Vectors length, distance, normalization, dot product, cross product&#xD;&#xA; - [Part 3][3] - Basis vectors, matrices, 3d matricies&#xD;&#xA;&#xD;&#xA;Be sure to add this to your RSS reader. He is continually writing new posts. Don't forget to **read the comments**! &#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;  [2]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/&#xD;&#xA;  [3]: http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-3" />
  <row Id="2337" PostHistoryTypeId="5" PostId="1272" RevisionGUID="4e287b06-29b8-4dfb-baa0-a837ae0d01f9" CreationDate="2010-07-22T21:00:15.787" UserId="305" Comment="Ah... grammar" Text="Field of view (FOV) plays a big part in game feel for first person shooters on all platforms. Standard horizontal FOV in first person shooters tend to range between 90 degrees to 120 degrees. However, PC and console players sit at different distances from their screens. A 90 degree FOV may be fine for a 30&quot; screen 5 feet away from a console player, but may seem horribly cramped on a 24&quot; screen 2 feet away from a PC player. Unless they have multiple monitors or are sitting really close to the screen, players may find FOV more than 120 degrees to be nauseating over time.&#xD;&#xA;&#xD;&#xA;A larger FOV gives the player more peripheral vision, and thus greater situational awareness of objects or characters around them. A smaller FOV makes objects seem closer, because they're rendered larger on screen. Character speed also feels different at different FOVs: moving forward seems faster with larger FOVs, and moving side-by-side seems faster with smaller FOVs, even if all the speeds are actually the same. &#xD;&#xA;&#xD;&#xA;Note that horizontal and vertical FOV are rarely the same number (unless you have a perfectly square or circular viewport) and both PC and console games need to accommodate players with screens of different aspect ratios, and thus different horizontal and vertical FOV settings.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2338" PostHistoryTypeId="2" PostId="1277" RevisionGUID="0bf32291-f858-4b4e-b4d2-f41a51d68b16" CreationDate="2010-07-22T21:08:01.837" UserId="820" Text="[Game Engine Architecture](http://rads.stackoverflow.com/amzn/click/1568814135) by Jason Gregory  &#xD;&#xA;Touches on most areas involved in game development, because of the number of subjects covered the book doesn't go into depth in any specific area. The overview of game development is great, and real world examples are often given where needed.&#xD;&#xA;&#xD;&#xA;[Real-time Rendering](http://rads.stackoverflow.com/amzn/click/1568814240)  &#xD;&#xA;If your interests lie in 3D, this is **the** required reference book. The book is very theoretical and requires the reader have strong math skills.&#xD;&#xA;&#xD;&#xA;[Real-Time Collision Detection](http://rads.stackoverflow.com/amzn/click/1558607323) by Christer Ericson  &#xD;&#xA;Collision detection has always been an integral part of game development, and this is a great book on the subject covering a huge area." />
  <row Id="2339" PostHistoryTypeId="16" PostId="1277" RevisionGUID="0bf32291-f858-4b4e-b4d2-f41a51d68b16" CreationDate="2010-07-22T21:08:01.837" UserId="-1" />
  <row Id="2340" PostHistoryTypeId="2" PostId="1278" RevisionGUID="4608d6e5-d2fb-462f-86fb-8a1b6b4a6455" CreationDate="2010-07-22T21:10:25.543" UserId="872" Text="I've found &quot;Mathematics for 3D Game Programming and Computer Graphics&quot; to be an excellent resource.  http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Development/dp/1584502770/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279832969&amp;sr=8-1" />
  <row Id="2341" PostHistoryTypeId="5" PostId="1277" RevisionGUID="f07f23b1-5556-4e64-8b8b-8280ef2b8767" CreationDate="2010-07-22T21:14:34.640" UserId="820" Comment="small changes to grammar and wording" Text="[Game Engine Architecture](http://rads.stackoverflow.com/amzn/click/1568814135) by Jason Gregory  &#xD;&#xA;Touches on most areas involved in game development. Because of the number of subjects covered the book doesn't go into depth in any specific area but gives a broader view. I recommend anyone interested in game development read this book.&#xD;&#xA;&#xD;&#xA;[Real-time Rendering](http://rads.stackoverflow.com/amzn/click/1568814240)  &#xD;&#xA;If your interests lie in 3D rendering; this is **the** reference book to own. The book is theoretical and requires the reader have strong math skills.&#xD;&#xA;&#xD;&#xA;[Real-Time Collision Detection](http://rads.stackoverflow.com/amzn/click/1558607323) by Christer Ericson  &#xD;&#xA;Collision detection has always been an integral part of game development, and this is a great book on the subject covering a huge area." />
  <row Id="2342" PostHistoryTypeId="2" PostId="1279" RevisionGUID="cbd1780d-c97d-4492-ab1a-9dd24539a9d1" CreationDate="2010-07-22T21:16:51.927" UserId="202" Text="I grew up with [Riemers.net](http://www.riemers.net/) - very nice tutorial site covering everything form basics (drawing Your first triangle) to intermediate techniques (HLSL). In every tutorial You create a cool application like a flight simulator for example." />
  <row Id="2343" PostHistoryTypeId="2" PostId="1280" RevisionGUID="6d618546-d1f5-485a-ba99-0d97caa23a36" CreationDate="2010-07-22T21:19:16.607" UserId="613" Text="[Game Engine Design](http://www.amazon.com/dp/0122290631/) and [Game Engine Architecture](http://www.amazon.com/dp/012229064X/) both by David Eberly, are quite good, if a bit heavy on the math.&#xD;&#xA;&#xD;&#xA;[Game Engine Gems](http://www.amazon.com/dp/0763778885/) *just* came out, and I've been enjoying its content so far. It's been a lot more helpful in some areas than the Game Programming Gems series (of which I've read up to Vol. 5)." />
  <row Id="2344" PostHistoryTypeId="16" PostId="1280" RevisionGUID="6d618546-d1f5-485a-ba99-0d97caa23a36" CreationDate="2010-07-22T21:19:16.607" UserId="-1" />
  <row Id="2345" PostHistoryTypeId="2" PostId="1281" RevisionGUID="63f6b885-ba9c-4ccb-836c-6554de51549c" CreationDate="2010-07-22T21:25:19.543" UserId="874" Text="I definitely approve of Flash Develop and the Flex SDK as other people have offered.  I'll contribute this article which is where I learned Actionscript 3 from:&#xD;&#xA;http://www.brighthub.com/internet/web-development/articles/11010.aspx" />
  <row Id="2347" PostHistoryTypeId="5" PostId="1277" RevisionGUID="49b1862c-7e14-4d27-aafc-bc107c12135a" CreationDate="2010-07-22T21:28:29.860" UserId="820" Comment="oops.." Text="[Game Engine Architecture](http://rads.stackoverflow.com/amzn/click/1568814135) by Jason Gregory  &#xD;&#xA;Touches on most areas involved in game development. Because of the number of subjects covered the book doesn't go into depth in any specific area but gives a broader view. I recommend anyone interested in game development read this book.&#xD;&#xA;&#xD;&#xA;[Real-time Rendering](http://rads.stackoverflow.com/amzn/click/1568814240)  &#xD;&#xA;If your interests lie in 3D rendering; this is **the** reference book to own. The book is theoretical and requires the reader have strong math skills.&#xD;&#xA;&#xD;&#xA;Also if you're developing shaders (then you probably already know this but) the ShaderX series are a great read, and the series will continue under the name [GPU Pro](http://rads.stackoverflow.com/amzn/click/1568814720). (I have not read this one yet though)&#xD;&#xA;&#xD;&#xA;[Real-Time Collision Detection](http://rads.stackoverflow.com/amzn/click/1558607323) by Christer Ericson  &#xD;&#xA;Collision detection has always been an integral part of game development, and this is a great book on the subject covering a huge area." />
  <row Id="2348" PostHistoryTypeId="2" PostId="1283" RevisionGUID="3ef3c9b1-8d64-4754-91db-5708c59f95c3" CreationDate="2010-07-22T21:30:14.587" UserId="872" Text="[Game Coding Complete 3rd, Ed.][1] is great for programming best practices and tips from the trenches.  Tons of game programming books have you go down the same path with whatever scripting language or engine they are pimping.  This book goes into WHY you should do things for game development.  For example, the networking section talks about why you should do things for games that normally would never be done for non-game applications.  Those nuggets of information, backed up by experience, are priceless.&#xD;&#xA;&#xD;&#xA;For game design, the best book, hands down, is The Art of Game Design (linked in other answers)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279833961&amp;sr=8-1&#xD;&#xA;" />
  <row Id="2349" PostHistoryTypeId="16" PostId="1283" RevisionGUID="3ef3c9b1-8d64-4754-91db-5708c59f95c3" CreationDate="2010-07-22T21:30:14.587" UserId="-1" />
  <row Id="2350" PostHistoryTypeId="2" PostId="1284" RevisionGUID="e9a305cc-f2b8-437e-a26c-6b6514472c19" CreationDate="2010-07-22T21:35:05.850" UserId="865" Text="What I did (like others suggest) when I wanted to play around with flash, was use Flex. Since I am too lazy to set it up from scratch, I used Flixel (a retro 2d library) and stripped it to all but its bare guts but at least it showed me how to set up my environment, and compile my project - which I find the hardest part of programming, getting to grips with a new toolchain - after that it's just another language." />
  <row Id="2351" PostHistoryTypeId="2" PostId="1285" RevisionGUID="bc6c6795-fbfe-45e8-8975-56ca10c105ff" CreationDate="2010-07-22T21:40:32.873" UserId="178" Text="Although it is a general programming book, you shouldn't miss it:&#xD;&#xA;&#xD;&#xA;[Code Complete 2][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279834743&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;it teaches you a lot of things every programmer should know." />
  <row Id="2352" PostHistoryTypeId="16" PostId="1285" RevisionGUID="bc6c6795-fbfe-45e8-8975-56ca10c105ff" CreationDate="2010-07-22T21:40:32.873" UserId="-1" />
  <row Id="2353" PostHistoryTypeId="2" PostId="1286" RevisionGUID="e6d0d30a-6819-4857-a89a-4a9c6a2efcb4" CreationDate="2010-07-22T21:42:14.857" UserId="865" Text="I guess it matters whether you need them for a final game or for prototyping. For prototyping there's tons of ripped spritesheets of existing games. I know they're even being used as mock up sketches to draw over your own sprites so you have your anim frames set up properly for you.&#xD;&#xA;" />
  <row Id="2354" PostHistoryTypeId="2" PostId="1287" RevisionGUID="8b4912a1-e2f8-4559-a344-b2baa7969196" CreationDate="2010-07-22T21:47:49.160" UserId="465" Text="[Flammable Penguins][1] - New casual podcast with me and my co-workers from Mere-Mortals. Feedback always appreciated.&#xD;&#xA;&#xD;&#xA;The dev casts I listen to have all been listed already.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.claire-blackshaw.com/blog/category/podcast/" />
  <row Id="2355" PostHistoryTypeId="16" PostId="1287" RevisionGUID="8b4912a1-e2f8-4559-a344-b2baa7969196" CreationDate="2010-07-22T21:47:49.160" UserId="-1" />
  <row Id="2356" PostHistoryTypeId="6" PostId="1192" RevisionGUID="9f5d6ec6-34a1-4a93-bdba-8ac2a9d5b4b1" CreationDate="2010-07-22T21:52:42.623" UserId="181" Comment="edited tags" Text="&lt;untagged&gt;" />
  <row Id="2357" PostHistoryTypeId="2" PostId="1288" RevisionGUID="cac928cd-b53b-41f2-9b31-98d8dec64e11" CreationDate="2010-07-22T21:56:11.217" UserId="865" Text="In my opinion fun should be the core mechanic. It shouldn't need bells and whistles to make it fun - the fun should be there without the bells and whistles, you add those to make it deeper. If the core mechanic ain't fun, no bell or whistle will make it fun (unless one of those bells or whistles *is* the core mechanic.&#xD;&#xA;Having said that, I once worked on a game where while coding it I realized it was missing that one thing that made it fun and something did pop in my head and was what made it tick. The core mechanic we defined simply wasn't fun. But in the end you should be able to point at one defining element that defines the fun factor in your game - what is it that turns it from interacting with a simulation to actually feeling challenged." />
  <row Id="2358" PostHistoryTypeId="2" PostId="1289" RevisionGUID="2151dfa1-c3a8-4b1b-9e83-f3f56017941d" CreationDate="2010-07-22T22:01:07.347" UserId="181" Text="One approach to this is to model the rope as collidable particles, connected by springs. (fairly stiff ones, possibly even just as a bone instead). The particles collide with the environment, making sure the rope wraps around items.&#xD;&#xA;&#xD;&#xA;Here's a demo with source: http://www.ewjordan.com/rgbDemo/&#xD;&#xA;&#xD;&#xA;(Move over to the right on the first level, there's a red rope you can interact with)" />
  <row Id="2359" PostHistoryTypeId="2" PostId="1290" RevisionGUID="b11dc2cd-dfcb-4a81-95bb-0051fc7b1d7f" CreationDate="2010-07-22T22:03:17.813" UserId="465" Text="My last two credited titles I was Lead Programmer then moved to Lead Design role. At my current company I kinda switch between design and programming hats quite often.&#xD;&#xA;&#xD;&#xA;The bulk of my education is in programming and my experience is pretty broad. I honestly can't pick which I prefer, and if I focused then I think I would do the other in my spare time. My colleagues consider me capable in both roles.&#xD;&#xA;&#xD;&#xA;I'm currently looking for opportunities, some at larger companies, and often people seem to be thrown by my dual role. I feel like it may be damaging my chances in some cases, because they can't easily fit me into the company.&#xD;&#xA;&#xD;&#xA;Should I just pick one and focus or is it viable to continue wearing my two hats?" />
  <row Id="2360" PostHistoryTypeId="1" PostId="1290" RevisionGUID="b11dc2cd-dfcb-4a81-95bb-0051fc7b1d7f" CreationDate="2010-07-22T22:03:17.813" UserId="465" Text="Multi-disciplined: Strength or Weakness?" />
  <row Id="2361" PostHistoryTypeId="3" PostId="1290" RevisionGUID="b11dc2cd-dfcb-4a81-95bb-0051fc7b1d7f" CreationDate="2010-07-22T22:03:17.813" UserId="465" Text="&lt;game-design&gt;&lt;programming&gt;&lt;hiring&gt;" />
  <row Id="2362" PostHistoryTypeId="2" PostId="1291" RevisionGUID="ded80157-cce2-49f5-bd0a-f2abf9acc63d" CreationDate="2010-07-22T22:06:35.563" UserId="178" Text="I can recommend the book [Game Coding Complete][1], Mr. Mike knows a lot about Game Architecture and does a good job explaining it to the reader. I don't know about the third edition, I only have the second edition, but it was worth a read.&#xD;&#xA;He explains everything from Scripting to Sound, even a bit of 3D math. Not in the deepest possible detail, but good enough to dig deeper using other materials. At the end of the book he constructs a complete game utilizing everything you learned with this book.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279835706&amp;sr=8-1" />
  <row Id="2363" PostHistoryTypeId="2" PostId="1292" RevisionGUID="f1226ce9-85bf-4e6c-aa49-6838185e0719" CreationDate="2010-07-22T22:06:54.720" UserId="818" Text="Depends on what you're doing this for.  If you're doing it because you enjoy it, and you &quot;honestly can't pick&quot; which you enjoy more, then it sounds like you're doing just fine with both roles, so keep it up.  If efficiency is more important to you, then logically evaluate which one you're better at and focus on it." />
  <row Id="2364" PostHistoryTypeId="2" PostId="1293" RevisionGUID="f4088cbb-56cd-488b-9179-58787cca5e98" CreationDate="2010-07-22T22:11:12.733" UserId="356" Text="I really liked [Real Time Cameras][1]. Its contents are pretty standard in terms of engine/rendering structure, but it also considers game narrative through cameras. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimecameras.com/ &quot;Real Time Cameras&quot;" />
  <row Id="2365" PostHistoryTypeId="16" PostId="1293" RevisionGUID="f4088cbb-56cd-488b-9179-58787cca5e98" CreationDate="2010-07-22T22:11:12.733" UserId="-1" />
  <row Id="2366" PostHistoryTypeId="2" PostId="1294" RevisionGUID="1ddfa2fa-7fc6-4539-81ae-ad97331172b2" CreationDate="2010-07-22T22:12:06.277" UserId="422" Text="If you're looking for typical job openings, just read them carefully; they are usually very particular in their requirements. Most of the open positions I see are specified and your chances of getting the gig are probably higher if you're an expert in that given role.&#xD;&#xA;&#xD;&#xA;I think the ability to wear multiple hats can be valuable once you've proven yourself to your employer, but probably wouldn't help you (usually) get your foot in the door.&#xD;&#xA;&#xD;&#xA;So long story short: I'd recommend picking one and focusing on that side of your skillset per position you are applying for." />
  <row Id="2367" PostHistoryTypeId="5" PostId="1065" RevisionGUID="567182df-dc18-4d05-bf08-a721e0222734" CreationDate="2010-07-22T22:13:33.217" UserId="469" Comment="added 1788 characters in body" Text="There is a reason to don't use 3D API.&#xD;&#xA;&#xD;&#xA;Only computers in NA, North-west EU and Japan support them...&#xD;&#xA;&#xD;&#xA;I live in Brazil for example, my sister computer is new, has a multi-core processor, several GB ram, and yet it does not run OpenGL games.&#xD;&#xA;&#xD;&#xA;I for example can only play Dwarf Fortress (use OpenGL to render ASCII graphics) on my own computer, on any other computer I find it runs crawling slow.&#xD;&#xA;&#xD;&#xA;And this is not a issue only with Brazil, I asked people around, and it is common in several places of the world... The population that actually own OpenGL or Direct3D compatible cards is a minority...&#xD;&#xA;&#xD;&#xA;Only that this minority get more attention from companies...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But if you are targeting only these &quot;traditional&quot; markets (NA, Northwest EU, JP), then go for it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT for those downvoting:&#xD;&#xA;Obviously you disagree, so, do you have PROOF that NOONE ships anymore computers with crappy VIA or SIS chips (or even other unknown or worse manufacturers) with none or only OpenGL 1.0 support?&#xD;&#xA;&#xD;&#xA;I have TWO machines like that in my house, and they are new (both have more than one core, both have 2GB ram, both have clock frequency above 2GHz...)&#xD;&#xA;&#xD;&#xA;My university have 200 machines like that, even some Dell-built ones.&#xD;&#xA;&#xD;&#xA;It is plainly simple, GPUs are expensive (even crappy Intel ones), and in poor markets, it is a luxury, people buying machines to run MS Word and read e-mails are not going to buy a machine with a decent graphic chip when they can buy one that is 50 USD cheaper, specially when 50 USD is what most people have to buy food for a entire month.&#xD;&#xA;&#xD;&#xA;PLEASE, don't come here saying that I am saying BS, if you never visited a third-world country, and also, don't say that third-world country people don't play games, they do, a lot, Osmos developer post about the Linux version launch of their, pointed that lots of incoming traffic (actually, most of it) was from Russia, plainly because those people are usually ignored.&#xD;&#xA;&#xD;&#xA;Here in Brazil, the most popular game is Counter-Strike, running in Software mode... Some Lan-Houses have only 10% of the machines with GPU, even big-ass ones with 200 or even 300 stations...&#xD;&#xA;&#xD;&#xA;I should not have posted on this, I knew that it would attract down-votes, I got free loss of points for posting this, every time I explain why my other game uses Allegro 4.4 instead of 5.0 because 5.0 does not support Direct Draw or software mode I get lots of flak from lots of people saying that I am a sort of liar or that I am stupid for saying this truth about the actual availability of OpenGL acceleration." />
  <row Id="2368" PostHistoryTypeId="2" PostId="1295" RevisionGUID="4bba8b85-3586-4fd1-9e7e-8fc8486e3f2d" CreationDate="2010-07-22T22:15:28.830" UserId="127" Text="Smaller companies will generally want you to try and wear as many hats as you can. However usually larger companies will just want you to stick to what you do best. It's your call really but you should take into account where you want to head." />
  <row Id="2369" PostHistoryTypeId="2" PostId="1296" RevisionGUID="dee40b20-5230-42b2-9831-1b5df7bcd9ab" CreationDate="2010-07-22T22:15:35.430" UserId="422" Text="I really highly recommend digging through &lt;a href=&quot;http://www.doolwind.com/blog/how-to-make-a-game-for-free-in-xna/&quot;&gt;How To Make A Game (For Free In XNA)&lt;/a&gt; by Doolwind. Excellent read with terrific links :)" />
  <row Id="2370" PostHistoryTypeId="2" PostId="1297" RevisionGUID="aa53c20d-7231-45f2-97bd-9765f4ee9f60" CreationDate="2010-07-22T22:18:40.903" UserId="422" Text="Please hire game composer &lt;a href=&quot;http://jmflava.com/&quot;&gt;Joshua Morse&lt;/a&gt;. I've worked with him on two projects:&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://playbombada.appspot.com/&quot;&gt;Bombada&lt;/a&gt;&#xD;&#xA;&lt;a href=&quot;http://lostdecadegamesapp.appspot.com/&quot;&gt;Onslaught!&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;And he's incredible. I can't recommend him highly enough." />
  <row Id="2371" PostHistoryTypeId="5" PostId="1065" RevisionGUID="e4e31c6a-6b26-45c2-8151-efbaffe85da5" CreationDate="2010-07-22T22:20:53.383" UserId="469" Comment="added 442 characters in body" Text="There is a reason to don't use 3D API.&#xD;&#xA;&#xD;&#xA;Only computers in NA, North-west EU and Japan support them...&#xD;&#xA;&#xD;&#xA;I live in Brazil for example, my sister computer is new, has a multi-core processor, several GB ram, and yet it does not run OpenGL games.&#xD;&#xA;&#xD;&#xA;I for example can only play Dwarf Fortress (use OpenGL to render ASCII graphics) on my own computer, on any other computer I find it runs crawling slow.&#xD;&#xA;&#xD;&#xA;And this is not a issue only with Brazil, I asked people around, and it is common in several places of the world... The population that actually own OpenGL or Direct3D compatible cards is a minority...&#xD;&#xA;&#xD;&#xA;Only that this minority get more attention from companies...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But if you are targeting only these &quot;traditional&quot; markets (NA, Northwest EU, JP), then go for it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT for those downvoting:&#xD;&#xA;Obviously you disagree, so, do you have PROOF that NOONE ships anymore computers with crappy VIA or SIS chips (or even other unknown or worse manufacturers) with none or only OpenGL 1.0 support?&#xD;&#xA;&#xD;&#xA;I have TWO machines like that in my house, and they are new (both have more than one core, both have 2GB ram, both have clock frequency above 2GHz...)&#xD;&#xA;&#xD;&#xA;My university have 200 machines like that, even some Dell-built ones.&#xD;&#xA;&#xD;&#xA;It is plainly simple, GPUs are expensive (even crappy Intel ones), and in poor markets, it is a luxury, people buying machines to run MS Word and read e-mails are not going to buy a machine with a decent graphic chip when they can buy one that is 50 USD cheaper, specially when 50 USD is what most people have to buy food for a entire month.&#xD;&#xA;&#xD;&#xA;PLEASE, don't come here saying that I am saying BS, if you never visited a third-world country, and also, don't say that third-world country people don't play games, they do, a lot, Osmos developer post about the Linux version launch of their, pointed that lots of incoming traffic (actually, most of it) was from Russia, plainly because those people are usually ignored.&#xD;&#xA;&#xD;&#xA;Here in Brazil, the most popular game is Counter-Strike, running in Software mode... Some Lan-Houses have only 10% of the machines with GPU, even big-ass ones with 200 or even 300 stations...&#xD;&#xA;&#xD;&#xA;I should not have posted on this, I knew that it would attract down-votes, I got free loss of points for posting this, every time I explain why my other game uses Allegro 4.4 instead of 5.0 because 5.0 does not support Direct Draw or software mode I get lots of flak from lots of people saying that I am a sort of liar or that I am stupid for saying this truth about the actual availability of OpenGL acceleration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT 2: To be able to play and develop games that have OpenGL, I had to beg for my parents and other people to buy me a GeForce 8600 (that was the cheapest card that I found that still could ran Mass Effect 1 and other UT3-engine games), they bought me one, but now I am several years without ever getting other gifts again, not even birthday presents, because of how expensive it was, and I hope this card work for more 3 or 4 years..." />
  <row Id="2372" PostHistoryTypeId="2" PostId="1298" RevisionGUID="3e0653a5-acbf-4e3f-a882-92212fc1d9cd" CreationDate="2010-07-22T22:21:51.713" UserId="292" Text="Personally, I'm a huge fan of [Rules of Play](http://www.amazon.com/Rules-Play-Game-Design-Fundamentals/dp/0262240459/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279837235&amp;sr=8-1) for game designers.  It offers a lot of examples and exercises for people looking into game design as a career." />
  <row Id="2373" PostHistoryTypeId="16" PostId="1298" RevisionGUID="3e0653a5-acbf-4e3f-a882-92212fc1d9cd" CreationDate="2010-07-22T22:21:51.713" UserId="-1" />
  <row Id="2374" PostHistoryTypeId="2" PostId="1299" RevisionGUID="f11ca532-1d38-4900-9228-ef97ba2838ca" CreationDate="2010-07-22T22:24:38.013" UserDisplayName="Robotron3000" Text="[Rules of Play][1], Roger Caillois' &quot;Man, Play &amp; Games&quot; and Huizinga's &quot;Homo Ludens&quot; - and of course Koster's &quot;Theory of Fun&quot; as an ANTI-guide (look at the farce that was SWG to understand why.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Rules-Play-Game-Design-Fundamentals/dp/0262240459/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1279837220&amp;sr=1-1&#xD;&#xA;" />
  <row Id="2375" PostHistoryTypeId="16" PostId="1299" RevisionGUID="f11ca532-1d38-4900-9228-ef97ba2838ca" CreationDate="2010-07-22T22:24:38.013" UserId="-1" />
  <row Id="2377" PostHistoryTypeId="2" PostId="1301" RevisionGUID="ac60c356-e73d-4d38-8184-8d7201f0d83e" CreationDate="2010-07-22T22:41:33.300" UserDisplayName="Nick" Text="There are still a surprising number of really old machines out there with crappy/non-existent 3d acceleration and drivers that have never been updated, such that using DirectDraw is still going to be way faster than OpenGL or D3D.  I experienced this while working on a 2d multiplayer game that is about 10 years old now when I tried to write a new rendering backend in OpenGL to support other platforms.  A lot of players reported that the OpenGL mode was unplayable due to low frame rates.  I would also agree with the Brazilian poster that this is more common outside of the US and Europe, but it's still true in those places as well.&#xD;&#xA;&#xD;&#xA;If you're targeting mobile phones or XNA, then definitely use 3D.  But if you want to make a game that runs on any PC, anywhere, I'd say stick with DDraw." />
  <row Id="2378" PostHistoryTypeId="5" PostId="152" RevisionGUID="3c3d5f5d-50c1-4424-93ba-1311e0ea251f" CreationDate="2010-07-22T22:45:17.867" UserId="55" Comment="typo" Text="It's far from the best, but this an implementation I did of [A* in C++][1] a few years ago.&#xD;&#xA;&#xD;&#xA;It's probably better that I point you to resources than attempt to explain the entire algorithm.  Also, as you read through the wiki article, play with the demo and see if you can visualize how it is working. Leave a comment if you have a specific question.&#xD;&#xA;&#xD;&#xA; 1. [A* on Wikipedia][2]&#xD;&#xA; 2. [A* Java demonstration][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://folio.david-mcgraw.com/Sample/C++__AStar.txt&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A*&#xD;&#xA;  [3]: http://www.vision.ee.ethz.ch/~cvcourse/astar/AStar.html" />
  <row Id="2379" PostHistoryTypeId="2" PostId="1302" RevisionGUID="f0f7810d-432d-4caf-bf9a-2fac8a068213" CreationDate="2010-07-22T22:50:10.763" UserId="820" Text="[http://incompetech.com/](http://incompetech.com/m/c/royalty-free/)  &#xD;&#xA;Great free to use music, as long as you include credit to the creator." />
  <row Id="2380" PostHistoryTypeId="2" PostId="1303" RevisionGUID="d27914ab-e6ce-4d50-a35d-bdb9fe46191a" CreationDate="2010-07-22T22:52:31.773" UserId="370" Text="I like the idea of mimicking the 3d version; models, skeletons, and skins.  I know of at least one game that made effective use of this idea.&#xD;&#xA;&#xD;&#xA;[Mommy's Best Games: Weapon of Choice][1]&#xD;&#xA;&#xD;&#xA;They released a post mortem afterward and where very happy with their animation editor, [Mommy's Best Object Editor][2].&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You'll have to read the one page description to get the complete understanding, but basically instead of models there are sprites.  And the skeletons are only 2D, basically nodes and joints.  The animation editor is used to get good looking animations, then the engine tweeks the skeletal animation for added smoothness.  Like making sure a monster's feet make good contact with the ground, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mommysbestgames.com/weaponofchoice.html&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3899/postmortem_mommys_best_games_.php?page=3&#xD;&#xA;  [3]: http://www.gamasutra.com/db_area/images/feature/3899/pic2.jpg" />
  <row Id="2381" PostHistoryTypeId="2" PostId="1304" RevisionGUID="f32e786f-69f2-49e2-9917-c03bd3116afb" CreationDate="2010-07-22T22:54:14.110" UserId="890" Text="http://iphonedevdepot.com/tiki-index.php " />
  <row Id="2382" PostHistoryTypeId="16" PostId="1304" RevisionGUID="f32e786f-69f2-49e2-9917-c03bd3116afb" CreationDate="2010-07-22T22:54:14.110" UserId="-1" />
  <row Id="2383" PostHistoryTypeId="2" PostId="1305" RevisionGUID="cecafc09-edd7-4d59-94a1-79f2e2ac1bad" CreationDate="2010-07-22T23:08:52.620" UserId="162" Text="You may want to set up two resumes, with slightly different focuses. Hiring managers, specifically, will HAVE to know what you are and will get very confused if you say you can do both. They will assume you know neither and fail to call you back. But, you can set up a programming resume and a design resume, mentioning the other discipline but customizing the skills list and focus for one discipline. You can say something like &quot;I'm applying for the gameplay programmer position but am available for other opportunities as well&quot; or even apply twice.&#xD;&#xA;&#xD;&#xA;In reality the difference between a &quot;gameplay programmer&quot; and a &quot;technical designer&quot; is essentially 0 once you're working, but they probably go through slightly different hiring processes. Both sound like they would work for you, and both actual jobs would end up using both halves of your background. &#xD;&#xA;&#xD;&#xA;I can tell you from personal experience that if you claim to like doing two things equally well, the person interviewing you will just get confused. Confused interviews do not equal successful interviews." />
  <row Id="2384" PostHistoryTypeId="5" PostId="1303" RevisionGUID="11f559f5-9233-4355-8c2f-9ddba71e0a8d" CreationDate="2010-07-22T23:08:58.893" UserId="370" Comment="added 38 characters in body" Text="I like the idea of mimicking the way it is done in 3d games; models, skeletons, and skins.  I know of at least one game that made effective use of this idea.&#xD;&#xA;&#xD;&#xA;[Mommy's Best Games: Weapon of Choice][1]&#xD;&#xA;&#xD;&#xA;They released a post mortem afterward and where very happy with their animation editor, [Mommy's Best Object Editor][2].&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You'll have to read the one page description to get the complete understanding, but basically instead of models there are sprites.  And the skeletons are only 2D, basically nodes and joints.  The animation editor is used to get good looking animations, then the engine tweeks the skeletal animation for added smoothness.  Like making sure a monster's feet make good contact wit the ground when it's slanted or uneven.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mommysbestgames.com/weaponofchoice.html&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3899/postmortem_mommys_best_games_.php?page=3&#xD;&#xA;  [3]: http://www.gamasutra.com/db_area/images/feature/3899/pic2.jpg" />
  <row Id="2385" PostHistoryTypeId="2" PostId="1306" RevisionGUID="688c0c95-c1db-428f-b3e1-742d30f9beee" CreationDate="2010-07-22T23:13:36.140" UserId="889" Text="I see no one talked about &quot;[Mathematics and Physics for Programmers][1]&quot; wich I think is a must-must for any game programmers. A lot of good stuff about mathematics used in video games like trigonometry, vectors, ballistic and collisions and some more complex motion laws. It's a must have in your bookshelf !&#xD;&#xA;&#xD;&#xA;And I almost forget... &quot;**Clean Code**&quot; and &quot;**The Pragmatic Programmer**&quot; are really nice books to read and keep not too far when working in a developer team. Teach you about how to make good programs that will save time and money to your team.&#xD;&#xA;&#xD;&#xA;Don't have the Rep to post more than one hyperlink sorry...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279840452&amp;sr=8-1" />
  <row Id="2386" PostHistoryTypeId="16" PostId="1306" RevisionGUID="688c0c95-c1db-428f-b3e1-742d30f9beee" CreationDate="2010-07-22T23:13:36.140" UserId="-1" />
  <row Id="2387" PostHistoryTypeId="2" PostId="1307" RevisionGUID="47f86201-bab2-4ae7-81e9-1ec204088432" CreationDate="2010-07-22T23:19:00.747" UserId="181" Text="Tailor your resume towards the job you're applying to. (This goes even for those of us who are untalented single-skill hacks ;) Read the job description, emphasize the parts of your experience that match the job skills.&#xD;&#xA;&#xD;&#xA;People at big companies usually understand that Indie work is different and means many hats, so don't worry when it comes up in the interview - but make clear with the resume that you understand the requirements and want that specific job. (A broad resume is often read as &quot;I take anything you got&quot; - which is a bit desperate ;)&#xD;&#xA;&#xD;&#xA;Some companies have roles of e.g. &quot;Technical Designer&quot;, but you need to find a *large* team to get that specialized.. " />
  <row Id="2388" PostHistoryTypeId="5" PostId="1065" RevisionGUID="b4d28399-2d8a-4409-ad98-8cde833dd7eb" CreationDate="2010-07-22T23:19:04.350" UserId="469" Comment="added my example to the answer." Text="There is a reason to don't use 3D API.&#xD;&#xA;&#xD;&#xA;Only computers in NA, North-west EU and Japan support them...&#xD;&#xA;&#xD;&#xA;I live in Brazil for example, my sister computer is new, has a multi-core processor, several GB ram, and yet it does not run OpenGL games.&#xD;&#xA;&#xD;&#xA;I for example can only play Dwarf Fortress (use OpenGL to render ASCII graphics) on my own computer, on any other computer I find it runs crawling slow.&#xD;&#xA;&#xD;&#xA;And this is not a issue only with Brazil, I asked people around, and it is common in several places of the world... The population that actually own OpenGL or Direct3D compatible cards is a minority...&#xD;&#xA;&#xD;&#xA;Only that this minority get more attention from companies...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But if you are targeting only these &quot;traditional&quot; markets (NA, Northwest EU, JP), then go for it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT for those downvoting:&#xD;&#xA;Obviously you disagree, so, do you have PROOF that NOONE ships anymore computers with crappy VIA or SIS chips (or even other unknown or worse manufacturers) with none or only OpenGL 1.0 support?&#xD;&#xA;&#xD;&#xA;I have TWO machines like that in my house, and they are new (both have more than one core, both have 2GB ram, both have clock frequency above 2GHz...)&#xD;&#xA;&#xD;&#xA;My university have 200 machines like that, even some Dell-built ones.&#xD;&#xA;&#xD;&#xA;It is plainly simple, GPUs are expensive (even crappy Intel ones), and in poor markets, it is a luxury, people buying machines to run MS Word and read e-mails are not going to buy a machine with a decent graphic chip when they can buy one that is 50 USD cheaper, specially when 50 USD is what most people have to buy food for a entire month.&#xD;&#xA;&#xD;&#xA;PLEASE, don't come here saying that I am saying BS, if you never visited a third-world country, and also, don't say that third-world country people don't play games, they do, a lot, Osmos developer post about the Linux version launch of their, pointed that lots of incoming traffic (actually, most of it) was from Russia, plainly because those people are usually ignored.&#xD;&#xA;&#xD;&#xA;Here in Brazil, the most popular game is Counter-Strike, running in Software mode... Some Lan-Houses have only 10% of the machines with GPU, even big-ass ones with 200 or even 300 stations...&#xD;&#xA;&#xD;&#xA;I should not have posted on this, I knew that it would attract down-votes, I got free loss of points for posting this, every time I explain why my other game uses Allegro 4.4 instead of 5.0 because 5.0 does not support Direct Draw or software mode I get lots of flak from lots of people saying that I am a sort of liar or that I am stupid for saying this truth about the actual availability of OpenGL acceleration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT 2: To be able to play and develop games that have OpenGL, I had to beg for my parents and other people to buy me a GeForce 8600 (that was the cheapest card that I found that still could ran Mass Effect 1 and other UT3-engine games), they bought me one, but now I am several years without ever getting other gifts again, not even birthday presents, because of how expensive it was, and I hope this card work for more 3 or 4 years...&#xD;&#xA;&#xD;&#xA;EDIT 3: 	&#xD;&#xA;A pratical example: Eletronic Arts made a new client for Ultima Online that uses 3D acceleration for its 2D graphics... Result: Lots of players complaining of ridicously low framerates, and EA backing down in their decision to enforce the use of the new client (now it is allowed to remain using the old on" />
  <row Id="2389" PostHistoryTypeId="2" PostId="1308" RevisionGUID="770a75f0-009f-4716-8f01-db6b0dd387fa" CreationDate="2010-07-22T23:20:39.543" UserId="659" Text="If your game is simple enough, and you want the game to run well on low-end machines, particularly netbooks and older laptops (with no 3D acceleration, or very minimal - older Intel integrated graphics, etc), it's still worth considering a pure 2D framebuffer approach&#xD;&#xA;&#xD;&#xA;If you're happy for the game to require at least a low-end ATi/NVidia card/chip, then going using a 3D API will allow you to do a lot of cool stuff (alpha blending, scaling/rotation, etc) that would be tricky to do well/efficiently in a pure software renderer.&#xD;&#xA;&#xD;&#xA;Also, be aware that a few things that are very simple in 'pure 2D' become more interesting when 3D hardware (and bilinear filtering/alpha blending) is involved.  Understand the concept of premultiplied alpha.  And also think about, for example, how you'd handle the seams between tiles in a 2D tilemap if you wanted a zoomable/rotatable view.&#xD;&#xA;&#xD;&#xA;Also remember that fillrate is limited. And it's surprisingly easy to reach those limits in 2D. You might not have many polygons, but if you want lots of alpha-blended parallax layers, or particles, or post effects - you can quite easily end up filling as many pixels as a fairly high-end 3D game.&#xD;&#xA;&#xD;&#xA;But generally, 3D hardware is awesome, and additive blending is your friend :)" />
  <row Id="2390" PostHistoryTypeId="2" PostId="1309" RevisionGUID="a7215faa-b44a-4d8c-bddc-1a1f7793043f" CreationDate="2010-07-22T23:21:35.423" UserId="34" Text="The [OpenGL Red Book][1] is a must have on your bookshelf as a developer.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321552628/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1279840731&amp;sr=8-2" />
  <row Id="2391" PostHistoryTypeId="16" PostId="1309" RevisionGUID="a7215faa-b44a-4d8c-bddc-1a1f7793043f" CreationDate="2010-07-22T23:21:35.423" UserId="-1" />
  <row Id="2392" PostHistoryTypeId="5" PostId="1242" RevisionGUID="c093a2ea-ff50-411e-90b2-48a414324870" CreationDate="2010-07-22T23:30:04.177" UserId="181" Comment="added 1 characters in body" Text="Yes, it does use a different source. If you look at the [Windows documentation](http://msdn.microsoft.com/en-us/library/ms725496%28VS.85%29.aspx) you will see that you should use GetTickCount/GetTickCount64 to compare against the message time.&#xD;&#xA;&#xD;&#xA;If you need any kind of precision, I suggest not relying on the message time - GetTickCount has *horrible* resolution. (10-16ms)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2393" PostHistoryTypeId="2" PostId="1310" RevisionGUID="3820429b-8ef6-4a49-bddd-762ade39791f" CreationDate="2010-07-22T23:30:39.900" UserId="889" Text="Well no one talked about the [OpenGL Programming Guide][1], I don't have this particular edition but older ones was pretty good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321552628/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1279841364&amp;sr=8-2" />
  <row Id="2394" PostHistoryTypeId="2" PostId="1311" RevisionGUID="97a28f62-40b0-4833-a351-4b1f94bb592d" CreationDate="2010-07-22T23:31:03.100" UserId="888" Text="Another good resource in addition to the books listed here is [this Linear Algebra][1] course at MIT Open CourseWare.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2005/" />
  <row Id="2395" PostHistoryTypeId="2" PostId="1312" RevisionGUID="c1068fc6-e212-4593-b659-c09e549bccb7" CreationDate="2010-07-22T23:36:48.957" UserId="469" Text="My father has some mild color blindness, and my cousin has a severe red/green blindness (he see both as yellow... something that makes things worse, since when he see a colour it may be yellow, or red, or green...)&#xD;&#xA;&#xD;&#xA;My family feared that I would be colour blind too (I DO confuse some colours, mostly blue and black and dark blue with dark green... but it is not colour blindness it seems), so we researched a lot...&#xD;&#xA;&#xD;&#xA;Basically, 7% of the US population (seemly worldwide is 10% among caucasians and maybe asians... I have no data for black people) is colour blind in varying degrees but of the same type of my cousin (ie: see both red and green as yellow)&#xD;&#xA;&#xD;&#xA;So, the solution is basically don't use red, green and yellow as important gameplay elements...&#xD;&#xA;&#xD;&#xA;I for example made my current game based on colors, but you can still understand the game if you only see the difference between red and blue, and the majority of the population can see the difference between those two colours (they are on the opposite sides of the spectrum and have mostly no overlap in our &quot;sensors&quot;, even if the person have only a single colour sensor in his retina, he will see one of these two colours and see the other as yellow or gray, but unless you have some bizarre brain problem, it is impossible to see red as blue, or blue as red)&#xD;&#xA;&#xD;&#xA;A BAAAAD example is Bioshock 2, it has a minigame where the background is yellow, and you have to stop a pointer above either red or green... If you use some filters that simulate colour blindness you will see that almost all types colour blindness result in this minigame breaking, or the green and red become hard to distinguish, or one of the two colours blend in the yellow background, the only people that can play this minigame properly while having colour blindness are those that don't see the blue colour..." />
  <row Id="2396" PostHistoryTypeId="2" PostId="1313" RevisionGUID="1d68d448-9c64-416a-b9cb-288cc80309bc" CreationDate="2010-07-22T23:39:59.403" UserId="659" Text="It's a while since I played Worms, but from what I remember - when the rope wraps around things, there's only one (straight) section of rope that's moving at any one time. The rest of the rope becomes static&#xD;&#xA;&#xD;&#xA;So there's very little actual physics involved. The active section can be modelled as a single stiff spring with a mass on the end&#xD;&#xA;&#xD;&#xA;The interesting bit will be the logic for splitting/joining inactive sections of the rope to/from the active section.&#xD;&#xA;&#xD;&#xA;I'd imagine there'd be 2 main operations:&#xD;&#xA;&#xD;&#xA;'Split' - The rope has intersected something. Split it at the intersection into an inactive section and the new, shorter, active section&#xD;&#xA;&#xD;&#xA;'Join' - The active rope has moved into a position where the nearest intersection no longer exists (this may just be a simple angle/dot product test?). Rejoin 2 sections, creating a new, longer, active section&#xD;&#xA;&#xD;&#xA;(Of course, with modern physics engines and a fair bit of CPU power, you might get away with a whole load of small rigid bodies and suitable constraints. But that'll be costly, and potentially not too stable?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2397" PostHistoryTypeId="2" PostId="1314" RevisionGUID="b9bb511e-0f66-48ab-b49d-8259c5b13cea" CreationDate="2010-07-22T23:41:26.297" UserId="469" Text="In the early days of the industry, instead of fighting piracy, companies let the users share their games freely, and put some nag screen or something like that on the game.&#xD;&#xA;&#xD;&#xA;Then they would sell DLC and expansions (yes, DLC is 20 years old actually :P), hintbooks, cheat codes, swags, etc...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Why this model died?&#xD;&#xA;&#xD;&#xA;Note: I am talking about classic shareware, not the crippleware or demo crap." />
  <row Id="2398" PostHistoryTypeId="1" PostId="1314" RevisionGUID="b9bb511e-0f66-48ab-b49d-8259c5b13cea" CreationDate="2010-07-22T23:41:26.297" UserId="469" Text="Why the shareware (not demo) model died?" />
  <row Id="2399" PostHistoryTypeId="3" PostId="1314" RevisionGUID="b9bb511e-0f66-48ab-b49d-8259c5b13cea" CreationDate="2010-07-22T23:41:26.297" UserId="469" Text="&lt;marketing&gt;&lt;distribution&gt;&lt;business-model&gt;" />
  <row Id="2400" PostHistoryTypeId="5" PostId="1313" RevisionGUID="f34387f0-824f-4c54-b55e-aa5dc6278a6b" CreationDate="2010-07-22T23:45:27.803" UserId="659" Comment="added 49 characters in body" Text="It's a while since I played Worms, but from what I remember - when the rope wraps around things, there's only one (straight) section of rope that's moving at any one time. The rest of the rope becomes static&#xD;&#xA;&#xD;&#xA;So there's very little actual physics involved. The active section can be modelled as a single stiff spring with a mass on the end&#xD;&#xA;&#xD;&#xA;The interesting bit will be the logic for splitting/joining inactive sections of the rope to/from the active section.&#xD;&#xA;&#xD;&#xA;I'd imagine there'd be 2 main operations:&#xD;&#xA;&#xD;&#xA;'Split' - The rope has intersected something. Split it at the intersection into an inactive section and the new, shorter, active section&#xD;&#xA;&#xD;&#xA;'Join' - The active rope has moved into a position where the nearest intersection no longer exists (this may just be a simple angle/dot product test?). Rejoin 2 sections, creating a new, longer, active section&#xD;&#xA;&#xD;&#xA;In a scene constructed from 2D polygons, all split points should be at a vertex on the collision mesh. Collision detection may simplify down to something along the lines of 'If the rope passes over a vertex on this update, split/join the rope at that vertex?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2401" PostHistoryTypeId="2" PostId="1315" RevisionGUID="65fba9cc-84fa-4478-9e46-1fb5feab5128" CreationDate="2010-07-22T23:45:42.793" UserId="10" Text="Because people played the Shareware version of the game and then when it was done. They stopped playing and did not buy it.&#xD;&#xA;&#xD;&#xA;So the turnover rate was very low.&#xD;&#xA;&#xD;&#xA;The old shareware model you speak of &quot;died&quot; when the internet came to be popular, since a large part of the old shareware model was the shareware distributes and the copy/delivery fee you had to pay to get your free program" />
  <row Id="2402" PostHistoryTypeId="2" PostId="1316" RevisionGUID="9764fa91-e2b7-4066-ac9a-3c37a388b540" CreationDate="2010-07-22T23:48:26.860" UserDisplayName="HoboBen" Text="If you have to ask that question, you've already answered it!&#xD;&#xA;&#xD;&#xA;Additionally, try to sum up your game in one sentence. If you can't make this sentence exciting, its because the core game foundations aren't fun and no amount of polish will change that." />
  <row Id="2403" PostHistoryTypeId="2" PostId="1317" RevisionGUID="faa4913b-6019-4e9b-9c1a-ecae31c62503" CreationDate="2010-07-22T23:49:10.760" UserId="890" Text="The artist(s) might use hand drawings-scanner/sketch pad for illustration.&#xD;&#xA;These are then imported and further improved in some other image manipulation tools.&#xD;&#xA;The result then can be used to produce both preview of the game (menu, in-game meshups) and final elements which will be used by the programmer(s): individual images or texture atlases.&#xD;&#xA;&#xD;&#xA;Which tools are artists using out there and how for game development to produce the material used by game programmers? &#xD;&#xA;&#xD;&#xA;I am particularly interested if there are automated tools where a small change at the illustration part can be propagated to produce final production images/textures without the need for the artist to cut/merge them. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="2404" PostHistoryTypeId="1" PostId="1317" RevisionGUID="faa4913b-6019-4e9b-9c1a-ecae31c62503" CreationDate="2010-07-22T23:49:10.760" UserId="890" Text="Which tools are artists using out there and how for game development to produce the material used by game programmers?" />
  <row Id="2405" PostHistoryTypeId="3" PostId="1317" RevisionGUID="faa4913b-6019-4e9b-9c1a-ecae31c62503" CreationDate="2010-07-22T23:49:10.760" UserId="890" Text="&lt;graphics&gt;&lt;tools&gt;&lt;art&gt;" />
  <row Id="2407" PostHistoryTypeId="2" PostId="1319" RevisionGUID="e4f6fc36-5f27-4a89-9aab-f98c34791969" CreationDate="2010-07-23T00:01:49.627" UserId="187" Text="The concept hasn't really died, it's just changed a bit and been given a new name. In fact, if you have an iPhone you can see it in action right now! Many 'free' or 'lite' games offer a sampling of gameplay and allow you to purchase DLC to promote it to the full title.&#xD;&#xA;&#xD;&#xA;On the PC use has declined, but I believe part of the reason for this is the lack of a platform to easily distribute semi-secure DLC (the other of course is piracy). As digital distribution platforms grow, I believe we'll see a resurgence in shareware-style software model, perhaps even starting with Valve's recent &lt;a href=&quot;http://store.steampowered.com/app/630/&quot;&gt;Alien Swarm&lt;/a&gt;, should they choose to provide DLC campaigns.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2408" PostHistoryTypeId="2" PostId="1320" RevisionGUID="63ff92cc-62a5-4784-829d-336191ccc040" CreationDate="2010-07-23T00:06:44.843" UserId="659" Text="If the game is based on a rectangular grid, then this grid defines your X/Y axes. And Z can be used for height.&#xD;&#xA;&#xD;&#xA;Collisions are then as more-or-less as easy as any 2D tile-based game.&#xD;&#xA;&#xD;&#xA;Then you just need to convert from the grid back to isometric screen coordinates for rendering. This is fairly straightforward - but you may need to think about calculating 'depth' values, for sorting purposes (rendering the isometric scene from back to front)" />
  <row Id="2410" PostHistoryTypeId="2" PostId="1321" RevisionGUID="2f82f35c-6f02-4b52-8408-6004a76de39a" CreationDate="2010-07-23T00:22:41.020" UserId="395" Text="One important thing to note is that old-school shareware generally had copy protection that boiled down to 'if(strcmp(reg_code, &quot;12345ABC&quot;)!=0) { nag_screen(); }'. Given that modern game pirates can effortlessly destroy even some pretty complex network-based DRM systems, this doesn't stand much of a chance." />
  <row Id="2411" PostHistoryTypeId="2" PostId="1322" RevisionGUID="7be28d88-43a7-4ade-b6c3-db7bdf835409" CreationDate="2010-07-23T00:28:22.333" UserId="395" Text="Most engines have their own texture compression tools if thats what you mean. As for UV mapping/unmapping, thats usually somewhat specific to a given 3D tool and/or engine. Not 100% sure if either of those are what you are asking about though." />
  <row Id="2412" PostHistoryTypeId="2" PostId="1323" RevisionGUID="8f988181-421d-49f4-9f84-6642d988e138" CreationDate="2010-07-23T00:32:39.830" UserId="262" Text="I am at the design phase of a board game on the iPhone and am considering a couple of options for rendering the view:&#xD;&#xA;&#xD;&#xA;- Quartz to render top down views of the board with core animation to do the transitions to close ups etc. Using a 3D library (or GL directly) to render dice rolls on top of the 2D view.&#xD;&#xA;- Full 3D interface to render the board and do the transitions (something like the Monopoly app on the iPhone).&#xD;&#xA;&#xD;&#xA;Keeping most of the game in 2D simplifies the implementation and the artwork, but I wonder if the overall finish will suffer.  Is it practical to render 3D views (for the dice rolls) on top of a Quartz 2D app? &#xD;&#xA;&#xD;&#xA;Should I just bite the bullet and go 3D?" />
  <row Id="2413" PostHistoryTypeId="1" PostId="1323" RevisionGUID="8f988181-421d-49f4-9f84-6642d988e138" CreationDate="2010-07-23T00:32:39.830" UserId="262" Text="Mixing 3D and 2D content on the iPhone?" />
  <row Id="2414" PostHistoryTypeId="3" PostId="1323" RevisionGUID="8f988181-421d-49f4-9f84-6642d988e138" CreationDate="2010-07-23T00:32:39.830" UserId="262" Text="&lt;2d&gt;&lt;3d&gt;&lt;iphone&gt;" />
  <row Id="2415" PostHistoryTypeId="2" PostId="1324" RevisionGUID="2742f096-1879-412f-9dde-b765d46fea93" CreationDate="2010-07-23T01:10:15.463" UserId="783" Text="You can render OpenGL views on top anything on the iPhone with no performance loss. However, if you're thinking of just doing the dice on top of other 2D graphics, that will be more costly (you'll have to render them to texture and apply an alpha channel).&#xD;&#xA;&#xD;&#xA;When mixing 2D and 3D on the iPhone, I recommend you think of it mostly in terms of the 3D in the background, and some 2D elements on top.&#xD;&#xA;&#xD;&#xA;Check out [my GDC presentation][1] for all the different cases and details on how to mix UIKit and OpenGL, and make sure to download [the sample source code as well][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/gdc-2010-the-best-of-both-worlds-using-uikit-with-opengl&#xD;&#xA;  [2]: http://gamesfromwithin.com/opengl-and-uikit-demo" />
  <row Id="2416" PostHistoryTypeId="16" PostId="1214" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-23T01:20:01.197" UserId="2" />
  <row Id="2417" PostHistoryTypeId="16" PostId="1219" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-23T01:20:01.197" UserId="2" />
  <row Id="2418" PostHistoryTypeId="16" PostId="1232" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-23T01:20:01.197" UserId="2" />
  <row Id="2419" PostHistoryTypeId="16" PostId="1278" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-23T01:20:01.197" UserId="2" />
  <row Id="2420" PostHistoryTypeId="16" PostId="1311" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-23T01:20:01.197" UserId="2" />
  <row Id="2421" PostHistoryTypeId="16" PostId="1210" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-23T01:20:01.197" UserId="2" />
  <row Id="2422" PostHistoryTypeId="2" PostId="1325" RevisionGUID="8da7c85a-b5a1-45e0-a4f6-2fc9dfd5986d" CreationDate="2010-07-23T01:34:05.830" UserId="897" Text="There are good answers here. I had to figure it out for myself on the project I'm on, but came to the same conclusions as the Sucker Punch guys (and I had thought I came up with something novel. Baww :( ).&#xD;&#xA;&#xD;&#xA;I find it useful to consider your entire first person 360x180 degree &quot;panorama&quot; as an &quot;acceleration field&quot;. All valid targets create gravity wells which bend the player's input (only subtley) such that macro motion (turning to face targets) feels as though it's a &quot;greased&quot; path. However, this is not affecting the crosshair all of the time - only when the player's turn delta is pointed with the slope of the well (as it were). That's really key though - you're only giving this extra turn speed when the player is turning roughly toward a target. That's about the only inference you can make from the player's input. &#xD;&#xA;&#xD;&#xA;Much more, and you get too much of a noticeable &quot;ouija effect&quot;. You want the exact opposite of ouija: Where a ouija board is moving unintelligently due to a user, without their conscious knowledge, you want a player's crosshair to move in an intelligent way without the user realizing that it's NOT purely their input. It really is a bit of a magic trick.&#xD;&#xA;&#xD;&#xA;Use the dot product of the player's pitch/yaw turning delta vs. the pitch/yaw delta from the crosshair to each target. Clamp the value between 0 and max speed (so you ignore the input while pushing away from the target), then use a function of distance as a falloff modifier.&#xD;&#xA;&#xD;&#xA;I found that increasing this &quot;macro movement&quot; bonus when the crosshair vs. target angular delta is large (i.e. when an enemy is behind you) really helps with the classic console controller problem of not being able to turn-to-face quick enough. In terms of &quot;targetting choices&quot;, if you're being attacked from behind, and there's no targets infront of you, that panorama ahead of you is &quot;dead space&quot;, and you might as well give the player the ability to fly across it at great speed with their cursor. And if there ARE targets ahead, well, they're probably higher in the player's mind and due to dampening/sticky aim, aren't unduely affected by the weak macro force.&#xD;&#xA;&#xD;&#xA;There's not much need for you to dampen sensitivity when the player tries to turn *away* &#xD;&#xA;from an object (this will result in a feeling of trying to &quot;escape&quot; a target's orbit). Dampening is used more for precision aiming, and also to stop players' aim overshooting when moving from macro to micro precision - It's the darnest thing: players (especially novices) have a tendancy to only use the extremes of a stick's deflection, so you have to do a lot of finessing for them.&#xD;&#xA;&#xD;&#xA;Sticky aim is a relative movement compensator. Watch the difference between the angle to your target (from the camera, not from the entity origin), this frame, and last frame. See how closely you are aiming to the target. To avoid the ouija effect when there is no user input, check both sticks' deflection: See if you have physically moved (left stick actuation) OR if there is active aiming &quot;with&quot; the direction of the target. Add the yaw/pitch delta step * aim closeness * Max( move.length , aim.length ) for rudimentary sticky aim.&#xD;&#xA;&#xD;&#xA;Where the issue of target confusion comes in (i.e. a target strafes across your view while you were aiming at something behind, &quot;stealing&quot; your focus), simply keep track of your targets, and &quot;heat&quot; a single one while it is being actively aimed at. Then, multiply the dampening and sticky components by this heat parameter so that unheated targets get ignored. If the player WANTS the help on that other target, they'll manually aim toward it, and very quickly, that becomes the most prominently heated target while the previous one is forgotten.&#xD;&#xA;&#xD;&#xA;We also create &quot;phantom&quot; aim assitance targets to help you turn away from uninteresting things (i.e. facing a wall - no need to hang around looking at a close up blank surface if it's not usefully interactive), but it's probably more than I can talk about - you can apply this stuff to anything that's interesting for the player to point at, be it explosive barrels, interactive objects (bioshock uses dampening when aiming over interactable objects at close range... but doesn't do sticky aim on them, I don't think). Once you realize that this is all just to compliment the core concept of aiming, you realize it's not just about aiming shots, but a general useability improvement which feeds into any mechanics reliant on aiming. And in an FPS, really, movement and aiming are the fundamental core concepts you need to nail before developing onward.&#xD;&#xA;&#xD;&#xA;The improtant thing with all this is tuning. Takes a long time to just get right, and to deal with target interference, and issues with targets being so close range that their &quot;targetting zones&quot; swamp the player's panorama, slowing 60 degrees of rotation down to a crawl.&#xD;&#xA;&#xD;&#xA;Oh man, I should get to bed. Sorry if some of the maths is not to clear. It's really late, but I was excited reading this post." />
  <row Id="2423" PostHistoryTypeId="2" PostId="1326" RevisionGUID="d8743371-541c-4166-a459-4b2feb3f6116" CreationDate="2010-07-23T01:46:06.597" UserId="43" Text="[Game Engine Architecture][1] gives an overview of a game engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135" />
  <row Id="2424" PostHistoryTypeId="16" PostId="1326" RevisionGUID="d8743371-541c-4166-a459-4b2feb3f6116" CreationDate="2010-07-23T01:46:06.597" UserId="-1" />
  <row Id="2425" PostHistoryTypeId="2" PostId="1327" RevisionGUID="8b1736ef-557a-4e1f-96d4-9be35db92fa9" CreationDate="2010-07-23T01:58:11.527" UserId="43" Text="I want to understand how navmeshes work and why it is better than other types of pathing systems." />
  <row Id="2426" PostHistoryTypeId="1" PostId="1327" RevisionGUID="8b1736ef-557a-4e1f-96d4-9be35db92fa9" CreationDate="2010-07-23T01:58:11.527" UserId="43" Text="How does Navigation Mesh path-finding work?" />
  <row Id="2427" PostHistoryTypeId="3" PostId="1327" RevisionGUID="8b1736ef-557a-4e1f-96d4-9be35db92fa9" CreationDate="2010-07-23T01:58:11.527" UserId="43" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;computer-science&gt;" />
  <row Id="2428" PostHistoryTypeId="2" PostId="1328" RevisionGUID="8d976e73-ff15-4df3-a9ce-bbaa11e2eb30" CreationDate="2010-07-23T01:59:55.720" UserId="567" Text="im not sure if this is a suitable question but i found a game that had all it is sprites and stuff saved in INA and AN format and i got curious to know which program is it...&#xD;&#xA;&#xD;&#xA;Or is it some sort of compressing or alike and how it is usually done ...&#xD;&#xA;&#xD;&#xA;Anyone knows ?" />
  <row Id="2429" PostHistoryTypeId="1" PostId="1328" RevisionGUID="8d976e73-ff15-4df3-a9ce-bbaa11e2eb30" CreationDate="2010-07-23T01:59:55.720" UserId="567" Text="Sprites saved in INA and AN format ?" />
  <row Id="2430" PostHistoryTypeId="3" PostId="1328" RevisionGUID="8d976e73-ff15-4df3-a9ce-bbaa11e2eb30" CreationDate="2010-07-23T01:59:55.720" UserId="567" Text="&lt;sprites&gt;&lt;tools&gt;" />
  <row Id="2431" PostHistoryTypeId="5" PostId="1327" RevisionGUID="1ee260dc-ba06-4f5e-8950-5beb225f36e2" CreationDate="2010-07-23T02:04:44.773" UserId="43" Comment="added 23 characters in body" Text="I want to understand how navmeshes work, how to implement them and why it is better than other types of pathing systems." />
  <row Id="2436" PostHistoryTypeId="2" PostId="1330" RevisionGUID="2bdba4e3-e7b9-4b54-a3f2-86120355493a" CreationDate="2010-07-23T02:47:00.647" UserId="395" Text="Generally they are used with some kind of enhanced A* algorithm (takes into account jump or fly links for 3D pathfinding). In that way it isn't really a different system than anything else, its more a way of generating a normal pathfinding network directly from high-poly (well, relatively speaking) environment or terrain. For whatever reason we call them beacons here, but the idea is the same, some kind of automated process runs on each map and produces a simple set of connections that can have A* run on them in a reasonable time-frames. If you tried pathfinding against the raw underlying data it would be too slow for a game because of the density of the mesh." />
  <row Id="2438" PostHistoryTypeId="2" PostId="1331" RevisionGUID="1f1d239c-4848-439c-a013-014d928f8fbf" CreationDate="2010-07-23T03:00:57.773" UserId="302" Text="What sort of tools and techniques are available out there for 3D level creation?&#xD;&#xA;&#xD;&#xA;In particular for small teams where you might not have the time and resources to make your level creation tools from scratch. I know you could use Blender or any other 3D modeling app for the geometry, but how do you manage the necessary metadata, triggers, game objects, etc?" />
  <row Id="2439" PostHistoryTypeId="1" PostId="1331" RevisionGUID="1f1d239c-4848-439c-a013-014d928f8fbf" CreationDate="2010-07-23T03:00:57.773" UserId="302" Text="3d level creation for small teams" />
  <row Id="2440" PostHistoryTypeId="3" PostId="1331" RevisionGUID="1f1d239c-4848-439c-a013-014d928f8fbf" CreationDate="2010-07-23T03:00:57.773" UserId="302" Text="&lt;3d&gt;&lt;tools&gt;&lt;tips&gt;&lt;levels&gt;" />
  <row Id="2441" PostHistoryTypeId="2" PostId="1332" RevisionGUID="76cfc550-5cfd-4ae5-853b-dc1329cb8c21" CreationDate="2010-07-23T03:29:35.077" UserId="302" Text="I recently discovered Allegro Sprite Editor: http://www.aseprite.org/&#xD;&#xA;&#xD;&#xA;It's a fairly basic pixel graphics editor with animation support, but I do prefer it over Graphics Gale as ASE has proper alpha channel support and the UI is cleaner, a bit reminiscent of Deluxe Paint. It has layer support and basic onion skinning. It's also open source, which is nice." />
  <row Id="2442" PostHistoryTypeId="2" PostId="1333" RevisionGUID="47bb355a-da91-423f-b26a-5abddefeb3c5" CreationDate="2010-07-23T03:37:45.293" UserId="353" Text="One way to do this is to add &quot;markers&quot; in the scene geometry file itself. You would use a specific naming convention on these markers (which are just pieces of geometry) to represent various things.&#xD;&#xA;&#xD;&#xA;For example, you'd add a sphere and give it the name &quot;player_spawn_0&quot; to represent the starting location of the player.&#xD;&#xA;&#xD;&#xA;When you load in your game, you would then check for these markers in the model file itself, note their locations, name, etc then delete them so they don't draw.&#xD;&#xA;&#xD;&#xA;Most modeling packages allow you to add data to objects (color, texture, etc) so you can use these properties to your own properties. All of the major modeling packages also support you adding arbitrary data to objects so you wouldn't have to stretch yourself trying to finding ways to encode data on your objects.&#xD;&#xA;&#xD;&#xA;Other than that, there are a number of free or cheap level editors that output to a neutral scene file, like http://www.getic.net/&#xD;&#xA;&#xD;&#xA;Exploiting your modeling software is probably the easiest way other than building your own editor however as you don't have to add another set of tools and file formats to your pipeline." />
  <row Id="2443" PostHistoryTypeId="2" PostId="1334" RevisionGUID="29505783-1037-4102-972a-322f18b849d3" CreationDate="2010-07-23T03:41:03.513" UserId="353" Text="It's not necessarily a common program's output at all. It could just be an arbitrary extension chosen by the developer for files that hold data about sprites. You can try opening the file in notepad to see its contents or as suggested above check the first four bytes to see if it is a normal file format saved under a different extensions." />
  <row Id="2444" PostHistoryTypeId="2" PostId="1335" RevisionGUID="cc9cab67-f4a3-4016-bc8a-294ece680af6" CreationDate="2010-07-23T03:42:01.207" UserId="439" Text="I want to create a 2D game but I'd like to have the character to wear tons of different equipments on different combinations, like a RPG or something.&#xD;&#xA;&#xD;&#xA;So let's say the user changes his/her shoulders and pants, this must be shown to the player and all these different equipments must follow the different characters action (hitting, being hit, spelling magic, etc.).&#xD;&#xA;&#xD;&#xA;I see a few problems that I'd like to know the best approach/algorithm/architecture to solve.&#xD;&#xA;&#xD;&#xA;**1 - Sprites or Animations**&#xD;&#xA;&#xD;&#xA;Should I create different sprites for each equipment in each action animation?&#xD;&#xA;&#xD;&#xA;Is it better to just have the equipment sprite and animate it directly on code like rotating and translating (using something like tween on Flash)?&#xD;&#xA;&#xD;&#xA;Is there any other better option? (I really don't like the ideas above)&#xD;&#xA;&#xD;&#xA;**2 - Positions**&#xD;&#xA;&#xD;&#xA;Let's say during one of the character's move he starts looking directly in front to the player's view but ends his movement showing his right side to the player (like if he swings his sword from one side to the other).&#xD;&#xA;&#xD;&#xA;If we consider one part of the user, like his head for example, it starts in front and then turns left.&#xD;&#xA;&#xD;&#xA;It means at least 3 different positions for each head equipment (helmet, cap, whatever).&#xD;&#xA;&#xD;&#xA;This surely influence the answer of #1 question. How is the best way to achieve that?&#xD;&#xA;&#xD;&#xA;**3 - Layers**&#xD;&#xA;&#xD;&#xA;Let's consider a character move where he spins 360 degrees with his arms open. At the beginning of the animation, his right hand is close to the user's view and then, at the middle of the movement, this is probably behind the character's body on the animation.&#xD;&#xA;&#xD;&#xA;Whatever is the option on #1 question, you surely needs to use some kind of layer model to make this sprite or animation to starts closer to the player's view and later change to far away from player's view.&#xD;&#xA;&#xD;&#xA;Is there any good way to do that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I know the question is quite long and difficult to understand. Let me know if you think it's better to have some drawings to try to explain which one and I'll try to do that." />
  <row Id="2445" PostHistoryTypeId="1" PostId="1335" RevisionGUID="cc9cab67-f4a3-4016-bc8a-294ece680af6" CreationDate="2010-07-23T03:42:01.207" UserId="439" Text="Which is the best approach to make a 2D character to be able to use tons of different equipments when in action?" />
  <row Id="2446" PostHistoryTypeId="3" PostId="1335" RevisionGUID="cc9cab67-f4a3-4016-bc8a-294ece680af6" CreationDate="2010-07-23T03:42:01.207" UserId="439" Text="&lt;2d&gt;&lt;algorithm&gt;&lt;animation&gt;" />
  <row Id="2447" PostHistoryTypeId="5" PostId="1333" RevisionGUID="2cf0273d-cbbc-4e63-ad46-fb6de45e6c6c" CreationDate="2010-07-23T03:49:54.183" UserId="353" Comment="added 43 characters in body; added 306 characters in body" Text="One way to do this is to **add &quot;markers&quot; in the scene geometry file itself**. You would use a specific naming convention on these markers (which are just pieces of geometry) to represent various things.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;- Add a sphere and give it the name &quot;player_spawn_0&quot; to represent the starting location of the player. Perhaps more helpful would be to add the player's model itself to mark the player spawn. What you use doesn't matter, as we'll see shortly.&#xD;&#xA;&#xD;&#xA;- When you load in your game, you would then check for these markers in the model file itself, note their locations, name, properties, etc then.&#xD;&#xA;&#xD;&#xA;- Once loaded, delete them from the model so they don't draw.&#xD;&#xA;&#xD;&#xA;Most modeling packages allow you to add data to objects (color, texture, etc) so you can use these properties to your own properties. All of the major modeling packages also support you adding arbitrary data to objects so you wouldn't have to stretch yourself trying to finding ways to encode data on your objects. You also get the benefit of editing right on top of your level instead of making little adjustments to marker positions until they are in the right spot.&#xD;&#xA;&#xD;&#xA;Other than that, there are a number of **free or cheap level editors** that output to a neutral scene file, like http://www.getic.net/&#xD;&#xA;&#xD;&#xA;Exploiting your modeling software is probably the easiest way other than building your own editor however as you don't have to add another set of tools and file formats to your pipeline." />
  <row Id="2448" PostHistoryTypeId="2" PostId="1336" RevisionGUID="ab33c3b7-c1bd-48e7-b6e8-e58ab7c11636" CreationDate="2010-07-23T04:05:41.710" UserId="395" Text="I think it sounds like you are looking for a 2D skeletal animation system perhaps? I don't know of any off-the-shelf systems for that unfortunately, since it has been mostly superseded by the 3D-gfx-but-2D-game trend." />
  <row Id="2449" PostHistoryTypeId="5" PostId="558" RevisionGUID="dd3e68ba-c58c-473a-8509-7c3fe928d818" CreationDate="2010-07-23T04:08:37.590" UserId="288" Comment="added 28 characters in body; edited tags; edited title" Text="I've been trying out some rope-physics recently, and I've found that the &quot;standard&quot; solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. Especially when rope swinging is relevant to gameplay. I don't really care about a rope's ability to wrap up or sag (this can be faked for visuals anyway).&#xD;&#xA;&#xD;&#xA;For gameplay, what is important is the ability for the rope to **wrap around the environment** and then subsequently unwrap. It doesn't even have to behave like rope - a &quot;wire&quot; made up of straight line segments would do. Here's an illustration:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://andrewrussell.net/offsite/2010/stack-sites/wire-wrap.png&quot; /&gt;&#xD;&#xA;&#xD;&#xA;This is very similar to the &quot;Ninja Rope&quot; from the game Worms.&#xD;&#xA;&#xD;&#xA;Because I'm using a 2D physics engine - my environment is made up of 2D convex polygons. (Specifically I am using SAT in Farseer.)&#xD;&#xA;&#xD;&#xA;So my question is this: **How would you implement the &quot;wrapping&quot; effect?**&#xD;&#xA;&#xD;&#xA;It seems pretty obvious that the wire will be made up of a series of line segments that &quot;split&quot; and &quot;join&quot;. And the final (active) segment of that line, where the moving object attaches, will be a fixed-length joint.&#xD;&#xA;&#xD;&#xA;But what is the maths / algorithm involved for determining when and where the active line segment needs to be split? And when it needs to be joined with the previous segment?&#xD;&#xA;&#xD;&#xA;(Previously this question also asked about doing this for a dynamic environment - I've decided to split that off into other questions.)" />
  <row Id="2450" PostHistoryTypeId="4" PostId="558" RevisionGUID="dd3e68ba-c58c-473a-8509-7c3fe928d818" CreationDate="2010-07-23T04:08:37.590" UserId="288" Comment="added 28 characters in body; edited tags; edited title" Text="Implementing a wrapping wire (like the Worms Ninja Rope) in a 2D physics engine" />
  <row Id="2451" PostHistoryTypeId="6" PostId="558" RevisionGUID="dd3e68ba-c58c-473a-8509-7c3fe928d818" CreationDate="2010-07-23T04:08:37.590" UserId="288" Comment="added 28 characters in body; edited tags; edited title" Text="&lt;physics&gt;&lt;farseer-physics-engine&gt;&lt;2d-physics&gt;&lt;rope-physics&gt;" />
  <row Id="2452" PostHistoryTypeId="2" PostId="1337" RevisionGUID="66b85217-ff93-4f9f-851e-317d738d5629" CreationDate="2010-07-23T04:43:04.453" UserId="154" Text="Ease of piracy did a lot to kill the PC shareware model. It was one thing when downloading the first episode of Wolf3D off a BBS was a big deal. Now you can find a full retail game before it even hits store shelves. It's just too easy to distribute large files. &#xD;&#xA;&#xD;&#xA;Places like Steam/iTunes/XBLA/PSN are showing a resurgence in the shareware/demo model as they can keep the full content behind a pay wall from all but the most dedicated pirates. " />
  <row Id="2453" PostHistoryTypeId="5" PostId="1328" RevisionGUID="f004dd1a-6952-4a6f-8914-c48824a08632" CreationDate="2010-07-23T04:51:03.927" UserId="567" Comment="hex dump" Text="im not sure if this is a suitable question but i found a game that had all it is sprites and stuff saved in INA and AN format and i got curious to know which program is it...&#xD;&#xA;&#xD;&#xA;Or is it some sort of compressing or alike and how it is usually done ...&#xD;&#xA;&#xD;&#xA;Anyone knows ?&#xD;&#xA;&#xD;&#xA;Here is the content of one of the files: &#xD;&#xA;http://pastebin.com/EzUsFvdG&#xD;&#xA;&#xD;&#xA;Here is a hex dump of the above file: http://pastebin.com/CTErFBcS" />
  <row Id="2454" PostHistoryTypeId="6" PostId="1328" RevisionGUID="f004dd1a-6952-4a6f-8914-c48824a08632" CreationDate="2010-07-23T04:51:03.927" UserId="567" Comment="hex dump" Text="&lt;tools&gt;&lt;sprites&gt;" />
  <row Id="2455" PostHistoryTypeId="5" PostId="1328" RevisionGUID="023d2704-0972-4ce5-abc5-31e7f074dd22" CreationDate="2010-07-23T05:00:15.753" UserId="567" Comment="added 162 characters in body; added 43 characters in body" Text="im not sure if this is a suitable question but i found a game that had all it is sprites and stuff saved in INA and AN format and i got curious to know which program is it...&#xD;&#xA;&#xD;&#xA;Or is it some sort of compressing or alike and how it is usually done ...&#xD;&#xA;&#xD;&#xA;Anyone knows ?&#xD;&#xA;&#xD;&#xA;Here is the content of one of the files: &#xD;&#xA;http://pastebin.com/EzUsFvdG&#xD;&#xA;&#xD;&#xA;Here is a hex dump of the above file: http://pastebin.com/CTErFBcS&#xD;&#xA;&#xD;&#xA;The above one is the AN file and the bellow one INA&#xD;&#xA;&#xD;&#xA;Hex dump of a INA file which seems to be some sort of map or data file (i belive beucase of the layers info, etc) ? http://pastebin.com/2fWn8izR&#xD;&#xA;" />
  <row Id="2456" PostHistoryTypeId="2" PostId="1338" RevisionGUID="397d5248-ea62-4898-8199-348d1e7d9ada" CreationDate="2010-07-23T05:02:18.183" UserId="288" Text="Assume I have a physics primitive I am going to call a &quot;wire&quot; wrapped around a 2D environment (as [described in this question][1]).&#xD;&#xA;&#xD;&#xA;Here's an illustration of what that might look like:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://andrewrussell.net/offsite/2010/stack-sites/wire-force.png&quot; /&gt;&#xD;&#xA;&#xD;&#xA;In the example illustration: The box is being pulled upwards (held up) by the wire, and the box is pulling the wire downwards. The object on the spring is being pushed downward by the wire, but is also pushing the wire upwards.&#xD;&#xA;&#xD;&#xA;While I haven't figured out how to implement it yet - assume the wire will slide freely across the points that it is wrapped around.&#xD;&#xA;&#xD;&#xA;My question is - **In a 2D physics simulation (ie: frame based) how do you calculate the forces (or impulses) to apply to the objects that are attached to or wrapped by a wire like this?**&#xD;&#xA;&#xD;&#xA;(As I alluded to in [my first question][1], I imagine that if the only non-static object &quot;on&quot; the wire was the mass at the end, then the force would be identical to a fixed-length joint between the mass and the point before that on the wire.)&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/558/implementing-a-wrapping-wire-like-the-worms-ninja-rope-in-a-2d-physics-engine" />
  <row Id="2457" PostHistoryTypeId="1" PostId="1338" RevisionGUID="397d5248-ea62-4898-8199-348d1e7d9ada" CreationDate="2010-07-23T05:02:18.183" UserId="288" Text="Forces on a wire in a 2D environment? (Physics)" />
  <row Id="2458" PostHistoryTypeId="3" PostId="1338" RevisionGUID="397d5248-ea62-4898-8199-348d1e7d9ada" CreationDate="2010-07-23T05:02:18.183" UserId="288" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;rope-physics&gt;" />
  <row Id="2459" PostHistoryTypeId="2" PostId="1339" RevisionGUID="3d7721d7-07a7-43bc-b1d1-01928f926fc7" CreationDate="2010-07-23T05:04:35.497" UserId="403" Text="Since making games is about iterating versions, communication between the team domains is paramount to solving design and production dependencies that inevitably arise.&#xD;&#xA;That's why having a multi-discipline member in a team is a blessing. He speaks two &quot;languages&quot;, and can more easily anticipate, identify, explain and help solve problems that are at the boundary between the two domains.&#xD;&#xA;&#xD;&#xA;I would advice you to definitely talk about you double competence, especially to the production manager if you meet him." />
  <row Id="2460" PostHistoryTypeId="2" PostId="1340" RevisionGUID="d12eb740-2639-405a-8150-bf8e679e7822" CreationDate="2010-07-23T05:30:30.277" UserId="458" Text="In my experience, there are two types of companies where &quot;multi-class&quot; developers are useful. One is really small companies, where everyone has to wear multiple hats because you don't have enough specialists to go around. The other is really large teams, where you have huge programming, art and design departments and they need departmental liaisons who can speak the language of other departments to act as an information bridge. For those kinds of companies, your breadth of experience is certainly an asset.&#xD;&#xA;&#xD;&#xA;Speaking as a hybrid programmer/designer myself, I would say this has been more of a benefit than a detriment to me in getting hired, although it varies from team to team (and even project to project) just how much my dual skills come into play. Worst case, if a particular job forces you to choose one side of the fence and stay there, you can always exercise your other skills at home on hobby projects on your own time :)" />
  <row Id="2461" PostHistoryTypeId="2" PostId="1341" RevisionGUID="ce626f60-1742-4284-88e8-4ec9336498d5" CreationDate="2010-07-23T05:30:40.743" UserId="118" Text="I want to be able to destroy and deform a car in-game. &#xD;&#xA;&#xD;&#xA;For example, I want two cars to crash and a) break the meshes apart (probably applying force to fly them apart) and b) deform the mesh (like bending the side doors).&#xD;&#xA;&#xD;&#xA;How would I go about this?&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="2462" PostHistoryTypeId="1" PostId="1341" RevisionGUID="ce626f60-1742-4284-88e8-4ec9336498d5" CreationDate="2010-07-23T05:30:40.743" UserId="118" Text="XNA: Deforming/Destroying a model" />
  <row Id="2463" PostHistoryTypeId="3" PostId="1341" RevisionGUID="ce626f60-1742-4284-88e8-4ec9336498d5" CreationDate="2010-07-23T05:30:40.743" UserId="118" Text="&lt;xna&gt;&lt;physics&gt;" />
  <row Id="2464" PostHistoryTypeId="2" PostId="1342" RevisionGUID="b623e467-a006-434e-91a9-21ad2689278f" CreationDate="2010-07-23T05:34:00.007" UserId="302" Text="To determine when to split the rope, you must look at the area that the rope covers each frame. What you do is you do a collision check with the area covered and your level geometry. The area that a swing covers should be an arc. If there is a collision, you need to make a new segment to the rope. Check for corners that collide with the swinging arc. If there are multiple corners that collide with the swing arc, you should pick the one where the angle between the rope during the previous frame and the collision point is the smallest.&#xD;&#xA;&#xD;&#xA;As for joining segments, just keep track of whether at each split the rope is twisting left or right. Then just do a comparison between the previous segment and your current segment, and if your current segment is turning to the other direction, you should join the segments.&#xD;&#xA;&#xD;&#xA;My answer still lacks some math. I'll try to update it later, but I just can't quite remember how this exactly works right now. Something with vectors and cross products maybe..." />
  <row Id="2465" PostHistoryTypeId="2" PostId="1343" RevisionGUID="7c0f5aaa-5c8d-4982-bdca-971f26c43758" CreationDate="2010-07-23T05:48:27.983" UserId="666" Text="When starting a new 2d project on the iOS framework, it seems pretty to start creating UIView subclasses and having fun with Quartz to create very quick prototypes, but I am guessing there will be times where it will be impractical(or impossible) to use such powerful(and wasteful compared to openGL ES) abstractions.&#xD;&#xA;&#xD;&#xA;I know a couple dozen subviews work allright, but there must be a point where having more than X is just impossible to keep a good frame rate.&#xD;&#xA;&#xD;&#xA;How do you know if it would be a good idea to drop the UIKit and start doing some more powerful stuff on openGL?" />
  <row Id="2466" PostHistoryTypeId="1" PostId="1343" RevisionGUID="7c0f5aaa-5c8d-4982-bdca-971f26c43758" CreationDate="2010-07-23T05:48:27.983" UserId="666" Text="How to know when to use UIViews and other Quartz2d features and when to use OpenGL ES?" />
  <row Id="2467" PostHistoryTypeId="3" PostId="1343" RevisionGUID="7c0f5aaa-5c8d-4982-bdca-971f26c43758" CreationDate="2010-07-23T05:48:27.983" UserId="666" Text="&lt;iphone&gt;" />
  <row Id="2468" PostHistoryTypeId="2" PostId="1344" RevisionGUID="507dd4b4-5859-49f0-9d53-ea2578a35fc3" CreationDate="2010-07-23T05:49:39.010" UserId="395" Text="As mentioned above, the evidence points towards this being a custom file format specific to that game. Probably not going to be able to open them yourself. However, if it uses OpenGL or DirectX and loads them as textures you might be able to use a GPU memory viewer to dump them to standard format." />
  <row Id="2470" PostHistoryTypeId="2" PostId="1346" RevisionGUID="9b63b51c-cd90-4216-b845-d3ccd6a18212" CreationDate="2010-07-23T06:13:43.113" UserId="293" Text="Another possible factor to consider is the rise of free online games, especially Flash games like those on sites like NewGrounds and PopCap. Why download a free game when you can instantly play it online, without the hassle of installing anything (beyond maybe a browser plugin)?" />
  <row Id="2471" PostHistoryTypeId="2" PostId="1347" RevisionGUID="68e79cc3-033b-4807-ad34-9bc04308e92e" CreationDate="2010-07-23T06:15:30.707" UserId="322" Text="The box pulling on the wire applies a tension to the wire. Tension is a force, measured in Newtons. If we make some simplifying assumptions (no friction between wire and environment) then the tension is the same at all points along the wire.&#xD;&#xA;&#xD;&#xA;If we consider your example to be static, then the tension on the wire is just the weight of the box:&#xD;&#xA;&#xD;&#xA;    T = m * g&#xD;&#xA;where m is the mass of the box and g is acceleration due to gravity (i.e. 9.8 m/s^2). Note this is only valid in the static case, see below for an explanation of how to calculate it in the dynamic case.&#xD;&#xA;&#xD;&#xA;The force at each bend in the wire is then just the projection of the tension onto the relevant direction. For example the force at the tip of the spring object is a downward force of magnitude:&#xD;&#xA;&#xD;&#xA;    F = T * cos(angle between wire and spring axis)&#xD;&#xA;The force at your second marked point on the environment is irrelevant, since it has no impact on the tension or anything else.&#xD;&#xA;&#xD;&#xA;Now, in the dynamic case the tension is simply the constraint force which you apply to the box in order to keep it attached to the wire. So if the physics engine is impulse based, the tension is just:&#xD;&#xA;&#xD;&#xA;    T = impulse / timestep&#xD;&#xA;This leads into the general algorithm for wrapping the wire around the environment too. The important property is the total length of the wire. Only the last segment needs to be simulated, all the earlier segments can be considered to be fixed. So the length of the last segment is known, just subtract the lengths of the earlier segments from the total length. Then the last segment can be a simple spring constraint. Then just split a segment whenever it intersects with the environment, and remove the split when the bend straightens out." />
  <row Id="2472" PostHistoryTypeId="2" PostId="1348" RevisionGUID="94c641e0-d9eb-4364-bc22-2cc540717b56" CreationDate="2010-07-23T06:18:44.070" UserId="908" Text="Adam Atomic's [Flixel][1] is also worth mentioning. A simple, modern, bare-bones game engine written in Flash. You can learn it in minutes, not days. And using Flash (or Processing/Java) keeps you from one of the most dangerous pitfalls of prototyping: You can't use the prototype's code on any serious platform. It's the game you want to prototype, not the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org" />
  <row Id="2473" PostHistoryTypeId="2" PostId="1349" RevisionGUID="b969ce25-7101-4e44-b7a9-eb100553244c" CreationDate="2010-07-23T06:28:58.667" UserId="55" Text="Isn't Quartz2D more for User Interface / Charts / Drawing Shadowed Text?&#xD;&#xA;&#xD;&#xA;It depends on what you're building. I've built game projects using Core Animation and I've just now started to dip into Cocos2D/OpenGL ES. The most I was doing in my projects was scrolling a background and allowing the player to manipulate views (drag and drop). The moment I thought about particles I figured I would slow the system down to a halt. Animations seemed to work well enough. But, again, I wasn't doing much.&#xD;&#xA;&#xD;&#xA;If your game is simple enough you could very well ride with Quartz2D. But if you're thinking about 50 enemy ships and particle effects already, I'd look at OpenGL ES and save yourself the headache. Might as well learn it earlier rather than later.&#xD;&#xA;&#xD;&#xA;I have to look at projects like Cocos2D and think that OpenGL ES would be the better route to go if you are serious about developing some graphical intense game projects." />
  <row Id="2474" PostHistoryTypeId="2" PostId="1350" RevisionGUID="1ca69f99-c69f-4202-970d-93bcfebc55fa" CreationDate="2010-07-23T06:38:19.163" UserId="662" Text="The basic idea is that the length of the rope remains the same. If it's being pushed up, you will need to create a &quot;split point&quot; there. Then the rope determines on which side it's attached, because it can't &quot;grow&quot; in that direction. Because it's attached to something on the right, the piece of rope on the left will become shorter and the piece between the split point and the attached point will become slightly longer. Then, like Niall said, calculate the tension of the wire. How I would do this is to calculate the tension of each &quot;piece&quot; of rope. You can then use this to determine the forces involved. &#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="2475" PostHistoryTypeId="5" PostId="1347" RevisionGUID="0288ea62-b16c-4124-ace7-552970590e63" CreationDate="2010-07-23T07:37:46.907" UserId="322" Comment="improved explanation of angle" Text="The box pulling on the wire applies a tension to the wire. Tension is a force, measured in Newtons. If we make some simplifying assumptions (no friction between wire and environment) then the tension is the same at all points along the wire.&#xD;&#xA;&#xD;&#xA;If we consider your example to be static, then the tension on the wire is just the weight of the box:&#xD;&#xA;&#xD;&#xA;    T = m * g&#xD;&#xA;where m is the mass of the box and g is acceleration due to gravity (i.e. 9.8 m/s^2). Note this is only valid in the static case, see below for an explanation of how to calculate it in the dynamic case.&#xD;&#xA;&#xD;&#xA;The force at each bend in the wire is then just the projection of the tension onto the relevant direction. For example the force at the tip of the spring object is a force along the contact normal, of magnitude:&#xD;&#xA;&#xD;&#xA;    F = T * cos(angle between wire and contact normal)&#xD;&#xA;In this case the contact normal direction would be the bisection of the angle between the wire segments. The force at your second marked point on the environment is irrelevant, since it has no impact on the tension or anything else.&#xD;&#xA;&#xD;&#xA;Now, in the dynamic case the tension is simply the constraint force which you apply to the box in order to keep it attached to the wire. So if the physics engine is impulse based, the tension is just:&#xD;&#xA;&#xD;&#xA;    T = impulse / timestep&#xD;&#xA;This leads into the general algorithm for wrapping the wire around the environment too. The important property is the total length of the wire. Only the last segment needs to be simulated, all the earlier segments can be considered to be fixed. So the length of the last segment is known, just subtract the lengths of the earlier segments from the total length. Then the last segment can be a simple spring constraint. Then just split a segment whenever it intersects with the environment, and remove the split when the bend straightens out." />
  <row Id="2476" PostHistoryTypeId="2" PostId="1351" RevisionGUID="410805c1-42db-4c19-93b2-0461677764f5" CreationDate="2010-07-23T07:40:37.727" UserId="539" Text="You may already have found this website but I have found it to be a great resource for understanding pathfinding. http://digestingduck.blogspot.com/ The author maintains [Recast navigation library](http://code.google.com/p/recastnavigation/). Hope that you find it as useful as I have." />
  <row Id="2477" PostHistoryTypeId="2" PostId="1352" RevisionGUID="43cc2b66-03d1-4dc0-857e-5be5b569b14a" CreationDate="2010-07-23T07:44:28.480" UserId="910" Text="I have a simple 3d software renderer (SDL / C++) which can load a 3ds Model and render it (shaded) and rotate it around X Y Z - Axis. &#xD;&#xA;Now I would like to rotate / move around the object, meaning, the object itself stands still, and everything in the scene is displayed from the angle of the view. Is that what a camera in 3d engines does, and how would I implement something like this ?&#xD;&#xA;&#xD;&#xA;(No OpenGL / DirectX is used, just plain software)&#xD;&#xA;" />
  <row Id="2478" PostHistoryTypeId="1" PostId="1352" RevisionGUID="43cc2b66-03d1-4dc0-857e-5be5b569b14a" CreationDate="2010-07-23T07:44:28.480" UserId="910" Text="Rotate around a 3d Object (Software Renderer)" />
  <row Id="2479" PostHistoryTypeId="3" PostId="1352" RevisionGUID="43cc2b66-03d1-4dc0-857e-5be5b569b14a" CreationDate="2010-07-23T07:44:28.480" UserId="910" Text="&lt;3d&gt;&lt;rendering&gt;" />
  <row Id="2480" PostHistoryTypeId="2" PostId="1353" RevisionGUID="1e12de99-900d-42af-b227-b0be7862455d" CreationDate="2010-07-23T07:50:52.193" UserId="288" Text="I think the best way to deform your car would be with skeletal animation (see [this sample][1]).&#xD;&#xA;&#xD;&#xA;For example: have a &quot;bone&quot; (or two) for each door, the bonnet, the roof, the front, back, etc. And then you want to *partially* weight most of vertices for that part of the car, to that bone, in an appropriate pattern. Then when your car gets hit - you move the bone for the section of the car that got hit inwards, towards the center.&#xD;&#xA;&#xD;&#xA;It's not as nice as dynamically deforming the model. But it's a *lot* easier and your artist can then get things looking &quot;just so&quot;.&#xD;&#xA;&#xD;&#xA;You probably also want to have two textures - a clean one and a dirty one. Then switch between the two in your pixel shader for different regions. [This sample][2] is probably a good place to start.&#xD;&#xA;&#xD;&#xA;For breaking apart the model - I would suggest simply modelling the different parts separately. You could use the same bone structure so a car that breaks apart keeps the same damage deformation.&#xD;&#xA;&#xD;&#xA;For applying forces to make it fly apart - you probably want to use a 3rd-party physics engine.&#xD;&#xA;&#xD;&#xA;This method should be fine, providing dynamic car deformation isn't a core [gameplay mechanic][3]. (And even then...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/sample/skinnedmodel&#xD;&#xA;  [2]: http://creators.xna.com/en-us/sample/colorreplacement&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=rRGMcFswwik" />
  <row Id="2481" PostHistoryTypeId="2" PostId="1354" RevisionGUID="f6334274-35d8-4c91-8d77-9b2214c56529" CreationDate="2010-07-23T07:52:11.737" UserId="259" Text="Most games fake this massively.  They will break the car down into components (bumpers, doors, wings, bonnet, etc), and each component will have several versions, each for damage inflicted from different dimensions.  With this approach it is also easy to break off parts, and have your doors animate like their hanging off hinges." />
  <row Id="2482" PostHistoryTypeId="5" PostId="1342" RevisionGUID="aea8d104-4232-4e3e-ad3a-4598a844b08d" CreationDate="2010-07-23T08:02:06.503" UserId="302" Comment="Wrote up the actual math." Text="To determine when to split the rope, you must look at the area that the rope covers each frame. What you do is you do a collision check with the area covered and your level geometry. The area that a swing covers should be an arc. If there is a collision, you need to make a new segment to the rope. Check for corners that collide with the swinging arc. If there are multiple corners that collide with the swing arc, you should pick the one where the angle between the rope during the previous frame and the collision point is the smallest.&#xD;&#xA;&#xD;&#xA;The way you do the collision detection is that for the root of the current rope segment, O, the rope's end position on the previous frame, A, the rope's end position on the current frame, B, and each corner point P in a polygonal level geometry, you calculate (OA x OP), (OP x OB) and (OA x OB), where &quot;x&quot; represents taking the Z coordinate of the cross product between the two vectors. If all three results have the same sign, negative or positive, and the length of OP is smaller than the length of the rope segment, the point P is within the area covered by the swing, and you should split the rope. If you have multiple colliding corner points, you'll want to use the first one that hits the rope, meaning the one where the angle between OA and OP is the smallest. Use dot product to determine the angle.&#xD;&#xA;&#xD;&#xA;As for joining segments, do a comparison between the previous segment and the arc of your current segment. If the current segment has swung from left side to the right side or vice versa, you should join the segments.&#xD;&#xA;&#xD;&#xA;For the math for joining segments we'll use the attachment point of the previous rope segment, Q, as well as the ones we had for the splitting case. So now, you'll want to compare the vectors QO, OA and OB. If the sign of (QO x OA) is different from the sign of (QO x OB), the rope has crossed from left to right or vice versa, and you should join the segments. This of course can also happen if the rope swings 180 degrees, so if you want the rope to be able to wrap around a single point in space instead of a polygonal shape, you might want to add a special case for that.&#xD;&#xA;&#xD;&#xA;This method of course does assume that you are doing collision detection for the object hanging from the rope, so that it doesn't end up inside the level geometry." />
  <row Id="2483" PostHistoryTypeId="5" PostId="1353" RevisionGUID="9a029044-31e4-402e-aeed-0d71c86720a4" CreationDate="2010-07-23T08:05:29.867" UserId="288" Comment="added 156 characters in body" Text="I think the best way to deform your car would be with skeletal animation (see [this sample][1] and [this one][2]).&#xD;&#xA;&#xD;&#xA;For example: have a &quot;bone&quot; (or two) for each door, the bonnet, the roof, the front, back, etc. And then you want to *partially* weight most of vertices for that part of the car, to that bone, in an appropriate pattern. Then when your car gets hit - you move the bone for the section of the car that got hit inwards, towards the center.&#xD;&#xA;&#xD;&#xA;It's not as nice as dynamically deforming the model. But it's a *lot* easier and your artist can then get things looking &quot;just so&quot;. (And you can use the same system you might use for turning the wheels, etc.)&#xD;&#xA;&#xD;&#xA;You probably also want to have two textures - a clean one and a dirty one. Then switch between the two in your pixel shader for different regions. [This sample][3] is probably a good place to start.&#xD;&#xA;&#xD;&#xA;For breaking apart the model - I would suggest simply modelling the different parts separately. You could use the same bone structure so a car that breaks apart keeps the same damage deformation.&#xD;&#xA;&#xD;&#xA;For applying forces to make it fly apart - you probably want to use a 3rd-party physics engine.&#xD;&#xA;&#xD;&#xA;This method should be fine, providing dynamic car deformation isn't a core [gameplay mechanic][4]. (And even then...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/sample/skinnedmodel&#xD;&#xA;  [2]: http://creators.xna.com/en-US/sample/simpleanimation&#xD;&#xA;  [3]: http://creators.xna.com/en-us/sample/colorreplacement&#xD;&#xA;  [4]: http://www.youtube.com/watch?v=rRGMcFswwik" />
  <row Id="2484" PostHistoryTypeId="2" PostId="1355" RevisionGUID="589ceba2-4f35-4e7f-b0f8-016ce7fd0dcc" CreationDate="2010-07-23T08:07:27.973" UserId="602" Text="I've always asserted that if you are a game programmer you should be able to make some form of **Space Invaders**. Heck, the game is simple enough that you should be able to do the graphics yourself as well.&#xD;&#xA;&#xD;&#xA;Having a selection of small games in your portfolio as the added benefit of being quite useful, for example, if I am learning a new programming language or framework, I'll often port one of my simple games across to see how the new way of doing things matches up with the way they original was written." />
  <row Id="2485" PostHistoryTypeId="16" PostId="1355" RevisionGUID="589ceba2-4f35-4e7f-b0f8-016ce7fd0dcc" CreationDate="2010-07-23T08:07:27.973" UserId="-1" />
  <row Id="2486" PostHistoryTypeId="2" PostId="1356" RevisionGUID="f1205a15-3aa8-418d-b5ed-a7112b31240b" CreationDate="2010-07-23T08:10:49.650" UserId="178" Text="You could simply add the inverse camera matrix to all your transforms, but I think it depends on how you implemented your renderer." />
  <row Id="2487" PostHistoryTypeId="5" PostId="1342" RevisionGUID="7470be01-084d-498b-bb19-4ba89a5fb056" CreationDate="2010-07-23T08:25:49.693" UserId="302" Comment="Added a helpful diagram." Text="To determine when to split the rope, you must look at the area that the rope covers each frame. What you do is you do a collision check with the area covered and your level geometry. The area that a swing covers should be an arc. If there is a collision, you need to make a new segment to the rope. Check for corners that collide with the swinging arc. If there are multiple corners that collide with the swing arc, you should pick the one where the angle between the rope during the previous frame and the collision point is the smallest.&#xD;&#xA;&#xD;&#xA;![Helpful diagram of the ninja rope situation][1]&#xD;&#xA;&#xD;&#xA;The way you do the collision detection is that for the root of the current rope segment, O, the rope's end position on the previous frame, A, the rope's end position on the current frame, B, and each corner point P in a polygonal level geometry, you calculate (OA x OP), (OP x OB) and (OA x OB), where &quot;x&quot; represents taking the Z coordinate of the cross product between the two vectors. If all three results have the same sign, negative or positive, and the length of OP is smaller than the length of the rope segment, the point P is within the area covered by the swing, and you should split the rope. If you have multiple colliding corner points, you'll want to use the first one that hits the rope, meaning the one where the angle between OA and OP is the smallest. Use dot product to determine the angle.&#xD;&#xA;&#xD;&#xA;As for joining segments, do a comparison between the previous segment and the arc of your current segment. If the current segment has swung from left side to the right side or vice versa, you should join the segments.&#xD;&#xA;&#xD;&#xA;For the math for joining segments we'll use the attachment point of the previous rope segment, Q, as well as the ones we had for the splitting case. So now, you'll want to compare the vectors QO, OA and OB. If the sign of (QO x OA) is different from the sign of (QO x OB), the rope has crossed from left to right or vice versa, and you should join the segments. This of course can also happen if the rope swings 180 degrees, so if you want the rope to be able to wrap around a single point in space instead of a polygonal shape, you might want to add a special case for that.&#xD;&#xA;&#xD;&#xA;This method of course does assume that you are doing collision detection for the object hanging from the rope, so that it doesn't end up inside the level geometry.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i32.tinypic.com/168y0kz.png" />
  <row Id="2488" PostHistoryTypeId="2" PostId="1357" RevisionGUID="c4cfa79b-135a-457b-9609-02f4e5662e20" CreationDate="2010-07-23T08:44:35.887" UserId="261" Text="This is a novel book but seems like a perfect book for Gamedev according to me.&#xD;&#xA;&quot;For The Win&quot; - free download at http://craphound.com/ftw/download/ by the BoingBoing founder." />
  <row Id="2489" PostHistoryTypeId="16" PostId="1357" RevisionGUID="c4cfa79b-135a-457b-9609-02f4e5662e20" CreationDate="2010-07-23T08:44:35.887" UserId="-1" />
  <row Id="2491" PostHistoryTypeId="2" PostId="1358" RevisionGUID="b56bdf73-bf0e-41ff-af4d-9a364de6b5da" CreationDate="2010-07-23T09:08:43.147" UserId="662" Text="What you need to learn about is something called a scene graph. The basic principle is very simple:&#xD;&#xA;&#xD;&#xA;Suppose you have a 2D field. You have an X-axis and a Y-axis. Define a cube with four coordinates:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Now we rotate it 45 degrees. The blue box is the result:&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;Now we translate it to the left and up:&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Let's do this in reverse. First we translate and then we rotate:&#xD;&#xA;&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;The result is completely different!&#xD;&#xA;&#xD;&#xA;What you want to do in a scene graph is multiply a node's matrix with its parent. You want to translate the coordinates of a node from local space (hand) to world space (hand -&gt; arm -&gt; body -&gt; world).&#xD;&#xA;&#xD;&#xA;Effectively, you want to have a top node (your root node) with a bunch of children. When you want to render, you start at the top node and tell its children to render with the top matrix:&#xD;&#xA;&#xD;&#xA;    void SceneNode::Render(Mat4x4* a_Matrix)&#xD;&#xA;    {&#xD;&#xA;        Mat4x4 final = a_Matrix * m_Matrix;&#xD;&#xA;&#xD;&#xA;        if (m_Model) &#xD;&#xA;        { &#xD;&#xA;            m_Model-&gt;Render(final);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (m_Children.size() &gt; 0)&#xD;&#xA;        {&#xD;&#xA;            for (std::vector&lt;SceneNode*&gt;::iterator i = m_Children.begin(); i != m_Children.end(); ++i)&#xD;&#xA;            {&#xD;&#xA;                (*i)-&gt;Render(&amp;final);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I hope this answers your question. :)&#xD;&#xA;&#xD;&#xA;  [1]: http://imgur.com/epNN4.png&#xD;&#xA;  [2]: http://imgur.com/dmKCe.png&#xD;&#xA;  [3]: http://imgur.com/S8Adu.png&#xD;&#xA;  [4]: http://imgur.com/q2TVd.png" />
  <row Id="2492" PostHistoryTypeId="5" PostId="1358" RevisionGUID="2d3956f3-089e-4748-90ca-c7f8feccf2dd" CreationDate="2010-07-23T09:36:47.210" UserId="662" Comment="completely misunderstood the question, edited it to make it better" Text="EDIT: What the hell, I completely misinterpreted the question! Saved for posterity (I thought the question was &quot;how do I get an object to spin around another object):&#xD;&#xA;&#xD;&#xA;What you need to learn about is something called a scene graph. The basic principle is very simple:&#xD;&#xA;&#xD;&#xA;Suppose you have a 2D field. You have an X-axis and a Y-axis. Define a cube with four coordinates:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Now we rotate it 45 degrees. The blue box is the result:&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;Now we translate it to the left and up:&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Let's do this in reverse. First we translate and then we rotate:&#xD;&#xA;&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;The result is completely different!&#xD;&#xA;&#xD;&#xA;What you want to do in a scene graph is multiply a node's matrix with its parent. You want to translate the coordinates of a node from local space (hand) to world space (hand -&gt; arm -&gt; body -&gt; world).&#xD;&#xA;&#xD;&#xA;Effectively, you want to have a top node (your root node) with a bunch of children. When you want to render, you start at the top node and tell its children to render with the top matrix:&#xD;&#xA;&#xD;&#xA;    void SceneNode::Render(Mat4x4* a_Matrix)&#xD;&#xA;    {&#xD;&#xA;        Mat4x4 final = a_Matrix * m_Matrix;&#xD;&#xA;&#xD;&#xA;        if (m_Model) &#xD;&#xA;        { &#xD;&#xA;            m_Model-&gt;Render(final);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (m_Children.size() &gt; 0)&#xD;&#xA;        {&#xD;&#xA;            for (std::vector&lt;SceneNode*&gt;::iterator i = m_Children.begin(); i != m_Children.end(); ++i)&#xD;&#xA;            {&#xD;&#xA;                (*i)-&gt;Render(&amp;final);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I hope this answers your question. :)&#xD;&#xA;&#xD;&#xA;EDIT: After you've done this, you now have both the object and the camera in world space. The main thing about rasterization is that you have to transform the world coordinates into screen coordinates somehow.&#xD;&#xA;&#xD;&#xA;The easiest way to do this is to ignore z:&#xD;&#xA;&#xD;&#xA;    screen.x = world.x;&#xD;&#xA;    screen.y = world.y;&#xD;&#xA;&#xD;&#xA;If you have a rotating teapot, you will see a rotating teapot on the screen. However this isn't a very good implementation. If you want to do it correctly, you will have to subtract from the world position the camera position (effectively turning world space positions into camera space positions) and use the camera matrix to transform the coordinates. &#xD;&#xA;&#xD;&#xA;Here's how I project a triangle in my own software rasterizer:&#xD;&#xA;&#xD;&#xA;    Vec3 camera_space;&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; 3; i++)&#xD;&#xA;    {&#xD;&#xA;        Vec3 translated = a_Triangle-&gt;v[i] - m_Position;&#xD;&#xA;		&#xD;&#xA;        camera_space.x = &#xD;&#xA;            (translated.x * m_Rotation[Mat4x4::X1]) + &#xD;&#xA;            (translated.y * m_Rotation[Mat4x4::Y1]) + &#xD;&#xA;            (translated.z * m_Rotation[Mat4x4::Z1]);&#xD;&#xA;&#xD;&#xA;        camera_space.y = &#xD;&#xA;            (translated.x * m_Rotation[Mat4x4::X2]) + &#xD;&#xA;            (translated.y * m_Rotation[Mat4x4::Y2]) + &#xD;&#xA;            (translated.z * m_Rotation[Mat4x4::Z2]);&#xD;&#xA;&#xD;&#xA;        camera_space.z = &#xD;&#xA;            (translated.x * m_Rotation[Mat4x4::X3]) + &#xD;&#xA;            (translated.y * m_Rotation[Mat4x4::Y3]) + &#xD;&#xA;            (translated.z * m_Rotation[Mat4x4::Z3]);&#xD;&#xA;&#xD;&#xA;        //#define FOV_ANGLE                 60.f&#xD;&#xA;        //static const float FOV_TAN      = tanf(Math::RadToDeg(FOV_ANGLE) / 2);&#xD;&#xA;        const float distance = m_TargetHeightHalf / (FOV_TAN * camera_space.z);&#xD;&#xA;&#xD;&#xA;        a_Triangle-&gt;p[i].x = m_TargetWidthHalf  + (camera_space.x *  distance);&#xD;&#xA;        a_Triangle-&gt;p[i].y = m_TargetHeightHalf + (camera_space.y * -distance);&#xD;&#xA;        a_Triangle-&gt;depth[i] = -distance;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://imgur.com/epNN4.png&#xD;&#xA;  [2]: http://imgur.com/dmKCe.png&#xD;&#xA;  [3]: http://imgur.com/S8Adu.png&#xD;&#xA;  [4]: http://imgur.com/q2TVd.png" />
  <row Id="2493" PostHistoryTypeId="6" PostId="1352" RevisionGUID="1f283251-14b9-4d4e-862f-ae451ca7dc87" CreationDate="2010-07-23T10:26:33.063" UserId="662" Comment="edited tags" Text="&lt;rendering&gt;&lt;projection&gt;" />
  <row Id="2494" PostHistoryTypeId="2" PostId="1359" RevisionGUID="2059edd3-bf5d-47af-8f91-3aa6dc26466f" CreationDate="2010-07-23T10:52:13.020" UserId="921" Text="Note that this is not about graphics/physics/2D/3D/etc.! Rather I'd like to know whether there are dedicated solutions available for implementing custom rules/scoring on top of an existing framework, ideally addressing most common concepts already, for example players, matches, rule variations, game selection, preferences, high scores and the like?&#xD;&#xA;&#xD;&#xA;Or is this functionality usually included in all those graphics oriented libraries/frameworks/engines? If so, are there any that stand out in this regard and do allow reusing the rules/scoring components easily without using the graphics part of the engine for example?&#xD;&#xA;&#xD;&#xA;Alternatively, would you consider this topic to be better addressed by a standard [Business rules engine][1] instead, as suggested in [Java Rule Engine for Game AI][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Business_rules_engine&#xD;&#xA;  [2]: http://stackoverflow.com/questions/514187/java-rule-engine-for-game-ai" />
  <row Id="2495" PostHistoryTypeId="1" PostId="1359" RevisionGUID="2059edd3-bf5d-47af-8f91-3aa6dc26466f" CreationDate="2010-07-23T10:52:13.020" UserId="921" Text="Are there any dedicated rules/scoring libraries/frameworks/engines?" />
  <row Id="2496" PostHistoryTypeId="3" PostId="1359" RevisionGUID="2059edd3-bf5d-47af-8f91-3aa6dc26466f" CreationDate="2010-07-23T10:52:13.020" UserId="921" Text="&lt;engine&gt;&lt;libraries&gt;&lt;scoring&gt;" />
  <row Id="2497" PostHistoryTypeId="2" PostId="1360" RevisionGUID="4a2cc4ea-c0eb-4cda-9d15-e541ba29f5b3" CreationDate="2010-07-23T11:14:41.753" UserId="259" Text="Depending on your language, I'd write my own. The typical game's rules are generally so straight-forward (make the number of people you've killed higher than the number of people they've killed, hold this item for longer than they hold it, etc) than the maintainance of a rules engine may outweigh just hardcoding the rules." />
  <row Id="2498" PostHistoryTypeId="2" PostId="1361" RevisionGUID="4a318d08-ac8b-4caa-8f07-dbca3dfc35d8" CreationDate="2010-07-23T11:23:55.373" UserId="323" Text="In old games like the Ultima series, they would indeed draw one piece of equipment in every possible character pose. Occlusion would be dealt with either by not drawing the gear (if the left glove is behind the player sprite you don't need to worry about it) or by just drawing the gear in back-to-front order.&#xD;&#xA;&#xD;&#xA;Obviously this was very labor-intensive, and as a result there were relatively few pieces of unique gear, with a lot of palette-swapped and palette-modified versions of that gear.&#xD;&#xA;&#xD;&#xA;In a modern game, I'd strongly recommend making 3d characters. If you want 2d-looking art or your platform doesn't have the horsepower for actual 3d, you're still likely to be better off modeling everything in 3d, rendering, and then tweaking the final result by hand.&#xD;&#xA;&#xD;&#xA;Alternatively, if you decide you don't need tweaking, don't have horsepower for full 3d, but don't want to ship a huge sprite library, you can package the 3d models and render them to a texture in realtime when you know the model is about to show up in-game." />
  <row Id="2499" PostHistoryTypeId="2" PostId="1362" RevisionGUID="b13d8e8b-e896-4b1c-97ec-c85e405518b3" CreationDate="2010-07-23T11:38:09.827" UserId="283" Text="In my own game I use a combination of UIKit and Cocos2D (which is OpenGL ES based, for those not familiar with it).&#xD;&#xA;&#xD;&#xA;The first iteration of my game used UIKit for menus, and then a game screen that was Cocos2D based.  The game screen had buttons on it, as well as dialog messages that would pop up.  These were all done in Cocos2D.&#xD;&#xA;&#xD;&#xA;Over time, I have gradually replaced much of my Cocos2D code with UIKit, so that the game play screen is about 2/3 Cocos2D and 1/3 UIKit.  &#xD;&#xA;&#xD;&#xA;I have learned to love and use both frameworks for different reasons.&#xD;&#xA;&#xD;&#xA;This has several advantages:&#xD;&#xA;&#xD;&#xA;1)  It's easier to have a consistent UI throughout the app.  I was having to write code that would make my shiny UIKit buttons look just like my shiny Cocos2D buttons.  Now they're all UIKit.&#xD;&#xA;&#xD;&#xA;2)  The UIKit API is stable.  The best thing and worst thing about Cocos2D is that it is changing (improving!) so fast that I found myself constantly updating my code to support new features and API changes.  Now the amount of code that gets affected by those changes is a lot smaller.&#xD;&#xA;&#xD;&#xA;3)  I have seen no performance loss by doing it this way.  There may even be some memory gain because UIKit is pretty efficient with its use of resources when memory gets tight.&#xD;&#xA;&#xD;&#xA;4)  Development on things like pop-up messages and dialogs is a lot faster, because I can do those in Interface Builder.  I don't need to think about how to lay out the dialog screens in code.&#xD;&#xA;&#xD;&#xA;5)  I don't have to reinvent the wheel on basics like buttons and tables.&#xD;&#xA;&#xD;&#xA;After developing this way, here's my rule of thumb:&#xD;&#xA;&#xD;&#xA;1)  Use UIKit for everything that doesn't require OpenGL.  Menus, messages, buttons, tables, etc.  Core Animation does a good job on 80% of what I need.&#xD;&#xA;&#xD;&#xA;2)  If I find myself writing something that I have seen in UIKit, stop and try to think how I can pull it out of the OpenGL view.&#xD;&#xA;&#xD;&#xA;3)  Certain things like complex movement, particle effects, etc. are perfect fit for OpenGL/Cocos2D, so that's where I put that effort.&#xD;&#xA;" />
  <row Id="2500" PostHistoryTypeId="2" PostId="1363" RevisionGUID="38bc461d-0347-4533-bac1-9c50edf3b69e" CreationDate="2010-07-23T12:17:17.427" UserId="252" Text="Currently the only way I know to create new missions is directly editing the missions files which are text only." />
  <row Id="2501" PostHistoryTypeId="1" PostId="1363" RevisionGUID="38bc461d-0347-4533-bac1-9c50edf3b69e" CreationDate="2010-07-23T12:17:17.427" UserId="252" Text="Is there a mission editor for Startopia available?" />
  <row Id="2502" PostHistoryTypeId="3" PostId="1363" RevisionGUID="38bc461d-0347-4533-bac1-9c50edf3b69e" CreationDate="2010-07-23T12:17:17.427" UserId="252" Text="&lt;modification&gt;&lt;mission-design&gt;" />
  <row Id="2503" PostHistoryTypeId="2" PostId="1364" RevisionGUID="81dc19f0-23f1-4f0f-86b1-8343836d0110" CreationDate="2010-07-23T12:25:02.433" UserId="282" Text="I just wrote a simple Android app that uses SurfaceHolder.Callback interface to communicate the state of the SurfaceView. In the Callback.surfaceDestroyed() method i just informed the rendering thread to terminate and returned, like so:&#xD;&#xA;&#xD;&#xA;        public void surfaceDestroyed(SurfaceHolder holder) {&#xD;&#xA;        renderingThread.requestStop();  &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I did this because in the Android documentation SurfaceHolder.lockCanvas() it states that   a null will be returned when the surface is not available. And also that the SurfaceHolder holds a lock internally until SufraceHolder.unloackCanvasAndPost() is called, which prevents calls to SurfaceHolder.Callback methods.&#xD;&#xA;&#xD;&#xA;So to me it seems that it's not necessary to wait for the rendering thread to finish. However all examples I've seen wait for the thread to finish, usually something like:&#xD;&#xA;&#xD;&#xA;        public void surfaceDestroyed(SurfaceHolder holder) {&#xD;&#xA;           boolean retry = true;&#xD;&#xA;           rederingThread.setRunning(false);&#xD;&#xA;           while (retry) {&#xD;&#xA;              try {&#xD;&#xA;                thread.join();&#xD;&#xA;                retry = false;&#xD;&#xA;              } catch (InterruptedException e) {&#xD;&#xA;            }&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;Is this really necessary? My application runs without problems.&#xD;&#xA;" />
  <row Id="2504" PostHistoryTypeId="1" PostId="1364" RevisionGUID="81dc19f0-23f1-4f0f-86b1-8343836d0110" CreationDate="2010-07-23T12:25:02.433" UserId="282" Text="Is it necessary to wait for rendering thread to terminate in surfaceDestroyed(...)" />
  <row Id="2505" PostHistoryTypeId="3" PostId="1364" RevisionGUID="81dc19f0-23f1-4f0f-86b1-8343836d0110" CreationDate="2010-07-23T12:25:02.433" UserId="282" Text="&lt;android&gt;&lt;multithreading&gt;" />
  <row Id="2506" PostHistoryTypeId="2" PostId="1365" RevisionGUID="82e674aa-fe1e-4f3c-b4ab-03861997d2ab" CreationDate="2010-07-23T12:33:18.860" UserId="353" Text="Some quick Googling:&#xD;&#xA;&#xD;&#xA;http://www.fileplanet.com/62242/60000/fileinfo/StarTopia-Mission-Editor" />
  <row Id="2507" PostHistoryTypeId="2" PostId="1366" RevisionGUID="7e81d7bd-5734-4217-8eb3-036344dc4baf" CreationDate="2010-07-23T12:50:34.660" UserDisplayName="Austech" Text="In Box2D, I was curious if it's possible to get a bounding box of a body already created in the world.&#xD;&#xA;&#xD;&#xA;So basically, the Body is created, it's interacting with the world and such. And I needed that Body's bounding box. Is it possible?&#xD;&#xA;" />
  <row Id="2508" PostHistoryTypeId="1" PostId="1366" RevisionGUID="7e81d7bd-5734-4217-8eb3-036344dc4baf" CreationDate="2010-07-23T12:50:34.660" UserDisplayName="Austech" Text="Box2D Get Bounding Box of a Body" />
  <row Id="2509" PostHistoryTypeId="3" PostId="1366" RevisionGUID="7e81d7bd-5734-4217-8eb3-036344dc4baf" CreationDate="2010-07-23T12:50:34.660" UserDisplayName="Austech" Text="&lt;2d-physics&gt;" />
  <row Id="2510" PostHistoryTypeId="2" PostId="1367" RevisionGUID="b7f056de-92c0-4ed1-8a9b-11370c7abe2b" CreationDate="2010-07-23T12:52:07.043" UserId="47" Text="I believe for the most part it is  just good practice.  Imagine if it was a thread that did a lot of heavy IO.  If you simply killed the thread, you could potentially cause data corruption if it was in the middle of writing to disk.  Now for a rendering thread, I'm not sure what the consequences would be.  Memory leaks?  It really just depends on what all is happening in your rendering thread." />
  <row Id="2511" PostHistoryTypeId="2" PostId="1368" RevisionGUID="7474ad2f-cc05-41b9-b563-286a85e37a63" CreationDate="2010-07-23T12:53:51.533" UserId="857" Text="I'll be likely writing one this year. It will end up having unique design so things turn out on its own anyway.&#xD;&#xA;&#xD;&#xA;Though, what an experienced level designer would want from a level editor? Requirements? Key features? Things that could be worth the time spent into implementing them?" />
  <row Id="2512" PostHistoryTypeId="1" PostId="1368" RevisionGUID="7474ad2f-cc05-41b9-b563-286a85e37a63" CreationDate="2010-07-23T12:53:51.533" UserId="857" Text="Tilemap-based level editor wishlist" />
  <row Id="2513" PostHistoryTypeId="3" PostId="1368" RevisionGUID="7474ad2f-cc05-41b9-b563-286a85e37a63" CreationDate="2010-07-23T12:53:51.533" UserId="857" Text="&lt;2d&gt;&lt;tools&gt;&lt;tiles&gt;" />
  <row Id="2514" PostHistoryTypeId="2" PostId="1369" RevisionGUID="dac11904-0cf7-4fe0-aeb0-b1ca6b17442c" CreationDate="2010-07-23T13:00:59.537" UserId="567" Text="i've made a few games without using XNA and recently started to see some documents and samples around and took an interest on it but i have a few doubts for going into it or not.&#xD;&#xA;&#xD;&#xA;&gt; What limitations do i have if i am&#xD;&#xA;&gt; planning to create a mmorpg with XNA&#xD;&#xA;&gt; for distributing it (if it has a item&#xD;&#xA;&gt; mall or is paid to play for example) ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&gt; Do i need more accounts to test it&#xD;&#xA;&gt; (for example to login into my own game&#xD;&#xA;&gt; 3 players) or XNA does not cost&#xD;&#xA;&gt; anything at this level (heard&#xD;&#xA;&gt; something about LIVE Gold Membership&#xD;&#xA;&gt; plus which is why i am asking this&#xD;&#xA;&gt; one) ?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2515" PostHistoryTypeId="1" PostId="1369" RevisionGUID="dac11904-0cf7-4fe0-aeb0-b1ca6b17442c" CreationDate="2010-07-23T13:00:59.537" UserId="567" Text="XNA for multiplayer game ?" />
  <row Id="2516" PostHistoryTypeId="3" PostId="1369" RevisionGUID="dac11904-0cf7-4fe0-aeb0-b1ca6b17442c" CreationDate="2010-07-23T13:00:59.537" UserId="567" Text="&lt;xna&gt;&lt;mmo&gt;" />
  <row Id="2517" PostHistoryTypeId="5" PostId="1369" RevisionGUID="d054488e-11f2-4f3c-80d9-d6c7a55cbb70" CreationDate="2010-07-23T13:03:17.210" UserId="10" Comment="deleted 50 characters in body" Text="I've made a few games without using XNA and recently started to see some documents and samples around and took an interest on it but i have a few doubts for going into it or not.&#xD;&#xA;&#xD;&#xA;- What limitations do i have if i am planning to create a mmorpg with XNA for distributing it (if it has a item mall or is paid to play for example) ?&#xD;&#xA;&#xD;&#xA;- Do i need more accounts to test it (for example to login into my own game 3 players) or XNA does not cost anything at this level (heard something about LIVE Gold Membership plus which is why i am asking this one) ?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2518" PostHistoryTypeId="2" PostId="1370" RevisionGUID="5a959cc2-5367-45a3-a269-caa258bcf4ac" CreationDate="2010-07-23T13:09:44.653" UserId="662" Text="Something that can top this? :)&#xD;&#xA;&#xD;&#xA;http://thetoolsmiths.org/2009/02/24/sweating-the-small-stuff/" />
  <row Id="2519" PostHistoryTypeId="2" PostId="1371" RevisionGUID="7d9aab77-6bfb-4e5a-9d19-7c2324d46a03" CreationDate="2010-07-23T13:10:14.683" UserId="933" Text="There is one good sprite engine available for C++ called [Kyra][1], maybe it could resolve your issues with composition of sprites for your characters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.grinninglizard.com/kyra/" />
  <row Id="2520" PostHistoryTypeId="2" PostId="1372" RevisionGUID="76fbfa7a-2681-4c81-bd9c-292d40183461" CreationDate="2010-07-23T13:10:15.447" UserId="353" Text="An MMORPG using XNA over Xbox Live is currently not possible. You can't access servers other than Xbox Live and even then you can't have a dedicated server (although technically you could use another Xbox if you wanted to but even then you would have no external access and would need a really good internet connection) to manage your game state. The marketplace is not available either except for downloading the game itself.&#xD;&#xA;&#xD;&#xA;If you develop the game for PC you can have whatever networking code you like, however on Xbox you are very limited as far as multiplayer." />
  <row Id="2521" PostHistoryTypeId="2" PostId="1373" RevisionGUID="043e6674-8cac-4d80-a5ba-1c20f88c35cf" CreationDate="2010-07-23T13:11:13.637" UserId="783" Text="In Box2D, bodies don't have bounding boxes associated with them, fixture do. So you need to iterate over all the fixtures and generate a new AABB. Something like this:&#xD;&#xA;&#xD;&#xA;    b2AABB aabb;&#xD;&#xA;    aabb.lowerBound = b2Vec2(HUGE_FLOAT,HUGE_FLOAT);&#xD;&#xA;    aabb.upperBound = b2Vec2(-HUGE_FLOAT,-HUGE_FLOAT); &#xD;&#xA;    2Fixture* fixture = body-&gt;GetFixtureList();&#xD;&#xA;    while (fixture != NULL)&#xD;&#xA;    {&#xD;&#xA;        aabb.Combine(aabb, fixture-&gt;GetAABB();&#xD;&#xA;        fixture = fixture-&gt;next;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2522" PostHistoryTypeId="5" PostId="1317" RevisionGUID="3d593425-c643-40be-b745-b35e617681d2" CreationDate="2010-07-23T13:11:37.457" UserId="890" Comment="Attempt to clarify  " Text="What processes, tools, methods are used by game artists to prepare materials for the programmers?&#xD;&#xA;&#xD;&#xA;I am interested in tools (ie: photoshop, pixelmator, etc for drawing) and also how they are used together to produce texture atlases or individual images for the programmers.&#xD;&#xA;&#xD;&#xA;Methods or way of working (tool-chains maybe), which can be used by the artist to    &#xD;&#xA;&#xD;&#xA; - Present ideas (sketches)&#xD;&#xA; - Mesh up game images (photosop: front menu, in-game)&#xD;&#xA; - Cut up images/layers into (ie: copy paste?)&#xD;&#xA;   - smaller individual pieces&#xD;&#xA;   - texture atlases (some other tool)&#xD;&#xA; - Generate coordinates ie: (xywh) for button &quot;Options&quot; on the main screen which is stored as main_options.png or (uvhw, xywh) for in-game HUD which is in a texture_atlas.png.&#xD;&#xA; - Any way to automate some of the steps above?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;============ before edit ============&#xD;&#xA;&#xD;&#xA;The artist(s) might use hand drawings-scanner/sketch pad for illustration.&#xD;&#xA;These are then imported and further improved in some other image manipulation tools.&#xD;&#xA;The result then can be used to produce both preview of the game (menu, in-game meshups) and final elements which will be used by the programmer(s): individual images or texture atlases.&#xD;&#xA;&#xD;&#xA;Which tools are artists using out there and how for game development to produce the material used by game programmers? &#xD;&#xA;&#xD;&#xA;I am particularly interested if there are automated tools where a small change at the illustration part can be propagated to produce final production images/textures without the need for the artist to cut/merge them. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="2523" PostHistoryTypeId="2" PostId="1374" RevisionGUID="855e52d4-cdc6-43ff-baef-3e225ad8a47a" CreationDate="2010-07-23T13:13:30.697" UserId="47" Text=" - Loading in custom tiles&#xD;&#xA; - Setting map size&#xD;&#xA; - Setting tile size&#xD;&#xA; - Square tilemaps, hexagon tilemaps, or other shaped tiles&#xD;&#xA; - Save/load map&#xD;&#xA; - Layers&#xD;&#xA; - Animating tiles&#xD;&#xA; - Tile properties (walkable, swimable, etc.)&#xD;&#xA; - Events (depends if you want to add this; i.e. player steps on tile at x,y and does an event)" />
  <row Id="2524" PostHistoryTypeId="5" PostId="1371" RevisionGUID="410cf267-69a8-4415-9259-6c527138b35b" CreationDate="2010-07-23T13:26:07.970" UserId="933" Comment="added 8 characters in body" Text="There is one good sprite engine available for C++ called [Kyra][1], maybe it could resolve the issues you have with composition of sprites for your characters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.grinninglizard.com/kyra/" />
  <row Id="2525" PostHistoryTypeId="2" PostId="1375" RevisionGUID="64ab7460-82d6-4d19-8c63-d851b76504d6" CreationDate="2010-07-23T13:38:04.930" UserId="734" Text="Not yet mentioned:&#xD;&#xA;&#xD;&#xA;* Autotiles (so the designer can draw freely, and have the application set the correct corner tiles). &#xD;&#xA;* Plugins (so I can develop in-house format exporters/importers and tools, etc.)&#xD;&#xA;* Cross-platform (so designers are not forced to use one specific OS.) This, for me, would be one of the most important requirements." />
  <row Id="2526" PostHistoryTypeId="2" PostId="1376" RevisionGUID="754f8712-899c-487c-85cc-f7d32d563a6b" CreationDate="2010-07-23T13:42:14.420" UserId="721" Text="I'm not sure that your code needs to wait the end of renderingThread but it is a generic approach or a Best Practise.&#xD;&#xA;&#xD;&#xA;I use `renderingThread.requestStop()` too without problems.&#xD;&#xA;" />
  <row Id="2527" PostHistoryTypeId="5" PostId="1356" RevisionGUID="8ee9126a-6c0b-4635-a732-d230b2775357" CreationDate="2010-07-23T13:53:01.710" UserId="178" Comment="added 1 characters in body" Text="You could simply add the negative camera matrix to all your transforms, but I think it depends on how you implemented your renderer." />
  <row Id="2528" PostHistoryTypeId="2" PostId="1377" RevisionGUID="fd14e5f8-8c48-42db-995d-488cdbd90666" CreationDate="2010-07-23T13:54:36.793" UserId="22" Text="My friend and I are finishing up our first game right now and I have just discovered that even though he can make some decent music tracks, he has no idea how to make a sound effect - explosion for example. Hence this question." />
  <row Id="2529" PostHistoryTypeId="1" PostId="1377" RevisionGUID="fd14e5f8-8c48-42db-995d-488cdbd90666" CreationDate="2010-07-23T13:54:36.793" UserId="22" Text="How sound effects are made ?" />
  <row Id="2530" PostHistoryTypeId="3" PostId="1377" RevisionGUID="fd14e5f8-8c48-42db-995d-488cdbd90666" CreationDate="2010-07-23T13:54:36.793" UserId="22" Text="&lt;sound&gt;" />
  <row Id="2531" PostHistoryTypeId="2" PostId="1378" RevisionGUID="08d36661-32f2-472c-bcc8-fee630a66370" CreationDate="2010-07-23T13:59:06.627" UserId="222" Text="[Introduction to 3D Game Programming with DirectX 9.0c: a Shader Approach][1] was the best book I've ever found on teaching game/graphics development. It starts with an overview of the math involved and moves on to explaining DirectX. But the lessons can useful beyond DirectX: it explains, at a mathematical level, lighting and shadows and normals and many other things.&#xD;&#xA;&#xD;&#xA;I recommend it for all the newbies like me &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/dp/1598220160?tag=ebookpdf-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=1598220160&amp;adid=16QGKH8NSMRYQJ0SPG5J&amp;" />
  <row Id="2532" PostHistoryTypeId="16" PostId="1378" RevisionGUID="08d36661-32f2-472c-bcc8-fee630a66370" CreationDate="2010-07-23T13:59:06.627" UserId="-1" />
  <row Id="2533" PostHistoryTypeId="2" PostId="1379" RevisionGUID="d0f4b1e5-a9f9-4ea6-924a-49e8eb0db99b" CreationDate="2010-07-23T14:03:27.007" UserId="936" Text="I've got some experience producing Flash games, and for all Flash's faults I find the designer/developer workflow pretty decent. &#xD;&#xA;&#xD;&#xA;I can set up a template FLA with placeholder movieclips and code to that independently of a designer/animator doing their thing. When it comes time for integration, I can either compile their animations into my project by using a SWC or by loading SWF's at runtime.&#xD;&#xA;&#xD;&#xA;I've had a quick look, but I can't see any tools that offer a similar workflow for iOS game development. Could anyone producing iOS games shed any light on how they're handling designer/animator/developer workflow?&#xD;&#xA;" />
  <row Id="2534" PostHistoryTypeId="1" PostId="1379" RevisionGUID="d0f4b1e5-a9f9-4ea6-924a-49e8eb0db99b" CreationDate="2010-07-23T14:03:27.007" UserId="936" Text="Graphic/Animation tools and workflow for iPhone/iOS game development" />
  <row Id="2535" PostHistoryTypeId="3" PostId="1379" RevisionGUID="d0f4b1e5-a9f9-4ea6-924a-49e8eb0db99b" CreationDate="2010-07-23T14:03:27.007" UserId="936" Text="&lt;iphone&gt;" />
  <row Id="2536" PostHistoryTypeId="2" PostId="1380" RevisionGUID="dd89bfba-b881-410c-a621-4e9fd905c6b3" CreationDate="2010-07-23T14:11:25.270" UserDisplayName="sheredom" Text="**Const everything!**&#xD;&#xA;&#xD;&#xA;The more information you give the compiler about the data the better the optimizations are (at least in my experience).&#xD;&#xA;&#xD;&#xA;    void foo(Bar * x) {...;}&#xD;&#xA;&#xD;&#xA;becomes;&#xD;&#xA;&#xD;&#xA;    void foo(const Bar * const x) {...;}&#xD;&#xA;&#xD;&#xA;The compiler now knows that the pointer x is not going to change and that the data it is pointing to will not change either.&#xD;&#xA;&#xD;&#xA;The other added benefit is that you can reduce the number of accidental bugs, stopping yourself (or others) modifying things that they shouldn't." />
  <row Id="2537" PostHistoryTypeId="16" PostId="1380" RevisionGUID="dd89bfba-b881-410c-a621-4e9fd905c6b3" CreationDate="2010-07-23T14:11:25.270" UserId="-1" />
  <row Id="2538" PostHistoryTypeId="2" PostId="1381" RevisionGUID="30ce3707-7d1f-4312-a751-5f840f50834c" CreationDate="2010-07-23T14:12:37.547" UserId="216" Text="You might find free sound effects online [www.freesound.org][1] has lots of sound effects, but they're under the Creative Commons Sampling Plus 1.0 license meaning you have to attribute the author for each and every one you use.&#xD;&#xA;&#xD;&#xA;Alternatively, you could record sounds yourself and mix/edit them in a free program like [Audacity][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freesound.org&#xD;&#xA;  [2]: http://audacity.sourceforge.net" />
  <row Id="2539" PostHistoryTypeId="2" PostId="1382" RevisionGUID="128a814f-165f-4a18-adca-eab0a987aa0e" CreationDate="2010-07-23T14:13:18.450" UserId="939" Text="When designing and play-testing a new game, a lot of the time, the people trying out functionality get used to things, and no longer try the &quot;dumb ways&quot; any more. So if the development breaks something, it may be a feature only a new user would bother trying. What are some of the best ways to make sure that your game has its &quot;stupid cases&quot; tested when it's finally released, or after a major update? Methodology, software assistance, maybe even sites where people will play-test for you, et ceteras.&#xD;&#xA;" />
  <row Id="2540" PostHistoryTypeId="1" PostId="1382" RevisionGUID="128a814f-165f-4a18-adca-eab0a987aa0e" CreationDate="2010-07-23T14:13:18.450" UserId="939" Text="Best way to test simple cases in games" />
  <row Id="2541" PostHistoryTypeId="3" PostId="1382" RevisionGUID="128a814f-165f-4a18-adca-eab0a987aa0e" CreationDate="2010-07-23T14:13:18.450" UserId="939" Text="&lt;testing&gt;" />
  <row Id="2542" PostHistoryTypeId="2" PostId="1383" RevisionGUID="f2818ebd-8cff-48d9-95a5-b96cf3cebad9" CreationDate="2010-07-23T14:29:15.820" UserId="290" Text="Shuffling cards and impact noises are cool (it is a card based game), but should I invest the time/effort in hooking up background music?  I have found [Play Audio from Stream Using C#][1] which could be used to allow hooking to [DI][2] if online or similar code could be used to play local MP3s, but is it worth the effort?  Which game generes need it and which can do without?  Release it without it and add it as a .5 feature?&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/184683/play-audio-from-a-stream-using-c&#xD;&#xA;  [2]: http://di.fm" />
  <row Id="2543" PostHistoryTypeId="1" PostId="1383" RevisionGUID="f2818ebd-8cff-48d9-95a5-b96cf3cebad9" CreationDate="2010-07-23T14:29:15.820" UserId="290" Text="Should I put a soundtrack behind my strategy game?  Which games need music and sound." />
  <row Id="2544" PostHistoryTypeId="3" PostId="1383" RevisionGUID="f2818ebd-8cff-48d9-95a5-b96cf3cebad9" CreationDate="2010-07-23T14:29:15.820" UserId="290" Text="&lt;architecture&gt;&lt;music&gt;" />
  <row Id="2545" PostHistoryTypeId="2" PostId="1384" RevisionGUID="995332ba-a560-4c09-9f7a-4873df2ceea9" CreationDate="2010-07-23T14:31:16.457" UserId="403" Text="You should investigate so-called Monkey Testing. It can catch a lot of the bugs of this type:&#xD;&#xA;&#xD;&#xA;https://secure.wikimedia.org/wikipedia/en/wiki/Monkey_test&#xD;&#xA;&#xD;&#xA;You also need to organize user experience testing with &quot;Kleenex testers&quot;, testers that see your game for the first time and that you will never use again. It's a bit expensive and complicated to organize, but well worth the effort.&#xD;&#xA;If you do, film every test with 3 cameras: one on the screen, one on the controls and one on the tester's face in order to detect frustration." />
  <row Id="2546" PostHistoryTypeId="2" PostId="1385" RevisionGUID="59c415e6-8915-40d5-9438-297af1609545" CreationDate="2010-07-23T14:33:41.770" UserId="891" Text="A sort of code coverage approach to test cases can be done using simple flags that are tripped once the block of code has been executed in-game.  Displaying which flags have been tripped and untripped on screen can allow testers to know which cases have been covered and which haven't.&#xD;&#xA;&#xD;&#xA;Simple as it is, it's still effective so long as the flags have meaningful names so the testers can figure out what's supposed to be done.&#xD;&#xA;&#xD;&#xA;This technique is credited to Matthew Jack who implemented it in Crysis." />
  <row Id="2547" PostHistoryTypeId="2" PostId="1386" RevisionGUID="fdb8b482-cddc-49f5-8ca0-d46165cb71dd" CreationDate="2010-07-23T14:33:47.697" UserId="292" Text="A few things I would say are important:&#xD;&#xA;&#xD;&#xA;**Encourage Programmer Unit Testing**&#xD;&#xA;&#xD;&#xA;This will make sure that certain stupid bugs, if there is a unit test for them, won't recur, because the unit test will fail if they do.  This requires a change in programming methodology, but in my opinion it is completely worth it.&#xD;&#xA;&#xD;&#xA;**Automate Whatever Testing You Can**&#xD;&#xA;&#xD;&#xA;Beyond unit testing, create a set of automated function and acceptance tests that are run on every build to make sure certain builds are good.  If you have scriptable controls and your game is generally consistent, you can test lots of bugs automatically.&#xD;&#xA;&#xD;&#xA;**Create A Multi-Level Test Plan**&#xD;&#xA;&#xD;&#xA;Make sure that your testers have a test plan that tests the most important bugs.  This should be multi-level:&#xD;&#xA;&#xD;&#xA;* Smoke Test: Tests that the game doesn't crash in the most common cases.&#xD;&#xA;* Regular Test: Tests more uncommon cases.&#xD;&#xA;* Soak Test: Run as deep as you can, regressing as many common bugs as possible.  Also test that the game can stay on for very long periods of time (days) without crashing.&#xD;&#xA;&#xD;&#xA;Create this test plan and follow it on every build." />
  <row Id="2548" PostHistoryTypeId="6" PostId="1366" RevisionGUID="4fa57bde-40a2-4c76-9e48-ae014fdef80e" CreationDate="2010-07-23T14:37:00.310" UserId="8" Comment="edited tags" Text="&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="2549" PostHistoryTypeId="2" PostId="1387" RevisionGUID="db5345af-45cf-4bcd-9af7-ab11f06268e5" CreationDate="2010-07-23T14:37:35.740" UserId="47" Text="Well, solitaire (that comes on Windows machines) doesn't have background music.&#xD;&#xA;&#xD;&#xA;Despite that, I think if you can find a decent background music loop that fits the feel of the game and is not obnoxious (i.e. can the user tell when the song is starting over again? and again?  and again?), then you should add it.  Just be sure to add an option to turn it off." />
  <row Id="2550" PostHistoryTypeId="2" PostId="1388" RevisionGUID="c5db74f8-500a-4ebd-bf57-7940309d1396" CreationDate="2010-07-23T14:37:53.147" UserId="292" Text="For Programmers:&#xD;&#xA;&#xD;&#xA;* The Effective series (Effective C++, More Effective C++, Effective C#, Effective STL)&#xD;&#xA;* [C++ Coding Standards: 101 Rules, Guidelines, and Best Practices](http://www.amazon.com/Coding-Standards-Rules-Guidelines-Practices/dp/0321113586) - A really quick read an d changed the way I think about programming.&#xD;&#xA;" />
  <row Id="2551" PostHistoryTypeId="16" PostId="1388" RevisionGUID="c5db74f8-500a-4ebd-bf57-7940309d1396" CreationDate="2010-07-23T14:37:53.147" UserId="-1" />
  <row Id="2552" PostHistoryTypeId="2" PostId="1389" RevisionGUID="de10a4f3-0d80-4b32-aa4a-e2a0a4e17b51" CreationDate="2010-07-23T14:44:41.477" UserId="680" Text="I'd would say it's all a matter of opinion.&#xD;&#xA;&#xD;&#xA;Personally, As a gamer I tend to turn off the ingame music and play something I want to listen to on winamp/spotify in the background. That is, unless the game music is actually really good and not looped to the point of irritation.&#xD;&#xA;&#xD;&#xA;Using an online radio stream might remove the repetitiveness, but a player could stream their own music separately anyway (and pick their own streaming preferences)." />
  <row Id="2553" PostHistoryTypeId="2" PostId="1390" RevisionGUID="4c8b89c1-afbc-4671-9b86-3629ce0184ae" CreationDate="2010-07-23T14:49:26.910" UserId="127" Text="I'd say games should always have sounds. In 90% of cases they add to the experience. Have an option to mute it and then you will be catering for the people who don't like it as well. &#xD;&#xA;&#xD;&#xA;Just as an example [Canabalt][1] is a game that uses music very well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://adamatomic.com/canabalt/ &quot;Canabalt&quot;" />
  <row Id="2554" PostHistoryTypeId="2" PostId="1391" RevisionGUID="d3c793b5-a287-4d39-b98d-cc6d68665355" CreationDate="2010-07-23T14:58:48.293" UserId="34" Text="I would say that it's time to switch when you run into something you can't do or it's too slow.  Switching anytime before then is just wasted time.  And if you are doing this for yourself, you don't want to waste a lot of time.&#xD;&#xA;&#xD;&#xA;As for the speed of UIViews, I've found them to be very respectable -- you're not going to want to use them to put up 100s of sprites and particles on the screen at once, but there are certainly quite a few games you could get away with using nothing outside of Cocoa.  If you find yourself on the edge, you can use CALayers directly to reduce some overhead.  &#xD;&#xA;&#xD;&#xA;Another thing to remember is that the OS caches the contents of your layers.  Even if the item beneath a layer is redrawn and that layer has transparency in it, it doesn't mean that layer will be redrawn.  I've watched layers in my code to see how often their drawInContext: method is called, and despite tons of things going on, most of the time it will be once.  The OS does a very good job with minimizing draw calls." />
  <row Id="2555" PostHistoryTypeId="2" PostId="1392" RevisionGUID="bf0842ba-983b-4e0d-8910-75b12e2be61d" CreationDate="2010-07-23T15:01:07.633" UserId="455" Text="[Pic that i can't show &lt;br/&gt;cause of spam preventing &lt;br/&gt;and low reputation, &lt;br/&gt;but click me](http://uppix.net/1/7/1/df4dfc9937fff2d5c8b91d04dd9e4.png).&#xD;&#xA;&#xD;&#xA;bonus if I can make it happen in Java.  &#xD;&#xA;Also killing panda is bad =)" />
  <row Id="2556" PostHistoryTypeId="1" PostId="1392" RevisionGUID="bf0842ba-983b-4e0d-8910-75b12e2be61d" CreationDate="2010-07-23T15:01:07.633" UserId="455" Text="How to make connection between entities ?" />
  <row Id="2557" PostHistoryTypeId="3" PostId="1392" RevisionGUID="bf0842ba-983b-4e0d-8910-75b12e2be61d" CreationDate="2010-07-23T15:01:07.633" UserId="455" Text="&lt;engine&gt;&lt;architecture&gt;" />
  <row Id="2558" PostHistoryTypeId="2" PostId="1393" RevisionGUID="fc6de12f-796e-4e4e-b660-2ac54ae153fc" CreationDate="2010-07-23T15:05:50.147" UserId="528" Text="Notice that only one person here before me has given the correct answer - &quot;currency can't inflate if there's a limited amount of it.&quot;  Indeed, with infinite resource generation, currency will actually *deflate*, as the amount of resources goes up and the amount of currency stays fixed.&#xD;&#xA;&#xD;&#xA;It's an economy.  You're not the Fed.  Stop minting currency, and stop listening to people that don't understand the economy when asking about it.  The underlying cause of inflation is an increasing money supply, which we only think of as normal because we live in the very first semi-stable fiat currency in history (and that won't last - we'll get out of it, or the dollar will collapse.)&#xD;&#xA;&#xD;&#xA;What you actually want to do is mint a fixed, large count of currency, and play a balancing game between resource production and resource consumption (that is, modulate resource availability such that the total production is approximately what consumption was yesterday.)  Easiest long-term stable way to do that is to keep a running tally of production versus consumption differential, and to use yesterday's data as a target for a 95% repair towards zero (which will allow a damping effect on oscillation, which will occur naturally as the mining population periodically shifts.)" />
  <row Id="2559" PostHistoryTypeId="2" PostId="1394" RevisionGUID="c677f6fc-aa92-430f-b532-1ebf68109491" CreationDate="2010-07-23T15:14:24.207" UserId="639" Text="If you want old-school 8-bit-era sounds [sfxr][1] is a great little tool (Mac OS X and Windows). There's even an explosion preset.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;" />
  <row Id="2560" PostHistoryTypeId="5" PostId="1392" RevisionGUID="22c3515e-7097-452a-8c5f-8345e969bcc8" CreationDate="2010-07-23T15:19:37.160" UserId="455" Comment="deleted 67 characters in body" Text="[UML diagram&#xD;&#xA;+ explanations](http://uppix.net/1/7/1/df4dfc9937fff2d5c8b91d04dd9e4.png).&#xD;&#xA;&#xD;&#xA;bonus if I can make it happen in Java.  &#xD;&#xA;Also killing panda is bad =)" />
  <row Id="2561" PostHistoryTypeId="2" PostId="1395" RevisionGUID="aeb5ec68-7ae2-43c0-a62f-62b099c1978c" CreationDate="2010-07-23T15:20:56.037" UserId="358" Text="Diablo II has &quot;the cube&quot; which allows you to combine certain items to produce a single item. While most of the recipes include low and middle level items, there are a few that require the  super rare items like an SoJ.&#xD;&#xA;&#xD;&#xA;Diablo II has also had world events where only a very limited few can get in on the action at a time. Specifically the uber Diablo event which requires players to sell SoJs to vendors (money sink) to trigger the event.&#xD;&#xA;&#xD;&#xA;The real problem facing a game that uses items as currency between players is that if the game becomes to popular, you will have to fight duplication.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One OOB idea I've had is to create a much richer merchant experience - allowing for things like loyal customer discounts, research &amp; development, et cetera. This allows such &quot;money sinks&quot; to become useful pieces of the game. For example the more money you spend at a merchant, the better stock they will keep. This can, of course, be expanded very easily which makes me think it to be a decent concept. (Just wish I had a game to implement it on)" />
  <row Id="2562" PostHistoryTypeId="2" PostId="1396" RevisionGUID="19700329-de21-4968-94e2-514caf17ea54" CreationDate="2010-07-23T15:23:24.103" UserId="869" Text="I was wondering if any experts out there could share the knowledge and resources of what is necessary to start making games with the latest HTML standards and JavaScript (or what some like to call HTML 5). Are there JavaScript libraries that are essential to the process? Aside from the `&lt;canvas&gt;` tag, what other pieces of HTML do we need to be aware of?" />
  <row Id="2563" PostHistoryTypeId="1" PostId="1396" RevisionGUID="19700329-de21-4968-94e2-514caf17ea54" CreationDate="2010-07-23T15:23:24.103" UserId="869" Text="Essential knowledge for making HTML/JavaScript-based games?" />
  <row Id="2564" PostHistoryTypeId="3" PostId="1396" RevisionGUID="19700329-de21-4968-94e2-514caf17ea54" CreationDate="2010-07-23T15:23:24.103" UserId="869" Text="&lt;web&gt;&lt;html5&gt;&lt;javascript&gt;" />
  <row Id="2565" PostHistoryTypeId="2" PostId="1397" RevisionGUID="15dfb7f0-45f8-4fc4-a12f-7fb2b3044d64" CreationDate="2010-07-23T15:25:01.813" UserId="119" Text="This is a great question but I think you've answered it yourself - you need a 2D bones system that supports bones changing layers, so different limbs can go behind and in front of each other as the character rotates. You will also need to draw your sprites from 4 or 8 angles (or however many you need). Depending on what skills are in your team it might be easier to create these assets in 3D and render them out from the angles you need.&#xD;&#xA;&#xD;&#xA;Using a 3D engine is also a good solution, although this will bring it's own set of challenges." />
  <row Id="2566" PostHistoryTypeId="2" PostId="1398" RevisionGUID="515a0084-0d1b-495d-bd92-db1228a4b41a" CreationDate="2010-07-23T15:28:04.733" UserId="119" Text="Do some research on what a Foley Artist does:&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Foley_artist" />
  <row Id="2567" PostHistoryTypeId="2" PostId="1399" RevisionGUID="795c2e39-f640-4421-b3b3-ae54d05b495b" CreationDate="2010-07-23T15:34:09.740" UserId="662" Text="These gameplay features can be broken into several domains:&#xD;&#xA;&#xD;&#xA;**Collision checking** &#xD;&#xA;&#xD;&#xA;How do you know that the panda's have met? &#xD;&#xA;How do you know the evil hero has slain a panda?&#xD;&#xA;&#xD;&#xA;**Scene management**&#xD;&#xA;&#xD;&#xA;How do you keep track of all the entities in a scene? How do you destroy entities? How do you create new ones?&#xD;&#xA;&#xD;&#xA;First, scene management. An easy way to keep track of everything in your scene is just to make a list. Then, when you want to make a new entity or destroy one, it either adds or deletes it from the list. Simple.&#xD;&#xA;&#xD;&#xA;Then, because you have your list of entities, you can have very basic collision checking by simply checking every item in your list with the other items. Just calculate the distances and see if they're close enough to collide.&#xD;&#xA;&#xD;&#xA;And that should give you a general idea of how to solve these problems. :)" />
  <row Id="2568" PostHistoryTypeId="5" PostId="1392" RevisionGUID="e963b85f-6ffd-49f8-baf4-26f7a76cb7ca" CreationDate="2010-07-23T15:36:14.810" UserId="51" Comment="embedded image" Text="[UML diagram&#xD;&#xA;+ explanations](http://uppix.net/1/7/1/df4dfc9937fff2d5c8b91d04dd9e4.png).&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;bonus if I can make it happen in Java.  &#xD;&#xA;Also killing panda is bad =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://uppix.net/1/7/1/df4dfc9937fff2d5c8b91d04dd9e4.png" />
  <row Id="2569" PostHistoryTypeId="6" PostId="1210" RevisionGUID="5d741fc6-e0d2-4f9d-97ae-27eb94574ec9" CreationDate="2010-07-23T15:37:19.537" UserId="369" Comment="Added &quot;books&quot; tag" Text="&lt;3d&gt;&lt;books&gt;&lt;math&gt;" />
  <row Id="2570" PostHistoryTypeId="2" PostId="1400" RevisionGUID="346b342a-9c0e-4f59-b6fe-c0b86aef625c" CreationDate="2010-07-23T15:44:33.577" UserId="581" Text="My big wish list feature is the ability to easily make a large map &quot;stitched&quot; together from 'rooms'. Basically a map editor designed specifically for a metroidvania style game. Editing many separate smaller maps by hand and dealing with markup or configuration files for specifying how one map links to another is tedious. I'd love to be able to simply make a huge map but section it off with markup and export it as submaps for implementation/efficiency/etc." />
  <row Id="2571" PostHistoryTypeId="2" PostId="1401" RevisionGUID="95e4dec8-586d-4510-9549-da581d247eb5" CreationDate="2010-07-23T15:56:45.053" UserId="569" Text="[Aviary.com][1] has a great free sound editing program. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aviary.com" />
  <row Id="2572" PostHistoryTypeId="2" PostId="1402" RevisionGUID="6b0af878-0c5a-4c0b-b0db-67259a232811" CreationDate="2010-07-23T16:08:25.513" UserId="389" Text="You should be aware of the [Audio][1] and [Video][2] tags. [Web Storage][3] is pretty critical if you need to save a lot of data for saved games etc.&#xD;&#xA;&#xD;&#xA;There are already a few Javascript html5 game frameworks, [Akihabara][4] is rather popular.&#xD;&#xA;&#xD;&#xA;As far as other libraries, [Jquery][5] and [Functional Javascript][6] are 2 of my favorites.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dev.w3.org/html5/spec/Overview.html#audio&#xD;&#xA;  [2]: http://dev.w3.org/html5/spec/Overview.html#video&#xD;&#xA;  [3]: http://dev.w3.org/html5/webstorage/&#xD;&#xA;  [4]: http://www.kesiev.com/akihabara/&#xD;&#xA;  [5]: http://jquery.com/&#xD;&#xA;  [6]: http://github.com/osteele/functional-javascript" />
  <row Id="2573" PostHistoryTypeId="2" PostId="1403" RevisionGUID="2bf32323-3b1f-45c6-9444-ffa9282415ff" CreationDate="2010-07-23T16:12:30.673" UserId="949" Text="We have had quite a bit of success using Unity3D's iPhone Engine.  Unity has a similar workflow to Flash and we have found that all members of the team make the transition fairly well.&#xD;&#xA;&#xD;&#xA;You might want to check out [Unity for Flash Developers][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ethicalgames.wordpress.com/2009/01/14/unity-for-flash-developers-tutorial-1/" />
  <row Id="2574" PostHistoryTypeId="2" PostId="1404" RevisionGUID="b461d904-abe4-458a-b9d7-f7d36486c601" CreationDate="2010-07-23T16:15:58.563" UserId="55" Text="**Plug-in Editor**  &#xD;&#xA;I would just like to reiterate the value of creating a plug-in based editor. [Jeff][1] [Ward][2] pointed me in this direction a few years ago when I started working on an editor.&#xD;&#xA;&#xD;&#xA;Creating such an editor will allow you to remain agile in development. Inserting a new component into the system should be a painless experience. Requirements will come up where you didn't expect them and having this kind of architecture will save you time in the long run.&#xD;&#xA;&#xD;&#xA;And, tbh, from a developer stand-point -- this was pretty fun to experiment with. :)&#xD;&#xA;&#xD;&#xA;**Easy-to-use Event Editor**  &#xD;&#xA;I wouldn't want to see one window with a thousand checkboxes, comboboxes, etc. Give me one window that does one thing. Imagine right clicking on a door and selecting add event. It recognizes it's a door and opens a 'Door' dialog. Well, what do we do with doors? We go places. Have a drop down of other positions the player can go. KISS&#xD;&#xA;&#xD;&#xA;**Dungeon Creator**  &#xD;&#xA;It would be handy if I could start designing a dungeon, or even island, from a random start-point. &#xD;&#xA;&#xD;&#xA;**Improved Tile Placement**  &#xD;&#xA;Say I started drawing the exterior of a castle or the coastline of an island. Imagine, for the island, that I needed to go around the island with the coast tile. If I could hold shift and set the coast tile all around the island, that would be slick. &#xD;&#xA;&#xD;&#xA;**Database**  &#xD;&#xA;What I use for one game, I'd like to use for another game. Create a way for me to store my characters, items, monsters, spells, etc into a database.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/292/jeff&#xD;&#xA;  [2]: http://thetoolsmiths.org/about-2/" />
  <row Id="2575" PostHistoryTypeId="2" PostId="1405" RevisionGUID="6a35f580-d45a-4ecf-ae58-9e8bec8a9f50" CreationDate="2010-07-23T16:58:03.043" UserId="952" Text="&lt;b&gt;Multiple Map Sets&lt;/b&gt;: This could server for having the world on one map set, the dungeons on another, and the houses/caves/etc. on yet another. You could even have multiple worlds (i.e. Balanced, Ruined, etc. like the old Final Fantasies).&#xD;&#xA;&#xD;&#xA;&lt;b&gt;Character/Boss/Enemy Positioning and Properties&lt;/b&gt; We are probably going to want to set where the player and enemies are in the editor. It would be great to be able to edit their properties on the fly (i.e health, defense, current items, etc). This would also help with testing." />
  <row Id="2576" PostHistoryTypeId="2" PostId="1406" RevisionGUID="489aa4bb-e8e2-46ab-a727-969c0bcd92ac" CreationDate="2010-07-23T16:59:12.730" UserId="872" Text="Unity for iPhone is the most complete pipeline and toolset I've found.&#xD;&#xA;It is natively a 3D engine, but can be made to do 2D as well.&#xD;&#xA;For 2D, I've paired Unity with [SpriteManager2][1] which is an excellent third party tool and library.&#xD;&#xA;&#xD;&#xA;A warning, however - it is still unclear if Unity projects will be allowed on the iPhone in the future due to Apple's new terms of service.  Unity is working hard to ensure that it will be OK, but who knows with Apple's track record.&#xD;&#xA;&#xD;&#xA;There is also Unity for Android coming later this year so if you build a game for iPhone and Unity gets banned by Apple, you could still put it on Android.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.anbsoft.com/middleware/sm2/" />
  <row Id="2577" PostHistoryTypeId="4" PostId="1396" RevisionGUID="1ee4c2ca-17ab-4b2e-99cc-1431f951f6d1" CreationDate="2010-07-23T17:02:16.233" UserId="869" Comment="edited title" Text="Essential knowledge for making HTML/JavaScript-based games" />
  <row Id="2578" PostHistoryTypeId="2" PostId="1407" RevisionGUID="b7c1ba7a-9226-4749-a772-425d58e2607a" CreationDate="2010-07-23T17:14:33.860" UserId="395" Text="An interesting trick I heard about from a friend to test graphics; during a known-good run through of a level record performance stats from the GPU at regular intervals (polys on screen for example). You can then replay that route and if the numbers change outside a given tolerance it might mean something isn't displaying correctly anymore." />
  <row Id="2579" PostHistoryTypeId="2" PostId="1408" RevisionGUID="c7fbf64f-13f9-4f3c-b69d-f009fa7f6fc1" CreationDate="2010-07-23T17:16:30.673" UserId="395" Text="I think the real answer is that most aren't, people just buy and use banks of existing effects. " />
  <row Id="2580" PostHistoryTypeId="2" PostId="1409" RevisionGUID="4ae0b7ed-79d1-4ed8-aa2f-c4df28a92dae" CreationDate="2010-07-23T17:19:47.080" UserId="869" Text="Don't forget where you came from: from doing things yourself and keeping it simple. Don't try to imitate the broken &quot;AAA&quot; model of being the idea guy and hire others to do and manage your work; that will slow you down, and first you have to get something out there that is successful enough so that it can make you some money.&#xD;&#xA;&#xD;&#xA;There's nothing wrong with bootstrapping; be proud of it!" />
  <row Id="2581" PostHistoryTypeId="2" PostId="1410" RevisionGUID="2998e7da-001c-4526-9679-b518e68ae1da" CreationDate="2010-07-23T17:25:28.723" UserId="528" Text="This is honestly kind of ridiculous.  You've gone and created an object hierarchy without even considering how instances of the object interact.  Where's your infrastructure?  Where are the object containers?  How do you handle locality?  Et cetera.&#xD;&#xA;&#xD;&#xA;Get yourself to interacting non-ojects in the world, then do your abstractions after that.  You don't make a car by styling the interior then filling in the mechanics afterwards." />
  <row Id="2582" PostHistoryTypeId="2" PostId="1411" RevisionGUID="b7c84717-1b96-420e-b4bb-0ab167185e28" CreationDate="2010-07-23T17:29:34.020" UserId="528" Text="HTML and JavaScript are honestly fairly bad platforms for game development, but that won't matter until you've decided on a kind of game.  The answer would be radically different for a first person shooter, an RTS or a puzzle game.&#xD;&#xA;&#xD;&#xA;Notice that you're starting to get vague, hand-wavey answers rattling off random technologies that seem neat.  That's a warning sign that you haven't asked a question with a particularly legitimate answer.&#xD;&#xA;&#xD;&#xA;You might as well ask what C++ stuff you need to write applications.  That depends.  Tell us more about the project, and you might get a useful answer.&#xD;&#xA;&#xD;&#xA;By and on the whole, there's a reason that nearly all web games are still Flash." />
  <row Id="2583" PostHistoryTypeId="2" PostId="1412" RevisionGUID="ed002b10-f2ad-439a-aef7-11f7a403bf70" CreationDate="2010-07-23T17:35:08.507" UserId="528" Text="The reason you're storing things in the transposition table is to fetch the prior-found alpha and beta, to save yourself a new evaluation.  If you're a C++ programmer, the board's ID hash is the key, and the alpha/beta are the value.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;lookup_board(hash, alpha, beta) -&gt;&#xD;&#xA;    return (isset(some_global_assoc_array['hash']))? some_global_assoc_array['hash'] : false;&#xD;&#xA;&#xD;&#xA;store_board(hash, alpha, beta) -&gt;&#xD;&#xA;    some_global_assoc_array['hash'] = { alpha, beta };&#xD;&#xA;&#xD;&#xA;You should be storing the alpha and beta, yes, but not as part of the identifier - they're the associated data, instead." />
  <row Id="2584" PostHistoryTypeId="2" PostId="1413" RevisionGUID="9e717b81-f263-4531-8019-d41c7f549b73" CreationDate="2010-07-23T17:35:35.510" UserId="954" Text="We're looking at developing a 2D game that could target Xbox 360.  Ideally, we'd also like to submit the game via the XNA program so that gamers could try out the game over Xbox Live.  We really love the fact that SDL is cross-platform.&#xD;&#xA;&#xD;&#xA;Is writing a 2D game in SDL and then also targeting Xbox 360 possible, and if so how difficult might it be?" />
  <row Id="2585" PostHistoryTypeId="1" PostId="1413" RevisionGUID="9e717b81-f263-4531-8019-d41c7f549b73" CreationDate="2010-07-23T17:35:35.510" UserId="954" Text="Could SDL be used to target Xbox 360?" />
  <row Id="2586" PostHistoryTypeId="3" PostId="1413" RevisionGUID="9e717b81-f263-4531-8019-d41c7f549b73" CreationDate="2010-07-23T17:35:35.510" UserId="954" Text="&lt;2d&gt;&lt;xna&gt;&lt;xbox360&gt;" />
  <row Id="2587" PostHistoryTypeId="2" PostId="1414" RevisionGUID="25e09c10-93d3-4fac-a098-8cbc57d6b6b4" CreationDate="2010-07-23T17:38:07.347" UserId="395" Text="Assuming you are talking about the Creator Club and/or XBLI games, no. They have to built entirely with XNA (and I think C# specifically, might have relaxed that to include C++ now though)." />
  <row Id="2588" PostHistoryTypeId="2" PostId="1415" RevisionGUID="a92b1cb8-0c08-4c95-91c8-e571903005f1" CreationDate="2010-07-23T17:49:28.653" UserId="666" Text="Something I would put as very high in a level editor &quot;goal&quot; would be to avoid ANY situation where starting the map from scratch is easier than correcting a mistake in the current map.&#xD;&#xA;&#xD;&#xA;I've seen this happen with a lot of the tools i write for myself or even in other bigger tools(like tiled) where it is very hard to replace a tile set with a new version of it, or even change the size of the map.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2589" PostHistoryTypeId="2" PostId="1416" RevisionGUID="74c92bba-16f1-4783-92b0-c00f7370ce21" CreationDate="2010-07-23T17:53:00.657" UserId="891" Text="To create creator club games on the Xbox 360 you have to use the XNA framework which in strictly C# .NET and even with that it must be managed C#.&#xD;&#xA;&#xD;&#xA;Managed code allows .NET to handle all garbage collection and does not allow for use of pointers.  &#xD;&#xA;&#xD;&#xA;Yet another issues is XNA uses DirectX while SDL uses OpenGL.  SDL is written in C which is unmanaged, and even with C# bindings to SDL it will still be considered unmanaged code to a C# project.&#xD;&#xA;&#xD;&#xA;There are many reasons that creator club games are limited to managed code, some of the main reasons are for security and stability.&#xD;&#xA;&#xD;&#xA;Unfortunately what you want to do just isn't possible." />
  <row Id="2590" PostHistoryTypeId="2" PostId="1417" RevisionGUID="cb5fa5f4-d609-4cb4-8810-7a814b1ee279" CreationDate="2010-07-23T18:01:47.487" UserId="465" Text="One simple easy thing which helps a lot, especially with stress testing, and network testing. Make it possible for your AI to play against other AI. If you can leave your game alone playing itself, or a small group of AI over a network for a weekend you can learn a lot.&#xD;&#xA;&#xD;&#xA;Of course log everything." />
  <row Id="2591" PostHistoryTypeId="2" PostId="1418" RevisionGUID="4ae9f1b9-9e0d-4474-b4c6-f1a544931ff0" CreationDate="2010-07-23T18:10:44.770" UserId="33" Text="You could also try [GameQuery][1], which is a plugin for jQuery to do some game-related activities, like animations, grouping sprites, detect collisions and read player input.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamequery.onaluf.org/" />
  <row Id="2592" PostHistoryTypeId="2" PostId="1419" RevisionGUID="116ed155-3a0c-46d0-80a7-014d25f40fc0" CreationDate="2010-07-23T18:11:23.710" UserId="891" Text="Using XNA to create an MMORPG for the Xbox 360 Creators Club is not possible since you can't have your own backend servers, but using XNA to create a PC MMORPG is possible.&#xD;&#xA;&#xD;&#xA;Using XNA on the PC is extremely possible and frees you from a lot of the Xbox 360 Creators Club restraints." />
  <row Id="2593" PostHistoryTypeId="2" PostId="1420" RevisionGUID="6679f621-1d08-4d68-b99d-fcd9c3c702f4" CreationDate="2010-07-23T18:20:40.040" UserId="154" Text="If you are willing to spend some money, the [Sound Ideas 6000 Series][1] is a good place to start for a big bank of sounds.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sound-ideas.com/6000.html" />
  <row Id="2594" PostHistoryTypeId="2" PostId="1421" RevisionGUID="7b096fb3-932c-4217-8e81-acd637c5c14e" CreationDate="2010-07-23T18:38:44.153" UserId="865" Text="Check James Da Silva's book where he explains how he did The Dishwasher: Dead Samurai. It'll show you how KISS pretty much can solve this. The suggestion of using 3d or 2d skeletal animations are valid, and kinda in the same realm." />
  <row Id="2595" PostHistoryTypeId="5" PostId="1418" RevisionGUID="6e333e82-8b82-4c0d-a984-582b27342302" CreationDate="2010-07-23T18:52:48.587" UserId="33" Comment="Added another framework" Text="There are a couple of frameworks already: [GameQuery][1] and [Akihabara][2], which is a plugin for jQuery to do some game-related activities, like animations, grouping sprites, detect collisions and read player input.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamequery.onaluf.org/&#xD;&#xA;  [2]: http://www.kesiev.com/akihabara/" />
  <row Id="2596" PostHistoryTypeId="2" PostId="1422" RevisionGUID="c92899e1-302f-48b2-9429-664f0e0cde5f" CreationDate="2010-07-23T18:58:46.017" UserId="865" Text="A first thing to do would be to display it in various widths to see if any width shows a somewhat recognizable pattern (and humans are extremely good at detecting patterns, even if they're not there). If you're that lucky you'll have a good starting point as you know the likely width and can see if you see that encoded somewhere. From there you can also find height and so on.&#xD;&#xA;Only if there's a discenrable pattern to begin with through. It might be run length encoded or what have you and it'll become pretty tricky pretty fast." />
  <row Id="2597" PostHistoryTypeId="2" PostId="1423" RevisionGUID="3670918f-c321-4c94-be47-7946f51b6e30" CreationDate="2010-07-23T19:03:38.377" UserId="458" Text="As Zorba says, most retro games didn't do this specifically because you would need (with sprites) to have multi-frame animations for every single piece of equipment.&#xD;&#xA;&#xD;&#xA;Some &quot;lazy&quot; alternatives:&#xD;&#xA;&#xD;&#xA; - Palette-swap the gear instead of&#xD;&#xA;   making totally different sprites.&#xD;&#xA; - Draw the character in such a way that the only parts of their body that animate are parts that aren't attached to gear. Like, if the character can only wear a single suit of armor anyway, make it a Helmet instead, and then you're free to animate the entire body while keeping the head still.&#xD;&#xA; - Use a single sprite for the character in the main game screen, but show the equipment in a subscreen with a static portrait. Then you don't have to worry about animation." />
  <row Id="2598" PostHistoryTypeId="2" PostId="1424" RevisionGUID="6d0d40e1-2168-4498-b0a9-970a9ae85add" CreationDate="2010-07-23T19:05:51.540" UserId="458" Text="It's still around. We just no longer call it Shareware. We call it the &quot;freemium&quot; model: free to play but with premium content available for cash. The only difference between now and the old days is that we have better ways of accepting payment today: accepting credit cards over the internet (no more &quot;mail a check to this address and we'll send you the full disks in the mail&quot;), for example." />
  <row Id="2599" PostHistoryTypeId="2" PostId="1425" RevisionGUID="b5bdf144-142b-4556-a567-cafc1d7afe45" CreationDate="2010-07-23T19:06:53.440" UserId="964" Text="The websites and programs answered so far are definitely the way to go.  Recording your own explosions is no good.  Most likely, any level of explosion you create will not sound much like what you're looking for anyway.&#xD;&#xA;&#xD;&#xA;Not to mention, programming with a few less fingers would be tough.&#xD;&#xA;&#xD;&#xA;Edit:  However, as I'm thinking about this, one practical effect that could be pretty well recorded is that of gunshots.  There's most likely a shooting range that rents out pistols and, as long as you call beforehand and make sure the range owner is alright with it, you could probably bring in a microphone for, at the very least, a trial run of how the recordings could sound.  It's worth noting that, depending on the range, an indoor setup could likely make for some undesired echo if their sound dampening isn't well done.  And, of course, have one of the employees supervise if you're not experienced with firearms." />
  <row Id="2600" PostHistoryTypeId="2" PostId="1426" RevisionGUID="f887c724-a80c-4167-8fd0-6ef753603afb" CreationDate="2010-07-23T19:48:38.883" UserId="656" Text="Not sure if this is what you're looking for, but:&#xD;&#xA;&#xD;&#xA;TexPack: [http://texpack.sourceforge.net/][1]&#xD;&#xA;&#xD;&#xA;takes a bunch of images and packs them into one big image and outputs a file with the coordinates. You can see a sample on the website.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://texpack.sourceforge.net/" />
  <row Id="2601" PostHistoryTypeId="2" PostId="1427" RevisionGUID="93bfb391-b5aa-45be-9454-323389cd547b" CreationDate="2010-07-23T20:09:14.917" UserId="22" Text="I believe you are looking for [this][1]. Creation of a ready to use 3D model for a game engine from start to finish. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cg.tutsplus.com/tutorials/autodesk-3ds-max/how-to-create-a-video-game-dumpster-the-complete-current-gen-workflow/" />
  <row Id="2602" PostHistoryTypeId="2" PostId="1428" RevisionGUID="149c0717-7a24-493a-a521-d200769b7e50" CreationDate="2010-07-23T20:46:00.820" UserId="383" Text="[The Pragmatic Programmer: From Journeyman to Master][1]&#xD;&#xA;I learn something every time I read this.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pragprog.com/titles/tpp/the-pragmatic-programmer" />
  <row Id="2603" PostHistoryTypeId="16" PostId="1428" RevisionGUID="149c0717-7a24-493a-a521-d200769b7e50" CreationDate="2010-07-23T20:46:00.820" UserId="-1" />
  <row Id="2606" PostHistoryTypeId="2" PostId="1431" RevisionGUID="2ca9c971-76fd-4ee3-bf08-74d48086a318" CreationDate="2010-07-23T21:04:57.780" UserId="383" Text="[The Design of Everyday Things][1] : Someone said it's a must read for all programmers and I completely agree with that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/8Qan " />
  <row Id="2607" PostHistoryTypeId="16" PostId="1431" RevisionGUID="2ca9c971-76fd-4ee3-bf08-74d48086a318" CreationDate="2010-07-23T21:04:57.780" UserId="-1" />
  <row Id="2609" PostHistoryTypeId="2" PostId="1432" RevisionGUID="c5976b94-7c62-4d07-965e-0efaa81a414e" CreationDate="2010-07-23T21:40:13.317" UserDisplayName="HoboBen" Text="[Game Scripting Mastery][1] takes you up from the basics of scripting to assemblers, compilers and virtual machines. I love this book.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Scripting-Mastery-Premier-Press-Development/dp/1931841578" />
  <row Id="2610" PostHistoryTypeId="16" PostId="1432" RevisionGUID="c5976b94-7c62-4d07-965e-0efaa81a414e" CreationDate="2010-07-23T21:40:13.317" UserId="-1" />
  <row Id="2611" PostHistoryTypeId="2" PostId="1433" RevisionGUID="ebb50167-cdf4-4af7-9205-31d175fcd4d8" CreationDate="2010-07-23T22:10:40.433" UserDisplayName="RichC" Text="It depends what states you're changing; different things cost different amounts. Simple state like blend equations and most other SetRenderState stuff is cheap, and gets batched up till the next draw call so doesn't incur a large penalty for hitting the driver. Shaders and render targets are more expensive and will generally cause issues if you swap them excessively.&#xD;&#xA;&#xD;&#xA;Usually though render states are not something you have to worry about overly - draw call overhead will almost always dwarf render state costs.&#xD;&#xA;&#xD;&#xA;In terms of numbers I'd suggest aiming for no more than a couple of hundred shader swaps per frame, as few render targets as you can get away with and not worry about the rest. Typical numbers for simple state might be 5-10 state changes per draw call, but it's very variable.&#xD;&#xA;" />
  <row Id="2612" PostHistoryTypeId="2" PostId="1434" RevisionGUID="0660acb4-f0f8-4e32-93e0-9e7ee7c817b5" CreationDate="2010-07-23T22:14:14.173" UserId="807" Text="I'd like to get a better handle on how people in the real world are handling their animation.&#xD;&#xA;&#xD;&#xA;Do you load 1 large image and then draw different rectangles based on the animation frame?&#xD;&#xA;&#xD;&#xA;Do you load X image files into an array and draw the item in the array based on the animation frame?&#xD;&#xA;&#xD;&#xA;How do you handle having different lengths of animations for various sprites.&#xD;&#xA;&#xD;&#xA;Say a character walking takes 4 - 8 frames, and the waves on the beach only take 2 - 3 frames. How would you handle that situation? See Below&#xD;&#xA;&#xD;&#xA;    Dim Waves(1) as Sprite&#xD;&#xA;    Dim Char(5) as Sprite&#xD;&#xA;&#xD;&#xA;    Sub Animate()&#xD;&#xA;         Frame += 1&#xD;&#xA;         Draw Char(Frame)&#xD;&#xA;         Draw Waves(Frame)&#xD;&#xA;         If Frame = 5 Then Frame = 0&#xD;&#xA;    End Sub&#xD;&#xA;&#xD;&#xA;Obviously Waves would end up with an out of bounds error.&#xD;&#xA;&#xD;&#xA;Or do you have your sprite worry about it's own animation, and not care about the frame at all. Having each sprite know its own animation loop?&#xD;&#xA;" />
  <row Id="2613" PostHistoryTypeId="1" PostId="1434" RevisionGUID="0660acb4-f0f8-4e32-93e0-9e7ee7c817b5" CreationDate="2010-07-23T22:14:14.173" UserId="807" Text="Sprite Animation Best Practices" />
  <row Id="2614" PostHistoryTypeId="3" PostId="1434" RevisionGUID="0660acb4-f0f8-4e32-93e0-9e7ee7c817b5" CreationDate="2010-07-23T22:14:14.173" UserId="807" Text="&lt;sprites&gt;&lt;best-practices&gt;&lt;animation&gt;" />
  <row Id="2615" PostHistoryTypeId="2" PostId="1435" RevisionGUID="171adb3e-bd41-4fc4-b8e5-4138a9ae713f" CreationDate="2010-07-23T22:19:48.303" UserId="865" Text="I would have an animation know how many frames it has. Where and how these are stored is relatively irrelevant except for performance issues (like you might want them in the same texture). I would not add 1 to the framecount ever, I would add deltaTime * animSpeed and convert that value to an integer when displaying. This way you can slow down or speed up the animations and are framerate independent.&#xD;&#xA;&#xD;&#xA;So a sprite would have an animation which updates itself. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="2616" PostHistoryTypeId="2" PostId="1436" RevisionGUID="f4362231-2e5b-411d-86d9-d5f2c2653136" CreationDate="2010-07-23T22:27:13.133" UserId="974" Text="The way I've done it in the past is by separating the **animation data** from **animation playback**. An `Animation` can then become basically an array of `Frames` and a few properties that describe how the animation should behave (if it loops, etc).&#xD;&#xA;&#xD;&#xA;Each `Frame` of the animation is essentially a rectangle and a length of time.&#xD;&#xA;&#xD;&#xA;Anything that needs to play an animation has its own `AnimationPlayer` which can be pointed to an `Animation`. The player object takes care of playing the animation and makes the &quot;current frame&quot; available.&#xD;&#xA;&#xD;&#xA;The advantage to this for me was that I could have a single instance of an `Animation` that many objects could point to and be playing different parts at the same time. It was also easy to change animations by simply pointing the `AnimationPlayer` to a different `Animation` object and resetting the playback." />
  <row Id="2617" PostHistoryTypeId="2" PostId="1437" RevisionGUID="50d04c06-d6b5-4d02-8b88-c07dc7eeafd2" CreationDate="2010-07-23T22:33:23.890" UserId="127" Text="Why not just have a the number of frames for each of your objects stored? Personally I pass the number of frames in the animation to my objects in their constructors, then I have a standard Animate() function which takes in the amount of frames in the animation." />
  <row Id="2618" PostHistoryTypeId="5" PostId="1158" RevisionGUID="c3d45fb9-645a-4e8f-8c69-8072c791aac9" CreationDate="2010-07-23T22:37:05.057" UserId="975" Comment="added 44 characters in body" Text="The first thing you need to understand is the hardware you're running on. How does it handle branching? What about caching? Does it have a SIMD instruction set? How many processors can it use? Does it have to share processor time with anything else?&#xD;&#xA;&#xD;&#xA;You may solve the same problem in very different ways - even your choice of algorithm should be dependent on the hardware. In some cases O(N) can run slower than O(NlogN) (depending on implementation).&#xD;&#xA;&#xD;&#xA;As a crude overview of optimisation, the first thing I would do is look at exactly what problems and what data you are trying to solve for. Then optimise for that. If you want extreme performance then forget about generic solutions - you can special case everything that doesn't match your most used case.&#xD;&#xA;&#xD;&#xA;Then profile. Profile, profile, profile. Look at memory usage, look at branching penalties, Look at function call overhead, look at pipeline utilisation. Work out what is slowing down your code. It's probably data access (I wrote an article called &quot;The Latency Elephant&quot; about the overhead of data access - google it. I can't post 2 links here as I don't have enough &quot;reputation&quot;), so closely examine that and then optimise your data layout ([nice big flat homogeneous arrays are awesome][2]) and data access (prefetch where possible).&#xD;&#xA;&#xD;&#xA;Once you've minimised the overhead of the memory subsystem, try and determine if instructions are now the bottleneck (hopefully they are), then look at SIMD implementations of your algorithm - Structure-of-Arrays (SoA) implementations can be very data and instruction cache efficient. If SIMD isn't a good match for your problem then intrinsics and assembler level coding may be needed.&#xD;&#xA;&#xD;&#xA;If you still need more speed then go parallel. If you have the benefit of running on a PS3 then the SPUs are your friends. Use them, love them. If you've already written a SIMD solution then you'll get a massive benefit moving to SPU.&#xD;&#xA;&#xD;&#xA;And then, profile some more. Test in game scenarios - is this code still the bottleneck? Can you change the way this code is used at a higher level to minimise its usage (actually, this should be your first step)? Can you defer calculations over multiple frames?&#xD;&#xA;&#xD;&#xA;Whatever platform you're on, learn as much as you can about the hardware and the profilers available. Don't assume that you know what the bottleneck is - find it with your profiler. And make sure you have a heuristic to determine if you have actually made your game go faster.&#xD;&#xA;&#xD;&#xA;And then profile it again.&#xD;&#xA;&#xD;&#xA;  [1]: http://seven-degrees-of-freedom.blogspot.com/2009/10/latency-elephant.html&#xD;&#xA;  [2]: http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf&#xD;&#xA;" />
  <row Id="2619" PostHistoryTypeId="5" PostId="1436" RevisionGUID="c1260896-890f-43d8-86ad-e355ccb259b8" CreationDate="2010-07-23T22:42:56.503" UserId="974" Comment="added 230 characters in body" Text="The way I've done it in the past is by separating the **animation data** from **animation playback**. An `Animation` can then become basically an array of `Frames` and a few properties that describe how the animation should behave (if it loops, etc).&#xD;&#xA;&#xD;&#xA;Each `Frame` of the animation is essentially a rectangle and a length of time. This allows for some frames to display longer than others, which may or may not be something you want. If you want all of the frames in your animation to display for the same length of time, store that in your `Animation` object.&#xD;&#xA;&#xD;&#xA;Anything that needs to play an animation has its own `AnimationPlayer` which can be pointed to an `Animation`. The player object takes care of playing the animation and makes the &quot;current frame&quot; available.&#xD;&#xA;&#xD;&#xA;The advantage to this for me was that I could have a single instance of an `Animation` that many objects could point to and be playing different parts at the same time. It was also easy to change animations by simply pointing the `AnimationPlayer` to a different `Animation` object and resetting the playback." />
  <row Id="2620" PostHistoryTypeId="2" PostId="1438" RevisionGUID="f34823ab-d18f-4271-83ce-7a635d05f4f4" CreationDate="2010-07-23T22:44:53.037" UserId="865" Text="Most often, the best way to gain performance is to change your algorithm. The less general the implementation the closer you can get to the metal.&#xD;&#xA;&#xD;&#xA;Assuming that has been done....&#xD;&#xA;&#xD;&#xA;If it's really critical code indeed, try to avoid memory reads, try to avoid calculating stuff that can be precalculated (though no lookup tables as they violate rule number 1). Know what your algorithm does and write it in a way that the compiler knows it too. Check the assembly to be sure it does.&#xD;&#xA;&#xD;&#xA;Avoid cache misses. Batch process as much as you can. Avoid virtual functions and other indirections.&#xD;&#xA;&#xD;&#xA;Ultimately, measure everything. The rules change all the time. What used to speed up code 3 years ago now slows it down. A nice example is 'use double math functions instead of float versions'. I wouldn't have realized that one if I hadn't read it.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2621" PostHistoryTypeId="16" PostId="1438" RevisionGUID="f34823ab-d18f-4271-83ce-7a635d05f4f4" CreationDate="2010-07-23T22:44:53.037" UserId="-1" />
  <row Id="2622" PostHistoryTypeId="5" PostId="1438" RevisionGUID="1c0c7658-7504-4786-bc0c-107cd29411a0" CreationDate="2010-07-23T22:55:52.680" UserId="865" Comment="added 545 characters in body" Text="Most often, the best way to gain performance is to change your algorithm. The less general the implementation the closer you can get to the metal.&#xD;&#xA;&#xD;&#xA;Assuming that has been done....&#xD;&#xA;&#xD;&#xA;If it's really critical code indeed, try to avoid memory reads, try to avoid calculating stuff that can be precalculated (though no lookup tables as they violate rule number 1). Know what your algorithm does and write it in a way that the compiler knows it too. Check the assembly to be sure it does.&#xD;&#xA;&#xD;&#xA;Avoid cache misses. Batch process as much as you can. Avoid virtual functions and other indirections.&#xD;&#xA;&#xD;&#xA;Ultimately, measure everything. The rules change all the time. What used to speed up code 3 years ago now slows it down. A nice example is 'use double math functions instead of float versions'. I wouldn't have realized that one if I hadn't read it.&#xD;&#xA;&#xD;&#xA;I forgot - don't have default constructors intialize your variables, or if you insist, at least also create constructors that don't. &#xD;&#xA;Be aware of the things that don't show up in the profiles. When you lose one unnecessary cycle per line of code nothing will show up in your profiler, but you'll lose a whole lot of cycles overall. Again, know what your code is doing. Make your core function lean instead of foolproof. Foolproof versions can be called if needed, but are not always needed. Versatility comes at a price - performance being one." />
  <row Id="2623" PostHistoryTypeId="2" PostId="1439" RevisionGUID="b4a568f0-f71f-4928-ad94-f6f1358eb97a" CreationDate="2010-07-23T23:04:39.420" UserId="662" Text="It depends on the implementation. In my engine, I do animation in both Direct3D and DirectDraw.&#xD;&#xA;&#xD;&#xA;In DirectDraw I create one big image. It all gets stored in system memory anyway, which eventually comes down to a one-dimensional block of data.&#xD;&#xA;&#xD;&#xA;**Pros:**&#xD;&#xA;&#xD;&#xA;* Easy to move between frames. Change the start pointer, add the pitch (the total image width) every y and you're golden.&#xD;&#xA;&#xD;&#xA;**Cons:**&#xD;&#xA;&#xD;&#xA;* Can't just copy one frame to the screen, you have to do it manually.&#xD;&#xA;&#xD;&#xA;* Giant block of memory. Hustling frames around comes at a penalty.&#xD;&#xA;&#xD;&#xA;In Direct3D I use separate textures. This is because I have no idea of the texture limitations of a device so I don't know whether it even supports textures that are the size of the entire image.&#xD;&#xA;&#xD;&#xA;**Pros:**&#xD;&#xA;&#xD;&#xA;* You can copy a frame straight to the screen, because they're all separate entities.&#xD;&#xA;&#xD;&#xA;**Cons:**&#xD;&#xA;&#xD;&#xA;* Lack of memory alignment." />
  <row Id="2624" PostHistoryTypeId="5" PostId="863" RevisionGUID="feb31a58-9903-42be-b8c0-9deb9d732ee9" CreationDate="2010-07-23T23:07:30.397" UserId="975" Comment="added 2 characters in body; edited body; added 1 characters in body; deleted 1 characters in body" Text="Use SIMD (by SSE), if you don't do already. Gamasutra has a nice [article on this][1]. You can download the source code from the presented library at the end of the article.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/4248/designing_fast_crossplatform_simd_.php&#xD;&#xA;" />
  <row Id="2625" PostHistoryTypeId="2" PostId="1440" RevisionGUID="3a451c6b-7470-460b-8f81-023de36eff09" CreationDate="2010-07-23T23:08:46.353" UserId="865" Text="It really depends on what skills as a regular programmer you already have. Does your math need work? Your graphics knowledge? Do you have both under wraps?&#xD;&#xA;&#xD;&#xA;Although in general I think Tetris and Breakout would be my two starters as well. Anything easier than that doesn't offer enough stimulus. &#xD;&#xA;Tetris is a good test in how to layout your data an algo, breakout is a light math example.&#xD;&#xA;I always tell people to aim high, the goal is to get stuck and come up with a solution.&#xD;&#xA;&#xD;&#xA;After that, the sky's the limit. Again, aim high. Try a platformer with sloped terrain, parralax and you got a good bag of 2d tech handy. Add a pinball (prepare to be frustrated) and your math will improve. &#xD;&#xA;&#xD;&#xA;From there go to the third dimension, learn core skills (anim, rendering) and you should be relatively well equipped to deal with a good variety of games.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2626" PostHistoryTypeId="16" PostId="1440" RevisionGUID="3a451c6b-7470-460b-8f81-023de36eff09" CreationDate="2010-07-23T23:08:46.353" UserId="-1" />
  <row Id="2627" PostHistoryTypeId="5" PostId="1436" RevisionGUID="75ba482c-c43a-4717-89f0-d01608ae389f" CreationDate="2010-07-24T00:03:30.550" UserId="974" Comment="Added info about loading only one image." Text="The way I've done it in the past is by separating the **animation data** from **animation playback**. An `Animation` can then become basically an array of `Frames` and a few properties that describe how the animation should behave (if it loops, etc).&#xD;&#xA;&#xD;&#xA;I typically load one image and draw pieces of it.&#xD;&#xA;&#xD;&#xA;Each `Frame` of the animation is essentially a rectangle and a length of time. This allows for some frames to display longer than others, which may or may not be something you want. If you want all of the frames in your animation to display for the same length of time, store that in your `Animation` object.&#xD;&#xA;&#xD;&#xA;Anything that needs to play an animation has its own `AnimationPlayer` which can be pointed to an `Animation`. The player object takes care of playing the animation and makes the &quot;current frame&quot; available.&#xD;&#xA;&#xD;&#xA;The advantage to this for me was that I could have a single instance of an `Animation` that many objects could point to and be playing different parts at the same time. It was also easy to change animations by simply pointing the `AnimationPlayer` to a different `Animation` object and resetting the playback." />
  <row Id="2628" PostHistoryTypeId="2" PostId="1441" RevisionGUID="80554aff-30d2-461a-93f0-df509bc6f3ea" CreationDate="2010-07-24T00:17:03.237" UserId="930" Text="One of my hobbies (aside programming, of course) is 3d modelling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modelling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modelling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modelling characters)  &#xD;&#xA;**3)** What knowledges should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development enviroment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existant 3D models (not a must, but a plus, if it's .3DS, a HUGE plus)  &#xD;&#xA; - Had the ability to create 3d models programatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;OBS.: This question was originally posted in StackOverflow, but as it's intentions are completely for game development, it didn't get too many views in there, so I thought it would be more suitable in here, so I've adapted it and posted it here instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe" />
  <row Id="2629" PostHistoryTypeId="1" PostId="1441" RevisionGUID="80554aff-30d2-461a-93f0-df509bc6f3ea" CreationDate="2010-07-24T00:17:03.237" UserId="930" Text="How should I start playing with 3D ?" />
  <row Id="2630" PostHistoryTypeId="3" PostId="1441" RevisionGUID="80554aff-30d2-461a-93f0-df509bc6f3ea" CreationDate="2010-07-24T00:17:03.237" UserId="930" Text="&lt;3d&gt;&lt;c#&gt;&lt;.net&gt;" />
  <row Id="2631" PostHistoryTypeId="2" PostId="1442" RevisionGUID="0ce63b70-2720-45a3-a835-b53012a8be8c" CreationDate="2010-07-24T02:21:57.883" UserId="953" Text="Unity ( http://unity3d.com/ ) is a good start.  It's got C# as one of its core languages, there's a standard workflow for using 3DSMax models, it's got a certain amount of drag-and-drop for rapid prototyping, and there's a free version with somewhat-limited functionality so you can try it out.  It's got a supportive community and some tutorials, and creates cross-platform apps.&#xD;&#xA;&#xD;&#xA;While it has material and texture creation support, it doesn't have built-in modeling, programmatically or otherwise.  I've used Blender in my experimentation, as it's free and I'm somewhat comfortable with it, and I'm sure you can do algorithmic modeling with it (though you'd be coding in Python).  If you've got an acceptably legit copy of 3DSMax already, I'm pretty sure it plays well with Unity as well." />
  <row Id="2632" PostHistoryTypeId="2" PostId="1443" RevisionGUID="33d815cd-02a7-4785-b312-c1c1bb27ccaa" CreationDate="2010-07-24T02:31:29.717" UserId="395" Text="Not quite as simple as Unity, but [XNA](http://creators.xna.com) is Microsoft's big push for making games in C#. 3DS should be able to export FBX files and the XNA dev environment can import those. Tons of tutorials and libraries available." />
  <row Id="2633" PostHistoryTypeId="2" PostId="1444" RevisionGUID="db1f0470-be14-4134-bafe-e799fd6fe0cb" CreationDate="2010-07-24T02:34:59.380" UserId="865" Text="Pretty much agree with the above - Max/Maya and Photoshop are the de-facto asset creation standards. What happens after that and how is often custom per engine, or even per game. There's as many pipelines as there's developers I think, ranging from manual labor, via command line tools and editor scripts to completely automated inhouse editors and batch processing tools. Most larger studios do have a custom build tool for the final conversion that can be integrated with the build system so that whenever new source assets get submitted they get automagically converted to the final ingame asset.&#xD;&#xA;&#xD;&#xA;As for presenting game ideas, again as many methods as designers. Sketches, photoshops, renderings, moodboards, anything goes as it gets the message across.&#xD;&#xA;&#xD;&#xA;Edited to add:&#xD;&#xA;Did I misunderstand the question and are you looking for a workflow that would work for *you*?&#xD;&#xA;" />
  <row Id="2634" PostHistoryTypeId="2" PostId="1445" RevisionGUID="995e48bc-bd65-4180-8064-77412710ee48" CreationDate="2010-07-24T02:39:19.197" UserId="865" Text="My vote goes to Unity as well. It's much more starter friendly than XNA and there's a lot of support out there. XNA on the other hand will (if you persist) give you a more solid game programming background as less is done for you automagically. So again it depends - do you want to play (and make games, it's more than capable) with 3D, or learn to program 3D? If play, Unity. If learn 3d, XNA." />
  <row Id="2635" PostHistoryTypeId="5" PostId="1353" RevisionGUID="35f32a0c-3532-4ee2-8038-82ca46a573be" CreationDate="2010-07-24T02:45:53.113" UserId="288" Comment="added 777 characters in body; added 1 characters in body" Text="I think the best way to deform your car would be with skeletal animation (see [this sample][1] and [this one][2]).&#xD;&#xA;&#xD;&#xA;For example: have a &quot;bone&quot; (or two) for each door, the bonnet, the roof, the front, back, etc. And then you want to weight the vertices for that part of the car, to that bone, in an appropriate pattern (ie: some will have full weight, some might have partial weight). Then when your car gets hit - you move the bone for the section of the car that got hit inwards, towards the center.&#xD;&#xA;&#xD;&#xA;It's not as nice as procedurally deforming the model. But it's a *lot* easier and your artist can then get things looking &quot;just so&quot;. (And you can use the same system you might use for turning the wheels, etc.)&#xD;&#xA;&#xD;&#xA;You probably also want to have two textures - a clean one and a dirty one. Then switch between the two in your pixel shader for different regions. [This sample][3] is probably a good place to start.&#xD;&#xA;&#xD;&#xA;For breaking apart the model - I would suggest simply having different models for different parts. You could use the same bone structure so a car that breaks apart keeps the same damage deformation. (Or, alternately, have multiple root bones - one for the body, one for each door, etc, so they can be separated.)&#xD;&#xA;&#xD;&#xA;For applying forces to make it fly apart (and getting nice matrices you can use to transform your parts) - you probably want to use a 3rd-party physics engine.&#xD;&#xA;&#xD;&#xA;Finally: throw in a particle system for good measure.&#xD;&#xA;&#xD;&#xA;This method should be pretty simple to implement for basic car damage in, say, a racing game. For something [more severe][5], the same technique should still be viable - just with a lot more thought put into it.&#xD;&#xA;&#xD;&#xA;The alternative is to rigging your model for damage is to do something procedural in your shader. [This sample][4] might be a good place to start - instead of shattering, you could move the vertices inwards depending on the direction of impact and their original position on the model. Although this is much harder - I wouldn't recommend it.&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/sample/skinnedmodel&#xD;&#xA;  [2]: http://creators.xna.com/en-US/sample/simpleanimation&#xD;&#xA;  [3]: http://creators.xna.com/en-us/sample/colorreplacement&#xD;&#xA;  [4]: http://creators.xna.com/en-us/sample/shatter&#xD;&#xA;  [5]: http://www.youtube.com/watch?v=rRGMcFswwik" />
  <row Id="2636" PostHistoryTypeId="2" PostId="1446" RevisionGUID="aea07cc2-47c1-46e2-9497-1c6533302358" CreationDate="2010-07-24T02:59:15.017" UserId="204" Text="I've done a lot of work (pro-bono) on a patch to a commercial game from ~11 years ago that needs some beta testing. Loads of people are waiting for it.&#xD;&#xA;&#xD;&#xA;What are some ways to get **good** (by that I mean useful) feedback during the beta test phase for a game? I've got lots of people who want to play with it, but I'm concerned about getting good feedback without getting bogged down in the development. I'm also concerned that people will be more concerned about having the tweaks they want to see added to the patch than really testing the work that has been done.&#xD;&#xA;&#xD;&#xA; - Do you provide the ability to log bugs directly into a bug tracker, or send them all to a person on the development team?&#xD;&#xA; - How do you ensure you cover all the platforms you support (in my case: Mac OSX (x86/ppc), Windows (multiple versions), Linux (multiple versions)?&#xD;&#xA;&#xD;&#xA;Are there any good software packages (like a web portal) for running a beta test for a project like this? Any good documents out there with tips?" />
  <row Id="2637" PostHistoryTypeId="1" PostId="1446" RevisionGUID="aea07cc2-47c1-46e2-9497-1c6533302358" CreationDate="2010-07-24T02:59:15.017" UserId="204" Text="How to have a successful beta test with a small team?" />
  <row Id="2638" PostHistoryTypeId="3" PostId="1446" RevisionGUID="aea07cc2-47c1-46e2-9497-1c6533302358" CreationDate="2010-07-24T02:59:15.017" UserId="204" Text="&lt;testing&gt;&lt;project-management&gt;&lt;beta&gt;" />
  <row Id="2639" PostHistoryTypeId="2" PostId="1447" RevisionGUID="d323eafd-0df7-497d-9cda-a81d50ebd79d" CreationDate="2010-07-24T03:58:49.037" UserId="162" Text="I would strongly suggest having an in-game bug-filing option, preferably a big button that says &quot;FILE BUG HERE&quot;. Players who are engaged, especially if your game is actually good, are never going to remember bugs that occurred if they have to go out of the engine to file them. You could have those go to the bug tracker, or you could just have it email a holder address. The main goal is to make it easy to file stuff, although this may not be possible for an 11 year old game. In that case I would support both direct email and a website link, and maybe force the testers to go through some trivial front end that exposes a &quot;file a bug&quot; button so they remember it exists.&#xD;&#xA;&#xD;&#xA;One good way to do this could be to semi-publicly expose your bug tracking software itself. Most bug tracking software (Trac is a good free one if you don't have one set up already) already has a good web frontend, and you could open that up to everyone in the beta directly. That way your beta testers can literally do QA for you.&#xD;&#xA;&#xD;&#xA;To get platform coverage, you could try going directly to those communities. Make sure to discuss your beta on PC, mac, and linux-focused forums. That way you'll make sure to get a few from each group. You should ask players to specify what platforms they have available in the beta application as well.&#xD;&#xA;&#xD;&#xA;Lastly, you may consider sending out some sort of &quot;status of the test&quot; email periodically. Something like &quot;Hey, we just changed the weapon balance, can you guys focus on levels 4-7 for today? levels 8-10 are still being worked out and will be a bit better next week.&quot; Anything you can do to focus the testing process will work out to your advantage." />
  <row Id="2640" PostHistoryTypeId="2" PostId="1448" RevisionGUID="028966a1-9636-41dd-a861-eb812e706401" CreationDate="2010-07-24T04:11:21.837" UserId="43" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. An example of this is in a [video of Digital Molecular Matter 2][2] and in the commercial game The Force Unleashed which uses DMM2. I am uncertain when AMD [will release][3] their free DMM2 and Bullet physics package.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2641" PostHistoryTypeId="5" PostId="1448" RevisionGUID="33784b7a-8bb3-425f-883d-cecb91e90bcd" CreationDate="2010-07-24T04:16:40.473" UserId="43" Comment="added 34 characters in body" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. An example of this is in a [a spaceship being deformed by asteroids in Digital Molecular Matter 2][2] and in the commercial game The Force Unleashed which uses DMM2. I am uncertain when AMD [will release][3] their free DMM2 and Bullet physics package.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2642" PostHistoryTypeId="5" PostId="1448" RevisionGUID="1efa87a0-c8a6-4ac1-8b98-cf2613759241" CreationDate="2010-07-24T04:25:05.270" UserId="43" Comment="added 5 characters in body; deleted 1 characters in body; added 65 characters in body" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. Examples of this are a video of [a spaceship being deformed][2] by asteroids and the physics in the commercial game The Force Unleashed, which both use [DMM][3]. However, I am uncertain when AMD [will release][4] their free DMM2 and Bullet physics package.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Digital_Molecular_Matter&#xD;&#xA;  [4]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2643" PostHistoryTypeId="5" PostId="1448" RevisionGUID="3ffcf9b5-3780-45a2-9704-d8381374f101" CreationDate="2010-07-24T04:43:56.127" UserId="43" Comment="added 51 characters in body; added 4 characters in body; deleted 2 characters in body" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. Examples of this are a video of [a spaceship being deformed][2] by asteroids and the physics in the commercial game The Force Unleashed, which both use [DMM][3]. However, I am uncertain when AMD [will release][4] their free DMM2 and Bullet physics package. &#xD;&#xA;&#xD;&#xA;However I'm uncertain how DMM2 interacts with xna.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Digital_Molecular_Matter&#xD;&#xA;  [4]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2644" PostHistoryTypeId="5" PostId="1448" RevisionGUID="65055186-d204-40db-be3a-e15294991a09" CreationDate="2010-07-24T04:49:05.060" UserId="43" Comment="deleted 3 characters in body; deleted 4 characters in body" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. Examples of this are a video of [a spaceship being deformed][2] by asteroids and the physics in the commercial game The Force Unleashed, which both use [DMM][3]. However, I am uncertain when AMD [will release][4] their free DMM2 and Bullet physics package. &#xD;&#xA;&#xD;&#xA;Also, I don't know DMM2 interacts with XNA.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Digital_Molecular_Matter&#xD;&#xA;  [4]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2645" PostHistoryTypeId="5" PostId="1448" RevisionGUID="2c4e81ac-ea48-4aaa-a595-dec414b61681" CreationDate="2010-07-24T04:55:00.137" UserId="43" Comment="deleted 9 characters in body" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. Examples of this are a video of [a spaceship being deformed][2] by asteroids and the physics in the commercial game The Force Unleashed, which both use [DMM][3]. I am uncertain when AMD [will release][4] their free DMM2 and Bullet physics package. &#xD;&#xA;&#xD;&#xA;Also, I don't know DMM2 interacts with XNA.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Digital_Molecular_Matter&#xD;&#xA;  [4]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2646" PostHistoryTypeId="2" PostId="1449" RevisionGUID="88c26e50-521a-4131-8043-b6eea1b95a68" CreationDate="2010-07-24T05:18:54.170" UserId="430" Text="Good question!  Before I get to the specific questions you asked, I'll say: don't underestimate the power of simplicity.  Tenpn is right.  Keep in mind that all you're trying to do with these approaches is find an elegant way to defer a function call or decouple the caller from the callee.  I can recommend coroutines as a surprisingly intuitive way to alleviate some of those problems, but that's a little off-topic.  Sometimes, you're better off just calling the function and living with the fact that entity A is coupled directly to entity B.  See YAGNI.&#xD;&#xA;&#xD;&#xA;That said, I've used and been happy with the signal/slot model combined with simple message passing.  I used it in C++ and Lua for a fairly successful iPhone title that had a very tight schedule.&#xD;&#xA;&#xD;&#xA;For the signal/slot case, if I want entity A to do something in response to something entity B did (e.g. unlock a door when something dies) I might have entity A subscribe directly to entity B's death event.  Or possibly entity A would subscribe to each of a group of entities, increment a counter on each event fired, and unlock the door after N of them have died.  Also, &quot;group of entities&quot; and &quot;N of them&quot; would typically be designer defined in the level data.  (As an aside, this is one area where coroutines can really shine, e.g., WaitForMultiple( &quot;Dying&quot;, entA, entB, entC ); door.Unlock();)&#xD;&#xA;&#xD;&#xA;But that can get cumbersome when it comes to reactions that are tightly coupled to C++ code, or inherently ephemeral game events: dealing damage, reloading weapons, debugging, player-driven location-based AI feedback.  This is where message passing can fill in the gaps.  It essentially boils down to something like, &quot;tell all the entities in this area to take damage in 3 seconds,&quot; or &quot;whenever you complete the physics to figure out who I shot, tell them to run this script function.&quot;  It's difficult to figure out how to do that nicely using publish/subscribe or signal/slot.&#xD;&#xA;&#xD;&#xA;This can easily be overkill (versus tenpn's example).  It can also be inefficient bloat if you have a lot of action.  But despite its drawbacks, this &quot;messages and events&quot; approach meshes very well with scripted game code (e.g. in Lua).  The script code can define and react to its own messages and events without the C++ code caring at all.  And the script code can easily send messages that trigger C++ code, like changing levels, playing sounds, or even just letting a weapon set how much damage that TakeDamage message delivers.  It saved me a ton of time because I wasn't having to constantly fool around with luabind.  And it let me keep all of my luabind code in one place, because there wasn't much of it.  When properly coupled, you can use embedded languages like Lua to easily add new features/monsters/weapons/levels/etc to the game without ever recompiling the C++ code.&#xD;&#xA;&#xD;&#xA;Also, my experience with use case #2 is that you're better off handling it as an event in the other direction.  Instead of asking what the entity's health is, fire an event/send a message whenever the health makes a significant change.&#xD;&#xA;&#xD;&#xA;In terms of interfaces, btw, I ended up with three classes to implement all of this: EventHost, EventClient, and MessageClient.  EventHosts create slots, EventClients subscribe/connect to them, and MessageClients associate a delegate with a message.  Note that a MessageClient's delegate target doesn't necessarily need to be the same object that owns the association.  In other words, MessageClients can exist solely to forward messages to other objects.  FWIW, the host/client metaphor is kind of inappropriate.  Source/Sink might be better concepts.&#xD;&#xA;&#xD;&#xA;Sorry, I kinda rambled there.  It's my first answer :)  I hope it made sense." />
  <row Id="2647" PostHistoryTypeId="2" PostId="1450" RevisionGUID="b4e853d7-1fca-49e6-b8d8-b37468aaf9ee" CreationDate="2010-07-24T05:36:38.213" UserId="154" Text="Unity will get you displaying models out of 3dsmax in seconds, and you can focus programming efforts on interaction/gameplay. You can get into more depth on the 3D side if you decide to start custom programming shaders, but you won't need to do that. You can use the scripting to do model instancing if that's interesting to you.&#xD;&#xA;&#xD;&#xA;With XNA you can also get a model up fairly quickly, but you'll be working at a lower level, and without a visual editor for setting up scenes, if that's important to you. You'll need to personally handle setting up a camera location and the associated transforms and draw calls if your are going to do anything besides just render a basic mesh. &#xD;&#xA;&#xD;&#xA;Either way you can use C# and you'll get stuff up on screen quickly. There isn't a single right call here, it's just a question of what you are interested in learning. Do you want something a little more nuts &amp; bolts to learn more about the coding of 3D engines, or do you want to put together some simple games/viewers and mainly want to focus on getting your 3D art in some distributable format.  " />
  <row Id="2648" PostHistoryTypeId="2" PostId="1451" RevisionGUID="e9e47166-dd68-4b23-82bf-8dc99c3762fb" CreationDate="2010-07-24T05:50:18.720" UserId="154" Text="Several good answers here on the programming side. I'll add one that's more design oriented.&#xD;&#xA;&#xD;&#xA;**Have your system designers write edge case test plans for testers**&#xD;&#xA;&#xD;&#xA;If they know what they are doing, the person behind designing a system, or scripting an in-game sequence, is very likely to know the edge cases of that system, and where it might break down. They should also have an idea of where the system interacts with others. Having them write out a test plan, or discuss with the testers where things are likely to go wrong can save everyone time. " />
  <row Id="2649" PostHistoryTypeId="2" PostId="1452" RevisionGUID="d537dda2-8dd3-4e03-bfd9-e22d710b977a" CreationDate="2010-07-24T05:56:36.070" UserId="516" Text="I'm doing a TD and I have basic pathfinding working but I got a problem.  &#xD;&#xA;I want to make the path blockable, and when a block occurs the runners will attack the blocking towers.&#xD;&#xA;So what I need is a way to find the path with lowest amount of towers in it(more important), which is the shortest.&#xD;&#xA;How do I do that?" />
  <row Id="2650" PostHistoryTypeId="1" PostId="1452" RevisionGUID="d537dda2-8dd3-4e03-bfd9-e22d710b977a" CreationDate="2010-07-24T05:56:36.070" UserId="516" Text="Pathfinding the closest path when there is no path." />
  <row Id="2651" PostHistoryTypeId="3" PostId="1452" RevisionGUID="d537dda2-8dd3-4e03-bfd9-e22d710b977a" CreationDate="2010-07-24T05:56:36.070" UserId="516" Text="&lt;algorithm&gt;" />
  <row Id="2652" PostHistoryTypeId="2" PostId="1453" RevisionGUID="2f94c604-517e-49b6-b04d-be175cf16a5d" CreationDate="2010-07-24T06:07:43.053" UserId="154" Text="Often overlooked issues from the user's standpoint:&#xD;&#xA;&#xD;&#xA; - Stable, nothing worse than an editor that crashes&#xD;&#xA; - Reliable Save/Load&#xD;&#xA; - Auto-backup&#xD;&#xA; - Level integrity check (does the map have everything the game needs to run)&#xD;&#xA; - New Level creates a loadable level from scratch (spawn points &amp; whatever the game needs)&#xD;&#xA; - Ability to create, save, and place collections of tiles (Prefabs)&#xD;&#xA; - Ability to copy/paste/move/rotate arbitrary selections of tiles&#xD;&#xA; - Ability to rapidly swap a placed tile with a different type of tile in that same location&#xD;&#xA; - Keyboard shortcuts, preferably customizable.&#xD;&#xA;&#xD;&#xA;On the coding side:&#xD;&#xA;&#xD;&#xA; - Plug-in architecture for ease of expansion to future needs.&#xD;&#xA;  - Allows multiple people to add features simultaneously and release them independently.&#xD;&#xA;" />
  <row Id="2653" PostHistoryTypeId="2" PostId="1454" RevisionGUID="5f301e1a-c892-4b92-80aa-019af6803f28" CreationDate="2010-07-24T06:27:02.607" UserId="395" Text="In your path scoring just make it so passing through a tower costs the same as going through some big number of tiles. In general it will try to get around them, but if there isn't such a path the output will still be going through the least number of obstacles. You can tune the penalty so that sometimes they will just go through instead of going all the way around the map if you want too." />
  <row Id="2654" PostHistoryTypeId="2" PostId="1455" RevisionGUID="cd9071a4-9de5-4db9-b116-946c30b19042" CreationDate="2010-07-24T06:41:45.667" UserId="907" Text="Creating a full blown 3D game requires a lot more math for physics, but what if I just want to mix 3D models in a 2D game, such as in the New Super Mario Brothers? Would I be able to get the looks of 3D models with the ease of making a 2D game?" />
  <row Id="2655" PostHistoryTypeId="1" PostId="1455" RevisionGUID="cd9071a4-9de5-4db9-b116-946c30b19042" CreationDate="2010-07-24T06:41:45.667" UserId="907" Text="How difficult is it to implement 3D models in a 2D game?" />
  <row Id="2656" PostHistoryTypeId="3" PostId="1455" RevisionGUID="cd9071a4-9de5-4db9-b116-946c30b19042" CreationDate="2010-07-24T06:41:45.667" UserId="907" Text="&lt;2d&gt;&lt;3d&gt;" />
  <row Id="2657" PostHistoryTypeId="2" PostId="1456" RevisionGUID="3731c398-4eb7-43b4-916d-d6bfb8f4e19d" CreationDate="2010-07-24T08:29:50.077" UserId="51" Text="Given that most &quot;2D&quot; games are still in 3D engines, just using camera-aligned quads and an orthographic camera, not hard at all.&#xD;&#xA;&#xD;&#xA;Simply replace your standard quad with animated materials with an actual model that animates and keep your logic the same." />
  <row Id="2658" PostHistoryTypeId="2" PostId="1457" RevisionGUID="e13e639f-5c62-46ef-a3b5-a07816d14190" CreationDate="2010-07-24T08:49:07.130" UserDisplayName="Daniel" Text="Bind the loading and reading of the variable into a textfile and fire it up using a specific keybinding or command from console." />
  <row Id="2659" PostHistoryTypeId="2" PostId="1458" RevisionGUID="eab6246f-0c8e-43f3-816f-30e5537dde08" CreationDate="2010-07-24T10:18:31.143" UserId="450" Text="I am looking for tips to profile the server side game loop of a Java program for CPU usage. I tried to use the TPTP plugin for Eclipse so far.&#xD;&#xA;&#xD;&#xA;The problem I am having is that it is really slow. For example the startup of the server is normally done in less than a minute. But with the profiler it takes about 30 minutes.&#xD;&#xA;&#xD;&#xA;Okay, I can enable the profiler only after the server is started, but I am still facing the problem that it is way too slow and using much CPU. So I am unable to connect a number of clients in order to reproduce the problem (even with disabled timeouts).&#xD;&#xA;&#xD;&#xA;I already did some optimization based on no client at all and some very short profiling sessions with one client. This is, however, not really helpful because the game server is doing most of its work only if a player is in reach.&#xD;&#xA;&#xD;&#xA;I am thankful for any tips on profiling for CPU usage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PS: Can someone add the new tag &quot;profiling&quot; please?" />
  <row Id="2660" PostHistoryTypeId="1" PostId="1458" RevisionGUID="eab6246f-0c8e-43f3-816f-30e5537dde08" CreationDate="2010-07-24T10:18:31.143" UserId="450" Text="Profiling server side game loop in java" />
  <row Id="2661" PostHistoryTypeId="3" PostId="1458" RevisionGUID="eab6246f-0c8e-43f3-816f-30e5537dde08" CreationDate="2010-07-24T10:18:31.143" UserId="450" Text="&lt;java&gt;&lt;server&gt;" />
  <row Id="2662" PostHistoryTypeId="2" PostId="1459" RevisionGUID="58b933d5-36bc-49a3-98f9-cadb55b7c857" CreationDate="2010-07-24T11:19:37.413" UserId="972" Text="Have you tried adding your own &quot;profiling&quot; classes - eg a Timing class that you can call before/after key methods, which will log/track start/end/elapsed times.  This could expand into tracking down potential problem areas.  This should add only a small overhead.  You could also have 2 versions a PROD vs PROFILE version so that you can switch to the PROD one when needed and thus gain back any of the added overhead." />
  <row Id="2663" PostHistoryTypeId="16" PostId="1368" RevisionGUID="32eccca3-bf94-42fd-8c9d-cc3c2038d47b" CreationDate="2010-07-24T11:35:57.557" UserId="857" />
  <row Id="2664" PostHistoryTypeId="2" PostId="1460" RevisionGUID="8cf9f68c-f04d-44e6-bf1c-2534edb7950b" CreationDate="2010-07-24T11:43:36.157" UserId="825" Text="I am a budding game programmer trying to get into the industry programming for PS3, Xbox 360.  The main problem I see is the need to demonstrate my skills to a potential employer, but without access to Dev kits for the PS3 or Xbox 360, doing this directly is impossible.&#xD;&#xA;&#xD;&#xA;My question is, what is the best alternative way to show console developers my skills?&#xD;&#xA;&#xD;&#xA;C++ programming in DirectX for Windows seems close to showing Xbox 360 programming skills, and C++ programming in OpenGL seems relatively close to showing PS3 programming skills.  Unfortunately, it seems from web research as if both Xbox 360 and PS3 actually have their own propietary libraries, therefore seeming to make this not a 100% fruitful endeavor.  This approach seems closest, but also most time consuming.  Plus you're not actually making anything run on the console.&#xD;&#xA;&#xD;&#xA;On the other hand, programming in XNA has the benefit that your games are actually on the console, though I get the impression that this is looked upon as not &quot;the real deal&quot; since it is just a wrapper around DirectX and uses C# instead of C++.&#xD;&#xA;&#xD;&#xA;Does anyone have knowledge or experience from inside the industry so as to know what kind of game demos would be most useful to show to a potential employer?  C++ in DirectX, OpenGL, XNA, Unreal Engine, Unity3d, Flash, etc etc etc?  There are only so many hours in the day, and I'd love to know how to direct my efforts.&#xD;&#xA;&#xD;&#xA;My gut feeling is that DirectX would be the best choice, as it seems closer to what is used on the Xbox 360, but if having a good demo in another language/engine is just as good, it would obviously be less time consuming to go another route.&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help and advice!" />
  <row Id="2665" PostHistoryTypeId="1" PostId="1460" RevisionGUID="8cf9f68c-f04d-44e6-bf1c-2534edb7950b" CreationDate="2010-07-24T11:43:36.157" UserId="825" Text="How to get PS3/Xbox 360 experience without having access to Dev kits?" />
  <row Id="2666" PostHistoryTypeId="3" PostId="1460" RevisionGUID="8cf9f68c-f04d-44e6-bf1c-2534edb7950b" CreationDate="2010-07-24T11:43:36.157" UserId="825" Text="&lt;opengl&gt;&lt;programming&gt;&lt;directx&gt;&lt;languages&gt;" />
  <row Id="2667" PostHistoryTypeId="2" PostId="1461" RevisionGUID="09f89a55-01be-48c2-9c37-a981771c1fcb" CreationDate="2010-07-24T11:54:07.010" UserId="993" Text="DirectX is a great choice.  It's the easiest demo for us to run as we have PCs with Windows already most likely.  If you do choose to go with the console option, a video is a nice demo instead.  But nothing beats looking at your live code running.&#xD;&#xA;&#xD;&#xA;Do try and run your code on several machines to make sure you're allowing for different video cards etc.  These days that's mostly automatic, but some differences can still occur." />
  <row Id="2668" PostHistoryTypeId="2" PostId="1462" RevisionGUID="d1adb0e8-d05f-4b1d-bf53-a2b0c88a88bb" CreationDate="2010-07-24T12:29:41.853" UserId="465" Text="Depends what path you are going down, frankly most people don't expect specific platform skills in a junior.&#xD;&#xA;&#xD;&#xA;If your a games programmer, make a lot of games.&#xD;&#xA;&#xD;&#xA;If your a technical programmer make a load of tech demos. Read interesting white papers and try new stuff out. If you do something interesting that makes the programmers go OOOoo we will WANT to talk to you. We want to chat about this little interesting thing you have done. It doesn't need to be a game.&#xD;&#xA;&#xD;&#xA;KEY FACT: Your demo's should run on a wide range of machines, include a video recording as a back-up. Edited not raw." />
  <row Id="2669" PostHistoryTypeId="2" PostId="1463" RevisionGUID="43495cd6-e571-4f03-bf37-a5dd3079e1e6" CreationDate="2010-07-24T12:35:45.553" UserId="465" Text="**HTTP Logging** is a huge help, and not difficult to get up and running. You can even use Google App engine as a quick way of getting this running. Data is always useful.&#xD;&#xA;&#xD;&#xA;**Scripts &amp; XML** these can be reloaded on the fly and require no reset. Allow them to fail without bringing down the game. This gives a lot of power to artists, testers and designers.&#xD;&#xA;&#xD;&#xA;**In-Game Debug Menu** A simple in game debug menu which you can spawn as a child and freeze the game with both engine sliders and game sliders. Allowing you to tweak key numbers at runtime and maybe perform one or two debug functions, or info dumps.&#xD;&#xA;&#xD;&#xA;I also love ASYNC sockets as mentioned in David's answer&#xD;&#xA;&#xD;&#xA;**Easy to USE** Your games team must be able to add to these tools and use them very easily, or they just won't get used." />
  <row Id="2670" PostHistoryTypeId="2" PostId="1464" RevisionGUID="51b054e5-772c-4880-93ff-bc2c9d7818a2" CreationDate="2010-07-24T12:59:20.560" UserId="288" Text="To expand on my comment from earlier and give you a full answer:&#xD;&#xA;&#xD;&#xA;**A good way to modify values on the fly is to modify them directly using C#**&#xD;&#xA;&#xD;&#xA;It sounds like what you're trying to implement is something like Klik &amp; Play or Unreal Kismet (and to a lesser extent the level-entity-triggering system from Unreal and some other engines).&#xD;&#xA;&#xD;&#xA;What you need to keep in mind is that these systems make sense for companies like Epic because they (and their licensees) are creating enormous volumes of content - and it's cheaper to enable a non-programmer to make it dynamic, than it is to require a programmer to do it. (With volumes like Epic's - even a entry-level programmer working in a managed language like C# or UnrealScript is expensive enough to justify such a system.)&#xD;&#xA;&#xD;&#xA;For the rest of us who are *not* making AAA middleware - making a system like that is just cargo-cult engineering. (And if you *are* making that kind of middleware, this is not how I'd approach it anyway.)&#xD;&#xA;&#xD;&#xA;Basically you're adding a layer of indirection to your programming. Every time you want some new functionality *you're going to have to program it anyway*. Except you'll also have to wrap it in a new Modifier class (including, presumably: serialization, editable properties, considerations of re-usability, etc), and then add it to your level and link it up. And you lose the magic of version control, refactoring support, debugging, etc. And heaven help you if you want to modify a Modifier - have fun checking all your levels still work!&#xD;&#xA;&#xD;&#xA;(By the way: I learned all this the hard way - which is why I'm being so opinionated about it.)&#xD;&#xA;&#xD;&#xA;So that's my little rant about your architecture out of the way. What should you do?&#xD;&#xA;&#xD;&#xA;Well you *already have a fantastic editor*: it's called Visual C#. In a very basic sense you should just give each level in your game a class/.cs file - and dynamically instance that class when the level starts (or whatever makes sense for your game).&#xD;&#xA;&#xD;&#xA;And all the time you save not making your Modifer system, you could spend adding nice features like [on-the-fly recompilation][1]. (By the way: if you're concerned about end-user modding - remember that Visual C# Express is free, and the C# compiler comes with the .NET runtime.)&#xD;&#xA;&#xD;&#xA;As to particle systems, which you mentioned in your comment: Are you nuts? Where did you see that? Particle systems need fast throughput - and I don't see that happening with a virtual function call and a cast, and using reference types for each particle!&#xD;&#xA;&#xD;&#xA;In the ideal CPU performance case, a particle system should have a tight loop that moves through an array of structs containing a position and a velocity vector. Actually - better yet: a single draw call that gets the GPU to handle it all in a vertex shader.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Just to give you an idea of what I'm talking about, here's what your ball example might look like:&#xD;&#xA;&#xD;&#xA;    public void LevelStart()&#xD;&#xA;    {&#xD;&#xA;        this.Walls[&quot;magicWall&quot;].OnTouch += (touchedBy) =&gt;&#xD;&#xA;        {&#xD;&#xA;            Ball ball = touchedBy as Ball;&#xD;&#xA;            if(ball != null)&#xD;&#xA;                ball.Color = Color.Blue;&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1353456/recompile-c-while-running-without-appdomains&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/details.aspx?FamilyID=b11ad912-4158-44cc-a771-a5e044f7e3bb&amp;displaylang=en" />
  <row Id="2671" PostHistoryTypeId="2" PostId="1465" RevisionGUID="deb6a86e-cbf0-44a2-982a-284f57c542fe" CreationDate="2010-07-24T13:56:23.330" UserId="932" Text="Is there a way to check if a point is intersecting a body?&#xD;&#xA;&#xD;&#xA;For example, lets say there's a body in the world at a position of (100,100).&#xD;&#xA;&#xD;&#xA;Is there a way to check if a point at (100,100) intersects that body?&#xD;&#xA;&#xD;&#xA;Another example is related to a game called &quot;PHUN&quot;. In PHUN you can click and drag bodies around. How would you check if a mouse point is intersecting a body?" />
  <row Id="2672" PostHistoryTypeId="1" PostId="1465" RevisionGUID="deb6a86e-cbf0-44a2-982a-284f57c542fe" CreationDate="2010-07-24T13:56:23.330" UserId="932" Text="Box2D Check If Point Intersects a Body" />
  <row Id="2673" PostHistoryTypeId="3" PostId="1465" RevisionGUID="deb6a86e-cbf0-44a2-982a-284f57c542fe" CreationDate="2010-07-24T13:56:23.330" UserId="932" Text="&lt;2d&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="2674" PostHistoryTypeId="2" PostId="1466" RevisionGUID="8f938f94-1339-4e2f-933f-ecb7a5bbe04a" CreationDate="2010-07-24T14:38:01.250" UserId="382" Text="If you have a point you *know* is inside the shape then you can intersect the line joining the mouse location to that point with the boundary of the shape. If there are an odd number of intersections then the point is inside. If there are an even number of intersections then the point is outside.&#xD;&#xA;" />
  <row Id="2675" PostHistoryTypeId="2" PostId="1467" RevisionGUID="4688fb44-b56f-422c-b267-9c20ff347ec1" CreationDate="2010-07-24T14:40:54.240" UserId="8" Text="Take a look at `b2QueryCallback` for finding what fixtures contain a point and use `b2MouseJoint` for having objects follow a mouse. I have some sample code, but no time to simplify it for you right now. If you need it, I can provide it later." />
  <row Id="2676" PostHistoryTypeId="5" PostId="1466" RevisionGUID="0ff77c2f-06bf-4e49-98e1-ed6ddd1566f2" CreationDate="2010-07-24T14:48:02.317" UserId="382" Comment="added image" Text="If you have a point you *know* is inside the shape then you can intersect the line joining the mouse location to that point with the boundary of the shape. If there are an odd number of intersections then the point is inside. If there are an even number of intersections then the point is outside.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.forman.free-online.co.uk/images/intersections.png &quot;crossing boundaries&quot;" />
  <row Id="2677" PostHistoryTypeId="5" PostId="1466" RevisionGUID="6d4727cb-e4b4-44b6-8605-1ccd10f7acf5" CreationDate="2010-07-24T15:02:36.013" UserId="382" Comment="more infp" Text="If you have a point you *know* is inside the shape then you can intersect the line joining the mouse location to that point with the boundary of the shape. If there are an odd number of intersections then the point is inside. If there are an even number of intersections then the point is outside.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;The green dots are the mouse locations, the red is the know point inside the shape.&#xD;&#xA;&#xD;&#xA;There are edge cases - if the line joining the points coincides with an edge, for example - but this should get you 90% of the way there.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.forman.free-online.co.uk/images/intersections.png &quot;crossing boundaries&quot;" />
  <row Id="2679" PostHistoryTypeId="2" PostId="1469" RevisionGUID="1e4b5411-400a-4d22-821e-b34871edea3f" CreationDate="2010-07-24T15:28:53.413" UserId="288" Text="I know Sean James already [said it][1]. But seriously, Visual Studio (specifically the debugging tools) is terrific for this.&#xD;&#xA;&#xD;&#xA;I don't use C++ much these days, so I'm not sure about how well these apply there. But for C# (including in C# Express) you have:&#xD;&#xA;&#xD;&#xA; - [Edit and Continue][2] - where you can make wholesale changes to your game logic.&#xD;&#xA; - The [Watch Window][3] - where you can see and modify variables with ease.&#xD;&#xA;&#xD;&#xA;And this might blow your mind (it blew mine when I found out about it):&#xD;&#xA;&#xD;&#xA; - The [Immediate Window][4] - where you can type in and execute/evaluate *[arbitrary code][5]*.&#xD;&#xA;&#xD;&#xA;The Immediate Window is actually kind of hard to find (it's in the Debug/Windows menu).&#xD;&#xA;&#xD;&#xA;The only major downside to using the Visual C# debugger is that it doesn't like changing `const` values. So I usually just make my gameplay-related values `static` while I'm tweaking them.&#xD;&#xA;&#xD;&#xA;(Also: having two monitors helps a lot.)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now I must admit that the above method involves pausing your application - which can be unsatisfyingly slow for a few particularly fiddly things.&#xD;&#xA;&#xD;&#xA;On these rare occasions, what I do (in XNA) is to simply hack in a bit of code (probably using Edit and Continue, as above) to grab `Keyboard.GetState().IsKeyDown()` (actually I have an easier-to-type wrapper for this) and adjust the value by keystrokes. Anything more complicated is not worth the effort.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In practice what I usually find *vastly* more important is being able to **visualise** (rather than modify) values in real-time. For this I have a nice little class that can buffer lines and text to be drawn at the end of the frame. It's also useful for quick prototyping.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://andrewrussell.net/content/2010/06/Gameplay-Complete-with-extra-data.png&quot;&gt;&lt;img src=&quot;http://andrewrussell.net/content/2010/06/Gameplay-Complete-with-extra-data-480x270.png&quot;&gt;&lt;/a&gt; (&lt;a href=&quot;http://andrewrussell.net/2010/06/gameplay-complete/&quot;&gt;from here&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;I'm afraid I don't have &quot;nice&quot; source to publish at the moment (maybe later). But it's basically just a list of lines (for [this round line library][6]) and strings (for XNA's built-in SpriteBatch). Just make it `public static` somewhere, and draw everything with an appropriate transform so that everything appears in &quot;world space&quot; (and then clear the lists for the next frame).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/878/real-time-debugging-techniques/882#882&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bcew296c(VS.80).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/aa290869(VS.71).aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/f177hahy(VS.80).aspx&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/f177hahy(v=VS.71).aspx&#xD;&#xA;  [6]: http://roundline.codeplex.com/" />
  <row Id="2680" PostHistoryTypeId="5" PostId="1469" RevisionGUID="da0f4b65-ca6f-49d4-ac64-1f64f2a57056" CreationDate="2010-07-24T15:37:38.387" UserId="288" Comment="added 102 characters in body" Text="I know Sean James already [said it][1]. But seriously, Visual Studio (specifically the debugging tools) is terrific for this.&#xD;&#xA;&#xD;&#xA;I don't use C++ much these days, so I'm not sure about how well these apply there. But for C# (including in C# Express) you have:&#xD;&#xA;&#xD;&#xA; - [Edit and Continue][2] - where you can make wholesale changes to your game logic.&#xD;&#xA; - The [Watch Window][3] - where you can see and modify variables with ease.&#xD;&#xA;&#xD;&#xA;And this might blow your mind (it blew mine when I found out about it):&#xD;&#xA;&#xD;&#xA; - The [Immediate Window][4] - where you can type in and execute/evaluate *[arbitrary code][5]*.&#xD;&#xA;&#xD;&#xA;The Immediate Window is actually kind of hard to find (it's in the Debug/Windows menu).&#xD;&#xA;&#xD;&#xA;The only major downside to using the Visual C# debugger is that it doesn't like changing `const` values. So I usually just make my gameplay-related values `static` while I'm tweaking them.&#xD;&#xA;&#xD;&#xA;(Also: having two monitors helps a lot.)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now I must admit that the above method involves pausing your application - which can be unsatisfyingly slow for a few particularly fiddly things.&#xD;&#xA;&#xD;&#xA;On these rare occasions, what I do (in XNA) is to simply hack in a bit of code (probably using Edit and Continue, as above) to grab `Keyboard.GetState().IsKeyDown()` (actually I have an easier-to-type wrapper for this) and adjust the value by keystrokes. Anything more complicated is not worth the effort.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In practice what I usually find *vastly* more important is being able to **visualise** (rather than modify) values in real-time. For this I have a nice little class that can buffer lines and text to be drawn at the end of the frame. It's also useful for quick prototyping.&#xD;&#xA;&#xD;&#xA;(And, once again, it's nice to be able to &quot;Edit and Continue&quot; these visualisations in at runtime.)&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://andrewrussell.net/content/2010/06/Gameplay-Complete-with-extra-data.png&quot;&gt;&lt;img src=&quot;http://andrewrussell.net/content/2010/06/Gameplay-Complete-with-extra-data-480x270.png&quot;&gt;&lt;/a&gt; (&lt;a href=&quot;http://andrewrussell.net/2010/06/gameplay-complete/&quot;&gt;from here&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;I'm afraid I don't have &quot;nice&quot; source to publish at the moment (maybe later). But it's basically just a list of lines (for [this round line library][6]) and strings (for XNA's built-in SpriteBatch). Just make it `public static` somewhere, and draw everything with an appropriate transform so that everything appears in &quot;world space&quot; (and then clear the lists for the next frame).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/878/real-time-debugging-techniques/882#882&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bcew296c(VS.80).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/aa290869(VS.71).aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/f177hahy(VS.80).aspx&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/f177hahy(v=VS.71).aspx&#xD;&#xA;  [6]: http://roundline.codeplex.com/" />
  <row Id="2681" PostHistoryTypeId="6" PostId="1452" RevisionGUID="f1a3e9f3-b793-44c9-a6f9-76bf8aa91df9" CreationDate="2010-07-24T16:03:31.047" UserId="395" Comment="edited tags" Text="&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="2682" PostHistoryTypeId="2" PostId="1470" RevisionGUID="2987ff39-506b-48bc-8bc4-3294d6aa10cd" CreationDate="2010-07-24T16:16:02.470" UserId="865" Text="This question (or rather, your aspirations) need scope. Nowadays in the industry there is hardly such a thing as a 'game programmer'. Unless you're aiming to go for a very small studio or rendering programmer, DirectX or OpenGl doesn't really matter.&#xD;&#xA;The things that set consoles apart from PC's are limited performance, limited memory and multicore issues. No matter what branch of programming in the industry you aspire, those are important, so showing that you are aware of how to deal with those will, imo, help.&#xD;&#xA;Know your C++. Know the pitfalls of C++. Know how not to use STL. &#xD;&#xA;Make sure your code is framerate independent, multi-threaded, and uses custom memory allocators. Highlight that, of course. &#xD;&#xA;I think what is really important is that your demo is *finished*. A lot of programmers stop when the core mechanic works, whereas the drag in game programming is the finalling - show that you know how to do it.&#xD;&#xA;&#xD;&#xA;Most studios want to know what your skill is, AI, Gameplay, Rendering, Systems, Audio, Physics, whatnot. Try to figure that out. Being a generalist, without experience in the industry, will be a hard sell.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;" />
  <row Id="2683" PostHistoryTypeId="5" PostId="1441" RevisionGUID="9f263071-81cc-4d51-b613-d36377aeeb36" CreationDate="2010-07-24T16:19:12.920" UserId="930" Comment="added 1159 characters in body" Text="One of my hobbies (aside programming, of course) is 3d modelling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modelling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modelling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modelling characters)  &#xD;&#xA;**3)** What knowledges should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development enviroment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existant 3D models (not a must, but a plus, if it's .3DS, a HUGE plus)  &#xD;&#xA; - Had the ability to create 3d models programatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more ui-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [wighed companion cube][5], and I want to make a fullscreen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="2684" PostHistoryTypeId="5" PostId="1438" RevisionGUID="4fb368b0-fb18-402a-ae71-3f3ceeb3a969" CreationDate="2010-07-24T16:25:03.960" UserId="865" Comment="added 1046 characters in body" Text="Most often, the best way to gain performance is to change your algorithm. The less general the implementation the closer you can get to the metal.&#xD;&#xA;&#xD;&#xA;Assuming that has been done....&#xD;&#xA;&#xD;&#xA;If it's really critical code indeed, try to avoid memory reads, try to avoid calculating stuff that can be precalculated (though no lookup tables as they violate rule number 1). Know what your algorithm does and write it in a way that the compiler knows it too. Check the assembly to be sure it does.&#xD;&#xA;&#xD;&#xA;Avoid cache misses. Batch process as much as you can. Avoid virtual functions and other indirections.&#xD;&#xA;&#xD;&#xA;Ultimately, measure everything. The rules change all the time. What used to speed up code 3 years ago now slows it down. A nice example is 'use double math functions instead of float versions'. I wouldn't have realized that one if I hadn't read it.&#xD;&#xA;&#xD;&#xA;I forgot - don't have default constructors intialize your variables, or if you insist, at least also create constructors that don't. &#xD;&#xA;Be aware of the things that don't show up in the profiles. When you lose one unnecessary cycle per line of code nothing will show up in your profiler, but you'll lose a whole lot of cycles overall. Again, know what your code is doing. Make your core function lean instead of foolproof. Foolproof versions can be called if needed, but are not always needed. Versatility comes at a price - performance being one.&#xD;&#xA;&#xD;&#xA;Edited to explain why no default initialization:&#xD;&#xA;A lot of code says:&#xD;&#xA;Vector3 bla;&#xD;&#xA;bla = DoSomething();&#xD;&#xA;&#xD;&#xA;The intialization in the constructor is wasted time. Also, in this case the wasted time is small (probably clearing the vector), however if your programmers do this habitually it adds up. &#xD;&#xA;Also, a lot of function create a temporary (think overloaded operators), that gets initialized to zero and assigned after straight away. Hidden lost cycles that are too small to see a spike in your profiler, but bleed cycles all over your code base.&#xD;&#xA;Also, some people do a lot more in constructors (which is obviously a no-no). I've seen multi-millisecond gains from an unused variable where the constructor happened to be a bit on the heavy side.&#xD;&#xA;As soon as the constructor causes side effects the compiler won't be able to optmize it out, so unless you never use above code, I prefer either a non-initializing constructor, or, as I said, a version of the constructor that doesn't initialize.&#xD;&#xA;&#xD;&#xA;Vector3 bla(noInit);&#xD;&#xA;bla = doSomething();&#xD;&#xA;" />
  <row Id="2685" PostHistoryTypeId="5" PostId="1441" RevisionGUID="5e78914c-1f46-46f8-821d-31f6a50ff144" CreationDate="2010-07-24T16:33:31.110" UserId="930" Comment="added 53 characters in body" Text="One of my hobbies (aside programming, of course) is 3d modelling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modelling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modelling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modelling characters)  &#xD;&#xA;**3)** What knowledges should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development enviroment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existant 3D models (not a must, but a plus, if it's .3DS, a HUGE plus)  &#xD;&#xA; - Had the ability to create 3d models programatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more ui-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [wighed companion cube][5], and I want to make a fullscreen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room) drawn maybe through code (not an imported model)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="2686" PostHistoryTypeId="2" PostId="1471" RevisionGUID="4fa7b0a4-53bb-4cfe-9ae8-0711763300ca" CreationDate="2010-07-24T16:36:25.643" UserId="34" Text="One reason to follow what most of the examples do is because just because the current implementations allow for this usage, it doesn't mean future implementations will.  It's better to code defensively and to what the API is documented to do rather than what a particular implementation does.  &#xD;&#xA;&#xD;&#xA;In this case, you already have working code that's been implemented the correct way.  Just toss it in your code and then you don't have to worry about it again." />
  <row Id="2687" PostHistoryTypeId="2" PostId="1472" RevisionGUID="28048717-eb8e-43ec-adc8-0b49fe29d702" CreationDate="2010-07-24T16:37:39.247" UserId="789" Text="**[GIMPshop][1]** is GIMP with PhotoShop like interface.&#xD;&#xA;&#xD;&#xA;&gt; GIMPshop is a modification of the free/open source GNU Image Manipulation Program (GIMP), intended to replicate the feel of Adobe Photoshop. Its primary purpose is to make users of Photoshop feel comfortable using GIMP.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gimpshop.com/download.shtml" />
  <row Id="2688" PostHistoryTypeId="2" PostId="1473" RevisionGUID="0e428388-f934-4073-93f0-cac69840df42" CreationDate="2010-07-24T16:45:02.997" UserId="865" Text="Pro-motion by cosmigo, a Deluxe Paint clone does it for me. DPaint is more or less the oldskool pixeling standard. Nowadays, with people don't knowing about palettes and stuff it seems PhotoShop is more in vogue." />
  <row Id="2689" PostHistoryTypeId="2" PostId="1474" RevisionGUID="def0ffa9-56f9-4583-b3d2-e5027f1df22b" CreationDate="2010-07-24T16:59:11.557" UserId="865" Text="Writing a simple reflection system for C/C++ is fairly trivial. This way you can browse through all your variables in game (be it with a network tool, keyboard or joypad) and change them to your heart's content. It works for me, but all the above answers are equally valid.&#xD;&#xA;&#xD;&#xA;Edited to add:&#xD;&#xA;This thread is now about tweaking, not debugging as per the thread-title." />
  <row Id="2690" PostHistoryTypeId="2" PostId="1475" RevisionGUID="b4cddfdb-6924-46f7-bd68-84ee29ac119f" CreationDate="2010-07-24T17:06:59.330" UserId="656" Text="Knowledge of any 3D API is good. It shouldn't matter whether it is DirectX or OpenGL. 3D concepts are the same everywhere, just the APIs are different. Knowing OpenGL does not put you at a disadvantage to someone who knows Direct3D when competing for a junior level XBOX job. What you need to be demonstrating is your ability to code something and that you understand C++ (or any other language), the standard libraries, data structures and algorithms. Knowledge of a game engine such as UDK or Unity is a bonus. This demonstrates your ability to work with middleware, which is common in games companies. Flash has been used in front-end development, it is also a skill not to overlook.&#xD;&#xA;&#xD;&#xA;Most important is that you just build a demo (in any language), make it good and see it through to the end. Good luck!" />
  <row Id="2691" PostHistoryTypeId="6" PostId="1458" RevisionGUID="ea73910a-e84d-49ef-a585-aa1e4c906e9e" CreationDate="2010-07-24T17:18:05.660" UserId="189" Comment="edited tags" Text="&lt;java&gt;&lt;server&gt;&lt;profiling&gt;" />
  <row Id="2692" PostHistoryTypeId="2" PostId="1476" RevisionGUID="7c8d4ea5-f1cd-40d4-b6bf-9f8d62e5a9d8" CreationDate="2010-07-24T17:27:08.627" UserId="865" Text="While I agree with the above that I wouldn't do it this way, and that you should measure actual performance hit, it's beside the discussion.&#xD;&#xA;&#xD;&#xA;To me the cast kinda tells me your setup is wrong. For one, what if the cast fails?&#xD;&#xA;&#xD;&#xA;I'd definitely advise you to look into interfaces and/or 'observer/visitor pattern'.&#xD;&#xA;&#xD;&#xA;Alternatively wonder about a class Modifiable, where then that vector2 can derive from (instead of entity), so you know you're type-safe. Have your entity have a ModifiableVector2 as a member and work on that?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2693" PostHistoryTypeId="5" PostId="1458" RevisionGUID="8d4b675f-a48d-4eec-bbd2-1595cbb5de73" CreationDate="2010-07-24T17:46:04.977" UserId="450" Comment="deleted 57 characters in body" Text="I am looking for tips to profile the server side game loop of a Java program for CPU usage. I tried to use the TPTP plugin for Eclipse so far.&#xD;&#xA;&#xD;&#xA;The problem I am having is that it is really slow. For example the startup of the server is normally done in less than a minute. But with the profiler it takes about 30 minutes.&#xD;&#xA;&#xD;&#xA;Okay, I can enable the profiler only after the server is started, but I am still facing the problem that it is way too slow and using much CPU. So I am unable to connect a number of clients in order to reproduce the problem (even with disabled timeouts).&#xD;&#xA;&#xD;&#xA;I already did some optimization based on no client at all and some very short profiling sessions with one client. This is, however, not really helpful because the game server is doing most of its work only if a player is in reach.&#xD;&#xA;&#xD;&#xA;I am thankful for any tips on profiling for CPU usage." />
  <row Id="2694" PostHistoryTypeId="2" PostId="1477" RevisionGUID="2ef71437-9100-494c-9649-96532997e526" CreationDate="2010-07-24T18:19:18.187" UserId="312" Text="I'm unsure as to what people prefer when it comes to HUDs, and scaling them. What would you say is the best practice when it comes to sizing the HUD? I'm thinking there's really two options: Scale up, or use the same area (in pixels) to display it on a higher resolution.&#xD;&#xA;&#xD;&#xA;The problems I see with each are with scaling, I may have a huge blurry mess in the corner, but if I don't, it could be hard to see from a distance. Any guidance?" />
  <row Id="2695" PostHistoryTypeId="1" PostId="1477" RevisionGUID="2ef71437-9100-494c-9649-96532997e526" CreationDate="2010-07-24T18:19:18.187" UserId="312" Text="Scaling HUD with variable resolution" />
  <row Id="2696" PostHistoryTypeId="3" PostId="1477" RevisionGUID="2ef71437-9100-494c-9649-96532997e526" CreationDate="2010-07-24T18:19:18.187" UserId="312" Text="&lt;resolution&gt;" />
  <row Id="2697" PostHistoryTypeId="2" PostId="1478" RevisionGUID="359b6226-1e6c-4805-95ff-0902f3a62559" CreationDate="2010-07-24T18:24:24.463" UserId="865" Text="It depends, if your HUD is an integral part of the design you'd obviously want to scale it up (or rather down - mipmapping and multiple versions of the same resource will somewhat alleviate the quality loss problem). If it's merely to get information to the user I'd try to steal as little screenspace as the HUD allows while at the same time ensuring maximum readability as your assets won't be blurred.&#xD;&#xA;&#xD;&#xA;An alternative is having a fully 3D/Vectorized HUD, in that case you won't suffer quality loss as it always gets rendered to native resolution." />
  <row Id="2698" PostHistoryTypeId="2" PostId="1479" RevisionGUID="78a48746-ef0f-464b-8e23-aee90ebbc6d6" CreationDate="2010-07-24T18:25:26.723" UserId="490" Text="Speed it up:&#xD;&#xA;&#xD;&#xA;    internal override void Apply(Entity entity)&#xD;&#xA;    {&#xD;&#xA;        Entity2D entity2d = entity as Entity2D;&#xD;&#xA;        if (entity2d)&#xD;&#xA;        {&#xD;&#xA;            entity2d.X += this.Position.X;&#xD;&#xA;            entity2d.Y += this.Position.Y;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The &quot;as&quot; cast is faster and returns null if the object can't be casted. You also avoid the second cast but don't ask me if the if statement is faster, slower or equal than the cast. Honestly, I couldn't care less unless you know this to be an issue. Which it won't. That I'm 99.9% sure of.&#xD;&#xA;&#xD;&#xA;Anyway, the &quot;as&quot; cast with null-pointer check is a C# best practice. It won't crash if at one time the entity really is just an Entity, not a Entity2D.&#xD;&#xA;&#xD;&#xA;You could also write a Modifier class which runs Apply only on Entity2D objects if you're that worried about performance. Or change all your game entities to be of Entity2D and also change the Modifier class. It's a matter of trading off memory vs. speed." />
  <row Id="2699" PostHistoryTypeId="2" PostId="1480" RevisionGUID="bbc7129b-4963-42f5-b0ed-d707fdef5b4c" CreationDate="2010-07-24T18:49:44.520" UserId="528" Text="Now this is an actual good question.  I don't know where you are, so I'm gonna swing for the sky, and assume you've never written a line of code in your life.  Cut off whatever part of the nose offends you, to abuse a phrase.&#xD;&#xA;&#xD;&#xA;I think I'm actually going to answer a slightly different question than what you asked, and I'm going to give examples to satisfy the question you asked in situ.  The reason I'm doing it that way is a slight but I believe significant difference in viewpoint: it's not so much the specific games that matter, as much as the mindsets those games bring to a designer.&#xD;&#xA;&#xD;&#xA;You know how people talk about you're supposed to learn a variety of programming languages, in order to eat their mindsets and their hearts and their livers, and thereby to gain their mighty power?  There's a real truth to that - after your first pure or near-pure programming language, even in imperative languages, you're going to end up writing largely side-effect free functions because they're so much better defined, and everything you write even in languages not of that form will be better for it.  It doesn't particularly matter which language it is - haskell, ml/ocaml/smlnj, formulaONE, c++ templates, whatever - you're still going to learn how to do many classes of work without relying onside effect state.  First time you learn a rugged, machine-near programming language, you're going to learn about size type abstraction.  First time you learn a declarative or constraint language, you're going to learn about bounding as a discretionary tool.  First time you learn a backtracking search language, you're going to learn to pray Ia! Ia! C'thulhu F'tagn Nagn!, and then we're back to eating hearts and livers, and the circle of life is fulfilled.&#xD;&#xA;&#xD;&#xA;Game design is no different.  You don't necessarily need to learn any specific game, by parallel with a specific language, but rather to learn some emblematic representative game that handles that mindset, like the language characteristic families.  Also, there's lots of eating livers and hearts.  Get a pepper cracker.&#xD;&#xA;&#xD;&#xA;The gag here (as I see it at least) is that you want to cover a large list of topics.  It's like ticking off proficiencies on a character sheet - you're making available to yourself more mechanisms by which to handle a given situation.  Yes, they're level-able, but having a point or two in as many things as you can across the board means that when it comes time to use one, you aren't starting from scratch, and you know what tactics are available for you to scale up by.&#xD;&#xA;&#xD;&#xA;So, look.&#xD;&#xA;&#xD;&#xA;First you want to cut your teeth.  These are also useful when you're learning to target a new platform, or when you're recovering from amnesia.  These are meant to be fast, not awesome.&#xD;&#xA;&#xD;&#xA;In order:&#xD;&#xA;&#xD;&#xA; 1. Screen control.  Bluescreening is great for this, because then you have compelling reason to believe you're on your way to being Microsoft.&#xD;&#xA; 2. Input validation.  Fooscreen, where foo is blue for up, red for down, etc.  Check all your keys; there are more than enough colors, or you can four-color map if you absolutely need to save crimson for more important things.&#xD;&#xA; 3. Text and sprite rendering.  Since you also have input validation, a tile memory game is not a bad idea.&#xD;&#xA; 4. Timers.  Time for a Mario clone or an Arkanoid.&#xD;&#xA; 5. Sound and music.  Improve the mario clone.  Not much though.&#xD;&#xA;&#xD;&#xA;Once you've got those down, you're ready to target a platform, and &lt;voice name=&quot;x/drstrange_theoldone&quot;&gt;the learning may begin&lt;/voice&gt;.&#xD;&#xA;&#xD;&#xA;These are in no particular order.  You may rearrange them as you see fit.  I'm going to give a handful of examples with each, but they're not normative; if a different game gives you the same experience, and is small enough to be part of a series of lessons, feel free to swap it in.  For practical reasons, it's good to be proficient in screen rendering and input relatively quickly; you're gonna use them a whole lot.  Wait a few games before trying to write abstraction classes; you ***don't*** want to be caught in a naive abstraction.&#xD;&#xA;&#xD;&#xA; - Animation.  Almost anything you do can call for animated sprites.  Get an independant animation engine under your belt, even if it's programmer art.  Making a simple puzzle game whose tiles throb is enough.&#xD;&#xA; - Complex scoring.  Get all five enemies in a wing?  Bonus.  Land three punches in a row?  Bonus.  Make it through the whole level without missing a bullet?  Huge bonus.&#xD;&#xA; - Pathfinding.  Lots of games need this, but a tower defense game is about the simplest.  You can get started with breadth-first and depth-first if you've never done it before, but you're not done until you've implemented A* from scratch (NOT COPIED CODE) at least once.&#xD;&#xA; - Enemy behavior.  Dumb automated behaviors will be covered by your mario, but reactive behaviors are important too.  This is a good excuse to build a tactics game or a roguelike.  (Warning: you will work on the roguelike for the rest of your life.)&#xD;&#xA; - Dynamic 2d lighting.  This is also a good reason to write a roguelike.  Arc-based shadowcasting is an important way to look at banding and separating, which is in turn important for a whole lot of datastructures.&#xD;&#xA; - 2d Physics.  This turns up in a whole lot of games, at a whole lot of levels of detail.  Try a platformer (mario-ish,) which can be super-simplified; a tank game (scorched-earth-ish,) which can be equally simplified; and eventually, a game like N the Ninja, which makes you cope with running on angles, momentum, et cetera (you can do that with an axis-aligned bounding box collision system pretty straightforwardly.)  Physics and collision are pretty intimately related.&#xD;&#xA; - Collision detection.  There are ridiculously simple cases, like grid Arkanoids and Mario clones, moderately complex cases like N the Ninja and genuinely complex cases like sandbox physics games (the incredible machine, modern arkanoids like BreakQuest, et cetera.)  In many cases you can get by with something like AABB, but if you're math inclined, it might be useful to actually implement something complete.  At a minimum, get familiar with a complete library, such as APE or Box2D.&#xD;&#xA; - Risk/reward relationships in game play satisfaction.  Simple dice games (go digging around for something called &quot;Skunk&quot; from the 50s) and risky-path (life, candyland) board games are great examples of simple quick ways to learn this by doing.&#xD;&#xA; - Expressive variation in mechanics.  Nail yourself down to some small count of rules, then learn to get a whole lot of variation out of them.  Custom deck card games are a great way to work with this; take a look into Dvorak decks, and real world games like Mille Bornes, Rage and Uno, then make a few of your own.  They don't get to be similar.&#xD;&#xA; - Generated content.  Simple map-based strategy games, roguelikes and some kinds of puzzle games are great ways to learn to do this.  Bonus points if it's a kind of game not generally known for having generated content.&#xD;&#xA; - Style.  Don't screw around: this is a big deal.  Make a game, then skin it to be four completely different games.  *Really* different.  One a kids' game, even.  (Think about it: Mega Man makes perfect sense as a sorcerer adventure into hell, or as Rogue from the X-Men, or ...)  Now, get four groups of people to score one each of your games.  After that, have them score the next game, counter-clockwise, around the ring, and so on.  Notice how radically their scoring changes based on theme and prior expectation.&#xD;&#xA; - Making the player plan sequences.  Puzzle games are sort of the cleanest ways to go about this.&#xD;&#xA; - Resource management&#xD;&#xA; - Upgrades&#xD;&#xA; - Cranking up time pressure&#xD;&#xA;&#xD;&#xA;... eh.  I got bored." />
  <row Id="2700" PostHistoryTypeId="16" PostId="1480" RevisionGUID="bbc7129b-4963-42f5-b0ed-d707fdef5b4c" CreationDate="2010-07-24T18:49:44.520" UserId="-1" />
  <row Id="2701" PostHistoryTypeId="12" PostId="882" RevisionGUID="dfb66020-73f7-4722-9fab-fe06f20723b9" CreationDate="2010-07-24T19:01:30.003" UserId="353" Text="[{&quot;Id&quot;:353,&quot;DisplayName&quot;:&quot;Sean James&quot;}]" />
  <row Id="2702" PostHistoryTypeId="13" PostId="882" RevisionGUID="1efb16dd-1e8e-4d03-93ae-5f15a511d8ed" CreationDate="2010-07-24T19:02:05.320" UserId="353" Text="[{&quot;Id&quot;:353,&quot;DisplayName&quot;:&quot;Sean James&quot;}]" />
  <row Id="2703" PostHistoryTypeId="2" PostId="1481" RevisionGUID="a944bea8-e55a-43c8-baf8-1dc7e9c7b487" CreationDate="2010-07-24T19:17:33.990" UserId="204" Text="As Kaj mentioned a 3d modeled HUD is a good solution because it can scale. It also has the benefits of allowing you to 'shake' the player by moving the camera position around slightly (think of a car crashing and the drivers head slamming forward -- you can give the player some of this effect with just a few frames of movement)." />
  <row Id="2704" PostHistoryTypeId="2" PostId="1482" RevisionGUID="809a8a97-1eee-49a8-b26a-c08327393282" CreationDate="2010-07-24T19:19:32.843" UserId="734" Text="Both Unity and XNA are fine choices, but if you have a passion for learning things (as you imply you do), maybe you'd enjoy using [OpenTK][1]. It's an up-to-date .NET wrapper for the OpenGL API + input + window creation functions.&#xD;&#xA;&#xD;&#xA;Dealing with OpenGL directly is as low-level as it gets, and, in my opinion, a very rewarding learning experience. I started out learning OpenGL, then moved to higher-level tools (such as Unity). Having direct experience with a graphics API can help you understand what's happening &quot;behind-the-scenes&quot; and be &quot;more at home&quot; when using a higher level tool/framework.&#xD;&#xA;&#xD;&#xA;Alternatively, you may wish to start learning, using [SlimDX][2], which is a DirectX wrapper. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opentk.com&#xD;&#xA;  [2]: http://slimdx.org" />
  <row Id="2705" PostHistoryTypeId="5" PostId="1441" RevisionGUID="cbff5236-aa04-46ed-a298-549f64003477" CreationDate="2010-07-24T19:31:35.610" UserId="353" Comment="corrected spelling" Text="One of my hobbies (aside programming, of course) is 3d modeling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modeling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modeling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modeling characters)  &#xD;&#xA;**3)** What knowledge should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development environment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existing 3D models (not a must, but a plus, if it's .3DS, a HUGE plus)  &#xD;&#xA; - Had the ability to create 3d models programmatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more UI-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [weighted companion cube][5], and I want to make a full-screen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room) drawn maybe through code (not an imported model)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="2706" PostHistoryTypeId="2" PostId="1483" RevisionGUID="2a443b1a-5d33-48c8-845c-1f3225df153f" CreationDate="2010-07-24T20:02:45.423" UserId="788" Text="It's not uncommon to have tools that will take your 3D models and render them out for your game.  Many studios and indie devs write up their own tools to do it and makes generating the graphics super easy. It's also nice to be able to go in make a change to your model and then just hit a button in your tool to quickly re-render all the raster graphics." />
  <row Id="2707" PostHistoryTypeId="2" PostId="1484" RevisionGUID="f6e24462-999e-49db-9f47-c309b4fab584" CreationDate="2010-07-24T20:13:33.213" UserId="162" Text="If you're making a PC game you may want to consider giving the player control over UI scaling themselves. For instance most MMOs allow the user to add a UI scale to make everything bigger. This is because the dpi of a PC's display can differ heavily from person to person. Some players like everything to be tiny, but many other players will be physically unable to read the text at that scale. If your HUD can be deconstructed as multiple &quot;windows&quot; you can probably scale each window seperately, while attaching it to the correct point on the screen (bottom middle, upper left, etc)." />
  <row Id="2708" PostHistoryTypeId="2" PostId="1485" RevisionGUID="997f9001-7529-4405-a734-733ce59b28c6" CreationDate="2010-07-24T20:23:21.210" UserId="469" Text="I have two related questions:&#xD;&#xA;&#xD;&#xA;What are the tools you use to make icons? (valid for all platforms)&#xD;&#xA;&#xD;&#xA;What are the standard sizes and file formats you use? (valid for all platforms too)" />
  <row Id="2709" PostHistoryTypeId="1" PostId="1485" RevisionGUID="997f9001-7529-4405-a734-733ce59b28c6" CreationDate="2010-07-24T20:23:21.210" UserId="469" Text="Tools to make icon, icon design." />
  <row Id="2710" PostHistoryTypeId="3" PostId="1485" RevisionGUID="997f9001-7529-4405-a734-733ce59b28c6" CreationDate="2010-07-24T20:23:21.210" UserId="469" Text="&lt;graphics&gt;&lt;tools&gt;" />
  <row Id="2711" PostHistoryTypeId="2" PostId="1486" RevisionGUID="2ba964c4-83f3-4f53-a2ca-65d5e5146900" CreationDate="2010-07-24T21:04:04.623" UserId="312" Text="I use Photoshop to make the icons, and export as PNG. Icons are typically 48x48 or 32x32 in Windows, 16x16 for the title bar/favicon, and 256x256 for Macintosh dock. I use IcoFX to convert to .ico" />
  <row Id="2712" PostHistoryTypeId="2" PostId="1487" RevisionGUID="40f62a37-e874-44cc-b26d-d4d5c3e4e6ad" CreationDate="2010-07-24T21:06:51.353" UserId="162" Text="[The Gimp][1] is a nice, free alternative to Photoshop, and I've used it to make various icons. It should be able to natively save .ico files.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gimp.org/" />
  <row Id="2713" PostHistoryTypeId="2" PostId="1488" RevisionGUID="05e07a7e-ff22-486e-86b7-fd6d83eaabaf" CreationDate="2010-07-24T21:41:52.263" UserId="395" Text="+1 for IcoFX, makes it super easy to convert PNGs to Windows and Mac icons. It can also do editing, but there isn't much reason to use it over Photoshop or GIMP. Make your files 256x256 (512x512 wouldn't hurt though) to start with, IcoFX will resample for you and do the color space conversion. Since IcoFX only runs on Windows, you can use Icon Composer on OS X (it comes with XCode). Both tools can produce both Windows' ICO and Mac's ICNS format." />
  <row Id="2714" PostHistoryTypeId="2" PostId="1489" RevisionGUID="c52720ae-1a1d-4316-a549-b2bf11182266" CreationDate="2010-07-24T21:52:27.880" UserDisplayName="thyrgle" Text="I am developing an iPhone game. There is a fountain that the user should not be able to walk through. Now, this question is about checking circle-point collision or anything like that. I am checking collision with `CGRectIntersectsRect(character1.frame, fountain.frame)`. &#xD;&#xA;&#xD;&#xA;But, here is the problem: If I prevent the person from moving; he will never be able to move. So, I tried combatting this with following:&#xD;&#xA;&#xD;&#xA;		if (character.center.y &gt; fountain.center.y &amp;&amp; CGRectIntersectsRect(character1.frame, fountain.frame) &amp;&amp; g == false) {&#xD;&#xA;			g = true;&#xD;&#xA;			character1.center = CGPointMake(character1.center.x, character1.center.y-0.1);&#xD;&#xA;		}&#xD;&#xA;		if (character.center.x &gt; fountain.center.x &amp;&amp; CGRectIntersectsRect(character1.frame, fountain.frame)) {&#xD;&#xA;			character1.center = CGPointMake(character1.center.x-0.1, character1.center.y);&#xD;&#xA;		}&#xD;&#xA;		if (character.center.y &lt; fountain.center.y &amp;&amp; CGRectIntersectsRect(character1.frame, fountain.frame)) {&#xD;&#xA;			character1.center = CGPointMake(character1.center.x, character1.center.y+0.1);&#xD;&#xA;		}&#xD;&#xA;		if (character.center.x &lt; fountain.center.x &amp;&amp; CGRectIntersectsRect(character1.frame, fountain.frame)) {&#xD;&#xA;			character1.center = CGPointMake(character1.center.x+0.1, character1.center.y);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;This should check what side the character1 is intersecting the fountain and then make it so it is not intersecting the fountain by incrementing or decrementing the x or y coordinates of the characters it. But, this still gives weird results. It will move it diagonally across the fountain if keep holding down on the the top side of the fountain and also, it will keep moving it left other wise on the top of the fountain." />
  <row Id="2715" PostHistoryTypeId="1" PostId="1489" RevisionGUID="c52720ae-1a1d-4316-a549-b2bf11182266" CreationDate="2010-07-24T21:52:27.880" UserDisplayName="thyrgle" Text="How to allow character to keep moving after it hits a wall." />
  <row Id="2716" PostHistoryTypeId="3" PostId="1489" RevisionGUID="c52720ae-1a1d-4316-a549-b2bf11182266" CreationDate="2010-07-24T21:52:27.880" UserDisplayName="thyrgle" Text="&lt;iphone&gt;&lt;collision-detection&gt;" />
  <row Id="2717" PostHistoryTypeId="2" PostId="1490" RevisionGUID="24b01c92-8913-457e-874c-61fc642e237d" CreationDate="2010-07-24T21:55:22.747" UserId="148" Text="Just to throw more resources out there, check out [RaphaelJS][rjs]. It's a very nice SVG drawing and animation library that has a nice API. Don't forget to check out the demos.&#xD;&#xA;&#xD;&#xA;Overall, I'd recommend `&lt;canvas&gt;` tags over straight DOM manipulation (e.g. making each sprite its own `&lt;div&gt;` to make hit-testing amazingly simple). It's easy to get DOM manipulation wrong and badly performant, whereas traditional 2d development strategies work well on an HTML canvas. &#xD;&#xA;&#xD;&#xA; [rjs]: http://raphaeljs.com/" />
  <row Id="2718" PostHistoryTypeId="2" PostId="1491" RevisionGUID="63caf5aa-f873-4717-b8a7-91db616dafb6" CreationDate="2010-07-24T22:00:45.353" UserId="395" Text="Speaking generally, the way this is handled is by moving you backwards along the collision normal. You find the axis the collision took place on (normal is a physics term, just think of it as the vector indicating the direction you penetrated the other object. Then you figure out how far you have to move back on that vector to no longer be colliding. See http://gpwiki.org/index.php/Polygon_Collision for more information." />
  <row Id="2719" PostHistoryTypeId="6" PostId="1489" RevisionGUID="b01b193b-39fb-4ab3-b0c5-7e8f9344a9be" CreationDate="2010-07-24T22:07:33.303" UserId="395" Comment="edited tags" Text="&lt;iphone&gt;&lt;algorithm&gt;&lt;collision-detection&gt;" />
  <row Id="2720" PostHistoryTypeId="2" PostId="1492" RevisionGUID="72c90f59-dfe8-42a5-896a-36394d22977b" CreationDate="2010-07-24T22:58:20.600" UserId="562" Text="I would check for the collision before the character is moved to the new position. So that when you update the position of the character you know that it's valid." />
  <row Id="2721" PostHistoryTypeId="2" PostId="1493" RevisionGUID="05aa9412-107f-4830-891b-f3228d4555f3" CreationDate="2010-07-24T23:17:15.310" UserId="562" Text="There are great free online tools to convert so you don't have to install anything. &#xD;&#xA;&#xD;&#xA;- http://converticon.com/&#xD;&#xA;- http://convertico.com/&#xD;&#xA;&#xD;&#xA;Icons are usually square with the following sizes: &#xD;&#xA;&#xD;&#xA;- 8x8, 16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256, 512x512&#xD;&#xA;&#xD;&#xA;On the iPhone the game icon would be: &#xD;&#xA;&#xD;&#xA; - 57x57 - iPhone icon&#xD;&#xA; - 72x72 - iPad icon&#xD;&#xA; - 114x114 - 2x for iPhone4&#xD;&#xA; - 512x512 - app store icon&#xD;&#xA;&#xD;&#xA;[Windows Standard Icons Guide][1]&#xD;&#xA;&#xD;&#xA;[Windows Icon Design Guide][2]&#xD;&#xA;&#xD;&#xA; - Use 32x32 pixel for content area icons; 16x16 pixel for footnote area icons.&#xD;&#xA;In-place	&#xD;&#xA; - Use 32x32 pixel for error pages; 16x16 pixel icons for all others.&#xD;&#xA;&#xD;&#xA;[OSX Icon Guidelines][3]&#xD;&#xA;&#xD;&#xA; - A 128 x 128 pixel image (for Finder icons in all versions of Mac OS X)&#xD;&#xA; - A 512 x 512 pixel image (for Finder icons in Mac OS X v10.5 and later)&#xD;&#xA; - A mask that defines the image’s edges so that the operating system can determine which regions are clickable&#xD;&#xA;&#xD;&#xA;[Win vs. OSX Icon Specs (slightly outdated)][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/aa511277.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/aa511280.aspx&#xD;&#xA;  [3]: http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIcons/XHIGIcons.html&#xD;&#xA;  [4]: http://www.axialis.com/tutorials/tutorial-windowsmacicons.html" />
  <row Id="2722" PostHistoryTypeId="2" PostId="1494" RevisionGUID="83c53041-13ef-44cb-9c08-e46bfb8d9863" CreationDate="2010-07-25T00:19:35.413" UserId="120" Text="i personally use [paint .net][1] and [icon plugin][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.getpaint.net/download.html&#xD;&#xA;  [2]: http://www.evanolds.com/IcoCur.zip" />
  <row Id="2723" PostHistoryTypeId="2" PostId="1495" RevisionGUID="7efc27fb-6516-40e2-b6cf-92932a275323" CreationDate="2010-07-25T03:14:35.320" UserId="263" Text="Something that will help when designing your HUDs is to use normalized screen coordinates rather than pixel coordinates. If you use pixels, you need to account for all the possible resolutions you want to support... no fun.&#xD;&#xA;&#xD;&#xA;Instead, choose and origin (say, the bottom left of the screen) and call it &lt;0, 0&gt;. The top left of the screen would be &lt;0, 1&gt; and the top right would be &amp;lt;x, 1&gt;, where x is dependent on the aspect ratio. For example, at 1680x1050 the aspect ratio is 16:10 so x would be 1.6.&#xD;&#xA;&#xD;&#xA;Now you can design your UIs in normalized screen coordinates and they won't be stretched/skewed when the aspect ratio changes, and they'll scale perfectly regardless of the resolution. The only adjustments you might have to make are for 3 or 4 aspect rations (4:3, 5:4, 16:10, and 16:9 probably). You can even alleviate that by allowing things to be anchored to the right hand side of the screen." />
  <row Id="2724" PostHistoryTypeId="2" PostId="1496" RevisionGUID="5b75205f-3dd4-4518-879d-8cf27b294975" CreationDate="2010-07-25T04:25:21.790" UserId="932" Text="I'm using the Box2D physics engine. And there's a type of shape for box2D called b2PolygonShape.&#xD;&#xA;&#xD;&#xA;In this class, you can create polygons. There is also a Set() function that takes an array of points and a vertex count.&#xD;&#xA;&#xD;&#xA;Box2D has an example like this: &#xD;&#xA;&#xD;&#xA;    // This defines a triangle in CCW order.&#xD;&#xA;    &#xD;&#xA;    b2Vec2 vertices[3];&#xD;&#xA;    &#xD;&#xA;    vertices[0].Set(0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;    vertices[1].Set(1.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;    vertices[2].Set(0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    int32 count = 3;&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;    &#xD;&#xA;    b2PolygonShape polygon;&#xD;&#xA;    &#xD;&#xA;    polygon.Set(vertices, count);&#xD;&#xA;&#xD;&#xA;This works. Yet when I tried to practice and mess with this function, I did this:&#xD;&#xA;&#xD;&#xA;      b2Vec2 vertices[4];&#xD;&#xA;    &#xD;&#xA;      vertices[0].Set(0, 0);&#xD;&#xA;      vertices[1].Set(0,10);&#xD;&#xA;      vertices[2].Set(10,10);&#xD;&#xA;      vertices[3].Set(10,0);&#xD;&#xA;    &#xD;&#xA;      int32 count = 4;&#xD;&#xA;    &#xD;&#xA;      b2PolygonShape polygon;&#xD;&#xA;    &#xD;&#xA;      polygon.Set(vertices, count);&#xD;&#xA;&#xD;&#xA;When I compiled and ran this, it crashed after the Set() function. Wouldn't this create a square?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also in the console I got this:&#xD;&#xA;&#xD;&#xA;    Assertion failed: s &gt; 0.0f&#xD;&#xA;&#xD;&#xA;What did I do wrong?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2725" PostHistoryTypeId="1" PostId="1496" RevisionGUID="5b75205f-3dd4-4518-879d-8cf27b294975" CreationDate="2010-07-25T04:25:21.790" UserId="932" Text="Using The Box2D Polygon &quot;Set()&quot; function?" />
  <row Id="2726" PostHistoryTypeId="3" PostId="1496" RevisionGUID="5b75205f-3dd4-4518-879d-8cf27b294975" CreationDate="2010-07-25T04:25:21.790" UserId="932" Text="&lt;2d&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="2727" PostHistoryTypeId="2" PostId="1497" RevisionGUID="be9dc10a-32d8-4d95-9048-44166e3dcac8" CreationDate="2010-07-25T04:30:47.963" UserId="1009" Text="&#xD;&#xA;Where can I find good (well organized) examples of game code? I'm hoping that I can pick up some organizational tips. Most examples in books are too short and leave out lots of detail for the sake of brevity. I'm particularly interested on how to group your variables and methods so that another programmer would know where to look in the code. For example initializers at the top, then methods that take input, then methods that update views.&#xD;&#xA;&#xD;&#xA;I don't care about a particular language, as long as its OOP. I looked at the Quake 2 and 3 sources, but they're straight C and not much help for getting tips on organizing your objects.&#xD;&#xA;&#xD;&#xA;So, have you seen some good source? Any pointers to code that makes you say &quot;wow, that's well organized&quot; would be great. " />
  <row Id="2728" PostHistoryTypeId="1" PostId="1497" RevisionGUID="be9dc10a-32d8-4d95-9048-44166e3dcac8" CreationDate="2010-07-25T04:30:47.963" UserId="1009" Text="Where can I find good (well organized) examples of game code?" />
  <row Id="2729" PostHistoryTypeId="3" PostId="1497" RevisionGUID="be9dc10a-32d8-4d95-9048-44166e3dcac8" CreationDate="2010-07-25T04:30:47.963" UserId="1009" Text="&lt;architecture&gt;&lt;open-source&gt;&lt;language-agnostic&gt;" />
  <row Id="2730" PostHistoryTypeId="5" PostId="1448" RevisionGUID="55cacb70-ec2a-4444-aaaa-3184444c3130" CreationDate="2010-07-25T04:35:17.087" UserId="43" Comment="added 4 characters in body" Text="If you do not want to precompute or have artist created breakaways, I suggest getting or writing a physics engine that uses a [Finite Element Method][1] system. Examples of this are a video of [a spaceship being deformed][2] by asteroids and the physics in the commercial game The Force Unleashed, which both use [DMM][3]. I am uncertain when AMD [will release][4] their free DMM2 and Bullet physics package. &#xD;&#xA;&#xD;&#xA;Also, I don't know how DMM2 interacts with XNA.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_element&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9sQl5Ro0f6k&amp;NR=1&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Digital_Molecular_Matter&#xD;&#xA;  [4]: http://www.amd.com/us/press-releases/Pages/amd-ecosystem-2010mar8.aspx" />
  <row Id="2731" PostHistoryTypeId="2" PostId="1498" RevisionGUID="648b6a1f-31fe-4c0c-a7a7-c6602c75daf0" CreationDate="2010-07-25T04:45:43.860" UserId="1009" Text="Here's an example of how to implement the NSCoding protocol for some example &quot;map&quot; and &quot;player&quot; classes:&#xD;&#xA;&#xD;&#xA;http://deadpanic.com/howtosave&#xD;&#xA;&#xD;&#xA;Then you can save the objects using Dennis' NSKeyedArchiver method." />
  <row Id="2732" PostHistoryTypeId="16" PostId="1498" RevisionGUID="648b6a1f-31fe-4c0c-a7a7-c6602c75daf0" CreationDate="2010-07-25T04:45:43.860" UserId="-1" />
  <row Id="2733" PostHistoryTypeId="2" PostId="1499" RevisionGUID="5a58f56b-a4b6-4fd9-906b-63b5a770f47d" CreationDate="2010-07-25T04:46:05.467" UserId="783" Text="That's because the four vertices you provided are in clockwise order and Box2D assumes they're  in counter-clockwise, like in your first example. So it should work fine if you change it to:&#xD;&#xA;&#xD;&#xA;      b2Vec2 vertices[4];&#xD;&#xA;    &#xD;&#xA;      vertices[0].Set(0, 0);&#xD;&#xA;      vertices[1].Set(10,0);&#xD;&#xA;      vertices[2].Set(10,10);&#xD;&#xA;      vertices[3].Set(0,10);&#xD;&#xA;    &#xD;&#xA;      int32 count = 4;&#xD;&#xA;    &#xD;&#xA;      b2PolygonShape polygon;&#xD;&#xA;    &#xD;&#xA;      polygon.Set(vertices, count);&#xD;&#xA;&#xD;&#xA;And by the way, if you're just creating a box-shaped polygon, you can use the convenience function &#xD;&#xA;&#xD;&#xA;    void b2PolygonShape::SetAsBox(float32 hx, float32 hy, const b2Vec2&amp; center, float32 angle)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2734" PostHistoryTypeId="2" PostId="1500" RevisionGUID="e8c611e3-8229-4933-a944-209cc4a5e479" CreationDate="2010-07-25T04:52:21.683" UserId="1009" Text="I've made a few games, and am getting faster and better organized each time. I'm well out of the &quot;just make it work&quot; phase and working on methodology and readability. I need some tips on code organization though.&#xD;&#xA;&#xD;&#xA;I don't mean patterns - I'm having great success with MVC - but the organization of methods inside the classes themselves. I've noticed that methods in my state models can usually be grouped into four categories: (1)constructor/destructor, (2)data access (3)actions (4)events.&#xD;&#xA;&#xD;&#xA;My controllers usually have c/d and input methods. My views usually have c/d, view updaters, and event listeners.&#xD;&#xA;&#xD;&#xA;I feel like I'm reinventing the wheel though; someone must have spelled out &quot;these are the common types of methods&quot; somewhere before, right? Storage has Create, Read, Update and Delete (CRUD), so what are the equivalents for objects?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2735" PostHistoryTypeId="1" PostId="1500" RevisionGUID="e8c611e3-8229-4933-a944-209cc4a5e479" CreationDate="2010-07-25T04:52:21.683" UserId="1009" Text="What are standard methods for organizing game code? Grouping by standard &quot;kinds&quot; of methods?" />
  <row Id="2736" PostHistoryTypeId="3" PostId="1500" RevisionGUID="e8c611e3-8229-4933-a944-209cc4a5e479" CreationDate="2010-07-25T04:52:21.683" UserId="1009" Text="&lt;best-practices&gt;&lt;language-agnostic&gt;&lt;methodology&gt;" />
  <row Id="2737" PostHistoryTypeId="2" PostId="1501" RevisionGUID="37450e0c-a674-4d33-9e72-17adb755ab2d" CreationDate="2010-07-25T05:22:00.030" UserId="1009" Text="I've found that trying to maintain even 20 FPS with UIKit is difficult when you have more than 10-15 moving objects. Adding and removing UIviews is also slow, and keeping the necessary uncompressed UIImages in memory is expensive.&#xD;&#xA;&#xD;&#xA;Probably good for puzzle or board games, but go with Cocos2d for anything with more moving parts." />
  <row Id="2738" PostHistoryTypeId="2" PostId="1502" RevisionGUID="412c91a5-3271-4e2b-b05a-c93e90a22710" CreationDate="2010-07-25T06:06:51.353" UserId="160" Text="I'm pretty meticulous about my code, so you might find my [in-progress roguelike Amaranth](http://bitbucket.org/munificent/amaranth/src) useful to skim over." />
  <row Id="2741" PostHistoryTypeId="2" PostId="1505" RevisionGUID="0784a752-3a0e-4213-bdd9-1308411af2d4" CreationDate="2010-07-25T06:57:33.747" UserId="370" Text="I'm asking about a very small domain.  One-off extension scripts.  IE, defining a new weapon for scorched earth.&#xD;&#xA;&#xD;&#xA;When providing and API for small extension I've seen two approaches.&#xD;&#xA;&#xD;&#xA;The API exposes classes that the extender then subclasses, overriding the needed methods.&#xD;&#xA;&#xD;&#xA;    --# weapons/flame_missile.lua&#xD;&#xA;&#xD;&#xA;    --#extender pulls in a predefined weapon base class&#xD;&#xA;    require &quot;weapon.missile&quot;&#xD;&#xA;    &#xD;&#xA;    --# luabind syntax for classes&#xD;&#xA;    class &quot;flame_missile&quot; (missile)&#xD;&#xA;    &#xD;&#xA;    function flame_missile:__init()&#xD;&#xA;       self.hotness = 10&#xD;&#xA;       self:set_cost(42)&#xD;&#xA;    end&#xD;&#xA;    &#xD;&#xA;    function flame_missile:on_hit( who )&#xD;&#xA;       who:take_damage(self.hotness)&#xD;&#xA;       who:ignite()&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;In the other approach the api just exposes accessors and sandboxes the script, re-executing the file with each new missile and using the globals as the instance's state.&#xD;&#xA;&#xD;&#xA;    --# weapons/flame_missile.lua&#xD;&#xA;    hotness = 10&#xD;&#xA;    cost = 42&#xD;&#xA;    &#xD;&#xA;    --# extender just knows that an on_hit function will be called&#xD;&#xA;    --# when the missile hits something.&#xD;&#xA;    function on_hit( who )&#xD;&#xA;       who:take_damage(hotness)&#xD;&#xA;       who:ignite()&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;*NOTE*: in my example `who`'s api is *OO*.  I'm not interested in whether *OO* should be used in the extension API.  I'm more interested if *OO* should be used to incorporate user extensions into the game.&#xD;&#xA;&#xD;&#xA;The first one feels more C++-y.  So I'm a little more comfortable with from a software engineering standpoint.  However,  one-off scripts don't need to fit together into a larger architecture.  Further, they could be written by less proficient coders, so all the fancy *OO* might be lost on them.&#xD;&#xA;&#xD;&#xA;I really like how concise the sandbox approach is.  But it's a little limiting (only one missile per file, inheriting behavior from another weapon is no longer possible.  I'd really like to define my extension api like this but I'm a little wary as it's a radical departure from classic C++ programming style.&#xD;&#xA;&#xD;&#xA;Which method do you prefer?  &#xD;&#xA;Have you had any bad experiences with one or the other?  &#xD;&#xA;Is there an even better way to elegantly incorporate extensions into the game?&#xD;&#xA;" />
  <row Id="2742" PostHistoryTypeId="1" PostId="1505" RevisionGUID="0784a752-3a0e-4213-bdd9-1308411af2d4" CreationDate="2010-07-25T06:57:33.747" UserId="370" Text="Use of classes for lua extensions" />
  <row Id="2743" PostHistoryTypeId="3" PostId="1505" RevisionGUID="0784a752-3a0e-4213-bdd9-1308411af2d4" CreationDate="2010-07-25T06:57:33.747" UserId="370" Text="&lt;best-practices&gt;&lt;lua&gt;&lt;scripting&gt;&lt;extension&gt;" />
  <row Id="2744" PostHistoryTypeId="2" PostId="1506" RevisionGUID="4bcc109e-7a72-4cb1-916e-6238a32b017c" CreationDate="2010-07-25T06:58:29.890" UserId="582" Text="Sometimes you'll see people recommend that rather than using graphics/sound files/etc. like this...&#xD;&#xA;&#xD;&#xA;    // Game code&#xD;&#xA;    Image myImage = new Image(&quot;path/to/image.png&quot;);&#xD;&#xA;&#xD;&#xA;... you should use a _manifest_ file as a level of indirection instead:&#xD;&#xA;&#xD;&#xA;    // Manifest file&#xD;&#xA;    MY_IMAGE: path/to/image.png&#xD;&#xA;&#xD;&#xA;    // Game code&#xD;&#xA;    Manifest myManifest = new Manifest(&quot;path/to/manifest&quot;);&#xD;&#xA;    Image myImage = myManifest.getImage(&quot;MY_IMAGE&quot;);&#xD;&#xA;&#xD;&#xA;What reasons would I have of taking this sort of approach? If I'm not using a compiled language, would there still be reasons to do this?" />
  <row Id="2745" PostHistoryTypeId="1" PostId="1506" RevisionGUID="4bcc109e-7a72-4cb1-916e-6238a32b017c" CreationDate="2010-07-25T06:58:29.890" UserId="582" Text="Why use asset manifest files?" />
  <row Id="2746" PostHistoryTypeId="3" PostId="1506" RevisionGUID="4bcc109e-7a72-4cb1-916e-6238a32b017c" CreationDate="2010-07-25T06:58:29.890" UserId="582" Text="&lt;game-design&gt;&lt;assets&gt;&lt;resources&gt;" />
  <row Id="2747" PostHistoryTypeId="2" PostId="1507" RevisionGUID="e72b40b2-3d5f-4548-ac33-008d6e9b7195" CreationDate="2010-07-25T07:29:26.423" UserId="214" Text="This isn't language agnostic but things like stylecop help a bit here. It's not very helpful contextually, but at least everything is in a known place (Things like Public Properties after constructors, protected methods after public ones, etc.)." />
  <row Id="2748" PostHistoryTypeId="2" PostId="1508" RevisionGUID="6c6ec161-4696-48f9-b434-f1bfc799002b" CreationDate="2010-07-25T07:38:18.523" UserId="162" Text="Most of the time manifest files are associated with some sort of archive file format. For instance, a JAR file in java is simply a zip file with a manifest file that lists the assets within the zip file, and where to find them. In that case the &quot;path/to/image.png&quot; is not a real filesystem path but is instead information on how to find the object inside a compressed archive. In addition to the disk space advantage of compression, using a file archive can improve performance because windows has a very difficult time dealing with tens of thousands of individual files in a small number of directories.&#xD;&#xA;&#xD;&#xA;By using a manifest file of this sort you can completely abstract where a given chunk of data is coming from. Maybe your file is on a DVD, or streamed off the internet, or inside a zip file. You'll have to write some additional code to deal with these cases, but by using a manifest file your game logic doesn't have to care at all where something is loaded from.&#xD;&#xA;&#xD;&#xA;Now, if you're using a non-compiled language this manifest file could certainly be a C# source file, but it's nice if you can easily modify what manifest file you are using at client execution time based on a registry setting or something similar. For instance, you could check during execution to see if a on-hard-drive cache exists, or if only the DVD is available. You could then switch which manifest to use depending on the available setup." />
  <row Id="2750" PostHistoryTypeId="2" PostId="1510" RevisionGUID="6c2a64cf-95b4-48ef-9e21-4883c58f2aaa" CreationDate="2010-07-25T08:00:23.040" UserId="497" Text="This varies widely between projects from my experience.  My biggest rule is to keep your code consistent.  If you choose a particular style, make sure all the code follows that style.&#xD;&#xA;&#xD;&#xA;As for a &quot;CRUD&quot; equivalent, I haven't seen one, although I like the idea of trying to come up with a unified model for this." />
  <row Id="2751" PostHistoryTypeId="2" PostId="1511" RevisionGUID="cf9ba423-dc32-46c6-abe9-61667c93eab9" CreationDate="2010-07-25T08:05:16.663" UserId="539" Text="I have source code to libraries and full games on my site [Another Early Morning](http://anotherearlymorning.com) you can also find some projects on my [GitHub page](http://github.com/aschearer). Not all of it is a shining example of quality, but then that tends to happen when you want to ship something." />
  <row Id="2752" PostHistoryTypeId="2" PostId="1512" RevisionGUID="1d91ee4b-d7af-4cd3-bb5f-5d9e05cbf3a4" CreationDate="2010-07-25T13:35:37.150" UserId="465" Text="Most shadow systems I have seen use a unified shader system for shadowing techniques, resulting in an uber shader for the projects.&#xD;&#xA;&#xD;&#xA;What alternatives do you find work well or is the unified shader the best approach?" />
  <row Id="2753" PostHistoryTypeId="1" PostId="1512" RevisionGUID="1d91ee4b-d7af-4cd3-bb5f-5d9e05cbf3a4" CreationDate="2010-07-25T13:35:37.150" UserId="465" Text="What is a good alternative to Unified Shader for Shadows?" />
  <row Id="2754" PostHistoryTypeId="3" PostId="1512" RevisionGUID="1d91ee4b-d7af-4cd3-bb5f-5d9e05cbf3a4" CreationDate="2010-07-25T13:35:37.150" UserId="465" Text="&lt;graphics&gt;&lt;best-practices&gt;&lt;shaders&gt;" />
  <row Id="2755" PostHistoryTypeId="2" PostId="1513" RevisionGUID="91a5245c-c0b4-4cd5-9c3f-05c33bfa797c" CreationDate="2010-07-25T14:25:55.500" UserId="204" Text="Several commercial games have had their source code released. Some of the games are [listed here][1]. There's no guarantee that the code in these is well organized, but by looking at some source code from games that were commercially successful you might get a good idea what works in practice.&#xD;&#xA;&#xD;&#xA;Also, while not a game, [OpenSceneGraph][2] has many of the components of a game and is well architected in C++, using different design patterns, plug-ins, etc. It's a big enough code base and has been around long enough that you can learn a lot from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_open-source_video_games&#xD;&#xA;  [2]: http://www.openscenegraph.org/projects/osg" />
  <row Id="2756" PostHistoryTypeId="5" PostId="1228" RevisionGUID="a1cf4088-8afc-4e4b-9bff-189c0e6e7354" CreationDate="2010-07-25T14:44:46.673" UserId="389" Comment="added 112 characters in body" Text="I'd like to make an isometric run-jump style platformer. The player should be able to jump on top of platforms above the floor, hit the side of objects etc.   I'll be using a 2d game engine so I wouldn't like to emulate full 3d collision for dimensions I'm not using.  I'm thinking objects in the game should be placed using: x, y, width, height, and z for depth. Using those values, how should I detect collisions?&#xD;&#xA;" />
  <row Id="2757" PostHistoryTypeId="2" PostId="1514" RevisionGUID="4d06cac2-db0f-469e-9b70-fba89602ce1e" CreationDate="2010-07-25T14:49:01.653" UserId="548" Text="When I download a video game from the publisher's website, it typically needs to update itself several times before I can play it. Why can't the developer simply put the patched version of the game up for download? I assume there must be are technical problems with this, but what are they?" />
  <row Id="2758" PostHistoryTypeId="1" PostId="1514" RevisionGUID="4d06cac2-db0f-469e-9b70-fba89602ce1e" CreationDate="2010-07-25T14:49:01.653" UserId="548" Text="Why do most games require you to patch them after downloading, instead of rolling the patches into the installer?" />
  <row Id="2759" PostHistoryTypeId="3" PostId="1514" RevisionGUID="4d06cac2-db0f-469e-9b70-fba89602ce1e" CreationDate="2010-07-25T14:49:01.653" UserId="548" Text="&lt;distribution&gt;" />
  <row Id="2760" PostHistoryTypeId="2" PostId="1515" RevisionGUID="0ee887d2-b1c6-41b9-bd42-84b7066d1367" CreationDate="2010-07-25T15:02:27.240" UserId="274" Text="Googling around I find this demo: http://planetskill.com/iso/&#xD;&#xA;&#xD;&#xA;&gt; WASD to move. Space bar to jump&#xD;&#xA;&#xD;&#xA;It only implements collision with the up/down axis but adding the other collision should be easy:&#xD;&#xA;&#xD;&#xA;If the up/down position of the next step is higher than your max just don't move.&#xD;&#xA;This should also let you implement jumping in a easy way.&#xD;&#xA;&#xD;&#xA;Sample code here: http://gist.github.com/478997&#xD;&#xA;" />
  <row Id="2761" PostHistoryTypeId="2" PostId="1516" RevisionGUID="5b59ec8a-f52e-4d80-96d3-4089e9008f2c" CreationDate="2010-07-25T15:09:56.393" UserId="251" Text="As with colin's answer, b2World.Query() is a useful function, if you set the aabb to cover only a single point then you can get a list of objects that *may* overlap that point. However, due to speed concerns it only checks the bounding box (AABB) for an overlap which is not always entirely accurate. &#xD;&#xA;&#xD;&#xA;To check a fixture (shape, in older versions) accurately, use the b2Fixture.TestPoint() function. As a body can have multiple fixtures, you may need to loop through the entire list to be sure. Combining those 2 functions should allow you to recreate the functionality of Phun, if you like." />
  <row Id="2762" PostHistoryTypeId="2" PostId="1517" RevisionGUID="e1098be0-c8bf-4f9c-8bcb-cb1139351e45" CreationDate="2010-07-25T15:21:23.790" UserId="34" Text="A few reasons that I can think of off the top of my head -- I'm sure others will have reasons as well.&#xD;&#xA;&#xD;&#xA;1. They have to distribute patches for the existing users no matter what.  By doing it this way, they minimize the amount of work they have to do on their end.&#xD;&#xA;&#xD;&#xA;2. Building new complete distributions takes a lot of time -- especially QA time.  They would have to make sure the new build didn't have any bugs in it, essentially repeating what testing they are doing with the patch build.&#xD;&#xA;&#xD;&#xA;3. If they did a complete version, they would have to deal with people downloading the complete game again instead of the patch, which would mean more bandwidth usage.  Perhaps they have mirror sites -- if the game is large, they would potentially have a bunch of mirrors downloading the new content just because it's new.  Patch files are typically smaller, so the burden of having a bunch of mirrors download them is smaller." />
  <row Id="2763" PostHistoryTypeId="2" PostId="1518" RevisionGUID="bb1c3e4c-90e4-4ae7-ad02-3dbce1f1635f" CreationDate="2010-07-25T15:24:28.317" UserId="34" Text="In addition to the other answers, it also makes your code a little more separated from your assets.  You could, for example, allow an artist to work directly with the manifest files without having to have a programmer make the change and make a new build.  All it would take is changing the manifest file to point to a new image and simply running the game again." />
  <row Id="2764" PostHistoryTypeId="2" PostId="1519" RevisionGUID="6561e095-efa1-47ef-9644-5b6c9faa14f3" CreationDate="2010-07-25T15:27:22.047" UserId="370" Text="Manifest files provide a layer of indirection between the resource name and its location.  Ofter extra layers of indirection is just a sign of over design.  However, sometimes that extra layer is just whats needed to build an elegant and efficient solution.&#xD;&#xA;&#xD;&#xA;Here is a simple concrete example where resource name / location separation helped me.  While in development my art assets are in revision control with source code.  It's very convenient and allows me to iterate quickly.  Usually the resource name reflects it's location.  The development manifest is very straight forward.&#xD;&#xA;&#xD;&#xA;I don't want to distribute a game with the assets scattered around.  So when I'm ready to distribute it I can easily zip up my assets into a resource file and build a new manifest.&#xD;&#xA;&#xD;&#xA;Also texture atlases are a great way to wring a bit more performance out of the graphics system.  Atlases are fast but they're a pain to work with while the art is still under development.  My solution is to only build the atlas at the end when I'm optimizing the game.  Since I'm using manifests all I need to do is update the manifest to point to an atlas location and voilà the game is now using atlases instead of straight files." />
  <row Id="2765" PostHistoryTypeId="2" PostId="1520" RevisionGUID="22c7839b-1ba4-4ed3-96b5-a1cb8ca6cd82" CreationDate="2010-07-25T15:33:33.347" UserId="567" Text="Most online games suffer for this problem and there are some software companies out there to cover this but recently from what i've seen most companies are trying to avoid those programs creating their own system but it is a very difficult case to prevent such ...&#xD;&#xA;&#xD;&#xA;**What sort of protection do you guys use in order to (try to) prevent such acts:**&#xD;&#xA;&#xD;&#xA; 1. **Anti-cheat Software ?** (please state which and why)&#xD;&#xA; 2. **Your own code ?** (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...)&#xD;&#xA; 3. **None, i dont care ?** (any personal reason or input you did like to share ?)&#xD;&#xA;&#xD;&#xA;Any interesting piece of code related to the issue you would like to post ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Feel free to rework my text my english inst that great, should i mark this a community wiki ? **Could some one kindly create the anti-cheat tag or protection or one tag that fits this the best ?**&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2766" PostHistoryTypeId="1" PostId="1520" RevisionGUID="22c7839b-1ba4-4ed3-96b5-a1cb8ca6cd82" CreationDate="2010-07-25T15:33:33.347" UserId="567" Text="Anti-Cheat programs ? custom codes ?" />
  <row Id="2767" PostHistoryTypeId="3" PostId="1520" RevisionGUID="22c7839b-1ba4-4ed3-96b5-a1cb8ca6cd82" CreationDate="2010-07-25T15:33:33.347" UserId="567" Text="&lt;subjective&gt;&lt;mmo&gt;" />
  <row Id="2768" PostHistoryTypeId="2" PostId="1521" RevisionGUID="1f55ad8c-ff2e-4aea-b879-4610234fe48f" CreationDate="2010-07-25T15:34:52.440" UserId="1021" Text="I'm interested in some performance tweaks for a relatively simple OpenGL ES based 2D iPhone game.  What performance tweaks have you found?  The performance of the game is pretty good on most devices (3G, 2nd gen touch, and iPhone 4)... But I still want to give the user the best experience possible.&#xD;&#xA;&#xD;&#xA;p.s. I'm still using OpenGL ES 1.1" />
  <row Id="2769" PostHistoryTypeId="1" PostId="1521" RevisionGUID="1f55ad8c-ff2e-4aea-b879-4610234fe48f" CreationDate="2010-07-25T15:34:52.440" UserId="1021" Text="What are some low-level performance tweaks for iPhone games written in c?" />
  <row Id="2770" PostHistoryTypeId="3" PostId="1521" RevisionGUID="1f55ad8c-ff2e-4aea-b879-4610234fe48f" CreationDate="2010-07-25T15:34:52.440" UserId="1021" Text="&lt;iphone&gt;&lt;opengl&gt;&lt;performance&gt;" />
  <row Id="2771" PostHistoryTypeId="5" PostId="1514" RevisionGUID="48d56a1d-7a13-499e-aaa6-87d9e7feb2f2" CreationDate="2010-07-25T16:00:59.503" UserId="548" Comment="deleted 4 characters in body" Text="When I download a video game from the publisher's website, it typically needs to update itself several times before I can play it. Why can't the developer simply put the patched version of the game up for download? I assume there must be technical problems with this, but what are they?" />
  <row Id="2772" PostHistoryTypeId="6" PostId="1520" RevisionGUID="9584b692-8a40-48be-9d94-34c6e95494a8" CreationDate="2010-07-25T16:22:27.223" UserId="14" Comment="edited tags" Text="&lt;subjective&gt;&lt;mmo&gt;&lt;anti-cheat&gt;" />
  <row Id="2773" PostHistoryTypeId="2" PostId="1522" RevisionGUID="23330865-6114-4e12-8bde-c27186793b8d" CreationDate="2010-07-25T16:24:32.200" UserId="865" Text="What I found very interesting, and never mentioned to anyone, was that I noticed a speed difference (on the rendering side of things) when rendering my sprites and tiles 90 degrees rotated. I can't remember whether it was faster portrait or landscape. &#xD;&#xA;You'd have to rotate all your graphics for correct usage of course, but the phenomenon itself was interesting. Must be a memory organization/cache access issue.&#xD;&#xA;This was doing 4 layers of parallax on a 2G.&#xD;&#xA;I found this the biggest win, as there was ample time to run a game in the background (on a 2G you're locked to 30fps pretty much anyhow imo).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2774" PostHistoryTypeId="2" PostId="1523" RevisionGUID="33b43e36-c493-48b8-a6cb-37a832278e9d" CreationDate="2010-07-25T16:27:49.527" UserId="865" Text="There's also the issue of people having to change settings to get a game to work (on PC) and the installwr might obliterate though. To make the installer fully 're-entrant' where it leaves the right stuff intact yet cleans up the traces it should clean up imposes even more QA and user support risk.&#xD;&#xA;Plus indeed, bandwidth and user annoyance." />
  <row Id="2775" PostHistoryTypeId="2" PostId="1524" RevisionGUID="f276e2f7-38e7-4f8e-98ea-7f525af227df" CreationDate="2010-07-25T16:35:29.990" UserId="312" Text="I am working on a 2D tile-based game, and right now I'm trying to get a 2d equivalent to shadow volumes to work. I'm having trouble finding the surfaces that should cast shadows. From any point in the game, I need to find either the unoccluded faces, or the whole tile.&#xD;&#xA;&#xD;&#xA;My question is, is how can I find these tiles/edges as fast as possible given a point?&#xD;&#xA;&#xD;&#xA;![example][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://imgur.com/ia5xU.png" />
  <row Id="2776" PostHistoryTypeId="1" PostId="1524" RevisionGUID="f276e2f7-38e7-4f8e-98ea-7f525af227df" CreationDate="2010-07-25T16:35:29.990" UserId="312" Text="Finding unoccluded tiles in tile-based game." />
  <row Id="2777" PostHistoryTypeId="3" PostId="1524" RevisionGUID="f276e2f7-38e7-4f8e-98ea-7f525af227df" CreationDate="2010-07-25T16:35:29.990" UserId="312" Text="&lt;2d&gt;&lt;tiles&gt;" />
  <row Id="2778" PostHistoryTypeId="2" PostId="1525" RevisionGUID="ad457e3f-a9cf-4eb1-8a61-537337567f26" CreationDate="2010-07-25T16:37:03.593" UserId="783" Text="Some low-level things that might help:&#xD;&#xA;&#xD;&#xA; - Turn &quot;thumb mode&quot; off. This is especially important if you have lots of floating-point operations, like most games do.&#xD;&#xA; - Use CADisplayLink to drive your loop&#xD;&#xA; - If you're using a lot of floating point math, consider using the vector floating point processor or the new intrinsics library.&#xD;&#xA;&#xD;&#xA;And of course, profile your game with Instruments and Shark to narrow down where the performance bottlenecks are.&#xD;&#xA;&#xD;&#xA;Check out [my presentation from last year's GDC Austin][1] for more details on iPhone performance optimizations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/gdc-austin-2009-squeezing-every-drop-of-performance-out-of-the-iphone" />
  <row Id="2779" PostHistoryTypeId="2" PostId="1526" RevisionGUID="26477adc-e1a5-47a2-a666-6acddcbed63d" CreationDate="2010-07-25T16:41:38.017" UserId="865" Text="I'm not sure what platform you're on, but I can't really think of any platform that wouldn't be fast enough to just grow a circle around your lightcasting entities (unless there's a lot of em) and detect whether the tile about to be 'plotted' in your circle algorithm is a solid tile and thus lightblocking. From there on it would be slightly trickier as you'd have to keep track of circle segments that are occluded or not, but it would be what I would do.&#xD;&#xA;Another option would be to cast rays in a circle (again pretty fast) in tile resolution space and stop each ray as it hits a solid tile.&#xD;&#xA; " />
  <row Id="2780" PostHistoryTypeId="2" PostId="1527" RevisionGUID="65eb039e-6a93-408b-a976-7844d83e8a1b" CreationDate="2010-07-25T16:45:16.093" UserId="51" Text="There's a lot of work done towards that problem in the roguelike community.&#xD;&#xA;&#xD;&#xA;Here's a page that lists some algorithms and libraries that might help you.  http://roguebasin.roguelikedevelopment.org/index.php?title=Field_of_Vision&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2781" PostHistoryTypeId="4" PostId="1520" RevisionGUID="96966e02-ac30-4f61-8773-de1d43341507" CreationDate="2010-07-25T16:51:16.257" UserId="567" Comment="edited title" Text="Anti-Cheat for MMOs issues and solutions ?" />
  <row Id="2782" PostHistoryTypeId="2" PostId="1528" RevisionGUID="149962ba-9b03-490d-a9cd-901e78f2efda" CreationDate="2010-07-25T17:14:39.963" UserId="567" Text="i would like to start this topic for programs to counter-attack [link text][1].&#xD;&#xA;&#xD;&#xA;I am not aware of a big list but with everyone's help i hope to make this a fine topic.&#xD;&#xA;&#xD;&#xA;Posting format:&#xD;&#xA;&#xD;&#xA;**NAME:** nProtect GameGuard&#xD;&#xA;&#xD;&#xA;**Website:** http://global.nprotect.com/product/gg.php&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Protect the users' PC from fast&#xD;&#xA;   evolving hacking technologies and&#xD;&#xA;   viruses.&#xD;&#xA; - Real-time protection, diagnose&#xD;&#xA;   various patterns latest hacking tools&#xD;&#xA;   that can harm games, but also memory&#xD;&#xA;   debugging prevention technology will&#xD;&#xA;   be applied, completely blocking&#xD;&#xA;   hacking tools through real-time&#xD;&#xA;   hacking tool monitoring and blocking&#xD;&#xA;   function.&#xD;&#xA; - Blocks hacking attacks through memory&#xD;&#xA;   scan&#xD;&#xA; - Blocks online outflow of personal&#xD;&#xA;   information&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Cheating_in_online_games &quot;cheating in online games&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**NAME:** xTrap&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.wiselogic.co.kr/product4.htm&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA;unhappyly i can't read korean and i havent found much information regarding this one but i've seen quiet an amount of games using it." />
  <row Id="2783" PostHistoryTypeId="1" PostId="1528" RevisionGUID="149962ba-9b03-490d-a9cd-901e78f2efda" CreationDate="2010-07-25T17:14:39.963" UserId="567" Text="List of known game security solutions to protect games from hacks ?" />
  <row Id="2784" PostHistoryTypeId="3" PostId="1528" RevisionGUID="149962ba-9b03-490d-a9cd-901e78f2efda" CreationDate="2010-07-25T17:14:39.963" UserId="567" Text="&lt;mmo&gt;&lt;anti-cheat&gt;" />
  <row Id="2785" PostHistoryTypeId="16" PostId="1528" RevisionGUID="149962ba-9b03-490d-a9cd-901e78f2efda" CreationDate="2010-07-25T17:14:39.963" UserId="567" />
  <row Id="2786" PostHistoryTypeId="5" PostId="1520" RevisionGUID="32ccbecd-3646-4986-807e-489ce6ae4ab5" CreationDate="2010-07-25T17:16:21.647" UserId="567" Comment="more links and content change the text and will be changing a lil more to make it more adequated" Text="Most online games suffer for this problem and there are some [software companies][1] out there to cover this but recently from what i've seen most companies are trying to avoid those programs creating their own system (blizzard with warden, aion with their own checking, etc...) but it is a very difficult case to prevent such ...&#xD;&#xA;&#xD;&#xA;**What sort of protection do you guys use in order to (try to) prevent such acts:**&#xD;&#xA;&#xD;&#xA; 1. **Anti-cheat Software ?** (please state which and why)&#xD;&#xA; 2. **Your own code ?** (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...)&#xD;&#xA; 3. **None, i dont care ?** (any personal reason or input you did like to share ?)&#xD;&#xA;&#xD;&#xA;Any interesting piece of code related to the issue you would like to post ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Feel free to rework my text my english inst that great, should i mark this a community wiki ? **Could some one kindly create the anti-cheat tag or protection or one tag that fits this the best ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1528/list-of-known-game-security-solutions-to-protect-games-from-hacks" />
  <row Id="2787" PostHistoryTypeId="2" PostId="1529" RevisionGUID="8ceea22f-7d86-44fe-bcae-2f48bba91320" CreationDate="2010-07-25T17:20:18.100" UserId="353" Text="Unfortunately it's really hard to stop people from cheating, which is why software like Punkbuster was created to try to catch some of them.&#xD;&#xA;&#xD;&#xA;For an MMO, the biggest thing you can do is to just **not trust anything the client sends you**. The client should not be able to tell you where the player has moved to, how much damage they have dealt to whom, etc. Instead, you should send control input to the server, validate that it is practical (pressing the &quot;attack&quot; button 1000 times in 1 second, for example, is not valid), then update the simulation on the server. You would then send the relevant parts of the new state of the game back to the client.&#xD;&#xA;&#xD;&#xA;While you are validating user input, it is also possible to look for trends in their input. If you don't allow macros, you could catch them here by noticing that the user has clicked the same button at the exact same pixel coordinates in perfect 1 second intervals for the last 30 minutes.&#xD;&#xA;&#xD;&#xA;The client itself is the main place people can cheat, so programs like Punkbuster can cut down on wallhacks, aimbots, etc. Other than that, not trusting the client and validating anything sent to you by the client will help cut down on cheating." />
  <row Id="2788" PostHistoryTypeId="5" PostId="1520" RevisionGUID="b4cb4f21-f17e-409a-9a44-3c67553a23bb" CreationDate="2010-07-25T17:21:28.753" UserId="567" Comment="similar but different (explained on the 2nd phrase)" Text="Most online games suffer for this problem and there are some [software companies][1] out there to cover this but recently from what i've seen most companies are trying to avoid those programs creating their own system (blizzard with warden, aion with their own checking, etc...) but it is a very difficult case to prevent such ...&#xD;&#xA;&#xD;&#xA;Just wanted to say i made another question topic as community wiki specific for posting applications and it is features and the ideas behind THIS question here is not to list those those but instead to know more about what were your attempts, issues along the road and possible solutions, piece of codes if application and so forth.&#xD;&#xA;&#xD;&#xA;**What sort of protection do you guys use in order to (try to) prevent such acts:**&#xD;&#xA;&#xD;&#xA; 1. **Anti-cheat Software ?** (please state which and why)&#xD;&#xA; 2. **Your own code ?** (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...)&#xD;&#xA; 3. **None, i dont care ?** (any personal reason or input you did like to share ?)&#xD;&#xA;&#xD;&#xA;Any interesting piece of code related to the issue you would like to post ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Feel free to rework my text my english inst that great, should i mark this a community wiki ? **Could some one kindly create the anti-cheat tag or protection or one tag that fits this the best ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1528/list-of-known-game-security-solutions-to-protect-games-from-hacks" />
  <row Id="2789" PostHistoryTypeId="5" PostId="1528" RevisionGUID="7dde99fe-5642-4a24-a151-0cca8cbeea5a" CreationDate="2010-07-25T17:24:43.210" UserId="567" Comment="game type field" Text="i would like to start this topic for programs to counter-attack [link text][1].&#xD;&#xA;&#xD;&#xA;I am not aware of a big list but with everyone's help i hope to make this a fine topic.&#xD;&#xA;&#xD;&#xA;Posting format:&#xD;&#xA;&#xD;&#xA;**NAME:** nProtect GameGuard&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any online game&#xD;&#xA;&#xD;&#xA;**Website:** http://global.nprotect.com/product/gg.php&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Protect the users' PC from fast&#xD;&#xA;   evolving hacking technologies and&#xD;&#xA;   viruses.&#xD;&#xA; - Real-time protection, diagnose&#xD;&#xA;   various patterns latest hacking tools&#xD;&#xA;   that can harm games, but also memory&#xD;&#xA;   debugging prevention technology will&#xD;&#xA;   be applied, completely blocking&#xD;&#xA;   hacking tools through real-time&#xD;&#xA;   hacking tool monitoring and blocking&#xD;&#xA;   function.&#xD;&#xA; - Blocks hacking attacks through memory&#xD;&#xA;   scan&#xD;&#xA; - Blocks online outflow of personal&#xD;&#xA;   information&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Cheating_in_online_games &quot;cheating in online games&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**NAME:** xTrap&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any online game&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.wiselogic.co.kr/product4.htm&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA;unhappyly i can't read korean and i havent found much information regarding this one but i've seen quiet an amount of games using it." />
  <row Id="2790" PostHistoryTypeId="2" PostId="1530" RevisionGUID="786fea2b-2128-4f66-980f-1ec0e5f65411" CreationDate="2010-07-25T17:30:06.133" UserId="1021" Text="I'm fairly new to anything OpenGL in general.  I've made an OpenGL ES 1.1 based 2D iPhone game by working from sample code.  I'm under the impression that OpenGL ES 2.0 is substantially different from 1.1.  So what does updating 1.1 code to 2.0 entail?&#xD;&#xA;&#xD;&#xA;I'm accustomed to the kinda basic drawing pattern of &quot;push matrix, translate, rotate, draw 2D texture, pop matrix&quot;.  What's the &quot;equivalent&quot; in 2.0?" />
  <row Id="2791" PostHistoryTypeId="1" PostId="1530" RevisionGUID="786fea2b-2128-4f66-980f-1ec0e5f65411" CreationDate="2010-07-25T17:30:06.133" UserId="1021" Text="Updating OpenGL ES 1.1 based iPhone game to use Open GL ES 2.0" />
  <row Id="2792" PostHistoryTypeId="3" PostId="1530" RevisionGUID="786fea2b-2128-4f66-980f-1ec0e5f65411" CreationDate="2010-07-25T17:30:06.133" UserId="1021" Text="&lt;iphone&gt;&lt;opengl&gt;" />
  <row Id="2793" PostHistoryTypeId="4" PostId="1528" RevisionGUID="0787b614-1fcb-48df-8cb1-d0139bf4b673" CreationDate="2010-07-25T17:33:26.050" UserId="567" Comment="change the big and ugly title; edited title" Text="List of known Anti-Cheat solutions for MMOs ?" />
  <row Id="2794" PostHistoryTypeId="16" PostId="758" RevisionGUID="6366e445-2dcf-4908-9872-78c1f4bc2eda" CreationDate="2010-07-25T17:39:56.803" UserId="353" />
  <row Id="2795" PostHistoryTypeId="16" PostId="1520" RevisionGUID="acacf620-8ee9-43ea-8c5b-30313e8a3ceb" CreationDate="2010-07-25T17:46:20.490" UserId="567" />
  <row Id="2796" PostHistoryTypeId="5" PostId="1520" RevisionGUID="acacf620-8ee9-43ea-8c5b-30313e8a3ceb" CreationDate="2010-07-25T17:46:20.490" UserId="567" Comment="changed the content, removed the tag request, marked as community wiki" Text="Most online games suffer for this problem and there are some [software companies][1] out there to cover this but recently from what i've seen most companies are trying to avoid those programs creating their own system (blizzard with warden, aion with their own checking, etc...) but it is a very difficult case to prevent such ...&#xD;&#xA;&#xD;&#xA;Just wanted to say i made another question topic as community wiki specific for posting applications and it is features and the ideas behind THIS question here is not to list those but instead to know more about what were your attempts, issues along the road and possible solutions, piece of codes if application and so forth.&#xD;&#xA;&#xD;&#xA;**What sort of protection do you guys use in order to (try to) prevent such acts:**&#xD;&#xA;&#xD;&#xA; 1. **Anti-cheat Software ?** (please state which and why)&#xD;&#xA; 2. **Your own code ?** (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...)&#xD;&#xA; 3. **None, i dont care ?** (any personal reason or input you did like to share ?)&#xD;&#xA;&#xD;&#xA;Any interesting piece of code related to the issue you would like to post ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Feel free to rework my text my english inst that great  ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1528/list-of-known-game-security-solutions-to-protect-games-from-hacks" />
  <row Id="2797" PostHistoryTypeId="5" PostId="1500" RevisionGUID="80bf9b52-60bc-4a92-9815-77a4fbf5b82d" CreationDate="2010-07-25T17:46:45.653" UserId="1009" Comment="add some links I found" Text="I've made a few games, and am getting faster and better organized each time. I'm well out of the &quot;just make it work&quot; phase and working on methodology and readability. I need some tips on code organization though.&#xD;&#xA;&#xD;&#xA;I don't mean patterns - I'm having great success with MVC - but the organization of methods inside the classes themselves. I've noticed that methods in my state models can usually be grouped into four categories: (1)constructor/destructor, (2)data access (3)actions (4)events.&#xD;&#xA;&#xD;&#xA;My controllers usually have c/d and input methods. My views usually have c/d, view updaters, and event listeners.&#xD;&#xA;&#xD;&#xA;I feel like I'm reinventing the wheel though; someone must have spelled out &quot;these are the common types of methods&quot; somewhere before, right? Storage has Create, Read, Update and Delete (CRUD), so what are the equivalents for objects?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Found some cocoa-specific advice here:&#xD;&#xA;http://www.mactech.com/articles/mactech/Vol.21/21.07/StyleForCocoa/&#xD;&#xA;&#xD;&#xA;and some generic advice here:&#xD;&#xA;http://stackoverflow.com/questions/73045/whats-the-best-way-to-organize-code/73081#73081&#xD;&#xA;&#xD;&#xA;I'm going to use that as a foundation, modified for game-specific stuff. More info still appreciated if you have any." />
  <row Id="2798" PostHistoryTypeId="5" PostId="1528" RevisionGUID="619c5ef0-cbc5-49ec-b9e1-5a07016aeebd" CreationDate="2010-07-25T17:47:51.173" UserId="567" Comment="deleted 281 characters in body" Text="i would like to start this topic for programs to counter-attack [link text][1].&#xD;&#xA;&#xD;&#xA;I am not aware of a big list but with everyone's help i hope to make this a fine topic.&#xD;&#xA;&#xD;&#xA;Posting format:&#xD;&#xA;&#xD;&#xA;**NAME:** nProtect GameGuard&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any online game&#xD;&#xA;&#xD;&#xA;**Website:** http://global.nprotect.com/product/gg.php&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Protect the users' PC from fast&#xD;&#xA;   evolving hacking technologies and&#xD;&#xA;   viruses.&#xD;&#xA; - Real-time protection, diagnose&#xD;&#xA;   various patterns latest hacking tools&#xD;&#xA;   that can harm games, but also memory&#xD;&#xA;   debugging prevention technology will&#xD;&#xA;   be applied, completely blocking&#xD;&#xA;   hacking tools through real-time&#xD;&#xA;   hacking tool monitoring and blocking&#xD;&#xA;   function.&#xD;&#xA; - Blocks hacking attacks through memory&#xD;&#xA;   scan&#xD;&#xA; - Blocks online outflow of personal&#xD;&#xA;   information&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Cheating_in_online_games &quot;cheating in online games&quot;" />
  <row Id="2799" PostHistoryTypeId="2" PostId="1531" RevisionGUID="3df9ae81-834f-4fab-a26e-3cc23453788f" CreationDate="2010-07-25T17:48:00.673" UserId="567" Text="**NAME:** xTrap&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any online game&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.wiselogic.co.kr/product4.htm&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA;unhappyly i can't read korean and i havent found much information regarding this one but i've seen quiet an amount of games using it." />
  <row Id="2800" PostHistoryTypeId="16" PostId="1531" RevisionGUID="3df9ae81-834f-4fab-a26e-3cc23453788f" CreationDate="2010-07-25T17:48:00.673" UserId="-1" />
  <row Id="2801" PostHistoryTypeId="2" PostId="1532" RevisionGUID="09a75221-2dc1-4ab4-b82c-02f5b5a928e6" CreationDate="2010-07-25T17:49:13.543" UserId="1026" Text="I'm assuming your question is about shadow map-based techniques.&#xD;&#xA;&#xD;&#xA;Generally choosing uber shaders is a higher-level decision than shadows, so shadows usually follow whatever method engine uses for rendering.&#xD;&#xA;&#xD;&#xA;For example, you might choose using deferred rendering which requires far less permutations than traditional approach, then applying shadows will be added once to the deferred light shader and rendering shadomwap will be essentially the same path that generates G-Buffers.&#xD;&#xA;&#xD;&#xA;Another thing I think I heard people considered is to just generate shadowmaps on SPUs without any shaders.&#xD;&#xA;&#xD;&#xA;So decide on your method for rendering the scene and use it for shadows as well.&#xD;&#xA;" />
  <row Id="2802" PostHistoryTypeId="6" PostId="1530" RevisionGUID="533e4513-9877-4e11-96c7-16dd9b880322" CreationDate="2010-07-25T18:17:06.713" UserId="35" Comment="edited tags" Text="&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="2803" PostHistoryTypeId="5" PostId="1520" RevisionGUID="f36d802e-085e-4eb0-a58d-95152cc7419a" CreationDate="2010-07-25T18:20:59.220" UserId="567" Comment="more information @ question 1" Text="Most online games suffer for this problem and there are some [software companies][1] out there to cover this but recently from what i've seen most companies are trying to avoid those programs creating their own system (blizzard with warden, aion with their own checking, etc...) but it is a very difficult case to prevent such ...&#xD;&#xA;&#xD;&#xA;Just wanted to say i made another question topic as community wiki specific for posting applications and it is features and the ideas behind THIS question here is not to list those but instead to know more about what were your attempts, issues along the road and possible solutions, piece of codes if application and so forth.&#xD;&#xA;&#xD;&#xA;**What sort of protection do you guys use in order to (try to) prevent such acts:**&#xD;&#xA;&#xD;&#xA; 1. **Anti-cheat Software ?** (please state which, why and possible problems you faced, for example aion stopped using GameGuard at beta stage due to a huge amount of compatibility problems and complains from their users)&#xD;&#xA; 2. **Your own code ?** (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...)&#xD;&#xA; 3. **None, i dont care ?** (any personal reason or input you did like to share ?)&#xD;&#xA;&#xD;&#xA;Any interesting piece of code related to the issue you would like to post ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Feel free to rework my text my english inst that great  ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1528/list-of-known-game-security-solutions-to-protect-games-from-hacks" />
  <row Id="2804" PostHistoryTypeId="2" PostId="1533" RevisionGUID="6afe695e-170a-48a3-98bc-c5cde52d3757" CreationDate="2010-07-25T18:57:43.967" UserId="783" Text="OpenGL ES 2.0 is *very* different thank ES 1.1. You don't have a fixed-function pipeline anymore, so your faimilar &quot;push matrix, translate, rotate&quot;, etc are all gone.&#xD;&#xA;&#xD;&#xA;Instead you have the concept of shaders: vertex and frament. They're little programs that get executed for each vertex and each pixel. That's where all the transformation and other effects happen. Your code will prepare the vertex data, tell OpenGL how it's structured, and hand it over to the shaders.&#xD;&#xA;&#xD;&#xA;But not all is lost: Some parts of OpenGL haven't changed, like setting different states (blending modes, depth comparisons) or creating textures.&#xD;&#xA;&#xD;&#xA;To use OpenGL ES 2.0 effectively you need to master the basics of 3D computer graphics, so get a good intro book and learn the principles. Then you can move on to OpenGL ES 2.0 and start writing shaders. [This is a good OpenGL ES 2.0 book][1].&#xD;&#xA;&#xD;&#xA;Finally, don't assume you *have* to move to OpenGL ES 2.0. Unless there's something specific you need that you can't do in ES 1.1, you can continue using ES 1.1 because newer devices are all backwards compatible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-ES-2-0-Programming-Guide/dp/0321502795" />
  <row Id="2805" PostHistoryTypeId="2" PostId="1534" RevisionGUID="0e7d3590-7973-46b2-96cd-eafe676b81bb" CreationDate="2010-07-25T19:04:04.203" UserId="783" Text="This is not a complete answer, but hopefully it will help.&#xD;&#xA;&#xD;&#xA;Is your map/tile set static or dynamic? If it's static, I would *strongly* encourage you to do offline processing and precompute as much as you can that way. You can do it in any way you want (raycasting or something smarter), but you don't really care about making very fast because it will all happen offline while you &quot;bake&quot; your levels. You can either precompute exactly which tiles are visible from each spot, or create some kind of larger regions and all the tiles potentially visible from each region.&#xD;&#xA;&#xD;&#xA;Then, at runtime, the query for the visible tiles should be very straightforward and very fast.&#xD;&#xA;&#xD;&#xA;Of course, if you're having dynamically created levels, then this doesn't apply at all :-)" />
  <row Id="2806" PostHistoryTypeId="2" PostId="1535" RevisionGUID="8544885d-5e68-4b4e-b244-7c0db14bca01" CreationDate="2010-07-25T20:39:01.250" UserId="1032" Text="Assuming all important work in your game is occuring server-side, there should be little or no cheating possible. If you want to restrict macroing or make it obnoxious for people to packet-edit, have your program periodically scan for modules active in its process. If you find for instance WpeSpy.dll, you'll know they have WPE attached. Do so for the other common tools. This can be got around, and is an arms-race and a lost cause, _but_ if your game is relatively small, you can very easily cut the number of people screwing around by about a factor of ten... and that may be good enough for you." />
  <row Id="2807" PostHistoryTypeId="16" PostId="1535" RevisionGUID="8544885d-5e68-4b4e-b244-7c0db14bca01" CreationDate="2010-07-25T20:39:01.250" UserId="-1" />
  <row Id="2808" PostHistoryTypeId="4" PostId="1528" RevisionGUID="dae03a37-7d06-414f-a643-bd5a385387ca" CreationDate="2010-07-25T21:01:45.267" UserId="567" Comment="title changed again" Text="List of Anti-Cheat Packages for MMOs ?" />
  <row Id="2809" PostHistoryTypeId="4" PostId="1520" RevisionGUID="6e7835fb-7129-4c9d-a12c-c13be2c83b0d" CreationDate="2010-07-25T21:02:40.317" UserId="567" Comment="title change; edited title" Text="Anti-Cheat for MMOs issues and solutions ?" />
  <row Id="2810" PostHistoryTypeId="2" PostId="1536" RevisionGUID="2e1ca9e7-7da7-4917-a45d-0e9e94d38264" CreationDate="2010-07-25T21:09:04.093" UserId="1035" Text="The book &quot;Real time collision detection&quot; has a section about line/segment collision detection. Example via Google Books: http://ow.ly/2gjQf " />
  <row Id="2811" PostHistoryTypeId="2" PostId="1537" RevisionGUID="1a8fe381-7d5f-41e1-8a3f-b90557684f91" CreationDate="2010-07-25T21:57:47.367" UserId="1032" Text="Just make the call. Do not do request-hp folllowed by query-hp -- if you follow that model you will be in for a world of hurt.&#xD;&#xA;&#xD;&#xA;You might want to have a look at Mono Continuations as well. I think it'd be ideal for NPCs." />
  <row Id="2812" PostHistoryTypeId="2" PostId="1538" RevisionGUID="9e008167-3076-4a12-ab1a-496c265c571a" CreationDate="2010-07-25T22:16:42.080" UserId="202" Text="In the course of the famous Stanford lectures on iPhone development, [Tim Omernick from ngmoco (Youtube link)](http://www.youtube.com/watch?v=VNr5I3ZRecE) presented many ways to optimize opengl for iPhone. The keynote lasts ~30min and I found it very informative." />
  <row Id="2813" PostHistoryTypeId="2" PostId="1539" RevisionGUID="5416ebf6-2d73-4351-a85c-d28ff12eec26" CreationDate="2010-07-25T23:23:55.580" UserId="627" Text="One reason: data driven programming.&#xD;&#xA;&#xD;&#xA;Your code may only want to know it needs a &quot;LightWood&quot; texture and let the resource manager use this key to find the right path to the file. Even further, in scripts, people don't want to remember file paths. They're messy, they can be incorrect. Let the manifest work out where the file is, and let the human work out what material they need by it's name, not the file name.&#xD;&#xA;&#xD;&#xA;    &lt;material name=&quot;wood&quot;&gt;&#xD;&#xA;      &lt;diffuse color=&quot;1,1,1,1&quot;&gt;environment.zip/wood_diffuse.jpg&lt;/diffuse&gt;&#xD;&#xA;      &lt;normals&gt;environment.zip/wood_normals.jpg&lt;/normals&gt;&#xD;&#xA;      &lt;shader&gt;environment.zip/wood.fx&lt;/shader&gt;&#xD;&#xA;      &lt;specular color=&quot;1,1,1,1&quot; power=&quot;0.5&quot; flat=&quot;yes&quot; /&gt;&#xD;&#xA;    &lt;/material&gt;" />
  <row Id="2814" PostHistoryTypeId="2" PostId="1540" RevisionGUID="8bfef848-568e-4c2d-b4d1-330ee3413cee" CreationDate="2010-07-25T23:47:25.993" UserId="1021" Text="I've recently tested an OpenGL ES based 2D game on the iPhone 4.  I've done almost all of the development and testing so far on my 3G device.  The game works fine (except for a few multitasking things) on the new device.  I'd like to replace some of the artwork w/ &quot;better&quot; artwork that takes advantage of the iPhone 4's higher resolution.  How can I do this?&#xD;&#xA;&#xD;&#xA;Is there a flag somewhere that tells the phone to scale up some or all of the image resources?" />
  <row Id="2815" PostHistoryTypeId="1" PostId="1540" RevisionGUID="8bfef848-568e-4c2d-b4d1-330ee3413cee" CreationDate="2010-07-25T23:47:25.993" UserId="1021" Text="How can I take advantage of the iPhone 4's higher resolution screen?" />
  <row Id="2816" PostHistoryTypeId="3" PostId="1540" RevisionGUID="8bfef848-568e-4c2d-b4d1-330ee3413cee" CreationDate="2010-07-25T23:47:25.993" UserId="1021" Text="&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="2817" PostHistoryTypeId="2" PostId="1541" RevisionGUID="1fa76d17-1c9f-44c5-978a-70823195d908" CreationDate="2010-07-26T00:04:09.703" UserId="865" Text="I'll add another few nuggets that I noticed gave me a speed increase on the 2G (I tested a lot of permutations on 2G to know what was feasible).&#xD;&#xA;&#xD;&#xA;- use shorts for indices if you can, or in general, experiment with vertex formats.&#xD;&#xA;- experiment with tile sizes. 16x16 tiles may or may not be faster. CPU overhead differs little, data uploaded is more, but cache might be better utilized. As below, I wish I had my tests handy (and organized)&#xD;&#xA;- use as short a format as you can for texture coordinates. I found it was faster to have shorter format and do the multiplication of the texture coords by the texture matrix.&#xD;&#xA;- Test different screen formats. I don't have my tests at hand anymore (I gave up on iPhone aeons ago), but texture depths and display depths/orientation made for all kinds of different performance stats (logical but still, try it).&#xD;&#xA;&#xD;&#xA;The biggest thing however, make sure your game is framerate independent. I never tested on my 3GS, but on the 2G you *will* get spikes. Even in a very tight, always the same testcase (just scrolling 4 layers), there was a 8ms spike every second or so.&#xD;&#xA;&#xD;&#xA;As for plain C optimizations, the same goes as pretty much anywhere else. Memory layout, avoiding dynamic allocations, avoiding unnecessary branches." />
  <row Id="2818" PostHistoryTypeId="2" PostId="1542" RevisionGUID="310a0166-b60a-4033-9dd4-fd616a4c8a81" CreationDate="2010-07-26T00:16:37.073" UserId="1036" Text="I have the fundamentals of TCP sockets, UDP communication etc, but can't find much on how to apply these to a real time game environment.&#xD;&#xA;&#xD;&#xA;I have a Pong clone, with 4 players, and need to synchronise the paddle positions between the three clients and the server (the server is the fourth player). Currently I use UDP to send real time updates (paddle movements), and TCP for setting up the game lobby etc.&#xD;&#xA;&#xD;&#xA;Is it a BAD THING to be spamming out huge amounts of UDP traffic? Should I look into something like DCCP for its congestion features? Or is this not really a problem with a small scale project like this?&#xD;&#xA;&#xD;&#xA;When should synchronise messages be sent between client/server? Currently the server is spamming out UDP packets with the current game state as fast as it can manage, and clients are spamming out their paddle position back to the server as fast as they can.&#xD;&#xA;Is this the best way to do it? Is there some sort of delay I should add so messages are sent once every X milliseconds, or should I only be sending out messages as events happen? (eg paddle velocity changed due to user input)&#xD;&#xA;&#xD;&#xA;Would it be better to make clients communicate their paddle positions with each other peer to peer?&#xD;&#xA;&#xD;&#xA;I am asking these questions within the context of Pong but am also interested in how these problems would be overcome in other games, or generalised solutions." />
  <row Id="2819" PostHistoryTypeId="1" PostId="1542" RevisionGUID="310a0166-b60a-4033-9dd4-fd616a4c8a81" CreationDate="2010-07-26T00:16:37.073" UserId="1036" Text="Networking Pong Clone" />
  <row Id="2820" PostHistoryTypeId="3" PostId="1542" RevisionGUID="310a0166-b60a-4033-9dd4-fd616a4c8a81" CreationDate="2010-07-26T00:16:37.073" UserId="1036" Text="&lt;game-design&gt;&lt;best-practices&gt;&lt;network&gt;" />
  <row Id="2821" PostHistoryTypeId="2" PostId="1543" RevisionGUID="9261ebc7-f6fe-40d3-8eb7-2521e8924e96" CreationDate="2010-07-26T00:35:09.813" UserId="1032" Text="Do you care about cheating?&#xD;&#xA;&#xD;&#xA;If not, going peer-to-peer will halve your lag, as it's A&lt;-&gt;C instead of A&lt;-&gt;B&lt;-&gt;C.&#xD;&#xA;If so, for fairness in synchronization you may want to make response somewhat laggy for the local player, or what most games do - let the player do whatever locally and then snap back if the server's result diverges from the locally simulated.&#xD;&#xA;&#xD;&#xA;A pong clone is actually a bit tricky, because unlike most games you can't (as a developer) cheat by having one side see a hit and the other not.&#xD;&#xA;&#xD;&#xA;As for something generalized, one technique I've heard of but haven't found necessary (may be for action games though) is to keep actions with their true timestamps (receive time - ping/2), and have the server roll back (snap) if an earlier-time event comes in, and then reapply later actions. That way, everybody is consistent locally unless there is some conflict due to different players' interactions. The only danger is the ability to 'roll back time' if they fake a laggy connection." />
  <row Id="2822" PostHistoryTypeId="2" PostId="1544" RevisionGUID="59d19184-7b6c-4e92-be9b-02dd47489857" CreationDate="2010-07-26T01:29:28.700" UserId="204" Text="Have a configurable update interval (so you can tweak and try 5 packets per second or 20), and each frame see if it's time to send an update. You might be ok with a simple game sending packets for each event, but in a more complex game this isn't practical. Also keep in mind that there is a packet overhead so if you are sending a bunch of small packets you are going to waste bandwidth.&#xD;&#xA;&#xD;&#xA;Each update interval have each client send its paddle position to either the server, or to each client (peer-peer). Have the server also send the ball position and a velocity vector. Each client can run the same screen drawing code as it does in single player so the movement of the ball will be smooth. In multiplayer though you have only the server send the position/velocity updates for the ball at a regular interval (and if you like each time it hits something).&#xD;&#xA;&#xD;&#xA;Have the ball position updates reference a gametime across all clients so you can discard out of order packets and even make the interpolation of the balls position more accurate (you know the position and velocity at a specific time in the past so you can interpolate the new position).&#xD;&#xA;&#xD;&#xA;With this model with a laggy game you might see the ball move backwards at times or jump around a bit. But with a decent connection it should be pretty smooth. " />
  <row Id="2823" PostHistoryTypeId="2" PostId="1545" RevisionGUID="465b7b96-9d7e-4fc1-82e3-f9622f3fde74" CreationDate="2010-07-26T01:32:23.233" UserId="211" Text="Regarding traffic concerns - you want to avoid sending more than 20-30 packets per second per peer. In the general case, if you send smaller, fewer packets, you will experience (slightly) less latency and a lessened chance of dropped packets.&#xD;&#xA;&#xD;&#xA;You definitely don't want to send updates at a speed faster than framerate, as players won't be able to tell the difference -- indeed, if you only send packets 10 times a second and interpolate/extrapolate the results on the receiving end, most players won't notice a difference." />
  <row Id="2824" PostHistoryTypeId="2" PostId="1546" RevisionGUID="0c8d8a64-a4e4-468e-98bd-fad8ec08d073" CreationDate="2010-07-26T02:11:38.273" UserId="211" Text="FWIW, I would consider programming on Xbox 360 in C#/XNA to be a *very* good substitute for &quot;the real deal&quot;.&#xD;&#xA;&#xD;&#xA;Consider:&#xD;&#xA;&#xD;&#xA; - In XNA on 360, you have to deal with garbage collection; specifically, you need to avoid making too many, if any, allocations per-frame. While in C++ on 360, you don't have to deal with garbage collection (unless you're dealing with a scripting language, like Lua), but you *do* still want to avoid making many, if any, allocations per-frame.&#xD;&#xA; - In order to take advantage of much of the 360's processing power, you need to make your code multi-threaded. This is just as true, if not more so, in XNA as it is in C++, due to the desire to make up for Managed code being slightly less performant than C++.&#xD;&#xA; - Aside from a great many helper functions and classes XNA provides, the graphics API in XNA, given that it is based on DirectX, is extremely similar to DirectX/C++ on 360.&#xD;&#xA;&#xD;&#xA;The wonderful thing about XNA is that it allows you to focus less on the technical issues of getting something on the screen, and more on making your game. Simply making a game (any game!), that is relatively bug-free and runs at a decent frame rate -- especially in the limited environment that XNA affords -- will give you a lot of experience, a demo that you can demonstrate, and hopefully, a foot in the door." />
  <row Id="2825" PostHistoryTypeId="2" PostId="1547" RevisionGUID="e539e762-ae3a-4fac-b2b2-7c651ae62cdb" CreationDate="2010-07-26T02:16:25.313" UserId="954" Text="Wondering if the PS3 has a way for game developers to make free / affordable games available to their consumer base?  Is the only way to get your game on the PS3 to go through an approval process which may cost money?" />
  <row Id="2826" PostHistoryTypeId="1" PostId="1547" RevisionGUID="e539e762-ae3a-4fac-b2b2-7c651ae62cdb" CreationDate="2010-07-26T02:16:25.313" UserId="954" Text="Does PS3 have a program similar to the &quot;Xbox 360 Creator Club&quot;?" />
  <row Id="2827" PostHistoryTypeId="3" PostId="1547" RevisionGUID="e539e762-ae3a-4fac-b2b2-7c651ae62cdb" CreationDate="2010-07-26T02:16:25.313" UserId="954" Text="&lt;xbox360&gt;&lt;publishing&gt;&lt;free-to-play&gt;&lt;playstation3&gt;" />
  <row Id="2828" PostHistoryTypeId="2" PostId="1548" RevisionGUID="24ca5aff-4cb2-437f-a634-da3fe6864a7d" CreationDate="2010-07-26T02:20:45.690" UserId="614" Text="I'm interested in making a game that can be distributed on PSN. Any suggestions?" />
  <row Id="2829" PostHistoryTypeId="1" PostId="1548" RevisionGUID="24ca5aff-4cb2-437f-a634-da3fe6864a7d" CreationDate="2010-07-26T02:20:45.690" UserId="614" Text="How to start development for PSN?" />
  <row Id="2830" PostHistoryTypeId="3" PostId="1548" RevisionGUID="24ca5aff-4cb2-437f-a634-da3fe6864a7d" CreationDate="2010-07-26T02:20:45.690" UserId="614" Text="&lt;homebrew&gt;&lt;indie&gt;" />
  <row Id="2831" PostHistoryTypeId="2" PostId="1549" RevisionGUID="75e8093e-f4dd-413c-b54b-93c2fe9e8adb" CreationDate="2010-07-26T02:24:56.820" UserId="614" Text="My brother has taken an interest in making games on the DS (via PALIB). I'm worried that since its a homebrew game and homebrew development on the DS is not officially supported, his programming would go to waste.&#xD;&#xA;&#xD;&#xA;Is there any significant differences in programming via PALIB over Nintendo's official DS SDK?" />
  <row Id="2832" PostHistoryTypeId="1" PostId="1549" RevisionGUID="75e8093e-f4dd-413c-b54b-93c2fe9e8adb" CreationDate="2010-07-26T02:24:56.820" UserId="614" Text="Is there any significant differences in programming via PALIB over Nintendo's official DS SDK?" />
  <row Id="2833" PostHistoryTypeId="3" PostId="1549" RevisionGUID="75e8093e-f4dd-413c-b54b-93c2fe9e8adb" CreationDate="2010-07-26T02:24:56.820" UserId="614" Text="&lt;homebrew&gt;" />
  <row Id="2834" PostHistoryTypeId="6" PostId="1086" RevisionGUID="7815e9f9-4827-43ba-a178-f0bfd41ca838" CreationDate="2010-07-26T02:26:35.740" UserId="614" Comment="edited tags" Text="&lt;c++&gt;&lt;gui&gt;&lt;game-engine&gt;" />
  <row Id="2835" PostHistoryTypeId="2" PostId="1550" RevisionGUID="0fdf375b-de8f-45c5-83c7-2143d1b6c0bb" CreationDate="2010-07-26T02:54:24.533" UserId="370" Text="OpenGL ES 2.0 **is not** a new revision of OpenGL ES 1.1.   Or in other words, OpenGL ES 2.0 is not a better OpenGL ES 1.1.  &#xD;&#xA;*Well no duh, they changed everything.*&#xD;&#xA;&#xD;&#xA;The import of that simple statement is easy to overlook.  Consider:  &#xD;&#xA;OpenGl 2.0 **is** a new revision of OpenGL 1.5.  OpenGL 2.0 **is** a better OpenGL 1.5.&#xD;&#xA;&#xD;&#xA;This means If you're using OpenGl 1.5 and want to maintain forward compatibility you should move to 2.0.&#xD;&#xA;&#xD;&#xA;The same is not true of OpenGL ES.  1.1 was not superseded by 2.0.  They are different standards.  The confusion might have been eliminated if they had been named:&#xD;&#xA;&#xD;&#xA; * OpenGL ES fixed&#xD;&#xA; * OpenGL ES shader&#xD;&#xA;&#xD;&#xA;NOTE: technically this isn't perfectly true.  The reason being, you could implement the 1.0 series with the 2.0 series.  You'd just have to set the fixed pipeline functions as shaders." />
  <row Id="2836" PostHistoryTypeId="2" PostId="1551" RevisionGUID="8bbc689b-c86d-4afa-8e73-81efd2a36305" CreationDate="2010-07-26T02:56:31.690" UserId="954" Text="How do game developers target multiple platforms at once?  For example, Xbox 360, PS3, PC and Linux.  For 2D games, is it possible to also target the iPhone?  I'm be interested in engines used (2D/3D, etc), how the build pipeline is setup and generally how much of the &quot;core code&quot; can be centralized without having to write platform specific code branches.&#xD;&#xA;&#xD;&#xA;Or, if completely separate code trunks are usually maintained for each platform, how are libraries / code reused (in terms of linking and modularization)?" />
  <row Id="2837" PostHistoryTypeId="1" PostId="1551" RevisionGUID="8bbc689b-c86d-4afa-8e73-81efd2a36305" CreationDate="2010-07-26T02:56:31.690" UserId="954" Text="How do game developers target multiple platforms (Xbox 360, PS3, PC and Linux)?" />
  <row Id="2838" PostHistoryTypeId="3" PostId="1551" RevisionGUID="8bbc689b-c86d-4afa-8e73-81efd2a36305" CreationDate="2010-07-26T02:56:31.690" UserId="954" Text="&lt;cross-platform&gt;&lt;xbox360&gt;&lt;pc&gt;&lt;linux&gt;&lt;playstation3&gt;" />
  <row Id="2839" PostHistoryTypeId="2" PostId="1552" RevisionGUID="79427487-9659-4c0b-a02d-486352cb5f92" CreationDate="2010-07-26T03:02:20.130" UserId="587" Text="A way is using a multiplatafom engine such as [Torque][1] or [Unity3D][2]. But I don't think they work on all those plataforms. There's also another way: developing one engine...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torquepowered.com/&#xD;&#xA;  [2]: http://unity3d.com/" />
  <row Id="2840" PostHistoryTypeId="2" PostId="1553" RevisionGUID="582ee538-97f0-403c-84f6-2b9eaa174df4" CreationDate="2010-07-26T03:08:44.937" UserId="162" Text="Well, if his goal is to gain experience working with an embedded platform, I don't see any reason why working on homebrew games would be a waste of skills. Any skills he picks up there will transfer over to any other portable platform, such as working within memory constraints and on odd systems (DS's two screens and 2 processors). I recommend everyone do a bit of embedded device programming at some point, even if you don't do it professionally.&#xD;&#xA;&#xD;&#xA;The DS's life as a commercial system is reaching near it's end so I wouldn't choose now to go into commercial DS development as it is. It's also fairly difficult to acquire an official DS SDK even if you are a semi-professional game developer with published games. As a result I do not have specific information on the DS (Nitro) SDK." />
  <row Id="2841" PostHistoryTypeId="2" PostId="1554" RevisionGUID="1c9c8661-645d-4343-91b6-1724ed61ac6c" CreationDate="2010-07-26T03:19:44.060" UserId="656" Text="Unless you've been employed in a company which is into DS development, there is no way you are able to have access to the official DS SDK. Using PALib is the next best thing for hobby developers to get into DS development. His efforts won't go to waste, the programming skills and experience he will learn upon completing a game is invaluable and will be an excellent addition for his portfolio to be included in his resume." />
  <row Id="2842" PostHistoryTypeId="2" PostId="1555" RevisionGUID="513d9fef-cdd5-4a4f-85c5-20237e649a89" CreationDate="2010-07-26T03:20:08.710" UserId="162" Text="For commercial console game development, setting up a build system to target 360, PC, and PS3 simultaneously is irritating but is not particularly difficult. The 360 dev kit is simply a new a new target for Visual Studio + some tools and uses a very similar compiler to the standard windows MSVC++ compiler. The PS3 uses a GCC compiler back end but plugs easily in to the visual studio front end. For gameplay and general utility code, it should generally be possible to have code that is 99% the same between the 3 platforms. There ARE some incompatibilities between GCC and MSVC++, but luckily if you work those out linux (assuming you use a gcc version close to the PS3 one) will not be too much more trouble on top of that. The last 1% of code that differs you can normally fix with kludgy #defines. You can actually have the same visual studio solution build PS3, 360, and windows builds, so you can have them entirely integrated at that level if you wish.&#xD;&#xA;&#xD;&#xA;Past the basic build steps, the big hurdle is going to be the graphics systems as well as any high performance elements of your game. For these elements you're realistically going to end up writing platform custom code, or using an existing engine. Memory will be a huge issue but that's for another question. A commercial project I worked on was able to get console versions of an originally PC source base up fairly easily, but making them actually perform well was a completely different problem.&#xD;&#xA;&#xD;&#xA;If you wish to integrate iPhone as well you may want to go with some sort of existing engine/middleware solution. The iPhone setup of openGL + objective C doesn't really fit very well with any other platform. That's very much a choice on Apple's part, as they are heavily discouraging the use of interpreted middleware in any iPhone applications." />
  <row Id="2843" PostHistoryTypeId="2" PostId="1556" RevisionGUID="44217d48-3ebd-4a18-8d5f-997b8f1a2c81" CreationDate="2010-07-26T03:41:18.013" UserId="1040" Text="You have to put money down.  Call Sony and ask them about it.  They'll tell you how to hook yourself up with the official developer's kit.  It will cost money.  But of course, you'll make that money in the back end.  So the question really is, how confident are you that you can make something that will end up on PSN for sale?" />
  <row Id="2844" PostHistoryTypeId="2" PostId="1557" RevisionGUID="ab665a2b-c547-41ce-a18e-a2a84248a3ad" CreationDate="2010-07-26T03:45:11.913" UserId="290" Text="Partially as a response to [How do game developers target multiple platforms (Xbox 360, PS3, PC and Linux)?][1] but mainly because there are people on here with published games, should cross platform be the first requirement/feature for a developer trying to break into the business?  I have always been a believer (in a totally procrastinating sort of way) in picking either a 'niche' or 'mass market' platform and porting later if demand justified it.  Cross platform always felt like an artifical barrier to entry.  Why shouldn't we all write iPhone, Windows, or Browser games?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1551/how-do-game-developers-target-multiple-platforms-xbox-360-ps3-pc-and-linux" />
  <row Id="2845" PostHistoryTypeId="1" PostId="1557" RevisionGUID="ab665a2b-c547-41ce-a18e-a2a84248a3ad" CreationDate="2010-07-26T03:45:11.913" UserId="290" Text="Should beginning/indi game developers target multiple platforms initially?" />
  <row Id="2846" PostHistoryTypeId="3" PostId="1557" RevisionGUID="ab665a2b-c547-41ce-a18e-a2a84248a3ad" CreationDate="2010-07-26T03:45:11.913" UserId="290" Text="&lt;best-practices&gt;&lt;architecture&gt;&lt;cross-platform&gt;&lt;indie&gt;" />
  <row Id="2847" PostHistoryTypeId="2" PostId="1558" RevisionGUID="286a0b2a-3528-49c2-9955-092bdb152cb2" CreationDate="2010-07-26T04:28:56.157" UserId="865" Text="It depends on how you look at it. Being developed by different parties there's bound to be differences in library calls and some data structures. Given that they're both addressing the same hardware and thus the same problems there's a lot of overlap too. Switching between library a and b is a lot easier than switching hardware paradigm, so working with PALib is a valuable lesson if you aspire to work for a NDS developer I'd think. &#xD;&#xA;As for being able to use his actual code - well, higher level utility libraries would be fairly portable if set up properly (C is C regardless of platform), lower level code would definitely need a rewrite. &#xD;&#xA;The extent of it I can't comment on - even if I could, I couldn't. NDAs and stuff.&#xD;&#xA;As Ben Ziegler said, getting a NDS licence is no trivial task, although I know it's possible even for very small studios, you'd need some serious history in game development." />
  <row Id="2848" PostHistoryTypeId="2" PostId="1559" RevisionGUID="f2e6695a-0ff7-42c4-9751-51e46854cebf" CreationDate="2010-07-26T04:32:40.990" UserId="865" Text="I strongly believe in write your own but then again I'm very oldskool. Fighting with yet another GUI lib to do just that one thing that you want tends to drive me nuts, added to the fact that most game GUIs are quite trivial so you don't have to go all-out on MDI and super OO design where buttons can have scrollviews that highlight when you happen to hover over a taskbar on the side of a checkbox with draggable thumbs - or something like that. &#xD;&#xA;Different strokes for different folks I guess." />
  <row Id="2849" PostHistoryTypeId="2" PostId="1560" RevisionGUID="673f8394-c7c0-429a-99e9-1730ebdbd431" CreationDate="2010-07-26T04:33:22.160" UserId="395" Text="As mentioned above, getting a real devkit and being setup as a licensed studio can take quite a bit of cash. A better bet might be to learn Unity since Unity3 (which is supposed to be out Real Soon Now) will support PS3. That said, Unity Pro is still not cheap, though they haven't said if the free version will support targeting the PS3 last I looked." />
  <row Id="2850" PostHistoryTypeId="6" PostId="1547" RevisionGUID="028b623c-30b4-4b77-a031-5adaf7e9a5e7" CreationDate="2010-07-26T04:37:59.940" UserId="395" Comment="edited tags" Text="&lt;xbox360&gt;&lt;playstation3&gt;&lt;publishing&gt;&lt;indie&gt;" />
  <row Id="2851" PostHistoryTypeId="2" PostId="1561" RevisionGUID="93a324c6-cd2b-4420-8039-18c762c07f9a" CreationDate="2010-07-26T04:41:45.520" UserId="395" Text="If you somehow have a PS3 that hasn't been updated in a while you could use OtherOS to run some stuff under Linux. The GPU is disabled though, so nothing needing a lot of horsepower unfortunately. " />
  <row Id="2852" PostHistoryTypeId="2" PostId="1562" RevisionGUID="79a597c6-6888-48b5-8e2d-05deacd964c2" CreationDate="2010-07-26T04:43:19.653" UserId="353" Text="No, there is nothing equivalent to XNA on the Xbox 360.&#xD;&#xA;&#xD;&#xA;There is LittleBigPlanet though, depending on how complex your game needs to be ;)" />
  <row Id="2853" PostHistoryTypeId="2" PostId="1563" RevisionGUID="06b2ebe5-7c06-48a6-8386-a7b379b4774f" CreationDate="2010-07-26T04:46:12.240" UserId="353" Text="I would agree with you on this one. If you spend all of your time building a cross platform game, it will never get out the door. I think it's best to try to predict which market it would succeed best in, and built your game to target that marker. If the game does really well, then you should consider porting it to other markets that make sense. If the game doesn't do well, and you think it could do well on another market, you might consider porting it anyway." />
  <row Id="2854" PostHistoryTypeId="2" PostId="1564" RevisionGUID="05f08834-fcec-4c69-9994-71793e2e8cdb" CreationDate="2010-07-26T04:48:07.167" UserId="614" Text="&gt; Should beginning/indi game developers target multiple platforms initially?&#xD;&#xA;&#xD;&#xA;For are a beginner, I would suggest no. &#xD;&#xA;&#xD;&#xA;Worst case scenario is you implement something that *you* thought was cross-platform. Weeks later when you compile on other platforms, you find out that it was broken. You'll either ignore it (gonna get the game working) or go back and revisit that code.&#xD;&#xA;&#xD;&#xA;Having more experience and foresight on what is/not cross-platform is a valuable skill to have if you're going for cross-platform.&#xD;&#xA;&#xD;&#xA;&gt; Why shouldn't we all write iPhone, Windows, or Browser games?&#xD;&#xA;&#xD;&#xA;Complexity increases fast. For every platform you wish to support, you'll have to create one additional code path." />
  <row Id="2855" PostHistoryTypeId="6" PostId="1557" RevisionGUID="e9e1bec3-8e8e-4649-84e9-0a05b617e255" CreationDate="2010-07-26T04:51:28.393" UserId="614" Comment="edited tags" Text="&lt;best-practices&gt;&lt;architecture&gt;&lt;cross-platform&gt;&lt;indie&gt;" />
  <row Id="2856" PostHistoryTypeId="5" PostId="1564" RevisionGUID="dc9b5723-674b-4000-b214-ec800590155b" CreationDate="2010-07-26T04:53:23.947" UserId="614" Comment="deleted 70 characters in body" Text="&gt; Should beginning/indi game developers target multiple platforms initially?&#xD;&#xA;&#xD;&#xA;For a beginner, I would suggest no. A beginner wouldn't have any idea what is and is not cross-platform.&#xD;&#xA;&#xD;&#xA;Worst case scenario is you implement something that *you* thought was cross-platform. Weeks later when you compile on other platforms, you find out that it was broken. You'll either ignore it (gonna get the game working) or go back and revisit that code.&#xD;&#xA;&#xD;&#xA;&gt; Why shouldn't we all write iPhone, Windows, or Browser games?&#xD;&#xA;&#xD;&#xA;Complexity increases fast. For every platform you wish to support, you'll have to create one additional code path." />
  <row Id="2857" PostHistoryTypeId="2" PostId="1565" RevisionGUID="5a1d0419-a6ed-4fe2-a084-d180e93925c8" CreationDate="2010-07-26T05:18:42.267" UserDisplayName="jkuner" Text="As far as getting good quantitative info, if you have the development time, add as much logging as can be analyzed. &#xD;&#xA;&#xD;&#xA; - What % of your beta testers ever came back? &#xD;&#xA; - How long was their (longest, average) play session?&#xD;&#xA; - Where did they stop playing (what was the last action logged)&#xD;&#xA; - What % of people encountered the new content?&#xD;&#xA;&#xD;&#xA;etc&#xD;&#xA;&#xD;&#xA;As far as data collection, ([http://docs.google.com][1]) has a pretty easy-to-use survey tool - just use the Form-&gt;Create a Form menu item. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.google.com &quot;Google Docs&quot;" />
  <row Id="2858" PostHistoryTypeId="2" PostId="1566" RevisionGUID="c602a56f-b061-4482-a9c4-3a6ea171152c" CreationDate="2010-07-26T05:27:14.170" UserId="865" Text="All of the above. Isometric is just a sheared 2d grid so treat it as a 2d tilemap and think of a way to encode depth. How would you do that in a regular 2d game (being able to go behind or in front of blocks when 'jumping'?&#xD;&#xA;You'd either store a depth per tile (depth buffer-&gt;z buffer) or you'd use multiple layers, or, if you want fancier, you'd implement a callback per tiletype (or mapposition) and would be able to do whatever you want, check depth, check equipment, warp player around, have player slowly move up, format HD." />
  <row Id="2859" PostHistoryTypeId="2" PostId="1567" RevisionGUID="773ac379-eab1-450d-abbe-c28665b747f4" CreationDate="2010-07-26T05:35:16.187" UserId="1044" Text="Especially if it's your first serious project, getting something (anything) actually completed is going to be your biggest challenge. The more barriers you can remove from that goal, the better.&#xD;&#xA;&#xD;&#xA;If you're really serious, to give some thought to making your game port-able. If it's a stand-alone Windows application and you're doing your own rendering, don't write everything straight to DirectX. If you ever want to do something that's not Windowx/XBox, you'll need to rip all that out. And that's an unpleasant process once you've stopped looking at the code for more than a week or two. Put in some amount of abstraction if you think seriously think you'll ever want to port it.&#xD;&#xA;&#xD;&#xA;That's assuming you've written your own engine, of course. All things being equal, I'd start with Unity or something similar. It removes a lot of those initial barriers for you." />
  <row Id="2860" PostHistoryTypeId="2" PostId="1568" RevisionGUID="e64bbbe4-086a-4e3c-935d-1ed7351bd283" CreationDate="2010-07-26T06:00:52.003" UserId="865" Text="This question is *very* broad. It's also a very tricky area to master, network programmers are pretty sought after in the industry with a matching pay, which kinda indicates it's a 'non-solved' area.&#xD;&#xA;Are there books out there, yes, plenty. Are there good books out there, no doubt. Are there books out there that will answer your questions?...I don't think so. They might have solutions that work in some situations or pointers on what to look for, but almost all your questions are game dependent....this is an area where you'll really have to work a lot on your own, it's so seemingly trivial and it can go wrong in so many (uncontrolled) ways." />
  <row Id="2861" PostHistoryTypeId="16" PostId="1568" RevisionGUID="e64bbbe4-086a-4e3c-935d-1ed7351bd283" CreationDate="2010-07-26T06:00:52.003" UserId="-1" />
  <row Id="2862" PostHistoryTypeId="2" PostId="1569" RevisionGUID="2d3cf2ae-a740-46e3-812d-ab79f2a5a485" CreationDate="2010-07-26T06:30:15.440" UserId="865" Text="No. The whole idea about being an indie is that you can do what works for you, or what you believe is best (for your game, for you, or for your audience). The whole idea about being indie is that there is no 'must', 'should', or 'have to'. Make a game - your game. If it's a hit, or if you, after doing it, feel the need to port it, by all means. If it's not extremely targetted to specific hardware, or in some esoteric language, the main idea should be portable enough regardless. You're an indie, do your thing. YOUR thing." />
  <row Id="2863" PostHistoryTypeId="2" PostId="1570" RevisionGUID="9da32ef3-df29-48f9-b025-e56cebb07d70" CreationDate="2010-07-26T06:35:05.260" UserId="639" Text="Apple's Documentation: [Supporting High-Resolution Screens][1] (requires iPhone developer account)&#xD;&#xA;&#xD;&#xA;Some basics:&#xD;&#xA;&#xD;&#xA; - Add &quot;@2x&quot; to your filenames for high resolution files. So you'd have myTexture.png for low-res and myTexture@2x.png for high-res.&#xD;&#xA; - If you're using UIImage to load in graphics, imageNamed:, imageWithContentsOfFile:, and initWithContentsOfFile: will automatically look for @2x files on the iPhone 4. Otherwise you have to load them yourself.&#xD;&#xA; - For OGL ES change the &quot;contentScaleFactor&quot; property of your view from 1.0 to 2.0 to increase the size of the renderbuffer.&#xD;&#xA;&#xD;&#xA;There's more to it than that depending on what you're drawing and how you're drawing it. The docs are super handy in that regard.&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10" />
  <row Id="2864" PostHistoryTypeId="2" PostId="1571" RevisionGUID="c060fa9a-e06d-4338-ae97-5a73a4c4f9a6" CreationDate="2010-07-26T06:36:12.230" UserId="262" Text="I have been [investigating][1] various 3d engines for iPhone/iPad development and have mostly decided to use [Ogre3d][2].  I have got the SDK, the iPhone [dependancies][3], built and run the *SampleBrowser* project on the simulator and (with some difficulty) my 3GS. My problem is with the complexity of the *SampleBrowser* project.  &#xD;&#xA;&#xD;&#xA;It is a cross platform project, which (at this point) I am not interested in supporting and pre-loads all the Ogre tech samples (some of which don't work on the iPhone). What I really need is a very simple bare bones *Hello World* XCode project to start work with. If someone knows where I can find one, I would appreciate it. If not, building one is the next thing on my todo list.&#xD;&#xA;&#xD;&#xA;I have [posted][4] the same question on the Ogre forums, so if I get some feedback there, I will update here.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/581/which-3d-engine-for-ipad-development&#xD;&#xA;  [2]: http://www.ogre3d.org/&#xD;&#xA;  [3]: http://sourceforge.net/projects/ogre/files/&#xD;&#xA;  [4]: https://www.ogre3d.org/forums/viewtopic.php?f=1&amp;t=59296#p398720" />
  <row Id="2865" PostHistoryTypeId="1" PostId="1571" RevisionGUID="c060fa9a-e06d-4338-ae97-5a73a4c4f9a6" CreationDate="2010-07-26T06:36:12.230" UserId="262" Text="An Ogre3D iPhone 'Hello World' project?" />
  <row Id="2866" PostHistoryTypeId="3" PostId="1571" RevisionGUID="c060fa9a-e06d-4338-ae97-5a73a4c4f9a6" CreationDate="2010-07-26T06:36:12.230" UserId="262" Text="&lt;iphone&gt;&lt;ipad&gt;" />
  <row Id="2867" PostHistoryTypeId="2" PostId="1572" RevisionGUID="195bddc2-48cf-4e51-9460-3733e20a0969" CreationDate="2010-07-26T06:40:08.727" UserId="539" Text="If you're using Flash or Silverlight then I would recommend integrating Google Analytics or something similar. Using Analytics it's easy to instrument your game and measure things such as play time, where players are quitting, etc. &#xD;&#xA;&#xD;&#xA;Additionally, I would recommend using a service such as Flash Game License's &quot;First Impressions&quot; or just going to Amazon's Mechanical Turk directly. I've found for $1 you can have a player try your game for a few minutes and provide feedback across a number of categories. If you use Mechanical Turk you can design your own form and ask the questions you're interested in.&#xD;&#xA;&#xD;&#xA;If you combine both methods you can get a great deal of information for relatively cheap. Of course make sure you know what you want to measure before you start spending money. Finally, I have heard that some people will release their games to a portal such as Newgrounds using an alias and then use Analytics as well as a built in form to collect feedback from players." />
  <row Id="2868" PostHistoryTypeId="2" PostId="1573" RevisionGUID="d1c5101b-8e1b-43eb-b522-691971e68948" CreationDate="2010-07-26T07:21:53.163" UserId="603" Text="Ruling out consoles briefly, I believe there's no reason the majority of PC games could not be developed for Windows, Mac and Linux simultaneously. Provided you put the work in at the beginning to get a system agnostic platform to work with, there's not going to be any huge blockers, and there will be advantages.&#xD;&#xA;&#xD;&#xA;* Compiling your code for different systems will show you issues that may have otherwise gone undetected. This can be simply from different compilers warning about different things, but also via the use of other tools not available for other platforms, like valgrind.&#xD;&#xA;* Larger audience, while Windows might have a huge platform share, the small communities of Linux and Windows are starving for games. And there's much less competition&#xD;&#xA;* Working with an existing rendering library is going to make things easier anyway, why not choose one which lets you easily target more platforms, Ogre3D for example.&#xD;&#xA;&#xD;&#xA;Of course there is work involved, but I believe there's also a vast, largely untapped potential.&#xD;&#xA;&#xD;&#xA;I'll also note that I agree with previous answers, targeting many platforms with your first application might be a stretch, but I'd suggest keeping it in mind anyway." />
  <row Id="2870" PostHistoryTypeId="2" PostId="1575" RevisionGUID="2484c202-e17f-4a59-9bd1-16e5a202fcf1" CreationDate="2010-07-26T07:44:08.930" UserId="911" Text="Qt is an excellent application toolkit and overall the best for C++. While some large projects use Qt (KDE for example), I haven't seen many games using it. So I decided to make my own. But what does Qt provide that may be useful when writing a game (in my case a 2D game)?&#xD;&#xA;&#xD;&#xA;P.S.: Could someone add the tag [qt] and remove this line please? I don't have enough reputation." />
  <row Id="2871" PostHistoryTypeId="1" PostId="1575" RevisionGUID="2484c202-e17f-4a59-9bd1-16e5a202fcf1" CreationDate="2010-07-26T07:44:08.930" UserId="911" Text="What resources are available for using Qt as a toolkit for games" />
  <row Id="2872" PostHistoryTypeId="3" PostId="1575" RevisionGUID="2484c202-e17f-4a59-9bd1-16e5a202fcf1" CreationDate="2010-07-26T07:44:08.930" UserId="911" Text="&lt;c++&gt;" />
  <row Id="2873" PostHistoryTypeId="2" PostId="1576" RevisionGUID="62116722-43ca-45bb-8cd5-1ef363821b43" CreationDate="2010-07-26T08:01:10.543" UserId="252" Text="Introversion is now offering [the Darwinia+Multiwinia source for sale](http://store.introversion.co.uk/product_info.php?products_id=66), stating&#xD;&#xA;&#xD;&#xA;&gt; Note: You will need Windows and Visual Studio 2008 to build the games. We have tested that the code compiles correctly on the PC, but you will need to put some effort in to compile for Mac / Linux. There is no Xbox code in this release.&#xD;&#xA;&#xD;&#xA;Has anyone put this effort in already? The best answer would (be yes and) mention modifications that had to be done (also mentioning the distro used), the second-to-best would explain why it doesn't work right now. Since I haven't bought the source pack I'm relying on upvotes as confirmation, so please comment on answers if something doesn't work or has to be modified e.g. for another Linux distribution. I'm currently using Ubuntu 8.04, but 10.04 or e.g. Gentoo would be a choice, too." />
  <row Id="2874" PostHistoryTypeId="1" PostId="1576" RevisionGUID="62116722-43ca-45bb-8cd5-1ef363821b43" CreationDate="2010-07-26T08:01:10.543" UserId="252" Text="Does Darwinia compile under Linux?" />
  <row Id="2875" PostHistoryTypeId="3" PostId="1576" RevisionGUID="62116722-43ca-45bb-8cd5-1ef363821b43" CreationDate="2010-07-26T08:01:10.543" UserId="252" Text="&lt;linux&gt;&lt;source-code&gt;" />
  <row Id="2879" PostHistoryTypeId="2" PostId="1577" RevisionGUID="b8c72c8f-561a-45ad-8474-ba3a2461a40c" CreationDate="2010-07-26T08:30:37.430" UserId="503" Text="If you're feeling adventurous, you can always check out one of the open sourced 2D games, such as Aquaria, Gish and the rest of the Humble Indie Bundle." />
  <row Id="2880" PostHistoryTypeId="2" PostId="1578" RevisionGUID="3a0956c3-c182-4287-b678-38099af98064" CreationDate="2010-07-26T08:36:35.763" UserId="603" Text="http://gafferongames.com/networking-for-game-programmers/&#xD;&#xA;&#xD;&#xA;Is a great set of articles on various problems and solutions dealing with game networking." />
  <row Id="2881" PostHistoryTypeId="16" PostId="1578" RevisionGUID="3a0956c3-c182-4287-b678-38099af98064" CreationDate="2010-07-26T08:36:35.763" UserId="-1" />
  <row Id="2882" PostHistoryTypeId="2" PostId="1579" RevisionGUID="2ccfd1ea-2c2b-423a-813e-e09631c3e97d" CreationDate="2010-07-26T08:56:17.477" UserId="1004" Text="It doesn't technically answer your question (doesn't work on the xbox), but [LuaInterface](http://luaforge.net/projects/luainterface/) allows Lua integration with C#  relatively painlessly." />
  <row Id="2885" PostHistoryTypeId="2" PostId="1581" RevisionGUID="22bfed0f-85ac-43ac-958e-bb42d84caba5" CreationDate="2010-07-26T09:23:49.493" UserId="906" Text="Since I don't have enough rep, I couldn't post more than one link. So I make [temporary page][1].&#xD;&#xA;&#xD;&#xA;Please feel free to copy it to here or anywhere.&#xD;&#xA;&#xD;&#xA;  [1]: https://sites.google.com/site/unofficialgame/free-e-books-for-game" />
  <row Id="2886" PostHistoryTypeId="16" PostId="1581" RevisionGUID="22bfed0f-85ac-43ac-958e-bb42d84caba5" CreationDate="2010-07-26T09:23:49.493" UserId="-1" />
  <row Id="2887" PostHistoryTypeId="2" PostId="1582" RevisionGUID="8e8ee693-f988-4a26-9f5a-148e9bf16235" CreationDate="2010-07-26T09:24:23.003" UserId="178" Text="You should definitely take a look at the [Qt Graphics View Framework][1], it does provide a nice hardware accelerated 2D scene graph (QtGraphicsScene).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://doc.trolltech.com/4.6/graphicsview.html" />
  <row Id="2888" PostHistoryTypeId="5" PostId="1538" RevisionGUID="723cb37c-1f61-4f3e-95e7-cd7784987111" CreationDate="2010-07-26T09:25:37.887" UserId="202" Comment="edited body" Text="In the course of the famous Stanford lectures on iPhone development, Tim Omernick from ngmoco presented many [ways to optimize opengl for iPhone (Youtube link)](http://www.youtube.com/watch?v=VNr5I3ZRecE). The keynote lasts ~30min and I found it very informative." />
  <row Id="2889" PostHistoryTypeId="5" PostId="483" RevisionGUID="af2c8208-8c98-4e9b-a68b-84b2fa6ea468" CreationDate="2010-07-26T09:28:59.607" UserId="653" Comment="added 267 characters in body; edited body" Text="# [Perforce][1]&#xD;&#xA;&#xD;&#xA;Perforce (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. Open-source projects may be eligible for a free license (minus the technical support).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;Comment by xan: It is worth noting however that their merge tool, P4Merge (used for diffing and merging) is excellent and far superior to the likes of Tortoise Merge. Surprisingly, this component is available for free as part of the P4 Visual Tools package.&#xD;&#xA;&#xD;&#xA;Comment by slicedlime: Another drawback with Perforce is that branching in it tends to be a huge pain, especially if you have large trees. Almost every other vcs is better at branching and merging. This is usually a small price to pay for the above advantages though.&#xD;&#xA;&#xD;&#xA;Comment by roe: Perforce is extremely chatty. There's not much going on without the server&#xD;&#xA;involved. Most notably, you need the server in order to do open-for-edit, which means you need to jump through a few hoops if you intend to break the connection to the server.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="2890" PostHistoryTypeId="2" PostId="1583" RevisionGUID="c7bec40a-d518-4d8b-bf1d-9fb854cea761" CreationDate="2010-07-26T09:37:21.043" UserId="1047" Text="I once tried to write a simple game with UDP in a week as a throwaway test. It went horribly.&#xD;&#xA;&#xD;&#xA;I threw it away early. The main problem i had was restoring the game state of all players/enemies/objects to an old state and fast forward the game to the point of time the player is playing (ie half a second before a jump. A little early or late can make the player miss the jump)&#xD;&#xA;&#xD;&#xA;Maybe this method is not the easiest way? i suspect it to be but i designed it wrong from the beginning and realized at the end of 2nd day. (so i didnt learn too much or wasted that much time)&#xD;&#xA;&#xD;&#xA;For myself and others, What is involved for a simple UDP game and how do i write one? Or how do i solve the prediction problem restoring to state properly.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2891" PostHistoryTypeId="1" PostId="1583" RevisionGUID="c7bec40a-d518-4d8b-bf1d-9fb854cea761" CreationDate="2010-07-26T09:37:21.043" UserId="1047" Text="What is involved for a simple UDP game?" />
  <row Id="2892" PostHistoryTypeId="3" PostId="1583" RevisionGUID="c7bec40a-d518-4d8b-bf1d-9fb854cea761" CreationDate="2010-07-26T09:37:21.043" UserId="1047" Text="&lt;game-design&gt;&lt;network&gt;" />
  <row Id="2893" PostHistoryTypeId="2" PostId="1584" RevisionGUID="a3d5aee4-0b1f-4d83-8f95-74c7758a2b4d" CreationDate="2010-07-26T09:49:18.923" UserId="741" Text="For most platforms, you can write subsystems which abstract away from the specific APIs used to call out and get information back from the platform you're running on. IO APIs are usually the easiest to abstract - all file systems work on some pretty basic assumptions about opening, closing and reading from files, even when you factor in asynchronous calling. Then you have your core systems like reading controller input, querying the time, accessing memory and thread primitives, most of which work the same way.&#xD;&#xA;&#xD;&#xA;Even graphics can be abstracted to a large extent, and indeed in most good engines they are. But you have to package up the 'renderable' things into black boxes where you aren't allowed to know what's going on inside them. You know that you have a 'thing' which you render in a particular position in the world. You don't know how it's rendered, just that it is. And the graphics abstraction layer takes care of all of the details of getting it on-screen. The platform specific build pipelines package up the graphical data in such a way that it can be referenced from the engine without really knowing how it's represented internally.&#xD;&#xA;&#xD;&#xA;All that said though, when it comes down to actually shipping a game, there are certain parts that you just can't abstract away. It would be ridiculous to think you could ship the same code on iPhone as you would on 360 or PS3, as the input mechanisms, fundamental way of operating, and platform capabilities are just too different. You could make an iPhone sized title on 360, but it would have to limit its input mechanisms to only those that the 360 can support. So, a virtual cursor on screen simulating a finger, and possibly using the joystick where the 3D accelerometer input is used.&#xD;&#xA;&#xD;&#xA;More sensibly, parts of the game can be written in a re-usable way, and individual code modules can be ported between platforms, even though the majority of the title is different. For example if you have an AI state machine, that doesn't really care whether it's running on 360, PC, or iPhone. Your game will use many such components, and as long as they've been designed well so that they take well defined inputs and outputs, then the rest of a game can be wrapped around them, regardless of platform, and avoid having to rewrite those components.&#xD;&#xA;&#xD;&#xA;That re-usability is the key to a cross platform development, not looking for a one-size-fits-all engine which works on all platforms. Even if such a thing did exist, it would be so crippled by having to work on the lowest common denominator, it wouldn't be of much use to make games with." />
  <row Id="2894" PostHistoryTypeId="2" PostId="1585" RevisionGUID="4f316a90-3666-4c70-b9af-81e969790e9b" CreationDate="2010-07-26T09:59:20.570" UserId="653" Text="Glenn Fiedler has written [an excellent set of articles][1] on this, which covers pretty much all of the basic concepts.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/networking-for-game-programmers/" />
  <row Id="2895" PostHistoryTypeId="2" PostId="1586" RevisionGUID="b75510ba-23ae-4757-861b-c0e2d3fc87c8" CreationDate="2010-07-26T10:26:02.483" UserId="741" Text="As a general design pattern, manifests are useful when you want to collect all the information about a disparate set of objects into a single place. It doesn't have to be about archive/packed files, or about indirection to allow things to be moved without recompiling/updating original references. Indeed the latter can introduce more problems than it solves, so you would only do that if it solved a particular need you had.&#xD;&#xA;&#xD;&#xA;The big advantage of manifests is that they act as an index to a large amount of data in a single compact place. As such they improve performance (because you can simply load the entire manifest from disc and keep it in memory), especially in the case where you need to iterate over multiple objects, **but you don't know in advance what those objects will be**. If the objects are on disc, especially if they are in multiple places, you have to touch the filesystem every time you want to iterate over files. For disc-based file systems, the time needed to touch the filesystem is prohibitive, so iterating over files in a directory is a massive cost. By pre-building a manifest of files at build time (NB: not compile time), you trade that cost for memory usage.&#xD;&#xA;&#xD;&#xA;Archive files require the use of manifests, simply because the table-of-contents for the archive is essentially a manifest itself, so you get the behaviour for free. And if you are required to use manifests for assets in one location, it can be cleaner to insist that all assets be referenced through manifests; allowing you to abstract the actual storage location/mechanism of the assets from the references to those assets in code. That way you can have a single asset reference type in your code, and not have to make the distinction between file paths, archive file path + offset, or sub-assets." />
  <row Id="2896" PostHistoryTypeId="2" PostId="1587" RevisionGUID="56df23c7-3534-4aca-9d03-4ff98186f245" CreationDate="2010-07-26T10:27:55.307" UserId="908" Text="When it comes to textures it's also important to note that you should stay away from large transparent areas in images. If you e.g. have a mask that you put in front of the whole game scene, it's faster to assemble it out of 4 images (just the borders) than to use 1 large image that covers the entire screen." />
  <row Id="2897" PostHistoryTypeId="5" PostId="1581" RevisionGUID="5f2b87ea-ca24-4919-a1ea-3df644161e74" CreationDate="2010-07-26T10:45:24.010" UserId="906" Comment="added 2 characters in body" Text="Since I don't have enough rep, I couldn't post more than one link. So I make [temporary list page][1].&#xD;&#xA;&#xD;&#xA;Please feel free to copy it here or anywhere.&#xD;&#xA;&#xD;&#xA;  [1]: https://sites.google.com/site/unofficialgame/free-e-books-for-game" />
  <row Id="2898" PostHistoryTypeId="2" PostId="1588" RevisionGUID="651d859e-2379-4d18-8c34-4cde06882931" CreationDate="2010-07-26T11:04:45.447" UserId="721" Text="I have ported my 3D Engine from OpenGL ES 1.X to OpenGL ES 2.X because i love shaders. The renderers are distincts and don't share any code.&#xD;&#xA;&#xD;&#xA;You can translate easily:&#xD;&#xA;&#xD;&#xA; - textures management&#xD;&#xA; - framebuffer objects&#xD;&#xA; - blending&#xD;&#xA;&#xD;&#xA;More difficult (Need shaders):&#xD;&#xA;&#xD;&#xA; - fixed pipeline transformations (rotation, scale ...)&#xD;&#xA; - fog&#xD;&#xA; - lighting&#xD;&#xA;&#xD;&#xA;To port your code, i recommand you:&#xD;&#xA;&#xD;&#xA;**Step One**&#xD;&#xA; &#xD;&#xA; - learn GLSL 1.2: you can read WebGL tutorials&#xD;&#xA; - try to write some shaders [shader toy][1]&#xD;&#xA;&#xD;&#xA;**Step Two**&#xD;&#xA;&#xD;&#xA; - list all material you have (or rendering technics) &#xD;&#xA; - list all vertices informations as vertices coordinates, normal, textures coord, color informations you need for each material&#xD;&#xA;&#xD;&#xA; With theses informations, you will know which GLSL Programs (vertex + fragment shaders) you must write.&#xD;&#xA;&#xD;&#xA;**Step Three**&#xD;&#xA; &#xD;&#xA; - write your shader compil functions and log each informations&#xD;&#xA; - implement a minimal program OpenGL ES 2.X with a quad (two triangles) &#xD;&#xA; - implement and test your GLSL programs one by one&#xD;&#xA; &#xD;&#xA;**Step Four: Optimize**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iquilezles.org/apps/shadertoy/" />
  <row Id="2899" PostHistoryTypeId="16" PostId="1583" RevisionGUID="ba9cffbc-c1e7-4d89-9ad8-7939c51140bd" CreationDate="2010-07-26T11:16:39.560" UserId="1047" />
  <row Id="2900" PostHistoryTypeId="5" PostId="1583" RevisionGUID="ba9cffbc-c1e7-4d89-9ad8-7939c51140bd" CreationDate="2010-07-26T11:16:39.560" UserId="1047" Comment="added 73 characters in body" Text="I once tried to write a simple game with UDP in a week as a throwaway test. It went horribly.&#xD;&#xA;&#xD;&#xA;I threw it away early. The main problem i had was restoring the game state of all players/enemies/objects to an old state and fast forward the game to the point of time the player is playing (ie half a second before a jump. A little early or late can make the player miss the jump)&#xD;&#xA;&#xD;&#xA;Maybe this method is not the easiest way? i suspect it to be but i designed it wrong from the beginning and realized at the end of 2nd day. (so i didnt learn too much or wasted that much time)&#xD;&#xA;&#xD;&#xA;For myself and others, What is involved for a simple UDP game and how do i write one? Or how do i solve the prediction problem restoring to state properly.&#xD;&#xA;&#xD;&#xA;I'll mark this as CW bc i know there will be lots of helpful answers.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2901" PostHistoryTypeId="2" PostId="1589" RevisionGUID="71a0ffa9-3e3d-4f72-b07e-e73593d6cdca" CreationDate="2010-07-26T11:36:03.070" UserId="1012" Text="What is better for games when developing game loops, fixed time steps or variable time steps?  What type of games are better with one or the other?&#xD;&#xA;&#xD;&#xA;Variable time steps:&#xD;&#xA;&#xD;&#xA; - pro: smooth&#xD;&#xA; - pro: easier to to code&#xD;&#xA; - con: hard to record/replay actions as time steps vary&#xD;&#xA; - con: weird physics errors that are hard to predict with very small or large time steps&#xD;&#xA;&#xD;&#xA;Fixed time steps:&#xD;&#xA;&#xD;&#xA; - pro: physics are very predictable&#xD;&#xA; - pro: easier to record actions per time step as they are fixed&#xD;&#xA; - pro: possibly easier to sync up with other players over network?&#xD;&#xA; - pro: don't have to confuse all calculations with timeElapsed variable everywhere&#xD;&#xA; - con: it will never sync up vertical refresh so you either have jittery graphics or you have to always interpolate.&#xD;&#xA; - con: maximum frame rate is limited unless you interpolate&#xD;&#xA; - con: hard to work within frameworks that assume variable time steps (like pyglet or flixel)&#xD;&#xA;&#xD;&#xA;Notes: &#xD;&#xA;&#xD;&#xA; - [Gaffer on games: Fix your timestep!][4] &#xD;&#xA; - [deWitter's game loop article][3]&#xD;&#xA; - [Quake 3's fps affects jump physics][2]  Allegedly this is one reason why Doom 3 is frame locked at 60fps?&#xD;&#xA; - Flixel requires a variable timestep (I think this is determined by Flash) whereas Flashpunk allows you fixed and variable timesteps.  &#xD;&#xA; - Box2d docs seems to suggest that it likes constant time steps. See [Simulating the World of Box2D][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/manual.html#_Toc253068188&#xD;&#xA;  [2]: http://web.archive.org/web/20080404111108/http://ucguides.savagehelp.com/Quake3/FAQFPSJumps.html&#xD;&#xA;  [3]: http://dewitters.koonsolo.com/gameloop.html&#xD;&#xA;  [4]: http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="2902" PostHistoryTypeId="1" PostId="1589" RevisionGUID="71a0ffa9-3e3d-4f72-b07e-e73593d6cdca" CreationDate="2010-07-26T11:36:03.070" UserId="1012" Text="Fixed time step vs Variable time step" />
  <row Id="2903" PostHistoryTypeId="3" PostId="1589" RevisionGUID="71a0ffa9-3e3d-4f72-b07e-e73593d6cdca" CreationDate="2010-07-26T11:36:03.070" UserId="1012" Text="&lt;physics&gt;&lt;frame-rate&gt;&lt;fps&gt;&lt;game-engine&gt;" />
  <row Id="2904" PostHistoryTypeId="2" PostId="1590" RevisionGUID="018c4773-824c-4d08-a105-6a6981bd52e8" CreationDate="2010-07-26T11:40:33.767" UserId="567" Text="**NAME:** PunkBuster&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** FPS&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.evenbalance.com/&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Real-time scanning of memory by PB&#xD;&#xA;   Client on players' computers&#xD;&#xA;   searching for known hacks/cheats&#xD;&#xA; - Throttled two-tiered background&#xD;&#xA;   auto-update system using multiple&#xD;&#xA;   Internet Master Servers to provide&#xD;&#xA;   end-user security ensuring that no&#xD;&#xA;   false or corrupted updates can be&#xD;&#xA;   installed on players' computers&#xD;&#xA; - Frequent status reports (highly&#xD;&#xA;   encrypted) are sent to the PB Server&#xD;&#xA;   by all players and the PB Server&#xD;&#xA;   raises a violation when necessary&#xD;&#xA;   which causes the offending player to&#xD;&#xA;   be removed from the game and all&#xD;&#xA;   other players are informed of the&#xD;&#xA;   violation&#xD;&#xA; - PB Admins can also manually remove&#xD;&#xA;   players from the game for a specified&#xD;&#xA;   number of minutes or permanently ban&#xD;&#xA;   if desired&#xD;&#xA; - PB Servers can optionally be&#xD;&#xA;   configured to randomly check player&#xD;&#xA;   settings looking for known exploits&#xD;&#xA;   of the game engine&#xD;&#xA; - More ..." />
  <row Id="2905" PostHistoryTypeId="16" PostId="1590" RevisionGUID="018c4773-824c-4d08-a105-6a6981bd52e8" CreationDate="2010-07-26T11:40:33.767" UserId="-1" />
  <row Id="2906" PostHistoryTypeId="2" PostId="1591" RevisionGUID="948d353d-9cc8-4264-b881-f904098e12e4" CreationDate="2010-07-26T11:42:58.083" UserId="567" Text="**NAME:** sXe Injected&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** FPS&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.sxe-anticheat.com/introduccion&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Anti-Wallhack&#xD;&#xA; - LocalBan&#xD;&#xA; - 16bpp Detection&#xD;&#xA; - Screenshot&#xD;&#xA; - Anti-Speedhack" />
  <row Id="2907" PostHistoryTypeId="16" PostId="1591" RevisionGUID="948d353d-9cc8-4264-b881-f904098e12e4" CreationDate="2010-07-26T11:42:58.083" UserId="-1" />
  <row Id="2908" PostHistoryTypeId="2" PostId="1592" RevisionGUID="d8ac73cb-e7b9-4491-a178-2e46732a2c64" CreationDate="2010-07-26T11:47:47.233" UserId="957" Text="I have never read it myself, but I keep seeing it mentioned.&#xD;&#xA;&#xD;&#xA;http://inventwithpython.com/&#xD;&#xA;&#xD;&#xA;I believe it is mostly text games, but near the end it covers pygame." />
  <row Id="2909" PostHistoryTypeId="16" PostId="1592" RevisionGUID="d8ac73cb-e7b9-4491-a178-2e46732a2c64" CreationDate="2010-07-26T11:47:47.233" UserId="-1" />
  <row Id="2910" PostHistoryTypeId="2" PostId="1593" RevisionGUID="4c2751f7-d459-4f18-a7b2-b5159b25975c" CreationDate="2010-07-26T11:49:46.183" UserId="567" Text="**NAME:** HackShield&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any type of game&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.hackshields.com/&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Memory Hacking Protection&#xD;&#xA; - Speed Hack Protection&#xD;&#xA; - Debugger Protection&#xD;&#xA; - Auto Update" />
  <row Id="2911" PostHistoryTypeId="16" PostId="1593" RevisionGUID="4c2751f7-d459-4f18-a7b2-b5159b25975c" CreationDate="2010-07-26T11:49:46.183" UserId="-1" />
  <row Id="2912" PostHistoryTypeId="2" PostId="1594" RevisionGUID="8cf31fd7-706d-4645-8d2e-7efc1b19a95b" CreationDate="2010-07-26T11:55:03.457" UserId="1012" Text="Check out TIGSource's [Assemblee competition][1]!  [Part one][2] asked people to create graphics and audio assets while [part two][3] asked people to create games with only materials provided in part one.  All assets were released under a creative commons non-commercial license.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tigsource.com/2009/10/24/tigsource-presents-assemblee-competition/&#xD;&#xA;  [2]: http://forums.tigsource.com/index.php?board=37.0&#xD;&#xA;  [3]: http://forums.tigsource.com/index.php?board=38.0" />
  <row Id="2913" PostHistoryTypeId="6" PostId="1575" RevisionGUID="bfbe7788-350a-4469-8793-d204c3e400a7" CreationDate="2010-07-26T12:14:09.067" UserId="35" Comment="edited tags" Text="&lt;c++&gt;&lt;qt&gt;" />
  <row Id="2914" PostHistoryTypeId="2" PostId="1595" RevisionGUID="66139505-131c-4f31-b08a-6b58e4147e8a" CreationDate="2010-07-26T13:40:12.683" UserId="677" Text="On top of what you've already stated it may come down to the feel you want your game to have. Unless you can guarantee that you will always have a constant frame rate then you're likely to have slowdown somewhere and fixed and variable time steps will look very different. Fixed will have the effect of your game going in slow motion for a while, which can sometimes be the intended effect (look at an old school style shooter like Ikaruga where massive explosions cause slowdown after beating a boss). Variable timesteps will keep things moving at the correct speed in terms of time but you may see sudden changes in position etc. which can make it hard for the player to perform actions accurately.&#xD;&#xA;&#xD;&#xA;I can't really see that a Fixed time step will make things easier over a network, they would all be slightly out of sync to begin with and slowdown on one machine but not another would push things more out of sync.&#xD;&#xA;&#xD;&#xA;I've always leant towards the variable approach personally but those articles have some interesting things to think about. I've still found fixed steps quite common though, especially on consoles where people think of the framerate being a constant 60fps compared to the very high rates achievable on PC." />
  <row Id="2915" PostHistoryTypeId="5" PostId="1441" RevisionGUID="0af9420b-54d5-4d9c-a7d9-2643ad28288a" CreationDate="2010-07-26T13:58:50.860" UserId="930" Comment="deleted 7 characters in body" Text="One of my hobbies (aside programming, of course) is 3d modeling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modeling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modeling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modeling characters)  &#xD;&#xA;**3)** What knowledge should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development environment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existing 3D models exported by 3DS MAX (not a must, but a plus)  &#xD;&#xA; - Had the ability to create 3d models programmatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more UI-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [weighted companion cube][5], and I want to make a full-screen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room) drawn maybe through code (not an imported model)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="2916" PostHistoryTypeId="2" PostId="1596" RevisionGUID="6cdb4c2c-9eb2-4df7-851a-f001ebb9b1d9" CreationDate="2010-07-26T14:04:37.770" UserId="957" Text="If you want to work on game loops, I would advise reading this old article on gamasutra about multithreaded game engine architectures. It deals with a number of different ways to write your game loop.&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php" />
  <row Id="2917" PostHistoryTypeId="2" PostId="1597" RevisionGUID="45fda298-dcf3-49cd-a3ed-e96a00bf6724" CreationDate="2010-07-26T14:09:45.107" UserId="1057" Text="NAME: X-Ray Anti-Cheat&#xD;&#xA;&#xD;&#xA;GAME TYPE: multiplayer Steam games (Counter Strike, Team Fortress 2, ... )&#xD;&#xA;&#xD;&#xA;Website: http://www.xraygaming.com/&#xD;&#xA;&#xD;&#xA;FEATURES?&#xD;&#xA;&#xD;&#xA; - X-ray uses state-of-the-art methods to protect you and your online gaming experience. &#xD;&#xA; - It will periodically take screenshots of what you are seeing in-game&#xD;&#xA; - It wwill scan for known cheats and bad processes in the background to help with cheat detection.&#xD;&#xA; - When you are finished playing your game, X-ray will upload these screenshots to our servers, where our experienced admin team and massive userbase will help catch cheaters by reviewing screenshots and 'flagging' them if they appear suspicious." />
  <row Id="2918" PostHistoryTypeId="16" PostId="1597" RevisionGUID="45fda298-dcf3-49cd-a3ed-e96a00bf6724" CreationDate="2010-07-26T14:09:45.107" UserId="-1" />
  <row Id="2919" PostHistoryTypeId="2" PostId="1598" RevisionGUID="26159f43-68e3-4990-b205-5c0714abd1e3" CreationDate="2010-07-26T14:25:30.857" UserId="163" Text="I really like the way the [XNA Framework][1] implements fixed time step. If a given draw call takes a bit too long, it will call update repeatedly until it &quot;catches up&quot;. Shawn Hargreaves describes it here:  &#xD;&#xA;[http://blogs.msdn.com/b/shawnhar/archive/2007/11/23/game-timing-in-xna-game-studio-2-0.aspx][2]&#xD;&#xA;&#xD;&#xA;&gt; In 2.0, the Draw behavior has changed:&#xD;&#xA;&gt; &#xD;&#xA;&gt;  - Call Update as many times as needed to catch up to the current time&#xD;&#xA;&gt;  - Call Draw once&#xD;&#xA;&gt;  - Wait until it is time for the next Update&#xD;&#xA;&#xD;&#xA;The biggest pro in my opinion to this is one that you mentioned, that it makes all of your game code calculations so much simpler because you don't have to include that time variable all over the place. &#xD;&#xA;&#xD;&#xA;*note: xna supports variable timestep as well, it's just a setting.*&#xD;&#xA;  [1]: http://creators.xna.com&#xD;&#xA;  [2]: http://blogs.msdn.com/b/shawnhar/archive/2007/11/23/game-timing-in-xna-game-studio-2-0.aspx" />
  <row Id="2920" PostHistoryTypeId="2" PostId="1599" RevisionGUID="09716cb6-30f7-4d00-8faf-8a585bedef1f" CreationDate="2010-07-26T14:30:18.957" UserId="163" Text="![Free Textures][2]&#xD;&#xA;&#xD;&#xA;[http://www.textureking.com/][1]  &#xD;&#xA;&#xD;&#xA;  [1]: http://www.textureking.com/&#xD;&#xA;  [2]: http://www.textureking.com/wp-content/themes/textureking_v4/images/tk_logo.gif" />
  <row Id="2921" PostHistoryTypeId="2" PostId="1600" RevisionGUID="91b278e1-1000-4539-896e-4b142fb1f74f" CreationDate="2010-07-26T14:57:57.330" UserId="35" Text="There are games made with Qt, KDE has a lot of them, see http://games.kde.org/&#xD;&#xA;&#xD;&#xA;Most of them are made using the graphics view framework, and the svg renderer." />
  <row Id="2923" PostHistoryTypeId="5" PostId="890" RevisionGUID="d29768be-5d54-450d-b70f-61bff61510f8" CreationDate="2010-07-26T16:01:31.987" UserId="240" Comment="Fixed typo/stray word." Text="There are some good suggestions in the other answers, but I just want to toss in my vote for: Start with something that seems too-puny to deal with.&#xD;&#xA;&#xD;&#xA;Pong is a good example.&#xD;&#xA;&#xD;&#xA;The goal is: make the game-design and rules-set so brain-dead that you can focus all of your attention on learning the new thing that you're learning (a language, a platform, an API) and not have to constantly take breaks to figure out how the game works.&#xD;&#xA;&#xD;&#xA;Once you get going, you'll find that pong is actually slightly more complicated than it seems at first blush.  (I'm teaching a guy programming and he's using pong as his learning project.  We added some features, and now he's getting distracted from learning to program by learning how to do all these cool features :)&#xD;&#xA;&#xD;&#xA;Once you've done app#1 all the way through until it's ready to give/sell to others, *THEN* take on something a little more complicated (Tetris, adventure or whatever you like) but, to get started learning a new technology, make the thing that you program brain-dead simple.&#xD;&#xA;&#xD;&#xA;Other examples:&#xD;&#xA;&#xD;&#xA;* Guess the number (between 1 &amp; 1000)&#xD;&#xA;* Mastermind (advanced guess the number.)&#xD;&#xA;* SimplePaint&#xD;&#xA;* Snake/worm/whatever-you-call-it.&#xD;&#xA;&#xD;&#xA;But, again -- start with something that's way-too-easy, so that you can actually complete something and look back and see what's involved.  The difference between having written ONE app in a language/platform/SDK/engine and having written ZERO apps is **HUGE**.  The difference between 1 &amp; 2, or 2 &amp; 5, much less so, so you can take bigger steps, but make the 0 to 1 step be a teeny-tiny one; it'll be bigger than you think!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2924" PostHistoryTypeId="2" PostId="1602" RevisionGUID="9ce12807-db35-4816-8504-a6a5b5f455ef" CreationDate="2010-07-26T17:43:13.043" UserId="779" Text="The most basic answer is to use shapes, but that doesn't solve all the problems.  What about colored text hovering over player's head to show their gamename?&#xD;&#xA;&#xD;&#xA;Here are all the fixes for colorblind issues I know of:&#xD;&#xA;&#xD;&#xA;1. Use shapes instead of color&#xD;&#xA;2. Use saturated colors (red and green are actually fine, but green and yellow are hard)&#xD;&#xA;3. Use Red vs Blue instead of Red/Green (Counter-Strike used this Red for T and Blue for CT.  This solves the problem for most people, but for less than 2% of people they have even more several colorblind issues)&#xD;&#xA;4. Use high contrast outlines around all important text (eg. Blue text with white outline stands out on anything)&#xD;&#xA;5. For all important events in the game use a combination of color, shape, and sound.&#xD;&#xA;6. Don't use thin colored shapes.  The thicker the shape (eg. bigger text) the easier it is to tell colors&#xD;&#xA;7. **Allow end user to change all colors in game**  (the most important solution to them all)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2925" PostHistoryTypeId="2" PostId="1603" RevisionGUID="952ca335-6cc1-49c2-82c1-bdf1e0f0df65" CreationDate="2010-07-26T17:44:18.423" UserId="469" Text="lots of people asked for a trailer for my game, because the screenshots do not make justice...&#xD;&#xA;&#xD;&#xA;But I don't know much about this, can someone point at some tools and tips? Like, what to put on the trailer, and specially: How to record my game, without a logo or slow FPS? (that means: no fraps)" />
  <row Id="2926" PostHistoryTypeId="1" PostId="1603" RevisionGUID="952ca335-6cc1-49c2-82c1-bdf1e0f0df65" CreationDate="2010-07-26T17:44:18.423" UserId="469" Text="Tools to make a trailer..." />
  <row Id="2927" PostHistoryTypeId="3" PostId="1603" RevisionGUID="952ca335-6cc1-49c2-82c1-bdf1e0f0df65" CreationDate="2010-07-26T17:44:18.423" UserId="469" Text="&lt;marketing&gt;&lt;trailer&gt;&lt;video&gt;&lt;screen-recording&gt;" />
  <row Id="2928" PostHistoryTypeId="2" PostId="1604" RevisionGUID="020af3b1-85d4-42dc-836a-597f6e323c91" CreationDate="2010-07-26T17:44:40.653" UserId="370" Text="The pain .. soo many wrong answers!&#xD;&#xA;&#xD;&#xA;There are two issues related to the question.&#xD;&#xA;&#xD;&#xA; * Should physics step rate be tied to frame rate?&#xD;&#xA; * Should physics be stepped with constant deltas?&#xD;&#xA;&#xD;&#xA;In Glen fielder's Fix your time step he says to &quot;Free the Physics&quot;.  That means your physics update rate should **not** be tied to your frame rate.&#xD;&#xA;&#xD;&#xA;&gt; For example, if the display framerate&#xD;&#xA;&gt; is 50fps and the simulation is&#xD;&#xA;&gt; designed to run at 100fps then we need&#xD;&#xA;&gt; to take two physics steps every&#xD;&#xA;&gt; display update to keep the physics in&#xD;&#xA;&gt; sync.&#xD;&#xA;&#xD;&#xA;In Erin Catto's recommendations for Box2D he advocates this as well.&#xD;&#xA;&#xD;&#xA;&gt; So don't tie&#xD;&#xA;&gt; the time step to your frame rate&#xD;&#xA;&gt; (unless you really, really have to).&#xD;&#xA;&#xD;&#xA;*Should Physics step rate be tied to your frame rate?* No.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Erin's thoughts on fixed step vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; Box2D uses a computational algorithm called an integrator. Integrators simulate the physics equations at discrete points of time. ... We also don't like the time step to change much. A variable time step produces variable results, which makes it difficult to debug.&#xD;&#xA;&#xD;&#xA;Glen's thoughts on fixed vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; ###Fix your timestep or explode&#xD;&#xA;&gt; ...  If you have a series of really stiff spring constraints for shock absorbers in a car simulation then tiny changes in dt can actually make the simulation explode. ...&#xD;&#xA;&#xD;&#xA;*Should physics be stepped with constant deltas?* Yes.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2929" PostHistoryTypeId="5" PostId="1604" RevisionGUID="e23ad38e-4a73-418d-84cd-f38455fcc83e" CreationDate="2010-07-26T17:56:03.330" UserId="370" Comment="added 664 characters in body" Text="The pain .. soo many wrong answers!&#xD;&#xA;&#xD;&#xA;There are two issues related to the question.&#xD;&#xA;&#xD;&#xA; * Should physics step rate be tied to frame rate?&#xD;&#xA; * Should physics be stepped with constant deltas?&#xD;&#xA;&#xD;&#xA;In Glen fielder's Fix your time step he says to &quot;Free the Physics&quot;.  That means your physics update rate should **not** be tied to your frame rate.&#xD;&#xA;&#xD;&#xA;&gt; For example, if the display framerate&#xD;&#xA;&gt; is 50fps and the simulation is&#xD;&#xA;&gt; designed to run at 100fps then we need&#xD;&#xA;&gt; to take two physics steps every&#xD;&#xA;&gt; display update to keep the physics in&#xD;&#xA;&gt; sync.&#xD;&#xA;&#xD;&#xA;In Erin Catto's recommendations for Box2D he advocates this as well.&#xD;&#xA;&#xD;&#xA;&gt; So don't tie&#xD;&#xA;&gt; the time step to your frame rate&#xD;&#xA;&gt; (unless you really, really have to).&#xD;&#xA;&#xD;&#xA;*Should Physics step rate be tied to your frame rate?* No.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Erin's thoughts on fixed step vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; Box2D uses a computational algorithm called an integrator. Integrators simulate the physics equations at discrete points of time. ... We also don't like the time step to change much. A variable time step produces variable results, which makes it difficult to debug.&#xD;&#xA;&#xD;&#xA;Glen's thoughts on fixed vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; ###Fix your timestep or explode&#xD;&#xA;&gt; ...  If you have a series of really stiff spring constraints for shock absorbers in a car simulation then tiny changes in dt can actually make the simulation explode. ...&#xD;&#xA;&#xD;&#xA;*Should physics be stepped with constant deltas?* Yes.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The way to step the physics with constant deltas and not tie your physics update rate to the frame rate still is to use a time accumulator.  In my game I take it a step further.  I apply a smoothing function to incoming time.  That way large FPS spikes don't cause the physics to jump too far, instead they're simulated more quickly for a frame or two.&#xD;&#xA;&#xD;&#xA;You mention that with a fixed rate, the physics wouldn't sync up with the display.  This is true if the target physics rate is near the target frame rate.  It's worse the frame rate is larger than the physics rate.  In general it is better to target a physics update rate of twice your target FPS.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="2930" PostHistoryTypeId="2" PostId="1605" RevisionGUID="9adaabb4-9ee0-49ff-917b-bfbf1e28347b" CreationDate="2010-07-26T18:33:34.203" UserId="43" Text="Use [PlayClaw][1] if you want a game video recorder that barely slows down the computer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playclaw.com/" />
  <row Id="2931" PostHistoryTypeId="2" PostId="1606" RevisionGUID="9c3c918e-91ab-4d33-b2b9-891d249735d5" CreationDate="2010-07-26T18:34:35.543" UserId="73" Text="I'm new to 3D OpenGL/DirectX world and I found out that OpenGL 4.1 and GLSL specifications were just released today.&#xD;&#xA;&#xD;&#xA;A friend of mine gave me the Red Book for OGL v2.1 but, as far as I've read, 3.x and 4.x differ a lot from 2.x and a lot of things are deprecated now.&#xD;&#xA;&#xD;&#xA;Can I use the book to start learning the basics of 3D and CG or is it better to find a newer copy?" />
  <row Id="2932" PostHistoryTypeId="1" PostId="1606" RevisionGUID="9c3c918e-91ab-4d33-b2b9-891d249735d5" CreationDate="2010-07-26T18:34:35.543" UserId="73" Text="Is learning OpenGL 2.1 useless today?" />
  <row Id="2933" PostHistoryTypeId="3" PostId="1606" RevisionGUID="9c3c918e-91ab-4d33-b2b9-891d249735d5" CreationDate="2010-07-26T18:34:35.543" UserId="73" Text="&lt;opengl&gt;" />
  <row Id="2934" PostHistoryTypeId="2" PostId="1607" RevisionGUID="f15727f7-65af-40af-8113-08446b2d60c0" CreationDate="2010-07-26T18:38:54.070" UserId="370" Text="Rolling your own can be educational, but you often get more done if you can leverage an existing implementation (or at least start from there).&#xD;&#xA;&#xD;&#xA;I've used both [ENet][1] and [Raknet][2].  I only use Enet in a simple game but it did what I needed.  Enet uses a lower level API than Raknet.  Raknet was used in a little larger project.  Raknet is extremely powerful, but wants to make you structure your game around Raknet's framework.&#xD;&#xA;&#xD;&#xA;###Enet:&#xD;&#xA; * Connection Management&#xD;&#xA; * Sequencing&#xD;&#xA; * Channels&#xD;&#xA; * Reliability&#xD;&#xA; * Fragmentation and Reassembly&#xD;&#xA; * Aggregation&#xD;&#xA; * Adaptability&#xD;&#xA; * Portability&#xD;&#xA; * Freedom&#xD;&#xA;&#xD;&#xA;###Raknet:&#xD;&#xA; * Object replication&#xD;&#xA; * Autopatcher&#xD;&#xA; * Secure connections&#xD;&#xA; * Robust communication layer (basically all of Enets features rolled up in one item)&#xD;&#xA; * Remote procedure calls&#xD;&#xA; * Voice communication&#xD;&#xA; * NAT punchthrough&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://enet.bespin.org/&#xD;&#xA;  [2]: http://www.jenkinssoftware.com/raknet/" />
  <row Id="2935" PostHistoryTypeId="16" PostId="1607" RevisionGUID="f15727f7-65af-40af-8113-08446b2d60c0" CreationDate="2010-07-26T18:38:54.070" UserId="-1" />
  <row Id="2937" PostHistoryTypeId="2" PostId="1609" RevisionGUID="239b450e-1592-42fd-9f6b-ed2b3df7a4ad" CreationDate="2010-07-26T18:50:21.457" UserId="178" Text="I would say it's save to learn OpenGL using your Red Book, just ignore those things that are deprecated in the newer versions (like glBegin(), glEnd() - use VBO's instead). Most of the functionality in the newer versions was already available before through extensions." />
  <row Id="2938" PostHistoryTypeId="2" PostId="1610" RevisionGUID="4a5c9aa5-62b5-4312-811e-e2d44919cb5a" CreationDate="2010-07-26T18:55:51.070" UserId="613" Text="I would say it's not useless.&#xD;&#xA;&#xD;&#xA;Why? Well, while the rest of the world is supporting OpenGL 3.x and 4.0, Mac OS X still only supports OpenGL 2.1. And, OpenGL ES, which is used on most, if not all, portable platforms, is still widely supported at all versions: 1.0, 1.1, and 2.0; which are roughly comparable to OpenGL 1.4, 1.5, and 2.1, respectively.&#xD;&#xA;&#xD;&#xA;So until OpenGL ES 1.0 disappears completely from the face of the Earth, knowing OpenGL 2..x will *not* be a waste.&#xD;&#xA;&#xD;&#xA;That's not to say there isn't value in using OpenGL 3.x or 4.0 on platforms that support it, of course." />
  <row Id="2939" PostHistoryTypeId="2" PostId="1611" RevisionGUID="8bad5616-0378-4193-af64-b9615ce3f0ba" CreationDate="2010-07-26T18:56:22.257" UserId="907" Text="I'm at the point in my life where I'm starting to look at schools, and was hearing a lot of mixed things about schools such as Digipen or Fullsail that target game development specifically. As someone who is planning on becoming a programmer and getting into the games industry, would getting a game development degree be better than a traditional computer science degree?" />
  <row Id="2940" PostHistoryTypeId="1" PostId="1611" RevisionGUID="8bad5616-0378-4193-af64-b9615ce3f0ba" CreationDate="2010-07-26T18:56:22.257" UserId="907" Text="Game Development Degree vs Computer Science Degree" />
  <row Id="2941" PostHistoryTypeId="3" PostId="1611" RevisionGUID="8bad5616-0378-4193-af64-b9615ce3f0ba" CreationDate="2010-07-26T18:56:22.257" UserId="907" Text="&lt;subjective&gt;&lt;education&gt;" />
  <row Id="2942" PostHistoryTypeId="2" PostId="1612" RevisionGUID="0351f1ae-cfbd-4432-a522-ca1604685b1d" CreationDate="2010-07-26T19:05:10.940" UserId="51" Text="Schooling isn't going to get you a job.&#xD;&#xA;&#xD;&#xA;If you're good at what you do, and you care about it, you don't need a degree.&#xD;&#xA;&#xD;&#xA;A game-focused degree is good at helping you getting your foot in the door since a lot of those schools have teachers or advisors who are actually in the industry.  It'll also help you by providing you useful team experience.&#xD;&#xA;&#xD;&#xA;Also, and this is very important, a Computer Science degree *is not* about programming.  You might have a class here and there that might be useful, but the degree as a whole is not about good programming practices or really anything pragmatic that you would need on a day to day basis.  &#xD;&#xA;&#xD;&#xA;That being said, getting a CS degree usually implies going to a non-game-focused school, which also implies getting a more well rounded education, which might pay off end the end.  Also a lot of regular schools have game development programs these days which could get you some connections to the local industry.&#xD;&#xA;&#xD;&#xA;At least in my experience, getting a certificate from one of these game development colleges  is almost worthless on its own.  Unless you have side projects or have some kind of way of proving that you care about whatever field your interested in other than just going to school, you'll be going in the &quot;maybe somebody I'll get around to these people&quot; pile of resumes (hint: I won't)." />
  <row Id="2943" PostHistoryTypeId="2" PostId="1613" RevisionGUID="834ed5a6-4636-4797-b409-84f2afe731ad" CreationDate="2010-07-26T19:19:57.160" UserId="395" Text="Having a good general software engineering background is always the best way to go. I was one of the first students through RPI's game studies program (as a minor, major was still CS) and I would say I have gotten about 10x the practical value out of the non-game-related classes. As Tetrad says, the bigger issue is if you are a good programmer regardless of degrees or titles. I think at one point about 1/3 of our software team here didn't have a university degree. At least with RPI's game development classes it was mostly an excuse to get more experience building games which I probably would have done in my spare time anyway. A good, formal game design class is definitely worth looking in to though, mostly so you know more of the terminology used in the industry (&quot;MDA&quot;, &quot;system dynamics&quot;, &quot;prisoner's dilemma&quot;, etc). Few schools offer a good software engineering program, so CS/Games might be the best you can do, but be sure to pay attention to things like OS and network programming too or it will most surely come back to bite you." />
  <row Id="2944" PostHistoryTypeId="5" PostId="1531" RevisionGUID="5fc06197-117d-40e3-9407-855c5d7d6fea" CreationDate="2010-07-26T19:25:35.197" UserId="567" Comment="added 1 characters in body" Text="**NAME:** xTrap&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any type of game&#xD;&#xA;&#xD;&#xA;**WEBSITE:** http://www.wiselogic.co.kr/product4.htm&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA;unhappyly i can't read korean and i havent found much information regarding this one but i've seen quiet an amount of games using it." />
  <row Id="2945" PostHistoryTypeId="5" PostId="1528" RevisionGUID="3ed210ac-ffa8-4e8d-a9be-f68c1da9e845" CreationDate="2010-07-26T19:26:07.270" UserId="567" Comment="added 1 characters in body" Text="i would like to start this topic for programs to counter-attack [link text][1].&#xD;&#xA;&#xD;&#xA;I am not aware of a big list but with everyone's help i hope to make this a fine topic.&#xD;&#xA;&#xD;&#xA;Posting format:&#xD;&#xA;&#xD;&#xA;**NAME:** nProtect GameGuard&#xD;&#xA;&#xD;&#xA;**GAME TYPE:** any type of game&#xD;&#xA;&#xD;&#xA;**Website:** http://global.nprotect.com/product/gg.php&#xD;&#xA;&#xD;&#xA;**FEATURES?**&#xD;&#xA;&#xD;&#xA; - Protect the users' PC from fast&#xD;&#xA;   evolving hacking technologies and&#xD;&#xA;   viruses.&#xD;&#xA; - Real-time protection, diagnose&#xD;&#xA;   various patterns latest hacking tools&#xD;&#xA;   that can harm games, but also memory&#xD;&#xA;   debugging prevention technology will&#xD;&#xA;   be applied, completely blocking&#xD;&#xA;   hacking tools through real-time&#xD;&#xA;   hacking tool monitoring and blocking&#xD;&#xA;   function.&#xD;&#xA; - Blocks hacking attacks through memory&#xD;&#xA;   scan&#xD;&#xA; - Blocks online outflow of personal&#xD;&#xA;   information&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Cheating_in_online_games &quot;cheating in online games&quot;" />
  <row Id="2946" PostHistoryTypeId="2" PostId="1614" RevisionGUID="a7ad5399-eb0e-440a-b849-83d2504777c8" CreationDate="2010-07-26T19:27:51.777" UserId="891" Text="If you go for a Game Development Degree just know they don't hold much steam in normal programming positions.  Having said that, Digipen is probably the best program you could do.  They have very good relations with Valve and their student projects have won multiple [IGF][1] awards yearly.&#xD;&#xA;&#xD;&#xA;From Digipen students I have talked to they are very hard core game programming from the very beginning with industry focused skills like C++, OpenGL, and DirectX.&#xD;&#xA;&#xD;&#xA;If on the other hand you decide you want a more general Computer Science degree it will prepare you for general programming which is definitely not enough to land a good job as a games programmer.  Even worse a lot of schools are trending toward teaching Java as their language of choice.&#xD;&#xA;&#xD;&#xA;[Joel on Software - The Perils of JavaSchools][2]&#xD;&#xA;&#xD;&#xA;If you ever want to blow an interview or any chance at a game programming job, just say your primarily a Java programmer.&#xD;&#xA;&#xD;&#xA;I'm not trying to say it's impossible to land a good job as a game programmer with a CS degree but sadly a CS degree will be the least impressive thing on your resume.&#xD;&#xA;&#xD;&#xA;Having said all of that, a CS degree definitely won't hurt.  Just expect to be spending every spare moment working on side projects and creating an awesome portfolio.  Those two things will land you your job.  The CS degree is more of a safety net in case you end up not liking 100+ hr crunch times which last for 6 month periods =) *(that's a bit extreme but not that uncommon)*&#xD;&#xA;&#xD;&#xA;  [1]: http://www.igf.com/&#xD;&#xA;  [2]: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html" />
  <row Id="2947" PostHistoryTypeId="5" PostId="1612" RevisionGUID="72f2a041-6fe1-48b5-b6af-a4d64f9f8395" CreationDate="2010-07-26T19:30:14.733" UserId="51" Comment="added 43 characters in body" Text="Schooling isn't going to get you a job.&#xD;&#xA;&#xD;&#xA;If you're good at what you do, and you care about it, you don't need a degree.&#xD;&#xA;&#xD;&#xA;A game-focused degree is good at helping you getting your foot in the door since a lot of those schools have teachers or advisors who are actually in the industry.  It'll also help you by providing you useful team experience.&#xD;&#xA;&#xD;&#xA;Also, and this is very important, a Computer Science degree *is not* about programming.  You might have a class here and there that might be useful, but the degree as a whole is not about good programming practices or really anything pragmatic that you would need on a day to day basis.  (Note: this may vary based on your school.)&#xD;&#xA;&#xD;&#xA;That being said, getting a CS degree usually implies going to a non-game-focused school, which also implies getting a more well rounded education, which might pay off end the end.  Also a lot of regular schools have game development programs these days which could get you some connections to the local industry.&#xD;&#xA;&#xD;&#xA;At least in my experience, getting a certificate from one of these game development colleges  is almost worthless on its own.  Unless you have side projects or have some kind of way of proving that you care about whatever field your interested in other than just going to school, you'll be going in the &quot;maybe somebody I'll get around to these people&quot; pile of resumes (hint: I won't)." />
  <row Id="2949" PostHistoryTypeId="2" PostId="1615" RevisionGUID="5099cbbb-191e-41c7-ae0d-181c45de88cc" CreationDate="2010-07-26T19:57:39.770" UserDisplayName="Radnen" Text="There is a difference between game design and game programming. Now, a lot of game companies use different API's, so having the skills to adjust to a new coding environment is a great skill to have, or you'll be very sorry.&#xD;&#xA;&#xD;&#xA;I have seen programs that also teach you a specific set of tools and resources. This specification is great for a while.&#xD;&#xA;&#xD;&#xA;As a *programmer* for the industry its better to just get a CS degree. And, you'll learn design by simply being in the industry and perhaps work up to the position of being designer if you are also *creative*. However, A lot of leading game designers have degrees from finance to mechanical engineering. So, it doesn't really matter too much what degree you really get, but by the end of the day buddy its really rare to be a lead designer without working up, and landing a programming job with a solid CS background is definitely the best way to go.&#xD;&#xA;&#xD;&#xA;The bottom line:&#xD;&#xA;A CS degree will help in the game field. Most of the time you are working with middle wear or editing components. By the end of the day you probably never realized you worked on a game!" />
  <row Id="2950" PostHistoryTypeId="2" PostId="1616" RevisionGUID="a30e8817-cfde-4826-9683-31446203d7ac" CreationDate="2010-07-26T19:58:41.233" UserId="1067" Text="Other than using a wiki, what good (or purpose-built) tools allow for collaborative work on a game treatment?&#xD;&#xA;&#xD;&#xA;I have a couple ideas I'd like to get fleshed-out and built, and have a small team who will work me on the project(s). How can we best iterate-over and define the game-play, graphical styles, etc?" />
  <row Id="2951" PostHistoryTypeId="1" PostId="1616" RevisionGUID="a30e8817-cfde-4826-9683-31446203d7ac" CreationDate="2010-07-26T19:58:41.233" UserId="1067" Text="Game treatment collaboration tools" />
  <row Id="2952" PostHistoryTypeId="3" PostId="1616" RevisionGUID="a30e8817-cfde-4826-9683-31446203d7ac" CreationDate="2010-07-26T19:58:41.233" UserId="1067" Text="&lt;tools&gt;&lt;hobby-development&gt;" />
  <row Id="2953" PostHistoryTypeId="2" PostId="1617" RevisionGUID="e3c321d7-6e41-4337-9633-a1d9211dd1df" CreationDate="2010-07-26T20:02:58.477" UserId="395" Text="[Git](http://git-scm.com/) + [Sphinx](http://sphinx.pocoo.org/) is the best solution I've found lately. Substitute git for hg if you prefer, but the general principle is the same. Wikis are generally not so good for such a highly structured document will multiple concurrent editors." />
  <row Id="2954" PostHistoryTypeId="2" PostId="1618" RevisionGUID="07405bea-5b75-4f82-b54d-d340fe5b101e" CreationDate="2010-07-26T20:13:52.693" UserId="539" Text="Personally I think your best bet is to use a funnel-like process.&#xD;&#xA;&#xD;&#xA;1. Team generates ideas. No criticism at this point just write stuff down. Wikis, Skype, group chat are all good tools here. Each person should generate ~20 ideas at this stage.&#xD;&#xA;&#xD;&#xA;2. Filter through ideas. You can do this alone or with the team. Most likely start by picking a few key qualities to optimize for. (e.g. novelty, depth, time to create.) Put ideas into buckets, start eliminating ones that don't meet the cut. You should end up with ~1 idea per a person at this stage.&#xD;&#xA;&#xD;&#xA;3. Prototype ideas, still no coding or very limited coding. Best bet would be to use pen &amp; paper to draw out some of the interactions. You could also use something like XNA, Game Maker, or Flash to prototype ideas quickly and cheaply. Identify the best one at this point.&#xD;&#xA;&#xD;&#xA;4. Implement more features in waves, no more than 1 day per a feature. At the end of each day test what you have and measure it against the qualities you were optimizing for in step 2. Cut the features that don't seem to be helping and do more of the stuff which is. Most likely use version control to distribute source code for prototypes, e-mail, a wiki, etc for feedback.&#xD;&#xA;&#xD;&#xA;Tools to use:&#xD;&#xA;&#xD;&#xA;  * Git, SVN for version control&#xD;&#xA;  * DropBox, Git, SVN for distributing builds&#xD;&#xA;  * E-mail, Wiki, Google Docs, Google Wave, Chatterous, Skype for feedback, discussion&#xD;&#xA;  * GitHub, Mantis, Jira for issue tracking&#xD;&#xA;  * SCRUM, Kanban for development process" />
  <row Id="2955" PostHistoryTypeId="2" PostId="1619" RevisionGUID="d59c2330-c388-4920-9abf-25ca4e0a5d3b" CreationDate="2010-07-26T20:22:02.970" UserId="119" Text="I think there are really 3 options, but you're listing them as only 2:&#xD;&#xA;&#xD;&#xA;**Option 1**&#xD;&#xA;&#xD;&#xA;Do nothing. Attempt to update and render at a certain interval, e.g. 60 times per second. If it falls behind, let it and don't worry. The games will slow down into jerky slow motion if the CPU can't keep up with your game. This option won't work at all for real-time multi-user games, but is fine for single player games and has been used successfully in many games.&#xD;&#xA;&#xD;&#xA;**Option 2**&#xD;&#xA;&#xD;&#xA;Use the delta time between each update to vary the movement of objects. Great in theory, especially if nothing in your game accelerates or decelerates, but just moves at a constant speed. In practice, many developers implement this badly, and it can lead to inconsistent collision detection and physics. It seems some developers think this method is easier than it is. If you want to use this option you need to step your game up considerably and bring out some big-gun maths and algorithms, for example using a Verlet physics integrator (rather than the standard Euler that most people use) and using rays for collision detection rather than simple Pythagoras distance checks. I asked a question about this on Stack Overflow a while back and got some great answers:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/153507/calculate-the-position-of-an-accelerating-body-after-a-certain-time][1]&#xD;&#xA;&#xD;&#xA;**Option 3**&#xD;&#xA;&#xD;&#xA;Use Gaffer's &quot;fix your time step&quot; approach. Update the game in fixed steps as in option 1, but do so multiple times per frame rendered - based on how much time has elapsed - so that the game logic keeps up with real time, while remaining in discrete steps. This way, easy to implement game logic like Euler integrators and simple collision detection still work. You also have the option of interpolating graphical animations based on delta time, but this is only for visual effects, and nothing that affects your core game logic. You can potentially get in trouble if your updates are very intensive - if the updates fall behind, you will need more and more of them to keep up, potential making your game even less responsive.&#xD;&#xA;&#xD;&#xA;Personally, I like Option 1 when I can get away with it and Option 3 when I need to sync to real time. I respect that Option 2 can be a good option when you know what you're doing, but I know my limitations well enough to stay well away from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/153507/calculate-the-position-of-an-accelerating-body-after-a-certain-time" />
  <row Id="2957" PostHistoryTypeId="5" PostId="1605" RevisionGUID="dc162faa-1e85-4102-b78d-790f185f17e2" CreationDate="2010-07-26T21:12:50.683" UserId="43" Comment="added 81 characters in body; added 55 characters in body" Text="Record using [PlayClaw][1] if you want a game video without barely slowing down your computer. This is an windows option. There's more options available for linux such as [glc][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playclaw.com/&#xD;&#xA;  [2]: http://nullkey.ath.cx/projects/glc/" />
  <row Id="2958" PostHistoryTypeId="5" PostId="1605" RevisionGUID="82bca58f-9a53-45b7-acfa-b731a39eea9f" CreationDate="2010-07-26T21:18:19.270" UserId="43" Comment="deleted 13 characters in body" Text="If on Windows record using [PlayClaw][1] if you want a game video without barely slowing down your computer. There's more options available for linux such as [glc][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playclaw.com/&#xD;&#xA;  [2]: http://nullkey.ath.cx/projects/glc/" />
  <row Id="2959" PostHistoryTypeId="2" PostId="1621" RevisionGUID="630d08d4-27c8-49b5-b75e-317a9472f559" CreationDate="2010-07-26T21:25:36.153" UserId="119" Text="If you can find a degree like the one at Digipen where you learn to build games from the bottom-up in C++, I would recommend taking it. To have a shot in the traditional gamedev world you need to know C++ really well, but if games are your passion and your life, you may get bored on a non-gaming degree and potentially drop-out - I know I would! Especially CS, where you barely learn to program. Any employer that would hire a CS graduate over a more highly skilled programmer from a gaming degree isn't worth working for.&#xD;&#xA;&#xD;&#xA;Of course, if want to sidestep the traditional games career path entirely you could just get a copy of Unity or Flash and start making games. In the indie world qualifications are worth nothing and talent is everything!" />
  <row Id="2961" PostHistoryTypeId="5" PostId="1605" RevisionGUID="41f7d8b6-a0df-468f-b003-3fa06e49aa91" CreationDate="2010-07-26T21:29:45.470" UserId="43" Comment="added 1 characters in body" Text="If on Windows, record using [PlayClaw][1] if you want a game video without barely slowing down your computer. There's more options available for linux such as [glc][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playclaw.com/&#xD;&#xA;  [2]: http://nullkey.ath.cx/projects/glc/" />
  <row Id="2962" PostHistoryTypeId="5" PostId="445" RevisionGUID="43780c00-6f94-4c32-a4ba-b02397763a18" CreationDate="2010-07-26T21:31:08.653" UserId="162" Comment="Grammar + capitalization fixes" Text="What is wrong with the Linux/*nix family for games? What makes the development of games for this platform too slow compared to Windows or even OS X?" />
  <row Id="2963" PostHistoryTypeId="4" PostId="445" RevisionGUID="43780c00-6f94-4c32-a4ba-b02397763a18" CreationDate="2010-07-26T21:31:08.653" UserId="162" Comment="Grammar + capitalization fixes" Text="Why is there a lack of games for Linux?" />
  <row Id="2964" PostHistoryTypeId="6" PostId="445" RevisionGUID="43780c00-6f94-4c32-a4ba-b02397763a18" CreationDate="2010-07-26T21:31:08.653" UserId="162" Comment="Grammar + capitalization fixes" Text="&lt;windows&gt;&lt;linux&gt;&lt;platform&gt;&lt;operating-system&gt;" />
  <row Id="2965" PostHistoryTypeId="4" PostId="1557" RevisionGUID="4a1f0cb5-2f20-40ed-9cca-c05af2cdac43" CreationDate="2010-07-26T21:33:47.670" UserId="162" Comment="Spelling" Text="Should beginning/indie game developers target multiple platforms initially?" />
  <row Id="2967" PostHistoryTypeId="5" PostId="1612" RevisionGUID="b17865b0-3cf7-4186-8703-55d9054ac6f7" CreationDate="2010-07-26T21:39:09.980" UserId="51" Comment="added 692 characters in body; added 18 characters in body" Text="Schooling isn't going to get you a job.&#xD;&#xA;&#xD;&#xA;If you're good at what you do, and you care about it, you don't need a degree.&#xD;&#xA;&#xD;&#xA;A game-focused degree is good at helping you getting your foot in the door since a lot of those schools have teachers or advisors who are actually in the industry.  It'll also help you by providing you useful team experience.&#xD;&#xA;&#xD;&#xA;Also, and this is very important, a Computer Science degree *is not* about programming.  You might have a class here and there that might be useful, but the degree as a whole is not about good programming practices or really anything pragmatic that you would need on a day to day basis.  (Note: this may vary based on your school.)&#xD;&#xA;&#xD;&#xA;That being said, getting a CS degree usually implies going to a non-game-focused school, which also implies getting a more well rounded education, which might pay off end the end.  Also a lot of regular schools have game development programs these days which could get you some connections to the local industry.&#xD;&#xA;&#xD;&#xA;At least in my experience, getting a certificate from one of these game development colleges  is almost worthless on its own.  Unless you have side projects or have some kind of way of proving that you care about whatever field your interested in other than just going to school, you'll be going in the &quot;maybe somebody I'll get around to these people&quot; pile of resumes (hint: I won't).&#xD;&#xA;&#xD;&#xA;*Edit*: since I really didn't answer the question, basically my opinion is this:&#xD;&#xA;&#xD;&#xA;If you have the motivation to work on games in your spare time, do that and get a traditional education.  It'll pay off in more ways than if you just went to more of a niche school. &#xD;&#xA;&#xD;&#xA;If you're the kind of person that works better when somebody is telling them to do something, or if you need to feel like your money is on the line, try to go for a game dev school instead.&#xD;&#xA;&#xD;&#xA;If your sole focus in life is to get into the game industry (it shouldn't be), and you're smart and motivated enough, try taking a year and working on things in your spare time (mods, solo projects, demos, whatever) and bypassing both options." />
  <row Id="2968" PostHistoryTypeId="2" PostId="1623" RevisionGUID="18e48a9e-4e6d-416c-abe9-0c5aa7c60940" CreationDate="2010-07-26T21:50:31.807" UserId="824" Text="I've used Windows Media Encoder a couple of times to record videos of my games and tools - it's free and produdes good quality videos. &#xD;&#xA;&#xD;&#xA;Although, I've wondered the same question too, because recording a video is only half the process (if that). The other half is editing it, adding effects, etc. Windows Movie Maker kinda works but it's fairly simplistic... and crashy." />
  <row Id="2969" PostHistoryTypeId="5" PostId="1605" RevisionGUID="185f7f5d-7268-4d2b-996b-57e00bfc5876" CreationDate="2010-07-26T22:08:25.977" UserId="43" Comment="deleted 15 characters in body; deleted 16 characters in body" Text="If on Windows, record using [PlayClaw][1] if you want a game video without barely slowing down your computer. On Linux you have [glc][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playclaw.com/&#xD;&#xA;  [2]: http://nullkey.ath.cx/projects/glc/" />
  <row Id="2970" PostHistoryTypeId="2" PostId="1624" RevisionGUID="1b13ac4a-0650-4c0e-865d-ac5d2f162fc8" CreationDate="2010-07-26T22:08:57.193" UserId="450" Text="In addition to the article linked in other answers, I can tell a bit about the experience of the [Arianne Project][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to keep things synchronized?** &#xD;&#xA;&#xD;&#xA;We have build framework „[Marauroa][2]“ around the concept of actions and perceptions: Actions are sent from the client to the server carrying user input like (walk left, attack monsters #47, say 'hello'). And perceptions are sent from the server to the clients telling them about the state of the world closely around them. Those perceptions are sent every turn. Depending on the game we use turn times of 30ms to 300ms.&#xD;&#xA;&#xD;&#xA;We have two types of [perceptions][3]: A full perception is sent on login and when the player enters a new area (zone). After that differential perceptions are sent including only the modified attributes (e. g. position) of the modified objects, and of course new and removed objects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to work around latency problems?**&#xD;&#xA;&#xD;&#xA;We strongly belief in “the server is always right”. The client does some predictions like smooth walking, collisions checks and so on. But if a client and the server disagree about something, the server wins. The subproject [Stendhal][4] (a 2D RPG) uses a turn time of 300ms by default (with a lot of smoothing done client side). This makes Stendhal very resistant against lag.&#xD;&#xA;&#xD;&#xA;Note: Some other games trust the client to some extend to minimize the impact of network lag. In WoW it was often exploited in one of the battle field called “Warsong Gulch”. There are two ways which a player with the flag can choose: On in the middle through a tunnel and one on the right sight going up the hill. So a cheating player runs towards the tunnel, and then causes lag for himself. The server and the other clients will continue to see him running towards it. But after a little time this client can tell the server that it went towards the hill. WoW will check that the distance between the last transmitted coordinates and the current ones fits within the time segment and accept that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to protect the communication and client from reverse engineering?**&#xD;&#xA; &#xD;&#xA;Arianne is completely open source, this include the client, server, graphics, music. And of course that includes our [protocol documentation][5] and even an analyzer used for debugging.&#xD;&#xA;&#xD;&#xA;It is easy to protect the communication against unauthorized sniffing by third parties using SSL.&#xD;&#xA;&#xD;&#xA;It is, however, impossible to protect it against reverse engineering. Sure you can obfuscate it and use anti debugging techniques. But in the end you cannot prevent reverse engineering of software you give away to users. There is a very interesting presentation on how Skype was reversed engineered despite the developers putting a lot of effort into anti debugging techniques: http://recon.cx/en/f/vskype-part1.pdf&#xD;&#xA;&#xD;&#xA;Note: There are some countries in which reverse engineering is illegal or which allow to put a paragraph into the license or ToS disallowing reverse engineering. But there are other countries (like the one I am living in) which explicitly allow reverse engineering in the context of developing compatible data storage formats or transmissions protocols, paragraphs in the license or ToS trying to disallow that are void. (Everything in this section is as far as I know, I am not a lawyer)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Which things should be computed local and which things on the server?**&#xD;&#xA;&#xD;&#xA;We compute everything related to the game logic on the server. The client will predict certain events in order to make the game play smoothly. But in the end the server is always right.&#xD;&#xA;&#xD;&#xA;Predicted events are for example stopping of movement when a collision is hit. Stendhal uses a grid to position elements. And from the server point of view, the top left corner of every entity is on exactly one square. But the client will move them around smoothly between tiles. It will draw the pseudo 3d effect, too. So an entity that has a base of 1x1 may be higher in the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to balance load problems?** &#xD;&#xA;&#xD;&#xA;Try to keep this as simple as possible, to ease maintenance.&#xD;&#xA;&#xD;&#xA;Load balancing of static content is well known in the area of http server clusters and content distribution networks.&#xD;&#xA;&#xD;&#xA;An rather simple concept for load balancing of game services is to split servers across regions/zones. So zone A-C are on one server and zones D-F are on another. This is especially easy if you cannot look from zones in one set to zones in another set. You need to put some checks in there so that a client can only connect to a zone server responsible for the zone the player is in.&#xD;&#xA;&#xD;&#xA;The easiest way to transfer players from one server to the other is to write them to the database, tell the client to connect to the other zone server, and disconnect them from the current one. The client will then connect to the new zone server which will load it from the database. (Since you need the load from / store to database code anyway, direct communication between the servers for handover can be implemented later).&#xD;&#xA;&#xD;&#xA;Some additional global services are needed through: On login the clients have to be told to connect to the correct zone server. And you might want a world wide chat system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://arianne.sourceforge.net/&#xD;&#xA;  [2]: http://stendhalgame.org/wiki/Marauroa&#xD;&#xA;  [3]: http://stendhalgame.org/wiki/RolePlayingDesign#Perceptions&#xD;&#xA;  [4]: http://stendhalgame.org&#xD;&#xA;  [5]: http://stendhalgame.org/wiki/NetworkDesign" />
  <row Id="2971" PostHistoryTypeId="16" PostId="1624" RevisionGUID="1b13ac4a-0650-4c0e-865d-ac5d2f162fc8" CreationDate="2010-07-26T22:08:57.193" UserId="-1" />
  <row Id="2972" PostHistoryTypeId="5" PostId="1624" RevisionGUID="6469b4f0-8834-4d2a-9cc0-416a806d9358" CreationDate="2010-07-26T22:14:12.477" UserId="450" Comment="added 710 characters in body" Text="In addition to the article linked in other answers, I can tell a bit about the experience of the [Arianne Project][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to keep things synchronized?** &#xD;&#xA;&#xD;&#xA;We have build framework „[Marauroa][2]“ around the concept of actions and perceptions: Actions are sent from the client to the server carrying user input like (walk left, attack monsters #47, say 'hello'). And perceptions are sent from the server to the clients telling them about the state of the world closely around them. Those perceptions are sent every turn. Depending on the game we use turn times of 30ms to 300ms.&#xD;&#xA;&#xD;&#xA;We have two types of [perceptions][3]: A full perception is sent on login and when the player enters a new area (zone). After that differential perceptions are sent including only the modified attributes (e. g. position) of the modified objects, and of course new and removed objects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to work around latency problems?**&#xD;&#xA;&#xD;&#xA;We strongly belief in “the server is always right”. The client does some predictions like smooth walking, collisions checks and so on. But if a client and the server disagree about something, the server wins. The subproject [Stendhal][4] (a 2D RPG) uses a turn time of 300ms by default (with a lot of smoothing done client side). This makes Stendhal very resistant against lag.&#xD;&#xA;&#xD;&#xA;Note: Some other games trust the client to some extend to minimize the impact of network lag. In WoW it was often exploited in one of the battle field called “Warsong Gulch”. There are two ways which a player with the flag can choose: On in the middle through a tunnel and one on the right sight going up the hill. So a cheating player runs towards the tunnel, and then causes lag for himself. The server and the other clients will continue to see him running towards it. But after a little time this client can tell the server that it went towards the hill. WoW will check that the distance between the last transmitted coordinates and the current ones fits within the time segment and accept that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Use of UDP vs. TCP**&#xD;&#xA;&#xD;&#xA;In early versions we used UDP to reduce the overhead of TCP. We handled lost packets on our own. This worked perfectly at the early days of the project. But when the server was moved from some home DSL connection to a real data center several years ago, we got huge issues. UDP is (or at least was 5 years ago) extremely demanding on CPU power of firewall hardware: The ruleset has to be applied to every single UDP packet. For TCP, however, the ruleset is only applied for the first 3 packets. After that the connection is established. All following packets will bypass the normal ruleset because they are in the connecting tracking table or because they don't have a SYN flag.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to protect the communication and client from reverse engineering?**&#xD;&#xA; &#xD;&#xA;Arianne is completely open source, this include the client, server, graphics, music. And of course that includes our [protocol documentation][5] and even an analyzer used for debugging.&#xD;&#xA;&#xD;&#xA;It is easy to protect the communication against unauthorized sniffing by third parties using SSL.&#xD;&#xA;&#xD;&#xA;It is, however, impossible to protect it against reverse engineering. Sure you can obfuscate it and use anti debugging techniques. But in the end you cannot prevent reverse engineering of software you give away to users. There is a very interesting presentation on how Skype was reversed engineered despite the developers putting a lot of effort into anti debugging techniques: http://recon.cx/en/f/vskype-part1.pdf&#xD;&#xA;&#xD;&#xA;Note: There are some countries in which reverse engineering is illegal or which allow to put a paragraph into the license or ToS disallowing reverse engineering. But there are other countries (like the one I am living in) which explicitly allow reverse engineering in the context of developing compatible data storage formats or transmissions protocols, paragraphs in the license or ToS trying to disallow that are void. (Everything in this section is as far as I know, I am not a lawyer)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Which things should be computed local and which things on the server?**&#xD;&#xA;&#xD;&#xA;We compute everything related to the game logic on the server. The client will predict certain events in order to make the game play smoothly. But in the end the server is always right.&#xD;&#xA;&#xD;&#xA;Predicted events are for example stopping of movement when a collision is hit. Stendhal uses a grid to position elements. And from the server point of view, the top left corner of every entity is on exactly one square. But the client will move them around smoothly between tiles. It will draw the pseudo 3d effect, too. So an entity that has a base of 1x1 may be higher in the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How to balance load problems?** &#xD;&#xA;&#xD;&#xA;Try to keep this as simple as possible, to ease maintenance.&#xD;&#xA;&#xD;&#xA;Load balancing of static content is well known in the area of http server clusters and content distribution networks.&#xD;&#xA;&#xD;&#xA;An rather simple concept for load balancing of game services is to split servers across regions/zones. So zone A-C are on one server and zones D-F are on another. This is especially easy if you cannot look from zones in one set to zones in another set. You need to put some checks in there so that a client can only connect to a zone server responsible for the zone the player is in.&#xD;&#xA;&#xD;&#xA;The easiest way to transfer players from one server to the other is to write them to the database, tell the client to connect to the other zone server, and disconnect them from the current one. The client will then connect to the new zone server which will load it from the database. (Since you need the load from / store to database code anyway, direct communication between the servers for handover can be implemented later).&#xD;&#xA;&#xD;&#xA;Some additional global services are needed through: On login the clients have to be told to connect to the correct zone server. And you might want a world wide chat system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://arianne.sourceforge.net/&#xD;&#xA;  [2]: http://stendhalgame.org/wiki/Marauroa&#xD;&#xA;  [3]: http://stendhalgame.org/wiki/RolePlayingDesign#Perceptions&#xD;&#xA;  [4]: http://stendhalgame.org&#xD;&#xA;  [5]: http://stendhalgame.org/wiki/NetworkDesign" />
  <row Id="2973" PostHistoryTypeId="2" PostId="1625" RevisionGUID="94eb3a31-0a3b-4849-9ef6-34601686fc91" CreationDate="2010-07-26T22:22:57.197" UserId="302" Text="For recording your game footage, you could try [CamStudio][1], which is free. I find that it doesn't work with games in full screen mode though, so you'll want to run your game in a window.&#xD;&#xA;&#xD;&#xA;As for making the actual trailer, you'll want some video editing software. There are several expensive commercial options, but if you're looking for something free, your choice is more limited. You could try Windows Movie Maker, or iMovie if you have a Mac, but the best free video editor I've found is [Blender][2], more widely known as a 3D modeling and animation tool. The UI isn't intuitive, but if you spend some time to learn it, you'll also get your hands on a pretty good video editing tool.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://camstudio.org/&#xD;&#xA;  [2]: http://blender.org/" />
  <row Id="2974" PostHistoryTypeId="5" PostId="1589" RevisionGUID="db2ef6fb-fe2d-4375-b278-f11ba629871d" CreationDate="2010-07-26T22:25:39.517" UserId="1012" Comment="added example code + description of two possible options" Text="What is better for games when developing game loops, fixed time steps or variable time steps?  What type of games are better with one or the other?&#xD;&#xA;&#xD;&#xA;**Variable time steps:**&#xD;&#xA;&#xD;&#xA;With variable time step, I mean physics updates will take in some sort of &quot;time elapsed since last update&quot; argument and hence dependent on framerate.  This may mean doing calculations as position = position + distancePerSecond*timeElapsed.&#xD;&#xA;&#xD;&#xA; - pro: smooth&#xD;&#xA; - pro: easier to to code&#xD;&#xA; - con: hard to record/replay actions as time steps vary&#xD;&#xA; - con: weird physics errors that are hard to predict with very small or large time steps&#xD;&#xA;&#xD;&#xA;eg (from dewitters):&#xD;&#xA;&#xD;&#xA;    while( game_is_running ) {&#xD;&#xA;        prev_frame_tick = curr_frame_tick;&#xD;&#xA;        curr_frame_tick = GetTickCount();&#xD;&#xA;        update( curr_frame_tick - prev_frame_tick );&#xD;&#xA;        render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Fixed time steps:**&#xD;&#xA;&#xD;&#xA;With fixed time steps, the update method may not even accept a &quot;time elapsed&quot; as it assumes that each update is for a fixed time period.  Calculations may be done as position = position + distancePerUpdate.  The example includes an interpolation during render.&#xD;&#xA;&#xD;&#xA; - pro: physics are very predictable&#xD;&#xA; - pro: easier to record actions per time step as they are fixed&#xD;&#xA; - pro: possibly easier to sync up with other players over network?&#xD;&#xA; - pro: don't have to confuse all calculations with timeElapsed variable everywhere&#xD;&#xA; - con: it will never sync up vertical refresh so you either have jittery graphics or you have to always interpolate.&#xD;&#xA; - con: maximum frame rate is limited unless you interpolate&#xD;&#xA; - con: hard to work within frameworks that assume variable time steps (like pyglet or flixel)&#xD;&#xA;&#xD;&#xA;eg (from dewitters):&#xD;&#xA;&#xD;&#xA;    while( game_is_running ) {&#xD;&#xA;        while( GetTickCount() &gt; next_game_tick) {&#xD;&#xA;            update();&#xD;&#xA;            next_game_tick += SKIP_TICKS;&#xD;&#xA;        }&#xD;&#xA;        interpolation = float( GetTickCount() + SKIP_TICKS - next_game_tick ) / float( SKIP_TICKS );&#xD;&#xA;        render( interpolation );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Notes:** &#xD;&#xA;&#xD;&#xA; - [Gaffer on games: Fix your timestep!][4] &#xD;&#xA; - [deWitter's game loop article][3]&#xD;&#xA; - [Quake 3's fps affects jump physics][2]  Allegedly this is one reason why Doom 3 is frame locked at 60fps?&#xD;&#xA; - Flixel requires a variable timestep (I think this is determined by Flash) whereas Flashpunk allows you fixed and variable timesteps.  &#xD;&#xA; - Box2d docs seems to suggest that it likes constant time steps. See [Simulating the World of Box2D][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/manual.html#_Toc253068188&#xD;&#xA;  [2]: http://web.archive.org/web/20080404111108/http://ucguides.savagehelp.com/Quake3/FAQFPSJumps.html&#xD;&#xA;  [3]: http://dewitters.koonsolo.com/gameloop.html&#xD;&#xA;  [4]: http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="2975" PostHistoryTypeId="2" PostId="1626" RevisionGUID="260dbbfa-fff4-4ecf-b01a-29a449fa88d7" CreationDate="2010-07-26T22:41:08.350" UserId="857" Text="I've seen box2d and bullet ports into javascript, but neither of them attracted me particularly, except by source code.&#xD;&#xA;&#xD;&#xA;It all seemed, after all, quite simple once I looked inside them. But what are they doing within each of those libraries to get nice physics simulation? Are they explained anywhere?&#xD;&#xA;&#xD;&#xA;It's all right to just list them and explain shortly, then provide bunch of links. I know even physics approximations are a wide topic that can't be answered with four paragraphs." />
  <row Id="2976" PostHistoryTypeId="1" PostId="1626" RevisionGUID="260dbbfa-fff4-4ecf-b01a-29a449fa88d7" CreationDate="2010-07-26T22:41:08.350" UserId="857" Text="Physics library internals" />
  <row Id="2977" PostHistoryTypeId="3" PostId="1626" RevisionGUID="260dbbfa-fff4-4ecf-b01a-29a449fa88d7" CreationDate="2010-07-26T22:41:08.350" UserId="857" Text="&lt;programming&gt;&lt;physics&gt;&lt;box2d&gt;&lt;techniques&gt;" />
  <row Id="2978" PostHistoryTypeId="5" PostId="1618" RevisionGUID="9d3be8f2-ea8e-45b0-bd78-01f24f984c0d" CreationDate="2010-07-26T22:41:49.207" UserId="539" Comment="added 342 characters in body" Text="Personally I think your best bet is to use a funnel-like process.&#xD;&#xA;&#xD;&#xA;1. Team generates ideas. No criticism at this point just write stuff down. Wikis, Skype, group chat are all good tools here. Each person should generate ~20 ideas at this stage.&#xD;&#xA;&#xD;&#xA;2. Filter through ideas. You can do this alone or with the team. Most likely start by picking a few key qualities to optimize for. (e.g. novelty, depth, time to create.) Put ideas into buckets, start eliminating ones that don't meet the cut. You should end up with ~1 idea per a person at this stage. Consider using Excel or Google Spreadsheet to help you slice &amp; dice and visualize your data.&#xD;&#xA;&#xD;&#xA;3. Prototype ideas, still no coding or very limited coding. Best bet would be to use pen &amp; paper to draw out some of the interactions. You could also use something like XNA, Game Maker, or Flash to prototype ideas quickly and cheaply. Identify the best one at this point.&#xD;&#xA;&#xD;&#xA;4. Implement more features in waves, no more than 1 day per a feature. At the end of each day test what you have and measure it against the qualities you were optimizing for in step 2. Cut the features that don't seem to be helping and do more of the stuff which is. Most likely use version control to distribute source code for prototypes, e-mail, a wiki, etc for feedback.&#xD;&#xA;&#xD;&#xA;Tools to use:&#xD;&#xA;&#xD;&#xA;  * Git, SVN for version control&#xD;&#xA;  * DropBox, Git, SVN for distributing builds&#xD;&#xA;  * E-mail, Wiki, Google Docs, Google Wave, Chatterous, Skype for feedback, discussion&#xD;&#xA;  * GitHub, Mantis, Jira for issue tracking&#xD;&#xA;  * SCRUM, Kanban for development process&#xD;&#xA;  * Excel, Google Spreadsheets to work with feedback / break features down and visualize results&#xD;&#xA;&#xD;&#xA;*Edited to add mention to spreadsheets, we often forget it but Excel is easy to use, powerful, and creates visuals which communicate a lot quickly*" />
  <row Id="2979" PostHistoryTypeId="2" PostId="1627" RevisionGUID="7de3f8cc-78b0-460a-9d92-35ec650be308" CreationDate="2010-07-26T22:48:44.720" UserId="539" Text="This is a two part question. Let's say I release a new Flash game to the web. Once players start playing I want to understand how it is performing:&#xD;&#xA;&#xD;&#xA;1. What common performance criteria do people track? (e.g. viral coefficient, play length, returning players.)&#xD;&#xA;&#xD;&#xA;2. How should I go about measuring and monitoring these attributes? Are there any off the shelf tools?&#xD;&#xA;&#xD;&#xA;(Note I couldn't add the tags I wanted to, so this is grossly mistagged... it should be under &quot;data-driven-development&quot; and &quot;analytics&quot;)" />
  <row Id="2980" PostHistoryTypeId="1" PostId="1627" RevisionGUID="7de3f8cc-78b0-460a-9d92-35ec650be308" CreationDate="2010-07-26T22:48:44.720" UserId="539" Text="What type of dashboard should I create to understand how my game is performing?" />
  <row Id="2981" PostHistoryTypeId="3" PostId="1627" RevisionGUID="7de3f8cc-78b0-460a-9d92-35ec650be308" CreationDate="2010-07-26T22:48:44.720" UserId="539" Text="&lt;flash&gt;&lt;project-management&gt;" />
  <row Id="2982" PostHistoryTypeId="5" PostId="1220" RevisionGUID="c97cf088-834d-4ff2-8dac-1b4a1f882aab" CreationDate="2010-07-26T22:49:53.767" UserId="804" Comment="added 79 characters in body" Text="Also once you have gotten sponsorship (or decided against it) and implemented ads like MochiAds, throw your game onto these two distribution systems, which will let all the many many smaller sites grab your game:&#xD;&#xA;&#xD;&#xA; - [Mochi Game Distribution][1]&#xD;&#xA; - [FlashGameDistribution.com][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.mochimedia.com/developers/distribution.html&#xD;&#xA;  [2]: http://flashgamedistribution.com/" />
  <row Id="2984" PostHistoryTypeId="5" PostId="1581" RevisionGUID="24a2697b-1a00-4c5b-830a-6a54bc330b19" CreationDate="2010-07-26T22:56:18.593" UserId="666" Comment="added 3384 characters in body" Text="**Game Design**&#xD;&#xA;&#xD;&#xA; - [The Art of Computer Game Design][1] by Chris Crawford (1984) [PDF]&#xD;&#xA; - [Balance of Power][2] by Chris Crawford (1986) [TXT]&#xD;&#xA; - [The Complete Wargames Handbook][3] (Second Edition) by James F. Dunnigan (1997) [HTML]&#xD;&#xA;&#xD;&#xA;**Programming**&#xD;&#xA;&#xD;&#xA; - [GPU Gems][4] (2004), [GPU Gems 2][5] (2005), [GPU Gems 3][6] (2007) [HTML]&#xD;&#xA; - [The Cg Tutorial][7] by Randima Fernando and Mark J. Kilgard (2003) [HTML]&#xD;&#xA; - [Pangea Software's Ultimate Game Programming Guide for Mac OS X][8] by Brian Greenstone (2004) [PDF]&#xD;&#xA; - [Invent Your Own Computer Games with Python][9] by Al Sweigart (2010) [PDF]&#xD;&#xA; - [ShaderX2: Shader Programming Tips and Tricks with DirectX 9.0][10] by Wolfgang Engel (2003) [PDF]&#xD;&#xA; - [ShaderX2: Introductions and Tutorials with DirectX 9.0][11] by Wolfgang Engel (2003) [PDF]&#xD;&#xA; - [Direct3D ShaderX: Vertex and Pixel Shader Tips and Tricks by Wolfgang Engel][12] (2002) [PDF]&#xD;&#xA; - [Michael Abrash's Graphics Programming Black Book by Michael Abrash][13] (1997) [PDF]&#xD;&#xA; - [Action Arcade Adventure Set][14] by Diana Gruber (1994) [HTML]&#xD;&#xA;&#xD;&#xA;**Art**&#xD;&#xA;&#xD;&#xA; - [Designing Arcade Computer Game Graphics][15] by Ari Feldman (2000) [PDF]&#xD;&#xA;&#xD;&#xA;**Culture and Studies**&#xD;&#xA;&#xD;&#xA; - ETC Press: ETC Press have been published plain text version of their books for free.&#xD;&#xA;  - [Well Played 1.0][16] by Drew Davidson et al (2009)&#xD;&#xA;  - [Beyond Fun: Serious Games and Media][17] by Drew Davidson et al (2008)&#xD;&#xA;  - [Ludoliteracy: Defining, Understanding, and Supporting Games Education][18] by José P. Zagal (2010)&#xD;&#xA;  - [Toward a Ludic Architecture: The Space of Play and Games][19] by Steffen P. Walz (2010)&#xD;&#xA;  - [Cross-Media Communications][20] by Drew Davidson et al (2010)&#xD;&#xA; - [Trigger Happy][21] by Steven Poole (2001) [PDF]&#xD;&#xA; - [Gamer Theory 2.0][22] by McKenzie Wark (2007) [HTML]&#xD;&#xA; - [Playing to Win][23] by David Sirlin (2006) [HTML]&#xD;&#xA; - [PSX: The Guide to the Sony Playstation][24] By Kevin Bryan (2005) [PDF]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://directory.vancouver.wsu.edu/people/sue-peabody/art-computer-game-design&#xD;&#xA;  [2]: http://erasmatazz.com/page78/page146/page147/BalanceOfPower.html&#xD;&#xA;  [3]: http://www.hyw.com/Books/WargamesHandbook/Contents.htm&#xD;&#xA;  [4]: http://developer.nvidia.com/object/gpu_gems_home.html&#xD;&#xA;  [5]: http://developer.nvidia.com/object/gpu_gems_2_home.html&#xD;&#xA;  [6]: http://developer.nvidia.com/object/gpu-gems-3.html&#xD;&#xA;  [7]: http://developer.nvidia.com/object/cg_tutorial_home.html&#xD;&#xA;  [8]: http://www.pangeasoft.net/book/buy.html&#xD;&#xA;  [9]: http://inventwithpython.com/&#xD;&#xA;  [10]: http://www.gamedev.net/community/forums/topic.asp?topic_id=500691&#xD;&#xA;  [11]: http://www.gamedev.net/community/forums/topic.asp?topic_id=500691&#xD;&#xA;  [12]: http://tog.acm.org/resources/shaderx/Direct3D.ShaderX.Vertex.and.Pixel.Shader.Tips.and.Tricks_Wolfgang.F.Engel_Wordware.Pub_2002.pdf&#xD;&#xA;  [13]: http://www.gamedev.net/reference/articles/article1698.asp&#xD;&#xA;  [14]: http://www.fastgraph.com/makegames/sidescroller/index.html&#xD;&#xA;  [15]: http://wiki.yoyogames.com/index.php/Ari_Feldman%27s_Book_on_Game_Graphics&#xD;&#xA;  [16]: http://www.etc.cmu.edu/etcpress/wellplayed1.0&#xD;&#xA;  [17]: http://www.etc.cmu.edu/etcpress/beyondfun&#xD;&#xA;  [18]: http://www.etc.cmu.edu/etcpress/content/ludoliteracy-defining-understanding-and-supporting-games-education&#xD;&#xA;  [19]: http://www.etc.cmu.edu/etcpress/content/toward-ludic-architecture&#xD;&#xA;  [20]: http://www.etc.cmu.edu/etcpress/content/cross-media-communications&#xD;&#xA;  [21]: http://stevenpoole.net/blog/trigger-happier/&#xD;&#xA;  [22]: http://www.futureofthebook.org/gamertheory2.0/&#xD;&#xA;  [23]: http://www.sirlin.net/ptw&#xD;&#xA;  [24]: http://www.lulu.com/product/file-download/psx-the-guide-to-the-sony-playstation-(pdf-version)/243124" />
  <row Id="2985" PostHistoryTypeId="5" PostId="1627" RevisionGUID="8e8697c8-845b-4367-b4e7-8b387056cf80" CreationDate="2010-07-26T23:11:17.040" UserId="51" Comment="deleted 140 characters in body; edited tags" Text="This is a two part question. Let's say I release a new Flash game to the web. Once players start playing I want to understand how it is performing:&#xD;&#xA;&#xD;&#xA;1. What common performance criteria do people track? (e.g. viral coefficient, play length, returning players.)&#xD;&#xA;&#xD;&#xA;2. How should I go about measuring and monitoring these attributes? Are there any off the shelf tools?" />
  <row Id="2986" PostHistoryTypeId="6" PostId="1627" RevisionGUID="8e8697c8-845b-4367-b4e7-8b387056cf80" CreationDate="2010-07-26T23:11:17.040" UserId="51" Comment="deleted 140 characters in body; edited tags" Text="&lt;flash&gt;&lt;analytics&gt;" />
  <row Id="2987" PostHistoryTypeId="2" PostId="1628" RevisionGUID="2d70d339-52d4-4334-82e5-152f05c46f5f" CreationDate="2010-07-26T23:13:45.883" UserId="395" Text="http://en.wikipedia.org/wiki/Rigid_body_dynamics might be a good place to start. Different games will divide things up into different bodies, but in general you have a number of discrete rigid bodies linked by joints with specific properties. Each loop through the game you calculate the forces on each body and calculate its new parameters (position, velocity, etc). You also have to transmit forces from each body to the others it shares joints with and factor in global forces (gravity).&#xD;&#xA;&#xD;&#xA;This doesn't cover things like liquid or cloth physics, those are all gibberish to me. There are differential equations involved and thats about the point where my eyes glaze over." />
  <row Id="2988" PostHistoryTypeId="2" PostId="1629" RevisionGUID="945fdcd4-f403-450a-bb19-c1b07cc0e7f7" CreationDate="2010-07-26T23:22:49.440" UserId="647" Text="Posted this question on SO but got no answers. Maybe somebody can help me here.&#xD;&#xA;&#xD;&#xA;I recently had a well-working program which streamed WAV and Ogg sounds with OpenAL. I then decided to abstract the source and buffer objects into C++ classes. I got as far as the source class. My function which returns the number of processed buffers is not altering the integer passed to `alGetSourcei`.&#xD;&#xA;&#xD;&#xA;    int ALSource::GetBuffersProcessed() const {&#xD;&#xA;        ALint processed;&#xD;&#xA;        alGetSourcei(this-&gt;source, AL_BUFFERS_PROCESSED, &amp;processed);&#xD;&#xA;        int error = alGetError();&#xD;&#xA;        if(error != AL_NO_ERROR)&#xD;&#xA;            return -1;&#xD;&#xA;        return processed;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I checked that error is never anything but `AL_NO_ERROR`. I generate the source in the constructor:&#xD;&#xA;&#xD;&#xA;`alGenSources(1, &amp;source);`&#xD;&#xA;&#xD;&#xA;This also never gives an error.&#xD;&#xA;&#xD;&#xA;The actual symptom of this is that processed is declared but not initialised. It's final value is the initial junk value that it starts out with.&#xD;&#xA;&#xD;&#xA;Would this be expected behaviour? The OpenAL specification states that the value should be from &quot;0 - any&quot; but is not really any more specific than that. The programmers' guide is the same.&#xD;&#xA;" />
  <row Id="2989" PostHistoryTypeId="1" PostId="1629" RevisionGUID="945fdcd4-f403-450a-bb19-c1b07cc0e7f7" CreationDate="2010-07-26T23:22:49.440" UserId="647" Text="OpenAL - alGetSourcei and AL_BUFFERS_PROCESSED gives junk." />
  <row Id="2990" PostHistoryTypeId="3" PostId="1629" RevisionGUID="945fdcd4-f403-450a-bb19-c1b07cc0e7f7" CreationDate="2010-07-26T23:22:49.440" UserId="647" Text="&lt;c++&gt;&lt;programming&gt;&lt;audio&gt;" />
  <row Id="2991" PostHistoryTypeId="2" PostId="1630" RevisionGUID="9051de17-7ea2-4df6-889d-8a2cbbc3420c" CreationDate="2010-07-26T23:36:23.600" UserId="162" Text="I have some ideas that I think might make interesting games for a Facebook-like platform, in that they are social and casual. Does anyone have advice on how to get into Facebook development from a background in traditional C++ game development? Is there anything special that differentiates developing facebook games from developing other web-based games, such as API intricacies and so forth? &#xD;&#xA;&#xD;&#xA;To start with this will probably be hobbyist level instead of some sort of professional enterprise, anything I need to know about making indie-level facebook games?" />
  <row Id="2992" PostHistoryTypeId="1" PostId="1630" RevisionGUID="9051de17-7ea2-4df6-889d-8a2cbbc3420c" CreationDate="2010-07-26T23:36:23.600" UserId="162" Text="How do I get into Facebook game development?" />
  <row Id="2993" PostHistoryTypeId="3" PostId="1630" RevisionGUID="9051de17-7ea2-4df6-889d-8a2cbbc3420c" CreationDate="2010-07-26T23:36:23.600" UserId="162" Text="&lt;facebook&gt;" />
  <row Id="2994" PostHistoryTypeId="2" PostId="1631" RevisionGUID="d9d99160-e88f-4c8b-ab86-9feb816aafe2" CreationDate="2010-07-26T23:41:19.037" UserId="865" Text="I also think there's simply power in numbers. There's many more windows users than linux users and thus more output on windows. Also, entry level is a lot lower with visual tools versus command line tools (although that has changed over time). Also a lot of kids got their parent's old PC to tinker with, which statictically was more likely to be a windows PC than a Linux box." />
  <row Id="2995" PostHistoryTypeId="2" PostId="1632" RevisionGUID="d23b5d8b-f733-4b97-a0c7-678eef6ce90f" CreationDate="2010-07-26T23:48:25.917" UserId="539" Text="You need to use the [Graph API](http://developers.facebook.com/docs/guides/web) that they provide. In my experience it changes pretty frequently and is not terribly well documented -- though that may have changed. One thing worth considering is whether you want your game to work solely on Facebook using their canvas or anywhere through the Connect API.&#xD;&#xA;&#xD;&#xA;The best clients seemed to be written in PHP (not surprising since Facebook itself is written in the language) and Javascript (ditto). If you choose to use Flash to write the game you'll likely want to use the ExternalInterface API to make calls to a Javascript layer you create, or you could make REST calls to a web server running PHP.&#xD;&#xA;&#xD;&#xA;I think the biggest thing to be aware of is that there is a ton of competition amongst games on the platform, so if you build it they will likely not come. From a game design perspective I would actually advocate starting by detailing what the &quot;sharing&quot; moments are and why they will engage users. Once you've nailed these scenarios you can build the rest of your game to fit. This will give your game the best chance of being distributed by users amongst their friends.&#xD;&#xA;&#xD;&#xA;Another gotcha is testing. When I made my game the only way to test, say, that your high score list worked was to register 20 fake accounts, [mark them as test accounts](http://wiki.developers.facebook.com/index.php/Test_Accounts), and then perform a manual test. I think for a more complex game it would be worth mocking the entire Facebook API that you leverage." />
  <row Id="2996" PostHistoryTypeId="2" PostId="1633" RevisionGUID="7112fee2-bf8a-42df-86ae-34d1f7b5ce8e" CreationDate="2010-07-26T23:54:41.630" UserId="1004" Text="One thing i noticed that hasn't been touched on here yet, is the overall hodgepodge of drivers, kernels, and libraries you have to work with on linux. It's gotten better lately (with a few distros making up what i can only guess is the majority of the linux boxes out there), but it still is a mess. For a great example of what i mean, see this [post-mortem of the linux Osmos port](http://www.hemispheregames.com/2010/05/18/porting-osmos-to-linux-a-post-mortem-part-23/), specifically the &quot;Didn't Love&quot; section. In short, that article complains about:&#xD;&#xA;&#xD;&#xA; * Supporting multiple distrosDEs/WMs/drivers/etc.&#xD;&#xA; * Audio [my comment: and let's face it, the audio support on linux is pretty atrocious at times]&#xD;&#xA; * Lack of documentation and consensus (little official documentation, and if you ask in a forum you get as many answers as posts, not to mention outdated thread containing wrong answers)&#xD;&#xA; * Packaging the game&#xD;&#xA; * No OS-level GUI layer for simple dialogs" />
  <row Id="2997" PostHistoryTypeId="2" PostId="1634" RevisionGUID="b1af2cc4-16b0-4ac1-8a58-d66d75a1d4a2" CreationDate="2010-07-27T00:20:22.687" UserId="427" Text="I see there's already an accepted answer, but I thought I'd throw in my two cents, because I disagree with the top-rated answers and I actually do evaluate and hire applicants for programming positions.&#xD;&#xA;&#xD;&#xA;First, I agree with Tetrad that if you're passionate and good at what you do, you don't *need* a degree. I left school shortly before finishing, myself. But having a Computer Science degree definitely is a big plus for any candidate. Tetrad mentions that computer science programs are not about programming. That's true to a point, but that's like saying that going to school for carpentry isn't just about swinging hammers. Looking at it that way, I'm not just looking to hire *programmers*, I'm looking to hire *engineers*. I want you to be able to not just write code, but to create well-built systems. A comp sci degree will help you out a lot in that way.&#xD;&#xA;&#xD;&#xA;To address the question of whether a game development degree or a comp sci degree is better, I generally prefer to see comp sci degrees, myself. It depends on the program, however - I've heard good things about RPI's program, as coderanger mentioned. But several designers I've worked with have gone for the general &quot;game development&quot; degrees that teach a hybrid of design and programming, and after talking to them, I'm wary of how in-depth the programming portions of those programs are. Then again, applicants coming from those schools tend to have demos or other examples of their work, whereas people coming from comp sci degrees often don't - being able to look at someone's code is a big bonus.&#xD;&#xA;&#xD;&#xA;I realize I haven't directly answered your question, but I hope that helps you with your decision." />
  <row Id="2998" PostHistoryTypeId="2" PostId="1635" RevisionGUID="99306e0b-f68d-4eae-aa43-e7d463b524d6" CreationDate="2010-07-27T00:25:51.303" UserId="1004" Text="Where i can i find fonts (preferably free, but a reasonable fee is acceptable) that i can use in my for-pay game?" />
  <row Id="2999" PostHistoryTypeId="1" PostId="1635" RevisionGUID="99306e0b-f68d-4eae-aa43-e7d463b524d6" CreationDate="2010-07-27T00:25:51.303" UserId="1004" Text="Good fonts for my game?" />
  <row Id="3000" PostHistoryTypeId="3" PostId="1635" RevisionGUID="99306e0b-f68d-4eae-aa43-e7d463b524d6" CreationDate="2010-07-27T00:25:51.303" UserId="1004" Text="&lt;assets&gt;&lt;sites&gt;&lt;fonts&gt;" />
  <row Id="3001" PostHistoryTypeId="5" PostId="1634" RevisionGUID="00b11f3e-d3ca-42d1-862e-fe12dfd1dd3c" CreationDate="2010-07-27T00:41:05.233" UserId="427" Comment="added 106 characters in body" Text="I see there's already an accepted answer, but I thought I'd throw in my two cents, because I disagree with the top-rated answers and I actually do evaluate and hire applicants for programming positions. (Not to imply that others don't! Just that it's something I spend a fair amount of time thinking about..)&#xD;&#xA;&#xD;&#xA;First, I agree with Tetrad that if you're passionate and good at what you do, you don't *need* a degree. I left school shortly before finishing, myself. But having a Computer Science degree definitely is a big plus for any candidate. Tetrad mentions that computer science programs are not about programming. That's true to a point, but that's like saying that going to school for carpentry isn't just about swinging hammers. Looking at it that way, I'm not just looking to hire *programmers*, I'm looking to hire *engineers*. I want you to be able to not just write code, but to create well-built systems. A comp sci degree will help you out a lot in that way.&#xD;&#xA;&#xD;&#xA;To address the question of whether a game development degree or a comp sci degree is better, I generally prefer to see comp sci degrees, myself. It depends on the program, however - I've heard good things about RPI's program, as coderanger mentioned. But several designers I've worked with have gone for the general &quot;game development&quot; degrees that teach a hybrid of design and programming, and after talking to them, I'm wary of how in-depth the programming portions of those programs are. Then again, applicants coming from those schools tend to have demos or other examples of their work, whereas people coming from comp sci degrees often don't - being able to look at someone's code is a big bonus.&#xD;&#xA;&#xD;&#xA;I realize I haven't directly answered your question, but I hope that helps you with your decision." />
  <row Id="3002" PostHistoryTypeId="2" PostId="1636" RevisionGUID="821b190d-5b66-43c1-af4a-ed232721ffd6" CreationDate="2010-07-27T00:44:34.853" UserId="1004" Text="You can find many free and cheap fonts on [MyFonts.com](http://new.myfonts.com/), including the Larabie Font Collection (many of which are free for commercial use)" />
  <row Id="3003" PostHistoryTypeId="2" PostId="1637" RevisionGUID="746c3d29-b109-4823-8eb9-a757f7e420b6" CreationDate="2010-07-27T00:49:02.957" UserId="945" Text="Two good places to find free fonts are [Font Squirrel](http://www.fontsquirrel.com/) and [The League of Moveable Type](http://www.theleagueofmoveabletype.com/).&#xD;&#xA;" />
  <row Id="3004" PostHistoryTypeId="2" PostId="1638" RevisionGUID="16d3d540-5dca-4846-be4d-6a4f0da8bf4f" CreationDate="2010-07-27T01:10:15.427" UserId="10" Text="For the flash game I made recently I needed to track the play of every level, since balancing of each level was very important.&#xD;&#xA;&#xD;&#xA;It was as simple as creating a static class that holds all the info I need to collect and then do a URLRequest (POST) to a PHP script that receives the info and posts it to a MySQL database.&#xD;&#xA;&#xD;&#xA;What I tracked was specialization data, current level, where in the level the player was (used to track deaths), abilities used and their values (heals / damage etc)" />
  <row Id="3005" PostHistoryTypeId="2" PostId="1639" RevisionGUID="ae8f1290-c017-459f-ba93-96379077fefc" CreationDate="2010-07-27T01:30:26.533" UserId="1004" Text="I am a beginning indie developer, and i want to get the word out about my game. What sites can i go to for asking about reviews of my game, and where might i be able to talk about and get feedback on my game from players?" />
  <row Id="3006" PostHistoryTypeId="1" PostId="1639" RevisionGUID="ae8f1290-c017-459f-ba93-96379077fefc" CreationDate="2010-07-27T01:30:26.533" UserId="1004" Text="Where to advertise my game?" />
  <row Id="3007" PostHistoryTypeId="3" PostId="1639" RevisionGUID="ae8f1290-c017-459f-ba93-96379077fefc" CreationDate="2010-07-27T01:30:26.533" UserId="1004" Text="&lt;revenue&gt;" />
  <row Id="3008" PostHistoryTypeId="2" PostId="1640" RevisionGUID="fb1a1eeb-a82a-46c7-a32f-9d6382c797ec" CreationDate="2010-07-27T01:42:45.817" UserId="613" Text="The [League of Movable Type](http://www.theleagueofmoveabletype.com/) has a few fonts for free use, under a [very permissive license](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=OFL)." />
  <row Id="3009" PostHistoryTypeId="2" PostId="1641" RevisionGUID="8aedf909-3b2d-440f-9af5-a0d8a1bc69a7" CreationDate="2010-07-27T01:44:33.160" UserId="539" Text="The answer will really depend on what kind of game you've made. Here are some of my thoughts:&#xD;&#xA;&#xD;&#xA;1. For Flash: [Flash Game License](http://flashgamelicense.com/) is a good place to get feedback from other developers, you could also try Mochi's forums. The FGL people also run [Flash Game Distribution](http://flashgamedistribution.com/) which can help get your game out to different portals (if you decide not to get an exclusive sponsor). [This answer](http://gamedev.stackexchange.com/questions/334/where-should-i-host-my-flash-games/345#345) has a good list of portals you could submit your game to.&#xD;&#xA;&#xD;&#xA;2. Generally: Sites such as the [Indie Game Blog](indiegames.com/blog/) and [TIGSource](http://www.tigsource.com/) might review your game if you send them some info. The TIG Source also runs forums where people can play your game and leave feedback. The [Indie Gamer forums](http://forums.indiegamer.com/) is another community which can help." />
  <row Id="3010" PostHistoryTypeId="5" PostId="1629" RevisionGUID="9507308f-ef3d-4e60-81f1-ac2f9765ea4a" CreationDate="2010-07-27T01:51:50.633" UserId="647" Comment="added 52 characters in body" Text="Posted this question on SO but got no answers. Maybe somebody can help me here.&#xD;&#xA;&#xD;&#xA;I recently had a well-working program which streamed WAV and Ogg sounds with OpenAL. I then decided to abstract the source and buffer objects into C++ classes. I got as far as the source class. My function which returns the number of processed buffers is not altering the integer passed to `alGetSourcei`. &#xD;&#xA;&#xD;&#xA;    int ALSource::GetBuffersProcessed() const {&#xD;&#xA;        ALint processed;&#xD;&#xA;        alGetSourcei(this-&gt;source, AL_BUFFERS_PROCESSED, &amp;processed);&#xD;&#xA;        int error = alGetError();&#xD;&#xA;        if(error != AL_NO_ERROR)&#xD;&#xA;                return -1;&#xD;&#xA;        return processed;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I checked that `error` is never anything but `AL_NO_ERROR`. I generate the source in the &#xD;&#xA;constructor: &#xD;&#xA;&#xD;&#xA;    alGenSources(1, &amp;source);&#xD;&#xA;&#xD;&#xA;This also never gives any error.&#xD;&#xA;&#xD;&#xA;The actual symptom of this is that `processed` is declared but not initialised. It's final value is the initial junk value that it starts out with. (Usually something like -8834824334).&#xD;&#xA;&#xD;&#xA;Would this be expected behaviour? The OpenAL specification states that the value should be from `0 - any` but is not really any more specific than that. The programmers' guide is the same. " />
  <row Id="3011" PostHistoryTypeId="2" PostId="1642" RevisionGUID="306858e3-dd93-44d3-99e6-7f96647ae11a" CreationDate="2010-07-27T02:02:41.760" UserId="1024" Text="I'm working through Geometric Algebra for Computer Science, and the subject does give a clearer of picture of things like quaternions and complex numbers. &#xD;&#xA;&#xD;&#xA;I can definitely see how GA could be useful, but I'm interested in hearing from people with practical experience either doing real-time or asset pipeline stuff with GA. &#xD;&#xA;&#xD;&#xA;Are there are any gotcha's to watch out for when implementing a GA system?" />
  <row Id="3012" PostHistoryTypeId="1" PostId="1642" RevisionGUID="306858e3-dd93-44d3-99e6-7f96647ae11a" CreationDate="2010-07-27T02:02:41.760" UserId="1024" Text="Anyone have experiences using Geometric Algebra" />
  <row Id="3013" PostHistoryTypeId="3" PostId="1642" RevisionGUID="306858e3-dd93-44d3-99e6-7f96647ae11a" CreationDate="2010-07-27T02:02:41.760" UserId="1024" Text="&lt;assets&gt;&lt;graphics&gt;&lt;math&gt;" />
  <row Id="3014" PostHistoryTypeId="6" PostId="1642" RevisionGUID="a293e671-29d5-4580-ab5d-197a5e7a7aa3" CreationDate="2010-07-27T02:07:34.307" UserId="395" Comment="edited tags" Text="&lt;graphics&gt;&lt;math&gt;" />
  <row Id="3015" PostHistoryTypeId="2" PostId="1643" RevisionGUID="43230bce-c083-4e59-8fb0-d497cba638e1" CreationDate="2010-07-27T02:09:13.803" UserId="560" Text="I always head to [dafont.com](http://www.dafont.com/), although the range is similar to Font Squirrel and MyFonts." />
  <row Id="3016" PostHistoryTypeId="2" PostId="1644" RevisionGUID="b1a59718-6719-4a10-8f78-5a1ee7047e23" CreationDate="2010-07-27T02:10:07.610" UserId="1021" Text="I'm experimenting w/ improving the &quot;resolution&quot; of an OpenGL ES based app.  Apple mentions [here][1] (developer.apple.com) that OpenGL ES in iOS 4 supports multisampling... and this can improve the graphics somewhat.  **How do you enable multisampling?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/iphone/library/documentation/iphone/conceptual/iphoneosprogrammingguide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10-SW11" />
  <row Id="3017" PostHistoryTypeId="1" PostId="1644" RevisionGUID="b1a59718-6719-4a10-8f78-5a1ee7047e23" CreationDate="2010-07-27T02:10:07.610" UserId="1021" Text="How do you activate multisampling in OpenGL ES on the iPhone?" />
  <row Id="3018" PostHistoryTypeId="3" PostId="1644" RevisionGUID="b1a59718-6719-4a10-8f78-5a1ee7047e23" CreationDate="2010-07-27T02:10:07.610" UserId="1021" Text="&lt;iphone&gt;&lt;graphics&gt;&lt;opengl-es&gt;" />
  <row Id="3019" PostHistoryTypeId="2" PostId="1645" RevisionGUID="60acaa10-ffae-4163-907a-b961cdd4aa39" CreationDate="2010-07-27T02:38:27.650" UserId="865" Text="Make your game framerate independent, so you can set it to play with a fixed timestep. Play your game, record the input. Replay with fixed timestep, recorded input and write every frame to a file - since you replay with fixed timestep it doesn't matter how long writing out a frame takes. &#xD;&#xA;That way your source footage is uncompressed and you can decide on quality later without having to sacrifice speed, or having glitches because of a capture program.&#xD;&#xA;After that things like After Effects come in - at least you'll have crisp source material.&#xD;&#xA;&#xD;&#xA;Edited to add: yeah, I know, making it framerate independent to play back at a fixed timestep is silly. Duh. Well, if it's framerate independent fraps might be less of a problem as well ;o) Games should be framerate independent anyhow!" />
  <row Id="3020" PostHistoryTypeId="2" PostId="1646" RevisionGUID="d5599033-75db-4db6-9553-e4b7b011f3f7" CreationDate="2010-07-27T03:01:32.307" UserId="458" Text="Both have tradeoffs. Short answer: the trade school can make you marginally more relevant to the game industry, but marginally less relevant to the rest of the world. Since the average career length of a game developer is 5.5 years (we looooves our burnout), going trade school only is essentially a life commitment to the game industry (unless you're prepared to go back for a more conventional undergrad later).&#xD;&#xA;&#xD;&#xA;There have been a lot of writings on this subject. My favorite:&#xD;&#xA;&#xD;&#xA;http://www.sloperama.com/advice/lesson44.htm - and really, everything else on Tom Sloper's site. He writes in a no-nonsense style and is not afraid to be very clear about the up and down sides of the industry.&#xD;&#xA;&#xD;&#xA;http://www.gamecareerguide.com/features/298/choosing_a_.php - and really, everything else on GameCareerGuide. This is the whole POINT of the site, as a resource guide for people looking to enter the industry.&#xD;&#xA;&#xD;&#xA;And really, type &quot;choosing a game school&quot; into Google and you'll find more advice than you can possibly read before matriculation :)" />
  <row Id="3021" PostHistoryTypeId="6" PostId="1639" RevisionGUID="092f3e83-ea23-47a0-b3d1-a2c2d8dde0f5" CreationDate="2010-07-27T03:14:52.050" UserId="51" Comment="edited tags" Text="&lt;revenue&gt;&lt;marketing&gt;&lt;reviews&gt;" />
  <row Id="3022" PostHistoryTypeId="6" PostId="1639" RevisionGUID="d4e40851-63ab-4637-9f8b-b00de2ef9f6b" CreationDate="2010-07-27T03:24:06.533" UserId="469" Comment="edited tags" Text="&lt;marketing&gt;&lt;revenue&gt;&lt;reviews&gt;" />
  <row Id="3023" PostHistoryTypeId="6" PostId="1639" RevisionGUID="fe319885-8651-4b68-a4c4-6b62b438dcd5" CreationDate="2010-07-27T03:24:46.363" UserId="469" Comment="edited tags" Text="&lt;marketing&gt;" />
  <row Id="3024" PostHistoryTypeId="6" PostId="1639" RevisionGUID="9c0b7460-8131-42a1-b86f-3c20fd9e455e" CreationDate="2010-07-27T03:25:04.600" UserId="469" Comment="edited tags" Text="&lt;marketing&gt;" />
  <row Id="3026" PostHistoryTypeId="2" PostId="1648" RevisionGUID="333ea63b-6ce0-45ff-9d8c-2394cc8a0d6f" CreationDate="2010-07-27T03:42:03.337" UserId="953" Text="Both [Bytejacker][1] and [Rock, Paper, Shotgun][2] have a sizable readership and will review indie games sent to them if they find them interesting enough.  I also second Alex's idea of the TIGSource forums; just make sure you follow their guidelines for new users and post in the appropriate category.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bytejacker.com/&#xD;&#xA;  [2]: http://www.rockpapershotgun.com/" />
  <row Id="3027" PostHistoryTypeId="2" PostId="1649" RevisionGUID="3557406e-5bbc-4ab7-909a-9a4770924ad9" CreationDate="2010-07-27T03:59:18.667" UserId="55" Text="I would send (and have) an e-mail to every single website out there that reviews games of any kind. **But not before I have an almost completed game.** Be real. Be humble. Show off something innovative.&#xD;&#xA;&#xD;&#xA;A lot of places won't really take their time looking at you until you have something put together. Don't try to approach reviewers to review a pre-alpha-alpha prototype. It might sound like common sense but I have read reviewers make that kind of remark (which is enough of an indicator).&#xD;&#xA;&#xD;&#xA;As for feedback. Grab a few play testers, preferably locally, that you can watch play your game. That will be some of the best feedback you can get. Alternatively, follow the other's advice. [tigsource.net][1], [gamedev.net][2] and [devmaster.net][3] forums. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tigsource.net&#xD;&#xA;  [2]: http://www.gamedev.net&#xD;&#xA;  [3]: http://www.devmaster.net" />
  <row Id="3028" PostHistoryTypeId="2" PostId="1650" RevisionGUID="6b7988f6-08f5-4348-b42c-c44ae03bde8f" CreationDate="2010-07-27T04:57:53.193" UserId="516" Text="I need dynamic dijkstra algorithm that can update itself when edge's cost is changed without a full recalculation. Full recalculation is not an option.  &#xD;&#xA;I've tryed to &quot;brew&quot; my own implemantion with no success. I've also tryed to find on the Internet but found nothing.  &#xD;&#xA;A link to an article explaining the algorithm or even it's name will be good." />
  <row Id="3029" PostHistoryTypeId="1" PostId="1650" RevisionGUID="6b7988f6-08f5-4348-b42c-c44ae03bde8f" CreationDate="2010-07-27T04:57:53.193" UserId="516" Text="Dynamic Dijkstra" />
  <row Id="3030" PostHistoryTypeId="3" PostId="1650" RevisionGUID="6b7988f6-08f5-4348-b42c-c44ae03bde8f" CreationDate="2010-07-27T04:57:53.193" UserId="516" Text="&lt;algorithm&gt;" />
  <row Id="3031" PostHistoryTypeId="5" PostId="1604" RevisionGUID="da09ca34-05c7-46ff-bfa7-c5a5f8ea42a3" CreationDate="2010-07-27T05:03:40.627" UserId="370" Comment="deleted 39 characters in body" Text="There are two issues related to the question.&#xD;&#xA;&#xD;&#xA; * Should physics step rate be tied to frame rate?&#xD;&#xA; * Should physics be stepped with constant deltas?&#xD;&#xA;&#xD;&#xA;In Glen fielder's Fix your time step he says to &quot;Free the Physics&quot;.  That means your physics update rate should **not** be tied to your frame rate.&#xD;&#xA;&#xD;&#xA;&gt; For example, if the display framerate&#xD;&#xA;&gt; is 50fps and the simulation is&#xD;&#xA;&gt; designed to run at 100fps then we need&#xD;&#xA;&gt; to take two physics steps every&#xD;&#xA;&gt; display update to keep the physics in&#xD;&#xA;&gt; sync.&#xD;&#xA;&#xD;&#xA;In Erin Catto's recommendations for Box2D he advocates this as well.&#xD;&#xA;&#xD;&#xA;&gt; So don't tie&#xD;&#xA;&gt; the time step to your frame rate&#xD;&#xA;&gt; (unless you really, really have to).&#xD;&#xA;&#xD;&#xA;*Should Physics step rate be tied to your frame rate?* No.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Erin's thoughts on fixed step vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; Box2D uses a computational algorithm called an integrator. Integrators simulate the physics equations at discrete points of time. ... We also don't like the time step to change much. A variable time step produces variable results, which makes it difficult to debug.&#xD;&#xA;&#xD;&#xA;Glen's thoughts on fixed vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; ###Fix your timestep or explode&#xD;&#xA;&gt; ...  If you have a series of really stiff spring constraints for shock absorbers in a car simulation then tiny changes in dt can actually make the simulation explode. ...&#xD;&#xA;&#xD;&#xA;*Should physics be stepped with constant deltas?* Yes.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The way to step the physics with constant deltas and not tie your physics update rate to the frame rate still is to use a time accumulator.  In my game I take it a step further.  I apply a smoothing function to incoming time.  That way large FPS spikes don't cause the physics to jump too far, instead they're simulated more quickly for a frame or two.&#xD;&#xA;&#xD;&#xA;You mention that with a fixed rate, the physics wouldn't sync up with the display.  This is true if the target physics rate is near the target frame rate.  It's worse the frame rate is larger than the physics rate.  In general it is better to target a physics update rate of twice your target FPS.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3032" PostHistoryTypeId="2" PostId="1651" RevisionGUID="d6486d6a-5ce1-4639-af59-e04f3a1e2485" CreationDate="2010-07-27T05:05:41.310" UserId="288" Text="Something nobody has mentioned yet, which I'd like to add, is ***networking***. No, not the thing you do with Cat-5 cable, the whole &quot;interacting with people&quot; thing.&#xD;&#xA;&#xD;&#xA;The traditional degree is arguably &quot;better&quot; than the game development school degree.&#xD;&#xA;&#xD;&#xA;But you will miss out on a *huge* opportunity to network with other people who are in, have been in, or want to get into the industry. People who would otherwise become friends, mentors, co-workers, co-founders, employers, employees, etc.&#xD;&#xA;&#xD;&#xA;So if you do go for a traditional degree, you have to be prepared to miss out on that, and try to compensate for it as best you can." />
  <row Id="3033" PostHistoryTypeId="2" PostId="1652" RevisionGUID="7d70f80c-e1e6-4673-8601-0bce516c0d2a" CreationDate="2010-07-27T05:27:12.693" UserId="1085" Text="As far as I can tell these XNA fonts from Microsoft are free to use (released under the [MS-PL][1]):&#xD;&#xA;&#xD;&#xA;[Redistributable Font Pack][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opensource.org/licenses/ms-pl.html&#xD;&#xA;  [2]: http://creators.xna.com/en-GB/contentpack/fontpack" />
  <row Id="3034" PostHistoryTypeId="2" PostId="1653" RevisionGUID="9ba0a2ef-66cb-4841-b802-dff1f70b8a6a" CreationDate="2010-07-27T05:31:20.707" UserId="241" Text="Majority of games build on successes of other games and many are downright clones, so where goes the limit of emulating before legal issues come into the field. Is it down to literary or graphic work like characters and storyline that cause legal problems, or can someone actually claim to own game play mechanics? &#xD;&#xA;&#xD;&#xA;There are so many similar clone games out there that the rules are probably very slack or nonexistent, but I'd like to have more experienced developers / designers view on it." />
  <row Id="3035" PostHistoryTypeId="1" PostId="1653" RevisionGUID="9ba0a2ef-66cb-4841-b802-dff1f70b8a6a" CreationDate="2010-07-27T05:31:20.707" UserId="241" Text="How closely can a game resemble another game without legal problems" />
  <row Id="3036" PostHistoryTypeId="3" PostId="1653" RevisionGUID="9ba0a2ef-66cb-4841-b802-dff1f70b8a6a" CreationDate="2010-07-27T05:31:20.707" UserId="241" Text="&lt;legal&gt;" />
  <row Id="3037" PostHistoryTypeId="2" PostId="1654" RevisionGUID="197d80b6-4f49-461b-b026-bc35aa286969" CreationDate="2010-07-27T05:35:46.313" UserId="81" Text="I've just started following these in my own learning, and found them to be top notch, tons of videos already added:&#xD;&#xA;&#xD;&#xA;http://unity3dstudent.com&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3038" PostHistoryTypeId="16" PostId="1654" RevisionGUID="197d80b6-4f49-461b-b026-bc35aa286969" CreationDate="2010-07-27T05:35:46.313" UserId="-1" />
  <row Id="3039" PostHistoryTypeId="2" PostId="1655" RevisionGUID="be16f2c4-cda4-424b-9244-32bff34b8f15" CreationDate="2010-07-27T05:40:14.450" UserId="253" Text="My personal belief is that if you have to ask the question, then you probably know in your heart that what you are doing is borderline wrong. It may or may not be legal, but to me its besides the point. If you cant be true to an art that you created then why bother.&#xD;&#xA;&#xD;&#xA;Of course if you just want to knock down clones of popular games to make a quick buck, I doubt that anyone would bother with the hassle of legal action against you, since more often then not, if you just copied something and don't put your own spin on the issue, then it probably wont sell well enough to matter to the original.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3040" PostHistoryTypeId="2" PostId="1656" RevisionGUID="46c6d9fd-3566-4bf7-a9ce-37cf5084ed8a" CreationDate="2010-07-27T05:46:04.083" UserId="253" Text="My advice is to know your market.&#xD;&#xA;A mud for example, usually buy ads on topmudsite or mudconnect.&#xD;&#xA;An MMO might want to buy an ad at massively.&#xD;&#xA;&#xD;&#xA;Indie game developer probly could get some good publicity by being upfront and simply posting at an related forum saying that they have a new game and want people to check it out. If you do this however, dont be pretentious and say you found a cool game and want people to try it. Just say that you are the developer and hope people give feedback on it. Try to find a genre specific forum for this. For example the wargamer forum is a nice place to do this if you have a grognard-ish game. Gamedev forum is also nice for this, but targeted audience is always better." />
  <row Id="3041" PostHistoryTypeId="2" PostId="1657" RevisionGUID="67949ef6-65c0-48ff-9dc8-1bb352efaf50" CreationDate="2010-07-27T05:47:50.723" UserId="189" Text="What means do you use to get your game dev book fix? Do you pony up the big bucks for the thick books, or do you budget yourself and buy one at a time, or do you rent or limit yourself only to your library? Do you prefer to read them on your eBook reader?&#xD;&#xA;&#xD;&#xA;**How do you obtain your game development books?**" />
  <row Id="3042" PostHistoryTypeId="1" PostId="1657" RevisionGUID="67949ef6-65c0-48ff-9dc8-1bb352efaf50" CreationDate="2010-07-27T05:47:50.723" UserId="189" Text="I love game development books but they're so expensive!" />
  <row Id="3043" PostHistoryTypeId="3" PostId="1657" RevisionGUID="67949ef6-65c0-48ff-9dc8-1bb352efaf50" CreationDate="2010-07-27T05:47:50.723" UserId="189" Text="&lt;books&gt;" />
  <row Id="3044" PostHistoryTypeId="16" PostId="1657" RevisionGUID="67949ef6-65c0-48ff-9dc8-1bb352efaf50" CreationDate="2010-07-27T05:47:50.723" UserId="189" />
  <row Id="3045" PostHistoryTypeId="2" PostId="1658" RevisionGUID="48bde02f-2a84-42a6-89cf-868623f63c8c" CreationDate="2010-07-27T05:48:42.173" UserId="865" Text="The unity forums also contain a wealth of information. You'll be hard pressed, starting out, to come up with questions that others before you didn't have as well, and it's a pretty helpful bunch overthere." />
  <row Id="3046" PostHistoryTypeId="16" PostId="1658" RevisionGUID="48bde02f-2a84-42a6-89cf-868623f63c8c" CreationDate="2010-07-27T05:48:42.173" UserId="-1" />
  <row Id="3047" PostHistoryTypeId="2" PostId="1659" RevisionGUID="4178b39d-bcff-4c11-b46b-a84a771dc969" CreationDate="2010-07-27T06:12:18.960" UserId="539" Text="I've got a somewhat large SWF which I'd like to deliver through a pre-loader so the user doesn't have to appear to wait as long. With Actionscript it's pretty easy to create an external pre-loader but doing so makes it harder to distribute my game. What methods are available for including the pre-loader in a single SWF?" />
  <row Id="3048" PostHistoryTypeId="1" PostId="1659" RevisionGUID="4178b39d-bcff-4c11-b46b-a84a771dc969" CreationDate="2010-07-27T06:12:18.960" UserId="539" Text="How do you create a single/internal pre-loader for a Flash game written using Flex?" />
  <row Id="3049" PostHistoryTypeId="3" PostId="1659" RevisionGUID="4178b39d-bcff-4c11-b46b-a84a771dc969" CreationDate="2010-07-27T06:12:18.960" UserId="539" Text="&lt;flash&gt;&lt;distribution&gt;" />
  <row Id="3050" PostHistoryTypeId="2" PostId="1660" RevisionGUID="c11e5d6a-97f9-4e3d-a655-2d536af62143" CreationDate="2010-07-27T06:17:38.760" UserId="323" Text="I am not a lawyer and this is not legal advice. These are things I've heard many times over and have no reason to doubt.&#xD;&#xA;&#xD;&#xA;Game mechanics cannot be copyrighted or protected in any fashion.&#xD;&#xA;&#xD;&#xA;I could make a game called &quot;Crystallized&quot; that was Bejeweled, in every imaginable way, and as long as I didn't copy the art from Bejeweled (either directly, or by drawing new art that just happens to be nigh-identical) I'd be totally fine.&#xD;&#xA;&#xD;&#xA;Game mechanics have been copied often enough that, if this weren't the case, I have no doubt we'd have heard about it by now. Game design is pretty much one giant incestuous ball of borrowing, and, honestly, is better for it.&#xD;&#xA;&#xD;&#xA;Keep in mind that you can be sued for anything, even if you're not breaking any contracts or laws, and they might win. But I've never heard of that happening with regards to game design." />
  <row Id="3051" PostHistoryTypeId="2" PostId="1661" RevisionGUID="84fb6e9b-f899-4f9a-86b9-5c660cd806c0" CreationDate="2010-07-27T06:20:01.267" UserId="865" Text="Okay, this might sound like a cop-out, but I'd download Flixel and see how they do it. Modify it to your hearts content of course, but why not just learn from a working example?" />
  <row Id="3052" PostHistoryTypeId="6" PostId="1589" RevisionGUID="6874f2f7-aec4-4504-8ca1-07c535d96343" CreationDate="2010-07-27T06:22:05.757" UserId="323" Comment="edited tags" Text="&lt;engine&gt;&lt;physics&gt;&lt;frame-rate&gt;&lt;fps&gt;" />
  <row Id="3053" PostHistoryTypeId="6" PostId="1086" RevisionGUID="1cc9fc80-cff3-4799-97da-c117789ba915" CreationDate="2010-07-27T06:22:25.053" UserId="323" Comment="edited tags" Text="&lt;engine&gt;&lt;c++&gt;&lt;gui&gt;" />
  <row Id="3054" PostHistoryTypeId="2" PostId="1662" RevisionGUID="dfedf68e-f621-4b84-a7c4-dde6d4cf9c55" CreationDate="2010-07-27T06:24:48.450" UserId="891" Text="Safari Books Online has a pretty good selection.  Only 22.99/month gives you access to read 10 books and preview every book they have.&#xD;&#xA;&#xD;&#xA;[http://my.safaribooksonline.com/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://my.safaribooksonline.com/" />
  <row Id="3055" PostHistoryTypeId="16" PostId="1662" RevisionGUID="dfedf68e-f621-4b84-a7c4-dde6d4cf9c55" CreationDate="2010-07-27T06:24:48.450" UserId="-1" />
  <row Id="3056" PostHistoryTypeId="2" PostId="1663" RevisionGUID="af0155c4-217d-45e6-9562-d9874e35d414" CreationDate="2010-07-27T06:31:28.640" UserId="865" Text="Not an answer but might this help?&#xD;&#xA;www.lix.polytechnique.fr/~liberti/sppsurvey.pdf&#xD;&#xA;&#xD;&#xA;Also, a general tip - maybe you already know.&#xD;&#xA;&#xD;&#xA;If you know of a paper related to the problem, checking CiteCeer to see if there are papers referencing it, you might find your way to an answer (or not, but always interesting papers on your travels).&#xD;&#xA;&#xD;&#xA;And lastly, again not an answer - if you get really stuck here's some pointers to possible alternatives:&#xD;&#xA;http://www.aiwisdom.com/ai_pathfinding.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3057" PostHistoryTypeId="2" PostId="1664" RevisionGUID="ed67c967-373b-46a4-a96b-f7019f0ea981" CreationDate="2010-07-27T06:36:30.190" UserId="865" Text="Does this help?&#xD;&#xA;&#xD;&#xA;http://www.cocos2d-iphone.org/forum/topic/7552&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3058" PostHistoryTypeId="5" PostId="1663" RevisionGUID="850b9e37-bb97-40b1-b65b-d4352d63fd36" CreationDate="2010-07-27T06:45:18.363" UserId="865" Comment="added 72 characters in body" Text="Not an answer but might this help?&#xD;&#xA;http://www.lix.polytechnique.fr/~liberti/sppsurvey.pdf&#xD;&#xA;&#xD;&#xA;Also, a general tip - maybe you already know.&#xD;&#xA;&#xD;&#xA;If you know of a paper related to the problem, checking CiteCeer to see if there are papers referencing it, you might find your way to an answer (or not, but always interesting papers on your travels).&#xD;&#xA;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.7969&#xD;&#xA;&#xD;&#xA;And lastly, again not an answer - if you get really stuck here's some pointers to possible alternatives:&#xD;&#xA;http://www.aiwisdom.com/ai_pathfinding.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3059" PostHistoryTypeId="2" PostId="1665" RevisionGUID="817e06c1-98ce-4232-b8a9-b54b4a0f0187" CreationDate="2010-07-27T06:48:20.663" UserId="395" Text="It strikes me that maybe what you want is actually a hidden markov machine so you can treat the true path costs as an unknown and just model them probabilistically? That might be crazy though." />
  <row Id="3060" PostHistoryTypeId="2" PostId="1666" RevisionGUID="357756c6-f91c-405b-a4ea-96c13cec91a7" CreationDate="2010-07-27T06:54:54.863" UserId="395" Text="Game mechanics are not subject to intellectual property controls. Names can be trademarked and any game code or assets are subject to copyright protection. There is some legal precedent for going after games that are &quot;close&quot; (http://en.wikipedia.org/wiki/Lexulous) but that was in an Indian court so I know much less about their IP laws (see also: the various FOSS StarCraft clone projects, most threatened with suits because they had &quot;craft&quot; in the name).&#xD;&#xA;&#xD;&#xA;Trademark law generally draws a distinction based on if an &quot;average consumer&quot; could be mislead into thinking you were related to the other property. Copyright is much simpler since it only covers concrete works. If you redrew every sprite from your favorite game they would not be violating any copyrights (but might be violating a trademark if it is something high profile).&#xD;&#xA;&#xD;&#xA;Recently some companies have tried to bring patent suits against some big-name game companies, claiming things as outlandish as they have a patent for the concept of text chat. Time will tell as to if these are a real threat, but until your revenue is in the millions I wouldn't worry about it." />
  <row Id="3061" PostHistoryTypeId="2" PostId="1667" RevisionGUID="0ad4431d-cff4-4be0-aa53-fbe7f479641d" CreationDate="2010-07-27T06:56:22.647" UserId="1087" Text="Are they are famous games written in .Net and/or XNA?" />
  <row Id="3062" PostHistoryTypeId="1" PostId="1667" RevisionGUID="0ad4431d-cff4-4be0-aa53-fbe7f479641d" CreationDate="2010-07-27T06:56:22.647" UserId="1087" Text="Famous Games Written in .Net and XNA" />
  <row Id="3063" PostHistoryTypeId="3" PostId="1667" RevisionGUID="0ad4431d-cff4-4be0-aa53-fbe7f479641d" CreationDate="2010-07-27T06:56:22.647" UserId="1087" Text="&lt;xna&gt;" />
  <row Id="3064" PostHistoryTypeId="2" PostId="1668" RevisionGUID="29be0247-84f5-485e-af12-805cbc84d968" CreationDate="2010-07-27T06:56:52.347" UserId="865" Text="There's another option - decouple Game update and physics update. Trying to tailor the physics engine to the game timestep leads to problem if you fix your timestep (the problem of spinning out of control because integration needs more timesteps which take more time which needs more timesteps), or make it variable and get wonky physics.&#xD;&#xA;&#xD;&#xA;The solution that I see a lot is to have the physics run on a fixed timestep, in a different thread (on a different core). The game interpolates or extrapolates given the two most recent valid frames it can grab. Interpolation adds some lag, extrapolation adds some uncertainty, but your physics will be stable and not spin your timestep out of control.&#xD;&#xA;&#xD;&#xA;This is not trivial to implement, but might proof future proof." />
  <row Id="3065" PostHistoryTypeId="2" PostId="1669" RevisionGUID="cc5d9c9c-cf19-4677-a90e-6bfe5b34112e" CreationDate="2010-07-27T06:57:46.450" UserId="395" Text="For *development* books it has been pretty rare that I've found the dead tree form more useful than other internet resources. Deign books are trickier, but those are usually less of a reference and more of a read-front-to-back kind of book (which are easier to resist since my book queue is far too big already).&#xD;&#xA;&#xD;&#xA;Then again, now that this Stack Exchange is up, you can always just ask those kinds of questions here, right? ;-)" />
  <row Id="3066" PostHistoryTypeId="16" PostId="1669" RevisionGUID="cc5d9c9c-cf19-4677-a90e-6bfe5b34112e" CreationDate="2010-07-27T06:57:46.450" UserId="-1" />
  <row Id="3067" PostHistoryTypeId="2" PostId="1670" RevisionGUID="1d84271a-4e0e-4256-baea-fe458231bb8a" CreationDate="2010-07-27T07:05:33.907" UserId="395" Text="Schizoid is a pretty successful XBLA game. Does that count? (not really, but its the best I could find)&#xD;&#xA;&#xD;&#xA;I think what you mean is are there any AAA-scale games made using XNA and/or XNA GS. To that, the answer is no. The games industry has been very slow move past C/C++ as the gold standard. This isn't for no reason, most AAA games would rather trade all the nice syntax and runtime support for an extra 5FPS and 50MB less RAM usage since both of those directly translate to units sold. Granted there is argument for lower development costs and faster cycles, but thats a hard calculus to use in this industry." />
  <row Id="3068" PostHistoryTypeId="5" PostId="1667" RevisionGUID="f957b468-0b4a-4373-8138-8e3e93d02a94" CreationDate="2010-07-27T07:09:40.480" UserId="51" Comment="deleted 3 characters in body; edited tags" Text="Are there famous games written in .Net and/or XNA?" />
  <row Id="3069" PostHistoryTypeId="6" PostId="1667" RevisionGUID="f957b468-0b4a-4373-8138-8e3e93d02a94" CreationDate="2010-07-27T07:09:40.480" UserId="51" Comment="deleted 3 characters in body; edited tags" Text="&lt;xna&gt;&lt;.net&gt;" />
  <row Id="3070" PostHistoryTypeId="5" PostId="1669" RevisionGUID="90a982b9-22c0-47f6-93a6-7282248259a0" CreationDate="2010-07-27T07:10:20.450" UserId="51" Comment="added 1 characters in body" Text="For *development* books it has been pretty rare that I've found the dead tree form more useful than other internet resources. Design books are trickier, but those are usually less of a reference and more of a read-front-to-back kind of book (which are easier to resist since my book queue is far too big already).&#xD;&#xA;&#xD;&#xA;Then again, now that this Stack Exchange is up, you can always just ask those kinds of questions here, right? ;-)" />
  <row Id="3071" PostHistoryTypeId="2" PostId="1671" RevisionGUID="b1fdaeca-28f1-439c-9c79-43d742a48b53" CreationDate="2010-07-27T07:10:23.630" UserId="1004" Text="The system that Supreme Commander uses is that you can subclass classes, then you define the class-specific functions and data like so:&#xD;&#xA;&#xD;&#xA;    MyUnit = Class(MyUnitBase) {&#xD;&#xA;        Create = function(self, blah)&#xD;&#xA;            MyUnitBase.Create(self, blah)&#xD;&#xA;            --do other junk&#xD;&#xA;        end,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The way the code is set up, is all of the classes that have to be in C code are exposed to the lua environment for subclassing. The above method is much like your first, and i would recommend that you take it. It makes it quite usable for both programmers and modders (of which i'm both). I started out programming to this model, and while i didn't completely understand things, it worked perfectly well and made sense to me." />
  <row Id="3072" PostHistoryTypeId="2" PostId="1672" RevisionGUID="a86197e4-1b05-428f-ac8d-af9b547c146c" CreationDate="2010-07-27T07:13:47.103" UserId="1004" Text="It depends on your definition of &quot;famous&quot; :)&#xD;&#xA;&#xD;&#xA; * [Sol Survivor](http://www.cadenzainteractive.com/solsurvivor/) is a very well polished XNA game, which appears on the Xbox and PC.&#xD;&#xA; * [AI War](http://arcengames.com/aiwar_features.php) is written on .NET and while not very widely known, is groundbreaking for the scale of gameply it holds." />
  <row Id="3073" PostHistoryTypeId="2" PostId="1673" RevisionGUID="530211ca-25f8-4716-a727-3dd9617e826f" CreationDate="2010-07-27T07:21:11.830" UserId="721" Text="There are many tutorials to learn GLSL, Cg, HLSL... with classical samples as bump mapping, toon-shading...&#xD;&#xA;&#xD;&#xA;But is there a shaders directory?&#xD;&#xA;&#xD;&#xA; - a website where i can share my shaders&#xD;&#xA; - search shader by name, description and implementation&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3074" PostHistoryTypeId="1" PostId="1673" RevisionGUID="530211ca-25f8-4716-a727-3dd9617e826f" CreationDate="2010-07-27T07:21:11.830" UserId="721" Text="Is there any Shaders Directory?" />
  <row Id="3075" PostHistoryTypeId="3" PostId="1673" RevisionGUID="530211ca-25f8-4716-a727-3dd9617e826f" CreationDate="2010-07-27T07:21:11.830" UserId="721" Text="&lt;web&gt;&lt;shaders&gt;" />
  <row Id="3076" PostHistoryTypeId="2" PostId="1674" RevisionGUID="8b80ffd5-ccfe-42fa-9fe3-76d20d9c3256" CreationDate="2010-07-27T07:30:39.043" UserId="603" Text="For games that do not require the larger changes to OpenGL exposed only in the newer versions, using only 3.x+ limits you to an nvidia 8 series and upwards (not sure on the other graphics vendors you'd want to look that up). So if you're not using 3.x+ features, you're just creating an artificial limit, stopping people with older, but plenty powerful, graphics cards from playing your game.&#xD;&#xA;&#xD;&#xA;For this reason I'd highly recommend learning the forward compatible subset, and the newer versions, then picking the lowest version you can effectively push your game into. You can &#xD;&#xA;&#xD;&#xA;I will also note in response to another question that OpenGL:ES 2.0 removes the fixed function pipeline, so it's more equivalent to 3.0 than 2.1.also always support different features per the supported gl version at runtime." />
  <row Id="3077" PostHistoryTypeId="16" PostId="374" RevisionGUID="dc2e73fe-4131-4ed9-a198-097b14e935d1" CreationDate="2010-07-27T08:48:29.310" UserId="254" />
  <row Id="3078" PostHistoryTypeId="5" PostId="374" RevisionGUID="dc2e73fe-4131-4ed9-a198-097b14e935d1" CreationDate="2010-07-27T08:48:29.310" UserId="254" Comment="Made community wiki" Text="While I know that functional languages aren't the most commonly used for game writing, there are a lot of benefits associate with them that seem like they would be interesting in any programming context. Especially the ease of parallelization I would think could be very useful as focus is moving toward more and more processors. &#xD;&#xA;&#xD;&#xA;Also, with F# as a new member of the .NET family, it can be used directly with XNA, for example, which lowers the threshold quite a bit, as opposed to going with LISP, Haskell, Erlang, etc.&#xD;&#xA;&#xD;&#xA;If anyone has experience writing games with functional code, what has turned out to be the positives and negatives? What was it suited for, what not?&#xD;&#xA;&#xD;&#xA;Edit: Finding it hard to decide that there's a single good answer for this, so it's probably better suited as a community wiki post. " />
  <row Id="3079" PostHistoryTypeId="2" PostId="1675" RevisionGUID="1915e0b2-f5b6-4074-ab1a-52bd76cb476b" CreationDate="2010-07-27T08:54:06.240" UserId="875" Text="Maybe [NVIDIA Shader library][1] can help you, but it's not large shader library.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html" />
  <row Id="3080" PostHistoryTypeId="2" PostId="1676" RevisionGUID="cf382662-e67e-4500-adc9-c7ed94bc4a6d" CreationDate="2010-07-27T09:09:00.447" UserId="1091" Text="For a junior role I'm not looking for a lot of experience in any particular API, but instead a good grasp of the concepts involved.&#xD;&#xA;&#xD;&#xA;If it's a graphics related position you're looking for, demonstrate you know 3D maths, and how to use an API *well* (OpenGL or D3D, don't care which really - just make sure you optimise it well). Frankly all APIs more or less boil down to making lists of things to draw, submitting them, and managing state - and there are good ways and bad ways to do those things, so understand that.&#xD;&#xA;&#xD;&#xA;For more general console programming, make sure you have a handle on the particular problems an embedded platform entails. Limited memory (no swap, fragmentation bad, etc.), strict rules on coping with crashes, limited I/O bandwidth, no (or limited) ability to patch/update, etc.&#xD;&#xA;&#xD;&#xA;It's about the style of coding, not the specifics.&#xD;&#xA;&#xD;&#xA;I'd actually *avoid* XNA if you're looking for a commerical position, because it's not actually that useful in that arena.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3081" PostHistoryTypeId="2" PostId="1677" RevisionGUID="f4c7f3d6-a9cf-4849-808d-07b1974942d2" CreationDate="2010-07-27T12:03:00.537" UserId="777" Text="You can write your code in C/C++ and use an embedded language such as Embedded Common Lisp for your scripting. Although getting these to compile on a different platform might be difficult. You might look at Lisp In Small Pieces in order to learn how to write your own scripting language. It's really not that hard, if you have the time." />
  <row Id="3082" PostHistoryTypeId="16" PostId="1677" RevisionGUID="f4c7f3d6-a9cf-4849-808d-07b1974942d2" CreationDate="2010-07-27T12:03:00.537" UserId="-1" />
  <row Id="3084" PostHistoryTypeId="2" PostId="1679" RevisionGUID="ff2563dd-1e38-4ed8-8b63-9367361da978" CreationDate="2010-07-27T12:07:56.457" UserId="469" Text="I am looking to the fastest way to create really simple particle effect that will be spammed like hell on the game...&#xD;&#xA;&#xD;&#xA;Basically, my game looks like a vectrex game, made mostly of lines... I want to make some small explosions that will be really common.&#xD;&#xA;&#xD;&#xA;There are something faster than just moving around some points and rendering with GL_Point?" />
  <row Id="3085" PostHistoryTypeId="1" PostId="1679" RevisionGUID="ff2563dd-1e38-4ed8-8b63-9367361da978" CreationDate="2010-07-27T12:07:56.457" UserId="469" Text="Fastest way to create a simple particle effect" />
  <row Id="3086" PostHistoryTypeId="3" PostId="1679" RevisionGUID="ff2563dd-1e38-4ed8-8b63-9367361da978" CreationDate="2010-07-27T12:07:56.457" UserId="469" Text="&lt;graphics&gt;&lt;opengl&gt;&lt;graphics-programming&gt;" />
  <row Id="3088" PostHistoryTypeId="2" PostId="1680" RevisionGUID="7d2d3825-d224-43a6-bb76-0c1c9c78dc81" CreationDate="2010-07-27T12:28:23.387" UserId="165" Text="[**Inter-Library Loan**][1] - you're not just limited to your local library system, but they can get almost any book from any other library (in the US anyway). It's not as good as owning a given book, granted, but at least you can read it, get the information (maybe decide if it's *worth* buying).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Inter-library_loan" />
  <row Id="3089" PostHistoryTypeId="16" PostId="1680" RevisionGUID="7d2d3825-d224-43a6-bb76-0c1c9c78dc81" CreationDate="2010-07-27T12:28:23.387" UserId="-1" />
  <row Id="3090" PostHistoryTypeId="2" PostId="1681" RevisionGUID="d28b19e0-1bda-4fe4-9ecd-731dad392b40" CreationDate="2010-07-27T12:47:21.370" UserId="825" Text="When I was learning Unity, the most helpful thing was going through the Lerpz tutorial ([http://unity3d.com/support/resources/tutorials/3d-platform-game][1]), but then (and probably even more helpful) going through the FPS Shooter tutorial ([http://unity3d.com/support/resources/tutorials/fpstutorial][1]).  &#xD;&#xA;&#xD;&#xA;Going through those two tutorials helped immensely, more than any other tutorials, and even the Unity Development book.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/resources/tutorials/3d-platform-game" />
  <row Id="3091" PostHistoryTypeId="16" PostId="1681" RevisionGUID="d28b19e0-1bda-4fe4-9ecd-731dad392b40" CreationDate="2010-07-27T12:47:21.370" UserId="-1" />
  <row Id="3092" PostHistoryTypeId="2" PostId="1682" RevisionGUID="1ce924f6-8268-496f-b9c7-01583b79fe21" CreationDate="2010-07-27T13:05:08.727" UserId="1101" Text="Is STL a good fit for games? Definitely. Games are complex pieces of software, the STL provides features that help manage complexity, so it's good.&#xD;&#xA;&#xD;&#xA;Is it a good fit for your platform? Not necessarily. If you're writing for a console then you have to be very careful about memory and cache usage. The STL doesn't make this very easy.&#xD;&#xA;&#xD;&#xA;I think that all too often we mistake &quot;games&quot; for &quot;high performance real-time games that run on embedded or bespoke hardware&quot;, but it's important to make a distinction. If you're writing a Windows game that isn't trying to run in fullscreen at a constant 60fps then there's no reason to avoid the tools that the standard library gives you." />
  <row Id="3093" PostHistoryTypeId="2" PostId="1683" RevisionGUID="e335c9fb-f4c3-44e8-95b8-d0d220178feb" CreationDate="2010-07-27T13:07:44.667" UserId="1101" Text="I work as a professional game developer which finally earns me enough money to buy the books.&#xD;&#xA;&#xD;&#xA;I also recommend working as a surgeon in order to be able to afford books on anatomy. ;)" />
  <row Id="3094" PostHistoryTypeId="16" PostId="1683" RevisionGUID="e335c9fb-f4c3-44e8-95b8-d0d220178feb" CreationDate="2010-07-27T13:07:44.667" UserId="-1" />
  <row Id="3095" PostHistoryTypeId="2" PostId="1684" RevisionGUID="1b64f349-b69d-4bbd-836b-9c09c924bb13" CreationDate="2010-07-27T13:10:57.763" UserId="1058" Text="(note - I don't have the reputation to create new tags, so mod action may be needed to re-tag)&#xD;&#xA;&#xD;&#xA;I'm in the midst of developing a 2D sprite-based game for Windows 7 Phone using XNA. The training and tutorials available for it are pretty darn good IMO, but the problem I face is that each of them approaches their class design differently, and the code is not particularly well-factored. As a result, it has been difficult for me to gain a good understanding of which responsibilities I should give to a particular class.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;I could have a base sprite class `BaseSprite`, that knows how to draw itself, check for collisions, etc. I could then have an `AnimatedSprite` class that would know how to navigate its sprite sheet, an `ExplodingSprite` class, and so on. This technique is demonstrated in the Space Invaders example [in the Windows 7 Phone Jumpstart Session 2][1] materials. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively, I could instead place the bulk of rendering and running the game responsibility on a `GameScreen` class; that class and its derived classes behave more like forms or web pages in terms of their responsibilities. Sprite classes are more simple containers with much less logic.&#xD;&#xA;&#xD;&#xA;This is the technique used in the [Windows 7 Phone Training Kit][2]'s Alien Sprite game and other game state manager examples.&#xD;&#xA;&#xD;&#xA;So, how do you approach the class design for your games?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://borntolearn.mslearn.net/wp7/m/classresources/default.aspx&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/details.aspx?FamilyID=CA23285F-BAB8-47FA-B364-11553E076A9A&amp;amp;displaylang=en&amp;displaylang=en" />
  <row Id="3096" PostHistoryTypeId="1" PostId="1684" RevisionGUID="1b64f349-b69d-4bbd-836b-9c09c924bb13" CreationDate="2010-07-27T13:10:57.763" UserId="1058" Text="Proper OO game engine design: how to parcel responsibilities" />
  <row Id="3097" PostHistoryTypeId="3" PostId="1684" RevisionGUID="1b64f349-b69d-4bbd-836b-9c09c924bb13" CreationDate="2010-07-27T13:10:57.763" UserId="1058" Text="&lt;2d&gt;&lt;xna&gt;&lt;programming&gt;&lt;sprites&gt;" />
  <row Id="3098" PostHistoryTypeId="2" PostId="1685" RevisionGUID="7b0a0bb2-4251-411f-af1d-d686a4918721" CreationDate="2010-07-27T13:14:11.937" UserId="1101" Text="Normally I think you would do particles as texture-mapped quads. Treat them as 2D sprites basically, and fade them out over time, destroying them when invisible. Better still, reuse the old ones when you make new ones so you're not thrashing memory for these things.&#xD;&#xA;&#xD;&#xA;If you use [premultiplied alpha][1] on the art then you can easily support lights, fire, smoke, and more besides all with one type of blending operation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[Premultiplied%20alpha]]" />
  <row Id="3099" PostHistoryTypeId="2" PostId="1686" RevisionGUID="cb2efd8d-1aa4-4353-b9e7-aa11fd10b5de" CreationDate="2010-07-27T13:14:46.960" UserId="430" Text="As far as a direct answer, all I have off the top of my head is: A* might help if you can make a good heuristic.  &#xD;&#xA;&#xD;&#xA;Other ideas: You might be able to do full recalculation over multiple frames (or in a thread).  Or maybe try representing your search space in a way that you can use progressive refinement; for example, a quadtree where you can perform a search at coarse granularity (by sum/avg of node costs in that region), then slowly search each subtree.&#xD;&#xA;&#xD;&#xA;Of course, if you're working on a very limited platform or very large dataset, that's not going to help.  But if that's the case, you probably want a different search algorithm." />
  <row Id="3100" PostHistoryTypeId="2" PostId="1687" RevisionGUID="1391f292-2669-474f-a14a-122eb9f093c0" CreationDate="2010-07-27T13:22:30.777" UserId="178" Text="I do use a more component-oriented approach, where you would have a Sprite class which has components like Visual, Collision, Animation, Input, etc. With this approach I don't end up having a deep class hierarchy (which is good). &#xD;&#xA;&#xD;&#xA;For some info on Component Oriented Design see [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" />
  <row Id="3101" PostHistoryTypeId="2" PostId="1688" RevisionGUID="8ad6f739-796b-473c-8bc3-13f0f2ed39d2" CreationDate="2010-07-27T13:24:18.433" UserId="66" Text="This might help you: http://active.tutsplus.com/tutorials/workflow/the-comprehensive-guide-to-preloading-a-single-swf-file/" />
  <row Id="3102" PostHistoryTypeId="2" PostId="1689" RevisionGUID="add34196-2ff6-42e7-b722-4909dfd11ada" CreationDate="2010-07-27T13:28:38.783" UserId="1095" Text="Here is an interesting article on becoming a developer of the &quot;mini&quot; titles that have recently come onto PSN.&#xD;&#xA;http://www.pspminis.com/2068/interview-futurlab-on-how-to-become-a-licensed-psp-mini-developer/&#xD;&#xA;&#xD;&#xA;In terms of initial cost, you no longer need to purchase a full reference kit (~$10k) and can get away with a reference tool costing $2000 with much of the functionality. &#xD;&#xA;" />
  <row Id="3103" PostHistoryTypeId="2" PostId="1690" RevisionGUID="e22965e6-a195-4c1f-82ae-3290abf5f05b" CreationDate="2010-07-27T13:30:12.053" UserId="259" Text="The [SOLID Principles][1] apply as much to game design as to any other profession - at least until you come to optimise, so I'd use your first example as a starting point.&#xD;&#xA;&#xD;&#xA;I'd go further though, because BaseSprite sounds like it has the tendency to become a megaclass.  The Single Responsibility Principle dictates that collision, rendering and navigation should all be handled by components, rather than individual entries in a class hierarchy. The holding class of all these components should only handle pushing world positions between them.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod" />
  <row Id="3104" PostHistoryTypeId="2" PostId="1691" RevisionGUID="53c6d1cd-fdb8-4067-8305-0d676799b8c6" CreationDate="2010-07-27T13:34:20.750" UserId="1101" Text="&gt; What is wrong with the Linux/*nix&#xD;&#xA;&gt; family for games?&#xD;&#xA;&#xD;&#xA;'Wrong' is a strong word, but I'll list a few things that hold games developers back from working on Linux.&#xD;&#xA;&#xD;&#xA;Culture - Linux people tend more to believe software should be free - this isn't conducive to making a profit off selling your software. This may change in the future with online games being 'software as a service' in a sense.&#xD;&#xA;&#xD;&#xA;Market share - The market share of Linux on the desktop has always been quite small. Now that the market share has finally crept up from 'negligible' to '[pitifully low][1]' you could make a small argument for targetting that platform - if the previous point wasn't at all true, that is. This has also come a bit too late - the non-console game market is really quite small these days when you exclude MMOs.&#xD;&#xA;&#xD;&#xA;Developer support - Microsoft have poured a lot of time and money into DirectX, and more recently into XNA. With one download, you had all the APIs and documentation you needed to make games. Linux has no central body to do this, nor even one single product that could be used instead. SDL doesn't do 3D graphics, OpenGL doesn't do anything but graphics, neither have had a very credible upgrade strategy in recent years, and there are a billion other libraries ([many of which can be found on a list I maintain here][2]) you can throw into the mix without any clear leaders. It's just a lot more hassle. On top of that a lot of leading middleware doesn't work on Linux, so instead of tried and tested code with paid support you have to consider using abandoned open source that's never been used in a shipped game.&#xD;&#xA;&#xD;&#xA;OS support - Linux can do everything Windows does, but it certainly makes it hard sometimes. Sound support in particular is awful. Video support is awkward due to the legalities around codecs. Distribution of your binaries can be fiddly when you consider the different packaging types you need to support. All these things can be overcome if you know what you're doing, but most Windows developers won't know what they're doing with Linux so they aren't able to smoothly port their product to Linux.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems&#xD;&#xA;  [2]: http://www.ebonyfortress.com/blog/free-game-development-libraries/" />
  <row Id="3106" PostHistoryTypeId="2" PostId="1692" RevisionGUID="74950180-feb0-40cd-aaa6-29acad46bd5f" CreationDate="2010-07-27T14:01:17.190" UserId="66" Text="I am looking for a simple algorithm to plot evenly distributed points on an ellipse, given the major and minor axes. This is really easy to do with a circle like so:&#xD;&#xA;&#xD;&#xA;    var numberOfPoints = 8;&#xD;&#xA;    var angleIncrement = 360 / numberOfPoints;&#xD;&#xA;    var circleRadius = 100;&#xD;&#xA;    for (var i = 0; i &lt; numberOfPoints; i++) {&#xD;&#xA;        var p = new Point();&#xD;&#xA;        p.x = (circleRadius * Math.cos((angleIncrement * i) * (Math.PI / 180)));&#xD;&#xA;        p.y = (circleRadius * Math.sin((angleIncrement * i) * (Math.PI / 180)));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(which creates points that are the same distance apart from their neighboring points) but I can't find or figure out a way to do this on an ellipse. (Solutions in AS3 preferred, but not required.)" />
  <row Id="3107" PostHistoryTypeId="1" PostId="1692" RevisionGUID="74950180-feb0-40cd-aaa6-29acad46bd5f" CreationDate="2010-07-27T14:01:17.190" UserId="66" Text="What is a simple algorithm for calculating evenly distributed points on an ellipse?" />
  <row Id="3108" PostHistoryTypeId="3" PostId="1692" RevisionGUID="74950180-feb0-40cd-aaa6-29acad46bd5f" CreationDate="2010-07-27T14:01:17.190" UserId="66" Text="&lt;math&gt;&lt;actionscript-3&gt;" />
  <row Id="3109" PostHistoryTypeId="2" PostId="1693" RevisionGUID="ef3ef7a6-a147-426b-b31f-9d8ac6de40a1" CreationDate="2010-07-27T14:13:14.010" UserId="33" Text="If you're using Flex in your project, i.e. you created a Flex project, including a preloader in your Application is very easy: set a class name in you Application declaration:&#xD;&#xA;&#xD;&#xA;    &lt;mx:Application usePreloader=&quot;true&quot; preloader=&quot;com.example.Preloader&quot;&gt;&#xD;&#xA;&#xD;&#xA;Now, create a class called com.example.Preloader which extends Sprite, and implements mx.preloaders.IPreloaderDisplay.&#xD;&#xA;&#xD;&#xA;Basically, any Sprite can be a preloader display, provided that implements the functions written in the IPreloaderDisplay interface. These functions are properties that the application pass to the class so it can know something about the application: height, width, background color, and two important functions: a &quot;preloader&quot; property setter, and a initialize function.&#xD;&#xA;&#xD;&#xA;The preloader property setter accepts a Sprite, and you usually add listeners to the parameter given to you, to the PROGRESS, and COMPLETE events that the sprite dispatches to let the preloader know how is the loading going. This is an example of the property setter:&#xD;&#xA;&#xD;&#xA;    public function set preloader(value:Sprite):void&#xD;&#xA;	{&#xD;&#xA;		_preloader = value;&#xD;&#xA;	&#xD;&#xA;		value.addEventListener(ProgressEvent.PROGRESS, progressHandler);	&#xD;&#xA;		value.addEventListener(Event.COMPLETE, completeHandler);&#xD;&#xA;		&#xD;&#xA;		value.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler);&#xD;&#xA;		value.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler);&#xD;&#xA;		value.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler);&#xD;&#xA;		&#xD;&#xA;		value.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler);&#xD;&#xA;		value.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;The initialize function is called by the application when it starts loading the real data. The default preloader uses this function to start a timer, which after some time has passed and the application is still loading, it actually displays the preloader (this is to prevent the preloader to appear immediately, until the user has waited too much time for the app to load)&#xD;&#xA;&#xD;&#xA;    	public function initialize():void&#xD;&#xA;	{&#xD;&#xA;		_startTime = getTimer(); //from flash.utils.getTimer()&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;You might want to download some real source code, though, so I recommend this article which answers some other preloader details on how to draw things inside it: http://iamjosh.wordpress.com/2007/12/18/flex-custom-preloader/&#xD;&#xA;&#xD;&#xA;I said at the beginning that this was very easy, but if you're a newcomer you might find this rather daunting. But once you learn how to do it, you'll find that all preloaders in Flex work the same." />
  <row Id="3111" PostHistoryTypeId="2" PostId="1695" RevisionGUID="fa8a9ca0-d41a-4faa-bb83-b477fc086361" CreationDate="2010-07-27T14:24:27.603" UserId="35" Text="While not a website, the ShaderX series of books (7 at present) is a good reference about common shader effects.&#xD;&#xA;&#xD;&#xA;Some are available for free download at http://tog.acm.org/resources/shaderx/" />
  <row Id="3113" PostHistoryTypeId="2" PostId="1696" RevisionGUID="20095f02-828a-4ceb-9694-2fba551dfbe1" CreationDate="2010-07-27T14:28:40.400" UserId="182" Text="I'm currently working on a game in Haskell. I can't speak for functional programming in general, but for Haskell specifically:&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Good&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;- Purity means that reasoning about your code is a lot easier. You don't have to worry about the &quot;current&quot; value of a variable or whether using a given function will conflict with your global state in some way. It also means that parallelism and concurrency are far easier to work with (and in many cases, trivial). These things can be a godsend to game developers.&#xD;&#xA;- Haskell makes it very easy to write at a very high level using abstractions of your own creation. It's often easier to write very generic code than specialized code in Haskell, and the benefits of this manifest themselves in less development time and easier code comprehension. It's more true in Haskell than in any other language I know of that using an interface is like using an entirely new language (while still keeping the benefits of the rest of the Haskell ecosystem). What most languages call language features, Haskell calls a library, and it doesn't feel forced. If you ever find yourself reasoning about your game in psuedocode, you could probably just write a simple interface and make it real code, and it's usually worth it to do so.&#xD;&#xA;- This might conflict with other answers, but Haskell is better at handling imperative code than any other language I know of. The constraints of purity mean that Haskell has a separation between the concepts of &quot;evaluation&quot; (reducing expressions) and &quot;execution&quot; (performing side effects). You can control when and how side effects are performed with an ease unparalleled by the so-called &quot;imperative&quot; languages. Despite what I said about purity earlier, some C bindings are still very imperative (OpenGL, I'm looking at you), so this fine-grained control over imperative code is very welcome. Even the most seasoned of C programmers are likely to appreciate it once they get used to it.&#xD;&#xA;- GHC generates pretty fast binaries. They are not as fast as binaries generated from common C compilers, but are within an order of magnitude, and are *far* faster than what you would achieve with an interpreted language. Even if you can't write your game in other high level languages like Python because it would be too slow, there's a good chance you can do it in Haskell.&#xD;&#xA;- Despite there not being many game-related libraries in Haskell, as noted under &quot;The Bad&quot; below, the Haskell foreign function interface is the easiest I have ever used. You can bind to C by writing almost exclusively in Haskell.&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Bad&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;- The time and effort needed to learn Haskell can be fairly high if you are very used to working with non-functional languages. The language itself isn't very difficult, but when you factor in common language extensions and the huge amount of libraries (remember, many things you might consider language features in other languages are libraries in Haskell), it looks much more ominous. In my opinion, it's worth it, but others may disagree.&#xD;&#xA;- Some people complain about laziness a lot. If you know what you're doing, you will not cause space leaks that are difficult to track down (I have not created a space leak in over a year and a half now), but beginners have a lot more trouble with this. It would be foolish of me to shoot these people down and claim that this is not a problem, but I will assert that it's a problem that is easily solved with experience.&#xD;&#xA;- There are not many great libraries for making games in Haskell, and not many Haskellers write games in it, so it's difficult to find resources and help on this matter.&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Ugly&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;- If you are writing a resource intensive game, GHC's garbage collector might bite you pretty hard. It's a generational, stop-the-world GC, so every once in a while you might drop a few frames. For some games this is okay, but for others it's a major problem. I and some other game developers using Haskell would like to see a soft-real-time GC implemented for GHC, but no effort is being spent on that yet, to my knowledge. Currently, I'm not worrying about working around this (and haven't seen any dropped frames from it yet), but at least one other team has resorted to putting their main rendering loop into C." />
  <row Id="3114" PostHistoryTypeId="16" PostId="1696" RevisionGUID="20095f02-828a-4ceb-9694-2fba551dfbe1" CreationDate="2010-07-27T14:28:40.400" UserId="-1" />
  <row Id="3115" PostHistoryTypeId="5" PostId="1607" RevisionGUID="04559d2c-58c0-4510-a968-72e7bbad06a4" CreationDate="2010-07-27T14:31:00.253" UserId="370" Comment="deleted 6 characters in body" Text="Rolling your own can be educational, but you often get more done if you can leverage an existing implementation (or at least start from there).&#xD;&#xA;&#xD;&#xA;I've used both [ENet][1] and [Raknet][2].  I only used Enet in a simple game but it did what I needed.  Enet uses a lower level API than Raknet.  Raknet was used in a larger project.  Raknet is extremely powerful, but wants to make you structure your game around Raknet's framework.&#xD;&#xA;&#xD;&#xA;###Enet:&#xD;&#xA; * Connection Management&#xD;&#xA; * Sequencing&#xD;&#xA; * Channels&#xD;&#xA; * Reliability&#xD;&#xA; * Fragmentation and Reassembly&#xD;&#xA; * Aggregation&#xD;&#xA; * Adaptability&#xD;&#xA; * Portability&#xD;&#xA; * Freedom&#xD;&#xA;&#xD;&#xA;###Raknet:&#xD;&#xA; * Object replication&#xD;&#xA; * Autopatcher&#xD;&#xA; * Secure connections&#xD;&#xA; * Robust communication layer (basically all of Enets features rolled up in one item)&#xD;&#xA; * Remote procedure calls&#xD;&#xA; * Voice communication&#xD;&#xA; * NAT punchthrough&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://enet.bespin.org/&#xD;&#xA;  [2]: http://www.jenkinssoftware.com/raknet/" />
  <row Id="3116" PostHistoryTypeId="2" PostId="1697" RevisionGUID="c93e1c9a-f109-43ce-abd0-7fdbe4f8417a" CreationDate="2010-07-27T14:38:35.433" UserId="292" Text="The Dishwasher was made in XNA, as was Flotilla." />
  <row Id="3117" PostHistoryTypeId="2" PostId="1698" RevisionGUID="f55008cb-e874-4aec-bd42-3b564e308401" CreationDate="2010-07-27T14:40:33.413" UserId="182" Text="I would suggest sticking with the intersection of 2.1 and 3. There is still a lot of hardware and drivers that only support OpenGL 2.1, but the practices encouraged by OpenGL 3 core *are* better. [This tutorial][1] is a pretty good place to start (teaches OpenGL 2.0 without features that have been deprecated in 3).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html" />
  <row Id="3118" PostHistoryTypeId="5" PostId="1696" RevisionGUID="a7e1fe06-7b52-4c75-b050-570b28d01a7c" CreationDate="2010-07-27T14:42:34.907" UserId="182" Comment="deleted 8 characters in body" Text="I'm currently working on a game in Haskell. I can't speak for functional programming in general, but for Haskell specifically:&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Good&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;- Purity means that reasoning about your code is a lot easier. You don't have to worry about the &quot;current&quot; value of a variable or whether using a given function will conflict with your global state in some way. It also means that parallelism and concurrency are far easier to work with (and in many cases, trivial). These things can be a godsend to game developers.&#xD;&#xA;- Haskell makes it very easy to write at a very high level using abstractions of your own creation. It's often easier to write very generic code than specialized code in Haskell, and the benefits of this manifest themselves in less development time and easier code comprehension. It's more true in Haskell than in any other language I know of that using an interface is like using an entirely new language (while still keeping the benefits of the rest of the Haskell ecosystem). What most languages call language features, Haskell calls a library, and it doesn't feel forced. If you ever find yourself reasoning about your game in psuedocode, you could probably just write a simple interface and make it real code, and it's usually worth it to do so.&#xD;&#xA;- This might conflict with other answers, but Haskell is better at handling imperative code than any other language I know of. The constraints of purity mean that Haskell has a separation between the concepts of &quot;evaluation&quot; (reducing expressions) and &quot;execution&quot; (performing side effects). You can control when and how side effects are performed with an ease unparalleled by the so-called &quot;imperative&quot; languages. Despite what I said about purity earlier, some C bindings are still very imperative (OpenGL, I'm looking at you), so this fine-grained control over imperative code is very welcome. Even the most seasoned of C programmers are likely to appreciate it once they get used to it.&#xD;&#xA;- GHC generates pretty fast binaries. They are not as fast as binaries generated from common C compilers, but are within an order of magnitude, and are *far* faster than what you would achieve with an interpreted language. Even if you can't write your game in other high level languages like Python because it would be too slow, there's a good chance you can do it in Haskell.&#xD;&#xA;- Despite there not being many game-related libraries in Haskell, as noted under &quot;The Bad&quot; below, the Haskell foreign function interface is the easiest I have ever used. You can bind to C by writing almost exclusively in Haskell.&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Bad&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;- The time and effort needed to learn Haskell can be fairly high if you are very used to working with non-functional languages. The language itself isn't very difficult, but when you factor in common language extensions and the huge amount of libraries (remember, many things you might consider language features in other languages are libraries in Haskell), it looks much more ominous. In my opinion, it's worth it, but others may disagree.&#xD;&#xA;- Some people complain about laziness a lot. If you know what you're doing, you will not cause space leaks that are difficult to track down (I have not created a space leak in a couple years now), but beginners have a lot more trouble with this. It would be foolish of me to shoot these people down and claim that this is not a problem, but I will assert that it's a problem that is easily solved with experience.&#xD;&#xA;- There are not many great libraries for making games in Haskell, and not many Haskellers write games in it, so it's difficult to find resources and help on this matter.&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Ugly&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;- If you are writing a resource intensive game, GHC's garbage collector might bite you pretty hard. It's a generational, stop-the-world GC, so every once in a while you might drop a few frames. For some games this is okay, but for others it's a major problem. I and some other game developers using Haskell would like to see a soft-real-time GC implemented for GHC, but no effort is being spent on that yet, to my knowledge. Currently, I'm not worrying about working around this (and haven't seen any dropped frames from it yet), but at least one other team has resorted to putting their main rendering loop into C." />
  <row Id="3119" PostHistoryTypeId="2" PostId="1699" RevisionGUID="71a5f798-a2a6-47bb-a835-7beb79296223" CreationDate="2010-07-27T15:00:42.447" UserId="335" Text="For the last few projects I have leaned more towards an MVC style approach.&#xD;&#xA;&#xD;&#xA;At first we weren't sure if this would work, but it worked perfectly.&#xD;&#xA;&#xD;&#xA;### Model&#xD;&#xA;The data objects. Just the pure data. No behaviour, no rendering.&#xD;&#xA;&#xD;&#xA;Data manager. Just handling &quot;lists&quot; of data objects.&#xD;&#xA;(Can also be enhanced to support pooling.)&#xD;&#xA;&#xD;&#xA;### View&#xD;&#xA;We call them renderers. For every data object type there is a renderer.&#xD;&#xA;When called with a manager it will render all objects in that list.&#xD;&#xA;&#xD;&#xA;### Controller&#xD;&#xA;Same as the renderers, but controls the behaviour.&#xD;&#xA;&#xD;&#xA;## Example&#xD;&#xA;The ShipManager has a list of Ships.&#xD;&#xA;The ShipController will move the Ships according to their state.&#xD;&#xA;The ShipRenderer will render the Ships according to their state.&#xD;&#xA;&#xD;&#xA;## Why&#xD;&#xA;This way the view and the logic are strictly seperated.&#xD;&#xA;It makes porting to a new platform pretty easy.&#xD;&#xA;Optimizing the data layout inside the XxxManager is also very easy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3120" PostHistoryTypeId="2" PostId="1700" RevisionGUID="d8d0bc88-dcda-4503-8347-708e33d422a5" CreationDate="2010-07-27T15:12:49.130" UserId="47" Text="Find blogs that post about games/apps of what you are developing for.  For instance, if you are creating an Android game, then first I would get some sort of PR statement about the game together for blogs to post (with some screenshots of the game or video!  A must!).  This is even better if you have a website you can put this out on.  Then hit up every Android related blog and see if they'll write a review for your game.  Most of these blog sites also have forums that you can post to about your game's release.&#xD;&#xA;&#xD;&#xA;You can easily replace &quot;Android&quot; for &quot;iPhone&quot; or &quot;xBox&quot; etc." />
  <row Id="3121" PostHistoryTypeId="2" PostId="1701" RevisionGUID="a27bf82c-bd83-41a8-b0d5-f3ab4eda4364" CreationDate="2010-07-27T15:19:12.457" UserId="47" Text="My only concern with getting a gaming-specific degree is that it might hinder you from getting out of the industry and into another programming field if you ever had the need to (bad gaming economy, given the choice to re-locate or lose your job/get another programming job in the area, etc.).  A computer science degree is more generic and well rounded and should let you be able to get into about any field of programming.  You're most likely going to have job training no matter where you end up anyways." />
  <row Id="3122" PostHistoryTypeId="2" PostId="1702" RevisionGUID="8731b12e-4b37-4e8c-bf83-2d1e8aaf6591" CreationDate="2010-07-27T15:45:14.497" UserId="47" Text="What is the best approach to designing an AssestManager that will hold references to graphics, sounds, etc. of a game?&#xD;&#xA;&#xD;&#xA;Should these assets be stored in a key/value Map pair?  I.e. I ask for &quot;background&quot; asset and the Map returns the associated bitmap?  Is there an even better way?&#xD;&#xA;&#xD;&#xA;Specifically I'm writing an Android/Java game, but answers can be generic." />
  <row Id="3123" PostHistoryTypeId="1" PostId="1702" RevisionGUID="8731b12e-4b37-4e8c-bf83-2d1e8aaf6591" CreationDate="2010-07-27T15:45:14.497" UserId="47" Text="How to design an AssetManager?" />
  <row Id="3124" PostHistoryTypeId="3" PostId="1702" RevisionGUID="8731b12e-4b37-4e8c-bf83-2d1e8aaf6591" CreationDate="2010-07-27T15:45:14.497" UserId="47" Text="&lt;game-design&gt;&lt;graphics&gt;&lt;assests&gt;&lt;manager&gt;&lt;sounds&gt;" />
  <row Id="3125" PostHistoryTypeId="2" PostId="1703" RevisionGUID="096f5a51-7cb8-4068-9c16-57832e06b61d" CreationDate="2010-07-27T15:56:32.960" UserId="159" Text="I posted this answer in a &lt;a href=&quot;http://gamedev.stackexchange.com/questions/489/effective-marketing-strategies-for-independent-game-projects/523#523&quot;&gt;similar question&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;I don't know how effective this idea is (I haven't tried it yet) but for my current project I am going to advertise on Facebook. Let me explain.&#xD;&#xA;&#xD;&#xA;Essentially I am going to create a fan page, and run an ad campaign on Facebook. What I figure is I can spend like $30/mo (or what ever you want) for advertising. As people become a &quot;fan&quot; of the page, a lot of other people will see that. So basically, if that $30/mo generates 5 fans directly, it could generate 50 fans indirectly. I figure I could also do some fun stuff with the fan page such as give away copies, solicit ideas, etc...&#xD;&#xA;&#xD;&#xA;Like I said above, I haven't tried this so I don't know if it will work. However, I will let you know in the near future. :)" />
  <row Id="3126" PostHistoryTypeId="6" PostId="1702" RevisionGUID="14f40dc2-5ad9-4537-8cf5-ea845c4dd8b0" CreationDate="2010-07-27T16:05:45.390" UserId="7" Comment="edited tags" Text="&lt;assets&gt;&lt;android&gt;" />
  <row Id="3127" PostHistoryTypeId="2" PostId="1704" RevisionGUID="f3405c83-2c43-4106-926e-2f3f95ceaad7" CreationDate="2010-07-27T16:25:59.570" UserId="744" Text="Dedicated Manager classes are almost never the right engineering tool. If you only need the asset once (like a background or map) you should only request it once, and let it die normally when you're done with it. If you need to cache a particular kind of object, you should use a factory that first checks a cache and otherwise loads something, puts it in the cache, and then returns it - and that factory can just be a static function accessing a static variable, not a type of its own.&#xD;&#xA;&#xD;&#xA;Steve Yegge (among many, many others) has written a good story about how useless manager classes, by way of the singleton pattern, end up being. http://sites.google.com/site/steveyegge2/singleton-considered-stupid" />
  <row Id="3128" PostHistoryTypeId="2" PostId="1705" RevisionGUID="2352c8b5-bebf-46d2-8140-9a54917ceda7" CreationDate="2010-07-27T16:31:29.487" UserId="865" Text="As for benefits, check out Clean Game Library (http://cleangl.sourceforge.net/) and check the platformer game. Once you get your head around the syntax (I encourage you to try) you'll see the sheer elegance of the constructs and how closely the source maps to the concepts they're expressing. &#xD;&#xA;As an added bonus, the abstraction of state, and the necessity to explicitly pass state around, makes your code much more multicore friendly.&#xD;&#xA;&#xD;&#xA;On the other hand, it requires a major paradigm shift. A lot of what you're used to do without thinking about it suddenly doesn't exist anymore and you'll be puzzling how to solve it, simply because you're thinking in the wrong patterns.&#xD;&#xA;" />
  <row Id="3129" PostHistoryTypeId="16" PostId="1705" RevisionGUID="2352c8b5-bebf-46d2-8140-9a54917ceda7" CreationDate="2010-07-27T16:31:29.487" UserId="-1" />
  <row Id="3130" PostHistoryTypeId="2" PostId="1706" RevisionGUID="3d47100e-6f04-4830-9f93-763b77b840b9" CreationDate="2010-07-27T17:42:58.053" UserId="430" Text="I usually buy from Amazon or one of their used book associates.  For some reason, I have a hard time reading a PDF versus a real book when it comes to learning new material.  &#xD;&#xA;&#xD;&#xA;A lot of the books on amazon have used options at significant discount.  Unfortunately, many of the new or hot books won't be much cheaper (e.g. Game Programming Gems).  Most of the books I buy aren't game-specific, though, and some are old.  The Fowler/Beck Refactoring book, for example, is $53 new and $25 used.  Smalltalk 80: The Language is $36 new and .. $5 used (haha).&#xD;&#xA;&#xD;&#xA;But you never know what you might find.  Real Time Rendering 2nd edition hardcover is $55 new and $12 used.  Good book, nice price." />
  <row Id="3131" PostHistoryTypeId="16" PostId="1706" RevisionGUID="3d47100e-6f04-4830-9f93-763b77b840b9" CreationDate="2010-07-27T17:42:58.053" UserId="-1" />
  <row Id="3132" PostHistoryTypeId="2" PostId="1707" RevisionGUID="88b133e6-b571-4ff8-b2d3-2e08d32092f8" CreationDate="2010-07-27T18:08:44.290" UserId="430" Text="The [project page][1] indicates that it's pre-alpha code, and suggests the actionscript support is weak.  Flash UIs are nice, so I was wondering if anyone has experience getting gameswf to the point where it will embed nicely in C++ (e.g. nice function bindings) and properly play a swf that uses typical modern actionscript.&#xD;&#xA;&#xD;&#xA;Is there an alternative that doesn't carry the pricetag of a commercial product?&#xD;&#xA;&#xD;&#xA;  [1]: http://tulrich.com/textweb.pl?path=geekstuff/gameswf.txt" />
  <row Id="3133" PostHistoryTypeId="1" PostId="1707" RevisionGUID="88b133e6-b571-4ff8-b2d3-2e08d32092f8" CreationDate="2010-07-27T18:08:44.290" UserId="430" Text="Is gameswf usable?" />
  <row Id="3134" PostHistoryTypeId="3" PostId="1707" RevisionGUID="88b133e6-b571-4ff8-b2d3-2e08d32092f8" CreationDate="2010-07-27T18:08:44.290" UserId="430" Text="&lt;libraries&gt;&lt;gui&gt;&lt;swf&gt;" />
  <row Id="3135" PostHistoryTypeId="2" PostId="1708" RevisionGUID="8b309937-b7a7-45d6-8d8f-c6fcc18cb28e" CreationDate="2010-07-27T18:21:14.187" UserId="1113" Text="**Objective Caml!**&#xD;&#xA;&#xD;&#xA;Using functional languages can be a huge advantage in most types of software development, mostly because they cut development time considerably. I can see a big potential for writing a server backend to a game, or the AI and logic layers on the client, in a functional language. And as everyone knows, LISP has been used for NPC scripting.&#xD;&#xA;&#xD;&#xA;If I were to try to write the frontend of a game in a functional language, I would definitely go for [Objective Caml][1], which is a hybrid language. It's an ML descendant, and allows to mix iterative and functional styles, has an objective system with stateful objects. (Caml is the language that F# is modeled on.)&#xD;&#xA;&#xD;&#xA;OpenGL bindings seem to work flawlessly and people have been making games in OCaml for a long time. The language can be compiled and is potentially very fast (it famously won over C in some benchmarks a long time ago, don't how things stand now).&#xD;&#xA;&#xD;&#xA;There are also tons of libraries. Everything from computer science stuff to bindings to all kinds of libraries.&#xD;&#xA;&#xD;&#xA;  [1]: http://caml.inria.fr/ocaml/index.en.html" />
  <row Id="3136" PostHistoryTypeId="16" PostId="1708" RevisionGUID="8b309937-b7a7-45d6-8d8f-c6fcc18cb28e" CreationDate="2010-07-27T18:21:14.187" UserId="-1" />
  <row Id="3137" PostHistoryTypeId="5" PostId="1690" RevisionGUID="84b0eec6-7246-4af2-98e8-6ae37f55dce4" CreationDate="2010-07-27T18:27:16.593" UserId="259" Comment="&quot;game design&quot; is ambiguous" Text="The [SOLID Principles][1] apply as much to game code design as to any other profession - at least until you come to optimise, so I'd use your first example as a starting point.&#xD;&#xA;&#xD;&#xA;I'd go further though, because BaseSprite sounds like it has the tendency to become a megaclass.  The Single Responsibility Principle dictates that collision, rendering and navigation should all be handled by components, rather than individual entries in a class hierarchy. The holding class of all these components should only handle pushing world positions between them.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod" />
  <row Id="3138" PostHistoryTypeId="5" PostId="740" RevisionGUID="3c60fbd3-0d17-47f3-bc31-eb1e69fe468a" CreationDate="2010-07-27T18:58:56.590" UserId="187" Comment="Supplemental information" Text="Given the broad range of APIs you wish to cover, the typical wrapping approach is likely to be inefficient and prone to difficulty in mapping API concepts across several other APIs which may or may not support particular functions to varying degrees.&#xD;&#xA;&#xD;&#xA;As a result, the most sensible approach would be to create a **feature-centric** API. While this approach prevents the API user from utilizing all available functionality, it greatly simplifies the implementation of each backend, and enables backend-specific optimizations that would not otherwise be possible. &#xD;&#xA;&#xD;&#xA;It also greatly simplifies management of unsupported functionality for the API user; they no longer have to check if function X exists, and determine which features are affected, but instead need only query the feature itself to see if it is supported with the current configuration. Even if you support partial or limited modes for features, the context provided makes it much easier to manage.&#xD;&#xA;&#xD;&#xA;In terms of creating a stateless (also known as &lt;a href=&quot;http://meshula.net/wordpress/?page_id=93&quot;&gt;submission-based&lt;/a&gt;) renderer, typically &lt;a href=&quot;http://realtimecollisiondetection.net/blog/?p=86&quot;&gt; a 64bit key&lt;/a&gt; is used to pack and submit commands for rendering. From that point there is a &lt;a href=&quot;http://c0de517e.blogspot.com/2009/03/my-little-rendering-engine.html&quot;&gt;great deal of flexibility&lt;/a&gt; in terms of how to execute commands and what information to submit depending on what features and capabilities you want to support." />
  <row Id="3139" PostHistoryTypeId="2" PostId="1709" RevisionGUID="4798fa2a-5489-47ad-815f-468d8c9e8ad6" CreationDate="2010-07-27T19:05:15.067" UserId="1115" Text="It depends on the scope of your game. An asset manager is absolutely essential for larger titles, less so for smaller games.&#xD;&#xA;&#xD;&#xA;For larger titles you have to manage problems such as the following:&#xD;&#xA;&#xD;&#xA; - Shared assets - is that brick texture being used by multiple models?&#xD;&#xA; - Asset lifetime - is that asset you loaded 15 minutes ago no longer needed? Reference counting your assets to make sure you know when something is finished with etc&#xD;&#xA; - In DirectX 9 if certain asset types are loaded and your graphics device gets 'lost' (this happens if you press Ctrl+Alt+Del amongst other things) - your game will need to recreate them&#xD;&#xA; - Loading assets in advance of needing them - you couldn't build big open world games without this&#xD;&#xA; - Bulk loading assets - We often pack lots of assets into a single file to improve loading times - seeking around the disc is very time consuming&#xD;&#xA;&#xD;&#xA;For smaller titles these things are less of an issue, frameworks like XNA have asset managers within them - there is very little point in re-inventing it.&#xD;&#xA;&#xD;&#xA;If you find yourself needing an asset manager, there is no one-size-fits-all solution really, but I've found that a hash map with the key as a hash* of the filename (lowered and separators all 'fixed') works well for the projects I've worked on.&#xD;&#xA;&#xD;&#xA;It is usually not advisable to hardcode filenames in your app, it is usually better to have another data format (such as xml) depict filenames to 'IDs'.&#xD;&#xA;&#xD;&#xA;* As an amusing side note, you normally get one hash collision per project." />
  <row Id="3140" PostHistoryTypeId="6" PostId="1707" RevisionGUID="d4b463bc-3ead-4b52-bdc6-d69bc9b10e3d" CreationDate="2010-07-27T19:17:38.877" UserId="187" Comment="edited tags" Text="&lt;flash&gt;&lt;libraries&gt;&lt;gui&gt;&lt;swf&gt;&lt;free&gt;" />
  <row Id="3141" PostHistoryTypeId="6" PostId="1684" RevisionGUID="c195798e-c033-4044-8a87-0142de18267e" CreationDate="2010-07-27T19:24:08.457" UserId="13" Comment="edited tags" Text="&lt;2d&gt;&lt;xna&gt;&lt;architecture&gt;&lt;sprites&gt;&lt;engine&gt;" />
  <row Id="3142" PostHistoryTypeId="2" PostId="1710" RevisionGUID="c38c7a6e-21d3-417b-a4ce-0653c8bb38aa" CreationDate="2010-07-27T19:26:20.667" UserId="240" Text="(NOTE: This is a duplicate of [a question I asked on SO,][1] having temporarily forgotten about GameDev &amp;lt;hang head in shame&amp;gt;.  When one is answered, I will link it back to the other.)&#xD;&#xA;&#xD;&#xA;I'm trying to do my first client/server game using Google Apps Engine as my back end (specification requirement.) I've done the tutorials (Java), but that all seems highly browser-centric.&#xD;&#xA;&#xD;&#xA;Basically, I'd like my (mobile, not that it matters) app to:&#xD;&#xA;&#xD;&#xA;* Allow the user to create a game-account (NOT their Google account!)&#xD;&#xA;* Log-in with that account.&#xD;&#xA;* Press the &quot;MARCO&quot; button to send an account-identified request to the server.&#xD;&#xA;* Get a &quot;POLO&quot; response from the server.&#xD;&#xA; * As data (like a JSON object, XML-DOM or similar), not as a web-page.&#xD;&#xA;&#xD;&#xA;Can anyone point me to a good tutorial/sample project/detailed reading to help me achieve that? I'm pretty sure that, once I get that working, I can do all the rest of it -- but I'm having the &quot;stuck at the starting gate&quot; problem, not being able to work up basic account-login, and non-HTML data exchange.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3347132/how-to-client-server-game-using-google-app-engine" />
  <row Id="3143" PostHistoryTypeId="1" PostId="1710" RevisionGUID="c38c7a6e-21d3-417b-a4ce-0653c8bb38aa" CreationDate="2010-07-27T19:26:20.667" UserId="240" Text="How to client/server game using Google App Engine (Looking for tutorial.)" />
  <row Id="3144" PostHistoryTypeId="3" PostId="1710" RevisionGUID="c38c7a6e-21d3-417b-a4ce-0653c8bb38aa" CreationDate="2010-07-27T19:26:20.667" UserId="240" Text="&lt;google-app-engine&gt;&lt;tutorials&gt;&lt;client-server&gt;" />
  <row Id="3145" PostHistoryTypeId="2" PostId="1711" RevisionGUID="fdaf720d-db03-4621-9652-73a6727bace7" CreationDate="2010-07-27T19:29:47.443" UserId="187" Text="I'm not personally familiar with gameswf, so I can't comment on how capable it is, however if your target platform is Windows only (for now), I can point you towards &lt;a href=&quot;http://princeofcode.com/hikari.php&quot;&gt;Hikari&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA; It was originally built for &lt;a href=&quot;http://www.ogre3d.org/&quot;&gt;Ogre3D&lt;/a&gt; but it should be fairly straightforward to port, and it's been used in commercial titles such as &lt;a href=&quot;http://myzerogear.com/&quot;&gt;Zero Gear&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Best of all, it will play everything you can play with the most recent Flash player (just replace the ocx that comes with the SDK with a more recent version).&#xD;&#xA;&#xD;&#xA;In the future, Hikari will simply become an Ogre3D wrapper for the cross-platform &lt;a href=&quot;http://princeofcode.com/akarui.php&quot;&gt;Akarui&lt;/a&gt;.&#xD;&#xA;" />
  <row Id="3146" PostHistoryTypeId="2" PostId="1712" RevisionGUID="35000cb6-c4bc-4d0e-b0bf-fa3d85b03f92" CreationDate="2010-07-27T19:32:15.427" UserId="1115" Text="I think it massively depends on the quality of the course - in either case. A 'generic' CS degree that covers a wide range of topics and disciplines is infinitely more valuable than a 'games programming' course that teaches you about XNA. Whereas a games development course that focuses on computer science with additional modules in games programming (fundamentals of graphics, writing high performance code etc) would be an excellent choice.&#xD;&#xA;&#xD;&#xA;To be honest you are more likely to get hired by what you taught yourself outside of the course than what you learned on it. Most companies require some kind of demo, if it isn't flashy enough you won't be noticed. I haven't yet found a company that hires people without experience and without a degree - it is pretty much required for someone to even look at your CV.&#xD;&#xA;&#xD;&#xA;Getting into the games industry is brutally hard when you have no experience. You either have to be miles ahead of the pack, have the contacts or just darn lucky (or in most cases all three). Because of this, many people just don't make it in. For this reason, I would suggest making sure your degree is equally value to those outside the industry.&#xD;&#xA;&#xD;&#xA;While you are at university though, learn how to code in your spare time. Write some simple games in XNA, learn about shaders and **LEARN C++**.&#xD;&#xA;&#xD;&#xA;You will not get a job in professional games development without C++ unless you are very lucky. Where I work the single most important skill a programmer needs after good communication skills and general aptitude is C++. We don't use XNA, DirectX or OpenGL - most places have their own APIs, libraries or use toolchains like UE3 so these are irrelevant in anything but learning the concepts. &#xD;&#xA;&#xD;&#xA;Also network like crazy with people in the industry - see if there are any studios near you, speak to friends of friends, try and get an internship, strike up a rapport with someone important there - anything to get someone on the inside to know your name." />
  <row Id="3147" PostHistoryTypeId="2" PostId="1713" RevisionGUID="ab09e813-bcb9-4c79-a6e0-8190286c74a0" CreationDate="2010-07-27T19:41:13.937" UserId="119" Text="Other answers have covered trademarks and copyright pretty well, but do not forget patents. Many game mechanics developed in the early days of gaming are patented. The 2 that I know of are minigames while the main game loads (Ridge Racer), and jump-in multiplayer (Gauntlet). That is why you almost never see these features in any games, even though they are both great ideas. In theory if you want to use these mechanics then you have to pay a royalty to the patent holder, which could be expensive. In practice however, it is very unlikely to be enforced unless you are making a million-dollar type game." />
  <row Id="3148" PostHistoryTypeId="2" PostId="1714" RevisionGUID="43a34b48-9811-4d25-9ffc-ac58524918f4" CreationDate="2010-07-27T20:02:05.760" UserId="400" Text="One important thing besides the physics equations is tracking all the objects, so that checking for collision detection and interactions is as fast as possible.   [Spatial Hashing][1] is the technique that the [Chipmunk][2] physics engine uses.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://graphics.ethz.ch/Downloads/Publications/Papers/2003/Tes03/Tes03.pdf&#xD;&#xA;  [2]: http://code.google.com/p/chipmunk-physics/" />
  <row Id="3149" PostHistoryTypeId="2" PostId="1715" RevisionGUID="a478b3bf-edee-4ac1-9eda-57f9153ddaae" CreationDate="2010-07-27T20:05:40.010" UserId="744" Text="Everyone you will be competing against for jobs knows something about making games. You need to think about what kind of value you bring to the table that is not about making games. Whether that's a strong knowledge of computer science or software engineering, Expressionism, classical antiquity, French cooking, or cognitive psychology is up to you. Game companies have more than enough people that know games - know games, but know something else too, because that's how you're going to surprise people and make something that stands out." />
  <row Id="3150" PostHistoryTypeId="2" PostId="1716" RevisionGUID="abc526d1-845c-4bd5-9aa5-36a669185c3b" CreationDate="2010-07-27T20:07:58.523" UserId="119" Text="Many times when I'm working on Flash games I'll find that a particular combination of keys held at the same time doesn't register, e.g. LEFT, DOWN and SPACEBAR.&#xD;&#xA;&#xD;&#xA;I know from my days playing Doom this can be caused by the keyboard hardware, but surely technology has moved on since those spongy beige PS2 keyboards?&#xD;&#xA;&#xD;&#xA;So my question: are these problems caused by Flash, by the hardware, by the operating system, or something else?" />
  <row Id="3151" PostHistoryTypeId="1" PostId="1716" RevisionGUID="abc526d1-845c-4bd5-9aa5-36a669185c3b" CreationDate="2010-07-27T20:07:58.523" UserId="119" Text="What determines which key combinations register in a Flash game?" />
  <row Id="3152" PostHistoryTypeId="3" PostId="1716" RevisionGUID="abc526d1-845c-4bd5-9aa5-36a669185c3b" CreationDate="2010-07-27T20:07:58.523" UserId="119" Text="&lt;flash&gt;&lt;keyboard&gt;&lt;input&gt;" />
  <row Id="3153" PostHistoryTypeId="5" PostId="1441" RevisionGUID="5c0c181a-7330-4ae1-bb22-7837eed05d2e" CreationDate="2010-07-27T20:13:38.523" UserId="930" Comment="added 263 characters in body; added 4 characters in body" Text="One of my hobbies (aside programming, of course) is 3d modeling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modeling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modeling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modeling characters)  &#xD;&#xA;**3)** What knowledge should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development environment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existing 3D models exported by 3DS MAX (not a must, but a plus)  &#xD;&#xA; - Had the ability to create 3d models programmatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more UI-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [weighted companion cube][5], and I want to make a full-screen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room) drawn maybe through code (not an imported model)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**Edit**&#xD;&#xA;I'm going to start with UNITY, and I've noticed there's a pro version, is the free version enough to do what I want ? (not counting on the 1 month free pro account)  &#xD;&#xA;As for XNA, does the same scenario apply as well ?  &#xD;&#xA;Please leave a comment!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="3154" PostHistoryTypeId="2" PostId="1717" RevisionGUID="4e88202a-7f1d-423e-b81c-8b671aa40001" CreationDate="2010-07-27T20:14:47.103" UserId="160" Text="In games, the [Component](http://gameprogrammingpatterns.com/component.html) pattern is a common solution." />
  <row Id="3155" PostHistoryTypeId="2" PostId="1718" RevisionGUID="dbdbdc4a-ccb5-42e2-a042-975eb67396e8" CreationDate="2010-07-27T20:17:39.403" UserId="160" Text="Most particle effect systems I've seen, instead of drawing a *huge* number of points, draw a relatively smaller number of billboard textures where each textures looks a bit like an explosion. Unless your art style really prevents, you'll likely be happier going down that route. It will minimize the amount of particles you need to individually animate and render while still give a big visual effect." />
  <row Id="3156" PostHistoryTypeId="5" PostId="1696" RevisionGUID="06f7cd34-6bac-42fc-8491-c841c583ee59" CreationDate="2010-07-27T20:26:57.213" UserId="182" Comment="added some explanations of what put the bullet points under each category" Text="I'm currently working on a game in Haskell. I can't speak for functional programming in general, but for Haskell specifically:&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Good&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;These are the awesome things that make Haskell really stand out.&#xD;&#xA;&#xD;&#xA;- Purity means that reasoning about your code is a lot easier. You don't have to worry about the &quot;current&quot; value of a variable or whether using a given function will conflict with your global state in some way. It also means that parallelism and concurrency are far easier to work with (and in many cases, trivial). These things can be a godsend to game developers.&#xD;&#xA;- Haskell makes it very easy to write at a very high level using abstractions of your own creation. It's often easier to write very generic code than specialized code in Haskell, and the benefits of this manifest themselves in less development time and easier code comprehension. It's more true in Haskell than in any other language I know of that using an interface is like using an entirely new language (while still keeping the benefits of the rest of the Haskell ecosystem). What most languages call language features, Haskell calls a library, and it doesn't feel forced. If you ever find yourself reasoning about your game in psuedocode, you could probably just write a simple interface and make it real code, and it's usually worth it to do so.&#xD;&#xA;- This might conflict with other answers, but Haskell is better at handling imperative code than any other language I know of. The constraints of purity mean that Haskell has a separation between the concepts of &quot;evaluation&quot; (reducing expressions) and &quot;execution&quot; (performing side effects). You can control when and how side effects are performed with an ease unparalleled by the so-called &quot;imperative&quot; languages. Despite what I said about purity earlier, some C bindings are still very imperative (OpenGL, I'm looking at you), so this fine-grained control over imperative code is very welcome. Even the most seasoned of C programmers are likely to appreciate it once they get used to it.&#xD;&#xA;- GHC generates pretty fast binaries. They are not as fast as binaries generated from common C compilers, but are within an order of magnitude, and are *far* faster than what you would achieve with an interpreted language. Even if you can't write your game in other high level languages like Python because it would be too slow, there's a good chance you can do it in Haskell.&#xD;&#xA;- Despite there not being many game-related libraries in Haskell, as noted under &quot;The Bad&quot; below, the Haskell foreign function interface is the easiest I have ever used. You can bind to C by writing almost exclusively in Haskell.&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Bad&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;These are things that are not good but can be worked around without *too* much effort.&#xD;&#xA;&#xD;&#xA;- The time and effort needed to learn Haskell can be fairly high if you are very used to working with non-functional languages. The language itself isn't very difficult, but when you factor in common language extensions and the huge amount of libraries (remember, many things you might consider language features in other languages are libraries in Haskell), it looks much more ominous. In my opinion, it's worth it, but others may disagree.&#xD;&#xA;- Some people complain about laziness a lot. If you know what you're doing, you will not cause space leaks that are difficult to track down (I have not created a space leak in a couple years now), but beginners have a lot more trouble with this. It would be foolish of me to shoot these people down and claim that this is not a problem, but I will assert that it's a problem that is easily solved with experience.&#xD;&#xA;- There are not many great libraries for making games in Haskell, and not many Haskellers write games in it, so it's difficult to find resources and help on this matter.&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;The Ugly&lt;/h1&gt;&#xD;&#xA;&#xD;&#xA;These are things that would take considerable effort to overcome.&#xD;&#xA;&#xD;&#xA;- If you are writing a resource intensive game, GHC's garbage collector might bite you pretty hard. It's a generational, stop-the-world GC, so every once in a while you might drop a few frames. For some games this is okay, but for others it's a major problem. I and some other game developers using Haskell would like to see a soft-real-time GC implemented for GHC, but no effort is being spent on that yet, to my knowledge. Currently, I'm not worrying about working around this (and haven't seen any dropped frames from it yet), but at least one other team has resorted to putting their main rendering loop into C." />
  <row Id="3157" PostHistoryTypeId="2" PostId="1719" RevisionGUID="9b6e7d94-2621-49bd-9690-5d4610beeb08" CreationDate="2010-07-27T20:33:00.180" UserId="160" Text="I don't believe that's possible in the general case. You can easily imagine a graph where your source node has only a single connection to the rest of the graph. If that edge changes, the weight of *every* path from the source will change (although not the paths themselves).&#xD;&#xA;&#xD;&#xA;There are other pathological cases you can imagine where even a single edge change would dramatically affect pathing. Imagine a graph with two almost equally weighted chokepoints that almost all paths going to. A slight change in either chokepoint's weight could cause a majority of the paths in the graph to reroute.&#xD;&#xA;&#xD;&#xA;If you're willing to settle for an imperfect solution, one option is to have your game constantly recalculating Dijkstra's algorithm incrementally on the graph. So, in addition to your other game processes, you have another loop that works its way through Dijkstra a few nodes every frame, restarting as soon as its done. You can then tune that to spend as much CPU on it per frame as you can afford. You'll get the benefit of running a full recalculation without having the stop the world, the only problem is that you'll have stale paths for a while.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3158" PostHistoryTypeId="2" PostId="1720" RevisionGUID="d5c03125-cfbc-4cbb-a9be-aaad9f40bcba" CreationDate="2010-07-27T20:36:09.000" UserId="744" Text="Not really an answer to anything, but I feel like a discussion of game programming in functional languages is incomplete without mention of Functional Reactive Programming (FRP) - http://www.haskell.org/frp/ - and its most common implementation (I think?), YAMPA - http://www.haskell.org/yampa/." />
  <row Id="3159" PostHistoryTypeId="16" PostId="1720" RevisionGUID="d5c03125-cfbc-4cbb-a9be-aaad9f40bcba" CreationDate="2010-07-27T20:36:09.000" UserId="-1" />
  <row Id="3160" PostHistoryTypeId="2" PostId="1721" RevisionGUID="6b78635c-78fd-44a4-9307-09d654bf34e2" CreationDate="2010-07-27T20:39:52.517" UserId="160" Text="Here's the pros for each side as far as I know:&#xD;&#xA;&#xD;&#xA;**CS Degree:**&#xD;&#xA;&#xD;&#xA;* You'll get a broader education and meet a wider variety of people. This is probably more important than you realize.&#xD;&#xA;* You'll have the opportunity to change majors more drastically if you discover a new passion.&#xD;&#xA;* It's likely much cheaper.&#xD;&#xA;* Your degree will be useful outside of games. The odds of you spending your entire career in the game industry are *very* slim.&#xD;&#xA;&#xD;&#xA;**Game school degree:**&#xD;&#xA;&#xD;&#xA;* You'll get more hands-on experience with game tech.&#xD;&#xA;* You'll be around other people that want to do exactly what you want.&#xD;&#xA;* You'll (hopefully) get some industry connections.&#xD;&#xA;* You'll learn more practical game-oriented stuff. (But keep in mind that what you're learning here has a painfully short expiration date.)&#xD;&#xA;&#xD;&#xA;I would *strongly* discourage you from going to Full Sail. I worked in the game industry in Orlando for eight years and I can count the number of Full Sail grads we hired on one hand. It's fantastically expensive and is very unlikely to be worth your money." />
  <row Id="3161" PostHistoryTypeId="2" PostId="1722" RevisionGUID="97a4ba35-5981-44b9-ae2c-e48fcc43a48d" CreationDate="2010-07-27T20:46:09.710" UserId="160" Text="You can see how I implemented this for a C# roguelike [here](http://bitbucket.org/munificent/amaranth/src/tip/Amaranth.Engine/Classes/Fov.cs). The code isn't highly optimized, but it seems to be fast enough for me and (more importantly) should be fairly easy to read. It's basically doing a simple shadow casting algorithm that works one octant at a time." />
  <row Id="3162" PostHistoryTypeId="2" PostId="1723" RevisionGUID="eda91e06-41d4-420d-a492-d9307a5d65e9" CreationDate="2010-07-27T20:48:48.270" UserId="1120" Text="it's still keyboard hardware limitations.  http://en.wikipedia.org/wiki/Rollover_%28key%29" />
  <row Id="3163" PostHistoryTypeId="2" PostId="1724" RevisionGUID="08d66ef0-e1a4-450c-aa29-16977b00cd3a" CreationDate="2010-07-27T20:56:38.560" UserId="1119" Text="DISCLAIMER: I know this question starts to leave development island but it is very game development related and still think this is the best place.&#xD;&#xA;&#xD;&#xA;I see many free MMOs/online desktop client games out there. I am baffled at the ability to fund such. I don't mind hosting myself but would at least like to have someone host a matchmaking service. If these indie devs really are pouring money down the server drain then I'm screwed but if some one can &quot;learn me&quot; :) some alternatives I would greatly appreciate it." />
  <row Id="3164" PostHistoryTypeId="1" PostId="1724" RevisionGUID="08d66ef0-e1a4-450c-aa29-16977b00cd3a" CreationDate="2010-07-27T20:56:38.560" UserId="1119" Text="What options do I have for game hosting." />
  <row Id="3165" PostHistoryTypeId="3" PostId="1724" RevisionGUID="08d66ef0-e1a4-450c-aa29-16977b00cd3a" CreationDate="2010-07-27T20:56:38.560" UserId="1119" Text="&lt;server&gt;&lt;client-server&gt;" />
  <row Id="3166" PostHistoryTypeId="5" PostId="1650" RevisionGUID="5508d01e-58ce-492c-8bf4-0762b232cf13" CreationDate="2010-07-27T21:15:06.360" UserId="516" Comment="Found solution myself" Text="I need dynamic dijkstra algorithm that can update itself when edge's cost is changed without a full recalculation. Full recalculation is not an option.  &#xD;&#xA;I've tryed to &quot;brew&quot; my own implemantion with no success. I've also tryed to find on the Internet but found nothing.  &#xD;&#xA;A link to an article explaining the algorithm or even it's name will be good.&#xD;&#xA;&#xD;&#xA;&lt;b&gt;Edit:&lt;/b&gt;  &#xD;&#xA;Thanks everyone for answering. I managed to make algorithm of my own that runs in O(V+E) time, if anyone wishes to know the algorithm just say so and I will post it." />
  <row Id="3167" PostHistoryTypeId="2" PostId="1725" RevisionGUID="8f735276-5c6a-4deb-b6a4-47294f01a9f0" CreationDate="2010-07-27T21:15:56.190" UserId="678" Text="You can host a simple matchmaking service on Google App Engine for free. It should be able to service many users. If it starts being really really popular, you can start paying for the service with what you earn." />
  <row Id="3168" PostHistoryTypeId="2" PostId="1726" RevisionGUID="829baf8b-971a-4151-a026-d896f556eada" CreationDate="2010-07-27T21:17:32.460" UserId="721" Text="With OpenGL ES 2.0, ES 1.X with an extension and OpenGL =&gt; 2.1, you can use GL_POINT_SPRITES. GL_POINT_SPRITES are like a quad always in front of camera.&#xD;&#xA;&#xD;&#xA;In fragment shaders, you can:&#xD;&#xA;&#xD;&#xA; - define sizes of sprite with gl_PointSize in vertex shader&#xD;&#xA; - use gl_PointCoord (uv coordinates) in fragment shader&#xD;&#xA;&#xD;&#xA;You can use texture with alpha to draw ball sprites...&#xD;&#xA;&#xD;&#xA;[A tutorial for Point Sprites][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.shmup-dev.com/forum/index.php?topic=1870.0" />
  <row Id="3169" PostHistoryTypeId="2" PostId="1727" RevisionGUID="3dde2ee8-b491-4762-bf01-4df764f85ac0" CreationDate="2010-07-27T21:21:33.353" UserId="47" Text="You can also put off some server cost on one of the users after you setup a match.  Have one random player (preferably with the best connection to all the other players) become the &quot;host&quot;.  If this player disconnects, then find the next best host and so on." />
  <row Id="3170" PostHistoryTypeId="2" PostId="1728" RevisionGUID="5dbdd0ff-aab2-4fc9-b6c9-5617be73a207" CreationDate="2010-07-27T22:09:54.793" UserId="395" Text="Steamworks is an option if you don't mind being tied to their platform (not a huge loss since most gamers probably have Steam already)." />
  <row Id="3171" PostHistoryTypeId="2" PostId="1729" RevisionGUID="d442d1d4-ec82-4fe8-bdca-607f2b7378f9" CreationDate="2010-07-27T22:15:33.027" UserId="22" Text="If I understand correctly, the main point of protecting a single player flash game is to keep it sitelocked. How to do this right and are there any other reasons to do this?" />
  <row Id="3172" PostHistoryTypeId="1" PostId="1729" RevisionGUID="d442d1d4-ec82-4fe8-bdca-607f2b7378f9" CreationDate="2010-07-27T22:15:33.027" UserId="22" Text="How to properly protect a flash game?" />
  <row Id="3173" PostHistoryTypeId="3" PostId="1729" RevisionGUID="d442d1d4-ec82-4fe8-bdca-607f2b7378f9" CreationDate="2010-07-27T22:15:33.027" UserId="22" Text="&lt;flash&gt;&lt;distribution&gt;" />
  <row Id="3174" PostHistoryTypeId="2" PostId="1730" RevisionGUID="101d3cda-2f36-44d3-92aa-285fb54aa2da" CreationDate="2010-07-27T22:26:59.847" UserId="1081" Text="The quickest way to cull candidates is a 10 minute phone interview. Usually within the first few questions I know if this is going to be a good candidate or not.&#xD;&#xA;&#xD;&#xA;Q1. Do you know C or C++?&#xD;&#xA;Q2. Can you tell me the difference between these two variables?&#xD;&#xA;&#xD;&#xA;    int a;&#xD;&#xA;    int* b;&#xD;&#xA;&#xD;&#xA;Q3. Whats the difference between &quot;a++&quot; &amp; &quot;b++&quot;?&#xD;&#xA;&#xD;&#xA;I consider knowledge of pointers to be the absolute minimum level of competency. If you are applying for a professional game job and you don't know how pointers work, you are going to be in way over your head.&#xD;&#xA;" />
  <row Id="3175" PostHistoryTypeId="2" PostId="1731" RevisionGUID="6eca7150-4054-4980-941e-62641ecaed15" CreationDate="2010-07-27T22:58:02.683" UserId="666" Text="What you want to do is to have Boolean variables and turn them on and off while they are pressed and un-pressed. Flash has a combination of just a couple of keys(i do not know why) but you can easily get around it by just keeping your variables up to date when they are pressed and released.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3176" PostHistoryTypeId="2" PostId="1732" RevisionGUID="117a2542-4c9b-454c-9143-bfd038d3a8cd" CreationDate="2010-07-27T23:00:24.503" UserId="666" Text="For something that simple I would recommend using python(and in general the python GAE experience is quite good.)&#xD;&#xA;&#xD;&#xA;I am pretty sure that for what you want to do the simple app engine tutorial and documentation woud be enough. You want to create an application that has 3 controllers( check credentials, create credentials and answer marco-polo). &#xD;&#xA;&#xD;&#xA;There are a bunch of open source examples of python code for the app engine in github, and a lot of documentation on the official site, i would say go try it out and if you run into a wall ask a specific question =D&#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3177" PostHistoryTypeId="2" PostId="1733" RevisionGUID="079f6794-79b2-44b7-a93b-ac0dad3be739" CreationDate="2010-07-27T23:09:01.137" UserId="119" Text="The best solution for site locking is to make sure the start of the url matches your allowed url:&#xD;&#xA;&#xD;&#xA;    if (stage.loaderInfo.url.indexOf(&quot;http://www.kongregate.com&quot;) == 0)&#xD;&#xA;    {&#xD;&#xA;        trace(&quot;OK!&quot;);&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        trace(&quot;stolen!&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3178" PostHistoryTypeId="2" PostId="1734" RevisionGUID="34a1172e-b394-49dc-98a9-b46f2bced935" CreationDate="2010-07-27T23:11:10.850" UserId="119" Text="Plain Site had a lot of buzz when it first appeared:&#xD;&#xA;&#xD;&#xA;http://www.plainsightgame.com/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3179" PostHistoryTypeId="2" PostId="1735" RevisionGUID="cc2e6ccc-9abd-4ad0-93b1-6cb8fc33171b" CreationDate="2010-07-27T23:21:20.727" UserId="666" Text="If you want a very simple thing, you can find &quot;free&quot; stuff on the app engine and such, but also, you can run quite complicated stuff on slicehost.com and start with 20 bucks. You would be surprised of how much you can do with small slices. If you get more traffic than a couple hundred bucks can pay, you should be able to generate money somehow." />
  <row Id="3180" PostHistoryTypeId="2" PostId="1736" RevisionGUID="0ed0cb89-962a-43aa-af90-e108578dae23" CreationDate="2010-07-27T23:44:51.343" UserId="189" Text="I love XNA. I really do. As president of the Game Development Club at my school, we use it and I teach it. But I'm worried about it.&#xD;&#xA;&#xD;&#xA;I've always wondered, are there any signs that XNA will ever become more than just a prototyping/arcade game language? I've always gotten the feeling that Microsoft is on the cusp of abandoning it, like they did Managed DirectX. The Xbox Live Arcade is an amazing idea but it's shoved off to the side, well overshadowed by the &quot;real&quot; Xbox games when I feel like it would've had so much more potential, had Microsoft given it more emphasis.&#xD;&#xA;&#xD;&#xA;Now with XNA 4.0 CTP for Windows Phone 7 only, it seems to be morphing into some sort of phone-only thing. I'm really unsure about exactly why they are doing that.&#xD;&#xA;&#xD;&#xA;What's the current state of XNA, and where is it headed? Is it going into mobile-only, or will 4.0 eventually be released for Xbox and desktop usage?&#xD;&#xA;&#xD;&#xA;In other words, **is it a language to invest time and money into, or should it be only tentatively developed on, with the constant fear of abandonment?** *And when I ask this, I'm talking about desktop and Xbox games, as I can pretty clearly see that it is the game framework of choice for the Windows Phone 7 platform.*&#xD;&#xA;&#xD;&#xA;Since this question is somewhat subjective (but I'm really looking for facts alongside your opinions!) I am making this a CW." />
  <row Id="3181" PostHistoryTypeId="1" PostId="1736" RevisionGUID="0ed0cb89-962a-43aa-af90-e108578dae23" CreationDate="2010-07-27T23:44:51.343" UserId="189" Text="Where is XNA headed?" />
  <row Id="3182" PostHistoryTypeId="3" PostId="1736" RevisionGUID="0ed0cb89-962a-43aa-af90-e108578dae23" CreationDate="2010-07-27T23:44:51.343" UserId="189" Text="&lt;xna&gt;&lt;language-choice&gt;" />
  <row Id="3183" PostHistoryTypeId="16" PostId="1736" RevisionGUID="0ed0cb89-962a-43aa-af90-e108578dae23" CreationDate="2010-07-27T23:44:51.343" UserId="189" />
  <row Id="3184" PostHistoryTypeId="2" PostId="1737" RevisionGUID="72e0398f-ae40-4038-9cd5-ab812a260f02" CreationDate="2010-07-27T23:51:07.943" UserId="1004" Text="The feel i get from development of XNA is that they're eventually maneuvering it to be the replacement to Managed DirectX. As far as the phone features, that's simply because they're rigging XNA to support Windows Phone 7 (or whatever it's called). They did a similar thing with 3.0 (or was it 3.1?) and the Zune/Zune HD.  **Overall, i think these mobile devices are just temporary features of the platform and will fade away at some point, while they continue to improve the core of XNA.**&#xD;&#xA;&#xD;&#xA;Additional evidence is that XNA is being used more to develop high quality works (such as Sol Survivor)." />
  <row Id="3185" PostHistoryTypeId="16" PostId="1737" RevisionGUID="72e0398f-ae40-4038-9cd5-ab812a260f02" CreationDate="2010-07-27T23:51:07.943" UserId="-1" />
  <row Id="3186" PostHistoryTypeId="2" PostId="1738" RevisionGUID="cf888236-df13-4742-9c5a-e806ba0f91bc" CreationDate="2010-07-27T23:51:27.990" UserId="469" Text="For XBOX 360 is your only choice.&#xD;&#xA;&#xD;&#xA;For windows I always recommended people to use something else... There are much better options, specially those that work on other platforms than windows (like, work in most of important PC OSes...)&#xD;&#xA;&#xD;&#xA;Also Microsoft still act in any way that they think will give them some more money, even if it is bad in the long run or &quot;looks bad&quot;, like their behavior with Direct Input (they made the XBOX 360 controller work like crap on Direct Input, declared DI deprecated, and invented XInput, that supports ONLY the 360 controller, and in general has WAAAY less features than DI, it is sorta obvious that MS did that only to sell more 360 controllers on Windows, specially because they are insanely expensive)" />
  <row Id="3187" PostHistoryTypeId="16" PostId="1738" RevisionGUID="cf888236-df13-4742-9c5a-e806ba0f91bc" CreationDate="2010-07-27T23:51:27.990" UserId="-1" />
  <row Id="3188" PostHistoryTypeId="2" PostId="1739" RevisionGUID="4000080a-a3f2-4e5f-8ad9-0bfc5c61e472" CreationDate="2010-07-27T23:55:47.403" UserId="1004" Text="Don't. People *will* steal your game, no matter what you do. Trying to sitelock a flash game smells of DRM to me (OK, it's not quite DRM, but it's pretty close), and you can read [all about why DRM isn't going to work](http://superuser.com/questions/14224/how-to-explain-drm-cannot-work/14764#14764). That's not to say you shouldn't use any protection system at all, just not something that you have to visit their site a particular way and do the hokey pokey to play the game." />
  <row Id="3189" PostHistoryTypeId="2" PostId="1740" RevisionGUID="b15993e6-6ff3-40f3-8781-b960e9b37b0d" CreationDate="2010-07-27T23:57:13.703" UserDisplayName="pleasedontlaugh" Text="I have a struct which looks like:&#xD;&#xA;&#xD;&#xA;    typedef struct {&#xD;&#xA; char playerID[100];&#xD;&#xA;    } MyStruct;&#xD;&#xA;&#xD;&#xA;Then I'm using strncpy() to copy the string I want into the array. However, I would like to be able to send a playerID (string) of any size and possibly multiple strings per struct (I read about the &quot;struct hack&quot;). &#xD;&#xA;&#xD;&#xA;I'm not entirely sure how to package the struct so that it contains the dynamic character array and not just a pointer to one. Suggestions? Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3190" PostHistoryTypeId="1" PostId="1740" RevisionGUID="b15993e6-6ff3-40f3-8781-b960e9b37b0d" CreationDate="2010-07-27T23:57:13.703" UserDisplayName="pleasedontlaugh" Text="Sending a struct containing a string over network" />
  <row Id="3191" PostHistoryTypeId="3" PostId="1740" RevisionGUID="b15993e6-6ff3-40f3-8781-b960e9b37b0d" CreationDate="2010-07-27T23:57:13.703" UserDisplayName="pleasedontlaugh" Text="&lt;c++&gt;&lt;network&gt;&lt;objective-c&gt;&lt;c&gt;" />
  <row Id="3192" PostHistoryTypeId="5" PostId="1740" RevisionGUID="785a48ab-67b5-4cd9-a85a-93c5c99529ab" CreationDate="2010-07-28T00:01:10.187" UserId="51" Comment="added 6 characters in body" Text="I have a struct which looks like:&#xD;&#xA;&#xD;&#xA;    typedef struct {&#xD;&#xA;       char playerID[100];&#xD;&#xA;    } MyStruct;&#xD;&#xA;&#xD;&#xA;Then I'm using strncpy() to copy the string I want into the array. However, I would like to be able to send a playerID (string) of any size and possibly multiple strings per struct (I read about the &quot;struct hack&quot;). &#xD;&#xA;&#xD;&#xA;I'm not entirely sure how to package the struct so that it contains the dynamic character array and not just a pointer to one. Suggestions? Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3193" PostHistoryTypeId="2" PostId="1741" RevisionGUID="2a255dcc-a7ad-46c1-b43b-81680cf576de" CreationDate="2010-07-28T00:09:20.060" UserId="395" Text="[Google's Protocol Buffers](http://code.google.com/apis/protocolbuffers/docs/overview.html) is a project designed to help with this kind of thing. Makes it somewhat easy to move structs around between memory, network, disk, et al." />
  <row Id="3194" PostHistoryTypeId="2" PostId="1742" RevisionGUID="a5bb4d86-d1e6-407c-a844-b379d1ac4547" CreationDate="2010-07-28T00:15:32.357" UserId="619" Text="The XNA 4.0 CTP (now superseded by the Beta) is available for Windows development, I have been using it to work on a Windows game project. I think it's just that it isn't &quot;Officially supported&quot; for anything other than Windows 7 Phone development.&#xD;&#xA;&#xD;&#xA;I don't see any reason why Microsoft would even consider abandoning it in the short term, [Shawn Hargraves][1] mentions on his blog that they're doing a lot of work on this version to future proof it for DirectX 10 and 11.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2010/03/16/breaking-changes-in-xna-game-studio-4-0.aspx" />
  <row Id="3195" PostHistoryTypeId="16" PostId="1742" RevisionGUID="a5bb4d86-d1e6-407c-a844-b379d1ac4547" CreationDate="2010-07-28T00:15:32.357" UserId="-1" />
  <row Id="3196" PostHistoryTypeId="2" PostId="1743" RevisionGUID="b351bb8a-e96f-4414-b2f2-59b742d1947c" CreationDate="2010-07-28T00:21:58.070" UserId="953" Text="Sitelocking keeps honest sites honest, and is useful when, for example, you've got an exclusive period on a site but plan to distribute the game afterward.  It's not going to stop someone dedicated enough, and I agree that it's better to put in MochiAds or something to take advantage of the distribution.&#xD;&#xA;&#xD;&#xA;One case in which sitelocking is vital is when you are selling non-exclusive licenses after you've done a primary license.  In that case, sitelocking ensures that the nonexclusively-branded version doesn't spread, since the sublicensing sponsor is paying less and you've already promised the primary sponsor all of the viral traffic.  Yes, the sublicensor can circumvent it, but if you don't trust them, you shouldn't do business with them in the first place." />
  <row Id="3197" PostHistoryTypeId="2" PostId="1744" RevisionGUID="2213f837-66b1-4419-b1c8-1494bd554ae2" CreationDate="2010-07-28T00:37:15.620" UserId="1085" Text="This thread on the XNA forum has a list of commercial games: &#xD;&#xA;&#xD;&#xA;[List Of Commercial Games Made With XNA][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.xna.com/forums/t/29306.aspx" />
  <row Id="3198" PostHistoryTypeId="5" PostId="1744" RevisionGUID="89508fc9-767c-4940-b45b-a621e670d249" CreationDate="2010-07-28T01:06:34.937" UserId="1085" Comment="added 366 characters in body" Text="This thread on the XNA forum has a list of commercial games: &#xD;&#xA;&#xD;&#xA;[List Of Commercial Games Made With XNA][1]&#xD;&#xA;&#xD;&#xA;I'm not sure how many games are 'famous' but it includes some arcade titles like:&#xD;&#xA;&#xD;&#xA;  * [Blazing Birds][2] (4000 units)&#xD;&#xA;  * [Rocket Riot][3] (20,000 units)&#xD;&#xA;&#xD;&#xA;[Sales data here][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.xna.com/forums/t/29306.aspx&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=u4dtPZwm8A8&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Rocket_Riot&#xD;&#xA;  [4]: http://www.gamerbytes.com/2010/07/indepth_xbox_live_arcade_sales_12.php" />
  <row Id="3199" PostHistoryTypeId="2" PostId="1745" RevisionGUID="441d7052-f32d-4f00-b32c-211a2f517583" CreationDate="2010-07-28T01:19:15.737" UserId="1130" Text="As @Iain mentioned, that is not why the WiiFlash was made.&#xD;&#xA;&#xD;&#xA;You will be using actionscript 2.0 to make Flash Games for the WII.&#xD;&#xA;There is a title out there on this subject:[Nintendo Wii Flash Game Creator's Guide][1]&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.co.uk/books?id=Q1AQZ0oI9BcC&amp;printsec=frontcover&amp;dq=developing+flash+games+for+wii&amp;hl=en&amp;ei=9YRPTIW6GI6V4gaHyayrCA&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CDQQ6AEwAA#v=onepage&amp;q=developing%20flash%20games%20for%20wii&amp;f=false" />
  <row Id="3201" PostHistoryTypeId="5" PostId="1740" RevisionGUID="fb0c5ee1-6d01-41f6-829d-283ba590e0e4" CreationDate="2010-07-28T02:52:58.103" UserDisplayName="pleasedontlaugh" Comment="added 21 characters in body" Text="I'm trying to send structs as neatly sorted packets using iPhone Game Kit.. &#xD;&#xA;&#xD;&#xA;I have a struct which looks like:&#xD;&#xA;&#xD;&#xA;    typedef struct {&#xD;&#xA;       int coolStuff;&#xD;&#xA;       char playerID[100];&#xD;&#xA;    } MyStruct;&#xD;&#xA;&#xD;&#xA;Then I'm using strncpy() to copy the NSString I want into MyStruct.playerID. However, I would like to be able to send a playerID (string) of any size and possibly multiple strings per struct. Any suggestions? &#xD;&#xA;&#xD;&#xA;There is a chance I'm  making this more difficult than it actually is..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3202" PostHistoryTypeId="2" PostId="1747" RevisionGUID="72950536-108c-4cb0-b2cb-69c9a1c3b65e" CreationDate="2010-07-28T03:17:30.933" UserId="1024" Text="Re-parameterize it by arc length and sample uniformly. If you need help doing the math, I would ask it here:  &#xD;&#xA;http://math.stackexchange.com/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3203" PostHistoryTypeId="2" PostId="1748" RevisionGUID="66e28747-d4a1-49b5-b552-0328cfe22379" CreationDate="2010-07-28T04:03:56.083" UserId="632" Text="Lucidity by Lucas Arts was also written in XNA. Blueberry Garden on Steam, while an indie title, was also written using XNA." />
  <row Id="3205" PostHistoryTypeId="2" PostId="1749" RevisionGUID="1635c241-7e58-4987-a462-3cbd31896666" CreationDate="2010-07-28T04:12:10.803" UserId="647" Text="OK, here goes the solution. The root cause was an implicit destructor call which destroyed my AL context. What's interesting is that a bug in the Windows implementation causes OpenAL to fail silently when there is no current context. So all my calls to `alGetError` returned `AL_NO_ERROR` because there was context. It's a nasty little bug, in my opinion." />
  <row Id="3206" PostHistoryTypeId="2" PostId="1750" RevisionGUID="fa368b29-8b8e-4b2b-919e-939774a44176" CreationDate="2010-07-28T04:13:24.530" UserId="632" Text="The XNA 4.0 Beta allows you to target both Windows and the 360 under the Hidef profile. Given that the tools are still in beta, though, deployments to the Xbox 360 are not yet enabled.&#xD;&#xA;&#xD;&#xA;I think the investment and promotion of XNA on the Windows Phone platform shows a firm level of commitment. At the very least, WP7 will have a slew of XNA-based applications, which will require supporting XNA for a long time. &#xD;&#xA;&#xD;&#xA;As earok mentioned, a lot of the breaking changes involved in the 4.0 release are done in the interest of preparing XNA for the future." />
  <row Id="3207" PostHistoryTypeId="16" PostId="1750" RevisionGUID="fa368b29-8b8e-4b2b-919e-939774a44176" CreationDate="2010-07-28T04:13:24.530" UserId="-1" />
  <row Id="3208" PostHistoryTypeId="2" PostId="1751" RevisionGUID="d1a34afc-3dac-48d7-8b84-420191f87496" CreationDate="2010-07-28T04:20:19.890" UserId="516" Text="I'm making a TD game in Flash with no predefined path.  &#xD;&#xA;Although my grid is 40x40(small?) A* is having a struggle recalculating every time.  &#xD;&#xA;So I made my own modification to ease the recalculation and the touched cell count dropped to around 900(when modifying near the root). It still freezes for a very short(but detectible) amount of time when a new tower is placed.&#xD;&#xA;Is this implemintation problem or 40x40 is just too much?" />
  <row Id="3209" PostHistoryTypeId="1" PostId="1751" RevisionGUID="d1a34afc-3dac-48d7-8b84-420191f87496" CreationDate="2010-07-28T04:20:19.890" UserId="516" Text="So it's slow, what's now?" />
  <row Id="3210" PostHistoryTypeId="3" PostId="1751" RevisionGUID="d1a34afc-3dac-48d7-8b84-420191f87496" CreationDate="2010-07-28T04:20:19.890" UserId="516" Text="&lt;algorithm&gt;" />
  <row Id="3211" PostHistoryTypeId="2" PostId="1752" RevisionGUID="2bb0148e-aa5d-4b17-a37b-3fbbb604483b" CreationDate="2010-07-28T04:26:56.437" UserId="1024" Text="I can't comment, but first profile in Flex, everything else is conjecture.&#xD;&#xA;" />
  <row Id="3212" PostHistoryTypeId="5" PostId="1751" RevisionGUID="b8fb038a-be9d-43d0-b534-0fe5fcda694b" CreationDate="2010-07-28T04:53:24.443" UserId="516" Comment="Added info" Text="I'm making a TD game in Flash with no predefined path.  &#xD;&#xA;Although my grid is 40x40(small?) A* is having a struggle recalculating every time.  &#xD;&#xA;So I made my own modification to ease the recalculation and the touched cell count dropped to around 900(when modifying near the root). It still freezes for a very short(but detectible) amount of time when a new tower is placed.&#xD;&#xA;Is this implemintation problem or 40x40 is just too much?  &#xD;&#xA;&#xD;&#xA;&lt;b&gt;Edit:&lt;/b&gt;  &#xD;&#xA;The structur of my code:  &#xD;&#xA;All the data is saved in 2d array of cells.  &#xD;&#xA;Each cell contains it's parent in path direction(1-8 clockwise) and bitwise encoded array of it's children in path(every bit represents a child).  &#xD;&#xA;The search is perforemed by A* with the estimate of euclidian distance." />
  <row Id="3213" PostHistoryTypeId="2" PostId="1753" RevisionGUID="7d8e1378-f5d9-4ae0-9df0-f51ae57fabe3" CreationDate="2010-07-28T05:53:48.180" UserId="1004" Text="I am wondering if there's any place i can go where i can either run my own code that does matchmaking or offers hosted matchmaking for games (lie RTS games) for free. Is there?" />
  <row Id="3214" PostHistoryTypeId="1" PostId="1753" RevisionGUID="7d8e1378-f5d9-4ae0-9df0-f51ae57fabe3" CreationDate="2010-07-28T05:53:48.180" UserId="1004" Text="Are there any free ways to host a game matchmaking service?" />
  <row Id="3215" PostHistoryTypeId="3" PostId="1753" RevisionGUID="7d8e1378-f5d9-4ae0-9df0-f51ae57fabe3" CreationDate="2010-07-28T05:53:48.180" UserId="1004" Text="&lt;hosting&gt;&lt;free&gt;&lt;matchmaking&gt;" />
  <row Id="3216" PostHistoryTypeId="5" PostId="1753" RevisionGUID="6d249622-2cac-4b4d-be02-a4d972cfe168" CreationDate="2010-07-28T06:04:12.573" UserId="1004" Comment="added 1 characters in body" Text="I am wondering if there's any place i can go where i can either run my own code that does matchmaking or offers hosted matchmaking for games (I.E. RTS games) for free. Is there?" />
  <row Id="3217" PostHistoryTypeId="2" PostId="1754" RevisionGUID="66ef7723-8d4d-4afa-af86-dae16a06d013" CreationDate="2010-07-28T06:18:20.190" UserId="1004" Text="One solution that i don't see mentioned here is that money simply &quot;wears out&quot;: when the money is interacted with (used to pay for something, taken out of/put in storage, examined, etc.) it loses &quot;health&quot;, then it can be &quot;redeemed&quot; for new money somewhere if it's not too worn. This is a form of money sink, but a nonobvious one (and really the most accurate, at least for paper/coin money)" />
  <row Id="3218" PostHistoryTypeId="2" PostId="1755" RevisionGUID="60e7fe05-2e5d-4ea7-b79b-29438bbae9e8" CreationDate="2010-07-28T07:02:50.287" UserId="1094" Text="I kinds of depends exactly what you mean by &quot;evenly&quot;. I wrote a post about using ellipses in my game here: http://world-create.blogspot.com/2009/01/ellipse-maths.html&#xD;&#xA;&#xD;&#xA;From the post:&#xD;&#xA;&#xD;&#xA;    class Ellipse&#xD;&#xA;    {&#xD;&#xA;      Vector3 m_centre;&#xD;&#xA;      Vector3 m_up;&#xD;&#xA;      Vector3 m_along;&#xD;&#xA;      float m_h;&#xD;&#xA;      float m_l;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    Vector3 Ellipse::PointAt(float t)&#xD;&#xA;    {&#xD;&#xA;      float c = cos(t);&#xD;&#xA;      float s = sin(t);&#xD;&#xA;     &#xD;&#xA;      return m_h * c * m_up + m_l * s * m_along + m_centre;      &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can get points evenly spaced around the ellipse _by angle_ by doing:&#xD;&#xA;&#xD;&#xA;    PointAt(0.0f);&#xD;&#xA;    PointAt(kHalfPi);&#xD;&#xA;    PointAt(kPi);&#xD;&#xA;    PointAt(kHalfPi * 3.0f);&#xD;&#xA;    PointAt(kTwoPi);&#xD;&#xA;&#xD;&#xA;But depending on the specifics of your ellipse these values could be bunched up ( if there is a &quot;pointy&quot; end to the ellipse ).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3219" PostHistoryTypeId="2" PostId="1756" RevisionGUID="8318a389-236c-4249-ae94-cfab9227dbf1" CreationDate="2010-07-28T07:17:01.483" UserId="323" Text="Google App Engine is free up to a certain reasonably-hefty level. Past that level, it's still quite affordable. If you exceed that level, you either desperately need to optimize your code, or you can probably make enough off donations/ads to support the servers.&#xD;&#xA;&#xD;&#xA;Matchmaking is extremely cheap in both CPU and RAM, so as long as you're not doing any game logic on the server, an introductory cloud-based system should provide far more horsepower than you actually need." />
  <row Id="3220" PostHistoryTypeId="2" PostId="1757" RevisionGUID="3158610b-d4c4-4ee0-8d8a-d98dd0bb7d93" CreationDate="2010-07-28T08:28:18.740" UserId="1138" Text="Hey i am fresher, i like to play games, so as i am programmer too.I know its difficult to create a game,but please share the info,how we can create a game?&#xD;&#xA;i need to know,what all stuffs should be studied to became an game developer?&#xD;&#xA;What is this Game AI?&#xD;&#xA;what is this Game Engine?&#xD;&#xA;What are the Different type of game engine?" />
  <row Id="3221" PostHistoryTypeId="1" PostId="1757" RevisionGUID="3158610b-d4c4-4ee0-8d8a-d98dd0bb7d93" CreationDate="2010-07-28T08:28:18.740" UserId="1138" Text="How to Create a Game?" />
  <row Id="3222" PostHistoryTypeId="3" PostId="1757" RevisionGUID="3158610b-d4c4-4ee0-8d8a-d98dd0bb7d93" CreationDate="2010-07-28T08:28:18.740" UserId="1138" Text="&lt;game-design&gt;&lt;engine&gt;" />
  <row Id="3223" PostHistoryTypeId="2" PostId="1758" RevisionGUID="b8debef6-a891-42f7-a245-0d2ba83b51ea" CreationDate="2010-07-28T08:51:02.037" UserId="465" Text="Children learn through play, which by it's core nature is subversive. In digital games we can enforce and feedback any arbitrary rules and do not require &quot;conceptual rules&quot; like don't step outside the white lines.&#xD;&#xA;&#xD;&#xA;Have we started using tutorials as a crutch rather than keeping our mechanics consistent and self-explanatory?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I explore the question in depth here on my [blog][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.claire-blackshaw.com/blog/2010/07/do-tutorials-suppress-play/" />
  <row Id="3224" PostHistoryTypeId="1" PostId="1758" RevisionGUID="b8debef6-a891-42f7-a245-0d2ba83b51ea" CreationDate="2010-07-28T08:51:02.037" UserId="465" Text="Do we need tutorials?" />
  <row Id="3225" PostHistoryTypeId="3" PostId="1758" RevisionGUID="b8debef6-a891-42f7-a245-0d2ba83b51ea" CreationDate="2010-07-28T08:51:02.037" UserId="465" Text="&lt;game-design&gt;&lt;tutorials&gt;" />
  <row Id="3227" PostHistoryTypeId="2" PostId="1760" RevisionGUID="f32626bd-317c-4504-af68-7dd43cbc4d59" CreationDate="2010-07-28T09:35:16.917" UserId="539" Text="&gt; Children learn through play, which by it's core nature is subversive.&#xD;&#xA;&#xD;&#xA;Both assertions there seem questionable to me. Play is one way we learn but the only way? And why is it subversive?&#xD;&#xA;&#xD;&#xA;&gt; I explore the question in depth here on my blog&#xD;&#xA;&#xD;&#xA;Not sure if this is just an attempt to drive traffic to your site, but I will give my two cents. Whenever I have made a game (casual Flash game) and start to get feedback from the larger public the first thing I hear is &quot;We want instructions&quot;. &#xD;&#xA;&#xD;&#xA;I find not having instructions will probably take 1-2 points off my game's rating (out of 10). Even for something like a minigolf game where the user only ever has a single operation he can perform and has the same goal across each level.&#xD;&#xA;&#xD;&#xA;&gt; Have we started using tutorials as a crutch rather than keeping our mechanics consistent and self-explanatory?&#xD;&#xA;&#xD;&#xA;Is it really reasonable to strive for &quot;self explanatory&quot; game mechanics? Should Modern Warfare 2 be self explanatory? It seems to me that it would take someone new to games an incredibly long time to learn the ins and outs for a complex FPS. &#xD;&#xA;&#xD;&#xA;For a complex game, instead of striving for simplicity or obviousness I would instead focus on employing [progressive disclosure](http://en.wikipedia.org/wiki/Progressive_disclosure) so that users gradually are introduced to more complexity. This is a tried and true method and lets you stagger instructions across the entire game." />
  <row Id="3229" PostHistoryTypeId="2" PostId="1762" RevisionGUID="f910d949-3e8f-479d-b438-e64b6635f299" CreationDate="2010-07-28T09:41:45.717" UserId="335" Text="(Trying to avoid the &quot;don't use an asset manager&quot;-discussion here, since I consider it offtopic.)&#xD;&#xA;&#xD;&#xA;A key/value map is a very usable approach.&#xD;&#xA;&#xD;&#xA;We have one ResourceManager implementation where Factories for different Resource types can register.&#xD;&#xA;&#xD;&#xA;The &quot;getResource&quot; method uses templates to find the correct Factory for the wanted resourcetype and returns a specific ResourceHandle (again using the template to return a SpecificResourceHandle).&#xD;&#xA;&#xD;&#xA;The resources are refcounted by the ResourceManager (inside the ResourceHandle) and released when they are not needed anymore.&#xD;&#xA;&#xD;&#xA;The first addon we wrote was the &quot;reload(XYZ)&quot; method,&#xD;&#xA;which allows us to change resources from outside the running engine without changing any code or reloading the game.&#xD;&#xA;(This is essential when artists work on consoles ;) )&#xD;&#xA;&#xD;&#xA;Most of the time we have only on instance of the ResourceManager,&#xD;&#xA;but sometimes we create a new instance just for a level or a map. This way we can just call &quot;shutdown&quot; on the levelResourceManager and ensure nothing is leaking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### (brief) example&#xD;&#xA;    // very abbreviated!&#xD;&#xA;    // this code would never survive our coding guidelines ;)&#xD;&#xA;&#xD;&#xA;    ResourceManager* pRm = new ResourceManager;&#xD;&#xA;    pRm-&gt;initialize( );&#xD;&#xA;    pRm-&gt;registerFactory( new TextureFactory );&#xD;&#xA;    // [...]&#xD;&#xA;    TextureHandle tex = pRm-&gt;getResource&lt;Texture&gt;( &quot;test.otx&quot; ); // in real code we use some macro magic here to use CRCs for filenames&#xD;&#xA;    tex-&gt;storeToHardware( 0 ); // channel 0&#xD;&#xA;&#xD;&#xA;    pRm-&gt;releaseResource( pRm );&#xD;&#xA;&#xD;&#xA;    // [...]&#xD;&#xA;    pRm-&gt;shutdown(); // will log any leaked resource&#xD;&#xA;    &#xD;&#xA;" />
  <row Id="3230" PostHistoryTypeId="2" PostId="1763" RevisionGUID="6527e343-7521-446c-8dc7-4cc46b0269b2" CreationDate="2010-07-28T09:57:02.733" UserId="919" Text="Basically a game is composed of 3 things:&#xD;&#xA;&#xD;&#xA;1. Game Design - your mecahnics, rules, goals and rewards&#xD;&#xA;2. Game Assets - your graphics (2d or 3d) and sounds&#xD;&#xA;2. Game program - program that consolidates everthing&#xD;&#xA;&#xD;&#xA;Game AI- Artificial Intelligence, a program use to simulate control over actions of certain entities usually NPC's be it enemies or allies. This can be set by programmers or designers&#xD;&#xA;&#xD;&#xA;Game engine - are a collection of tools (from frame works, middle ware etc.) to make games. &#xD;&#xA;&#xD;&#xA;For better knowledge it would be good to check out articles at gamasutra.com as well" />
  <row Id="3231" PostHistoryTypeId="5" PostId="1758" RevisionGUID="e2a746ea-04cc-4f8f-88cd-126102562f19" CreationDate="2010-07-28T10:20:44.087" UserId="465" Comment="added 585 characters in body" Text="Children learn through play, which by it's core nature is subversive. In digital games we can enforce and feedback any arbitrary rules and do not require &quot;conceptual rules&quot; like don't step outside the white lines.&#xD;&#xA;&#xD;&#xA;Have we started using tutorials as a crutch rather than keeping our mechanics consistent and self-explanatory?&#xD;&#xA;&#xD;&#xA;*Edited for clarity*&#xD;&#xA;&#xD;&#xA;&gt; So I was listening to [Another Castle][1] interview the extremly interesting [Eric Zimmerman][2]. They were talking about the subverssive nature of play when my brain started drifting to tutorials, thinking about Limbo. Then I realised that not once on Glo did we ask, do we need tutorials?&#xD;&#xA;&#xD;&#xA;&gt; Now I know the indie and art games scene has been promoting this concept of subversive play for a long time but I ask you how many developers question the need for a tutorial?&#xD;&#xA;&#xD;&#xA;[Copied from Blog Post ][3] for explanation and context&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedesignadvance.com/?p=1939&#xD;&#xA;  [2]: http://www.ericzimmerman.com/&#xD;&#xA;  [3]: http://www.claire-blackshaw.com/blog/2010/07/do-tutorials-suppress-play/" />
  <row Id="3232" PostHistoryTypeId="2" PostId="1764" RevisionGUID="b2b49f1c-e624-4a62-a18f-0a31196de955" CreationDate="2010-07-28T10:25:14.443" UserId="119" Text="For a start you could change your array to a vector - should give you some speed improvements. Post the code and we might be able to suggest more optimisations." />
  <row Id="3233" PostHistoryTypeId="2" PostId="1765" RevisionGUID="22359dfe-24b4-4b67-83d6-91e6b539c243" CreationDate="2010-07-28T10:30:29.010" UserId="1143" Text="I've always thought that a good asset manager should have several modes of operation. These modes would most likely be separate source modules adhering to a common interface. The two basic modes of operation would be:&#xD;&#xA;&#xD;&#xA; - Production Mode - all assets are local and stripped of all meta data&#xD;&#xA; - Development Mode - assests are stored in a database (e.g. MySQL, etc) with additional meta data. The database would be a two tier system with a local database caching a shared database. Content creators would be able to edit and update the shared database and updates automatically propegated to developer / QA systems. It should also be possible to create placeholder content. Since everything is in a database, queries can be made on the database and reports generated to analyse the state of the production.&#xD;&#xA;&#xD;&#xA;You'd need a tool that can grab all the assests from the shared database and create the production dataset.&#xD;&#xA;&#xD;&#xA;In my years as a developer, I've never seen anything like this, although I've only worked for a handful of companies so my view is not really representative." />
  <row Id="3234" PostHistoryTypeId="2" PostId="1766" RevisionGUID="7e0f8a2b-1286-4369-85cd-73ac2a91b99e" CreationDate="2010-07-28T10:32:29.600" UserId="1004" Text="This is a good question. I would say that it really depends on the game; some games are complex by nature and thus need tutorials for people to effectively learn (see Dwarf Fortress, AI War, some RTS games), while others contain no tutorials and would be spoiled by them (see most adventure games, arcade games, some RPGs)." />
  <row Id="3235" PostHistoryTypeId="2" PostId="1767" RevisionGUID="6a08dc72-62e7-4163-b7a9-28b1f7c8ba8e" CreationDate="2010-07-28T10:44:53.020" UserId="365" Text="I'm a programmer but have not yet developed any games.  &#xD;&#xA;&#xD;&#xA;I have played various 3D games and always wondered how the Map of the field is stored and rendered.  &#xD;&#xA;&#xD;&#xA;I know some acceleration card is a necessary hardware, but how exactly the view is changed without even a single flicker on the screen.&#xD;&#xA;&#xD;&#xA;Do you have any online material to help me understand this.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="3236" PostHistoryTypeId="1" PostId="1767" RevisionGUID="6a08dc72-62e7-4163-b7a9-28b1f7c8ba8e" CreationDate="2010-07-28T10:44:53.020" UserId="365" Text="How a 3D game map is stored and handled" />
  <row Id="3237" PostHistoryTypeId="3" PostId="1767" RevisionGUID="6a08dc72-62e7-4163-b7a9-28b1f7c8ba8e" CreationDate="2010-07-28T10:44:53.020" UserId="365" Text="&lt;3d&gt;&lt;maps&gt;" />
  <row Id="3238" PostHistoryTypeId="2" PostId="1768" RevisionGUID="50e39799-77a1-4e23-a3d5-46a3d78b2946" CreationDate="2010-07-28T10:52:35.240" UserId="1004" Text="The field of game design is a broad topic, but it's certainly possible for to get started with little prior experience. The first thing you need is an idea; you can find many good starting ones [at this question](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with). &#xD;&#xA;&#xD;&#xA;From there, you should choose your platform and language/IDE. A good solid choice for PC development is [XNA](http://www.google.com/url?sa=t&amp;source=web&amp;cd=7&amp;ved=0CCMQFjAG&amp;url=http%3A%2F%2Fcreators.xna.com%2F&amp;ei=6glQTNG0JoyksQP6lJnbBw&amp;usg=AFQjCNG3K8SnTfVTZnJp_BA2KEW7TCrw2w), and if you want to go web you can choose Flash (though that may cost money).&#xD;&#xA;&#xD;&#xA;Then, you need to figure out the *design* of the game engine you'll write (i'd personally recommend an Asteroids clone). This includes figuring out how the main game loop is structured, what attendant classes to make, how you'll draw everything on the screen, etc. Your platform+language+ide choice may affect this, so make sure you know how to fit a design into the language you chose.&#xD;&#xA;&#xD;&#xA;After that, you get to work. You map out the classes and start implementing features, using programmer art along the way. After a long time of this (if your design was good and you didn't give up), you should basically have a game.&#xD;&#xA;&#xD;&#xA;Then you look for assets you can use, and tweak your game to use them. Finally, it's a good idea to get a few parties to playtest the game and get feedback (actually it's good to do this once you have something playable, not when it's done)&#xD;&#xA;&#xD;&#xA;That's an overview of how you could do a 1-man simple 2d game, the process is much more complicated for larger teams and 3d games. The above is a good start for you though. For instance, if you hired an artist for your game, chances are you'd have him working at the same time you worked on programming the game, so you'd use his/her output as you get it.&#xD;&#xA;&#xD;&#xA;As far as what Game AI and game engines are:&#xD;&#xA;&#xD;&#xA; * Game AI is where you program the computer to play some part in the game, whether it's a computerized opponent in a strategy game, or the behavior of a space invader from Galaga.&#xD;&#xA; * Game engine is a loose term used to refer to the collection of code which makes up the game and is compiled directly into a computer executable file (and possibly attendant DLLs).&#xD;&#xA;&#xD;&#xA;and finally, [Don't create an MMO till you're really good](http://sol.gfxile.net/mmorpg.html)!" />
  <row Id="3239" PostHistoryTypeId="5" PostId="1768" RevisionGUID="2de43dc0-182f-4f42-a461-b00b44e7f05a" CreationDate="2010-07-28T11:02:29.217" UserId="1004" Comment="added 3 characters in body" Text="The field of game design is a broad topic, but it's certainly possible for to get started with little prior experience. The first thing you need is an idea; you can find many good starting ones [at this question](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with). &#xD;&#xA;&#xD;&#xA;From there, you should choose your platform and language/IDE. A good solid choice for PC development is [XNA](http://www.google.com/url?sa=t&amp;source=web&amp;cd=7&amp;ved=0CCMQFjAG&amp;url=http%3A%2F%2Fcreators.xna.com%2F&amp;ei=6glQTNG0JoyksQP6lJnbBw&amp;usg=AFQjCNG3K8SnTfVTZnJp_BA2KEW7TCrw2w), and if you want to go web you can choose Flash (though that may cost money).&#xD;&#xA;&#xD;&#xA;Then, you need to figure out the *design* of the game engine you'll write (i'd personally recommend an Asteroids clone). This includes figuring out how the main game loop is structured, what attendant classes to make, how you'll draw everything on the screen, etc. Your platform+language+ide choice may affect this, so make sure you know how to fit a design into the language you chose.&#xD;&#xA;&#xD;&#xA;After that, you get to work. You map out the classes and start implementing features, using programmer art along the way. After a long time of this (if your design was good and you didn't give up), you should basically have a game.&#xD;&#xA;&#xD;&#xA;Then you look for assets you can use, and tweak your game to use them. Finally, it's a good idea to get a few parties to playtest the game and get feedback (actually it's good to do this once you have something playable, not when it's done)&#xD;&#xA;&#xD;&#xA;That's an overview of how you could do a 1-man simple 2d game, the process is much more complicated for larger teams and 3d games. The above is a good start for you though. For instance, if you hired an artist for your game, chances are you'd have him working at the same time you worked on programming the game, so you'd use his/her output as you get it.&#xD;&#xA;&#xD;&#xA;As far as what Game AI and game engines are:&#xD;&#xA;&#xD;&#xA; * Game AI is where you program the computer to play some part in the game, whether it's a computerized opponent in a strategy game, or the behavior of a space invader from Galaga.&#xD;&#xA; * Game engine is a loose term used to refer to the collection of code which makes up the game and is compiled directly into a computer executable file (and possibly attendant DLLs).&#xD;&#xA;&#xD;&#xA;and finally, [Don't create an MMO till you're really good](http://sol.gfxile.net/mmorpg.html)! :)" />
  <row Id="3240" PostHistoryTypeId="2" PostId="1769" RevisionGUID="9684d14c-38d3-42b6-b999-4c81958eb1e0" CreationDate="2010-07-28T11:06:17.527" UserId="259" Text="The unmentioned assertion here is that tutorials are bad and not fun. Can we explain our game concepts to the player in a fun way?  &#xD;&#xA;&#xD;&#xA;To give two competing examples, the Halo tutorial was excellent, and famously selected your axis inversion for you by just watching what you did when asked to &quot;look up.&quot;  Conversely, I've recently played a cricket game whose tutorial was a sequence of text screens and actions to parrot, with little or no context.  &#xD;&#xA;&#xD;&#xA;Any tutorial should pass two requirements: the player shouldn't have to pick up the manual at any point in the game, and the player should have their immersion compromised as little as possible.  If you can do these, I see no reason why you shouldn't have a tutorial." />
  <row Id="3241" PostHistoryTypeId="2" PostId="1770" RevisionGUID="d7ba9572-dcf9-4b12-957b-411871b79769" CreationDate="2010-07-28T11:14:42.707" UserId="1143" Text="Generally, the world is map up of lots of triangles, and the map is a list of these triangles and the location in the world of each vertex. The process to draw them is:&#xD;&#xA;&#xD;&#xA;- Setup the position of the 'camera' - if you were stood in the world, this is where you'd be in world position&#xD;&#xA;- Transform the triangle vertices into 'camera space'&#xD;&#xA;- Transform the triangles from 'camera space' into 'screen space' - this is where the perpective effect happens (distant things are smaller). The triangles become 2D at this point.&#xD;&#xA;- Draw the 2D triangle onto a hidden screen.&#xD;&#xA;- When all the triangles have been drawn, show the screen to the player.&#xD;&#xA;&#xD;&#xA;The last step is usually tied to the monitor's frame rate, so that the process of showing the hidden screen is done during the v-blank interval - a concept derived from cathode ray tube monitors which allowed the cathode beam to move from bottom right to top left, this required rapidly, but not instaneously, changing voltages on the deflection coils at the back of the ray tube.&#xD;&#xA;&#xD;&#xA;This is a really simple method. To get high performance you need to add things like hidden surface removal, occulsion, visible set determination, and so on. There's lots of algorithms involved in deciding what to draw.&#xD;&#xA;&#xD;&#xA;Also, I said the world is made up of triangles, but it might not be stored on disk this way. Often, the triangles that are drawn to screen are defined at run time from higher order primitives, such as height maps, splines, tessalation, geometric primitives (e.g. a sphere, box, etc) and so on.&#xD;&#xA;&#xD;&#xA;Dedicated hardware is not necessary - many early 3D games did it all in software (even on 8-bit CPUs with no FPUs). It just makes it quicker and easier to do.&#xD;&#xA;&#xD;&#xA;Such a simple question. No easy answer." />
  <row Id="3242" PostHistoryTypeId="5" PostId="1757" RevisionGUID="52380bd2-48d3-499a-bbfb-98e311d67e13" CreationDate="2010-07-28T13:03:55.183" UserId="119" Comment="added 7 characters in body; edited tags" Text="Hey! I'm a newbie. I like to play games, but I'd also like to program them too. I know it's difficult to create a game, but please share the basic info I need to get started creating my first game. What do I need to study to become a game developer? What is &#xD;&#xA;game AI? What is a Game Engine? What are the different types of game engine?" />
  <row Id="3243" PostHistoryTypeId="6" PostId="1757" RevisionGUID="52380bd2-48d3-499a-bbfb-98e311d67e13" CreationDate="2010-07-28T13:03:55.183" UserId="119" Comment="added 7 characters in body; edited tags" Text="&lt;game-design&gt;&lt;engine&gt;&lt;newbie&gt;" />
  <row Id="3244" PostHistoryTypeId="2" PostId="1771" RevisionGUID="97768903-6292-4eba-abec-161e5293cd15" CreationDate="2010-07-28T13:06:34.647" UserId="119" Text="If you're completely new to game development and you just want to play around, I'd recommend starting with [Game Maker][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com/gamemaker/" />
  <row Id="3245" PostHistoryTypeId="2" PostId="1772" RevisionGUID="44dca210-ec8d-4f09-9d53-d2f27db15637" CreationDate="2010-07-28T13:45:07.850" UserDisplayName="John" Text="Haha, I thought this question was funny because I know the musicians are asking where all the *game developers* are.&#xD;&#xA;&#xD;&#xA;Aside from plugging myself, if you're looking for an upstart wanting to specialize in game music, I'd suggest contacting the heads of the music departments of your local universities. Ask them if they've got any students who are focusing on game or film scoring; whenever I've had a gig and needed a player, the music heads have always been more than happy to get their students some professional experience.&#xD;&#xA;&#xD;&#xA;PS use fancy musician lingo like &quot;gig&quot; to let them know you're serious." />
  <row Id="3246" PostHistoryTypeId="2" PostId="1773" RevisionGUID="362b4ba3-9528-4a35-8ffa-584142f456a9" CreationDate="2010-07-28T13:46:26.710" UserId="1143" Text="*I'm assuming that TD is 'Tower Defence'*&#xD;&#xA;&#xD;&#xA;I think A* is going somewhat overboard for this.&#xD;&#xA;&#xD;&#xA;At the start of the game, flood fill the game area from the exit points to create a movement map:&#xD;&#xA;&#xD;&#xA;     |---------|&#xD;&#xA;     |5|4|3|3|3|&#xD;&#xA;     |5|4|3|2|2|&#xD;&#xA;    -&gt;5|4|3|2|1-&gt;&#xD;&#xA;     |5|4|3|2|2|&#xD;&#xA;     |5|4|3|3|3|&#xD;&#xA;     |---------|&#xD;&#xA;&#xD;&#xA;and movement is always towards a square with a lower value.&#xD;&#xA;&#xD;&#xA;When the player places a tower, update each of the eight adjacent squares: for each square, set it's movement value to one more than the lowest adjacent value. If the value changes, repeat the process centred on the updated square. Then, to check that the route to the exit is not blocked, ensure all squares are adjacent to a square of a lower value.&#xD;&#xA;&#xD;&#xA;When the player removes a tower, set the movement value to one more than the lowest adjacent square and repeat the process above.&#xD;&#xA;&#xD;&#xA;A simpler approach would be to re-do the flood fill.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3247" PostHistoryTypeId="2" PostId="1774" RevisionGUID="6754ac9b-1412-44ef-92c1-66a58a9e402b" CreationDate="2010-07-28T14:02:06.140" UserId="189" Text="I have had my eye on functional programming languages for a while, but am hesitating to actually get into them. But I think it's about time I at least starting glancing that direction to make sure I'm ready for anything.&#xD;&#xA;&#xD;&#xA;I've seen talk of Haskell, F#, Scala, and so on. But I have no clue the differences between the languages and their communities, nor do I particularly care; except in the context of game development.&#xD;&#xA;&#xD;&#xA;So, from a game development standpoint, **which functional programming language has the most features suited for game programming?** For example, are there any functional game development libraries/engines/frameworks or graphics engines for functional languages? Is there a language that handles certain data structures which are commonly used in game development better?&#xD;&#xA;&#xD;&#xA;Bottom line: **what functional programming language is best for functional game programming, and why?**&#xD;&#xA;&#xD;&#xA;*I believe/hope this question will declare a clear best language therefore I haven't marked it CW despite its subjective tendency.*" />
  <row Id="3248" PostHistoryTypeId="1" PostId="1774" RevisionGUID="6754ac9b-1412-44ef-92c1-66a58a9e402b" CreationDate="2010-07-28T14:02:06.140" UserId="189" Text="What functional language is most suited to create games with?" />
  <row Id="3249" PostHistoryTypeId="3" PostId="1774" RevisionGUID="6754ac9b-1412-44ef-92c1-66a58a9e402b" CreationDate="2010-07-28T14:02:06.140" UserId="189" Text="&lt;language-choice&gt;&lt;functional&gt;" />
  <row Id="3250" PostHistoryTypeId="2" PostId="1775" RevisionGUID="f00139c1-1bc6-49f2-839a-c2515428a6f2" CreationDate="2010-07-28T14:16:36.433" UserId="100" Text="I am developing a game that is running as a web application. The fact is that the game lose sense if one player creates several accounts. Imagine that is a turn-based strategy game, and if you play against yourself (with another account) you can earn tons of points easily.&#xD;&#xA;&#xD;&#xA;At first, I thought about logging every single user action, and then comparing the users IP to detect if there is any clue of cheating. But then I noticed that different users could be running under the same IP, for example if they are in the school and all them share the same IP using a proxy. Using this way innocent people could result banned.&#xD;&#xA;&#xD;&#xA;Is there any better approach that I'm missing?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3251" PostHistoryTypeId="1" PostId="1775" RevisionGUID="f00139c1-1bc6-49f2-839a-c2515428a6f2" CreationDate="2010-07-28T14:16:36.433" UserId="100" Text="How to handle Multiple-accounts creation and cheating?" />
  <row Id="3252" PostHistoryTypeId="3" PostId="1775" RevisionGUID="f00139c1-1bc6-49f2-839a-c2515428a6f2" CreationDate="2010-07-28T14:16:36.433" UserId="100" Text="&lt;web&gt;&lt;anti-cheat&gt;" />
  <row Id="3253" PostHistoryTypeId="2" PostId="1776" RevisionGUID="f12c9fef-9079-4482-9f70-66810bac79bb" CreationDate="2010-07-28T14:25:21.220" UserId="371" Text="F# being part of Microsofts .net family has access to XNA, which is a fantastic base for building games. A bit of googling turns up some tutorials, videos and articles. The great XNA docs should help as well.&#xD;&#xA;&#xD;&#xA;There has been some movement in games for Haskell as well, see [here][1]. You'll probably be using openGL bindings.&#xD;&#xA;&#xD;&#xA;Since Scala plays in Java land, it integrates with all the available Java engines/bindings, see this [SO][2] post.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.haskell.org/haskellwiki/Applications_and_libraries/Games&#xD;&#xA;  [2]: http://stackoverflow.com/questions/1048801/is-there-any-game-engine-in-scala&#xD;&#xA;&#xD;&#xA;I think it comes down to preference, while I've only played with Haskell, I'd imagine each functional language has it's own idiosyncrasies. It may be worth whipping up a small test game in each and seeing which one feels better to you.&#xD;&#xA;&#xD;&#xA;Like I said I only have minimal Haskell experience, so I can't comment on the best, but these resources should get you started hopefully." />
  <row Id="3254" PostHistoryTypeId="2" PostId="1777" RevisionGUID="3f49b803-9990-4dd4-b1f5-985fc0dfb74a" CreationDate="2010-07-28T14:52:13.900" UserId="1149" Text="I think there is another aproach. Because there is another potential harm: Imaging two friends who both create two accounts: one looser and one winner account each. One day friend A uses his looser account to loose all games against friend B's winner account. The next day they change. Checking the IPs won't help here.&#xD;&#xA;&#xD;&#xA;You should check the behaviour of the players (a strategy know from intrusion detections systems). If two player play each other often and one looses all the time, this is a clue. If games end very early, it is another clue.&#xD;&#xA;&#xD;&#xA;You could score those clues, add the score up to a reputation (don't show the reputation to the users) and ban accounts if they reach a value you define. Maybe there should also be anti-clues that repairs the reputation.&#xD;&#xA;&#xD;&#xA;Other clues depend very much on your game. But I think you get the idea." />
  <row Id="3255" PostHistoryTypeId="2" PostId="1778" RevisionGUID="23d27266-cbba-4549-b4ee-c6254fd92f29" CreationDate="2010-07-28T15:46:55.407" UserId="865" Text="Strange, I thought I replied to this, but the reply seems to be gone.&#xD;&#xA;Make your search algorithm such that it can be updated in multiple steps, so that when you place a tower and play an animation, you can do a little bit every frame and you'll have somewhere between half a second and a second to update your A* without a noticable pause. &#xD;&#xA;It's latency - iF you can't speed it up, find a way to hide it. Playing an animation while placing a tower would be natural for a game and imo a good place to hide it." />
  <row Id="3256" PostHistoryTypeId="2" PostId="1779" RevisionGUID="58834418-4abb-492c-827e-57bf2d305ba0" CreationDate="2010-07-28T16:15:51.753" UserId="953" Text="You could award points based on the difference between the opponents' point totals.  Very good players would earn few points for defeating newbies, and newbies would earn many points for defeating experienced players.  Likewise, losers would lose points proportional to the same scale.&#xD;&#xA;&#xD;&#xA;This wouldn't completely solve your problem, but it would eliminate the simple case of someone creating and defeating a bunch of newbie alts, as well as making it harder to level two different accounts of equal power.&#xD;&#xA;&#xD;&#xA;Really, though, there's not a foolproof way of stopping this; a sufficiently dedicated cheater will succeed.  But if you flag accounts with suspicious activity for review, where &quot;suspicious activity&quot; includes multiple accounts with the same e-mail or IP address, then you'll be able to spot the most egregious offenders." />
  <row Id="3257" PostHistoryTypeId="2" PostId="1780" RevisionGUID="d6783272-748d-4e29-9bb1-1047b324968e" CreationDate="2010-07-28T16:36:25.167" UserId="422" Text="I have a working example of a client/server game built on App Engine. You can &lt;a href=&quot;http://github.com/richtaur/Valadria&quot;&gt;fork it on GitHub&lt;/a&gt; and &lt;a href=&quot;http://playvaladria.appspot.com/&quot;&gt;try the live demo&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;I haven't written about it or anything yet, but the code is relatively well commented. Have fun!" />
  <row Id="3258" PostHistoryTypeId="2" PostId="1781" RevisionGUID="ab7157f6-a688-429a-badf-0cf9dc49c28b" CreationDate="2010-07-28T16:39:40.857" UserId="14" Text="There are a few different ways to handle this, and many solutions have their own merits but I will give my own ideal on what works out best.&#xD;&#xA;&#xD;&#xA;First, it's important to understand that no matter how complicated your system is, someone who is sufficiently invested in gaming the system (with appropriate knowledge) will figure out a way to game it. &#xD;&#xA;&#xD;&#xA;To seriously handle this issue, if it is really an issue for you, you need to handle this in both the design and technical implementation of your game.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;On the technical end, you need to basically play a game of comparisons.&#xD;&#xA;&#xD;&#xA;&gt; In general, I am pro-logging if you&#xD;&#xA;&gt; are running any type of game with user&#xD;&#xA;&gt; interaction then verbose logs would&#xD;&#xA;&gt; allow you to modify and tailor your&#xD;&#xA;&gt; game based on real quantitative&#xD;&#xA;&gt; measurements.&#xD;&#xA;&#xD;&#xA; Using your logs, you can set up a system to compare data between accounts of any number of similarities.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&gt; For example, if two accounts are using&#xD;&#xA;&gt; the same IP address, or any other information that you deem an appropriate comparison measure, you would want to&#xD;&#xA;&gt; be able to look at overall interaction&#xD;&#xA;&gt; between the two (wins/losses, trading)&#xD;&#xA;&gt; in relation to the amount of&#xD;&#xA;&gt; interaction with others.&#xD;&#xA;&#xD;&#xA;Using this data you can pass appropriate judgement on a case-by-case basis, or automatically. Depending on how widespread the issue has become, I would recommend an automatic option and handling any issues through a live moderator. It's important that you don't delete the account, just suspend it with a message along the lines of &quot;This account has been suspected of violating this game's TOS agreement. If you disagree please go here&quot; with a link to an arbitration panel or something.&#xD;&#xA;&#xD;&#xA;It is important that such a thing is in place, because people could be sharing IP addresses at home, or at school. Also, for younger kids, they could be using their parent's email addresses, credit cards, or even names in their sign-up information depending on how protective they are.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;The second phase is design side. While some benefit is to be expected, you need to sufficiently disincentivize this form of cheating with your gameplay. There are quite a few ways that you can go about this, there are the wholly annoying ones of very short timeouts (which may be necessary). But I feel the best way is by appropriately adjusting the benefits between two accounts.&#xD;&#xA;&#xD;&#xA;&gt;For example, some MMOs have altered the benefit that high level players recieve when playing with players outside of a reasonable level range. This discourages players with access to multiple accounts from powerleveling themselves (atleast within a specific range)&#xD;&#xA;&#xD;&#xA;You *could* even specifically target accounts that share data and directly decrease the benefit that they gain when interacting with each other. This would encourage interaction with other players, but it can be circumvented with proxy servers and it would be ill-advised depending on your target audience.&#xD;&#xA;&#xD;&#xA;The other way that think would work is having gameplay so engaging that people can't really manage to play two separate accounts and still keep up with everyone else.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Of course with this system, you would need to spend a nice deal of effort tweaking to prevent false positives and what not.&#xD;&#xA;&#xD;&#xA;##tl;dr?&#xD;&#xA;You want to collect appropriate data that allows you to automatically detect and handle potential threats and deal with false positives on a user-by-user basis. A good deal of babysitting would be necessary to make sure you don't have false-positives.&#xD;&#xA;&#xD;&#xA;Also you want to reduce the benefit of cheating with multiple accounts on the gameplay end." />
  <row Id="3259" PostHistoryTypeId="5" PostId="1191" RevisionGUID="4b0d990e-3195-482c-9837-72910174d5eb" CreationDate="2010-07-28T16:54:18.920" UserId="1004" Comment="deleted 159 characters in body; edited body; added 159 characters in body" Text="mapValue function:&#xD;&#xA;&#xD;&#xA;    float mapValue( float inVal, float inFrom, float inTo, float outFrom, float outTo )&#xD;&#xA;    {&#xD;&#xA;        float inScale = (inFrom != inTo) &#xD;&#xA;            ? ( ( inVal - inFrom ) / ( inTo - inFrom ) ) &#xD;&#xA;            : 0.0f;&#xD;&#xA;        float outVal = outFrom + ( inScale * ( outTo - outFrom ) );&#xD;&#xA;        outVal = (outFrom &lt; outTo ) &#xD;&#xA;            ? clamp( outVal, outFrom, outTo ) &#xD;&#xA;            : clamp( outVal, outTo, outFrom );&#xD;&#xA;        return outVal;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It takes a value, converts it to a proportion within a range, and then scales that relative to another range.  Like a double-lerp.&#xD;&#xA;&#xD;&#xA;You can use it to normalise stuff:&#xD;&#xA;&#xD;&#xA;    float minDamage = 0.0f; float maxDamage = 300.0f;&#xD;&#xA;    float normalisedDamage = mapValue(damange, minDamage, maxDamage, 0.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;Or you can convert from one range to another:&#xD;&#xA;&#xD;&#xA;    float brakeStrength = mapValue(timeToCollision, &#xD;&#xA;        0.0f, 10.0f, // seconds&#xD;&#xA;        1.0f, 0.2f // brake values &#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;Notice in the second example that the out range is a different order to the in range.&#xD;&#xA;&#xD;&#xA;It  doesn't look like much, but I use this little fella all over the place." />
  <row Id="3260" PostHistoryTypeId="2" PostId="1782" RevisionGUID="67717dbd-a0b6-4f6a-89d3-ed4c74d35947" CreationDate="2010-07-28T17:14:45.487" UserId="1154" Text="My former employer shifted from using a robust set of custom container classes to STL. Build times went up and ease of debugging went down, both pretty significantly. If we'd been starting from scratch, STL (perhaps better used) would likely have made sense, but it was never clear to me that we gained anything in switching to STL that would justify throwing out working, fast, debuggable code.&#xD;&#xA;&#xD;&#xA;For my personal projects, whether STL fits or not depends on the project. If I'm trying to do some Mike Acton-style data-driven, memory-and-cache-access optimized work, I'll at least think about rolling my own custom data structures. If I'm prototyping some algorithms or gameplay and don't care about performance, scalability, target platform, etc. I'll automatically grab STL." />
  <row Id="3261" PostHistoryTypeId="5" PostId="1184" RevisionGUID="a22de7c4-705d-43bd-8ec2-b1c1826fdd81" CreationDate="2010-07-28T17:20:16.617" UserId="10" Comment="added 15 characters in body" Text="The biggest one from me was reading about [Scott Bilas's GameObject system.][1] Even though I don't use a database system like he does, it stopped me making 6 level inheritance trees and got me creating a component system which is much more manageable and reusable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://scottbilas.com/games/dungeon-siege/" />
  <row Id="3262" PostHistoryTypeId="5" PostId="1751" RevisionGUID="b866fd67-05fe-406a-96c3-16f4b0ed0c1e" CreationDate="2010-07-28T17:43:44.283" UserId="162" Comment="spelling, added tags" Text="I'm making a TD game in Flash with no predefined path.  &#xD;&#xA;Although my grid is 40x40(small?) A* is having a struggle recalculating every time.  &#xD;&#xA;So I made my own modification to ease the recalculation and the touched cell count dropped to around 900(when modifying near the root). It still freezes for a very short(but detectible) amount of time when a new tower is placed.&#xD;&#xA;Is this implemintation problem or 40x40 is just too much?  &#xD;&#xA;&#xD;&#xA;&lt;b&gt;Edit:&lt;/b&gt;  &#xD;&#xA;The structure of my code:  &#xD;&#xA;All the data is saved in 2d array of cells.  &#xD;&#xA;Each cell contains it's parent in path direction(1-8 clockwise) and bitwise encoded array of it's children in path(every bit represents a child).  &#xD;&#xA;The search is performed by A* with the estimate of euclidian distance." />
  <row Id="3263" PostHistoryTypeId="6" PostId="1751" RevisionGUID="b866fd67-05fe-406a-96c3-16f4b0ed0c1e" CreationDate="2010-07-28T17:43:44.283" UserId="162" Comment="spelling, added tags" Text="&lt;flash&gt;&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="3264" PostHistoryTypeId="2" PostId="1783" RevisionGUID="b687a553-a400-403d-ac2b-b6878977127d" CreationDate="2010-07-28T18:05:50.933" UserId="1156" Text="I was thinking about how to implement game states into my game. The main things I want for it are:&#xD;&#xA;&#xD;&#xA; - Semi-transparent top states-being able to see through a pause menu to the game behind&#xD;&#xA; &#xD;&#xA; - Something OO-I find this easier to use and understand the theory behind, as well as keeping orgranised and adding more to.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;I was planning on using a linked list, and treat it as a stack. This means I could access the state below for the semi-transparency.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Plan: Have the state stack be a linked list of pointers to IGameStates. The top state handles its own update and input commands, and then has a member isTransparent to decide whether the state underneath should be drawn.&#xD;&#xA;&lt;br&gt; Then I could do:&#xD;&#xA;&#xD;&#xA;    states.push_back(new MainMenuState());&#xD;&#xA;    states.push_back(new OptionsMenuState());&#xD;&#xA;    states.pop_front();&#xD;&#xA;To represent the player loading, then going to options, and then main menu.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Is this a good idea? Or should I look at something else?&#xD;&#xA;&#xD;&#xA;&lt;p&gt;&#xD;&#xA;Thanks." />
  <row Id="3265" PostHistoryTypeId="1" PostId="1783" RevisionGUID="b687a553-a400-403d-ac2b-b6878977127d" CreationDate="2010-07-28T18:05:50.933" UserId="1156" Text="Game State 'Stack'?" />
  <row Id="3266" PostHistoryTypeId="3" PostId="1783" RevisionGUID="b687a553-a400-403d-ac2b-b6878977127d" CreationDate="2010-07-28T18:05:50.933" UserId="1156" Text="&lt;architecture&gt;&lt;c++&gt;&lt;state&gt;" />
  <row Id="3267" PostHistoryTypeId="2" PostId="1784" RevisionGUID="0fe4d4ae-5ee3-43f0-a2ac-22530f2bb6c1" CreationDate="2010-07-28T18:12:12.230" UserId="395" Text="This is similar to what we use, a stack of FSMs. Basically just give each state an enter, exit, and tick function and call them in order. Works very nicely for handling things like loading too." />
  <row Id="3268" PostHistoryTypeId="5" PostId="1781" RevisionGUID="4d4723e8-9c68-4475-a855-179d14daf7a7" CreationDate="2010-07-28T18:29:24.350" UserId="14" Comment="Grammar / Incorrect word use drove me crazy when I realized it, had to fix." Text="There are a few different ways to handle this, and many solutions have their own merits. I will give my opinion of the ideal way to handle this.&#xD;&#xA;&#xD;&#xA;First, it's important to understand that no matter how complicated your system is, someone who is sufficiently invested in gaming the system (with appropriate knowledge) will figure out a way to game it. &#xD;&#xA;&#xD;&#xA;To seriously handle this issue, if it is really an issue for you, you need to handle this in both the design and technical implementation of your game.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;On the technical end, you need to basically play a game of comparisons.&#xD;&#xA;&#xD;&#xA;&gt; In general, I am pro-logging if you&#xD;&#xA;&gt; are running any type of game with user&#xD;&#xA;&gt; interaction then verbose logs would&#xD;&#xA;&gt; allow you to modify and tailor your&#xD;&#xA;&gt; game based on real quantitative&#xD;&#xA;&gt; measurements.&#xD;&#xA;&#xD;&#xA; Using your logs, you can set up a system to compare data between accounts of any number of similarities.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&gt; For example, if two accounts are using&#xD;&#xA;&gt; the same IP address, or any other information that you deem an appropriate comparison measure, you would want to&#xD;&#xA;&gt; be able to look at overall interaction&#xD;&#xA;&gt; between the two (wins/losses, trading)&#xD;&#xA;&gt; in relation to the amount of&#xD;&#xA;&gt; interaction with others.&#xD;&#xA;&#xD;&#xA;Using this data you can pass appropriate judgement on a case-by-case basis, or automatically. Depending on how widespread the issue has become, I would recommend an automatic option and handling any issues through a live moderator. It's important that you don't delete the account, just suspend it with a message along the lines of &quot;This account has been suspected of violating this game's TOS agreement. If you disagree please go here&quot; with a link to an arbitration panel or something.&#xD;&#xA;&#xD;&#xA;It is important that such a thing is in place, because people could be sharing IP addresses at home, or at school. Also, for younger kids, they could be using their parent's email addresses, credit cards, or even names in their sign-up information depending on how protective they are.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;The second phase is design side. While some benefit is to be expected, you need to sufficiently disincentivize this form of cheating with your gameplay. There are quite a few ways that you can go about this, there are the wholly annoying ones of very short timeouts (which may be necessary). But I feel the best way is by appropriately adjusting the benefits between two accounts.&#xD;&#xA;&#xD;&#xA;&gt;For example, some MMOs have altered the benefit that high level players recieve when playing with players outside of a reasonable level range. This discourages players with access to multiple accounts from powerleveling themselves (atleast within a specific range)&#xD;&#xA;&#xD;&#xA;You *could* even specifically target accounts that share data and directly decrease the benefit that they gain when interacting with each other. This would encourage interaction with other players, but it can be circumvented with proxy servers and it would be ill-advised depending on your target audience.&#xD;&#xA;&#xD;&#xA;The other way that think would work is having gameplay so engaging that people can't really manage to play two separate accounts and still keep up with everyone else.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Of course with this system, you would need to spend a nice deal of effort tweaking to prevent false positives and what not.&#xD;&#xA;&#xD;&#xA;##tl;dr?&#xD;&#xA;You want to collect appropriate data that allows you to automatically detect and handle potential threats and deal with false positives on a user-by-user basis. A good deal of babysitting would be necessary to make sure you don't have false-positives.&#xD;&#xA;&#xD;&#xA;Also you want to reduce the benefit of cheating with multiple accounts on the gameplay end." />
  <row Id="3269" PostHistoryTypeId="2" PostId="1785" RevisionGUID="810f1e29-66bc-4a91-adce-1fd24bc92120" CreationDate="2010-07-28T18:42:03.543" UserId="744" Text="I worked on the same engine as coderanger. I have a differing viewpoint. :)&#xD;&#xA;&#xD;&#xA;First, we did not have a stack of FSMs - we had a stack of states. A stack of states makes a single FSM. I don't know what a stack of FSMs would look like. Probably too complicated to do anything practical with.&#xD;&#xA;&#xD;&#xA;My biggest problem with our Global State Machine was that it was a stack of states, and not a set of states. This means, e.g., .../MainMenu/Loading was different than .../Loading/MainMenu, depending on if you got the main menu up before or after the loading screen (the game is asynchronous and loading is mostly server-driven).&#xD;&#xA;&#xD;&#xA;As two examples of things this made ugly:&#xD;&#xA;&#xD;&#xA;* It led to e.g. the GameplayLoading state, so you had Base/Loading, and Base/Gameplay/LoadingGameplay for loading within the Gameplay state, which had to repeat much of the code in the normal loading state (but not all, and add some more).&#xD;&#xA;* We had several functions like &quot;if in character creator go to gameplay; if in gameplay go to character select; if in character select go back to login&quot;, because we wanted to show the same interface windows in different states but make the Back/Forward buttons still work.&#xD;&#xA;&#xD;&#xA;Despite the name, it was not very &quot;global&quot;. Most internal _game_ systems did not use it to track their internal states, because they didn't want their states mucking about with other systems. Others, e.g. the UI system, could use it but only to copy state into their own local state systems. (I would especially caution against the system for UI states. UI state is not a stack, it's really a DAG, and trying to force any other structure on it is only going to make UIs that are frustrating to use.)&#xD;&#xA;&#xD;&#xA;What it was good for was isolating tasks for integrating code from infrastructure programmers who didn't know how the game flow was actually structured, so you could tell the guy writing the patcher &quot;put your code in Client_Patch_Update&quot;, and the guy writing the graphics loading &quot;put your code in Client_MapTransfer_OnEnter&quot;, and we could swap certain logic flows around without much trouble.&#xD;&#xA;&#xD;&#xA;On a side project, I have had better luck with a state *set* rather than a *stack*, not being afraid to make multiple machines for unrelated systems, and refusing to let myself fall into the trap of having a &quot;global state&quot;, which is really just a complicated way to synchronize things through global variables - Sure, you're going to end up doing it near some deadline, but don't design with that as your _goal_. Fundamentally, state in a game is not a stack, and states in a game are not all related.&#xD;&#xA;&#xD;&#xA;The GSM also, as function pointers and non-local behavior tend to do, made debugging things more difficult, though debugging those kind of large state transitions wasn't very fun before we had it either. State-sets instead of state-stacks does not really help this, but you should be aware of it. Virtual functions rather than function pointers may alleviate that somewhat." />
  <row Id="3270" PostHistoryTypeId="2" PostId="1786" RevisionGUID="f275f44e-28ba-40c2-affc-e51786d120c5" CreationDate="2010-07-28T18:46:31.040" UserId="1024" Text="I would say Lisp. &#xD;&#xA;&#xD;&#xA;It has been used in games as a scripting language, at Naughty Dog at least (or it was I think), and is a very mature language.&#xD;&#xA;&#xD;&#xA;The advantage of Lisp is in deserialization, which is a major part of what we call asset management. Deserializing lisp is trivial, the code and the data are one. This makes it easier to have a file format for assets and behaviors. It's not like you a one in json/xml/yaml/bin and one F# file for AI. You can save everything as s-expressions which is going to simplify the asset pipeline a lot.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3271" PostHistoryTypeId="4" PostId="1751" RevisionGUID="b1844e41-d319-46cf-8ab3-791447873d2c" CreationDate="2010-07-28T18:53:03.787" UserId="51" Comment="made title more descriptive" Text="Slow performance on an A* implementation in a tower defense game." />
  <row Id="3272" PostHistoryTypeId="2" PostId="1787" RevisionGUID="6c5b6395-bc39-4274-b2e5-9a9b2ec1a8d5" CreationDate="2010-07-28T19:00:20.073" UserId="259" Text="This is borderline non-gamedev but PIDs are commonly used in games so I thought I'd give it a shot.&#xD;&#xA;&#xD;&#xA;I've got a few PID controllers in my game, used for things like steering and throttle control. I'm having trouble tuning them accurately.  It never feels like I'm getting closer to the optimial solution, and it's very tempting to just leave them &quot;good enough&quot; with the odd oscillation or spike I can't get rid of.&#xD;&#xA;&#xD;&#xA;The one controller that's driven me to this post with frustration produces minor oscillations for very very small error inputs.  At large inputs it's ok but not very stable.&#xD;&#xA;&#xD;&#xA;Does anyone have any tips or resources on how I can train these things more reliably?" />
  <row Id="3273" PostHistoryTypeId="1" PostId="1787" RevisionGUID="6c5b6395-bc39-4274-b2e5-9a9b2ec1a8d5" CreationDate="2010-07-28T19:00:20.073" UserId="259" Text="What's the best way to train PID controllers?" />
  <row Id="3274" PostHistoryTypeId="3" PostId="1787" RevisionGUID="6c5b6395-bc39-4274-b2e5-9a9b2ec1a8d5" CreationDate="2010-07-28T19:00:20.073" UserId="259" Text="&lt;untagged&gt;" />
  <row Id="3276" PostHistoryTypeId="2" PostId="1789" RevisionGUID="ff9b4a03-dc9a-41c1-85dd-b68baa43f80a" CreationDate="2010-07-28T19:23:11.930" UserId="1004" Text="What does it take to get an ESRB rating for my game?" />
  <row Id="3277" PostHistoryTypeId="1" PostId="1789" RevisionGUID="ff9b4a03-dc9a-41c1-85dd-b68baa43f80a" CreationDate="2010-07-28T19:23:11.930" UserId="1004" Text="ESRB rating my game?" />
  <row Id="3278" PostHistoryTypeId="3" PostId="1789" RevisionGUID="ff9b4a03-dc9a-41c1-85dd-b68baa43f80a" CreationDate="2010-07-28T19:23:11.930" UserId="1004" Text="&lt;content-rating&gt;" />
  <row Id="3279" PostHistoryTypeId="2" PostId="1790" RevisionGUID="d40df58c-7827-4149-b081-298b2d4a2096" CreationDate="2010-07-28T19:23:23.910" UserId="734" Text="Here's an example implementation of a gamestate stack that I found to be very useful: http://creators.xna.com/en-US/samples/gamestatemanagement&#xD;&#xA;&#xD;&#xA;It's written in C# and to compile it you need the XNA framework, however you could just check out the code, the documentation and the video to get the idea.&#xD;&#xA;&#xD;&#xA;It can support state transitions, transparent states (such as modal message boxes) and loading states (that manage the unloading of existing states and loading of the next state).&#xD;&#xA;&#xD;&#xA;I use the same concepts in my (non-C#) hobby projects now (granted, it might not be suitable for larger projects) and for small/hobby projects I can definitely recommend the approach." />
  <row Id="3280" PostHistoryTypeId="2" PostId="1791" RevisionGUID="311d3b3e-8b3b-4ad6-b7ce-f7344b2dab92" CreationDate="2010-07-28T19:47:57.500" UserId="162" Text="The primary point of entry appears to be the [ESRB's website][1]. The process appears to be that you need to make a physical letter on corporate letterhead with all sorts of information proving you are a real business. You then need to send them the letter and wait 5 days at which point they will send you a user/password for their website, at which point you can request a rating, which will take time and some amount of money.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.esrb.org/publishers/" />
  <row Id="3281" PostHistoryTypeId="2" PostId="1792" RevisionGUID="34693df7-0ee9-4ff4-8740-c288026d8120" CreationDate="2010-07-28T20:06:04.540" UserId="1151" Text="You do need money sinks, but you can also encourage people to keep the items they receive in circulation, instead of NPCing them. If the benefit of selling an item to an NPC is minimal in comparison to trading with another player, then the economy will be self-sustaining.&#xD;&#xA;&#xD;&#xA;Requiring players to pay a fee (whether monetary or farming related) before being allowed to go on a quest/raid with high rewards can also help, along with the other general ideas of charging for services (transport, auctioning, repairing), or consumable items. " />
  <row Id="3282" PostHistoryTypeId="2" PostId="1793" RevisionGUID="ca518698-9a9e-4351-92e8-ce6e248d41d1" CreationDate="2010-07-28T20:24:27.303" UserId="769" Text="Not really a solution, but a deterrent at least: Say that if people are discovered having multiple accounts, all accounts will be banned. This should keep many people from even trying it. Even if you don't actually ban all accounts, or don't have a way to detect it at all, most will be too afraid." />
  <row Id="3283" PostHistoryTypeId="2" PostId="1794" RevisionGUID="6c5a8cb3-d9c5-43ec-b6e7-25a98a608cb7" CreationDate="2010-07-28T21:16:34.450" UserId="779" Text="Yeah you have discovered the main problem with most profilers.  They profile everything.&#xD;&#xA;&#xD;&#xA;You can use options to reduce the profiling scope to some key classes or just time very small bits of your code.&#xD;&#xA;&#xD;&#xA;You should already know what is probably slowing it down, so test that part.  It will take some time to hunt down the slow bits, but I find it a lot more productive than using a uber slow profiler." />
  <row Id="3284" PostHistoryTypeId="2" PostId="1795" RevisionGUID="ead9a4f0-8f7c-43a6-870c-97018bb8a01d" CreationDate="2010-07-28T22:00:28.417" UserId="170" Text="I've been following a free video tutorial series by the &quot;Tornado Twins&quot; on YouTube. It's turned out to be a really excellent series that covers quite a lot over the course of writing a simple 3d adventure game. I would **highly** recommend this to others.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/user/TornadoTwins&#xD;&#xA;&#xD;&#xA;Also at Keyframe's recommendation I've also started following the 2.5D video series at 3dBuzz but while I'm finding it informative I'm not a fan of their presentation style as there's a lot of fluff and something that could be presented in 10 minutes takes 20 minutes with all the idle chit chat. But still very helpful." />
  <row Id="3285" PostHistoryTypeId="16" PostId="1795" RevisionGUID="ead9a4f0-8f7c-43a6-870c-97018bb8a01d" CreationDate="2010-07-28T22:00:28.417" UserId="-1" />
  <row Id="3286" PostHistoryTypeId="2" PostId="1796" RevisionGUID="fbd02c66-6a31-4533-a8c1-cfa1ba0ff7e4" CreationDate="2010-07-28T22:41:21.580" UserId="1163" Text="How would I go about creating vehicle physics for a car that can loose traction? I want it to seem like the driver has a flat foot, so when you press the gas, they cars driving (rear) wheels loose traction, and makes it somewhat hard to control. I would also like to be able to do doughnuts and &quot;drift&quot; around corners.&#xD;&#xA;&#xD;&#xA;I would also need to know how much &quot;skid&quot; is happening, so I can add a proportional amount of smoke and tire marks.&#xD;&#xA;&#xD;&#xA;Assume a 2d, top-down style car game.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="3287" PostHistoryTypeId="1" PostId="1796" RevisionGUID="fbd02c66-6a31-4533-a8c1-cfa1ba0ff7e4" CreationDate="2010-07-28T22:41:21.580" UserId="1163" Text="Vehicle physics with skid" />
  <row Id="3288" PostHistoryTypeId="3" PostId="1796" RevisionGUID="fbd02c66-6a31-4533-a8c1-cfa1ba0ff7e4" CreationDate="2010-07-28T22:41:21.580" UserId="1163" Text="&lt;2d&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="3289" PostHistoryTypeId="2" PostId="1797" RevisionGUID="123c2fb1-7944-4f90-af88-8ad6f049ef1f" CreationDate="2010-07-28T23:06:59.903" UserId="1163" Text="[androidbox2d][1] is the android port of Box2D. Box2D is a feature rich 2d rigid body physics engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/androidbox2d/" />
  <row Id="3290" PostHistoryTypeId="2" PostId="1798" RevisionGUID="67917ac2-be66-4bfc-9615-167c627f5f5a" CreationDate="2010-07-28T23:48:20.070" UserId="469" Text="I know that this is not exactly a correct reply, but I think that this information would be usefull.&#xD;&#xA;&#xD;&#xA;If the ERSB rating is too expensive, you can try the TIGRS rating.&#xD;&#xA;&#xD;&#xA;http://www.tigrs.org/" />
  <row Id="3291" PostHistoryTypeId="2" PostId="1799" RevisionGUID="0da0839f-6d11-4c07-b01b-e50401cc9dcd" CreationDate="2010-07-29T00:01:24.083" UserId="1163" Text="I have a game that generates a random level map at the start of the level. I want to implement some way to save and load the level.&#xD;&#xA;&#xD;&#xA;I was thinking maybe XML would be a good option for saving all the variable, then it would be easy for me to build something that can parse that XML and generate the exact same level.&#xD;&#xA;&#xD;&#xA;But XML is probably overkill for my needs. I remember back in the day with the old Sega console that didn't have the ability to save your game (I think the Worms game did it too), that they would give you a bunch of character that you could write down. If you punched in that string later on, it would load the exact level.&#xD;&#xA;&#xD;&#xA;Would a &quot;level string&quot; be a good option? Would it be some kind of &quot;base60&quot; conversion? How would I implement this?" />
  <row Id="3292" PostHistoryTypeId="1" PostId="1799" RevisionGUID="0da0839f-6d11-4c07-b01b-e50401cc9dcd" CreationDate="2010-07-29T00:01:24.083" UserId="1163" Text="Best solution for &quot;level string&quot;?" />
  <row Id="3293" PostHistoryTypeId="3" PostId="1799" RevisionGUID="0da0839f-6d11-4c07-b01b-e50401cc9dcd" CreationDate="2010-07-29T00:01:24.083" UserId="1163" Text="&lt;programming&gt;&lt;language-agnostic&gt;&lt;levels&gt;&lt;random&gt;&lt;generated&gt;" />
  <row Id="3294" PostHistoryTypeId="2" PostId="1800" RevisionGUID="0553b14b-0eac-4dee-b3e8-4d338b32db39" CreationDate="2010-07-29T00:07:18.783" UserId="395" Text="Presumably all you need to save is the random seed, which is generally just an int. You could encode the int to base64 if you wanted to make it a bit more opaque, but thats probably not needed." />
  <row Id="3296" PostHistoryTypeId="2" PostId="1801" RevisionGUID="2005a240-b226-4e98-9c08-e2c663a10465" CreationDate="2010-07-29T00:25:26.250" UserId="1024" Text="I want to serialize all the data in game, I would recommend JSON as your file format, it is why easier to use the XML and the support is very good across many languages.&#xD;&#xA;&#xD;&#xA;I have used this library for C++ and it works very well.&#xD;&#xA;&#xD;&#xA;http://jsoncpp.sourceforge.net/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3297" PostHistoryTypeId="2" PostId="1802" RevisionGUID="0ce1ef8b-68f1-45b7-a650-fb36f7595998" CreationDate="2010-07-29T00:37:00.377" UserId="1154" Text="I don't generally recommend Bourg's *Physics for Game Programmers*, but he talks about this a bit in Chapter 10 (around page 171), and might give you a starting point.&#xD;&#xA;&#xD;&#xA;Unfortunately, the vehicle code in PhysX is still 'sample' and not well documented, so you can't easily figure out how that works. I believe I've seen code derived from their sample display the kind of behavior you're looking for in 3D, but it's a lower-level simulation than I think you want.&#xD;&#xA;" />
  <row Id="3298" PostHistoryTypeId="2" PostId="1803" RevisionGUID="7e5e3820-d8d0-4d67-ae7d-7eb2b75a19df" CreationDate="2010-07-29T00:38:45.757" UserId="818" Text="There's an Android port of [SDL][1] currently underway, and SDL is probably the best 2D graphics framework out there.  It was designed by one of the leads at Blizzard, so you know some real expertise in game building has gone into it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://libsdl.org" />
  <row Id="3299" PostHistoryTypeId="2" PostId="1804" RevisionGUID="0d33f453-a27f-4022-a586-a1983db6f02d" CreationDate="2010-07-29T00:39:02.853" UserId="458" Text="By contrast, the game &quot;Portal&quot; is essentially a giant tutorial that teaches you how to beat it as you go. There is no &quot;tutorial level&quot;... rather, every level is at least part tutorial. Great game, very popular. So, to say &quot;we need fewer tutorials&quot; I think is an overgeneralization; there are many paths to making a good game here.&#xD;&#xA;&#xD;&#xA;If the question amounts to &quot;should I make a tutorial in my game&quot; the answer is: it depends on the game!" />
  <row Id="3300" PostHistoryTypeId="2" PostId="1805" RevisionGUID="007ca9ee-d945-4279-980d-3b8746a9e977" CreationDate="2010-07-29T00:42:10.320" UserId="1154" Text="For starters, Wikipedia actually has a good article on how to begin tuning (http://en.wikipedia.org/wiki/PID_controller). Without more details it's hard to go into more detail in a response." />
  <row Id="3301" PostHistoryTypeId="6" PostId="1702" RevisionGUID="b3b6d22e-5d30-460a-84d7-508b85cc8f8d" CreationDate="2010-07-29T00:51:17.150" UserId="47" Comment="edited tags" Text="&lt;game-design&gt;&lt;assets&gt;&lt;android&gt;" />
  <row Id="3302" PostHistoryTypeId="2" PostId="1806" RevisionGUID="0b6af6da-c189-4b60-aac2-fdb360070e2a" CreationDate="2010-07-29T00:53:47.910" UserId="458" Text="I've found this is much easier to fix through game design than through enforcement/banning. Even if you permanently ban all of a player's accounts, sufficiently determined players can find a way around your ban (e.g. if you track IP, they can use dynamic IP or IP masking).&#xD;&#xA;&#xD;&#xA;For example, if you award points to players for winning PvP contests, you give players incentives to make multiple accounts so they can lose to themselves. If instead you give bigger rewards for playing in groups with the same players over time (i.e. guild participation), you incentivize friendship and community over competition, which changes preferred behaviors. Having additional metagame characteristics tied to the player's account (such as a Reputation score and Friends list) further makes the maintenance of multiple accounts less appealing -- at the least, people would want one &quot;primary&quot; account with a good rep.&#xD;&#xA;&#xD;&#xA;If your game is PvP by nature, a big way around the &quot;I'll make several accounts and lose to myself on purpose&quot; problem is to only offer automated matchmaking. So, the player requests to play a game, and the server automatically matches them against someone else who happens to be online at the time. If players can't choose their opponents, there's no way for them to guarantee they'll fight themselves (unless they happen to be the only one online at the time, but then you have bigger problems). See Microsoft Hearts/Spades, or most Facebook games that allow PvP, for examples of this. Note that in this case you'll definitely want some kind of intelligent matchmaking (either using some kind of ranking/rating system as part of the player account, or letting players self-select their preferred level of competitiveness).&#xD;&#xA;&#xD;&#xA;If you're worried that players will want to play games with their friends, you can always offer that option as well, but only allow unrated/unranked/practice games when you choose your opponents." />
  <row Id="3303" PostHistoryTypeId="2" PostId="1807" RevisionGUID="e6f49ea6-fdfb-4c43-a93e-4cf28fc2bdf2" CreationDate="2010-07-29T03:09:11.213" UserId="1163" Text="What would the algorithm be for generating/drawing the asteroid shapes from the [original Asteroids game][1]? Is it even an algorithm? Or would they be hard coded shapes?&#xD;&#xA;&#xD;&#xA;Here is a screenshot to jog your memory.&#xD;&#xA;&#xD;&#xA;![Screenshot from Asteroids game][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Asteroids_(video_game)&#xD;&#xA;  [2]: http://www.heinzwerner.de/emu_asteroids.jpg" />
  <row Id="3304" PostHistoryTypeId="1" PostId="1807" RevisionGUID="e6f49ea6-fdfb-4c43-a93e-4cf28fc2bdf2" CreationDate="2010-07-29T03:09:11.213" UserId="1163" Text="Algorithm for drawing asteroids from, er... Asteroids game?" />
  <row Id="3305" PostHistoryTypeId="3" PostId="1807" RevisionGUID="e6f49ea6-fdfb-4c43-a93e-4cf28fc2bdf2" CreationDate="2010-07-29T03:09:11.213" UserId="1163" Text="&lt;graphics&gt;&lt;algorithm&gt;&lt;generated&gt;&lt;graphics-programming&gt;" />
  <row Id="3306" PostHistoryTypeId="2" PostId="1808" RevisionGUID="08e05662-adbb-4c8d-bc2a-9048192e76b1" CreationDate="2010-07-29T03:20:08.983" UserId="458" Text="I can't say I have any inside information, but given the finite number of shapes (note how even in your screenshot two of the large-asteroid shapes are repeated), I always assumed it was hard-coded. You could certainly reproduce it that way if you were going to build it today." />
  <row Id="3307" PostHistoryTypeId="5" PostId="1807" RevisionGUID="abb1f1e1-3d58-449b-bb52-b6aff6ea1071" CreationDate="2010-07-29T04:07:09.230" UserId="1163" Comment="added 278 characters in body" Text="What would the algorithm be for generating/drawing the asteroid shapes from the [original Asteroids game][1]? Is it even an algorithm? Or would they be hard coded shapes?&#xD;&#xA;&#xD;&#xA;Here is a screenshot to jog your memory.&#xD;&#xA;&#xD;&#xA;![Screenshot from Asteroids game][2]&#xD;&#xA;&#xD;&#xA;**EDIT** - Also found this:&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;from the article [Edge - The Making of Asteroids][4]. Interesting read, but does not mention any specifics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Asteroids_(video_game)&#xD;&#xA;  [2]: http://www.heinzwerner.de/emu_asteroids.jpg&#xD;&#xA;  [3]: http://www.next-gen.biz/files/asteroids4.jpg&#xD;&#xA;  [4]: http://www.next-gen.biz/features/the-making-of-asteroids" />
  <row Id="3308" PostHistoryTypeId="2" PostId="1809" RevisionGUID="3248bca7-9185-420d-bad5-2c2c5f7578f7" CreationDate="2010-07-29T04:21:52.993" UserId="355" Text="It appears that the four asteroid types you have posted drawings of do match the asteroids in your screen shot (if you look at the red lines of the drawings as the correct lines).&#xD;&#xA;&#xD;&#xA;It also appears that the lower-left &quot;medium-sized&quot; asteroid is an example of asteroid drawing #2, and that drawing also appears as the two left-most large asteroids.&#xD;&#xA;&#xD;&#xA;So it looks as if there are four asteroid images which can appear at 3 (?) scalings.  Nice sleuthing.&#xD;&#xA;" />
  <row Id="3309" PostHistoryTypeId="2" PostId="1810" RevisionGUID="d80d0d04-488f-4c60-9fcd-32ad9196d2b4" CreationDate="2010-07-29T04:27:41.583" UserId="355" Text="I was reading a paper today which simulates some vehicle dynamics during a collision and spin-out:&#xD;&#xA;&#xD;&#xA;[Jing Zhou; Jianbo Lu; Huei Peng, &quot;Vehicle Dynamics in Response to the Maneuver of Precision Immobilization Technique&quot;, Proceedings of 2008 ASME Dynamic Systems and Control Conference][1]&#xD;&#xA;&#xD;&#xA;This contains a physics model which represents roll-over moment and loss of rear-tire traction during yaw caused by a deliberate collision force.  It seems interesting to game programmers interested in vehicle dynamics during collisions.&#xD;&#xA;&#xD;&#xA;  [1]: http://jianbolu.tripod.com/paper/DSCC2008-2183.pdf " />
  <row Id="3310" PostHistoryTypeId="16" PostId="990" RevisionGUID="ddbc7442-51b4-411c-b2e5-a0b165a7e0ed" CreationDate="2010-07-29T05:02:55.363" UserId="395" />
  <row Id="3311" PostHistoryTypeId="6" PostId="990" RevisionGUID="ddbc7442-51b4-411c-b2e5-a0b165a7e0ed" CreationDate="2010-07-29T05:02:55.363" UserId="395" Comment="edited tags" Text="&lt;open-source&gt;" />
  <row Id="3312" PostHistoryTypeId="2" PostId="1811" RevisionGUID="082ff24f-fa30-4658-bf5c-a7c17bc14367" CreationDate="2010-07-29T05:10:41.217" UserId="562" Text="I have a game with 4 difficulty levels (or levels of AI) and I'm wondering what to name them instead of the boring Easy, Normal, Hard, Impossible." />
  <row Id="3313" PostHistoryTypeId="1" PostId="1811" RevisionGUID="082ff24f-fa30-4658-bf5c-a7c17bc14367" CreationDate="2010-07-29T05:10:41.217" UserId="562" Text="What name should I give each difficulty level?" />
  <row Id="3314" PostHistoryTypeId="3" PostId="1811" RevisionGUID="082ff24f-fa30-4658-bf5c-a7c17bc14367" CreationDate="2010-07-29T05:10:41.217" UserId="562" Text="&lt;ai&gt;&lt;difficultly&gt;" />
  <row Id="3315" PostHistoryTypeId="2" PostId="1812" RevisionGUID="35815c15-6c81-44c3-9f68-c88cc76317ed" CreationDate="2010-07-29T05:13:33.863" UserId="353" Text="I'd say match it to the way you want your game to be perceived. If you want it to come off as a casual game, name them something like casual, normal, tough, hard, etc. If you want the game to come across tougher, name it like gears of war--casual, normal, insane, etc. It's really up to you. Keep in mind that how you name your difficulties will also somewhat affect how the player feels after finishing them. It's much more rewarding to complete &quot;insane&quot; than &quot;hard&quot;." />
  <row Id="3316" PostHistoryTypeId="2" PostId="1813" RevisionGUID="2e277a34-009d-4d46-9508-5e5c29476e0b" CreationDate="2010-07-29T05:43:17.323" UserId="1024" Text="It depends. I think there is actually a fair amount of middle-ware out there, that gets used, ... if you are willing to pay of it.&#xD;&#xA;&#xD;&#xA;At the same time sometimes it is easy to hack something to get really fast without that many external dependencies, if the scope is small. &#xD;&#xA;&#xD;&#xA;I think on the highend, you have to compare companies like EA and Ubisoft to other large software companies, like Apple, Google, Facebook, what have you. &#xD;&#xA;&#xD;&#xA;They all write a very large amount of custom code, when there are existing alternatives, because they want to get a competitive advantage. &#xD;&#xA;&#xD;&#xA;As @Sean James said there are legal reasons and host of other reasons, but I think even if there were no road blocks, inventive software companies would still develop custom alternatives to common existing software components if they thought they could make them better.&#xD;&#xA;&#xD;&#xA;However I also agree that there is always room to start some projects we all could benefit from. For instance, I think we need to replace COLLADA with something much simpler that is JSON based. Maybe something that only handles arbitrary meshes, but nothing else. I think we really need a better mesh format." />
  <row Id="3317" PostHistoryTypeId="16" PostId="1813" RevisionGUID="2e277a34-009d-4d46-9508-5e5c29476e0b" CreationDate="2010-07-29T05:43:17.323" UserId="-1" />
  <row Id="3318" PostHistoryTypeId="2" PostId="1814" RevisionGUID="1a48667b-2923-4347-9277-64928bc0007f" CreationDate="2010-07-29T05:50:04.817" UserId="256" Text="Naming is one of those things that people can spend a lot of time tossing around.  A little comedic value always makes it more memorable - for instance, the difficulty levels from Rise of the Triad were more descriptive phrases (see for yourself in this [pic](http://www.platformnation.com/wp-content/uploads/2010/03/photo.jpg)) that gave it a little more character.&#xD;&#xA;&#xD;&#xA;Sean's advice is spot on too - theme them after something related to your game.  Here are some examples:&#xD;&#xA;&#xD;&#xA;### Street racing game using import tuner-type cars:&#xD;&#xA;* I use auto-only&#xD;&#xA;* Where's third gear?&#xD;&#xA;* There is no speed limit&#xD;&#xA;* The Flash eats my dust&#xD;&#xA;&#xD;&#xA;The intended audience is probably the type of kid who likes cars but can't drive yet, so a little attitude to goad (I mean, encourage) them wouldn't be out of line.&#xD;&#xA;&#xD;&#xA;### Puzzle game using blocks:&#xD;&#xA;* First time on the block&#xD;&#xA;* Blocks are my friends&#xD;&#xA;* Blockhead&#xD;&#xA;&#xD;&#xA;Here I use some fairly simple tie-ins with the puzzle type and the descriptions.&#xD;&#xA;&#xD;&#xA;### Farm-building whatever:&#xD;&#xA;* Mouse&#xD;&#xA;* Piglet&#xD;&#xA;* Horse&#xD;&#xA;* Cow&#xD;&#xA;&#xD;&#xA;A simple way to have the user correlate difficulty with the size of the animal.  Much more memorable than &quot;easy&quot; etc.  You could sneak in an unlockable &quot;There is no cow level&quot; if you feel snarky enough.  This goes back to one-word descriptions too, if you're sticking to that limit.&#xD;&#xA;&#xD;&#xA;### Side-scrolling platformer with very wacky theme&#xD;&#xA;* Ooze-ball&#xD;&#xA;* Magic fairy&#xD;&#xA;* Toaster&#xD;&#xA;* Spinach&#xD;&#xA;&#xD;&#xA;I'm thinking of something like Earthworm Jim, although I don't think there were more than 2 difficulty levels and I don't remember if they had names either, but this is with that in mind.  In this one, my idea was to be completely nonsensical, and try to use names for which there ARE NO correlations to difficulty.  The desired affect is to make it more memorable by being silly, and if the players talk to each other, they know immediately what they're referring to which makes it an inside joke and thus more memorable.&#xD;&#xA;&#xD;&#xA;Anyway, from these examples hopefully you get idea how to approach it.  If you're really stuck, grab a thesaurus and find synonyms for &quot;easy&quot;, etc.  At least it would be different. =)" />
  <row Id="3319" PostHistoryTypeId="2" PostId="1815" RevisionGUID="0fa1a784-9cbe-4772-ac7d-2832abb4dcf5" CreationDate="2010-07-29T05:55:48.487" UserId="865" Text="Asteroids was a vector based game, so shapes were most likely described as 'turn left 30 degrees and move 10 forward'. As in the Logo programming language. So you draw your shape as in the sketch, convert it to a series of vector commands, set a scale, position and rotation and start the drawlist.&#xD;&#xA;I guess you can reproduce it pretty much like that by drawing line-lists.&#xD;&#xA;Oh yeah, I assume they're hard-coded, as, like others noted, the ones in the game match the ones on the sketches. " />
  <row Id="3320" PostHistoryTypeId="2" PostId="1816" RevisionGUID="2907da1b-8839-4a23-ac18-2aee61509d3e" CreationDate="2010-07-29T06:16:50.877" UserId="619" Text="I used military ranks in a game I developed, from Private (Easiest) to General (Hardest)." />
  <row Id="3321" PostHistoryTypeId="2" PostId="1817" RevisionGUID="a06d5d52-518f-4006-a4ab-a7484e4a845c" CreationDate="2010-07-29T06:49:50.233" UserId="1167" Text="I've always been a fan of the naming scheme Conker's BFD had: Inbred, Crap, Normal, Bastard, &#xD;&#xA;and Einstein, although like others have said it really depends on the theme of the game. " />
  <row Id="3322" PostHistoryTypeId="2" PostId="1818" RevisionGUID="8af034b4-4155-402e-9f4e-87380bf1c4ff" CreationDate="2010-07-29T07:43:37.440" UserId="252" Text="You could use icons instead, e.g. smileys, but better something closer related to your game. It should remain easily interpretable and maybe still offer a tool-tip." />
  <row Id="3323" PostHistoryTypeId="2" PostId="1819" RevisionGUID="f764d0cb-189e-40df-a700-372d4452be22" CreationDate="2010-07-29T08:37:06.577" UserId="662" Text="I'm working on an open source 2d game engine called [YoghurtGum](http://code.google.com/p/yoghurtgum/) which is supposed to be for both Windows Mobile and Android. However, porting the whole thing to Android C++ has proven extremely hard.&#xD;&#xA;&#xD;&#xA;This is most unhelpful answer ever, I'm well aware." />
  <row Id="3324" PostHistoryTypeId="2" PostId="1820" RevisionGUID="febb2db5-7796-4d63-a47d-af4c89890c99" CreationDate="2010-07-29T08:57:37.683" UserId="490" Text="I also expect them to be hard-coded as a list of points. The machines back then were not powerful enough to waste any CPU time and memory on dynamically generating asteroid shapes.&#xD;&#xA;&#xD;&#xA;If you want to generate Asteroids dynamically, here's what I would do:&#xD;&#xA;&#xD;&#xA;- Choose a random angle (higher than the previous, up to 360°&#xD;&#xA;- Add a point at a random distance from the center&#xD;&#xA;&#xD;&#xA;In other words, imagine drawing several circles from around the center of the image with various radii. Then pick a random angle (direction) and a random circle, the intersection of the line and the circle is going to be one of the shape points. Repeat until you made a full 360 sweep. You'll end up with a list of points that connected create an asteroid shape.&#xD;&#xA;" />
  <row Id="3325" PostHistoryTypeId="2" PostId="1821" RevisionGUID="ea04b192-e4c8-4499-9f73-d05f8f84b639" CreationDate="2010-07-29T09:00:25.897" UserId="721" Text="I port Irrlicht on Android and use it for 2D games. It is not the best solution but i have strong performances. I tried many Java Frameworks but the Garbage Collector can lag your games during 0.2s on G1 phone... So the framework should do allocation very carefully.&#xD;&#xA;&#xD;&#xA;My opinions on these frameworks:&#xD;&#xA;&#xD;&#xA; - rokon: good performance and designed for mobile&#xD;&#xA; - cocos2d for Android: Garbage Collector problem&#xD;&#xA; - unity3D: very good but commercial and not yet available on Android&#xD;&#xA; - box2d is so slow on Java that i made a JNI wrapper with SWIG to use native box2d in my first java game&#xD;&#xA; - SDL is not a good Idea because designed for framebuffer access. But with Froyo, we can use a native API for Bitmap&#xD;&#xA;" />
  <row Id="3326" PostHistoryTypeId="2" PostId="1822" RevisionGUID="b89448ce-76e7-4019-881c-2f11223a5308" CreationDate="2010-07-29T09:13:58.290" UserId="490" Text="I buy all of them. &#xD;&#xA;&#xD;&#xA;I don't find most of them expensive, but that's subjective. Also, cheaper doesn't mean less valuable and I'm not a fan of the Programming Wisdom books, since they are expensive even to my mind because only little of each book is of any use to me. &#xD;&#xA;&#xD;&#xA;Before purchase, I check if the information is readily available on the Internet and try to figure out what the book might be revealing which isn't readily available. If I buy a book I'm always thinking that, compared to alternative learning solutions like University or Seminars, books are comparably cheap. And the value it adds to my knowledge base over time can't even be expressed in money.&#xD;&#xA;&#xD;&#xA;In over 15 years I've spent about $5,000 on educational and programming books. If I hadn't done so, I might not be here, I might not have had the great jobs I had. That's how I look at it. Money is a short term thing you best invest into yourself. Books are a very cheap way to learn from experts in their fields.&#xD;&#xA;" />
  <row Id="3327" PostHistoryTypeId="16" PostId="1822" RevisionGUID="b89448ce-76e7-4019-881c-2f11223a5308" CreationDate="2010-07-29T09:13:58.290" UserId="-1" />
  <row Id="3328" PostHistoryTypeId="2" PostId="1823" RevisionGUID="2640abad-260b-46d8-bf2a-85e5213dacf8" CreationDate="2010-07-29T09:21:10.450" UserId="490" Text="As Dennis said, it's mostly reason #2. It takes a lot of time and effort to create a new distribution version, and this is a seperate process from creating the patch version. Creating patches is simply faster and needs to be done anyway.&#xD;&#xA;&#xD;&#xA;But even more so, once you have had several complete versions of the product available for download, each new patch must be tested against each full download version in some cases. For a developer/publisher it is much better from a support point of view to have everyone download v1.0 full, then apply each individual patch successively. Because that's the process that must work for everyone.&#xD;&#xA;" />
  <row Id="3329" PostHistoryTypeId="2" PostId="1824" RevisionGUID="e8b1d03d-bc53-4140-afef-3090ed43195d" CreationDate="2010-07-29T09:29:40.703" UserId="490" Text="I would base that decision solely on the proficiency of the user base with programming languages, code structure and code constructs.&#xD;&#xA;&#xD;&#xA;From a programmer's perspective, I prefer your first approach.&#xD;&#xA;&#xD;&#xA;If I had to write the system for less proficient users, I'd take the second approach. I may even hide the function call in something more human-readable:&#xD;&#xA;&#xD;&#xA;    --# weapons/flame_missile.lua&#xD;&#xA;    Parameters&#xD;&#xA;    {&#xD;&#xA;        hotness = 10,&#xD;&#xA;        cost = 42,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    --# extender just knows that an on_hit function will be called&#xD;&#xA;    --# when the missile hits something.&#xD;&#xA;    OnHitEvent&#xD;&#xA;    {&#xD;&#xA;       damage_taken = Parameters.hotness,&#xD;&#xA;       should_ignite = true,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;OnHitEvent is simply a Lua function taking a table as parameter, which wraps the function call. The parameters are named, well defined and documented and will be checked for any typos. It's a bit more effort behind the scenes but significantly boosts understanding of the code to any non-programmer.&#xD;&#xA;" />
  <row Id="3330" PostHistoryTypeId="5" PostId="1765" RevisionGUID="bd1c4716-8cdb-4c25-ad06-5bf08c261edc" CreationDate="2010-07-29T09:35:37.757" UserId="1143" Comment="Expanded idea." Text="I've always thought that a good asset manager should have several modes of operation. These modes would most likely be separate source modules adhering to a common interface. The two basic modes of operation would be:&#xD;&#xA;&#xD;&#xA; - Production Mode - all assets are local and stripped of all meta data&#xD;&#xA; - Development Mode - assests are stored in a database (e.g. MySQL, etc) with additional meta data. The database would be a two tier system with a local database caching a shared database. Content creators would be able to edit and update the shared database and updates automatically propegated to developer / QA systems. It should also be possible to create placeholder content. Since everything is in a database, queries can be made on the database and reports generated to analyse the state of the production.&#xD;&#xA;&#xD;&#xA;You'd need a tool that can grab all the assests from the shared database and create the production dataset.&#xD;&#xA;&#xD;&#xA;In my years as a developer, I've never seen anything like this, although I've only worked for a handful of companies so my view is not really representative.&#xD;&#xA;&#xD;&#xA;*Update*&#xD;&#xA;&#xD;&#xA;OK, some negative votes. I'll expand on this design.&#xD;&#xA;&#xD;&#xA;Firstly, you don't really need factory classes because if you've got:&#xD;&#xA;&#xD;&#xA;    TextureHandle tex = pRm-&gt;getResource&lt;Texture&gt;( &quot;test.otx&quot; );&#xD;&#xA;&#xD;&#xA;you know the type, so just do:&#xD;&#xA;&#xD;&#xA;    TextureHandle tex = new TextureHandle (&quot;test.otx&quot;);&#xD;&#xA;&#xD;&#xA;but then, what I was trying to say above is that you wouldn't be using explicit filenames anyway, the texture to load would be specified by the model the texture is used on, so you don't actually need a human readable name, it could be a 32 bit integer value, which is much easier for the CPU to handle. So, in the constructor for TextureHandle you'd have:&#xD;&#xA;&#xD;&#xA;    if (texture already loaded)&#xD;&#xA;      update texture reference count&#xD;&#xA;    else&#xD;&#xA;      asset_stream = new AssetStream (resource_id)&#xD;&#xA;      asset_stream-&gt;ReadBytes&#xD;&#xA;      create texture&#xD;&#xA;      set texture ref count to 1&#xD;&#xA;&#xD;&#xA;AssetStream uses the resource_id parameter to find the location of the data. The way it did this would be dependant on the environment you're running in:&#xD;&#xA;&#xD;&#xA;In Development: the stream looks up the ID in a database (using SQL for example) to get a filename and then opens the file, the file could be cached locally, or pulled from a server if the local file doesn't exist or is out of date.&#xD;&#xA;&#xD;&#xA;In Release: the stream looks up the ID in a key/value table to get an offset/size into a large, packed file (like Doom's WAD file)." />
  <row Id="3331" PostHistoryTypeId="2" PostId="1825" RevisionGUID="3713639d-a933-42fd-b1c2-f9f0512dbe5c" CreationDate="2010-07-29T09:38:36.027" UserId="490" Text="Networking solutions sometimes include sophisticated matchmaking rule systems. I can't think of anything else.&#xD;&#xA;&#xD;&#xA;Games have a lot of common concepts, unfortunately not all of them can be supported very well using a plugin technology or middleware. Some game engines or game tools offer prefabricated systems for making menus and highscores, but there are no general purpose solutions.&#xD;&#xA;&#xD;&#xA;Even very well documented rule systems like AD&amp;D do not have a standard implementation. There are just too many variations possible, and each game requires its own set of rules or needs to tweak them for gameplay purposes.&#xD;&#xA;" />
  <row Id="3332" PostHistoryTypeId="2" PostId="1826" RevisionGUID="5ecfe1ed-52d6-45c1-a1ab-56508396b361" CreationDate="2010-07-29T09:55:05.930" UserId="490" Text="&quot;You're doing great in this role and in that other role. We just don't know where you best fit in.&quot;&#xD;&#xA;&#xD;&#xA;Find the company that does make use of all your skills, or you won't find satisfaction with your job over the long run. I've been there. I started my career as Level Designer, but quickly went to writing game scripts full-time. I was a programmer of sorts at the lower end using scripting languages for many years. I also kept my design proficiency and still took on design tasks here and there. It was a long process to be accepted into the ranks of a Software Engineer, yet when I got there, I was more disconnected with the actual game-making process, where Designers put together fun missions and require help with scripting and design.&#xD;&#xA;&#xD;&#xA;For over a year or two I was even a department manager. I also worked on databases and tools that half of the company used. I had about two dozen different internal customers with conflicting interests. Managing expectations was suddenly on my menu.&#xD;&#xA;&#xD;&#xA;Overall, while I keep all of these things in my resume, I would choose very carefully which of these to use if I ever applied to a job again. I don't want to be chosen because I have also done databases, or localization, or management. I want to make games.&#xD;&#xA;&#xD;&#xA;Big companies can rarely make heads or tails of Jack-of-all-Trades. You tend to sit between roles, switching from one to the other, never really making it in any of them unless you focus your energy into one particular role. But is that what you want? You're probably much better off working for a smaller Indie shop. They know the value of someone who can do all of these things, and provide ample opportunities to put most of your skills to use. But they too also want to know what your main focus is.&#xD;&#xA;" />
  <row Id="3333" PostHistoryTypeId="2" PostId="1827" RevisionGUID="acd46bb3-e352-4ab5-9fcb-217378571ba9" CreationDate="2010-07-29T10:00:54.647" UserId="1156" Text="I think it's been mentioned several times, but theme it around your game. It could be all nice and inventive to have 'Dumb, Normal, Smart, Genius' but not so great for a racing game.&#xD;&#xA;&#xD;&#xA;If you want to go generic, try using a thesaurus to find symonyms: &lt;br&gt;&#xD;&#xA;Casual, Easy, Basic, Child's Play, Simple, Pushover. &lt;br&gt;&#xD;&#xA;Normal, Fair, Medium, Mediocre, Passable. &lt;br&gt;&#xD;&#xA;Hard, Difficult, Tough, Challenging, Not-So-Easy. &lt;br&gt;&#xD;&#xA;Insane, Very Hard, Very Difficult, Impossible, Extreme." />
  <row Id="3334" PostHistoryTypeId="2" PostId="1828" RevisionGUID="c82548f6-bf87-41bc-a528-1357779568d2" CreationDate="2010-07-29T10:06:26.203" UserId="653" Text="I'd like to shake the camera around a bit during an explosion, and I've tried a few different functions for rocking it around, and nothing seems to really give that 'wow, what a bang!' type feeling that I'm looking for. I've tried some arbitrary relatively high frequency sine wave patterns with a bit of linear attenuation, as well as a square wave-type pattern. I've tried moving just one axis, two, and all three (although the dolly effect was barely noticeable in that case).&#xD;&#xA;&#xD;&#xA;Does anyone know of a good camera shaking pattern, or could give me some pointers, it'd be really grateful.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="3335" PostHistoryTypeId="1" PostId="1828" RevisionGUID="c82548f6-bf87-41bc-a528-1357779568d2" CreationDate="2010-07-29T10:06:26.203" UserId="653" Text="Camera rocking pattern" />
  <row Id="3336" PostHistoryTypeId="3" PostId="1828" RevisionGUID="c82548f6-bf87-41bc-a528-1357779568d2" CreationDate="2010-07-29T10:06:26.203" UserId="653" Text="&lt;camera&gt;" />
  <row Id="3337" PostHistoryTypeId="5" PostId="1785" RevisionGUID="5935c247-e506-41a6-9622-cef64930f3f5" CreationDate="2010-07-29T11:11:38.047" UserId="744" Comment="Fix swapped variable names." Text="I worked on the same engine as coderanger. I have a differing viewpoint. :)&#xD;&#xA;&#xD;&#xA;First, we did not have a stack of FSMs - we had a stack of states. A stack of states makes a single FSM. I don't know what a stack of FSMs would look like. Probably too complicated to do anything practical with.&#xD;&#xA;&#xD;&#xA;My biggest problem with our Global State Machine was that it was a stack of states, and not a set of states. This means, e.g., .../MainMenu/Loading was different than .../Loading/MainMenu, depending on if you got the main menu up before or after the loading screen (the game is asynchronous and loading is mostly server-driven).&#xD;&#xA;&#xD;&#xA;As two examples of things this made ugly:&#xD;&#xA;&#xD;&#xA;* It led to e.g. the LoadingGameplay state, so you had Base/Loading, and Base/Gameplay/LoadingGameplay for loading within the Gameplay state, which had to repeat much of the code in the normal loading state (but not all, and add some more).&#xD;&#xA;* We had several functions like &quot;if in character creator go to gameplay; if in gameplay go to character select; if in character select go back to login&quot;, because we wanted to show the same interface windows in different states but make the Back/Forward buttons still work.&#xD;&#xA;&#xD;&#xA;Despite the name, it was not very &quot;global&quot;. Most internal _game_ systems did not use it to track their internal states, because they didn't want their states mucking about with other systems. Others, e.g. the UI system, could use it but only to copy state into their own local state systems. (I would especially caution against the system for UI states. UI state is not a stack, it's really a DAG, and trying to force any other structure on it is only going to make UIs that are frustrating to use.)&#xD;&#xA;&#xD;&#xA;What it was good for was isolating tasks for integrating code from infrastructure programmers who didn't know how the game flow was actually structured, so you could tell the guy writing the patcher &quot;put your code in Client_Patch_Update&quot;, and the guy writing the graphics loading &quot;put your code in Client_MapTransfer_OnEnter&quot;, and we could swap certain logic flows around without much trouble.&#xD;&#xA;&#xD;&#xA;On a side project, I have had better luck with a state *set* rather than a *stack*, not being afraid to make multiple machines for unrelated systems, and refusing to let myself fall into the trap of having a &quot;global state&quot;, which is really just a complicated way to synchronize things through global variables - Sure, you're going to end up doing it near some deadline, but don't design with that as your _goal_. Fundamentally, state in a game is not a stack, and states in a game are not all related.&#xD;&#xA;&#xD;&#xA;The GSM also, as function pointers and non-local behavior tend to do, made debugging things more difficult, though debugging those kind of large state transitions wasn't very fun before we had it either. State-sets instead of state-stacks does not really help this, but you should be aware of it. Virtual functions rather than function pointers may alleviate that somewhat." />
  <row Id="3338" PostHistoryTypeId="2" PostId="1829" RevisionGUID="c709a4ff-51ed-459d-8c42-094d039827ed" CreationDate="2010-07-29T11:22:18.577" UserId="1143" Text="I not sure a stack is entirely necessary as well as limiting the functionality of the state system. Using a stack, you can't 'exit' a state to one of several possibilities. Say you start off in &quot;Main Menu&quot; then go to &quot;Load Game&quot;, you may want to go to a &quot;Pause&quot; state after successfully loading the saved game and return to &quot;Main Menu&quot; if the user cancels the load.&#xD;&#xA;&#xD;&#xA;I would just have the state specify the state to follow when it exits.&#xD;&#xA;&#xD;&#xA;For those instances where you want to return to the state preceding the current state, for example &quot;Main Menu-&gt;Options-&gt;Main Menu&quot; and &quot;Pause-&gt;Options-&gt;Pause&quot;, just pass as a startup parameter to the state the state to go back to." />
  <row Id="3339" PostHistoryTypeId="2" PostId="1830" RevisionGUID="4cd757e9-c3c7-4db0-818d-792c25df9aa5" CreationDate="2010-07-29T11:40:40.933" UserId="744" Text="JSON is good, but YAML is better. :) http://www.yaml.org/ and http://code.google.com/p/yaml-cpp/ for one of the nicer-to-use implementations.&#xD;&#xA;&#xD;&#xA;YAML is a superset of JSON that adds support for a few nice features, most notably:&#xD;&#xA;&#xD;&#xA;* Binary nodes. This is great for serializing the kind of data you might be dealing with for level descriptions. JSON requires you to translate to some intermediate format of your choice, like Base64, before writing / after parsing. YAML has a !!binary node type which tells the parser library to do it for you.&#xD;&#xA;* Intra-document references. If the same object appears twice in the document, JSON will write it twice, and when you read it back in, you'll get two copies. Many YAML emitters can detect this situation and instead of a second copy, output a reference to the first, when can be detected when loading.&#xD;&#xA;* Custom node types. You can flag each map in a list with e.g. !!Player, !!Enemy, etc., and so keep your type information more out-of-band.&#xD;&#xA;* YAML supports more readable formatting.&#xD;&#xA;* Since JSON is a subset of YAML, most YAML readers will have no trouble reading JSON documents." />
  <row Id="3340" PostHistoryTypeId="2" PostId="1831" RevisionGUID="3be90b0a-0ccf-411a-b63c-92d4d18650e9" CreationDate="2010-07-29T12:00:24.437" UserId="135" Text="I've got decent camera shake by applying Perlin noise to the camera's orientation. It gives you a decent big jolt with higher frequency shaking built in, and can look really good.&#xD;&#xA;&#xD;&#xA;http://mrl.nyu.edu/~perlin/doc/oscar.html has more details and sample code for generating noise." />
  <row Id="3341" PostHistoryTypeId="5" PostId="1441" RevisionGUID="d2b2f9bf-32cc-427c-87bd-58d9cec3f529" CreationDate="2010-07-29T12:27:49.950" UserId="930" Comment="added 2 characters in body" Text="One of my hobbies (aside programming, of course) is 3d modeling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modeling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modeling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modeling characters)  &#xD;&#xA;**3)** What knowledge should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development environment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existing 3D models exported by 3DS MAX (not a must, but a plus)  &#xD;&#xA; - Had the ability to create 3d models programmatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more UI-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [weighted companion cube][5], and I want to make a full-screen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room) drawn maybe through code (not an imported model)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**Edit**  &#xD;&#xA;I'm going to start with UNITY, and I've noticed there's a pro version, is the free version enough to do what I want ? (not counting on the 1 month free pro account)  &#xD;&#xA;As for XNA, does the same scenario apply as well ?  &#xD;&#xA;Please leave a comment!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="3342" PostHistoryTypeId="2" PostId="1832" RevisionGUID="9a3a3fe5-c688-4fb8-84f2-e95db752d7b2" CreationDate="2010-07-29T13:09:17.930" UserId="1180" Text="My algorithm was: For each of 8 equally spaced angles around a circle, choose a random distance and draw a point at that angle and distance from the center connected to the previous point." />
  <row Id="3343" PostHistoryTypeId="2" PostId="1833" RevisionGUID="6daca4ba-8fe4-400b-b3fa-d98aad25118c" CreationDate="2010-07-29T13:43:25.600" UserId="1156" Text="If you've got dynamic object physics [probably not the right word, but sort of what I mean], where any objects not fixed would be 'blown away' by the explosion, you could have the camera affected as an object like that.&#xD;&#xA;&lt;br&gt; Only difference would be just change the rotation/pitch/yaw/roll of the camera, and not the position.&#xD;&#xA;&lt;br&gt; Other than that, maybe generate a random number sequence and convert those to rotation somehow? Think that heightmap, grayscale stuff may be an example; they're not totally different, but are random." />
  <row Id="3344" PostHistoryTypeId="2" PostId="1834" RevisionGUID="3c120520-7cba-450a-b339-1283dc49bf74" CreationDate="2010-07-29T14:18:59.430" UserId="458" Text="I would avoid &quot;Easy&quot; as that has a negative connotation, and some people who really should choose that setting will avoid it because they don't want to think of themselves as poorly skilled. (Mega Man 2 named its difficulty levels &quot;Normal/Difficult&quot; instead of &quot;Easy/Normal&quot; for that reason.)&#xD;&#xA;&#xD;&#xA;Themed level names (as others have mentioned) work in some game contexts, typically when you're working in an established genre where you expect players to be familiar with conventions like difficulty levels. This can backfire if you're not careful; for example, I could never remember which one was easier in Viewtiful Joe's &quot;Child/Adult&quot; difficulties (is Adult harder because adults are older and more skilled, or is Child harder because children always seem to kick their parents' butts at video games?)." />
  <row Id="3345" PostHistoryTypeId="2" PostId="1835" RevisionGUID="9df3965a-a053-4bc3-9630-3b3679a09d04" CreationDate="2010-07-29T14:32:51.473" UserId="778" Text="Does anyone know when the source code for Doom 3 is to be released?&#xD;&#xA;I've heard a lot of things but nothing conclusive.&#xD;&#xA;&#xD;&#xA;Thanks  &#xD;&#xA;Adam" />
  <row Id="3346" PostHistoryTypeId="1" PostId="1835" RevisionGUID="9df3965a-a053-4bc3-9630-3b3679a09d04" CreationDate="2010-07-29T14:32:51.473" UserId="778" Text="Doom 3 codebase release details" />
  <row Id="3347" PostHistoryTypeId="3" PostId="1835" RevisionGUID="9df3965a-a053-4bc3-9630-3b3679a09d04" CreationDate="2010-07-29T14:32:51.473" UserId="778" Text="&lt;open-source&gt;" />
  <row Id="3348" PostHistoryTypeId="2" PostId="1836" RevisionGUID="bd41b3d2-8c40-4275-a7b8-65d54575da18" CreationDate="2010-07-29T14:37:50.167" UserId="1134" Text="I'd use a simple `struct` or similar device (depending on your language) to store all game state in a central place.  If you want the protection of setters/getters, you can wrap the struct in a `class`.&#xD;&#xA;&#xD;&#xA;If you feel up to it, make use of [bitfields][1] or simply do bit manipulation yourself using bitwise operators.&#xD;&#xA;&#xD;&#xA;Be aware that in some languages, the [rules for struct padding and packing][2] may be a bit complicated -- but it may also not matter much for your case if you have a byte or two of padding.&#xD;&#xA;&#xD;&#xA;You may also be able to use a `#pragma` (such as `#pragma pack(1)`) or an `__attribute__` to closely pack the struct, eliminating padding.  This may or may not work depending on your compiler and target architecture.&#xD;&#xA;&#xD;&#xA;Note that use of bitfields and pack pragmas or attributes can reduce portability.&#xD;&#xA;&#xD;&#xA;(For e.g. Pac-Man, this struct might naively contain a map id or map seed, a Pac-Man x and y position, four ghost x and y positions, and a large bitfield for the presence or absence of 32-64 pellets, whatever the maximum is.)&#xD;&#xA;&#xD;&#xA;Once you have your struct, pass it to something like an [xxencode][3] function: &#xD;&#xA;&#xD;&#xA;    encode_save( char * outStringBuf, size_t outStringBufSize,&#xD;&#xA;                 const SaveStruct * inSaveData, size_t inSaveDataSize )&#xD;&#xA;&#xD;&#xA;Writing this function is a bit error-prone; you need to shift and combine bytes as necessary to get e.g. 6 bits at a time, then translate into an appropriate character.  I'd personally try to hunt down someone else's code, unless I was doing this for &quot;fun&quot; (and I'd probably want a test suite for it).  &#xD;&#xA;&#xD;&#xA;Never underestimate the power of the old-school `struct` in the right places.  We've used it a ton for GBA and DS games here.&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1044654/bitfield-manipulation-in-c&#xD;&#xA;  [2]: https://secure.wikimedia.org/wikipedia/en/wiki/Data_structure_alignment#Typical_alignment_of_C_structs_on_x86&#xD;&#xA;  [3]: https://secure.wikimedia.org/wikipedia/en/wiki/Xxencode" />
  <row Id="3349" PostHistoryTypeId="2" PostId="1837" RevisionGUID="d9b63a25-422d-4f81-82b4-48e4dd3fdf50" CreationDate="2010-07-29T14:42:11.700" UserId="262" Text="Unsurprisingly, the Ogre guys have a cut down [template project][1] that you can use as a basis to build Ogre XCode projects.  &#xD;&#xA;&#xD;&#xA;If you have [downloaded and installed the SDK][2] (i.e. haven't built the source yourself), you can just install the [Ogre XCode templates][3] and they will build and run out of the box.&#xD;&#xA;&#xD;&#xA;If you have built the source from the [Mercurial repo][4], you can find the template projects in the *SDK/OSX/Xcode templates* directory of the SDK. You might have to play around with library and include directories to get it working, as they assume the layout of the prebuilt SDK.  &#xD;&#xA;&#xD;&#xA;  [1]: https://www.ogre3d.org/forums/viewtopic.php?f=1&amp;t=59296#p398720&#xD;&#xA;  [2]: http://www.ogre3d.org/download&#xD;&#xA;  [3]: http://sourceforge.net/projects/ogre/files/&#xD;&#xA;  [4]: http://www.ogre3d.org/developers/mercurial" />
  <row Id="3350" PostHistoryTypeId="5" PostId="1835" RevisionGUID="8df07138-d5ab-481a-8012-20668e8fea05" CreationDate="2010-07-29T14:47:37.227" UserId="778" Comment="added 36 characters in body" Text="Does anyone know when the source code for Doom 3 is to be released?&#xD;&#xA;I've heard a lot of things but nothing conclusive.&#xD;&#xA;&#xD;&#xA;Thanks  &#xD;&#xA;Adam&#xD;&#xA;&#xD;&#xA;__Edit__ any info is appreciated" />
  <row Id="3351" PostHistoryTypeId="2" PostId="1838" RevisionGUID="62eed62d-5626-41b1-b267-90689750fa3f" CreationDate="2010-07-29T15:04:51.693" UserId="1183" Text="Do I need to learn C++ to use Open GL?" />
  <row Id="3352" PostHistoryTypeId="1" PostId="1838" RevisionGUID="62eed62d-5626-41b1-b267-90689750fa3f" CreationDate="2010-07-29T15:04:51.693" UserId="1183" Text="Open GL and C++" />
  <row Id="3353" PostHistoryTypeId="3" PostId="1838" RevisionGUID="62eed62d-5626-41b1-b267-90689750fa3f" CreationDate="2010-07-29T15:04:51.693" UserId="1183" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="3354" PostHistoryTypeId="2" PostId="1839" RevisionGUID="3405c371-558e-4943-805e-ae8eee1ce5be" CreationDate="2010-07-29T15:05:06.777" UserId="778" Text="If you're looking for good OOP - I quite liked the object model of the [Doom3 SDK][1].  &#xD;&#xA;Ogre3D is a heavy OOP design but I emphasise heavy as i think it's quite bloated with lots of examples and plug ins.&#xD;&#xA;&#xD;&#xA;Let me know what you think.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iddevnet.com/doom3/downloads.php" />
  <row Id="3355" PostHistoryTypeId="2" PostId="1840" RevisionGUID="4acb2fff-ab66-48a8-9e16-db8e62860ff7" CreationDate="2010-07-29T15:08:02.183" UserId="807" Text="If you are coding in .Net then XML is super easy to go with, as you can serialize/deserialize your level class into/out of XML with just a couple lines, and then its all in a nicely managed class.&#xD;&#xA;&#xD;&#xA;TheMap would be a variable of type Map that you have all of your data loaded into.&#xD;&#xA;&#xD;&#xA;    Dim TheMap As New Map&#xD;&#xA;&#xD;&#xA;Assuming you have a Map class already built, this would save your map into XML:&#xD;&#xA;    &#xD;&#xA;    Dim Serializer As New System.Xml.Serialization.XmlSerializer(GetType(TheMap))&#xD;&#xA;    Dim Strm As New FileStream(&quot;c:\Map.xml&quot;, FileMode.Create, FileAccess.Write, FileShare.None)&#xD;&#xA;    Serializer.Serialize(Strm, TheMap)&#xD;&#xA;    Strm.Close()&#xD;&#xA;&#xD;&#xA;This would then load that XML back into your map class, to be used again in code.&#xD;&#xA;&#xD;&#xA;    Dim Reader As New StreamReader(&quot;map.xml&quot;)&#xD;&#xA;    Dim Serializer As New System.Xml.Serialization.XmlSerializer(GetType(TheMap))&#xD;&#xA;    &#xD;&#xA;    TheMap = Serializer.Deserialize(Reader)&#xD;&#xA;    Reader.Close()&#xD;&#xA;&#xD;&#xA;From this point on your XML file is now loaded into your class for easy use.&#xD;&#xA;&#xD;&#xA;As for your &quot;Level String&quot; issue, what was stated before would work great, you could just use the Seed number as the &quot;Level String&quot;. &#xD;&#xA;&#xD;&#xA;Otherwise, you could just pre-generate however many different maps you wanted, and have them all saved with a &quot;Level String&quot; and then use that to pull up the proper map.&#xD;&#xA;" />
  <row Id="3357" PostHistoryTypeId="2" PostId="1842" RevisionGUID="9695fe77-c3b0-4099-9f77-1afc33f6c2bb" CreationDate="2010-07-29T15:13:48.480" UserId="1156" Text="Not necessarily. In fact, OpenGL is native C.&#xD;&#xA;There is JOGL, which is a Java wrapper.&lt;br&gt;&#xD;&#xA;OpenGL ES, which is for the iPhone. I believe this is in Obj-C as well as C/C++. [Not sure, think so]&lt;br&gt;&#xD;&#xA;I think things like PyGame end up as OpenGL in the end, and they're done in Python.&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;But for raw OpenGL for the PC, the only choices I know of are C, C++, or Java.&#xD;&#xA;" />
  <row Id="3358" PostHistoryTypeId="2" PostId="1843" RevisionGUID="758e3f3a-7e3b-4e6d-9356-fb637c535243" CreationDate="2010-07-29T15:19:20.183" UserDisplayName="Alex Miller" Text="Math.atan2() is extremely useful (along with all of trig)." />
  <row Id="3359" PostHistoryTypeId="16" PostId="1843" RevisionGUID="758e3f3a-7e3b-4e6d-9356-fb637c535243" CreationDate="2010-07-29T15:19:20.183" UserId="-1" />
  <row Id="3360" PostHistoryTypeId="2" PostId="1844" RevisionGUID="d02a02a3-f085-4fa8-90a5-6fd47a36f026" CreationDate="2010-07-29T15:21:20.153" UserId="1156" Text="[Doom 3 Downloads][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iddevnet.com/doom3/downloads.php&#xD;&#xA;&#xD;&#xA;Not sure if that's just modding stuff, or extensions, but it does say SDK 3 'Contains the **game source code**, expansion source code (Resurrection of Evil), maya importer source, vehicle demo, and sample Maya files'.&#xD;&#xA;&#xD;&#xA;&lt;br&gt; If that just means far enough to mod it, I do not know." />
  <row Id="3361" PostHistoryTypeId="2" PostId="1845" RevisionGUID="a3cc0a86-3c22-4e76-9f58-c34b25da8d44" CreationDate="2010-07-29T15:33:34.577" UserId="187" Text="Not at all! Due to it's simple C API, OpenGL has bindings available for &lt;a href=&quot;http://jogamp.org/jogl/www/&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;http://pyopengl.sourceforge.net/&quot;&gt;Python&lt;/a&gt;, &lt;a href=&quot;http://ruby-opengl.rubyforge.org/&quot;&gt;Ruby&lt;/a&gt;, and just about &lt;a href=&quot;http://www.haskell.org/haskellwiki/Opengl&quot;&gt;any&lt;/a&gt; &lt;a href=&quot;http://glcaml.sourceforge.net/&quot;&gt;other&lt;/a&gt; &lt;a href=&quot;http://luagl.sourceforge.net/&quot;&gt;language&lt;/a&gt; you can think of!" />
  <row Id="3362" PostHistoryTypeId="2" PostId="1846" RevisionGUID="644ec72a-1061-4d3e-bba9-267c639ae97c" CreationDate="2010-07-29T15:41:43.487" UserId="1174" Text="OpenGL is a C API. There a bindings for other languages but samples in books and tutorials tend to be written in C.&#xD;&#xA;&#xD;&#xA;Because of this knowing C can help. You definitely don't have to learn C++ to use OpenGL though." />
  <row Id="3363" PostHistoryTypeId="2" PostId="1847" RevisionGUID="aff8ac0e-a09f-42c2-965f-6191382e8875" CreationDate="2010-07-29T15:51:00.303" UserId="994" Text="Quote from [id's SDK website][1]:&#xD;&#xA;&#xD;&#xA;&gt; The Code is where all the real fun starts to happen. The Doom 3 SDK comes with pretty much half the source code for the game. &#xD;&#xA;&#xD;&#xA;So the full source code hasn't been released yet, but some of it has.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iddevnet.com/doom3/code.php" />
  <row Id="3364" PostHistoryTypeId="2" PostId="1848" RevisionGUID="963c8536-f83f-4a21-a7b1-a122d3fbec12" CreationDate="2010-07-29T15:51:16.823" UserId="1143" Text="A small C/C++ snippet from a game I helped write many years back:&#xD;&#xA;&#xD;&#xA;    (fill ? FillRect : DrawRect) (x, y, w, h, colour);&#xD;&#xA;&#xD;&#xA;On my first game ([this](http://www.mobygames.com/game/wrath-of-earth)) I needed to access more than 1Mb of RAM, and, this being before the internet took off, I had no documentation for XMS and EMS that DOS apps used to access the extra RAM. So, I ended up using a small 'backdoor' that featured in the 386 with regard to the segment registers. Normally, in real mode, the address was calculated as &lt;code&gt;seg*16+off&lt;/code&gt; which limited you to 1Mb. However, you could switch to protected mode, set up a segment to address 4Mb, switch back, and provided you didn't write to the segment register (which was OK since DOS only used the 8086 segment registers), you could access the whole 4Mb as a flat address space. Flipping back to real mode was necessary if you wanted to use the DOS services. There weren't many DPMI extenders available either." />
  <row Id="3365" PostHistoryTypeId="16" PostId="1848" RevisionGUID="963c8536-f83f-4a21-a7b1-a122d3fbec12" CreationDate="2010-07-29T15:51:16.823" UserId="-1" />
  <row Id="3366" PostHistoryTypeId="5" PostId="1845" RevisionGUID="5bc4ce88-2678-4e9d-9ec4-01327a1b76bc" CreationDate="2010-07-29T15:52:55.853" UserId="51" Comment="deleted 1 characters in body" Text="Not at all! Due to its simple C API, OpenGL has bindings available for &lt;a href=&quot;http://jogamp.org/jogl/www/&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;http://pyopengl.sourceforge.net/&quot;&gt;Python&lt;/a&gt;, &lt;a href=&quot;http://ruby-opengl.rubyforge.org/&quot;&gt;Ruby&lt;/a&gt;, and just about &lt;a href=&quot;http://www.haskell.org/haskellwiki/Opengl&quot;&gt;any&lt;/a&gt; &lt;a href=&quot;http://glcaml.sourceforge.net/&quot;&gt;other&lt;/a&gt; &lt;a href=&quot;http://luagl.sourceforge.net/&quot;&gt;language&lt;/a&gt; you can think of!" />
  <row Id="3367" PostHistoryTypeId="2" PostId="1849" RevisionGUID="757bdc83-3072-463f-9066-c6272904c093" CreationDate="2010-07-29T15:54:37.913" UserId="10" Text="They are planning to [GPL the id Tech 4 engine in 2011][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Id_Tech_4" />
  <row Id="3368" PostHistoryTypeId="5" PostId="1848" RevisionGUID="68557a1c-1694-4bd0-895b-f78ec57dceca" CreationDate="2010-07-29T16:00:20.733" UserId="10" Comment="added 12 characters in body" Text="A small C/C++ snippet from a game I helped write many years back:&#xD;&#xA;&#xD;&#xA;    (fill ? FillRect : DrawRect) (x, y, w, h, colour);&#xD;&#xA;&#xD;&#xA;On my first game ([this](http://www.mobygames.com/game/wrath-of-earth)) I needed to access more than 1Mb of RAM, and, this being before the internet took off, I had no documentation for XMS and EMS that DOS apps used to access the extra RAM. &#xD;&#xA;&#xD;&#xA;So, I ended up using a small 'backdoor' that featured in the 386 with regard to the segment registers. Normally, in real mode, the address was calculated as &lt;code&gt;seg*16+off&lt;/code&gt; which limited you to 1Mb. &#xD;&#xA;&#xD;&#xA;However, you could switch to protected mode, set up a segment to address 4Mb, switch back, and provided you didn't write to the segment register (which was OK since DOS only used the 8086 segment registers), you could access the whole 4Mb as a flat address space. Flipping back to real mode was necessary if you wanted to use the DOS services. &#xD;&#xA;&#xD;&#xA;There weren't many DPMI extenders available either." />
  <row Id="3369" PostHistoryTypeId="2" PostId="1850" RevisionGUID="9a5e2bc6-a301-4dc9-bdc2-1d122b83c8ba" CreationDate="2010-07-29T16:07:10.277" UserId="259" Text="Whatever format you use for your save games, for goodness sake put a version number in. You'll be able to have backwards-compatiable loads by branching on the version number, or you'll be able to safely recognise saves that are too old to load.&#xD;&#xA;&#xD;&#xA;You'll regret it if you don't." />
  <row Id="3370" PostHistoryTypeId="2" PostId="1851" RevisionGUID="217e68d5-713b-4cf7-bba5-1e1decce9c7e" CreationDate="2010-07-29T16:15:39.457" UserId="1185" Text="If you fancy developing in AIR for Android then you could use Flash. Flash itself doesn't have any game specific features, really, but thanks to Flash's success on the web there are a huge amount of 3rd party libraries for it especially designed for games.&#xD;&#xA;&#xD;&#xA;Some of the more popular 3rd party frameworks for games in Flash include Flixel (http://flixel.org/) and PushButtonEngine (http://pushbuttonengine.com/), which are fully designed for game development. Flash also has a version of Box2D (physics engine mentioned above - http://box2dflash.sourceforge.net/) and there are various 3D libraries, such as Papervision (http://code.google.com/p/papervision3d/) if you want to go down that road.&#xD;&#xA;&#xD;&#xA;The main disadvantage of developing in AIR, though, is that I'm pretty sure that you'll need to target Froyo 2.2 or later, though, so older handsets will get left out." />
  <row Id="3371" PostHistoryTypeId="5" PostId="1851" RevisionGUID="1e9e4ad3-b645-4e12-a23c-b15139f385b0" CreationDate="2010-07-29T16:21:53.290" UserId="1185" Comment="added 14 characters in body" Text="If you fancy developing in AIR for Android then you could use Flash. Flash itself doesn't have any game specific features, really, but thanks to Flash's success on the web there are a huge amount of 3rd party libraries for it especially designed for games.&#xD;&#xA;&#xD;&#xA;Some of the more popular 3rd party frameworks for games in Flash include Flixel (http://flixel.org/) and PushButtonEngine (http://pushbuttonengine.com/), which are fully designed for game development. Flash also has a version of Box2D (physics engine mentioned above - http://box2dflash.sourceforge.net/) and there are various 3D libraries, such as Papervision (http://code.google.com/p/papervision3d/) if you want to go down that road in the future.&#xD;&#xA;&#xD;&#xA;The main disadvantage of developing in AIR, though, is that I'm pretty sure that you'll need to target Froyo 2.2 or later, though, so older handsets will get left out." />
  <row Id="3376" PostHistoryTypeId="5" PostId="1801" RevisionGUID="33866104-186c-4e57-9190-7ac503d1e169" CreationDate="2010-07-29T17:08:24.903" UserId="1024" Comment="added 5 characters in body" Text="If you want to serialize all the data in game, I would recommend JSON as your file format, it is why easier to use the XML and the support is very good across many languages.&#xD;&#xA;&#xD;&#xA;I have used this library for C++ and it works very well.&#xD;&#xA;&#xD;&#xA;http://jsoncpp.sourceforge.net/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3377" PostHistoryTypeId="8" PostId="1845" RevisionGUID="9c7c2795-a772-4ad0-94b3-f6766d2dad8c" CreationDate="2010-07-29T17:18:07.647" UserId="187" Comment="Rollback to [a3cc0a86-3c22-4e76-9f58-c34b25da8d44]" Text="Not at all! Due to it's simple C API, OpenGL has bindings available for &lt;a href=&quot;http://jogamp.org/jogl/www/&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;http://pyopengl.sourceforge.net/&quot;&gt;Python&lt;/a&gt;, &lt;a href=&quot;http://ruby-opengl.rubyforge.org/&quot;&gt;Ruby&lt;/a&gt;, and just about &lt;a href=&quot;http://www.haskell.org/haskellwiki/Opengl&quot;&gt;any&lt;/a&gt; &lt;a href=&quot;http://glcaml.sourceforge.net/&quot;&gt;other&lt;/a&gt; &lt;a href=&quot;http://luagl.sourceforge.net/&quot;&gt;language&lt;/a&gt; you can think of!" />
  <row Id="3378" PostHistoryTypeId="5" PostId="1845" RevisionGUID="283eb795-cc51-4d31-869c-7605ede65ed7" CreationDate="2010-07-29T17:18:23.810" UserId="187" Comment="deleted 1 characters in body" Text="Not at all! Due to its simple C API, OpenGL has bindings available for &lt;a href=&quot;http://jogamp.org/jogl/www/&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;http://pyopengl.sourceforge.net/&quot;&gt;Python&lt;/a&gt;, &lt;a href=&quot;http://ruby-opengl.rubyforge.org/&quot;&gt;Ruby&lt;/a&gt;, and just about &lt;a href=&quot;http://www.haskell.org/haskellwiki/Opengl&quot;&gt;any&lt;/a&gt; &lt;a href=&quot;http://glcaml.sourceforge.net/&quot;&gt;other&lt;/a&gt; &lt;a href=&quot;http://luagl.sourceforge.net/&quot;&gt;language&lt;/a&gt; you can think of!" />
  <row Id="3379" PostHistoryTypeId="5" PostId="1836" RevisionGUID="df194bb7-5a9b-4094-8dd5-92a761375045" CreationDate="2010-07-29T17:20:21.967" UserId="1134" Comment="note re endianness and portability" Text="I'd use a simple `struct` or similar device (depending on your language) to store all game state in a central place.  If you want the protection of setters/getters, you can wrap the struct in a `class`.&#xD;&#xA;&#xD;&#xA;If you feel up to it, make use of [bitfields][1] or simply do bit manipulation yourself using bitwise operators.&#xD;&#xA;&#xD;&#xA;Be aware that in some languages, the [rules for struct padding and packing][2] may be a bit complicated -- but it may also not matter much for your case if you have a byte or two of padding.&#xD;&#xA;&#xD;&#xA;You may also be able to use a `#pragma` (such as `#pragma pack(1)`) or an `__attribute__` to closely pack the struct, eliminating padding.  This may or may not work depending on your compiler and target architecture.&#xD;&#xA;&#xD;&#xA;Note that use of bitfields and pack pragmas or attributes can reduce portability.  Across hardware architectures, the struct field endianness (byte order) may also change.  So you may want to avoid this if you're trying for portability.&#xD;&#xA;&#xD;&#xA;(For e.g. Pac-Man, this struct might naively contain a map id or map seed, a Pac-Man x and y position, four ghost x and y positions, and a large bitfield for the presence or absence of 32-64 pellets, whatever the maximum is.)&#xD;&#xA;&#xD;&#xA;Once you have your struct, pass it to something like an [xxencode][3] function: &#xD;&#xA;&#xD;&#xA;    encode_save( char * outStringBuf, size_t outStringBufSize,&#xD;&#xA;                 const SaveStruct * inSaveData, size_t inSaveDataSize )&#xD;&#xA;&#xD;&#xA;Writing this function is a bit error-prone; you need to shift and combine bytes as necessary to get e.g. 6 bits at a time, then translate into an appropriate character.  I'd personally try to hunt down someone else's code, unless I was doing this for &quot;fun&quot; (and I'd probably want a test suite for it).  &#xD;&#xA;&#xD;&#xA;Never underestimate the power of the old-school `struct` in the right places.  We've used it a ton for GBA and DS games here.&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1044654/bitfield-manipulation-in-c&#xD;&#xA;  [2]: https://secure.wikimedia.org/wikipedia/en/wiki/Data_structure_alignment#Typical_alignment_of_C_structs_on_x86&#xD;&#xA;  [3]: https://secure.wikimedia.org/wikipedia/en/wiki/Xxencode" />
  <row Id="3380" PostHistoryTypeId="6" PostId="20" RevisionGUID="6ec68e83-c6fb-4420-8643-24aca1a9213b" CreationDate="2010-07-29T17:22:49.840" UserId="187" Comment="edited tags" Text="&lt;graphics&gt;&lt;assets&gt;&lt;sprites&gt;&lt;textures&gt;&lt;free&gt;" />
  <row Id="3381" PostHistoryTypeId="6" PostId="355" RevisionGUID="717c8dc8-b427-469e-a6c1-7cefbc601d35" CreationDate="2010-07-29T17:23:24.177" UserId="187" Comment="edited tags" Text="&lt;books&gt;&lt;free&gt;" />
  <row Id="3382" PostHistoryTypeId="6" PostId="14" RevisionGUID="a534c0c8-ef48-4e84-9eb0-156494ca1ff3" CreationDate="2010-07-29T17:24:04.300" UserId="187" Comment="edited tags" Text="&lt;assets&gt;&lt;free&gt;&lt;music&gt;" />
  <row Id="3383" PostHistoryTypeId="6" PostId="8" RevisionGUID="55a085c5-6b3a-4ab7-8758-374b8cd81c6d" CreationDate="2010-07-29T17:24:12.460" UserId="187" Comment="edited tags" Text="&lt;free&gt;&lt;sound&gt;" />
  <row Id="3384" PostHistoryTypeId="2" PostId="1854" RevisionGUID="790bc32a-5ceb-4336-a386-6003e9c28ed8" CreationDate="2010-07-29T17:26:53.030" UserId="246" Text="A jquery ui guy is building a game engine called Aves using javascript/html. [This video][1] describes some of the challenges he ran into during development. He talked a lot about how slow canvas was and that it isn't currently hw accelerated. &#xD;&#xA;&#xD;&#xA;You could also find a whole bunch of games developed using the Effect Games engine. Although the engine looks fairly sandboxed into his site with all tooling and assets existing there.&#xD;&#xA;&#xD;&#xA;IMO the greatest limitation of developing a js/html game is sound. The &lt;audio&gt; tag performs differently event wise across safari/firefox/chrome all of which must be latest version. Last I checked safari worked only with MP3 and firefox only works with OGG. Although its completely feasible to overcome this with a combo of serverside logic. &#xD;&#xA;&#xD;&#xA;I currently hobby in writing Flash games and can't see that domain being overcome by HTML5(js/css/html) until portals start accepting them or the web app stores go online. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=_RRnyChxijA" />
  <row Id="3385" PostHistoryTypeId="2" PostId="1855" RevisionGUID="4a64a88c-4f99-4f73-931d-f0cd8d8a4158" CreationDate="2010-07-29T18:12:18.110" UserId="187" Text="It's definitely possible to do, although not with your typical C++ code; you'll need to create a C-style library that you can dynamically link and reload at runtime. To make this possible, the library must contain **all** state within an opaque pointer which can be provided to the library upon reload.&#xD;&#xA;&#xD;&#xA;Timothy Farrar discusses his approach: (&lt;a href=&quot;http://www.farrarfocus.com/atom/090318.htm&quot;&gt;source&lt;/a&gt;)&#xD;&#xA;&gt; &quot;For development the code is compiled as a library, a small loader program makes a copy of the library, and loads the library copy to run the program. The program allocates all data at startup, and uses one single pointer to reference any data. I use nothing global except read only data. While the program is running the original library can be recompiled. Then in one key press, the program returns to the loader and returns that single data pointer. The loader makes a copy of the new library, loads the copy, and passes in the data pointer to the new code. Then the engine continues where it left off.&quot;" />
  <row Id="3386" PostHistoryTypeId="2" PostId="1856" RevisionGUID="f6be1bf6-75a1-47e7-821b-4862d936d9cd" CreationDate="2010-07-29T18:28:38.687" UserId="957" Text="http://www.opsound.org/&#xD;&#xA;&#xD;&#xA;Tons of free, creative commons music." />
  <row Id="3387" PostHistoryTypeId="2" PostId="1857" RevisionGUID="8ea67419-e6a2-44b8-8fec-13a2e2d9652b" CreationDate="2010-07-29T18:53:50.820" UserId="119" Text="XML is a good choice if you're not limited by size and it is supported natively (eg in .NET and Flash) but if you want a slim format you can create your own format and parser quite easy. I normally use 1 character eg. comma to seperate each object. To decode the string do a split on comma. Now each object needs different properties so seperate these with a different character eg semi colon, and use another character to seperate the property names from property vales, eg. Colon. All thus can be decoded easily without regex just by using string.split. Here is an example:&#xD;&#xA;&#xD;&#xA;id:1;x:5;y:45.2;angle:45,id:28;x:56;y:89;angle:12;health:78&#xD;&#xA;&#xD;&#xA;you can save even more space by keeping property names down to 1 character, eg h for health. Tile grids can be stored as just a string with each character representing a different type of tile eg:&#xD;&#xA;&#xD;&#xA;i789pog5h3kl&#xD;&#xA;&#xD;&#xA;where I might mean lava, 9 mean grass etc" />
  <row Id="3388" PostHistoryTypeId="2" PostId="1858" RevisionGUID="d722f0c4-ceda-4613-89fd-4d1800bf8413" CreationDate="2010-07-29T18:55:42.110" UserId="93" Text="As others have said, it's a hard problem, dynamically linking C++. But it is a solved problem - you might have heard of COM or one of the marketing names that have been applied to it over the years: ActiveX. &#xD;&#xA;&#xD;&#xA;COM has a bit of a bad name from a developer point of view because it can be a lot of effort to implement C++ components that expose their functionality using it (although this is made easier with ATL - the ActiveX template library). From a consumer point of view it has a bad name because applications that use it, for example to embed an Excel spreadsheet in a Word document or a Visio diagram in an Excel spreadsheet, tended to crash quite a bit back in the day. And that comes down to the same issues - even with all the guidance that Microsoft offers, COM/ActiveX/OLE was/is difficult to get right. &#xD;&#xA;&#xD;&#xA;I will emphasise that the technology of COM is not itself inherently bad. First of all, DirectX uses COM interfaces to expose it's functionality and that works well enough, as do a multitude of applications that embed Internet Explorer using it's ActiveX control. Secondly, it's one of the simplest ways to dynamically link C++ code - a COM interface is essentially just a pure virtual class. Athough it does have an IDL like CORBA, you're not forced to use it, especially if the interfaces you define are only used within your project.&#xD;&#xA;&#xD;&#xA;If you are not writing for Windows, don't think that COM is not worth considering. Mozilla re-implemented it in their codebase (used in the Firefox browser) because they needed a way to componentize their C++ code." />
  <row Id="3389" PostHistoryTypeId="5" PostId="1441" RevisionGUID="2e82537b-ee0f-4e3e-ba91-6b6abb18abfa" CreationDate="2010-07-29T18:57:06.117" UserId="930" Comment="added 2 characters in body" Text="One of my hobbies (aside programming, of course) is 3d modeling ([completely amateur][1], using 3ds MAX) and I'd like to mix programming with 3d modeling (what a marriage!). So I've read a little about it and figured I'd have to have good notions on geometry, math, point spacial position (which I do, from my 3d modeling experience), but I don't know how to use API's for it, so I've 'simulated' simple 3d with some simple programs I've made (first a [spinning cube][2], then a more complex [Labyrinth][3] (or maze, if you will)).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**NOTE:** I have no intentions on harming anyone's computers. If you don't trust it, use a VM or something.&#xD;&#xA;Once you run it, I'd appreciate if you commented here stating that the EXE's are safe. Thank you.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;Here are some questions:  &#xD;&#xA;**1)** What would be a nice 3d development tool for a .NET programmer like me?  &#xD;&#xA;**2)** Is there a way of using 3d models made in 3DS Max ? (I intend on modeling characters)  &#xD;&#xA;**3)** What knowledge should I have in order to render it, and move it around ?  &#xD;&#xA;**4)** Which API should I use ?  &#xD;&#xA;&#xD;&#xA;The development environment would be nice if it:  &#xD;&#xA;&#xD;&#xA; - Had the possibility to import existing 3D models exported by 3DS MAX (not a must, but a plus)  &#xD;&#xA; - Had the ability to create 3d models programmatically (a must)  &#xD;&#xA; - Possibly has a tool for materials and textures (that would be a huge plus)  &#xD;&#xA; - Is Well known (high availability of tutorials, questions in S.O., forums..)  &#xD;&#xA;&#xD;&#xA;And it would be really nice if I could use C# all the way :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;**EDIT**  &#xD;&#xA;For the ones that asked if I want to do something more UI-guided, just to mess around with some models, and not learn about how to create a game-engine, I say no, that's not the case.&#xD;&#xA;&#xD;&#xA;If you download my [Labyrinth][4] little game, you'll notice that I've basically MADE a simple renderer from scratch using DrawPolygon on bitmaps created via code. So that's a clue that what I want is to learn, and that I somehow like the idea of mixing images and codes together, along with some user interaction.&#xD;&#xA;&#xD;&#xA;Imagine that I have a model, say the [weighted companion cube][5], and I want to make a full-screen, or windowed lil' program that spins it (much like the crappy [spinning cube][2] I've made a while before the other one), setting the position, the position and angle of the camera, velocity, a simple ambient (say a simple monocolor box (which would be a room) drawn maybe through code (not an imported model)) and editing it with simple user interaction (say pressing left or right on the keyboard changes direction, or pressing '+' would make it faster), all that without using a wizard or something, but coding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now for those that didn't quite get my intentions in here, I hope this example makes it clearer of how powerful and customizable I hope it should be. If there are any more questions, let me know!&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;**EDIT**  &#xD;&#xA;I'm going to start with UNITY, and I've noticed there's a pro version, is the free version enough to do what I want ? (not counting on the 1 month free pro account)  &#xD;&#xA;As for XNA, does the same scenario apply as well ?  &#xD;&#xA;Please leave a comment!&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/3045472/images/3d/My3dJobs.htm&#xD;&#xA;  [2]: http://dl.dropbox.com/u/3045472/StackOverflow/SpinningCube.exe&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [4]: http://dl.dropbox.com/u/3045472/StackOverflow/labyrinth.exe&#xD;&#xA;  [5]: http://dev.hydelabs.com/images/companion-cube.png" />
  <row Id="3390" PostHistoryTypeId="5" PostId="1783" RevisionGUID="e8592d84-8d07-423e-bd03-87ffada95b82" CreationDate="2010-07-29T20:28:47.073" UserId="1156" Comment="added 4 characters in body; edited tags" Text="I was thinking about how to implement game states into my game. The main things I want for it are:&#xD;&#xA;&#xD;&#xA; - Semi-transparent top states-being able to see through a pause menu to the game behind&#xD;&#xA; &#xD;&#xA; - Something OO-I find this easier to use and understand the theory behind, as well as keeping orgranised and adding more to.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;I was planning on using a linked list, and treat it as a stack. This means I could access the state below for the semi-transparency.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Plan: Have the state stack be a linked list of pointers to IGameStates. The top state handles its own update and input commands, and then has a member isTransparent to decide whether the state underneath should be drawn.&#xD;&#xA;&lt;br&gt; Then I could do:&#xD;&#xA;&#xD;&#xA;    states.push_back(new MainMenuState());&#xD;&#xA;    states.push_back(new OptionsMenuState());&#xD;&#xA;    states.pop_front();&#xD;&#xA;To represent the player loading, then going to options, and then main menu.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Is this a good idea, or...? Should I look at something else?&#xD;&#xA;&#xD;&#xA;&lt;p&gt;&#xD;&#xA;Thanks." />
  <row Id="3391" PostHistoryTypeId="6" PostId="1783" RevisionGUID="e8592d84-8d07-423e-bd03-87ffada95b82" CreationDate="2010-07-29T20:28:47.073" UserId="1156" Comment="added 4 characters in body; edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;state&gt;" />
  <row Id="3392" PostHistoryTypeId="2" PostId="1859" RevisionGUID="5e21152f-40b5-4c80-b0da-6fe15449c13c" CreationDate="2010-07-29T20:45:55.677" UserId="875" Text="There is a number of ways to catch mouse or keyboard under Windows. So I tried some of them, but every of them has some advantages and drawbacks. I want to ask you: Which method do use?  &#xD;&#xA;&#xD;&#xA;I've tried these:  &#xD;&#xA;&#xD;&#xA;1. WM_KEYDOWN/WM_KEYUP - Main disadvantage is that, I can't distinguish between left and right-handed keys like ALT, CONTROL or SHIFT.  &#xD;&#xA;&#xD;&#xA;2. GetKeyboardState - This solves problem of first method, but there is new one. When I get taht the Right-ALT key is pressed, I also get that the Left-Control key is down. This behaviour happens only when using localized keyboard layout (Czech - CS).  &#xD;&#xA;&#xD;&#xA;3. WM_INPUT (Raw Input) - This method also doesn't distinguish left and right-handed keys (if I can remember) and for mouse movement sometimes generates message with zero delta values of mouse position." />
  <row Id="3393" PostHistoryTypeId="1" PostId="1859" RevisionGUID="5e21152f-40b5-4c80-b0da-6fe15449c13c" CreationDate="2010-07-29T20:45:55.677" UserId="875" Text="Handling keyboard and mouse input (Win API)" />
  <row Id="3394" PostHistoryTypeId="3" PostId="1859" RevisionGUID="5e21152f-40b5-4c80-b0da-6fe15449c13c" CreationDate="2010-07-29T20:45:55.677" UserId="875" Text="&lt;windows&gt;&lt;keyboard&gt;&lt;input&gt;" />
  <row Id="3395" PostHistoryTypeId="5" PostId="1859" RevisionGUID="fcae944c-360b-4f49-b142-19ffd260a716" CreationDate="2010-07-29T21:01:18.960" UserId="875" Comment="edited body" Text="There is a number of ways to catch mouse or keyboard under Windows. So I tried some of them, but every of them has some advantages and drawbacks. I want to ask you: Which method do use?  &#xD;&#xA;&#xD;&#xA;I've tried these:  &#xD;&#xA;&#xD;&#xA;1. WM_KEYDOWN/WM_KEYUP - Main disadvantage is that, I can't distinguish between left and right-handed keys like ALT, CONTROL or SHIFT.  &#xD;&#xA;&#xD;&#xA;2. GetKeyboardState - This solves problem of first method, but there is new one. When I get that the Right-ALT key is pressed, I also get that the Left-Control key is down. This behaviour happens only when using localized keyboard layout (Czech - CS).  &#xD;&#xA;&#xD;&#xA;3. WM_INPUT (Raw Input) - This method also doesn't distinguish left and right-handed keys (if I can remember) and for mouse movement sometimes generates message with zero delta values of mouse position." />
  <row Id="3396" PostHistoryTypeId="2" PostId="1860" RevisionGUID="3592aca4-0b5e-4de6-a0d1-ceffdf882b43" CreationDate="2010-07-29T21:33:28.700" UserId="1143" Text="You could try the [DirectInput API](http://msdn.microsoft.com/en-us/library/ee416842.aspx), or more recently, the [XInput API](http://msdn.microsoft.com/en-us/library/ee417014.aspx)." />
  <row Id="3397" PostHistoryTypeId="9" PostId="20" RevisionGUID="bd964b5d-60c6-409e-aaf6-4986bc25acbc" CreationDate="2010-07-29T21:49:10.200" UserId="35" Comment="Rollback to [580a61ca-fc43-4064-94d9-a372765460cb]" Text="&lt;assets&gt;&lt;graphics&gt;&lt;sprites&gt;&lt;textures&gt;" />
  <row Id="3398" PostHistoryTypeId="2" PostId="1861" RevisionGUID="55c8a657-2438-432e-a0b1-dad6a6cf5fff" CreationDate="2010-07-29T22:06:26.477" UserId="1204" Text="Firstly, this is **AI for PacMan and not the ghosts**.&#xD;&#xA;&#xD;&#xA;I am writing an Android live wallpaper which plays PacMan around your icons. While it supports user suggestions via screen touches, the majority of the game will be played by an AI. I am 99% done with all of the programming for the game but the AI for PacMan himself is still extremely weak. I'm looking for help in developing a good AI for determining PacMan's next direction of travel.&#xD;&#xA;&#xD;&#xA;My initial plan was this:&#xD;&#xA; &#xD;&#xA;1. Initialize a score counter for each direction with a value of zero.&#xD;&#xA;2. Start at the current position and use a BFS to traverse outward in the four possible initial directions by adding them to the queue.&#xD;&#xA;3. Pop an element off of the queue, ensure it hasn't been already &quot;seen&quot;, ensure it is a valid board position, and add to the corresponding initial directions score a value for the current cell based on:&#xD;&#xA;   1. Has a dot: plus 10&#xD;&#xA;   2. Has a power up: plus 50&#xD;&#xA;   3. Has a fruit: plus fruit value (varies by level)&#xD;&#xA;   4. Has a ghost that is frightened: plus 200&#xD;&#xA;   5. Has a ghost travelling toward PacMan: subtract 200&#xD;&#xA;   6. Has a ghost travelling away from PacMan: do nothing&#xD;&#xA;   7. Has a ghost travelling perpendicular: subtract 50&#xD;&#xA;   8. Multiply the cell's value times a pecentage based on the number of steps to the cell, the more steps from the initial direction, the closer the value of the cell gets to zero.&#xD;&#xA;   &#xD;&#xA;    and enqueue the three possible directions from the current cell.&#xD;&#xA;4. Once the queue is empty, find the highest score for each of the four possible initial directions and choose that.&#xD;&#xA;&#xD;&#xA;It sounded good to me on paper but the ghosts surround PacMan extremely rapidly and he twitches back and forth in the same two or three cells until one reaches him. Adjusting the values for the ghost presence doesn't help either. My nearest dot BFS can at least get to level 2 or 3 before the game ends.&#xD;&#xA;&#xD;&#xA;I'm looking for code, thoughts, and/or links to resources for developing a proper AI--preferably the former two. I'd like to release this on the Market sometime this weekend so I'm in a bit of a hurry. Any help is greatly appreciated.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;_FYI, this was originally posted on [StackOverflow](http://stackoverflow.com/questions/3366648/pacman-character-ai-suggestions-for-optimal-next-direction)_" />
  <row Id="3399" PostHistoryTypeId="1" PostId="1861" RevisionGUID="55c8a657-2438-432e-a0b1-dad6a6cf5fff" CreationDate="2010-07-29T22:06:26.477" UserId="1204" Text="PacMan character AI suggestions for optimal next direction" />
  <row Id="3400" PostHistoryTypeId="3" PostId="1861" RevisionGUID="55c8a657-2438-432e-a0b1-dad6a6cf5fff" CreationDate="2010-07-29T22:06:26.477" UserId="1204" Text="&lt;path-finding&gt;&lt;java&gt;&lt;ai&gt;&lt;a-star&gt;" />
  <row Id="3401" PostHistoryTypeId="2" PostId="1862" RevisionGUID="defc3efe-9c49-4b62-9c86-f78add9ae3a5" CreationDate="2010-07-29T22:20:34.453" UserId="458" Text="Is there a reason you can't combine them? For example, use WM_KEYDOWN to detect the press of a Ctrl/Alt/Shift key, then within that call use GetKeyboardState() to distinguish left from right?" />
  <row Id="3402" PostHistoryTypeId="2" PostId="1863" RevisionGUID="7de3a0e6-a76f-4425-ab96-971ec39cbd3d" CreationDate="2010-07-29T22:35:31.100" UserId="1163" Text="Definitly take a look at this video: http://www.youtube.com/watch?v=2XjzjAfGWzY&#xD;&#xA;&#xD;&#xA;You will probably want some sort of **hill-climbing** path-finding algorithm." />
  <row Id="3403" PostHistoryTypeId="2" PostId="1864" RevisionGUID="7c391a2c-95ef-434d-95a8-9ce88e9eae11" CreationDate="2010-07-29T22:38:20.910" UserId="1206" Text="Let's not forget that most commercial game engines is tied to and/or have a toolset squarely rooted on win32/consoles.&#xD;&#xA;This is also the reason why so many games still uses BSP for instance.&#xD;&#xA;Because they've made a huge investment, they are not going to take a huge risk for a smaller market.&#xD;&#xA;Might change in the future, but right now you have to invest a lot of effort to become cross platform.&#xD;&#xA;&#xD;&#xA;Since Steam just appeared on the Mac, which is really excellent news, I suspect it will only be a matter of time before it appears on Linux.&#xD;&#xA;A Mac is running a unix-like OS, so there shouldn't be too much trouble porting the games over.&#xD;&#xA;&#xD;&#xA;At least we can hope. :)" />
  <row Id="3404" PostHistoryTypeId="2" PostId="1865" RevisionGUID="1217bea1-7e83-4d12-8d31-a6e1f8599044" CreationDate="2010-07-29T22:47:17.513" UserId="561" Text="cocos2d which uses pyglet. I use these two Python libraries extensively for prototyping.&#xD;&#xA;&#xD;&#xA;Much easier to work with than pyglet.&#xD;&#xA;&#xD;&#xA;I'm surprised it hasn't been mentioned yet!" />
  <row Id="3405" PostHistoryTypeId="5" PostId="1865" RevisionGUID="f5532bff-9153-4b44-8b48-f0ab60b28589" CreationDate="2010-07-29T22:56:39.500" UserId="561" Comment="edited body" Text="cocos2d which uses pyglet. I use these two Python libraries extensively for prototyping.&#xD;&#xA;&#xD;&#xA;Much easier to work with than pygame.&#xD;&#xA;&#xD;&#xA;I'm surprised it hasn't been mentioned yet!" />
  <row Id="3406" PostHistoryTypeId="2" PostId="1866" RevisionGUID="a2ed9877-0bfb-498e-ac39-0f07baa3b547" CreationDate="2010-07-29T23:29:18.040" UserDisplayName="Sebastian" Text="http://www.jamendo.com" />
  <row Id="3407" PostHistoryTypeId="2" PostId="1867" RevisionGUID="e5244b14-af7c-40e8-8f4d-d1464b9df97a" CreationDate="2010-07-29T23:37:34.953" UserId="430" Text="WM_INPUT is nice.  I *think* you can distinguish left/right keys using the [RAWKEYBOARD struct][1].  The hard part may be figuring out how to deal with the key identifiers (i.e. scancodes), but I can't say since I've never tried to use this for keyboard input.  WM_KEYDOWN is so easy :)&#xD;&#xA;&#xD;&#xA;I have used WM_INPUT for mouse input, though.  It's very low-level.  It has no acceleration applied, which is very nice (IMO).  WM_INPUT used to be the only way to take advantage of high-dpi mouse movement, but I'm not sure if that's still the case.  See [this MSDN article from 2006][2].&#xD;&#xA;&#xD;&#xA;DirectInput for mouse/keyboard is explicitly discouraged by Microsoft.  See the previously linked MSDN article.  If you need a joystick, XInput is probably the way to go.&#xD;&#xA;&#xD;&#xA;EDIT: My info on this may be too dated.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ms645562%28v=VS.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee418864%28VS.85%29.aspx&#xD;&#xA;" />
  <row Id="3408" PostHistoryTypeId="2" PostId="1868" RevisionGUID="e084ed7c-6cef-4153-9346-6be685f5cf63" CreationDate="2010-07-29T23:52:55.863" UserId="1209" Text="Actually, tell apart L/R Ctrl/Alt when you catch WM_KEYDOWN/WM_KEYUP, you can. Easy, it is not, but the code that I use, here you can have, hmm hmm.&#xD;&#xA;&#xD;&#xA;Hope this still works, I do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Receives a WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN or WM_SYSKEYUP message and &#xD;&#xA;    // returns a virtual key of the key that triggered the message.&#xD;&#xA;    // &#xD;&#xA;    // If the key has a common virtual key code, that code is returned. &#xD;&#xA;    // For Alt's and Ctrl's, the values from the KeyCodes enumeration are used.&#xD;&#xA;    int translateKeyMessage (MSG&amp; Msg);&#xD;&#xA;    &#xD;&#xA;    // Virtual key codes for keys that aren't defined in the windows headers.&#xD;&#xA;    enum KeyCodes&#xD;&#xA;    {&#xD;&#xA;    	VK_LEFTCTRL = 162,&#xD;&#xA;    	VK_RIGHTCTRL = 163,&#xD;&#xA;    	VK_LEFTALT = 164,&#xD;&#xA;    	VK_RIGHTALT = 165&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // ======================================================================================&#xD;&#xA;    &#xD;&#xA;    int translateKeyMessage (MSG&amp; Msg)&#xD;&#xA;    {&#xD;&#xA;    	// Determine the virtual key code.&#xD;&#xA;    	int VirtualKeyCode = Msg.wParam;&#xD;&#xA;    &#xD;&#xA;    	// Determine whether the key is an extended key, e.g. a right &#xD;&#xA;    	// hand Alt or Ctrl.&#xD;&#xA;    	bool Extended = (Msg.lParam &amp; (1 &lt;&lt; 24)) != 0;&#xD;&#xA;    	&#xD;&#xA;    	// If this is a system message, is the Alt bit of the message on?&#xD;&#xA;    	bool AltBit = false;	&#xD;&#xA;    	if (Msg.message == WM_SYSKEYDOWN || Msg.message == WM_SYSKEYUP)&#xD;&#xA;    		AltBit = (Msg.lParam &amp; (1 &lt;&lt; 29)) != 0;&#xD;&#xA;    &#xD;&#xA;    	if ((Msg.message == WM_SYSKEYUP || Msg.message == WM_KEYUP) &amp;&amp; !Extended &amp;&amp; !AltBit &amp;&amp; VirtualKeyCode == 18)&#xD;&#xA;    	{&#xD;&#xA;    		// Left Alt&#xD;&#xA;    		return KeyCodes::VK_LEFTALT;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Left Ctrl&#xD;&#xA;    	if (!Extended &amp;&amp; !AltBit &amp;&amp; VirtualKeyCode == 17)&#xD;&#xA;    	{&#xD;&#xA;    		// Peek for the next message.&#xD;&#xA;    		MSG nextMsg;&#xD;&#xA;    		BOOL nextMessageFound = PeekMessage(&amp;nextMsg, NULL, 0, 0, PM_NOREMOVE);&#xD;&#xA;    &#xD;&#xA;    		// If the next message is for the right Alt:&#xD;&#xA;    		if (nextMessageFound &amp;&amp; nextMsg.message == Msg.message &amp;&amp; nextMsg.wParam == 18)&#xD;&#xA;    		{&#xD;&#xA;    			//&#xD;&#xA;    			bool nextExtended = (nextMsg.lParam &amp; (1 &lt;&lt; 24)) != 0;&#xD;&#xA;    &#xD;&#xA;    			//&#xD;&#xA;    			bool nextAltBit = false;	&#xD;&#xA;    			if (nextMsg.message == WM_SYSKEYDOWN || nextMsg.message == WM_SYSKEYUP)&#xD;&#xA;    				nextAltBit = (nextMsg.lParam &amp; (1 &lt;&lt; 29)) != 0;&#xD;&#xA;    &#xD;&#xA;    			// If it is really for the right Alt&#xD;&#xA;    			if (nextExtended &amp;&amp; !nextAltBit)&#xD;&#xA;    			{&#xD;&#xA;    				// Remove the next message&#xD;&#xA;    				PeekMessage(&amp;nextMsg, NULL, 0, 0, PM_REMOVE);&#xD;&#xA;    &#xD;&#xA;    				// Right Alt&#xD;&#xA;    				return KeyCodes::VK_RIGHTALT;&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		// Left Ctrl&#xD;&#xA;    		return KeyCodes::VK_LEFTCTRL;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	if (Msg.message == WM_SYSKEYUP &amp;&amp; !Extended &amp;&amp; AltBit &amp;&amp; VirtualKeyCode == 17)&#xD;&#xA;    	{&#xD;&#xA;    		// Peek for the next message.&#xD;&#xA;    		MSG nextMsg;&#xD;&#xA;    		BOOL nextMessageFound = PeekMessage(&amp;nextMsg, NULL, 0, 0, PM_NOREMOVE);&#xD;&#xA;    &#xD;&#xA;    		// If the next message is for the right Alt:&#xD;&#xA;    		if (nextMessageFound &amp;&amp; nextMsg.message == WM_KEYUP &amp;&amp; nextMsg.wParam == 18)&#xD;&#xA;    		{&#xD;&#xA;    			//&#xD;&#xA;    			bool nextExtended = (nextMsg.lParam &amp; (1 &lt;&lt; 24)) != 0;&#xD;&#xA;    &#xD;&#xA;    			//&#xD;&#xA;    			bool nextAltBit = false;	&#xD;&#xA;    			if (nextMsg.message == WM_SYSKEYDOWN || nextMsg.message == WM_SYSKEYUP)&#xD;&#xA;    				nextAltBit = (nextMsg.lParam &amp; (1 &lt;&lt; 29)) != 0;&#xD;&#xA;    &#xD;&#xA;    			// If it is really for the right Alt&#xD;&#xA;    			if (nextExtended &amp;&amp; !nextAltBit)&#xD;&#xA;    			{&#xD;&#xA;    				// Remove the next message&#xD;&#xA;    				PeekMessage(&amp;nextMsg, NULL, 0, 0, PM_REMOVE);&#xD;&#xA;    &#xD;&#xA;    				// Right Alt&#xD;&#xA;    				return KeyCodes::VK_RIGHTALT;&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Right Ctrl&#xD;&#xA;    	if (Extended &amp;&amp; !AltBit &amp;&amp; VirtualKeyCode == 17)&#xD;&#xA;    		return KeyCodes::VK_RIGHTCTRL;&#xD;&#xA;    &#xD;&#xA;    	// Left Alt&#xD;&#xA;    	if (!Extended &amp;&amp; AltBit &amp;&amp; VirtualKeyCode == 18)&#xD;&#xA;    		return KeyCodes::VK_LEFTALT;&#xD;&#xA;    		&#xD;&#xA;    	// Default&#xD;&#xA;    	return VirtualKeyCode;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="3409" PostHistoryTypeId="2" PostId="1869" RevisionGUID="ed4e1122-e265-408b-a0ff-a22a2f6612f1" CreationDate="2010-07-30T00:09:53.830" UserId="430" Text="I stick to:&#xD;&#xA;Private (implicit), then public.&#xD;&#xA;&#xD;&#xA;* Creators (constructors and static named constructors)&#xD;&#xA;* Destructor&#xD;&#xA;* Blank line&#xD;&#xA;* Non-const methods&#xD;&#xA;* Blank line&#xD;&#xA;* Const methods&#xD;&#xA;&#xD;&#xA;I'm a minimalist when it comes to formatting.  I also don't mess with vertical alignment or whatever.  If I need more than one public or private block, I refactor.  If my methods are too long (names or parameters), I refactor.  Etc.  Everything must be as small and easy to read as is practical, but no more. :)&#xD;&#xA;&#xD;&#xA;If there are enough methods on the class that I have to group them by functionality, as in:&#xD;&#xA;&#xD;&#xA;    ... &#xD;&#xA;    public:&#xD;&#xA;        // Here are the XXX methods.&#xD;&#xA;        ...&#xD;&#xA;        // Here are the YYY methods.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;then my class is probably doing too much.  I recommend reading the book [Clean Code][1] by Robert Martin.&#xD;&#xA;&#xD;&#xA; [1]:http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882&#xD;&#xA;&#xD;&#xA;EDIT: Accidental tab-space submit &gt;:(" />
  <row Id="3410" PostHistoryTypeId="12" PostId="1869" RevisionGUID="c838f9e2-8888-42d2-9583-674b89459e73" CreationDate="2010-07-30T00:10:05.983" UserId="430" Text="[{&quot;Id&quot;:430,&quot;DisplayName&quot;:&quot;BananaRaffle&quot;}]" />
  <row Id="3411" PostHistoryTypeId="13" PostId="1869" RevisionGUID="1cf232b1-996a-4f73-94e8-d9649eb28489" CreationDate="2010-07-30T00:10:15.813" UserId="430" Text="[{&quot;Id&quot;:430,&quot;DisplayName&quot;:&quot;BananaRaffle&quot;}]" />
  <row Id="3412" PostHistoryTypeId="6" PostId="1571" RevisionGUID="e4365c2b-8fa2-4b9b-b823-f07af53a1480" CreationDate="2010-07-30T01:02:30.447" UserId="262" Comment="edited tags; edited tags" Text="&lt;iphone&gt;&lt;ipad&gt;&lt;ogre&gt;" />
  <row Id="3413" PostHistoryTypeId="2" PostId="1870" RevisionGUID="cd8dc63e-ec56-4f47-931c-fef135ae41f4" CreationDate="2010-07-30T01:48:51.227" UserId="240" Text="Tandem's idea of hill-climbing algorithm is good.  Another is: some variation on A* to see how far you can go to see how you can get the highest score over the next N turns, where N is tuned to give the desire result.&#xD;&#xA;&#xD;&#xA;The scoring values you give can be thought of as &quot;cost to move&quot; -- you're basically on the right track, but you'll have to tweak the values until you get the result you want.&#xD;&#xA;&#xD;&#xA;In general (not PacMan specific) terms, you need to allocate appropriate values for&#xD;&#xA;&#xD;&#xA;* Wounded the to other guy.&#xD;&#xA;* Killed another guy.&#xD;&#xA;* Achieved some other goal (other than killing)&#xD;&#xA;* Got wounded.&#xD;&#xA;* Got killed.&#xD;&#xA;&#xD;&#xA;and then look for the move that will lead to the maximum score N turns in the future.  You may also want to avoid moves that lead to any score below X (say, the cost of dying) N turns into the future.&#xD;&#xA;&#xD;&#xA;Once you've scored all the possible moves, added bonuses for how well it might turn out in the future and deducted for how poorly it might turn out in the future, then you just sort the array and take the best move.&#xD;&#xA;&#xD;&#xA;Let us know how it turns out!&#xD;&#xA;" />
  <row Id="3414" PostHistoryTypeId="2" PostId="1871" RevisionGUID="3c9165ea-e1f7-433f-bbaf-1d7709b9a6f5" CreationDate="2010-07-30T02:40:56.310" UserId="660" Text="[SFML](http://www.sfml-dev.org/) is a nice modern, Object-Oriented, cross platform graphics engine.  It is hardware accelerated (based on OpenGL), and has bindings for&#xD;&#xA;&#xD;&#xA;    * C++&#xD;&#xA;    * C&#xD;&#xA;    * .Net (C#, VB.Net, C++/CLI, ...)&#xD;&#xA;    * Python&#xD;&#xA;    * D&#xD;&#xA;    * Ruby&#xD;&#xA;" />
  <row Id="3415" PostHistoryTypeId="2" PostId="1872" RevisionGUID="d8906db3-d19d-45f3-bff6-c8fcd373e4bd" CreationDate="2010-07-30T03:10:12.357" UserId="865" Text="Well, if it's for prototyping you don't really need a slick back-end with resource management and stuff like that. As long as you can load graphics and display them you're mostly set.&#xD;&#xA;I'm going against the grain and propose 'write your own'. You will lose zero time figuring out how to use someone's api. If write-your-own is really not an option, DirectX comes with a sample framework that provides most basic services. Not being bound by a framework means not losing any time following its rules, and not being limited by its scope.&#xD;&#xA;I've been prototyping as a job, and my fastest results were when I could just bash in code without having to worry about, or being hampered by, a framework. &#xD;&#xA;A 2D wrapper really needs no more than loading images and being able to display them at x,y - possibly with scale, rotation and if you want to be trippy, shader. The rest you can code as you need.&#xD;&#xA;For a prototype that is - the code won't be nice." />
  <row Id="3416" PostHistoryTypeId="2" PostId="1873" RevisionGUID="905bc581-5cec-4459-a7b3-b20aa7595784" CreationDate="2010-07-30T03:52:01.953" UserId="728" Text="The best and simplest way to do it is to use your first idea and handle the WM_KEYUP/WM_KEYDOWN messages as well as the WM_SYSKEYUP/WM_SYSKEYDOWN messages. These can handle detecting the difference between left and right shift/control/alt keys, you just need the appropriate [virtual key codes][1]. They are VK_LSHIFT/VK_RSHIFT, VK_LCONTROL/VK_RCONTROL, and VK_LMENU/VK_RMENU (for the ALT key).&#xD;&#xA;&#xD;&#xA;I [wrote up a post][2] about how I did this, and I was handling both the WM_KEYUP/WM_KEYDOWN and WM_SYSKEYUP/WM_SYSKEYDOWN in the same handler.&#xD;&#xA;&#xD;&#xA;The only complication that I can see is that because you're using a non-US keyboard you'll need to add in some additional logic to handle the sequence described in the [WM_SYSKEYUP article][3] on MSDN. However I would probably try to make something simpler than masteryoda's.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx&#xD;&#xA;  [2]: http://dominikgrabiec.com/2009/01/21/game-engine-input/&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ms646287%28VS.85%29.aspx" />
  <row Id="3417" PostHistoryTypeId="5" PostId="1603" RevisionGUID="9ec9c377-0906-43f7-96d8-584bc38f2ca0" CreationDate="2010-07-30T05:19:21.140" UserId="469" Comment="added 865 characters in body" Text="lots of people asked for a trailer for my game, because the screenshots do not make justice...&#xD;&#xA;&#xD;&#xA;But I don't know much about this, can someone point at some tools and tips? Like, what to put on the trailer, and specially: How to record my game, without a logo or slow FPS? (that means: no fraps)&#xD;&#xA;&#xD;&#xA;Bounty:&#xD;&#xA;&#xD;&#xA;As you noticed, I've set a bounty, and removed a correct response...&#xD;&#xA;I tested PlayClaw (it causes the game to crash), Fraps (stupid logo, only 30 seconds, BAAAD video quality OR I need to set it as lossless, that for some reason locks the game speed and actually breaks the gameplay, making it plays wonky), CamStudio (too slow, skipping frames, desynched audio), and some other minor stuff.&#xD;&#xA;&#xD;&#xA;My game is composed of vector graphics, lossy compression destroy the look of the game (instead of seeing lines, you see only black and some blurry stuff that look like... a blob, and nothing more), AND it is a fast paced arcade action game, created to run at 60 FPS.&#xD;&#xA;&#xD;&#xA;So, how I record gameplay without making my vectors look blurry and without making it too slow (a bit slow there are no problem... sometimes there are no way to achieve perfect speed)" />
  <row Id="3418" PostHistoryTypeId="2" PostId="1874" RevisionGUID="b08658cc-f85c-43d6-a1f2-28c63ac6814c" CreationDate="2010-07-30T05:38:38.347" UserId="395" Text="You might want to try [vnc2flv](http://www.unixuser.org/~euske/python/vnc2flv/index.html), but it won't do audio itself (you can add in an audio track later though). Not sure if your CPU will hate you trying to do realtime FLV encoding alongside a running game though." />
  <row Id="3422" PostHistoryTypeId="2" PostId="1875" RevisionGUID="1c1603ee-92d7-4745-a49f-37d75483bd62" CreationDate="2010-07-30T06:23:01.740" UserId="919" Text="If you have two PCs use skype's screen sharing feature. Play the game in one PC then use the other to capture the video. This way you won't affect your game and resources won't be scarce for the video capture program. &#xD;&#xA;&#xD;&#xA;Conversely you can buy a video capture card for your PC. " />
  <row Id="3423" PostHistoryTypeId="2" PostId="1876" RevisionGUID="c68fb889-726c-4985-972a-5c356a1b719e" CreationDate="2010-07-30T06:36:18.873" UserId="865" Text="To add to the pythagorean gem above...&lt;br&gt; I always tell people that for 3d programming they need only know: &lt;br&gt;&#xD;&#xA;- a^2 + b^2 = c^2 &lt;br&gt;&#xD;&#xA;- soscastoa (sin = opposing side / sloped side, cos = attached side / sloped side, tan = opposed side / attached side)&lt;br&gt; &#xD;&#xA;- a . b = |a| * |b| * cos alpha&lt;br&gt; &#xD;&#xA;- a * b = |a| * |b| * sin alpha * unit vector&lt;br&gt;&#xD;&#xA;It can solve pretty much any 3d (or 2d) problem you encounter in game development - 4 rules.&lt;br&gt; Sure, there are nicer ways, but this can solve em all - I should know, I'm a hack that based a career on em." />
  <row Id="3424" PostHistoryTypeId="16" PostId="1876" RevisionGUID="c68fb889-726c-4985-972a-5c356a1b719e" CreationDate="2010-07-30T06:36:18.873" UserId="-1" />
  <row Id="3425" PostHistoryTypeId="2" PostId="1877" RevisionGUID="854ed33d-e801-4412-81f1-08a81c17f336" CreationDate="2010-07-30T06:36:48.793" UserId="919" Text="Aside from 3d ripper DX does anyone know any other 3d asset tools to help 3d artist in learning modelling and/or animations." />
  <row Id="3426" PostHistoryTypeId="1" PostId="1877" RevisionGUID="854ed33d-e801-4412-81f1-08a81c17f336" CreationDate="2010-07-30T06:36:48.793" UserId="919" Text="On 3d ripper DX  and other 3d asset tools that can help boost 3d artists learning" />
  <row Id="3427" PostHistoryTypeId="3" PostId="1877" RevisionGUID="854ed33d-e801-4412-81f1-08a81c17f336" CreationDate="2010-07-30T06:36:48.793" UserId="919" Text="&lt;assets&gt;&lt;3d&gt;&lt;tools&gt;&lt;learning&gt;" />
  <row Id="3428" PostHistoryTypeId="2" PostId="1878" RevisionGUID="5d7ccd8e-9eb9-41ed-bc8a-9b0ec402c348" CreationDate="2010-07-30T06:42:25.193" UserId="865" Text="Not sure how you can learn modeling from it, but if you mean tools to examine other people's models:&lt;br&gt;&#xD;&#xA;- GLIntercept&lt;br&gt; &#xD;&#xA;- MultiEx Commander&lt;br&gt;&#xD;&#xA;- Any gamethat supports mods, and the mods of course&lt;br&gt;&#xD;&#xA;- Milkshape 3d and any site that has models for it. &lt;br&gt;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3429" PostHistoryTypeId="2" PostId="1879" RevisionGUID="c9b47291-4aa2-48cc-a33c-68416cd858b4" CreationDate="2010-07-30T07:00:49.633" UserId="20" Text="You already accepted an answer, which is fine. I'm just going to add the way you would do this in an ActionScript only Project (which is preferable for games IMHO, since it doesn't add the bloat of the flex classes).&#xD;&#xA;&#xD;&#xA;    package &#xD;&#xA;    {&#xD;&#xA;        // Use the &quot;Frame&quot; metatag to add a preloader class at the first frame&#xD;&#xA;        // of your compiled SWF. You have to enter the fully qualified class&#xD;&#xA;        // name here, if your Preloader is located in a package other than the&#xD;&#xA;        // default package.&#xD;&#xA;        [Frame(factoryClass=&quot;Preloader&quot;)]&#xD;&#xA;        public class Game extends Sprite&#xD;&#xA;        {&#xD;&#xA;            public function Game(){&#xD;&#xA;                // game init...&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your preloader should extend *MovieClip*. Something along these lines:&#xD;&#xA;&#xD;&#xA;    public class Preloader extends MovieClip&#xD;&#xA;    {&#xD;&#xA;        // Class name of your Game as String. Same rules as with the Preloader, if &#xD;&#xA;        // the Game is in a package, use fully qualified classname (eg. your.cool.Game).&#xD;&#xA;        // You can't include the class directly, otherwise the preloader would&#xD;&#xA;        // already include the full game.&#xD;&#xA;        protected static const app:String = &quot;Game&quot;;&#xD;&#xA;        &#xD;&#xA;        public function Preloader(){&#xD;&#xA;            this.addEventListener(Event.ENTER_FRAME, onEnterFrame);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private function onEnterFrame(event:Event):void {&#xD;&#xA;            // do something meaningful here, eg. update loading bar using&#xD;&#xA;            // bytesLoaded and bytesTotal...&#xD;&#xA;            if(framesLoaded == totalFrames){&#xD;&#xA;                loadComplete();&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private function loadComplete():void {&#xD;&#xA;            this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);&#xD;&#xA;            // get the class definition of the game&#xD;&#xA;            var clazz:Class = getDefinitionByName(app) as Class;&#xD;&#xA;            if(clazz){&#xD;&#xA;                // create an instance of it and attach it&#xD;&#xA;                var app:DisplayObject = new clazz;&#xD;&#xA;                addChild(app);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="3430" PostHistoryTypeId="5" PostId="1865" RevisionGUID="7b11b145-e449-4105-9797-409e85fa011a" CreationDate="2010-07-30T07:18:26.290" UserId="561" Comment="added 77 characters in body" Text="[cocos2d][1] which uses [pyglet][2]. I use these two Python libraries extensively for prototyping.&#xD;&#xA;&#xD;&#xA;Much easier to work with than pygame.&#xD;&#xA;&#xD;&#xA;I'm surprised it hasn't been mentioned yet!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d.org/&#xD;&#xA;  [2]: http://www.pyglet.org/" />
  <row Id="3431" PostHistoryTypeId="16" PostId="1877" RevisionGUID="419e9eff-e073-4794-83e6-32aed1418cda" CreationDate="2010-07-30T07:37:05.683" UserId="919" />
  <row Id="3432" PostHistoryTypeId="2" PostId="1880" RevisionGUID="97afbdbe-d15e-4fa7-bb3a-245756e223c0" CreationDate="2010-07-30T07:54:30.417" UserId="919" Text="Personally I use. &#xD;&#xA;&#xD;&#xA;C/(A x B)&#xD;&#xA;&#xD;&#xA;Where:&#xD;&#xA;A= Time for an encounter/kill (average easy, normal and hard enemies)&#xD;&#xA;B= Exp per kill. (average easy, normal and hard enemies)&#xD;&#xA;C= Time spent for the player to level up. &#xD;&#xA;&#xD;&#xA;Note: All these are relative to pace and point in the game.&#xD;&#xA;&#xD;&#xA;I think it may be very simplistic but note that you also set the other elements. By using a simple equation you can easily adapt to changes midway.&#xD;&#xA;" />
  <row Id="3433" PostHistoryTypeId="2" PostId="1881" RevisionGUID="50ff39a6-7887-4e2f-aea2-8b235c41b364" CreationDate="2010-07-30T09:42:22.180" UserId="1147" Text="My best experience is with [Fraps][1] but I used the full version (it seemed like a small one-time prize to pay for a great utility) which has no limits or logo. You can set the framerate beforehand, as David Young suggested in his comment. Like many video capturing tools, Fraps uses a low-cost compression during while it's recording which then can be converted to a higher compression format of your choice. For this i usually use VirtualDub.&#xD;&#xA;&#xD;&#xA;I had no problem running Fraps behind my game at full speed (50fps in my case) getting high quality captures.&#xD;&#xA;&#xD;&#xA;The key issue here is that capturing requires some performance, and you should always try to to it on the best computer available. More specifically, the capturing tool makes substantial and continual disk writes so choosing to store the file on a fast hard drive is key. Laptops often come with slower-access hard drives so this may affect performance a lot. Using a smaller frame size during the capture gives the hard drive an easier time and could keep your framerate up. Fraps allows you to set half-size frames.&#xD;&#xA;&#xD;&#xA;In the case of Fraps, the quality of the final movie is greatly affected by what compression you use when converting the FPS1-encoded capture AVI to a distributable format. If you don't consider lossiness here it will of course not matter how well the capture tool performed.&#xD;&#xA;&#xD;&#xA;I seriously don't think that the programs you mention are generally that bad, but need some configuring before they perform optimally together with you specific game.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fraps.com/" />
  <row Id="3434" PostHistoryTypeId="2" PostId="1882" RevisionGUID="6def17eb-77c3-40c3-9f1a-fd26e2891625" CreationDate="2010-07-30T10:19:34.470" UserId="120" Text="I have quite a few debug drawing methods in my engine that can generate geometry useful for debugging, like spheres and cubes. &#xD;&#xA;&#xD;&#xA;At the moment I do not generate any normals for these shapes. Is there a general purpose method of generating face normals and per vertex normals for an arbitrary mesh?(id imagine you would need face normals to generate per vertex normals?)" />
  <row Id="3435" PostHistoryTypeId="1" PostId="1882" RevisionGUID="6def17eb-77c3-40c3-9f1a-fd26e2891625" CreationDate="2010-07-30T10:19:34.470" UserId="120" Text="How do i generate surface normals?" />
  <row Id="3436" PostHistoryTypeId="3" PostId="1882" RevisionGUID="6def17eb-77c3-40c3-9f1a-fd26e2891625" CreationDate="2010-07-30T10:19:34.470" UserId="120" Text="&lt;graphics&gt;&lt;programming&gt;&lt;generated&gt;&lt;normals&gt;" />
  <row Id="3437" PostHistoryTypeId="2" PostId="1883" RevisionGUID="c8210222-812c-49b8-a7a2-413a5e1e34fb" CreationDate="2010-07-30T10:43:36.160" UserId="1143" Text="To generate face normals, use the vector cross product of two edges each triangle and then normalise the result. Make sure you get the directions right, otherwise some normals will point in and some out.&#xD;&#xA;&#xD;&#xA;Vertex normals would then be an interpolation of all the face normals the vertex is attached to." />
  <row Id="3438" PostHistoryTypeId="2" PostId="1884" RevisionGUID="f1d536a2-ba0e-47b8-b615-e90cabaa7b98" CreationDate="2010-07-30T10:49:57.340" UserId="769" Text="I'm going to write a server for an online multiplayer with these requirements:&#xD;&#xA;&#xD;&#xA;- Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)&#xD;&#xA;- Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)&#xD;&#xA;- Can support as many players at once as possible&#xD;&#xA;- Chat between players&#xD;&#xA;- Connection to a Flash/AIR client&#xD;&#xA;- Must be able to communicate with other servers (for player accounts and such)&#xD;&#xA;&#xD;&#xA;Now, I'm considering two options:&#xD;&#xA;&#xD;&#xA;- Smartfox&#xD;&#xA;- A custom Java solution in something like Tomcat&#xD;&#xA;&#xD;&#xA;Why Smartfox?&#xD;&#xA;&#xD;&#xA;- It handles multiple rooms and chat natively&#xD;&#xA;- It presumably has solutions for well-known multiplayer gaming issues&#xD;&#xA;&#xD;&#xA;Why custom?&#xD;&#xA;&#xD;&#xA;- Smartfox has many unneeded functions, bad for performance&#xD;&#xA;- Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism&#xD;&#xA;- Multiple rooms and chat are easy to reimplement&#xD;&#xA;- Tomcat or a lightweight container is easier to deploy than Smartfox&#xD;&#xA;&#xD;&#xA;What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?" />
  <row Id="3439" PostHistoryTypeId="1" PostId="1884" RevisionGUID="f1d536a2-ba0e-47b8-b615-e90cabaa7b98" CreationDate="2010-07-30T10:49:57.340" UserId="769" Text="Which server platform to choose" />
  <row Id="3440" PostHistoryTypeId="3" PostId="1884" RevisionGUID="f1d536a2-ba0e-47b8-b615-e90cabaa7b98" CreationDate="2010-07-30T10:49:57.340" UserId="769" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;server&gt;&lt;java&gt;" />
  <row Id="3441" PostHistoryTypeId="2" PostId="1885" RevisionGUID="d6e79159-c4da-432b-aedf-08d7eb1e1a0e" CreationDate="2010-07-30T10:56:18.283" UserId="288" Text="Say I have a moving circular `target` defined as:&#xD;&#xA;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    Vector2 velocity;&#xD;&#xA;    float radius&#xD;&#xA;&#xD;&#xA;And a rotating `turret` (mounted on a moving vehicle of some kind) defined as:&#xD;&#xA;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    Vector2 velocity;&#xD;&#xA;    float angle; // radians&#xD;&#xA;    float angularVelocity; // radians per second&#xD;&#xA;    const float maxAngularVelocity; // radians per second&#xD;&#xA;    const float angularAcceleration; // radians per second per second&#xD;&#xA;&#xD;&#xA;(Or something along those lines. Note that position and velocity of both are controlled elsewhere - assume velocity is constant and position changes based on velocity.)&#xD;&#xA;&#xD;&#xA;I am trying to write two related AI functions to determine, on a given frame:&#xD;&#xA;&#xD;&#xA; - What acceleration (and in which direction) to apply to the turret's angle to keep the turret pointing at the target?&#xD;&#xA;&#xD;&#xA; - If the target is currently in sight, can it be kept in sight for `x` seconds, where `x` is a fraction of a second? (Alternatly: is there another strategy to ensure the target is actually &quot;locked on&quot; and not simply flying across the sights?)&#xD;&#xA;&#xD;&#xA;And I could use some help..." />
  <row Id="3442" PostHistoryTypeId="1" PostId="1885" RevisionGUID="d6e79159-c4da-432b-aedf-08d7eb1e1a0e" CreationDate="2010-07-30T10:56:18.283" UserId="288" Text="Target Tracking: When to accelerate and decelerate a rotating turret?" />
  <row Id="3443" PostHistoryTypeId="3" PostId="1885" RevisionGUID="d6e79159-c4da-432b-aedf-08d7eb1e1a0e" CreationDate="2010-07-30T10:56:18.283" UserId="288" Text="&lt;ai&gt;&lt;aiming&gt;" />
  <row Id="3444" PostHistoryTypeId="2" PostId="1886" RevisionGUID="2971fc15-4ad4-4de6-89e3-3b5077358985" CreationDate="2010-07-30T10:56:51.900" UserId="1216" Text="I am Indie Game developer and  I am looking for a tile based 2d level editor. I also would like to know the free ones as well as paid ones, which you feel as the best." />
  <row Id="3445" PostHistoryTypeId="1" PostId="1886" RevisionGUID="2971fc15-4ad4-4de6-89e3-3b5077358985" CreationDate="2010-07-30T10:56:51.900" UserId="1216" Text="tile based 2d level editor." />
  <row Id="3446" PostHistoryTypeId="3" PostId="1886" RevisionGUID="2971fc15-4ad4-4de6-89e3-3b5077358985" CreationDate="2010-07-30T10:56:51.900" UserId="1216" Text="&lt;tools&gt;" />
  <row Id="3447" PostHistoryTypeId="5" PostId="1885" RevisionGUID="9c205a75-64b1-4387-9bd0-8ca2cb544ab0" CreationDate="2010-07-30T11:01:52.780" UserId="288" Comment="added 1 characters in body; added 11 characters in body" Text="Say I have a moving circular `target` defined as:&#xD;&#xA;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    Vector2 velocity;&#xD;&#xA;    float radius;&#xD;&#xA;&#xD;&#xA;And a rotating `turret` (mounted on a moving vehicle of some kind) defined as:&#xD;&#xA;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    Vector2 velocity;&#xD;&#xA;    float angle; // radians&#xD;&#xA;    float angularVelocity; // radians per second&#xD;&#xA;    const float maxAngularVelocity; // radians per second&#xD;&#xA;    const float maxAngularAcceleration; // radians per second per second&#xD;&#xA;&#xD;&#xA;(Or something along those lines. Note that position and velocity of both are controlled elsewhere - assume velocity is constant and position changes based on velocity.)&#xD;&#xA;&#xD;&#xA;I am trying to write two related AI functions to determine, on a given frame:&#xD;&#xA;&#xD;&#xA; - What angular acceleration (and in which direction) to apply to the turret's angle to keep the turret pointing at the target?&#xD;&#xA;&#xD;&#xA; - If the target is currently in sight, can it be kept in sight for `x` seconds, where `x` is a fraction of a second? (Alternatly: is there another strategy to ensure the target is actually &quot;locked on&quot; and not simply flying across the sights?)&#xD;&#xA;&#xD;&#xA;And I could use some help..." />
  <row Id="3448" PostHistoryTypeId="2" PostId="1887" RevisionGUID="2eb4f9d8-4734-44e0-bd69-0afe072a5e46" CreationDate="2010-07-30T11:03:10.470" UserId="1199" Text="http://www.mapeditor.org/ - everything you'll ever need! :)&#xD;&#xA;&#xD;&#xA;Quoted from the site's list of features:&#xD;&#xA;&#xD;&#xA;&lt;ul&gt; &#xD;&#xA;&lt;li&gt;&lt;b&gt;General purpose&lt;/b&gt; tile map editor with XML-based map format&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Supports &lt;b&gt;orthogonal&lt;/b&gt; and &lt;b&gt;isometric&lt;/b&gt; maps&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Custom objects can be placed with pixel precision&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Full &lt;b&gt;undo/redo&lt;/b&gt; and &lt;b&gt;copy/paste&lt;/b&gt; support&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Add custom properties to tiles, layers, objects or the map&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Automatically reloads tilesets when changed externally&lt;/li&gt; &#xD;&#xA;&lt;li&gt;&lt;b&gt;Resize&lt;/b&gt; or &lt;b&gt;offset&lt;/b&gt; your tile map later as needed&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Efficient tile editing tools like &lt;b&gt;stamp&lt;/b&gt; and &lt;b&gt;fill&lt;/b&gt; brushes&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Supports &lt;b&gt;input/output plugins&lt;/b&gt; to open and save files in custom formats&lt;/li&gt; &#xD;&#xA;&lt;/ul&gt; " />
  <row Id="3449" PostHistoryTypeId="5" PostId="1884" RevisionGUID="63eaeeee-5d2d-4759-8631-bf1324fd8f61" CreationDate="2010-07-30T11:17:25.237" UserId="769" Comment="added 92 characters in body" Text="I'm going to write a server for an online multiplayer with these requirements:&#xD;&#xA;&#xD;&#xA;- Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)&#xD;&#xA;- Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)&#xD;&#xA;- Can support as many players at once as possible&#xD;&#xA;- Chat between players&#xD;&#xA;- Connection to a Flash/AIR client&#xD;&#xA;- Must be able to communicate with other servers (for player accounts and such)&#xD;&#xA;&#xD;&#xA;Now, I'm considering two options:&#xD;&#xA;&#xD;&#xA;- Smartfox&#xD;&#xA;- A custom Java solution in something like Tomcat&#xD;&#xA;&#xD;&#xA;Why Smartfox?&#xD;&#xA;&#xD;&#xA;- It handles multiple rooms and chat natively&#xD;&#xA;- It presumably has solutions for well-known multiplayer gaming issues&#xD;&#xA;&#xD;&#xA;Why custom?&#xD;&#xA;&#xD;&#xA;- Smartfox has many unneeded functions, bad for performance&#xD;&#xA;- Smartfox communicates with an XML-based format, I could use a more efficient binary one.&#xD;&#xA;- Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism&#xD;&#xA;- Multiple rooms and chat are easy to reimplement&#xD;&#xA;- Tomcat or a lightweight container is easier to deploy than Smartfox&#xD;&#xA;&#xD;&#xA;What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?" />
  <row Id="3450" PostHistoryTypeId="2" PostId="1888" RevisionGUID="5cf810a1-8086-4549-99f7-85846267b664" CreationDate="2010-07-30T11:22:45.273" UserId="465" Text="I would strongly recommend looking at the [Google App Engine][1] project. &#xD;&#xA;&#xD;&#xA;Both for hosting and technical reasons. If your game is not fast paced then that should be a good place to get started and up and running, and have the scope to scale.&#xD;&#xA;&#xD;&#xA;Code can be in Python or Java.&#xD;&#xA;&#xD;&#xA;[Neptune's Pride][2] is on Google App Engine. See an [interview with the Developer here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Google_App_Engine&#xD;&#xA;  [2]: http://np.ironhelmet.com/&#xD;&#xA;  [3]: http://googleappengine.blogspot.com/2010/04/games-on-app-engine-interview-with-jay.html" />
  <row Id="3451" PostHistoryTypeId="2" PostId="1889" RevisionGUID="c20106a9-3fb0-4033-839d-2ea385c21eb5" CreationDate="2010-07-30T11:34:34.850" UserId="678" Text="What you have here is a basic [control problem][1]. The turret is the system, the acceleration is the control and the sensor measures position/velocity. There are many ways of tackling these problems, as it's a very well-studied problem in engineering.&#xD;&#xA;&#xD;&#xA;Key is ending up with a stable system, i.e. a system that does not generate oscillations. This is usually done by adding damping. The wikipedia page should get you started.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Control_theory" />
  <row Id="3452" PostHistoryTypeId="5" PostId="1887" RevisionGUID="1c7ca366-ecc4-4d63-be28-5b33924ea2eb" CreationDate="2010-07-30T11:39:20.660" UserId="1199" Comment="added 32 characters in body; deleted 4 characters in body" Text="http://www.mapeditor.org/ - everything you'll ever need! :) It's free &amp; cross-platform!&#xD;&#xA;&#xD;&#xA;Quoted from the site's list of features:&#xD;&#xA;&#xD;&#xA;&lt;ul&gt; &#xD;&#xA;&lt;li&gt;&lt;b&gt;General purpose&lt;/b&gt; tile map editor with XML-based map format&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Supports &lt;b&gt;orthogonal&lt;/b&gt; and &lt;b&gt;isometric&lt;/b&gt; maps&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Custom objects can be placed with pixel precision&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Full &lt;b&gt;undo/redo&lt;/b&gt; and &lt;b&gt;copy/paste&lt;/b&gt; support&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Add custom properties to tiles, layers, objects or the map&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Automatically reloads tilesets when changed externally&lt;/li&gt; &#xD;&#xA;&lt;li&gt;&lt;b&gt;Resize&lt;/b&gt; or &lt;b&gt;offset&lt;/b&gt; your tile map later as needed&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Efficient tile editing tools like &lt;b&gt;stamp&lt;/b&gt; and &lt;b&gt;fill&lt;/b&gt; brushes&lt;/li&gt; &#xD;&#xA;&lt;li&gt;Supports &lt;b&gt;input/output plugins&lt;/b&gt; to open and save files in custom formats&lt;/li&gt; &#xD;&#xA;&lt;/ul&gt; " />
  <row Id="3453" PostHistoryTypeId="2" PostId="1890" RevisionGUID="22da8115-79c8-44af-a560-47e9985a9418" CreationDate="2010-07-30T11:46:13.160" UserId="1143" Text="First off, calculate the vector from turret to target. Then compare this with the turret's current vector. Then use the difference between the two to work out the angular acceleration and angular velocity required to get the turret to turn to point in the right direction within a given time.&#xD;&#xA;&#xD;&#xA;OK, that seemed simple. However, you should really try to anticipate the target's position since the target is going to move by the time you've turned the turret. To do this:-&#xD;&#xA;&#xD;&#xA;    Pd' = Pd + t.Vd&#xD;&#xA;    Ps' = Ps + t.Vs&#xD;&#xA;&#xD;&#xA;where P is position and V is velocity and the subscript is d for destination (target) and s for source (turret), which gives a direction vector:-&#xD;&#xA;&#xD;&#xA;    Dsd' = Pd' - Ps' = Pd + t.Vd - (Ps + t.Vs) = Pd - Ps + (Vd - Vs).t&#xD;&#xA;&#xD;&#xA;where D is a direction vector and Dsd' is the required direction at time t. Now, work out the direction of the turret based on current position and maximum velocity and acceleration for a given time t:-&#xD;&#xA;&#xD;&#xA;    Ds' = t.Ds.Rs -&gt; this is a vector rotation&#xD;&#xA;&#xD;&#xA;Ds and Ds' are the source directions and Rs is the rotational velocity. With all that, you want to find t for when Dsd' == Ds' and thus Rs, the required rotational velocity. Don't forget that all the P's, D's and V's have x and y components.&#xD;&#xA;&#xD;&#xA;I haven't taken acceleration into account here - that adds a lot more to the complexity. Once you've got Rs and t you could probably approximate a parabolic Rs (i.e. accelerate and decelerate) to get the same result." />
  <row Id="3456" PostHistoryTypeId="5" PostId="1884" RevisionGUID="2108b1d3-728f-4c92-a430-93f3ad02a9ef" CreationDate="2010-07-30T12:11:13.157" UserId="769" Comment="added 29 characters in body" Text="I'm going to write a server for an online multiplayer with these requirements:&#xD;&#xA;&#xD;&#xA;- Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)&#xD;&#xA;- Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)&#xD;&#xA;- Can support as many players at once as possible; Might need multiple servers&#xD;&#xA;- Chat between players&#xD;&#xA;- Connection to a Flash/AIR client&#xD;&#xA;- Must be able to communicate with other servers (for player accounts and such)&#xD;&#xA;&#xD;&#xA;Now, I'm considering two options:&#xD;&#xA;&#xD;&#xA;- Smartfox&#xD;&#xA;- A custom Java solution in something like Tomcat&#xD;&#xA;&#xD;&#xA;Why Smartfox?&#xD;&#xA;&#xD;&#xA;- It handles multiple rooms and chat natively&#xD;&#xA;- It presumably has solutions for well-known multiplayer gaming issues&#xD;&#xA;&#xD;&#xA;Why custom?&#xD;&#xA;&#xD;&#xA;- Smartfox has many unneeded functions, bad for performance&#xD;&#xA;- Smartfox communicates with an XML-based format, I could use a more efficient binary one.&#xD;&#xA;- Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism&#xD;&#xA;- Multiple rooms and chat are easy to reimplement&#xD;&#xA;- Tomcat or a lightweight container is easier to deploy than Smartfox&#xD;&#xA;&#xD;&#xA;What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?" />
  <row Id="3457" PostHistoryTypeId="5" PostId="1884" RevisionGUID="3fbe3d21-8a60-477b-bf09-6fe87e6b33fb" CreationDate="2010-07-30T12:46:08.610" UserId="769" Comment="added 7 characters in body" Text="I'm going to write a server for an online multiplayer with these requirements:&#xD;&#xA;&#xD;&#xA;- Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)&#xD;&#xA;- Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)&#xD;&#xA;- Can support as many players at once as possible; Might need multiple servers&#xD;&#xA;- Chat between players&#xD;&#xA;- Socket connection to a Flash/AIR client&#xD;&#xA;- Must be able to communicate with other servers (for player accounts and such)&#xD;&#xA;&#xD;&#xA;Now, I'm considering two options:&#xD;&#xA;&#xD;&#xA;- Smartfox&#xD;&#xA;- A custom Java solution in something like Tomcat&#xD;&#xA;&#xD;&#xA;Why Smartfox?&#xD;&#xA;&#xD;&#xA;- It handles multiple rooms and chat natively&#xD;&#xA;- It presumably has solutions for well-known multiplayer gaming issues&#xD;&#xA;&#xD;&#xA;Why custom?&#xD;&#xA;&#xD;&#xA;- Smartfox has many unneeded functions, bad for performance&#xD;&#xA;- Smartfox communicates with an XML-based format, I could use a more efficient binary one.&#xD;&#xA;- Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism&#xD;&#xA;- Multiple rooms and chat are easy to reimplement&#xD;&#xA;- Tomcat or a lightweight container is easier to deploy than Smartfox&#xD;&#xA;&#xD;&#xA;What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?" />
  <row Id="3458" PostHistoryTypeId="2" PostId="1892" RevisionGUID="26e8caf0-db96-40cd-b8e7-bb9d4168125b" CreationDate="2010-07-30T12:48:51.523" UserId="1217" Text="I and a couple of friends are doing a game on our spare time and we've finished about 80% of the game.. so all the obvious stuff and core mechanincs. We've done a couple of games before and we always have problems finishing. &#xD;&#xA;&#xD;&#xA;The problem isn't that we're not passionate enough about the game, it's rather that no one of us sees those last details that need to be added, we've become blind somehow with the game. It's really frustrating. It can be stuff like.. &quot;maybe we should have a pause function?&quot; &quot;Uhh, yeah, of course, why didn't we think of that earlier?&quot; &#xD;&#xA;&#xD;&#xA;Sometimes even though it takes a long time to realise the need, afterwards it's really obvious that it needed to be done/added.&#xD;&#xA;&#xD;&#xA;Do you use any kind of checklist to force a finish or do you rely on your keen senses to know when it's done?&#xD;&#xA;&#xD;&#xA;A checklist would be nice to have when estimating project time as well.." />
  <row Id="3459" PostHistoryTypeId="1" PostId="1892" RevisionGUID="26e8caf0-db96-40cd-b8e7-bb9d4168125b" CreationDate="2010-07-30T12:48:51.523" UserId="1217" Text="Checklist for finished game? " />
  <row Id="3460" PostHistoryTypeId="3" PostId="1892" RevisionGUID="26e8caf0-db96-40cd-b8e7-bb9d4168125b" CreationDate="2010-07-30T12:48:51.523" UserId="1217" Text="&lt;subjective&gt;&lt;planning&gt;" />
  <row Id="3461" PostHistoryTypeId="2" PostId="1893" RevisionGUID="373c35eb-261f-499c-bb92-88371cabfbf2" CreationDate="2010-07-30T13:10:58.383" UserId="1221" Text="Get Testers. (Though this might not be a direct answer to the question) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Really, asking for a checklist is imo too game/genre specific as it could be answered in such a generic way. However, I do recommend getting as many testers as possible and as much feedback as possible.&#xD;&#xA;&#xD;&#xA;It is actually completely normal (imo) for a developer to somehow overlook completely simple but neccessary stuff for your games; testers on the other hand will most likely notice such things right away (at least that's what I have experienced).&#xD;&#xA;&#xD;&#xA;So anyways, as for a rough sketch for a &quot;checklist&quot; (though I hope you understand as to why asking for a checklist with this few information is kinda pointless).&#xD;&#xA;&#xD;&#xA; - Polish. Even as a developer you will always notice if somthing is missing, beause it just feels wrong. Though it's not always the important stuff, you can get your atmosphere right by polishing your game.&#xD;&#xA; - Is your game userfriendly? Can you abort your actions? Maybe even do some stuff via keyboard? Do your on settings?&#xD;&#xA; - Overall feeling. Does your stuff fit together? Gameplay, atmosphere, etc.&#xD;&#xA; - Help. Do you provide easy ways for the player to look up stuff, how something works, what he has to do (your current mission, objective, quest, pick something...). Can he see/read what exactly his skills/units/power ups do?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Though, as you may see in my list, it really is very genre and game specific." />
  <row Id="3462" PostHistoryTypeId="5" PostId="1893" RevisionGUID="01cd4c11-0ab8-442f-a82a-2c0f739a0700" CreationDate="2010-07-30T13:39:34.837" UserId="1221" Comment="added 2 characters in body" Text="Get Testers. (Though this might not be a direct answer to the question) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Really, asking for a checklist is imo too game/genre specific as it could be answered in such a generic way. However, I do recommend getting as many testers as possible and as much feedback as possible.&#xD;&#xA;&#xD;&#xA;It is actually completely normal (imo) for a developer to somehow overlook completely simple but neccessary stuff for your games; testers on the other hand will most likely notice such things right away (at least that's what I have experienced).&#xD;&#xA;&#xD;&#xA;So anyways, as for a rough sketch for a &quot;checklist&quot; (though I hope you understand as to why asking for a checklist with this few information is kinda pointless).&#xD;&#xA;&#xD;&#xA; - Polish. Even as a developer you will always notice if somthing is missing, because it just feels wrong. Though it's not always the important stuff, you can get your atmosphere right by polishing your game.&#xD;&#xA; - Is your game user-friendly? Can you abort your actions? Maybe even do some stuff via keyboard? Do your on settings?&#xD;&#xA; - Overall feeling. Does your stuff fit together? Gameplay, atmosphere, etc.&#xD;&#xA; - Help. Do you provide easy ways for the player to look up stuff, how something works, what he has to do (your current mission, objective, quest, pick something...). Can he see/read what exactly his skills/units/power ups do?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Though, as you may see in my list, it really is very genre and game specific." />
  <row Id="3463" PostHistoryTypeId="2" PostId="1894" RevisionGUID="411937ab-3c48-46db-978c-46fb47634805" CreationDate="2010-07-30T13:43:29.757" UserId="1134" Text="(You may to know about the term [&quot;monkey patching&quot; or &quot;duck punching&quot;][1] if for nothing other than the humorous mental image.)&#xD;&#xA;&#xD;&#xA;That aside: if your goal is decreasing iteration time for &quot;behavior&quot; changes, try some approaches that get you most of the way there, and combine nicely to enable more of this in the future.&#xD;&#xA;&#xD;&#xA;(This will go out on a bit of a tangent, but I promise it'll return!)&#xD;&#xA;&#xD;&#xA;* **Start with data**, and start small: **reload at boundaries** (&quot;levels&quot; or the like), then work your way up to using OS functionality to get **file change notifications** or simply **poll** regularly.&#xD;&#xA;* (For bonus points and lower load times (again, decreasing iteration time) look into [data baking][2].)&#xD;&#xA;* **Scripts are data**, and allow you to iterate behavior.  If you use a scripting language, you now have the notifications / ability to reload those scripts, interpreted or compiled.  You can also hook your interpreter to an in-game console, a network socket, or the like for increased runtime flexibility.&#xD;&#xA;* **Code may be data too**: your compiler may support **[overlays][3]**, shared libraries, DLLs, or the like.  So you can now choose a &quot;safe&quot; time to unload and reload an overlay or DLL, whether manual or automatic.  The other answers go into detail here.  Do note that some variants of this may mess with cryptographic signature vecification, [NX (no-execute) bit][4], or similar security mechanisms.&#xD;&#xA;* Consider a **deep, versioned save/load** system.  If you can save and restore your state robustly even in the face of code changes, you can shutdown your game and restart it with new logic at the exact same point.  Easier said than done, but it is doable, and it's markedly easier and more portable than poking memory to change instructions.&#xD;&#xA;* Depending on the structure and determinism of your game you may be able to do **recording and playback**.  If that recording is just over &quot;game commands&quot; (think of a card game, for example), you can alter all the rendering code you want, and replay the recording to see your changes.  For some games this is as &quot;easy&quot; as recording some starting parameters (e.g. a random seed) and then user actions.  For some it is much more complicated.&#xD;&#xA;* Make efforts to **reduce compile time**.  In combination with the aforementioned save/load or record/playback systems, or even with overlays or DLLs, this may decrease your turnaround more than any single other thing.&#xD;&#xA;&#xD;&#xA;Many of these points are beneficial even if you don't get all the way to reloading either data or code.&#xD;&#xA;&#xD;&#xA;Supporting anecdotes:&#xD;&#xA;&#xD;&#xA;On a large PC RTS (~120 person team, mostly C++), there was an incredibly deep state saving system, that was used for at least three purposes:&#xD;&#xA;&#xD;&#xA;* A &quot;shallow&quot; save was fed not to disk but to a CRC engine to ensure that the multiplayer games remained in lock-step simulation one CRC every 10-30 frames; this ensured no-one was cheating and caught desync bugs a few frames later&#xD;&#xA;* If and when a multiplayer desync bug occurred, an extra-deep save was performed every frame, and again fed to the CRC engine, but this time the CRC engine would generate many CRCs, each for smaller batches of bytes.  In this manner, it could tell you exactly which portion of state had started to diverge within the last frame.  We caught a nasty &quot;default floating point mode&quot; difference between AMD and Intel processors using this.&#xD;&#xA;* A normal depth save might not save e.g. the exact frame of animation your unit was playing, but it'd get the position, health, etc of all of your units, allowing you to save and resume at any time during gameplay.&#xD;&#xA;&#xD;&#xA;I've since used deterministic record/playback on a C++ and Lua card game for the DS.  We hooked into the API we designed for the AI (on the C++ side) and recorded all of the user and AI actions.  We used this functionality in game (to provide a replay for the player), but also to diagnose issues: when there was a crash or odd behavior, all we had to do was get the save file and play it back in a debug build.&#xD;&#xA;&#xD;&#xA;I've also since used overlays more than a few times, and we combined it with our &quot;automatically spider this directory and upload new content to the handheld&quot; system.  All we'd have to do is leave the cutscene/level/whatever and come back in, and not only the new data (sprites, level layout, etc) would load but also any new code in the overlay.  Unfortunately that's getting much harder with more recent handhelds due to copy protection and anti-hacking mechanisms that treat code specially.  We still do it for lua scripts though.&#xD;&#xA;&#xD;&#xA;Last but not least: you can (and I have, in various very small specific circumstances) do a bit of duck punching by patching instruction opcodes directly.  This works best if you're on a fixed platform and compiler, though, and because it's nearly unmaintainable, very bug-prone, and limited in what you can accomplish quickly, I mostly only use it to re-route code while debugging.  It _does_ teach you a hell of a lot about your instruction set architecture in a hurry, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/en/wiki/Duck_punching&#xD;&#xA;  [2]: http://software.intel.com/en-us/articles/delicious-data-baking/&#xD;&#xA;  [3]: https://secure.wikimedia.org/wikipedia/en/wiki/Overlay_%28programming%29&#xD;&#xA;  [4]: https://secure.wikimedia.org/wikipedia/en/wiki/NX_bit" />
  <row Id="3464" PostHistoryTypeId="2" PostId="1895" RevisionGUID="54e7867a-5dcb-489e-965c-2643528ef11c" CreationDate="2010-07-30T13:44:46.960" UserId="259" Text="I second testers.  Serious testers.  Log the bugs and missing features properly and handle them in priority order.  Regression-test your resolved bugs so you don't re-break things.&#xD;&#xA;&#xD;&#xA;Also, set yourself deadlines: sometimes you just need to stop.  Set a date for feature-complete, then set a date for release.  Don't be tempted to squeeze features in after you've gone feature-complete, no matter how amazing they will be.  This is not a polish phase, it's for bug fixing.&#xD;&#xA;&#xD;&#xA;And remember that last 20% normally takes 80% of the time." />
  <row Id="3465" PostHistoryTypeId="2" PostId="1896" RevisionGUID="5f281163-fdf0-42e0-9005-5b1a571e0e68" CreationDate="2010-07-30T14:17:15.620" UserId="187" Text="I've used a very similar system across several games and found that with a couple of exceptions, it serves as an excellent UI model.&#xD;&#xA;&#xD;&#xA;The only issues we encountered were cases where it's desired in certain cases to pop back multiple states before pushing a new state (we re-flowed the UI to remove the requirement, as it was usually a sign of bad UI) and creating wizard-style linear flows (solved easily by passing the data along to the next state).&#xD;&#xA;&#xD;&#xA;The implementation we used actually wrapped the stack and handled the logic for updating and rendering, as well as operations on the stack. Each operation on the stack triggered events on the states to notify them of the operation occurring. &#xD;&#xA;&#xD;&#xA;A few helper functions were added as well to simplify common tasks, such as Swap (Pop &amp; Push, for linear flows) and Reset (for dropping back to the main menu, or ending a flow).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3466" PostHistoryTypeId="2" PostId="1897" RevisionGUID="33d5147f-e4c6-418d-9299-2a2efcb3f26b" CreationDate="2010-07-30T14:25:16.223" UserId="1147" Text="First you need to determine the difference in angle between the turret facing direction and the direction to the target.&#xD;&#xA;&#xD;&#xA;    Vector2 turretToTarget = target.position - turret.position;&#xD;&#xA;    float desiredAngle = atan2(turretToTarget.y, turretToTarget.x);&#xD;&#xA;    float angleDiff = desiredAngle - turret.angle;&#xD;&#xA;&#xD;&#xA;    // Normalize angle to [-PI,PI] range. This ensures that the turret&#xD;&#xA;    // turns the shortest way.&#xD;&#xA;    while (angleDiff &lt; -PI) angleDiff += 2*PI;&#xD;&#xA;    while (angleDiff &gt;= PI) angleDiff -= 2*PI;&#xD;&#xA;&#xD;&#xA;Once you have these quantities you can set up a second degree expression for the turret angle.&#xD;&#xA;&#xD;&#xA;    // Compute angular acceleration.&#xD;&#xA;    const float C0 = // Must be determined.&#xD;&#xA;    const float C1 = // Must be determined.&#xD;&#xA;    float angularAcc = C0 * angleDiff - C1 * turret.angularVelocity;&#xD;&#xA;&#xD;&#xA;Here, the first term (zero degree) in the acceleration expression will cause the turret to begin turning towards the target. However it will not stop in time but rather oscillate back and forth over it. To make it stop we need the dampening second term (first degree) which causes a high turning velocity to be opposed by a high acceleration.&#xD;&#xA;&#xD;&#xA;Now the positive constants (not necessarily program constants) need to be determined and balanced to make the system behave well. C0 is the major control for the speed of the system. A high value for C0 will give a fast turning speed and a low value will give a low turning speed. The actual value depends on many factors so you should use trial and error here. C1 controls the damping magnitude. The [*discriminant*][1] of the quadratic equation tells us that if C1*C1 - 4*C0 &gt;= 0 we have a non-oscillating system.&#xD;&#xA;&#xD;&#xA;    // New definition.&#xD;&#xA;    const float C1 = 2*sqrt(C0); // Stabilizes the system.&#xD;&#xA;&#xD;&#xA;You probably should choose C1 a little bigger than this for numerical reasons, but not too big because it may get very over-damped and slow to respond instead. Again, you need to tweak.&#xD;&#xA;&#xD;&#xA;Finally there is something to say about lagging, because the turret will probably always be behind when tracking a fast target. A simple way to tackle this is to add a linear prediction to the target's position, i.e. always aim slightly ahead in the target's forward direction.&#xD;&#xA;&#xD;&#xA;    // Improvement of the first lines above.&#xD;&#xA;    const float predictionTime = 1; // One second prediction, you need to experiment.&#xD;&#xA;    Vector2 turretToTarget = target.position + predictionTime * target.velocity - turret.position;&#xD;&#xA;    /// ...&#xD;&#xA;&#xD;&#xA;About your second bullet I don't exactly know what you mean. With a dynamic system it is difficult to trap the aim at a point without explicitly controlling the angle and temporarily disabling the dynamic model.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadratic_equation" />
  <row Id="3467" PostHistoryTypeId="5" PostId="1603" RevisionGUID="32752314-c2f8-4648-93a7-93ee4948aecd" CreationDate="2010-07-30T14:32:06.533" UserId="469" Comment="added 575 characters in body" Text="lots of people asked for a trailer for my game, because the screenshots do not make justice...&#xD;&#xA;&#xD;&#xA;But I don't know much about this, can someone point at some tools and tips? Like, what to put on the trailer, and specially: How to record my game, without a logo or slow FPS? (that means: no fraps)&#xD;&#xA;&#xD;&#xA;Bounty:&#xD;&#xA;&#xD;&#xA;As you noticed, I've set a bounty, and removed a correct response...&#xD;&#xA;I tested PlayClaw (it causes the game to crash), Fraps (stupid logo, only 30 seconds, BAAAD video quality OR I need to set it as lossless, that for some reason locks the game speed and actually breaks the gameplay, making it plays wonky), CamStudio (too slow, skipping frames, desynched audio), and some other minor stuff.&#xD;&#xA;&#xD;&#xA;My game is composed of vector graphics, lossy compression destroy the look of the game (instead of seeing lines, you see only black and some blurry stuff that look like... a blob, and nothing more), AND it is a fast paced arcade action game, created to run at 60 FPS.&#xD;&#xA;&#xD;&#xA;So, how I record gameplay without making my vectors look blurry and without making it too slow (a bit slow there are no problem... sometimes there are no way to achieve perfect speed)&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;Seemly I am bumping into the disk speed, so I need whatever software has a compression algorithm that is lossless, compress sufficiently to make it easy for the disk without taking too much CPU (my game is sorta CPU hog... it abuses physics and particles...)&#xD;&#xA;&#xD;&#xA;Also, I made some tests recording from VirtualDub, for some reason it worked better than any other software, maybe fiddling with its disk cache options I can reach something...&#xD;&#xA;&#xD;&#xA;Anyone know a program, that for example can save every frame in .png, and do that fast enough? Or something like that..." />
  <row Id="3468" PostHistoryTypeId="2" PostId="1898" RevisionGUID="b79501a5-20f9-45ec-81ce-6429e74750d0" CreationDate="2010-07-30T14:41:13.893" UserId="23" Text="I honestly feel that either one would be perfectly fine (I personally would go with the first) - provided that you comment it thoroughly and have a wiki explaining what everything does.  People can pick up on pretty much any file format, how long it takes directly correlates to how much documentation you have." />
  <row Id="3469" PostHistoryTypeId="2" PostId="1899" RevisionGUID="63aa67e8-ab15-4598-be36-615f3511f9e3" CreationDate="2010-07-30T14:48:21.020" UserId="119" Text="Having used both SmartFox and [ElectroServer][1] quite extensively, I always recommend ElectroServer. It does all the same stuff as SmartFox, but is just a bit more solid, and includes binary support.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.electro-server.com/" />
  <row Id="3470" PostHistoryTypeId="5" PostId="1884" RevisionGUID="78a2d32b-51ae-4ec0-865b-ad6343b9e33b" CreationDate="2010-07-30T14:54:31.550" UserId="769" Comment="added 71 characters in body" Text="I'm going to write a server for an online multiplayer with these requirements:&#xD;&#xA;&#xD;&#xA;- Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)&#xD;&#xA;- Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)&#xD;&#xA;- Can support as many players at once as possible; Might need multiple servers&#xD;&#xA;- Chat between players&#xD;&#xA;- Socket connection to a Flash/AIR client&#xD;&#xA;- Must be able to communicate with other servers (for player accounts and such)&#xD;&#xA;&#xD;&#xA;Now, I'm considering two options:&#xD;&#xA;&#xD;&#xA;- Smartfox&#xD;&#xA;- A custom Java solution in something like Tomcat&#xD;&#xA;&#xD;&#xA;Why Smartfox?&#xD;&#xA;&#xD;&#xA;- It handles multiple rooms and chat natively&#xD;&#xA;- It presumably has solutions for well-known multiplayer gaming issues&#xD;&#xA;&#xD;&#xA;Why custom?&#xD;&#xA;&#xD;&#xA;- Smartfox has many unneeded functions, bad for performance&#xD;&#xA;- Smartfox communicates with an XML-based format, I could use a more efficient binary one.&#xD;&#xA;- Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism&#xD;&#xA;- Multiple rooms and chat are easy to reimplement&#xD;&#xA;- Tomcat or a lightweight container is easier to deploy than Smartfox&#xD;&#xA;- Better IDE support for developing on Tomcat (automatic deploy, etc)&#xD;&#xA;&#xD;&#xA;What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?" />
  <row Id="3471" PostHistoryTypeId="2" PostId="1900" RevisionGUID="dd7ed0a4-4325-494d-ae6e-34e5084b3ec1" CreationDate="2010-07-30T14:59:37.793" UserId="119" Text="This is a very simplified version but would be fine for most arcade type games. You need the following properties:&#xD;&#xA;&#xD;&#xA;    positionX, positionY - where the car is&#xD;&#xA;    velocityX, velocityY - speed on each axis&#xD;&#xA;    drag - how fast the car slows down&#xD;&#xA;    angle - the rotation of the car, in radians&#xD;&#xA;    angularVelocity - speed the car is spinning, in radians&#xD;&#xA;    angularDrag - how fast the car stops spinning&#xD;&#xA;    power - how fast car can accelerate&#xD;&#xA;&#xD;&#xA;every frame:&#xD;&#xA;&#xD;&#xA;    positionX += velocityX&#xD;&#xA;    positionY += velocityY&#xD;&#xA;    velocityX *= drag&#xD;&#xA;    velocityY *= drag&#xD;&#xA;    angle += angularVelocity&#xD;&#xA;    angularVelocity *= angularDrag&#xD;&#xA;&#xD;&#xA;to accelerate &#xD;&#xA;&#xD;&#xA;    velocityX += sin(angle) * power;&#xD;&#xA;    velocityY += cos(angle) * power;&#xD;&#xA;&#xD;&#xA;To get good drift, set drag and angularDrag to very close to 1, e.g. 0.9&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3472" PostHistoryTypeId="2" PostId="1901" RevisionGUID="8f5ea5f4-7055-482f-bb49-adcac574fa0e" CreationDate="2010-07-30T15:04:01.483" UserId="1198" Text="I have been dabling in game development since I started programming, but never very seriously. I work as a business app developer, but I'm working on some games in my spare time.&#xD;&#xA;&#xD;&#xA;In the business world (on the Microsft web-dev stack) ASP.NET MVC is becoming really popular, because of its ease of unit-testing the way the interface works.&#xD;&#xA;&#xD;&#xA;I'm wondering what design patterns (MVC, MVP, MVVM, etc) one could use to write a game in which all of the game logic is easily unit-testable. Is this possible or feasible? Am I wasting my time, is it better to do full builds and then run &quot;integration&quot; type tests instead of unit-tests?&#xD;&#xA;&#xD;&#xA;Sample code would be great, but a writeup is also useful.&#xD;&#xA;&#xD;&#xA;(I tried to add a unit-testing tag, but don't have the rep required...)" />
  <row Id="3473" PostHistoryTypeId="1" PostId="1901" RevisionGUID="8f5ea5f4-7055-482f-bb49-adcac574fa0e" CreationDate="2010-07-30T15:04:01.483" UserId="1198" Text="Unit Testing a C#/XNA Game Project" />
  <row Id="3474" PostHistoryTypeId="3" PostId="1901" RevisionGUID="8f5ea5f4-7055-482f-bb49-adcac574fa0e" CreationDate="2010-07-30T15:04:01.483" UserId="1198" Text="&lt;game-design&gt;&lt;xna&gt;&lt;c#&gt;&lt;patterns&gt;" />
  <row Id="3475" PostHistoryTypeId="5" PostId="1884" RevisionGUID="5e26570e-36f7-41ed-b1bf-3594e6ec1c7e" CreationDate="2010-07-30T15:09:54.917" UserId="769" Comment="added 16 characters in body" Text="I'm going to write a server for an online multiplayer with these requirements:&#xD;&#xA;&#xD;&#xA;- Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)&#xD;&#xA;- Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)&#xD;&#xA;- Can support as many players at once as possible; Might need multiple servers&#xD;&#xA;- Chat between players&#xD;&#xA;- Socket connection to a Flash/AIR client&#xD;&#xA;- Must be able to communicate with other servers (for player accounts and such)&#xD;&#xA;&#xD;&#xA;Now, I'm considering two options:&#xD;&#xA;&#xD;&#xA;- Smartfox (or equivalent)&#xD;&#xA;- A custom Java solution in something like Tomcat&#xD;&#xA;&#xD;&#xA;Why Smartfox?&#xD;&#xA;&#xD;&#xA;- It handles multiple rooms and chat natively&#xD;&#xA;- It presumably has solutions for well-known multiplayer gaming issues&#xD;&#xA;&#xD;&#xA;Why custom?&#xD;&#xA;&#xD;&#xA;- Smartfox has many unneeded functions, bad for performance&#xD;&#xA;- Smartfox communicates with an XML-based format, I could use a more efficient binary one.&#xD;&#xA;- Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism&#xD;&#xA;- Multiple rooms and chat are easy to reimplement&#xD;&#xA;- Tomcat or a lightweight container is easier to deploy than Smartfox&#xD;&#xA;- Better IDE support for developing on Tomcat (automatic deploy, etc)&#xD;&#xA;&#xD;&#xA;What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?" />
  <row Id="3476" PostHistoryTypeId="6" PostId="1901" RevisionGUID="032b16f5-9e2b-40d4-8827-d6b5fa882615" CreationDate="2010-07-30T15:10:05.757" UserId="288" Comment="edited tags" Text="&lt;game-design&gt;&lt;xna&gt;&lt;c#&gt;&lt;patterns&gt;&lt;unit-testing&gt;" />
  <row Id="3477" PostHistoryTypeId="2" PostId="1902" RevisionGUID="45657724-20e7-4dff-b575-f167fc9cd079" CreationDate="2010-07-30T15:32:39.387" UserId="165" Text="**[Battle for Wesnoth][1]** is a:&#xD;&#xA;&#xD;&#xA;&gt; Free, turn-based tactical strategy&#xD;&#xA;&gt; game with a high fantasy theme,&#xD;&#xA;&gt; featuring both single-player, and&#xD;&#xA;&gt; online/hotseat multiplayer combat&#xD;&#xA;&#xD;&#xA;Free as in open-sourced, under GPL. I *just* found/downloaded it, so can't say what the gameplay is like yet, but it's gotten great reviews. Nor do I know if their code is &quot;well-organized&quot; :) But hey, it's *open-source*.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wesnoth.org/home" />
  <row Id="3478" PostHistoryTypeId="2" PostId="1903" RevisionGUID="cfd56a5a-eb33-461b-ba95-d4607302b605" CreationDate="2010-07-30T15:41:55.177" UserId="288" Text="Here is a good article that I found that describes an architecture for separating out functionality to make it not only easily reusable, but also potentially far easier to unit-test:&#xD;&#xA;&#xD;&#xA;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;&#xD;&#xA;Some games will benefit from a MVC-like pattern. Board games like chess and card games come to mind. In most cases, however, this is massive overkill.&#xD;&#xA;&#xD;&#xA;Personally I find it is sufficient to only unit-test things that are algorithmic in nature. Things that you will depend on to &quot;just work&quot; when you're writing gameplay code, and can be insidiously hard to track down problems in, if they don't. Things like intersection tests or networking code.&#xD;&#xA;&#xD;&#xA;(Things that ideally will be built into a 3rd party framework so you don't have to write *or* test them!)&#xD;&#xA;&#xD;&#xA;One technique I do like to use for unit testing game-related things is what I call the &quot;visual unit test&quot;. The basic concept being a simple line-rendering of the bit of code in question (say for example an intersection function), and some basic key or mouse assignments to manipulate the inputs. No one said unit tests have to be automated - they just have to break things down into individual units and test them." />
  <row Id="3479" PostHistoryTypeId="2" PostId="1904" RevisionGUID="4274de1b-f4d6-48c0-a9f1-7e0b942a2155" CreationDate="2010-07-30T16:09:13.620" UserId="27" Text="Is there a nice way in OpenGL to blur objects without using shaders?&#xD;&#xA;&#xD;&#xA;Currently, I'm accomplishing blur by rendering the object slightly up, down, left, right, and the four diagonals from its original position. It seems like there should be a much better way of doing this. I'm working in a 2d scene." />
  <row Id="3480" PostHistoryTypeId="1" PostId="1904" RevisionGUID="4274de1b-f4d6-48c0-a9f1-7e0b942a2155" CreationDate="2010-07-30T16:09:13.620" UserId="27" Text="Is there a way to blur objects in a 2d game with OpenGL without using shaders?" />
  <row Id="3481" PostHistoryTypeId="3" PostId="1904" RevisionGUID="4274de1b-f4d6-48c0-a9f1-7e0b942a2155" CreationDate="2010-07-30T16:09:13.620" UserId="27" Text="&lt;2d&gt;&lt;graphics&gt;&lt;opengl&gt;" />
  <row Id="3482" PostHistoryTypeId="2" PostId="1905" RevisionGUID="467c6cdc-656b-4ab2-a060-8eaf964652ec" CreationDate="2010-07-30T16:17:46.420" UserId="259" Text="I've used TDD in personal projects, but I wondered if anyone had any experience of using this approach across a large team? Was there resistence to the test-first approach? Did you keep code coverage high for the whole project? How did coverage survive fixing those two-in-the-morning-and-you-ship-in-four-hours crash bugs?  Did you run tests on all platforms, or just assume that passing on one meant passing the others?&#xD;&#xA;&#xD;&#xA;I love the decoupled code that TDD produces, and the large suite of regression tests you get for free, but if you only have a few in the team who want to go old school, won't everyone suffer?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3483" PostHistoryTypeId="1" PostId="1905" RevisionGUID="467c6cdc-656b-4ab2-a060-8eaf964652ec" CreationDate="2010-07-30T16:17:46.420" UserId="259" Text="Experiences of test-driven devleopment in large projects" />
  <row Id="3484" PostHistoryTypeId="3" PostId="1905" RevisionGUID="467c6cdc-656b-4ab2-a060-8eaf964652ec" CreationDate="2010-07-30T16:17:46.420" UserId="259" Text="&lt;programming&gt;&lt;tdd&gt;" />
  <row Id="3485" PostHistoryTypeId="16" PostId="1905" RevisionGUID="467c6cdc-656b-4ab2-a060-8eaf964652ec" CreationDate="2010-07-30T16:17:46.420" UserId="259" />
  <row Id="3486" PostHistoryTypeId="2" PostId="1906" RevisionGUID="8de17f71-ca62-4937-9a96-ba68e25abf4c" CreationDate="2010-07-30T16:24:14.747" UserId="566" Text="I think my checklist would be:&#xD;&#xA;&#xD;&#xA; - Is it fun?" />
  <row Id="3487" PostHistoryTypeId="2" PostId="1907" RevisionGUID="f9272b6f-af1c-420f-97bf-c3f9b1a4ab04" CreationDate="2010-07-30T16:25:18.927" UserId="490" Text="Without using Shaders rendering the images offset as you do is as close to a blur effect as you can get. You could also just draw over the previous framebuffer with transparancy if you want to achieve full-screen blurring. However, each pass roughly doubles the needed fillrate to sustain a good framerate.&#xD;&#xA;&#xD;&#xA;The next step would involve at least a Rendertexture and your own logic to process the image (software shader), or use a real hardware shader (iPhone 3GS and up).&#xD;&#xA;" />
  <row Id="3488" PostHistoryTypeId="2" PostId="1908" RevisionGUID="bc0eb9b1-75f6-414d-be83-d85590aa84f2" CreationDate="2010-07-30T16:25:31.920" UserId="35" Text="Without shaders, that's pretty much everything you can do. The accumulation buffer might give you more power to do more job, if it's available in your platform." />
  <row Id="3489" PostHistoryTypeId="2" PostId="1909" RevisionGUID="cd81ca2c-89af-4983-a2a0-47c1a5eb346f" CreationDate="2010-07-30T16:33:53.940" UserId="490" Text="As they say: in game development the remaining 10% is where 90% of the time is spent.&#xD;&#xA;&#xD;&#xA;The closer you get to the end of the game the harder it is to make a checklist (and the longer it's going to be). The crucial part is taking a step back, look at your project, find everything you can right now which is absolutely essential to get the game out, and work only on that. Write down everything else as notes. Then get it done and get it out there. &#xD;&#xA;&#xD;&#xA;You're making an Indie game (I suppose), so no one is going to expect it to be 100% perfect. The important bit is to get it out there. Then collect the feedback, and make updates.&#xD;&#xA;&#xD;&#xA;I think the core of your problem may be that, like many other Indie/Hobby developers, you probably didn't do much planning ahead of time. Issues such as &quot;Oh, we need a pause button&quot; are a sure sign of it. If the obvious things have slipped your collective minds, you haven't done a real good round of sitting back and writing down all the things you need to get done. Use as many related games for reference as you can while doing so.&#xD;&#xA;" />
  <row Id="3490" PostHistoryTypeId="5" PostId="1905" RevisionGUID="c8e1793a-e56d-40f6-9b64-c00a9e60cdcb" CreationDate="2010-07-30T16:41:37.303" UserId="259" Comment="removed ambiguous old-school reference" Text="I've used TDD in personal projects, but I wondered if anyone had any experience of using this approach across a large team? Was there resistence to the test-first approach? Did you keep code coverage high for the whole project? How did coverage survive fixing those two-in-the-morning-and-you-ship-in-four-hours crash bugs?  Did you run tests on all platforms, or just assume that passing on one meant passing the others?&#xD;&#xA;&#xD;&#xA;I love the decoupled code that TDD produces, and the large suite of regression tests you get for free, but if you only have a few in the team who don't want to contribute tests, won't everyone suffer?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3491" PostHistoryTypeId="5" PostId="1900" RevisionGUID="26b84a29-f9db-4b7f-a2c1-30736a91e06a" CreationDate="2010-07-30T16:41:44.807" UserId="119" Comment="added 143 characters in body" Text="This is a very simplified version but would be fine for most arcade type games. You need the following properties:&#xD;&#xA;&#xD;&#xA;    positionX, positionY - where the car is&#xD;&#xA;    velocityX, velocityY - speed on each axis&#xD;&#xA;    drag - how fast the car slows down&#xD;&#xA;    angle - the rotation of the car, in radians&#xD;&#xA;    angularVelocity - speed the car is spinning, in radians&#xD;&#xA;    angularDrag - how fast the car stops spinning&#xD;&#xA;    power - how fast car can accelerate&#xD;&#xA;    turnSpeed - how fast to turn&#xD;&#xA;&#xD;&#xA;every frame:&#xD;&#xA;&#xD;&#xA;    positionX += velocityX&#xD;&#xA;    positionY += velocityY&#xD;&#xA;    velocityX *= drag&#xD;&#xA;    velocityY *= drag&#xD;&#xA;    angle += angularVelocity&#xD;&#xA;    angularVelocity *= angularDrag&#xD;&#xA;&#xD;&#xA;to accelerate &#xD;&#xA;&#xD;&#xA;    velocityX += sin(angle) * power;&#xD;&#xA;    velocityY += cos(angle) * power;&#xD;&#xA;to steer left&#xD;&#xA;&#xD;&#xA;    angularVelocity -= turnSpeed;&#xD;&#xA;&#xD;&#xA;to steer right&#xD;&#xA;&#xD;&#xA;    angularVelocity += turnSpeed;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To get good drift, set drag and angularDrag to very close to 1, e.g. 0.9&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3492" PostHistoryTypeId="2" PostId="1910" RevisionGUID="041b33ae-e49f-46f2-8c96-3cb4286a72c8" CreationDate="2010-07-30T16:48:41.710" UserId="395" Text="Some other &quot;end-game&quot; bits that people generally overlook: installer (use NSIS), error reporting/bug reporting, menus, dealing with low-quality networks (if it is a multiplayer game), cheating, game updates." />
  <row Id="3493" PostHistoryTypeId="2" PostId="1911" RevisionGUID="cd0d1614-85c7-4511-8cf6-85da6d70d5a0" CreationDate="2010-07-30T16:55:02.700" UserId="395" Text="Games are notoriously hard to unit test, so I really can't imagine this working out all that well. Also games are not spec-driven. Sure, maybe some low-level components are, but game logic itself is driven by the needs of the designers. The parts of your code that would code usefully do TDD with are also the parts you should probably use a library for (file formats, networking, etc)." />
  <row Id="3494" PostHistoryTypeId="16" PostId="1911" RevisionGUID="cd0d1614-85c7-4511-8cf6-85da6d70d5a0" CreationDate="2010-07-30T16:55:02.700" UserId="-1" />
  <row Id="3495" PostHistoryTypeId="2" PostId="1912" RevisionGUID="9e2931e8-5e42-48e6-9449-ad311d21aa11" CreationDate="2010-07-30T16:56:55.800" UserId="490" Text="**The Best of the Pack**&#xD;&#xA;&#xD;&#xA;Tiled Map Editor&#xD;&#xA;http://www.mapeditor.org/&#xD;&#xA;&#xD;&#xA;Mappy&#xD;&#xA;http://tilemap.co.uk/mappy.php&#xD;&#xA;&#xD;&#xA;TME - Tile Map Editor&#xD;&#xA;http://tilemapeditor.com/&#xD;&#xA;&#xD;&#xA;TileStudio&#xD;&#xA;http://tilestudio.sourceforge.net/&#xD;&#xA;&#xD;&#xA;tIDE (Tilemap Integrated Development Environment)&#xD;&#xA;http://tide.codeplex.com/&#xD;&#xA;&#xD;&#xA;**Worth a Try / Alpha Versions**&#xD;&#xA;&#xD;&#xA;TaT Tile Map Editor&#xD;&#xA;http://kotisivu.dnainternet.net/ttilli/tilemapeditor/main.htm&#xD;&#xA;&#xD;&#xA;Simple Tile Map Editor&#xD;&#xA;http://devlinslab.blogspot.com/2007/11/simple-tile-map-editor.html&#xD;&#xA;&#xD;&#xA;Flan Map Editor&#xD;&#xA;http://flixel.org/forums/index.php?topic=225.0&#xD;&#xA;&#xD;&#xA;Tile Map Editor VB.Net&#xD;&#xA;http://sourceforge.net/projects/tilemapeditor2d/&#xD;&#xA;&#xD;&#xA;**Abandoned / Unfinished**&#xD;&#xA;&#xD;&#xA;Gleed2D (abandoned, only 2 weeks of updates)&#xD;&#xA;http://www.gleed2d.de/&#xD;&#xA;&#xD;&#xA;JEngine Tile Map Editor (no description, no screenshots)&#xD;&#xA;http://jenginetilemapeditor.codeplex.com/&#xD;&#xA;" />
  <row Id="3496" PostHistoryTypeId="2" PostId="1913" RevisionGUID="93babafd-c0fd-4b24-bf2b-e0d91e0b5e57" CreationDate="2010-07-30T16:59:07.700" UserId="490" Text="Here's a list of Tile Map Editors:&#xD;&#xA;http://gamedev.stackexchange.com/questions/1886/tile-based-2d-level-editor/1912#1912" />
  <row Id="3497" PostHistoryTypeId="16" PostId="1913" RevisionGUID="93babafd-c0fd-4b24-bf2b-e0d91e0b5e57" CreationDate="2010-07-30T16:59:07.700" UserId="-1" />
  <row Id="3498" PostHistoryTypeId="2" PostId="1914" RevisionGUID="1ecbc99c-f376-4433-9dc1-0d10d19524e0" CreationDate="2010-07-30T17:00:35.093" UserId="348" Text="This is the approach I take for nearly all of my projects, because it works incredibly well and is extremely simple.&#xD;&#xA;&#xD;&#xA;My most recent project, [Sharplike][1], handles control flow in this exact way. Our states are all wired up with a set of event functions that are called when states change, and it features a &quot;named stack&quot; concept in which you can have multiple stacks of states within the same state machine and branch among them--a conceptual tool, and not necessary, but handy to have.&#xD;&#xA;&#xD;&#xA;I would caution against the &quot;tell the controller what state should follow this one when it ends&quot; paradigm suggested by Skizz: it's not structurally sound, and it makes stuff like dialog boxes (which in the standard stack-state paradigm just involves creating a new state subclass with new members, then reading off it when you return to the invoking state) much much harder than it has to be.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://oss.largerussiangames.com" />
  <row Id="3499" PostHistoryTypeId="2" PostId="1915" RevisionGUID="3aa551e6-4a25-4741-92c7-bba9b88abb45" CreationDate="2010-07-30T17:12:21.533" UserId="1134" Text="[Cosmigo's Pro Motion][1] is one of the old-school favorites, even though it's more of a paint tool than a level editor proper.  Great for sprites as well as tiles; lots of &quot;grid&quot; functionality.  Their [features page][2] details a lot of this, and talks about new tile map functionality:&#xD;&#xA;&#xD;&#xA;    * RGB channel depth can be selected from 222 to 888&#xD;&#xA;    * 16 color PNG support&#xD;&#xA;    * Optimize tile based graphics for hand held systems that have a limited number of colors per tile like Gameboy Advance etc.&#xD;&#xA;    * Support for tile painting to create endless textures&#xD;&#xA;    * Tile map editor with auto optimization, mirroring, felxible export&#xD;&#xA;    * AnimStrip files can be created containing frames side by side in a bitmap, PNG/BMP&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cosmigo.com/promotion/index.php&#xD;&#xA;  [2]: http://www.cosmigo.com/promotion/index.php?Features" />
  <row Id="3500" PostHistoryTypeId="16" PostId="1915" RevisionGUID="3aa551e6-4a25-4741-92c7-bba9b88abb45" CreationDate="2010-07-30T17:12:21.533" UserId="-1" />
  <row Id="3501" PostHistoryTypeId="2" PostId="1916" RevisionGUID="13705c1f-f48c-4e98-a303-97fe929e4e79" CreationDate="2010-07-30T17:28:18.120" UserId="734" Text="Regarding your points in support of a custom solution:&#xD;&#xA;&#xD;&#xA;&gt; Smartfox has many unneeded functions, bad for performance&#xD;&#xA;&#xD;&#xA;Since this is for a &quot;simple, turn based&quot; game, performance is unlikely to be a problem.&#xD;&#xA;&#xD;&#xA;&gt; Smartfox communicates with an XML-based format, I could use a more efficient binary one.&#xD;&#xA;&#xD;&#xA;Again, for simple turn based games ease of development can easily take priority over format efficiency, so unless you *want* to develop an efficient binary format - don't.&#xD;&#xA;&#xD;&#xA;&gt; Multiple rooms and chat are easy to reimplement&#xD;&#xA;&#xD;&#xA;This is not a good reason for choosing to implement this functionality on your own. It's just something that's comforting to know, if you decide to follow this path.&#xD;&#xA; &#xD;&#xA;&gt; Tomcat or a lightweight container is easier to deploy than &#xD;&#xA;&gt; Smartfox. Better IDE support for developing on Tomcat (automatic deploy, etc)&#xD;&#xA;&#xD;&#xA;You have to weigh how much time you save by developing a custom solution and deploying it fast, versus using an existing solution and possibly doing a longer deployment. Odds are that the development time will offset what little benefits faster/easier deployment gives.&#xD;&#xA;&#xD;&#xA;**To sum up - I recommend using an existing solution, if possible.** It is likely to save you a lot of time. As for *which* pre-existing solution, that's up to you." />
  <row Id="3502" PostHistoryTypeId="2" PostId="1917" RevisionGUID="62eac794-4fb1-445f-9cea-1c611f0e70e2" CreationDate="2010-07-30T17:33:56.677" UserId="567" Text="Currently i am learning XNA making a 2D Game and so far i am doing ok ... but now i wanted to implement a click-to-move instead of using the keys to walk around but i havent found any samples around and i am sort of clueless on how to approch it...&#xD;&#xA;&#xD;&#xA;I know that XNA goes well for xbox controls and keyboard but i havent saw anything related to mouse interaction at all also i dont really mind about xbox since i am not aiming for anything else other then a PC game...&#xD;&#xA;&#xD;&#xA;So what i am looking for is some samples of how the click-to-move is calculate or done and if the mouse icon displayed in game is also worked from the xna framework or if u have to make it your self in order to make the current tile glow or display that the mouse is there or something alike.&#xD;&#xA;&#xD;&#xA;Thanks for any help and advices...&#xD;&#xA;&#xD;&#xA;PS: Could someone perhaps add the click-to-move tag or world-to-screen ?&#xD;&#xA;&#xD;&#xA;PPS: why it does not allow me to add the C# tag to it ?" />
  <row Id="3503" PostHistoryTypeId="1" PostId="1917" RevisionGUID="62eac794-4fb1-445f-9cea-1c611f0e70e2" CreationDate="2010-07-30T17:33:56.677" UserId="567" Text="2D Game C# click-to-move samples ?" />
  <row Id="3504" PostHistoryTypeId="3" PostId="1917" RevisionGUID="62eac794-4fb1-445f-9cea-1c611f0e70e2" CreationDate="2010-07-30T17:33:56.677" UserId="567" Text="&lt;xna&gt;" />
  <row Id="3505" PostHistoryTypeId="2" PostId="1918" RevisionGUID="cd429871-7faa-46c4-9486-3b1e9797348a" CreationDate="2010-07-30T17:36:19.557" UserId="55" Text="It probably sounds obvious, but... Don't full-screen your game while you're recording the video otherwise it will 'obviously' be incredibly slow because it captures your screen resolution. I'm guess this is what you're really being bit by.&#xD;&#xA;&#xD;&#xA;[FRAPS][1] will take care of this just fine. So will many others but I found FRAPS the most convenient and easiest to use.&#xD;&#xA;&#xD;&#xA;I used [FRAPS][1] to record and Windows Movie Maker to put together some maps I made in Starcraft II -- [example][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fraps.com/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=O3v-PhUANAY" />
  <row Id="3506" PostHistoryTypeId="2" PostId="1919" RevisionGUID="79868419-0f4b-4808-aeed-f1fa211e7593" CreationDate="2010-07-30T17:41:07.087" UserId="55" Text="Well... While you're learning don't forget that Google is your true friend in this endevour.&#xD;&#xA;&#xD;&#xA;Step 1 is to get the mouse location -- http://msdn.microsoft.com/en-us/library/bb197572.aspx&#xD;&#xA;&#xD;&#xA;Step 2 is to move sprite to Location A to Location B which involves basic physics/movement -- http://www.xnadevelopment.com/tutorials/thewizard/theWizard.shtml" />
  <row Id="3507" PostHistoryTypeId="2" PostId="1920" RevisionGUID="6eeb653b-c0d5-4514-ad5e-c1b4c211bf26" CreationDate="2010-07-30T17:56:09.990" UserId="1174" Text="That may not result in the the same kind of blur effect but what about downsampling the image to a small pixmap size and draw it on the screen with linear interpolation." />
  <row Id="3508" PostHistoryTypeId="5" PostId="1917" RevisionGUID="26000fc8-95c4-459c-87b7-46bc506ced71" CreationDate="2010-07-30T18:33:13.377" UserId="567" Comment="added 729 characters in body" Text="Currently i am learning XNA making a 2D Game and so far i am doing ok ... but now i wanted to implement a click-to-move instead of using the keys to walk around but i havent found any samples around and i am sort of clueless on how to approch it...&#xD;&#xA;&#xD;&#xA;I know that XNA goes well for xbox controls and keyboard but i havent saw anything related to mouse interaction at all also i dont really mind about xbox since i am not aiming for anything else other then a PC game...&#xD;&#xA;&#xD;&#xA;So what i am looking for is some samples of how the click-to-move is calculate or done and if the mouse icon displayed in game is also worked from the xna framework or if u have to make it your self in order to make the current tile glow or display that the mouse is there or something alike.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Moving with the mouse is not quiet the same, you have to consider obstacles aswell at least in my case of what i am planning... &#xD;&#xA;&#xD;&#xA;For example i want the clicks to be considered as straight walking forcing the user to navigate himself on the map instead of auto-navigating the user per click so if he clicks past a wall for example it will walk to the wall and stop instead of finding the route to the other side if there is one... another doubt that comes to my mind using the getstate of X and Y for example on a scrolling window will it actually recognize where the mouse is or there will be the need of world-to-screen calculation to disclose where is point B that was clicked by the user ?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help and advices...&#xD;&#xA;&#xD;&#xA;PS: Could someone perhaps add the click-to-move tag or world-to-screen ?&#xD;&#xA;&#xD;&#xA;PPS: why it does not allow me to add the C# tag to it ?" />
  <row Id="3509" PostHistoryTypeId="2" PostId="1921" RevisionGUID="9cb1cba6-8fbe-4063-94eb-00f556f97504" CreationDate="2010-07-30T18:36:12.797" UserId="1232" Text="What you've got already is good and the canonical way to achieve fullscreen blurring.&#xD;&#xA;&#xD;&#xA;If you don't want fullscreen blurring, but want to blur 2d sprites on a per sprite basis, you can use mipmap LOD clamping/bias to force your hardware to sample a lower mip level. Used in conjunction with bilinear magnification filtering, the natural result should look blurred.&#xD;&#xA;&#xD;&#xA;Failing that, you could use a separate texture for the blurred image and just switch between it and the unblurred texture. If you want smooth transitions, you can draw 2 sprites with each texture simultaneously and animate the alpha value for each of the sprites. ie. as time increases, alpha for sprite1 goes from 0..1 and alpha for sprite2 goes from 1..0.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3510" PostHistoryTypeId="2" PostId="1922" RevisionGUID="b54f80a9-a2d3-4339-9108-87f1b2bcc6e6" CreationDate="2010-07-30T18:40:02.273" UserId="47" Text="Is there any point in including manuals with games today?  It seems like most manuals are more for background story or art than any actual help.  Additionally, it seems like most games are including &quot;help&quot; inside of their games in the means of tutorials or similar means.  Do enough users actually look at their manuals to make them worthwhile to include?" />
  <row Id="3511" PostHistoryTypeId="1" PostId="1922" RevisionGUID="b54f80a9-a2d3-4339-9108-87f1b2bcc6e6" CreationDate="2010-07-30T18:40:02.273" UserId="47" Text="Are game manuals worthwhile anymore?" />
  <row Id="3512" PostHistoryTypeId="3" PostId="1922" RevisionGUID="b54f80a9-a2d3-4339-9108-87f1b2bcc6e6" CreationDate="2010-07-30T18:40:02.273" UserId="47" Text="&lt;manuals&gt;" />
  <row Id="3513" PostHistoryTypeId="5" PostId="1917" RevisionGUID="e9d7d946-ccc6-4547-8747-7163eafbd112" CreationDate="2010-07-30T18:43:00.190" UserId="567" Comment="added 23 characters in body" Text="Currently i am learning XNA making a 2D Game and so far i am doing ok ... but now i wanted to implement a click-to-move instead of using the keys to walk around but i havent found any samples around and i am sort of clueless on how to approch it...&#xD;&#xA;&#xD;&#xA;I know that XNA goes well for xbox controls and keyboard but i havent saw anything related to mouse interaction at all also i dont really mind about xbox since i am not aiming for anything else other then a PC game...&#xD;&#xA;&#xD;&#xA;So what i am looking for is some samples of how the click-to-move is calculate or done and if the mouse icon displayed in game is also worked from the xna framework or if u have to make it your self in order to make the current tile glow or display that the mouse is there or something alike.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**UPDATE:**&#xD;&#xA;&#xD;&#xA;Moving with the mouse is not quiet the same, you have to consider obstacles aswell at least in my case of what i am planning... &#xD;&#xA;&#xD;&#xA;For example i want the clicks to be considered as straight walking forcing the user to navigate himself on the map instead of auto-navigating the user per click so if he clicks past a wall for example it will walk to the wall and stop instead of finding the route to the other side if there is one... another doubt that comes to my mind using the getstate of X and Y for example on a scrolling window will it actually recognize where the mouse is or there will be the need of world-to-screen calculation to disclose where is point B that was clicked by the user ?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help and advices...&#xD;&#xA;&#xD;&#xA;**PS: Could someone perhaps add the click-to-move tag or world-to-screen ?**&#xD;&#xA;&#xD;&#xA;**PPS: why it does not allow me to add the C# tag to it ?**" />
  <row Id="3514" PostHistoryTypeId="2" PostId="1923" RevisionGUID="c3ff8859-3ae1-4ee3-9e0f-ffe4e5174c1e" CreationDate="2010-07-30T18:44:57.880" UserId="154" Text="Do the objects need to transition from clear to blurry?&#xD;&#xA;&#xD;&#xA;Level1:&#xD;&#xA;&#xD;&#xA; - The simplest solution is to pre-blur the source art and just draw it directly.&#xD;&#xA;&#xD;&#xA;Level 2:&#xD;&#xA;&#xD;&#xA; - Create a handful of discrete steps of blur and generate those beforehand, then do image swaps as needed. You likely won't need that many to get the appearance of a smooth transition. &#xD;&#xA;&#xD;&#xA;Level 3:&#xD;&#xA;&#xD;&#xA; - Generate a series of discrete pre-generated blur steps and alpha blend between the nearest two steps to smooth the transitions.&#xD;&#xA;" />
  <row Id="3515" PostHistoryTypeId="2" PostId="1924" RevisionGUID="8eab68a6-67cd-4655-abf4-c02ed3716f03" CreationDate="2010-07-30T18:51:17.680" Text="My old favorite was Deluxe Paint (that dates me). I currently use Paint Shop Pro which has a handy 'convert to seamless texture' feature. Not as good as a true tile-symmetry editor, but good in a pinch." />
  <row Id="3516" PostHistoryTypeId="16" PostId="1924" RevisionGUID="8eab68a6-67cd-4655-abf4-c02ed3716f03" CreationDate="2010-07-30T18:51:17.680" UserId="-1" />
  <row Id="3517" PostHistoryTypeId="2" PostId="1925" RevisionGUID="30bbec91-37a1-4172-b4c7-66498440dfaf" CreationDate="2010-07-30T18:51:36.133" UserId="154" Text="In general you want the game to teach players how to play through a fictionally integrated tutorial. Few players ever bother to even look at the manual, much less read it before diving into the game. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="3518" PostHistoryTypeId="2" PostId="1926" RevisionGUID="c0092ff1-c990-436c-8025-ae3bbdb36065" CreationDate="2010-07-30T18:51:37.163" UserId="10" Text="For a F-15 flying simulator. Yes.&#xD;&#xA;&#xD;&#xA;For anything else I'm not sure, probably can get away with it but a small handbook probably wouldn't hurt. Specially if it includes how the basic game mechanics work in many languages." />
  <row Id="3519" PostHistoryTypeId="2" PostId="1927" RevisionGUID="aefc62fe-53a2-4c7e-b9bd-722cb9dabdd6" CreationDate="2010-07-30T18:53:34.350" UserId="1221" Text="Well, i for one enjoy reading a manual, often there are some tips included which you do not see in the game directly.&#xD;&#xA;&#xD;&#xA;But settign that aside, I am convinced that games should be designed in such a manner that manuels are not neccessary in roder to play the game ( so if we look at the pure use of a manual considering it's original purpose, no it is not worthwhile).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now, for the huge but; As I already mentioned tehre are people who simply enjoy a well written and illustrated manual, not just backstory. But stuff you can read on. For example, if I order some version of a game titled with &quot;Game XX Gold/Deluxe/Whatever&quot; I at least simply expect a nice manual in there. It's like with the game boxes, etc. they&#xD;&#xA;&#xD;&#xA;So, yes, i we look from it from this perspective, manuals are worth to be included ( also they usually are not pirated or anything, so you give your audience another reason to actually buy your game)." />
  <row Id="3520" PostHistoryTypeId="2" PostId="1928" RevisionGUID="ab019497-6ccf-4da5-9da0-b39f3eeabd13" CreationDate="2010-07-30T18:56:50.523" UserId="395" Text="For both of the games we have released in my time here, the manual was out of date before it even hit the printer. With an online game you are tweaking until about an hour before release, so almost anything you write about UI or controls will probably be wrong (remember that manuals have to be ready about 3-4 months before launch). Having a guide on your website is downright required though." />
  <row Id="3521" PostHistoryTypeId="5" PostId="221" RevisionGUID="42252b22-9dd9-45e2-ab60-e106b38ffc3c" CreationDate="2010-07-30T19:00:25.740" UserId="10" Comment="added 16 characters in body; edited tags" Text="Fast iteration times are key to developing games, much more so than fancy graphics and engines with truckloads of features in my opinion.  No wonder many small developers choose scripting languages.  &#xD;&#xA;&#xD;&#xA;The Unity 3D way of being able to pause a game and modify assets AND code, then continue and have the changes take effect immediately is absolutely great for this.  My question is, has anybody implemented a similar system on C++ game engines?  &#xD;&#xA;&#xD;&#xA;I have heard that some really super high end engines do, but I am more interested in finding out if there is a way to do it in a home-grown engine or game.  &#xD;&#xA;&#xD;&#xA;Obviously there would be tradeoffs, and I can't imagine that you can just recompile your code while the game is paused, have it reloaded and working under every circumstance or every platform.  &#xD;&#xA;&#xD;&#xA;But perhaps it's possible for AI programming and simple level logic modules.  It's not as if I want to do that in any project in the short (or long term), but I was curious.  " />
  <row Id="3522" PostHistoryTypeId="6" PostId="221" RevisionGUID="42252b22-9dd9-45e2-ab60-e106b38ffc3c" CreationDate="2010-07-30T19:00:25.740" UserId="10" Comment="added 16 characters in body; edited tags" Text="&lt;engine&gt;&lt;c++&gt;" />
  <row Id="3523" PostHistoryTypeId="10" PostId="1886" RevisionGUID="2e209979-382f-42d0-a671-970b3d3308e1" CreationDate="2010-07-30T19:01:09.717" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:288,&quot;DisplayName&quot;:&quot;Andrew Russell&quot;},{&quot;Id&quot;:10,&quot;DisplayName&quot;:&quot;Ólafur Waage&quot;},{&quot;Id&quot;:55,&quot;DisplayName&quot;:&quot;David McGraw&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="3524" PostHistoryTypeId="5" PostId="1886" RevisionGUID="accbc9be-e54b-49e9-a2ed-f4ab5fe1424a" CreationDate="2010-07-30T19:01:09.843" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Tools for creating 2d tile based maps](http://gamedev.stackexchange.com/questions/225/tools-for-creating-2d-tile-based-maps)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am Indie Game developer and  I am looking for a tile based 2d level editor. I also would like to know the free ones as well as paid ones, which you feel as the best." />
  <row Id="3526" PostHistoryTypeId="2" PostId="1930" RevisionGUID="e5d1f5ca-bcb4-4570-958e-02174427b878" CreationDate="2010-07-30T19:12:47.707" UserId="744" Text="Manuals, like loading screens, are a great place to show off concept art and backstory that couldn't be fit into the game for whatever reason. If you're making a match-three game, you probably don't need a manual (or loading screens). If you're making a flight sim, or a train sim, or SimLife (which came with not just a manual but a lab notebook), you'd better have some reference I can use at the same time as playing the game.&#xD;&#xA;&#xD;&#xA;If you're distributing on console platforms, the TCRs may demand a manual. Some games, like No More Heroes (Japanese Wii) or Contact (North America DS) use this opportunity to make some extremely clever designs." />
  <row Id="3527" PostHistoryTypeId="6" PostId="1917" RevisionGUID="01799c78-33e0-4cf2-ab51-f4175b97be96" CreationDate="2010-07-30T19:21:41.710" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;xna&gt;&lt;c#&gt;" />
  <row Id="3528" PostHistoryTypeId="5" PostId="1917" RevisionGUID="a042f6b5-eccd-4999-96f5-ff5cd8694f33" CreationDate="2010-07-30T19:29:03.630" UserId="14" Comment="Cleaned up the first parts grammar and spelling so its a bit easier to read." Text="Currently I am learning how to use XNA by making a 2D Game. So far I am doing okay, but I want to implement a click-to-move instead of using the keys to walk around but I haven't found any samples around and I am sort of clueless on how to approach it.&#xD;&#xA;&#xD;&#xA;I know that XNA works well for xbox controls and keyboard but I haven't seen anything related to mouse interaction at all also I dont really mind about xbox since I am not aiming for anything else other then a PC game.&#xD;&#xA;&#xD;&#xA;So what I am looking for is some samples of how the click-to-move is calculate done, and if the mouse icon displayed in game is also worked from the xna framework or if u have to make it your self in order to make the current tile glow or display that the mouse is there or something alike.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**UPDATE:**&#xD;&#xA;&#xD;&#xA;Moving with the mouse is not quite the same, you have to consider obstacles aswell at least in my case of what i am planning... &#xD;&#xA;&#xD;&#xA;For example i want the clicks to be considered as straight walking forcing the user to navigate himself on the map instead of auto-navigating the user per click so if he clicks past a wall for example it will walk to the wall and stop instead of finding the route to the other side if there is one... another doubt that comes to my mind using the getstate of X and Y for example on a scrolling window will it actually recognize where the mouse is or there will be the need of world-to-screen calculation to disclose where is point B that was clicked by the user ?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help and advices...&#xD;&#xA;&#xD;&#xA;**PS: Could someone perhaps add the click-to-move tag or world-to-screen ?**&#xD;&#xA;&#xD;&#xA;**PPS: why it does not allow me to add the C# tag to it ?**" />
  <row Id="3529" PostHistoryTypeId="5" PostId="1919" RevisionGUID="a4771e9f-0eb8-482b-83fa-4dcf2a2fbbd9" CreationDate="2010-07-30T19:30:06.480" UserId="55" Comment="adding info to handle user edit" Text="Well... While you're learning don't forget that Google is your true friend in this endevour.&#xD;&#xA;&#xD;&#xA;Step 1 is to get the mouse location -- http://msdn.microsoft.com/en-us/library/bb197572.aspx&#xD;&#xA;&#xD;&#xA;Step 2 is to move sprite to Location A to Location B which involves basic physics/movement -- http://www.xnadevelopment.com/tutorials/thewizard/theWizard.shtml&#xD;&#xA;  &#xD;&#xA;The idea is the same moving the mouse is for getting your destination where the user clicks. You are still going from point A to point B. &#xD;&#xA;&#xD;&#xA;What you're describing is an implementation detail which you can determine how you want to handle. I'm assuming your working with some sort of grid. The tiles on these grids will have specific properties like walkability. Attempt to move your sprite one step closer in the direction of the destination, if a tile is not walkable, stop. &#xD;&#xA;&#xD;&#xA;If you want your sprite to actually get to the desination you would want to implement an actual pathfinding algorithm which analyzes your tiles walkability." />
  <row Id="3530" PostHistoryTypeId="2" PostId="1931" RevisionGUID="70ee8088-d53e-42e6-9870-9e236abcc14e" CreationDate="2010-07-30T19:39:04.430" UserId="1232" Text="There's really no need to store memory for every particle and animate each particle separately. You can do it procedurally by reconstructing the particle position during drawing by using the classic physics equation. s = ut + 1/2.a.t^2&#xD;&#xA;&#xD;&#xA;A simple example (without constant acceleration of particles):&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;void drawExplosion(ExplosionParameters&amp; s)&#xD;&#xA;{&#xD;&#xA;  Random rng;&#xD;&#xA;  rng.seed(s.startSeed);&#xD;&#xA;  glBegin(GL_POINTS);&#xD;&#xA;  for (int i = 0; i &amp;lt s.numParticles; i++)&#xD;&#xA;  {&#xD;&#xA;    vec3 vel = rng.getRandomVector(-1.0f, 1.0f) * s.explosionSpeed;&#xD;&#xA;    float timeBias = rng.getRandom(0, s.particleTimeBias);&#xD;&#xA;    vec3 pos = s.explosionCentre + (vel * (s.timeElapsed + timeBias));&#xD;&#xA;    glPoint3fv(&amp;pos);&#xD;&#xA;  }&#xD;&#xA;  glEnd();&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Then you simply increase s.timeElapsed on every iteration of your update loop.&#xD;&#xA;&#xD;&#xA;It is also completely amenable to being implemented on the GPU thus freeing up your CPU from having to do any work. A gpu implementation might look like this:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;void drawExplosion(ExplosionParameters&amp; s)&#xD;&#xA;{&#xD;&#xA;    //bind Vertex Shader If Not Already Bound();&#xD;&#xA;    ...&#xD;&#xA;    // bindVertexBuffer of Zeroes If Not AlreadyBound();&#xD;&#xA;    glVertexPointer(...)&#xD;&#xA;    //uploadShaderUniformsForExplosion(s);&#xD;&#xA;    glUniform3f(...)&#xD;&#xA;    ...&#xD;&#xA;    glDrawArrays(GL_POINTS, 0, s.numParticles);&#xD;&#xA;} &#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;The GPU vertex shader would then reconstruct the particle position via the physics equation and the uniforms/constants passed to it - just as the CPU version did.&#xD;&#xA;&#xD;&#xA;To add some variance, you can use more simultaneous explosions with slightly differing parameters, animating colors/alpha, choosing differing starting positions. etc.&#xD;&#xA;" />
  <row Id="3531" PostHistoryTypeId="2" PostId="1932" RevisionGUID="5493c5db-18c3-46ac-84fc-14c2fbc46880" CreationDate="2010-07-30T19:58:41.390" UserId="1004" Text="The fastest way i would assume is to find a particle engine and use that for your effects. Here are a few:&#xD;&#xA;&#xD;&#xA; * [Tricelpa](http://www.holmes3d.net/graphics/particles/)&#xD;&#xA; * [SPARK](http://spark.developpez.com/index.php?page=home&amp;lang=en)&#xD;&#xA; * [Quagmire](http://www.codeproject.com/KB/openGL/ParticleEngine.aspx)" />
  <row Id="3532" PostHistoryTypeId="2" PostId="1933" RevisionGUID="4d3b8ca1-1c03-447d-b845-68712a991f16" CreationDate="2010-07-30T20:02:35.700" UserId="154" Text="To make a camera shake &quot;feel&quot; correct is less about the direction of motion and more about acceleration curves. &#xD;&#xA;&#xD;&#xA;Camera shakes are diving into the realm of animation and so all the rules of action/reaction apply. If you are moving in a linear fashion from point to point it will feel smooth and uniform and not like an impact. &#xD;&#xA;&#xD;&#xA;If you shake your head back and forth you'll notice that it moves fastest at the midpoint between changing direction and slows down on each side as you first have to decelerate and then start up in the new direction.&#xD;&#xA;&#xD;&#xA;Here is a [listing of various easing functions][1] to apply to your motion. You might want to only EaseOut the first motion to make it feel a little more abrupt, and then EaseInOut the rest to simulate the head/camera movement. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee308751.aspx" />
  <row Id="3533" PostHistoryTypeId="2" PostId="1934" RevisionGUID="4e43dc22-da83-40a2-9ed2-fd2d73ef5c8d" CreationDate="2010-07-30T20:03:56.337" UserId="891" Text="I've had much better success profiling using [**YourKit for Java**][1].  I tried TPTP but it is very painful to use.&#xD;&#xA;&#xD;&#xA;YourKit also allows for remote connection.&#xD;&#xA;&#xD;&#xA;If you want a more simplified monitoring solution you can give [**JConsole**][2] a try.  This is the bundled monitor program that is distributed with Java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yourkit.com/overview/index.jsp&#xD;&#xA;  [2]: http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html" />
  <row Id="3534" PostHistoryTypeId="2" PostId="1935" RevisionGUID="30e718ef-3b4d-4c08-8575-f250fd75e0f9" CreationDate="2010-07-30T20:07:06.377" UserId="490" Text="I created a horizontally scrolling landscape using CCParallaxNode. However it does not seem to support endless scrolling in one direction. As soon as the first image &quot;ends&quot; the background shines through. Adding an unlimited number of images is of course not an option. I thought about the usual way, namely adding two sprites for each parallax layer next to each other, and simply moving one at the end of the other at the appropriate time.&#xD;&#xA;&#xD;&#xA;However, I have two issues:&#xD;&#xA;&#xD;&#xA; - parallax child nodes can't seem to be&#xD;&#xA;   re-positioned&#xD;&#xA; - the position of the child nodes vs&#xD;&#xA;   how far they have moved seem to be in&#xD;&#xA;   no relation to the parallax factor&#xD;&#xA;&#xD;&#xA;This is how I set up the parallax node using 4 sprites with identical horizontal width:&#xD;&#xA;&#xD;&#xA;    CGPoint topOffset = CGPointMake(0, screenSize.height);&#xD;&#xA;    CGPoint midOffset = CGPointMake(0, screenSize.height / 2);&#xD;&#xA;    CGPoint downOffset = CGPointZero;&#xD;&#xA;&#xD;&#xA;    // Create a parallax node and add the sprites to it.&#xD;&#xA;    CCParallaxNode* paraNode = [CCParallaxNode node];&#xD;&#xA;    [paraNode addChild:para1 z:1 parallaxRatio:CGPointMake(0.5f, 0)&#xD;&#xA;    positionOffset:topOffset];&#xD;&#xA;    [paraNode addChild:para2 z:2 parallaxRatio:CGPointMake(1, 0) positionOffset:topOffset];&#xD;&#xA;    [paraNode addChild:para3 z:4 parallaxRatio:CGPointMake(2, 0) positionOffset:midOffset];&#xD;&#xA;    [paraNode addChild:para4 z:3 parallaxRatio:CGPointMake(3, 0) positionOffset:downOffset];&#xD;&#xA;    [self addChild:paraNode z:0 tag:ParallaxSceneTagParallaxNode];&#xD;&#xA;&#xD;&#xA;Did anyone succeed in using CCParallaxNode for seamlessly endless scrolling?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3535" PostHistoryTypeId="1" PostId="1935" RevisionGUID="30e718ef-3b4d-4c08-8575-f250fd75e0f9" CreationDate="2010-07-30T20:07:06.377" UserId="490" Text="How to create endless scrolling landscape using coco2d's CCParallaxNode" />
  <row Id="3536" PostHistoryTypeId="3" PostId="1935" RevisionGUID="30e718ef-3b4d-4c08-8575-f250fd75e0f9" CreationDate="2010-07-30T20:07:06.377" UserId="490" Text="&lt;parallaxscrolling&gt;&lt;cocos2d&gt;" />
  <row Id="3537" PostHistoryTypeId="16" PostId="30" RevisionGUID="f3b925d7-5d10-4beb-a148-462a67e3c69f" CreationDate="2010-07-30T20:13:46.407" UserId="14" />
  <row Id="3538" PostHistoryTypeId="2" PostId="1936" RevisionGUID="3725d05b-8020-4776-9ec0-8ade57cc1777" CreationDate="2010-07-30T20:25:25.490" UserId="458" Text="You could just as easily ask the broader question: should ANY software include a manual?&#xD;&#xA;&#xD;&#xA;Amusingly, there's an article on JoelOnSoftware about designing software so that the users don't need the manual:&#xD;&#xA;http://www.joelonsoftware.com/uibook/chapters/fog0000000062.html&#xD;&#xA;&#xD;&#xA;While it doesn't answer the question, it hints at it:&#xD;&#xA;&quot;Users do just-in-time manual reading, on a strictly need-to-know basis.&quot;&#xD;&#xA;&#xD;&#xA;I would say that is one reason why the game manual is important. It's a physical, tangible object that can be used as reference if the player gets stuck or forgets how certain commands work. (Yes, you can and should include this information within your in-game help system as well, but players don't always like to use that. For one, they might not be able to find it, in which case the physical manual is a suitable backup. For another, a lot of help systems require going through loading screens which seem slow to some players, so it feels faster to look it up in the printed manual.)&#xD;&#xA;&#xD;&#xA;The other reason is that some players DO prefer to read the manual before playing. Yes, you can include an online document on the disc, but it's easier to read a printout than a computer screen. For the sake of saving a couple bucks, are you going to take some nontrivial portion of your players and make sure their **first experience** with your game is frustration at not having a manual?&#xD;&#xA;&#xD;&#xA;There are other psychological reasons. A manual adds perceived value; you didn't just buy this disk with data on it, you also got this pretty book **absolutely free**! More to the point, manuals are so ubiquitous in games that if there isn't a manual in there, the player might assume this was a manufacturing error, and you can expect to be taking a lot of tech support calls (and handling a lot of returns) when players assume something was supposed to be there and was missing." />
  <row Id="3539" PostHistoryTypeId="6" PostId="1935" RevisionGUID="83cb2349-be52-4810-a59b-2cc07b369246" CreationDate="2010-07-30T21:20:17.927" UserId="490" Comment="edited tags" Text="&lt;parallaxscrolling&gt;&lt;cocos2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="3540" PostHistoryTypeId="5" PostId="1825" RevisionGUID="2a7ebc43-f995-4a6f-9e2f-84f7e6da7e48" CreationDate="2010-07-30T21:22:51.377" UserId="490" Comment="added 98 characters in body" Text="Networking solutions sometimes include sophisticated matchmaking rule systems. I can't think of anything else.&#xD;&#xA;&#xD;&#xA;Games have a lot of common concepts, unfortunately not all of them can be supported very well using a plugin technology or middleware. Some game engines or game tools offer prefabricated systems for making menus and highscores, but there are no general purpose solutions to implement specific screens like Preferences, Level Selection and such. These are game-specific.&#xD;&#xA;&#xD;&#xA;Even very well documented rule systems like AD&amp;D do not have a standard implementation. There are just too many variations possible, and each game requires its own set of rules or needs to tweak them for gameplay purposes.&#xD;&#xA;" />
  <row Id="3541" PostHistoryTypeId="5" PostId="1913" RevisionGUID="2883e66b-5492-4703-984f-e2c1dcdf86fb" CreationDate="2010-07-30T21:23:49.223" UserId="490" Comment="added 740 characters in body" Text="**The Best of the Pack**&#xD;&#xA;&#xD;&#xA;Tiled Map Editor&#xD;&#xA;http://www.mapeditor.org/&#xD;&#xA;&#xD;&#xA;Mappy&#xD;&#xA;http://tilemap.co.uk/mappy.php&#xD;&#xA;&#xD;&#xA;TME - Tile Map Editor&#xD;&#xA;http://tilemapeditor.com/&#xD;&#xA;&#xD;&#xA;TileStudio&#xD;&#xA;http://tilestudio.sourceforge.net/&#xD;&#xA;&#xD;&#xA;tIDE (Tilemap Integrated Development Environment)&#xD;&#xA;http://tide.codeplex.com/&#xD;&#xA;&#xD;&#xA;**Worth a Try / Alpha Versions**&#xD;&#xA;&#xD;&#xA;TaT Tile Map Editor&#xD;&#xA;http://kotisivu.dnainternet.net/ttilli/tilemapeditor/main.htm&#xD;&#xA;&#xD;&#xA;Simple Tile Map Editor&#xD;&#xA;http://devlinslab.blogspot.com/2007/11/simple-tile-map-editor.html&#xD;&#xA;&#xD;&#xA;Flan Map Editor&#xD;&#xA;http://flixel.org/forums/index.php?topic=225.0&#xD;&#xA;&#xD;&#xA;Tile Map Editor VB.Net&#xD;&#xA;http://sourceforge.net/projects/tilemapeditor2d/&#xD;&#xA;&#xD;&#xA;**Abandoned / Unfinished**&#xD;&#xA;&#xD;&#xA;Gleed2D (abandoned, only 2 weeks of updates)&#xD;&#xA;http://www.gleed2d.de/&#xD;&#xA;&#xD;&#xA;JEngine Tile Map Editor (no description, no screenshots)&#xD;&#xA;http://jenginetilemapeditor.codeplex.com/&#xD;&#xA;" />
  <row Id="3542" PostHistoryTypeId="2" PostId="1937" RevisionGUID="3688b737-be0f-478b-bb29-0ae1f71cdec2" CreationDate="2010-07-30T22:22:11.970" UserId="452" Text="Personally, I solved a lot of Linux's issues by using Wine, but I still had problems finding a standardized installation solution that'd work for everyone. " />
  <row Id="3543" PostHistoryTypeId="2" PostId="1938" RevisionGUID="fb8e33ce-a4f2-417a-bf13-bd9259339967" CreationDate="2010-07-30T22:27:39.390" UserId="1232" Text="Games need to provide feedback to the player to let them know what's happening. Chiefly feedback is provided in one of 3 ways:&#xD;&#xA;&#xD;&#xA;* visual feedback (graphics, flashes)&#xD;&#xA;* aural feedback (sounds)&#xD;&#xA;* tactile feedback (vibration/rumble)&#xD;&#xA;* (... maybe one day there'll be taste + smell feedback too)&#xD;&#xA;&#xD;&#xA;Feedback can be given for aesthetic reasons as well as for practical reasons:&#xD;&#xA;* set mood/ambiance eg. music track (aesthetic)&#xD;&#xA;* alert the user that something is happening (pragmatic)&#xD;&#xA;&#xD;&#xA;They key to providing great feedback is recognizing whether you're sending the player appropriate feedback and whether it is useful and aesthetic. You don't want to annoy the player - so adding the ability to tune music/sfx ratios as well as turning these off would go a long way to helping your players.&#xD;&#xA;&#xD;&#xA;So considering appropriateness of feedback is an important question, some of that appropriateness is segmented by 'genre', but ultimately it comes down to figuring out what emotional response you want of your players. Taking your card game as the genre, here are a few examples:&#xD;&#xA;&#xD;&#xA;* Are you doing a horror card game? Sound track should match your goals. Horror cards might be silent, have the odd clank and some scary sudden sounds. &#xD;&#xA;* Is it a fun/jaunty card game? The jaunty game could be enhanced by a fun/bouncy/wacky soundtrack&#xD;&#xA;* Is it casual? Perhaps you want to add a background track that just sounds like a bunch of people in a restaurant eating and interacting. Perhaps the sound of a railway with slight screen shakes every now and then when the train passes. Are you playing at dusk with the sounds of crickets chirping? etc.&#xD;&#xA;* Is it suspenseful? do you have a timer counting down? Background sounds can become more climatic as the countdown gets closer to zero. &quot;Who wants to be a millionaire&quot; did this brilliantly.&#xD;&#xA;" />
  <row Id="3544" PostHistoryTypeId="2" PostId="1939" RevisionGUID="9eb9bbb0-2812-468f-ae22-a3ba8e0b3cea" CreationDate="2010-07-30T22:32:58.857" UserId="290" Text="[ElectroServer4][1] was pointed out in another question as being an off the shelf middle tier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.electro-server.com/" />
  <row Id="3545" PostHistoryTypeId="2" PostId="1940" RevisionGUID="3c3e2928-ae1f-413d-b3a3-d3f029fc56e9" CreationDate="2010-07-30T22:58:09.340" UserId="1206" Text="The obvious choice, if Ogre3D is too low level for you, would be NeoAxis:&#xD;&#xA;http://www.neoaxisgroup.com/&#xD;&#xA;&#xD;&#xA;It's powered by Ogre, but is a complete game development platform.&#xD;&#xA;&#xD;&#xA;It's using primarily C#.&#xD;&#xA;&#xD;&#xA;So go for that. :)" />
  <row Id="3546" PostHistoryTypeId="5" PostId="1938" RevisionGUID="73f62655-2efd-4436-ab71-9917bba98c42" CreationDate="2010-07-30T23:01:06.497" UserId="1232" Comment="added 2 characters in body" Text="Games need to provide feedback to the player to let them know what's happening. Chiefly feedback is provided in one of 3 ways:&#xD;&#xA;&#xD;&#xA;* visual feedback (graphics, flashes)&#xD;&#xA;* aural feedback (sounds)&#xD;&#xA;* tactile feedback (vibration/rumble)&#xD;&#xA;* (... maybe one day there'll be taste + smell feedback too)&#xD;&#xA;&#xD;&#xA;Feedback can be given for aesthetic reasons as well as for practical reasons:&#xD;&#xA;&#xD;&#xA;* set mood/ambiance eg. music track (aesthetic)&#xD;&#xA;* alert the user that something is happening (pragmatic)&#xD;&#xA;&#xD;&#xA;They key to providing great feedback is recognizing whether you're sending the player appropriate feedback and whether it is useful and aesthetic. You don't want to annoy the player - so adding the ability to tune music/sfx ratios as well as turning these off would go a long way to helping your players.&#xD;&#xA;&#xD;&#xA;So considering appropriateness of feedback is an important question, some of that appropriateness is segmented by 'genre', but ultimately it comes down to figuring out what emotional response you want of your players. Taking your card game as the genre, here are a few examples:&#xD;&#xA;&#xD;&#xA;* Are you doing a horror card game? Sound track should match your goals. Horror cards might be silent, have the odd clank and some scary sudden sounds. &#xD;&#xA;* Is it a fun/jaunty card game? The jaunty game could be enhanced by a fun/bouncy/wacky soundtrack&#xD;&#xA;* Is it casual? Perhaps you want to add a background track that just sounds like a bunch of people in a restaurant eating and interacting. Perhaps the sound of a railway with slight screen shakes every now and then when the train passes. Are you playing at dusk with the sounds of crickets chirping? etc.&#xD;&#xA;* Is it suspenseful? do you have a timer counting down? Background sounds can become more climatic as the countdown gets closer to zero. &quot;Who wants to be a millionaire&quot; did this brilliantly.&#xD;&#xA;" />
  <row Id="3547" PostHistoryTypeId="2" PostId="1941" RevisionGUID="3750670f-d8ac-444d-b5f7-89739be54d47" CreationDate="2010-07-30T23:03:56.007" UserId="189" Text="[Irrlicht][1] provides a bit more than Ogre3D, and at the same time is a bit more hands-on (e.g. it doesn't feel like you're just &quot;starting an engine&quot; and watching it run, it feels more like you're the one running commands, as it should be in my opinion).&#xD;&#xA;&#xD;&#xA;I think it would be great to start with!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net/" />
  <row Id="3548" PostHistoryTypeId="10" PostId="1758" RevisionGUID="8deaa715-7a3d-48e6-8705-38302751a8bf" CreationDate="2010-07-30T23:12:13.810" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="3549" PostHistoryTypeId="11" PostId="1758" RevisionGUID="37fd6edb-a288-4c7d-9190-d21ff4fa730c" CreationDate="2010-07-30T23:13:07.193" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="3550" PostHistoryTypeId="10" PostId="1758" RevisionGUID="7a1ab4d7-3bee-4f73-8341-0efe6c822ca7" CreationDate="2010-07-30T23:15:47.203" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="3551" PostHistoryTypeId="11" PostId="1758" RevisionGUID="f2367136-166e-4242-a06a-a6a3bc514ca5" CreationDate="2010-07-30T23:16:52.460" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="3552" PostHistoryTypeId="2" PostId="1942" RevisionGUID="6d7df2d2-7640-45de-89a2-d92e7c2c2185" CreationDate="2010-07-30T23:22:50.500" UserId="865" Text="Tume. http://en.wikipedia.org/wiki/TUME&#xD;&#xA;Worth it if just for watching their tutorials on how they approached certain problems. Interesting features, used for numerous commercial games back in the day. No parallax editing (would be hard anyhow, as the parallax layers are generally driven by logic - you'd need your game as a plugin - which brings me to the following point - your game makes a great map editor. I have always done in game editing, it allows you to &quot;live preview&quot;." />
  <row Id="3553" PostHistoryTypeId="16" PostId="1942" RevisionGUID="6d7df2d2-7640-45de-89a2-d92e7c2c2185" CreationDate="2010-07-30T23:22:50.500" UserId="-1" />
  <row Id="3554" PostHistoryTypeId="2" PostId="1943" RevisionGUID="427a7471-a5d1-487e-bc7d-115c2a545bb5" CreationDate="2010-07-31T00:16:08.747" UserId="1242" Text="Another major issue you must take into account when developing for linux is how to install your game.  There is no standard install mechanism that works without issues across distributions.  There are [package management systems][1] which make your life easier though not all distros use the same formats.  The two most common packaging formats would probably be [.deb][2] (used by debian based distros) and [.rpm][3] (used by redhat based distros).  You can waste a lot of time getting the packaging of your application right for multiple distributions, though if you choose not to supply your game in a distros chosen packaging format you run the risk of alienating their user base.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Package_management_system&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Deb_(file_format)&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/RPM_Package_Manager" />
  <row Id="3555" PostHistoryTypeId="5" PostId="1885" RevisionGUID="74084bb3-08b8-4307-a0ce-69c456b751fa" CreationDate="2010-07-31T00:37:00.267" UserId="288" Comment="added 29 characters in body" Text="Say I have a moving circular `target` defined as:&#xD;&#xA;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    Vector2 velocity;&#xD;&#xA;    float radius;&#xD;&#xA;&#xD;&#xA;And a rotating `turret` (mounted on a moving vehicle of some kind) defined as:&#xD;&#xA;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    Vector2 velocity;&#xD;&#xA;    float angle; // radians&#xD;&#xA;    float angularVelocity; // radians per second&#xD;&#xA;    const float maxAngularVelocity; // radians per second&#xD;&#xA;    const float maxAngularAcceleration; // radians per second per second&#xD;&#xA;&#xD;&#xA;(Or something along those lines. Note that position and velocity of both are controlled elsewhere - assume velocity is constant and position changes based on velocity.)&#xD;&#xA;&#xD;&#xA;I am trying to write two related AI functions to determine, on a given frame:&#xD;&#xA;&#xD;&#xA; - What angular acceleration (and in which direction) to apply to the turret's angle to keep the turret pointing at the target?&#xD;&#xA;&#xD;&#xA; - If the target is currently in sight, can it (any part within its radius) be kept in sight for `x` seconds, where `x` is a fraction of a second? (Alternatly: is there another strategy to ensure the target is actually &quot;locked on&quot; and not simply flying across the sights?)&#xD;&#xA;&#xD;&#xA;And I could use some help..." />
  <row Id="3556" PostHistoryTypeId="2" PostId="1944" RevisionGUID="c9f927d0-8f7d-4c2d-b0c0-835d93bdd2ea" CreationDate="2010-07-31T02:42:50.410" UserId="1243" Text="Are there any very simple open source games available just to demonstrate the basics of the programming techniques?  Preferably something which fits in to a couple hundred lines of actual code.  Specifically, I'm looking for an open source game written in Objective-C and Cocoa.&#xD;&#xA;&#xD;&#xA;I would also appreciate one written in C.&#xD;&#xA;&#xD;&#xA;All the projects that I find online are relatively complicated." />
  <row Id="3557" PostHistoryTypeId="1" PostId="1944" RevisionGUID="c9f927d0-8f7d-4c2d-b0c0-835d93bdd2ea" CreationDate="2010-07-31T02:42:50.410" UserId="1243" Text="Very simple open source games in various languages?" />
  <row Id="3558" PostHistoryTypeId="3" PostId="1944" RevisionGUID="c9f927d0-8f7d-4c2d-b0c0-835d93bdd2ea" CreationDate="2010-07-31T02:42:50.410" UserId="1243" Text="&lt;open-source&gt;" />
  <row Id="3560" PostHistoryTypeId="2" PostId="1946" RevisionGUID="7a628ac8-5f3b-47eb-bc6d-1e3e7b329963" CreationDate="2010-07-31T03:41:22.117" UserId="516" Text="I have a `3D` field with many `MovieClip`s in it, and seems like the one last added is the one  that overlaps others and not the one with highest `z` value.  &#xD;&#xA;Is there any property/function that sets `z-index`? (sorting children by `z` value seems too much like a hack).  &#xD;&#xA;A `3D` engine that can place `MovieClip`s will be helpful(but not one that requires custom drawing).  &#xD;&#xA;I'm using `Flash CS5` with `ActionScript 3`" />
  <row Id="3561" PostHistoryTypeId="1" PostId="1946" RevisionGUID="7a628ac8-5f3b-47eb-bc6d-1e3e7b329963" CreationDate="2010-07-31T03:41:22.117" UserId="516" Text="Managing depth in actionscript3" />
  <row Id="3562" PostHistoryTypeId="3" PostId="1946" RevisionGUID="7a628ac8-5f3b-47eb-bc6d-1e3e7b329963" CreationDate="2010-07-31T03:41:22.117" UserId="516" Text="&lt;flash&gt;&lt;3d&gt;&lt;actionscript-3&gt;" />
  <row Id="3563" PostHistoryTypeId="2" PostId="1947" RevisionGUID="fde5bac5-f0f9-49b2-8ddc-a366450c5981" CreationDate="2010-07-31T03:46:28.610" UserId="1245" Text="What you're probably looking for here is a [PID Controller][1], similar to the answer accepted on [this SO question][2]&#xD;&#xA;&#xD;&#xA;I had initially answered that question by &quot;rolling my own&quot; but this answer is significantly more complete and elegant.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/PID_controller&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2059238/2-objects-following-each-other-but-distance-pulls-them-apart/2059481#2059481" />
  <row Id="3564" PostHistoryTypeId="2" PostId="1948" RevisionGUID="c7c6a6bf-fb00-4bb0-a4d0-5ddc05937eec" CreationDate="2010-07-31T04:00:15.497" UserId="516" Text="First thing to do is to calculate the angle between the turrent and the tracked object.  &#xD;&#xA;Next thing is to check if using the current torrent speed and applying the maximum acceleration  backwards(stopping the torrent) will the torrent stop before or after the tracked object.  &#xD;&#xA;If the answer is that the torrent will stop before the tracked object, apply maximum acceleration forward(increasing speed).  &#xD;&#xA;If the answer is that the torrent will stop after the tracked object, apply maximum acceleration backward(stopping the torrent).  &#xD;&#xA;This way the torrent will alwais arrive the fastest and will stop at the right point(or a fraction after)." />
  <row Id="3565" PostHistoryTypeId="5" PostId="1942" RevisionGUID="fc01d319-19a3-4b71-a9ae-d5f06582e185" CreationDate="2010-07-31T04:53:26.257" UserId="865" Comment="added 148 characters in body; added 51 characters in body" Text="Tume. http://en.wikipedia.org/wiki/TUME&#xD;&#xA;Worth it if just for watching their tutorials on how they approached certain problems (they use layers in many more ways than for tiles, which is very smart as it allows you to be game agnostic without forcing a paradigm on the user). Interesting features, used for numerous commercial games back in the day. No parallax editing (would be hard anyhow, as the parallax layers are generally driven by logic - you'd need your game as a plugin - which brings me to the following point - your game makes a great map editor. I have always done in game editing, it allows you to &quot;live preview&quot; and sets you up for user generated content to boot." />
  <row Id="3566" PostHistoryTypeId="2" PostId="1949" RevisionGUID="75910aa0-ac72-4271-a8e2-12e48a168ce3" CreationDate="2010-07-31T05:09:52.800" UserId="323" Text="Starcraft 2 comes with a &quot;Quickstart Guide&quot;.&#xD;&#xA;&#xD;&#xA;* 4 pages of troubleshooting&#xD;&#xA;* 9 pages of backstory fiction&#xD;&#xA;* 6 pages of EULA&#xD;&#xA;* 7 pages of art&#xD;&#xA;* One *paragraph* of installation instructions, which is basically &quot;put it in your drive and doubleclick it&quot;&#xD;&#xA;&#xD;&#xA;There is not a single word about gameplay.&#xD;&#xA;&#xD;&#xA;I honestly feel like if Blizzard isn't bothering, you probably shouldn't bother either." />
  <row Id="3567" PostHistoryTypeId="5" PostId="1918" RevisionGUID="60a87eb8-3472-480a-9961-e85cac86f701" CreationDate="2010-07-31T06:13:01.127" UserId="55" Comment="deleted 4 characters in body" Text="It probably sounds obvious, but... Don't full-screen your game while you're recording the video otherwise it will 'obviously' be incredibly slow because it captures your screen resolution. I'm guessing this is what you're being bit by.&#xD;&#xA;&#xD;&#xA;[FRAPS][1] will take care of this just fine. So will many others but I found FRAPS the most convenient and easiest to use.&#xD;&#xA;&#xD;&#xA;I used [FRAPS][1] to record and Windows Movie Maker to put together some maps I made in Starcraft II -- [example][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fraps.com/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=O3v-PhUANAY" />
  <row Id="3568" PostHistoryTypeId="2" PostId="1950" RevisionGUID="d89d4e98-0cf4-4bfc-908a-68335ee65cc5" CreationDate="2010-07-31T06:21:41.000" UserId="119" Text="You need this helper class:&#xD;&#xA;&#xD;&#xA;http://blog.theflashblog.com/?p=470" />
  <row Id="3569" PostHistoryTypeId="5" PostId="1857" RevisionGUID="ecf1ca55-fe5e-46b9-9a9c-7dd0a2003a4f" CreationDate="2010-07-31T06:43:44.403" UserId="119" Comment="added 374 characters in body" Text="XML is a good choice if you're not limited by size and it is supported natively (eg in .NET and Flash) but if you want a slim format you can create your own format and parser quite easy. I normally use 1 character eg. comma to seperate each object. To decode the string do a split on comma. Now each object needs different properties so seperate these with a different character eg semi colon, and use another character to seperate the property names from property vales, eg. Colon. All thus can be decoded easily without regex just by using string.split. Here is an example:&#xD;&#xA;&#xD;&#xA;id:1;x:5;y:45.2;angle:45,id:28;x:56;y:89;angle:12;health:78&#xD;&#xA;&#xD;&#xA;you can save even more space by keeping property names down to 1 character, eg h for health. Eg. &#xD;&#xA;&#xD;&#xA;i:1;x:5;y:45.2;a:45,i:28;x:56;y:89;a:12;h:78&#xD;&#xA;&#xD;&#xA;Also, if you want to get the size of your numbers down, you can encode them into ASCI. If you use a standard 256 asci charset you can encode an integer between 0 and 255 into one character. If you use 2 that's 256x256 = 63000 possible numbers, which should be enough to store a relative position in your play area.&#xD;&#xA;&#xD;&#xA;Tile grids can be stored as just a string with each character representing a different type of tile eg:&#xD;&#xA;&#xD;&#xA;i789pog5h3kl&#xD;&#xA;&#xD;&#xA;where I might mean lava, 9 mean grass etc" />
  <row Id="3570" PostHistoryTypeId="2" PostId="1951" RevisionGUID="02ab70b4-ed76-4d7a-bac8-cefacc41dafa" CreationDate="2010-07-31T08:17:13.357" UserDisplayName="matt" Text="i play on a game system called travian, and i really think the technology isnt good enough to catch cheats. Most cheats have 2-4 systems linked via KVM switch, each system runs different OS versions(windows xp, vista, win7, linux mint, Slitaz and so on) , and is run in via proxy servers (though the main account is not using proxy but standard)&#xD;&#xA;&#xD;&#xA;This of course creates such an unfair advantage that most of the people that pay to play the game are leaving, with paying members down over 1000 in just a few months, and with the fewer players, its becoming increasing more obvious that accounts are suspicious, but with no evidence of cheating, the players that do cheat escape punishment, and those that pay fairly (whoops, meant to say play fairly) can see the suspicious activity, they get discouraged and quit the game - or they learn to cheat and hence inlies the problems.&#xD;&#xA;&#xD;&#xA;Currently for travian, there is no player in the top of the game that can honestly say they dont cheat, or admitt they havnt hired people from countries like the phils and china to help them play the game for them while they sleep or are on holidays.&#xD;&#xA;&#xD;&#xA;surely there must be better ways to catch multiple account cheats, or is this the future of games, where just a few actual people make up the entire game base and the winner is based on who can hire the most people in 3rd world countries to play the games for them.&#xD;&#xA;&#xD;&#xA;would membership of $0.01 via credit card (and see who has identical credit card numbers) be a feasible way to detect multiple account cheats at time of registration?" />
  <row Id="3571" PostHistoryTypeId="2" PostId="1952" RevisionGUID="8f45afe9-e8a9-4e17-b491-94b20e2044ae" CreationDate="2010-07-31T09:48:02.767" UserId="252" Text="It depends on your game. If it is rather simple to comprehend or includes a well-done tutorial, a manual is not needed. For complicated games where the player might want to pause and have a look at a rather lengthy explanation, it shouldn't have to be read from screen and therefore be in a printed manual.&#xD;&#xA;&#xD;&#xA;Ideally IMHO, a game is designed in a way such that a manual is not required, but still provided with one including some additional contents like background stories etc. to reward those who still RTFM (read the *friendly* manual). For example, [Homeworld](http://en.wikipedia.org/wiki/Homeworld) could be played without reading the manual thanks to a good tutorial, but reading it would provide additional background on what pre-dates the game story." />
  <row Id="3572" PostHistoryTypeId="5" PostId="1897" RevisionGUID="e98ee0b2-da34-4a23-83a6-408bf72029dd" CreationDate="2010-07-31T11:07:37.430" UserId="1147" Comment="Made some clarifications, formatting and added a note about the second bullet of the question." Text="First you need to determine the difference in angle between the turret facing direction and the direction to the target.&#xD;&#xA;&#xD;&#xA;    Vector2 turretToTarget = target.position - turret.position;&#xD;&#xA;    float desiredAngle = atan2(turretToTarget.y, turretToTarget.x);&#xD;&#xA;    float angleDiff = desiredAngle - turret.angle;&#xD;&#xA;&#xD;&#xA;    // Normalize angle to [-PI,PI] range. This ensures that the turret&#xD;&#xA;    // turns the shortest way.&#xD;&#xA;    while (angleDiff &lt; -PI) angleDiff += 2*PI;&#xD;&#xA;    while (angleDiff &gt;= PI) angleDiff -= 2*PI;&#xD;&#xA;&#xD;&#xA;Once you have these quantities you can set up a second degree expression for the turret angle. You need to compute this on each update to make sure you always use the latest data of positions and velocities.&#xD;&#xA;&#xD;&#xA;    // Compute angular acceleration.&#xD;&#xA;    const float C0 = // Must be determined.&#xD;&#xA;    const float C1 = // Must be determined.&#xD;&#xA;    float angularAcc = C0 * angleDiff - C1 * turret.angularVelocity;&#xD;&#xA;&#xD;&#xA;Here, the first term (zero degree) in the acceleration expression will cause the turret to begin turning towards the target. However it will not stop in time but rather oscillate back and forth over it. To make it stop we need the dampening second term (first degree) which causes a high turning velocity to be opposed by a high acceleration.&#xD;&#xA;&#xD;&#xA;Now the positive constants (not necessarily program constants) need to be determined and balanced to make the system behave well. `C0` is the major control for the speed of the system. A high value for `C0` will give a fast turning speed and a low value will give a low turning speed. The actual value depends on many factors so you should use trial and error here. `C1` controls the damping magnitude. The [*discriminant*][1] of the quadratic equation tells us that if `C1*C1 - 4*C0 &gt;= 0` we have a non-oscillating system.&#xD;&#xA;&#xD;&#xA;    // New definition.&#xD;&#xA;    const float C1 = 2*sqrt(C0); // Stabilizes the system.&#xD;&#xA;&#xD;&#xA;You probably should choose `C1` a little bigger than this for numerical reasons, but not too big because it may get very over-damped and slow to respond instead. Again, you need to tweak.&#xD;&#xA;&#xD;&#xA;Also it is important to note that this code only computes the angular acceleration. The angle and angular velocity needs to be updated from this somewhere else, using and integrator of some sort. From the question I assume that this has been covered.&#xD;&#xA;&#xD;&#xA;Finally there is something to say about lagging, because the turret will probably always be behind when tracking a fast target. A simple way to tackle this is to add a linear prediction to the target's position, i.e. always aim slightly ahead in the target's forward direction.&#xD;&#xA;&#xD;&#xA;    // Improvement of the first lines above.&#xD;&#xA;    const float predictionTime = 1; // One second prediction, you need to experiment.&#xD;&#xA;    Vector2 turretToTarget = target.position + predictionTime * target.velocity - turret.position;&#xD;&#xA;    /// ...&#xD;&#xA;&#xD;&#xA;As for keeping the turret aimed within the radius of the target for some time, this may be a tough requirement to impose directly on this sort of system. You can be certain that this controller will strive to keep the turret aimed at the target (or rather the predicted position) at all times. If the result turns out not to be satisfactory you have to modify the parameters `predictionTime`, `C0` and `C1` (within stable bounds).&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadratic_equation" />
  <row Id="3573" PostHistoryTypeId="2" PostId="1953" RevisionGUID="a2f712fa-2721-4509-9aff-66f773753485" CreationDate="2010-07-31T11:25:04.890" UserId="1252" Text="Netbeans has a pretty good profiler built in as well and its free!&#xD;&#xA;I struggled to get TPTP to work and YourKit always seemed slow. The Netbeans one seemed to be the best of the bunch.&#xD;&#xA;&#xD;&#xA;Some profilers will allow you to mark points in your code where profiling should start and stop. This can definitely help when measuring performance.&#xD;&#xA;&#xD;&#xA;However, a really good (but old school) means of debugging is print statements!&#xD;&#xA;&#xD;&#xA;Try putting these in at various stages. You can then use a binary chop method to identify the slow bits. We do this all the time and its amazingly effective.&#xD;&#xA;&#xD;&#xA;If you have good unit tests there are 3p libs that will allow you to put in timing restrictions i.e. fail the test if it takes more than nnn ms to complete." />
  <row Id="3574" PostHistoryTypeId="2" PostId="1954" RevisionGUID="f40b8d7b-d141-442c-9bf0-87084150c1a5" CreationDate="2010-07-31T14:16:29.053" UserId="1254" Text="You can use Flash local data storage, not everyone knows how to delete flash data. " />
  <row Id="3575" PostHistoryTypeId="2" PostId="1955" RevisionGUID="4661c53b-1de4-4cb0-b3de-89acd6350eca" CreationDate="2010-07-31T14:35:49.457" UserId="450" Text="The Arianne project had rather bad experience with people writing their tests first and concentrating on implementing something that fits their tests. This may lead to a lost focus on the bigger picture. And it gets a real issue if those people refuse to look at user visible bugs in their code because the tests are green.&#xD;&#xA;&#xD;&#xA;From our experience it is way better to write the tests in parallel to writing the program. This way you concentrate on writing code that fits the general requirements and not just the return value of a method. But writing the tests in parallel to the code (instead of later) will result in code that is well structured for easy unit testing.&#xD;&#xA;&#xD;&#xA;Automatic low level tests are very important for two reasons: They speed up development because small parts can be tested without starting up the complete application. And they can catch unintended changes done at a later time.&#xD;&#xA;&#xD;&#xA;But they are no substitution for high level tests done by other people than the person who wrote the code." />
  <row Id="3576" PostHistoryTypeId="16" PostId="1955" RevisionGUID="4661c53b-1de4-4cb0-b3de-89acd6350eca" CreationDate="2010-07-31T14:35:49.457" UserId="-1" />
  <row Id="3577" PostHistoryTypeId="5" PostId="1955" RevisionGUID="d5d0cdeb-f4df-4d70-9c43-e7167113ffeb" CreationDate="2010-07-31T14:42:12.500" UserId="450" Comment="added 430 characters in body" Text="The Arianne project had rather bad experience with people writing their tests first and concentrating on implementing something that fits their tests. This may lead to a lost focus on the bigger picture. And it gets a real issue if those people refuse to look at user visible bugs in their code because the tests are green.&#xD;&#xA;&#xD;&#xA;From our experience it is way better to write the tests in parallel to writing the program. This way you concentrate on writing code that fits the general requirements and not just the return value of a method. But writing the tests in parallel to the code (instead of later) will result in code that is well structured for easy unit testing.&#xD;&#xA;&#xD;&#xA;Automatic low level tests are very important for two reasons: They speed up development because small parts can be tested without starting up the complete application. And they can catch unintended changes done at a later time.&#xD;&#xA;&#xD;&#xA;But they are no substitution for high level tests done by other people than the person who wrote the code. If the person who wrote the code made wrong assumptions it is likely that those wrong assumptions are in his own tests, too.&#xD;&#xA;&#xD;&#xA;Keeping the team motivated works best when the member belief in automated testing and there is some progress visible: Public coverage and number of tests chart can be helpful. And of course it is a good idea to praise people for writing high quality tests (e. g. no bogus tests for the sake of stats)." />
  <row Id="3578" PostHistoryTypeId="5" PostId="1940" RevisionGUID="8d762314-26f8-4000-9a0b-ad5584b66686" CreationDate="2010-07-31T14:43:58.643" UserId="1206" Comment="added 31 characters in body" Text="The obvious choice, if Ogre3D is too low level for you, would be NeoAxis:&#xD;&#xA;http://www.neoaxisgroup.com/&#xD;&#xA;&#xD;&#xA;It's powered by Ogre, but is a complete game development platform.&#xD;&#xA;&#xD;&#xA;It's targeting .NET so you can use C#, managed C++, VB.&#xD;&#xA;&#xD;&#xA;So go for that. :)" />
  <row Id="3580" PostHistoryTypeId="2" PostId="1956" RevisionGUID="448a5dbd-ae3c-4954-b2e4-2a36d196d4ac" CreationDate="2010-07-31T18:22:09.883" UserId="389" Text="You can find a few open source games written in objective-c on [github][1]. Although most are larger than a few hundred lines.&#xD;&#xA;&#xD;&#xA;If you're looking for &quot;tiny&quot; examples and you like Roguelikes, you should check out the listings for the [1kb roguelikes][2] contest. There are a couple C examples that are rather clever (though they probably aren't good learning examples, just fun to read.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/search?langOverride=&amp;language=objective-c&amp;q=game&amp;repo=&amp;start_value=1&amp;type=Repositories&amp;x=21&amp;y=27&#xD;&#xA;  [2]: http://www.roguetemple.com/category/contests/1kbrls/" />
  <row Id="3581" PostHistoryTypeId="2" PostId="1957" RevisionGUID="c33cb4f1-8221-476d-a1b6-ff165822e063" CreationDate="2010-07-31T20:19:50.510" UserId="769" Text="If you want to prevent [tearing][1], you should use V-sync which will lock the FPS to the refresh rate of the monitor, or lower (if you go higher it won't be visible, so it'd be a waste).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Screen_tearing" />
  <row Id="3582" PostHistoryTypeId="2" PostId="1958" RevisionGUID="8a8997a5-a492-4e8a-aa48-f560827758fb" CreationDate="2010-07-31T20:52:48.060" UserId="1024" Text="Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points. Storing just the curvature is ok if your gesture mostly exists in a plane, otherwise your curve is going to have torsion too.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3583" PostHistoryTypeId="5" PostId="1958" RevisionGUID="b2a7c5f0-298c-4276-a1ce-4649f80fa284" CreationDate="2010-07-31T21:05:58.013" UserId="1024" Comment="added 23 characters in body" Text="Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points. Storing just the curvature is ok if your gesture mostly exists in a plane, otherwise your curve is going to have torsion too.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3584" PostHistoryTypeId="5" PostId="1958" RevisionGUID="334e724d-56dc-4d0c-8f5a-54277dddbbc2" CreationDate="2010-07-31T21:20:46.523" UserId="1024" Comment="added 20 characters in body" Text="Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points. Storing just the curvature is ok if your gesture mostly exists in a plane, otherwise your curve is going to have torsion too.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3585" PostHistoryTypeId="5" PostId="1958" RevisionGUID="eccdc0b1-6e62-4eab-ad4b-cdcc3f36d1ab" CreationDate="2010-07-31T21:31:49.493" UserId="1024" Comment="deleted 126 characters in body" Text="Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3586" PostHistoryTypeId="5" PostId="1958" RevisionGUID="56029e70-9680-46a7-80bd-c9eae7425c61" CreationDate="2010-07-31T22:06:40.337" UserId="1024" Comment="added 35 characters in body; added 37 characters in body" Text="Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same, I'm assuming the data is generated by a smooth curve with noise though), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3587" PostHistoryTypeId="6" PostId="12" RevisionGUID="d700f449-f687-4d9b-892c-23c1447344de" CreationDate="2010-07-31T22:11:12.440" UserId="51" Comment="edited tags" Text="&lt;algorithm&gt;&lt;motion-control&gt;" />
  <row Id="3588" PostHistoryTypeId="5" PostId="1882" RevisionGUID="8ec4da33-766c-4cbf-8d2f-f55345f6bb6a" CreationDate="2010-07-31T22:18:37.287" UserId="51" Comment="minor grammar fixes" Text="I have quite a few debug drawing methods in my engine that can generate geometry useful for debugging, like spheres and cubes. &#xD;&#xA;&#xD;&#xA;At the moment I do not generate any normals for these shapes. Is there a general purpose method of generating face normals and per vertex normals for an arbitrary mesh? (I'd imagine you would need face normals to generate per vertex normals?)" />
  <row Id="3589" PostHistoryTypeId="4" PostId="1882" RevisionGUID="8ec4da33-766c-4cbf-8d2f-f55345f6bb6a" CreationDate="2010-07-31T22:18:37.287" UserId="51" Comment="minor grammar fixes" Text="How do I generate surface normals?" />
  <row Id="3590" PostHistoryTypeId="16" PostId="38" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3591" PostHistoryTypeId="16" PostId="53" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3592" PostHistoryTypeId="16" PostId="93" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3593" PostHistoryTypeId="16" PostId="185" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3594" PostHistoryTypeId="16" PostId="230" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3595" PostHistoryTypeId="16" PostId="266" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3596" PostHistoryTypeId="16" PostId="285" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3597" PostHistoryTypeId="16" PostId="1856" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3598" PostHistoryTypeId="16" PostId="1866" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3599" PostHistoryTypeId="16" PostId="14" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:19:55.957" UserId="51" />
  <row Id="3600" PostHistoryTypeId="16" PostId="48" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3601" PostHistoryTypeId="16" PostId="91" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3602" PostHistoryTypeId="16" PostId="106" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3603" PostHistoryTypeId="16" PostId="120" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3604" PostHistoryTypeId="16" PostId="122" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3605" PostHistoryTypeId="16" PostId="132" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3606" PostHistoryTypeId="16" PostId="141" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3607" PostHistoryTypeId="16" PostId="181" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3608" PostHistoryTypeId="16" PostId="926" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3609" PostHistoryTypeId="16" PostId="1019" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3610" PostHistoryTypeId="16" PostId="1022" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3611" PostHistoryTypeId="16" PostId="1179" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3612" PostHistoryTypeId="16" PostId="1224" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3613" PostHistoryTypeId="16" PostId="1286" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3614" PostHistoryTypeId="16" PostId="1594" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3615" PostHistoryTypeId="16" PostId="1599" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3616" PostHistoryTypeId="16" PostId="20" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:01.557" UserId="51" />
  <row Id="3617" PostHistoryTypeId="16" PostId="10" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3618" PostHistoryTypeId="16" PostId="19" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3619" PostHistoryTypeId="16" PostId="25" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3620" PostHistoryTypeId="16" PostId="55" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3621" PostHistoryTypeId="16" PostId="63" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3622" PostHistoryTypeId="16" PostId="194" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3623" PostHistoryTypeId="16" PostId="8" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:21:18.657" UserId="51" />
  <row Id="3624" PostHistoryTypeId="5" PostId="1635" RevisionGUID="af293668-9e08-42b9-acab-247b1bc5b510" CreationDate="2010-07-31T22:27:42.143" UserId="51" Comment="added 10 characters in body; edited title" Text="Where can I find fonts (preferably free, but a reasonable fee is acceptable) that I can use in my for-pay/commericial game?" />
  <row Id="3625" PostHistoryTypeId="4" PostId="1635" RevisionGUID="af293668-9e08-42b9-acab-247b1bc5b510" CreationDate="2010-07-31T22:27:42.143" UserId="51" Comment="added 10 characters in body; edited title" Text="Where can I fonts for my game?" />
  <row Id="3626" PostHistoryTypeId="16" PostId="1636" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:27:53.783" UserId="51" />
  <row Id="3627" PostHistoryTypeId="16" PostId="1637" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:27:53.783" UserId="51" />
  <row Id="3628" PostHistoryTypeId="16" PostId="1640" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:27:53.783" UserId="51" />
  <row Id="3629" PostHistoryTypeId="16" PostId="1643" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:27:53.783" UserId="51" />
  <row Id="3630" PostHistoryTypeId="16" PostId="1652" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:27:53.783" UserId="51" />
  <row Id="3631" PostHistoryTypeId="16" PostId="1635" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:27:53.783" UserId="51" />
  <row Id="3632" PostHistoryTypeId="16" PostId="361" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:28:14.233" UserId="51" />
  <row Id="3633" PostHistoryTypeId="16" PostId="369" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:28:14.233" UserId="51" />
  <row Id="3634" PostHistoryTypeId="16" PostId="398" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:28:14.233" UserId="51" />
  <row Id="3635" PostHistoryTypeId="16" PostId="413" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:28:14.233" UserId="51" />
  <row Id="3636" PostHistoryTypeId="16" PostId="543" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:28:14.233" UserId="51" />
  <row Id="3637" PostHistoryTypeId="16" PostId="360" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:28:14.233" UserId="51" />
  <row Id="3638" PostHistoryTypeId="16" PostId="1048" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3639" PostHistoryTypeId="16" PostId="1054" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3640" PostHistoryTypeId="16" PostId="1058" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3641" PostHistoryTypeId="16" PostId="1180" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3642" PostHistoryTypeId="16" PostId="1259" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3643" PostHistoryTypeId="16" PostId="1297" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3644" PostHistoryTypeId="16" PostId="1302" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3645" PostHistoryTypeId="16" PostId="1772" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3646" PostHistoryTypeId="16" PostId="1045" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:30:09.240" UserId="51" />
  <row Id="3647" PostHistoryTypeId="5" PostId="1958" RevisionGUID="44962d4d-b325-4976-90ad-36a81ed97d7a" CreationDate="2010-07-31T22:31:31.033" UserId="1024" Comment="added 186 characters in body" Text="**Edit** Affine invariance requires this version of curvature apparently.   &#xD;&#xA;http://en.wikipedia.org/wiki/Affine_curvature#Affine_curvature  &#xD;&#xA;Assume that is what I am referring to.&#xD;&#xA;&#xD;&#xA;Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same, I'm assuming the data is generated by a smooth curve with noise though), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3648" PostHistoryTypeId="16" PostId="833" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:32:05.107" UserId="51" />
  <row Id="3649" PostHistoryTypeId="16" PostId="835" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:32:05.107" UserId="51" />
  <row Id="3650" PostHistoryTypeId="16" PostId="836" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:32:05.107" UserId="51" />
  <row Id="3651" PostHistoryTypeId="16" PostId="874" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:32:05.107" UserId="51" />
  <row Id="3652" PostHistoryTypeId="16" PostId="830" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-07-31T22:32:05.107" UserId="51" />
  <row Id="3654" PostHistoryTypeId="5" PostId="1958" RevisionGUID="ee0fda2e-d623-4160-be40-ca1bd91ba468" CreationDate="2010-07-31T22:36:37.160" UserId="1024" Comment="added 110 characters in body" Text="**Edit** Affine invariance requires this version of curvature apparently.   &#xD;&#xA;http://en.wikipedia.org/wiki/Affine_curvature#Affine_curvature  &#xD;&#xA;Assume that is what I am referring to. (Although normal curvature I think is invariant to rotations and uniform scaling which could be good enough).&#xD;&#xA;&#xD;&#xA;Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same, I'm assuming the data is generated by a smooth curve with noise though), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3655" PostHistoryTypeId="5" PostId="1821" RevisionGUID="a2c9c7c3-2eb9-43d6-88f6-b7daf6b2e305" CreationDate="2010-07-31T22:53:58.747" UserId="721" Comment="added 117 characters in body" Text="I port Irrlicht on Android and use it for 2D games. It is not the best solution but i have strong performances. I tried many Java Frameworks but the Garbage Collector can lag your games during 0.2s on G1 phone... So the framework should do allocation very carefully.&#xD;&#xA;&#xD;&#xA;My opinions on these frameworks:&#xD;&#xA;&#xD;&#xA; - rokon: good performance and designed for mobile&#xD;&#xA; - cocos2d for Android: Garbage Collector problem&#xD;&#xA; - unity3D: very good but commercial and not yet available on Android&#xD;&#xA; - box2d is so slow on Java that i made a JNI wrapper with SWIG to use native box2d in my first java game&#xD;&#xA; - SDL is not a good Idea because designed for framebuffer access. But with Froyo, we can use a native API for Bitmap&#xD;&#xA;&#xD;&#xA;Warning, with Froyo and JIT, JBox2d must perform much better. But the Garbage Collector is problem is always valid." />
  <row Id="3656" PostHistoryTypeId="2" PostId="1959" RevisionGUID="7703a0c6-d471-4a3b-878a-8adbb27a8528" CreationDate="2010-07-31T23:35:02.547" UserId="721" Text="My Opinion (only open source 3D engine):&#xD;&#xA;&#xD;&#xA; - [Irrlicht][1]: &#xD;&#xA;   - light 3D engine&#xD;&#xA;   - clean C++ without dependencies and no STL. &#xD;&#xA;   - Not very well documented but there are good tutorials. &#xD;&#xA;   - Very small so you can customize it easily. &#xD;&#xA;   - No OpenGL 3.X driver, Direct X 10.X or 11.X available in the official SDK.&#xD;&#xA;   - Very good for mobile development;&#xD;&#xA;   - good community&#xD;&#xA;   - few extensions available&#xD;&#xA; - [Ogre3D][2]: &#xD;&#xA;   - big 3D engine &#xD;&#xA;   - It uses modern C++ as STL, exceptions and RTTI&#xD;&#xA;   - Good documentation (There are published books).&#xD;&#xA;   - many renderers (OpenGL, DirectX and OpenGL ES...). &#xD;&#xA;   - Ogre3D have many extensions as CEGUI or Bullet integration, Tree nodes... &#xD;&#xA;   - but more difficult to extend Ogre3D if you want something specifics.&#xD;&#xA;   - big community&#xD;&#xA;   - many extensions&#xD;&#xA; - [Crystal space][3]: old design and difficult to use. after few days, i quit this engine&#xD;&#xA; - [Horde3D][4]&#xD;&#xA;   - small engine&#xD;&#xA;   - modern design&#xD;&#xA;   - light community&#xD;&#xA;   - no extensions&#xD;&#xA; - [blendelf][5]&#xD;&#xA;   - small engine with some dependencies&#xD;&#xA;   - modern design with moderns effects as DOF or HDR ...&#xD;&#xA;   - OpenGL only&#xD;&#xA;   - light community&#xD;&#xA;   - bullet integration for physics&#xD;&#xA;   - you use lua to pilot this engine3D&#xD;&#xA;&#xD;&#xA;in few words:&#xD;&#xA; - for desktop game (or future commercial game): Ogre3D&#xD;&#xA; - for first game: irrlicht&#xD;&#xA; - for mobile developpement: irrlicht (Ogre3D is too big)&#xD;&#xA; - for sexy effects: blendelf&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net/&#xD;&#xA;  [2]: http://www.ogre3d.org/&#xD;&#xA;  [3]: http://www.crystalspace3d.org&#xD;&#xA;  [4]: http://www.horde3d.org&#xD;&#xA;  [5]: http://blendelf.com/" />
  <row Id="3657" PostHistoryTypeId="5" PostId="1958" RevisionGUID="cce0b248-6af2-454f-aaeb-7fcc814741d9" CreationDate="2010-07-31T23:45:23.390" UserId="1024" Comment="deleted 20 characters in body" Text="**Edit** Affine invariance requires this version of curvature apparently.   &#xD;&#xA;http://en.wikipedia.org/wiki/Affine_curvature#Affine_curvature  &#xD;&#xA;Assume that is what I am referring to. (Although normal curvature I think is invariant to rotations which could be good enough).&#xD;&#xA;&#xD;&#xA;Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same, I'm assuming the data is generated by a smooth curve with noise though), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3660" PostHistoryTypeId="5" PostId="1940" RevisionGUID="5acca7e2-6713-4cf9-bfa8-6f510b30b66e" CreationDate="2010-08-01T00:56:47.160" UserId="1206" Comment="added 221 characters in body" Text="The obvious choice, if Ogre3D is too low level for you, would be NeoAxis:&#xD;&#xA;http://www.neoaxisgroup.com/&#xD;&#xA;&#xD;&#xA;It's powered by Ogre, but is a complete game development platform.&#xD;&#xA;&#xD;&#xA;It's targeting .NET so you can use C#, managed C++, VB.&#xD;&#xA;&#xD;&#xA;So go for that. :)&#xD;&#xA;&#xD;&#xA;Ogre3D is able to run on a range of mobile devices, like iPhone and Android.&#xD;&#xA;So it's not too big.&#xD;&#xA;&#xD;&#xA;Don't mistake size for performance.&#xD;&#xA;&#xD;&#xA;I am not sure if IrrLicht has an official iPhone support, but Ogre3D does.&#xD;&#xA;" />
  <row Id="3665" PostHistoryTypeId="16" PostId="923" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3666" PostHistoryTypeId="16" PostId="954" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3667" PostHistoryTypeId="16" PostId="955" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3668" PostHistoryTypeId="16" PostId="979" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3669" PostHistoryTypeId="16" PostId="983" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3670" PostHistoryTypeId="16" PostId="1032" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3671" PostHistoryTypeId="16" PostId="922" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T03:23:23.013" UserId="14" />
  <row Id="3673" PostHistoryTypeId="4" PostId="1635" RevisionGUID="e54bfc6f-d6ea-4313-aea1-164a9a86b757" CreationDate="2010-08-01T05:03:07.733" UserId="51" Comment="oops" Text="Where can I find fonts for my game?" />
  <row Id="3674" PostHistoryTypeId="6" PostId="1635" RevisionGUID="6a2c9771-eaaa-4400-ad07-0a8053a39625" CreationDate="2010-08-01T05:29:09.500" UserId="395" Comment="edited tags" Text="&lt;assets&gt;&lt;fonts&gt;" />
  <row Id="3675" PostHistoryTypeId="5" PostId="1958" RevisionGUID="c2cdd77f-9f77-42ff-bc3b-6bb0e207a3bc" CreationDate="2010-08-01T06:46:54.247" UserId="1024" Comment="added 195 characters in body" Text="**Edit** Affine invariance requires this version of curvature apparently.   &#xD;&#xA;http://en.wikipedia.org/wiki/Affine_curvature#Affine_curvature  &#xD;&#xA;Assume that is what I am referring to. (Although normal curvature I think is invariant to rotations which could be good enough).  &#xD;&#xA;**Edit** for a scale invariant version of curvature look here  &#xD;&#xA;http://math.stackexchange.com/questions/1329/what-is-the-form-of-curvature-that-is-invariant-under-rotations-and-uniform-scali&#xD;&#xA;&#xD;&#xA;Gesture recognition problems are a subclass of recognition problems, and recognition problems are basically model comparison problems.&#xD;&#xA;&#xD;&#xA;Your trying to fit your gesture to some collection of gestures, the best gesture wins. &#xD;&#xA;&#xD;&#xA;I would record your gesture several times, and try to fit your training data with something like a b-spline (a curve). You probably want your gestures to be invariant to affine transformations (rotations, scaling, translation), so store the curve as a table of curvature values (It is unlikely to have a nice closed form), as opposed to the Cartesian coordinates of the control points.&#xD;&#xA;&#xD;&#xA;That's a model of a gesture. Let's say you have several. &#xD;&#xA;&#xD;&#xA;To compare them start by fitting your input data and then evaluate the curvature x number of times, where x gives a good trade-off between accuracy and performance.&#xD;&#xA;&#xD;&#xA;Now iterate through the models and subtract the curvature values (evaluated at the same point along the respective curves in terms of arc-length) and square the difference. The value that results is called a residual. Sum up all the residuals. The model with the smallest residuals is the best fit, and is your most likely gesture.&#xD;&#xA;&#xD;&#xA;Compare my answer to @Olie's. They are basically the same, although we are choosing different models for the gesture, (building a table of the signed curvature and recording the change in the angle of the tangent are almost the same, I'm assuming the data is generated by a smooth curve with noise though), the main difference is @Olie is including speed.&#xD;&#xA;&#xD;&#xA;Picking what parameters to include in your model depends on the situation and performance requirements. Bear in mind that the adding parameters to your model increases the dimension. &#xD;&#xA;" />
  <row Id="3676" PostHistoryTypeId="5" PostId="1881" RevisionGUID="714e76db-73c1-4e8d-9f61-46f450a2a589" CreationDate="2010-08-01T07:26:53.220" UserId="1147" Comment="Added an answer to the additional question about storing frames as PNG." Text="My best experience is with [Fraps][1] but I used the full version (it seemed like a small one-time prize to pay for a great utility) which has no limits or logo. You can set the framerate beforehand, as David Young suggested in his comment. Like many video capturing tools, Fraps uses a low-cost compression during while it's recording which then can be converted to a higher compression format of your choice. For this i usually use VirtualDub.&#xD;&#xA;&#xD;&#xA;I had no problem running Fraps behind my game at full speed (50fps in my case) getting high quality captures.&#xD;&#xA;&#xD;&#xA;The key issue here is that capturing requires some performance, and you should always try to to it on the best computer available. More specifically, the capturing tool makes substantial and continual disk writes so choosing to store the file on a fast hard drive is key. Laptops often come with slower-access hard drives so this may affect performance a lot. Using a smaller frame size during the capture gives the hard drive an easier time and could keep your framerate up. Fraps allows you to set half-size frames.&#xD;&#xA;&#xD;&#xA;In the case of Fraps, the quality of the final movie is greatly affected by what compression you use when converting the FPS1-encoded capture AVI to a distributable format. If you don't consider lossiness here it will of course not matter how well the capture tool performed.&#xD;&#xA;&#xD;&#xA;I seriously don't think that the programs you mention are generally that bad, but need some configuring before they perform optimally together with you specific game.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Saving every individual frame in PNG is probably not a good idea if you already have problems with speed. It would likely eat more CPU and disk time because it would need every frame to be stored with all its information. When encoding and storing a movie many encoders use a number of key-frames which are complete and let successive frames after them be defined as the difference between one frame an the next. This can be a huge reduction in size but it does not let you take out one frame and read it without the key-frame.&#xD;&#xA;&#xD;&#xA;Not only will the size of each frame be larger if you try to dump them to separate files, but you will also get an overhead from the file access itself. This is because you must open a new file handle for every frame instead of holding on to and streaming to one file like in the movie case.&#xD;&#xA;&#xD;&#xA;Your best bet is still with recording a lossless movie and extracting the frames from it, OR to capture a finite number of frames like screen-shots during play.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fraps.com/" />
  <row Id="3677" PostHistoryTypeId="5" PostId="1959" RevisionGUID="03cf9590-3827-47e0-b4fb-4bf1c7fb3fa7" CreationDate="2010-08-01T07:33:53.483" UserId="721" Comment="added 2 characters in body" Text="My Opinion (only open source 3D engine):&#xD;&#xA;&#xD;&#xA; - [Irrlicht][1]: &#xD;&#xA;   - light 3D engine&#xD;&#xA;   - clean C++ without dependencies and no STL. &#xD;&#xA;   - Not very well documented but there are good tutorials. &#xD;&#xA;   - Very small so you can customize it easily. &#xD;&#xA;   - No OpenGL 3.X driver, Direct X 10.X or 11.X available in the official SDK.&#xD;&#xA;   - Very good for mobile development;&#xD;&#xA;   - good community&#xD;&#xA;   - few extensions available&#xD;&#xA; - [Ogre3D][2]: &#xD;&#xA;   - big 3D engine &#xD;&#xA;   - It uses modern C++ as STL, exceptions and RTTI&#xD;&#xA;   - Good documentation (There are published books).&#xD;&#xA;   - many renderers (OpenGL, DirectX and OpenGL ES...). &#xD;&#xA;   - Ogre3D have many extensions as CEGUI or Bullet integration, Tree nodes... &#xD;&#xA;   - but more difficult to extend Ogre3D if you want something specifics.&#xD;&#xA;   - big community&#xD;&#xA;   - many extensions&#xD;&#xA; - [Crystal space][3]: old design and difficult to use. after few days, i quit this engine&#xD;&#xA; - [Horde3D][4]&#xD;&#xA;   - small engine&#xD;&#xA;   - modern design&#xD;&#xA;   - light community&#xD;&#xA;   - no extensions&#xD;&#xA; - [blendelf][5]&#xD;&#xA;   - small engine with some dependencies&#xD;&#xA;   - modern design with moderns effects as DOF or HDR ...&#xD;&#xA;   - OpenGL only&#xD;&#xA;   - light community&#xD;&#xA;   - bullet integration for physics&#xD;&#xA;   - you use lua to pilot this engine3D&#xD;&#xA;&#xD;&#xA;in few words:&#xD;&#xA;&#xD;&#xA; - for desktop game (or future commercial game): Ogre3D&#xD;&#xA; - for first game: irrlicht&#xD;&#xA; - for mobile developpement: irrlicht (Ogre3D is too big)&#xD;&#xA; - for sexy effects: blendelf&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net/&#xD;&#xA;  [2]: http://www.ogre3d.org/&#xD;&#xA;  [3]: http://www.crystalspace3d.org&#xD;&#xA;  [4]: http://www.horde3d.org&#xD;&#xA;  [5]: http://blendelf.com/" />
  <row Id="3678" PostHistoryTypeId="2" PostId="1962" RevisionGUID="89213e20-c663-4bd5-b98a-b6a48da1f79c" CreationDate="2010-08-01T09:12:43.157" UserDisplayName="Joolsa" Text="There are various ways of interpolating normals between faces. More details here: http://meshlabstuff.blogspot.com/2009/04/on-computation-of-vertex-normals.html" />
  <row Id="3679" PostHistoryTypeId="2" PostId="1963" RevisionGUID="e2b64122-1443-467c-b18f-9dc5a00eee5a" CreationDate="2010-08-01T11:28:11.530" UserId="1261" Text="[Open Scene Graph][1] is a pretty good, very well designed cross-platform 3D engine. Contrary to Ogre3D, for example, it does not provide &quot;game engine&quot; features, and concentrates on being a very nice abstraction on top of OpenGL.&#xD;&#xA;&#xD;&#xA;- It is quite lightweight, and does not force a framework on you: you can use as little or as much of it as you want, and use it through SDL, SFML, wxWidgets, QT...&#xD;&#xA;- It is a great learning experience: as you learn the library, you understand more and more about the underlying OpenGL and the way it has been designed&#xD;&#xA;- Pretty much ready to use: it has loaders for mainstream 3D formats&#xD;&#xA;- Shaders friendly&#xD;&#xA;&#xD;&#xA;Have a look at the [extensive list of samples][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.openscenegraph.org/projects/osg&#xD;&#xA;  [2]: http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples" />
  <row Id="3680" PostHistoryTypeId="2" PostId="1964" RevisionGUID="a6ad97b7-f576-458f-a0e8-fcb8db061f08" CreationDate="2010-08-01T11:35:37.227" UserId="1156" Text="Why not have a global message queue, something like:&#xD;&#xA;&#xD;&#xA;    messageQueue.push_back(shared_ptr&lt;Event&gt;(new DamageEvent(entityB, 10, entityA)));&#xD;&#xA;With:&#xD;&#xA;&#xD;&#xA;    DamageEvent(Entity* toDamage, uint amount, Entity* damageDealer);&#xD;&#xA;And at the end of the game loop/event handling:&#xD;&#xA;&lt;code&gt;&lt;br&gt;&#xD;&#xA;while(!messageQueue.empty())&#xD;&#xA;{&lt;br&gt; Event e = messageQueue.front(); &lt;br&gt;messageQueue.pop_front(); &lt;br&gt;e.Execute();&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;I think this is the Command pattern. And Execute() is a pure virtual in Event, which derivatives define and do stuff. So here:&#xD;&#xA;&lt;code&gt; DamageEvent::Execute() {&#xD;&#xA;&lt;br&gt;toDamage-&gt;takeDamage(amount);  //Or of course, you could now have entityA get points, or a recognition of damage, or anything.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;" />
  <row Id="3681" PostHistoryTypeId="6" PostId="1944" RevisionGUID="d040ebeb-a471-4805-b470-4b6d041d1091" CreationDate="2010-08-01T11:55:56.800" UserId="891" Comment="edited tags" Text="&lt;open-source&gt;&lt;objective-c&gt;&lt;cocoa&gt;" />
  <row Id="3682" PostHistoryTypeId="2" PostId="1965" RevisionGUID="67eab972-659f-42d8-b8df-64fc317841cd" CreationDate="2010-08-01T12:06:57.400" UserId="1216" Text="I am planing to develop a game, in fact a puzzle game, I have changed the graphics but the level design is all the same. For example, the original puzzle game have five aliens as the obstacle in the human way to airship, the aliens spit fire on human. So here I have changed the alien to chameleon, with same positions(the aliens position never change so as the chameleon's ) and exact strike range(stick its tongue out to catch) and exact measurement(tile) and also converted the human to honey bee. So my doubt is that will there be any issue on this, for I am rendering the exact level design? ( I have searched, but didn't get a precise answer for my doubt)" />
  <row Id="3683" PostHistoryTypeId="1" PostId="1965" RevisionGUID="67eab972-659f-42d8-b8df-64fc317841cd" CreationDate="2010-08-01T12:06:57.400" UserId="1216" Text="Is there any level design copyright? " />
  <row Id="3684" PostHistoryTypeId="3" PostId="1965" RevisionGUID="67eab972-659f-42d8-b8df-64fc317841cd" CreationDate="2010-08-01T12:06:57.400" UserId="1216" Text="&lt;legal&gt;" />
  <row Id="3685" PostHistoryTypeId="2" PostId="1966" RevisionGUID="4175acaa-c867-4475-8146-ccfc86e65698" CreationDate="2010-08-01T12:25:41.153" UserId="1156" Text="You may possibly. I am not entirely sure, but to be completely safe it could be good to alter the positions as well.  &#xD;&#xA;Then there is no way there can be any legal doubts, since you're just developing a game similar. ;)&#xD;&#xA;" />
  <row Id="3686" PostHistoryTypeId="2" PostId="1967" RevisionGUID="833d654c-7d9e-4c85-bc76-bb5401c10e46" CreationDate="2010-08-01T13:28:10.177" UserId="1217" Text="I think I've seen &quot;questions&quot; like this on stackoverflow but sorry if I'm overstepping any bounds. &#xD;&#xA;&#xD;&#xA;Inspired by my recent question and all the nice answers (http://gamedev.stackexchange.com/questions/1892/checklist-for-finished-game/1910#1910) I think every gamedev out there has something he/she thinks that almost every game should have. That knowledge is welcome here! &#xD;&#xA;&#xD;&#xA;So this is probably going to be an inspirational subjective list of some sorts and the point is that anyone reading this question will see a point or two that they've overlooked in their own development and might benefit from adding. &#xD;&#xA;&#xD;&#xA;I think a good example might be: &quot;some sort of manual or help section. Of course it should be proportional to how advanced the game is. Some users won't need it and won't go looking for it but the other ones that do will become very frustrated if they can't remember how to do something specific that should be in the manual&quot;.&#xD;&#xA;&#xD;&#xA;A bad example might be &quot;good gameplay&quot;. Of course every game benefits from this but the answer is not very helpful.  " />
  <row Id="3687" PostHistoryTypeId="1" PostId="1967" RevisionGUID="833d654c-7d9e-4c85-bc76-bb5401c10e46" CreationDate="2010-08-01T13:28:10.177" UserId="1217" Text="What most games would benefit from having" />
  <row Id="3688" PostHistoryTypeId="3" PostId="1967" RevisionGUID="833d654c-7d9e-4c85-bc76-bb5401c10e46" CreationDate="2010-08-01T13:28:10.177" UserId="1217" Text="&lt;subjective&gt;" />
  <row Id="3689" PostHistoryTypeId="2" PostId="1968" RevisionGUID="5ac8a516-0d7a-44a9-81aa-c287b7e93244" CreationDate="2010-08-01T13:52:08.620" UserId="769" Text="People always like achievement/trophies, and they're really easy to make." />
  <row Id="3690" PostHistoryTypeId="2" PostId="1969" RevisionGUID="17a409e2-bc67-4040-b9a6-2886eb5ba6d6" CreationDate="2010-08-01T14:03:32.073" UserDisplayName="foolusion" Text="If your interested in FPS you can look at [Cube Engine][1].&#xD;&#xA;&#xD;&#xA;Also the Quake 3 Engine is available for free. You can find it on the id Software website. Bottom of the right side bar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cubeengine.com" />
  <row Id="3691" PostHistoryTypeId="2" PostId="1970" RevisionGUID="321c1699-fb6e-4585-9a19-309576aab43f" CreationDate="2010-08-01T14:07:19.177" UserId="127" Text="Personally I think nearly every game should have some way for you to challenge other gamers, whether it be directly in multiplayer or in some sort of highscore boards. Recently I have noticed a lot of (mainly mobile) games with great potential ignore this which brings down replayablity.&#xD;&#xA;&#xD;&#xA;also -***cough***- dedicated servers -***cough***- ¬_¬" />
  <row Id="3692" PostHistoryTypeId="2" PostId="1971" RevisionGUID="e4f651fb-d135-482f-9ea6-17fafb48fe8a" CreationDate="2010-08-01T14:20:37.913" UserId="127" Text="I don't think they can sue you over positions. They don't own those pixels and as long as you're not using any of their code/assets/names etc you are fine." />
  <row Id="3693" PostHistoryTypeId="2" PostId="1972" RevisionGUID="2c98ddda-1334-4b49-9573-40a913aeca60" CreationDate="2010-08-01T14:28:46.117" UserId="1206" Text="If you want 200 lines, then the only type of game I can think of would be a good old-fashioned text adventure. :)&#xD;&#xA;Don't underestimate the challenges of that.&#xD;&#xA;&#xD;&#xA;Here's a text adventure in Objective-C:&#xD;&#xA;http://www.spintz.com/electron/electron.html" />
  <row Id="3694" PostHistoryTypeId="2" PostId="1973" RevisionGUID="be521e84-6c69-4fab-b232-4b1ed156bc97" CreationDate="2010-08-01T14:57:38.637" UserId="1156" Text="Replayability.  &#xD;&#xA;Some games you play once through, and then that's the end of it. Something like Portal; there's no replayability in it.  &#xD;&#xA;On the other hand, a lot of the non-linear RPGs - Fallout 3 and Oblivion, for example - have huge amounts of replayability.  &#xD;&#xA;Not just from going 'I might play this kind of character next time' or 'I will be friendly to these people', but also to 'I haven't been to place X, I wonder what's there'.  &#xD;&#xA;Second point is more of plenty to do, but still adds replayability." />
  <row Id="3695" PostHistoryTypeId="2" PostId="1974" RevisionGUID="6362dacc-904b-43ab-a630-9ecf52726a70" CreationDate="2010-08-01T14:58:02.923" UserId="14" Text="First: **I AM NOT A LAWYER, THIS IS NOT LEGAL ADVICE.**&#xD;&#xA;&#xD;&#xA;Second: I recommend checking out [this question][1]: &#xD;&#xA;&#xD;&#xA;I think it is important to note here that 'They' can sue you for really whatever they want in terms of Copyright. Of course, you can get a frivolous case thrown out, but all they need is reasonable belief that you infringed upon their intellectual property to file suit at that point it becomes your legal department against theirs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you copyright something, you copyright the execution. IIRC if you alter 25% or more of the original work than you are in the clear, but don't quote me on that. Either way, it seems that you would be straddling nicely on the bounds of a lawsuit. &#xD;&#xA;&#xD;&#xA;Of course, there is also the Copyright and Trademark office's new-ish stand on being able to copyright game mechanics. So like all legal questions, the best advice I can give is that you **[GET][2] A [LAWYER][3]**.&#xD;&#xA;&#xD;&#xA;Oh and remember, even if the game mechanics can't be copyrighted, they may still be patented. Likewise, they could also have a design patent on how stages are set up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Links:&#xD;&#xA;&#xD;&#xA; - http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems&#xD;&#xA; - http://www.sloperama.com/advice/faq61.htm&#xD;&#xA; - http://www.sloperama.com/advice/lesson39.htm&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems&#xD;&#xA;  [2]: http://www.sloperama.com/advice/faq61.htm&#xD;&#xA;  [3]: http://www.sloperama.com/advice/lesson39.htm" />
  <row Id="3696" PostHistoryTypeId="16" PostId="1968" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T15:04:00.727" UserId="14" />
  <row Id="3697" PostHistoryTypeId="16" PostId="1970" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T15:04:00.727" UserId="14" />
  <row Id="3698" PostHistoryTypeId="16" PostId="1973" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T15:04:00.727" UserId="14" />
  <row Id="3699" PostHistoryTypeId="16" PostId="1967" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T15:04:00.727" UserId="14" />
  <row Id="3700" PostHistoryTypeId="2" PostId="1975" RevisionGUID="42f4343f-3c75-4a17-9876-6dc1b696a55b" CreationDate="2010-08-01T15:23:34.880" UserId="1156" Text="Note: I plan on making my own GUI system. It will be good for learning, lightweight, only have bits I need, ties in with the game, etc.  &#xD;&#xA;  &#xD;&#xA;I was thinking about how to do it. The elements I mean are:  &#xD;&#xA;&#xD;&#xA; - Radio buttons&#xD;&#xA; - Enter text here boxes&#xD;&#xA; - Buttons&#xD;&#xA; - Sliders&#xD;&#xA; - Checkboxes&#xD;&#xA;  &#xD;&#xA;I'm not looking as to how to make them, yet. But more of how they would go.  &#xD;&#xA;## Idea ##&#xD;&#xA;I would have each state that needed stuff, so almost all, have a container of Elements. Each Element is-a GUI piece.  &#xD;&#xA;These each have position, a graphic, etc.  &#xD;&#xA;The bit I get more stuck on is the logic of them.  &#xD;&#xA;My idea for that, to allow for modularity and simplicity was to avoid a MainMenuStartButton; a OptionsOneBackButton, etc. and instead be able to do Slider slider1; or Button start;.  &#xD;&#xA;Instead, each would have a boost::function to a function in a GUI namespace, such like Gui::StartButtonClick, or GUI::ColourSliderHover.  &#xD;&#xA;I was just wondering whether this would be exceptionally slow or not.  &#xD;&#xA;And for that matter, is there any *easy, simple* way of doing GUI for games? No Qt, wxWidgets or anything." />
  <row Id="3701" PostHistoryTypeId="1" PostId="1975" RevisionGUID="42f4343f-3c75-4a17-9876-6dc1b696a55b" CreationDate="2010-08-01T15:23:34.880" UserId="1156" Text="GUI Elements - How to go about them?" />
  <row Id="3702" PostHistoryTypeId="3" PostId="1975" RevisionGUID="42f4343f-3c75-4a17-9876-6dc1b696a55b" CreationDate="2010-08-01T15:23:34.880" UserId="1156" Text="&lt;game-design&gt;&lt;c++&gt;&lt;gui&gt;" />
  <row Id="3703" PostHistoryTypeId="16" PostId="1956" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T16:05:26.403" UserId="51" />
  <row Id="3704" PostHistoryTypeId="16" PostId="1969" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T16:05:26.403" UserId="51" />
  <row Id="3705" PostHistoryTypeId="16" PostId="1972" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T16:05:26.403" UserId="51" />
  <row Id="3706" PostHistoryTypeId="16" PostId="1944" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-01T16:05:26.403" UserId="51" />
  <row Id="3707" PostHistoryTypeId="2" PostId="1976" RevisionGUID="d20115ed-b56f-4882-9e79-3610f1c3fca9" CreationDate="2010-08-01T16:30:10.073" UserId="51" Text="GUI isn't an easy or simple problem, especially when you get into games and their desire to have dynamic, interesting menus.&#xD;&#xA;&#xD;&#xA;One &quot;easy&quot; thing you can do is try to use middleware.  There's a question on that &lt;a href=&quot;http://gamedev.stackexchange.com/questions/1086/what-c-gui-library-can-you-suggest&quot;&gt;here&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;If you're going to roll it yourself, there are a few things I would suggest.&#xD;&#xA;&#xD;&#xA;* GUI elements generally have a &quot;parent&quot;, either another GUI element or a &quot;window&quot;, or something like that.  Either by pointing up or having the parent point down means you can set state/position/etc on everything that's a child.&#xD;&#xA;&#xD;&#xA;* You can build GUI elements by composition.  A lot of widgets have labels (pretty much all of them), and it might make sense to make the concept of a label a component or a child of your other UI elements than copy/pasting the code or trying to inherit from a base class with label functionality.&#xD;&#xA;&#xD;&#xA;* A lot of so-called specialized widgets are just buttons in disguise.  Checkboxes are just buttons with states and special images.  Radio buttons are just checkboxes that have meta-state (one and only one is active at any given time) with other radio buttons.  Use this to your advantage.  In one game I worked on, &quot;checkboxes&quot; were done with regular buttons entirely through scripting and art.&#xD;&#xA;&#xD;&#xA;* For your first project, consider taking the more direct route.  Yes, make your actionable events delegates and assign what you need on element creation (i.e. onMouseButtonDown, onMouseButtonUp, onHover etc), but consider just hard coding what you want to happen otherwise (i.e. hover color changes, button press sounds) until you get something functional.  Once you're at that point, consider making that behavior data (i.e. have a variable on button for &quot;press sound&quot;, or maybe consider having components that your UI elements use to define behavior that you just attach to them when you create them.&#xD;&#xA;&#xD;&#xA;* delegates aren't that slow, you probably won't have so many widgets that it would be an issue, and menu code generally isn't that high impact anyway.  I wouldn't worry too much about performance at this point in the game.  Don't pick naive algorithms and profile once you get your code up and running.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3708" PostHistoryTypeId="5" PostId="1967" RevisionGUID="d5abc36b-2e68-4539-9a37-96374e656946" CreationDate="2010-08-01T16:30:26.640" UserId="229" Comment="added 46 characters in body; deleted 10 characters in body" Text="I think I've seen &quot;questions&quot; like this on stackoverflow but sorry if I'm overstepping any bounds. &#xD;&#xA;&#xD;&#xA;Inspired by my recent question and all the nice answers ([Checklist for finished game?][1]) I think every gamedev out there has something he/she thinks that almost every game should have. That knowledge is welcome here! &#xD;&#xA;&#xD;&#xA;So this is probably going to be an inspirational subjective list of some sorts and the point is that anyone reading this question will see a point or two that they've overlooked in their own development and might benefit from adding. &#xD;&#xA;&#xD;&#xA;I think a good example might be: &quot;some sort of manual or help section. Of course it should be proportional to how advanced the game is. Some users won't need it and won't go looking for it but the other ones that do will become very frustrated if they can't remember how to do something specific that should be in the manual&quot;.&#xD;&#xA;&#xD;&#xA;A bad example might be &quot;good gameplay&quot;. Of course every game benefits from this but the answer is not very helpful.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1892/checklist-for-finished-game" />
  <row Id="3709" PostHistoryTypeId="2" PostId="1977" RevisionGUID="627b86e0-7e6f-4e1f-a966-ae67931f2fb1" CreationDate="2010-08-01T16:31:44.080" UserId="47" Text="Here's one example (source code and all) of a GUI built for OpenGL, specifically for [Slick2D][1] called [Thingle][2] which is a port of [Thinlet][3].&#xD;&#xA;&#xD;&#xA;Another GUI for Slick2D was [SUI][4] that you might want to check out.&#xD;&#xA;&#xD;&#xA;I'd follow these examples and go with an XML driven GUI. Although these projects are old/dead, you might be able to pick up some ideas from them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/&#xD;&#xA;  [2]: http://slick.cokeandcode.com/thingle/&#xD;&#xA;  [3]: http://thinlet.sourceforge.net/home.html&#xD;&#xA;  [4]: http://code.google.com/p/slick-sui/" />
  <row Id="3710" PostHistoryTypeId="2" PostId="1978" RevisionGUID="3240daa1-ef3e-4e66-844b-8affc4645bd9" CreationDate="2010-08-01T16:34:26.917" UserId="1206" Text="I would go for an immediate GUI, like this:&#xD;&#xA;http://code.google.com/p/nvidia-widgets/&#xD;&#xA;&#xD;&#xA;The nVidia widgets are based on IMGUI (Immediate GUI) from MollyRocket.&#xD;&#xA;&#xD;&#xA;I think that's about as simple as a GUI can ever get.&#xD;&#xA;&#xD;&#xA;All depends on what your needs are." />
  <row Id="3715" PostHistoryTypeId="2" PostId="1979" RevisionGUID="b7e0363f-60ff-415a-b309-4ddf670dcd29" CreationDate="2010-08-01T18:00:22.490" UserId="656" Text="While providing an in-game tutorial is necessary, I think including a manual is also a good idea even if unused for most cases. Sometimes, you'll play a game for a while and then stop playing it for a long time. When you come back to playing the game again, it is helpful to be able to refer to a manual as a quick reference on how the game worked rather than having to boot up the game and navigate through the game menus. While this would only affect the small amount of players who would use it in this way, it is still worth it to put it in as an extra touch which would make your game feel much more complete in its boxed package." />
  <row Id="3716" PostHistoryTypeId="2" PostId="1980" RevisionGUID="18798bbc-722f-4df5-908c-1b8251ccbd8c" CreationDate="2010-08-01T18:31:33.487" UserId="1032" Text="Don't prevent inflation. You can fairly easily measure how fast currency is changing hands. Track it, and have the game automatically adjust NPC prices and drops accordingly, with a slow moving average so that prices don't spike. Just use a Big Integer for quantity and you'll be fine." />
  <row Id="3717" PostHistoryTypeId="2" PostId="1981" RevisionGUID="1dfde5b4-c93f-4e2d-a1fd-cdbe874ebc7f" CreationDate="2010-08-01T19:03:16.480" UserId="229" Text="I just found this game that is &quot;manual-ware.&quot; It's an interesting model...&#xD;&#xA;&#xD;&#xA;The [game][1] is free, but you can support it by [buying a manual][2]:&#xD;&#xA;&#xD;&#xA;&gt; The 12-page, full-color printed manual&#xD;&#xA;&gt; for Sanctuary 17 includes basic&#xD;&#xA;&gt; information on playing the game, a&#xD;&#xA;&gt; rundown of all the enemies and items&#xD;&#xA;&gt; you’ll encounter, helpful strategy&#xD;&#xA;&gt; tips, and even some behind-the-scenes&#xD;&#xA;&gt; secrets. If you enjoy the game, please&#xD;&#xA;&gt; consider buying a copy! Your&#xD;&#xA;&gt; contributions will help support future&#xD;&#xA;&gt; games and will most likely result in a&#xD;&#xA;&gt; warm and fuzzy feeling from supporting&#xD;&#xA;&gt; indie gaming as a whole.  Plus, in&#xD;&#xA;&gt; these days of downloadable content and&#xD;&#xA;&gt; PDF manuals, who can resist the allure&#xD;&#xA;&gt; of an actual, physical, bound bundle&#xD;&#xA;&gt; of papers you can leaf through at your&#xD;&#xA;&gt; leisure? This is a win-win situation&#xD;&#xA;&gt; here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://twofoldsecret.com/games/sanctuary-17/&#xD;&#xA;  [2]: http://twofoldsecret.com/goodies/sanctuary-17/" />
  <row Id="3718" PostHistoryTypeId="5" PostId="1974" RevisionGUID="8ce4c6dd-a5f8-47d4-b63a-19e8f7570359" CreationDate="2010-08-01T19:43:11.867" UserId="14" Comment="Coderanger cleared some stuff up." Text="First: **I AM NOT A LAWYER, THIS IS NOT LEGAL ADVICE.**&#xD;&#xA;&#xD;&#xA;Second: I recommend checking out [this question][1]: &#xD;&#xA;&#xD;&#xA;I think it is important to note here that 'They' can sue you for really whatever they want in terms of Copyright. Of course, you can get a frivolous case thrown out, but all they need is reasonable belief that you infringed upon their intellectual property to file suit at that point it becomes your legal department against theirs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you copyright something, you copyright the execution. Either way, it seems that you would be straddling nicely on the bounds of a lawsuit. &#xD;&#xA;&#xD;&#xA;Of course, there is also the Copyright and Trademark office's new-ish stand on being able to copyright game mechanics. So like all legal questions, the best advice I can give is that you **[GET][2] A [LAWYER][3]**.&#xD;&#xA;&#xD;&#xA;Oh and remember, even if the game mechanics can't be copyrighted, they may still be patented. Likewise, they could also have a design patent on how stages are set up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Links:&#xD;&#xA;&#xD;&#xA; - http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems&#xD;&#xA; - http://www.sloperama.com/advice/faq61.htm&#xD;&#xA; - http://www.sloperama.com/advice/lesson39.htm&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems&#xD;&#xA;  [2]: http://www.sloperama.com/advice/faq61.htm&#xD;&#xA;  [3]: http://www.sloperama.com/advice/lesson39.htm" />
  <row Id="3719" PostHistoryTypeId="2" PostId="1982" RevisionGUID="f918d7ce-6ee4-40da-87c6-991f2130a18a" CreationDate="2010-08-01T19:45:46.727" UserId="1265" Text="XML is good for arbitrarily structured documents(elements can appear in different levels of the tree) or foreign format embedding(like putting svg in an xhtml page). If you don't have those requirements it's a really inefficient format, and something more simple like csv or json is preferable. " />
  <row Id="3720" PostHistoryTypeId="2" PostId="1983" RevisionGUID="acbe4b3b-0ced-4709-93bc-e4c1a686baf3" CreationDate="2010-08-01T19:54:44.427" UserId="19" Text="Devices like [these][1] are super cheap, and I bet you can get a hold of a second computer to run it on (it doesn't need anything special) so you can capture your game from your game running machine (be sure to have a computer with S-Video out for this cheap version). There is also something like this for higher quality capture - http://www.blackmagic-design.com/products/intensity/ but requires USB 3 and is more expensive, but you can capture HDMI and higher resolution. I really see no better option than either of these two.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dealextreme.com/details.dx/sku.5707" />
  <row Id="3721" PostHistoryTypeId="2" PostId="1984" RevisionGUID="d8f9c490-6cac-4011-ad8e-2518e84cd0ae" CreationDate="2010-08-01T20:18:34.400" UserId="373" Text="Not a lot of people will play a game if they have to read 10 minutes worth of instructions first. I think it's important to have the user actually participating in the tutorial, and have the tutorial advance based on the user's pace (f.e allow them to skip certain parts that they might already know how to do (because they've played other similar games))." />
  <row Id="3722" PostHistoryTypeId="16" PostId="1984" RevisionGUID="d8f9c490-6cac-4011-ad8e-2518e84cd0ae" CreationDate="2010-08-01T20:18:34.400" UserId="-1" />
  <row Id="3723" PostHistoryTypeId="2" PostId="1985" RevisionGUID="099e3222-003d-4094-bb31-b233856b5f33" CreationDate="2010-08-01T20:20:19.357" UserId="373" Text="If your buttons are mostly just graphics, not labeled by words of what they do, there should be a way to find out exactly what that button does **without** clicking it. An effective way to do this is with tool-tips." />
  <row Id="3724" PostHistoryTypeId="16" PostId="1985" RevisionGUID="099e3222-003d-4094-bb31-b233856b5f33" CreationDate="2010-08-01T20:20:19.357" UserId="-1" />
  <row Id="3725" PostHistoryTypeId="2" PostId="1986" RevisionGUID="4e3290e9-bc15-42b9-991b-659d604213df" CreationDate="2010-08-01T20:28:24.860" UserId="259" Text="Pausable and skippable cutscenes.  In my opinion both should be in the TRCs for the major consoles.  " />
  <row Id="3726" PostHistoryTypeId="16" PostId="1986" RevisionGUID="4e3290e9-bc15-42b9-991b-659d604213df" CreationDate="2010-08-01T20:28:24.860" UserId="-1" />
  <row Id="3727" PostHistoryTypeId="2" PostId="1987" RevisionGUID="df4477e1-9abb-45c8-bbf3-cc525fe70a03" CreationDate="2010-08-01T20:34:04.520" UserId="259" Text="The ability to suspend play at any time. A pause menu option that quits the game but takes you back to the main menu.  You can resume the game from that point but only once.  This restriction stops you turning it into a quicksave system, but still allows you to exit whenever life demands it.  It would probably be in addition to some checkpointing system.&#xD;&#xA;&#xD;&#xA;A fair number of games already do this, but I can't think of any examples off the top of my head!" />
  <row Id="3728" PostHistoryTypeId="16" PostId="1987" RevisionGUID="df4477e1-9abb-45c8-bbf3-cc525fe70a03" CreationDate="2010-08-01T20:34:04.520" UserId="-1" />
  <row Id="3730" PostHistoryTypeId="5" PostId="1133" RevisionGUID="7c6c95ec-251b-471a-937b-ee9857cb6a08" CreationDate="2010-08-01T22:27:46.163" UserId="119" Comment="deleted 1 characters in body" Text="    // in entity_a's code:&#xD;&#xA;    entity_b-&gt;takeDamage();&#xD;&#xA;&#xD;&#xA;You asked how comercial games do it. ;)" />
  <row Id="3731" PostHistoryTypeId="2" PostId="1988" RevisionGUID="09a75e34-8a66-41ed-a51f-f9d68476f743" CreationDate="2010-08-01T22:31:57.393" UserId="20" Text="The people over at https://panopticlick.eff.org/ did some testing on how somebody could be uniquely identified by several values that can be gathered from almost any browser. The results are astounding and you could use a similar approach (maybe combined with other measures) to identify and track your users." />
  <row Id="3732" PostHistoryTypeId="2" PostId="1989" RevisionGUID="ef2598c8-dd56-43bb-8fd4-1c825a3d231c" CreationDate="2010-08-01T22:43:39.143" UserId="647" Text="I think it's a marketing decision. Do we want to include the concept art? Do we want to jack up the price by including 50 pages of instructions and back-story. I don't know where I'd be without my Final Fantasy manuals! Sure, you don't *realy* need them but they're part of the game; part of the package that you buy." />
  <row Id="3733" PostHistoryTypeId="2" PostId="1990" RevisionGUID="3971e93f-63ca-4d79-93c6-ede5d5951684" CreationDate="2010-08-02T00:02:54.020" UserId="1206" Text="I really like a good manual.&#xD;&#xA;Something I can look at when my computer is turned off.&#xD;&#xA;Garden, loo, whatever..&#xD;&#xA;&#xD;&#xA;A manual can contain background stories, images, concept art, etc.&#xD;&#xA;&#xD;&#xA;A good printed manual adds good value to a game.&#xD;&#xA;&#xD;&#xA;Doesn't have to be a huge manual, though - Civilization II anyone?&#xD;&#xA;&#xD;&#xA;A small, well designed one will do." />
  <row Id="3734" PostHistoryTypeId="2" PostId="1991" RevisionGUID="c9659fe2-1675-4744-bf63-54f12b00abb7" CreationDate="2010-08-02T01:21:47.197" UserId="1206" Text="If you want to use Blender as a game development platform, check out the GameKit:&#xD;&#xA;http://code.google.com/p/gamekit/&#xD;&#xA;&#xD;&#xA;Created by Erwin Coumanns from Bullet (and others), it features tight integration with IrrLicht/Ogre3D.&#xD;&#xA;&#xD;&#xA;It's still in the early stages, but it does look promising! :)&#xD;&#xA;&#xD;&#xA;The basic idea seems to be to create a scene in Blender, and then directly load that blend file into your engine (powered by either IrrLicht or Ogre3D)." />
  <row Id="3735" PostHistoryTypeId="16" PostId="1893" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-02T01:40:47.290" UserId="353" />
  <row Id="3736" PostHistoryTypeId="16" PostId="1895" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-02T01:40:47.290" UserId="353" />
  <row Id="3737" PostHistoryTypeId="16" PostId="1906" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-02T01:40:47.290" UserId="353" />
  <row Id="3738" PostHistoryTypeId="16" PostId="1909" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-02T01:40:47.290" UserId="353" />
  <row Id="3739" PostHistoryTypeId="16" PostId="1910" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-02T01:40:47.290" UserId="353" />
  <row Id="3740" PostHistoryTypeId="16" PostId="1892" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-02T01:40:47.290" UserId="353" />
  <row Id="3741" PostHistoryTypeId="2" PostId="1992" RevisionGUID="173a8beb-6de7-4c9c-8f9e-fd72850d3fc3" CreationDate="2010-08-02T02:28:10.827" UserId="1272" Text="I've never been terribly impressed with the Blender Game Engine (though I haven't worked with it enough to have a strong opinion), but as part of a content pipeline for a game, Blender is great. &#xD;&#xA;&#xD;&#xA;I've been using it for nearly 4 years and it's a fine piece of software. It's free, and while the interface is a bit menacing at first, it's very efficient once you get a feel for it (and 2.5 looks like it's cleaning it up a lot). The python scripting API is great, and allows you to automate all sorts of things, write exporters/importers and so on. I've even used it as a simple map editor for a project or two, with a script to export to the appropriate map format." />
  <row Id="3742" PostHistoryTypeId="2" PostId="1993" RevisionGUID="0b5d1cc2-b4f7-4259-8565-129ee5cd2fad" CreationDate="2010-08-02T03:59:51.163" UserId="27" Text="There are a few types of feedback you can get from playtesters, and I wonder how to best gather data for each of them...&#xD;&#xA;&#xD;&#xA;1. Crash Reports. When my C++ game crashes while someone is playing it, how do I best make sure that I know about it and even better...   what caused it? Even getting something as simple as the file and line number which caused a crash would be incredibly helpful.&#xD;&#xA;&#xD;&#xA;2. Design Feedback. When a play tester is playing the game, how can I figure out if they are having fun, why they are having fun, why they aren't having fun, and what we should spend time adjusting?" />
  <row Id="3743" PostHistoryTypeId="1" PostId="1993" RevisionGUID="0b5d1cc2-b4f7-4259-8565-129ee5cd2fad" CreationDate="2010-08-02T03:59:51.163" UserId="27" Text="How do you get useful data from playtesters?" />
  <row Id="3744" PostHistoryTypeId="3" PostId="1993" RevisionGUID="0b5d1cc2-b4f7-4259-8565-129ee5cd2fad" CreationDate="2010-08-02T03:59:51.163" UserId="27" Text="&lt;debug&gt;&lt;playtesting&gt;&lt;feedback&gt;" />
  <row Id="3745" PostHistoryTypeId="2" PostId="1994" RevisionGUID="7b90d55f-9e42-4ec1-b69e-7243777b9304" CreationDate="2010-08-02T04:19:27.247" UserId="51" Text="I'm assuming you're talking about on-site playtesters and not internet beta testers.&#xD;&#xA;&#xD;&#xA;Rule #1: **Don't help them**.  Frustration should be the top thing you should be checking for.  The ideal situation would be a two way mirror with your team on one side and the playtester on another with one video camera on their face and another on the screen.  Obviously this isn't feasible for most people, so do the best you can.  Just having your designers sit and watch where people get stuck is very useful information.  You're not going to be standing over their shoulder when they take the game home, so you giving advice on how to pass certain sections isn't going to give you the information you need.&#xD;&#xA;&#xD;&#xA;Rule #2: **Don't give them what they want**.  After a playtest session you have some kind of questionnaire that they fill out.  The specific suggestions they have are usually not wise to take at face value.  Usually there's some root cause that is triggering most responses and they just don't know how to express it.  If you can figure that out, you'll be better off doing it.  Although at the moment I'm having trouble coming up with specific examples.&#xD;&#xA;&#xD;&#xA;Rule #3: **Data is king**.  If you can (and this is really another wishlist item, honestly), track everything you can.  Track where players die.  Track where they run out of ammo from a specific gun.  Track what pickups they miss.  Track what upgrades they buy.  Track what enemies do damage to them.  Obviously these are FPS-specific examples, but I'm sure there are domain specific ones for whatever game you're doing.  If everybody's doing something or not doing something, those are usually areas that you should spend a little more time looking at.&#xD;&#xA;&#xD;&#xA;Basically, you don't care what player's *think*.  You care about getting raw numbers for what players *do*.  You need virgin eyes to see your game and tell you what makes them frustrated and what they're being led to do.&#xD;&#xA;&#xD;&#xA;---------&#xD;&#xA;&#xD;&#xA;For crashes, investigate &lt;a href=&quot;http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx&quot;&gt;minidumps&lt;/a&gt;.  They're not perfect, but are a very useful tool to figure out where crashes are.&#xD;&#xA;&#xD;&#xA;Also consider a built-in bug reporting tool.  Something where the user can take a screenshot , add a description, and email it to someone automatically from inside the game.  Ideally with a snapshot of the world (i.e. quicksave or some kind of memory dump) if your game supports it." />
  <row Id="3746" PostHistoryTypeId="2" PostId="1995" RevisionGUID="f062bd8e-93ad-4a9e-9e66-adc237d6b8a7" CreationDate="2010-08-02T05:19:48.713" UserId="321" Text="In the game I'm working on, we have our own custom GUI framework. I've found it to be very simple, but still doing everything I want it to do. I don't know whether it's a &quot;pattern&quot; that many others use, but it works well for us.&#xD;&#xA;&#xD;&#xA;Basically, all the buttons, checkboxes, etc. are subclasses of the class Element; and elements have Events. Then we have CompoundElements (which are  themselves a subclass of Element), which contain other elements. In each cycle, three methods are called: processEvent(event), tick(time), and draw(surface). Each CompoundElement then calls those methods on its child Elements. In those calls (particularly the processEvent method), we fire off any relevant events.&#xD;&#xA;&#xD;&#xA;All of this is in Python (a much slower language than C++), and it runs perfectly fine." />
  <row Id="3747" PostHistoryTypeId="2" PostId="1996" RevisionGUID="6c67f3d8-42d6-4a03-8df4-c08e6978fc5d" CreationDate="2010-08-02T06:30:35.087" UserId="1214" Text="Ofcourse this depends a lot on...&#xD;&#xA;a) what kind of testing you want to have done, and&#xD;&#xA;b) what kind of game you are testing, and&#xD;&#xA;c) what kind of testers and infrastructure you have available...&#xD;&#xA;&#xD;&#xA;It also differs a lot if you are testing for a) functionality, b) balancing c) game-design&#xD;&#xA;&#xD;&#xA;But in general you might want to consider these aspects...&#xD;&#xA;&#xD;&#xA;***a) Choose the right person for the job**&#xD;&#xA;Sounds too simple to mention, but i've seen it many times and just have seen it live again. As always, there are significant differences between people in regard to how good they are at different jobs. Some people who are willing or maybe eager to do testing might not be playing thorough enough to find unusual (or even simple) bugs. Some are not good at describing the bugs. Some are better at testing balancing issues, some are more attentive to visual weaknesses, some are more creative in playing the game in unusual ways and finde hidden/rare bugs, some are more attentive to technical or visual quality, some are better in understanding aspects of the game mechanic and may be even able to suggest meaningful changes (if you want your testers to do that ;).&#xD;&#xA;&#xD;&#xA;***b) Use an Issue-Tracker / Bug-Tracker Software**&#xD;&#xA;These tools can not only help in organizing your issues but also in increasing the quality of the output of your testers by giving them a frame to work within and by learning from feedback they get from developers about their issues. It helps to improve the quality of the output of your testers a lot faster than if you work without it. (It also helps a lot with remote testers)&#xD;&#xA;Typical software used by game studios is i.e. Mantis, JIRA, (and ofcourse lots of others..)&#xD;&#xA;See [Wikipedia][1] for a general list and also this [post][2] on SO.&#xD;&#xA;&#xD;&#xA;**c) Add ingame testing tools**&#xD;&#xA;Typical are Shortcuts to test specific levels or sections of the game. Displaying extra information during the game to the testers so that they can add this to bugreports. This could be the position in a level, the number of active objects in a scene, the amount of texture-ram or palettes currently in use, anything helpful to the developers.  &#xD;&#xA;&#xD;&#xA;**d) Combine experienced testers with fresh blood**&#xD;&#xA;Always a good thing to have testers who are very experienced with your game and have learned what the typical problems are and how to (re)-test them. At the same time you want new &quot;virgin&quot; players once in a while, especially for balancing.&#xD;&#xA;&#xD;&#xA;**e) Have a Test Manager**&#xD;&#xA;Someone who coordinates the process and tailors it to the game at hand, the current priorities and the available testers and testing environment.&#xD;&#xA;&#xD;&#xA;**f) Have a Testplan Document**&#xD;&#xA;This would be worth an extra post.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Comparison_of_issue-tracking_systems &quot;Wikipedia&quot;&#xD;&#xA;  [2]: http://stackoverflow.com/questions/341663/bug-tracker-feature-set-comparison &quot;post&quot;" />
  <row Id="3748" PostHistoryTypeId="5" PostId="1994" RevisionGUID="45275d82-2d8d-45bc-8d0a-2e78d3756d83" CreationDate="2010-08-02T07:39:56.710" UserId="51" Comment="added 87 characters in body" Text="I'm assuming you're talking about on-site playtesters and not internet beta testers.&#xD;&#xA;&#xD;&#xA;Rule #1: **Don't help them**.  Frustration should be the top thing you should be checking for.  The ideal situation would be a two way mirror with your team on one side and the playtester on another with one video camera on their face and another on the screen.  Obviously this isn't feasible for most people, so do the best you can.  Just having your designers sit and watch where people get stuck is very useful information.  You're not going to be standing over their shoulder when they take the game home, so you giving advice on how to pass certain sections isn't going to give you the information you need.  *Edit*: another way of putting it is this: **Don't think they're &quot;Playing it wrong&quot;**&#xD;&#xA;&#xD;&#xA;Rule #2: **Don't give them what they want**.  After a playtest session you have some kind of questionnaire that they fill out.  The specific suggestions they have are usually not wise to take at face value.  Usually there's some root cause that is triggering most responses and they just don't know how to express it.  If you can figure that out, you'll be better off doing it.  Although at the moment I'm having trouble coming up with specific examples.&#xD;&#xA;&#xD;&#xA;Rule #3: **Data is king**.  If you can (and this is really another wishlist item, honestly), track everything you can.  Track where players die.  Track where they run out of ammo from a specific gun.  Track what pickups they miss.  Track what upgrades they buy.  Track what enemies do damage to them.  Obviously these are FPS-specific examples, but I'm sure there are domain specific ones for whatever game you're doing.  If everybody's doing something or not doing something, those are usually areas that you should spend a little more time looking at.&#xD;&#xA;&#xD;&#xA;Basically, you don't care what player's *think*.  You care about getting raw numbers for what players *do*.  You need virgin eyes to see your game and tell you what makes them frustrated and what they're being led to do.&#xD;&#xA;&#xD;&#xA;---------&#xD;&#xA;&#xD;&#xA;For crashes, investigate &lt;a href=&quot;http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx&quot;&gt;minidumps&lt;/a&gt;.  They're not perfect, but are a very useful tool to figure out where crashes are.&#xD;&#xA;&#xD;&#xA;Also consider a built-in bug reporting tool.  Something where the user can take a screenshot , add a description, and email it to someone automatically from inside the game.  Ideally with a snapshot of the world (i.e. quicksave or some kind of memory dump) if your game supports it." />
  <row Id="3749" PostHistoryTypeId="2" PostId="1997" RevisionGUID="8c6bc882-8e2c-4c5a-9851-912b5636582f" CreationDate="2010-08-02T08:58:36.723" UserId="308" Text="Regarding letting the user specify local MP3s to play.&#xD;&#xA;&#xD;&#xA;The only reason I see to do this is if the background music needs to stop (or reduce in volume) at certain points (say while some voice-over dialog is playing) then it is good because the game maintains control of the BG music but the user can pick the type of music they like.&#xD;&#xA;&#xD;&#xA;If user-selected BG music will have no interference with gameplay, just let them play the music themselves, its not like your game is the only time they listen to music, they will have a method of playing it if they want to." />
  <row Id="3750" PostHistoryTypeId="5" PostId="144" RevisionGUID="cb60feb8-039c-4593-a464-2209e2999d57" CreationDate="2010-08-02T10:11:30.593" UserId="122" Comment="typo" Text="SoulBeaver was correct to point out that you need to know art.&#xD;&#xA;A lot of the tutorials online will give you a mechanical guide on how to achieve a certain effect or how to draw with a tablet etc but if you don't know how to draw then you won't be able to produce much.&#xD;&#xA;&#xD;&#xA;By all means learn the software, if you want to do spriting then you need to know how to use something like Photoshop, Paint.net Gimp, graphics gale etc but don't neglect your drawing skills and your ability to interpret what you have in your head into something tangible.&#xD;&#xA;&#xD;&#xA;Someone on Reddit university is starting a course on [Video game concept art and drawing][1]&#xD;&#xA;It might not be exactly what you're looking for but it's free and might be worth a look.&#xD;&#xA;&#xD;&#xA;  [1]: http://universityofreddit.com/v2/class.php?id=55" />
  <row Id="3751" PostHistoryTypeId="2" PostId="1998" RevisionGUID="e29c01ef-554f-4e5f-8f8b-3b2ef9d6bf4d" CreationDate="2010-08-02T10:30:38.563" UserId="1214" Text="You might want to check this link to [cgsociety][1] and another one to [thegnomonworkshop][2] Good luck and have fun!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cgsociety.org/&#xD;&#xA;  [2]: http://www.thegnomonworkshop.com/" />
  <row Id="3752" PostHistoryTypeId="5" PostId="1857" RevisionGUID="6db822fc-a16c-497a-b4a0-82aa210bc683" CreationDate="2010-08-02T10:47:29.590" UserId="119" Comment="added 133 characters in body" Text="XML is a good choice if you're not limited by size and it is supported natively (eg in .NET and Flash) but if you want a slim format you can create your own format and parser quite easy. I normally use 1 character eg. comma to seperate each object. To decode the string do a split on comma. Now each object needs different properties so seperate these with a different character eg semi colon, and use another character to seperate the property names from property vales, eg. Colon. All thus can be decoded easily without regex just by using string.split. Here is an example:&#xD;&#xA;&#xD;&#xA;    id:1;x:5;y:45.2;angle:45,id:28;x:56;y:89;angle:12;health:78&#xD;&#xA;&#xD;&#xA;you can save even more space by keeping property names down to 1 character, eg h for health. Eg. &#xD;&#xA;&#xD;&#xA;    i:1;x:5;y:45.2;a:45,i:28;x:56;y:89;a:12;h:78&#xD;&#xA;&#xD;&#xA;Compare to JSON alternative:&#xD;&#xA;&#xD;&#xA;    {&quot;o&quot;:[{&quot;i&quot;:1, &quot;x&quot;:5, &quot;y&quot;:45.2, &quot;a&quot;:45}, &quot;i&quot;:28, &quot;x&quot;:56, &quot;y&quot;:89, &quot;a&quot;:12, &quot;h&quot;:78}]}&#xD;&#xA;&#xD;&#xA;Also, if you want to get the size of your numbers down, you can encode them into ASCI. If you use a standard 256 asci charset you can encode an integer between 0 and 255 into one character. If you use 2 that's 256x256 = 63000 possible numbers, which should be enough to store a relative position in your play area.&#xD;&#xA;&#xD;&#xA;Tile grids can be stored as just a string with each character representing a different type of tile eg:&#xD;&#xA;&#xD;&#xA;    i789pog5h3kl&#xD;&#xA;&#xD;&#xA;where I might mean lava, 9 mean grass etc" />
  <row Id="3753" PostHistoryTypeId="5" PostId="1857" RevisionGUID="6a3faf8e-8ac7-4d55-b7b8-6776b2dbec42" CreationDate="2010-08-02T10:54:50.237" UserId="119" Comment="added 1 characters in body" Text="XML is a good choice if you're not limited by size and it is supported natively (eg in .NET and Flash) but if you want a slim format you can create your own format and parser quite easy. I normally use 1 character eg. comma to seperate each object. To decode the string do a split on comma. Now each object needs different properties so seperate these with a different character eg semi colon, and use another character to seperate the property names from property vales, eg. Colon. All thus can be decoded easily without regex just by using string.split. Here is an example:&#xD;&#xA;&#xD;&#xA;    id:1;x:5;y:45.2;angle:45,id:28;x:56;y:89;angle:12;health:78&#xD;&#xA;&#xD;&#xA;you can save even more space by keeping property names down to 1 character, eg h for health. Eg. &#xD;&#xA;&#xD;&#xA;    i:1;x:5;y:45.2;a:45,i:28;x:56;y:89;a:12;h:78&#xD;&#xA;&#xD;&#xA;Compare to JSON alternative:&#xD;&#xA;&#xD;&#xA;    {&quot;o&quot;:[{&quot;i&quot;:1, &quot;x&quot;:5, &quot;y&quot;:45.2, &quot;a&quot;:45}, {&quot;i&quot;:28, &quot;x&quot;:56, &quot;y&quot;:89, &quot;a&quot;:12, &quot;h&quot;:78}]}&#xD;&#xA;&#xD;&#xA;Also, if you want to get the size of your numbers down, you can encode them into ASCI. If you use a standard 256 asci charset you can encode an integer between 0 and 255 into one character. If you use 2 that's 256x256 = 63000 possible numbers, which should be enough to store a relative position in your play area.&#xD;&#xA;&#xD;&#xA;Tile grids can be stored as just a string with each character representing a different type of tile eg:&#xD;&#xA;&#xD;&#xA;    i789pog5h3kl&#xD;&#xA;&#xD;&#xA;where I might mean lava, 9 mean grass etc" />
  <row Id="3754" PostHistoryTypeId="5" PostId="1857" RevisionGUID="3580a60f-819e-43c6-a5e0-7de6c8eabf5e" CreationDate="2010-08-02T12:00:07.753" UserId="119" Comment="added 328 characters in body; edited body" Text="XML is a good choice if you're not limited by size and it is supported natively (eg in .NET and Flash) but if you want a slim format you can create your own format and parser quite easy. I normally use 1 character eg. comma to seperate each object. To decode the string do a split on comma. Now each object needs different properties so seperate these with a different character eg semi colon, and use another character to seperate the property names from property vales, eg. Colon. All thus can be decoded easily without regex just by using string.split. Here is an example:&#xD;&#xA;&#xD;&#xA;    id:1;x:5;y:45.2;angle:45,id:28;x:56;y:89;angle:12;health:78&#xD;&#xA;&#xD;&#xA;you can save even more space by keeping property names down to 1 character, eg h for health. Eg. &#xD;&#xA;&#xD;&#xA;    i:1;x:5;y:45.2;a:45,i:28;x:56;y:89;a:12;h:78&#xD;&#xA;&#xD;&#xA;Compare to JSON alternative:&#xD;&#xA;&#xD;&#xA;    {&quot;o&quot;:[{&quot;i&quot;:1, &quot;x&quot;:5, &quot;y&quot;:45.2, &quot;a&quot;:45}, {&quot;i&quot;:28, &quot;x&quot;:56, &quot;y&quot;:89, &quot;a&quot;:12, &quot;h&quot;:78}]}&#xD;&#xA;&#xD;&#xA;Also, if you want to get the size of your numbers down, you can encode them into ASCI. If you use a standard 256 asci charset you can encode an integer between 0 and 255 into one character. If you use 2 that's 256x256 = 65536 possible numbers, which should be enough to store a relative position in your play area.&#xD;&#xA;&#xD;&#xA;To get a further size reduction, you can use read/write order to determine which value is which, so the first two characters represent the id, the next two are the x position, the next two the y, then the angle, then health, etc. So:&#xD;&#xA;&#xD;&#xA;    F5DGP@%&amp;002DFTK#OP1F&#xD;&#xA;&#xD;&#xA;could store all the same information as the other examples.&#xD;&#xA;&#xD;&#xA;Tile grids can be stored as just a string with each character representing a different type of tile eg:&#xD;&#xA;&#xD;&#xA;    i789pog5h3kl&#xD;&#xA;&#xD;&#xA;where I might mean lava, 9 mean grass etc" />
  <row Id="3755" PostHistoryTypeId="2" PostId="1999" RevisionGUID="baf90061-20c3-40f3-9c33-c1f6297c4a49" CreationDate="2010-08-02T12:49:03.160" UserId="1154" Text="One of the &quot;Game Programming Gems&quot; volumes had a state machine implementation in it intended for game states; http://emergent.net/Global/Documents/textbook/Chapter1_GameAppFramework.pdf has an example of how to use it for a small game, and shouldn't be too Gamebryo-specific to be readable.&#xD;&#xA;" />
  <row Id="3756" PostHistoryTypeId="2" PostId="2000" RevisionGUID="758bc4e5-1948-4c26-9761-4505d8e01e7b" CreationDate="2010-08-02T13:05:44.390" UserId="338" Text="Another possibility to generate asteroids dynamically would be to take a predetermined form from a set, and modify a random number of time the edges : you take an edge, choose a point on this edge (near the middle), and move it along the perpendicular direction, towards the ouside or the inside. you replace your initial edge with the two edges resulting of the use of the point :   &#xD;&#xA;&#xD;&#xA;`A---------B`   become    &#xD;&#xA;&#xD;&#xA;    A--     --B     &#xD;&#xA;       --C--&#xD;&#xA;&#xD;&#xA;You can do this a number of time, on initial or resulting edges. This is a simple fractal/recusive modification of the edges. (as with all recursive modification, the size of variation should go down with the depth)&#xD;&#xA;&#xD;&#xA;Regards&#xD;&#xA;&#xD;&#xA;Guillaume&#xD;&#xA;" />
  <row Id="3757" PostHistoryTypeId="2" PostId="2001" RevisionGUID="69e3d4ae-9af9-4477-ae45-50e92e249880" CreationDate="2010-08-02T14:10:06.420" UserId="1101" Text="Currency sinks alone won't save you, even if you're not creating free money from resources. If your number of players changes, then the distribution of money will change also. And if you scale the money supply linearly to match the number of players, that does nothing for the inequality of wealth distribution (which will tend to get worse as the numbers rise) and it tends to ignore that your new players don't have an 'average' amount of money but in fact start off in relative poverty. It's incredibly hard to get right which is why the real world doesn't do a great job of it either, despite having a more closed economy.&#xD;&#xA;&#xD;&#xA;In my view the best thing to prevent inflation is to avoid currency altogether. If your game design allows for a barter-based system, that can help, because it's typically harder for players to manipulate the flow of goods. (Someone who can carry 10,000 gold pieces can rarely carry 10,000 pigs worth 1 gold piece each.) A compromise is multiple currencies with unfavourable exchange rates, which coerce players into preferring goods over stashes of cash." />
  <row Id="3758" PostHistoryTypeId="5" PostId="1857" RevisionGUID="4698349f-a817-4f3b-98a8-175efb312f6f" CreationDate="2010-08-02T14:24:57.290" UserId="119" Comment="added 185 characters in body" Text="XML is a good choice if you're not limited by size and it is supported natively (eg in .NET and Flash) but if you want a slim format you can create your own format and parser quite easy. I normally use 1 character eg. comma to seperate each object. To decode the string do a split on comma. Now each object needs different properties so seperate these with a different character eg semi colon, and use another character to seperate the property names from property vales, eg. Colon. All thus can be decoded easily without regex just by using string.split. Here is an example:&#xD;&#xA;&#xD;&#xA;    id:1;x:5;y:45.2;angle:45,id:28;x:56;y:89;angle:12;health:78&#xD;&#xA;&#xD;&#xA;you can save even more space by keeping property names down to 1 character, eg h for health. Eg. &#xD;&#xA;&#xD;&#xA;    i:1;x:5;y:45.2;a:45,i:28;x:56;y:89;a:12;h:78&#xD;&#xA;&#xD;&#xA;Compare to JSON alternative:&#xD;&#xA;&#xD;&#xA;    {&quot;o&quot;:[{&quot;i&quot;:1, &quot;x&quot;:5, &quot;y&quot;:45.2, &quot;a&quot;:45}, {&quot;i&quot;:28, &quot;x&quot;:56, &quot;y&quot;:89, &quot;a&quot;:12, &quot;h&quot;:78}]}&#xD;&#xA;&#xD;&#xA;Also, if you want to get the size of your numbers down, you can encode them using the full set of printable UTF16 characters. This thread inspired me to ask [a question over on Stack Overflow of how much data you could pack into one on-screen character][1]. The answer seem to be somewhere over 40,000 values for an integer, if you don't mind having brail, Kanji and chess pieces: ♔♕♖♗♘♙♚♛♜♝♞♟&#xD;&#xA;&#xD;&#xA;To get a further size reduction, you can use read/write order to determine which value is which, so the first two characters represent the id, the next two are the x position, the next two the y, then the angle, then health, etc. So:&#xD;&#xA;&#xD;&#xA;    F5DGP@%&amp;002DFTK#OP1F&#xD;&#xA;&#xD;&#xA;could store all the same information as the other examples.&#xD;&#xA;&#xD;&#xA;Tile grids can be stored as just a string with each character representing a different type of tile eg:&#xD;&#xA;&#xD;&#xA;    i789pog5h3kl&#xD;&#xA;&#xD;&#xA;where I might mean lava, 9 mean grass etc&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3387594/how-much-data-can-you-encode-in-a-single-character" />
  <row Id="3760" PostHistoryTypeId="2" PostId="2002" RevisionGUID="0e1a1d15-3d1d-451f-a43f-3fb64e0957d7" CreationDate="2010-08-02T14:44:26.867" UserId="953" Text="While the other answers support the idea that the legal issues are a bit vague and you're probably fine, there's another issue here.  Ethically, this may be plagiarism.  If you're doing this as an exercise to improve your skills, or replicating a game that is no longer available, it might be fine.  But if you're making a game for general release for love or money, this is a bad idea.&#xD;&#xA;&#xD;&#xA;The players who would like your game are likely to have played the original, and if they liked the original, they're probably going to think badly of you for having copied it.  If they didn't like the original, they won't like your game anyway.  It's far better, in my opinion, to expand on the original game with your own level designs and maybe some new gameplay elements.  From an ethical perspective, it's also a better idea not to lift so directly from another person's work." />
  <row Id="3761" PostHistoryTypeId="2" PostId="2003" RevisionGUID="ed2a760d-3f37-43b5-96c5-a8eb2e1253b9" CreationDate="2010-08-02T14:49:25.747" UserId="741" Text="The simplest and most effective way to counter 'farming' of scores is to adjust the score received based on the disparity between the players. Bear in mind it's not just one player creating multiple accounts you need to worry about: imagine two friends, one deliberately losing so the others ranking is artificially boosted.&#xD;&#xA;&#xD;&#xA;Chess and other games avoid this through forms of the [Elo rating system][1]. Basically the reward for beating someone of a higher rating than you is high, but the reward for beating someone of a much lower rating is very low. This very quickly makes deliberately losing to advantage another player ineffective. You can tune the rate at which winning against a poor player quickly results in little net gain. A player playing 'properly', i.e. winning against a wide range of similarly ranked opponents, will advance very quickly.&#xD;&#xA;&#xD;&#xA;NB: it's not enough to just penalise players who lose so that winning against them gets you nothing, because then players can create an account, lose with it deliberately, then create another account. This isn't so much of an issue if there is a barrier to entry (e.g. entering credit card details to create a new account), but for free-to-play games that would work.&#xD;&#xA;&#xD;&#xA;Also its worth noting that there is a danger if the ratings are used as a measure of actual ability, rather than just as a way to modify any rewards the player receives. If the rating itself is the measure, canny players will use the system to sabotage others. I.e. Player 1 gains a lot of skill/ability through practice, and then creates a new account. Player 2, who is about as good as Player 1, accepts a challenge from the newcomer. Losing to the newcomer will massively hurt their ranking, even though really the new player is of equivalent rank. However if the rating isn't actually used to measure the player, this is actually in Player 2's interest (having their rating pulled down will allow them to advance faster given their actual skill level).&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Elo_rating_system" />
  <row Id="3762" PostHistoryTypeId="2" PostId="2004" RevisionGUID="d311cbc4-e40d-4142-9598-e1f5fdb67c27" CreationDate="2010-08-02T15:03:20.910" UserId="741" Text="Logging. Everything that happens on the server should be logged, and ideally everything that comes from the client. The client is inherently untrustworthy, but even logging untrusted data can be illuminating.&#xD;&#xA;&#xD;&#xA;Once everything is logged, cheat detection becomes a matter of analysing the data. Some cheats will be obvious (values out of acceptable ranges, for example being able to move between points far faster than the avatar normally allows), others are more insidious (like aimbots allowing pixel perfect targetting within artificially short timeframes). Some are even harder to detect (like wallhacks), but recording as much as possible allows both automated and manual detection. There are various articles on it, but generally cheats are very easily spotted in automated detection because they are so predictable/repeatable, in exactly the way that human players aren't.&#xD;&#xA;&#xD;&#xA;Since recording absolutely everything is most likely infeasible, tiered logging is useful. For example reports of cheating by users, or simple basic logging that detects the possibility of cheating (score which are way above the statistical curve), would be enough to flag a particular client/account/CD-key for more verbose logging, which could then be used to prove beyond reasonable doubt that a cheat is in use.&#xD;&#xA;&#xD;&#xA;What you do when you detect a cheat is another matter entirely. Account banning after the fact is good, especially when you have an automated detection mechanism that is sufficiently reliable. Banning early both alerts the cheats that they are being detected, and also runs the risk of false positives due to inconclusive detection mechanisms. Banning too late runs the risk of ruining the game experience for others. This is a very grey area, and requires the developers to make the judgement call." />
  <row Id="3763" PostHistoryTypeId="16" PostId="2004" RevisionGUID="d311cbc4-e40d-4142-9598-e1f5fdb67c27" CreationDate="2010-08-02T15:03:20.910" UserId="-1" />
  <row Id="3764" PostHistoryTypeId="2" PostId="2005" RevisionGUID="d567859a-1313-4f47-857f-f1d510da9736" CreationDate="2010-08-02T15:16:14.370" UserId="715" Text="I'm on the planning stages for an internal game engine I am about to start creating, which will be used for all my games going forward. But I'm struggling a bit with how it should be built.  &#xD;&#xA;&#xD;&#xA;The choices come down to: framework or library.  &#xD;&#xA;&#xD;&#xA;My basic objective is to hide engine details as much as possible to keep high level game development on scripts and config files as much as possible. But also to reuse the core engine for any tools we might develop in the future.  &#xD;&#xA;&#xD;&#xA;Frameworks can make things nice and easy for development, but then you're locked in. Libraries are good if you're only interested in a specific subsystem. But we need to glue everything together in a game by game basis.  &#xD;&#xA;&#xD;&#xA;Well there is also another, building the engine as a standalone exe that handles all game resources, and all the subsystems. Game logic (and other per game dynamic stuff) is done exclusively on scripts with config files to configure each internal engine subsystem.  &#xD;&#xA;&#xD;&#xA;Which one will give me more flexibility in the future.  &#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="3765" PostHistoryTypeId="1" PostId="2005" RevisionGUID="d567859a-1313-4f47-857f-f1d510da9736" CreationDate="2010-08-02T15:16:14.370" UserId="715" Text="Game Engine framework or library" />
  <row Id="3766" PostHistoryTypeId="3" PostId="2005" RevisionGUID="d567859a-1313-4f47-857f-f1d510da9736" CreationDate="2010-08-02T15:16:14.370" UserId="715" Text="&lt;libraries&gt;&lt;framework&gt;&lt;engine&gt;" />
  <row Id="3767" PostHistoryTypeId="6" PostId="548" RevisionGUID="d3c72d92-c9be-4e8d-94dd-86ebc60fa60e" CreationDate="2010-08-02T15:22:39.103" UserId="288" Comment="edited tags" Text="&lt;tools&gt;&lt;blender&gt;&lt;blender-game-engine&gt;" />
  <row Id="3768" PostHistoryTypeId="2" PostId="2006" RevisionGUID="3865c1c1-0ca3-4b28-8d6a-f0210543f611" CreationDate="2010-08-02T15:25:51.040" UserId="189" Text="In terms of flexibility, I think you answered your own question: &quot;Frameworks can make things nice and easy for development, **but then you're locked in**.&quot; This doesn't mean frameworks have to be inflexible; every game, for example, has a game loop. Microsoft's XNA framework is 99% library, but your game extends the Game class which just provides a few blank functions for the things which are guaranteed to be in every game: `LoadContent`, `Update`, `Draw`. It's a prime example of a nonrestrictive framework.&#xD;&#xA;&#xD;&#xA;One might say a framework is nothing more than a library combined with a template class(es) that are hooked into the library, at least this has been my experience.&#xD;&#xA;&#xD;&#xA;I tend to prefer libraries over frameworks. jMonkeyEngine, for example, is great but it's a framework and as a result I've noticed it receives tons of flak. SDL, on the other hand, is amazingly popular; it's just a library. It provides what you need but gets out of your way to do whatever you want with it.&#xD;&#xA;&#xD;&#xA;There's not necessarily a lot of gluing to be done on a game-by-game basis. Especially if you write parts of your library for each piece of the game loop; a FPS timer/counter, for example, would prevent that commonly-rewritten part from needing to be reinvented with every game.&#xD;&#xA;&#xD;&#xA;Also, libraries can be as general or specific as you want to make it. If you're making a racing game and you want your library to have racing-specific features, that's fine. It's your creation and you get to choose exactly how flexible you want it.&#xD;&#xA;&#xD;&#xA;Here's a tip, too: if you write the library alongside a game, you will inevitably end up accidentally coupling the library to the game, or making it too inflexible. You'll figure it out as soon as you try to make a different game with it, and you'll spend time separating it; this isn't necessarily a bad thing. But if you're aiming for a stellar library, try making two totally different games at the same time, and extract the similar pieces into your library. You'll get a LOT less coupling, it will be a lot more flexible, and your third game will probably still expose some weaknesses but your library will be much better in the end. It is, however, obviously much harder and more time-consuming to do." />
  <row Id="3769" PostHistoryTypeId="2" PostId="2007" RevisionGUID="248a94a4-fff0-4f78-9c17-b56512a700a7" CreationDate="2010-08-02T15:33:17.563" UserId="370" Text="###Build a framework.&#xD;&#xA;&#xD;&#xA;I have experience with building both.  I prefer to use libraries over frameworks.  Frameworks feel very restrictive and *&quot;bossy&quot;*.  So when I built my first game I wanted to build an engine that was composed of many libraries that could be easily reused in other projects.&#xD;&#xA;&#xD;&#xA;It was a disaster.  It spent half my time writing glue code between my various libraries.  My libraries also became bloated with extra abstractions, that it became a huge core to add features to the libraries/components.&#xD;&#xA;&#xD;&#xA;Now, however my engines are built with the game I writing in mind.  I still keep my eyes open for abstractions that will allow me to reuse it or the new features I'm adding in later games.  I'm much more happy and productive.&#xD;&#xA;&#xD;&#xA;For me the turning point was to decide to not publish my engine.  I may still publish it, but for now knowing I don't need to justify my game specific hacks to other users has let me build an engine better suited to my games.&#xD;&#xA;" />
  <row Id="3770" PostHistoryTypeId="5" PostId="2006" RevisionGUID="a19a474f-ac28-4939-92e8-003c747b12f9" CreationDate="2010-08-02T15:33:30.557" UserId="189" Comment="added 708 characters in body" Text="In terms of flexibility, I think you answered your own question: &quot;Frameworks can make things nice and easy for development, **but then you're locked in**.&quot; This doesn't mean frameworks have to be inflexible; every game, for example, has a game loop. Microsoft's XNA framework is 99% library, but your game extends the Game class which just provides a few blank functions for the things which are guaranteed to be in every game: `LoadContent`, `Update`, `Draw`. It's a prime example of a nonrestrictive framework.&#xD;&#xA;&#xD;&#xA;One might say a framework is nothing more than a library combined with a template class(es) that are hooked into the library, at least this has been my experience.&#xD;&#xA;&#xD;&#xA;I tend to prefer libraries over frameworks. [jMonkeyEngine][1], for example, is great but it's a framework and as a result I've noticed it receives tons of flak. [SDL][2], on the other hand, is amazingly popular; it's just a library. It provides what you need but gets out of your way to do whatever you want with it.&#xD;&#xA;&#xD;&#xA;With a library, there's not necessarily a lot of gluing to be done on a game-by-game basis -- especially if you write parts of your library to support each piece of the game loop; a Frames-Per-Second timer/counter, for example, would prevent that commonly-rewritten part from needing to be reinvented with every game.&#xD;&#xA;&#xD;&#xA;Also, libraries can be as general or specific as you want to make them. If you're making a racing game and you want your library to have racing-specific features, that's fine. It's your creation and you get to choose exactly how flexible you want it. This would be very feasible in a situation where you're in a long-term contract with Nascar to develop numerous racing games, for example. You wouldn't necessarily want a framework to potentially tie you into a classic racing-in-a-circle game when Nascar comes up and asks for an offroad game, but you would want a racing-game-specific library since you know Nascar isn't going to ask for a shooter.&#xD;&#xA;&#xD;&#xA;Here's a tip for development, too: if you write the library alongside a game, you will inevitably end up accidentally coupling the library to the game, or making it too inflexible, no matter how much planning you do. You'll figure it out as soon as you try to make a different game with it, and you'll spend time separating it; this isn't necessarily a bad thing and you might consciously decide to do this, since you'll have more free time after your first game is released. But if you're aiming for a stellar library from the get-go, **try making two totally different games at the same time, and extract the similar pieces into your library**. You'll get a LOT less coupling, it will be a lot more flexible, and your third game will probably still expose some weaknesses but your library will be much better in the end. It is, however, obviously much harder and more time-consuming to do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/&#xD;&#xA;  [2]: http://www.libsdl.org/" />
  <row Id="3771" PostHistoryTypeId="2" PostId="2008" RevisionGUID="bfc8713d-13a9-44fd-ab91-c1ba12b044bf" CreationDate="2010-08-02T15:40:14.270" UserId="458" Text="For crash reports, you should be relying on paid QA staff, not playtesters. QA is someone you hire specifically for their ability to find bugs and report them in a meaningful way, and a good tester is worth their weight in gold (and costs only a tenth of their weight in gold, compared to programmers!).&#xD;&#xA;&#xD;&#xA;If you're worried about &quot;oh, what if they accidentally discover a crash, we wouldn't want to miss out just because they're not testing for that&quot;... this is what logging is for. A sufficiently good logging system should be recording enough elements of play to be able to reproduce a crash exactly.&#xD;&#xA;&#xD;&#xA;For design feedback, there's no substitute for having your game designers actually watch them play (or use a video recorder if you must, etc.). Don't rely on playtester memory or opinion, both of which are notoriously poor. But if you're watching them play in real time, it is patently obvious just by looking at their face and body posture whether they're engaged, bored, or frustrated." />
  <row Id="3772" PostHistoryTypeId="2" PostId="2009" RevisionGUID="e6058c80-5e42-4e2a-8b82-81836c436cc2" CreationDate="2010-08-02T16:24:40.700" UserId="475" Text="If you're building a web game, Google has provided free fonts here: http://code.google.com/webfonts  This is a great service for web developers, because web licenses for fonts can be a gray area.  They have only a small fraction of the fonts you can find on sites like others have suggested, however." />
  <row Id="3773" PostHistoryTypeId="16" PostId="2009" RevisionGUID="e6058c80-5e42-4e2a-8b82-81836c436cc2" CreationDate="2010-08-02T16:24:40.700" UserId="-1" />
  <row Id="3774" PostHistoryTypeId="2" PostId="2010" RevisionGUID="a557d6e8-fdf7-4ef0-a942-9f0b35c9cffa" CreationDate="2010-08-02T16:30:35.590" UserId="47" Text="Don't worry about the future quite yet.  Worry about your current game, now.  Otherwise you are not going to get anywhere because you are fretting on the details.  &#xD;&#xA;&#xD;&#xA;You should concentrate on building the game first and then later, if the game was successful enough, you can extract it out into something reusable for your next game.  This will keep you from being locked in to something else and give you full control over your project." />
  <row Id="3775" PostHistoryTypeId="2" PostId="2011" RevisionGUID="3746da07-f443-4ee3-9242-e1b7f1aebf34" CreationDate="2010-08-02T16:36:10.623" UserId="1044" Text="As Tetrad mentioned, get as much objective data as you can. Putting in hooks to store certain events and dump those all to a .csv isn't very hard. And once you've got it in Excel, you can study, graph and plot until the cows come home.&#xD;&#xA;&#xD;&#xA;Also, have specific questions you're looking to answer. Scientists don't just sit down, fire up some experiments and &quot;do science.&quot; They have specific, measurable questions they want data about. You'll often get the most out of playtesting if you take the same approach. Trying to figure if your game is &quot;good&quot; is very hard to quantify. But figuring out if the simple tutorial mission is only taking the 5 minutes you expect, or if the testers are struggling to solve a certain puzzle, can actually be evaluated.&#xD;&#xA;&#xD;&#xA;Sometimes, the most effective way to test is iteratively in short bursts. Have a couple of testers go for an hour or so in the morning, make some changes to the issues they identify and go again with new testers the following morning. Obviously you have to be looking at a feature small enough to improve in an afternoon. But for a problem that's been particularly stubborn, this method can be very successful." />
  <row Id="3776" PostHistoryTypeId="2" PostId="2012" RevisionGUID="438e63a6-3462-4b8b-8275-362781c4fc3a" CreationDate="2010-08-02T17:01:28.373" UserId="801" Text="I'm a software engineer and I'm hoping to move my career towards game development. I'm reading a book right now on 2D using C++/DirectX. When I get into 3D I know I want to do it correctly. For example, I know nothing about 3d space. So if I learn only an API I might know it but I don't know if I can develop an interractive mini 3d world with it. I wouldn't call myself successful just having a rotating crate with the latest shaders etc. My math skills are up to trig/linear algebra and still in college. I know more math is to come. Should I be reading on 3D theory books before picking up on OpenGL/Direct3D, or any other suggestions? I just know an API isn't going to teach 3D game development and don't want to be lost afterward. I'm very book-oriented so that's fine if there's suggestions there too. Thoughts are welcome. Thanks! &#xD;&#xA;" />
  <row Id="3777" PostHistoryTypeId="1" PostId="2012" RevisionGUID="438e63a6-3462-4b8b-8275-362781c4fc3a" CreationDate="2010-08-02T17:01:28.373" UserId="801" Text="3D theory before graphics APIs?" />
  <row Id="3778" PostHistoryTypeId="3" PostId="2012" RevisionGUID="438e63a6-3462-4b8b-8275-362781c4fc3a" CreationDate="2010-08-02T17:01:28.373" UserId="801" Text="&lt;graphics&gt;&lt;c++&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="3779" PostHistoryTypeId="2" PostId="2013" RevisionGUID="444b0276-0c08-4f91-ae62-53704b35c0d8" CreationDate="2010-08-02T17:02:48.027" UserId="1156" Text="I see this way too often.  &#xD;&#xA;Why build an engine, to use in future games, when you don't know what games need?  &#xD;&#xA;Why not build the game first, and then another, and another, reusing as often as you can.  &#xD;&#xA;Then you have a library of code, probably unorganised, but all shown to be useful.  &#xD;&#xA;Then you can go about organising it. &#xD;&#xA;&#xD;&#xA;And for 'framework vs library', I would base it off of how tired you get of writing a game loop over and over again and stuff. ;)  &#xD;&#xA;&#xD;&#xA;A framework doesn't necessarily need to lock you in. Look at XNA." />
  <row Id="3780" PostHistoryTypeId="2" PostId="2014" RevisionGUID="3aa0837f-7157-4107-91b0-681c78dd67f3" CreationDate="2010-08-02T17:10:59.557" UserId="102" Text="After dissing you on the other site I feel obliged to answer :)&#xD;&#xA;&#xD;&#xA;I'm not any professional myself, but I did take a 3D Computer Graphics course in my university and it really helped me understand APIs I ended up using.&#xD;&#xA;&#xD;&#xA;Among things I found especially useful:&#xD;&#xA;&#xD;&#xA;1. Transformation matrices and how they work, not only for object transformations but also for viewing transformation, perspective projection etc. That's probably the most important thing.&#xD;&#xA;1. The whole theory behind lightning and shadow, especially useful when you start dabbling into shaders.&#xD;&#xA;1. Texture sampling, mipmapping.&#xD;&#xA;1. Color theory and blending techniques is also useful.&#xD;&#xA;&#xD;&#xA;And I definitely think that these are subjects that can be picked up from just reading a book or two on the subject, as long as you have the mathematical background." />
  <row Id="3781" PostHistoryTypeId="2" PostId="2015" RevisionGUID="6206bb17-9f37-4d97-8dcf-4063bd00f5d5" CreationDate="2010-08-02T17:12:13.130" UserId="1206" Text="If you want to see how you can use Blender to make a next-gen game, check out Project AfterShock.&#xD;&#xA;&#xD;&#xA;Start by reading issue 21 of Blender Art Magazine, page 31:&#xD;&#xA;http://issuu.com/blenderart_magazine/docs/blenderart_mag-21_eng&#xD;&#xA;&#xD;&#xA;Then visit their site:&#xD;&#xA;http://www.liquidrockgames.com/&#xD;&#xA;&#xD;&#xA;And browse the showcase topic in the Ogre3D forum:&#xD;&#xA;http://www.ogre3d.org/forums/viewtopic.php?f=11&amp;t=37377&amp;start=0" />
  <row Id="3782" PostHistoryTypeId="2" PostId="2016" RevisionGUID="856985a6-5f77-4b1b-b16f-455b484342a7" CreationDate="2010-08-02T17:13:25.343" UserDisplayName="octonion" Text="I suggest you enroll at [Game Institute][1], specifically the Graphics Programming with DirectX 9 courses.&#xD;&#xA;&#xD;&#xA;You don't need to take part in the interactive classes if you just want to self-learn.&#xD;&#xA;&#xD;&#xA;By the way, there is an option to also get printed books for a very low additional amount.  They are well worth it.&#xD;&#xA;&#xD;&#xA;I did a lot of their courses a few years ago and the courses, although a little old-skool are really quite good and I can't recommend them highly enough - plus Gary Simmons is a really nice guy.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameinstitute.com&#xD;&#xA;" />
  <row Id="3783" PostHistoryTypeId="16" PostId="2016" RevisionGUID="856985a6-5f77-4b1b-b16f-455b484342a7" CreationDate="2010-08-02T17:13:25.343" UserDisplayName="octonion" />
  <row Id="3784" PostHistoryTypeId="2" PostId="2017" RevisionGUID="30d040e8-5a9a-4d28-9510-f1c1ea3cb84f" CreationDate="2010-08-02T17:17:02.560" UserId="1206" Text="Start by doing.&#xD;&#xA;That way you'll discover what you don't know.&#xD;&#xA;&#xD;&#xA;Then pick up a good book on 3D math.&#xD;&#xA;&#xD;&#xA;I recommend '3D Math Primer for Graphics and Game Development'&#xD;&#xA;&#xD;&#xA;by Fletcher Dunn and Ian Parberry. (Wordware)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Very clear, to the point, relevant - with C++ code and all.&#xD;&#xA;&#xD;&#xA;It's very important to know about the basics of points, vectors, transformations, etc.&#xD;&#xA;&#xD;&#xA;But that does not mean you should study it all before diving in. :)" />
  <row Id="3785" PostHistoryTypeId="2" PostId="2018" RevisionGUID="5a267f75-8518-4a54-9fb6-dee558ad35a4" CreationDate="2010-08-02T17:17:28.377" UserId="162" Text="I'm in a similar boat to you (although I'm technically relearning stuff I vaguely knew in college), and my solution has been to check out several of the books mentioned over in the &quot;[Good 3D Math Theory Books][1]&quot; question here. If you're a book learner that may be a good way to go for you. Especially if your college doesn't actually have a good 3d graphics course (mine didn't).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1210/good-3d-math-theory-books" />
  <row Id="3786" PostHistoryTypeId="2" PostId="2019" RevisionGUID="b79f36f1-ca05-49ac-84a6-fdf32ced32eb" CreationDate="2010-08-02T17:23:47.557" UserId="1288" Text="Most games would benefit from having some character.&#xD;&#xA;&#xD;&#xA;Good games have a core of solid gameplay. **Great games combine solid gameplay with character.** Here's the checklist we use:&#xD;&#xA;&#xD;&#xA;**1. Iterate until the high concept is remarkable.**&#xD;&#xA;&#xD;&#xA;The process here is straightforward -- wrap the damned game description up into a single sentence. Speak it to a bunch of people. If they smile and say &quot;yeah, that sounds cool,&quot; scrap it, and think about what really makes your game unique. After a while, you'll sum things up right, and they'll laugh, or they'll yell, &quot;Holy crap, I have to play it!&quot;&#xD;&#xA;&#xD;&#xA;Our last game's high concept was &quot;BASE jump off of a perfectly good building, create your own stunts, and flip people off for points.&quot; It's simple, but it worked really well for us at conventions/conferences.&#xD;&#xA;&#xD;&#xA;**2. Make unexpected tidbits remarkable.**&#xD;&#xA;&#xD;&#xA;When you repeatedly clicked on your Starcraft pieces, they started saying some crazy shit. Players didn't expect this, yet that tiny thing (how long did that take to write and record?) is something people still talk about today. This is really low-hanging fruit; go through your design, piece by piece and add the quirky bits.&#xD;&#xA;&#xD;&#xA;We added a guided meditation to our most recent game. It gave something for reviewers to talk about. People kept commenting on how they sat through it, waiting for it to start screaming at them.&#xD;&#xA;&#xD;&#xA;**3. Make boring things interesting.**&#xD;&#xA;&#xD;&#xA;Game installers are typically boring. Setup menus are typically boring. Sit down for a half hour, poke at all these boring places, and see what comes out.&#xD;&#xA;&#xD;&#xA;Playground slides are typically boring, but they don't have to be (http://www.foundshit.com/elephant-playground-slide)." />
  <row Id="3787" PostHistoryTypeId="16" PostId="2019" RevisionGUID="b79f36f1-ca05-49ac-84a6-fdf32ced32eb" CreationDate="2010-08-02T17:23:47.557" UserId="-1" />
  <row Id="3788" PostHistoryTypeId="2" PostId="2020" RevisionGUID="6a22ac1b-fa73-4e8e-a933-a6be67b79312" CreationDate="2010-08-02T17:24:15.887" UserId="865" Text="Hmmm, when I had to make my first 3D game some 15 years ago (had to as it was my job, that helps persevering) I had no 3D knowledge whatsoever other than high school math. If you have a fondness for puzzle solving and reading up, you can reason most of it out yourself and with some help from the internet (comp.graphics.algorithms faq). I did read the openGL bibles and http://www.amazon.com/Computer-Graphics-Principles-Practice-2nd/dp/0201848406 (warning oldskool) as they give valid background info. If you do it this way you might start off the wrong way but at a point you'll either dream up, or bump into, a better solution. Most of the 3d problems can be solved if your 2d grasp is good. Add to the general trig, pythagoras, matrices and inverses/transpose (for projection), dot&amp;cross product and what you use em for, quaternions (don't have to understand em, just know how to use them - you can do without but they are nowadays part of the basic vocabulary), and you can solve most problems you come across. As you go you'll bump into better ways, but those few can solve anything. The best way is to set yourself a goal outside your grasp and force yourself to get there. The problems you run into are what you need to learn, and hey, you're on the site where they can help you solve em!" />
  <row Id="3789" PostHistoryTypeId="2" PostId="2021" RevisionGUID="3d7b3c62-e40c-40c4-a490-8a0d948a8595" CreationDate="2010-08-02T17:27:09.687" UserId="1156" Text="My input system has a GetKey() method that returns a key in a map. Simple enough.  &#xD;&#xA;However, I want to know if the key is not available - be it a typo, or misuse of wording, or something else.  &#xD;&#xA;I am the only person working on this project; would it be a good idea to simply set some compile time throw to see if it catches one? Is this even possible?  &#xD;&#xA;What I'm meaning is:  &#xD;&#xA;&lt;code&gt; if(entry is not found) { throw something(&quot;couldn't find key&quot;); exit(); }&lt;/code&gt;    &#xD;&#xA;Rather than an approach of   &#xD;&#xA;&lt;code&gt;if(entry is not found) { try and compensate somehow and continue }&lt;/code&gt; &#xD;&#xA;And then go through the code and find where I've made a mistake. Of course, for a large project I would want real error handling like the second. But I can just get rid of these errors, since there's no modding. But I'm the only one working, so is this probably the easiest way to do it?  &#xD;&#xA;Well, it's this or make some kind of BLANK key and check it every query.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3790" PostHistoryTypeId="1" PostId="2021" RevisionGUID="3d7b3c62-e40c-40c4-a490-8a0d948a8595" CreationDate="2010-08-02T17:27:09.687" UserId="1156" Text="Compile time error handling for single programmer games?" />
  <row Id="3791" PostHistoryTypeId="3" PostId="2021" RevisionGUID="3d7b3c62-e40c-40c4-a490-8a0d948a8595" CreationDate="2010-08-02T17:27:09.687" UserId="1156" Text="&lt;language-agnostic&gt;&lt;input&gt;&lt;compile&gt;" />
  <row Id="3792" PostHistoryTypeId="2" PostId="2022" RevisionGUID="0cdc738d-907b-4ade-b5c0-21820d6d4fe4" CreationDate="2010-08-02T17:32:29.633" UserId="865" Text="Why not make a translate function that always gets called? That way you'll only have to look in one place. If you, instead of actual keycodes, use an enum the compiler will complain by default when you enter an invalid code) - the translate function can convert that enum to its actual keycode and is in charge of what input is valid.&#xD;&#xA;&#xD;&#xA;Edited to add: abstracting the input out to one location will also make it a lot easier to make your keyboard layout redefinable." />
  <row Id="3793" PostHistoryTypeId="2" PostId="2023" RevisionGUID="461f41e8-4f5d-41c5-91f1-1a76a42f4c9b" CreationDate="2010-08-02T17:34:08.990" UserId="189" Text="When debugging, it's great to throw an exception. When the user has the program and encounters something that you missed, it's not; you might want to silently log the error, or ignore the call and just return from the function, but you probably don't want to throw an exception and stop everything just because there's a bug in your code unless it's a showstopper.&#xD;&#xA;&#xD;&#xA;C and C++ support assertions via assert.h; I like to use those, and this would be a good place for one. For example, at the top of the GetKey method, do an assert that the key is found.&#xD;&#xA;&#xD;&#xA;However this is also a good place for using an enum rather than a char or whatever you're currently using. That way, the programmer must use a value from the enum and there's not really a possible way to feed it anything else." />
  <row Id="3794" PostHistoryTypeId="5" PostId="2021" RevisionGUID="d9e8aaa7-e465-48b2-b6d3-1b29c27a1566" CreationDate="2010-08-02T17:35:52.950" UserId="1156" Comment="added 79 characters in body; added 222 characters in body" Text="My input system has a GetKey() method that returns a key in a map. Simple enough.  &#xD;&#xA;However, I want to know if the key is not available - be it a typo, or misuse of wording, or something else.  &#xD;&#xA;I am the only person working on this project; would it be a good idea to simply set some compile time throw to see if it catches one? Is this even possible?  &#xD;&#xA;What I'm meaning is:  &#xD;&#xA;&lt;code&gt; if(entry is not found) { throw something(&quot;couldn't find key&quot;); exit(); }&lt;/code&gt;    &#xD;&#xA;Rather than an approach of   &#xD;&#xA;&lt;code&gt;if(entry is not found) { try and compensate somehow and continue }&lt;/code&gt; &#xD;&#xA;And then go through the code and find where I've made a mistake. Of course, for a large project I would want real error handling like the second. But I can just get rid of these errors, since there's no modding. But I'm the only one working, so is this probably the easiest way to do it?  &#xD;&#xA;Well, it's this or make some kind of BLANK key and check it every query.  &#xD;&#xA;EDIT: I am using strings as my keys, so no translate functions would be easy.  &#xD;&#xA;Double EDIT: I bind commands (strings) to keys (wrapper over an enum value). It means it's more understandable to check if &quot;move_left&quot; has been pressed than if keyCode::A has been, as well as being more changeable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3795" PostHistoryTypeId="2" PostId="2024" RevisionGUID="44db1aa9-56e8-4b68-b8f7-05c25c7f90f0" CreationDate="2010-08-02T17:36:08.223" UserId="1232" Text="In terms of making sure your game is polished, checking out what other AAA games do is always a good idea - you can get a lot of checklist items just from observing one really well put together game.&#xD;&#xA;&#xD;&#xA;In terms of making sure your game is solid and you're ready to ship on your target platform, there are certification checklists out there for each platform. Many of the console developers have to meet such a platform specific checklist; Sony has the Technical Requirements Checklist (TRC), Microsoft has the Technical Certification Requirements (TCR) and Nintendo have their own process. Unfortunately, not a lot of this console checklist information is public without becoming a registered developer, signing NDAs etc.&#xD;&#xA;&#xD;&#xA;Here are the requirements to meet &quot;Games for Windows&quot; certification, which are public:&#xD;&#xA;&#xD;&#xA;* http://msdn.microsoft.com/en-us/library/ee417691(VS.85).aspx&#xD;&#xA;* http://msdn.microsoft.com/en-us/library/ee417692(VS.85).aspx&#xD;&#xA;&#xD;&#xA;In fact there are tons more of these kinds of articles from MSFT. A lot of this is dry and probably a bit silly, but some it contains really good advice:&#xD;&#xA;&#xD;&#xA;* http://msdn.microsoft.com/en-us/library/ee416994(v=VS.85).aspx&#xD;&#xA;&#xD;&#xA;Microsoft also hosts a conference every year called Gamefest. The Gamefest presentations cover a LOT of certification issues, but sadly you need to be a registered developer with an xds account to access them:&#xD;&#xA;&#xD;&#xA;* http://www.xnagamefest.com/presentations.htm&#xD;&#xA;" />
  <row Id="3796" PostHistoryTypeId="16" PostId="2024" RevisionGUID="44db1aa9-56e8-4b68-b8f7-05c25c7f90f0" CreationDate="2010-08-02T17:36:08.223" UserId="-1" />
  <row Id="3797" PostHistoryTypeId="2" PostId="2025" RevisionGUID="ae154c57-327a-4bc8-9e19-d8b4e61ca6b8" CreationDate="2010-08-02T17:37:35.770" UserId="1289" Text="You might want to start using bug/issue tracking software.  This will help coordinate your efforts and give you a place to add tasks (e.g. &quot;Add pause feature&quot;) as you think of them so that they aren't forgotten.  If you identify an issue that you think is common to most games, add it to a list (maybe in a wiki) so you'll have a reference for next time.&#xD;&#xA;&#xD;&#xA;Two (free!) examples of issue tracking software:  [Redmine][1] and [Trac][2].&#xD;&#xA;&#xD;&#xA;Joel Spolsky has [some helpful thoughts][3] on this as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.redmine.org/&#xD;&#xA;  [2]: http://trac.edgewall.org/&#xD;&#xA;  [3]: http://www.joelonsoftware.com/articles/fog0000000029.html" />
  <row Id="3798" PostHistoryTypeId="16" PostId="2025" RevisionGUID="ae154c57-327a-4bc8-9e19-d8b4e61ca6b8" CreationDate="2010-08-02T17:37:35.770" UserId="-1" />
  <row Id="3799" PostHistoryTypeId="2" PostId="2026" RevisionGUID="471ac6aa-a4cd-498a-a4eb-65a561b09faf" CreationDate="2010-08-02T18:31:07.193" UserId="162" Text="You can't do anything like look up a string key from a hash table at compile time, because that would involve executing code.&#xD;&#xA;&#xD;&#xA;However you CAN use something like static_assert ([Visual Studio][1] or [Boost][2])to do things like check for enum values. static_assert lets you check any const expression, and can be very useful for setting up certain safeguards. For instance if you had two enum structures that are independent but should be related to each other, you can static_assert that the two enum values are the same. You can also static assert on sizeof, offsetof, and other compile-time functions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd293588.aspx&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_43_0/doc/html/boost_staticassert.html" />
  <row Id="3800" PostHistoryTypeId="2" PostId="2027" RevisionGUID="bf3f5f01-7761-46de-9c90-ccbe3720284f" CreationDate="2010-08-02T18:36:01.303" UserId="47" Text="I took an Intro to Computer Graphics class in college (1-2 years ago) and [the course website][1] is still up.  Lots of PowerPoint slides are still up that you might find useful and helpful.  Topics cover both 2D and 3D graphics theory.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.unc.edu/~pmerrell/comp575.htm" />
  <row Id="3801" PostHistoryTypeId="2" PostId="2028" RevisionGUID="2daa05a8-40bc-4c31-ba0b-e3a8a4fcd730" CreationDate="2010-08-02T18:41:55.207" UserId="1256" Text="Basically Danny Varod seems to know as he posted it as an answer to this question:&#xD;&#xA;&#xD;&#xA;[http://gamedev.stackexchange.com/questions/892/display-a-message-box-over-a-full-screen-directx-application][1]&#xD;&#xA;&#xD;&#xA;I think, theoretically this might work, but I have no idea how to actually do it. Since I'm also not allowed to post a comment under his comment nor am I allwoed to ask on meta about how to contact another user, I ask this as a normal question here:&#xD;&#xA;&#xD;&#xA;How do I render my own DirectX Stuff to a full screen WPF's DirectX surface?&#xD;&#xA;&#xD;&#xA;For starters, I have no idea how to get the directx surface from a wpf window. If I had it, what do I have to take care of that the wpf rendering doesn't screw up my own rending or vice versa?&#xD;&#xA;&#xD;&#xA;Thx&#xD;&#xA;   Marc&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/892/display-a-message-box-over-a-full-screen-directx-application" />
  <row Id="3802" PostHistoryTypeId="1" PostId="2028" RevisionGUID="2daa05a8-40bc-4c31-ba0b-e3a8a4fcd730" CreationDate="2010-08-02T18:41:55.207" UserId="1256" Text="How do I render my own DirectX Stuff to a full screen WPF's DirectX surface?" />
  <row Id="3803" PostHistoryTypeId="3" PostId="2028" RevisionGUID="2daa05a8-40bc-4c31-ba0b-e3a8a4fcd730" CreationDate="2010-08-02T18:41:55.207" UserId="1256" Text="&lt;gui&gt;&lt;directx&gt;" />
  <row Id="3804" PostHistoryTypeId="2" PostId="2029" RevisionGUID="016fce23-a3fc-4bde-892e-3b195715e789" CreationDate="2010-08-02T19:04:56.157" UserId="51" Text="Simple enough question: What math should all game programmers have a firm grasp of in order to be successful?&#xD;&#xA;&#xD;&#xA;I'm not specifically talking about rendering math or anything in the niche areas of game programming, more specifically just things that even game programmers should know about, and if they don't they'll probably find it useful.&#xD;&#xA;&#xD;&#xA;*Note:* as there is *no one correct answer*, this question (and its answers) is a community wiki." />
  <row Id="3805" PostHistoryTypeId="1" PostId="2029" RevisionGUID="016fce23-a3fc-4bde-892e-3b195715e789" CreationDate="2010-08-02T19:04:56.157" UserId="51" Text="What math should all game programmers know?" />
  <row Id="3806" PostHistoryTypeId="3" PostId="2029" RevisionGUID="016fce23-a3fc-4bde-892e-3b195715e789" CreationDate="2010-08-02T19:04:56.157" UserId="51" Text="&lt;subjective&gt;&lt;programming&gt;&lt;math&gt;" />
  <row Id="3807" PostHistoryTypeId="16" PostId="2029" RevisionGUID="016fce23-a3fc-4bde-892e-3b195715e789" CreationDate="2010-08-02T19:04:56.157" UserId="51" />
  <row Id="3808" PostHistoryTypeId="2" PostId="2030" RevisionGUID="ca7ce28a-9e42-40b4-ac34-c4641c38f27b" CreationDate="2010-08-02T19:07:49.113" UserId="51" Text="A very basic one is the Pythagorean theorem.  Also known as the distance formula.&#xD;&#xA;&#xD;&#xA;`a^2 + b^2 = c^2` where `a` and `b` are the edges of a right triangle and `c` is the hypotenuse.  This means that in order to find the length of a vector, you do this:&#xD;&#xA;&#xD;&#xA;`distance = sqrt( a^2 + b^2 )`&#xD;&#xA;&#xD;&#xA;Another note of interest is that if you're just *comparing* distances, you don't have to take the square root (which can be relatively costly).  That's why most frameworks have a &quot;distance squared&quot; or &quot;length squared&quot; function for their vectors." />
  <row Id="3809" PostHistoryTypeId="16" PostId="2030" RevisionGUID="ca7ce28a-9e42-40b4-ac34-c4641c38f27b" CreationDate="2010-08-02T19:07:49.113" UserId="-1" />
  <row Id="3810" PostHistoryTypeId="2" PostId="2031" RevisionGUID="9d48459a-222f-4838-b1b4-11e4e37963a2" CreationDate="2010-08-02T19:40:09.863" UserId="395" Text="The PNPOLY algorithm: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html" />
  <row Id="3811" PostHistoryTypeId="16" PostId="2031" RevisionGUID="9d48459a-222f-4838-b1b4-11e4e37963a2" CreationDate="2010-08-02T19:40:09.863" UserId="-1" />
  <row Id="3812" PostHistoryTypeId="2" PostId="2032" RevisionGUID="47be65dd-1e38-4091-bb9d-ec8d4f66393a" CreationDate="2010-08-02T19:45:24.593" UserId="165" Text="[**Boolean**][1] and [**Hexadecimal**][2] numbering systems, and how to convert them to/from decimal numbers.&#xD;&#xA;&#xD;&#xA;Although you won't generally need to work with *raw* Boolean numbers, they are frequently used for Flag variables, which require [boolean logic][3] and bit-shifting.&#xD;&#xA;&#xD;&#xA;Hex isn't quite as important, unless you want to process [0xDEADBEEF][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Boolean_data_type&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Hexadecimal&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Boolean_logic&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Hexspeak" />
  <row Id="3813" PostHistoryTypeId="16" PostId="2032" RevisionGUID="47be65dd-1e38-4091-bb9d-ec8d4f66393a" CreationDate="2010-08-02T19:45:24.593" UserId="-1" />
  <row Id="3814" PostHistoryTypeId="2" PostId="2033" RevisionGUID="95c415f4-fb5b-4575-8963-e58aa4ae7702" CreationDate="2010-08-02T19:48:38.033" UserId="1024" Text="I dream of the day when game development is as data driven as art production. I don't see it anywhere on the horizon so for now knowing some math appears to be a necessity. &#xD;&#xA;&#xD;&#xA;Math is like technique, the more the better, as long as you can apply it. &#xD;&#xA;&#xD;&#xA;Here is the order of importance I see.&#xD;&#xA;&#xD;&#xA; - Arithmetic&#xD;&#xA; - Linear Algebra (with geometric interpretations)&#xD;&#xA; - Calculus (physics)&#xD;&#xA; - Combinatorics (randomized levels)&#xD;&#xA; - Probability (balancing)&#xD;&#xA; - Statistics (Bayesian esp. for AI)&#xD;&#xA; &#xD;&#xA;I could keep going. The more know the better, but learning a bunch of math doesn't mean you will make a great game, but it can help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3815" PostHistoryTypeId="16" PostId="2033" RevisionGUID="95c415f4-fb5b-4575-8963-e58aa4ae7702" CreationDate="2010-08-02T19:48:38.033" UserId="-1" />
  <row Id="3816" PostHistoryTypeId="5" PostId="2032" RevisionGUID="f130c7e8-3838-4a4a-9f6e-7ba59c6a71b5" CreationDate="2010-08-02T19:52:33.483" UserId="165" Comment="added 79 characters in body" Text="[**Boolean**][1] and [**Hexadecimal**][2] numbering systems, and how to convert them to/from decimal numbers.&#xD;&#xA;&#xD;&#xA;Although you won't generally need to work with *raw* Boolean numbers, they are frequently used for Flag variables, which require [boolean logic][3] and bit-shifting.&#xD;&#xA;&#xD;&#xA;Hex isn't quite as important (unless you want to process [0xDEADBEEF][4]), but at a minimum, you'd want to *recognize* when they're being used, and why.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Boolean_data_type&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Hexadecimal&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Boolean_logic&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Hexspeak" />
  <row Id="3817" PostHistoryTypeId="2" PostId="2034" RevisionGUID="aedbc8a7-f529-4578-96ee-5c5107e950bb" CreationDate="2010-08-02T20:07:52.307" UserId="1024" Text="Above all else just try to make stuff. First and foremost jump in. Otherwise you will become an expert at theory but not practice.&#xD;&#xA;&#xD;&#xA;If you think that you are truly passionate about graphics, then imagine that you will continue to learn new material most of your life. Its not like you can learn everything you need before you start. It just doesn't work that way. &#xD;&#xA;&#xD;&#xA;As you learn more and more about the mathematics of 3D graphics, you will realize that there is no mathematics of computer graphics, there is only math. **Learn how to teach yourself mathematics on your own**. Then you will be able to digest new techniques as they are presented in literature.&#xD;&#xA;&#xD;&#xA;As graphics technologies evolve we will borrow different mathematic techniques. What is popular today might not be popular tomorrow. &#xD;&#xA;&#xD;&#xA;Here are some things that are going to stay the same. &#xD;&#xA;&#xD;&#xA;Right now I am finding the material in Geometric Algebra for Computer Science very interesting, and think that it might be better to start with the approach they layout for computer graphics. &#xD;&#xA;http://www.amazon.com/Geometric-Algebra-Computer-Science-Object-Oriented/dp/0123694655&#xD;&#xA;&#xD;&#xA;The book explains things like quaternions in a much simpler way, and might be helpful for you depending on your mathematical background and interests.&#xD;&#xA;" />
  <row Id="3818" PostHistoryTypeId="2" PostId="2035" RevisionGUID="54d2a927-a553-430f-a21a-f33447ac1650" CreationDate="2010-08-02T20:11:49.693" UserId="1156" Text="A firm grasp of +, -, *, and /.  &#xD;&#xA;Without them, you're completely screwed." />
  <row Id="3819" PostHistoryTypeId="16" PostId="2035" RevisionGUID="54d2a927-a553-430f-a21a-f33447ac1650" CreationDate="2010-08-02T20:11:49.693" UserId="-1" />
  <row Id="3820" PostHistoryTypeId="5" PostId="2007" RevisionGUID="911d1394-1868-40ac-8cc1-97d17c91f631" CreationDate="2010-08-02T20:49:24.970" UserId="370" Comment="added 12 characters in body" Text="###Build a framework.&#xD;&#xA;&#xD;&#xA;I have experience with building both.  I prefer to use libraries over frameworks.  Frameworks feel very restrictive and *&quot;bossy&quot;*.  So when I built my first game I wanted to build an engine that was composed of many libraries that could be easily reused in other projects.&#xD;&#xA;&#xD;&#xA;It was a disaster.  It spent half my time writing glue code between my various libraries.  My libraries also tended to be bloated with extra abstractions, so that it became a huge chore to add features to the libraries/components.&#xD;&#xA;&#xD;&#xA;Now, however my engines are built with the game I'm writing in mind.  I still keep my eyes open for abstractions that will allow me to reuse it or the new features I'm adding in later games.  I'm much more happy and productive.&#xD;&#xA;&#xD;&#xA;For me the turning point was to decide to not publish my engine.  I may still publish it, but for now knowing I don't need to justify my game specific hacks to other users has let me build an engine better suited to my games.&#xD;&#xA;" />
  <row Id="3821" PostHistoryTypeId="2" PostId="2036" RevisionGUID="1e075c86-220f-411d-82c4-7d3e2195a4bd" CreationDate="2010-08-02T21:00:11.200" UserId="1294" Text="Game development is currently a largely non-academic enterprise.  There are a lot of commercial developers of games, as well as a large hobbyist community.  The academic community focusing on games seems to be small, and new.  [Or so it appears to me].&#xD;&#xA;&#xD;&#xA;Having said all that, are there some *must read* papers/books on game development from academics?" />
  <row Id="3822" PostHistoryTypeId="1" PostId="2036" RevisionGUID="1e075c86-220f-411d-82c4-7d3e2195a4bd" CreationDate="2010-08-02T21:00:11.200" UserId="1294" Text="Game development and research" />
  <row Id="3823" PostHistoryTypeId="3" PostId="2036" RevisionGUID="1e075c86-220f-411d-82c4-7d3e2195a4bd" CreationDate="2010-08-02T21:00:11.200" UserId="1294" Text="&lt;subjective&gt;" />
  <row Id="3824" PostHistoryTypeId="2" PostId="2037" RevisionGUID="efb2cded-55cb-4215-afa4-c1c58d09cb01" CreationDate="2010-08-02T21:04:48.443" UserId="1292" Text="So, i'm a student looking to get my foot in the door of game development and im looking to do something 2D, maybe a tetris/space invaders/something-with-a-little-mouse-interaction clone. &#xD;&#xA;&#xD;&#xA;I pointed my searches in the direction of C++ and 2d and was eventually lead to DirectX/OpenGL&#xD;&#xA;&#xD;&#xA;Now as i understand it, all these packages will do for me is draw stuff on a screen. And thats all i really care about at this point. Sound isn't necessary. Input can be handled with stdlib probably. &#xD;&#xA;&#xD;&#xA;So, for a beginner trying to create a basic game in C++, would you recommend DirectX or OpenGL? Why? What are some key feature differences between the two? Which is more usable?" />
  <row Id="3825" PostHistoryTypeId="1" PostId="2037" RevisionGUID="efb2cded-55cb-4215-afa4-c1c58d09cb01" CreationDate="2010-08-02T21:04:48.443" UserId="1292" Text="Getting Started with 2d Game Dev (C++): DirectX or OpenGL?" />
  <row Id="3826" PostHistoryTypeId="3" PostId="2037" RevisionGUID="efb2cded-55cb-4215-afa4-c1c58d09cb01" CreationDate="2010-08-02T21:04:48.443" UserId="1292" Text="&lt;c++&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="3827" PostHistoryTypeId="2" PostId="2038" RevisionGUID="833c4473-5ccf-4450-a2d0-16efd750812e" CreationDate="2010-08-02T21:09:44.703" UserId="189" Text="A professor at my school, Dr. R. Michael Young, was editor-in-chief of the Journal of Game Development. It had 9 issues before it apparently disappeared. I don't know the story, though I should ask him. The main website is down but here's a [wayback machine result][1] from June 2008 if you're interested. You should look around for the issues; they are probably pretty rare since it was discontinued.&#xD;&#xA;&#xD;&#xA;So right now I think the closest you're going to get is the [Game Developer magazine][2].&#xD;&#xA;&#xD;&#xA;I like to keep up with the industry online. I highly recommend becoming a member of [IGDA][3] and keeping up with your local chapter. There's also [Gamasutra][4], they have a lot of game industry news and articles, and of course [Gamedev.net][5].&#xD;&#xA;&#xD;&#xA;You might also search around for textbook lists. I'm not sure how many schools publicize them; mine doesn't. But for example, my game design class last Fall required the book [Rules of Play: Game Design Fundamentals][6]. If you can figure out what books are being required as textbooks by professors, it's a good bet they are great resources. (though I personally didn't like Rules of Play all too much, it's way too much theory and nothing concrete)&#xD;&#xA;&#xD;&#xA;You may also find, scholars tend to be &quot;lazy&quot; and just use existing solutions. So whereas indie developers love to code their own engines, libraries, etc., the game development researchers and masters students at my school use the Unreal engine (and now the UDK) or the Unity engine. Being an aspiring game programmer, I find it to be extremely boring, but they are mainly interested in design and AI studies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://web.archive.org/web/20080614200102/http://www.jogd.com/&#xD;&#xA;  [2]: http://www.gdmag.com/&#xD;&#xA;  [3]: http://www.igda.org/&#xD;&#xA;  [4]: http://www.gamasutra.com/&#xD;&#xA;  [5]: http://www.gamedev.net/&#xD;&#xA;  [6]: http://www.amazon.com/Rules-Play-Game-Design-Fundamentals/dp/0262240459/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1280783192&amp;sr=8-1" />
  <row Id="3828" PostHistoryTypeId="2" PostId="2039" RevisionGUID="ed51ccb2-25e4-4bbe-b87d-afe287df2bdb" CreationDate="2010-08-02T21:17:11.817" UserId="448" Text="If you're going to need fairly sophisticated UIs, the best choice is probably to just embed a HTML renderer - you get all the common UI primitives you are used to, and you can trivially add complex UI to your game that will behave the way users expect, look great, and run fast (because browsers have pretty optimized rendering pipelines at this point).&#xD;&#xA;&#xD;&#xA;There are a few libraries out there for embedding Webkit in games: Berkelium is the one I recommend, and I hear Awesomium is pretty good (used by EVE Online) and so is CEF (used by Steam). You can also try embedding Gecko - it's a lot harder to do but has some cool advantages as well. I'm currently using Berkelium for all my game UI (it replaced a combination of custom UI elements and native UI, and dramatically reduced the amount of code I had to write to get things running)." />
  <row Id="3829" PostHistoryTypeId="2" PostId="2040" RevisionGUID="1166b48c-94e7-4224-b26d-c8e8093f5891" CreationDate="2010-08-02T21:17:22.800" UserId="1120" Text="I think you're doing premature generalization.  Don't get stuck too much on future-use questions right now.  Pick an answer and run with it, learn from it.  Flip a coin if you don't have a preference.&#xD;&#xA;&#xD;&#xA;Start by building a game.  When you build your second game you'll have a better idea what parts are re-usable and can be turned into robust library functions.  When you build your third game you'll have a better idea what structure is re-usable and can be turned into a robust framework." />
  <row Id="3830" PostHistoryTypeId="2" PostId="2041" RevisionGUID="06f87973-9b01-4fa8-951b-07a6a14d4588" CreationDate="2010-08-02T21:17:40.443" UserId="259" Text=" - Vectors both 3D and 4D, and what the W component should be set to&#xD;&#xA; - Left-hand and right-hand coordinate systems, and which one your game is&#xD;&#xA; - The dot product, and what it's useful for&#xD;&#xA; - The cross product, and what it's useful for&#xD;&#xA; - Matrices, how they represent orientation and position and how you can combine them&#xD;&#xA; - Quaternions&#xD;&#xA;&#xD;&#xA;Even if you're not The Graphics Guy, you're going to use vectors and vector maths 80% of the time.  They're the onions of our fun bolognese." />
  <row Id="3831" PostHistoryTypeId="16" PostId="2041" RevisionGUID="06f87973-9b01-4fa8-951b-07a6a14d4588" CreationDate="2010-08-02T21:17:40.443" UserId="-1" />
  <row Id="3832" PostHistoryTypeId="5" PostId="2033" RevisionGUID="d4231c1d-c3e5-4b47-bf84-39715210f584" CreationDate="2010-08-02T21:18:23.673" UserId="1024" Comment="added 4 characters in body" Text="I dream of the day when game development is as data driven as art production. I don't see it anywhere on the horizon so for now knowing some math appears to be a necessity. &#xD;&#xA;&#xD;&#xA;Math is like technique, the more the better, as long as you can apply it. &#xD;&#xA;&#xD;&#xA;Here is the order of importance I see.&#xD;&#xA;&#xD;&#xA; - Arithmetic&#xD;&#xA; - Linear Algebra (with geometric interpretations)&#xD;&#xA; - Calculus (physics)&#xD;&#xA; - Combinatorics (randomized levels)&#xD;&#xA; - Probability (balancing)&#xD;&#xA; - Statistics (Bayesian esp. for AI)&#xD;&#xA; &#xD;&#xA;I could keep going. The more you know the better, but learning a bunch of math doesn't mean you will make a great game, but it can help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3833" PostHistoryTypeId="2" PostId="2042" RevisionGUID="bd044fa8-9044-4ac6-ae25-34ac74dde414" CreationDate="2010-08-02T21:19:05.780" UserId="189" Text="http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX&#xD;&#xA;&#xD;&#xA;I agree with these remarks and think it is a stellar discussion of why OpenGL is better than DirectX.&#xD;&#xA;&#xD;&#xA;However, this question is absolutely a matter of opinion, and DirectX absolutely has its benefits over OpenGL, especially 10 and 11 and especially in the context of game development.&#xD;&#xA;&#xD;&#xA;Also, should you choose to go with OpenGL, [SDL][1] is a wonderful and very popular library, and there are plenty of resources for learning OpenGL (NeHe, etc.) - but that's the place for another question perhaps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/" />
  <row Id="3834" PostHistoryTypeId="2" PostId="2043" RevisionGUID="12a4f97b-4669-4be3-82e9-bc3789cd7b4a" CreationDate="2010-08-02T21:19:35.513" UserId="1272" Text="I'd recommend SDL ([http://www.libsdl.org/][1]) for 2D, it was where I first started with graphics stuff and it was pretty easy to use, even though I barely knew C++ at the time.&#xD;&#xA;&#xD;&#xA;[This][2] is the set of tutorials that I started with and found very useful (they were a bit dated even ~4 years ago when I worked through them, but I don't think SDL has changed much and they should still be relevant).&#xD;&#xA;&#xD;&#xA;SDL also does input handling and SDL_Mixer can do basic audio.&#xD;&#xA;&#xD;&#xA;I've never worked with DirectDraw or OpenGL for 2D stuff, so I can't comment there, but I can definitely recommend SDL.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index" />
  <row Id="3835" PostHistoryTypeId="2" PostId="2044" RevisionGUID="eea0572a-bb4d-4941-bc88-b51d341c63bd" CreationDate="2010-08-02T21:33:57.253" UserId="360" Text="If you're just starting out it's probably better to use an existing 2D engine or framework such as [SFML][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/" />
  <row Id="3836" PostHistoryTypeId="2" PostId="2045" RevisionGUID="adb4a8a9-2f19-41df-826c-055ca6524cd3" CreationDate="2010-08-02T22:04:33.650" UserId="818" Text="Yeah, game programming tends to be pretty math-intensive.  What math you need depends on what you're working on.  Basic arithmetic is a must, of course, just as it is in all programming.  Beyond that:&#xD;&#xA;&#xD;&#xA;Geometry is vital to any graphics work.  If you want to display things on screen, you need to understand coordinate systems.  And if you want to move them around in anything but the cardinal directions, you'll be completely lost without a solid grasp of sines, cosines and vectors (basic trig).  And if you need to work in 3D, the geometry and trig requirements get a lot more complicated.&#xD;&#xA;&#xD;&#xA;If you want to model any sort of remotely realistic physics, you need calculus for that.  (It's what drove Newton to invent calculus, afterall.)&#xD;&#xA;&#xD;&#xA;Any sort of probability calculations require knowledge of statistics and probability theory in order to get sane results without insane amounts of trial and error.&#xD;&#xA;&#xD;&#xA;There's probably a lot more, but that's what comes to mind just off the top of my head." />
  <row Id="3837" PostHistoryTypeId="16" PostId="2045" RevisionGUID="adb4a8a9-2f19-41df-826c-055ca6524cd3" CreationDate="2010-08-02T22:04:33.650" UserId="-1" />
  <row Id="3838" PostHistoryTypeId="2" PostId="2046" RevisionGUID="79aaadb0-5335-41e7-829d-90afeb5176c2" CreationDate="2010-08-02T22:27:11.573" UserId="395" Text="Some papers from a friend of mine: http://scholar.google.com/scholar?hl=en&amp;q=%22marc+destefano%22&amp;btnG=Search&amp;as_sdt=40000000&amp;as_ylo=&amp;as_vis=0&#xD;&#xA;&#xD;&#xA;Most game-related research can't be labeled as such or funding (90% of which in the US comes from the Navy) will dry up in an instant. If you look for &quot;cognitive modeling&quot; or similar that might help." />
  <row Id="3839" PostHistoryTypeId="2" PostId="2047" RevisionGUID="e6efda8c-25d3-49e5-b054-2fee5cd0e9e2" CreationDate="2010-08-02T22:30:27.293" UserId="486" Text="I think everyone who is interested ought to find good resources on story telling. Most games have some story that drives the game play and creates the world that players are immersed in. I myself don't know any good story telling resources but a great place to start might be contacting a game development institute like DigiPen. I am sure there are others out there too that would put you in contact with an English professor or someone who is an expert in storytelling.&#xD;&#xA;&#xD;&#xA;You could also ask what other resources the deans of the school think are important for their students to know." />
  <row Id="3840" PostHistoryTypeId="2" PostId="2048" RevisionGUID="9707251c-ce87-459c-a6f5-0d16b7dfb1eb" CreationDate="2010-08-02T22:50:10.190" UserId="458" Text="For game designers, &quot;MDA Framework&quot; (Hunicke, LeBlanc, Zubek) is one of the most useful papers I've seen come out of academia. For books, &quot;Art of Game Design: A Book of Lenses&quot; (Schell) and &quot;Game Design Workshop&quot; (Fullerton) are good picks, both written by professors. (In fact, most game design books worth reading were written by professors, as they tend to have more time for book writing than your average working game developer. Most game design books that aren't worth reading were also written by professors, though.)&#xD;&#xA;&#xD;&#xA;This question seems like it carries some kind of mistrust of academia (the whole &quot;those who can, do; those who can't, teach&quot; thing), but that ignores that especially these days, there's an awful lot of crossover between academia and industry. I worked in games for ten years before crossing over into teaching, and I still do industry contract work when I can; does that make me part of the game developer community, or the academic community? I could name a dozen others off the top of my head in the exact same situation. So I'm not sure that the distinction of &quot;academic or industry&quot; is even meaningful anymore." />
  <row Id="3841" PostHistoryTypeId="2" PostId="2049" RevisionGUID="217420b9-0945-4ab0-906a-f43a550d98de" CreationDate="2010-08-02T22:50:20.923" UserId="865" Text="This is a starting point:&lt;br&gt;&#xD;&#xA;http://webdocs.cs.ualberta.ca/~games/&lt;br&gt;&#xD;&#xA;as is:&lt;br&gt;&#xD;&#xA;http://grandtextauto.org/&lt;br&gt;&#xD;&#xA;also&lt;br&gt;&#xD;&#xA;http://aigamedev.com/&lt;br&gt;&#xD;&#xA;links a fair amount of papers on a fair amount of topics (check the forum too)&lt;br&gt;&#xD;&#xA;Of course in graphics there's a lot of research that makes it into games or is developed for games, so always keep up on what's going on in SigGraph circles.&lt;br&gt;&#xD;&#xA;And for AI there's&lt;br&gt;&#xD;&#xA;http://www.aaai.org/home.html&#xD;&#xA;" />
  <row Id="3842" PostHistoryTypeId="5" PostId="545" RevisionGUID="c13e32a3-3626-46e2-a6da-f624d377cccc" CreationDate="2010-08-02T22:58:05.700" UserId="208" Comment="+ mention that pygame is a lowish-level library" Text="I've used [pygame][1] extensively, and it has lots of positives:&#xD;&#xA;&#xD;&#xA; - it's a library for Python, which is a high-level language&#xD;&#xA; - it's got good clear [documentation][2]&#xD;&#xA; - it's got an active community&#xD;&#xA;&#xD;&#xA;Pygame is a wrapper around SDL, a cross-platform 2D graphics library. Pygame also has wrappers for sound, music etc. Note that despite Python being a high-level programming language, pygame is (for the most part) a fairly low-level graphics library.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/&#xD;&#xA;  [2]: http://www.pygame.org/docs/" />
  <row Id="3843" PostHistoryTypeId="2" PostId="2050" RevisionGUID="b6794134-d80d-4f70-9653-23c22802f6e3" CreationDate="2010-08-02T23:00:00.330" UserId="1297" Text="I used both SDL and SFML for my game projects. I used SDL for a finished game, a tetris game, and I mostly used SFML as a windowing layer for shader experiments. From my experience, I'd have to say that SDL is what it says. It's a simple direct-media layer, which abstracts the data your media (sound and video) works with to a level you can interact with accross different platforms. That's &quot;all&quot; it does.&#xD;&#xA;&#xD;&#xA;Because of that, you generally have to mix it with a few other libraries, most notably SDL_mixer, SDL_gfx, and SDL_image, which provide functionality everyone needs to create games. &#xD;&#xA;&#xD;&#xA;All of these libraries are also meant for the C programming language, and they follow it's conventions. Not that there is anything wrong with that, but if you want an object oriented approach to how you interact with io, then you basically have to build that layer yourself.&#xD;&#xA;&#xD;&#xA;SFML comes with everything right out of the box. It has sound, it has video, it has mixing, it has frame-capping, and it is object oriented. If that's what you want, I'd recommend you go for that. SFML also has an abstraction layer for some of the basic functionality in opengl (specifically beginShape/EndShape and pixel shaders). I don't think SDL has anything like that, just a method to merge with it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;P.S. Not to drive away the conversation from C/C++, but if you're not using that language for any particular reason, and want an easier one, there's always pygame. Which is basically SDL+ for Python.&#xD;&#xA;" />
  <row Id="3844" PostHistoryTypeId="2" PostId="2051" RevisionGUID="dc5b0c92-aac5-4b1d-a076-e471e9ed0dbf" CreationDate="2010-08-02T23:32:10.030" UserId="627" Text="I think one of the best ways to &quot;figure it out&quot; would be to have a look at how highly developed GUI frameworks work, such as Windows Forms in .NET.&#xD;&#xA;&#xD;&#xA;For example, they are all Controls, which have a location, size, list of child controls, a reference to its parent, a `Text` property for whatever the control may use it for, as well as various overridable functions and predefined actions.&#xD;&#xA;&#xD;&#xA;They all contain various events such as `Click`, `MouseOver` and `Resizing`.&#xD;&#xA;&#xD;&#xA;For example, when a child control is changed, it sends a notification up the chain that its layout has changed, and all parents then call `PerformLayout()`.&#xD;&#xA;&#xD;&#xA;As well, auto-sizing and auto-arranging are common features of these GUIs, allowing programmers to simply add controls and the parent controls adjust or arrange them automatically." />
  <row Id="3845" PostHistoryTypeId="2" PostId="2052" RevisionGUID="c80bbc25-f0fb-4f33-afc7-51761803a320" CreationDate="2010-08-02T23:39:21.047" UserId="92" Text="There's a very simple design solution that Blizzard took in Warcraft 3 and Starcraft 2: only let players earn points/score/experience when playing in games using the automatic matchmaking service. Players can still play against their friends, but won't get points from it.&#xD;&#xA;&#xD;&#xA;If the player has no way of deciding who they are playing against, there's no reliable way to game it by playing against dummy accounts." />
  <row Id="3846" PostHistoryTypeId="2" PostId="2053" RevisionGUID="e80684da-993d-4246-9b29-2b8da157f5bd" CreationDate="2010-08-02T23:55:08.990" UserId="322" Text="I think what he means is to host your DirectX surface in a full screen WPF application using the [D3DImage][1] class.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.windows.interop.d3dimage.aspx" />
  <row Id="3847" PostHistoryTypeId="2" PostId="2054" RevisionGUID="f440188e-c159-4f23-938e-bd4781443a75" CreationDate="2010-08-03T01:02:41.473" UserId="41" Text="At the very least you'll need.&#xD;&#xA;&#xD;&#xA; - Algebra&#xD;&#xA; - Basic Geometry&#xD;&#xA; - Basic Trigonometry&#xD;&#xA;&#xD;&#xA;You'll also want to have at least a working knowledge of Vector operations, and you'll want to know what a Matrix is and what it can be used for, although the details won't be strictly necessary.&#xD;&#xA;&#xD;&#xA;If you'd like to get into graphics programming you'll need a hell of a lot more math knowledge, but doing general gameplay programming does not have to be so math intensive." />
  <row Id="3848" PostHistoryTypeId="16" PostId="2054" RevisionGUID="f440188e-c159-4f23-938e-bd4781443a75" CreationDate="2010-08-03T01:02:41.473" UserId="-1" />
  <row Id="3854" PostHistoryTypeId="2" PostId="2057" RevisionGUID="7387fc7b-eff1-4781-bcfa-9313bb817914" CreationDate="2010-08-03T03:30:28.140" UserId="1024" Text="A few questions on the site have mentioned the need for more open source projects. I agree and wonder what frameworks should be developed.&#xD;&#xA;&#xD;&#xA;I'll start the list.&#xD;&#xA;&#xD;&#xA; - A geometry kernel, including&#xD;&#xA;   serialization (JSON, binary,&#xD;&#xA;   compressed binary), tailored for&#xD;&#xA;   OpenGL/DirectX&#xD;&#xA; - Gesture recognition" />
  <row Id="3855" PostHistoryTypeId="1" PostId="2057" RevisionGUID="7387fc7b-eff1-4781-bcfa-9313bb817914" CreationDate="2010-08-03T03:30:28.140" UserId="1024" Text="Most Needed Open Source Project" />
  <row Id="3856" PostHistoryTypeId="3" PostId="2057" RevisionGUID="7387fc7b-eff1-4781-bcfa-9313bb817914" CreationDate="2010-08-03T03:30:28.140" UserId="1024" Text="&lt;subjective&gt;&lt;open-source&gt;" />
  <row Id="3857" PostHistoryTypeId="16" PostId="2057" RevisionGUID="7387fc7b-eff1-4781-bcfa-9313bb817914" CreationDate="2010-08-03T03:30:28.140" UserId="1024" />
  <row Id="3859" PostHistoryTypeId="2" PostId="2059" RevisionGUID="80c7ef5f-f1d8-4f25-8cde-baa16f60e9e6" CreationDate="2010-08-03T05:12:29.380" UserId="395" Text="I've already complained about this in another question, but having open digital distribution systems would be glorious. This encompasses both patching systems and end-user marketplace type things. Steam handles a lot of this, but is far from an open platform. Even if it wasn't a single shared marketplace like Steam is (or how phone marketplaces are going), having a solution you could easily rebrand and deploy for yourself would be a huge step forward (assuming people actually did things like submit patches upstream and all that FOSS goodness)." />
  <row Id="3860" PostHistoryTypeId="16" PostId="2059" RevisionGUID="80c7ef5f-f1d8-4f25-8cde-baa16f60e9e6" CreationDate="2010-08-03T05:12:29.380" UserId="-1" />
  <row Id="3863" PostHistoryTypeId="2" PostId="2061" RevisionGUID="fb3b9df6-7104-46dc-967b-a9ba7aeeb984" CreationDate="2010-08-03T05:48:32.753" UserId="94" Text="I haven't used it, but you might want to try [Taksi][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://taksi.sourceforge.net/" />
  <row Id="3864" PostHistoryTypeId="2" PostId="2062" RevisionGUID="19a4f54f-6997-4acb-882e-01cf7535b480" CreationDate="2010-08-03T06:40:21.977" UserId="144" Text="Looking to make textures for Unity3d, and I'm stuck at what seems to be a simple stage. My goal is to create an RGBA image, with color information for every pixel, and a separate alpha channel. These two components get fed into Unity as base color and reflection strength, respectively. (Using &quot;Reflective/Bumped Diffuse&quot; material.)&#xD;&#xA;&#xD;&#xA;If I use masking tools in Photoshop, I can erase parts of the output image (transparency). However, I would like to keep the original RBG color information when output, and not just have &quot;blank&quot; areas. Also, it would be nice if I could do it non-destructively, ie. the final alpha channel is dependent on a standard layer, or built from a path object, etc.&#xD;&#xA;&#xD;&#xA;I have the same problem with The Gimp.&#xD;&#xA;&#xD;&#xA;Any help on this would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;(If Photoshop/Gimp are not the tools for the job, can someone please recommend a better one?)" />
  <row Id="3865" PostHistoryTypeId="1" PostId="2062" RevisionGUID="19a4f54f-6997-4acb-882e-01cf7535b480" CreationDate="2010-08-03T06:40:21.977" UserId="144" Text="Non-destructive way to edit alpha channel in Photoshop/Gimp image" />
  <row Id="3866" PostHistoryTypeId="3" PostId="2062" RevisionGUID="19a4f54f-6997-4acb-882e-01cf7535b480" CreationDate="2010-08-03T06:40:21.977" UserId="144" Text="&lt;graphics&gt;&lt;tools&gt;&lt;unity&gt;&lt;textures&gt;" />
  <row Id="3867" PostHistoryTypeId="2" PostId="2063" RevisionGUID="025b378a-195c-4061-a9fb-9e76fb7ca10e" CreationDate="2010-08-03T07:04:39.477" UserId="1272" Text="&#xD;&#xA;In the GIMP, one way would be to split the image into layers for each channel. Select &quot;Colors-&gt;Components-&gt;Decompose&quot; and choose RGBA or whatever channels you want to break into layers. Then edit your individual channels as you see fit (they should be greyscale), then go &quot;Colors-&gt;Components-&gt;Compose&quot; choose your desired channel layout and choose the layers for each channel." />
  <row Id="3868" PostHistoryTypeId="2" PostId="2064" RevisionGUID="7de731cf-d9c4-434b-a9cc-280eb4c5bd8d" CreationDate="2010-08-03T07:09:37.423" UserId="919" Text="I'm pretty interested in seeing demographic data as I find them good targeting tools. But other than the ESA reports (free) and NPD numbers (paid) does anyone know any other sources for such data?" />
  <row Id="3869" PostHistoryTypeId="1" PostId="2064" RevisionGUID="7de731cf-d9c4-434b-a9cc-280eb4c5bd8d" CreationDate="2010-08-03T07:09:37.423" UserId="919" Text="Other than the ESA are there other sources for demographic data?" />
  <row Id="3870" PostHistoryTypeId="3" PostId="2064" RevisionGUID="7de731cf-d9c4-434b-a9cc-280eb4c5bd8d" CreationDate="2010-08-03T07:09:37.423" UserId="919" Text="&lt;game-design&gt;&lt;marketing&gt;" />
  <row Id="3871" PostHistoryTypeId="16" PostId="2064" RevisionGUID="7de731cf-d9c4-434b-a9cc-280eb4c5bd8d" CreationDate="2010-08-03T07:09:37.423" UserId="919" />
  <row Id="3872" PostHistoryTypeId="6" PostId="160" RevisionGUID="31fa43fe-9d84-4145-aba5-f5f563f10a06" CreationDate="2010-08-03T07:10:39.573" UserId="51" Comment="edited tags" Text="&lt;hardware&gt;&lt;tessellation&gt;&lt;directx11&gt;" />
  <row Id="3873" PostHistoryTypeId="5" PostId="2063" RevisionGUID="a24f9acd-47df-4321-ae05-3aa34323fa76" CreationDate="2010-08-03T07:10:52.193" UserId="1272" Comment="Punctuation + clarity fixes in a couple spots" Text="In the GIMP, one way would be to split the image into layers for each channel. Select &quot;Colors-&gt;Components-&gt;Decompose&quot; and choose RGBA or whatever channels you want to break into layers. Then edit your individual alpha and color channels as you see fit (they should be greyscale), then go &quot;Colors-&gt;Components-&gt;Compose&quot; choose your desired channel layout and choose your layers to use for each channel.&#xD;&#xA;&#xD;&#xA;Also, you can use the &quot;Channels&quot; dialogue. It should be a part of the default toolbox things, but if not you can select &quot;Windows-&gt;Dockable Dialogues-&gt;Channels&quot;. You can toggle visibility of each color channel, and by clicking and highlighting the channel names you can choose which ones to edit individually (it looks like it preserves color with alpha, although I don't see a way to &quot;hide&quot; the alpha while editing without hiding the entire image...)." />
  <row Id="3874" PostHistoryTypeId="6" PostId="288" RevisionGUID="866fdb53-55c0-4520-9b22-23fe0130eaac" CreationDate="2010-08-03T07:11:35.203" UserId="51" Comment="edited tags" Text="&lt;graphics&gt;&lt;shadermodel3&gt;&lt;directx9&gt;" />
  <row Id="3875" PostHistoryTypeId="2" PostId="2065" RevisionGUID="4b547d65-e205-4200-b683-9623dbd3014f" CreationDate="2010-08-03T07:17:17.840" UserId="288" Text="I find the best way to do this in The GIMP is to use a layer mask (right click on a layer and create mask).&#xD;&#xA;&#xD;&#xA;The layer will then have two &quot;images&quot; associated with it - the RGBA image and a grayscale layer mask which acts as an extra (multiplicative) alpha channel. You can click either of these images to select which one will be edited.&#xD;&#xA;&#xD;&#xA;If you hold CTRL and click the layer mask, you will see just the RGBA image (this disables the mask). If you hold down ALT and click the layer mask, you will see just the layer mask.&#xD;&#xA;&#xD;&#xA;**When you export an image with an active layer mask, the exported image will retain the colour information even from areas that the mask makes fully transparent.**&#xD;&#xA;&#xD;&#xA;For your purposes, you may find it effective to compose your alpha channel on a separate (RGBA) layer - then when you are done you can just copy this layer into the layer mask of the original layer." />
  <row Id="3876" PostHistoryTypeId="2" PostId="2066" RevisionGUID="938929f6-f1c9-4ac5-b3fa-2cc63664005b" CreationDate="2010-08-03T07:28:35.880" UserId="919" Text="Cases where manuals can be helpful:&#xD;&#xA;&#xD;&#xA;1. I think it's good to have manuals especially if your game has data that is semi-vital and a whole lot of work to memorize. Examples of which are Pokemon's resistance tables and Shin Megami Tensei's fusion charts.&#xD;&#xA;&#xD;&#xA;2. In the old days manuals were also used to hint at hidden or secret stuff (but I guess we have gamefaqs now). I.e. Dragon Spirit wrote the secret gold dragon trick on the manual, Goonies also had the inventory trick on the manual.&#xD;&#xA;&#xD;&#xA;3. Technical stuff (like installation as other's mentioned)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3877" PostHistoryTypeId="2" PostId="2067" RevisionGUID="e4b61fe3-0a43-49ba-9f5e-ad15161147fb" CreationDate="2010-08-03T07:52:53.357" UserId="721" Text="A talented programmer (Iq from from rgba) has written good articles:&#xD;&#xA;&#xD;&#xA; - ssao: [http://www.iquilezles.org/www/articles/ssao/ssao.htm][1]&#xD;&#xA; - global illumination: [http://www.iquilezles.org/www/articles/simplegi/simplegi.htm][2]&#xD;&#xA; - ambient illumination: [http://www.iquilezles.org/www/articles/ao/ao.htm][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iquilezles.org/www/articles/ssao/ssao.htm&#xD;&#xA;  [2]: http://www.iquilezles.org/www/articles/simplegi/simplegi.htm&#xD;&#xA;  [3]: http://www.iquilezles.org/www/articles/ao/ao.htm" />
  <row Id="3878" PostHistoryTypeId="2" PostId="2068" RevisionGUID="6fbfd5b6-38fb-4d51-bdf1-65a4d89b4aa7" CreationDate="2010-08-03T08:08:53.397" UserId="267" Text="I'm surprised that no one mentioned [Quaternions][1]. I don't have a lot of experience with different engines but at least JME uses it everywhere and I got the impression that they're a pretty important concept.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://de.wikipedia.org/wiki/Quaternion" />
  <row Id="3879" PostHistoryTypeId="16" PostId="2068" RevisionGUID="6fbfd5b6-38fb-4d51-bdf1-65a4d89b4aa7" CreationDate="2010-08-03T08:08:53.397" UserId="-1" />
  <row Id="3880" PostHistoryTypeId="5" PostId="2035" RevisionGUID="217f095e-dff6-4e14-a696-6be09e945321" CreationDate="2010-08-03T09:02:45.793" UserId="1156" Comment="added 202 characters in body" Text="A firm grasp of +, -, *, and /.  &#xD;&#xA;Without them, you're completely screwed.  &#xD;&#xA;EDIT: On a more serious note, I would say vectors [cross product, dot product, and that jazz] and the rest of linear algebra are something of a must. Unless you're doing puzzle style games only.  &#xD;&#xA;" />
  <row Id="3881" PostHistoryTypeId="2" PostId="2069" RevisionGUID="75760120-33d6-43f5-8f11-526d721105f6" CreationDate="2010-08-03T09:44:22.590" UserId="1309" Text="* [Vector Math][1]&#xD;&#xA;&#xD;&#xA;Objects in a game world are represented with vectors. A vector represents things like an object's position, look direction and speed.&#xD;&#xA;&#xD;&#xA;* Quaternions&#xD;&#xA;&#xD;&#xA;Main reason games use quaternions is to eliminate [gimble lock][2]. Gimble lock is that effect where when you move your mouse to look down, it will stop when you look directly down. Think about it, in games where you are in a space ship this would be pretty stupid if your camera stopped when you looked at the 'floor'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://physics.about.com/od/mathematics/a/VectorMath.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Gimbal_lock" />
  <row Id="3882" PostHistoryTypeId="16" PostId="2069" RevisionGUID="75760120-33d6-43f5-8f11-526d721105f6" CreationDate="2010-08-03T09:44:22.590" UserId="-1" />
  <row Id="3883" PostHistoryTypeId="5" PostId="2069" RevisionGUID="7817ec8e-9762-487b-bf47-d6376ce6c55d" CreationDate="2010-08-03T09:51:05.803" UserId="1309" Comment="added 881 characters in body; added 411 characters in body" Text="* [Vector Math][1]&#xD;&#xA;&#xD;&#xA;How do I move my game object? The novice might say:&#xD;&#xA;&#xD;&#xA;&quot;I know! I'll just do:&quot; `object.position.x++`.&#xD;&#xA;&#xD;&#xA;No no no. You need to use a vector calculation. The object needs a position, direction and acceleration vector which you can use to move the object. If you do the novice thing, you'll get stuck in an unmaintainable mess, and how do you make it move in a direction not aligned with the world's XYZ axis?&#xD;&#xA;&#xD;&#xA;Objects in a game world are represented with vectors. A vector represents things like an object's position, look direction and speed.&#xD;&#xA;&#xD;&#xA;* [Quaternions][2]&#xD;&#xA;&#xD;&#xA;Main reason games use quaternions is to eliminate [gimble lock][3]. Gimble lock is that effect where when you move your mouse to look down, it will stop when you look directly down. Think about it, in games where you are in a space ship this would be pretty stupid if your camera stopped when you looked at the 'floor'.&#xD;&#xA;&#xD;&#xA;* [Physics][4]&#xD;&#xA;&#xD;&#xA;If you are going to be programming the math for physics responses in a game, then taking a physics class wouldn't have been a bad idea. &#xD;&#xA;&#xD;&#xA;Reasons will you need to know physics equations:&#xD;&#xA;&#xD;&#xA; 1. Making a ball bounce (see: co-efficient of restitution)&#xD;&#xA; 2. Make a ball move in a direction with 'x' newtons of force&#xD;&#xA; 3. Make something have more or less friction so it will slide at a different speed&#xD;&#xA; 4. Collision responses: What direction will the object rotate when I hit it 'here'?&#xD;&#xA;&#xD;&#xA;If you use a physics engine (or a game engine which has the physics engine inbuilt) then you can get away with knowing very little about physics. Still, it's quite good to know when you need to get your hands dirty because the physics engine isn't performing properly. &#xD;&#xA;&#xD;&#xA;  [1]: http://physics.about.com/od/mathematics/a/VectorMath.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Quaternion&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Gimbal_lock&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Game_physics" />
  <row Id="3884" PostHistoryTypeId="5" PostId="2069" RevisionGUID="8a099db0-1ba4-4691-83e1-523e5de7b182" CreationDate="2010-08-03T09:58:00.917" UserId="1309" Comment="added 111 characters in body; added 162 characters in body; added 16 characters in body" Text="There are *many* other forms of math that are useful, but at the absolute _minimum_ you need to know these:&#xD;&#xA;&#xD;&#xA;* **Algebra and Arithmetic**&#xD;&#xA;&#xD;&#xA;These are pretty basic, but if you don't know these you won't have a chance at even being a programmer let alone a game developer.&#xD;&#xA;&#xD;&#xA;* **[Vector Math][1]**&#xD;&#xA;&#xD;&#xA;How do I move my game object? The novice might say:&#xD;&#xA;&#xD;&#xA;&quot;I know! I'll just do:&quot; `object.position.x++`.&#xD;&#xA;&#xD;&#xA;No no no. You need to use a vector calculation. The object needs a position, direction and acceleration vector which you can use to move the object. If you do the novice thing, you'll get stuck in an unmaintainable mess, and how do you make it move in a direction not aligned with the world's XYZ axis?&#xD;&#xA;&#xD;&#xA;Objects in a game world are represented with vectors. A vector represents things like an object's position, look direction and speed.&#xD;&#xA;&#xD;&#xA;* **[Quaternions][2]**&#xD;&#xA;&#xD;&#xA;Main reason games use quaternions is to eliminate [gimble lock][3]. Gimble lock is that effect where when you move your mouse to look down, it will stop when you look directly down. Think about it, in games where you are in a space ship this would be pretty stupid if your camera stopped when you looked at the 'floor'.&#xD;&#xA;&#xD;&#xA;* **[Physics][4]**&#xD;&#xA;&#xD;&#xA;If you are going to be programming the math for physics responses in a game, then taking a physics class wouldn't have been a bad idea. &#xD;&#xA;&#xD;&#xA;Reasons will you need to know physics equations:&#xD;&#xA;&#xD;&#xA; 1. Making a ball bounce (see: co-efficient of restitution)&#xD;&#xA; 2. Make a ball move in a direction with 'x' newtons of force&#xD;&#xA; 3. Make something have more or less friction so it will slide at a different speed&#xD;&#xA; 4. Collision responses: What direction will the object rotate when I hit it 'here'?&#xD;&#xA;&#xD;&#xA;If you use a physics engine (or a game engine which has the physics engine inbuilt) then you can get away with knowing very little about physics. Still, it's quite good to know when you need to get your hands dirty because the physics engine isn't performing properly. &#xD;&#xA;&#xD;&#xA;  [1]: http://physics.about.com/od/mathematics/a/VectorMath.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Quaternion&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Gimbal_lock&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Game_physics" />
  <row Id="3885" PostHistoryTypeId="5" PostId="2069" RevisionGUID="6e8bb192-6918-46ca-ae24-a21e566d8e0f" CreationDate="2010-08-03T10:03:46.520" UserId="1309" Comment="added 213 characters in body" Text="There are *many* other forms of math that are useful, but at the absolute _minimum_ you need to know these:&#xD;&#xA;&#xD;&#xA;* **Algebra and Arithmetic**&#xD;&#xA;&#xD;&#xA;These are pretty basic, but if you don't know these you won't have a chance at even being a programmer let alone a game developer.&#xD;&#xA;&#xD;&#xA;* **[Vector Math][1]**&#xD;&#xA;&#xD;&#xA;Objects in a game world are represented with vectors. A vector represents things like an object's position, look direction and speed. Vector math calculations such as the [Dot Product][2], [Cross Product][3], Vector normalisation are essential.&#xD;&#xA;&#xD;&#xA;How do I move my game object? The novice might say:&#xD;&#xA;&#xD;&#xA;&quot;I know! I'll just do:&quot; `object.position.x++`.&#xD;&#xA;&#xD;&#xA;No no no. You need to use a vector calculation. The object needs a position, direction and acceleration vector which you can use to move the object. If you do the novice thing, you'll get stuck in an unmaintainable mess, and how do you make it move in a direction not aligned with the world's XYZ axis?&#xD;&#xA;&#xD;&#xA;* **[Quaternions][4]**&#xD;&#xA;&#xD;&#xA;Main reason games use quaternions is to eliminate [gimble lock][5]. Gimble lock is that effect where when you move your mouse to look down, it will stop when you look directly down. Think about it, in games where you are in a space ship this would be pretty stupid if your camera stopped when you looked at the 'floor'.&#xD;&#xA;&#xD;&#xA;* **[Physics][6]**&#xD;&#xA;&#xD;&#xA;If you are going to be programming the math for physics responses in a game, then taking a physics class wouldn't have been a bad idea. &#xD;&#xA;&#xD;&#xA;Reasons will you need to know physics equations:&#xD;&#xA;&#xD;&#xA; 1. Making a ball bounce (see: co-efficient of restitution)&#xD;&#xA; 2. Make a ball move in a direction with 'x' newtons of force&#xD;&#xA; 3. Make something have more or less friction so it will slide at a different speed&#xD;&#xA; 4. Collision responses: What direction will the object rotate when I hit it 'here'?&#xD;&#xA;&#xD;&#xA;If you use a physics engine (or a game engine which has the physics engine inbuilt) then you can get away with knowing very little about physics. Still, it's quite good to know when you need to get your hands dirty because the physics engine isn't performing properly. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://physics.about.com/od/mathematics/a/VectorMath.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Dot_product&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Cross_product&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Quaternion&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Gimbal_lock&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Game_physics" />
  <row Id="3886" PostHistoryTypeId="5" PostId="2005" RevisionGUID="56cda30d-176b-4489-ad83-ade7731e2703" CreationDate="2010-08-03T10:17:26.300" UserId="715" Comment="added 466 characters in body" Text="I'm on the planning stages for an internal game engine I am about to start creating, which will be used for all my games going forward. But I'm struggling a bit with how it should be built.  &#xD;&#xA;&#xD;&#xA;The choices come down to: framework or library.  &#xD;&#xA;&#xD;&#xA;My basic objective is to hide engine details as much as possible to keep high level game development on scripts and config files as much as possible. But also to reuse the core engine for any tools we might develop in the future.  &#xD;&#xA;&#xD;&#xA;Frameworks can make things nice and easy for development, but then you're locked in. Libraries are good if you're only interested in a specific subsystem. But we need to glue everything together in a game by game basis.  &#xD;&#xA;&#xD;&#xA;Well there is also another, building the engine as a standalone exe that handles all game resources, and all the subsystems. Game logic (and other per game dynamic stuff) is done exclusively on scripts with config files to configure each internal engine subsystem.  &#xD;&#xA;&#xD;&#xA;Which one will give me more flexibility in the future.  &#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Thanks everybody, guess I was looking at this in the wrong perspective. We can't really plan something like this without a priori knowledge of what the games need, guess this is why there is no such thing as a general engine for all genres.  &#xD;&#xA;&#xD;&#xA;I'll focus first on the game proper then iteratively analyze at the end of each game how to make decent abstractions for libraries or frameworks depending on my work-flow (or possibly that of a future team).  " />
  <row Id="3887" PostHistoryTypeId="2" PostId="2070" RevisionGUID="82496e0f-0464-4c99-93e0-1fc2b7c302c4" CreationDate="2010-08-03T10:33:51.347" UserId="1310" Text="I'm new to game development and development in general, I want to make a Connect 4 game. I have made a few simple game tutorials and I decided I wanted to make my own game now. I figured a connect 4 game should be a simple start for me, can anyone help me out how to go about with this please?&#xD;&#xA;&#xD;&#xA;Should I use Cocos2d or write it in ObjC?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;David H." />
  <row Id="3888" PostHistoryTypeId="1" PostId="2070" RevisionGUID="82496e0f-0464-4c99-93e0-1fc2b7c302c4" CreationDate="2010-08-03T10:33:51.347" UserId="1310" Text="Connect 4 Iphone game" />
  <row Id="3889" PostHistoryTypeId="3" PostId="2070" RevisionGUID="82496e0f-0464-4c99-93e0-1fc2b7c302c4" CreationDate="2010-08-03T10:33:51.347" UserId="1310" Text="&lt;objective-c&gt;&lt;cocos2d&gt;" />
  <row Id="3890" PostHistoryTypeId="2" PostId="2071" RevisionGUID="82ac5721-2d44-458a-94d2-6cd6ff24203f" CreationDate="2010-08-03T10:34:21.690" UserId="560" Text="For interests sake I thought I would throw out [Scaleform](http://www.scaleform.com/products/gfx). Basically the artists can use illustrator, photoshop etc, then the UI designer uses Flash to layout all the interactivity. Then Scaleform transforms it into code for your engine (well thats my understanding of it as I have not used it). Crysis Warhead used this system for their lobby." />
  <row Id="3891" PostHistoryTypeId="2" PostId="2072" RevisionGUID="22bae3ec-3623-46af-85e5-3733c4f0701d" CreationDate="2010-08-03T10:58:16.017" UserId="728" Text="Just raising an interesting suggestion, if developing the game for Windows, use the Win32 API. Just use the normal windows controls (I would recommend using the ATL/WTL libraries) but make them owner drawn. &#xD;&#xA;&#xD;&#xA;I saw this technique being used in the first Unreal Tournament game, while looking through the publically released headers (for mod makers).&#xD;&#xA;&#xD;&#xA;One of the key benefits to doing this is having the whole Windows UI infrastructure at your disposal, as well as maintaining the user's preferences for keyboard repeat rate, mouse sensitivity, double click speed, and other things. Also if you obey the rules the interface will be fast and flicker free.&#xD;&#xA;&#xD;&#xA;The drawbacks are that you'll still have to write some code to subclass the windows controls to make them owner draw so that you can apply your own graphics and effects to them.&#xD;&#xA;&#xD;&#xA;Just throwing this out as an idea." />
  <row Id="3892" PostHistoryTypeId="2" PostId="2073" RevisionGUID="5424b683-2178-42b4-a02e-e7cc4a44f58e" CreationDate="2010-08-03T11:35:03.650" UserId="258" Text="A long time ago, 4:3 pretty much the only apect ratio you would find on a pc. Today the most common one is 16:10, but most new monitors (especially laptops) are 16:9&#xD;&#xA;&#xD;&#xA;I'm writing a 2d platformer and I can't decide how I should handle all the different ratios.&#xD;&#xA;&#xD;&#xA;Here are some ideas in crappy programmer art:&#xD;&#xA;&#xD;&#xA;![widescreen ideas][1]&#xD;&#xA;&#xD;&#xA;And in text:&#xD;&#xA;&lt;ul&gt;&#xD;&#xA; &lt;li&gt; &lt;b&gt;1&lt;/b&gt; : 4:3 gets more content, widescreens are cut on top and bottom &lt;/li&gt;&#xD;&#xA; &lt;li&gt; &lt;b&gt;2&lt;/b&gt; : 16:9 gets more content, the others are cut left and right &lt;/li&gt;&#xD;&#xA; &lt;li&gt; &lt;b&gt;3&lt;/b&gt; : The game is in 16:9 with black horizontal bars for other ARs&lt;/li&gt;&#xD;&#xA; &lt;li&gt; &lt;b&gt;4&lt;/b&gt; : The game is in 4:3 with black vertical bars for other ARs&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, what do you think?&#xD;&#xA;&#xD;&#xA;  [1]: http://img837.imageshack.us/img837/6596/widescreensm.png" />
  <row Id="3893" PostHistoryTypeId="1" PostId="2073" RevisionGUID="5424b683-2178-42b4-a02e-e7cc4a44f58e" CreationDate="2010-08-03T11:35:03.650" UserId="258" Text="How would you handle different aspect ratios in a 2d platformer?" />
  <row Id="3894" PostHistoryTypeId="3" PostId="2073" RevisionGUID="5424b683-2178-42b4-a02e-e7cc4a44f58e" CreationDate="2010-08-03T11:35:03.650" UserId="258" Text="&lt;2d&gt;&lt;best-practices&gt;" />
  <row Id="3895" PostHistoryTypeId="2" PostId="2074" RevisionGUID="fbc93310-ca71-485e-b0cc-60a5ae91b15e" CreationDate="2010-08-03T11:58:20.490" UserId="741" Text="Well, as a basic bit of advice, on PC I'd say &quot;don't assume your user wants to run full screen&quot;. And in windowed mode, pick your ideal ratio and just use that directly.&#xD;&#xA;&#xD;&#xA;Users I think are generally accepting of black bars when presented with full screen content. So strategies 3 and 4 are acceptable, if not ideal. They have the advantage that you always know how much content you are rendering: i.e. no sneaky bugs which only occur when running in wide-screen.&#xD;&#xA;&#xD;&#xA;If you are trying to be adaptive, and detecting the users ratio via screen resolution and showing as much content as possible, then you have to take account of high and low priority content differently. High priority content is stuff that the user absolutely has to see onscreen, if it is offscreen the game is failing. So this is things like HUD and UI elements, and the player avatar and anything they are interacting with. Low priority content is stuff that if it's onscreen then that's good, but if it is offscreen it's no big deal. E.g.:Background graphics and things that are reasonably far away from the avatar.&#xD;&#xA;&#xD;&#xA;Assuming you have a UI/HUD which is being superimposed over the top of some 'physical' 2D world, then this is straightforward enough. Low priority items are easy, you just make sure that the 4:3 viewport is centred on the interesting things, then draw as much low priority stuff as you can to the left or right. High priority things in the 2D world (e.g. your character, enemies your character is directly fighting) should always be kept in the 4:3 viewport. I.e. don't have your game code zoom the camera in to take advantage of the extra screen real estate, because then you will have game code acting differently in widescreen vs. not. Have the game code assume that the world is being rendered in 4:3, and only let your rendering code be aware that there is actually more than that being visible.&#xD;&#xA;&#xD;&#xA;Laying out UI/HUD elements can be approached in one of two ways:&#xD;&#xA;&#xD;&#xA; 1. Dynamic positioning: Specify all your elements relative to screen edges (i.e. not all relative to 0,0). Depending on your aspect ratio, the elements will be closer or further away from the center of the screen. Pros: Allows you to hook things to corners and have them 'just work'. Cons: Difficult to get layout working nicely in the centre, and risk of elements overlapping&#xD;&#xA; 2. Conservative static positioning: Lay out all your elements in 4:3, and simply offset them when running in widescreen. Pros: simple, unambiguous layout logic/coordinates. Cons: leaves visual dead space at the left and right of your UI controls, where you'll see the 2D world in the background but no UI." />
  <row Id="3897" PostHistoryTypeId="2" PostId="2076" RevisionGUID="cfccdb22-9c07-42b6-8fe7-142e4ab6f5a3" CreationDate="2010-08-03T12:22:42.427" UserId="181" Text="Don't go for &quot;computer graphics&quot; books. Start with linear algebra - it lays the foundation for everything you need. MIT has a good video course: http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2005/&#xD;&#xA;&#xD;&#xA;From there, it should be straight forward to pick up any introductory text on computer graphics. UoWashington has a course online (no video, though): http://www.cs.washington.edu/education/courses/457/06au/lectures/&#xD;&#xA;&#xD;&#xA;If you're impatient you can start with the graphics course without linear algebra, but believe me when I say it will come back to bite you :)&#xD;&#xA;" />
  <row Id="3898" PostHistoryTypeId="2" PostId="2077" RevisionGUID="485ed42a-dbe4-4024-9a7a-36c691511cde" CreationDate="2010-08-03T12:41:18.233" UserId="288" Text="One alternative is to write your own content processor to perform the operation you want. That way you could simply give your &quot;reflectivity&quot; layer (or even multiple reflectivity layers) a special name, and have the content processor put that data in the alpha channel for you. (Or indeed implement any kind of process that you like.)&#xD;&#xA;&#xD;&#xA;If you were using XNA and The GIMP (this is what I use and am familiar with), then it would be very easy for you to add [this XCF importer][1] to your content pipeline and make the necessary modifications to process specially named layers.&#xD;&#xA;&#xD;&#xA;As you are using Unity, not XNA, I am not familiar with what content pipeline options you have available. But perhaps you can adapt the linked code so that it works your content process.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fvproductions.org/downloads.html" />
  <row Id="3899" PostHistoryTypeId="2" PostId="2078" RevisionGUID="90a89ded-3436-43a2-b289-ba5abc6d2d3a" CreationDate="2010-08-03T12:47:16.160" UserId="1241" Text="Cocos2d is written in Obj-C, maybe you meant UIKit. Either way is ok for a simple connect-4 game. After working more than a year with cocos2d i can say you will be better off doing the game with it.&#xD;&#xA;" />
  <row Id="3900" PostHistoryTypeId="2" PostId="2079" RevisionGUID="f5a260c7-f0cc-47ba-b4ab-9e798f10de01" CreationDate="2010-08-03T12:47:42.633" UserId="119" Text="Castle Crashers seems to use a bit of #2 and a bit of #3 - you get black bars on a 4:3 screen, and also a very slightly smaller visible area - but you should always have a &quot;safe area&quot; around the edges where you don't put anything vital anyway (for screens like CRT TVs that crop the edges)" />
  <row Id="3901" PostHistoryTypeId="5" PostId="2077" RevisionGUID="5243109f-1f91-4f85-aa8e-faf6e49d4469" CreationDate="2010-08-03T12:53:54.223" UserId="288" Comment="added 7 characters in body" Text="One alternative is to write your own content processor to perform the operation you want. That way you could simply give your &quot;reflectivity&quot; layer (or even multiple reflectivity layers) a special name, and have the content processor put that data in the alpha channel for you. (Or indeed implement any kind of process that you like.)&#xD;&#xA;&#xD;&#xA;If you were using XNA and The GIMP (this is what I use and am familiar with), then it would be very easy for you to add [this XCF importer][1] to your content pipeline and make the necessary modifications to process specially named layers.&#xD;&#xA;&#xD;&#xA;As you are using Unity, not XNA, I am not familiar with what content pipeline options you have available. But perhaps you can adapt the linked code so that it works within your content process.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fvproductions.org/downloads.html" />
  <row Id="3902" PostHistoryTypeId="2" PostId="2080" RevisionGUID="7a8581ee-04fe-4933-9bc7-fe2fe4a8f327" CreationDate="2010-08-03T13:23:03.467" UserId="953" Text="Which is most appropriate for your game?  If you're making Canabalt (i.e. a game which depends on horizontal speed), a wide aspect ratio with black bars (#3) on narrower aspects would be ideal for highlighting lateral movement.  On the other hand, if you have a more aerial game like Super Smash Brothers, a taller screen (#2 or #4) would be best.  I'd base my decision on what works best for the game.&#xD;&#xA;&#xD;&#xA;I agree with other responders that care should be taken with regard to elements that might be visible on one display but not on another." />
  <row Id="3903" PostHistoryTypeId="2" PostId="2081" RevisionGUID="2b1c4055-61b6-4d62-8d41-40590587ec00" CreationDate="2010-08-03T13:40:46.030" UserId="1318" Text="Does anyone know of a clearly written reference implementation of morphological antialiasing (MLAA)?&#xD;&#xA;&#xD;&#xA;Intel provide a paper and reference implementation at the following address, but I find the code very opaque.&#xD;&#xA;&#xD;&#xA;http://visual-computing.intel-research.net/publications/publications.htm" />
  <row Id="3904" PostHistoryTypeId="1" PostId="2081" RevisionGUID="2b1c4055-61b6-4d62-8d41-40590587ec00" CreationDate="2010-08-03T13:40:46.030" UserId="1318" Text="Clear reference implementations of MLAA?" />
  <row Id="3905" PostHistoryTypeId="3" PostId="2081" RevisionGUID="2b1c4055-61b6-4d62-8d41-40590587ec00" CreationDate="2010-08-03T13:40:46.030" UserId="1318" Text="&lt;graphics&gt;" />
  <row Id="3906" PostHistoryTypeId="16" PostId="2081" RevisionGUID="2b1c4055-61b6-4d62-8d41-40590587ec00" CreationDate="2010-08-03T13:40:46.030" UserId="1318" />
  <row Id="3907" PostHistoryTypeId="2" PostId="2082" RevisionGUID="f123b826-05f3-4064-8552-2f9ecc8800c2" CreationDate="2010-08-03T13:52:57.297" UserId="189" Text="Make sure you actually need a sophisticated GUI system for your game. If you're making a computer RPG then obviously it will be a requirement; but for something like a racing game, don't overcomplicate things. Sometimes just rendering textures (custom button images) and having some &quot;if&quot; statements with hard-coded coordinates in your input function can get the job done. A game state machine (FSM) helps with this simple approach. Or, somewhere in the middle, forget the complicated hierarchy and scene graph approach and just have a &quot;Button&quot; class which packages the above-mentioned texture and input checks into simple function calls, but doesn't do anything complicated.&#xD;&#xA;&#xD;&#xA;Nailing down your requirements is important. If you're unsure, just remind yourself [YAGNI][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/YAGNI" />
  <row Id="3908" PostHistoryTypeId="5" PostId="1949" RevisionGUID="eb210fc6-911e-4dd9-8ec4-dca05f026ce2" CreationDate="2010-08-03T14:11:30.450" UserId="323" Comment="added 124 characters in body" Text="Starcraft 2 comes with a &quot;Quickstart Guide&quot;.&#xD;&#xA;&#xD;&#xA;* 4 pages of troubleshooting&#xD;&#xA;* 9 pages of backstory fiction&#xD;&#xA;* 6 pages of EULA&#xD;&#xA;* 7 pages of art&#xD;&#xA;* One *paragraph* of installation instructions, which is basically &quot;put it in your drive and doubleclick it&quot;&#xD;&#xA;&#xD;&#xA;There is not a single word about gameplay.&#xD;&#xA;&#xD;&#xA;I honestly feel like if Blizzard isn't bothering, you probably shouldn't bother either, unless you've got a game that is actually more complicated than Starcraft 2. Like a flight sim, and basically nothing else." />
  <row Id="3909" PostHistoryTypeId="2" PostId="2083" RevisionGUID="c0c62015-6a4d-4084-908c-fd8e748d3988" CreationDate="2010-08-03T14:22:21.767" UserId="288" Text="If you have no compelling reason to make your game &quot;wide&quot; (in which case use approach 3) or narrow (in which case use approach 4), go with a **combination of 1 and 2** (or possibly 3 and 4 if you want to hide things off-screen).&#xD;&#xA;&#xD;&#xA;Select a compromise aspect ratio (16:10 is a good one, or even 16:11). If the user is on 16:9 give them more content to the side, and if they're on 4:3 give them more content at the top and bottom.&#xD;&#xA;&#xD;&#xA;In any case - I find it best to implement it with something like this in your camera class:&#xD;&#xA;&#xD;&#xA;    float scaleToFitWidth = viewport.Width / nominalWorldSize.Width;&#xD;&#xA;    float scaleToFitHeight = viewport.Height / nominalWorldSize.Height;&#xD;&#xA;    float scale = Math.Min(scaleToFitWidth, scaleToFitHeight); // world to client&#xD;&#xA;&#xD;&#xA;At which point you can simply experiment with different nominal world sizes (ie: the size of the camera in world units) and simply select the best one." />
  <row Id="3910" PostHistoryTypeId="2" PostId="2084" RevisionGUID="ded20dbf-0774-49bc-b361-99aea0a700fa" CreationDate="2010-08-03T15:12:05.253" UserId="288" Text="Simple question: What are the pros and cons, as well as overall opinions, of outsourcing work as an independent game developer? (For example: paying an artist to draw characters, or a composer to write music, etc.)&#xD;&#xA;&#xD;&#xA;In particular I'm interested in the case where the developer (be it an individual or a team) can still complete their game to an acceptable standard without hiring somebody. (For example: maybe they're &quot;ok&quot; artists, or can use music from a free library.)&#xD;&#xA;&#xD;&#xA;(Ideally I'm looking for answers from people with experience in this area.)" />
  <row Id="3911" PostHistoryTypeId="1" PostId="2084" RevisionGUID="ded20dbf-0774-49bc-b361-99aea0a700fa" CreationDate="2010-08-03T15:12:05.253" UserId="288" Text="Should independent game developers outsource?" />
  <row Id="3912" PostHistoryTypeId="3" PostId="2084" RevisionGUID="ded20dbf-0774-49bc-b361-99aea0a700fa" CreationDate="2010-08-03T15:12:05.253" UserId="288" Text="&lt;best-practices&gt;&lt;hiring&gt;&lt;indie&gt;&lt;productivity&gt;" />
  <row Id="3913" PostHistoryTypeId="2" PostId="2085" RevisionGUID="617c5a8a-6e5d-4269-bd2f-217fb97a73dc" CreationDate="2010-08-03T15:27:24.410" UserId="1234" Text="I find the Giant Bombcast pretty entertaining, even if it's not so much game-development as it is just gaming" />
  <row Id="3914" PostHistoryTypeId="16" PostId="2085" RevisionGUID="617c5a8a-6e5d-4269-bd2f-217fb97a73dc" CreationDate="2010-08-03T15:27:24.410" UserId="-1" />
  <row Id="3915" PostHistoryTypeId="2" PostId="2086" RevisionGUID="c5ad544d-87cc-4b45-8396-881a2538e4be" CreationDate="2010-08-03T15:28:14.790" UserId="189" Text="[Ludum Dare 18][1] is coming up and I'll be participating in it. I've done a couple other short-term game competitions in the past but this is my first big one (and my first solo one). I am REALLY excited for it, but I'm wondering if there are any tricks to preparing for this sort of thing, and any advice on what to do while in the competition. So...&#xD;&#xA;&#xD;&#xA;**How do you best prepare for, or participate in, a short-term game competition?**&#xD;&#xA;&#xD;&#xA;Your answer can be specific to Ludum Dare but I'm really talking about any game competition, as long as it's **short-term** -- not the month-long ones where you casually develop your game and release it; I'm talking high-pressure, finish-in-time, pull-an-all-nighter type competitions. The [Global Game Jam][2] fits here as well, if you participated in that earlier this year.&#xD;&#xA;&#xD;&#xA;Also any tips in the context of a group of people (each working on their own solo game) would be great; I will be with the game development club at my school for most of the 48 hours (only a few other people, not a huge group).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ludumdare.com/compo/&#xD;&#xA;  [2]: http://www.globalgamejam.org/" />
  <row Id="3916" PostHistoryTypeId="1" PostId="2086" RevisionGUID="c5ad544d-87cc-4b45-8396-881a2538e4be" CreationDate="2010-08-03T15:28:14.790" UserId="189" Text="How to prepare for a game development competition?" />
  <row Id="3917" PostHistoryTypeId="3" PostId="2086" RevisionGUID="c5ad544d-87cc-4b45-8396-881a2538e4be" CreationDate="2010-08-03T15:28:14.790" UserId="189" Text="&lt;competition&gt;&lt;ludum-dare&gt;&lt;global-game-jam&gt;" />
  <row Id="3918" PostHistoryTypeId="2" PostId="2087" RevisionGUID="d13ff296-d8fb-42c8-89b5-a508057ac945" CreationDate="2010-08-03T15:32:23.943" UserId="1091" Text="I think COLLADA would/could be much more useful if it actually had a standard and open implementation for reading and writing the format, in addition to the fairly scary XML definition.&#xD;&#xA;&#xD;&#xA;Its power is also its failure - the ability to describe almost anything, and in a multitude of different ways, sounds great from the point of view of *exporting* but is a PITA to import and make sense of.&#xD;&#xA;&#xD;&#xA;However if you persevere, you do get a format which represents pretty much anything you're likely to need, is supported by quite a few tools, and can be extended.&#xD;&#xA;&#xD;&#xA;It's all too tempting to go with a simpler format, and then half-way through your development you'll realise you need some extra data, and there's no way of getting it.&#xD;&#xA;&#xD;&#xA;Also, if this is for use in an internal production pipeline, rather than for general release, you can whittle down the definition and only support what actually comes out of the package(s) you're using, rather than trying to be overly general.&#xD;&#xA;&#xD;&#xA;So yeah, it's flawed and complex, but it does work, and there aren't that many options out there.&#xD;&#xA;" />
  <row Id="3919" PostHistoryTypeId="2" PostId="2088" RevisionGUID="f7f1628d-68a6-4d22-aa89-dc26df5f4c7e" CreationDate="2010-08-03T16:05:32.910" UserId="1320" Text="I competed in a game jam last year and just making decisions before the competition really made things go smoother.  For example, you don't want to be deciding on an engine when you should be coding.  &#xD;&#xA;&#xD;&#xA;Build/collect everything you can ahead of time.  In the game jam I participated in, we were lucky enough to have some art assets provided, but we failed to get everything we needed so we wasted some time looking through the libraries for certain assets we needed.  We also ended up doing most of the sound on site, which we could have handled before the event.&#xD;&#xA;&#xD;&#xA;Try to anticipate some of the coding challenges you will run into.  We were building a basic shooter game and one of the biggest challenges was trying to get the enemies to move toward a moving player in a realistic way.  This was a challenge we could have predicted if we spent more time discussing before the event.&#xD;&#xA;&#xD;&#xA;Finally, if this is a team competition, make sure to go over these ideas with your team members.  You don't want to show up with many different ideas and spend time debating which to implement.&#xD;&#xA;" />
  <row Id="3920" PostHistoryTypeId="2" PostId="2089" RevisionGUID="c3cf9ab6-3cd7-4ea0-adff-7deef56fdb10" CreationDate="2010-08-03T16:11:49.220" UserId="1091" Text="On both 8-bit and 16-bit platforms I'd generally use a combination of a macro-assembler to compile my code (always assembly!), and some kind of monitor cartidge to debug it.&#xD;&#xA;&#xD;&#xA;Those cartridges were awesome development tools.&#xD;&#xA;&#xD;&#xA;For the first game I wrote (on the c64), I first wrote my own macro-assembler using the monitor cart. I had smooth 60hz scrolling in the text editor(!)&#xD;&#xA;&#xD;&#xA;On the Amiga the assembler of choice for me was DevPac.&#xD;&#xA;&#xD;&#xA;The more professional folks (who had money!) had cross-development set-ups where you'd hook the target machine up to a PC and use that to dump code across to it.&#xD;&#xA;&#xD;&#xA;For graphics I started off drawing stuff on graph paper, and later wrote my own character and sprite editors. Obviously on Amiga it was DPaint all the way.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3921" PostHistoryTypeId="16" PostId="2089" RevisionGUID="c3cf9ab6-3cd7-4ea0-adff-7deef56fdb10" CreationDate="2010-08-03T16:11:49.220" UserId="-1" />
  <row Id="3922" PostHistoryTypeId="2" PostId="2090" RevisionGUID="bde87876-f8d5-494a-af14-0ef307713dbf" CreationDate="2010-08-03T16:16:17.213" UserId="953" Text="I've sometimes worked with composers and sometimes used free music or created my own ambiences.  I usually do my own art, but I'm starting to work with an artist for one of my upcoming projects.&#xD;&#xA;&#xD;&#xA;I've had very good experiences with the composers; I offer a percentage of the sponsorship amount (I make Flash games), payable on publication.  For the most part, this has been great, although one project has taken so long to develop that I offered the composer a (non-refundable) advance, since he'd done quite a bit of work and I didn't (still don't) know when the game would be finished.&#xD;&#xA;&#xD;&#xA;Working with composers is great when you need a specific esoteric feel to the music.  For Exploit, my cyberpunk puzzle game, I wanted a certain kind of music that was difficult/impossible to find from free sources.  My composer, Evan Merz, was able to put together some amazing pieces.  On the other hand, my artsy reading game Silent Conversation needed experimental classical music, and I was easily able to find some with an acceptable license on Jamendo.  Likewise, my atmospheric adventure Looming needed creepy windy ambience with unexplained voices, and I was able to record that myself using Audacity.&#xD;&#xA;&#xD;&#xA;As for art, I'm usually able to put stuff together myself: usually pixel art.  However, I find that my own art gets mixed responses; I've got an amateur art background, but not enough that I consider myself on par with a lot of the work out there, even in Flash games.  My upcoming game is going to be bigger and more mainstream than most of my previous work, so I'm trying to work with an artist to get art that's higher-quality and more likely to appeal to broader audiences.&#xD;&#xA;&#xD;&#xA;I've found that it's an issue of quality, much more so than time savings.&#xD;&#xA;&#xD;&#xA;In short...&#xD;&#xA;&#xD;&#xA;**Outsourcing**:  You get exactly what you want, but you have to pay for it and run a slight risk that the person you're working with will flake (I haven't had any trouble).&#xD;&#xA;&#xD;&#xA;**Do-it-yourself**:  It's cheaper and often quicker, but it's harder to find the perfect asset from free sources and programmer/amateur art has a higher risk of turning some players off." />
  <row Id="3923" PostHistoryTypeId="2" PostId="2091" RevisionGUID="6ee108fd-32dd-4129-b675-5e915ee0706b" CreationDate="2010-08-03T16:36:53.263" UserId="395" Text="3 words: serial port debugger. I feel unclean even thinking about it." />
  <row Id="3924" PostHistoryTypeId="16" PostId="2091" RevisionGUID="6ee108fd-32dd-4129-b675-5e915ee0706b" CreationDate="2010-08-03T16:36:53.263" UserId="-1" />
  <row Id="3925" PostHistoryTypeId="6" PostId="2084" RevisionGUID="9c958b1d-680b-4b9b-a82c-7f13cb273ca4" CreationDate="2010-08-03T16:38:47.057" UserId="51" Comment="edited tags" Text="&lt;best-practices&gt;&lt;indie&gt;&lt;productivity&gt;&lt;outsourcing&gt;" />
  <row Id="3926" PostHistoryTypeId="6" PostId="2086" RevisionGUID="5f7b07f5-ae2b-41dd-8aee-019587f0580f" CreationDate="2010-08-03T16:44:23.830" UserId="891" Comment="edited tags" Text="&lt;competition&gt;&lt;ludum-dare&gt;&lt;global-game-jam&gt;&lt;sub&gt;" />
  <row Id="3927" PostHistoryTypeId="6" PostId="2086" RevisionGUID="c9ee8895-4b1f-44b6-88b7-315034471e3b" CreationDate="2010-08-03T16:44:41.380" UserId="891" Comment="edited tags" Text="&lt;subjective&gt;&lt;competition&gt;&lt;ludum-dare&gt;&lt;global-game-jam&gt;" />
  <row Id="3928" PostHistoryTypeId="2" PostId="2092" RevisionGUID="9f4c2f72-4244-42aa-a553-793a80bb7387" CreationDate="2010-08-03T16:47:44.530" UserId="119" Text="On one question I saw users using the word &quot;mobs&quot; - I have never heard this term, and got me thinking - is there glossary of game and gamedev terms that anyone has come across? &#xD;&#xA;&#xD;&#xA;ps. what are mobs?" />
  <row Id="3929" PostHistoryTypeId="1" PostId="2092" RevisionGUID="9f4c2f72-4244-42aa-a553-793a80bb7387" CreationDate="2010-08-03T16:47:44.530" UserId="119" Text="Gaming glossary" />
  <row Id="3930" PostHistoryTypeId="3" PostId="2092" RevisionGUID="9f4c2f72-4244-42aa-a553-793a80bb7387" CreationDate="2010-08-03T16:47:44.530" UserId="119" Text="&lt;glossary&gt;" />
  <row Id="3931" PostHistoryTypeId="2" PostId="2093" RevisionGUID="b339eb35-4729-492b-8fa4-63f2f68efec5" CreationDate="2010-08-03T16:48:13.830" UserId="292" Text="A Geometry kernel also begs for an Animation Kernel, including blending." />
  <row Id="3932" PostHistoryTypeId="16" PostId="2093" RevisionGUID="b339eb35-4729-492b-8fa4-63f2f68efec5" CreationDate="2010-08-03T16:48:13.830" UserId="-1" />
  <row Id="3933" PostHistoryTypeId="2" PostId="2094" RevisionGUID="cd9d858e-2d98-4e9e-8a1f-ed6dfc96eb1b" CreationDate="2010-08-03T16:59:19.150" UserId="144" Text="Get your system down. Right now, get all the tools you may be using during the competition, and put yourself through a pre-competition dry run. You don't have to make a complete game, but see that you are familiar with getting things together (this includes every aspect, gameplay, art, music, etc.). This is the only &quot;trick&quot; you need. If you have a workflow up and running before the competition, then your prize is the ability to concentrate on the actual content of the game while the clock is ticking.&#xD;&#xA;&#xD;&#xA;You can also publish this pre-compo game/experiment as a warmup ... the LD community likes it, and you might get feedback before the competition begins!&#xD;&#xA;&#xD;&#xA;For something like Ludum Dare, there is nothing you can do content-wise beforehand, and the actual gameplay will probably be different from what you practiced ahead of time. But if you know you will use the XYZ platform, and it will be a 2D sprite-based game (for instance), then being able to get to the content/gameplay part as quickly as possible is crucial.&#xD;&#xA;&#xD;&#xA;I learned this the hard way. LD16 was spent trying to get things working. LD17 was spent enriching the world.&#xD;&#xA;&#xD;&#xA;I look forward to seeing what you come up with. Good luck!!" />
  <row Id="3934" PostHistoryTypeId="2" PostId="2095" RevisionGUID="fdaa5795-d025-443f-8a52-b6004f8cc2f4" CreationDate="2010-08-03T16:59:35.703" UserId="567" Text="This holds a pretty nice list of what you are looking for:&#xD;&#xA;http://mmoterms.com/full-mmorpg-terms-glossary&#xD;&#xA;&#xD;&#xA;There are still game specifics, etc..." />
  <row Id="3935" PostHistoryTypeId="2" PostId="2096" RevisionGUID="59cb9acd-2fd1-40be-967a-79fa52b9ff27" CreationDate="2010-08-03T17:20:23.217" UserId="150" Text="http://www.javascriptgaming.com/" />
  <row Id="3936" PostHistoryTypeId="2" PostId="2097" RevisionGUID="04aaf651-0abc-4b81-8d2b-4bb958794be3" CreationDate="2010-08-03T17:29:58.657" UserId="154" Text="**Photoshop Solution**&#xD;&#xA;&#xD;&#xA;Deleting a section of the image is only effecting that layer. What you want to do is create a separate channel which stores your alpha information.&#xD;&#xA;&#xD;&#xA; 1. In the tool panel with Layers/Channels/Paths choose the Channels Tab. Here you will see RGB, Red, Green, and Blue.&#xD;&#xA; 1. Create a new channel using the button at the bottom of the panel, this is your alpha channel. This is an 8-bit greyscale channel giving you 256 levels of transparency. &#xD;&#xA; 1. You can use the little &quot;eye&quot; icons to toggle this channel on/off. &#xD;&#xA; 1. Draw or copy/paste your information into the channel.&#xD;&#xA;&#xD;&#xA;*Note:* When saving you need to be careful about file formats. Things like .Tiff &amp; .TGA save the full alpha channel independent of color information. However Photoshop doesn't allow this with PNG, much to many developers annoyance. It will not properly save alpha channel images and tends to strip out color information for fully transparent areas to compress file size." />
  <row Id="3937" PostHistoryTypeId="6" PostId="2086" RevisionGUID="7423bff7-fd9d-4371-861c-97145b2f3bea" CreationDate="2010-08-03T17:42:03.140" UserId="14" Comment="edited tags" Text="&lt;competition&gt;&lt;ludum-dare&gt;&lt;global-game-jam&gt;" />
  <row Id="3938" PostHistoryTypeId="2" PostId="2098" RevisionGUID="a1a8de7c-0faa-4401-a3e1-6f98ff2ca7f7" CreationDate="2010-08-03T17:43:10.033" UserId="55" Text="More and more games are going the data driven route which means that there needs to be a layer of security around easy manipulation. I've seen it where games compltely bundle up their assets (audio, art, data) and I'm wondering how they are managing that? Are there applications / libraries that will bundle and assist you with managing the assets within? If not is there any good resources that you would point to for packing / unpacking / encryption?&#xD;&#xA;&#xD;&#xA;This specific question revolves around C++, but I would be open to hear how this is managed in C#/XNA as well." />
  <row Id="3939" PostHistoryTypeId="1" PostId="2098" RevisionGUID="a1a8de7c-0faa-4401-a3e1-6f98ff2ca7f7" CreationDate="2010-08-03T17:43:10.033" UserId="55" Text="What do you use to bundle / encrypt sensitive data?" />
  <row Id="3940" PostHistoryTypeId="3" PostId="2098" RevisionGUID="a1a8de7c-0faa-4401-a3e1-6f98ff2ca7f7" CreationDate="2010-08-03T17:43:10.033" UserId="55" Text="&lt;encryption&gt;" />
  <row Id="3941" PostHistoryTypeId="16" PostId="2088" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-03T17:44:45.977" UserId="14" />
  <row Id="3942" PostHistoryTypeId="16" PostId="2094" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-03T17:44:45.977" UserId="14" />
  <row Id="3943" PostHistoryTypeId="16" PostId="2086" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-03T17:44:45.977" UserId="14" />
  <row Id="3944" PostHistoryTypeId="2" PostId="2099" RevisionGUID="09332668-776c-4802-b78e-9d6e9a130b99" CreationDate="2010-08-03T18:14:43.567" UserId="395" Text="Spending any large amount of time on this is probably foolish. There are tools to grab texture and model data directly from the GPU, and sounds can easily be pointed at a virtual loopback device. Anything that needs to be truly secure needs to live on a server and work only via challenge/response. Doing client data validation is another story, something more like Valve's -verify_all. That is still hard, since you can't trust the local executable to enforce it (or at least you can't trust it more than you trust your end-point anti-cheat system, which is also a silly idea)." />
  <row Id="3945" PostHistoryTypeId="2" PostId="2100" RevisionGUID="3f8a1383-a7ca-4912-91d7-22a6d82d0897" CreationDate="2010-08-03T18:15:16.530" UserId="370" Text="Don't ship sensitive data.&#xD;&#xA;&#xD;&#xA;There is [no way][1] to ship encrypted data so that only the game can access it.  You can try really hard but you quickly get into the DRM issues.&#xD;&#xA;&#xD;&#xA;If you want to keep your game assets away from prying eyes.&#xD;&#xA;&#xD;&#xA; 1. zip it up&#xD;&#xA; 2. `xor` the file&#xD;&#xA;&#xD;&#xA;That will stop 95% of mischeivieous users.  The other 5% are going to get it no matter what you do.  &#xD;&#xA;You don't need to actually zip and `xor`.  You could instead lzma and use AES with a known key.  The point is to not spend a lot of time on it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/articles/view/columns/experienced-points/5930-The-Impossible-DRM" />
  <row Id="3946" PostHistoryTypeId="2" PostId="2101" RevisionGUID="94d8e98a-dc66-4bfc-a886-e0ccdf03c540" CreationDate="2010-08-03T18:19:22.640" UserId="1206" Text="I know this topic is flagged as 'solved', but IMO you should look into FBX.&#xD;&#xA;Autodesk is using that format, and it's the exchange format of all the major 3D programs.&#xD;&#xA;&#xD;&#xA;So don't bother with Collada.&#xD;&#xA;&#xD;&#xA;It's bloated, unintuitive - and not backed by the major players.&#xD;&#xA;&#xD;&#xA;Which is Autodesk - they're are buying pretty much every 3D app out there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Autodesk FBX SDK:&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=7478532" />
  <row Id="3947" PostHistoryTypeId="5" PostId="2100" RevisionGUID="60cea819-1259-456d-96a0-88b8e174dfad" CreationDate="2010-08-03T18:22:18.863" UserId="370" Comment="added 95 characters in body; added 1 characters in body" Text="Don't ship sensitive data.&#xD;&#xA;&#xD;&#xA;There is [no way][1] to ship encrypted data so that only the game can access it.  You can try really hard but you quickly get into the DRM issues.&#xD;&#xA;&#xD;&#xA;If you want to keep your game assets away from prying eyes.&#xD;&#xA;&#xD;&#xA; 1. zip it up&#xD;&#xA; 2. `xor` the file&#xD;&#xA; 3. change the extension to something boring (ie not `my_level.zip.xor`, use `my_level.map`) .&#xD;&#xA;&#xD;&#xA;That will stop 95% of mischeivieous users.  The other 5% are going to get it no matter what you do.  &#xD;&#xA;You don't need to actually zip and `xor`.  You could instead lzma and use AES with a known key.  The point is to not spend a lot of time on it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/articles/view/columns/experienced-points/5930-The-Impossible-DRM" />
  <row Id="3948" PostHistoryTypeId="2" PostId="2102" RevisionGUID="ca8596c8-bf8a-4bc3-aff4-497420b8a4d3" CreationDate="2010-08-03T18:23:11.200" UserId="545" Text="This is actually a fairly significant issue.  A few years ago I was working on an MMO where most of the engineering had played one MMO, while most of design had played a different MMO.  There wasn't a lot of people who had played both.  As such there was a lot of terms that one group or the other assumed were rather common but were specific to that one game/genre.  Without the common language and common dictionary talking about design is much harder as so many concepts can be shortened to a quick abbreviation.  Anyone who has played an MMO with an aggression system will instantly know what you mean by 'taunt' even if the MMO doesn't use that as a term.  If you come from a JRPG background though, the concept is fairly meaningless.  " />
  <row Id="3949" PostHistoryTypeId="6" PostId="2086" RevisionGUID="6c581cf2-f4f7-4e22-b06a-0511a35b532a" CreationDate="2010-08-03T18:25:09.530" UserId="395" Comment="edited tags" Text="&lt;subjective&gt;&lt;competition&gt;" />
  <row Id="3950" PostHistoryTypeId="16" PostId="2095" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-03T18:30:08.913" UserId="51" />
  <row Id="3951" PostHistoryTypeId="16" PostId="2102" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-03T18:30:08.913" UserId="51" />
  <row Id="3952" PostHistoryTypeId="16" PostId="2092" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-03T18:30:08.913" UserId="51" />
  <row Id="3953" PostHistoryTypeId="2" PostId="2103" RevisionGUID="1dc204d5-a939-4f30-bf59-022eccfbb672" CreationDate="2010-08-03T18:32:26.790" UserId="1325" Text="A mob is a &quot;__mob__ ile&quot; unit. It was popular at least in the DIKU and derivative MUD's, but may have been used elsewhere, too." />
  <row Id="3954" PostHistoryTypeId="16" PostId="2103" RevisionGUID="1dc204d5-a939-4f30-bf59-022eccfbb672" CreationDate="2010-08-03T18:32:26.790" UserId="-1" />
  <row Id="3955" PostHistoryTypeId="2" PostId="2104" RevisionGUID="4c8144e7-5333-484e-91d6-c98b5c69336f" CreationDate="2010-08-03T18:39:15.280" UserId="120" Text="With great difficulty..." />
  <row Id="3956" PostHistoryTypeId="16" PostId="2104" RevisionGUID="4c8144e7-5333-484e-91d6-c98b5c69336f" CreationDate="2010-08-03T18:39:15.280" UserId="-1" />
  <row Id="3957" PostHistoryTypeId="2" PostId="2105" RevisionGUID="29286b3a-16a9-44c1-83ae-f9a7e6f34f12" CreationDate="2010-08-03T19:02:39.363" UserId="458" Text="As both a game jam organizer and participant, here are some tips from my experiences:&#xD;&#xA;&#xD;&#xA;* Familiarize yourself with the tools you'll be using. You want to be using a development environment that you're already comfortable with; you don't want to be learning anything new on the fly if you don't absolutely have to.&#xD;&#xA;* Corollary: if you're allowed to start with some pre-written code (libraries, game engines, etc.) - whether it be something you've made yourself, or from a third-party source - familiarize yourself with that as well so.&#xD;&#xA;* Short-term contests require physical endurance, so don't neglect your physical side! Eat well, exercise regularly, get plenty of sleep, and in general make lifestyle choices that keep you as healthy as possible. In the short term (i.e. a couple days before the contest starts), make sure to catch up on your sleep so you're starting fresh.&#xD;&#xA;* Know your limits. From your own experience, how long can you develop in a continuous stretch before you start to see diminishing returns on your time? How long and how frequently do you need to take breaks to maintain optimum performance? What's your sleep tradeoff curve (that is, if you stay up late developing, does that make you MORE productive for the extra time spent, or LESS productive because being tired slows you down)? If you don't know these things about yourself but you have time to &quot;test&quot; yourself in advance of the contest, do so.&#xD;&#xA;* Prepare all the mundane stuff in advance. If you're participating from home, make sure you've got pre-made meals, snacks and drinks ready to go, and have shortcuts and bookmarks right on your desktop for everything you think you'll need that you want easy access to. If you have any favorite reference textbooks, pile them next to your computer. Think of other tools you might want: pencils/pens, graph and standard paper, maybe some dice and index cards and such for physical prototypes, etc. If you're going somewhere outside your home (as with a typical &quot;Game Jam&quot; event), pack a bag in advance with everything you want to take with you, and have that ready so you're not waking up early or scrambling at the last minute.&#xD;&#xA;* As a longer-term strategy, build your development skills; there is absolutely no way that being a stronger developer can hurt you. There's also nothing stopping you from doing your own &quot;private game jam&quot;, challenging yourself to make a game in a week (or a weekend) as your personal schedule permits. The more of these kinds of projects that you do, the better you get at them." />
  <row Id="3958" PostHistoryTypeId="16" PostId="2105" RevisionGUID="29286b3a-16a9-44c1-83ae-f9a7e6f34f12" CreationDate="2010-08-03T19:02:39.363" UserId="-1" />
  <row Id="3959" PostHistoryTypeId="2" PostId="2106" RevisionGUID="302dcadd-d1d1-4c4a-bc09-12892b3c2bc0" CreationDate="2010-08-03T19:24:56.160" UserId="891" Text="Basically every Game company wants to see a portfolio that exhibits your skill set.  If you're specializing in **AI** though, what and how should you show off your skills.&#xD;&#xA;&#xD;&#xA;**Some thoughts**&#xD;&#xA;&#xD;&#xA; - Is nice graphics in an AI demo a must(get past nontechnical HR that don't understand AI, think 3d verse 2d)?&#xD;&#xA; - Demo multi-featured AI or a single focused example.&#xD;&#xA; - Fundamental skills like path-finding, hfsm, planning, etc are critical AI components but does it really impress as a portfolio piece?&#xD;&#xA; - Single AI entity, multiple entities, or large populations, is more always better?&#xD;&#xA; - Also as a portfolio piece ideally there would be an executable, and videos which should show off whatever is trying to be shown off within only a few minutes.&#xD;&#xA;&#xD;&#xA;**Examples**&#xD;&#xA;&#xD;&#xA;I would say any of the skills exhibited in this video would make for a great portfolio piece but are game companies really expecting this from a single person.&#xD;&#xA;&#xD;&#xA; - [Autodesk Kynapse][1]&#xD;&#xA;&#xD;&#xA;AI Sandbox is another great example but this was made from the work of many many people.&#xD;&#xA;&#xD;&#xA; - [AI Sandbox][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.autodesk.com/us/kynapse/demos/intro_demo/autodesk_kynapse_intro_demo_800x480.html&#xD;&#xA;&#xD;&#xA;Any examples of good AI portfolios would be great.&#xD;&#xA;  [2]: http://aisandbox.com/" />
  <row Id="3960" PostHistoryTypeId="1" PostId="2106" RevisionGUID="302dcadd-d1d1-4c4a-bc09-12892b3c2bc0" CreationDate="2010-08-03T19:24:56.160" UserId="891" Text="How to demo Advanced Game AI as a portfolio piece" />
  <row Id="3961" PostHistoryTypeId="3" PostId="2106" RevisionGUID="302dcadd-d1d1-4c4a-bc09-12892b3c2bc0" CreationDate="2010-08-03T19:24:56.160" UserId="891" Text="&lt;ai&gt;&lt;portfolio&gt;&lt;demo&gt;" />
  <row Id="3962" PostHistoryTypeId="16" PostId="2106" RevisionGUID="302dcadd-d1d1-4c4a-bc09-12892b3c2bc0" CreationDate="2010-08-03T19:24:56.160" UserId="891" />
  <row Id="3963" PostHistoryTypeId="2" PostId="2107" RevisionGUID="2e657d7d-cb0c-4713-af7b-fcb45b393925" CreationDate="2010-08-03T19:26:29.013" UserId="1151" Text="Definitely Agree with Tetrad's Rule #1. Do not help them. I would say a caveat is to explain to them that you will not be helping them, and if they need help to please ask. This way the player doesn't end up being frustrated.&#xD;&#xA;&#xD;&#xA;The Questionnaire should ask open ended questions, instead of ones that are simple yes/no, depending on the age and number of testers these can be forms they fill out, or you can ask the questions. Its also important to ask questions about their history and their familiarity with the genre of game you are having them test; this will add context to their specific answers about your game.&#xD;&#xA;&#xD;&#xA;Fortunately when my game crashes it gives me a dump of information regarding the error, so I can take a picture of that and make a note of what the player was doing. Normally I test younger age groups so when we get a crash I have to remember to explain to them that they are doing a great job -- they can get upset after breaking the game. Playtesters have really proven to be great at finding obscure bugs that the dev team would never come across playing the game the &quot;right&quot; way." />
  <row Id="3964" PostHistoryTypeId="2" PostId="2108" RevisionGUID="8d081c15-cd5a-4aa6-bab1-21394a40c691" CreationDate="2010-08-03T19:28:27.373" UserId="189" Text="At my school we have some masters students studying AI, and they do so using the Unreal engine. They pair up with an art student who makes some 3D models (they certainly don't have to be fancy) and then they work their AI magic in UnrealScript and the Unreal editor, and end up with something functional which can be studied and played with. This is the end goal of AI, after all: an actual game or prototype which demonstrates the AI concepts. Because anything less is just a concept, not a demonstration.&#xD;&#xA;&#xD;&#xA;I would imagine you could substitute any engine for Unreal; Unity of course is very popular, and Steam's engine is also doing some great AI things. I think the end result is that you need to use all the middleware you can, so that you can get past the foundation and quickly get to actually testing AI concepts." />
  <row Id="3965" PostHistoryTypeId="16" PostId="2108" RevisionGUID="8d081c15-cd5a-4aa6-bab1-21394a40c691" CreationDate="2010-08-03T19:28:27.373" UserId="-1" />
  <row Id="3966" PostHistoryTypeId="2" PostId="2109" RevisionGUID="7a60dd4d-b56c-4994-b592-afd834d000ab" CreationDate="2010-08-03T19:28:49.323" UserId="1323" Text="I want to port a rigged mesh from a custom format to COLLADA. The bones I have define a position for the bone (local) and a matrix that transforms the child-bones' positions into the next-higher coordinate space. (The position of the root usually is {0, 0, 0}.)&#xD;&#xA;&#xD;&#xA;How can I convert these to the inverse bind-pose matrices used for COLLADA?" />
  <row Id="3967" PostHistoryTypeId="1" PostId="2109" RevisionGUID="7a60dd4d-b56c-4994-b592-afd834d000ab" CreationDate="2010-08-03T19:28:49.323" UserId="1323" Text="How do I calculate an inverse bind-pose matrix for COLLADA?" />
  <row Id="3968" PostHistoryTypeId="3" PostId="2109" RevisionGUID="7a60dd4d-b56c-4994-b592-afd834d000ab" CreationDate="2010-08-03T19:28:49.323" UserId="1323" Text="&lt;3d&gt;&lt;math&gt;&lt;collada&gt;" />
  <row Id="3969" PostHistoryTypeId="2" PostId="2110" RevisionGUID="a6c8834b-de26-445d-92ef-b8ff4a03ee82" CreationDate="2010-08-03T19:38:02.910" UserId="1329" Text="In my opinion you shouldn't need to make it look pretty in order to demonstrate good AI skills. On the other hand I think you should it make pretty because:&#xD;&#xA;&#xD;&#xA; 1. Presentation is very important in the game industry, and it is a way to make it clear that you &quot;made an effort&quot;, even if you spent many more hours on the underlying technology.&#xD;&#xA; 2. Your demo may get seen by a hiring manager, HR person or programmer that doesn't know anything about AI&#xD;&#xA;&#xD;&#xA;If you get someone else to make it look pretty for you all the better, because it shows that you care about making a good impression, but also that you can find people to help you, and co-operate with people. Very important skills on the job. &#xD;&#xA;&#xD;&#xA;Regarding using an API like Unreal or Kynapse; I think it's much more valuable to show that you can build an AI engine up from nothing. Demonstrating enthusiasm and problem solving. Once you're on the job you can spend a few days reading an API and documentation, but a deeper understanding of what lies beneath the API is a far more valuable asset.&#xD;&#xA;&#xD;&#xA;Hope this helps and good luck!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="3970" PostHistoryTypeId="16" PostId="2110" RevisionGUID="a6c8834b-de26-445d-92ef-b8ff4a03ee82" CreationDate="2010-08-03T19:38:02.910" UserId="-1" />
  <row Id="3971" PostHistoryTypeId="5" PostId="2108" RevisionGUID="b4492781-e971-43e0-89af-8e8c60750b16" CreationDate="2010-08-03T19:38:16.890" UserId="189" Comment="added 1132 characters in body; added 349 characters in body" Text="At my school we have some masters students studying AI, and they do so using the Unreal engine. They pair up with an art student who makes some 3D models (they certainly don't have to be fancy) and then they work their AI magic in UnrealScript and the Unreal editor, and end up with something functional which can be studied and played with. This is the end goal of AI, after all: an actual game or prototype which demonstrates the AI concepts. Because anything less is just a concept, not a demonstration.&#xD;&#xA;&#xD;&#xA;I would imagine you could substitute any engine for Unreal; Unity of course is very popular, and Steam's engine is also doing some great AI things. I think the end result is that you need to use all the middleware you can, so that you can get past the foundation and quickly get to actually testing AI concepts.&#xD;&#xA;&#xD;&#xA;Many of your questions are very much case-by-case basis. You may want multiple examples of one AI concept each, or you may want one big AI sandbox world with all sorts of AIs running around interacting. It really depends on what exactly you're doing or showing.&#xD;&#xA;&#xD;&#xA;&gt;Also as a portfolio piece ideally there would be an executable, and videos which should show off whatever is trying to be shown off within only a few minutes.&#xD;&#xA;&#xD;&#xA;This isn't a question, so: yes! Also I'd recommend getting a personal website so that you can hopefully direct them to it, or even show it to them in an interview if there is a computer in the room. Make sure the website is as standard as possible; use HTML5 video and Flash (whichever one the browser is compatible with), and have screenshots in case the computer is so locked down that none of these are available. Also if you have a portable video-playing device (iPod, phone, etc.) load up videos of your portfolio and bring that! There might be nothing more impressive in an interview without a computer, than pulling out your *insert device here* and actually showing the interviewer your work.&#xD;&#xA;&#xD;&#xA;Also, one final note: there is a big difference between pretty and polished. It doesn't have to have stellar graphics; but the graphics that are there should at least look finished, not placeholders, no glitches or bugs, etc. Just because it doesn't need to be fine art, doesn't mean it shouldn't look like a finished prototype ready to present." />
  <row Id="3972" PostHistoryTypeId="2" PostId="2111" RevisionGUID="4d98850c-c12e-4581-8a99-d685c4f813f3" CreationDate="2010-08-03T19:41:23.420" UserId="44" Text=" - Since you're basically showing off agent behaviour and nothing else, the answer is no. If you can, try to use simple textures (perhaps none at all) and simple models consisting of plain joints and limbs.&#xD;&#xA; - That depends on your taste, I personally prefer starting off simple and adding new agents to show off more features as the demo progresses, building up complexity and various emergent behaviours.&#xD;&#xA; - Not really, most will take that for granted and look for something beyond this, mention it but don't focus on it. The main interest here is your potential optimizations to the already established algorithms and/or novel approaches to those problems.&#xD;&#xA; - See 2.&#xD;&#xA; - I agree, providing both is a plus. (some people like to experiment with demo executables for themselves, if they feel sufficiently interested)" />
  <row Id="3973" PostHistoryTypeId="16" PostId="2111" RevisionGUID="4d98850c-c12e-4581-8a99-d685c4f813f3" CreationDate="2010-08-03T19:41:23.420" UserId="-1" />
  <row Id="3974" PostHistoryTypeId="2" PostId="2112" RevisionGUID="122e7431-0d25-4085-977a-254b108a2560" CreationDate="2010-08-03T19:45:10.903" UserId="1024" Text="Concatenate (multiply together) your local transforms to get a world transform for each joint. Invert each world matrix." />
  <row Id="3975" PostHistoryTypeId="2" PostId="2113" RevisionGUID="c027daa0-cea6-46cd-90dd-21cf98edac09" CreationDate="2010-08-03T19:57:06.063" UserId="182" Text="My job is in antitamper software. I know somebody who is an old school game cracker. He cracks games like breathing. You can't stop people like him. If your game is popular enough, multiple cracked versions of your game will hit the torrent sites only a few days after release no matter what you do. My advice is to just do the bare minimum to keep out the average joe who thinks he might want to give this reverse engineering thing a stab." />
  <row Id="3976" PostHistoryTypeId="6" PostId="1520" RevisionGUID="6c9ce6f2-7e97-4a4b-8aac-ca246e882edc" CreationDate="2010-08-03T20:03:46.647" UserId="14" Comment="edited tags" Text="&lt;mmo&gt;&lt;anti-cheat&gt;" />
  <row Id="3977" PostHistoryTypeId="2" PostId="2114" RevisionGUID="177e4e34-9a23-406d-b9f4-25e74c14ebb4" CreationDate="2010-08-03T20:22:56.300" UserId="44" Text="A good strategy is to make your own archive format from scratch, and to make it an indexed one with a table pointing to data chunks instead of storing whole sequential files in your archive, then encrypt your index table and compress every chunk separately using LZMA/Bzip2.&#xD;&#xA;&#xD;&#xA;Another approach is using bits of procedural data generators here and there (If you want to go that far you could even get the 'parameters' for said generators from an on-line server as an extra measure), And by offloading some of the work to the GPU you can also prevent full memory dumps and make up for some of the lost performance. &#xD;&#xA;&#xD;&#xA;Yet I find such techniques to generally hinder performance and waste development time, all the while offering nothing to the end-user but potential problems and unneeded bugs.&#xD;&#xA;&#xD;&#xA;Nevertheless, nothing is 100% secure." />
  <row Id="3978" PostHistoryTypeId="2" PostId="2115" RevisionGUID="0099268a-74b1-4c54-bc67-2762b65463b1" CreationDate="2010-08-03T20:25:05.530" UserDisplayName="Zeke Vermillion" Text="Any good answer would require discussing the precise nature of the existing work as well as your intended use.  The three types of legal protection you should consider in the US are copyrights, patents, and trademarks.  Trade secrets should not worry you unless you are truly a badguy and have stolen inside info, for instance by hiring away a former employee / consultant of your competitor and pumping them for it.&#xD;&#xA;&#xD;&#xA;Game graphics, text, music, and the like are subject to copyright in most jurisdictions, including the US.  Original computer code is always copyrighted, without any further action on the author's part.  Affixing an original work to a medium is all it takes to create a copyright in the US -- registration is helpful for various purposes (such as to document a security interest for a loan, or to fix a date for litigation purposes) but not necessary.  A game *design* may be patentable if it is sufficiently novel and non-obvious, but a game design or mechanic is not automatically self-protecting as such without a patent application.  Very few computer game makers seek specific patents on individual game designs, although an increasing number of major companies are patenting generally useful game-related mechanisms (wiimote-related stuff; gesture controls; etc.).  Interestingly enough, board games are quite frequently patented, and in fact it is easier to patent a board game design than it is a more free-form computer game.  Trademark protection could apply to distinctive characters (Mario &amp; Luigi) and the game's packaging itself (the look of the &quot;box&quot; or website delivery and advertising scheme).&#xD;&#xA;&#xD;&#xA;You can avoid running afoul of copyright protection by making sure to, among other practices: *never* use code from another game without a license, and always vet your third-party / outsourced code with a plagiarism detector; always write your own music or license it officially; create your own art assets or license them; if you are including referential material, make sure it is clearly a satire/parody or otherwise fits within a legal exception.  For patents, unless you know of a patent that reads into your area, you should probably use your instinct as to whether your game mechanic is ripping off another developer.  For instance, just b/c Donkey Kong pioneered the platformer mechanic does not mean that all future platformers had to license the idea; it is safe to assume that game design involving jumping and dodging is not in fact patented or patentable.  The reason that most people do not conduct an exhaustive search for infringed patents before building something is that there is a huge sea of patented material out there, and if you *knowingly* infringe on another's IP, you can be subject to a claim for treble damages, whereas if you unknowingly happen to infringe a patent that you were not aware existed, you are only liable for 1X damages and therefore a license negotiation will be much more favorable to you.  Finally trademark -- avoid using art assets in the game, and external marketing / packaging, that is confusingly similar to your competitors'.&#xD;&#xA;&#xD;&#xA;I see a lot of amateur legal advice in response to these kinds of questions in forums, and it is usually hit or miss.  At the end of the day, if you are really concerned (and it sounds like perhaps you should be) you ought to discuss the specifics of your case with a knowledgeable lawyer.  If you can change a few things so you are not so closely mimicking another game, then perhaps that will be easier and cheaper than hiring a lawyer to analyze a close call scenario.&#xD;&#xA;&#xD;&#xA;Hope that was helpful.&#xD;&#xA;&#xD;&#xA;Zeke Vermillion" />
  <row Id="3979" PostHistoryTypeId="2" PostId="2116" RevisionGUID="8ada835a-f8e2-4f35-80a9-bacbaed6d948" CreationDate="2010-08-03T20:49:22.533" UserId="189" Text="What are the best resources on multi-threaded game or game engine design and development? As this is obviously where computers are headed, I intend to study this topic and I'd like to know what resources and examples are out there." />
  <row Id="3980" PostHistoryTypeId="1" PostId="2116" RevisionGUID="8ada835a-f8e2-4f35-80a9-bacbaed6d948" CreationDate="2010-08-03T20:49:22.533" UserId="189" Text="Multi-threaded game (engine) design resources?" />
  <row Id="3981" PostHistoryTypeId="3" PostId="2116" RevisionGUID="8ada835a-f8e2-4f35-80a9-bacbaed6d948" CreationDate="2010-08-03T20:49:22.533" UserId="189" Text="&lt;programming&gt;" />
  <row Id="3982" PostHistoryTypeId="16" PostId="2116" RevisionGUID="8ada835a-f8e2-4f35-80a9-bacbaed6d948" CreationDate="2010-08-03T20:49:22.533" UserId="189" />
  <row Id="3983" PostHistoryTypeId="5" PostId="2098" RevisionGUID="8ee815cd-760a-447c-9778-1675eef0b3da" CreationDate="2010-08-03T21:05:50.490" UserId="55" Comment="'sensitive' isn't the right word for this... I'm not storying credit card information or something. ;)" Text="More and more games are going the data driven route which means that there needs to be a layer of security around easy manipulation. I've seen it where games completely bundle up their assets (audio, art, data) and I'm wondering how they are managing that? Are there applications / libraries that will bundle and assist you with managing the assets within? If not is there any good resources that you would point to for packing / unpacking / encryption?&#xD;&#xA;&#xD;&#xA;This specific question revolves around C++, but I would be open to hear how this is managed in C#/XNA as well.&#xD;&#xA;&#xD;&#xA;Just to be clear -- I'm not out to engineer a solution to prevent hacking. At the fundamental level we're all manipulating 0's and 1's. But, we do want to keep the 99% of people that play the game from simply modifying XML files that are used to build the game world. I've seen plenty of games bundle all of their resources together. I'm simply curious about the methods they're using." />
  <row Id="3984" PostHistoryTypeId="4" PostId="2098" RevisionGUID="8ee815cd-760a-447c-9778-1675eef0b3da" CreationDate="2010-08-03T21:05:50.490" UserId="55" Comment="'sensitive' isn't the right word for this... I'm not storying credit card information or something. ;)" Text="What do you use to bundle / encrypt data?" />
  <row Id="3985" PostHistoryTypeId="2" PostId="2117" RevisionGUID="02f98268-fe4c-4a73-8d1e-3590f7717e25" CreationDate="2010-08-03T21:23:20.130" UserId="891" Text="A brief overview of Multi-threaded engine approaches.  Gamasutra to the rescue.&#xD;&#xA;&#xD;&#xA; - [Multithreaded Game Engine Architectures][1]&#xD;&#xA; - [Threading 3D Game Engine Basics][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/features/20060906/monkkonen_01.shtml&#xD;&#xA;  [2]: http://www.gamasutra.com/features/20051117/gabb_01.shtml" />
  <row Id="3986" PostHistoryTypeId="16" PostId="2117" RevisionGUID="02f98268-fe4c-4a73-8d1e-3590f7717e25" CreationDate="2010-08-03T21:23:20.130" UserId="-1" />
  <row Id="3987" PostHistoryTypeId="6" PostId="2116" RevisionGUID="0d52a62d-9ae6-49a5-af3a-1ab3634f64dc" CreationDate="2010-08-03T21:24:33.843" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;programming&gt;&lt;multithreading&gt;&lt;resources&gt;" />
  <row Id="3988" PostHistoryTypeId="2" PostId="2118" RevisionGUID="a14eb5f4-58fb-4f64-af64-219a95d328d4" CreationDate="2010-08-03T21:39:55.533" UserId="347" Text="Good question but this is a far from easy to question to answer.  &#xD;&#xA;From my experience with data security you have to think about the following:  &#xD;&#xA;&#xD;&#xA;1) What are you securing, from whom and what is the impact if that data is insecure - security is far more about risk assessment than systematic technical solutions  &#xD;&#xA;2) I assume your platform is desktop (e.g. Windows/OSX) in that case you have a different problem space than proprietary hardware such as PS3/Xenon which have their own attempts at kernel level security ( whether this is a valid solution is open for debate )  &#xD;&#xA;3) Encryption != security. Encryption only guarantees that your data can't be *read*, it does not guarantee that your data can't be *written* or replayed/proxied.  &#xD;&#xA;&#xD;&#xA;If your requirements are to make your data tamper proof then you need to think about [hashing][1] your data ( preferably with SHA-256 or SHA-512)&#xD;&#xA;To re-iterate though, think about why it's important and what you gain from adding security to your system.  &#xD;&#xA;It's also worth knowing that adding encryption tech to your product *may* have legal implications due to export restrictions ( encryption tech is classed as restricted weapons grade technology believe it or not ) so using libraries that have overcome these legal issues is advisable.  &#xD;&#xA;Finally - never, ever roll your own encryption tech - use well known, documented, researched algorithms such as AES, Blowfish, RSA etc  &#xD;&#xA;&#xD;&#xA;ps Public/Private Key is not suitable or practical for encrypting large amounts of data hence DRM/PGP etc use a hybrid [RSA][2] + [symmetric system][3] i.e secure the symmetric key with RSA then do standard symmetric encryption using that key&#xD;&#xA;&#xD;&#xA;It's a very large complex subject and I've definitely not done it justice&#xD;&#xA;&#xD;&#xA;Hope that helps&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Cryptographic_hash_function&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/RSA&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Symmetric-key_algorithm" />
  <row Id="3989" PostHistoryTypeId="2" PostId="2119" RevisionGUID="5440a89c-4fce-4abe-98ec-553fa9630eef" CreationDate="2010-08-03T22:02:27.470" UserId="488" Text="A really interesting HTML5 development framework I recently stumbled upon is Sencha. It's mainly for handheld/touch devices, but what's *not* gonna be touch-based a couple years from now? Here are some intriguing demos, including a card game:&#xD;&#xA;&#xD;&#xA;http://www.sencha.com/products/touch/demos.php" />
  <row Id="3990" PostHistoryTypeId="2" PostId="2120" RevisionGUID="d03d8861-c4e4-4613-9e75-08f480dd07bb" CreationDate="2010-08-03T22:04:48.713" UserId="1018" Text="I think you should look into a task- or job-basedd approach. &#xD;&#xA;&#xD;&#xA;Game Engine Gems has 2 or 3 articles on the subject.&#xD;&#xA;&#xD;&#xA;There have been a couple of presentations on the subject at different conference etc.&#xD;&#xA;&#xD;&#xA;For example &quot;Parallel Futures of a Game Engine&quot; by Johan Andersson&#xD;&#xA;&#xD;&#xA;Also take a look at the GDC Vault there are a number of presentations and full videos on the subject in the free section. &#xD;&#xA;http://www.gdcvault.com/&#xD;&#xA;&#xD;&#xA;ps.&#xD;&#xA;Couldn't post any more direct links due to being a new user.&#xD;&#xA;ds." />
  <row Id="3991" PostHistoryTypeId="16" PostId="2120" RevisionGUID="d03d8861-c4e4-4613-9e75-08f480dd07bb" CreationDate="2010-08-03T22:04:48.713" UserId="-1" />
  <row Id="3992" PostHistoryTypeId="2" PostId="2121" RevisionGUID="0603f002-4745-4ca0-ba5d-d12717b97722" CreationDate="2010-08-03T22:27:22.137" UserId="1310" Text="How do I make animated menus with cocos2d, I just want to animate the buttons and not the entire scene. Effects I look for is flipping buttons (like the back of the button is the next menu), buttons that retract once selected and re appear with new button.&#xD;&#xA;&#xD;&#xA;Basically what I ask for is cool effects between menu transitions.&#xD;&#xA;David" />
  <row Id="3993" PostHistoryTypeId="1" PostId="2121" RevisionGUID="0603f002-4745-4ca0-ba5d-d12717b97722" CreationDate="2010-08-03T22:27:22.137" UserId="1310" Text="How to make animated buttons in a menu with Cocos2d?" />
  <row Id="3994" PostHistoryTypeId="3" PostId="2121" RevisionGUID="0603f002-4745-4ca0-ba5d-d12717b97722" CreationDate="2010-08-03T22:27:22.137" UserId="1310" Text="&lt;iphone&gt;&lt;cocos2d&gt;" />
  <row Id="3995" PostHistoryTypeId="2" PostId="2122" RevisionGUID="6be40a92-f6f7-484a-8c84-e3c8c7ddb458" CreationDate="2010-08-03T22:30:26.923" UserId="41" Text="As much as I love to say that graphics don't matter, it's just not true. Not matter how amazing your AI is, the presentation is what's consumed by your viewers. As things being equal the prettier presentation will win out.&#xD;&#xA;&#xD;&#xA;That's not to say that you have to present an amazingly detailed piece, just one that looks clean and finished. &#xD;&#xA;&#xD;&#xA;You'll also want to pay attention to the erratic movement of your graphical models; even if your path target changes 180°, you'll want that change to happen gradually on screen in order to make the movement look natural.&#xD;&#xA;&#xD;&#xA;I'd suggest pairing with a good artist, and make sure to represent that fact if asked during your presentation. The artist may also want a video of your demo to show potential employers what their art looks like being used &quot;in-game&quot;." />
  <row Id="3996" PostHistoryTypeId="16" PostId="2122" RevisionGUID="6be40a92-f6f7-484a-8c84-e3c8c7ddb458" CreationDate="2010-08-03T22:30:26.923" UserId="-1" />
  <row Id="3997" PostHistoryTypeId="2" PostId="2123" RevisionGUID="d9654210-1961-4c2a-ac8f-20e65b19bb42" CreationDate="2010-08-03T22:40:01.513" UserId="1134" Text="To expand on the **data is king** sentiment a bit (+1 to Tetrad!):&#xD;&#xA;&#xD;&#xA;Investigate **recording and playback**:&#xD;&#xA;&#xD;&#xA;* If your game is deterministic and frame-based you may only need to store an initial random seed and a tuple of `(key/button state, joystick/mouse coords, frame #)` any time the input state changes.  Playback is as simple as redirecting your input to this stream.  (We've done this for many platform-jumping games in the past.)&#xD;&#xA;* If your game has well-defined APIs or message systems for performing actions (a turn-based strategy game, a card game, a board game, or the like) you might be able to just harvest API calls or messages at a certain pinch point.  (We did this for a card game for a handheld platform.)&#xD;&#xA;* It's harder on some systems (less deterministic, threaded, or arbitrary timestep systems can be a pain) but it may be worth recording the data anyway; you can get &quot;close enough&quot; results for some uses.&#xD;&#xA;&#xD;&#xA;A &quot;replay&quot; system based on these methods has a bunch of advantages:&#xD;&#xA;&#xD;&#xA;* use it to reproduce crashes in a debug or otherwise instrumented build or environment;&#xD;&#xA;* load replays under a profiling build and get performance or resource usage data;&#xD;&#xA;* wire it into the game to provide &quot;instant replay&quot; functionality, maybe with a different camera or time step;&#xD;&#xA;* set up an &quot;attract mode&quot; demoing gameplay if the user is sticking around doing nothing on a menu;&#xD;&#xA;* put it on your build system as a smoke test: if I can play through this replay without crashing, it's more likely a good build;&#xD;&#xA;* watch examples of people playing to see what they did and didn't do.&#xD;&#xA;&#xD;&#xA;**Wire in random input** rather than a recorded stream, and you've got a great *monkey test* that you can leave soaking overnight or whenever your development machines are idle.&#xD;&#xA;&#xD;&#xA;Next, do some **event recording**.  For a hypothetical FPS, start with something like &quot;time T: X killed Y at point Z with weapon W&quot;: put it in a log.&#xD;&#xA;&#xD;&#xA;Once you have some data being collected, figure out how to **automate collection**.  It doesn't have to be elegant during development:&#xD;&#xA;&#xD;&#xA;* connect to an SQL server and insert rows,&#xD;&#xA;* fire and forget UDP packets at some simple syslog-ish server,&#xD;&#xA;* e-mail the log the next time the game boots,&#xD;&#xA;* just wrap the executable in a shell script or batch file that renames and copies a .log file to a common shared drive,&#xD;&#xA;* (later, for production builds) use Windows Error Reporting or a similar service to collect crash data...&#xD;&#xA;&#xD;&#xA;Doesn't really matter, as long as you can gather data.&#xD;&#xA;&#xD;&#xA;Now extend it: gather crash dumps, stack traces, and input or event recordings.  Add more events, and more data sources:&#xD;&#xA;&#xD;&#xA;* sample the player position or hand every 10 seconds, plot it on a map -- &quot;hey, no-one's using this corner that I spent a week modeling, time to put a powerup there&quot;&#xD;&#xA;* `getFreeMemoryBytes()` every half-minute&#xD;&#xA;* `getFPS()` periodically&#xD;&#xA;* take a photo or a video of what the user is doing via a webcam (great for automated usability testing -- only with user permission and understanding, of course)&#xD;&#xA;* grab system info (again, with user permission)&#xD;&#xA;&#xD;&#xA;The &quot;plot it on a map&quot; thing can get really awesome after a while: envision an aerial view of an RTS or FPS map.  Put a slider on it, representing time since start of game.  Select an event type (&quot;got gold&quot;, &quot;killed someone&quot;, whatever).  Select a data set: maybe one game, maybe 500 games over the last few months.  Start pulling the slider to the right and watch the activity pop onto the map.&#xD;&#xA;&#xD;&#xA;And if you can't find good libs to help you with this stuff (there are quite a few here and there, though!), consider rolling your own: it's a good learning experience, and it doesn't need to be particularly elegant to be useful.&#xD;&#xA;&#xD;&#xA;Get the data, you'll figure out what to do with it.  =)" />
  <row Id="3998" PostHistoryTypeId="2" PostId="2124" RevisionGUID="640087b3-02e3-4770-b97c-aea0052a0c77" CreationDate="2010-08-03T22:47:08.057" UserId="497" Text="To answer your specific questions:&#xD;&#xA;&#xD;&#xA;1.  **Graphics are totally unimportant**.  So long as people understand the difference between say actors and static world objects you'll be fine.  The demo's will be critiqued by the programming team and they know what is important from an AI programmer.&#xD;&#xA;&#xD;&#xA;2.  Multi-featured vs single focussed is a tough one, see my general rules below&#xD;&#xA;&#xD;&#xA;3.  **Fundamental skills - These are a must**.  Don't go to advanced and forget to show off your basic understanding of core AI behaviours.  Unfortunately, for many companies AI is still low on their priority list.  At least initially they will be looking for someone with core knowledge that can get the AI to a basic level&#xD;&#xA;&#xD;&#xA;4.  **Definitely have multiple AI entities/actors**.&#xD;&#xA;&#xD;&#xA;5.  **Executable is preferable** as it shows the behaviours as well as the fact you can do it in a real-time environment.  Videos are good for showcasing specific AI behaviours and adding annotations to explicitly state what is happening.&#xD;&#xA;&#xD;&#xA;Some general rules:&#xD;&#xA;&#xD;&#xA;My biggest suggestion is **visualisation**.  While pretty graphics are not important, visualisations of the actors is crucial.  Turn on every piece of debugging you can and leave it on for your demos.  What you want to do is show all the behaviours/decisions/data the AI is using to the viewer.  This can be simple things like showing the current state next to each actor (eg idle), the &quot;field of view cone&quot;, current path, etc.  Without this, the viewer may have no idea how advanced you AI is.&#xD;&#xA;&#xD;&#xA;As for exactly what to show, this depends entirely on what company you want to work for.  My suggestion is to pick your favourite company (or top 3) and look at the AI in their games currently.  Tailor your examples to fit with the style of these games (eg FPS vs RTS).  Also, look at the technology they are using.  If you're applying at a company that uses unreal, you're in a much better position if you use unreal to show off your demo.  It shows you have both knowledge of AI and implementing it in their current tech." />
  <row Id="3999" PostHistoryTypeId="16" PostId="2124" RevisionGUID="640087b3-02e3-4770-b97c-aea0052a0c77" CreationDate="2010-08-03T22:47:08.057" UserId="-1" />
  <row Id="4000" PostHistoryTypeId="2" PostId="2125" RevisionGUID="0c2ac6ed-7b5c-46c6-82d5-9055d048101e" CreationDate="2010-08-03T23:09:26.463" UserId="1272" Text="I've done Ludum Dare twice, my first attempt failed pretty miserably, but on my second go (LD17) I did fairly well, and made 7th place overall.&#xD;&#xA;&#xD;&#xA;Just some random bullets (specific to LD mainly, but probably applicable elsewhere):&#xD;&#xA;&#xD;&#xA;- **Sleep**: This is *very* important, LD16 was my first 48 hour compo and I tried to go too long without sleeping and wound up taking a 10 hour &quot;nap&quot; through the deadline... For LD17 I slept both nights for 6-7 hours and it all went a lot smoother. I worked for less total time, but not being half asleep the whole time definitely helped.&#xD;&#xA;&#xD;&#xA;- **Changing Plans**: Last LD I completely changed my idea about 10 hours in, scrapped most of the work from that time and moved in a different direction. It seemed totally hopeless since my initial plan was just not fun; but I came up with another idea, slept on it and it eventually all came together. So don't be afraid to change directions if your initial approach isn't going anywhere.&#xD;&#xA;&#xD;&#xA;- **Timelapse**: This seems irrelevant, but being able to play back the 48 hours as a timelapse really helps you get a feel for where you spent too much/too little time. I also found that recording the timelapse was sort of an incentive to keep working and not slack off as much...&#xD;&#xA;&#xD;&#xA;- **Community/IRC**: A big part of Ludum Dare is the community, it's a lot more fun if you participate in the whole process; make timelapses, take food/workspace photos, hang around in IRC and most importantly, vote and leave feedback for everyone.&#xD;&#xA;&#xD;&#xA;- **Middleware/framework/whatever**: Some people prefer to truly start from _scratch_, but the rules do allow openly available middleware and custom-made middleware (as long as you release it open source prior to the compo). Given the number of gamemaker and Unity entries, I don't feel so bad about writing a quick framework using a few bits of middleware (I used Ogre and Bullet last time) the week before.&#xD;&#xA;&#xD;&#xA;- **Audio**: I personally have very little experience with audio stuff, so this has been a tough one for me, but a little bit of audio goes a long way. Last time I did manage to have a simple bit of (very repetitive) music (made with LMMS) and sound effects generated with [sfxr][1].&#xD;&#xA;&#xD;&#xA;- **Post Compo Version**: I'd encourage you to keep working on your entry after the competition; I added online leaderboards and a few tweaks to my entry from last LD as sort of an afterthought, released it on moddb and it's been surprisingly successful (the leaderboard has over half a million ~20-25 second 'runs' recorded and apparently there's going to be a small article about it in a French games magazine).&#xD;&#xA;&#xD;&#xA;That's all I can think of for now, Good Luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.drpetter.se/project_sfxr.html" />
  <row Id="4001" PostHistoryTypeId="16" PostId="2125" RevisionGUID="0c2ac6ed-7b5c-46c6-82d5-9055d048101e" CreationDate="2010-08-03T23:09:26.463" UserId="-1" />
  <row Id="4002" PostHistoryTypeId="2" PostId="2126" RevisionGUID="e4e28e4b-6ed1-4b1a-8e38-384bed158c8d" CreationDate="2010-08-03T23:54:51.993" UserId="328" Text="I found a series of tutorials that goes from a basic ambient light shader all the way to reflections and toon shaders. Each goes through and explains every line and even explains some of the math a bit:&#xD;&#xA;&#xD;&#xA;http://rbwhitaker.wikidot.com/hlsl-tutorials" />
  <row Id="4003" PostHistoryTypeId="5" PostId="1603" RevisionGUID="18e3afa7-b29f-4bf2-a234-c3d32dcbf5cb" CreationDate="2010-08-04T00:01:16.337" UserId="469" Comment="added 266 characters in body" Text="lots of people asked for a trailer for my game, because the screenshots do not make justice...&#xD;&#xA;&#xD;&#xA;But I don't know much about this, can someone point at some tools and tips? Like, what to put on the trailer, and specially: How to record my game, without a logo or slow FPS? (that means: no fraps)&#xD;&#xA;&#xD;&#xA;Bounty:&#xD;&#xA;&#xD;&#xA;As you noticed, I've set a bounty, and removed a correct response...&#xD;&#xA;I tested PlayClaw (it causes the game to crash), Fraps (stupid logo, only 30 seconds, BAAAD video quality OR I need to set it as lossless, that for some reason locks the game speed and actually breaks the gameplay, making it plays wonky), CamStudio (too slow, skipping frames, desynched audio), and some other minor stuff.&#xD;&#xA;&#xD;&#xA;My game is composed of vector graphics, lossy compression destroy the look of the game (instead of seeing lines, you see only black and some blurry stuff that look like... a blob, and nothing more), AND it is a fast paced arcade action game, created to run at 60 FPS.&#xD;&#xA;&#xD;&#xA;So, how I record gameplay without making my vectors look blurry and without making it too slow (a bit slow there are no problem... sometimes there are no way to achieve perfect speed)&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;Seemly I am bumping into the disk speed, so I need whatever software has a compression algorithm that is lossless, compress sufficiently to make it easy for the disk without taking too much CPU (my game is sorta CPU hog... it abuses physics and particles...)&#xD;&#xA;&#xD;&#xA;Also, I made some tests recording from VirtualDub, for some reason it worked better than any other software, maybe fiddling with its disk cache options I can reach something...&#xD;&#xA;&#xD;&#xA;Anyone know a program, that for example can save every frame in .png, and do that fast enough? Or something like that...&#xD;&#xA;&#xD;&#xA;edit2:&#xD;&#xA;&#xD;&#xA;People, you are forgetting the other software of the toolchain too... Like, how to edit, codecs, etc...&#xD;&#xA;&#xD;&#xA;Please, no windows movie maker (I want to make a professional... or at least a bit pro looking stuff) and no software that costs more than my PC!" />
  <row Id="4004" PostHistoryTypeId="2" PostId="2127" RevisionGUID="c4e68cda-3575-427e-a888-ae8fb0ef93c2" CreationDate="2010-08-04T00:26:20.343" UserId="1338" Text="How can I get voice recognition features into the Unity Game Engine? Is there a plugin or a framework (hopefully freeware) that I could use? If so, any ideas on how to install it? Also, how much of a problem would there be with background noises in the game interfering with the voice inputs into the game? Are there any examples of games on the market that use this? (besides for Spain 3d for the Torque Game Engine)" />
  <row Id="4005" PostHistoryTypeId="1" PostId="2127" RevisionGUID="c4e68cda-3575-427e-a888-ae8fb0ef93c2" CreationDate="2010-08-04T00:26:20.343" UserId="1338" Text="How can I get voice recognition features into the Unity Game Engine?" />
  <row Id="4006" PostHistoryTypeId="3" PostId="2127" RevisionGUID="c4e68cda-3575-427e-a888-ae8fb0ef93c2" CreationDate="2010-08-04T00:26:20.343" UserId="1338" Text="&lt;unity&gt;" />
  <row Id="4007" PostHistoryTypeId="2" PostId="2128" RevisionGUID="bfd96761-a7b8-4b5e-918a-799c8c246319" CreationDate="2010-08-04T00:38:28.137" UserId="55" Text="Here is a discussion that may be of some value.&#xD;&#xA;&#xD;&#xA; - [How to flip an image to its back?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/forum/topic/4398" />
  <row Id="4008" PostHistoryTypeId="2" PostId="2129" RevisionGUID="453de978-c5f9-4218-8b4b-54f6dc9f992a" CreationDate="2010-08-04T00:44:00.950" UserId="55" Text="Unity3D doesn't have any direct support for voice recognition. You would need to write an extension (System.Speech.Recognition) or find some kind of plug-in to get you rolling. If you do end up going this direction you will lose out on the unity web player compatibility with your project. &#xD;&#xA;&#xD;&#xA;I do not see any plug-ins that are already developed for this purpose." />
  <row Id="4009" PostHistoryTypeId="5" PostId="2110" RevisionGUID="e4c1df26-0dcf-4107-917c-745d96dc0800" CreationDate="2010-08-04T00:57:03.187" UserId="1329" Comment="added 42 characters in body" Text="As a 16 year veteran in the industry, in my opinion you _shouldn't_ need to make it look pretty in order to demonstrate good AI skills. On the other hand I think you *should* it make pretty because:&#xD;&#xA;&#xD;&#xA; 1. Presentation is very important in the game industry, and it is a way to make it clear that you &quot;made an effort&quot;, even if you spent many more hours on the underlying technology.&#xD;&#xA; 2. Your demo may get seen by a hiring manager, HR person or programmer that doesn't know anything about AI&#xD;&#xA;&#xD;&#xA;If you get someone else to make it look pretty for you all the better, because it shows that you care about making a good impression, but also that you can find people to help you, and co-operate with people. Very important skills on the job. &#xD;&#xA;&#xD;&#xA;Regarding using an API like Unreal or Kynapse; I think it's much more valuable to show that you can build an AI engine up from nothing. Demonstrating enthusiasm and problem solving. Once you're on the job you can spend a few days reading an API and documentation, but a deeper understanding of what lies beneath the API is a far more valuable asset.&#xD;&#xA;&#xD;&#xA;Hope this helps and good luck!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4010" PostHistoryTypeId="2" PostId="2130" RevisionGUID="743063b1-8a2a-4a93-9b45-670c280251c8" CreationDate="2010-08-04T00:58:24.120" UserId="1338" Text="s there a plugin to integrate Face FX with Blender? I only see plugins for Maya, Max, SoftImage, and MotionBuilder on the Face FX website." />
  <row Id="4011" PostHistoryTypeId="1" PostId="2130" RevisionGUID="743063b1-8a2a-4a93-9b45-670c280251c8" CreationDate="2010-08-04T00:58:24.120" UserId="1338" Text="Is there a plugin to integrate Face FX with Blender?" />
  <row Id="4012" PostHistoryTypeId="3" PostId="2130" RevisionGUID="743063b1-8a2a-4a93-9b45-670c280251c8" CreationDate="2010-08-04T00:58:24.120" UserId="1338" Text="&lt;blender&gt;" />
  <row Id="4013" PostHistoryTypeId="2" PostId="2131" RevisionGUID="d46cdbac-d54f-4358-8262-ddbb88c917c0" CreationDate="2010-08-04T01:25:56.157" UserId="603" Text="Some intel resources.&#xD;&#xA;&#xD;&#xA;http://software.intel.com/en-us/articles/designing-the-framework-of-a-parallel-game-engine/&#xD;&#xA;&#xD;&#xA;http://software.intel.com/en-us/videos/dont-dread-threads-part-1/" />
  <row Id="4014" PostHistoryTypeId="16" PostId="2131" RevisionGUID="d46cdbac-d54f-4358-8262-ddbb88c917c0" CreationDate="2010-08-04T01:25:56.157" UserId="-1" />
  <row Id="4015" PostHistoryTypeId="2" PostId="2132" RevisionGUID="0d8d0c26-19f4-4c59-830d-44c7411d0f7a" CreationDate="2010-08-04T01:35:56.247" UserId="561" Text="cocos2d-iphone is a great way into game programming without learning the lower level aspects of game programming. I would recommend trying it out first.&#xD;&#xA;&#xD;&#xA;cocos2d-iphone has many examples that come with it, which can give you a great head start.&#xD;&#xA;&#xD;&#xA;The question is a bit confusing since cocos2d-iphone is written in Objective C :)" />
  <row Id="4016" PostHistoryTypeId="5" PostId="2130" RevisionGUID="e5b24c45-8dfa-4b13-9f2c-41c87d45b860" CreationDate="2010-08-04T02:01:26.197" UserId="395" Comment="added 1 characters in body; edited tags" Text="Is there a plugin to integrate Face FX with Blender? I only see plugins for Maya, Max, SoftImage, and MotionBuilder on the Face FX website." />
  <row Id="4017" PostHistoryTypeId="6" PostId="2130" RevisionGUID="e5b24c45-8dfa-4b13-9f2c-41c87d45b860" CreationDate="2010-08-04T02:01:26.197" UserId="395" Comment="added 1 characters in body; edited tags" Text="&lt;3d&gt;&lt;blender&gt;" />
  <row Id="4018" PostHistoryTypeId="16" PostId="774" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4019" PostHistoryTypeId="16" PostId="776" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4020" PostHistoryTypeId="16" PostId="777" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4021" PostHistoryTypeId="16" PostId="783" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4022" PostHistoryTypeId="16" PostId="784" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4023" PostHistoryTypeId="16" PostId="788" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4024" PostHistoryTypeId="16" PostId="806" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4025" PostHistoryTypeId="16" PostId="2126" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4026" PostHistoryTypeId="16" PostId="773" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T03:12:38.850" UserId="51" />
  <row Id="4028" PostHistoryTypeId="2" PostId="2133" RevisionGUID="5e1bad20-b2a0-4529-9bcc-c1f7bdadd287" CreationDate="2010-08-04T03:23:42.933" UserId="647" Text="Has anybody used this library before? What were your experiences? Pros/Cons? " />
  <row Id="4029" PostHistoryTypeId="1" PostId="2133" RevisionGUID="5e1bad20-b2a0-4529-9bcc-c1f7bdadd287" CreationDate="2010-08-04T03:23:42.933" UserId="647" Text="Open Dynamics Engine" />
  <row Id="4030" PostHistoryTypeId="3" PostId="2133" RevisionGUID="5e1bad20-b2a0-4529-9bcc-c1f7bdadd287" CreationDate="2010-08-04T03:23:42.933" UserId="647" Text="&lt;engine&gt;&lt;physics&gt;" />
  <row Id="4031" PostHistoryTypeId="16" PostId="2133" RevisionGUID="5e1bad20-b2a0-4529-9bcc-c1f7bdadd287" CreationDate="2010-08-04T03:23:42.933" UserId="647" />
  <row Id="4032" PostHistoryTypeId="2" PostId="2134" RevisionGUID="2aab063d-7503-400c-a09a-8530780cca00" CreationDate="2010-08-04T03:26:22.883" UserId="1272" Text="I've personally never used it, but I think this article gives a good idea of pros/cons:&#xD;&#xA;http://blog.wolfire.com/2010/03/Comparing-ODE-and-Bullet&#xD;&#xA;&#xD;&#xA;To summarize the article, it looks like ODE is well documented and stable, but doesn't quite have the cutting edge features and efficiency that some of the more actively developed but less documented alternatives have.&#xD;&#xA;&#xD;&#xA;(I have used Bullet and I can vouch for it being a rather nice piece of middleware, though as the article suggests, the documentation is a bit iffy)." />
  <row Id="4033" PostHistoryTypeId="16" PostId="2134" RevisionGUID="2aab063d-7503-400c-a09a-8530780cca00" CreationDate="2010-08-04T03:26:22.883" UserId="-1" />
  <row Id="4034" PostHistoryTypeId="2" PostId="2135" RevisionGUID="9293ccb8-2057-4d82-9e78-646d5a72158c" CreationDate="2010-08-04T03:26:31.263" UserId="189" Text="Here is a great, high-quality blog post about the reason for Wolfire's switch from ODE to Bullet:&#xD;&#xA;&#xD;&#xA;http://blog.wolfire.com/2010/03/Comparing-ODE-and-Bullet&#xD;&#xA;&#xD;&#xA;The biggest paragraph is most likely this one:&#xD;&#xA;&#xD;&#xA;&gt;When I tried dropping four hundred boxes on the Overgrowth &quot;desert fort&quot; scene, Bullet performed the simulation twice as fast as ODE did, even without Bullet's optional performance features like multi-threading and OpenCL. One of the factors in its speed is its use of Sony's newly open-sourced SIMD vector math library, which you can find here if you'd like to use it separately." />
  <row Id="4035" PostHistoryTypeId="16" PostId="2135" RevisionGUID="9293ccb8-2057-4d82-9e78-646d5a72158c" CreationDate="2010-08-04T03:26:31.263" UserId="-1" />
  <row Id="4036" PostHistoryTypeId="2" PostId="2136" RevisionGUID="c7e2651f-850f-41e6-906e-7ce3122ac844" CreationDate="2010-08-04T04:01:43.390" UserId="1272" Text="Well, I haven't used FaceFX myself, but I do recall FaceFX uses Ogre for its editor/viewer ([here][1] is a forum post about it), and there is an excellent Ogre exporter for Blender available [here][2] (for versions 2.4.x I believe). So you could export from blender into Ogre's format, then load that into FaceFX. It's not a plugin or direct integration, but I suspect that's as good as it's going to get unless the FaceFX devs decide make a plugin (maybe contact them about it?).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/forums/viewtopic.php?f=11&amp;t=51612&#xD;&#xA;  [2]: http://www.ogre3d.org/forums/viewtopic.php?f=8&amp;t=45922" />
  <row Id="4037" PostHistoryTypeId="2" PostId="2137" RevisionGUID="1a2e6c00-f61e-44f4-bc25-a4cb75fbd349" CreationDate="2010-08-04T04:41:34.797" UserId="395" Text="Bullet didn't exist the last time I used ODE (via PyODE, which I will say is a very nice API wrapper) so I can't comment on that. The biggest issue I had with it was stability. It tends to be a very jittery simulation if you don't tune it juuuust right (which takes a lot of poorly documented voodoo). If you use big units that isn't such a big deal, but I made the mistake of using smaller numbers. The joints system is very flexible once you start to think of your system in ODE terms. Also a decent annoyance, it uses a bitfield for collision groups, so you can only have 32 of them." />
  <row Id="4038" PostHistoryTypeId="16" PostId="2137" RevisionGUID="1a2e6c00-f61e-44f4-bc25-a4cb75fbd349" CreationDate="2010-08-04T04:41:34.797" UserId="-1" />
  <row Id="4039" PostHistoryTypeId="2" PostId="2138" RevisionGUID="eaa52f52-cc22-47e6-bc80-d337173ea3de" CreationDate="2010-08-04T06:05:37.383" UserId="1091" Text="If you want to understand how a traditional software rendering pipeline works (and things haven't changed that much even with the introduction of programmable hardware pipelines), one book I'd definitely recommend would be Jim Blinn's: A Trip Down The Graphics Pipeline.&#xD;&#xA;&#xD;&#xA;Unlike some of the other suggestions, it's not particularly comprehensive, but it is very readable and I think if you're just getting started with 3D, it's a good introduction. And it's written by Jim Blinn, who is one of the founding fathers of computer graphics, and thus is written from the perspective of someone who actually invented/discovered these techniques.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4040" PostHistoryTypeId="2" PostId="2139" RevisionGUID="7010a2ed-36cd-4b1a-a81c-f7548cba5f07" CreationDate="2010-08-04T07:40:58.933" UserId="259" Text="Yes it should look pretty (or not ugly), but don't underestimate siplifying graphics.  A 2D city with 2D blobs moving around is fine, if you're demonstrating collision avoidance. " />
  <row Id="4041" PostHistoryTypeId="16" PostId="2139" RevisionGUID="7010a2ed-36cd-4b1a-a81c-f7548cba5f07" CreationDate="2010-08-04T07:40:58.933" UserId="-1" />
  <row Id="4042" PostHistoryTypeId="2" PostId="2140" RevisionGUID="96f9d0c1-9f38-4a75-b019-f6f5dd861203" CreationDate="2010-08-04T08:06:05.920" UserId="259" Text="A useful list of AI middleware.  Please provide URL, free/open-source or licenced, and brief description of abilites.&#xD;&#xA;&#xD;&#xA;Probably shouldn't give personal opinions of the middleware, as if this list is around for a while the criticisms may become invalid." />
  <row Id="4043" PostHistoryTypeId="1" PostId="2140" RevisionGUID="96f9d0c1-9f38-4a75-b019-f6f5dd861203" CreationDate="2010-08-04T08:06:05.920" UserId="259" Text="Available AI middleware" />
  <row Id="4044" PostHistoryTypeId="3" PostId="2140" RevisionGUID="96f9d0c1-9f38-4a75-b019-f6f5dd861203" CreationDate="2010-08-04T08:06:05.920" UserId="259" Text="&lt;ai&gt;" />
  <row Id="4045" PostHistoryTypeId="16" PostId="2140" RevisionGUID="96f9d0c1-9f38-4a75-b019-f6f5dd861203" CreationDate="2010-08-04T08:06:05.920" UserId="259" />
  <row Id="4046" PostHistoryTypeId="2" PostId="2141" RevisionGUID="b75268b8-fb53-47f3-b58d-74af2d793aea" CreationDate="2010-08-04T08:10:51.543" UserId="1091" Text="I don't know whether it's clearer than the original paper, but there is another implementation of the technique (or a variation on it) which I spotted in this year's Siggraph material.&#xD;&#xA;&#xD;&#xA;[http://igm.univ-mlv.fr/~biri/mlaa-gpu/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://igm.univ-mlv.fr/~biri/mlaa-gpu/&#xD;&#xA;&#xD;&#xA;As to whether or not you'd get a better answer over at the main site, I don't know - I'd say the majority of people interested in this technique are probably game devs...&#xD;&#xA;" />
  <row Id="4047" PostHistoryTypeId="16" PostId="2141" RevisionGUID="b75268b8-fb53-47f3-b58d-74af2d793aea" CreationDate="2010-08-04T08:10:51.543" UserId="-1" />
  <row Id="4048" PostHistoryTypeId="2" PostId="2142" RevisionGUID="0635b6de-57a1-4f76-a758-50c0878afc74" CreationDate="2010-08-04T08:16:43.607" UserId="259" Text="**Recast/Detour**&#xD;&#xA;&#xD;&#xA;Open-source&#xD;&#xA;&#xD;&#xA;[Googlecode link][1]&#xD;&#xA;&#xD;&#xA;Recast is a library to generate navigation meshes from polygon soups.  Detour is a pathfinding and spatial reasoning toolkit that works on navigation meshes.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/recastnavigation/" />
  <row Id="4049" PostHistoryTypeId="16" PostId="2142" RevisionGUID="0635b6de-57a1-4f76-a758-50c0878afc74" CreationDate="2010-08-04T08:16:43.607" UserId="-1" />
  <row Id="4050" PostHistoryTypeId="5" PostId="2140" RevisionGUID="15869004-90df-458b-9dd0-1a1b1119b062" CreationDate="2010-08-04T08:17:49.923" UserId="259" Comment="added 59 characters in body" Text="A useful list of AI middleware.  Please provide URL, free/open-source or licenced, and brief description of abilites.&#xD;&#xA;&#xD;&#xA;Probably shouldn't give personal opinions of the middleware, as if this list is around for a while the criticisms may become invalid.&#xD;&#xA;&#xD;&#xA;EDIT: Nah that's daft.  Say if you've used it at least." />
  <row Id="4051" PostHistoryTypeId="2" PostId="2143" RevisionGUID="520da654-24d7-4f5f-99d3-0088b9aa63b1" CreationDate="2010-08-04T08:23:10.973" UserId="1351" Text="I'm currently doing the same as you, and found http://bit.ly/7618fJ (CSCI 234 Introduction to Computer Graphics on iTunesU) to be really helpful after I read a few books on computer graphics and math." />
  <row Id="4052" PostHistoryTypeId="2" PostId="2144" RevisionGUID="6fa73944-54b9-4795-bee1-aa5df10ea459" CreationDate="2010-08-04T08:55:36.103" UserId="263" Text="The Wolfire Games blog has had a really excellent series of tutorials on linear algebra for game developers recently.&#xD;&#xA;&#xD;&#xA; - [Part 1 - Vectors and vector math][1]&#xD;&#xA; - [Part 2 - Length, distance, normalization, dot and cross products][2]&#xD;&#xA; - [Part 3 - Basis vectors and matrices][3]&#xD;&#xA; - [Part 4 - 2D and 3D rotations][4]&#xD;&#xA;&#xD;&#xA;It really is important to understand the math behind it before you bother starting to learn an API. Otherwise, the order and purpose of the API calls won't make a whole lot of sense to you. You need to understand what they're doing for you on a math level first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;  [2]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/&#xD;&#xA;  [3]: http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-3/&#xD;&#xA;  [4]: http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-4/&#xD;&#xA;" />
  <row Id="4053" PostHistoryTypeId="2" PostId="2145" RevisionGUID="d3219c58-7ef5-4a29-b889-12c2b51ba7b8" CreationDate="2010-08-04T09:03:22.953" UserId="1361" Text="Bullet is derived from ODE. When I first saw ODE, it was a bit too poor, in my perception, after playing a bit with Havok and PhysX. The only reason why I was searching for alternatives was that I needed 64 bit double precision float, for a real-size space multiplayer game.&#xD;&#xA;Bullet on the other hand had more coming from the box. It has a great community, and lots of developers working on plugins like something to manage concave shapes (they had 2 alternatives - approximation to convex compound objects and simulation of the original trimesh), CCD implementation, model import, etc. It also had wrappers for some of the 3D engines (don't remember exactly which, might be Ogre3D and XNA).&#xD;&#xA;It was very much ahead of ODE, and OpenSource.&#xD;&#xA;&#xD;&#xA;This was 2 years ago though, much may have changed. But right then, in the same simulations, nVidia PhysX showed much better performance, and was richer in functionality. So if you plan on using 32 bit single precision float, I'm not sure whether you'll find anything better than PhysX." />
  <row Id="4054" PostHistoryTypeId="16" PostId="2145" RevisionGUID="d3219c58-7ef5-4a29-b889-12c2b51ba7b8" CreationDate="2010-08-04T09:03:22.953" UserId="-1" />
  <row Id="4055" PostHistoryTypeId="2" PostId="2146" RevisionGUID="a2fcbaf7-5e77-40c7-a3a2-139a7030e8e3" CreationDate="2010-08-04T10:07:05.130" UserId="1101" Text="It's possible to write code that catches crashes and logs the call stack. That can help a lot with bug reports. Having a useful log file generated helps too. You can prompt the user to send these files the next time they play, or have a standalone tool that runs after the game is closed or crashes if you like." />
  <row Id="4056" PostHistoryTypeId="2" PostId="2147" RevisionGUID="8ec63fd2-01a3-42a8-921d-9a3fbeed54dc" CreationDate="2010-08-04T10:20:03.463" UserId="1101" Text="Anywhere that is letting non-technical human resource people judge technical demos sent by candidates is not somewhere that you want to work. " />
  <row Id="4057" PostHistoryTypeId="16" PostId="2147" RevisionGUID="8ec63fd2-01a3-42a8-921d-9a3fbeed54dc" CreationDate="2010-08-04T10:20:03.463" UserId="-1" />
  <row Id="4058" PostHistoryTypeId="2" PostId="2148" RevisionGUID="77c440dd-b682-4b46-b932-25b6720a55c1" CreationDate="2010-08-04T10:24:03.333" UserId="258" Text="This article on Pixel Prospector may be what you need:&#xD;&#xA;&#xD;&#xA;[How To Record And Edit Gameplay Videos][1]&#xD;&#xA;&#xD;&#xA;The game used in the video is NeonPlat 2, which also uses vector graphics.&#xD;&#xA;&#xD;&#xA;The article covers everything, from capturing to editing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pixelprospector.com/2010/08/how-to-record-and-edit-gameplay-videos/" />
  <row Id="4059" PostHistoryTypeId="2" PostId="2149" RevisionGUID="b6cac813-49ab-4a6a-908d-3f5c21c5af01" CreationDate="2010-08-04T10:43:53.747" UserId="137" Text="From my own observations, working with outsourcing is fraught with problems.&#xD;&#xA;&#xD;&#xA;A good outsourcing team or individual can be a godsend, taking pressure off the core team and getting extra custom content into the game that would otherwise have had to compete for project resources with other key areas.&#xD;&#xA;&#xD;&#xA;However there can be many problems with getting to this point. Communication is the key difficulty, in all senses of the word.&#xD;&#xA;&#xD;&#xA;Physically, your outsource partner will not be working in the same building as your team. On a practical day to day basis, this makes is harder to check on progress and keep an up to date impression of how the project is proceeding. It also makes it harder to convey to the outsourcer the underlying philosophies of the game, your design principles and the nuances of your design which influence what you want. They will also likely be unfamiliar with your working practices and your pipeline for content, possibly providing you with assets in a format that requires conversion work on your side to get into the game.&#xD;&#xA;&#xD;&#xA;Culturally, your outsource partner may be in a different country and speak a different primary language. This exacerbates the problems mentioned in the first point. Neither are dealbreakers in any general way, and it may well be that an indie team works in a  distributed and collaborative fashion anyway, but both points make it harder for everyone on the team to be on the same page and to all be working towards the same goals.&#xD;&#xA;&#xD;&#xA;Managerially, if you have an outsourcer, you have to make sure they are managed effectively. They may well have many projects they are working on simultaneously, and not being on your &quot;staff&quot; you have no direct control over how quickly, or to what quality they do their work. Someone on the team will need to make time to liaise with the outsourcer on a regular basis to review progress, to discuss problems and proposed changes. One of the more difficult aspects will be signing off on a particular resource. As a separate entity, your team may have very different expectation in terms of quality from your partner. Remember that polish and final tweaks can take up a disproportionate amount of time. I have seen examples where outsource work that was submitted required extensive &quot;touch up&quot; work to ensure that it felt consistent with internally produced assets in game. Overall the quality was not bad, but it was different enough to be noticeable, and in the end as much effort was put into correcting this as would probably have been taken to generate the content from scratch.&#xD;&#xA;&#xD;&#xA;Obviously, most of these points boil down to recognising the difficulties of working with someone outside your team, and ensuring good management and the agreement of appropriate specifications and goals before work begins.&#xD;&#xA;&#xD;&#xA;Indie development is generally very content bound, small teams are usually unable to produce the quantity of content as a larger traditional team (depending of course on the type and style of game). Outsourcing, while potentially expensive and coming with potential management headaches, can provide a way to help overcome this to some extent, producing extra high quality assets for your game." />
  <row Id="4060" PostHistoryTypeId="2" PostId="2150" RevisionGUID="a3445781-7f18-41df-b5d7-d62f6d389e82" CreationDate="2010-08-04T10:45:35.647" UserId="936" Text="As an aside to the other answers here, I recently found gles2-bc, a C++ library 'which makes the non-backward compatible OpenGL ES 2.0 API backward compatible'.&#xD;&#xA;&#xD;&#xA;There are some known limitations and I haven't used it myself, but thought I'd post the link for reference.&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/gles2-bc/" />
  <row Id="4061" PostHistoryTypeId="2" PostId="2151" RevisionGUID="920cc1e1-fea8-4d13-b551-b6758f185dc2" CreationDate="2010-08-04T10:51:02.877" UserId="164" Text="Here are some HTML5 games on [Effects Games][1]... there are even projects there you can jump in an get involved. Been killing time between compiles mostly with their Crystal Galaxy Demo&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.effectgames.com/effect/" />
  <row Id="4062" PostHistoryTypeId="2" PostId="2152" RevisionGUID="73d0c1c8-076e-45a0-8f07-5ae786da7e70" CreationDate="2010-08-04T11:14:25.727" UserId="1375" Text="The [Scrolling Game Development Kit version 2][1] is the second major iteration (rewrite) of a game development IDE and framework for exactly this kind of prototyping and simple 2-D game development.  As the second iteration, it takes advantage of modern languages (C#) and technologies (reflection on custom code) as well as working out some of the fundamental flaws in the design (now it allows you to place sprites directly in the map editor rather than only a path which must be externally connected to a sprite, and it doesn't try to be quite such a Wysywig editor because there are some things you want to happen at run time only and others you want at design time only).&#xD;&#xA;&#xD;&#xA;Some of the features of interest:&#xD;&#xA;&#xD;&#xA; 1. The vast majority of the framework code is exposed and editable within the IDE.  If you don't like the way the &quot;PushTowardSprite&quot; built-in function behaves, you can bring up the editor and change it, or add your own that will appear in the list right along with all the built-in commands.&#xD;&#xA; 2. You mentioned the ability to draw polygons.  This framework is based on OpenTK, which is a .NET wrapper around OpenGL.  So you have all the power of OpenGL at your fingertips.  There's a single class &quot;Display.cs&quot; in the framework code that you can edit within the IDE do add whatever drawing features you want.&#xD;&#xA; 3. Much of the framework is targeted as side-scroller physics (walking on slopes, riding platforms, etc), so a lot of that code is already done for you; of course you can customize or ignore it for other 2-D game types.  A Tetris game has been written with it.&#xD;&#xA; 4. Parallax scrolling&#xD;&#xA; 5. Alpha translucency can be embedded in the graphics or applied to the drawing of any graphic.&#xD;&#xA; 6. All project data is saved in a single XML file (a .NET dataset).  External editors can access the file thereby extending the features available in the IDE if necessary.&#xD;&#xA; 7. Projects are compiled first to C# projects (compatible with Visual Studio) and then to EXE files (with all the resources embedded).  If necessary, you can load the project into Visual Studio for enhanced debugging or code development interface.&#xD;&#xA;&#xD;&#xA;  [1]: http://sgdk2.sf.net/" />
  <row Id="4063" PostHistoryTypeId="2" PostId="2153" RevisionGUID="aeacd4ef-201c-460e-b697-f255eff1e7ad" CreationDate="2010-08-04T11:41:16.667" UserId="1206" Text="http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263140&amp;reply_id=3598844&#xD;&#xA;&#xD;&#xA;I agree with these remarks and think it is a stellar discussion of why DirectX is better than OpenGL.&#xD;&#xA;&#xD;&#xA;That journal is in response to David at Wolfire.&#xD;&#xA;&#xD;&#xA;I hope that serves to balance it out a bit. ;)&#xD;&#xA;&#xD;&#xA;But in general, if you're using a cross-platform, cross-API framework:&#xD;&#xA;&#xD;&#xA;Use DirectX on Windows and OpenGL on *nix." />
  <row Id="4064" PostHistoryTypeId="2" PostId="2154" RevisionGUID="f597f445-7e06-4c1c-a2c2-cd5f2e50fdb9" CreationDate="2010-08-04T12:04:43.230" UserDisplayName="Sion" Text="With the way money is with many companies I'm sure you will get pulled into a number of different things and not just AI - for this reason I would say you should show good overall skills as well. &#xD;&#xA;&#xD;&#xA;Consider the scenario where two amazing people demo their work; they both show the same AI, have the same qualifications/experience and are very similar in every way - but one uses triangles for actors and boxes for static and the other shows his demo with models loaded from file. I personally would hire the one who (a) took more effort (b) shows that they can do work outside their comfort zone/speciality.&#xD;&#xA;&#xD;&#xA;As someone else mentioned for your speciality you shouldnt need to show good graphics but I dont think it would hurt either." />
  <row Id="4065" PostHistoryTypeId="16" PostId="2154" RevisionGUID="f597f445-7e06-4c1c-a2c2-cd5f2e50fdb9" CreationDate="2010-08-04T12:04:43.230" UserId="-1" />
  <row Id="4066" PostHistoryTypeId="2" PostId="2155" RevisionGUID="ea15ba76-63ac-4c00-a1de-717cc83ff053" CreationDate="2010-08-04T12:46:06.633" UserId="1134" Text="If you have an iDevice, take a look at the apps &quot;2600 Magic&quot; ([1Up article discussing it][1]) and &quot;Dragster Magic&quot;, both by David Crane.  They are a fun peek into Atari 2600 programming.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.1up.com/do/blogEntry?bId=9017908" />
  <row Id="4067" PostHistoryTypeId="16" PostId="2155" RevisionGUID="ea15ba76-63ac-4c00-a1de-717cc83ff053" CreationDate="2010-08-04T12:46:06.633" UserId="-1" />
  <row Id="4068" PostHistoryTypeId="2" PostId="2156" RevisionGUID="720f8192-8d8b-4159-8f37-f0c4f49ff66f" CreationDate="2010-08-04T13:13:28.903" UserId="1134" Text="While it's more elegant to transform the problem so that you can utilize the static checking mechanisms of your language or existing tools (e.g. enum + lint or higher warning setting), you _can_ roll your own tool if you're not able to do this.&#xD;&#xA;&#xD;&#xA;* If you have a centralized list of valid key values, and&#xD;&#xA;* you always use a reasonably consistent syntax where you're using them (e.g. `getKey(&quot;foo&quot;)`), and&#xD;&#xA;* you're not using more complicated logic to build key strings before use (e.g. `keyString = &quot;move_&quot; + directionString; bar = getKey(keyString);`)...&#xD;&#xA;&#xD;&#xA;...then you might be able to use a simple `grep`-like mechanism in &amp;lt;insert-your-scripting-language-of-choice&amp;gt; to make a list and scan your source files.&#xD;&#xA;&#xD;&#xA;It's possible to get some false positives and false negatives here.  Too many, and maintaining the tool starts to become more of an effort than it is worth.&#xD;&#xA;&#xD;&#xA;We have used a tool like this for a localization system, checking that all of our &quot;string ids&quot; actually match up to real strings.  These string ids are used in c, cpp, and lua sources, and also in json, xml, and other &quot;baked&quot; forms of data.  It's not perfect; it gives up when the string id was piecewise constructed by earlier code rather than being a literal.&#xD;&#xA;&#xD;&#xA;One other nifty thing you can do with this is turn more expensive string literals into less expensive unique IDs or hashes as a pre-precompile step.  If you don't control your build process this can get to be a pain, and if the tool is slow at all you get slow builds (which I loathe with the burning passion of a thousand fiery suns -- but that's another answer)... but you may already be doing some pre-preprocessing for e.g. [swig][1] or similar tools.  This has the advantage of mandating a consistent syntax, and it'll fail your build if there's anything wrong.&#xD;&#xA;&#xD;&#xA;(There are definitely tools out there that do this latter thing; look around a bit!)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swig.org/" />
  <row Id="4069" PostHistoryTypeId="2" PostId="2157" RevisionGUID="dc130596-8557-4de6-adb0-e265cbfa7bed" CreationDate="2010-08-04T13:15:43.267" UserId="136" Text="There have been some really interesting breakthroughs in mainstream UI toolkits over the past few years.  Game UIs have been evolving too, but at a somewhat slower pace.  This is likely because developing a full-featured UI subsystem is a significant undertaking in itself, and it's difficult to justify the resource investment.&#xD;&#xA;&#xD;&#xA;My personal favorite UI system is the Windows Presentation Foundation (WPF).  It really takes the potential for UI differentiation to the next level.  Here are some of its more interesting features:&#xD;&#xA;&#xD;&#xA; 1. Controls are &quot;look-less&quot; by default.  A control's logic and visual appearance are generally decoupled.  Every control ships with a default style and template, which describes its default visual appearance.  For instance, a button may be represented as a rounded rectangle with an outer stroke, a solid color or gradient background, and a content presenter (to present the caption).  Developers (or designers) can create custom styles templates which change the appearance and (to an extent) the behavior of a control.  Styles can be used to override simple properties of a control, like foreground/background color, template, etc.; templates change the actual visual structure.&#xD;&#xA;&#xD;&#xA; 2. Styles and templates may include &quot;Triggers&quot;.  Triggers can listen for certain events or property values (or combinations of values) and conditionally alter aspects of a style or template.  For instance, a button template would generally have a trigger on the &quot;IsMouseOver&quot; property for the purposes of changing the background color when the mouse hovers over the button.&#xD;&#xA;&#xD;&#xA; 3. There are a few different &quot;levels&quot; of UI elements ranging from lighter weight elements with minimal functionality to full-blown heavy-weight controls.  This gives you some flexibility in how you structure your UI.  The simplest of the UI element classes, `UIElement`, has no style or template and only supports the simplest of input events.  For simple elements like status indicators, this functionality might be all you need.  If you require more extensive input support, you can derive from `FrameworkElement` (which extends `UIElement`).  Traditional widgets generally derive from `Control`, which extends `FrameworkElement` and adds custom style and template support (among other things).&#xD;&#xA;&#xD;&#xA; 4. WPF uses a retained, scalable, resolution-independent vector graphics model.  On Windows, WPF applications are rendered and composed using Direct3D.&#xD;&#xA;&#xD;&#xA; 5. The introduction of WPF included a new declarative programming language called Xaml.  Xaml, based on Xml, is the preferred language for declaring UI &quot;scenes&quot;.  It's actually pretty slick, and though it may appear similar at first glance, it's fundamentally different from existing languages like XUL (and much more powerful).&#xD;&#xA;&#xD;&#xA; 6. WPF has a *very* advanced text subsystem.  It supports most if not all OpenType font features, bidirectional ClearType antialiasing, subpixel positioning, etc.&#xD;&#xA;&#xD;&#xA;**&quot;Ok, great, now how is this relevant to game development?&quot;**&#xD;&#xA;&#xD;&#xA;Back when WPF was still in development (and known as &quot;Avalon&quot;), I was taking a video game design course at Georgia Tech.  My final project was a turn-based strategy game, and I wanted a very capable UI.  WPF/Avalon seemed like a good route to go because it had a complete set of full-featured controls _and_ it game me the capability to completely change the look and feel of those controls.  The result was a game with a beautiful and crisp UI with the level of functionality that you normally only see in full-fledged applications.&#xD;&#xA;&#xD;&#xA;Now, the problem with using WPF for games is that it's fairly heavy-weight and renders in its own &quot;sandbox&quot;.  By that, I mean there is no supported way of hosting WPF within a Direct3D or OpenGL game environment.  It is possible to host Direct3D content within a WPF application, but you will be limited by the framerate of the WPF application, which is generally lower than you would want.  For some types of games, like 2D strategy games (screenshot of my current WPF game project), it could still work great.  For anything else, not so much.  But you could still apply some of WPF's more compelling architectural concepts in developing your own UI framework.&#xD;&#xA;&#xD;&#xA;There is also an open-source, unmanaged C++/Direct3D implementation of WPF called &quot;WPF/G (WPF for Games)&quot;](http://wpfg.codeplex.com/) that is specifically designed for use in games on both Win32 and Windows Mobile.  Active development appears to have ceased, but the last time I checked it out, it was a rather complete implementation.  The text subsystem was the one area that was really lacking compared to Microsoft's WPF implementation, but that's less of an issue for games.  I would imagine that integrating WPF/G with a Direct3D-based game engine would be relatively straightforward.  Going this route could provide you with an extremely capable, resolution-independent UI framework with extensive support for UI customization.&#xD;&#xA;&#xD;&#xA;Just to give you an idea of what a WPF-based game UI might look like, here's a screenshot from my pet project:&#xD;&#xA;&#xD;&#xA;![Screenshot from my ongoing WPF-based game project][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.startreksupremacy.com/supremacy_wpf.png" />
  <row Id="4070" PostHistoryTypeId="2" PostId="2158" RevisionGUID="93d7f071-e419-4b6f-80f9-50575c4a7489" CreationDate="2010-08-04T13:46:24.423" UserDisplayName="corpusc" Text="SharpSteer.  dunno much about it, but Google does." />
  <row Id="4071" PostHistoryTypeId="16" PostId="2158" RevisionGUID="93d7f071-e419-4b6f-80f9-50575c4a7489" CreationDate="2010-08-04T13:46:24.423" UserId="-1" />
  <row Id="4072" PostHistoryTypeId="2" PostId="2159" RevisionGUID="6953a749-8d13-4e4a-8d3f-051bcdf1a52d" CreationDate="2010-08-04T14:05:51.530" UserId="741" Text="Following on from the [aspect ratios question][1], I'm interested to hear what other people are using when working on 2D UI systems (most likely their own home-grown solutions). Specifically, how do you handle coordinate systems. To my mind there are three options:&#xD;&#xA;&#xD;&#xA; 1. Hard-coded co-ordinates (e.g.: 0 -&gt; 720, 0 -&gt; 576)&#xD;&#xA; 2. Normalised co-ordinates (0.0 -&gt; 1.0, 0.0 -&gt; 1.0), mapped into real coordinates before rendering&#xD;&#xA; 3. Virtual co-ordinates (e.g.: 0 -&gt; 1600, 0 -&gt; 1000), mapped into real coordinates before rendering&#xD;&#xA;&#xD;&#xA;Hard-coded is obviously only useful if you're on a fixed platform and know what your screen space coordinates are in advance, or if you're prepared to author screen layouts for every possible set of screen dimensions.&#xD;&#xA;&#xD;&#xA;Normalised co-ordinates are nice, but suffer from ambiguity when the aspect ratio of the screen isn't fixed (e.g. 0.75 maps to a different physical co-ordinate when running in widescreen than it does in 4:3). Also, for the authors, it's really counterintuitive to declare a UI element to be (0.2 x 0.2), only to find it's not actually square when rendered.&#xD;&#xA;&#xD;&#xA;Virtual co-ordinates are unambiguous, but suffer from the same problems as normalised co-ordinates at the remapping stage: a tiny decimal discrepancy can result in off-by-one errors meaning that UI elements which should tile now have a seam between them.&#xD;&#xA;&#xD;&#xA;Similarly, when you do have a fixed resolution screen, both normalised and virtual coordinates mean that it's very difficult to guarantee a 1:1 mapping between your artist's finely crafted pixels in the UI image, and pixels on screen, meaning you run the risk of nasty scaling artefacts (assuming you're rendering as textured quads on screen).&#xD;&#xA;&#xD;&#xA;We've gone with the virtual co-ordinate approach, specifically to avoid ambiguity about aspect ratios. So when rendering to a 16:10 screen, the UI space is (0,0) -&gt; (1600,1000), but when rendering to 4:3, the usable UI space is actually (133,0) -&gt; (1467,0).&#xD;&#xA;&#xD;&#xA;Are there any better solutions that I'm just not aware of? Are there any good strategies for minimising the problems these 3 approachs have?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2073/how-would-you-handle-different-aspect-ratios-in-a-2d-platformer" />
  <row Id="4073" PostHistoryTypeId="1" PostId="2159" RevisionGUID="6953a749-8d13-4e4a-8d3f-051bcdf1a52d" CreationDate="2010-08-04T14:05:51.530" UserId="741" Text="Coordinate system handling for 2D UI" />
  <row Id="4074" PostHistoryTypeId="3" PostId="2159" RevisionGUID="6953a749-8d13-4e4a-8d3f-051bcdf1a52d" CreationDate="2010-08-04T14:05:51.530" UserId="741" Text="&lt;rendering&gt;&lt;gui&gt;&lt;framework&gt;" />
  <row Id="4075" PostHistoryTypeId="2" PostId="2160" RevisionGUID="c790568d-2abf-4586-81ed-dea86028c5e9" CreationDate="2010-08-04T14:12:21.143" UserId="1134" Text="**[OpenSteer][1]** (MIT License):&#xD;&#xA;&#xD;&#xA;&gt; OpenSteer is a C++ library to help&#xD;&#xA;&gt; construct  steering behaviors for&#xD;&#xA;&gt; autonomous characters in games and&#xD;&#xA;&gt; animation. In addition to the library,&#xD;&#xA;&gt; OpenSteer provides an OpenGL-based&#xD;&#xA;&gt; application called OpenSteerDemo which&#xD;&#xA;&gt; displays predefined demonstrations of&#xD;&#xA;&gt; steering behaviors. The user can&#xD;&#xA;&gt; quickly prototype, visualize, annotate&#xD;&#xA;&gt; and debug new steering behaviors by&#xD;&#xA;&gt; writing a plug-in for OpenSteerDemo.&#xD;&#xA;&#xD;&#xA;I've seen it used to great effect in simple games.&#xD;&#xA;&#xD;&#xA;  [1]: http://opensteer.sourceforge.net/" />
  <row Id="4076" PostHistoryTypeId="16" PostId="2160" RevisionGUID="c790568d-2abf-4586-81ed-dea86028c5e9" CreationDate="2010-08-04T14:12:21.143" UserId="-1" />
  <row Id="4077" PostHistoryTypeId="5" PostId="2158" RevisionGUID="bf145d9b-eab9-4df1-b2d2-ed0aab4da899" CreationDate="2010-08-04T14:19:43.283" UserId="14" Comment="deleted 24 characters in body" Text="**SharpSteer**. (License?)" />
  <row Id="4078" PostHistoryTypeId="5" PostId="2140" RevisionGUID="10f7d806-dea9-45f0-8b35-c076062746ad" CreationDate="2010-08-04T14:21:48.270" UserId="14" Comment="Added some formatting that I would like to see for these questions." Text="A useful list of AI middleware.  Please provide URL, free/open-source or licenced, and brief description of abilites.&#xD;&#xA;&#xD;&#xA;Probably shouldn't give personal opinions of the middleware, as if this list is around for a while the criticisms may become invalid.&#xD;&#xA;&#xD;&#xA;EDIT: Nah that's daft.  Say if you've used it at least.&#xD;&#xA;&#xD;&#xA;Format:&#xD;&#xA;&#xD;&#xA;    *Package* (License)&#xD;&#xA;    Link&#xD;&#xA;&#xD;&#xA;    Pros&#xD;&#xA;&#xD;&#xA;    Cons" />
  <row Id="4079" PostHistoryTypeId="6" PostId="2140" RevisionGUID="10f7d806-dea9-45f0-8b35-c076062746ad" CreationDate="2010-08-04T14:21:48.270" UserId="14" Comment="Added some formatting that I would like to see for these questions." Text="&lt;ai&gt;&lt;middleware&gt;" />
  <row Id="4080" PostHistoryTypeId="5" PostId="2142" RevisionGUID="55b776a0-02a1-41e4-8d7f-21d634750311" CreationDate="2010-08-04T14:22:25.820" UserId="14" Comment="deleted 1 characters in body" Text="**Recast/Detour** (MIT License)&#xD;&#xA;&#xD;&#xA;[Googlecode link][1]&#xD;&#xA;&#xD;&#xA;Recast is a library to generate navigation meshes from polygon soups.  Detour is a pathfinding and spatial reasoning toolkit that works on navigation meshes.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/recastnavigation/" />
  <row Id="4081" PostHistoryTypeId="4" PostId="2106" RevisionGUID="0254ca78-5d2c-48f3-9ce5-84bafb28e13b" CreationDate="2010-08-04T14:24:12.650" UserId="14" Comment="edited title" Text="How to demo Advanced Game AI as a portfolio piece?" />
  <row Id="4082" PostHistoryTypeId="16" PostId="384" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4083" PostHistoryTypeId="16" PostId="405" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4084" PostHistoryTypeId="16" PostId="442" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4085" PostHistoryTypeId="16" PostId="502" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4086" PostHistoryTypeId="16" PostId="524" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4087" PostHistoryTypeId="16" PostId="525" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4088" PostHistoryTypeId="16" PostId="935" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4089" PostHistoryTypeId="16" PostId="936" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4091" PostHistoryTypeId="16" PostId="1854" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4092" PostHistoryTypeId="16" PostId="2096" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4093" PostHistoryTypeId="16" PostId="2119" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4094" PostHistoryTypeId="16" PostId="2151" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4095" PostHistoryTypeId="16" PostId="372" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-04T14:25:47.873" UserId="14" />
  <row Id="4096" PostHistoryTypeId="5" PostId="1520" RevisionGUID="495d390b-fdd6-44e7-b95f-0ace2b1ca21d" CreationDate="2010-08-04T14:36:30.190" UserId="14" Comment="deleted 7 characters in body" Text="Most online games suffer for this problem and there are some [software companies][1] out there to cover this but recently from what i've seen most companies are trying to avoid those programs creating their own system (blizzard with warden, aion with their own checking, etc...) but it is a very difficult case to prevent such ...&#xD;&#xA;&#xD;&#xA;Just wanted to say i made another question topic as community wiki specific for posting applications and it is features and the ideas behind THIS question here is not to list those but instead to know more about what were your attempts, issues along the road and possible solutions, piece of codes if application and so forth.&#xD;&#xA;&#xD;&#xA;**What sort of protection do you guys use in order to (try to) prevent such acts:**&#xD;&#xA;&#xD;&#xA; 1. **Anti-cheat Software ?** (please state which, why and possible problems you faced, for example aion stopped using GameGuard at beta stage due to a huge amount of compatibility problems and complains from their users)&#xD;&#xA; 2. **Your own code ?** (what sort of verification do you usually run to make sure of the bad-faith players, for example speedhack, verify new location against speed+last location, etc...)&#xD;&#xA; 3. **None, i dont care ?** (any personal reason or input you did like to share ?)&#xD;&#xA;&#xD;&#xA;Any interesting piece of code related to the issue you would like to post ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Feel free to rework my text my english inst that great  ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1528/list-of-known-game-security-solutions-to-protect-games-from-hacks" />
  <row Id="4097" PostHistoryTypeId="2" PostId="2161" RevisionGUID="68e6578a-8c95-4195-aaf6-365439e9ddd1" CreationDate="2010-08-04T14:43:04.173" UserId="1370" Text="I'm trying to make a WPF-3D game. WPF uses XAML.&#xD;&#xA;&#xD;&#xA;I'm trying to find [free 3D assets from the internet][1]. :-)&#xD;&#xA;&#xD;&#xA;What format of 3D models I should be looking for, direct XAML or 3D Studio format or what?&#xD;&#xA;I know that there are some 3D Studio format to XAML -converters, but I don't know if they really work...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/624/where-should-i-go-looking-for-low-poly-3d-assets" />
  <row Id="4098" PostHistoryTypeId="1" PostId="2161" RevisionGUID="68e6578a-8c95-4195-aaf6-365439e9ddd1" CreationDate="2010-08-04T14:43:04.173" UserId="1370" Text="3D meshes for WPF (XAML)?" />
  <row Id="4099" PostHistoryTypeId="3" PostId="2161" RevisionGUID="68e6578a-8c95-4195-aaf6-365439e9ddd1" CreationDate="2010-08-04T14:43:04.173" UserId="1370" Text="&lt;3d-meshes&gt;" />
  <row Id="4100" PostHistoryTypeId="2" PostId="2162" RevisionGUID="d949c7db-cfa0-483c-aebb-d2aec47afc7a" CreationDate="2010-08-04T14:43:36.043" UserId="1091" Text="I think I agree that normalised co-ordinates don't really map well to UI stuff.&#xD;&#xA;&#xD;&#xA;What I typically do for 2D layouts, is basically your &quot;virtual&quot; co-ordinate space, but I pick a space which maps 1:1 with my prefered target resolution (1280x720, for example). It's not fixed, but it's intuitive to deal with and I know that in 90% of cases it'll look just right. Obviously it's important not to get complacent, and to actually *check* different resolutions often.&#xD;&#xA;&#xD;&#xA;For crispness when remapping resolutions, I'd borrow some tips from font-rendering, and provide hinting information. So make sure that things which need to be continuous are tagged in some way, while also performing rounding to exact pixels where crisp alignment is necessary.&#xD;&#xA;&#xD;&#xA;Perhaps also consider making things more relative. So rather than everything being &quot;position object 1 at absolute X,Y&quot;, you could specify &quot;position bottom left of object 2 at some offset from bottom right of object 1&quot;. It's easier then to rescale and/or move things about, without losing important relationships.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4101" PostHistoryTypeId="2" PostId="2163" RevisionGUID="4ee38ea7-57ab-4a5f-989a-582e7d9c7945" CreationDate="2010-08-04T14:51:17.883" UserId="1206" Text="I know that this does not really answer you question, but bear with me:&#xD;&#xA;&#xD;&#xA;Why not (pretty much) every format?&#xD;&#xA;&#xD;&#xA;Use Assimp:&#xD;&#xA;http://assimp.sourceforge.net/index.html&#xD;&#xA;&#xD;&#xA;There's examples of loaders using DirectX - I found one here:&#xD;&#xA;http://bsxengine.codeplex.com/&#xD;&#xA;&#xD;&#xA;In addition to the Assimp Viewer shipped with the Assimp project.&#xD;&#xA;&#xD;&#xA;That should get you started using all the formats Assimp supports:&#xD;&#xA;http://assimp.sourceforge.net/main_features_formats.html&#xD;&#xA;&#xD;&#xA;It's probably possible to serialise the meshes as XAML - I bet there's code for that out there..&#xD;&#xA;" />
  <row Id="4102" PostHistoryTypeId="2" PostId="2164" RevisionGUID="adc6c368-5ea1-4806-bc63-3f6a13158fca" CreationDate="2010-08-04T14:59:13.393" UserId="255" Text="I haven't actually tried this, but I've always wondered if an approach such as light propagation volumes could be used for audio.&#xD;&#xA;In light propagation volumes a small 3d texture is used (32x32x32 I believe) in which light bounces and occlusions are simulated by flood filling the 3d texture.&#xD;&#xA;Since it uses spherical harmonics, it might be able to do this with audio as well.&#xD;&#xA;I'm not an audio expert however" />
  <row Id="4103" PostHistoryTypeId="2" PostId="2165" RevisionGUID="82eac21a-e1e6-47ba-9f0f-a13dfa2303af" CreationDate="2010-08-04T15:34:00.770" UserId="189" Text="It totally depends on what type of GUI you have, but often games have things anchored along the edges of the screen and in corners, and then they might have a box in the middle of the screen for a modal dialog or something.&#xD;&#xA;&#xD;&#xA;If that's the case for you, then might I suggest using a scheme where you specify an anchor and an offset (x,y)? This would be similar to Java's [BorderLayout][1] (but maybe with the four corners, four middles of edges, and one center of screen). So for example, you could specify an offset of (0,0) from the top-left corner; then the element would be anchored exactly in the corner of the screen. And then no matter what resolution, aspect ratio, etc., you would have the health indicator in the corner of the screen. But then if you anchor an element to the top right corner, the element would naturally be anchored relative to its top right point (instead of top left), so again it would be automatically anchored to the corner of the screen no matter the resolution.&#xD;&#xA;&#xD;&#xA;I definitely recommend against normalized 0.0-1.0 coordinates; these could vary based on floating-point accuracy. GUIs should be mapped to pixels, unless you have a 3D GUI.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download-llnw.oracle.com/javase/tutorial/uiswing/layout/border.html" />
  <row Id="4104" PostHistoryTypeId="2" PostId="2166" RevisionGUID="dacadf88-b865-46e1-9889-dfe350145610" CreationDate="2010-08-04T15:40:12.657" UserId="1403" Text="To give a bit of background, I'm developing an MMO in the web browser. Crazy? Yes, but it certainly isn't impossible. The server sends updates to the client by means of long-polling JSONp tags which are opened in advance and marked for updates to be sent at a certain timestamp.&#xD;&#xA;&#xD;&#xA;The problem is that you simply can't pump too much information into a browser. At some point, there's a barrier as to both the speed and quantity of information that you can send, so I'm looking to implement some type of system that would allow the server to send periodic updates of remote users' positions rather than &quot;realtime&quot; updates. Is there any reliable way of doing this without shooting myself in the foot?&#xD;&#xA;&#xD;&#xA;I've read about a heuristics technique that analyzes the motion of a player over time to generate a function which could be used to simulate the player's pathfinding &quot;technique&quot;. This would then be used to interpolate the position of the remote player between updates. Any thoughts on this or another technique I could use?" />
  <row Id="4105" PostHistoryTypeId="1" PostId="2166" RevisionGUID="dacadf88-b865-46e1-9889-dfe350145610" CreationDate="2010-08-04T15:40:12.657" UserId="1403" Text="MMO Performance" />
  <row Id="4106" PostHistoryTypeId="3" PostId="2166" RevisionGUID="dacadf88-b865-46e1-9889-dfe350145610" CreationDate="2010-08-04T15:40:12.657" UserId="1403" Text="&lt;mmo&gt;&lt;performance&gt;" />
  <row Id="4107" PostHistoryTypeId="2" PostId="2167" RevisionGUID="0278d6b3-55ab-4c4d-93bd-7c504fcca986" CreationDate="2010-08-04T15:46:14.867" UserId="136" Text="I would recommend avoiding XAML for 3D models if you can.  In its typical Xml form, Xaml benefits from being human readable but suffers from slow load times.  This is generally true for all plain text formats that require parsing and reflection.  I suggest you look for libraries that can convert common 3D formats into WPF3D format at runtime.  Alternatively, you could use Baml or a custom binary Xaml format.  The latter is possible in .NET 4 due to the refined Xaml object model and extensible reader/writer facilities.&#xD;&#xA;&#xD;&#xA;Loading and rendering 3D models in WPF should be relatively painless.  Textures, on the other hand, may be more problematic.  WPF3D's support for 3D surfaces/textures is relatively simple, and you may end up having to rework a lot of textures if you rely on free 3D assets from the Internet." />
  <row Id="4108" PostHistoryTypeId="2" PostId="2168" RevisionGUID="62896c04-8155-4dab-a54a-611e03cf0b9f" CreationDate="2010-08-04T16:07:33.450" UserId="458" Text="AI.implant (Licensed)&#xD;&#xA;http://www.presagis.com/products_services/products/ms/simulation/aiimplant/#&#xD;&#xA;&#xD;&#xA;No idea if it's any good, I just remember getting some brochures from them at GDC a few years back, and it appears they're still around." />
  <row Id="4109" PostHistoryTypeId="16" PostId="2168" RevisionGUID="62896c04-8155-4dab-a54a-611e03cf0b9f" CreationDate="2010-08-04T16:07:33.450" UserId="-1" />
  <row Id="4110" PostHistoryTypeId="2" PostId="2169" RevisionGUID="a07d168e-eff2-4269-ad13-e681c709d73a" CreationDate="2010-08-04T16:30:32.663" UserId="1091" Text="There is another option. You could frame for an intermediate ratio, and do both cropping and expanding (or bordering) on both normal resolutions.&#xD;&#xA;&#xD;&#xA;I believe TV filming is framed in this way, such that widescreen looks ok (everyone isn't crowded into the middle of the scene), whereas cropping for 4:3 isn't quite as drastic and there's minimal panning.&#xD;&#xA;" />
  <row Id="4111" PostHistoryTypeId="2" PostId="2170" RevisionGUID="9a5de07d-0206-4bdb-91e6-a7cff3be8def" CreationDate="2010-08-04T16:34:40.160" UserId="354" Text="I'm making a somewhat simple side-scroller in Flash. The way I'm currently doing the really basic physics(you don't fall through floors/can't walk through walls) is that I have a big symbol of all the walls/floor/ceiling and use some complex hit testing against that.&#xD;&#xA;&#xD;&#xA;Basically, if you are moving down when you hit, move you up til you're out, moving left move right, etc. If you're moving diagonally you'll move diagonally out and then move over the direction that didn't get you out until you hit something or get lined up. Then I move you down one so you're touching the floor since I have you fall down 20 pixels if you're in the air, and that make it slow since it has to do 20 hit tests every frame.&#xD;&#xA;Here's the code I use:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;    public function onEnterFrame(e:Event){&#xD;&#xA;            hitTests = 0;&#xD;&#xA;            trace(&quot;x:&quot;+x+&quot;, y: &quot;+y);&#xD;&#xA;            if(!game.main.Paused) {&#xD;&#xA;                if(!HitTest.complexHitTestObject(this, room.main.currentRoom.edge, 1)) {&#xD;&#xA;                    hitTests++;&#xD;&#xA;                    movementY += 10;&#xD;&#xA;//                    trace(&quot;movY: &quot;+(movementY-20)+&quot; &gt; &quot;+movementY);&#xD;&#xA;                }&#xD;&#xA;                if(game.main.Ahit) {&#xD;&#xA;                    movementX -= 5;&#xD;&#xA;                }&#xD;&#xA;                if(game.main.Dhit) {&#xD;&#xA;                    movementX += 5;&#xD;&#xA;                }&#xD;&#xA;                x += movementX;&#xD;&#xA;                y += movementY;&#xD;&#xA;//                trace((y-movementY)+&quot; + &quot;+movementY+&quot; = &quot;+y);&#xD;&#xA;                if(HitTest.complexHitTestObject(this, room.main.currentRoom.edge, 1)) {&#xD;&#xA;                    hitTests++;&#xD;&#xA;                    dynamicXnum = 0;&#xD;&#xA;                    dynamicYnum = 0;&#xD;&#xA;                    free4floor = true;&#xD;&#xA;                    while(HitTest.complexHitTestObject(this, room.main.currentRoom.edge, 1)) {&#xD;&#xA;                        hitTests++;&#xD;&#xA;                        if(movementX == 0 &amp;&amp; movementY == 0) {&#xD;&#xA;                            break;&#xD;&#xA;                            xlast = undefined;&#xD;&#xA;                        }&#xD;&#xA;                        if(movementX &gt; 0) {&#xD;&#xA;                            x--;&#xD;&#xA;                            dynamicXnum--;&#xD;&#xA;                        }&#xD;&#xA;                        if(movementX &lt; 0) {&#xD;&#xA;                            x++;&#xD;&#xA;                            dynamicXnum++;&#xD;&#xA;                        }&#xD;&#xA;                        xlast = true;&#xD;&#xA;                        hitTests++;&#xD;&#xA;                        if(!HitTest.complexHitTestObject(this, room.main.currentRoom.edge, 1))&#xD;&#xA;                            break;&#xD;&#xA;                        if(movementY &gt; 0 || free4floor) {&#xD;&#xA;                            y--;&#xD;&#xA;                            dynamicYnum--;&#xD;&#xA;                            free4floor = false;&#xD;&#xA;                        }&#xD;&#xA;                        if(movementY &lt; 0) {&#xD;&#xA;                            y++;&#xD;&#xA;                            dynamicYnum++;&#xD;&#xA;                        }&#xD;&#xA;                        xlast = false;&#xD;&#xA;                    }&#xD;&#xA;                    trace(&quot;mid: x:&quot;+x+&quot;, y: &quot;+y);&#xD;&#xA;                    trace(&quot;mid: dxn:&quot;+dynamicXnum+&quot;, dyn: &quot;+dynamicYnum);&#xD;&#xA;                    trace(&quot;mid: movx:&quot;+movementX+&quot;, movy: &quot;+movementY);&#xD;&#xA;                    if(xlast) {&#xD;&#xA;                        movementX = 0;&#xD;&#xA;                        while(!HitTest.complexHitTestObject(this, room.main.currentRoom.edge, 1) &amp;&amp; dynamicYnum != 0) {&#xD;&#xA;                            hitTests++;&#xD;&#xA;                            if(dynamicYnum &lt; 0) {&#xD;&#xA;                                y++;&#xD;&#xA;                                dynamicYnum++;&#xD;&#xA;                            }&#xD;&#xA;                            else if(dynamicYnum &gt; 0) {&#xD;&#xA;                                y--;&#xD;&#xA;                                dynamicYnum--;&#xD;&#xA;                            }&#xD;&#xA;                            else {&#xD;&#xA;                                break;&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    if(xlast == false) {&#xD;&#xA;                        while(!HitTest.complexHitTestObject(this, room.main.currentRoom.edge, 1) &amp;&amp; dynamicXnum != 0) {&#xD;&#xA;                            hitTests++;&#xD;&#xA;                            if(dynamicXnum &lt; 0) {&#xD;&#xA;                                x++;&#xD;&#xA;                                dynamicXnum++;&#xD;&#xA;                            }&#xD;&#xA;                            else if(dynamicXnum &gt; 0) {&#xD;&#xA;                                x--;&#xD;&#xA;                                dynamicXnum--;&#xD;&#xA;                            }&#xD;&#xA;                            else {&#xD;&#xA;                                break;&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                        if(movementX &gt; 0)&#xD;&#xA;                            x--;&#xD;&#xA;                        if(movementX &lt; 0)&#xD;&#xA;                            x++;&#xD;&#xA;                        if(movementY &gt; 0 || movementX != 0)&#xD;&#xA;                            y++;&#xD;&#xA;                        movementY = 0;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                if(movementX &gt;= 5) {&#xD;&#xA;                    movementX -= 5;&#xD;&#xA;                }&#xD;&#xA;                else if(movementX &lt;= -5) {&#xD;&#xA;                    movementX += 5;&#xD;&#xA;                }&#xD;&#xA;                else {&#xD;&#xA;                    movementX = 0;&#xD;&#xA;                }&#xD;&#xA;            if(hitTests &gt; maxHitTests)&#xD;&#xA;                maxHitTests = hitTests;&#xD;&#xA;            trace(&quot;end: x:&quot;+x+&quot;, y: &quot;+y);&#xD;&#xA;            trace(&quot;hts: &quot;+hitTests)&#xD;&#xA;            trace(&quot;mhts: &quot;+maxHitTests);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;This is working okay for now, and you can see a demo of it [here][2], but there are a couple of problems.&#xD;&#xA;&#xD;&#xA;For one, it can get a little slow, but this isn't that big of a problem, since it's pretty rare, and it's not that slow. Mainly, it's that when I get around to animating the little dude, and even now sometimes when it messes up a bit, it will get more than five pixels in the wall. Then when I try to move out, it won't make it out in one frame, and it will force him through the wall the wrong way, making him fall into infinity...does anyone know how to fix this? Should I totally redo how I do it? Should I have some kind of variable for which way he came from? If so, how should I do it?&#xD;&#xA;&#xD;&#xA;  [2]: http://ullallulloo.webs.com/dilazmor/Escape%20From%20Dilazmor.html" />
  <row Id="4112" PostHistoryTypeId="1" PostId="2170" RevisionGUID="9a5de07d-0206-4bdb-91e6-a7cff3be8def" CreationDate="2010-08-04T16:34:40.160" UserId="354" Text="Good way to implement really basic physics in Flash?" />
  <row Id="4113" PostHistoryTypeId="3" PostId="2170" RevisionGUID="9a5de07d-0206-4bdb-91e6-a7cff3be8def" CreationDate="2010-08-04T16:34:40.160" UserId="354" Text="&lt;flash&gt;&lt;2d-physics&gt;" />
  <row Id="4114" PostHistoryTypeId="6" PostId="2070" RevisionGUID="0276f019-f779-470c-af30-19e3750c5e92" CreationDate="2010-08-04T16:38:11.327" UserId="8" Comment="edited tags" Text="&lt;iphone&gt;&lt;objective-c&gt;&lt;cocos2d&gt;" />
  <row Id="4115" PostHistoryTypeId="2" PostId="2171" RevisionGUID="2b819dae-f476-465d-9a7b-792e6ecc752d" CreationDate="2010-08-04T16:51:27.723" UserId="370" Text="[CEGUI][1]'s coordinate system seems really well thought out.  It's [unified coordinate system][2] blends absolute positioning with relative positioning.  You can specify locations like:&#xD;&#xA;&#xD;&#xA; * in the middle of the screen&#xD;&#xA; * five pixels to the left of the right edge&#xD;&#xA; * both widgets in the middle but separated by 10 pixels&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cegui.org.uk/&#xD;&#xA;  [2]: http://cegui.org.uk/api_reference/fal_intro.html#fal_unifiedsystem" />
  <row Id="4118" PostHistoryTypeId="2" PostId="2173" RevisionGUID="7f559725-7f9c-43cd-b5ed-7d1c4b129305" CreationDate="2010-08-04T16:59:10.180" UserId="395" Text="Motion prediction is used by pretty much every online game these days, but it usually operates with an expected sync cycle of 100ms or less. Are you sure you can keep that kind of data rate without maxing out the browser? If you search for &quot;motion prediction&quot; you can find a lot of information, but assuming this is a 2D game the concept is simple enough (store a moving buffer of the last X positions, extrapolate next position). There is some complexity when you start dealing with how to move players that are out of sync from where the server thinks they should be (read: rubberbanding), but you can probably just ignore that for now." />
  <row Id="4119" PostHistoryTypeId="2" PostId="2174" RevisionGUID="20d74486-aa6e-4a2f-b5b9-63895c4d571f" CreationDate="2010-08-04T17:00:50.130" UserId="1180" Text="I think that the interpolation idea will not be useful to you. If your game is supposed to have realtime interaction between players, any delays in transmitting player actions would seriously damage the realtime aspect. If the game does not have realtime interaction, the periodic transmissions should be sufficient for any important events in the game." />
  <row Id="4120" PostHistoryTypeId="2" PostId="2175" RevisionGUID="9f011c2d-309b-4b9d-973b-16993e178ef8" CreationDate="2010-08-04T17:02:50.517" UserId="458" Text="A lot depends on the kind of game and the situation. For quick-and-dirty prototypes, I prefer to plan out the UI on graph paper, write down a list of numeric coordinates for a fixed window size, and hardcode everything -- it's easier and faster for me. But for a &quot;real&quot; project where you'd want resizable windows or alternate screen resolutions, that would obviously not be ideal, and some kind of solution that allows for scaling in both directions would be better." />
  <row Id="4121" PostHistoryTypeId="2" PostId="2176" RevisionGUID="394ad7db-291a-4a9a-b43d-d8be00cab446" CreationDate="2010-08-04T17:03:54.977" UserId="55" Text="Have you thought about using a good API to help you with your flash development?&#xD;&#xA;&#xD;&#xA;Take a look at Flixel and Box2D.&#xD;&#xA;&#xD;&#xA; - [Flixel Site][1]&#xD;&#xA; - [Box2D Flash][2]&#xD;&#xA; - [Collision Information 1][3]&#xD;&#xA; - [Collision Information 2][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org/&#xD;&#xA;  [2]: http://www.box2dflash.org/&#xD;&#xA;  [3]: http://flashgamedojo.com/wiki/index.php?title=Collision_%28Flixel%29&#xD;&#xA;  [4]: http://flashgamedojo.com/wiki/index.php?title=Collision_Checking_%28FlashPunk%29" />
  <row Id="4122" PostHistoryTypeId="5" PostId="2171" RevisionGUID="5f282482-622f-47ad-b520-1e6d2ad9c397" CreationDate="2010-08-04T17:08:30.443" UserId="370" Comment="added 84 characters in body" Text="[CEGUI][1]'s coordinate system seems really well thought out.  It's [unified coordinate system][2] blends absolute positioning with relative positioning.  You can specify locations like:&#xD;&#xA;&#xD;&#xA; * in the middle of the screen  &#xD;&#xA;`UDim(0.5,0)`&#xD;&#xA; * five pixels to the left of the right edge  &#xD;&#xA;`UDim(1.0,-5)`&#xD;&#xA; * both widgets in the middle but separated by 10 pixels  &#xD;&#xA;`HA_RIGHT,UDim(0.5,-5)   HA_LEFT,UDim(0.5,5)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cegui.org.uk/&#xD;&#xA;  [2]: http://cegui.org.uk/api_reference/fal_intro.html#fal_unifiedsystem" />
  <row Id="4123" PostHistoryTypeId="2" PostId="2177" RevisionGUID="79a2f9b5-9711-4679-8289-21af8d6a06df" CreationDate="2010-08-04T17:11:29.707" UserId="1262" Text="Also, if you really want to understand... I highly recommend MetaNet's tutorial series:&#xD;&#xA;&#xD;&#xA;http://www.metanetsoftware.com/technique/tutorialA.html&#xD;&#xA;&#xD;&#xA;(This tutorial includes an example -- with source from N!  N had excellent and speedy physics.)&#xD;&#xA;&#xD;&#xA;They go over way MORE than what you need, but DO go over what you need rather well." />
  <row Id="4124" PostHistoryTypeId="2" PostId="2178" RevisionGUID="adef13dc-92b4-44c5-9651-1d7755de9ff3" CreationDate="2010-08-04T17:13:56.567" UserId="55" Text="I have no experience in this domain, but I've seen something that may be useful. If you know, or anyone else knows about this feel free to elaborate on it. A buddy of mine pointed me to this when I was talking about creating a multiplayer web-based game.&#xD;&#xA;&#xD;&#xA;http://www.ape-project.org/" />
  <row Id="4125" PostHistoryTypeId="5" PostId="2171" RevisionGUID="029f9416-f6bb-4e69-b08e-d2e25c0aba7e" CreationDate="2010-08-04T17:21:23.437" UserId="370" Comment="deleted 1 characters in body" Text="[CEGUI][1]'s coordinate system seems really well thought out.  It's [unified coordinate system][2] blends absolute positioning with relative positioning.  You can specify locations like:&#xD;&#xA;&#xD;&#xA; * in the middle of the screen  &#xD;&#xA;`UDim(0.5,0)`&#xD;&#xA; * five pixels to the left of the right edge  &#xD;&#xA;`UDim(1.0,-5)`&#xD;&#xA; * two widgets in the middle but separated by 10 pixels  &#xD;&#xA;`HA_RIGHT,UDim(0.5,-5)   HA_LEFT,UDim(0.5,5)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cegui.org.uk/&#xD;&#xA;  [2]: http://cegui.org.uk/api_reference/fal_intro.html#fal_unifiedsystem" />
  <row Id="4126" PostHistoryTypeId="2" PostId="2179" RevisionGUID="e8fd24e6-544f-4c8f-bb8a-6e582c322c29" CreationDate="2010-08-04T17:27:02.897" UserId="1206" Text="Havok AI (Commercial - not cheap)&#xD;&#xA;&#xD;&#xA;Havok is pretty good at physics, and has been offering behaviour, animation and other kinds of middleware for a while now.&#xD;&#xA;&#xD;&#xA;Physics and AI is not easy to get to cooperate, especially animations, so save yourself some time and use Havok.&#xD;&#xA;&#xD;&#xA;Highly recommended. :)&#xD;&#xA;&#xD;&#xA;If you can afford it.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;Industry strength quality, proven technology.&#xD;&#xA;Makes AI and Physics cooperate.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;Steep Price." />
  <row Id="4127" PostHistoryTypeId="16" PostId="2179" RevisionGUID="e8fd24e6-544f-4c8f-bb8a-6e582c322c29" CreationDate="2010-08-04T17:27:02.897" UserId="-1" />
  <row Id="4128" PostHistoryTypeId="2" PostId="2180" RevisionGUID="fe7cab6b-5af4-4690-a935-81005933c7f7" CreationDate="2010-08-04T17:39:33.313" UserId="1095" Text="I'm benchmarking some simple code for drawing using OpenGL. &#xD;&#xA;&#xD;&#xA;In the following code, the number of indices being drawn is 4,644 (or 1,548 triangles per frame = @60fps 92,880 Triangles per second). &#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_PROJECTION);						&#xD;&#xA;    glLoadIdentity();									&#xD;&#xA;    glOrtho(0, screenSize.width, screenSize.height, 0, 0, 1);&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);							&#xD;&#xA;    glLoadIdentity();									&#xD;&#xA;    glDisable(GL_DEPTH_TEST);&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;    glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;    glEnableClientState(GL_COLOR_ARRAY);&#xD;&#xA;    glEnableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    &#xD;&#xA;    glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(venomGLAttribute), ,drawingTexturedList.attrib[0].color);&#xD;&#xA;    glVertexPointer(2, GL_SHORT, sizeof(venomGLAttribute), &amp;drawingTexturedList.attrib[0].pos[0]);&#xD;&#xA;    glTexCoordPointer(2, GL_FLOAT, sizeof(venomGLAttribute), &amp;drawingTexturedList.attrib[0].UV[0]);&#xD;&#xA;    glDrawElements(GL_TRIANGLES, drawingTexturedList[cnt].currentIndice /*4644*/, GL_UNSIGNED_INT, drawingTexturedList[cnt].Indices);&#xD;&#xA;&#xD;&#xA;This takes 100% of one of my CPU's. If I take out the call to glDrawElements but still perform all the other steps (geometry preperation, gl*Pointer setup) I see my CPU stay at ~3%.&#xD;&#xA;&#xD;&#xA;Is this expected behaviour? The machine I'm running on has a GeForce 8800GTX and a Dual Core @ 2.66Ghz.&#xD;&#xA;&#xD;&#xA;Using fps as a measurement (which isn't perfect I realise) and using gDEBugger to confirm my findings, rendering 27,904 triangles a frame in a single call to glDrawElements brings my frame rate down to ~35fps (or 977,640 triangles a second).&#xD;&#xA;&#xD;&#xA;Is there a better way to pack my data than I'm doing or perhaps a better way to send the data than glDrawElements? I don't think using a VBO will help as the data being sent changes every frame.&#xD;&#xA;&#xD;&#xA;Any idea's would be appreciated!" />
  <row Id="4129" PostHistoryTypeId="1" PostId="2180" RevisionGUID="fe7cab6b-5af4-4690-a935-81005933c7f7" CreationDate="2010-08-04T17:39:33.313" UserId="1095" Text="Expected OpenGL performance." />
  <row Id="4130" PostHistoryTypeId="3" PostId="2180" RevisionGUID="fe7cab6b-5af4-4690-a935-81005933c7f7" CreationDate="2010-08-04T17:39:33.313" UserId="1095" Text="&lt;opengl&gt;&lt;performance&gt;" />
  <row Id="4131" PostHistoryTypeId="2" PostId="2181" RevisionGUID="a7cb0f06-834c-45c2-9b41-07db1b6270c2" CreationDate="2010-08-04T17:44:31.230" UserId="189" Text="Have you tried simply reducing the size of the array, and seeing if it makes a difference? I have a feeling you are getting a false positive; by taking out the ONLY draw call, I think you are affecting OpenGL more significantly and I'm pretty sure if you replace it with an easier call you'll still see 100% CPU.&#xD;&#xA;&#xD;&#xA;If that is the case, then you need to make sure you are sleeping in each iteration of the game loop, or enable vsync. If you don't sleep and just have a tight draw loop then you will naturally take up 100% of one CPU, but if you just add a sleep(0) call it should reduce to ~0% CPU.&#xD;&#xA;&#xD;&#xA;Or I could be totally wrong; if that's the case, I apologize in advance." />
  <row Id="4134" PostHistoryTypeId="5" PostId="2168" RevisionGUID="5ab28118-0f32-48c8-b34e-3d0327893686" CreationDate="2010-08-04T17:48:43.050" UserId="14" Comment="added 2 characters in body" Text="AI.implant (Licensed)&#xD;&#xA;&#xD;&#xA;http://www.presagis.com/products_services/products/ms/simulation/aiimplant/#&#xD;&#xA;&#xD;&#xA;No idea if it's any good, I just remember getting some brochures from them at GDC a few years back, and it appears they're still around." />
  <row Id="4135" PostHistoryTypeId="2" PostId="2182" RevisionGUID="80d01713-6ac4-4f38-a9bd-0e19a21d3ad1" CreationDate="2010-08-04T18:17:25.883" UserId="1419" Text="There also MicroPather - an open source path finding library from the same guy who made TinyXML.&#xD;&#xA;&#xD;&#xA;[http://www.grinninglizard.com/MicroPather/index.htm][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.grinninglizard.com/MicroPather/index.htm" />
  <row Id="4136" PostHistoryTypeId="16" PostId="2182" RevisionGUID="80d01713-6ac4-4f38-a9bd-0e19a21d3ad1" CreationDate="2010-08-04T18:17:25.883" UserId="-1" />
  <row Id="4139" PostHistoryTypeId="5" PostId="2029" RevisionGUID="11978619-5a76-4397-a9fe-9539fbf64131" CreationDate="2010-08-04T18:30:20.353" UserId="51" Comment="nevermind, doesn't seem to work" Text="Simple enough question: What math should all game programmers have a firm grasp of in order to be successful?&#xD;&#xA;&#xD;&#xA;I'm not specifically talking about rendering math or anything in the niche areas of game programming, more specifically just things that even game programmers should know about, and if they don't they'll probably find it useful.&#xD;&#xA;&#xD;&#xA;*Note:* as there is *no one correct answer*, this question (and its answers) is a community wiki." />
  <row Id="4140" PostHistoryTypeId="5" PostId="2068" RevisionGUID="52350d6a-19b7-4af9-a730-d019335ee98b" CreationDate="2010-08-04T18:36:59.043" UserId="189" Comment="English wikipedia link" Text="I'm surprised that no one mentioned [Quaternions][1]. I don't have a lot of experience with different engines but at least JME uses it everywhere and I got the impression that they're a pretty important concept.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quaternion" />
  <row Id="4141" PostHistoryTypeId="8" PostId="2035" RevisionGUID="3028d19e-fe2f-4160-b922-be203c3da53b" CreationDate="2010-08-04T19:04:33.467" UserId="395" Comment="Rollback to [54d2a927-a553-430f-a21a-f33447ac1650]" Text="A firm grasp of +, -, *, and /.  &#xD;&#xA;Without them, you're completely screwed." />
  <row Id="4142" PostHistoryTypeId="2" PostId="2184" RevisionGUID="cb0cb22b-0fe6-4467-b7fc-17d0cea68632" CreationDate="2010-08-04T19:05:27.600" UserId="309" Text="I've read a lot about the benefits of organizing data into 'Structs of Arrays' (SoA) instead of the typical 'Array of Structs' (AoS) to get better throughput when using SIMD instructions. While the 'why' makes total sense to me, I'm not sure *how much* to do this when working with things like vectors.&#xD;&#xA;&#xD;&#xA;Vectors themselves can be tought of as a struct of a (fixed size) array of data, so you could convert an array of these into a struct of X, Y and Z arrays. Through this, you can work on 4 vectors at once as opposed to one at a time.&#xD;&#xA;&#xD;&#xA;Now, for the specific reason I'm posting this on GameDev:&#xD;&#xA;&#xD;&#xA;Does this make sense for working with vectors on the SPU? More specifically, does it make sense to DMA multiple arrays just for a single vector? Or would it be better to stick with DMAing the array of Vectors and unrolling them into the different components to work with?&#xD;&#xA;&#xD;&#xA;I could see the benefit of cutting out the unrolling (if you did it 'AoS'), but it seems like you could quickly run out of DMA channels if you took this route and were working with multiple sets of vectors at once.&#xD;&#xA;&#xD;&#xA;(Note: no professional experience with Cell yet, but have been toying around in OtherOS for a while)&#xD;&#xA;&#xD;&#xA;(PS: Can someone create some new tags for this post)" />
  <row Id="4143" PostHistoryTypeId="1" PostId="2184" RevisionGUID="cb0cb22b-0fe6-4467-b7fc-17d0cea68632" CreationDate="2010-08-04T19:05:27.600" UserId="309" Text="SoA Vectors on SPU" />
  <row Id="4144" PostHistoryTypeId="3" PostId="2184" RevisionGUID="cb0cb22b-0fe6-4467-b7fc-17d0cea68632" CreationDate="2010-08-04T19:05:27.600" UserId="309" Text="&lt;programming&gt;" />
  <row Id="4145" PostHistoryTypeId="6" PostId="2184" RevisionGUID="16c4bf8c-507b-40d6-84de-e3f1d442c02c" CreationDate="2010-08-04T19:15:10.747" UserId="395" Comment="Retag; deleted 56 characters in body" Text="&lt;programming&gt;&lt;algorithm&gt;&lt;playstation3&gt;" />
  <row Id="4146" PostHistoryTypeId="5" PostId="2184" RevisionGUID="16c4bf8c-507b-40d6-84de-e3f1d442c02c" CreationDate="2010-08-04T19:15:10.747" UserId="395" Comment="Retag; deleted 56 characters in body" Text="I've read a lot about the benefits of organizing data into 'Structs of Arrays' (SoA) instead of the typical 'Array of Structs' (AoS) to get better throughput when using SIMD instructions. While the 'why' makes total sense to me, I'm not sure *how much* to do this when working with things like vectors.&#xD;&#xA;&#xD;&#xA;Vectors themselves can be tought of as a struct of a (fixed size) array of data, so you could convert an array of these into a struct of X, Y and Z arrays. Through this, you can work on 4 vectors at once as opposed to one at a time.&#xD;&#xA;&#xD;&#xA;Now, for the specific reason I'm posting this on GameDev:&#xD;&#xA;&#xD;&#xA;Does this make sense for working with vectors on the SPU? More specifically, does it make sense to DMA multiple arrays just for a single vector? Or would it be better to stick with DMAing the array of Vectors and unrolling them into the different components to work with?&#xD;&#xA;&#xD;&#xA;I could see the benefit of cutting out the unrolling (if you did it 'AoS'), but it seems like you could quickly run out of DMA channels if you took this route and were working with multiple sets of vectors at once.&#xD;&#xA;&#xD;&#xA;(Note: no professional experience with Cell yet, but have been toying around in OtherOS for a while)" />
  <row Id="4147" PostHistoryTypeId="2" PostId="2185" RevisionGUID="639b57a9-14ec-4994-a6e0-68f98f0da6a3" CreationDate="2010-08-04T19:21:44.977" UserId="1156" Text="I've seen many a time in source code, things like this [well, this is more of a pseudo C++ idea of mine]  &#xD;&#xA;&lt;code&gt;type defshared_ptr&lt;Resource&gt; ResourcePtr;// for ease  &#xD;&#xA;ResourcePtr sound1 = resourceManager.Get&lt;SoundResource&gt;(&quot;boom.ogg&quot;);  &#xD;&#xA;sound1-&gt;Play();  &#xD;&#xA;ResourcePtr sprite = resourceManager.Get&lt;Image&gt;(&quot;sprite.png&quot;);&#xD;&#xA;&lt;/code&gt;  &#xD;&#xA;&#xD;&#xA;I was just wondering how useful a class like this was, something that:&#xD;&#xA;&#xD;&#xA; - Loaded media files&#xD;&#xA; - Stored them in memory&#xD;&#xA; - Did this at the start of a level - loading screen.&#xD;&#xA; - Cleaned up  &#xD;&#xA;&#xD;&#xA;Rather than having a system of:&#xD;&#xA;&#xD;&#xA; - Resources are held by entities only, or loose.&#xD;&#xA; - Responsible for own load into memory.&#xD;&#xA;&#xD;&#xA;The first is a 'manager' as such; something I feel indicates it's wrong to use. However, it allows for something like a vector of resource names to be passed, rather than having to scramble around finding everything that needs to be loaded." />
  <row Id="4148" PostHistoryTypeId="1" PostId="2185" RevisionGUID="639b57a9-14ec-4994-a6e0-68f98f0da6a3" CreationDate="2010-08-04T19:21:44.977" UserId="1156" Text="Resource Managers - Are they any good?" />
  <row Id="4149" PostHistoryTypeId="3" PostId="2185" RevisionGUID="639b57a9-14ec-4994-a6e0-68f98f0da6a3" CreationDate="2010-08-04T19:21:44.977" UserId="1156" Text="&lt;game-design&gt;&lt;language-agnostic&gt;&lt;resources&gt;" />
  <row Id="4150" PostHistoryTypeId="2" PostId="2186" RevisionGUID="095d35d3-26d1-4848-af2f-c1390fb9c865" CreationDate="2010-08-04T19:32:16.690" UserId="119" Text="It's hard to comment on speed since we don't know what's happening in HitTest.complexHitTestObject. I would say though that if you have a point that represent the player's feet, you can just move that point straight up in a while loop until you hit the air. I would have 2 &quot;detector&quot; points, one on the bottom left corner of the character, one on the bottom right, and test the leading point against terrain and move the character back until they are out of terrain (as you are doing). If you are using the built-in hitTest methods be aware that they are not that fast, but may well be the only way to get the effect you want. " />
  <row Id="4152" PostHistoryTypeId="2" PostId="2188" RevisionGUID="06497fdf-3cbe-4a14-aa04-97e689cf766e" CreationDate="2010-08-04T19:55:14.460" UserId="1206" Text="A good resource manager is key to how well - and how flexible - your game 'engine' is going to be.&#xD;&#xA;&#xD;&#xA;Not only does it solve a lot of problems with low level resource management, but it also helps to ensure that resources are loaded only once, and then reused if they are already loaded.&#xD;&#xA;&#xD;&#xA;If the resource system is abstracted well, the underlying details can wary between file system, physfs storage, sql even...&#xD;&#xA;&#xD;&#xA;You just request a resource, and it's given to you.&#xD;&#xA;&#xD;&#xA;No need to worry about resource IDs and stuff like that.&#xD;&#xA;&#xD;&#xA;Duplicate resource conflict handling, etc.&#xD;&#xA;&#xD;&#xA;Let the resource manager sort that out.&#xD;&#xA;&#xD;&#xA;Depending on how you design it - if C++ then make friends with your scenemanaging class(es) to ensure that ownership is properly handled.&#xD;&#xA;&#xD;&#xA;Resource pool ?&#xD;&#xA;&#xD;&#xA;No problem.&#xD;&#xA;&#xD;&#xA;Forgetting to release resources?&#xD;&#xA;&#xD;&#xA;No problem.&#xD;&#xA;&#xD;&#xA;Same interface to resources no matter where they are: memory, disk, archive, network.&#xD;&#xA;&#xD;&#xA;No problem.&#xD;&#xA;&#xD;&#xA;Do you want streaming?&#xD;&#xA;&#xD;&#xA;Threading?&#xD;&#xA;&#xD;&#xA;Let your resource management hub take care of that.&#xD;&#xA;&#xD;&#xA;And you can rest assured that it will inform you when the resources are ready to be used.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Ogre 3D has a very flexible resource management system, but I am sure there are others 'out there'." />
  <row Id="4153" PostHistoryTypeId="2" PostId="2189" RevisionGUID="099be992-6764-4095-85a4-b6adb1ed3a88" CreationDate="2010-08-04T20:13:52.520" UserId="865" Text="No, that would not make much sense in general as most vector opcodes operate on a vector as a whole and not on seperate components. So you can already multiply a vector in 1 instruction, whereas with splitting up the seperate components you'd spend 4 instructions on it. So since you basically do a lot of operations in general on part of a struct you're better of packing them in an array, but you hardly ever do things only on one component of a vector, or wildly different on each component so breaking them out wouldn't work.&lt;br&gt; &#xD;&#xA;Of course, if you do find a situation where you have to do something to only the (say) x components of vectors it might work, however the penalty of swizzling everything back when you need the actual vector wouldn't be cheap so you could wonder if you shouldn't use vectors to begin with but just an array of floats that happen to allow for vector opcodes to do their specific calculations." />
  <row Id="4154" PostHistoryTypeId="2" PostId="2190" RevisionGUID="b9edc333-fca2-4247-8157-fddf8885d04c" CreationDate="2010-08-04T20:17:28.143" UserId="70" Text="In 'normal' business programming optimization step is often left until really needed.  Meaning you should not optmize until it is really needed.&#xD;&#xA;&#xD;&#xA;Remember what [Donald Knuth][1] said &quot;We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil&quot;&#xD;&#xA;&#xD;&#xA;When is the time to optimize to make sure I am not wasting effort.  Should I do it a method level?  Class level?  Module level?&#xD;&#xA;&#xD;&#xA;Also what should my measurement of optimization?  Ticks?  Frame Rate?  Total Time?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.103.6084&amp;rep=rep1&amp;type=pdf" />
  <row Id="4155" PostHistoryTypeId="1" PostId="2190" RevisionGUID="b9edc333-fca2-4247-8157-fddf8885d04c" CreationDate="2010-08-04T20:17:28.143" UserId="70" Text="In general how often and when should I optimize my code?" />
  <row Id="4156" PostHistoryTypeId="3" PostId="2190" RevisionGUID="b9edc333-fca2-4247-8157-fddf8885d04c" CreationDate="2010-08-04T20:17:28.143" UserId="70" Text="&lt;optimization&gt;" />
  <row Id="4157" PostHistoryTypeId="2" PostId="2191" RevisionGUID="9e385aec-c40a-4d03-8dbc-85593c47218c" CreationDate="2010-08-04T20:20:32.383" UserId="1156" Text="I would say the easiest way would be using your common sense - if something looks like it's running slow, then have a look at it. See if it is a bottleneck.  &#xD;&#xA;Use a profiler to have a look at the speed functions are taking and how often they're being called.  &#xD;&#xA;There's absolutely no point optimizing or spending time trying to optimize something that doesn't need it." />
  <row Id="4158" PostHistoryTypeId="2" PostId="2192" RevisionGUID="2eeb68af-ced6-4b28-9981-c84127700a6d" CreationDate="2010-08-04T20:22:08.480" UserId="189" Text="Once a game is ready to be released (either final or a beta), or it is noticeably slow, that's probably the best time to [profile][1] your app. Of course, you can always run the profiler at any point; but yes, premature optimization is the root of all evil. Unfounded optimization, too; you need actual data to show that some code is slow, before you should go try to &quot;optimize&quot; it. A profiler does that for you.&#xD;&#xA;&#xD;&#xA;If you don't know about a profiler, learn it! Here's a [good blog post][2] demonstrating the usefulness of a profiler.&#xD;&#xA;&#xD;&#xA;&gt;Most of game code optimization comes down to reducing the CPU cycles that you need for each frame. One way to do this is to just optimize every routine as you write it, and make sure it's as fast as possible. However, there is a common saying that 90% of the CPU cycles are spent in 10% of the code. This means that directing all of your optimization work to these bottleneck routines will have 10x the effect of optimizating everything uniformly. So how do you identify these routines? Profiling makes it easy.&#xD;&#xA;&#xD;&#xA;Otherwise, if your small game is running at 200 FPS even though it has an inefficient algorithm in it, do you really have a reason to optimize? You should have a good idea of your target machine's specs, and make sure the game runs well on that machine, but anything beyond that is (arguably) wasted time that could be better spent coding or polishing the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Profiler_(computer_science)&#xD;&#xA;  [2]: http://blog.wolfire.com/2010/06/Using-profiling-for-optimization" />
  <row Id="4159" PostHistoryTypeId="2" PostId="2193" RevisionGUID="a104a618-6333-431a-b2de-40696c6f35c5" CreationDate="2010-08-04T20:29:13.287" UserId="865" Text="Also remember however &quot;premature pessimization&quot;. While there's no need to go hardcore on every line of code, there's justification for realizing you are actually working on a game, which has real-time performance implications.&lt;br&gt; &#xD;&#xA;While everyone tells you to measure and optimize the hot-spots, that technique won't show you performance that is lost in hidden places. For example, if every '+' operation in your code would take twice as long as it should, it won't show up as a hot-spot and thus you will never optimize it or even realize, however since it's being used allover the place it might cost you a lot of performance. You'd be surprised how many of those cycles trickle away without ever being detected. So be aware of what you do.&lt;br&gt;&#xD;&#xA;Apart from that, I tend to profile regularly to get an idea of what's there, and how much time is left per frame. To me time per frame is the most logical as it tells me directly where I'm at with framerate goals. Also try to find out where peaks are and what causes them - I prefer a stable framerate over a high framerate with spikes." />
  <row Id="4160" PostHistoryTypeId="2" PostId="2194" RevisionGUID="1f38e686-2c01-448d-822b-32523c449b63" CreationDate="2010-08-04T20:51:58.297" UserId="1429" Text="I am new to game programming and am trying to make a basic 2d top-down space game with 2 space ships that fight each other.  I am doing well with the user controlled space ship, but have no idea how to even start programming an AI.  Are certain methods/patterns better for this situation?  Where would I even begin?" />
  <row Id="4161" PostHistoryTypeId="1" PostId="2194" RevisionGUID="1f38e686-2c01-448d-822b-32523c449b63" CreationDate="2010-08-04T20:51:58.297" UserId="1429" Text="New to creating AI - where to start?" />
  <row Id="4162" PostHistoryTypeId="3" PostId="2194" RevisionGUID="1f38e686-2c01-448d-822b-32523c449b63" CreationDate="2010-08-04T20:51:58.297" UserId="1429" Text="&lt;2d&gt;&lt;c#&gt;&lt;ai&gt;" />
  <row Id="4163" PostHistoryTypeId="2" PostId="2195" RevisionGUID="09e1b30d-f4b4-489c-8be7-38b4eab2933e" CreationDate="2010-08-04T20:56:47.863" UserId="47" Text="You might want to look at the [Strategy design pattern][1].  Essentially write up same basic strategies of how the ships will behave:&#xD;&#xA;&#xD;&#xA; - Move closer to target&#xD;&#xA; - Attack target&#xD;&#xA; - Run away from target&#xD;&#xA; - Move towards power ups&#xD;&#xA; - Use power ups&#xD;&#xA;&#xD;&#xA;Then you will use logic to choose between these strategies.  For example: If the ships shields have fallen below 50%, then run away from the target and move toward power ups/healing items and so forth.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Strategy_pattern" />
  <row Id="4164" PostHistoryTypeId="6" PostId="2194" RevisionGUID="177d6ee6-e326-43ca-b79d-0c4e48bec410" CreationDate="2010-08-04T20:57:48.660" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;ai&gt;" />
  <row Id="4165" PostHistoryTypeId="2" PostId="2196" RevisionGUID="c361a979-3093-4511-9bc7-4655c91d4d8a" CreationDate="2010-08-04T21:02:26.950" UserId="678" Text="Suppose I have a bunch of 2D art in some vectorized format such as SVG. Is there an easy-ish way to render that directly without having to implement a full SVG renderer myself?&#xD;&#xA;&#xD;&#xA;Of course I could rasterize it off-line (e.g. in the content pipeline) for different resolutions/zoom levels, but I would like to maintain the crisp visuals at continuous zoom levels that vector graphics offer.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4166" PostHistoryTypeId="1" PostId="2196" RevisionGUID="c361a979-3093-4511-9bc7-4655c91d4d8a" CreationDate="2010-08-04T21:02:26.950" UserId="678" Text="Rendering SVG art directly in XNA" />
  <row Id="4167" PostHistoryTypeId="3" PostId="2196" RevisionGUID="c361a979-3093-4511-9bc7-4655c91d4d8a" CreationDate="2010-08-04T21:02:26.950" UserId="678" Text="&lt;2d&gt;&lt;graphics&gt;&lt;xna&gt;&lt;art&gt;" />
  <row Id="4168" PostHistoryTypeId="2" PostId="2197" RevisionGUID="74c6b26d-118e-4409-bf9c-e1f167e5e5cf" CreationDate="2010-08-04T21:02:47.527" UserId="1091" Text="I find it useful to build profiling in. Even if you're not actively optimising it's good to have an idea on what is limiting your performance at any given time. Many games have some kind of overlayable HUD which displays a simple graphical chart (usually just a coloured bar) showing how long various parts of the game loop are taking each frame.&#xD;&#xA;&#xD;&#xA;It would be a bad idea to leave performance analysis and optimisation to too late a late stage. If you've already built the game and you're 200% over your CPU budget and you can't find that through optimisation, you're screwed.&#xD;&#xA;&#xD;&#xA;You need to know what the budgets are for graphics, physics, etc., as you write. You can't do that if you have no idea what your performance is going to be, and you can't guess at that without know both what your performance is, and how much slack there might be.&#xD;&#xA;&#xD;&#xA;So build in some performance stats from day one.&#xD;&#xA;&#xD;&#xA;As to when to tackle stuff - again, probably best not to leave it too late, lest you have to refactor half your engine. On the other hand, don't get too wrapped up in optimising stuff to squeeze out every cycle if you think you might change the algorithm entirely tomorrow, or if you haven't put real game data through it.&#xD;&#xA;&#xD;&#xA;Pick off the low hanging fruit as you go along, tackle the big stuff periodically, and you should be fine.&#xD;&#xA;" />
  <row Id="4169" PostHistoryTypeId="2" PostId="2198" RevisionGUID="80b33900-2fa7-4317-8447-882d7a7e3f54" CreationDate="2010-08-04T21:08:54.533" UserId="47" Text="If your code is running slow, then run a profiler and see what exactly is causing it to run slower.  Or you could be proactive and already have a profiler running *before* you start to notice performance problems.&#xD;&#xA;&#xD;&#xA;You will want to optimize when your framerate drops to a point that the game starts to suffer.  Your most likely culprit will be your CPU being used up too much (100%)." />
  <row Id="4170" PostHistoryTypeId="2" PostId="2199" RevisionGUID="03cd7597-396c-47be-944f-f6b10c42f6bf" CreationDate="2010-08-04T21:11:08.757" UserId="1206" Text="May I suggest that you buy the book Artificial Intelligence for Games by Ian Millington - it's excellent! :)&#xD;&#xA;http://www.ai4g.com/&#xD;&#xA;&#xD;&#xA;The source code is at Github - MIT license.&#xD;&#xA;&#xD;&#xA;Of course, if you're not using C/C++, then this might be less relevant.&#xD;&#xA;&#xD;&#xA;But really an awesome introduction to the world of Artificial stupidity/intelligence.&#xD;&#xA;&#xD;&#xA;Things you're going to need from it are steering and state machines.&#xD;&#xA;For starters." />
  <row Id="4171" PostHistoryTypeId="2" PostId="2200" RevisionGUID="fb27a01e-927a-4d26-af63-cf6e430280e0" CreationDate="2010-08-04T21:12:43.717" UserId="891" Text="The [**Strategy pattern**][1] is great for determining what to do but not when to do it.  You're also going to need to use [**Finite State Machines**][2] to know which state your AI is in and what appropriate decisions are available.&#xD;&#xA;&#xD;&#xA;[**A Practical Guide to Building a Complete Game AI: Volume I** ][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Strategy_pattern&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Finite-state_machine&#xD;&#xA;  [3]: http://www.gamedev.net/reference/articles/article784.asp" />
  <row Id="4172" PostHistoryTypeId="2" PostId="2201" RevisionGUID="7c9f42f7-1771-46a0-ae97-853e2c298b6b" CreationDate="2010-08-04T21:14:34.310" UserId="400" Text="You might want to look at [OpenSteer][1], and the [Steering Behaviors][2] documentation that goes with it.  The source code is not beginner-level, but the concepts behind it should give you some good ideas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opensteer.sourceforge.net&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/" />
  <row Id="4173" PostHistoryTypeId="2" PostId="2202" RevisionGUID="2bc082d6-8d92-4441-997b-24e2ba19ac22" CreationDate="2010-08-04T21:14:57.773" UserId="51" Text="You should optimize your code... as often as you need to.&#xD;&#xA;&#xD;&#xA;What I've done in the past is just continuously run the game with profiling turned on (at the very least a framerate counter on screen at all times).  If the game is getting slow (below your target framerate on your min spec machine, for example), turn on the profiler and see if any hot spots show up.&#xD;&#xA;&#xD;&#xA;Sometimes it isn't the code.  A lot of the problems I've run into the past have been gpu-oriented (granted, this was on the iPhone).  Fillrate issues, too many draw calls, not batching enough geometry, inefficient shaders...  &#xD;&#xA;&#xD;&#xA;Other than inefficient algorithms for hard problems (i.e. pathfinding, physics), I've very rarely run into issues where the code itself was the culprit.  And those hard problems should be things you spend a lot of your effort on getting the algorithm right and not worrying about smaller things.&#xD;&#xA;" />
  <row Id="4174" PostHistoryTypeId="5" PostId="2195" RevisionGUID="a9467b12-569c-481a-91e8-8a44f8d1c3d3" CreationDate="2010-08-04T21:21:43.557" UserId="47" Comment="added 17 characters in body" Text="You might want to look at the [Strategy design pattern][1].  Essentially write up same basic strategies of how the ships will behave:&#xD;&#xA;&#xD;&#xA; - Move closer to target&#xD;&#xA; - Attack target&#xD;&#xA; - Run away from target&#xD;&#xA; - Move towards power ups&#xD;&#xA; - Use power ups&#xD;&#xA;&#xD;&#xA;Then you will use logic (state machines) to choose between these strategies.  For example: If the ships shields have fallen below 50%, then run away from the target and move toward power ups/healing items and so forth.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Strategy_pattern" />
  <row Id="4175" PostHistoryTypeId="6" PostId="2194" RevisionGUID="1d4633b7-ad3f-44d1-8344-b187c93bb66d" CreationDate="2010-08-04T21:26:09.750" UserId="891" Comment="edited tags" Text="&lt;2d&gt;&lt;programming&gt;&lt;ai&gt;" />
  <row Id="4176" PostHistoryTypeId="2" PostId="2203" RevisionGUID="d9930ebd-1992-4660-8913-9dedbb4d3dac" CreationDate="2010-08-04T21:28:18.407" UserId="1232" Text=" One approach is to use an AoSoA (read: Array of Struct of Array) approach which is a hybrid of AoS and SoA. The idea is to store N structs worth of data in a contiguous chunk in SoA form, then the next N structs worth in SoA form. &#xD;&#xA;&#xD;&#xA;Your AoS form for 16 vectors (labelled 0,1,2...F), swizzled at granularity of 4 structs is:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;000111222333444555666777888999AAABBBCCCDDDEEEFFF&#xD;&#xA;XYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZ&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;for SoA, this is:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF&#xD;&#xA;XXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZ&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;for AoSoA, this becomes:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;01230123012345674567456789AB89AB89ABCDEFCDEFCDEF&#xD;&#xA;XXXXYYYYZZZZXXXXYYYYZZZZXXXXYYYYZZZZXXXXYYYYZZZZ&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;The AoSoA approach has the following benefits of AoS:&#xD;&#xA;&#xD;&#xA;* Only a single DMA transfer is required to transfer a chunk of structs to SPU local memory.&#xD;&#xA;* structs still have a chance of all data fitting in a cacheline.&#xD;&#xA;* Block prefetching is still very easy.&#xD;&#xA;&#xD;&#xA;The AoSoA approach also has these benefits of SoA form:&#xD;&#xA;&#xD;&#xA;* You can load data from SPU local memory directly into 128-bit vector registers without having to swizzle your data.&#xD;&#xA;* You can still operate on 4 structs at once.&#xD;&#xA;* You can fully utilize the SIMD'ness of your vector processor if there is no basic branching (ie. no unused lanes in your vector arithmetic)&#xD;&#xA;&#xD;&#xA;The AoSoA approach still has some of these drawbacks of SoA form:&#xD;&#xA;&#xD;&#xA;* object management has to be done at swizzling granularity.&#xD;&#xA;* random access writes of a full struct now needs to touch scattered memory.&#xD;&#xA;* (these can turn out to be non-issues depending on how you organize/manage your structs and their lifetime)&#xD;&#xA;&#xD;&#xA;BTW, these AoSoA concepts apply very well to SSE/AVX/LRBni, as well as GPUs which can be likened to very wide SIMD processors eg. 32/48/64 wide depending on the vendor/architecture." />
  <row Id="4177" PostHistoryTypeId="2" PostId="2204" RevisionGUID="4e9a963e-4c4e-483e-b851-dba0cc466615" CreationDate="2010-08-04T21:31:32.603" UserId="400" Text="Have you seen [Steering Behaviors For Autonomous Characters][1]?   I would consider a &quot;[CrowdPathFollowing&quot;][2] algorithm for staying on the track and avoiding collisions.  You might be able to mix in a [&quot;Flow Field Following&quot;][3] behavior for drafting, passing and blocking - make the flow field follow the the player's past and projected path, but split around his current location.&#xD;&#xA;&#xD;&#xA;          /-------------\&#xD;&#xA;     ----&lt;  [playerCar]  &gt;-----&#xD;&#xA;          \-------------/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That should cause the AI to tend to follow directly behind him and move directly in front to block, yet encourage clean passes.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/CrowdPath.html&#xD;&#xA;  [3]: http://www.red3d.com/cwr/steer/FlowFollow.html" />
  <row Id="4178" PostHistoryTypeId="16" PostId="2204" RevisionGUID="4e9a963e-4c4e-483e-b851-dba0cc466615" CreationDate="2010-08-04T21:31:32.603" UserId="-1" />
  <row Id="4179" PostHistoryTypeId="2" PostId="2205" RevisionGUID="7ccbe4e1-6f66-499f-8d20-5e359bd5d5e2" CreationDate="2010-08-04T21:35:00.090" UserId="162" Text="Optimizing mmo network performance does indeed come down to movement prediction. Luckily there are a few different strategies you can use in your MMO with regards to movement, and some of them are much easier to predict than others.&#xD;&#xA;&#xD;&#xA;If at all possible don't worry about where players ARE, worry about where they are going. Let's say your game has some sort of point and click interface where a player picks where they are going. This makes perfect sense for a mouse-driven MMO. In this case you do not have to update periodically with their current location. Instead, you just need to tell every client where each player is heading and when they expect to get there (and maybe some pathing info if you need it). You can then animate it entirely on the client. If a player changes their mind you can then send updated info to the clients. there may be a bit of rubber banding, but without direct player control it won't be noticeable. This approach can even be used in crazy physics environments, as much of Eve's motion is predicted on the client using complicated math.&#xD;&#xA;&#xD;&#xA;If it's absolutely vital that your players must have direct movement control, you're then going to need fps-style movement prediction. This is probably overkill for any sort of web-based MMO (are your players really using controllers or wasd to move?), but you will need it if collision is important. In this case you end up doing a much more complicated version of the above, where the client will attempt to determine where a player is heading based on the position and velocity of a player that is sent down over the network. But the prediction errors here will feel much worse, especially in a laggy environment. Stay away from this method if at all possible." />
  <row Id="4180" PostHistoryTypeId="2" PostId="2206" RevisionGUID="1f732e6b-7df2-46fd-9d28-74f42546d7d8" CreationDate="2010-08-04T21:42:17.217" UserId="475" Text="The news just came across the Google blog that Wave is going to go away in the not too distant future. [Clicky for the story.] This is a real shame for my team who has been making heavy use of Wave as a remote collaboration tool.  Looks like we need a new platform.  What tools does your remote team like to use to collaborate online?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [Clicky for the story.]: http://googleblog.blogspot.com/2010/08/update-on-google-wave.html" />
  <row Id="4181" PostHistoryTypeId="1" PostId="2206" RevisionGUID="1f732e6b-7df2-46fd-9d28-74f42546d7d8" CreationDate="2010-08-04T21:42:17.217" UserId="475" Text="Wave is being discontinued!  Other good remote collaboration tools?" />
  <row Id="4182" PostHistoryTypeId="3" PostId="2206" RevisionGUID="1f732e6b-7df2-46fd-9d28-74f42546d7d8" CreationDate="2010-08-04T21:42:17.217" UserId="475" Text="&lt;tools&gt;&lt;productivity&gt;" />
  <row Id="4183" PostHistoryTypeId="5" PostId="2203" RevisionGUID="0f9feb09-64f7-49e6-8325-b2c26b23fbcd" CreationDate="2010-08-04T21:46:05.483" UserId="1232" Comment="added 14 characters in body" Text=" One approach is to use an AoSoA (read: Array of Struct of Array) approach which is a hybrid of AoS and SoA. The idea is to store N structs worth of data in a contiguous chunk in SoA form, then the next N structs worth in SoA form. &#xD;&#xA;&#xD;&#xA;Your AoS form for 16 vectors (labelled 0,1,2...F), swizzled at granularity of 4 structs is:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;000111222333444555666777888999AAABBBCCCDDDEEEFFF&#xD;&#xA;XYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZ&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;for SoA, this is:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;0123456789ABCDEF&#xD;&#xA;XXXXXXXXXXXXXXXX&#xD;&#xA;&#xD;&#xA;0123456789ABCDEF&#xD;&#xA;YYYYYYYYYYYYYYYY&#xD;&#xA;&#xD;&#xA;0123456789ABCDEF&#xD;&#xA;ZZZZZZZZZZZZZZZZ&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;for AoSoA, this becomes:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;01230123012345674567456789AB89AB89ABCDEFCDEFCDEF&#xD;&#xA;XXXXYYYYZZZZXXXXYYYYZZZZXXXXYYYYZZZZXXXXYYYYZZZZ&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;The AoSoA approach has the following benefits of AoS:&#xD;&#xA;&#xD;&#xA;* Only a single DMA transfer is required to transfer a chunk of structs to SPU local memory.&#xD;&#xA;* structs still have a chance of all data fitting in a cacheline.&#xD;&#xA;* Block prefetching is still very easy.&#xD;&#xA;&#xD;&#xA;The AoSoA approach also has these benefits of SoA form:&#xD;&#xA;&#xD;&#xA;* You can load data from SPU local memory directly into 128-bit vector registers without having to swizzle your data.&#xD;&#xA;* You can still operate on 4 structs at once.&#xD;&#xA;* You can fully utilize the SIMD'ness of your vector processor if there is no basic branching (ie. no unused lanes in your vector arithmetic)&#xD;&#xA;&#xD;&#xA;The AoSoA approach still has some of these drawbacks of SoA form:&#xD;&#xA;&#xD;&#xA;* object management has to be done at swizzling granularity.&#xD;&#xA;* random access writes of a full struct now needs to touch scattered memory.&#xD;&#xA;* (these can turn out to be non-issues depending on how you organize/manage your structs and their lifetime)&#xD;&#xA;&#xD;&#xA;BTW, these AoSoA concepts apply very well to SSE/AVX/LRBni, as well as GPUs which can be likened to very wide SIMD processors eg. 32/48/64 wide depending on the vendor/architecture." />
  <row Id="4184" PostHistoryTypeId="2" PostId="2207" RevisionGUID="d01b4565-f6db-4d24-847a-0eb67cbbaf3e" CreationDate="2010-08-04T21:49:21.580" UserId="395" Text="PyCon had a lot of success using Etherpad. Even though the main hosted service has been taken down, you can either run it yourself or [use one of the many public sites](http://etherpad.org/etherpadsites.html). Chris Ball's [openetherpad](http://openetherpad.org) has worked well for me before." />
  <row Id="4185" PostHistoryTypeId="2" PostId="2208" RevisionGUID="6e8a6ff4-219d-41be-9b07-a6b4dab6b0d9" CreationDate="2010-08-04T21:53:08.537" UserId="1024" Text="If look at Knuth's quote in its context he goes on to explain, that **we should** optimize but with tools, like a profiler. &#xD;&#xA;&#xD;&#xA;You should constantly profile and memory profile your application after the very basic architecture gets laid. &#xD;&#xA;&#xD;&#xA;Profiling will not just help you increase the speed, it will help you find bugs. If your program suddenly drastically changes speed, this is usually because of a bug. If your not profiling it might go unnoticed.&#xD;&#xA;&#xD;&#xA;The trick to optimizing is to do it by design. Don't wait till the last minute. Make sure the design of your program gives you the performance you need without really on nasty inner loop tricks. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="4186" PostHistoryTypeId="2" PostId="2209" RevisionGUID="bee8147f-3027-46d9-9da3-96cf53b1d7ae" CreationDate="2010-08-04T21:53:29.830" UserId="179" Text="As with any optimisations, profile! Readability comes first, and should only be sacrificed when profiling identifies a particular bottleneck and you have exhausted all your options for tuning the high level algorithm (the fastest way to do the work is to not have to do the work!) You should always reprofile following any low level optimisation to confirm that you really have made things faster rather than the opposite, especially with pipelines as quirky as the Cell's.&#xD;&#xA;&#xD;&#xA;What techniques you use then will depend on the particulars of the bottleneck. In general, when working with vector types, a vector component you ignore in a result represents work wasted. Switching SoA / AoS does not make sense unless it allows you to do more useful work by filling such unused components (e.g. one dot product on PS3's PPU vs four dot products in parallel in the same amount of time). To address your question, spending time shuffling components around just to perform one operation on a single vector sounds like a pessimisation to me!&#xD;&#xA;&#xD;&#xA;The flip side on SPUs is that the bulk of the cost of small DMA transfers is in setup; anything less than 128 bytes will take the same number of cycles to transfer, and anything less than about a kilobyte only a few cycles more. So don't worry about DMAing more data than you strictly need; reducing the number of sequential DMA transfers triggered, and performing work while DMA transfers are happening - and therefore unfolding loop prologues and epilogues to form software pipelines - is key to good SPU performance, and it is easiest to deal with corner cases by fetching extra data / discarding partially computed results than jumping through hoops to try to arrange for the exact amount of data that is necessary to be read and processed." />
  <row Id="4187" PostHistoryTypeId="2" PostId="2210" RevisionGUID="c990c39a-b1b4-4f8b-b8f2-c32a2eef461a" CreationDate="2010-08-04T22:00:43.100" UserId="93" Text="In XNA (and Direct3D in general AFAIK), rather than creating individual vertex and fragment shaders, you bundle potentially many related shaders into 'Effects'. When you come to use an effect you select a 'technique' (or iterate through all of them) and then each 'technique' has a number of 'passes'. You loop through the each pass it selects the relevant vertex and fragment shader and you draw the geometry. &#xD;&#xA;&#xD;&#xA;What I'm curious about though is what you would need multiple passes for? I understand in the early days of 3d you only had one texture unit and then you had 2 and that often still wasn't enough if you also wanted to do environment mapping. But on modern devices, even in the mobile class, you can sample 8 or more textures and do as many lighting calculations as you'd want to in a single shader.&#xD;&#xA;&#xD;&#xA;Can the more experienced here offer practical examples of where multi-pass rendering is still needed, or is this just over-engineering on the part of XNA/Direct3d?" />
  <row Id="4188" PostHistoryTypeId="1" PostId="2210" RevisionGUID="c990c39a-b1b4-4f8b-b8f2-c32a2eef461a" CreationDate="2010-08-04T22:00:43.100" UserId="93" Text="Good example of a multi-pass effect?" />
  <row Id="4189" PostHistoryTypeId="3" PostId="2210" RevisionGUID="c990c39a-b1b4-4f8b-b8f2-c32a2eef461a" CreationDate="2010-08-04T22:00:43.100" UserId="93" Text="&lt;xna&gt;&lt;directx&gt;&lt;shaders&gt;" />
  <row Id="4190" PostHistoryTypeId="2" PostId="2211" RevisionGUID="e7fc217f-ff6f-4e86-9f1e-f384d054bd99" CreationDate="2010-08-04T22:14:23.467" UserId="678" Text="The example on the [XNA creators' website][1] uses multiple passes to compute lighting from many (hundreds) of light sources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/sample/shader_series5" />
  <row Id="4191" PostHistoryTypeId="2" PostId="2212" RevisionGUID="a03fe6ab-cc84-466a-8b1c-68fb302f736f" CreationDate="2010-08-04T22:29:26.240" UserId="1272" Text="As Ranieri said, you can use multiple passes for multiple lights, for instance with a single material you may have an 'ambient' pass, an additive pass per point light, another additive pass per spotlight and then a decal pass to multiply in the diffuse texture (I've used a setup like this in the past and it's about the most flexible way of handling a lighting shader I've seen without getting into deferred shading).&#xD;&#xA;&#xD;&#xA;Also, I believe most fur shaders use multiple passes." />
  <row Id="4192" PostHistoryTypeId="2" PostId="2213" RevisionGUID="650cb2fe-1dac-4cd7-8ab3-07c9e1a9f146" CreationDate="2010-08-04T22:39:45.663" UserId="189" Text="JavaScript Sockets!&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;There are several implementations but they all use either Flash or Java, which your page communicates with via a JavaScript library (since both Flash and Java can interact with JavaScript on the page). You can literally make C-like socket calls to establish a connection, send/receive data, and close a connection (and whatever else you do with sockets).&#xD;&#xA;&#xD;&#xA;Here are a couple:&#xD;&#xA;&#xD;&#xA;- [The Java / JavaScript Socket Bridge][1]&#xD;&#xA;- [SocketJS: Realtime Javascript Sockets][2]&#xD;&#xA;&#xD;&#xA;I highly recommend taking this approach. However, it would also require a different server technology; which is a good thing, but it is a change and depending on how advanced your server is, that could mean a lot of lost time...&#xD;&#xA;&#xD;&#xA;Oh, and there's also [WebSockets][3] coming soon. So if you use one of the above libraries and adapt your server to use socket communication, then you can just swap in WebSockets as it becomes more accepted!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stephengware.com/projects/javasocketbridge/&#xD;&#xA;  [2]: http://sly.w3m.hu/socketjs&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/WebSockets" />
  <row Id="4193" PostHistoryTypeId="2" PostId="2214" RevisionGUID="ce6b77b2-710e-44cc-94ef-3b31856f8fa8" CreationDate="2010-08-04T22:49:06.537" UserId="1439" Text="Buy an encoding software, so reverse engineering softwares won't work. They cost like 40-50 bucks and since game development is a long and tedious process, it really worth investing.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;http://www.dcomsoft.com/&#xD;&#xA;" />
  <row Id="4194" PostHistoryTypeId="2" PostId="2215" RevisionGUID="5b18bdc7-10df-4d02-992b-e0c7b5cca35d" CreationDate="2010-08-04T22:52:59.010" UserId="190" Text="Rigid body physics is actually quite simple in concept - that is, the behaviors an engine is trying to create are not very complicated. That's probably why the libraries you looked at seem quite simple to you.&#xD;&#xA;&#xD;&#xA;The trick is that making a sim that is *robust*, *stable*, and *fast*, even in the presence of things like floating-point error and low, variable framerates, is quite difficult and usually involves a great deal of tweaking and fiddling. Further complicating the issue is the fact that a lot of extremely smart people have made heroic efforts at finding better solutions, and have come up with beautiful and powerful but difficult-to-understand algorithms that have given the field a reputation for black magic.&#xD;&#xA;&#xD;&#xA;In general, a physics engine is going to be concerned with three things (the order in which they do them in the internal loop varies):&#xD;&#xA;&#xD;&#xA; 1. Integration (approximating the Newtonian equations of motion),&#xD;&#xA; 2. Collision detection, and&#xD;&#xA; 3. Constraint solving (updating positions and velocities to satisfy nonpenetration or other user-specified constraints.)&#xD;&#xA;&#xD;&#xA;For most of these, there are both simple but not-so-accurate algorithms and complex but more-accurate algorithms. To get you started:&#xD;&#xA;&#xD;&#xA; 1. For integration, most people use either Symplectic Euler or Verlet (which are actually equivalent. You can read up on numerical integration if you like, but the consensus seems to be that cheap first-order methods are fine.&#xD;&#xA; 2. You can find all the collision detection references you could want on the [Real-Time Rendering resource page][1].&#xD;&#xA; 3. For constraint solving, the method of sequential impulses is very easy to understand. Erin Catto (the author of Box2D) gives a presentation at GDC every year - the slides are linked from [the Box2D main page][2]. The [2006 slides][3] cover sequential impulses pretty well. You can also look into fancier methods like Featherstone or projected Gauss-Seidel.&#xD;&#xA;&#xD;&#xA;There's an excellent introduction to simple methods and what can go wrong in the early chapters of the just-published book Game Physics Pearls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimerendering.com/intersections.html&#xD;&#xA;  [2]: http://box2d.org/&#xD;&#xA;  [3]: http://code.google.com/p/box2d/downloads/detail?name=GDC2006_ErinCatto.zip&amp;can=2&amp;q=" />
  <row Id="4195" PostHistoryTypeId="2" PostId="2216" RevisionGUID="8b415a95-ffcf-440d-9414-4f3a0ab99b1c" CreationDate="2010-08-04T23:21:12.540" UserId="190" Text="SPUs are actually an interesting special case when it comes to vectorizing code. Instructions are divided into &quot;arithmetic&quot; and &quot;load/store&quot; families, and the two families run on separate pipelines. The SPU can issue one of each type per cycle.&#xD;&#xA;&#xD;&#xA;Math code is obviously heavily bound by math instructions - so usually mathy loops on SPU will have lots and lots of open cycles on the load/store pipe. Since shuffles happen on the load/store pipe, you often have enough free load/store instructions to swizzle xyzxyzxyzxyz form into xxxxyyyyzzzz form without any overhead at all.&#xD;&#xA;&#xD;&#xA;This technique is in use at Naughty Dog at least - see their SPU assembly presentations ([part 1][1] and [part 2][2]) for details.&#xD;&#xA;&#xD;&#xA;Unfortunately the compiler is often not smart enough to do this automatically - if you decide to go this route you'll need to either write assembly yourself or unroll your loops using intrinsics and check the assembler to make sure it's what you want. So if you are looking to write general cross-platform code that happens to run well on SPU, you may want to go with SoA or AoSoA (as jpaver suggests.) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.naughtydog.com/docs/gdc2010/intro-spu-optimizations-part-1.pdf&#xD;&#xA;  [2]: http://www.naughtydog.com/docs/gdc2010/intro-spu-optimizations-part-2.pdf" />
  <row Id="4196" PostHistoryTypeId="10" PostId="2206" RevisionGUID="930fd303-ce72-46fa-a9b0-87012543ffbe" CreationDate="2010-08-04T23:57:28.473" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:162,&quot;DisplayName&quot;:&quot;Ben Zeigler&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:55,&quot;DisplayName&quot;:&quot;David McGraw&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="4197" PostHistoryTypeId="2" PostId="2217" RevisionGUID="a09e609d-a628-4e4e-a423-8558408e4797" CreationDate="2010-08-05T00:18:12.820" UserId="1440" Text="I have terrain being rendered in my project using VBOs in OpenGL. I would like to apply some Frustum Culling but have no idea how to access each polygon as its drawn to check if it is in view. I think this is where octrees come into play but I have no idea how this is really done. Does anyone know a good tutorial on how to do this specific thing or have some pseudocode for me?&#xD;&#xA;&#xD;&#xA;Thanks in advanced!" />
  <row Id="4198" PostHistoryTypeId="1" PostId="2217" RevisionGUID="a09e609d-a628-4e4e-a423-8558408e4797" CreationDate="2010-08-05T00:18:12.820" UserId="1440" Text="Frustum Culling with VBOs" />
  <row Id="4199" PostHistoryTypeId="3" PostId="2217" RevisionGUID="a09e609d-a628-4e4e-a423-8558408e4797" CreationDate="2010-08-05T00:18:12.820" UserId="1440" Text="&lt;c++&gt;&lt;opengl&gt;&lt;optimization&gt;" />
  <row Id="4200" PostHistoryTypeId="10" PostId="2092" RevisionGUID="cfd205a1-1b50-40a1-baab-9885794f888f" CreationDate="2010-08-05T00:31:19.767" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:55,&quot;DisplayName&quot;:&quot;David McGraw&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:162,&quot;DisplayName&quot;:&quot;Ben Zeigler&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="4201" PostHistoryTypeId="2" PostId="2218" RevisionGUID="028f121d-ade2-44be-8b7d-9ec4358ecfe5" CreationDate="2010-08-05T00:35:03.393" UserId="1441" Text="Read Glenn Fiedler's game physics series: http://gafferongames.wordpress.com/game-physics/&#xD;&#xA;&#xD;&#xA;Also, Erin Catto (the author of Box2D) has a paper on constrained dynamics. I'm not allowed to post more than one link because I'm a new user, but search Google for &quot;IterativeDynamics.pdf&quot; and navigate to the first result.&#xD;&#xA;&#xD;&#xA;For collision detection, read 'Real-Time Collision Detection' by Christer Ericson" />
  <row Id="4202" PostHistoryTypeId="2" PostId="2219" RevisionGUID="a2bec624-e1e1-424c-83af-d8d7e8e34c4e" CreationDate="2010-08-05T01:07:43.737" UserId="656" Text="One of the reasons for having a resource manager is the sharing of resources. For example, when you call `resourceManager.Get(&quot;sprite.png&quot;)`, if &quot;sprite.png&quot; is already loaded, the resource manager can simply return a pointer to the already loaded sprite resource rather than creating a new image and reloading it from disk.&#xD;&#xA;&#xD;&#xA;A resource manager can also cache resources, so that although the last reference to a resource has been dropped, the resource manager can choose to keep it in memory in case it gets loaded again in the near future. The resource manager would be programmed to automatically handle all memory management with your resources.&#xD;&#xA;&#xD;&#xA;Finally, I think a very useful feature is the in-game reloading of resources. Since the resource manager holds handles to all the games resources, you can build in a function which causes all the resources to be reloaded from disk and updating the game in real-time, which is extremely useful for artists/designers who work with your game.&#xD;&#xA;" />
  <row Id="4203" PostHistoryTypeId="2" PostId="2220" RevisionGUID="9ee21eab-3687-4399-bff5-734db47aeb7e" CreationDate="2010-08-05T01:09:08.927" UserId="1179" Text="Hey all, I am working on a simple game to include some rigid body dynamics, involving placing (moving &amp; rotating) some springs to bounce a falling ball into a target area.&#xD;&#xA;&#xD;&#xA;My problem is correctly calculating the exit velocity of the ball after it hits the spring surface (Vexit, Ve for short)&#xD;&#xA;&#xD;&#xA;**Assume the following:**  &#xD;&#xA;Initial ball velocity vector at point of impact is known (Vimpact, Vi for short)  &#xD;&#xA;Surface orientation vector is known (Vsurface, Vs for short)  &#xD;&#xA;Bounce coefficient (Bc for short) of ball after hitting surface is constant (*for example |Ve| = 1.2 x |Vi|*)&#xD;&#xA;&#xD;&#xA;**My algorithm is as follows:**  &#xD;&#xA;-get surface normal vector, ***Vn***  &#xD;&#xA;-get ***Vi*** inverse (reversing both x,y components to get reversed direction vector)  &#xD;&#xA;-get normalised Vi inverse, call this ***Vin***  &#xD;&#xA;-get angle between Vin &amp; Vn, by arccos(Vin . Vn). Let this be ***angle A***  &#xD;&#xA;-rotate Vin by (2A) degrees to get normalised exit vector ***Ven***  &#xD;&#xA;-***Ve*** = Ven . Bc&#xD;&#xA;&#xD;&#xA;Now as far as I can tell, this would work well. However, I am unable to know on ***whether to perform the rotation step in clock-wise, or anti-clock-wise motion***; since the angle i get is always positive&#xD;&#xA;&#xD;&#xA;What do you all think of this algorithm anyways?  &#xD;&#xA;Can anyone help me out on how to figure out the rotation direction?  &#xD;&#xA;Anyone have a better (faster,simpler,more accurate, etc) algorithm to use?  &#xD;&#xA;&#xD;&#xA;Thanks a lot!" />
  <row Id="4204" PostHistoryTypeId="1" PostId="2220" RevisionGUID="9ee21eab-3687-4399-bff5-734db47aeb7e" CreationDate="2010-08-05T01:09:08.927" UserId="1179" Text="How to calculate the exit speed of ball bouncing off a solid surface" />
  <row Id="4205" PostHistoryTypeId="3" PostId="2220" RevisionGUID="9ee21eab-3687-4399-bff5-734db47aeb7e" CreationDate="2010-08-05T01:09:08.927" UserId="1179" Text="&lt;2d&gt;&lt;physics&gt;&lt;math&gt;&lt;2d-physics&gt;" />
  <row Id="4206" PostHistoryTypeId="2" PostId="2221" RevisionGUID="a9a7f5e9-23ab-4b79-b384-09a9761609a6" CreationDate="2010-08-05T01:18:29.970" UserId="190" Text="You don't need the arccos or the angle. You just want to invert the normal velocity.&#xD;&#xA;&#xD;&#xA;Start by taking the component of the ball's velocity in the normal direction&#xD;&#xA;&#xD;&#xA;    Vp = Dot(Vn, Vi) * Vn&#xD;&#xA;&#xD;&#xA;compute the tangential velocity&#xD;&#xA;&#xD;&#xA;    Vt = Vi - Vp&#xD;&#xA;&#xD;&#xA;and then invert the normal velocity while keeping the tangential velocity&#xD;&#xA;&#xD;&#xA;    Ve = Vt - Vp&#xD;&#xA;&#xD;&#xA;This can simplify to&#xD;&#xA;&#xD;&#xA;    Ve = Vi - 2*Vp&#xD;&#xA;&#xD;&#xA;This assumes that your Vn is normalized (i.e. Dot(Vn, Vn) == 1).&#xD;&#xA;&#xD;&#xA;It should be easy to change this to support restitution other than 1 (that is, different bounciness.)" />
  <row Id="4207" PostHistoryTypeId="2" PostId="2222" RevisionGUID="ad583e7a-0f82-471d-8c61-aecd9b7e958b" CreationDate="2010-08-05T01:23:52.393" UserId="309" Text="I think you're over-thinking this, you can achieve reflection, as it can be calculated by doing:&#xD;&#xA;&#xD;&#xA;  Ve = Vi - 2 * (Vi _dot_ Vn) * Vn&#xD;&#xA;&#xD;&#xA;(Where _dot_ refers to the dot product)&#xD;&#xA;&#xD;&#xA;Then you can simply scale Ve by your Bc to get the final result.&#xD;&#xA;&#xD;&#xA;Reference: http://mathworld.wolfram.com/Reflection.html" />
  <row Id="4208" PostHistoryTypeId="2" PostId="2223" RevisionGUID="d93949d4-bf75-43e5-b004-dea05ff0564d" CreationDate="2010-08-05T01:57:41.017" UserId="1440" Text="For my project, I usually apply some VERY needed optimizations in my base engine. For example I always like to implement a good solid SIMD implementation using SSE2 and 3DNow! This ensures my floating point math is on cue with where I want it to be. Another good practice is to make a habit out of optimizations as you code instead of going back. Most of the time these little practices are just as time consuming as what you were coding anyway. Before coding a feature, make sure you research the most efficient way to do it.&#xD;&#xA;&#xD;&#xA;Bottom line, in my opinion, its HARDER to make your code more efficient after it already suck." />
  <row Id="4209" PostHistoryTypeId="2" PostId="2224" RevisionGUID="a39096bc-3864-422a-897c-706c07bf69f2" CreationDate="2010-08-05T02:01:09.183" UserId="1440" Text="Honestly Box2D is a great physics library for flash and is very incorporable into existing projects." />
  <row Id="4210" PostHistoryTypeId="2" PostId="2225" RevisionGUID="128a330e-3f5f-4bf7-a6da-54155ad99f0f" CreationDate="2010-08-05T02:07:57.610" UserId="1134" Text="Where I've worked, we always use multiple levels of profiling; if you see a problem, you just move down the list a bit more until you figure out what's going on:&#xD;&#xA;&#xD;&#xA;* The &quot;human profiler&quot;, aka **just play the game**; does it feel slow or &quot;hitch&quot; occasionally?  Noticing jerky animations?  (As a developer, note that you'll be more sensitive to some kinds of performance issues and oblivious to others.  Plan extra testing accordingly.)&#xD;&#xA;* Turn on the **FPS display**, which is a sliding-window 5 second average FPS.  Very little overhead to calculate and display.&#xD;&#xA;* Turn on the **profile bars**, which are just a series of quads (ROYGBIV colors) that represent different parts of the frame (e.g. vblank, preframe, update, collision, render, postframe) using a simple &quot;stopwatch&quot; timer around each section of code.  To emphasize what we want, we set one screen width worth of bar to be representative of a 60Hz target frame, so it's really easy to see if you're e.g. 50% under budget (only a half-bar) or 50% over (the bar wraps and becomes one and a half bars).  It's also pretty easy to tell what's generally eating most of the frame: red = render, yellow = update, etc...&#xD;&#xA;* Build a special **instrumented build** that inserts &quot;stopwatch&quot; like code around each and every function.  (Note that you may take a massive performance, dcache, and icache hit when doing this, so it's definitely intrusive.  But if you lack a proper sampling profiler or decent support on the CPU, this is an acceptable option.  You can also be clever about recording a minimum of data on function enter/exit and rebuilding calltraces later.)  When we built ours, we mimicked much of [gprof][1]'s output format.&#xD;&#xA;* Best of all, run a **sampling profiler**; VTune and CodeAnalyst are available for x86 and x64, you've got various simulation or emulation environments that might give you data here.&#xD;&#xA;&#xD;&#xA;(There's a fun story from a past year's GDC of a graphics programmer who took four pictures of himself -- happy, indifferent, annoyed, and angry -- and displayed an appropriate picture in the corner of the internal builds based on the framerate.  The content creators quickly learned not to turn on complicated shaders for *all* of their objects and environments: they'd make the programmer angry.  Behold the power of feedback.)&#xD;&#xA;&#xD;&#xA;Note you can also do fun things like graph the &quot;profile bars&quot; continuously, so you can see spike patterns (&quot;we're losing a frame every 7 frames&quot;) or the like.&#xD;&#xA;&#xD;&#xA;To answer your question directly, though: in my experience, while it's tempting (and often rewarding -- I usually learn something) to rewrite single functions/modules to optimize number of instructions or icache or dcache performance, and we do actually _need_ to do this sometimes when we've got a particularly obnoxious performance problem, the vast majority of the performance issues we deal with on a regular basis come down to **design**.  For example:&#xD;&#xA;&#xD;&#xA;* Should we cache in RAM or reload from disk the &quot;attack&quot; state animation frames for the player?  How about for each enemy?  We don't have RAM to do them all, but disk loads are expensive!  You can see the hitching if 5 or 6 different enemies pop in at once!  (Okay, how about staggering spawning?)&#xD;&#xA;* Are we doing a single type of operation across all particles, or all operations across a single particle?  (This is an icache/dcache tradeoff, and the answer isn't always clear.)  How about pulling apart all the particles and storing the positions together (the famous &quot;struct of arrays&quot;) vs keeping all particle data in one place (&quot;array of structs&quot;).&#xD;&#xA;&#xD;&#xA;You hear it until it becomes obnoxious in any university-level computer science courses, but: it really is all about the data structures and algorithms.  Spending some time on algorithm and data flow design is going to get you more bang for the buck in general.  (Make sure you've read the excellent [Pitfalls of Object Oriented Programming][2] slides from a Sony Developer Services fellow for some insight here.)&#xD;&#xA;&#xD;&#xA;And another useful heuristic: if you're close to your engine's &quot;core&quot;, it may be worth some extra effort and experimentation to optimize (e.g. vectorize those matrix multiplies!).  The further from core, the less you should be worrying about that unless one of your profiling tools tells you otherwise.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html&#xD;&#xA;  [2]: http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf" />
  <row Id="4211" PostHistoryTypeId="2" PostId="2226" RevisionGUID="7a3618b8-669e-4bae-a666-c5b12ebfcb75" CreationDate="2010-08-05T02:10:21.600" UserId="1440" Text="    glEnable(GL_CULL_FACES);&#xD;&#xA;&#xD;&#xA;Simple one liner that applies back face culling. This is excellent for trimming down polygon count. Also look into Frustum/Occlusion culling for reducing poly counts. &#xD;&#xA;&#xD;&#xA;Another thing to look into is SIMD for your vectors and quaternions (mostly used in camera rotations). If you don't want to mess with ASM then check out libSIMD which is a great library for handling SIMD in C." />
  <row Id="4212" PostHistoryTypeId="16" PostId="2226" RevisionGUID="7a3618b8-669e-4bae-a666-c5b12ebfcb75" CreationDate="2010-08-05T02:10:21.600" UserId="-1" />
  <row Id="4213" PostHistoryTypeId="5" PostId="2225" RevisionGUID="3262088b-2f3b-488a-bad5-b6c027303846" CreationDate="2010-08-05T02:13:04.513" UserId="1134" Comment="added 208 characters in body" Text="Where I've worked, we always use multiple levels of profiling; if you see a problem, you just move down the list a bit more until you figure out what's going on:&#xD;&#xA;&#xD;&#xA;* The &quot;human profiler&quot;, aka **just play the game**; does it feel slow or &quot;hitch&quot; occasionally?  Noticing jerky animations?  (As a developer, note that you'll be more sensitive to some kinds of performance issues and oblivious to others.  Plan extra testing accordingly.)&#xD;&#xA;* Turn on the **FPS display**, which is a sliding-window 5 second average FPS.  Very little overhead to calculate and display.&#xD;&#xA;* Turn on the **profile bars**, which are just a series of quads (ROYGBIV colors) that represent different parts of the frame (e.g. vblank, preframe, update, collision, render, postframe) using a simple &quot;stopwatch&quot; timer around each section of code.  To emphasize what we want, we set one screen width worth of bar to be representative of a 60Hz target frame, so it's really easy to see if you're e.g. 50% under budget (only a half-bar) or 50% over (the bar wraps and becomes one and a half bars).  It's also pretty easy to tell what's generally eating most of the frame: red = render, yellow = update, etc...&#xD;&#xA;* Build a special **instrumented build** that inserts &quot;stopwatch&quot; like code around each and every function.  (Note that you may take a massive performance, dcache, and icache hit when doing this, so it's definitely intrusive.  But if you lack a proper sampling profiler or decent support on the CPU, this is an acceptable option.  You can also be clever about recording a minimum of data on function enter/exit and rebuilding calltraces later.)  When we built ours, we mimicked much of [gprof][1]'s output format.&#xD;&#xA;* Best of all, run a **sampling profiler**; VTune and CodeAnalyst are available for x86 and x64, you've got various simulation or emulation environments that might give you data here.&#xD;&#xA;&#xD;&#xA;(There's a fun story from a past year's GDC of a graphics programmer who took four pictures of himself -- happy, indifferent, annoyed, and angry -- and displayed an appropriate picture in the corner of the internal builds based on the framerate.  The content creators quickly learned not to turn on complicated shaders for *all* of their objects and environments: they'd make the programmer angry.  Behold the power of feedback.)&#xD;&#xA;&#xD;&#xA;Note you can also do fun things like graph the &quot;profile bars&quot; continuously, so you can see spike patterns (&quot;we're losing a frame every 7 frames&quot;) or the like.&#xD;&#xA;&#xD;&#xA;To answer your question directly, though: in my experience, while it's tempting (and often rewarding -- I usually learn something) to rewrite single functions/modules to optimize number of instructions or icache or dcache performance, and we do actually _need_ to do this sometimes when we've got a particularly obnoxious performance problem, the vast majority of the performance issues we deal with on a regular basis come down to **design**.  For example:&#xD;&#xA;&#xD;&#xA;* Should we cache in RAM or reload from disk the &quot;attack&quot; state animation frames for the player?  How about for each enemy?  We don't have RAM to do them all, but disk loads are expensive!  You can see the hitching if 5 or 6 different enemies pop in at once!  (Okay, how about staggering spawning?)&#xD;&#xA;* Are we doing a single type of operation across all particles, or all operations across a single particle?  (This is an icache/dcache tradeoff, and the answer isn't always clear.)  How about pulling apart all the particles and storing the positions together (the famous &quot;struct of arrays&quot;) vs keeping all particle data in one place (&quot;array of structs&quot;).&#xD;&#xA;&#xD;&#xA;You hear it until it becomes obnoxious in any university-level computer science courses, but: it really is all about the data structures and algorithms.  Spending some time on algorithm and data flow design is going to get you more bang for the buck in general.  (Make sure you've read the excellent [Pitfalls of Object Oriented Programming][2] slides from a Sony Developer Services fellow for some insight here.)  This doesn't &quot;feel&quot; like optimization; it's mostly time spent with a whiteboard or UML tool or creating many prototypes, rather than making current code run faster.  But it's generally much more worthwhile.&#xD;&#xA;&#xD;&#xA;And another useful heuristic: if you're close to your engine's &quot;core&quot;, it may be worth some extra effort and experimentation to optimize (e.g. vectorize those matrix multiplies!).  The further from core, the less you should be worrying about that unless one of your profiling tools tells you otherwise.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html&#xD;&#xA;  [2]: http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf" />
  <row Id="4214" PostHistoryTypeId="2" PostId="2227" RevisionGUID="5ed51f9a-4b5e-4906-9666-63b8dae5cc0f" CreationDate="2010-08-05T02:33:34.237" UserId="142" Text="More information on how you are storing the terrain data would be helpful here. Are you storing it chunks? Are you constantly rebuilding the VBOs? Is all of the terrain in one VBO and you are rendering pieces of it at a time?&#xD;&#xA;&#xD;&#xA;Trying to cull per polygon is probably going to introduce more overhead than it saves. The larger a chunk of terrain you can test at once, the quicker the culling will be, with the obvious trade-off of accuracy. In the end, you will need to do some profiling to figure out what the optimal point of that trade-off is, so creating a system that allows you to dynamically change how your terrain is broken up will be very helpful.&#xD;&#xA;" />
  <row Id="4215" PostHistoryTypeId="5" PostId="2035" RevisionGUID="a4791003-ec76-4800-88d7-433b502d1edc" CreationDate="2010-08-05T03:41:24.107" UserId="1021" Comment="added more operators which are useful in game development" Text="A firm grasp of +, -, *, /, %, &lt;&lt;, &gt;&gt;, |, &amp;, and ^.  &#xD;&#xA;Without them, you're completely screwed." />
  <row Id="4216" PostHistoryTypeId="2" PostId="2228" RevisionGUID="ad61acb0-8a45-4d84-99e4-b65fbe74a20d" CreationDate="2010-08-05T03:48:31.497" UserId="288" Text="A good question. I was experimenting with this at one point - I couldn't find a easy, pre-built solution. But let me point you to some of the resources I found when attempting to implement it myself:&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;First of all there's an article from GPU Gems 3: &lt;a href=&quot;http://http.developer.nvidia.com/GPUGems3/gpugems3_ch25.html&quot;&gt;Rendering Vector Art on the GPU&lt;/a&gt; (and the associated [Loop-Blinn paper][1]).&#xD;&#xA;&#xD;&#xA;The hardest part is that, while drawing quadratic curves are easy, cubic curves (like those found in your typical SVG) are considerably harder. The article goes into detail on this, but you'll need to bring your maths hat.&#xD;&#xA;&#xD;&#xA;The alternative to rendering cubic curves is to convert the cubic curves to quadratic ones. Also a non-trivial problem.&#xD;&#xA;&#xD;&#xA;Once you can render vector curves on the GPU, it's a simple matter of parsing the SVG in your content pipeline and turning it into a mesh that you can render. **Parsing SVG is easy**, by the way.&#xD;&#xA;&#xD;&#xA;Another, potentially easier alternative is to forego curves all together and simply triangulate a linear approximation of your SVG.&#xD;&#xA;&#xD;&#xA;Both these solutions require triangulation - &lt;a href=&quot;http://triangulator.codeplex.com/&quot;&gt;here's a reasonable triangulator suited to XNA&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a completely different alternative, you can use a &quot;distance field&quot; to render sprites with nearly-vector-like sharp edges.&#xD;&#xA;&#xD;&#xA;Here is a paper from Valve from SIGGRAPH 2007 on how to do this: &lt;a href=&quot;http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&quot;&gt;Improved Alpha-Tested Magniﬁcation for Vector Textures and Special Effects&lt;/a&gt; (PDF)&#xD;&#xA;&#xD;&#xA;The basic method here is very easy to implement. The difficulty comes when trying to make it support sharp corners (something only touched on in the paper). This method also has some pretty severe limitations for anything but drawing simple shapes. It's best suited to UI text and decals (like Valve is using it for).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now that I've said all that -  I have to say that, in my experience, all the effort here is not worth it!&#xD;&#xA;&#xD;&#xA;Unless your *gameplay* is going to be based primarily around ***extreme*** vector zooming effects like the very cool &lt;a href=&quot;http://pouet.net/prod.php?which=50131&quot;&gt;Masagin&lt;/a&gt; demo, you can get away with pre-rendering your SVG and simply using bitmap techniques (easier, better supported, etc).&#xD;&#xA;&#xD;&#xA;(One of the first techniques that comes to mind is [mipmapping][3] ([wiki][2]) high-resolution versions of your sprites, to give you resolution independence up until your maximum sprite size.)&#xD;&#xA;&#xD;&#xA;[This blog post][4] is probably a good place to get started adding SVG rendering support to your XNA content pipeline.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://research.microsoft.com/~cloop/LoopBlinn05.pdf&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Mipmap&#xD;&#xA;  [3]: http://blogs.msdn.com/b/shawnhar/archive/2009/09/14/texture-filtering-mipmaps.aspx&#xD;&#xA;  [4]: http://wam-games.com/2010/04/svg-in-xna/" />
  <row Id="4217" PostHistoryTypeId="8" PostId="2035" RevisionGUID="da001e3b-33c0-4931-af78-b2be53b03160" CreationDate="2010-08-05T04:04:43.717" UserId="51" Comment="Rollback to [54d2a927-a553-430f-a21a-f33447ac1650]" Text="A firm grasp of +, -, *, and /.  &#xD;&#xA;Without them, you're completely screwed." />
  <row Id="4218" PostHistoryTypeId="5" PostId="2140" RevisionGUID="c8c67323-7c5d-40f9-8d5b-475e6b979c0a" CreationDate="2010-08-05T04:20:32.690" UserId="51" Comment="deleted 196 characters in body" Text="A useful list of AI middleware.  Please provide URL, free/open-source or licenced, and brief description of abilites.&#xD;&#xA;&#xD;&#xA;Format:&#xD;&#xA;&#xD;&#xA;    *Package* (License)&#xD;&#xA;    Link&#xD;&#xA;&#xD;&#xA;    Pros&#xD;&#xA;&#xD;&#xA;    Cons" />
  <row Id="4219" PostHistoryTypeId="2" PostId="2229" RevisionGUID="c8f73e30-e5af-4ca8-a464-9bc71e31b07d" CreationDate="2010-08-05T04:22:20.113" UserId="160" Text="1. Use the right data structures and algorithms up front.&#xD;&#xA;2. Don't micro-optimize until you profile and know exactly where your hot spots are.&#xD;&#xA;3. Don't worry about being clever. The compiler already does all the little tricks you're thinking of (&quot;Oh! I need to multiply by four! I'll shift left two!&quot;)&#xD;&#xA;4. Pay attention to cache misses." />
  <row Id="4220" PostHistoryTypeId="2" PostId="2230" RevisionGUID="037a7590-744a-4581-bbf0-332bba8644fa" CreationDate="2010-08-05T05:00:47.010" UserId="1163" Text="How would I go about using a random seed to generate a game level? The same seed should always generate the exact same level.&#xD;&#xA;&#xD;&#xA;For this example it would be a [Worms][1] style level. So each level would have a theme (grasslands, snow etc), base terrain, different objects such as trees.&#xD;&#xA;&#xD;&#xA;So where would I start to create this kind of level generator? What would be involved? What concepts does it use?&#xD;&#xA;&#xD;&#xA;Bonus points for any any good links (*bonus* bonus points for anything related to how it was done in worms or similar).&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Worms_(series)" />
  <row Id="4221" PostHistoryTypeId="1" PostId="2230" RevisionGUID="037a7590-744a-4581-bbf0-332bba8644fa" CreationDate="2010-08-05T05:00:47.010" UserId="1163" Text="How to generate random level from a seed?" />
  <row Id="4222" PostHistoryTypeId="3" PostId="2230" RevisionGUID="037a7590-744a-4581-bbf0-332bba8644fa" CreationDate="2010-08-05T05:00:47.010" UserId="1163" Text="&lt;algorithm&gt;&lt;generated&gt;&lt;random&gt;&lt;procedural-generation&gt;" />
  <row Id="4223" PostHistoryTypeId="2" PostId="2231" RevisionGUID="aea3433f-f5ea-4c41-902f-a98e2d1be74a" CreationDate="2010-08-05T05:12:29.580" UserId="865" Text="Random level generation is also known as Procedural Content Generation (PCG). And here's a wiki dealing with just that.&lt;br&gt;&#xD;&#xA;http://pcg.wikidot.com/&lt;br&gt;&#xD;&#xA;Should give you *some* ideas! :o)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4224" PostHistoryTypeId="2" PostId="2232" RevisionGUID="eaaa8cdc-a5f9-476e-99b8-6c73a3b14194" CreationDate="2010-08-05T05:15:31.150" UserId="647" Text="Chris Crawford has an artical which you might find interesting. It's nearly 20 years old but still relevant. &#xD;&#xA;[How to Build a World][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://erasmatazz.com/page78/page31/page289/page293/BuildAWorld.html" />
  <row Id="4225" PostHistoryTypeId="4" PostId="657" RevisionGUID="0830184c-92af-48fe-b919-38c6d0ef71fb" CreationDate="2010-08-05T05:18:09.383" UserId="51" Comment="edited title" Text="Approaching the Fun Factor in Game Design" />
  <row Id="4226" PostHistoryTypeId="2" PostId="2233" RevisionGUID="bf449501-081d-4d45-9493-bac072834fbd" CreationDate="2010-08-05T05:37:15.467" UserId="865" Text="Another benefit is, besides caching and reference counting is that it can handle dependencies (model a needs texture b? I'll get it for ya!) and load order issues (model a needs to know what shader b requires? Let me load shader b before loading the model!)" />
  <row Id="4227" PostHistoryTypeId="5" PostId="2232" RevisionGUID="02806528-ec2e-4d34-be03-f3c8d4e96f49" CreationDate="2010-08-05T05:38:41.110" UserId="395" Comment="edited body" Text="Chris Crawford has an article which you might find interesting. It's nearly 20 years old but still relevant. &#xD;&#xA;[How to Build a World][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://erasmatazz.com/page78/page31/page289/page293/BuildAWorld.html" />
  <row Id="4228" PostHistoryTypeId="2" PostId="2234" RevisionGUID="71f3539b-412e-411f-9402-e3d2f1bd1cbd" CreationDate="2010-08-05T05:47:08.053" UserId="142" Text="The key to this is using your own custom pseudo-random number generator that you initialize with the known seed value. The &quot;Mersenne Twister&quot; is a popular algorithm, here is the [Wikipedia entry][1] and some [sample source][2]. This, and other, PRNG algorithms actually produce a (very long) fixed series of numbers for which the seed value serves as a starting point.&#xD;&#xA;&#xD;&#xA;So long as you follow the exact same procedure for generating your world every time, each value will represent a unique reproducible world.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mersenne_twister&#xD;&#xA;  [2]: http://www.bedaux.net/mtrand/" />
  <row Id="4229" PostHistoryTypeId="2" PostId="2235" RevisionGUID="ce506dc4-0fb3-406e-85cf-1debe988146c" CreationDate="2010-08-05T06:42:47.647" UserId="919" Text="Somethings to add to already great advice given.&#xD;&#xA;&#xD;&#xA;- Set physics parameters (minimum and maximums) first before starting to design level. (I.e. Jump height, run speed, etc.)&#xD;&#xA;&#xD;&#xA;- Make sure enemy placements are not impossibly in favor to the enemy, conversely make sure the AI scripts/tools allot for the enemy to take advantage of their placement.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4230" PostHistoryTypeId="16" PostId="2235" RevisionGUID="ce506dc4-0fb3-406e-85cf-1debe988146c" CreationDate="2010-08-05T06:42:47.647" UserId="-1" />
  <row Id="4231" PostHistoryTypeId="2" PostId="2236" RevisionGUID="53fd426f-b814-4824-8da8-de3eac511501" CreationDate="2010-08-05T08:07:00.663" UserId="20" Text="Here's a PRNG (pseudo random number generator) implemented in ActionScript (available in AS2 or AS3). It's lightweight and fast, ideal for games: http://lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/&#xD;&#xA;&#xD;&#xA;The above implementation is based on the [Park-Miller-Carta PRNG][1]. This site will give you some more insight about the math behind all this.&#xD;&#xA;&#xD;&#xA;To build a worms-like level, I would probably use a [Perlin-Noise][2] function though. If you generate a perlin noise image with the height of 1px and the width of your game-world, then you basically get a height map, ready to use. Perlin noise functions also always generate the same map with the same seed.&#xD;&#xA;&#xD;&#xA;You can then use the PRNG mentioned above to determine where to place random Objects on the map, or where to create a hole in the ground. For holes you could also take advantage of perlin noise though. Just create a perlin-noise image with the size of your map (x, y), and then create a hole in your map where the pixel-value is below a given threshold (eg. 0.2).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.firstpr.com.au/dsp/rand31/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Perlin_noise" />
  <row Id="4232" PostHistoryTypeId="2" PostId="2237" RevisionGUID="a4d0df71-dd4c-497e-bd9b-494153cac119" CreationDate="2010-08-05T08:19:29.203" UserId="252" Text="You may be interested in some of the answers to [Games that feature procedural generation of content?](http://gaming.stackexchange.com/questions/4369/games-that-feature-procedural-generation-of-content) at gaming.SE as reference or inspiration." />
  <row Id="4233" PostHistoryTypeId="2" PostId="2238" RevisionGUID="07982749-d820-4a8c-9cd2-0c15ee99d8a9" CreationDate="2010-08-05T10:25:31.883" UserId="1456" Text="For me is the best follow good prepared data model. And optimalization-before main step forward. I mean before  start implementing something big new.&#xD;&#xA;Other reason for optimalization is when I'm loosing control on resources , App needs lot of CPU load/GPU load or memory and i don't know why :) or it's too much." />
  <row Id="4234" PostHistoryTypeId="2" PostId="2239" RevisionGUID="2dd6a667-dc88-4c04-94de-92d8eb9ab0f0" CreationDate="2010-08-05T10:28:02.910" UserId="1101" Text="&gt; I'm looking to implement some type of&#xD;&#xA;&gt; system that would allow the server to&#xD;&#xA;&gt; send periodic updates of remote users'&#xD;&#xA;&gt; positions rather than &quot;realtime&quot;&#xD;&#xA;&gt; updates.&#xD;&#xA;&#xD;&#xA;Pretty much all MMOs do this; it's not limited to those that want to run in the browser.&#xD;&#xA;&#xD;&#xA;It's quite simple to get a basic scheme up and running:&#xD;&#xA;&#xD;&#xA; - The server has an interest list for every player, consisting of other players and NPCs.&#xD;&#xA; - If someone moves too far from the player, they're removed from the list, and if they move within range, they're added to it.&#xD;&#xA; - If a player moves, an update about that is sent just to the players who have this guy on their interest list. It doesn't have to be sent immediately - it can just be flagged up in the interest list as needing an update, so that it is sent in the next periodic update message&#xD;&#xA; - These updates can be skipped if one was already sent too recently. Your definition of 'too recently' can be based upon distance, or on a more complex scheme which evaluates how good a predicted position is likely to be (see below).&#xD;&#xA; - Clients linearly interpolate positions, predicting a character's path, and smoothly blend between the prediction and the reported position to correct errors, meaning updates don't have to be real-time to appear fairly accurate." />
  <row Id="4238" PostHistoryTypeId="2" PostId="2241" RevisionGUID="0d8d9a76-70e8-4802-b62e-9508ddd88f83" CreationDate="2010-08-05T11:07:26.470" UserId="1101" Text="If in doubt, why not go with the CSS box model, or a simplification of it?&#xD;&#xA;&#xD;&#xA;You can specify positions in percentages or pixels. You might position containers with percentages but position the items within them by pixels, for example." />
  <row Id="4239" PostHistoryTypeId="2" PostId="2242" RevisionGUID="284cccca-a71c-4a90-affb-f4d8d4890f8f" CreationDate="2010-08-05T11:10:34.610" UserId="1458" Text="What is the significance of `MeshTextureCoords` element in a .x Mesh file?" />
  <row Id="4240" PostHistoryTypeId="1" PostId="2242" RevisionGUID="284cccca-a71c-4a90-affb-f4d8d4890f8f" CreationDate="2010-08-05T11:10:34.610" UserId="1458" Text="MeshTextureCoords element in DirectX .x file" />
  <row Id="4241" PostHistoryTypeId="3" PostId="2242" RevisionGUID="284cccca-a71c-4a90-affb-f4d8d4890f8f" CreationDate="2010-08-05T11:10:34.610" UserId="1458" Text="&lt;directx&gt;&lt;3d-meshes&gt;" />
  <row Id="4242" PostHistoryTypeId="2" PostId="2243" RevisionGUID="49e6cd14-9e07-4f35-80eb-761f06948441" CreationDate="2010-08-05T11:28:10.247" UserId="1374" Text="Yes, it's somewhat to be expected (although your throughput is really low).&#xD;&#xA;&#xD;&#xA;You're using about the worst method of drawing with vertex arrays: drawing indexed with client-side vertex data requires the GL implementation to:&#xD;&#xA;&#xD;&#xA;* parse all the indices to find the min/max on each draw&#xD;&#xA;* transfer all the vertex data from min to max on each draw.&#xD;&#xA;&#xD;&#xA;Note that if you remove the draw, the GL will not do any of it, and it _will_ be real fast.&#xD;&#xA;&#xD;&#xA;if you don't want to use VBOs (they still help in that the GL can figure out easier how much to transfer), you can use [glDrawRangeElements][1], which specifies the range of indices that the GL will transfer (ie the first of the 2 bullets).&#xD;&#xA;&#xD;&#xA;Also, are the indices changing each frame too ? If they don't, you can store them in an index buffer. (but be careful: at that point, if you don't use glDrawRangeElements, the GL usually has to bring the index buffer back from the device, find min/max, and transfer vertex data. That's even worse than your current state)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElements.xml" />
  <row Id="4243" PostHistoryTypeId="2" PostId="2244" RevisionGUID="fb77a286-800b-445f-a57d-c85653d72e76" CreationDate="2010-08-05T11:56:01.437" UserId="1456" Text="Makeing games is about to bring &quot;real&quot; life to virtual reality. Better is to know more about real world/universe then less :)..&#xD;&#xA;Math is only tool. And if You are  makeing a plan, You have to put time for studying  in plans too." />
  <row Id="4244" PostHistoryTypeId="16" PostId="2244" RevisionGUID="fb77a286-800b-445f-a57d-c85653d72e76" CreationDate="2010-08-05T11:56:01.437" UserId="-1" />
  <row Id="4245" PostHistoryTypeId="2" PostId="2245" RevisionGUID="5172b138-86c9-42a6-9c2f-2103b260ab97" CreationDate="2010-08-05T12:14:59.470" UserDisplayName="jeremyc" Text="you can get facefx data out to fbx format, and it looks like you might be able to find an fbx importer for blender.  that is probably your best bet." />
  <row Id="4246" PostHistoryTypeId="2" PostId="2246" RevisionGUID="a32709da-4b13-474b-8297-c2c2bc95e05d" CreationDate="2010-08-05T12:34:42.133" UserId="1461" Text="I recently wrote a resource manager which works pretty well for my case. Main features:&#xD;&#xA;&#xD;&#xA;* Resources are requested by string ID, for example, `ResourceManager::instance().getTexture(&quot;textures/player.png&quot;)`. The texture ID is currently mapped straight to a file on disk, which is convenient during development, but this will later be replaced by lookup in some archive.&#xD;&#xA;&#xD;&#xA;* The resource manager holds on to a map of IDs to resources, so it won't reload a resource that has already been loaded.&#xD;&#xA;&#xD;&#xA;* The above call does not return a `Texture` object, but rather a `Resource&lt;Texture&gt;` object; the caller is expected to store the `Resource&lt;Texture&gt;` object and not the actual texture. The `Resource&lt;Texture&gt;` acts like a smart pointer to a `Texture`; its `operator*()` returns the `Texture` object itself. The advantage is that the actual texture can be reloaded, or unloaded, without the need of updating all clients.&#xD;&#xA;&#xD;&#xA;* The resource manager checks periodically whether files on disk have changed, and reloads them if necessary. This allows me to modify textures or shaders and see the result without even restarting the game.&#xD;&#xA;&#xD;&#xA;* Resources can be dependent on each other. Most, if not all, resources depend on a `File` resource, which is the file they were loaded from. If, for example, a model depends on a texture, the model will be reloaded whenever the texture's file changes on disk.&#xD;&#xA;&#xD;&#xA;* When a resource cannot be found, or fails to load, a default resource is silently substituted. This allows me to use resources that I haven't yet created, without crashing the game. (Planned feature: indicate &quot;essential&quot; resources such as GPGPU shaders, without which the game cannot properly run at all.)&#xD;&#xA;&#xD;&#xA;* Reference counting, and unloading of unused resources, can be added easily. Since my game is pretty small, I haven't had a need for this yet.&#xD;&#xA;&#xD;&#xA;I think that this feature list shows that, yes, resource managers can be good!" />
  <row Id="4247" PostHistoryTypeId="2" PostId="2247" RevisionGUID="03ea44c1-257a-48b3-8914-653e6df8ab34" CreationDate="2010-08-05T12:45:44.170" UserId="360" Text="You could determine the winding of the polygon, and then reverse it if it is anti-clockwise.&#xD;&#xA;&#xD;&#xA;There is a simple method described [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/community/forums/topic.asp?topic_id=426395&amp;whichpage=2&amp;#2843741" />
  <row Id="4248" PostHistoryTypeId="2" PostId="2248" RevisionGUID="ed2eed75-3f00-4a76-9ca7-38565e4bef23" CreationDate="2010-08-05T12:51:48.073" UserId="741" Text="I'm going to go way out on a limb here, and suggest that they specify [texture coordinates for the mesh][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb147194(VS.85).aspx" />
  <row Id="4249" PostHistoryTypeId="5" PostId="2247" RevisionGUID="804939d4-15c7-4ded-ae44-637a326a7626" CreationDate="2010-08-05T12:56:38.890" UserId="360" Comment="Added example." Text="You could determine the winding of the polygon, and then reverse it if it is anti-clockwise.&#xD;&#xA;&#xD;&#xA;One common method is to calculate the area of the polygon using the algorithm below. It will return a +ve number for clockwise winding, and a -ve number for anticlockwise winding.&#xD;&#xA;&#xD;&#xA;Here is a Python example:&#xD;&#xA;&#xD;&#xA;    def poly_area(verts):&#xD;&#xA;        &quot;&quot;&quot;&#xD;&#xA;        Return area of a simple (ie. non-self-intersecting) polygon.&#xD;&#xA;        Will be negative for counterclockwise winding.&#xD;&#xA;        &quot;&quot;&quot;&#xD;&#xA;        accum = 0.0&#xD;&#xA;        for i in range(len(verts)):&#xD;&#xA;            j = (i + 1) % len(verts)&#xD;&#xA;            accum += verts[j][0] * verts[i][1] - verts[i][0] * verts[j][1]&#xD;&#xA;        return accum / 2" />
  <row Id="4250" PostHistoryTypeId="2" PostId="2249" RevisionGUID="e793196e-8a29-460d-9107-0c23f9b4da46" CreationDate="2010-08-05T13:53:00.840" UserId="1352" Text="Sculptris ( previosuly Tomas Pettersson, now Pixologic )&#xD;&#xA;&#xD;&#xA;http://sculptris.com/download.html&#xD;&#xA;&#xD;&#xA;3D Modelling/painting&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;Free(!)&#xD;&#xA;&#xD;&#xA;Sculptris is a one man project that has recently been aquired by Pixologic ( Makers of Z-Brush )&#xD;&#xA;Direct download link from Pixologic's home page:&#xD;&#xA;&#xD;&#xA;http://download.pixologic01.com/download.php?f=Sculptris/sculptris.zip" />
  <row Id="4251" PostHistoryTypeId="16" PostId="2249" RevisionGUID="e793196e-8a29-460d-9107-0c23f9b4da46" CreationDate="2010-08-05T13:53:00.840" UserId="-1" />
  <row Id="4252" PostHistoryTypeId="2" PostId="2250" RevisionGUID="c1891822-237b-433c-a92c-37e8d2f0a74d" CreationDate="2010-08-05T13:57:48.867" UserId="360" Text="No, there is no Creators Club equivalent for PS3, however Sony does have PS3/PSP Minis. There's a [rather large] outlay for a devkit though. More details can be found in the Minis Guidelines available on the [License Enquiry Page][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.tpr.scee.net/AreaNewLicensee/MainSystem/CFModules/ScreenLayout/nl_master_template.cfm" />
  <row Id="4253" PostHistoryTypeId="5" PostId="2236" RevisionGUID="4652fb59-6074-4ec6-a73c-5ee1c533b25d" CreationDate="2010-08-05T14:46:01.110" UserId="20" Comment="deleted 1 characters in body" Text="Here's a PRNG (pseudo random number generator) implemented in ActionScript (available in AS2 or AS3). It's lightweight and fast, ideal for games: http://lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/&#xD;&#xA;&#xD;&#xA;The above implementation is based on the [Park-Miller-Carta PRNG][1]. This site will give you some more insight about the math behind all this.&#xD;&#xA;&#xD;&#xA;To build a worms-like level, I would probably use a [Perlin-Noise][2] function though. If you generate a perlin noise image with the height of 1px and the width of your game-world, then you basically get a height map, ready to use. Perlin noise functions also always generate the same map with the same seed.&#xD;&#xA;&#xD;&#xA;You can then use the PRNG mentioned above to determine where to place random Objects on the map, or where to create a hole in the ground. For holes you could also take advantage of perlin noise again. Just create a perlin-noise image with the size of your map (x, y), and then create a hole in your map where the pixel-value is below a given threshold (eg. 0.2).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.firstpr.com.au/dsp/rand31/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Perlin_noise" />
  <row Id="4254" PostHistoryTypeId="2" PostId="2251" RevisionGUID="2048a89d-665d-416b-a128-6b71a2492867" CreationDate="2010-08-05T15:17:40.700" UserId="1156" Text="Don't they kind of make it obvious?&#xD;&#xA;The name 'MeshTextureCoords' makes me think of Texture Coords of a Mesh." />
  <row Id="4255" PostHistoryTypeId="2" PostId="2252" RevisionGUID="a47c52fd-11d8-4b05-a74b-5aec22d7a868" CreationDate="2010-08-05T15:28:58.730" UserId="33" Text="List here the most common splines found in game development, how many points the method needs to interpolate a curve, and how can you build a data type that allows you to get an interpolation of the curve points. Examples: Bezier curves, B-Splines, Cubic Splines, etc.&#xD;&#xA;&#xD;&#xA;P.S.: I'm putting this as a community wiki so we can list all kinds of spline interpolation." />
  <row Id="4256" PostHistoryTypeId="1" PostId="2252" RevisionGUID="a47c52fd-11d8-4b05-a74b-5aec22d7a868" CreationDate="2010-08-05T15:28:58.730" UserId="33" Text="What are the most common splines you will find in game development?" />
  <row Id="4257" PostHistoryTypeId="3" PostId="2252" RevisionGUID="a47c52fd-11d8-4b05-a74b-5aec22d7a868" CreationDate="2010-08-05T15:28:58.730" UserId="33" Text="&lt;math&gt;" />
  <row Id="4258" PostHistoryTypeId="16" PostId="2252" RevisionGUID="a47c52fd-11d8-4b05-a74b-5aec22d7a868" CreationDate="2010-08-05T15:28:58.730" UserId="33" />
  <row Id="4259" PostHistoryTypeId="2" PostId="2253" RevisionGUID="3f553ef1-432f-4703-a9f8-7d95442ee4d6" CreationDate="2010-08-05T15:31:57.713" UserId="360" Text="I have a very basic understanding of audio and was hoping I could get some help to resolve a problem with the audio design in my engine. Let me give you a run-down of how I've currently got it fitting together.&#xD;&#xA;&#xD;&#xA;I have an AudioManager that handles setting up and tear down of the XAudio2 interface as well as the master voice, and various submix voices that I can use to group sounds. I have a ResourceManager that can be used to load audio files into the required buffers ready for XAudio2 consumption. During my game, I call a method on my AudioManager to play a sound - this obtains the necessary Audio Voice and links it to the right buffer and begins playback.&#xD;&#xA;&#xD;&#xA;The first problem I am having is that when there is a lot going on, and a lot of sounds are played at once, I get performance issues - framerates drop, and there is audio stuttering. I currently don't limit the number of concurrent sounds that can be played - can you give me any other advice on a better design, or solutions to limit impact on performance?&#xD;&#xA;&#xD;&#xA;The second problem I am having is that if multiples of the same sound are played at the same time, it sounds like the volume has been turned up on that particular sound. I assumed this is to do with wave amplification and tried implementing a Volume Limiter effect on my submix voices. This works to a degree, and I can eliminate any distortion, but the increased volume effect is still noticeable. Can anyone suggest decent values to use for the volume limiter effects, or any other solutions to the problem?&#xD;&#xA;" />
  <row Id="4260" PostHistoryTypeId="1" PostId="2253" RevisionGUID="3f553ef1-432f-4703-a9f8-7d95442ee4d6" CreationDate="2010-08-05T15:31:57.713" UserId="360" Text="Audio Design and XAudio2 Performance Issues" />
  <row Id="4261" PostHistoryTypeId="3" PostId="2253" RevisionGUID="3f553ef1-432f-4703-a9f8-7d95442ee4d6" CreationDate="2010-08-05T15:31:57.713" UserId="360" Text="&lt;game-design&gt;&lt;engine&gt;&lt;c++&gt;&lt;directx&gt;&lt;audio&gt;" />
  <row Id="4262" PostHistoryTypeId="2" PostId="2254" RevisionGUID="23ef9b7c-cc8a-4f1c-9a99-946294ba0308" CreationDate="2010-08-05T15:31:58.807" UserId="33" Text="The most simple case is a linear interpolation for a straight line:&#xD;&#xA;&#xD;&#xA;(x0, y0) * ------------------------ * (x1, y1)&#xD;&#xA;&#xD;&#xA;Say t is between [0, 1]:&#xD;&#xA;&#xD;&#xA;	function lerp((x0, y0), (x1, y1), t):&#xD;&#xA;		return (x0+(x1-x0)*t, y0+(y1-y0)*t)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4263" PostHistoryTypeId="16" PostId="2254" RevisionGUID="23ef9b7c-cc8a-4f1c-9a99-946294ba0308" CreationDate="2010-08-05T15:31:58.807" UserId="-1" />
  <row Id="4264" PostHistoryTypeId="2" PostId="2255" RevisionGUID="d630d340-930b-41b4-b5b6-513b4577fe25" CreationDate="2010-08-05T15:56:36.540" UserId="120" Text="I had a bunch of bookmarks on the very topic or worms style map generation, unfortunaly the site with the best tutorial seems to be long gone, [but archive.org has a snapshot][1]. its missing the screenshot, but luckily some of those are preserved in a [gamedev.net picture of the day][2] :)&#xD;&#xA;&#xD;&#xA;also in that bookmark folder ive got [this on terrian destruction][3] and some info on how [physics work in worms][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://web.archive.org/web/20080313144717/http://www.indierover.com/ktb-tutorial-1-2d-randomly-generated-terrain-for-worms-style-game/&#xD;&#xA;  [2]: http://www.gamedev.net/community/forums/topic.asp?topic_id=440465&#xD;&#xA;  [3]: http://jnrdev.72dpiarmy.com/en/jnrdev5/&#xD;&#xA;  [4]: http://worms2d.info/Physics_Engine" />
  <row Id="4265" PostHistoryTypeId="2" PostId="2256" RevisionGUID="ed268a9a-e833-4985-b755-70eecd2d603c" CreationDate="2010-08-05T16:12:12.487" UserId="189" Text="I've created a simple 3D terrain and then wanted my character to walk across the terrain. So, to find the character's height at any point on the terrain, I used [bilinear interpolation][1].&#xD;&#xA;&#xD;&#xA;Here is the Java code I use for the bilinear interpolation:&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;	/**&#xD;&#xA;	 * Interpolates the value of a point in a two dimensional surface using bilinear spline interpolation.&#xD;&#xA;	 * The value is calculated using the position of the point and the values of the 4 surrounding points.&#xD;&#xA;	 * Note that the returned value can be more or less than any of the values of the surrounding points. &#xD;&#xA;	 * &#xD;&#xA;	 * @param p A 2x2 array containing the heights of the 4 surrounding points&#xD;&#xA;	 * @param x The horizontal position, between 0 and 1&#xD;&#xA;	 * @param y The vertical position, between 0 and 1&#xD;&#xA;	 * @return the interpolated height&#xD;&#xA;	 */&#xD;&#xA;	private static float bilinearInterpolate (float[][] p, float x, float y) {&#xD;&#xA;		return p[0][0]*(1.0f-x)*(1.0f-y) + p[1][0]*x*(1.0f-y) + p[0][1]*(1.0f-x)*y + p[1][1]*x*y;&#xD;&#xA;	}&#xD;&#xA;    &#xD;&#xA;    /**&#xD;&#xA;     * Finds a 2-dimensional array of the heights of the four points that &#xD;&#xA;     * surround (x,y).&#xD;&#xA;     *&#xD;&#xA;     * Uses the member variable &quot;verts&quot;, an 2D array of Vertex objects which have&#xD;&#xA;     * a member &quot;height&quot; that is the specific vertex's height.&#xD;&#xA;     */&#xD;&#xA;	private float[][] nearestFour(float x, float y) {&#xD;&#xA;		int xf = (int) Math.floor(x);&#xD;&#xA;		int yf = (int) Math.floor(y);&#xD;&#xA;		&#xD;&#xA;		if(xf &lt; 0 || yf &lt; 0 || xf &gt; verts[0].length-2 || yf &gt; verts.length-2) {&#xD;&#xA;            // TODO do something better than just return 0s&#xD;&#xA;			return new float[][]{&#xD;&#xA;					{0.0f, 0.0f},&#xD;&#xA;					{0.0f, 0.0f}&#xD;&#xA;				};&#xD;&#xA;		} else {&#xD;&#xA;			return new float[][]{&#xD;&#xA;					{verts[yf][xf].height, verts[yf][xf+1].height},&#xD;&#xA;					{verts[yf+1][xf].height, verts[yf+1][xf+1].height},&#xD;&#xA;				};&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bilinear_interpolation&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Bicubic_interpolation" />
  <row Id="4266" PostHistoryTypeId="16" PostId="2256" RevisionGUID="ed268a9a-e833-4985-b755-70eecd2d603c" CreationDate="2010-08-05T16:12:12.487" UserId="-1" />
  <row Id="4267" PostHistoryTypeId="2" PostId="2257" RevisionGUID="22db13f8-0416-4e56-83e2-40aefe67ab31" CreationDate="2010-08-05T17:15:35.587" UserId="1124" Text="Here's what I've done in the past to make video-only trailers: &#xD;&#xA;&#xD;&#xA; 1. Make your game runnable with a fixed&#xD;&#xA;    time step. That means passing in the&#xD;&#xA;    time between now and the last frame&#xD;&#xA;    explicitly rather than calculating&#xD;&#xA;    it internally to your game loop.&#xD;&#xA; 2. After rendering a frame, dump it out to a lossless picture format&#xD;&#xA;    such as .tiff with the frame number&#xD;&#xA;    as its name. This makes it easy for&#xD;&#xA;    another app to encode a series of&#xD;&#xA;    pictures into a movie.&#xD;&#xA; 3. Dump into the appropriate video encoder (I wrote a simple one using&#xD;&#xA;    DirectShow) to convert to .avi or&#xD;&#xA;    whatever video format you want." />
  <row Id="4268" PostHistoryTypeId="2" PostId="2258" RevisionGUID="97452977-d096-4676-bd79-68e0245934fd" CreationDate="2010-08-05T17:56:23.680" UserId="549" Text="How do I update the version of OpenGL on Windows so that I can use anything newer than the Version 1.1 header file that is included in the Platform SDK?  Even version 7.0A of the SDK for Windows 7 only includes GL.h and GLU.h for version 1.1 of OpenGL.  I've installed the NVidia driver for my board that includes OpenGL 4.1 support, but I don't see header files included in this package." />
  <row Id="4269" PostHistoryTypeId="1" PostId="2258" RevisionGUID="97452977-d096-4676-bd79-68e0245934fd" CreationDate="2010-08-05T17:56:23.680" UserId="549" Text="Upgrade OpenGL version on Windows?" />
  <row Id="4270" PostHistoryTypeId="3" PostId="2258" RevisionGUID="97452977-d096-4676-bd79-68e0245934fd" CreationDate="2010-08-05T17:56:23.680" UserId="549" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="4271" PostHistoryTypeId="2" PostId="2259" RevisionGUID="a0e3fc09-2546-47b9-adc4-78ac312703fe" CreationDate="2010-08-05T18:05:32.933" UserId="1156" Text="You can download glext.h from the OpenGL website, which has extensions for OpenGL.  &#xD;&#xA;Or, download a function pointer handling library like [GLee][1], which solves the problem as well as making it easier to access them; no more functor declarations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.elf-stone.com/glee.php" />
  <row Id="4272" PostHistoryTypeId="6" PostId="2252" RevisionGUID="71c65bb2-f816-43be-8c9f-c54260e90f57" CreationDate="2010-08-05T18:20:38.260" UserId="51" Comment="edited tags" Text="&lt;math&gt;&lt;splines&gt;" />
  <row Id="4273" PostHistoryTypeId="2" PostId="2260" RevisionGUID="ff1ebe5c-52b0-4f8f-811b-7544c0541757" CreationDate="2010-08-05T18:26:28.780" UserId="1206" Text="Take a look at this OpenGL getting started page:&#xD;&#xA;&#xD;&#xA;http://www.opengl.org/wiki/Getting_started#OpenGL_2.0.2B_and_extensions1&#xD;&#xA;&#xD;&#xA;You'll see that The Communist Duck is right: it's just a matter of downloading a header or two from the extension registry:&#xD;&#xA;&#xD;&#xA;http://www.opengl.org/registry/&#xD;&#xA;&#xD;&#xA;However, as he also said, it might be easier for you to download an extension handler which does all the gritty work for you, like GLee - or GLEW:&#xD;&#xA;&#xD;&#xA;GLee : http://elf-stone.com/glee.php&#xD;&#xA;&#xD;&#xA;GLEW : http://glew.sourceforge.net/" />
  <row Id="4274" PostHistoryTypeId="5" PostId="2259" RevisionGUID="215ae9bb-e256-4548-b497-5f26e89f18f6" CreationDate="2010-08-05T18:30:12.127" UserId="1156" Comment="added 405 characters in body" Text="You can download glext.h from the OpenGL website, which has extensions for OpenGL.  &#xD;&#xA;Or, download a function pointer handling library like [GLee][1], which solves the problem as well as making it easier to access them; no more functor declarations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.elf-stone.com/glee.php&#xD;&#xA;To quote the OpenGL site:&#xD;&#xA;&#xD;&#xA;&gt; Microsoft will never update gl.h and opengl32.lib that comes with their compiler. It hasn't been updated since 1995. Basically, the solution is to use glext.h and wglext.h (wglext.h is for Windows only) which define all the GL 1.2, 1.3, 1.4, 1.5, 2.0, 2.1 and above tokens and functions. Keep reading.   &#xD;&#xA;...  &#xD;&#xA;Download glext.h and wglext.h from The Extensions Registry." />
  <row Id="4275" PostHistoryTypeId="2" PostId="2261" RevisionGUID="bdf340b5-d318-4534-a7c3-0ba6ed6826fb" CreationDate="2010-08-05T18:52:41.473" UserId="1456" Text="the best way is make your game self recordable. Easy way is just save every frame with fixed framerate. With SSD it takes &quot;no&quot; time. Harder way is to make your own &quot;fraps&quot;. If You do it. You can directly communicate with your game." />
  <row Id="4276" PostHistoryTypeId="2" PostId="2262" RevisionGUID="d79a938f-60a5-4933-887a-6cc6bf74a088" CreationDate="2010-08-05T19:05:32.510" UserId="1232" Text="A GPU *can already* cull the polygons on a per-polygon basis, but this happens at rasterization/setup time which happens *after* vertex shading (using Vertex/Geometry/Hull/Domain shaders). This means that the GPU can still end up shading polygon vertices that will end up getting culled. If this happens, the GPU will have done a lot of work for nothing and is therefore a waste of GPU cycles.&#xD;&#xA;&#xD;&#xA;For this reason, we try not waste GPU cycles by culling invisible geometry on the CPU side (or GPU side using DX10+ features such as DrawIndirect and/or predicated rendering) in batches of polygons by simply not calling draw for those batches. &#xD;&#xA;&#xD;&#xA;Typically that batch of polygons can be represented by a sphere or box that surrounds all those polygons. This bounding sphere/box is then tested against the frustum and if it touches the frustum, the draw call is invoked for those polygons. If not, the draw call is skipped.&#xD;&#xA;An octree is simply another way of determining which batches of geometry are visible, except it organizes that data in a hierarchical fashion. Octrees are not necessarily suitable for all geometry. &#xD;&#xA;&#xD;&#xA;Some fairly good references that explain the sphere/frustum technique follow:&#xD;&#xA;&#xD;&#xA;* http://www.lighthouse3d.com/opengl/viewfrustum/index.php?remarks&#xD;&#xA;* http://www.flipcode.com/archives/Frustum_Culling.shtml&#xD;&#xA;* http://www.cbloom.com/3d/techdocs/culling.txt&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4277" PostHistoryTypeId="5" PostId="2256" RevisionGUID="92362afc-e300-4797-9194-d64d4c3b82ca" CreationDate="2010-08-05T19:21:52.260" UserId="189" Comment="added 467 characters in body" Text="**Edit:** Sorry, as Jason points out in the comment, the following answer is not about splines but about two-dimensional linear (or *bilinear*) interpolation. I am choosing not to delete it in case someone might find it informative.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I've created a simple 3D terrain and then wanted my character to walk across the terrain. So, to find the character's height at any point on the terrain, I used [bilinear interpolation][1].&#xD;&#xA;&#xD;&#xA;Here is the Java code I use for the bilinear interpolation:&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;	/**&#xD;&#xA;	 * Interpolates the value of a point in a two dimensional surface using bilinear spline interpolation.&#xD;&#xA;	 * The value is calculated using the position of the point and the values of the 4 surrounding points.&#xD;&#xA;	 * Note that the returned value can be more or less than any of the values of the surrounding points. &#xD;&#xA;	 * &#xD;&#xA;	 * @param p A 2x2 array containing the heights of the 4 surrounding points&#xD;&#xA;	 * @param x The horizontal position, between 0 and 1&#xD;&#xA;	 * @param y The vertical position, between 0 and 1&#xD;&#xA;	 * @return the interpolated height&#xD;&#xA;	 */&#xD;&#xA;	private static float bilinearInterpolate (float[][] p, float x, float y) {&#xD;&#xA;		return p[0][0]*(1.0f-x)*(1.0f-y) + p[1][0]*x*(1.0f-y) + p[0][1]*(1.0f-x)*y + p[1][1]*x*y;&#xD;&#xA;	}&#xD;&#xA;    &#xD;&#xA;    /**&#xD;&#xA;     * Finds a 2-dimensional array of the heights of the four points that &#xD;&#xA;     * surround (x,y).&#xD;&#xA;     *&#xD;&#xA;     * Uses the member variable &quot;verts&quot;, an 2D array of Vertex objects which have&#xD;&#xA;     * a member &quot;height&quot; that is the specific vertex's height.&#xD;&#xA;     */&#xD;&#xA;	private float[][] nearestFour(float x, float y) {&#xD;&#xA;		int xf = (int) Math.floor(x);&#xD;&#xA;		int yf = (int) Math.floor(y);&#xD;&#xA;		&#xD;&#xA;		if(xf &lt; 0 || yf &lt; 0 || xf &gt; verts[0].length-2 || yf &gt; verts.length-2) {&#xD;&#xA;            // TODO do something better than just return 0s&#xD;&#xA;			return new float[][]{&#xD;&#xA;					{0.0f, 0.0f},&#xD;&#xA;					{0.0f, 0.0f}&#xD;&#xA;				};&#xD;&#xA;		} else {&#xD;&#xA;			return new float[][]{&#xD;&#xA;					{verts[yf][xf].height, verts[yf][xf+1].height},&#xD;&#xA;					{verts[yf+1][xf].height, verts[yf+1][xf+1].height},&#xD;&#xA;				};&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Note that bicubic interpolation might present smoother or more realistic interpolation across distant points; but I choose to go with bilinear because I have a dense grid, in an attempt to optimize (perhaps prematurely).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bilinear_interpolation&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Bicubic_interpolation" />
  <row Id="4278" PostHistoryTypeId="2" PostId="2263" RevisionGUID="6f9f4891-df30-421d-8acf-f13a1e3abc23" CreationDate="2010-08-05T20:30:43.997" UserId="1163" Text="How does the name of a game relate to how popular it becomes? Have there been studies around this subject? Are people influenced by the name of a game?" />
  <row Id="4279" PostHistoryTypeId="1" PostId="2263" RevisionGUID="6f9f4891-df30-421d-8acf-f13a1e3abc23" CreationDate="2010-08-05T20:30:43.997" UserId="1163" Text="What's in a name?" />
  <row Id="4280" PostHistoryTypeId="3" PostId="2263" RevisionGUID="6f9f4891-df30-421d-8acf-f13a1e3abc23" CreationDate="2010-08-05T20:30:43.997" UserId="1163" Text="&lt;motivation&gt;&lt;business&gt;&lt;commercial&gt;" />
  <row Id="4281" PostHistoryTypeId="2" PostId="2264" RevisionGUID="d4571592-2302-4079-91d2-d2b57a2364d6" CreationDate="2010-08-05T20:54:39.613" UserId="891" Text="Well there are certainly copyright trolls around this topic.&#xD;&#xA;&#xD;&#xA;If you ever try to use the word &quot;Edge&quot; in your game title, prepare to be sued by Tim Langdell&#xD;&#xA;&#xD;&#xA;[Bytes: Tim Langdell &amp; the IGDA][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/blogs/AdamSaltsman/20090531/1609/Bytes_Tim_Langdell__the_IGDA.php" />
  <row Id="4282" PostHistoryTypeId="2" PostId="2265" RevisionGUID="f5252ef5-895b-4007-b7f1-b32efd22fb05" CreationDate="2010-08-05T20:56:20.060" UserId="659" Text="Catmull-Rom splines (a type of cubic hermite spline) can be quite useful, if you've got a set of points that you want to create a smooth path between (without defining any additional control points), such as camera paths&#xD;&#xA;&#xD;&#xA;For all the maths, see:&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Cubic_Hermite_spline&#xD;&#xA;&#xD;&#xA;If you're using D3DX, there's some handy functions for dealing with them (D3DXVec3CatmullRom)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4283" PostHistoryTypeId="16" PostId="2265" RevisionGUID="f5252ef5-895b-4007-b7f1-b32efd22fb05" CreationDate="2010-08-05T20:56:20.060" UserId="-1" />
  <row Id="4284" PostHistoryTypeId="2" PostId="2266" RevisionGUID="be686a86-7251-42f1-ac7b-f0f968b85eaf" CreationDate="2010-08-05T21:14:23.727" UserId="659" Text="As pointed out in the other replies, multi-pass rendering (drawing a single mesh multiple times with different shaders/parameters), as suggested in other replies, is definitely still used, primarily for lighting and special effects&#xD;&#xA;&#xD;&#xA;D3DX Effect passes could be used for this kind of thing. But it could also be implemented with more than one shader/effect.&#xD;&#xA;&#xD;&#xA;The original intention of passes was to help with implementing complex shaders on lower-end (pre-shader-2.0) hardware, where the restrictions on the number of texture stages and shader instructions per pass were quite limiting.&#xD;&#xA;&#xD;&#xA;In the example of multi-pass lighting, are there any significant performance gains to be had by using passes instead of switching effects?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4285" PostHistoryTypeId="2" PostId="2267" RevisionGUID="3c3fc4dd-9c54-474a-963a-3f56b61936e1" CreationDate="2010-08-05T21:22:38.483" UserId="659" Text="I like using virtual coordinates, but based around a common target resolution (preferably one of the highest resolutions that you expect the game to be run at.&#xD;&#xA;&#xD;&#xA;These days, a good choice may be 1920x1080.&#xD;&#xA;&#xD;&#xA;All artwork and screen mock-ups can be created at that resolution, and it makes it easy to measure positions/distances in pixels. &#xD;&#xA;&#xD;&#xA;If running at a different aspect ratio to the virtual coordinates, you can choose how to fit it to the screen (letterboxing, cropping the sides, or a bit of both)&#xD;&#xA;&#xD;&#xA;When coding, I find 'thinking in pixels' much easier than thinking in normalised coordinates! - I want the text to be '50 (virtual) pixels high' rather than '0.0463 units high'&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4286" PostHistoryTypeId="5" PostId="2267" RevisionGUID="b15df9d2-a8a7-459f-89d3-8684dee84c05" CreationDate="2010-08-05T21:27:43.333" UserId="659" Comment="added 5 characters in body" Text="I like using virtual coordinates, but based around a common target resolution (preferably one of the highest resolutions that you expect the game to be run at.&#xD;&#xA;&#xD;&#xA;These days, a good choice may be 1920x1080.&#xD;&#xA;&#xD;&#xA;All artwork and screen mock-ups can be created at that resolution, and it makes it easy to measure positions/distances in pixels. &#xD;&#xA;&#xD;&#xA;If running at a different aspect ratio to the virtual coordinates, you can choose how to fit it to the screen (letterboxing, cropping the sides, or a bit of both)&#xD;&#xA;&#xD;&#xA;When coding, I find 'thinking in pixels' much easier than thinking in normalised coordinates! - I want the text to be '50 (virtual) pixels in height' rather than '0.0463 units high'&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4287" PostHistoryTypeId="2" PostId="2268" RevisionGUID="f01dc925-8754-4755-a539-5c73c3a595df" CreationDate="2010-08-05T21:35:17.293" UserId="721" Text="Name is very important: A guy has named a game with the most searched keywords on appstore.&#xD;&#xA;&#xD;&#xA;[Free Zombie Hero Angry War Ninja][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pocketgamer.co.uk/r/iPhone/Free+Zombie+Hero+%E2%80%93+Kill+Angry+War+Ninja/news.asp?c=22430" />
  <row Id="4288" PostHistoryTypeId="2" PostId="2269" RevisionGUID="3db4f764-e4b4-4e80-875f-868d1f78b087" CreationDate="2010-08-05T22:31:43.920" UserId="418" Text="I'm curious what solutions game developers have come up with for serializing the different types of data that they deal with for their games. Do you guys use some monolithic GameObject hierarchy that houses a serialization interface for derived types, use sort of custom RTTI-based solution, perform explicit stream serialization for certain classes, or use some of the open source solutions (boost::serialization, s11n, etc)." />
  <row Id="4289" PostHistoryTypeId="1" PostId="2269" RevisionGUID="3db4f764-e4b4-4e80-875f-868d1f78b087" CreationDate="2010-08-05T22:31:43.920" UserId="418" Text="What are good solutions for serialization in C++?" />
  <row Id="4290" PostHistoryTypeId="3" PostId="2269" RevisionGUID="3db4f764-e4b4-4e80-875f-868d1f78b087" CreationDate="2010-08-05T22:31:43.920" UserId="418" Text="&lt;c++&gt;" />
  <row Id="4291" PostHistoryTypeId="2" PostId="2270" RevisionGUID="c4154994-02c6-430e-8783-5869eca65dc1" CreationDate="2010-08-05T22:36:00.563" UserId="549" Text="I rather like JSON for serialization.  It is pretty simple to parse and there are free libraries available such as http://jsoncpp.sourceforge.net/  I've never been a fan of boost or RTTI in C++.  Tinyxml also work well for xml serialization and deserialization. http://www.grinninglizard.com/tinyxml/  Ultimately I don't want to have to spend any more time than I have to for serialization." />
  <row Id="4292" PostHistoryTypeId="16" PostId="2270" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-05T22:40:05.550" UserId="51" />
  <row Id="4293" PostHistoryTypeId="16" PostId="2269" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-05T22:40:05.550" UserId="51" />
  <row Id="4294" PostHistoryTypeId="6" PostId="2269" RevisionGUID="5f58ba3a-01b9-4a6f-ac8d-1c17c1ecee84" CreationDate="2010-08-05T22:40:32.787" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;serialization&gt;" />
  <row Id="4295" PostHistoryTypeId="5" PostId="1871" RevisionGUID="daa3034e-6f4f-4b20-994b-e4db2c09a202" CreationDate="2010-08-05T22:45:51.113" UserId="660" Comment="deleted 24 characters in body" Text="[SFML](http://www.sfml-dev.org/) is a nice modern, Object-Oriented, cross platform graphics engine.  It is hardware accelerated (based on OpenGL), and has bindings for&#xD;&#xA;&#xD;&#xA;* C++&#xD;&#xA;* C&#xD;&#xA;* .Net (C#, VB.Net, C++/CLI, ...)&#xD;&#xA;* Python&#xD;&#xA;* D&#xD;&#xA;* Ruby&#xD;&#xA;" />
  <row Id="4296" PostHistoryTypeId="2" PostId="2271" RevisionGUID="f2bc539a-93f9-4f74-9aac-f5cea216a7d9" CreationDate="2010-08-05T23:04:45.483" UserId="162" Text="[Protocol buffers][1] from Google can be a pretty good approach for serializing c++ objects. You may have to make some intermediated objects as part of the serialization process, but it also works across many platforms and language.s&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/protobuf/" />
  <row Id="4297" PostHistoryTypeId="16" PostId="2271" RevisionGUID="f2bc539a-93f9-4f74-9aac-f5cea216a7d9" CreationDate="2010-08-05T23:04:45.483" UserId="-1" />
  <row Id="4298" PostHistoryTypeId="2" PostId="2272" RevisionGUID="f7c6c898-acd5-45ee-bbc8-c2b34ef3953e" CreationDate="2010-08-05T23:25:06.530" UserId="400" Text="It sounds like you know the main answer to the first issue - you need to limit the number of voices.   The AudioManager will need some sort of prioritization scheme that drops low priority sounds in favor of the high priority ones.&#xD;&#xA;&#xD;&#xA;And that ties into the second question.  Are you playing the two instances of the same sound at exactly the same time?  Why? - they won't be distinguishable except for the increased volume   Or are they slightly offset - like maybe 2 near-simultaneous gunshots - in which case, what's wrong with 2 events sounding louder than one event?  That's realistic.   It seems to me that you either actually do want the increased volume, or you want the AudioManager to filter out the duplicates to avoid overloading the voice hardware with needless work." />
  <row Id="4299" PostHistoryTypeId="2" PostId="2273" RevisionGUID="d1f0fcae-818d-4fdd-b703-5418a0f2fac9" CreationDate="2010-08-05T23:27:02.923" UserId="1479" Text="We in our game simply use [boost.serilization][1], it's easy to use and very fast, but it's in my opinion just useful for savegames.&#xD;&#xA;If you try creating characters, i recommend you something XML'ish or JSON based things, because they are easy to read and editable even if you don't have the editor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boost.org/doc/libs/release/libs/serialization" />
  <row Id="4300" PostHistoryTypeId="16" PostId="2273" RevisionGUID="d1f0fcae-818d-4fdd-b703-5418a0f2fac9" CreationDate="2010-08-05T23:27:02.923" UserId="-1" />
  <row Id="4301" PostHistoryTypeId="2" PostId="2274" RevisionGUID="c1680eab-d25a-4bda-babb-88b5c92ba054" CreationDate="2010-08-05T23:32:04.333" UserId="1445" Text="Cfxr&#xD;&#xA;&#xD;&#xA;* http://thirdcog.eu/apps/cfxr&#xD;&#xA;* Retro sound effect generation&#xD;&#xA;* Mac OS X&#xD;&#xA;* Free and open source&#xD;&#xA;* No license listed&#xD;&#xA;&#xD;&#xA;&gt;Its original purpose was to provide a simple means of getting basic sound effects into a game for those people who were working hard to get their entries done within the 48 hours and didn't have time to spend looking for suitable ways of doing this.&#xD;&#xA;" />
  <row Id="4302" PostHistoryTypeId="16" PostId="2274" RevisionGUID="c1680eab-d25a-4bda-babb-88b5c92ba054" CreationDate="2010-08-05T23:32:04.333" UserId="-1" />
  <row Id="4303" PostHistoryTypeId="2" PostId="2275" RevisionGUID="5b697eb8-e4ec-4b00-9eab-ce426a922e59" CreationDate="2010-08-05T23:32:17.487" UserId="1095" Text="How many sounds do you have playing? In my experience games will use somewhere between 32-&gt;256 audio channels. &#xD;&#xA;To solve your problem you need to work out your audio budget (the amount of processing / memory you will be giving to the audio system) and then prioritise sounds being played.&#xD;&#xA;&#xD;&#xA;The methods to prioritise can include : &#xD;&#xA;&#xD;&#xA;a) Volume - the lowest being the least important.&#xD;&#xA;&#xD;&#xA;b) Priority - a value you set yourself based on the importance of the sound and the likely hood that the user will notice the sound dropping out. Background music, for example, should be set to never be dropped. A random cricket sound for ambience should be high on the list.&#xD;&#xA;&#xD;&#xA;c) Grouping - If you have gunshot sounds for example, once they have hit a hard limit (say 15) you would stop adding new gunshot sounds as they wouldn't add to the overall mix.&#xD;&#xA;&#xD;&#xA;For your second problem there are two things you can do. &#xD;&#xA;One, you need to balance your game audio. This is a fine and somewhat black art that people can spend a lot of time doing in games. &#xD;&#xA;The first step is to make sure all your sounds are normalised (http://en.wikipedia.org/wiki/Audio_normalization). The next is to play through the game adjusting volumes on the fly to get the mix right. Building in some simple debug audio functionality (a remote application that can connect and adjust the mix of the application is ideal) can make this a lot easier.&#xD;&#xA;&#xD;&#xA;Why are you playing multiple sounds of the same type? If it necessary you can attempt to a audio compressor (link in comment). Now I don't know if XAudio has one built in, but if not they are fairly simple to implement. This gives you an increase in dynamic range - i.e if there are a lot of sounds and it is getting very loud the compressor will bring the entire mix down in an attempt to fit it in.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4304" PostHistoryTypeId="2" PostId="2276" RevisionGUID="2ae66448-d97a-4a21-ae6e-04e703b0b2a1" CreationDate="2010-08-05T23:35:40.913" UserId="1024" Text="Both jsonCpp and Protocol buffers are good options. To my knowledge both are only going to allow you to serial tree structures out of the box (please correct me if I am wrong). boost::serialization can handle arbitrary graphs, but doesn't have a nice text format like json (I think there is an xml format)&#xD;&#xA;&#xD;&#xA;Personally I think the approach for json serialization that Dojo has taken is the best  &#xD;&#xA;http://docs.dojocampus.org/dojox/json/ref &#xD;&#xA;&#xD;&#xA;I made my own version of it in c++ using jsoncpp, that also will deserialize typed objects (I have sort of big factory for all my types). It allows me to make a scene from a collection of json files that can be referenced anyway I please." />
  <row Id="4305" PostHistoryTypeId="16" PostId="2276" RevisionGUID="2ae66448-d97a-4a21-ae6e-04e703b0b2a1" CreationDate="2010-08-05T23:35:40.913" UserId="-1" />
  <row Id="4309" PostHistoryTypeId="5" PostId="2271" RevisionGUID="820bae76-12e6-4816-97af-6cf94ba344a6" CreationDate="2010-08-06T00:11:53.867" UserId="370" Comment="fixed typo" Text="[Protocol buffers][1] from Google can be a pretty good approach for serializing c++ objects. You may have to make some intermediated objects as part of the serialization process, but it also works across many platforms and languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/protobuf/" />
  <row Id="4311" PostHistoryTypeId="2" PostId="2279" RevisionGUID="193aae46-ebba-475f-b55c-8d1629944381" CreationDate="2010-08-06T00:47:09.307" UserId="1440" Text="Personally when I am thinking for a name of a game, there are some common words I would avoid.&#xD;&#xA;&#xD;&#xA;Cliché Words:&#xD;&#xA;&#xD;&#xA; - Shadow&#xD;&#xA; - Night&#xD;&#xA; - Legend&#xD;&#xA; - Chronicles&#xD;&#xA; - Dragon&#xD;&#xA; - Power&#xD;&#xA; - Ninja&#xD;&#xA; - Super&#xD;&#xA; - Etc.&#xD;&#xA;&#xD;&#xA;Also when naming a game, make sure this is something not too abstract that has nothing to do with the game or storyline. Perhaps you can create a simple catchy title that is named after the main city in your game that the story revolves around. But ultimately, game design is supposed to be fun so choose a name you like and don't worry about it. Most likely, when someone proposed the title &quot;World of Warcraft&quot; many people thought it was terribly cliché. But with that games popularity, you begin to think of the game and its users rather then about the title.&#xD;&#xA; " />
  <row Id="4312" PostHistoryTypeId="2" PostId="2280" RevisionGUID="8cdb24a5-68f9-45cd-8b26-03d01f896a5a" CreationDate="2010-08-06T00:50:40.580" UserId="1440" Text="You can directly download updated header files and drivers from this page here for Windows. There is even a little how-to-install at the top of the page.&#xD;&#xA;&#xD;&#xA;[Swiftless OpenGL Drivers Page][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swiftless.com/tutorials/opengl/gldrivers.html&#xD;&#xA;&#xD;&#xA;I hope this helps!" />
  <row Id="4314" PostHistoryTypeId="2" PostId="2281" RevisionGUID="b1541878-815f-4e33-8ac2-553454e68a04" CreationDate="2010-08-06T01:26:18.590" UserId="1288" Text="A great name can help a **solid** game gain press and get gamers talking about it. Here's our checklist for naming our titles:&#xD;&#xA;&#xD;&#xA; - **A name should be visually interesting**. For example, people remember Terry Cavanaugh's &quot;VVVVVV&quot; in part because of the shape of the name.&#xD;&#xA; - **It should be descriptive**. When Cliffski named his latest title &quot;Gratuitous Space Battles,&quot; people knew *exactly* what it was about. It doesn't have to be quite that blatant, but grounding the reader can help him/her figure out what the heck you're trying to give them.&#xD;&#xA; - **It should polarize people**. It's okay if some people absolutely hate it.&#xD;&#xA; - **And it should be remarkable**. That is to say that it should make people talk about it. People chuckle about &quot;I MAED A GAM3 W1TH Z0MB1ES!!!1&quot; and tell their friends.&#xD;&#xA;&#xD;&#xA;**Strong note: Your mileage may vary!** What works for us might not be right for you -- everyone's goals are different. But naming our BASE jumping simulator &quot;**AaaaaAAaaaAAAaaAAAAaAAAAA!!! -- A Reckless Disregard for Gravity**&quot; fit all these criteria and helped us get the word out. Journalists remembered the title; gamers argued over whether they loved the name, or if we were horrible people; it pretty much describes the game; and it got people talking." />
  <row Id="4315" PostHistoryTypeId="2" PostId="2282" RevisionGUID="e8f4f16e-66ab-40df-8924-df6f3fd9bfcc" CreationDate="2010-08-06T02:19:35.867" UserId="608" Text="Do people write their own DB for some reason?" />
  <row Id="4316" PostHistoryTypeId="1" PostId="2282" RevisionGUID="e8f4f16e-66ab-40df-8924-df6f3fd9bfcc" CreationDate="2010-08-06T02:19:35.867" UserId="608" Text="What kind of database are usually used in a MMORPG?" />
  <row Id="4317" PostHistoryTypeId="3" PostId="2282" RevisionGUID="e8f4f16e-66ab-40df-8924-df6f3fd9bfcc" CreationDate="2010-08-06T02:19:35.867" UserId="608" Text="&lt;mmo&gt;" />
  <row Id="4318" PostHistoryTypeId="2" PostId="2283" RevisionGUID="7ed425cb-a298-455b-a280-a4b2da532423" CreationDate="2010-08-06T02:27:14.773" UserId="395" Text="We did, hopefully Ben Z will give a better explanation of the reasons than I can since he was actually the original author of our database. The short version is that relational DBs are not very useful for games because they cannot efficiently store heavily structured hierarchical data, which makes up the vast majority of data an MMO needs for normal operation. We choose to build a custom object database and part of a distributed transaction processing system, which is now in production and powering our two live games.&#xD;&#xA;&#xD;&#xA;As for if you should do the same? Probably not, at least not at first. I would still advocate avoiding SQL, but there are now many more options in the &quot;NoSQL&quot; world that didn't exist a few years ago.&#xD;&#xA;&#xD;&#xA;That said, most MMOs do run on SQL (relational) databases. I know Eve runs on a SQL Server installation sitting on top of a few multi-TB RAMSANs (I will probably never in my life have as much money as those things cost)." />
  <row Id="4319" PostHistoryTypeId="2" PostId="2284" RevisionGUID="2970362c-c469-43ff-95f7-650b0ece057e" CreationDate="2010-08-06T02:39:39.587" UserId="631" Text="**Wings3D**&#xD;&#xA;&#xD;&#xA;Link:  http://www.wings3d.com/&#xD;&#xA;&#xD;&#xA;Use:  Used for creating 3D models as well as skinning.&#xD;&#xA;&#xD;&#xA;OS:  Windows/Linux/Mac&#xD;&#xA;&#xD;&#xA;License:  Free, Open Source&#xD;&#xA;&#xD;&#xA;Summary:  Wings3D is a sub-division modeler which will allow you to create and skin 3D assets." />
  <row Id="4320" PostHistoryTypeId="16" PostId="2284" RevisionGUID="2970362c-c469-43ff-95f7-650b0ece057e" CreationDate="2010-08-06T02:39:39.587" UserId="-1" />
  <row Id="4321" PostHistoryTypeId="2" PostId="2285" RevisionGUID="2bfdc246-274a-42f5-847e-98fc2cbaa66a" CreationDate="2010-08-06T03:24:58.787" UserId="1488" Text="Let's say I have developed a game and I want to &quot;get it out there&quot;.  What I have in mind is open-source games, rather than commercial games.&#xD;&#xA;&#xD;&#xA;What websites do you know of where you can promote your newly developed game, rather than simply posting it on your blog?  I am looking for websites such as [GameProjects][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprojects.com/" />
  <row Id="4322" PostHistoryTypeId="1" PostId="2285" RevisionGUID="2bfdc246-274a-42f5-847e-98fc2cbaa66a" CreationDate="2010-08-06T03:24:58.787" UserId="1488" Text="Where to promote your indie game?" />
  <row Id="4323" PostHistoryTypeId="3" PostId="2285" RevisionGUID="2bfdc246-274a-42f5-847e-98fc2cbaa66a" CreationDate="2010-08-06T03:24:58.787" UserId="1488" Text="&lt;indie&gt;" />
  <row Id="4324" PostHistoryTypeId="2" PostId="2286" RevisionGUID="90404d27-c903-4afe-9a4e-031864ff2ff3" CreationDate="2010-08-06T04:15:29.993" UserId="55" Text="I would create a post in several forums that I know of -&#xD;&#xA;&#xD;&#xA; - gamedev.net&#xD;&#xA; - devmaster.net&#xD;&#xA; - tigsource.com&#xD;&#xA; - igda.com&#xD;&#xA;&#xD;&#xA;Essentially any game related forum. It's not easy 'getting it out there.' It's quite time consuming.&#xD;&#xA; &#xD;&#xA;Aside from that, I would get active on http://www.moddb.com. There is a ton of activity and you can post your game, mod or add-on. &#xD;&#xA;&#xD;&#xA;If you sign up on gamedev.net and pay a yearly fee one of the perks is listing your projects in their showcase - http://www.gamedev.net/community/gds/. &#xD;&#xA;&#xD;&#xA;If you're working on something really really slick, you might want to think about writing in to some of these websites and see if they would write a post / review your game. That could help quite a bit." />
  <row Id="4325" PostHistoryTypeId="2" PostId="2287" RevisionGUID="4d83b2f9-b304-43f6-abe3-1542c032427a" CreationDate="2010-08-06T04:30:53.033" UserId="1440" Text="PostgreSQL is a great database in my opinion." />
  <row Id="4326" PostHistoryTypeId="2" PostId="2288" RevisionGUID="cd6ae33e-557a-467e-8094-612a0944a223" CreationDate="2010-08-06T04:43:27.667" UserId="395" Text="My favorite one here involved palm trees that were supposed to periodically drop coconuts every minute or two. During one early beta build the timing was broken such that every tree unleashed a non-stop torrent of coconuts. After about 15 minutes (and after the framerate had slowed to near-slideshow proportions) the starting base would be literally overflowing with coconuts." />
  <row Id="4327" PostHistoryTypeId="16" PostId="2288" RevisionGUID="cd6ae33e-557a-467e-8094-612a0944a223" CreationDate="2010-08-06T04:43:27.667" UserId="-1" />
  <row Id="4328" PostHistoryTypeId="6" PostId="2285" RevisionGUID="d0b1a6ad-9c61-4ebd-a209-48f3fd522634" CreationDate="2010-08-06T05:02:31.713" UserId="51" Comment="edited tags" Text="&lt;marketing&gt;&lt;indie&gt;" />
  <row Id="4329" PostHistoryTypeId="4" PostId="2282" RevisionGUID="5969ed17-4137-4345-8949-f7704f47c71d" CreationDate="2010-08-06T05:03:19.323" UserId="51" Comment="edited tags; edited title; edited title" Text="What kind of databases are usually used in an MMORPG?" />
  <row Id="4330" PostHistoryTypeId="6" PostId="2282" RevisionGUID="5969ed17-4137-4345-8949-f7704f47c71d" CreationDate="2010-08-06T05:03:19.323" UserId="51" Comment="edited tags; edited title; edited title" Text="&lt;mmo&gt;&lt;databases&gt;" />
  <row Id="4331" PostHistoryTypeId="5" PostId="2283" RevisionGUID="61e199f4-bacc-4b03-bfc9-fd8c416d3014" CreationDate="2010-08-06T05:10:08.940" UserId="395" Comment="added 241 characters in body" Text="We did, hopefully Ben Z will give a better explanation of the reasons than I can since he was actually the original author of our database. The short version is that relational DBs are not very useful for games because they cannot efficiently store heavily structured hierarchical data, which makes up the vast majority of data an MMO needs for normal operation. We choose to build a custom object database and part of a distributed transaction processing system, which is now in production and powering our two live games.&#xD;&#xA;&#xD;&#xA;As for if you should do the same? Probably not, at least not at first. I would still advocate avoiding SQL, but there are now many more options in the &quot;NoSQL&quot; world that didn't exist a few years ago.&#xD;&#xA;&#xD;&#xA;That said, most MMOs do run on SQL (relational) databases. I know Eve runs on a SQL Server installation sitting on top of a few multi-TB RAMSANs (I will probably never in my life have as much money as those things cost).&#xD;&#xA;&#xD;&#xA;EDIT: Hopefully he won't mind me posting this here, but [this](http://doublebuffered.com/2008/02/26/gdc-08-sql-considered-harmful/) is a blog entry with some links and comments about the presentation we gave at GDC'08 about our database." />
  <row Id="4332" PostHistoryTypeId="2" PostId="2289" RevisionGUID="983a29ac-5503-4852-89f0-192e5804e812" CreationDate="2010-08-06T05:11:48.127" UserId="1024" Text="Okay this answer is more of an observation. &#xD;&#xA;&#xD;&#xA;Full disclosure I haven't worked on MMORPG. I have worked at what was one of the top 10 most visited sites back in 2009, and I have worked at game engine company that thought they were making a tech MMORPG (I don't know if shipped).&#xD;&#xA;&#xD;&#xA;If you look at companies that have achieved massive scale (Google, Facebook, Twitter, etc., I know they are not game companies, but they are worth looking at in this space) there are two things that I think are important.&#xD;&#xA;&#xD;&#xA; 1. They started by grabbing whatever was cheap and easy to get themselves going&#xD;&#xA; 2. They ultimately had to roll a lot of their tech on their own. (And sometimes hardware)&#xD;&#xA;&#xD;&#xA;A big mistake is to grab some expensive turnkey thing and expect it magically scale for you. It doesn't work that way. The key to scaling up is dealing with each new challenge appropriately. You need flexible easy to solutions that you can move in and out easily. &#xD;&#xA;&#xD;&#xA;So my advice to you would be if your starting you, just get what seems least headache to deal with. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4333" PostHistoryTypeId="5" PostId="2289" RevisionGUID="9a65fce4-768e-4ef9-a599-b5f9d7a1aecc" CreationDate="2010-08-06T05:18:30.283" UserId="1024" Comment="edited body" Text="Okay this answer is more of an observation. &#xD;&#xA;&#xD;&#xA;Full disclosure I haven't worked on MMORPG. I have worked at what was one of the top 10 most visited sites back in 2009, and I have worked at game engine company that thought they were making a tech MMORPG (I don't know if shipped).&#xD;&#xA;&#xD;&#xA;If you look at companies that have achieved massive scale (Google, Facebook, Twitter, etc., I know they are not game companies, but they are worth looking at in this space) there are two things that I think are important.&#xD;&#xA;&#xD;&#xA; 1. They started by grabbing whatever was cheap and easy to get themselves going&#xD;&#xA; 2. They ultimately had to roll a lot of their tech on their own. (And sometimes hardware)&#xD;&#xA;&#xD;&#xA;A big mistake is to grab some expensive turnkey thing and expect it magically scale for you. It doesn't work that way. The key to scaling up is dealing with each new challenge appropriately. You need flexible easy to solutions that you can move in and out easily. &#xD;&#xA;&#xD;&#xA;So my advice to you would be if your starting out, just get what seems least headache to deal with. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4334" PostHistoryTypeId="5" PostId="2289" RevisionGUID="221d62d4-fec0-44a4-a2bc-cc614c571db6" CreationDate="2010-08-06T05:40:34.370" UserId="1024" Comment="deleted 2 characters in body" Text="Okay this answer is more of an observation. &#xD;&#xA;&#xD;&#xA;Full disclosure I haven't worked on MMORPG. I have worked at what was one of the top 10 most visited sites back in 2009, and I have worked at game engine company that thought they were making MMORPG tech (I don't know if shipped).&#xD;&#xA;&#xD;&#xA;If you look at companies that have achieved massive scale (Google, Facebook, Twitter, etc., I know they are not game companies, but they are worth looking at in this space) there are two things that I think are important.&#xD;&#xA;&#xD;&#xA; 1. They started by grabbing whatever was cheap and easy to get themselves going&#xD;&#xA; 2. They ultimately had to roll a lot of their tech on their own. (And sometimes hardware)&#xD;&#xA;&#xD;&#xA;A big mistake is to grab some expensive turnkey thing and expect it magically scale for you. It doesn't work that way. The key to scaling up is dealing with each new challenge appropriately. You need flexible easy to solutions that you can move in and out easily. &#xD;&#xA;&#xD;&#xA;So my advice to you would be if your starting out, just get what seems least headache to deal with. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4335" PostHistoryTypeId="5" PostId="2289" RevisionGUID="91a3eaf0-cd5f-4f05-b911-61bad40231b2" CreationDate="2010-08-06T06:15:22.647" UserId="1024" Comment="added 4 characters in body" Text="Okay this answer is more of an observation. &#xD;&#xA;&#xD;&#xA;Full disclosure I haven't worked on MMORPG. I have worked at what was one of the top 10 most visited sites back in 2009, and I have worked at game engine company that thought they were making MMORPG tech (I don't know if shipped).&#xD;&#xA;&#xD;&#xA;If you look at companies that have achieved massive scale (Google, Facebook, Twitter, etc., I know they are not game companies, but they are worth looking at in this space) there are two things that I think are important.&#xD;&#xA;&#xD;&#xA; 1. They started by grabbing whatever was cheap and easy to get themselves going&#xD;&#xA; 2. They ultimately had to roll a lot of their tech on their own. (And sometimes hardware)&#xD;&#xA;&#xD;&#xA;A big mistake is to grab some expensive turnkey thing and expect it magically scale for you. It doesn't work that way. The key to scaling up is dealing with each new challenge appropriately. You need flexible easy to use solutions that you can move in and out easily. &#xD;&#xA;&#xD;&#xA;So my advice to you would be if your starting out, just get what seems least headache to deal with. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4336" PostHistoryTypeId="2" PostId="2290" RevisionGUID="27399ec3-b55f-4cac-a09e-b95835d54845" CreationDate="2010-08-06T06:34:20.317" UserId="1490" Text="http://www.indiedb.com/ has just been created, and might be an excellent choice, in addition to David McGraw's recommendation." />
  <row Id="4337" PostHistoryTypeId="2" PostId="2291" RevisionGUID="e08d8d0e-f711-4c37-826d-11e8e5fcb063" CreationDate="2010-08-06T06:47:42.707" UserId="1490" Text="I guess it depends pretty heavily on what kind of data you need stored, and under which form.&#xD;&#xA;&#xD;&#xA;I think most people out there use &quot;standard&quot; SQL databases for &quot;dynamic&quot; data like player informations, be it SQL Server, MySQL, PostgreSQL. &#xD;&#xA;&#xD;&#xA;However, &quot;internal&quot; data (state of the world, content, ....) can be stored under any form, and my guess would be that most company write at least partially custom databases systems for that part, suited for their specific needs." />
  <row Id="4338" PostHistoryTypeId="16" PostId="1641" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4339" PostHistoryTypeId="16" PostId="1648" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4340" PostHistoryTypeId="16" PostId="1649" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4341" PostHistoryTypeId="16" PostId="1656" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4342" PostHistoryTypeId="16" PostId="1700" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4343" PostHistoryTypeId="16" PostId="1703" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4344" PostHistoryTypeId="16" PostId="1639" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:48:58.773" UserId="14" />
  <row Id="4345" PostHistoryTypeId="10" PostId="2285" RevisionGUID="f462f0a3-8bc1-4417-b0db-a4a5aec883b5" CreationDate="2010-08-06T06:51:04.807" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="4346" PostHistoryTypeId="5" PostId="2285" RevisionGUID="3efcf852-9bb2-4a69-807c-b7a849957f93" CreationDate="2010-08-06T06:51:07.333" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where to advertise my game?](http://gamedev.stackexchange.com/questions/1639/where-to-advertise-my-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Let's say I have developed a game and I want to &quot;get it out there&quot;.  What I have in mind is open-source games, rather than commercial games.&#xD;&#xA;&#xD;&#xA;What websites do you know of where you can promote your newly developed game, rather than simply posting it on your blog?  I am looking for websites such as [GameProjects][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprojects.com/" />
  <row Id="4347" PostHistoryTypeId="11" PostId="2285" RevisionGUID="8a26d6a4-8f35-4f5b-864d-eb31aa8eea78" CreationDate="2010-08-06T06:54:00.950" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="4348" PostHistoryTypeId="16" PostId="2286" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:55:27.717" UserId="14" />
  <row Id="4349" PostHistoryTypeId="16" PostId="2290" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:55:27.717" UserId="14" />
  <row Id="4350" PostHistoryTypeId="16" PostId="2285" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T06:55:27.717" UserId="14" />
  <row Id="4351" PostHistoryTypeId="5" PostId="483" RevisionGUID="542744bb-6528-4410-ac30-3b9ed14e9c8a" CreationDate="2010-08-06T07:28:09.600" UserId="1491" Comment="Added description of real-world drawbacks of Perforce." Text="# [Perforce][1]&#xD;&#xA;&#xD;&#xA;Perforce (commercial/closed-source, centralized) is the industry standard for a number of reasons.&#xD;&#xA;&#xD;&#xA;1. It's a commercial product, which means it comes with commercial support. Open-source projects may be eligible for a free license (minus the technical support).&#xD;&#xA;1. It supports workspaces *very well*, which allows very flexible source and asset directory layouts.&#xD;&#xA;1. It supports changelists *very well*.&#xD;&#xA;1. You can see who is working on what. Games have an abnormally high number of rapidly changing binary files (assets) compared to other development projects. Most of the time these are non-mergeable, so keeping track of who has what/where/when is critical. Subversion and DSCC clients intentionally avoid this technique, but it's quite beneficial in certain applications.&#xD;&#xA;1. It supports *gigantic* code/asset bases. It does *not* store duplicate data on client machines, which is important when your sub-view of the tree is a couple dozen gigs.&#xD;&#xA;&#xD;&#xA;That said, it's painfully obvious on an almost daily basis that Perforce doesn't feel their position in the industry is threatened. Their visual tools, including P4V and P4SCC (integrate with Visual Studio) are slow and buggy, with the latter known to freeze Visual Studio for the sheer enjoyment of it. AnkhSVN is miles ahead of Perforce.&#xD;&#xA;&#xD;&#xA;Comment by xan: It is worth noting however that their merge tool, P4Merge (used for diffing and merging) is excellent and far superior to the likes of Tortoise Merge. Surprisingly, this component is available for free as part of the P4 Visual Tools package.&#xD;&#xA;&#xD;&#xA;Comment by slicedlime: Another drawback with Perforce is that branching in it tends to be a huge pain, especially if you have large trees. Almost every other vcs is better at branching and merging. This is usually a small price to pay for the above advantages though.&#xD;&#xA;&#xD;&#xA;Comment by roe: Perforce is extremely chatty. There's not much going on without the server&#xD;&#xA;involved. Most notably, you need the server in order to do open-for-edit, which means you need to jump through a few hoops if you intend to break the connection to the server.&#xD;&#xA;&#xD;&#xA;Comment by jrista: As a daily user of Perforce for over two years now, with an extended development and quality engineering team of well over 100 people, I have become intimately familiar with it. While it is a decent source control system, it does have its drawbacks that those evaluating SCC systems should be aware of. For one, as mentioned by others, branching/integrating is particularly cumbersome and difficult to do. You have an ungodly amount of control, but it comes at the cost of excessive complexity. On the flip side, the visual merge tool is one of a kind, and presents a beautiful three-file &quot;based&quot; merge view of your work. Perforce does provide some graphical visualizations of branch paths (called the Revision Graph), however the way it is visualized often makes the tool rather useless. If you only need to see a very small segment of time for one or very few files, it can be useful...anything more, and it is near impossible to navigate the Revision Graph. Perforce is also not a very efficient tool, as almost any file operation requires duplicating files and data: branching, labeling, change lists, etc. No sparse or lightweight tagging or branching here. If you are not afraid to use a tremendous amount of disk space tracking your changes, perforce will probably serve you well. If not, I would look to another tool. Perforce makes use of workspaces, however these can be frustrating at times, as perforce caches all state in your workspace, rather than using the actual files on disk to determine some state. This often results in files not getting synced because your workspace says they are up to date, when, for whatever reason, the physical files on disk are indeed NOT up to date. A final annoyance, Perforce is rather brutal on your network. It is an extremely chatty program, and consumes a considerable amount of bandwidth. Any network connectivity loss, and you run the high risk of being unable to do any work with your source-controlled files until connectivity is restored. As of yet, I have not discovered an activity that can be performed off-line in Perforce.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perforce.com" />
  <row Id="4352" PostHistoryTypeId="2" PostId="2292" RevisionGUID="00a79352-278c-4d93-9f76-eb5f1a206b1a" CreationDate="2010-08-06T07:30:05.340" UserId="1492" Text="Well, it actually depends on your application - that's the bottomline. I work, where we develop social RPGs and we use Google App Engine as a backend" />
  <row Id="4353" PostHistoryTypeId="2" PostId="2293" RevisionGUID="1aa9e40c-9a9f-4a93-95f5-007add31c523" CreationDate="2010-08-06T07:40:16.443" UserId="678" Text="Due to a resource-loading mishap our werewolf players would turn into steamboats when transforming, complete with sound effects and animations. Boy, did we ever catch some flack for that.&#xD;&#xA;&#xD;&#xA;That said, I think the were-boat class has potential." />
  <row Id="4354" PostHistoryTypeId="16" PostId="2293" RevisionGUID="1aa9e40c-9a9f-4a93-95f5-007add31c523" CreationDate="2010-08-06T07:40:16.443" UserId="-1" />
  <row Id="4355" PostHistoryTypeId="10" PostId="82" RevisionGUID="34441682-0ca9-42b1-84d9-8fbdd9f1cb94" CreationDate="2010-08-06T07:46:53.823" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4356" PostHistoryTypeId="2" PostId="2294" RevisionGUID="83b103a4-2e17-4777-ad9a-26a2b2ff3e8a" CreationDate="2010-08-06T07:54:52.450" UserId="259" Text="On a theme park management game I worked on, we had randomly-generated park visitors using combinations of sets of hair, facial hair, and faces.  &#xD;&#xA;&#xD;&#xA;Near the end of the project, we had a bug through claiming the tester had found a visitor that looked &quot;too much like Hitler.&quot;  I don't know how much you can look like Hitler and still be acceptable.  The bug shipped." />
  <row Id="4357" PostHistoryTypeId="16" PostId="2294" RevisionGUID="83b103a4-2e17-4777-ad9a-26a2b2ff3e8a" CreationDate="2010-08-06T07:54:52.450" UserId="-1" />
  <row Id="4358" PostHistoryTypeId="16" PostId="28" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4359" PostHistoryTypeId="16" PostId="32" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4360" PostHistoryTypeId="16" PostId="33" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4361" PostHistoryTypeId="16" PostId="39" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4362" PostHistoryTypeId="16" PostId="81" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4363" PostHistoryTypeId="16" PostId="110" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4364" PostHistoryTypeId="16" PostId="172" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4365" PostHistoryTypeId="16" PostId="218" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4366" PostHistoryTypeId="16" PostId="231" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4367" PostHistoryTypeId="16" PostId="747" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4368" PostHistoryTypeId="16" PostId="1577" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4369" PostHistoryTypeId="16" PostId="1871" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4370" PostHistoryTypeId="16" PostId="16" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-06T08:27:46.333" UserId="51" />
  <row Id="4371" PostHistoryTypeId="2" PostId="2295" RevisionGUID="250d855c-b84b-41fd-b8ef-d561f220ac7d" CreationDate="2010-08-06T09:21:51.563" UserId="1494" Text="MMORPGs are intensive apps and are a huge undertaking. If you are starting off with game development I strongly recommend you do something smaller.&#xD;&#xA;&#xD;&#xA;That said you will need two squeeze top performance out of your setup. You are obviously going to need a server farm/hive. Because network communication is relatively expensive (and most MMORPGs are realtime) you might want to replicate your central database to each of your game servers (the equivalent of realtime low-latency replication in your database of choice).&#xD;&#xA;&#xD;&#xA;If each of your servers are serving a specific segment of the game world (like WoW works); something like [Distributed Partitioned Views][1]. DPVs allow you to segment rows of your database across different servers; according to the the constraints on the columns at each server. Both MSSQL and Oracle are smart enough to only talk to the server that contains the data that falls within your WHERE or ON clause. I am not sure if any of the open source offerings have DPVs.&#xD;&#xA;&#xD;&#xA;The net result of this all is that *it doesn't matter what DB you use*, just use one with a good name: MSSQL, Oracle, MySQL, PostgreSQL. Write your database in ANSI SQL and see which system works the best - that's the only way to find out.&#xD;&#xA;&#xD;&#xA;The NoSQL route might also be a good idea because it's designed for high concurrency. Pranny's suggestion might do the trick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ms188299.aspx" />
  <row Id="4372" PostHistoryTypeId="2" PostId="2296" RevisionGUID="c1af233d-a26a-43c9-a02d-05fbbd21c601" CreationDate="2010-08-06T09:33:43.570" UserId="360" Text="Two more sites for promoting are http://www.gametunnel.com/ and http://www.gamerelease.net/&#xD;&#xA;" />
  <row Id="4373" PostHistoryTypeId="16" PostId="2296" RevisionGUID="c1af233d-a26a-43c9-a02d-05fbbd21c601" CreationDate="2010-08-06T09:33:43.570" UserId="-1" />
  <row Id="4374" PostHistoryTypeId="2" PostId="2297" RevisionGUID="35294b8f-cb42-4820-8c85-95a6a07bb7d5" CreationDate="2010-08-06T10:03:02.113" UserId="989" Text="This one is obvious but wasn't mentioned before, so here it goes:&#xD;&#xA;&#xD;&#xA;Name should be really unique! Unfortunately I can't think of any examples right now, but there were cases when I heard a name of a  game which seemed interesting and was unable to find it because it was too generic!  &#xD;&#xA;&#xD;&#xA;So first step should be to go to try out potential names on Google. Nobody wants to go through 15 unrelated pages of search in order to find website discussing the game." />
  <row Id="4375" PostHistoryTypeId="2" PostId="2298" RevisionGUID="d3037e34-37d1-41b8-98ca-5a4d0f1f3218" CreationDate="2010-08-06T11:25:28.200" UserId="1310" Text="I would like to add the option to play against another person over my wifi network in my pong game. How do I make this happen?&#xD;&#xA;&#xD;&#xA;Also, I would like to know how to be able to have 4 players at the same time like I would if I make a monopoly type game or something similar.&#xD;&#xA;&#xD;&#xA;I'm a newbee so please point me in the right direction or show me some code I can use for this and study.&#xD;&#xA;Thanks guys&#xD;&#xA;David&#xD;&#xA; &#xD;&#xA;" />
  <row Id="4376" PostHistoryTypeId="1" PostId="2298" RevisionGUID="d3037e34-37d1-41b8-98ca-5a4d0f1f3218" CreationDate="2010-08-06T11:25:28.200" UserId="1310" Text="How to connect two Iphone/ipod/ipads for gameplay over local wifi network?" />
  <row Id="4377" PostHistoryTypeId="3" PostId="2298" RevisionGUID="d3037e34-37d1-41b8-98ca-5a4d0f1f3218" CreationDate="2010-08-06T11:25:28.200" UserId="1310" Text="&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="4378" PostHistoryTypeId="2" PostId="2299" RevisionGUID="53809ede-08f1-460d-9a3f-558a20215b93" CreationDate="2010-08-06T11:35:54.063" UserDisplayName="neilogd" Text="During development of a darts title, there was a model &amp; animation scale issue with the player characters. As the player walked up to the oche, everything was fine, looked good. They then proceeded to pull out a dart that 100x the size it should have been. Heard about a few similar bugs from other friends when there has been a cm/m mix up!&#xD;&#xA;&#xD;&#xA;And more recently, a racing game I was fixing some AI bugs last minute - trying to make it more challenging, so I made them interpolate more aggressively rather than actually drive. Result? Take off from the ground just before a corner and they would steer in mid air through a whole corner before landing. This was a bit of a balancing act as there were some corners the AI would happily pile up on corners when trying to steer on ice." />
  <row Id="4379" PostHistoryTypeId="16" PostId="2299" RevisionGUID="53809ede-08f1-460d-9a3f-558a20215b93" CreationDate="2010-08-06T11:35:54.063" UserId="-1" />
  <row Id="4380" PostHistoryTypeId="2" PostId="2300" RevisionGUID="ddf23d33-59b1-45e6-8a24-0b6121ac79e3" CreationDate="2010-08-06T12:19:20.307" UserId="1214" Text="Just a few that just came to my mind while i came across this...&#xD;&#xA;&#xD;&#xA;- Think about how you balance **challenges and rewards.**&#xD;&#xA;- Think about how you can provide **variation and contrast**&#xD;&#xA;- Think about **which order and what time during the learning curve to introduce which game element**&#xD;&#xA;&#xD;&#xA;Some more thoughts...&#xD;&#xA;&#xD;&#xA; - **Have recognizable locations** or objects at places you want the player to be able to recognize easier so he can navigate easier is less likely to get lost or confused&#xD;&#xA;&#xD;&#xA; - You may also think of **levels having similar qualities to a song**. What i mean by this is that a typical song has **a start, a build-up, a breakdown, etc, etc...** So there are elements which are used most of the time, there are intense and chilling moments and of course surprises and single events (like that cool break in a track that you wish would plax more than only once per song ;)&#xD;&#xA;&#xD;&#xA;Wish i'd have time to write more - i love this subject ;) Need to do some work now... Maybe later..." />
  <row Id="4381" PostHistoryTypeId="16" PostId="2300" RevisionGUID="ddf23d33-59b1-45e6-8a24-0b6121ac79e3" CreationDate="2010-08-06T12:19:20.307" UserId="-1" />
  <row Id="4382" PostHistoryTypeId="2" PostId="2301" RevisionGUID="bda6dbcf-fea4-4993-b974-d5146faf120a" CreationDate="2010-08-06T12:25:43.010" UserId="1310" Text="How do I make fun and interactive menus with cocos2d, all the tutorials are just for simple clickable menus. Can any one help me learn this?&#xD;&#xA;&#xD;&#xA;It would be see the menu flip or slide away, I know you can do this with scenes but how do I make this with just the menu?&#xD;&#xA;&#xD;&#xA;Let's say the menu is a bunch of cards and I want them to flip over like the sub-menu is on the backside of the card, how would I do this?&#xD;&#xA;&#xD;&#xA;Or, make the Main menu slide in from the left, right, top or bottom side and then when a button is selected it slides away the same way and switch to a sub-menu (settings, Score etc)?&#xD;&#xA;&#xD;&#xA;Anyone?&#xD;&#xA;&#xD;&#xA;David" />
  <row Id="4383" PostHistoryTypeId="1" PostId="2301" RevisionGUID="bda6dbcf-fea4-4993-b974-d5146faf120a" CreationDate="2010-08-06T12:25:43.010" UserId="1310" Text="How to create fun and interactive menus with cocos2d?" />
  <row Id="4384" PostHistoryTypeId="3" PostId="2301" RevisionGUID="bda6dbcf-fea4-4993-b974-d5146faf120a" CreationDate="2010-08-06T12:25:43.010" UserId="1310" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="4385" PostHistoryTypeId="2" PostId="2302" RevisionGUID="4226d4fa-ff5c-41dc-8aa8-6aa0d55c8906" CreationDate="2010-08-06T12:36:35.157" UserId="1463" Text="Take a look at Gamekit sdk.  It is an Apple sdk for what you want to do." />
  <row Id="4386" PostHistoryTypeId="2" PostId="2303" RevisionGUID="46729701-1283-4e6d-9faa-6174e205accf" CreationDate="2010-08-06T13:19:59.737" UserId="1134" Text="About five years ago we were working on a for-kids GBA title, when one of the coders made a small mistake that caused the object factory to spawn an instance of class Player for _every_ pickup and other object in the level, not just the &quot;start point&quot; object.&#xD;&#xA;&#xD;&#xA;Because they were all wired to listen and react to dpad and button input, suddenly we had an army of player sprites starting at different positions and moving in some semblance of unison.  &#xD;&#xA;&#xD;&#xA;As you progressed through the level (the camera still had an idea which player to look at) you'd occasionally bunch up with the some of the other player sprites due to collision, and due to slight differences in animation state some would make jumps and others wouldn't.  This gave an amusing &quot;mouse trail&quot; effect near you along with hordes of braindead players running against walls elsewhere.&#xD;&#xA;&#xD;&#xA;...and the quotes from _The Matrix_ rained down...&#xD;&#xA;&#xD;&#xA;(We still have a copy of that build, somewhere.  Almost made it an easter egg.)" />
  <row Id="4387" PostHistoryTypeId="16" PostId="2303" RevisionGUID="46729701-1283-4e6d-9faa-6174e205accf" CreationDate="2010-08-06T13:19:59.737" UserId="-1" />
  <row Id="4388" PostHistoryTypeId="2" PostId="2304" RevisionGUID="a5e50507-0912-4829-a4b6-4d28c9c8a4e4" CreationDate="2010-08-06T13:29:26.393" UserId="1156" Text="[Gamedev][1] has a board on it's forum for game announcements (the Your Announcements board), which is pretty active.  &#xD;&#xA;There's also word of mouth - distributing it to friends, work colleagues, family. It doesn't HAVE to be on the web, though this isn't going to be as effective. On the other hand, it's a gurantee that someone will play it.  &#xD;&#xA;&#xD;&#xA;There's also forum signatures for most general use forums; especially gaming forums.    &#xD;&#xA;&#xD;&#xA;[Devmaster][2] is also a popular site.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net&#xD;&#xA;  [2]: http://www.devmaster.net" />
  <row Id="4389" PostHistoryTypeId="16" PostId="2304" RevisionGUID="a5e50507-0912-4829-a4b6-4d28c9c8a4e4" CreationDate="2010-08-06T13:29:26.393" UserId="-1" />
  <row Id="4390" PostHistoryTypeId="2" PostId="2305" RevisionGUID="7fa8a1b5-7170-4ffa-b810-278683aa1358" CreationDate="2010-08-06T13:33:33.313" UserId="1095" Text="Mentioned in :&#xD;&#xA;http://gamedev.stackexchange.com/questions/679/how-to-prepare-a-game-for-localization&#xD;&#xA;&gt;It's a really good idea to use an actual string class and not just char * everywhere or you're going to be in a world of pain.&#xD;&#xA;&#xD;&#xA;I currently use char * everywhere, and wondered if people could explain the benefits of a full string class, and the pitfalls of char *. Are there any good solid existing string classes to be recommended?&#xD;&#xA;&#xD;&#xA;Not only in reference to localisation, but for any reason.&#xD;&#xA;" />
  <row Id="4391" PostHistoryTypeId="1" PostId="2305" RevisionGUID="7fa8a1b5-7170-4ffa-b810-278683aa1358" CreationDate="2010-08-06T13:33:33.313" UserId="1095" Text="The correct way to write a string class." />
  <row Id="4392" PostHistoryTypeId="3" PostId="2305" RevisionGUID="7fa8a1b5-7170-4ffa-b810-278683aa1358" CreationDate="2010-08-06T13:33:33.313" UserId="1095" Text="&lt;localization&gt;" />
  <row Id="4393" PostHistoryTypeId="2" PostId="2306" RevisionGUID="ba974e4a-3c1f-43e2-874a-4627a1efb1ac" CreationDate="2010-08-06T13:35:04.683" UserId="1101" Text="Basically, there's a whole range of approaches, and I think they're chosen based more on the experiences of their developers as much as the properties of the database.&#xD;&#xA;At one end, many MMOs are using standard relational databases - eg. Dark Ages of Camelot used/uses (are they still going?) [MySQL][1], FreeRealms use a modified [Postgresql][2], etc.&#xD;&#xA;&#xD;&#xA;Moving along the scale, you have Guild Wars: [they use SQL Server][3], but they stick their data in there as a single BLOB. This means they get the benefits of their usual binary formats with some of the benefits that a database provides. Needless to say, you can probably see some disadvantages of this approach too, but for a company used to working with flat files, it's probably still a step up.&#xD;&#xA;&#xD;&#xA;Then there are probably some places using the various formalised NoSQL approaches, although it's still early days yet. Farmville uses [membase][4], which they made for thge purpose, based on memcached apparently. This shares many features with the likes of MongoDB, CouchDB, etc. Again with these approaches you're typically rolling your own storage formats but get the benefits of distribution, caching, redundancy, etc.&#xD;&#xA;&#xD;&#xA;Some are rolling their own NoSQL entirely: Cryptic [said they did something similar][5] but also said they weren't using it in production.&#xD;&#xA;&#xD;&#xA;And then you come to people who are using flat text or binary files - as I understand it the older games like Ultima Online, Everquest, etc all went down this route, and for a company with game development experience but little database experience this works well too.&#xD;&#xA;&#xD;&#xA;Note also that you almost never get around writing your own database in some loose sense of the term - in games you'll always have bespoke data that you need to manage either in-memory or on-disk in ways that don't lend themselves to generic software. You can't do SQL queries every time you want some data so you will need to be mirroring a lot of your information in the code no matter what back end you use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mysql.com/customers/view/?id=729&#xD;&#xA;  [2]: http://www.enterprisedb.com/company/news_events/press_releases/2010_09.do&#xD;&#xA;  [3]: http://www.dbms2.com/2007/06/09/the-database-technology-of-guild-wars/&#xD;&#xA;  [4]: http://www.membase.org/&#xD;&#xA;  [5]: http://doublebuffered.com/2008/02/26/gdc-08-sql-considered-harmful/" />
  <row Id="4394" PostHistoryTypeId="2" PostId="2307" RevisionGUID="840baff4-8c24-42bf-80d5-f43012fdafe3" CreationDate="2010-08-06T13:46:59.573" UserId="189" Text="You might get better answers in [Stack Overflow][1], as the benefits of a string class apply to all programs, not just games.&#xD;&#xA;&#xD;&#xA;But a great string class, of course, is **[std::string][2]** from the C++ Standard Library! It keeps track of the length of the string (rather than searching for a null character every time you call strlen). You can easily iterate the string and append to or modify it, unlike using char* and the str functions. And at any time, you can get a char* via the member &quot;c_str&quot;, so you can adapt it pretty easily.&#xD;&#xA;&#xD;&#xA;It's basically one step towards higher-level languages when you're manipulation a string rather than an array of characters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/&#xD;&#xA;  [2]: http://www.cplusplus.com/reference/string/string/" />
  <row Id="4395" PostHistoryTypeId="2" PostId="2308" RevisionGUID="59a62cbb-2c7d-4d4b-ab69-2194f86d57a6" CreationDate="2010-08-06T13:50:54.933" UserId="189" Text="Just yesterday I found a website with quite a few hilarious game bugs. They can't be called &quot;development&quot; bugs because they were found in real, produced video games. But I think visitors of this question would get a good laugh out of them:&#xD;&#xA;&#xD;&#xA;http://noooooomyimmersion.tumblr.com/&#xD;&#xA;&#xD;&#xA;*I am not affiliated with the blog in any way. I follow Nick_Lalone on Twitter who tweeted a bunch of links to it which I followed to find it.*" />
  <row Id="4396" PostHistoryTypeId="16" PostId="2308" RevisionGUID="59a62cbb-2c7d-4d4b-ab69-2194f86d57a6" CreationDate="2010-08-06T13:50:54.933" UserId="-1" />
  <row Id="4397" PostHistoryTypeId="2" PostId="2309" RevisionGUID="f42e813e-dadc-4f7f-886e-aa15631bc721" CreationDate="2010-08-06T13:51:27.083" UserId="1156" Text="If I have a file stucture for my final, released game something like:&#xD;&#xA;&#xD;&#xA; - Main folder&#xD;&#xA;   - Media&#xD;&#xA;     - Images&#xD;&#xA;     - Other assets&#xD;&#xA;     - Sounds&#xD;&#xA;  - Executable&#xD;&#xA;  - List item&#xD;&#xA;&#xD;&#xA;And a different one for my 'in development' project, with the same Media folder but:&#xD;&#xA;&#xD;&#xA; - Main&#xD;&#xA;  - Source and .obj, etc.&#xD;&#xA;  - Media with everything&#xD;&#xA;  - Bin folder with executable&#xD;&#xA;&#xD;&#xA;I obviously cannot hardcode file pathnames into this, like: &lt;code&gt; &quot;../Media/Image/evilguy.png&quot; or &quot;Media/Image/foo.jpg&quot; &lt;/code&gt; because they wouldn't work with one of the builds and would require a lot of switching names.  &#xD;&#xA;&#xD;&#xA;Instead, does it make sense for my resource manager, that loads everything, to have some kind of prefix path? Then, I can just do &lt;code&gt; Get(&quot;foo.jpg&quot;) or Get(&quot;Sounds/boom.ogg&quot;)&lt;/code&gt;  &#xD;&#xA;And simply switch out, for the final release, the ctr argument from the relative path for the development build to the release layout?  &#xD;&#xA;&#xD;&#xA;If not, how have other people sorted these sorts of things out?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4398" PostHistoryTypeId="1" PostId="2309" RevisionGUID="f42e813e-dadc-4f7f-886e-aa15631bc721" CreationDate="2010-08-06T13:51:27.083" UserId="1156" Text="Directory paths for resources and assets" />
  <row Id="4399" PostHistoryTypeId="3" PostId="2309" RevisionGUID="f42e813e-dadc-4f7f-886e-aa15631bc721" CreationDate="2010-08-06T13:51:27.083" UserId="1156" Text="&lt;language-agnostic&gt;&lt;release&gt;&lt;loading&gt;&lt;file&gt;" />
  <row Id="4400" PostHistoryTypeId="2" PostId="2310" RevisionGUID="ec4d404a-082e-4b12-a745-93c516a566e2" CreationDate="2010-08-06T13:55:51.943" UserId="189" Text="That absolutely makes sense. You should not have any constant path in the string you pass to your Get function, or else it ties you down later. For example, if you decide to package your assets into some sort of compressed/encrypted archive, you would then be locked down to create an useless Media folder in the archive and then put all the assets inside it, when really the archive itself is something of a Media folder.&#xD;&#xA;&#xD;&#xA;Your resource manager should know where to go to find the resources, whether it's the file system, an abstraction (archive), perhaps a distributed file system, or even the network or internet.&#xD;&#xA;&#xD;&#xA;I personally also think `Get(&quot;Sounds/boom.ogg&quot;)` might be redundant; doesn't the &quot;ogg&quot; extension establish it as a sound? Again, if this is the case, you could just use `Get(&quot;boom.ogg&quot;)` and the resource manager could look at the extension and know to go into the Sounds folder. But it's totally up to you." />
  <row Id="4401" PostHistoryTypeId="2" PostId="2311" RevisionGUID="7a4d085c-1054-4032-80f6-f193b6df36d6" CreationDate="2010-08-06T13:56:12.770" UserId="741" Text="You don't really need a full on resource manager in this case. But yes, it's pretty common to have your assets to be arranged in a particular structure under some root, but for the code to  all be written in ignorance of what that root is.&#xD;&#xA;&#xD;&#xA;Rather than a resource manager though, you can just have an indirection step that resolves a relative path into an immediately usable path. So:&#xD;&#xA;&#xD;&#xA;    LoadWAV(GetAssetPath(&quot;audio/SomeEvent.wav&quot;));&#xD;&#xA;&#xD;&#xA;which resolves to&#xD;&#xA;&#xD;&#xA;    LoadWAV(&quot;/projects/myproject/build/audio/SomeEvent.wav&quot;);&#xD;&#xA;&#xD;&#xA;when running from your local machine or&#xD;&#xA;&#xD;&#xA;    LoadWAV(&quot;game:/audio/SomeEvent.wav&quot;)&#xD;&#xA;&#xD;&#xA;when running from a DVD build." />
  <row Id="4402" PostHistoryTypeId="2" PostId="2312" RevisionGUID="e6201a31-24fc-481b-ab8d-20fb4f3135f6" CreationDate="2010-08-06T14:02:56.437" UserId="16" Text="[XDS][1] was designed just for this purpose, it gives you the benefits of XML during development and the benefits of a compact binary representation at distribution time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.suddenpresence.com/xds/" />
  <row Id="4403" PostHistoryTypeId="16" PostId="2312" RevisionGUID="e6201a31-24fc-481b-ab8d-20fb4f3135f6" CreationDate="2010-08-06T14:02:56.437" UserId="-1" />
  <row Id="4404" PostHistoryTypeId="5" PostId="2307" RevisionGUID="38151311-94e0-4cf5-abe7-14be8e3eb31d" CreationDate="2010-08-06T14:20:47.073" UserId="189" Comment="added 191 characters in body" Text="You might get better answers in [Stack Overflow][1], as the benefits of a string class apply to all programs, not just games.&#xD;&#xA;&#xD;&#xA;But a great string class, of course, is **[std::string][2]** from the C++ Standard Library! It keeps track of the length of the string (rather than searching for a null character every time you call strlen). You can easily iterate the string and append to or modify it, unlike using char* and the str functions. And at any time, you can get a char* via the member &quot;c_str&quot;, so you can adapt it pretty easily. Here are [examples of usage][3] of std::string which look pretty helpful in getting a feel for exactly what the class can do for you.&#xD;&#xA;&#xD;&#xA;It's basically one step towards higher-level languages when you're manipulation a string rather than an array of characters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/&#xD;&#xA;  [2]: http://www.cplusplus.com/reference/string/string/&#xD;&#xA;  [3]: http://www.cprogramming.com/tutorial/string.html" />
  <row Id="4405" PostHistoryTypeId="5" PostId="2308" RevisionGUID="47f544cc-3a1c-4d2b-a4f9-544e774ee4b9" CreationDate="2010-08-06T14:22:03.560" UserId="189" Comment="added 60 characters in body" Text="Just yesterday I found a website with quite a few hilarious game bugs. They can't be called &quot;development&quot; bugs because they were found in real, produced video games. But I think visitors of this question would get a good laugh out of them:&#xD;&#xA;&#xD;&#xA;[You're Ruining my Immersion!][1] (tumblr blog)&#xD;&#xA;&#xD;&#xA;*I am not affiliated with the blog in any way. I follow Nick_Lalone on Twitter who tweeted a bunch of links to it which I followed to find it.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://noooooomyimmersion.tumblr.com/" />
  <row Id="4406" PostHistoryTypeId="10" PostId="2305" RevisionGUID="8589d372-a1df-4e7d-8171-bfdec7212d5f" CreationDate="2010-08-06T14:34:50.463" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:13,&quot;DisplayName&quot;:&quot;Michael Barth&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4407" PostHistoryTypeId="2" PostId="2313" RevisionGUID="426f6360-317c-4f87-9bb9-4780ba7decd5" CreationDate="2010-08-06T14:34:57.780" UserId="1156" Text="These look pretty nice, though I'm not sure:  &#xD;&#xA;[Free Demographics][1]  &#xD;&#xA;[US Census Bureau][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freedemographics.com/&#xD;&#xA;  [2]: http://www.census.gov/main/www/access.html" />
  <row Id="4408" PostHistoryTypeId="16" PostId="2313" RevisionGUID="426f6360-317c-4f87-9bb9-4780ba7decd5" CreationDate="2010-08-06T14:34:57.780" UserId="-1" />
  <row Id="4409" PostHistoryTypeId="5" PostId="2308" RevisionGUID="d99f7ccf-e003-48e3-8bf1-86117d4103c7" CreationDate="2010-08-06T14:36:10.977" UserId="51" Comment="added 2 characters in body" Text="Just yesterday I found a website with quite a few hilarious game bugs. They can't be called &quot;development&quot; bugs because they were found in real, produced video games. But I think visitors of this question would get a good laugh out of them:&#xD;&#xA;&#xD;&#xA;*[You're Ruining my Immersion!][1]* (tumblr blog)&#xD;&#xA;&#xD;&#xA;*I am not affiliated with the blog in any way. I follow Nick_Lalone on Twitter who tweeted a bunch of links to it which I followed to find it.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://noooooomyimmersion.tumblr.com/" />
  <row Id="4410" PostHistoryTypeId="6" PostId="2298" RevisionGUID="9b3631a6-0cf6-451a-97c3-3ae80a1b58fa" CreationDate="2010-08-06T14:38:13.310" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="4411" PostHistoryTypeId="5" PostId="2308" RevisionGUID="c26b6fea-443b-48a4-aad1-4b9875935fe3" CreationDate="2010-08-06T14:42:10.120" UserId="233" Comment="escaped the underscore which was preventing the italics from showing up" Text="Just yesterday I found a website with quite a few hilarious game bugs. They can't be called &quot;development&quot; bugs because they were found in real, produced video games. But I think visitors of this question would get a good laugh out of them:&#xD;&#xA;&#xD;&#xA;*[You're Ruining my Immersion!][1]* (tumblr blog)&#xD;&#xA;&#xD;&#xA;*I am not affiliated with the blog in any way. I follow Nick\_Lalone on Twitter who tweeted a bunch of links to it which I followed to find it.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://noooooomyimmersion.tumblr.com/" />
  <row Id="4412" PostHistoryTypeId="2" PostId="2314" RevisionGUID="8a197a9c-2334-4efe-9c88-b1dc9f9a15e1" CreationDate="2010-08-06T14:53:14.920" UserId="1477" Text="given a set of vertices and triangles for each mesh. Does anyone know of an algorithm, or a place to start looking( I tried google first but haven't found a good place to get started) to perform boolean operations on said meshes and get a set of vertices and triangle for the resulting mesh? Of particular interest are subtraction and union.&#xD;&#xA;&#xD;&#xA;Example pictures: http://www.rhino3d.com/4/help/Commands/Booleans.htm" />
  <row Id="4413" PostHistoryTypeId="1" PostId="2314" RevisionGUID="8a197a9c-2334-4efe-9c88-b1dc9f9a15e1" CreationDate="2010-08-06T14:53:14.920" UserId="1477" Text="boolean operations on meshes" />
  <row Id="4414" PostHistoryTypeId="3" PostId="2314" RevisionGUID="8a197a9c-2334-4efe-9c88-b1dc9f9a15e1" CreationDate="2010-08-06T14:53:14.920" UserId="1477" Text="&lt;graphics&gt;&lt;algorithm&gt;&lt;procedural&gt;" />
  <row Id="4415" PostHistoryTypeId="2" PostId="2315" RevisionGUID="a621ec87-d260-4be6-98c1-9e77f51faa30" CreationDate="2010-08-06T15:02:56.087" UserId="741" Text="It's worth noting that the platforms with quality control requirements (e.g. X360, PS3, DS, etc.) will all require you to have some form of animation in your loading screen (or in fact any screen which remains static for more than a few seconds).&#xD;&#xA;&#xD;&#xA;This is because otherwise the user may think that your game has crashed, when in fact it is just taking a long time to load. Even where this is not a requirement, I'd certainly advise it.&#xD;&#xA;&#xD;&#xA;Any form of animation is fine, but a simple progress bar may not be the best, as any large steps in the loading may result in the progress bar not moving at all for a while, meaning the screen is just as static as if there were no bar at all. Better to show some continually moving image, like a rotating icon, in addition to a progress indicator." />
  <row Id="4416" PostHistoryTypeId="2" PostId="2316" RevisionGUID="c7a350aa-feda-44ef-aa52-79fa19c0cdaf" CreationDate="2010-08-06T15:07:13.067" UserId="189" Text="I hear that the console game platforms have strict requirements for their games. For example I just read an answer that stated loading screens must have an animation on them so that the game doesn't appear to be frozen -- this makes sense, of course! I think a lot of the guidelines in these books would probably be great information.&#xD;&#xA;&#xD;&#xA;Are these documents protected in some way or is there someplace on the internet where I can read them? I would love to read through all the guidelines for good design that the console manufacturers have put in place to give console players a good experience, and probably to adhere to them in my own games (at least those which are not console-specific, obviously).&#xD;&#xA;&#xD;&#xA;So, **where can I find these fabled console video game design guidebooks?**" />
  <row Id="4417" PostHistoryTypeId="1" PostId="2316" RevisionGUID="c7a350aa-feda-44ef-aa52-79fa19c0cdaf" CreationDate="2010-08-06T15:07:13.067" UserId="189" Text="Where are the requirements documents for console game software?" />
  <row Id="4418" PostHistoryTypeId="3" PostId="2316" RevisionGUID="c7a350aa-feda-44ef-aa52-79fa19c0cdaf" CreationDate="2010-08-06T15:07:13.067" UserId="189" Text="&lt;game-design&gt;&lt;books&gt;&lt;console&gt;" />
  <row Id="4419" PostHistoryTypeId="2" PostId="2317" RevisionGUID="8a7d3e66-1aeb-42d1-9062-631cdd097831" CreationDate="2010-08-06T15:10:38.537" UserId="1156" Text="Depends if you're going for one loading screen and instant level transitions or multiple loads.  &#xD;&#xA;I would say that the latter would be better on memory.  &#xD;&#xA;Something like:  &#xD;&#xA;&lt;code&gt;&#xD;&#xA;//First loading screen  &#xD;&#xA;Load menu layouts or whatever  &#xD;&#xA;Load GUI assets  &#xD;&#xA;Show something to pass the time   &#xD;&#xA;Switch to menu&#xD;&#xA;&lt;code&gt;  &lt;br&gt;&lt;br&gt;&#xD;&#xA;//In between levels  &#xD;&#xA;Remove any graphics specific to the last level - get rid of something that isn't going to reappear like a boss.  &#xD;&#xA;Load level graphics that haven't already been loaded  &#xD;&#xA;Again, show progress or something to pass the time&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;And when you're loading, make sure not to have a black screen. Or for that matter, a static screen. Many a time have I seen a static image for a while at the start of an app, and immediately thought it had crashed.  &#xD;&#xA;A good way to get the player involved simply would be a nicely drawn background of a scene in the game, or some storyline reference; a loading bar with/without percentage, as long as it isn't a static 'Loading'; and then maybe some information." />
  <row Id="4420" PostHistoryTypeId="2" PostId="2318" RevisionGUID="eb5c9edb-3521-4a9f-a54b-4a6a7bd7d5fb" CreationDate="2010-08-06T15:18:19.840" UserId="189" Text="I think we can puzzle it out if we just think about it.&#xD;&#xA;&#xD;&#xA;You would obviously want to create faces (triangles) where the two geometries intersect. Then you're left with three meshes: the intersection you just isolated, geometry 1, and geometry 2.&#xD;&#xA;&#xD;&#xA;Then, just delete what you don't need!&#xD;&#xA;&#xD;&#xA; - BooleanDifference: delete the isolated part and geometry 2.&#xD;&#xA; - BooleanIntersection: delete geometry 1 and 2, leaving the isolated part&#xD;&#xA; - BooleanUnion: merge geometries 1 and 2 and delete the isolated part (make sure to stitch together geometries 1 and 2 into a solid geometry)&#xD;&#xA; - BooleanSplit: Separate out geometry 1, geometry 2, and duplicate the isolated part (attach one to geometry 1 and the other to geometry 2)&#xD;&#xA;&#xD;&#xA;I think that covers it, eh? The tough part would obviously be creating the intersection faces. For that, iterate through each face of one and check if that face is part of the other; if it's totally inside, then copy the face as part of the intersection mesh. If it's partially inside, then you need to split the triangle along the intersection line; I think DirectX and OpenGL would both have helper functions for this, or it's just some 3D plane math (vectors). I learned that kind of thing in Calculus 3 (or was it 2?) but if you don't have a clue, perhaps ask at [math.stackexchange.com][1]. And then of course if the face is outside, do nothing. Once you iterate over all faces of both meshes you'll be left with the intersection mesh.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://math.stackexchange.com/" />
  <row Id="4421" PostHistoryTypeId="2" PostId="2319" RevisionGUID="67805aae-b30a-4b59-bc84-be72e41bb73e" CreationDate="2010-08-06T15:27:31.167" UserId="678" Text="[Auntie Pixelante][1] has some excellent posts on level design where she deconstructs classic game levels&#xD;&#xA;&#xD;&#xA;Check out:&#xD;&#xA;&#xD;&#xA; - [Castlevania's basement level][2]&#xD;&#xA; - [Monuments of Mars][3]&#xD;&#xA; - [more ...][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.auntiepixelante.com/&#xD;&#xA;  [2]: http://www.auntiepixelante.com/?p=630&#xD;&#xA;  [3]: http://www.auntiepixelante.com/?p=475&#xD;&#xA;  [4]: http://www.google.com/search?hl=en&amp;q=auntie+pixelante+level+design" />
  <row Id="4422" PostHistoryTypeId="16" PostId="2319" RevisionGUID="67805aae-b30a-4b59-bc84-be72e41bb73e" CreationDate="2010-08-06T15:27:31.167" UserId="-1" />
  <row Id="4423" PostHistoryTypeId="2" PostId="2320" RevisionGUID="0d15b29b-dac5-4bda-8fcd-2d540144bd66" CreationDate="2010-08-06T15:34:49.057" UserId="47" Text="I highly doubt that you are going to find these documents unless they have been leaked out somewhere (torrents?).  Unfortunately, I believe the only way you'll be able to (legitimately) get these documents is by purchasing the SDK for the specific platform you are interested in (Xbox, Playstation, Wii, etc.)." />
  <row Id="4424" PostHistoryTypeId="2" PostId="2321" RevisionGUID="8ee26080-79e6-4ce9-b4c0-78cae4f27b9a" CreationDate="2010-08-06T15:42:17.917" UserId="1467" Text="I think of this as Constructive-Solid-Geometry (CSG). Hopefully you can find some help here.&#xD;&#xA;&#xD;&#xA;http://www.alsprogrammingresource.com/csg.html&#xD;&#xA;&#xD;&#xA;Well, I had a bunch of links for you, but I can only post one. Seems like a site this well monitored wouldn't need this restriction, but oh well.&#xD;&#xA;&#xD;&#xA;Search google for Constructive-Solid-Geometry as a start.&#xD;&#xA;&#xD;&#xA;HTH" />
  <row Id="4425" PostHistoryTypeId="2" PostId="2322" RevisionGUID="1e004b26-8537-40f0-9e45-be2001878623" CreationDate="2010-08-06T15:43:06.900" UserId="1091" Text="If you're dealing with polygonal models, you may well have to deal with non-manifold geometry, which means the question of what is &quot;inside&quot; and what is &quot;outside&quot; is not defined. It's tricky to perform a boolean operation if you don't know if you have a 0 or a 1.&#xD;&#xA;&#xD;&#xA;You also have to deal with fringe cases such as co-planar polygons, polygons which intersect edges, vertices which lie on edges and/or faces, and things of that nature. None of which is impossible, you just need a very robust way of representing your mesh data, and a tight definition of what you expect to happen in those cases.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4426" PostHistoryTypeId="2" PostId="2323" RevisionGUID="13357731-a858-4478-9d81-cf04150592a7" CreationDate="2010-08-06T15:50:15.383" UserId="1467" Text="Don't forget those high traffic sites. &#xD;&#xA;&#xD;&#xA;CNets Download.com, tucows, etc." />
  <row Id="4427" PostHistoryTypeId="16" PostId="2323" RevisionGUID="13357731-a858-4478-9d81-cf04150592a7" CreationDate="2010-08-06T15:50:15.383" UserId="-1" />
  <row Id="4428" PostHistoryTypeId="5" PostId="2321" RevisionGUID="5d684fe4-cd0b-4b1e-bbf7-679a064e143e" CreationDate="2010-08-06T16:04:19.083" UserId="1467" Comment="added 86 characters in body; deleted 111 characters in body; added 4 characters in body" Text="I think of this as Constructive-Solid-Geometry (CSG). Hopefully you can find some help here.&#xD;&#xA;&#xD;&#xA;http://www.alsprogrammingresource.com/csg.html&#xD;&#xA;&#xD;&#xA;http://createuniverses.blogspot.com/2009/09/qtcsg-constructive-solid-geometry.html&#xD;&#xA;&#xD;&#xA;http://www.nigels.com/research/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also search google for Constructive Solid Geometry as a start.&#xD;&#xA;&#xD;&#xA;HTH" />
  <row Id="4429" PostHistoryTypeId="2" PostId="2324" RevisionGUID="cead6a11-f093-4e8e-8f52-57b92735d55e" CreationDate="2010-08-06T16:08:13.153" UserId="288" Text="While I can't link you to the actual documents used by &quot;proper&quot; published console games (and, really, unless that's what you're doing, you don't need them), but here are the two documents used for XNA games that go up on Xbox Live Indie Games:&#xD;&#xA;&#xD;&#xA; - &lt;a href=&quot;http://creators.xna.com/en-US/help/peerreview_evilchecklist&quot;&gt;The Evil Checklist&lt;/a&gt; (things that games fail for)&#xD;&#xA; - &lt;a href=&quot;http://creators.xna.com/en-US/help/peerreview_notsoevilchecklist&quot;&gt;The Not-So-Evil Checklist&lt;/a&gt; (additional quality considerations)&#xD;&#xA;&#xD;&#xA;Additionally here is the MSDN page on [Xbox 360 Programming Considerations][1].&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb203938.aspx" />
  <row Id="4430" PostHistoryTypeId="5" PostId="2323" RevisionGUID="1d65a2ec-e2f8-40db-8a8e-e2a500c0fa57" CreationDate="2010-08-06T16:12:03.600" UserId="1467" Comment="added 25 characters in body" Text="Don't forget those high traffic sites. &#xD;&#xA;&#xD;&#xA;CNets Download.com, tucows.com, www.brothersoft.com, etc." />
  <row Id="4431" PostHistoryTypeId="2" PostId="2325" RevisionGUID="ac22f396-3fdd-48ea-a1e8-794e68857c2b" CreationDate="2010-08-06T16:13:00.540" UserId="1156" Text="If the ability to develop a console game - of course, excluding homebrew PS3 Linux/DS/Wii and XBLA with XNA - has a requirement of a well respected developer or company and money to even get a devkit for the platform, I doubt the requirements to create the game are available publicly.  &#xD;&#xA;You could, of course, try buying an SDK and seeing if there's any kind of idea there. But you need to be a well referenced developer.  &#xD;&#xA;Or, like people get most things nowadays, try the torrent/P2P/file sharing websites." />
  <row Id="4432" PostHistoryTypeId="2" PostId="2326" RevisionGUID="d6b29403-24c0-4c18-bd05-f21975d0d5a7" CreationDate="2010-08-06T16:28:10.320" UserId="1505" Text="Are there resources for programmers with little to no graphics design talent, but still want to make good-enough graphics for their own programs? I'm interested in both 2d and 3d computer generated graphics techniques, as well as free graphics repositories." />
  <row Id="4433" PostHistoryTypeId="1" PostId="2326" RevisionGUID="d6b29403-24c0-4c18-bd05-f21975d0d5a7" CreationDate="2010-08-06T16:28:10.320" UserId="1505" Text="Graphics for non-Graphics Designers" />
  <row Id="4434" PostHistoryTypeId="3" PostId="2326" RevisionGUID="d6b29403-24c0-4c18-bd05-f21975d0d5a7" CreationDate="2010-08-06T16:28:10.320" UserId="1505" Text="&lt;graphics&gt;&lt;3d&gt;&lt;art&gt;" />
  <row Id="4435" PostHistoryTypeId="5" PostId="1603" RevisionGUID="4e6942b0-fd09-4279-8b19-0c1e7a4890b9" CreationDate="2010-08-06T16:34:49.423" UserId="469" Comment="added 163 characters in body" Text="lots of people asked for a trailer for my game, because the screenshots do not make justice...&#xD;&#xA;&#xD;&#xA;But I don't know much about this, can someone point at some tools and tips? Like, what to put on the trailer, and specially: How to record my game, without a logo or slow FPS? (that means: no fraps)&#xD;&#xA;&#xD;&#xA;Bounty:&#xD;&#xA;&#xD;&#xA;As you noticed, I've set a bounty, and removed a correct response...&#xD;&#xA;I tested PlayClaw (it causes the game to crash), Fraps (stupid logo, only 30 seconds, BAAAD video quality OR I need to set it as lossless, that for some reason locks the game speed and actually breaks the gameplay, making it plays wonky), CamStudio (too slow, skipping frames, desynched audio), and some other minor stuff.&#xD;&#xA;&#xD;&#xA;My game is composed of vector graphics, lossy compression destroy the look of the game (instead of seeing lines, you see only black and some blurry stuff that look like... a blob, and nothing more), AND it is a fast paced arcade action game, created to run at 60 FPS.&#xD;&#xA;&#xD;&#xA;So, how I record gameplay without making my vectors look blurry and without making it too slow (a bit slow there are no problem... sometimes there are no way to achieve perfect speed)&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;Seemly I am bumping into the disk speed, so I need whatever software has a compression algorithm that is lossless, compress sufficiently to make it easy for the disk without taking too much CPU (my game is sorta CPU hog... it abuses physics and particles...)&#xD;&#xA;&#xD;&#xA;Also, I made some tests recording from VirtualDub, for some reason it worked better than any other software, maybe fiddling with its disk cache options I can reach something...&#xD;&#xA;&#xD;&#xA;Anyone know a program, that for example can save every frame in .png, and do that fast enough? Or something like that...&#xD;&#xA;&#xD;&#xA;edit2:&#xD;&#xA;&#xD;&#xA;People, you are forgetting the other software of the toolchain too... Like, how to edit, codecs, etc...&#xD;&#xA;&#xD;&#xA;Please, no windows movie maker (I want to make a professional... or at least a bit pro looking stuff) and no software that costs more than my PC!&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Solution accepted: Well, this got really confusing with data spread over all answers, I wrote my final solution on the comments section of Kaj's answer." />
  <row Id="4436" PostHistoryTypeId="2" PostId="2327" RevisionGUID="7089c78b-5acb-489d-9aa6-5117e38585c4" CreationDate="2010-08-06T16:41:26.750" UserId="469" Text="First, gamedev sites and forums:&#xD;&#xA;&#xD;&#xA;gamedev.net&#xD;&#xA;devmaster.net&#xD;&#xA;idga.org (warning: their site is REALLY slow, the forum may take 20 minutes to load... don't give up as it takes a long time).&#xD;&#xA;&#xD;&#xA;Then, indie communities:&#xD;&#xA;&#xD;&#xA;tigsource.com&#xD;&#xA;www.indiedb.com&#xD;&#xA;www.moddb.com (well, sorta the same as indiedb, the forums are actually shared)&#xD;&#xA;&#xD;&#xA;Important blogs to send your PR stuff:&#xD;&#xA;rockpapershotgun.com&#xD;&#xA;indiegames.com&#xD;&#xA;pcgamer.com&#xD;&#xA;&#xD;&#xA;Shareware distribution sites:&#xD;&#xA;tucows.com&#xD;&#xA;softpedia.com&#xD;&#xA;download.com (to upload to them, it is upload.com)&#xD;&#xA;&#xD;&#xA;Advertising services:&#xD;&#xA;google ads&#xD;&#xA;game-advertising-online.com&#xD;&#xA;&#xD;&#xA;PR services:&#xD;&#xA;gamerelease.net&#xD;&#xA;gamespress.com&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I will add more stuff as I remember (most of those are post-its glued to my monitor)" />
  <row Id="4437" PostHistoryTypeId="16" PostId="2327" RevisionGUID="7089c78b-5acb-489d-9aa6-5117e38585c4" CreationDate="2010-08-06T16:41:26.750" UserId="-1" />
  <row Id="4438" PostHistoryTypeId="5" PostId="2306" RevisionGUID="582285e5-6338-41b2-8f14-96583e8491d4" CreationDate="2010-08-06T16:47:36.820" UserId="1101" Comment="typo" Text="Basically, there's a whole range of approaches, and I think they're chosen based more on the experiences of their developers as much as the properties of the database.&#xD;&#xA;At one end, many MMOs are using standard relational databases - eg. Dark Ages of Camelot used/uses (are they still going?) [MySQL][1], FreeRealms use a modified [Postgresql][2], etc.&#xD;&#xA;&#xD;&#xA;Moving along the scale, you have Guild Wars: [they use SQL Server][3], but they stick their data in there as a single BLOB. This means they get the benefits of their usual binary formats with some of the benefits that a database provides. Needless to say, you can probably see some disadvantages of this approach too, but for a company used to working with flat files, it's probably still a step up.&#xD;&#xA;&#xD;&#xA;Then there are probably some places using the various formalised NoSQL approaches, although it's still early days yet. Farmville uses [membase][4], which they made for the purpose, based on memcached apparently. This shares many features with the likes of MongoDB, CouchDB, etc. Again with these approaches you're typically rolling your own storage formats but get the benefits of distribution, caching, redundancy, etc.&#xD;&#xA;&#xD;&#xA;Some are rolling their own NoSQL entirely: Cryptic [said they did something similar][5] but also said they weren't using it in production.&#xD;&#xA;&#xD;&#xA;And then you come to people who are using flat text or binary files - as I understand it the older games like Ultima Online, Everquest, etc all went down this route, and for a company with game development experience but little database experience this works well too.&#xD;&#xA;&#xD;&#xA;Note also that you almost never get around writing your own database in some loose sense of the term - in games you'll always have bespoke data that you need to manage either in-memory or on-disk in ways that don't lend themselves to generic software. You can't do SQL queries every time you want some data so you will need to be mirroring a lot of your information in the code no matter what back end you use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mysql.com/customers/view/?id=729&#xD;&#xA;  [2]: http://www.enterprisedb.com/company/news_events/press_releases/2010_09.do&#xD;&#xA;  [3]: http://www.dbms2.com/2007/06/09/the-database-technology-of-guild-wars/&#xD;&#xA;  [4]: http://www.membase.org/&#xD;&#xA;  [5]: http://doublebuffered.com/2008/02/26/gdc-08-sql-considered-harmful/" />
  <row Id="4439" PostHistoryTypeId="2" PostId="2328" RevisionGUID="f4a4e643-196e-4b2f-aad4-de4ddddf35b4" CreationDate="2010-08-06T17:04:50.243" UserId="395" Text="Both the 360 TCRs and the PS3 cert lists are available on the developer networks. You need to be a registered studio to get access. I've read the Xbox ones enough times that I might be able to answer some suitably generic questions without being in breach of the NDA." />
  <row Id="4440" PostHistoryTypeId="2" PostId="2329" RevisionGUID="ae7f7fca-128d-4593-a043-cdad22db6d93" CreationDate="2010-08-06T17:13:20.370" UserId="1312" Text="I've seen this question on SO, but here i want it to focus on GFX.&#xD;&#xA;&#xD;&#xA;So in your opinion what applications/features should every aspiring GFX programmer write/change to get better?&#xD;&#xA;&#xD;&#xA;Community wiki since there is no &quot;right answer&quot;." />
  <row Id="4441" PostHistoryTypeId="1" PostId="2329" RevisionGUID="ae7f7fca-128d-4593-a043-cdad22db6d93" CreationDate="2010-08-06T17:13:20.370" UserId="1312" Text="What should every graphics programmer write" />
  <row Id="4442" PostHistoryTypeId="3" PostId="2329" RevisionGUID="ae7f7fca-128d-4593-a043-cdad22db6d93" CreationDate="2010-08-06T17:13:20.370" UserId="1312" Text="&lt;graphics&gt;&lt;programming&gt;&lt;graphics-programming&gt;" />
  <row Id="4443" PostHistoryTypeId="16" PostId="2329" RevisionGUID="ae7f7fca-128d-4593-a043-cdad22db6d93" CreationDate="2010-08-06T17:13:20.370" UserId="1312" />
  <row Id="4444" PostHistoryTypeId="2" PostId="2330" RevisionGUID="0e0b32d6-8e4e-4527-8da3-ce77fc6a872d" CreationDate="2010-08-06T17:19:04.620" UserId="1156" Text="Seems to be a little vague.  &#xD;&#xA;You have 3 main options, I think.&#xD;&#xA;&#xD;&#xA; 1. Learn. The best idea in the long term.&#xD;&#xA; 2. Get someone to do it for you. The most flexible idea.&#xD;&#xA; 3. Get free &lt;asset here&gt; off the net. The quickest idea.  &#xD;&#xA;&#xD;&#xA;1 is probably the best if you have plenty of time. It gives you an advantage for any future projects you do, and gives you a wider skillset.  &#xD;&#xA;&#xD;&#xA;2 is better if you need them to be higher quality, but exactly what you want. May take a while to find someone, without paying them.  &#xD;&#xA;&#xD;&#xA;3 is the quickest by far, but it isn't great because you have to make do with what you find." />
  <row Id="4445" PostHistoryTypeId="5" PostId="2329" RevisionGUID="a203ab5b-a978-44bb-bc7f-0e736b8a9591" CreationDate="2010-08-06T17:29:44.277" UserId="1312" Comment="added 176 characters in body; added 1 characters in body" Text="I've seen this question on SO, but here i want it to focus on GFX.&#xD;&#xA;&#xD;&#xA;So in your opinion what applications/features should every aspiring GFX programmer write/change to get better?&#xD;&#xA;&#xD;&#xA;Community wiki since there is no &quot;right answer&quot;.&#xD;&#xA;&#xD;&#xA;LE: Not referring to actual games, but to graphical features for example changing something in an engine (e.g how it loads objects), making a compositor, so on and so forth." />
  <row Id="4446" PostHistoryTypeId="2" PostId="2331" RevisionGUID="43fbe09f-1c72-45a0-9031-6f616c86e83c" CreationDate="2010-08-06T17:42:53.397" UserId="865" Text="Mind you, a lot of the requirements are fairly nitpicky whereas others are relatively pointless. A good example would be your example of 'a screen must be animating so the game doesn't appear hung' is one of them. Now you're in the situation where games animate the loading screen on their own thread while loading. If the loading thread crashes the screen keeps animating, leading to the false impression that the game didn't crash." />
  <row Id="4447" PostHistoryTypeId="2" PostId="2332" RevisionGUID="5729506a-9ee9-4070-af31-b81d87982f97" CreationDate="2010-08-06T17:49:52.840" UserId="865" Text="While not rendering code, I think writing a BSP compiler and accompanying traversal code is a nice exercise in vector maths.&lt;br&gt; &#xD;&#xA;Secondly, a deferred renderer. Not because it's the end-all answer to rendering, but it'll give you insight in another approach to rendering." />
  <row Id="4448" PostHistoryTypeId="16" PostId="2332" RevisionGUID="5729506a-9ee9-4070-af31-b81d87982f97" CreationDate="2010-08-06T17:49:52.840" UserId="-1" />
  <row Id="4449" PostHistoryTypeId="2" PostId="2333" RevisionGUID="9faadbec-31fd-45ce-b1d5-83a9ac38da30" CreationDate="2010-08-06T18:15:00.393" UserId="190" Text="My answer is always the same: if you haven't written one before, write a raytracer.&#xD;&#xA;&#xD;&#xA;You'll have to deal with optimization structures, numerical precision, and all sorts of other issues, but you'll also work directly with the mathematics of light in a way that you rarely do when dealing with all the hacks and approximations that make up a production real-time renderer.&#xD;&#xA;&#xD;&#xA;Strip away all the edifice of loading systems, buzzwords-of-the-week, deferred-this or forward-that, and you're left, finally, with light traveling through a medium. In the end, that's all there is to graphics." />
  <row Id="4450" PostHistoryTypeId="16" PostId="2333" RevisionGUID="9faadbec-31fd-45ce-b1d5-83a9ac38da30" CreationDate="2010-08-06T18:15:00.393" UserId="-1" />
  <row Id="4451" PostHistoryTypeId="2" PostId="2334" RevisionGUID="5b746e4f-59d3-410b-9a71-23549453e47c" CreationDate="2010-08-06T18:24:02.390" UserId="189" Text="If you have the money, invest in yourself: buy a **drawing tablet**. Personally, I am a terrible artist, I just can't make good graphics, but it sure didn't help that I was stuck trying to do things with my mouse, sloppily drawing lines or clicking pixel-by-pixel. I can at least roughly sketch something that works, and my [Wacom Intuos4][1] is amazing for that (but surely overkill if you ask a professional). The [Wacom Bamboo][2] tablets are &quot;entry-level&quot; consumer models with slightly less accuracy, but they start at $69 ([Wacom store][3]; you want one with a pen, not the $49 touch model) and would be just great. So if you are able to somewhat draw things by hand, try getting a tablet - it won't improve your art skills unless you work at it but it can at least make it easier for you to make crappy programmer art. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wacom.com/intuos/&#xD;&#xA;  [2]: http://www.wacom.com/bamboo/&#xD;&#xA;  [3]: http://direct.wacom.com/stores/5/BAMBOO_C137.cfm" />
  <row Id="4452" PostHistoryTypeId="2" PostId="2335" RevisionGUID="a2df2088-5150-4a7b-b77a-7f234b39d041" CreationDate="2010-08-06T18:35:56.453" UserId="1232" Text="It's worth noting that most of your operations can be represented by negation and union, where negation of some geometry is just that geometry with its normals flipped. So if you can get union right, then the other operations should just follow:&#xD;&#xA;&#xD;&#xA;* intersection(A,B) := !union(!A,!B)&#xD;&#xA;* subtract(A and B) := !union(!A,B)&#xD;&#xA;&#xD;&#xA;Sander has some fairly good blog posts that discuss CSG implementations: http://sandervanrossen.blogspot.com/search/label/CSG&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4453" PostHistoryTypeId="2" PostId="2336" RevisionGUID="ec54e2f7-04ac-4916-8ff3-32c795632bfa" CreationDate="2010-08-06T18:56:41.687" UserId="1429" Text="I am making a game with WPF and C#, and I frequently am in need of artwork for it.  Some things could be easily shared, such as explosion animations, exhaust plumes, etc.  I was wondering if there are any good web sites for this?  All I can find are tutorials and the infrequent sample, but I imagine there is a site out there that I am missing.  I would also like to clarify that I am looking for pure vector based XAML snippets.  I know there are a lot of sites out there for sprites and textures, but I am looking for XAML components that I can tweak." />
  <row Id="4454" PostHistoryTypeId="1" PostId="2336" RevisionGUID="ec54e2f7-04ac-4916-8ff3-32c795632bfa" CreationDate="2010-08-06T18:56:41.687" UserId="1429" Text="Web site for XAML snippet sharing?" />
  <row Id="4455" PostHistoryTypeId="3" PostId="2336" RevisionGUID="ec54e2f7-04ac-4916-8ff3-32c795632bfa" CreationDate="2010-08-06T18:56:41.687" UserId="1429" Text="&lt;graphics&gt;&lt;animation&gt;&lt;wpf&gt;" />
  <row Id="4456" PostHistoryTypeId="2" PostId="2337" RevisionGUID="2c021870-5d65-482c-94ae-1775827f1337" CreationDate="2010-08-06T20:19:32.117" UserId="422" Text="You just need to read this: http://www.lostgarden.com/2007/12/how-to-bootstrap-your-indie-art-needs.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4457" PostHistoryTypeId="2" PostId="2338" RevisionGUID="8e125069-a555-466a-a8f3-9ae36cfe6bdc" CreationDate="2010-08-06T20:53:55.777" UserId="959" Text="I want to create a Windows Form-based adventure game where the player clicks a hex on a static map to bring up their next encounter. I have the map already and plan to scan it and convert it to a .bmp file. My problem is that I'm not sure how to tie the map image in with the game code. Unless I'm mistaken, I think I need to use some kind of imagemap control. If that's the case, do I need to plot each hex individually, or is there a way to plot the whole map in bulk? I found [this][1] article, but I'm not sure if it's relevant to what I want to do or not. I'm just looking for general information or links to relevant articles. Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/articles/article1800.asp" />
  <row Id="4458" PostHistoryTypeId="1" PostId="2338" RevisionGUID="8e125069-a555-466a-a8f3-9ae36cfe6bdc" CreationDate="2010-08-06T20:53:55.777" UserId="959" Text="Clickable hex grid in c#.net" />
  <row Id="4459" PostHistoryTypeId="3" PostId="2338" RevisionGUID="8e125069-a555-466a-a8f3-9ae36cfe6bdc" CreationDate="2010-08-06T20:53:55.777" UserId="959" Text="&lt;programming&gt;&lt;c#&gt;&lt;beginner&gt;" />
  <row Id="4460" PostHistoryTypeId="2" PostId="2339" RevisionGUID="00721832-ad98-4eff-9cb0-355b62520b46" CreationDate="2010-08-06T21:11:25.510" UserId="659" Text="It may be of little practical use these days, but writing at a software renderer, at least a basic one (maybe just some spinning textured cubes), is a worthwhile exercise.&#xD;&#xA;&#xD;&#xA;Understanding how to transform, project, clip, depth-sort, rasterize, and texture map polygons yourself will give you a much better understanding of what 3D hardware and rendering APIs are doing" />
  <row Id="4461" PostHistoryTypeId="16" PostId="2339" RevisionGUID="00721832-ad98-4eff-9cb0-355b62520b46" CreationDate="2010-08-06T21:11:25.510" UserId="-1" />
  <row Id="4462" PostHistoryTypeId="2" PostId="2340" RevisionGUID="ae701a93-6521-4999-aae1-56ffb54d6601" CreationDate="2010-08-06T21:29:30.773" UserId="659" Text="In a baseball game, back in the GBA days, we had 3 palettes for different skin tones on the players.&#xD;&#xA;&#xD;&#xA;Somehow they ended up in the wrong order, so all the white players appeared as black and vice-versa. As a UK-based team that didn't know a whole lot about the sport, we hadn't noticed this. A rather trivial bug, a one line fix to put it right.&#xD;&#xA;&#xD;&#xA;What gave it the comedy value wasn't the bug itself, but the response from the QA team... they'd logged a hundred or more individual bug reports... One for each individual player that they'd spotted was wrong!" />
  <row Id="4463" PostHistoryTypeId="16" PostId="2340" RevisionGUID="ae701a93-6521-4999-aae1-56ffb54d6601" CreationDate="2010-08-06T21:29:30.773" UserId="-1" />
  <row Id="4464" PostHistoryTypeId="2" PostId="2341" RevisionGUID="d4fd909a-6535-4b4e-9e18-1ad2db849773" CreationDate="2010-08-06T21:37:19.307" UserId="1004" Text="Learn the mechanics and skills of writing good shaders. While not 100% necessary in all cases, it's a valuable skill to know." />
  <row Id="4465" PostHistoryTypeId="16" PostId="2341" RevisionGUID="d4fd909a-6535-4b4e-9e18-1ad2db849773" CreationDate="2010-08-06T21:37:19.307" UserId="-1" />
  <row Id="4466" PostHistoryTypeId="2" PostId="2342" RevisionGUID="c4dacae2-f3d1-4276-abf8-656285842ff6" CreationDate="2010-08-06T21:53:33.120" UserId="189" Text="I really like [Amit's Game Programming Information][1], and it has a whole section on [hexagon grids][2]. Perhaps you'd find any of those links to be informative?&#xD;&#xA;&#xD;&#xA;Here is the list of links he gives:&#xD;&#xA;&#xD;&#xA;&gt; - [Amit’s Thoughts on Grids][3] includes squares, hexagons, and triangles&#xD;&#xA;- [Overview of hex grid coordinates][4]&#xD;&#xA;- [Hexagonal coordinates explained][5], including hex/pixel coordinate conversion&#xD;&#xA;- [Numbering Systems; Distances; Angles][6]&#xD;&#xA;- [Isometric Cube Coordinates][7]&#xD;&#xA;- [The HexPart numbering system][8] with algorithms for range, bearing, offset, and line of sight&#xD;&#xA;- [Comparison of Hexagonal coordinate systems][9], including pixel to hex coordinates, and hex distances&#xD;&#xA;- [Pixel Location to Hex Coordinates][10]&#xD;&#xA;- [Line of Sight and Distance][11], plus [a Java applet demonstrating field of view][12]&#xD;&#xA;- [Pixel coordinate to hex coordinates][13]&#xD;&#xA;- [Distances in a Hexagonal Grid][14]&#xD;&#xA;- [Identifying directions in a hex grid][15] [PDF]&#xD;&#xA;- [Coordinate system that makes distances easy][16]&#xD;&#xA;- [Grids used in Cellular Automata][17]&#xD;&#xA;- [Computing Field of View on a Hexagonal Grid][18] (source code and Java applet)&#xD;&#xA;&#xD;&#xA;I apologize if this isn't helpful. Windows Form isn't the ideal platform to develop a game, but I assume you would have one image per grid square and give it an OnClick event. There would be the issue of overlapping corners though... (the transparent corners of the square image that the grid image is on). In a traditional game you would use the above information to figure out how to translate click coordinates (screen space) to the hexagonal grid coordinates (which your link details nicely), and then handle it appropriately.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www-cs-students.stanford.edu/~amitp/gameprog.html&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/game-programming/grids/&#xD;&#xA;  [4]: http://sc.tri-bit.com/Hex_Grids&#xD;&#xA;  [5]: http://www.gamedev.net/reference/articles/article1800.asp&#xD;&#xA;  [6]: http://www-cs-students.stanford.edu/~amitp/Articles/Hexagon1.html&#xD;&#xA;  [7]: http://www-cs-students.stanford.edu/~amitp/Articles/Hexagon2.html&#xD;&#xA;  [8]: http://www.webwargaming.com/hexpart/hexpart.html&#xD;&#xA;  [9]: http://playtechs.blogspot.com/2007/04/hex-grids.html&#xD;&#xA;  [10]: http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html&#xD;&#xA;  [11]: http://www-cs-students.stanford.edu/~amitp/Articles/HexLOS.html&#xD;&#xA;  [12]: http://www.sable.mcgill.ca/~clump/Hex/HGAT.html&#xD;&#xA;  [13]: http://blog.devstone.com/aaron/archive/2004/04/18/152.aspx&#xD;&#xA;  [14]: http://web.archive.org/web/20080223153151/http://www.drking.plus.com/hexagons/misc/grid.html&#xD;&#xA;  [15]: http://www-cs-students.stanford.edu/~amitp/Articles/Identifying-directions-from-a-central-hex.pdf&#xD;&#xA;  [16]: http://jmz.iki.fi/blog/programming/hexagonal_maps&#xD;&#xA;  [17]: http://cell-auto.com/neighbourhood/&#xD;&#xA;  [18]: http://www.sable.mcgill.ca/~clump/Hex/HGAT.html" />
  <row Id="4467" PostHistoryTypeId="2" PostId="2343" RevisionGUID="98eaf2fa-0530-4d4d-8704-29289d71649b" CreationDate="2010-08-06T22:18:20.287" UserDisplayName="Skyler York" Text="The actual TCRs (what Microsoft calls their set of requirements) are protected under NDA, so you're not going to be able to find them unless you're a &quot;certified&quot; (&quot;approved&quot;? I'm not sure what terminology they use) developer.  I personally always err on the side of caution when it comes to NDAs, so I'm even reluctant to provide non-specific information on the requirements.  But like you said, while some of them might be nitpicky most of them are common sense rules that exist to provide a friendly and consistent experience to the end-user, and are guidelines you should be following even if you weren't developing a console title." />
  <row Id="4468" PostHistoryTypeId="2" PostId="2344" RevisionGUID="ab621e79-45a6-4359-8be1-09e9b416d457" CreationDate="2010-08-06T23:45:26.967" UserId="427" Text="On Pirates of the Burning Sea, we stared off with MySQL (though honestly I would've preferred Postgres) and when it started falling down under load, we switched to Microsoft SQL Server. Honestly, though, I probably won't go that route again in the future. Most of the PotBS data is pre-serialized before it's persisted anyway, so a large portion of what's in the DB is nothing more than an overgrown key/value store. On top of that, to get better performance out of our persistence layer, and better control of how data was cached in memory, we ended up writing a caching server that sat in front of the database.&#xD;&#xA;&#xD;&#xA;So Kylotan's very right, you're not going to get around rolling your own on some level. SQL relational database servers aren't designed for the way games use data.  Instead of assuming relational DB servers were the end-all of databases, we really should have thought more about what benefits we were looking for before choosing a tool.&#xD;&#xA;&#xD;&#xA;Next time around, I'd look more into things like BerkleyDB or some of the other NoSQL-style DBs." />
  <row Id="4469" PostHistoryTypeId="2" PostId="2345" RevisionGUID="4c1411fe-93ee-4c46-b0ce-bb30a461ebaf" CreationDate="2010-08-07T00:46:45.327" UserId="328" Text="Any [pastebin][1] that supports XML.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=pastebin" />
  <row Id="4470" PostHistoryTypeId="10" PostId="2301" RevisionGUID="fee9badd-a7b2-4f96-9fa1-1b16109ddf82" CreationDate="2010-08-07T01:16:05.453" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:55,&quot;DisplayName&quot;:&quot;David McGraw&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4471" PostHistoryTypeId="5" PostId="2301" RevisionGUID="c4d77b50-e7bf-4e5a-adaa-91941e907baf" CreationDate="2010-08-07T01:16:05.547" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How to make animated buttons in a menu with Cocos2d?](http://gamedev.stackexchange.com/questions/2121/how-to-make-animated-buttons-in-a-menu-with-cocos2d)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;How do I make fun and interactive menus with cocos2d, all the tutorials are just for simple clickable menus. Can any one help me learn this?&#xD;&#xA;&#xD;&#xA;It would be see the menu flip or slide away, I know you can do this with scenes but how do I make this with just the menu?&#xD;&#xA;&#xD;&#xA;Let's say the menu is a bunch of cards and I want them to flip over like the sub-menu is on the backside of the card, how would I do this?&#xD;&#xA;&#xD;&#xA;Or, make the Main menu slide in from the left, right, top or bottom side and then when a button is selected it slides away the same way and switch to a sub-menu (settings, Score etc)?&#xD;&#xA;&#xD;&#xA;Anyone?&#xD;&#xA;&#xD;&#xA;David" />
  <row Id="4472" PostHistoryTypeId="5" PostId="2121" RevisionGUID="d5c57356-7263-4d18-9885-48642c3eb54e" CreationDate="2010-08-07T01:16:32.177" UserId="51" Comment="deleted 7 characters in body; edited tags" Text="How do I make animated menus with cocos2d, I just want to animate the buttons and not the entire scene. Effects I look for is flipping buttons (like the back of the button is the next menu), buttons that retract once selected and re appear with new button.&#xD;&#xA;&#xD;&#xA;Basically what I ask for is cool effects between menu transitions." />
  <row Id="4473" PostHistoryTypeId="6" PostId="2121" RevisionGUID="d5c57356-7263-4d18-9885-48642c3eb54e" CreationDate="2010-08-07T01:16:32.177" UserId="51" Comment="deleted 7 characters in body; edited tags" Text="&lt;iphone&gt;&lt;cocos2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="4474" PostHistoryTypeId="2" PostId="2346" RevisionGUID="2c336b4d-8be2-4937-8c51-707e2956783e" CreationDate="2010-08-07T01:20:42.667" UserId="430" Text="If you have the time and energy, you could download the Quake 3 source and study it.  It's fairly easy to comprehend if you're comfortable with C, and equally easy to tinker with.&#xD;&#xA;&#xD;&#xA;Which other multiplayer games have source available and use UDP?&#xD;&#xA;" />
  <row Id="4475" PostHistoryTypeId="16" PostId="2346" RevisionGUID="2c336b4d-8be2-4937-8c51-707e2956783e" CreationDate="2010-08-07T01:20:42.667" UserId="-1" />
  <row Id="4476" PostHistoryTypeId="6" PostId="2185" RevisionGUID="75ba42a4-6b8e-4844-9e4f-a53e91f46ee6" CreationDate="2010-08-07T01:23:17.390" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;language-agnostic&gt;&lt;resources&gt;" />
  <row Id="4477" PostHistoryTypeId="6" PostId="2253" RevisionGUID="650afe28-903a-4144-9d71-852443eb5047" CreationDate="2010-08-07T01:26:14.997" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;c++&gt;&lt;architecture&gt;&lt;directx&gt;&lt;audio&gt;" />
  <row Id="4478" PostHistoryTypeId="6" PostId="1975" RevisionGUID="9445b5e9-a139-44c5-b94d-ea39d4249938" CreationDate="2010-08-07T01:26:38.243" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;gui&gt;" />
  <row Id="4479" PostHistoryTypeId="6" PostId="2316" RevisionGUID="b3e96355-ff8d-4672-8e82-2cf0b9701173" CreationDate="2010-08-07T01:26:56.587" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;books&gt;&lt;console&gt;" />
  <row Id="4480" PostHistoryTypeId="6" PostId="1119" RevisionGUID="e1adcb76-cff8-461d-923d-0b2570dacf59" CreationDate="2010-08-07T01:27:04.527" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;" />
  <row Id="4481" PostHistoryTypeId="6" PostId="1583" RevisionGUID="5812c5d3-e5d7-41e6-9d84-9cecf20e2e2e" CreationDate="2010-08-07T01:27:13.530" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;network&gt;" />
  <row Id="4482" PostHistoryTypeId="6" PostId="1702" RevisionGUID="90da7328-16b0-4a1e-94fb-bcb5a978ced7" CreationDate="2010-08-07T01:27:48.707" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;assets&gt;&lt;android&gt;" />
  <row Id="4483" PostHistoryTypeId="6" PostId="455" RevisionGUID="020a926e-c044-462a-b788-8e67b0e162d9" CreationDate="2010-08-07T01:28:02.187" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;books&gt;&lt;articles&gt;" />
  <row Id="4484" PostHistoryTypeId="6" PostId="1901" RevisionGUID="93239d01-77a7-42eb-92e9-2ba6911f711e" CreationDate="2010-08-07T01:28:17.817" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;xna&gt;&lt;c#&gt;&lt;patterns&gt;&lt;unit-testing&gt;" />
  <row Id="4485" PostHistoryTypeId="6" PostId="1506" RevisionGUID="b86ddda5-c039-4be4-bb46-3a1ed71343c7" CreationDate="2010-08-07T01:28:28.067" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;assets&gt;&lt;resources&gt;" />
  <row Id="4486" PostHistoryTypeId="6" PostId="651" RevisionGUID="1a080db2-54c0-4a74-b622-49323c6dfbc9" CreationDate="2010-08-07T01:28:43.027" UserId="51" Comment="edited tags" Text="&lt;engine&gt;" />
  <row Id="4487" PostHistoryTypeId="6" PostId="651" RevisionGUID="d8a47a51-3c3f-4238-9429-5e9bc4b9d911" CreationDate="2010-08-07T01:29:00.157" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;" />
  <row Id="4488" PostHistoryTypeId="6" PostId="1542" RevisionGUID="cbbd4244-2403-46b1-b92e-77551ae4fb53" CreationDate="2010-08-07T01:29:11.903" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;best-practices&gt;&lt;network&gt;" />
  <row Id="4489" PostHistoryTypeId="6" PostId="1267" RevisionGUID="128e8a96-6418-455f-b51f-e3b7288b1bca" CreationDate="2010-08-07T01:29:26.550" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;sprites&gt;&lt;animation&gt;" />
  <row Id="4490" PostHistoryTypeId="6" PostId="1212" RevisionGUID="85e742bf-17ba-49ee-a91d-3fa8812db2b8" CreationDate="2010-08-07T01:30:02.900" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;events&gt;" />
  <row Id="4491" PostHistoryTypeId="6" PostId="728" RevisionGUID="039935fb-00d1-4c95-a273-d59a3ca41687" CreationDate="2010-08-07T01:30:21.637" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;best-practices&gt;" />
  <row Id="4492" PostHistoryTypeId="6" PostId="645" RevisionGUID="7e04ae5c-5853-492b-8a16-050238f19964" CreationDate="2010-08-07T01:30:48.967" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;best-practices&gt;&lt;tutorials&gt;" />
  <row Id="4493" PostHistoryTypeId="2" PostId="2347" RevisionGUID="aa6507c9-4106-436e-99d3-65827da7ac0c" CreationDate="2010-08-07T01:34:49.333" UserId="1463" Text="Google dead recogning" />
  <row Id="4495" PostHistoryTypeId="2" PostId="2349" RevisionGUID="3f6527fd-fc30-40ed-bf0b-43a15f025fa4" CreationDate="2010-08-07T02:16:06.820" UserId="142" Text="This is a pretty broad question, but I'll try to summarize the important aspects.&#xD;&#xA;&#xD;&#xA;The first decision to make in the network code for your game is whether you want a client/server setup of a peer to peer arrangement. Most games, with RTS probably being the only notable exception, are probably using a client/server architecture. The main advantage being that this arrangement is more fault tolerant and provides more control over what data each client receives. Peer to peer allows to send far less data, but requires each peer to fully simulate the world precisely as every other peer does. If one peer lags or desynchronizes, everyone must either wait for them to recover or they are simply lost.&#xD;&#xA;&#xD;&#xA;UDP is generally the correct choice as well, certainly for any client/server model. TCP might be practical for a peer to peer game, but even then UDP might be a better choice. Basically, UDP handles less for you, which means more effort but also more control over how you deal with faults.&#xD;&#xA;&#xD;&#xA;For Pong the choice I would make is client/server, being that it is an action oriented game. One thing to note here, even though you say that one player &quot;is the server&quot;, you are best off structuring your code such that they are essentially running a local server and connecting to it as a client.&#xD;&#xA;&#xD;&#xA;You definitely don't want to be &quot;spamming&quot; updates in any direction either. One update from the server per frame is all that is needed, and your server should be running at a fixed frame rate. What that is is up to you, but there is no need to go overboard. A 50ms frame (20 FPS) is plenty to get nice smooth game play. To keep things smooth on the client, you want to make use of interpolation. The client should be constantly transitioning between server frame snapshots, this could easily be the topic of a separate question though.&#xD;&#xA;&#xD;&#xA;Client updates should be limited as well, though one per frame will likely be far too much if your client is running at a decent frame rate." />
  <row Id="4496" PostHistoryTypeId="9" PostId="1901" RevisionGUID="153c2998-a9f8-44e4-bf1a-ca5cb47317b5" CreationDate="2010-08-07T05:32:35.920" UserId="1198" Comment="Rollback to [032b16f5-9e2b-40d4-8827-d6b5fa882615]" Text="&lt;game-design&gt;&lt;xna&gt;&lt;c#&gt;&lt;patterns&gt;&lt;unit-testing&gt;" />
  <row Id="4497" PostHistoryTypeId="2" PostId="2350" RevisionGUID="befd9b99-000c-4094-9d58-84354bf67694" CreationDate="2010-08-07T05:47:01.060" UserId="1440" Text="Here is a website that has very interesting demographics regarding MMORPG's in the US.&#xD;&#xA;http://www.nickyee.com/daedalus/gateway_intro.html&#xD;&#xA;&#xD;&#xA;This is from the same site but it has a bit more general data. Just keep clicking the small &quot;Next Page&quot; link at the bottom for more statistics including Good vs Evil, Choosing a Race, and etc.&#xD;&#xA;http://www.nickyee.com/daedalus/archives/001558.php&#xD;&#xA;&#xD;&#xA;Here is a slide show on demographics for teen and adult gameplay in 2009&#xD;&#xA;http://www.pewinternet.org/Presentations/2009/11--Cheats-for-Video-Game-Marketers.aspx&#xD;&#xA;&#xD;&#xA;This is another site that has demographic data on game developers which is useful for those developing an SDK or engine. You can also submit a survey to help improve these statistics.&#xD;&#xA;http://archives.igda.org/diversity/report.php&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you are looking for specific demographics you could also try picking up the phone book and calling major players in the game development realm. For example, I am sure Microsoft will have no problem giving you demographics on its specific users. Hope this helps." />
  <row Id="4498" PostHistoryTypeId="16" PostId="2350" RevisionGUID="befd9b99-000c-4094-9d58-84354bf67694" CreationDate="2010-08-07T05:47:01.060" UserId="-1" />
  <row Id="4499" PostHistoryTypeId="2" PostId="2351" RevisionGUID="4c779b3e-585a-4e8e-b1fa-d6718ca8801e" CreationDate="2010-08-07T05:55:14.417" UserId="1440" Text="I want to add some nice atmospheric scattering to my 3D game engine but I am very concerned with conserving resources. I am not very familiar with how its done but can someone please give me some suggestions how to achieve this effect without using too many resources? For example, should I use precomputed or real time atmospheric scattering. Also is the effect worth it without HDR or is it practically needed." />
  <row Id="4500" PostHistoryTypeId="1" PostId="2351" RevisionGUID="4c779b3e-585a-4e8e-b1fa-d6718ca8801e" CreationDate="2010-08-07T05:55:14.417" UserId="1440" Text="Atmospheric Scattering" />
  <row Id="4501" PostHistoryTypeId="3" PostId="2351" RevisionGUID="4c779b3e-585a-4e8e-b1fa-d6718ca8801e" CreationDate="2010-08-07T05:55:14.417" UserId="1440" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="4502" PostHistoryTypeId="2" PostId="2352" RevisionGUID="2f21ffc2-584a-4a0c-b47f-6a853e0f49d9" CreationDate="2010-08-07T06:32:50.203" UserId="94" Text="Not free, but you might want to talk to [EEDAR][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eedar.com/" />
  <row Id="4503" PostHistoryTypeId="16" PostId="2352" RevisionGUID="2f21ffc2-584a-4a0c-b47f-6a853e0f49d9" CreationDate="2010-08-07T06:32:50.203" UserId="-1" />
  <row Id="4504" PostHistoryTypeId="2" PostId="2353" RevisionGUID="7aa12439-7326-4ef4-a2d0-7aabda7ef8b8" CreationDate="2010-08-07T06:40:29.113" UserId="865" Text="GPU Gems 2 has a chapter about atmospheric scattering. It's available online at&lt;br&gt;&#xD;&#xA;http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html&lt;br&gt;&#xD;&#xA;I have no experience with it so can't really answer your question further :o\&#xD;&#xA;" />
  <row Id="4505" PostHistoryTypeId="2" PostId="2354" RevisionGUID="0e621171-40c6-4caa-a22a-b0ce9c664315" CreationDate="2010-08-07T06:55:39.677" UserId="865" Text="For 2D I know there are people that use existing spritesheets and pixel over their own graphics. Whether it's ethical is a debate in its own, whether your pixeling skills will make it look halfway decent is another, but you at least got your animation cycles covered.&lt;br&gt;&#xD;&#xA;If you do know any artists it sometimes works too show them a prototype with programmer art - it'll hurt their eyes so much that they actually offer to pixel you some assets.&lt;br&gt;&#xD;&#xA;A third option for 2D is to use a 3d model and render it with cartoon rendering. But there's still a lot of artistic skill involved getting the models looking and animating the way you want to. Not aware of any real shortcuts in that area.&lt;br&gt;&#xD;&#xA;A fourth option, that seems to work well is to go for a decidedly abstract or amateur look. Milk the fact that you can't draw and make it the theme of your game. The hard part is to be consistent in your chaos, which makes it a skill again.&lt;br&gt;&#xD;&#xA;I feel your pain - I can't draw my way out of a paper bag." />
  <row Id="4506" PostHistoryTypeId="6" PostId="2351" RevisionGUID="c4a9e02f-1873-4ba2-9cf1-0c19e33c3781" CreationDate="2010-08-07T07:33:12.440" UserId="162" Comment="edited tags" Text="&lt;graphics&gt;&lt;c++&gt;&lt;opengl&gt;&lt;programming&gt;" />
  <row Id="4507" PostHistoryTypeId="6" PostId="2351" RevisionGUID="5628c9ec-59c7-4ac3-b456-017cd1c3f366" CreationDate="2010-08-07T07:45:46.473" UserId="162" Comment="edited tags" Text="&lt;c++&gt;&lt;opengl&gt;&lt;programming&gt;&lt;rendering&gt;" />
  <row Id="4508" PostHistoryTypeId="2" PostId="2355" RevisionGUID="615f7f7b-6338-430e-9e80-651afbd4a29e" CreationDate="2010-08-07T07:50:22.983" UserId="1091" Text="HDR isn't always necessary. A lot of the time you can get away with compressing your output values in the pixel shader. Essentially you're just doing the tone-mapping in a single pass, so you have HDR rendering without a wide pixel buffer. This makes it trickier to know what values you should use for the tone-mapping, and certainly makes it tough to do a localised effect. However if you use feedback from the previous frame, you can adjust the values over time, and that can actually aid the visual effect as it looks like an eye adjusting to the brightness changes over time.&#xD;&#xA;&#xD;&#xA;Doesn't work well with anything multi-pass, including alpha-blending, unless you special case those (if you're using alpha-to-coverage, it's not too bad, though you'll be linearly blending values which have been non-linearly mapped into RGB space).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4509" PostHistoryTypeId="2" PostId="2356" RevisionGUID="a0875562-c7d1-497a-a158-c43827bc57d2" CreationDate="2010-08-07T09:01:13.390" UserId="20" Text="If you don't mind providing your data to Google, then Google Analytics is a great tool for that too.&#xD;&#xA;Rather than tracking classical *page-visits* (which you could use for different Game-screens), you can use the [Event-Tracking][1] feature to track/gather all sorts of data.&#xD;&#xA;&#xD;&#xA;Implementation in Flash should be trivial. Either use the [ExternalInterface][2] to invoke JS from Flash, or use the [tracking-classes][3] provided by Google.&#xD;&#xA;&#xD;&#xA;Using *ExternalInterface* has the advantage, that you decouple your game from the actual tracking implementation. So you basically just send *messages* from inside Flash to a JavaScript callback. There you would invoke the actual tracking, be it Google Analytics or any other tracking mechanism. That makes it easy to swap/modify/remove the tracking at some other time without recompiling the Game.&#xD;&#xA;&#xD;&#xA;The advantage of tracking directly from flash is that your tracking will also work if somebody hosts the Game on a different website, without the necessary JS wrapper code.&#xD;&#xA;&#xD;&#xA;So I guess both ways of tracking are valid options to consider. The easiest route would probably be Google Analytics in combination with the ActionScript tracking implementation provided by Google.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/intl/en/apis/analytics/docs/tracking/eventTrackerOverview.html&#xD;&#xA;  [2]: http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html&#xD;&#xA;  [3]: http://code.google.com/intl/en/apis/analytics/docs/tracking/flashTrackingIntro.html" />
  <row Id="4510" PostHistoryTypeId="2" PostId="2357" RevisionGUID="1bade8b7-45ef-4042-9578-cf1626560f39" CreationDate="2010-08-07T09:45:29.950" UserId="1522" Text="Here is a good discussion on such resources on StackOverflow - http://stackoverflow.com/questions/143050/where-to-get-sprites-tilesets-for-2d-games" />
  <row Id="4511" PostHistoryTypeId="5" PostId="2313" RevisionGUID="4cfece3c-6644-47ea-b9b3-08b5183df7ba" CreationDate="2010-08-07T09:49:16.300" UserId="1156" Comment="added 19 characters in body" Text="These look pretty nice, though I'm not sure:  &#xD;&#xA;[Free Demographics][1]  &#xD;&#xA;[US Census Bureau][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freedemographics.com/&#xD;&#xA;  [2]: http://www.census.gov/main/www/access.html&#xD;&#xA;EDIT: Also, free." />
  <row Id="4512" PostHistoryTypeId="2" PostId="2358" RevisionGUID="693ef96d-57ec-47f6-aa7e-fdd8c5766e1a" CreationDate="2010-08-07T12:01:25.453" UserId="1358" Text="If the game is good enough and web-based, you can release it without &quot;proper&quot; graphics and no-one will complain.&#xD;&#xA;&#xD;&#xA;[Desktop Tower Defense](http://www.handdrawngames.com/DesktopTD/Game.asp) is a good example of this.&#xD;&#xA;&#xD;&#xA;If it makes enough money you will be able to hire a team of professional artists to revamp it.  But you might find the users still prefer the original version." />
  <row Id="4513" PostHistoryTypeId="2" PostId="2359" RevisionGUID="b0871dfd-598d-43d6-a48d-551ccacf1f5e" CreationDate="2010-08-07T13:25:28.893" UserId="490" Text="Once an internal betatester reported a bug to the Cutscene Designer:&#xD;&#xA;&#xD;&#xA;&gt; &quot;Ork in Cutscene looks blurry!&quot;&#xD;&#xA;&#xD;&#xA;Provided was a screenshot of an up-close Ork's face, totally smudged and very little textural detail.&#xD;&#xA;&#xD;&#xA;The conversation in the bug goes through several back and forth cycles - with testers and designers seperated by two floors neither were too keen on walking down or up for such a minor nuisance.&#xD;&#xA;&#xD;&#xA;At first it was suggested that this is not the designer's responsibility, after all artists make the textures. Then an artist intervened, saying that the texture looks alright.&#xD;&#xA;&#xD;&#xA;A while later the bug was eventually resolved, and this line including the screenshot used to hang on our walls for at least a year:&#xD;&#xA;&#xD;&#xA;&gt; &quot;Resolved. Increased texture quality in&#xD;&#xA;&gt; game settings.&quot;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4514" PostHistoryTypeId="16" PostId="2359" RevisionGUID="b0871dfd-598d-43d6-a48d-551ccacf1f5e" CreationDate="2010-08-07T13:25:28.893" UserId="-1" />
  <row Id="4515" PostHistoryTypeId="2" PostId="2360" RevisionGUID="5754e3bd-976c-428b-a062-d58f02b9b3e6" CreationDate="2010-08-07T13:38:37.027" UserId="490" Text="The first game I worked on that was 3D and used skeletal animations, I regularly laid under the table laughing. The reason: if animation &amp; mesh don't match up, you get a often hilariously deformed and strangely animated character struggling to resemble something lifelike and performing something meaningful with the animation data.&#xD;&#xA;&#xD;&#xA;One particular occurance was when the workers carrying wood had a little strangeness about them. It was only noticable up close, you could see their necks were a bit too long and seemed to wiggle around a bit. It wasn't until a worker stood idle and started to play what normally would have been his &quot;idle special&quot; animation.&#xD;&#xA;&#xD;&#xA;Instead of picking his nose or something like that, the following happened:&#xD;&#xA;&#xD;&#xA;His head moved at a straight 45 degree angle forward and down until it disappeared under the terrain, stretching his neck all the way. He kept this awkward position with a 2 meter long neck for a few seconds until his head bounced back.&#xD;&#xA;&#xD;&#xA;Now imagine an army of workers standing idle, looking at them from above, with them randomly sticking their heads into the floor like Ostriches for no apparent reason.&#xD;&#xA;" />
  <row Id="4516" PostHistoryTypeId="16" PostId="2360" RevisionGUID="5754e3bd-976c-428b-a062-d58f02b9b3e6" CreationDate="2010-08-07T13:38:37.027" UserId="-1" />
  <row Id="4517" PostHistoryTypeId="2" PostId="2361" RevisionGUID="c7c34300-88b1-41fc-88fe-a7c5231556ae" CreationDate="2010-08-07T14:00:43.347" UserId="490" Text="A friend and former colleague of mine has a pretty strict stance about naming games. Before setting off to come up with a game's name, we consult his Unword-List. It contains all the cliché words that should never be used in one of our games. Here's a sample as far as I remember it:&#xD;&#xA;&#xD;&#xA; - the&#xD;&#xA; - of&#xD;&#xA; - god&#xD;&#xA; - war&#xD;&#xA; - battle&#xD;&#xA; - spell&#xD;&#xA; - force&#xD;&#xA; - forge&#xD;&#xA; - and (includes &amp;)&#xD;&#xA; - top&#xD;&#xA; - command(er)&#xD;&#xA; - conquer(or)&#xD;&#xA; - by&#xD;&#xA; - undead&#xD;&#xA; - zombie&#xD;&#xA; - king&#xD;&#xA; - demon&#xD;&#xA; - slayer&#xD;&#xA; - beyond&#xD;&#xA; - good&#xD;&#xA; - evil&#xD;&#xA; - light&#xD;&#xA; - dark&#xD;&#xA; - world&#xD;&#xA; - fantasy&#xD;&#xA; - hero&#xD;&#xA; - avatar&#xD;&#xA; - space&#xD;&#xA; - vs&#xD;&#xA; - ...&#xD;&#xA;&#xD;&#xA;And so on. My point being: it's much easier to settle with things you DON'T want in your game's name up front, and forces you to be really creative. Or, if you're not, you can always enter all the no-go words into a textfile and let a random name generator have at it. &#xD;&#xA;&#xD;&#xA;Out comes: &quot;Evil Hero Commander of the Fantasy Space World by God&quot; or similar. :)&#xD;&#xA;" />
  <row Id="4518" PostHistoryTypeId="5" PostId="2361" RevisionGUID="2cff4b0a-8f5b-44df-9b98-47ffcfcdb0f2" CreationDate="2010-08-07T14:08:14.830" UserId="490" Comment="added 96 characters in body" Text="A friend and former colleague of mine has a pretty strict stance about naming games. Before setting off to come up with a game's name, we consult his Unword-List. It contains all the cliché words that should never be used in one of our games. Here's a sample as far as I remember it:&#xD;&#xA;&#xD;&#xA; - the&#xD;&#xA; - of&#xD;&#xA; - god&#xD;&#xA; - war&#xD;&#xA; - battle&#xD;&#xA; - spell&#xD;&#xA; - force&#xD;&#xA; - forge&#xD;&#xA; - and (includes &amp;)&#xD;&#xA; - top&#xD;&#xA; - command(er)&#xD;&#xA; - conquer(or)&#xD;&#xA; - by&#xD;&#xA; - undead&#xD;&#xA; - zombie&#xD;&#xA; - king&#xD;&#xA; - demon&#xD;&#xA; - slayer&#xD;&#xA; - beyond&#xD;&#xA; - good&#xD;&#xA; - evil&#xD;&#xA; - light&#xD;&#xA; - dark&#xD;&#xA; - world&#xD;&#xA; - fantasy&#xD;&#xA; - hero&#xD;&#xA; - avatar&#xD;&#xA; - space&#xD;&#xA; - vs&#xD;&#xA; - ...&#xD;&#xA;&#xD;&#xA;And so on. The list is intentionally restrictive on the use of binding words like of, and, the, and so on. My point being: it's much easier to settle with things you DON'T want in your game's name up front, and forces you to be really creative. Or, if you're not, you can always enter all the no-go words into a textfile and let a random name generator have at it. &#xD;&#xA;&#xD;&#xA;Out comes: &quot;Evil Hero Commander of the Fantasy Space World by God&quot; or similar. :)&#xD;&#xA;" />
  <row Id="4519" PostHistoryTypeId="5" PostId="2347" RevisionGUID="dbc999c7-f72b-4a83-81ad-a7f70f9ed73c" CreationDate="2010-08-07T14:53:26.583" UserId="1463" Comment="Correct spelling" Text="Google dead reckoning." />
  <row Id="4520" PostHistoryTypeId="5" PostId="2347" RevisionGUID="cdd727d0-971b-4892-84c2-3c3bbb9858f4" CreationDate="2010-08-07T15:01:52.977" UserId="1463" Comment="Added more info" Text="Google dead reckoning.&#xD;&#xA;Sending out updates for 4 players is not going to be significant.  The amount of data sent is going to be on the order of bytes.  So, that means frequent updates should be ok.  With dead reckoning, you move the player on the client and the server.  The server is the authority.  When the clients position becomes too far out of synch from the server, it has to drift back into alignment.&#xD;&#xA;http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/Quake3Networking&#xD;&#xA;Using UDP is the way to go. Bupdates will be sent to frequently that lost data will soon be replaced by incoming data anyway. The packet retransmit of TCP is not worth it for player position.&#xD;&#xA;Look at this article for more info on how to keep the client and server on synch." />
  <row Id="4521" PostHistoryTypeId="2" PostId="2362" RevisionGUID="8b5fc0dd-e0db-44c6-a280-fcabb16d90a8" CreationDate="2010-08-07T16:24:07.693" UserId="1456" Text="We R &quot;nano&quot; game dev company working on REFUSION. &#xD;&#xA;DX9 render is almost done and question is: Should we move it to DX11 or not?&#xD;&#xA;Have anyone some experience?&#xD;&#xA;&#xD;&#xA;Here are some videos from dev progress from the very beginning: &#xD;&#xA;&#xD;&#xA;[Dev test videos][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://refusion.samboush.com/gamedev/show.asp?P1=letsdoit" />
  <row Id="4522" PostHistoryTypeId="1" PostId="2362" RevisionGUID="8b5fc0dd-e0db-44c6-a280-fcabb16d90a8" CreationDate="2010-08-07T16:24:07.693" UserId="1456" Text="The pros and cons - DX9 moving to DX11 render?" />
  <row Id="4523" PostHistoryTypeId="3" PostId="2362" RevisionGUID="8b5fc0dd-e0db-44c6-a280-fcabb16d90a8" CreationDate="2010-08-07T16:24:07.693" UserId="1456" Text="&lt;directx9&gt;&lt;directx11&gt;" />
  <row Id="4524" PostHistoryTypeId="2" PostId="2363" RevisionGUID="9b57b5df-61d6-4fc7-b5e8-07b82536beb6" CreationDate="2010-08-07T16:34:55.463" UserId="1156" Text="An immediate point is that if you have solely DirectX11 rendering, you miss out on any users still on Windows XP.  &#xD;&#xA;I do not have any DirectX experience, but for the end user, [there is not much difference between DirectX9 and DirectX11 features, unless they have very good eyesight and pay attention to graphics.][1]  &#xD;&#xA;And a quote from the article:  &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&gt; What's the good news? In our testing, the DirectX 11 code path provided superior performance compared to DirectX 9 in many cases, even though the enhanced effects were enabled.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tomshardware.com/reviews/aliens-vs-predator-directx-11-benchmark,2606-4.html" />
  <row Id="4525" PostHistoryTypeId="5" PostId="2363" RevisionGUID="c4742a87-5483-4fa3-b6b8-c5d48a8de509" CreationDate="2010-08-07T18:21:38.877" UserId="1156" Comment="added 242 characters in body" Text="An immediate point is that if you have solely DirectX11 rendering, you miss out on any users still on Windows XP.  &#xD;&#xA;EDIT: After misreading as the project was almost finished, I think it would be good to switch to DirectX 11, since in 2 years, DX12 may be released. Though I would keep a backup option of 9 available, in case there are any xp users still.  &#xD;&#xA;I do not have any DirectX experience, but for the end user, [there is not much difference between DirectX9 and DirectX11 features, unless they have very good eyesight and pay attention to graphics.][1]  &#xD;&#xA;And a quote from the article:  &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&gt; What's the good news? In our testing, the DirectX 11 code path provided superior performance compared to DirectX 9 in many cases, even though the enhanced effects were enabled.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tomshardware.com/reviews/aliens-vs-predator-directx-11-benchmark,2606-4.html" />
  <row Id="4526" PostHistoryTypeId="6" PostId="2086" RevisionGUID="058509e8-90ae-469a-bb28-0f18f2d4cc13" CreationDate="2010-08-07T18:40:47.390" UserId="14" Comment="edited tags" Text="&lt;competition&gt;" />
  <row Id="4527" PostHistoryTypeId="6" PostId="2057" RevisionGUID="34b84dc1-f184-4845-a659-5d39a42b3a0e" CreationDate="2010-08-07T18:40:58.700" UserId="14" Comment="edited tags" Text="&lt;open-source&gt;" />
  <row Id="4528" PostHistoryTypeId="6" PostId="2029" RevisionGUID="f6c8217a-f911-4aaa-8247-8a2239a5cbff" CreationDate="2010-08-07T18:45:50.233" UserId="14" Comment="edited tags" Text="&lt;programming&gt;&lt;math&gt;" />
  <row Id="4529" PostHistoryTypeId="6" PostId="1892" RevisionGUID="ace0b599-a663-4b28-8b6e-5b28ba49425b" CreationDate="2010-08-07T18:47:09.950" UserId="14" Comment="edited tags" Text="&lt;planning&gt;" />
  <row Id="4530" PostHistoryTypeId="6" PostId="1611" RevisionGUID="3b6b2d44-9a7b-4149-bd7b-2649805e89e8" CreationDate="2010-08-07T18:47:43.820" UserId="14" Comment="edited tags" Text="&lt;education&gt;" />
  <row Id="4531" PostHistoryTypeId="6" PostId="765" RevisionGUID="ff4b4042-ec4a-4feb-875b-16d1fd04fa6f" CreationDate="2010-08-07T18:48:24.643" UserId="14" Comment="edited tags" Text="&lt;indie&gt;&lt;business&gt;&lt;productivity&gt;" />
  <row Id="4532" PostHistoryTypeId="6" PostId="706" RevisionGUID="c469fbd2-cbe0-49cb-820c-a249024cd0bd" CreationDate="2010-08-07T18:48:32.367" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;&lt;cocoa&gt;" />
  <row Id="4533" PostHistoryTypeId="6" PostId="640" RevisionGUID="7c8c36f1-5cd9-4ffa-aef8-cec07b84cfc6" CreationDate="2010-08-07T18:48:46.640" UserId="14" Comment="edited tags" Text="&lt;learning&gt;&lt;tips&gt;" />
  <row Id="4534" PostHistoryTypeId="6" PostId="372" RevisionGUID="a21083dd-e14c-4fa1-8ee3-4056830e83fa" CreationDate="2010-08-07T18:49:00.290" UserId="14" Comment="edited tags" Text="&lt;flash&gt;&lt;web&gt;&lt;html5&gt;&lt;javascript&gt;" />
  <row Id="4535" PostHistoryTypeId="6" PostId="371" RevisionGUID="cdc7b634-f95c-4c9f-b8cc-fb04b77178f2" CreationDate="2010-08-07T18:49:10.883" UserId="14" Comment="edited tags" Text="&lt;engine&gt;&lt;c&gt;" />
  <row Id="4536" PostHistoryTypeId="6" PostId="350" RevisionGUID="5c7ff6c4-c9d7-4da4-b13c-837ffdb600b1" CreationDate="2010-08-07T18:49:19.713" UserId="14" Comment="edited tags" Text="&lt;fun&gt;" />
  <row Id="4537" PostHistoryTypeId="6" PostId="268" RevisionGUID="e19f4219-39d5-44cb-8619-ec0f61ceb551" CreationDate="2010-08-07T18:49:25.657" UserId="14" Comment="edited tags" Text="&lt;c++&gt;" />
  <row Id="4538" PostHistoryTypeId="6" PostId="2036" RevisionGUID="66688957-01b7-4abf-b443-d028fb9a752c" CreationDate="2010-08-07T18:49:43.003" UserId="14" Comment="edited tags" Text="&lt;academic-research&gt;" />
  <row Id="4539" PostHistoryTypeId="6" PostId="222" RevisionGUID="b1dc5864-1cd8-4af3-8655-792e707deaf1" CreationDate="2010-08-07T18:50:12.597" UserId="14" Comment="edited tags" Text="&lt;tutorials&gt;&lt;unity&gt;" />
  <row Id="4540" PostHistoryTypeId="6" PostId="5" RevisionGUID="5401ebf0-634d-433e-8921-5d42e53f5eb8" CreationDate="2010-08-07T18:50:39.787" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;" />
  <row Id="4541" PostHistoryTypeId="6" PostId="1967" RevisionGUID="3e49a1ee-ee4d-4711-a4ee-d85be83aa007" CreationDate="2010-08-07T19:05:41.910" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="4542" PostHistoryTypeId="5" PostId="1304" RevisionGUID="1c5d38ef-453c-4af6-b4ad-ee79aecd193a" CreationDate="2010-08-07T19:10:06.630" UserId="51" Comment="added 98 characters in body" Text="There's a large wiki-style list of resources for all kinds of aspects of iPhone development here: http://iphonedevdepot.com/tiki-index.php " />
  <row Id="4543" PostHistoryTypeId="2" PostId="2364" RevisionGUID="99ceaf29-3117-4af1-ae88-8556f51ac436" CreationDate="2010-08-07T20:31:38.280" UserId="1310" Text="How do I make a Battleships game for the Iphone?&#xD;&#xA;&#xD;&#xA;I'm new to programming, I've done some tutorials and I feel I'm making progress with this but I would like to make a full game like battleships.&#xD;&#xA;&#xD;&#xA;Can anyone help me out with this?&#xD;&#xA;&#xD;&#xA;I'm trying to learn cocos2d-Iphone so I would like to use that if possible.&#xD;&#xA;David" />
  <row Id="4544" PostHistoryTypeId="1" PostId="2364" RevisionGUID="99ceaf29-3117-4af1-ae88-8556f51ac436" CreationDate="2010-08-07T20:31:38.280" UserId="1310" Text="How to make a BattleShips game?" />
  <row Id="4545" PostHistoryTypeId="3" PostId="2364" RevisionGUID="99ceaf29-3117-4af1-ae88-8556f51ac436" CreationDate="2010-08-07T20:31:38.280" UserId="1310" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="4546" PostHistoryTypeId="5" PostId="2362" RevisionGUID="eeaa51c2-ecc6-484e-a203-9eb4e4ed8a0d" CreationDate="2010-08-07T20:41:37.167" UserId="395" Comment="Grammar and tags" Text="We are a &quot;nano&quot; game dev company working on REFUSION. &#xD;&#xA;DX9 renderer is almost done and question is: Should we move it to DX11 or not?&#xD;&#xA;Anyone have experience with this?&#xD;&#xA;&#xD;&#xA;Here are some videos from dev progress from the very beginning: &#xD;&#xA;&#xD;&#xA;[Dev test videos][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://refusion.samboush.com/gamedev/show.asp?P1=letsdoit" />
  <row Id="4547" PostHistoryTypeId="6" PostId="2362" RevisionGUID="eeaa51c2-ecc6-484e-a203-9eb4e4ed8a0d" CreationDate="2010-08-07T20:41:37.167" UserId="395" Comment="Grammar and tags" Text="&lt;graphics&gt;&lt;3d&gt;&lt;directx&gt;&lt;directx11&gt;" />
  <row Id="4548" PostHistoryTypeId="2" PostId="2365" RevisionGUID="275ce5fb-64e9-44dd-af2a-f81139135bed" CreationDate="2010-08-07T21:51:41.673" UserId="744" Text="Leaderboards, lots of them. Not arcade-style top-10 lists because those get dominated by a handful of people quickly. Fastest time to completion, high score, most damage dealt, whatever, for all-time and the past week. Ideally every player should feel like they could get to the top of at least one if they tried." />
  <row Id="4549" PostHistoryTypeId="16" PostId="2365" RevisionGUID="275ce5fb-64e9-44dd-af2a-f81139135bed" CreationDate="2010-08-07T21:51:41.673" UserId="-1" />
  <row Id="4550" PostHistoryTypeId="2" PostId="2366" RevisionGUID="b7acbe37-6499-4b5a-bc95-a402b1a34582" CreationDate="2010-08-07T22:24:32.777" UserId="395" Text="If you have multiplayer, you should do your best to offer some kind of local multiplayer (co-op is usually easier to do than local versus). This seems to be a dying art, especially among console titles." />
  <row Id="4551" PostHistoryTypeId="16" PostId="2366" RevisionGUID="b7acbe37-6499-4b5a-bc95-a402b1a34582" CreationDate="2010-08-07T22:24:32.777" UserId="-1" />
  <row Id="4552" PostHistoryTypeId="2" PostId="2367" RevisionGUID="d6df88c5-02a2-4e6e-a7f6-8c9d7a64d7ec" CreationDate="2010-08-07T23:08:39.273" UserId="744" Text="No mentions of the foundational maths of computer programming? Graph theory, number theory, set theory, and concrete mathematics, usually all lumped together into painful and poorly-taught class called &quot;discrete mathematics&quot; at university.&#xD;&#xA;&#xD;&#xA;&quot;Stupid bit tricks&quot; save every kind of program time (and they're also usually equivalent to some string tricks and set tricks), graph types and traversals are used all over the place (even if you're just picking STL containers), and algorithmic complexity is key to optimization as languages get to higher levels." />
  <row Id="4553" PostHistoryTypeId="16" PostId="2367" RevisionGUID="d6df88c5-02a2-4e6e-a7f6-8c9d7a64d7ec" CreationDate="2010-08-07T23:08:39.273" UserId="-1" />
  <row Id="4554" PostHistoryTypeId="5" PostId="2030" RevisionGUID="bb3ad3d0-bf4b-4822-bd5e-53dfdc14ac2d" CreationDate="2010-08-07T23:39:37.057" UserId="51" Comment="fancy images!" Text="A very basic one is the Pythagorean theorem.  Also known as the distance formula.&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://mathurl.com/y8ouslw.png&quot; alt=&quot;a^2+b^2=c^2&quot;&gt; where *`a`* and *`b`* are the edges of a right triangle and *`c`* is the hypotenuse.  This means that in order to find the length of a vector, you do this:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://mathurl.com/2dyhukn.png&quot; alt=&quot;distance = sqrt( a^2 + b^2 )&quot;&gt;&#xD;&#xA;&#xD;&#xA;Another note of interest is that if you're just *comparing* distances, you don't have to take the square root (which can be relatively costly).  That's why most frameworks have a &quot;distance squared&quot; or &quot;length squared&quot; function for their vectors." />
  <row Id="4555" PostHistoryTypeId="5" PostId="2029" RevisionGUID="a3647b67-a890-4172-8d2a-1a5c0c1a05ab" CreationDate="2010-08-07T23:40:54.887" UserId="51" Comment="added 93 characters in body" Text="Simple enough question: What math should all game programmers have a firm grasp of in order to be successful?&#xD;&#xA;&#xD;&#xA;I'm not specifically talking about rendering math or anything in the niche areas of game programming, more specifically just things that even game programmers should know about, and if they don't they'll probably find it useful.&#xD;&#xA;&#xD;&#xA;*Note:* as there is *no one correct answer*, this question (and its answers) is a community wiki.&#xD;&#xA;&#xD;&#xA;Also, if you would like fancy latex math equations, feel free to use http://mathurl.com/." />
  <row Id="4556" PostHistoryTypeId="2" PostId="2368" RevisionGUID="4856b2e8-9f2c-4c9e-8eba-cfe91e09434b" CreationDate="2010-08-07T23:59:00.833" UserId="501" Text="DirectX 11 is a much cleaner and much more powerful API than DX9 without any legacy fixed function stuff. It also allows to use DX9 and DX10 class hardware through &quot;Level 9&quot; and &quot;Level 10&quot; with the same interface.&#xD;&#xA;&#xD;&#xA;But for a small indie development I would not take the step yet. You will completely lose the XP install base." />
  <row Id="4557" PostHistoryTypeId="2" PostId="2369" RevisionGUID="0963faca-1568-43de-8cfa-59141c9d498c" CreationDate="2010-08-08T00:03:27.113" UserId="1524" Text="I would like to write a game that could be played on smart phones and was wondering if HTML5 might be a way to write games to work on a wide selection of smart phones." />
  <row Id="4558" PostHistoryTypeId="1" PostId="2369" RevisionGUID="0963faca-1568-43de-8cfa-59141c9d498c" CreationDate="2010-08-08T00:03:27.113" UserId="1524" Text="Will a Game written using HTML5 work on smartphones?" />
  <row Id="4559" PostHistoryTypeId="3" PostId="2369" RevisionGUID="0963faca-1568-43de-8cfa-59141c9d498c" CreationDate="2010-08-08T00:03:27.113" UserId="1524" Text="&lt;html5&gt;" />
  <row Id="4560" PostHistoryTypeId="5" PostId="2368" RevisionGUID="fa6f70e9-1c8d-4d42-bb2a-ae490d2d24c5" CreationDate="2010-08-08T00:04:51.183" UserId="501" Comment="added 151 characters in body" Text="DirectX 11 is a much cleaner and much more powerful API than DX9 without any legacy fixed function stuff. It also allows to use DX9 and DX10 class hardware through &quot;Level 9&quot; and &quot;Level 10&quot; with the same interface. &#xD;&#xA;&#xD;&#xA;Furthermore, you can render the same scene more efficiently than with DX9. This results in higher framerate or better visuals on the same machine.&#xD;&#xA;&#xD;&#xA;But for a small indie development I would not take the step yet. You will completely lose the XP install base." />
  <row Id="4561" PostHistoryTypeId="5" PostId="2308" RevisionGUID="4a329742-b027-4f67-b2b3-0c064b408b78" CreationDate="2010-08-08T00:09:15.153" UserId="189" Comment="deleted 2 characters in body" Text="Just yesterday I found a website with quite a few hilarious game bugs. They can't be called &quot;development&quot; bugs because they were found in real, produced video games. But I think visitors of this question would get a good laugh out of them:&#xD;&#xA;&#xD;&#xA;[You're Ruining my Immersion!][1] (tumblr blog)&#xD;&#xA;&#xD;&#xA;*I am not affiliated with the blog in any way. I follow Nick\_Lalone on Twitter who tweeted a bunch of links to it which I followed to find it.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://noooooomyimmersion.tumblr.com/" />
  <row Id="4562" PostHistoryTypeId="2" PostId="2370" RevisionGUID="8cb5c81b-8da5-4b38-936f-e2563b004bbc" CreationDate="2010-08-08T01:07:08.773" UserId="1004" Text="I saw the [general level design question](http://gamedev.stackexchange.com/questions/758/level-design-tips) but not much of it applies to building good solid levels for RTS games. Where can i find information on rules and mechanics of RTS level design?" />
  <row Id="4563" PostHistoryTypeId="1" PostId="2370" RevisionGUID="8cb5c81b-8da5-4b38-936f-e2563b004bbc" CreationDate="2010-08-08T01:07:08.773" UserId="1004" Text="Properties of good RTS level design?" />
  <row Id="4564" PostHistoryTypeId="3" PostId="2370" RevisionGUID="8cb5c81b-8da5-4b38-936f-e2563b004bbc" CreationDate="2010-08-08T01:07:08.773" UserId="1004" Text="&lt;rts&gt;&lt;level-design&gt;" />
  <row Id="4565" PostHistoryTypeId="2" PostId="2371" RevisionGUID="ec67a8b1-039c-4cab-8e2e-e8638fa0868e" CreationDate="2010-08-08T01:12:02.583" UserId="1183" Text="Can I make an entire game in Unity 3D for the iphone without using any Objective - C or Cocoa?" />
  <row Id="4566" PostHistoryTypeId="1" PostId="2371" RevisionGUID="ec67a8b1-039c-4cab-8e2e-e8638fa0868e" CreationDate="2010-08-08T01:12:02.583" UserId="1183" Text="Can I make an entire game in Unity 3D for the iphone?" />
  <row Id="4567" PostHistoryTypeId="3" PostId="2371" RevisionGUID="ec67a8b1-039c-4cab-8e2e-e8638fa0868e" CreationDate="2010-08-08T01:12:02.583" UserId="1183" Text="&lt;iphone&gt;" />
  <row Id="4568" PostHistoryTypeId="2" PostId="2372" RevisionGUID="01a762e5-c5d6-43d1-8c54-79afe4f0298f" CreationDate="2010-08-08T01:21:08.933" UserId="154" Text="HTML5 is a long way from being ubiquitously supported even in web browsers on PC much less phones.&#xD;&#xA;&#xD;&#xA;These numbers are based on the [html5test][1]&#xD;&#xA;&#xD;&#xA; - IE8 on PC = 27/300&#xD;&#xA; - Chrome 5.0.375.125 on PC = 197/300&#xD;&#xA; - Safari 4.0.4 on PC = 207/300&#xD;&#xA; - Safari on iPhone4 = 185/300&#xD;&#xA;&#xD;&#xA;None of those numbers inspire confidence&#xD;&#xA;&#xD;&#xA;  [1]: http://www.html5test.com/" />
  <row Id="4569" PostHistoryTypeId="2" PostId="2373" RevisionGUID="7491e843-369f-4717-bb39-6d3ce2f6a9d4" CreationDate="2010-08-08T01:22:10.693" UserId="51" Text="Yes, but you're limiting your options.  If you want to include things like OpenFeint or  analytics you're going to have to go through the native code plugin bridge.  &#xD;&#xA;&#xD;&#xA;There are also some new things in iOS4 that aren't handled properly by Unity iPhone by default, like the resolution of the iPhone 4, or the application callbacks by task switching." />
  <row Id="4570" PostHistoryTypeId="6" PostId="2371" RevisionGUID="fdd68e24-7801-4e7c-8e60-fcac7cc18249" CreationDate="2010-08-08T01:23:48.163" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;unity&gt;" />
  <row Id="4571" PostHistoryTypeId="2" PostId="2374" RevisionGUID="2e59a021-71bd-47be-a60c-a4f44028c037" CreationDate="2010-08-08T02:02:50.597" UserId="51" Text="[Hypothetically] I'm at a smaller company and looking for a place to get the word out about our available openings.  Alternately, I'm looking for a place to browse through resumes of people looking for jobs.  What are some services I can use to find the people I need?&#xD;&#xA;&#xD;&#xA;**Answer Format**&#xD;&#xA;&#xD;&#xA;* One URL per answer&#xD;&#xA;* Costs (if applicable)&#xD;&#xA;* Specializations (if any)&#xD;&#xA;* Experiences using the service&#xD;&#xA;" />
  <row Id="4572" PostHistoryTypeId="1" PostId="2374" RevisionGUID="2e59a021-71bd-47be-a60c-a4f44028c037" CreationDate="2010-08-08T02:02:50.597" UserId="51" Text="Where can I post job listings or browse through resumes?" />
  <row Id="4573" PostHistoryTypeId="3" PostId="2374" RevisionGUID="2e59a021-71bd-47be-a60c-a4f44028c037" CreationDate="2010-08-08T02:02:50.597" UserId="51" Text="&lt;hiring&gt;&lt;jobs&gt;&lt;human-resources&gt;" />
  <row Id="4574" PostHistoryTypeId="16" PostId="2374" RevisionGUID="2e59a021-71bd-47be-a60c-a4f44028c037" CreationDate="2010-08-08T02:02:50.597" UserId="51" />
  <row Id="4575" PostHistoryTypeId="2" PostId="2375" RevisionGUID="8143438f-140b-4f6a-8bee-cef0052c9dc6" CreationDate="2010-08-08T02:12:06.430" UserId="189" Text="I just ran the [HTML5 test][1]:&#xD;&#xA;&#xD;&#xA; - My iPod Touch 2nd generation with iOS **3.1.3** scores 125 and 7 bonux points out of 300 in Safari. Of particular note to game development:&#xD;&#xA;  - Full points in Canvas! Great for game rendering.&#xD;&#xA;  - Supports the video element with MPEG-4 and H.264 formats&#xD;&#xA;  - Supports the audio element with PCM, MP3 and AAC formats (great for bgm and sounds!)&#xD;&#xA;  - Session and local storages are supported, as is Web SQL Database! (game save files?)&#xD;&#xA;  - Application Cache is supported; I assume this feature would let you cache game data files (images and such) for faster loading. Sounds great to me!&#xD;&#xA;  - No WebGL support.&#xD;&#xA;  - No WebSocket either; multiplayer games will need to use something else like AJAX polling.&#xD;&#xA; - My Droid Incredible with Android OS 2.1 (+ Sense UI) scores 151 and no bonus points out of 300 on its built-in browser. Again, of particular note:&#xD;&#xA;  - Full Canvas support&#xD;&#xA;  - video element supported but all four codecs had X's on them. I wonder what formats it can play?&#xD;&#xA;  - audio element, same thing as video - supported but formats all have X's.&#xD;&#xA;  - Session and local storage and Web SQL Database all supported&#xD;&#xA;  - Application Cache is supported&#xD;&#xA;  - No WebGL or WebSocket&#xD;&#xA;  - Web workers are supported, which were not supported on my iPod; these could be a good thing in game development for things that act in parallel -- perhaps AI?&#xD;&#xA;&#xD;&#xA;So as you can see, the iPod/iPhone and Android are very much neck-and-neck and seem to support a decent range of HTML5 features. Canvas is great for 2D browser graphics and the audio element would probably be great for playing background sounds and music, and it's also really cool to see that both platforms support storage (though you could always just use cookies of course, depending on the size of a game save). So overall I'd say you should go for it. The numbers aren't everything; as wkerslake said &quot;none of these numbers inspire confidence&quot; but if you look through what is supported, it seems to be everything you need!&#xD;&#xA;&#xD;&#xA;I say go for it! I wish you the best of luck.&#xD;&#xA;&#xD;&#xA;By the way, you might want to watch for [Vanthia][2]. It's a browser game which utilizes canvas for efficient drawing. I got to play the closed beta and it was sure coming along! The developer has said very little for over half a year now, except that he is definitely developing it but just keeping things somewhat secret.&#xD;&#xA;&#xD;&#xA;You could also get some ideas from Google's recent [Pacman][3] interactive logo. It wasn't very HTML5 but it sure was functional! It shows that you don't actually need HTML5 to make a browser game (and I think HTML5 is being thrown around as a buzzword far too much, just as AJAX was or still is). There is [a github project][4] with a deobfuscated, cleaned up version of the source that you can look through and play with.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.html5test.com/&#xD;&#xA;  [2]: http://www.vanthia.com/&#xD;&#xA;  [3]: http://www.google.com/pacman&#xD;&#xA;  [4]: http://github.com/macek/google_pacman" />
  <row Id="4577" PostHistoryTypeId="2" PostId="2377" RevisionGUID="3fd083ed-a01c-4d36-96cc-7667837d606d" CreationDate="2010-08-08T02:48:49.093" UserId="1463" Text="ActionScript does have a socket class.  It is XMLSocket.  If you can support ActionScript 3.0, it has a better Socket class." />
  <row Id="4578" PostHistoryTypeId="2" PostId="2378" RevisionGUID="8d6a1f8e-4041-41c1-bd2a-a1efb0c1a960" CreationDate="2010-08-08T02:52:13.907" UserId="189" Text="[StackOverflow Careers][1]&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;[FAQ here][2].&#xD;&#xA;&#xD;&#xA;**Costs:**&#xD;&#xA;&#xD;&#xA; - 1 year filing: $19 or free for students&#xD;&#xA; - 30 day job listing: $350&#xD;&#xA; - Hiring manager: test drive free, to view candidates and make contact subscriptions are $500 for one week, $1000 for one month, $3000 for 6 months, $5000 for one year&#xD;&#xA; - 90 day money back guarantee if you are dissatisfied&#xD;&#xA;&#xD;&#xA;**Specializations:** &quot;professional software developers looking for great places to work&quot; (developers who browse Stack Overflow)&#xD;&#xA;&#xD;&#xA;I have no experiences using it, sorry.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://careers.stackoverflow.com/&#xD;&#xA;  [2]: http://careers.stackoverflow.com/faq" />
  <row Id="4579" PostHistoryTypeId="16" PostId="2378" RevisionGUID="8d6a1f8e-4041-41c1-bd2a-a1efb0c1a960" CreationDate="2010-08-08T02:52:13.907" UserId="-1" />
  <row Id="4580" PostHistoryTypeId="2" PostId="2379" RevisionGUID="1cfa6090-11b3-42b4-8c99-2f24baf5b471" CreationDate="2010-08-08T02:59:04.140" UserId="189" Text="[Microsoft Students 2 Business][1]&#xD;&#xA;----&#xD;&#xA;([global site][1], [USA site][2])&#xD;&#xA;&#xD;&#xA;**Costs:** Free for students. Maybe free for recruiters?&#xD;&#xA;&#xD;&#xA;**Specializations:** students in IT majors (computer science, information technology, etc.)&#xD;&#xA;&#xD;&#xA;My only experience was to promote it to fellow students, as my school's Microsoft Student Partner. I personally found it to have a very limited selection of job openings.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/studentstobusiness/home/default.aspx&#xD;&#xA;  [2]: http://s2b.experience.com/" />
  <row Id="4581" PostHistoryTypeId="16" PostId="2379" RevisionGUID="1cfa6090-11b3-42b4-8c99-2f24baf5b471" CreationDate="2010-08-08T02:59:04.140" UserId="-1" />
  <row Id="4582" PostHistoryTypeId="2" PostId="2380" RevisionGUID="0fa40055-9aa6-492c-b61d-8ea65f75bb62" CreationDate="2010-08-08T03:05:55.593" UserId="1206" Text="[Gamasutra Jobs][1]&#xD;&#xA;&#xD;&#xA;This is the canonical place to go if you want to hire a game developer, or become one.&#xD;&#xA;&#xD;&#xA;**Cost:**&#xD;&#xA;&#xD;&#xA;(Feel free to edit this - haven't used it)&#xD;&#xA;&#xD;&#xA;**Specialization:**&#xD;&#xA;&#xD;&#xA;Game development.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/jobs/ &quot;Gamasutra Jobs&quot;" />
  <row Id="4583" PostHistoryTypeId="16" PostId="2380" RevisionGUID="0fa40055-9aa6-492c-b61d-8ea65f75bb62" CreationDate="2010-08-08T03:05:55.593" UserId="-1" />
  <row Id="4584" PostHistoryTypeId="5" PostId="2380" RevisionGUID="cd91a41c-019d-4c61-83f9-a2123197515a" CreationDate="2010-08-08T03:14:43.313" UserId="189" Comment="added 128 characters in body" Text="[Gamasutra Jobs][1]&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;This is the canonical place to go if you want to hire a game developer, or become one.&#xD;&#xA;&#xD;&#xA;**Cost:** Recruitment pricing on [this page][2]. It appears job postings are free.&#xD;&#xA;&#xD;&#xA;**Specialization:**&#xD;&#xA;&#xD;&#xA;Game development. &quot;The game industry leader in career resources&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/jobs/ &quot;Gamasutra Jobs&quot;&#xD;&#xA;  [2]: http://www.gamasutra.com/recruitment/" />
  <row Id="4585" PostHistoryTypeId="2" PostId="2381" RevisionGUID="426f88a7-bbaf-457e-8315-8d09f3014278" CreationDate="2010-08-08T04:48:03.957" UserId="1021" Text="I'm working on a relatively simple 2D side-scrolling iPhone game.  The controls are tilt-based.  I use OpenGL ES 1.1 for the graphics.  The game state is updated at a rate of 30 Hz... And the drawing is updated at a rate of 30 fps (via NSTimer).  The smoothness of the drawing is ok... But not quite as smooth as a game like iFighter.  What can I do to improve the smoothness of the game?&#xD;&#xA;&#xD;&#xA;Here are the potential issues I've briefly considered:&#xD;&#xA;&#xD;&#xA;- I'm varying the opacity of up to 15 &quot;small&quot; (20x20 pixels) textures at a time... Apparently varying the opacity  in this manner can degrade drawing performance&#xD;&#xA;&#xD;&#xA;- I'm rendering at only 30 fps (via NSTimer)... Perhaps 2D games like iFighter are rendered at a higher frame rate?&#xD;&#xA;&#xD;&#xA;- Perhaps the game state could be updated at a faster rate?  Note the acceleration vales are updated at 100 Hz... So I could potentially update part of the game state at 100 hz&#xD;&#xA;&#xD;&#xA;- All of my textures are PNG24... Perhaps PNG8 would help (due to smaller size etc)" />
  <row Id="4586" PostHistoryTypeId="1" PostId="2381" RevisionGUID="426f88a7-bbaf-457e-8315-8d09f3014278" CreationDate="2010-08-08T04:48:03.957" UserId="1021" Text="How can I improve the &quot;smoothness&quot; of a 2D side-scrolling iPhone game?" />
  <row Id="4587" PostHistoryTypeId="3" PostId="2381" RevisionGUID="426f88a7-bbaf-457e-8315-8d09f3014278" CreationDate="2010-08-08T04:48:03.957" UserId="1021" Text="&lt;graphics&gt;&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="4588" PostHistoryTypeId="5" PostId="2380" RevisionGUID="4d16b95a-04d9-449a-a400-31477ce48fd8" CreationDate="2010-08-08T06:19:34.397" UserId="1206" Comment="added 3 characters in body" Text="[Gamasutra Jobs][1]&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;This is the canonical place to go if you want to hire a game developer, or become one.&#xD;&#xA;&#xD;&#xA;**Cost:**&#xD;&#xA;&#xD;&#xA;Recruitment pricing on [this page][2]. It appears job postings are free.&#xD;&#xA;&#xD;&#xA;**Specialization:**&#xD;&#xA;&#xD;&#xA;Game development. &quot;The game industry leader in career resources&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/jobs/ &quot;Gamasutra Jobs&quot;&#xD;&#xA;  [2]: http://www.gamasutra.com/recruitment/" />
  <row Id="4589" PostHistoryTypeId="2" PostId="2382" RevisionGUID="2f42f31d-20a4-4a0a-a175-08ec17b10c0f" CreationDate="2010-08-08T06:37:02.727" UserId="1135" Text="Now, for the record, I'm currently not implementing any racing game whatsoever, but this problem just popped into my mind and now I'm curious.&#xD;&#xA;&#xD;&#xA;So how would one go about finding out which participant of a race is currently the first one? It can't be something trivial like just sorting by distance to the finish line because that would be highly inaccurate on most courses. I've thought about doing something like separating the route into straight segments, each of which has a direction vector. The game would then check for when someone outruns somebody else by projecting their positions onto that vector and checking which one is ahead. If the position has changed, the game would increment/decrement them appropriately. But that does seem a little too complicated.&#xD;&#xA;&#xD;&#xA;Does anybody know of any established methods or has any experience in implementing some?" />
  <row Id="4590" PostHistoryTypeId="1" PostId="2382" RevisionGUID="2f42f31d-20a4-4a0a-a175-08ec17b10c0f" CreationDate="2010-08-08T06:37:02.727" UserId="1135" Text="How would one determine the position of a participant in a racing game?" />
  <row Id="4591" PostHistoryTypeId="3" PostId="2382" RevisionGUID="2f42f31d-20a4-4a0a-a175-08ec17b10c0f" CreationDate="2010-08-08T06:37:02.727" UserId="1135" Text="&lt;algorithm&gt;&lt;best-practices&gt;" />
  <row Id="4592" PostHistoryTypeId="2" PostId="2383" RevisionGUID="61c51a8e-1d45-4bff-9e55-f92918b73ee5" CreationDate="2010-08-08T06:57:01.877" UserId="865" Text="I guess I would use the fact that the road is generally built up by using splines, therefore every edge of the road has a corresponding spline position, and using that you could determine (approximately, or fine grained if you subdivide further) what the current spline position of each car is, and thus who is in the lead. So more or less the way you suggest, just using the spline." />
  <row Id="4593" PostHistoryTypeId="2" PostId="2384" RevisionGUID="a2490e39-189e-4ba1-8f48-94556b37cc6b" CreationDate="2010-08-08T06:57:44.730" UserId="1091" Text="You've more or less answered your own question, I think. Divide the track up into segments, track which segment each car is in, and project the cars onto a line through the middle of the appropriate segment (mathematically it's a simple dot-product, so not complicated at all). Very simple to give each car a &quot;distance&quot; which you can sort for position.&#xD;&#xA;&#xD;&#xA;The segments give you some additional benefit - you can ensure that cars don't cut-corners (or general take short-cuts), go backwards, or other cheats.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4594" PostHistoryTypeId="2" PostId="2385" RevisionGUID="df3b463f-33a1-4128-aafd-46d1ddafe6cc" CreationDate="2010-08-08T07:02:23.640" UserId="865" Text="I hate to be nitpicky but....wouldn't trying your suggestions answer them? Like PNG8 vs 24....give it a shot? Convert them after loading and see if things improve?&lt;br&gt;&#xD;&#xA;30fps should be smooth enough for a game, but my experience has shown that you have to be very careful (at least on my 2G testphone) to actually maintain 30fps....I'd get a spike every half a second or so throwing me one frame off, so it is crucial that your code is framerate independent. Have you verified that you don't have those spikes?&#xD;&#xA;" />
  <row Id="4595" PostHistoryTypeId="2" PostId="2386" RevisionGUID="d5f9afeb-eb4c-4e84-88da-8974f4b39e83" CreationDate="2010-08-08T09:17:26.483" UserId="20" Text="Since you already started learning, why not go ahead and try to implement something? Maybe start with a simpler game-concept (like [Tic-Tac-Toe][1]) to get a grip of all the things involved (code, graphics, sound, etc.). Then post more specific questions here as you move along. Since your question is a bit &quot;broad&quot; to say the least.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tic-tac-toe" />
  <row Id="4596" PostHistoryTypeId="2" PostId="2387" RevisionGUID="4189f79d-5a65-4d78-b8d7-b40cfa55180c" CreationDate="2010-08-08T10:27:01.077" UserId="1101" Text="&gt; Is there any good way we can all stop building things like log viewers, network diagnostics, and patching systems?&#xD;&#xA;&#xD;&#xA;In my experience, these things are treated as simple extras that can be bolted on alongside your 'real' programming. Of course, they turn out to be far from simple and far from 'extra', being complex and important parts of the system, but by then there's already too much investment in the bespoke version.&#xD;&#xA;&#xD;&#xA;Are there good open-source or commercial libraries that provide this type of functionality? I am not sure there are, and until someone steps up and provides one, it'll stay this way. The business developers often aren't able to produce libraries that are suitable for games (&quot;*what, you mean you can't completely remove all the calls in a Release build?!*&quot;) and game developers are often uninterested in making this sort of thing as a standalone package when they have a game to be getting on with." />
  <row Id="4597" PostHistoryTypeId="16" PostId="2387" RevisionGUID="4189f79d-5a65-4d78-b8d7-b40cfa55180c" CreationDate="2010-08-08T10:27:01.077" UserId="-1" />
  <row Id="4598" PostHistoryTypeId="2" PostId="2388" RevisionGUID="eeaffc3e-1731-4a54-98c2-e54795b86733" CreationDate="2010-08-08T11:11:46.853" UserId="659" Text="30fps is probably your problem?&#xD;&#xA;&#xD;&#xA;Some/many people will try to tell you that 30fps is just fine is just fine. But really, it's not. While 30fps is certainly 'playable', it's never going to be 'smooth', especially for a fast-moving 2D scroller, and especially to any games enthusiast that's had a taste of 60fps&#xD;&#xA; &#xD;&#xA;2D games on 16bit consoles and arcade machines ran at 50/60Hz for a very good reason - it looks far, far smoother that 25/30, *especially* for 2D scrolling game. Back then, 60fps was almost the definition of 'arcade quality'.  These days, many developers are prepared to sacrifice that smoothness for better image quality (better screenshots) or shorter development time (less time-consuming optimization work)&#xD;&#xA;&#xD;&#xA;Unfortunately, I can't help with the iPhone specifics. I get the impression that 60fps on iPhone/Android isn't easy to acheive - although a few do manage it (The iPhone port of Pinball Dreams being one example)" />
  <row Id="4599" PostHistoryTypeId="2" PostId="2389" RevisionGUID="8ce5a257-c7d8-4234-9c47-ba6058f0d6bc" CreationDate="2010-08-08T11:14:04.647" UserId="744" Text="One other thing to note is that if you have a (relatively) static data set, don't store it in a database! There's no really good reason to store your spell definitions, item definitions, maps, etc. in a database. You're rarely querying them except by name. I see a lot of people jump into game development storing these things right alongside persisted player data, and it's a totally different class of things.&#xD;&#xA;&#xD;&#xA;You need a data store, like a filesystem, for these. Outside of development, you don't need ACID, you don't need CRUD, you don't need a database for that kind of data. Inside of development, you need a database, but you also need a VCS anyway, and your choice of VCS will make that choice of database for you.&#xD;&#xA;&#xD;&#xA;(If you're working on a game where players can create custom spells or items or quests, well, then that data is the same sort as player data, and you do need a database again.)" />
  <row Id="4600" PostHistoryTypeId="2" PostId="2390" RevisionGUID="698932ed-e4d9-4a58-b809-e1a70ce2533b" CreationDate="2010-08-08T11:15:11.493" UserId="659" Text="Another thing to watch out for with 2D scrolling games:&#xD;&#xA;&#xD;&#xA;Are you scrolling a nice constant number of pixels per frame?&#xD;&#xA;&#xD;&#xA;If you're scrolling 2 pixels one frame, then 3 the next, then 2, for example, that will add a bit of judder. If you're working with a 3D API, and scrolling some arbitrary speed, like 2.73 pixels per frame, that may add sub-pixel 'wobble'&#xD;&#xA;&#xD;&#xA;If you are able to target a fixed framerate, try to ensure that the character's walk/run speeds are a whole number of pixels-per-frame.&#xD;&#xA;" />
  <row Id="4601" PostHistoryTypeId="2" PostId="2391" RevisionGUID="93cbe3db-7d01-46df-979f-3c1ae4658304" CreationDate="2010-08-08T11:21:50.263" UserId="7" Text="Say I'm a programmer who has done his own sprites or 3d models which would fall into programmer-ish kind of art. What steps can I take in order to improve or replace my own art?" />
  <row Id="4602" PostHistoryTypeId="1" PostId="2391" RevisionGUID="93cbe3db-7d01-46df-979f-3c1ae4658304" CreationDate="2010-08-08T11:21:50.263" UserId="7" Text="How to improve or replace my programmer art" />
  <row Id="4603" PostHistoryTypeId="3" PostId="2391" RevisionGUID="93cbe3db-7d01-46df-979f-3c1ae4658304" CreationDate="2010-08-08T11:21:50.263" UserId="7" Text="&lt;graphics&gt;&lt;art&gt;" />
  <row Id="4604" PostHistoryTypeId="2" PostId="2392" RevisionGUID="a4611c93-2fba-407c-81d0-1a7b1a88fe4a" CreationDate="2010-08-08T11:28:09.800" UserId="450" Text="If you want to track online time, there are two pitfalls:&#xD;&#xA;&#xD;&#xA; - Some people might play with multiple accounts at the same time but you most likely only want to track them ones.&#xD;&#xA; - It is important to tell bots and real users apart. Linden Lab used a nice trick for that: They split the users into four groups based on the amount of online time per week. And then count the number of players per group. The groups could be: &#xD;&#xA;  - 0 hours to 7 hours&#xD;&#xA;  - 7 hours to 14 hours (two hours per day)&#xD;&#xA;  - 14 hours to 35 hours (five hours per day)&#xD;&#xA;  - more 35 hours &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There is another measurement that I consider really important: How may minutes stay new players online? In the early days of Stendhal only 20% of players stayed online more than 5 minutes. We put a lot of work into the first few seconds of the new player experience and got it up to 50%. (Which I consider really good for a game people have not payed for)." />
  <row Id="4605" PostHistoryTypeId="2" PostId="2393" RevisionGUID="198263df-f5cb-4379-bca9-9056ced477ca" CreationDate="2010-08-08T11:31:38.840" UserId="826" Text="I think the real bottom line is this: Do you care that clients could easily hack the game experience? &#xD;&#xA;&#xD;&#xA;If the answer is yes, develop on an authoritative server model. I'm a fan of ElectroServer." />
  <row Id="4606" PostHistoryTypeId="2" PostId="2394" RevisionGUID="7b50f93f-ffd6-43c0-bb2c-53a484e34fb1" CreationDate="2010-08-08T11:33:22.267" UserId="1463" Text="I really like cocos2d.  I went from not knowing how to turn on a MacBook to having a multiplayer trivia game working in 5 weeks.  Everything is there for a 2d game." />
  <row Id="4607" PostHistoryTypeId="16" PostId="2394" RevisionGUID="7b50f93f-ffd6-43c0-bb2c-53a484e34fb1" CreationDate="2010-08-08T11:33:22.267" UserId="-1" />
  <row Id="4608" PostHistoryTypeId="2" PostId="2395" RevisionGUID="df87c428-1107-429f-ae0d-444829503d7a" CreationDate="2010-08-08T12:41:52.523" UserId="1479" Text="I would recommend you to search a skinner and/or 2D Artist who is skilled and can create that kind of art. [This][1] is a good forum i remember, where like just skilled artists are grouped :)&#xD;&#xA;You could search at Deviantart too, but there it's imo more complicated.&#xD;&#xA;&#xD;&#xA;Or you try learning it in a professional way, but that is exhausting...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.conceptart.org/forums/" />
  <row Id="4609" PostHistoryTypeId="2" PostId="2396" RevisionGUID="7f063154-2c52-4e35-a873-9bc1f6340c60" CreationDate="2010-08-08T12:44:10.880" UserId="1539" Text="Total newbie question , but what language was used by blizzard to crate the Starcraft II game play? I've been playing it for the last couple of days , and I'm constantly astonished by the complexity and the performance of the game. Is it an in-house language , or do they use some flavor of a know language? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="4610" PostHistoryTypeId="1" PostId="2396" RevisionGUID="7f063154-2c52-4e35-a873-9bc1f6340c60" CreationDate="2010-08-08T12:44:10.880" UserId="1539" Text="What language was used to write Starcraft II ?" />
  <row Id="4611" PostHistoryTypeId="3" PostId="2396" RevisionGUID="7f063154-2c52-4e35-a873-9bc1f6340c60" CreationDate="2010-08-08T12:44:10.880" UserId="1539" Text="&lt;programming&gt;" />
  <row Id="4612" PostHistoryTypeId="2" PostId="2397" RevisionGUID="de98cefa-ecbb-4eb1-98bd-b04d81b9cff5" CreationDate="2010-08-08T13:00:47.970" UserId="1312" Text="1) If you want to improve try putting up your work on specialized sites like http://www.polycount.com/forum/&#xD;&#xA;&#xD;&#xA;2) If you don't have time or *insert reason here* go to recruiting sites, here are a few to get you started:&#xD;&#xA;&#xD;&#xA;http://forum.unity3d.com/viewforum.php?f=11&#xD;&#xA;&#xD;&#xA;http://www.polycount.com/forum/forumdisplay.php?f=44&#xD;&#xA;&#xD;&#xA;http://www.moddb.com/forum/board/recruiting-resumes&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4613" PostHistoryTypeId="2" PostId="2398" RevisionGUID="7a41e19f-6cb1-4a77-b1d8-861814b021f5" CreationDate="2010-08-08T13:09:00.867" UserId="1272" Text="I assume you meant *scripting* language? (since programming language-wise, I'd be very surprised if they didn't use C++...)&#xD;&#xA;&#xD;&#xA;A quick Google-ing turned [this][1] up:&#xD;&#xA;&#xD;&#xA;&gt; &quot;StarCraft II uses an entirely new&#xD;&#xA;&gt; scripting language, which we’ve called&#xD;&#xA;&gt; Galaxy. This language is very similar&#xD;&#xA;&gt; to C, and anyone familiar with&#xD;&#xA;&gt; programming in C will have no trouble&#xD;&#xA;&gt; picking it up. &quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.curse.com/articles/sc2-en-news/498302.aspx" />
  <row Id="4614" PostHistoryTypeId="2" PostId="2399" RevisionGUID="c4e03439-fa77-4fea-9c15-4f078a00bf47" CreationDate="2010-08-08T13:11:13.780" UserId="1254" Text="http://opengameart.org/ its a nice resource too." />
  <row Id="4615" PostHistoryTypeId="2" PostId="2400" RevisionGUID="da325047-e3e2-4c26-a0a0-82ce9c06769d" CreationDate="2010-08-08T13:35:59.353" UserId="1540" Text="I'm looking for a source of 3D models (cars, game characters, furnitures etc.) which are usable in an open-source 3D game.&#xD;&#xA;&#xD;&#xA;I found various website with free/opensource `.blend` files. However it is not easy to convert them en mass to jMonkeyEngine compatible format. You must open each one in blender, unpack the texture, and then use a python blender plugin to convert them into Ogre3DXML. It is not very convenient.&#xD;&#xA;&#xD;&#xA;I want to try out many models, and find out which suits me the best. Converting each one of them by hand is not very scalable.&#xD;&#xA;&#xD;&#xA;How do you get models for your 3D games?&#xD;&#xA;&#xD;&#xA;Is there a standalone `.blend` =&gt; `usable format in jMonkeyEngine/OGRE3D` converted?" />
  <row Id="4616" PostHistoryTypeId="1" PostId="2400" RevisionGUID="da325047-e3e2-4c26-a0a0-82ce9c06769d" CreationDate="2010-08-08T13:35:59.353" UserId="1540" Text="Open-source 3D models easily usable in OGRE3D/jMonkeyEngine" />
  <row Id="4617" PostHistoryTypeId="3" PostId="2400" RevisionGUID="da325047-e3e2-4c26-a0a0-82ce9c06769d" CreationDate="2010-08-08T13:35:59.353" UserId="1540" Text="&lt;3d&gt;&lt;ogre&gt;" />
  <row Id="4618" PostHistoryTypeId="2" PostId="2401" RevisionGUID="3141dd0c-77ac-42b2-bc76-12610924db83" CreationDate="2010-08-08T13:38:38.330" UserId="20" Text="From the technical point of view it's certainly doable. There are some problems/pitfalls though:&#xD;&#xA;&#xD;&#xA; - There aren't much frameworks out in the open, so you'll have to basically write everything from scratch. From the renderer, to sound-handling, collision-detection. This can be a lot of work, depending on what you're trying to do.&#xD;&#xA; - You'll have to have a really good understanding of JavaScript. Some usual OOP practices won't work when using this Language. It's probably not the best choice for a game with huge amounts of code :)&#xD;&#xA; - Don't forget about performance. Smartphones are far from the performance of a typical Desktop-PC. You'll have to test performance carefully on different devices. It might also depend on the JavaScript-Engine (Browser) that is installed on the device. This isn't a HTML5 only issue of course.&#xD;&#xA; - Try to reduce the bandwidth needed for the game. Mobile-devices tend to have slower connections and sometimes people pay for the bandwidth they use. Try to use caching whenever possible." />
  <row Id="4619" PostHistoryTypeId="2" PostId="2402" RevisionGUID="6dc7d010-c5a0-4027-8034-36f6ec0d0375" CreationDate="2010-08-08T13:58:58.937" UserId="1456" Text="In RTS games level design has to be ruled by RTS directives of concrete game. I don't know if exists public RTS papers level design for existing RTS. May be yes. &#xD;&#xA;Just try some Google.&#xD;&#xA;[Google It][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?hl=en&amp;q=RTS+Game+level+design+white+paper&amp;btnG=Search&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=" />
  <row Id="4620" PostHistoryTypeId="2" PostId="2403" RevisionGUID="79f477f2-87c8-446e-b83f-73cd33aaf44e" CreationDate="2010-08-08T13:59:34.630" UserId="1542" Text="After I have been through more intensive C++ studies, I am thinking of giving it a start in my practices of computer game programming. Therefore, I think 2D knowledge (processing images, animating frames, etc.) would be a good place to start. However, I don't seem to find many articles on 2D (mostly 3D), and if found one, it is mostly stuffs like how to use a 2D game engine. I would really want something much more low-level, or &quot;from scratch&quot; ideas.&#xD;&#xA;&#xD;&#xA;I want articles/books that would answer something like:&#xD;&#xA;&#xD;&#xA;How would I import images into C++? (Let's say, if I want to import jpeg/bmp/etc. file into raw C++ code, what would I do?)&#xD;&#xA;&#xD;&#xA;Basically, I just want to have enough low-level knowledge about computer graphics to be able to create something like 2D game engine from scratch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4621" PostHistoryTypeId="1" PostId="2403" RevisionGUID="79f477f2-87c8-446e-b83f-73cd33aaf44e" CreationDate="2010-08-08T13:59:34.630" UserId="1542" Text="Where can I find articles/books on 2D graphics (how it works etc.)?" />
  <row Id="4622" PostHistoryTypeId="3" PostId="2403" RevisionGUID="79f477f2-87c8-446e-b83f-73cd33aaf44e" CreationDate="2010-08-08T13:59:34.630" UserId="1542" Text="&lt;graphics&gt;&lt;2d&gt;" />
  <row Id="4623" PostHistoryTypeId="5" PostId="2244" RevisionGUID="13ca874c-e8c4-45a8-a854-9d3ee079d28d" CreationDate="2010-08-08T14:26:12.180" UserId="1456" Comment="added 363 characters in body" Text="Makeing games is about to bring &quot;real&quot; life to virtual reality. Better is to know more about real world/universe then less :)..&#xD;&#xA;Math is only tool. And if You are  makeing a plan, You have to put time for studying  in plans too.&#xD;&#xA;&#xD;&#xA;EDITED: I saw some misunderstanding :).. I think that set of math acquirements what You need to rule, depends on concrete things what You want to describe.&#xD;&#xA;Nobody knows everything. And better way how to do it is. Not to learn everything on beginning, but learn little piece , use, learn, use etc. Then You can do it during development, if You have good plan." />
  <row Id="4624" PostHistoryTypeId="2" PostId="2404" RevisionGUID="8c3cec63-98a4-4e2a-a6ee-0e1335e403c4" CreationDate="2010-08-08T15:03:21.060" UserId="1206" Text="There are one major source of open sourced models for Ogre3D available:&#xD;&#xA;&#xD;&#xA;[WorldForge Media Repository][1]&#xD;&#xA;&#xD;&#xA;WorldForge assets are licensed under the GPL, meaning that you need to contribute back any changes, but you're free to use the models in any project, closed source too.&#xD;&#xA;&#xD;&#xA;Then, a repository not directly available in Ogre format, but very useful none the less:&#xD;&#xA;&#xD;&#xA;[Ryzom Asset Repository][2]&#xD;&#xA;&#xD;&#xA;Ryzom assets are licensed under the CC by Sa (Creative Commons) license.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://worldforge.org/media/documents/media_faq/#1 &quot;WorldForge Media Repository&quot;&#xD;&#xA;  [2]: http://media.ryzom.com/ &quot;Ryzom Asset Repository&quot;" />
  <row Id="4625" PostHistoryTypeId="2" PostId="2405" RevisionGUID="419c0c7c-ed49-4f0e-ac2f-9438c7e841b3" CreationDate="2010-08-08T15:12:15.893" UserId="1467" Text="I've also found Ogre models at Turbo Squid: http://www.turbosquid.com/&#xD;&#xA;&#xD;&#xA;You do have to look for them though." />
  <row Id="4626" PostHistoryTypeId="2" PostId="2406" RevisionGUID="2ec76490-ecf4-428e-861b-bb9638755e99" CreationDate="2010-08-08T15:21:26.460" UserId="1440" Text="SDL would be a good place to start. Here is a link to some general articles on beginning 2D game design:&#xD;&#xA;http://lazyfoo.net/articles/index.php&#xD;&#xA;&#xD;&#xA;On that same site they have a pretty complete tutorial set that will show you everything you need to know to program a basic 2D game.&#xD;&#xA;http://www.lazyfoo.net/SDL_tutorials/index.php&#xD;&#xA;&#xD;&#xA;The reason I really like this tutorial is that it really breaks it down for you into readable code. It also introduces how to incorporate OpenGL which is a much more powerful library." />
  <row Id="4627" PostHistoryTypeId="2" PostId="2407" RevisionGUID="7392568e-d8e4-4eed-8776-bb1280f6d1bf" CreationDate="2010-08-08T15:41:22.710" UserId="229" Text="[Shawn Hargreaves describes how MotoGP used a special track-relative position system][1]. Ignoring the vertical y position, the x/z Cartesian coordinates are translated to a track-relative system. This had many benefits for calculations involving the relative positions of participants in a racing game (for example for the AI):&#xD;&#xA;&#xD;&#xA;&gt; A common simplification is to collapse&#xD;&#xA;&gt; 3D into 2D. Even though rendering and&#xD;&#xA;&gt; physics may be truly 3D, decision&#xD;&#xA;&gt; making logic need not treat all three&#xD;&#xA;&gt; axes equally. MotoGP tracks have few&#xD;&#xA;&gt; hills, so our AI was able to ignore&#xD;&#xA;&gt; the y component.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Next, we switched from x/z cartesian&#xD;&#xA;&gt; coordinates to a track-relative&#xD;&#xA;&gt; system. Positions were represented by&#xD;&#xA;&gt; a pair of values:&#xD;&#xA;&gt; &#xD;&#xA;&gt; int distance = how far around the&#xD;&#xA;&gt; track, stored in 16.16 fixed point&#xD;&#xA;&gt; format&#xD;&#xA;&gt; &#xD;&#xA;&gt;  - 0 = starting line &#xD;&#xA;&gt;  - 0x8000 = half way around &#xD;&#xA;&gt;  - 0x10000 = looped back to the start &#xD;&#xA;&gt;  - 0x1C000 = three quarters of the way through the second lap &#xD;&#xA;&gt; &#xD;&#xA;&gt; float cross = how far sideways across&#xD;&#xA;&gt; the track  0 = on the center line&#xD;&#xA;&gt;  &#xD;&#xA;&gt;  - -1 = left edge of racing surface &#xD;&#xA;&gt;  - 1 = right edge of racing surface &#xD;&#xA;&gt; &#xD;&#xA;&gt; To convert between this and the&#xD;&#xA;&gt; cartesian coordinates used by our&#xD;&#xA;&gt; physics and rendering code, we stored&#xD;&#xA;&gt; a list of segments defining the shape&#xD;&#xA;&gt; of the racing surface:&#xD;&#xA;&gt;     struct TrackSegment&#xD;&#xA;&gt;     {&#xD;&#xA;&gt;         Vector CenterPoint;&#xD;&#xA;&gt;         float DistanceToLeftEdge;&#xD;&#xA;&gt;         float DistanceToRightEdge;&#xD;&#xA;&gt;     }&#xD;&#xA;&gt; &#xD;&#xA;&gt; We created several hundred of these&#xD;&#xA;&gt; structures, spaced evenly around the&#xD;&#xA;&gt; track, by tessellating the Bezier&#xD;&#xA;&gt; curves from which the tracks were&#xD;&#xA;&gt; originally created. This gave us&#xD;&#xA;&gt; enough information to write the&#xD;&#xA;&gt; necessary coordinate conversion&#xD;&#xA;&gt; functions.&#xD;&#xA;&gt; &#xD;&#xA;&gt; With track-relative coordinates, many&#xD;&#xA;&gt; useful calculations become trivially&#xD;&#xA;&gt; simple:&#xD;&#xA;&gt;&#xD;&#xA;&gt;     if (abs(cross) &gt; 1)&#xD;&#xA;&gt;         // You are off the track and should steer back toward the center line&#xD;&#xA;&gt; &#xD;&#xA;&gt; &#xD;&#xA;&gt;     if (this.distance &gt; other.distance)&#xD;&#xA;&gt;         // You are ahead of the other player (even though you may be&#xD;&#xA;&gt;         // physically behind in 3D space if you have lapped them)&#xD;&#xA;&gt; &#xD;&#xA;&gt; &#xD;&#xA;&gt;     short difference = (short)(this.distance - other.distance);&#xD;&#xA;&gt; &#xD;&#xA;&gt;     if (abs(difference) &lt; threshold)&#xD;&#xA;&gt;         // These two bikes are physically close together,&#xD;&#xA;&gt;         // so we should run obstacle avoidance checks&#xD;&#xA;&gt; &#xD;&#xA;&gt; Because of the fixed point data&#xD;&#xA;&gt; format, casting the distance counter&#xD;&#xA;&gt; from 32 to 16 bits was an easy way to&#xD;&#xA;&gt; discard the lap number, so we could&#xD;&#xA;&gt; pick and choose which computations&#xD;&#xA;&gt; cared if two bikes were on different&#xD;&#xA;&gt; laps, versus wanting to know if they&#xD;&#xA;&gt; were close in physical space. Thanks&#xD;&#xA;&gt; to the magic of two's compliment,&#xD;&#xA;&gt; treating the difference as signed 16&#xD;&#xA;&gt; bit gives the shortest distance&#xD;&#xA;&gt; regardless of which bike is in front&#xD;&#xA;&gt; (remember that in a modulo arithmetic&#xD;&#xA;&gt; system such as a looping racetrack&#xD;&#xA;&gt; there are two possible distances, as&#xD;&#xA;&gt; you can measure in either direction&#xD;&#xA;&gt; around the track). This works even&#xD;&#xA;&gt; when the two bikes are on opposite&#xD;&#xA;&gt; sides of the starting line, a&#xD;&#xA;&gt; situation which would require error&#xD;&#xA;&gt; prone special case logic in most other&#xD;&#xA;&gt; coordinate systems.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Flattening and straightening out this&#xD;&#xA;&gt; virtual gameplay area made it easy to&#xD;&#xA;&gt; reason about things like &quot;am I on the&#xD;&#xA;&gt; racing line?&quot; or &quot;I'm coming up fast&#xD;&#xA;&gt; behind this other bike: do I have more&#xD;&#xA;&gt; room to pass them on the left or&#xD;&#xA;&gt; right?&quot; which would have been tricky&#xD;&#xA;&gt; to implement in a full 3D world space.&#xD;&#xA;&gt; Once we decided to pass on the left,&#xD;&#xA;&gt; we would convert the resulting&#xD;&#xA;&gt; track-relative coordinate back into&#xD;&#xA;&gt; world space, at which point the&#xD;&#xA;&gt; curvature of the track gets taken into&#xD;&#xA;&gt; account, showing how we should steer&#xD;&#xA;&gt; to accomplish our chosen goal.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2009/12/30/motogp-ai-coordinate-systems.aspx" />
  <row Id="4628" PostHistoryTypeId="6" PostId="2382" RevisionGUID="97db5256-f80e-4c4d-a602-c14facbdb5d7" CreationDate="2010-08-08T15:46:57.313" UserId="229" Comment="edited tags" Text="&lt;algorithm&gt;&lt;best-practices&gt;&lt;racing&gt;&lt;position&gt;" />
  <row Id="4629" PostHistoryTypeId="2" PostId="2408" RevisionGUID="6ab002b8-3531-4527-8dc0-a4e6128c0d7d" CreationDate="2010-08-08T15:48:10.090" UserId="1543" Text="I'd recommend using [CADisplayLink][1] to manage your loop rather than NSTimer. It's synchronized to the screen refresh.&#xD;&#xA;&#xD;&#xA;Are you updating your graphics positions on the screen at a fixed interval or is their movement based on the time elapsed since the last update? Occasionally the iPhone stutters, if you don't take account of it the animation can look jittery.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/iphone/library/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/Reference/Reference.html" />
  <row Id="4630" PostHistoryTypeId="5" PostId="2388" RevisionGUID="46a976af-0aab-49de-8aa8-80a4e781d231" CreationDate="2010-08-08T15:52:16.937" UserId="659" Comment="deleted 13 characters in body; added 1 characters in body" Text="30fps is probably your problem?&#xD;&#xA;&#xD;&#xA;Some/many people will try to tell you that 30fps is just fine. But really, it's not. While 30fps is certainly 'playable', it's never going to be 'smooth', especially for a fast-moving 2D scroller, and especially to any games enthusiast that's had a taste of 60fps&#xD;&#xA; &#xD;&#xA;2D games on 16bit consoles and arcade machines ran at 50/60Hz for a very good reason - it looks far, far smoother that 25/30, *especially* for 2D scrolling games. Back then, 60fps was almost the definition of 'arcade quality'.  These days, many developers are prepared to sacrifice that smoothness for better image quality (better screenshots) or shorter development time (less time-consuming optimization work)&#xD;&#xA;&#xD;&#xA;Unfortunately, I can't help with the iPhone specifics. I get the impression that 60fps on iPhone/Android isn't easy to acheive - although a few do manage it (The iPhone port of Pinball Dreams being one example)" />
  <row Id="4631" PostHistoryTypeId="2" PostId="2409" RevisionGUID="ae2ec42c-92a8-4a89-bdc7-c63e1071834a" CreationDate="2010-08-08T16:43:51.400" UserId="1206" Text="The best way of having your programmer art replaced by real art is to carry on making a great game.&#xD;&#xA;&#xD;&#xA;Pimp your game as often as you can - concentrate of game mechanics first - then I am sure that you'll attract some artist types - maybe even for free (join the team).&#xD;&#xA;&#xD;&#xA;This approach is probably the only one if you're short of cash, and/or want to stay free.&#xD;&#xA;&#xD;&#xA;Programmers art could make sure that you concentrate on the most important aspect of your game: the game itself.&#xD;&#xA;&#xD;&#xA;There are of course places where you can grab models and art under an open license, but I would just carry on making a game if I were you.&#xD;&#xA;&#xD;&#xA;Don't bother spending too much time trying to learn how to be an artist yourself.&#xD;&#xA;&#xD;&#xA;That skill takes years..&#xD;&#xA;" />
  <row Id="4632" PostHistoryTypeId="2" PostId="2410" RevisionGUID="e47e89bf-3e03-439c-97f7-513647e3b862" CreationDate="2010-08-08T16:55:07.237" UserId="865" Text="Don't trust the 60Hz hype - it is partly misinformstion. 30fps is perceived as smooth by the human brain (anything over 18fps is perceived as motion) - movies have been shot at 24 fps for the majority of the past century without people thinking they were not smooth. There is one caveat though - the interpolation has to be correct. If your timestep is not compensated properly the glitvch will break the illuision, even at 60fps - this is something that movies obviously never suffer. The only difference between 30fps and 60fps (given proper interpolation) is streakiness, since the brain will internally also try to blend the frames, and compensation for the fact (less of an issue with LCD) that the frame slowly fades between every redraw out and thus you see a wobble. Regarding the streaking: An eagle's eye registers frames at 2Hz, so when it sees a mouse running on the ground it sees a dot at place a, a dot at place b and the brains interpolate this to a line, which is why it can see the mouse from such height - streaking.&lt;br&gt;&#xD;&#xA;The only thing that 60fps gives is that, if your interpolation is not done right, the glitch is less and thus less disturbing to the perception of smoothness. " />
  <row Id="4633" PostHistoryTypeId="2" PostId="2411" RevisionGUID="bb31e2a1-9320-4411-8999-d76439ee2230" CreationDate="2010-08-08T17:04:08.457" UserId="55" Text="The Map Editor is where 'Galaxy' is coming from (Galaxy Editor). It's a data driven editor which allows you to put together actions from English statements which really opens up an insane amount of possibilities. For example, attaching Thor cannons to a hydralisk is easy cheesy.&#xD;&#xA;&#xD;&#xA;- Create a Hydralisk object and modify attributes on it to give it the abilities you desire&#xD;&#xA;- Trigger - 'Create 1 Hydralisk for player 1 using default facing'&#xD;&#xA;&#xD;&#xA;Take a look at this video tutorial that show off the [trigger editor][1]. [Here][2] are some good tutorials to get you started.&#xD;&#xA;&#xD;&#xA;The game itself was written in C/C++.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=4L3kLEIZins&#xD;&#xA;  [2]: http://www.sc2mapster.com/api-docs/tutorials/" />
  <row Id="4634" PostHistoryTypeId="2" PostId="2412" RevisionGUID="ec60d7da-e48f-41f0-969a-d92f0ba4241a" CreationDate="2010-08-08T18:05:07.100" UserId="193" Text="Balance (usually symmetry) so that you don't get an unfair advantage by a random spawn point&#xD;&#xA;&#xD;&#xA;Allied to this is having a big enough map with enough different start points so that there is an element of FUD at the beginning of the game: 'Where is he?', and the chance to use different strategies such as redeploying bases. It is fine to have a couple of football pitch type maps to learn the game but the whole fog of war/element of surprise is key to RTS games; it rewards reconnaissance and builds suspense.&#xD;&#xA;&#xD;&#xA;Defensible positions. Narrow passes, bridges that you can take and hold&#xD;&#xA;&#xD;&#xA;Some goal in the no man's land that encourages you to come out of your base to seize the initiative such as taking the high ground, capturing buildings, controlling resources, gaining technology.&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;Here is an interview with a professional RTS level designer, excerpted from the book Game Level Design By Edward Byrne:&#xD;&#xA;&#xD;&#xA;http://books.google.co.uk/books?id=iX3oWHNf9hMC&amp;lpg=PP1&amp;pg=PA166#v=onepage&amp;q&amp;f=false" />
  <row Id="4635" PostHistoryTypeId="2" PostId="2413" RevisionGUID="bdb337bf-cba9-4f24-a8ce-857b83375f83" CreationDate="2010-08-08T18:14:19.110" UserId="1547" Text="The actual game itself uses a combination of C, C++ and XML (for metadata).&#xD;&#xA;&#xD;&#xA;The scripting language used called 'Galaxy'. It's a C-based language built into the game engine.&lt;br /&gt;&#xD;&#xA;It's used in the campaign and in custom maps.&#xD;&#xA;" />
  <row Id="4636" PostHistoryTypeId="2" PostId="2414" RevisionGUID="872c55e5-be28-4409-ac7c-f83a0fa177dc" CreationDate="2010-08-08T19:15:24.477" UserId="1156" Text="You could try making more art. The saying 'practice makes perfect' is probably applicable here.  &#xD;&#xA;Or, you could advertise on a site such as [Gamedev's Help Wanted Forum][1] for an artist, saying that you've created such and such a game, with your programmer art, and looking for a improvment to the graphical quality.  &#xD;&#xA;The other way is to get free images, textures, and models from many sites on the internet. However, these aren't necessarily what you want. Option 2 is probably the best way, unless it's more of a learning project (not for release).  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net" />
  <row Id="4637" PostHistoryTypeId="2" PostId="2415" RevisionGUID="f4beb703-48f7-4b53-8339-2cdd83428fae" CreationDate="2010-08-08T19:30:24.987" UserId="1024" Text="Go to forums. Artists need you as much as you need them." />
  <row Id="4638" PostHistoryTypeId="2" PostId="2416" RevisionGUID="75c915b6-0c28-4780-abb4-cdb996106cd5" CreationDate="2010-08-08T20:41:02.430" UserId="469" Text="I am not asking the theory of UI design, or how to do one, I am asking for examples and resources, like... How to draw this fiddly stuff, or how to code another circular thing, or a gallery of game menus, etc...&#xD;&#xA;&#xD;&#xA;I am seeking myself specifically sci-fi stuff, but no problem putting other stuff, references are never enough!" />
  <row Id="4639" PostHistoryTypeId="1" PostId="2416" RevisionGUID="75c915b6-0c28-4780-abb4-cdb996106cd5" CreationDate="2010-08-08T20:41:02.430" UserId="469" Text="UI design examples?" />
  <row Id="4640" PostHistoryTypeId="3" PostId="2416" RevisionGUID="75c915b6-0c28-4780-abb4-cdb996106cd5" CreationDate="2010-08-08T20:41:02.430" UserId="469" Text="&lt;graphics&gt;&lt;gui&gt;&lt;interface&gt;&lt;ui-design&gt;" />
  <row Id="4641" PostHistoryTypeId="2" PostId="2417" RevisionGUID="1eb11ba6-36e7-47ab-a3cc-fd85e8fe96d3" CreationDate="2010-08-08T20:51:49.083" UserId="1163" Text="As I research more about this subject. I realise that you should treat the game as a brand. Here is a very good article-- [Game Matters - Name matters, by Scott Miller][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dukenukem.typepad.com/game_matters/2004/02/the_name_of_the.html" />
  <row Id="4642" PostHistoryTypeId="10" PostId="2364" RevisionGUID="d8f0f537-f798-405e-b789-a8cd089564ce" CreationDate="2010-08-08T21:59:24.607" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4643" PostHistoryTypeId="16" PostId="2416" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-08T22:03:29.253" UserId="51" />
  <row Id="4644" PostHistoryTypeId="16" PostId="2402" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-08T22:05:18.097" UserId="51" />
  <row Id="4645" PostHistoryTypeId="16" PostId="2412" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-08T22:05:18.097" UserId="51" />
  <row Id="4646" PostHistoryTypeId="16" PostId="2370" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-08T22:05:18.097" UserId="51" />
  <row Id="4647" PostHistoryTypeId="6" PostId="758" RevisionGUID="d48c9040-cbd8-4c3b-aa8c-82a81d83e7ec" CreationDate="2010-08-08T23:55:08.513" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;tips&gt;&lt;levels&gt;&lt;maps&gt;&lt;level-design&gt;" />
  <row Id="4648" PostHistoryTypeId="2" PostId="2418" RevisionGUID="3db050a6-773c-4a15-816c-5b6ea3b173ee" CreationDate="2010-08-09T01:40:29.830" UserId="919" Text="Another place you can post job ads is the IGDA boards but they're usually local in nature. On the other hand there are usually freelancers there as well." />
  <row Id="4649" PostHistoryTypeId="16" PostId="2418" RevisionGUID="3db050a6-773c-4a15-816c-5b6ea3b173ee" CreationDate="2010-08-09T01:40:29.830" UserId="-1" />
  <row Id="4650" PostHistoryTypeId="2" PostId="2419" RevisionGUID="989e7680-77ae-4b75-9873-7fca16f22ae7" CreationDate="2010-08-09T01:57:29.930" UserId="1553" Text="What are some good examples of procedural/screen-space pixel shader effects? No code necessary; just looking for inspiration. In particular, I'm looking for effects that are not dependent on geometry or the rest of the scene (i.e. would look cool rendered alone on a quad). Multi-pass is cool, too. Screenshots or videos would be ideal, but ideas work too." />
  <row Id="4651" PostHistoryTypeId="1" PostId="2419" RevisionGUID="989e7680-77ae-4b75-9873-7fca16f22ae7" CreationDate="2010-08-09T01:57:29.930" UserId="1553" Text="Cool examples of procedural pixel shader effects?" />
  <row Id="4652" PostHistoryTypeId="3" PostId="2419" RevisionGUID="989e7680-77ae-4b75-9873-7fca16f22ae7" CreationDate="2010-08-09T01:57:29.930" UserId="1553" Text="&lt;graphics&gt;&lt;textures&gt;&lt;art&gt;&lt;shaders&gt;" />
  <row Id="4653" PostHistoryTypeId="16" PostId="2419" RevisionGUID="7c752c08-b885-43d8-a05d-4d293c017560" CreationDate="2010-08-09T02:05:07.743" UserId="1553" Comment="added 448 characters in body; deleted 20 characters in body" />
  <row Id="4654" PostHistoryTypeId="5" PostId="2419" RevisionGUID="7c752c08-b885-43d8-a05d-4d293c017560" CreationDate="2010-08-09T02:05:07.743" UserId="1553" Comment="added 448 characters in body; deleted 20 characters in body" Text="What are some good examples of procedural/screen-space pixel shader effects? No code necessary; just looking for inspiration. In particular, I'm looking for effects that are not dependent on geometry or the rest of the scene (i.e. would look cool rendered alone on a quad). Multi-pass is cool, too. Screenshots or videos would be ideal, but ideas work too.&#xD;&#xA;&#xD;&#xA;PS - I'm aware of [this question][1]; I'm not asking for a source of actual shader implementations but instead for some inspirational ideas -- and the ones at the [NVIDIA Shader Library][2] mostly require a scene or are image processing effects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1673/is-there-any-shaders-directory&#xD;&#xA;  [2]: http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html" />
  <row Id="4655" PostHistoryTypeId="5" PostId="2419" RevisionGUID="d928a865-137b-43c4-9a4f-0ef609521aa0" CreationDate="2010-08-09T02:12:05.887" UserId="1553" Comment="deleted 3 characters in body" Text="What are some good examples of procedural/screen-space pixel shader effects? No code necessary; just looking for inspiration. In particular, I'm looking for effects that are not dependent on geometry or the rest of the scene (i.e. would look okay rendered alone on a quad). Multi or single-pass. Screenshots or videos would be ideal, but ideas work too.&#xD;&#xA;&#xD;&#xA;PS - I'm aware of [this question][1]; I'm not asking for a source of actual shader implementations but instead for some inspirational ideas -- and the ones at the [NVIDIA Shader Library][2] mostly require a scene or are image processing effects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1673/is-there-any-shaders-directory&#xD;&#xA;  [2]: http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html" />
  <row Id="4656" PostHistoryTypeId="2" PostId="2420" RevisionGUID="93b36412-0be2-431c-b025-e5b4b480a6ca" CreationDate="2010-08-09T02:25:55.137" UserId="140" Text="I spent some time searching for an article that came out several years ago on the psychology of naming your product, but it's been a while and I'm not sure where it was. Probably somewhere on Gamasutra.&#xD;&#xA;Some of the points above were mentioned as well as this:&#xD;&#xA;&#xD;&#xA;Don't use a name that involves colons or a subtitle.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;Ninja Apocalypse = good. (structurally. The title itself is cliche)&#xD;&#xA;&#xD;&#xA;Ninja Apocalypse: Battle for the Five Stars = bad.&#xD;&#xA;&#xD;&#xA;You can get away with it if it's a sequel and the main title is a draw, but in a premiere game you want the main title to be descriptive in a straightforward manner. Short and punchy. People's eyes glaze over on long titles and if the cover art doesn't make the save, you've potentially lost a sale.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4657" PostHistoryTypeId="5" PostId="2353" RevisionGUID="86dc9cd9-e479-4dde-a927-24d023a50848" CreationDate="2010-08-09T02:32:27.023" UserId="865" Comment="added 170 characters in body; added 4 characters in body" Text="GPU Gems 2 has a chapter about atmospheric scattering. It's available online at&lt;br&gt;&#xD;&#xA;http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html&lt;br&gt;&#xD;&#xA;I have no experience with it so can't really answer your question further :o\&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;Edited to add: GPU gems 1,2 and 3 (and the CG programming guide, which ain't bad either) are available in their entirety over at NVidia's site. They're pretty nice." />
  <row Id="4660" PostHistoryTypeId="2" PostId="2422" RevisionGUID="e8bea5e0-0c22-45a4-9a58-66eb74539696" CreationDate="2010-08-09T02:49:38.340" UserId="831" Text="Ok so I have a idea for a neat GPU driven curve renderer, and I realised that the vertex shader can be hardwired to generate points of the curve segment (to be rendered as a line strip) without sending any vertex positions - `gl_Position` could be set completely procedurally.&#xD;&#xA;&#xD;&#xA;That said I'd still need to specify a &quot;t&quot; value per point via vertex attributes.&#xD;&#xA;&#xD;&#xA;Is it possible to specify attributes (ie via `glVertexAttribPointer`) without specifying vertices? Or does the GL need &quot;space&quot; in the buffers for vertices - even if they aren't initialized.&#xD;&#xA;" />
  <row Id="4661" PostHistoryTypeId="1" PostId="2422" RevisionGUID="e8bea5e0-0c22-45a4-9a58-66eb74539696" CreationDate="2010-08-09T02:49:38.340" UserId="831" Text="GLSL shader without a vertex array" />
  <row Id="4662" PostHistoryTypeId="3" PostId="2422" RevisionGUID="e8bea5e0-0c22-45a4-9a58-66eb74539696" CreationDate="2010-08-09T02:49:38.340" UserId="831" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="4663" PostHistoryTypeId="2" PostId="2423" RevisionGUID="6c945dc1-b085-4a49-b995-f9f6f10eb8d4" CreationDate="2010-08-09T02:57:10.567" UserId="189" Text="As far as I can tell, most games have some sort of &quot;game state system&quot; which switches between the different game states; these might be things like &quot;Intro&quot;, &quot;MainMenu&quot;, &quot;CharacterSelect&quot;, &quot;Loading&quot;, and &quot;Game&quot;.&#xD;&#xA;&#xD;&#xA;On the one hand, it totally makes sense to separate these into a state system. After all, they are disparate and would otherwise need to be in a large switch statement, which is obviously messy; and they certainly are well represented by a state system. But at the same time, I look at the &quot;Game&quot; state and wonder if there's something wrong about this state system approach. Because it's like the elephant in the room; it's HUGE and obvious but nobody questions the game state system approach.&#xD;&#xA;&#xD;&#xA;It seems silly to me that &quot;Game&quot; is put on the same level as &quot;Main Menu&quot;. Yet there isn't a way to break up the &quot;Game&quot; state.&#xD;&#xA;&#xD;&#xA;Is a game state system the best way to go? Is there some different, better technique to managing, well, the &quot;game state&quot;? Is it okay to have an intro state which draws a movie and listens for enter, and then a loading state which loops on the resource manager, and then the game state which does practically **everything**? Doesn't this seem sort of unbalanced to you, too? Am I missing something?" />
  <row Id="4664" PostHistoryTypeId="1" PostId="2423" RevisionGUID="6c945dc1-b085-4a49-b995-f9f6f10eb8d4" CreationDate="2010-08-09T02:57:10.567" UserId="189" Text="Alternative to Game State System?" />
  <row Id="4665" PostHistoryTypeId="3" PostId="2423" RevisionGUID="6c945dc1-b085-4a49-b995-f9f6f10eb8d4" CreationDate="2010-08-09T02:57:10.567" UserId="189" Text="&lt;language-agnostic&gt;" />
  <row Id="4666" PostHistoryTypeId="2" PostId="2424" RevisionGUID="9cfec070-63c1-4ab9-8a4d-8028eed1d8c3" CreationDate="2010-08-09T03:04:06.680" UserId="288" Text="Check out &lt;a href=&quot;http://www.facewound.com/&quot;&gt;Facewound&lt;/a&gt;. In particular look at the examples in the &lt;a href=&quot;http://www.facewound.com/tutorials/shader1/&quot;&gt;shader tutorial&lt;/a&gt;." />
  <row Id="4667" PostHistoryTypeId="16" PostId="2424" RevisionGUID="9cfec070-63c1-4ab9-8a4d-8028eed1d8c3" CreationDate="2010-08-09T03:04:06.680" UserId="-1" />
  <row Id="4668" PostHistoryTypeId="2" PostId="2425" RevisionGUID="112386dd-ddc7-4c66-80e6-fc0ed91f691c" CreationDate="2010-08-09T03:13:14.620" UserId="865" Text="I look at it the other way. 'Menu', 'HighScores', &quot;credits&quot; or whathaveyou, could be considered as just another level, and then that state isn't necessarily lighter than your 'game' state (the game state just happens to have more entities in general, and different ones, but in the end it's just another level where the entities happen to show more predicatble behaviour and the 'maps' are generally less intricate).&lt;br&gt; &#xD;&#xA;Making that switch in your thinking definitely pulls you out of the &quot;boring menu&quot; syndrome." />
  <row Id="4669" PostHistoryTypeId="2" PostId="2426" RevisionGUID="2f2a969a-f01a-4028-83e0-97907595d525" CreationDate="2010-08-09T03:18:50.367" UserId="647" Text="I always like to the think of each &quot;state&quot; as a &quot;scene&quot;. So the opening video is a scene, just a static one. The credits are a scene. The menu is a scene. The only difference between them all is the level of interactivity and game logic." />
  <row Id="4670" PostHistoryTypeId="2" PostId="2427" RevisionGUID="78fec04d-d929-460b-913f-b233ed6fa55e" CreationDate="2010-08-09T04:00:09.347" UserId="35" Text="Sure, modern GL doesn't have any such limitations, just pass the correct data to glVertexAttribPointer,  1D vertex attribute is supported.&#xD;&#xA;&#xD;&#xA;Think about it, using glVertexAttribPointer, where do you say to the GL that this data are vertices? Nowhere, it's generic, any implementation should accept any data you pass." />
  <row Id="4671" PostHistoryTypeId="5" PostId="2419" RevisionGUID="b37cd842-cd74-487f-833c-15bfc4b16eac" CreationDate="2010-08-09T04:02:50.237" UserId="1553" Comment="added 878 characters in body; edited tags" Text="What are some good examples of procedural/screen-space pixel shader effects? No code necessary; just looking for inspiration. In particular, I'm looking for effects that are not dependent on geometry or the rest of the scene (would look okay rendered alone on a quad) and are not image processing (don't require a &quot;base image&quot;, though they can incorporate textures). Multi-pass or single-pass is fine. Screenshots or videos would be ideal, but ideas work too.&#xD;&#xA;&#xD;&#xA;Here are a few examples of what I'm looking for (all from the RenderMonkey samples):&#xD;&#xA;![alt text][1]![alt text][2]&#xD;&#xA;![alt text][3]![alt text][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PS - I'm aware of [this question][5]; I'm not asking for a source of actual shader implementations but instead for some inspirational ideas -- and the ones at the [NVIDIA Shader Library][6] mostly require a scene or are image processing effects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://public.blu.livefilestore.com/y1pXcNg_0EPZVzwu1T84a4Yek373x8062rhrNCA7UcftTjCkeiY-5uAuJiBYY29x2E53p5MO-uMA8FmEquvxsPCkA/effect1.jpg?psid=1&#xD;&#xA;  [2]: http://public.blu.livefilestore.com/y1p_5Lx7BdjFyFRBkbcc0WakAT7Q-99fVcFOxmTXBbG4VtoFzC0UfAj51eSnE7ZOD84EYL2Y51HhMS2nWsohhn1mQ/effect2.jpg?psid=1&#xD;&#xA;  [3]: http://public.blu.livefilestore.com/y1p_5Lx7BdjFyE3KhYtHe-Cdg7XuXcJ9Ou-GKzED-kZnzACyB5ypA6NSCfsYfuKa0h3ztoDRwwq9qBddX2OfG0fhg/effect3.jpg?psid=1&#xD;&#xA;  [4]: http://nv3wrg.blu.livefilestore.com/y1p1iHFwf-wytDo8HlTJca8RfckA-iTKgvLiJm0t9iz3S35YgeEnt99NMjKDgotxa3Bv90wAhOYLabzx2Sd3LoEH2Hs76WR1vFM/effect5.jpg?psid=1&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/1673/is-there-any-shaders-directory&#xD;&#xA;  [6]: http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html" />
  <row Id="4672" PostHistoryTypeId="6" PostId="2419" RevisionGUID="b37cd842-cd74-487f-833c-15bfc4b16eac" CreationDate="2010-08-09T04:02:50.237" UserId="1553" Comment="added 878 characters in body; edited tags" Text="&lt;graphics&gt;&lt;textures&gt;&lt;shaders&gt;&lt;art&gt;" />
  <row Id="4673" PostHistoryTypeId="2" PostId="2428" RevisionGUID="98954f9d-b337-4a3a-be42-97f1645e27b7" CreationDate="2010-08-09T04:03:21.110" UserId="1206" Text="I have problems with that too, actually.&#xD;&#xA;&#xD;&#xA;Let's say you have a Game.&#xD;&#xA;&#xD;&#xA;Instead of making 'Game' a state like 'Loading', 'Main Menu', etc. - IMO it's better to let Game ***have*** several states:&#xD;&#xA;&#xD;&#xA;*&quot;Loading&quot;* - *&quot;showing menu&quot;* - *&quot;paused&quot;*, etc.&#xD;&#xA;&#xD;&#xA;The Game is still running, but when it shows the main menu it would be in 'show menu' mode.&#xD;&#xA;&#xD;&#xA;And when Game is not in any particular state, it's just running.&#xD;&#xA;&#xD;&#xA;It makes much more sense, at least to me. :)" />
  <row Id="4674" PostHistoryTypeId="2" PostId="2429" RevisionGUID="3cb9300f-8cb4-444b-9f66-1fd6e2abc91f" CreationDate="2010-08-09T04:32:18.417" UserId="51" Text="Sure the Game state would be huge, but there's no reason that the Game state itself can't contain a state machine to manage its data.  Hierarchical state machines are useful." />
  <row Id="4675" PostHistoryTypeId="5" PostId="2412" RevisionGUID="176d70f2-1064-4187-9c06-1089df73b58f" CreationDate="2010-08-09T05:33:06.033" UserId="193" Comment="deleted 2 characters in body" Text="Balance (usually symmetry) so that you don't get an unfair advantage by a random spawn point&#xD;&#xA;&#xD;&#xA;Allied to this is having a big enough map with enough different start points so that there is an element of FUD at the beginning of the game: 'Where is he?', and the chance to use different strategies such as redeploying bases. It is fine to have a couple of football pitch type maps to learn the game but the whole fog of war/element of surprise is key to RTS games; it rewards reconnaissance and builds suspense.&#xD;&#xA;&#xD;&#xA;Defensible positions. Narrow passes, bridges that you can take and hold&#xD;&#xA;&#xD;&#xA;Some goal in the no man's land that encourages you to come out of your base to seize the initiative such as taking the high ground, capturing buildings, controlling resources, gaining technology.&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;Here is an interview with a professional RTS level designer, excerpted from the book Game Level Design By Edward Byrne:&#xD;&#xA;&#xD;&#xA;http://books.google.com/books?id=iX3oWHNf9hMC&amp;lpg=PP1&amp;pg=PA166#v=onepage&amp;q&amp;f=false" />
  <row Id="4676" PostHistoryTypeId="2" PostId="2430" RevisionGUID="c524b4b5-0423-43c0-8849-f91354e59a3f" CreationDate="2010-08-09T06:58:12.180" UserId="919" Text="IMHO every game should allow for a certain number of play styles. (I.e. Deus Ex and Way of the Samurai for RPG like games and Card games like Yu-gi-OH or Magic the gathering, Scribblenauts as well did this very very well with multiple ways to solve a puzzle the way you want to.)" />
  <row Id="4677" PostHistoryTypeId="16" PostId="2430" RevisionGUID="c524b4b5-0423-43c0-8849-f91354e59a3f" CreationDate="2010-08-09T06:58:12.180" UserId="-1" />
  <row Id="4678" PostHistoryTypeId="2" PostId="2431" RevisionGUID="4fbc8dfd-dd07-407a-ab57-50073dfb6b1b" CreationDate="2010-08-09T07:22:01.030" UserId="1251" Text="i have been programming 2-3 games till now. but i have not used ai in any of them...so can u please suggest good ebooks or net articles or tutorials on game ai...problems featuring shortest path, pathfinding etc...&#xD;&#xA;Thankyou" />
  <row Id="4679" PostHistoryTypeId="1" PostId="2431" RevisionGUID="4fbc8dfd-dd07-407a-ab57-50073dfb6b1b" CreationDate="2010-08-09T07:22:01.030" UserId="1251" Text="from where do i start to learn game ai" />
  <row Id="4680" PostHistoryTypeId="3" PostId="2431" RevisionGUID="4fbc8dfd-dd07-407a-ab57-50073dfb6b1b" CreationDate="2010-08-09T07:22:01.030" UserId="1251" Text="&lt;ai&gt;" />
  <row Id="4681" PostHistoryTypeId="2" PostId="2432" RevisionGUID="696ecd40-7794-497a-89c9-6a5e26e46137" CreationDate="2010-08-09T07:22:43.307" UserId="919" Text="Aside from fluff. Varying degree of adaptive AI might also make it interesting. Achievements and rewards may also add some perceived value.&#xD;&#xA;&#xD;&#xA;Skills like how they are implemented in some mahjong doujin game and puzzle quest might also add some dimension to classic gameplay (just be sure to add the option to turn it off).&#xD;&#xA;&#xD;&#xA;Modes of play can also makes thing interesting. I.e. Scenario modes like play with no queen or knight cause the enemy has captured these pieces in chess.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4682" PostHistoryTypeId="5" PostId="570" RevisionGUID="2e12ecea-e0db-4c2b-86a5-c11b53614308" CreationDate="2010-08-09T07:24:19.400" UserId="294" Comment="1 typo, formatting consistency" Text="I find it curious that your question limits itself to **internal** DSLs, since I'd rather advocate the use of an **external** DSL in order to get the ability to load scripts at runtime and especially to allow non-devs to write game logic in the DSL.&#xD;&#xA;&#xD;&#xA;For instance, my current project is using a (for now) simple external DSL to specify part of the game logic that allows game designers to make balance tests mostly without dev intervention.&#xD;&#xA;&#xD;&#xA;Of course you'll need to write a parser; to that end, I think the most recommended tool is [ANTLR][1] which targets [quite a few languages][2]. On my project though we went the parser combinator route with [jParsec][3] (our backend is Java, there are variants in other languages) which is quite nice for its close relationship with [BNF][4] but perhaps less well documented.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.antlr.org/ &quot;ANTLR&quot;&#xD;&#xA;  [2]: http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets&#xD;&#xA;  [3]: http://jparsec.codehaus.org/ &quot;jParsec&quot;&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form" />
  <row Id="4683" PostHistoryTypeId="2" PostId="2433" RevisionGUID="5d2ad3c2-f507-4500-b5e6-51fd9942523d" CreationDate="2010-08-09T07:47:27.007" UserId="1495" Text="In the light of [DRY][1], it seems desirable to store a collection of related game objects in one container only. &#xD;&#xA;However, one might need sub-collections of these objects in various contexts which quickly appears to demand to reference the specific sub-sets in other, more suitable containers. This increases the effort to track objects across multiple containers, for instance when objects are removed from the game world.&#xD;&#xA;&#xD;&#xA;What are possibilities to simplify such a design and what are the typical trade-offs?&#xD;&#xA;&#xD;&#xA;**To illustrate:**&#xD;&#xA;&#xD;&#xA;In a multiplayer role playing game, the server might hold a collection of game characters in a map suitable for lookup by id.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;&#xD;&#xA;A character may also reside in a certain game level. In order to identify all characters being present in a level it may seem suitable to introduce a container for each level which holds the characters currently present on it. This way you can execute common logic for all characters in that level.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;&#xD;&#xA;        [levels]&#xD;&#xA;            level1&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;            level2&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;Going even further, when a character interacts with the world messages should only be routed to characters in range. This interest management could be achieved by dividing the each level into a grid of cells each of which in turn store the characters currently standing on it.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;        &#xD;&#xA;        [levels]&#xD;&#xA;            level1&#xD;&#xA;               vector&lt;Character*&gt; charactersOnPlayfield&#xD;&#xA;               [cells]&#xD;&#xA;                   cell1&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   cell2&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   ...&#xD;&#xA;            level2&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;               [cells]&#xD;&#xA;                   cell1&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   cell2&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   ...&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;The Character objects at different levels of abstraction introduce the need to think carefully about object ownership and life-time. &#xD;&#xA;&#xD;&#xA;Note that the Character objects stored in the containers would naturally be references, not copies.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" />
  <row Id="4684" PostHistoryTypeId="1" PostId="2433" RevisionGUID="5d2ad3c2-f507-4500-b5e6-51fd9942523d" CreationDate="2010-08-09T07:47:27.007" UserId="1495" Text="Storing game objects in multiple containers" />
  <row Id="4685" PostHistoryTypeId="3" PostId="2433" RevisionGUID="5d2ad3c2-f507-4500-b5e6-51fd9942523d" CreationDate="2010-08-09T07:47:27.007" UserId="1495" Text="&lt;architecture&gt;" />
  <row Id="4686" PostHistoryTypeId="2" PostId="2434" RevisionGUID="926f3079-f511-4221-b6b3-9338436c2a83" CreationDate="2010-08-09T08:10:00.337" UserId="1495" Text="In answering my question from the experience I had so far, I basically see these options: &#xD;&#xA;&#xD;&#xA;Extract your more specific collection of objects from the more general collection  &#xD;&#xA;&#xD;&#xA; - pro: central object repository &#xD;&#xA; - con: computational overhead&#xD;&#xA;&#xD;&#xA;Store your more specific collection in specialized containers as provided in the example for this question&#xD;&#xA;&#xD;&#xA; - pro: quick lookup / pre-sorted data&#xD;&#xA; - con: more involved tracking of objects&#xD;&#xA;&#xD;&#xA;Use caching for certain perspectives on / sub-sets of the game objects&#xD;&#xA;&#xD;&#xA; - pro: middle-ground between 1 and 2&#xD;&#xA; - con: need to devise caching strategy which can complicate matters&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Factors for choosing one of these options include&#xD;&#xA;&#xD;&#xA; - how often is the specific collection of objects required&#xD;&#xA; - what is the cost for tracking the objects across the multiple containers (it might just be relevant in case of object removal)&#xD;&#xA;&#xD;&#xA;The [observer pattern][1] can help to propagate the need to change the other sub-sets of objects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Observer_pattern" />
  <row Id="4687" PostHistoryTypeId="2" PostId="2435" RevisionGUID="2aa3787c-acfe-4f1c-bfde-6f0ddfb4618a" CreationDate="2010-08-09T08:12:07.867" UserId="360" Text="I think you're just arguing semantics here. It's called Game State because it behaves like a [Finite State Machine][1], with a finite number of states and transitions between them. The 'Game' in 'Game State System' refers to the overall system, with 'Loading', 'MainMenu' etc being states of the game. These could easily be called 'scenes' or 'screens' or 'levels'. Its just semantics.&#xD;&#xA;&#xD;&#xA;I'm not sure that a strict FSM applies anymore. In my implementations I call states 'Screens' and allow them to be stackable - ie. screens can be drawn on top of other screens, controlling whether or not screens below them are updated or drawn. In this way, I can have multiple screens active at the same time with self-contained logic and code specific to that screen, without having to worry about any other screen. &#xD;&#xA;&#xD;&#xA;A Pause screen, for example, could be opened on top of my main gameplay screen that disallows updates, but allows drawing below itself. A character inventory screen could allow both drawing and updates - so the game keeps playing while you're working in your inventory.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite-state_machine" />
  <row Id="4688" PostHistoryTypeId="2" PostId="2436" RevisionGUID="0a460544-d978-4892-bc35-9626ea419978" CreationDate="2010-08-09T08:12:24.467" UserId="323" Text="Every Character should, one way or another, know all the containers it's contained in. That can be explicit (an actual list of the containers that reference it), computable (the character coordinates are stored, from which the actual cell vectors can be derived), or unspoken (&quot;characters might also be stored in any of these six lists and I'm not going to bother keeping track of which&quot;). Or any combination of the three. The important part is that it's easy and efficient to find every location that looks at a character.&#xD;&#xA;&#xD;&#xA;There should also be a canonical storage that stores every character in the game, such as your allCharacters map up there.&#xD;&#xA;&#xD;&#xA;A character is alive if and only if it's contained in allCharacters. If you want to remove it from allCharacters, you remove it from every container that contains it also (which, as per first paragraph, should be reasonably efficient) and you're set.&#xD;&#xA;&#xD;&#xA;This assumes you don't have garbage collection - if you do, you can mostly get away with letting the GC take care of it. If you end up with leaks, just make a weak-reference container holding every entity, and use that for analyzing which entities are leaking." />
  <row Id="4689" PostHistoryTypeId="5" PostId="2433" RevisionGUID="e2f12157-21d7-42f3-b85f-b3f71d3f72dd" CreationDate="2010-08-09T08:20:13.213" UserId="1495" Comment="Extended premises." Text="In the light of [DRY][1], it seems desirable to store a collection of related game objects in one container only. &#xD;&#xA;However, one might need sub-collections of these objects in various contexts which quickly appears to demand to reference the specific sub-sets in other, more suitable containers. This increases the effort to track objects across multiple containers, for instance when objects are removed from the game world.&#xD;&#xA;&#xD;&#xA;What are possibilities to simplify such a design and what are the typical trade-offs?&#xD;&#xA;&#xD;&#xA;**To illustrate:**&#xD;&#xA;&#xD;&#xA;In a multiplayer role playing game, the server might hold a collection of game characters in a map suitable for lookup by id.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;&#xD;&#xA;A character may also reside in a certain game level. In order to identify all characters being present in a level it may seem suitable to introduce a container for each level which holds the characters currently present on it. This way you can execute common logic for all characters in that level.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;&#xD;&#xA;        [levels]&#xD;&#xA;            level1&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;            level2&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;Going even further, when a character interacts with the world messages should only be routed to characters in range. This interest management could be achieved by dividing the each level into a grid of cells each of which in turn store the characters currently standing on it.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;        &#xD;&#xA;        [levels]&#xD;&#xA;            level1&#xD;&#xA;               vector&lt;Character*&gt; charactersOnPlayfield&#xD;&#xA;               [cells]&#xD;&#xA;                   cell1&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   cell2&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   ...&#xD;&#xA;            level2&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;               [cells]&#xD;&#xA;                   cell1&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   cell2&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   ...&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;The Character objects at different levels of abstraction introduce the need to think carefully about object ownership and life-time. &#xD;&#xA;&#xD;&#xA;Note that the Character objects stored in the containers would naturally be references, not copies.&#xD;&#xA;Also, I am assuming that no garbage collection is in place.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" />
  <row Id="4690" PostHistoryTypeId="5" PostId="2434" RevisionGUID="ffa0a316-5945-4d70-90f5-da1baaaaaaf2" CreationDate="2010-08-09T08:23:29.180" UserId="1495" Comment="More concise description of first option" Text="In answering my question from the experience I had so far, I basically see these options: &#xD;&#xA;&#xD;&#xA;Extract your more specific collection of objects from the more general collection each time you need it&#xD;&#xA;&#xD;&#xA; - pro: central object repository &#xD;&#xA; - con: computational overhead&#xD;&#xA;&#xD;&#xA;Store your more specific collection in specialized containers as provided in the example for this question&#xD;&#xA;&#xD;&#xA; - pro: quick lookup / pre-sorted data&#xD;&#xA; - con: more involved tracking of objects&#xD;&#xA;&#xD;&#xA;Use caching for certain perspectives on / sub-sets of the game objects&#xD;&#xA;&#xD;&#xA; - pro: middle-ground between 1 and 2&#xD;&#xA; - con: need to devise caching strategy which can complicate matters&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Factors for choosing one of these options include&#xD;&#xA;&#xD;&#xA; - how often is the specific collection of objects required&#xD;&#xA; - what is the cost for tracking the objects across the multiple containers (it might just be relevant in case of object removal)&#xD;&#xA;&#xD;&#xA;The [observer pattern][1] can help to propagate the need to change the other sub-sets of objects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Observer_pattern" />
  <row Id="4691" PostHistoryTypeId="5" PostId="2433" RevisionGUID="2bb9c1b1-ec1b-47d0-9811-33a207cba501" CreationDate="2010-08-09T08:46:02.340" UserId="1495" Comment="Fixed typo, clarified question" Text="In the light of [DRY][1], it seems desirable to store a collection of related game objects in one container only. &#xD;&#xA;However, one might need sub-collections of these objects in various contexts. It might be sensible store these specific sub-sets in specific more suitable containers. &#xD;&#xA;This increases the effort to track objects across containers, for instance when objects are removed from the game world.&#xD;&#xA;&#xD;&#xA;What are possibilities to simplify such a design and what are the typical trade-offs?&#xD;&#xA;&#xD;&#xA;**To illustrate:**&#xD;&#xA;&#xD;&#xA;In a multiplayer role playing game, the server might hold a collection of game characters in a map suitable for lookup by id.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;&#xD;&#xA;A character may also reside in a certain game level. In order to identify all characters being present in a level it may seem suitable to introduce a container for each level which holds the characters currently present on it. This way you can execute common logic for all characters in that level.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;&#xD;&#xA;        [levels]&#xD;&#xA;            level1&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;            level2&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;Going even further, when a character interacts with the world messages should only be routed to characters in range. This interest management could be achieved by dividing the each level into a grid of cells each of which in turn store the characters currently standing on it.&#xD;&#xA;&#xD;&#xA;    world&#xD;&#xA;        map&lt;id, Character&gt; allCharacters&#xD;&#xA;        &#xD;&#xA;        [levels]&#xD;&#xA;            level1&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;               [cells]&#xD;&#xA;                   cell1&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   cell2&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   ...&#xD;&#xA;            level2&#xD;&#xA;               vector&lt;Character&gt; charactersOnPlayfield&#xD;&#xA;               [cells]&#xD;&#xA;                   cell1&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   cell2&#xD;&#xA;                       vector&lt;Character&gt; charactersOnCell&#xD;&#xA;                   ...&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;The Character objects at different levels of abstraction introduce the need to think carefully about object ownership and life-time. &#xD;&#xA;&#xD;&#xA;Note that the Character objects stored in the containers would naturally be references, not copies.&#xD;&#xA;Also, I am assuming that no garbage collection is in place.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" />
  <row Id="4692" PostHistoryTypeId="2" PostId="2437" RevisionGUID="36a61bbb-d2e1-4416-9c8c-9cbb77484122" CreationDate="2010-08-09T08:54:36.690" UserId="51" Text="I would advice against actually having multiple lists like that and instead use some kind of &lt;a href=&quot;http://en.wikipedia.org/wiki/Signals_and_slots&quot;&gt;signal/slot library&lt;/a&gt; (which basically is the observer pattern) to instead make &quot;calling a function on all objects in this area/zone&quot; pattern easier.  &#xD;&#xA;&#xD;&#xA;Objects could manage what signal they connect to themselves pretty easily, i.e. every time they move they disconnect from the signal representing their old slot and connect to the new one, if you're going to be that fine grained." />
  <row Id="4693" PostHistoryTypeId="10" PostId="2431" RevisionGUID="3f6030c4-3c49-4437-a841-ef7cf8f1d6ad" CreationDate="2010-08-09T08:58:16.460" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4694" PostHistoryTypeId="5" PostId="2431" RevisionGUID="925b7566-381c-4cab-ad6d-0dabf39e594b" CreationDate="2010-08-09T08:58:16.867" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [New to creating AI - where to start?](http://gamedev.stackexchange.com/questions/2194/new-to-creating-ai-where-to-start)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;i have been programming 2-3 games till now. but i have not used ai in any of them...so can u please suggest good ebooks or net articles or tutorials on game ai...problems featuring shortest path, pathfinding etc...&#xD;&#xA;Thankyou" />
  <row Id="4695" PostHistoryTypeId="2" PostId="2438" RevisionGUID="e35f0382-4a04-4941-b802-f204dbe74149" CreationDate="2010-08-09T09:00:05.787" UserId="1557" Text="I am having some trouble making bounding boxes for my models I am using within XNA 4.0. The way it was done in XNA 3.1 seems to be obsolete as you can no longer access parameters that were used before in XNA 3.1. Has anyone got any decent links I have been looking around the net for a while now and all I am finding is things for XNA 3.1 or below.&#xD;&#xA;&#xD;&#xA;Help much apprechiated.&#xD;&#xA;Regards&#xD;&#xA;Mark" />
  <row Id="4696" PostHistoryTypeId="1" PostId="2438" RevisionGUID="e35f0382-4a04-4941-b802-f204dbe74149" CreationDate="2010-08-09T09:00:05.787" UserId="1557" Text="XNA 4.0 and bounding boxes" />
  <row Id="4697" PostHistoryTypeId="3" PostId="2438" RevisionGUID="e35f0382-4a04-4941-b802-f204dbe74149" CreationDate="2010-08-09T09:00:05.787" UserId="1557" Text="&lt;xna&gt;&lt;c#&gt;&lt;bounding-boxes&gt;" />
  <row Id="4698" PostHistoryTypeId="2" PostId="2439" RevisionGUID="75b2ede5-0609-439e-82ec-8ab23a1b9834" CreationDate="2010-08-09T09:34:18.067" UserId="1206" Text="My advice would be: **Do**!&#xD;&#xA;&#xD;&#xA;But only if you have a use for it.&#xD;&#xA;&#xD;&#xA;No need to create a DSL if you are just going to use it yourself - internally.&#xD;&#xA;&#xD;&#xA;Galaxy is the scripting language which the Startcraft II editor is using.&#xD;&#xA;It's a prime example of a domain specific language.&#xD;&#xA;&#xD;&#xA;It targets game designers rather than programmers:&#xD;&#xA;&#xD;&#xA;    Timer - Start Raise Lava Timer as a One Shot timer that will expire in 20.0 Game Time seconds&#xD;&#xA;    Variable - Set Raise Lava Timer = (Last started timer)&#xD;&#xA;    Timer - Create a timer window for (Last started timer), with the title &quot;Lava will raise in: &quot;, using Remaining time (initially Visible)&#xD;&#xA;    Variable - Set Lava Timer Window = (Last created timer window)&#xD;&#xA;    Timer - Show (Last created timer window) for (All players)&#xD;&#xA;    Variable - Set Lava Death? = false&#xD;&#xA;&#xD;&#xA;[Sample Tutorial][1]&#xD;&#xA;&#xD;&#xA;Lisp is the perfect language to use to create domain specific languages, but there's other options, of course.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That way your designers/modders don't have to learn programming, even if it's just Lua, it's still programming.&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.sc2mapster.com/development/tutorials/5365-trigger-terrain-make-lava-water-raise-and-lower/" />
  <row Id="4699" PostHistoryTypeId="5" PostId="2439" RevisionGUID="d81368e5-a2d1-4448-94a8-b6e1aa4a8340" CreationDate="2010-08-09T10:13:58.903" UserId="1206" Comment="added 256 characters in body; added 11 characters in body" Text="My advice would be: **Do**!&#xD;&#xA;&#xD;&#xA;But only if you have a use for it.&#xD;&#xA;&#xD;&#xA;No need to create a DSL if you are just going to use it yourself - internally.&#xD;&#xA;&#xD;&#xA;Galaxy is the scripting language which the Startcraft II editor is using.&#xD;&#xA;It's a prime example of a domain specific language.&#xD;&#xA;&#xD;&#xA;It targets game designers rather than programmers:&#xD;&#xA;&#xD;&#xA;    Timer - Start Raise Lava Timer as a One Shot timer that will expire in 20.0 Game Time seconds&#xD;&#xA;    Variable - Set Raise Lava Timer = (Last started timer)&#xD;&#xA;    Timer - Create a timer window for (Last started timer), with the title &quot;Lava will raise in: &quot;, using Remaining time (initially Visible)&#xD;&#xA;    Variable - Set Lava Timer Window = (Last created timer window)&#xD;&#xA;    Timer - Show (Last created timer window) for (All players)&#xD;&#xA;    Variable - Set Lava Death? = false&#xD;&#xA;&#xD;&#xA;[Sample Tutorial][1]&#xD;&#xA;&#xD;&#xA;Lisp is the perfect language to use to create domain specific languages, but there's other options, of course.&#xD;&#xA;Like Boo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That way your designers/modders don't have to learn programming, even if it's just Lua, it's still programming.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Let me add that a DSL can be implemented in a scripting language - it's not synonymous with not using a scripting language.&#xD;&#xA;Especially if you are using Lisp or similar, since it lends itself extremely well to create domain specific languages.&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.sc2mapster.com/development/tutorials/5365-trigger-terrain-make-lava-water-raise-and-lower/" />
  <row Id="4702" PostHistoryTypeId="2" PostId="2440" RevisionGUID="42af3b2b-7af1-43b2-b4e3-3a76a68c1d45" CreationDate="2010-08-09T11:11:21.670" UserId="1095" Text="Working for one of the major console companies I can attest to the fact that HR will most of the time automatically filter people without degree's before sending the CVs to the managers. Something to keep in mind.&#xD;&#xA;&#xD;&#xA;In terms of degree choice, currently people doing Game Courses are generally looked &quot;down upon&quot; compared to CS courses. This isn't fair, and certainly isn't a reflection of what the Game Courses teach. But as they are relatively new and most people hiring wouldn't have had the choice, and still believe in a strong CS background. Of course, ymmv.&#xD;&#xA;&#xD;&#xA;If you are sure you want to get into the games industry as a programmer, than the best advice I can give to you is to do a joint CS + Math degree (if you have the ability). It will facilitate (in my experience) a job as a graduate much quicker. " />
  <row Id="4703" PostHistoryTypeId="5" PostId="2438" RevisionGUID="c6a6fbd9-2359-452f-8570-c582957c6a1e" CreationDate="2010-08-09T11:15:40.540" UserId="1557" Comment="added 403 characters in body" Text="I am having some trouble making bounding boxes for my models I am using within XNA 4.0. The way it was done in XNA 3.1 seems to be obsolete as you can no longer access parameters that were used before in XNA 3.1. Has anyone got any decent links I have been looking around the net for a while now and all I am finding is things for XNA 3.1 or below.&#xD;&#xA;&#xD;&#xA;Help much apprechiated.&#xD;&#xA;Regards&#xD;&#xA;Mark&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Hey, the problem i am having is getting the min and max points for my model i load through the content pipeline. as articles i have seen on how to do it tell you to do such things as VertexPositionNormalTexture[] vertices= new VertexPositionNormalTexture[mesh.VertexBuffer.SizeInBytes / mesh.MeshParts[0].VertexStride; but i can no longer call size in bytes and vertex strides within XNA 4.0 " />
  <row Id="4704" PostHistoryTypeId="5" PostId="2440" RevisionGUID="de5761c0-e4e0-4a0d-a3d1-9a920aedd66c" CreationDate="2010-08-09T11:19:33.217" UserId="1095" Comment="deleted 1 characters in body" Text="Working for one of the major console companies I can attest to the fact that HR will most of the time automatically filter people without degree's before sending the CVs to the managers. Something to keep in mind.&#xD;&#xA;&#xD;&#xA;In terms of degree choice, currently people doing Game Courses are generally looked &quot;down upon&quot; compared to CS courses. This isn't fair, and certainly isn't a reflection of what the Game Courses teach. But as they are relatively new and most people hiring wouldn't have had the choice, so still believe in a strong CS background. Of course, ymmv.&#xD;&#xA;&#xD;&#xA;If you are sure you want to get into the games industry as a programmer, than the best advice I can give to you is to do a joint CS + Math degree (if you have the ability). It will facilitate (in my experience) a job as a graduate much quicker. " />
  <row Id="4705" PostHistoryTypeId="2" PostId="2441" RevisionGUID="5a4c9d85-29bb-47fa-9c64-f95489c84561" CreationDate="2010-08-09T11:38:41.027" UserId="290" Text="With the pending release of [MonoDroid][1] we have decided to revisit [MonoTouch][2] as a possible alternative to gearing up some Objective-C skills.  I was wondering if anyone had any experience and would share the gotchas before everyone else hits them.  Set to CW, one hurdle per answer please.&#xD;&#xA;&#xD;&#xA;MonoTouch allows C# development of iPhone and iPad applications with access to native code libraries.&#xD;&#xA;&#xD;&#xA;  [1]: http://go-mono.com/monodroid/Default.aspx&#xD;&#xA;  [2]: http://monotouch.net/" />
  <row Id="4706" PostHistoryTypeId="1" PostId="2441" RevisionGUID="5a4c9d85-29bb-47fa-9c64-f95489c84561" CreationDate="2010-08-09T11:38:41.027" UserId="290" Text="Has anyone used MonoTouch for a game?" />
  <row Id="4707" PostHistoryTypeId="3" PostId="2441" RevisionGUID="5a4c9d85-29bb-47fa-9c64-f95489c84561" CreationDate="2010-08-09T11:38:41.027" UserId="290" Text="&lt;iphone&gt;&lt;c#&gt;&lt;cross-platform&gt;&lt;mono&gt;" />
  <row Id="4708" PostHistoryTypeId="16" PostId="2441" RevisionGUID="5a4c9d85-29bb-47fa-9c64-f95489c84561" CreationDate="2010-08-09T11:38:41.027" UserId="290" />
  <row Id="4709" PostHistoryTypeId="2" PostId="2442" RevisionGUID="57cf8d48-9836-4f9a-8bf5-49439647ecaa" CreationDate="2010-08-09T11:44:48.893" UserId="290" Text="[Gimp Tutorials][1] will show you how to draw stuff.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gimp-tutorials.com/" />
  <row Id="4710" PostHistoryTypeId="16" PostId="2442" RevisionGUID="57cf8d48-9836-4f9a-8bf5-49439647ecaa" CreationDate="2010-08-09T11:44:48.893" UserId="-1" />
  <row Id="4711" PostHistoryTypeId="2" PostId="2443" RevisionGUID="b13ab976-8b46-4ba7-8639-ffda08b23afc" CreationDate="2010-08-09T12:51:47.060" UserId="1156" Text="Rename the 'Game' state to something like 'Gameplay'. Then your logic seems better; You stop playing to go to th menu : you exit the Gameplay state to go to the MainMenu state.  &#xD;&#xA;&#xD;&#xA;Also, I think things like pause, which would require the game to be in the same state as when you paused the game, should not be separate states. Child states and nesting, perhaps? The Gameplay has-a pause menu." />
  <row Id="4712" PostHistoryTypeId="4" PostId="2438" RevisionGUID="dd5984c9-1261-4daa-b49c-82b9fbdf7f64" CreationDate="2010-08-09T13:10:42.963" UserId="1557" Comment="edited title" Text="How do i create bounding boxes with XNA 4.0" />
  <row Id="4713" PostHistoryTypeId="5" PostId="2438" RevisionGUID="64a789c4-bad5-4e77-9163-c99e71924da5" CreationDate="2010-08-09T13:10:55.397" UserId="14" Comment="deleted 9 characters in body" Text="I am having some trouble making bounding boxes for my models I am using within XNA 4.0. The way it was done in XNA 3.1 seems to be obsolete as you can no longer access parameters that were used before in XNA 3.1. Has anyone got any decent links I have been looking around the net for a while now and all I am finding is things for XNA 3.1 or below.&#xD;&#xA;&#xD;&#xA;Help much apprechiated.&#xD;&#xA;Regards&#xD;&#xA;Mark&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Hey, the problem i am having is getting the min and max points for my model i load through the content pipeline. as articles i have seen on how to do it tell you to do such things as VertexPositionNormalTexture[] vertices= new VertexPositionNormalTexture[mesh.VertexBuffer.SizeInBytes / mesh.MeshParts[0].VertexStride; but i can no longer call size in bytes and vertex strides within XNA 4.0 " />
  <row Id="4714" PostHistoryTypeId="5" PostId="1757" RevisionGUID="334444d4-f333-4c17-a33a-4ccca9711a9a" CreationDate="2010-08-09T13:11:25.333" UserId="14" Comment="deleted 5 characters in body; edited tags" Text="I'm a newbie. I like to play games, but I'd also like to program them too. I know it's difficult to create a game, but please share the basic info I need to get started creating my first game. What do I need to study to become a game developer? What is &#xD;&#xA;game AI? What is a Game Engine? What are the different types of game engine?" />
  <row Id="4715" PostHistoryTypeId="6" PostId="1757" RevisionGUID="334444d4-f333-4c17-a33a-4ccca9711a9a" CreationDate="2010-08-09T13:11:25.333" UserId="14" Comment="deleted 5 characters in body; edited tags" Text="&lt;engine&gt;&lt;game-design&gt;&lt;newbie&gt;" />
  <row Id="4716" PostHistoryTypeId="6" PostId="1757" RevisionGUID="c4786eab-2da6-49cb-b894-1c8c25aea527" CreationDate="2010-08-09T13:11:34.023" UserId="14" Comment="edited tags" Text="&lt;engine&gt;&lt;game-design&gt;" />
  <row Id="4717" PostHistoryTypeId="5" PostId="1396" RevisionGUID="140be6f1-9040-42e6-b877-2f7ef3e91974" CreationDate="2010-08-09T13:11:50.777" UserId="14" Comment="deleted 4 characters in body" Text="I was wondering if any experts out there could share the knowledge and resources of what is necessary to start making games with the latest HTML standards and JavaScript (or what some like to call HTML 5). Are there JavaScript libraries that are essential to the process? Aside from the `&lt;canvas&gt;` tag, what other pieces of HTML do we need to be aware of?" />
  <row Id="4718" PostHistoryTypeId="5" PostId="585" RevisionGUID="db483e3d-4ce5-4416-8e90-ddc72d1a75e3" CreationDate="2010-08-09T13:12:25.020" UserId="14" Comment="deleted 7 characters in body; edited tags; edited title" Text="We are in Pre-alpha stage of a game development project and haven´t yet got reply from Valve about how it works to distribute through Steam. We need this information to do a business model with all the different costs of developing and distributing this game.&#xD;&#xA;&#xD;&#xA;So my question is, what is the pricing structure? Do they take a per cent of our sale? If so, how much?&#xD;&#xA;&#xD;&#xA;Thanks Felix " />
  <row Id="4719" PostHistoryTypeId="6" PostId="585" RevisionGUID="db483e3d-4ce5-4416-8e90-ddc72d1a75e3" CreationDate="2010-08-09T13:12:25.020" UserId="14" Comment="deleted 7 characters in body; edited tags; edited title" Text="&lt;valve&gt;&lt;costs&gt;&lt;steam&gt;" />
  <row Id="4720" PostHistoryTypeId="4" PostId="585" RevisionGUID="db483e3d-4ce5-4416-8e90-ddc72d1a75e3" CreationDate="2010-08-09T13:12:25.020" UserId="14" Comment="deleted 7 characters in body; edited tags; edited title" Text="What is the cost of distributing through steam?" />
  <row Id="4721" PostHistoryTypeId="5" PostId="1023" RevisionGUID="ce24ec62-ff43-4bcf-a86a-92c3b591aa97" CreationDate="2010-08-09T13:13:01.133" UserId="14" Comment="deleted 7 characters in body" Text="Valve just released Alien Swarm on steam, along with all the source code. I would love to build a version of it on my own machine and play a little bit with the code.&#xD;&#xA;&#xD;&#xA;Has anyone here tried to build it yet? Is it easy enough to just build and run it?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="4722" PostHistoryTypeId="5" PostId="930" RevisionGUID="f38db67a-aa49-47c5-93d5-890ef0b7d391" CreationDate="2010-08-09T13:13:13.257" UserId="14" Comment="deleted 4 characters in body; edited tags" Text="I recently started learning spriting/pixel art to help propel my game development endeavors and I've gotten to the point where I'd like to start sharing it for comments, critiques and other feedback.&#xD;&#xA;&#xD;&#xA;I've got a pretty good awareness of some art sites out there but none of them have really struck me as ideal so I'm looking for suggestions from you guys!" />
  <row Id="4723" PostHistoryTypeId="6" PostId="930" RevisionGUID="f38db67a-aa49-47c5-93d5-890ef0b7d391" CreationDate="2010-08-09T13:13:13.257" UserId="14" Comment="deleted 4 characters in body; edited tags" Text="&lt;graphics&gt;&lt;assets&gt;&lt;sprites&gt;" />
  <row Id="4724" PostHistoryTypeId="5" PostId="1206" RevisionGUID="58de86ab-0859-4424-92fa-9e18baf68bbc" CreationDate="2010-08-09T13:13:26.733" UserId="14" Comment="deleted 7 characters in body" Text="I'm trying to speed up particles, and one way to do that is by precomputing the texture rotations. What I want to do is load the texture, rotate it and save it to a handle.&#xD;&#xA;&#xD;&#xA;How would I go about doing this?&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="4725" PostHistoryTypeId="6" PostId="292" RevisionGUID="a63032ef-cf5c-4594-b19c-e21f55c8397b" CreationDate="2010-08-09T13:16:09.723" UserId="14" Comment="edited tags" Text="&lt;tutorials&gt;&lt;voxels&gt;" />
  <row Id="4726" PostHistoryTypeId="6" PostId="339" RevisionGUID="4c1eb9df-9937-4f14-9a7f-e71c96e799ec" CreationDate="2010-08-09T13:16:19.490" UserId="14" Comment="edited tags" Text="&lt;programming&gt;&lt;languages&gt;" />
  <row Id="4727" PostHistoryTypeId="6" PostId="513" RevisionGUID="a99d470a-b76b-4ca2-9e65-0f07527912b5" CreationDate="2010-08-09T13:17:01.097" UserId="14" Comment="edited tags" Text="&lt;c++&gt;&lt;best-practices&gt;&lt;learning&gt;&lt;mario&gt;" />
  <row Id="4728" PostHistoryTypeId="6" PostId="616" RevisionGUID="83fc1623-beef-4773-b201-826af30eacd1" CreationDate="2010-08-09T13:17:13.420" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="4729" PostHistoryTypeId="6" PostId="1245" RevisionGUID="c275fb5e-52ef-4f56-8988-c36c29b9c1c2" CreationDate="2010-08-09T13:17:20.283" UserId="14" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;tutorials&gt;" />
  <row Id="4730" PostHistoryTypeId="6" PostId="513" RevisionGUID="66aee838-831d-4882-8a31-6067e72d84ec" CreationDate="2010-08-09T13:21:02.193" UserId="395" Comment="edited tags" Text="&lt;c++&gt;&lt;best-practices&gt;&lt;learning&gt;" />
  <row Id="4731" PostHistoryTypeId="4" PostId="2438" RevisionGUID="43c2a544-7074-49bc-a1ab-4ba572f019e8" CreationDate="2010-08-09T13:26:20.670" UserId="14" Comment="edited title" Text="How do i create bounding boxes with XNA 4.0?" />
  <row Id="4732" PostHistoryTypeId="2" PostId="2444" RevisionGUID="0fdb2070-3fc2-4b58-9663-69da9a025310" CreationDate="2010-08-09T13:31:05.247" UserId="1101" Text="An online program (in the traditional meaning of online, ie. continually running and responding to input, rather than meaning connected to the internet) typically consists of 3 things:&#xD;&#xA;&#xD;&#xA; - input gathering and handling&#xD;&#xA; - updating of logic&#xD;&#xA; - output&#xD;&#xA;&#xD;&#xA;Generally speaking, these 3 are related and change at the same time. For example, when displaying a splash screen you might map all your keys to a 'close screen' command and the update may be fading a graphic in slowly with the output just showing that graphic. But when playing a game the keys may all map to different commands and the update is changing properties of many in-game objects.&#xD;&#xA;&#xD;&#xA;When you view it this way, it makes sense to separate an Intro from Character Creation and from the Game proper: each has its own set of input, update, and output rules. They're almost like self-contained programs that happen to share some data and library code. And, with this in mind, it usually makes sense to have just one Game state, since the gameplay is fairly homogeneous throughout.&#xD;&#xA;&#xD;&#xA;Of course, if you do actually have separate types of gameplay (eg. an RPG example - World Map, Town Map, Cutscene, Combat), with differing input, updates, and output, there's no reason you couldn't have multiple states there too instead of just 1 Game state. But it depends on your game." />
  <row Id="4733" PostHistoryTypeId="2" PostId="2445" RevisionGUID="3b5bcbb1-7822-4c2e-baa8-be6ddd7c2d9b" CreationDate="2010-08-09T14:09:21.287" UserId="1156" Text="I found [XNA Development: Tutorials for the masses][1] to be absolutely great. It covers basic things well - sprites, moving them, firing things, scrolling backgrounds, and comes with full source. The other material, on game states and other bits, are equally good.  &#xD;&#xA;&#xD;&#xA;The other thing I found  useful, but definitely at a slightly more advanced level, is Nick Gravelyn's tutorial for Alien Aggressors. It's a full featuring Space Invaders/Galaga clone.&#xD;&#xA;I cannot find it, since his site's been taken down. But it was in pdf form and a great read if anyone can find.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xnadevelopment.com/tutorials.shtml" />
  <row Id="4735" PostHistoryTypeId="2" PostId="2447" RevisionGUID="d1e3eb57-e854-43c6-bd68-197f2c11ed20" CreationDate="2010-08-09T15:13:04.930" UserId="255" Text="When you submit a game demo to valve, make sure it works and looks really nice. Don't send an alpha or anything.&#xD;&#xA;&#xD;&#xA;If you're not already known to them, they'll just look at it quickly, and if they don't like what they see, they'll shoot it down.&#xD;&#xA;Don't expect any feedback..&#xD;&#xA;&#xD;&#xA;So make sure your in game/demo presentation is really good." />
  <row Id="4736" PostHistoryTypeId="5" PostId="2437" RevisionGUID="d3d380e6-cd63-45ba-b9ff-5b16363a0372" CreationDate="2010-08-09T15:22:33.407" UserId="51" Comment="writing answers at 4am means I leave out parts of sentences" Text="I would advice against actually having multiple lists like that and instead use some kind of &lt;a href=&quot;http://en.wikipedia.org/wiki/Signals_and_slots&quot;&gt;signal/slot library&lt;/a&gt; instead (which basically is the observer pattern) to make the &quot;calling a function on all objects in this area/zone&quot; pattern easier.  &#xD;&#xA;&#xD;&#xA;Objects could manage what signal they connect to themselves pretty easily, i.e. every time they move they disconnect from the signal representing their old slot and connect to the new one, if you're going to be that fine grained." />
  <row Id="4737" PostHistoryTypeId="16" PostId="1247" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4738" PostHistoryTypeId="16" PostId="1260" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4739" PostHistoryTypeId="16" PostId="1264" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4740" PostHistoryTypeId="16" PostId="1270" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4741" PostHistoryTypeId="16" PostId="1279" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4742" PostHistoryTypeId="16" PostId="1296" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4743" PostHistoryTypeId="16" PostId="2445" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4744" PostHistoryTypeId="16" PostId="1245" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-09T15:31:31.743" UserId="51" />
  <row Id="4745" PostHistoryTypeId="2" PostId="2448" RevisionGUID="b9843113-242e-4528-a3d2-56f9377bc702" CreationDate="2010-08-09T15:39:43.887" UserId="1156" Text="[Menu display for a RPG game tutorial][1]  &#xD;&#xA;[Tuning dial/knob in photoshop guide][2]  &#xD;&#xA;[Sci-fi type loading wheel thing :P][3]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://psd.tutsplus.com/tutorials/interface-tutorials/how-to-make-a-menu-interface-for-a-fantasy-themed-iphone-game/&#xD;&#xA;  [2]: http://blog.guifx.com/2009/04/03/creating-a-knob-in-photoshop/&#xD;&#xA;  [3]: http://www.adobetutorialz.com/articles/2966/1/Loading-Interface" />
  <row Id="4746" PostHistoryTypeId="16" PostId="2448" RevisionGUID="b9843113-242e-4528-a3d2-56f9377bc702" CreationDate="2010-08-09T15:39:43.887" UserId="-1" />
  <row Id="4747" PostHistoryTypeId="2" PostId="2449" RevisionGUID="5207f067-777d-429f-8808-acc947fd4827" CreationDate="2010-08-09T15:59:27.363" UserId="1101" Text="Arguably UnrealScript is a DSL. It seems to get the job done, although I think it's possible to make game scripting languages even more 'domain specific' than that. I would recommend making a DSL if there is something specific to the domain that will benefit from language changes - I have a few ideas in this area but nothing fully formed currently.&#xD;&#xA;&#xD;&#xA;&gt; Do you see this becoming more common as game development moves toward more metaprogramming-friendly languages, e.g. Boo?&#xD;&#xA;&#xD;&#xA;I don't think that one fairly new engine supporting a language is evidence of game development moving in a given direction, however. It's early days yet.&#xD;&#xA;" />
  <row Id="4748" PostHistoryTypeId="2" PostId="2450" RevisionGUID="e574ae7a-4329-4590-b7ee-8237d0d5dc32" CreationDate="2010-08-09T16:13:32.163" UserId="1156" Text="If I say I have a hierarchal entity framework, rather than a component model. Something like:  &#xD;&#xA;(Yes, this is made up)&#xD;&#xA;Weapon-&gt;Gun-&gt;AutomaticGun-&gt;MP44  &#xD;&#xA;Or, more of a classical example:  &#xD;&#xA;Entity-&gt;MovableEntity-&gt;Enemy-&gt;WalkingEnemy  &#xD;&#xA;&#xD;&#xA;How far would you split up the source/header files for readability and organization? Is it best to go something like Entity.cpp, MovableEntity.cpp, Enemy.cpp, etc. or would an approach like Entity.cpp [containing Entity and MovableEntity] and Enemy.cpp [containing Enemy and WalkingEnemy] be better?  (Or in a more language agnostic way, an Enemy file and an Entity file vs a file for each class?)  &#xD;&#xA;Also, would this affect anything other than readability and organization?" />
  <row Id="4749" PostHistoryTypeId="1" PostId="2450" RevisionGUID="e574ae7a-4329-4590-b7ee-8237d0d5dc32" CreationDate="2010-08-09T16:13:32.163" UserId="1156" Text="Splitting into files - how much splitting?" />
  <row Id="4750" PostHistoryTypeId="3" PostId="2450" RevisionGUID="e574ae7a-4329-4590-b7ee-8237d0d5dc32" CreationDate="2010-08-09T16:13:32.163" UserId="1156" Text="&lt;language-agnostic&gt;&lt;file&gt;" />
  <row Id="4751" PostHistoryTypeId="5" PostId="2450" RevisionGUID="b8829b03-159c-4739-a829-380156a8cf56" CreationDate="2010-08-09T16:18:42.003" UserId="1156" Comment="added 4 characters in body" Text="If I say I have a hierarchal entity framework, rather than a component model. Something like:  &#xD;&#xA;(Yes, this is made up)  &#xD;&#xA;&#xD;&#xA;Weapon-&gt;Gun-&gt;AutomaticGun-&gt;MP44  &#xD;&#xA;Or, more of a classical example:  &#xD;&#xA;Entity-&gt;MovableEntity-&gt;Enemy-&gt;WalkingEnemy  &#xD;&#xA;&#xD;&#xA;How far would you split up the source/header files for readability and organization? Is it best to go something like Entity.cpp, MovableEntity.cpp, Enemy.cpp, etc. or would an approach like Entity.cpp [containing Entity and MovableEntity] and Enemy.cpp [containing Enemy and WalkingEnemy] be better?  (Or in a more language agnostic way, an Enemy file and an Entity file vs a file for each class?)  &#xD;&#xA;Also, would this affect anything other than readability and organization?" />
  <row Id="4752" PostHistoryTypeId="2" PostId="2451" RevisionGUID="77b1a61f-286f-49a4-ac48-8e546f38670c" CreationDate="2010-08-09T16:20:34.153" UserId="189" Text="This is entirely a matter of preference. However, I personally believe it is best to err on the side of more files. **Java requires one class per file**, with the filename the same as the class name, for example; they do this by policy to enforce this good practice (though you can have subclasses which basically get around this).&#xD;&#xA;&#xD;&#xA;Also, **source control systems** are pretty good at merging changes in a file, but it's less of a hassle if you're just working in totally separate files. You can also easier see who changed which class. Let's say another developer makes a change to the file AllEntities.h; you have no clue exactly what entity (or entities) he changed until you open the file and look at the diff output.&#xD;&#xA;&#xD;&#xA;I think it's great to **group small structs and enums related to class within one class's file, though**. If you have an enum that's only used by a single class, why split it into its own file? Just put them together. But if it's used by another class (i.e. another class member is of this enum's type), that's when it is time to give it its own file." />
  <row Id="4753" PostHistoryTypeId="5" PostId="2451" RevisionGUID="b982b654-6409-406d-80ab-e85da1cd3867" CreationDate="2010-08-09T16:29:01.273" UserId="189" Comment="deleted 8 characters in body" Text="This is entirely a matter of preference. However, I personally believe it is best to err on the side of more files. **Java requires one class per file**, with the filename the same as the class name, for example; they do this by policy to enforce this good practice (though you can have subclasses which basically get around this).&#xD;&#xA;&#xD;&#xA;Also, **source control systems** are pretty good at merging changes in a file, but it's less of a hassle if you're just working in totally separate files. You can also easier see who changed which class. Let's say another developer makes a change to the file AllEntities.h; you have no clue exactly what entity (or entities) he changed until you open the file and look at the diff output.&#xD;&#xA;&#xD;&#xA;It's great to **group small structs and enums related to class within one class's file**, though. If you have an enum that's only used by a single class, why split it into its own file? Just put them together. But if it's used by another class (i.e. another class member is of this enum's type), that's when it is time to give it its own file." />
  <row Id="4754" PostHistoryTypeId="2" PostId="2452" RevisionGUID="cd12724f-5921-4087-a0e7-e9e9048071be" CreationDate="2010-08-09T17:48:22.207" UserId="744" Text="Many languages outside of C/C++ impose constraints on files. Ricket mentioned Java's 'one class per file'; Python uses files as namespaces; other languages often copy the spirit of those.&#xD;&#xA;&#xD;&#xA;If you are using C or C++, more included files generally means longer compile times per file; on the other hand, fewer means more to recompile when making small changes. Because enumerations cannot be forward-declared in C, you should always put them into header files containing only other enums, for dependency sanity.&#xD;&#xA;&#xD;&#xA;Otherwise, Java's &quot;one file per class&quot; is reasonable, but for a long time Java has supported inner classes - like a container, and an inner class of its iterator. Similarly in any other language you'll probably want one dominant record/struct/class/type/interface/blorb per header, but may decide to include related helpers or containers as well.&#xD;&#xA;&#xD;&#xA;(You don't need to use a component model, but if you have a deep and specific class hierarchy like that, you are going to hate yourself later.)" />
  <row Id="4756" PostHistoryTypeId="6" PostId="2338" RevisionGUID="df07ee7d-6223-460e-8b44-3e33c5500796" CreationDate="2010-08-09T18:09:16.720" UserId="51" Comment="edited tags" Text="&lt;programming&gt;&lt;c#&gt;" />
  <row Id="4757" PostHistoryTypeId="6" PostId="854" RevisionGUID="51fe36b6-8f27-4fa0-b1e7-5a449dc941d6" CreationDate="2010-08-09T18:10:08.340" UserId="51" Comment="edited tags" Text="&lt;programming&gt;&lt;hobby-development&gt;" />
  <row Id="4758" PostHistoryTypeId="5" PostId="580" RevisionGUID="ad29cd2a-d1e6-46a6-b447-436e56ff7dc9" CreationDate="2010-08-09T18:12:48.350" UserId="323" Comment="added 4 characters in body" Text="Platformers are surprisingly difficult to write. Physics is tricky, and platformers rely more on physics than you'd expect (yes, even SMB1-era platformers - getting the feel right is quite tricky.)&#xD;&#xA;&#xD;&#xA;Pong, Tetris, and Galaga are classic start points. I'd start with those and continue on from there.&#xD;&#xA;&#xD;&#xA;I'd also personally recommend against starting with C++, as it provides very little benefit for a one-man team. Use something higher-level like the Lua Love engine or Python Pygame. Switch back to C++ once you grok game layout, if you absolutely must." />
  <row Id="4759" PostHistoryTypeId="2" PostId="2453" RevisionGUID="6c64fab8-6691-454a-869a-bbc0ebb17b79" CreationDate="2010-08-09T18:13:01.597" UserId="1024" Text="Internal dsls are just syntactical sugar on a good API. The API is what is most important.    After you have a good API making a dsl is trivial, and not that important.  " />
  <row Id="4760" PostHistoryTypeId="6" PostId="2450" RevisionGUID="c10e8879-6fa9-47da-9073-81b72c501f67" CreationDate="2010-08-09T18:14:49.890" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;file&gt;" />
  <row Id="4761" PostHistoryTypeId="2" PostId="2454" RevisionGUID="eb16af81-0570-439f-bde3-81e8f952edf7" CreationDate="2010-08-09T18:45:32.107" UserId="1156" Text="A platformer is harder than it looks.  &#xD;&#xA;Also, why do you want to develop it in C++? Seems a little stupid to do it in a language considered hard for beginners, let alone as a first game.  &#xD;&#xA;&#xD;&#xA;If you haven't yet learnt C++, try something simpler. A good idea would be Python, or C#. You can find plenty of resources for them, and they'll ease you in more easily.  &#xD;&#xA;&#xD;&#xA;Regardless of language, you won't want to do Mario. Try something like Pong: input, graphics, basic physics, menus, pausing.  &#xD;&#xA;Get it working. Don't worry if it's 'crap', just do it. Finish it.  &#xD;&#xA;Go onto something like Tetris, where you've got more to think about: Clearing rows, more physics, timing, generating blocks.  &#xD;&#xA;Then try a more action based game; I'm thinking Space Invaders or a topdown, veritcal shooter.  &#xD;&#xA;Now, with all that experience and by now a pretty good codebase, go for a Mario clone.  &#xD;&#xA;&#xD;&#xA;Also, if you think you can 'patch together' a game with different libraries, don't bother trying. You're not going to get anywhere without learning an API or a wrapper/library, learning about data structures and how to organise a game, learning about what works and what doesn't.  &#xD;&#xA;&#xD;&#xA;If you just want to play one, there's more than I can count out there." />
  <row Id="4762" PostHistoryTypeId="2" PostId="2455" RevisionGUID="52db6726-4774-4410-9ef6-555b7d070ddf" CreationDate="2010-08-09T19:33:21.470" UserId="229" Text="- Most 2D screen/bitmap coordinate systems have the positive Y axis pointing *down* (with the the origin in the upper left corner).&#xD;&#xA;- This is counter to how most people think geometrically with the positive Y axis pointing *up* (with the origin in the center).&#xD;&#xA;&#xD;&#xA;**How do most games manage the two different 2D coordinate systems?** There are two main types of coordinates (screen vs. Cartesian), but there could be many different coordinate spaces: sprite space, world space, view space, screen space, etc... &#xD;&#xA;&#xD;&#xA;**Background:**&#xD;&#xA;&#xD;&#xA;I originally made the world coordinates in my game match the 2D screen coordinate convention. This made it very natural to use the graphics drawing routines, but subtle issues arose when using trigonometric functions like atan2(). The results of feeding atan2() 2D screen coordinates are very confusing because atan2() assumes the positive y axis points up.&#xD;&#xA;&#xD;&#xA;So I changed my world coordinates to follow the classic Cartesian coordinate system (with the origin at the bottom left of the screen). Reasoning with atan2() is much more straight-forward, but now it is harder to do other types of reasoning:&#xD;&#xA;&#xD;&#xA; - If I click the screen here, what sprite is underneath?&#xD;&#xA; - Where did I click on that sprite?&#xD;&#xA; - If a sprite is drawn in the wrong location, what was calculated incorrectly? The screen coordinates or the world coordinates?&#xD;&#xA; &#xD;&#xA;I realize conversion from screen to Cartesian coordinates involves simply scaling the y value by -1 with an optional translation of both (x,y) values. I'm more interested in best practices for game design:&#xD;&#xA;&#xD;&#xA; - Do most games just stick with the screen coordinate convention and change their thinking about how things like atan2() should work?&#xD;&#xA; - When/how are coordinate system conversions done? (Using matrices, OOP abstraction, etc)&#xD;&#xA; - Are sprite locations stored as the center of the sprite or one of the corners? The sprite's height/width going in the &quot;wrong&quot; direction seems to be a common problem when I draw them.&#xD;&#xA;&#xD;&#xA;Although my question is mainly about 2D games, it seems OpenGL uses a coordinate system where the Y axis points up. OpenGL must eventually project those 3D coordinates onto a 2D screen coordinate system. Perhaps some guidance could be found in OpenGL's method...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4763" PostHistoryTypeId="1" PostId="2455" RevisionGUID="52db6726-4774-4410-9ef6-555b7d070ddf" CreationDate="2010-08-09T19:33:21.470" UserId="229" Text="How to deal with differences between 2D screen coordinates and Cartesian coordinates" />
  <row Id="4764" PostHistoryTypeId="3" PostId="2455" RevisionGUID="52db6726-4774-4410-9ef6-555b7d070ddf" CreationDate="2010-08-09T19:33:21.470" UserId="229" Text="&lt;2d&gt;&lt;screen&gt;&lt;coordinates&gt;" />
  <row Id="4765" PostHistoryTypeId="2" PostId="2456" RevisionGUID="6f803d4f-0467-46e4-8ad0-b732ea9dccf0" CreationDate="2010-08-09T19:44:12.393" UserId="1156" Text="OpenGL, like DirectX, has the X and Z axes along the horizontal plane and Y facing upwards.  &#xD;&#xA;I have never had any issues with screen coordinates, and I think the easiest way would simply be to treat it how it is: if something, such as atan2, does not like it, then change parameters being fed.  &#xD;&#xA;&#xD;&#xA;If you're using relative or local coordinates, for example child object psoitions spring to mind, then a simple function such as ToGlobalCoords() is good.  &#xD;&#xA;&#xD;&#xA;Sprites are drawn from the top left corner or (0,0) the origin. Reasons why are because of the top left origin of the window.  &#xD;&#xA;&#xD;&#xA;It seems a little silly to change the window coordinate system, and would make things like input, which plays a larger part to most games than trig does, significantly more difficult. It also alienates you from the norm and any users of your code." />
  <row Id="4766" PostHistoryTypeId="2" PostId="2457" RevisionGUID="048e6a7b-c803-493c-8514-99ad0a14b01c" CreationDate="2010-08-09T20:13:07.707" UserId="1541" Text="How can I tell if a glut window has focus? Im using c#/tao, Ill use p/invokes if necessary.&#xD;&#xA;&#xD;&#xA;Basically I want to ignore input if it doesn't have focus." />
  <row Id="4767" PostHistoryTypeId="1" PostId="2457" RevisionGUID="048e6a7b-c803-493c-8514-99ad0a14b01c" CreationDate="2010-08-09T20:13:07.707" UserId="1541" Text="How to tell if a glut window has focus from c#" />
  <row Id="4768" PostHistoryTypeId="3" PostId="2457" RevisionGUID="048e6a7b-c803-493c-8514-99ad0a14b01c" CreationDate="2010-08-09T20:13:07.707" UserId="1541" Text="&lt;opengl&gt;&lt;c#&gt;" />
  <row Id="4769" PostHistoryTypeId="2" PostId="2458" RevisionGUID="3d89d896-2eb2-4183-992a-7ff4d3d74980" CreationDate="2010-08-09T20:29:19.230" UserId="769" Text="I prefer using a display tree like in Flash. I'll have a root node (game view) which contains a child for the world (world node) and one on top for the HUD. Inside the world node will be the nodes for the objects in the game world.&#xD;&#xA;&#xD;&#xA;I then simply transform the world node. Along with translation (camera panning) and proportional scaling (camera zooming) I also apply two other transformations:&#xD;&#xA;&#xD;&#xA;- A -1 y-scale to flip the coordinate system.&#xD;&#xA;- A scaling to convert world units (meters) to screen units (pixels)&#xD;&#xA;&#xD;&#xA;I then use y-up / world coordinates in game object drawing code and y-down / screen coordinates in HUD drawing code, which both feel very natural.&#xD;&#xA;&#xD;&#xA;To answer questions like &quot;what object am I clicking on&quot; I use display node methods to convert coordinates between coordinate systems (such as `globalToLocal` and its inverse in Flash).&#xD;&#xA;&#xD;&#xA;By the way, `atan` doesn't really work differently when y is down, you just need to think of all angles as going clockwise instead of counter-clockwise." />
  <row Id="4770" PostHistoryTypeId="2" PostId="2459" RevisionGUID="ff3bbd56-891c-48b7-8c72-0a671d61dbbc" CreationDate="2010-08-09T20:39:52.137" UserId="8" Text="**What are some good approaches to procedurally generating an infinite 2d level?** The level could be constrained in either dimension but not necessarily.&#xD;&#xA;&#xD;&#xA;The approach that makes most sense to me so far is using a grid-based radius. e.g. divide the play area into a grid with squares of a certain size and then load X squares in a radius around the player. Then when the player moves to another square build the next set and drop the farther (Persisting explored area is not necessary.) When objects leave the outer ring of squares they are removed from the world Are there better or different ways? Or if this is a good approach, what are potential issues?&#xD;&#xA;&#xD;&#xA;For discussion's sake, you can think of the level as a top down asteroid field with power ups, etc scattered throughout." />
  <row Id="4771" PostHistoryTypeId="1" PostId="2459" RevisionGUID="ff3bbd56-891c-48b7-8c72-0a671d61dbbc" CreationDate="2010-08-09T20:39:52.137" UserId="8" Text="Procedural Generation of Infinite Level" />
  <row Id="4772" PostHistoryTypeId="3" PostId="2459" RevisionGUID="ff3bbd56-891c-48b7-8c72-0a671d61dbbc" CreationDate="2010-08-09T20:39:52.137" UserId="8" Text="&lt;2d&gt;&lt;procedural-generation&gt;&lt;infinite&gt;" />
  <row Id="4773" PostHistoryTypeId="5" PostId="2456" RevisionGUID="726c9498-1f39-4673-92d9-26d9e82ba738" CreationDate="2010-08-09T20:40:45.957" UserId="1156" Comment="added 127 characters in body" Text="OpenGL, like DirectX, has the X and Z axes along the horizontal plane and Y facing upwards.  &#xD;&#xA;I have never had any issues with screen coordinates, and I think the easiest way would simply be to treat it how it is: if something, such as atan2, does not like it, then change parameters being fed.  &#xD;&#xA;&#xD;&#xA;If you're using relative or local coordinates, such as a scene graph, then a simple function such as ToGlobalCoords() is good. In fact, if you want to learn more about spatial positioning, scene graphs, and localToGlobal, the free extract from Game Engine Architecture is about that.&#xD;&#xA;&#xD;&#xA;Sprites are drawn from the top left corner or (0,0) the origin. Reasons why are because of the top left origin of the window.  &#xD;&#xA;&#xD;&#xA;It seems a little silly to change the window coordinate system, and would make things like input, which plays a larger part to most games than trig does, significantly more difficult. It also alienates you from the norm and any users of your code." />
  <row Id="4774" PostHistoryTypeId="5" PostId="2459" RevisionGUID="ee61c590-f250-40aa-868c-5435f8ca6e6b" CreationDate="2010-08-09T20:52:18.800" UserId="8" Comment="more specifics in my example" Text="**What are some good approaches to procedurally generating an infinite 2d level?** The level could be constrained in either dimension but not necessarily.&#xD;&#xA;&#xD;&#xA;The approach that makes most sense to me so far is using a grid-based radius. e.g. divide the play area into a grid with squares of a certain size and then load X squares in a radius around the player. Then when the player moves to another square build the next set and drop the farther (Persisting explored area is not necessary.) When a square is built, it contains a random arrangement of objects. When objects leave the outer ring of squares they are removed from the world. Are there better or different ways? Or if this is a good approach, what are potential issues?&#xD;&#xA;&#xD;&#xA;For discussion's sake, you can think of the level as a top down asteroid field with power ups, etc scattered throughout." />
  <row Id="4775" PostHistoryTypeId="2" PostId="2460" RevisionGUID="4954cb36-1d46-451f-813d-44bcbeba2a43" CreationDate="2010-08-09T21:01:25.970" UserId="136" Text="I may be oversimplifying things here, but my inclination would be to have any 2D/UI subsystem deal strictly in what you dubbed &quot;screen&quot; coordinates.  You would have two matrices: ScreenToCartesianTransform and CartesianToScreenTransform.  When mouse input events are received, the mouse coordinates would be transformed using CartesianToScreenTransform before being passed to the 2D/UI system's input manager.  From there, the UI system would perform hit-testing using the screen coordinate system, and handle (or not handle) the event accordingly.  If a mouse input event goes unhandled by the 2D/UI, it could be passed on to the 3D system (if one exists) using the original, untransformed coordinates.&#xD;&#xA;&#xD;&#xA;Since the 2D/UI system would deal only in &quot;screen&quot; coordinates, its geometry would need to be transformed via ScreenToCartesianTransform before being processed by the 3D graphics engine." />
  <row Id="4776" PostHistoryTypeId="5" PostId="2460" RevisionGUID="c45c45dd-f95d-4710-b201-5052d4caace5" CreationDate="2010-08-09T21:07:36.377" UserId="136" Comment="deleted 2 characters in body" Text="I may be oversimplifying things here, but my inclination would be to have any 2D/UI subsystem deal strictly in what you dubbed &quot;screen&quot; coordinates.  You would have two matrices: ScreenToCartesianTransform and CartesianToScreenTransform.  When mouse input events are received, the mouse coordinates would be transformed using CartesianToScreenTransform before being passed to the 2D/UI system's input manager.  From there, the UI system would perform hit-testing using the screen coordinate system, and handle (or not handle) the event accordingly.  If a mouse input event goes unhandled by the 2D/UI, it could be passed on to the 3D system (if one exists) using the original, untransformed coordinates.&#xD;&#xA;&#xD;&#xA;Since the 2D/UI system would deal only in &quot;screen&quot; coordinates, its geometry would need to be transformed via ScreenToCartesianTransform before being processed by the rendering engine." />
  <row Id="4777" PostHistoryTypeId="2" PostId="2461" RevisionGUID="38874357-953e-4400-8bc3-f3c3b40a3d28" CreationDate="2010-08-09T21:09:10.070" UserId="1261" Text="A problem with &quot;infinite&quot; worlds is that your underlying coordinates might not be infinite. Sometimes, if the game slows down the player enough, it might not be a concern, because the time to reach the integer wrap around, for example, would be way too long to ever be reached. But if you allow for high differences in speed, you might need to be both very precise and very far reaching, that you would need to think about your coordinates. A reasonable fix would be to have two levels, such as the integer coordinates of your grid, and float coordinates in each grid referential.&#xD;&#xA;&#xD;&#xA;As an aside, you might even be able to properly persist the layout of your world, by using the grid coordinates as a seed to create your random world in a given square. So, when the player leaves the area, you can drop it, and when the player comes back, you can regenerate it back from the seed.&#xD;&#xA;" />
  <row Id="4778" PostHistoryTypeId="5" PostId="2416" RevisionGUID="4038f240-298b-4d40-aba6-ac8ee678b814" CreationDate="2010-08-09T21:13:18.097" UserId="469" Comment="added 466 characters in body" Text="I am not asking the theory of UI design, or how to do one, I am asking for examples and resources, like... How to draw this fiddly stuff, or how to code another circular thing, or a gallery of game menus, etc...&#xD;&#xA;&#xD;&#xA;I am seeking myself specifically sci-fi stuff, but no problem putting other stuff, references are never enough!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: I am neither looking logic code, neither software tutorials... I am looking for stuff like this:&#xD;&#xA;&#xD;&#xA;&quot;Oh, there are this cool GUI on castlevania: http://xbox360media.ign.com/xbox360/image/article/759/759732/castlevania-symphony-of-the-night-20070130115858695.jpg Where the gui looks like made of bone, and it is shown on on the screen by drawing a rectangle textured with the blue bar, and then a transparent bony image is drawn over it...&quot;&#xD;&#xA;&#xD;&#xA;Got it now?" />
  <row Id="4779" PostHistoryTypeId="2" PostId="2462" RevisionGUID="42ff73e4-71ef-43ff-8488-a96e3a784657" CreationDate="2010-08-09T21:49:15.877" UserId="136" Text="It really depends on what your current competencies are.  If you're relatively new to programming, then go with one of the specific games that people have suggested.  Otherwise, you should think about what kind of game(s) would let you put your experience to good use.&#xD;&#xA;&#xD;&#xA;When I started my first game, I had zero game development experience, but I'd been doing enterprise/line-of-business app development for a few years.  My first game project was a turn-based strategy game, and architecturally speaking, it didn't look all that different from an enterprise application.  It used a client/server system, and communication happened through a duplex WCF service channel.  Most player operations were queued up as &quot;orders&quot; and dispatched to the server at the end of the turn.  All turn processing took place on the server, after which game universe updates were sent to each client.&#xD;&#xA;&#xD;&#xA;That first project gave let me inch my way into game development while starting me out in familiar territory.  As the project evolved, I learned to think more like a game developer and less like an enterprise app developer.  The end result worked pretty well, and it was a bit more impressive than Battleship or Tic-Tac-Toe :)." />
  <row Id="4780" PostHistoryTypeId="16" PostId="2462" RevisionGUID="42ff73e4-71ef-43ff-8488-a96e3a784657" CreationDate="2010-08-09T21:49:15.877" UserId="-1" />
  <row Id="4781" PostHistoryTypeId="2" PostId="2463" RevisionGUID="bf36928f-acaa-4c43-861c-7f4c512654e8" CreationDate="2010-08-09T23:48:26.817" UserId="349" Text="[This is the engine I am talking about.][1]&#xD;&#xA;&#xD;&#xA;It seems to get used in production or pre-production due to its sizable overhead, but has anyone tweaked it to run in real-time either in a test or in a game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.procedural.com/" />
  <row Id="4782" PostHistoryTypeId="1" PostId="2463" RevisionGUID="bf36928f-acaa-4c43-861c-7f4c512654e8" CreationDate="2010-08-09T23:48:26.817" UserId="349" Text="Has anyone used the Procedural CityEngine to generate levels in real-time?" />
  <row Id="4783" PostHistoryTypeId="3" PostId="2463" RevisionGUID="bf36928f-acaa-4c43-861c-7f4c512654e8" CreationDate="2010-08-09T23:48:26.817" UserId="349" Text="&lt;graphics&gt;&lt;procedural-generation&gt;&lt;levels&gt;&lt;procedural&gt;&lt;infinite&gt;" />
  <row Id="4784" PostHistoryTypeId="2" PostId="2464" RevisionGUID="06a58643-3204-40a4-ae70-fc70d9b57399" CreationDate="2010-08-10T00:34:43.587" UserId="962" Text="I am working on a game, and the xml files are getting to be a few megs, and the final game might have a hundred megs of uncompressed xml. If I zip the xml files up I can get something that is about 3 megabytes to be under 100kb which shows that compressing the files will yield good results. **How can I get the XML files compressed, and how would I uncompress them on the client's game?**&#xD;&#xA;&#xD;&#xA;I am planning to keep all my bullet patterns in one file, and planning to keep all the levels in one file. I am not to concerned about the files becoming undwieldy to edit, as I can add my own xml tags as categories to group data, and use a xml editor that can collapse tags. **Is there a better way to do this?**&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4785" PostHistoryTypeId="1" PostId="2464" RevisionGUID="06a58643-3204-40a4-ae70-fc70d9b57399" CreationDate="2010-08-10T00:34:43.587" UserId="962" Text="Best practices XML data files and xml compression for Flash Games?" />
  <row Id="4786" PostHistoryTypeId="3" PostId="2464" RevisionGUID="06a58643-3204-40a4-ae70-fc70d9b57399" CreationDate="2010-08-10T00:34:43.587" UserId="962" Text="&lt;actionscript-3&gt;" />
  <row Id="4787" PostHistoryTypeId="2" PostId="2465" RevisionGUID="cd4285cc-c6b7-4395-8640-75cd231ede27" CreationDate="2010-08-10T00:42:56.030" UserId="189" Text="The question of how to compress and decompress data/files with ActionScript is a great candidate for asking at [Stack Overflow][1]; it's not game dev specific.&#xD;&#xA;&#xD;&#xA;As for the question of is that a good idea, well you'll have to load, parse and keep the entire XML file in memory just to load one level. So I most certainly think **you should split the levels into one xml file per level** and then dynamically load and unload, so as not to waste valuable RAM.&#xD;&#xA;&#xD;&#xA;I'm not sure what bullet patterns are. But you might run into the same issues with those.&#xD;&#xA;&#xD;&#xA;However, I personally like XML, and I think it suits your usage very well. As you found, XML compression is extremely efficient (cancelling out the fact that it's human readable rather than binary) and I'm sure there are XML parsers in ActionScript for you to take advantage of.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stackoverflow.com/" />
  <row Id="4788" PostHistoryTypeId="2" PostId="2466" RevisionGUID="96c11fee-8e93-4e95-b4fb-063b34245e7d" CreationDate="2010-08-10T00:47:23.930" UserId="189" Text="Someone has, yes. I'm sure quite a sizeable number of someones.&#xD;&#xA;&#xD;&#xA;Not me though." />
  <row Id="4790" PostHistoryTypeId="2" PostId="2467" RevisionGUID="4569026a-8d38-46c3-bf07-10028663d04b" CreationDate="2010-08-10T01:06:42.980" UserId="189" Text="When you start a new game project, what do you do first? How do you begin? What gives you the best head start toward completing the project rather than burning out before it gets anywhere?&#xD;&#xA;&#xD;&#xA;&lt;sub&gt;Mods please help with the tags... I have no clue how to categorize this... :)&lt;/sub&gt;" />
  <row Id="4791" PostHistoryTypeId="1" PostId="2467" RevisionGUID="4569026a-8d38-46c3-bf07-10028663d04b" CreationDate="2010-08-10T01:06:42.980" UserId="189" Text="How do you start development of a game?" />
  <row Id="4792" PostHistoryTypeId="3" PostId="2467" RevisionGUID="4569026a-8d38-46c3-bf07-10028663d04b" CreationDate="2010-08-10T01:06:42.980" UserId="189" Text="&lt;language-agnostic&gt;" />
  <row Id="4793" PostHistoryTypeId="16" PostId="2467" RevisionGUID="4569026a-8d38-46c3-bf07-10028663d04b" CreationDate="2010-08-10T01:06:42.980" UserId="189" />
  <row Id="4794" PostHistoryTypeId="6" PostId="2467" RevisionGUID="872122ed-0719-41cb-a88c-b7a0e7624027" CreationDate="2010-08-10T01:09:26.343" UserId="857" Comment="tags" Text="&lt;language-agnostic&gt;&lt;planning&gt;" />
  <row Id="4795" PostHistoryTypeId="2" PostId="2468" RevisionGUID="01c5941e-b70d-4197-95a0-b19b82498c09" CreationDate="2010-08-10T01:10:48.897" UserId="1524" Text="I usually focus on the UI first.  It helps me envision how the game will play.  Also I tend to work on easy thinks first so I do not get bogged down in something." />
  <row Id="4796" PostHistoryTypeId="16" PostId="2468" RevisionGUID="01c5941e-b70d-4197-95a0-b19b82498c09" CreationDate="2010-08-10T01:10:48.897" UserId="-1" />
  <row Id="4797" PostHistoryTypeId="2" PostId="2469" RevisionGUID="24e0f8d6-74a0-4f47-91ea-2cdd44cfc572" CreationDate="2010-08-10T01:15:39.137" UserId="647" Text="I once worked on a project that was seeming to do everything right. They'd set up a website/bulletin board for everyone working on the project to collaborate. They'd presented everyone with specific timelines and goals and the game itself was a good concept. Despite this, it still only took about 2 months for people to start dropping off the map. After 3 months, development was finished and the game was never completed.&#xD;&#xA;&#xD;&#xA;So if you're working in a team then I think you need incentive. You need someone continually in contact with everyone making sure they're doing the work and reminding them *why* they want to keep doing it.&#xD;&#xA;&#xD;&#xA;If you're working alone; I'm not too sure. I'm terrible with artwork etc. so I mostly concentrate on the engine side of things. This is always enough to keep me interested :)&#xD;&#xA;&#xD;&#xA;Developers will always tell you not to move onto new areas until you've finished the one you're working on now. If you're trying to build a game by yourself then I don't think it's too heinous if you decide to break this rule. Working on something fresh is a good way to keep your excitement levels up!" />
  <row Id="4798" PostHistoryTypeId="16" PostId="2469" RevisionGUID="24e0f8d6-74a0-4f47-91ea-2cdd44cfc572" CreationDate="2010-08-10T01:15:39.137" UserId="-1" />
  <row Id="4799" PostHistoryTypeId="2" PostId="2470" RevisionGUID="aaf791d7-0635-426d-9da0-dbce26fffbbb" CreationDate="2010-08-10T01:20:49.357" UserId="1463" Text="Full Sail is accredited by a different accreditation board than traditional universities.  This means that credits earned at Full Sail will not transfer to traditional universities.  So, if you want to get a MS or PhD, you'll have to start from scratch." />
  <row Id="4800" PostHistoryTypeId="6" PostId="2467" RevisionGUID="cf40a46e-2ffb-4b63-839b-ebf6ef03b681" CreationDate="2010-08-10T01:21:12.553" UserId="321" Comment="I would only add a language-agnostic tag for algorithms" Text="&lt;planning&gt;" />
  <row Id="4817" PostHistoryTypeId="2" PostId="2472" RevisionGUID="fa88289d-5d2e-4fff-a458-8aa1e89d9101" CreationDate="2010-08-10T02:31:26.880" UserId="1179" Text="Hey all, still working to incorporate more physics simulation into my game (mentioned [HERE][1]). Now having the ball successfully and quite realistically bouncing a surface it hits, I wanted to make the ball spin off.&#xD;&#xA;&#xD;&#xA;Now this seemed simple enough, I would calculate the rotation speed for the ball every time-tick and then rotate the ball by that much degrees upon drawing.&#xD;&#xA;&#xD;&#xA;I knew that the speed of rotation would depend, upon impact, on:&#xD;&#xA;&#xD;&#xA; 1. Initial Speed of the ball hitting the surface (magnitude of ball velocity vector)&#xD;&#xA; 2. Friction co-efficient of ball &amp; surface (constants for simulation)&#xD;&#xA; 3. Angle between ball impact velocity vector and the surface normal (approximated by dot vector value of impact and exit velocity vectors. 1 meaning high spin, -1 meaning no spin, and everything else relatively in between)&#xD;&#xA;&#xD;&#xA;so, multiplying all of the above together, and making sure they were then transformed to the range 0-1, and multiplied by Max rotation speed, the ball seemed to respond in rotation speed as was expected. Except for one thing, it was always rotating clock-wise (because of positive values)&#xD;&#xA;&#xD;&#xA;So my question is this:&#xD;&#xA;&#xD;&#xA; 1. What do you think of my method? I know it is not the most accurate, but it is good enough for simple simulation. Any easier ones?&#xD;&#xA; 2. If this method is fine, then what am I missing? How should I know when ball should rotate clock/anti-clock wise?&#xD;&#xA;&#xD;&#xA;thanks for any comments&#xD;&#xA;&#xD;&#xA;  [1]: http://bit.ly/aDmnLE" />
  <row Id="4818" PostHistoryTypeId="1" PostId="2472" RevisionGUID="fa88289d-5d2e-4fff-a458-8aa1e89d9101" CreationDate="2010-08-10T02:31:26.880" UserId="1179" Text="How to calculate the rotation resulting from ball bounce" />
  <row Id="4819" PostHistoryTypeId="3" PostId="2472" RevisionGUID="fa88289d-5d2e-4fff-a458-8aa1e89d9101" CreationDate="2010-08-10T02:31:26.880" UserId="1179" Text="&lt;2d&gt;&lt;physics&gt;&lt;math&gt;&lt;2d-physics&gt;" />
  <row Id="4820" PostHistoryTypeId="2" PostId="2473" RevisionGUID="1da15521-9b00-4ade-9074-f2a45c5d2801" CreationDate="2010-08-10T02:38:24.553" UserId="919" Text="Start with a game concept, set the reason for the game, gameplay, look and feel of the game you want to make.&#xD;&#xA;&#xD;&#xA;From there you can start making a features and asset lists so the programmer and artist can at least start working on something, while the designer does some thinking or tweaking the game mechanics.&#xD;&#xA;&#xD;&#xA;This way you at least have some code and assets within a few days or weeks to boost moral and kick start your project.  " />
  <row Id="4821" PostHistoryTypeId="16" PostId="2473" RevisionGUID="1da15521-9b00-4ade-9074-f2a45c5d2801" CreationDate="2010-08-10T02:38:24.553" UserId="-1" />
  <row Id="4822" PostHistoryTypeId="2" PostId="2474" RevisionGUID="1955eb81-666e-4e0c-a988-7ab28ac1e11b" CreationDate="2010-08-10T05:12:36.483" UserId="144" Text="Your method is nice, because it's very simple. One thing you might need is dependency on previous spin on the ball, which you do not take into account. The spinning ball represents rotational energy, so a realistic simulation would probably have to conserve it along with the other energies.&#xD;&#xA;&#xD;&#xA;However, if the ball is not rotating upon impact, I can't imagine a situation in which it begins rotation against the direction of the incident angle. That is, &quot;clockwise&quot; or &quot;counterclockwise&quot; should be relative to whichever side of the normal the incident angle is.&#xD;&#xA;&#xD;&#xA;I think simply multiplying the result by the original x-direction vector (+1 if traveling left to right, -1 if traveling right to left) should do it." />
  <row Id="4823" PostHistoryTypeId="2" PostId="2475" RevisionGUID="6b15d142-654c-4435-8265-3fb0b7c1f536" CreationDate="2010-08-10T05:46:51.903" UserId="865" Text="If you're new to game development but have programming experience I can really recommend Unity (http://www.unity3d.com).&lt;br&gt;&#xD;&#xA;It'll allow you to get something going pretty easily and as you settle in you can do more and more yourself, many things can be done very easily in Unity, but you can also get closer to the metal if you so desire. They have tutorials varying from Racing games to platformers and an awesome community.&lt;br&gt;&#xD;&#xA;It'll allow you to get going without grasping all the concepts and as you go you'll grasp more and more, and will have a tool to help you toy with them. As far as learning curves go, it's hard to get a smoother one than with Unity while still having the ability to create pretty much any kind of game." />
  <row Id="4824" PostHistoryTypeId="2" PostId="2476" RevisionGUID="0d20a15b-2eea-48d8-a913-562c6c149e26" CreationDate="2010-08-10T06:00:31.567" UserId="865" Text="Ókay, this might sound stupid but you're not using the dot-product of the ball vector and the surface normal and just doing an arccos to calculate the angle are you? Because then the angle would be positive whether it was positive (up to 90 degrees) or negative (ditto) as cosine is symmetrical around 0.&lt;br&gt;&#xD;&#xA;If this *is* the case then instead of using the normal of the plane, use the plane direction itself and subtract 90 degrees from the angle, so 0 to 180 would become -90 to +90 degrees (or -half PI to +half PI if you're radially inclined)." />
  <row Id="4825" PostHistoryTypeId="2" PostId="2477" RevisionGUID="a1cadc34-7db7-4da0-8d29-abf9b20eb954" CreationDate="2010-08-10T06:25:17.760" UserId="1580" Text="I think that there is a good method called a game-state stack. I haven't seen any papers or articles about it but it's been spreading a little bit by voice. Essentially the topmost game-state on the stack is called first and gets to do whatever it wants to with input/rendering etc. The topmost game-state is the only one allowed to push or pop states. &#xD;&#xA;&#xD;&#xA;In my engine, game-states are actually just lists of game entities. I then have entities that work as menus. My menu-states either pause the game (by not updating the next item on the stack) but let the other state(s) push their models to the renderer so that my pause-menu (which doesn't cover the entire screen) still has the game rendering in the back. &#xD;&#xA;&#xD;&#xA;I hope that gives an idea of a little bit different system that isn't based on a state-machine." />
  <row Id="4830" PostHistoryTypeId="2" PostId="2479" RevisionGUID="301ead63-b713-4772-b12b-5675adb91f80" CreationDate="2010-08-10T07:02:36.637" UserId="1581" Text="&gt; Is it okay to have an intro state which draws a movie and listens for enter, and then a loading state which loops on the resource manager, and then the game state which does practically everything? Doesn't this seem sort of unbalanced to you, too? Am I missing something?&#xD;&#xA;&#xD;&#xA;This is perfectly fine. Or at least, it is an improvement over &quot;having a big ugly switch depending on the state the game it is&quot;.&#xD;&#xA;&#xD;&#xA;I'd like to point out that in most games you will already need a finite state machine of sorts in order to deal with simple entity AI. The typical example are enemies that are on Iddle state, Attacking or Dieing.&#xD;&#xA;&#xD;&#xA;If you have a sufficiently abstracted Finite State Machine, then you can re-use it for both the Game object and your AI; suddenly you are not &quot;investing&quot; lots of effort on the Game state - instead you are reusing code that you used anyway.&#xD;&#xA;&#xD;&#xA;Shameless self-plug ensues: I've implemented such a Finite State Machine on my Lua game library, [MiddleClass][1] (concretely, the add-on called MindState). [Here's how you do a Game State thing with it][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/kikito/middleclass&#xD;&#xA;  [2]: http://love2d.org/wiki/MindState#Another_Example:_Game_controller" />
  <row Id="4832" PostHistoryTypeId="2" PostId="2481" RevisionGUID="c28a58ab-043e-4e46-a177-bf1db37faef9" CreationDate="2010-08-10T07:16:38.070" UserId="20" Text="Wow. That's a lot of data.&#xD;&#xA;As Ricket said: Try to split the files into smaller chunks. Loading these huge files into memory will cause problems otherwise.&#xD;&#xA;&#xD;&#xA;As for compression of the data: The easiest way would be to simply enable *gzip* compression on the server. When using Apache, you would have to enable [mod_deflate][1] and configure it, so that it also includes your xml files into compression. That way, all your files will be gzipped before sending to the client and automatically extracted by the client-browser.&#xD;&#xA;&#xD;&#xA;If you can't modify the server settings (eg. enable *gzip* compression), then you could also zip your files manually and use ActionScript ([AS3 Zip Library][2]) to unzip the data.&#xD;&#xA;I used this on 3D data (Collada XML files) and it works a charm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html&#xD;&#xA;  [2]: http://nochump.com/blog/archives/15" />
  <row Id="4833" PostHistoryTypeId="6" PostId="2464" RevisionGUID="67932d5e-d4c9-4332-b286-5450ea4c8017" CreationDate="2010-08-10T07:17:32.497" UserId="20" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="4834" PostHistoryTypeId="2" PostId="2482" RevisionGUID="42652b29-600f-4112-862a-8b84681788a5" CreationDate="2010-08-10T07:58:30.467" UserId="1495" Text="What tools, patterns, or best practices would you recommend to implement the quest mechanics given these requirements:&#xD;&#xA;&#xD;&#xA;- simple 2D mmo(rpg)&#xD;&#xA;- all the game data, including quests, is stored in a relational database&#xD;&#xA;- any event in the game could trigger a new quest for players or advancement of existing quests&#xD;&#xA;- a quest can have an arbitrary number of conditions that must be met before the quest is available to players&#xD;&#xA;- a quest can consist of an arbitrary number of sub-quests / steps with arbitrary conditions&#xD;&#xA;- quests would range from simple:&#xD;&#xA;&#xD;&#xA;    talk to A - kill 5 B - talk to A - permanently increase health&#xD;&#xA;&#xD;&#xA;- to quite involved:&#xD;&#xA;&#xD;&#xA;    use item in area X - go to area Y - a bot will spawn - kill bot without taking more than 10% damage - bot drops item - pick up item - portal unlocks - deliver item to J behind the portal - receive gold and experience - allow to pass portal once more - lock portal for this player&#xD;&#xA;&#xD;&#xA;- level instances are a possibility (players can complete certain quests in teams or isolation which will spawn the level location just for those participants)&#xD;&#xA;- Quests should preferably be manageable using a world editor without scripting or programming knowledge&#xD;&#xA;- I assume C++ as the language of implementation&#xD;&#xA;&#xD;&#xA;I was thinking that if I could combine any chain of events and conditions we could model more complex and thus possibly more engaging quests.&#xD;&#xA;I experimented with rolling my own ECA (Events-Conditions-Actions) engine but that might be overkill. It has been particularly difficult to model generic conditions without using any sort of scripting.&#xD;&#xA;" />
  <row Id="4835" PostHistoryTypeId="1" PostId="2482" RevisionGUID="42652b29-600f-4112-862a-8b84681788a5" CreationDate="2010-08-10T07:58:30.467" UserId="1495" Text="Tips for implementing MMO quest mechanics?" />
  <row Id="4836" PostHistoryTypeId="3" PostId="2482" RevisionGUID="42652b29-600f-4112-862a-8b84681788a5" CreationDate="2010-08-10T07:58:30.467" UserId="1495" Text="&lt;architecture&gt;&lt;c++&gt;&lt;best-practices&gt;&lt;mmo&gt;&lt;quests&gt;" />
  <row Id="4837" PostHistoryTypeId="5" PostId="2482" RevisionGUID="fe350d54-e862-41cb-ae8f-519ddc482bba" CreationDate="2010-08-10T08:13:12.007" UserId="1495" Comment="Clarified scope of question" Text="What tools, patterns, or best practices would you recommend to implement the quest mechanics given below listed requirements?&#xD;&#xA;&#xD;&#xA;I am talking about software architecture (how generic should you be) and choices for object wiring, event subscription, and representation of conditions. Mentioning of tools / libraries you have successfully used are welcome.&#xD;&#xA;&#xD;&#xA;Requirements:&#xD;&#xA;&#xD;&#xA;- simple 2D mmo(rpg)&#xD;&#xA;- all the game data, including quests, is stored in a relational database&#xD;&#xA;- any event in the game could trigger a new quest for players or advancement of existing quests&#xD;&#xA;- a quest can have an arbitrary number of conditions that must be met before the quest is available to players&#xD;&#xA;- a quest can consist of an arbitrary number of sub-quests / steps with arbitrary conditions&#xD;&#xA;- quests would range from simple:&#xD;&#xA;&#xD;&#xA;    talk to A - kill 5 B - talk to A - permanently increase health&#xD;&#xA;&#xD;&#xA;- to quite involved:&#xD;&#xA;&#xD;&#xA;    use item in area X - go to area Y - a bot will spawn - kill bot without taking more than 10% damage - bot drops item - pick up item - portal unlocks - deliver item to J behind the portal - receive gold and experience - allow to pass portal once more - lock portal for this player&#xD;&#xA;&#xD;&#xA;- level instances are a possibility (players can complete certain quests in teams or isolation which will spawn the level location just for those participants)&#xD;&#xA;- Quests should preferably be manageable using a world editor without scripting or programming knowledge&#xD;&#xA;- I assume C++ as the language of implementation&#xD;&#xA;&#xD;&#xA;I was thinking that if I could combine any chain of events and conditions we could model more complex and thus possibly more engaging quests.&#xD;&#xA;I experimented with rolling my own ECA (Events-Conditions-Actions) engine but that might be overkill. It has been particularly difficult to model generic conditions without using any sort of scripting.&#xD;&#xA;" />
  <row Id="4838" PostHistoryTypeId="2" PostId="2483" RevisionGUID="701b3ece-d51e-483c-b421-9e9fc726fd44" CreationDate="2010-08-10T08:19:53.813" UserId="1580" Text="Prototype. Try to implement your game concept using some sort of quick iteration tool. Try python or just some easy-to-work-with open source api to get your &quot;game idea&quot; running. Try to simplify as much as possible, use balls instead of characters, get the vision down on some sort of visual representation. That way you can always look at it, discuss it, debate it and give feedback. Put a set timeline for each prototype (maybe 2 days? maybe a week tops?). That way you only get to do as much as you want to do in the prototype.&#xD;&#xA;&#xD;&#xA;Sometimes you might be able to plot your idea down on a little piece of paper if it's simple enough. Once you have your idea set, start planning to see what kind of systems and mechanics you need. Try to structure the time-lines for things and see if it's possible to commit to them. If you're a bunch of people that want to make a game together, you need to do this together. Do it over a beer, either in person or using a voice-chat program. Once you know what to do - everyone can start with what they're doing. Make sure that you have communication. Try to have a team-meeting with a frequent interval dependant on how much time you guys want to put down. &#xD;&#xA;&#xD;&#xA;If you are making your own game, remember that time is limited and you can't do everything pretty. Maybe spheres and cubes will be enough to get your graphics going if you're a programmer. Realize your limitations and work with them rather than against them.&#xD;&#xA;&#xD;&#xA;I hope these few tips help :)" />
  <row Id="4839" PostHistoryTypeId="16" PostId="2483" RevisionGUID="701b3ece-d51e-483c-b421-9e9fc726fd44" CreationDate="2010-08-10T08:19:53.813" UserId="-1" />
  <row Id="4840" PostHistoryTypeId="5" PostId="2482" RevisionGUID="9e559674-e2d0-4db6-8a57-58a46f7f62b7" CreationDate="2010-08-10T08:22:34.027" UserId="1495" Comment="Clarified position in regard to scripting" Text="What tools, patterns, or best practices would you recommend to implement the quest mechanics given below listed requirements?&#xD;&#xA;&#xD;&#xA;I am talking about software architecture (how generic should you be) and choices for object wiring, event subscription, and representation of conditions. Mentioning of tools / libraries you have successfully used are welcome.&#xD;&#xA;&#xD;&#xA;Requirements:&#xD;&#xA;&#xD;&#xA;- simple 2D mmo(rpg)&#xD;&#xA;- all the game data, including quests, is stored in a relational database&#xD;&#xA;- any event in the game could trigger a new quest for players or advancement of existing quests&#xD;&#xA;- a quest can have an arbitrary number of conditions that must be met before the quest is available to players&#xD;&#xA;- a quest can consist of an arbitrary number of sub-quests / steps with arbitrary conditions&#xD;&#xA;- quests would range from simple:&#xD;&#xA;&#xD;&#xA;    talk to A - kill 5 B - talk to A - permanently increase health&#xD;&#xA;&#xD;&#xA;- to quite involved:&#xD;&#xA;&#xD;&#xA;    use item in area X - go to area Y - a bot will spawn - kill bot without taking more than 10% damage - bot drops item - pick up item - portal unlocks - deliver item to J behind the portal - receive gold and experience - allow to pass portal once more - lock portal for this player&#xD;&#xA;&#xD;&#xA;- level instances are a possibility (players can complete certain quests in teams or isolation which will spawn the level location just for those participants)&#xD;&#xA;- Quests should preferably be manageable using a world editor without scripting or programming knowledge (Edit: not advocating against scripting in general though)&#xD;&#xA;- I assume C++ as the language of implementation&#xD;&#xA;&#xD;&#xA;I was thinking that if I could combine any chain of events and conditions we could model more complex and thus possibly more engaging quests.&#xD;&#xA;I experimented with rolling my own ECA (Events-Conditions-Actions) engine but that might be overkill. It has been particularly difficult to model generic conditions without using any sort of scripting.&#xD;&#xA;" />
  <row Id="4841" PostHistoryTypeId="5" PostId="2482" RevisionGUID="1803b4ca-e81c-4548-9d73-e7de6882ec8c" CreationDate="2010-08-10T08:27:53.407" UserId="1495" Comment="Since scripting was mentioned, updated to get some info on specific scripting setup" Text="What tools, patterns, or best practices would you recommend to implement the quest mechanics given below listed requirements?&#xD;&#xA;&#xD;&#xA;I am talking about software architecture (how generic should you be) and choices for object wiring, event subscription, and representation of conditions. Mentioning of tools / libraries you have successfully used are welcome.&#xD;&#xA;**Edit:** If you are using scripting, what setup do you recommend?&#xD;&#xA;&#xD;&#xA;Requirements:&#xD;&#xA;&#xD;&#xA;- simple 2D mmo(rpg)&#xD;&#xA;- all the game data, including quests, is stored in a relational database&#xD;&#xA;- any event in the game could trigger a new quest for players or advancement of existing quests&#xD;&#xA;- a quest can have an arbitrary number of conditions that must be met before the quest is available to players&#xD;&#xA;- a quest can consist of an arbitrary number of sub-quests / steps with arbitrary conditions&#xD;&#xA;- quests would range from simple:&#xD;&#xA;&#xD;&#xA;    talk to A - kill 5 B - talk to A - permanently increase health&#xD;&#xA;&#xD;&#xA;- to quite involved:&#xD;&#xA;&#xD;&#xA;    use item in area X - go to area Y - a bot will spawn - kill bot without taking more than 10% damage - bot drops item - pick up item - portal unlocks - deliver item to J behind the portal - receive gold and experience - allow to pass portal once more - lock portal for this player&#xD;&#xA;&#xD;&#xA;- level instances are a possibility (players can complete certain quests in teams or isolation which will spawn the level location just for those participants)&#xD;&#xA;- Quests should preferably be manageable using a world editor without scripting or programming knowledge (**Edit:** not advocating against scripting in general though)&#xD;&#xA;- I assume C++ as the language of implementation&#xD;&#xA;&#xD;&#xA;I was thinking that if I could combine any chain of events and conditions we could model more complex and thus possibly more engaging quests.&#xD;&#xA;I experimented with rolling my own ECA (Events-Conditions-Actions) engine but that might be overkill. It has been particularly difficult to model generic conditions without using any sort of scripting.&#xD;&#xA;" />
  <row Id="4842" PostHistoryTypeId="2" PostId="2484" RevisionGUID="3dc78d0b-2e02-4091-b985-656eba142ee3" CreationDate="2010-08-10T08:32:18.667" UserId="119" Text="Having tried every conceivable way of doing it, I have found if it's purely a 2D game, just use the screen drawing system, it will make your life much easier. Sin, Cos, and atan2 need to be used slightly differently, but this inconvenience is easily made up for by the simplicity of knowing which way up, down, clockwise and anti-clockwise are. I would also recommend working in pixels rather than meters for 2D games - it's much easier to think about on-screen distances, and the chances of you wanting to change the whole scale of your game are close to zero." />
  <row Id="4843" PostHistoryTypeId="2" PostId="2485" RevisionGUID="e758384b-ee21-4bfb-b81a-42a84559c8a4" CreationDate="2010-08-10T08:36:25.727" UserId="1251" Text="when multiple collisions  occur between balls..sometimes they stick together..mostly in cases of either of the balls having high velocity..can somebody explain pls" />
  <row Id="4844" PostHistoryTypeId="1" PostId="2485" RevisionGUID="e758384b-ee21-4bfb-b81a-42a84559c8a4" CreationDate="2010-08-10T08:36:25.727" UserId="1251" Text="two balls stick together in a pool game?" />
  <row Id="4845" PostHistoryTypeId="3" PostId="2485" RevisionGUID="e758384b-ee21-4bfb-b81a-42a84559c8a4" CreationDate="2010-08-10T08:36:25.727" UserId="1251" Text="&lt;collision-detection&gt;" />
  <row Id="4846" PostHistoryTypeId="5" PostId="2484" RevisionGUID="3cc1f447-9cc6-4221-89c2-b386d39d489a" CreationDate="2010-08-10T08:43:40.310" UserId="119" Comment="added 829 characters in body" Text="Having tried every conceivable way of doing it, I have found if it's purely a 2D game, just use the screen drawing system, it will make your life much easier. Sin, Cos, and atan2 need to be used slightly differently, but this inconvenience is easily made up for by the simplicity of knowing which way up, down, clockwise and anti-clockwise are. I would also recommend working in pixels rather than meters for 2D games - it's much easier to think about on-screen distances, and the chances of you wanting to change the whole scale of your game are close to zero.&#xD;&#xA;&#xD;&#xA;&quot;How do most games manage the two different 2D coordinate systems?&quot;&#xD;&#xA;&#xD;&#xA; - most 2D games I've seen the source for use the screen system, but each entity should know its world space, let your drawing manager convert this to a screen position. At this point you'll do whatever matrix transformation you need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;Are sprite locations stored as the center of the sprite or one of the corners?&quot;&#xD;&#xA;&#xD;&#xA; - If you work from the centre it makes rotation more straight forward, although you'll want to know the corners as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;Perhaps some guidance could be found in OpenGL's method...&quot;&#xD;&#xA;&#xD;&#xA; - 3D engines are a completely different case. As they have true cameras, the screen position can be wildly different from the world position. For a top-down game you'd be working in the X and Z axes, rather than the X and Y for one thing." />
  <row Id="4847" PostHistoryTypeId="2" PostId="2486" RevisionGUID="6ad44379-34fc-4a88-9c23-af17ffc2e7a3" CreationDate="2010-08-10T08:49:40.140" UserId="678" Text="First a warning, then some advice.&#xD;&#xA;&#xD;&#xA;Last time I needed to implement a system like this I was not using an engine originally intended for MMO-like applications. The quest system it shipped with was geared for single player endeavours, and could not be used.&#xD;&#xA;&#xD;&#xA;I ended up having to stuff scripts on all the objects involved with the quests more or less by hand, like this (pseudocode):&#xD;&#xA;&#xD;&#xA;    Lever004_on_activate() {&#xD;&#xA;        if isOnQuest(player, QUEST_0012) do_something();&#xD;&#xA;        if isOnQuest(player, QUEST_0015) do_something_else();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is a complete nightmare. There is no way to figure out how the quest works without scavenging all through the game. Do not do this.&#xD;&#xA;&#xD;&#xA;I would recommend creating a system where the entire quest (line) is represented as a finite state machine, with events to check for transitions and scripts to react to said transition. That makes it easy to keep track of where you are in a given quest (line) and keeps all quest state neatly encapsulated.&#xD;&#xA;&#xD;&#xA;If you want, you can make a library of scripts/script templates in your world editor for common occurrances (player talks to NPC, player kills mob, etc.)&#xD;&#xA;&#xD;&#xA;I would not worry too much about script performance, as long as you do not fire your event scripts too often. As a rule of thumb, scripts should fire at least an order of magnitude less than the &quot;core&quot; game logic (animation, physics etc). They should react to events, instead of firing periodically to check if a condition has been met." />
  <row Id="4848" PostHistoryTypeId="2" PostId="2487" RevisionGUID="ee2ea1db-93a8-4c3b-8c97-feeddb93f0fb" CreationDate="2010-08-10T09:06:53.810" UserId="469" Text="I have the following problem:&#xD;&#xA;&#xD;&#xA;My game supports multiple powers, that you can use when you want, or even mix them, I currently assigned them to the numbers on the top of the keyboard.&#xD;&#xA;&#xD;&#xA;After so much time playtesting, I ended developing high skills in playing my own game, and several of my new tactics involve mixing powers, but I found that I keep pressing incorrect buttons, or that I need to pause, look at the keyboard, and unpause, or I plainly press the wrong button (like, I try to press 5, but press 6 instead).&#xD;&#xA;&#xD;&#xA;I already expected this when I made the keybindings, but I don't found how to solve...&#xD;&#xA;&#xD;&#xA;How I fix that?" />
  <row Id="4849" PostHistoryTypeId="1" PostId="2487" RevisionGUID="ee2ea1db-93a8-4c3b-8c97-feeddb93f0fb" CreationDate="2010-08-10T09:06:53.810" UserId="469" Text="Ergonomics studies on choosing keys on a keyboard?" />
  <row Id="4850" PostHistoryTypeId="3" PostId="2487" RevisionGUID="ee2ea1db-93a8-4c3b-8c97-feeddb93f0fb" CreationDate="2010-08-10T09:06:53.810" UserId="469" Text="&lt;keyboard&gt;&lt;interface&gt;&lt;ui-design&gt;" />
  <row Id="4851" PostHistoryTypeId="2" PostId="2488" RevisionGUID="b209fde1-bd98-4fff-bb20-6ccf7cdc21ad" CreationDate="2010-08-10T09:24:14.417" UserId="276" Text="Allow players to map their own keybindings would be the simplest solution in my mind." />
  <row Id="4852" PostHistoryTypeId="2" PostId="2489" RevisionGUID="22c3ea92-2004-45a9-a598-d3842c36130c" CreationDate="2010-08-10T09:25:49.503" UserId="1553" Text="There's probably something on the balls causing them to stick together. Try cleaning them with a soft cloth or wet paper towel." />
  <row Id="4853" PostHistoryTypeId="2" PostId="2490" RevisionGUID="195b28ba-ca94-4976-946e-af8e0780612b" CreationDate="2010-08-10T09:31:52.360" UserId="1156" Text="Can we see some physics code? How are you handling it? What do you mean by 'multiple collisions'? We're going to struggle helping without more detail.  &#xD;&#xA;&#xD;&#xA;Only reason I can think of is that the physics is treating it as a collision rather than an explosion (i.e. they stick together instead of flying apart)." />
  <row Id="4855" PostHistoryTypeId="2" PostId="2491" RevisionGUID="6202ad79-6b40-4b05-95f8-d261892355ec" CreationDate="2010-08-10T09:38:05.840" UserId="192" Text="I'm playing with XNA for a game project of myself, I had previous exposure to OpenGL and worked a bit with Ogre, so I'm trying to get the same concepts working on XNA. &#xD;&#xA;&#xD;&#xA;Specifically I'm trying to add to XNA a scene manager to handle hierarchical transforms, frustum (maybe even occlusion) culling and transparency object sorting.&#xD;&#xA;&#xD;&#xA;My plan was to build a tree scene manager to handle hierarchical transforms and lighting, and then use an Octree for frustum culling and object sorting, but I didn't find any references on this (object sorting especially).&#xD;&#xA;&#xD;&#xA;Any ideas? Any other better data structures to accomplish this? Kd-trees maybe?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;Tommaso" />
  <row Id="4856" PostHistoryTypeId="1" PostId="2491" RevisionGUID="6202ad79-6b40-4b05-95f8-d261892355ec" CreationDate="2010-08-10T09:38:05.840" UserId="192" Text="What's a good data struture solution for a scene manager in XNA?" />
  <row Id="4857" PostHistoryTypeId="3" PostId="2491" RevisionGUID="6202ad79-6b40-4b05-95f8-d261892355ec" CreationDate="2010-08-10T09:38:05.840" UserId="192" Text="&lt;performance&gt;&lt;graphics-programming&gt;&lt;3d-engines&gt;" />
  <row Id="4858" PostHistoryTypeId="2" PostId="2492" RevisionGUID="f86f2e60-24db-4c47-aeef-3e494f5bb994" CreationDate="2010-08-10T09:42:00.813" UserId="1352" Text="Try adding quick-slots for the most used powers like in Diablo 2, Torchlight ,Titan Quest, World of Warcraft etc..&#xD;&#xA;&#xD;&#xA;Let the player assign whatever skills he wants to these hotkeys without having to go into your options menu.&#xD;&#xA;&#xD;&#xA;This adds to the excitement for the user, since he can try to create as effective hotkey combos as possible.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4859" PostHistoryTypeId="5" PostId="2491" RevisionGUID="518cb46b-86de-4c4b-a3f7-4449f569082a" CreationDate="2010-08-10T09:44:49.300" UserId="192" Comment="added 428 characters in body" Text="I'm playing with XNA for a game project of myself, I had previous exposure to OpenGL and worked a bit with Ogre, so I'm trying to get the same concepts working on XNA. &#xD;&#xA;&#xD;&#xA;Specifically I'm trying to add to XNA a scene manager to handle hierarchical transforms, frustum (maybe even occlusion) culling and transparency object sorting.&#xD;&#xA;&#xD;&#xA;My plan was to build a tree scene manager to handle hierarchical transforms and lighting, and then use an Octree for frustum culling and object sorting. The problem is how to do geometry sorting to support transparencies correctly. I know that sorting is very expensive if done on a per-polygon basis, so expensive that it is not even managed by Ogre.&#xD;&#xA;But still images from Ogre look right.&#xD;&#xA;&#xD;&#xA;Any ideas on how to do it and which data structures to use and their capabilities? I know people around is using:&#xD;&#xA;&#xD;&#xA; - Octrees&#xD;&#xA; - Kd-trees (someone on GameDev forum said that these are far better than Octrees)&#xD;&#xA; - BSP (which should handle per-polygon ordering but are very expensive)&#xD;&#xA; - BVH (but just for frustum and occlusion culling)&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;Tommaso" />
  <row Id="4860" PostHistoryTypeId="6" PostId="2467" RevisionGUID="d86f1683-b923-49c1-8c55-d46df97994c8" CreationDate="2010-08-10T09:45:11.673" UserId="1156" Comment="edited tags" Text="&lt;planning&gt;&lt;development&gt;" />
  <row Id="4861" PostHistoryTypeId="2" PostId="2493" RevisionGUID="ee3c1a70-8bc9-45ce-af82-e0f787cabe58" CreationDate="2010-08-10T09:48:03.230" UserId="1156" Text="I would say the really important thing is to always have something showing.  &#xD;&#xA;&#xD;&#xA;I mean, you could spend ages and ages on a data driven entity system, with deferred rendering and really high FPS, and all that. But chances are you'll get bored of having nothing to show, and give up. Whereas, if you first try getting a few models on the screen, move them around, and go from there, you'll have a much better chance.  &#xD;&#xA;&#xD;&#xA;I think the first is bottom-up development; working from a framework up to the actual content, and the second is top-down; working from getting some content and building up from there.  &#xD;&#xA;&#xD;&#xA;A little point, but something that really helps." />
  <row Id="4862" PostHistoryTypeId="16" PostId="2493" RevisionGUID="ee3c1a70-8bc9-45ce-af82-e0f787cabe58" CreationDate="2010-08-10T09:48:03.230" UserId="-1" />
  <row Id="4864" PostHistoryTypeId="6" PostId="2467" RevisionGUID="53e30c1d-ebee-4d59-a5a6-76c19969cccc" CreationDate="2010-08-10T09:51:13.713" UserId="1156" Comment="edited tags" Text="&lt;planning&gt;" />
  <row Id="4867" PostHistoryTypeId="5" PostId="2490" RevisionGUID="e93951e7-02bf-400e-ba12-6256e3e05a87" CreationDate="2010-08-10T10:01:42.490" UserId="1156" Comment="added 490 characters in body" Text="Can we see some physics code? How are you handling it? What do you mean by 'multiple collisions'? We're going to struggle helping without more detail.  &#xD;&#xA;&#xD;&#xA;Only reason I can think of is that the physics is treating it as a collision rather than an explosion (i.e. they stick together instead of flying apart).&#xD;&#xA;&#xD;&#xA;EDIT: You could've said that in the original post. I also found this post on gamedev.net: &#xD;&#xA;&#xD;&#xA;&gt; wen multiple collision occurs between 2 or more balls..they tend to overlap...or sometimes rotate around themselves....cant figur out wy this is happening...&#xD;&#xA;&#xD;&#xA;The problem is probably that your movement speeds mean the balls end up inside each other, and you do collision from there. A better option would be seeing if the objects intersect, and separating them before trying to move them." />
  <row Id="4868" PostHistoryTypeId="2" PostId="2495" RevisionGUID="13ef34d2-c836-47ee-82d4-290f01939d51" CreationDate="2010-08-10T10:04:20.307" UserId="1553" Text="In addition to the lighting thing that everyone mentioned, another major use of this is  **blur**. Horizontal and vertical are done in separate passes (so to get a 9x9 blur, only 18 pixels need to be sampled for each output pixel instead of 81). This is used for bloom/HDR, depth of field, glow, etc" />
  <row Id="4869" PostHistoryTypeId="6" PostId="2485" RevisionGUID="a0cc24ef-9996-4319-b811-1234bb23d47a" CreationDate="2010-08-10T10:08:36.637" UserId="1156" Comment="edited tags" Text="&lt;physics&gt;&lt;collision-detection&gt;" />
  <row Id="4870" PostHistoryTypeId="2" PostId="2496" RevisionGUID="6f036fba-cfb1-4f9c-841d-ff8f7558bb7b" CreationDate="2010-08-10T11:11:52.263" UserId="1251" Text="i have problems in circle circle collisions in a pool ball game..&#xD;&#xA;the game has problems like the circles (or balls) stick together ..i mean they overlap after collision... i tried changing the directions after collisions and it works well..bt when i arrange the balls real close and then the striker ball is shot at high velocity towards any of the balls..the balls start overlapping again..and also the striker ball slides over the hit balls...&#xD;&#xA;&#xD;&#xA;any help would be much appreciated.&#xD;&#xA;thanks in advance" />
  <row Id="4871" PostHistoryTypeId="1" PostId="2496" RevisionGUID="6f036fba-cfb1-4f9c-841d-ff8f7558bb7b" CreationDate="2010-08-10T11:11:52.263" UserId="1251" Text="doubts in circle circle collisions." />
  <row Id="4872" PostHistoryTypeId="3" PostId="2496" RevisionGUID="6f036fba-cfb1-4f9c-841d-ff8f7558bb7b" CreationDate="2010-08-10T11:11:52.263" UserId="1251" Text="&lt;collision-detection&gt;" />
  <row Id="4873" PostHistoryTypeId="5" PostId="2496" RevisionGUID="92a683f1-b64f-4afb-83c9-de85a00a8c69" CreationDate="2010-08-10T11:55:35.543" UserId="1251" Comment="added 50 characters in body" Text="i have problems in circle circle collisions in a pool ball game..&#xD;&#xA;the game has problems like the circles (or balls) stick together ..i mean they overlap after collision... i tried changing the directions after collisions and it works well..bt when i arrange the balls real close and then the striker ball is shot at high velocity towards any of the balls..the balls start overlapping again..and also the striker ball slides over the hit balls...&#xD;&#xA;&#xD;&#xA;http://img21.imageshack.us/i/18956982.jpg/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;any help would be much appreciated.&#xD;&#xA;thanks in advance&#xD;&#xA;" />
  <row Id="4874" PostHistoryTypeId="2" PostId="2497" RevisionGUID="cae29d2b-f4ec-4c58-9ccb-543ca6a5c305" CreationDate="2010-08-10T11:59:18.563" UserId="119" Text="So: top-down game, my enemies chase the player, when they get within a certain distance they stand still and fire. If they're all coming from the same direction they all end up standing in the same spot (i.e. standing &quot;within&quot; each other), as I'm not currently doing collision detection between enemies - they are free to pass over each other.&#xD;&#xA;&#xD;&#xA;What's a simple way around this? Either some form of collision detection or some ai? " />
  <row Id="4875" PostHistoryTypeId="1" PostId="2497" RevisionGUID="cae29d2b-f4ec-4c58-9ccb-543ca6a5c305" CreationDate="2010-08-10T11:59:18.563" UserId="119" Text="Is there a simple way to stop enemies standing in the same spot?" />
  <row Id="4876" PostHistoryTypeId="3" PostId="2497" RevisionGUID="cae29d2b-f4ec-4c58-9ccb-543ca6a5c305" CreationDate="2010-08-10T11:59:18.563" UserId="119" Text="&lt;ai&gt;&lt;collision-detection&gt;" />
  <row Id="4880" PostHistoryTypeId="2" PostId="2498" RevisionGUID="b8f13a18-4c32-4ef7-9ade-28c3463b3bea" CreationDate="2010-08-10T12:13:19.690" UserId="1358" Text="You could try selecting keys that are easy for the user to feel their way around.  Something with a unique formation like the arrow keys.  These are easy to locate and also from these it's easy to find Ctrl, Shift, Enter, Delete, End, Page Down and numeric 0.  Until someone tries to play your game on a notebook of course.&#xD;&#xA;&#xD;&#xA;Another possibility is the F and J keys on a QWERTY keyboard which usually have raised bumps on them.&#xD;&#xA;&#xD;&#xA;Also if there's an alternative (buttons that can be selected with the mouse) then it's not necessarily a disaster if the keyboard controls are tricky to get the hang of.  Look at Desktop Tower Defense for example.  You can play it with just the mouse, but advanced players can use all 10 digit keys, S, F, N and U.  It takes some getting used to but if the game is addictive and there is a simpler (if slower) alternative they can use early on then they probably won't mind." />
  <row Id="4881" PostHistoryTypeId="2" PostId="2499" RevisionGUID="803df6fe-198a-42b0-9a5a-fac7884a4314" CreationDate="2010-08-10T12:16:26.810" UserId="1584" Text="I know that's it's easy to make buttons that highlight when you move your mouse over them, but when it comes to sub-menus I'm kinda stuck. Anyone got some tips on the best way to have a main menu with sub-menus? (like Singleplayer -&gt; Load Save -&gt; Save 1-5? -&gt; Start game etc.)" />
  <row Id="4882" PostHistoryTypeId="1" PostId="2499" RevisionGUID="803df6fe-198a-42b0-9a5a-fac7884a4314" CreationDate="2010-08-10T12:16:26.810" UserId="1584" Text="What is the best way to make a main menu system?" />
  <row Id="4883" PostHistoryTypeId="3" PostId="2499" RevisionGUID="803df6fe-198a-42b0-9a5a-fac7884a4314" CreationDate="2010-08-10T12:16:26.810" UserId="1584" Text="&lt;gui&gt;" />
  <row Id="4884" PostHistoryTypeId="2" PostId="2500" RevisionGUID="f369fe5e-bca5-42a5-b4a0-341fd119067c" CreationDate="2010-08-10T12:17:20.210" UserId="1358" Text="As a lone developer I find it helps to implement sound early on.  I find it motivates me to work harder on the other features because even in the first few weeks (with graphics limited to brightly-colored polygons, flaky collision detection, missing controls etc.) the sound still gives it a feeling of being &quot;nearly there.&quot;" />
  <row Id="4885" PostHistoryTypeId="16" PostId="2500" RevisionGUID="f369fe5e-bca5-42a5-b4a0-341fd119067c" CreationDate="2010-08-10T12:17:20.210" UserId="-1" />
  <row Id="4886" PostHistoryTypeId="5" PostId="2492" RevisionGUID="e05232f1-20c8-46ac-891b-4259da3fa5f4" CreationDate="2010-08-10T12:17:55.203" UserId="1352" Comment="added 391 characters in body" Text="Try adding quick-slots for the most used powers like in Diablo 2, Torchlight ,Titan Quest, World of Warcraft etc..&#xD;&#xA;&#xD;&#xA;Let the player assign whatever skills he wants to these hotkeys without having to go into your options menu.&#xD;&#xA;&#xD;&#xA;This adds to the excitement for the user, since he can try to create as effective hotkey combos as possible.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;If it wasn't clear I meant for you to keep the number key mapping like you already have, but add the possibility to map which skill is where. &#xD;&#xA;&#xD;&#xA;You could also have be able to map Q and E to your bindings. &#xD;&#xA;&#xD;&#xA;Conan did this quite well with their combo combat. In conan you could hit 1,2,3,Q and E for directional attacks. These buttons are close enough for the player to hit them." />
  <row Id="4887" PostHistoryTypeId="2" PostId="2501" RevisionGUID="bef7a181-20cb-4d30-84ca-88c8d3baa192" CreationDate="2010-08-10T12:20:04.013" UserId="1091" Text="You don't need collision detection, but you will need to give your enemies a bit of intelligence, and have them avoid running in to each other. Collision detection without that will just make your enemies look stupid anyway - people avoid each other, they don't generally collide.&#xD;&#xA;&#xD;&#xA;Look up &quot;flocking&quot; for some simple behaviours.&#xD;&#xA;&#xD;&#xA;The basic idea is that things should head towards the player, but away from a close obstacle (each other, walls, that kind of thing).&#xD;&#xA;" />
  <row Id="4888" PostHistoryTypeId="2" PostId="2502" RevisionGUID="edd8360c-0dc7-4e71-9d4b-41958862c207" CreationDate="2010-08-10T12:22:08.143" UserId="1495" Text="What if you disallow moving through other units? It seems to me you will need it sooner or later.&#xD;&#xA;Whenever the current path is blocked by a unit, adjust the path to move around that." />
  <row Id="4889" PostHistoryTypeId="2" PostId="2503" RevisionGUID="ea564a32-47ff-4fe1-8f5d-80e9a0451f8d" CreationDate="2010-08-10T12:28:54.913" UserId="1358" Text="I am interested in answers for any mobile device but I am mainly considering the iPhone and devices that run Java.&#xD;&#xA;&#xD;&#xA;I am developing a game that relies heavily on a particle physics engine for core gameplay (not just animation effects) and have been developing/testing on a PC up to now with the intention of porting it to iPhone and/or Android.  The problem is that the particle physics engine (which I implemented myself) is still way too slow.  I can barely reach the target frame rate on a netbook and I am guessing that most phones will be worse (maybe not the iPhone but that will be expensive to port so I want to be confident that it will be worthwhile.)&#xD;&#xA;&#xD;&#xA;I've optimized the software implementation as far as I can and now I am wondering if it is possible to accelerate it in hardware.  The GPU looks like the obvious thing to try first.&#xD;&#xA;&#xD;&#xA;Has anyone researched this or do you know of an existing library that implements this?" />
  <row Id="4890" PostHistoryTypeId="1" PostId="2503" RevisionGUID="ea564a32-47ff-4fe1-8f5d-80e9a0451f8d" CreationDate="2010-08-10T12:28:54.913" UserId="1358" Text="Is it possible to use the GPU on a mobile device to accelerate a particle physics engine?" />
  <row Id="4891" PostHistoryTypeId="3" PostId="2503" RevisionGUID="ea564a32-47ff-4fe1-8f5d-80e9a0451f8d" CreationDate="2010-08-10T12:28:54.913" UserId="1358" Text="&lt;optimization&gt;&lt;physics-engine&gt;&lt;particles&gt;" />
  <row Id="4892" PostHistoryTypeId="2" PostId="2504" RevisionGUID="c3ac5951-1f0d-4916-b252-cea89662c3d6" CreationDate="2010-08-10T12:30:05.503" UserId="353" Text="This is usually done using a stack of game states. For example, each item listed above would be pushed onto a stack as follows:&#xD;&#xA;&#xD;&#xA;- Gameplay&#xD;&#xA;- Select Save&#xD;&#xA;- Single Player&#xD;&#xA;- Main Menu&#xD;&#xA;&#xD;&#xA;Where each state on the stack references its sub-items. When a button is clicked, it's corresponding state is pushed onto the stack, and becomes the top-most item which is drawn and interacted with. Usually, you would only draw that top state, unless there is some kind of transparency between layers, in which case you would draw from the bottom of the stack up until you draw the active state." />
  <row Id="4893" PostHistoryTypeId="6" PostId="2503" RevisionGUID="142413fb-0c7c-4a19-b19f-3c10c01a85a8" CreationDate="2010-08-10T12:31:05.910" UserId="353" Comment="edited tags" Text="&lt;optimization&gt;&lt;physics-engine&gt;&lt;particles&gt;&lt;gpu&gt;" />
  <row Id="4894" PostHistoryTypeId="2" PostId="2505" RevisionGUID="59ac35e5-bece-4f4d-8aae-a42f86526929" CreationDate="2010-08-10T12:32:12.600" UserId="189" Text="You should definitely implement it as either a [Finite-state machine][1] (FSM) or a [Stack][2] of states (sub-menus), depending on the exact requirements. Whichever sub-menu is the current one in the FSM or the top one on the stack, draws to the screen and handles input. And then when it detects the user clicks a button, it switches the FSM or pushes onto the stack the correct state to go to that next screen.&#xD;&#xA;&#xD;&#xA;In your case I'm thinking a Stack is best, but if you had a more complex menu system that jumped around menus arbitrarily then you'd want to use a FSM.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite-state_machine&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Stack_(data_structure)" />
  <row Id="4895" PostHistoryTypeId="2" PostId="2506" RevisionGUID="b84da2ed-3012-4663-951c-9b989322afb4" CreationDate="2010-08-10T12:32:28.277" UserId="818" Text="&quot;Best way&quot; is entirely subjective.  Look at the way other games do it and see if you find one that works well.  The one thing you absolutely need is a way for the user to hit Cancel and get back to the previous level.  You can give each menu object a reference back to the menu it was opened from, or implement it with a stack.&#xD;&#xA;&#xD;&#xA;Aside from that, it all depends on what your game feels like and what you want your menus to feel like.  Should each menu take up the entire screen, Final Fantasy style?  Should they branch off of each other like Windows submenus?  Should you go for something exotic like radial menus?  It's up to you, really." />
  <row Id="4896" PostHistoryTypeId="2" PostId="2507" RevisionGUID="57872dc8-0550-4af9-894b-0dc876b90191" CreationDate="2010-08-10T12:35:04.963" UserId="259" Text="There's some reference for steering and flocking behaviours at [Craig Reynold's website][1].  They're relatively simple to implement but can produce some lovely emergent behaviour.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="4897" PostHistoryTypeId="2" PostId="2508" RevisionGUID="8c127f15-174b-442c-86a5-47e2ebf54e81" CreationDate="2010-08-10T12:37:53.743" UserId="1312" Text="The question came randomly and i think it will really help to know from everyones experience.&#xD;&#xA;&#xD;&#xA;It all started from this article on gamedev.net http://www.gamedev.net/reference/programming/features/x64ErrCol/&#xD;&#xA;and then i saw a couple of more tweets embracing the 64-bit architectures.&#xD;&#xA;&#xD;&#xA;So to you what is todays target platform and what important advantages does it have?" />
  <row Id="4898" PostHistoryTypeId="1" PostId="2508" RevisionGUID="8c127f15-174b-442c-86a5-47e2ebf54e81" CreationDate="2010-08-10T12:37:53.743" UserId="1312" Text="What is todays target platform?" />
  <row Id="4899" PostHistoryTypeId="3" PostId="2508" RevisionGUID="8c127f15-174b-442c-86a5-47e2ebf54e81" CreationDate="2010-08-10T12:37:53.743" UserId="1312" Text="&lt;architecture&gt;" />
  <row Id="4900" PostHistoryTypeId="2" PostId="2509" RevisionGUID="4c98a7a9-b887-4b64-bc35-43ec2f39d99b" CreationDate="2010-08-10T12:38:49.450" UserId="259" Text="Can't believe no-one has added the ability to rebind keys!" />
  <row Id="4901" PostHistoryTypeId="16" PostId="2509" RevisionGUID="4c98a7a9-b887-4b64-bc35-43ec2f39d99b" CreationDate="2010-08-10T12:38:49.450" UserId="-1" />
  <row Id="4902" PostHistoryTypeId="16" PostId="2508" RevisionGUID="8c127f15-174b-442c-86a5-47e2ebf54e81" CreationDate="2010-08-10T12:40:19.510" UserId="1312" />
  <row Id="4903" PostHistoryTypeId="2" PostId="2510" RevisionGUID="4504c2c7-43ef-403e-817f-b564613759e7" CreationDate="2010-08-10T12:46:15.393" UserId="1091" Text="Your target platform should be whatever the people you want to play your game, own.&#xD;&#xA;&#xD;&#xA;There's no point targeting high-end PCs if you're making a game for the kinds of people that are happy with their ancient P4 running W2K.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4904" PostHistoryTypeId="16" PostId="2510" RevisionGUID="4504c2c7-43ef-403e-817f-b564613759e7" CreationDate="2010-08-10T12:46:15.393" UserId="-1" />
  <row Id="4905" PostHistoryTypeId="2" PostId="2511" RevisionGUID="f08162f6-3dda-4ee5-afc5-f5f726453cf9" CreationDate="2010-08-10T12:46:29.777" UserId="1352" Text="Check out [Valve's Hardware Survey][1]. It will tell you most of what you will need to know about the PC game market at least&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/hwsurvey/" />
  <row Id="4906" PostHistoryTypeId="16" PostId="2511" RevisionGUID="f08162f6-3dda-4ee5-afc5-f5f726453cf9" CreationDate="2010-08-10T12:46:29.777" UserId="-1" />
  <row Id="4907" PostHistoryTypeId="2" PostId="2512" RevisionGUID="6e6ede09-2f83-499b-97c7-c20f5ed1b849" CreationDate="2010-08-10T12:46:55.003" UserId="189" Text="The genre that the entire game industry seems to be most &quot;atwitter&quot; over is the **casual games** market. I think it's largely due to the success of games like Bejeweled and Peggle, combined with all the Facebook games and recognizing that the audience of Facebook games are people with a lot of time on their hands but very little desire to play a typical hard core or skills-based game.&#xD;&#xA;&#xD;&#xA;If you acknowledge that the casual games genre is the popular one today, then it follows that **&quot;today's target platform&quot; is the browser**. Flash is still extremely popular, Java applets not so much, and some Facebook games can be simple HTML.&#xD;&#xA;&#xD;&#xA;Browser games are typically the most compatible and require **zero installation for users** (given the user has the Flash plugin in the case of Flash games). They're not terribly difficult to write from a game developer's standpoint, since **you can often avoid the game loop** (especially, again, in the casual game genre) and simply respond to user input, like a traditional business app. And with upcoming technologies like [HTML5][1] and [WebGL][2], they can still have **decent graphics** and other capabilities.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/HTML5&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/WebGL" />
  <row Id="4908" PostHistoryTypeId="16" PostId="2512" RevisionGUID="6e6ede09-2f83-499b-97c7-c20f5ed1b849" CreationDate="2010-08-10T12:46:55.003" UserId="-1" />
  <row Id="4909" PostHistoryTypeId="2" PostId="2513" RevisionGUID="c0ebaf3b-cfde-48f7-a7ab-c49a023c68aa" CreationDate="2010-08-10T12:58:20.207" UserId="1580" Text="The answer highly depends on the amount of models that you are planning to use. I haven't really worked with these kind of things for XNA, but if you use AABB's for the tests and don't have too many models you might be good enough with a brute force test. Perhaps even throw it out on a thread. I'm not sure how/if there are any SSE/VMX optimizations that can be used for C# but if you manage to get the AABB's linearly in memory (so that you get no cache-misses for the CPU), you should be able to push through a high amount of tests in quite little time." />
  <row Id="4910" PostHistoryTypeId="2" PostId="2514" RevisionGUID="ef268742-70a6-4354-b310-65560c0383c4" CreationDate="2010-08-10T13:02:51.427" UserId="189" Text="If you mean drawing, you can certainly use OpenGL ES on both Android and iPhone, and OpenGL on PC (and if you also opt for DirectX you might get a bit better performance in Windows netbooks). It is just as functional for 2D acceleration as it is for 3D.&#xD;&#xA;&#xD;&#xA;But I presume you mean computation. While I cannot give any experience in using GPU for computation, here are a few things you might not have thought of when optimizing your application:&#xD;&#xA;&#xD;&#xA; - I assume you used a profiler, not just optimized by hand&#xD;&#xA; - Are you using fast math functions for sin/cos/tan/sqrt? For example, using 1 / [fast inverse square root][1] instead of the slow sqrt function.&#xD;&#xA; - Whenever possible you should use ints/shorts in place of floats, and really avoid doubles. From what I've learned, mobile processors typically have much slower floating point engines ([FPU][2]s). I don't know if that's true so much today.&#xD;&#xA;&#xD;&#xA;Sorry if you already did the above; just trying to think of anything that might help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fast_inverse_square_root&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Floating-point_unit" />
  <row Id="4912" PostHistoryTypeId="2" PostId="2516" RevisionGUID="db02c3e6-0be5-4da7-829f-152a1ae20483" CreationDate="2010-08-10T13:18:13.933" UserId="1352" Text="Any device supporting Open GL ES 2.0 should support programmable shaders. Iphone 3GS and above supports Open GL ES 2.0.&#xD;&#xA;&#xD;&#xA;Android phones only have Open GL ES 1.1 support as far as I know. &#xD;&#xA;&#xD;&#xA;With Open GL ES 1.1 you could use Vertex Buffer Objects with point sprites as a substitute to the proper vertex and fragment shaders you can make in Open GL ES 2.&#xD;&#xA;&#xD;&#xA;The PowerVR chip has some low level shading language for Open GL ES 1.1 if I recall correctly.&#xD;&#xA;&#xD;&#xA;Check out the examples bundled with the  [PowerVR SDK][1]. The 1.1 SDK has some particle effects sample. You should also read up on the differences in the API between 1.1 and 2.0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imgtec.com/powervr/insider/powervr-sdk.asp" />
  <row Id="4913" PostHistoryTypeId="2" PostId="2517" RevisionGUID="2ac04bc7-2b47-46db-aaf2-76c290f1fd57" CreationDate="2010-08-10T13:20:04.880" UserId="323" Text="I've never been quite sure why people are so obsessed with numbers and the very edges of the keyboard.&#xD;&#xA;&#xD;&#xA;Tell the players to put their left hand on ESDF. Now map commands to the rectangle bounded by 1, 5, Z, B. That's space for twenty commands, over half of which of which are very easily accessible, most of the remainder being only moderately more difficult.&#xD;&#xA;&#xD;&#xA;Be careful with internationalization - on German keyboards, for example, Z and Y are swapped compared to most Roman-language keyboards." />
  <row Id="4914" PostHistoryTypeId="2" PostId="2518" RevisionGUID="e1d23fe3-0be6-47ef-ab48-3f5dcc118d94" CreationDate="2010-08-10T13:21:58.323" UserId="323" Text="64-bit architectures are great if you have a game that can take advantage of 64-bit architectures. If your budget doesn't have at least eight figures you probably don't have that game.&#xD;&#xA;&#xD;&#xA;Target the system that makes the most sense for your game. That's probably a 32-bit build, and if it isn't, you likely already know it isn't." />
  <row Id="4915" PostHistoryTypeId="16" PostId="2518" RevisionGUID="e1d23fe3-0be6-47ef-ab48-3f5dcc118d94" CreationDate="2010-08-10T13:21:58.323" UserId="-1" />
  <row Id="4916" PostHistoryTypeId="2" PostId="2519" RevisionGUID="82b2c7fe-f719-49f7-ab6f-4281009edd2c" CreationDate="2010-08-10T13:25:34.243" UserId="741" Text="Octtrees (or even just quadtrees) and Kd-trees are both good general purpose spatial partitioning schemes, and if your build pipeline and/or engine is generating them, then you will find they come in useful in all sorts of different ways for optimising queries/iterations. They work by sub-dividing a fixed volume in a hierarchical way, which makes queries like raycasting into your object space very cheap to query for (great for collision checks).&#xD;&#xA;&#xD;&#xA;Bounding Volume Hierarchies work in a slightly different way (they aggregate the volumes of the objects in the tree rather than sub-dividing spaces), and are a simple way of trimming unnecessary things from being iterated over. But because BVH doesn't put any restrictions on how two sibling nodes are related, it's not such a good scheme for figuring out rendering order, or for arbitrary collision queries.&#xD;&#xA;&#xD;&#xA;BSP systems are good when you're subdividing the world based on individual polygons, but for larger objects a volume based approach makes more sense.&#xD;&#xA;&#xD;&#xA;Above all though, it's worth noting that none of these systems are perfect for determining render order for transparency, even the BSP approach. It will always be possible to construct geometry which breaks your algorithm, unless you are able to subdivide polygons on the fly. What you're most likely looking for is a 'best effort' solution, where geometry can be ordered correctly in the majority of the cases; and the art team can subdivide models for any of the cases which don't work (because the model/polygons are abnormally large, long, or self-intersecting). Smaller models/nodes are always much easier to sort 'correctly', but you pay for it in terms of iteration overhead.&#xD;&#xA;&#xD;&#xA;Kd-trees and Oct/quad-trees are both good general purpose solutions, for which a platform friendly implementation can be written, but in the end you are going to have to balance the depth/complexity of your spatial partitioning tree against the cost of iterating it, and the overhead per model (i.e. draw call cost). If you're targetting XNA, I'd recommend you keep it simple and high level, and if there is sorting problems with some of the content, then strongly consider changing the content before trying to improve your engine until it can cope with it; the returns diminish very quickly after the most basic render sorting is implemented." />
  <row Id="4917" PostHistoryTypeId="2" PostId="2520" RevisionGUID="cefd73e4-58d3-4abd-a3f0-3dbbb83621f6" CreationDate="2010-08-10T13:36:05.607" UserId="1352" Text="Did you remember to abort moving the ball if you predict a collision when moving to the new location?&#xD;&#xA;&#xD;&#xA;What you might be doing is that you're actually moving the ball first, then checking if it has collided.&#xD;&#xA;&#xD;&#xA;If you check for collision, then move the ball you should avoid these overlapping cases.&#xD;&#xA;&#xD;&#xA;Assuming you're checking for collision often enough. " />
  <row Id="4918" PostHistoryTypeId="2" PostId="2521" RevisionGUID="c3c1ac60-785d-4a7c-81c6-bf19f6bb9a61" CreationDate="2010-08-10T13:44:39.860" UserId="1156" Text="I've always found games using 1-8 work well. As long as you give some kind of display menu, something like a wheel of the hot keys showing each power and the ability to correct a mistake, it should be fine.  &#xD;&#xA;&#xD;&#xA;If you are worried, then allowing players to change them works too; if they can't get key mapping X to work, they could try and find something that works for them." />
  <row Id="4919" PostHistoryTypeId="2" PostId="2522" RevisionGUID="12804bc8-2cba-4e1d-9eaf-db76152da043" CreationDate="2010-08-10T13:46:13.227" UserId="1581" Text="You could inspire yourself on [flocking behaviours][1], such as [Boids][2].&#xD;&#xA;&#xD;&#xA;These tend to consist on 3-4 very simple rules that, applied correctly, result on very satisfying and &quot;complex-looking&quot; behaviours.&#xD;&#xA;&#xD;&#xA;In your case, you could try something like this:&#xD;&#xA;&#xD;&#xA; - Separation (minimun radii between enemies)&#xD;&#xA; - Cohesion (so they travel in groups)&#xD;&#xA; - Alignment (so they tend to move on the same direction)&#xD;&#xA; - Targetted (they should tend to move towards the player)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Flocking_%28behavior%29&#xD;&#xA;  [2]: http://www.red3d.com/cwr/boids/" />
  <row Id="4920" PostHistoryTypeId="2" PostId="2523" RevisionGUID="335557a0-2dd4-481f-b2b8-6529edd30c9c" CreationDate="2010-08-10T13:47:34.440" UserId="678" Text="Honestly, I would just use a physics library. It saves a lot of trouble in the long run, especially with respect to collision response." />
  <row Id="4922" PostHistoryTypeId="5" PostId="2516" RevisionGUID="1ff6a4d7-d7ac-43f3-8126-391184942099" CreationDate="2010-08-10T14:14:11.553" UserId="1352" Comment="added 448 characters in body" Text="Any device supporting Open GL ES 2.0 should support programmable shaders. Iphone 3GS and above supports Open GL ES 2.0.&#xD;&#xA;&#xD;&#xA;Android phones only have Open GL ES 1.1 support as far as I know. &#xD;&#xA;&#xD;&#xA;With Open GL ES 1.1 you could use Vertex Buffer Objects with point sprites as a substitute to the proper vertex and fragment shaders you can make in Open GL ES 2.&#xD;&#xA;&#xD;&#xA;The PowerVR chip has some low level shading language for Open GL ES 1.1 if I recall correctly.&#xD;&#xA;&#xD;&#xA;Check out the examples bundled with the  [PowerVR SDK][1]. The 1.1 SDK has some particle effects sample. You should also read up on the differences in the API between 1.1 and 2.0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: &#xD;&#xA;Gah, I realized I didn't answer the question at all.&#xD;&#xA;Ok, so here are some other tips not mentioned here:&#xD;&#xA;* Align the data you are doing computations on in such a way that you avoid cache misses.&#xD;&#xA;  This probably depends a bit on your target architecture, and you should read about it for each platform you're targeting. There are some general guidelines though on how to make stuff quicker. &#xD;&#xA;&#xD;&#xA;That is all I have time to write right now...&#xD;&#xA;  [1]: http://www.imgtec.com/powervr/insider/powervr-sdk.asp" />
  <row Id="4923" PostHistoryTypeId="2" PostId="2524" RevisionGUID="2fd010f1-d727-451e-a3d4-e72695bd4bd1" CreationDate="2010-08-10T14:37:21.217" UserId="1543" Text="I haven't used it, but my biggest reason for not using it is that there's a possibility that Apple could at any time remove all apps made with MonoTouch as it seems to go against the developer agreement:&#xD;&#xA;&#xD;&#xA;&gt; Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).&#xD;&#xA;&#xD;&#xA;Having said that though, Unity licenses MonoTouch and they seem to have a decent relationship with Apple." />
  <row Id="4924" PostHistoryTypeId="16" PostId="2524" RevisionGUID="2fd010f1-d727-451e-a3d4-e72695bd4bd1" CreationDate="2010-08-10T14:37:21.217" UserId="-1" />
  <row Id="4926" PostHistoryTypeId="2" PostId="2525" RevisionGUID="e67dd95a-992c-4475-9d54-635fc0b84d06" CreationDate="2010-08-10T15:23:40.550" UserId="1580" Text="Keep it simple. &#xD;&#xA;&#xD;&#xA;If you're not sure which way to go - just do whatever your game requires. Try to write small, basic libraries for stuff that you feel might be usable in the future. Look into data-driven software development. I suggest looking into component-based entity systems. Don't base the code around things that are unique such as a player. A player is just another object, just like anything else. An entity has components, perhaps a list of components. &#xD;&#xA;&#xD;&#xA;By writing small, contained libraries that interact with each other, you can go ahead and determine which ones to re-use for your next game. Personally I have things like a &quot;container&quot; library for data-storage types. I have a math-library for such things. There are several things like these that you can sort out and write as modules. Camera, effects, input, entity, movement, physics, rendering, resource-handling, threading, the list goes on. &#xD;&#xA;&#xD;&#xA;Writing small stand-alone components often increases readability and debugging possibilities of your code. &#xD;&#xA;&#xD;&#xA;Mike Acton and insomniac games (www.insomniacgames.com) have written a lot of topics and discussions regarding game development, in particular data-driven. Look them up and see what kind of information that is too complex and which you find interesting and understandable. They're great developers with a ton of experience." />
  <row Id="4927" PostHistoryTypeId="10" PostId="2496" RevisionGUID="87fbf65b-cf4a-42c8-bdfd-ff773a4b7799" CreationDate="2010-08-10T15:53:46.267" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4928" PostHistoryTypeId="5" PostId="2496" RevisionGUID="08211406-7d7c-478f-bb89-22adffa7f999" CreationDate="2010-08-10T15:53:46.453" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [two balls stick together in a pool game?](http://gamedev.stackexchange.com/questions/2485/two-balls-stick-together-in-a-pool-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;i have problems in circle circle collisions in a pool ball game..&#xD;&#xA;the game has problems like the circles (or balls) stick together ..i mean they overlap after collision... i tried changing the directions after collisions and it works well..bt when i arrange the balls real close and then the striker ball is shot at high velocity towards any of the balls..the balls start overlapping again..and also the striker ball slides over the hit balls...&#xD;&#xA;&#xD;&#xA;http://img21.imageshack.us/i/18956982.jpg/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;any help would be much appreciated.&#xD;&#xA;thanks in advance&#xD;&#xA;" />
  <row Id="4929" PostHistoryTypeId="10" PostId="2485" RevisionGUID="c343aa04-cf08-47e5-aeda-adbb8c6d9c35" CreationDate="2010-08-10T15:53:58.200" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:323,&quot;DisplayName&quot;:&quot;ZorbaTHut&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="4930" PostHistoryTypeId="2" PostId="2526" RevisionGUID="ff9e59ee-23c3-4971-9718-77f8e8b4c501" CreationDate="2010-08-10T15:59:05.877" UserId="1467" Text="NO CHECKPOINTS. Let me save anytime I want. I paid for the game and I have a life I need to get back to quickly sometimes." />
  <row Id="4931" PostHistoryTypeId="16" PostId="2526" RevisionGUID="ff9e59ee-23c3-4971-9718-77f8e8b4c501" CreationDate="2010-08-10T15:59:05.877" UserId="-1" />
  <row Id="4932" PostHistoryTypeId="5" PostId="2463" RevisionGUID="e8932a7c-af05-4e6b-aaf8-35dc309b6e1b" CreationDate="2010-08-10T16:00:42.913" UserId="349" Comment="added 154 characters in body; deleted 15 characters in body" Text="[This is the engine I am talking about.][1]&#xD;&#xA;&#xD;&#xA;It seems to get used in production or pre-production due to its sizable overhead, but has anyone tweaked it to run in real-time either in a test or in a game?&#xD;&#xA;&#xD;&#xA;**Edit:** Please include the person or group who did this, the game or test it was used in and a brief description of how it was done. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.procedural.com/" />
  <row Id="4933" PostHistoryTypeId="2" PostId="2527" RevisionGUID="850f056e-89b1-4491-9d00-e2b976c24ad5" CreationDate="2010-08-10T16:21:18.513" UserId="1156" Text="First of all, I think I roughly know how a scene graph works. Please correct me if I'm wrong.&#xD;&#xA;&#xD;&#xA;It is a tree based structure, with each branch/leaf being a node. It means you can better organise children, like tyres on a car or something. I want to use a simple version of it, which makes me think matrices, but the graphics API I'm using (SFML) doesn't allow them. I would use GL here, but the project has to be done in a reasonable time frame.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Instead, I only have the ability to set 'absolute' window coords by default. Without anything, it would be something like:  &#xD;&#xA;&lt;code&gt;&#xD;&#xA;carBody.position(10,10);  &#xD;&#xA;carWheel1.position(9.5f, 8.7f);//etc. I think that's a badly placed wheel. :P&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;How could I go about this? Have each object/renderable thing/entity be a node, obviously, but then how would I handle position changes? I would think passing down the branch, somehow.  &#xD;&#xA;&#xD;&#xA;Is there some kind of tree structure in the STL containers? Would I have to make my own?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;There's one other thing that's hit me. Is all of this overkill? All I really need is some way to control more of 'local' positioning, which this does, but this seems OTT for what I need. So it's sort of organization + positioning vs the sheer complexity for a 2D side scroller.&#xD;&#xA;" />
  <row Id="4934" PostHistoryTypeId="1" PostId="2527" RevisionGUID="850f056e-89b1-4491-9d00-e2b976c24ad5" CreationDate="2010-08-10T16:21:18.513" UserId="1156" Text="Simple scene graph in 2D, without matrices?" />
  <row Id="4935" PostHistoryTypeId="3" PostId="2527" RevisionGUID="850f056e-89b1-4491-9d00-e2b976c24ad5" CreationDate="2010-08-10T16:21:18.513" UserId="1156" Text="&lt;2d&gt;&lt;architecture&gt;&lt;scene-graph&gt;" />
  <row Id="4936" PostHistoryTypeId="2" PostId="2528" RevisionGUID="59bc8fe3-a114-4d0e-92d5-b59d25efaed8" CreationDate="2010-08-10T16:22:26.513" UserId="1505" Text="Software occlusion is often expensive, especially for smaller and older devices.&#xD;&#xA;&#xD;&#xA;Is frustum culling alone adequate on systems that can optimally display 10k triangles at most?&#xD;&#xA;&#xD;&#xA;If not, are there any relatively fast techniques for determining which objects (both moving and static) occlude others?" />
  <row Id="4937" PostHistoryTypeId="1" PostId="2528" RevisionGUID="59bc8fe3-a114-4d0e-92d5-b59d25efaed8" CreationDate="2010-08-10T16:22:26.513" UserId="1505" Text="Is Frustrum Culling alone enough for Consoles and Mobiles?" />
  <row Id="4938" PostHistoryTypeId="3" PostId="2528" RevisionGUID="59bc8fe3-a114-4d0e-92d5-b59d25efaed8" CreationDate="2010-08-10T16:22:26.513" UserId="1505" Text="&lt;3d&gt;&lt;optimization&gt;&lt;opengl-es&gt;&lt;scene-graph&gt;" />
  <row Id="4939" PostHistoryTypeId="6" PostId="2423" RevisionGUID="4f627ad1-4cca-4536-b5ee-e6cd21e1dbda" CreationDate="2010-08-10T16:29:30.050" UserId="1143" Comment="edited tags" Text="&lt;game-design&gt;&lt;language-agnostic&gt;" />
  <row Id="4940" PostHistoryTypeId="2" PostId="2529" RevisionGUID="1892a8cd-eeb6-4514-9742-a8dbd0ee30c0" CreationDate="2010-08-10T16:30:13.620" UserId="1091" Text="I would limit the amount you are doing at runtime. Precompute as much as possible - a PVS is a fairly standard techique for static geometry, and depending on your environment perhaps portals would work (these fairly easily cope with moving objects too).&#xD;&#xA;" />
  <row Id="4941" PostHistoryTypeId="5" PostId="2466" RevisionGUID="b07ad7d0-20d4-4e59-b58e-ec51f8453594" CreationDate="2010-08-10T17:09:05.910" UserId="189" Comment="deleted 45 characters in body; added 329 characters in body" Text="(sarcasm here)&#xD;&#xA;&#xD;&#xA;But in all seriousness, I think your best bet at this time would be to contact the company regarding this usage of their product. It has been my experience that companies are very willing to support their product, especially if you are a customer or potential customer, and you would get the best answers from the actual developers of the product." />
  <row Id="4942" PostHistoryTypeId="2" PostId="2530" RevisionGUID="14547ffe-a9ec-4010-a718-461939a21b25" CreationDate="2010-08-10T17:12:59.570" UserId="327" Text="Long time reader; first time asker:&#xD;&#xA;&#xD;&#xA;I've wanted to a part of the games industry for a while, but my resume is 100% all backend work.&#xD;&#xA;&#xD;&#xA;I'm a strong C++/C# developer, with no practical game development experience. My backend experience makes me a good candidate for backend work (since many games these days have service based aspects to them), but it's a hyper competitive field and I'm looking for ways to stand out.&#xD;&#xA;&#xD;&#xA;Since no one is going to just walk up to me and give me a job in the game industry, I decided to try my hat in writing my own games.&#xD;&#xA;&#xD;&#xA;I understand why C and C++ are the defacto languages in game development, but I really like the philosophy behind XNA. As I stated earlier, I'm adept at both C# and C++, but if I remember correctly, XNA works CLR compliant languages only (perhaps only just C#).&#xD;&#xA;&#xD;&#xA;Will focusing on game development using XNA and C# instead of C++, hurt my chances of landing a job in the games industry? VB has an unfair reputation of not being a real programming language, and VB programmers are caught in that stigma. Is this the case with using C# in a community that consists mostly of C++ developers?&#xD;&#xA;&#xD;&#xA;Or do the fundamentals of game development that can be learned from writing games, transcend language and technologies?" />
  <row Id="4943" PostHistoryTypeId="1" PostId="2530" RevisionGUID="14547ffe-a9ec-4010-a718-461939a21b25" CreationDate="2010-08-10T17:12:59.570" UserId="327" Text="Getting started in game development: Is XNA a good choice?" />
  <row Id="4944" PostHistoryTypeId="3" PostId="2530" RevisionGUID="14547ffe-a9ec-4010-a718-461939a21b25" CreationDate="2010-08-10T17:12:59.570" UserId="327" Text="&lt;xna&gt;&lt;career&gt;" />
  <row Id="4945" PostHistoryTypeId="2" PostId="2531" RevisionGUID="387ec2f3-daed-466b-9ea6-12111b8e5305" CreationDate="2010-08-10T17:15:43.340" UserId="865" Text="It really depends on the problem space! If you drawing overhead because you are sending stuff through the pipeline that is occluded, and that overhead is too much, or if you get too much overdraw eating fillrate then you obviously need to investigate other culling methods (or optimizing your render pipeline or shaders). Whether that solves the problem depends on your implementation of the new culler, and the win you gain by not drawing the stuff.&lt;br&gt;If overdraw is an issue, the culler can be a win because you shift performance from the GPU to the CPU. If your pipeline is the bottleneck then it's basically whether your pipeline is too expensive.&lt;br&gt;&#xD;&#xA;BSP and portals seem obvious culling algorithms that are relatively cheap and reduce overdraw, but they're generally for indoor scenes. ABT or octrees can also alleviate overdraw at a cheap price. Most of them only optimize for static geo though (although you can cull some dynamics away using the knowledge it provides.&lt;br&gt;&#xD;&#xA;As an aside: if shader cost is the issue, make sure you are drawing back to front." />
  <row Id="4946" PostHistoryTypeId="2" PostId="2532" RevisionGUID="9f88a3c0-651a-4151-a782-adef375135c2" CreationDate="2010-08-10T17:28:54.910" UserId="865" Text="If you need to support rotation or scale of parent nodes I would use matrices. Even if they're not supported you can implement them yourself. If not, you could just, upon rendering, add the local translation to the parent node's translation? Transfer the tree from the top, when you enter a child you add it's translation, when you go back to a parent you either subtract it again (bad, as you will get small errors adding up) or restore the previous translation (use a stack and push the current translation when you go into a child, and pop it when you return.&lt;br&gt;&#xD;&#xA;I don't know if there's a tree structure in STL, but you can just use any vector and store the index of the first child of a node, and the index of the next sibling of a node. You can then traverse the tree by starting at the root, and do&lt;br&gt;&#xD;&#xA;If (firstChild) push translation - visit child; pop translation&lt;br&gt;&#xD;&#xA;If (firstSibling) visit firstSibling&lt;br&gt;&#xD;&#xA;This will do a depth-first traversal.&#xD;&#xA;" />
  <row Id="4947" PostHistoryTypeId="2" PostId="2533" RevisionGUID="92159bc2-5191-483d-8bf0-d1a94b594414" CreationDate="2010-08-10T17:31:39.477" UserId="1156" Text="I do not think it would harm your chances. C# is becoming more popular, especially with XNA and SlimDX. I have used both C# and C++, and I must say I preferred XNA significantly. It was just cleaner to work with, but not so much that it felt like you weren't doing anything. &#xD;&#xA;&#xD;&#xA;For the career part, you would want to mention that you're used to XNA, though I don't think it would harm your chances. In fact, because of the way it is easier to use, your portfolio pieces may be better.&#xD;&#xA;&#xD;&#xA;And the concepts remain the same, just the syntax becomes different. Unless you're going for a low-level graphics job, the layout of what you have to do would be close to the same (not writing shader loading code or mesh caches, instead just loading it)." />
  <row Id="4948" PostHistoryTypeId="5" PostId="2474" RevisionGUID="e5b101e2-9202-4816-8120-05415ba044ed" CreationDate="2010-08-10T17:45:00.283" UserId="144" Comment="added a more robust way to calculate the direction of impact, using the incident and normal vectors." Text="Your method is nice, because it's very simple. One thing you might need is dependency on previous spin on the ball, which you do not take into account. The spinning ball represents rotational energy, so a realistic simulation would probably have to conserve it along with the other energies.&#xD;&#xA;&#xD;&#xA;However, if the ball is not rotating upon impact, I can't imagine a situation in which it begins rotation against the direction of the incident angle. That is, &quot;clockwise&quot; or &quot;counterclockwise&quot; should be relative to whichever side of the normal the incident angle is.&#xD;&#xA;&#xD;&#xA;I think simply multiplying the result by the original x-direction vector (+1 if traveling left to right, -1 if traveling right to left) should do it.&#xD;&#xA;&#xD;&#xA;_Edit:_ You can use the cross-product for this. `Incident cross normal` provides a vector in the Z direction only (if we are on the 2D x-y plane). Look at the z-element: if it is positive, the ball's approach should cause it to spin clockwise. If it is negative, the ball should spin counterclockwise." />
  <row Id="4949" PostHistoryTypeId="2" PostId="2534" RevisionGUID="7cad036e-5e77-41f6-a2f5-9e55d998eb64" CreationDate="2010-08-10T18:24:15.397" UserId="1320" Text="I've been told that:&#xD;&#xA;&#xD;&#xA;1.  The content is significantly more important than the tools used with some exceptions.&#xD;&#xA;&#xD;&#xA;2.  Although the base of most larger games is C++, it is because the tools are developed in C++.  If you are not coding the tools, it is possible you will not be programming in C++ anyway." />
  <row Id="4950" PostHistoryTypeId="2" PostId="2535" RevisionGUID="d8e0a211-926b-4e96-8576-fed619a99abd" CreationDate="2010-08-10T18:40:33.523" UserId="1597" Text="It is certainly possible to run a particle simulation on the GPU using vertex shaders, but you may be very limited in the kinds of behaviors that you can simulate, depending on the capabilities of the GPU. &#xD;&#xA;&#xD;&#xA;In order to run the entire simulation on the GPU you cannot make use of the results of previous frames. Which means that the current state for any particle must be computable from a combination of its initial state and any global variables (such as the time). The requirements of a physics engine would usually rule out this approach.&#xD;&#xA;&#xD;&#xA;One way you can get around this is to split the computation between the CPU and GPU. You could have the CPU update the particle positions from the physics simulation and use the GPU to calculate the vertex positions (do the billboarding math), color, etc. &#xD;&#xA;&#xD;&#xA;More advanced GPUs will allow a vertex shader to write into a vertex buffer, effectively closing the loop and allowing the results of the previous frame to become the input for the next frame. This opens up far more possibilities but is probably out of reach for most mobile GPUs (I don't remember what version of OGL you would require).&#xD;&#xA;&#xD;&#xA;In short, yes you can run particle simulations on a GPU, but the constraints imposed by the GPU capabilities might rule it out for your purposes." />
  <row Id="4953" PostHistoryTypeId="2" PostId="2536" RevisionGUID="6dc3dcf1-5ae0-4377-a632-3707041e02e2" CreationDate="2010-08-10T19:19:16.860" UserId="659" Text="Matrices are the 'right' way to approach this - but if you really can't use them, you can still create a hierarchy of nodes (as a tree) and do something along the lines of:&#xD;&#xA;&#xD;&#xA;    scale    = parent_scale    * local_scale&#xD;&#xA;    rotation = parent_rotation + local_rotation&#xD;&#xA;    pos      = parent_pos + rotate( parent_rotation, local_pos ) &#xD;&#xA;&#xD;&#xA;(Where positions are 2D vectors, rotations/scales are scalars, and 'rotate' rotates a position vector by a rotation angle)&#xD;&#xA;&#xD;&#xA;As you would with matrices, do a depth-first traversal of the hierarchy to update pos/rotation/scale of each node before rendering&#xD;&#xA;&#xD;&#xA;However, without matrices, I think you'll struggle to handle non-uniform scaling?" />
  <row Id="4954" PostHistoryTypeId="2" PostId="2537" RevisionGUID="de312392-4e71-402f-a1f3-1f643091b44f" CreationDate="2010-08-10T19:21:24.907" UserId="1024" Text="If you can make a fun game, and you are actually a talented engineer, you have nothing to worry about. No one is going to ding you for how you made your game. &#xD;&#xA;&#xD;&#xA;Games are not maintained in the way a lot of other software products are. Less throw away code is made than in the special effects industry, but we still can get away with a lot hacks for expedience. &#xD;&#xA;&#xD;&#xA;Just get the job done. At the end day that's what game development is about. " />
  <row Id="4955" PostHistoryTypeId="2" PostId="2538" RevisionGUID="3a691b0d-eb97-4951-adaf-a91e25411e5c" CreationDate="2010-08-10T19:27:14.377" UserId="1119" Text="So I have seen many 3D tutorials creating heightmaps and big landscapes but I am hoping there is something simple that i can throw together. If I was to do something doom/wolfenstien-like, do i just draw a cube and texture it? I guess my question is, How should i go about creating a very simple box-like room?" />
  <row Id="4956" PostHistoryTypeId="1" PostId="2538" RevisionGUID="3a691b0d-eb97-4951-adaf-a91e25411e5c" CreationDate="2010-08-10T19:27:14.377" UserId="1119" Text="How to create very simple doom like corridors in XNA?" />
  <row Id="4957" PostHistoryTypeId="3" PostId="2538" RevisionGUID="3a691b0d-eb97-4951-adaf-a91e25411e5c" CreationDate="2010-08-10T19:27:14.377" UserId="1119" Text="&lt;xna&gt;" />
  <row Id="4958" PostHistoryTypeId="5" PostId="2534" RevisionGUID="3938d30b-50aa-4b92-ba4b-22a18144dc3c" CreationDate="2010-08-10T19:31:54.320" UserId="1320" Comment="added 170 characters in body" Text="I've been told that:&#xD;&#xA;&#xD;&#xA;1.  The content is significantly more important than the tools used with some exceptions.&#xD;&#xA;&#xD;&#xA;2.  Although the base of most larger games is C++, it is because the tools are developed in C++.  If you are not coding the tools, it is possible you will not be programming in C++ anyway.&#xD;&#xA;&#xD;&#xA;Edit:  Also, having a completed demo project in anything (C#, etc.) is significantly better than having something incomplete in a more difficult language (C++, etc.)." />
  <row Id="4959" PostHistoryTypeId="2" PostId="2539" RevisionGUID="d192e6e3-05a3-436c-835e-2c2cda18cfe7" CreationDate="2010-08-10T19:31:59.903" UserId="1580" Text="I would say: Use neither, as long as you don't explicitly need instant-time feedback from the damage.&#xD;&#xA;&#xD;&#xA;The damage-taking entity/component/whatever should push the events to either a local event-queue or a system on an equal level that holds damage-events.&#xD;&#xA;&#xD;&#xA;There should then be an overlaying system with access to both entities that requests the events from entity a and passes it to entity b. By not creating a general event-system that anything can use from anywhere to pass an event to anything at any time, you create explicit data-flow which always makes code easier to debug, easier to measure performance, easier to understand and read and often leads to a more well-designed system in general." />
  <row Id="4960" PostHistoryTypeId="2" PostId="2540" RevisionGUID="33727d80-ae2f-4edb-a228-271ae0400f25" CreationDate="2010-08-10T19:49:32.203" UserId="1232" Text="One thing to consider is what is the worst-case for your game design. If you're going to be able to go to the top of the hill and see all objects unoccluded at the same time, then an occlusion system will in fact be *slowing* the performance of your game in that scenario.&#xD;&#xA;&#xD;&#xA;Another thing to consider is the consequences of not culling for your target platform and game:&#xD;&#xA;&#xD;&#xA;* If it is simply a drop in performance, then the performance drop may alrady be acceptable if you still have playable framerates. This is subjective and contingent upon your genre. A turn-based game can be acceptably played at lower frame rates than a fast-paced FPS might for example.&#xD;&#xA;* However, if a lack of culling means that you get polygon dropout then it's a different story. For example on the Nintendo DS, you can get visible artifacts where polygons simply disappear as you exceed your polygon budget. &#xD;&#xA;&#xD;&#xA;The latter may necessitate changes to your level design or the inclusion of some polygon reduction technology.&#xD;&#xA;&#xD;&#xA;I've had some success with these techniques for reducing polygons:&#xD;&#xA;&#xD;&#xA;* precomputed PVS with artist placed sectors for static geometry and with artist placed portals for culling dynamic objects, but then again our project had occlusion characteristics guaranteed by the game design (corridors and rooms with limited outdoor areas). If the camera is in a specific sector, then there will be a limited number of sectors visible from that sector. This means that only the static geometry and dynamic geometry in those sectors needs to be rendered. Of course this only works if your world geometry is amenable to natural occlusion characteristics.&#xD;&#xA;&#xD;&#xA;* A level of detail (LOD) system where we simply switched to an imposter/billboard for distant objects. In the cases that we did have lots of objects visible, this helped when some of those objects were guaranteed to be far enough from the camera to be rendered with a lower level of detail with no noticeable quality degradation. Imposters/LOD systems are a nice way to reduce polygon count if you don't hit the worst case where you have thousands of objects in the same room very close to the camera and all rendered at full detail.&#xD;&#xA;&#xD;&#xA;* Simply not drawing distant objects. The pop-out can be minimized by fading these objects out as they go further and then simply not drawing them when the alpha reaches zero. You can also tag these on a per object basis. eg. trees may be drawn at a further range than grass, but mountains would always be visible.&#xD;&#xA;" />
  <row Id="4961" PostHistoryTypeId="2" PostId="2541" RevisionGUID="971747f7-3c56-4eda-a00c-65ec3bd1ba1d" CreationDate="2010-08-10T19:57:11.840" UserId="1156" Text="Best option would involve asking the creators if it is possible or anyone has done it.  &#xD;&#xA;&#xD;&#xA;Why exactly would you want to run it in game? Doesn't seem to have much of a point. Even if you could run it in game, the amount of watering down would be huge. Thus rendering it mediocre or worse." />
  <row Id="4962" PostHistoryTypeId="2" PostId="2542" RevisionGUID="9dec443b-03cf-4bff-9d98-4ea07d9b48dc" CreationDate="2010-08-10T20:16:43.213" UserId="632" Text="It has been my experience that the same concepts used in XNA transfer back and forth between different libraries and languages. I've been able to effectively hop back and forth between different game technologies, and I started out with XNA.&#xD;&#xA;&#xD;&#xA;Working with C# and XNA helped keep me focused on one specific learning goal (&quot;What makes a game tick?&quot;) as opposed to mixing goals (&quot;How do I learn X and make a game at the same time?&quot;). I found that whenever I combined goals, I ended with pretty abysmal results. Starting in my comfort zone and leaning on XNA helped get things going, though." />
  <row Id="4963" PostHistoryTypeId="2" PostId="2543" RevisionGUID="663f0d71-3f91-4ea1-8c55-017631eba2f6" CreationDate="2010-08-10T20:19:45.763" UserId="1367" Text="Is there a standard name for the (fairly dumb) AI that most MMOs use where you 'agro' a monster/mob when you are within a certain radius of it, and the monster chases your character for a set amount of time or distance when you attempt to run away?" />
  <row Id="4964" PostHistoryTypeId="1" PostId="2543" RevisionGUID="663f0d71-3f91-4ea1-8c55-017631eba2f6" CreationDate="2010-08-10T20:19:45.763" UserId="1367" Text="What is the name of the AI/algorithm used by most MMOs for monsters or mobs?" />
  <row Id="4965" PostHistoryTypeId="3" PostId="2543" RevisionGUID="663f0d71-3f91-4ea1-8c55-017631eba2f6" CreationDate="2010-08-10T20:19:45.763" UserId="1367" Text="&lt;ai&gt;&lt;mmo&gt;" />
  <row Id="4966" PostHistoryTypeId="2" PostId="2544" RevisionGUID="54c0c7f3-e4c9-40b9-94b7-c2c957bf0718" CreationDate="2010-08-10T20:25:32.473" UserId="189" Text="Guild Wars just calls it &quot;[Aggro][1]&quot;, or at least that's what the algorithm's main variable is called, I suppose.&#xD;&#xA;&#xD;&#xA;I also found a neat take on it, in the form of a blog post: &quot;[Coma AI][2]&quot;. I like how the author relates AI complexity to coma levels. So by this definition, it could be called &quot;Coma level 4&quot;:&#xD;&#xA;&#xD;&#xA;&gt;Level 4 (Confused and agitated) is the standard AGGRO AI. You encounter any creature in Final Fantasy? It will attack you no matter who you are. Even games with advanced AI like Fallout 3 have them. Wandering through the Wastelands, People and Animals will attack me for no apparent reason. There is no way you can talk them out of it. I’m reminded of the epic “I want to heal the wolves” Escapist Article.&#xD;&#xA;&#xD;&#xA;But that's obviously not quite what you're looking for.&#xD;&#xA;&#xD;&#xA;Unfortunately I've never heard of any official name for it, but I'm not an AI expert by any means. All I know is that I most commonly see it spelled &quot;aggro&quot;, which is of course short for &quot;aggressive&quot;, which has two g's, not one like you spelled it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.guildwars.com/wiki/Aggro&#xD;&#xA;  [2]: http://gamedesignreviews.com/scrapbook/coma-ai/" />
  <row Id="4967" PostHistoryTypeId="2" PostId="2545" RevisionGUID="259482ff-b986-4124-b9a9-b76fa9cbe7f6" CreationDate="2010-08-10T20:26:15.873" UserId="632" Text="The topic you're asking about is more involved and broad than you might think. Drawing is only half of the problem at that point; chances are, if drawing a room is a challenge, then 3D collision detection is going to be a pretty big task. &#xD;&#xA;&#xD;&#xA;I'd highly recommend taking a look at the XNA starter kits and seeing what you can learn from there.&#xD;&#xA;&#xD;&#xA;The XNA Starter Kits are available at: http://creators.xna.com/en-US/education/starterkits/ &#xD;&#xA;&#xD;&#xA;To answer your original question, the XNA Creator's Club website has a code sample for drawing 3D primitives at: http://creators.xna.com/en-US/sample/primitives3D&#xD;&#xA;&#xD;&#xA;And this howto (for XNA 1.0, but with the right concepts) is fundamental to moving forward: http://msdn.microsoft.com/en-us/library/bb464051(XNAGameStudio.10).aspx&#xD;&#xA;&#xD;&#xA;" />
  <row Id="4968" PostHistoryTypeId="2" PostId="2546" RevisionGUID="c2e74aa9-6696-4a9e-be8d-1f26dea8f9fa" CreationDate="2010-08-10T20:26:39.680" UserId="1323" Text="I want objects to move between two physics simulations through a &quot;window&quot; and collide with those from both simulations in case they intersect the window plane.&#xD;&#xA;&#xD;&#xA;The coordinate systems of the simulations don't have the same origin and may have a different orientation. Wrapping a simulation to itself isn't necessary, but would be a plus.&#xD;&#xA;&#xD;&#xA;How do I connect the systems efficiently without cloning the individual objects?" />
  <row Id="4969" PostHistoryTypeId="1" PostId="2546" RevisionGUID="c2e74aa9-6696-4a9e-be8d-1f26dea8f9fa" CreationDate="2010-08-10T20:26:39.680" UserId="1323" Text="Connecting physics simulations with different coordinate-systems" />
  <row Id="4970" PostHistoryTypeId="3" PostId="2546" RevisionGUID="c2e74aa9-6696-4a9e-be8d-1f26dea8f9fa" CreationDate="2010-08-10T20:26:39.680" UserId="1323" Text="&lt;physics&gt;&lt;collision-detection&gt;" />
  <row Id="4971" PostHistoryTypeId="5" PostId="2543" RevisionGUID="aaaec533-95ef-43cc-89ee-73059aa47f4e" CreationDate="2010-08-10T20:41:33.543" UserId="1367" Comment="added 1 characters in body" Text="Is there a standard name for the (fairly dumb) AI that most MMOs use where you 'aggro' a monster/mob when you are within a certain radius of it, and the monster chases your character for a set amount of time or distance when you attempt to run away?" />
  <row Id="4972" PostHistoryTypeId="2" PostId="2547" RevisionGUID="1d715b6c-ecbc-4c1e-b44a-14760959055f" CreationDate="2010-08-10T20:53:15.090" UserId="395" Text="In addition to &quot;aggro&quot; modeling mentioned by Ricket, another common AI state is &quot;leashing&quot;. If an NPC gets too far from its spawn point it moves back there and rapidly heals to full. This is to prevent excessive kiting." />
  <row Id="4973" PostHistoryTypeId="5" PostId="2546" RevisionGUID="fa3731eb-3ba5-4294-afdc-637704bfa652" CreationDate="2010-08-10T21:48:16.980" UserId="1323" Comment="added 158 characters in body" Text="I want objects to move between two physics simulations through a &quot;window&quot; and collide with those from both simulations in case they intersect the window plane.&#xD;&#xA;&#xD;&#xA;The coordinate systems of the simulations don't have the same origin and may have a different orientation. Wrapping a simulation to itself isn't necessary, but would be a plus.&#xD;&#xA;&#xD;&#xA;How do I connect the systems efficiently without cloning the individual objects?&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;The calculations should be as accurate as possible, so objects don't get stuck if they cross the window at the same time from opposite sides." />
  <row Id="4974" PostHistoryTypeId="2" PostId="2548" RevisionGUID="c3644a7f-c989-4eee-801d-7dbb16fe4450" CreationDate="2010-08-10T22:05:39.797" UserId="769" Text="Symmetry is good for balance but I have two things to add:&#xD;&#xA;&#xD;&#xA;- If you make the different sides of map symmetrical, do this with things that matter for gameplay (such as size and passability of areas) but try to vary the different sides visually where possible (such as different textures and props, using mountains as blockade on one side but buildings on the other). This brings more variety in the map to make it more interesting.&#xD;&#xA;&#xD;&#xA;- Or to take it further, you could try making maps not symmetrical, while still maintaining the balance by compensating disadvantages with advantages. This is much harder though.&#xD;&#xA;&#xD;&#xA;Oh, and sometimes people want to play maps that are fun, and not necessarily balanced at all. It can be interesting to play against a friend &quot;with one hand strapped to your back&quot;." />
  <row Id="4975" PostHistoryTypeId="16" PostId="2548" RevisionGUID="c3644a7f-c989-4eee-801d-7dbb16fe4450" CreationDate="2010-08-10T22:05:39.797" UserId="-1" />
  <row Id="4976" PostHistoryTypeId="2" PostId="2549" RevisionGUID="dfcbd39a-a949-42d4-a031-73ca95561148" CreationDate="2010-08-10T22:11:54.940" UserId="865" Text="Okay - I do not know if this would work.&lt;br&gt;&#xD;&#xA;Based on the above info I would put triggers on the 'windows' so that I could detect when an object is going out of a world. Calculate distance traveled versus distance needed to travel and grab current velocity vector. Calculate timestep left based on where it hit the trigger and where it ended up this frame (outside the world, your world would need a virtual border to allow for this). At this point you know the speed and the timestep left, so you can reposition it on the border of the world it's about to enter, and reproject it. This would however require two physics updates in one frame.&lt;br&gt;&#xD;&#xA;Kinda sketchy, but maybe it makes sense somehow?" />
  <row Id="4977" PostHistoryTypeId="2" PostId="2550" RevisionGUID="9a9085ee-f27b-40d4-9f7e-0fa166f5a492" CreationDate="2010-08-10T22:14:27.027" UserId="769" Text="In a linear context, provide the player with challenge, but also rest. Gradually icrease the difficulty in an upward wave, something like&#xD;&#xA;&#xD;&#xA;    Very easy (1) -&gt; Normal (3) -&gt; Easy (2) -&gt; Hard (4) -&gt; Normal (3) -&gt; Very Hard (5) -&gt; Hard (4) -&gt; Extreme (6) -&gt; ..." />
  <row Id="4978" PostHistoryTypeId="16" PostId="2550" RevisionGUID="9a9085ee-f27b-40d4-9f7e-0fa166f5a492" CreationDate="2010-08-10T22:14:27.027" UserId="-1" />
  <row Id="4979" PostHistoryTypeId="2" PostId="2551" RevisionGUID="e7174dd2-8d9a-4487-a35c-a269583dcb3e" CreationDate="2010-08-10T22:17:09.520" UserId="769" Text="The problem also occurs in Java games so I suspect it's on the OS level or lower." />
  <row Id="4980" PostHistoryTypeId="2" PostId="2552" RevisionGUID="accb3aee-c85d-439d-a6e8-ac3ed3f2b055" CreationDate="2010-08-10T22:35:16.713" UserId="1206" Text="There's this cool project called Pseudoform, formerly known as 'Portalized', which handles physics simulations using portals in a groovie fashion:&#xD;&#xA;&#xD;&#xA;[Pseudoform][1]&#xD;&#xA;&#xD;&#xA;Check it out!&#xD;&#xA;&#xD;&#xA;Especially the videos - it's staggeringly cool.&#xD;&#xA;&#xD;&#xA;It's open source, so you get to see how they do it.&#xD;&#xA;&#xD;&#xA;I bet that's what you want. :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pseudoform.org/index.php?id=media" />
  <row Id="4981" PostHistoryTypeId="5" PostId="2549" RevisionGUID="dc6eac86-19e3-4dfd-9981-963f2b162239" CreationDate="2010-08-10T22:40:41.433" UserId="865" Comment="was a bit too haphazardly worded" Text="Okay - I do not know if this would work.&lt;br&gt;&#xD;&#xA;Based on the above info I would put triggers on the 'windows' so that I could detect when an object is going out of a world. Grab current velocity vector at time of collision. Calculate timestep left based on where it hit the trigger and where it ended up this frame (outside the world, your world would need a virtual border to allow for this). At this point you know the speed and the timestep left, so you can reposition it on the border of the world it's about to enter, and reproject the velocity. This would however require two physics updates in one frame, and there would be the bordercase of one object going from a to b while another goes from b to a at the same position - there would be no collision detected at all.&lt;br&gt;&#xD;&#xA;Kinda sketchy, but maybe it makes sense somehow?" />
  <row Id="4982" PostHistoryTypeId="2" PostId="2553" RevisionGUID="bbff1360-d91f-4d5a-96d9-672019cb43d6" CreationDate="2010-08-10T22:40:52.773" UserId="659" Text="Today's target platform is... all of them!  Or at least several of them.&#xD;&#xA;&#xD;&#xA;If you're making games commercially... you really want support as many platforms (and therefore as many potential customers) as possible/practical given the requirements of the game.&#xD;&#xA;" />
  <row Id="4983" PostHistoryTypeId="16" PostId="2553" RevisionGUID="bbff1360-d91f-4d5a-96d9-672019cb43d6" CreationDate="2010-08-10T22:40:52.773" UserId="-1" />
  <row Id="4984" PostHistoryTypeId="2" PostId="2554" RevisionGUID="86701ea6-61e1-4581-8860-2ca6c4641a8e" CreationDate="2010-08-10T23:11:23.417" UserId="249" Text="What you're asking about in general is dynamic avoidance between actors. You could take a look at velocity obstacles: http://gamma.cs.unc.edu/RVO/" />
  <row Id="4985" PostHistoryTypeId="2" PostId="2555" RevisionGUID="510b337c-d999-46b7-ab8e-62f30834325b" CreationDate="2010-08-10T23:14:18.560" UserId="488" Text="Coming up with an appropriate one-liner question was so hard I wrote the body before the header...&#xD;&#xA;&#xD;&#xA;So we're a team of 4 developers; two designers, two coders to put it simply (naturally we don't tie ourselves up with labels). We've come up with a great game design together, and we're prepared to spend a great bulk of our time making a prototype.&#xD;&#xA;&#xD;&#xA;Problem is, there's a major difference of opinion when it comes to sharing *potential* revenue made by the game.&#xD;&#xA;&#xD;&#xA;&lt;h3&gt;Investment = Share&lt;/h3&gt;&#xD;&#xA;&#xD;&#xA;Two of us would like to have everyone keep a rough log of hours spent. Converting that to a previously agreed upon per-hour salary, we could add it up with real money invested, and from that determine each developer's 'stake' in the game, i.e. their share.&#xD;&#xA;&#xD;&#xA;&lt;h3&gt;Equal Share&lt;/h3&gt;&#xD;&#xA;&#xD;&#xA;The other two do not agree with that, among other reasons because they think some pieces of work are worth more than others, like a really great idea for a feature. Because of such immeasurables, they think an equal share for all would be the easiest.&#xD;&#xA;&#xD;&#xA;Another argument said: (paraphrasing) &quot;logging hours would take away the fun. I'm serious about this project, but I want to work with it on hobbyist terms, not like a second job.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We need to formalize an agreement before development has gone too far, but how can we get past these core differences of opinion? Is this a common problem among first-time startups?" />
  <row Id="4986" PostHistoryTypeId="1" PostId="2555" RevisionGUID="510b337c-d999-46b7-ab8e-62f30834325b" CreationDate="2010-08-10T23:14:18.560" UserId="488" Text="Splitting profit - Equal share vs equity investment (work &amp; money spent = share)" />
  <row Id="4987" PostHistoryTypeId="3" PostId="2555" RevisionGUID="510b337c-d999-46b7-ab8e-62f30834325b" CreationDate="2010-08-10T23:14:18.560" UserId="488" Text="&lt;legal&gt;&lt;monetization&gt;&lt;planning&gt;&lt;project-management&gt;&lt;publishing&gt;" />
  <row Id="4988" PostHistoryTypeId="2" PostId="2556" RevisionGUID="ba26636b-c004-4714-b80f-39115525e636" CreationDate="2010-08-10T23:16:46.963" UserId="249" Text="There's xAItment (commercial), which is a fairly new middleware suite providing everything from pathfinding to behavior / decision making systems. Haven't tried it myself, so I can't say if it's any good.&#xD;&#xA;&#xD;&#xA;http://www.xaitment.com/" />
  <row Id="4989" PostHistoryTypeId="16" PostId="2556" RevisionGUID="ba26636b-c004-4714-b80f-39115525e636" CreationDate="2010-08-10T23:16:46.963" UserId="-1" />
  <row Id="4990" PostHistoryTypeId="2" PostId="2557" RevisionGUID="e7ed3f5e-cfd9-491f-8469-9bf850d66c1b" CreationDate="2010-08-10T23:20:36.287" UserId="249" Text="Kynapse (commercial) is from what I understand the number 1 market share for pathfinding libraries. It's the oldest of the commercial AI middlewares around.&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=11390544&#xD;&#xA;&#xD;&#xA;My experience with previous versions were that they were bulky with a terrible API and not very nicely implemented. We had tons of problems with it.&#xD;&#xA;&#xD;&#xA;Now in their new version it seems they've changed data formats and some other radical changes, so maybe they've fixed the problems now.&#xD;&#xA;&#xD;&#xA;It's also a commercial product and fairly expensive." />
  <row Id="4991" PostHistoryTypeId="16" PostId="2557" RevisionGUID="e7ed3f5e-cfd9-491f-8469-9bf850d66c1b" CreationDate="2010-08-10T23:20:36.287" UserId="-1" />
  <row Id="4992" PostHistoryTypeId="2" PostId="2558" RevisionGUID="20c8904a-5d91-47b6-b3ff-c939aa580e17" CreationDate="2010-08-10T23:24:23.770" UserId="249" Text="NavPower (commercial)&#xD;&#xA;&#xD;&#xA;http://www.babelflux.com/&#xD;&#xA;&#xD;&#xA;My experience with it has been positive, although I haven't shipped any title with it yet. Most others I've talked to about it have had a similarly positive experience with it. API is easy to understand.&#xD;&#xA;&#xD;&#xA;Fairly simplistic API, which can be a limitation." />
  <row Id="4993" PostHistoryTypeId="16" PostId="2558" RevisionGUID="20c8904a-5d91-47b6-b3ff-c939aa580e17" CreationDate="2010-08-10T23:24:23.770" UserId="-1" />
  <row Id="4994" PostHistoryTypeId="2" PostId="2559" RevisionGUID="1956dfbc-af8d-40e5-935f-9fe54e4264e4" CreationDate="2010-08-10T23:29:05.527" UserId="1134" Text="You may want to check out **[collaborative diffusion][1]** (great animations here) or some other kind of [**antiobject** pattern][2] for movement.  While the diffusion algorithm in and of itself may not stop enemies from crossing over, you can add additional constraints to make it unlikely or impossible.&#xD;&#xA;&#xD;&#xA;  [1]: http://scalablegamedesign.cs.colorado.edu/wiki/Collaborative_Diffusion&#xD;&#xA;  [2]: https://secure.wikimedia.org/wikipedia/en/wiki/Antiobjects" />
  <row Id="4995" PostHistoryTypeId="2" PostId="2560" RevisionGUID="d5bb2ff0-967e-45a7-9baf-1d1e376f16db" CreationDate="2010-08-10T23:30:31.780" UserId="666" Text="I would say it is a very interesting problem to have. &#xD;&#xA;&#xD;&#xA;If all of you are already in the project, then I guess doing Equal Share would be the best thing to do. **You cannot quantify productivity in hours** and I know sometimes i spend a couple of hours thinking and then implement something complex in just a few hours(which is imposible without the thinking part, which seems imposible to measure).&#xD;&#xA;&#xD;&#xA;That being said, if someone is putting money in or out, then its a different thing. If someone is **investing**, they probably want more shares, if someone is planning on charging money early on(which is fine, I mean maybe he wants to quit hes day job?) then he would get way less equity.&#xD;&#xA;&#xD;&#xA;The most important thing would be to agree that you are **all the team making the game**, and that you **will put everything you can into the project**, if you all agree with that, why not go to the **equal share option**?&#xD;&#xA; " />
  <row Id="4996" PostHistoryTypeId="2" PostId="2561" RevisionGUID="f9b66628-a8f7-4c90-af0d-dbc89c0b13f5" CreationDate="2010-08-10T23:46:02.283" UserId="1479" Text="In our gamedev-studio we have a system of ten grades, you earn them for like working on the concept or spending time to code etc.&#xD;&#xA;&#xD;&#xA;In our conferences everyone gives his self-assessment about his work done and then those will be discussed.&#xD;&#xA;&#xD;&#xA;For just being active and doing some little concept stuff is a grade of 2 and coding the whole month is like an 8, so together they add up to a 10.(Just an example)&#xD;&#xA;&#xD;&#xA;The money now is shared very simple: All points of all members are added up so they are 100% and therefore everyone of the team gets the money he worked for. Fair and simple." />
  <row Id="4997" PostHistoryTypeId="2" PostId="2562" RevisionGUID="ea595be1-9fde-4cc0-9c3e-31916d77ad9a" CreationDate="2010-08-10T23:50:21.120" UserId="865" Text="I prefer equality, because if it's time based then someone who works twice as efficient or is madly talented will be punished for doing twice the work per hour.&lt;br&gt;&#xD;&#xA;On the other hand, people might argue that someone talented puts in as much sweat as the less talented so the hours are of equal value.&lt;br&gt;&#xD;&#xA;I do know that not being based on equality might demotivate people, whereas you'd hope that everyone will be as motivated as can be.&lt;br&gt; You don't want the wrong sentiments to influence a process that is hard enough to pull off as is.&lt;br&gt;&#xD;&#xA;Besides, the coders can't draw, and the designers likely can't program so you're equally indispensable. As between the coders and the designers, if people feel the others don't work hard enough you have the wrong team. Being a company is hard, especially if you're friends. I've done it for 5 years (same setup) and we were on equal shares. Sometimes the designers had to work harder, sometimes the coders. Generally we all put in 80 hour weeks anyhow." />
  <row Id="4998" PostHistoryTypeId="4" PostId="2528" RevisionGUID="954824df-238f-4c29-8a2e-fbbf34e567c0" CreationDate="2010-08-10T23:51:09.123" UserId="1505" Comment="edited title" Text="Is Frustrum Culling by itself enough for Consoles and Mobiles?" />
  <row Id="4999" PostHistoryTypeId="2" PostId="2563" RevisionGUID="89b5dc8f-725e-410b-9c3f-a533bd208226" CreationDate="2010-08-11T00:36:50.607" UserId="389" Text="I'm trying to figure out a good formula for determining a hit when the player attacks an enemy in a Roguelike. I'd like to come up with something simplistic but, still true to the way it's done in D&amp;D or popular Roguelikes like AngBand or NetHack.&#xD;&#xA;&#xD;&#xA;What I have so far is adding the differences between player and enemy attributes, along with a random integer:&#xD;&#xA;&#xD;&#xA;    if ((player.dex - enemy.dex) + (player.speed - enemy.speed) +&#xD;&#xA;        (player.luck - enemy.luck) + random_integer_below_6()) &gt;= 10) {&#xD;&#xA;        hit(enemy);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This makes for unnatural gameplay: the player never misses weak enemies and vice versa for strong ones. Does anyone know of a guide to attribute based combat used in turn based games etc? Should I (and can I) copy the D&amp;D rules verbatim?&#xD;&#xA;" />
  <row Id="5000" PostHistoryTypeId="1" PostId="2563" RevisionGUID="89b5dc8f-725e-410b-9c3f-a533bd208226" CreationDate="2010-08-11T00:36:50.607" UserId="389" Text="Attributes for calculating a hit in a turn based game or Rogulike" />
  <row Id="5001" PostHistoryTypeId="3" PostId="2563" RevisionGUID="89b5dc8f-725e-410b-9c3f-a533bd208226" CreationDate="2010-08-11T00:36:50.607" UserId="389" Text="&lt;roguelikes&gt;&lt;turn-based&gt;" />
  <row Id="5002" PostHistoryTypeId="2" PostId="2564" RevisionGUID="64fd2d90-9ec6-448c-aeea-685405e3f6bf" CreationDate="2010-08-11T00:43:53.447" UserId="1504" Text="I have a file containing mesh data whose blocks seem to start with DWORDS like:&#xD;&#xA;&#xD;&#xA;0x1 0x1 0x3100026f 0x1 0x30000112&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;0x1 0x1 0x310007b2 0x1 0x30000112&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;0x10000006 0x3 0x310001f6 0x310001f6 0x310001f6&#xD;&#xA;&#xD;&#xA;They don't look like .x binaries. Any other ideas?" />
  <row Id="5003" PostHistoryTypeId="1" PostId="2564" RevisionGUID="64fd2d90-9ec6-448c-aeea-685405e3f6bf" CreationDate="2010-08-11T00:43:53.447" UserId="1504" Text="Identifying mesh format from initial bytes" />
  <row Id="5004" PostHistoryTypeId="3" PostId="2564" RevisionGUID="64fd2d90-9ec6-448c-aeea-685405e3f6bf" CreationDate="2010-08-11T00:43:53.447" UserId="1504" Text="&lt;3d-meshes&gt;" />
  <row Id="5005" PostHistoryTypeId="2" PostId="2565" RevisionGUID="606c2276-9703-4cc5-9870-7d6cb6694b42" CreationDate="2010-08-11T01:26:25.883" UserId="1524" Text="A lot of games use a five percent change of a hit regardless of all factors in addition to the normal hit formula." />
  <row Id="5006" PostHistoryTypeId="2" PostId="2566" RevisionGUID="eb1e5c40-b0ed-49e6-a232-ba2c9daefce0" CreationDate="2010-08-11T02:15:02.427" UserId="395" Text="You might want to add critical hits (usually can't miss, bonus damage) and critical misses (flat chance to miss no matter what, possibly dazes the player)." />
  <row Id="5007" PostHistoryTypeId="2" PostId="2567" RevisionGUID="d8683628-86e1-4679-9f5e-92c6c3227b1d" CreationDate="2010-08-11T02:41:48.590" UserId="953" Text="I'd figure out what you want the &quot;guaranteed hit&quot; and &quot;guaranteed miss&quot; chances to be (i.e. the chances for a kitten to hit a dragon and a dragon to miss a kitten).  Store your random result, and before applying power differences, mark a hit if it's within those bounds.  That will prevent the 100% hit/miss chance problem... although there's another option for always providing a chance of a hit, detailed below.&#xD;&#xA;&#xD;&#xA;D&amp;D is a &quot;flat&quot; system, where probability is evenly distributed across the possible roll results.  Other systems use a more curved distribution, usually achieved by rolling multiple dice and adding them.  It's easy enough to create a curve like this (rand() + rand())/2 comes to mind).&#xD;&#xA;&#xD;&#xA;Another possibility is &quot;exploding dice.&quot;  In systems like Shadowrun and Savage Worlds, rolling the maximum possible die result lets you reroll that die and add the new result.  In your game, you'd test to see if your random result was above a certain threshold, and if so, roll again.  If you let dice explode indefinitely, then even the lowliest goblin has a chance to hit a god, and you don't need an explicit &quot;guaranteed hit&quot; mechanic.&#xD;&#xA;&#xD;&#xA;So one possible approach with a curved roll, guaranteed chance of missing, and exploding dice would be something like:&#xD;&#xA;&#xD;&#xA;    function getRoll():Number&#xD;&#xA;    {&#xD;&#xA;      var result:Number = (rand() + rand()) * 3; //Curved result from 0 to 6&#xD;&#xA;      if(result &gt; 5.75) result += getRoll(); //Explode over a certain threshold, recursively&#xD;&#xA;      return result;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function attackHits():Boolean&#xD;&#xA;    {&#xD;&#xA;      var roll:Number = getRoll();&#xD;&#xA;      if(roll &lt; 0.25) return false; //Guaranteed chance of miss&#xD;&#xA;      else return ((player.dex - enemy.dex) + (player.speed - enemy.speed) +&#xD;&#xA;        (player.luck - enemy.luck) + roll) &gt;= 10; //Your original test.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course, that's untested and unbalanced; you'd want to adjust all those magic numbers until they felt right.&#xD;&#xA;&#xD;&#xA;As for copying rules verbatim, there are legal and ethical issues with that.  You're fine pulling inspiration from D&amp;D and other tabletop games, though; that's how they all got designed in the first place.  You don't need to show the player exactly how the rules work, either, and you may find that using a smooth floating point dice curve leads to a better feel than restricting yourself to the integer constraints of physical dice." />
  <row Id="5008" PostHistoryTypeId="2" PostId="2568" RevisionGUID="7f5d2f8a-c420-428d-86d9-0d622ca1789f" CreationDate="2010-08-11T05:09:01.360" UserId="865" Text="I'd guess you have to use the regular win32 func to get the active window handle and compare it to your own. GLUT's focus functions don't behave as expected in Windows as they're based on move over to focus.&lt;br&gt;&#xD;&#xA;http://stackoverflow.com/questions/466354/how-can-i-tell-if-a-window-has-focus-win32-api&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Edit: Wait...I assumed Windows. Not sure that's a correct assumption." />
  <row Id="5009" PostHistoryTypeId="2" PostId="2569" RevisionGUID="8d5949e7-d7cc-46c8-af9e-ef1fdf04036e" CreationDate="2010-08-11T05:31:34.740" UserId="865" Text="Although not for an MMO I think the general mechanics would apply:&lt;br&gt;&#xD;&#xA;http://webdocs.cs.ualberta.ca/~script/&lt;br&gt;&#xD;&#xA;It uses scripts, but in a behind the scenes kinda way." />
  <row Id="5010" PostHistoryTypeId="2" PostId="2570" RevisionGUID="fb4da75b-6d1d-4548-ad5f-327b3e233dce" CreationDate="2010-08-11T07:23:23.373" UserId="395" Text="Our system basically involves running a an expression (custom mini scripting language but tcl/lua/python would work just as well, or make something yourself) each server frame for each mission step. This is for &quot;personal missions&quot; that are tied to a specific player. Each substep is then part of an FSM (finite state machine) for the mission itself (which might just be a substep of another mission). There are also &quot;map missions&quot; which have a single FSM and are tied to the map instead of a player (think WAR's public quests), but the substeps work basically the same. &#xD;&#xA;&#xD;&#xA;What these expressions actually look at are events broadcast by the system like &quot;NPC died&quot; or &quot;interaction complete&quot;. This means you can somewhat decouple the various parts, the gameplay systems just send out events as needed, which the mission scripts just listen to events and don't worry about where they come from. If you also layer on that you can have the mission FSMs interact with the world state (only show this contact when in mission state X) you can get a lot of power out of the system." />
  <row Id="5011" PostHistoryTypeId="2" PostId="2571" RevisionGUID="0c864b32-1f88-4fa3-9539-4b5f37107f88" CreationDate="2010-08-11T07:54:08.290" UserId="1183" Text="What game engine does Meaa Jump use?" />
  <row Id="5012" PostHistoryTypeId="1" PostId="2571" RevisionGUID="0c864b32-1f88-4fa3-9539-4b5f37107f88" CreationDate="2010-08-11T07:54:08.290" UserId="1183" Text="What game engine does Meaa Jump use?" />
  <row Id="5013" PostHistoryTypeId="3" PostId="2571" RevisionGUID="0c864b32-1f88-4fa3-9539-4b5f37107f88" CreationDate="2010-08-11T07:54:08.290" UserId="1183" Text="&lt;engine&gt;&lt;3d-engines&gt;" />
  <row Id="5014" PostHistoryTypeId="5" PostId="2571" RevisionGUID="afb27070-bc32-4807-a5e5-babd03113369" CreationDate="2010-08-11T08:09:57.193" UserId="1183" Comment="added 68 characters in body" Text="What game engine does the iphone game Mega Jump use? Im guessing it's unity 3d but it could be anything." />
  <row Id="5015" PostHistoryTypeId="2" PostId="2572" RevisionGUID="95cf9a1d-8c62-4995-9a8c-a9aa56c6da26" CreationDate="2010-08-11T08:25:17.343" UserId="1610" Text="Autosave. I hate playing through the first chapters of a game just to realize that I have to do the beginning tutorial all over again when I die." />
  <row Id="5016" PostHistoryTypeId="16" PostId="2572" RevisionGUID="95cf9a1d-8c62-4995-9a8c-a9aa56c6da26" CreationDate="2010-08-11T08:25:17.343" UserId="-1" />
  <row Id="5017" PostHistoryTypeId="2" PostId="2573" RevisionGUID="69446fe3-2da0-4276-81ed-038ff45cb274" CreationDate="2010-08-11T08:46:59.117" UserId="1588" Text="Cocos2D, judging by their development blog.&#xD;&#xA;&#xD;&#xA;http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/" />
  <row Id="5018" PostHistoryTypeId="2" PostId="2574" RevisionGUID="7d9f5da6-c87a-4af2-bbae-f132ff5b1a66" CreationDate="2010-08-11T09:22:20.373" UserId="804" Text="Switching to JSON rather than XML would also immediately save a lot of space. It's also a lot more readable, as a side effect.&#xD;&#xA;&#xD;&#xA;Here's an AS3 library that includes JSON in/out: http://github.com/mikechambers/as3corelib" />
  <row Id="5019" PostHistoryTypeId="6" PostId="2571" RevisionGUID="7578b4c3-12ee-4226-ae1c-33500025405a" CreationDate="2010-08-11T09:42:36.310" UserId="1156" Comment="edited tags" Text="&lt;engine&gt;&lt;iphone&gt;&lt;3d-engines&gt;" />
  <row Id="5020" PostHistoryTypeId="2" PostId="2575" RevisionGUID="1ac79def-5b06-4f6a-8f1b-0bdd80415f2a" CreationDate="2010-08-11T09:44:53.800" UserId="1494" Text="I think everyone is on the ball with the name &quot;aggro,&quot; however it's probably emergent behavior (side-effects from simple rule systems, e.g. [Boids][1]). I would think it would most probably be achieved using a weighted decision tree. To give you an example of why this system would have interesting results consider this:&#xD;&#xA;&#xD;&#xA;        Start&#xD;&#xA;          |&#xD;&#xA;    Player threat (based on player level, distance, DPS, etc.)&#xD;&#xA;    Very High  High   Low&#xD;&#xA;    |          |      |&#xD;&#xA;    Flee       Fight  Pass&#xD;&#xA;&#xD;&#xA;This decision would then be executed for each player and mob sub-group (Cartesian product) in the vicinity. The entire mob would then follow a decision tree like:&#xD;&#xA;&#xD;&#xA;        Start&#xD;&#xA;          |&#xD;&#xA;    Combined results&#xD;&#xA;    More flee  More fight                    All pass&#xD;&#xA;    |          |                             |&#xD;&#xA;    Flee       Attack own fight result;      Attack individuals&#xD;&#xA;               otherwise, attack the player&#xD;&#xA;               with most fight results.&#xD;&#xA;&#xD;&#xA; - The mob sees an approaching group of&#xD;&#xA;   players; and starts moving toward&#xD;&#xA;   them to attack (threat is low because&#xD;&#xA;   distance is high). When they get&#xD;&#xA;   closer the threat becomes too much&#xD;&#xA;   and they run (i.e. they realize they&#xD;&#xA;   have bitten off more than they can&#xD;&#xA;   chew).&#xD;&#xA; - If the players level are low, say one&#xD;&#xA;   player was given a very high level&#xD;&#xA;   item and the mob proceeds to attack&#xD;&#xA;   them. Suddenly one player outputs&#xD;&#xA;   crazy DPS and the mob flees. &#xD;&#xA; - If one player is more&#xD;&#xA;   threatening *most* of the mob will&#xD;&#xA;   focus on him (thus your classical&#xD;&#xA;   aggro mechanics).&#xD;&#xA; - A team of players takes on a group&#xD;&#xA;   that they shouldn't be. The mob&#xD;&#xA;   focuses on individual players to&#xD;&#xA;   give them a fighting chance; and&#xD;&#xA;   if they can't defeat the mob a&#xD;&#xA;   few might be able to run themselves.&#xD;&#xA;&#xD;&#xA;The point here is that a very elegant, but predictable, system was built up using two very simple decision trees.&#xD;&#xA;&#xD;&#xA;**side note**: Some of the results required mean that re-evaluation should not occur for a specific time limit (e.g. Flee should be applied as a 20s 'Scared' debuff); otherwise you would get *very* strange outcomes (e.g. infinite flee-attack feedback).&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Boids &quot;Biods&quot;" />
  <row Id="5021" PostHistoryTypeId="2" PostId="2576" RevisionGUID="e5d54ca9-d212-44f7-b10b-72b29dca5d9b" CreationDate="2010-08-11T09:45:43.270" UserId="1034" Text="Is there a book or Website concerning the history of console-style RPGs like Dragon Quest, Final Fantasy etc., similar to the series on [The History of Computer Role-Playing Games][1] by Matt Barton or his book Dungeons &amp; Desktops?&#xD;&#xA;&#xD;&#xA;I would like to broaden my view of this style of game and maybe try some definitive classics of the genre I have not heard of before.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/features/20070223a/barton_01.shtml" />
  <row Id="5022" PostHistoryTypeId="1" PostId="2576" RevisionGUID="e5d54ca9-d212-44f7-b10b-72b29dca5d9b" CreationDate="2010-08-11T09:45:43.270" UserId="1034" Text="History of console-style RPGs" />
  <row Id="5023" PostHistoryTypeId="3" PostId="2576" RevisionGUID="e5d54ca9-d212-44f7-b10b-72b29dca5d9b" CreationDate="2010-08-11T09:45:43.270" UserId="1034" Text="&lt;game-design&gt;&lt;books&gt;&lt;console&gt;" />
  <row Id="5024" PostHistoryTypeId="2" PostId="2577" RevisionGUID="37f359fb-4a4d-42ee-b974-a61e96ecf1ac" CreationDate="2010-08-11T10:05:58.453" UserId="1617" Text="my name's Matthias Buehler, i am content manager at procedural, inc.&#xD;&#xA;&#xD;&#xA;to get an idea about the current way to implement the cityengine in a game pipeline, check out the following show case:&#xD;&#xA;http://www.procedural.com/showcase/showcases/destroyed-city.html&#xD;&#xA;&#xD;&#xA;this is a game which was created from scratch by a few students. the guy responsible for the level layout used the cityengine to create all building geometries. the assets of course were of course modeled in an other 3d application.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;you guys are referring to a methodology to create models (in different LODs) directly from within a game (&quot;realtime&quot;), (without having to start the CE and export the models) by directly calling the cga shape grammar engine. this is currently not possible, but we have been asked about this many times already.&#xD;&#xA;some of our current development goes in that direction, but we do not mainly focus on the game market.&#xD;&#xA;&#xD;&#xA;the workflow so far is - of course - to create a pool of meshes in different LODs and load them in dynamically (proximity based, ..), as it's done in almost all games today.&#xD;&#xA;" />
  <row Id="5025" PostHistoryTypeId="5" PostId="2577" RevisionGUID="ccc0126b-48b6-4ded-951a-f5d447fb7dd4" CreationDate="2010-08-11T10:16:21.053" UserId="1617" Comment="added 1 characters in body" Text="my name's Matthias Buehler, i am content manager at procedural, inc.&#xD;&#xA;&#xD;&#xA;to get an idea about the current way to implement the cityengine in a game pipeline, check out the following show case:&#xD;&#xA;http://www.procedural.com/showcase/showcases/destroyed-city.html&#xD;&#xA;&#xD;&#xA;this is a game which was created from scratch by a few students. the guy responsible for the level layout used the cityengine to create all building geometries. the assets of course were of course modeled in an other 3d application.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;you guys are referring to a methodology to create models (in different LODs) directly from within a game (&quot;realtime&quot;), (without having to start the CE and export the models) by directly calling the cga shape grammar engine. this is currently not possible, but we have been asked about this many times already.&#xD;&#xA;some of our current development goes in that direction, since one of our main focus is the game market.&#xD;&#xA;&#xD;&#xA;the workflow so far is - of course - to create a pool of meshes in different LODs and load them in dynamically (proximity based, ..), as it's done in almost all games today.&#xD;&#xA;" />
  <row Id="5026" PostHistoryTypeId="2" PostId="2578" RevisionGUID="aecec4c0-9ea8-479f-be30-c171d886ff61" CreationDate="2010-08-11T11:08:04.067" UserId="1495" Text="Within the scope of developing games in C++, what are your preferred patterns in regard to use of pointers (be it none, raw, scoped, shared, or otherwise in between smart and dumb)?&#xD;&#xA;&#xD;&#xA;You might consider&#xD;&#xA;&#xD;&#xA;- object ownership&#xD;&#xA;- ease of use&#xD;&#xA;- copy policy&#xD;&#xA;- overhead&#xD;&#xA;- cyclic references&#xD;&#xA;- target platform&#xD;&#xA;- use with containers&#xD;&#xA;" />
  <row Id="5027" PostHistoryTypeId="1" PostId="2578" RevisionGUID="aecec4c0-9ea8-479f-be30-c171d886ff61" CreationDate="2010-08-11T11:08:04.067" UserId="1495" Text="C++: Smart pointers, Raw pointers, No Pointers?" />
  <row Id="5028" PostHistoryTypeId="3" PostId="2578" RevisionGUID="aecec4c0-9ea8-479f-be30-c171d886ff61" CreationDate="2010-08-11T11:08:04.067" UserId="1495" Text="&lt;c++&gt;&lt;programming&gt;&lt;best-practices&gt;" />
  <row Id="5029" PostHistoryTypeId="16" PostId="2578" RevisionGUID="aecec4c0-9ea8-479f-be30-c171d886ff61" CreationDate="2010-08-11T11:08:04.067" UserId="1495" />
  <row Id="5030" PostHistoryTypeId="10" PostId="2576" RevisionGUID="ce33c1c7-9ddd-475b-bce1-6b5c20eb8cb6" CreationDate="2010-08-11T11:10:04.220" UserId="14" CloseReasonId="2" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="5031" PostHistoryTypeId="2" PostId="2579" RevisionGUID="2a009510-cd89-4076-a0d8-ca0330faf5a4" CreationDate="2010-08-11T11:14:23.747" UserId="1495" Text="After having tried various approaches, today I find myself in alignment with the Google [C++ Style Guide][1]:&#xD;&#xA;&#xD;&#xA;&gt; If you actually need pointer&#xD;&#xA;&gt; semantics, scoped_ptr  is great. You&#xD;&#xA;&gt; should only use std::tr1::shared_ptr &#xD;&#xA;&gt; under very specific conditions, such&#xD;&#xA;&gt; as when objects need to be held by STL&#xD;&#xA;&gt; containers. You should never use&#xD;&#xA;&gt; auto_ptr.&#xD;&#xA;&gt; [...]&#xD;&#xA;&#xD;&#xA;&gt; Generally speaking, we prefer that we&#xD;&#xA;&gt; design code with clear object&#xD;&#xA;&gt; ownership. The clearest object&#xD;&#xA;&gt; ownership is obtained by using an&#xD;&#xA;&gt; object directly as a field or local&#xD;&#xA;&gt; variable, without using pointers at&#xD;&#xA;&gt; all. [..]&#xD;&#xA; &#xD;&#xA;&gt; Although they are not recommended,&#xD;&#xA;&gt; reference counted pointers are&#xD;&#xA;&gt; sometimes the simplest and most&#xD;&#xA;&gt; elegant way to solve a problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Smart_Pointers" />
  <row Id="5032" PostHistoryTypeId="16" PostId="2579" RevisionGUID="2a009510-cd89-4076-a0d8-ca0330faf5a4" CreationDate="2010-08-11T11:14:23.747" UserId="-1" />
  <row Id="5033" PostHistoryTypeId="2" PostId="2580" RevisionGUID="f4d721f2-b7ac-4cf7-8c95-1f28c644488e" CreationDate="2010-08-11T11:14:48.550" UserId="1156" Text="I tend to use smart pointers everywhere. I am not sure if this is a totally good idea, but I am lazy, and I cannot see any real downside [except if I wanted to do some C-style pointer arithmetic]. I use boost::shared_ptr because I know I can copy it around - if two entities share an image, then if one dies the other shouldn't lose the image too.&#xD;&#xA;&#xD;&#xA;The downside of this is if one object deletes something it points to and owns, but something else is also pointing to it, then it isn't deleted." />
  <row Id="5034" PostHistoryTypeId="16" PostId="2580" RevisionGUID="f4d721f2-b7ac-4cf7-8c95-1f28c644488e" CreationDate="2010-08-11T11:14:48.550" UserId="-1" />
  <row Id="5035" PostHistoryTypeId="5" PostId="2528" RevisionGUID="8a0aee1a-eab1-4e28-8d35-bba9009686c8" CreationDate="2010-08-11T11:37:35.173" UserId="1505" Comment="added 8 characters in body" Text="Software occlusion culling is often expensive, especially for smaller and older devices.&#xD;&#xA;&#xD;&#xA;Is frustum culling alone adequate on systems that can optimally display 10k triangles at most?&#xD;&#xA;&#xD;&#xA;If not, are there any relatively fast techniques for determining which objects (both moving and static) occlude others?" />
  <row Id="5036" PostHistoryTypeId="2" PostId="2581" RevisionGUID="d9ff36be-ff23-4618-aefc-6e0f6e1601e3" CreationDate="2010-08-11T11:42:47.303" UserId="1219" Text="It's good practice to document which classes owns what pointers. Preferably, you just use normal objects, and no pointers whenever you can.&#xD;&#xA;&#xD;&#xA;However, when you need to keep track of resources, passing pointers is the only option. There are some cases:&#xD;&#xA;&#xD;&#xA; - You get the pointer from somewhere else, but do not manage it: just use a normal pointer and document it so that no coder after you tries to delete it.&#xD;&#xA; - You get the pointer from somewhere else, and you keep track of it: use a scoped_ptr.&#xD;&#xA; - You get the pointer from somewhere else, and you keep track of it but it needs a special method to delete it: use shared_ptr with a custom delete method.&#xD;&#xA; - You need the pointer in an STL container: it will be copied around so you need boost::shared_ptr.&#xD;&#xA; - Many classes share the pointer, and it's not clear who will delete it: shared_ptr (the case above is actually a special case of this point).&#xD;&#xA; - You create the pointer yourself and only you need it: if you really can't use a normal object: scoped_ptr.&#xD;&#xA; - You create the pointer and will share it with other classes: shared_ptr.&#xD;&#xA; - You create the pointer and pass it: use a normal pointer and document your interface so that the new owner knows that he should manage the resource himself!&#xD;&#xA;&#xD;&#xA;I think that pretty much covers how I manage my resources right now. The memory cost of a pointer like shared_ptr is generally twice the memory cost of a normal pointer. I don't think that this overhead is too big, but if you are low on resources you should consider designing your game to reduce the number of smart pointers. On other cases I just design to good principles like the bullets above and the profiler will tell me where I will need more speed.&#xD;&#xA;" />
  <row Id="5037" PostHistoryTypeId="16" PostId="2581" RevisionGUID="d9ff36be-ff23-4618-aefc-6e0f6e1601e3" CreationDate="2010-08-11T11:42:47.303" UserId="-1" />
  <row Id="5038" PostHistoryTypeId="2" PostId="2582" RevisionGUID="77b4dba6-f2e9-46c9-acec-664c4f773832" CreationDate="2010-08-11T11:49:53.077" UserId="259" Text="The benefits of memory management and documentation provided by good smart pointers mean I use them regularly.  However when the profiler pipes up and tells me a particuarly usage is costing me, I'll revert back to more neolithic pointer management." />
  <row Id="5039" PostHistoryTypeId="16" PostId="2582" RevisionGUID="77b4dba6-f2e9-46c9-acec-664c4f773832" CreationDate="2010-08-11T11:49:53.077" UserId="-1" />
  <row Id="5040" PostHistoryTypeId="2" PostId="2583" RevisionGUID="b2344ecf-efd6-48c1-b614-ef2eefa7595c" CreationDate="2010-08-11T11:57:50.643" UserId="1101" Text="It has no real name. It's not any sort of 'accepted' algorithm. It's just cheap and easy to implement as a trivial state machine. If enemy is idle and player is close enough then switch enemy to aggressive. MMOs just continue to use it because it's easy to work with." />
  <row Id="5041" PostHistoryTypeId="2" PostId="2584" RevisionGUID="e1f614aa-697f-47ae-90b2-6ad93c30c983" CreationDate="2010-08-11T12:06:34.400" UserId="189" Text="If you think it's a standard file format, then I suggest you just quickly rename the file to different mesh formats and double-click until you get one right. This is assuming you have a 3D editor installed, of course. You might just go down the Wikipedia [List of 3D graphics file formats][1]; start with the common ones like blend, max, 3ds, ma, mb, ac, wings, md2, md3...&#xD;&#xA;&#xD;&#xA;Also please don't forget to mention what the answer is when you find it, in case by chance someone else has the same question!&#xD;&#xA;&#xD;&#xA;But really, either you try all the different formats, or we have to create sample files in each format and open them with a hex editor and look at their headers. I certainly can't find a place that lists all of the 3D format headers. The only one I know off the top of my head is that a Milkshape 3D file starts with the characters &quot;MS3D000000&quot;, so yours is not a MS3D file.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_file_formats#3D_graphics" />
  <row Id="5042" PostHistoryTypeId="2" PostId="2585" RevisionGUID="6329eaa3-f432-4879-a621-4abb66fdbdb7" CreationDate="2010-08-11T13:13:52.917" UserId="1101" Text="My target platforms are Facebook, Flash, the browser generally, also Windows PCs, Macs, and Linux, and that's just for one project. The physical hardware is next to irrelevant for me." />
  <row Id="5043" PostHistoryTypeId="16" PostId="2585" RevisionGUID="6329eaa3-f432-4879-a621-4abb66fdbdb7" CreationDate="2010-08-11T13:13:52.917" UserId="-1" />
  <row Id="5044" PostHistoryTypeId="2" PostId="2586" RevisionGUID="8c5608c2-bff0-4119-b724-3bd434a3a1ef" CreationDate="2010-08-11T14:27:54.300" UserId="1625" Text="You can find more details about multi-threading an XNA game here in this blog post:&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/" />
  <row Id="5045" PostHistoryTypeId="2" PostId="2587" RevisionGUID="55bd97bd-b098-4294-98cd-d8576f1b4763" CreationDate="2010-08-11T14:31:08.287" UserId="1580" Text="When it comes to boost's pointers specifically, I think that they should be avoided at all costs. They come at a cost that is much larger than anyone would initially expect. They provide an interface that allows you to skip vital and important parts of your memory and resourcement management. &#xD;&#xA;&#xD;&#xA;When it comes to any software development I think that it is important to think about your data. It is very important how your data is represented in memory. The reason for this is that CPU-speed has been increasing at a much greater rate than memory-access time. This often makes the memory-caches the main bottleneck of most modern computer games. By having your data aligned linearly in memory according to access order is much friendlier to the cache. This kind of solutions often lead to cleaner designs, simpler code and definetly code that is more easy to debug. Smart pointers easily lead to frequent dynamic memory allocations of resources, this causes them to be scattered all over the memory.&#xD;&#xA;&#xD;&#xA;This is not a premature optimization, it's a healthy decision that can and should be taken as early as possible. It's a question of architectural understanding of the hardware that your software will run on and it is important." />
  <row Id="5046" PostHistoryTypeId="16" PostId="2587" RevisionGUID="55bd97bd-b098-4294-98cd-d8576f1b4763" CreationDate="2010-08-11T14:31:08.287" UserId="-1" />
  <row Id="5047" PostHistoryTypeId="2" PostId="2588" RevisionGUID="8a0029e2-c6c5-4df2-aa85-e190a26afda7" CreationDate="2010-08-11T14:39:16.393" UserId="1597" Text="The answer that ZorbaTHut gave is incorrect. Take this example, and to simplify it just looking at the x-axis:&#xD;&#xA;&#xD;&#xA;a.x = 1&#xD;&#xA;b.x = 10&#xD;&#xA;a.width = 10&#xD;&#xA;b.width = 5&#xD;&#xA;&#xD;&#xA;abs(a.x - b.x) * 2 = 18&#xD;&#xA;(a.width + b.width) = 15&#xD;&#xA;&#xD;&#xA;Since (18 &lt; 15) is false the intersection won't be detected.&#xD;&#xA;&#xD;&#xA;The answer that Wallacoloo gave looks correct though.&#xD;&#xA;&#xD;&#xA;(btw, I wanted to post this as a comment to Zorbas answer but I couldn't see how)." />
  <row Id="5048" PostHistoryTypeId="6" PostId="680" RevisionGUID="9805e9c9-4699-4506-988e-9ced9acba5e7" CreationDate="2010-08-11T14:43:10.597" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;multithreading&gt;" />
  <row Id="5049" PostHistoryTypeId="5" PostId="2587" RevisionGUID="374db046-815e-4319-92b0-620f55c88fd0" CreationDate="2010-08-11T14:47:30.853" UserId="1580" Comment="added 399 characters in body" Text="When it comes to boost's pointers specifically, I think that they should be avoided at all costs. They come at a cost that is much larger than anyone would initially expect. They provide an interface that allows you to skip vital and important parts of your memory and resourcement management. &#xD;&#xA;&#xD;&#xA;When it comes to any software development I think that it is important to think about your data. It is very important how your data is represented in memory. The reason for this is that CPU-speed has been increasing at a much greater rate than memory-access time. This often makes the memory-caches the main bottleneck of most modern computer games. By having your data aligned linearly in memory according to access order is much friendlier to the cache. This kind of solutions often lead to cleaner designs, simpler code and definetly code that is more easy to debug. Smart pointers easily lead to frequent dynamic memory allocations of resources, this causes them to be scattered all over the memory.&#xD;&#xA;&#xD;&#xA;This is not a premature optimization, it's a healthy decision that can and should be taken as early as possible. It's a question of architectural understanding of the hardware that your software will run on and it is important.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;There are a few things to consider regarding the performance of shared-pointers:&#xD;&#xA;&#xD;&#xA;- The reference counter is heap allocated.&#xD;&#xA;- If you use thread-safety enabled, reference counting is done via interlocked operations.&#xD;&#xA;- Passing the pointer by value modifies reference count, which means interlocked operations most likely using random access in memory (locks + likely cache miss).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5050" PostHistoryTypeId="2" PostId="2589" RevisionGUID="5dffb6d2-e5a6-4cd9-a836-9f733709b9bc" CreationDate="2010-08-11T15:27:58.527" UserId="865" Text="The loss of artistic control, and the size increase of storage options have make this a hard sell. That, plus you'd have to retrain artists, while you hired them for what they were good at -traditional texturing. Unless size or unique texturing is really really an issue, there is general little desire to go the procedural way." />
  <row Id="5051" PostHistoryTypeId="2" PostId="2590" RevisionGUID="427d73b8-4e7d-4c58-86bd-107d40b9360a" CreationDate="2010-08-11T15:40:25.780" UserId="51" Text="I also follow the &quot;strong ownership&quot; train of thought.  I like to clearly delineate that &quot;this class owns this member&quot; when its appropriate.  &#xD;&#xA;&#xD;&#xA;I rarely use `smart_ptr`.  If I do, I make liberal use of `weak_ptr` whenever I can so I can treat it like a handle to the object instead of increasing the reference count.&#xD;&#xA;&#xD;&#xA;I use `scoped_ptr` all over the place.  It shows obvious ownership.  The only reason I don't just make objects like that a member is because you can forward declare them if they're in a scoped_ptr.&#xD;&#xA;&#xD;&#xA;If I need a list of objects, I use &lt;a href=&quot;http://www.boost.org/doc/libs/1_39_0/libs/ptr_container/doc/tutorial.html&quot;&gt;`ptr_vector`&lt;/a&gt;.  It's more efficient and has fewer side effects than using `vector&lt;smart_ptr&gt;`.  I think you might not be able to forward declare the type in the ptr_vector (it's been a while), but the semantics of it make it worth it in my opinion.  Basically if you remove an object from the list it gets deleted automatically.  This also shows obvious ownership.&#xD;&#xA;&#xD;&#xA;If I need reference to something, I try to make it a reference instead of a naked pointer.  Sometimes this isn't practical (i.e. any time you need a reference after the object is constructed).  Either way, references show obviously that you don't own the object, and if you're following shared pointer semantics everywhere else then naked pointers generally don't cause any additional confusion (especially if you follow a &quot;no manual deletes&quot; rule).&#xD;&#xA;&#xD;&#xA;With this method, one iPhone game I worked on was able to only have a single `delete` call, and that was in the Obj-C to C++ bridge I wrote. &#xD;&#xA;&#xD;&#xA;Generally I'm of the opinion that memory management is too important to leave to humans.  If you can automate deletion, you should.  If the overhead from smart_ptr is too expensive at run time (assuming you turned of threading support, etc), you probably should be using something else (i.e. a bucket pattern) to get your dynamic allocations down.  " />
  <row Id="5052" PostHistoryTypeId="16" PostId="2590" RevisionGUID="427d73b8-4e7d-4c58-86bd-107d40b9360a" CreationDate="2010-08-11T15:40:25.780" UserId="-1" />
  <row Id="5053" PostHistoryTypeId="2" PostId="2591" RevisionGUID="97fa6d7c-8fbd-4f7a-901c-a7037552c870" CreationDate="2010-08-11T15:48:55.903" UserId="55" Text="AI in MMOs are pretty ignorant. You're dealing with a world where you have the potential to reach millions of players all of varying skill. If AI in MMOs were really present you would see creatures constantly rush attack your healers, then go after the cloth wearers, etc. But we don't see that. We see a system that gives a mob x health and an attack rating depending on it's level, and a faction that it falls under (which makes it attack people whose faction differs). They run (sometimes) when health &lt; y, and might trigger more mobs to help if condition x is met. The system might do a DX roll to see if the attack/spell hits or not, and goes from there. If one player is attacking a lot (raising threat), creatures turn to that player. So this system is very, very basic. There's not a way for a casual player to flip a 'casual' switch.&#xD;&#xA;&#xD;&#xA;From there we do get into some 'advanced' encounters that appeal to the hard-core crowd. But even these are not fully automated by AI -- they're scripted events. Once a high level guild takes a week and figures out how to kill the King of Dreams, then they can pass the encounter details to casual players.&#xD;&#xA;&#xD;&#xA;I remember back in EverQuest that you could start a conversation with NPCs and you could trigger different actions by saying certain things! Some linguistic AI." />
  <row Id="5054" PostHistoryTypeId="4" PostId="2571" RevisionGUID="cfd8672b-be90-49b6-8706-ad78f6de4dbe" CreationDate="2010-08-11T15:49:45.450" UserId="51" Comment="edited title" Text="What game engine does Mega Jump use?" />
  <row Id="5055" PostHistoryTypeId="5" PostId="2590" RevisionGUID="dc2241d4-5b5f-43e2-b11e-3ab4b771c8ea" CreationDate="2010-08-11T16:15:23.297" UserId="51" Comment="added 1 characters in body" Text="I also follow the &quot;strong ownership&quot; train of thought.  I like to clearly delineate that &quot;this class owns this member&quot; when its appropriate.  &#xD;&#xA;&#xD;&#xA;I rarely use `smart_ptr`.  If I do, I make liberal use of `weak_ptr` whenever I can so I can treat it like a handle to the object instead of increasing the reference count.&#xD;&#xA;&#xD;&#xA;I use `scoped_ptr` all over the place.  It shows obvious ownership.  The only reason I don't just make objects like that a member is because you can forward declare them if they're in a scoped_ptr.&#xD;&#xA;&#xD;&#xA;If I need a list of objects, I use &lt;a href=&quot;http://www.boost.org/doc/libs/1_39_0/libs/ptr_container/doc/tutorial.html&quot;&gt;`ptr_vector`&lt;/a&gt;.  It's more efficient and has fewer side effects than using `vector&lt;smart_ptr&gt;`.  I think you might not be able to forward declare the type in the ptr_vector (it's been a while), but the semantics of it make it worth it in my opinion.  Basically if you remove an object from the list it gets deleted automatically.  This also shows obvious ownership.&#xD;&#xA;&#xD;&#xA;If I need reference to something, I try to make it a reference instead of a naked pointer.  Sometimes this isn't practical (i.e. any time you need a reference after the object is constructed).  Either way, references show obviously that you don't own the object, and if you're following shared pointer semantics everywhere else then naked pointers generally don't cause any additional confusion (especially if you follow a &quot;no manual deletes&quot; rule).&#xD;&#xA;&#xD;&#xA;With this method, one iPhone game I worked on was able to only have a single `delete` call, and that was in the Obj-C to C++ bridge I wrote. &#xD;&#xA;&#xD;&#xA;Generally I'm of the opinion that memory management is too important to leave to humans.  If you can automate deletion, you should.  If the overhead from smart_ptr is too expensive at run time (assuming you turned off threading support, etc), you probably should be using something else (i.e. a bucket pattern) to get your dynamic allocations down.  " />
  <row Id="5056" PostHistoryTypeId="2" PostId="2592" RevisionGUID="d5abc8d0-e321-4996-8bdb-a0200560de63" CreationDate="2010-08-11T16:18:35.680" UserId="1323" Text="I read up some infos on physics simulations and found a possible solution. It works by splitting each physics-step into three phases:&#xD;&#xA;&#xD;&#xA;**1. Pre-Step:**&#xD;&#xA;&#xD;&#xA;Each physics-step, a window creates four transformations,&#xD;&#xA;two for each side of the connection:&#xD;&#xA;&#xD;&#xA;- an input transformation that transforms an object's position, velocity&#xD;&#xA;    (and possibly size and weight) into the destination coordinate-system and&#xD;&#xA;- an output transformation that transforms forces back into the object's original system.&#xD;&#xA;&#xD;&#xA;(Static windows only need to do this once.)&#xD;&#xA;&#xD;&#xA;Additionally, objects in each coordinate-system are split into three groups:&#xD;&#xA;&#xD;&#xA;![Physics Grouping][1]&#xD;&#xA;&#xD;&#xA;1. Objects in front of the window (green).  &#xD;&#xA;    An object is also counted towards this group if it is intersecting the window plane or likely to cross it from behind the window (not shown).&#xD;&#xA;&#xD;&#xA;2. Objects intersecting the window or likely to intersect it in this physics-step (orange).&#xD;&#xA;&#xD;&#xA;3. Objects behind the window (blue).&#xD;&#xA;    If an objects flies towards the back-side of the window, it is still marked as member of group three.&#xD;&#xA;&#xD;&#xA;Grouping can be simplified if the window is at the simulation's border.&#xD;&#xA;&#xD;&#xA;**2. Main-Step:**&#xD;&#xA;&#xD;&#xA;Physics are calculated mostly as usual, with a few exceptions:&#xD;&#xA;&#xD;&#xA;- Objects from the second group never collide with those from the third and vice-versa.&#xD;&#xA;&#xD;&#xA;- The window's input transformation is used on the objects from the second group&#xD;&#xA;    and the results are evaluated against the front- and intersecting objects&#xD;&#xA;    from the destination system. The resulting force is transformed using the output transformation and applied to the original object.&#xD;&#xA;&#xD;&#xA;(If an object is hit during the calculation, it must be regrouped!)&#xD;&#xA;&#xD;&#xA;**3. Post-Step:**&#xD;&#xA;&#xD;&#xA;If an object from the second group has crossed the window, it is moved into the destination system using the input transformation.&#xD;&#xA;&#xD;&#xA;**Additional Thoughts:**&#xD;&#xA;&#xD;&#xA;If the transformations are preserved after calculating the physics, they can be used to speed up rendering and for easier AI calculations. The grouping could be used to remove clip-planes from the rendering process.&#xD;&#xA;&#xD;&#xA;The downside of this solution is that the windows have to be added directly into the physics-engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://content.wuala.com/contents/Tamschi/Stack%20Exchange/WindowGrouping.png" />
  <row Id="5057" PostHistoryTypeId="2" PostId="2593" RevisionGUID="320f598c-aa90-45ef-a00f-a01ed20e3233" CreationDate="2010-08-11T16:29:52.973" UserId="337" Text="If you have a system running Linux (or Cygwin) you can try the 'file' command on it, if its relatively common it should show up." />
  <row Id="5058" PostHistoryTypeId="2" PostId="2594" RevisionGUID="e75548b8-47d5-483e-b69b-a8efc29fcc04" CreationDate="2010-08-11T16:31:47.120" UserId="119" Text="Corrected version of ZorbaTHut's answer:&#xD;&#xA;       &#xD;&#xA;    bool DoBoxesIntersect(Box a, Box b) {&#xD;&#xA;         return (abs(a.x - b.x) &lt; (a.width + b.width) / 2) &amp;&amp;&#xD;&#xA;         (abs(a.y - b.y) &lt; (a.height + b.height) / 2);&#xD;&#xA;    }" />
  <row Id="5059" PostHistoryTypeId="2" PostId="2595" RevisionGUID="8e4fa8d6-bcc2-47d4-8b00-67c131cdd737" CreationDate="2010-08-11T16:42:02.633" UserId="136" Text="I had two or three notebooks worth of ideas before I actually started developing my first game.  I spent several months playing similar games for research purposes--determining which features I liked or didn't like.  I generally try to focus on the mechanics first and tackle the look and feel later (but being careful not to ignore usability).  I'd recommend having a rough but thorough design before you dive into development.  Don't try to nail down every detail too early, as your design will necessarily evolve to accommodate playability issues, technology limitations, etc." />
  <row Id="5060" PostHistoryTypeId="16" PostId="2595" RevisionGUID="8e4fa8d6-bcc2-47d4-8b00-67c131cdd737" CreationDate="2010-08-11T16:42:02.633" UserId="-1" />
  <row Id="5061" PostHistoryTypeId="2" PostId="2596" RevisionGUID="c8e4e93c-c15e-4aab-8cc5-cd970ce6562e" CreationDate="2010-08-11T16:56:28.463" UserId="488" Text="There is not and never will be any de-facto must-read; like *the book* that everyone agrees every self-respecting game developers should have read. Won't happen.&#xD;&#xA;&#xD;&#xA;Everyone find their own must-reads from time to time. A complete game-changer for me could mean nothing to you, due to our different personalities, past experiences and so on. You'll find *your* must-reads as you get involved in the game development scene.&#xD;&#xA;&#xD;&#xA;I started out by frequenting Gamasutra and GameCareerGuide because they had the best articles on what I was most interested in at the time; writing game design documents and 'breaking in'.&#xD;&#xA;&#xD;&#xA;The beast readers tips come when you are actively engaged with other game developers. Conversation with your peers will always be in the context of game development, and suggestions to 'further reading' will be always relevant to what you are currently trying to achieve, e.g. learning a new toolset or researching good level design. It won't matter so much that you could have read a slightly better book, if the one you're reading in its stead makes it easier to collaborate/talk with your fellow developers because you have a resource in common that you can refer to." />
  <row Id="5062" PostHistoryTypeId="16" PostId="2596" RevisionGUID="c8e4e93c-c15e-4aab-8cc5-cd970ce6562e" CreationDate="2010-08-11T16:56:28.463" UserId="488" />
  <row Id="5063" PostHistoryTypeId="2" PostId="2597" RevisionGUID="e305ec5d-ca96-4751-aa99-09bfc25478b4" CreationDate="2010-08-11T17:01:30.187" UserId="1413" Text="Make sure your idea is full by brainstorming it and writing down some key design goals. I go through a process I call finding the game 'soul'. IE what is the main reason I'm making this game. From here I flesh out some more concepts and ideas that will support this main goal. This entire process can take hours, days, weeks, or longer depending on how the idea comes to you. &#xD;&#xA;&#xD;&#xA;From here, get something visible and kinetic. I find that being able to play with the game and get feedback from it is vital in keeping motivation up. I tend to implement visual and sound effects, as well as simple input handling and processing just so something is 'happening' and it feels like a reality rather than a dream.&#xD;&#xA;&#xD;&#xA;No matter how your development strategy goes, I cannot emphasize enough that you don't get wrapped up in trying to design and code a game &quot;engine&quot;. Every feature that has no visible or tactile effect on the game will offer very little reward. To help offset this with the essential core systems, put up development info on screen. IE FPS, AI variables, and any other text that will help expose that something is there that wasn't before. There is nothing more draining than spending 10 hours coding a system, compiling, and having the exact same experience as before. &#xD;&#xA;&#xD;&#xA;I wrote an article several years ago about finding your games soul that you may find of interest here: http://deleter.phatcode.net/index.php?page=articles&amp;a=8&#xD;&#xA;&#xD;&#xA;edit: And one more thing that I see mentioned in another post I want to elaborate on. Play games not only while designing your game, but any time you aren't feeling very motivated to work on your own game. I find that playing similar games helps me remember why I want to make my game and helps give me that extra boost I need to keep going. &#xD;&#xA;&#xD;&#xA;In addition, you can build up an &quot;inspiration bank&quot; of pictures, videos, music, and sound clips that all contain elements of what you want to put in your game. Any time you need direction, return to these sources to help guide your decisions. This will help keep you motivated and on track." />
  <row Id="5064" PostHistoryTypeId="16" PostId="2597" RevisionGUID="e305ec5d-ca96-4751-aa99-09bfc25478b4" CreationDate="2010-08-11T17:01:30.187" UserId="-1" />
  <row Id="5065" PostHistoryTypeId="2" PostId="2598" RevisionGUID="0ee46ecf-2333-4955-818b-8c23ba6b99fa" CreationDate="2010-08-11T17:15:15.593" UserId="1413" Text="One more book to add to the list: http://www.amazon.com/Software-Engineering-Game-Developers/dp/1592001556/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1281546762&amp;sr=1-1&#xD;&#xA;&#xD;&#xA;Software Engineering for Game Developers is an interesting approach to combining traditional software engineering to the typically chaotic process of game development. I have not gotten through the entire book yet, but the parts I have were pretty enlightening in respect to how to approach the chaotic nature of creative process with a orderly and structured process to approach the best of both worlds." />
  <row Id="5066" PostHistoryTypeId="2" PostId="2599" RevisionGUID="4f9eba85-7ced-43b9-b96a-f0d78d035177" CreationDate="2010-08-11T17:30:41.730" UserId="1463" Text="You have an entity A that you want to turn towards another entity B.  One way to determine the direction to turn is to compute the cross-product of the direction vector of A with the vector from AB.  If the value of z is positive, then you turn right.  If the value of z is negative, you turn left.  Is this the only way of determining which way to turn?" />
  <row Id="5067" PostHistoryTypeId="1" PostId="2599" RevisionGUID="4f9eba85-7ced-43b9-b96a-f0d78d035177" CreationDate="2010-08-11T17:30:41.730" UserId="1463" Text="Is there a better way of determining direction to turn?" />
  <row Id="5068" PostHistoryTypeId="3" PostId="2599" RevisionGUID="4f9eba85-7ced-43b9-b96a-f0d78d035177" CreationDate="2010-08-11T17:30:41.730" UserId="1463" Text="&lt;math&gt;" />
  <row Id="5069" PostHistoryTypeId="2" PostId="2600" RevisionGUID="84d7b25b-d7ae-4ec1-8e9a-090ef0e0b619" CreationDate="2010-08-11T17:34:23.317" UserId="1413" Text="Actually that arithmetic works fine either way. You can do any arithmetic operation to either side of the &lt; and it doesn't change it (multiplication by a negative means you have to change the less than, though). In that example, the boxes shouldn't collide. If the center of box A is at 1, it spans from -4 to 6. Box b centers at 10, and spans 7.5 to 12.5, there is no collision there...&#xD;&#xA;&#xD;&#xA;Now, the method that Wallacoloo posted is not only correct, but will run faster on languages that implement short circuiting, since most checks will return false anyway, the short circuiting can cut out after a single operation, whereas the arithmetic version can only cut out after two arithmetic, one abs, and a less than operation." />
  <row Id="5070" PostHistoryTypeId="5" PostId="2590" RevisionGUID="ad804efc-81ac-4699-b179-b0f68155419a" CreationDate="2010-08-11T17:35:56.900" UserId="51" Comment="added 3 characters in body" Text="I also follow the &quot;strong ownership&quot; train of thought.  I like to clearly delineate that &quot;this class owns this member&quot; when its appropriate.  &#xD;&#xA;&#xD;&#xA;I rarely use `shared_ptr`.  If I do, I make liberal use of `weak_ptr` whenever I can so I can treat it like a handle to the object instead of increasing the reference count.&#xD;&#xA;&#xD;&#xA;I use `scoped_ptr` all over the place.  It shows obvious ownership.  The only reason I don't just make objects like that a member is because you can forward declare them if they're in a scoped_ptr.&#xD;&#xA;&#xD;&#xA;If I need a list of objects, I use &lt;a href=&quot;http://www.boost.org/doc/libs/1_39_0/libs/ptr_container/doc/tutorial.html&quot;&gt;`ptr_vector`&lt;/a&gt;.  It's more efficient and has fewer side effects than using `vector&lt;shared_ptr&gt;`.  I think you might not be able to forward declare the type in the ptr_vector (it's been a while), but the semantics of it make it worth it in my opinion.  Basically if you remove an object from the list it gets deleted automatically.  This also shows obvious ownership.&#xD;&#xA;&#xD;&#xA;If I need reference to something, I try to make it a reference instead of a naked pointer.  Sometimes this isn't practical (i.e. any time you need a reference after the object is constructed).  Either way, references show obviously that you don't own the object, and if you're following shared pointer semantics everywhere else then naked pointers generally don't cause any additional confusion (especially if you follow a &quot;no manual deletes&quot; rule).&#xD;&#xA;&#xD;&#xA;With this method, one iPhone game I worked on was able to only have a single `delete` call, and that was in the Obj-C to C++ bridge I wrote. &#xD;&#xA;&#xD;&#xA;Generally I'm of the opinion that memory management is too important to leave to humans.  If you can automate deletion, you should.  If the overhead from shared_ptr is too expensive at run time (assuming you turned off threading support, etc), you probably should be using something else (i.e. a bucket pattern) to get your dynamic allocations down.  " />
  <row Id="5071" PostHistoryTypeId="2" PostId="2601" RevisionGUID="a671e98c-eadb-46e4-8294-8ea31e507d7c" CreationDate="2010-08-11T17:42:45.020" UserDisplayName="Jaeger" Text="Use the right tool for the job.&#xD;&#xA;&#xD;&#xA;If your program can throw exceptions ensure your code is exception aware. Using smart pointers, RAII, and avoiding 2 phase construction are good starting points.&#xD;&#xA;&#xD;&#xA;If you have cyclic references with no clear ownership semantics you can consider using a garbage collection library or refactoring your design.&#xD;&#xA;&#xD;&#xA;Good libraries will allow you to code to the concept not the type so it shouldn't matter in most cases which kind of pointer you are using beyond resource management issues.&#xD;&#xA;&#xD;&#xA;If you're working in a multi-threaded environment, make sure you understand if your object is potentially shared across threads. One of the main reasons to consider using boost::shared_ptr or std::tr1::shared_ptr is because it uses a thread-safe reference count.&#xD;&#xA;&#xD;&#xA;If you're worried about the separate allocation of the reference counts there are many ways around this. Using the boost::shared_ptr library you can pool allocate the reference counters or use boost::make_shared (my preference) which allocates the object and the reference count in a single allocation thereby alleviating most cache miss concerns people have. You can avoid the performance hit of updating the reference count in performance critical code by holding a reference to the object at the topmost level and passing around direct references to the object.&#xD;&#xA;&#xD;&#xA;If you need shared ownership but don't want to pay the cost of reference counting or garbage collection consider using immutable objects or a copy on write idiom.&#xD;&#xA;&#xD;&#xA;Bear in mind that far and away your biggest performance wins are going to be at an architecture level, followed by an algorithm level, and while these low level concerns are very important they should be tackled only after you've addressed the major issues. If you're dealing with performance issues at the level of cache misses then you have a whole host of issues that you also have to be aware of like false sharing which have nothing to do with pointers per say.&#xD;&#xA;&#xD;&#xA;If you're using smart pointers just to share resources like textures or models consider a more specialized library like Boost.Flyweight.&#xD;&#xA;&#xD;&#xA;Once the new standard becomes adopted move semantics, rvalue references, and perfect forwarding will make working with expensive objects and containers much easier and more efficient. Until then don't store pointers with destructive copy semantics, such as auto_ptr or unique_ptr, in a Container (the standard concept). Consider using the Boost.Pointer Container library or storing shared ownership smart pointers in Containers. In performance critical code you can consider avoiding both of these in favor of intrusive containers such as those in Boost.Intrusive.&#xD;&#xA;&#xD;&#xA;The target platform shouldn't really influence your decision too much. Embedded devices, smart phones, dumb phones, PCs, and consoles can all run the code just fine. Project requirements such as strict memory budgets or no dynamic allocation ever/after load are more valid concerns and should influence your choices." />
  <row Id="5072" PostHistoryTypeId="16" PostId="2601" RevisionGUID="a671e98c-eadb-46e4-8294-8ea31e507d7c" CreationDate="2010-08-11T17:42:45.020" UserId="-1" />
  <row Id="5073" PostHistoryTypeId="2" PostId="2602" RevisionGUID="0f8453ad-e52e-49f0-9df5-78f4782eb84c" CreationDate="2010-08-11T17:45:18.040" UserId="51" Text="If you're storing your rotations as quaternions (which you probably should), you could use a quaternion lerp function to lerp from your initial rotation to the rotation you want to be at given (i.e the rotation given by the vector AB with whatever your up vector is).  " />
  <row Id="5074" PostHistoryTypeId="2" PostId="2603" RevisionGUID="58c5a6bb-df31-49f1-b100-abedec03dda7" CreationDate="2010-08-11T17:45:24.047" UserId="189" Text="It sounds like this is essentially a 2D problem; if it's truly a 3D problem (one spaceship face another spaceship in free space) then you should definitely use quaternions. Traditional vectors will have odd turn patterns. But according to your question, you're just turning left or right. If you can simplify the problem down to two (x,y) positions and the angle that entity A is facing, then you can use simple 2D math:&#xD;&#xA;&#xD;&#xA;tan((y&lt;sub&gt;B&lt;/sub&gt;-y&lt;sub&gt;A&lt;/sub&gt;)/(x&lt;sub&gt;B&lt;/sub&gt;-x&lt;sub&gt;A&lt;/sub&gt;)) is the desired angle (of A facing B). Turn towards that.&#xD;&#xA;&#xD;&#xA;You need to account for crossing 0 degrees; for example, if the target angle is 359 degrees and you're currently looking at a 1 degree angle, you want to just turn 2 degrees clockwise rather than turning 358 degrees counterclockwise." />
  <row Id="5075" PostHistoryTypeId="5" PostId="2602" RevisionGUID="9647cf59-3be7-41f5-9aaf-03516c10343f" CreationDate="2010-08-11T17:50:35.143" UserId="51" Comment="deleted 6 characters in body" Text="If you're storing your rotations as quaternions (which you probably should), you could use a quaternion lerp function to lerp from your initial rotation to the rotation you want to be at (i.e the rotation given by the vector AB with whatever your up vector is).  " />
  <row Id="5076" PostHistoryTypeId="2" PostId="2604" RevisionGUID="63d59359-fd43-4021-bb98-96d7af1dc93a" CreationDate="2010-08-11T17:54:44.933" UserId="1413" Text="I think of the marget as segmented into a few tiers. At one end, you have the browser and smartphone market, which would be Flash, iOS, and Android. These involve a small target group of hardware, and typically provide one or few central locations where your content will be placed. (Flash can go anywhere, but there are some major hubs that are a good target for flash games)&#xD;&#xA;&#xD;&#xA;Next up is the casual/indie market, which bleeds a little bit into the smartphone market, but in addition adds Xbox Live / XNA, Playstation Network, Unity 3d, and Steam for PC. While Steam is not exactly a platform, it is a fully featured service that feels fairly close to Xbox live in terms of digital distribution and user accounts. These are also singular 'shops' where all associated content for the platform can be found, thus making it easier for someone to find your game. Unity gives you the ability to distribute across a wide range of platforms, including the PC, the browser, iPhone, and Android.&#xD;&#xA;&#xD;&#xA;Finally you have the AAA traditional game platforms which consists of PS3, Xbox 360, Wii, and the PC. These are the hardest to target and most likely involve larger budgets and contracts. Also designing a non-casual PC game complicates matters as you have many hardware targets you want your game to run on." />
  <row Id="5077" PostHistoryTypeId="16" PostId="2604" RevisionGUID="63d59359-fd43-4021-bb98-96d7af1dc93a" CreationDate="2010-08-11T17:54:44.933" UserId="-1" />
  <row Id="5078" PostHistoryTypeId="5" PostId="2588" RevisionGUID="2d7b7546-2bd7-475c-a7fa-633e85d3d1f7" CreationDate="2010-08-11T17:55:05.930" UserId="1597" Comment="Edited to acknowledge incorrect assumption that x is left-hand side of box" Text="Edit: ZorbaTHut is actually correct I just didn't pay enough attention to his answer. I was assuming that x was the left side of the box rather than the center. &#xD;&#xA;&#xD;&#xA;The answer that ZorbaTHut gave is incorrect. Take this example, and to simplify it just looking at the x-axis:&#xD;&#xA;&#xD;&#xA;a.x = 1&#xD;&#xA;b.x = 10&#xD;&#xA;a.width = 10&#xD;&#xA;b.width = 5&#xD;&#xA;&#xD;&#xA;abs(a.x - b.x) * 2 = 18&#xD;&#xA;(a.width + b.width) = 15&#xD;&#xA;&#xD;&#xA;Since (18 &lt; 15) is false the intersection won't be detected.&#xD;&#xA;&#xD;&#xA;The answer that Wallacoloo gave looks correct though.&#xD;&#xA;&#xD;&#xA;(btw, I wanted to post this as a comment to Zorbas answer but I couldn't see how)." />
  <row Id="5079" PostHistoryTypeId="2" PostId="2605" RevisionGUID="7d53243f-3212-40aa-bd98-108e5e151daa" CreationDate="2010-08-11T17:56:03.823" UserId="189" Text="The lengthy mission statement from [its website][1] states:&#xD;&#xA;&#xD;&#xA;&gt;The lack of game-specific research has prevented many in the academic community from embracing game development as a serious field of study. The Journal of Game Development (JOGD), however, provides a much-needed, peer-reviewed, medium of communication and the raison d'etre for serious academic research focused solely on game-related issues. The JOGD provides the vehicle for disseminating research and findings indigenous to the game development industry. It is an outlet for peer-reviewed research that will help validate the work and garner acceptance for the study of game development by the academic community.  JOGD will serve both the game development industry and academic community by presenting leading-edge, original research, and theoretical underpinnings that detail the most recent findings in related academic disciplines, hardware, software, and technology that will directly affect the way games are conceived, developed, produced, and delivered.&#xD;&#xA;&#xD;&#xA;The Journal of Game Development was established in 2003. It's hard to find any information about the issues but at four issues per year, I estimate the last issue was distributed sometime in 2005 or 2006. It had a good editorial board of college professors and a founding editor from Ubisoft. The list of articles looks good. The price was reasonable.&#xD;&#xA;&#xD;&#xA;**So what happened to it?** Its website recently went down but you can see [the last Archive.org version][1].&#xD;&#xA;&#xD;&#xA;The editor-in-chief is a professor at my school so I intend to ask him in person in a week or two, but I thought I'd see what you might be able to dig up about it first. Of course I will be sure to add an answer with his official word on the matter at that time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://web.archive.org/web/20080614200102/http://www.jogd.com/" />
  <row Id="5080" PostHistoryTypeId="1" PostId="2605" RevisionGUID="7d53243f-3212-40aa-bd98-108e5e151daa" CreationDate="2010-08-11T17:56:03.823" UserId="189" Text="What happened to the Journal of Game Development?" />
  <row Id="5081" PostHistoryTypeId="3" PostId="2605" RevisionGUID="7d53243f-3212-40aa-bd98-108e5e151daa" CreationDate="2010-08-11T17:56:03.823" UserId="189" Text="&lt;books&gt;" />
  <row Id="5082" PostHistoryTypeId="2" PostId="2606" RevisionGUID="2f403364-f3e9-451c-b015-cf78ce222473" CreationDate="2010-08-11T18:00:53.017" UserId="1413" Text="All the other answers produce a better result, but the cheapest(?) way to avoid complete grouping is to just add a random vector that is perhaps 25% of the original calculated movement vector so that objects bounce around a bit in a general blob group. It won't keep things completely off of each other, but depending on what you are trying to achieve, I have found this can be adequate. Objects can still group with this method if you run circles around them, but over time they tend to diffuse.&#xD;&#xA;&#xD;&#xA;Here is a small game-let I made several years ago that demonstrates this method:&#xD;&#xA;http://deleter.phatcode.net/index.php?page=projects&amp;p=4" />
  <row Id="5083" PostHistoryTypeId="2" PostId="2607" RevisionGUID="4a7c0e34-429f-477d-8ae0-842e8131dfc9" CreationDate="2010-08-11T18:12:26.753" UserId="1632" Text="I am trying to write a match-three puzzle game like 'call of Atlantis' myself. The most important algorithm is to find out all possible match-three possibilities. Is there any open source projects that can be referenced? Or any keywords to the algorithm? I am trying to look for a faster algorithm to calculate all possibilities. &#xD;&#xA;&#xD;&#xA;Rules:&#xD;&#xA;&#xD;&#xA;- Diagonals don't count.&#xD;&#xA;- The size is 8x8&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="5084" PostHistoryTypeId="1" PostId="2607" RevisionGUID="4a7c0e34-429f-477d-8ae0-842e8131dfc9" CreationDate="2010-08-11T18:12:26.753" UserId="1632" Text="Match-three puzzle games algorithm" />
  <row Id="5085" PostHistoryTypeId="3" PostId="2607" RevisionGUID="4a7c0e34-429f-477d-8ae0-842e8131dfc9" CreationDate="2010-08-11T18:12:26.753" UserId="1632" Text="&lt;algorithm&gt;" />
  <row Id="5086" PostHistoryTypeId="2" PostId="2608" RevisionGUID="42f13265-7eba-4f04-b1d9-d095d995b3c5" CreationDate="2010-08-11T18:14:12.867" UserId="1477" Text="What are good ways to reconcile a desire to allow the user to have freedom of choice and have their choices effect the world, with the desire to be able to have a story without the player 'ruining' it?" />
  <row Id="5087" PostHistoryTypeId="1" PostId="2608" RevisionGUID="42f13265-7eba-4f04-b1d9-d095d995b3c5" CreationDate="2010-08-11T18:14:12.867" UserId="1477" Text="Agency versus story" />
  <row Id="5088" PostHistoryTypeId="3" PostId="2608" RevisionGUID="42f13265-7eba-4f04-b1d9-d095d995b3c5" CreationDate="2010-08-11T18:14:12.867" UserId="1477" Text="&lt;game-design&gt;" />
  <row Id="5089" PostHistoryTypeId="16" PostId="2608" RevisionGUID="42f13265-7eba-4f04-b1d9-d095d995b3c5" CreationDate="2010-08-11T18:14:12.867" UserId="1477" />
  <row Id="5091" PostHistoryTypeId="2" PostId="2610" RevisionGUID="4deb1312-4ee6-4edc-851c-e2efa2b12d58" CreationDate="2010-08-11T18:23:10.803" UserId="1156" Text="If speed is really an issue, I would say to try something like:&#xD;&#xA;&#xD;&#xA; - Iterate the whole grid, starting from top left.&#xD;&#xA;&#xD;&#xA; - At every point on the grid until and including the 6th column, check one tile right, and down (you do not need to check left and up because you've done this)&#xD;&#xA;&#xD;&#xA; - As you hit the 7th column, only check down. (There is no room for 3 along when there's only 2 columns)&#xD;&#xA;&#xD;&#xA; - If they match, then try checking one more tile along/down. If they don't, move to the next tile along.&#xD;&#xA;&#xD;&#xA; - When you finish the 8th column, move down a row.&#xD;&#xA;&#xD;&#xA;But for an 8x8 grid, there isn't much optimization needed. An easier form would be (similar):&#xD;&#xA;&#xD;&#xA;- Iterate the whole grid, starting from top left.&#xD;&#xA;&#xD;&#xA; - At every point on the grid until and including the 6th column, check one tile right, and down (you do not need to check left and up because you've done this)&#xD;&#xA;&#xD;&#xA; - If they match, then try checking one more tile along/down. If they don't, move to the next tile along. Handle out-of-board errors as 'not the same'.&#xD;&#xA;&#xD;&#xA; - When you finish the 8th column, move down a row.&#xD;&#xA;&#xD;&#xA;This would allow much simpler code in the for loop, since you do not have an if structure with some code on one side, and slightly tweaked code below it.&#xD;&#xA;" />
  <row Id="5092" PostHistoryTypeId="5" PostId="2608" RevisionGUID="203bb40f-3f10-44b2-9b4f-134e95763e3d" CreationDate="2010-08-11T18:24:47.197" UserId="1156" Comment="edited body" Text="What are good ways to reconcile a desire to allow the user to have freedom of choice and have their choices affect the world, with the desire to be able to have a story without the player 'ruining' it?" />
  <row Id="5094" PostHistoryTypeId="6" PostId="2482" RevisionGUID="ea8f84f2-4c65-4df3-aaca-0e66831d4ae2" CreationDate="2010-08-11T18:39:42.097" UserId="1495" Comment="removed meta tag (best-practice) and replaced it by relavent scripting tag" Text="&lt;architecture&gt;&lt;c++&gt;&lt;mmo&gt;&lt;scripting&gt;&lt;quests&gt;" />
  <row Id="5095" PostHistoryTypeId="2" PostId="2611" RevisionGUID="7687f296-ee34-4474-8bda-d73cf08df1d4" CreationDate="2010-08-11T18:43:40.433" UserId="51" Text="One relatively easy pattern I've seen several games use to a varying degree of success is to have the player change something about themselves instead of something about the world.  Red Dead Redemption is a good recent example of this.  Basically the idea is that you try to structure your player's goals in a way that they can choose to to &quot;good&quot; vs. &quot;evil&quot;.  The end result is mostly the same (or if it's different the difference doesn't affect much outside of the little area of the world).  &#xD;&#xA;&#xD;&#xA;The way the player feels like the world is changing is then solely due to the semi-emergent behavior of the NPCs reacting to the player given his notoriety.  You set up your NPCs to say random things to the player and have good and evil player chit-chat banks.  You might even go so far as to start structuring the major quests' wording depending on how good/evil the character is.  Maybe you set up some kind of ancillary &quot;faction&quot; system where if the player starts down one path they can reinforce it with a separate (but smaller and therefore more maintainable) set of quests to accomplish.&#xD;&#xA;&#xD;&#xA;Of course it doesn't have to be good/evil.  You could do stealth/action, or whatever kind of choice dichotomy you set up for your player." />
  <row Id="5096" PostHistoryTypeId="16" PostId="2611" RevisionGUID="7687f296-ee34-4474-8bda-d73cf08df1d4" CreationDate="2010-08-11T18:43:40.433" UserId="-1" />
  <row Id="5097" PostHistoryTypeId="2" PostId="2612" RevisionGUID="9fe49d9b-f662-44aa-9f87-46e58b7b1cb7" CreationDate="2010-08-11T19:27:04.540" UserId="1232" Text="It's very possible that this is just a custom format that is not standard. Since most games strip out a lot of unimportant information in their content pipelines, it's entirely possible that the game in question is just rigged to read these files directly with no need of watermarks in the headers. &#xD;&#xA;&#xD;&#xA;If that is the case, one way to detect the file format is to reverse engineer the format, process it as the game would and validate that you get sane results during the processing.&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;00000001 00000001 3100026f 00000001 30000112&#xD;&#xA;or&#xD;&#xA;00000001 00000001 310007b2 00000001 30000112&#xD;&#xA;or&#xD;&#xA;10000006 00000003 310001f6 310001f6 310001f6&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;If you'd like to reverse engineer this format, you'll need more than just the first 5 dwords. I myself can already see some possible patterns in here, but there is no way to tell whether my conclusions are correct without more data from the file or fiddling with the bytes and trying to load it in the game to see what happens." />
  <row Id="5098" PostHistoryTypeId="2" PostId="2613" RevisionGUID="d36b2ec2-4e14-4059-875b-97548584ee4e" CreationDate="2010-08-11T19:53:41.947" UserId="865" Text="There's only a few combinations that can make a match. X.X with one below or above the center (and rotated 90 degrees), and xx. with one to the right or top of the '.' (and the rotated and mirrored on both axes variants. So that makes for 14 different search patterns that need to match a (max 4x3) grid against the 8x8 grid. I'd just brute force and slide the pattern along the 8x8 grid and check if the places where there's an x are the same. If so it's a set that can create a triple.&lt;br&gt;&#xD;&#xA;So basically (for example) slide&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;. . . .&lt;br&gt;&#xD;&#xA;xx.x&lt;br&gt;&#xD;&#xA;. . . .&lt;br&gt;&#xD;&#xA;or (anotheher example)&lt;br&gt;&#xD;&#xA;. x .&lt;br&gt;&#xD;&#xA;x . .&lt;br&gt;&#xD;&#xA;. x .&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;across the board - if all three x positions have the same icon it's a possible move.&lt;br&gt;&#xD;&#xA;And that times 14 for all possible moves.&#xD;&#xA;" />
  <row Id="5099" PostHistoryTypeId="2" PostId="2614" RevisionGUID="fe4a6c68-d43f-4862-bd11-244660d0c58c" CreationDate="2010-08-11T20:11:38.707" UserId="1634" Text="Any time you're doing post-process effects on a set of captured buffers would be a reasonable time to use a multi-pass effect, i.e. toon outlining, motion blur, SSAO, bloom. The idea being that the first pass would be where you'd render everything out to the appropriate buffers, and each subsequent pass would handle each post-process effect.&#xD;&#xA;&#xD;&#xA;Like Ranieri mentioned about the XNACC example, they're using multiple passes to render a huge number of lights. Though in that example, they're executing the same pass, just once for each light.&#xD;&#xA;&#xD;&#xA;Keep in mind that Shader Model 2 and before can't handle having anywhere near as many instructions as Shader Model 3 or 4 in each shader, yet another reason to split an effect into multiple passes  -- to support older hardware." />
  <row Id="5100" PostHistoryTypeId="2" PostId="2615" RevisionGUID="603200ea-043d-4673-a397-4f643ec94208" CreationDate="2010-08-11T20:20:38.950" UserId="1101" Text="Limit yourself to one enemy. :P" />
  <row Id="5101" PostHistoryTypeId="2" PostId="2616" RevisionGUID="ccf8e50e-ed9c-4d49-be71-e539771a868c" CreationDate="2010-08-11T20:58:06.410" UserId="1638" Text="Writing branching story-lines is effective but time consuming and doesn't account for player autonomy to do random things. Players will enjoy the ability to change the story but will still know they are on a planned path. Mass Effect is a good example of this.&#xD;&#xA;&#xD;&#xA;Separate story elements from player autonomy like Red Dead Redemption as Tetrad pointed out. This makes it difficult to allow players to change the story and is very &quot;Theme Park&quot; design.&#xD;&#xA;&#xD;&#xA;Honestly playing a game where you could ruin the story would actually be kind of fun, but you would have to have an appropriate response from the game for doing that though.&#xD;&#xA;&#xD;&#xA;It all comes down to how well you plan out your story." />
  <row Id="5102" PostHistoryTypeId="16" PostId="2616" RevisionGUID="ccf8e50e-ed9c-4d49-be71-e539771a868c" CreationDate="2010-08-11T20:58:06.410" UserId="-1" />
  <row Id="5103" PostHistoryTypeId="2" PostId="2617" RevisionGUID="602c8343-28c2-416d-bfbe-5b1c7015f97e" CreationDate="2010-08-11T21:02:59.317" UserId="1345" Text="what is the most used method or algorithm for saving game state (profiles), databases text files how there encryption goes and things related.&#xD;&#xA;&#xD;&#xA;I have seen Caesar IV used mySQL.&#xD;&#xA;&#xD;&#xA;any suggestions." />
  <row Id="5104" PostHistoryTypeId="1" PostId="2617" RevisionGUID="602c8343-28c2-416d-bfbe-5b1c7015f97e" CreationDate="2010-08-11T21:02:59.317" UserId="1345" Text="game state saving/loading?" />
  <row Id="5105" PostHistoryTypeId="3" PostId="2617" RevisionGUID="602c8343-28c2-416d-bfbe-5b1c7015f97e" CreationDate="2010-08-11T21:02:59.317" UserId="1345" Text="&lt;state&gt;" />
  <row Id="5106" PostHistoryTypeId="2" PostId="2618" RevisionGUID="9798e219-cccb-47f5-972f-686a5fa5c382" CreationDate="2010-08-11T21:28:36.873" UserId="1467" Text="Out of all the &quot;systems&quot; I've seen, new and old, implemented in games, I think Morrowind got very close to achieving a solid balance of freedom coupled with a reason to play the game. &#xD;&#xA;&#xD;&#xA;That is, an extensive, entertaining, epic main-quest and lots of side-quests. And the main-quest actually meant something... as say, compared to Fallout3, *yawn*.&#xD;&#xA;&#xD;&#xA;For example, Borderlands could have been something very special if they had realized this. Oh, and in Morrowind, you could easily ruin the &quot;story.&quot; Bug or Feature? :-)&#xD;&#xA;" />
  <row Id="5107" PostHistoryTypeId="16" PostId="2618" RevisionGUID="9798e219-cccb-47f5-972f-686a5fa5c382" CreationDate="2010-08-11T21:28:36.873" UserId="-1" />
  <row Id="5108" PostHistoryTypeId="2" PostId="2619" RevisionGUID="99a76759-a0e1-4a36-9352-1619d50a51d3" CreationDate="2010-08-11T21:39:33.617" UserId="1467" Text="If you are writing your own code, say in C++, you can use [binary files.][1] Binary files give you a form of encryption through obfuscation. But as documented all over the internets, that is a very weak form of security.&#xD;&#xA;&#xD;&#xA;OR, you can use something like [RapidXML][2] if you want a human readable solution.&#xD;&#xA;&#xD;&#xA;If you are usuing some kind of framework, look into it's file support functions.&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/C_file_input/output&#xD;&#xA;  [2]: http://rapidxml.sourceforge.net/index.htm&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;" />
  <row Id="5109" PostHistoryTypeId="2" PostId="2620" RevisionGUID="f992008e-cccd-4d28-ad09-4c3e583c690f" CreationDate="2010-08-11T22:02:53.257" UserId="550" Text="McCranky covered amazingly all the data structures you mentioned, however I see that you havent considered R-Trees. The body of knowledge on those structures is huge, and they are very suitable for spatial range queries (most of the work have been done by database theorists and practitioners) in the last 30 years. Recently Sebastian Sylvain from Rare has given a course on the GDC on why they work for games too (specially on consoles with in-order processors). You can learn more from its pdf: http://www.gdcvault.com/play/1012452/R-Trees-Adapting-out-of &#xD;&#xA;&#xD;&#xA;A naive and simple implementation is pretty easy, and the basic structure gives you lots of room for improvement (better management of splitting heuristics, prefetching oportunities, parallel searching, etc)." />
  <row Id="5110" PostHistoryTypeId="2" PostId="2621" RevisionGUID="0b8c0762-f87c-40a2-8604-0a3e4ed12fc0" CreationDate="2010-08-11T22:10:55.200" UserId="422" Text="It's not very pretty or elegant, but I wrote a [match-3 game in JavaScript](http://blog.lostdecadegames.com/diggy-open-source-javascript-game-engine-with). Source code on GitHub, you view the match-3 logic right in your web browser: http://github.com/lostdecade/bombada/blob/master/htdocs/js/match3.js#L184" />
  <row Id="5111" PostHistoryTypeId="2" PostId="2622" RevisionGUID="8340d170-f82f-4513-9267-4e31ae93050c" CreationDate="2010-08-11T22:33:28.863" UserId="189" Text="I'm pretty sure it is most often done in a proprietary (binary) format, just writing each variable from whatever game state struct you use into a file, or reading that file back into an instance of the struct. In C++ for example you can treat an object like an array of bytes and just fwrite() it into a file, or fread() from the file and cast it back into its object form.&#xD;&#xA;&#xD;&#xA;If you are using Java you can opt to use serialization to make the task really easy. Just keep all of your game state data in one class, make the class serializable by implementing `Serializable`, use the `transient` keyword if you mix special instantiated variables into the class (transient objects are not serialized), and simply use `ObjectOutputStream` to write to file and `ObjectInputStream` to read from file. It's extremely handy.&#xD;&#xA;&#xD;&#xA;You should absolutely **not** use MySQL (just read the first sentence of [this review][1]). If you really need a [relational database][2] for some reason, use [SQLite][3]; it is a lightweight database system and exists in a single database file. But for most games, relational databases are not the way to go, and companies which try to use them usually end up using them as a key-value lookup table rather than a true relational database.&#xD;&#xA;&#xD;&#xA;**Any sort of encryption of local disk files is only obfuscation**; any hacker will just sniff the data right after your program decrypts it. I'm personally against that sort of thing, ESPECIALLY with one-player games. My view is that the owners of the game (paying customers, mind you) should be allowed to hack at the game if they want to. In some cases it can create a greater sense of community, and &quot;mods&quot; can be developed for your game which drive more customers to you. The most recent example that comes to mind is the [Portal in Minecraft][4] mod that was recently released. It's published in gamer news sites all over the internet, and you can bet it drove up sales of Minecraft.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eurogamer.net/articles/r_caesariv_pc&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Relational_database&#xD;&#xA;  [3]: http://www.sqlite.org/&#xD;&#xA;  [4]: http://www.pcgamer.com/2010/08/09/portal-in-minecraft/" />
  <row Id="5112" PostHistoryTypeId="5" PostId="2622" RevisionGUID="835be1ff-bc43-437d-98ab-1ee4916e070c" CreationDate="2010-08-11T22:38:38.313" UserId="189" Comment="added 561 characters in body; added 57 characters in body" Text="I'm pretty sure it is most often done in a proprietary (binary) format, just writing each variable from whatever game state struct you use into a file, or reading that file back into an instance of the struct. In C++ for example you can treat an object like an array of bytes and just fwrite() it into a file, or fread() from the file and cast it back into its object form.&#xD;&#xA;&#xD;&#xA;If you are using Java or another language you can opt to use **serialization** to make the task really easy. The Java explanation is at the bottom of this answer; other languages (higher-level than C++) surely have their own serialization libraries or built-in functions as well, which you should opt to use. No matter how inefficient the serialization routine might be, hard drive space nowadays is cheap, especially when the game state shouldn't be very large at all, and it prevents you from writing and *maintaining* your own serialization routines.&#xD;&#xA;&#xD;&#xA;You should absolutely **not** use MySQL (just read the first sentence of [this review][1]). If you really need a [relational database][2] for some reason, use [SQLite][3]; it is a lightweight database system and exists in a single database file. But for most games, relational databases are not the way to go, and companies which try to use them usually end up using them as a key-value lookup table rather than a true relational database.&#xD;&#xA;&#xD;&#xA;**Any sort of encryption of local disk files is only obfuscation**; any hacker will just sniff the data right after your program decrypts it. I'm personally against that sort of thing, ESPECIALLY with one-player games. My view is that the owners of the game (paying customers, mind you) should be allowed to hack at the game if they want to. In some cases it can create a greater sense of community, and &quot;mods&quot; can be developed for your game which drive more customers to you. The most recent example that comes to mind is the [Portal in Minecraft][4] mod that was recently released. It's published in gamer news sites all over the internet, and you can bet it drove up sales of Minecraft.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;If for some reason you are actually crazy enough to be using Java for game development like I am, here's a quick explanation of serialization in Java:&#xD;&#xA;&#xD;&#xA;&gt; Keep all of your game state data in one class, make the class serializable by implementing `Serializable`, use the `transient` keyword if you mix special instantiated variables into the class (transient objects are not serialized), and simply use `ObjectOutputStream` to write to file and `ObjectInputStream` to read from file. That's it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eurogamer.net/articles/r_caesariv_pc&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Relational_database&#xD;&#xA;  [3]: http://www.sqlite.org/&#xD;&#xA;  [4]: http://www.pcgamer.com/2010/08/09/portal-in-minecraft/" />
  <row Id="5113" PostHistoryTypeId="2" PostId="2623" RevisionGUID="aaa6b912-3b5c-46c1-82c7-bf7d1f5982c8" CreationDate="2010-08-12T00:01:11.970" UserId="160" Text="Most games I've seen just use hand-written code to read/write from binary files. Often, the on disc format will be an exact replica of the memory layout of an object so loading is just:&#xD;&#xA;&#xD;&#xA;1. Read file into memory.&#xD;&#xA;2. Cast pointer to buffer to object type.&#xD;&#xA;&#xD;&#xA;It's fast, but it's a chore to maintain, platform-specific, and inflexible.&#xD;&#xA;&#xD;&#xA;Lately, I've seen a couple of games use SQLite. People I've talked to seem to like it." />
  <row Id="5115" PostHistoryTypeId="2" PostId="2624" RevisionGUID="95ce1893-a2ba-49db-ba66-dd9ba29a3e61" CreationDate="2010-08-12T00:46:06.667" UserId="1310" Text="I need to add a scrolling background to a my game, the image is 512x512px. It's for a car game with two way traffic and I want to be able to cross over to the opposite side and drive against the traffic too. The game is in portrait mode and I use cocos2d.&#xD;&#xA;&#xD;&#xA;How can I make this in the best possible way?&#xD;&#xA;&#xD;&#xA;I have asked at cocos2d forum but no one is answering.&#xD;&#xA;David" />
  <row Id="5116" PostHistoryTypeId="1" PostId="2624" RevisionGUID="95ce1893-a2ba-49db-ba66-dd9ba29a3e61" CreationDate="2010-08-12T00:46:06.667" UserId="1310" Text="How to create an endless scrolling background?" />
  <row Id="5117" PostHistoryTypeId="3" PostId="2624" RevisionGUID="95ce1893-a2ba-49db-ba66-dd9ba29a3e61" CreationDate="2010-08-12T00:46:06.667" UserId="1310" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="5118" PostHistoryTypeId="2" PostId="2625" RevisionGUID="061b3040-00b6-49a7-9342-a3855f5a3dc1" CreationDate="2010-08-12T01:29:58.523" UserId="865" Text="I'd basically create a 2x2 tilemap where the tiles happen to be 512x512 and all the same. Scroll through it as you would normally but as soon as X gets over 512 subtract 512 (or do a modulo 512 - but beware of negative numbers), same for Y. So instead of one poly you draw 4, although only 1 will be visible most of the time, but on border cases all 4 are visible (when you go 400 down and 400 to the right for example). This way it should scroll on forever.&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Of course you can also use 4 sprites instead of a tilemap. One at worldPos, one at worldPos+(512,0), one at worldPos + (0,512) and one at worldPos + (512,512).&lt;br&gt;&#xD;&#xA;Make sure worldPos is always modulo 512 and again it should scroll forever." />
  <row Id="5119" PostHistoryTypeId="2" PostId="2626" RevisionGUID="2affe622-2626-4dc6-9c3e-52fa5a91544b" CreationDate="2010-08-12T01:34:46.843" UserId="919" Text="Ever try playing a Way of the Samurai game? Your decisions change how the world reacts to you as well as change the story. The caveat though the usually use active time constrains and short time for each play through this way they can minimize the variations available. " />
  <row Id="5120" PostHistoryTypeId="16" PostId="2626" RevisionGUID="2affe622-2626-4dc6-9c3e-52fa5a91544b" CreationDate="2010-08-12T01:34:46.843" UserId="-1" />
  <row Id="5121" PostHistoryTypeId="2" PostId="2627" RevisionGUID="549d4743-1d62-4ff0-b149-c864a56da703" CreationDate="2010-08-12T01:35:26.170" UserId="1134" Text="As an aside, before I dive in: I helped port one of these games to a different platform.  Looking at their AI code for finding potentials: yipe, it's complicated and brutish, and not at all cache-friendly.  (Not that it really has to be, since a small board will fit in cache on most systems.)&#xD;&#xA;&#xD;&#xA;Let's start with some &quot;fun&quot; bit logic.  (Hopefully this won't net me downvotes.  Bear with me.  You may not have bit operations easily available in your language of choice, but the idea of running the search in parallel if at all possible still applies.)&#xD;&#xA;&#xD;&#xA;Assume you have a bitmask representing all of the pieces in a row that are of one particular type.  We'll start with red, and worry about the cost of calculating the bitmask from a 2D array of pieces types later.&#xD;&#xA;&#xD;&#xA;    // let's assume top right indexing for ease of description&#xD;&#xA;    // (the assumption is not necessary, though --&#xD;&#xA;    //    it just makes the left-shift and right-shift operators &#xD;&#xA;    //    look like they're pointing in the correct direction)&#xD;&#xA;&#xD;&#xA;    // this is for row 2&#xD;&#xA;    col index  76543210&#xD;&#xA;    color      BRRGYRBR&#xD;&#xA;    &quot;red&quot; bits 01100101&#xD;&#xA;&#xD;&#xA;(So this might be blue, red, red, green, yellow, red, blue, red, for example.)&#xD;&#xA;&#xD;&#xA;You can fairly easily find the places where there is a pattern that just needs one &quot;fixup&quot; to work.  Courtesy Kaj, this is one of three combinations, basically: `XoX`, `oXX`, or `XXo` where `X` is a matching stone and `o` is something else.&#xD;&#xA;&#xD;&#xA;Let's find all the places where a potential series of 3 exists.  (This idea is borrowed from the marvelous [Hacker's Delight book][1]; see also the [fxtbook][2] if such things delight you.)&#xD;&#xA;&#xD;&#xA;    // using c-style bitwise operators:&#xD;&#xA;    // &amp; is &quot;and&quot;&#xD;&#xA;    // ^ is &quot;xor&quot;&#xD;&#xA;    // | is &quot;or&quot;&#xD;&#xA;    // &lt;&lt; and &gt;&gt; are arithmetic (non-sign-extending) shifts&#xD;&#xA;    &#xD;&#xA;    redBitsThisRow = redBitsRows[2]&#xD;&#xA;&#xD;&#xA;    // find the start of an XoX sequence&#xD;&#xA;    startOfXoXSequence = redBitsThisRow &amp; (redBitsThisRow &lt;&lt; 2);&#xD;&#xA;    // for our example, this will be 00000100&#xD;&#xA;&#xD;&#xA;    // find any two stones together in a row&#xD;&#xA;    startOfXXSequence = redBitsThisRow &amp; (redBitsThisRow &lt;&lt; 1);&#xD;&#xA;    // for our example, this will be 01000000&#xD;&#xA;&#xD;&#xA;It's more useful if we know where the _missing_ stone we need to fill in is:&#xD;&#xA;&#xD;&#xA;    // give us any sequences that might want a stone from the left&#xD;&#xA;    missingLeftStone = startOfXXSequence &lt;&lt; 1;&#xD;&#xA;    // for our example, this will be 10000000&#xD;&#xA;&#xD;&#xA;    // give us any sequences that might want a stone from the right&#xD;&#xA;    missingRightStone = startOfXXSequence &gt;&gt; 2;&#xD;&#xA;    // for our example, this will be 00010000&#xD;&#xA;&#xD;&#xA;    // give us any sequences that might want a stone from the top or bottom&#xD;&#xA;    missingTopOrBottomStone = missingRightStone | missingLeftStone | (startOfXoXSequence &gt;&gt; 1)&#xD;&#xA;    // for our example, this will be 10010010&#xD;&#xA;&#xD;&#xA;(About 1 load and 9 ALU instructions -- 5 shifts, 2 ors, 2 ands -- with a dreadful CPU that doesn't include an inline shifter.  On many architectures these shifts might be free.)&#xD;&#xA;&#xD;&#xA;The nice thing about this is that you're doing computation in parallel.&#xD;&#xA;&#xD;&#xA;Okay, can we match this need?&#xD;&#xA;&#xD;&#xA;    leftMatches = redBitsThisRow &amp; (missingLeftStone &lt;&lt; 1)&#xD;&#xA;    rightMatches = redBitsThisRow &amp; (missingRightStone &gt;&gt; 1)&#xD;&#xA;    topMatches = redBitsRow[1] &amp; missingTopOrBottomStone&#xD;&#xA;    bottomMatches = redBitsRow[3] &amp; missingTopOrBottomStone&#xD;&#xA;&#xD;&#xA;(Another 2 loads and 6 ALU instructions -- 4 ands, 2 shifts -- with a bad CPU.  Note that row 0 and row 7 may give you trouble -- but if you've arranged things right that won't matter, just allocate two extra rows and keep a clear row above and below, and you don't need the possible branch.  This may qualify as &quot;microoptimization&quot;, though.  :grin:)&#xD;&#xA;&#xD;&#xA;And you'll probably want to do something with this stuff when you've gotten it.  This assumes a &quot;count trailing zeros&quot; intrinsic or very cheap inline method:&#xD;&#xA;&#xD;&#xA;    swapType = RIGHT_TO_LEFT;&#xD;&#xA;    matches = leftMatches;&#xD;&#xA;    while ( (colIdx = ctz(matches)) &lt; WORD_BITS ) {&#xD;&#xA;       // rowIdx is 2 in our examples above&#xD;&#xA;       workingSwaps.insert( SwapInfo(rowIdx, colIdx, swapType) );&#xD;&#xA;       // note that this SwapInfo construction could do some more advanced logic:&#xD;&#xA;       //   run the swap on a temporary board and see how much score it accumulates&#xD;&#xA;       //   assign some sort of value based on preferring one type of match to another, etc&#xD;&#xA;&#xD;&#xA;       matches = matches ^ (1&lt;&lt;colIdx); // clear the match, so we can loop to the next&#xD;&#xA;    }&#xD;&#xA;    // repeat for LEFT_TO_RIGHT with rightMatches&#xD;&#xA;    // repeat for TOP_TO_BOTTOM with topMatches&#xD;&#xA;    // repeat for BOTTOM_TO_TOP with bottomMatches&#xD;&#xA;&#xD;&#xA;Note that none of this bitlogic should break down in little-endian vs big-endian evironments, and I should hope your machine words are big enough to fit a row worth of bits -- 8 in this case.  =)&#xD;&#xA;&#xD;&#xA;So this gets you row matches.  What about columns?  It may be easiest just to have two copies of the table, one stored in row-order and one stored in column-order.  If you have getters and setters wrapping board access, this should be trivial.  I don't mind keeping two arrays up to date, after all a set becomes `rowArray[y][x] = newType; colArray[x][y] = newType;` and that's simple.  &#xD;&#xA;&#xD;&#xA;...but managing `rowBits[color][row]` and `colBits[color][col]` becomes obnoxious.&#xD;&#xA;&#xD;&#xA;However, as a quick aside, if you have `rowBits` and `colBits`, you can run the _same code_ with rowBits pointing at colBits instead, and you're good.  Pseudocode:&#xD;&#xA;&#xD;&#xA;    foreach color in colors {&#xD;&#xA;        foreach bits in rowBits, colBits {&#xD;&#xA;            foreach row in 0..7 {&#xD;&#xA;                // find starts, as above but in bits[row]&#xD;&#xA;                // find missings, as above&#xD;&#xA;                // generate matches, as above but in bits[row-1], bits[row], and bits[row+1]&#xD;&#xA;                // loop across bits in each matches var,&#xD;&#xA;                //    evaluate and/or collect them, again as above&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;Okay, what if we don't want the bother with converting a nice 2D array of bytes into bits?  With an 8x8 board and a 64-bit-capable processor, we might be able to get away with it: 8 bytes = 64 bits.  We're locked to our board width, now, but this might be fun.&#xD;&#xA;&#xD;&#xA;Let's do that, then.  Assume each stone is an 8 bit byte in memory.  Assume &quot;0&quot; is reserved, stones begin at 1 and go to NUM_STONE_TYPES inclusive.&#xD;&#xA;&#xD;&#xA;    startOfXXSequence = rowBytes ^ (rowBytes &lt;&lt; (8*1))&#xD;&#xA;    // now all bytes that are 0x00 are the start of a XX sequence&#xD;&#xA;&#xD;&#xA;    startOfXoXSequence = rowBytes ^ (rowBytes &lt;&lt; (8*2))&#xD;&#xA;    // all bytes that are 0x00 are the start of a XoX sequence&#xD;&#xA;&#xD;&#xA;Note this doesn't need one pass per color.  In `BRBRBRGY` we'll get a startOfXoXSequence that might be something like `0x00 00 00 00 aa bb cc dd` -- the top four bytes will be zero, indicating a possible sequence starts there.&#xD;&#xA;&#xD;&#xA;It's getting late, so I'll leave off here and possibly come back later -- you can continue along this vein with xors and &quot;detect first zero byte&quot; tricks, or you could look into some integer [SIMD][3] extensions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hackersdelight.org/&#xD;&#xA;  [2]: http://www.jjj.de/fxt/#fxtbook&#xD;&#xA;  [3]: https://secure.wikimedia.org/wikipedia/en/wiki/SIMD" />
  <row Id="5122" PostHistoryTypeId="5" PostId="1747" RevisionGUID="449c0cc7-5d24-4c22-88b0-d19f871176b0" CreationDate="2010-08-12T02:49:52.607" UserId="1024" Comment="added 141 characters in body" Text="Re-parameterize it by arc length and sample uniformly. If you need help doing the math, I would ask it here:  &#xD;&#xA;http://math.stackexchange.com/&#xD;&#xA;&#xD;&#xA;it was also asked here:&#xD;&#xA;http://mathoverflow.net/questions/28070/finding-n-points-that-are-equidistant-around-the-circumference-of-an-ellipse" />
  <row Id="5123" PostHistoryTypeId="5" PostId="2611" RevisionGUID="ca4ef7a3-409e-4667-abf6-620d5ce4b1df" CreationDate="2010-08-12T04:18:40.053" UserId="51" Comment="edited body" Text="One relatively easy pattern I've seen several games use to a varying degree of success is to have the player change something about themselves instead of something about the world.  Red Dead Redemption is a good recent example of this.  Basically the idea is that you try to structure your player's goals in a way that they can choose to do &quot;good&quot; vs. &quot;evil&quot;.  The end result is mostly the same (or if it's different the difference doesn't affect much outside of the little area of the world).  &#xD;&#xA;&#xD;&#xA;The way the player feels like the world is changing is then solely due to the semi-emergent behavior of the NPCs reacting to the player given his notoriety.  You set up your NPCs to say random things to the player and have good and evil player chit-chat banks.  You might even go so far as to start structuring the major quests' wording depending on how good/evil the character is.  Maybe you set up some kind of ancillary &quot;faction&quot; system where if the player starts down one path they can reinforce it with a separate (but smaller and therefore more maintainable) set of quests to accomplish.&#xD;&#xA;&#xD;&#xA;Of course it doesn't have to be good/evil.  You could do stealth/action, or whatever kind of choice dichotomy you set up for your player." />
  <row Id="5124" PostHistoryTypeId="5" PostId="2627" RevisionGUID="ce879034-203f-4a4f-84cc-944d1aa94d3f" CreationDate="2010-08-12T04:44:17.437" UserId="1134" Comment="reworded anecdote/disclaimer a bit, removed a bunch of fluff, standardized on &quot;cells&quot; and &quot;stones&quot;" Text="I helped port one of these games to a handheld platform.  Looking back at their AI code for finding potentials: yipe, it's complicated, brutish (quadruply nested loop, calls itself recursively occasionally, etc), and it doesn't appear at all cache-friendly at first glance.&#xD;&#xA;&#xD;&#xA;(Some of that complexity comes from trying to evaluate the strength of the move in context: valuing longer chains higher, looking for combos, etc...)&#xD;&#xA;&#xD;&#xA;But it doesn't really need to be &quot;optimal&quot;; we didn't even touch the code when we ported it.  It never showed up on the profiler.&#xD;&#xA;&#xD;&#xA;Looking at it now, even at one 32 bit word per cell (and I think they actually used a byte per cell), the entire board will fit in a minuscule L1 cache, and you can do many excess reads on stuff that's cached without impacting framerate too much.  _Especially_ since you only need to do this whole process once each time the board configuration changes.  (A [big-theta][1] hovering around `n^2` isn't that horribly bad with a very low `n`, not to mention the small multiplier given the cached memory.)&#xD;&#xA;&#xD;&#xA;That having been said: for amusement, let's attempt to parallelize the problem.  Starting with bitwise operations.&#xD;&#xA;&#xD;&#xA;Assume you have a bitmask representing all of the pieces (we'll call them stones) in a row that are of one particular type (we'll use colors to distinguish types).  We'll start only looking at red stones, and worry about the cost of calculating the bitmask later.&#xD;&#xA;&#xD;&#xA;    // Let's assume top right indexing.&#xD;&#xA;    // (The assumption is not necessary, --&#xD;&#xA;    //    it just makes the left-shift and right-shift operators &#xD;&#xA;    //    look like they're pointing in the correct direction.)&#xD;&#xA;&#xD;&#xA;    // this is for row 2&#xD;&#xA;    col index  76543210&#xD;&#xA;    color      BRRGYRBR // blue, red, red, green, yellow, ...&#xD;&#xA;    &quot;red&quot; bits 01100101&#xD;&#xA;&#xD;&#xA;We're looking for the series that need just one swap to become a series of 3.  Courtesy Kaj, this is one of three combinations, basically: `XoX`, `oXX`, or `XXo` where `X` is a matching stone and `o` is something else.&#xD;&#xA;&#xD;&#xA;(This idea is borrowed from the marvelous [Hacker's Delight book][2]; see also the [fxtbook][3] if such things delight you.)&#xD;&#xA;&#xD;&#xA;    // using c-style bitwise operators:&#xD;&#xA;    // &amp; is &quot;and&quot;&#xD;&#xA;    // ^ is &quot;xor&quot;&#xD;&#xA;    // | is &quot;or&quot;&#xD;&#xA;    // &lt;&lt; and &gt;&gt; are arithmetic (non-sign-extending) shifts&#xD;&#xA;    &#xD;&#xA;    redBitsThisRow = redBitsRows[2]&#xD;&#xA;&#xD;&#xA;    // find the start of an XoX sequence&#xD;&#xA;    startOfXoXSequence = redBitsThisRow &amp; (redBitsThisRow &lt;&lt; 2);&#xD;&#xA;    // for our example, this will be 00000100&#xD;&#xA;&#xD;&#xA;    // find any two stones together in a row&#xD;&#xA;    startOfXXSequence = redBitsThisRow &amp; (redBitsThisRow &lt;&lt; 1);&#xD;&#xA;    // for our example, this will be 01000000&#xD;&#xA;&#xD;&#xA;It's more useful to know the positions of the missing stones, not the start of the XX or XoX sequence:&#xD;&#xA;&#xD;&#xA;    // give us any sequences that might want a stone from the left&#xD;&#xA;    missingLeftStone = startOfXXSequence &lt;&lt; 1;&#xD;&#xA;    // for our example, this will be 10000000&#xD;&#xA;&#xD;&#xA;    // give us any sequences that might want a stone from the right&#xD;&#xA;    missingRightStone = startOfXXSequence &gt;&gt; 2;&#xD;&#xA;    // for our example, this will be 00010000&#xD;&#xA;&#xD;&#xA;    // give us any sequences that might want a stone from the top or bottom&#xD;&#xA;    missingTopOrBottomStone = missingRightStone | missingLeftStone | (startOfXoXSequence &gt;&gt; 1)&#xD;&#xA;    // for our example, this will be 10010010&#xD;&#xA;&#xD;&#xA;(About 1 load and 9 ALU instructions -- 5 shifts, 2 ors, 2 ands -- with a dreadful CPU that doesn't include an inline shifter.  On many architectures these shifts might be free.)&#xD;&#xA;&#xD;&#xA;Can we fill these missing places?&#xD;&#xA;&#xD;&#xA;    // look to the left, current row&#xD;&#xA;    leftMatches = redBitsThisRow &amp; (missingLeftStone &lt;&lt; 1)&#xD;&#xA;&#xD;&#xA;    // look to the right, current row&#xD;&#xA;    rightMatches = redBitsThisRow &amp; (missingRightStone &gt;&gt; 1)&#xD;&#xA;&#xD;&#xA;    // look on the row above&#xD;&#xA;    topMatches = redBitsRow[1] &amp; missingTopOrBottomStone&#xD;&#xA;&#xD;&#xA;    // look on the row below&#xD;&#xA;    bottomMatches = redBitsRow[3] &amp; missingTopOrBottomStone&#xD;&#xA;&#xD;&#xA;(Another 2 loads and 6 ALU instructions -- 4 ands, 2 shifts -- with a bad CPU.  Note that row 0 and row 7 may give you trouble -- you can choose to branch around these calculations, or avoid the branch by allocating space for two extra rows, one before 0 and one after 7, and leave them zeroed out.)&#xD;&#xA;&#xD;&#xA;Now we have several &quot;matches&quot; vars that indicate the position of a stone that can be swapped in to make a match.&#xD;&#xA;&#xD;&#xA;This assumes a &quot;count trailing zeros&quot; intrinsic or very cheap inline method:&#xD;&#xA;&#xD;&#xA;    swapType = RIGHT_TO_LEFT;&#xD;&#xA;    matches = leftMatches;&#xD;&#xA;    while ( (colIdx = ctz(matches)) &lt; WORD_BITS ) {&#xD;&#xA;       // rowIdx is 2 in our examples above&#xD;&#xA;       workingSwaps.insert( SwapInfo(rowIdx, colIdx, swapType) );&#xD;&#xA;       // note that this SwapInfo construction could do some more advanced logic:&#xD;&#xA;       //   run the swap on a temporary board and see how much score it accumulates&#xD;&#xA;       //   assign some sort of value based on preferring one type of match to another, etc&#xD;&#xA;&#xD;&#xA;       matches = matches ^ (1&lt;&lt;colIdx); // clear the match, so we can loop to the next&#xD;&#xA;    }&#xD;&#xA;    // repeat for LEFT_TO_RIGHT with rightMatches&#xD;&#xA;    // repeat for TOP_TO_BOTTOM with topMatches&#xD;&#xA;    // repeat for BOTTOM_TO_TOP with bottomMatches&#xD;&#xA;&#xD;&#xA;Note that none of this bit logic should break down in little-endian vs big-endian environments.  It gets much more tricky for boards wider than your machine word size.  (You could experiment with something like `std::bitset` for this.)&#xD;&#xA;&#xD;&#xA;What about columns?  It may be easiest just to have two copies of the table, one stored in row-order and one stored in column-order.  If you have getters and setters wrapping board access, this should be trivial.  I don't mind keeping two arrays up to date, after all a set becomes `rowArray[y][x] = newType; colArray[x][y] = newType;` and that's simple.  &#xD;&#xA;&#xD;&#xA;...but managing `rowBits[color][row]` and `colBits[color][col]` becomes obnoxious.&#xD;&#xA;&#xD;&#xA;However, as a quick aside, if you do have `rowBits` and `colBits`, you can run the _same code_ with rowBits pointing at colBits instead.  Pseudocode, assuming board width = board height = 8 in this case...&#xD;&#xA;&#xD;&#xA;    foreach color in colors {&#xD;&#xA;        foreach bits in rowBits, colBits {&#xD;&#xA;            foreach row in 0..7 { // row is actually col the second time through&#xD;&#xA;                // find starts, as above but in bits[row]&#xD;&#xA;                // find missings, as above&#xD;&#xA;                // generate matches, as above but in bits[row-1], bits[row], and bits[row+1]&#xD;&#xA;                // loop across bits in each matches var,&#xD;&#xA;                //    evaluate and/or collect them, again as above&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;What if we don't want the bother with converting a nice 2D array into bits?  With an 8x8 board, 8 bits per cell, and a 64-bit-capable processor, we might be able to get away with it: 8 cells = 8 bytes = 64 bits.  We're locked to our board width, now, but this seems promising.&#xD;&#xA;&#xD;&#xA;Assume &quot;0&quot; is reserved, stones begin at 1 and go to NUM_STONE_TYPES inclusive.&#xD;&#xA;&#xD;&#xA;    startOfXXSequence = rowBytes ^ (rowBytes &lt;&lt; (8*1))&#xD;&#xA;    // now all bytes that are 0x00 are the start of a XX sequence&#xD;&#xA;&#xD;&#xA;    startOfXoXSequence = rowBytes ^ (rowBytes &lt;&lt; (8*2))&#xD;&#xA;    // all bytes that are 0x00 are the start of a XoX sequence&#xD;&#xA;&#xD;&#xA;Note this doesn't need one pass per color.  In `BRBRBRGY` we'll get a `startOfXoXSequence` that might be something like `0x00 00 00 00 aa bb cc dd` -- the top four bytes will be zero, indicating a possible sequence starts there.&#xD;&#xA;&#xD;&#xA;It's getting late, so I'll leave off here and possibly come back later -- you can continue along this vein with xors and &quot;detect first zero byte&quot; tricks, or you could look into some integer [SIMD][4] extensions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Big_O_notation&#xD;&#xA;  [2]: http://www.hackersdelight.org/&#xD;&#xA;  [3]: http://www.jjj.de/fxt/#fxtbook&#xD;&#xA;  [4]: https://secure.wikimedia.org/wikipedia/en/wiki/SIMD" />
  <row Id="5125" PostHistoryTypeId="2" PostId="2628" RevisionGUID="c6ecd657-abc8-4272-b33f-6d5e637031ac" CreationDate="2010-08-12T05:48:25.887" UserId="1251" Text="The set linear velocity doesnt affect a sprite when written inside an event handler.. but if i call setlinear velocity inside the main constructor..ie if the setlinearvelocity is called at the beginning of game code ..it moves..but not when i call it within a event handler..either keypress or mouse,it doesnt work?&#xD;&#xA;&#xD;&#xA;Please ..any help would be greatly appreciated" />
  <row Id="5126" PostHistoryTypeId="1" PostId="2628" RevisionGUID="c6ecd657-abc8-4272-b33f-6d5e637031ac" CreationDate="2010-08-12T05:48:25.887" UserId="1251" Text="trouble in box2d flash with invoking a setLinearVelocity() from inside an eventHandler" />
  <row Id="5127" PostHistoryTypeId="3" PostId="2628" RevisionGUID="c6ecd657-abc8-4272-b33f-6d5e637031ac" CreationDate="2010-08-12T05:48:25.887" UserId="1251" Text="&lt;flash&gt;" />
  <row Id="5128" PostHistoryTypeId="5" PostId="2594" RevisionGUID="c08abcd6-00a7-4b39-a865-4f9fa35015ba" CreationDate="2010-08-12T06:10:39.273" UserId="119" Comment="edited body" Text="Alternate version of ZorbaTHut's answer:&#xD;&#xA;       &#xD;&#xA;    bool DoBoxesIntersect(Box a, Box b) {&#xD;&#xA;         return (abs(a.x - b.x) &lt; (a.width + b.width) / 2) &amp;&amp;&#xD;&#xA;         (abs(a.y - b.y) &lt; (a.height + b.height) / 2);&#xD;&#xA;    }" />
  <row Id="5129" PostHistoryTypeId="2" PostId="2629" RevisionGUID="5dc6bb3c-d4e3-46ff-86c1-2afcef389e55" CreationDate="2010-08-12T06:23:28.077" UserId="865" Text="Could it be that the event handler gets called at the wrong time in Box2D's pipeline? Or are you not unintentionally overwriting it somewhere else (like in an update loop)? Could you set a variable to the desired velocity in the event handler and set that velocity in an update that gets called more regularly?&lt;br&gt;&#xD;&#xA;Pure speculation - I never used flash's event system the way it's supposed to be used (I prefer update loops) and I never used Box2D so take it for what it's worth." />
  <row Id="5130" PostHistoryTypeId="2" PostId="2630" RevisionGUID="67069cce-971f-4968-9366-27e8794e7a8b" CreationDate="2010-08-12T06:34:35.607" UserId="1120" Text="You're overthinking the problem.  In a single line of 8, there are 5 possible positions for a match-3, so for the whole 8x8 board there are only 80 possible match-3s.  Checking 80 possibilities uses an insignificant amount of CPU time.  You're probably using thousands times more clock cycles just drawing one frame.&#xD;&#xA;&#xD;&#xA;If you're looking for swap-two-adjacent moves that can make match 3s...  For each possible position, if there are already 2 pieces that match, there are at most 3 possible swaps that can make a match 3.  So for one line, there are at most 15 moves to consider, and for the whole board there are at most 240 moves to consider.  Checking 240 moves is also an insignificant amount of CPU time.&#xD;&#xA;" />
  <row Id="5131" PostHistoryTypeId="2" PostId="2631" RevisionGUID="67e8a475-b75d-4852-abc2-1ec8f32592af" CreationDate="2010-08-12T06:40:29.447" UserId="865" Text="I'm old, oldskool, and a cycle counter. In my own work I use raw pointers and no dynamic allocations at runtime (except the pools themselves). Everything is pooled, and ownership is very strict and never transferable, if really needed I write a custom small block allocator. I make sure that there is a state during game for every pool to clear itself. When things get hairyI do wrap objects in handles so I can relocate them, but I'd rather not. Containers are custom and extremely bare bones. I also don't reuse code.&lt;br&gt;&#xD;&#xA;While I would never argue the virtue of all the smart pointers and containers and iterators and whatnot, I am known for being able to code extremely fast (and reasonably reliable - although it's not advisable for others to jump into my code for somewhat obvious reasons, like heart-attacks and perpetual nightmares).&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;At work, of course, all is different, unless I am prototyping, which I thankfully get to do a lot. " />
  <row Id="5132" PostHistoryTypeId="16" PostId="2631" RevisionGUID="67e8a475-b75d-4852-abc2-1ec8f32592af" CreationDate="2010-08-12T06:40:29.447" UserId="-1" />
  <row Id="5133" PostHistoryTypeId="2" PostId="2632" RevisionGUID="bc08ef0a-89ac-44e9-bded-e62bb587a17f" CreationDate="2010-08-12T06:48:27.120" UserId="1120" Text="The first version of this I ever saw was in the ancient roguelike game Moria.  Each monster species has a parameter aaf, meaning area-of-affect.  If you're outside the monster's aaf, it doesn't move at all." />
  <row Id="5134" PostHistoryTypeId="2" PostId="2633" RevisionGUID="7a7f52e7-f640-41a8-a7cd-216c3e2f380a" CreationDate="2010-08-12T07:10:48.693" UserId="865" Text="Depending on the problem you try to solve you might be better off keeping track of your object while you move them, ie, keep a list of sorted x start and end positions and one for start and end y positions. If you have to do a LOT of overlap checks and therefore need to optimize, you can use this to your advantage, as you can immediately look up who is ending closes to your left, everyone who's ending is to the left of that can be pruned immediately. Same apply for top, bottom and right.&lt;br&gt;&#xD;&#xA;The bookkeeping costs time of course, so it's more suited for a situation with few moving objects but lots of overlap checks.&lt;br&gt;&#xD;&#xA;Another optionh is spatial hashing, where you bucket the objects based on approximate position (size might put em in multiple buckets), but there again, only if there's a lot of objects, with relatively few of them moving per iteration due to bookkeeping cost.&lt;br&gt;&#xD;&#xA;Basically anything that avoids (n*n)/2 (if you check object a against b you won't have to check b against a obviously) helps more than optimizing bounding box checks. If bounding box checks are a bottleneck, I'd seriously advise to look into alternative solutions to the problem." />
  <row Id="5135" PostHistoryTypeId="2" PostId="2634" RevisionGUID="d5950224-8051-4285-ab7e-731bff955307" CreationDate="2010-08-12T08:32:30.790" UserId="1610" Text="If you drew a cube and textured it you would have a cube, not a room.&#xD;&#xA;I don't know how XNA define &quot;primitive&quot;, but what you should be doing is drawing polygons to form a square or a rectangle for a single wall of your corridor." />
  <row Id="5136" PostHistoryTypeId="5" PostId="2587" RevisionGUID="d9b4d90c-963f-40eb-a2d7-3680eba09d43" CreationDate="2010-08-12T08:38:21.120" UserId="1580" Comment="added 47 characters in body" Text="When it comes to boost's pointers specifically, I think that they should be avoided as long as their implementation is not exactly what you need. They do come at a cost that is larger  than anyone would initially expect. They provide an interface that allows you to skip vital and important parts of your memory and resourcement management. &#xD;&#xA;&#xD;&#xA;When it comes to any software development I think that it is important to think about your data. It is very important how your data is represented in memory. The reason for this is that CPU-speed has been increasing at a much greater rate than memory-access time. This often makes the memory-caches the main bottleneck of most modern computer games. By having your data aligned linearly in memory according to access order is much friendlier to the cache. This kind of solutions often lead to cleaner designs, simpler code and definetly code that is more easy to debug. Smart pointers easily lead to frequent dynamic memory allocations of resources, this causes them to be scattered all over the memory.&#xD;&#xA;&#xD;&#xA;This is not a premature optimization, it's a healthy decision that can and should be taken as early as possible. It's a question of architectural understanding of the hardware that your software will run on and it is important.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;There are a few things to consider regarding the performance of shared-pointers:&#xD;&#xA;&#xD;&#xA;- The reference counter is heap allocated.&#xD;&#xA;- If you use thread-safety enabled, reference counting is done via interlocked operations.&#xD;&#xA;- Passing the pointer by value modifies reference count, which means interlocked operations most likely using random access in memory (locks + likely cache miss).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5137" PostHistoryTypeId="2" PostId="2635" RevisionGUID="c2ef3d0b-51c1-418a-b2c2-a41b7d1896fa" CreationDate="2010-08-12T12:04:01.097" UserId="678" Text="In theory you can build the entire level in some 3D editor (MAX, Blender etc), export it as a single model and draw it using the methods explained in XNA's 3D game tutorial.&#xD;&#xA;&#xD;&#xA;This is not what you want, unless we are dealing with very small spaces.&#xD;&#xA;&#xD;&#xA;Usually the world geometry is partitioned for (mainly) the following reasons:&#xD;&#xA;&#xD;&#xA; 1. Ensure you do not have to push more geometry than necessary to the hardware. There is no poing drawing the entire level if you are inside a room with all the doors closed.&#xD;&#xA; 1. Limit the number of polygons you need to test for collision detection etc.&#xD;&#xA;&#xD;&#xA;The two techniques used for this purpose are binary space partitioning (BSP), used by doom/quake and friends, and portal/cell (of Unreal fame). There are advantages and disadvantages to both techniques. Both are a substantial amount of work to implement from first principles.&#xD;&#xA;&#xD;&#xA;I recommend you base your work on an existing engine that does this for you. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="5138" PostHistoryTypeId="2" PostId="2636" RevisionGUID="b6170e1a-3a5a-45e1-8633-38bce99edd45" CreationDate="2010-08-12T12:06:51.917" UserId="1463" Text="If I understand you correctly, you can create a set of images. Each image has an entry point and an exit point.  To make things easy, you can make all the entry points and exits the same location.  Then, you can randomly go between different images so that the player won't encounter a completely redundant level.  If you want to mix things up a bit, you could create images that have different entrance and exits.  You'll just have to do a little more work to make sure the exit of one image matches the entrance of the next image." />
  <row Id="5139" PostHistoryTypeId="5" PostId="2635" RevisionGUID="6fb480b3-dfd1-46d5-868b-6335e44fd5cc" CreationDate="2010-08-12T12:17:04.813" UserId="678" Comment="added 21 characters in body" Text="In theory you can build the entire level in some 3D editor (MAX, Blender etc), export it as a single model and draw it using the methods explained in XNA's 3D game tutorial.&#xD;&#xA;&#xD;&#xA;This is not what you want, unless we are dealing with very small spaces.&#xD;&#xA;&#xD;&#xA;Usually the world geometry is partitioned for (mainly) the following reasons:&#xD;&#xA;&#xD;&#xA; 1. Ensure you do not have to push more geometry than necessary to the hardware. There is no poing drawing the entire level if you are inside a room with all the doors closed.&#xD;&#xA; 1. Limit the number of polygons you need to test for collision detection etc.&#xD;&#xA;&#xD;&#xA;The two main techniques used for this purpose in indoor scenes are binary space partitioning (BSP), used by doom/quake and friends, and portal/cell (of Unreal fame). There are advantages and disadvantages to both techniques. Both are a substantial amount of work to implement from first principles.&#xD;&#xA;&#xD;&#xA;I recommend you base your work on an existing engine that does this for you.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5140" PostHistoryTypeId="2" PostId="2637" RevisionGUID="d3bd45bf-dcfa-4d74-a2df-79a47589eb0f" CreationDate="2010-08-12T12:25:51.380" UserId="1463" Text="Shadow maps for creating shadows can be done using multi-pass.  Just a note, some multi-pass effects can be done in one pass if the video card supports the same number of texture units as the number of passes.  So, if you don't have enough texture units, then you will have to use multiple passes.  One fixed hardware platforms (like game consoles), you can probably code just using multi-texturing because you know the number of texture units.  But for PCs, there are infinite number of hardware configurations.  If you want to have the broadest reach to consumers, you'll probably want to break up some of your more complex effects into multiple passes so that users with lower grade hardware (i.e. don't have as many texture units on GPU) can still see the effect.&#xD;&#xA;Briefly, shadow maps are created by first creating a shadow map of the scene from the perspective of the light in one pass.  Then the shadow map texture is blended into the scene with the other textures of the scene." />
  <row Id="5141" PostHistoryTypeId="2" PostId="2638" RevisionGUID="a72e7777-de33-433e-a681-036774cd49c0" CreationDate="2010-08-12T14:28:53.303" UserId="204" Text="Serialization is mentioned in some of the other answers, and I agree that is a reasonable solution. One way it fails though is in versioning.&#xD;&#xA;&#xD;&#xA;Say you release your game and people play it and create some save games. Then in a later patch you want to fix a bug or add some features. If you use a simple binary serialization method and you add a member to your classes your serialization may not be compatible with the old save games when the customers install your patch.&#xD;&#xA;&#xD;&#xA;So whatever approach you use, make sure you think of this issue before you release the game the first time! Customers will not be happy if they have to start over after applying a patch.&#xD;&#xA;&#xD;&#xA;One way to avoid this is to have each basic data type implement Save(version) and Load(version) methods that are smart enough to know what data to save and load for each version of the game. That way you can support backward compatibility of your save games and fail gracefully if a user tries to load a save game from a newer version of the game than they are running. " />
  <row Id="5142" PostHistoryTypeId="6" PostId="2624" RevisionGUID="1211cf66-c0ef-4782-ad53-ba85481da199" CreationDate="2010-08-12T14:29:59.743" UserId="204" Comment="edited tags" Text="&lt;assets&gt;&lt;art&gt;&lt;cocos2d-iphone&gt;&lt;level-design&gt;" />
  <row Id="5143" PostHistoryTypeId="6" PostId="2457" RevisionGUID="fbccebc4-3778-4334-a73a-6fc3e41bde14" CreationDate="2010-08-12T14:51:59.143" UserId="1541" Comment="edited tags" Text="&lt;opengl&gt;&lt;c#&gt;&lt;windows&gt;" />
  <row Id="5144" PostHistoryTypeId="2" PostId="2639" RevisionGUID="e9d5a7b9-b772-43dc-8d63-13873220624a" CreationDate="2010-08-12T15:00:22.883" UserId="1541" Text="Here's the solution I've got so far&#xD;&#xA;&#xD;&#xA;    [DllImport(&quot;User32.dll&quot;)]&#xD;&#xA;    static extern IntPtr FindWindow(string lpClassName, string lpWindowName);&#xD;&#xA;    [DllImport(&quot;User32.dll&quot;)]&#xD;&#xA;    static extern IntPtr GetFocus();&#xD;&#xA;    &#xD;&#xA;    public bool HasFocus(string windowName)&#xD;&#xA;    {&#xD;&#xA;        IntPtr windowHwnd = FindWindow(null, windowName);&#xD;&#xA;        if (windowHwnd == IntPtr.Zero)&#xD;&#xA;            return false;&#xD;&#xA;        return windowHwnd.ToInt32() == GetFocus().ToInt32()&#xD;&#xA;    }" />
  <row Id="5145" PostHistoryTypeId="2" PostId="2640" RevisionGUID="4662cfce-f61a-464d-8f8b-ea9eb0bc569f" CreationDate="2010-08-12T15:44:10.267" UserId="192" Text="I'm still implementing my scene graph (see [this question][1]). Now, I wonder if a spatial representation such as a Kd-Tree or Octree to do View Frustum Culling (VFC) only makes sense with static geometry. The reason for my doubt is that usually dynamic geometry is a small part of the scene, while static geometry can be very large, and dynamic geometry forces to handle updates in the spatial representation at each frame. &#xD;&#xA;&#xD;&#xA;Your opinions?&#xD;&#xA;&#xD;&#xA;Tunnuz&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2491/whats-a-good-data-struture-solution-for-a-scene-manager-in-xna" />
  <row Id="5146" PostHistoryTypeId="1" PostId="2640" RevisionGUID="4662cfce-f61a-464d-8f8b-ea9eb0bc569f" CreationDate="2010-08-12T15:44:10.267" UserId="192" Text="Do Octrees, Kd-Trees, BSP make just sense for static geometry?" />
  <row Id="5147" PostHistoryTypeId="3" PostId="2640" RevisionGUID="4662cfce-f61a-464d-8f8b-ea9eb0bc569f" CreationDate="2010-08-12T15:44:10.267" UserId="192" Text="&lt;performance&gt;&lt;scene-graph&gt;" />
  <row Id="5148" PostHistoryTypeId="5" PostId="2491" RevisionGUID="25096b40-3f6a-4df1-af4b-0001eead20cf" CreationDate="2010-08-12T15:47:35.400" UserId="192" Comment="deleted 1 characters in body; edited tags" Text="I'm playing with XNA for a game project of myself, I had previous exposure to OpenGL and worked a bit with Ogre, so I'm trying to get the same concepts working on XNA. &#xD;&#xA;&#xD;&#xA;Specifically I'm trying to add to XNA a scene manager to handle hierarchical transforms, frustum (maybe even occlusion) culling and transparency object sorting.&#xD;&#xA;&#xD;&#xA;My plan was to build a tree scene manager to handle hierarchical transforms and lighting, and then use an Octree for frustum culling and object sorting. The problem is how to do geometry sorting to support transparencies correctly. I know that sorting is very expensive if done on a per-polygon basis, so expensive that it is not even managed by Ogre.&#xD;&#xA;But still images from Ogre look right.&#xD;&#xA;&#xD;&#xA;Any ideas on how to do it and which data structures to use and their capabilities? I know people around is using:&#xD;&#xA;&#xD;&#xA; - Octrees&#xD;&#xA; - Kd-trees (someone on GameDev forum said that these are far better than Octrees)&#xD;&#xA; - BSP (which should handle per-polygon ordering but are very expensive)&#xD;&#xA; - BVH (but just for frustum and occlusion culling)&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;Tunnuz" />
  <row Id="5149" PostHistoryTypeId="6" PostId="2491" RevisionGUID="25096b40-3f6a-4df1-af4b-0001eead20cf" CreationDate="2010-08-12T15:47:35.400" UserId="192" Comment="deleted 1 characters in body; edited tags" Text="&lt;performance&gt;&lt;3d-engines&gt;&lt;graphics-programming&gt;" />
  <row Id="5150" PostHistoryTypeId="2" PostId="2641" RevisionGUID="b48b7843-7a1b-40ed-80b8-046d3397eabd" CreationDate="2010-08-12T15:51:29.687" UserId="353" Text="Generally I've used a separate partition tree for static and dynamic objects, or just disregarded it altogether for dynamic objects. This provides the benefits of both worlds:&#xD;&#xA;&#xD;&#xA;- Static objects require no recalculation of the tree each frame&#xD;&#xA;- Dynamic objects only require the recalculation of a minimal tree&#xD;&#xA;&#xD;&#xA;If drawing your dynamic objects all the time doesn't provide too much of a performance hit, it can sometimes be better to just dispense with recalculating a tree for them every frame. &#xD;&#xA;&#xD;&#xA;Another optimization is to only recalculate the tree when objects have moved a certain distance or are traveling at sufficiently high speeds, otherwise you'll probably end up with the same tree every frame anyway." />
  <row Id="5151" PostHistoryTypeId="2" PostId="2642" RevisionGUID="a9a0c8f4-7a2b-489a-8b72-e4aacfeb7e0d" CreationDate="2010-08-12T17:00:20.807" UserId="1058" Text="I'm working on a 2D sprite-based strategy-type game (ok, full disclosure: it's a tower defense game), and I'm having a problem getting the actors to behave correctly when I move the camera. &#xD;&#xA;&#xD;&#xA;I've got a `Camera` class, which contains data and methods for moving the camera and exposing its' current position. When I draw the background, I offset the background thusly (and it works great):&#xD;&#xA;&#xD;&#xA;    var backPos = new Vector2(background_bounds.X - camera.CameraPositionX, &#xD;&#xA;                              background_bounds.Y - camera.CameraPositionY);&#xD;&#xA;    spriteBatch.Draw(background_texture, backPos, Color.White);&#xD;&#xA;&#xD;&#xA;My sprites each have a `GraphicsComponent` that directs the rendering. I've been playing around with different combinations, but none seems to give the proper (expected behavior); I lose collision detection (done via my `CollisionComponent` object), or the physics misbehave, etc, because actor's position is different than what the other components expected. Here's the `GraphicsComponent.Draw(...Camera camera)`:&#xD;&#xA;&#xD;&#xA;     //...snip&#xD;&#xA;     var adjustedPosition = new Vector2(actor.Position.X - drawOffsetX, &#xD;&#xA;                                        actor.Position.Y - drawOffsetY);&#xD;&#xA;     //Uncommenting this line doesn't work either - just makes things seem worse&#xD;&#xA;     //actor.Position = adjustedPosition; &#xD;&#xA;     DrawContext.Draw(actor.Texture, adjustedPosition, &#xD;&#xA;                      actor.SpriteBounds, DrawColor);&#xD;&#xA;&#xD;&#xA;How do you folks approach applying camera offsets to sprites in a way that avoids exposing the camera to every component? Do you offset the _actual_ position by the camera's position, or do you simply render the position with the offset, and compensate elsewhere?" />
  <row Id="5152" PostHistoryTypeId="1" PostId="2642" RevisionGUID="a9a0c8f4-7a2b-489a-8b72-e4aacfeb7e0d" CreationDate="2010-08-12T17:00:20.807" UserId="1058" Text="Scrolling 2D sprites on a map with a camera" />
  <row Id="5153" PostHistoryTypeId="3" PostId="2642" RevisionGUID="a9a0c8f4-7a2b-489a-8b72-e4aacfeb7e0d" CreationDate="2010-08-12T17:00:20.807" UserId="1058" Text="&lt;2d&gt;&lt;xna&gt;&lt;sprites&gt;&lt;camera&gt;" />
  <row Id="5154" PostHistoryTypeId="2" PostId="2643" RevisionGUID="161fd5f3-ed45-44c8-b4b7-055a6c836536" CreationDate="2010-08-12T17:09:32.227" UserId="1413" Text="I just offset the drawing position like you've done there. Logically speaking, the actor's positions aren't changing just because the camera is changing. Positions should be relative to the map, the camera shouldn't come into play with the actual positions. &#xD;&#xA;&#xD;&#xA;As to your question about exposing the camera to every element, I tend to set things up a little differently. I have a class that is in charge of graphics. This class contains the camera class, or at least a reference to it, as well as a draw method. Sprites are then drawn by this method, which offsets the position automatically, so you don't have to think about the camera at all while rendering. Sure, it necessitates an extra function call per draw, but since this is a linear time algorithm, unless your bottleneck is in drawing tons and tons of sprites, you shouldn't have an issue with this." />
  <row Id="5155" PostHistoryTypeId="2" PostId="2644" RevisionGUID="be0e2d1a-f43e-4b60-9bf3-8660866464cc" CreationDate="2010-08-12T18:05:56.557" UserId="293" Text="In [my games][1], I've given my Sprite base class the knowledge about how to draw itself, and all animated elements inherit that knowledge: number and duration of animation frames, position on the screen, etc. The main game loop just iterates through all of the sprites, asking each to draw itself as it sees fit. Seems to work fairly well, and is a little more modular to boot: if you add a new sprite that has a different animation loop (or even more complex: multiple animation states), you don't have to go back and rewrite your Animate() routine to accommodate the additional complexity:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Dim Waves as Sprite&#xD;&#xA;    Dim Char as Sprite&#xD;&#xA;&#xD;&#xA;    Sub Animate()&#xD;&#xA;         Char.update()&#xD;&#xA;         Waves.update()&#xD;&#xA;    End Sub&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Each time a sprite's update() method gets called, it knows if it should redraw the same frame as last time, move to the next frame in its current animation, change to a new animation, etc.&#xD;&#xA;&#xD;&#xA;This has the added benefit of making it a lot easier to adjust the framerate to accommodate differing clock/platform rendering speeds, because the only change is how often you call Animate().&#xD;&#xA;&#xD;&#xA;  [1]: http://buyog.com/code/loc/Canvassa/" />
  <row Id="5156" PostHistoryTypeId="2" PostId="2645" RevisionGUID="b22f970e-bc29-4893-95d9-4efbb1fd150c" CreationDate="2010-08-12T18:31:01.453" UserId="488" Text="I won't go as far as calling it an emerging revenue model, but recent 'pay what you want' campaigns have been big successes.&#xD;&#xA;&#xD;&#xA;A great example is the '[Humble Indie Bundle][1]', hosted by team Wolfire in collaboration with a handful of other indie developers. This model clearly works best if you have a big community following, preferably with many committed fans.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolfire.com/humble" />
  <row Id="5157" PostHistoryTypeId="2" PostId="2646" RevisionGUID="c045dcda-dec4-4b98-b14d-378848168dc2" CreationDate="2010-08-12T18:51:11.850" UserId="1477" Text="League of Legends has a hero named Gangplank with an attack that used to have pretty much uniform distribution which they changed to a gaussian. There is a circle area of effect where multiple hits may occur and they decided to make it cluster towards the center." />
  <row Id="5158" PostHistoryTypeId="2" PostId="2647" RevisionGUID="14f20cd7-d617-4f35-a9c8-e663f7f04fc7" CreationDate="2010-08-12T19:10:55.847" UserId="119" Text="Ok so I have a big list of all my entities which I loop through and update. In AS3 I can store this as an Array (dynamic length, untyped), a Vector (fixed length, typed) or a linked list (not native). At the moment I'm using Array but I plan to change to Vector or linked list if it is faster.&#xD;&#xA;&#xD;&#xA;Anyway, my question, when an Entity is destroyed, how should I remove it from the list? I could null its position, splice it out or just set a flag on it to say &quot;skip over me, I'm dead.&quot; I'm pooling my entities, so an Entity that is dead is quite likely to be alive again at some point. For each type of collection what is my best strategy, and which combination of collection type and removal method will work best?" />
  <row Id="5159" PostHistoryTypeId="1" PostId="2647" RevisionGUID="14f20cd7-d617-4f35-a9c8-e663f7f04fc7" CreationDate="2010-08-12T19:10:55.847" UserId="119" Text="How do I best remove an entity from my game loop when it is dead?" />
  <row Id="5160" PostHistoryTypeId="3" PostId="2647" RevisionGUID="14f20cd7-d617-4f35-a9c8-e663f7f04fc7" CreationDate="2010-08-12T19:10:55.847" UserId="119" Text="&lt;gameloop&gt;" />
  <row Id="5161" PostHistoryTypeId="2" PostId="2648" RevisionGUID="e749d8a3-c998-4bf5-a515-b086292edf23" CreationDate="2010-08-12T19:15:12.497" UserId="189" Text="Speaking in terms of my general programming experience, splicing is usually a slow operation, involving shifting all existing elements up one. I'd think **setting it to null would be the best solution here**; a dead flag would work but you'd need to take care to not let it make your code messy.&#xD;&#xA;&#xD;&#xA;We were just actually talking about resource pooling in the chatroom though, actually. It's a very good practice, and good to hear you are doing that. :)" />
  <row Id="5162" PostHistoryTypeId="2" PostId="2649" RevisionGUID="648851b2-8cf9-45be-9ca2-fc7b4dc2a754" CreationDate="2010-08-12T19:18:51.677" UserId="1580" Text="I would store all add/removes in separate lists and do those operations after I've iterated through the update-loop.&#xD;&#xA;" />
  <row Id="5163" PostHistoryTypeId="2" PostId="2650" RevisionGUID="58961ee8-250b-43d1-879e-5d0c9dfc28a4" CreationDate="2010-08-12T19:24:12.083" UserId="20" Text="Personally, I would use a linked list. Iterating over a liked list is fast, as well as adding and removing items. Using an Array or Vector would be a good choice if you need direct access to items in the structure (eg. access to an index), but it doesn't sound like you need that.&#xD;&#xA;&#xD;&#xA;Whenever you remove an item from the linked list, you could add it to a pool of objects which can then be re-cycled to save on memory-allocation.&#xD;&#xA;&#xD;&#xA;I have used the [polygonal-datastructures][1] in several projects and have been very happy with them.&#xD;&#xA;&#xD;&#xA;**Edit:** Sorry, I think the answer wasn't very clear in terms of removal strategy: I'd suggest to remove the item from the list, as soon as it's dead and add it directly to the *pooling-structure* (recycle). Since removing an item from a linked list is very performant, I don't see a problem in doing so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/polygonal/wiki/DataStructures" />
  <row Id="5164" PostHistoryTypeId="2" PostId="2651" RevisionGUID="dadeea66-94ea-46d4-a557-0622c2200bde" CreationDate="2010-08-12T19:25:08.823" UserId="953" Text="The Flixel framework uses the dead flag (actually several flags that determine whether it should be drawn, updated, and so on).  I'd say that if you're going to revive entities, and if performance is an issue, you use the dead flag.  In my experience, instantiating new entities is the most expensive operation in the use case you describe, and splicing out or nulling elements may lead to memory bloat given Flash's sometimes-squirrely garbage collection." />
  <row Id="5165" PostHistoryTypeId="2" PostId="2652" RevisionGUID="cb50ca6d-e0b4-4f7c-b1eb-32fde751b1fc" CreationDate="2010-08-12T19:30:37.013" UserId="1154" Text="The DoBoxesIntersect above is a good pairwise solution. However, if you have a lot of boxes, you still have an O(N^2) problem, and you might find you need to do something on top of that like what Kaj refers to. (In the 3D collision detection literature, this is known as having both a broad-phase and a narrow-phase algorithm. We'll do something really fast to find all possible pairs of overlaps, and then something more expensive to see if our possible pairs are actual pairs.)&#xD;&#xA;&#xD;&#xA;The broad-phase algorithm I've used before is &quot;sweep-and-prune&quot;; for 2D, you'd maintain two sorted lists of the start and end of each box. As long as box movement is not &gt;&gt; box scale from frame to frame, the order of these lists isn't going to change much, and so you can use bubble or insertion sort to maintain it. The book &quot;Real-Time Rendering&quot; has a nice writeup on optimizations you can do, but it boils down to O(N+K) time in the broad phase, for N boxes, K of which overlap, and with excellent real-world performance if you can afford N^2 booleans to keep track of which pairs of boxes are intersecting from frame-to-frame. You then have O(N+K^2) time overall, which is &lt;&lt; O(N^2) if you have many boxes but only a few overlaps.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5166" PostHistoryTypeId="2" PostId="2653" RevisionGUID="f59514d0-b3ae-4e05-aabc-0a1424061e96" CreationDate="2010-08-12T20:03:34.143" UserId="2596" Text="I have been a code in full convertion mods for the source engine, but now im mostly coding C# applications. That provide utilties for games, during this proccess i have often wanted the ability to do a overlay that shows ingame.&#xD;&#xA;&#xD;&#xA;During my research i found out it seems i would need one &quot;hook&quot; for eatch version of major version of the DirectX API. When i was coding for mods, i never got down renderer so i have no experience with that.&#xD;&#xA;&#xD;&#xA;My question boils down to.&lt;br&gt;&#xD;&#xA;1) Is making a DirectX API overlay something that can be maintained in a 1 developer freeware project?&lt;br&gt;&#xD;&#xA;2) Anyone got any pointers on where to start ( With code samples, since this is freeware i dont have infinite time to spend learning DirectX).&lt;br&gt;&#xD;&#xA;3) My internet research has pointed me towards basicly feeding the overlay a bitmap that overlay will draw, is this the correct direction?" />
  <row Id="5167" PostHistoryTypeId="1" PostId="2653" RevisionGUID="f59514d0-b3ae-4e05-aabc-0a1424061e96" CreationDate="2010-08-12T20:03:34.143" UserId="2596" Text="DirectX Overlay" />
  <row Id="5168" PostHistoryTypeId="3" PostId="2653" RevisionGUID="f59514d0-b3ae-4e05-aabc-0a1424061e96" CreationDate="2010-08-12T20:03:34.143" UserId="2596" Text="&lt;c#&gt;&lt;directx&gt;" />
  <row Id="5170" PostHistoryTypeId="2" PostId="2654" RevisionGUID="65eef284-c2ee-4bec-a62a-17581667543b" CreationDate="2010-08-12T20:32:21.750" UserId="1232" Text="1] It depends on the developer, the time they can dedicate to the project, and on the scope of the project but yet it's certainly possible.&#xD;&#xA;&#xD;&#xA;2] You could use Microsoft Detours: http://research.microsoft.com/en-us/projects/detours/, but this pretty good blog post that describes how it could be done in c#:&#xD;&#xA;http://spazzarama.wordpress.com/2010/03/29/screen-capture-with-direct3d-api-hooks/. More resources can be found by googling &quot;fraps detours&quot;.&#xD;&#xA;&#xD;&#xA;3] Correct. Typically, the overlay is implemented by intercepting the DX &quot;present&quot; call, and injecting code to blit your bitmap to the surface that is being presented. The concept is trivial, but the implementation could be replete with corner cases.&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="5171" PostHistoryTypeId="4" PostId="2640" RevisionGUID="1bc496e1-e34e-4f67-9c6e-36cac27ffded" CreationDate="2010-08-12T20:33:16.007" UserId="162" Comment="Grammar fix" Text="Do Octrees, Kd-Trees, BSP only make sense for static geometry?" />
  <row Id="5172" PostHistoryTypeId="5" PostId="2625" RevisionGUID="cfa5bf78-c63a-4ca0-a845-44912485de97" CreationDate="2010-08-12T20:33:25.787" UserId="865" Comment="added 1438 characters in body" Text="I'd basically create a 2x2 tilemap where the tiles happen to be 512x512 and all the same. Scroll through it as you would normally but as soon as X gets over 512 subtract 512 (or do a modulo 512 - but beware of negative numbers), same for Y. So instead of one poly you draw 4, although only 1 will be visible most of the time, but on border cases all 4 are visible (when you go 400 down and 400 to the right for example). This way it should scroll on forever.&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Of course you can also use 4 sprites instead of a tilemap. One at worldPos, one at worldPos+(512,0), one at worldPos + (0,512) and one at worldPos + (512,512).&lt;br&gt;&#xD;&#xA;Make sure worldPos is always modulo 512 and again it should scroll forever.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Edited to add some code:&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;Untested, not syntax checked.&lt;br&gt;&#xD;&#xA;Very hardcoded to solve this problem. It would be better with an actual array for a map, but for this specific problem this should work.&lt;br&gt;&#xD;&#xA;Assumes 0,0 to be the top left of the screen.&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    void DrawBG( int worldX, int worldY)&#xD;&#xA;    {&#xD;&#xA;       const int tileW = 512;&#xD;&#xA;       const int tileH = 320;&#xD;&#xA;    &#xD;&#xA;       int worldXMod = worldX % tileW;&#xD;&#xA;       if (worldXMod &lt; 0) worldXMod += tileW;	// handle negative numbers&#xD;&#xA;    &#xD;&#xA;       int worldYMod = worldY % tileH;&#xD;&#xA;       if (worldYMod &lt; 0) worldYMod += tileH;	// handle negative numbers&#xD;&#xA;    &#xD;&#xA;       int tileLeft = -worldXMod;&#xD;&#xA;       int tileTop  = -worldYMod;&#xD;&#xA;    &#xD;&#xA;       int spriteTopLeftY = tileLeft;&#xD;&#xA;       int spriteTopLeftY = tileTop;&#xD;&#xA;    &#xD;&#xA;       int spriteTopRightX = spriteTopLeftX + tileW;&#xD;&#xA;       int spriteTopRightY = spriteTopLeftY;&#xD;&#xA;    &#xD;&#xA;       int spriteBottomLeftX = spriteTopLeftX;&#xD;&#xA;       int spriteBottomLeftY = spriteTopLeftY + TileH;&#xD;&#xA;    &#xD;&#xA;       int spriteBottomRightX = spriteTopRightX;&#xD;&#xA;       int spriteBottomRightY = spriteBottomLeftY;&#xD;&#xA;    &#xD;&#xA;       // whatever the syntax of sprite drawing or setting its position is...&#xD;&#xA;       DrawSprite(spriteTopLeftX, spriteTopLeftY);&#xD;&#xA;       DrawSprite(spriteTopRightX, spriteTopRightY);&#xD;&#xA;       DrawSprite(spriteBottomLeftX, spriteBottonLeftY);&#xD;&#xA;       DrawSprite(spriteBottomRightX, spriteBottomRightY);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5173" PostHistoryTypeId="2" PostId="2655" RevisionGUID="2c47d2f4-6c6b-4d3e-9d73-f1841d164ed0" CreationDate="2010-08-12T20:45:42.637" UserId="1141" Text="At least part of it looks like a variabe-length list of the format: (number of entities) [(entity ID) times the number]:&#xD;&#xA;&#xD;&#xA;    00000001 3100026f 00000001 30000112&#xD;&#xA;&#xD;&#xA;-&gt; two lists of 1 entity each&#xD;&#xA;&#xD;&#xA;    00000003 310001f6 310001f6 310001f6&#xD;&#xA;&#xD;&#xA;-&gt; one list of 3 entities&#xD;&#xA;&#xD;&#xA;What those might *mean*, though? No idea. It doesn't look like a floating-point number (at least not an IEEE-754 one). It would be some unpractically (for a 3D artist) small numbers, on the order of 1E-9. It's more likely something like a bunch of flags and/or IDs.&#xD;&#xA;" />
  <row Id="5174" PostHistoryTypeId="2" PostId="2656" RevisionGUID="961adc33-8c35-4fc2-aaee-abe55ef587ee" CreationDate="2010-08-12T21:01:38.950" UserDisplayName="Stephen Blackheath" Text="I've spent the last year developing a commercial game engine in Haskell, and for us, the experience has been overwhelmingly positive.  Our game world is complex, and Haskell has made it easy to model the process of conversion from an editor format to a game engine format.  I would hate to think what that code would look like in an imperative language.&#xD;&#xA;&#xD;&#xA;Space leaks have come up on occasions, and while they've caused a bit of trouble, in the general scheme it has been a small amount (for example as compared with finding deadlocks in a similarly sized Java projects), and once they were fixed, they stayed fixed.&#xD;&#xA;&#xD;&#xA;We are using FRP similar to Yampa, and there's certainly a learning curve associated with it, but once that's over with, the experience is very positive.  Libraries have not been a problem for us - everything we've needed has been available.  Garbage collection delays were a particular issue since it's for an embedded platform.  We've used some C++ to manage the animation.  Performance has also been an issue with this being an embedded platform (= slow processor).  We've done some C and we're also looking at emerging Haskell technologies like accelerate.  The C++ animator was a design decision early on and the places where the code is too slow are only very small areas.  In the long run, we want to translate all our C to Haskell.&#xD;&#xA;&#xD;&#xA;Haskell has made a difficult job easy, and all the difficulties I've just mentioned have been tiny in comparison to the large amount of complex code we've produced that is clean, maintainable and pretty much unbreakable.  Parallelism will be an issue in game development very soon, and we are extremely well placed to deal with it.  Some of what I've said may not apply to small projects, because we are in this for the long haul, so start-up costs like learning curves, library support, etc, are much less of an issue." />
  <row Id="5175" PostHistoryTypeId="16" PostId="2656" RevisionGUID="961adc33-8c35-4fc2-aaee-abe55ef587ee" CreationDate="2010-08-12T21:01:38.950" UserId="-1" />
  <row Id="5176" PostHistoryTypeId="2" PostId="2657" RevisionGUID="afa58665-d868-433c-9261-b2ca9d00c96b" CreationDate="2010-08-12T21:09:44.640" UserId="1232" Text="If order is important, then a dead flag can allow you to splice during your update loop on the next frame. eg. very simple pseudocode:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;void updateGame()&#xD;&#xA;{&#xD;&#xA;  // updateEntities()&#xD;&#xA;  Entity* pSrcEntity = &amp;mEntities[0];&#xD;&#xA;  Entity* pDstEntity = &amp;mEntities[0];&#xD;&#xA;  newNumEntities = 0;&#xD;&#xA;  for (int i = 0; i &lt; numEntities; i++)&#xD;&#xA;  {&#xD;&#xA;    if (!pSrcEntity-&gt;isDead)&#xD;&#xA;    {&#xD;&#xA;       // could be inline but whatever.&#xD;&#xA;       updateEntity(pDstEntity, pSrcEntity);&#xD;&#xA;       // if entity just died, don't update the pDstEntity pointer, &#xD;&#xA;       // and just let the next entity updated overwrite it.&#xD;&#xA;       if (!pDstEntity-&gt;isDead)&#xD;&#xA;       {&#xD;&#xA;          pDstEntity++;&#xD;&#xA;          newNumEntities++;&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;    pSrcEntity++;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;numEntities = newNumEntities;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;These are the characteristics of this scheme:&#xD;&#xA;&#xD;&#xA;* natural compactness of entities (albeit with possibly 1 frame latency before an entity slot can be reclaimed).&#xD;&#xA;* no random re-ordering issues.&#xD;&#xA;* while doubly Linked lists have O(1) insertion/deletion, but are very hard to prefetch for optimal cache latency hiding. Keeping them in a compact array allows block prefetching techniques to work nicely.&#xD;&#xA;* In the case of multi-object destruction, you don't have to do redundant shift-copies to maintain order and compactness (it all gets done once during the update pass)&#xD;&#xA;* You take advantage of touching data that will need to be in cache already during the update.&#xD;&#xA;* It works well if your source and destination entity poitners are to separate arrays. You can then double-buffer your entity arrays in order to take advantage of multicore/ eg. one thread updating/writing the entities for frame N, while another thread is rendering the previous frame's entities for frame N-1.&#xD;&#xA;* Compactness means it's easier to DMA the whole lot to a heterogenous processor for even more CPU work offloading eg. SPUs or GPUs." />
  <row Id="5177" PostHistoryTypeId="2" PostId="2658" RevisionGUID="ad2ef0f3-76de-4f2a-b15d-120567d38ebd" CreationDate="2010-08-12T21:45:23.280" UserId="1232" Text="It's worth noting that Flash already has a community that supports games targeted at generating advertising revenue for portals. The idea is to submit your game to http://www.flashgamelicense.com/ for bidding by sponsors. &#xD;&#xA;&#xD;&#xA;The developer of Steambirds had some success with that model, as outlined here: http://www.gamasutra.com/view/news/27924/InDepth_Behind_Flash_Game_SteamBirds_Revenue_Deals.php" />
  <row Id="5178" PostHistoryTypeId="5" PostId="2655" RevisionGUID="8a3def47-4f2a-4616-8785-c46b18846b5a" CreationDate="2010-08-12T21:55:40.637" UserId="1141" Comment="added 54 characters in body" Text="At least part of it looks like a variabe-length list of the format: (number of entities) [(entity ID) times the number]:&#xD;&#xA;&#xD;&#xA;    00000001 3100026f 00000001 30000112&#xD;&#xA;&#xD;&#xA;-&gt; two lists of 1 entity each&#xD;&#xA;&#xD;&#xA;    00000003 310001f6 310001f6 310001f6&#xD;&#xA;&#xD;&#xA;-&gt; one list of 3 entities&#xD;&#xA;&#xD;&#xA;What those might *mean*, though? No idea. It doesn't look like a floating-point number (at least not an IEEE-754 one). It would be some unpractically (for a 3D artist) small numbers, on the order of 1E-9. It's more likely something like a bunch of flags and/or IDs. EDIT: Or byte offsets into the file, for that matter.&#xD;&#xA;" />
  <row Id="5179" PostHistoryTypeId="5" PostId="2463" RevisionGUID="c59cc31f-3c0e-40fd-89dd-0b2ca80a65d0" CreationDate="2010-08-12T23:08:18.547" UserId="349" Comment="added 36 characters in body; edited title" Text="Has anyone used the Procedural [CityEngine][1] to generate levels in real-time?&#xD;&#xA;&#xD;&#xA;It seems to get used in production or pre-production due to its sizable overhead, but has anyone tweaked it to run in real-time either in a test or in a game?&#xD;&#xA;&#xD;&#xA;**Edit:** Please include the person or group who did this, the game or test it was used in and a brief description of how it was done. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.procedural.com/" />
  <row Id="5180" PostHistoryTypeId="4" PostId="2463" RevisionGUID="c59cc31f-3c0e-40fd-89dd-0b2ca80a65d0" CreationDate="2010-08-12T23:08:18.547" UserId="349" Comment="added 36 characters in body; edited title" Text="Generate levels in real-time with the Procedural CityEngine" />
  <row Id="5181" PostHistoryTypeId="2" PostId="2659" RevisionGUID="afbc9171-d4d9-4ebc-8a52-4520d79faff7" CreationDate="2010-08-12T23:23:33.903" UserId="567" Text="I recently start learning Unity3D and following VTC's video tutorials and others tutorial, so far i've found it very easy to work it and to create stuff, i havent got to the part where i need to script anything YET.&#xD;&#xA;&#xD;&#xA;While i still havent hit the scripting part yet i did like to ask:&#xD;&#xA;&#xD;&#xA; - Do i really need to script anything to&#xD;&#xA;   make a simple game with it ? (why am i asking this ? until now from the tutorials i've been watching it seems that unity3d has most of the physics and codes needs to create a working version of a simple game, for example making falling crates, the rigidbody functions, it taking into account flags and grass being touched by the wind and moving)&#xD;&#xA; - What are some simple examples of&#xD;&#xA;   where will i be scripting for ? (just wondering if there will be something to script for even for a simple game and what would that be)&#xD;&#xA; - When i build the finish project will it compile everything as if it was a VS project and make a working version without the need of any other wrappers for it is data, etc ? (this is sort of self replied by their webpage but i just wanted to confirm if i got this right)&#xD;&#xA;&#xD;&#xA;*I am aware those might be subjective questions but while i am unexperienced with it and havent found anything related to those questions yet or havent meet the end of a project to be able to confirm for myself i would like to receive some advices and information in regards this.*&#xD;&#xA;&#xD;&#xA;**PS: i did a search but i was not sure of what should i look for to find answer for this kinda of questions so if this is a duplicate of any sort let me know and i will delete it once i am pointed out for the duplicate.**&#xD;&#xA;&#xD;&#xA;Best regards." />
  <row Id="5182" PostHistoryTypeId="1" PostId="2659" RevisionGUID="afbc9171-d4d9-4ebc-8a52-4520d79faff7" CreationDate="2010-08-12T23:23:33.903" UserId="567" Text="Creating a working game with Unity3D ?" />
  <row Id="5183" PostHistoryTypeId="3" PostId="2659" RevisionGUID="afbc9171-d4d9-4ebc-8a52-4520d79faff7" CreationDate="2010-08-12T23:23:33.903" UserId="567" Text="&lt;unity&gt;" />
  <row Id="5184" PostHistoryTypeId="2" PostId="2660" RevisionGUID="b3705719-c752-4bb9-ab67-ce0a33306975" CreationDate="2010-08-12T23:32:16.247" UserId="51" Text="* Yes you will need to script things.  Everything is done through scripting.  They do have really basic scripts you can use instead of writing your own for some common things like a first person controller, but they don't have any kind of graphical logic editor or anything like that.  &#xD;&#xA;* You'll need to script any game logic, enemy behavior, probably player input, menus, which animations to play, when to spawn entities... really anything other than the core foundational stuff they provide like physics and importing assets and such.&#xD;&#xA;* Building a unity app is done entirely through their interface (other than for the iPhone and consoles).  So you go to the build settings window, say &quot;I want to make a web version&quot;, hit build, and it spits out a preliminary HTML file and a .unity3d file.  For the mac builds it spits out a .app, and for windows it spits out a .exe and a folder with all the compiled data in it.&#xD;&#xA;&#xD;&#xA;Really the best thing to do is download the free/indie version and play around with it." />
  <row Id="5185" PostHistoryTypeId="2" PostId="2661" RevisionGUID="f7a76cb3-b21d-4e8b-98e1-c8f4b727efd9" CreationDate="2010-08-13T00:19:22.460" UserId="764" Text="I use Poisson distributions quite a bit - mainly when trying to work out the number of times that a random event should occur within a period of time.&#xD;&#xA;&#xD;&#xA;This has the nice property that the distribution of events if you have two 1 second timesteps is the same as one 2 second timestep, so great for simulations with variable-length time steps.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5186" PostHistoryTypeId="5" PostId="2657" RevisionGUID="f93a7462-8999-48e7-8a17-a12fe91bad89" CreationDate="2010-08-13T01:07:37.573" UserId="1232" Comment="added 390 characters in body; added 58 characters in body" Text="While some techniques are inherently more efficient than others, it'll only matter if you're running out of cycles on your target platform. Use whatever technique allows you to get your game done quicker. Try not to rely on the specific implementation of your container data structures in the meantime and it'll help you to optimize afterwards if you need it.&#xD;&#xA;&#xD;&#xA;Just to address some of the techniques already discussed by others here. If order of entities is important, then a dead flag can allow you to splice during your update loop on the next frame. eg. very simple pseudocode:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;void updateGame()&#xD;&#xA;{&#xD;&#xA;  // updateEntities()&#xD;&#xA;  Entity* pSrcEntity = &amp;mEntities[0];&#xD;&#xA;  Entity* pDstEntity = &amp;mEntities[0];&#xD;&#xA;  newNumEntities = 0;&#xD;&#xA;  for (int i = 0; i &lt; numEntities; i++)&#xD;&#xA;  {&#xD;&#xA;    if (!pSrcEntity-&gt;isDead)&#xD;&#xA;    {&#xD;&#xA;       // could be inline but whatever.&#xD;&#xA;       updateEntity(pDstEntity, pSrcEntity);&#xD;&#xA;       // if entity just died, don't update the pDstEntity pointer, &#xD;&#xA;       // and just let the next entity updated overwrite it.&#xD;&#xA;       if (!pDstEntity-&gt;isDead)&#xD;&#xA;       {&#xD;&#xA;          pDstEntity++;&#xD;&#xA;          newNumEntities++;&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;    pSrcEntity++;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;numEntities = newNumEntities;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;These are the characteristics of this scheme:&#xD;&#xA;&#xD;&#xA;* natural compactness of entities (albeit with possibly 1 frame latency before an entity slot can be reclaimed).&#xD;&#xA;* no random re-ordering issues.&#xD;&#xA;* while doubly Linked lists have O(1) insertion/deletion, but are very hard to prefetch for optimal cache latency hiding. Keeping them in a compact array allows block prefetching techniques to work nicely.&#xD;&#xA;* In the case of multi-object destruction, you don't have to do redundant shift-copies to maintain order and compactness (it all gets done once during the update pass)&#xD;&#xA;* You take advantage of touching data that will need to be in cache already during the update.&#xD;&#xA;* It works well if your source and destination entity poitners are to separate arrays. You can then double-buffer your entity arrays in order to take advantage of multicore/ eg. one thread updating/writing the entities for frame N, while another thread is rendering the previous frame's entities for frame N-1.&#xD;&#xA;* Compactness means it's easier to DMA the whole lot to a heterogenous processor for even more CPU work offloading eg. SPUs or GPUs." />
  <row Id="5187" PostHistoryTypeId="2" PostId="2662" RevisionGUID="654e166f-dca8-491c-9448-fa970b865418" CreationDate="2010-08-13T01:33:00.667" UserId="1503" Text="Most open source project hosting sites also have some game projects, CodePlex and SourceForge have already been mentioned, so i suggest looking into the [Assembla][1] projects tagged with &quot;Game&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.assembla.com/spaces/tag/game&#xD;&#xA;" />
  <row Id="5188" PostHistoryTypeId="2" PostId="2663" RevisionGUID="e41bd7be-7e4a-44df-873f-86d5fb35516b" CreationDate="2010-08-13T01:34:00.430" UserId="632" Text="What are some good resources regarding procedural content generation in the context of dungeon generation?&#xD;&#xA;&#xD;&#xA;Closest article I could find was http://gamedev.stackexchange.com/questions/910/algorithm-for-generating-a-2d-maze, which isn't quite what I'm looking for. Features, such as rooms and connected hallways, are ideal.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="5189" PostHistoryTypeId="1" PostId="2663" RevisionGUID="e41bd7be-7e4a-44df-873f-86d5fb35516b" CreationDate="2010-08-13T01:34:00.430" UserId="632" Text="What are some ideal algorithms for Rogue-like 2D dungeon generation?" />
  <row Id="5190" PostHistoryTypeId="3" PostId="2663" RevisionGUID="e41bd7be-7e4a-44df-873f-86d5fb35516b" CreationDate="2010-08-13T01:34:00.430" UserId="632" Text="&lt;procedural-generation&gt;" />
  <row Id="5191" PostHistoryTypeId="2" PostId="2664" RevisionGUID="604ceae9-b12c-400d-b732-0dbaca40d520" CreationDate="2010-08-13T01:44:42.167" UserId="865" Text="This has been more or less answered before. Your first stop place should be http://pcg.wikidot.com/" />
  <row Id="5192" PostHistoryTypeId="2" PostId="2665" RevisionGUID="dcc8288f-76fa-4395-b91e-084cc29c3ffe" CreationDate="2010-08-13T01:51:31.790" UserId="647" Text="Also, take a look at [maze generation][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Maze_generation_algorithm" />
  <row Id="5193" PostHistoryTypeId="2" PostId="2666" RevisionGUID="8bae5f68-9374-4706-8fe2-63b7d5ffe1a5" CreationDate="2010-08-13T02:33:10.490" UserId="1004" Text="I'm wotking on a game i intend to sell, and i want to use [this font](http://new.myfonts.com/fonts/cheapprofonts/geometry-soft-pro/light-b). The license says i &quot;may NOT copy or distribute the font outside of the licensed household, company, school or institution. Please ask external contacts who want to use the font to purchase their own license at www.CheapProFonts.com.&quot;. However, my plans are to use a tool to output a texture using this font to use as a bitmap font in my game. Does this mean i can do so, and sell my game with the font in it? (I know i know, YANAL, but i really don't know where else to ask this)" />
  <row Id="5194" PostHistoryTypeId="1" PostId="2666" RevisionGUID="8bae5f68-9374-4706-8fe2-63b7d5ffe1a5" CreationDate="2010-08-13T02:33:10.490" UserId="1004" Text="Using a particular font in a commercial game" />
  <row Id="5195" PostHistoryTypeId="3" PostId="2666" RevisionGUID="8bae5f68-9374-4706-8fe2-63b7d5ffe1a5" CreationDate="2010-08-13T02:33:10.490" UserId="1004" Text="&lt;legal&gt;&lt;distribution&gt;&lt;commercial&gt;&lt;fonts&gt;" />
  <row Id="5196" PostHistoryTypeId="2" PostId="2667" RevisionGUID="e4d082b1-1700-449f-b465-a1bdf94827fb" CreationDate="2010-08-13T02:36:02.917" UserId="189" Text="If the output bitmap matches the look of the font (the typeface) then it essentially IS the font, and yes you would be violating the license.&#xD;&#xA;&#xD;&#xA;&gt;You may embed the font in electronic documents, but you may NOT include the font in a software product - this requires a special license.&#xD;&#xA;&#xD;&#xA;Even though it's just an image it would still be the exact font, which is the point. And this would obviously be a software product.&#xD;&#xA;&#xD;&#xA;My best suggestion to you is to examine what you like about the font. What characters cause it to stand out to you or cause it to look good, what features (i.e. the roundedness, the thickness, the &quot;bubble&quot; shape, etc.) and then use a font creator package to create your own font which has these same features, so that it looks similar but is obviously not the same and was created from scratch. In the process you might find one or two characters which don't quite look good to you in the original font, but by creating them yourself you can fix them and make it even better." />
  <row Id="5197" PostHistoryTypeId="5" PostId="2667" RevisionGUID="5040dd16-173b-419e-a3fc-0bace52a59d7" CreationDate="2010-08-13T02:42:29.313" UserId="189" Comment="added 360 characters in body" Text="If the output bitmap matches the look of the font (the typeface) then it essentially IS the font, and yes you would be violating the license.&#xD;&#xA;&#xD;&#xA;&gt;You may embed the font in electronic documents, but you may NOT include the font in a software product - this requires a special license.&#xD;&#xA;&#xD;&#xA;Even though it's just an image it would still be the exact font, which is the point. And this would obviously be a software product.&#xD;&#xA;&#xD;&#xA;My best suggestion to you is to examine what you like about the font. What characters cause it to stand out to you or cause it to look good, what features (i.e. the roundedness, the thickness, the &quot;bubble&quot; shape, etc.) and then use a font creator package to create your own font which has these same features, so that it looks similar but is obviously not the same and was created from scratch. In the process you might find one or two characters which don't quite look good to you in the original font, but by creating them yourself you can fix them and make it even better.&#xD;&#xA;&#xD;&#xA;Alternatively, you could ask them exactly what that &quot;special license&quot; is that they mentioned in the section I quoted above. Perhaps you can spend a bit more money and buy a special commercial software license for the font. Depending on how much you consider your time worth, this could be the better option over taking the time to create an imitation font." />
  <row Id="5198" PostHistoryTypeId="2" PostId="2668" RevisionGUID="26973763-35fb-4ceb-916c-cc9ebe524841" CreationDate="2010-08-13T02:43:21.120" UserId="656" Text="&gt; &quot;may NOT copy or distribute the font&#xD;&#xA;&gt; outside of the licensed household,&#xD;&#xA;&gt; company, school or institution. Please&#xD;&#xA;&gt; ask external contacts who want to use&#xD;&#xA;&gt; the font to purchase their own license&#xD;&#xA;&gt; at www.CheapProFonts.com.&quot;&#xD;&#xA;&#xD;&#xA;If you plan to sell the game with their font in it (whether you transfer it to a bitmap or not doesn't matter), then you are distributing it outside of the scope of the license so you will need to contact CheapProFonts (whom I presume are the owners of the font) for a commercial license." />
  <row Id="5199" PostHistoryTypeId="2" PostId="2669" RevisionGUID="1d77b330-e874-4ebc-a479-517b96b7f2eb" CreationDate="2010-08-13T02:43:47.390" UserId="323" Text="Using it that way would not be allowed. You're not allowed to use or copy fonts in any way, up to and including in printed material, without a license to do so.&#xD;&#xA;&#xD;&#xA;Luckily, there are many sources of [free and free-to-license fonts][1] out there. Chances are very good you can find an acceptable alternative.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/360/where-can-i-find-fonts-which-i-can-distribute-with-an-open-source-game" />
  <row Id="5200" PostHistoryTypeId="2" PostId="2670" RevisionGUID="b07716df-3e28-4cfc-b48b-0f3e37aa904d" CreationDate="2010-08-13T03:34:19.850" UserId="288" Text="(Disclaimer: I am not a lawyer)&#xD;&#xA;&#xD;&#xA;**In the United States** a font *face* is not copyrightable (Eltra Corp. v. Ringer, 579 F.2d 294 (4th Cir. 1978)). But font *software* is copyrightable. A TrueType font (such as one you might download from cheapprofonts.com) contains instructions for how to render that font and is therefore a copyright piece of software.&#xD;&#xA;&#xD;&#xA;A bitmap font that you create based on such a font is also font software (instructions for how to render that font) - and it is a derivative work of the original font software. To distribute it requires that you have a licence for creating and distributing derivative works of the original font.&#xD;&#xA;&#xD;&#xA;**A way around this is to pre-render all your text.** This way you are not distributing software instructions for rendering that font, you have merely *used* those software instructions to create an image.&#xD;&#xA;&#xD;&#xA;Outside the United States? Ask a real lawyer :)" />
  <row Id="5201" PostHistoryTypeId="2" PostId="2671" RevisionGUID="43d0887e-911d-480f-a8c6-e5dac93efb1b" CreationDate="2010-08-13T06:00:26.280" UserId="1413" Text="There is a free game dev community based on the freegamedev forums http://forum.freegamedev.net/ and the associated IRC at #freegamer on freenode.net that you might check out for some projects you could potentially join." />
  <row Id="5202" PostHistoryTypeId="2" PostId="2672" RevisionGUID="ae9aaa78-5ce4-426a-842b-a709734f1738" CreationDate="2010-08-13T06:54:07.090" UserDisplayName="Viktor Nordling" Text="You should really look into Firebase, an open source Java multiplayer game server. &#xD;&#xA;&#xD;&#xA;Compared to Smartfox, Firebase uses a binary protocol, is not bloated with features and is high performing. &#xD;&#xA;&#xD;&#xA;If you roll your own system, you will have to take care of everything from handling sockets to handling concurrency. With Firebase, you are guaranteed one action at a time, per room.&#xD;&#xA;&#xD;&#xA;Check it out:&#xD;&#xA;http://www.cubeia.org/" />
  <row Id="5203" PostHistoryTypeId="2" PostId="2673" RevisionGUID="1a37748c-988b-449a-bcd5-c0d6b4cbe590" CreationDate="2010-08-13T07:08:20.477" UserId="1495" Text="Which combination of testing tools do you feel is best?&#xD;&#xA;Given the framework / library of your choice you might consider:&#xD;&#xA;&#xD;&#xA;- suitability for TDD&#xD;&#xA;- ease of use / productivity&#xD;&#xA;- dealing with [mock objects][1]&#xD;&#xA;- setup with continuous integration&#xD;&#xA;- error reporting&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Note: While this is potentially a generic question like [the one on SO][2] I would argue that game development is usually bound to a specific work flow which influences the choice for testing. For a higher-level perspective, see question [Automated testing of games][3].&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;  [2]: http://stackoverflow.com/questions/13699/choosing-a-c-unit-testing-tool-framework&#xD;&#xA;  [3]: http://stackoverflow.com/questions/13699/choosing-a-c-unit-testing-tool-framework" />
  <row Id="5204" PostHistoryTypeId="1" PostId="2673" RevisionGUID="1a37748c-988b-449a-bcd5-c0d6b4cbe590" CreationDate="2010-08-13T07:08:20.477" UserId="1495" Text="Which unit test framework for c++ based games?" />
  <row Id="5205" PostHistoryTypeId="3" PostId="2673" RevisionGUID="1a37748c-988b-449a-bcd5-c0d6b4cbe590" CreationDate="2010-08-13T07:08:20.477" UserId="1495" Text="&lt;c++&gt;&lt;testing&gt;" />
  <row Id="5206" PostHistoryTypeId="5" PostId="2673" RevisionGUID="9fd0c679-4eec-4605-aebd-572a458d9087" CreationDate="2010-08-13T07:16:03.063" UserId="1495" Comment="Added links to related topics" Text="Which combination of testing tools do you feel is best?&#xD;&#xA;Given the framework / library of your choice you might consider:&#xD;&#xA;&#xD;&#xA;- suitability for [TDD][1]&#xD;&#xA;- ease of use / productivity&#xD;&#xA;- dealing with [mock objects][2]&#xD;&#xA;- setup with [continuous integration][3]&#xD;&#xA;- error reporting&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Note: While this is potentially a generic question like [the one on SO][4] I would argue that game development is usually bound to a specific work flow which influences the choice for testing. For a higher-level perspective, see question [Automated testing of games][5].&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Test-driven_development&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Continuous_integration&#xD;&#xA;  [4]: http://stackoverflow.com/questions/13699/choosing-a-c-unit-testing-tool-framework&#xD;&#xA;  [5]: http://stackoverflow.com/questions/13699/choosing-a-c-unit-testing-tool-framework" />
  <row Id="5207" PostHistoryTypeId="2" PostId="2674" RevisionGUID="c18d2a85-50c3-4bb8-ac1a-2546fd55e55e" CreationDate="2010-08-13T08:13:09.757" UserId="288" Text="Back when I was working in C++ (disclaimer: this was about 2005), I used a *slightly modified* version of &lt;a href=&quot;http://tut-framework.sourceforge.net/&quot;&gt;**TUT (Template Unit Test Framework)**&lt;/a&gt;. I liked it because it was so lightweight, which made it easy to modify, and meant there was very little &quot;glue&quot; required when writing tests.&#xD;&#xA;&#xD;&#xA;Here is one very simple modification I made, that makes it even eaiser/cleaner to write tests:&#xD;&#xA;&#xD;&#xA;    static int BogusFunction() { return __COUNTER__; } // Increment the __COUNTER__ to the correct position for the begining of the tests&#xD;&#xA;    #define TEST template&lt;&gt; template&lt;&gt; void object::test&lt;__COUNTER__&gt;()&#xD;&#xA;    #define ENSURE(msg, cond) ensure(msg, cond, __FILE__, __LINE__)&#xD;&#xA;    #define ENSURE_EQUALS(msg, actual, expected) ensure_equals(msg, actual, expected, __FILE__, __LINE__)&#xD;&#xA;    #define ENSURE_DISTANCE(msg, actual, expected, distance) ensure_distance(msg, actual, expected, distance, __FILE__, __LINE__)&#xD;&#xA;    #define FAIL(msg) fail(msg, __FILE__, __LINE__)&#xD;&#xA;&#xD;&#xA;The other change I made was to its output format, so that test failures would appear correctly in Visual Studios's error list (when run as part of a build), clickable to go to the file and line of the failed test.&#xD;&#xA;&#xD;&#xA;(The ability to do this sort of thing means that *it* can be made to fit into your TDD/CI process, rather than forcing you to fit into its.)&#xD;&#xA;&#xD;&#xA;Here is an example test (from the command-stack from my editor):&#xD;&#xA;&#xD;&#xA;	TEST // Undoing a command&#xD;&#xA;	{&#xD;&#xA;		cs.AddCommand(new TestCommand);&#xD;&#xA;		cs.AddCommand(new TestCommand(od));&#xD;&#xA;&#xD;&#xA;		ENSURE(&quot;Undo success&quot;, cs.Undo());&#xD;&#xA;		ENSURE_EQUALS(&quot;Stack size&quot;, cs.size(), 2);&#xD;&#xA;		ENSURE_EQUALS(&quot;Command's Undo() was called&quot;, od.undo, 1);&#xD;&#xA;		ENSURE_EQUALS(&quot;Command's Redo() not called&quot;, od.redo, 0);&#xD;&#xA;&#xD;&#xA;		ACommandStack::const_iterator it = cs.end();&#xD;&#xA;		ENSURE(&quot;Command is redoable&quot;, cs.GetUndoPos() == --it);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;(In the above code, `cs` and `od` are per-module fixtures, and `TestCommand` is a mock object.)" />
  <row Id="5208" PostHistoryTypeId="2" PostId="2675" RevisionGUID="fa04a0fd-220a-4802-a155-5c10f13a9678" CreationDate="2010-08-13T08:19:26.810" UserId="721" Text="With Java, there are so many good libraries... Not the case of C++.&#xD;&#xA;&#xD;&#xA;For C++ users, there is a chain tool from Kitware that is very interesting:&#xD;&#xA;&#xD;&#xA; - CMake: make tool&#xD;&#xA; - CDash: continuous integration tool &#xD;&#xA;&#xD;&#xA;Kitware writes C++ codes for Computer Science. &#xD;&#xA;&#xD;&#xA;For personal projects, i use the Boost unit test library (on Desktop platform). For Continuous Integration, i use Hudson:&#xD;&#xA;&#xD;&#xA; - easy install on Tomcat&#xD;&#xA; - scriptable&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5209" PostHistoryTypeId="2" PostId="2676" RevisionGUID="1b15112f-69f2-408a-9ba0-b6bee34cefee" CreationDate="2010-08-13T08:53:00.503" UserId="1024" Text="My favorite testing library is QuickCheck http://en.wikipedia.org/wiki/QuickCheck. There is an experimental C++ version, but it looks too heavy weight, but even without a dedicated library the principles are easy to use. &#xD;&#xA;&#xD;&#xA;All of my classes have a genArbitrary method that can generate a random instance. I use this for smoke testing invertible processes, like loading and unloading. I can generate thousands of random scenes and check that various properties hold (like the scene I serialize is the same as the scene I deserialize). &#xD;&#xA;&#xD;&#xA;It doesn't replace traditional unit tests (it does reduce the need for many potential unit tests), but its a great way to discover bugs, and it helps stress test my memory allocation strategy (along with Valgrind). Its great to watch over a million allocations come out Valgrind pure :).&#xD;&#xA;&#xD;&#xA;I used to use CxxTest as a test harness, which I liked. Now all of my tests are separate exes. I just have a folder called Test, and ever file that begins with Test_ becomes a test. So far it is a really easy lightweight to make tests." />
  <row Id="5210" PostHistoryTypeId="2" PostId="2677" RevisionGUID="8226f5c6-c1c3-45ed-99f7-3e761624f7f7" CreationDate="2010-08-13T09:08:09.797" UserId="1495" Text="I found [**UnitTest++**][1] to be very easy to work with.&#xD;&#xA;I will yet have to try [amop][2] alongside with it, which was mentioned to be a good companion to UnitTest++ for mock object functionality.&#xD;&#xA;&#xD;&#xA;UnitTest++ can be set up with your Continuous Integration approach, e.g. [with Hudson][3]&#xD;&#xA;&#xD;&#xA;You may want to read this [inspiring post][4] if you're not convinced unit testing and games go well together.&#xD;&#xA;&#xD;&#xA;  [1]: http://unittest-cpp.sourceforge.net/&#xD;&#xA;  [2]: http://code.google.com/p/amop/&#xD;&#xA;  [3]: http://stackoverflow.com/questions/411218/hudson-c-and-unittest&#xD;&#xA;  [4]: http://gafferongames.com/2009/01/12/unit-test-bloody-idiot/" />
  <row Id="5211" PostHistoryTypeId="5" PostId="2647" RevisionGUID="b195779c-f608-4a99-830b-11807097e9ad" CreationDate="2010-08-13T09:15:16.437" UserId="119" Comment="deleted 14 characters in body" Text="Ok so I have a big list of all my entities which I loop through and update. In AS3 I can store this as an Array (dynamic length, untyped), a Vector (typed) or a linked list (not native). At the moment I'm using Array but I plan to change to Vector or linked list if it is faster.&#xD;&#xA;&#xD;&#xA;Anyway, my question, when an Entity is destroyed, how should I remove it from the list? I could null its position, splice it out or just set a flag on it to say &quot;skip over me, I'm dead.&quot; I'm pooling my entities, so an Entity that is dead is quite likely to be alive again at some point. For each type of collection what is my best strategy, and which combination of collection type and removal method will work best?" />
  <row Id="5212" PostHistoryTypeId="5" PostId="2677" RevisionGUID="10508952-75c2-4aeb-8ca3-373c9665416c" CreationDate="2010-08-13T09:18:09.153" UserId="1495" Comment="added 226 characters in body" Text="I found [**UnitTest++**][1] to be very easy to work with.&#xD;&#xA;I will yet have to try [amop][2] alongside with it, which was mentioned to be a good companion to UnitTest++ for mock object functionality. Otherwise [Google Mock][3] is a popular choice.&#xD;&#xA;Also, you may want to read up on [UnitTest++ and Mock Objects][4].&#xD;&#xA;&#xD;&#xA;UnitTest++ can be set up with your Continuous Integration approach, e.g. [with Hudson][5]&#xD;&#xA;&#xD;&#xA;You may want to read this [inspiring post][6] if you're not convinced unit testing and games go well together.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unittest-cpp.sourceforge.net/&#xD;&#xA;  [2]: http://code.google.com/p/amop/&#xD;&#xA;  [3]: http://code.google.com/p/googlemock&#xD;&#xA;  [4]: http://gamesfromwithin.com/mock-objects-friends-or-foes&#xD;&#xA;  [5]: http://stackoverflow.com/questions/411218/hudson-c-and-unittest&#xD;&#xA;  [6]: http://gafferongames.com/2009/01/12/unit-test-bloody-idiot/" />
  <row Id="5213" PostHistoryTypeId="2" PostId="2678" RevisionGUID="21e8bef9-767b-4da5-b2f7-4f438562435c" CreationDate="2010-08-13T10:25:56.407" UserId="1490" Text="I'd definetely go with a custom solution : even though you might lose some time in the short term, it'll definetely scale better if you need it to, plus the experience you gain will be massively reusable for your next games.&#xD;&#xA;BlazeDs sounds like an excellent tool for your needs, but rewriting a Java game server from scratch is not that big of an endeavour, using for instance Netty and Protobuf :) " />
  <row Id="5214" PostHistoryTypeId="2" PostId="2679" RevisionGUID="80610921-50f2-4b81-8138-15111bb69f8c" CreationDate="2010-08-13T10:55:19.153" UserId="608" Text="What are the hot postions which are hard to get in game industry?&#xD;&#xA;Client/Server/Game Engine/Networking and database or else?&#xD;&#xA;" />
  <row Id="5215" PostHistoryTypeId="1" PostId="2679" RevisionGUID="80610921-50f2-4b81-8138-15111bb69f8c" CreationDate="2010-08-13T10:55:19.153" UserId="608" Text="What are the hot dev positions in game industry?" />
  <row Id="5216" PostHistoryTypeId="3" PostId="2679" RevisionGUID="80610921-50f2-4b81-8138-15111bb69f8c" CreationDate="2010-08-13T10:55:19.153" UserId="608" Text="&lt;jobs&gt;" />
  <row Id="5217" PostHistoryTypeId="16" PostId="498" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5218" PostHistoryTypeId="16" PostId="501" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5219" PostHistoryTypeId="16" PostId="573" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5220" PostHistoryTypeId="16" PostId="578" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5221" PostHistoryTypeId="16" PostId="599" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5222" PostHistoryTypeId="16" PostId="2662" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5223" PostHistoryTypeId="16" PostId="2671" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5224" PostHistoryTypeId="16" PostId="496" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T10:55:41.897" UserId="14" />
  <row Id="5225" PostHistoryTypeId="2" PostId="2680" RevisionGUID="c14da593-5f7c-4b70-bbde-2c8c10c497af" CreationDate="2010-08-13T11:16:55.700" UserId="741" Text="Technical artists are rare as hens teeth. That is, someone who is primarily an artist, but who can also script/code and understands the shader tech underpinning the art stuff.&#xD;&#xA;&#xD;&#xA;Also, good shader graphics programmers are still pretty rare, i.e. someone who can create some of the more impressive visual effects, and optimise the rendering performance." />
  <row Id="5226" PostHistoryTypeId="2" PostId="2681" RevisionGUID="0571c728-ecaf-4712-8901-314ef1a1d6f7" CreationDate="2010-08-13T12:23:39.307" UserId="488" Text="Without referring to any of my previous projects, I can say that I've been involved with a great deal of open source activities, game-related and otherwise, and by and large I have thoroughly enjoyed the ride. Right now I'm a manager with the jMonkeyEngine project. I'll be glad to type up somewhat of an 'introduction to open source games', but bear in mind this will by no means be an exhaustive list of resources.&#xD;&#xA;&#xD;&#xA;I highly recommend checking out [similar pages][1] for all of the links I provide.&#xD;&#xA;&#xD;&#xA;Free, open source etc. - The subtle differences&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;It's worth merely noting that there are some differences to terms like 'free' (vs 'gratis'), 'open source', and 'free software'. The GNU project has a good but somewhat one-sided take on it, titled [Open Source Misses The Point][2]. Simply put though, I'd say the most damaging misconception about open source is that you're not supposed to make any money off of it.&#xD;&#xA;&#xD;&#xA;Point is, even if you're giving away your code as well as your art assets (though copyrighted art assets could be a good way to make an essential part of your game proprietary, without really damaging its technical 'openness') for free, that doesn't mean you can't commercialize other parts of your project.&#xD;&#xA;&#xD;&#xA;There's another gamedev thread here that'll hopefully bring in many good ideas on [how to commercialize a free game][3].&#xD;&#xA;&#xD;&#xA;Independent preparation&#xD;&#xA;-----------------------&#xD;&#xA;&#xD;&#xA;If you want to sharpen your talents before getting involved with a group of fellow developers, 'try make your own game' is a no-brainer, and there's no shortage of open source engines (see [devmaster.net/engines][8] and [wikipedia.org/wiki/List_of_game_engines][9]). If you're looking for a little motivational push though, there's nothing like a little bit of competition:&#xD;&#xA;&#xD;&#xA; - [Ludum Dare][10] - Frequently hosted 48h game competitions.&#xD;&#xA; - [GameJolt][11] - Infrequently hosts uniquely themed competitions. You can also upload your finished games there for free promotion.&#xD;&#xA; - [GameCareerGuide's Game Design Challenges][12] - Although not always requiring programming, GCG's weekly challenges open up a lot of opportunity for networking and unique concepts.&#xD;&#xA;&#xD;&#xA;Find a project&#xD;&#xA;-----------------&#xD;&#xA;&#xD;&#xA;There are plenty of places to look, and it's been a while since I was on the lookout, but I reckon most of the hobbyist projects (because that's what every open source game project is right now) make an appearance at either of these waterholes:&#xD;&#xA;&#xD;&#xA; - [GameDev.net - Help Wanted][5] or&#xD;&#xA; - [IndieDB - Jobs][6] (they also have a&#xD;&#xA;   [recruiting forum][7], I dunno why).&#xD;&#xA;&#xD;&#xA; Remember, progress is the best sign of promise; look for it. Speaking of which...&#xD;&#xA;&#xD;&#xA;Choose a project&#xD;&#xA;--------------&#xD;&#xA;&#xD;&#xA;Choosing the right project that matches your particular skillset and interests (no one's gonna want to work with you if you're not enthusiastic about the game you're making) can prove to be quite the challenge. Take your time, and for the love of all that is good pick (or start, but I'll get back to that) a project that looks perfectly achievable within just a couple months time, at most. There are disappointingly few of these around, but for a first-time open source project it comes highly recommended.&#xD;&#xA;&#xD;&#xA;**Extra pointers:**&#xD;&#xA;&#xD;&#xA; 1. Don't start out too picky; look in&#xD;&#xA;    different sites, consider odd&#xD;&#xA;    genres, get to know the width of&#xD;&#xA;    your skill-sets and interests.&#xD;&#xA; 2. Consider scope. How much time are&#xD;&#xA;    you willing to commit? How soon do&#xD;&#xA;    you want to see the project finish? Any pending time-sinkholes (studies, work, life commitment) worth factoring in?&#xD;&#xA; 3. Start by talking. Exchange at least&#xD;&#xA;    1000 words with someone involved&#xD;&#xA;    in a given project before finally making up&#xD;&#xA;    your mind.&#xD;&#xA; 4. Now stick with it and bring it to&#xD;&#xA;    the finishline!&#xD;&#xA;&#xD;&#xA;A great thing about open source projects is the low barrier to entry. There's loads of ways to contribute to a project besides applying your key skills. Here's [a list I made][4] for my own project. (I might rewrite and relocate that to a 'neutral' domain soon). I'm not a programmer myself, so I spend a lot of my time doing 'miscellaneous' tasks like listed there.&#xD;&#xA;&#xD;&#xA;Honestly, the 'open source games' complete/incomplete ratio could use a boost. The beauty of transparency and open source though is that 'incomplete' is far from 'unsuccessful' so long as you make the most out of the ride.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.googleguide.com/similar_pages.html&#xD;&#xA;  [2]: http://www.gnu.org/philosophy/open-source-misses-the-point.html&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/297/what-are-some-common-ways-to-generate-revenue-from-a-free-game&#xD;&#xA;  [4]: http://www.jmonkeyengine.com/wiki/doku.php/contribute&#xD;&#xA;  [5]: http://www.gamedev.net/community/forums/forum.asp?forum_id=8&#xD;&#xA;  [6]: http://www.indiedb.com/jobs&#xD;&#xA;  [7]: http://www.indiedb.com/jobs&#xD;&#xA;  [8]: http://www.devmaster.net/engines/&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/List_of_game_engines&#xD;&#xA;  [10]: http://www.ludumdare.com/&#xD;&#xA;  [11]: http://gamejolt.com/&#xD;&#xA;  [12]: http://www.gamecareerguide.com/features/" />
  <row Id="5227" PostHistoryTypeId="16" PostId="2681" RevisionGUID="0571c728-ecaf-4712-8901-314ef1a1d6f7" CreationDate="2010-08-13T12:23:39.307" UserId="-1" />
  <row Id="5228" PostHistoryTypeId="2" PostId="2682" RevisionGUID="881aa3cf-b20c-40b8-9103-6695aefe7698" CreationDate="2010-08-13T13:14:25.177" UserId="908" Text="Here's an excellent introduction into controlled random by Adam Saltsman: http://gamedeveloper.texterity.com/gamedeveloper/201002?pg=42#pg42&#xD;&#xA;&#xD;&#xA;The article doesn't contain source code but it should be fairly easy to deduct from the  procedures described." />
  <row Id="5229" PostHistoryTypeId="2" PostId="2683" RevisionGUID="aebc71f1-afc8-4bcc-a5cc-a1c99f14098a" CreationDate="2010-08-13T13:16:16.233" UserId="734" Text="If you want to have a go at participating in an open-source game project, then may I suggest [Battle for Wesnoth][1]. It's a fairly popular open source game with nice graphics and clean code base (from what little I remember. I haven't hacked on it, but I skimmed the code a few years ago).&#xD;&#xA;&#xD;&#xA;It's written in C++ and Lua.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wesnoth.org/" />
  <row Id="5230" PostHistoryTypeId="16" PostId="2683" RevisionGUID="aebc71f1-afc8-4bcc-a5cc-a1c99f14098a" CreationDate="2010-08-13T13:16:16.233" UserId="-1" />
  <row Id="5231" PostHistoryTypeId="2" PostId="2684" RevisionGUID="a6bafb54-3e59-4f6f-b599-190801825bcf" CreationDate="2010-08-13T14:36:54.030" UserId="1477" Text="If you have a way of modeling the players usual patterns in battle you could send them into an AI mode until they reconnect or the battle is over whichever comes first. But don't give them any rewards (exp, items, etc.) for the battle unless they return in X amount of time. " />
  <row Id="5232" PostHistoryTypeId="2" PostId="2685" RevisionGUID="6130083e-d1d0-4a5c-aea0-a992acd4a6bb" CreationDate="2010-08-13T14:50:14.900" UserId="1580" Text="I would say that that the &quot;Hot position&quot; when it comes to programmers is probably Lead Architect, Lead Engine, or any other name to the same job. Essentially the guy who gets to decide what to implement and how. It's often a person with very good knowledge regarding programming, someone who probably has one of the best overviews of the code in the company. I don't think that it's something that you often get recruited to externally, but instead most likely internally. It requires a lot of experience and often have a tendency to be the best &quot;general&quot; programmers that make it there. " />
  <row Id="5233" PostHistoryTypeId="2" PostId="2686" RevisionGUID="aa15fe71-73ea-4b3c-98f8-32f884907d10" CreationDate="2010-08-13T14:52:25.723" UserId="1580" Text="When it comes to C++, I have tried and used the googletest framework, http://code.google.com/p/googletest/. It's simple to set up, easy to use and works great." />
  <row Id="5234" PostHistoryTypeId="2" PostId="2687" RevisionGUID="140bd676-6100-4d3c-b698-af77b82695b0" CreationDate="2010-08-13T15:00:21.740" UserId="1477" Text="an idea I've seen mentioned elsewhere is to sit pairs of people in front of the application[game in this case]. They're more likely to reveal their thought processes to someone else watching and the 2nd person may ask questions without leading them like you or another team member might." />
  <row Id="5235" PostHistoryTypeId="2" PostId="2688" RevisionGUID="42b78002-d034-467f-8d51-6328693aa992" CreationDate="2010-08-13T15:06:38.887" UserId="1141" Text="Lineage II does it like this:&#xD;&#xA;&#xD;&#xA; - You can't exit the game client during a fight - any fight starts, no matter if you attacked, got attacked or healed a team mate who's fighting and you are in &quot;fighting stance&quot;, which lasts for 15 seconds after the last such action was made.&#xD;&#xA; - If you disconnect anyway or your game crashes, your character stays in the game for those 15 seconds before disappearing. It even continues auto-attacking whatever it was attacking, but not using skills - same as it would if you went AFK.&#xD;&#xA; - There *is* a way to disconnect instantly, however, by reconnecting to the same account with another client. This is regarded as borderline cheating by the community when done in PvP, and some cheat tools have an option to use it as well, so it isn't being used much there. When biting too much to chew in PvE however, some people still use this trick to avoid unnecessary deaths (though there are in-game items which allow almost the same, namely the &quot;blessed scrolls of escape&quot;).&#xD;&#xA; - Reconnecting to a PvP-flagged zone (castle ground during a siege, for example) and some specific non-instanced epic boss areas moves the character to the nearest town (safe zone) instead. Thus, disconnecting there to avoid &quot;losing&quot; carries a penalty for your team, which means it is strongly discouraged by the social norms of the game.&#xD;&#xA;&#xD;&#xA;Personally, I would do it similarly, only allow the players to pre-define the actions their character is taking on disconnection (stay and fight, run to the nearest safe zone avoiding aggro, use a regular scroll of escape, use a blessed scroll of escape, ...) and have the characters persist in the game world even if the player isn't logged in." />
  <row Id="5236" PostHistoryTypeId="2" PostId="2689" RevisionGUID="f22af3a4-d39e-442b-856c-c7d3501d075d" CreationDate="2010-08-13T15:07:31.507" UserId="1456" Text="I think, that it is any dev position with good project profit share :)..." />
  <row Id="5237" PostHistoryTypeId="2" PostId="2690" RevisionGUID="0ce841a7-5255-4130-b028-f975104df0c4" CreationDate="2010-08-13T15:28:07.920" UserId="259" Text="Any programmer who knows that this is not a const pointer:&#xD;&#xA;&#xD;&#xA;    const MyClass* myObject = getObject();&#xD;&#xA;&#xD;&#xA;Is a hot property.&#xD;&#xA;&#xD;&#xA;Seriously: good programmers are hard to come by and there's a lot of inexperienced guys in the videogames industry." />
  <row Id="5238" PostHistoryTypeId="16" PostId="2680" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T15:31:40.900" UserId="14" />
  <row Id="5239" PostHistoryTypeId="16" PostId="2685" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T15:31:40.900" UserId="14" />
  <row Id="5240" PostHistoryTypeId="16" PostId="2689" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T15:31:40.900" UserId="14" />
  <row Id="5241" PostHistoryTypeId="16" PostId="2690" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T15:31:40.900" UserId="14" />
  <row Id="5242" PostHistoryTypeId="16" PostId="2679" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-13T15:31:40.900" UserId="14" />
  <row Id="5243" PostHistoryTypeId="2" PostId="2691" RevisionGUID="9ac4aeeb-4f41-407e-98ce-92e07f8e15ec" CreationDate="2010-08-13T15:51:20.667" UserId="370" Text="I'm not a professional game developer, but I am a professional embedded developer.  Perhaps not exactly like games but close.  At my place of work we've used a few.&#xD;&#xA;&#xD;&#xA;I really like [google test][1]. It has all of the best features of the recent unit test frameworks, while keeping it all in a minimal, stream lined interface.&#xD;&#xA;&#xD;&#xA;Next on my list is [Boost Test][2]. Google test's api is a bit more modern than Boost.Test, but Boost Test has done an amazing job of adding new features and ditching the crufty CppUnit paradigm.&#xD;&#xA;&#xD;&#xA;I've also used [CxxTest][3]. It's quite well done but you can tell that it's not as modern as either Boost.Test or Google Test. In particular, its support for test suites and fixtures is a bit awkward.&#xD;&#xA;&#xD;&#xA;I like to use the advanced features, but if you're a minimalist you'll never see the difference between the three. Most of my colleagues would be happy with a unit test framework that supports auto registering test (in a declarative manner ) and has some sort of a CHECK_EQUALS(a,b) macro.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/googletest/&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_43_0/libs/test/doc/html/index.html&#xD;&#xA;  [3]: http://cxxtest.tigris.org/" />
  <row Id="5244" PostHistoryTypeId="2" PostId="2692" RevisionGUID="f846e08c-4985-45d6-9bef-9b61c34c2968" CreationDate="2010-08-13T16:55:12.840" UserId="1597" Text="Another vote for [UnitTest++][1]. Very easy to integrate, compiled for our target embedded platform very easily, straightforward and easy-to-use. We have also integrated it with Hudson. We looked at GoogleTest but rejected it (I think it had issues compiling for our target platform) but it has a similar feature set and might be suitable for you. &#xD;&#xA;&#xD;&#xA;Additionally you might want to look into some kind of smoke testing framework. In my experience it is difficult to get sufficient test coverage for a game with unit tests alone. Especially if you are introducing unit testing to an existing codebase, and even moreso for a large team. Smoke testing would be testing high-level things like &quot;make sure all the levels load&quot;. My theory is that if I have both kinds of testing then at some point they might meet in the middle and give decent converage. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unittest-cpp.sourceforge.net/" />
  <row Id="5245" PostHistoryTypeId="2" PostId="2693" RevisionGUID="5cc29cb8-3654-4047-b6f7-9c29015fca0b" CreationDate="2010-08-13T17:08:47.950" UserId="1679" Text="What sort of tools/processes are used for setting up hitboxes and make them move/resize/appear/disappear to match the character animations?  I'm working in 2d, so attaching collision volumes to the character in a modeling program are no good for this case :)." />
  <row Id="5246" PostHistoryTypeId="1" PostId="2693" RevisionGUID="5cc29cb8-3654-4047-b6f7-9c29015fca0b" CreationDate="2010-08-13T17:08:47.950" UserId="1679" Text="Authoring Hitboxes" />
  <row Id="5247" PostHistoryTypeId="3" PostId="2693" RevisionGUID="5cc29cb8-3654-4047-b6f7-9c29015fca0b" CreationDate="2010-08-13T17:08:47.950" UserId="1679" Text="&lt;animation&gt;" />
  <row Id="5248" PostHistoryTypeId="2" PostId="2694" RevisionGUID="8bd04fe9-6fee-4a4e-b6d8-936d4d4c612e" CreationDate="2010-08-13T17:17:16.033" UserId="370" Text="I need to display text in my game, who doesn't.&#xD;&#xA;&#xD;&#xA;I had originally thought that I could just statically render all the text I would need to images and use those.  I'm starting to think that is a bad idea.  I figure I'll have to internationalize it in the future, and the game has score counters and such which cannot be statically rendered.  It looks like I'll need to use a more dynamic approach.&#xD;&#xA;&#xD;&#xA;So my question.&#xD;&#xA;&#xD;&#xA;How do games usually handle font loading?&#xD;&#xA;&#xD;&#xA; * Load the TTF directly and render it to a texture atlas.&#xD;&#xA; * Pre-bake the TTF into an image with a configuration file storing locations and kerning.&#xD;&#xA;" />
  <row Id="5249" PostHistoryTypeId="1" PostId="2694" RevisionGUID="8bd04fe9-6fee-4a4e-b6d8-936d4d4c612e" CreationDate="2010-08-13T17:17:16.033" UserId="370" Text="How to handle font loading?" />
  <row Id="5250" PostHistoryTypeId="3" PostId="2694" RevisionGUID="8bd04fe9-6fee-4a4e-b6d8-936d4d4c612e" CreationDate="2010-08-13T17:17:16.033" UserId="370" Text="&lt;textures&gt;&lt;fonts&gt;" />
  <row Id="5251" PostHistoryTypeId="2" PostId="2695" RevisionGUID="e985df9e-5a39-4cad-af24-7481ccbe5822" CreationDate="2010-08-13T17:27:01.603" UserId="51" Text="Distributing the TTF is usually significantly more expensive (money wise) than other licensing schemes, so the games that do that are pretty rare.  See also &lt;a href=&quot;http://gamedev.stackexchange.com/questions/2666/using-a-particular-font-in-a-commercial-game&quot;&gt;this thread&lt;/a&gt;.  You don't want to make a Unicode font yourself.  &#xD;&#xA;&#xD;&#xA;Most implementations I've seen follow something like what you suggested in your second bullet point.  A lot of modern AAA games, though, are starting to use Flash to render all their UI elements and I'm not entirely sure how that handles its fonts." />
  <row Id="5252" PostHistoryTypeId="2" PostId="2696" RevisionGUID="75fab32c-c93c-4508-a099-502e2508d6fa" CreationDate="2010-08-13T17:32:43.917" UserId="51" Text="One easy/semi-hacky solution is to not use hitboxes but instead do a pixel test for you given sprite.  Basically you set up some alpha threshold and if the alpha value of a given pixel closest to the area you need to test against is greater than that, you've collided with it.&#xD;&#xA;&#xD;&#xA;A better approach I've used in the past is to just set up an array of points per tile (in your case, per frame) that signifies where the edges are.  You generate line segments out of that and do arbitrary n-gon testing for your collision.&#xD;&#xA;&#xD;&#xA;Barring that, you'll probably have to write your own solution so save out exactly what you're suggesting, i.e. bounding volume type x with properties y at location z for sprite w.  It heavily depends on what your specific needs are.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5254" PostHistoryTypeId="5" PostId="2696" RevisionGUID="1145d106-5fcc-462f-8018-e76b2acb7cc2" CreationDate="2010-08-13T17:43:50.483" UserId="51" Comment="edited body" Text="One easy/semi-hacky solution is to not use hitboxes but instead do a pixel test for you given sprite.  Basically you set up some alpha threshold and if the alpha value of a given pixel closest to the area you need to test against is greater than that, you've collided with it.&#xD;&#xA;&#xD;&#xA;A better approach I've used in the past is to just set up an array of points per tile (in your case, per frame) that signifies where the edges are.  You generate line segments out of that and do arbitrary n-gon testing for your collision.&#xD;&#xA;&#xD;&#xA;Barring that, you'll probably have to write your own solution to save out exactly what you're suggesting, i.e. bounding volume type x with properties y at location z for sprite w.  It heavily depends on what your specific needs are.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5255" PostHistoryTypeId="2" PostId="2697" RevisionGUID="99a39a5c-7360-4622-be3e-5129bf08260a" CreationDate="2010-08-13T18:17:12.053" UserId="395" Text="One important question is how many languages you plan to support. If you are going to need to support things like Arabic, you are pretty much stuck with freetype (which speaks TTF) since rewriting Arabic kerning rules is probably up there with writing your own GPU driver in terms of pain." />
  <row Id="5256" PostHistoryTypeId="2" PostId="2698" RevisionGUID="10131e97-2109-461c-8942-7aa2a453f6b4" CreationDate="2010-08-13T18:19:52.797" UserId="744" Text="If you are working with something that supports shaders and reasonably large textures, Valve has a technique for font rendering that scales very nicely and has minimal memory cost compared to other methods.&#xD;&#xA;&#xD;&#xA;http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&#xD;&#xA;&#xD;&#xA;If you need Unicode support, you can split the font textures up by codepage block or whatever. I believe we found that even fairly complicated kanji were readable at small-ish prerendered sizes (128x128 and 64x64).&#xD;&#xA;&#xD;&#xA;If you are trying something more complicated, like Arabic, or Devanagari, you are pretty much screwed, no matter the method you choose. There's no way to render arbitrary text in some languages efficiently in real-time, and you'll end up needing to render character digraphs/trigraphs/whole words at once." />
  <row Id="5257" PostHistoryTypeId="2" PostId="2699" RevisionGUID="f23175da-9de0-481e-8b1a-f98ab80504a1" CreationDate="2010-08-13T18:24:04.583" UserId="1580" Text="I would use an aabb-point test to single out which model(s) that I'm potentially hitting, and then do a pixel-test on those models. " />
  <row Id="5258" PostHistoryTypeId="2" PostId="2700" RevisionGUID="769203f6-da64-49bd-887e-9b51bd838518" CreationDate="2010-08-13T18:48:46.810" UserId="469" Text="Basically, how I profile a game that have multithreading and script interpreter? (Lua in my case)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have no idea of where to look for that.&#xD;&#xA;&#xD;&#xA;Also it would be nice to be able to profile code that resemble somehow the release code, my &quot;debug&quot; binary is about 12 times bigger..." />
  <row Id="5259" PostHistoryTypeId="1" PostId="2700" RevisionGUID="769203f6-da64-49bd-887e-9b51bd838518" CreationDate="2010-08-13T18:48:46.810" UserId="469" Text="Profiling code with threads and script interpreter." />
  <row Id="5260" PostHistoryTypeId="3" PostId="2700" RevisionGUID="769203f6-da64-49bd-887e-9b51bd838518" CreationDate="2010-08-13T18:48:46.810" UserId="469" Text="&lt;optimization&gt;&lt;scripting&gt;&lt;multithreading&gt;&lt;profiling&gt;&lt;profiler&gt;" />
  <row Id="5261" PostHistoryTypeId="2" PostId="2701" RevisionGUID="a35551d8-c97b-4002-8761-4e5d99d2ee74" CreationDate="2010-08-13T18:54:02.450" UserId="469" Text="I made several tests, and the FASTEST way (not the fastest to code) was particles made of GL_LINEs that knew their position and speed, and used that as the points when rendering (so, the faster the particle go, the most &quot;line&quot; it becomes, the slower, it becomes a point).&#xD;&#xA;&#xD;&#xA;The effect is REALLY cool (look at any geometry wars video to see it), and REALLY fast too. Kick the crap out of quads (specially because quads would make me need to calculate the double amount of vertexes)&#xD;&#xA;&#xD;&#xA;Also, it is better than using  a already done particle system, because I wanted a specific and FAST effect, particle systems usually support lots of features, with proportional amount of overhead." />
  <row Id="5262" PostHistoryTypeId="2" PostId="2702" RevisionGUID="18f0659d-1df1-4a11-80f8-cca6aaceb262" CreationDate="2010-08-13T19:10:31.380" UserId="469" Text="Basically, the issues were:&#xD;&#xA;&#xD;&#xA;Quality on a vector-based game.&#xD;&#xA;CPU amount taken.&#xD;&#xA;I/O bottleneck.&#xD;&#xA;&#xD;&#xA;What software to use for editing.&#xD;&#xA;&#xD;&#xA;To solve quality, I needed a lossless codec, or no compression.&#xD;&#xA;The lesser the compression, the more I would have I/O problems, but the more CPU I took, the more I would have CPU problems (doh).&#xD;&#xA;&#xD;&#xA;The solution, was use a RamDrive to solve the I/O bottleneck, thus now I was left mostly with how much CPU I wanted to take (ie: the smallest as possible). Thus theoretically the best would be no compression at all, but no compression at all on a ramdrive hit space available problems...&#xD;&#xA;&#xD;&#xA;So I researched, and found that the fastest lossless codec (don't matter how much it actually compress), and it was CamStudio Lossless&#xD;&#xA;&#xD;&#xA;The software I used, was VirtualDub (CamStudio itself cannot capture the window contents, it capture the entire window, thus wasting space).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now editing software:&#xD;&#xA;Well, noone here gave a good awnser, and neither I will do, but other lists can be found in other places." />
  <row Id="5263" PostHistoryTypeId="2" PostId="2703" RevisionGUID="d7bf7058-737a-4e5e-8001-fce618e936c9" CreationDate="2010-08-13T19:43:38.430" UserId="1134" Text="Until we have a few more specifics on your platform/OS/compiler, it's going to be hard to answer, but in the mean time, look at [this answer][1] to &quot;[In general how often and when should I optimize my code?][2]&quot; for some generic suggestions.&#xD;&#xA;&#xD;&#xA;Most of these suggestions will work equally well in optimized (release) or non-optimized (debug) builds.&#xD;&#xA;&#xD;&#xA;(I'll return and update this answer with more specific tools and ideas if you update the question with more details.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2190/in-general-how-often-and-when-should-i-optimize-my-code/2225#2225&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2190/in-general-how-often-and-when-should-i-optimize-my-code" />
  <row Id="5264" PostHistoryTypeId="2" PostId="2704" RevisionGUID="20b27d6d-e09a-4655-8c54-f0e7fbd93490" CreationDate="2010-08-13T20:05:41.763" UserId="1134" Text="This may be much heavier than you need, but here's how we do it.  We stick to AABBs for simplicity...  (The terrain is more arbitrary than AABBs, but almost all objects stick to AABBs.  They might be bigger or smaller than the sprite, but it works quite well with some tuning!)&#xD;&#xA;&#xD;&#xA;The pipeline supports several types of box:&#xD;&#xA;&#xD;&#xA;* **collision**, a single 2D AABB for interacting with terrain features (a relatively simple [SAT][1] engine)&#xD;&#xA;* **attack**, zero or more numbered 2D AABBs for determining where damage will occur&#xD;&#xA;* **vulnerability**, an optional 2D AABB for overlap testing with attack boxes (if A's attack box connects with B's vuln box, it's a hit!)&#xD;&#xA;* **attack select**, zero or more numbered boxes tested against either collision or vulnerability boxes to determine if AI should trigger a specific attack type&#xD;&#xA;* (you can also add additional named box params if this doesn't suit your needs)&#xD;&#xA;&#xD;&#xA;Each of these boxes is per-frame, per-animation.  If they don't change across an entire anim we only store them once with the first frame and a note that they repeat.&#xD;&#xA;&#xD;&#xA;The artist/designer-facing tool, which aggregates all the sprites and a bunch of metadata, will help you with the collision box.  In *automatic* mode it will simply snap the collision box to the &quot;outermost non-transparent pixels&quot; in a given sprite frame.  In manual mode you can tweak the box however you like.  There's a &quot;magic wand&quot; button for snapping it back to the outermost non-transparent pixels again.&#xD;&#xA;&#xD;&#xA;You don't have to have any given box for any given frame if you don't want it.&#xD;&#xA;&#xD;&#xA;(Note: it's also useful to track a &quot;reference point&quot; for sprite placement -- you can treat your character coordinates as bottom-center, or maybe you're dealing with a button and you want to place based on the center of the sprite, etc...  Helps with setting up UIs and uniformity in moving characters around -- characters are usually hauled around by bottom-center.)&#xD;&#xA;&#xD;&#xA;This info is exported into an intermediate xml-based format, and then baked by a subsequent tool into a binary format appropriate for the target platform.&#xD;&#xA;&#xD;&#xA;All of these reach the game and then use a simple quadtree-like space partition system to do their testing vs. one another.&#xD;&#xA;&#xD;&#xA;It's definitely possible to add a deeper pass to do pixel vs. pixel tests after the AABB pass if you need it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="5265" PostHistoryTypeId="2" PostId="2705" RevisionGUID="b4e12022-ccb7-41f5-95d2-12ae2416b81b" CreationDate="2010-08-13T20:07:09.653" UserId="1580" Text="I have a home-made profiling system that consists of profile-probes that I've injected on a lot of none-inner-loop places in my code. The probes are initially disabled and I just enable the ones that I want to check up on. The system simply throws out the information to a .txt file (or a network stream) that I then use another language to parse the output from and present the data in a more user-friendly way. The probes are globally initialized upon creation and only when recording them creates any data. &#xD;&#xA;&#xD;&#xA;The benefits of this is:    &#xD;&#xA;* While enabled (even in release builds), the system is light on cpu cycles and you'll most likely not notice any performance hit while all probes are disabled.    &#xD;&#xA;* While disabled (final build), the system is reduced to 0 cost (like most home-brewn profile-systems).   &#xD;&#xA;* It can measure time, hits, record callstacks, print variables, so it's flexible and can be used for most debugging that you'll need.    &#xD;&#xA;* It's dynamic, you can get exactly the information that you want from it. &#xD;&#xA;&#xD;&#xA;On the negative side: It took nearly 2 days to implement so it's fairly complex. It'll likely make up for that time though.&#xD;&#xA;&#xD;&#xA;Examples for usage:   &#xD;&#xA;* Timescoping    &#xD;&#xA;* Memory allocations (sizes, names, etc).    &#xD;&#xA;* Resource tracking    &#xD;&#xA;* Debugging (conditional prints).   &#xD;&#xA;" />
  <row Id="5266" PostHistoryTypeId="2" PostId="2706" RevisionGUID="b7da61be-ff75-4678-b855-eda2e8fc5803" CreationDate="2010-08-13T20:17:23.000" UserId="1261" Text="I've made a trailer recently for my game. I was somewhat helped by the engine, that allows for screenshots fast enough to actually animate. What I did:&#xD;&#xA;&#xD;&#xA;- Although I did not fixed the framerate, the captures were made at fixed intervals, 25 per second. I recorded my game session, which generated thousands of images on the drive.&#xD;&#xA;- I then imported these images into a clip in kdenlive&#xD;&#xA;- Added some titles, music, logos, fades in and fades out to give it a more pleasant look&#xD;&#xA;&#xD;&#xA;Actually capturing the images directly meant that I could not get the sounds from the game, but got a much better quality of images. Adding some music more than made up for it.&#xD;&#xA;" />
  <row Id="5267" PostHistoryTypeId="2" PostId="2707" RevisionGUID="eb66a904-043e-4d60-959b-7bb9ec9c9d47" CreationDate="2010-08-13T20:21:38.683" UserId="1232" Text="What tool are you using for authoring your sprites? If you're using GIMP or Photoshop, you can easily have the artists paint hit areas as a separate named layer. You would then write a tool as part of your content pipeline to:&#xD;&#xA;&#xD;&#xA;* extract the layer in question from each sprite sheet directly from the PSD/XCF file.&#xD;&#xA;* for each sprite area in the sprite sheet, search for the non-zero pixels in that sprite area and generate a bounding box&#xD;&#xA;* associate the bounding box with the sprite descriptor.&#xD;&#xA;&#xD;&#xA;The PSD format can be found here:&#xD;&#xA;  http://www.wotsit.org/list.asp?search=PSD&amp;button=GO!&#xD;&#xA;&#xD;&#xA;Of course, you could always have the artists export the layer manually to a standard file format that's easier for your tool to read, but we all know how artists love having manual processes forced down their throats :)" />
  <row Id="5268" PostHistoryTypeId="16" PostId="2673" RevisionGUID="818bb692-3ef4-4873-bc97-cda64a1596e5" CreationDate="2010-08-13T21:05:41.853" UserId="1495" />
  <row Id="5269" PostHistoryTypeId="2" PostId="2708" RevisionGUID="f71f862f-b93d-4e7e-8130-87cdb3f5d086" CreationDate="2010-08-13T21:15:31.997" UserId="490" Text="I say the hottest and hardest is to be a Studio founder, and to be a successful one at that.&#xD;&#xA;" />
  <row Id="5270" PostHistoryTypeId="16" PostId="2708" RevisionGUID="f71f862f-b93d-4e7e-8130-87cdb3f5d086" CreationDate="2010-08-13T21:15:31.997" UserId="-1" />
  <row Id="5271" PostHistoryTypeId="2" PostId="2709" RevisionGUID="b1503062-0645-41a8-a424-bbf4271717ef" CreationDate="2010-08-13T21:29:48.450" UserId="338" Text="There are some article on this subject at [RogueBasin][1]&#xD;&#xA;&#xD;&#xA;regards    &#xD;&#xA;Guillaume&#xD;&#xA;&#xD;&#xA;  [1]: http://roguebasin.roguelikedevelopment.org/index.php?title=Articles#Map" />
  <row Id="5272" PostHistoryTypeId="2" PostId="2710" RevisionGUID="a0dba0bf-1995-4f90-9cc7-9022116178d2" CreationDate="2010-08-13T21:38:00.887" UserId="659" Text="&#xD;&#xA;Coding positions seem to be becoming less exciting/creative and less respected with each passing year and increase in team size :(&#xD;&#xA;&#xD;&#xA;For each 'exciting' dev position (e.g cutting-edge graphics, or gameplay coding on a big title), there's about 10 coders needed to to fairly dull work (front end, TRC/TCR compliance, tools, porting to the lesser platforms)&#xD;&#xA;&#xD;&#xA;You won't make big money coding games unless you really get lucky (right place at the right time). The only real money is in founding a studio and selling up to a megapublisher. Or creating an unexpected big hit with a very small team.&#xD;&#xA;&#xD;&#xA;As a career, games programming seems somewhat dead-end unless you have what it takes to start a studio of your own, or are willing to give up coding and aim for a management role...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5273" PostHistoryTypeId="16" PostId="2710" RevisionGUID="a0dba0bf-1995-4f90-9cc7-9022116178d2" CreationDate="2010-08-13T21:38:00.887" UserId="-1" />
  <row Id="5274" PostHistoryTypeId="2" PostId="2711" RevisionGUID="f57c2186-b88e-472f-8dfb-c86e7f56d640" CreationDate="2010-08-13T21:43:39.873" UserId="659" Text="This is what you're looking for:&#xD;&#xA;&#xD;&#xA;http://www.angelcode.com/products/bmfont/&#xD;&#xA;&#xD;&#xA;Used by numerous games, from indies to AAA titles, to create bitmap fonts from TTFs&#xD;&#xA;&#xD;&#xA;Using this tool or something similar is probably the most common way to implement font rendering in a game. Other options do exist (e.g. rendering vector fonts directly with something like FreeType), but the simplicity and performance of bitmap fonts usually makes them the obvious choice&#xD;&#xA;&#xD;&#xA;(Note that Valve's distance-field stuff is super-sweet for extreme magnification of text, such as the examples of decals in an FPS, but of little or no benefit for UI text, which is often being scaled down from the source texture, or maybe scaled up just a little)" />
  <row Id="5275" PostHistoryTypeId="2" PostId="2712" RevisionGUID="fd86208c-1b69-4804-a1bc-60b9b7921e9e" CreationDate="2010-08-13T21:47:06.957" UserId="309" Text="I'm working on a top-down shooter akin to DoDonPachi/Ikaruga/etc. The camera movement through the world is handled automatically with the player able to move inside of the camera's visible region.&#xD;&#xA;&#xD;&#xA;Along the way, enemies are scripted to spawn at particular points along the path. While this sounds straightforward, I could see two ways to define these points:&#xD;&#xA;&#xD;&#xA; 1. Camera's position: 'trigger' spawning as the camera passes by the points&#xD;&#xA; 2. Time along path: &quot;30 seconds in, spawn 2 enemies&quot;&#xD;&#xA;&#xD;&#xA;(In both cases, the camera-relative positions would be defined as well as the behavior of the enemy)&#xD;&#xA;&#xD;&#xA;The way I see it, the way you define these points will directly affect how the 'level editor,' or what have you, will work.&#xD;&#xA;&#xD;&#xA;Would there be any benefits of one approach over the other?" />
  <row Id="5276" PostHistoryTypeId="1" PostId="2712" RevisionGUID="fd86208c-1b69-4804-a1bc-60b9b7921e9e" CreationDate="2010-08-13T21:47:06.957" UserId="309" Text="Top-Down Shooter: Enemy Spawning" />
  <row Id="5277" PostHistoryTypeId="3" PostId="2712" RevisionGUID="fd86208c-1b69-4804-a1bc-60b9b7921e9e" CreationDate="2010-08-13T21:47:06.957" UserId="309" Text="&lt;internals&gt;" />
  <row Id="5278" PostHistoryTypeId="2" PostId="2713" RevisionGUID="3a743be3-b5ac-4874-9d91-a8e903039c97" CreationDate="2010-08-13T21:58:44.517" UserId="659" Text="For a neat little way to handle the spawning/deletion/update of particles, assuming you have a simple array of particles - Particles[MAX_PARTICLES]:&#xD;&#xA;&#xD;&#xA;Keep track of the active particles (starting with NumActiveParticles = 0)&#xD;&#xA;&#xD;&#xA;New particles are always added at the end of the array:&#xD;&#xA;&#xD;&#xA;    pNewParticle = &amp;Particles[NumActiveParticles++];&#xD;&#xA;&#xD;&#xA;The clever bit - When removing a 'dead' particle - swap it with the last active particle, and decrement NumActiveParticles:&#xD;&#xA;&#xD;&#xA;    if ( DeadParticle &lt; NumActiveParticles-1 )&#xD;&#xA;    {&#xD;&#xA;      Particles[ DeadParticle ] = Particles[ NumActiveParticles-1 ];&#xD;&#xA;    }&#xD;&#xA;    NumActiveParticles--;&#xD;&#xA;&#xD;&#xA;This avoids any searching for 'unused particles' when spawning, and avoids any scanning through an array of MAX_PARTICLES if none are in use.&#xD;&#xA;&#xD;&#xA;Note that this only works if the update/render order is unimportant (as is the case for many particle effects, which use additive blending) - as this method of deleting a particle re-orders the array&#xD;&#xA;" />
  <row Id="5279" PostHistoryTypeId="2" PostId="2714" RevisionGUID="38760143-4c63-4d9e-a1e2-6c64402c7379" CreationDate="2010-08-13T22:08:14.823" UserId="891" Text="Just a though, the camera's position to spawn would probably be more flexible since you could modify the path without having to worry about a large domino affect.&#xD;&#xA;&#xD;&#xA;If you go with time spawns then it will be a huge pain to add or remove path because you will have to modify a lot of enemy spawns.&#xD;&#xA;&#xD;&#xA;Another issue I see is tweaking the camera speed.  Do you really want to go and have to tweak enemy spawns just because you've made the camera move a little faster or slower?  Plus you could need to play through the level a horrible amount of times just to find spawn times or tweaks for them." />
  <row Id="5280" PostHistoryTypeId="2" PostId="2715" RevisionGUID="09622c19-7ebe-4e27-b56f-600b0bab2fe7" CreationDate="2010-08-13T22:09:09.347" UserId="659" Text="Make a really good game. Get it on Steam. Market it effectively (generate enough buzz on gaming websites/forums)&#xD;&#xA;&#xD;&#xA;But the most important step is making a really good game.&#xD;&#xA;&#xD;&#xA;Kind of surprising to see suggestions of 'go for mobile development', given how oversaturated with $0.99 titles the iPhone app store is these days? - might have been a great idea 2 years or so ago - but isn't that gold rush well and truly over? - or have the new Apple devices re-ignited it?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5281" PostHistoryTypeId="2" PostId="2716" RevisionGUID="f163d00a-b178-4395-b7f9-db112b15c0d3" CreationDate="2010-08-13T22:22:29.710" UserId="865" Text="I'd go for camera position. Using time will make it rather hard if you want to have an enemy path match up with some graphics in your map file (like enemies following a curved path). Also it allows you to speed up the scroll without changing spawnpoints.&lt;br&gt;&#xD;&#xA;The flipside is that speeding up the scroll will make enemies come faster. Which could be considered a plus (speedup would be difficulty up) or a negative (scroll speed influences pacing)." />
  <row Id="5282" PostHistoryTypeId="6" PostId="1589" RevisionGUID="f19b9c92-ad3d-4114-90b1-5c7422e00dd7" CreationDate="2010-08-13T22:24:16.853" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;physics&gt;&lt;frame-rate&gt;" />
  <row Id="5283" PostHistoryTypeId="6" PostId="2712" RevisionGUID="fa01248a-0390-4f88-bee9-543877da255f" CreationDate="2010-08-13T22:27:07.100" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;internals&gt;" />
  <row Id="5284" PostHistoryTypeId="2" PostId="2717" RevisionGUID="362773fb-5a3f-4baf-9bfd-d8de4c47eee3" CreationDate="2010-08-13T22:45:30.777" UserId="370" Text="What tool do you use to convert ttf fonts to bitmap fonts?&#xD;&#xA;&#xD;&#xA;Following is a list of features I'm looking for.  I'd be happy with any tool really, but one that had these features would be better.&#xD;&#xA;&#xD;&#xA; * outputs power-of-2 texture atlas&#xD;&#xA; * parsible config file (so I don't have to use their rendering library)&#xD;&#xA; * output kerning information&#xD;&#xA; * cross platform&#xD;&#xA; * a rendering library would be great if it lets me make the actual OpenGL calls.&#xD;&#xA;&#xD;&#xA;So what tool have you used?  Were you happy with it?" />
  <row Id="5285" PostHistoryTypeId="1" PostId="2717" RevisionGUID="362773fb-5a3f-4baf-9bfd-d8de4c47eee3" CreationDate="2010-08-13T22:45:30.777" UserId="370" Text="Tool to create a bitmap font from a true type font" />
  <row Id="5286" PostHistoryTypeId="3" PostId="2717" RevisionGUID="362773fb-5a3f-4baf-9bfd-d8de4c47eee3" CreationDate="2010-08-13T22:45:30.777" UserId="370" Text="&lt;generated&gt;&lt;fonts&gt;&lt;pipeline&gt;" />
  <row Id="5287" PostHistoryTypeId="2" PostId="2718" RevisionGUID="953b34ef-8385-4b5a-a8a5-40d6bc159aab" CreationDate="2010-08-13T22:56:01.123" UserId="160" Text="The keyword you're looking for is a &quot;rasterizer&quot;. XNA has one built in. A quick Google search brings up [FreeType](http://en.wikipedia.org/wiki/FreeType). I'm not sure what else is out there." />
  <row Id="5288" PostHistoryTypeId="2" PostId="2719" RevisionGUID="55a75216-8d4c-420f-8c0e-d8669a8f1612" CreationDate="2010-08-13T22:58:05.003" UserId="160" Text="If you like reading code and can parse C#, may I suggest the dungeon generator my roguelike Amaranth uses? It's [here](http://bitbucket.org/munificent/amaranth/src/tip/Amaranth.Engine/Classes/Dungeon/Generation/). It handles connected rooms, extensible features, and some other nice stuff.&#xD;&#xA;&#xD;&#xA;If you pull down and build the whole project, there's a standalone tool that will generate and draw the dungeons so you can tweak it and see how it works." />
  <row Id="5289" PostHistoryTypeId="2" PostId="2720" RevisionGUID="aacf4144-4e48-4482-859b-6fb27d23cb80" CreationDate="2010-08-13T23:06:09.733" UserId="162" Text="If you want an interactive tool you may want to take a look at [FontForge][1], which is a full font editor that supports a variety of tools for converting TTF fonts into bitmap formats. It supports various types of scripting, so you should be able to integrate it into a pipeline as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fontforge.sourceforge.net/generate.html" />
  <row Id="5290" PostHistoryTypeId="2" PostId="2721" RevisionGUID="16203935-f907-4d6d-b539-832cdd5a9027" CreationDate="2010-08-13T23:07:40.603" UserId="865" Text="Google showed quite a few of those beasts. This might be close to what you're after&lt;br&gt;&#xD;&#xA;http://www.angelcode.com/products/bmfont/&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;You mention cross-platform, but do you mean the tool, or the output? (which would be cross platform maybe apart from endianness)&#xD;&#xA;" />
  <row Id="5291" PostHistoryTypeId="2" PostId="2722" RevisionGUID="96f4cf61-327d-44ef-8bed-99a97d48f6a3" CreationDate="2010-08-13T23:11:06.807" UserId="162" Text="I would suggest placing the spawn positions actually ON the background map as nodes that are visible from some sort of map editor. You can represent a shmup spawn with two variables:&#xD;&#xA;&#xD;&#xA; 1. Position they are first visible from, which is best visualized as a point&#xD;&#xA; 2. Distance from bottom screen when you should spawn them.&#xD;&#xA;&#xD;&#xA;Then you can visualize the distance from bottom of screen as a vertical line pointing downward from the spawn node (which could be visualied as a greyed out version of the enemy or some such). When the bottom of the screen touches that line it will spawn. This allows you to do all of enemy editing completely in some sort of visual editor, and give you an overview of the entire flow of the game.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5292" PostHistoryTypeId="5" PostId="2714" RevisionGUID="2519e82c-5ee8-49ea-b904-af25c9d85a09" CreationDate="2010-08-13T23:15:07.380" UserId="891" Comment="edited body" Text="Just a though, the camera's position to spawn would probably be more flexible since you could modify the path without having to worry about a large domino affect.&#xD;&#xA;&#xD;&#xA;If you go with time spawns then it will be a huge pain to add or remove path because you will have to modify a lot of enemy spawns.&#xD;&#xA;&#xD;&#xA;Another issue I see is tweaking the camera speed.  Do you really want to go and have to tweak enemy spawns just because you've made the camera move a little faster or slower?  Plus you would need to play through the level a horrible amount of times just to find spawn times or tweaks for them." />
  <row Id="5294" PostHistoryTypeId="2" PostId="2724" RevisionGUID="f4a74f36-5f9a-47e3-aede-f1644c11c210" CreationDate="2010-08-14T00:43:38.600" UserId="1553" Text="I don't know of any sites specifically for this, but the XAML icon pack that comes with VS2010 is a good starting point. See also: http://stackoverflow.com/questions/315819/source-for-xaml-toolbar-icons . These are not game related -- but considering how few WPF games there are out there, you gotta take what you can find.&#xD;&#xA;&#xD;&#xA;Illustrator makes it very easy to export XAML (Inskscape also has a XAML export feature, but in my experience it's very buggy, borderline useless). There's also [tools to convert Flash to XAML][1], if you have Flash and prefer that workflow. If you want to go 3D, there's a [XAML exporter for Blender][2] (probably other 3D packages have them too). And finally, don't forget Blend (the trial lasts for a long time!).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mikeswanson.com/swf2xaml/&#xD;&#xA;  [2]: http://xamlexporter.codeplex.com/" />
  <row Id="5295" PostHistoryTypeId="5" PostId="2664" RevisionGUID="c2a284e8-7781-40bf-adf9-62952ee844a0" CreationDate="2010-08-14T00:46:05.523" UserId="865" Comment="added 439 characters in body; added 10 characters in body" Text="This has been more or less answered before. Your first stop place should be http://pcg.wikidot.com/&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Since I was accused of this not being a helpful answer at all (really?), this page on the wiki deals with Dungeon generators and links to various articles.&lt;br&gt;&#xD;&#xA;http://pcg.wikidot.com/pcg-algorithm:dungeon-generation&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;I'd still recommend browsing the whole wiki though, as procedural content generation is just a very creative approach and any and all ideas are valid. It's a lateral thinking challenge - and a fun one at that." />
  <row Id="5296" PostHistoryTypeId="5" PostId="2724" RevisionGUID="b47e155a-e998-4202-bc35-34ae9c91c989" CreationDate="2010-08-14T00:50:12.567" UserId="1553" Comment="added 570 characters in body" Text="I don't know of any sites specifically for this, but the XAML icon pack that comes with VS2010 is a good starting point. See also: http://stackoverflow.com/questions/315819/source-for-xaml-toolbar-icons . These are not game related -- but considering how few WPF games there are out there, you gotta take what you can find.&#xD;&#xA;&#xD;&#xA;Illustrator makes it very easy to export XAML (Inskscape also has a XAML export feature, but in my experience it's very buggy, borderline useless). There's also [tools to convert Flash to XAML][1], if you have Flash and prefer that workflow. If you want to go 3D, there's a [XAML exporter for Blender][2] (probably other 3D packages have them too). And don't forget Blend (the trial lasts for a long time!).&#xD;&#xA;&#xD;&#xA;Finally, there are also a lot of open-source WPF apps to check out. I'd guess 95% use bitmap rather than vector graphics (mainly because vector rendering *will* slow things down), but some might have XAML graphics. Also, the legality of this is questionable, but if you find a really cool effect in a closed-source app, you can use .NET reflector + [BAML Viewer][3] to check it out -- don't copy/paste it, but it can't hurt to look for a little inspiration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mikeswanson.com/swf2xaml/&#xD;&#xA;  [2]: http://xamlexporter.codeplex.com/&#xD;&#xA;  [3]: http://reflectoraddins.codeplex.com/wikipage?title=BamlViewer&amp;referringTitle=Home&amp;ProjectName=reflectoraddins" />
  <row Id="5297" PostHistoryTypeId="5" PostId="2664" RevisionGUID="260e68d3-856d-4346-8078-2f5c338d1f15" CreationDate="2010-08-14T00:52:43.917" UserId="865" Comment="added 110 characters in body" Text="This has been more or less answered before. Your first stop place should be http://pcg.wikidot.com/&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Since I was accused of this not being a helpful answer at all (really? Someone asks for a resource and I post a link to a wiki dealing with the subject?), this page on the wiki deals with Dungeon generators specifically and links to various articles on the subject.&lt;br&gt;&#xD;&#xA;http://pcg.wikidot.com/pcg-algorithm:dungeon-generation&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;I'd still recommend browsing the whole wiki though, as procedural content generation is just a very creative approach and any and all ideas are valid. It's a lateral thinking challenge - and a fun one at that." />
  <row Id="5298" PostHistoryTypeId="2" PostId="2725" RevisionGUID="974b887b-4452-46a6-91d9-e218a10edbf7" CreationDate="2010-08-14T01:04:33.143" UserId="1553" Text="Yup; there's definitely not enough of these! In addition to the above, the samples that come with [RenderMonkey][1] have definitely been helpful for me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.amd.com/gpu/rendermonkey/Pages/default.aspx" />
  <row Id="5299" PostHistoryTypeId="2" PostId="2726" RevisionGUID="7f2cee0a-bcd6-4e39-9c42-d03490311aa6" CreationDate="2010-08-14T01:37:22.383" UserId="430" Text="The last time I was looking for this (for an iPhone game), I tried various options but couldn't find one that did everything I wanted.  I needed to render a single texture using very small characters from a commercial TTF font.  I needed to be able to specify character ranges so it would only contain the characters I needed.  I wanted it to pack the glyphs as tightly as it could.  I needed texture coordinates at runtime.  I didn't care about &quot;real&quot; kerning, but I needed glyph measurements at runtime so it would be spaced sensibly.  So I wrote a small Windows app that rendered all the characters and saved out the ABC spacings (as reported by Windows) along with texture coordinates.&#xD;&#xA;&#xD;&#xA;BTW, if you want to render very small text (like less than 16 pixels high) under XP or Vista, you will run into shortcomings with Windows' anti-aliasing.  An easy fix for me was to use http://drwatson.nobody.jp/gdi++/index-en.html to get transparent supersampling.  If I were starting over, I'd probably take the same approach but look at FreeType2 instead of native text rendering.&#xD;&#xA;&#xD;&#xA;If your text isn't updated often, you could just use the platform's text rendering (or maybe FreeType) to render whole chunks to texture as needed at runtime.  Then you just need to render a single quad for each string, but the texture allocation gets more complicated.  On the upside, though, you get flawless text rendering and layout for free on those difficult Asian languages along with your significantly faster GL code.  Rendering lots of individual characters is expensive, even with degenerate tri strips or whatnot.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5300" PostHistoryTypeId="2" PostId="2727" RevisionGUID="cde675ad-0bea-4d1c-a8e7-31e080cafe8d" CreationDate="2010-08-14T01:52:01.880" UserId="430" Text="For example, suppose my code can determine that upstream bandwidth is unusually limited.  And suppose I'm using a fully-connected mesh topology combined with a UDP-like protocol for voice chat.  Is there an established way to reduce the risk of packet loss so that the voice playback will either be solid or muted, but not jittery or choppy?  This must be a solved problem in the VoIP world, but I'm not sure where to look." />
  <row Id="5301" PostHistoryTypeId="1" PostId="2727" RevisionGUID="cde675ad-0bea-4d1c-a8e7-31e080cafe8d" CreationDate="2010-08-14T01:52:01.880" UserId="430" Text="Are there any clever methods of regulating bandwidth usage for voice chat payload packets?" />
  <row Id="5302" PostHistoryTypeId="3" PostId="2727" RevisionGUID="cde675ad-0bea-4d1c-a8e7-31e080cafe8d" CreationDate="2010-08-14T01:52:01.880" UserId="430" Text="&lt;programming&gt;&lt;algorithm&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;voice&gt;" />
  <row Id="5303" PostHistoryTypeId="2" PostId="2728" RevisionGUID="f81ff099-f58e-4fd6-a643-e167fa69faeb" CreationDate="2010-08-14T03:12:03.703" UserId="1443" Text="Good audio programmers seem quite rare.  However this may not be a hard job to get because most game studios undervalue audio." />
  <row Id="5304" PostHistoryTypeId="16" PostId="2728" RevisionGUID="f81ff099-f58e-4fd6-a643-e167fa69faeb" CreationDate="2010-08-14T03:12:03.703" UserId="-1" />
  <row Id="5305" PostHistoryTypeId="2" PostId="2729" RevisionGUID="2c964fb7-1a51-4d25-bddf-ebc9c8e36b66" CreationDate="2010-08-14T04:14:54.683" UserId="1206" Text="Try FontStudio:&#xD;&#xA;http://www.ogre3d.org/forums/viewtopic.php?f=11&amp;t=47802&#xD;&#xA;&#xD;&#xA;It's made especially for creating bitmap fonts for games.&#xD;&#xA;&#xD;&#xA;I post a link to the Ogre3D forum, because it hasn't got a home of its own currently.&#xD;&#xA;&#xD;&#xA;Find a link to the latest version in the last post of that topic (page 2)." />
  <row Id="5306" PostHistoryTypeId="2" PostId="2730" RevisionGUID="1be1fa59-bdff-45f6-a4ed-32ed80bb74e0" CreationDate="2010-08-14T04:56:25.543" UserId="327" Text="Per this [excellent question][1], and excellent answers, I am attempting to write a breakout clone.&#xD;&#xA;&#xD;&#xA;Regarding the collision detection against the walls, does XNA provide a set of helper methods/objects to determine which side of the rectangle was hit? I'd like to use the Vector2.Reflect method to properly create a new velocity vector, but it requires the proper normal. I can write the methods to figure out which side was hit, and thus which normal to use, but I wanted to know if XNA provided code to handle this already.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with" />
  <row Id="5307" PostHistoryTypeId="1" PostId="2730" RevisionGUID="1be1fa59-bdff-45f6-a4ed-32ed80bb74e0" CreationDate="2010-08-14T04:56:25.543" UserId="327" Text="XNA 2D Collision Detection with Rectangles: Helper Objects?" />
  <row Id="5308" PostHistoryTypeId="3" PostId="2730" RevisionGUID="1be1fa59-bdff-45f6-a4ed-32ed80bb74e0" CreationDate="2010-08-14T04:56:25.543" UserId="327" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="5309" PostHistoryTypeId="2" PostId="2731" RevisionGUID="8245c8cc-b810-4330-8bf0-ed6b7a35d434" CreationDate="2010-08-14T06:56:01.123" UserId="865" Text="I honestly don't know, but I think breakout is one of the suggested games *because* that's eactly the kind of problem you learn to solve. I'd go as far as to say that writing your own vector2.Reflect would benefit you.&lt;br&gt;&#xD;&#xA;I mean.....if you'd use supplied methods wouldn't you sidestep the learning/wing earning process?" />
  <row Id="5310" PostHistoryTypeId="5" PostId="2731" RevisionGUID="6bf5475d-bf11-4c54-bdbf-b6719f10f2b5" CreationDate="2010-08-14T07:06:23.300" UserId="865" Comment="added 15 characters in body" Text="I honestly don't know, but I would think breakout is one of the suggested games *because* that's eactly the kind of problem you learn to solve yourself. I'd go as far as to say that writing your own vector2.Reflect would benefit you.&lt;br&gt;&#xD;&#xA;I mean.....if you'd use supplied methods wouldn't you sidestep the learning/wing earning process?" />
  <row Id="5311" PostHistoryTypeId="2" PostId="2732" RevisionGUID="4137f66a-c2c1-4c34-a8a0-b7330f4996b9" CreationDate="2010-08-14T07:40:22.440" UserId="1692" Text="I'm speaking on behalf of CheapProFonts. ;)&#xD;&#xA;Obtaining a license for one of our fonts for inclusion in a software is easy and inexpensive: Just let us know that the font you purchase IS for that purpose, and then purchase two licenses for the font. &#xD;&#xA;&#xD;&#xA;So for $20 you will be allowed to include the font in your game and distribute as many copies of that game as you want to. No limit. If you make a demo of the game (=another binary/program so to speak) you should also purchase a $20 license for that. And if you make a sequel, another license @ $20 for that. And so on.&#xD;&#xA;One double license per font per software.&#xD;&#xA;And a credit would be nice ;)&#xD;&#xA;&#xD;&#xA;I hope you find our licensing scheme easy and affordable.&#xD;&#xA;&#xD;&#xA;Kind regards&#xD;&#xA;&#xD;&#xA;Roger" />
  <row Id="5312" PostHistoryTypeId="2" PostId="2733" RevisionGUID="83bf780d-fe4c-47de-b574-ffbd6b004930" CreationDate="2010-08-14T08:21:04.853" UserId="192" Text="I have encountered the same problem yesterday. My solution is this one, it is vertex type independent and works quite good.&#xD;&#xA;&#xD;&#xA;    protected BoundingBox UpdateBoundingBox(Model model, Matrix worldTransform)&#xD;&#xA;    {&#xD;&#xA;        // Initialize minimum and maximum corners of the bounding box to max and min values&#xD;&#xA;        Vector3 min = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue);&#xD;&#xA;        Vector3 max = new Vector3(float.MinValue, float.MinValue, float.MinValue);&#xD;&#xA;&#xD;&#xA;        // For each mesh of the model&#xD;&#xA;        foreach (ModelMesh mesh in model.Meshes)&#xD;&#xA;        {&#xD;&#xA;            foreach (ModelMeshPart meshPart in mesh.MeshParts)&#xD;&#xA;            {&#xD;&#xA;                // Vertex buffer parameters&#xD;&#xA;                int vertexStride = meshPart.VertexBuffer.VertexDeclaration.VertexStride;&#xD;&#xA;                int vertexBufferSize = meshPart.NumVertices * vertexStride;&#xD;&#xA;&#xD;&#xA;                // Get vertex data as float&#xD;&#xA;                float[] vertexData = new float[vertexBufferSize / sizeof(float)];&#xD;&#xA;                meshPart.VertexBuffer.GetData&lt;float&gt;(vertexData);&#xD;&#xA;&#xD;&#xA;                // Iterate through vertices (possibly) growing bounding box, all calculations are done in world space&#xD;&#xA;                for (int i = 0; i &lt; vertexBufferSize / sizeof(float); i += vertexStride / sizeof(float))&#xD;&#xA;                {&#xD;&#xA;                    Vector3 transformedPosition = Vector3.Transform(new Vector3(vertexData[i], vertexData[i + 1], vertexData[i + 2]), worldTransform);&#xD;&#xA;&#xD;&#xA;                    min = Vector3.Min(min, transformedPosition);&#xD;&#xA;                    max = Vector3.Max(max, transformedPosition);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Create and return bounding box&#xD;&#xA;        return new BoundingBox(min, max);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;All calculations are done in world space, this gives you world space bounding boxes (which is quite common for AABBs). Since it is quite expensive (but still performs good in real-time) just update it on dynamic objects and only when a rotation is performed (you can just translate AABBs with objects if that is the only transform)." />
  <row Id="5313" PostHistoryTypeId="2" PostId="2734" RevisionGUID="b87b36f8-0f0b-4d93-a009-1133d31d28c6" CreationDate="2010-08-14T09:05:50.050" UserId="1251" Text="i have a code segment in which i use hitTest() a couple of times. and at a particular section the hitTest stops working. it doesnt test the collision of body a and body b&#xD;&#xA;&#xD;&#xA;i tried using _level0.exit.hitTest(ourcar._x,ourcar._y,true)&#xD;&#xA;&#xD;&#xA;along with exit.hitTest(ourcar._x,ourcar._y,true)&#xD;&#xA;&#xD;&#xA;both doesnt work?why?" />
  <row Id="5314" PostHistoryTypeId="1" PostId="2734" RevisionGUID="b87b36f8-0f0b-4d93-a009-1133d31d28c6" CreationDate="2010-08-14T09:05:50.050" UserId="1251" Text="my hitTest() doesnt work at times?" />
  <row Id="5315" PostHistoryTypeId="3" PostId="2734" RevisionGUID="b87b36f8-0f0b-4d93-a009-1133d31d28c6" CreationDate="2010-08-14T09:05:50.050" UserId="1251" Text="&lt;flash&gt;&lt;collision-detection&gt;&lt;actionscript&gt;" />
  <row Id="5316" PostHistoryTypeId="2" PostId="2735" RevisionGUID="d8807d93-38e2-4753-8645-03c397a904da" CreationDate="2010-08-14T09:14:50.803" UserId="1251" Text="a person who's got patience and the quest to learn when new technologies arrive.. he'd get the job  he always wanted..be it a game graphics programmer or game programmer lead. i believe u can build a house only after u've bought the first brick :)&#xD;&#xA;&#xD;&#xA;going up is a slow and very much desired process." />
  <row Id="5317" PostHistoryTypeId="16" PostId="2735" RevisionGUID="d8807d93-38e2-4753-8645-03c397a904da" CreationDate="2010-08-14T09:14:50.803" UserId="-1" />
  <row Id="5318" PostHistoryTypeId="2" PostId="2736" RevisionGUID="04c6b10b-1bda-4421-9bfa-4e2a3e37d565" CreationDate="2010-08-14T09:39:24.777" UserId="1694" Text="I want to learn to develop 3D and 2D graphics with either OpenGL or DirectX. I chose OpenGL as it's being used in [webGL][1] and works cross-platform.&#xD;&#xA;&#xD;&#xA;I already know .NET well, and the C# language just fits my style very well and I feel secure with it.&#xD;&#xA;&#xD;&#xA;However, I want to develop a game that works on Windows and Linux. Is this possible to do with the combination of C#, .NET and OpenGL. I know that OpenGL will not be a problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/WebGL" />
  <row Id="5319" PostHistoryTypeId="1" PostId="2736" RevisionGUID="04c6b10b-1bda-4421-9bfa-4e2a3e37d565" CreationDate="2010-08-14T09:39:24.777" UserId="1694" Text="Can I develop Linux + Windows games using C#, .NET and OpenGL?" />
  <row Id="5320" PostHistoryTypeId="3" PostId="2736" RevisionGUID="04c6b10b-1bda-4421-9bfa-4e2a3e37d565" CreationDate="2010-08-14T09:39:24.777" UserId="1694" Text="&lt;opengl&gt;&lt;c#&gt;&lt;cross-platform&gt;&lt;.net&gt;" />
  <row Id="5321" PostHistoryTypeId="2" PostId="2737" RevisionGUID="28fc4532-1555-4e88-a37c-dd3f686b50d9" CreationDate="2010-08-14T09:42:11.300" UserId="20" Text="This is a very specific problem and is very hard to answer without some knowledge about your code. I'm not sure if gamedev is the right place for this kind of question?&#xD;&#xA;&#xD;&#xA;My guess is that your entities aren't located in the same coordinate space. Is the `ourcar` entity placed in the same *level* as the `exit` entity? If `exit` is on `_level0`, then `ourcar` needs to be on `_level0` as well. Otherwise you'll have to convert the coordinates of `ourcar` to the coordinate-space of `_level0` and then perform the hit-test using these coordinates." />
  <row Id="5322" PostHistoryTypeId="5" PostId="2737" RevisionGUID="3628c997-e9f7-4832-bb15-2acd3a195bbd" CreationDate="2010-08-14T09:49:05.993" UserId="20" Comment="added further information to the answer" Text="This is a very specific problem and is very hard to answer without some knowledge about your code. I'm not sure if gamedev is the right place for this kind of question?&#xD;&#xA;&#xD;&#xA;My guess is that your entities aren't located in the same coordinate space. Is the `ourcar` entity placed in the same *level* as the `exit` entity? If `exit` is on `_level0`, then `ourcar` needs to be on `_level0` as well. Otherwise you'll have to convert the coordinates of `ourcar` to the coordinate-space of `_level0` and then perform the hit-test using these coordinates.&#xD;&#xA;&#xD;&#xA;**Edit:** Sorry, it has been a long time since I last used `hitTest`. According to [this page][1], the x and y coordinates must always be global coordinates. So you have to make sure the `x` and `y` coordinates are relative to the global coordinate space. You can use [localToGlobal][2] to calculate these. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary534.html&#xD;&#xA;  [2]: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary539.html" />
  <row Id="5323" PostHistoryTypeId="2" PostId="2738" RevisionGUID="79622d4a-18e8-4187-b352-e6958cd9b7f2" CreationDate="2010-08-14T10:51:10.073" UserId="1261" Text="I managed to get reasonably good looking levels by using the following algorithm, based on a square grid:&#xD;&#xA;&#xD;&#xA;First, create a set of rooms. Random parameters will define the size of rooms and their numbers. An adaptive algorithm could even define some zones that are made of large hallways, and others of very small rooms.&#xD;&#xA;&#xD;&#xA;Then, you need to make sure that all rooms are connected to each other. For this, run a pathfinder to dig corridors (let's say, A*) in between each pair of rooms, giving a random chosen weight to existing spaces (rooms or other corridors) compared to space not yet carved (the walls). If the difference in weight is small, then digging new corridors will be reasonably cheap, and  the algorithm will make many corridors in between rooms, with many possibilities to go from a place to another. If the difference in weight is high, then the algorithm will prefer going through existing rooms and corridors, making the paths more tortuous, and with fewer choices to reach a certain destination.&#xD;&#xA;&#xD;&#xA;This allows you, from a small number of parameters, to create very different looking levels, from sparse massive halls with small corridors linking them to a hive looking maze of closely interconnected chambers.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://1.bp.blogspot.com/_c7c8R8g7is8/TGZzfeY7p3I/AAAAAAAAETo/_R3KMcxIhWc/s1600/rooms1.png&quot;&gt;Here is an example of a generated level.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Based on this algorithm, you could add wall decoration that depends on the zone, make corridors smaller or larger, make special rooms, and so on.&#xD;&#xA;" />
  <row Id="5324" PostHistoryTypeId="2" PostId="2739" RevisionGUID="8fcc1389-c61f-4646-9f69-c7e005d61900" CreationDate="2010-08-14T11:11:23.507" UserId="1251" Text="i am a game programmer and i use actionscript to do all my collision checking, boundary checking etc...but recently i noticed there are things called &quot;physics engines&quot; that help me concentrate more on game making rather than physics making. so i would like to know more. i heard there are few engines called &quot;box2dflash&quot; and &quot;APE&quot;. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="5325" PostHistoryTypeId="1" PostId="2739" RevisionGUID="8fcc1389-c61f-4646-9f69-c7e005d61900" CreationDate="2010-08-14T11:11:23.507" UserId="1251" Text="which is the best physics engine for flash as3?" />
  <row Id="5326" PostHistoryTypeId="3" PostId="2739" RevisionGUID="8fcc1389-c61f-4646-9f69-c7e005d61900" CreationDate="2010-08-14T11:11:23.507" UserId="1251" Text="&lt;flash&gt;&lt;2d-physics&gt;&lt;actionscript-3&gt;&lt;physics-engine&gt;" />
  <row Id="5327" PostHistoryTypeId="2" PostId="2740" RevisionGUID="f25e2667-bf0c-49d9-8df5-8c50db9032ee" CreationDate="2010-08-14T11:14:39.070" UserId="744" Text="I'd strongly recommend not moving &quot;the camera&quot; at all; consider the player and enemies in the same fixed coordinate space at all times. Enemies and background scrolling should both be matched to an independent timeline. It makes all the math easier." />
  <row Id="5328" PostHistoryTypeId="2" PostId="2741" RevisionGUID="c2933ebb-c51b-4563-ad24-7cea989d5fc8" CreationDate="2010-08-14T12:04:25.580" UserId="1261" Text="In theory, yes, you should be able to develop a 3D application using C# and OpenGL on both Windows and Linux. &#xD;&#xA;&#xD;&#xA;In practice, this is likely to be somewhat painful: you will need to restrict yourself to the subset of functionality that works for both Visual Studio and Mono, and it is likely that you won't be able to use many tools and libraries which have been targeted at only one environment.&#xD;&#xA;&#xD;&#xA;You will need to take a very rigorous approach of converting your project files from one environment to the other, testing early and often so as to catch problems quickly, and rewriting immediately anything that proves not to be portable. This can be very frustrating at times.&#xD;&#xA;&#xD;&#xA;In the end, ask yourself why you would want to target Linux. If learning C# and 3D development is your main goal, maybe you should concentrate on Windows instead of getting lost in the intricate details of different platforms. If your goal is to write a platform independent 3D application, many other interesting languages, such as Java or Python, might be better options in term of portability, and they are close enough to C# that you can leverage most of your experience in that domain.&#xD;&#xA;" />
  <row Id="5329" PostHistoryTypeId="2" PostId="2742" RevisionGUID="c1815759-2d90-4ec6-90bc-4a6de7ac5411" CreationDate="2010-08-14T12:20:09.807" UserId="1463" Text="I saw a review of the GeForce GTX 460 graphics card.  It has 56 texture units.  I'm not that knowledgeable about graphics effects.  But, the ones I know use around 3 or 4 texture units.  In this graphics card case, that would leave a lot of texture units idle.  How are these graphics cards with so many texture units used?" />
  <row Id="5330" PostHistoryTypeId="1" PostId="2742" RevisionGUID="c1815759-2d90-4ec6-90bc-4a6de7ac5411" CreationDate="2010-08-14T12:20:09.807" UserId="1463" Text="How do you make use of all texture units on today's graphics cards?" />
  <row Id="5331" PostHistoryTypeId="3" PostId="2742" RevisionGUID="c1815759-2d90-4ec6-90bc-4a6de7ac5411" CreationDate="2010-08-14T12:20:09.807" UserId="1463" Text="&lt;graphics&gt;&lt;graphics-programming&gt;&lt;hardware&gt;" />
  <row Id="5332" PostHistoryTypeId="2" PostId="2743" RevisionGUID="9fcaa065-f10b-4929-ae8a-82e9c54008d4" CreationDate="2010-08-14T12:42:02.197" UserId="659" Text="GPUs generally process a number of pixels in parallel these days, so I expect that it can make good use of all these units even with simple shaders.&#xD;&#xA;" />
  <row Id="5333" PostHistoryTypeId="2" PostId="2744" RevisionGUID="0da34555-b898-475a-a552-b3dde134468b" CreationDate="2010-08-14T13:07:53.050" UserId="20" Text="There's no such thing as *best* physics engine. It heavily depends on what you need. Take [Box2D][1] as an Example: It is a fully featured 2D Physics Engine, originally developed in C++ and ported to ActionScript. It is great for realistic 2D physics simulation, including gravity, forces, friction, continuous collision detection and much more.&#xD;&#xA;&#xD;&#xA;An Engine like Box2D is going to use quite a lot of your CPU cycles, especially when using it in Flash. It is also not trivial to set up and to create appropriate *collider-bodies* for your Entities.&#xD;&#xA;&#xD;&#xA;If you wanted to create a game like *Breakout*, an Engine like Box2D would be overkill. A game that heavily uses physics for gameplay like [Totem-Destroyer][2], is probably easier to implement when you can make use of a good Physics-Engine though :-)&#xD;&#xA;&#xD;&#xA;There are also other implementations like the one provided with the [Flixel][3] Game-Engine. It isn't a physics-engine per se, but it contains a solid collision-detection algorithm. The engine also updates entity velocity and gravity.&#xD;&#xA;&#xD;&#xA;In most cases, the tools provided by Flixel or similar engines are good enough. Just keep in mind that using a physic engine is going to be CPU intensive and you should choose the implementation that best fits your game.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2dflash.org/&#xD;&#xA;  [2]: http://armorgames.com/play/1871/totem-destroyer&#xD;&#xA;  [3]: http://flixel.org/" />
  <row Id="5334" PostHistoryTypeId="2" PostId="2745" RevisionGUID="6ed1f313-ddf1-4cdb-94e7-240ceb1184a9" CreationDate="2010-08-14T13:08:22.317" UserId="1697" Text="Box2d is used in a lot of games, also outside of the flash world. It was made originally in C and has been ported to a lot of languages, from objective-c to javascript.&#xD;&#xA;&#xD;&#xA;I think it's a testiment to the engine which is very easy to use, has good documentation, loads of examples (although sometimes in different language) and is very fast.&#xD;&#xA;&#xD;&#xA;The only downside is that it is limited to 2d. But this downside is a plus if in fact you are making a 2d game (which most of the time is the case in flash world probably)" />
  <row Id="5335" PostHistoryTypeId="2" PostId="2746" RevisionGUID="2c4d02b3-2f9e-4403-a007-e37d75087dc8" CreationDate="2010-08-14T13:14:47.157" UserId="1697" Text="I have used this tool in the past: http://www.lmnopc.com/bitmapfontbuilder/. It works really nice and has a lot of options" />
  <row Id="5336" PostHistoryTypeId="2" PostId="2747" RevisionGUID="5f493a12-d50e-46e0-bac8-09504fce49b6" CreationDate="2010-08-14T13:25:47.410" UserId="1697" Text="For great inspiration don't forget to checkout the oldskool demo effects. Things like plasma, fire, copperbars, warps, lenses, rotozoomers come to mind.&#xD;&#xA;&#xD;&#xA;Of course it would require some porting on your end, but thats a challenge i guess.&#xD;&#xA;&#xD;&#xA;Here's a nice resource with some effects and the sourcefiles: http://www.oldskool.org/demos/explained/demo_graphics.html" />
  <row Id="5337" PostHistoryTypeId="16" PostId="2747" RevisionGUID="5f493a12-d50e-46e0-bac8-09504fce49b6" CreationDate="2010-08-14T13:25:47.410" UserId="-1" />
  <row Id="5338" PostHistoryTypeId="2" PostId="2748" RevisionGUID="0353f4d8-cc03-41ac-86c5-65a7ff3c7c81" CreationDate="2010-08-14T13:39:32.773" UserId="1550" Text="I'm looking for some sort of list with most common game resolutions.&#xD;&#xA;&#xD;&#xA;Regards!" />
  <row Id="5339" PostHistoryTypeId="1" PostId="2748" RevisionGUID="0353f4d8-cc03-41ac-86c5-65a7ff3c7c81" CreationDate="2010-08-14T13:39:32.773" UserId="1550" Text="List of resolutions" />
  <row Id="5340" PostHistoryTypeId="3" PostId="2748" RevisionGUID="0353f4d8-cc03-41ac-86c5-65a7ff3c7c81" CreationDate="2010-08-14T13:39:32.773" UserId="1550" Text="&lt;resolution&gt;" />
  <row Id="5341" PostHistoryTypeId="2" PostId="2749" RevisionGUID="bd7a9ab1-c0ab-4933-b996-e0c6e2540cc6" CreationDate="2010-08-14T13:45:33.133" UserId="1697" Text="Unless you plan to target one machine with one predefined set of resolutions, i'd recommend making your game so that it works on any resolution.&#xD;&#xA;&#xD;&#xA;If your game has a high range of resolutions it should support (meaning: from very low to very high) in that case it makes sense to leave out things on lower resolution and also to use different graphics sets (e.g. High def textures make no sense on a small handheldscreen).&#xD;&#xA;" />
  <row Id="5342" PostHistoryTypeId="2" PostId="2750" RevisionGUID="1a862932-3ffb-46f0-ad27-470362e16fc8" CreationDate="2010-08-14T13:56:22.017" UserId="18" Text="Take a look at the [Steam Hardware Survey](http://store.steampowered.com/hwsurvey) for a list of the most popular display resolution among Steam users." />
  <row Id="5343" PostHistoryTypeId="5" PostId="2748" RevisionGUID="37bf105d-95bc-404d-9c83-107d3ac6a02c" CreationDate="2010-08-14T14:02:32.860" UserId="1550" Comment="added 23 characters in body" Text="I'm looking for some sort of list with most common game resolutions my game should support.&#xD;&#xA;&#xD;&#xA;Regards!" />
  <row Id="5344" PostHistoryTypeId="2" PostId="2751" RevisionGUID="67548f4e-a7d9-4a70-8fd8-41721547510e" CreationDate="2010-08-14T14:16:28.397" UserId="501" Text="Yes it's doable. If you need to check for compatibility while working with Visual Studio [Mono Tools][1] can be very helpful. But they aren't free.&#xD;&#xA;&#xD;&#xA;Also there is always Java, which is a very similar language to C#, has great OpenGL bindings, and works virtually the same on all platforms.&#xD;&#xA;&#xD;&#xA;  [1]: http://mono-tools.com/" />
  <row Id="5345" PostHistoryTypeId="5" PostId="2750" RevisionGUID="38bcafea-8670-422b-b096-2842c0d17164" CreationDate="2010-08-14T14:18:58.873" UserId="18" Comment="moved comment contents to the post" Text="A good place to start is the [Steam Hardware Survey](http://store.steampowered.com/hwsurvey) which includes a list of the most popular display resolution among Steam users. Wikipedia has a [list of common resolutions](http://en.wikipedia.org/wiki/List_of_common_resolutions) in computer graphics. You can also look at some commercial games and see what resolutions they allow the user to select from.&#xD;&#xA;	&#xD;&#xA;If you're going to support any resolution and just want a list to show to the user, you can query the list of supported resolutions on the player's PC. How you do that depends on the API, for example in SDL you'd use [SDL_ListModes](http://sdl.beuc.net/sdl.wiki/SDL_ListModes)." />
  <row Id="5346" PostHistoryTypeId="2" PostId="2752" RevisionGUID="dce69c0b-6be1-44bc-830f-8b2d581573d7" CreationDate="2010-08-14T14:57:21.153" UserId="18" Text="I'm currently working on my master's thesis about [LOD](http://en.wikipedia.org/wiki/Level_of_detail) and mesh simplification, and I've been reading many academic papers and articles about the subject. However, I can't find enough information about how LOD is being used in modern games. I know many games use some sort of dynamic LOD for terrain, but what about elsewhere? &#xD;&#xA;&#xD;&#xA;[Level of Detail for 3D Graphics](http://lodbook.com/) for example points out that discrete LOD (where artists prepare several models in advance) is widely used because of the performance overhead of continuous LOD. That book was published in 2002 however, and I'm wondering if things are different now. There has been some research in performing dynamic LOD using the geometry shader ([this paper](http://www.cs.princeton.edu/gfx/pubs/DeCoro_2007_RMS/index.php) for example, with its implementation in ShaderX6), would that be used in a modern game? &#xD;&#xA;&#xD;&#xA;To summarize, my question is about the state of LOD in modern video games, what algorithms are used and why? In particular, is view dependent continuous simplification used or does the runtime overhead make using discrete models with proper blending and impostors a more attractive solution? If discrete models are used, is an algorithm used (e.g. [vertex clustering](http://www.gvu.gatech.edu/%7Ejarek/papers/VertexClustering.pdf)) to generate them offline, do artists manually create the models, or perhaps a combination of both methods is used?" />
  <row Id="5347" PostHistoryTypeId="1" PostId="2752" RevisionGUID="dce69c0b-6be1-44bc-830f-8b2d581573d7" CreationDate="2010-08-14T14:57:21.153" UserId="18" Text="LOD in modern games" />
  <row Id="5348" PostHistoryTypeId="3" PostId="2752" RevisionGUID="dce69c0b-6be1-44bc-830f-8b2d581573d7" CreationDate="2010-08-14T14:57:21.153" UserId="18" Text="&lt;models&gt;&lt;level-of-detail&gt;&lt;academic-research&gt;" />
  <row Id="5349" PostHistoryTypeId="2" PostId="2753" RevisionGUID="7ae955e7-66b8-4428-bc0c-78498753f20c" CreationDate="2010-08-14T15:06:01.850" UserId="908" Text="If you plan to work on it for some time you could also try &quot;open development&quot;. Release an alpha version soon, and try to get some people to play the game - for free, at least in the beginning. After some iterations and updates you could go for a subscription service. Or maybe you even find people to work with, that way. If it doesn't pan out, you can still open source the game and make fame instead of money.&#xD;&#xA;&#xD;&#xA;Check out Wolfire's Overgrowth to see an example for open development: http://www.wolfire.com/&#xD;&#xA;&#xD;&#xA;You can follow the same model on iPhone/Android but I'd discourage you from going mobile in the moment. Just like bluescrn says in his post: the market is so saturated that it's close to impossible to make a splash nowadays.&#xD;&#xA;&#xD;&#xA;Why I'm arguing that you should go this way is because I think it is very hard to get your first game right. And even harder when you work alone. You'll need feedback. And the best way to get that is to build a - real or virtual - community." />
  <row Id="5350" PostHistoryTypeId="6" PostId="2752" RevisionGUID="821aa52a-c76c-4c2f-8bda-be7524efbb8c" CreationDate="2010-08-14T15:07:55.497" UserId="18" Comment="edited tags" Text="&lt;rendering&gt;&lt;models&gt;&lt;level-of-detail&gt;&lt;academic-research&gt;" />
  <row Id="5351" PostHistoryTypeId="6" PostId="2752" RevisionGUID="4f63c833-a200-4187-9d03-a3ce9e73484d" CreationDate="2010-08-14T15:10:12.807" UserId="865" Comment="edited tags" Text="&lt;rendering&gt;&lt;graphics-programming&gt;&lt;academic-research&gt;&lt;models&gt;&lt;level-of-detail&gt;" />
  <row Id="5352" PostHistoryTypeId="2" PostId="2754" RevisionGUID="fcfa3bdd-0267-4d40-8341-c0fb4bb7db35" CreationDate="2010-08-14T15:18:08.767" UserId="865" Text="Two people say yes, I'd say no.&lt;br&gt; &#xD;&#xA;You can do it using C# and OpenGL, but not using .NET. .NET is Windows specific.&lt;br&gt;&#xD;&#xA;Go with Mono and the libraries they support and you should be good. .NET framework is never fully ported (it's a hairy subject) but the base libraries are, so a lot of knowledge is applicable, but to be fact specific, no, a project developed with .NET is not guaranteed to compile or run on Linux." />
  <row Id="5353" PostHistoryTypeId="2" PostId="2755" RevisionGUID="6260e8a2-5ea5-4c93-86e4-b9bfbd396460" CreationDate="2010-08-14T16:20:13.727" UserId="962" Text="As others here have said, Box2D is a pretty full featured physics engine, although it does take a lot of work to get it set up properly.&#xD;&#xA;&#xD;&#xA;And as others here have said again Box2D is resource intensive.&#xD;&#xA;&#xD;&#xA;Also I can almost tell immediately if a game uses Box2D, because of the way the physics behaves.&#xD;&#xA;&#xD;&#xA;So my approach is to make my own small physics engine that looks unique when compared to other games, is easier for me to work with, and easier to wrap my head around." />
  <row Id="5354" PostHistoryTypeId="2" PostId="2756" RevisionGUID="f4f2cd0f-7196-47ac-85fd-c3d5922b1c7e" CreationDate="2010-08-14T16:42:42.130" UserId="250" Text="I highly suggest you take a look at [OpenTK][1]. Using it with [MonoDevelop][2] has worked out great for me in the past (Though I never wrote a full on game with it). If you stick the the C# 2.0 standard, you'll have little to no problems.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opentk.com/&#xD;&#xA;[2]: http://monodevelop.com/" />
  <row Id="5355" PostHistoryTypeId="2" PostId="2757" RevisionGUID="3fe727ce-8299-4beb-89da-629ba61b8156" CreationDate="2010-08-14T18:14:36.137" UserId="290" Text="[Qt][1] seems to be another option for a cross platform UI.  &#xD;&#xA;&#xD;&#xA;[MonoXNA][2] looks like a nice project, but it is still in its infancy.  It may be a place for you dig in and get some great low level knowledge as the libraries come together.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://qt.nokia.com/products/&#xD;&#xA;  [2]: http://www.monoxna.org/" />
  <row Id="5356" PostHistoryTypeId="5" PostId="2757" RevisionGUID="7d849e3c-1f68-435a-ba9f-05445d50b876" CreationDate="2010-08-14T18:35:31.680" UserId="290" Comment="Added in SDL." Text="[SDL.NET][1] looks like the best place to start.  From their site &#xD;&#xA;&#xD;&#xA;&gt; SDL.NET is a set of object-oriented&#xD;&#xA;&gt; CLS-compliant .NET bindings for the&#xD;&#xA;&gt; SDL gaming library and provides&#xD;&#xA;&gt; high-level access to audio, keyboard,&#xD;&#xA;&gt; mouse, joystick, TrueType fonts,&#xD;&#xA;&gt; various image formats, sound mixing,&#xD;&#xA;&gt; MPEG-1 movies, 2D video framebuffer&#xD;&#xA;&gt; and 3D hardware via OpenGL.&#xD;&#xA;&#xD;&#xA;and [SDL][2] is&#xD;&#xA;&#xD;&#xA;&gt; Simple DirectMedia Layer is a&#xD;&#xA;&gt; cross-platform multimedia library&#xD;&#xA;&gt; designed to provide low level access&#xD;&#xA;&gt; to audio, keyboard, mouse, joystick,&#xD;&#xA;&gt; 3D hardware via OpenGL, and 2D video&#xD;&#xA;&gt; framebuffer. It is used by MPEG&#xD;&#xA;&gt; playback software, emulators, and many&#xD;&#xA;&gt; popular games, including the award&#xD;&#xA;&gt; winning Linux port of &quot;Civilization:&#xD;&#xA;&gt; Call To Power.&quot;&#xD;&#xA;&#xD;&#xA;[Qt][3] seems to be another option for a cross platform UI.  &#xD;&#xA;&#xD;&#xA;[MonoXNA][4] looks like a nice project, but it is still in its infancy.  It may be a place for you dig in and get some great low level knowledge as the libraries come together.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cs-sdl.sourceforge.net/index.php/Main_Page&#xD;&#xA;  [2]: http://www.libsdl.org/&#xD;&#xA;  [3]: http://qt.nokia.com/products/&#xD;&#xA;  [4]: http://www.monoxna.org/" />
  <row Id="5357" PostHistoryTypeId="2" PostId="2758" RevisionGUID="618189bf-2d8f-4f9a-9714-924b8f495efb" CreationDate="2010-08-14T18:39:28.600" UserId="1206" Text="Unity3D is developed using Mono, so of course you can!&#xD;&#xA;&#xD;&#xA;Just be careful.&#xD;&#xA;&#xD;&#xA;Like the others said: test your code as often as possible on 'the other OS' - and by that I mean daily.&#xD;&#xA;&#xD;&#xA;Unity is available for Windows and the Mac, but since Mac essentially is unix, I guess it's only a matter of time/effort before Unity can target Linux.." />
  <row Id="5358" PostHistoryTypeId="2" PostId="2759" RevisionGUID="5faad17e-7e0c-4e14-93df-45bcf641cabb" CreationDate="2010-08-14T18:54:06.743" UserId="1687" Text="[Interior mapping][1] is a pretty awesome affect. It takes a boring flat quad and makes it look like a building with interiors, all entirely within the pixel shader.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://student-kmt.hku.nl/~joost1/Oogst3D/CODING/InteriorMapping/InteriorMapping.pdf&#xD;&#xA;  [2]: http://i.imgur.com/ToAks.jpg" />
  <row Id="5359" PostHistoryTypeId="16" PostId="2759" RevisionGUID="5faad17e-7e0c-4e14-93df-45bcf641cabb" CreationDate="2010-08-14T18:54:06.743" UserId="-1" />
  <row Id="5360" PostHistoryTypeId="5" PostId="2754" RevisionGUID="5d979603-90a4-47b1-b48d-62ee106ba743" CreationDate="2010-08-14T18:57:10.887" UserId="865" Comment="added 189 characters in body" Text="Two people say yes, I'd say no.&lt;br&gt; &#xD;&#xA;You can do it using C# and OpenGL, but not using .NET. .NET is Windows specific.&lt;br&gt;&#xD;&#xA;Go with Mono and the libraries they support and you should be good. .NET framework is never fully ported (it's a hairy subject) but the base libraries are, so a lot of knowledge is applicable, but to be fact specific, no, a project developed with .NET is not guaranteed to compile or run on Linux.&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Okay, edited to add, yes you can, if you don't use unported features. .NET is not fully crossplatform. I took the porting requirements stricter than what the question asked for." />
  <row Id="5361" PostHistoryTypeId="5" PostId="2759" RevisionGUID="694ae4ec-75f8-4c07-b54f-70be6b72a3df" CreationDate="2010-08-14T19:20:03.960" UserId="1687" Comment="edited body; added 107 characters in body" Text="[Interior mapping][1] is a pretty awesome effect. It takes a boring flat quad and makes it look like a building with interiors, all entirely within the pixel shader. It's semi-procedural in that some of the assets are hand-crafted, but the shader places them procedurally.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://student-kmt.hku.nl/~joost1/Oogst3D/CODING/InteriorMapping/InteriorMapping.pdf&#xD;&#xA;  [2]: http://i.imgur.com/ToAks.jpg" />
  <row Id="5362" PostHistoryTypeId="2" PostId="2760" RevisionGUID="a9af11e9-8b41-4342-ab77-dc1d894bc5e1" CreationDate="2010-08-14T19:36:54.573" UserId="488" Text="I am, very slowly, teaching myself programming (only need to grasp basic game logic) with the free book &quot;[Invent Your Own Computer Games with Python][1]&quot;.&#xD;&#xA;&#xD;&#xA;It's written with the idea that all an aspiring game programmer wants to do is get to the point of writing games, so that is what it lets you do, from the very beginning. In the end you will be making games that are pretty much what you describe here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://inventwithpython.com/" />
  <row Id="5363" PostHistoryTypeId="16" PostId="2760" RevisionGUID="a9af11e9-8b41-4342-ab77-dc1d894bc5e1" CreationDate="2010-08-14T19:36:54.573" UserId="-1" />
  <row Id="5364" PostHistoryTypeId="2" PostId="2761" RevisionGUID="d11f804e-4488-401b-9073-e7b012d86ec7" CreationDate="2010-08-14T20:02:35.510" UserId="290" Text="Here is a pretty interesting article on [The Economics Of Facebook Games][1] that might help with monetizing your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.socialtimes.com/2010/03/the-economics-of-facebook-games/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+socialtimes+%28SocialTimes.com%29" />
  <row Id="5365" PostHistoryTypeId="2" PostId="2762" RevisionGUID="81f10949-9172-449e-8d2e-2f17bcec1ebb" CreationDate="2010-08-14T20:05:16.800" UserId="891" Text="What are the **pros** and **cons** of using Exceptions in C++ in relation to game development. &#xD;&#xA;&#xD;&#xA;Google style guide says that they don't use Exceptions for a variety of reasons.  Are the same reasons pertinent towards game development?&#xD;&#xA;&#xD;&#xA;&gt; We do not use C++ exceptions...  [*- google-styleguide.googlecode.com*][1]&#xD;&#xA;&#xD;&#xA;Some issues to think about.&#xD;&#xA;&#xD;&#xA; - How it pertains to the development of a libraries used through multiple projects.&#xD;&#xA; - How does it affect unit testing, integration testing, etc?&#xD;&#xA; - What does it do to using third party libraries.&#xD;&#xA;&#xD;&#xA;  [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Exceptions#Exceptions" />
  <row Id="5366" PostHistoryTypeId="1" PostId="2762" RevisionGUID="81f10949-9172-449e-8d2e-2f17bcec1ebb" CreationDate="2010-08-14T20:05:16.800" UserId="891" Text="Throwing Exceptions in C++ game DLL's? Pros and Cons" />
  <row Id="5367" PostHistoryTypeId="3" PostId="2762" RevisionGUID="81f10949-9172-449e-8d2e-2f17bcec1ebb" CreationDate="2010-08-14T20:05:16.800" UserId="891" Text="&lt;c++&gt;&lt;programming&gt;&lt;best-practices&gt;" />
  <row Id="5368" PostHistoryTypeId="2" PostId="2763" RevisionGUID="4d866cd0-fd0a-4dd9-a41f-96b3c9cfd0b3" CreationDate="2010-08-14T20:29:11.767" UserId="290" Text="[SDL][1] plus the [.NET Wrapper][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://cs-sdl.sourceforge.net/index.php/Main_Page" />
  <row Id="5369" PostHistoryTypeId="16" PostId="2763" RevisionGUID="4d866cd0-fd0a-4dd9-a41f-96b3c9cfd0b3" CreationDate="2010-08-14T20:29:11.767" UserId="-1" />
  <row Id="5370" PostHistoryTypeId="2" PostId="2764" RevisionGUID="edeb70b9-9b6c-41d0-891b-af5ffbcc059e" CreationDate="2010-08-14T20:56:29.453" UserId="1580" Text="If the class is longer than roughly one page of your editor, refactor it. I don't think the order of methods or members matter much, as long as they're grouped somewhat logical together. " />
  <row Id="5371" PostHistoryTypeId="2" PostId="2765" RevisionGUID="2873841c-1191-4df3-bc91-c2b04236f6c1" CreationDate="2010-08-14T20:57:08.330" UserId="259" Text="As far as I see it there are two main reasons it's not traditionally used in game development:&#xD;&#xA;&#xD;&#xA; - Most game programmers are either graduates, who learned on Java and Haskell, or C programmers, who don't have any experience of exceptions.  Hence they're quite afraid of them and don't know how to use them correctly.&#xD;&#xA; - The stack unwinding when an exception is thrown has performance implications (although this is kind of received wisdom, and some references would be great)." />
  <row Id="5372" PostHistoryTypeId="2" PostId="2766" RevisionGUID="0e5819b2-0f7f-4f61-a182-12033b38a874" CreationDate="2010-08-14T21:25:57.460" UserId="10" Text="I know that having global variables or singleton classes creates cases that can be difficult to test/manage and I have been busted in using those patterns in code but often times you gotta ship.&#xD;&#xA;&#xD;&#xA;So are there cases where global variables or singletons are actually useful in game development?" />
  <row Id="5373" PostHistoryTypeId="1" PostId="2766" RevisionGUID="0e5819b2-0f7f-4f61-a182-12033b38a874" CreationDate="2010-08-14T21:25:57.460" UserId="10" Text="Are there cases where globals/singletons are useful in game development?" />
  <row Id="5374" PostHistoryTypeId="3" PostId="2766" RevisionGUID="0e5819b2-0f7f-4f61-a182-12033b38a874" CreationDate="2010-08-14T21:25:57.460" UserId="10" Text="&lt;programming&gt;&lt;design-patterns&gt;" />
  <row Id="5375" PostHistoryTypeId="2" PostId="2767" RevisionGUID="324276c1-b0af-470a-9f54-16a67bd23f77" CreationDate="2010-08-14T21:42:25.220" UserId="1091" Text="These things can always be *useful*. Whether or not it's the prettiest or safest solution is another matter, but I think game development involves a certain degree of pragmatism.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5376" PostHistoryTypeId="2" PostId="2768" RevisionGUID="e77c4562-4123-4557-92a2-af2db7088ca3" CreationDate="2010-08-14T21:57:38.883" UserId="865" Text="They can be very useful, especially during prototyping or experimental implementation, but in general we prefer passing references around for manager like structures, that way you at least have some control over where they are accessed from. The biggest problem with globals and singletons (in my opinion) is that they are not very multithread friendly, and code that uses them is much harder to port to non shared memory, like SPU's." />
  <row Id="5377" PostHistoryTypeId="2" PostId="2769" RevisionGUID="d4b390c2-a2c5-4462-8a75-396c8d2e6bd3" CreationDate="2010-08-14T22:24:01.310" UserId="65" Text="One modern approach to continuous LOD is hardware tessellation. Hardware tessellation was implemented in DirectX 11 and essentially provides programmable subdivision of surfaces. Because this is implemented on the GPU, it allows for much higher detail than provided by CPU-generated tessellation. By subdividing surfaces based on the view distance, for example, you can provide a form of continuous LOD.&#xD;&#xA;&#xD;&#xA;Hardware tessellation is a very new feature of GPUs and there are not a lot of games that utilize it. I suspect that the games that do use it mostly as a drop-in for bump mapping - rather than bump map in the pixel shader, you can modify the actual geometry. There is probably a lot of room for further research into mesh simplification and improvement using hardware tessellation.&#xD;&#xA;&#xD;&#xA;Some more resources:&#xD;&#xA;&#xD;&#xA; - [MSDN Tessellation Overview][1]&#xD;&#xA; - [DirectX 11 Tessellation by nvidia.com][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476340(VS.85).aspx&#xD;&#xA;  [2]: http://www.nvidia.com/object/tessellation.html" />
  <row Id="5378" PostHistoryTypeId="5" PostId="1436" RevisionGUID="604b93bc-5cd8-4ec0-b57a-513a76aa17f1" CreationDate="2010-08-14T23:13:45.037" UserId="974" Comment="Added JavaScript sample code to demonstrate how the system would work." Text="The way I've done it in the past is by separating the **animation data** from **animation playback**. An `Animation` can then become basically an array of `Frames` and a few properties that describe how the animation should behave (if it loops, etc).&#xD;&#xA;&#xD;&#xA;I typically load one image and draw pieces of it.&#xD;&#xA;&#xD;&#xA;Each `Frame` of the animation is essentially a rectangle and a length of time. This allows for some frames to display longer than others, which may or may not be something you want. If you want all of the frames in your animation to display for the same length of time, store that in your `Animation` object.&#xD;&#xA;&#xD;&#xA;Anything that needs to play an animation has its own `AnimationPlayer` which can be pointed to an `Animation`. The player object takes care of playing the animation and makes the &quot;current frame&quot; available.&#xD;&#xA;&#xD;&#xA;The advantage to this for me was that I could have a single instance of an `Animation` that many objects could point to and be playing different parts at the same time. It was also easy to change animations by simply pointing the `AnimationPlayer` to a different `Animation` object and resetting the playback.&#xD;&#xA;&#xD;&#xA;**Edit**: [Here's a fairly basic JavaScript implementation of the system described above][1]. I threw it together in a few minutes as a [demonstration][2]. &quot;Real&quot; code would have more features. You'll need a modern browser that supports both Canvas and Data URI for it to work, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jsbin.com/iyade4/2/edit&#xD;&#xA;  [2]: http://jsbin.com/iyade4/2/" />
  <row Id="5379" PostHistoryTypeId="2" PostId="2770" RevisionGUID="43b0eef3-7576-4172-8517-b137b64655db" CreationDate="2010-08-15T00:04:43.573" UserId="1708" Text="Are there any shoot-em-ups in which the enemies actually evolve as a response to their relative success against the player?&#xD;&#xA;&#xD;&#xA;By evolve, I mean that each enemy has some genetic information encoding their behaviour. Enemies which last longer or do more damage are allowed to mix their genes to create new enemies. This way the enemies would become better adapted to the particular player." />
  <row Id="5380" PostHistoryTypeId="1" PostId="2770" RevisionGUID="43b0eef3-7576-4172-8517-b137b64655db" CreationDate="2010-08-15T00:04:43.573" UserId="1708" Text="Enemy evolution in shoot-em-ups" />
  <row Id="5381" PostHistoryTypeId="3" PostId="2770" RevisionGUID="43b0eef3-7576-4172-8517-b137b64655db" CreationDate="2010-08-15T00:04:43.573" UserId="1708" Text="&lt;first-person-shooter&gt;" />
  <row Id="5382" PostHistoryTypeId="2" PostId="2771" RevisionGUID="18cd4960-bd60-4f6c-abe2-105d08047912" CreationDate="2010-08-15T00:39:17.343" UserId="395" Text="Rez changes the difficulty of the level boss based on how well you did in that level." />
  <row Id="5383" PostHistoryTypeId="2" PostId="2772" RevisionGUID="b0f388d7-cf96-4ea8-a7ce-9f322178cd95" CreationDate="2010-08-15T01:14:51.530" UserId="263" Text="There are also some nasty consequences for using exceptions in C++ if you don't know all the details of how they work. Since many games are written in C++ this may be a reason.&#xD;&#xA;&#xD;&#xA;For example, in C++ throwing an exception in a destructor can have serious consequences. It can cause all kinds of undefined behavior and crashes, because you can get trapped in a situation where you have more than one active exception in flight. (See Item #8 of [Effective C++][1] for more info on this.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/0321334876/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=0201924889&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=1FH2KCTY42W3MSPWF7VG" />
  <row Id="5384" PostHistoryTypeId="2" PostId="2773" RevisionGUID="6ea4ee5e-680a-4b1e-8961-21534877e36d" CreationDate="2010-08-15T01:41:10.797" UserId="1443" Text="For now it seems that discrete LOD is still preferred, but it remains to be seen if this will change with the next generation of console hardware.&#xD;&#xA;&#xD;&#xA;For what it's worth Tom Forsyth has written a lot about continuous LOD, which he calls &quot;progressive meshing&quot;.  Game Programming Gems 2 purports to have one of these articles, but it appears to be mirrored [here][1].&#xD;&#xA;&#xD;&#xA;I believe one of Tom's games shipped using progressive meshing on last-gen console hardware.  I don't think it's the computation overhead people are worried about with continuous LOD.  I think it's more that discrete LOD is easier.  Continuous LOD does heavier lifting in the tools pipeline and does not have enough clear advantages.&#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/papers/papers.html" />
  <row Id="5385" PostHistoryTypeId="5" PostId="2773" RevisionGUID="3bb57f8a-ccb3-49da-9dd2-3376e76870c6" CreationDate="2010-08-15T02:03:42.347" UserId="1443" Comment="added 323 characters in body" Text="For now it seems that discrete LOD is still preferred, but it remains to be seen if this will change with the next generation of console hardware.&#xD;&#xA;&#xD;&#xA;For what it's worth Tom Forsyth has written a lot about continuous LOD, which he calls &quot;progressive meshing&quot;.  Game Programming Gems 2 purports to have one of these articles, but it appears to be mirrored [here][1].&#xD;&#xA;&#xD;&#xA;I believe one of Tom's games shipped using progressive meshing on last-gen console hardware.  I don't think it's the computation overhead people are worried about with continuous LOD.  I think it's more that discrete LOD is easier.  Continuous LOD does heavier lifting in the tools pipeline and does not have enough clear advantages.&#xD;&#xA;&#xD;&#xA;As for generation of discrete LODs, we use a combination of automatic tools and artist creation.  The DirectX SDK comes with some stuff to auto-reduce geometry and I believe we use that as a first pass, if the quality is not good enough then artists generate the discrete LODs by hand or using additional tools in Maya.&#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/papers/papers.html" />
  <row Id="5386" PostHistoryTypeId="2" PostId="2774" RevisionGUID="deb662a0-ecd0-4d26-85d2-648af47d3e72" CreationDate="2010-08-15T02:30:06.730" UserId="1443" Text="Exceptions are not supported and therefore highly discouraged in at least one modern console development environment.&#xD;&#xA;&#xD;&#xA;Most console developers I know prefer not to use them anyway due to added overhead in the executable and the philosophy that they're just plain not needed.  RTTI is viewed the same way." />
  <row Id="5387" PostHistoryTypeId="2" PostId="2775" RevisionGUID="30fdf1dc-abc2-4312-9025-a7e63928e206" CreationDate="2010-08-15T02:46:39.110" UserId="162" Text="There is a japanase freeware PC shoot-em-up called &quot;[Warning Forever][1]&quot; that evolves the bosses based on how you approach them, in a way that is more than just switching between presets. It's also pretty fun for being free.&#xD;&#xA;&#xD;&#xA;Another game I found is &quot;[Evolution Shooter][2]&quot; by Petri Purho, which uses an evolutionary algorithm to combine entire shooter game definitions, as opposed to individual enemies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www18.big.or.jp/~hikoza/Prod/index_e.html&#xD;&#xA;  [2]: http://www.kloonigames.com/blog/games/evolution-shmup" />
  <row Id="5388" PostHistoryTypeId="2" PostId="2776" RevisionGUID="b143f9e3-aa09-4dfe-bf84-ee1071cd48db" CreationDate="2010-08-15T03:16:22.287" UserId="891" Text="There is an RTS that is based around this concept.  But instead of enemies that evolve, the player trains units which are able to breed, adapt, and evolve.&#xD;&#xA;&#xD;&#xA;**NERO**&#xD;&#xA;&#xD;&#xA;The technology behind this is a mix between Neural Networks and Genetic Algorithms, called NeuroEvolution.&#xD;&#xA;&#xD;&#xA;&gt; Neuro-Evolving Robotic Operatives, or NERO for short, is a unique computer game that lets you play with adapting intelligent agents hands-on. Evolve your own robot army by tuning their artificial brains for challenging tasks, then pit them against your friends' teams in online competitions!&#xD;&#xA;&#xD;&#xA;[http://nerogame.org/][1]&#xD;&#xA;&#xD;&#xA;**Galatic Arms Race**&#xD;&#xA;&#xD;&#xA;There is another game that used a similar technology but instead evolved custom weapons based the effectiveness and overall gameplay of the user.&#xD;&#xA;&#xD;&#xA;&gt; A key objective of this game is to explore the potential for automated content generation technology to intelligently create content for games. In GAR, all player weapons are generated by the cgNEAT algorithm based on weapon usage statistics. However, cgNEAT does not simply respawn weapons that people like. Rather, it creates new weapons that elaborate on the ones that have been popular in the past.&#xD;&#xA;&#xD;&#xA;[http://gar.eecs.ucf.edu/][2]&#xD;&#xA;&#xD;&#xA;**Note:**&#xD;&#xA;&#xD;&#xA;Both of these games were developed as academic pursuits. &#xD;&#xA;&#xD;&#xA;  [1]: http://nerogame.org/&#xD;&#xA;  [2]: http://gar.eecs.ucf.edu/" />
  <row Id="5389" PostHistoryTypeId="5" PostId="2700" RevisionGUID="1bae5206-a365-468a-8f6c-d49d5435c1f2" CreationDate="2010-08-15T03:49:17.107" UserId="469" Comment="added 158 characters in body" Text="Basically, how I profile a game that have multithreading and script interpreter? (Lua in my case)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have no idea of where to look for that.&#xD;&#xA;&#xD;&#xA;Also it would be nice to be able to profile code that resemble somehow the release code, my &quot;debug&quot; binary is about 12 times bigger...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: My game was made with C++, compiled with GCC, runs on Windows and GNU/Linux for now, compiled natively (ie: MingW on Windows, regular GCC on GNU)." />
  <row Id="5390" PostHistoryTypeId="5" PostId="2772" RevisionGUID="cbb9eb03-12ad-4393-960b-796dfdbb23b2" CreationDate="2010-08-15T04:38:12.330" UserId="263" Comment="edited body" Text="There are also some nasty consequences for using exceptions in C++ if you don't know all the details of how they work. Since many games are written in C++ this may be a factor.&#xD;&#xA;&#xD;&#xA;For example, in C++ throwing an exception in a destructor can have serious consequences. It can cause all kinds of undefined behavior and crashes, because you can get trapped in a situation where you have more than one active exception in flight. (See Item #8 of [Effective C++][1] for more info on this.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/0321334876/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=0201924889&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=1FH2KCTY42W3MSPWF7VG" />
  <row Id="5391" PostHistoryTypeId="2" PostId="2777" RevisionGUID="60f276a9-cd70-4db4-be93-c48a2cdcc8f5" CreationDate="2010-08-15T04:56:37.457" UserId="865" Text="Of all the projects I worked on in games, none of them used exceptions. Function call overhead is the major reason. As mentioned before, like RTTI, it's, in most studios, not a subject of discussion. Not because most coders come from a Java/academics background, because frankly, most don't.&lt;br&gt;&#xD;&#xA;It doesn't affect unit testing really as you just assert on conditions. For libraries, you're better off without exceptions as you'll force it upon everyone that uses it.&lt;br&gt;&#xD;&#xA;While it makes some situations slightly harder to handle, it also (imo) forces you to have a more controlled setup, as exceptions can lead to abuse. Error tolerance is nice, but not if it leads to sloppy coding.&lt;br&gt;&#xD;&#xA;Mind you, this comes from someone who never used exception handling (well okay, once or twice in tools - it didn't do it for me, I guess it's what you grow up with)." />
  <row Id="5392" PostHistoryTypeId="2" PostId="2778" RevisionGUID="95066cff-89af-49ab-8162-1e78ace1557d" CreationDate="2010-08-15T08:08:26.533" UserId="1580" Text="I would say that the singleton design itself isn't useful at all. Global variables can definetly be useful but I'd rather see them hidden behind a well-written interface so that you aren't aware of their existence. With singletons you are definetly aware of their existence.&#xD;&#xA;&#xD;&#xA;I often use global variables for things that need access all through out an engine. My performance tool is one good example which I use all over the engine to call. The calls are simple; ProbeRegister(), ProbeHit() and ProbeScoped(). Their real access is a little bit more tricky and uses global variables for some of their things. " />
  <row Id="5393" PostHistoryTypeId="2" PostId="2779" RevisionGUID="f9870528-245c-4a57-92a6-6407477c54f1" CreationDate="2010-08-15T10:22:57.910" UserId="465" Text="I've got a fixed solution space defined by a minimum and maximum float which has no divisible slice.&#xD;&#xA;&#xD;&#xA;You then have 0..N [Gaussian distribution][1] probability sets which I need to combine.&#xD;&#xA;&#xD;&#xA;In the end I neeed&#xD;&#xA;&#xD;&#xA;1. Method to define probability set with a numeric range (not sliceable) and 0..N Gaussian functions&#xD;&#xA;2. A function which can generate a random number in the range as defined by the calculated probabilities.&#xD;&#xA;&#xD;&#xA;Also I know it is possible that some combinations will generate a zero solution space.&#xD;&#xA;&#xD;&#xA;Now I'm thinking the way to do it is take the normalised probability density functions and multiply them to get a new space then normalising the result. I just can't seem to break it down into algorithmic form.&#xD;&#xA;&#xD;&#xA;Any ideas?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Normal_distribution" />
  <row Id="5394" PostHistoryTypeId="1" PostId="2779" RevisionGUID="f9870528-245c-4a57-92a6-6407477c54f1" CreationDate="2010-08-15T10:22:57.910" UserId="465" Text="Combine n Gaussian Probability Sets in a limited float range" />
  <row Id="5395" PostHistoryTypeId="3" PostId="2779" RevisionGUID="f9870528-245c-4a57-92a6-6407477c54f1" CreationDate="2010-08-15T10:22:57.910" UserId="465" Text="&lt;math&gt;&lt;random&gt;" />
  <row Id="5396" PostHistoryTypeId="2" PostId="2780" RevisionGUID="a7757f63-475c-4b13-8a85-bed8c7158c62" CreationDate="2010-08-15T10:37:56.477" UserId="465" Text="There is a great set of [shader examples here][1] &#xD;&#xA;&#xD;&#xA;Some great stuff you can build on and draw inspiration from.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://digierr.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&amp;_c=BlogPart&amp;partqs=cat%3dXNA%2520Shader%2520Tutorial" />
  <row Id="5397" PostHistoryTypeId="16" PostId="2780" RevisionGUID="a7757f63-475c-4b13-8a85-bed8c7158c62" CreationDate="2010-08-15T10:37:56.477" UserId="-1" />
  <row Id="5398" PostHistoryTypeId="2" PostId="2781" RevisionGUID="9b515ad3-1ade-47f2-a658-bfe6d6965c68" CreationDate="2010-08-15T10:43:13.627" UserId="465" Text="The main problem with globals, and poorly implemented singletons is obscure construction &amp; deconstruction bugs.&#xD;&#xA;&#xD;&#xA;So if you work with primitives which don't have these issues or are very aware of the issue with a pointer. Then they can be used safely.&#xD;&#xA;&#xD;&#xA;Globals have their place, same as gotos and should not be dismissed out of hand but instead used with care.&#xD;&#xA;&#xD;&#xA;There is a good explanation of it in the [Google C++ Style Guide][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Static_and_Global_Variables#Static_and_Global_Variables" />
  <row Id="5399" PostHistoryTypeId="2" PostId="2782" RevisionGUID="39623248-8642-4eac-968a-fc1b46182c20" CreationDate="2010-08-15T10:54:56.237" UserId="1628" Text="I'm getting some artifacts when I try to use a colour attachment on an FBO. I'm saving my first pass as a texture, then passing it as an input to an anti-aliasing shader. The result is, as below, some weird noise and an enforced black background. The AA is applied fine.&#xD;&#xA;&#xD;&#xA;![Issue][1]&#xD;&#xA;&#xD;&#xA;    GL.BindFramebuffer(FramebufferTarget.FramebufferExt, _hndFBO);&#xD;&#xA;    GL.BindTexture(TextureTarget.Texture2D, 0);&#xD;&#xA;    GL.DrawBuffer((DrawBufferMode) FramebufferAttachment.ColorAttachment0Ext);&#xD;&#xA;    GL.PushAttrib(AttribMask.ViewportBit);&#xD;&#xA;    GL.Viewport(0, 0, _intWidth, _intHeight);&#xD;&#xA;    //Do rendering here&#xD;&#xA;    GL.PopAttrib();&#xD;&#xA;    GL.BindFramebuffer(FramebufferTarget.FramebufferExt, 0);&#xD;&#xA;    GL.DrawBuffer(DrawBufferMode.Back);&#xD;&#xA;&#xD;&#xA;Any ideas? Need more code?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.imgur.com/AtBn7.png" />
  <row Id="5400" PostHistoryTypeId="1" PostId="2782" RevisionGUID="39623248-8642-4eac-968a-fc1b46182c20" CreationDate="2010-08-15T10:54:56.237" UserId="1628" Text="OpenGL FBO Rendering" />
  <row Id="5401" PostHistoryTypeId="3" PostId="2782" RevisionGUID="39623248-8642-4eac-968a-fc1b46182c20" CreationDate="2010-08-15T10:54:56.237" UserId="1628" Text="&lt;opengl&gt;" />
  <row Id="5402" PostHistoryTypeId="2" PostId="2783" RevisionGUID="68f3cc21-b588-4acd-a0a2-4e619578b738" CreationDate="2010-08-15T11:17:40.357" UserId="211" Text="Something I've often wondered about is the &quot;bind pose&quot;. The bind pose for human skeletons is one where their legs are straight, and their arms are perpendicular to their body:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://www.okino.com/conv/skinning3.gif&quot; width=&quot;200&quot; /&gt;&#xD;&#xA;&#xD;&#xA;My question is: why? Is such a pose easier for the animators to work with, or the programmers, or both? As far as I understand the math, the bind pose doesn't make a difference to the outcome." />
  <row Id="5403" PostHistoryTypeId="1" PostId="2783" RevisionGUID="68f3cc21-b588-4acd-a0a2-4e619578b738" CreationDate="2010-08-15T11:17:40.357" UserId="211" Text="Why is the &quot;bind pose&quot; one with outstretched arms?" />
  <row Id="5404" PostHistoryTypeId="3" PostId="2783" RevisionGUID="68f3cc21-b588-4acd-a0a2-4e619578b738" CreationDate="2010-08-15T11:17:40.357" UserId="211" Text="&lt;animation&gt;&lt;rigging&gt;" />
  <row Id="5405" PostHistoryTypeId="2" PostId="2784" RevisionGUID="ea0b8c9d-7717-438b-a110-a3ad628fb11a" CreationDate="2010-08-15T11:18:03.727" UserId="678" Text="Are you clearing the back buffer before you render to it each frame?&#xD;&#xA;&#xD;&#xA;I'm assuming magenta is &quot;transparent&quot; in the first picture. If so, the parts of the back-buffer where there is no terrain are not affected. Residual data could very well account for what you are seeing." />
  <row Id="5406" PostHistoryTypeId="5" PostId="309" RevisionGUID="ba6b391b-9b83-4484-bacc-1f7388ad9296" CreationDate="2010-08-15T11:19:33.317" UserId="122" Comment="typo" Text="**Graphics Gale**&#xD;&#xA;&#xD;&#xA;[http://www.humanbalance.net/gale/us/][1]&#xD;&#xA;&#xD;&#xA;2D Pixel art&#xD;&#xA;&#xD;&#xA;Windows&#xD;&#xA;&#xD;&#xA;Free version and Paid version (don't need any of the paid features to makes complete sprites)&#xD;&#xA;&#xD;&#xA;2D pixel art tool, great for creating animated sprites.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.humanbalance.net/gale/us/" />
  <row Id="5407" PostHistoryTypeId="2" PostId="2785" RevisionGUID="983a92a1-4c5f-40d9-ab05-c7cee7dfe031" CreationDate="2010-08-15T11:24:39.517" UserId="891" Text="Joel on Software's views of Exceptions.  &#xD;&#xA;&#xD;&#xA;Interesting view not currently in any of the answers, &#xD;&#xA;&#xD;&#xA;&gt; The reasoning is that I consider exceptions to be no better than &quot;goto's&quot;, considered harmful since the 1960s, in that they create an abrupt jump from one point of code to another. In fact they are significantly worse than goto's:&#xD;&#xA;&#xD;&#xA;&gt; 2. **They are invisible in the source code.** Looking at a block of code, including functions which may or may not throw exceptions, there is no way to see which exceptions might be thrown and from where. This means that even careful code inspection doesn't reveal potential bugs.&#xD;&#xA;&#xD;&#xA;&gt; 3. **They create too many possible exit points for a function.** To write correct code, you really have to think about every possible code path through your function. Every time you call a function that can raise an exception and don't catch it on the spot, you create opportunities for surprise bugs caused by functions that terminated abruptly, leaving data in an inconsistent state, or other code paths that you didn't think about.&#xD;&#xA;&#xD;&#xA;[http://www.joelonsoftware.com/items/2003/10/13.html][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.joelonsoftware.com/items/2003/10/13.html" />
  <row Id="5408" PostHistoryTypeId="2" PostId="2786" RevisionGUID="e16a86fb-fc24-4c87-ba3d-81507b361178" CreationDate="2010-08-15T11:41:28.293" UserId="1091" Text="It's easier to model because there's separation between the limbs and body, and the bits that need to stretch when animated are already stretched - so they get modelled and weighted correctly.&#xD;&#xA;&#xD;&#xA;Same reason you'd model a hand as open and fingers spread, rather than modelling it as a fist.&#xD;&#xA;&#xD;&#xA;Oh, and as far as programmers are concerned, we don't care. It'll still look like something from &quot;The Thing&quot; when we get the skinning code wrong at the first attempt.&#xD;&#xA;" />
  <row Id="5409" PostHistoryTypeId="2" PostId="2787" RevisionGUID="22a749c2-2549-40db-92e3-be269645819c" CreationDate="2010-08-15T12:09:18.943" UserId="1716" Text="My view is that things are changing often. People get better, and people fall behind. The best place to look for reference are the people who are kicking ass at whatever you are interested in. Lately, the traditional static TPose has been less favoured due to IK/FK and other animation problems when rigging in such a rigid position. &#xD;&#xA;&#xD;&#xA;Here is a great reference : &#xD;&#xA;http://www.zbrushcentral.com/showthread.php?page=1&amp;pp=15&amp;t=79141&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Notice their TPose character shots are all &quot;loose&quot; and far less static. The elbows are bent slightly inward toward the body and it allows a lot more natural flow on the modelling of clothes, and skinning becomes a lot easier for an artist. The legs are a little bent as well, and the shoulders are not high up there they are more natural for when the animation comes in. It allows a much better topology flow to be created without losing the simplicity of rigging in such a pose.&#xD;&#xA;&#xD;&#xA;And to answer the question directly : Its for animation and rigging purposes. It's a horrible workflow trying to rig bones in the spine if the character is sitting down. Or even in the knees, if bent. When painting weights for things like materials and cloths you will find this sort of pose to enable a much quicker workflow.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.imgur.com/dRjh1.jpg" />
  <row Id="5410" PostHistoryTypeId="2" PostId="2788" RevisionGUID="30d9518a-f23c-4bac-8770-48f063ac36c6" CreationDate="2010-08-15T12:12:54.300" UserId="1716" Text="Also have a look at software like Mental Mill. It allows node based shader programming with math operations. Add a bunch of random waves and images and see what comes out the other end. Can often find out far more from the process than images i find (&quot;hey this looks like lightning swarms&quot;)." />
  <row Id="5411" PostHistoryTypeId="16" PostId="2788" RevisionGUID="30d9518a-f23c-4bac-8770-48f063ac36c6" CreationDate="2010-08-15T12:12:54.300" UserId="-1" />
  <row Id="5412" PostHistoryTypeId="2" PostId="2789" RevisionGUID="3f9ab08a-858f-4d9b-9932-cb9908661ad5" CreationDate="2010-08-15T12:21:12.033" UserId="1716" Text="Here is an alternative suggestion, just to keep it interesting. Convex decomposition can create approximate geometries quite quickly, and is usually for collision meshes. These meshes work well as LOD and it is plausible as a real time decimation for speeding up a pipeline.&#xD;&#xA;&#xD;&#xA;http://codesuppository.blogspot.com/2009/11/convex-decomposition-library-now.html" />
  <row Id="5413" PostHistoryTypeId="2" PostId="2790" RevisionGUID="79313b26-c789-4d02-94d7-4b052ea0cba9" CreationDate="2010-08-15T12:33:05.907" UserId="1716" Text="Aas stated it can handle 56 textures in parallel. That means 56 different textured cubes takes the same amount as of time to process as 1 cube, on a single texture unit card." />
  <row Id="5414" PostHistoryTypeId="2" PostId="2791" RevisionGUID="8ccfe790-913f-4b93-8d86-1407cdb3f28b" CreationDate="2010-08-15T13:34:23.700" UserId="1716" Text="As a semi FAQ question attempt : &#xD;&#xA;&#xD;&#xA;Where can you find people to work with you on a project? Particularly programmers. One thing that is obvious is that all programmers have a project (or twenty), and the chances of a programmer just hanging around looking for something to do is a lot less likely than if it were an artist needed on the team.&#xD;&#xA;&#xD;&#xA;So, where do you post? Where do you search and follow people around until it looks like they are a viable team member? Is it really difficult to assemble a team that are not close friends or chat buddies? Are there sites with this sort of posting?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5415" PostHistoryTypeId="1" PostId="2791" RevisionGUID="8ccfe790-913f-4b93-8d86-1407cdb3f28b" CreationDate="2010-08-15T13:34:23.700" UserId="1716" Text="Finding other programmers to help on a project" />
  <row Id="5416" PostHistoryTypeId="3" PostId="2791" RevisionGUID="8ccfe790-913f-4b93-8d86-1407cdb3f28b" CreationDate="2010-08-15T13:34:23.700" UserId="1716" Text="&lt;programming&gt;&lt;project-management&gt;" />
  <row Id="5417" PostHistoryTypeId="2" PostId="2792" RevisionGUID="cbe6f9b1-27f9-4f88-9f09-ecadbd102b97" CreationDate="2010-08-15T15:20:11.163" UserId="189" Text=" - [Supreme Commander][1] (1&amp;2) - this [RTS][2] prides itself in the fact that you can smoothly zoom out all the way to see a map of the battlefield, and then zoom all the way in on an area and manage it. It uses LOD very well as you zoom in and out to keep from overloading the graphics card, and at a certain zoom out level the meshes are replaced by 2D images of what type of unit they are, so that the map of the battlefield can clearly show where things are (since obviously a really low-detail 3D mesh at 20,000 ft would be indistinguishable). You can see the 2D replacement effect pretty clearly in the first few seconds of [this video][3].&#xD;&#xA; - [RollerCoaster Tycoon 3][4] - Similar to Supreme Commander, this game allows you to zoom in and out at will, viewing your entire theme park or managing a single coaster. It does not use 2D image replacement but due to LOD everything remains smooth; not only do the big meshes reduce in quality, but small details like the people walking around disappear when you zoom out far enough.&#xD;&#xA; - [Legend of Zelda: Wind Waker][5] - As you're sailing the open sea you can look around and see the closest islands to you; they are only silhouettes of the islands, however, and the actual 3D models don't load until you approach an island. Other features of the island load as well, such as enemies and typhoons in the nearby waters; unfortunately the player can see them &quot;pop&quot; into existence as he gets close, but overall it's a good technique that prevents from overloading the Nintendo GameCube hardware while giving the player a pretty accurate feeling of sailing the seas and being able to distinguish landmark islands in the distance.&#xD;&#xA; - [Elder Scrolls IV: Oblivion][6] - I haven't played this game in a long time but I know it does use either silhouetting or really low-detail models for distant landmark structures, such as the tall tower of one of the cities, and distant mountains.&#xD;&#xA;&#xD;&#xA;**LOD is not only used for terrain, but also for silhouettes of distant structures and for eagle's eye views of strategy/simulation games.** I don't know the details of the algorithms, and I guess that's the main part of your question, but I wanted to give you some examples of the state of LOD in modern video games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Supreme_Commander_(video_game)&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/RTS_(gaming)&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=T4ZJzOEOLnE&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Rollercoaster_tycoon_3&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/The_Legend_of_Zelda:_The_Wind_Waker&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/The_Elder_Scrolls_IV:_Oblivion" />
  <row Id="5418" PostHistoryTypeId="2" PostId="2793" RevisionGUID="f30981db-7511-43b3-adfc-25cace2a1475" CreationDate="2010-08-15T15:38:24.963" UserId="189" Text="From what I've seen, the internet is not a very good place to find programmers, especially if you're looking for them to work for nothing. But it sounds like you perhaps just need a programming task to be done (like making a specific game based on your art), rather than needing to actually form a group. You might try the following:&#xD;&#xA;&#xD;&#xA;If you have a single specific task that needs to be done, you can post it on [vWorker][1] (previously Rent-A-Coder) and programmers (or programming groups) will bid on your project; accept the most viable-looking bidder, they do the work, and then you pay them once you receive the work. It's well-made to keep both sides fair; for example, your money goes into escrow, so that any foul play on your part and the programmer still gets paid; but any foul play on the programmer's part and the money comes back to you. Communications should be done through the website so that everything is documented, and their moderators are pretty quick at resolving issues, should you need them.&#xD;&#xA;&#xD;&#xA;There are many &quot;outsource&quot; workers and groups who will do your task for very cheap and quickly, but watch out for bad quality code. Also make sure to have crystal-clear requirements, and document everything through the website. Anything said on there is like a contract, and if you put complete requirements up there, the coder will be required to complete them before they get paid. Conversely, the programmers NEED a clear specification of what needs to be done in order to accurately bid and estimate their time, and poor requirements are often the source of buyers taking advantage of coders, making them work extra before they get paid just because there was a misunderstanding.&#xD;&#xA;&#xD;&#xA;I've had both good and bad experiences as a coder on the site, but it seems to me that buyers are treated very well; they are certainly in the position of power. Again, if you have a very clear idea of what needs to be done and you post all of your requirements upfront, you won't have any problems; coders will complete your task as you ask for it, or they don't get paid and you just try again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vworker.com/" />
  <row Id="5419" PostHistoryTypeId="5" PostId="2791" RevisionGUID="f016d94d-19d6-426f-8a23-c74f40eb0968" CreationDate="2010-08-15T16:08:47.760" UserId="1716" Comment="added 369 characters in body" Text="As a semi FAQ question attempt : &#xD;&#xA;&#xD;&#xA;Where can you find people to work with you on a project? Particularly programmers. One thing that is obvious is that all programmers have a project (or twenty), and the chances of a programmer just hanging around looking for something to do is a lot less likely than if it were an artist needed on the team.&#xD;&#xA;&#xD;&#xA;So, where do you post? Where do you search and follow people around until it looks like they are a viable team member? Is it really difficult to assemble a team that are not close friends or chat buddies? Are there sites with this sort of posting?&#xD;&#xA;&#xD;&#xA;To clarify : I am referring to a team.&#xD;&#xA;&#xD;&#xA;Example 1 : I am making gameEngineOfAwesomeness. I need help.&#xD;&#xA;Example 2 : I am 70% complete on this game, and i need help.&#xD;&#xA;Example 3 : I have an open source project idea, with a prototype. I need help.&#xD;&#xA;&#xD;&#xA;It doesn't necessarily mean open source, just programmers who can work with me on something (and where to find them :)) " />
  <row Id="5420" PostHistoryTypeId="5" PostId="2703" RevisionGUID="b47cffcd-20db-47e2-963f-032e1da3eada" CreationDate="2010-08-15T16:23:27.933" UserId="1134" Comment="specific suggestions based on edited question" Text="Until we have a few more specifics on your platform/OS/compiler, it's going to be hard to answer, but in the mean time, look at [this answer][1] to &quot;[In general how often and when should I optimize my code?][2]&quot; for some generic suggestions.&#xD;&#xA;&#xD;&#xA;Most of these suggestions will work equally well in optimized (release) or non-optimized (debug) builds.&#xD;&#xA;&#xD;&#xA;(I'll return and update this answer with more specific tools and ideas if you update the question with more details.)&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Edit: okay, more specific suggestions.&#xD;&#xA;&#xD;&#xA;Take a two-pronged approach.  One, do exactly what Simon is suggesting -- build a lightweight &quot;stopwatch&quot; timer into your code.  It doesn't have to be pretty to start with -- as my link above suggests, you can always &quot;drill down&quot; from coarse info to finer-grained info.&#xD;&#xA;&#xD;&#xA;Second, take advantage of the free (gratis) tools.  Even if you don't get exactly the info you want, scope out a sampling profiler such as [AMD CodeAnalyst][3].  This shouldn't have problems with threads, and should be capable of giving you a &quot;code was often in this place&quot; readouts, or even full stack traces.  While it may be a little harder to reason about the masses of data you'll get here, chances are you'll see something, and it has the advantage of being non-intrusive.  If you have an AMD processor CodeAnalyst will even do the performance counter stuff for you, giving you access to e.g. cache miss and branch prediction info.&#xD;&#xA;&#xD;&#xA;It might be fun to take [valgrind][4]'s cachegrind, callgrind, or massif across the project.  This is definitely going to slow things down but you may learn a lot.  The valgrind memcheck module is worth knowing about too.&#xD;&#xA;&#xD;&#xA;You may also want to investigate the GCC's intrusive [gprof][5].  Sampling profilers are generally observed to be a better idea (they don't alter what they're looking at quite as much), but you may also learn something from gprof's complete instrumentation that you couldn't see using sampling.&#xD;&#xA;&#xD;&#xA;None of this gives you great visibility into the lua parts.  You'll get stack samples or call info from within lua, and you might be able to infer what it's doing with per-line or per-instruction samples.  But it may not be easily decomposable into &quot;which scripts took the most time&quot; or &quot;which line of this script is giving us the most trouble&quot;.  For that you'll need to either look into a commercial lua engine, or just extend your stopwatch tool a bit...&#xD;&#xA;&#xD;&#xA;(There was a game middleware company offering a fully custom lua engine with profiling and debugging tools, can't find them now...  There's also [lua profiler][6], googling around a bit.  Not sure if it would fit the bill, but it seems like there are others too.)&#xD;&#xA;&#xD;&#xA;If you're willing to take the time to play with CodeAnalyst, valgrind, or gprof, chances are you'll learn something -- if not about your code, then about profiling in general, which you might use to enhance your own custom solution.  =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2190/in-general-how-often-and-when-should-i-optimize-my-code/2225#2225&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2190/in-general-how-often-and-when-should-i-optimize-my-code&#xD;&#xA;  [3]: http://developer.amd.com/cpu/codeanalyst/Pages/default.aspx&#xD;&#xA;  [4]: http://valgrind.org/docs/manual/manual.html&#xD;&#xA;  [5]: http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html&#xD;&#xA;  [6]: http://luaprofiler.luaforge.net/manual.html" />
  <row Id="5421" PostHistoryTypeId="5" PostId="2791" RevisionGUID="5ecf3b7b-6ec7-451c-94c9-bda248a54ad0" CreationDate="2010-08-15T16:28:56.057" UserId="1716" Comment="added 6 characters in body" Text="As a semi FAQ question attempt : &#xD;&#xA;&#xD;&#xA;Where can you find people to work with you on a project? Particularly programmers. One thing that is obvious is that all programmers have a project (or twenty), and the chances of a programmer just hanging around looking for something to do is a lot less likely than if it were an artist needed on the team.&#xD;&#xA;&#xD;&#xA;So, where do you post? Where do you search and follow people around until it looks like they are a viable team member? Is it really difficult to assemble a team that are not close friends or chat buddies? Are there sites with this sort of posting?&#xD;&#xA;&#xD;&#xA;To clarify : I am referring to a team.&#xD;&#xA;&#xD;&#xA;Example 1 : I am making gameEngineOfAwesomeness. I need help.&#xD;&#xA;&#xD;&#xA;Example 2 : I am 70% complete on this game, and i need help.&#xD;&#xA;&#xD;&#xA;Example 3 : I have an open source project idea, with a prototype. I need help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It doesn't necessarily mean open source, just programmers who can work with me on something (and where to find them :)) " />
  <row Id="5422" PostHistoryTypeId="2" PostId="2794" RevisionGUID="4e9b0a1c-b58f-49d7-b60a-6e7a29d0bc3e" CreationDate="2010-08-15T16:34:03.730" UserId="1716" Text="Along with other answers, use an existing wheel : http://miniupnp.free.fr/&#xD;&#xA;This library battles almost all of the annoyances in function form , giving you control over when and how to punch and pull :)" />
  <row Id="5423" PostHistoryTypeId="2" PostId="2795" RevisionGUID="047975ca-3fd0-44aa-882a-106d0880701e" CreationDate="2010-08-15T16:47:08.393" UserId="1716" Text="V8 Javascript from google.&#xD;&#xA;&#xD;&#xA;PRO's : &#xD;&#xA;&#xD;&#xA;**Quite easy to use**&#xD;&#xA;&#xD;&#xA;**Constantly getting better**&#xD;&#xA;&#xD;&#xA;**Powerful and flexible** &#xD;&#xA;&#xD;&#xA;**Others** As many mentioned , javascript is a common programmer tool. Adding it to my games has opened far more people who feel capable than other languages. It also supports a huge amount of casting and conversion to save on work for the programmer, also makes it really easy to use, works well with STL.&#xD;&#xA;&#xD;&#xA;Possible CON's : &#xD;&#xA;&#xD;&#xA;**Documentation can be confusing** Its really not the best.&#xD;&#xA;&#xD;&#xA;**Examples** Often a web of weirdness. Lacking in solid simplicity, it comes across as way higher level than it is.&#xD;&#xA;&#xD;&#xA;**Templates** Sometimes these are hated on, or avoided. " />
  <row Id="5424" PostHistoryTypeId="16" PostId="2795" RevisionGUID="047975ca-3fd0-44aa-882a-106d0880701e" CreationDate="2010-08-15T16:47:08.393" UserId="1716" />
  <row Id="5425" PostHistoryTypeId="16" PostId="50" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5426" PostHistoryTypeId="16" PostId="92" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5427" PostHistoryTypeId="16" PostId="155" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5428" PostHistoryTypeId="16" PostId="164" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5429" PostHistoryTypeId="16" PostId="192" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5430" PostHistoryTypeId="16" PostId="379" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5431" PostHistoryTypeId="16" PostId="393" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5432" PostHistoryTypeId="16" PostId="406" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5433" PostHistoryTypeId="16" PostId="612" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5434" PostHistoryTypeId="16" PostId="620" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5435" PostHistoryTypeId="16" PostId="11" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-15T16:59:52.883" UserId="51" />
  <row Id="5436" PostHistoryTypeId="2" PostId="2796" RevisionGUID="00a3df93-449f-4bdb-b3fe-09ed64fbb45e" CreationDate="2010-08-15T17:02:59.290" UserId="1716" Text="The examples are quite challenging to grasp if you are still getting your head around other things, so the simplest example would be great.&#xD;&#xA;&#xD;&#xA;Is there a simpler example?" />
  <row Id="5437" PostHistoryTypeId="1" PostId="2796" RevisionGUID="00a3df93-449f-4bdb-b3fe-09ed64fbb45e" CreationDate="2010-08-15T17:02:59.290" UserId="1716" Text="Binding C++ and V8 Javascript from Google" />
  <row Id="5438" PostHistoryTypeId="3" PostId="2796" RevisionGUID="00a3df93-449f-4bdb-b3fe-09ed64fbb45e" CreationDate="2010-08-15T17:02:59.290" UserId="1716" Text="&lt;c++&gt;&lt;engine&gt;&lt;scripting&gt;&lt;javascript&gt;" />
  <row Id="5439" PostHistoryTypeId="2" PostId="2797" RevisionGUID="ed65d177-aa96-4b73-98ec-c9750da8f337" CreationDate="2010-08-15T17:05:32.533" UserId="1716" Text="Some links : &#xD;&#xA;&#xD;&#xA;1) A helper class i wrote (non-revolutionary) : http://blog.owned.co.za/?p=205&#xD;&#xA;&#xD;&#xA;2) CProxyV8 extends on the point/line samples by using their binding code&#xD;&#xA;&#xD;&#xA;3) v8Juice is also a binding system for v8, has some simpler examples&#xD;&#xA;&#xD;&#xA;4) Find other v8 projects and have a look inside their code (if possible)&#xD;&#xA;&#xD;&#xA;5) Ask on gamedev.stackexchange.com&#xD;&#xA;&#xD;&#xA;6) Ask on the v8 channel on iRC, freenode server&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5440" PostHistoryTypeId="2" PostId="2798" RevisionGUID="f16ac245-b7f1-4f35-ba15-c0821e70a871" CreationDate="2010-08-15T17:15:34.183" UserId="1719" Text="56 texture units means that approximately 56 texture filtering operations can occur in parallel  in a single clock (throughput) (some operations take longer than others - aniso footprint size, texel size, etc.).  The hardware will utilize this automatically since it processes many pixels in parallel. The number of texure slots used per shader does not affect this.&#xD;&#xA;&#xD;&#xA;@FuzzySpoon: That isn't the case.  Even a single cube will be 56x times faster than a hypothetical 1x texture card, since it is parallelized at the pixel (actually pixel texture request) level.  This assumes of course that the bottleneck is texture filtering in both cases." />
  <row Id="5441" PostHistoryTypeId="2" PostId="2799" RevisionGUID="c66f7678-7efb-4b55-b62a-5742f8df28f0" CreationDate="2010-08-15T18:28:54.237" UserId="744" Text="I have a basic character controller set up for a 2D platformer with Box2D, and I'm starting to tweak it to try to make it feel good. Physics engines have a lot of knobs to tweak, and it's not clear to me, writing with a physics engine for the first time, which ones I should use. Should jumping apply a force for several ticks? An impulse? Directly set velocity? How do I stop the avatar from sticking to walls without taking away all its friction (or do I take away all the friction, but only in the air)? Should I model the character as a capsule? A box with rounded corners? A box with two wheels? Just one big wheel? I feel like someone must have done this before!&#xD;&#xA;&#xD;&#xA;There seem to be very few resources available on the web that are not &quot;baby's first physics&quot;, which all cut off where I'm hoping someone has already solved the issues. Most examples of physics engines for platformers have floaty-feeling controls, or in-air jumps, or easily exploitable behavior when temporary penetration is too high, etc.&#xD;&#xA;&#xD;&#xA;Some examples of what I mean:&#xD;&#xA;&#xD;&#xA;* A short tap of jump jumps a short distance; a long tap jumps higher.&#xD;&#xA;* Short skidding when stopping or reversing directions at high velocity.&#xD;&#xA;* Standing stably on inclines (but maybe sliding down them when ducking).&#xD;&#xA;* Analog speed when using an analog controller.&#xD;&#xA;* All the other things that separate good platformers from bad platformers.&#xD;&#xA;* Dare I suggest, stable moving platforms?&#xD;&#xA;" />
  <row Id="5442" PostHistoryTypeId="1" PostId="2799" RevisionGUID="c66f7678-7efb-4b55-b62a-5742f8df28f0" CreationDate="2010-08-15T18:28:54.237" UserId="744" Text="Good 2D Platformer Physics" />
  <row Id="5443" PostHistoryTypeId="3" PostId="2799" RevisionGUID="c66f7678-7efb-4b55-b62a-5742f8df28f0" CreationDate="2010-08-15T18:28:54.237" UserId="744" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;input&gt;&lt;feedback&gt;" />
  <row Id="5444" PostHistoryTypeId="2" PostId="2800" RevisionGUID="28265dce-c796-4e14-9b0e-1e1e769fa7f1" CreationDate="2010-08-15T19:05:04.053" UserId="290" Text="1)  Press the flesh at places like [Penguicon][1] or local users group meetings and have your [elevator pitch][2] down and some color fliers with calls to action.  If you want to enlist the help of others, you will need to market yourself and your idea.  Explain 'why you' and 'why this' to a group of people who don't know you and surely have 15 of their own ideas that they haven't followed through on themselves.  If you have a prototype, set up several machines in a con-suite or talk to the users group about being a speaker and present what you have to as large an audience as you can.&#xD;&#xA; &#xD;&#xA;2)  Make it easy to help you by setting up all of the infrastructure yourself before you talk to anyone.  Get a well populated WIKI in place, source control system, storyboards (even if the art stinks), etc. and ideas on how 'this game' is going to change the world.&#xD;&#xA;&#xD;&#xA;3)  Be prepared to do more work than any two or three other team members, because you will need to be cheerleader, project manager, and contributor all.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.penguicon.org/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Elevator_pitch" />
  <row Id="5445" PostHistoryTypeId="2" PostId="2801" RevisionGUID="905fa3f5-7582-4b99-a836-2cc5d799ca44" CreationDate="2010-08-15T19:09:35.183" UserId="51" Text="Honestly I don't think using a physics engine is the right approach for something of that size domain with super strict requirements.&#xD;&#xA;&#xD;&#xA;Just write it all yourself.  You'll get much better results by saying &quot;move character up by x units in this parabola shape when holding down jump button for length y&quot; than by having a bunch of knobs to tweak." />
  <row Id="5446" PostHistoryTypeId="2" PostId="2802" RevisionGUID="1480816c-f769-41bd-9d34-a7528dd6964c" CreationDate="2010-08-15T19:11:21.920" UserId="659" Text="It's quite tricky to implement, say, 'Mario-like' physics using a real physics engine.&#xD;&#xA;&#xD;&#xA;Last time I tried this, using Chipmunk, I modelled the player as 2 circles - a 'body circle' on top of a 'feet circle'&#xD;&#xA;&#xD;&#xA;The 'feet circle' was frictionless, non-bouncy and fairly small&#xD;&#xA;The 'body circle' was larger. It could have different physical properties - but keep it frictionless, to avoid sticking to walls/steep slopes&#xD;&#xA; &#xD;&#xA;The object was constrained to not allow rotation&#xD;&#xA;&#xD;&#xA;If the 'feet' are touching something, or were within the last few frames (to allow falling down slopes), the player was considered as on the ground (may have had a surface normal check, too)&#xD;&#xA;&#xD;&#xA;It's a while since I looked at the code, but the behaviour was along the lines of:&#xD;&#xA;&#xD;&#xA;When on the ground:&#xD;&#xA;&#xD;&#xA; - Apply additional gravity (to help with running down slopes)&#xD;&#xA; - Apply ground friction (larger amount of horizontal damping)&#xD;&#xA; - Apply left/right movement force, based on the controls.&#xD;&#xA; - (Scale down the left/right movement force as approaching a maximum run speed)&#xD;&#xA; - If jump is pressed, apply upwards impulse &#xD;&#xA;       &#xD;&#xA;When in the air:&#xD;&#xA;&#xD;&#xA; - Apply air resistance (small amount of horizontal damping)&#xD;&#xA; - Apply regular (or reduced) gravity&#xD;&#xA; - Apply left/right movement force, if you're allowing in-the-air control&#xD;&#xA;&#xD;&#xA;You've got to be a bit careful with switching between the two states - remember that when running down a slope, you may leave the ground for a couple of frames - you probably don't want to switch states/disallow jumping at that point&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5447" PostHistoryTypeId="5" PostId="2802" RevisionGUID="0762808c-3040-4f82-a911-e1126f8e3049" CreationDate="2010-08-15T19:18:12.870" UserId="659" Comment="added 291 characters in body; deleted 20 characters in body; edited body" Text="It's quite tricky to implement, say, 'Mario-like' physics using a real physics engine.&#xD;&#xA;&#xD;&#xA;Last time I tried this, using Chipmunk, I modelled the player as 2 circles - a 'body circle' on top of a 'feet circle'&#xD;&#xA;&#xD;&#xA;The 'feet circle' had some friction, was non-bouncy, and fairly small. The 'body circle' was larger and frictionless, to avoid sticking to walls/steep slopes&#xD;&#xA; &#xD;&#xA;The object was constrained to not allow rotation - it would just slide around&#xD;&#xA;&#xD;&#xA;If the 'feet' are touching something, or were within the last few frames (to allow falling down slopes), the player was considered as on the ground (may have had a surface normal check, too)&#xD;&#xA;&#xD;&#xA;It's a while since I looked at the code, but the behaviour was along the lines of:&#xD;&#xA;&#xD;&#xA;When on the ground:&#xD;&#xA;&#xD;&#xA; - Apply additional gravity (to help with running down slopes)&#xD;&#xA; - Apply ground friction (larger amount of horizontal damping)&#xD;&#xA; - Apply left/right movement force, based on the controls.&#xD;&#xA; - (Scale down the left/right movement force as approaching a maximum run speed)&#xD;&#xA; - If jump is pressed, apply upwards impulse &#xD;&#xA;       &#xD;&#xA;When in the air:&#xD;&#xA;&#xD;&#xA; - Apply air resistance (small amount of horizontal damping)&#xD;&#xA; - Apply regular (or reduced) gravity&#xD;&#xA; - Apply left/right movement force, if you're allowing in-the-air control&#xD;&#xA;&#xD;&#xA;You've got to be a bit careful with switching between the two states - remember that when running down a slope, you may leave the ground for a couple of frames - you probably don't want to switch states/disallow jumping at that point&#xD;&#xA;&#xD;&#xA;A few other things to watch out for, though... 'jump-up-through' platforms can be hard to implement, and when you start doing fun stuff (moving platforms, rotating worlds, etc), you have to be careful to make sure the player can't get trapped/crushed by any 'animation driven' moving object.&#xD;&#xA;" />
  <row Id="5448" PostHistoryTypeId="5" PostId="2802" RevisionGUID="833a3f71-4f52-4547-995a-f1e56a81e8cf" CreationDate="2010-08-15T19:58:59.293" UserId="659" Comment="added 17 characters in body" Text="It's quite tricky to implement, say, 'Mario-like' physics using a real physics engine.&#xD;&#xA;&#xD;&#xA;Last time I tried this, using Chipmunk, I modelled the player as 2 circles - a 'body circle' on top of a 'feet circle'&#xD;&#xA;&#xD;&#xA;The 'feet circle' had some friction, was non-bouncy, and fairly small. The 'body circle' was larger and frictionless, to avoid sticking to walls/steep slopes&#xD;&#xA; &#xD;&#xA;The object was constrained to not allow rotation - it would just slide around&#xD;&#xA;&#xD;&#xA;If the 'feet' are touching something, or were within the last few frames (to allow falling down slopes), the player was considered as on the ground (may have had a surface normal check, too)&#xD;&#xA;&#xD;&#xA;It's a while since I looked at the code, but the behaviour was along the lines of:&#xD;&#xA;&#xD;&#xA;When on the ground:&#xD;&#xA;&#xD;&#xA; - Apply 'additional gravity' (downward force to help with running down slopes)&#xD;&#xA; - Apply ground friction (larger amount of horizontal damping)&#xD;&#xA; - Apply left/right movement force, based on the controls.&#xD;&#xA; - (Scale down the left/right movement force as approaching a maximum run speed)&#xD;&#xA; - If jump is pressed, apply upwards impulse &#xD;&#xA;       &#xD;&#xA;When in the air:&#xD;&#xA;&#xD;&#xA; - Apply air resistance (small amount of horizontal damping)&#xD;&#xA; - Apply regular (or reduced) gravity&#xD;&#xA; - Apply left/right movement force, if you're allowing in-the-air control&#xD;&#xA;&#xD;&#xA;You've got to be a bit careful with switching between the two states - remember that when running down a slope, you may leave the ground for a couple of frames - you probably don't want to switch states/disallow jumping at that point&#xD;&#xA;&#xD;&#xA;A few other things to watch out for, though... 'jump-up-through' platforms can be hard to implement, and when you start doing fun stuff (moving platforms, rotating worlds, etc), you have to be careful to make sure the player can't get trapped/crushed by any 'animation driven' moving object.&#xD;&#xA;" />
  <row Id="5449" PostHistoryTypeId="5" PostId="2775" RevisionGUID="3997856a-6271-40d5-914f-fc26137d46fe" CreationDate="2010-08-15T20:02:20.143" UserId="162" Comment="typo" Text="There is a Japanese freeware PC shoot-em-up called &quot;[Warning Forever][1]&quot; that evolves the bosses based on how you approach them, in a way that is more than just switching between presets. It's also pretty fun for being free.&#xD;&#xA;&#xD;&#xA;Another game I found is &quot;[Evolution Shooter][2]&quot; by Petri Purho, which uses an evolutionary algorithm to combine entire shooter game definitions, as opposed to individual enemies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www18.big.or.jp/~hikoza/Prod/index_e.html&#xD;&#xA;  [2]: http://www.kloonigames.com/blog/games/evolution-shmup" />
  <row Id="5450" PostHistoryTypeId="2" PostId="2803" RevisionGUID="d83da272-adac-4bfb-a232-7e5e8322e0bf" CreationDate="2010-08-15T20:03:08.677" UserId="744" Text="Let's turn the question around: There are plenty of in-progress game projects on the Internet already. Why aren't you helping one of those, and would rather start your own?&#xD;&#xA;&#xD;&#xA;When you figure out the answer to that, you'll have the answer to your question." />
  <row Id="5451" PostHistoryTypeId="5" PostId="2799" RevisionGUID="44db2126-ef90-48d1-88d7-6daea4657acf" CreationDate="2010-08-15T20:12:08.700" UserId="744" Comment="added 369 characters in body" Text="I have a basic character controller set up for a 2D platformer with Box2D, and I'm starting to tweak it to try to make it feel good. Physics engines have a lot of knobs to tweak, and it's not clear to me, writing with a physics engine for the first time, which ones I should use. Should jumping apply a force for several ticks? An impulse? Directly set velocity? How do I stop the avatar from sticking to walls without taking away all its friction (or do I take away all the friction, but only in the air)? Should I model the character as a capsule? A box with rounded corners? A box with two wheels? Just one big wheel? I feel like someone must have done this before!&#xD;&#xA;&#xD;&#xA;There seem to be very few resources available on the web that are not &quot;baby's first physics&quot;, which all cut off where I'm hoping someone has already solved the issues. Most examples of physics engines for platformers have floaty-feeling controls, or in-air jumps, or easily exploitable behavior when temporary penetration is too high, etc.&#xD;&#xA;&#xD;&#xA;Some examples of what I mean:&#xD;&#xA;&#xD;&#xA;* A short tap of jump jumps a short distance; a long tap jumps higher.&#xD;&#xA;* Short skidding when stopping or reversing directions at high velocity.&#xD;&#xA;* Standing stably on inclines (but maybe sliding down them when ducking).&#xD;&#xA;* Analog speed when using an analog controller.&#xD;&#xA;* All the other things that separate good platformers from bad platformers.&#xD;&#xA;* Dare I suggest, stable moving platforms?&#xD;&#xA;&#xD;&#xA;I'm not really looking for &quot;hey, do this.&quot; Obviously, the right thing to do is dependent on what I want in the game. But I'm hoping someone somewhere has gone through the possibilities and said &quot;well technique A does feature X well, technique B does Y well, but that doesn't work with C&quot;, or has some worked examples beyond &quot;if (key == space) character.impulse(0, 1)&quot;" />
  <row Id="5452" PostHistoryTypeId="5" PostId="2795" RevisionGUID="a086f3ab-dad7-4ab1-9258-ab20b31e1753" CreationDate="2010-08-15T21:05:04.300" UserId="1716" Comment="Added con from comments" Text="V8 Javascript from google.&#xD;&#xA;&#xD;&#xA;PRO's : &#xD;&#xA;&#xD;&#xA;**Quite easy to use**&#xD;&#xA;&#xD;&#xA;**Constantly getting better**&#xD;&#xA;&#xD;&#xA;**Powerful and flexible** &#xD;&#xA;&#xD;&#xA;**Others** As many mentioned , javascript is a common programmer tool. Adding it to my games has opened far more people who feel capable than other languages. It also supports a huge amount of casting and conversion to save on work for the programmer, also makes it really easy to use, works well with STL.&#xD;&#xA;&#xD;&#xA;Possible CON's : &#xD;&#xA;&#xD;&#xA;**Documentation can be confusing** Its really not the best.&#xD;&#xA;&#xD;&#xA;**Examples** Often a web of weirdness. Lacking in solid simplicity, it comes across as way higher level than it is.&#xD;&#xA;&#xD;&#xA;**Templates** Sometimes these are hated on, or avoided. &#xD;&#xA;&#xD;&#xA;**SDK Codebase size** As mentioned in the comments below." />
  <row Id="5453" PostHistoryTypeId="2" PostId="2804" RevisionGUID="84e4438a-05e9-4e1b-bf77-351d83594903" CreationDate="2010-08-15T22:01:05.063" UserId="154" Text="As for the reasoning behind the pose. There are three.&#xD;&#xA;&#xD;&#xA;1. Any left/right symmetrical pose simplifies modelling time as majority of the model can be built in half and mirrored. Saving asymmetrical details until the end.&#xD;&#xA;2. Same goes from the skeletal data, which can be left entirely symmetrical. Which allows for mirroring of animations if needed.&#xD;&#xA;3. Finally a pose with separated limbs makes the job of the rigger much easier. Rigging is binding the mesh model to the skeletal data, showing which verts on the model are effected by the various bones. While you could rig a model with it's arms down at it's side it would take a lot more time as a lot of the automatic tools would associate leg and chest verts with arm bones.&#xD;&#xA;&#xD;&#xA;As to the T-pose vs. 45-degree inverted Y pose.&#xD;&#xA;&#xD;&#xA;When you use skeletal deformation for animation you are using bone positions to create deformations in the shape of the model. This approximates the motion of limbs, but it's only an approximation, and the further from the bind pose you get the more distorted the deformation. There are lots of expensive solutions to fix that, creating target shapes that you blend the verts towards as you use the bones to move the model but those solutions get expensive in memory or cpu time quickly.&#xD;&#xA;&#xD;&#xA;So why the &quot;T&quot;? Well if you look at the range of motion a human arm can make it goes from a little past pointing straight up to a little past straight down. This makes out to the side exactly in the middle of the two extreme positions. Since skeletal deformations look worse the further they get from the original pose it makes sense to make the bind pose in the middle.&#xD;&#xA;&#xD;&#xA;As FuzzySpoon mentioned the static-T pose has been shifted a bit to arms at more of a 45-degree downward slope. The reason for this is that while horizontal is the middle point for the full range of rotation of the arm, it isn't the middle point for common usage of the arm. Our arms spend most of the time either at our sides or as high as shoulder height. So 45-degrees down is right in the middle of the most common positions for arms in animations. The other issue is that as you lift your arm to horizontal your shoulders tend to rise and clothing bunches up, it's more complicated to model the shoulder area when you have to think of pre-bunched up clothing and raised shoulders. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5454" PostHistoryTypeId="2" PostId="2805" RevisionGUID="458e2af4-1f52-4fb1-ba17-291793200474" CreationDate="2010-08-15T22:14:13.670" UserId="154" Text="Not real-time, nor a shooter, but when developing a car combat game we did use an evolutionary process to build the AI. Enemy cars could see the edges of the track and locations of other vehicles.&#xD;&#xA;&#xD;&#xA;However things like how hard to break, when to start, how hard to steer around opponents, when to target opponents vs. focus on driving were all setup as variables. Then the AI was setup to run laps all night long slowly tweaking the variables. Each morning we'd look at the previous nights data, find the ones that had the best lap times/kills and then mutate that again. The end result was an AI that could be dumped into any track and be able to compete.&#xD;&#xA;&#xD;&#xA;This was all then baked into the game, so it didn't learn from playing against the player.&#xD;&#xA;&#xD;&#xA;There are several sports games that track player tendencies and then work to anticipate those choices, not sure if anyone has shipped adaptive AI in a shooter though. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5455" PostHistoryTypeId="6" PostId="1629" RevisionGUID="846c9c82-24fc-4277-999f-37ba8680ab26" CreationDate="2010-08-15T23:14:56.070" UserId="647" Comment="Added OpenAL tag" Text="&lt;c++&gt;&lt;programming&gt;&lt;openal&gt;" />
  <row Id="5456" PostHistoryTypeId="2" PostId="2806" RevisionGUID="b498ca46-02e8-471b-8e09-31c0c04180f0" CreationDate="2010-08-16T00:40:07.730" UserId="1173" Text="It might be outside the domain of open source (as there isn't much in the way of open source games that would want/need to implement all these) but is there an existing open source game or rendering engine capable of things such as :&#xD;&#xA;&#xD;&#xA;- day/night cycles&#xD;&#xA;- dynamic weather wind/rain/clouds/etc&#xD;&#xA;- wet surfaces (surfaces look wet during rain)&#xD;&#xA;- realistic water&#xD;&#xA;- large terrains with the ability to define &quot;roads&quot;&#xD;&#xA;- seamless exterior and interior&#xD;&#xA;- forests (lots of trees, clutter, etc)&#xD;&#xA;- realistic lighting (ie. light from a fire/candle flickers)&#xD;&#xA;&#xD;&#xA;if game engine : &#xD;&#xA;&#xD;&#xA;- integrated physics&#xD;&#xA;- support for vehicles&#xD;&#xA;- ai&#xD;&#xA;- multiplayer/network capable.. maybe mmo&#xD;&#xA;- voice recognition&#xD;&#xA;- etc" />
  <row Id="5457" PostHistoryTypeId="1" PostId="2806" RevisionGUID="b498ca46-02e8-471b-8e09-31c0c04180f0" CreationDate="2010-08-16T00:40:07.730" UserId="1173" Text="Pretty open source game/rendering engine?" />
  <row Id="5458" PostHistoryTypeId="3" PostId="2806" RevisionGUID="b498ca46-02e8-471b-8e09-31c0c04180f0" CreationDate="2010-08-16T00:40:07.730" UserId="1173" Text="&lt;engine&gt;&lt;physics&gt;&lt;ai&gt;&lt;open-source&gt;&lt;terrain-rendering&gt;" />
  <row Id="5459" PostHistoryTypeId="2" PostId="2807" RevisionGUID="b012d0aa-bc00-425f-864a-39a60513c396" CreationDate="2010-08-16T01:04:20.767" UserId="1173" Text="I am trying to design a game with some interesting features but one question I have is regarding terrain. I want a terrain that will make for a very large game world, and I want to be able to have such features as &quot;roads&quot; and &quot;rivers&quot;.&#xD;&#xA;&#xD;&#xA;What options do I have in terms of terrain and what will give me the best result in terms of best looking, obviously I want to also keep the game playable with a reasonable frame-rate, but this game will specifically target higher end hardware." />
  <row Id="5460" PostHistoryTypeId="1" PostId="2807" RevisionGUID="b012d0aa-bc00-425f-864a-39a60513c396" CreationDate="2010-08-16T01:04:20.767" UserId="1173" Text="what options do I have for rendering &quot;large&quot; terrains?" />
  <row Id="5461" PostHistoryTypeId="3" PostId="2807" RevisionGUID="b012d0aa-bc00-425f-864a-39a60513c396" CreationDate="2010-08-16T01:04:20.767" UserId="1173" Text="&lt;graphics&gt;&lt;game-design&gt;&lt;performance&gt;&lt;terrain-rendering&gt;" />
  <row Id="5462" PostHistoryTypeId="2" PostId="2808" RevisionGUID="1eb5e760-9cde-491c-afb3-c49d652d6627" CreationDate="2010-08-16T01:09:44.077" UserId="189" Text="You should stream your terrain from disk; don't load the entire world into memory just to render what's around the player.&#xD;&#xA;&#xD;&#xA;Also see &quot;[What’s the newest trend / method for terrain rendering?][1]&quot; and &quot;[What is 'ROAM' related to terrain rendering?][2]&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9/whats-the-newest-trend-method-for-terrain-rendering&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/745/what-is-roam-related-to-terrain-rendering" />
  <row Id="5463" PostHistoryTypeId="5" PostId="2808" RevisionGUID="a2037366-823d-4f6e-8a6d-1f485c90c593" CreationDate="2010-08-16T01:15:04.003" UserId="189" Comment="added 326 characters in body; added 321 characters in body" Text="You should stream your terrain from disk; don't load the entire world into memory just to render what's around the player.&#xD;&#xA;&#xD;&#xA;Also see &quot;[What’s the newest trend / method for terrain rendering?][1]&quot; and &quot;[What is 'ROAM' related to terrain rendering?][2]&quot;.&#xD;&#xA;&#xD;&#xA;Traditionally, a heightmap grid of [tiles][3] has been used to represent the terrain geometry. However it doesn't allow for multiple floors or cave-like structures, though you can fudge it by adding meshes that seamlessly integrate with the heightmap.&#xD;&#xA;&#xD;&#xA;As you seem to be new to this, you might want to start by playing with a world editor. There are plenty of Google results for [terrain editor][4] that you can try; I personally can't recommend any one of them from the rest but perhaps someone can comment on them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9/whats-the-newest-trend-method-for-terrain-rendering&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/745/what-is-roam-related-to-terrain-rendering&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#tiles&#xD;&#xA;  [4]: http://www.google.com/search?q=terrain+editor" />
  <row Id="5464" PostHistoryTypeId="2" PostId="2809" RevisionGUID="1c759d07-b8ae-4a0d-80e6-d4032f076edf" CreationDate="2010-08-16T02:38:27.313" UserId="1588" Text="DevMaster maintains a comprehensive list of engines and features:&#xD;&#xA;&#xD;&#xA;http://www.devmaster.net/engines/&#xD;&#xA;&#xD;&#xA;Most engines will not offer day/night cycles as there is always a time in the cycle where the map is poorly lit and looks bad (just like real life) - usually an unnecessary feature for games.&#xD;&#xA;" />
  <row Id="5465" PostHistoryTypeId="2" PostId="2810" RevisionGUID="00432c00-0fe6-4215-be63-f154d8ed15a0" CreationDate="2010-08-16T02:41:03.763" UserId="1272" Text="If you're looking for a rendering engine that does all of that first list right out of the box, I don't think you'll find a whole lot. Stuff like fancy lighting shaders and day/night stuff are very game/simulation specific, and most rendering engines either won't have that sort of thing built in, or the built in implementation won't meet your specific needs.&#xD;&#xA;&#xD;&#xA;I use [Ogre3D][1], which I wholeheartedly recommend:&#xD;&#xA;&#xD;&#xA;&gt; open source&#xD;&#xA;&#xD;&#xA;Ogre is open source, under the MIT license.&#xD;&#xA;&#xD;&#xA;&gt; day/night cycles&#xD;&#xA;&#xD;&#xA;Nothing built in, though there are a few extensions that do this sort of thing ([Caelum][2] comes to mind).&#xD;&#xA; &#xD;&#xA;&gt; dynamic weather wind/rain/clouds/etc&#xD;&#xA;&#xD;&#xA;Again, nothing out of the box, but there are a number of extensions that do something like this (again, Caelum, and also [SkyX][3]).&#xD;&#xA;&#xD;&#xA;&gt; wet surfaces (surfaces look wet during rain)&#xD;&#xA;&#xD;&#xA;You'll have to write a shader for it, but it is possible (I have achieved such an effect in the past with Ogre).&#xD;&#xA;&#xD;&#xA;&gt; realistic water&#xD;&#xA;&#xD;&#xA;There is a plugin or two for this ([Hydrax][4] is rather pretty), and the 'Fresnel' SDK sample shows off a simple refraction/reflection water shader (and there's another sample or two devoted to water effects).&#xD;&#xA;&#xD;&#xA;&gt; large terrains with the ability to define &quot;roads&quot;&#xD;&#xA;&#xD;&#xA;No roads, but Ogre recently got a new terrain system that is very nice.&#xD;&#xA;&#xD;&#xA;&gt; seamless exterior and interior&#xD;&#xA;&#xD;&#xA;Ogre has a few different plugins for portal connected zones, BSP's etc, so it should support whatever you need.&#xD;&#xA;&#xD;&#xA;&gt; forests (lots of trees, clutter, etc)**&#xD;&#xA;&#xD;&#xA;Ogre has some batching capabilities built in, and the [Paged Geometry][5] addon is supposedly quite nice.&#xD;&#xA;&#xD;&#xA;&gt; realistic lighting (ie. light from a fire/candle flickers)**&#xD;&#xA;&#xD;&#xA;Aside from some example shaders included with the samples there aren't any built-in lighting shaders, but the material/shader system makes it very easy to get a lighting shader up and running.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Overall, Ogre is capable of all of that, and has a very robust material/shader system, but you will have to write the shaders for a lot of the effects yourself (and this is true of most other rendering engines, you can't really make one-size-fits-all solutions for a lot of these effects).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://www.ogre3d.org/tikiwiki/Caelum&#xD;&#xA;  [3]: http://www.ogre3d.org/forums/viewtopic.php?t=48414&amp;f=11&#xD;&#xA;  [4]: http://www.ogre3d.org/tikiwiki/Hydrax&#xD;&#xA;  [5]: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=PagedGeometry+Engine" />
  <row Id="5466" PostHistoryTypeId="5" PostId="2419" RevisionGUID="193f874c-502b-437f-b8cc-11c49c0173f0" CreationDate="2010-08-16T05:12:31.067" UserId="1553" Comment="added 152 characters in body; edited tags" Text="What are some good examples of procedural/screen-space pixel shader effects? No code necessary; just looking for inspiration. In particular, I'm looking for effects that are not dependent on geometry or the rest of the scene (would look okay rendered alone on a quad) and are not image processing (don't require a &quot;base image&quot;, though they can incorporate textures). Multi-pass or single-pass is fine. Screenshots or videos would be ideal, but ideas work too.&#xD;&#xA;&#xD;&#xA;Here are a few examples of what I'm looking for (all from the RenderMonkey samples):&#xD;&#xA;![alt text][1]![alt text][2]&#xD;&#xA;![alt text][3]![alt text][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PS - I'm aware of [this question][5]; I'm not asking for a source of actual shader implementations but instead for some inspirational ideas -- and the ones at the [NVIDIA Shader Library][6] mostly require a scene or are image processing effects.&#xD;&#xA;&#xD;&#xA;**EDIT:** this is an open-ended question and I wish there was a good way to split the bounty. I'll award the rep to the best answer on the last day.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://public.blu.livefilestore.com/y1pXcNg_0EPZVzwu1T84a4Yek373x8062rhrNCA7UcftTjCkeiY-5uAuJiBYY29x2E53p5MO-uMA8FmEquvxsPCkA/effect1.jpg?psid=1&#xD;&#xA;  [2]: http://public.blu.livefilestore.com/y1p_5Lx7BdjFyFRBkbcc0WakAT7Q-99fVcFOxmTXBbG4VtoFzC0UfAj51eSnE7ZOD84EYL2Y51HhMS2nWsohhn1mQ/effect2.jpg?psid=1&#xD;&#xA;  [3]: http://public.blu.livefilestore.com/y1p_5Lx7BdjFyE3KhYtHe-Cdg7XuXcJ9Ou-GKzED-kZnzACyB5ypA6NSCfsYfuKa0h3ztoDRwwq9qBddX2OfG0fhg/effect3.jpg?psid=1&#xD;&#xA;  [4]: http://nv3wrg.blu.livefilestore.com/y1p1iHFwf-wytDo8HlTJca8RfckA-iTKgvLiJm0t9iz3S35YgeEnt99NMjKDgotxa3Bv90wAhOYLabzx2Sd3LoEH2Hs76WR1vFM/effect5.jpg?psid=1&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/1673/is-there-any-shaders-directory&#xD;&#xA;  [6]: http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html" />
  <row Id="5467" PostHistoryTypeId="6" PostId="2419" RevisionGUID="193f874c-502b-437f-b8cc-11c49c0173f0" CreationDate="2010-08-16T05:12:31.067" UserId="1553" Comment="added 152 characters in body; edited tags" Text="&lt;graphics&gt;&lt;textures&gt;&lt;art&gt;&lt;shaders&gt;" />
  <row Id="5468" PostHistoryTypeId="5" PostId="2795" RevisionGUID="28f46232-c5b6-49ed-b20d-53d88ef62308" CreationDate="2010-08-16T08:46:15.687" UserId="1716" Comment="added 8 characters in body" Text="V8 Javascript from google.&#xD;&#xA;&#xD;&#xA;PRO's : &#xD;&#xA;&#xD;&#xA;**Quite easy to use**&#xD;&#xA;&#xD;&#xA;**Constantly getting better**&#xD;&#xA;&#xD;&#xA;**Powerful and flexible** &#xD;&#xA;&#xD;&#xA;**Others** As many mentioned , javascript is a common programmer tool. Adding it to my games has opened far more people who feel capable than other languages. It also supports a huge amount of casting and conversion to save on work for the programmer, also makes it really easy to use, works well with STL.&#xD;&#xA;&#xD;&#xA;Possible CON's : &#xD;&#xA;&#xD;&#xA;**Documentation can be confusing** Its really not the best.&#xD;&#xA;&#xD;&#xA;**Examples** Often a web of weirdness. Lacking in solid simplicity, it comes across as way higher level than it is.&#xD;&#xA;&#xD;&#xA;**Templates** Sometimes these are hated on, or avoided. &#xD;&#xA;&#xD;&#xA;**SDK Codebase size** Generated code size may be consider bloat. " />
  <row Id="5469" PostHistoryTypeId="2" PostId="2811" RevisionGUID="d8e1e587-7927-4851-ac0c-e4bf2e928cd6" CreationDate="2010-08-16T08:59:03.953" UserId="741" Text="I'm pretty sure on Direct X platforms at least, you're expected to query the platform for a list of available modes (using EnumAdapterModes on the device). That way the platform will already exclude any unavailable resolutions (because the GFX card or OS doesn't support it).&#xD;&#xA;&#xD;&#xA;You can further sub-filter those modes to exclude any you don't support (for example if you don't support widescreen resolutions), but you certainly shouldn't be defining your own arbitrary list of resolutions and expecting them to map to the set which is actually available." />
  <row Id="5470" PostHistoryTypeId="6" PostId="2748" RevisionGUID="f4127fb0-b303-478d-83c6-fef2bf820a03" CreationDate="2010-08-16T08:59:51.067" UserId="741" Comment="edited tags" Text="&lt;pc&gt;&lt;resolution&gt;" />
  <row Id="5471" PostHistoryTypeId="2" PostId="2812" RevisionGUID="9b9aa857-806e-43bc-8520-7a3792bc2bac" CreationDate="2010-08-16T09:55:06.207" UserId="908" Text="On the Mac you can only use Hiero ([http://slick.cokeandcode.com/demos/hiero.jnlp][1]) as far as I know. It is not as powerful as the above, but with a little bit of Photoshop magic it'll do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/demos/hiero.jnlp" />
  <row Id="5472" PostHistoryTypeId="2" PostId="2813" RevisionGUID="724e8bf8-3527-4fa1-9f9d-f8efffacb66b" CreationDate="2010-08-16T10:00:27.373" UserId="1716" Text="http://creators.xna.com/en-US/utilities/bitmapfontmaker is one, but its not cross platform as a tool." />
  <row Id="5473" PostHistoryTypeId="2" PostId="2814" RevisionGUID="f3fe5bce-84ef-40f4-9cc3-df8e47a02850" CreationDate="2010-08-16T10:13:44.043" UserId="1494" Text="Just as a friendly warning, any Googling on the subject will no doubt get you 100 000 hits on ROAM and related technologies (ROAM, Geo mip-mapping etc.). Keep well away from them, they are very CPU-bound.&#xD;&#xA;&#xD;&#xA;I have read here and there that 'brute force' can actually work; and have personal experience of it working better than any ROAM technologies that I implemented. Simply dividing the landscape and culling out portions of it worked brilliantly; as a proof-of-concept solution.&#xD;&#xA;&#xD;&#xA;Simple systems are always the best **first** implementation. If you don't have an in-house landscape engine make a simple one, continue with the rest of the game and come back to other ideas later. Landscapes are fun to implement (because you get such varied results for very simple changes) and a typical developer will get distracted by this puzzle for far too long.&#xD;&#xA;&#xD;&#xA;Once you have your game laid out; [Neverender][1] is right on the mark.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9/whats-the-newest-trend-method-for-terrain-rendering/256#256" />
  <row Id="5478" PostHistoryTypeId="2" PostId="2817" RevisionGUID="e3ebbd58-abec-4554-b6f8-82ce4d3c2f30" CreationDate="2010-08-16T11:23:20.457" UserId="1091" Text="The existing answers give a lot of information.&#xD;&#xA;&#xD;&#xA;I also gave a talk a couple of years back on how the terrain system in PhyreEngine works.  It's PS3 oriented, but actually fairly similar to the Halo Wars technique in many ways - we also have full 3D displacement, and indeed can handle &quot;bridges&quot; (i.e. complex topologies). This is available here:&#xD;&#xA;&#xD;&#xA;[http://www.technology.scee.net/presentations][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.technology.scee.net/presentations&#xD;&#xA;" />
  <row Id="5479" PostHistoryTypeId="5" PostId="2727" RevisionGUID="e9de5914-862c-4bc0-bf66-256066c9e777" CreationDate="2010-08-16T13:57:00.093" UserId="430" Comment="added 575 characters in body; added 19 characters in body" Text="For example, suppose my code can determine that upstream bandwidth is unusually limited.  And suppose I'm using a fully-connected mesh topology combined with a UDP-like protocol for voice chat.  Is there an established way to reduce the risk of packet loss so that the voice playback will either be solid or muted, but not jittery or choppy?  This must be a solved problem in the VoIP world, but I'm not sure where to look.&#xD;&#xA;&#xD;&#xA;EDIT: To clarify my abuse of the term jitter: I mean, if two UDP voice packets arrive out of order, the audio would sound jittery in a colloquial sense (i.e. I mean packet jitter, not audio signal displacement).  The choppy sound I'm referring to is related, where a UDP packet is lost instead of arriving late and causes a gap or jump in the audio.&#xD;&#xA;&#xD;&#xA;When I refer to muting the playback, I don't mean as a function of source input to avoid background noise.  I mean on the receiving end of the conversation, if there's high packet loss, just stop playback instead of playing choppy audio." />
  <row Id="5484" PostHistoryTypeId="2" PostId="2819" RevisionGUID="cd120e48-e942-4db9-8e15-9bb414057105" CreationDate="2010-08-16T15:04:15.580" UserId="1607" Text="I am having trouble with a camera class I am trying to use in my program. When I change the camera_target of the gluLookAt call, my whole terrain is rotating instead of just the camera rotating like it should.&#xD;&#xA;&#xD;&#xA;Here is some code from my render method:&#xD;&#xA;&#xD;&#xA;    camera-&gt;Place();&#xD;&#xA; &#xD;&#xA;        ofSetColor(255, 255, 255, 255);&#xD;&#xA; &#xD;&#xA;     //draw axis lines&#xD;&#xA;     //x-axis&#xD;&#xA;     glBegin(GL_LINES);&#xD;&#xA;     glColor3f(1.0f,0.0f,0.0f);&#xD;&#xA;     glVertex3f(0.0f,0.0f,0.0f);&#xD;&#xA;     glVertex3f(100.0f, 0.0f,0.0f);&#xD;&#xA;     glEnd();&#xD;&#xA; &#xD;&#xA;     //y-axis&#xD;&#xA;     glBegin(GL_LINES);&#xD;&#xA;     glColor3f(0.0f,1.0f,0.0f);&#xD;&#xA;     glVertex3f(0.0f,0.0f,0.0f);&#xD;&#xA;     glVertex3f(0.0f, 100.0f,0.0f);&#xD;&#xA;     glEnd();&#xD;&#xA; &#xD;&#xA;     //z-axis&#xD;&#xA;     glBegin(GL_LINES);&#xD;&#xA;     glColor3f(0.0f,0.0f,1.0f);&#xD;&#xA;     glVertex3f(0.0f,0.0f,0.0f);&#xD;&#xA;     glVertex3f(0.0f, 0.0f,100.0f);&#xD;&#xA;     glEnd();&#xD;&#xA; &#xD;&#xA;     glColor3f(1,1,1);&#xD;&#xA; &#xD;&#xA;     terrain-&gt;Draw();&#xD;&#xA; &#xD;&#xA;And the rotate and place methods from my camera class:&#xD;&#xA;&#xD;&#xA;    void Camera::RotateCamera(float h, float v){&#xD;&#xA;    hRadians += h;&#xD;&#xA;    vRadians += v;&#xD;&#xA; &#xD;&#xA;    cam_target.y = cam_position.y+(float)(radius*sin(vRadians));&#xD;&#xA;    cam_target.x = cam_position.x+(float)(radius*cos(vRadians)*cos(hRadians));&#xD;&#xA;    cam_target.z = cam_position.z+(float)(radius*cos(vRadians)*sin(hRadians));&#xD;&#xA;    &#xD;&#xA;    cam_up.x = cam_position.x-cam_target.x;&#xD;&#xA;    cam_up.y = ABS(cam_position.y+(float)(radius*sin(vRadians+PI/2))) ;&#xD;&#xA;    cam_up.z = cam_position.z-cam_target.z;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void Camera::Place() {&#xD;&#xA;    //position, camera target, up vector&#xD;&#xA;    gluLookAt(cam_position.x, cam_position.y, cam_position.z, cam_target.x, cam_target.y, cam_target.z, cam_up.x, cam_up.y, cam_up.z);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem is that the whole terrain is moving around the camera, whereas the camera should just be rotating.&#xD;&#xA;&#xD;&#xA;Thanks for any help!" />
  <row Id="5485" PostHistoryTypeId="1" PostId="2819" RevisionGUID="cd120e48-e942-4db9-8e15-9bb414057105" CreationDate="2010-08-16T15:04:15.580" UserId="1607" Text="Camera rotation (OpenGL)" />
  <row Id="5486" PostHistoryTypeId="3" PostId="2819" RevisionGUID="cd120e48-e942-4db9-8e15-9bb414057105" CreationDate="2010-08-16T15:04:15.580" UserId="1607" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="5487" PostHistoryTypeId="2" PostId="2820" RevisionGUID="ca6b92a2-9680-44a2-b46d-c1974726bfe4" CreationDate="2010-08-16T15:26:46.430" UserId="1091" Text="Are you actually setting the identity matrix at any point?&#xD;&#xA;" />
  <row Id="5488" PostHistoryTypeId="5" PostId="2820" RevisionGUID="ee7dcceb-247d-416d-b4b8-1a6b2abca595" CreationDate="2010-08-16T15:33:53.690" UserId="1091" Comment="added 59 characters in body" Text="Are you actually setting the identity matrix at any point?&#xD;&#xA;&#xD;&#xA;What other matrix ops are happening, and in what order?&#xD;&#xA;" />
  <row Id="5489" PostHistoryTypeId="2" PostId="2821" RevisionGUID="30d0ed01-7fac-40af-b3f0-59167a5cd435" CreationDate="2010-08-16T17:06:11.827" UserId="1597" Text="From your code it looks as though your camera is stationary (cam_position doesn't change) and you just change cam_target. This will have the effect of spinning your camera around on the spot. If the only thing in your scene is your terrain then it might appear as though the terrain is rotating around the camera. Are you trying to rotate the camera around the terrain? In that case your camera target should be the center of the terrain and you should be changing cam_position to move the camera. &#xD;&#xA;&#xD;&#xA;Try initializing cam_target to the terrain position and then in the lines where you currently update cam_target swap cam_target and cam_position:&#xD;&#xA;&#xD;&#xA;    cam_position.y = cam_target.y+(float)(radius*sin(vRadians));&#xD;&#xA;    cam_position.x = cam_target.x+(float)(radius*cos(vRadians)*cos(hRadians));&#xD;&#xA;    cam_position.z = cam_target.z+(float)(radius*cos(vRadians)*sin(hRadians));&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5490" PostHistoryTypeId="2" PostId="2822" RevisionGUID="c79e4da2-7673-49e9-abc6-f3c99d968775" CreationDate="2010-08-16T17:13:04.670" UserId="525" Text="Remember that bandwidth limitations and the texture cache also come into play. Use as few samplers as you can, then ask if you can use one less." />
  <row Id="5493" PostHistoryTypeId="2" PostId="2824" RevisionGUID="0d91a6f6-3d37-4fd5-8ecc-f8ac5c7843a0" CreationDate="2010-08-16T17:54:37.307" UserId="852" Text="I'm curious as to what the best method for sketching out and prototyping a map is, and if there are any tools available to facilitate this.&#xD;&#xA;&#xD;&#xA;Pen and paper is probably a good place to start, but I would like to know if there are any worthwhile tools to look into, something akin to a UI mock up tool like [Balsamiq][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.balsamiq.com/products/mockups" />
  <row Id="5494" PostHistoryTypeId="1" PostId="2824" RevisionGUID="0d91a6f6-3d37-4fd5-8ecc-f8ac5c7843a0" CreationDate="2010-08-16T17:54:37.307" UserId="852" Text="Best Way to Sketch Out a Map" />
  <row Id="5495" PostHistoryTypeId="3" PostId="2824" RevisionGUID="0d91a6f6-3d37-4fd5-8ecc-f8ac5c7843a0" CreationDate="2010-08-16T17:54:37.307" UserId="852" Text="&lt;tools&gt;&lt;maps&gt;" />
  <row Id="5496" PostHistoryTypeId="2" PostId="2825" RevisionGUID="d388e8d1-8ce8-4360-b0ae-c1786e8075c7" CreationDate="2010-08-16T18:04:04.290" UserId="1597" Text="You could try [Google Sketchup][1]. I worked at a place where the designers used this to create block models for maps that the artists would then use as reference. A block model is a very basic, untextured version of a map used to test and develop the layout of a map. I think they were importing these models into UnrealEd as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sketchup.google.com/" />
  <row Id="5497" PostHistoryTypeId="2" PostId="2826" RevisionGUID="f0d97406-abab-434b-9351-30695da11dc0" CreationDate="2010-08-16T18:11:02.653" UserId="744" Text="Don't blow off pencil and paper so quickly. It iterates faster than any tool lets you, never crashes, and every one of your developers can read it.&#xD;&#xA;&#xD;&#xA;Also, I've heard great things about Legos." />
  <row Id="5498" PostHistoryTypeId="2" PostId="2827" RevisionGUID="59865b8b-43a5-4150-ba9b-e644e8a2b42f" CreationDate="2010-08-16T18:26:13.403" UserId="1199" Text="[MS Paint][1] have done wonders for me during the years (if you're on a windows computer and don't mind digital art).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Ms_paint" />
  <row Id="5499" PostHistoryTypeId="2" PostId="2828" RevisionGUID="b8ff1d58-65ea-40e7-9695-668aa0ffbe8c" CreationDate="2010-08-16T18:44:39.670" UserId="14" Text="It depends on how many levels you have between initial concept and final map rendering. The process I like most goes a bit like this:&#xD;&#xA;&#xD;&#xA;If I am working with a writer, or someone who would intimately know more about how the world should be put together than me. I give them a nice entry tool to use, something that allows them to convey their ideas to me in something other than endless paragraphs. The tool I use for this is AutoRealm: http://autorealm.sourceforge.net/&#xD;&#xA;&#xD;&#xA;I like this, more than letting them just turn in pencil / pen sketches for a number of reasons.&#xD;&#xA;&#xD;&#xA; - It's digital.&#xD;&#xA;  - I like this the most, because if they mess up Ctrl+Z is handy. No nasty erasures.&#xD;&#xA; - It's pretty. (if they spend more than a few seconds working with it)&#xD;&#xA; - It lets them plot places of interest and comment them.&#xD;&#xA;&#xD;&#xA;From there, I take out my tablet and draw my own notes over the map (in art-editing tool of choice).&#xD;&#xA;&#xD;&#xA; - What needs prototype models.&#xD;&#xA; - My idea of how the level will flow&#xD;&#xA; - What I am vetoing&#xD;&#xA; - What needs improving / can be expanded for dramatic effect.&#xD;&#xA; - What is frill (just pretty &amp; terrain) and what is important (stuff I want to test)&#xD;&#xA;&#xD;&#xA;So whomever is doing the terrain gets those files, and I start making quick proto-models in sketchup. I don't focus on getting anything perfect, because frankly someone can do it better and speed / execution of concept in prototyping are my goals.&#xD;&#xA;&#xD;&#xA;And that is my path from Sketching -&gt; Prototyping.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;##tl;dr##&#xD;&#xA;&lt;sup&gt;So you like-a the lists?&lt;/sup&gt;&#xD;&#xA;&#xD;&#xA;AutoRealm for quick digital map sketching&#xD;&#xA;&#xD;&#xA;Sketchup for Quick Building Prototyping." />
  <row Id="5500" PostHistoryTypeId="2" PostId="2829" RevisionGUID="0e195584-64c1-4727-a359-82e510723b20" CreationDate="2010-08-16T20:32:47.773" UserId="370" Text="What is a good texture packing algorithm?  Technically, [bin packing][1] is [NP-hard][2], so a heuristic is what I'm really after.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bin_packing_problem&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/NP-hard" />
  <row Id="5501" PostHistoryTypeId="1" PostId="2829" RevisionGUID="0e195584-64c1-4727-a359-82e510723b20" CreationDate="2010-08-16T20:32:47.773" UserId="370" Text="Texture packing algorithm" />
  <row Id="5502" PostHistoryTypeId="3" PostId="2829" RevisionGUID="0e195584-64c1-4727-a359-82e510723b20" CreationDate="2010-08-16T20:32:47.773" UserId="370" Text="&lt;algorithm&gt;&lt;textures&gt;" />
  <row Id="5503" PostHistoryTypeId="2" PostId="2830" RevisionGUID="e2269613-decd-4580-9cdc-1ad6683a1635" CreationDate="2010-08-16T20:47:58.033" UserId="678" Text="Personally, I just use a greedy largest-block-that-fits first system. It's not optimal, but it does the trick OK.&#xD;&#xA;&#xD;&#xA;Note that, if you have a reasonable amount of texture blocks, you can exhaustively search the best ordering even if the problem itself is NP. " />
  <row Id="5504" PostHistoryTypeId="2" PostId="2831" RevisionGUID="6e909aab-ef87-45bc-aee6-756de89bd394" CreationDate="2010-08-16T20:49:25.927" UserId="452" Text="You guessed correctly that programmers are both in intensely high demand and full of their own projects. Your options are:&#xD;&#xA;&#xD;&#xA; 1. Offer to help a project of theirs&#xD;&#xA;    in exchange for them doing&#xD;&#xA;    programming for one of yours; &#xD;&#xA;    &#xD;&#xA; 2. Have a fantastic idea no&#xD;&#xA;    programmer would ever be able to&#xD;&#xA;    deny (this never happens);&#xD;&#xA;    &#xD;&#xA; 3. Get a student programmer that&#xD;&#xA;    doesn't quite realize how the system&#xD;&#xA;    works yet;&#xD;&#xA;    &#xD;&#xA; 4. Open your wallet.&#xD;&#xA;&#xD;&#xA;Remember that programmers are usually the ones most in tune with how long a project really will take. If no programmers are biting your hook, it's likely your project is not as feasible as you guessed." />
  <row Id="5505" PostHistoryTypeId="2" PostId="2832" RevisionGUID="76329415-09ff-40a2-899d-672a6545f1da" CreationDate="2010-08-16T21:05:47.413" UserId="370" Text="This question has seen significant discussion on the Box2D forums.  Reading though the discussions about character movement, jumping, or platformer and you'll come across every possible issue.  However, the issue got complicated enough that the collision filtering system was updated and a Test Bed example created solely to show how it should be done.&#xD;&#xA;&#xD;&#xA; * Use [Box2D][1]&#xD;&#xA; * Follow the [Character Collision TestBed][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/&#xD;&#xA;  [2]: http://code.google.com/p/box2d/source/browse/trunk/Box2D/Testbed/Tests/CharacterCollision.h" />
  <row Id="5506" PostHistoryTypeId="2" PostId="2833" RevisionGUID="feb99f3e-8e6d-467a-af80-991edf83b76e" CreationDate="2010-08-16T21:12:42.550" UserId="1734" Text="Since graphic designers/end users are not programmers, what are the technique to allow them to add new tasks or change application logic in a game? what are the end user tools? I want some popular examples." />
  <row Id="5507" PostHistoryTypeId="1" PostId="2833" RevisionGUID="feb99f3e-8e6d-467a-af80-991edf83b76e" CreationDate="2010-08-16T21:12:42.550" UserId="1734" Text="Tools for non-programmers to add new tasks to games" />
  <row Id="5508" PostHistoryTypeId="3" PostId="2833" RevisionGUID="feb99f3e-8e6d-467a-af80-991edf83b76e" CreationDate="2010-08-16T21:12:42.550" UserId="1734" Text="&lt;programming&gt;&lt;scripting&gt;" />
  <row Id="5509" PostHistoryTypeId="2" PostId="2834" RevisionGUID="876495d0-9b1d-4569-8c26-3e47194ebb9b" CreationDate="2010-08-16T21:13:17.370" UserId="1091" Text="Something I've used, which works well even for irregular UV maps, is to turn the UV patch into a bitmap mask, and maintain a mask for the texture itself, searching for the first position the UV patch will fit into. I order the blocks according to some simple heuristic (height, width, size, whatever), and I allow rotations of the blocks to minimise or maximise the chosen heuristic. That gives a manageable search-space for brute force.&#xD;&#xA;&#xD;&#xA;If you can then iterate that trying several heuristics, and/or apply a random factor in choosing the ordering and iterate until some time limit runs out.&#xD;&#xA;&#xD;&#xA;With this scheme you'll get small UV islands packed into the gaps made by large ones, and even in holes left within single UV patches themselves.&#xD;&#xA;" />
  <row Id="5510" PostHistoryTypeId="2" PostId="2835" RevisionGUID="d27ae1d7-be51-47b9-aea3-173b0795aa59" CreationDate="2010-08-16T21:19:39.747" UserId="1091" Text="Various scripting languages, both text-based (ones with simple syntax - LUA for example - can be more accessible for a non-programmer), and graphical (Unreal, for example, is very GUI oriented).&#xD;&#xA;&#xD;&#xA;Alternatively I've seen people just expose tweakable stuff through an editable text file (sometimes a CSV formatted file usable in Excel), if you expose the right stuff you can give designers fairly powerful abilities to change the game, without them having to actually alter the logic.&#xD;&#xA;&#xD;&#xA;Basically the tools I've seen being used are:&#xD;&#xA;&#xD;&#xA;- Notepad, or other text editor.&#xD;&#xA;- Excel.&#xD;&#xA;- Some ad-hoc graphical interface to a scripting language, sometimes in-game.&#xD;&#xA;" />
  <row Id="5511" PostHistoryTypeId="2" PostId="2836" RevisionGUID="ed3edd02-c336-4575-8b78-59002d8f7669" CreationDate="2010-08-17T03:54:21.970" UserId="1021" Text="I recently purchased some short (approx 3 min) background music tracks.  I have the tracks in three formats: AIFF, MP3 and WAV.  How can I compress these files such that the quality remains intact (for the most part) and the file size is relatively small?&#xD;&#xA;&#xD;&#xA;I'm especially interested in the &quot;before&quot; and &quot;after&quot; file formats.  So far I've tried compressing the **MP3** format to **m4a**.  This reduced the file size substantially... however the quality was significantly degraded.&#xD;&#xA;&#xD;&#xA;I'm definitely open to reducing the tracks to much shorter (approx 20 sec) loops.  Also note these background music tracks will be used on the iPhone (need to support back to the 3G).  I have access to Logic Express 9 and Garage Band... and I'm open to trying Audacity or other software.&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="5512" PostHistoryTypeId="1" PostId="2836" RevisionGUID="ed3edd02-c336-4575-8b78-59002d8f7669" CreationDate="2010-08-17T03:54:21.970" UserId="1021" Text="How can I make &quot;small&quot; (file size) background music loops/tracks?" />
  <row Id="5513" PostHistoryTypeId="3" PostId="2836" RevisionGUID="ed3edd02-c336-4575-8b78-59002d8f7669" CreationDate="2010-08-17T03:54:21.970" UserId="1021" Text="&lt;iphone&gt;&lt;audio&gt;" />
  <row Id="5514" PostHistoryTypeId="2" PostId="2837" RevisionGUID="45af8fb9-cff2-41a8-a949-d1c86dd37286" CreationDate="2010-08-17T04:01:11.000" UserId="647" Text="WAV to MP3 should give you about 11:1 compression. I think Ogg Vorbis is pretty much the same. The difference in quality should not be noticable by the human ear. This compression ratio is pretty good. At a decent quality, 20-second loops won't come out over 1MB (I think). There's plenty of open source software that can get your files from raw to ogg." />
  <row Id="5515" PostHistoryTypeId="2" PostId="2838" RevisionGUID="39e3f721-c6dc-48e6-9be3-a34280415488" CreationDate="2010-08-17T04:01:35.587" UserId="189" Text="You can **reduce the [bitrate][1]**; this is most likely what you did (without knowing) when you moved to m4a. This has a direct effect on filesize but does quickly fall off in quality. The bitrate is the number of bits per second that the music plays; as you can imagine, if you allow it a higher bitrate or a higher number of bits per second, it will use those bits to represent more detail in the music and so the music will sound better. It's perhaps synonymous to &quot;resolution&quot; of an image (but if you kept the image the same physical size).&#xD;&#xA;&#xD;&#xA;You might also **try the ogg ([Ogg Vorbis][2]) format**, it's an open format that is supposed to compress pretty well, certainly better than mp3 but I don't know how it compares to m4a.&#xD;&#xA;&#xD;&#xA;Finally, you can try **switching the tracks to mono**; this will halve their size. You can then perhaps use an algorithm to dynamically &quot;spread&quot; it back out to stereo in realtime. Typically, however, this makes it sound pretty terrible. Try it and see what you think.&#xD;&#xA;&#xD;&#xA;In any case, **don't use WAV or AIFF files**; they store raw, uncompressed audio waves. You absolutely want to go with a compressed format such as mp3, m4a, wma (yuck) or ogg.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bitrate&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Ogg_Vorbis" />
  <row Id="5516" PostHistoryTypeId="2" PostId="2839" RevisionGUID="0976acc8-d7c1-4c27-bc29-b5f9142d01ca" CreationDate="2010-08-17T05:54:29.950" UserId="323" Text="I spent a few months at one job coming up with a better texture packing algorithm.&#xD;&#xA;&#xD;&#xA;The algorithm we started with was simple. Collect all the input items. Sort them by total pixels consumed, large-to-small. Lay them out in your texture in scanline order, just testing stuff from the topleft pixel to the topright pixel, moving down a line, and repeating.&#xD;&#xA;&#xD;&#xA;You either need to hardcode a width or come up with another heuristic for this - our algorithm would start at 128, then increase by 128s until it came up with a result that wasn't any deeper than it was wide.&#xD;&#xA;&#xD;&#xA;So, we had that algorithm, and I decided to improve it. I tried a bunch of wacky heuristics - trying to find objects that fit together, doing some weighting over a bunch of desired space packing properties, rotating and flipping. After all my work, quite literally three months of work, I ended up saving 3% space.&#xD;&#xA;&#xD;&#xA;Yeah. 3%.&#xD;&#xA;&#xD;&#xA;And after we ran our compression routine over it, it actually ended up *larger* (which I still can't explain) so we threw the entire thing out and went back to the old algorithm.&#xD;&#xA;&#xD;&#xA;Sort items, jam into texture in scanline order. There's your algorithm. It's easy to code, fast to run, and you won't get much better without an amazing amount of work. That work just isn't worthwhile unless your company is at *least* 50 people large, and probably more.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;And as a side note, I just implemented this algorithm (fixed width 512 pixels) for quite literally the exact same application that you're doing. Here's the result. It looks blurry because mine is using Valve's [distance-field based text rendering algorithm][2]. Obviously, there's not a lot of empty space left over, and it does a good job of cramming things into open spots.&#xD;&#xA;&#xD;&#xA;All the code for this is BSD-licensed and available [at github][3] ([actual packing code file][4]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/e1Gal.png&#xD;&#xA;  [2]: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&#xD;&#xA;  [3]: http://github.com/zorbathut/glorp&#xD;&#xA;  [4]: http://github.com/zorbathut/glorp/blob/master/font_baker.cpp" />
  <row Id="5517" PostHistoryTypeId="5" PostId="2839" RevisionGUID="d17d49bc-62bb-4dd9-a587-065c274f0721" CreationDate="2010-08-17T06:06:23.170" UserId="323" Comment="added 49 characters in body" Text="I spent a few months at one job coming up with a better texture packing algorithm.&#xD;&#xA;&#xD;&#xA;The algorithm we started with was simple. Collect all the input items. Sort them by total pixels consumed, large-to-small. Lay them out in your texture in scanline order, just testing stuff from the topleft pixel to the topright pixel, moving down a line, and repeating.&#xD;&#xA;&#xD;&#xA;You either need to hardcode a width or come up with another heuristic for this - our algorithm would start at 128, then increase by 128s until it came up with a result that wasn't any deeper than it was wide.&#xD;&#xA;&#xD;&#xA;So, we had that algorithm, and I decided to improve it. I tried a bunch of wacky heuristics - trying to find objects that fit together, doing some weighting over a bunch of desired space packing properties, rotating and flipping. After all my work, quite literally three months of work, I ended up saving 3% space.&#xD;&#xA;&#xD;&#xA;Yeah. 3%.&#xD;&#xA;&#xD;&#xA;And after we ran our compression routine over it, it actually ended up *larger* (which I still can't explain) so we threw the entire thing out and went back to the old algorithm.&#xD;&#xA;&#xD;&#xA;Sort items, jam into texture in scanline order. There's your algorithm. It's easy to code, fast to run, and you won't get much better without an amazing amount of work. That work just isn't worthwhile unless your company is at *least* 50 people large, and probably more.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;And as a side note, I just implemented this algorithm (fixed width 512 pixels) for quite literally the exact same application that you're doing (no ftgles, but opengl-rendered freetype glyphs.) Here's the result. It looks blurry because mine is using Valve's [distance-field based text rendering algorithm][2]. Obviously, there's not a lot of empty space left over, and it does a good job of cramming things into open spots.&#xD;&#xA;&#xD;&#xA;All the code for this is BSD-licensed and available [at github][3] ([actual packing code file][4]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/e1Gal.png&#xD;&#xA;  [2]: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&#xD;&#xA;  [3]: http://github.com/zorbathut/glorp&#xD;&#xA;  [4]: http://github.com/zorbathut/glorp/blob/master/font_baker.cpp" />
  <row Id="5518" PostHistoryTypeId="2" PostId="2840" RevisionGUID="6c4589ab-3547-4ee7-b8ad-019ab6e7c8d9" CreationDate="2010-08-17T06:11:38.370" UserId="323" Text="While this is of dubious value with your actual situation, the best way to make small background music is to use a MOD-style format. These are formats that contain a small number of sound samples and the music in a note-by-note format, rather than a gigantic waveform that's been compressed to squeeze space out.&#xD;&#xA;&#xD;&#xA;Check out the S3M and XM formats, as well as the original venerable MOD format.&#xD;&#xA;&#xD;&#xA;Sadly, there's no practical way to convert MP3 into MOD besides paying someone to do it by hand, and even then you may lose music effects as you're limited by the technical abilities of the format and the player." />
  <row Id="5519" PostHistoryTypeId="2" PostId="2841" RevisionGUID="9dd527b5-c79d-49ae-8974-7c9bf9fc2579" CreationDate="2010-08-17T06:16:10.623" UserId="323" Text="[Here is an extremely detailed Sonic The Hedgehog physics guide][1]. I would recommend reading it over, if not actually copying parts of it mostly-verbatim.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://info.sonicretro.org/Sonic_Physics_Guide" />
  <row Id="5520" PostHistoryTypeId="5" PostId="2839" RevisionGUID="ebf53a8f-3265-4be4-98ce-d63778f92cf0" CreationDate="2010-08-17T06:32:48.983" UserId="323" Comment="added 56 characters in body" Text="I spent a few months at one job coming up with a better texture packing algorithm.&#xD;&#xA;&#xD;&#xA;The algorithm we started with was simple. Collect all the input items. Sort them by total pixels consumed, large-to-small. Lay them out in your texture in scanline order, just testing stuff from the topleft pixel to the topright pixel, moving down a line, and repeating.&#xD;&#xA;&#xD;&#xA;You either need to hardcode a width or come up with another heuristic for this - our algorithm would start at 128, then increase by 128s until it came up with a result that wasn't any deeper than it was wide.&#xD;&#xA;&#xD;&#xA;So, we had that algorithm, and I decided to improve it. I tried a bunch of wacky heuristics - trying to find objects that fit together, doing some weighting over a bunch of desired space packing properties, rotating and flipping. After all my work, quite literally three months of work, I ended up saving 3% space.&#xD;&#xA;&#xD;&#xA;Yeah. 3%.&#xD;&#xA;&#xD;&#xA;And after we ran our compression routine over it, it actually ended up *larger* (which I still can't explain) so we threw the entire thing out and went back to the old algorithm.&#xD;&#xA;&#xD;&#xA;Sort items, jam into texture in scanline order. There's your algorithm. It's easy to code, fast to run, and you won't get much better without an amazing amount of work. That work just isn't worthwhile unless your company is at *least* 50 people large, and probably more.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;And as a side note, I just implemented this algorithm (fixed width 512 pixels) for quite literally the exact same application that you're doing (no ftgles, but opengl-rendered freetype glyphs.) Here's the result. It looks blurry because mine is using Valve's [distance-field based text rendering algorithm][2], which also accounts for the extra space between glyphs. Obviously, there's not a lot of empty space left over, and it does a good job of cramming things into open spots.&#xD;&#xA;&#xD;&#xA;All the code for this is BSD-licensed and available [at github][3] ([actual packing code file][4]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/e1Gal.png&#xD;&#xA;  [2]: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&#xD;&#xA;  [3]: http://github.com/zorbathut/glorp&#xD;&#xA;  [4]: http://github.com/zorbathut/glorp/blob/master/font_baker.cpp" />
  <row Id="5521" PostHistoryTypeId="5" PostId="2837" RevisionGUID="6cb0a917-db7a-4965-8c09-66c20b598178" CreationDate="2010-08-17T07:07:00.223" UserId="647" Comment="added 440 characters in body" Text="WAV to MP3 should give you about 11:1 compression. I think Ogg Vorbis is pretty much the same. The difference in quality should not be noticable by the human ear. This compression ratio is pretty good. At a decent quality, 20-second loops won't come out over 1MB (I think). There's plenty of open source software that can get your files from raw to ogg.&#xD;&#xA;&#xD;&#xA;**EXTENDED ANSWER**&#xD;&#xA;&#xD;&#xA;I am extending my answer by recommending you compress the raw audio to Ogg format. This can be done really easily with open source tools or you can write your own converter with the Vorbis encoding library (it's free!). Streaming Ogg files with OpenAL should be perfectly viable on the iPhone. &#xD;&#xA;&#xD;&#xA;I subscribe to the OpenAL mailing list there've been quite a few questions relating to OpenAL on the iPhone lately." />
  <row Id="5522" PostHistoryTypeId="2" PostId="2842" RevisionGUID="8ee78f37-d4a4-47ef-bed4-7c02915dd715" CreationDate="2010-08-17T07:33:23.577" UserId="1740" Text="As with most design-related things, I would argue that there is no &quot;best way&quot; to design maps either. You should really just experiment with different tools. But I'll share what worked for me (your mileage may vary).&#xD;&#xA;&#xD;&#xA;Personally, I find that tool to use varies on my mood. Sometimes I'll do pen-and-paper sketches. Other times (especially when I want to share my designs over IM), I end up doodling in a paint program. Sometimes, I'll open up a map editor like [tiled][1] (or sometimes other poorly-written editors that have lots bugs and I wouldn't recommend to anyone like maped3 but which I have great familiarity with) and use some placeholder tile art, which I gradually refine into a real map with useful tiles (not as useful for more involved maps that are not 2D, however -- but might be a starting point to get a rough layout).&#xD;&#xA;&#xD;&#xA;If I'm not in a terribly visual mood, I might even just open up a plain-text editor and describe an area in writing. I've occasionally found myself just plotting out an area in ASCII art. The particulars will be better sorted out when I actually feel like crafting a complete map.&#xD;&#xA;&#xD;&#xA;Some people might enjoy using 3D modeling tools, but I personally find them too involved and time-consuming. And I don't feel this sort of encumbrance when doing 2D sketches and tilemaps. After all, these are temporaries, and world designs are likely to change after they've work into a playable prototype.&#xD;&#xA;&#xD;&#xA;(Similarly, I probably wouldn't use a specialized prototyping tool for deciding a user interface. I would draw it out by hand, scribble in a paint program, fire up a detailed mockup from the get-go, or possibly even defer the interface specifics until I have coded an unstructured but working prototype.)&#xD;&#xA;&#xD;&#xA;However, find whatever works for you. Keep trying new things, going with what suits your current mood, and while you may never find the &quot;best&quot; method, you'll find something functional, and that lets you at least make steady progress.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mapeditor.org" />
  <row Id="5523" PostHistoryTypeId="5" PostId="2842" RevisionGUID="ef578eab-35a3-4874-9fa7-06f98db7ac55" CreationDate="2010-08-17T07:43:03.957" UserId="1740" Comment="added 43 characters in body" Text="As with most design-related things, I would argue that there is no &quot;best way&quot; to design maps either. You should really just experiment with different tools. But I'll share what worked for me (your mileage may vary).&#xD;&#xA;&#xD;&#xA;Personally, I find that tool to use varies on my mood. Sometimes I'll do pen-and-paper sketches. Other times (especially when I want to share my designs over IM), I end up doodling in a paint program. Sometimes, I'll open up a map editor like [tiled][1] (or sometimes other poorly-written editors that have lots bugs and I wouldn't recommend to anyone like maped3 but which I have great familiarity with) and use some placeholder tile art, which I gradually refine into a real map with useful tiles (not as useful for more involved maps that are not 2D, however -- but might be a starting point to get a rough layout).&#xD;&#xA;&#xD;&#xA;If I'm not in a terribly visual mood, I might even just open up a plain-text editor and describe an area in writing. I've occasionally found myself just plotting out an area in ASCII art. The particulars will be better sorted out when I actually feel like crafting a complete map.&#xD;&#xA;&#xD;&#xA;Some people might enjoy using 3D modeling tools, but I personally find them too involved and time-consuming. And I don't feel this sort of encumbrance when doing 2D sketches and tilemaps. After all, these are temporaries, and world designs are likely to change after they've work into a playable prototype.&#xD;&#xA;&#xD;&#xA;(Similarly, I probably wouldn't use a specialized prototyping tool for deciding a user interface. But I do use other options. I could draw it out by hand. Perhaps I'd scribble in a paint program. Maybe fire up a detailed mockup from the get-go. Possibly even defer the interface specifics until I have coded an unstructured but working prototype.)&#xD;&#xA;&#xD;&#xA;However, find whatever works for you. Keep trying new things, going with what suits your current mood, and while you may never find the &quot;best&quot; method, you'll find something functional, and that lets you at least make steady progress.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mapeditor.org" />
  <row Id="5524" PostHistoryTypeId="2" PostId="2843" RevisionGUID="26325868-7d1e-427f-a01f-38d3d66dfb95" CreationDate="2010-08-17T08:09:44.283" UserId="1219" Text="In the industry, people with various skills and talents all work together on a team. They are most often specialised in their field.&#xD;&#xA;&#xD;&#xA;However, this is unpractical for a hobbyist team. All people in such a team need some skill in various fields and people have to wear many heads. Which skills are crucial for an average hobbyist team (without taking any game specific details into account)? Detail some tasks that people with such a skill would be required to do. What other skills are usefull but not necessary? Are there any skills that can more easily be combined (for example, the game designer can more easily do the marketing then an artist?).&#xD;&#xA;&#xD;&#xA;A good answer to this question can be used to complete a team, based on missing skillsets or available time of current teammembers, or just to get more insight of the dynamics of a hobbyist team." />
  <row Id="5525" PostHistoryTypeId="1" PostId="2843" RevisionGUID="26325868-7d1e-427f-a01f-38d3d66dfb95" CreationDate="2010-08-17T08:09:44.283" UserId="1219" Text="What skills does a hobbyist gamedev team need?" />
  <row Id="5526" PostHistoryTypeId="3" PostId="2843" RevisionGUID="26325868-7d1e-427f-a01f-38d3d66dfb95" CreationDate="2010-08-17T08:09:44.283" UserId="1219" Text="&lt;hobby-development&gt;" />
  <row Id="5527" PostHistoryTypeId="2" PostId="2844" RevisionGUID="76040203-81ad-4be1-bd13-3440287562d5" CreationDate="2010-08-17T08:29:03.207" UserId="1740" Text="Personally, I use a variation of variable time-step (which is sort of a hybrid of fixed and variable I think). I stress tested this timing system in several ways, and I find myself using it for many projects. Do I recommend it for everything? Probably not.&#xD;&#xA;&#xD;&#xA;My game loops calculate the amount of frames to update by (let's call this F), and then perform F discrete logic updates. Every logic update assumes a constant unit of time (which is often 1/100th of a second in my games). Each update is performed in sequence until all F discrete logic updates are performed.&#xD;&#xA;&#xD;&#xA;Why discrete updates in logic steps? Well, if you try and use continuous steps, and suddenly you have physics glitches because the calculated speeds and distances to travel are multiplied by a huge value of F.&#xD;&#xA;&#xD;&#xA;A poor implementation of this would just do F = current time - last frame time updates. But if calculations get too far behind (sometimes due to circumstances beyond your control like another process stealing CPU time), you will quickly see awful skipping. Quickly, that stable FPS you tried to maintain becomes SPF.&#xD;&#xA;&#xD;&#xA;In my game, I allow &quot;smooth&quot; (sort of) slowdown to restrict the amount of logic catchup that should be possible between two draws. I do this by clamping: F = min(F, MAX_FRAME_DELTA) which usually has MAX_FRAME_DELTA = 2/100 * s or 3/100 * s. So instead of skipping frames when too far behind game logic, discard any massive frame loss (which slows things down), recover a few frames, draw, and try again.&#xD;&#xA;&#xD;&#xA;By doing this, I also make sure that the player controls keep in closer sync with what is actually shown on the screen.&#xD;&#xA;&#xD;&#xA;Final product pseudocode is something like this (delta is F mentioned earlier):&#xD;&#xA;&#xD;&#xA;    // Assume timers have 1/100 s resolution&#xD;&#xA;    const MAX_FRAME_DELTA = 2&#xD;&#xA;    // Calculate frame gap.&#xD;&#xA;    var delta = current time - last frame time&#xD;&#xA;    // Clamp.&#xD;&#xA;    delta = min(delta, MAX_FRAME_RATE)&#xD;&#xA;    // Update in discrete steps&#xD;&#xA;    for(i = 0; i &lt; delta; i++)&#xD;&#xA;    {&#xD;&#xA;        update single step()&#xD;&#xA;    }&#xD;&#xA;    // Caught up again, draw.&#xD;&#xA;    render()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This sort of updating is not suitable for everything, but for arcade style games, I would much rather see the game slow down because there is a lot of stuff going on than miss frames and lose player control. I also prefer this to other variable-time step approaches which end up having irreproducible glitches caused by frame loss." />
  <row Id="5528" PostHistoryTypeId="2" PostId="2845" RevisionGUID="dc1f09df-23db-4ff0-982a-030bfea4eae1" CreationDate="2010-08-17T08:33:56.707" UserDisplayName="Choscura" Text="The best way I've found is to do a quick sketch of the traverseable area of the map on a white board, a sketch or two of what things should look like in different areas on paper, and a collection of 'useful parts' (anything from mechanical bits inside, say, a clocktower level to standard things that should all have the same size, eg, doors) are noted and if needed designed to whatever level of detail necessary (in some cad software, or sketchup will also work for this if the required detail is low enough).  Then it's just a matter of blocking out the area according to the runmap, filling in the 'dirt' (or other material that makes up the default 'filler') and from here I add all the details that were decided upon in the above steps- putting in buildings, sticking doors and windows on/in them, etc.  The last step to physically create the map in the game is to add 'doodads', little things that make your game more believable.  a good set of doodads I've found useful to include are power lines, garbage, graffiti, wall posters, and advertisements, in addition to broken bits from local materials in that particular area of a map, eg, a pile of broken bricks in an area where most of the buildings are brick, or a few broken tiles on the ground in an old public bathroom, etc." />
  <row Id="5529" PostHistoryTypeId="2" PostId="2846" RevisionGUID="7cce2fab-5d11-40cf-8730-135a6e06851b" CreationDate="2010-08-17T08:43:47.697" UserId="1738" Text="I was the TA for the graphics course at my university for several years.  I set the syllabus, and covered things like software rasterizations and shading, Java3D, OpenGL, etc.  Some time after this, in my own time I decided to write a ray-tracer for my own edification.  This was an incredible experience - with a frame buffer and a putpixel(x,y, color) routine, in 500 lines I had code to generate an image with spheres, triangles, per-pixel shading, shadows, etc.  If I had to redo the pracs for the courses, I would insist that the students do a ray-tracer.  It is way to easy to get caught up in the details of a scanline algorithm when building a rasterizer, or feel like you're working through a black box using a 3D API.  &#xD;&#xA;&#xD;&#xA;For quick, solid access to a graphics sandbox, I recommend writing your own ray-tracer.  Obviously, this is a far cry from what is commonly used in production real-time 3D graphics, but it is a really intuitive and compact way to see and learn the theory." />
  <row Id="5530" PostHistoryTypeId="2" PostId="2847" RevisionGUID="ecee6cfd-e1c7-4e6f-9169-96efce41af46" CreationDate="2010-08-17T09:00:53.053" UserId="1738" Text="I read a few papers and documents on GA.  It's pretty fun stuff, and presents interesting generalizations for various geometric mathematical structures.  I was particularly interested in it, because I wanted to see how they treated Pluecker coordinates.  My general feeling, is that if one can wrap ones head around it, it can provide an excellent alternate way of visualizing geometric operations, that this can lead to new insights, however, a lot of the time I feel like I am jumping through hoops to fit fairly simple concepts into the GA framework.  In terms of practicality, I think you will find that that doing something in GA generally has a simpler (but less generalizable) dual in another branch of mathematics, that will also require much fewer computational operations.&#xD;&#xA;&#xD;&#xA;I wouldn't call myself an expert on the topic, but I don't know of any case where it specifically has proved to be useful - it seems that you have most of the essential tool kit if you understand complex numbers, projective geometry, quaternions, pluecker coordinates and duality well.&#xD;&#xA;&#xD;&#xA;It's not really related to the post, but if you are interested in the mathematical, but practical side of geometry, books like Edelsbrunner's Combinatorial Geometry, Preparata and Shamos's Computational Geometry, and various other computational geometry books, would be interesting." />
  <row Id="5531" PostHistoryTypeId="2" PostId="2848" RevisionGUID="f78fb985-d663-4a98-ac9d-967a83685f2c" CreationDate="2010-08-17T09:14:39.083" UserId="908" Text="This question is a bit vague, so I can just give you some similarly vague answers.&#xD;&#xA;&#xD;&#xA;a) Many hats. There's no way that you'll have clearly separated roles. Some roles might be easy to assign to one and only one team member. Others will have to be shared. In our team of five (we're not hobbyists but a similarly small team) we've never managed to clearly assign roles because we're still too small for that.&#xD;&#xA;&#xD;&#xA;b) It all comes down to personal preference. If you're a game designer and more of the social kind of guy you might enjoy marketing. Maybe your game designer loves Twitter. Then he/she should definitely take over that PR aspect. Maybe she's good in English - she should write the PR texts then. Finding motivation for some tasks can get very hard in a hobbyist team. If you like what you do you'll be more easily motivated.&#xD;&#xA;&#xD;&#xA;c) Stay agile. Even if you find the perfect team, there are a number of roles you'll only need at certain phases of a project, e.g. a graphics artist and an audio designer. You can hire those or ask a friend to do it, but you can similarly find someone in your team who's into audio and have him mix your soundtrack and switch back to whatever he did before, afterwards.&#xD;&#xA;&#xD;&#xA;d) Persistent communication rules. Use something like basecamp and version control for everything. This way, people can easily reconnect to threads that were dismissed months ago, and keep their information up to date. Also, you can backtrace decisions and have everything documented. This is especially important if you work in a distributed team.&#xD;&#xA;&#xD;&#xA;e) Every project needs a different team. Since you don't tell what game you're working on I can't get very specific. But given a little bit of planning and design you'll most likely end up with a list of project roles you're going to need. Additionally you'll need someone to act as the sysadmin (e.g. for servers), research and maintain the asset pipeline and tools, do the PR and maybe budgeting.&#xD;&#xA;&#xD;&#xA;PS: I prefer to wear &quot;many hats&quot;, as opposed to &quot;many heads&quot; ;-)" />
  <row Id="5532" PostHistoryTypeId="2" PostId="2849" RevisionGUID="6a9b31d6-ce62-431b-9c1e-6530f197b76b" CreationDate="2010-08-17T09:15:39.583" UserDisplayName="Choscura" Text="The ability to learn things well on a deadline, the ability to maintain a clear vision of what the end is going to be, the ability to go without sleep and work in a closet, and the ability to celebrate victories and accept defeats as a team, with no single person being blamed." />
  <row Id="5533" PostHistoryTypeId="5" PostId="2843" RevisionGUID="2e862c29-c433-4ddc-87da-17f1319bcfae" CreationDate="2010-08-17T09:17:55.917" UserId="1219" Comment="deleted 6 characters in body" Text="In the industry, people with various skills and talents all work together on a team. They are most often specialised in their field.&#xD;&#xA;&#xD;&#xA;However, this is unpractical for a hobbyist team. All people in such a team need some skill in various fields and people have to wear many hats. Which skills are crucial for an average hobbyist team (without taking any game specific details into account)? Detail some tasks that people with such a skill would be required to do. What other skills are usefull but not necessary? Are there any skills that can more easily be combined (for example, the game designer can more easily do the marketing then an artist?).&#xD;&#xA;&#xD;&#xA;A good answer to this question can be used to complete a team, based on missing skillsets or available time of current teammembers, or just to get more insight of the dynamics of a hobbyist team." />
  <row Id="5534" PostHistoryTypeId="2" PostId="2850" RevisionGUID="a7027621-c00c-4b90-8e4e-982e0678dcdb" CreationDate="2010-08-17T09:23:12.083" UserId="1742" Text="All non development tasks can be done by anyone. The team must be capable of completing the development. Marketing, licensing and company directing legal stuff are all easy to pick up. A lot easier than games development itself. It all takes time though, so try to pick someone who's going to be done with their part of the development early to take on these roles, and maybe someone who doesn't come in till later to take on the role of company direction.&#xD;&#xA;&#xD;&#xA;Hobbyists need resources as much as professionals. However, hobbyists don't need to maintain old code. This is a crucial difference between industry and indie. The difference manifests itself in skills required, but only slightly.&#xD;&#xA;&#xD;&#xA;As a hobbyist, you'll likely need to pick up a graphics package as a programmer, and figure out how to create audio too. There's no pain like not having an asset to get something tested.&#xD;&#xA;In addition to the digital asset creation skills you must have, you also need to acquire the sense of when to give up. If something is proving to take longer than expected, as a hobbyist, you need to find something else to do to keep rolling. Small teams means there's less chance that all your requirements are covered, and that'll mean last minute research and development before the game can come together. Heed the advice of those who have gone before regarding what not to do and how to do stuff without doing it right. There's time to be wasted doing things right when you could just get them done. Not sloppy coding or bad art, but test driven development way of thinking, do only what you need to do to get it performing as expected.&#xD;&#xA;&#xD;&#xA;There is no need to draw a grand backdrop if you're only going to see it through a dirty window, no need to code a physics model if a free one will suffice.&#xD;&#xA;We in the industry know that it's fun to do these things, but any company that has pandered to its staff and let them have their head came crying to the banker when the money ran out." />
  <row Id="5535" PostHistoryTypeId="2" PostId="2851" RevisionGUID="51ddc794-c6af-42a0-ac11-0e079e1e9cad" CreationDate="2010-08-17T09:27:40.543" UserId="1740" Text="When speaking at the hobbyist level, people wear many hats indeed. But the capabilities of each type of member really depends entirely on the individuals. At least, whenever I've looked in the past. I am not particularly successful, but this is what I've gathered.&#xD;&#xA;&#xD;&#xA;Here's my 5-in-morning brain-dump on the topic, however. You need most of the following things (these roles might be combined into a few individuals. I've pluralized these, although you might only have one of each role between your team):&#xD;&#xA;&#xD;&#xA;* Designers/idea people. A person who comes up with ideas and key concepts that comprise your game.&#xD;&#xA;   * Ideally, this should be everyone in the team, so all players in your team keep interested, and they should each have a say in what sort of game is made in their own way.&#xD;&#xA;   * Be careful. Make sure that people can agree to a general concept, and talk it out until the idea makes sense. Try to get every on board here, since a clear idea is tremendously important in making sure tasks go like planned.&#xD;&#xA;* Artist.&#xD;&#xA;   * You can wait on this (placeholder art or programmer scribbles), but your ability to make certain kinds of progress can be severely hindered without the ability to create the intended visuals in-game. Especially if you require that sort of visual feedback to keep yourself motivated. Also, art is definitely a large marketing point of most games, since good visuals will pull a.&#xD;&#xA;* Musician/Audio Person&#xD;&#xA;   * This can also be waited on. Arguably audio can be less &quot;important&quot;, as is evident by certain games completely foregoing sound, but it still has a huge impact on the feel of the game, especially the musical soundtrack. It is worth finding a capable musician.&#xD;&#xA;* Programmers/Scripters&#xD;&#xA;   * Vital! The game's events and logic need to be programmed to an extremely large degree. Whether this is low-level system control, or a script written in a cookie cutter game maker tool, someone needs to program the scenarios. This tedium is real and necessary. Lack of programming skill bites you in butt, as you are constantly finding yourself limited in what you can do with the tools you can manage.&#xD;&#xA;   * At the same time, having bountiful programming skill can be a curse of its own. Suddenly there's a desire there to overcomplicate simple tasks and worse yet, they might waste time writing engines instead of writing games (speaking from my own pitfalls).&#xD;&#xA;   * Even tools like Construct technically have you &quot;program&quot;. Whether you do it explicitly in a language or in some sort of tool that does it for you, you need to control the execution and flow of the game. This is a tedium to be expected of most if not all games.&#xD;&#xA;   * You need balance. Rushing out code ends up in bugs and a mess that cannot be maintained. On the other hand, slowly fleshing out engines and systems for stability are useful, but eventually you need to release something.&#xD;&#xA;   * Pre-existing tools are out there for a reason, but they have restrictions. You might be able to get a way without a &quot;systems&quot; programmer, but you might not. It entirely depends on the scale and type of the project. The closer it is to an existing system, the easier a time you'll have. But to make more &quot;innovative&quot; things, you may find yourself with cheesy workarounds and starting at least remotely from scratch.&#xD;&#xA;* Mathematicians/Statisticians&#xD;&#xA;   * If your game needs math, or needs math and you don't realize it yet, you need someone knowledgeable (or at least know how to use the Internet) to consult about problems. Ranging from geometry and trigonometry, to data compression, to balancing damage distributions and levelling curves in RPGs, collision detection, etc. Depending on what you end up doing, math is required. Not always, but often. Keep it in mind when you run into a problem, don't just run away in panic.&#xD;&#xA;* Writers&#xD;&#xA;   * Depending on the type of game, you may need a competent word-smith to captivate your audience. A person who's good with plot twists and clever prose, to use for scripted dialog, descriptive flavor text, introductions and whatever else you need.&#xD;&#xA;   * A writer for your design documents (if any) might also be nice. This style of writing should be much more explicit and technical as required to avoid ambiguities and problems. This all depends though. Not every team needs this, and you can sometimes dive right into the game-creation parts without writing a document or even a to-do list. Just keep it in mind. This person is likely a programmer.&#xD;&#xA;&#xD;&#xA;Keep in mind that one team member in a hobbyist team will likely fill most of these roles.&#xD;&#xA;&#xD;&#xA;As a personal rule, I find that I am the programmer, and I need an artist, a musician. The writing and design things are handled by every team member. Mathematical people are likely the programmer-types as well. But beware, not every programmer is tremendously good at math, some just know enough to get by. Overlap in design roles is especially critical, in my opinion, to keep everyone on board.&#xD;&#xA;&#xD;&#xA;It's best to not depend on people to do their part, or to only depend on reliable people (with whom you hold great confidence), since projects can fall apart due to one person not doing their part. As has happened so many times to me. This means that you might find yourself wanting to learn things on your own -- however, this leads to lots of time wasted learning skills you wouldn't need to learn if you were in a team (and now they can't be done in parallel). Be careful.&#xD;&#xA;&#xD;&#xA;Your own experience is the only true guide for this sort of thing, and your first few encounters with hobbyist development will probably not yield anything (it's disappointing, but as far as I can tell, fact -- but never get discouraged, as you learn valuable lessons along the line).&#xD;&#xA;&#xD;&#xA;Well hopefully somebody finds this interesting, I might end up disagreeing with myself later, since I was sort of trailing off midway through writing this, but I kept with it, even though it was 5am. Time for bed." />
  <row Id="5536" PostHistoryTypeId="5" PostId="2851" RevisionGUID="a4607f40-0de9-43b6-b0a3-415ab4f49ae8" CreationDate="2010-08-17T09:34:01.340" UserId="1740" Comment="added 7 characters in body" Text="When speaking at the hobbyist level, people wear many hats indeed. But the capabilities of each type of member really depends entirely on the individuals. At least, whenever I've looked in the past. I am not particularly successful, but this is what I've gathered.&#xD;&#xA;&#xD;&#xA;Here's my 5-in-morning brain-dump on the topic, however. You need most of the following things (these roles might be combined into a few individuals. I've pluralized these, although you might only have one of each role between your team):&#xD;&#xA;&#xD;&#xA;* Designers/idea people. A person who comes up with ideas and key concepts that comprise your game.&#xD;&#xA;   * Ideally, this should be everyone in the team, so all players in your team keep interested, and they should each have a say in what sort of game is made in their own way.&#xD;&#xA;   * Be careful. Make sure that people can agree to a general concept, and talk it out until the idea makes sense. Try to get every on board here, since a clear idea is tremendously important in making sure tasks go like planned.&#xD;&#xA;* Artist.&#xD;&#xA;   * You can wait on this (placeholder art or programmer scribbles), but your ability to make certain kinds of progress can be severely hindered without the ability to create the intended visuals in-game. Especially if you require that sort of visual feedback to keep yourself motivated. Also, art is definitely a large marketing point of most games, since good visuals will pull a.&#xD;&#xA;* Musician/Audio Person&#xD;&#xA;   * This can also be waited on. Arguably audio can be less &quot;important&quot;, as is evident by certain games completely foregoing sound, but it still has a huge impact on the feel of the game, especially the musical soundtrack. It is worth finding a capable musician.&#xD;&#xA;* Programmers/Scripters&#xD;&#xA;   * Vital! The game's events and logic need to be programmed to an extremely large degree. Whether this is low-level system control, or a script written in a cookie cutter game maker tool, someone needs to program the scenarios. This tedium is real and necessary. Lack of programming skill bites you in butt, as you are constantly finding yourself limited in what you can do with the tools you can manage.&#xD;&#xA;   * At the same time, having bountiful programming skill can be a curse of its own. Suddenly there's a desire there to overcomplicate simple tasks and worse yet, they might waste time writing engines instead of writing games (speaking from my own pitfalls).&#xD;&#xA;   * Even tools like Construct technically have you &quot;program&quot;. Whether you do it explicitly in a language or in some sort of tool that does it for you, you need to control the execution and flow of the game. This is a tedium to be expected of most if not all games.&#xD;&#xA;   * You need balance. Rushing out code ends up in bugs and a mess that cannot be maintained. On the other hand, slowly fleshing out engines and systems for stability are useful, but eventually you need to release something.&#xD;&#xA;   * Pre-existing tools are out there for a reason, but they have restrictions. You might be able to get a way without a &quot;systems&quot; programmer, but you might not. It entirely depends on the scale and type of the project. The closer it is to an existing system, the easier a time you'll have. But to make more &quot;innovative&quot; things, you may find yourself with cheesy workarounds and starting at least remotely from scratch.&#xD;&#xA;* Mathematicians/Statisticians&#xD;&#xA;   * If your game needs math, or needs math and you don't realize it yet, you need someone knowledgeable (or at least know how to use the Internet) to consult about problems. Ranging from geometry and trigonometry, to data compression, to balancing damage distributions and levelling curves in RPGs, collision detection, etc. Depending on what you end up doing, math is required. Not always, but often. Keep it in mind when you run into a problem, don't just run away in panic.&#xD;&#xA;* Writers&#xD;&#xA;   * Depending on the type of game, you may need a competent word-smith to captivate your audience. A person who's good with plot twists and clever prose, to use for scripted dialog, descriptive flavor text, introductions and whatever else you need.&#xD;&#xA;   * A writer for your design documents (if any) might also be nice. This style of writing should be much more explicit and technical as required to avoid ambiguities and problems. This all depends though. Not every team needs this, and you can sometimes dive right into the game-creation parts without writing a document or even a to-do list. Just keep it in mind. This person is likely a programmer.&#xD;&#xA;&#xD;&#xA;Keep in mind that one team member in a hobbyist team will likely fill most of these roles.&#xD;&#xA;&#xD;&#xA;As a personal rule, I find that I am the programmer, and I need an artist, a musician. The writing and design things are handled by every team member. Mathematical people are likely the programmer-types as well. But beware, not every programmer is tremendously good at math, some just know enough to get by. Overlap in design roles is especially critical, in my opinion, to keep everyone on board.&#xD;&#xA;&#xD;&#xA;It's best to either not depend on people to do their part, or to only depend on reliable people (with whom you hold great confidence), since projects can fall apart due to one person not doing their part. As has happened so many times to me. This means that you might find yourself wanting to learn things on your own -- however, this leads to lots of time wasted learning skills you wouldn't need to learn if you were in a team (and now they can't be done in parallel). Be careful.&#xD;&#xA;&#xD;&#xA;Your own experience is the only true guide for this sort of thing, and your first few encounters with hobbyist development will probably not yield anything (it's disappointing, but as far as I can tell, fact -- but never get discouraged, as you learn valuable lessons along the line).&#xD;&#xA;&#xD;&#xA;Well hopefully somebody finds this interesting, I might end up disagreeing with myself later, since I was sort of trailing off midway through writing this, but I kept with it, even though it was 5am. Time for bed." />
  <row Id="5537" PostHistoryTypeId="2" PostId="2852" RevisionGUID="2c658d41-d548-47ad-bc73-a5073693aae7" CreationDate="2010-08-17T09:37:29.890" UserId="430" Text="The iPhone has hardware decode support for mp3 and aac (m4a), so you'll want to use one of those formats. In other words, if you play an mp3 or m4a on the device, it will use very little CPU. OGG used way too much CPU the last time I tried it. In my experience, AAC will compress better in general. But it depends a bit on what frequencies are present in the source audio.  Unfortunately you'll probably need to just try a few settings until it sounds ok. You can import your wav files in iTunes and right-click to convert them to AAC. Try some of the built-in quality options and see of the files end up small enough. Then, if necessary, start tweaking things like bitrate and quality. A variable bitrate will result in a smaller file usually but it can be difficult to determine how much it will compress. &#xD;&#xA;&#xD;&#xA;EDIT: When I was trying to play OGGs on the iPhone, it was via FMOD and it was a 1st gen device.  So, things might have changed since then.  Still, unless the rest of your app isn't really doing anything CPU intensive, you might as well not spend CPU cycles decoding audio if you don't have to since mp3 and aac are essentially free." />
  <row Id="5538" PostHistoryTypeId="5" PostId="2852" RevisionGUID="db9fefb1-3caa-4c02-b305-0a22c5ef0679" CreationDate="2010-08-17T09:45:08.490" UserId="430" Comment="caps" Text="The iPhone has hardware decode support for MP3 and AAC (M4A), so you'll want to use one of those formats. In other words, if you play an MP3 or M4A on the device, it will use very little CPU. OGG used way too much CPU the last time I tried it. In my experience, AAC will compress better in general. But it depends a bit on what frequencies are present in the source audio. Unfortunately you'll probably need to just try a few settings until it sounds ok. You can import your wav files in iTunes and right-click to convert them to AAC. Try some of the built-in quality options and see of the files end up small enough. Then, if necessary, start tweaking things like bitrate and quality. A variable bitrate will result in a smaller file usually but it can be difficult to determine how much it will compress.&#xD;&#xA;&#xD;&#xA;EDIT: When I was trying to play OGGs on the iPhone, it was via FMOD and it was a 1st gen device. So, things might have changed since then. Still, unless the rest of your app isn't really doing anything CPU intensive, you might as well not spend CPU cycles decoding audio if you don't have to since MP3 and AAC are essentially free.&#xD;&#xA;&#xD;&#xA;EDIT2: Also, to clarify the whole M4A/AAC thing, M4A is an mpeg container file that can contain AAC-compressed audio. AAC is the official successor to MP3. According to wikipedia, a 1MB/minute AAC stream (by 128kbps constant rate compression) will give you hi-fi transparency (i.e. nobody can tell the difference between compressed and the original). I'm not sure how accurate that is, but it sounds about right.&#xD;&#xA;" />
  <row Id="5539" PostHistoryTypeId="5" PostId="2852" RevisionGUID="37be246a-ce02-49e8-8aff-507628280bf8" CreationDate="2010-08-17T09:52:28.783" UserId="430" Comment="added 215 characters in body; added 152 characters in body" Text="The iPhone has hardware decode support for MP3 and AAC (M4A), so you'll want to use one of those formats. In other words, if you play an MP3 or M4A on the device, it will use very little CPU. OGG used way too much CPU the last time I tried it. In my experience, AAC will compress better in general. But it depends a bit on what frequencies are present in the source audio. Unfortunately you'll probably need to just try a few settings until it sounds ok. You can import your wav files in iTunes and right-click to convert them to AAC. Try some of the built-in quality options and see of the files end up small enough. Then, if necessary, start tweaking things like bitrate and quality. A variable bitrate will result in a smaller file usually but it can be difficult to determine how much it will compress.&#xD;&#xA;&#xD;&#xA;EDIT: When I was trying to play OGGs on the iPhone, it was via FMOD and it was a 1st gen device. So, things might have changed since then. Still, unless the rest of your app isn't really doing anything CPU intensive, you might as well not spend CPU cycles decoding audio if you don't have to since MP3 and AAC are essentially free.&#xD;&#xA;&#xD;&#xA;EDIT2: Also, to clarify the whole M4A/AAC thing, M4A is an mpeg container file that can contain AAC-compressed audio. AAC is the official successor to MP3. According to wikipedia, a 1MB/minute AAC stream (by 128kbps constant rate compression) will give you hi-fi transparency (i.e. nobody can tell the difference between compressed and the original). I'm not sure how accurate that is, but it sounds about right.&#xD;&#xA;&#xD;&#xA;EDIT3: Your quality degredataion going to M4A was due to starting with an MP3.  Always start with an uncompressed format, like WAV.  I believe AIFF is normally uncompressed, but I'm not sure if that's always true.&#xD;&#xA;&#xD;&#xA;EDIT4: The AAC compresser that's in Logic 9 might do a better job than the one built into iTunes, but the process will probably be more complicated." />
  <row Id="5540" PostHistoryTypeId="2" PostId="2853" RevisionGUID="a27322c5-3d87-4f54-a5f3-df4fb091a056" CreationDate="2010-08-17T09:54:33.883" UserId="119" Text="I have an arbitrary destructible bitmap terrain like the one in &quot;Worms&quot;. It's easy to work out if a character or missile intersects the terrain, but how do I work out the angle of the slope at the contact point, so I can make grenades roll down hills, bounce off at the right angle, etc. I know it can be down by somehow taking a sample of points around the impact point and seeing which ones intersect, but I'm not sure exactly how to go about it, and in an efficient way. " />
  <row Id="5541" PostHistoryTypeId="1" PostId="2853" RevisionGUID="a27322c5-3d87-4f54-a5f3-df4fb091a056" CreationDate="2010-08-17T09:54:33.883" UserId="119" Text="How do I calculate the angle of the slope at a point on a 2D bitmap terrain?" />
  <row Id="5542" PostHistoryTypeId="3" PostId="2853" RevisionGUID="a27322c5-3d87-4f54-a5f3-df4fb091a056" CreationDate="2010-08-17T09:54:33.883" UserId="119" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="5543" PostHistoryTypeId="2" PostId="2854" RevisionGUID="5cf9a342-3a97-4adc-a7b8-a2edd7188114" CreationDate="2010-08-17T10:08:32.313" UserId="192" Text="You need two points to calculate it. The slope is then the coefficient of the line passing for the two points." />
  <row Id="5544" PostHistoryTypeId="5" PostId="2854" RevisionGUID="9d60f07a-de57-4b5e-bd82-35f70a7fced5" CreationDate="2010-08-17T10:18:29.513" UserId="192" Comment="added 106 characters in body" Text="You need two points to calculate it. The slope is then the coefficient of the line passing for the two points, i.e.:&#xD;&#xA;&#xD;&#xA;    m = ( y2 - y1 ) / ( x2 - x1 )&#xD;&#xA;&#xD;&#xA;To get it in form of an angle use the `arctan(m)` function." />
  <row Id="5545" PostHistoryTypeId="2" PostId="2855" RevisionGUID="939d62b0-6996-49af-b235-5ccb1284da1f" CreationDate="2010-08-17T10:58:44.133" UserId="1691" Text="The game I'm working on has OpenGL (2.1) vector graphics, and I need to draw up to 1000 enemies, each of which is composed of between 4 and 100 lines.&#xD;&#xA;&#xD;&#xA;Each enemy can be drawn as a single line loop, so one strategy for drawing would be to call `glDrawElements(GL_LINE_LOOP, ...)` once for each enemy. This results in too many (up to 1000) calls of `glDrawElements` per frame.&#xD;&#xA;&#xD;&#xA;Another strategy would be to separate the line-loops that form each enemy into individual line segments, and call `glDrawElements(GL_LINES, ...)`. This results in a lot of repeated vertices though, which I would like to avoid.&#xD;&#xA;&#xD;&#xA;Is there a way to draw multiple line loops in a single call to glDrawElements (or with some other function)? I guess I would need some indicator in the vertex/element array to mark where each line loop ended." />
  <row Id="5546" PostHistoryTypeId="1" PostId="2855" RevisionGUID="939d62b0-6996-49af-b235-5ccb1284da1f" CreationDate="2010-08-17T10:58:44.133" UserId="1691" Text="Draw multiple LINE_LOOPs in one  glDrawElements call" />
  <row Id="5547" PostHistoryTypeId="3" PostId="2855" RevisionGUID="939d62b0-6996-49af-b235-5ccb1284da1f" CreationDate="2010-08-17T10:58:44.133" UserId="1691" Text="&lt;graphics&gt;&lt;opengl&gt;&lt;glsl&gt;" />
  <row Id="5548" PostHistoryTypeId="2" PostId="2856" RevisionGUID="fbbc6283-d2ab-4d5e-af42-12e7fa8d7242" CreationDate="2010-08-17T11:00:32.773" UserId="1742" Text="If you're happy sampling then run a coarse sample at a defined radius around your hit point. 16 samples in a circle will provide you with quite accurate curvature. If you add up all the vectors that &quot;missed&quot;, you'll have a vector that can be normalised to a surface normal.&#xD;&#xA;&#xD;&#xA;If you hit the flat floor, all the vectors will miss if they're pointing up at all, so they add up to an up vector. If you hit a 45 degree slope, the vectors that point away from the slope will miss and add up to a 45 degree vector away from the slope. Even a rough surface will provide a reasonable surface normal as you're checking for &quot;misses&quot; not a surface.&#xD;&#xA;&#xD;&#xA;This works fine until you get into really tight spaces, at which point, curvature is all shot to crap anyway, and you would probably not get a sensible result in any technique other than precomputed surface normals (which can be found by blurring a &quot;vector to closest feature&quot; map where feature is non colliding / non matter).&#xD;&#xA;&#xD;&#xA;so: &#xD;&#xA;&#xD;&#xA;    Vec collisionPoint # point of collision&#xD;&#xA;    Vec acc(0,0)&#xD;&#xA;    for f = 0 to 2pi:&#xD;&#xA;     vec check = vec( sin( f ), cos( f ) )&#xD;&#xA;     if ( check + collisionPoint ).collides():&#xD;&#xA;      acc += check&#xD;&#xA;    normal = acc.normalise() # yes, there is a chance of a divide by zero." />
  <row Id="5549" PostHistoryTypeId="2" PostId="2857" RevisionGUID="69deb43f-40b2-4116-a979-10fcc90d5a84" CreationDate="2010-08-17T11:05:06.010" UserId="1091" Text="If you want to go crazy, you could take a grid of samples around your test-point, do an edge-detection algorithm to identify the surface (i.e. any point part of the terrain with a neighbour which isn't, or vice-versa, is a surface point), and then find the best-fit line through those points to use as an approximation to the surface.&#xD;&#xA;&#xD;&#xA;Might be overkill though :)&#xD;&#xA;" />
  <row Id="5550" PostHistoryTypeId="2" PostId="2858" RevisionGUID="0417b225-e5e4-4dc2-8ec0-1f7d38ce84c9" CreationDate="2010-08-17T11:11:46.670" UserId="1091" Text="Surely if you're using indices, you're not repeating verts?&#xD;&#xA;&#xD;&#xA;You could also look at instancing, where you have a set of primitives being repeatedly drawn with a set of matrices being sent at lower frequency (i.e. a single call could draw 20 lines, repeated with 15 different matrices).&#xD;&#xA;" />
  <row Id="5551" PostHistoryTypeId="2" PostId="2859" RevisionGUID="ef3ad1ee-6c20-44df-aaf7-89ef395b9de5" CreationDate="2010-08-17T11:31:29.010" UserId="1742" Text="The most important thing for me as a professional games developer is that exceptions have to be written by people that understand how exceptions work (which there are few in the games industry) debugged by them too, and the underlying code that runs them (which is a branchy mess anyway and will kill your in-order processor) had to be written by people providing your compiler/linker. The problem with that is that they only have a finite amount of resources, so they concentrate on writing better optimisations and fixes for code that games developers do use... which usually isn't exceptions. If you've got an exception bug on modern hardware with new compilers, who are you gonna call? your exception expert who thinks everything is okay with the code, or the vendor who says, yeah, soon, we're just trying to make intrinsics happen more automatically.&#xD;&#xA;&#xD;&#xA;There's nothing inherently wrong with exceptions, just they're not good because reality gets in the way of theory." />
  <row Id="5552" PostHistoryTypeId="5" PostId="2858" RevisionGUID="375e0a73-0ba6-4b40-a02e-535c15253478" CreationDate="2010-08-17T11:51:15.293" UserId="1091" Comment="added 245 characters in body" Text="Surely if you're using indices, you're not repeating verts?&#xD;&#xA;&#xD;&#xA;You could also look at instancing, where you have a set of primitives being repeatedly drawn with a set of matrices being sent at lower frequency (i.e. a single call could draw 20 lines, repeated with 15 different matrices).&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;It occurs to me that you might be worried about the duplication of *indices* rather than verts. I wouldn't worry about that - that's kind of the point of indices. They allow verts to be reused without being retransformed by the GPU.&#xD;&#xA;" />
  <row Id="5553" PostHistoryTypeId="5" PostId="2836" RevisionGUID="b0844dde-52e2-4694-8c18-8141e0a9e6bc" CreationDate="2010-08-17T11:58:40.130" UserId="1021" Comment="more info" Text="I recently purchased some short (approx 3 min) background music tracks.  I have the tracks in three formats: AIFF, MP3 and WAV.  How can I compress these files such that the quality remains intact (for the most part) and the file size is relatively small?&#xD;&#xA;&#xD;&#xA;I'm especially interested in the &quot;before&quot; and &quot;after&quot; file formats.  So far I've tried compressing the **MP3** format to **m4a**.  This reduced the file size substantially... however the quality was significantly degraded.&#xD;&#xA;&#xD;&#xA;I'm definitely open to reducing the tracks to much shorter (approx 20 sec) loops.  Also note these background music tracks will be used on the iPhone (need to support back to the 3G).  I have access to Logic Express 9 and Garage Band... and I'm open to trying Audacity or other software.&#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;Edit:  I'd like the file size to be around 200 Kb.  This way it loads quickly on the 3G." />
  <row Id="5554" PostHistoryTypeId="2" PostId="2860" RevisionGUID="527ac535-2b83-4db3-bf6d-4aff898ddb6b" CreationDate="2010-08-17T12:16:36.240" UserId="1477" Text="If you want your game to be an actual app inside of facebook you may want to take a look at the canvas documentation and other related stuff here: http://developers.facebook.com/docs/guides/canvas/" />
  <row Id="5555" PostHistoryTypeId="2" PostId="2861" RevisionGUID="26024d69-9129-4791-b331-74d26d7f9e2c" CreationDate="2010-08-17T12:19:13.410" UserId="1684" Text="I can write about how I work since what I do could be described as a hobbyist gamedev. We loosely have a 4 person team: programmer, business guy, graphics artists and music guy. The graphics and music guys are contracted do for specific work and are paid per hour/job.&#xD;&#xA;&#xD;&#xA;The design for the games comes from the business guys (which happens to also be a programmer who has made multiple games previously) mainly, but with a lot of input from the programmer.&#xD;&#xA;&#xD;&#xA;The programmer does the actual programming with the business guy helping with the testing. Once the game is ready, the business guys take responsibility for pushing it on to vendors, try to get deals with distributor/carriers. When new platforms are made available, the programmer ensures that it will run properly and make modifications as necessary. Of course, there is bug fixing as well.&#xD;&#xA;&#xD;&#xA;We work in the mobile space, so it is not clear if the concept would work on the PC/Console due to the size of the games produced. We are on track to get 3-4 games out per year. Finally, the programmer and business guy split the revenues." />
  <row Id="5556" PostHistoryTypeId="2" PostId="2862" RevisionGUID="987d28e6-698d-4c42-a96a-1b4d4326a28d" CreationDate="2010-08-17T12:29:45.247" UserId="1477" Text="If you want the memory saving features of a singleton perhaps you could try the flyweight design pattern?&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Flyweight_pattern&#xD;&#xA;&#xD;&#xA;As far as multi-thread issues mentioned above it should be fairly simply with some foresight to implement a lock mechanism for resources that may be shared between threads.&#xD;&#xA;http://en.wikipedia.org/wiki/Read/write_lock_pattern" />
  <row Id="5557" PostHistoryTypeId="2" PostId="2863" RevisionGUID="c80963e5-77a8-46c8-a4a3-b4319d95e7b5" CreationDate="2010-08-17T12:40:44.973" UserId="1216" Text="I have developed an iPhone app. When I have installed it in the device, it worked fine, ie it showed, the logo screen, the title screen and goes to game screen and now I have exited pressing the home button. The problems starts when I relaunch the app, it straightly goes to the game screen, by skipping the splash screens.&#xD;&#xA;&#xD;&#xA;While I was working on it the app crashed and when I launched again it showed the logo screen and title screen. But when I relaunched it, the splash screens where skipped.&#xD;&#xA;&#xD;&#xA;Could you tell me the possible errors that might have occurred?" />
  <row Id="5558" PostHistoryTypeId="1" PostId="2863" RevisionGUID="c80963e5-77a8-46c8-a4a3-b4319d95e7b5" CreationDate="2010-08-17T12:40:44.973" UserId="1216" Text="my iPhone app skips the splash screen!" />
  <row Id="5559" PostHistoryTypeId="3" PostId="2863" RevisionGUID="c80963e5-77a8-46c8-a4a3-b4319d95e7b5" CreationDate="2010-08-17T12:40:44.973" UserId="1216" Text="&lt;iphone&gt;" />
  <row Id="5560" PostHistoryTypeId="2" PostId="2864" RevisionGUID="6a5bb855-b085-4eb6-9c4b-3d82b3997e31" CreationDate="2010-08-17T12:43:12.333" UserId="678" Text="It's not an error, it's iOS4 multitasking.&#xD;&#xA;&#xD;&#xA;Your app keeps running in the background as long as there are resources available." />
  <row Id="5561" PostHistoryTypeId="2" PostId="2865" RevisionGUID="26457a23-33d5-47be-b9a3-a126268142de" CreationDate="2010-08-17T13:20:12.710" UserId="1742" Text="Developing in Android is going to be different for me, having spent the last 10 years coding games in C++. What's the main differences / pitfalls / bottlenecks to developing for the Android? My big worry is moving to Java, what am I going to miss most?" />
  <row Id="5562" PostHistoryTypeId="1" PostId="2865" RevisionGUID="26457a23-33d5-47be-b9a3-a126268142de" CreationDate="2010-08-17T13:20:12.710" UserId="1742" Text="Android differences" />
  <row Id="5563" PostHistoryTypeId="3" PostId="2865" RevisionGUID="26457a23-33d5-47be-b9a3-a126268142de" CreationDate="2010-08-17T13:20:12.710" UserId="1742" Text="&lt;android&gt;&lt;java&gt;&lt;pitfalls&gt;" />
  <row Id="5564" PostHistoryTypeId="2" PostId="2866" RevisionGUID="c5d0cd35-b6ab-4e68-8040-29b8f48726ca" CreationDate="2010-08-17T13:22:01.330" UserId="1206" Text="Globals are much faster!&#xD;&#xA;So it would fit perfectly for a performance intensive application, like a game.&#xD;&#xA;&#xD;&#xA;Singletons are a better global, IMO, and thus the right tool.&#xD;&#xA;&#xD;&#xA;Use it sparingly!" />
  <row Id="5565" PostHistoryTypeId="5" PostId="2836" RevisionGUID="23ade218-d555-44b2-aae7-2302c8aa4c35" CreationDate="2010-08-17T13:27:33.550" UserId="1021" Comment="more info" Text="I recently purchased some short (approx 3 min) background music tracks.  I have the tracks in three formats: AIFF, MP3 and WAV.  How can I compress these files such that the quality remains intact (for the most part) and the file size is relatively small?&#xD;&#xA;&#xD;&#xA;I'm especially interested in the &quot;before&quot; and &quot;after&quot; file formats.  So far I've tried compressing the **MP3** format to **m4a**.  This reduced the file size substantially... however the quality was significantly degraded.&#xD;&#xA;&#xD;&#xA;I'm definitely open to reducing the tracks to much shorter (approx 20 sec) loops.  Also note these background music tracks will be used on the iPhone (need to support back to the 3G).  I have access to Logic Express 9 and Garage Band... and I'm open to trying Audacity or other software.&#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;Edit:  I'd like the file size to be around 300 Kb.  This way it loads quickly on the 3G." />
  <row Id="5566" PostHistoryTypeId="2" PostId="2867" RevisionGUID="cc54aeb1-a328-4ff6-b6cd-caf0921114e0" CreationDate="2010-08-17T13:47:12.097" UserId="553" Text="How does one separate the acceleration due to gravity from other motion in accelerometer input?" />
  <row Id="5567" PostHistoryTypeId="1" PostId="2867" RevisionGUID="cc54aeb1-a328-4ff6-b6cd-caf0921114e0" CreationDate="2010-08-17T13:47:12.097" UserId="553" Text="How does one separate the acceleration due to gravity from other motion in accelerometer input?" />
  <row Id="5568" PostHistoryTypeId="3" PostId="2867" RevisionGUID="cc54aeb1-a328-4ff6-b6cd-caf0921114e0" CreationDate="2010-08-17T13:47:12.097" UserId="553" Text="&lt;algorithm&gt;&lt;math&gt;&lt;input&gt;" />
  <row Id="5570" PostHistoryTypeId="2" PostId="2869" RevisionGUID="1699c7af-fb39-4987-a387-0df70684193b" CreationDate="2010-08-17T13:59:23.770" UserId="678" Text="That really depends on what you are trying to do.&#xD;&#xA;&#xD;&#xA;If you are planning to use the accelerometers for navigation (essentially building an inertial navigation device) you need to keep track of which way  is down in your integration cycle. If you device is being accellerated with an accelleration equal to *g* in a lateral direction and you have no measurement history, you have no way of telling which is which.&#xD;&#xA;&#xD;&#xA;If you are using the accelerometers as a sort of tilt sensor you can just assume your measurement is gravity, that is your local down vector. Decomposing it along the device's body will yield the orientation." />
  <row Id="5571" PostHistoryTypeId="2" PostId="2870" RevisionGUID="1c355f31-6e94-41fc-bf35-fbb4d76613f7" CreationDate="2010-08-17T14:03:05.350" UserId="1742" Text="When working on Wii titles, i found that a low pass filter on the accelerometer reading could be used as a reasonable approximation of the gravity vector component. Subtracting this from the real values then left me with a good basis stream for instantaneous gesture analysis. My low pass was around 1hz (just the average of enough packets of data) but tweaked dependent on the gesture being developed." />
  <row Id="5573" PostHistoryTypeId="4" PostId="2865" RevisionGUID="d147ff3c-8647-4a21-b2e2-4c3b3d68c79e" CreationDate="2010-08-17T14:24:19.560" UserId="1742" Comment="again, tried to focus on one subject better." Text="Android differences (Dalvik+Java vs Old School C++)" />
  <row Id="5574" PostHistoryTypeId="2" PostId="2871" RevisionGUID="e845d998-d09f-4e70-98aa-abd4088e71bc" CreationDate="2010-08-17T14:25:32.957" UserId="288" Text="If you have a copy of the original Unreal, you can go through the texture packs in the editor and see all the neat effects. They're similar to the examples you posted in the original question." />
  <row Id="5575" PostHistoryTypeId="16" PostId="2871" RevisionGUID="e845d998-d09f-4e70-98aa-abd4088e71bc" CreationDate="2010-08-17T14:25:32.957" UserId="-1" />
  <row Id="5576" PostHistoryTypeId="5" PostId="2865" RevisionGUID="d147ff3c-8647-4a21-b2e2-4c3b3d68c79e" CreationDate="2010-08-17T14:24:19.560" UserId="1742" Comment="again, tried to focus on one subject better." Text="Developing in Android is going to be different for me, having spent the last 10 years coding games in C++. What's the main differences / pitfalls / bottlenecks to developing for the Android? My big worry is moving to Java, what am I going to miss most?&#xD;&#xA;&#xD;&#xA;To be clearer: what would I miss if I coded the whole thing in Java compared to the way I normally code C++ for consoles?" />
  <row Id="5577" PostHistoryTypeId="2" PostId="2872" RevisionGUID="5a391e51-ad59-4ca7-b268-9b9e8f75b874" CreationDate="2010-08-17T14:34:47.273" UserId="1219" Text="In comparison to the U.S.A., there seem to be **far less** leading or **successful game companies in Europe**.&#xD;&#xA;&#xD;&#xA;The recent salary survey of [GameCareerGuide](http://gamedeveloper.texterity.com/gamedeveloper/2010cg#pg25) shows that the average salary of a games programmer in Europe is only 46k versus 80k in the U.S.A. &#xD;&#xA;While only 378 European developers replied to the survey, 1014 developers from the States provided usable feedback, which might also indicate that there are less people employed in game development in Europe.&#xD;&#xA;&#xD;&#xA;What makes it so much harder to develop games professionally, both AAA, indie and casual in European countries?&#xD;&#xA;&#xD;&#xA;Note: the total number of game companies in both continents seems to be rather equal (see [wikipedia](http://en.wikipedia.org/wiki/List_of_video_game_developers) for a complete list, around 117 companies are U.S based versus 106 European). But we have to take into account that, although North America is 2.5 times larger than Europe, there are many more people living in Europe than in the States ([731,000,000](http://en.wikipedia.org/wiki/Europe) versus [309,944,000](http://en.wikipedia.org/wiki/United_states))." />
  <row Id="5578" PostHistoryTypeId="1" PostId="2872" RevisionGUID="5a391e51-ad59-4ca7-b268-9b9e8f75b874" CreationDate="2010-08-17T14:34:47.273" UserId="1219" Text="Why is professional game development harder in Europe?" />
  <row Id="5579" PostHistoryTypeId="3" PostId="2872" RevisionGUID="5a391e51-ad59-4ca7-b268-9b9e8f75b874" CreationDate="2010-08-17T14:34:47.273" UserId="1219" Text="&lt;business&gt;" />
  <row Id="5580" PostHistoryTypeId="16" PostId="2872" RevisionGUID="5a391e51-ad59-4ca7-b268-9b9e8f75b874" CreationDate="2010-08-17T14:34:47.273" UserId="1219" />
  <row Id="5581" PostHistoryTypeId="2" PostId="2873" RevisionGUID="33a3eb19-ad87-40ac-94e3-90529b6f3f30" CreationDate="2010-08-17T14:54:08.193" UserId="1742" Text="Localisation?&#xD;&#xA;&#xD;&#xA;No, but seriously, It might be something to do with all the game-dev closures. Now isn't a good time to be taking polls.&#xD;&#xA;&#xD;&#xA;I'm probably quite horrible in that I think that this might be do do with who actually fills in the forms. I think that the polls respondents are the subset that wants to divulge their details. In europe, the underdog is more prone to whinge about their state of unfair pay. In the U.S. there's a contingent that wants to boast. Maybe the proportions are right to make a difference to the results?&#xD;&#xA;&#xD;&#xA;In any effect, I'm aware that a lot of the people I know (pro game dev) are definitely getting nearer the U.S. pay level, if not over it, so I'm not sure of the validity of the whole thing." />
  <row Id="5582" PostHistoryTypeId="16" PostId="2873" RevisionGUID="33a3eb19-ad87-40ac-94e3-90529b6f3f30" CreationDate="2010-08-17T14:54:08.193" UserId="-1" />
  <row Id="5583" PostHistoryTypeId="2" PostId="2874" RevisionGUID="2c57c0be-9464-43a5-a700-b09a93ed3946" CreationDate="2010-08-17T14:59:00.273" UserId="744" Text="You could ask this question for just about any industry, especially in the tech sector, and not just games. I don't think the problems, if they are problems, are game-specific. Europe's GDP/capita is about 1/2 the US GDP/capita - even strong European economies like Germany, Sweden, or the UK are below the US." />
  <row Id="5584" PostHistoryTypeId="16" PostId="2874" RevisionGUID="2c57c0be-9464-43a5-a700-b09a93ed3946" CreationDate="2010-08-17T14:59:00.273" UserId="-1" />
  <row Id="5585" PostHistoryTypeId="2" PostId="2875" RevisionGUID="e63cb8d3-77f4-4756-aaab-f936e2b7e7a5" CreationDate="2010-08-17T15:00:13.403" UserId="1206" Text="The domestic market is huge in the U.S. and thus it's much easier for any company/industry to succeed.&#xD;&#xA;In Europe, you have to cross borders to get a market.&#xD;&#xA;It's not really directly related to the game development business." />
  <row Id="5586" PostHistoryTypeId="16" PostId="2875" RevisionGUID="e63cb8d3-77f4-4756-aaab-f936e2b7e7a5" CreationDate="2010-08-17T15:00:13.403" UserId="-1" />
  <row Id="5587" PostHistoryTypeId="2" PostId="2876" RevisionGUID="390d7246-4ff4-4cac-a36d-7d7e6f412b4b" CreationDate="2010-08-17T15:03:32.413" UserId="1634" Text="The single biggest thing that you'd probably miss would be explicit memory management. On the plus side, Java has run-time type information and real generics.&#xD;&#xA;Also see: http://developer.android.com/guide/practices/design/performance.html for some tips from Google on how to keep your Java code efficient.&#xD;&#xA;&#xD;&#xA;Raymond Chen has recently been venting about garbage collection and memory management in the CLR and his blog posts are great for understanding how it works. (I know the following links are for the CLR, but they're still relevant for Java development).&#xD;&#xA;See especially:&#xD;&#xA;http://blogs.msdn.com/b/oldnewthing/archive/2010/08/09/10047586.aspx and&#xD;&#xA;http://blogs.msdn.com/b/oldnewthing/archive/2010/08/10/10048150.aspx&#xD;&#xA;&#xD;&#xA;That being said, there isn't that much difference between Java and C++, and as Chris pointed out, you *can* code in C/C++ on Android using the NDK." />
  <row Id="5589" PostHistoryTypeId="2" PostId="2878" RevisionGUID="8363aa24-f34e-4820-8f88-14a5bd0fb1d3" CreationDate="2010-08-17T16:01:13.200" UserId="1742" Text="LOD is about trying to keep the amount of processing constant over time. Hierarchical level of detail is the only way of doing this for scenes of considerable detail. If you are near enough to an object, it decomposes into multiple objects. This recursive LOD provides not only a simple mechanism for handling the transition points for switching in new levels of detail but also allows the render call count to stay about the same no matter how far / near you get to your world objects.&#xD;&#xA;&#xD;&#xA;It's all very well having great LODs for your meshes and textures, but in at least one game I shipped on the PS2, the way I saved time was just to clump together all the foliage in sectors into single draw calls. This larger draw call took nearly 90% less time than rendering all the low lod variants, even with carefully ordered material transitions and batch rendering each type of mesh. So, consider LOD with care. It's not just about individual objects. It's about the whole render phase.&#xD;&#xA;" />
  <row Id="5590" PostHistoryTypeId="2" PostId="2879" RevisionGUID="d382faea-8733-4165-b71f-6cd9049d2b13" CreationDate="2010-08-17T16:06:11.993" UserId="1101" Text="Globals are useful while quickly prototyping a system that requires some state between function calls. Once you've established that the system works, move the state into a class and make the functions into methods of that class.&#xD;&#xA;&#xD;&#xA;Singletons are useful for causing problems to yourself and others. The more global state you introduce, the more issues you will have with code correctness, maintenance, extensibility, concurrency, etc. Just don't do it." />
  <row Id="5591" PostHistoryTypeId="2" PostId="2880" RevisionGUID="8a97353a-8798-44b2-a7ff-5e4b6f04f064" CreationDate="2010-08-17T16:23:58.377" UserId="111" Text="Several techniques only use the difference in acceleration, not the instantaneous value. In those situations, constant acceleration is removed for you." />
  <row Id="5592" PostHistoryTypeId="2" PostId="2881" RevisionGUID="60e31c9a-6f1c-424a-9367-bf0dc3bc4334" CreationDate="2010-08-17T16:27:28.763" UserId="1101" Text="I don't know, but I think it might just be a culture thing. Certain countries specialise in certain industries and are then driven by momentum as skilled people move between different businesses in the industry that are located nearby, or set up satellite companies.&#xD;&#xA;&#xD;&#xA;I also think you can't easily compare the USA to &quot;Europe&quot; because Europe isn't one homogeneous state but many different places with different cultures (eg. working hours), languages (23 official in the EU alone), standards of living (the average Luxembourg citizen has a GDP 14x higher than one from Romania), [different laws and currencies][1], etc.&#xD;&#xA;&#xD;&#xA;It's also interesting to note that Eidos were a UK company and Ubisoft are a French company, and they have both had a massive impact on the industry, so there's certainly precedent for success in Europe. (Although both had the advantage of being well established in one form or another during the 80s.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/File:Supranational_European_Bodies.png" />
  <row Id="5593" PostHistoryTypeId="16" PostId="2881" RevisionGUID="60e31c9a-6f1c-424a-9367-bf0dc3bc4334" CreationDate="2010-08-17T16:27:28.763" UserId="-1" />
  <row Id="5594" PostHistoryTypeId="2" PostId="2882" RevisionGUID="e0f64c30-ff1d-4f1f-97e8-8af154b984ac" CreationDate="2010-08-17T16:27:31.413" UserId="136" Text="I tend to recommend using some sort of DI/IoC container with custom lifetime management instead of singletons (even if you use a &quot;single instance&quot; lifetime manager).  At least then it's easy to swap out the implementation to facilitate testing." />
  <row Id="5595" PostHistoryTypeId="2" PostId="2883" RevisionGUID="1d536954-8241-4bff-aa35-a0e9f063f577" CreationDate="2010-08-17T16:51:47.580" UserId="154" Text="There are a number of costs that go into game development beyond salary. While base pay is lower in the EU, when combined with higher taxes, property costs, and Euro vs. USD$ exchange rate fluctuations development costs in EU are often higher than in NA. At least for the big western European nations (UK/Germany) where the salaries are higher then that average. Salaries in East Europe are still very low so places like Croatia or Ukraine are interesting from an outsourcing standpoint because they do offer a lower cost. But outsourcing teams rarely get the sort of higher profile projects that can make them truly successful.&#xD;&#xA;&#xD;&#xA;The lower cost of NA development means it's much easier to start a new company in the US, more companies means more chances that one is a big success. There is also a general momentum that happens in the development community. Highly successful teams tend to lead to individuals branching off and building new companies which have a greater chance of forming more successful teams in the surrounding area. Most of the development in NA is based around these sorts of hubs in SF, LA, Seattle, Austin/Dallas and in Vancouver and Montreal in Canada.&#xD;&#xA;&#xD;&#xA;Also it should be noted that these things do change. Japan used to be absolutely dominant in the console space a couple of generations ago. Today NA seems more dominant. Some of this comes from a number of long time strong PC developers moving into the console space. Epic, Bungie, Valve and the 2015 core of Infinity Ward were all PC-only teams that have transitioned to building console titles." />
  <row Id="5596" PostHistoryTypeId="16" PostId="2883" RevisionGUID="1d536954-8241-4bff-aa35-a0e9f063f577" CreationDate="2010-08-17T16:51:47.580" UserId="-1" />
  <row Id="5597" PostHistoryTypeId="2" PostId="2884" RevisionGUID="43c60238-6ba0-425b-a96e-4562ae920c9e" CreationDate="2010-08-17T16:57:28.337" UserId="1638" Text="Paper is your friend to start with and get some good ideas going. &#xD;&#xA;&#xD;&#xA;Chris Howe is right, Google Sketch up is one of the easiest 3d modeling packages to make basic shapes in. Sketch Up's ability to export models as Collada files, that can be easily imported into most 3d game engines, make it great for fast prototyping and iteration. I have done this in Unity 3d to make basic level layouts for testing.&#xD;&#xA;&#xD;&#xA;Another great thing about this workflow is you can take the files you tested on and import them into a higher powered 3D application such as Maya for texturing and detail.&#xD;&#xA;&#xD;&#xA;The only thing that Google Sketch up does not do well is Spheres. You can create arcs and cylinders but spheres are a pain. If you plan on starting from a sphere or adding on to a sphere do not use sketch up.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5598" PostHistoryTypeId="2" PostId="2885" RevisionGUID="839955dc-b31f-4547-be0b-d9b692c2730f" CreationDate="2010-08-17T17:25:27.777" UserId="666" Text="Singletons are a great way to store a shared state in a early prototype. &#xD;&#xA;&#xD;&#xA;They are not a silver bullet and come with some problems, but they are a very useful pattern for certain UI/Logic states. &#xD;&#xA;&#xD;&#xA;For example in the iOS, you use singletons for getting the [UIApplication sharedApplication], in cocos2d you can use it to get references to certain objects like [CCNotifications sharedManager] and personally I usually start out with a [Game sharedGame] singleton where I can store state that is shared between a lot of different components.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5599" PostHistoryTypeId="5" PostId="2851" RevisionGUID="0dcde2ca-40e2-457d-88c7-8c1a43bf7776" CreationDate="2010-08-17T18:01:02.830" UserId="1740" Comment="Fixed some things caused by sleep deprivation. Hopefully there's no outstanding errors.; added 21 characters in body" Text="When speaking at the hobbyist level, people wear many hats indeed. But the capabilities of each type of member really depends entirely on the individuals. At least, whenever I've looked in the past. I am not particularly successful, but this is what I've gathered.&#xD;&#xA;&#xD;&#xA;Here's my 5-in-morning brain-dump on the topic, however. You need most of the following things (these roles might be combined into a few individuals. I've pluralized these, although you might only have one of each role between your team):&#xD;&#xA;&#xD;&#xA;* Designers/idea people. A person who comes up with ideas and key concepts that comprise your game.&#xD;&#xA;   * Ideally, this should be everyone in the team, so all players in your team keep interested, and they should each have a say in what sort of game is made in their own way.&#xD;&#xA;   * Be careful. Make sure that people can agree to a general concept, and talk it out until the idea makes sense. Try to get every on board here, since a clear idea is tremendously important in making sure tasks go like planned.&#xD;&#xA;* Artist.&#xD;&#xA;   * You can wait on this (placeholder art or programmer scribbles), but your ability to make certain kinds of progress can be severely hindered without the ability to create the intended visuals in-game. Especially if you require that sort of visual feedback to keep yourself motivated. Also, art is definitely a large marketing point of most games, and good visuals and eyecatching screenshots will pull in an audience.&#xD;&#xA;* Musician/Audio Person&#xD;&#xA;   * This can also be waited on. Arguably audio can be less &quot;important&quot;, as is evident by certain games completely foregoing sound, but it still has a huge impact on the feel of the game, especially the musical soundtrack. It is worth finding a capable musician.&#xD;&#xA;* Programmers/Scripters&#xD;&#xA;   * Vital! The game's events and logic need to be programmed to an extremely large degree. Whether this is low-level system control, or a script written in a cookie cutter game maker tool, someone needs to program the scenarios. This tedium is real and necessary. Lack of programming skill bites you in butt, as you are constantly finding yourself limited in what you can do with the tools you can manage.&#xD;&#xA;   * At the same time, having bountiful programming skill can be a curse of its own. Suddenly there's a desire there to overcomplicate simple tasks and worse yet, they might waste time writing engines instead of writing games (speaking from my own pitfalls).&#xD;&#xA;   * Even tools like Construct technically have you &quot;program&quot;. Whether you do it explicitly in a language or in some sort of tool that does it for you, you need to control the execution and flow of the game. This is a tedium to be expected of most if not all games.&#xD;&#xA;   * You need balance. Rushing out code ends up in bugs and a mess that cannot be maintained. On the other hand, slowly fleshing out engines and systems for stability are useful, but eventually you need to release something.&#xD;&#xA;   * Pre-existing tools are out there for a reason, but they have restrictions. You might be able to get a way without a &quot;systems&quot; programmer, but you might not. It entirely depends on the scale and type of the project. The closer it is to an existing system, the easier a time you'll have. But to make more &quot;innovative&quot; things, you may find yourself with cheesy workarounds and starting at least remotely from scratch.&#xD;&#xA;* Mathematicians/Statisticians&#xD;&#xA;   * If your game needs math, or needs math and you don't realize it yet, you need someone knowledgeable (or at least know how to use the Internet) to consult about problems. Ranging from geometry and trigonometry, to data compression, to balancing damage distributions and levelling curves in RPGs, collision detection, etc. Depending on what you end up doing, math is required. Not always, but often. Keep it in mind when you run into a problem, don't just run away in panic.&#xD;&#xA;* Writers&#xD;&#xA;   * Depending on the type of game, you may need a competent word-smith to captivate your audience. A person who's good with plot twists and clever prose, to use for scripted dialog, descriptive flavor text, introductions and whatever else you need.&#xD;&#xA;   * A writer for your design documents (if any) might also be nice. This style of writing should be much more explicit and technical as required to avoid ambiguities and problems. This all depends though. Not every team needs this, and you can sometimes dive right into the game-creation parts without writing a document or even a to-do list. Just keep it in mind. This person is likely a programmer.&#xD;&#xA;&#xD;&#xA;Keep in mind that one team member in a hobbyist team will likely fill most of these roles.&#xD;&#xA;&#xD;&#xA;As a personal rule, I find that I am typically the programmer, and I find assistance with artists and musicans. Occasionally, I'll call on a second or third programmer to help speed up the flow. The writing and design things are handled by every team member. Mathematical people are likely the programmer-types as well. But beware, not every programmer is tremendously good at math, some just know enough to get by. Overlap in design roles is especially critical, in my opinion, to keep everyone on board.&#xD;&#xA;&#xD;&#xA;It's best to either not depend on people to do their part, or to only depend on reliable people (with whom you hold great confidence), since projects can fall apart due to one person not doing their part. As has happened so many times to me. This means that you might find yourself wanting to learn things on your own -- however, this leads to lots of time wasted learning skills you wouldn't need to learn if you were in a team (and now they can't be done in parallel). Be careful.&#xD;&#xA;&#xD;&#xA;Your own experience is the only true guide for this sort of thing, and your first few encounters with hobbyist development will probably not yield anything (it's disappointing, but as far as I can tell, fact -- but never get discouraged, as you learn valuable lessons along the line).&#xD;&#xA;&#xD;&#xA;Well hopefully somebody finds this interesting, I might end up disagreeing with myself later, since I was sort of trailing off midway through writing this, but I kept with it, even though it was 5am. Time for bed." />
  <row Id="5600" PostHistoryTypeId="2" PostId="2886" RevisionGUID="a3090799-e433-49f1-87c4-6e6baafac7e3" CreationDate="2010-08-17T18:05:58.060" UserId="865" Text="A detail might be that the education quality across US is relatively consistent whereas a fair part of Europe lacks (or lacked) that, so there's just less programmer output. Also, immigration is still a fair step in ones life. Same for access to computers, in the US everyone and his dog had a game system as a kid, in Eastern Europe they're still catching up (fast though).&lt;br&gt;&#xD;&#xA;Also, it's much easier to move from, say, LA to NY for a job, than it is to move from Poland to the Netherlands, as there's the language issue which you won't have within the US. So it's easier to fill positions in US as you can source from a much larger pool (heck most Europeans speak English, but good luck finding a French speaking coder in the US if you have a French office)." />
  <row Id="5601" PostHistoryTypeId="16" PostId="2886" RevisionGUID="a3090799-e433-49f1-87c4-6e6baafac7e3" CreationDate="2010-08-17T18:05:58.060" UserId="-1" />
  <row Id="5602" PostHistoryTypeId="2" PostId="2887" RevisionGUID="51659c9c-0372-41a3-b386-a7c6c968c96f" CreationDate="2010-08-17T18:29:01.463" UserId="1134" Text="Definitely a non-exhaustive list, but here goes:&#xD;&#xA;&#xD;&#xA;Cons&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;* **Lifetime management**.  Singletons and globals may like to start up before key systems (e.g. heap) are initialized, depending on how you set them up.  If you ever want to tear them down (useful if you're doing leak tracking, for instance) you have to be careful about the teardown order or start getting into things like [phoenix singletons][2].  (See [static initialization order fiasco][4].)&#xD;&#xA;* **Access control**.  Should rendering only have const access to game data, while update gets non-const?  This may be harder to enforce with singletons and globals.&#xD;&#xA;* **State**.  As Kaj pointed out, it's harder to functionally decompose and transform singletons to work at all in a non-shared-memory architecture.  It also has potential performance implications for other types of [NUMA][1] systems (accessing memory that isn't local).  Singletons usually represent centralized state, and thus are the antithesis of transforms that are made easier by purity.&#xD;&#xA;&#xD;&#xA;Either pro or con&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;* **Concurrency**.  In a concurrent environment, singletons can either be a pain (you must consider data race / reentrancy issues) or a blessing (it's easier to centralize and reason about locking and resource management).  Clever use of things like thread local storage can mitigate potential issues somewhat, but it is not usually an easy problem.&#xD;&#xA;* **Codegen** (depending on compiler, architecture, etc):  For a naive create-on-first-use singleton implementation, you may be evaluating an extra conditional branch for each access.  (This can add up.)  Multiple globals used in a function may bloat the [literal pool][3].  A &quot;struct of all globals&quot; approach may save space in the literal pool: only one entry to the base of the struct, and then offsets encoded in the load instructions.  Finally, if you're avoiding globals and singletons at all costs, you generally need to use at least a little extra memory (registers, stack, or heap) to pass pointers, references, or even copies around.&#xD;&#xA;&#xD;&#xA;Pros&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;* **Simplicity**.  If you know the cons listed above don't affect you as much (e.g. you're working in a single-threaded environment for a single CPU handheld platform), you avoid some architecture (such as the aforementioned argument-passing).  Singletons and globals may be easier to understand for less experienced coders (although it may be easier to use them incorrectly).&#xD;&#xA;* **Lifetime management** (again).  If you use a &quot;struct of globals&quot; or some mechanism other than a create-on-first-request, you can have easy to read and fine-grained control over initialization and destruction order.  You automate this to some degree, or manually manage it (having to manage it may be a pro or a con, depending on the number of globals/singletons and their inter-dependencies).&#xD;&#xA;&#xD;&#xA;We use a &quot;struct of global singletons&quot; a lot in our handheld titles.  PC and console titles tend to rely on them less; we'll switch more toward an event-driven/messaging architecture.  That having been said, the pc/console titles still often use a central TextureManager; since it usually wraps a single shared resource (the texture memory) this has made sense for us.&#xD;&#xA;&#xD;&#xA;If you keep your API relatively clean, it might not be too terribly hard to refactor out of (or into!) a singleton pattern when you need...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://secure.wikimedia.org/wikipedia/en/wiki/Non-Uniform_Memory_Access&#xD;&#xA;[2]: http://books.google.com/books?id=aJ1av7UFBPwC&amp;lpg=PA137&amp;ots=YQiFWtUf4U&amp;dq=phoenix%20singleton&amp;pg=PA137#v=onepage&amp;q=phoenix%20singleton&amp;f=false&#xD;&#xA;[3]: https://secure.wikimedia.org/wikipedia/en/wiki/Literal_pool&#xD;&#xA;[4]: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12" />
  <row Id="5603" PostHistoryTypeId="2" PostId="2888" RevisionGUID="8ed1580a-437e-4686-b7f3-dba1ee9974d2" CreationDate="2010-08-17T18:34:24.480" UserId="891" Text="[**Unity**][1] is a very popular engine/WYSIWYG editor which allows programmers to expose easy to modify &quot;components&quot; which artists/designers can attach to entities to give functionality within the game.  A bunch of components come standard which provide a lot of the basic functionality for games.&#xD;&#xA;&#xD;&#xA;From the Unity site:&#xD;&#xA;&gt; **Play, Pause, and Step**  &#xD;&#xA;Click the Play button to instantly run your game. Pause and Step forward to analyze complex behavior in detail. While the game is running (or paused), you can alter values, assets, or even scripts! This means you can do more experimentation and more testing for a better final game.&#xD;&#xA;&#xD;&#xA;&gt; **Easy Editor Customization**  &#xD;&#xA;Streamline your workflow using simple, Editor-specific scripts. We wrote the Editor using Unity’s own scripting, so anything we can do in the Editor, you can do as well.&#xD;&#xA;&#xD;&#xA;&gt; **Customizable Editor Layout**  &#xD;&#xA;Choose from one of many built-in application arrangements, or create and save your own. Different tasks might benefit from different arrangements, so use easy hotkeys to switch arrangements as needed.&#xD;&#xA;&#xD;&#xA;&gt; **Drag 'n Drop Everything**  &#xD;&#xA;Visually drag assets and objects in the editor to assign Textures, Audio, Behaviors, and script variables. Create logical GameObject hierarchies to manage and maximize your game's functionality.&#xD;&#xA;&#xD;&#xA;&gt; **Prefabs**  &#xD;&#xA;To streamline the repeated use of complex GameObjects, you can turn one or more of them into a Prefab. This Prefab can then be easily placed throughout the game or instantiated at runtime. Any changes to the original prefab are propagated to all dependents, so both major and minor adjustments can be made very quickly to a large number of GameObjects.&#xD;&#xA;&#xD;&#xA;&gt;  *- unity3d.com/unity/features/*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com" />
  <row Id="5604" PostHistoryTypeId="2" PostId="2889" RevisionGUID="ac820cc3-e619-4880-8c4d-d37bdbb45773" CreationDate="2010-08-17T19:12:12.547" UserId="119" Text="You can't take Europe as one blob and make any meaningful comparisons with the US. The cost of living in e.g. Greece is quite a bit lower than the US, so it doesn't matter if your salary is lower." />
  <row Id="5605" PostHistoryTypeId="16" PostId="2889" RevisionGUID="ac820cc3-e619-4880-8c4d-d37bdbb45773" CreationDate="2010-08-17T19:12:12.547" UserId="-1" />
  <row Id="5609" PostHistoryTypeId="2" PostId="2891" RevisionGUID="a0094c09-9360-43d1-92d3-9778ae60b26a" CreationDate="2010-08-17T21:09:29.613" UserId="18" Text="Google's Chris Pruett talked about writing real-time games for android in Google I/O [2009](http://code.google.com/events/io/2009/sessions/WritingRealTimeGamesAndroid.html) and again in [2010](http://code.google.com/events/io/2010/sessions/writing-real-time-games-android.html). He talks about Java performance on Android among other topics. He also made a game, [Replica Island](http://replicaisland.net/), in Java and you can download the [source code](http://code.google.com/p/replicaisland/) to get an idea of how an Android Java game might look like. His [blog](http://replicaisland.blogspot.com/) about the game also has several insightful articles.&#xD;&#xA;&#xD;&#xA;The typical pitfalls are similar to those of writing in other [garbage collected languages](http://gamedev.stackexchange.com/questions/7/what-are-typical-pitfalls-when-writing-games-with-a-managed-language-like-c), you use a object pools and allocate stuff in advance to avoid having the GC run when you don't want it to. Methods are virtual by default in Java and it helps to mark them as static and classes as final when you don't need to override them. The Android Eclipse plugin comes with some neat tools to help you profile your application and monitor heap allocations." />
  <row Id="5611" PostHistoryTypeId="5" PostId="2891" RevisionGUID="e52b16c9-a32a-488f-a01e-a3925d5b61b8" CreationDate="2010-08-17T21:15:49.377" UserId="18" Comment="deleted 22 characters in body" Text="Google's Chris Pruett talked about writing real-time games for android in Google I/O [2009](http://code.google.com/events/io/2009/sessions/WritingRealTimeGamesAndroid.html) and again in [2010](http://code.google.com/events/io/2010/sessions/writing-real-time-games-android.html). He talks about Java performance on Android among other topics. He also made a game, [Replica Island](http://replicaisland.net/), in Java and you can download the [source code](http://code.google.com/p/replicaisland/) to get an idea of how an Android Java game might look like. His [blog](http://replicaisland.blogspot.com/) about the game also has several insightful articles.&#xD;&#xA;&#xD;&#xA;The typical pitfalls are similar to those of writing in other [garbage collected languages](http://gamedev.stackexchange.com/questions/7/what-are-typical-pitfalls-when-writing-games-with-a-managed-language-like-c), you use a object pools and allocate stuff in advance to avoid having the GC run when you don't want it to. Methods are virtual by default in Java and it helps to mark them as final when you don't need to override them. The Android Eclipse plugin comes with some neat tools to help you profile your application and monitor heap allocations." />
  <row Id="5612" PostHistoryTypeId="10" PostId="2872" RevisionGUID="eeb9356b-91b9-403b-b481-da95fc88e4e9" CreationDate="2010-08-17T21:26:26.810" UserId="-1" CloseReasonId="3" Text="[{&quot;Id&quot;:1091,&quot;DisplayName&quot;:&quot;JasonD&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="5614" PostHistoryTypeId="2" PostId="2892" RevisionGUID="825a13d9-2852-4f3c-9125-3aac7ff454b9" CreationDate="2010-08-17T22:18:03.823" UserId="1173" Text="Is there any cross platform libraries available for handling input from a microphone?&#xD;&#xA;&#xD;&#xA;I am thinking beyond voice chat to noise / voice recognition.&#xD;&#xA;&#xD;&#xA;I am putting together a plan for a role playing game and in thinking of features I was thinking it would be nice if the player could be standing in a crowded place and yell and have the npc's react to that and look at the player for example.&#xD;&#xA;&#xD;&#xA;As I plan to make this an open source project I want to make it as cross platform friendly as possible." />
  <row Id="5615" PostHistoryTypeId="1" PostId="2892" RevisionGUID="825a13d9-2852-4f3c-9125-3aac7ff454b9" CreationDate="2010-08-17T22:18:03.823" UserId="1173" Text="Voice input in games beyond voip chat" />
  <row Id="5616" PostHistoryTypeId="3" PostId="2892" RevisionGUID="825a13d9-2852-4f3c-9125-3aac7ff454b9" CreationDate="2010-08-17T22:18:03.823" UserId="1173" Text="&lt;cross-platform&gt;&lt;input&gt;&lt;voice&gt;" />
  <row Id="5617" PostHistoryTypeId="2" PostId="2893" RevisionGUID="8240924d-010a-4175-93c8-65270162cbea" CreationDate="2010-08-17T22:25:17.250" UserId="1143" Text="The original Worms probably didn't do anything more complex than bitmap/bitmap intersections - i.e. does the bitmap of the grenade intersect with the collision map of the world. Moving the grenade (or whatever) would follow these steps:&#xD;&#xA;&#xD;&#xA;1. Can the object move down one pixel without a collision? If so, move object down one pixel and end test.&#xD;&#xA;2. Can the object move left and down without a collision? If so, move object down and left one pixel and end test.&#xD;&#xA;3. Can the object move right and down without a collision? If so, move object down and right one pixel and end test.&#xD;&#xA;4. If object moved left and down (2) last time, can object move left one pixel? If so, move object left one pixel and end test.&#xD;&#xA;5. If object moved right and down (3) last time, can object move left one pixel? If so, move object right one pixel and end test.&#xD;&#xA;&#xD;&#xA;You probably only want to do (4) and (5) for a few frame to simulate friction, e.g. repeat (4) for each preceding (2).&#xD;&#xA;" />
  <row Id="5618" PostHistoryTypeId="2" PostId="2894" RevisionGUID="239f36a6-bccf-4e49-bd7e-4d556ec3d77b" CreationDate="2010-08-17T22:34:25.823" UserId="659" Text="This company appears to be experts in the field of GA, finding pracical uses for it, including as an alternative to spherical harmonics in a lighting system:&#xD;&#xA;&#xD;&#xA;http://www.geomerics.com/technology.htm" />
  <row Id="5619" PostHistoryTypeId="2" PostId="2895" RevisionGUID="286ce26d-819a-4dd7-958e-66c5c0c91408" CreationDate="2010-08-17T22:43:48.527" UserId="659" Text="If it's specifically for font textures, then you probably do something non-optimal but nice and simple:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sort characters by height, tallest first&#xD;&#xA;&#xD;&#xA;Start at 0,0 Place first character at current coords, advance X, place next one, repeat until we can't fit another&#xD;&#xA;&#xD;&#xA;Reset X to 0, advance Y downwards by the height of the tallest character in the row, and fill another row&#xD;&#xA;&#xD;&#xA;Repeat until we're out of characters, or can't fit another row." />
  <row Id="5620" PostHistoryTypeId="5" PostId="493" RevisionGUID="b90bdd25-f2c1-42e6-aee4-f0c4672a418b" CreationDate="2010-08-17T22:51:17.910" UserId="55" Comment="added 9 characters in body" Text="# [GIT][1]  &#xD;&#xA;Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging. &#xD;&#xA;&#xD;&#xA;A major downside of GIT is that it stores the entire history locally. (Yes, you can perform surgery to cut that down, but it's the default behavior). It's not a problem at all for source files, but if you have a large project with gigabytes of asset data, it becomes a problem quickly. In my current experience, I'd recommend GIT only for smaller or source-only repos. &#xD;&#xA;&#xD;&#xA;If you're still curious about GIT, check out http://whygitisbetterthanx.com/ for some good information/metrics. Also check see https://git.wiki.kernel.org/index.php/GitSvnComparsion&#xD;&#xA;&#xD;&#xA;  [1]: http://git-scm.com/" />
  <row Id="5622" PostHistoryTypeId="2" PostId="2896" RevisionGUID="84082535-f110-4617-a896-1a99cb9dfed9" CreationDate="2010-08-17T23:40:00.607" UserId="395" Text="[PortAudio](http://www.portaudio.com) should have a cross-platform input API, but I've never tried using it." />
  <row Id="5623" PostHistoryTypeId="2" PostId="2897" RevisionGUID="f67f7899-c553-4652-a67c-bc862650d35b" CreationDate="2010-08-18T02:22:42.207" UserDisplayName="splashmango" Text="Not to sound trite, but you'll also be better off with a pile of sticky notes. This will help not only with generating several renditions of maps/location-based venues, but makes for more efficient workflows and ui design. Often, it's the low tech applications that reign supreme. Stickies notes are also very effective when working with a team set of various personalities and divergent approaches. For 3d visualization ... have to agree with the rest. Sketchup takes the cake in producing workable solutions especially when dealing with vertical planes and relational environmental setups." />
  <row Id="5624" PostHistoryTypeId="2" PostId="2898" RevisionGUID="53d7e0e3-dba0-4547-ba30-e1ed7b1b9873" CreationDate="2010-08-18T03:03:03.653" UserId="553" Text="I'd recommend implementing the [Real-time Transport Protocol (RTP)][1], or something similar that suites your needs. It includes [Quality of Service (QoS)][2] monitoring with the [RTP Control Protocol (RTCP)][3] for minimizing &quot;jittery&quot; and &quot;choppy&quot; effects with audio streams.&#xD;&#xA;&#xD;&#xA;Even if you don't need all the features of the protocol, it is worth investigating to see an example of how the issues you are experiencing are solved. However, you'll likely have to weigh the choppy/jittery effects against latency if the codec remains static. The consistency of the audio is improved by buffering and buffering takes time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Real-time_Transport_Protocol&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Quality_of_service&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Real-time_Transport_Protocol" />
  <row Id="5625" PostHistoryTypeId="2" PostId="2899" RevisionGUID="01ed850e-b352-49f6-826d-2b397636e96e" CreationDate="2010-08-18T04:04:24.000" UserId="1759" Text="My partner and I are starting to get into game development on the iPhone. I'm a programmer and he's not. We are looking for some good **language agnostic** game programming books. Hopefully things that will explain basic game development principles without focusing too much on the particulars of a language and more on the concepts needed to build and design games.&#xD;&#xA;&#xD;&#xA;We will probably focus on 2D games (at the beginning anyways) so no need for books on in depth 3D math, complex AI, etc.&#xD;&#xA;&#xD;&#xA;Any suggestions?" />
  <row Id="5626" PostHistoryTypeId="1" PostId="2899" RevisionGUID="01ed850e-b352-49f6-826d-2b397636e96e" CreationDate="2010-08-18T04:04:24.000" UserId="1759" Text="What Game Development books should my partner/myself read?" />
  <row Id="5627" PostHistoryTypeId="3" PostId="2899" RevisionGUID="01ed850e-b352-49f6-826d-2b397636e96e" CreationDate="2010-08-18T04:04:24.000" UserId="1759" Text="&lt;iphone&gt;&lt;language-agnostic&gt;" />
  <row Id="5628" PostHistoryTypeId="2" PostId="2900" RevisionGUID="b5f9c44f-b3f0-43d3-b0b5-dabca6ab3db4" CreationDate="2010-08-18T04:11:41.203" UserId="189" Text="Keep in mind the differences between game **development** (the all-inclusive process of making a game), game **programming** (writing the code that makes a game happen), and game **design** (designing the game: plot, characters, mechanics, etc.). You seem to be using them interchangeably.&#xD;&#xA;&#xD;&#xA;But it appears you are looking for iPhone Game development/programming, not game design. The major book at the moment appears to be [Beginning iPhone Games Development][1].&#xD;&#xA;&#xD;&#xA;There is also [iPhone Game Development: Developing 2D &amp; 3D games in Objective-C][2] which has a wide range of reviews, good and bad; I'd give it a second thought before purchasing.&#xD;&#xA;&#xD;&#xA;The problem is, if you're looking into iPhone development, Objective-C is your only language option as far as I know, and development for the iPhone is considerably different than PC development. I think in this case you'd do best to try one of these two books, rather than starting with a PC game development book.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-iPhone-Games-Development-Cabrera/dp/1430225998/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1282104498&amp;sr=8-1&#xD;&#xA;  [2]: http://www.amazon.com/iPhone-Game-Development-Developing-Objective-C/dp/0596159854/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1282104498&amp;sr=8-2" />
  <row Id="5629" PostHistoryTypeId="5" PostId="2839" RevisionGUID="e88e620b-f7bd-4fc6-b03e-7d30227ec9f5" CreationDate="2010-08-18T04:27:12.223" UserId="323" Comment="added 102 characters in body" Text="I spent a few months at one job coming up with a better texture packing algorithm.&#xD;&#xA;&#xD;&#xA;The algorithm we started with was simple. Collect all the input items. Sort them by total pixels consumed, large-to-small. Lay them out in your texture in scanline order, just testing stuff from the topleft pixel to the topright pixel, moving down a line, and repeating, resetting to the topleft pixel after every successful placement.&#xD;&#xA;&#xD;&#xA;You either need to hardcode a width or come up with another heuristic for this. In an attempt to preserve squareness, our algorithm would start at 128, then increase by 128s until it came up with a result that wasn't any deeper than it was wide.&#xD;&#xA;&#xD;&#xA;So, we had that algorithm, and I decided to improve it. I tried a bunch of wacky heuristics - trying to find objects that fit together, doing some weighting over a bunch of desired space packing properties, rotating and flipping. After all my work, quite literally three months of work, I ended up saving 3% space.&#xD;&#xA;&#xD;&#xA;Yeah. 3%.&#xD;&#xA;&#xD;&#xA;And after we ran our compression routine over it, it actually ended up *larger* (which I still can't explain) so we threw the entire thing out and went back to the old algorithm.&#xD;&#xA;&#xD;&#xA;Sort items, jam into texture in scanline order. There's your algorithm. It's easy to code, fast to run, and you won't get much better without an amazing amount of work. That work just isn't worthwhile unless your company is at *least* 50 people large, and probably more.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;And as a side note, I just implemented this algorithm (fixed width 512 pixels) for quite literally the exact same application that you're doing (no ftgles, but opengl-rendered freetype glyphs.) Here's the result. It looks blurry because mine is using Valve's [distance-field based text rendering algorithm][2], which also accounts for the extra space between glyphs. Obviously, there's not a lot of empty space left over, and it does a good job of cramming things into open spots.&#xD;&#xA;&#xD;&#xA;All the code for this is BSD-licensed and available [at github][3] ([actual packing code file][4]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/e1Gal.png&#xD;&#xA;  [2]: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&#xD;&#xA;  [3]: http://github.com/zorbathut/glorp&#xD;&#xA;  [4]: http://github.com/zorbathut/glorp/blob/master/font_baker.cpp" />
  <row Id="5630" PostHistoryTypeId="5" PostId="2616" RevisionGUID="d377bd36-d7a2-4191-b94e-23dff7db2949" CreationDate="2010-08-18T04:54:51.973" UserId="1638" Comment="added 183 characters in body" Text="Writing branching story-lines is effective but time consuming and doesn't account for player autonomy to do random things. Players will enjoy the ability to change the story but will still know they are on a planned path. Mass Effect is a good example of this.&#xD;&#xA;&#xD;&#xA;Separate story elements from player autonomy like Red Dead Redemption as Tetrad pointed out. This makes it difficult to allow players to change the story and is very &quot;Theme Park&quot; design.&#xD;&#xA;&#xD;&#xA;Honestly playing a game where you could ruin the story would actually be kind of fun, but you would have to have an appropriate response from the game for doing that though.&#xD;&#xA;&#xD;&#xA;It all comes down to how well you plan out your story.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Game Career Guide just released [this][1] article on Nonlinear Narrative. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamecareerguide.com/features/882/nonlinear_narrative_in_games_.php?page=4" />
  <row Id="5631" PostHistoryTypeId="2" PostId="2901" RevisionGUID="46f85d20-8ed7-4c76-a8e8-70d07dd42638" CreationDate="2010-08-18T05:20:49.433" UserId="154" Text="Check out [Carnegie Mellon's Project Sphinx][1] it's an open source toolkit for speech recognition. I haven't used it, but it's certainly a place to start.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cmusphinx.sourceforge.net/" />
  <row Id="5632" PostHistoryTypeId="6" PostId="2899" RevisionGUID="b436fe0e-2177-411b-86f5-fce932f084f7" CreationDate="2010-08-18T06:38:57.947" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;books&gt;&lt;language-agnostic&gt;" />
  <row Id="5633" PostHistoryTypeId="16" PostId="2900" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-18T06:39:43.683" UserId="51" />
  <row Id="5634" PostHistoryTypeId="16" PostId="2899" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-18T06:39:43.683" UserId="51" />
  <row Id="5635" PostHistoryTypeId="2" PostId="2902" RevisionGUID="4e093595-53e1-43e0-a490-59a482a37497" CreationDate="2010-08-18T06:43:49.403" UserId="119" Text="Must read: Steve Swink - Game Feel" />
  <row Id="5636" PostHistoryTypeId="16" PostId="2902" RevisionGUID="4e093595-53e1-43e0-a490-59a482a37497" CreationDate="2010-08-18T06:43:49.403" UserId="-1" />
  <row Id="5637" PostHistoryTypeId="5" PostId="1265" RevisionGUID="4be1ef7a-43fd-43ea-86a8-093193080eee" CreationDate="2010-08-18T06:47:59.050" UserId="51" Comment="cleaned up the question" Text="Let's make a list of the best books that every game developer should read.&#xD;&#xA;&#xD;&#xA;Each answer should have a single book (by title and optionally author), a link to buy the book, and a short synopsis of what the book is about." />
  <row Id="5638" PostHistoryTypeId="4" PostId="1265" RevisionGUID="4be1ef7a-43fd-43ea-86a8-093193080eee" CreationDate="2010-08-18T06:47:59.050" UserId="51" Comment="cleaned up the question" Text="Must read game development books" />
  <row Id="5639" PostHistoryTypeId="6" PostId="1265" RevisionGUID="4be1ef7a-43fd-43ea-86a8-093193080eee" CreationDate="2010-08-18T06:47:59.050" UserId="51" Comment="cleaned up the question" Text="&lt;books&gt;&lt;learning&gt;" />
  <row Id="5640" PostHistoryTypeId="2" PostId="2903" RevisionGUID="7191d173-8568-410a-8e05-05ded4f13175" CreationDate="2010-08-18T07:43:52.743" UserId="678" Text="I'm currently prototyping a simple two-player adversarial game, where the players are able to move around and shoot at each other with cannons. I would like the playing area to feel essentially unbounded, but I don't want one of the players to be able to stall the game by just rushing away from his opponent.&#xD;&#xA;&#xD;&#xA;The standard solution to this dilemma in the 2D days was to introduce a torus topology: if a player leaves the screen from the top, they enter at the bottom. If they leave from the right, they enter from the left. I am looking for a workable analogon to this system for games played from a third-person perspective.&#xD;&#xA;&#xD;&#xA;Technically you can implement this just fine. However, since they lack complete battlefield overview, it will confuse the heck out of the players if their opponent pops out of/into existence. &#xD;&#xA;&#xD;&#xA;Currently I'm thinking of combining the following techniques:&#xD;&#xA;&#xD;&#xA; - A map that shows top-down overview. This provides the context you used ot have in the 2D game.&#xD;&#xA; - Rendering the closest periodic image of the enemy as solid. This is not necessarily the one in the same &quot;screen&quot;.&#xD;&#xA; - Rendering the others as &quot;ghosts&quot;.&#xD;&#xA;&#xD;&#xA;Will this be enough to make this design work? Can it be made to work better with some tweaks? Is torus topology and third person perspective just a really bad idea?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5641" PostHistoryTypeId="1" PostId="2903" RevisionGUID="7191d173-8568-410a-8e05-05ded4f13175" CreationDate="2010-08-18T07:43:52.743" UserId="678" Text="How to do an infinite torus topology battlefield for over-the-shoulder perspective." />
  <row Id="5642" PostHistoryTypeId="3" PostId="2903" RevisionGUID="7191d173-8568-410a-8e05-05ded4f13175" CreationDate="2010-08-18T07:43:52.743" UserId="678" Text="&lt;graphics&gt;&lt;game-design&gt;&lt;level-design&gt;" />
  <row Id="5643" PostHistoryTypeId="2" PostId="2904" RevisionGUID="5a00b6e3-9a67-407a-a6c3-85d878333824" CreationDate="2010-08-18T07:57:12.523" UserId="1495" Text="With barely enough time at our hands to complete the games we craft, how can you strike a good balance between solid software architecture and making good progress to get it all done?&#xD;&#xA;&#xD;&#xA;My personal challenge:&#xD;&#xA;How about being effective today and long-term thinking at the same time? Plus, while you're doing it you may just as well want to learn new things on the way instead of resorting to the same repetitive patterns you've been using those past 5 years?" />
  <row Id="5644" PostHistoryTypeId="1" PostId="2904" RevisionGUID="5a00b6e3-9a67-407a-a6c3-85d878333824" CreationDate="2010-08-18T07:57:12.523" UserId="1495" Text="Getting It Done vs Sound Software Design?" />
  <row Id="5645" PostHistoryTypeId="3" PostId="2904" RevisionGUID="5a00b6e3-9a67-407a-a6c3-85d878333824" CreationDate="2010-08-18T07:57:12.523" UserId="1495" Text="&lt;architecture&gt;&lt;time-management&gt;&lt;development-speed&gt;" />
  <row Id="5646" PostHistoryTypeId="2" PostId="2905" RevisionGUID="2c034339-d07b-4cc1-a2a2-199b1b5cda45" CreationDate="2010-08-18T07:58:29.790" UserId="1495" Text="This evaluates to true in my mindset today:&#xD;&#xA;&#xD;&#xA;- Pragmatism over Ideology&#xD;&#xA;- (1) Make it work (2) then make it right - game over if you forget step 2&#xD;&#xA;- Release it!&#xD;&#xA;- Too much up-front design will be a waste of time&#xD;&#xA;- TDD and Clean Code leads to more simple, more stable software designs&#xD;&#xA;" />
  <row Id="5647" PostHistoryTypeId="2" PostId="2906" RevisionGUID="9c4dbd4b-8473-4f5b-8ffb-fa044238e5e9" CreationDate="2010-08-18T08:04:16.047" UserId="1738" Text="How about playing the game on the top of some closed, finite 3d surface, such as a sphere or cube (or a noise function perturbed version of one of these to make it a more interesting generalized polyhedron).  This will give you the effect of wrapping around, which will make the inifnite chase scenario somewhat trickier for the players.  Having a 2D overview map would still have the popping off the one side and popping up on the other side issue, so perhaps a 3D map may be better: i.e., a simplified zoomed out overview of the 3D polyhedron model rendered with transparency." />
  <row Id="5648" PostHistoryTypeId="5" PostId="2905" RevisionGUID="1bb5eff8-a3bf-4605-875f-da06dbe351dd" CreationDate="2010-08-18T08:05:29.257" UserId="1495" Comment="Added links" Text="This evaluates to true in my mindset today:&#xD;&#xA;&#xD;&#xA;- Pragmatism over Ideology&#xD;&#xA;- (1) Make it work (2) then make it right - game over if you forget step 2&#xD;&#xA;- Release it!&#xD;&#xA;- Too much up-front design will be a waste of time&#xD;&#xA;- [TDD][1] and [Clean Code][2] leads to more simple, more stable software designs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/TDD&#xD;&#xA;  [2]: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" />
  <row Id="5649" PostHistoryTypeId="4" PostId="2904" RevisionGUID="ea6db993-763c-45b8-b8ae-bccb26a7578b" CreationDate="2010-08-18T08:06:57.040" UserId="1495" Comment="Made title less ambiguous" Text="Getting It Done vs Solid Software Design?" />
  <row Id="5650" PostHistoryTypeId="2" PostId="2907" RevisionGUID="3c87afdd-494f-4b4d-9eb0-37ac0800ebfa" CreationDate="2010-08-18T08:26:36.367" UserId="1219" Text="The less experience you have, the more time you waste with up-front design. Making good designs is something that you will learn by doing it and then seeing/evaluating how it turns out. Some decisions have far reaching but obscure implications. After some games you will probably be able to make the initial design pretty solid and it will pay off to invest some more time to this stage.&#xD;&#xA;&#xD;&#xA;My motto: get things done in the first place, but use you common sense to detect what components are more critical than others and designs those pretty well, within your time limit. For example, if AI is critical to your game, make sure that you can easily extend/change it later on. Or, if you're going to write a component that you will use in every game, design it for reusability. Track your time and don't go wild on designing. Set a design-deadline and after that, start hacking everything in to get your release-deadline. But make sure you note what points need refactoring/redesigning afterwards and calculate in some time before you start on the next game to improve those things, so that they don't get to bite you back!&#xD;&#xA;&#xD;&#xA;A good advice: if you have to choose between two options, don't linger too long over details. Most often, there is no &quot;good&quot; or &quot;bad&quot;. In some situations, A will be better, in some, B will be, and overall, the difference between both may not always be worth the time.&#xD;&#xA;&#xD;&#xA;There is a lot of experience to gain in designing software or games, so make sure you spend some of your time on research (e.g. reading a book on design, reading about others experience, talking with fellow programmers about your designs, etc...)." />
  <row Id="5651" PostHistoryTypeId="5" PostId="2905" RevisionGUID="b841e221-1dba-46ed-86e3-a78ddb18e38d" CreationDate="2010-08-18T09:10:26.217" UserId="1495" Comment="Corrected link to TDD" Text="This evaluates to true in my mindset today:&#xD;&#xA;&#xD;&#xA;- Pragmatism over Ideology&#xD;&#xA;- (1) Make it work (2) then make it right - game over if you forget step 2&#xD;&#xA;- Release it!&#xD;&#xA;- Too much up-front design will be a waste of time&#xD;&#xA;- [TDD][1] and [Clean Code][2] leads to more simple, more stable software designs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Test-driven_development&#xD;&#xA;  [2]: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" />
  <row Id="5652" PostHistoryTypeId="5" PostId="1280" RevisionGUID="eb05a069-acbf-4333-9f74-e58edd750e94" CreationDate="2010-08-18T10:48:36.100" UserId="1101" Comment="Added '3d' to the name to distinguish these titles from different books without the '3d' prefix." Text="[3D Game Engine Design](http://www.amazon.com/dp/0122290631/) and [3D Game Engine Architecture](http://www.amazon.com/dp/012229064X/) both by David Eberly, are quite good, if a bit heavy on the math.&#xD;&#xA;&#xD;&#xA;[Game Engine Gems](http://www.amazon.com/dp/0763778885/) *just* came out, and I've been enjoying its content so far. It's been a lot more helpful in some areas than the Game Programming Gems series (of which I've read up to Vol. 5)." />
  <row Id="5653" PostHistoryTypeId="2" PostId="2908" RevisionGUID="40cb9fda-fce7-4d8d-83d9-610810efaa82" CreationDate="2010-08-18T11:39:29.373" UserId="1764" Text="Have a look at [agile software development](http://en.wikipedia.org/wiki/Agile_software_development). Although it is not a silver bullet, it aims to do both (get it done **and** have solid software design)." />
  <row Id="5654" PostHistoryTypeId="2" PostId="2909" RevisionGUID="52286a75-df85-42f8-8d69-43d60e2bd882" CreationDate="2010-08-18T11:42:14.017" UserId="1463" Text="The Mastering Unreal Technology books are really good for learning how a great engine works.  Learning how a great engine works doesn't necessary teach the nuts and bolts of how to create an engine.  But, it will teach you the features of a great engine and how those features should work.&#xD;&#xA;&#xD;&#xA;There are two versions of the books.  An [older book][1] and a new set of three ([1][2], [2][3], [3][4])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mastering-Unreal-Technology-Level-Design/dp/0672326922/ref=pd_sim_b_7&#xD;&#xA;  [2]: http://www.amazon.com/Mastering-Unreal-Technology-Introduction-Design/dp/0672329913&#xD;&#xA;  [3]: http://www.amazon.com/Mastering-Unreal-Technology-II-Advanced/dp/0672329921/ref=pd_bxgy_b_img_b&#xD;&#xA;  [4]: http://www.amazon.com/Mastering-Unreal-Technology-III-Introduction/dp/0672330822/ref=pd_bxgy_b_img_c" />
  <row Id="5655" PostHistoryTypeId="16" PostId="2909" RevisionGUID="52286a75-df85-42f8-8d69-43d60e2bd882" CreationDate="2010-08-18T11:42:14.017" UserId="-1" />
  <row Id="5656" PostHistoryTypeId="2" PostId="2910" RevisionGUID="3bdeeabc-0c30-48be-9cf6-2fa9b8b7a874" CreationDate="2010-08-18T11:46:33.230" UserId="1091" Text="Even though it's more about the development process than actual programming, I'd still recommend anyone involved in development to read Rapid Development (the &quot;other&quot; Steve McConnell book)&#xD;&#xA;&#xD;&#xA;[Rapid Development (Amazon.com)][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Rapid-Development-Taming-Software-Schedules/dp/1556159005/" />
  <row Id="5657" PostHistoryTypeId="16" PostId="2910" RevisionGUID="3bdeeabc-0c30-48be-9cf6-2fa9b8b7a874" CreationDate="2010-08-18T11:46:33.230" UserId="-1" />
  <row Id="5658" PostHistoryTypeId="2" PostId="2911" RevisionGUID="ae0c6ff6-8766-4e49-b99a-e78e77bc1d36" CreationDate="2010-08-18T12:00:53.373" UserId="115" Text="I recently startet to programm some basic OpenGL stuff in Java, but OpenGL and DirectX is to much to handle and to understand for me and i'm getting bored really fast.&#xD;&#xA;Now i am wondering if there are other possibilities than OpenGL (or DirectX) to make simple 2D graphics and to get started in Game Development, even if its limited. I will probably use OpenGL anyway when i am more experienced.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5659" PostHistoryTypeId="1" PostId="2911" RevisionGUID="ae0c6ff6-8766-4e49-b99a-e78e77bc1d36" CreationDate="2010-08-18T12:00:53.373" UserId="115" Text="2D Game dev and Java. Other possibilities than OpenGL?" />
  <row Id="5660" PostHistoryTypeId="3" PostId="2911" RevisionGUID="ae0c6ff6-8766-4e49-b99a-e78e77bc1d36" CreationDate="2010-08-18T12:00:53.373" UserId="115" Text="&lt;2d&gt;&lt;java&gt;" />
  <row Id="5661" PostHistoryTypeId="2" PostId="2912" RevisionGUID="73662e22-400b-4947-8142-37a1cccca6c6" CreationDate="2010-08-18T12:03:57.127" UserId="189" Text="Of course! Java has a built in [Java 2D library][1] which requires no OpenGL or DirectX knowledge, and I highly recommend starting with it! In fact, it has pretty okay performance.&#xD;&#xA;&#xD;&#xA;The essential starting point is to define your own class which extends Frame (or Applet), and then override the `paint(Graphics g)` method and use `g` to draw to the screen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download-llnw.oracle.com/javase/tutorial/2d/" />
  <row Id="5662" PostHistoryTypeId="5" PostId="1141" RevisionGUID="5d1da71a-262f-44a2-8cad-53bf5fabbee8" CreationDate="2010-08-18T12:44:09.730" UserId="102" Comment="Fixed typo and changed pseudo-code to be more clear regarding what the variables are; deleted 1 characters in body" Text="I needed to solve a similar problem: pathfinding on a large maze-like grid with constantly changing &quot;costs&quot; and barriers.&#xD;&#xA;&#xD;&#xA;The thing is, in tower defense game the number of entities that need to have the path solved for them is usually much larger than the number of nodes in the graph. A* is **not** the most appropriate algorithm for handling this, because you'll need to solve it anew each time something is changed. Well it is appropriate if you need to find only one path, but in my case I needed to be able to handle entities which can appear in different locations and each has its own path.&#xD;&#xA;&#xD;&#xA;The [Floyd-Warshall][1] algorithm is far more appropriate, though for my case I wrote a custom algorithm that whenever a node changes, it re-calculates the cost to that node from all its neighbors, and then *if* the neighbors have been changed then it does it recursively for them.&#xD;&#xA;&#xD;&#xA;So in the beginning of the game, I just fire up this algorithm on all my &quot;goal&quot; nodes. Then, whenever a single node changes (for example, becomes un-passable), I just fire it up on that node and the change is propagated to all the nodes that will be affected, and then stopped. So no need for global recalculation, and the algorithm is completely independent from the number of entities that will require pathfinding.&#xD;&#xA;&#xD;&#xA;My algorithm was basically something like (pseudo-code):&#xD;&#xA;&#xD;&#xA;    update_node method in Node class:&#xD;&#xA;        $old &lt;- $my_score&#xD;&#xA;        find $neighbor node among all neighbors such that&#xD;&#xA;            $neighbor.score + distance_to($neighbor) is minimal&#xD;&#xA;        $my_score &lt;- $neighbor.score + distance_to($neighbor)&#xD;&#xA;        $next_node &lt;- $neighbor&#xD;&#xA;        if ($my_score != $old)&#xD;&#xA;            for each $neighbor&#xD;&#xA;                update_node($neighbor)&#xD;&#xA;&#xD;&#xA;With the initial score depending on whether the node is a target or some kind of barrier.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm" />
  <row Id="5663" PostHistoryTypeId="2" PostId="2913" RevisionGUID="2a92e7ad-5625-4524-bfda-bd2f65ffa1a2" CreationDate="2010-08-18T12:57:57.127" UserId="608" Text="In my  current project, lua scripts are called by the c++ functions on server side.&#xD;&#xA;After that, the scripts again call the c++ functions still in that solution.&#xD;&#xA;Why should we do such kind of things and not call the c++ fuction directly?&#xD;&#xA;What are the situations in which scripts are needed?" />
  <row Id="5664" PostHistoryTypeId="1" PostId="2913" RevisionGUID="2a92e7ad-5625-4524-bfda-bd2f65ffa1a2" CreationDate="2010-08-18T12:57:57.127" UserId="608" Text="Why we use scripts in game developing frequently? " />
  <row Id="5665" PostHistoryTypeId="3" PostId="2913" RevisionGUID="2a92e7ad-5625-4524-bfda-bd2f65ffa1a2" CreationDate="2010-08-18T12:57:57.127" UserId="608" Text="&lt;scripting&gt;" />
  <row Id="5666" PostHistoryTypeId="4" PostId="2913" RevisionGUID="f610f463-2e6f-4a7f-bf62-05f197fedb62" CreationDate="2010-08-18T13:14:25.410" UserId="608" Comment="edited title" Text="Why we heavily use scripts in game developing ? " />
  <row Id="5667" PostHistoryTypeId="2" PostId="2914" RevisionGUID="7034f2ec-a8a7-427a-8b2f-fe043e231bc0" CreationDate="2010-08-18T13:16:39.710" UserId="1219" Text="Scripts are usually **compiled at run time**, while the host language will be compiled at compile time. This means that we don't need to recompile if the script changes. Recompiling a full game can take minutes to hours, which implies a big productivity hit.&#xD;&#xA;&#xD;&#xA;Usually, the critical code or backend code will not be scripted. This code should run fast and often memory management is crucial.  &#xD;&#xA;In games, game logic and configuration are typically contained in script files. These **scripts can easily be updated by non-programmers** (like the designer) to tweak the gameplay. Script languages are easy and act in a forgiving manner for that purpose.&#xD;&#xA;&#xD;&#xA;Often, a script language is also used to do **scripting at real time**. This comes in handy for tweaking some gameplay elements or even for debugging. Many games provide a console for this (mostly in-house) purpose.&#xD;&#xA;&#xD;&#xA;It is very well possible that you create a game using an existing game engine, just by scripting. The **game engine layer is thus fully decouple from the game logic layer**. Modern engines can usually be used to create FPS or RTS games easily like this, but it is not possible for any genre. An MMO would probably require another type of engine.&#xD;&#xA;&#xD;&#xA;So the bottom line is decoupling. The benefits listed above often outweight the extra work to create or integrate a scripting language." />
  <row Id="5668" PostHistoryTypeId="2" PostId="2915" RevisionGUID="f23b7eda-4e7b-4390-8c8a-ab061de6b931" CreationDate="2010-08-18T13:17:53.637" UserId="1286" Text="There is also the library [Slick][1] which provides the most common features for developing 2D games (images, animations, sounds, gameloop...). It has the advantage over the Java 2D library to be more specific to video games as it includes collisions checking and a physics engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/" />
  <row Id="5669" PostHistoryTypeId="2" PostId="2916" RevisionGUID="eca97a0f-c530-460d-91cd-bc13081104d0" CreationDate="2010-08-18T14:29:40.877" UserId="1505" Text="I'd like to use either Bullet or ODE on low powered devices (mobile and consoles), but the frame rates are below the acceptable 25-30fps for simulations.&#xD;&#xA;&#xD;&#xA;I've found that one articulated body by itself is enough to degrade the performance of either engine.&#xD;&#xA;&#xD;&#xA;Are there optimizations or tricks I can use to get around these problems?" />
  <row Id="5670" PostHistoryTypeId="1" PostId="2916" RevisionGUID="eca97a0f-c530-460d-91cd-bc13081104d0" CreationDate="2010-08-18T14:29:40.877" UserId="1505" Text="Optimizing Bullet/ODE Physics on consoles and mobile phones" />
  <row Id="5671" PostHistoryTypeId="3" PostId="2916" RevisionGUID="eca97a0f-c530-460d-91cd-bc13081104d0" CreationDate="2010-08-18T14:29:40.877" UserId="1505" Text="&lt;3d&gt;&lt;physics&gt;&lt;optimization&gt;&lt;physics-engine&gt;" />
  <row Id="5672" PostHistoryTypeId="2" PostId="2917" RevisionGUID="7ab0fb07-77f1-4e79-aa65-6b7b7ec122b9" CreationDate="2010-08-18T14:44:33.943" UserId="744" Text="You asked the wrong question. The real question, I think, is why do we put up with &quot;non-scripting&quot; languages like C, C++, Java, and so on? And the answer is one reason: performance. (And maybe inertia, but that inertia is there because of performance, and anyone who can write good C/C++/Java can write at least passable Ruby/Python/Lua/JavaScript.)&#xD;&#xA;&#xD;&#xA;We use &quot;scripting&quot; languages (which really means, very high-level, garbage collected, and usually some form of looser typing and dynamic compilation) because they're generally easier languages for anyone - programmers included - to write code in. There's less _stupid stuff_ like remembering to free after you malloc or make sure your code is exception-safe, or remembering to make all your destructors virtual. If our computers were infinitely fast, we would be using &quot;scripting&quot; languages for everything." />
  <row Id="5673" PostHistoryTypeId="2" PostId="2918" RevisionGUID="52b5710a-9ba7-4f06-9f4f-d60472a1ecd4" CreationDate="2010-08-18T14:45:21.570" UserId="1742" Text="The route algorithm I used on my TD was backwards from normal pathing, however, instead of routing from the goal to the bad guys, I routed from the goal to every empty square on the board.&#xD;&#xA;&#xD;&#xA;This doesn't take very long, you just keep iterating the board until you've found your &quot;costs&quot;, and it provides good feedback for blocked routes (if you're doing those).&#xD;&#xA;&#xD;&#xA;Start with your board set to infinite cost, then set the goal square to cost zero, then iterate over the board checking to see if a neighbouring cell costs less than the current cost plus the travel cost.&#xD;&#xA;&#xD;&#xA;Once you've got your costs grid, you can quickly build a &quot;flow&quot; grid from that by testing the steepest gradient of cost on the cells. This works really well for massive amounts of bad guys because none of them ever path find, they just follow the virtual signposts.&#xD;&#xA;&#xD;&#xA;Another benefit is that this way you only have to run this task every time you adjust the obstructions (or in my game, when a creep eats through one of your towers)." />
  <row Id="5674" PostHistoryTypeId="2" PostId="2919" RevisionGUID="ccfd2899-be83-403e-ac13-f0f3f95cf0e6" CreationDate="2010-08-18T14:47:39.787" UserId="51" Text="Scripting languages for game logic is a very good example of the software architecture pattern &lt;a href=&quot;http://c2.com/cgi-bin/wiki?AlternateHardAndSoftLayers&quot;&gt;Alternate Hard and Soft Layers&lt;/a&gt;.  There's a good discussion on that site (and others I'm sure) on the benefits of doing so." />
  <row Id="5675" PostHistoryTypeId="2" PostId="2920" RevisionGUID="63da3cf8-5dd5-47f4-b86d-7107af795371" CreationDate="2010-08-18T14:53:31.927" UserId="51" Text="People are terrible at predicting the future.  This is especially true for games, where requirements can change on a daily basis.&#xD;&#xA;&#xD;&#xA;There's a principle called &lt;a href=&quot;http://c2.com/xp/YouArentGonnaNeedIt.html&quot;&gt;YAGNI&lt;/a&gt;, aka &quot;You Aren't Gonna Need It&quot;, which basically says that you shouldn't implement something until you *know* you're going to need it.  &#xD;&#xA;&#xD;&#xA;I've seen so many systems get bogged down with architectural rigidity that didn't actually use any of it since the features people thought they were going to need never got around to being used.&#xD;&#xA;&#xD;&#xA;My personal philosophy is &lt;a href=&quot;http://c2.com/cgi/wiki?DoTheSimplestThingThatCouldPossiblyWork&quot;&gt;Do the Simplest Thing That Could Possibly Work&lt;/a&gt;.  That being said, there's a difference between Getting It Done and Hacking Shit Together.  Writing code with a purpose shouldn't imply doing things that generate &quot;code smell&quot; like making everything public, of having blob classes that do everything, or any of those dozens of other things that signify &quot;bad&quot; code." />
  <row Id="5676" PostHistoryTypeId="2" PostId="2921" RevisionGUID="68369448-b6d6-46d7-9a33-cbcf311679e0" CreationDate="2010-08-18T15:30:39.850" UserId="189" Text="Is it practical to use a testing framework like JUnit in a game development situation? What sort of design considerations can you follow in order to make your game more testable? What parts of a game can/should be tested and what parts should/must be left to human testing?&#xD;&#xA;&#xD;&#xA;For example, if the game loop is encapsulated in one function, it seems like it would be terribly hard to test. I like to refactor out an &quot;update&quot; function that takes a time delta and moves forward the game logic; this allows some interesting tricks like the ability to slow the game down by feeding it fake, slower time deltas." />
  <row Id="5677" PostHistoryTypeId="1" PostId="2921" RevisionGUID="68369448-b6d6-46d7-9a33-cbcf311679e0" CreationDate="2010-08-18T15:30:39.850" UserId="189" Text="How to design a game's software such that it is easy to unit test?" />
  <row Id="5678" PostHistoryTypeId="3" PostId="2921" RevisionGUID="68369448-b6d6-46d7-9a33-cbcf311679e0" CreationDate="2010-08-18T15:30:39.850" UserId="189" Text="&lt;best-practices&gt;&lt;unit-testing&gt;" />
  <row Id="5679" PostHistoryTypeId="2" PostId="2922" RevisionGUID="b3817d31-2a9a-4e62-92fb-feb2cc392123" CreationDate="2010-08-18T15:55:03.923" UserId="1766" Text="Firstly I'd like to say that this doesn't seem like the right &quot;forum&quot; for this question as it actually doesn't relate directly to the development of games.&#xD;&#xA;&#xD;&#xA;As this is my first post on 'game development', I cannot include more links - sorry.&#xD;&#xA;&#xD;&#xA;**I recently obtained a Game Doctor SF7** (&quot;Professor SF2&quot; in the US I believe) backup unit for the Super Nintendo, **and I'd like to add battery backup** to it.&#xD;&#xA;&#xD;&#xA;**Quick background**&#xD;&#xA;&#xD;&#xA;This first model (SF1) unit was designed by Bung Enterprises  starting in 1994. It was placed on top of the SNES (interfacing with it via the standard cartridge slot) and allowed backup of SNES cartridges to floppy disk and PC(via a straight-through DB-25 M/M cable).&#xD;&#xA;&#xD;&#xA;The unit can store the cartridge ROM, SRAM (&quot;Save&quot; RAM - used by many cartridges to store save games) as well as complete SNES RAM onto its own (expandable) RAM so that one can later dump this to floppy/PC, or to simply keep the games retained in memory for quick recall during development/gaming.&#xD;&#xA;&#xD;&#xA;More interestingly, it can *download* ROM and SRAM data from a PC on most *modern* platforms thanks to the [ucon64][2] project; this is of course of great interest if you want to actually do some SNES development on real hardware (which I do)!&#xD;&#xA;&#xD;&#xA;**Dilemma**&#xD;&#xA;&#xD;&#xA;The main kink is that the unit does not have any battery backup - if you cut power to the unit, RAM is lost. This wouldn't have been much of a bother in '94 when floppy disks were the bees knees, but nowadays it's very frustrating!&#xD;&#xA;&#xD;&#xA;**Idea**&#xD;&#xA;&#xD;&#xA;The idea is to add battery backup functionality to the unit. I've tried to find people who have made similar (or *any!*) modifications to the unit,  Unfortunately as the machine is very old (and has more modern, &quot;non-programming&quot; everyday alternatives) it's very hard to find any information at all - most of the websites I've found which *do* have some information have been on archive.org!&#xD;&#xA;&#xD;&#xA;**Finding information**&#xD;&#xA;&#xD;&#xA;There are a number of reasons for it being exceptionally frustrating to find information about the unit. Firstly, Nintendo(and others) basically forced Bung out of business about ten years ago, so none of the original sites exist. Secondly, the unit series has different names in the US as compared to Japan - it's called the **game doctor sf7** in Japan, and **professor SF2** in the US. Thirdly, the majority of the userbase used the unit for the sole purpose of &quot;game backups&quot; and not development/hardware mods.&#xD;&#xA;&#xD;&#xA;**So,**&#xD;&#xA;Has anyone performed such a feat before, got information about it, or simply the hardware know-how to get me on the right track? Am I perhaps thinking this might be easy when it might actually be quite hard (difficulty in retaining power to the RAM versus the entire unit, unforeseen issues, etc)?&#xD;&#xA;&#xD;&#xA;Thanks for taking the time!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://ucon64.sourceforge.net/&#xD;&#xA;" />
  <row Id="5680" PostHistoryTypeId="1" PostId="2922" RevisionGUID="b3817d31-2a9a-4e62-92fb-feb2cc392123" CreationDate="2010-08-18T15:55:03.923" UserId="1766" Text="SNES Bung Game Doctor, add RAM retention modification (battery backup)" />
  <row Id="5681" PostHistoryTypeId="3" PostId="2922" RevisionGUID="b3817d31-2a9a-4e62-92fb-feb2cc392123" CreationDate="2010-08-18T15:55:03.923" UserId="1766" Text="&lt;hardware&gt;&lt;modification&gt;&lt;nintendo&gt;" />
  <row Id="5682" PostHistoryTypeId="2" PostId="2923" RevisionGUID="4dcc28b7-df21-4d21-aa42-c91827b95830" CreationDate="2010-08-18T16:01:39.410" UserId="458" Text="The difficulty here is that you're asking someone else to do your work for you (particularly with programming). If you say &quot;hey, I'm a game programmer and I'd like to make a game, but I need some help with design&quot; it is probably a lot easier.&#xD;&#xA;&#xD;&#xA;Joel wrote a great article on finding programmers here:&#xD;&#xA;http://www.joelonsoftware.com/articles/fog0000000050.html&#xD;&#xA;&#xD;&#xA;Yes, it's geared towards actually *hiring* programmers and not getting them to do your work for free, but a lot of the same logic still applies. Offering vastly above market price will get their attention. Failing that, from their perspective, your project needs to be worth their time in other ways (the most likely of these being, if you've got a great game). You didn't say if you're actually willing to pay for the work done or not, so I'm assuming the answer to that is no, but feel free to clarify.&#xD;&#xA;&#xD;&#xA;If you're envisioning some kind of &quot;resource exchange&quot; board where you say &quot;hey everyone, I've got this Great Idea for a game, I just need people to make it for me&quot;... yes, those do exist, and in my experience they're worthless. You see tons of posts from people wanting someone else to do their work, and next to no posts of people offering anything of practical value. If I'm a programmer, why would I spend my time making YOUR game instead of MINE, if I'm working for free?&#xD;&#xA;&#xD;&#xA;There is, of course, another way around this: don't rely on other people. Learn to do it yourself. This has a lot of benefits. You get total control over the course and scope of the project. You don't have to rely on someone else screwing up your grand vision. You don't have to get into legally sketchy areas about who owns the work and the IP if it actually sells for real money. Given the number of really bad programmers out there, and the fact that the really good ones are going to cost you an arm and a leg, this is the best option for a surprisingly large percentage of projects." />
  <row Id="5683" PostHistoryTypeId="2" PostId="2924" RevisionGUID="44de77e1-0656-436f-9d51-62ec744858f3" CreationDate="2010-08-18T16:13:07.670" UserId="458" Text="I don't know if you can detect which side was hit by default (for a normal collision check in most cases the answer is no, it just returns a boolean of whether there's a collision or not), but there are other ways around this.&#xD;&#xA;&#xD;&#xA;Obviously if you just say &quot;is there a collision? Reflect&quot; you can run into a problem where the ball hits the wall, reflects but not enough to actually make it back to &quot;outside&quot; the wall, reflects again, and so on every frame where it just gets stuck in the wall forever. So you need to avoid that. One of many ways of doing this: treat the ball as a state machine that is by default in the &quot;non-reflecting&quot; state. When in this state and you detect a collision, change it to the &quot;reflecting&quot; state. When in the reflecting state, ignore collisions, and only return to the non-reflecting state when there is NO collision.&#xD;&#xA;&#xD;&#xA;Another problem: how do you tell the difference between a side collision (horizontal reflection) and a top or bottom collision (vertical reflection)? The original Breakout actually didn't make this distinction, so much; when the ball hit a brick, it would reflect vertically no matter where it hit, and the walls and ceiling were presumably hard-coded (checking the x or y coordinates of the ball). Changing the trajectory on collision with paddle is just a matter of comparing the x coordinate of the ball with the paddle to figure out sides. You could use that method for other things as well, so if you wanted the ball to reflect horizontally OR vertically against a brick, I'd be comparing the coordinates of the brick with the ball." />
  <row Id="5684" PostHistoryTypeId="2" PostId="2925" RevisionGUID="0a227f98-933a-498d-b85e-a365a21c1fe4" CreationDate="2010-08-18T16:18:09.070" UserId="458" Text="I'd think the most direct place to find this is to actually look at the source code. Two major players in the field, Angband and Nethack, are both open-source." />
  <row Id="5685" PostHistoryTypeId="2" PostId="2926" RevisionGUID="fa2443f4-e377-4d92-a677-25273e420179" CreationDate="2010-08-18T16:28:37.500" UserId="458" Text="Why is linear vs. nonlinear narrative something that has to be &quot;reconciled&quot;?&#xD;&#xA;&#xD;&#xA;Some games tell great stories. The two most oft-cited memorable moments, the death of Aerith and the death of Floyd, were both completely out of the player's control and happened in non-interactive cutscenes (or equivalent). Nothing wrong with this.&#xD;&#xA;&#xD;&#xA;Some games let the player tell their own stories. The Sims series takes this to a rather extreme level, and the series has done quite well for itself, thankyouverymuch. Sure, a lot of the stuff players make is worthless... Sturgeon's Law and all that... but the flip side is that you've got a few real gems in there from really creative players, expressing things that just couldn't be done in a linear game.&#xD;&#xA;&#xD;&#xA;Some games split the difference, giving the player a choice of several paths or stories, so you can think of this less as something where each game lies along a continuum with &quot;fixed, hand-designed experience&quot; on one end and &quot;player-driven sandbox&quot; on the other. Some players prefer one, or the other, or anything in between. So I think the real question here is: what kind of game do you want to make along this continuum, and how do you make it the best game you can?" />
  <row Id="5686" PostHistoryTypeId="16" PostId="2926" RevisionGUID="fa2443f4-e377-4d92-a677-25273e420179" CreationDate="2010-08-18T16:28:37.500" UserId="-1" />
  <row Id="5687" PostHistoryTypeId="2" PostId="2927" RevisionGUID="3906b552-7883-42af-9a0e-2e6b19786847" CreationDate="2010-08-18T16:31:02.380" UserId="1597" Text="I've used Bullet on a fairly low-powered console with a scene containing a couple of dozen boxes. Maybe the issue is with your scene setup? What collision shapes are you using? Try to use simple collision shapes such as boxes and cylinders, rather than convex hulls. &#xD;&#xA;&#xD;&#xA;Take a look in btScalar.h and make sure you are using any platform-specific math routines you have access to. Make sure you aren't using double-precision. Does your platform have hardware FP support? &#xD;&#xA;&#xD;&#xA;I have never used it, but Bullet contains some profiling functionality. It may help to determine exactly where in Bullet you are spending the most time. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="5688" PostHistoryTypeId="2" PostId="2928" RevisionGUID="5b2a176f-c16a-4eee-8c12-8f55041c45f3" CreationDate="2010-08-18T16:42:41.527" UserId="458" Text="I'm assuming this is a game balance question and not a coding question, and there are a lot of ways to handle this. From your existing algorithm, I suspect you are making it more complicated than it has to be (three attributes AND a random number make for an extremely muddy system from the player's perspective). My first instinct is to simplify!&#xD;&#xA;&#xD;&#xA;Favor attributes that do multiple things, rather than results that are determined by multiple attributes. DEX works just fine as the primary determiner of to-hit chance; the addition of everything else just serves to make it harder to balance. Think of it this way: a player's expected damage on each hit is their to-hit % multiplied by their average damage when they do hit. How do you plan to calculate an &quot;expected&quot; or &quot;typical&quot; to-hit % with so many variables?&#xD;&#xA;&#xD;&#xA;I see another issue, which is that your formula doesn't scale, and this is probably what you're experiencing. Assuming DEX, LUCK and SPEED tend to increase over the course of the game, differences between player and monster in those stats will also tend to increase. Just as an example, if a player's early-game DEX is in the 4 to 6 range and so are monsters, that's a 10-20% to-hit modifier. If the range is more like 10 to 20 in later stages of the game, that's up to a 100% modifier.&#xD;&#xA;&#xD;&#xA;One way to fix that is to keep the stats fixed. Player and monster ranges are the same throughout the game, and getting something like +1 DEX is a huge deal, extremely rare, and treated as such (if it exists at all). Then your formula will work fine for the entire game, and you'll see a player with about the same to-hit chance throughout.&#xD;&#xA;&#xD;&#xA;Another way is to change that hardcoded &quot;10&quot; to scale with level, so maybe it's &quot;10 + monster level&quot; or &quot;10 + dungeon level&quot; or something, which causes a slight increase in difficulty as the game progresses unless the player levels up their stats accordingly.&#xD;&#xA;&#xD;&#xA;A third way, as others have said, is to set hard caps on the highest and lowest acceptable to-hit %, and simply say &quot;if the calculated value is less than X, use X instead&quot;.&#xD;&#xA;&#xD;&#xA;For the sake of completeness, I'll point out that there's no absolute law that you MUST include a to-hit roll in the first place. Taking an action in a game that's ineffective is not particularly fun, and doesn't really add to the experience except in rare cases. An alternative is to let players ALWAYS hit, and just mess with the damage range so that sometimes they'll do a lot less damage than others. Remember that complex systems are more fun for the designer than the player." />
  <row Id="5689" PostHistoryTypeId="2" PostId="2929" RevisionGUID="14b82544-5ed5-4caa-96a0-1bd4aceffcc9" CreationDate="2010-08-18T16:51:27.023" UserId="458" Text="You didn't say what kind of game. I'd say the easiest usability solution is, find a similar game that has similar mechanics, something your players might be familiar with, and use the same keys.&#xD;&#xA;&#xD;&#xA;So, if your game is an action-RPG like Diablo, making the default keybindings work an awful lot like Diablo is not a horrible way to start.&#xD;&#xA;&#xD;&#xA;See: http://www.joelonsoftware.com/uibook/chapters/fog0000000061.html" />
  <row Id="5690" PostHistoryTypeId="2" PostId="2930" RevisionGUID="56ddd2ee-689e-4705-85f0-41872dfdfdbc" CreationDate="2010-08-18T16:52:23.183" UserId="1456" Text="I'm friend of software rapid prototyping. Especially during game development. It's good for quick learning , testing and  useing things. For close to hardware programming or complicated algorithms  is the best method for me. &lt;BR&gt;&#xD;&#xA;&#xD;&#xA;    Theory();&#xD;&#xA;    RapidPrototype();&#xD;&#xA;    bool bOk = false;&#xD;&#xA;    while(!bOk)&#xD;&#xA;    {&#xD;&#xA;     Testing();&#xD;&#xA;     LotOfFixing();&#xD;&#xA;     PlayingWith(); &#xD;&#xA;     bOk= AnalysingResults();&#xD;&#xA;    }&#xD;&#xA;    FinalFastAndNiceDataStructuresAndCode();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My version of Rapid Prototype has to have proper prototype crust:&#xD;&#xA;&#xD;&#xA; - Max friendly input interface to configure directives and setup variables or data.&#xD;&#xA; - Stable exceptions and errors handling.&#xD;&#xA; - Online like debuger function but on level what you need to.&#xD;&#xA; - Max friendly output interface for showing or capturing results on all posible and necessary ways.&#xD;&#xA;&#xD;&#xA;Advantages:&#xD;&#xA;&#xD;&#xA; - You can improve RapidPrototype crust during whole development.&#xD;&#xA; - You can see and setup your code on many ways.&#xD;&#xA; - You can focus only to theory and problem what You need to solve.&#xD;&#xA; - You can fast develop any new parts of project and try it with the rest of final things.&#xD;&#xA; - You can deliver new things for useing in content filling more quickly and finalize it later.(Especially in sandbox case)&#xD;&#xA; - You can easily describe and show priciples or solutions to anybody else. Online.&#xD;&#xA; - Funcional and transparent prototype is the best source of information for final code(anybody else can do it). &#xD;&#xA;&#xD;&#xA;If You do it well You Can have  real debug/learn version of your product on the end.&lt;BR&gt;&#xD;&#xA;We are using it in our project and we are happy with it." />
  <row Id="5691" PostHistoryTypeId="2" PostId="2931" RevisionGUID="fa8fc70b-8b36-47a5-99a4-3a99ccd2b792" CreationDate="2010-08-18T16:56:35.767" UserId="1634" Text="If your target devices don't have hardware floating point support (many don't), you should look into converting the engine to fixed-point math. I'm not sure of whether this is just a matter of changing a define or potentially a whole rewrite though :-(.&#xD;&#xA;&#xD;&#xA;At any rate, http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/IntroductionToFixedPointMath is a great resource for learning how fixed-point works." />
  <row Id="5692" PostHistoryTypeId="2" PostId="2932" RevisionGUID="6954d3bc-fa6d-4ff8-a84a-4b9c1e092987" CreationDate="2010-08-18T17:02:58.520" UserId="458" Text="As a teacher, I see a lot of student hobby projects that fail. Invariably, the single highest reason for failure is overscope: the project starts out as this grand vision of a huge thing that's too big to possibly complete, more and more people are brought on until it collapses under the weight of its own design, and everyone leaves feeling frustrated and demoralized.&#xD;&#xA;&#xD;&#xA;The best remedy for this is to constrain your scope ruthlessly. Instead of saying &quot;how do I keep my energy up enough to finish a long project?&quot; you should instead be saying &quot;how do I design a project that's short enough that I can finish it before I get bored with it?&quot;&#xD;&#xA;&#xD;&#xA;&quot;Game jam&quot; events (make-a-game-in-a-weekend sorts of things) are a great way to get started, and they're great for building good habits when making rapid prototypes. At WORST, you spend a weekend making a lousy game... you probably learned something in the process... AND you saved yourself months of working on an idea that ended up not being as cool as you originally thought. At best, you find that you have something really special, and can start adding small features one at a time until you have a full-featured project.&#xD;&#xA;&#xD;&#xA;On my own small hobby projects, the other thing I've found that helps is to start with a complete list of all known development tasks that need to be done, ordered, and scaled down so that each individual task is doable and testable in maybe 30 to 60 minutes, tops. It is very energizing to do a small task, see it working in the game, and crossing it off the list... which then just makes it that much more likely I'll do the next thing on the list since the last one was so easy, and then the next... sort of like eating potato chips.&#xD;&#xA;&#xD;&#xA;Another hint: whenever you successfully implement a new feature, make a backup (or use source-code control, which is basically the same thing, but not everyone uses source control if it's just them working on their own personal project). That way if you totally screw up the code at 2am and can't figure out how to get it back in a working state, the project isn't dead and doesn't have to be restarted from scratch; instead, you just roll back to the last completed and working milestone, and try again." />
  <row Id="5693" PostHistoryTypeId="16" PostId="2932" RevisionGUID="6954d3bc-fa6d-4ff8-a84a-4b9c1e092987" CreationDate="2010-08-18T17:02:58.520" UserId="-1" />
  <row Id="5694" PostHistoryTypeId="2" PostId="2933" RevisionGUID="d910f757-6330-4c5d-8db1-b4beee18c255" CreationDate="2010-08-18T17:20:23.780" UserId="1684" Text="There are a lot of good answers, but I'll add mine as well:&#xD;&#xA;&#xD;&#xA;- Always have a running project that you can look at. Do not go in tank mode where you code for 2 weeks without something to show for it.&#xD;&#xA;- Keep the feedback loop short (this is further expanding on the previous point): code a little new feature, show it around, get feedback.&#xD;&#xA;- Do not *ever* implement something you don't need now, which is the corollary of: never build a framework first thing in a project.&#xD;&#xA;&#xD;&#xA;I would like to expand on the last point a bit, since I've seen it happen multiple times: never build a framework first. There are many reasons, but basically, you won't have the necessary vision to do things right, you will waste a lot of time thinking about what-ifs and you will lose morale when after X days/weeks of working, there will be nothing to show for it.&#xD;&#xA;&#xD;&#xA;The problem is that framework are often necessary to the end product, so, what's a coder to do? Start building specifically, with hard coded values. When you'll need to change a value, make it modifiable in options. When you need to make two similar things, abstract the similar pieces together, but keep the rest specific. If you keep doing this you will actually end up with a framework that springs into existence due to necessity, instead of wasting time on what-ifs at first.&#xD;&#xA;&#xD;&#xA;After you build you Xth game, then you can consider starting with the framework, you'll have enough experience by then to pull it off." />
  <row Id="5695" PostHistoryTypeId="16" PostId="2933" RevisionGUID="d910f757-6330-4c5d-8db1-b4beee18c255" CreationDate="2010-08-18T17:20:23.780" UserId="-1" />
  <row Id="5696" PostHistoryTypeId="2" PostId="2934" RevisionGUID="e13c88df-0747-49af-93e0-5b0806aee854" CreationDate="2010-08-18T17:20:52.937" UserId="1198" Text="I'm most interested in your experience with [Torque-X][1], the Managed XNA version of their engine. &#xD;&#xA;&#xD;&#xA;- How did it perform in your use case? (also info on your use, would be helpful)&#xD;&#xA;- What was the usability of the tools?&#xD;&#xA;- What did you build with it? 2D, 3D, both?&#xD;&#xA;- Did you find any &quot;gotchas&quot; that you had to work around?&#xD;&#xA;&#xD;&#xA;If you have used both Torque and Torque-X, I'd be very interested to hear your thoughts contrasting the two engines. On the website, there are some pretty amazing screensshots for the Torque engine; yet the screenshots of Torque-X look kinda cheesy. At this point I don't have the 3D artist expertise to build some of the amazing 3D scense they demoed, but I'm wondering if this would even be possible on Toreque-X engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torquepowered.com/products/torque-x&#xD;&#xA;&#xD;&#xA;As always, any thoughts are greatly appreciated." />
  <row Id="5697" PostHistoryTypeId="1" PostId="2934" RevisionGUID="e13c88df-0747-49af-93e0-5b0806aee854" CreationDate="2010-08-18T17:20:52.937" UserId="1198" Text="What has your experience been with Torque products?" />
  <row Id="5698" PostHistoryTypeId="3" PostId="2934" RevisionGUID="e13c88df-0747-49af-93e0-5b0806aee854" CreationDate="2010-08-18T17:20:52.937" UserId="1198" Text="&lt;engine&gt;&lt;xna&gt;&lt;torque&gt;" />
  <row Id="5699" PostHistoryTypeId="10" PostId="2934" RevisionGUID="6d48c20a-da87-4386-9a2e-873b97b9bd9a" CreationDate="2010-08-18T17:51:22.057" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="5700" PostHistoryTypeId="11" PostId="2934" RevisionGUID="03855e8e-f832-4ce7-ad03-a697fd1175a2" CreationDate="2010-08-18T17:52:16.003" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="5701" PostHistoryTypeId="10" PostId="2934" RevisionGUID="c6a4b12c-9c05-4b30-9b82-9c023d2f88ed" CreationDate="2010-08-18T17:55:59.973" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="5702" PostHistoryTypeId="2" PostId="2935" RevisionGUID="92f7f75f-1d09-483c-972e-0ab3fdb0dcf5" CreationDate="2010-08-18T17:58:01.793" UserId="292" Text="One of the tenants of TDD is that you let TDD in some cases influence your design.  You write a test for system, then write the code to make that test pass, keep dependencies as shallow as possible.&#xD;&#xA;&#xD;&#xA;For me, there are only two things I don't test as part of unit testing:&#xD;&#xA;&#xD;&#xA;First, I don't test visual elements and how things look. I test that and object will be in the right place after it updates, that a camera will cull an object outside it's bounds, that transforms (at least those that are done outside of shaders) are performed properly before being handed over to the graphics engine, but once it hits the graphics system I draw the line.  I don't like trying to mock out things like DirectX.&#xD;&#xA;&#xD;&#xA;Second, I don't really test the main game loop function.  I test that every system will work when passed a reasonable delta, and that systems work together correctly when they need to.  Then I just update each system with the correct delta in the game loop.  I could actually have a test to show that each system got called with the correct delta, but in many cases I find that overkill (unless you're doing complex logic to get your delta, then it's no overkill)." />
  <row Id="5703" PostHistoryTypeId="5" PostId="2930" RevisionGUID="14bbd77c-2edb-4597-8ab9-da7b547ab5fb" CreationDate="2010-08-18T18:02:31.893" UserId="1456" Comment="edited body" Text="I'm friend of software rapid prototyping. Especially during game development. It's good for quick learning , testing and  useing things. For close to hardware programming or complicated algorithms  is the best method for me. &lt;BR&gt;&#xD;&#xA;&#xD;&#xA;    Theory();&#xD;&#xA;    RapidPrototype();&#xD;&#xA;    bool bOk = false;&#xD;&#xA;    while(!bOk)&#xD;&#xA;    {&#xD;&#xA;     Testing();&#xD;&#xA;     LotOfFixing();&#xD;&#xA;     PlayingWith(); &#xD;&#xA;     bOk= AnalysingResults();&#xD;&#xA;    }&#xD;&#xA;    FinalFastAndNiceDataStructuresAndCode();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My version of Rapid Prototype has to have proper prototype crust:&#xD;&#xA;&#xD;&#xA; - Max friendly input interface to configure directives and setup variables or data.&#xD;&#xA; - Stable exceptions and errors handling.&#xD;&#xA; - Online like debuger function but on level what you need to.&#xD;&#xA; - Max friendly output interface for showing or capturing results on all posible and necessary ways.&#xD;&#xA;&#xD;&#xA;Advantages:&#xD;&#xA;&#xD;&#xA; - You can improve RapidPrototype crust during whole development.&#xD;&#xA; - You can see and setup your code in many ways.&#xD;&#xA; - You can focus only to theory and problem what You need to solve.&#xD;&#xA; - You can fast develop any new parts of project and try it with the rest of final things.&#xD;&#xA; - You can deliver new things for useing in content filling more quickly and finalize it later.(Especially in sandbox case)&#xD;&#xA; - You can easily describe and show priciples or solutions to anybody else. Online.&#xD;&#xA; - Funcional and transparent prototype is the best source of information for final code(anybody else can do it). &#xD;&#xA;&#xD;&#xA;If You do it well You Can have  real debug/learn version of your product on the end.&lt;BR&gt;&#xD;&#xA;We are using it in our project and we are happy with it." />
  <row Id="5704" PostHistoryTypeId="2" PostId="2936" RevisionGUID="0eadd132-0f43-4608-8496-69b1103b4f45" CreationDate="2010-08-18T18:15:33.210" UserId="1232" Text="Noel Llopis has covered unit testing to the degree that I believe you are looking for:&#xD;&#xA;&#xD;&#xA;* http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-1&#xD;&#xA;* http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2&#xD;&#xA;* http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-3&#xD;&#xA;* http://gamesfromwithin.com/backwards-is-forward-making-better-games-with-test-driven-development&#xD;&#xA;* (he also has many other articles about TDD)&#xD;&#xA;&#xD;&#xA;With respect to testing the entire game loop, there is another technique to prevent functional regressions in your code. The idea is to have your game play itself via a replay system (ie. first recording player inputs, and then replaying them over a different run). During the replay, you generate a snapshot of each object's state for every frame. This collection of state can then be called the &quot;golden image&quot;. When refactoring your code, you run the replay again and compare each frame's state to the golden image state. If it differs, the test has failed. &#xD;&#xA;&#xD;&#xA;While the benefits of this technique are obvious, there are a few things you need to be careful with:&#xD;&#xA;&#xD;&#xA;* Your game needs to be deterministic, so you need to be careful with things like depending on your system clock, system/network events, random number generators that aren't deterministically seeded. etc.&#xD;&#xA;* content changes since the golden image was generated can cause legitimate differences with your golden image. There is no way of getting around this - when changing your content you need to regenerate your golden image.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5705" PostHistoryTypeId="2" PostId="2937" RevisionGUID="fd8a32ff-6cb9-4cd4-92c1-c96be1c53996" CreationDate="2010-08-18T18:36:02.950" UserId="539" Text="I agree with both of the above comments. I also wanted to add that adopting a component model for your architecture greatly increases it's testability. With a component model each component should be doing a single unit of work and should be testable in isolation (or with limited mock objects). &#xD;&#xA;&#xD;&#xA;Likewise, the other parts of the game which rely on entities should only rely on a subset of the components to function. In practice this means you can usually mock out a few fake components to facilitate testing these areas or you can simply compose partial entities for testing purposes. e.g. you leave out the rendering and input components because those aren't needed to test physics.&#xD;&#xA;&#xD;&#xA;Finally, I would ignore the advice around performance that you get from some people in the game community concerning interfaces. Write the code well with interfaces and if you run into performance problems down the road you can easily profile, identify, and refactor to solve the issue. I was not persuaded by Noel's concerns around the performance impact of interfaces or the complexity overhead that they added. &#xD;&#xA;&#xD;&#xA;That said, don't go overboard trying to test every little thing independently. Like most things testing and design are about striking the right balance." />
  <row Id="5706" PostHistoryTypeId="2" PostId="2938" RevisionGUID="031e5d2f-0358-4dc8-93b9-cd3a0e466199" CreationDate="2010-08-18T18:46:19.810" UserId="831" Text="I have a situation where I'm trying to push the output of an IK solver back into a user editable joint hierarchy (which stores components as it's primary source), and I'm not sure how to go about it.&#xD;&#xA;&#xD;&#xA;My IK solver returns three world space transforms representing the position and orientation of a chain of joints (0,1,2). &#xD;&#xA;&#xD;&#xA;A:&#xD;&#xA;I need to turn this into a hierarchy so that transform 2 is local to transform 1, and transform 1 is local to transform 0. Now I have local transforms for each joint.&#xD;&#xA;&#xD;&#xA;B:&#xD;&#xA;Further: I need to decompose each joint's new local matrix into source Translation, Rotation and Scale.&#xD;&#xA;&#xD;&#xA;Can anyone give me some tips for each step? I have some ideas, but I'm worried that to do B I need to particularly careful with A. " />
  <row Id="5707" PostHistoryTypeId="1" PostId="2938" RevisionGUID="031e5d2f-0358-4dc8-93b9-cd3a0e466199" CreationDate="2010-08-18T18:46:19.810" UserId="831" Text="Integrating IK into an hierarchy editing environment." />
  <row Id="5708" PostHistoryTypeId="3" PostId="2938" RevisionGUID="031e5d2f-0358-4dc8-93b9-cd3a0e466199" CreationDate="2010-08-18T18:46:19.810" UserId="831" Text="&lt;animation&gt;&lt;skeletal&gt;" />
  <row Id="5709" PostHistoryTypeId="2" PostId="2939" RevisionGUID="ae20e293-0833-4b8b-8a83-84e93c0ea4e6" CreationDate="2010-08-18T19:07:56.410" UserId="1770" Text="The actual topology doesn't matter as much as your viewpoint on it.  You could pull exactly that old 2-D trick by making any 'view' on the world never be able to display an area larger than the world itself - so there's only ever one opponent (though you may be able to reach him by running in either of two directions) and no ghosts.  Mark the edges of vision (very far away) with a haze of grey if you must.&#xD;&#xA;&#xD;&#xA;Or maybe I just don't understand the problem correctly." />
  <row Id="5710" PostHistoryTypeId="2" PostId="2940" RevisionGUID="823cfaf9-4232-43c7-9a81-43d443397a7c" CreationDate="2010-08-18T19:10:37.077" UserId="1024" Text="If your matrices are invertible, which they should be, then to get the local 1 just do (0^-1) 1 or 1 (0^-1) depending on the order they were multiplied to get to their current state. You can repeat this process to get back the other matrices.&#xD;&#xA;&#xD;&#xA;For part B lets say your matrix was made by S*R*T. I'm pretty sure you should be able to read of the translation as the first three elements of the last row. The determinate of the upper 3x3 matrix is the uniform scale (I am assuming the last column is 0,0,0,1). You can remove the scale from the 3x3 rotation matrix by dividing by the determinate of the upper 3x3 matrix. &#xD;&#xA;&#xD;&#xA;If you are introducing non-uniform scale I'm not sure how to get your matrices back, I'll think about it. IK is not going to need to scale things, so if your bones have non-uniform scale I bet you can bake it into the geometry before you start.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5711" PostHistoryTypeId="2" PostId="2941" RevisionGUID="d5abcebc-b6ff-42b5-aac3-05ad417e53ed" CreationDate="2010-08-18T19:18:39.663" UserId="1684" Text="I am looking for an algorithm to help me navigate between 'open' tiles in a Mahjong solitaire game. The game is to be played on a limited device with only left-right-up-down buttons and I want to speed up the time it takes to reach the appropriate tile. Toward this goal, I have made the movement work between 'open' tiles (tiles that you could move). &#xD;&#xA;&#xD;&#xA;For example, pressing down will find the closest open tile below the one you are on, etc... The problem is that some tiles are really tough to get to. I am sure there are some known algos for this soft of things, but I can't find anything online since searching for 'Mahjong' returns 10 pages of free flash games.&#xD;&#xA;&#xD;&#xA;Anyone has any idea?" />
  <row Id="5712" PostHistoryTypeId="1" PostId="2941" RevisionGUID="d5abcebc-b6ff-42b5-aac3-05ad417e53ed" CreationDate="2010-08-18T19:18:39.663" UserId="1684" Text="Mahjong solitaire - navigating between open tiles" />
  <row Id="5713" PostHistoryTypeId="3" PostId="2941" RevisionGUID="d5abcebc-b6ff-42b5-aac3-05ad417e53ed" CreationDate="2010-08-18T19:18:39.663" UserId="1684" Text="&lt;algorithm&gt;" />
  <row Id="5714" PostHistoryTypeId="2" PostId="2942" RevisionGUID="99aa3410-08b4-4fb0-8adc-20c9f2986130" CreationDate="2010-08-18T19:20:32.623" UserId="119" Text="Following up on my earlier question about [finding the slope of a 2D bitmap terrain][1] I now need to know the best way of finding the point on the 2D terrain that the missile hit. Obviously I can see if any pixels under the missile intersect terrain, but say it has moved quite deep into the terrain, what is the best way to step back to find where it would have collided? I could move back X pixels at a time towards the missile's previous position, but what would be a good value of X? And is there a smarter way? Maybe moving half the distance, then a quarter etc? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2853/how-do-i-calculate-the-angle-of-the-slope-at-a-point-on-a-2d-bitmap-terrain" />
  <row Id="5715" PostHistoryTypeId="1" PostId="2942" RevisionGUID="99aa3410-08b4-4fb0-8adc-20c9f2986130" CreationDate="2010-08-18T19:20:32.623" UserId="119" Text="What's the most efficient way to find the intersect point of a missile and a bitmap terrain?" />
  <row Id="5716" PostHistoryTypeId="3" PostId="2942" RevisionGUID="99aa3410-08b4-4fb0-8adc-20c9f2986130" CreationDate="2010-08-18T19:20:32.623" UserId="119" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="5717" PostHistoryTypeId="2" PostId="2943" RevisionGUID="7f4320fb-ea8a-4710-b155-612dd507c3e5" CreationDate="2010-08-18T19:41:26.380" UserDisplayName="Shotgun Ninja" Text="Wow, this is interesting to me, as I've never personally had a problem with the singleton pattern. My current project is a C++ game engine for the Nintendo DS, and I'm implementing a lot of the hardware access utilities (ie. VRAM Banks, Wifi, the two graphics engines) as singleton instances, because they are intended to wrap global C functions in the underlying library." />
  <row Id="5718" PostHistoryTypeId="6" PostId="2941" RevisionGUID="93db7b9b-f711-4806-83b7-8ec059f577e0" CreationDate="2010-08-18T19:49:24.957" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;algorithm&gt;" />
  <row Id="5719" PostHistoryTypeId="2" PostId="2944" RevisionGUID="df5c793e-f1a4-474b-9b56-3c5a80ea2354" CreationDate="2010-08-18T19:50:36.827" UserId="51" Text="For collision testing you shouldn't do tick-by-tick static testing, you should be doing traces/sweep tests.&#xD;&#xA;&#xD;&#xA;There's an exhaustive list of various formulas for different kinds of primitives here: http://www.realtimerendering.com/intersections.html&#xD;&#xA;&#xD;&#xA;That is, of course, assuming you can break down your terrain into some kind of set of primitives you can test against (i.e. line segments).  There are various ways of doing that.&#xD;&#xA;&#xD;&#xA;See also this question (only slightly related): http://gamedev.stackexchange.com/questions/313/what-is-a-good-algorithm-to-detect-collision-between-moving-spheres" />
  <row Id="5720" PostHistoryTypeId="2" PostId="2945" RevisionGUID="8a9678f3-4c83-4fea-880b-8ecb04505266" CreationDate="2010-08-18T19:51:26.387" UserId="1091" Text="Binary search wont help if you have thin bits of scenery and fast moving projectiles - you might miss them.&#xD;&#xA;&#xD;&#xA;I think your best option is to sweep a line across the front of the projectile along the path it takes, pixel at a time. You could do a bounding check first on the whole volume to avoid doing it every step." />
  <row Id="5721" PostHistoryTypeId="2" PostId="2946" RevisionGUID="bc69adf9-aa84-4a9a-8ecc-ea9e438806b4" CreationDate="2010-08-18T19:58:53.983" UserId="1091" Text="You could search in both directions - from the current tile to the nearest neighbour, but also looking to see if another tile has the current one as nearest in the opposite direction. Move to the closest of those two if different.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5722" PostHistoryTypeId="11" PostId="2934" RevisionGUID="5741d339-b545-4462-9048-9669a3c860bd" CreationDate="2010-08-18T20:09:17.453" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="5723" PostHistoryTypeId="2" PostId="2947" RevisionGUID="e8ecd8be-4337-47c0-8f81-f5cb8a728bfc" CreationDate="2010-08-18T21:24:15.127" UserId="1400" Text="For game DESIGN, I highly recommend Jesse Schell:&#xD;&#xA;[link text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1282166334&amp;sr=8-1 &quot;The Art of Game Design&quot;&#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;[EDIT]&#xD;&#xA;Stupid StackExchange... I had more links for you, but I need higher rep before I can link them.  I'll try to put them in as comments..." />
  <row Id="5724" PostHistoryTypeId="16" PostId="2947" RevisionGUID="e8ecd8be-4337-47c0-8f81-f5cb8a728bfc" CreationDate="2010-08-18T21:24:15.127" UserId="-1" />
  <row Id="5725" PostHistoryTypeId="2" PostId="2948" RevisionGUID="f41bd78d-b1e7-43bd-844f-b722ce9f5709" CreationDate="2010-08-18T21:29:02.947" UserId="8" Text="I would experiment with exploiting the fact that Mahjong has two sides. Left/Right to control which side you are on. Up/Down moves to the next tile up or down the same side by row/height. &#xD;&#xA;&#xD;&#xA;e.g. When pressing Down: if there is a tile at a lower height than the current selection, move to that one. If not, move to the highest free tile in the next row down. Pressing up can move up in elevation or up to the next row." />
  <row Id="5726" PostHistoryTypeId="6" PostId="2941" RevisionGUID="b8f72fb4-7e80-4d56-a4ca-54b249318ac3" CreationDate="2010-08-18T21:29:23.680" UserId="8" Comment="edited tags" Text="&lt;game-design&gt;&lt;algorithm&gt;&lt;control&gt;" />
  <row Id="5727" PostHistoryTypeId="2" PostId="2949" RevisionGUID="af468278-0f54-4722-bc56-1551e0e8b4c8" CreationDate="2010-08-18T21:45:50.340" UserId="189" Text="Just because your question doesn't really belong here, doesn't mean I won't try to give you an answer! :)&#xD;&#xA;&#xD;&#xA;If you are set on hacking this thing and adding a battery, that's fine. But might I suggest obtaining an alternative instead? The everything2 post on [SNES Backup Units][1] lists several others, some of which do retain their memory through a poweroff:&#xD;&#xA;&#xD;&#xA;&gt; Ahh yes. The Super Nintendo Backup Systems... Anybody remember the Pro Fighter? Multi Game Hunter? Game Doctor SF? Or the ever popular Super Wild Card DX?&#xD;&#xA;&#xD;&#xA;Or you could always take a spare computer and run an emulator ([ZSNES][2] or [Snes9x][3]) on it, and then get a [USB SNES controller][4] or a [USB SNES controller *adapter*][5] (plugs into USB and has 2 plugs for any SNES controllers).&#xD;&#xA;&#xD;&#xA;If you have a Game Boy or Nintendo DS, there are a number of homebrew cartridges that will play SNES games as well. I have been extremely pleased with my recent purchase of a [DSTWO][6] as recommended by [Lifehacker][7], and the Nintendo DS gamepad layout is extremely similar to that of the SNES so it hardly takes away from the feel of playing the games.&#xD;&#xA;&#xD;&#xA;Remember of course that it's only legal to play ROMs of games that you own.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://everything2.com/title/SNES+Backup+Units&#xD;&#xA;  [2]: http://www.emulator-zone.com/doc.php/snes/zsnes.html&#xD;&#xA;  [3]: http://www.emulator-zone.com/doc.php/snes/snes9x.html&#xD;&#xA;  [4]: http://www.amazon.com/Retrolink-Super-Nintendo-Classic-Controller-PC/dp/B000YDVN3Q&#xD;&#xA;  [5]: http://www.amazon.com/Super-Nintendo-SNES-Player-Controller-Adapter/dp/B002KN32XW&#xD;&#xA;  [6]: http://www.modchipcentral.com/store/supercard-dstwo-ds-two-w-free-usb-reader-and-usb-charge-cable.html&#xD;&#xA;  [7]: http://lifehacker.com/5588151/hack-your-nintendo-ds-for-easy-backups-and-single+cartridge+playback" />
  <row Id="5728" PostHistoryTypeId="5" PostId="2949" RevisionGUID="05ea4a8e-20c1-466f-a5c7-1e771fe63ce3" CreationDate="2010-08-18T21:52:40.273" UserId="189" Comment="added 346 characters in body" Text="Just because your question doesn't really belong here, doesn't mean I won't try to give you an answer! :)&#xD;&#xA;&#xD;&#xA;If you are set on hacking this thing and adding a battery, that's fine. But might I suggest obtaining an alternative instead? The everything2 post on [SNES Backup Units][1] lists several others, some of which do retain their memory through a poweroff:&#xD;&#xA;&#xD;&#xA;&gt; Ahh yes. The Super Nintendo Backup Systems... Anybody remember the Pro Fighter? Multi Game Hunter? Game Doctor SF? Or the ever popular Super Wild Card DX?&#xD;&#xA;&#xD;&#xA;Or you could always take a spare computer and run an emulator ([ZSNES][2] or [Snes9x][3]) on it, and then get a [USB SNES controller][4] or a [USB SNES controller *adapter*][5] (plugs into USB and has 2 plugs for any SNES controllers).&#xD;&#xA;&#xD;&#xA;If you have a Game Boy or Nintendo DS, there are a number of homebrew cartridges that will play SNES games as well. I have been extremely pleased with my recent purchase of a [DSTWO][6] as recommended by [Lifehacker][7], and the Nintendo DS gamepad layout is extremely similar to that of the SNES so it hardly takes away from the feel of playing the games.&#xD;&#xA;&#xD;&#xA;Remember of course that it's only legal to play ROMs of games that you own.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Edit:** Ah, my apologies, I missed one of the key parts of your question when I first read it:&#xD;&#xA;&#xD;&#xA;&gt; this is of course of great interest if you want to actually do some SNES development on real hardware (which I do)!&#xD;&#xA;&#xD;&#xA;Hopefully, then, the first part of my answer might at least help lead you to better alternates to the Game Doctor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://everything2.com/title/SNES+Backup+Units&#xD;&#xA;  [2]: http://www.emulator-zone.com/doc.php/snes/zsnes.html&#xD;&#xA;  [3]: http://www.emulator-zone.com/doc.php/snes/snes9x.html&#xD;&#xA;  [4]: http://www.amazon.com/Retrolink-Super-Nintendo-Classic-Controller-PC/dp/B000YDVN3Q&#xD;&#xA;  [5]: http://www.amazon.com/Super-Nintendo-SNES-Player-Controller-Adapter/dp/B002KN32XW&#xD;&#xA;  [6]: http://www.modchipcentral.com/store/supercard-dstwo-ds-two-w-free-usb-reader-and-usb-charge-cable.html&#xD;&#xA;  [7]: http://lifehacker.com/5588151/hack-your-nintendo-ds-for-easy-backups-and-single+cartridge+playback" />
  <row Id="5729" PostHistoryTypeId="2" PostId="2950" RevisionGUID="ab95aa41-36f4-49c1-a46c-b1a3ca073255" CreationDate="2010-08-18T22:17:16.073" UserId="891" Text="**This is a huge warning against using and even thinking about using TorqueX!!**  &#xD;&#xA;*note: this is based off of my experience from around 06/2009*&#xD;&#xA;&#xD;&#xA;I too, was naive and thought, wow a XNA based engine that would help speed along development.  And on top of that TorqueX is free if you have an XNA creator's club account.&#xD;&#xA;&#xD;&#xA;I want to stress again this was **NAIVE**.&#xD;&#xA;&#xD;&#xA;I purchased the XNA account on 06/18/2009 so the TorqueX I have experience with is back in the days of TorqueX 2D and TorqueX 3D 3.1.5&#xD;&#xA;&#xD;&#xA;From what is on their site it would give you the impression that the 3D editor and engine would greatly help with development.  They even show Box Macabre on their site which uses the TorqueX 3D engine.&#xD;&#xA;&#xD;&#xA;Everything is peachy at this point and hopes are high.  That is until you actually try and use it...&#xD;&#xA;&#xD;&#xA;TorqueX 3D 3.1.5 is based around using their editor to modify xml files.  Too bad the editor was **EXTREMELY** unstable.  You of course don't get to know this until you get access to their &quot;private&quot; forums.  If you want to know why they are private it's because you'll see huge gripes.  One, that TorqueX 3D was basically a POS and two, the utter lack of documentation.  The companies &quot;defense&quot; against the lack of documentation is that there was only one documentor that was shared between all the engines they develop.&#xD;&#xA;&#xD;&#xA;I even had &quot;The Complete Guide to Torque X&quot; book which was written by one of the developers of Torque X.  Basically the only documentation that existed at the time.  Anyways to the end of the story it was a complete nightmare.  I ended up switching over to TorqueX 2D which also was a ton of problems.  &#xD;&#xA;&#xD;&#xA;The TorqueX 2D engine/editor was a lot better.  Actually usable, but since I had the free XNA creators version I only got binaries and no source code.  It's no fun when you find bugs in the engine but lack the source code to actually fix them.  Their forums were littered with source code fixes which could not be applied to the binary distro.&#xD;&#xA;&#xD;&#xA;All in all, a waste of time and money.&#xD;&#xA;&#xD;&#xA;I would never in my wildest dreams touch any Torque product with a 10 foot pole.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5730" PostHistoryTypeId="2" PostId="2951" RevisionGUID="ff2d2925-bc62-437a-abe3-291d67821039" CreationDate="2010-08-18T22:17:37.900" UserId="1232" Text="For step A, &#xD;&#xA;&#xD;&#xA;LocalTransform for your joint = Inverse(WorldTransform for parent joint) * WorldTransform for your joint.&#xD;&#xA;(If you're dealing with orthonormal matrices, Transpose can replace Inverse)&#xD;&#xA;&#xD;&#xA;For step B, Assuming your matrix is in column major form:&#xD;&#xA;&#xD;&#xA;* For extracting translation, just grab the first 3 components of the last column.&#xD;&#xA;&#xD;&#xA;* For extracting non-uniform scale, assuming your matrix is in column major form, you should be able to extract the scale components by determining the length of the vector in the first 3 components of the first column, 2nd column, 3rd column eg.&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;Vec3 getMatrixScale(Matrix* matrix)&#xD;&#xA;{&#xD;&#xA;  Vec3 scaleVec;&#xD;&#xA;  scaleVec.x = Vec3Length((Vec3*)&amp;matrix-&gt;data[0]);&#xD;&#xA;  scaleVec.y = Vec3Length((Vec3*)&amp;matrix-&gt;data[4]);&#xD;&#xA;  scaleVec.z = Vec3Length((Vec3*)&amp;matrix-&gt;data[8]);&#xD;&#xA;  return scaleVec;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;* For extracting rotation, normalize the vectors from which your scale extraction took place and the resulting 3x3 will be your rotation matrix. Convert this to a quaternion or euler angles. Many sites out there discuss this already:&#xD;&#xA;&#xD;&#xA; - http://www.sjbaker.org/steve/omniv/eulers_are_evil.html&#xD;&#xA;&#xD;&#xA; -  http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm&#xD;&#xA;&#xD;&#xA;good luck." />
  <row Id="5731" PostHistoryTypeId="5" PostId="2938" RevisionGUID="2cf11a8d-920d-4092-ab4e-ac9320d9c19a" CreationDate="2010-08-18T22:31:05.763" UserId="831" Comment="added 474 characters in body; added 4 characters in body" Text="I have a situation where I'm trying to push the output of an IK solver back into a user editable joint hierarchy (which stores components as it's primary source), and I'm not sure how to go about it.&#xD;&#xA;&#xD;&#xA;My IK solver returns three world space transforms representing the position and orientation of a chain of joints (0,1,2). &#xD;&#xA;&#xD;&#xA;A:&#xD;&#xA;I need to turn this into a hierarchy so that transform 2 is local to transform 1, and transform 1 is local to transform 0. Now I have local transforms for each joint.&#xD;&#xA;&#xD;&#xA;B:&#xD;&#xA;Further: I need to decompose each joint's new local matrix into source Translation, Rotation and Scale.&#xD;&#xA;&#xD;&#xA;Can anyone give me some tips for each step? I have some ideas, but I'm worried that to do B I need to particularly careful with A. &#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;For example if I get my world matrices like this:&#xD;&#xA;&#xD;&#xA;    M4 world_mats[3] = IK_solve( ikparams );&#xD;&#xA;&#xD;&#xA;And then convert them to local like this:&#xD;&#xA;&#xD;&#xA;    M4 local_mats[3] = GenerateLocalChain( world_mats );&#xD;&#xA;&#xD;&#xA;And then extract components:&#xD;&#xA;&#xD;&#xA;    Scale     s[];&#xD;&#xA;    Rotation  r[];&#xD;&#xA;    Translate t[];&#xD;&#xA;    &#xD;&#xA;    foreach ( matrix in local_mats )&#xD;&#xA;        Decompose( matrix, s, r, t );&#xD;&#xA;&#xD;&#xA;How can I implement the `GenerateLocalChain()` function to match `Decompose()`? &#xD;&#xA;" />
  <row Id="5732" PostHistoryTypeId="5" PostId="2938" RevisionGUID="f349f421-4367-457a-b8fd-8e3810d9180f" CreationDate="2010-08-18T22:40:13.067" UserId="831" Comment="added 19 characters in body" Text="I have a situation where I'm trying to push the output of an IK solver back into a user editable joint hierarchy (which stores components as it's primary source), and I'm not sure how to go about it.&#xD;&#xA;&#xD;&#xA;My IK solver returns three world space transforms representing the position and orientation of a chain of joints (0,1,2). &#xD;&#xA;&#xD;&#xA;A:&#xD;&#xA;I need to turn this into a hierarchy so that transform 2 is local to transform 1, and transform 1 is local to transform 0. Now I have local transforms for each joint.&#xD;&#xA;&#xD;&#xA;B:&#xD;&#xA;Further: I need to decompose each joint's new local matrix into source Translation, Rotation and Scale.&#xD;&#xA;&#xD;&#xA;Can anyone give me some tips for each step? I have some ideas, but I'm worried that to do B I need to particularly careful with A. &#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;For example if I get my world matrices like this:&#xD;&#xA;&#xD;&#xA;    M4 world_mats[3] = IK_solve( ikparams );&#xD;&#xA;&#xD;&#xA;And then convert them to local like this:&#xD;&#xA;&#xD;&#xA;    M4 local_mats[3] = GenerateLocalChain( world_mats );&#xD;&#xA;&#xD;&#xA;And then extract components:&#xD;&#xA;&#xD;&#xA;    Scale     s[];&#xD;&#xA;    Rotation  r[];&#xD;&#xA;    Translate t[];&#xD;&#xA;    &#xD;&#xA;    foreach ( matrix in local_mats )&#xD;&#xA;        Decompose( matrix, s, r, t );&#xD;&#xA;&#xD;&#xA;How can I implement the `Decompose()` function to match matrices created in`GenerateLocalChain()`? &#xD;&#xA;" />
  <row Id="5733" PostHistoryTypeId="5" PostId="2940" RevisionGUID="26503b06-4b84-464f-a548-bdcde7bbfd06" CreationDate="2010-08-18T22:58:45.010" UserId="1024" Comment="edited body" Text="If your matrices are invertible, which they should be, then to get the local B just do (A^-1) B or B (A^-1) depending on the order they were multiplied to get to their current state. You can repeat this process to get back the other matrices.&#xD;&#xA;&#xD;&#xA;For part B lets say your matrix was made by S*R*T. I'm pretty sure you should be able to read of the translation as the first three elements of the last row. The determinate of the upper 3x3 matrix is the uniform scale (I am assuming the last column is 0,0,0,1). You can remove the scale from the 3x3 rotation matrix by dividing by the determinate of the upper 3x3 matrix. &#xD;&#xA;&#xD;&#xA;If you are introducing non-uniform scale I'm not sure how to get your matrices back, I'll think about it. IK is not going to need to scale things, so if your bones have non-uniform scale I bet you can bake it into the geometry before you start.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5734" PostHistoryTypeId="2" PostId="2952" RevisionGUID="c7ca14a2-0eb9-4bcb-bd03-6ef1bc9d104c" CreationDate="2010-08-18T23:06:20.037" UserId="1198" Text="I am trying to implement a system, where the cursor (in my case the player's avatar) is always about 1.5 seconds (a configurable interval) behind where the mouse actually is. If I change the cursor's location every time through, I get an emulated mouse cursor with no delay, I'm wondering if there are any pre-canned type of solutions I can throw at this before I &quot;roll-my-own.&quot; Source code or even just basic steps you've used would be helpful.&#xD;&#xA;" />
  <row Id="5735" PostHistoryTypeId="1" PostId="2952" RevisionGUID="c7ca14a2-0eb9-4bcb-bd03-6ef1bc9d104c" CreationDate="2010-08-18T23:06:20.037" UserId="1198" Text="What are some techniques used for mouse tracking, with a bit of &quot;emulated lagg&quot;?" />
  <row Id="5736" PostHistoryTypeId="3" PostId="2952" RevisionGUID="c7ca14a2-0eb9-4bcb-bd03-6ef1bc9d104c" CreationDate="2010-08-18T23:06:20.037" UserId="1198" Text="&lt;path-finding&gt;&lt;control&gt;" />
  <row Id="5737" PostHistoryTypeId="2" PostId="2953" RevisionGUID="15daa2bd-06f0-4e37-ae22-e6aa60e35c0b" CreationDate="2010-08-18T23:15:09.460" UserId="189" Text="I don't think there are any pre-canned solutions; at least I haven't seen any. But here is the logic to such a thing.&#xD;&#xA;&#xD;&#xA;What you essentially want is a **queue** of mouse positions and timestamps. So define an object, let's call it `MousePositionSnapshot`, which has two members, `time` and `position` (or separate x,y if you want). And then define your queue of `MousePositionSnapshot`s. Each update, make a new MousePositionSnapshot with the current timestamp and the current position of the mouse, and push it onto the head of the deque. Then peek at the tail of the deque to see if the timestamp is delayed enough for you, and if so, pop it off the end of the deque and move the emulated cursor to the given position.&#xD;&#xA;&#xD;&#xA;Or, if you have a fixed framerate, you could skip the timestamp since you know how far apart each update is, and just keep your mouse lag in terms of number of updates; if the deque is smaller in length than that amount of updates then don't pop-and-move, otherwise just pop and move the emulated mouse each frame.&#xD;&#xA;&#xD;&#xA;By the way, Deque may already be implemented in your language of choice; it is [part of the C++ standard library][1] and of course exists in [java.util.Queue][2] for Java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cplusplus.com/reference/stl/queue/&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/util/Queue.html" />
  <row Id="5738" PostHistoryTypeId="2" PostId="2954" RevisionGUID="5baafb04-8105-44d0-b2a1-d70da0c6ecb0" CreationDate="2010-08-18T23:18:31.013" UserId="452" Text=" 1. Each new lua class is two lines. Each new C++ class is pain.&#xD;&#xA; 2. No whining about types when all you want is shuffle values around.&#xD;&#xA; 3. Garbage collection.&#xD;&#xA; 4. Script code is nicely isolated in virtual machines, away from all those nasty wandering segfaults and array overflows." />
  <row Id="5739" PostHistoryTypeId="5" PostId="2953" RevisionGUID="fd3e126f-5524-4f65-8023-126253e9de92" CreationDate="2010-08-18T23:20:25.347" UserId="189" Comment="edited body" Text="I don't think there are any pre-canned solutions; at least I haven't seen any. But here is the logic to such a thing.&#xD;&#xA;&#xD;&#xA;What you essentially want is a **queue** of mouse positions and timestamps. So define an object, let's call it `MousePositionSnapshot`, which has two members, `time` and `position` (or separate x,y if you want). And then define your queue of `MousePositionSnapshot`s. Each update, make a new MousePositionSnapshot with the current timestamp and the current position of the mouse, and push it onto the head of the queue. Then peek at the tail of the queue to see if the timestamp is delayed enough for you, and if so, pop it off the end of the queue and move the emulated cursor to the given position.&#xD;&#xA;&#xD;&#xA;Or, if you have a fixed framerate, you could skip the timestamp since you know how far apart each update is, and just keep your mouse lag in terms of number of updates; if the queue is smaller in length than that amount of updates then don't pop-and-move, otherwise just pop and move the emulated mouse each frame.&#xD;&#xA;&#xD;&#xA;By the way, Queue may already be implemented in your language of choice; it is [part of the C++ standard library][1] and of course exists in [java.util.Queue][2] for Java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cplusplus.com/reference/stl/queue/&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/util/Queue.html" />
  <row Id="5740" PostHistoryTypeId="2" PostId="2955" RevisionGUID="c858d290-ff11-45e2-ae06-4bf9b025c69d" CreationDate="2010-08-18T23:21:35.207" UserId="452" Text="Only when you have an item that only has one controller but is handled by several modules.&#xD;&#xA;&#xD;&#xA;Such as, for example, the mouse interface. Or joystick interface. Or music player. Or sound player. Or the screen. Or the save files manager.&#xD;&#xA;" />
  <row Id="5741" PostHistoryTypeId="4" PostId="2952" RevisionGUID="02d8dc90-0cf2-4fc8-b3e8-4e0377fa98a8" CreationDate="2010-08-18T23:22:01.833" UserId="51" Comment="edited title" Text="What are some techniques used for mouse tracking, with a bit of &quot;emulated lag&quot;?" />
  <row Id="5742" PostHistoryTypeId="2" PostId="2956" RevisionGUID="80cc116f-941b-44de-8f1c-19d099eb17db" CreationDate="2010-08-18T23:23:58.807" UserId="452" Text="Look at Deus Ex and the Ultima series for examples of games that have a strong storyline but give the player plenty of leeway on how to achieve their goals." />
  <row Id="5743" PostHistoryTypeId="16" PostId="2956" RevisionGUID="80cc116f-941b-44de-8f1c-19d099eb17db" CreationDate="2010-08-18T23:23:58.807" UserId="-1" />
  <row Id="5744" PostHistoryTypeId="2" PostId="2957" RevisionGUID="bfda6180-234d-4c9c-842f-ee6380f62491" CreationDate="2010-08-18T23:44:25.917" UserId="865" Text="Ricket's answer was my first idea too. If you draw all the mouse pointers in your queue you get a nice trail as well.&#xD;&#xA;Another option would be to linearly interpolate your detected mouse position and the actual mouseposition, that way it will gravitate towards the mouseposition with a delay, but it won't actually follow the exact path the mouse travelled. &#xD;&#xA;They both achieve the same (configurable delay for the mouse to catch up) but in a decidedly different visual fashion.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5745" PostHistoryTypeId="5" PostId="2951" RevisionGUID="4a121aaa-9a6a-4a3f-aa6e-8e87d2a31f58" CreationDate="2010-08-19T00:49:21.637" UserId="1232" Comment="addition in response to OP's comment." Text="For step A, &#xD;&#xA;&#xD;&#xA;LocalTransform for your joint = Inverse(WorldTransform for parent joint) * WorldTransform for your joint.&#xD;&#xA;(If you're dealing with orthonormal matrices, Transpose can replace Inverse)&#xD;&#xA;&#xD;&#xA;For step B, Assuming your matrix is in column major form:&#xD;&#xA;&#xD;&#xA;* For extracting translation, just grab the first 3 components of the last column.&#xD;&#xA;&#xD;&#xA;* For extracting non-uniform scale, assuming your matrix is in column major form, you should be able to extract the scale components by determining the length of the vector in the first 3 components of the first column, 2nd column, 3rd column eg.&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;Vec3 getMatrixScale(Matrix* matrix)&#xD;&#xA;{&#xD;&#xA;  Vec3 scaleVec;&#xD;&#xA;  scaleVec.x = Vec3Length((Vec3*)&amp;matrix-&gt;data[0]);&#xD;&#xA;  scaleVec.y = Vec3Length((Vec3*)&amp;matrix-&gt;data[4]);&#xD;&#xA;  scaleVec.z = Vec3Length((Vec3*)&amp;matrix-&gt;data[8]);&#xD;&#xA;  return scaleVec;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;* For extracting rotation, normalize the vectors from which your scale extraction took place and the resulting 3x3 will be your rotation matrix. Convert this to a quaternion or euler angles. Many sites out there discuss this already:&#xD;&#xA;&#xD;&#xA; - http://www.sjbaker.org/steve/omniv/eulers_are_evil.html&#xD;&#xA;&#xD;&#xA; -  http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/index.htm&#xD;&#xA; -  http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToMatrix/index.htm&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;How you decompose your matrix will depend upon how apply (Rotate, Scale, Translate) to reconstruct your local transform during animation. If it is indeed S*R*T as Jonathan mentioned, then what I've already described should do the trick.&#xD;&#xA;&#xD;&#xA;If you want to know specifically about transforming rotation representation to/from matrix form then you'll have to clarify exactly how you represent &quot;Rotation&quot;. The links I posted deal with common variants of this.&#xD;&#xA;" />
  <row Id="5746" PostHistoryTypeId="5" PostId="2936" RevisionGUID="69eda231-b78a-4b12-b7ef-79b6f680d9ba" CreationDate="2010-08-19T00:53:06.403" UserId="1232" Comment="better grammar" Text="Noel Llopis has covered unit testing to the degree that I believe you are looking for:&#xD;&#xA;&#xD;&#xA;* http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-1&#xD;&#xA;* http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-2&#xD;&#xA;* http://gamesfromwithin.com/stepping-through-the-looking-glass-test-driven-game-development-part-3&#xD;&#xA;* http://gamesfromwithin.com/backwards-is-forward-making-better-games-with-test-driven-development&#xD;&#xA;* (he also has many other articles about TDD)&#xD;&#xA;&#xD;&#xA;With respect to testing the entire game loop, there is another technique to prevent functional regressions in your code. The idea is to have your game play itself via a replay system (ie. first recording player inputs, and then replaying them over a different run). During the replay, you generate a snapshot of each object's state for every frame. This collection of state can then be called the &quot;golden image&quot;. When refactoring your code, you run the replay again and compare each frame's state to the golden image state. If it differs, the test has failed. &#xD;&#xA;&#xD;&#xA;While the benefits of this technique are obvious, there are a few things you need to be careful with:&#xD;&#xA;&#xD;&#xA;* Your game needs to be deterministic, so you need to be careful with things like depending on your system clock, system/network events, random number generators that aren't deterministically seeded. etc.&#xD;&#xA;* content changes after the golden image was generated can cause legitimate differences with your golden image. There is no way of getting around this - when changing your content you need to regenerate your golden image.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5747" PostHistoryTypeId="2" PostId="2958" RevisionGUID="9736bab0-de78-40df-b184-c204335dec98" CreationDate="2010-08-19T00:55:00.673" UserId="1780" Text="As with the &quot;topology doesn't matter&quot; answer, you can do the torus solution pretty easily.  It's possibly easiest if you've got a tiled world.  E.g. instead of one giant terrain mesh you have a map made up of M x N tiles.  When you're in tile m,n you can see that tile and +/- 1 in each direction; just wrap the result of the additions and subtractions and you're done.  I.e. tile 0,0 can &quot;see&quot; and is attached to as appropriate tiles 0,1, 1,1, 1,0 plus M-1,1, M-1,0, M-1,N-1, 0,N-1, and 1,N-1&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5748" PostHistoryTypeId="2" PostId="2959" RevisionGUID="e345f753-0770-4fb0-a4f6-6b079c02702e" CreationDate="2010-08-19T03:28:43.487" UserId="919" Text="What are other retention and conversion (free to play to paying to spender) strategies in MMOs? &#xD;&#xA;&#xD;&#xA;I know some like promotions, social viral, content generation, intentional imbalance, perks and community management. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="5749" PostHistoryTypeId="1" PostId="2959" RevisionGUID="e345f753-0770-4fb0-a4f6-6b079c02702e" CreationDate="2010-08-19T03:28:43.487" UserId="919" Text="Methods of player retention and conversion in MMO games" />
  <row Id="5750" PostHistoryTypeId="3" PostId="2959" RevisionGUID="e345f753-0770-4fb0-a4f6-6b079c02702e" CreationDate="2010-08-19T03:28:43.487" UserId="919" Text="&lt;game-design&gt;&lt;mmo&gt;&lt;marketing&gt;&lt;free-to-play&gt;" />
  <row Id="5751" PostHistoryTypeId="16" PostId="2959" RevisionGUID="e345f753-0770-4fb0-a4f6-6b079c02702e" CreationDate="2010-08-19T03:28:43.487" UserId="919" />
  <row Id="5752" PostHistoryTypeId="4" PostId="2959" RevisionGUID="ec028d2b-a7ba-40a1-b550-b22d9e27637e" CreationDate="2010-08-19T04:05:41.297" UserId="919" Comment="edited title" Text="Methods of player retention and conversion in MMO games?" />
  <row Id="5753" PostHistoryTypeId="16" PostId="2663" RevisionGUID="7bd89fc6-4571-4a39-8d3c-1c12625f20ab" CreationDate="2010-08-19T05:30:06.360" UserId="632" />
  <row Id="5754" PostHistoryTypeId="2" PostId="2960" RevisionGUID="08a1cecf-5eb2-4af7-a285-7a6972f21233" CreationDate="2010-08-19T06:23:26.927" UserId="395" Text="Some recently popular ones&#xD;&#xA;&#xD;&#xA; 1. Refer-a-friend. Generally you give bonuses to both the referrer and the referee.&#xD;&#xA; 1. Social media broadcasts. More and more games will want to post stuff to Facebook and Twitter as basically free advertising. The new Warhammer 40k game is even rewarding players for this.&#xD;&#xA; 1. Rich kid syndrome. Asian MMOs are notorious for this, putting pay items up that are clearly better than ones that can be earned within the game. Tread lightly here, western markets have been very hostile to this.&#xD;&#xA; 1. Selling simplicity. Things like selling +%XP potions or pre-leveled characters for a game with a low level cap (think Guild Wars' PVP character system). This is generally better received than the above, but still hard to pitch.&#xD;&#xA; 1. Veteran rewards. Pretty simple and every MMO I know of does it.&#xD;&#xA; 1. Fast client download. The longer it takes to try your game, the lower the conversion rate is.&#xD;&#xA; 1. Non-decimal currency. There is a reason that MS' Live points are 80 == $1.00. By keeping people's mental math off balance you can produce the illusion of lower prices." />
  <row Id="5755" PostHistoryTypeId="16" PostId="2960" RevisionGUID="08a1cecf-5eb2-4af7-a285-7a6972f21233" CreationDate="2010-08-19T06:23:26.927" UserId="-1" />
  <row Id="5756" PostHistoryTypeId="2" PostId="2961" RevisionGUID="7325a2bd-4661-4341-b9eb-276170eb7ac3" CreationDate="2010-08-19T06:56:35.783" UserId="865" Text="For pixelwise collision checks there's a nice tutorial series on the XNA developer site. &lt;br&gt;http://creators.xna.com/en-US/tutorial/collision2dperpixeltransformed&lt;br&gt;&#xD;&#xA;&lt;br&gt;One optimization you can use that wasn't used in those tutorials (oddly enough) is that in most cases only the outline needs to be checked, saving precious cycles." />
  <row Id="5757" PostHistoryTypeId="2" PostId="2962" RevisionGUID="0236594c-68e9-4b70-940f-e8beb37b45d0" CreationDate="2010-08-19T06:59:19.290" UserId="323" Text="Clever economic manipulation.&#xD;&#xA;&#xD;&#xA;Say you've got two people playing the game. Frank has a lot of money (he's a millionaire in real life) but not a lot of time ingame. He wants to get some really awesome and expensive equipment and go kill Starfuries (they are the best thing to kill) but he has no interest in grinding ingame to gradually get the gear he wants. He does not care, in any sense, about the $15/mo monthly fee for your game. He will probably forget to unsubscribe because he cares so little.&#xD;&#xA;&#xD;&#xA;Bob, on the other hand, is a highschool student. He has no money and absolute tons of free time. Huge amounts of it. He's managed to get his mom to pay for a few months of subscription, but that won't last forever.&#xD;&#xA;&#xD;&#xA;So here's what you do. You make an ingame item, a &quot;Hunter's License&quot;. A Hunter's License can be traded on the auction house ingame. It can be redeemed for a month of subscripton time, and it can be purchased out-of-game for $15, it just shows up on your character.&#xD;&#xA;&#xD;&#xA;Frank buys a pile of Hunter's Licenses and sells them on the Auction House. Bob spends a few days farming money and buys his Hunter's License for the month. Everyone wins:&#xD;&#xA;&#xD;&#xA;* Frank wins because he doesn't have to do the grinding he finds so boring.&#xD;&#xA;* Bob wins because he gets to play the game for free.&#xD;&#xA;* You win because you're getting Frank's money (which you would have gotten anyway) and Bob's money (which you wouldn't have gotten otherwise.) Additionally, you haven't mucked with the ingame economy - you haven't spawned any powerful items, you haven't started &quot;selling gold&quot;, you're just letting people trade gametime around.&#xD;&#xA;&#xD;&#xA;This has been used very successfully with both Eve Online's [PLEXes][1]. A variant micropayment system, using ingame tradable items as necessary reagents for almost every production and trade, can be seen with Puzzle Pirates' [Doubloons][2]. Another variant can be seen with Kingdom of Loathing, which sells powerful unique items (kind of iffy) that, again, can be traded on the auction house (suddenly makes them far less iffy, because you don't need out-of-game money to get your edge.)&#xD;&#xA;&#xD;&#xA;Remember: every person who spends PLEXes and Doubloons is giving you money, *even if they personally never gave you any money*. Trading is a good thing! Let the economy help you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://support.eveonline.com/Pages/KB/Article.aspx?id=495&#xD;&#xA;  [2]: http://yppedia.puzzlepirates.com/Doubloon" />
  <row Id="5758" PostHistoryTypeId="16" PostId="2962" RevisionGUID="0236594c-68e9-4b70-940f-e8beb37b45d0" CreationDate="2010-08-19T06:59:19.290" UserId="-1" />
  <row Id="5759" PostHistoryTypeId="5" PostId="2961" RevisionGUID="46174e33-3bdf-42a0-9dfe-66a925c66d1b" CreationDate="2010-08-19T07:06:11.207" UserId="865" Comment="added 153 characters in body" Text="For pixelwise collision checks there's a nice tutorial series on the XNA developer site. &lt;br&gt;http://creators.xna.com/en-US/tutorial/collision2dperpixeltransformed&lt;br&gt;&#xD;&#xA;&lt;br&gt;One optimization you can use that wasn't used in those tutorials (oddly enough) is that in most cases only the outline needs to be checked, saving precious cycles.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Edited to add: Lousy answer, misread the question. The tutorials are still pretty decent though if you want to read up on per pixel coldet." />
  <row Id="5760" PostHistoryTypeId="2" PostId="2963" RevisionGUID="0696df07-f1f6-4489-9b8f-07720b37c100" CreationDate="2010-08-19T07:11:27.963" UserId="865" Text="Since the missile is unlikely to move a huge amount of pixels each frame (it wouldn't be smooth on screen) I see no reason to not just check every pixel on the path. Bressenham line algorithm is your friend, and making sure you got a local copy of your bitmap too as you generally don't want to access video memory for every pixel.&#xD;&#xA;This is assuming your bitmap terrain is fully random (as per destructable worms terrain). If your world is tile based you could skip every tile that you know is empty to begin with, but as mentioned before, unless you have a huge amount of missiles to check I couldn't think of a platform that would need that is too slow to just test pixel by pixel, and you won't need to have your world defined in primitives (a worms clone would make that tricky)" />
  <row Id="5761" PostHistoryTypeId="2" PostId="2964" RevisionGUID="9af69728-0453-4394-ba5e-e3a650551af3" CreationDate="2010-08-19T07:12:31.503" UserId="323" Text="Branching sucks. Every time the user has to look at the screen, comprehend it, and then make a decision, you're slowing the game down. With your somewhat-chaotic &quot;move between open tiles&quot; algorithm, nobody but an expert is going to be able to play the game without constant look-comprehend-act-look-comprehend-act cycles.&#xD;&#xA;&#xD;&#xA;Here's how I'd do it. Make a horizontal bar on the screen. That bar can be moved up and down by the up and down buttons. No branching - you hold up, it moves up, you hold down, it moves down. Then the user can hit left and right to toggle between available tiles. There's branching here, but very little, since Mahjong is a mostly-vertical game. Most of the time it'll either be &quot;I'm on the right tile&quot; or &quot;I'm on the wrong tile, but the other one is right&quot;." />
  <row Id="5762" PostHistoryTypeId="2" PostId="2965" RevisionGUID="5569e87b-2699-439d-904e-26ad722625ad" CreationDate="2010-08-19T07:24:36.310" UserId="865" Text="I am a licencee of most Torque products. Don't let the screenshots fool you, it's indeed the art that sells it. As for the engine - you can make games with it, and decent ones at that, but not without putting in a lot of blood, sweat and tears. That holds true for most engines though.&lt;br&gt;&#xD;&#xA;Would I recommend it? Hmmm, hard to say. It has an editor, it has documentation, it has support and it's affordable. The code is reasonably structured - you could do worse.&lt;br&gt;&#xD;&#xA;Would I use it? No. As with most engines I find it easier to write it myself so I know what it can do and how I should do it without having to grasp someone else's philosophy that is bound to clash with mine.&lt;br&gt;&#xD;&#xA;However, having the source and seeing how they approached certain problems is always nice. It's also a full game engine, with pipeline, as opposed to a lot of engines out there.&lt;br&gt;&#xD;&#xA;Bottom line?&lt;br&gt;&#xD;&#xA;I don't regret buying it, as a learning tool. I wouldn't use it to make a game. I would definitely not recommend it to someone just starting out." />
  <row Id="5763" PostHistoryTypeId="2" PostId="2966" RevisionGUID="3454ce3c-6781-4d1b-a7e1-e5cf7f546657" CreationDate="2010-08-19T07:26:58.910" UserId="865" Text="I'd suggest implementing all suggestions given, and a few more you could come up with and have people try it without explanation. That alone will tell you what works, and might give you suggestions for what might work better.&lt;br&gt;&#xD;&#xA;It's hard to beat feedback from real users." />
  <row Id="5764" PostHistoryTypeId="2" PostId="2967" RevisionGUID="4a204802-537e-45d6-a483-e570ecb2ecbe" CreationDate="2010-08-19T10:29:59.240" UserId="1004" Text="For me, it helps to mentally 'map out' the game idea before starting it. I'll try and figure out the main mechanics, a basic structure of the internal game, maybe some little details about how i want it to work. Then i apply rubber to road, and start work, bending or breaking parts of my mental map where the code needs a different setup. I might write some things down (a backstory, maybe the key features), but at that point the design is usually shifting too much for a document to be useful.&#xD;&#xA;&#xD;&#xA;Otherwise, i kinda stall out with it ending up being a faled project early on :/" />
  <row Id="5765" PostHistoryTypeId="16" PostId="2967" RevisionGUID="4a204802-537e-45d6-a483-e570ecb2ecbe" CreationDate="2010-08-19T10:29:59.240" UserId="-1" />
  <row Id="5766" PostHistoryTypeId="5" PostId="2362" RevisionGUID="895829b0-7af5-4799-b8ba-7d1ced247866" CreationDate="2010-08-19T11:31:04.177" UserId="1456" Comment="added 182 characters in body" Text="We are a &quot;nano&quot; game dev company working on REFUSION. &#xD;&#xA;DX9 renderer is almost done and question is: Should we move it to DX11 or not?&#xD;&#xA;Anyone have experience with this?&#xD;&#xA;&#xD;&#xA;Here are some videos from dev progress from the very beginning: &#xD;&#xA;&#xD;&#xA;[Dev test videos][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://refusion.samboush.com/gamedev/show.asp?P1=letsdoit&#xD;&#xA;&#xD;&#xA;EDITED: I'm going to ask more fundamental. What about NextNextGen XBOX1080 or PS4?&lt;BR&gt;&#xD;&#xA;        When? Resources? Architekture? PC DX11 -12 , next XBOX, next PS relations? Future?" />
  <row Id="5767" PostHistoryTypeId="4" PostId="2916" RevisionGUID="728d567c-8e75-4ed1-acd8-ae00cecf677d" CreationDate="2010-08-19T12:39:31.173" UserId="1505" Comment="edited title" Text="Optimizing Bullet and ODE Physics on consoles and mobile phones" />
  <row Id="5768" PostHistoryTypeId="2" PostId="2968" RevisionGUID="9577be02-916b-4863-b6c2-4a9d4d056cfd" CreationDate="2010-08-19T13:48:45.700" UserId="284" Text="I think the payoff matrix is a pretty essential tool.  Games are often more fun when they approach some interesting zero-sum fair play balance, and payoff matrices help you quantify that in complicated cases.  I guess this wikipedia article is as good as any, and gets the basic necessary concept across: [http://en.wikipedia.org/wiki/Normal-form_game][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Normal-form_game" />
  <row Id="5769" PostHistoryTypeId="16" PostId="2968" RevisionGUID="9577be02-916b-4863-b6c2-4a9d4d056cfd" CreationDate="2010-08-19T13:48:45.700" UserId="-1" />
  <row Id="5770" PostHistoryTypeId="5" PostId="630" RevisionGUID="533d4baa-f5f4-4263-9028-872671c22684" CreationDate="2010-08-19T13:50:49.627" UserId="165" Comment="added 108 characters in body" Text="It's not so much hard to develop an MMO, as to develop another **World of Warcraft**. If you're willing to settle for only having a few thousand players, you *can* make an MMO, such as: &#xD;&#xA;&#xD;&#xA;  - [A Tale in the Desert][1] (created by one person)  &#xD;&#xA;[ATITD Wikipedia][2]&#xD;&#xA;&#xD;&#xA;  - [Sherwood Dungeon][3] (created by one person)  &#xD;&#xA;[How one man made an MMO][4]  &#xD;&#xA;[Maid Marion Wikipedia][5]&#xD;&#xA;&#xD;&#xA;  - [Runescape Original Version][6] (The *original* version was much simpler, and was improved over time, and took more people. Created by two people)  &#xD;&#xA;[Runescape Wikipedia][7]&#xD;&#xA;&#xD;&#xA;Not that I'm saying it was *easy* to make those games :) But it can be done by a small number of (skilled, dedicated) people.&#xD;&#xA;&#xD;&#xA;  [1]: http://atitd.com/index.shtml&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A_Tale_in_the_Desert&#xD;&#xA;  [3]: http://www.sherwooddungeon.com/&#xD;&#xA;  [4]: http://hanfordlemoore.com/v/how-one-man-made-an-mmo-an-interview-with-gene-endrody&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Maid_Marian_Entertainment&#xD;&#xA;  [6]: http://www.runescape.com/title.ws&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/RuneScape" />
  <row Id="5771" PostHistoryTypeId="2" PostId="2969" RevisionGUID="57dd3df2-f14c-4718-a7f6-3ae3a372fecd" CreationDate="2010-08-19T13:56:42.373" UserId="284" Text="I think the key point here is that you can trick yourself that what you're working on is actually fun, but only when other people come into contact with it will you really be able to see whether it is.  Which means that you want to do that as early in the process as possible.  &#xD;&#xA;&#xD;&#xA;The moment you have your first prototype, you should be having players test it, and watch how they experience it.  Maybe even before your first prototype (if you can figure out how to prototype the game in words and on paper)." />
  <row Id="5772" PostHistoryTypeId="2" PostId="2970" RevisionGUID="a0a29b0b-8e5c-42d0-86fb-50b3fccea483" CreationDate="2010-08-19T14:05:22.353" UserId="284" Text="I really want to get access to some images of MUD (multi user domain/multi user dungeon) OLC (mud OnLine Creation), to use the structure of npcs/mobs/characters/areas/rooms that muds use on my own webgame project ([http://www.ninjawars.net][1]), which features a near predominant use of text itself.&#xD;&#xA;&#xD;&#xA;I've played a mud for years, and experienced the OLC system of that mud first hand, but the mud went under, so I'm looking for &#xD;&#xA;&#xD;&#xA;I tried compiling the type of Mud it was from source (ROM 2.4) but haven't been able to accomplish that.&#xD;&#xA;&#xD;&#xA;I'm expecting that there are some images of the OLC of items/mobs/etc out there already, but I haven't been able to find any to base my implementation of the same concepts in my game off of.  If there's some live way to get access to a demo of OLC, that would be even better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net" />
  <row Id="5773" PostHistoryTypeId="1" PostId="2970" RevisionGUID="a0a29b0b-8e5c-42d0-86fb-50b3fccea483" CreationDate="2010-08-19T14:05:22.353" UserId="284" Text="Anyone have a source for pictures/screenshots/demos of Mud OLC systems?" />
  <row Id="5774" PostHistoryTypeId="3" PostId="2970" RevisionGUID="a0a29b0b-8e5c-42d0-86fb-50b3fccea483" CreationDate="2010-08-19T14:05:22.353" UserId="284" Text="&lt;old-school&gt;&lt;design-patterns&gt;" />
  <row Id="5775" PostHistoryTypeId="2" PostId="2971" RevisionGUID="71911ef5-9400-4b68-966a-49a3f89f8c7e" CreationDate="2010-08-19T14:13:21.833" UserId="1593" Text="You said that the game you're imagining &quot;looks like it would be really fun.&quot;&#xD;&#xA;&#xD;&#xA;When you close your eyes and imagine yourself playing the game, imagine every detail of how you're playing it.  Is it still fun?  Where's the fun?  Then how is that not matching up with what you're prototyping? &#xD;&#xA;&#xD;&#xA;If it's not really fun, move on.  If it is, just make your real-life implementation more like what you're imagining.  &#xD;&#xA;&#xD;&#xA;And be willing to shoot your sacred cows.  If you have this click-heavy procedure for shifting the weeble-blatz left so that the snork-cannon gets an aim-bonus and getting that aim bonus is awesome(!) but doing the five hundred mouse clicks to get there sucks eggs, you need to either make the aiming-the-snork-cannon minigame fun on it's own or ditch the entire subsystem.  And sometimes the idea for your entire game started out with the snork-cannon aiming and you really, really, really don't want to cut it because it's your baby.  Shoot it in the head.&#xD;&#xA;&#xD;&#xA;Also, it depends on your situation.  Do you have to ship something?  Do you have to buy groceries?  Are you doing this in your spare time as a matter of passion?  " />
  <row Id="5776" PostHistoryTypeId="5" PostId="1141" RevisionGUID="fe6d046a-b5b3-45ae-9e12-ec46f6be85a3" CreationDate="2010-08-19T14:27:18.057" UserId="102" Comment="Fixed pseudo-code mistake" Text="I needed to solve a similar problem: pathfinding on a large maze-like grid with constantly changing &quot;costs&quot; and barriers.&#xD;&#xA;&#xD;&#xA;The thing is, in tower defense game the number of entities that need to have the path solved for them is usually much larger than the number of nodes in the graph. A* is **not** the most appropriate algorithm for handling this, because you'll need to solve it anew each time something is changed. Well it is appropriate if you need to find only one path, but in my case I needed to be able to handle entities which can appear in different locations and each has its own path.&#xD;&#xA;&#xD;&#xA;The [Floyd-Warshall][1] algorithm is far more appropriate, though for my case I wrote a custom algorithm that whenever a node changes, it re-calculates the cost to that node from all its neighbors, and then *if* the neighbors have been changed it is invoked  recursively on them.&#xD;&#xA;&#xD;&#xA;So in the beginning of the game, I just fire up this algorithm on all my &quot;goal&quot; nodes. Then, whenever a single node changes (for example, becomes un-passable), I just fire it up on that node and the change is propagated to all the nodes that will be affected, and then stopped. So no need for global recalculation, and the algorithm is completely independent from the number of entities that will require pathfinding.&#xD;&#xA;&#xD;&#xA;My algorithm was basically something like (pseudo-code):&#xD;&#xA;&#xD;&#xA;    update_node method in Node class:&#xD;&#xA;        $old &lt;- $my_score&#xD;&#xA;        find $neighbor node among all neighbors such that&#xD;&#xA;            $neighbor.score + distance_to($neighbor) is minimal&#xD;&#xA;        $my_score &lt;- $neighbor.score + distance_to($neighbor)&#xD;&#xA;        $next_node &lt;- $neighbor&#xD;&#xA;        if ($my_score != $old)&#xD;&#xA;            for each $neighbor&#xD;&#xA;                $neighbor.update_node()&#xD;&#xA;&#xD;&#xA;With the initial score depending on whether the node is a target or some kind of barrier.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm" />
  <row Id="5777" PostHistoryTypeId="2" PostId="2972" RevisionGUID="3ce9172d-e158-424f-a56f-3587b5752fba" CreationDate="2010-08-19T15:13:21.900" UserId="1286" Text="My question is related with [Fixed time step vs Variable time step][1]. But where a fixed frame-rate improve the consistency of a physics based game, is it the case for a rythm game, or wouldn't it be preferable to use a variable frame-rate ?&#xD;&#xA;&#xD;&#xA;Say, I set the frame-rate to 100/sec, that will lead to an accuracy of 10ms, which is correct, but depending on the computer it will be possible to have a better accuracy. And if I set a too high frame-rate, some other computers may not follow, which may resolve in unsyncing the game and the music.&#xD;&#xA;&#xD;&#xA; - The first solution that came in my mind is to use a variable frame-rate. This way, the game will not be unsynchronized with the music, but the accuracy is too dependent of the computer.&#xD;&#xA; - Another, better, idea (I don't know if this is possible or not), would be to get the instant when has been pressed a key, and the accuracy will be no more dependent of the frame-rate. I'll make this game with [LWJGL][2] and I while reading the javadoc I found the method [getEventNanoseconds()][3], and I was wondering how it is reliable since it's written &quot;Only useful for relative comparisons with other Keyboard events, as the absolute time has no defined origin.&quot;.&#xD;&#xA;&#xD;&#xA;What game loop method, do you think, is the most appropriate for a rythm game ? And for a rythm game with keysound ?&#xD;&#xA;Did you made a rythm game, or some game that require a good accuracy and how did you manage the updating ?&#xD;&#xA;&#xD;&#xA;Thanks for your help ! :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;  [2]: http://www.lwjgl.org/&#xD;&#xA;  [3]: http://www.lwjgl.org/javadoc/org/lwjgl/input/Keyboard.html#getEventNanoseconds()" />
  <row Id="5778" PostHistoryTypeId="1" PostId="2972" RevisionGUID="3ce9172d-e158-424f-a56f-3587b5752fba" CreationDate="2010-08-19T15:13:21.900" UserId="1286" Text="Accuracy and frame-rate in a rhythm game" />
  <row Id="5779" PostHistoryTypeId="3" PostId="2972" RevisionGUID="3ce9172d-e158-424f-a56f-3587b5752fba" CreationDate="2010-08-19T15:13:21.900" UserId="1286" Text="&lt;frame-rate&gt;&lt;events&gt;" />
  <row Id="5780" PostHistoryTypeId="2" PostId="2973" RevisionGUID="eecc95f7-8ea8-43c8-b947-c89d47b888f0" CreationDate="2010-08-19T15:45:57.903" UserId="1463" Text="It seems like WPF was created as the application answer to Adobe's Flash.  Silverlight is used for creating web pages.  But, can that same functionality be pulled into a standalone WPF application.  [Scaleform][1] allows Flash to be used within unmanaged C++ games.  Can WPF be used to create the same type of interfaces?  What I've read seems to make me believe it can.  But, I haven't seen any sheetshots of applications that show this kind of interface.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scaleform.com/products/gfx" />
  <row Id="5781" PostHistoryTypeId="1" PostId="2973" RevisionGUID="eecc95f7-8ea8-43c8-b947-c89d47b888f0" CreationDate="2010-08-19T15:45:57.903" UserId="1463" Text="Can a standalone WPF application create an interface that looks like a Flash interface?" />
  <row Id="5782" PostHistoryTypeId="3" PostId="2973" RevisionGUID="eecc95f7-8ea8-43c8-b947-c89d47b888f0" CreationDate="2010-08-19T15:45:57.903" UserId="1463" Text="&lt;flash&gt;&lt;c#&gt;&lt;gui&gt;&lt;interface&gt;&lt;wpf&gt;" />
  <row Id="5783" PostHistoryTypeId="2" PostId="2974" RevisionGUID="82e5acc1-4d0f-4f32-bffb-e4ddec692607" CreationDate="2010-08-19T15:46:36.657" UserId="465" Text="It's highly dependent on the system you are using and how good the sound drivers or libraries are. Different consoles have vastly different approaches to sound streaming.&#xD;&#xA;&#xD;&#xA;I would generally recommend a fixed time step for consistency because a smooth frame rate without pikes and dips is very important to keep a smooth feeling which doesn't break the flow.&#xD;&#xA;&#xD;&#xA;Controller lag is a bigger factor than you would think. I quite like Rhythm games which use an auto-configure mode which basically lets the play define where they see the moment as being, then artificially compensating for it." />
  <row Id="5784" PostHistoryTypeId="2" PostId="2975" RevisionGUID="6f6d77ff-0c3c-42a0-8fd3-cc9eaa91b806" CreationDate="2010-08-19T16:19:22.577" UserId="458" Text="Dan Cook has a great blog post about this. His post is from the perspective of Flash games and not MMOs, but at the end of the day the principles are the same: you're offering something free to play, with some kind of premium content that is worth paying for, and trying to convert customers.&#xD;&#xA;&#xD;&#xA;http://www.lostgarden.com/2009/08/flash-love-letter-2009-part-2.html" />
  <row Id="5785" PostHistoryTypeId="16" PostId="2975" RevisionGUID="6f6d77ff-0c3c-42a0-8fd3-cc9eaa91b806" CreationDate="2010-08-19T16:19:22.577" UserId="-1" />
  <row Id="5786" PostHistoryTypeId="2" PostId="2976" RevisionGUID="036d97c4-e96d-45c2-a800-78a34a612f58" CreationDate="2010-08-19T16:34:25.810" UserId="93" Text="WPF was created to provide a better way for Windows developers to build GUIs for desktop applications. Silverlight was created as an answer to Flash and re-uses much the WPF API but has a different implementation.&#xD;&#xA;&#xD;&#xA;In theory you could use WPF to create the GUI for a game, but in practice you probably wouldn't:-&#xD;&#xA;&#xD;&#xA;* Your game would depend on the .NET framework being installed. This isn't such a big deal any more, but still, it's one more thing to worry about not working.&#xD;&#xA;* WPF uses Direct3D 9 to render. There is an extension to it which on Vista/Win7 and XP SP3 or later allows you to allocate a surface and share it between WPF and your unmanaged C++ game engine. You might have problems with DX10.1 or 11.&#xD;&#xA;* The .NET runtime suspends all threads that are involved in any way with managed memory during a garbage collection. To avoid having your game loop suspended you need to come up with a way of exchanging data between your unmanaged code and the .NET runtime that avoids calling into the .NET runtime via interop. Probably you'd have a shared area of unmanaged memory that you both have access to and synchronise using umanaged threading primatives. &#xD;&#xA;* Here's the real problem though: If you went down this route you'd be handing over control of your window to WPF. You just get to supply WPF with a D3D surface containing your final 3d render and then it composites that with whatever it has generated before presenting it. You'd be locked to WPF's refresh schedule and there's also no chance of going full-screen in the way that 3d games normally do.&#xD;&#xA;&#xD;&#xA;There is a possibility that this situation could be rescued though. There is an open-source re-implementation of .NET called Mono. They have a sub-project called Moonlight which is a re-implementation of Silverlight. With source code available there's a possibility it could be integrated in a similar way to Scaleform and allow you to build GUIs using Microsoft's excellent Expression Blend authoring tool. I don't think anyone has done this yet so there are probably issues to be uncovered, but I'm just throwing it out there as an idea." />
  <row Id="5787" PostHistoryTypeId="2" PostId="2977" RevisionGUID="e42b3f7d-cf85-4144-a272-bf793583d8cc" CreationDate="2010-08-19T16:53:30.827" UserId="831" Text="Regardless of your technological stance, the question should be framed in terms of your market. Are you going to be creating a game that runs on all available hardware? Or are you going to be the next Project Offset?&#xD;&#xA;&#xD;&#xA;According to [Valve][1] DX11 capable hardware is only 5.6% of the market. &#xD;&#xA;&#xD;&#xA;The other factors are - does your &quot;nano&quot; team have the bandwidth create the content and pipelines that take advantage of more recent hardware? Or are you going to be beg/borrowing/stealing art to ship something?&#xD;&#xA;&#xD;&#xA;Note that Valve themselves support a huge range of hardware. They have a scalable engine, and the resources to do so.&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/hwsurvey/" />
  <row Id="5788" PostHistoryTypeId="2" PostId="2978" RevisionGUID="adb8ec63-1c73-49fe-91e0-97bc362eb0eb" CreationDate="2010-08-19T16:56:16.047" UserId="181" Text="1) What Kimau said about compensating for controller lag/perceptional differences is important. While a lot of people get the basic rhythm, just translating it into a keypress might mean they're slightly off. If you can, give them exact feedback where their press occurred. (I.e. display a marker relative to the real beat, or something similar)&#xD;&#xA;&#xD;&#xA;2) relative comparisons with other keyboard events are good - *if* you use a keyboard event to start play. Otherwise, you need to use system clock for the initial event, and then slowly transition over to keyboard events. Check out the NTP (RFC 1305) for issues in synchronizing different clocks with different resolutions&#xD;&#xA;&#xD;&#xA;3) If you can, keep the controller on a different thread decoupled from the UI thread - that allows you a higher frequency there. (Assuming you don't use the timestamp on the keyboard events). &#xD;&#xA;&#xD;&#xA;4) Having even a 100Hz resolution on keyboard event is small. Assuming a song with 120BPM, that's 2 beats per second. Which basically means your resolution is big enough that up to 2% time difference between real beat and your controller input are completely unnoticed. So, if you can, up the resolution&#xD;&#xA;&#xD;&#xA;5) Also, if your sound driver allows you to query the current sample position, that would be the best timing indicator, since it's directly tied to the music.&#xD;&#xA;&#xD;&#xA;And finally, DO have a musician check your idea of timing. There are plenty of rhythm games that are slightly off. Which is annoying as heck if you actually play music yourself.&#xD;&#xA;" />
  <row Id="5794" PostHistoryTypeId="2" PostId="2981" RevisionGUID="f2df0e4d-8a9c-4ea7-8627-3e2493d1c6e3" CreationDate="2010-08-19T17:19:29.020" UserId="1779" Text="I am Dalilean and I am a gamer. There I have said it. Damn, feels like a weight is lifted from my shoulders… They say the first step is to admit the problem. Now the second step is doing something about it. &#xD;&#xA;&#xD;&#xA;So….&#xD;&#xA;&#xD;&#xA;As more than a few of you know, I decided to design a game.&#xD;&#xA;&#xD;&#xA;Right now I feel like I am at a critical point in development. I am looking at the aspects of the game, from a game play point of view. This means I am past the story, the conceptualization, and now I am dealing with issues of “What specifics do each character have”, “What options and results do the actions of the player have in the game.”&#xD;&#xA;&#xD;&#xA;I got to wondering, How much do I show possible investors or developers without showing too much? &#xD;&#xA;&#xD;&#xA;I worry that I give them a copy of the Game Design Document; they will just say thank you and nothing else. Then, several years later, I will see my concepts seeping into games. I have learned from previous experiences that not everyone is honest and that a healthy level of paranoia goes a long way in this world.&#xD;&#xA;" />
  <row Id="5795" PostHistoryTypeId="1" PostId="2981" RevisionGUID="f2df0e4d-8a9c-4ea7-8627-3e2493d1c6e3" CreationDate="2010-08-19T17:19:29.020" UserId="1779" Text="The Thin Red Line. What to present to get interest without showing too much?" />
  <row Id="5796" PostHistoryTypeId="3" PostId="2981" RevisionGUID="f2df0e4d-8a9c-4ea7-8627-3e2493d1c6e3" CreationDate="2010-08-19T17:19:29.020" UserId="1779" Text="&lt;game-design&gt;&lt;design-document&gt;" />
  <row Id="5797" PostHistoryTypeId="2" PostId="2982" RevisionGUID="42183e27-139a-4f33-b34c-eef388470ab0" CreationDate="2010-08-19T17:23:27.063" UserId="1524" Text="The main thing to show them is your passion and excitement for the game.   Show them as much of your game as needed to get them to share your excitement.  It is better to risk showing them too much and get them sold on it." />
  <row Id="5798" PostHistoryTypeId="2" PostId="2983" RevisionGUID="8e6964b5-af04-4a9f-bdea-d8c2a83e29e4" CreationDate="2010-08-19T17:30:16.320" UserId="1524" Text="My favorite quest was the shawl quest in everquest.  It was a series of quests and each step completed result in a better item.  It was a lot of gather so many of this from killing monster x.  Get your skill in jewelcrafting so high.  It was a very long and tedious quest series but the reward was different than what could be gotten other ways.  The quest could be done solo and that was a great part.  I hate quests that I have to go begging for others to waste a lot of their time on the quest.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5800" PostHistoryTypeId="2" PostId="2984" RevisionGUID="0d3ff611-e2d6-420b-8881-5158ff81ae35" CreationDate="2010-08-19T17:53:45.747" UserId="154" Text="Game development studios and Publishers do not accept unsolicited design documents. If you send them one directly it will be immediately trashed. Any dev studio has far more ideas than it has time/money/resources to build them and so they aren't looking for stuff from the outside. Also as a legal protection if they are working on something unannounced that has similarities with a document that was submitted to them, then proving they were already working on those concepts can become costly. It's just safer to not look at those things. &#xD;&#xA;&#xD;&#xA;Most of the indie community are self starters. They decide to build games because they have some concept they want to explore and start making it on their own. You aren't going to find an untapped resource of programmers &amp; artists that desperately want to make someone else's work.&#xD;&#xA;&#xD;&#xA;If you really want to make your game, then find out how to simplify your idea to match your ability and start building it on your own." />
  <row Id="5801" PostHistoryTypeId="2" PostId="2985" RevisionGUID="b256e0a6-5cbe-4306-a6d2-68958821f77f" CreationDate="2010-08-19T18:15:03.693" UserId="656" Text="Just show them the design document. Game ideas/design are rarely the main factor in ones success. It's how you implement the idea and the team that puts it together is what will make the difference. You need not to worry about people copying your game idea, that is, if your game ideas were truly revolutionary, you will have many copycats but will always be one step ahead of them. Only you know how to implement your ideas in your unique way and no one can copy that. If your ideas was easily copied, it is not because someone stole your idea, it is because you did not have the ability to carry out that idea in a successful way. You will need this level of confidence to gain investors trust." />
  <row Id="5802" PostHistoryTypeId="2" PostId="2986" RevisionGUID="5ae93fc8-9b58-4635-ba4b-bac03449ab40" CreationDate="2010-08-19T18:28:43.713" UserId="370" Text="###[Squirrel][1]###&#xD;&#xA;&#xD;&#xA;Squirrel has an interesting history.  It was built after a game architect had issues with Lua's unpredictable garbage collection, and crazy *everything is null even if it doesn't exist*.&#xD;&#xA;&#xD;&#xA;Squirrel is the sripting language used in [Left 4 Dead 2][2].  The API is very lua-like (Squirrel's author [loves Lua's design][3]).&#xD;&#xA;&#xD;&#xA;So Squirrel is an awesome language as it's kinda 2nd generation Lua.  It took the good ideas and removed the annoying eccentricities.&#xD;&#xA;&#xD;&#xA;Same from Lua:&#xD;&#xA;&#xD;&#xA;* coroutines&#xD;&#xA;* tables and metatables&#xD;&#xA;* dynamic typed&#xD;&#xA;* lots more&#xD;&#xA;&#xD;&#xA;New to Squirrel:&#xD;&#xA;&#xD;&#xA;* classes&#xD;&#xA;* arrays&#xD;&#xA;* regexs instead of Lua's match syntax.&#xD;&#xA;* C/C++/Java/C# style language instead of Pascal/Delphi style.&#xD;&#xA;* lots more&#xD;&#xA;&#xD;&#xA;Squirrel's primary disadvantage is it's not Lua.  Lua is much more widely used.  But if that's not an issue Squirrel is an easy win.  However, often the language's popularity is useful feature in itself, so the decision is not so clear cut.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://squirrel-lang.org/&#xD;&#xA;  [2]: http://developer.valvesoftware.com/wiki/L4D2_Vscripts&#xD;&#xA;  [3]: http://wiki.squirrel-lang.org/default.aspx/SquirrelWiki/FAQ.html#Is%20Squirrel%20a%20Lua%20clone%3F" />
  <row Id="5803" PostHistoryTypeId="16" PostId="2986" RevisionGUID="5ae93fc8-9b58-4635-ba4b-bac03449ab40" CreationDate="2010-08-19T18:28:43.713" UserId="-1" />
  <row Id="5805" PostHistoryTypeId="2" PostId="2987" RevisionGUID="5bf0c801-e327-487a-b433-37d7b8ace1fb" CreationDate="2010-08-19T18:55:11.567" UserId="1593" Text="Give every NPC an agenda.  Whatever that NPC wants out of life: to bring in the crops so her family will eat during the winter or to beat down the agents of a particular megacorp, give the NPC the ability to create quests that further that agenda.  And then make it *actually* further that agenda.  &#xD;&#xA;&#xD;&#xA;If she doesn't get enough crops brought in, the family can starve and disappear.  After a time, a new family might move in, but make it matter that they're gone.  Maybe when the farm is unoccupied, the players can't rest there to heal up or use the well or buy whatever they need from a farm, etc.  The world will come alive as these things overlap.&#xD;&#xA;&#xD;&#xA;If you're using a faction standing system, make it matter.  Make NPCs react based on faction standings.  Make it hard (but not impossible, usually) to gain standing in certain combinations of factions.  Make faction standing valuable.  NPCs will react with hostility to some and with affection to others.  Even if they like you, they'll only give certain important quests to people they trust.&#xD;&#xA;&#xD;&#xA;If you have crafting quests like make x units of y and take them to z, set up some kind of demand schedule and if z has received more units of y than they know what to do with, stop issuing that quest for a while.  Even during a planetary siege, you only need so many warp-core-transducing-hydrospanners at the shipyard. &#xD;&#xA;&#xD;&#xA;Do everything you can to make sure that if I start the same kind of character in the same location, and befriend the same group of NPCs, that I will still not get an identical set of quests.  &#xD;&#xA;&#xD;&#xA;Also, at every turn, try to imagine interesting content that does not involve fighting.  Fighting is cool, but it's a crutch.  It's too easy.&#xD;&#xA;&#xD;&#xA;The world needs to seem alive and no amount of fancy writing is going to do it.  Since you can't possibly author enough quests to make what I'm advising work, you need to develop a system that generates the quests for you and then sprinkle the developer-built quests in among them." />
  <row Id="5806" PostHistoryTypeId="5" PostId="2487" RevisionGUID="bf64529e-f516-40ad-ad96-c8098c5f8685" CreationDate="2010-08-19T19:44:42.487" UserId="469" Comment="added 285 characters in body" Text="I have the following problem:&#xD;&#xA;&#xD;&#xA;My game supports multiple powers, that you can use when you want, or even mix them, I currently assigned them to the numbers on the top of the keyboard.&#xD;&#xA;&#xD;&#xA;After so much time playtesting, I ended developing high skills in playing my own game, and several of my new tactics involve mixing powers, but I found that I keep pressing incorrect buttons, or that I need to pause, look at the keyboard, and unpause, or I plainly press the wrong button (like, I try to press 5, but press 6 instead).&#xD;&#xA;&#xD;&#xA;I already expected this when I made the keybindings, but I don't found how to solve...&#xD;&#xA;&#xD;&#xA;How I fix that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: The game is a fast-paced action game, or arcade game... (you know, not necessarily on a genre, except it is action, and you aim for high-scores), so I cannot use random keys, I really need to allow the players to press the keys REALLY fast, ANY key that they need to press." />
  <row Id="5807" PostHistoryTypeId="2" PostId="2988" RevisionGUID="d1022994-738d-4fcc-8d1b-fd158756c89a" CreationDate="2010-08-19T19:48:22.447" UserDisplayName="ajanba" Text="What is the best way in your opinion to find new ideas for game? I want to invent something really new (like Gish, World of Goo, Crayon Physics etc), but I have problem with makeing invent something very creativity :/  " />
  <row Id="5808" PostHistoryTypeId="1" PostId="2988" RevisionGUID="d1022994-738d-4fcc-8d1b-fd158756c89a" CreationDate="2010-08-19T19:48:22.447" UserDisplayName="ajanba" Text="Idea for new game" />
  <row Id="5809" PostHistoryTypeId="3" PostId="2988" RevisionGUID="d1022994-738d-4fcc-8d1b-fd158756c89a" CreationDate="2010-08-19T19:48:22.447" UserDisplayName="ajanba" Text="&lt;game-design&gt;" />
  <row Id="5810" PostHistoryTypeId="2" PostId="2989" RevisionGUID="30c90180-75dd-4f87-85d8-2089942a37d7" CreationDate="2010-08-19T19:51:18.307" UserId="452" Text="There's no perfect method for knowing a mechanic is &quot;fun&quot; but by intuition and experience. Prototyping it and finding out whether it works or not is really the time-tested procedure.&#xD;&#xA;&#xD;&#xA;Remember a bad mechanic in one context may work in another, or with different tuning. Platforming, for example, can feel like a chore or smooth and agile depending on how you adjust speeds and accelerations." />
  <row Id="5811" PostHistoryTypeId="2" PostId="2990" RevisionGUID="5bc638f7-c61f-4301-b485-36b87d359d21" CreationDate="2010-08-19T19:57:56.073" UserId="458" Text="Since you mention &quot;investors&quot; - investors care less about your Great Idea for a game, and more about the team you've put together. Do you have people with a strong track record of executing a project, getting it done, and doing it well? If not, you'll have a hard time getting investment capital. The design doc is the first 1% of the work, after all.&#xD;&#xA;&#xD;&#xA;That said, if someone does want to see your design doc and you're really that paranoid about it, my advice would be to consult a lawyer in advance and have some kind of NDA (Non-disclosure agreement) that the other party can sign before you show them anything that would be potentially damaging to you if they &quot;steal&quot; it. NDAs are pretty common in this industry. As others have said, no one is going to steal your idea (they have too many of their own as it is), so it comes down to how paranoid you want to be.&#xD;&#xA;&#xD;&#xA;And for the love of all that is holy, have a working, playable demo to show. That is the bare minimum bar to hit if you're trying to get funding. If all you have is paper, then you have failed to show any ability to turn it into reality, and you'll be politely shown the door." />
  <row Id="5812" PostHistoryTypeId="2" PostId="2991" RevisionGUID="31f01dd6-fca7-49d4-bd4c-2cd1bd1f19e0" CreationDate="2010-08-19T20:02:49.197" UserId="447" Text="The best way to get really good ideas -- ideas that will become great games -- is to make lots of game. You should brainstorm up lots of stuff and make prototypes. You will not make good games without lots of trying things and failing with some and iterating on what works. World of Goo and Crayon Physics both started out as small, quick prototypes (not sure about Gish).&#xD;&#xA;&#xD;&#xA;Prototyping allows you the freedom to try out wild ideas, figure out how to make them shine or figure out that they don't work, and not spend years of your life doing it. The years of your life come when it's time to make a real game.&#xD;&#xA;&#xD;&#xA;I'm not sure what your specialty is, but prototypes come in various forms. The two big ones I see a lot are quick and dirty videogame prototypes and paper (or boardgame) prototypes. Do the simplest, smallest thing possible and make that. See whether it works and what needs to change. Iterate. Then go and do the same exercise with a new idea. Eventually, you'll have a prototype that you MUST MAKE: something you feel really strongly about.&#xD;&#xA;&#xD;&#xA;Make that." />
  <row Id="5813" PostHistoryTypeId="2" PostId="2992" RevisionGUID="51f24e98-71e6-41dc-a620-c852567e81ab" CreationDate="2010-08-19T20:04:32.190" UserId="458" Text="The good news: if you've got game development skills (programming, art, audio, etc.), there are MANY designers who would absolutely LOVE to bring you in to work on their project. Usually, ideas for games are not the limiting factor, but rather the time it takes to turn even one game into something playable.&#xD;&#xA;&#xD;&#xA;If your question is, how do you learn to come up with these ideas yourself:&#xD;&#xA;&#xD;&#xA;The task of doing this is called &quot;game design&quot; - so start by using that as your search topic. &#xD;&#xA;&#xD;&#xA;Many universities offer classes in game design (though make sure they are really teaching what you want to learn, as the term is misused a lot). Gamasutra.com has an entire section devoted to the design of games. I may as well also plug my free online course: http://gamedesignconcepts.wordpress.com&#xD;&#xA;&#xD;&#xA;There are many books on game design. Most of them are really bad. A few are really good. There's a question about that here:&#xD;&#xA;http://gamedev.stackexchange.com/questions/497/good-game-design-books" />
  <row Id="5814" PostHistoryTypeId="2" PostId="2993" RevisionGUID="21beda6d-2d16-4f46-aa7e-a1f54bd261a7" CreationDate="2010-08-19T20:05:54.900" UserId="8" Text="One informal way is to observe the world around you. Watch the kind of objects and interactions you have every day. See what makes people happy or what captivates them. Is there any way that can be used as the basis of a game? Or can you add it to an existing game in a way that makes something new? Mull it over, try playing a mini prototype in your head. If it doesn't have potential, move on. If it does, make a real prototype.&#xD;&#xA;&#xD;&#xA;Spend a lot of time thinking and observing. Eventually you will have a lot of ideas that aren't good enough and some that are." />
  <row Id="5815" PostHistoryTypeId="5" PostId="2991" RevisionGUID="d91dee21-4c38-440d-a111-0cd0c7d241a2" CreationDate="2010-08-19T20:11:58.707" UserId="447" Comment="Corrected grammar." Text="The best way to get really good ideas -- ideas that will become great games -- is to make lots of games. You should brainstorm up lots of stuff and make prototypes. You will not make good games without lots of trying things and failing with some and iterating on what works. World of Goo and Crayon Physics both started out as small, quick prototypes (not sure about Gish).&#xD;&#xA;&#xD;&#xA;Prototyping allows you the freedom to try out wild ideas, figure out how to make them shine or figure out that they don't work, and not spend years of your life doing it. The years of your life come when it's time to make a real game.&#xD;&#xA;&#xD;&#xA;I'm not sure what your specialty is, but prototypes come in various forms. The two big ones I see a lot are quick and dirty videogame prototypes and paper (or boardgame) prototypes. Do the simplest, smallest thing possible and make that. See whether it works and what needs to change. Iterate. Then go and do the same exercise with a new idea. Eventually, you'll have a prototype that you MUST MAKE: something you feel really strongly about.&#xD;&#xA;&#xD;&#xA;Make that." />
  <row Id="5816" PostHistoryTypeId="2" PostId="2994" RevisionGUID="df61d4a6-b94a-4656-90c4-d2f8ba9c1af3" CreationDate="2010-08-19T20:30:46.510" UserId="1163" Text="There is no NEW ideas, only different combinations of old ideas.&#xD;&#xA;&#xD;&#xA;Idea generation is also known as [Ideation][1]. You have several ways to generate ideas such as...&#xD;&#xA;&#xD;&#xA; - Brain-storming sessions&#xD;&#xA; - [Mindmapping][2]&#xD;&#xA; - Problem Solving&#xD;&#xA; - Metaphorical Thinking&#xD;&#xA; - Thinking Hats / [Ego Alter][3]&#xD;&#xA; - [SCAMPER][4]&#xD;&#xA; - Using Random Media To Stimulate Thoughts&#xD;&#xA; - Forced Associations&#xD;&#xA; - Changing Perspective Or Place&#xD;&#xA; - Collaborative&#xD;&#xA; - Experimentation&#xD;&#xA; - [Vision Circle][5]&#xD;&#xA;&#xD;&#xA;Most idea generation techniques can be done by yourself, or with a group. When in a group you have the opportunity to feed off each other, and come up with more unique ideas because of the different perspectives. Don't underestimate other people, even &quot;non-creatives&quot; can have great ideas.&#xD;&#xA;&#xD;&#xA;Also see&#xD;&#xA;&#xD;&#xA; - [Creativity techniques][6]&#xD;&#xA; - [creatingminds.org - Ideation Tools][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Ideation_(idea_generation)&#xD;&#xA;  [2]: http://www.thegraphicdesignschool.com/blog/graphic-design/idea-generation-techniques-mind-mapping-for-graphic-design/&#xD;&#xA;  [3]: http://www.creativeadvantage.com/ego-alter.aspx&#xD;&#xA;  [4]: http://www.creativeadvantage.com/scamper.aspx&#xD;&#xA;  [5]: http://www.creativeadvantage.com/vision-circle.aspx&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Creativity_techniques&#xD;&#xA;  [7]: http://creatingminds.org/tools/tools_ideation.htm" />
  <row Id="5817" PostHistoryTypeId="5" PostId="2988" RevisionGUID="ddef6084-a664-4f6b-8c42-f155c5127a66" CreationDate="2010-08-19T20:41:34.720" UserId="51" Comment="rewrote the question" Text="What is the best way in your opinion to find new ideas for games? I want to invent something really new (like Gish, World of Goo, Crayon Physics etc), but I'm having problems coming up with new, creative ideas." />
  <row Id="5818" PostHistoryTypeId="4" PostId="2988" RevisionGUID="ddef6084-a664-4f6b-8c42-f155c5127a66" CreationDate="2010-08-19T20:41:34.720" UserId="51" Comment="rewrote the question" Text="How do you come up with ideas for new games?" />
  <row Id="5819" PostHistoryTypeId="6" PostId="2988" RevisionGUID="ddef6084-a664-4f6b-8c42-f155c5127a66" CreationDate="2010-08-19T20:41:34.720" UserId="51" Comment="rewrote the question" Text="&lt;game-design&gt;" />
  <row Id="5820" PostHistoryTypeId="5" PostId="2976" RevisionGUID="de6b836d-668e-437e-8d4d-6103e92f8a5f" CreationDate="2010-08-19T20:48:33.050" UserId="93" Comment="more info" Text="WPF was created to provide a better way for Windows developers to build GUIs for desktop applications. Silverlight was created as an answer to Flash and re-uses much the WPF API but has a different implementation.&#xD;&#xA;&#xD;&#xA;In theory you could use WPF to create the GUI for a game, but in practice you probably wouldn't:-&#xD;&#xA;&#xD;&#xA;* Your game would depend on the .NET framework being installed. This isn't such a big deal any more, but still, it's one more thing to worry about not working.&#xD;&#xA;* WPF uses Direct3D 9 to render. There is an extension to it which on Vista/Win7 and XP SP3 or later allows you to allocate a surface and share it between WPF and your unmanaged C++ game engine. You might have problems with DX10.1 or 11.&#xD;&#xA;* The .NET runtime suspends all threads that are involved in any way with managed memory during a garbage collection. To avoid having your game loop suspended you need to come up with a way of exchanging data between your unmanaged code and the .NET runtime that avoids calling into the .NET runtime via interop. Probably you'd have a shared area of unmanaged memory that you both have access to and synchronise using umanaged threading primatives. &#xD;&#xA;* Here's the real problem though: If you went down this route you'd be handing over control of your window to WPF. You just get to supply WPF with a D3D surface containing your final 3d render and then it composites that with whatever it has generated before presenting it. You'd be locked to WPF's refresh schedule and there's also no chance of going full-screen in the way that 3d games normally do.&#xD;&#xA;&#xD;&#xA;There is a possibility that this situation could be rescued though. There is an open-source re-implementation of .NET called Mono. They have a sub-project called [Moonlight][1] which is a re-implementation of Silverlight. With source code available there's a possibility it could be integrated in a similar way to Scaleform and allow you to build GUIs using Microsoft's excellent Expression Blend authoring tool. I don't think anyone has done this yet so there are probably issues to be uncovered, but I'm just throwing it out there as an idea.&#xD;&#xA;&#xD;&#xA;EDIT: It occured to me after adding this that maybe your interest isn't so much in leveraging authoring tools like Flash Studio or Expression Blend and maybe you just want to be able to draw high-quality 2d graphics fast. In which case there is the [Direct2D API][2] that Microsoft added in Windows 7 and then back-ported to Vista.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Moonlight&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/dd370990%28VS.85%29.aspx" />
  <row Id="5821" PostHistoryTypeId="2" PostId="2995" RevisionGUID="6c23ea9a-a072-4bc6-9a9e-6d103186cf85" CreationDate="2010-08-19T21:15:08.443" UserId="1543" Text="I think the best thing to do is partner up with someone and start brainstorming ideas, they don't have to be a programmer or a hardcore gamer, they just have to be enthusiastic about games in general.&#xD;&#xA;&#xD;&#xA;I'd recommend taking part in a few game jams and participating in [The Experimental Gameplay Project][1].&#xD;&#xA;&#xD;&#xA;Sometimes placing restrictions on your design or building a game around a theme will yield some interesting ideas. How would a game about candles play? What would a game in which you could only use black and white look like? How can you exploit that restriction in terms of a game mechanic?&#xD;&#xA;&#xD;&#xA;Other than that, just keep playing games of all kinds.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://experimentalgameplay.com/" />
  <row Id="5822" PostHistoryTypeId="2" PostId="2996" RevisionGUID="dc453b68-dc51-4ac2-853f-cb32003920f2" CreationDate="2010-08-19T21:17:04.217" UserId="1553" Text="Okay, this idea has come up for the 3rd time in conversation now, and it's been bugging me for years. The idea is a game where all players make decisions/issue orders to units while the game is in a paused state, and all the actions are executed at once, in real-time. This could be at any level from a TRPG (i.e. Final Fantasy Tactics), to a small-scale skirmish (i.e. Worms), to a game with bases and many units (i.e. Advance Wars), to a Risk-type game (i.e. Risk).&#xD;&#xA;&#xD;&#xA;The main disadvantage to this I can see is that the player doesn't see the result of an action immediately. In a traditional turn-based or real-time strategy game, the user clicks &quot;attack that fool&quot; and there's an explosion straight away. There also might be weird situations (you send your unit to melee a unit running in the opposite direction, for example), but that's a low-level detail; a good game designer should be able to get around these things. Finally, there's the general paucity of turn-based games, but they offer a level of tactical depth impossible in real-time strategy games, and there's always a market for them (dozens of new TBSes appear each year).&#xD;&#xA;&#xD;&#xA;- Are there any games out there that use this paradigm?&#xD;&#xA;- Why aren't there more?&#xD;&#xA;- What would be necessary to make this work?&#xD;&#xA;- What potential issues could you foresee?" />
  <row Id="5823" PostHistoryTypeId="1" PostId="2996" RevisionGUID="dc453b68-dc51-4ac2-853f-cb32003920f2" CreationDate="2010-08-19T21:17:04.217" UserId="1553" Text="Turn-based strategy games where action happens in real-time?" />
  <row Id="5824" PostHistoryTypeId="3" PostId="2996" RevisionGUID="dc453b68-dc51-4ac2-853f-cb32003920f2" CreationDate="2010-08-19T21:17:04.217" UserId="1553" Text="&lt;game-design&gt;&lt;turn-based&gt;" />
  <row Id="5825" PostHistoryTypeId="2" PostId="2997" RevisionGUID="c4cffb50-f037-45b9-801f-d437a221be12" CreationDate="2010-08-19T21:32:12.807" UserId="469" Text="I was forced to work with sevreal Torque products...&#xD;&#xA;&#xD;&#xA;It was a disaster.&#xD;&#xA;&#xD;&#xA;First, the regular Torque Game Engine, the documentation is a mess, the support is more about forcing you to ask on the forums, and the engine although solid, it is old, and has several bugs of the &quot;hilarious&quot; type...&#xD;&#xA;&#xD;&#xA;But some other teams that I know, don't found those bugs to hilarious, specially one that after 4 months working to make a REALLY cool castle, could not make the collision work (even doing it properly...) without severe hacks, and even then it was still strange...&#xD;&#xA;&#xD;&#xA;My own team had problems with that too, ranging from random collision boxes in the middle of the nothing (yep, you was walking and suddenly you could not walk...) to walls that don't collide.&#xD;&#xA;&#xD;&#xA;And finally, the model editor of TGE is REALLLY awfull.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;TGEA is a TGE that support shaders, unfortunately it can easily get hell slow, and it was sorta broken (I know some dudes that spent 80% of their resources hacking TGEA source to make a simple cartoon shader work properly).&#xD;&#xA;&#xD;&#xA;So, about TGEA and TGE: Lots of people claim that the best is that they provide the source... I say that they provide the source, because without it you cannot do much...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now TorqueX... well, the editor was crashy, and crashy, and SO CRASHY that we decided to switch engine in mid development.&#xD;&#xA;&#xD;&#xA;After that, happily we never had contact with Torque again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That said, during that time, we also worked with 3D Game Studio A5, and Torque was better..." />
  <row Id="5826" PostHistoryTypeId="2" PostId="2998" RevisionGUID="7b50329c-2502-4a75-bdd8-e3dea7c35b78" CreationDate="2010-08-19T21:39:29.657" UserId="458" Text="&gt; Are there any games out there that use&#xD;&#xA;&gt; this paradigm?&#xD;&#xA;&#xD;&#xA;&quot;Turn-based&quot; and &quot;real-time&quot; are not mutually exclusive, so if you're asking if this has been done before, it depends on how you define them.&#xD;&#xA;&#xD;&#xA;There are plenty of turn-based games where all players write down (or enter, or program, or whatever) their commands for the turn, secretly and simultaneously, then reveal and resolve. The resolution may not count as &quot;real-time&quot; unless it's being shown on the computer, the idea being the players are just sitting and watching the turn play out. The board game RoboRally, the pencil-and-paper game Spellcaster (aka Waving Hands), the online TCG Sanctum all come to mind instantly. You could easily mod a lot of turn-based games: consider Chess where you write down moves simultaneously, using some custom rules to resolve situations where one piece moves into a square just as another moves out, or two pieces cross paths or move into the same square at once. Simultaneous-move is not anything special, but it is an elegant way of removing the first-player advantage.&#xD;&#xA;&#xD;&#xA;If you're thinking instead of a game where you make turn-based moves, and then the resolution of those moves happens in real-time through some kind of mini-game, the archetypal game of that type is the classic Archon. The more recent Mario Party series of games are a much more casual version of the same basic theme: move on a board, then play a mini-game to resolve the turn.&#xD;&#xA;&#xD;&#xA;If instead you want some kind of mixture of real-time and turn-based, where you give turn-based orders but can then modify them in real-time based on what the opponent is doing, the sport of American Football sounds like it would fit that description.&#xD;&#xA;&#xD;&#xA;&gt; Why aren't there more?&#xD;&#xA;&#xD;&#xA;Who says there aren't?&#xD;&#xA;&#xD;&#xA;&gt; What would be necessary to make this&#xD;&#xA;&gt; work? What potential issues could you&#xD;&#xA;&gt; foresee?&#xD;&#xA;&#xD;&#xA;Depends entirely on how you define the mechanics. Mostly, the tricky thing with mixing turn-based and real-time is that you run the risk of combining the disadvantages with none of the strengths. Hardcore strategy gamers might dislike the twitch-based nature of combat resolution, while action gamers might dislike the level of strategizing in between the 'fun' parts." />
  <row Id="5827" PostHistoryTypeId="16" PostId="2991" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:55:46.893" UserId="51" />
  <row Id="5828" PostHistoryTypeId="16" PostId="2992" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:55:46.893" UserId="51" />
  <row Id="5829" PostHistoryTypeId="16" PostId="2993" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:55:46.893" UserId="51" />
  <row Id="5830" PostHistoryTypeId="16" PostId="2994" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:55:46.893" UserId="51" />
  <row Id="5831" PostHistoryTypeId="16" PostId="2995" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:55:46.893" UserId="51" />
  <row Id="5832" PostHistoryTypeId="16" PostId="2988" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:55:46.893" UserId="51" />
  <row Id="5833" PostHistoryTypeId="16" PostId="2950" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:56:51.633" UserId="51" />
  <row Id="5834" PostHistoryTypeId="16" PostId="2965" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:56:51.633" UserId="51" />
  <row Id="5835" PostHistoryTypeId="16" PostId="2997" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:56:51.633" UserId="51" />
  <row Id="5836" PostHistoryTypeId="16" PostId="2934" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-19T21:56:51.633" UserId="51" />
  <row Id="5837" PostHistoryTypeId="5" PostId="2996" RevisionGUID="5a8d77e8-5c76-4315-9222-e1c3a04f9af2" CreationDate="2010-08-19T22:02:45.453" UserId="1553" Comment="added 165 characters in body" Text="Okay, this idea has come up for the 3rd time in conversation now, and it's been bugging me for years. The idea is a game where all players make decisions/issue orders to units while the game is in a paused state, and all the actions are executed at once, in real-time. This could be at any level from a TRPG (i.e. Final Fantasy Tactics), to a small-scale skirmish (i.e. Worms), to a game with bases and many units (i.e. Advance Wars), to a Risk-type game (i.e. Risk).&#xD;&#xA;&#xD;&#xA;The main disadvantage to this I can see is that the player doesn't see the result of an action immediately. In a traditional turn-based or real-time strategy game, the user clicks &quot;attack that fool&quot; and there's an explosion straight away. There also might be weird situations (you send your unit to melee a unit running in the opposite direction, for example), but that's a low-level detail; a good game designer should be able to get around these things. Finally, there's the general paucity of turn-based games, but they offer a level of tactical depth impossible in real-time strategy games, and there's always a market for them (dozens of new TBSes appear each year).&#xD;&#xA;&#xD;&#xA;- Are there any games out there that use this paradigm?&#xD;&#xA;- Why aren't there more?&#xD;&#xA;- What would be necessary to make this work?&#xD;&#xA;- What potential issues could you foresee?&#xD;&#xA;&#xD;&#xA;To clarify, I mean pure strategy. The commands are input beforehand, and the *resolution* is realtime, but it doesn't require realtime &quot;twitch&quot; input by players." />
  <row Id="5838" PostHistoryTypeId="2" PostId="2999" RevisionGUID="c14a7af9-2dc0-410b-95a9-fe3227297f36" CreationDate="2010-08-19T22:03:22.490" UserId="831" Text="Expanding on this [question][1], what information do I need to communicate my artistic goals for a game to a professional artist. &#xD;&#xA;&#xD;&#xA;Assuming I'm an indie programmer. and I've found or hired an artist to for my game, how to I go about setting a template or a brief for the look and feel of my game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/775/how-do-i-find-artists-to-work-on-my-game" />
  <row Id="5839" PostHistoryTypeId="1" PostId="2999" RevisionGUID="c14a7af9-2dc0-410b-95a9-fe3227297f36" CreationDate="2010-08-19T22:03:22.490" UserId="831" Text="Programmers/Designers: working with artists" />
  <row Id="5840" PostHistoryTypeId="3" PostId="2999" RevisionGUID="c14a7af9-2dc0-410b-95a9-fe3227297f36" CreationDate="2010-08-19T22:03:22.490" UserId="831" Text="&lt;game-design&gt;&lt;art&gt;" />
  <row Id="5841" PostHistoryTypeId="2" PostId="3000" RevisionGUID="f5117bb1-0bf2-4037-b154-a0e8a07a6c0a" CreationDate="2010-08-19T22:19:19.743" UserId="1543" Text="If you have an idea of what your game should look like, put together a style sheet which will show the artist where you're coming from. Take a look at the style sheet in [this post about Velociraptor Safari][1] and put something together that reflects the way you want your game designed.&#xD;&#xA;&#xD;&#xA;The artist should then get a good feel for what you want and will combine elements that work together or tell you what they don't like.&#xD;&#xA;&#xD;&#xA;Stock photography sites and Google image search can provide a lot of material to add to your sheet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blurst.com/blog/raptor-safari-64-development-halted/" />
  <row Id="5842" PostHistoryTypeId="2" PostId="3001" RevisionGUID="d0a1c7da-3486-447f-8c3d-bb31aad60283" CreationDate="2010-08-19T22:44:19.517" UserId="119" Text="I first encountered this technique on a game called [Laser Squad Nemesis][1]. I always thought it was a great idea, and used it when I developed [Zwok][2] for Sony. It allows Zwok to have 6 player multiplayer without ever having to wait in turn.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lasersquadnemesis.com/&#xD;&#xA;  [2]: http://zwok-game.com/en_GB/" />
  <row Id="5843" PostHistoryTypeId="2" PostId="3002" RevisionGUID="ab88d25d-feed-46e3-877e-c7c50f155aa0" CreationDate="2010-08-19T22:50:05.173" UserId="647" Text="Neverwinter Nights and some of the Final Fantasy titles are turn-based *and* realtime simultaneously." />
  <row Id="5844" PostHistoryTypeId="2" PostId="3003" RevisionGUID="64a35b95-de72-41e1-ac25-5813ae8e622f" CreationDate="2010-08-20T00:47:24.897" UserId="1775" Text="What's the best technology for an online game, i.e playable through a web browser? I think the only choices are:&#xD;&#xA;&#xD;&#xA;- Java applets&#xD;&#xA;- Flash&#xD;&#xA;- Silverlight&#xD;&#xA;&#xD;&#xA;I'm leaning towards Java applets, simply because they seems to have better programming features than Flash, and graphics for a java applet game may be cheaper than graphics for Flash. I don't know much about Silverlight." />
  <row Id="5845" PostHistoryTypeId="1" PostId="3003" RevisionGUID="64a35b95-de72-41e1-ac25-5813ae8e622f" CreationDate="2010-08-20T00:47:24.897" UserId="1775" Text="Best technology for online games?" />
  <row Id="5846" PostHistoryTypeId="3" PostId="3003" RevisionGUID="64a35b95-de72-41e1-ac25-5813ae8e622f" CreationDate="2010-08-20T00:47:24.897" UserId="1775" Text="&lt;game-design&gt;" />
  <row Id="5847" PostHistoryTypeId="2" PostId="3004" RevisionGUID="0bbd78ee-fada-41cb-9bf2-eb0b0670bcef" CreationDate="2010-08-20T00:49:57.450" UserId="165" Text="**[Unity3d Game Engine][1]**&#xD;&#xA;&#xD;&#xA;I guess someone had to say it. :) Seriously, it's a great cross-platform (browsers and OS's and iPhone, etc), multi-scripting language 3D game engine. And it has both a free and Professional version.&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/" />
  <row Id="5848" PostHistoryTypeId="2" PostId="3005" RevisionGUID="6ca9b2da-eaf6-4f74-8ee5-4ffb12e875af" CreationDate="2010-08-20T00:51:14.250" UserId="647" Text="Java applets don't seem to be all that popular these days. HTML canvas is doing pretty well in terms of performance. Keep your eye on WebGL developments too." />
  <row Id="5849" PostHistoryTypeId="5" PostId="2937" RevisionGUID="2febcd1b-d4f1-4c35-81f4-043bf56b9430" CreationDate="2010-08-20T00:53:41.763" UserId="539" Comment="added 14 characters in body" Text="I agree with both of the Jeff's and jpaver's comments. I also wanted to add that adopting a component model for your architecture greatly increases it's testability. With a component model each component should be doing a single unit of work and should be testable in isolation (or with limited mock objects). &#xD;&#xA;&#xD;&#xA;Likewise, the other parts of the game which rely on entities should only rely on a subset of the components to function. In practice this means you can usually mock out a few fake components to facilitate testing these areas or you can simply compose partial entities for testing purposes. e.g. you leave out the rendering and input components because those aren't needed to test physics.&#xD;&#xA;&#xD;&#xA;Finally, I would ignore the advice around performance that you get from some people in the game community concerning interfaces. Write the code well with interfaces and if you run into performance problems down the road you can easily profile, identify, and refactor to solve the issue. I was not persuaded by Noel's concerns around the performance impact of interfaces or the complexity overhead that they added. &#xD;&#xA;&#xD;&#xA;That said, don't go overboard trying to test every little thing independently. Like most things testing and design are about striking the right balance." />
  <row Id="5850" PostHistoryTypeId="16" PostId="3004" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-20T01:08:05.027" UserId="14" />
  <row Id="5851" PostHistoryTypeId="16" PostId="3005" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-20T01:08:05.027" UserId="14" />
  <row Id="5852" PostHistoryTypeId="16" PostId="3003" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-20T01:08:05.027" UserId="14" />
  <row Id="5853" PostHistoryTypeId="2" PostId="3006" RevisionGUID="4e47bd4d-e3fb-49dd-821d-b16d50d5a86a" CreationDate="2010-08-20T01:13:52.427" UserId="891" Text="**Java Web Start** is a better choice over java applets.  JNLP allows you to access native level resources like OpenGL.  You can have the full power of the graphics card, while at the same time have your game launch from the browser without need the user to install any plugins(so long as they have java run time on their pc).&#xD;&#xA;&#xD;&#xA;The [**JMonkeyEngine**][1] is a great 3D engine which is built around that principle.  Running examples on their website.&#xD;&#xA;&#xD;&#xA;The **[Slick][2]** engine is a Java 2D engine which can also be launched from the browser.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/home/&#xD;&#xA;  [2]: http://slick.cokeandcode.com/" />
  <row Id="5854" PostHistoryTypeId="16" PostId="3006" RevisionGUID="4e47bd4d-e3fb-49dd-821d-b16d50d5a86a" CreationDate="2010-08-20T01:13:52.427" UserId="-1" />
  <row Id="5855" PostHistoryTypeId="2" PostId="3007" RevisionGUID="259d63af-9408-4ac3-8ea9-33ba3cd6c5ec" CreationDate="2010-08-20T01:21:00.367" UserId="189" Text="Just because Java applets aren't popular doesn't mean they aren't powerful or worthy of gaming. In fact I am focused on Java game development at the moment; I like the high-level nature of the language, its cross-platform-ness (as compared to C#), the [JOGL][1] library which provides a very C-like OpenGL experience for the Java platform (or its alternative, [LWJGL][2], or an engine like [jMonkeyEngine][3]), and its speed (obviously slower than C++, but considerably faster than scripting languages like Python).&#xD;&#xA;&#xD;&#xA;With Java you can deploy your application as an Applet to run in the browser and even provide a [JNLP][4] alternative for those who prefer installing something.&#xD;&#xA;&#xD;&#xA;You can take advantage of all the tools that have been created for Java; the wonderful [Eclipse IDE][5] (or any of the other IDEs out there), testing tools, continuous integration, the huge community of Java programmers, etc.&#xD;&#xA;&#xD;&#xA;The statistic for what percentage of computers Java is installed in varies (and the version varies even more) but I've seen [pretty high numbers][6] for Java market penetration. And the installation process remains pretty simple, so that if any users don't yet have Java installed, they can be up and ready to run your game in very little time.&#xD;&#xA;&#xD;&#xA;I personally feel less hesitant to install the Java plugin than the Unity one. In fact, I am yet to install the Unity game plugin on my computer; I just don't quite trust it. Java is proven; it had a rocky beginning but now, many years later, it is stable and fast and, well, it continues to have some security issues (but so does Flash) but for the most part it's trustworthy. I will continue to avoid Unity web games until the Unity web plugin is a little more widespread and proven.&#xD;&#xA;&#xD;&#xA;So **I absolutely recommend Java**, whether through an applet or through Java Web Start or an executable JAR.&#xD;&#xA;&#xD;&#xA;P.S. The world's most popular free online MMO, as [recognized][7] by the Guinness World Records, is [RuneScape][8], which runs as a Java applet and recently has a desktop version. It supports both DirectX and OpenGL as well as a software 3D renderer, and has approximately [10 million active accounts][9].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jogamp.org/&#xD;&#xA;  [2]: http://lwjgl.org/&#xD;&#xA;  [3]: http://www.jmonkeyengine.com/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Java_Web_Start&#xD;&#xA;  [5]: http://www.eclipse.org/&#xD;&#xA;  [6]: http://www.statowl.com/java.php&#xD;&#xA;  [7]: http://services.runescape.com/m=news/newsitem.ws?id=1386&#xD;&#xA;  [8]: http://www.runescape.com/&#xD;&#xA;  [9]: http://www.techradar.com/news/gaming/mmo-developers-jagex-outline-mechscape--617551?artc_pg=1" />
  <row Id="5856" PostHistoryTypeId="16" PostId="3007" RevisionGUID="259d63af-9408-4ac3-8ea9-33ba3cd6c5ec" CreationDate="2010-08-20T01:21:00.367" UserId="-1" />
  <row Id="5857" PostHistoryTypeId="5" PostId="2473" RevisionGUID="d73c0a18-cce0-43c2-beef-92ecee5d7f43" CreationDate="2010-08-20T01:27:27.760" UserId="919" Comment="added 1 characters in body" Text="Start with a game concept, set the reason for the game, gameplay, look and feel of the game you want to make.&#xD;&#xA;&#xD;&#xA;From there you can start making a features and asset lists so the programmer and artist can at least start working on something, while the designer does some thinking or tweaking the game mechanics.&#xD;&#xA;&#xD;&#xA;This way you at least have some code and assets within a few days or weeks to boost morale and kick start your project.  " />
  <row Id="5858" PostHistoryTypeId="2" PostId="3008" RevisionGUID="5f554760-a051-4286-a4d2-ecb02d02e9da" CreationDate="2010-08-20T01:34:21.817" UserId="539" Text="I thought I would add a second answer responding to the OP's comment that user could replace unit tests. I believe that is completely wrong as the purpose of unit tests is not to assure quality. If you want tests in place to ensure your program's quality you should likely investigate scenario tests or invest in great monitoring. &#xD;&#xA;&#xD;&#xA;(With great monitoring and a product running as a service it is indeed possible to push some &quot;testing&quot; onto the customer but you need to have a sophisticated system which detects errors quickly and rolls back the changes responsible. Most likely this is too much for a small development team.)&#xD;&#xA;&#xD;&#xA;Unit tests main benefit are that they force the developer to write better designed code. The act of testing challenges the developer to separate concerns and encapsulate data. It also encourages the developer to use interfaces and other abstractions so that he tests only one thing. " />
  <row Id="5859" PostHistoryTypeId="2" PostId="3009" RevisionGUID="d2535a04-4329-46d5-9eb1-8de5202909ff" CreationDate="2010-08-20T01:35:30.660" UserId="395" Text="The board game [Race for the Galaxy](http://www.boardgamegeek.com/boardgame/28143/race-for-the-galaxy) does this. All actions are chosen and placed face down, and then resolve &quot;simultaneously&quot;. Apples to Apples also works like this in a way." />
  <row Id="5860" PostHistoryTypeId="2" PostId="3010" RevisionGUID="c5719b9b-28e9-4a83-85ff-160ba067d7af" CreationDate="2010-08-20T01:54:38.320" UserId="323" Text="While it isn't mature yet, Google is working a technology called Native Client, or NaCl for short. NaCl is a sandbox that allows safe, secure, fast execution of native binary code. It supports OpenGLES for 3d accelerated output and OpenAL for an audio layer.&#xD;&#xA;&#xD;&#xA;In summary, you'll be able to play high-end locally-installed games in your web browser, with only about a 5% speed reduction.&#xD;&#xA;&#xD;&#xA;I believe it has potential to be both a Java-killer and a Flash-killer, though it still needs some time for maturation. Unity is porting their engine to it, and there's already a Firefox extension to support it." />
  <row Id="5861" PostHistoryTypeId="16" PostId="3010" RevisionGUID="c5719b9b-28e9-4a83-85ff-160ba067d7af" CreationDate="2010-08-20T01:54:38.320" UserId="-1" />
  <row Id="5862" PostHistoryTypeId="2" PostId="3011" RevisionGUID="41bd83e7-ba49-4cc6-ac1e-9a461ab3d965" CreationDate="2010-08-20T02:07:12.843" UserId="1800" Text="You are worrying too much. The API for OpenGL in Android, OpenGL-ES, was deliberately kept C-like. See the OpenGL specs at http://www.khronos.org/opengles/ for details.&#xD;&#xA;&#xD;&#xA;It is even possible that you won't miss much of anything from C++. A lot of developers, even the famous programming author Bruce Eckel ('Thinking in C++', 'Thinking in Java'), have found Java a much more effective language for object-oriented programming. Largely because the things they 'missed' at first turned out not to be so important after all.&#xD;&#xA;&#xD;&#xA;That said, what I miss most is the ability to override operators, not just methods. The syntax really is clumsier when you have to define/override methods instead of operators.&#xD;&#xA;&#xD;&#xA;Consider, for example complex number arithmetic. It is really elegant in C++. Not so in Java. But this turns out to have minimal impact on most real projects.&#xD;&#xA;&#xD;&#xA;Some people complain about the inability to do multiple-inheritance. But the most useful kind of multiple inheritance IS the kind that Java does with the 'interface', so you shouldn't really miss it that much." />
  <row Id="5863" PostHistoryTypeId="2" PostId="3012" RevisionGUID="747a9990-6153-45e8-ac3a-5d9f38427d14" CreationDate="2010-08-20T02:10:57.937" UserId="1800" Text="See http://code.google.com/p/android-scripting/ for the recommended way of doing scripting on Android. Lua still doesn't fit very well on the Android platform, since it requires C. Of course, you could use the NDK, but that is no silver bullet." />
  <row Id="5864" PostHistoryTypeId="2" PostId="3013" RevisionGUID="21415331-fbae-4687-b6ef-eab530f91f27" CreationDate="2010-08-20T02:17:31.930" UserId="1800" Text="Alas, not one of the answers so far is both complete and fully correct. Really, OpenGL-ES does two things OpenGL does not:&#xD;&#xA;&#xD;&#xA;1) it strips down and then extends OpenGL APIs to make it suitable for a mobile platform. That is, first they strip out APIs and features you really don't need, and are burdensome for mobile implementations, such as rendering polygons or using display lists. Then it makes a few judicious extensions to make it more useful for the mobile platform. I can't even remember an example of this, though.&#xD;&#xA;&#xD;&#xA;2) it provides the interface to the window manager (and therefore native graphics hardware) of the mobile platform. This part of OpenGL-ES, known as EGL, is a lot like GLUT on the desktop. Except that it has none of those convenience methods that are not strictly necessary for that interface. So there is no API for drawing polyhedra or spheres (like in GLUT). But there are, for example, APIs that correspond to GLUT's init(), and to DisplayFunc() and ReshapeFunc() callbacks." />
  <row Id="5865" PostHistoryTypeId="2" PostId="3014" RevisionGUID="3b41ca1e-ba8d-41c4-a40a-c03c88c82de6" CreationDate="2010-08-20T02:22:16.647" UserId="1800" Text="I mostly agree with thbusch. But I would not completely ignore the deprecated APIs: there is too much code still out there that uses them. I would pay them much less attention, though. No point, for example, in learning glBegin(), glEnd() thoroughly enough to write your own code using them. But you should recognize them when you see them, and have some idea of what they are doing.&#xD;&#xA;&#xD;&#xA;It is still worth reading through the whole Red Book at least once, even if you don't build the sample code and do exercises covering features discontinued in OpenGL 3.x." />
  <row Id="5866" PostHistoryTypeId="5" PostId="2996" RevisionGUID="f3938cf2-9b91-46c1-a6b7-d70eb61e5440" CreationDate="2010-08-20T02:44:55.297" UserId="1553" Comment="added 1644 characters in body" Text="Okay, this idea has come up for the 3rd time in conversation now, and it's been bugging me for years. The idea is a game where all players make decisions/issue orders to units while the game is in a paused state, and all the actions are executed at once, in real-time. This could be at any level from a TRPG (i.e. Final Fantasy Tactics), to a small-scale skirmish (i.e. Worms), to a game with bases and many units (i.e. Advance Wars), to a Risk-type game (i.e. Risk).&#xD;&#xA;&#xD;&#xA;The main disadvantage to this I can see is that the player doesn't see the result of an action immediately. In a traditional turn-based or real-time strategy game, the user clicks &quot;attack that fool&quot; and there's an explosion straight away. There also might be weird situations (you send your unit to melee a unit running in the opposite direction, for example), but that's a low-level detail; a good game designer should be able to get around these things. Finally, there's the general paucity of turn-based games, but they offer a level of tactical depth impossible in real-time strategy games, and there's always a market for them (dozens of new TBSes appear each year).&#xD;&#xA;&#xD;&#xA;- Are there any games out there that use this paradigm?&#xD;&#xA;- Why aren't there more?&#xD;&#xA;- What would be necessary to make this work?&#xD;&#xA;- What potential issues could you foresee?&#xD;&#xA;&#xD;&#xA;To clarify, I mean pure strategy. The commands are input beforehand, and the *resolution* is realtime, but it doesn't require realtime &quot;twitch&quot; input by players.&#xD;&#xA;&#xD;&#xA;**EDIT:** [Iain's answer][1] pointed me to [Laser Squad Nemesis][2], which basically answered the 2nd and 4th question ;-P -- If you want to know why this won't work, download the demo (It's 9MB) and click the first tutorial. OUCH! Of course, Laser Squad Nemesis's UI doesn't help (play and pause buttons? seriously? and why do I have to click &quot;issue orders&quot; every turn if that's the only thing I'm going to be doing?)&#xD;&#xA;&#xD;&#xA;For simpler things (like the board games mentioned in a couple answers, or [Zwok][3] that Iain created), this paradigm works great! Issues seem to arise with a more traditional tactics/strategy game, because the lag between the entry of a command and the execution of the command is apparent. In fact Zwok - and some of the board games mentioned - work *because* off this lag, not in spite of it. You're encouraged to guess what your opponent will do next and &quot;think ahead&quot;. However in a more traditional small-scale tactical strategy game, the frustration factor isn't worth it.&#xD;&#xA;&#xD;&#xA;It might be interesting to see a game like this on a *really* large scale. For example, Lee and Napoleon didn't order their troops around in real-time, but rather made decisions based on information that was often hours old -- and it often took hours for those orders to get executed. Even today, generals don't have real-time top-down maps. But taking that &quot;frustration factor&quot; out would require some seriously deft game design.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2996/turn-based-strategy-games-where-action-happens-in-real-time/3001#3001&#xD;&#xA;  [2]: http://www.lasersquadnemesis.com/&#xD;&#xA;  [3]: http://zwok-game.com/en_GB/" />
  <row Id="5867" PostHistoryTypeId="2" PostId="3015" RevisionGUID="9b5c16fe-1fbe-4fa8-b4e7-14262886fa42" CreationDate="2010-08-20T04:13:03.230" UserId="1669" Text="Why has no one mentioned Frozen Synapse? It's exactly as you describe. Turns are planned and played out at the same time. It works amazingly well.&#xD;&#xA;&#xD;&#xA;http://www.frozensynapse.com/" />
  <row Id="5868" PostHistoryTypeId="2" PostId="3016" RevisionGUID="d0a284d0-ac36-4546-bcb3-139e77ad3d31" CreationDate="2010-08-20T04:31:13.577" UserId="154" Text="Plenty of answers already about building ideas in general, but I'll address the issue of new/creative ideas within the game context. &#xD;&#xA;&#xD;&#xA;When you try to create any new creative content you tend to mix and match from your various influences. It's natural to draw on the things that inspire you to piece together a new concept. One of the reasons so many games have similar content is that the range of influences among designers tends to be very similar. Most people who are into games are also into similar movies, similar music, similar literature and so on. If your inspiration is coming from the same set of sources as everyone else, you shouldn't be surprised that the games that spring to mind end up looking a lot like ones that already exist.&#xD;&#xA;&#xD;&#xA;If you really want to shake things up, go spend some time studying anything that you normally wouldn't. &#xD;&#xA;&#xD;&#xA; - Go to the ballet or an opera.&#xD;&#xA; - Watch a foreign film in a genre you normally wouldn't.&#xD;&#xA; - Take a trip somewhere you've never been.&#xD;&#xA; - Wander into a part of the book store/library that you avoid. &#xD;&#xA;&#xD;&#xA;Game concepts can be inspired by anything. But if you want to make something people haven't seen, you need to source if from places they haven't been.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5869" PostHistoryTypeId="16" PostId="3016" RevisionGUID="d0a284d0-ac36-4546-bcb3-139e77ad3d31" CreationDate="2010-08-20T04:31:13.577" UserId="-1" />
  <row Id="5870" PostHistoryTypeId="2" PostId="3017" RevisionGUID="31a63533-1ea1-4cc2-bc2b-b6d608c94a5d" CreationDate="2010-08-20T05:36:58.520" UserId="1804" Text="The technology I find interesting for games on the web is JavaScript + Canvas. This has the advantage that the user does not need a plugin at all to play your game. The upcoming IE will also support canvas, including hardware acceleration. The best choice for 3D would be WebGL, but it is not even part of the more innovative browsers yet. You already find a lot of tech demos using canvas and even a iso-engine." />
  <row Id="5871" PostHistoryTypeId="16" PostId="3017" RevisionGUID="31a63533-1ea1-4cc2-bc2b-b6d608c94a5d" CreationDate="2010-08-20T05:36:58.520" UserId="-1" />
  <row Id="5872" PostHistoryTypeId="2" PostId="3018" RevisionGUID="7fe2ea38-aca5-459d-9054-e33973501a1f" CreationDate="2010-08-20T05:37:36.303" UserId="919" Text="Here's an article about a talk in GDC Europe that also somewhat answers my question.&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/news/29983/GDC_Europe_To_Succeed_In_FreeToPlay_Exploit_Human_Weaknesses.php" />
  <row Id="5873" PostHistoryTypeId="16" PostId="3018" RevisionGUID="7fe2ea38-aca5-459d-9054-e33973501a1f" CreationDate="2010-08-20T05:37:36.303" UserId="-1" />
  <row Id="5874" PostHistoryTypeId="5" PostId="3018" RevisionGUID="a5cf9629-fa78-4d26-9a17-538f38cb83c8" CreationDate="2010-08-20T06:01:10.910" UserId="919" Comment="added 52 characters in body" Text="Here's an article about a talk in GDC Europe that also somewhat answers my question.&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/news/29983/GDC_Europe_To_Succeed_In_FreeToPlay_Exploit_Human_Weaknesses.php&#xD;&#xA;&#xD;&#xA;Not the best view though but is helpful anyways." />
  <row Id="5875" PostHistoryTypeId="2" PostId="3019" RevisionGUID="a593e472-1d12-4a8c-9e18-22605c014b20" CreationDate="2010-08-20T07:13:01.283" UserId="678" Text="Check out the design documentation and prototype for [spacecrack][1], a simultaneous turn-based 4X space game. The docs are full of interesting observation on the nature of turb-based gaming and gaming in general, and make for a very interesting read.&#xD;&#xA;&#xD;&#xA;In fact, all of [Lost Garden][2] is more than worth the trouble.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/2005/06/space-crack-introduction.html&#xD;&#xA;  [2]: http://www.lostgarden.com/" />
  <row Id="5876" PostHistoryTypeId="2" PostId="3020" RevisionGUID="71c976b1-ad6b-4ecc-9708-e9880a118ec8" CreationDate="2010-08-20T07:20:49.317" UserId="1141" Text="The classic [Diplomacy][1] works like this, of course (I can't believe nobody mentioned it yet ...). It's a great rule book to study if you're interested in such game modes, in particular in how they deal with conflicting move orders. You can download the rulebook on the [official site][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Diplomacy_%28game%29 &quot;Diplomacy (Wikipedia article)&quot;&#xD;&#xA;  [2]: http://www.wizards.com/default.asp?x=ah/prod/diplomacy &quot;Diplomacy (official site)&quot;" />
  <row Id="5877" PostHistoryTypeId="2" PostId="3021" RevisionGUID="174655b1-cdac-41e7-90c0-95ebc8e55eb1" CreationDate="2010-08-20T07:31:25.280" UserId="865" Text="It does depend a bit *how much* of your game logic is embedded in scripts. In general LUA is used as high level glue but a lot of the grunt work happens through C(++). Yes, LUA is fast as far as scripting languages go - your still looking at a slowdown compared to native languages of about 30 to 50 times, so it really depends how much is happening in LUA. &#xD;&#xA;" />
  <row Id="5878" PostHistoryTypeId="2" PostId="3022" RevisionGUID="05651423-2be3-4bee-bc9a-9ba7283f11cb" CreationDate="2010-08-20T07:46:42.967" UserId="395" Text="My usual solution is to hit the [random page](http://en.wikipedia.org/wiki/Special:Random) link on Wikipedia a few dozen times until I find some amusing pages and then build something from that. My last &quot;big&quot; game was inspired by the page on moss (it ended up being about magnets, so do take things too literally)." />
  <row Id="5879" PostHistoryTypeId="16" PostId="3022" RevisionGUID="05651423-2be3-4bee-bc9a-9ba7283f11cb" CreationDate="2010-08-20T07:46:42.967" UserId="-1" />
  <row Id="5880" PostHistoryTypeId="2" PostId="3023" RevisionGUID="bd03cf42-4e05-4f9f-ad72-f8d9bff0c65a" CreationDate="2010-08-20T07:51:12.177" UserId="666" Text="I am building a simple tower defense game, and I have to take a decision between two(or more, feel free to suggest other ways) to do the game cycle.&#xD;&#xA;&#xD;&#xA;**Option 1: Monolithic game cycle:**&#xD;&#xA;&#xD;&#xA;I could have a global scheduled selector that calls update for every sprite/object/logic thing that I need to calculate. &#xD;&#xA;&#xD;&#xA;I could achieve this by having a singelton Game class that has a mutable array of objects and then on the Scene(or that singelton) I could have a setup with:&#xD;&#xA;&#xD;&#xA;    [self schedule: @selector(gameCycle:) interval:0.1];&#xD;&#xA;&#xD;&#xA;And then on that gameCycle do something like:&#xD;&#xA;&#xD;&#xA;    -(void) gameCicle: (ccTime)dt {&#xD;&#xA;    	for(Entity* e in [[Game sharedGame] entities]){&#xD;&#xA;    		[e gameCicle];&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Second option: Each object could create its own selector @ init.**&#xD;&#xA;This is almost the same, but instead of a singleton, every time that i create a object I could create a new scheduled selector as such:&#xD;&#xA;&#xD;&#xA;    -(id) initWithTexture:(CCTexture2D*)texture rect:(CGRect)rect {&#xD;&#xA;    	if( (self=[super initWithTexture:texture rect:rect])) {&#xD;&#xA;    		[[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];&#xD;&#xA;                [self schedule: @selector(gameCycle:) interval:0.1];&#xD;&#xA;    	}&#xD;&#xA;    	return self;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now I don't know what is better(or if there is a very big difference in performance). What is the usual/best approach for cocos2d? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="5881" PostHistoryTypeId="1" PostId="3023" RevisionGUID="bd03cf42-4e05-4f9f-ad72-f8d9bff0c65a" CreationDate="2010-08-20T07:51:12.177" UserId="666" Text="On cocos2d, what is better: one monolithic game cycle or many scheduled selectors?" />
  <row Id="5882" PostHistoryTypeId="3" PostId="3023" RevisionGUID="bd03cf42-4e05-4f9f-ad72-f8d9bff0c65a" CreationDate="2010-08-20T07:51:12.177" UserId="666" Text="&lt;iphone&gt;&lt;cocos2d&gt;&lt;ipad&gt;" />
  <row Id="5883" PostHistoryTypeId="2" PostId="3024" RevisionGUID="9166c0d5-a93c-4227-9bbd-e6c58d7dc5be" CreationDate="2010-08-20T07:57:59.100" UserId="1749" Text="Ideas for games are actually very easy to generate (in fact, most 8 year old gamers have a plentiful supply). Unfortunately the only ways to know if an idea is *good* is (1) experience, and (2) to prototype it and see if people want to play. Both of these are expensive, so *good* ideas are relatively rare.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5884" PostHistoryTypeId="16" PostId="3024" RevisionGUID="9166c0d5-a93c-4227-9bbd-e6c58d7dc5be" CreationDate="2010-08-20T07:57:59.100" UserId="-1" />
  <row Id="5885" PostHistoryTypeId="2" PostId="3025" RevisionGUID="61657c52-ffdc-4663-b2c1-2b1248a24c63" CreationDate="2010-08-20T08:29:39.430" UserId="1806" Text="The goal of the quests themselves isn't as important as:&#xD;&#xA;&#xD;&#xA; - The quality of your core gameplay - if killing demons is viscerally fun, you won't mind a kinda stupid quests. If killing monsters is tedious, who cares how clever the quest is.&#xD;&#xA; - Whether they require you do non-fun things like walk across the map and back, or whack a lot of trees until one drops a Job-Job fruit&#xD;&#xA; - How clear and understandable they are - players don't like having to read through paragraphs of badly-written prose to understand what they have to do" />
  <row Id="5886" PostHistoryTypeId="2" PostId="3026" RevisionGUID="b7be8782-6232-47f5-9f13-cc9baa50cf46" CreationDate="2010-08-20T09:22:09.607" UserId="1251" Text="I've made a couple of games now.&#xD;&#xA;&#xD;&#xA;Starting from basic hobbyist projects like snake , I advanced into platform based games, board games, turn based games. While doing the latter of these projects I had to spent a lot of time redesigning certain concepts, sometimes even throwing away certain logic. So always I've felt the time wasted could have been avoided or at least reduced, if I had properly planned each and every stage of my game.&#xD;&#xA;&#xD;&#xA;Though i can try to do it on paperwork or by a word file with bulleted points. I think there ought to be some other way of game design.&#xD;&#xA;&#xD;&#xA;Do help me with suggestions and other game design patterns being followed, either as an indie-game developer or as a game company. I can learn from both. I am not looking for game design e-books, since there is already a thread for that. I would like to get suggestions and game design patters.&#xD;&#xA;Thank you." />
  <row Id="5887" PostHistoryTypeId="1" PostId="3026" RevisionGUID="b7be8782-6232-47f5-9f13-cc9baa50cf46" CreationDate="2010-08-20T09:22:09.607" UserId="1251" Text="what are the essential things to be looked upon in game design" />
  <row Id="5888" PostHistoryTypeId="3" PostId="3026" RevisionGUID="b7be8782-6232-47f5-9f13-cc9baa50cf46" CreationDate="2010-08-20T09:22:09.607" UserId="1251" Text="&lt;game-design&gt;&lt;methodology&gt;&lt;design-patterns&gt;" />
  <row Id="5889" PostHistoryTypeId="2" PostId="3027" RevisionGUID="ebd83dcd-966d-461f-9837-d91735838b64" CreationDate="2010-08-20T10:04:50.187" UserId="1101" Text="The question is far too broad. The answers could fill a website all on their own. But, there are books that touch on this, primarily these two:&#xD;&#xA;&#xD;&#xA;  - [Massively Multiplayer Game Development][1]&#xD;&#xA;  - [Massively Multiplayer Game Development 2][2]&#xD;&#xA;&#xD;&#xA;Note that even these books are not a complete guide, but are instead a collection of ideas and approaches you can use, some of which won't work together, or are even contradictory. Typically it assumes some experience developing games, network applications, or ideally both.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Massively-Multiplayer-Game-Development/dp/1584502436&#xD;&#xA;  [2]: http://www.amazon.com/Massively-Multiplayer-Game-Development-v/dp/1584503904/ref=pd_sim_b_1" />
  <row Id="5890" PostHistoryTypeId="16" PostId="3027" RevisionGUID="ebd83dcd-966d-461f-9837-d91735838b64" CreationDate="2010-08-20T10:04:50.187" UserId="-1" />
  <row Id="5891" PostHistoryTypeId="5" PostId="3027" RevisionGUID="af7c4ad2-4879-4dd5-ab7e-60a0d7d3eeed" CreationDate="2010-08-20T10:33:18.760" UserId="1101" Comment="added part in parentheses" Text="The question is far too broad. The answers could fill a website all on their own. But, there are books that touch on this, primarily these two:&#xD;&#xA;&#xD;&#xA;  - [Massively Multiplayer Game Development][1]&#xD;&#xA;  - [Massively Multiplayer Game Development 2][2]&#xD;&#xA;&#xD;&#xA;Note that even these books are not a complete guide, but are instead a collection of ideas and approaches you can use, some of which won't work together, or are even contradictory. Typically it assumes some experience developing games, network applications, or ideally both.&#xD;&#xA;&#xD;&#xA;(Note that I'm talking more about the MMOs in the original question - a 'network game' could mean all sorts of things from a PHP-based text game right through to an MMO, and the sub-questions above don't all apply to each type.)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Massively-Multiplayer-Game-Development/dp/1584502436&#xD;&#xA;  [2]: http://www.amazon.com/Massively-Multiplayer-Game-Development-v/dp/1584503904/ref=pd_sim_b_1" />
  <row Id="5892" PostHistoryTypeId="2" PostId="3028" RevisionGUID="d086fac5-4f63-4fb0-88ae-46d5ddd76004" CreationDate="2010-08-20T10:35:20.557" UserId="1623" Text="Use the first one. You certainly don't want your timers be called in random order.&#xD;&#xA;&#xD;&#xA;Although I'd suggest to actually use none of them, but use the standard update method of cocos2d. This will give you the best available performance and consistent behavior.&#xD;&#xA;" />
  <row Id="5893" PostHistoryTypeId="2" PostId="3029" RevisionGUID="409dfd28-98c3-475f-97ad-e4772deb9816" CreationDate="2010-08-20T10:39:50.060" UserId="119" Text="Ok so consider we have a vehicle like the one I described in my answer to [this question][1], with a 2D position, velocity, angular velocity, and drag/friction. It can accelerate and break by a variable amount, but not stop dead instantly or reach top speed instantly. How can I make it move to a particular point and stop - in the fastest time possible - without overshooting or oscillating?&#xD;&#xA;&#xD;&#xA;I was thinking something like:&#xD;&#xA; &#xD;&#xA;- turn towards target position.&#xD;&#xA;- accelerate&#xD;&#xA;- look 1 tick ahead, asking &quot;If I applied the breaks next tick, would I overshoot the target?&quot;&#xD;&#xA;- If it would overshoot, apply the breaks now by some amount.&#xD;&#xA;&#xD;&#xA;I'm sure this is a solved problem and there is a probably a better method than the one I described.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1796/vehicle-physics-with-skid" />
  <row Id="5894" PostHistoryTypeId="1" PostId="3029" RevisionGUID="409dfd28-98c3-475f-97ad-e4772deb9816" CreationDate="2010-08-20T10:39:50.060" UserId="119" Text="How do I make a vehicle move to a point and stop without overshooting or oscillating?" />
  <row Id="5895" PostHistoryTypeId="3" PostId="3029" RevisionGUID="409dfd28-98c3-475f-97ad-e4772deb9816" CreationDate="2010-08-20T10:39:50.060" UserId="119" Text="&lt;physics&gt;&lt;ai&gt;" />
  <row Id="5896" PostHistoryTypeId="2" PostId="3030" RevisionGUID="33c6a0d2-ed0d-4998-a3c2-6ddcc38ea6f8" CreationDate="2010-08-20T10:43:36.143" UserId="1101" Text="Using calculus, if you know your velocity and maximum deceleration rate then you can know your minimum stopping distance. With that in mind, you can know exactly when you need to apply the brakes (rounding/quantisation errors aside) to stop at a certain point.&#xD;&#xA;&#xD;&#xA;Now, hopefully someone better at mathematics than me will post the actual formula..." />
  <row Id="5897" PostHistoryTypeId="2" PostId="3031" RevisionGUID="e803c35b-73cb-4c82-a3b1-e6a1dd5c5453" CreationDate="2010-08-20T10:55:58.580" UserId="1101" Text="Communicating your artistic goals is often not the problem. If you show him or her several examples of the sort of style you mean, along with some commentary on what you like (or don't like) about them, a good artist will usually be able to get the rough idea of what you want, and talk through the details with you.&#xD;&#xA;&#xD;&#xA;Usually the problem is communicating the technical goals. These include polygon or vertex limits, texture sizes, the use of texture maps for specular/diffuse/bump/normal/etc (ie. which of these you support), different types of asset budget (eg. for the whole download, for a given level, for any one visible scene, for one model), the way your GUI is skinned, how animations should be packaged (sheets or files), cursor/HUD/sprite sizes, the scale of the models (often 1 unit = 1 metre, but not always), the rotation of the models (which axis is 'forward'?), what the typical lighting will be like, etc.&#xD;&#xA;&#xD;&#xA;The more of these you can fix or automate with tooling, the better. But as an indie programmer, your resources will be limited, so instead you will most likely have to resort to clear and unambiguous communication." />
  <row Id="5898" PostHistoryTypeId="2" PostId="3032" RevisionGUID="f8b388f1-372b-478b-baa0-35afb7d1bbcb" CreationDate="2010-08-20T10:57:44.260" UserId="335" Text="Open the dictionary on a random page.&#xD;&#xA;Randomly choose one of the words.&#xD;&#xA;&#xD;&#xA;Try to come up with 10 _bad_ game ideas for that topic.&#xD;&#xA;&#xD;&#xA;Usually after 5-8 bad ideas you will have a really good one.&#xD;&#xA;&#xD;&#xA;Try to implement the essence of that idea over 2 or 3 days, setting a strict deadline before you start.&#xD;&#xA;Toss the result away and do it again.&#xD;&#xA;&#xD;&#xA;From there on it's just execution...&#xD;&#xA;" />
  <row Id="5899" PostHistoryTypeId="16" PostId="3032" RevisionGUID="f8b388f1-372b-478b-baa0-35afb7d1bbcb" CreationDate="2010-08-20T10:57:44.260" UserId="-1" />
  <row Id="5900" PostHistoryTypeId="2" PostId="3033" RevisionGUID="a91c247c-e6ad-45b1-bb89-d8f6d09102f3" CreationDate="2010-08-20T11:09:41.403" UserId="678" Text="It's a control problem. You need to vary your inputs proportionally to some kind of &quot;error&quot; measure, like the distance to the target. See also the answers to this question.&#xD;&#xA;&#xD;&#xA;[Target Tracking: When to accelerate and decelerate a rotating turret?][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1885/target-tracking-when-to-accelerate-and-decelerate-a-rotating-turret" />
  <row Id="5901" PostHistoryTypeId="2" PostId="3034" RevisionGUID="eca2d996-88ba-411b-a38e-21d5ba1d9e9a" CreationDate="2010-08-20T11:13:09.250" UserId="1809" Text="Of course, you can have actions queued up which simulates turns, but doesn't stop real-time action.&#xD;&#xA;&#xD;&#xA;The Sims has a good implementation of this with actions appearing at the top of the screen and vanishing as they are performed." />
  <row Id="5902" PostHistoryTypeId="2" PostId="3035" RevisionGUID="1fe28fbe-6682-44d2-bdeb-296416fcb9e7" CreationDate="2010-08-20T13:14:59.277" UserId="458" Text="The time spent eliminating false paths is not wasted. It's time well spent, learning about what the right design is for your particular game. If you're willing to throw that out, that puts you WAY ahead of the game compared to most novice designers.&#xD;&#xA;&#xD;&#xA;Think of it this way. When you first set out to make a new game, you either know EXACTLY what mechanics work to make it the best game possible, or you don't. If you do know, it means you're making a clone of an existing game, because the only way we have so far to &quot;prove&quot; that a set of mechanics is good is to actually play the darned thing and see for ourselves. If you don't know, then by definition you're going to get it wrong sometimes. It's like the adage from science: &quot;hey, if we knew what we were doing, it wouldn't be 'research'!&quot;&#xD;&#xA;&#xD;&#xA;Beyond that, the best I can offer is that you get a better feel for what will and won't work through experience. Keep making games. Every time you follow your instincts, whether you're right or wrong, your instincts learn from the process and get a little bit better.&#xD;&#xA;&#xD;&#xA;But if you're looking for shortcuts to the process... I don't think there are any. If it helps, all creative fields are like that. You don't become a master painter without spending decades painting. Authors have a saying that you should prepare to throw away your first million words and chalk it up to practice. So, it sounds like you're on the right track to being a master game designer; just make sure that each time you throw out a feature, you sit back and reflect to understand why, so that you get that much better at it in the future." />
  <row Id="5903" PostHistoryTypeId="2" PostId="3036" RevisionGUID="e887a1e8-23d6-456b-b61f-e6684b5ddf7a" CreationDate="2010-08-20T13:33:28.967" UserId="678" Text="First let's make sure I understood your question correctly:&#xD;&#xA;&#xD;&#xA; - You have a probability function that is expressed as a sum of N parametrized one-dimensional gaussians, each with different mean and standard deviation.&#xD;&#xA; - You want to generate stochastic variables according to this distribution.&#xD;&#xA;&#xD;&#xA;Is this correct?&#xD;&#xA;&#xD;&#xA;If this is the case, I reccommend you use a variation of [rejection sampling][1]. The recipe is quite straightforward, but you might have to iterate a bit before you get an answer out of it. This is the basic outline.&#xD;&#xA;&#xD;&#xA; 1. You generate a uniformly distributed random number in your desired interval, x.&#xD;&#xA; 2. You calculate the value of your probability distribution, p(x)&#xD;&#xA; 3. You generate another uniformly distributed random number between 0 and 1, q&#xD;&#xA; 4. If q &lt; p(x), return x&#xD;&#xA; 5. If not, start from step 1.&#xD;&#xA;&#xD;&#xA;No matter how large the temptation, do not re-use q for different iterations.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Rejection_sampling" />
  <row Id="5904" PostHistoryTypeId="2" PostId="3037" RevisionGUID="0eff00b4-5981-46e6-9f3a-177d7e5a8a03" CreationDate="2010-08-20T13:40:27.020" UserId="1684" Text="Sometimes, in game development, you need to take shortcuts. The shortcut here is called an Impulse, which, physically speaking is a very large force applied in a very short time. Instead of integrating it over time, you just apply it to the parameter as a direct change: set velocity to 0.&#xD;&#xA;&#xD;&#xA;The question is: do you want to use the shortcut or not?" />
  <row Id="5905" PostHistoryTypeId="2" PostId="3038" RevisionGUID="35080db2-d74c-4f2a-a19e-6729f88d5afd" CreationDate="2010-08-20T14:04:18.970" UserId="430" Text="[Steering Behaviors For Autonomous Characters][1].  Check out seek and arrival.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="5906" PostHistoryTypeId="2" PostId="3039" RevisionGUID="b361fe3e-16b3-4deb-b002-4d70f90557c6" CreationDate="2010-08-20T14:42:34.340" UserId="430" Text="A game development company seems like an ideal testbed for experimenting with new or uncommon models for work environments.  I'm curious if there's anyone out there successfully doing something creative with their methods of doing creative work, and how it's working out.&#xD;&#xA;&#xD;&#xA;This is a community wiki since there won't be an objective answer to the question:&#xD;&#xA;&#xD;&#xA;**What are some unconventional but effective methods of running a game development office?  In your experience, what works well and what doesn't?**  &#xD;&#xA;&#xD;&#xA;I'm mostly talking about the culture and business side of things, and not so much about things like pair programming, test-driven development, scrum, waterfall, etc.  In other words: I don't mean development methodologies.  I mean development environments.  They're closely related in many cases, but please don't turn this into an evangelism platform for scrum or TDD or whatever your favorite happens to be.&#xD;&#xA;&#xD;&#xA;Do you have strict hours and fire people who are late?  Do you have &quot;core hours&quot;, like 10pm to 4pm, that gives people a few hours of flexibility?  Or do you just show up when you want for as long as you want?  &#xD;&#xA;&#xD;&#xA;Does forcing people to work overtime actually work?  What about forbidding overtime?  Weekends?  Do you give people free time to work on whatever they want during business hours?&#xD;&#xA;&#xD;&#xA;Do you allow telecommuting (e.g. VPN from home)?  Clearly this will be a big issue for people who outsource a lot.  And people who subcontract or work on large projects have limited options.&#xD;&#xA;&#xD;&#xA;If your hours are not strict, how do you handle meetings, conference calls, or emergency emails?&#xD;&#xA;&#xD;&#xA;Some examples of what I'm talking about:&#xD;&#xA;&#xD;&#xA; - [http://www.ted.com/talks/dan_pink_on_motivation.html][1]&#xD;&#xA; - [http://en.wikipedia.org/wiki/ROWE][2]&#xD;&#xA; - [http://googleblog.blogspot.com/2006/05/googles-20-percent-time-in-action.html][3]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ted.com/talks/dan_pink_on_motivation.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/ROWE&#xD;&#xA;  [3]: http://googleblog.blogspot.com/2006/05/googles-20-percent-time-in-action.html" />
  <row Id="5907" PostHistoryTypeId="1" PostId="3039" RevisionGUID="b361fe3e-16b3-4deb-b002-4d70f90557c6" CreationDate="2010-08-20T14:42:34.340" UserId="430" Text="Does the Results Oriented Work Environment... work?" />
  <row Id="5908" PostHistoryTypeId="3" PostId="3039" RevisionGUID="b361fe3e-16b3-4deb-b002-4d70f90557c6" CreationDate="2010-08-20T14:42:34.340" UserId="430" Text="&lt;methodology&gt;&lt;tips&gt;&lt;management&gt;&lt;business&gt;&lt;productivity&gt;" />
  <row Id="5909" PostHistoryTypeId="16" PostId="3039" RevisionGUID="b361fe3e-16b3-4deb-b002-4d70f90557c6" CreationDate="2010-08-20T14:42:34.340" UserId="430" />
  <row Id="5910" PostHistoryTypeId="4" PostId="3039" RevisionGUID="b7e56558-e739-4ccd-a8bf-99f6ed82c6d2" CreationDate="2010-08-20T14:48:55.777" UserId="430" Comment="improved title... I hope" Text="Do &quot;Results-Oriented Work Environments&quot; work?" />
  <row Id="5911" PostHistoryTypeId="2" PostId="3040" RevisionGUID="dc2c09a1-8c9d-4bb7-ba7f-dd0146b6ac39" CreationDate="2010-08-20T16:00:18.807" UserId="136" Text="This sounds very similar to the combat mechanics of Star Trek: Birth of the Federation.  That was actually the first 4X TBS game I ever played, and I was rather surprised to discover that combat in other 4X TBS games did not follow a similar model.  I thought it worked very well.  In fact, I'm developing an unofficial sequel to that very game, and I plan on implementing a very similar combat system.&#xD;&#xA;&#xD;&#xA;Here's a breakdown of how it worked:&#xD;&#xA;&#xD;&#xA; - The game's overall turn-based mechanics are such that all players issue orders at the same time and then signal their readiness to end the turn.&#xD;&#xA; - As part of the turn processing, combat might occur.&#xD;&#xA; - Combat occurs in rounds/turns.  Note that these &quot;turns&quot; are different from game turns; entire combat sessions (i.e. battles) actually take place *between* game turns as part of the turn processing.&#xD;&#xA; - During each combat turn, players issue orders to their fleets.  These orders generally consist of a maneuver (e.g. charge, circle, fly over/under, etc.) and a target.  The only exceptions I can think of are 'retreat' or 'avoid', which do not have a target associated with them.&#xD;&#xA; - Once all players have issued their orders, the results of that turn play out in real time.&#xD;&#xA; - This process repeats probably 3-6 times on average until a victor emerges, both sides retreat, or both sides open hailing frequencies in lieu of engaging in combat." />
  <row Id="5912" PostHistoryTypeId="2" PostId="3041" RevisionGUID="53bfda15-32aa-4ccf-8805-e6c4effe1b81" CreationDate="2010-08-20T16:03:41.957" UserId="852" Text="My idea for how to implement this revolves around each turn, having units possess a specific amount of &quot;energy&quot; or &quot;mana&quot; or some other thing that allows a unit to do only so much during the real time resolution (think Civilization, or the Total War series)&#xD;&#xA;&#xD;&#xA;That way, you might tell a melee unit to attack another unit, and if the other unit is told to move away, then the melee unit will move as close as it can, but may not necessarily get the attack off. " />
  <row Id="5913" PostHistoryTypeId="2" PostId="3042" RevisionGUID="c6d1d926-311e-46b5-8ab1-57e4eacff611" CreationDate="2010-08-20T16:11:06.330" UserId="1524" Text="Not everyone is the same.  Some people flourish under light management while others just waste their time (and that of those around them).  If you have a team in place, get to know what motivates each of them and go from there." />
  <row Id="5914" PostHistoryTypeId="16" PostId="3042" RevisionGUID="c6d1d926-311e-46b5-8ab1-57e4eacff611" CreationDate="2010-08-20T16:11:06.330" UserId="-1" />
  <row Id="5915" PostHistoryTypeId="5" PostId="3040" RevisionGUID="508501de-1ed5-4c68-9d07-6c471e4e4f22" CreationDate="2010-08-20T16:14:22.863" UserId="136" Comment="added 999 characters in body; deleted 9 characters in body; added 47 characters in body; added 158 characters in body" Text="This sounds very similar to the combat mechanics of Star Trek: Birth of the Federation.  That was actually the first 4X TBS game I ever played, and I was rather surprised to discover that combat in other 4X TBS games did not follow a similar model.  I thought it worked very well.  In fact, I'm developing an unofficial sequel to that very game, and I plan on implementing a very similar combat system.&#xD;&#xA;&#xD;&#xA;Here's a breakdown of how it worked:&#xD;&#xA;&#xD;&#xA; - The game's overall turn-based mechanics are such that all players issue orders at the same time and then signal their readiness to end the turn.&#xD;&#xA; - As part of the turn processing, combat might occur.&#xD;&#xA; - Combat occurs in rounds/turns.  Note that these &quot;turns&quot; are different from game turns; entire combat sessions (i.e. battles) actually take place *between* game turns as part of the turn processing.&#xD;&#xA; - During each combat turn, players issue orders to their fleets.  These orders generally consist of a maneuver (e.g. charge, circle, fly over/under, etc.) and a target.  The only exceptions I can think of are 'retreat' or 'avoid', which do not have a target associated with them.&#xD;&#xA; - Once all players have issued their orders, the results of that turn play out in real time.&#xD;&#xA; - This process repeats probably 3-6 times on average until a victor emerges, both sides retreat, or both sides open hailing frequencies in lieu of engaging in combat.&#xD;&#xA;&#xD;&#xA;Personally, I think there are some very compelling reasons to go with such a system.  In contrast to games like Civilization (in which combat progresses as a series of 1v1 skirmishes), it provides real-time cinematics of a grand battle where all units are engaging at once.  I also tend to think it works better than completely real-time combat systems like the one in MoO3 because:&#xD;&#xA;&#xD;&#xA; - It maintains the simultaneous turn-based mechanics of the game.&#xD;&#xA; - By restricting the player to simple orders consisting of a maneuver and a target, combat time can be kept reasonably short (remember, other players are waiting on you!).  In a system where players can issue real-time orders, it would be easier to draw combat out by luring enemy forces away, playing hide-and-seek via cloaking, etc.&#xD;&#xA; - Because players issue simple maneuvers instead of setting a course themselves, it's easier to take advantage of combat in all three dimensions (if you're building a space-based strategy game).  Instead of needing a clumsy 2D interface to plot an &quot;attack from above&quot; in 3D space, the player simply has to click &quot;attack from above&quot; and be done with it.&#xD;&#xA; - It's a hell of a lot easier to develop ;)." />
  <row Id="5916" PostHistoryTypeId="5" PostId="3040" RevisionGUID="28c2b87d-2702-4f42-8ce7-106ecde62008" CreationDate="2010-08-20T16:32:53.213" UserId="136" Comment="added 2 characters in body" Text="This sounds very similar to the combat mechanics of Star Trek: Birth of the Federation.  That was actually the first 4X TBS game I ever played, and I was rather surprised to discover that combat in other 4X TBS games did not follow a similar model.  I thought it worked very well.  In fact, I'm developing an unofficial sequel to that very game, and I plan on implementing a very similar combat system.&#xD;&#xA;&#xD;&#xA;Here's a breakdown of how it worked:&#xD;&#xA;&#xD;&#xA; - The game itself uses simultaneous turn-based mechanics: all players issue orders at the same time and then signal their readiness to end the turn.&#xD;&#xA; - As part of the turn processing, combat might occur.&#xD;&#xA; - Combat occurs in rounds/turns.  Note that these &quot;turns&quot; are different from game turns; entire combat sessions (i.e. battles) actually take place *between* game turns as part of the turn processing.&#xD;&#xA; - During each combat turn, players issue orders to their fleets.  These orders generally consist of a maneuver (e.g. charge, circle, fly over/under, etc.) and a target.  The only exceptions I can think of are 'retreat' or 'avoid', which do not have a target associated with them.&#xD;&#xA; - Once all players have issued their orders, the results of that turn play out in real time.&#xD;&#xA; - This process repeats probably 3-6 times on average until a victor emerges, both sides retreat, or both sides open hailing frequencies in lieu of engaging in combat.&#xD;&#xA;&#xD;&#xA;Personally, I think there are some very compelling reasons to go with such a system.  In contrast to games like Civilization (in which combat progresses as a series of 1v1 skirmishes), it provides real-time cinematics of a grand battle where all units are engaging at once.  I also tend to think it works better than completely real-time combat systems like the one in MoO3 because:&#xD;&#xA;&#xD;&#xA; - It maintains the simultaneous turn-based mechanics of the game.&#xD;&#xA; - By restricting the player to simple orders consisting of a maneuver and a target, combat time can be kept reasonably short (remember, other players are waiting on you!).  In a system where players can issue real-time orders, it would be easier to draw combat out by luring enemy forces away, playing hide-and-seek via cloaking, etc.&#xD;&#xA; - Because players issue simple maneuvers instead of setting a course themselves, it's easier to take advantage of combat in all three dimensions (if you're building a space-based strategy game).  Instead of needing a clumsy 2D interface to plot an &quot;attack from above&quot; in 3D space, the player simply has to click &quot;attack from above&quot; and be done with it.&#xD;&#xA; - It's a hell of a lot easier to develop ;)." />
  <row Id="5917" PostHistoryTypeId="2" PostId="3043" RevisionGUID="52d65596-b5ee-4c71-90e2-7ea0781a86dd" CreationDate="2010-08-20T16:36:48.107" UserId="8" Text="There is a third option: have a small number of scheduled updates for tasks that can be independent. &#xD;&#xA;&#xD;&#xA;Scheduling one update method for each layer could be useful, especially if they are logically separate. One useful example of this is using one scheduled method for the main game logic and another to update the score display." />
  <row Id="5918" PostHistoryTypeId="2" PostId="3044" RevisionGUID="c557add5-ecd5-43fd-b966-f04b517d14ca" CreationDate="2010-08-20T17:10:09.807" UserId="1101" Text="I would say the main reason is simply that resolving conflicting orders is complicated. It's far easier to force each move to be made in isolation than to try and decide which of several moves that might contest the same position or resource should take precedence." />
  <row Id="5919" PostHistoryTypeId="2" PostId="3045" RevisionGUID="2b517d78-6ac0-44d2-83bf-2f0c2ebb1362" CreationDate="2010-08-20T17:14:17.880" UserId="101" Text="I also asked about this over on the &lt;a href=&quot;http://forums.epicgames.com/showthread.php?t=741801&quot;&gt;UDK forums&lt;/a&gt;, but haven't had much luck getting any responses. Basically, I have some experience with UT3 modding, but I'm just getting started with the UDK, and I have a few questions about the degree of control over the rendering you have.&#xD;&#xA;&#xD;&#xA;&lt;ol&gt;&#xD;&#xA;&#xD;&#xA;&lt;li&gt;I gather that, despite the presence of several HLSL shader files in the UDK distribution (with the extension .usf), there is no means of implementing your own shaders outside of the material editor; is this correct? (I know about the Custom node in the material editor, but it's very limited, and unwieldy for all but the simplest logic.)&lt;/li&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;&lt;li&gt;I understand that UE3 employs deferred rendering. I know you can access the color and depth at the &lt;em&gt;current pixel&lt;/em&gt; in a post process. However, is there any way to access these or other G-buffer attributes in a more general way? (Normals, position, values at neighboring pixels...)&lt;/li&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;&lt;li&gt;Are render targets supported in a general way? For the sake of argument, would it be possible to set up a camera to render depth from an alternate POV, then do shadow map-style depth comparisons while rendering the main view?&lt;/li&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;&lt;li&gt;Is it possible to override all the materials on the client (en masse), such as those being used for the terrain or BSP geometry in the current level? (For implementing alternate vision modes and things of that nature.)&lt;/li&gt;&#xD;&#xA;&lt;/ol&gt;&#xD;&#xA;&#xD;&#xA;The tools that come with the UDK are of course very polished, and it's hard to beat free Scaleform and SpeedTree, but I'm starting to think the platform is a terrible fit for anyone who wants to go above and beyond drag-and-drop material editing in terms of graphics. I feel like I have much more control over the rendering in a Source engine mod, for example." />
  <row Id="5920" PostHistoryTypeId="1" PostId="3045" RevisionGUID="2b517d78-6ac0-44d2-83bf-2f0c2ebb1362" CreationDate="2010-08-20T17:14:17.880" UserId="101" Text="Questions about rendering access in UDK" />
  <row Id="5921" PostHistoryTypeId="3" PostId="3045" RevisionGUID="2b517d78-6ac0-44d2-83bf-2f0c2ebb1362" CreationDate="2010-08-20T17:14:17.880" UserId="101" Text="&lt;graphics&gt;&lt;engine&gt;&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="5922" PostHistoryTypeId="2" PostId="3046" RevisionGUID="92b04c94-9327-420e-8820-ff4c8ff5e458" CreationDate="2010-08-20T17:14:31.330" UserId="1811" Text="An example of a game that uses this paradigm is &lt;a href=&quot;http://www.blendogames.com/flotilla/&quot;&gt;Flotilla&lt;/a&gt;. The space combat sequences start with a simple three-step setup for each ship (direction, speed, target). You get a &quot;ghosted&quot; preview of where your ship will move when the orders are executed. Once you've set up all your ships, you commit your actions, then the game runs real-time for 30 seconds. The only thing you can do during that time is sit and cringe as your plans go awry. Once the 30 seconds are up, everything freezes (including projectiles in mid-flight) and you repeat until all of the ships from one side are destroyed.&#xD;&#xA;&#xD;&#xA;As you stated above, a primary reason that there aren't more of these games is the lack of instant gratification. A secondary reason might be the steeper learning curve: the feedback cycle for trial and error is &lt;i&gt;much&lt;/i&gt; longer than in real-time games.&#xD;&#xA;&#xD;&#xA;Perhaps to mitigate the feedback issue, you could allow very limited real-time tweaking of each individual unit. This would make it easier in the early game, where you are likely to have fewer units: you can spend your time on those few units with a shorter feedback cycle while still learning the larger strategies. The amount of real-time that you have remains constant, though, so as the number of units grow you would not be able to tweak more than a few units, downplaying the usefulness in the later game." />
  <row Id="5923" PostHistoryTypeId="6" PostId="3045" RevisionGUID="db0b87e9-8b13-4317-8054-fde708c5fba0" CreationDate="2010-08-20T17:22:10.427" UserId="101" Comment="tags" Text="&lt;graphics&gt;&lt;engine&gt;&lt;rendering&gt;&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="5924" PostHistoryTypeId="2" PostId="3047" RevisionGUID="5beaf3e8-9f55-49b2-ba89-561f42ba5e17" CreationDate="2010-08-20T17:27:28.030" UserId="1745" Text="I only have a basic understanding of OpenGL, so I'm probably showing my ignorance here.&#xD;&#xA;&#xD;&#xA;I'm looking for a great iPhone/OpenGL-ES example of applying a texture (preferably from a texture atlas, but not really a requirement) to specific parts of some arbitrary object/model.&#xD;&#xA;&#xD;&#xA;I have a game where 3D tiles &quot;flip&quot; to reveal some other texture on the backside of the tile.  I created the model in Blender and exported it to an Objective-C header.  The tile isn't a simple &quot;cube&quot;, but it is relatively cube-shaped.  Everything works great when I use a single texture that simply wraps the entire model.  But I'm struggling to figure out how I can restrict that texture to just specific parts of the model.&#xD;&#xA;&#xD;&#xA;To complicate things even more, I ultimately want to texture it with three different images.  The top will have &quot;image x&quot;, the sides of the tile will have &quot;image y&quot;, and the back will have &quot;image z&quot;.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="5925" PostHistoryTypeId="1" PostId="3047" RevisionGUID="5beaf3e8-9f55-49b2-ba89-561f42ba5e17" CreationDate="2010-08-20T17:27:28.030" UserId="1745" Text="iPhone/OpenGL-ES partially texture mapping an object" />
  <row Id="5926" PostHistoryTypeId="3" PostId="3047" RevisionGUID="5beaf3e8-9f55-49b2-ba89-561f42ba5e17" CreationDate="2010-08-20T17:27:28.030" UserId="1745" Text="&lt;iphone&gt;&lt;textures&gt;&lt;opengl-es&gt;" />
  <row Id="5927" PostHistoryTypeId="2" PostId="3048" RevisionGUID="ad9344af-abef-44e8-bf03-5fa23670c37d" CreationDate="2010-08-20T17:36:51.370" UserId="136" Text="You can definitely create similar kinds of interfaces in WPF, but integrating them into a Direct3D game is problematic.  You can host Direct3D content within WPF (via D3DImage), but your 3D content would be composed into the WPF application, so rendering becomes dependent on WPF.  Consequently, you will see relatively poor performance, as you are limited by WPF's frame rate.  Also, as U62 noted in his comment, WPF can only host Direct3D 9 content.  However, you might be able to get around this, as `IDirect3DDevice9Ex` is capable of sharing resources between devices.  Therefore, you could potentially create a shared render target in Direct3D 10 or 11 and bring it into WPF via an intermediate `IDirect3DDevice9Ex` device.  Jeremiah Morrill discusses this technique [here][1].&#xD;&#xA;&#xD;&#xA;An alternative, though far from elegant, would be to render your WPF UI in a separate layered window above the Direct3D content, [as described here][2].  There are also ways to [access WPF's internal Direct3D surface][3], but this is a rather nasty hack and could easily be broken by future WPF releases.&#xD;&#xA;&#xD;&#xA;Of course, none of this is relevant if you don't actually *need* to interoperate with Direct3D.  Games that don't require complex 3D graphics can certainly be developed [completely in WPF][4].  WPF does have some simple 3D facilities at its disposal, but it's generally insufficient for anything beyond primitive shapes with simple textures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/437/Direct3D-10-11-Direct2D-in-WPF.aspx&#xD;&#xA;  [2]: http://blogs.msdn.com/b/pantal/archive/2007/07/31/managed-directx-interop-with-wpf-part-2.aspx&#xD;&#xA;  [3]: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/438/How-to-get-access-to-WPF-s-internal-Direct3D-guts.aspx&#xD;&#xA;  [4]: http://www.startreksupremacy.com/supremacy_wpf.png" />
  <row Id="5928" PostHistoryTypeId="5" PostId="3048" RevisionGUID="15e6f386-b31e-4e21-8929-19e3eedb9627" CreationDate="2010-08-20T17:42:36.370" UserId="136" Comment="added 116 characters in body; added 7 characters in body" Text="You can definitely create similar kinds of interfaces in WPF, but integrating them into a Direct3D game is problematic.  You can host Direct3D content within WPF (via D3DImage), but your 3D content would be composed into the WPF application, so rendering becomes dependent on WPF.  Consequently, you will see relatively poor performance, as you are limited by WPF's frame rate.  Also, as U62 noted in his comment, WPF can only host Direct3D 9 content.  However, you might be able to get around this, as `IDirect3DDevice9Ex` is capable of sharing resources between devices.  Therefore, you could potentially create a shared render target in Direct3D 10 or 11 and bring it into WPF via an intermediate `IDirect3DDevice9Ex` device.  Jeremiah Morrill discusses this technique [here][1].&#xD;&#xA;&#xD;&#xA;An alternative, though far from elegant, would be to render your WPF UI in a separate layered window above the Direct3D content, [as described here][2].  There are also ways to [access WPF's internal Direct3D surface][3], but this is a rather nasty hack and could easily be broken by future WPF releases.&#xD;&#xA;&#xD;&#xA;Of course, none of this is relevant if you don't actually *need* to interoperate with Direct3D.  Games that don't require complex 3D graphics can certainly be developed [completely in WPF][4].  WPF does have some simple 3D facilities at its disposal, though they are generally insufficient for anything beyond primitive shapes with simple textures.  It also supports custom pixel shaders, though there are many restrictions (e.g. they must be single-pass effects).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/437/Direct3D-10-11-Direct2D-in-WPF.aspx&#xD;&#xA;  [2]: http://blogs.msdn.com/b/pantal/archive/2007/07/31/managed-directx-interop-with-wpf-part-2.aspx&#xD;&#xA;  [3]: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/438/How-to-get-access-to-WPF-s-internal-Direct3D-guts.aspx&#xD;&#xA;  [4]: http://www.startreksupremacy.com/supremacy_wpf.png" />
  <row Id="5929" PostHistoryTypeId="2" PostId="3049" RevisionGUID="771d2f54-497b-42b3-9ae4-b1e3ccded29d" CreationDate="2010-08-20T18:03:56.833" UserId="154" Text="Most studios have &quot;core hours&quot; and allow flexibility outside of that. VPNs exists but they are more there to get extra work done, and not to allow the employees to not come in. Too much of what is done in a game is collaborative and requires people to work together, so working from home for any extended period of time is pretty rare unless you have highly specialized skills. &#xD;&#xA;&#xD;&#xA;Does overtime work? &#xD;&#xA;&#xD;&#xA;Well in short bursts working longer hours does increase productivity. Over a longer time though it's actually slower than working consistent hours. Unfortunately that doesn't stop most teams from marching through hours of crunch, long past the point of productivity return, towards the end of a project.&#xD;&#xA;" />
  <row Id="5930" PostHistoryTypeId="16" PostId="3049" RevisionGUID="771d2f54-497b-42b3-9ae4-b1e3ccded29d" CreationDate="2010-08-20T18:03:56.833" UserId="-1" />
  <row Id="5931" PostHistoryTypeId="2" PostId="3050" RevisionGUID="a611c446-a007-409a-9036-680f4703968c" CreationDate="2010-08-20T18:19:24.883" UserId="136" Text="There are a few ways you could approach this, and I outlined them in [a response to a similar question][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2973/can-a-standalone-wpf-application-create-an-interface-that-looks-like-a-flash-inte/3048#3048" />
  <row Id="5932" PostHistoryTypeId="2" PostId="3051" RevisionGUID="aaa524c5-e0a2-4f0d-9dd0-bb86d6de669e" CreationDate="2010-08-20T18:19:50.013" UserId="354" Text="I was going through a pretty good tutorial on Box2D [here][1], but I ran into a problem when he made a `b2PolygonDef`, because the tutorials were made in 2.0, and I'm using 2.1. I could download 2.0 I guess, but I'd really like to know how to update how to do this to the newest version.&#xD;&#xA;&#xD;&#xA;If you guys don't want to watch the whole video, basically, he does this in this one:&#xD;&#xA;&#xD;&#xA;            private function createWallsAndFloor():void&#xD;&#xA;        {&#xD;&#xA;            // Create the shape (polygon) definition&#xD;&#xA;            var bigLongShapeDef:b2PolygonDef = new b2Polygondef();&#xD;&#xA;            bigLongShapeDef.vertexCount = 4;&#xD;&#xA;            b2Vec2(bigLongShapeDef.vertices[0]).Set(0 / RATIO, 0 / RATIO);&#xD;&#xA;            b2Vec2(bigLongShapeDef.vertices[1]).Set(550 / RATIO, 0 / RATIO);&#xD;&#xA;            b2Vec2(bigLongShapeDef.vertices[2]).Set(550 / RATIO, 10 / RATIO);&#xD;&#xA;            b2Vec2(bigLongShapeDef.vertices[3]).Set(0 / RATIO, 10 / RATIO);&#xD;&#xA;            bigLongShapeDef.friction = 0.5;&#xD;&#xA;            bigLongShapeDef.restitution = 0.3;&#xD;&#xA;            bigLongShapeDef.density = 0.0;&#xD;&#xA;            &#xD;&#xA;            // Create the body definition&#xD;&#xA;            // Create the body&#xD;&#xA;            // Create the shape&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;I can see that they removed `b2PolygonDef` and `b2ShapeDef` because I'm using Flash Develop, so what basically do I do?&#xD;&#xA;&#xD;&#xA;(If you don't mind watching videos, he explains what he's doing in the one before this one.)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kerp.net/box2d/displaylesson.php?chapter=1&amp;lesson=12 &quot;Todd's Box2D Tutorials!&quot;" />
  <row Id="5933" PostHistoryTypeId="1" PostId="3051" RevisionGUID="aaa524c5-e0a2-4f0d-9dd0-bb86d6de669e" CreationDate="2010-08-20T18:19:50.013" UserId="354" Text="Polygon/Shape definition changes in Box2D 2.1" />
  <row Id="5934" PostHistoryTypeId="3" PostId="3051" RevisionGUID="aaa524c5-e0a2-4f0d-9dd0-bb86d6de669e" CreationDate="2010-08-20T18:19:50.013" UserId="354" Text="&lt;flash&gt;&lt;box2d&gt;" />
  <row Id="5935" PostHistoryTypeId="5" PostId="3048" RevisionGUID="dc7116bb-101c-48bb-a7c7-7a50b328df07" CreationDate="2010-08-20T18:19:52.103" UserId="136" Comment="added 2 characters in body; added 120 characters in body; added 1 characters in body; added 31 characters in body" Text="You can definitely create similar kinds of interfaces in WPF, but integrating them into a Direct3D game is problematic.  You can host Direct3D content within WPF (via `D3DImage`), but your 3D content would be composed into the WPF application, so rendering becomes dependent on WPF.  Consequently, you might see relatively poor performance, as you are limited by WPF's frame rate.  Also, as U62 noted in his comment, WPF can only host Direct3D 9 content (as opposed to Direct3D 10/11).  However, you might be able to get around this, as `IDirect3DDevice9Ex` is capable of sharing resources between devices.  Therefore, you could potentially create a shared render target in Direct3D 10 or 11 and bring it into WPF via an intermediate `IDirect3DDevice9Ex` device.  Jeremiah Morrill discusses this technique [here][1].&#xD;&#xA;&#xD;&#xA;An alternative, though far from elegant, would be to render your WPF UI in a separate layered window above the Direct3D content, [as described here][2].&#xD;&#xA;&#xD;&#xA;There are also ways to [access WPF's internal Direct3D surface][3], which would give you a way to host WPF content in an external Direct3D scene (instead of the other way around).  However, this is a rather nasty hack and could easily be broken by future WPF releases.&#xD;&#xA;&#xD;&#xA;Of course, none of this is relevant if you don't actually *need* to interoperate with Direct3D.  Games that don't require complex 3D graphics can certainly be developed [completely in WPF][4].  WPF does have some simple 3D facilities at its disposal, though they are generally insufficient for anything beyond primitive shapes with simple textures.  It also supports custom pixel shaders, though there are many restrictions (e.g. they must be single-pass effects).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/437/Direct3D-10-11-Direct2D-in-WPF.aspx&#xD;&#xA;  [2]: http://blogs.msdn.com/b/pantal/archive/2007/07/31/managed-directx-interop-with-wpf-part-2.aspx&#xD;&#xA;  [3]: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/438/How-to-get-access-to-WPF-s-internal-Direct3D-guts.aspx&#xD;&#xA;  [4]: http://www.startreksupremacy.com/supremacy_wpf.png" />
  <row Id="5936" PostHistoryTypeId="6" PostId="2028" RevisionGUID="b1210a46-b262-4507-a6b8-3e3413cec056" CreationDate="2010-08-20T18:24:34.777" UserId="136" Comment="edited tags" Text="&lt;gui&gt;&lt;directx&gt;&lt;wpf&gt;" />
  <row Id="5937" PostHistoryTypeId="2" PostId="3052" RevisionGUID="a4b684e8-e123-44dd-b78a-aa5079ae99e4" CreationDate="2010-08-20T18:50:47.923" UserId="1651" Text="There are a number of growing companies that work with minimal studio time and people from across the globe.  A lot of flash programmers from what I've seen have adopted this method as the artist usually lives in a different time zone than the programmer etc.&#xD;&#xA;&#xD;&#xA;I believe the project Natural Selection 2 which is coming out this Halloween was made almost entirely by a team split across the US.  Many other small and indie companies do this as well.&#xD;&#xA;&#xD;&#xA;The key is that no matter how &quot;chaotic&quot; you allow your employees hours to be, there has to be accountability for work.  In short, they have to be worth what they are being paid to do.  If you're paying them to provide a pretty face in the office and good face-to-face time with others, then an hourly schedule is probably what you'll be using at a local office.  If you need a collaborative environment, there are PLENTY of online capabilities allowing instant communication with chat backup for those &quot;he said/she said&quot; conversations, such as Basecamp.&#xD;&#xA;&#xD;&#xA;If you allow flexible hours or little to no office time, you MUST be able to keep on top of tasks and have a result-oriented environment.  So far, they've proven quite effective with the right people in small to small-medium environments.  I haven't seen any medium or big companies take it up yet, but it tends to work very well for small close knit groups, AND those who it works for which is not everyone (see: slackers).&#xD;&#xA;&#xD;&#xA;Part 2&#xD;&#xA;&#xD;&#xA;While I laud this approach, your problem is going to be billing.  You're going to either have to be developing your own stuff on your own timeline or not charge by the hour.  The reason a lot of companies want to charge by the hour is that they completely underestimate the amount of time that a project requires and simply take very specific requirements, allowing them to charge for any problem that makes the project deadline slip.&#xD;&#xA;&#xD;&#xA;While in my experience these groups provide higher quality work, the trade-off is in time.  There is, however, the advantage that you can usually pay employees less for being able to have such flexible time and movement.  Also, in a truly results-oriented environment, you shouldn't have to care if your employee is in the Caribbean during release week as long as they are providing you with the code and access to them that you need.  Meaning it's not for the weak of heart managers or those who feel the need to &quot;check up&quot; on their employees at unscheduled times." />
  <row Id="5938" PostHistoryTypeId="16" PostId="3052" RevisionGUID="a4b684e8-e123-44dd-b78a-aa5079ae99e4" CreationDate="2010-08-20T18:50:47.923" UserId="-1" />
  <row Id="5939" PostHistoryTypeId="2" PostId="3053" RevisionGUID="cd9db4a7-e2a2-46ed-8712-bd0ba5c575fc" CreationDate="2010-08-20T19:04:40.907" UserId="1651" Text="Don't be afraid that your ideas aren't original enough would be the key.&#xD;&#xA;&#xD;&#xA;Many highly successful games are simply refinements of previous games, figuring out what makes players enjoy a certain playstyle and then enhancing or providing better gameplay.  WoW is a great example, taking cues from previous MMOs and tweaking things for the &quot;common&quot; gamer, and even casual gamers.&#xD;&#xA;&#xD;&#xA;WoW took from Everquest, which enhanced ideas from MUDs, which were taken from adventure games mixed with old school paper and pencil Dungeons and Dragons which took from J.R.R. Tolkein.  Basically, all the old things are new again in the right hands.&#xD;&#xA;&#xD;&#xA;Take an idea or two that you like from games and think about the process that might make a game better that would use those ideas.  Plot out what a player would do in order to start playing the game, and what kinds of things would be fun for a player to do.  Many new designers simply take ideas and steal them directly, not giving much thought to what the player is supposed to do that differentiates their game, or why they should be fun.  In order to stand out, you must improve on the gameplay that you decide is part of the core fun.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;Diablo &amp; Diablo II&#xD;&#xA;&#xD;&#xA;In D2, they decided one way to improve the gameplay was to improve animations and graphics.  This is almost expected but a few games get away with using the same artwork depending on the timeliness of releases.&#xD;&#xA;&#xD;&#xA;They also decided to increase the amount of character customization through skill trees instead of the few skills you could get.  Waypoints were introduced allowing easier access to a larger world (another improvement).  I could go on , but I believe you can make your own judgments from here on." />
  <row Id="5940" PostHistoryTypeId="16" PostId="3053" RevisionGUID="cd9db4a7-e2a2-46ed-8712-bd0ba5c575fc" CreationDate="2010-08-20T19:04:40.907" UserId="-1" />
  <row Id="5941" PostHistoryTypeId="2" PostId="3054" RevisionGUID="6dfe675d-a76f-4a3d-b28d-03c9fdbae4c8" CreationDate="2010-08-20T19:41:01.300" UserId="1651" Text="Seeing as you've found your artist, hopefully it's because they gave you a sample of their work which you wanted to see in your game.  Take this sample and tell them what types of work you liked, why and how you want them to develop their artwork around this.&#xD;&#xA;&#xD;&#xA;Even stick figures in the &quot;right&quot; positions will work wonders, especially if you work with humanoid models you want him/her to draw.  Don't be afraid to reject artwork, but don't be too picky, remember they might have a better eye than you toward art.  However, if you find yourself rejecting them often (like every submission) and it's not simply minor changes, you may not have chosen the right artist or art style you like.&#xD;&#xA;&#xD;&#xA;Be prepared to pay out the wazoo, unless your artist graciously accepted a percentage of profits deal." />
  <row Id="5942" PostHistoryTypeId="2" PostId="3055" RevisionGUID="a7e53121-395a-4c52-94d4-cc985ec09db3" CreationDate="2010-08-20T20:38:11.403" UserId="1477" Text="The Mud Dragonrealms occasionally has events that occur in the world. These are much more elaborate then generic quests and generally one shot(although they can span days), but are generally a big hit with the players. It gives players an opportunity to take part in something that won't happen again, and possibly gain some sort of items in the process that are rare or possibly even Unique. They occasionally have Events like this that are paid as well.&#xD;&#xA;&#xD;&#xA;I see no reason why you couldn't do something similar in an MMO. You'd require more work in the art-asset department but it could still be done. Political plots, assassination and intrigue, invasions. There are lots of possibilities if you are willing to have a little bit of human supervision instead of having things run off automatically on their own.&#xD;&#xA;&#xD;&#xA;Of course if you are feeling ambitious you could try to implement AI that would occasionally start Events on their own. There has been academic research in story manager AI(my game AI professor in school was crazy about the subject), and if you are interested in that approach let me know and I will try and dig up some of the articles he gave us on the subject." />
  <row Id="5943" PostHistoryTypeId="2" PostId="3056" RevisionGUID="b2805c75-a1eb-4f10-9bc9-98ac460770ba" CreationDate="2010-08-20T23:05:35.507" UserId="1780" Text="I would suggest that many game development companies are exactly not the sort of environment that allows this sort of &quot;exploration&quot; for the simple fact that you need access to the development equipment, and this is not the sort of thing that the console manufacturers typically allow one to take home.  In addition, the support resources that these console manufacturers offer are bound to the IP address of the studio itself.&#xD;&#xA;&#xD;&#xA;VPN can work around this to some extent; there are examples of game developers pointing a webcam at a television and proxying controller input but it's an additional investment that many developers are loathe to undertake.&#xD;&#xA;&#xD;&#xA;Game development is highly collaborative, and even if the technological barriers are removed there is no substitute to working in close proximity to someone working on the same product you're working on.&#xD;&#xA;&#xD;&#xA;That said, I've highly enjoyed working from home when it's been available and I get a lot done once I'm set up and underway.  However it's harder to address problems across the internet link; if I'm responsible for code crashing on somebody's machine, I can't just walk over and check it out.  Same goes the other direction.  So when I'm working from home, my most successful hours are when I'm working on something fairly disconnected from the rest of the team, a subsystem that is standalone or something of that ilk.  If I were to need to iterate on something with another person, it'd be substantially easier in person." />
  <row Id="5944" PostHistoryTypeId="16" PostId="3056" RevisionGUID="b2805c75-a1eb-4f10-9bc9-98ac460770ba" CreationDate="2010-08-20T23:05:35.507" UserId="-1" />
  <row Id="5945" PostHistoryTypeId="2" PostId="3057" RevisionGUID="1a97e880-5a33-42e4-8d1c-bfc7d98e1b9f" CreationDate="2010-08-20T23:48:53.517" UserId="360" Text="You should really check out the [Box2D Manual page][1]. It's well written and easy to understand. &#xD;&#xA;&#xD;&#xA;To more directly address your question, it looks like you no longer use shape definitions to define shapes. You would simply create the shapes themselves, and use a fixture to attach the shape to a body.&#xD;&#xA;&#xD;&#xA;    b2PolygonShape dynamicBox;&#xD;&#xA;    dynamicBox.SetAsBox(1.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    b2FixtureDef fixtureDef;&#xD;&#xA;    fixtureDef.shape = &amp;dynamicBox;&#xD;&#xA;    fixtureDef.density = 1.0f;&#xD;&#xA;    fixtureDef.friction = 0.3f;&#xD;&#xA;    &#xD;&#xA;    body-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/manual.html" />
  <row Id="5946" PostHistoryTypeId="2" PostId="3058" RevisionGUID="9aa13ad9-ed1b-4168-91c0-f2c09f46b796" CreationDate="2010-08-21T00:14:16.207" UserId="370" Text="The PhD Thesis of Andrea Lodi is entitled *[Algorithms for Two Dimensional Bin Packing and Assignment Problems][1]*.  &#xD;&#xA;The thesis goes over some of the harder forms of this problems.  Luckily, texture packing is easiest version.  The best algorithm he found was an algorithm called *Touching Perimeter*.&#xD;&#xA;&#xD;&#xA;    touching_perimeter:&#xD;&#xA;       sort the items by nonincreaseing w,h values, and horizontally orient them;&#xD;&#xA;       comment: Phase 1;&#xD;&#xA;       compute a lower bound L on the optimal solution value, and open L empty bins;&#xD;&#xA;       comment: Phase 2;&#xD;&#xA;       for j := 1 to n do&#xD;&#xA;          score := 0&#xD;&#xA;          for each normal packing position in an open bin do&#xD;&#xA;             let score1 and score2 be scores with tow orientations;&#xD;&#xA;             score := max{score,score1,score2};&#xD;&#xA;          end for;&#xD;&#xA;          if score &gt; 0 then&#xD;&#xA;             pack item j in the bin, position and orientation corresponding to score;&#xD;&#xA;          else&#xD;&#xA;             open a new bin and horizontally pack item j into i;&#xD;&#xA;          end if;&#xD;&#xA;       end for;&#xD;&#xA;    end;&#xD;&#xA;&#xD;&#xA;Also of interest, the paper describes an algorithm to determine the size of an optimally packed texture map.  That would be useful to determine if it's even possible to fit all the textures in one 1024x1024 atlas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.98.3502&amp;rep=rep1&amp;type=pdf" />
  <row Id="5947" PostHistoryTypeId="5" PostId="3058" RevisionGUID="30845fda-415b-4c58-91dd-bdf541354f4f" CreationDate="2010-08-21T00:21:32.667" UserId="370" Comment="added 1686 characters in body" Text="The PhD Thesis of Andrea Lodi is entitled *[Algorithms for Two Dimensional Bin Packing and Assignment Problems][1]*.  &#xD;&#xA;The thesis goes over some of the harder forms of this problems.  Luckily, texture packing is the easiest version.  The best algorithm he found was called *Touching Perimeter*.&#xD;&#xA;&#xD;&#xA;To quote from page 52:&#xD;&#xA;&#xD;&#xA;&gt; The algorithm, called Touching&#xD;&#xA;&gt; Perimeter (TPRF ), starts by sorting&#xD;&#xA;&gt; the items according to nonincreasing&#xD;&#xA;&gt; area (breaking ties by nonincreasing&#xD;&#xA;&gt; min{wj , hj } values), and by&#xD;&#xA;&gt; horizontally orienting them. A lower&#xD;&#xA;&gt; bound L on the optimal solution value&#xD;&#xA;&gt; is then computed, and L empty bins are&#xD;&#xA;&gt; initialized. (The continuous lower&#xD;&#xA;&gt; bound L0 deﬁned in the previous&#xD;&#xA;&gt; section is obviously valid for 2BP|R|F&#xD;&#xA;&gt; as well; better bounds are proposed by&#xD;&#xA;&gt; Dell’Amico, Martello and Vigo [56].)&#xD;&#xA;&gt; The algorithm packs one item at a&#xD;&#xA;&gt; time, either in an existing bin, or by&#xD;&#xA;&gt; initializing a new one. The ﬁrst item&#xD;&#xA;&gt; packed in a bin is always placed in&#xD;&#xA;&gt; the bottom-left corner. Each&#xD;&#xA;&gt; subsequent item is packed in a&#xD;&#xA;&gt; so-called normal position (see&#xD;&#xA;&gt; Christoﬁdes and Whitlock [41]), i.e.,&#xD;&#xA;&gt; with its bottom edge touching either&#xD;&#xA;&gt; the bottom of the bin or the top edge&#xD;&#xA;&gt; of another item, and with its left&#xD;&#xA;&gt; edge touching either the left edge of&#xD;&#xA;&gt; the bin or the right edge of another&#xD;&#xA;&gt; item.  &#xD;&#xA;&gt; The choice of the bin and of the&#xD;&#xA;&gt; packing position is done by evaluating&#xD;&#xA;&gt; a score, deﬁned as the percentage of&#xD;&#xA;&gt; the item perimeter which touches the&#xD;&#xA;&gt; bin and other items already packed.&#xD;&#xA;&gt; This strategy favours patterns where&#xD;&#xA;&gt; the packed items do not “trap” small&#xD;&#xA;&gt; areas, which may be hard to use for&#xD;&#xA;&gt; further placements. For each candidate&#xD;&#xA;&gt; packing position, the score is&#xD;&#xA;&gt; evaluated twice, for the two item&#xD;&#xA;&gt; orientations (if both are feasible),&#xD;&#xA;&gt; and the highest value is selected.&#xD;&#xA;&gt; Score ties are broken by choosing the&#xD;&#xA;&gt; bin having the maximum packed area.&#xD;&#xA;&gt; The overall algorithm is as follows.&#xD;&#xA;&gt;&#xD;&#xA;&gt;     touching_perimeter:&#xD;&#xA;&gt;       sort the items by nonincreaseing w,h values, and horizontally orient them;&#xD;&#xA;&gt;       comment: Phase 1;&#xD;&#xA;&gt;       compute a lower bound L on the optimal solution value, and open L empty bins;&#xD;&#xA;&gt;       comment: Phase 2;&#xD;&#xA;&gt;       for j := 1 to n do&#xD;&#xA;&gt;          score := 0;&#xD;&#xA;&gt;          for each normal packing position in an open bin do&#xD;&#xA;&gt;             let score1 and score2 be scores with tow orientations;&#xD;&#xA;&gt;             score := max{score,score1,score2};&#xD;&#xA;&gt;          end for;&#xD;&#xA;&gt;          if score &gt; 0 then&#xD;&#xA;&gt;             pack item j in the bin, position and orientation corresponding to score;&#xD;&#xA;&gt;          else&#xD;&#xA;&gt;             open a new bin and horizontally pack item j into i;&#xD;&#xA;&gt;          end if;&#xD;&#xA;&gt;       end for;&#xD;&#xA;&gt;     end;&#xD;&#xA;&#xD;&#xA;Also of interest, the paper describes an algorithm to determine the size of an optimally packed texture map.  That would be useful to determine if it's even possible to fit all the textures in one 1024x1024 atlas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.98.3502&amp;rep=rep1&amp;type=pdf" />
  <row Id="5948" PostHistoryTypeId="2" PostId="3059" RevisionGUID="edeb4451-ad24-4450-b026-edd4802ddcfe" CreationDate="2010-08-21T04:32:30.337" UserId="27" Text="We recently released a python script which will pack textures into multiple image files of a given size.&#xD;&#xA;&#xD;&#xA;Quoted from our blog:&#xD;&#xA;&#xD;&#xA;&quot;While there are numerous packers that can be found online, our difficulty was in finding any that could handle large numbers of images in multiple directories. Thus, our own atlas packer was born!&#xD;&#xA;&#xD;&#xA;As is, our little script will start in the base directory and load all the .PNGs into an atlas. If that atlas is filled, it creates a new one. Then, it will try fitting the rest of the images in all previous atlases before finding a spot in the new one. That way, each atlas is packed as tight as possible. Atlases are named based on the folder that their images are from.&#xD;&#xA;&#xD;&#xA;You can change the size of the atlas (line 65), format of the images you want to pack (line 67), the load directory (line 10) and the save directory (line 13) fairly easily with no experience in Python. As a small disclaimer, this was whipped together in a few days to work specifically with our engine. I encourage you to request features, comment with your own variations, and report any errors, but any changes to the script will happen in my free time.&quot;&#xD;&#xA;&#xD;&#xA;Feel free to check out the full source code here: http://www.retroaffect.com/blog/159/Image_Atlas_Packer/#b" />
  <row Id="5949" PostHistoryTypeId="2" PostId="3060" RevisionGUID="3a5174eb-1c6c-4df6-bf2e-650b5206b6d1" CreationDate="2010-08-21T04:36:40.957" UserId="27" Text="Here's a snippet of code directly from the game I'm working on:&#xD;&#xA;&#xD;&#xA;            // Create the shape&#xD;&#xA;            b2PolygonShape shape;&#xD;&#xA;            // Create a &quot;capsule&quot; shaped object&#xD;&#xA;            b2Vec2 vertices[8];&#xD;&#xA;            vertices[0].Set( (-mWidth/2 + 5.0f) / PhysicsManager::mPhysicsScale, (mHeight/2) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[1].Set( (-mWidth/2) / PhysicsManager::mPhysicsScale, (mHeight/2 - 5.0f) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[2].Set( (-mWidth/2) / PhysicsManager::mPhysicsScale, (-mHeight/2 + 5.0f) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[3].Set( (-mWidth/2 + 5.0f) / PhysicsManager::mPhysicsScale, (-mHeight/2) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[4].Set( (mWidth/2 - 5.0f) / PhysicsManager::mPhysicsScale, (-mHeight/2) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[5].Set( (mWidth/2) / PhysicsManager::mPhysicsScale, (-mHeight/2 + 5.0f) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[6].Set( (mWidth/2) / PhysicsManager::mPhysicsScale, (mHeight/2 - 5.0f) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            vertices[7].Set( (mWidth/2 - 5.0f) / PhysicsManager::mPhysicsScale, (mHeight/2) / PhysicsManager::mPhysicsScale);&#xD;&#xA;            shape.Set( vertices, 8 );&#xD;&#xA;&#xD;&#xA;            // Create the fixture def&#xD;&#xA;            b2FixtureDef fixtureDef;&#xD;&#xA;            fixtureDef.shape = &amp;shape;&#xD;&#xA;            fixtureDef.density = mDensity;&#xD;&#xA;            fixtureDef.friction = mFriction;&#xD;&#xA;            fixtureDef.restitution = mRestitution;&#xD;&#xA;            fixtureDef.isSensor = mIsSensor;&#xD;&#xA;            if (contactGroup) {&#xD;&#xA;                fixtureDef.filter.categoryBits = contactGroup-&gt;mCategoryBits;&#xD;&#xA;                fixtureDef.filter.maskBits = contactGroup-&gt;mMaskBits;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // Create the fixture&#xD;&#xA;            b2Fixture *fixture = mBody-&gt;CreateFixture(&amp;fixtureDef);" />
  <row Id="5950" PostHistoryTypeId="2" PostId="3061" RevisionGUID="0aafb589-89e6-4007-99be-6f0e098663bb" CreationDate="2010-08-21T08:57:37.630" UserId="137" Text="A good heuristic algorithm can be found [here][1]. When I was trying something similar recently, I found this referenced as the basic starting point for most implementations I saw.&#xD;&#xA;&#xD;&#xA;Works particularly well with either lots of regular shaped, similar sized items, or with a  good mix of small and fewer larger images. The best advice to achieve good results is to remember to sort your input in terms of image size, then pack from largest to smallest as the smaller images will pack into the space around the larger images. How you do this sorting  up to you and may depend on your goals. I used perimeter rather than area as a 1st order approximation since I took the view that a tall+thin / short+wide image (which would have lowish area) is actually very hard to place later on in a pack, so by using perimeter you push these odd shapes towards the front of the order.&#xD;&#xA;&#xD;&#xA;Here's a sample visulization of the output for my packer on a random set of images from my website image dump directory :).&#xD;&#xA;![Packer output][2]&#xD;&#xA;&#xD;&#xA;The numbers in the squares are the id's of the containing blocks in the tree so give you an idea of the order of the insertions. The first is ID &quot;3&quot; because it is the first *leaf* node (only leaves contain images) and consequently has 2 parents.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blackpawn.com/texts/lightmaps/default.html&#xD;&#xA;  [2]: http://i.stack.imgur.com/vFoIn.png" />
  <row Id="5951" PostHistoryTypeId="5" PostId="3061" RevisionGUID="78e513ef-3db6-4813-8267-beb1c01e8f78" CreationDate="2010-08-21T10:19:17.980" UserId="137" Comment="Spelling; added 98 characters in body" Text="A good heuristic algorithm can be found [here][1]. When I was trying something similar recently, I found this referenced as the basic starting point for most implementations I saw.&#xD;&#xA;&#xD;&#xA;Works particularly well with either lots of regular shaped, similar sized items, or with a  good mix of small and fewer larger images. The best advice to achieve good results is to remember to sort your input in terms of image size, then pack from largest to smallest as the smaller images will pack into the space around the larger images. How you do this sorting  up to you and may depend on your goals. I used perimeter rather than area as a 1st order approximation since I took the view that tall+thin / short+wide images (which would have lowish area) are actually very hard to place later on in a pack, so by using perimeter you push these odd shapes towards the front of the order.&#xD;&#xA;&#xD;&#xA;Here's a sample visulization of the output for my packer on a random set of images from my website image dump directory :).&#xD;&#xA;![Packer output][2]&#xD;&#xA;&#xD;&#xA;The numbers in the squares are the id's of the containing blocks in the tree so give you an idea of the order of the insertions. The first is ID &quot;3&quot; because it is the first *leaf* node (only leaves contain images) and consequently has 2 parents).&#xD;&#xA;&#xD;&#xA;            Root[0]&#xD;&#xA;           /      \&#xD;&#xA;       Child[1]  Child[2]&#xD;&#xA;          |&#xD;&#xA;        Leaf[3]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blackpawn.com/texts/lightmaps/default.html&#xD;&#xA;  [2]: http://i.stack.imgur.com/vFoIn.png" />
  <row Id="5952" PostHistoryTypeId="2" PostId="3062" RevisionGUID="22ceb6fd-d798-4ba8-916e-ff5b3bec4c26" CreationDate="2010-08-21T12:55:35.410" UserId="1825" Text="Simultaneous turn-based games are common enough, mainly in the wargame genre, where they're sometimes referred to as &quot;WEGO&quot; turn-based systems. As already mentioned, Laser Squad Nemesis would be the main example of a squad-level one. On slightly larger scales, the Combat Mission series from Battlefront would be a good example;&#xD;&#xA;http://en.wikipedia.org/wiki/Combat_Mission_%28video_game_series%29&#xD;&#xA;&#xD;&#xA;Re problems with this approach, I think the main one would be the greater demands on the AI - the player's units have to be able to work autonomously and respond to unexpected situations well. Eg, the player send their squad around a courtyard, and mid-way through that, the opponent's guys appear around a corner. The player isn't going to be too happy if his squad just keeps on moving and gets taken out, so they have to be able to branch off from their original orders and respond appropriately - and just stopping on the spot, standing there and shooting probably won't suffice. &#xD;&#xA;&#xD;&#xA;Obviously the AI opponents have to do that in any kind of turn-based game anyway, but it's a lot easier to convince the player that someone not under their control and not very visible has a game plan. Whereas if the player's own units mess up his carefully planned orders by coming apart when faced with unexpected (but reasonable) scenarios, you're going to lose your player pretty quick. That's the main issue I'd see, aside from gameplay concerns like balancing how long the execution phase is, how much can be done in it, etc." />
  <row Id="5953" PostHistoryTypeId="2" PostId="3063" RevisionGUID="063c9cc4-9069-49f1-9152-eb43c92e9211" CreationDate="2010-08-21T14:53:08.777" UserId="370" Text="How minimal should a games engine be?  How much of the content pipeline should be embedded in the engine?&#xD;&#xA;&#xD;&#xA;Some use cases where the super engine might be useful:&#xD;&#xA;&#xD;&#xA;When loading user content, the user isn't required to package up his textures, the engine will do it at load time.&#xD;&#xA;&#xD;&#xA;A script requests a font at a much larger size than was pre-generated, the engine could parse the ttf file ad build a new texture atlas.&#xD;&#xA;&#xD;&#xA;[Halo forge][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;None of this is free of course.  This requires your content pipeline tools to written in C++.  Support libraries you use in the pipeline need to be compiled for use on the device.  It requires the content generation to be not buggy.  And it generally makes your engine larger and unwieldy.  &#xD;&#xA;What are some other pros and cons?  &#xD;&#xA;Do the pros outweigh the cons?&#xD;&#xA;&#xD;&#xA;Some specific questions:&#xD;&#xA;&#xD;&#xA;* Should engine be capable of loading various image formats?  A TGA only loader is pretty easy to hand code.&#xD;&#xA;&#xD;&#xA;* What about audio formats?  Is it feasible to only support loading wav files?  What about ambient music files which are often huge. &#xD;&#xA;&#xD;&#xA;* Should the engine be capable of dynamic TTF parsing and atlas generation?&#xD;&#xA;&#xD;&#xA;* Texture packing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://halo.wikia.com/wiki/Forge" />
  <row Id="5954" PostHistoryTypeId="1" PostId="3063" RevisionGUID="063c9cc4-9069-49f1-9152-eb43c92e9211" CreationDate="2010-08-21T14:53:08.777" UserId="370" Text="Should the content pipeline tools be embedded in the engine?" />
  <row Id="5955" PostHistoryTypeId="3" PostId="3063" RevisionGUID="063c9cc4-9069-49f1-9152-eb43c92e9211" CreationDate="2010-08-21T14:53:08.777" UserId="370" Text="&lt;engine&gt;&lt;architecture&gt;&lt;textures&gt;&lt;pipeline&gt;" />
  <row Id="5956" PostHistoryTypeId="2" PostId="3064" RevisionGUID="72e8451b-107c-419f-a4d6-15ec8227330f" CreationDate="2010-08-21T16:45:15.403" UserId="51" Text="Your questions sound very subjective and depend heavily on who your target audience is.&#xD;&#xA;&#xD;&#xA;Let's take your font/ttf parsing question.  If you're planning on modders adding their own font, then you probably want to make the import process as few steps as possible.  If you're adding a lot of fonts/font sizes to the game internally, maybe you want a somewhat sophisticated tool that an artist can use with a little training.  If you're going to be doing it once internally then the time you spend making a proper importer is probably going to be less than taking the time to write tools for the previous cases.&#xD;&#xA;&#xD;&#xA;It's really a matter of scale with everything else.  Embedded tools are worth the effort when you're doing something a lot of times and want to reduce the complexity/bugs that result from it.  Every additional qualifier you add (i.e. TGA textures only instead of importing of, say, PSDs) results in more time spent by the end user.  &#xD;&#xA;&#xD;&#xA;Remember that content tools are usually used by the less technically inclined (read: artists).  Personally, I really like the way Unity works where you can just drag in a source file (psd, 3ds, ttf, mp3, jpg, mov, whatever) and it will automatically convert it to its internal format.   The internal format is mostly hidden from the end user.   It'll also auto-re-convert when it detects the source file changing.  But that's a lot of work." />
  <row Id="5957" PostHistoryTypeId="2" PostId="3065" RevisionGUID="392aa82c-9db3-446d-93a5-a43d3cdfeae1" CreationDate="2010-08-21T17:44:17.363" UserId="165" Text="**[Why Your Game Idea Sucks][1]** - courtesy of [Escapist Magazine][2].&#xD;&#xA;&#xD;&#xA;Seriously, the only thing that you should show investors is a *completed game* (or close to completed). As others have pointed out, they're not going to look at &quot;ideas on paper&quot;, and if they did, probably couldn't tell if the idea would be successful or not. Really, who would have predicted that a 140-character-maximum messenging server would *succeed*?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/articles/view/issues/issue_221/6582-Why-Your-Game-Idea-Sucks&#xD;&#xA;  [2]: http://www.escapistmagazine.com/" />
  <row Id="5958" PostHistoryTypeId="2" PostId="3066" RevisionGUID="863c8010-0a9c-4bd9-ba78-0e86a902ff13" CreationDate="2010-08-21T17:52:55.380" UserId="1134" Text="Noel Llopis's Games from Within blog touched on this recently in the [&quot;Remote Game Editing&quot; post][1].  The opening paragraph:&#xD;&#xA;&#xD;&#xA;&gt; I’ve long been a fan of minimal game&#xD;&#xA;&gt; runtimes. Anything that can be done&#xD;&#xA;&gt; offline or in a separate tool, should&#xD;&#xA;&gt; be out of the runtime. That leaves the&#xD;&#xA;&gt; game architecture and code very lean&#xD;&#xA;&gt; and [simple][2].&#xD;&#xA;&#xD;&#xA;(The article is a highly recommended read, as with most of Noel's stuff, whether you agree 100% or not.)&#xD;&#xA;&#xD;&#xA;I believe the key here is to keep the complexity outside the engine.  You can still have flexibility, but it's flexibility in the content pipeline.  And you get better performance by not spending time converting and moving data around.&#xD;&#xA;&#xD;&#xA;Better performance may translate into lower iteration time, strangely, despite losing some of the in-engine editing abilities: it's easier to try something if you can load the game in a second.&#xD;&#xA;&#xD;&#xA;Adopting some of the tenets of the &quot;[unix philosophy][3]&quot; will help you keep your toolchain flexible: a small modular pipeline.&#xD;&#xA;&#xD;&#xA;My personal philosophy: [bake][4] as much of the data as much as possible offline, but provide engine support to receive new baked data at any time.  (Note that this new data doesn't need to come into play until a convenient point: the &quot;refresh&quot; button is pressed, the next level begins, you transition to a new area, whatever.  The key is finding the sweet spot that minimizes iteration time with minimum code complexity and coding effort.)&#xD;&#xA;&#xD;&#xA;At our company most of our artist/designer-facing tools are focused on UI issues: ease of manipulation of single assets or batches thereof, etc.  Sometimes they're just 3rd party tools like Photoshop or 3DS Max.  These tools export to an intermediate format (often xml that references source binary data, but not always).  The intermediate format is picked up by a backend &quot;data make&quot; tool, which bakes it into something useful and quick-loading for the target platform.&#xD;&#xA;&#xD;&#xA;Portability is achieved by adding additional backend data make tools, or expanding the existing backend data make tools, which has the additional advantage of being invisible to the content creators.&#xD;&#xA;&#xD;&#xA;Now, with a proper incremental data make, you can have changes in baked format within seconds; your engine can spider, or a tool can spider, and then these will appear in your resource system, ready for reload when it's convenient.&#xD;&#xA;&#xD;&#xA;The tools -- especially the backend data make tools -- are often sloppier and buggier than the engine code.  This is OK, because they're easier to refactor/rewrite, extend, and test; you have specs for their behavior and it's fairly easy to unit test them as compared to some engine code.&#xD;&#xA;&#xD;&#xA;My opinions on your questions:&#xD;&#xA;&#xD;&#xA;&gt; Should engine be capable of loading various image formats? A TGA&#xD;&#xA;&gt; only loader is pretty easy to hand&#xD;&#xA;&gt; code.&#xD;&#xA;&#xD;&#xA;(Aside: even if you use a TGA decoder in-engine, don't handcode it.  You're just asking for trouble -- there are a lot of subtleties with most image formats, and a lot of tools that don't adhere exactly to the probably-underspecified format.  You're best off finding existing well-tested library code for image processing.)&#xD;&#xA;&#xD;&#xA;I'd have the tool here convert from TGA to whatever your internal texture format is, plus metadata.&#xD;&#xA;&#xD;&#xA;&gt; What about audio formats? Is it&#xD;&#xA;&gt; feasible to only support loading wav&#xD;&#xA;&gt; files? What about ambient music files&#xD;&#xA;&gt; which are often huge.&#xD;&#xA;&#xD;&#xA;We use three formats here: tracked music (.xm), ADPCM (.wav), and Speex (.spx).  This is mostly because we're on handhelds, and these formats are very lightweight to decode.&#xD;&#xA;&#xD;&#xA;&gt; Should the engine be capable of&#xD;&#xA;&gt; dynamic TTF parsing and atlas&#xD;&#xA;&gt; generation?&#xD;&#xA;&gt; Texture packing.&#xD;&#xA;&#xD;&#xA;Atlasing is a hard problem: see [your recent question][5]'s answers.  It's almost always worth doing offline.&#xD;&#xA;&#xD;&#xA;Plus you can make the per-character metadata into a near-zero-load-code baked struct.&#xD;&#xA;&#xD;&#xA;In closing, you can clean up and package this pipeline with your game, for the mod community.  You can always add more source formats.  And there's nothing preventing you from bridging the gap between the content creation tools and the engine in specific cases; hopefully your data baking code and spider/transfer code can be refactored into libraries that might eventually be used directly by the content creator tools in some cases.  But I wouldn't make that my first goal, necessarily...  Just be aware that it will be an eventual goal and let that influence your design a bit, and go for the low hanging fruit first.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/remote-game-editing&#xD;&#xA;  [2]: http://gamesfromwithin.com/simple-is-beautiful&#xD;&#xA;  [3]: https://secure.wikimedia.org/wikipedia/en/wiki/Unix_philosophy&#xD;&#xA;  [4]: http://software.intel.com/sites/billboard/archive/delicious-data-baking.php&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/2829/texture-packing-algorithm" />
  <row Id="5959" PostHistoryTypeId="2" PostId="3067" RevisionGUID="67cbff8c-ca67-430e-a45c-aa4d4ebe038f" CreationDate="2010-08-21T20:05:01.387" UserId="1004" Text="I found [Font Squirrel](http://www.fontsquirrel.com/), and while it claims to have fonts free for commercial use, i can't find a license or legal pages anywhere. Are these fonts really usable for commecial use like they say?" />
  <row Id="5960" PostHistoryTypeId="1" PostId="3067" RevisionGUID="67cbff8c-ca67-430e-a45c-aa4d4ebe038f" CreationDate="2010-08-21T20:05:01.387" UserId="1004" Text="Is Font Squirrel for real?" />
  <row Id="5961" PostHistoryTypeId="3" PostId="3067" RevisionGUID="67cbff8c-ca67-430e-a45c-aa4d4ebe038f" CreationDate="2010-08-21T20:05:01.387" UserId="1004" Text="&lt;fonts&gt;" />
  <row Id="5962" PostHistoryTypeId="2" PostId="3068" RevisionGUID="fc6e37bd-c07d-4084-b665-1a1c75fa19bb" CreationDate="2010-08-21T20:19:54.273" UserId="1156" Text="I don't really think they could say, in very large print on the home screen:&#xD;&#xA;&#xD;&#xA;&gt; Only the best commercial- use free fonts&#xD;&#xA;&gt; &#xD;&#xA;&gt; Free fonts have met their match. We&#xD;&#xA;&gt; know how hard it is to find quality&#xD;&#xA;&gt; freeware that is licensed for&#xD;&#xA;&gt; commercial work.&#xD;&#xA;&#xD;&#xA;If they weren't." />
  <row Id="5963" PostHistoryTypeId="2" PostId="3069" RevisionGUID="3018a239-2d66-47a2-9f7a-88693a832008" CreationDate="2010-08-21T20:22:20.493" UserId="14" Text="&lt;strike&gt;I would get them from the sites of the people that they are credited to. I say this because I see a font that I use (Museo) and I know that the font is free, but when compared to the license given at the Font Squirrel site it is different (and kind of unclear) than the one on the creators site. &lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;Checked a few more and the licenses seem alright. But I still recommend cross-refrencing the license available at the original creator's sites just to be safe.&#xD;&#xA;" />
  <row Id="5964" PostHistoryTypeId="2" PostId="3070" RevisionGUID="eb08ec5d-3351-473c-af2b-d154587ce93a" CreationDate="2010-08-21T21:05:18.783" UserId="189" Text="I'm working on my Ludum Dare entry and trying to figure out how in the world I'm ever going to get background music. I found [WolframTones][1], but the license is too restrictive:&#xD;&#xA;&#xD;&#xA;&gt;Unless otherwise specified, this Site and content presented on this Site are for your personal and noncommercial use. You may not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information or content obtained from this Site. For commercial and other uses, contact us.&#xD;&#xA;&#xD;&#xA;But I really like the interface! It's a lot like sfxr - click a genre and download a song. That's so cool. Is there another program that does this same sort of thing but without a restrictive license, so that I can generate a bgm and use it in my game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tones.wolfram.com/generate/" />
  <row Id="5965" PostHistoryTypeId="1" PostId="3070" RevisionGUID="eb08ec5d-3351-473c-af2b-d154587ce93a" CreationDate="2010-08-21T21:05:18.783" UserId="189" Text="Super-quick MIDI generator with nonrestrictive license?" />
  <row Id="5966" PostHistoryTypeId="3" PostId="3070" RevisionGUID="eb08ec5d-3351-473c-af2b-d154587ce93a" CreationDate="2010-08-21T21:05:18.783" UserId="189" Text="&lt;music&gt;" />
  <row Id="5967" PostHistoryTypeId="5" PostId="3070" RevisionGUID="adb2e1cb-940e-4d46-bd37-57ed20fbce3b" CreationDate="2010-08-21T23:30:53.397" UserId="189" Comment="linked to sfxr" Text="I'm working on my Ludum Dare entry and trying to figure out how in the world I'm ever going to get background music. I found [WolframTones][1], but the license is too restrictive:&#xD;&#xA;&#xD;&#xA;&gt;Unless otherwise specified, this Site and content presented on this Site are for your personal and noncommercial use. You may not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information or content obtained from this Site. For commercial and other uses, contact us.&#xD;&#xA;&#xD;&#xA;But I really like the interface! It's a lot like [sfxr][2] - click a genre and download a song. That's so cool. Is there another program that does this same sort of thing but without a restrictive license, so that I can generate a bgm and use it in my game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tones.wolfram.com/generate/&#xD;&#xA;  [2]: http://www.drpetter.se/project_sfxr.html" />
  <row Id="5968" PostHistoryTypeId="6" PostId="2938" RevisionGUID="fc0d6862-3396-47c2-8451-2e3c4b04d05e" CreationDate="2010-08-21T23:46:26.850" UserId="831" Comment="edited tags" Text="&lt;animation&gt;&lt;skeletal&gt;&lt;ik&gt;" />
  <row Id="5969" PostHistoryTypeId="2" PostId="3071" RevisionGUID="1b225fa1-9d27-41b3-b37c-9174c1980058" CreationDate="2010-08-21T23:50:27.827" UserId="1780" Text="In addition to the other answers, there are some things you can do to speed this up if you want to do a little bookkeeping with regards to &quot;collecting&quot; a bunch of pixels into blocks of &quot;known similar state.&quot;  E.g. you could store the height of the highest terrain piece, so you can take for granted that the missile won't hit anything as long as it's above that.  You could also store the height of the lowest &quot;air&quot; space, so you'll know that if the missile gets to that altitude that it must have hit something (although this might be best used as a sanity check).  Going further than this, you could store rectangles representing areas that are all terrain and other rectangles that are all air, but that might be more work than value.&#xD;&#xA;&#xD;&#xA;Ultimately, the best method is probably going to be &quot;store off the height of each terrain column&quot; and then just compute the missile height at each step of its path.  I can't speak to more modern games, but I believe that when you made a &quot;cave&quot; in Scorched Earth, that the terrain above that cave fell straight down, leaving no overhangs.  If you want overhangs the work will be a little greater, but it will be an extension of this basic idea.  (Hint: get the basic idea working first!)&#xD;&#xA;&#xD;&#xA;Since your terrain is presumably completely arbitrary, there are no shortcuts.  Even if you forced your terrain to be a spline or something, that'll get upset once you start destroying it and line-spline intersection tests are iterative and non-perfect or exhaustive and pointlessly slow for your type of problem." />
  <row Id="5970" PostHistoryTypeId="5" PostId="2977" RevisionGUID="5ef81cb2-d3f3-4b8f-8cb6-aff87e4752e9" CreationDate="2010-08-21T23:51:44.190" UserId="831" Comment="Expanded answer." Text="Regardless of your technological stance, the question should be framed in terms of your market. Are you going to be creating a game that runs on all available hardware? Or are you going to be the next Project Offset?&#xD;&#xA;&#xD;&#xA;According to [Valve][1] DX11 capable hardware is only 5.6% of the market. &#xD;&#xA;&#xD;&#xA;The other factors are - does your &quot;nano&quot; team have the bandwidth create the content and pipelines that take advantage of more recent hardware? Or are you going to be beg/borrowing/stealing art to ship something?&#xD;&#xA;&#xD;&#xA;Note that Valve themselves support a huge range of hardware. They have a scalable engine, and the resources to do so.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Personally, I would concentrate on shipping something that makes money as soon as possible. Yes you will need to to refactor later, even if you design your engine well. &#xD;&#xA;&#xD;&#xA;Remember your market - they point of the game is to sell. As a compromise, I would probably target DX10 as a minimum spec. You'd get around 50% if you shipped tomorrow, and the interface is a lot cleaner than DX9. I believe, but I'm not certain, that the API difference between DX10-11 is a lot smaller than DX9-10. &#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/hwsurvey/" />
  <row Id="5971" PostHistoryTypeId="5" PostId="2999" RevisionGUID="d1cdc38e-6ae7-46c9-b9d4-389e457e9722" CreationDate="2010-08-21T23:53:42.237" UserId="831" Comment="added question mark" Text="Expanding on this [question][1], what information do I need to communicate my artistic goals for a game to a professional artist?&#xD;&#xA;&#xD;&#xA;Assuming I'm an indie programmer. and I've found or hired an artist to for my game, how to I go about setting a template or a brief for the look and feel of my game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/775/how-do-i-find-artists-to-work-on-my-game" />
  <row Id="5972" PostHistoryTypeId="2" PostId="3072" RevisionGUID="3924a9a9-39ae-4eeb-a6fd-d05c6d70c632" CreationDate="2010-08-22T01:12:33.873" UserId="469" Text="A ancient one exist, called &quot;Melody Raiser&quot;&#xD;&#xA;&#xD;&#xA;unfortunately I have no idea of where to find it (my copy is fan translated to portuguese, and probably pirated... I have no idea what was the license of the original software, I never found it... also probably the original software is japanese).&#xD;&#xA;&#xD;&#xA;But if I remember well, it was quite popular in RPG Maker communities.&#xD;&#xA;&#xD;&#xA;Also, its music is not the best one around... It is easy to tweak it though..." />
  <row Id="5973" PostHistoryTypeId="2" PostId="3073" RevisionGUID="b1ebdaf1-a03c-4ac2-ae96-c17be6361fd8" CreationDate="2010-08-22T02:35:20.603" UserId="1734" Text="I want to use the behavioral AI from a game engine for character conversation modelling. Most game engines provide very good graphics pipeline like [here][1] , but I want to use the AI part like shown in this [video][2] . Looks like the character is always in a state machine during the gameplay, specially when he talks to the other characters and the NPCs. The other characters like Lucy do not say the same thing but say something which is related to the local goal of the state. Is it all scripted or is there any AI?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/features/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=I8e9lYGHpOk&amp;p=CC6FB90C60E98FA2&amp;playnext=1&amp;index=1" />
  <row Id="5974" PostHistoryTypeId="1" PostId="3073" RevisionGUID="b1ebdaf1-a03c-4ac2-ae96-c17be6361fd8" CreationDate="2010-08-22T02:35:20.603" UserId="1734" Text="Behavioral AI from a game engine for character conversation modelling(with examples from Assassin's Creed II)" />
  <row Id="5975" PostHistoryTypeId="3" PostId="3073" RevisionGUID="b1ebdaf1-a03c-4ac2-ae96-c17be6361fd8" CreationDate="2010-08-22T02:35:20.603" UserId="1734" Text="&lt;engine&gt;" />
  <row Id="5976" PostHistoryTypeId="2" PostId="3074" RevisionGUID="ef6e3734-c26e-4fed-9bee-80cc33106eb2" CreationDate="2010-08-22T02:51:23.627" UserId="1734" Text="I installed Assassin’s Creed 2 on a workstation with nvidia quadro nvs 295. But the framerate is very low. Is it possible to run the game with this graphics card? &#xD;&#xA;The game requires :&#xD;&#xA;&#xD;&#xA;&gt; Video Card: 256 MB DirectX &#xD;&#xA;&gt; 9.0–compliant card with Shader Model 3.0 or higher Nvidia GeForce 8800 GT or ATI Radeon HD 4700  or better" />
  <row Id="5977" PostHistoryTypeId="1" PostId="3074" RevisionGUID="ef6e3734-c26e-4fed-9bee-80cc33106eb2" CreationDate="2010-08-22T02:51:23.627" UserId="1734" Text="Assassin’s Creed 2 on nvidia quadro nvs 295" />
  <row Id="5978" PostHistoryTypeId="3" PostId="3074" RevisionGUID="ef6e3734-c26e-4fed-9bee-80cc33106eb2" CreationDate="2010-08-22T02:51:23.627" UserId="1734" Text="&lt;graphics&gt;" />
  <row Id="5979" PostHistoryTypeId="10" PostId="3074" RevisionGUID="9645eab5-6d00-4cb2-a5f2-f263edca1f74" CreationDate="2010-08-22T03:02:28.300" UserId="14" CloseReasonId="2" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="5980" PostHistoryTypeId="5" PostId="3074" RevisionGUID="f3ea907e-e2d2-496c-9969-d1dc605df4e6" CreationDate="2010-08-22T03:02:31.047" UserId="1734" Comment="added 1071 characters in body" Text="I installed Assassin’s Creed 2 on a workstation with nvidia quadro nvs 295. But the framerate is very low. Is it possible to run the game with this graphics card? &#xD;&#xA;The game requires :&#xD;&#xA;&#xD;&#xA;&gt; Video Card: 256 MB DirectX &#xD;&#xA;&gt; 9.0–compliant card with Shader Model 3.0 or higher Nvidia GeForce 8800 GT or ATI Radeon HD 4700  or better&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Card detailed info:&#xD;&#xA;&#xD;&#xA;    Core Information&#xD;&#xA;    ----------------&#xD;&#xA;    	Name: Quadro NVS 295&#xD;&#xA;    	Compute Capability: 1.1&#xD;&#xA;    	Clock Rate: 1300 MHz&#xD;&#xA;    	Multiprocessors: 1&#xD;&#xA;    	Warp Size: 32&#xD;&#xA;    	Regs Per Block: 8192&#xD;&#xA;    	Threads Per Block: 512&#xD;&#xA;    	Watchdog Enabled: Yes&#xD;&#xA;    	Threads Dimentions: 512 x 512 x 64&#xD;&#xA;    	Grid Dimentions: 65535 x 65535 x 1&#xD;&#xA;    &#xD;&#xA;    Memory Information&#xD;&#xA;    ------------------&#xD;&#xA;    	Total Global: 231.438 MB&#xD;&#xA;    	Shared Per Block: 16 KB&#xD;&#xA;    	Pitch: 2.09715e+06 KB&#xD;&#xA;    	Total Constant: 64 KB&#xD;&#xA;    	Texture Alignment: 256&#xD;&#xA;    	GPU Overlap: No&#xD;&#xA;    &#xD;&#xA;    Performance Information&#xD;&#xA;    -----------------------&#xD;&#xA;    Memory Copy&#xD;&#xA;    	Host Pinned to Device: 3601.01 MB/s&#xD;&#xA;    	Host Pageable to Device: 2443.45 MB/s&#xD;&#xA;    	Device to Host Pinned: 3280.4 MB/s&#xD;&#xA;    	Device to Host Pageable: 2480.89 MB/s&#xD;&#xA;    	Device to Device: 2062.33 MB/s&#xD;&#xA;    GPU Core Performance&#xD;&#xA;    	Single-precision Float: 20528.8 Mflop/s&#xD;&#xA;    	Double-precision Float: Not Supported&#xD;&#xA;    	32-bit Integer: 4096.07 Miop/s&#xD;&#xA;    	24-bit Integer: 20505.8 Miop/s&#xD;&#xA;&#xD;&#xA;" />
  <row Id="5981" PostHistoryTypeId="2" PostId="3075" RevisionGUID="12bdc0bd-4000-430d-9f00-c3677c27ec22" CreationDate="2010-08-22T09:49:51.837" UserId="1838" Text="Is there any algorithm for generating lightning?  &#xD;&#xA;Lets say, you input the starting and ending coordinates (x,y,z) and out comes an array of coordinates to show where the lightning goes.  &#xD;&#xA;It doesn't have to be scientifically accurate but as long it looks random and unpredictable" />
  <row Id="5982" PostHistoryTypeId="1" PostId="3075" RevisionGUID="12bdc0bd-4000-430d-9f00-c3677c27ec22" CreationDate="2010-08-22T09:49:51.837" UserId="1838" Text="Is there any algorithm for creating 3D lightning?" />
  <row Id="5983" PostHistoryTypeId="3" PostId="3075" RevisionGUID="12bdc0bd-4000-430d-9f00-c3677c27ec22" CreationDate="2010-08-22T09:49:51.837" UserId="1838" Text="&lt;3d&gt;&lt;coordinates&gt;" />
  <row Id="5984" PostHistoryTypeId="2" PostId="3076" RevisionGUID="9c51e31f-bf95-425e-ac34-1032d48a06a4" CreationDate="2010-08-22T10:24:39.130" UserId="1156" Text="Note: I have to poll, rather than do callbacks because of API limitations (SFML). I also apologize for the lack of a 'decent' title.&#xD;&#xA;&#xD;&#xA;I think I have two questions here; how to register the input I'm receiving, and what to do with it.&#xD;&#xA;&#xD;&#xA;## Handling Input ##&#xD;&#xA;&#xD;&#xA;I'm talking about after the fact you've registered that the 'A' key has been pressed, for example, and how to do it from there.&#xD;&#xA;&#xD;&#xA;I've seen an array of the whole keyboard, something like:&#xD;&#xA;&#xD;&#xA;&lt;code&gt; bool keyboard[256];  //And each input loop check the state of every key on the keyboard&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;But this seems inefficient. Not only are you coupling the key 'A' to 'player moving left', for example, but it checks every key, 30-60 times a second. &#xD;&#xA;&#xD;&#xA;I then tried another system which just looked for keys it wanted.&#xD;&#xA;&#xD;&#xA;&lt;code&gt;std::map&lt; unsigned char, Key&gt; keyMap; //Key stores the keycode, and whether it's been pressed. Then, I declare a load of const unsigned char called 'Quit' or 'PlayerLeft'.  &#xD;&#xA;input-&gt;BindKey(Keys::PlayerLeft, KeyCode::A);  //so now you can check if PlayerLeft, rather than if A.&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;However, the problem with this is I cannot now type a name, for example, without having to bind every single key. &#xD;&#xA;&#xD;&#xA;Then, I have the second problem, which I cannot really think of a good solution for:&#xD;&#xA;## Sending Input ##&#xD;&#xA;&#xD;&#xA;I now know that the A key has been pressed or that playerLeft is true. But how do I go from here? &#xD;&#xA;&#xD;&#xA;I thought about just checking &#xD;&#xA;&lt;code&gt; if(input-&gt;IsKeyDown(Key::PlayerLeft) { player.MoveLeft(); }&lt;/code&gt;  &#xD;&#xA;This couples the input greatly to the entities, and I find it rather messy. I'd prefer the player to handle its own movement when it gets updated. I thought some kind of event system could work, but I do not know how to go with it. (I heard signals and slots was good for this kind of work, but it's apparently very slow and I cannot see how it'd fit).&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="5985" PostHistoryTypeId="1" PostId="3076" RevisionGUID="9c51e31f-bf95-425e-ac34-1032d48a06a4" CreationDate="2010-08-22T10:24:39.130" UserId="1156" Text="Keyboard input system handling" />
  <row Id="5986" PostHistoryTypeId="3" PostId="3076" RevisionGUID="9c51e31f-bf95-425e-ac34-1032d48a06a4" CreationDate="2010-08-22T10:24:39.130" UserId="1156" Text="&lt;architecture&gt;&lt;input&gt;&lt;keyboard&gt;&lt;events&gt;" />
  <row Id="5988" PostHistoryTypeId="2" PostId="3078" RevisionGUID="09172f87-04bc-42cd-9890-a239dcd7e0a0" CreationDate="2010-08-22T10:49:58.570" UserId="1839" Text="In bullet you can skip the broadphase. It is a pre-phase supposed to find and collect potentially colliding objects, an optimization for bigger scenes, but since your scene is simple, you know your colliding objects anyway. ODE has something similar IIRC." />
  <row Id="5989" PostHistoryTypeId="2" PostId="3079" RevisionGUID="60399bd4-243b-445a-966d-6450d04ab025" CreationDate="2010-08-22T10:59:24.640" UserId="1761" Text="In SFML, you have the keys in the order they have been pressed with the KeyPressed event type. You process each key in a while(getNextEvent()).&#xD;&#xA;&#xD;&#xA;So if the pressed key is in your Key-&gt;Action map, run the corresponding action, and if it's not, forward it to any widget/stuff that might need it.&#xD;&#xA;&#xD;&#xA;Regarding your second question, I'd recommend you to keep it like this because it makes it easier to tweak your gameplay. If you use signals or such, you will have to make a slot for the &quot;RunKeyDown&quot; and another for the &quot;JumpKeySlot&quot;. But what happens if in your game, a special action is performed when both are pressed ?&#xD;&#xA;&#xD;&#xA;If you want to decorrelate input and entities, you could make your input a State (RunKey = true, FireKey = false, ...) and send it to the player like you send any other event to your AIs." />
  <row Id="5990" PostHistoryTypeId="2" PostId="3080" RevisionGUID="323bf46c-7d3c-4fab-b06e-91819dd5084f" CreationDate="2010-08-22T11:18:32.597" UserId="488" Text="The question itself is fairly straight forward, but the answer takes a lot of industry insight.&#xD;&#xA;&#xD;&#xA;To give an example scenario, I am playing a game that's in closed beta right now. They have about 5000 people invited and the game is only open from Fridays to Mondays. On average there are only about 200-400 players online at any given time, across EU and US. For a closed beta, this looks like a bit of a low turn-over if you ask me. " />
  <row Id="5991" PostHistoryTypeId="1" PostId="3080" RevisionGUID="323bf46c-7d3c-4fab-b06e-91819dd5084f" CreationDate="2010-08-22T11:18:32.597" UserId="488" Text="Is there a common invitees/players ratio during closed beta?" />
  <row Id="5992" PostHistoryTypeId="3" PostId="3080" RevisionGUID="323bf46c-7d3c-4fab-b06e-91819dd5084f" CreationDate="2010-08-22T11:18:32.597" UserId="488" Text="&lt;beta&gt;" />
  <row Id="5993" PostHistoryTypeId="2" PostId="3081" RevisionGUID="5b6e5024-837d-40e5-94fd-79c81d82758f" CreationDate="2010-08-22T11:24:01.417" UserId="1761" Text="You're doomed.&#xD;&#xA;&#xD;&#xA;The iPhone only has 2 multitexturing units, so you can't use 3 textures at the same time. This leaves you with the following options : &#xD;&#xA;&#xD;&#xA; - Make a single texture with your 3 images on it. If the combination of textures is not a compile-time constant, either recompute the new texture each time you need it, or pre-compute every possibility.&#xD;&#xA; - Split your cube into 3 meshes, display each independently with its own texture&#xD;&#xA; - Hybrid approach : Split your cube in 2, first half with 1 texture, second half with multitexturing.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="5995" PostHistoryTypeId="2" PostId="3082" RevisionGUID="8ffd9368-0eb2-4382-90e2-4008e87221fb" CreationDate="2010-08-22T11:56:23.237" UserId="1628" Text="I've got a renderbuffer (DepthStencil) in an FBO and I need to get a texture from it. I can't have both a DepthComponent texture and a DepthStencil renderbuffer in the FBO, it seems, so I need some way to convert the renderbuffer to a DepthComponent texture after I'm done with it for use later down the pipeline.&#xD;&#xA;&#xD;&#xA;I've tried plenty of techniques to grab the depth component from the renderbuffer for weeks but I always come out with junk. All I want at the end is the same texture I'd get from an FBO if I wasn't using a renderbuffer. Can anyone post some comprehensive instructions or code that covers this seemingly simple operation?" />
  <row Id="5996" PostHistoryTypeId="1" PostId="3082" RevisionGUID="8ffd9368-0eb2-4382-90e2-4008e87221fb" CreationDate="2010-08-22T11:56:23.237" UserId="1628" Text="Getting a texture from a renderbuffer in OpenGL" />
  <row Id="5997" PostHistoryTypeId="3" PostId="3082" RevisionGUID="8ffd9368-0eb2-4382-90e2-4008e87221fb" CreationDate="2010-08-22T11:56:23.237" UserId="1628" Text="&lt;opengl&gt;" />
  <row Id="5998" PostHistoryTypeId="4" PostId="3082" RevisionGUID="081e9234-2678-48f1-b148-3b930689d305" CreationDate="2010-08-22T12:10:49.043" UserId="1628" Comment="edited title" Text="Getting a texture from a renderbuffer in OpenGL?" />
  <row Id="5999" PostHistoryTypeId="2" PostId="3083" RevisionGUID="2679df9e-4568-4892-99fe-c6b474da9d9e" CreationDate="2010-08-22T12:19:56.780" UserId="141" Text="Why not try a [random walk][1]? You could also have a small random chance of branching at each step.&#xD;&#xA;&#xD;&#xA;Ah, you wanted ending coordinates too. Then just weight your directional probability based on how many steps you are from the ending point. The fewer steps remaining, the more chance of going toward the desired endpoint.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Random_walk" />
  <row Id="6000" PostHistoryTypeId="2" PostId="3084" RevisionGUID="0e826c63-e168-486e-a768-8608846070c1" CreationDate="2010-08-22T12:27:03.580" UserId="18" Text="What I'd do is use the [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) and have an input class that maintains a list of callbacks or input handling objects. Other objects can register themselves with the input system to be notified when certain things happen. There are different types of callbacks you could register, based on the type of input events observers would like to be notified about. This could be as low level as 'key x is down/up' or more game-specific like 'a jump/shooting/movement event happened'. &#xD;&#xA;&#xD;&#xA;Generally game objects have an input handling [component](http://gameprogrammingpatterns.com/component.html) that is responsible for registering itself with the input class and providing methods to handle the events it is interested in. For movement, I have an input mover component that has a move(x, y) method. It registers itself with the input system and gets notified on movement events (where x and y would be -1 and 0 to signify moving left), the mover component then changes its parent game object coordinates based on movement direction and object velocity.&#xD;&#xA;&#xD;&#xA;I don't know if this is a good solution but it works for me so far. In particular it allows me to provide different kinds of input system that map to the same logical game events so that gamepad button x and keyboard space both generate a jump event for example (it's a bit more complicated than that, allowing the user to reassign key mappings)." />
  <row Id="6001" PostHistoryTypeId="5" PostId="3075" RevisionGUID="d5ee2109-8faa-4dc9-80c5-02c5e5c653db" CreationDate="2010-08-22T13:04:54.160" UserId="1838" Comment="added 192 characters in body" Text="Is there any algorithm for generating lightning?  &#xD;&#xA;Lets say, you input the starting and ending coordinates (x,y,z) and out comes an array of coordinates to show where the lightning goes.  &#xD;&#xA;It doesn't have to be scientifically accurate but as long it looks random and unpredictable&#xD;&#xA;&#xD;&#xA;EDIT: I found [this][1], but can't figure out how to put this in to C/++ code. There is a 2D example provided but I want 3D :O&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamma.cs.unc.edu/FAST_LIGHTNING/index.html" />
  <row Id="6003" PostHistoryTypeId="2" PostId="3086" RevisionGUID="5e52600c-8f04-433d-a0f2-3ec4ba56c6bd" CreationDate="2010-08-22T15:38:27.320" UserId="458" Text="In my experience, conversations with NPCs in games are always scripted. Natural-language parsing and sentence formation are difficult and mostly unsolved problems at this point, so we fake it.&#xD;&#xA;&#xD;&#xA;To the extent that there's anything that could be called &quot;AI&quot; you can do one of two things, both of which still count as scripting in my book:&#xD;&#xA;&#xD;&#xA;1) Flags. If the player has taken a certain action in the game, or earlier in the conversation, or whatever, then set a flag on the NPC that makes them treat the player differently. Think of every RPG you've ever seen where the palace guard tells you the princess has been kidnapped, until you bring her back, at which point he says something else.&#xD;&#xA;&#xD;&#xA;2) Numeric ranges. The player has one or more numeric attributes. These might be global attributes (Karma in Fallout 3, Light/Dark side points in Knights of the Old Republic, etc.), or specific to that NPC or that NPC's faction (like your friendship/romance levels with other characters in The Sims). If your value is higher or lower than a certain threshold, the NPC treats you differently." />
  <row Id="6005" PostHistoryTypeId="2" PostId="3087" RevisionGUID="f159a9cf-94d4-4e08-b442-39324597f9fa" CreationDate="2010-08-22T15:48:00.980" UserId="458" Text="It varies based on time of day. For example, you'd expect to see more people in the US online at 7pm than 3am. I've seen activity measured at 15-minute intervals throughout the day and then averaged throughout the week.&#xD;&#xA;&#xD;&#xA;If you've got 5k invites and each person is online for 1 hour per day, randomly distributed, then you'd expect to see in the 200-300 player range at any given time of day. So really if you want to analyze the invite-to-active-player ratio you'd need more information:&#xD;&#xA;&#xD;&#xA; - Total number of beta keys used (that&#xD;&#xA;   is, invitees who logged in at least&#xD;&#xA;   once)? &#xD;&#xA; - Average amount of time spent per play session? &#xD;&#xA; - Average number of logins per day (or week) per account?&#xD;&#xA;&#xD;&#xA;If you're just trying to ask instead, how many players to invite for beta... depends on whether your beta is more for bug-hunting purposes (keep it small and among trusted friends so you get good reports but you're not flooded with them), playtesting/balance purposes (mid-sized, large enough to get good playtest data but small enough that you don't generate too much bad press for your game if the players initially decide it sucks), or marketing purposes (bigger is better)." />
  <row Id="6007" PostHistoryTypeId="2" PostId="3088" RevisionGUID="f49870fa-45c5-4c6c-9644-f9e432fda9f8" CreationDate="2010-08-22T17:48:20.470" UserId="1761" Text="To date, the only game I'm aware of that is not scripted (in the way you probably mean it) is [Facade][1] (Try it, it's worth the time spent)&#xD;&#xA;&#xD;&#xA;But even there, it's scripted to some extend : every time you play, there will be 3 &quot;special points&quot; in the drama, and characters still obey to some &quot;scripted&quot; high-level rules.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.interactivestory.net/" />
  <row Id="6008" PostHistoryTypeId="5" PostId="3063" RevisionGUID="92c04c44-4e92-42f2-8ec8-1a454711bfcb" CreationDate="2010-08-22T19:16:06.093" UserId="370" Comment="added 6 characters in body" Text="How minimal should a games engine be?  How much of the content pipeline should be embedded in the engine?&#xD;&#xA;&#xD;&#xA;Some use cases where the super engine might be useful:&#xD;&#xA;&#xD;&#xA;* When loading user content, the user isn't required to package up his textures, the engine will do it at load time.&#xD;&#xA;&#xD;&#xA;* A script requests a font at a much larger size than was pre-generated, the engine could parse the ttf file ad build a new texture atlas.&#xD;&#xA;&#xD;&#xA;* [Halo forge][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;None of this is free of course.  This requires your content pipeline tools to written in C++.  Support libraries you use in the pipeline need to be compiled for use on the device.  It requires the content generation to be not buggy.  And it generally makes your engine larger and unwieldy.  &#xD;&#xA;What are some other pros and cons?  &#xD;&#xA;Do the pros outweigh the cons?&#xD;&#xA;&#xD;&#xA;Some specific questions:&#xD;&#xA;&#xD;&#xA;* Should engine be capable of loading various image formats?  A TGA only loader is pretty easy to hand code.&#xD;&#xA;&#xD;&#xA;* What about audio formats?  Is it feasible to only support loading wav files?  What about ambient music files which are often huge. &#xD;&#xA;&#xD;&#xA;* Should the engine be capable of dynamic TTF parsing and atlas generation?&#xD;&#xA;&#xD;&#xA;* Texture packing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://halo.wikia.com/wiki/Forge" />
  <row Id="6009" PostHistoryTypeId="2" PostId="3089" RevisionGUID="5462233f-1879-4aa7-b0de-f75f467f7a1f" CreationDate="2010-08-22T20:16:55.347" UserId="1583" Text="I am a java web application developer (mostly server side) since 7 years who recently got interested in game development (i dont know why, maybe i am bored). Today i was looking for frameworks. I read about a few scene graphs and took a look at [jMonkeyEngine][1]. It was recommended [here][2] and [here][3].&#xD;&#xA;&#xD;&#xA;My first goal was to create a simple plane and a sphere which could be moved around using the keaborad. Well, as i mentioned i am a web developer and never programmed anything else so i started with the tutorials of jMonkey. But i wasnt able to get them working. I took a look at the wiki but i noticed that the documentation seems to be very poor, at least compared to what i am used to. I than took a look at a few other scene graph's (also for C++) but they also seem to have an outdated, incomplete poor documentation.&#xD;&#xA;&#xD;&#xA;Can someone recommend me a scene graph which is well documented with working samples?&#xD;&#xA;Or is there something like the &quot;ultimate guide&quot; to get into this topic?&#xD;&#xA;Do i first need to know how to develop my own scene graph to get it working or is it possible to just understand the abstract principles and use it from a higher point of view?&#xD;&#xA;Somehow i have the feeling i need to understand the deep insides of a scene graph to use it well (like it's the case for ORM tools in web dev, you cant use them well if you dont understand databases) &#xD;&#xA;&#xD;&#xA;i'm sorry if this question is too 'noobish', but i just want to get on my feet and do my first steps.&#xD;&#xA;thanks,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/home/&#xD;&#xA;  [2]: http://stackoverflow.com/questions/269916/free-java-3d-engine&#xD;&#xA;  [3]: http://stackoverflow.com/questions/2934567/open-source-3d-render-engine-for-java" />
  <row Id="6010" PostHistoryTypeId="1" PostId="3089" RevisionGUID="5462233f-1879-4aa7-b0de-f75f467f7a1f" CreationDate="2010-08-22T20:16:55.347" UserId="1583" Text="Which SceneGraph is optimal to begin with for small game programming?" />
  <row Id="6011" PostHistoryTypeId="3" PostId="3089" RevisionGUID="5462233f-1879-4aa7-b0de-f75f467f7a1f" CreationDate="2010-08-22T20:16:55.347" UserId="1583" Text="&lt;scene-graph&gt;" />
  <row Id="6012" PostHistoryTypeId="2" PostId="3090" RevisionGUID="d41fe2d9-24a8-4709-92d6-394fe79b5142" CreationDate="2010-08-22T20:36:18.333" UserId="1135" Text="Assume you have a game in which there are many (many many) entities serving some functions, not all of which are constantly needed or need to be considered in every frame. The concrete problem I am working on in which this issue is present is a detailed simulation of a body including its organs.&#xD;&#xA;&#xD;&#xA;In the game each creature has its own body which is separated into smaller parts (torso, legs etc.) and sometimes these parts contain organs, which serve a specific function within the body. Whether or not an organ currently serves a purpose or is active is never actually clear. After all, an animal might have an empty stomach which therefore does not need to digest anything. It would be quite ridiculous to check or simulate every object in each frame and very costly as soon as you have many creatures in the world. So I was thinking about a way to smartly differentiate between objects that need to be updated and those that don't.&#xD;&#xA;&#xD;&#xA;What I came up with seems like an at least ok solution. It creates a simple queue/stack (essential is that each element gets removed as soon as it's read; the order is irrelevant) called the &quot;attention stack&quot; where objects that need to be simulated reside. Objects that need attention would simply put themselves onto the stack *or* are put there by other objects. These objects would probably implement a simple interface with a simulate()-function.&#xD;&#xA;&#xD;&#xA;Applied to my previous digestion example this would mean:&#xD;&#xA;&#xD;&#xA;The player chooses something to eat (assume it's bread) from the inventory and puts it into the mouth of his character and the mouth is put onto the attention stack. In the next frame the the mouth is taken from the stack and its simulate()-function is called. Since it's a mouth it would be reasonable to simulate chewing here. This could go on for a few frames in which the mouth keeps putting itself onto the stack until it decides the food is ready to be swallowed. In this case the mouth puts the chewed bread into the stomach (I know it doesn't go there directly, but the esophagus is left out for simplification), which is then also put onto the attention-stack. In the next frame the simulation of the digestion-process is started. And so on for the rest of the necessary organs.&#xD;&#xA;&#xD;&#xA;A foreseeable problem with this are idling objects. A sleeping animal is a good example of this. It could be done as previously described by keeping the sleeping animal on the stack and checking each time if it needs to wake up, but that seems wasteful since that's the only thing being done. To make idling objects more efficient I was planning to add a sort of schedule which stores jobs to be performed at a specific time. If an animal goes to sleep it would put a job on that schedule which would be scheduled for a certain amount of time after the animal went to sleep. This job would then take care of putting the sleeping animal onto the attention stack again. Now, you could say that a sleeping animal that isn't on the attention stack could miss being attacked by something because its A.I. is not simulated, but this is prevented if the attacking object takes care of putting that animal onto the stack again.&#xD;&#xA;&#xD;&#xA;Now, I honestly don't know if this is even close to an elegant solution to this problem due to a lack of experience. Am I close to something usable? How is this usually done or does anybody have any suggestions or better solutions?" />
  <row Id="6013" PostHistoryTypeId="1" PostId="3090" RevisionGUID="d41fe2d9-24a8-4709-92d6-394fe79b5142" CreationDate="2010-08-22T20:36:18.333" UserId="1135" Text="Elegant way to simulate large amounts of entities within a game world" />
  <row Id="6014" PostHistoryTypeId="3" PostId="3090" RevisionGUID="d41fe2d9-24a8-4709-92d6-394fe79b5142" CreationDate="2010-08-22T20:36:18.333" UserId="1135" Text="&lt;architecture&gt;&lt;algorithm&gt;&lt;best-practices&gt;&lt;simulations&gt;" />
  <row Id="6015" PostHistoryTypeId="2" PostId="3091" RevisionGUID="50092260-4bd6-4709-9b86-8b6a94c16ea4" CreationDate="2010-08-22T20:45:06.880" UserId="450" Text="This is exactly the way we solved this problem in [Stendhal][1]. In our case there are lots of things that happen periodically, but not every turn: Healing spells, plants growing a little further, corpse degenerating, items on the ground expiring.&#xD;&#xA;&#xD;&#xA;We have a turn number that is increased in every turn. And we maintain a map of future turn numbers pointing to a set of objects that need to be notified in that turn.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org" />
  <row Id="6016" PostHistoryTypeId="2" PostId="3092" RevisionGUID="1a0fb6a3-cd23-4a3f-8a49-eb80162e12d8" CreationDate="2010-08-22T21:06:11.410" UserId="154" Text="So I'm going to take a step back from implimentation and review the question from a design perspective. Do you have a solid plan for displaying all the detail you want to include in this simulation?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA; - Can the player tell the difference between an animal with an empty stomach and an animal with a full one?&#xD;&#xA; - Does this information matter to them in any way when they are making interaction choices within your game?&#xD;&#xA; - Could a player watching the animal consistently predict the outcome of your simulated events, or would a random number suffice?&#xD;&#xA;&#xD;&#xA;Basically the general rule of thumb is to not make your simulation any more complicated than it's outputs. At the end of the day if the only animations you have for sheep are graze, sleep, run away. Then is really doesn't matter how many factors go into the decision about which state to choose. All players are going to see is sheep that sleep at night, run from danger and eat during the day. &#xD;&#xA;&#xD;&#xA;Behavior simulation is a ton of fun to work on, but always keep the end users experience in mind.&#xD;&#xA;" />
  <row Id="6017" PostHistoryTypeId="2" PostId="3093" RevisionGUID="4219d6e1-1cbf-496c-bae5-47fcc3b5cd66" CreationDate="2010-08-22T21:39:15.983" UserId="19" Text="I'd personally try with [L-System][1]. I wouldn't be surprised if there are examples you could find with google.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/L-system" />
  <row Id="6018" PostHistoryTypeId="2" PostId="3094" RevisionGUID="47bdd770-cda2-41b5-aa57-596cc57c5b01" CreationDate="2010-08-22T21:45:16.073" UserId="865" Text="If you need a set begin and endpoint then you'll have to generate the points inbetween. Start by randomly cutting the line (begin - end) in a number of segments. For each point generate a random amplitude within a given range and scale it (or scale your random range) so the points closer to the beginning and end can't displace as much. Next for each segment endpoint do a random to see if a fork should be created there, give it a random number of segments and repeat the same process for the fork. Forks can have a fixed endpoint as well if you want. Nodes should have a random value to decide how long they should be kept the same. This way you'll get lightning going from a to b with some points staying in place a few frames longer, some a few frames shorter and some random forking." />
  <row Id="6019" PostHistoryTypeId="2" PostId="3095" RevisionGUID="d25f3258-9c48-46f7-b174-40ba200f4d4c" CreationDate="2010-08-22T22:01:18.460" UserId="458" Text="Sounds like a similar problem to that of inputs: you have 100+ keys on the keyboard but don't want to check each individual key on every frame, so what do you do?&#xD;&#xA;&#xD;&#xA;Two answers: polling or system messages.&#xD;&#xA;&#xD;&#xA;Polling = at any point when it would actually matter in the game, query the state of the keyboard keys (or the objects, in your case). The rest of the time, ignore them.&#xD;&#xA;&#xD;&#xA;Messages = have each keyboard key (object) put something in a message queue when it's pressed or released (when it needs attention). On each iteration of the game loop it looks through the queue and resolves all messages before proceeding." />
  <row Id="6020" PostHistoryTypeId="5" PostId="3092" RevisionGUID="fc7d2d61-6f4b-46b1-b231-3c6cd1289f21" CreationDate="2010-08-23T00:42:53.240" UserId="154" Comment="grammer/spelling fix" Text="So I'm going to take a step back from implementation and review the question from a design perspective. Do you have a solid plan for displaying all the detail you want to include in this simulation?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA; - Can the player tell the difference between an animal with an empty stomach and an animal with a full one?&#xD;&#xA; - Does this information matter to them in any way, when they are making interaction choices within your game?&#xD;&#xA; - Could a player watching the animal consistently predict the outcome of your simulated events, or would a random number suffice?&#xD;&#xA;&#xD;&#xA;Basically the general rule of thumb is to not make your simulation any more complicated than its outputs. At the end of the day if the only animations you have for sheep are graze, sleep, run away. Then it really doesn't matter how many factors go into the decision about which state to choose. All players are going to see is sheep that sleep at night, run from danger and eat during the day. &#xD;&#xA;&#xD;&#xA;Behavior simulation is a ton of fun to work on, but always keep the end users experience in mind.&#xD;&#xA;" />
  <row Id="6021" PostHistoryTypeId="5" PostId="3075" RevisionGUID="cd9b5280-e2ba-45e1-b6e2-3232b05141f1" CreationDate="2010-08-23T01:05:21.403" UserId="1838" Comment="added 463 characters in body; added 43 characters in body" Text="Is there any algorithm for generating lightning?  &#xD;&#xA;Lets say, you input the starting and ending coordinates (x,y,z) and out comes an array of coordinates to show where the lightning goes.  &#xD;&#xA;It doesn't have to be scientifically accurate but as long it looks random and unpredictable&#xD;&#xA;&#xD;&#xA;EDIT: I found [this][1], but can't figure out how to put this in to C/++ code. There is a 2D example provided but I want 3D :O&#xD;&#xA;&#xD;&#xA;EDIT2: The output might be something like this:&#xD;&#xA;&#xD;&#xA;    struct coord3 { int x, y, z; };&#xD;&#xA;&#xD;&#xA;    struct line&#xD;&#xA;    {&#xD;&#xA;        unsigned char lumo;&#xD;&#xA;        coord3 start;&#xD;&#xA;        coord3 end;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    line* lightning = new line[n]; // each element of the array would be a line that&#xD;&#xA;                                   // needs to be drawn for the lightning so the&#xD;&#xA;                                   // lightning can &quot;fork&quot; and can have different&#xD;&#xA;                                   // brightnesses&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamma.cs.unc.edu/FAST_LIGHTNING/index.html" />
  <row Id="6022" PostHistoryTypeId="2" PostId="3096" RevisionGUID="2938081d-5b7b-4ab2-89f1-b12af0835eb1" CreationDate="2010-08-23T01:29:19.217" UserId="919" Text="To my experience some games like RE Outbreak and L4D used a script + variables. Where variables are generated along with the map generator. This usually not part of a game engine, as game differ on the RND generating rules most of the time.  " />
  <row Id="6023" PostHistoryTypeId="2" PostId="3097" RevisionGUID="9ed238fa-9663-4a43-8aaa-afd78f55e378" CreationDate="2010-08-23T01:41:44.527" UserId="919" Text="Just a list of things I find that helps me:&#xD;&#xA;&#xD;&#xA;1. Play more games&#xD;&#xA;&#xD;&#xA;2. Research related topics on your game from developer blogs and gamasutra.&#xD;&#xA;&#xD;&#xA;3. Participate in discussions be it online or local, about your design or other games (I find this helps me collate my thoughts as well as get good feedback). Double edged though as it could lead to prolonging the design phase as well.&#xD;&#xA;&#xD;&#xA;4. Write down your design, reread a couple of times.&#xD;&#xA;&#xD;&#xA;5. Know your target player&#xD;&#xA;" />
  <row Id="6024" PostHistoryTypeId="2" PostId="3098" RevisionGUID="73eff301-b539-492a-8a40-be303bcb5672" CreationDate="2010-08-23T03:14:02.190" UserId="35" Text="No, that's not possible. At most you can glReadPixels the data to the CPU, and create a texture of it, but that will be cumbersome and slow. Renderbuffers aren't meant for it, that functionality is only provided by textures." />
  <row Id="6025" PostHistoryTypeId="2" PostId="3099" RevisionGUID="a5e4f67c-7062-4049-bd2e-9cad2009653b" CreationDate="2010-08-23T03:40:43.080" UserId="1759" Text="I've seen some pretty cool HTML 5 demos.  If you really want to be on the bleeding edge you might want to take a look at that." />
  <row Id="6026" PostHistoryTypeId="16" PostId="3099" RevisionGUID="a5e4f67c-7062-4049-bd2e-9cad2009653b" CreationDate="2010-08-23T03:40:43.080" UserId="-1" />
  <row Id="6027" PostHistoryTypeId="2" PostId="3100" RevisionGUID="bcc79269-d52f-41a0-89cf-74eb95b8c157" CreationDate="2010-08-23T05:26:12.007" UserId="1021" Text="I'm testing a 2D OpenGL ES based iPhone game on both the iPhone 3G and the iPhone 4.  It runs great on the iPhone 4... and pretty well on the 3G.  The game state is updated at 60 Hz... and the rendering is done at 60 fps.  Would the following conversion from Objective-C to c improve the performance at all?&#xD;&#xA;&#xD;&#xA;    // current Objective-C function&#xD;&#xA;    - (void) updateSomething {&#xD;&#xA;        // simple update like x_position += 2.0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // plain c function&#xD;&#xA;    void updateSomething(){&#xD;&#xA;        // simple update like x_position += 2.0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Assume these functions are called at a rate of 60 Hz.  **The reason I'm curious is [this][1] blog post**.  The author mentions substantial performance improvements when making a similar conversion.&#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;Edit:  after running w/ the CPU Sampler instrument in XCode it looks like about 65% of the function calls are to **mach_msg_trap**.  **objc_msgSend** apparently takes up a trivial amount of resources.&#xD;&#xA;&#xD;&#xA;  [1]: http://it.toolbox.com/blogs/macsploitation/bypassing-objectivecs-message-passing-mechanism-for-speed-24946" />
  <row Id="6028" PostHistoryTypeId="1" PostId="3100" RevisionGUID="bcc79269-d52f-41a0-89cf-74eb95b8c157" CreationDate="2010-08-23T05:26:12.007" UserId="1021" Text="Objective-C to plain c iPhone game performance improvements" />
  <row Id="6029" PostHistoryTypeId="3" PostId="3100" RevisionGUID="bcc79269-d52f-41a0-89cf-74eb95b8c157" CreationDate="2010-08-23T05:26:12.007" UserId="1021" Text="&lt;performance&gt;&lt;objective-c&gt;&lt;c&gt;" />
  <row Id="6030" PostHistoryTypeId="2" PostId="3101" RevisionGUID="7b9b7811-13dd-4ea3-beb8-2b2e8c85355b" CreationDate="2010-08-23T05:27:28.260" UserId="1163" Text="Adobe Flash&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;Flash is still the best choice for a lot of types of games.&#xD;&#xA;&#xD;&#xA;**OpenSource**&#xD;&#xA;&#xD;&#xA;The SDK is opensource, and there are some great opensource development tools out there. I believe FlashDevelop is the best ActionScript IDE out there.&#xD;&#xA;&#xD;&#xA;**FlashPlayer is everywhere**&#xD;&#xA;&#xD;&#xA;Almost all computers have Flash Player installed, and the upgrade process is fairly streamlined now.&#xD;&#xA;&#xD;&#xA;**Flash Platform**&#xD;&#xA;&#xD;&#xA;Flash is now a Platform, so there are many options for deploying you flash content, keeping with a write once deploy everywhere policy.&#xD;&#xA;&#xD;&#xA;**Libraries and community**&#xD;&#xA;&#xD;&#xA;There is a massive active community around Flash and even around Flash games specifically. There are also a ton of libraries in ActionScript. Many of the main &quot;game&quot; libraries from other languages are ported to AS3.&#xD;&#xA;&#xD;&#xA;**Active development by Adobe**&#xD;&#xA;&#xD;&#xA;FlashPlayer and the Platform is getting better and better with every release. There are more things added to the platform all the time such as Flex, Adobe AIR, Pixel Bender, etc. Just take a quick look at [Adobe Labs][1] to see all the great things coming.&#xD;&#xA;&#xD;&#xA;There are countless other benefits, including the Flash IDE (yes it is a benefit), AMF, Established sites and programs for Flash games (kongregate, mochi media etc).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://labs.adobe.com/" />
  <row Id="6031" PostHistoryTypeId="16" PostId="3101" RevisionGUID="7b9b7811-13dd-4ea3-beb8-2b2e8c85355b" CreationDate="2010-08-23T05:27:28.260" UserId="-1" />
  <row Id="6032" PostHistoryTypeId="2" PostId="3102" RevisionGUID="2f80353c-b706-4bc5-abe9-38a5cc69f730" CreationDate="2010-08-23T06:20:46.457" UserId="1628" Text="Surprised WebGL hasn't come up. WebGL is supported by all browsers except IE and offers the same power and flexibility that OpenGL ES normally does, just interfaced through the browser." />
  <row Id="6033" PostHistoryTypeId="16" PostId="3102" RevisionGUID="2f80353c-b706-4bc5-abe9-38a5cc69f730" CreationDate="2010-08-23T06:20:46.457" UserId="-1" />
  <row Id="6034" PostHistoryTypeId="5" PostId="3102" RevisionGUID="f330e39d-8e99-4278-bc9e-a447b9411726" CreationDate="2010-08-23T06:30:42.273" UserId="1628" Comment="added 62 characters in body; deleted 32 characters in body" Text="WebGL is supported by all (latest nightly builds of) browsers except IE and offers the same power and flexibility that OpenGL ES normally does, just interfaced through the browser. http://en.wikipedia.org/wiki/WebGL" />
  <row Id="6035" PostHistoryTypeId="2" PostId="3103" RevisionGUID="93dfd360-e6cb-402b-a794-2f7097130b71" CreationDate="2010-08-23T07:04:17.853" UserId="865" Text="For a function that is called at 60hz you're not gonna notice a difference, a profiler pretty much can't pick up on that. Rule #1, identity bottlenecks - and don't mention fight club of course.&lt;br&gt; &#xD;&#xA;Now if those functions call other functions that call other functions in a loop and call other functions, then it starts adding up.&lt;br&gt;&#xD;&#xA;How much? That you can only find out by trying. But at least try it with the function that are called hundreds of times per frame to get any significant difference.&lt;br&gt;&#xD;&#xA;If you don't use ObjC functionality to begin with (might be smart to at least isolate it for porting purposes might the opportunity arise, and it's good practise to keep platform dependencies wrapped away anyhow) the conversion should be fairly trivial." />
  <row Id="6036" PostHistoryTypeId="2" PostId="3104" RevisionGUID="4119bf8c-ae8e-4822-b8ca-49ef3897c93e" CreationDate="2010-08-23T07:14:11.343" UserId="288" Text="A scene graph is a tool. It's not really a suitable tool for when you're just starting out in game development.&#xD;&#xA;&#xD;&#xA;I think what you are after is not a *scene graph* but just a framework of some kind.&#xD;&#xA;&#xD;&#xA;Normally I'd recommend XNA because it's *really* good (powerful, modern, well documented, beginner-friendly). But it is C# and I can see you are a Java man. If you'd prefer to stick with Java, perhaps a good place to start would be the Java ports of the old &lt;a href=&quot;http://nehe.gamedev.net/&quot;&gt;NeHe OpenGL Tutorials&lt;/a&gt; (this is not a framework - but it is a set of tutorials for how to do (at a low level) the kind of things a framework does for you - load models, load textures, etc).&#xD;&#xA;&#xD;&#xA;In the first few lessons you will learn about transformation matrices, which is basically what &lt;a href=&quot;http://en.wikipedia.org/wiki/Scene_graph&quot;&gt;scene graphs&lt;/a&gt; are all about (in the common case).&#xD;&#xA;&#xD;&#xA;To describe a scene graph briefly: Say you have a windmill model - it is defined in its own space. You *translate* it to where you want it to appear in your *world space*. That windmill would have a child object for its rotating blades - so you you would apply a *rotation* transformation to the blades, and it would also inherit its parent's translation to place the blades correctly in the world.&#xD;&#xA;&#xD;&#xA;(Scene graphs are also used for performance-related things like sorting by material, culling, etc - all unnecessary for the beginner and for most small games.)&#xD;&#xA;&#xD;&#xA;When you're starting out, making small games, you don't need to worry so much about having this big complicated data structure. Usually you'll just have a couple of models that you'll apply transformation matrices to directly." />
  <row Id="6037" PostHistoryTypeId="5" PostId="3104" RevisionGUID="65978c69-6a6d-4307-945d-e94ca5b91522" CreationDate="2010-08-23T07:19:25.920" UserId="288" Comment="added 11 characters in body" Text="A scene graph is a tool. It's not really a suitable tool for when you're just starting out in game development.&#xD;&#xA;&#xD;&#xA;I think what you are after is not a *scene graph* but just a framework of some kind.&#xD;&#xA;&#xD;&#xA;Normally I'd recommend XNA because it's *really* good (powerful, modern, well documented, beginner-friendly). But it is C# and I can see you are a Java man. If you'd prefer to stick with Java, perhaps a good place to start would be the Java ports of the old &lt;a href=&quot;http://nehe.gamedev.net/&quot;&gt;NeHe OpenGL Tutorials&lt;/a&gt; (this is not a framework - but it is a set of tutorials for how to do (at a low level) the kind of things a framework does for you - load and render models, load textures, etc).&#xD;&#xA;&#xD;&#xA;In the first few lessons you will learn about transformation matrices, which is basically what &lt;a href=&quot;http://en.wikipedia.org/wiki/Scene_graph&quot;&gt;scene graphs&lt;/a&gt; are all about (in the common case).&#xD;&#xA;&#xD;&#xA;To describe a scene graph briefly: Say you have a windmill model - it is defined in its own space. You *translate* it to where you want it to appear in your *world space*. That windmill would have a child object for its rotating blades - so you you would apply a *rotation* transformation to the blades, and it would also inherit its parent's translation to place the blades correctly in the world.&#xD;&#xA;&#xD;&#xA;When you're starting out, making small games, you don't need to worry so much about having this big complicated data structure. Usually you'll just have a couple of models that you'll apply transformation matrices to directly.&#xD;&#xA;&#xD;&#xA;(Scene graphs are also used for performance-related things like sorting by material, culling, etc - all unnecessary for the beginner and for most small games.)" />
  <row Id="6038" PostHistoryTypeId="2" PostId="3105" RevisionGUID="cd911df4-bb1f-402c-b543-5db28093c21b" CreationDate="2010-08-23T07:39:27.423" UserId="865" Text="Scene graph have slightly lost their spot as a must-have. Mostly because a scene-graph centric engine is so tied up in the idea of a scenegraph that it confuses itself. Fact is that various parts of an engine need a different view of the world, whereas a scenegraph centric engine tends to want to impose the same view on all parts of the engine.&lt;br&gt;&#xD;&#xA;The scenegraph as it's traditionally viewed, a hierarchy of parent objects and child objects is nice for transforms, but might be totally inappropriate for rendering, where you are more interested in what materials are used (well okay, location counts too, but there are different ways to deal with that and parent-child doesn't guarantee they're close together, we just tend to see it that way).&lt;br&gt;&#xD;&#xA;In many games you'll find that you have a scene-root with a lot of children, but those children rarely have children of their own. The few that have children you might as well update yourself and skip the scenegraph as it adds unnecessary complexity and performance loss (every transform checking if it's parent is dirty whereas only a few actually have a parent that will get dirty ever (the world root rarely moves)." />
  <row Id="6046" PostHistoryTypeId="2" PostId="3106" RevisionGUID="f3c9e37e-eaee-4762-bfb0-8333c1c0e316" CreationDate="2010-08-23T08:30:16.587" UserId="1761" Text="I completely agree with Kaj. For more insights on this subject, see [gamearchitect][1] (by the way, if you're interested in game developpement, just read the whole site, especially the old one)&#xD;&#xA;&#xD;&#xA;  [1]: http://gamearchitect.net/Articles/GameObjects2.html" />
  <row Id="6047" PostHistoryTypeId="2" PostId="3107" RevisionGUID="688e84e7-63fd-4475-950c-07eeb1c6544e" CreationDate="2010-08-23T08:37:00.770" UserId="115" Text="I thought about making a simple 2D Sidescroller game like SuperMario. &#xD;&#xA;Then i wondered about how to save, load or create the levels for the game. The first thing i thought of was drawing a simple blocky png which represents the level, an making all the parts where the player can walk a special color (maybe lilac). I would import the level in blocks or tiles so i could check for collision.&#xD;&#xA;&#xD;&#xA;so my questions are:  &#xD;&#xA;are there better methods for this?  &#xD;&#xA;what are the professional methods for this?  &#xD;&#xA;should i do this with Tiles and a Map editor based on tiles? (for some reason i dont like this, but i guess if its the best method i would use it)  &#xD;&#xA;with a tile based level, how would you realize slopes, and how would you check them for collisions? " />
  <row Id="6048" PostHistoryTypeId="1" PostId="3107" RevisionGUID="688e84e7-63fd-4475-950c-07eeb1c6544e" CreationDate="2010-08-23T08:37:00.770" UserId="115" Text="2D Level design/editing/saving questions. " />
  <row Id="6049" PostHistoryTypeId="3" PostId="3107" RevisionGUID="688e84e7-63fd-4475-950c-07eeb1c6544e" CreationDate="2010-08-23T08:37:00.770" UserId="115" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;level-design&gt;&lt;tiles&gt;" />
  <row Id="6050" PostHistoryTypeId="2" PostId="3108" RevisionGUID="38550c14-aaa1-4718-b159-79abd12c26ae" CreationDate="2010-08-23T10:21:13.480" UserId="1557" Text="A common way could be to just a string for example&#xD;&#xA;&#xD;&#xA;0,0,0,0,0,0,1,1,1,0,0,0,2&#xD;&#xA;&#xD;&#xA;where 0 would be a block you can walk on&#xD;&#xA;1 could be spikes and 2 could be the finish line&#xD;&#xA;&#xD;&#xA;you would simply read this in through a text file (or have it hardcoded into the game) and draw the relative block that is associated to the number and have your colision logic to handle however it is setup.&#xD;&#xA;&#xD;&#xA;Obviously you can choose whatever format you want and perhaps 0 means draw 5 walkable blocks.&#xD;&#xA;&#xD;&#xA;This is just one way it could be achieved.&#xD;&#xA;&#xD;&#xA;http://www.smudgedcat.com/tut_tiledlevel.html&#xD;&#xA;this link is of an example within c# using the XNA framework. it will give you a rough idea (it does NOT contain slopes, but a similar thing could be used to define this type of case)&#xD;&#xA;&#xD;&#xA;Regards&#xD;&#xA;Mark&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6051" PostHistoryTypeId="2" PostId="3109" RevisionGUID="2cd2f9a8-cb01-4c35-8b17-0129fb83be99" CreationDate="2010-08-23T11:27:17.293" UserId="450" Text="For an 2D MMO we use http://www.mapeditor.org/. We use several layers for background, background decoration, objects on the same level as the players and objects in front of the player. And an additional layer with just one red square to mark collisions.&#xD;&#xA;&#xD;&#xA;I am not sure if this appoach or the software works out for an 2D side scroller but it may be worth to have a look at it." />
  <row Id="6052" PostHistoryTypeId="2" PostId="3110" RevisionGUID="49b52a17-30d3-4681-a919-b75f22397063" CreationDate="2010-08-23T11:52:46.143" UserId="1850" Text="I'm trying to write some code to do post processing in OpenGL ES2 on the iPhone. All is fine an dandy, except I am having trouble working out how to scale the texture rendered in the rendering step, such that it ends up pixel-aligned to the final image displayed on the screen.&#xD;&#xA;&#xD;&#xA;I'm using a 512x512 texture, as provided by Apple's Texture2D class, to store my off screen rendering, and then mapping that onto a quad and rendering to cover the whole screen. The thing ends up taking up half of the screen vertically, more than the width of the screen, and is positioned about 2/3rds of the way down. &#xD;&#xA;Here's my setup:&#xD;&#xA;&#xD;&#xA;			// Create render to texture targets&#xD;&#xA;			for (int i = 0; i &lt; 2; i++)&#xD;&#xA;			{&#xD;&#xA;				textures[i] = [[Texture2D alloc] initWithData:0 &#xD;&#xA;										 pixelFormat:kTexture2DPixelFormat_RGBA8888&#xD;&#xA;										 pixelsWide:512&#xD;&#xA;										 pixelsHigh:512&#xD;&#xA;										 contentSize:CGSizeMake(512, 512)];&#xD;&#xA;&#xD;&#xA;				// create framebuffer&#xD;&#xA;				glGenFramebuffers(1, &amp;textureFrameBuffers[i]);&#xD;&#xA;				glBindFramebuffer(GL_FRAMEBUFFER, textureFrameBuffers[i]);&#xD;&#xA;&#xD;&#xA;				// attach renderbuffer&#xD;&#xA;				glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textures[i].name, 0);&#xD;&#xA;&#xD;&#xA;				// unbind frame buffer&#xD;&#xA;				glBindFramebuffer(GL_FRAMEBUFFER, 0);		&#xD;&#xA;			}&#xD;&#xA;			// Setup our render to texture quad&#xD;&#xA;			// Screen bounds are usually -1 to 1 on both axis, but we &#xD;&#xA;			// multiply 'y' coords by (2.0/3.0) in the vertex shader so that we&#xD;&#xA;			// get to use a square coordinate system that matches the screen ratio.&#xD;&#xA;			float xSize = 1.0f;&#xD;&#xA;			float ySize = 1.5f;&#xD;&#xA;			quadPoints[0] = -xSize;&#xD;&#xA;			quadPoints[1] =	-ySize;&#xD;&#xA;			quadPoints[2] = -xSize;&#xD;&#xA;			quadPoints[3] = ySize;&#xD;&#xA;			quadPoints[4] = xSize;&#xD;&#xA;			quadPoints[5] = -ySize;&#xD;&#xA;			quadPoints[6] =	xSize;&#xD;&#xA;			quadPoints[7] =	ySize;&#xD;&#xA;&#xD;&#xA;I'm doing ping pong rendering, hence the 2 offscreen targets. I've tried fiddling with xSize and ySize to make the thing stretch out beyond the bounds of the screen, such that the texture aligns properly, but can't seem to get it right.&#xD;&#xA;&#xD;&#xA;To render with a single post processing step, I do&#xD;&#xA;&#xD;&#xA;    	&#xD;&#xA;    // Bind to first offscreen framebuffer&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER, textureFrameBuffers[0]);&#xD;&#xA;    glViewport(0, 0, backingWidth, backingHeight);&#xD;&#xA;    &#xD;&#xA;    // Render scene&#xD;&#xA;    &#xD;&#xA;    // Bind to the screen framebuffer, and render the previously generated texture through our&#xD;&#xA;    // post processing shaders.&#xD;&#xA;    GLuint currentProgram = [[postProcessPrograms objectAtIndex:i] intValue];&#xD;&#xA;    glUseProgram(currentProgram);&#xD;&#xA;    GLuint sourceTexture = (i % 2 == 0)? textures[0].name : textures[1].name;&#xD;&#xA;    // Render the texture&#xD;&#xA;    glClearColor(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;    glEnableVertexAttribArray(ATTRIB_VERTEX);&#xD;&#xA;    glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, quadPoints);&#xD;&#xA;    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;  &#xD;&#xA;    // Show our buffer&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);&#xD;&#xA;    [context presentRenderbuffer:GL_RENDERBUFFER];&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any help would be great - I feel like i'm missing something obvious!&#xD;&#xA;" />
  <row Id="6053" PostHistoryTypeId="1" PostId="3110" RevisionGUID="49b52a17-30d3-4681-a919-b75f22397063" CreationDate="2010-08-23T11:52:46.143" UserId="1850" Text="Post processing texture sizes" />
  <row Id="6054" PostHistoryTypeId="3" PostId="3110" RevisionGUID="49b52a17-30d3-4681-a919-b75f22397063" CreationDate="2010-08-23T11:52:46.143" UserId="1850" Text="&lt;opengl&gt;&lt;iphone&gt;&lt;rendering&gt;&lt;opengl-es&gt;" />
  <row Id="6055" PostHistoryTypeId="2" PostId="3111" RevisionGUID="a55c8429-3f0f-4375-8283-df9e5f86aa1e" CreationDate="2010-08-23T12:20:30.530" UserId="1156" Text="The 'professional' methods would probably involve a very detailed map editor, probably in C#, which would give them full control over everything. &#xD;&#xA;&#xD;&#xA;There are two main approaches; one is easier to do, but not as effective.&#xD;&#xA;&#xD;&#xA; - You could use a map editor; either writing your own or finding a pre-existing one such as mapeditor which nhnb mentioned. Writing your own would be good for a learning experience, but not so much for a finished product.&#xD;&#xA; - You could just type data into a text file. This is simpler, but it's not easy to read again. You could probably get the same from the map editor, but that would be automated. The downside again of this is that you can't add any special effects such as certain tiles (not tile **types**, but tile (13,45) for example) to do special things." />
  <row Id="6056" PostHistoryTypeId="6" PostId="3107" RevisionGUID="0f1fd620-7211-4b4e-9aa8-613490d8f977" CreationDate="2010-08-23T12:21:04.583" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;level-design&gt;&lt;tiles&gt;&lt;maps&gt;" />
  <row Id="6057" PostHistoryTypeId="2" PostId="3112" RevisionGUID="5abd1f88-288b-4117-9aa0-9fd1daa8a68e" CreationDate="2010-08-23T12:34:08.503" UserId="500" Text="1. I seriously don't see a lot which couldn't be done with MaterialEditor. You can do almost everything that you need. One could argue that the material-editor isn't generating optimal shader-code, but the shader-compiler does a great job in optimizing the autogenerated code here. So, just try it. A lot of AAA games were developed with this toolchain and a lot of these just worked completely with materials built whith this editor.&#xD;&#xA;&#xD;&#xA;2. UE3 does not use deferred rendering at all.&#xD;&#xA;&#xD;&#xA;3. You should take a look at the SceneCaptureActors. These can be used for render-to-texture stuff, but I'm not sure how much tuning possibilites you have for the out-of-the box UDK actors. You than can use this rendered texture in a material.&#xD;&#xA;&#xD;&#xA;In my opinion there isn't a lot that you can't do with the UE3 rendering-wise. The drag-and-drop material editing and the level-editor centric design might be not what a programmer expects, but it is exactly what content-guys are needing. This has proven itself as a really good solution at the end of the day. This of course requires that the content creators know the system and it's limitations.&#xD;&#xA;&#xD;&#xA;You should just give it a shot and try to build what you need using the tools the UDK provides. I am very positive that you will be able to get what you want." />
  <row Id="6058" PostHistoryTypeId="2" PostId="3113" RevisionGUID="8ded88e4-da66-4cae-ac43-62192de649be" CreationDate="2010-08-23T12:54:33.487" UserId="1851" Text="I am looking for free Sudoku games in text format:&#xD;&#xA;&#xD;&#xA;    200000060000075030048090100000300000300010009000008000001020570080730000090000004&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Tried googling with a bit success:&#xD;&#xA;&#xD;&#xA;http://www.setbb.com/phpbb/viewtopic.php?mforum=sudoku&amp;p=5758&#xD;&#xA;http://mapleta.maths.uwa.edu.au/~gordon/sudokumin.php&#xD;&#xA;&#xD;&#xA;I would like some with a 6x6 grid.&#xD;&#xA;Links please.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6059" PostHistoryTypeId="1" PostId="3113" RevisionGUID="8ded88e4-da66-4cae-ac43-62192de649be" CreationDate="2010-08-23T12:54:33.487" UserId="1851" Text="Sudoku games in text format" />
  <row Id="6060" PostHistoryTypeId="3" PostId="3113" RevisionGUID="8ded88e4-da66-4cae-ac43-62192de649be" CreationDate="2010-08-23T12:54:33.487" UserId="1851" Text="&lt;input&gt;" />
  <row Id="6061" PostHistoryTypeId="2" PostId="3114" RevisionGUID="b834b067-56a9-4119-9372-853dbb660e0d" CreationDate="2010-08-23T13:12:41.750" UserId="1779" Text="After seeing the comments on selling an idea to developer for a game, the general concencus is that without a game, or atleast a demo, it’s not going to happen. So…someone (yes, Noctrine, I am looking at you) suggested that it might me an interesting idea to turn it into a “public” project. &#xD;&#xA;&#xD;&#xA;A few people have asked if I minded if they turned some of my concepts into models, something I always have agreed on. They tell me that it would be to use as work for their portfolio or for practice. Still waiting on those, but that is another story. &#xD;&#xA;&#xD;&#xA;If I do this, set up a group to help starting modelers and programmers practice or get stuff for their portfolio, after everything is said and done, who has ownership of the project. I ask in case we end up with an actual demo and a studio get’s interested. Who do they buy it from?&#xD;&#xA;&#xD;&#xA;I have no issue with paying accordingly to all participants, but in the legal aspect, who owns it before a publisher buys it?&#xD;&#xA;" />
  <row Id="6062" PostHistoryTypeId="1" PostId="3114" RevisionGUID="b834b067-56a9-4119-9372-853dbb660e0d" CreationDate="2010-08-23T13:12:41.750" UserId="1779" Text="Who has ownership of publicly developed projects?" />
  <row Id="6063" PostHistoryTypeId="3" PostId="3114" RevisionGUID="b834b067-56a9-4119-9372-853dbb660e0d" CreationDate="2010-08-23T13:12:41.750" UserId="1779" Text="&lt;game-design&gt;&lt;open-source&gt;&lt;legal&gt;" />
  <row Id="6064" PostHistoryTypeId="2" PostId="3115" RevisionGUID="c0e45a37-6e23-4d25-b256-41ec39b02e6b" CreationDate="2010-08-23T13:24:18.700" UserId="1557" Text="Dont forget you can also write a press release, there are many sites out there that let you publish them for free, then many companies have the chance of seeing your press release. &#xD;&#xA;&#xD;&#xA;Also send out free copies to review sites or lone reviews (individuals) If they like your game they may put it up and if you get lucky and get onto something like kotaku.com your sales could be greatly improved.&#xD;&#xA;&#xD;&#xA;Regards&#xD;&#xA;&#xD;&#xA;Mark" />
  <row Id="6065" PostHistoryTypeId="16" PostId="3115" RevisionGUID="c0e45a37-6e23-4d25-b256-41ec39b02e6b" CreationDate="2010-08-23T13:24:18.700" UserId="-1" />
  <row Id="6066" PostHistoryTypeId="2" PostId="3116" RevisionGUID="fc4dfc34-28ce-42b5-bc00-4342d1af0c3a" CreationDate="2010-08-23T13:24:38.573" UserId="14" Text="Atleast in the United States, without a formal transfer of copyright each developer would own the work that they do. This is usually accomplished in the Employment Contract when you are hired by a company: &#xD;&#xA;&#xD;&#xA;See [Works made for hire][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Work_made_for_hire" />
  <row Id="6067" PostHistoryTypeId="10" PostId="3113" RevisionGUID="f43f9490-2755-406d-8481-8b5421e6ab7f" CreationDate="2010-08-23T13:27:43.403" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="6068" PostHistoryTypeId="2" PostId="3117" RevisionGUID="b754042d-b48a-4710-91e7-9e2b24e3c17e" CreationDate="2010-08-23T14:32:19.217" UserId="93" Text="I asked pretty much [this question on Stackoverflow][1] a while back. The conclusion was that it is quite a bit slower than a C++ virtual function call (which is what I'd compare it to rather than a C function call which is much faster still) and the compiler cannot inline them, but you shouldn't worry about it unless you have a perf problem.&#xD;&#xA;&#xD;&#xA;Remember that Cocoa Touch is using Obj-C message dispatch to do all the communication of events within the user interface of the whole iPhone as well as for setting properties when it repositions a UIView during a scroll. So clearly it's not a holdup for realtime animation, but I'm not as sanguine about it as some Cocoa fans. I wouldn't, for example, have a particle system with each particle implemented as an Obj-C object, whereas I'd be happy to implement each as a C++ object (although without virtual functions because they wouldn't be needed). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/907843/cost-of-message-dispatch-in-objective-c" />
  <row Id="6069" PostHistoryTypeId="5" PostId="3031" RevisionGUID="2f0234e3-9bce-49dd-b3e8-bc4bea796e50" CreationDate="2010-08-23T14:51:43.140" UserId="1101" Comment="clarified that 2D animations come in sheets or files; 3D ones don't tend to come in sprite sheets..." Text="Communicating your artistic goals is often not the problem. If you show him or her several examples of the sort of style you mean, along with some commentary on what you like (or don't like) about them, a good artist will usually be able to get the rough idea of what you want, and talk through the details with you.&#xD;&#xA;&#xD;&#xA;Usually the problem is communicating the technical goals. These include polygon or vertex limits, texture sizes, the use of texture maps for specular/diffuse/bump/normal/etc (ie. which of these you support), different types of asset budget (eg. for the whole download, for a given level, for any one visible scene, for one model), the way your GUI is skinned, how 2D animations should be packaged (sheets or files), cursor/HUD/sprite sizes, the scale of the models (often 1 unit = 1 metre, but not always), the rotation of the models (which axis is 'forward'?), what the typical lighting will be like, etc.&#xD;&#xA;&#xD;&#xA;The more of these you can fix or automate with tooling, the better. But as an indie programmer, your resources will be limited, so instead you will most likely have to resort to clear and unambiguous communication." />
  <row Id="6070" PostHistoryTypeId="2" PostId="3118" RevisionGUID="27b670b1-b896-4c21-a0fd-4bec806e5f70" CreationDate="2010-08-23T15:04:38.140" UserId="1101" Text="The **restrict** keyword is potentially handy, especially in cases where you need to manipulate objects with pointers. It allows the compiler to assume the pointed-to object is not going to get modified in any other way which in turn allows it to perform more aggressive optimisation such as keeping parts of the object in registers or reordering reads and writes more effectively.&#xD;&#xA;&#xD;&#xA;One good thing about the keyword is that it's a hint which you can apply once and see benefits from without rearranging your algorithm. The bad side is that if you use it in the wrong place, you might see data corruption. But usually it's quite easy to spot where it's legitimate to use it - it's one of the few examples where the programmer can reasonably be expected to know more than the compiler can safely assume, which is why the keyword has been introduced.&#xD;&#xA;&#xD;&#xA;Technically 'restrict' doesn't exist in standard C++, but platform-specific equivalents are available for most C++ compilers, so it's worth considering.&#xD;&#xA;&#xD;&#xA;See also: http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html" />
  <row Id="6071" PostHistoryTypeId="16" PostId="3118" RevisionGUID="27b670b1-b896-4c21-a0fd-4bec806e5f70" CreationDate="2010-08-23T15:04:38.140" UserId="-1" />
  <row Id="6072" PostHistoryTypeId="2" PostId="3119" RevisionGUID="c195e9d9-4110-40c9-b9f9-83576fe82631" CreationDate="2010-08-23T15:10:49.560" UserId="1856" Text="I think you might have been a bit inaccurate in your description of the problem. It sounds like you are calling this function 60Hz. That is 60 times per second. But given that it updates a position, I assume what you mean is it gets called 60 x number_of_game_objects times per second at least. So it depends on number of objects which you update position of.&#xD;&#xA;&#xD;&#xA;Also remember that most of the performance hit is likely due to lack of inlining and cache misses. That will not show up in your profiler as **objc_msgSend** taking up a lot of time, because the other instructions will be slowed down due to cache misses. A more [Data Oriented Design][1] could reduce these problems. E.g. if your Objective-C methods handle collections of objects rather than single objects. E.g. your update method could update several positions instead of just one.&#xD;&#xA;&#xD;&#xA;To be fair I don't think your particular example would be a problem performance wise, but in my case I have to simulate that objects move down multiple paths each frame to find an optimal tactical path. Then these kind of update methods gets called a lot of times per frame, and need to be as fast as possible.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/great-presentation-on-data-oriented-design" />
  <row Id="6073" PostHistoryTypeId="2" PostId="3120" RevisionGUID="164651b4-184f-476d-bdc4-0383a9331099" CreationDate="2010-08-23T15:15:09.323" UserId="1101" Text="Generally, if a work features contributions from more than one person and is a generally indivisible whole, joint copyright exists. This means any one of those people can veto copying of the work, which is often not what you want.&#xD;&#xA;&#xD;&#xA;For this reason, it's best to explicitly state that this will not be the case, via some sort of agreement. eg. Along the lines of, &quot;I grant the project and future users of the project a perpetual and non-exclusive right to use my contributions as part of this work.&quot; But that makes no provision for payment either. If you want people to contribute work in exchange for actual or potential payment then you'll need to write that in as well." />
  <row Id="6074" PostHistoryTypeId="5" PostId="3116" RevisionGUID="ed48ce30-c628-45b5-9396-bd1cb3312fca" CreationDate="2010-08-23T15:20:01.350" UserId="14" Comment="added 44 characters in body" Text="**I-am-not-a-lawyer** but, my two-cents.&#xD;&#xA;&#xD;&#xA;Atleast in the United States, without a formal transfer of copyright each developer would own the work that they do. This is usually accomplished in the Employment Contract when you are hired by a company: &#xD;&#xA;&#xD;&#xA;See [Works made for hire][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Work_made_for_hire" />
  <row Id="6075" PostHistoryTypeId="2" PostId="3121" RevisionGUID="06da1ba1-ec7b-4c05-bcc2-49c2056e7c99" CreationDate="2010-08-23T15:39:48.777" UserId="1856" Text="I am rewriting a 2D game engine written in C++ and Lua into C and Lua. So far the experience have been quite good. Obviously doing vector and matrix operations don't end up as nice looking in C. But apart from that I have found the experience quite refreshing after spending 10+ years as a C++ developer. &#xD;&#xA;&#xD;&#xA;C has a number of advantages over C++:&#xD;&#xA;&#xD;&#xA; 1. The compiler will make sure that no code is run at static initialization time. That makes it completely safe to statically allocate global data like strings used as keys e.g.&#xD;&#xA; 2. Transparency. In C assignment or allocating or defining a variable is not going to cause loads of code to run. C++ will auto generate copy constructors for you so you have less control over what gets executed when doing assignment.&#xD;&#xA; 3. A lot of debugging **can** be easier to due to not getting function names mangled&#xD;&#xA; 4. It is usually okay to use **memcpy** in C, but it will easy cause trouble in C++, because copy constructors will not be run. Given that **memcpy** is a lot faster than **std::copy** that matters.&#xD;&#xA;&#xD;&#xA;Apart from that there are a number of advantages to getting into the C way of thinking. In C++ I often find myself making things a bit overgeneralized and abstract. In C I usually cut out things like get-set methods and often preallocate fixed sized arrays rather than use dynamic arrays. Often I end up with shorter and more easily debugged code in C. The data structures are usually flatter and easier to view in a debugger.&#xD;&#xA;&#xD;&#xA;To be fair I would never make an app exclusively in C. The reason it works it that I combine it with a higher level language like Lua which can complement C very well, were C is not so strong.&#xD;&#xA;&#xD;&#xA;Id software writes most of their engines in C I believe, you can look at [Return to castle Wolfenstein][1] which was written in C.&#xD;&#xA;&#xD;&#xA;I wrote about some of my experience on [scalability of C vs C++][2] and [downsides of STL vector compared to plain arrays.][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: ftp://ftp.idsoftware.com/idstuff/source/RTCW-SP-GPL.zip&#xD;&#xA;  [2]: http://assoc.tumblr.com/post/793449265/how-a-c-program-naturally-scales-better-than-a-c&#xD;&#xA;  [3]: http://assoc.tumblr.com/post/459536318/weakness-of-stl-over-plain-c-types" />
  <row Id="6076" PostHistoryTypeId="2" PostId="3122" RevisionGUID="317db26a-31ef-4641-98fe-16fc3a110914" CreationDate="2010-08-23T15:41:21.193" UserId="836" Text="What noctrine said. But if you aren't an employee, anything you write is covered by copyright.  Software is transfered when you grant a license to the users.&#xD;&#xA;&#xD;&#xA;When there isn't a license, it's like having a verbal contract-- sometimes possible to enforce, sometimes not, and who know what the terms are or how the court might treat it. &#xD;&#xA;&#xD;&#xA;So you will want to read your contracts and licenses, and if they don't exist, get your collaborators to set them up.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6077" PostHistoryTypeId="2" PostId="3123" RevisionGUID="7bdd724c-b724-47bb-ab7e-7ec2c6c88e0f" CreationDate="2010-08-23T17:08:18.273" UserId="1856" Text="Why not use a game engine like [Unity3d][1]? It is very well known for being easy to use and with great documentation. I tried it out briefly myself and was impressed by how well documented everything was the API and a number of good tutorials. I had problems with my arm and some stage and had to get help from my wife. She has no clue about programming but thought Unity3D was really cool. You can accomplish a lot from just drag and drop. You can use several script languages with the engine. It support JavaScript among other things, which I guess given you background should be attractive. You can get a free version with all the features a beginning game developer would need. &#xD;&#xA;&#xD;&#xA;If you **don't need 3D,** then [GameMaker][2] is a great alternative. It is really easy to get into and make games. I used it at University  and made a couple of games with it. Great fun. It lets you really concentrate on making the game and you don't have to think so much about technology. You can put together a game entirely with just point and click. But as you progress and understand how it all works you start writing your own scripts.&#xD;&#xA;&#xD;&#xA;In my opinion it works a lot better than say GameSalad which has no script language. As soon as you start doing more complicated stuff, it gets really annoying with only point and click I think.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/&#xD;&#xA;  [2]: http://www.gamemaker.nl/" />
  <row Id="6078" PostHistoryTypeId="2" PostId="3124" RevisionGUID="d38f9296-8255-4b56-8cd3-8057c5119036" CreationDate="2010-08-23T18:16:18.990" UserId="1413" Text="I can't remember the project, but I know one open source project managed to give all ownership of code over to the original devs by having certain terms and conditions that took effect whenever someone committed code to the source control repository. In that case, there was a big uproar when those devs ended up selling said source to a commercial company, and all the tens of contributing devs got nothing. I'm pretty sure this is a viable strategy as well, but I would make any contributing member aware of whatever terms you are putting forth, to avoid bad blood getting developed...&#xD;&#xA;&#xD;&#xA;(also IANAL)" />
  <row Id="6079" PostHistoryTypeId="2" PostId="3125" RevisionGUID="af5212a8-50dd-4030-bd24-6bce489401c0" CreationDate="2010-08-23T18:33:58.440" UserId="1860" Text="I'm working on a game that uses Flash for the user interface. I'm running into an odd issue with the origin of a library movie clip. Here are the steps to reproduce:&#xD;&#xA;&#xD;&#xA;1. Create a new MovieClip and construct a single rectangle with both a fill and a stroke. &#xD;&#xA;2. Set position of rectangle to (0,0) and notice that the origin is at the center of the border stroke surrounding the rectangle. &#xD;&#xA;3. Change position of rectangle accordingly so that the origin is truly the top left (so if the stroke surrounding the rectangle was set to 10, adjust the position of the rectangle to 5,5.&#xD;&#xA;4. Enable 9 slice for movie clip so that when you scale the rectangle it doesn't scale or distort the stroke surrounding the rectangle.&#xD;&#xA;5. Drag an instance of the movie clip to the stage and use the free transform tool to scale it to the width of the stage. It should visibly be as wide as the stage.&#xD;&#xA;6. Run the flash file and verify that the width during execution is not as wide as it was in design view.&#xD;&#xA;&#xD;&#xA;So in a nutshell it seems that when you use the free transform tool, it distorts the origin even though 9 slice is enabled and it shouldn't (I would think). I understand that Flash denotes the center of a stroke to be the starting point and not the edge, which is why I adjusted the origin accordingly while editing the movie clip. &#xD;&#xA;&#xD;&#xA;What I really need here is pixel perfect positioning for vector based components. I should be able to drag and drop a library movieclip that provides a window with a fancy border around it and scale it to whatever size I need, and place it where I need it to be without any odd positioning problems. &#xD;&#xA;&#xD;&#xA;Here are some screenshots of the problem:&#xD;&#xA;&#xD;&#xA;( i.imgur.com/8WU2F.png ) is a shot of my window with 9 slice enabled. You can see that the origin is correct being the top left of the window graphic.&#xD;&#xA;&#xD;&#xA;( i.imgur.com/ciK8l.png ) is a shot of my window after using free transform to scale it to the width of the stage. It's pretty much perfect in design view&#xD;&#xA;&#xD;&#xA;( i.imgur.com/QFUiJ.png ) is a shot of the flash application running. Notice that the window is no longer the width of the stage? I don't get it. It makes it very difficult to position because in order to get this to look right while executing, I have to make the window wider than the stage in design mode. &#xD;&#xA;&#xD;&#xA;Any help is greatly appreciated. I'm sure it's something silly. This is pretty much bread and butter stuff that's been around since the early days of flash.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6080" PostHistoryTypeId="1" PostId="3125" RevisionGUID="af5212a8-50dd-4030-bd24-6bce489401c0" CreationDate="2010-08-23T18:33:58.440" UserId="1860" Text="Flash Origin Problem with Movie Clips" />
  <row Id="6081" PostHistoryTypeId="3" PostId="3125" RevisionGUID="af5212a8-50dd-4030-bd24-6bce489401c0" CreationDate="2010-08-23T18:33:58.440" UserId="1860" Text="&lt;flash&gt;" />
  <row Id="6082" PostHistoryTypeId="2" PostId="3126" RevisionGUID="cfabb321-f5c0-46a3-9a69-1b060514fc4f" CreationDate="2010-08-23T18:41:33.183" UserId="162" Text="One thing you can do to make conversation more &quot;AI-Like&quot; is to combine your scripts into a greater system. For an individual interaction between characters a script with variables, as described by Ian, is as good a solution as anything involving &quot;real&quot; AI.&#xD;&#xA;&#xD;&#xA;But, the way you kick off and transition between these conversations can definitely use &quot;real&quot; AI. For instance, you can model a character's schedule so they go about their lives according to a set of priorities. Then, if an individual character comes into contact with another character, you have a system that evaluates rather they would talk, based on shared history or other factors. This can be as complicated as you would like and there's no need to pre-script the meta-conversations. But, as soon as you drop into an actual conversation you're better off going with something prescripted." />
  <row Id="6083" PostHistoryTypeId="2" PostId="3127" RevisionGUID="6f577edd-81a5-4112-9fd3-634e7808b456" CreationDate="2010-08-23T18:45:24.033" UserId="162" Text="When you're setting up any invite beta, you have to remember about geographic distribution. Even on a commerically launched online game like an MMO, the peak concurrency differs VERY heavily from average concurrency. If you want to get to a higher level of concurrency you may consider specifying specific &quot;testing periods&quot; during the day when things are open. You can do it with soft restrictions by just reminding people to play during certain time periods, or you can actually disable the servers during off times. This can help raise your max concurrency.&#xD;&#xA;&#xD;&#xA;As for the ratio, I would say getting 5% of invitees to play at a time is a reasonably decent total. Many, many people will sign up for betas, play 5 minutes, and never play again. I would actually pick right around 5% as a ballpark for expected concurrency for a closed beta." />
  <row Id="6084" PostHistoryTypeId="2" PostId="3128" RevisionGUID="65180b1e-bfea-4c16-b661-81580d3321d6" CreationDate="2010-08-23T18:50:30.250" UserId="162" Text="The correct solution is often a combination of the two methods you discuss:&#xD;&#xA;&#xD;&#xA;For gameplay functionality with a predefined set of keys, polling every frame is completely appropriate and you should only poll for keys that are actually bound to something. This is actually analogous to how you would query controller input in a console game, it's going to be entirely polling especially when it comes to analog input devices. During general gameplay you probably want to ignore keypress events and just use polling.&#xD;&#xA;&#xD;&#xA;When it comes to typing input for things like names you should switch the game into a different input handling mode. For instance, as soon as a &quot;enter your name&quot; prompt comes up, you can modify what you're input code does. It can either listen for key press events via some callback interface, or you can start polling for each key if required. It turns out that typically during typing events you don't care as much about performance anyway, so polling won't be that bad.&#xD;&#xA;&#xD;&#xA;So, you want to use selective polling for gameplay input, and event handling for name typing inputs (or all keyboard polling if event handling is not available)." />
  <row Id="6085" PostHistoryTypeId="5" PostId="3082" RevisionGUID="3cfa94c9-2889-482b-b8e5-f3f8c9376225" CreationDate="2010-08-23T19:22:58.827" UserId="1628" Comment="added 285 characters in body" Text="I've got a renderbuffer (DepthStencil) in an FBO and I need to get a texture from it. I can't have both a DepthComponent texture and a DepthStencil renderbuffer in the FBO, it seems, so I need some way to convert the renderbuffer to a DepthComponent texture after I'm done with it for use later down the pipeline.&#xD;&#xA;&#xD;&#xA;I've tried plenty of techniques to grab the depth component from the renderbuffer for weeks but I always come out with junk. All I want at the end is the same texture I'd get from an FBO if I wasn't using a renderbuffer. Can anyone post some comprehensive instructions or code that covers this seemingly simple operation?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Linky to an extract version of the code&#xD;&#xA;http://dl.dropbox.com/u/9279501/fbo.cs&#xD;&#xA;&#xD;&#xA;Screeny of the Depth of Field effect + FBO - without depth(!)&#xD;&#xA;http://i.stack.imgur.com/Hj9Oe.jpg&#xD;&#xA;&#xD;&#xA;Screeny without Depth of Field effect + FBO - depth working fine&#xD;&#xA;http://i.stack.imgur.com/boOm1.jpg" />
  <row Id="6086" PostHistoryTypeId="5" PostId="637" RevisionGUID="0176b84f-fecc-4a4f-ba11-c1cce82f5fa2" CreationDate="2010-08-23T20:41:14.097" UserId="160" Comment="edited body" Text="3D is an order of magnitude harder than 2D:&#xD;&#xA;&#xD;&#xA;**Programming:**&#xD;&#xA;&#xD;&#xA;* **The math is significantly more complex** for rendering, physics, collision, etc. Hope you like matrices and vectors!&#xD;&#xA;* Because of the previous point, **good performance is much more difficult to attain**. With today's hardware, you can make a nice-looking 2D game without having to think about performance at all beyond not being actively stupid. With 3D, you will have to do some optimization.&#xD;&#xA;* **The data structures are much more complex.** Because of the previous point, you'll need to think about culling, space partitioning, etc. all of which are more challenging then a simple &quot;here's a list of everything in the level&quot;.&#xD;&#xA;* **Animation is much more complicated.** Animation in 2D is just a filmstrip of frames with possibly different positions for each frame. With 3D, you'll need to deal with separate animation assets, bones, skinning, etc.&#xD;&#xA;* **The volume of data is much higher.** You'll have to do intelligent resource management. Games ship with gigs of content, but consoles sure as hell don't have gigs of memory.&#xD;&#xA;* **The pipelines are more complex to develop and maintain.** You'll need code to get assets into your engine's preferred format. That code doesn't write itself.&#xD;&#xA;&#xD;&#xA;**Art:**&#xD;&#xA;&#xD;&#xA;* **The assets are, of course, much more complex.** You'll need textures, models, rigs/skeletons, animation, etc. The tools are much more complex and expensive, and the skills to use them harder to find.&#xD;&#xA;* **The set of skills needed is wider.** Good animators aren't often good texture artists. Good lighters may not be good riggers.&#xD;&#xA;* **The dependencies between the assets are more complex.** With 2D, you can partition your assets across different artists cleanly: this guy does level one, this guy does enemies, etc. With 3D, the animation affects the rig which affects the skeleton which affects the model which affects the textures which affect the lighting... Your art team will have to coordinate carefully and constantly.&#xD;&#xA;* **The technical limitations are more complex to deal with.** With 2D it's basically &quot;here's your palette and your max sprite size&quot;. With 3D, your artists will have to balance texture size (for multiple textures: specular, color, normal, etc.), polygon count, keyframe count, bone count, etc. The particulars of the engine will place random weird requirements on them (&quot;Engine X blows up if you have more than 23 bones!&quot;).&#xD;&#xA;* **Asset processing takes longer.** Pipelines to convert 3D assets to game-ready format are complex, slow, and often buggy. This makes it take much longer for artists to see their changes in game, which slows them down.&#xD;&#xA;&#xD;&#xA;**Design:**&#xD;&#xA;&#xD;&#xA;* **User input is bitch.** You have to deal with camera tracking, converting user input into the character's space intuitively, projecting 2D selections into world space, etc.&#xD;&#xA;* **Levels are hard to author.** Your level designers basically need the skills of a game designer and an architect. They have to take into account players getting lost, visibility, etc. when building levels.&#xD;&#xA;* **Level physics is tedious to author.** You'll have to check and recheck and recheck again to make sure there aren't gaps and bugs in the level physics where players can get stuck or fall through the world.&#xD;&#xA;* **Tools are much harder.** Most games need their own tools for authoring things like levels. Since the content is so much more complex, the tools are more work to create. That usually results in tools that are buggier, incomplete, and harder to use.&#xD;&#xA;" />
  <row Id="6087" PostHistoryTypeId="2" PostId="3129" RevisionGUID="d82543ba-3b52-41f3-8b43-b19dbe4dbc21" CreationDate="2010-08-23T20:55:39.373" UserId="1862" Text="For the loading screens in [Conquest][1], I went with a little bit of mission description (what game type it was, as well as a little bit of storyline for the mission), and some basic help on the commands.&#xD;&#xA;&#xD;&#xA;In the background, I was loading sounds.  The graphics were all loaded on demand, and that seemed to work pretty well for our game, but sounds were a bear, so I preloaded all of the sounds needed for the mission.  The Loading/Start button is disabled until everything's loaded, but I don't have any type of animation (which would be a good thing to add).&#xD;&#xA;&#xD;&#xA;This is our first game, so we're still learning a lot, but this has worked out OK for us so far.&#xD;&#xA;&#xD;&#xA;![Conquest's loading screen][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.exomorph.com/&#xD;&#xA;  [2]: http://i.stack.imgur.com/ZPLEj.jpg" />
  <row Id="6088" PostHistoryTypeId="2" PostId="3130" RevisionGUID="d6171556-e8f1-4b23-a0e8-8f8597e649ba" CreationDate="2010-08-23T23:15:53.233" UserId="1232" Text="It's a bit tricky to tell exactly without seeing your shader, but there are a couple of things you may be able to do differently:&#xD;&#xA;&#xD;&#xA;* Use scale AND bias to control the rendering In effect, this becomes:&#xD;&#xA;&#xD;&#xA;        float xSize = 1.0f;&#xD;&#xA;        float ySize = 1.5f;&#xD;&#xA;        float xBias = 0.0f;&#xD;&#xA;        float yBias = 0.5f; // use whatever works, or figure it out analytically.&#xD;&#xA;        quadPoints[0] = -xSize + xBias;&#xD;&#xA;        quadPoints[1] = -ySize + yBias;&#xD;&#xA;        quadPoints[2] = -xSize + xBias;&#xD;&#xA;        quadPoints[3] = ySize + yBias;&#xD;&#xA;        quadPoints[4] = xSize + xBias;&#xD;&#xA;        quadPoints[5] = -ySize + yBias;&#xD;&#xA;        quadPoints[6] = xSize + xBias;&#xD;&#xA;        quadPoints[7] = ySize + yBias;&#xD;&#xA;(play with bias to see how it affects your image)&#xD;&#xA;&#xD;&#xA;* Use texture coordinates to control where on the texture each point in your quad is anchored to. You can specify them in a separate array called texCoords like this:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  texCoords[0] = 0.0f;  // (0,0)&#xD;&#xA;  texCoords[1] = 0.0f;&#xD;&#xA;  texCoords[2] = 0.0f;  // (0,1)&#xD;&#xA;  texCoords[3] = 1.0f;&#xD;&#xA;  texCoords[4] = 1.0f;  // (1,0)&#xD;&#xA;  texCoords[5] = 0.0f;&#xD;&#xA;  texCoords[6] = 1.0f;  // (1,1)&#xD;&#xA;  texCoords[7] = 1.0f;&#xD;&#xA;  glEnableVertexAttribArray(ATTRIB_TEXCOORD)&#xD;&#xA;  glVertexAttribPointer(ATTRIB_TEXCOORD, 2, GL_FLOAT, 0, sizeof(float)*2, texCoords);&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;.. or you can interleave them in your quadPoints array." />
  <row Id="6089" PostHistoryTypeId="2" PostId="3131" RevisionGUID="c3f9c755-f2f6-4369-90bc-3e23a4468f39" CreationDate="2010-08-23T23:22:39.120" UserId="1863" Text="Seth Priebatsch recently gave a tedtalk entitled “[Building the game layer on top of the world.][1]” In it, Seth described four “game dynamics,” techniques used by game designers to make games fun and addictive. The four dynamics that Priebtsch described were:&#xD;&#xA;&#xD;&#xA; 1. Appointment dynamic-a dynamic in which to succeed, one must return at a predefined time to take a predetermined action. (Real life example: happy hour)&#xD;&#xA; 2. Influence and status-the ability of one player to modify the behavior of another's actions through social pressure. (Example: different color credit cards as a reflection of status)&#xD;&#xA; 3. Progression dynamic-a dynamic in which success is granularly displayed and measured through the process of completing itemized tasks. (Example: linkedin profile progress bar)&#xD;&#xA; 4. Communal discovery-a dynamic wherein an entire community is rallied to work together to solve a challenge. (Example: finding interesting content on Digg.com)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Seth explained these four game dynamics in his talk and added that his company has an additional three. Does anyone know (or have any theories) about what the other three game dynamics are?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=Yn9fTc_WMbo" />
  <row Id="6090" PostHistoryTypeId="1" PostId="3131" RevisionGUID="c3f9c755-f2f6-4369-90bc-3e23a4468f39" CreationDate="2010-08-23T23:22:39.120" UserId="1863" Text="What are the other three &quot;game dynamics&quot;?" />
  <row Id="6091" PostHistoryTypeId="3" PostId="3131" RevisionGUID="c3f9c755-f2f6-4369-90bc-3e23a4468f39" CreationDate="2010-08-23T23:22:39.120" UserId="1863" Text="&lt;game-design&gt;" />
  <row Id="6092" PostHistoryTypeId="2" PostId="3132" RevisionGUID="8932eeab-234a-4763-9f80-01bce8e5b7e6" CreationDate="2010-08-23T23:31:34.270" UserId="189" Text="http://www.youtube.com/watch?v=Yn9fTc_WMbo#t=4m09s&#xD;&#xA;&#xD;&#xA;&gt; Back at scavenger we like to joke that with seven game dynamics you can get anyone to do anything, so today I'm going to show you four because **I hope to have a competitive advantage at the end of this still.**&#xD;&#xA;&#xD;&#xA;You certainly won't get the other three out of him. :)" />
  <row Id="6093" PostHistoryTypeId="5" PostId="3132" RevisionGUID="9ecabe92-9d58-4137-bca7-ce986abd73f2" CreationDate="2010-08-23T23:36:56.960" UserId="189" Comment="added 743 characters in body; added 267 characters in body" Text="http://www.youtube.com/watch?v=Yn9fTc_WMbo#t=4m09s&#xD;&#xA;&#xD;&#xA;&gt; Back at scavenger we like to joke that with seven game dynamics you can get anyone to do anything, so today I'm going to show you four because **I hope to have a competitive advantage at the end of this still.**&#xD;&#xA;&#xD;&#xA;You certainly won't get the other three out of him. :)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;None of those four discusses **creating a history of experiences**. I think this would be a good one; take [Minecraft][1], for example. A whole community has arisen out of Minecraft because it is so open-ended that people build things and remember those fun experiences long after their physical (virtual) manifestations have been destroyed or deleted. They continue to have fond memories, and hopefully continue to return to the game. The same can be said of many games; it's not only how you are currently playing the game but how you have played it in the past that gives you a good feeling of fun and excitement even after hundreds or thousands of hours of play time. And very few games have that.&#xD;&#xA;&#xD;&#xA;*(more to be added here)*&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I think we should ask Jeff Atwood and Joel Spolsky for their insight on this. After all, Stack Exchange is a perfect formula of these different &quot;game dynamics&quot; as evidenced by all the programmers now addicted to the sites.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.minecraft.net/" />
  <row Id="6094" PostHistoryTypeId="5" PostId="3132" RevisionGUID="5356554c-ef67-4597-a65d-b0f00f6bf6e5" CreationDate="2010-08-24T00:42:36.780" UserId="189" Comment="deleted 29 characters in body" Text="http://www.youtube.com/watch?v=Yn9fTc_WMbo#t=4m09s&#xD;&#xA;&#xD;&#xA;&gt; Back at scavenger we like to joke that with seven game dynamics you can get anyone to do anything, so today I'm going to show you four because **I hope to have a competitive advantage at the end of this still.**&#xD;&#xA;&#xD;&#xA;You certainly won't get the other three out of him. :)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;None of those four discusses **creating a history of experiences**. I think this would be a good one; take [Minecraft][1], for example. A whole community has arisen out of Minecraft because it is so open-ended that people build things and remember those fun experiences long after their physical (virtual) manifestations have been destroyed or deleted. They continue to have fond memories, and hopefully continue to return to the game. The same can be said of many games; it's not only how you are currently playing the game but how you have played it in the past that gives you a good feeling of fun and excitement even after hundreds or thousands of hours of play time. And very few games have that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I think we should ask Jeff Atwood and Joel Spolsky for their insight on this. After all, Stack Exchange is a perfect formula of these different &quot;game dynamics&quot; as evidenced by all the programmers now addicted to the sites.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.minecraft.net/" />
  <row Id="6095" PostHistoryTypeId="2" PostId="3133" RevisionGUID="712bf257-78db-4384-a01a-2ac821aa6c15" CreationDate="2010-08-24T00:45:38.303" UserId="1864" Text="I was witness to one situation where 2 entrepreneurs with a load of cash and 0 game design skills wanted to clone a popular game on the NDS and make it for the iPhone. Unfortunately for my friends that got involved as the programmers/artists the two guys kept only one thing consistent, and that was changing up the gameplay style/art look every other week.&#xD;&#xA;&#xD;&#xA;It seemed like they went out and bought every iPhone game they could, sat around playing it while my friends did programming then phoned in just to tell them that they want a game like this - and the look like this. It took ages for the art to get done because there were so many changes.&#xD;&#xA;&#xD;&#xA;I feel sorry for my friends - but I don't think they will get into a crazy scheme like that again." />
  <row Id="6096" PostHistoryTypeId="2" PostId="3134" RevisionGUID="5e3f7a1d-42a5-40f3-a23a-23563cfe6044" CreationDate="2010-08-24T00:59:43.923" UserId="962" Text="Copy the movieclip to a new .fla and upload it somewhere and I will take a look at it." />
  <row Id="6097" PostHistoryTypeId="2" PostId="3135" RevisionGUID="c828f2b9-3f0b-4aeb-a716-6626aa33fc0d" CreationDate="2010-08-24T01:05:28.107" UserId="1120" Text="One data point, look at the entries for Ludum Dare 18.&#xD;&#xA;&#xD;&#xA;http://www.ludumdare.com/compo/ludum-dare-18/?action=preview&#xD;&#xA;&#xD;&#xA;I've been playing through the runs-in-browser entries and ignoring the needs-download entries.  Most of the runs-in-browser are Flash, some are Unity, a few are Java, a few are HTML/JS.  I haven't noticed any Silverlight yet." />
  <row Id="6098" PostHistoryTypeId="16" PostId="3135" RevisionGUID="c828f2b9-3f0b-4aeb-a716-6626aa33fc0d" CreationDate="2010-08-24T01:05:28.107" UserId="-1" />
  <row Id="6099" PostHistoryTypeId="2" PostId="3136" RevisionGUID="0bf4bdd9-d201-41a4-bf62-8cf1c146b11a" CreationDate="2010-08-24T01:49:17.707" UserId="395" Text="From the MDA paper:&#xD;&#xA;&#xD;&#xA;1. Sensation:&#xD;&#xA;Game as sense-pleasure&#xD;&#xA;2. Fantasy:&#xD;&#xA;Game as make-believe&#xD;&#xA;3. Narrative:&#xD;&#xA;Game as drama&#xD;&#xA;4. Challenge:&#xD;&#xA;Game as obstacle course&#xD;&#xA;5. Fellowship:&#xD;&#xA;Game as social framework&#xD;&#xA;6. Discovery:&#xD;&#xA;Game as uncharted territory&#xD;&#xA;7. Expression:&#xD;&#xA;Game as self-discovery&#xD;&#xA;8. Submission:&#xD;&#xA;Game as pastime&#xD;&#xA;&#xD;&#xA;Certainly sounds close, though not quite the same." />
  <row Id="6100" PostHistoryTypeId="2" PostId="3137" RevisionGUID="ae9de276-04bb-428d-a686-d8877fa8ff21" CreationDate="2010-08-24T01:51:45.520" UserDisplayName="Rob Basler" Text="How-to:&#xD;&#xA;&#xD;&#xA;www.gamasutra.com/view/feature/4117/building_buzz_for_indie_games.php&#xD;&#xA;&#xD;&#xA;How to deal with the press:&#xD;&#xA;&#xD;&#xA;gillen.cream.org/wordpress_html/?page_id=693&#xD;&#xA;&#xD;&#xA;List of PC game reviewers:&#xD;&#xA;&#xD;&#xA;fallout.bethsoft.com/eng/links/fallout3-reviews.php&#xD;&#xA;&#xD;&#xA;Marketing Book:&#xD;&#xA;&#xD;&#xA;www.sellmorevideogames.com&#xD;&#xA;&#xD;&#xA;Viral Marketing&#xD;&#xA;&#xD;&#xA;www.gamasutra.com/view/feature/4210/building_the_foundation_of_a_.php&#xD;&#xA;&#xD;&#xA;Marketing for Indie Games&#xD;&#xA;&#xD;&#xA;www.slideshare.net/simoniker/igs-gdc-austin-john-graham-effective-marketing-for-indie-game-developers?src=related_normal&amp;rel=2670032&#xD;&#xA;&#xD;&#xA;Indie Press Release service&#xD;&#xA;&#xD;&#xA;www.gamerelease.net" />
  <row Id="6101" PostHistoryTypeId="16" PostId="3137" RevisionGUID="ae9de276-04bb-428d-a686-d8877fa8ff21" CreationDate="2010-08-24T01:51:45.520" UserId="-1" />
  <row Id="6102" PostHistoryTypeId="2" PostId="3138" RevisionGUID="281eeee8-399a-4640-b8ab-5a94dd5b9067" CreationDate="2010-08-24T02:10:00.177" UserId="1780" Text="I think that the OP's discussion is lumping a bunch of things together, and that the problem can be simplified substantially by breaking it up a bit.&#xD;&#xA;&#xD;&#xA;My suggestion:&#xD;&#xA;&#xD;&#xA;Keep your array of keys' states.  Isn't there an API call to get the entire keyboard state at once?  (Most of my work is on consoles, and even on Windows for a connected controller you get the whole controller state at once.)  Your key states are a &quot;hard&quot; map on the keys of the keyboard.  Untranslated is best, but however you get it easiest out of the APIs.&#xD;&#xA;&#xD;&#xA;Then keep a a few parallel arrays that indicate whether the key went up this frame, another indicating that it went down, and a third to indicate simply that the key is &quot;down&quot;.  Maybe throw in a timer so you can keep track of how long the key has been in its current state.&#xD;&#xA;&#xD;&#xA;Next create a method to create a mapping of keys to actions.  You'll want to do this a couple of times.  Once for UI stuff (and take care to query the Windows mappings because you can't assume the scancode when you press 'A' is going to give an A on the user's computer).  Another for each in-game &quot;mode&quot;.  These are the mappings of keycodes to actions.  You can do this a couple of ways, one would be to keep an enum that is used by the receiving system, another would be a function pointer indicating the function to be called on a state change.  Maybe even a hybrid of the two, depending on your goals and needs.  With these &quot;modes&quot; you can push and pop them onto a controller mode stack, with flags that allow ignored input to keep going down the stack or whatever.  The key though is that it is easy to switch in a new mode for handling the input.&#xD;&#xA;&#xD;&#xA;Finally, handle those key actions somehow.  For motion you might want to do something tricky, translate 'W' down to mean &quot;move forward,&quot; but it doesn't need to be a binary solution; you can have &quot;W is down&quot; mean &quot;increase velocity by X until a maximum of Y,&quot; and &quot;W is up&quot; to be &quot;decrease velocity by Z until it hits zero.&quot;  Generally speaking- you want your &quot;controller handling interface in game systems&quot; to be pretty narrow; do all of the key translation in one place and then use the results of that everywhere else.  This is in contrast to directly checking to see if Spacebar is pressed anywhere random in the code, because if it's in some random spot it'll probably get hit at some random time when you don't want it to, and you just don't want to deal with that...&#xD;&#xA;&#xD;&#xA;I really detest designing to patterns and I think components bring more development cost than good, so that's why I mentioned neither.  Patterns will emerge if they're destined to, as will components, but setting out to do either from the outset will only complicate your life." />
  <row Id="6103" PostHistoryTypeId="2" PostId="3139" RevisionGUID="79d272c9-739f-4ab8-b6ba-0162f52fcb73" CreationDate="2010-08-24T02:14:22.290" UserId="1780" Text="Doesn't Raph Koster discuss this stuff in his [A Theory of Fun](http://www.theoryoffun.com) book?" />
  <row Id="6104" PostHistoryTypeId="2" PostId="3140" RevisionGUID="373cd5b1-1180-45f5-8f45-9abfee949f37" CreationDate="2010-08-24T03:08:24.677" UserId="295" Text="I'm working with Starcraft 2 Map Editor, and am having a little bit of a trigger problem.&#xD;&#xA;&#xD;&#xA;It's quite easy to detect when a specific unit kills a structure (simply check if triggering unit == whatever) but I'm not quite sure how to tell when a building dies to to either fire (terran buildings) or bleeding out (zerg buildings when off creep).&#xD;&#xA;&#xD;&#xA;What condition should I be looking for in my &quot;a unit dies&quot; trigger to see if one of those two situations occured?&#xD;&#xA;&#xD;&#xA;PS: Sorry for lack of available tags!" />
  <row Id="6105" PostHistoryTypeId="1" PostId="3140" RevisionGUID="373cd5b1-1180-45f5-8f45-9abfee949f37" CreationDate="2010-08-24T03:08:24.677" UserId="295" Text="How can I write a trigger to detect when a terran building burns to its death? (Starcraft 2)" />
  <row Id="6106" PostHistoryTypeId="3" PostId="3140" RevisionGUID="373cd5b1-1180-45f5-8f45-9abfee949f37" CreationDate="2010-08-24T03:08:24.677" UserId="295" Text="&lt;programming&gt;" />
  <row Id="6107" PostHistoryTypeId="2" PostId="3141" RevisionGUID="7e233855-3ab9-4674-af23-a715cfd5a869" CreationDate="2010-08-24T03:25:05.197" UserId="1863" Text="Here's my guess:&#xD;&#xA;&#xD;&#xA;**Problem solving**-A game should require of its players creativity insight and problem solving skills to progress. Examples: I'm completely addicted to pacman and tetris.&#xD;&#xA;&#xD;&#xA;**Evolution**-progress in a game should be rewarded by opening new facets and changing the gaming experience. Examples: moderator tools provided to high reputation users on the stackexchange network.&#xD;&#xA;&#xD;&#xA;**Productivity**-The sense that what you've done is somehow productive and useful in some way, even if its intangible and/or abstract. Not all gaming experiences offer this, but some that do have been surprisingly successful. I think this dynamic is the only way to explain the success of sites/projects like stackoverflow.com, wikipedia and opensource software." />
  <row Id="6108" PostHistoryTypeId="10" PostId="3140" RevisionGUID="4e877d7e-a864-4f43-94d8-e61a77b37f50" CreationDate="2010-08-24T03:48:32.837" UserId="14" CloseReasonId="2" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="6109" PostHistoryTypeId="11" PostId="3140" RevisionGUID="359a83c6-cd2d-4967-8a2b-42c6400f7f5a" CreationDate="2010-08-24T04:24:46.963" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="6110" PostHistoryTypeId="6" PostId="3140" RevisionGUID="51968939-648c-4656-8e40-2d96bcf763d1" CreationDate="2010-08-24T04:25:13.903" UserId="51" Comment="edited tags" Text="&lt;scripting&gt;" />
  <row Id="6111" PostHistoryTypeId="5" PostId="3134" RevisionGUID="85fc9e4f-160c-4d52-b398-a95e08d737a8" CreationDate="2010-08-24T05:04:12.613" UserId="962" Comment="added 172 characters in body" Text="Copy the movieclip to a new .fla and upload it somewhere and I will take a look at it.&#xD;&#xA;&#xD;&#xA;**I figured out your problem. Using lines in 9 slice editor will always give strange results. Remake it from shapes that are made from fills only and have no lines.**&#xD;&#xA;" />
  <row Id="6112" PostHistoryTypeId="6" PostId="3140" RevisionGUID="fdffa814-7886-4f5c-9c35-5701dcd4319a" CreationDate="2010-08-24T05:05:04.890" UserId="395" Comment="edited tags" Text="&lt;scripting&gt;&lt;mods&gt;" />
  <row Id="6113" PostHistoryTypeId="2" PostId="3142" RevisionGUID="dbed3c7d-6da1-42fc-91fc-416e353f933e" CreationDate="2010-08-24T06:00:09.670" UserId="1263" Text="I fully accept that this could be just me, but I can't help but notice that I have never become addicted to any 3D tycoon or city-building games but I have become addicted to many older 2D tycoon games.&#xD;&#xA;&#xD;&#xA;Here are a few examples out of many. I played 1701 A.D. and, though it was fine, I didn't really get into it. Yet I just found my decade old copy of *Zeus: Master of Olympus*, and it's hard for me to tear myself away from that game. Or consider Roller Coaster Tycoon. Every time I play the first or second, I end up getting at least temporarily addicted to the gameplay. But I have never felt that feeling for the third.&#xD;&#xA;&#xD;&#xA;I don't have anything against 3D graphics. It's just that somehow the 3D tycoon games aren't working for me. I can't figure out why.&#xD;&#xA;&#xD;&#xA;So my question is two-fold:&#xD;&#xA;&#xD;&#xA;* (1) Am I really alone in this feeling or do others feel the same way? Do the majority feel this way?&#xD;&#xA;* (2) What could be the reasons for this? Are there legitimate advantages to developing 2D tycoon games over 3D ones? Could it be as simple as 2D development allows more time to be placed on fine-tuning gameplay or is there something deeper here?&#xD;&#xA;&#xD;&#xA;For the record, I do *not* think this is the result of nostalgia. For instance, although I bought *Zeus* when it came out, I never played it for some reason until recently. It is for me a new game." />
  <row Id="6114" PostHistoryTypeId="1" PostId="3142" RevisionGUID="dbed3c7d-6da1-42fc-91fc-416e353f933e" CreationDate="2010-08-24T06:00:09.670" UserId="1263" Text="2D tycoon games vs. 3D tycoon games" />
  <row Id="6115" PostHistoryTypeId="3" PostId="3142" RevisionGUID="dbed3c7d-6da1-42fc-91fc-416e353f933e" CreationDate="2010-08-24T06:00:09.670" UserId="1263" Text="&lt;2d&gt;&lt;rts&gt;" />
  <row Id="6116" PostHistoryTypeId="2" PostId="3143" RevisionGUID="0c8aae90-81ab-4743-905d-16007d6d9ec3" CreationDate="2010-08-24T07:15:18.340" UserId="1443" Text="Of course it's reasonable.   I personally wouldn't do it, and most of the C fans I know actually just write C-like code in .cpp files.  But the languages are similar enough to where it doesn't really matter.&#xD;&#xA;&#xD;&#xA;As for why someone would choose to do this, I think it's mostly down to anti-C++ philosophy.  Personally I still don't think this is a good reason to choose C over &quot;C-style C++&quot;.  typedef struct craziness is a good enough reason to steer clear of C, and there are a number of others.&#xD;&#xA;&#xD;&#xA;Unfortunately C and C++ are both pretty terrible languages when we get down to it.  That's one reason people have been trying to do a lot of their code in script in recent years.&#xD;&#xA;&#xD;&#xA;If you're looking for examples of people working in C, you can ignore id as I recall reading that they've abandoned C long ago.  Cryptic Studios (Star Trek Online) does all their engine development in C, though.   As far as I can tell, yes, it's because of philosophy more than because of any tangible advantage." />
  <row Id="6117" PostHistoryTypeId="2" PostId="3144" RevisionGUID="3796ed4e-9a03-4630-92df-ab34ca755e79" CreationDate="2010-08-24T07:54:27.583" UserId="259" Text="I worked on Roller Coaster Tycoon 3, and I think it's a good game!  In fact bar that extra dimension that gives you the ability to ride your amazing roller coaster creations, it's pretty similar to RCT2.  When developing, we lifted as many decisions as possible from the RCT2 codebase, because why re-invent the wheel, right?&#xD;&#xA;&#xD;&#xA;Maybe you just miss the easier-to-navigate isometric camera?  That was an option in RCT3, IIRC at the insistance of Sawyer himself.&#xD;&#xA;&#xD;&#xA;I've changed companies twice since then, so I'm not incentivised to say this (beyond pride), but along with its expansions, RCT3 is still among the games I'm most proud of." />
  <row Id="6118" PostHistoryTypeId="2" PostId="3145" RevisionGUID="6fedd16b-2471-4587-a4e3-15c241c05870" CreationDate="2010-08-24T07:57:13.380" UserId="1856" Text="Would a state machine work? The animal is either in e.g. sleeping state, eating state, running state etc. For each state you associate a list of active organs. So each frame you visit each animal, switch on state, lookup list of organs for that state and execute update on each of the organs." />
  <row Id="6119" PostHistoryTypeId="2" PostId="3146" RevisionGUID="0515d224-f0c7-4a02-bfd8-566ac3681e04" CreationDate="2010-08-24T08:07:45.560" UserId="778" Text="What I mean by this is - is it legal to make a game which asks (or proves) your age during install or on initial load, and then dynamically sets the content to the players age.  &#xD;&#xA;For example if the players is under-age then all swear word assets are replaced with there PG13 equivalents.  &#xD;&#xA;Or the same with blood and gore.&#xD;&#xA;&#xD;&#xA;Does this make sense?  &#xD;&#xA;Also what are the communities opinions or feelings about this?  &#xD;&#xA;(__note__ for locality I am referring to UK law but laws and opinions for any other country is encouraged!)&#xD;&#xA;&#xD;&#xA;(ps i can't create tags)" />
  <row Id="6120" PostHistoryTypeId="1" PostId="3146" RevisionGUID="0515d224-f0c7-4a02-bfd8-566ac3681e04" CreationDate="2010-08-24T08:07:45.560" UserId="778" Text="What are the legal considerations about making a game with a dynamic age restricted content?" />
  <row Id="6121" PostHistoryTypeId="3" PostId="3146" RevisionGUID="0515d224-f0c7-4a02-bfd8-566ac3681e04" CreationDate="2010-08-24T08:07:45.560" UserId="778" Text="&lt;programming&gt;" />
  <row Id="6122" PostHistoryTypeId="6" PostId="3146" RevisionGUID="c12db4b6-24e5-43c8-af5b-b52b54e05e84" CreationDate="2010-08-24T08:28:01.250" UserId="891" Comment="edited tags" Text="&lt;programming&gt;&lt;legal&gt;&lt;content-rating&gt;" />
  <row Id="6123" PostHistoryTypeId="2" PostId="3147" RevisionGUID="6085bcad-c416-46ab-afa2-b7f835ae2560" CreationDate="2010-08-24T08:57:20.003" UserId="1868" Text="I have been thinking how to create realistic sound for a car. The main sound is the engine, then all kind of wind, road and suspension sounds.&#xD;&#xA;&#xD;&#xA;Are there any open source projects for the engine sound simulation? Simply pitching up the sample does not sound too great. The ideal would be to something that allows me to pick type of the engine (i.e. inline-4 vs v-8), add extras like turbo/supercharger whine and finally set the load and rpm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6124" PostHistoryTypeId="1" PostId="3147" RevisionGUID="6085bcad-c416-46ab-afa2-b7f835ae2560" CreationDate="2010-08-24T08:57:20.003" UserId="1868" Text="Car engine sound simulation" />
  <row Id="6125" PostHistoryTypeId="3" PostId="3147" RevisionGUID="6085bcad-c416-46ab-afa2-b7f835ae2560" CreationDate="2010-08-24T08:57:20.003" UserId="1868" Text="&lt;engine&gt;&lt;simulations&gt;&lt;sound&gt;" />
  <row Id="6126" PostHistoryTypeId="2" PostId="3148" RevisionGUID="5b509839-c419-4e4e-8ceb-0b487d16356b" CreationDate="2010-08-24T08:58:52.620" UserId="1700" Text="I'm using Irrlicht(C++) for a 3D engine, and it has a built in GUI system. The GUI events are something like this:&#xD;&#xA;&#xD;&#xA;switch(eventtype)&lt;br&gt;&#xD;&#xA;case button_pressed:&lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stuff&lt;br&gt;&#xD;&#xA;case editbox_edited:&lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stuff&#xD;&#xA;&#xD;&#xA;So far I have begun writing a system that allows me to create the GUIs with Lua scripts. It was very easy to make it so it creates the GUI controls from Lua, but I can not think of a good way to define what should happen when control events occur from Lua too. Here's an example of what I have so far:&#xD;&#xA;&#xD;&#xA;Lua:&lt;pre&gt;&#xD;&#xA;local button = create_button(&quot;button label&quot;,10,10,100,50)&#xD;&#xA;toggle_control(button,false)&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;C++:&lt;pre&gt;&#xD;&#xA;static int CreateButton(lua_State* L)&#xD;&#xA;{&#xD;&#xA; int n = lua_gettop(L);&#xD;&#xA; core::stringw label = lua_tostring(L,1);&#xD;&#xA; core::stringw tt((n&gt;=5?lua_tostring(L,6):&quot;&quot;));&#xD;&#xA; int x = lua_tonumber(L,2);&#xD;&#xA; int y = lua_tonumber(L,3);&#xD;&#xA; int w = lua_tonumber(L,4);&#xD;&#xA; int h = lua_tonumber(L,5);&#xD;&#xA; core::rect&lt;s32&gt; r(x,y,x+w,y+h);&#xD;&#xA; unsigned int id = NextID();&#xD;&#xA; if(r.isValid())&#xD;&#xA; {&#xD;&#xA;  gui::IGUIButton* b = device-&gt;getGUIEnvironment()-&gt;addButton(r,0,0,label.c_str(),tt.c_str());&#xD;&#xA;  cl.insert(ControlPair(id,b));&#xD;&#xA;  lua_pushnumber(L,id);&#xD;&#xA; }&#xD;&#xA; else&#xD;&#xA;  lua_pushnumber(L,-1);&#xD;&#xA; return 1;&#xD;&#xA;}&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Please ignore the security issues with the code (it is a very early version). So my question is this: What are some good ways of defining the control events from a script interpreter in C++?" />
  <row Id="6127" PostHistoryTypeId="1" PostId="3148" RevisionGUID="5b509839-c419-4e4e-8ceb-0b487d16356b" CreationDate="2010-08-24T08:58:52.620" UserId="1700" Text="Defining GUI control event responses using Lua in C++" />
  <row Id="6128" PostHistoryTypeId="3" PostId="3148" RevisionGUID="5b509839-c419-4e4e-8ceb-0b487d16356b" CreationDate="2010-08-24T08:58:52.620" UserId="1700" Text="&lt;c++&gt;&lt;gui&gt;&lt;lua&gt;" />
  <row Id="6129" PostHistoryTypeId="2" PostId="3149" RevisionGUID="116d770c-1640-4130-8670-3ae99799bb32" CreationDate="2010-08-24T09:01:39.690" UserId="154" Text="IANAL but you can certainly ask the player to enter their age and set up some options as a result, or just give the players options for gore &amp; language that they can manually set. Several games do this already allowing you to turn off, or at least tone down blood.&#xD;&#xA;&#xD;&#xA;However if you are asking if you can get a lower rating from PEGI/ESRB for this I'm going to make an educated guess of &quot;No&quot;. They are going to rate you based on the fully enabled gore/language version of your game. If you look at it from their perspective, even if your game does really tone down elements when given the correct information, there is no way to be sure that players will be honest. So if they put a lower restriction on the title and then little Jimmy says he's an adult and gets full gore, parents will not be happy. " />
  <row Id="6130" PostHistoryTypeId="2" PostId="3150" RevisionGUID="9cf340a7-c26d-438a-a427-a26037840137" CreationDate="2010-08-24T09:05:53.010" UserId="1143" Text="I had a similar problem on a game I worked on a few years back - the simulation of objects was complex and couldn't really be performed in detail on every object in the world.&#xD;&#xA;&#xD;&#xA;The solution was to use the LOD concept to the simulation. Objects within the view of the player would run the full simulation. Objects far away from the player ran a highly simplified simulation periodically. As objects came into the player's view they would transition from course, periodic simulation update to detailed, regular updates." />
  <row Id="6131" PostHistoryTypeId="2" PostId="3151" RevisionGUID="bceaa503-5d43-46c7-bb32-48d33188f8d4" CreationDate="2010-08-24T09:47:00.730" UserId="1655" Text="I agree with wkerslake, but I don't think that should discourage you from doing what you describe.&#xD;&#xA;&#xD;&#xA;I would allow the user to be able to change the 'gore' settings manually, but set the defaults based on the age of the user.&#xD;&#xA;" />
  <row Id="6132" PostHistoryTypeId="2" PostId="3152" RevisionGUID="0522164d-d486-4a71-a16f-2839c8c6c51c" CreationDate="2010-08-24T10:05:09.930" UserId="1156" Text="I don't think the ratings board would rate the age down because you set content down. If an underaged person is playing the game, then they should've been aware that the rating is too high. &#xD;&#xA;&#xD;&#xA;By all means, add in an option somewhere to tone the content down; could be useful for if a properly aged person is playing in the vicinity of small children." />
  <row Id="6133" PostHistoryTypeId="2" PostId="3153" RevisionGUID="a4cec514-8517-4fac-b5fc-d9fec8738629" CreationDate="2010-08-24T10:10:28.153" UserId="259" Text="On one driving game I worked on, we had multiple samples per car - the engine held at certain rev intervals, and a sample each of the car ascending and descending the rev scale IIRC.  &#xD;&#xA;&#xD;&#xA;All of these were recorded from the exhaust, the sides, the front, and inside the real-life car so the sound could change as you moved the camera.  Then we blended between them depending on what the engine was doing right now.  &#xD;&#xA;&#xD;&#xA;It sounded awesome, but obviously it took a lot of resources!" />
  <row Id="6134" PostHistoryTypeId="2" PostId="3154" RevisionGUID="ec258e3a-1559-4bb4-9d67-9b3f0163f876" CreationDate="2010-08-24T10:16:51.073" UserId="769" Text="About many games you can say &quot;oh that's the Unreal engine for sure&quot;, &quot;this was made by upgrading GTA 4&quot;, etc. We can often recognize the engine used for a game just by looking at its graphics (disregarding menus and such).&#xD;&#xA;&#xD;&#xA;I'm wondering, why is this? All game engines use the same 3D rendering technology that we all use, and the different games usually have a distinct art style, so what's left to recognize?" />
  <row Id="6135" PostHistoryTypeId="1" PostId="3154" RevisionGUID="ec258e3a-1559-4bb4-9d67-9b3f0163f876" CreationDate="2010-08-24T10:16:51.073" UserId="769" Text="Why can we recognize game engines?" />
  <row Id="6136" PostHistoryTypeId="3" PostId="3154" RevisionGUID="ec258e3a-1559-4bb4-9d67-9b3f0163f876" CreationDate="2010-08-24T10:16:51.073" UserId="769" Text="&lt;graphics&gt;&lt;engine&gt;&lt;3d&gt;" />
  <row Id="6137" PostHistoryTypeId="2" PostId="3155" RevisionGUID="a008b34b-bb23-4d74-945b-f7aa15052e97" CreationDate="2010-08-24T10:20:00.837" UserId="1156" Text="I never knew you could really do that.&#xD;&#xA;&#xD;&#xA;Easiest ways to tell:&#xD;&#xA;&#xD;&#xA; - Very often they have big 'Unity Engine' or 'Unreal Technology' logos on startup.&#xD;&#xA; - Companies reusing game engines - A 'Rockstar Games' open world game is almost certainly going to use a GTA tweaked engine." />
  <row Id="6138" PostHistoryTypeId="2" PostId="3156" RevisionGUID="3aab66c2-2e13-4ea5-a166-0dec6cee491e" CreationDate="2010-08-24T10:28:07.120" UserId="1219" Text="I've had similar experiences, with games like *Caesar* (3 -&gt; 4) and RPG's (*Baldur's Gate* -&gt; *Neverwinter Nights*).&#xD;&#xA;&#xD;&#xA;Although the 3D games are fine, they are actually another type of game to me. At first, game designers were restricted to 2D, and they made games that worked with these restrictions. When it was possible to use 3D, some companies started &quot;porting&quot; their old titles to this new dimension. They added something to a great formula, thus changing it, without taking the effects into account.  &#xD;&#xA;Good 3D games are games that bring a kind of gameplay that's only possible in 3D. A typical example is *Wolvenstein 3D*. The first one was not what we would call 3D nowadays, but the gameplay is made for 3D.&#xD;&#xA;&#xD;&#xA;When you want to move a 2D game to a 3D game, you face all kinds of **different obstacles**:&#xD;&#xA;&#xD;&#xA; - The interface: **it's easy to loose the overview**. Games like *Warcraft3* keep a fixed camera as a standard for this purpose. The game is still played from an isometric point of view, although it is possible to rotate in all directions. Another example: you could move in all directions in the platformer *Mario 64*. But a platformer like that is just more fun in 2D. Developers learnt this the hard way and make 3D side scrollers nowadays (consider *Super Mario bros wii*).&#xD;&#xA; - **Content creation takes more time**. Imagine making a game like &quot;Baldur's Gate&quot; (250+ hours of gameplay) in 3D. Impossible task, modern RPG's can only provide 50 to 60 hours of gameplay. It just takes more time to create a full featured 3D landscape than a 2D background.&#xD;&#xA; - The 2D camera is very often easy to navigate, while **a 3D camera is often harder to navigate**. I don't want to spend my time turning the camera in all kind of directions. I wanted to play a game, not to record a movie.&#xD;&#xA;&#xD;&#xA;The bottom line: consider the benefits AND drawbacks when you decide to port your game or make a new one from scratch. When 3D was new, it was hyped and everyone wanted to make a 3D game. This does not magically make a game more addictive or more entertaining. **Use 3D where it fits, not wherever you can because you can.**" />
  <row Id="6139" PostHistoryTypeId="5" PostId="3147" RevisionGUID="ebfe6ca3-dcc7-496d-bfa6-2dfa434e5374" CreationDate="2010-08-24T10:44:30.560" UserId="1868" Comment="added 54 characters in body" Text="I have been thinking how to create realistic sound for a car. The main sound is the engine, then all kind of wind, road and suspension sounds.&#xD;&#xA;&#xD;&#xA;Are there any open source projects for the engine sound simulation? Simply pitching up the sample does not sound too great. The ideal would be to something that allows me to pick type of the engine (i.e. inline-4 vs v-8), add extras like turbo/supercharger whine and finally set the load and rpm.&#xD;&#xA;&#xD;&#xA;Edit: Something like http://www.sonory.org/examples.html" />
  <row Id="6142" PostHistoryTypeId="2" PostId="3158" RevisionGUID="72aaafeb-88c3-4a07-af5d-d77e98bb1419" CreationDate="2010-08-24T10:56:11.450" UserId="1352" Text="There are subtle differences in the engines and what they're good and bad at that is easy to spot from game to game. &#xD;&#xA;&#xD;&#xA;The exact combination of these traits can often identify the engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6143" PostHistoryTypeId="2" PostId="3159" RevisionGUID="3bb70eef-001c-48f4-a751-f898dcfb7b14" CreationDate="2010-08-24T11:15:01.617" UserId="1628" Text="Primarily I'd imagine this is down to the shaders. For example, the Unreal engine will have a certain method of handling HDR, a certain method of handling bump mapping, a certain method of handling light scatter, etc.&#xD;&#xA;&#xD;&#xA;They will also have a uniform level of clarity in terms of constraints such as texture sizes and colour support.&#xD;&#xA;&#xD;&#xA;Additionally the algorithms will be similar. Objects will be tessellated using the same algorithms. AI will make decisions according to the same decision-making architectures.&#xD;&#xA;&#xD;&#xA;If the bump mapping is causing insane specular and reacts strongly to changes in lighting for example, you immediately start thinking Doom 3 engine. That's because that shader code is shared between every game using the engine. You wouldn't want to rip something like that out.&#xD;&#xA;&#xD;&#xA;&quot;All game engines use the same 3D rendering technology that we all use&quot;&#xD;&#xA;&#xD;&#xA;The technology is the same, but the rules that govern how the world actually looks (eg. lighting, tessellation, LOD , etc) are all written by the developer. The 3D rendering technology doesn't have that much to do with the visual quality of the things on screen. Even the rules for applying flat ambient lighting is left up to the developer (assuming you're not using Fixed-Function Pipelines).&#xD;&#xA;&#xD;&#xA;You can make your OpenGL app look just like your DirectX app with often trivial difficulty. The underlying rendering technology really doesn't have that much impact except with regards to speed." />
  <row Id="6144" PostHistoryTypeId="2" PostId="3160" RevisionGUID="fa7416d1-dbc0-45c7-9e88-df54ee2caf4c" CreationDate="2010-08-24T11:15:26.393" UserId="1456" Text="Why?&#xD;&#xA;&#xD;&#xA; - For similar design situations You use same engine methods.&#xD;&#xA; - Common environment technology is typical for concrete engine (Grass Trees).&#xD;&#xA; - Ground material mixing&#xD;&#xA; - Trigers and evenings systems have similar errors .&#xD;&#xA; - Lods and Loding systems are big mark of engines.&#xD;&#xA; - Shadow handling.&#xD;&#xA; - Postprocess handling.&#xD;&#xA; - Z-Buffers/Depth buffers make same errors on same distances .&#xD;&#xA; - A.I. behavior issues. Scripts handling.&#xD;&#xA; - Smoke, fire, rain, dust, snow, water, clouds, reflection&#xD;&#xA; - same noise textures/detail textures everybody likes to use :) in one engine.&#xD;&#xA; - Sky handling/sky boxes.&#xD;&#xA; - Caching&#xD;&#xA; - materials preset&#xD;&#xA; - and render math. All engines use their own variants of same math." />
  <row Id="6145" PostHistoryTypeId="5" PostId="3160" RevisionGUID="055ae1f2-5ef2-4502-8496-5a9238af20ad" CreationDate="2010-08-24T11:21:28.087" UserId="1456" Comment="deleted 2 characters in body" Text="Why?&#xD;&#xA;&#xD;&#xA; - For similar design situations You use same engine methods.&#xD;&#xA; - Common environment technology is typical for concrete engine (Grass Trees).&#xD;&#xA; - Ground material mixing&#xD;&#xA; - Trigers and events systems have similar errors .&#xD;&#xA; - Lods and Loding systems are big mark of engines.&#xD;&#xA; - Shadow handling.&#xD;&#xA; - Postprocess handling.&#xD;&#xA; - Z-Buffers/Depth buffers make same errors on same distances .&#xD;&#xA; - A.I. behavior issues. Scripts handling.&#xD;&#xA; - Smoke, fire, rain, dust, snow, water, clouds, reflection&#xD;&#xA; - same noise textures/detail textures everybody likes to use :) in one engine.&#xD;&#xA; - Sky handling/sky boxes.&#xD;&#xA; - Caching&#xD;&#xA; - materials preset&#xD;&#xA; - and render math. All engines use their own variants of same math." />
  <row Id="6146" PostHistoryTypeId="2" PostId="3161" RevisionGUID="936daff9-55bb-40ad-a400-b029069e7442" CreationDate="2010-08-24T11:43:39.310" UserId="259" Text="I'm not familiar with Irrlicht, but you could pass a function to the CreateButton that should get called on an event that deals with that button.  You could either pass a string, and do a lookup in the global table for a function with that name at run time, or store a pointer to the lua function itself (which should allow you to do lambdas).&#xD;&#xA;&#xD;&#xA;In the past I've done a convention-over-configuation thing, where the game automatically picks up lua functions that fit a callback style.  Eg:&#xD;&#xA;&#xD;&#xA;    createButton(&quot;myButton&quot;, &quot;label text&quot;, 10, 10, 100, 50)&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    function onEvent_myButton(eventParams)&#xD;&#xA;        -- process event&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;The game parses the global table, looking for onEvent functions and parsing the function name to see if it matches your new button name.  It hooks that up as a callback.&#xD;&#xA;&#xD;&#xA;For some reason our designers found this a more friendly approach.&#xD;&#xA;" />
  <row Id="6147" PostHistoryTypeId="2" PostId="3162" RevisionGUID="6638a06a-c687-4afd-85e2-a9408c39e5d5" CreationDate="2010-08-24T12:15:33.690" UserId="119" Text="From the top menu in Flash go:&#xD;&#xA;&#xD;&#xA;Modify &gt; Shape &gt; Convert Lines to Fills" />
  <row Id="6148" PostHistoryTypeId="2" PostId="3163" RevisionGUID="e5a0e304-77d4-4b9f-9215-9991233f45b8" CreationDate="2010-08-24T12:28:55.833" UserId="744" Text="You can tell Unreal games because they all use the same incredibly bad skin shader, and the same stupid &quot;physics&quot; puzzles." />
  <row Id="6151" PostHistoryTypeId="2" PostId="3164" RevisionGUID="210af577-2514-48ca-8f15-6d13bdb7edbb" CreationDate="2010-08-24T14:13:50.223" UserId="119" Text="I am preparing a conference session about game design, and a question occurred to me that I haven't been able to answer with Google:&#xD;&#xA;&#xD;&#xA;In Mario the player varies the height of Mario's jump by holding down the button while Mario is in the air. Has this approach ever been used to vary the power or attacks, i.e. hold down for a hard attack, tap for a fast attack. I feel like this must have been done many times but I can't think of a concrete example." />
  <row Id="6152" PostHistoryTypeId="1" PostId="3164" RevisionGUID="210af577-2514-48ca-8f15-6d13bdb7edbb" CreationDate="2010-08-24T14:13:50.223" UserId="119" Text="Varying the strength of attacks by holding down the button" />
  <row Id="6153" PostHistoryTypeId="3" PostId="3164" RevisionGUID="210af577-2514-48ca-8f15-6d13bdb7edbb" CreationDate="2010-08-24T14:13:50.223" UserId="119" Text="&lt;input&gt;" />
  <row Id="6154" PostHistoryTypeId="2" PostId="3165" RevisionGUID="e3bd0907-c27c-475a-a288-fe71841b9bea" CreationDate="2010-08-24T14:26:30.523" UserId="1312" Text="Most of them are used in fast paced or brutal games.&#xD;&#xA;&#xD;&#xA;Devil May Cry series have combos and button mashing and in the more recent one IV you had to press and hold a button to make more brutal attacks by filling a bar of rage.&#xD;&#xA;&#xD;&#xA;Every sports game out there, in Fifa on direct shots you had to press the button to make your shot more powerful.&#xD;&#xA;&#xD;&#xA;There is an interesting mechanic in Team Fortress 2, if you play as a Scout and press SpaceBar twice you jump twice the normal height. Also as a Demoman if you press the aim button longer you will make your &quot;grenades&quot; fly more into the distance.&#xD;&#xA;&#xD;&#xA;I hope this answers your question since i don't know specifically what you are asking. If this has been done or something else." />
  <row Id="6155" PostHistoryTypeId="2" PostId="3166" RevisionGUID="b039d36d-ddb8-4214-aa3b-78e9dec1cb3e" CreationDate="2010-08-24T14:31:10.627" UserId="1156" Text=" - On the Wii, in Super Smash Bros.&#xD;&#xA;   Brawl you can 'charge' up smash&#xD;&#xA;   attacks (powerful attacks) by holding&#xD;&#xA;   the button down for longer.&#xD;&#xA; - In fact, a significant amount of items on that game use that principle (i.e. one of the guns switches between rapid fire and a large energy ball depending on hold length)&#xD;&#xA; - Not sure if it counts, but golf simulations tend to rely on it; the longer the button is held, the harder you hit the ball." />
  <row Id="6156" PostHistoryTypeId="5" PostId="3164" RevisionGUID="f2102f44-de5d-47a0-a511-27aa48723605" CreationDate="2010-08-24T14:39:37.550" UserId="119" Comment="added 248 characters in body" Text="I am preparing a conference session about game design, and a question occurred to me that I haven't been able to answer with Google:&#xD;&#xA;&#xD;&#xA;In Mario the player varies the height of Mario's jump by holding down the button while Mario is in the air. Has this approach ever been used to vary the power or attacks, i.e. hold down for a hard attack, tap for a fast attack. I feel like this must have been done many times but I can't think of a concrete example.&#xD;&#xA;&#xD;&#xA;UPDATE 1: I'm specifically thinking about systems where the attack is launched as soon as you press the button, but gains power as you hold it down (like Mario's jump), rather than systems where you hold down to charge-up and release to attack." />
  <row Id="6157" PostHistoryTypeId="2" PostId="3167" RevisionGUID="7c0cb11d-8ef8-43b6-9dae-e6a6f197d25f" CreationDate="2010-08-24T14:46:45.383" UserId="1593" Text="Isn't this true for any game where you are shooting a stream of bullets and don't have to release the button/key?  If the enemy can be struck by three shots instead of one, is there any difference between that and making the attack stronger?  (Sure, it also widens the area of attack over space or time, but it's still kinda the same.)" />
  <row Id="6158" PostHistoryTypeId="5" PostId="3165" RevisionGUID="0b031283-af3a-4304-9345-d07b41715901" CreationDate="2010-08-24T14:51:42.503" UserId="1312" Comment="deleted 479 characters in body; added 27 characters in body" Text="Most of them are used in fast paced or brutal games.&#xD;&#xA;&#xD;&#xA;**EDIT**: After your update only one game comes to my mind right now: Fable 2, for magic you had to press down and hold one of the controllers trigger to build up bigger more powerful levels of the respective spell." />
  <row Id="6159" PostHistoryTypeId="5" PostId="3141" RevisionGUID="86c66751-2c5c-4b8f-ac37-8b4e9c597e25" CreationDate="2010-08-24T15:07:42.500" UserId="1863" Comment="added 235 characters in body" Text="Here are some possibilities:&#xD;&#xA;&#xD;&#xA;**Problem solving**-A game should require of its players creativity insight and problem solving skills to progress. Examples: I'm completely addicted to pacman and tetris.&#xD;&#xA;&#xD;&#xA;**Evolution**-progress in a game should be rewarded by opening new facets and changing the gaming experience. Examples: moderator tools provided to high reputation users on the stackexchange network.&#xD;&#xA;&#xD;&#xA;**Productivity**-The sense that what you've done is somehow productive and useful in some way, even if its intangible and/or abstract. Not all gaming experiences offer this, but some that do have been surprisingly successful. I think this dynamic is the only way to explain the success of sites/projects like stackoverflow.com, wikipedia and opensource software.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;Not quite a dynamic but necessary for any successful game:&#xD;&#xA;&#xD;&#xA;**Seamless interaction**-a neat, flawless and clear user-interface that does what the user expects it to do and does not overwhelm with choices." />
  <row Id="6160" PostHistoryTypeId="2" PostId="3168" RevisionGUID="4db037b4-d938-4a2f-a5de-74b3e0a809bf" CreationDate="2010-08-24T15:49:42.320" UserId="1874" Text="Animations also give it away. Every engine handles them in a different way and they also look and feel different while playing.&#xD;&#xA;&#xD;&#xA;You can spot engine limitations on animations and tell which engine was used by that too." />
  <row Id="6161" PostHistoryTypeId="2" PostId="3169" RevisionGUID="45304327-5ded-4289-83e0-f2a1ecf04608" CreationDate="2010-08-24T16:18:39.297" UserId="1557" Text="A thing to note also is the running within GTA. Holding A does a fast run but you get tired fairly quickly whereas tapping A makes you do a fast jog that you can keep up for a prolonged pierd of time. (I may have the presses the wrong way round)&#xD;&#xA;&#xD;&#xA;Regards&#xD;&#xA;Mark" />
  <row Id="6162" PostHistoryTypeId="2" PostId="3170" RevisionGUID="3dc01539-7e32-41ee-b373-fabdf22cf584" CreationDate="2010-08-24T17:02:47.237" UserId="395" Text="I've found that facial animations are usually a dead giveaway. There is a lot of variation and even with different art you can still see the same patterns in the textures." />
  <row Id="6163" PostHistoryTypeId="2" PostId="3171" RevisionGUID="c95cb19d-72a8-46a2-887f-387bb2eb35c4" CreationDate="2010-08-24T17:16:23.973" UserId="1863" Text="The chess game that I play on computer offers a 3D perspective of the chess board as an option. The graphics are fine and in a sense it makes game-play more true to real life, however I can't think of a more useless and annoying feature. &#xD;&#xA;When I think about chess, I'm doing so in two dimensions. Even when I play chess on a real chess board in real life, my mind instantly converts the three dimensional view of the board into a two-dimensional map for my mind to think with. Chess in virtual 3D creates a disconnect between the mind's logical representation of the game and the game's visual representation on the screen. The degrees of freedom afforded to a chess player can be contained in two dimensions, therefore, any other representation of the board detracts. If Pacman or Tetris was rendered in 3D, the games would not be any more addictive or fun.&#xD;&#xA;&#xD;&#xA;Games that leverage all the freedom of three dimensional environments, like first person shooter games, can't exist without three dimensional graphics. However, the degrees of player freedom afforded by tycoon and rts games can often be contained in two-dimensions and a three-dimensional representation isn't constructive.&#xD;&#xA;" />
  <row Id="6164" PostHistoryTypeId="2" PostId="3172" RevisionGUID="fbdeb0b4-3afc-4b6f-9126-884fe3a65e5b" CreationDate="2010-08-24T17:24:08.707" UserId="154" Text="A few fightings games do this. Normally it's a hold to charge and then release to attack, but in a few cases holding changes which later attacks you can combo off the initial attack. In those cases holding is just keeping the combo going until the next branch point in the animation.&#xD;&#xA;&#xD;&#xA;Hold as an analog continuation is less common in attacks because of the nature of animation. With a jump you can just loop a &quot;launched&quot; position as the player continues to rise, so the effect is easy to pull off. However for an attack, strong attacks tend to look different before contact is even made so it's difficult to transition them post starting an animation.&#xD;&#xA;" />
  <row Id="6165" PostHistoryTypeId="5" PostId="3171" RevisionGUID="4f43b2a9-fbac-45dd-8276-0f09c6b610e5" CreationDate="2010-08-24T17:57:00.177" UserId="1863" Comment="added 132 characters in body" Text="**The optimal number of dimensions for game graphics is a function of the degrees of freedom afforded to a player of that game**&#xD;&#xA;&#xD;&#xA;The chess game that I play on computer offers a 3D perspective of the chess board as an option. The graphics are fine and in a sense it makes game-play more true to real life, however I can't think of a more useless and annoying feature. &#xD;&#xA;When I think about chess, I'm doing so in two dimensions. Even when I play chess on a real chess board in real life, my mind instantly converts the three dimensional view of the board into a two-dimensional map for my mind to think with. Chess in virtual 3D creates a disconnect between the mind's logical representation of the game and the game's visual representation on the screen. The degrees of freedom afforded to a chess player can be contained in two dimensions, therefore, any other representation of the board detracts. If Pacman or Tetris was rendered in 3D, the games would not be any more addictive or fun.&#xD;&#xA;&#xD;&#xA;Games that leverage all the freedom of three dimensional environments, like first person shooter games, can't exist without three dimensional graphics. However, the degrees of player freedom afforded by tycoon and rts games can often be contained in two-dimensions and a three-dimensional representation isn't constructive.&#xD;&#xA;" />
  <row Id="6166" PostHistoryTypeId="2" PostId="3173" RevisionGUID="9d4c4277-8048-41e4-91d5-472e4c018566" CreationDate="2010-08-24T18:09:52.090" UserId="119" Text="...you know the ones. Something like &quot;value overlays&quot; or &quot;value pop-ups&quot; describes them quite well, but I was thinking they might have a real name?" />
  <row Id="6167" PostHistoryTypeId="1" PostId="3173" RevisionGUID="9d4c4277-8048-41e4-91d5-472e4c018566" CreationDate="2010-08-24T18:09:52.090" UserId="119" Text="What is the name for the little numbers that appear over characters' heads when they lose health?" />
  <row Id="6168" PostHistoryTypeId="3" PostId="3173" RevisionGUID="9d4c4277-8048-41e4-91d5-472e4c018566" CreationDate="2010-08-24T18:09:52.090" UserId="119" Text="&lt;gui&gt;&lt;interface&gt;&lt;glossary&gt;&lt;terminology&gt;" />
  <row Id="6169" PostHistoryTypeId="2" PostId="3174" RevisionGUID="536e671e-01a7-4f44-88e8-775fe637fcfd" CreationDate="2010-08-24T18:18:47.613" UserId="51" Text="In WoW terms the most popular addon is called Scrolling Combat Text, which I think describes it pretty well.&#xD;&#xA;&#xD;&#xA;When I've written my own implementations I use the more general &quot;Floating Game Text&quot;." />
  <row Id="6170" PostHistoryTypeId="2" PostId="3175" RevisionGUID="ec1037df-43c9-42a7-a005-91ae50885e4e" CreationDate="2010-08-24T18:59:42.867" UserId="395" Text="I think our term was &quot;Damage floaters&quot;." />
  <row Id="6171" PostHistoryTypeId="2" PostId="3176" RevisionGUID="490dda0c-c8b0-4aac-8539-e1d3dbb0b798" CreationDate="2010-08-24T19:03:28.627" UserId="1780" Text="&quot;Floating text&quot; does it for me.  That's what I've always called it, although I've never used it specifically for indicating damage done.  My usage was usually to indicate where something important in the scene was (e.g. &quot;retrieve this data disk&quot;)." />
  <row Id="6172" PostHistoryTypeId="2" PostId="3177" RevisionGUID="1b5a2aae-3f8b-49d7-a065-4dab5cb70033" CreationDate="2010-08-24T20:01:19.380" UserId="962" Text="In most Arcade style SHMUPS, if you tap the shot button it fires regular shot, but when you hold it down, it turns into a laser that is more powerful." />
  <row Id="6173" PostHistoryTypeId="2" PostId="3178" RevisionGUID="d4ca5801-584c-4315-adab-82e28b4b340a" CreationDate="2010-08-24T20:13:17.037" UserId="1879" Text="The [Axiom 3D Engine][1] is based on a C# port of Ogre. It has DirectX, OpenGL and XNA renderers, so is very portable, though some platforms are not very actively maintained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://axiom3d.net/wiki/index.php/Main_Page" />
  <row Id="6174" PostHistoryTypeId="16" PostId="3178" RevisionGUID="d4ca5801-584c-4315-adab-82e28b4b340a" CreationDate="2010-08-24T20:13:17.037" UserId="-1" />
  <row Id="6175" PostHistoryTypeId="5" PostId="3112" RevisionGUID="26b49a3d-7fc7-4742-8e9f-f491d0eac2af" CreationDate="2010-08-24T20:36:03.647" UserId="500" Comment="added some details and answered ; added 15 characters in body" Text="1. I seriously don't see a lot which couldn't be done with MaterialEditor. You can do almost everything that you need. One could argue that the material-editor isn't generating optimal shader-code, but the shader-compiler does a great job in optimizing the autogenerated code here. So, just try it. A lot of AAA games were developed with this toolchain and a lot of these just worked completely with materials built whith this editor.&#xD;&#xA;But to answer your question: No, this is not possible with the plain UDK.&#xD;&#xA;&#xD;&#xA;2. UE3 does not use deferred rendering. The shadowing system uses a kind of deferred technique on top of the forward renderer. But the renderpipeline is not deferred at all, so no G-Buffer or anything like that are available. &#xD;&#xA;More info about this:&#xD;&#xA;http://www.unrealtechnology.com/Downloads/Slides/xfest-gfx.ppt&#xD;&#xA;Unfortunately I was not able to find other publicly available documentation of the internals of UE3 with a quick search, so I hope this presentation gives you a good overview.&#xD;&#xA;The access of neighboring pixels is possible out of the box. Take a look at the DOF or Bloom posteffect. I am not sure if this is implemnted in code or via the Material-Editor, but if it is in the MaterialEditor, than you should be able to find an working example for this.&#xD;&#xA;&#xD;&#xA;3. You should take a look at the SceneCaptureActors. These can be used for render-to-texture stuff, but I'm not sure how much tuning possibilites you have for the out-of-the box UDK actors. You than can use this rendered texture in a material. Unfortunately your specific case ( rendering the depth ) is not supported in the UDK out of the box.&#xD;&#xA;&#xD;&#xA;In my opinion there isn't a lot that you can't do with the UE3 rendering-wise. The drag-and-drop material editing and the level-editor centric design might be not what a programmer expects, but it is exactly what content-guys are needing. This has proven itself as a really good solution at the end of the day. This of course requires that the content creators know the system and it's limitations.&#xD;&#xA;&#xD;&#xA;You should just give it a shot and try to build what you need using the tools the UDK provides. I am very positive that you will be able to get what you want." />
  <row Id="6176" PostHistoryTypeId="5" PostId="3112" RevisionGUID="654385e6-378a-4799-9f83-9a0359cb8c27" CreationDate="2010-08-24T20:43:07.523" UserId="500" Comment="added an answer to 4" Text="1. I seriously don't see a lot which couldn't be done with MaterialEditor. You can do almost everything that you need. One could argue that the material-editor isn't generating optimal shader-code, but the shader-compiler does a great job in optimizing the autogenerated code here. So, just try it. A lot of AAA games were developed with this toolchain and a lot of these just worked completely with materials built whith this editor.&#xD;&#xA;But to answer your question: No, this is not possible with the plain UDK.&#xD;&#xA;&#xD;&#xA;2. UE3 does not use deferred rendering. The shadowing system uses a kind of deferred technique on top of the forward renderer. But the renderpipeline is not deferred at all, so no G-Buffer or anything like that are available. &#xD;&#xA;More info about this:&#xD;&#xA;http://www.unrealtechnology.com/Downloads/Slides/xfest-gfx.ppt&#xD;&#xA;Unfortunately I was not able to find other publicly available documentation of the internals of UE3 with a quick search, so I hope this presentation gives you a good overview.&#xD;&#xA;The access of neighboring pixels is possible out of the box. Take a look at the DOF or Bloom posteffect. I am not sure if this is implemnted in code or via the Material-Editor, but if it is in the MaterialEditor, than you should be able to find an working example for this.&#xD;&#xA;&#xD;&#xA;3. You should take a look at the SceneCaptureActors. These can be used for render-to-texture stuff, but I'm not sure how much tuning possibilites you have for the out-of-the box UDK actors. You than can use this rendered texture in a material. Unfortunately your specific case ( rendering the depth ) is not supported in the UDK out of the box.&#xD;&#xA;&#xD;&#xA;4. No, this is not possible, but you could do a workaround by using Material-Parameters which are handled in the Material ( so one material would contain the shader for both modes ). You than can change the Material parameters via Kismet, which would allow you to do exactly what you need.&#xD;&#xA;&#xD;&#xA;In my opinion there isn't a lot that you can't do with the UE3 rendering-wise. The drag-and-drop material editing and the level-editor centric design might be not what a programmer expects, but it is exactly what content-guys are needing. This has proven itself as a really good solution at the end of the day. This of course requires that the content creators know the system and it's limitations.&#xD;&#xA;&#xD;&#xA;You should just give it a shot and try to build what you need using the tools the UDK provides. I am very positive that you will be able to get what you want." />
  <row Id="6177" PostHistoryTypeId="2" PostId="3179" RevisionGUID="ead587f4-27f3-4903-b6a3-1a6582e3da28" CreationDate="2010-08-24T21:22:24.287" UserId="138" Text="For what you're asking, I would **not** suggest the UDK. You do not have native access.&#xD;&#xA;&#xD;&#xA;Even if UDK did provide you script access to what you're asking for, it would be insanely sluggish, as UnrealScript is not the fastest of languages.&#xD;&#xA;&#xD;&#xA;Unreal does not use deferred rendering. Where did you hear this? Some licensees have implemented deferred rendering; but, natively, it does not ship with it.&#xD;&#xA;&#xD;&#xA;Other than that, I'm not a graphics guy :)" />
  <row Id="6178" PostHistoryTypeId="2" PostId="3180" RevisionGUID="a76aadfb-d4d7-4e36-ae49-1638a3e3a9d8" CreationDate="2010-08-24T21:43:50.760" UserId="1881" Text="i'm using cocos2d to build an iphone game.&#xD;&#xA;&#xD;&#xA;my game currently has two sprites: one for the main character and another for an item i should carry once he gets on him.&#xD;&#xA;&#xD;&#xA;the main character and the item are both box2d bodies. i can detect the collision between the two. what is want is to make the item body stick to the main character body when they meet, that way any movement of the main character would also affect the item.&#xD;&#xA;&#xD;&#xA;any suggestions on how to implement this?&#xD;&#xA;&#xD;&#xA;thanks!  " />
  <row Id="6179" PostHistoryTypeId="1" PostId="3180" RevisionGUID="a76aadfb-d4d7-4e36-ae49-1638a3e3a9d8" CreationDate="2010-08-24T21:43:50.760" UserId="1881" Text="cocos2d Merging box2d bodies" />
  <row Id="6180" PostHistoryTypeId="3" PostId="3180" RevisionGUID="a76aadfb-d4d7-4e36-ae49-1638a3e3a9d8" CreationDate="2010-08-24T21:43:50.760" UserId="1881" Text="&lt;box2d&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="6181" PostHistoryTypeId="2" PostId="3181" RevisionGUID="677f06d6-e2d7-42a2-a2ea-0e9b98778b73" CreationDate="2010-08-24T21:52:31.503" UserId="678" Text="I'm not familiar with Box2d in particular, but most physics engines implement the concept of a joint. You create a joint of the appropriate type, attach it to the bodies and presto! they move only in ways allowed by the joint." />
  <row Id="6182" PostHistoryTypeId="2" PostId="3182" RevisionGUID="e3def79c-eb69-4980-8e1e-55cb44c42aad" CreationDate="2010-08-24T21:54:19.660" UserId="1477" Text="I don't think you could do _exactly_ what you're talking about. You would need at least a short delay to tell if the player is just tapping or holding the button. Unless the animations for a powerful and weak attack start the same. Alternatively you could just have your weak attack followed by a stronger one if the button is held down." />
  <row Id="6183" PostHistoryTypeId="2" PostId="3183" RevisionGUID="beb64cc3-46af-4ca9-94db-1d652b8346bb" CreationDate="2010-08-25T00:09:01.987" UserId="1263" Text="That's the title of this Slate [article][1]. In particular, the following struck me:&#xD;&#xA;&#xD;&#xA;&gt; When he looks at video games from a critical distance, Bissell is concerned mainly with their lack of narrative meaning. Games ask us to save the princess, save the country, save the world, save ourselves—but no one plays games to achieve those ends. We play for the puzzle, for the physics, for the sense of being embedded in a fully realized world. Indeed, for me, the &quot;story&quot; usually seems like filler, even in games like Grand Theft Auto and RDR [Red Dead Redemption], whose stories are smarter than the rest of the video-game pack. RDR begins and ends every mission with cleverly scripted movielike &quot;cut scenes&quot; that provide some explanation for why your character is doing what he's doing—but the game also lets you skip the scenes, which I usually elect to do. Thus I can't really explain why my character is doing what he's doing. The real answer is he's doing it because I am making him do it, and I am making him do it only because I am having fun.&#xD;&#xA;&#xD;&#xA;&gt; &quot;This is one of the most suspect things about the game form,&quot; Bissell writes. &quot;A game with an involving story and poor gameplay cannot be considered a successful game, whereas a game with superb gameplay and a laughable story can see its spine bend from the weight of many accolades—and those who praise the latter game will not be wrong.&quot; What's the solution to this quandary? Should games invest more in story, in an attempt to bring us narratives that are on the level of those of the other popular arts? Or should games abandon story—is the video game, as a form, simply incompatible with traditional concepts of narrative, and must game designers instead find other ways to invest their creations with lasting meaning?&#xD;&#xA;&#xD;&#xA;As if Bissell's uncertainty is echoing throughout the game industry, there has arisen a tendency to make many big-budget blockbuster games heavily story-driven. Even Starcraft II has a fairly story-driven campaign.&#xD;&#xA;&#xD;&#xA;Is a game without a high-quality narrative bereft of true value and meaning? Must games have any meaning at all in the literary sense in order to be considered worthwhile forms of entertainment? What about emergent narratives, where the player has a decisive role in determining the plot (ideally much more decisive than we've seen in any games so far released)? If games do not need a higher literary meaning, do they at least need to have some lasting emotional significance for the player?&#xD;&#xA;&#xD;&#xA;Those are just some thoughts that the article raised. The real question can be summed up like this: what is the true *value* of a video game? Is a game to be valued on its dynamic interaction with the player, on its ability to present a narrative in a way other mediums cannot, or on its ability to provide simple pleasure?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.slate.com/id/2256613/pagenum/all/" />
  <row Id="6184" PostHistoryTypeId="1" PostId="3183" RevisionGUID="beb64cc3-46af-4ca9-94db-1d652b8346bb" CreationDate="2010-08-25T00:09:01.987" UserId="1263" Text="Are Video Games a Massive Waste of Time?" />
  <row Id="6185" PostHistoryTypeId="3" PostId="3183" RevisionGUID="beb64cc3-46af-4ca9-94db-1d652b8346bb" CreationDate="2010-08-25T00:09:01.987" UserId="1263" Text="&lt;game-design&gt;" />
  <row Id="6186" PostHistoryTypeId="5" PostId="3160" RevisionGUID="18056e28-5c28-4404-9b6a-28b6d699f9de" CreationDate="2010-08-25T00:18:54.117" UserId="1456" Comment="added 94 characters in body" Text="Why?&#xD;&#xA;&#xD;&#xA; - For similar design situations You use same engine methods.&#xD;&#xA; - Common environment technology is typical for concrete engine (Grass Trees).&#xD;&#xA; - Ground material mixing&#xD;&#xA; - Trigers and events systems have similar errors .&#xD;&#xA; - Lods and Loding systems are big mark of engines.&#xD;&#xA; - Shadow handling.&#xD;&#xA; - Postprocess handling.&#xD;&#xA; - Z-Buffers/Depth buffers make same errors on same distances .&#xD;&#xA; - A.I. behavior issues. Scripts handling.&#xD;&#xA; - Smoke, fire, rain, dust, snow, water, clouds, reflection&#xD;&#xA; - same noise textures/detail textures everybody likes to use :) in one engine.&#xD;&#xA; - Sky handling/sky boxes.&#xD;&#xA; - Caching&#xD;&#xA; - materials preset&#xD;&#xA; - and render math. All engines use their own variants of same math.&lt;BR&gt;&lt;BR&gt;&#xD;&#xA;EDITED:&#xD;&#xA;@ wkerslake adds &lt;BR&gt;&lt;BR&gt;&#xD;&#xA; -  level size/streaming &#xD;&#xA; -  phys in general&#xD;&#xA;" />
  <row Id="6187" PostHistoryTypeId="2" PostId="3184" RevisionGUID="28f5a64c-9b9e-41a5-a839-523a51ade9fe" CreationDate="2010-08-25T00:23:09.003" UserId="818" Text="I think the author is looking at it from the wrong perspective.  It's a matter of target audience and player preference.  He obviously strongly prefers gameplay over story and character considerations.  Some people are just the opposite, and some games (RPGs) are targetted at them.  RPGs are all about the story; the gameplay is just another narrative device.  (The Metal Gear Solid series, for example, takes this to extremes.)  In other genres, the story takes a back seat, but it's becoming more important as time goes by.  For example, even with all the fun, innovative physics puzzles, can anyone really claim that *Portal* would have been even half as fun without GlaDOS and all her craziness?&#xD;&#xA;&#xD;&#xA;We're seeing a lot of hybridization between the two extremes.  Having story and character development introduced into non story-driven genres, what TVTropes calls [RPG Elements,][1] is an inevitability of Moore's Law in my opinion.  Having a story that explains what's going on speaks to basic human desires.  It used to be, back when system resources were sharply limited, that building a story-driven game didn't leave much space for anything else, which is how RPGs appeared as a distinct genre.  But now that CPU and RAM power are much more plentiful, game developers have been putting &quot;RPG Elements&quot; in anywhere they can, because they improve the quality of the game.&#xD;&#xA;&#xD;&#xA;Look at first-person shooters, the original &quot;mindless cool graphics and gameplay mechanics&quot; genre.  Ask people what are the greatest FPSes of all time, and they won't say Quake or Unreal.  You hear about the Half-Life series and Deus Ex, and sometimes even games like Halo or Gears of War which quite frankly had pretty mediocre gameplay, but *interesting stories.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tvtropes.org/pmwiki/pmwiki.php/Main/RPGElements" />
  <row Id="6188" PostHistoryTypeId="4" PostId="3183" RevisionGUID="2f829ef5-bb01-403b-995f-d69d058629c8" CreationDate="2010-08-25T00:27:12.110" UserId="1263" Comment="I changed the capitalization of the title to be more consistent with this site.; edited title" Text="Are video games a massive waste of time?" />
  <row Id="6189" PostHistoryTypeId="2" PostId="3185" RevisionGUID="d052a790-8131-418a-bb2e-0e65b2ef188f" CreationDate="2010-08-25T02:09:21.960" UserId="165" Text="The advantage of any game, video, computer, boardgame - is that it's interactive. The player is *doing something*, interacting with a changing medium, responding, thinking, planning, dreaming, exploring, etc. As opposed to [passively sitting in front of a television four hours a night][1].&#xD;&#xA;&#xD;&#xA;Isn't this question a bit *meta*, anyway?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.csun.edu/science/health/docs/tv&amp;health.html" />
  <row Id="6190" PostHistoryTypeId="2" PostId="3186" RevisionGUID="97148bbe-f5b0-4c90-ad24-59228d9a4b2a" CreationDate="2010-08-25T02:10:15.440" UserId="1702" Text="Perhaps this could be better answered on Stack Overflow, but I thought it would be worth posting here. Right now I'm trying to make visual transitions with pygame's `surfarray` module which uses NumPy. I'm using Cave Story's dimond-checkerboard transitions as a model right now (you can see them in this video http://www.youtube.com/watch?v=mJbAs-sSX4A).&#xD;&#xA;&#xD;&#xA;I'm new to NumPy and I'm a little bit over my head. Is there an easy way to accomplish this, or are there any tutorials I should be following? Google brought up a bunch of general NumPy tutorials which I didn't find very helpful for my specific needs." />
  <row Id="6191" PostHistoryTypeId="1" PostId="3186" RevisionGUID="97148bbe-f5b0-4c90-ad24-59228d9a4b2a" CreationDate="2010-08-25T02:10:15.440" UserId="1702" Text="Help making a visual transition with pygame and NumPy" />
  <row Id="6192" PostHistoryTypeId="3" PostId="3186" RevisionGUID="97148bbe-f5b0-4c90-ad24-59228d9a4b2a" CreationDate="2010-08-25T02:10:15.440" UserId="1702" Text="&lt;graphics&gt;&lt;2d&gt;&lt;graphics-programming&gt;&lt;pygame&gt;&lt;python&gt;" />
  <row Id="6193" PostHistoryTypeId="6" PostId="3186" RevisionGUID="9d2d0615-30a8-4377-9ed8-62cfac81d6c9" CreationDate="2010-08-25T02:15:19.490" UserId="1702" Comment="added relevant tags" Text="&lt;graphics&gt;&lt;programming&gt;&lt;graphics-programming&gt;&lt;pygame&gt;&lt;python&gt;" />
  <row Id="6194" PostHistoryTypeId="2" PostId="3187" RevisionGUID="e890bc95-c25a-4490-a36a-3a83b24f9b29" CreationDate="2010-08-25T02:19:15.197" UserId="1477" Text="Creating resources endlessly is an issue but completely closed systems have their downfalls too. Take a look at shattered world. Completely closed economy with player run shops, banks, etc. Monsters in the world were actually equipped by items purchased from player shops by the game. The hoarding instinct mentioned above killed the game though. There were taxes but there was also a player monarch who surprisingly also enjoyed hoarding of money.&#xD;&#xA;&#xD;&#xA;To make a closed system work you need to give the rich players incentives to spend their money. This is similar to the classic open economy with the caveat that rich players giving money to poor players helps this system while it does little for the open one. One interesting way to do this is to put in place systems to allow rich players to &quot;hire&quot; poorer ones out. One could require large reserves of stone to maintain their opulent castle, much more then they could mine on their own, and allow them to have an NPC reward money from their vaults to players who help supply stone for the keep.&#xD;&#xA;&#xD;&#xA;Depending on how other resources are handled in the game you may actually end up with large amounts of deflation with infinite veins etc mentioned before." />
  <row Id="6195" PostHistoryTypeId="5" PostId="3186" RevisionGUID="27e12986-3b5c-4c4d-83b5-f3275828e358" CreationDate="2010-08-25T02:21:19.153" UserId="1702" Comment="spelling" Text="Perhaps this could be better answered on Stack Overflow, but I thought it would be worth posting here. Right now I'm trying to make visual transitions with pygame's `surfarray` module which uses NumPy. I'm using Cave Story's diamond-checkerboard transitions as a model right now (you can see them in this video http://www.youtube.com/watch?v=mJbAs-sSX4A).&#xD;&#xA;&#xD;&#xA;I'm new to NumPy and I'm a little bit over my head. Is there an easy way to accomplish this, or are there any tutorials I should be following? Google brought up a bunch of general NumPy tutorials which I didn't find very helpful for my specific needs." />
  <row Id="6196" PostHistoryTypeId="2" PostId="3188" RevisionGUID="069435ca-cebf-4ed1-9dc6-0ffd7ec02b30" CreationDate="2010-08-25T02:22:47.017" UserId="141" Text="I'm not much of an artist, but I'm trying to make decent particle effects in a 2.5D game. I'm making a replica of Wii Play's &quot;Tanks&quot; and I can't quite get the explosions to look good. I'm not going for the exact style as they had, probably something more realistic, less childish.&#xD;&#xA;&#xD;&#xA;My particle engine just draws a 2d texture on the screen, and supports, per particle: starting position, velocity, gravity (or any acceleration), air resistance (drag), color including alpha, starting size, size expansion rate, lifetime, and fade out rate.&#xD;&#xA;&#xD;&#xA;In my tank explosions, I'm drawing around 100 particles, and I've been tweaking parameters for days trying to get things looking good. So I'm wondering, what are some tips for getting good results? What's most important, specifically for explosions?&#xD;&#xA;&#xD;&#xA;* Having good quality textures?&#xD;&#xA;* Having a variety of textures?&#xD;&#xA;* The right colors?&#xD;&#xA;* Realistic movement of the particles?&#xD;&#xA;* Having lots and lots of particles, many more than 100?&#xD;&#xA;&#xD;&#xA;Check out [this image.][1] I tried to replicate it by making particles that shoot out and create more particles in their wake. But mine still isn't anything like that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/commons/2/28/Pi-explosion.jpg" />
  <row Id="6197" PostHistoryTypeId="1" PostId="3188" RevisionGUID="069435ca-cebf-4ed1-9dc6-0ffd7ec02b30" CreationDate="2010-08-25T02:22:47.017" UserId="141" Text="Tricks for getting good looking results from particle systems" />
  <row Id="6198" PostHistoryTypeId="3" PostId="3188" RevisionGUID="069435ca-cebf-4ed1-9dc6-0ffd7ec02b30" CreationDate="2010-08-25T02:22:47.017" UserId="141" Text="&lt;graphics&gt;&lt;textures&gt;&lt;particles&gt;" />
  <row Id="6199" PostHistoryTypeId="2" PostId="3189" RevisionGUID="ce59bc45-9b1a-419a-823a-6f7cd41193ec" CreationDate="2010-08-25T02:35:18.793" UserId="919" Text="I think the games Tobal, The Bouncer, and Crimson Tears fit your description the most. In these games the pressure exerted on the Analog PS1/2 controller gives different results. &#xD;&#xA;&#xD;&#xA;I.e. Tapping square gives you a jab, pushing it gives you an uppercut.&#xD;&#xA;" />
  <row Id="6200" PostHistoryTypeId="5" PostId="3189" RevisionGUID="fedc14d5-ec4b-4837-9d38-4062dd743e2b" CreationDate="2010-08-25T02:40:21.423" UserId="919" Comment="added 207 characters in body" Text="I think the games Tobal, The Bouncer, and Crimson Tears fit your description the most. In these games the pressure exerted on the Analog PS1/2 controller gives different results. &#xD;&#xA;&#xD;&#xA;I.e. Tapping square gives you a jab, pushing it gives you an uppercut.&#xD;&#xA;&#xD;&#xA;I should also add Tekken's Steve Fox has this tap, semi hold system where his attack change properties.&#xD;&#xA;&#xD;&#xA;KoF's Shen Woo had the qcf+P where holding slightly makes it into a launcher rather than a flinch." />
  <row Id="6201" PostHistoryTypeId="2" PostId="3190" RevisionGUID="c2d63c47-e305-47b7-ae15-5dd46d28de97" CreationDate="2010-08-25T03:03:38.530" UserId="647" Text="My contribution: **Tekken**. Different moves can be done by holding the button down or just tapping it. " />
  <row Id="6202" PostHistoryTypeId="16" PostId="3184" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T04:01:43.133" UserId="51" />
  <row Id="6203" PostHistoryTypeId="16" PostId="3185" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T04:01:43.133" UserId="51" />
  <row Id="6204" PostHistoryTypeId="16" PostId="3183" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T04:01:43.133" UserId="51" />
  <row Id="6205" PostHistoryTypeId="2" PostId="3191" RevisionGUID="e630b1eb-52c4-4b8f-8fdc-b779644128bf" CreationDate="2010-08-25T04:02:32.213" UserId="1272" Text="I stumbled across this tutorial a while back, which looks to be a good resource:&#xD;&#xA;&#xD;&#xA;http://www.gamedev.net/reference/art/features/howtoPartFx/" />
  <row Id="6206" PostHistoryTypeId="2" PostId="3192" RevisionGUID="5ffabccb-51ad-457b-9f3d-e3aa9a91bbfb" CreationDate="2010-08-25T04:25:10.267" UserId="370" Text="There has been **a lot** of discussion on this very topic on the Box2D forums.  You'll find most of the info under the guise of breakable bodies, which is you problem in reverse.  Here are my suggestions in order of easiness:&#xD;&#xA;&#xD;&#xA;1. Depending on the situation you could just change the animation of the main character to show that he is now carrying the item without needing the item to still be physically simulated.&#xD;&#xA;&#xD;&#xA;2. If that isn't enough, add a new `b2Shape` to the main characters `b2Body`.  The new shape will look exactly like the shape used in the item and be attached right where you need it.&#xD;&#xA;&#xD;&#xA;3. Lastly, you can use the new weld joint to attach the item to the main character.  Note, a weld joint is more like a rubber cement joint.  If you want the item to fixed securely in place, use option 2.&#xD;&#xA;" />
  <row Id="6207" PostHistoryTypeId="2" PostId="3193" RevisionGUID="f9072539-def5-4c2a-9909-19f57f715648" CreationDate="2010-08-25T05:27:43.267" UserId="404" Text="I'm creating an app in XNA. &#xD;&#xA;&#xD;&#xA;I'm trying to load a custom save file. I named the file with my own custom extension. It's an XML file serialized with the DataContractSerializer.&#xD;&#xA;&#xD;&#xA;I've tried several things to load the file. And they all work when I'm running in my development environment, or when the game is running from most folders, but if the game has been placed in the program files folder (or any other protected by Windows 7), the game won't load my custom files, but it will load images and other items that the content importer handles naturally.&#xD;&#xA;&#xD;&#xA;Things I have tried:&#xD;&#xA;&#xD;&#xA;- Directly loading the file using the DirectoryInfo.CurrentDirectory() then scanning for files, and loading them.&#xD;&#xA;- Using the StorageContainer.TitleLocation&#xD;&#xA;- Creating a custom importer, and loading them into the content pipeline&#xD;&#xA;&#xD;&#xA;In all cases, it works fine running in my IDE (C# Express 2008), but when the app is running from Program Files, I get the following error:&#xD;&#xA;&#xD;&#xA;Access to the path 'C:\Program Files\MyFolder\MyAppName\Content\CustomFolder\Blah.CustomExtension' is denied.&#xD;&#xA;&#xD;&#xA;Any suggestions?" />
  <row Id="6208" PostHistoryTypeId="1" PostId="3193" RevisionGUID="f9072539-def5-4c2a-9909-19f57f715648" CreationDate="2010-08-25T05:27:43.267" UserId="404" Text="How do I prevent getting an access denied loading a file in XNA, when I have the application running in the program files directory (in Windows 7)?" />
  <row Id="6209" PostHistoryTypeId="3" PostId="3193" RevisionGUID="f9072539-def5-4c2a-9909-19f57f715648" CreationDate="2010-08-25T05:27:43.267" UserId="404" Text="&lt;xna&gt;&lt;windows&gt;&lt;loading&gt;&lt;file&gt;" />
  <row Id="6210" PostHistoryTypeId="5" PostId="3192" RevisionGUID="735a44f2-d9ad-466f-8998-831a809c560b" CreationDate="2010-08-25T06:34:23.617" UserId="370" Comment="added 1 characters in body" Text="There has been **a lot** of discussion on this very topic on the Box2D forums.  You'll find most of the info under the guise of breakable bodies, which is your problem in reverse.  Here are my suggestions in order of easiness:&#xD;&#xA;&#xD;&#xA;1. Depending on the situation you could just change the animation of the main character to show that he is now carrying the item without needing the item to still be physically simulated.&#xD;&#xA;&#xD;&#xA;2. If that isn't enough, add a new `b2Shape` to the main characters `b2Body`.  The new shape will look exactly like the shape used in the item and be attached right where you need it.&#xD;&#xA;&#xD;&#xA;3. Lastly, you can use the new weld joint to attach the item to the main character.  Note, a weld joint is more like a rubber cement joint.  If you want the item to fixed securely in place, use option 2.&#xD;&#xA;" />
  <row Id="6211" PostHistoryTypeId="2" PostId="3194" RevisionGUID="72e15af5-29b2-4eb4-a16e-63fb7810d659" CreationDate="2010-08-25T07:08:05.417" UserId="778" Text="Without reading this in it's entirety my gut reaction is that people like this immediately sound as though they have no credentials:  &#xD;&#xA;&#xD;&#xA;&gt; but no one plays games to achieve those ends  &#xD;&#xA;&#xD;&#xA;Unsubstantiated opinion, I would even go so far as to call this a lie.  &#xD;&#xA;&gt; even in games like Grand Theft Auto and RDR [Red Dead Redemption], whose stories are smarter than the rest of the video-game pack  &#xD;&#xA;&#xD;&#xA;My opinion is that these games have some of the most cookie cutted stories of the industry - even Doom3 and HL2 have more original stories than these!&#xD;&#xA;&#xD;&#xA;The reporter comes across like somebodies grand-dad.&#xD;&#xA;Bottom line - multi billion dollar industries, growing faster then most others, rooted in entertainment, cannot be described as a waste of time! IMHO :)" />
  <row Id="6212" PostHistoryTypeId="16" PostId="3194" RevisionGUID="72e15af5-29b2-4eb4-a16e-63fb7810d659" CreationDate="2010-08-25T07:08:05.417" UserId="-1" />
  <row Id="6213" PostHistoryTypeId="2" PostId="3195" RevisionGUID="fd2e69d9-e6e3-4bc6-9603-7ecba4622d0e" CreationDate="2010-08-25T07:35:08.500" UserId="678" Text="I think it's not very unlike movies. You have genres and traditions, and they value different things. Look for example at Fellini's 8 1/2. Undoubtedly a masterpiece, but very light on narrative. Contrast it with Citizen Kane, again one of the quintessential cinematographic masterpieces, with it's complex plot and reveal. &#xD;&#xA;&#xD;&#xA;We do not try to judge all films by the same standard. We should certainly not attempt to do the same for a medium like video games, as it is even more diverse.&#xD;&#xA;&#xD;&#xA;With regards to the titular question, I do not think games in general are more of a waste of time than other forms of entertainment. Of course, just like in the other media, there is tremendous variation of quality even within a single genre. There's Max Paine and Serious Sam, just as there's Great Expectations and the romance novels at the supermarket checkout." />
  <row Id="6214" PostHistoryTypeId="16" PostId="3195" RevisionGUID="fd2e69d9-e6e3-4bc6-9603-7ecba4622d0e" CreationDate="2010-08-25T07:35:08.500" UserId="-1" />
  <row Id="6215" PostHistoryTypeId="2" PostId="3196" RevisionGUID="5a22109c-c56b-4b28-b7a6-f101d52ba4fd" CreationDate="2010-08-25T07:43:47.030" UserId="919" Text="Well I like to play games that give me a wide breath of options. For most part I see games implementing certain archetypes like the usual RPG trinity (tank, DPS and healer).&#xD;&#xA;&#xD;&#xA;So far the most archetypes I've seen are in fighting, card and strategy games.&#xD;&#xA;&#xD;&#xA;Fighting games archetypes I've seen are rush down (GG Accent Core Venom, Kof 2k1 heidern), grappler (SF Zangief), zoning (SF Dhalsim, KoF Billy Kane), ranged(GG Dizzy), trapper (GG testament), well rounded (SF Ryu), status effects (GG Baiken), chance (GG Faust), counter (GG Baiken), time (Arcana Heart Anutpada, Psychic force Wong, Jojo's Bizarre adventure Dio) and positions control (Arcana Heart Dieu Mort). &#xD;&#xA;&#xD;&#xA;Card Games: Burn, milling, OTK, counter, graveyard based, trapping (Yu-gi-oh), remove from play, restrict. &#xD;&#xA;&#xD;&#xA;Strategy games: League of legends have a number of them so I'll just link to their wiki (http://leagueoflegends.wikia.com/wiki/Champion_Attributes), add to that builders as well. &#xD;&#xA;&#xD;&#xA;So any other that you guys might know that is worth mentioning?" />
  <row Id="6216" PostHistoryTypeId="1" PostId="3196" RevisionGUID="5a22109c-c56b-4b28-b7a6-f101d52ba4fd" CreationDate="2010-08-25T07:43:47.030" UserId="919" Text="Anyone know of other unique playable archetypes ?" />
  <row Id="6217" PostHistoryTypeId="3" PostId="3196" RevisionGUID="5a22109c-c56b-4b28-b7a6-f101d52ba4fd" CreationDate="2010-08-25T07:43:47.030" UserId="919" Text="&lt;game-design&gt;" />
  <row Id="6218" PostHistoryTypeId="16" PostId="3196" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:50:02.387" UserId="51" />
  <row Id="6219" PostHistoryTypeId="16" PostId="3165" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6220" PostHistoryTypeId="16" PostId="3166" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6221" PostHistoryTypeId="16" PostId="3167" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6222" PostHistoryTypeId="16" PostId="3169" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6223" PostHistoryTypeId="16" PostId="3172" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6224" PostHistoryTypeId="16" PostId="3177" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6225" PostHistoryTypeId="16" PostId="3182" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6226" PostHistoryTypeId="16" PostId="3189" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6227" PostHistoryTypeId="16" PostId="3190" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6228" PostHistoryTypeId="16" PostId="3164" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-25T07:52:01.890" UserId="51" />
  <row Id="6229" PostHistoryTypeId="5" PostId="3196" RevisionGUID="2c0205db-818c-4f20-b678-aa7dbace0a43" CreationDate="2010-08-25T08:11:03.190" UserId="919" Comment="added 34 characters in body" Text="Well I like to play games that give me a wide breath of options. For most part I see games implementing certain archetypes like the usual RPG trinity (tank, DPS and healer).&#xD;&#xA;&#xD;&#xA;So far the most archetypes I've seen are in fighting, card and strategy games.&#xD;&#xA;&#xD;&#xA;Fighting games archetypes I've seen are rush down (GG Accent Core Venom, Kof 2k1 heidern), grappler (SF Zangief), zoning (SF Dhalsim, KoF Billy Kane), ranged(GG Dizzy), trapper (GG testament), well rounded (SF Ryu), status effects (GG Baiken), chance (GG Faust), counter (GG Baiken), time (Arcana Heart Anutpada, Psychic force Wong, Jojo's Bizarre adventure Dio) and positions control (Arcana Heart Dieu Mort). &#xD;&#xA;&#xD;&#xA;Card Games: Burn, milling, OTK, counter, graveyard based, trapping (Yu-gi-oh), remove from play, restrict. &#xD;&#xA;&#xD;&#xA;Strategy games: League of legends have a number of them so I'll just link to their wiki (http://leagueoflegends.wikia.com/wiki/Champion_Attributes) note not all are archetype though, add to that builders as well. &#xD;&#xA;&#xD;&#xA;So any other that you guys might know that is worth mentioning?" />
  <row Id="6230" PostHistoryTypeId="2" PostId="3197" RevisionGUID="6831ceef-2d48-4e50-a98d-aa6d05bac027" CreationDate="2010-08-25T08:14:04.490" UserId="678" Text="You can easily do regular checkerboards by using numpy to copy parts of an image (array) onto another array, like this:&#xD;&#xA;&#xD;&#xA;    # Let's define two arrays to work on. They should be replaced with your surfaces&#xD;&#xA;    a = numpy.ones((640,480))&#xD;&#xA;    b = numpy.zeros((640,480))&#xD;&#xA;&#xD;&#xA;    a[100:110,200:210] = b[100:110, 200:210]&#xD;&#xA;&#xD;&#xA;Obviously you can mix it up, copy from multiple sources and different locations if you need it for your effects. Since everything is handled by numpy (without coming back to python after every pixel) it is quite fast.&#xD;&#xA;&#xD;&#xA;The only limitation is that the source and destination must be the same size (or obey the broadcasting rules, but that's not what you want here).&#xD;&#xA;&#xD;&#xA;I'm not sure how to generalize this to diamond patterns, but this should get you started." />
  <row Id="6231" PostHistoryTypeId="5" PostId="3197" RevisionGUID="ca8b2f99-de55-4493-93b3-d3a2d3b23f38" CreationDate="2010-08-25T08:28:12.277" UserId="678" Comment="added 156 characters in body" Text="You can easily do regular checkerboards by using numpy to copy parts of an image (array) onto another array, like this:&#xD;&#xA;&#xD;&#xA;    # Let's define two arrays to work on. They should be replaced with your surfaces&#xD;&#xA;    a = numpy.ones((640,480))&#xD;&#xA;    b = numpy.zeros((640,480))&#xD;&#xA;&#xD;&#xA;    a[100:110,200:210] = b[100:110, 200:210]&#xD;&#xA;&#xD;&#xA;Obviously you can mix it up, copy from multiple sources and different locations if you need it for your effects. Since everything is handled by numpy (without coming back to python after every pixel) it is quite fast.&#xD;&#xA;&#xD;&#xA;The only limitation is that the source and destination must be the same size (or obey the broadcasting rules, but that's not what you want here).&#xD;&#xA;&#xD;&#xA;I'm not sure how to generalize this to diamond patterns. You could do the same for every scanline, but I'm afraid that it might bee too slow. On the other hand, to mimic 8-bit era transition, that could be exactly the effect you are looking for!" />
  <row Id="6232" PostHistoryTypeId="2" PostId="3198" RevisionGUID="dfdf875d-d8cb-4f12-a9ea-2ba6a1c493e5" CreationDate="2010-08-25T08:35:55.240" UserId="741" Text="As the commenter said: check to see if your app runs fine when running as administrator, because if it does, that suggests something different.&#xD;&#xA;&#xD;&#xA;Otherwise, I think you're running into a straightforward access rights issue. You don't, as a rule, have the right to open any files under &quot;C:\Program Files&quot; with write access. So you don't get to save any files there at all. Your question suggests though that it's not the saving that is causing you problems, but the loading. Still, you need to make absolutely sure that you're not trying to open the files with the wrong access permissions.&#xD;&#xA;&#xD;&#xA;You don't say what functions you're actually using to do the loading, we'd need to see that code to confirm. But as an acid test, you should be able to call:&#xD;&#xA;&#xD;&#xA;    File file = File.Open(path, FileMode.Open, FileAccess.Read);&#xD;&#xA;&#xD;&#xA;Which should work, even for files under Program Files.&#xD;&#xA;&#xD;&#xA;NB: If you're just using the 'plain' versions of the functions, i.e. omitting the FileAccess.Read parameter, then **the system will default to FileAccess.ReadWrite**. You will not be allowed to open files using FileAccess.ReadWrite, if they live in the Program Files hierarchy. Even if you never write anything to those files, the open call will fail unless you ask for the right sort of access.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6233" PostHistoryTypeId="2" PostId="3199" RevisionGUID="36c3abaf-78b2-42b6-8c1d-76f8e18ed8f8" CreationDate="2010-08-25T08:38:28.667" UserId="741" Text="Worth checking the [recent post][1] from Richard Bartle (co-creator of MUD), on the evolution of the DPS/tank/heal team structure, and alternatives.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youhaventlived.com/qblog/2010/QBlog190810A.html" />
  <row Id="6234" PostHistoryTypeId="16" PostId="3199" RevisionGUID="36c3abaf-78b2-42b6-8c1d-76f8e18ed8f8" CreationDate="2010-08-25T08:38:28.667" UserId="-1" />
  <row Id="6235" PostHistoryTypeId="2" PostId="3200" RevisionGUID="eaf17b30-9a18-4a49-97ef-b326e4613037" CreationDate="2010-08-25T08:41:12.407" UserId="744" Text="The Inform community, which probably writes more realistic game conversations than anyone else, &lt;a href=&quot;http://inform7.com/write/extensions/&quot;&gt;has several different tricks and extensions for scripting character conversations&lt;/a&gt;. The _content_ of these conversations is generally scripted, but the _form_ is more dynamic, or at least more variable. This is not a traditional area of AI research, although some people like &lt;a href=&quot;http://nickm.com/if/&quot;&gt;Nick Montfort&lt;/a&gt; are breaking new ground in this area." />
  <row Id="6236" PostHistoryTypeId="2" PostId="3201" RevisionGUID="a1a35b63-07f0-43c7-8460-0397a9aab2f0" CreationDate="2010-08-25T08:44:30.420" UserId="119" Text="Many of the more diligent software developers I know are moving to inversion of control and dependency injection to handle references to objects. Coming from a Flash games perspective I don't know all the ins and outs of AAA studios, so: are these used in the retail game world?" />
  <row Id="6237" PostHistoryTypeId="1" PostId="3201" RevisionGUID="a1a35b63-07f0-43c7-8460-0397a9aab2f0" CreationDate="2010-08-25T08:44:30.420" UserId="119" Text="Do retail games use &quot;inversion of control&quot; and &quot;dependency injection&quot;?" />
  <row Id="6238" PostHistoryTypeId="3" PostId="3201" RevisionGUID="a1a35b63-07f0-43c7-8460-0397a9aab2f0" CreationDate="2010-08-25T08:44:30.420" UserId="119" Text="&lt;design-patterns&gt;" />
  <row Id="6239" PostHistoryTypeId="2" PostId="3202" RevisionGUID="625793c4-3955-4f62-a691-e71211a02b3b" CreationDate="2010-08-25T08:52:25.910" UserId="259" Text="Not in my experience.  Which is a shame, as games code needs to be very adaptable, and these approaches would definitely help.&#xD;&#xA;&#xD;&#xA;However it must be said that both methods could, in C++, introduce virtual tables where there were none before, bringing with them an appropriate performance hit." />
  <row Id="6240" PostHistoryTypeId="2" PostId="3203" RevisionGUID="793bb2d2-858d-4180-a67b-4c744a105ad3" CreationDate="2010-08-25T08:55:13.127" UserId="1101" Text="Soccer games often have something like this: click once for a basic or short pass or shot, and hold down the button to ramp up the power and kick it harder and further. While not exactly an 'attack' this has the same time/potency tradeoff that you're presumably thinking about." />
  <row Id="6241" PostHistoryTypeId="16" PostId="3203" RevisionGUID="793bb2d2-858d-4180-a67b-4c744a105ad3" CreationDate="2010-08-25T08:55:13.127" UserId="-1" />
  <row Id="6242" PostHistoryTypeId="2" PostId="3204" RevisionGUID="cbb6cf33-16d1-4166-b130-1f88a37deae7" CreationDate="2010-08-25T10:36:56.400" UserId="1628" Text="You might get some ideas from here: http://en.wikipedia.org/wiki/List_of_Magic:_The_Gathering_keywords&#xD;&#xA;&#xD;&#xA;Magic is so lovingly designed - it's just a shame they obsolete and replace their wonderfully designed series after what feels like five seconds... it's a business model I guess - but it doesn't get my money anymore.&#xD;&#xA;&#xD;&#xA;Your archetypes are going to vary wildly based on the context. A grand strategy game might have 'civilian', 'land military', 'naval military', 'air military' concepts, for example." />
  <row Id="6243" PostHistoryTypeId="16" PostId="3204" RevisionGUID="cbb6cf33-16d1-4166-b130-1f88a37deae7" CreationDate="2010-08-25T10:36:56.400" UserId="-1" />
  <row Id="6244" PostHistoryTypeId="2" PostId="3205" RevisionGUID="8b0896da-b60b-4039-8a8c-326939b77f6b" CreationDate="2010-08-25T11:27:45.600" UserId="1597" Text="I would say that it is one tool among many, and it is used on occasion. As tenpn said any method that introduces vtables (and generally any extra indirection) can have a performance penalty, but this is something that we should only worry about for low-level code. For high-level structural code that isn't really an issue, and IoC can have positive benefits. Anything to reduce dependencies between classes and make your code more flexible." />
  <row Id="6245" PostHistoryTypeId="2" PostId="3206" RevisionGUID="2b523cd7-6227-4b67-a85a-320711bc433c" CreationDate="2010-08-25T13:40:56.553" UserId="458" Text="Yes, this mechanic is common enough that there's a name for them: &quot;charge attacks&quot;.&#xD;&#xA;&#xD;&#xA;I've seen them mostly with side-scrolling shooters; it was popularized by R-Type (which is the earliest game I know of that had this mechanic) but some of the Gradius and Raiden games featured this as well." />
  <row Id="6246" PostHistoryTypeId="16" PostId="3206" RevisionGUID="2b523cd7-6227-4b67-a85a-320711bc433c" CreationDate="2010-08-25T13:40:56.553" UserId="-1" />
  <row Id="6247" PostHistoryTypeId="2" PostId="3207" RevisionGUID="f971c2ca-3301-42b8-a583-0053cc2330b7" CreationDate="2010-08-25T13:48:50.260" UserId="458" Text="A word of warning: it sounds from your description like Seth is talking specifically about Facebook and other &quot;social media&quot; games. If those are the kinds of games you're designing then great, but be aware that the entire space of game design is much larger. (As others have said, the world has more than 7 dynamics.) If you want to know the other 3 that Seth was referring to, I'd suggest playing a bunch of Facebook games and looking for patterns. I'd be shocked if &quot;set collection&quot; isn't one of them.&#xD;&#xA;&#xD;&#xA;Another thing to be aware of: there is a difference between Mechanics and Dynamics, and what you're listing are actually Mechanics. It's good to be clear about exactly what you're looking for.&#xD;&#xA;&#xD;&#xA;The MDA paper (referenced in coderanger's answer) is talking about kinds of fun (what the authors refer to as &quot;aesthetics&quot; rather than mechanics and dynamics), although that paper does a good job explaining the difference. Note also there are other kinds of fun beyond these, as the authors admit." />
  <row Id="6248" PostHistoryTypeId="2" PostId="3208" RevisionGUID="871cd653-7f10-4896-921f-32896eb9157b" CreationDate="2010-08-25T13:53:11.607" UserId="458" Text="I think it might be a simplicity thing. As a player, it's easier to think in 2D than 3D. The game I'm thinking of was the old FPS &quot;Descent&quot; which actually required navigation in all three dimensions. Great game, but not palatable for some players whose brains just weren't used to thinking in 360 degrees." />
  <row Id="6249" PostHistoryTypeId="2" PostId="3209" RevisionGUID="3ec5ec6e-63cb-4b28-9057-96bde9a102cb" CreationDate="2010-08-25T14:00:47.230" UserId="458" Text="&gt; what is the true value of a video&#xD;&#xA;&gt; game? Is a game to be valued on its&#xD;&#xA;&gt; dynamic interaction with the player,&#xD;&#xA;&gt; on its ability to present a narrative&#xD;&#xA;&gt; in a way other mediums cannot, or on&#xD;&#xA;&gt; its ability to provide simple&#xD;&#xA;&gt; pleasure?&#xD;&#xA;&#xD;&#xA;Who says it has to be one or the other? These aren't mutually exclusive.&#xD;&#xA;&#xD;&#xA;Some games have great linear stories. No reason why they can't, really. There can be value there.&#xD;&#xA;&#xD;&#xA;Some games have non-linear stories that let the player create their own, to varying degrees of success. There can be value in the player-created stories, and also in the system that enables them (the same way that the printing press isn't &quot;great fiction&quot; in and of itself, but is still useful for creating such).&#xD;&#xA;&#xD;&#xA;Some games have outstanding visual art. Even without anything else, if a painting can have meaning, certainly a painting inside a game could do the same.&#xD;&#xA;&#xD;&#xA;Some games have meaning embedded purely within their mechanics. These games may not even have art or a story but they still contain meaning that can be learned through interaction on a purely mechanical level.&#xD;&#xA;&#xD;&#xA;Then of course there's the social meaning of playing games with other people, which is enough of a topic that you could probably write several books on the subject (if they haven't already)." />
  <row Id="6250" PostHistoryTypeId="16" PostId="3209" RevisionGUID="3ec5ec6e-63cb-4b28-9057-96bde9a102cb" CreationDate="2010-08-25T14:00:47.230" UserId="-1" />
  <row Id="6251" PostHistoryTypeId="2" PostId="3210" RevisionGUID="18b589b0-43d6-4d5d-871f-6e0959310528" CreationDate="2010-08-25T14:06:00.127" UserId="769" Text="Unless you run the game as Administrator (which you don't want, if only because some players simply won't be able to) you don't permission to write in the Program Files directory.&#xD;&#xA;&#xD;&#xA;You should write save games, downloaded maps and other such files somewhere in the directories belonging to the user (Documents, Application Data or something like that)." />
  <row Id="6252" PostHistoryTypeId="2" PostId="3211" RevisionGUID="2fa35039-d13b-4f96-9f5a-f6c075a2579d" CreationDate="2010-08-25T14:10:31.427" UserId="1101" Text="I think you've possibly mis-stated the premise of the original article (and I say possibly as I haven't read it). I don't think he has an opinion of the importance or otherwise of narrative in games, but I do think he's concerned that you can tack a bad story onto a game and it's still a great game. In that case, what value does the story have at all? Is the story just a charade to dress up the game - if so, for whose benefit?&#xD;&#xA;&#xD;&#xA;It would be like having 'click to fast-forward' on the love scenes in action films. That would be akin to admitting that the scene is completely unnecessary. And indeed sometimes it is - but while film suffers from sometimes being a little incongruous, games seem to embrace it, flaunting the optional nature of certain aspects of the work. &#xD;&#xA;&#xD;&#xA;So, in answer to his final question, *&quot;must game designers instead find other ways to invest their creations with lasting meaning&quot;*, I would say that they should certainly consider other ways (if indeed they care about meaning), but that if narrative forms a part or a whole of their game, it should be viewed as an integral design feature, not a bolt-on cosmetic aspect." />
  <row Id="6253" PostHistoryTypeId="16" PostId="3211" RevisionGUID="2fa35039-d13b-4f96-9f5a-f6c075a2579d" CreationDate="2010-08-25T14:10:31.427" UserId="-1" />
  <row Id="6254" PostHistoryTypeId="2" PostId="3212" RevisionGUID="03511287-e79d-4449-b8e3-401aeca22ca5" CreationDate="2010-08-25T14:20:25.870" UserId="1101" Text="You call it 'diligent software development', I call it 'painful overengineering'. That's not to say that inversion of control is bad - in fact, the basic definition of it is good - but the proliferation of entire frameworks and methods of working to achieve all this is little short of insane, especially combined with the way people are trashing perfectly good and clean interfaces in order to be able to inject interchangeable components that 99% of the time you'll never interchange. It's the sort of thing that could only originate from the Java enterprise environment and I'm glad it doesn't has as much of a foothold elsewhere.&#xD;&#xA;&#xD;&#xA;Often the argument is that even if you don't interchange components, you want to be able to test them in isolation with mock objects and the like. However, I'm afraid I will never buy the argument that it's worth bloating and complicating an interface in order to be better able to test it. Testing proves one thing only - that your tests work. Clean and minimal interfaces on the other hand go a long way towards **proving** that your code works.&#xD;&#xA;&#xD;&#xA;So, the short answer: yes, but not in the way you're thinking. Sometimes, when you need interchangeable behaviour, you'll pass in an object to a constructor that dictates part of the new object's behaviour. That's about it." />
  <row Id="6255" PostHistoryTypeId="2" PostId="3213" RevisionGUID="844ae29c-f6ea-4723-8066-9c31f4f14208" CreationDate="2010-08-25T14:29:34.883" UserId="1101" Text="I'm not sure what use you'd find with screenshots! Ultimately it's just plain text, and you are going to be given a menu which is a list of whatever is changeable for that entity. You pick your option, enter a new value, repeat. There are 3 or 4 different brands of OLC for MUDs and although the presentation is slightly different for each, they're all pretty much the same really. (Here's a screenshot, though I don't think it'll do you much good: http://mud.wikia.com/wiki/NiMUD)&#xD;&#xA;&#xD;&#xA;Are you actually interested in the OLC, or are you more interested in just learning what attributes exist on mobs, objects, rooms, etc? The latter can be more easily found by scanning the source code. (eg. Go through Merc.h in a ROM 2.4, for example.)" />
  <row Id="6256" PostHistoryTypeId="5" PostId="3193" RevisionGUID="acbda7a5-65c1-475e-9dd8-4b5aea336a6b" CreationDate="2010-08-25T14:37:05.127" UserId="404" Comment="Add administrator note" Text="I'm creating an app in XNA. &#xD;&#xA;&#xD;&#xA;I'm trying to load a custom save file. I named the file with my own custom extension. It's an XML file serialized with the DataContractSerializer.&#xD;&#xA;&#xD;&#xA;I've tried several things to load the file. And they all work when I'm running in my development environment, or when the game is running from most folders, but if the game has been placed in the program files folder (or any other protected by Windows 7), the game won't load my custom files, but it will load images and other items that the content importer handles naturally.&#xD;&#xA;&#xD;&#xA;Things I have tried:&#xD;&#xA;&#xD;&#xA;- Directly loading the file using the DirectoryInfo.CurrentDirectory() then scanning for files, and loading them.&#xD;&#xA;- Using the StorageContainer.TitleLocation&#xD;&#xA;- Creating a custom importer, and loading them into the content pipeline&#xD;&#xA;&#xD;&#xA;In all cases, it works fine running in my IDE (C# Express 2008), but when the app is running from Program Files, I get the following error:&#xD;&#xA;&#xD;&#xA;Access to the path 'C:\Program Files\MyFolder\MyAppName\Content\CustomFolder\Blah.CustomExtension' is denied.&#xD;&#xA;&#xD;&#xA;I am running as administrator.&#xD;&#xA;&#xD;&#xA;Any suggestions?" />
  <row Id="6257" PostHistoryTypeId="5" PostId="3193" RevisionGUID="1d74f7e0-53c0-4bca-a008-44f1b95bab48" CreationDate="2010-08-25T14:46:18.200" UserId="404" Comment="more clarity" Text="I'm creating an app in XNA. &#xD;&#xA;&#xD;&#xA;I'm trying to load a custom save file. I named the file with my own custom extension. It's an XML file serialized with the DataContractSerializer.&#xD;&#xA;&#xD;&#xA;I've tried several things to load the file. And they all work when I'm running in my development environment, or when the game is running from most folders, but if the game has been placed in the program files folder (or any other protected by Windows 7), the game won't load my custom files, but it will load images and other items that the content importer handles naturally.&#xD;&#xA;&#xD;&#xA;Things I have tried:&#xD;&#xA;&#xD;&#xA;- Directly loading the file using the DirectoryInfo.CurrentDirectory() then scanning for files, and loading them.&#xD;&#xA;- Using the StorageContainer.TitleLocation&#xD;&#xA;- Creating a custom importer, and loading them into the content pipeline&#xD;&#xA;&#xD;&#xA;In all cases, it works fine running in my IDE (C# Express 2008), but when the app is running from Program Files, I get the following error:&#xD;&#xA;&#xD;&#xA;Access to the path 'C:\Program Files\MyFolder\MyAppName\Content\CustomFolder\Blah.CustomExtension' is denied.&#xD;&#xA;&#xD;&#xA;I am running as administrator (though obviously, I eventually don't want the end user to need this right).&#xD;&#xA;&#xD;&#xA;Any suggestions?" />
  <row Id="6258" PostHistoryTypeId="5" PostId="3201" RevisionGUID="66759464-33b8-41bb-9127-c78e6925cedf" CreationDate="2010-08-25T15:21:03.477" UserId="119" Comment="added 130 characters in body" Text="Many of the more diligent software developers I know are moving to [inversion of control][1] and [dependency injection][2] to handle references to objects. Coming from a Flash games perspective I don't know all the ins and outs of AAA studios, so: are these used in the retail game world?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Inversion_of_control&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Dependency_injection" />
  <row Id="6259" PostHistoryTypeId="2" PostId="3214" RevisionGUID="f138ac0d-d362-45b5-bbd8-82d055c915ee" CreationDate="2010-08-25T15:38:16.083" UserDisplayName="Sergio" Text="Where is a good place to look for people interested in creating games online? I'll be using XNA.&#xD;&#xA;&#xD;&#xA;I'm going to start the project later this week, but I'm definitely commited to it. I'd like to find people who won't hit it and quit it after a month." />
  <row Id="6260" PostHistoryTypeId="1" PostId="3214" RevisionGUID="f138ac0d-d362-45b5-bbd8-82d055c915ee" CreationDate="2010-08-25T15:38:16.083" UserDisplayName="Sergio" Text="Where to look for team mates?" />
  <row Id="6261" PostHistoryTypeId="3" PostId="3214" RevisionGUID="f138ac0d-d362-45b5-bbd8-82d055c915ee" CreationDate="2010-08-25T15:38:16.083" UserDisplayName="Sergio" Text="&lt;project-management&gt;" />
  <row Id="6262" PostHistoryTypeId="2" PostId="3215" RevisionGUID="d5a13903-d4eb-4eea-97e0-f7abf84e9298" CreationDate="2010-08-25T15:45:44.907" UserId="891" Text="**[Kynapse][1]**&#xD;&#xA;&#xD;&#xA;&gt; Autodesk® Kynapse® game middleware is a leading artificial intelligence (AI) solution for game development and the creation of real-time simulations for nonplayer characters (NPCs). &#xD;&#xA;&#xD;&#xA;**[Havok AI][2]**&#xD;&#xA;&#xD;&#xA;&gt; Havok AI is a new platform-optimized SDK focused on efficient pathfinding and path following. Havok AI is built from the ground up to consider dynamically changing environments.&#xD;&#xA;&#xD;&#xA;Information about both of these middleware solutions is limited.  I was looking for pros and cons of using either.  As well as any type of comparison between both middleware packages.&#xD;&#xA;&#xD;&#xA;**In particular:**&#xD;&#xA;&#xD;&#xA; - Pros&#xD;&#xA; - Cons&#xD;&#xA; - Features&#xD;&#xA; - Experience with using  &#xD;&#xA; - Difficulty&#xD;&#xA; - Latency of response&#xD;&#xA; - Clock cycle utilization&#xD;&#xA; - API/tutorial documentation&#xD;&#xA; - Source code included? or binary&#xD;&#xA; - Supported platforms&#xD;&#xA; - Supported languages&#xD;&#xA; - etc&#xD;&#xA;&#xD;&#xA;*A good response should be fact based, and any subjective subjects like difficulty should be based on an explained experiences with the product.*&#xD;&#xA;&#xD;&#xA;  [1]: http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=11390544&#xD;&#xA;  [2]: http://www.havok.com/index.php?page=havok-ai" />
  <row Id="6263" PostHistoryTypeId="1" PostId="3215" RevisionGUID="d5a13903-d4eb-4eea-97e0-f7abf84e9298" CreationDate="2010-08-25T15:45:44.907" UserId="891" Text="Autodesk Kynapse and Havok AI comparison" />
  <row Id="6264" PostHistoryTypeId="3" PostId="3215" RevisionGUID="d5a13903-d4eb-4eea-97e0-f7abf84e9298" CreationDate="2010-08-25T15:45:44.907" UserId="891" Text="&lt;ai&gt;&lt;middleware&gt;&lt;havok&gt;" />
  <row Id="6265" PostHistoryTypeId="2" PostId="3216" RevisionGUID="fed336b8-c888-4a04-8ae4-8fdb622aeb7b" CreationDate="2010-08-25T15:53:09.440" UserId="891" Text="A much better question to ask is &quot;**How do I pick the right teammates/project?**&quot;&#xD;&#xA;&#xD;&#xA;This is an excellent article on the subject&#xD;&#xA;&#xD;&#xA;[**How to Pick Indie Game Collaborators: 11 Things to Watch Out For**][1]&#xD;&#xA;&#xD;&#xA;&gt; ... The first groups I joined taught me most of the items I hope to pass on to you in this article. They all had heart, and lots of dreams, but very rarely did they have sufficient talent, dedication and management. I spent easily a year and a half spinning my wheels, going from group to group, before I found a really good one...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamecareerguide.com/features/753/how_to_pick_indie_game_.php?page=1" />
  <row Id="6266" PostHistoryTypeId="2" PostId="3217" RevisionGUID="2868cb46-133f-4207-89ff-003fd45d0789" CreationDate="2010-08-25T16:44:44.980" UserId="430" Text="Some games are [pulp fiction][1].  Others are more like their [physical puzzle counterparts][2].  There are games about [human interaction][3], [human nature][4], [atmosphere][5], [war][6], [love][7], [deep fantasy][8], [shallow reality][9]...&#xD;&#xA;&#xD;&#xA;Are all of those things (and the many more I didn't mention) a waste of time?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pulp_magazine&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Rubik%27s_Cube&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Fa%C3%A7ade_%28interactive_story%29&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Black_%26_White_%28video_game%29&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Half-life_2&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Total_War_%28series%29&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Dating_sim&#xD;&#xA;  [8]: http://en.wikipedia.org/wiki/Dwarf_Fortress&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/American_Idol_%28video_game%29" />
  <row Id="6267" PostHistoryTypeId="16" PostId="3217" RevisionGUID="2868cb46-133f-4207-89ff-003fd45d0789" CreationDate="2010-08-25T16:44:44.980" UserId="-1" />
  <row Id="6268" PostHistoryTypeId="2" PostId="3218" RevisionGUID="063beb0c-179d-42d2-8270-c83ca67b4cc6" CreationDate="2010-08-25T17:10:15.627" UserId="1456" Text="Realistic movement is on top. http://en.wikipedia.org/wiki/Chaos_theory" />
  <row Id="6269" PostHistoryTypeId="2" PostId="3219" RevisionGUID="0fd78588-8452-4ed4-85be-10a68b65961d" CreationDate="2010-08-25T17:26:59.040" UserId="896" Text="You might want to take a look at [this tread][1] on the Unity forums.  There's also someone working on an RTS &quot;starter kit&quot; but I can't remember who.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forum.unity3d.com/viewtopic.php?t=18802" />
  <row Id="6270" PostHistoryTypeId="2" PostId="3220" RevisionGUID="d6054ddf-002d-411b-8452-f03ae0ae1d29" CreationDate="2010-08-25T17:33:05.643" UserId="1232" Text="Praetor's link is excellent; +1 for that :). Sadly it doesn't mention blend modes. Additive blending is crucial for getting overlapping particles to saturate to white for really hot explosions." />
  <row Id="6271" PostHistoryTypeId="2" PostId="3221" RevisionGUID="a428b27f-89a4-4f9e-9229-7ec5d1cc89ec" CreationDate="2010-08-25T17:42:37.753" UserId="891" Text="**Strategy Pattern**, **Composition**, **Dependency Injection**, are all very closely related.&#xD;&#xA;&#xD;&#xA;Since the Strategy Pattern is a form of Dependency Injection, if you take a look at engines like Unity for example they are completely based off this principle.  Their use of Components(Strategy Pattern) is deeply embedded into their whole engine.&#xD;&#xA;&#xD;&#xA;One of the main benefits aside from reuse of components is to avoid the dreaded deep class hierarchies. &#xD;&#xA;&#xD;&#xA;Here is an article by **Mick West** who talks about how he introduced this type of system into the **Tony Hawk** series of games by Neversoft.&#xD;&#xA;&#xD;&#xA;[**Evolve Your Hierarchy**][1]&#xD;&#xA;&#xD;&#xA;&gt; Up until fairly recent years, game programmers have consistently used a deep class hierarchy to represent game entities. The tide is beginning to shift from this use of deep hierarchies to a variety of methods that compose a game entity object as an aggregation of components...&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" />
  <row Id="6272" PostHistoryTypeId="2" PostId="3222" RevisionGUID="0b78584e-21be-46c3-89c1-53a3a976ceb0" CreationDate="2010-08-25T18:52:25.977" UserId="160" Text="A huge volume of particles isn't necessary. What will help you the most is having each particle blend between a series of textures over time. So, have it start as a small bright ball, expand to a bigger orange flare, then to a light gray smoky patch, which when transitions to a smaller darker fading spot of smoke.&#xD;&#xA;&#xD;&#xA;Even blending between a couple of textures will make a *huge* difference in how your prarticles look." />
  <row Id="6273" PostHistoryTypeId="2" PostId="3223" RevisionGUID="8b878f22-d6e6-4535-8f46-726aef1cb100" CreationDate="2010-08-25T19:10:41.297" UserId="1477" Text="Related to the ebook question. What are good game development/design blogs to follow?" />
  <row Id="6274" PostHistoryTypeId="1" PostId="3223" RevisionGUID="8b878f22-d6e6-4535-8f46-726aef1cb100" CreationDate="2010-08-25T19:10:41.297" UserId="1477" Text="Game development Blogs" />
  <row Id="6275" PostHistoryTypeId="3" PostId="3223" RevisionGUID="8b878f22-d6e6-4535-8f46-726aef1cb100" CreationDate="2010-08-25T19:10:41.297" UserId="1477" Text="&lt;game-design&gt;&lt;resources&gt;&lt;hobby-development&gt;" />
  <row Id="6276" PostHistoryTypeId="16" PostId="3223" RevisionGUID="8b878f22-d6e6-4535-8f46-726aef1cb100" CreationDate="2010-08-25T19:11:06.707" UserId="1477" />
  <row Id="6277" PostHistoryTypeId="5" PostId="3223" RevisionGUID="8d460841-1b5f-42b3-9431-453cbfe6a648" CreationDate="2010-08-25T19:12:27.253" UserId="51" Comment="asked for an example post." Text="What are good game development/design blogs to follow?&#xD;&#xA;&#xD;&#xA;Please one blog per answer and give a brief summary as to the content of the blog posts.  If you can, pick a single article that shows high value and share a snippet with it." />
  <row Id="6278" PostHistoryTypeId="6" PostId="3223" RevisionGUID="8d460841-1b5f-42b3-9431-453cbfe6a648" CreationDate="2010-08-25T19:12:27.253" UserId="51" Comment="asked for an example post." Text="&lt;game-design&gt;&lt;resources&gt;" />
  <row Id="6279" PostHistoryTypeId="2" PostId="3224" RevisionGUID="ab2101c3-2608-4d2d-a2b4-36a64e753037" CreationDate="2010-08-25T19:15:40.383" UserId="51" Text="**&lt;a href=&quot;http://www.lostgarden.com/&quot;&gt;Lost Garden&lt;/a&gt;**&#xD;&#xA;&#xD;&#xA;General essays on game design theory.  A good example read is an article on &lt;a href=&quot;http://www.lostgarden.com/2010/08/visualizing-creative-process.html&quot;&gt; visualizing the creative process &lt;/a&gt;&#xD;&#xA;&#xD;&#xA;&gt; All these thoughts and pictures can be summarized in a very short list.&#xD;&#xA;&gt;&#xD;&#xA;&gt; * Brainstorm: Create lots of low cost, real word experiments.&#xD;&#xA;&gt; * Cull: Rigorously apply agreed upon culling criteria to weed out the weak ideas and reinvest in your most promising experiments.&#xD;&#xA;&gt; * Cycle: Repeat the process until you generate meaningful value.&#xD;&#xA;&gt; * Practice: Across multiple projects, practice all stages of the creative process so you constantly improve the myriad of skills involved in brainstorming, culling and cycling." />
  <row Id="6280" PostHistoryTypeId="16" PostId="3224" RevisionGUID="ab2101c3-2608-4d2d-a2b4-36a64e753037" CreationDate="2010-08-25T19:15:40.383" UserId="-1" />
  <row Id="6281" PostHistoryTypeId="2" PostId="3225" RevisionGUID="114c0a21-57b4-4901-97d8-b342d0889e37" CreationDate="2010-08-25T19:20:12.157" UserId="678" Text="**[Auntie Pixalante][1]**&#xD;&#xA;&#xD;&#xA;Some great thoughts on level design, pixel art and game design in general. Sometimes she goes off onto a bondage-themed pixel-art tangent though, so don't add this to your RSS list if these things offend you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.auntiepixelante.com/" />
  <row Id="6282" PostHistoryTypeId="16" PostId="3225" RevisionGUID="114c0a21-57b4-4901-97d8-b342d0889e37" CreationDate="2010-08-25T19:20:12.157" UserId="-1" />
  <row Id="6283" PostHistoryTypeId="2" PostId="3226" RevisionGUID="cc5b86bb-fbb8-4703-8b90-6f96a2a89129" CreationDate="2010-08-25T19:20:17.353" UserId="1477" Text="wolffire games blog is an example of one I already follow. He gives alot of useful insights into the process he goes through for his games." />
  <row Id="6284" PostHistoryTypeId="16" PostId="3226" RevisionGUID="cc5b86bb-fbb8-4703-8b90-6f96a2a89129" CreationDate="2010-08-25T19:20:17.353" UserId="-1" />
  <row Id="6285" PostHistoryTypeId="2" PostId="3227" RevisionGUID="fe0de3e7-a8bc-4f51-8d45-f18000ccce01" CreationDate="2010-08-25T19:20:34.570" UserId="51" Text="**&lt;a href=&quot;http://gafferongames.com/&quot;&gt;Gaffer On Games&lt;/a&gt;**&#xD;&#xA;&#xD;&#xA;In depth articles that mostly relate to either networking or physics.  Two really good articles are &lt;a href=&quot;http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/&quot;&gt;What every programmer needs to know about game networking&lt;/a&gt; and &lt;a href=&quot;http://gafferongames.com/game-physics/fix-your-timestep/&quot;&gt;fix your timestep&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;&gt;What we want is the best of both worlds. A fixed delta time value for the simulation plus the ability to render at different framerates. These two things seem completely at odds, and they are – unless we can find a way to decouple the simulation and rendering framerates.&#xD;&#xA;" />
  <row Id="6286" PostHistoryTypeId="16" PostId="3227" RevisionGUID="fe0de3e7-a8bc-4f51-8d45-f18000ccce01" CreationDate="2010-08-25T19:20:34.570" UserId="-1" />
  <row Id="6287" PostHistoryTypeId="5" PostId="3223" RevisionGUID="85a4514d-0079-4017-a5e3-80728720f06f" CreationDate="2010-08-25T19:22:10.680" UserId="51" Comment="added 30 characters in body" Text="What are good game development/design blogs to follow?&#xD;&#xA;&#xD;&#xA;Please one blog per answer (make sure to provide a link) and give a brief summary as to the content of the blog posts.  If you can, pick a single article that shows high value and share a snippet with it." />
  <row Id="6288" PostHistoryTypeId="2" PostId="3228" RevisionGUID="75b9d3ef-0b04-4517-8c61-563f655d962f" CreationDate="2010-08-25T19:24:41.940" UserId="634" Text="I'm the AI team lead at Havok, so my opinion may be obviously biased :)&#xD;&#xA;&#xD;&#xA;Havok AI is relatively new (announced at GDC 2009), so you probably won't find many users responding on here. But as a company, Havok has been around for over 10 years and our Physics product is one of the best known pieces of game middleware.&#xD;&#xA;&#xD;&#xA;The key features of Havok AI are:&#xD;&#xA;&#xD;&#xA; 1. Fast nav mesh generation&#xD;&#xA; 2. Cross-platform, optimized runtime. All major queries run on multiple threads (including SPU on PS3).&#xD;&#xA; 3. Dynamic pathfinding that integrates with (but doesn't depend on) Havok Physics.&#xD;&#xA; 4. Robust character steering system&#xD;&#xA;&#xD;&#xA;The API is well-documented, and there are numerous demos to show different features of the system. Additionally, you'll have access to our support team, who are constantly cited as one of our strengths (i.e. check out the quote from Volition in the [2009 Frontline Awards][1]).&#xD;&#xA;&#xD;&#xA;Licensees get access to most (but not all) of the source code.&#xD;&#xA;&#xD;&#xA;Supported platforms are: Win32/64 (Visual Studio 2005/2008), Xbox360, PS3, Wii, Mac, and Linux. If you have more exotic hardware needs, we can also do custom builds, although those can take time.&#xD;&#xA;&#xD;&#xA;Language: C++ &#xD;&#xA;&#xD;&#xA;For serious commercial inquiries, you can fill out the [form here][2] and one of our sales engineers will contact you.&#xD;&#xA;&#xD;&#xA;That's probably all that I can say without an NDA, but if you have any other questions, it can't hurt to ask...&#xD;&#xA;&#xD;&#xA;-Chris&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.havok.com/uploads/FrontlineAwards_2009.pdf&#xD;&#xA;  [2]:  http://www.havok.com/index.php?page=purchase-inquiry" />
  <row Id="6289" PostHistoryTypeId="5" PostId="3223" RevisionGUID="28bb9265-c4fc-4f2e-9b22-aba5009f39d3" CreationDate="2010-08-25T19:27:46.847" UserId="51" Comment="added 2 characters in body" Text="What are good game development/design blogs to follow?&#xD;&#xA;&#xD;&#xA;Please one blog per answer (make sure to provide a link) and give a brief summary as to the content of the blog posts.  &#xD;&#xA;&#xD;&#xA;If you can, pick a single article that shows high value and share a snippet of it." />
  <row Id="6290" PostHistoryTypeId="5" PostId="3226" RevisionGUID="8755702b-06c6-43b5-82b0-49b924faa623" CreationDate="2010-08-25T19:28:09.137" UserId="1477" Comment="added 57 characters in body; added 14 characters in body" Text="**[Wolf Fire Games Blog][1]**&#xD;&#xA;&#xD;&#xA;wolf fire games blog is an example of one I already follow. He gives alot of useful insights into the process he goes through for his games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/" />
  <row Id="6292" PostHistoryTypeId="2" PostId="3229" RevisionGUID="13e7b845-9428-4dbc-84e0-5dbc7d2d4c21" CreationDate="2010-08-25T19:30:25.407" UserId="395" Text="[DoubleBuffered](http://doublebuffered.com/) by our very own JZig.&#xD;&#xA;&#xD;&#xA;I am personally a fan of [Why Can’t I Jump? The Perils of Player Autonomy](http://doublebuffered.com/2010/06/08/why-cant-i-jump-the-perils-of-player-autonomy/), but that might just be because that is one of my biggest pet peeves." />
  <row Id="6293" PostHistoryTypeId="16" PostId="3229" RevisionGUID="13e7b845-9428-4dbc-84e0-5dbc7d2d4c21" CreationDate="2010-08-25T19:30:25.407" UserId="-1" />
  <row Id="6294" PostHistoryTypeId="2" PostId="3230" RevisionGUID="bbc1abdd-05bb-4423-ab73-8dea72e9060a" CreationDate="2010-08-25T19:31:33.273" UserId="154" Text="If you step back one level of abstraction all of the various character classes boil down to 3 archetypes. The extremist, the specialist, the Jack-of-All-Trades.&#xD;&#xA;&#xD;&#xA; - The Extremists prioritizes one stat/ability to its limit in exchange for weaknesses in all others&#xD;&#xA; - The Specialist prioritizes a small group of stats/abilities (to a lesser degree than the extremist) in exchange for weaknesses in all others.&#xD;&#xA; - The Jack-of-All-Trades has average ability in all stats/abilities.&#xD;&#xA;&#xD;&#xA;The more stats/abilities you have in the game the more extremists &amp; specialists you can have. " />
  <row Id="6295" PostHistoryTypeId="16" PostId="3230" RevisionGUID="bbc1abdd-05bb-4423-ab73-8dea72e9060a" CreationDate="2010-08-25T19:31:33.273" UserId="-1" />
  <row Id="6296" PostHistoryTypeId="2" PostId="3231" RevisionGUID="681ee8a0-4b6b-4f79-b1c6-b7dddc1df420" CreationDate="2010-08-25T19:32:09.070" UserId="891" Text="[**Ai Game Dev**][1]&#xD;&#xA;&#xD;&#xA;Excellent source of Game Ai information from videos, to interviews, to articles, etc etc.&#xD;&#xA;The best content has to be paid for but is worth it since there are a lot of interviews with Game AI developers about techniques that aren't published anywhere else.&#xD;&#xA;&#xD;&#xA;On top of that it allows you access to their AI Sandbox application for testing out your own AI implementations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aigamedev.com/" />
  <row Id="6297" PostHistoryTypeId="16" PostId="3231" RevisionGUID="681ee8a0-4b6b-4f79-b1c6-b7dddc1df420" CreationDate="2010-08-25T19:32:09.070" UserId="-1" />
  <row Id="6298" PostHistoryTypeId="2" PostId="3232" RevisionGUID="0c124b08-ddd0-483f-b317-10392cb0ee3f" CreationDate="2010-08-25T19:32:43.093" UserId="51" Text="**&lt;a href=&quot;http://gamesfromwithin.com/&quot;&gt;Games from Within&lt;/a&gt;**&#xD;&#xA;&#xD;&#xA;An iPhone game blog.  Deals with indie production issues, OpenGL ES problems, iPhone specific features (such as in-app purchasing) and their results, shares sales data, as well as general production issues.  A good general article is &lt;a href=&quot;http://gamesfromwithin.com/prototyping-youre-probably-doing-it-wrong&quot;&gt;Prototyping: You're (probably) Doing It Wrong&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;&gt; * Mistake #1: Going With The First Idea&#xD;&#xA;&gt; * Mistake #2: Not having a good question&#xD;&#xA;&gt; * Mistake #3: Taking too long&#xD;&#xA;&gt; * Mistake #4: Building a system, not a game&#xD;&#xA;&#xD;&#xA;&gt; And don’t ever, ever, use the argument “if we take some extra time and do this the right way, we can reuse it in the game”. EVER.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6299" PostHistoryTypeId="16" PostId="3232" RevisionGUID="0c124b08-ddd0-483f-b317-10392cb0ee3f" CreationDate="2010-08-25T19:32:43.093" UserId="-1" />
  <row Id="6300" PostHistoryTypeId="2" PostId="3233" RevisionGUID="0104af37-6764-41fd-aaf7-6940bd8fb41f" CreationDate="2010-08-25T19:42:25.947" UserId="389" Text="[TigSource][1] has been pretty good for keeping up on indy games I wouldn't normally hear about.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tigsource.com/" />
  <row Id="6301" PostHistoryTypeId="16" PostId="3233" RevisionGUID="0104af37-6764-41fd-aaf7-6940bd8fb41f" CreationDate="2010-08-25T19:42:25.947" UserId="-1" />
  <row Id="6302" PostHistoryTypeId="5" PostId="3226" RevisionGUID="a596dd75-3e25-4962-b10f-47d4818cfc1f" CreationDate="2010-08-25T19:50:02.927" UserId="1477" Comment="added 144 characters in body" Text="**[Wolf Fire Games Blog][1]**&#xD;&#xA;&#xD;&#xA;wolf fire games blog is an example of one I already follow. He gives alot of useful insights into the process he goes through for his games.&#xD;&#xA;&#xD;&#xA;example article: [Linear Algebra for Game Programmers][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/&#xD;&#xA;  [2]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/" />
  <row Id="6303" PostHistoryTypeId="2" PostId="3234" RevisionGUID="97b92b3a-0ba7-42e2-812e-8553b667babc" CreationDate="2010-08-25T20:04:26.360" UserDisplayName="Sergio" Text="Where can I find some nice resources to build decent looking prototypes to entice potential teammates?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="6304" PostHistoryTypeId="1" PostId="3234" RevisionGUID="97b92b3a-0ba7-42e2-812e-8553b667babc" CreationDate="2010-08-25T20:04:26.360" UserDisplayName="Sergio" Text="Where can I find free to use assets for rapid prototyping?" />
  <row Id="6305" PostHistoryTypeId="3" PostId="3234" RevisionGUID="97b92b3a-0ba7-42e2-812e-8553b667babc" CreationDate="2010-08-25T20:04:26.360" UserDisplayName="Sergio" Text="&lt;assets&gt;" />
  <row Id="6306" PostHistoryTypeId="2" PostId="3235" RevisionGUID="9ade3666-79a9-46bd-bc21-566a46098c19" CreationDate="2010-08-25T20:15:35.690" UserId="229" Text="[GBGames – Thoughts on Indie Game Development][1]&lt;br&gt;&#xD;&#xA;An Indie Game Developer’s somewhat interesting thoughts&#xD;&#xA;&#xD;&#xA;I found this blog while looking for info related to object-oriented/component-based game design. I found this [article][2], and kept reading because this blog is interesting and well written.&#xD;&#xA;&#xD;&#xA;Recently, it's been interesting following Gianfranco Berardi as he quits his day-job to work on game development full-time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gbgames.com/blog/&#xD;&#xA;  [2]: http://gbgames.com/blog/2006/03/object-oriented-game-design/" />
  <row Id="6307" PostHistoryTypeId="16" PostId="3235" RevisionGUID="9ade3666-79a9-46bd-bc21-566a46098c19" CreationDate="2010-08-25T20:15:35.690" UserId="-1" />
  <row Id="6308" PostHistoryTypeId="2" PostId="3236" RevisionGUID="f31e379c-7495-4de3-b109-9ae4b8c352e3" CreationDate="2010-08-25T20:24:54.523" UserId="452" Text="Lost Garden made two very complete sets of graphics available for prototyping:&#xD;&#xA;&#xD;&#xA;[http://www.lostgarden.com/2009/03/dancs-miraculously-flexible-game.html][1]&#xD;&#xA;&#xD;&#xA;[http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/2009/03/dancs-miraculously-flexible-game.html&#xD;&#xA;  [2]: http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html" />
  <row Id="6309" PostHistoryTypeId="2" PostId="3237" RevisionGUID="11196a40-ead7-49f9-989e-b91052ae05aa" CreationDate="2010-08-25T20:35:22.203" UserId="1874" Text="Like one of my previous speakers already said. Games are not a bigger waste of time than classic movies.&#xD;&#xA;&#xD;&#xA;In fact they have quite some big advantages over movies. They include the spectator (player) as part of the story. Some games manage to do that better than others. For example some games change their story and/or ending based on the decisions are made and actions are done by the player. A good example for this is BioWare/LucasArts (developer/publisher) Knight of the old republic series. A player starts with his character in a lets call it neutral state. Based on his decisions and actions the state changes and so does the story (in this example not the ending).&#xD;&#xA;&#xD;&#xA;Then there are others with other approaches like Infinity Ward and Treyarch/Activision which decided to create an interactive movie. You have a linear story and even a linear gameplay but that doesn't even bother anyone since it is like watching a movie in the cinema and even more interacting with it. Playing a role in it. It gives the players the impression they are important and have done something.&#xD;&#xA;&#xD;&#xA;Then there are also different types of games. Every type of game fulfills its role and trains the players abilities sometimes its their soft skills sometimes its their hard skills (kind of).&#xD;&#xA;&#xD;&#xA;For example role play games and multiplayer games actively train a players ability to interact with others and to communicate with others. This however depends on the specific type and layout of the game but generally this is true.&#xD;&#xA;&#xD;&#xA;Multiplayer games can serve as a way for players to interact socially it even allows players to make friends online based on the same interest (the game) and based on their experiences and achievements.&#xD;&#xA;&#xD;&#xA;Now first person shooter for example can train a players reaction and decision making speed (this is a true fact which even saved my life once).&#xD;&#xA;&#xD;&#xA;Strategy games train your ability to plan for the future and foresee certain outcomes based on certain circumstances. &#xD;&#xA;&#xD;&#xA;Logic games and games of skill well I guess you know what they are good for.&#xD;&#xA;&#xD;&#xA;So what I've tried to say with all this is that every game serves a purpose and has its own way to interact and get to the player. It is impossible to answer your question as games can't be put in stereotypes." />
  <row Id="6310" PostHistoryTypeId="16" PostId="3237" RevisionGUID="11196a40-ead7-49f9-989e-b91052ae05aa" CreationDate="2010-08-25T20:35:22.203" UserId="-1" />
  <row Id="6311" PostHistoryTypeId="6" PostId="20" RevisionGUID="37993eb8-73bf-4228-9596-bf30ceb6ce2a" CreationDate="2010-08-25T20:46:23.680" UserId="51" Comment="grammar" Text="&lt;graphics&gt;&lt;assets&gt;&lt;textures&gt;&lt;sprites&gt;&lt;free&gt;" />
  <row Id="6312" PostHistoryTypeId="5" PostId="20" RevisionGUID="37993eb8-73bf-4228-9596-bf30ceb6ce2a" CreationDate="2010-08-25T20:46:23.680" UserId="51" Comment="grammar" Text="I need sprites and images, such as characters, landscapes and others.  Where can I find them?&#xD;&#xA;" />
  <row Id="6313" PostHistoryTypeId="10" PostId="3234" RevisionGUID="20c6b2fe-2f81-415d-9ec9-6aa3c1c069f4" CreationDate="2010-08-25T20:48:50.960" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="6314" PostHistoryTypeId="5" PostId="3234" RevisionGUID="7a26f754-b5bd-4b35-8677-41c0dfd21c43" CreationDate="2010-08-25T20:48:51.100" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Where can I find some nice resources to build decent looking prototypes to entice potential teammates?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="6315" PostHistoryTypeId="5" PostId="3234" RevisionGUID="0d0ed12a-cc89-4cae-b1a5-add7c59a1575" CreationDate="2010-08-25T20:49:33.473" UserId="14" Comment="added 166 characters in body" Text="&gt; **Possible Duplicate**  &#xD;&#xA;&gt; [Where can I find free sprites and images? ](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)&#xD;&#xA;&#xD;&#xA;Where can I find some nice resources to build decent looking prototypes to entice potential teammates?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="6316" PostHistoryTypeId="6" PostId="3223" RevisionGUID="16542553-f6bb-4f08-956a-1886f07e90e5" CreationDate="2010-08-25T20:58:15.890" UserId="1477" Comment="edited tags" Text="&lt;game-design&gt;&lt;free&gt;&lt;resources&gt;" />
  <row Id="6317" PostHistoryTypeId="2" PostId="3238" RevisionGUID="3b4e2609-842a-4efe-b228-6f89a521de70" CreationDate="2010-08-25T21:18:26.293" UserId="395" Text="The basic way to do this is with [choose](http://docs.scipy.org/doc/numpy-1.4.x/reference/generated/numpy.choose.html#numpy.choose). You need surfarrays of both sides of the transition, and then make a set of arrays for each step of the animation. " />
  <row Id="6318" PostHistoryTypeId="2" PostId="3239" RevisionGUID="ab1eb713-2024-4432-830f-6d43009437ab" CreationDate="2010-08-25T21:27:03.403" UserId="1900" Text="Some games sell game content. I think DDO does this, but I'm not positive. Players purchase access to new areas of the game, things like transportation fees, but very similar in practice to the expansion pack model, where you buy whole dungeons or quest packs. Many games use real cash for that, but in-game currency works too.&#xD;&#xA;&#xD;&#xA;Any time you have a money sink of some kind, take the time to balance it. Measure the game, figure out how much it actually costs players to obtain a resource, and try to make it cost about the same amount. For a dungeon encounter, compare the average cost per player to the average value of loot obtainable.&#xD;&#xA;" />
  <row Id="6319" PostHistoryTypeId="5" PostId="3226" RevisionGUID="7dd7a281-aaa5-46e3-aed2-d8016dc06b5a" CreationDate="2010-08-25T21:46:30.350" UserId="189" Comment="whoops missed one" Text="**[Wolfire Blog][1]**&#xD;&#xA;&#xD;&#xA;Wolfire blog is an example of one I already follow. They give many useful insights into the process they go through for the creation of their game, Overgrowth.&#xD;&#xA;&#xD;&#xA;Example article: [Linear Algebra for Game Programmers][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/&#xD;&#xA;  [2]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/" />
  <row Id="6320" PostHistoryTypeId="2" PostId="3240" RevisionGUID="837f5e94-796a-462c-9e65-dcc37beb3eaf" CreationDate="2010-08-25T21:49:28.053" UserId="1900" Text="I just realized I should have put this in an answer.&#xD;&#xA;&#xD;&#xA;Parental controls, especially password-protected ones, do affect a game's rating. &#xD;&#xA;&#xD;&#xA;I think WoW is rated Teen, but the user-generated content (chat text, names, etc) is definitely not. But they're subscription based, I believe they may use credit card data to do age verification for subscribers.&#xD;&#xA;&#xD;&#xA;Most online games carry that &quot;experience may change during online play&quot; rider, which is a fancy way of saying &quot;other players can and will spew filth endlessly&quot;. Seems that players are far more creative when coming up with profanity than profanity filters are in eliminating it in any event.&#xD;&#xA;&#xD;&#xA;Certainly you could push the age verification aspects out of the game, distribute it in Locked-to-teen mode, and do something more industry standard for age verification, like sell a separate &quot;Mature&quot; edition, or unlock codes, or leverage some commercial age verification service." />
  <row Id="6321" PostHistoryTypeId="2" PostId="3241" RevisionGUID="8035129c-dc7b-4af8-84f8-e548432e56c1" CreationDate="2010-08-25T21:53:24.183" UserId="189" Text="**[The Word of Notch][1]**&#xD;&#xA;&#xD;&#xA;This is the official [Tumblr][2] blog of Markus Persson (&quot;Notch&quot;), creator of [Minecraft][3].&#xD;&#xA;&#xD;&#xA;There was a time when it had a lot of good content; now most of the posts are about Minecraft (and they're quite frequent), but there are a few gems in there. For example, he occasionally posts [a YouTube video of a game I've never seen before][4], or [talks about a Game Dev competition that I find interesting][5], and occasionally when talking about a problem or accomplishment he will sprinkle bits of code into his posts (i.e. [here][6] and [there][7]) which I find interesting.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://notch.tumblr.com/&#xD;&#xA;  [2]: http://www.tumblr.com/&#xD;&#xA;  [3]: http://www.minecraft.net/&#xD;&#xA;  [4]: http://notch.tumblr.com/post/966643848/nudo-its-a-puzzle-platformer-type-of-game-and-i&#xD;&#xA;  [5]: http://notch.tumblr.com/post/520255743/40x30-ega-java-game-dev-competition&#xD;&#xA;  [6]: http://notch.tumblr.com/post/781975830/multiplayer-progress-update-and-minecraft-alpha-1-0-3&#xD;&#xA;  [7]: http://notch.tumblr.com/post/760983716/my-worst-code-design-decision" />
  <row Id="6322" PostHistoryTypeId="16" PostId="3241" RevisionGUID="8035129c-dc7b-4af8-84f8-e548432e56c1" CreationDate="2010-08-25T21:53:24.183" UserId="-1" />
  <row Id="6323" PostHistoryTypeId="2" PostId="3242" RevisionGUID="ff04c9cf-8246-426b-9bba-6b9435dec215" CreationDate="2010-08-25T22:07:58.363" UserId="1900" Text="There's a design pattern for this. I think it's called Database Objects?&#xD;&#xA;&#xD;&#xA;Basically, you keep one &quot;template&quot; sheep that can represent all the non-special sheep in the game world, draw them all the same way, keeping the unique data within the template object, say as a table of sheep locations and/or time-since-shear. Then whenever you need to make a sheep unique, you can create a specific instance to track that unique sheep.&#xD;&#xA;&#xD;&#xA;The same goes for animations. If it's an idle animation or event common to every instance, that can reside in the template instance, where more specific animations can be scheduled separately.&#xD;&#xA;&#xD;&#xA;A long time ago, I wrote a game for a programming contest whose main loop just called animate() on the entire scene. It used function pointers to replace idle animations with others as required, and used the technique to support inherited animation (eg spinning a character that's standing on a spinning disc).&#xD;&#xA;&#xD;&#xA;That's similar in nature to using a delegate for animation. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="6324" PostHistoryTypeId="2" PostId="3243" RevisionGUID="d832ec15-8228-4112-bb82-8ca6322a8fbb" CreationDate="2010-08-25T22:17:01.063" UserId="1120" Text="I suspect part of it is that low-fidelity graphics engages your brain more than high-fidelity graphics.  Your brain works harder to fill in the blanks, you become less a passive consumer and more a co-creator of the experience.  It's like the difference between reading a book and watching a movie.  Scott Cloud in Understanding Comics talks about how generic/abstract representation makes it easier for the reader to project themselves or aspects of themselves into the story.&#xD;&#xA;&#xD;&#xA;Also I recently ran into this related idea:&#xD;&#xA;&#xD;&#xA;&gt; In the early stages of solving the puzzle, the group using the helpful software made correct moves more quickly than the other group, as would be expected. But as the test proceeded, the proficiency of the group using the bare-bones software increased more rapidly. In the end, those using the unhelpful program were able to solve the puzzle more quickly and with fewer wrong moves.&#xD;&#xA;&#xD;&#xA;http://www.johndcook.com/blog/2010/08/24/overly-helpful-software/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6325" PostHistoryTypeId="2" PostId="3244" RevisionGUID="468409e6-2583-459e-b624-181f240036c1" CreationDate="2010-08-26T00:02:25.080" UserId="101" Text="**[realtimecollisiondetection.net blog][1]**&#xD;&#xA;&#xD;&#xA;The blog of Christer Ericson, author of the excellent book [Real-Time Collision Detection][2] (who'd have guessed? ;). Equal parts general programming, physics programming, and graphics programming.&#xD;&#xA;&#xD;&#xA;Selected reading:&#xD;&#xA;&#xD;&#xA; - [Input Latency][3]&#xD;&#xA; - [Optimizing the Rendering of a Particle System][4]&#xD;&#xA; - [Advanced Bit Manipulation-Fu][5]&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net/blog/&#xD;&#xA;  [2]: http://realtimecollisiondetection.net/books/rtcd/&#xD;&#xA;  [3]: http://realtimecollisiondetection.net/blog/?p=30&#xD;&#xA;  [4]: http://realtimecollisiondetection.net/blog/?p=91&#xD;&#xA;  [5]: http://realtimecollisiondetection.net/blog/?p=78" />
  <row Id="6326" PostHistoryTypeId="16" PostId="3244" RevisionGUID="468409e6-2583-459e-b624-181f240036c1" CreationDate="2010-08-26T00:02:25.080" UserId="-1" />
  <row Id="6327" PostHistoryTypeId="2" PostId="3245" RevisionGUID="c753de23-c733-4cec-b496-9a01a8f85dcf" CreationDate="2010-08-26T00:10:20.710" UserId="101" Text="**[TomF's Tech Blog][1]**&#xD;&#xA;&#xD;&#xA;Tom Forsyth's blog. Predominately graphics programming.&#xD;&#xA;&#xD;&#xA;Selected reading*:&#xD;&#xA;&#xD;&#xA; - Premultiplied Alpha&#xD;&#xA; - A Matter of Precision&#xD;&#xA;&#xD;&#xA;*\* I can't seem to deep link these because the anchors for the permalinks contain [square brackets].*&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://www.eelpi.gotdns.org/blog.wiki.html" />
  <row Id="6328" PostHistoryTypeId="16" PostId="3245" RevisionGUID="c753de23-c733-4cec-b496-9a01a8f85dcf" CreationDate="2010-08-26T00:10:20.710" UserId="-1" />
  <row Id="6329" PostHistoryTypeId="2" PostId="3246" RevisionGUID="4b59832a-9354-44eb-9528-ffd74eb45895" CreationDate="2010-08-26T00:15:52.487" UserId="101" Text="**[Pixel Poppers][1]**&#xD;&#xA;&#xD;&#xA;Game design. Insightful articles and specific critiques.&#xD;&#xA;&#xD;&#xA;Selected reading:&#xD;&#xA;&#xD;&#xA; - [Test Skills, Not Patience: Challenge, Punishment, and Learning][2]&#xD;&#xA; - [Real Games Have Curves: Welcome to the Competence Zone][3]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pixelpoppers.com/&#xD;&#xA;  [2]: http://www.pixelpoppers.com/2009/11/test-skills-not-patience-challenge.html&#xD;&#xA;  [3]: http://www.pixelpoppers.com/2010/06/real-games-have-curves-welcome-to.html" />
  <row Id="6330" PostHistoryTypeId="16" PostId="3246" RevisionGUID="4b59832a-9354-44eb-9528-ffd74eb45895" CreationDate="2010-08-26T00:15:52.487" UserId="-1" />
  <row Id="6331" PostHistoryTypeId="5" PostId="3245" RevisionGUID="33e354ad-cf66-4062-a227-936882ee671a" CreationDate="2010-08-26T00:21:05.480" UserId="51" Comment="made links work" Text="**[TomF's Tech Blog][1]**&#xD;&#xA;&#xD;&#xA;Tom Forsyth's blog. Predominately graphics programming.&#xD;&#xA;&#xD;&#xA;Selected reading:&#xD;&#xA;&#xD;&#xA; - &lt;a href=&quot;http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BPremultiplied%20alpha%5D%5D&quot;&gt;Premultiplied Alpha&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BA%20matter%20of%20precision%5D%5D&quot;&gt;A Matter of Precision&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eelpi.gotdns.org/blog.wiki.html" />
  <row Id="6332" PostHistoryTypeId="2" PostId="3247" RevisionGUID="e646a2a8-a7c2-4b66-890a-de4e64a85a18" CreationDate="2010-08-26T01:33:45.967" UserId="1134" Text="**[LightSleeper's Blog][1]**&#xD;&#xA;&#xD;&#xA;[Pete Isensee][2] of the Xbox platform team.  Focuses mostly on C++ and Xbox, with some side-steps into leadership.&#xD;&#xA;&#xD;&#xA;An exemplary post might be something like [API Principles][3]:&#xD;&#xA;&#xD;&#xA;&gt; [...] If you're developing your own API set,&#xD;&#xA;&gt; these guidelines can help ensure that&#xD;&#xA;&gt; your customers have that dreamy&#xD;&#xA;&gt; experience developers get when using a&#xD;&#xA;&gt; great API. You'll also spend less time&#xD;&#xA;&gt; having to update documentation, write&#xD;&#xA;&gt; complex sample code, or staffing a&#xD;&#xA;&gt; large support team.&#xD;&#xA;&#xD;&#xA;His GDC presentations are all quite solid too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pkisensee.spaces.live.com/blog/&#xD;&#xA;  [2]: http://www.tantalon.com/pete.htm&#xD;&#xA;  [3]: http://pkisensee.spaces.live.com/blog/cns!3C84486A9D832EB7!410.entry" />
  <row Id="6333" PostHistoryTypeId="16" PostId="3247" RevisionGUID="e646a2a8-a7c2-4b66-890a-de4e64a85a18" CreationDate="2010-08-26T01:33:45.967" UserId="-1" />
  <row Id="6334" PostHistoryTypeId="2" PostId="3248" RevisionGUID="305df264-5720-4dac-aa42-6b556e309632" CreationDate="2010-08-26T04:43:38.513" UserId="1251" Text="I have a scenario where I have red coin in a Carrom board game which should be moved outside of the visible window when it is pocketed, also if any coin either white or black is not pocketed in the next shot, the red coin should be replaced in the center of the board.&#xD;&#xA;&#xD;&#xA;Now my problem is WHEN I apply the setXForm() method to move the b2body of the red coin outside of the visible area of my flash window.It moves,there is no problem in moving the body,but WHEN i replace the b2body and sprite after the event of no coin falling , the b2body is detached and works as a separate entity having no connection with the sprite of the red coin.&#xD;&#xA;&#xD;&#xA;I'm not getting a clue as to what is happening, that is why I thought I'd try posting this here." />
  <row Id="6335" PostHistoryTypeId="1" PostId="3248" RevisionGUID="305df264-5720-4dac-aa42-6b556e309632" CreationDate="2010-08-26T04:43:38.513" UserId="1251" Text="In Box2dFlash my b2body gets detached from my Sprite after I use setXForm()" />
  <row Id="6336" PostHistoryTypeId="3" PostId="3248" RevisionGUID="305df264-5720-4dac-aa42-6b556e309632" CreationDate="2010-08-26T04:43:38.513" UserId="1251" Text="&lt;flash&gt;&lt;box2d&gt;&lt;flash-develop&gt;" />
  <row Id="6337" PostHistoryTypeId="2" PostId="3249" RevisionGUID="80b740cb-7526-41ae-a021-b20ca80bb676" CreationDate="2010-08-26T05:26:27.090" UserId="111" Text="**[Beautiful Pixels][1]**&#xD;&#xA;&#xD;&#xA;A blog about game technology development, graphics, and productivity for developers. Some popular posts include:&#xD;&#xA;&#xD;&#xA; - [Multi-Platform Multi-Core&#xD;&#xA;   Architecture Comparison (PC, Wii,&#xD;&#xA;   Xbox 360, PS3, CUDA, Larrabee)][2]&#xD;&#xA; - [Motivating Depth of Field using&#xD;&#xA;   Bokeh][3]&#xD;&#xA;&#xD;&#xA;Updates infrequently.&#xD;&#xA;&#xD;&#xA;(Disclosure: This is my own blog.)&#xD;&#xA;&#xD;&#xA;  [1]: http://beautifulpixels.blogspot.com&#xD;&#xA;  [2]: http://beautifulpixels.blogspot.com/2008/08/multi-platform-multi-core-architecture.html&#xD;&#xA;  [3]: http://beautifulpixels.blogspot.com/2008/11/motivating-depth-of-field-using-bokeh.html" />
  <row Id="6338" PostHistoryTypeId="16" PostId="3249" RevisionGUID="80b740cb-7526-41ae-a021-b20ca80bb676" CreationDate="2010-08-26T05:26:27.090" UserId="-1" />
  <row Id="6339" PostHistoryTypeId="2" PostId="3250" RevisionGUID="6be8ac13-3d0f-43ea-9bc5-d2599ab3e902" CreationDate="2010-08-26T05:46:27.150" UserId="666" Text="**[HobbyGameDev][1] by Chris DeLeon.**&#xD;&#xA;&#xD;&#xA;This is a great site to learn about the basics, follow cool interesting things about game development and generally learn A LOT. Take a look at the sample games and enjoy the ride!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hobbygamedev.com/" />
  <row Id="6340" PostHistoryTypeId="16" PostId="3250" RevisionGUID="6be8ac13-3d0f-43ea-9bc5-d2599ab3e902" CreationDate="2010-08-26T05:46:27.150" UserId="-1" />
  <row Id="6341" PostHistoryTypeId="6" PostId="3140" RevisionGUID="c947f65c-b0da-4b16-85e8-07457ee9bd04" CreationDate="2010-08-26T05:57:24.510" UserId="666" Comment="edited tags" Text="&lt;scripting&gt;&lt;mods&gt;&lt;starcraft-2&gt;" />
  <row Id="6342" PostHistoryTypeId="5" PostId="3235" RevisionGUID="08ac7ebd-230e-41a3-a668-def5b352b25a" CreationDate="2010-08-26T06:48:40.993" UserId="229" Comment="added 130 characters in body" Text="[GBGames – Thoughts on Indie Game Development][1]&lt;br&gt;&#xD;&#xA;An Indie Game Developer’s somewhat interesting thoughts&#xD;&#xA;&#xD;&#xA;I found this blog while looking for info related to object-oriented/component-based game design. I found this [article][2], and kept reading because this blog is interesting and well-written.&#xD;&#xA;&#xD;&#xA;I think I got hooked reading his [progress reports from Ludem Dare #15][3].&#xD;&#xA;&#xD;&#xA;More recently, it's been interesting to follow Gianfranco Berardi as he quits his day-job to concentrate on game development full-time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gbgames.com/blog/&#xD;&#xA;  [2]: http://gbgames.com/blog/2006/03/object-oriented-game-design/&#xD;&#xA;  [3]: http://gbgames.com/blog/?s=ld%2315" />
  <row Id="6343" PostHistoryTypeId="5" PostId="3197" RevisionGUID="c998c249-6db7-44bf-957b-7f44137dac0a" CreationDate="2010-08-26T07:41:50.310" UserId="678" Comment="added 454 characters in body; edited body" Text="You can easily do regular checkerboards by using numpy to copy parts of an image (array) onto another array, like this:&#xD;&#xA;&#xD;&#xA;    # Let's define two arrays to work on. They should be replaced with your surfaces&#xD;&#xA;    a = numpy.ones((640,480))&#xD;&#xA;    b = numpy.zeros((640,480))&#xD;&#xA;&#xD;&#xA;    a[100:110,200:210] = b[100:110, 200:210]&#xD;&#xA;&#xD;&#xA;Obviously you can mix it up, copy from multiple sources and different locations if you need it for your effects. Since everything is handled by numpy (without coming back to python after every pixel) it is quite fast.&#xD;&#xA;&#xD;&#xA;The only limitation is that the source and destination must be the same size (or obey the broadcasting rules, but that's not what you want here).&#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA; &#xD;&#xA;I had completely forgotten about `choose()`. It is the missing piece you need to do the transitions &quot;properly&quot;. What you need is something like this:&#xD;&#xA;&#xD;&#xA;    diamonds = [ ... ] # List of arrays containing 1 and 2 arranged in enlarging diamond patterns, say 100x100&#xD;&#xA;    for diamond in diamonds: # you probably want timers and events rather than a tight loop&#xD;&#xA;        for x in [0,100,200, ...]:&#xD;&#xA;            for y in [0,100,200 ....]:&#xD;&#xA;                screen[x:x+100, y:y+100] = diamond.choose(screen1[x:x+100,y:y+100], screen2[x:x+100,y:y+100])&#xD;&#xA;        # Pause for transition effect&#xD;&#xA;        time.sleep(0.01)&#xD;&#xA;&#xD;&#xA;This should get you the required effect. Post if you get into trouble.&#xD;&#xA;" />
  <row Id="6344" PostHistoryTypeId="2" PostId="3251" RevisionGUID="24ee1920-2401-4a7f-b93d-3b07a10e49ca" CreationDate="2010-08-26T08:13:24.833" UserId="1895" Text="If you have a good looking particle system then you can consider to use some kind of spherical billboard implementation to remove the annoying cutting and popping artifacts.&#xD;&#xA;&#xD;&#xA;You can found an example at&#xD;&#xA;[http://www.iit.bme.hu/~szirmay/firesmoke.pdf][1].&#xD;&#xA;  [1]: http://www.iit.bme.hu/~szirmay/firesmoke.pdf" />
  <row Id="6345" PostHistoryTypeId="2" PostId="3252" RevisionGUID="eb307435-878d-4e86-a184-79414d0e788d" CreationDate="2010-08-26T09:17:28.040" UserId="1855" Text="I've had similar thoughts( ie get back into writing games a hobby - job and other commitments...)&#xD;&#xA;&#xD;&#xA;I'd seriously consider the route of developing the 'Map Editor' as part of the game/application.&#xD;&#xA;&#xD;&#xA;If your game ever gets beyond your own PC then Community Content would be great boon.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6346" PostHistoryTypeId="2" PostId="3253" RevisionGUID="c4e071aa-5864-4d7a-9aff-18d547e89b7d" CreationDate="2010-08-26T09:50:56.077" UserId="1734" Text="What are the hardware and software tools required to import physical worlds into a game engine? Can i use a HD camera to do that? What do the popular game engines support?" />
  <row Id="6347" PostHistoryTypeId="1" PostId="3253" RevisionGUID="c4e071aa-5864-4d7a-9aff-18d547e89b7d" CreationDate="2010-08-26T09:50:56.077" UserId="1734" Text="Importing real world models into a game engine" />
  <row Id="6348" PostHistoryTypeId="3" PostId="3253" RevisionGUID="c4e071aa-5864-4d7a-9aff-18d547e89b7d" CreationDate="2010-08-26T09:50:56.077" UserId="1734" Text="&lt;engine&gt;&lt;art&gt;" />
  <row Id="6349" PostHistoryTypeId="5" PostId="3212" RevisionGUID="b661fbe6-5bd9-438d-9c4f-a4f0319addbe" CreationDate="2010-08-26T10:19:35.170" UserId="1101" Comment="grammar..." Text="You call it 'diligent software development', I call it 'painful overengineering'. That's not to say that inversion of control is bad - in fact, the basic definition of it is good - but the proliferation of entire frameworks and methods of working to achieve all this is little short of insane, especially combined with the way people are trashing perfectly good and clean interfaces in order to be able to inject interchangeable components that 99% of the time you'll never interchange. It's the sort of thing that could only originate from the Java enterprise environment and I'm glad it doesn't have as much of a foothold elsewhere.&#xD;&#xA;&#xD;&#xA;Often the argument is that even if you don't interchange components, you want to be able to test them in isolation with mock objects and the like. However, I'm afraid I will never buy the argument that it's worth bloating and complicating an interface in order to be better able to test it. Testing proves one thing only - that your tests work. Clean and minimal interfaces on the other hand go a long way towards **proving** that your code works.&#xD;&#xA;&#xD;&#xA;So, the short answer: yes, but not in the way you're thinking. Sometimes, when you need interchangeable behaviour, you'll pass in an object to a constructor that dictates part of the new object's behaviour. That's about it." />
  <row Id="6350" PostHistoryTypeId="2" PostId="3254" RevisionGUID="5c13e521-1c62-46ae-8a55-7e7d263b2527" CreationDate="2010-08-26T10:55:24.200" UserId="1908" Text="It's peculiar this issue is not well understood on NVIDIA forums and project forums.&#xD;&#xA;&#xD;&#xA;For example, the well known ioquake3 project based on id tech 3 requires to force 'Threaded optimization' off on the NVIDIA settings or there are severe FPS drops.&#xD;&#xA;&#xD;&#xA;Do you know what a programmer has to do to acquire compatibility with the feature or at least a workaround to not get issues with it (e.g. turning it off explicitly via the application or other means)?&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;The main importance is that such projects get issues with it by default since not all users know they have to explicitly turn off the feature.&#xD;&#xA;" />
  <row Id="6351" PostHistoryTypeId="1" PostId="3254" RevisionGUID="5c13e521-1c62-46ae-8a55-7e7d263b2527" CreationDate="2010-08-26T10:55:24.200" UserId="1908" Text="What is the right process to get compatibility or at least a workaround for the ‘Threaded optimization’ feature of NVIDIA?" />
  <row Id="6352" PostHistoryTypeId="3" PostId="3254" RevisionGUID="5c13e521-1c62-46ae-8a55-7e7d263b2527" CreationDate="2010-08-26T10:55:24.200" UserId="1908" Text="&lt;opengl&gt;&lt;3d&gt;&lt;optimization&gt;&lt;multithreading&gt;" />
  <row Id="6353" PostHistoryTypeId="2" PostId="3255" RevisionGUID="4c04fb0c-5e43-47f0-977f-48abbf0676a4" CreationDate="2010-08-26T11:41:07.243" UserId="189" Text="Well, it's certainly nothing game-related, but it technically *is* possible to take multiple (2D) photographs of an object and use [Photosynth][1] to approximately recreate the object's 3D space. It's pretty neat, you should check it out.&#xD;&#xA;&#xD;&#xA;Otherwise, there are **[3D scanners][2]** but they are typically pretty small-scale. You certainly can't scan a large area with one of those.&#xD;&#xA;&#xD;&#xA;There is also such thing as a **[stereo camera][3]**, or a camera with 2 (or more) lenses, which can therefore capture &quot;3D&quot; data. But I don't think these have progressed as far as being able to create 3D models out of the dual images they create, and even if they did, the models would only be from one viewpoint so they'd be incomplete just as Photosynth's are. I would think the latest 3D movies use stereo cameras when recording in order to capture this effect, but they could be using something else (a camera with a sonar attached or something, maybe).&#xD;&#xA;&#xD;&#xA;**The best thing to do is to create it from scratch.** Take pictures of textures and unique objects (signs, etc.), take note of dimensions, and take whole-scene pictures for reference. Then have a 3D artist sit down and recreate it in 3D. Any automated large-scale 3D model creator, if one exists, would be wildly expensive.&#xD;&#xA;&#xD;&#xA;&gt; Can I use a HD camera to do that?&#xD;&#xA;&#xD;&#xA;To take the texture pictures, sure! I recommend a camera which is good at up-close shots.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://photosynth.net/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/3d_scanner&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Stereo_camera" />
  <row Id="6354" PostHistoryTypeId="2" PostId="3256" RevisionGUID="45417266-6e19-48ba-87cd-372b039ee1e1" CreationDate="2010-08-26T12:24:02.790" UserId="1893" Text="**[That's a Terrible Idea][1]**&#xD;&#xA;&#xD;&#xA;Design blog that focuses on design aspects of MMORPGs. Is often critical of many elements in most sandbox MMO designs. Instead of pure criticism, the blog does offer up design suggestions and theories on how to improve.&#xD;&#xA;&#xD;&#xA; - [The Abstraction of Character][2]&#xD;&#xA; - [Liberate the Narrative][3]&#xD;&#xA; - [Coupled Combat Systems][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.thatsaterribleidea.com/&#xD;&#xA;  [2]: http://www.thatsaterribleidea.com/2009/11/abstraction-of-character.html&#xD;&#xA;  [3]: http://www.thatsaterribleidea.com/2009/12/liberate-narrative.html&#xD;&#xA;  [4]: http://www.thatsaterribleidea.com/2010/06/coupled-combat-systems.html" />
  <row Id="6355" PostHistoryTypeId="16" PostId="3256" RevisionGUID="45417266-6e19-48ba-87cd-372b039ee1e1" CreationDate="2010-08-26T12:24:02.790" UserId="-1" />
  <row Id="6356" PostHistoryTypeId="5" PostId="3147" RevisionGUID="0dbedd0a-0bc6-45f8-b33f-fd5d0af5f3dd" CreationDate="2010-08-26T13:52:33.613" UserId="1868" Comment="added links" Text="I have been thinking how to create realistic sound for a car. The main sound is the engine, then all kind of wind, road and suspension sounds.&#xD;&#xA;&#xD;&#xA;Are there any open source projects for the engine sound simulation? Simply pitching up the sample does not sound too great. The ideal would be to something that allows me to pick type of the engine (i.e. inline-4 vs v-8), add extras like turbo/supercharger whine and finally set the load and rpm.&#xD;&#xA;&#xD;&#xA;Edit: Something like http://www.sonory.org/examples.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit2: Couple papers about this topic: &#xD;&#xA;&#xD;&#xA;Design of a Driving Simulation Sound Engine&#xD;&#xA;http://www.nads-sc.uiowa.edu/dscna07/DSCNA07CD/papers/Section%207B%20-%20Simulator%20Characteristics%20-%20Sight%20and%20Sound/Heitbrink.pdf&#xD;&#xA;&#xD;&#xA;Sound Synthesis for Virtual Reality and Computer Games (ch 6-4) http://circle.ubc.ca/bitstream/handle/2429/10055/ubc_1999-389936.pdf?sequence=1&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6357" PostHistoryTypeId="2" PostId="3257" RevisionGUID="967f537c-b93e-4cb4-b398-2fd8f4aa4b99" CreationDate="2010-08-26T14:19:17.283" UserId="818" Text="Gotta agree with Kylotan on this one.  &quot;Dependency injection&quot; is an ugly Java solution to an ugly Java conceptual flaw, and the only reason anyone's looking at it in other languages at all is because Java's becoming a first language for a lot of people, [when it really shouldn't.][1]&#xD;&#xA;&#xD;&#xA;Inversion of control, on the other hand, is a useful idea that's been around for a long time, and is very helpful when done right.  (Not the Java/Dependency Injection way.)  In fact, you probably do it all the time if you're working in a sane programming language.  When I first read up on this whole &quot;IOC&quot; thing everyone was buzzing about, I was completely underwhelmed.  Inversion of Control is nothing more than passing a function pointer (or method pointer) to a routine or object in order to help customize its behavior.&#xD;&#xA;&#xD;&#xA;This is an idea that's been around since the 1950s.  It's in the C standard library (qsort comes to mind) and it's *all over the place* in Delphi and .NET (event handlers/delegates).  It enables old code to call new code without needing to recompile the old code, and it gets used all the time in game engines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html" />
  <row Id="6358" PostHistoryTypeId="5" PostId="3225" RevisionGUID="642fd032-8e34-4375-ad81-9536a0f99daa" CreationDate="2010-08-26T14:32:46.423" UserId="33" Comment="Just editing the original name from pixalante to pixelante" Text="**[Auntie Pixelante][1]**&#xD;&#xA;&#xD;&#xA;Some great thoughts on level design, pixel art and game design in general. Sometimes she goes off onto a bondage-themed pixel-art tangent though, so don't add this to your RSS list if these things offend you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.auntiepixelante.com/" />
  <row Id="6359" PostHistoryTypeId="2" PostId="3258" RevisionGUID="02e661c7-d909-4f34-a5f4-6b8b838354a7" CreationDate="2010-08-26T15:47:02.343" UserDisplayName="youngProgrammer" Text="I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that : http://pl.tinypic.com/view.php?pic=2lmbdz7&amp;s=4. This is code, which bases on box2d HelloWorld:&#xD;&#xA;&#xD;&#xA;    #include &lt;SFML/Graphics.hpp&gt;&#xD;&#xA;    #include &lt;Box2D/Box2D.h&gt;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    int main(int argc, char* argv[])&#xD;&#xA;    {&#xD;&#xA;        B2_NOT_USED(argc);&#xD;&#xA;     B2_NOT_USED(argv);&#xD;&#xA;    &#xD;&#xA;     b2Vec2 gravity(0.0f, -10.0f);&#xD;&#xA;     bool doSleep = true;&#xD;&#xA;     b2World world(gravity, doSleep);&#xD;&#xA;     &#xD;&#xA;     b2BodyDef groundBodyDef;&#xD;&#xA;     groundBodyDef.position.Set(0.0f, -10.0f);&#xD;&#xA;     b2Body* groundBody = world.CreateBody(&amp;groundBodyDef);&#xD;&#xA;     b2PolygonShape groundBox;&#xD;&#xA;     groundBox.SetAsBox(50.0f, 10.0f);&#xD;&#xA;     groundBody-&gt;CreateFixture(&amp;groundBox, 0.0f);&#xD;&#xA;     &#xD;&#xA;    &#xD;&#xA;     b2BodyDef bodyDef;&#xD;&#xA;     bodyDef.type = b2_dynamicBody;&#xD;&#xA;     bodyDef.position.Set(0.0f, 300.0f);&#xD;&#xA;     bodyDef.active = true;&#xD;&#xA;     b2Body* body = world.CreateBody(&amp;bodyDef);&#xD;&#xA;     b2PolygonShape dynamicBox;&#xD;&#xA;     dynamicBox.SetAsBox(3.5f, 3.5f);&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     body-&gt;SetTransform(b2Vec2(0,100),30);&#xD;&#xA;     &#xD;&#xA;     b2FixtureDef fixtureDef;&#xD;&#xA;     fixtureDef.shape = &amp;dynamicBox;&#xD;&#xA;     fixtureDef.density = 1.0f;&#xD;&#xA;     fixtureDef.friction = 0.3;&#xD;&#xA;     &#xD;&#xA;     body-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;     &#xD;&#xA;     float32 timeStep = 1.0f / 60.0f;&#xD;&#xA;     int32 velocityIterations = 6;&#xD;&#xA;     int32 positionIterations = 2;&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;        sf::RenderWindow app(sf::VideoMode(800, 600), &quot;BOX/SFML&quot;);&#xD;&#xA;     app.UseVerticalSync(true);&#xD;&#xA;     sf::Shape shape = sf::Shape::Rectangle(-3.5f,-3.5f,3.5f,3.5f,sf::Color::Green);&#xD;&#xA;     sf::Shape groundShape = sf::Shape::Rectangle(-50,-10,50,10,sf::Color(100,40,120));&#xD;&#xA;     &#xD;&#xA;        while (app.IsOpened())&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            sf::Event event_;&#xD;&#xA;            while (app.GetEvent(event_))&#xD;&#xA;            {&#xD;&#xA;                &#xD;&#xA;                if (event_.Type == sf::Event::Closed)&#xD;&#xA;                    app.Close();&#xD;&#xA;            }&#xD;&#xA;      &#xD;&#xA;      world.Step(timeStep, velocityIterations, positionIterations);&#xD;&#xA;            world.ClearForces();&#xD;&#xA;      &#xD;&#xA;      b2Vec2 position = body-&gt;GetPosition();&#xD;&#xA;      float32 angle = body-&gt;GetAngle();&#xD;&#xA;      b2MassData m;&#xD;&#xA;     &#xD;&#xA;      body-&gt;GetMassData(&amp;m);&#xD;&#xA;      printf(&quot;m %f\n&quot;,m);&#xD;&#xA;      printf(&quot;%4.2f %4.2f %4.2f\n&quot;, position.x, position.y, angle);&#xD;&#xA;      &#xD;&#xA;      app.Clear();&#xD;&#xA;      shape.SetPosition(position.x+400,-position.y+300);&#xD;&#xA;      shape.SetRotation(angle);&#xD;&#xA;      app.Draw(shape);&#xD;&#xA;      groundShape.SetPosition(0+400,10+300);&#xD;&#xA;      app.Draw(groundShape);&#xD;&#xA;      &#xD;&#xA;            app.Display();&#xD;&#xA;        }&#xD;&#xA;     world.DestroyBody(groundBody);&#xD;&#xA;     world.DestroyBody(body);&#xD;&#xA;        return EXIT_SUCCESS;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I looking for any advice for solve this problem." />
  <row Id="6360" PostHistoryTypeId="1" PostId="3258" RevisionGUID="02e661c7-d909-4f34-a5f4-6b8b838354a7" CreationDate="2010-08-26T15:47:02.343" UserDisplayName="youngProgrammer" Text="Problem with box2d at beggining" />
  <row Id="6361" PostHistoryTypeId="3" PostId="3258" RevisionGUID="02e661c7-d909-4f34-a5f4-6b8b838354a7" CreationDate="2010-08-26T15:47:02.343" UserDisplayName="youngProgrammer" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="6362" PostHistoryTypeId="2" PostId="3259" RevisionGUID="d42b82d2-335d-4bad-8751-4ae440e8866f" CreationDate="2010-08-26T15:48:20.000" UserDisplayName="youngProgrammer" Text="http://cowboyprogramming.com/2008/04/01/practical-fluid-mechanics/" />
  <row Id="6363" PostHistoryTypeId="5" PostId="3258" RevisionGUID="f7d70592-1726-42ec-b649-fbb8b25941f2" CreationDate="2010-08-26T16:08:57.000" UserDisplayName="youngProgrammer" Comment="added 69 characters in body" Text="I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that at end: http://pl.tinypic.com/view.php?pic=2lmbdz7&amp;s=4 , starting from http://pl.tinypic.com/view.php?pic=zkljxg&amp;s=4 . This is code, which bases on box2d HelloWorld:&#xD;&#xA;&#xD;&#xA;    #include &lt;SFML/Graphics.hpp&gt;&#xD;&#xA;    #include &lt;Box2D/Box2D.h&gt;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    int main(int argc, char* argv[])&#xD;&#xA;    {&#xD;&#xA;        B2_NOT_USED(argc);&#xD;&#xA;     B2_NOT_USED(argv);&#xD;&#xA;    &#xD;&#xA;     b2Vec2 gravity(0.0f, -10.0f);&#xD;&#xA;     bool doSleep = true;&#xD;&#xA;     b2World world(gravity, doSleep);&#xD;&#xA;     &#xD;&#xA;     b2BodyDef groundBodyDef;&#xD;&#xA;     groundBodyDef.position.Set(0.0f, -10.0f);&#xD;&#xA;     b2Body* groundBody = world.CreateBody(&amp;groundBodyDef);&#xD;&#xA;     b2PolygonShape groundBox;&#xD;&#xA;     groundBox.SetAsBox(50.0f, 10.0f);&#xD;&#xA;     groundBody-&gt;CreateFixture(&amp;groundBox, 0.0f);&#xD;&#xA;     &#xD;&#xA;    &#xD;&#xA;     b2BodyDef bodyDef;&#xD;&#xA;     bodyDef.type = b2_dynamicBody;&#xD;&#xA;     bodyDef.position.Set(0.0f, 300.0f);&#xD;&#xA;     bodyDef.active = true;&#xD;&#xA;     b2Body* body = world.CreateBody(&amp;bodyDef);&#xD;&#xA;     b2PolygonShape dynamicBox;&#xD;&#xA;     dynamicBox.SetAsBox(3.5f, 3.5f);&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     body-&gt;SetTransform(b2Vec2(0,100),30);&#xD;&#xA;     &#xD;&#xA;     b2FixtureDef fixtureDef;&#xD;&#xA;     fixtureDef.shape = &amp;dynamicBox;&#xD;&#xA;     fixtureDef.density = 1.0f;&#xD;&#xA;     fixtureDef.friction = 0.3;&#xD;&#xA;     &#xD;&#xA;     body-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;     &#xD;&#xA;     float32 timeStep = 1.0f / 60.0f;&#xD;&#xA;     int32 velocityIterations = 6;&#xD;&#xA;     int32 positionIterations = 2;&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;        sf::RenderWindow app(sf::VideoMode(800, 600), &quot;BOX/SFML&quot;);&#xD;&#xA;     app.UseVerticalSync(true);&#xD;&#xA;     sf::Shape shape = sf::Shape::Rectangle(-3.5f,-3.5f,3.5f,3.5f,sf::Color::Green);&#xD;&#xA;     sf::Shape groundShape = sf::Shape::Rectangle(-50,-10,50,10,sf::Color(100,40,120));&#xD;&#xA;     &#xD;&#xA;        while (app.IsOpened())&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            sf::Event event_;&#xD;&#xA;            while (app.GetEvent(event_))&#xD;&#xA;            {&#xD;&#xA;                &#xD;&#xA;                if (event_.Type == sf::Event::Closed)&#xD;&#xA;                    app.Close();&#xD;&#xA;            }&#xD;&#xA;      &#xD;&#xA;      world.Step(timeStep, velocityIterations, positionIterations);&#xD;&#xA;            world.ClearForces();&#xD;&#xA;      &#xD;&#xA;      b2Vec2 position = body-&gt;GetPosition();&#xD;&#xA;      float32 angle = body-&gt;GetAngle();&#xD;&#xA;      b2MassData m;&#xD;&#xA;     &#xD;&#xA;      body-&gt;GetMassData(&amp;m);&#xD;&#xA;      printf(&quot;m %f\n&quot;,m);&#xD;&#xA;      printf(&quot;%4.2f %4.2f %4.2f\n&quot;, position.x, position.y, angle);&#xD;&#xA;      &#xD;&#xA;      app.Clear();&#xD;&#xA;      shape.SetPosition(position.x+400,-position.y+300);&#xD;&#xA;      shape.SetRotation(angle);&#xD;&#xA;      app.Draw(shape);&#xD;&#xA;      groundShape.SetPosition(0+400,10+300);&#xD;&#xA;      app.Draw(groundShape);&#xD;&#xA;      &#xD;&#xA;            app.Display();&#xD;&#xA;        }&#xD;&#xA;     world.DestroyBody(groundBody);&#xD;&#xA;     world.DestroyBody(body);&#xD;&#xA;        return EXIT_SUCCESS;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I looking for any advice for solve this problem." />
  <row Id="6364" PostHistoryTypeId="5" PostId="3258" RevisionGUID="11d26405-5508-4c0b-a3ef-c9d11152d926" CreationDate="2010-08-26T16:14:07.700" UserDisplayName="youngProgrammer" Comment="added 54 characters in body" Text="I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that at end: http://pl.tinypic.com/view.php?pic=2lmbdz7&amp;s=4 , starting from http://pl.tinypic.com/view.php?pic=zkljxg&amp;s=4 . This is code, which bases on box2d HelloWorld:&#xD;&#xA;&#xD;&#xA;    #include &lt;SFML/Graphics.hpp&gt;&#xD;&#xA;    #include &lt;Box2D/Box2D.h&gt;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    int main(int argc, char* argv[])&#xD;&#xA;    {&#xD;&#xA;        B2_NOT_USED(argc);&#xD;&#xA;     B2_NOT_USED(argv);&#xD;&#xA;    &#xD;&#xA;     b2Vec2 gravity(0.0f, -10.0f);&#xD;&#xA;     bool doSleep = true;&#xD;&#xA;     b2World world(gravity, doSleep);&#xD;&#xA;     &#xD;&#xA;     b2BodyDef groundBodyDef;&#xD;&#xA;     groundBodyDef.position.Set(0.0f, -10.0f);&#xD;&#xA;     b2Body* groundBody = world.CreateBody(&amp;groundBodyDef);&#xD;&#xA;     b2PolygonShape groundBox;&#xD;&#xA;     groundBox.SetAsBox(50.0f, 10.0f);&#xD;&#xA;     groundBody-&gt;CreateFixture(&amp;groundBox, 0.0f);&#xD;&#xA;     &#xD;&#xA;    &#xD;&#xA;     b2BodyDef bodyDef;&#xD;&#xA;     bodyDef.type = b2_dynamicBody;&#xD;&#xA;     bodyDef.position.Set(0.0f, 300.0f);&#xD;&#xA;     bodyDef.active = true;&#xD;&#xA;     b2Body* body = world.CreateBody(&amp;bodyDef);&#xD;&#xA;     b2PolygonShape dynamicBox;&#xD;&#xA;     dynamicBox.SetAsBox(3.5f, 3.5f);&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     body-&gt;SetTransform(b2Vec2(0,100),30);&#xD;&#xA;     &#xD;&#xA;     b2FixtureDef fixtureDef;&#xD;&#xA;     fixtureDef.shape = &amp;dynamicBox;&#xD;&#xA;     fixtureDef.density = 1.0f;&#xD;&#xA;     fixtureDef.friction = 0.3;&#xD;&#xA;     &#xD;&#xA;     body-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;     &#xD;&#xA;     float32 timeStep = 1.0f / 60.0f;&#xD;&#xA;     int32 velocityIterations = 6;&#xD;&#xA;     int32 positionIterations = 2;&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;        sf::RenderWindow app(sf::VideoMode(800, 600), &quot;BOX/SFML&quot;);&#xD;&#xA;     app.UseVerticalSync(true);&#xD;&#xA;     sf::Shape shape = sf::Shape::Rectangle(-3.5f,-3.5f,3.5f,3.5f,sf::Color::Green);&#xD;&#xA;     sf::Shape groundShape = sf::Shape::Rectangle(-50,-10,50,10,sf::Color(100,40,120));&#xD;&#xA;     &#xD;&#xA;        while (app.IsOpened())&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            sf::Event event_;&#xD;&#xA;            while (app.GetEvent(event_))&#xD;&#xA;            {&#xD;&#xA;                &#xD;&#xA;                if (event_.Type == sf::Event::Closed)&#xD;&#xA;                    app.Close();&#xD;&#xA;            }&#xD;&#xA;      &#xD;&#xA;      world.Step(timeStep, velocityIterations, positionIterations);&#xD;&#xA;            world.ClearForces();&#xD;&#xA;      &#xD;&#xA;      b2Vec2 position = body-&gt;GetPosition();&#xD;&#xA;      float32 angle = body-&gt;GetAngle();&#xD;&#xA;      b2MassData m;&#xD;&#xA;     &#xD;&#xA;      body-&gt;GetMassData(&amp;m);&#xD;&#xA;      printf(&quot;m %f\n&quot;,m);&#xD;&#xA;      printf(&quot;%4.2f %4.2f %4.2f\n&quot;, position.x, position.y, angle);&#xD;&#xA;      &#xD;&#xA;      app.Clear();&#xD;&#xA;      shape.SetPosition(position.x+400,-position.y+300);&#xD;&#xA;      shape.SetRotation(angle);&#xD;&#xA;      app.Draw(shape);&#xD;&#xA;      groundShape.SetPosition(0+400,10+300);&#xD;&#xA;      app.Draw(groundShape);&#xD;&#xA;      &#xD;&#xA;            app.Display();&#xD;&#xA;        }&#xD;&#xA;     world.DestroyBody(groundBody);&#xD;&#xA;     world.DestroyBody(body);&#xD;&#xA;        return EXIT_SUCCESS;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I looking for any advice for solve this problem. And another problem, why mass of dynamic shape is 0 ?" />
  <row Id="6365" PostHistoryTypeId="2" PostId="3260" RevisionGUID="91ec590c-1784-4d6e-92db-1e5a39ce7c77" CreationDate="2010-08-26T16:40:22.520" UserId="370" Text="I've found I hate SFML when dealing with Box2D.  It's concept of inverted-y and pixel based coordinates is great if you want to draw a quick box.  It's horrible if you need to tie its coordinate system into another library (which you will need to do in any game that's not an SFML demo).&#xD;&#xA;&#xD;&#xA;My recommendation: use Box2D's debug rendering.  That way when you see an object in the middle of the screen you know it's actually there.  The `sf::Shape`s could be way off of the underlying `b2Body`." />
  <row Id="6366" PostHistoryTypeId="5" PostId="3258" RevisionGUID="83216790-95e6-4f2b-b88c-34a3cea64074" CreationDate="2010-08-26T16:48:25.153" UserDisplayName="youngProgrammer" Comment="added 13 characters in body" Text="I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that at end ![alt text][1], starting from ![alt text][2] . This is code, which bases on box2d HelloWorld:&#xD;&#xA;&#xD;&#xA;    #include &lt;SFML/Graphics.hpp&gt;&#xD;&#xA;    #include &lt;Box2D/Box2D.h&gt;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    int main(int argc, char* argv[])&#xD;&#xA;    {&#xD;&#xA;        B2_NOT_USED(argc);&#xD;&#xA;     B2_NOT_USED(argv);&#xD;&#xA;    &#xD;&#xA;     b2Vec2 gravity(0.0f, -10.0f);&#xD;&#xA;     bool doSleep = true;&#xD;&#xA;     b2World world(gravity, doSleep);&#xD;&#xA;     &#xD;&#xA;     b2BodyDef groundBodyDef;&#xD;&#xA;     groundBodyDef.position.Set(0.0f, -10.0f);&#xD;&#xA;     b2Body* groundBody = world.CreateBody(&amp;groundBodyDef);&#xD;&#xA;     b2PolygonShape groundBox;&#xD;&#xA;     groundBox.SetAsBox(50.0f, 10.0f);&#xD;&#xA;     groundBody-&gt;CreateFixture(&amp;groundBox, 0.0f);&#xD;&#xA;     &#xD;&#xA;    &#xD;&#xA;     b2BodyDef bodyDef;&#xD;&#xA;     bodyDef.type = b2_dynamicBody;&#xD;&#xA;     bodyDef.position.Set(0.0f, 300.0f);&#xD;&#xA;     bodyDef.active = true;&#xD;&#xA;     b2Body* body = world.CreateBody(&amp;bodyDef);&#xD;&#xA;     b2PolygonShape dynamicBox;&#xD;&#xA;     dynamicBox.SetAsBox(3.5f, 3.5f);&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     body-&gt;SetTransform(b2Vec2(0,100),30);&#xD;&#xA;     &#xD;&#xA;     b2FixtureDef fixtureDef;&#xD;&#xA;     fixtureDef.shape = &amp;dynamicBox;&#xD;&#xA;     fixtureDef.density = 1.0f;&#xD;&#xA;     fixtureDef.friction = 0.3;&#xD;&#xA;     &#xD;&#xA;     body-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;     &#xD;&#xA;     float32 timeStep = 1.0f / 60.0f;&#xD;&#xA;     int32 velocityIterations = 6;&#xD;&#xA;     int32 positionIterations = 2;&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;        sf::RenderWindow app(sf::VideoMode(800, 600), &quot;BOX/SFML&quot;);&#xD;&#xA;     app.UseVerticalSync(true);&#xD;&#xA;     sf::Shape shape = sf::Shape::Rectangle(-3.5f,-3.5f,3.5f,3.5f,sf::Color::Green);&#xD;&#xA;     sf::Shape groundShape = sf::Shape::Rectangle(-50,-10,50,10,sf::Color(100,40,120));&#xD;&#xA;     &#xD;&#xA;        while (app.IsOpened())&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            sf::Event event_;&#xD;&#xA;            while (app.GetEvent(event_))&#xD;&#xA;            {&#xD;&#xA;                &#xD;&#xA;                if (event_.Type == sf::Event::Closed)&#xD;&#xA;                    app.Close();&#xD;&#xA;            }&#xD;&#xA;      &#xD;&#xA;      world.Step(timeStep, velocityIterations, positionIterations);&#xD;&#xA;            world.ClearForces();&#xD;&#xA;      &#xD;&#xA;      b2Vec2 position = body-&gt;GetPosition();&#xD;&#xA;      float32 angle = body-&gt;GetAngle();&#xD;&#xA;      b2MassData m;&#xD;&#xA;     &#xD;&#xA;      body-&gt;GetMassData(&amp;m);&#xD;&#xA;      printf(&quot;m %f\n&quot;,m);&#xD;&#xA;      printf(&quot;%4.2f %4.2f %4.2f\n&quot;, position.x, position.y, angle);&#xD;&#xA;      &#xD;&#xA;      app.Clear();&#xD;&#xA;      shape.SetPosition(position.x+400,-position.y+300);&#xD;&#xA;      shape.SetRotation(angle);&#xD;&#xA;      app.Draw(shape);&#xD;&#xA;      groundShape.SetPosition(0+400,10+300);&#xD;&#xA;      app.Draw(groundShape);&#xD;&#xA;      &#xD;&#xA;            app.Display();&#xD;&#xA;        }&#xD;&#xA;     world.DestroyBody(groundBody);&#xD;&#xA;     world.DestroyBody(body);&#xD;&#xA;        return EXIT_SUCCESS;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I looking for any advice for solve this problem. And another problem, why mass of dynamic shape is 0 ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zwfiC.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/CJK57.png" />
  <row Id="6367" PostHistoryTypeId="2" PostId="3261" RevisionGUID="bfea870d-60cb-43a1-8c99-2d6fe2a28936" CreationDate="2010-08-26T16:49:19.680" UserId="292" Text="What are the trade offs between inherent in linking geometry to a node versus using skinned geometry? &#xD;&#xA;&#xD;&#xA;Specifically:&#xD;&#xA; &#xD;&#xA;* What capabilities do you gain / lose from using each method?&#xD;&#xA;* What are the performance impacts of doing one over the other?&#xD;&#xA;* What are the specific situations where you would want to do one over the other?&#xD;&#xA;&#xD;&#xA;In addition, do the answers to these questions tend to be engine specific? If so, how much?" />
  <row Id="6368" PostHistoryTypeId="1" PostId="3261" RevisionGUID="bfea870d-60cb-43a1-8c99-2d6fe2a28936" CreationDate="2010-08-26T16:49:19.680" UserId="292" Text="Trade offs of linking versus skinning geometry" />
  <row Id="6369" PostHistoryTypeId="3" PostId="3261" RevisionGUID="bfea870d-60cb-43a1-8c99-2d6fe2a28936" CreationDate="2010-08-26T16:49:19.680" UserId="292" Text="&lt;animation&gt;&lt;performance&gt;&lt;techncal&gt;" />
  <row Id="6370" PostHistoryTypeId="2" PostId="3262" RevisionGUID="d8ed00ad-f0c3-43cd-b037-5fcc2eb1c5d0" CreationDate="2010-08-26T17:05:26.823" UserId="229" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;- [Practical Fluid Mechanics][2]&#xD;&#xA;  - Very detailed explanation with C++ code and pre-compiled binary. You can interact with the demo, like creating new smoke and stirring the smoke with your mouse. The image is a capture of the demo. Lists several on-line references at the end, as well.&#xD;&#xA;- [Stable Fluids][3] [PDF]&#xD;&#xA; - I think the author, Jos Stam, is the expert when it comes to fluid dynamics. 75 page summary of his research.&#xD;&#xA;- [Chapter 38. Fast Fluid Dynamics Simulation on the GPU][4]&#xD;&#xA; - More technical and math-heavy then the Cowboy Programming Practical Fluid Mechanics. Also lists several off-line resources at the end.&#xD;&#xA;- [A Fire and Smoke Simulation for Mobile Game][5] [PDF]&#xD;&#xA; - The weakest resource of the bunch, but I still found it worth bookmarking...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AdbCQ.png&#xD;&#xA;  [2]: http://cowboyprogramming.com/2008/04/01/practical-fluid-mechanics/&#xD;&#xA;  [3]: http://www.dgp.toronto.edu/~stam/reality/Talks/FluidsTalk/FluidsTalkNotes.pdf&#xD;&#xA;  [4]: http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html&#xD;&#xA;  [5]: http://www.sersc.org/journals/IJSEIA/vol2_no4_2008/1.pdf" />
  <row Id="6371" PostHistoryTypeId="2" PostId="3263" RevisionGUID="66c41ce2-459e-403d-9e57-a7196f888e44" CreationDate="2010-08-26T17:18:55.803" UserId="229" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;**A lot of games use an open source application called [Mappy][2].** It has its own format that supports multiple layers and other features. You probably want to associate several types of data with a given tile.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;hr /&gt;&#xD;&#xA;&#xD;&#xA;**And I personally don't recommend it, but a 2D demo program for Allegro used some type of 3D modeling format and converted it a custom in-game format.** The advantage was it could model very smooth, continuous surfaces. (It was a 2D skate boarding game.)&#xD;&#xA;&#xD;&#xA;&gt; To edit the level data of the Allegro&#xD;&#xA;&gt; demo game, we use the free and open&#xD;&#xA;&gt; source tool Blender. You can obtain it&#xD;&#xA;&gt; here:&#xD;&#xA;&gt; &#xD;&#xA;&gt; http://blender.org&#xD;&#xA;&gt; &#xD;&#xA;&gt; Here are step by step instructions how&#xD;&#xA;&gt; it works:&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1) Place the file ademo_export.py into&#xD;&#xA;&gt; your Blender scripts folder. It is the&#xD;&#xA;&gt; export script which will convert from&#xD;&#xA;&gt; .blend format to the .txt format used&#xD;&#xA;&gt; by the demo game. Under unix, the path&#xD;&#xA;&gt; will be:&#xD;&#xA;&gt; &#xD;&#xA;&gt; ~/.blender/scripts/ademo_export.py&#xD;&#xA;&gt; &#xD;&#xA;&gt; 2) Load the .blend file blender. Under&#xD;&#xA;&gt; unix, type this from the directory&#xD;&#xA;&gt; with the level.blend file:&#xD;&#xA;&gt; &#xD;&#xA;&gt; blender -w level.blend&#xD;&#xA;&gt; &#xD;&#xA;&gt; (The -w is to use windowed modes,&#xD;&#xA;&gt; which I prefer.)&#xD;&#xA;&gt; &#xD;&#xA;&gt; 3) Edit the level. In the menu, under&#xD;&#xA;&gt; &#xD;&#xA;&gt; Help -&gt; Scripts Help Browser -&gt; Export&#xD;&#xA;&gt; -&gt; Allegro Demo Game Level&#xD;&#xA;&gt; &#xD;&#xA;&gt; you will find some useful tips.&#xD;&#xA;&gt; &#xD;&#xA;&gt; 4) Save the file (use compression&#xD;&#xA;&gt; before committing). Export it as .txt&#xD;&#xA;&gt; from the export menu, choosing Allegro&#xD;&#xA;&gt; Demo Game Level.&#xD;&#xA;&gt; &#xD;&#xA;&gt; 5) Update level.dat using level.txt,&#xD;&#xA;&gt; the new level should appear in the&#xD;&#xA;&gt; game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kCKOp.gif&#xD;&#xA;  [2]: http://tilemap.co.uk/mappy.php" />
  <row Id="6372" PostHistoryTypeId="5" PostId="3263" RevisionGUID="754b9e6d-4e20-4b35-9b04-313ea5cadc93" CreationDate="2010-08-26T17:26:51.343" UserId="229" Comment="added 17 characters in body" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;**A lot of games use an open source application called [Mappy][2].** It has its own format that supports multiple layers and other features. You probably want to associate several types of data with a given tile.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;hr /&gt;&#xD;&#xA;&#xD;&#xA;And I personally don't recommend it, but **a 2D demo program for Allegro used some type of 3D modeling format and converted it to a custom in-game format.** The advantage was it could model very smooth, continuous surfaces. (It was a 2D physics-based skate boarding game.)&#xD;&#xA;&#xD;&#xA;&gt; To edit the level data of the Allegro&#xD;&#xA;&gt; demo game, we use the free and open&#xD;&#xA;&gt; source tool Blender. You can obtain it&#xD;&#xA;&gt; here:&#xD;&#xA;&gt; &#xD;&#xA;&gt; http://blender.org&#xD;&#xA;&gt; &#xD;&#xA;&gt; Here are step by step instructions how&#xD;&#xA;&gt; it works:&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1) Place the file ademo_export.py into&#xD;&#xA;&gt; your Blender scripts folder. It is the&#xD;&#xA;&gt; export script which will convert from&#xD;&#xA;&gt; .blend format to the .txt format used&#xD;&#xA;&gt; by the demo game. Under unix, the path&#xD;&#xA;&gt; will be:&#xD;&#xA;&gt; &#xD;&#xA;&gt; ~/.blender/scripts/ademo_export.py&#xD;&#xA;&gt; &#xD;&#xA;&gt; 2) Load the .blend file blender. Under&#xD;&#xA;&gt; unix, type this from the directory&#xD;&#xA;&gt; with the level.blend file:&#xD;&#xA;&gt; &#xD;&#xA;&gt; blender -w level.blend&#xD;&#xA;&gt; &#xD;&#xA;&gt; (The -w is to use windowed modes,&#xD;&#xA;&gt; which I prefer.)&#xD;&#xA;&gt; &#xD;&#xA;&gt; 3) Edit the level. In the menu, under&#xD;&#xA;&gt; &#xD;&#xA;&gt; Help -&gt; Scripts Help Browser -&gt; Export&#xD;&#xA;&gt; -&gt; Allegro Demo Game Level&#xD;&#xA;&gt; &#xD;&#xA;&gt; you will find some useful tips.&#xD;&#xA;&gt; &#xD;&#xA;&gt; 4) Save the file (use compression&#xD;&#xA;&gt; before committing). Export it as .txt&#xD;&#xA;&gt; from the export menu, choosing Allegro&#xD;&#xA;&gt; Demo Game Level.&#xD;&#xA;&gt; &#xD;&#xA;&gt; 5) Update level.dat using level.txt,&#xD;&#xA;&gt; the new level should appear in the&#xD;&#xA;&gt; game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kCKOp.gif&#xD;&#xA;  [2]: http://tilemap.co.uk/mappy.php" />
  <row Id="6373" PostHistoryTypeId="2" PostId="3264" RevisionGUID="d4893221-a5b9-4dc2-bf7d-b8663bd69e05" CreationDate="2010-08-26T17:46:09.657" UserId="539" Text="There seems to be a lot of confusion about the Inversion of Control (IoC) pattern. A number of people have equated it with the Strategy Pattern or a Component Model, but these comparison don't really capture what IoC is about. IoC is really about how a dependency is obtained. Let me give you an example:&#xD;&#xA;&#xD;&#xA;    class Game {&#xD;&#xA;        void Load() {&#xD;&#xA;            this.Sprite.Load(); // loads resource for drawing later&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Sprite {&#xD;&#xA;        void Load() {&#xD;&#xA;            FileReader reader = new FileReader(&quot;path/to/resource.gif&quot;);&#xD;&#xA;            // load image from file&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In the above it's clear that `Sprite.Load` has a dependency on a `FileReader`. When you want to test the method you need the following:&#xD;&#xA;&#xD;&#xA;  1. A file system in place&#xD;&#xA;  2. A test file to load from the file system&#xD;&#xA;  3. Ability to trigger common file system errors&#xD;&#xA;&#xD;&#xA;The first two are obvious, but if you want to ensure that your error handling works as expected you really need #3, too. In both cases you've potentially slowed your tests down quite a bit as they now need to go to disk and you've likely made your testing environment more complicated.&#xD;&#xA;&#xD;&#xA;The goal of IoC is to decouple the use of behavior from its construction. Note how this differs from the Strategy pattern. With the Strategy pattern the goal is to encapsulate a re-usuable chunk of behavior so that you can easily extend it in the future; it has nothing to say about how strategies are constructed. &#xD;&#xA;&#xD;&#xA;If we were to rewrite the `Sprite.Load` method above we would likely end up with:&#xD;&#xA;&#xD;&#xA;    class Sprite {&#xD;&#xA;        void Load(IReader reader) {&#xD;&#xA;            // load image through reader&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, we have decoupled the construction of the reader from its use. Therefore, it's possible to swap in a test reader during testing. This means that your testing environment no longer needs a file system, test files, and can easily simulate error events.&#xD;&#xA;&#xD;&#xA;Note that I did two things in my rewrite. I created an interface `IReader` which encapsulated some behavior -- i.e. implemented the Strategy pattern. In addition, I moved the responsibility for creating the right reader to another class. &#xD;&#xA;&#xD;&#xA;Maybe we don't need a new pattern name to describe the above. It strikes me as a mix of the Strategy and Factory patterns (for IoC containers). That being said, I'm not sure on what grounds people are objecting to this pattern as it's clear that it solves a real problem, and, certainly, it's not obvious to me what this has to do with Java." />
  <row Id="6374" PostHistoryTypeId="5" PostId="3263" RevisionGUID="4948b926-f979-433a-ad40-3bad22c100ce" CreationDate="2010-08-26T17:47:23.497" UserId="229" Comment="added 478 characters in body" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;**A lot of games use an open source application called [Mappy][2].** It has its own format that supports multiple layers and other features. You probably want to associate several types of data with a given tile.&#xD;&#xA;&#xD;&#xA;&lt;hr /&gt;&#xD;&#xA;&#xD;&#xA;**I think the in-game level editor approach is very common.** [Developer Mode][3] is an inside account of how the levels for a very popular game, Braid, were designed. The game has a development mode where levels can be constructed/modified. The levels themselves have a collision layer covered up with graphical tiles: &#xD;&#xA;&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;hr /&gt;&#xD;&#xA;&#xD;&#xA;And I personally don't recommend it, but **a 2D demo program for Allegro used some type of 3D modeling format and converted it to a custom in-game format.** The advantage was it could model very smooth, continuous surfaces. (It was a 2D physics-based skate boarding game.)&#xD;&#xA;&#xD;&#xA;&gt; To edit the level data of the Allegro&#xD;&#xA;&gt; demo game, we use the free and open&#xD;&#xA;&gt; source tool Blender. You can obtain it&#xD;&#xA;&gt; here:&#xD;&#xA;&gt; &#xD;&#xA;&gt; http://blender.org&#xD;&#xA;&gt; &#xD;&#xA;&gt; Here are step by step instructions how&#xD;&#xA;&gt; it works:&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1) Place the file ademo_export.py into&#xD;&#xA;&gt; your Blender scripts folder. It is the&#xD;&#xA;&gt; export script which will convert from&#xD;&#xA;&gt; .blend format to the .txt format used&#xD;&#xA;&gt; by the demo game. Under unix, the path&#xD;&#xA;&gt; will be:&#xD;&#xA;&gt; &#xD;&#xA;&gt; ~/.blender/scripts/ademo_export.py&#xD;&#xA;&gt; &#xD;&#xA;&gt; 2) Load the .blend file blender. Under&#xD;&#xA;&gt; unix, type this from the directory&#xD;&#xA;&gt; with the level.blend file:&#xD;&#xA;&gt; &#xD;&#xA;&gt; blender -w level.blend&#xD;&#xA;&gt; &#xD;&#xA;&gt; (The -w is to use windowed modes,&#xD;&#xA;&gt; which I prefer.)&#xD;&#xA;&gt; &#xD;&#xA;&gt; 3) Edit the level. In the menu, under&#xD;&#xA;&gt; &#xD;&#xA;&gt; Help -&gt; Scripts Help Browser -&gt; Export&#xD;&#xA;&gt; -&gt; Allegro Demo Game Level&#xD;&#xA;&gt; &#xD;&#xA;&gt; you will find some useful tips.&#xD;&#xA;&gt; &#xD;&#xA;&gt; 4) Save the file (use compression&#xD;&#xA;&gt; before committing). Export it as .txt&#xD;&#xA;&gt; from the export menu, choosing Allegro&#xD;&#xA;&gt; Demo Game Level.&#xD;&#xA;&gt; &#xD;&#xA;&gt; 5) Update level.dat using level.txt,&#xD;&#xA;&gt; the new level should appear in the&#xD;&#xA;&gt; game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kCKOp.gif&#xD;&#xA;  [2]: http://tilemap.co.uk/mappy.php&#xD;&#xA;  [3]: http://www.gamasutra.com/view/feature/3753/the_art_of_braid_creating_a_.php?page=6&#xD;&#xA;  [4]: http://i.stack.imgur.com/mG24d.jpg" />
  <row Id="6375" PostHistoryTypeId="2" PostId="3265" RevisionGUID="c74fd7c6-e4a7-49b3-a7ef-ddd1796e2540" CreationDate="2010-08-26T18:04:41.513" UserId="370" Text="Should I be using premultiplied alpha?  Reading Tom Forsyth's [article][1] it seems a nobrainer.  Premultiplied alpha (AKA additive blending) is superior in every sense.  &#xD;&#xA;However, premultiplied alpha seems to have one major drawback, it's not well supported with tools.&#xD;&#xA;&#xD;&#xA;Do you/have you use premultiplied alpha?&#xD;&#xA;&#xD;&#xA;How is the tool support?&#xD;&#xA;&#xD;&#xA;In particular, I don't think gimp will edit premultiplied alpha images well.  Are there any gimp plugins to export premultiplied alpha?  How about an external tool?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5b%5bPremultiplied%20alpha%5d%5d" />
  <row Id="6376" PostHistoryTypeId="1" PostId="3265" RevisionGUID="c74fd7c6-e4a7-49b3-a7ef-ddd1796e2540" CreationDate="2010-08-26T18:04:41.513" UserId="370" Text="Premultiplied alpha, yay or nay?" />
  <row Id="6377" PostHistoryTypeId="3" PostId="3265" RevisionGUID="c74fd7c6-e4a7-49b3-a7ef-ddd1796e2540" CreationDate="2010-08-26T18:04:41.513" UserId="370" Text="&lt;textures&gt;" />
  <row Id="6378" PostHistoryTypeId="2" PostId="3266" RevisionGUID="a0002775-3a70-48dc-87e3-d9f51ab4d566" CreationDate="2010-08-26T18:21:32.357" UserId="734" Text="Here's a fairly primitive write up about using cellular automata for simulating fluids:&#xD;&#xA;http://w-shadow.com/blog/2009/09/01/simple-fluid-simulation/&#xD;&#xA;&#xD;&#xA;In certain situations such a simple approach can be appropriate (Dwarf Fortress uses a similar approach to simulate liquid flow; also - the powder game). Also, this approach is pretty easy to grasp/get up and running fast.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6379" PostHistoryTypeId="2" PostId="3267" RevisionGUID="2e02b0e2-ecf5-47d5-8063-3964e278e8cc" CreationDate="2010-08-26T18:28:13.090" UserId="295" Text="I've been poking around. I've determined that every terran building has an effect &quot;Terran Burn Down&quot; or some such, that I assume is what is actually causing the damage.&#xD;&#xA;&#xD;&#xA;I'm not sure of the specifics, exactly, but I imagine one of two things should be possible:&#xD;&#xA;&#xD;&#xA; - The building counts as its own killer (because its death is related to an effect it 'owns')&#xD;&#xA; - The death can be tracked by attributing it to the effect, something along the lines of &quot;Unit dies&quot; Condition: Killing Effect == Terran Burn Down.&#xD;&#xA;&#xD;&#xA;I imagine the zerg buildings have a similar 'requires creep' ability.&#xD;&#xA;&#xD;&#xA;I'll keep investigating and keep this open in case someone can provide a fuller answer." />
  <row Id="6380" PostHistoryTypeId="2" PostId="3268" RevisionGUID="7ce6045b-6b10-4964-92a2-4c2b83bcffb1" CreationDate="2010-08-26T18:30:08.963" UserId="27" Text="I don't know anything about the flash port, but is it possible that you are using an older version of box2d (or the port is from an older version) and you moving the b2body outside of the range of the b2World?&#xD;&#xA;&#xD;&#xA;If I remember correctly, you had to specify min/max coordinates for the world, and if anything went outside this range it was no longer simulated. I'm not sure what happened at this point if you changed their position back into the world." />
  <row Id="6381" PostHistoryTypeId="2" PostId="3269" RevisionGUID="41b504c6-a65b-4046-9c6f-e94148f86d2b" CreationDate="2010-08-26T18:43:13.590" UserId="1700" Text="There is a behavior for Terran buildings that applies the burning effect periodically if the building's health is below 1/3. To see if a building is killed by this effect, you could do this:&#xD;&#xA;&#xD;&#xA;    Events&#xD;&#xA;        Unit - Any Unit takes Fatal Any damage (from Any effects)&#xD;&#xA;    Local Variables&#xD;&#xA;    Conditions&#xD;&#xA;        (Damaging effect) == BurndownDamage (Unnamed)&#xD;&#xA;        (Unit type of (Triggering unit)) == &lt;building&gt;&#xD;&#xA;" />
  <row Id="6382" PostHistoryTypeId="2" PostId="3270" RevisionGUID="95f35546-0091-44b5-87ec-27d6d2cd5167" CreationDate="2010-08-26T18:50:13.453" UserId="1700" Text="I have tried out Blender and Milkshape 3D, but my question is mainly asking if there is any 3D animation/modelling software that is open source, free, or has an indie license available that is widely used by indie developers?" />
  <row Id="6383" PostHistoryTypeId="1" PostId="3270" RevisionGUID="95f35546-0091-44b5-87ec-27d6d2cd5167" CreationDate="2010-08-26T18:50:13.453" UserId="1700" Text="Are there any open source or free 3D modelling/animation tools that are widely used by indie game developers?" />
  <row Id="6384" PostHistoryTypeId="3" PostId="3270" RevisionGUID="95f35546-0091-44b5-87ec-27d6d2cd5167" CreationDate="2010-08-26T18:50:13.453" UserId="1700" Text="&lt;3d&gt;&lt;animation&gt;" />
  <row Id="6385" PostHistoryTypeId="5" PostId="3269" RevisionGUID="5e78783d-8a77-4a0a-8944-4f8971adc7dd" CreationDate="2010-08-26T19:00:11.200" UserId="1700" Comment="Added Zerg effect too" Text="There is a behavior for Terran buildings that applies the burning effect periodically if the building's health is below 1/3. To see if a building is killed by this effect, you could do this:&#xD;&#xA;&#xD;&#xA;    Events&#xD;&#xA;        Unit - Any Unit takes Fatal Any damage (from Any effects)&#xD;&#xA;    Local Variables&#xD;&#xA;    Conditions&#xD;&#xA;        (Damaging effect) == BurndownDamage (Unnamed)&#xD;&#xA;        (Unit type of (Triggering unit)) == &lt;building&gt;&#xD;&#xA;&#xD;&#xA;Edit: I forgot the zerg building part, but it's exactly the same but with a different effect:&#xD;&#xA;&#xD;&#xA;        (Damaging effect) == ZergBuildingNotOnCreepDamage (Unnamed)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6387" PostHistoryTypeId="2" PostId="3272" RevisionGUID="9923e054-eaf4-40e3-9e0e-370d8bfdb9ef" CreationDate="2010-08-26T19:29:17.320" UserId="395" Text="Not really (other than Blender), granted I'm sure more than one indie team has acquired Maya or Max through less than legal channels, but thats a horse of a different color. There are a few free tools that are closer to ZBrush, but I can't find the names now." />
  <row Id="6388" PostHistoryTypeId="2" PostId="3273" RevisionGUID="5c597775-8f4b-45f9-9a8e-61083f4c6027" CreationDate="2010-08-26T19:36:34.893" UserId="1477" Text="A friend of mine and I were discussing different idea for allow materials in a world to be destroyed in a very piecemeal fashion and he proposed the idea of representing solids as very viscious fluids. My intuition is that this would be either: A) very difficult, or B) very resource intensive, but I am unsure.&#xD;&#xA;&#xD;&#xA; Is such a model feasible for an RPG/adventure rpg/fps?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6389" PostHistoryTypeId="1" PostId="3273" RevisionGUID="5c597775-8f4b-45f9-9a8e-61083f4c6027" CreationDate="2010-08-26T19:36:34.893" UserId="1477" Text="Solids as high viscocity Liquids" />
  <row Id="6390" PostHistoryTypeId="3" PostId="3273" RevisionGUID="5c597775-8f4b-45f9-9a8e-61083f4c6027" CreationDate="2010-08-26T19:36:34.893" UserId="1477" Text="&lt;algorithm&gt;&lt;physics&gt;&lt;graphics-programming&gt;" />
  <row Id="6391" PostHistoryTypeId="2" PostId="3274" RevisionGUID="b5cce277-bde0-4ae5-bf3e-0c08afdeeead" CreationDate="2010-08-26T20:19:16.913" UserId="1477" Text="leader - helps keep the team fighting and helps them fight better&#xD;&#xA;&#xD;&#xA;controller - debuffs the enemies, are damage to keep swarms at bay&#xD;&#xA;" />
  <row Id="6392" PostHistoryTypeId="16" PostId="3274" RevisionGUID="b5cce277-bde0-4ae5-bf3e-0c08afdeeead" CreationDate="2010-08-26T20:19:16.913" UserId="-1" />
  <row Id="6394" PostHistoryTypeId="2" PostId="3275" RevisionGUID="438a2629-6bf7-4e76-8d32-5d4c731a35a4" CreationDate="2010-08-26T20:22:30.847" UserId="162" Text="My understanding is that most programs won't have a problem with the feature, which essentially just allows the graphics driver to use an additional thread on multi-cpu systems. It doesn't do anything particularly special, it's just a normal windows thread. This will generally bring a flat increase in FPS.&#xD;&#xA;&#xD;&#xA;It can be a problem if something gets in the way of the driver thread by disrupting the windows task scheduler. From looking around it seems like two cases are the primary cause of problems with threaded optimization:&#xD;&#xA;&#xD;&#xA;1. Dealing with the windows message system on multiple threads at once or in a particularly weird way. This can disrupt windows's thread scheduling.&#xD;&#xA;2. Manually adjusting thread priorities. If you're trying to micromanage thread priorities this can cause a higher priority thread to pop up at a bad time for the driver thread, causing some expensive context switching.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6395" PostHistoryTypeId="2" PostId="3276" RevisionGUID="df9a5728-f2a9-4154-a628-8f27d530417a" CreationDate="2010-08-26T20:33:12.480" UserId="189" Text="I really like Wikipedia's comparison articles; the [Comparison of 3D computer graphics software][1] article is particularly relevant to this question.&#xD;&#xA;&#xD;&#xA;In particular, you may want to check out [SolidWorks][2] (though that's more CAD oriented), or the discontinued [Caligari trueSpace][3].&#xD;&#xA;&#xD;&#xA;But Blender, by far, is the most widely used free 3D software, and I do believe your second choice, Milkshape, would probably be the second most popular. I enjoy Milkshape myself because of the ease of implementation of the MS3D format.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Comparison_of_3D_computer_graphics_software&#xD;&#xA;  [2]: http://www.solidworks.com/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Truespace" />
  <row Id="6396" PostHistoryTypeId="2" PostId="3277" RevisionGUID="a7e8aa81-1170-4a24-9015-856aa86d2be2" CreationDate="2010-08-26T20:43:02.663" UserId="187" Text="For explosions in particular it's very important to get the blending right. One very important element is the use of [pre-multiplied alpha][1]. Quoted from the link:&#xD;&#xA;&#xD;&#xA;&gt; What if you want a single particle system that has additive flame particles turning into sooty lerping particles as they age? You can't change renderstate in the middle of a particle system, that's silly. Who can help us now? Why - it's Premultiplied Alpha Man - thank god you're here!&#xD;&#xA;&#xD;&#xA;&gt; So you can have particles change from additive to lerp as they get older - all you do is change the alpha value from 0 and the texture colour from a firey red/yellow colour towards an alpha of 1 and a dark sooty colour. &#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BPremultiplied%20alpha%5D%5D &quot;Tom Forsyth's Tech Blog&quot;" />
  <row Id="6397" PostHistoryTypeId="2" PostId="3278" RevisionGUID="a754e10c-274e-46a6-a82d-ff6c0301e5a3" CreationDate="2010-08-26T21:03:35.493" UserId="47" Text="This sort of makes me think about [Soft Body Dynamics][1], but they would never return to their original form?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Soft_body_dynamics" />
  <row Id="6398" PostHistoryTypeId="2" PostId="3279" RevisionGUID="6d71ced4-e124-4144-9c68-024adf6af336" CreationDate="2010-08-26T21:05:13.777" UserId="678" Text="Glasses are basically that: matter arranged amorphously, that is without an order (a hallmark of a liquid) but with the molecules unable to move very far from their initial positions (very very high viscosity). If it works in real life, there's no reason it can't work in a simulation. &#xD;&#xA;&#xD;&#xA;However you have to understand that when I say very very high viscosity, I mean very very very high viscosity. To contrast, water has a viscosity of 0.01 poise. The glass transition occurs (by definition) at 10^13 poise. That is a viscosity that is 15 orders of magnitude (a quadrillion times) higher than  what we expect for a regular liquid. The expected motion of said liquid during the duration of the game will be pretty much exactly zero.&#xD;&#xA;&#xD;&#xA;Well, that's just perfect! If the liquid does not move, we do not have to simulate it! We can just fill our liquid grid volumes and be done with it. Congratulations, you have just re-invented voxel rendering!&#xD;&#xA;&#xD;&#xA;It's an excellent choice for destructible geometry if you can spare the horsepower.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6399" PostHistoryTypeId="2" PostId="3280" RevisionGUID="bde09382-0028-45e9-9346-d7152053e1d6" CreationDate="2010-08-26T21:11:59.087" UserId="678" Text="If you happen to be using XNA, there's quite a bit of support for pre-multiplied alpha. Usually the conversion is done in the content pipeline, but there's nothing stopping you from doing it yourself." />
  <row Id="6400" PostHistoryTypeId="5" PostId="3265" RevisionGUID="751fc611-deb8-4585-abab-a242f5c743c3" CreationDate="2010-08-26T21:18:19.903" UserId="370" Comment="added 1 characters in body" Text="Should I be using premultiplied alpha?  Reading Tom Forsyth's [article][1] it seems a nobrainer.  Premultiplied alpha (AKA additive blending) is superior in every sense.  &#xD;&#xA;However, premultiplied alpha seems to have one major drawback, it's not well supported with tools.&#xD;&#xA;&#xD;&#xA;Do you/have you used premultiplied alpha?&#xD;&#xA;&#xD;&#xA;How is the tool support?&#xD;&#xA;&#xD;&#xA;In particular, I don't think gimp will edit premultiplied alpha images well.  Are there any gimp plugins to export premultiplied alpha?  How about an external tool?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5b%5bPremultiplied%20alpha%5d%5d" />
  <row Id="6401" PostHistoryTypeId="2" PostId="3281" RevisionGUID="b99baaf0-767a-4a8f-a31e-108b974bd11f" CreationDate="2010-08-26T21:22:05.800" UserDisplayName="Alex Koloskov" Text="[CoderCorner][1]&#xD;&#xA;&#xD;&#xA;Pierre is not posting very often these days (though his blog is not dead), but you can go through archives and find a lot of interesting information, he was quite a big inspiration for me in years.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codercorner.com/blog/" />
  <row Id="6402" PostHistoryTypeId="16" PostId="3281" RevisionGUID="b99baaf0-767a-4a8f-a31e-108b974bd11f" CreationDate="2010-08-26T21:22:05.800" UserId="-1" />
  <row Id="6403" PostHistoryTypeId="2" PostId="3282" RevisionGUID="58c4822a-e63d-4786-9da9-53d46b27840f" CreationDate="2010-08-26T21:27:44.830" UserDisplayName="Alex Koloskov" Text="[iDevBlogADay][1]&#xD;&#xA;&#xD;&#xA;iDevBlogADay is a fairly recent initiative to aggregate blogs of a some iPhone developers and bloggers and while usually projects like this one rarely produce good results, right now iDevBlogADay is probably the most interesting blog I read daily. It's not strictly about game development, but iPhone development is like 60% about games, so you won't be disappointed. &#xD;&#xA;&#xD;&#xA;And excellent GamesFromWithin blog mentioned above is a part of this initiative.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://idevblogaday.com/&#xD;&#xA;" />
  <row Id="6404" PostHistoryTypeId="16" PostId="3282" RevisionGUID="58c4822a-e63d-4786-9da9-53d46b27840f" CreationDate="2010-08-26T21:27:44.830" UserId="-1" />
  <row Id="6405" PostHistoryTypeId="2" PostId="3283" RevisionGUID="bbcfbc9f-6e6a-4dd5-87f9-5a51aaf1c38e" CreationDate="2010-08-26T21:37:11.393" UserId="1580" Text="There are several blogs that I enjoy:&#xD;&#xA;Humus have some quite interesting graphical tutorials, it's not really a blog but pretty much:&#xD;&#xA;http://www.humus.name/index.php?page=3D&#xD;&#xA;&#xD;&#xA;Some assembly required isn't really a gamedev-blog, but he takes up a lot of interesting points regarding performance that are really useful for game programmers.&#xD;&#xA;http://assemblyrequired.crashworks.org/&#xD;&#xA;&#xD;&#xA;Sutter's Mill is awesome, by Herb Sutter. General-development but also a lot about concurrency:&#xD;&#xA;http://herbsutter.com/&#xD;&#xA;&#xD;&#xA;Mischief Mayhem Soap by Maciej is an awesome gamedev-blog:&#xD;&#xA;http://msinilo.pl/blog/" />
  <row Id="6406" PostHistoryTypeId="16" PostId="3283" RevisionGUID="bbcfbc9f-6e6a-4dd5-87f9-5a51aaf1c38e" CreationDate="2010-08-26T21:37:11.393" UserId="-1" />
  <row Id="6407" PostHistoryTypeId="2" PostId="3284" RevisionGUID="fc22c7aa-37c5-4731-a765-0cb5a841d25c" CreationDate="2010-08-26T21:58:04.160" UserId="370" Text="[FastLSM][1] is sorta like what you're after.&#xD;&#xA;&#xD;&#xA;Alec has also made 2D game engine based on deforming lattice (instead of voxels as in FastLSM).  It's called [Physical][2].  Look at the demo asteroids style game to see what can be done and the performance.&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/uxf5K.gif&quot; width=&quot;400&quot;/&gt;&#xD;&#xA;&#xD;&#xA;Alec also built a full game using physical called [Sopwith IV][4].&#xD;&#xA;&#xD;&#xA;I never played Sopwith IV, but I spent plenty of time playing with the asteroids demo.&#xD;&#xA;&#xD;&#xA;One of the key features that make it fun is, everything is destructible.  Including you own ship.  It's hilarious when you snap off on one rocket, but can still control it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.alecrivers.com/fastlsm/&#xD;&#xA;  [2]: http://www.alecrivers.com/projects/physical.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/uxf5K.gif&#xD;&#xA;  [4]: http://www.alecrivers.com/sopwith/index.htm" />
  <row Id="6408" PostHistoryTypeId="2" PostId="3285" RevisionGUID="f6cc59cf-cd1d-4f5b-849f-0eb95ee22079" CreationDate="2010-08-26T22:22:14.667" UserId="769" Text="Do you destroy the unused body? They are not automatically destroyed if the sprite that &quot;owns&quot; it is removed (precisely because it doesn't own it at all, the Box2D world does)." />
  <row Id="6409" PostHistoryTypeId="5" PostId="3273" RevisionGUID="33c17078-ec4b-47bf-a326-f542f048c2d3" CreationDate="2010-08-26T22:26:49.347" UserId="1477" Comment="refining question" Text="A friend of mine and I were discussing different idea for allow materials in a world to be destroyed in a very piecemeal fashion and he proposed the idea of representing solids as very viscious fluids. My intuition is that this would be either: A) very difficult, or B) very resource intensive, but I am unsure.&#xD;&#xA;&#xD;&#xA; Is such a model feasible for an RPG/adventure rpg/fps?&#xD;&#xA;&#xD;&#xA;edit:clarification: The idea is for collisions and objects breaking to be handled by this system. To basically allow any object handled this way to be destructable instead of having scripted destroyable objects.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6410" PostHistoryTypeId="2" PostId="3286" RevisionGUID="461a19cc-06d0-4874-b221-ffbf07081a8d" CreationDate="2010-08-26T22:46:45.483" UserId="288" Text="I use XNA 3.1 at the moment with premultiplied alpha (native Premultiplied Alpha support was added in 4.0).&#xD;&#xA;&#xD;&#xA;Mostly it saves me time going through and making sure the transparent areas of my images have the correct colours (to avoid &lt;a href=&quot;http://a.imagehost.org/0187/XNA_Resize_Problem_Thread.jpg&quot;&gt;this kind&lt;/a&gt; &lt;a href=&quot;http://img121.imageshack.us/img121/3500/beforepma.png&quot;&gt;of thing&lt;/a&gt;). I also port to Silverlight, which does premultiplication by default.&#xD;&#xA;&#xD;&#xA;XNA has a content pipeline which makes &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2009/11/11/premultiplied-alpha-content-processor.aspx&quot;&gt;adding premultplied alpha preprocessing&lt;/a&gt; super-easy.&#xD;&#xA;&#xD;&#xA;That link contains the code for doing the conversion. For every pixel:&#xD;&#xA;&#xD;&#xA;    c.R = (byte)(c.R * c.A / 255);&#xD;&#xA;    c.G = (byte)(c.G * c.A / 255);&#xD;&#xA;    c.B = (byte)(c.B * c.A / 255);&#xD;&#xA;&#xD;&#xA;There is a lot to be said for having a content pipeline. If you're not using XNA, but are using Visual Studio, then you could &lt;a href=&quot;http://stackoverflow.com/questions/3433200/msbuild-how-do-i-create-and-use-a-task-to-convert-content-items-at-build-time&quot;&gt;throw together one yourself&lt;/a&gt;. Any other IDEs/build processes should also be capable.&#xD;&#xA;&#xD;&#xA;And finally, if you don't have a content processing step in your build (and so odds are you don't have a lot of content anyway), you could just as easily perform the premultiplication at runtime when you load your textures. It will add some constant factor to your texture load time.&#xD;&#xA;&#xD;&#xA;(If the implication wasn't clear: you probably *shouldn't* be editing premultiplied alpha images. Export them premultiplied if you can, or better yet preprocess them.)" />
  <row Id="6411" PostHistoryTypeId="2" PostId="3287" RevisionGUID="abbd8c3c-787d-436a-b46c-cb2fad4a5a4d" CreationDate="2010-08-26T23:57:48.870" UserId="1413" Text="Blender fits all of those requirements. Perhaps specifying why you are looking for something else might help people direct you better. By and large though my experience is that people use blender. I had some experience with a little modeler called Anim8or before I moved to blender and I can say it eased me into the 3d mindset." />
  <row Id="6412" PostHistoryTypeId="2" PostId="3288" RevisionGUID="2f046f8b-4f28-445d-bef1-0353c8ba2f69" CreationDate="2010-08-27T00:38:41.453" UserId="283" Text="I am thinking about working with a publisher for an iPhone game that I have developed.  I have been independent until now, but want to look into the publishing route because I just don't have the resources to market the game myself, and I would rather not take outside investment.&#xD;&#xA;&#xD;&#xA;So, those of you who have gone this route, what should I be looking for in a publisher?  What should I avoid?  " />
  <row Id="6413" PostHistoryTypeId="1" PostId="3288" RevisionGUID="2f046f8b-4f28-445d-bef1-0353c8ba2f69" CreationDate="2010-08-27T00:38:41.453" UserId="283" Text="Tips / pitfalls in selecting and working with publishers?" />
  <row Id="6414" PostHistoryTypeId="3" PostId="3288" RevisionGUID="2f046f8b-4f28-445d-bef1-0353c8ba2f69" CreationDate="2010-08-27T00:38:41.453" UserId="283" Text="&lt;publishing&gt;" />
  <row Id="6415" PostHistoryTypeId="2" PostId="3289" RevisionGUID="ac2d5fd6-83da-49e4-a8cd-7f940b622bd7" CreationDate="2010-08-27T01:00:09.027" UserId="1780" Text="By &quot;linking&quot; do you mean having separate objects moving attached to a frame of some sort?&#xD;&#xA;&#xD;&#xA;If so, this is what I've heard called &quot;segmented mesh,&quot; and I first remember noticing it in Tomb Raider.  Indeed- this is what first prompted me to start researching skinning because I realized that if you just had polygons between the segments it would (ok might) look a lot better.  It would certainly look fancier.&#xD;&#xA;&#xD;&#xA;Modern skinning though uses some number of weights on each vertex.  Therefore it is much more expensive to render the objects, since you're transforming each vertex by a number of matrices and then doing a weighted sum, as opposed to just transforming the vertex by one matrix.  (Which as it turns out is how our first-gen skinner worked, all verts had one weight, so the &quot;joint faces&quot; were the only ones that would deform.)&#xD;&#xA;&#xD;&#xA;Capabilities gained or lost?  The only difference in the end result is how they look.&#xD;&#xA;&#xD;&#xA;Specific situations where I'd use one or the other?  I'd use skinning if the jointed look didn't work or was otherwise noticeable and undesirable." />
  <row Id="6416" PostHistoryTypeId="5" PostId="1873" RevisionGUID="5f300c5e-6fba-4c6e-8578-e6e4768519ea" CreationDate="2010-08-27T01:58:08.610" UserId="728" Comment="Updated link to blog from a change in the permalink structure." Text="The best and simplest way to do it is to use your first idea and handle the WM_KEYUP/WM_KEYDOWN messages as well as the WM_SYSKEYUP/WM_SYSKEYDOWN messages. These can handle detecting the difference between left and right shift/control/alt keys, you just need the appropriate [virtual key codes][1]. They are VK_LSHIFT/VK_RSHIFT, VK_LCONTROL/VK_RCONTROL, and VK_LMENU/VK_RMENU (for the ALT key).&#xD;&#xA;&#xD;&#xA;I [wrote up a post][2] about how I did this, and I was handling both the WM_KEYUP/WM_KEYDOWN and WM_SYSKEYUP/WM_SYSKEYDOWN in the same handler.&#xD;&#xA;&#xD;&#xA;The only complication that I can see is that because you're using a non-US keyboard you'll need to add in some additional logic to handle the sequence described in the [WM_SYSKEYUP article][3] on MSDN. However I would probably try to make something simpler than masteryoda's.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx&#xD;&#xA;  [2]: http://dominikgrabiec.com/26-game-engine-input/&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ms646287%28VS.85%29.aspx" />
  <row Id="6417" PostHistoryTypeId="2" PostId="3290" RevisionGUID="e56f7eb4-d35c-48a2-acb3-27eda51f3986" CreationDate="2010-08-27T02:07:19.947" UserId="962" Text="**What is the best method for creating user definable or user changeable buttons in a flash game?**" />
  <row Id="6418" PostHistoryTypeId="1" PostId="3290" RevisionGUID="e56f7eb4-d35c-48a2-acb3-27eda51f3986" CreationDate="2010-08-27T02:07:19.947" UserId="962" Text="User definable buttons for a flash game" />
  <row Id="6419" PostHistoryTypeId="3" PostId="3290" RevisionGUID="e56f7eb4-d35c-48a2-acb3-27eda51f3986" CreationDate="2010-08-27T02:07:19.947" UserId="962" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="6420" PostHistoryTypeId="2" PostId="3291" RevisionGUID="2748209b-1cfc-4a07-b158-4e864941eea1" CreationDate="2010-08-27T02:26:56.540" UserId="323" Text="A while back I sat down and tried to come up with all of the fundamentally-different MMO combat roles I could, and I ended up with the following list, pasted pretty much directly out of my voluminous ideas file:&#xD;&#xA;&#xD;&#xA;**Standard trio**&#xD;&#xA;&#xD;&#xA;DPS: Kill monsters through sheer quantity of outgoing damage.&#xD;&#xA;&#xD;&#xA;Tank: A tank's sole job is to take a lot of damage (or, rather, to *not* take a lot of damage when anyone else *would* be taking a lot of damage.)&#xD;&#xA;&#xD;&#xA;Heal: Repair damage done to tank or to other players.&#xD;&#xA;&#xD;&#xA;**Conventional support**&#xD;&#xA;&#xD;&#xA;Buff: Make the group more powerful. Difficult to make fun - you'd need a situation where the optimal buffs were constantly changing.&#xD;&#xA;&#xD;&#xA;Debuff: Make the enemy monsters less powerful. Again, difficult to make fun.&#xD;&#xA;&#xD;&#xA;Crowd control: Completely nullify single enemies or groups of enemies so that the players can focus fire more effectively.&#xD;&#xA;&#xD;&#xA;Screening/defense: I'm thinking there's a distinction between &quot;heal damage that has been taken&quot;, &quot;be a tank&quot;, and &quot;prevent damage to other players&quot;. Some kind of a super-discipline priest. Fundamentally different, but difficult to show that.&#xD;&#xA;&#xD;&#xA;**Unconventional support**&#xD;&#xA;&#xD;&#xA;Sniper: Class whose sole purpose is to nullify single important parts of enemies. &quot;Spell interrupter&quot; would be a form of this. As a slightly more complex example I'm imagining a group of enemies that have a &quot;damage-dealing module&quot; and a &quot;damage-reflecting module&quot;, where only one can be disabled at a time - disable &quot;damage-dealing&quot; for the group that the players aren't killing, and &quot;damage-reflecting&quot; for the single creature the players *are* killing. Things can get arbitrarily complex from here.&#xD;&#xA;&#xD;&#xA;Threat management: Usually rolled into tank, but why? Make a class that can funnel threat from one character to another, or modify how threat is accumulated, or masquerade as one character. Misdirection+Intervene+Vigilance+more.&#xD;&#xA;&#xD;&#xA;Command: Raid leading is tough. Make a &quot;class&quot; whose sole purpose is to direct players, give them a bird's-eye view of the battle, stop forcing them to run their own character as well as the raid.&#xD;&#xA;&#xD;&#xA;Mobility/positioning: We've got a little of this with Death Grip, and now Life Grip in Cataclysm, but a class whose sole purpose is to move players or monsters around for optimal placement. Imagine some kind of crazy Thaddius/Hodir combo, where positioning is vital and everyone is moving around constantly, with this dude fixing issues as they come up.&#xD;&#xA;&#xD;&#xA;Recon: A class built around dealing with monsters that have not attacked yet - the ability to interrupt/redirect patrols, see who's coming before they come, split up groups temporarily. Rogue has a little of this with Distract.&#xD;&#xA;&#xD;&#xA;**Caution**&#xD;&#xA;&#xD;&#xA;Obviously it's difficult to come up with a way that many of these can actually be, you know, interesting, but I don't think it's impossible. You would, however, need a thoroughly different model from WoW's. Also I kind of dread the idea of &quot;okay it's time to go run Deadmines, we need twelve players from twelve completely different classes&quot;, so I feel like any functional game would either just pick a different set/layout of these from WoW or wrap up a bunch of them into one class.&#xD;&#xA;&#xD;&#xA;**Example**&#xD;&#xA;&#xD;&#xA;Just as an example of a possible combo, I really like the idea of Tank+Debuff+Sniper being one class, Threat+Mobility being another, and DPS+Healing being the third more common class. Your tank's job is to stay alive and keep the monsters from obliterating the party, you have one utility character constantly trying to redirect every monster to the tank and keep people out of fire, and you have three damage-dealers punching enemies and making health fly out. I think there's potential here. You can easily generate other interesting combos by just mixing and matching various roles." />
  <row Id="6421" PostHistoryTypeId="16" PostId="3291" RevisionGUID="2748209b-1cfc-4a07-b158-4e864941eea1" CreationDate="2010-08-27T02:26:56.540" UserId="-1" />
  <row Id="6422" PostHistoryTypeId="4" PostId="16" RevisionGUID="899a5b4b-5ba8-4aaf-bb01-2d1017e1c41a" CreationDate="2010-08-27T03:33:39.617" UserId="660" Comment="clarified the title" Text="Cross Platform 2D Graphics Engines" />
  <row Id="6423" PostHistoryTypeId="6" PostId="16" RevisionGUID="899a5b4b-5ba8-4aaf-bb01-2d1017e1c41a" CreationDate="2010-08-27T03:33:39.617" UserId="660" Comment="clarified the title" Text="&lt;2d&gt;&lt;engine&gt;&lt;iphone&gt;&lt;cross-platform&gt;&lt;windows&gt;" />
  <row Id="6424" PostHistoryTypeId="5" PostId="3290" RevisionGUID="5fa11878-3224-4d72-9b23-33037dc01261" CreationDate="2010-08-27T03:34:24.423" UserId="51" Comment="deleted 4 characters in body" Text="What is the best method for creating user definable or user changeable buttons in a flash game?" />
  <row Id="6425" PostHistoryTypeId="5" PostId="1871" RevisionGUID="1e859ffb-57a9-480a-99cc-0b3ab47e9c09" CreationDate="2010-08-27T03:34:34.390" UserId="660" Comment="added 7 characters in body" Text="[SFML](http://www.sfml-dev.org/) is a nice modern, Object-Oriented, cross platform graphics engine.  It is hardware accelerated (based on OpenGL), and has bindings for&#xD;&#xA;&#xD;&#xA;* C++&#xD;&#xA;* C&#xD;&#xA;* .Net (C#, VB.Net, C++/CLI, ...)&#xD;&#xA;* Python&#xD;&#xA;* D&#xD;&#xA;* Ruby&#xD;&#xA;* Ocaml" />
  <row Id="6426" PostHistoryTypeId="2" PostId="3292" RevisionGUID="e1084522-11d1-4600-8b74-83dc6190d813" CreationDate="2010-08-27T04:24:48.693" UserId="1288" Text="You mention that you're looking for a publisher primarily for marketing (rather than funding) your iPhone game, so if I understand correctly, you're looking at companies such as Chillingo (if I recall correctly, they'll take finished titles and expose them to hungry gamers). &#xD;&#xA;&#xD;&#xA;[We've][1] worked with publishers such as Steam, D2D, and OnLive, all of which have been really great for us as indies. Here are some rules-of-thumb that have helped us navigate that:&#xD;&#xA;&#xD;&#xA; - **Contracts:** We always, always, always, get a lawyer to review the publishing contract. Sometimes, this is a formal, lengthy back-and-forth process, but in the past, we've even relied on family friends (who were lawyers) for a simple review that turned up things we'd missed. And if a publisher refuses to sign a contract to which we've made reasonable changes, we run away.&#xD;&#xA; - **Audience:** We do better if our publisher's audience is aligned with our own. This seems a no-brainer, but we didn't realize how pronounced the effect would be. We thought we'd sell (perhaps) twice as many units on one platform as on another. That discrepancy turned out to be two or three orders of magnitude.&#xD;&#xA; - **PR:** A good publisher will get your game in front of as many (receptive) eyes as possible. Still, we get good results by doing some of the PR push, ourselves. No other company loves our games as much as ours does; and no other company is as invested in seeing them do well! To wit, we'll go above and beyond what publishers do. For example, if they're pushing our game primarily to their existing customers, we'll hit the press with a humble [press release][2] ourselves.&#xD;&#xA; - **Making Friends:** Small game development studios tend to help each other out, so if we have questions about a publisher, we'll talk to other groups they've worked with. Cold calls work here! These studios can't say everything, as they'll be bound by a nondisclosure agreement, but &quot;We love this publisher!&quot; or &quot;Beware!&quot; goes a long way.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dejobaan.com&#xD;&#xA;  [2]: http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=writing+a+press+release" />
  <row Id="6427" PostHistoryTypeId="5" PostId="3283" RevisionGUID="ce168819-7595-4894-897d-c030ab5c98fe" CreationDate="2010-08-27T06:59:41.337" UserId="1580" Comment="deleted 506 characters in body; added 160 characters in body" Text="Mischief Mayhem Soap by Maciej is an awesome gamedev-blog:&#xD;&#xA;http://msinilo.pl/blog/&#xD;&#xA;&#xD;&#xA;He puts a lot of effort into explaining performance, caches, general issues that are commonly overlooked etc. I think it's a &quot;must-read&quot; if you're a game-dev." />
  <row Id="6428" PostHistoryTypeId="2" PostId="3293" RevisionGUID="a8b8b7bf-81ca-4c15-b4d9-f5552ffeceba" CreationDate="2010-08-27T07:39:22.857" UserId="919" Text="Some other types I've seen in games I haven't written on my first post are.&#xD;&#xA;&#xD;&#xA;Fighting: &#xD;&#xA;Sacrifice (Samurai Showdown Rasestusmaru)- sacrifices something for better performace in the given example it life for a full rage meter.&#xD;&#xA;&#xD;&#xA;Tabula Rasa (Darkstalkers Marionette and shadow)- one is a character that copies his enemies while the other possess the previous character beaten.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Card Games:&#xD;&#xA;Sacrifice/Recycle decks(Warstorm explode reclaim)- discard to get a tactic going and recycle cards for viability.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6429" PostHistoryTypeId="16" PostId="3293" RevisionGUID="a8b8b7bf-81ca-4c15-b4d9-f5552ffeceba" CreationDate="2010-08-27T07:39:22.857" UserId="-1" />
  <row Id="6430" PostHistoryTypeId="5" PostId="3293" RevisionGUID="ec16289e-36bc-4ac4-81d3-7118a49fa1bd" CreationDate="2010-08-27T07:56:28.273" UserId="919" Comment="deleted 26 characters in body" Text="Some other types I've seen in games I haven't written on my first post are.&#xD;&#xA;&#xD;&#xA;Fighting: &#xD;&#xA;Sacrifice (Samurai Showdown Rasestusmaru)- sacrifices something for better performace in the given example it life for a full rage meter.&#xD;&#xA;&#xD;&#xA;Tabula Rasa (Darkstalkers Marionette and shadow)- one is a character that copies his enemies while the other possess the previous character beaten.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Card Games:&#xD;&#xA;Sacrifice/Recycle decks- discard to get a tactic going and recycle cards for viability.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6431" PostHistoryTypeId="2" PostId="3294" RevisionGUID="6c5fcbe7-8405-4ceb-b980-131a5a50dfb7" CreationDate="2010-08-27T08:14:55.557" UserId="1156" Text="I think this would be relevant more in fantasy style RPGs, but stealing from competitive Pokemon battling:&#xD;&#xA;&#xD;&#xA; - Special Sweeper/Special Wall - A sweeper being one that is designed primarily for attacking with high speed and special attacking skill, and a wall for blocking opponents with high hp, defenses. Special meaning high magic attack/defense.&#xD;&#xA; - Physical Sweeper/Physical Wall - Same as above, but for physical attacks.&#xD;&#xA; - Healer - Kind of obvious.&#xD;&#xA; - Trapper/Annoyer - The one that would lower stats, restrict, and in some types of games stop mobs from running away." />
  <row Id="6432" PostHistoryTypeId="16" PostId="3294" RevisionGUID="6c5fcbe7-8405-4ceb-b980-131a5a50dfb7" CreationDate="2010-08-27T08:14:55.557" UserId="-1" />
  <row Id="6433" PostHistoryTypeId="2" PostId="3295" RevisionGUID="559f0710-71f9-476d-bccb-6886ec045ce6" CreationDate="2010-08-27T08:24:48.647" UserId="1868" Text="Couple papers about this topic:&#xD;&#xA;&#xD;&#xA;Design of a Driving Simulation Sound Engine&#xD;&#xA;http://www.nads-sc.uiowa.edu/dscna07/DSCNA07CD/papers/Section%207B%20-%20Simulator%20Characteristics%20-%20Sight%20and%20Sound/Heitbrink.pdf&#xD;&#xA;&#xD;&#xA;Sound Synthesis for Virtual Reality and Computer Games (ch 6-4) http://circle.ubc.ca/bitstream/handle/2429/10055/ubc_1999-389936.pdf?sequence=1" />
  <row Id="6434" PostHistoryTypeId="5" PostId="3147" RevisionGUID="cb2d878f-844c-412d-93e9-0850e6d8e3b6" CreationDate="2010-08-27T08:25:23.957" UserId="1868" Comment="deleted 385 characters in body" Text="I have been thinking how to create realistic sound for a car. The main sound is the engine, then all kind of wind, road and suspension sounds.&#xD;&#xA;&#xD;&#xA;Are there any open source projects for the engine sound simulation? Simply pitching up the sample does not sound too great. The ideal would be to something that allows me to pick type of the engine (i.e. inline-4 vs v-8), add extras like turbo/supercharger whine and finally set the load and rpm.&#xD;&#xA;&#xD;&#xA;Edit: Something like http://www.sonory.org/examples.html" />
  <row Id="6435" PostHistoryTypeId="2" PostId="3296" RevisionGUID="d745952d-05a1-4718-a05b-21482b33e151" CreationDate="2010-08-27T08:47:05.503" UserId="10" Text="You could create a class that extends Sprite or MovieClip that it's inputs are the height, width, x, y and action (function), and create a new instance of that class each time a user wants to create a new button." />
  <row Id="6436" PostHistoryTypeId="2" PostId="3297" RevisionGUID="6a45698d-4135-4bc0-96ba-cbcb1a28c17c" CreationDate="2010-08-27T09:02:58.543" UserId="119" Text="I'm trying to compile a list of **game mechanics**, by which I mean high-level/meta game mechanics like Cooperation, Resource Management, Chance and Time Manipulation rather than low level mechanics like running, jumping climbing ladders, etc&#xD;&#xA;&#xD;&#xA;Does any one have any suggestions or can point me to good existing lists? My WIP list is already proving to be quite useful to me in the way I think about games." />
  <row Id="6437" PostHistoryTypeId="1" PostId="3297" RevisionGUID="6a45698d-4135-4bc0-96ba-cbcb1a28c17c" CreationDate="2010-08-27T09:02:58.543" UserId="119" Text="A list of game mechanics" />
  <row Id="6438" PostHistoryTypeId="3" PostId="3297" RevisionGUID="6a45698d-4135-4bc0-96ba-cbcb1a28c17c" CreationDate="2010-08-27T09:02:58.543" UserId="119" Text="&lt;game-mechanics&gt;" />
  <row Id="6439" PostHistoryTypeId="16" PostId="3297" RevisionGUID="6a45698d-4135-4bc0-96ba-cbcb1a28c17c" CreationDate="2010-08-27T09:02:58.543" UserId="119" />
  <row Id="6440" PostHistoryTypeId="2" PostId="3298" RevisionGUID="38789f60-f6d5-4a49-ba6c-ded4ec572122" CreationDate="2010-08-27T11:32:17.807" UserId="458" Text="There's a book called Patterns in Game Design that is more or less exactly what you're looking for:&#xD;&#xA;http://www.amazon.com/Patterns-Game-Design-Development/dp/1584503548&#xD;&#xA;&#xD;&#xA;I'll warn you of a few things. First, a lot of the mechanics in that book didn't have names, so the authors invented them, so sometimes the terminology can get confusing. Second, the list is large, and while there are links between related concepts, it's still a lot to take in. Third, about half of the mechanics are on an included CD-ROM rather than in the book itself, with lots of cross-referencing between the two, so looking up a chain of terms can sometimes take you back and forth from one to the other.&#xD;&#xA;&#xD;&#xA;Admittedly, these are all issues you'd probably run into on your own once your list got to be a certain size, anyway." />
  <row Id="6441" PostHistoryTypeId="16" PostId="3298" RevisionGUID="38789f60-f6d5-4a49-ba6c-ded4ec572122" CreationDate="2010-08-27T11:32:17.807" UserId="-1" />
  <row Id="6442" PostHistoryTypeId="5" PostId="3276" RevisionGUID="cbb2ab99-f77b-4eee-a8ee-2c0d5957d1e0" CreationDate="2010-08-27T11:46:29.607" UserId="189" Comment="added 41 characters in body; added 37 characters in body" Text="I really like Wikipedia's comparison articles; the [Comparison of 3D computer graphics software][1] article is particularly relevant to this question.&#xD;&#xA;&#xD;&#xA;In particular, you may want to check out the discontinued [Caligari trueSpace][2] which was used in game modeling IIRC, or [Ayam][3], &quot;a free 3D modelling environment for the RenderMan interface.&quot;&#xD;&#xA;&#xD;&#xA;But Blender, by far, is the most widely used free 3D software, and I do believe your second choice, Milkshape, would probably be the second most popular. I enjoy Milkshape myself because of the ease of implementation of the MS3D format.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Comparison_of_3D_computer_graphics_software&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Truespace&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Ayam_(software)" />
  <row Id="6443" PostHistoryTypeId="2" PostId="3299" RevisionGUID="08cfe0bd-d69d-43c9-93d9-8d435ad3791f" CreationDate="2010-08-27T12:28:16.727" UserId="744" Text="What you want is not generally possible yet, although &lt;a href=&quot;http://abclocal.go.com/kgo/video?id=7599241&quot;&gt;there was actually a pretty cool invention recently&lt;/a&gt; that helps quite a bit. Quite a bit more expensive than an HD camera though." />
  <row Id="6444" PostHistoryTypeId="2" PostId="3300" RevisionGUID="14ab0d8e-6bc6-458a-b671-02b8adefe936" CreationDate="2010-08-27T13:15:56.257" UserId="1505" Text="I've noticed that many 3d programs normally do vector/matrix calculations as well as mesh transformations on the CPU. Has anyone found an advantage in moving these calculations into vertex shaders on the GPU?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6445" PostHistoryTypeId="1" PostId="3300" RevisionGUID="14ab0d8e-6bc6-458a-b671-02b8adefe936" CreationDate="2010-08-27T13:15:56.257" UserId="1505" Text="Mesh Transformations on the CPU vs GPU" />
  <row Id="6446" PostHistoryTypeId="3" PostId="3300" RevisionGUID="14ab0d8e-6bc6-458a-b671-02b8adefe936" CreationDate="2010-08-27T13:15:56.257" UserId="1505" Text="&lt;opengl&gt;&lt;3d&gt;&lt;performance&gt;&lt;gpu&gt;" />
  <row Id="6447" PostHistoryTypeId="2" PostId="3301" RevisionGUID="9413a20d-e183-499e-9fe0-db427a8ad915" CreationDate="2010-08-27T13:32:43.377" UserId="1868" Text="[Wings3][1]d. Great tool for modelling. I found it easier to learn than Blender and I managed to get shapes I wanted reasonably fast.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wings3d.com/" />
  <row Id="6448" PostHistoryTypeId="2" PostId="3302" RevisionGUID="8ca770c1-b71b-4237-b32a-3246c68d1267" CreationDate="2010-08-27T13:35:53.377" UserId="1597" Text="What do you mean by &quot;mesh transformations&quot;? Transforming geometry by some set of matrices? Most games these days will let the GPU handle simple transformations, skinning, etc. And most of them will be using vertex shaders to do it. On some platforms you either don't have shaders, or there are other advantages to doing these things on the CPU. For example, on the PS3 you can take some load off the RSX by letting the SPUs handle skinning and transformation. If you're doing multi-pass lighting then skinning on the CPU can be advantageous, since you only have to do it once and submit the results to be drawn for each rendering pass. So there are exceptions, but in general most games are doing these things on the GPU and in shaders. &#xD;&#xA;&#xD;&#xA;Or did you mean something fancier, like using the GPU for general vector math? These days we have general purpose GPUs that can run fairly generic C code via systems such as CUDA. It is possible to take advantage of this for heavy vector math, and I know there are programs out there that do this. I don't have any experience with it personally though. " />
  <row Id="6449" PostHistoryTypeId="2" PostId="3303" RevisionGUID="492bf11c-6949-4a6c-b4c2-9592618f7e44" CreationDate="2010-08-27T13:48:08.110" UserId="1923" Text="Generally speaking:&#xD;&#xA;Mesh transformations are done on the GPU. You send in the transformation matrix to the GPU and the shader applies it to all verticies of the mesh.&#xD;&#xA;&#xD;&#xA;Using the GPU to calculate the Matrix itself is a different matter &amp; is actually slower on the GPU because there are so many stored values that change from frame to frame that are necessary to help determine the final transformation matrix. Sending this data to &amp; from CPU - GPU is slow. Also, on the CPU, the calculations are done once, whereas on the GPU, they would be done for each vertex.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6450" PostHistoryTypeId="5" PostId="3300" RevisionGUID="aaeff192-82e8-4fc1-b409-3b1febc24411" CreationDate="2010-08-27T14:08:16.977" UserId="1505" Comment="changed from mesh to geometric to cause less confusion" Text="I've noticed that many 3d programs normally do vector/matrix calculations as well as geometric transformations on the CPU. Has anyone found an advantage in moving these calculations into vertex shaders on the GPU?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6451" PostHistoryTypeId="4" PostId="3300" RevisionGUID="aaeff192-82e8-4fc1-b409-3b1febc24411" CreationDate="2010-08-27T14:08:16.977" UserId="1505" Comment="changed from mesh to geometric to cause less confusion" Text="Geometric Transformations on the CPU vs GPU" />
  <row Id="6452" PostHistoryTypeId="6" PostId="3300" RevisionGUID="aaeff192-82e8-4fc1-b409-3b1febc24411" CreationDate="2010-08-27T14:08:16.977" UserId="1505" Comment="changed from mesh to geometric to cause less confusion" Text="&lt;engine&gt;&lt;opengl&gt;&lt;3d&gt;&lt;performance&gt;&lt;gpu&gt;" />
  <row Id="6453" PostHistoryTypeId="2" PostId="3304" RevisionGUID="f49e60c9-0801-4d34-80a5-cb02aee1704e" CreationDate="2010-08-27T14:14:34.670" UserId="1924" Text="Is there an easy way to put music in a java applet? Preferably streaming so that it doesn't need to be preloaded." />
  <row Id="6454" PostHistoryTypeId="1" PostId="3304" RevisionGUID="f49e60c9-0801-4d34-80a5-cb02aee1704e" CreationDate="2010-08-27T14:14:34.670" UserId="1924" Text="What's the preferred way to put music in a java applet?" />
  <row Id="6455" PostHistoryTypeId="3" PostId="3304" RevisionGUID="f49e60c9-0801-4d34-80a5-cb02aee1704e" CreationDate="2010-08-27T14:14:34.670" UserId="1924" Text="&lt;java&gt;&lt;music&gt;" />
  <row Id="6456" PostHistoryTypeId="2" PostId="3305" RevisionGUID="0f47ea34-d03b-439a-ba6f-8fd8de82fd2e" CreationDate="2010-08-27T14:32:58.273" UserId="608" Text="It seems that the expierence is not that useful and easy to get.&#xD;&#xA;&#xD;&#xA;Is the experience important to older game programmer?&#xD;&#xA;&#xD;&#xA;What is the most important thing to a game programmer to get improved?&#xD;&#xA;" />
  <row Id="6457" PostHistoryTypeId="1" PostId="3305" RevisionGUID="0f47ea34-d03b-439a-ba6f-8fd8de82fd2e" CreationDate="2010-08-27T14:32:58.273" UserId="608" Text="Is it easy for a game programmer to jump out of game industry?" />
  <row Id="6458" PostHistoryTypeId="3" PostId="3305" RevisionGUID="0f47ea34-d03b-439a-ba6f-8fd8de82fd2e" CreationDate="2010-08-27T14:32:58.273" UserId="608" Text="&lt;career&gt;" />
  <row Id="6459" PostHistoryTypeId="2" PostId="3306" RevisionGUID="6617c716-7fcf-4d89-9228-dd8de51418cc" CreationDate="2010-08-27T15:14:42.697" UserId="189" Text="You might try [something like this][1], though as the author said he didn't stream so it stuttered. You'd want to preload a certain amount of the sound before feeding it to the Line.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.sun.com/thread.jspa?threadID=5406593" />
  <row Id="6460" PostHistoryTypeId="2" PostId="3307" RevisionGUID="a7174857-5d64-447d-9b14-0c9327906dc8" CreationDate="2010-08-27T15:30:50.660" UserId="1926" Text="Something like this?  &#xD;&#xA;[link text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.squidi.net/three/index.php &quot;Three Hundred Mechanics&quot;" />
  <row Id="6461" PostHistoryTypeId="16" PostId="3307" RevisionGUID="a7174857-5d64-447d-9b14-0c9327906dc8" CreationDate="2010-08-27T15:30:50.660" UserId="-1" />
  <row Id="6462" PostHistoryTypeId="5" PostId="3307" RevisionGUID="d1395635-2b72-456e-961a-6287fea48577" CreationDate="2010-08-27T16:06:34.000" UserId="653" Comment="added 29 characters in body" Text="Something like the [Three Hundred Mechanics][1] page at squidi.net?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.squidi.net/three/index.php &quot;Three Hundred Mechanics&quot;" />
  <row Id="6463" PostHistoryTypeId="2" PostId="3308" RevisionGUID="03cb3549-4dbb-4a7b-8bf8-7fc741082cda" CreationDate="2010-08-27T16:35:04.973" UserId="1780" Text="It's simple to get out of the industry.  Just quit your job.&#xD;&#xA;&#xD;&#xA;&quot;Experience&quot; on its own is not useful, if &quot;experience&quot; is measured by number of days spent sitting in a chair in a game development office.  That is easy to get.  What is harder to get are the skills that are required to make games, and harder yet the skills to make great games.&#xD;&#xA;&#xD;&#xA;Experience is important to the older programmer so that they can justify their salaries.  Given the above, though, it is not what people should be focused on.&#xD;&#xA;&#xD;&#xA;The most important thing that a game developer could stand to improve is their ability to communicate effectively.  As an industry, we have few who are truly skilled communicators, and effective communication can act as a substantial force multiplier." />
  <row Id="6464" PostHistoryTypeId="2" PostId="3309" RevisionGUID="08c8de07-ccea-4dda-a4f4-b9c1383d8731" CreationDate="2010-08-27T17:46:02.000" UserId="865" Text="I can't for the life of me find it at this moment (don't help that my computer fails to open pdf's at the moment), but I know there's a wiki out there what has a significant list of them. The keyword you're looking for is &quot;Taxonomy&quot;.&lt;br&gt; &#xD;&#xA;Googling +taxonomy +videogames should definitely give you some leads.&lt;br&gt; &#xD;&#xA;Sorry for not being of more help, lost all my bookmarks." />
  <row Id="6465" PostHistoryTypeId="16" PostId="3309" RevisionGUID="08c8de07-ccea-4dda-a4f4-b9c1383d8731" CreationDate="2010-08-27T17:46:02.000" UserId="-1" />
  <row Id="6466" PostHistoryTypeId="2" PostId="3310" RevisionGUID="e5be1ef7-dbb7-4aaa-8879-0f632a8905c6" CreationDate="2010-08-27T18:25:02.103" UserId="165" Text="[AlienBrain][1]&#xD;&#xA;--&#xD;&#xA;From [Avid][2]:  &#xD;&#xA;&#xD;&#xA;&gt; Alienbrain is a digital asset&#xD;&#xA;&gt; management system for artists in the&#xD;&#xA;&gt; entertainment industry&#xD;&#xA;&#xD;&#xA;  - Commercial (more expensive than Perforce), centralized  &#xD;&#xA;  - Designed to integrate with other professional 2D and 3D workflow tools such Photoshop, Maya, 3ds Max, Microsoft Visual Studio, etc.&#xD;&#xA;&#xD;&#xA;I have *no* experience with AlienBrain, and only heard about it from the book [Game Coding Complete][3] by Mike McShaffry. He appears to think highly of it, however:&#xD;&#xA;&#xD;&#xA;&gt; Artists and other contributors will&#xD;&#xA;&gt; actually use this product, unlike&#xD;&#xA;&gt; others that are mainly designed to&#xD;&#xA;&gt; integrate well with Visual Studio and&#xD;&#xA;&gt; not creative applications such as&#xD;&#xA;&gt; Photoshop and 3D Studio Max. One of&#xD;&#xA;&gt; the big drawbacks of other products is&#xD;&#xA;&gt; their rather naive treatment of&#xD;&#xA;&gt; nontext files. AlienBrain was written&#xD;&#xA;&gt; with these files in mind.&#xD;&#xA;&#xD;&#xA;Of course he also describes it as:&#xD;&#xA;&#xD;&#xA;&gt; For those of you with really serious&#xD;&#xA;&gt; asset tracking problems and **equally&#xD;&#xA;&gt; serious budgets**...&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nxn-software.com/&#xD;&#xA;  [2]: http://www.avid.com/US/&#xD;&#xA;  [3]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/" />
  <row Id="6467" PostHistoryTypeId="16" PostId="3310" RevisionGUID="e5be1ef7-dbb7-4aaa-8879-0f632a8905c6" CreationDate="2010-08-27T18:25:02.103" UserId="-1" />
  <row Id="6468" PostHistoryTypeId="2" PostId="3311" RevisionGUID="90ed9068-9420-4580-b767-fbe39efc3a4a" CreationDate="2010-08-27T18:51:51.780" UserId="1628" Text="A quick search through the web suggests there's quite a few methods of potentially detecting back-culled faces on the CPU.&#xD;&#xA;&#xD;&#xA;The purpose of the check is to evaluate whether to performing other operations such as tessellations is reasonable by dynamically altering the LOD of visible polys based on the number of polys on the screen.&#xD;&#xA;&#xD;&#xA;What would your suggestions be for implementing this? Speed isn't necessarily the greatest concern - for this prototype mathematical simplicity is more important. Code snippets welcome :-)" />
  <row Id="6469" PostHistoryTypeId="1" PostId="3311" RevisionGUID="90ed9068-9420-4580-b767-fbe39efc3a4a" CreationDate="2010-08-27T18:51:51.780" UserId="1628" Text="Methods to 'cull check' polys in OpenGL" />
  <row Id="6470" PostHistoryTypeId="3" PostId="3311" RevisionGUID="90ed9068-9420-4580-b767-fbe39efc3a4a" CreationDate="2010-08-27T18:51:51.780" UserId="1628" Text="&lt;opengl&gt;&lt;math&gt;&lt;culling&gt;" />
  <row Id="6471" PostHistoryTypeId="2" PostId="3312" RevisionGUID="eea26ff0-59d5-439b-ba9e-bf29dd9d2a2a" CreationDate="2010-08-27T18:57:41.440" UserId="1232" Text="Many geometric transformations can be done on non-GPU processors, however one must consider the  target platform.  Your mileage will vary based on what platform you're targeting, and the bottlenecks of that platform.&#xD;&#xA;&#xD;&#xA;One consideration is bus bandwidth between the device that is generating the geometry, and the device that is rendering the geometry. &#xD;&#xA;&#xD;&#xA;In a typical modern PC system, the CPU is on one side of the PCIe bus (http://en.wikipedia.org/wiki/PCI_Express), and the GPU is on the other. The only way you can transfer per-frame generated data from CPU to GPU (and vice-versa) is via this bus. This means, you can be limited by the transfer speed of this bus. If your target platform has PCIe 2.x with 16 lanes, you have 8GB/s bandwidth. In practice, transfers across the PCIe are not 100% efficient, as some of the bandwidth is consumed for the protocol during your transfers. Depending on the size of your transfers, you could lose 5-10% of your bandwidth just on the per-packet overhead.&#xD;&#xA;&#xD;&#xA;eg. Given a PC platform that is running PCIe 2.x with 16 lanes, how much data can you generate per frame for feeding to the GPU? Assuming you want the run at 60fps, this translates to 8GB/60 = 136MB per frame for PCIe 2.x. Multiplying by some (random) 90% factor to account for driver communication overhead and PCIe transfer protocol overhead, you can generate around 120Mb data per frame without being limited by PCIe 2.x bandwidth.&#xD;&#xA;&#xD;&#xA;Another question you have to answer: will the generation of this 120Mb of data be easily achievable in 1/60th of a second on your target CPU? Remembering that you have to perform a number of other game tasks on your CPU, you can run into a lack of time to generate the transformed data.&#xD;&#xA;&#xD;&#xA;Alright, so what factors makes it more viable to do on a GPU then? One factor is GPU memory bandwidth, which is the bandwidth between the GPU and it's local video memory. On contemporary mid-range GPUs this video memory bandwidth can be as high as 200GB/s (yes, that's 25x the PCIe 2.x bandwidth). Another factor is that the GPU is massively parallel, has hundreds of ALUs and is able to hide memory access latency by running thousands of threads at a time. &#xD;&#xA;&#xD;&#xA;All of these factors can contribute to the obvious win of pushing more work onto the GPU, but again YMMV depending on your target platform." />
  <row Id="6472" PostHistoryTypeId="2" PostId="3313" RevisionGUID="cd4d14af-fa44-4c78-a492-86685813ba97" CreationDate="2010-08-27T18:59:46.043" UserId="47" Text="If you take the &quot;game&quot; out of game programmer, you're still a programmer.  You should still have the same fundamental skills as any other programmer (design, testing, planning, communicating, etc.).&#xD;&#xA;&#xD;&#xA;For example, a game programmer becoming an accounting programmer: the only difference is what you &quot;specialized&quot; in.  But given a little bit of time you can easily pick those things up and become familiar with them (like anything else). It'll be even more easier so if your &quot;core&quot; skills are practiced and honed.  &#xD;&#xA;&#xD;&#xA;The reverse path should be equally true. If I understand what my code is doing, how to practice good design and patterns, and communicate well to my team members, then &quot;game&quot; programming is just learning the specializations of that field.  Get your foot in the door with an internship and prove that you are a good programmer and are capable of learning the specializations required for your field." />
  <row Id="6473" PostHistoryTypeId="5" PostId="3312" RevisionGUID="67f95b5c-3c82-4103-8687-b99066457005" CreationDate="2010-08-27T19:04:03.473" UserId="1232" Comment="changed a word" Text="Many geometric transformations can be done on non-GPU processors, however one must consider the  target platform.  Your mileage will vary based on what platform you're targeting, and the bottlenecks of that platform.&#xD;&#xA;&#xD;&#xA;One consideration is bus bandwidth between the device that is generating the geometry, and the device that is rendering the geometry. &#xD;&#xA;&#xD;&#xA;In a typical modern PC system, the CPU is on one side of the PCIe bus (http://en.wikipedia.org/wiki/PCI_Express), and the GPU is on the other. The only way you can transfer per-frame generated data from CPU to GPU (and vice-versa) is via this bus. This means, you can be limited by the transfer speed of this bus. If your target platform has PCIe 2.x with 16 lanes, you have 8GB/s bandwidth. In practice, transfers across the PCIe are not 100% efficient, as some of the bandwidth is consumed for the protocol during your transfers. Depending on the size of your transfers, you could lose 5-10% of your bandwidth just on the per-packet overhead.&#xD;&#xA;&#xD;&#xA;eg. Given a PC platform that is running PCIe 2.x with 16 lanes, how much data can you generate per frame for feeding to the GPU? Assuming you want the run at 60fps, this translates to 8GB/60 = 136MB per frame for PCIe 2.x. Multiplying by some (guestimated) 90% factor to account for driver communication overhead and PCIe transfer protocol overhead, you can generate around 120Mb data per frame without being limited by PCIe 2.x bandwidth.&#xD;&#xA;&#xD;&#xA;Another question you have to answer: will the generation of this 120Mb of data be easily achievable in 1/60th of a second on your target CPU? Remembering that you have to perform a number of other game tasks on your CPU, you can run into a lack of time to generate the transformed data.&#xD;&#xA;&#xD;&#xA;Alright, so what factors makes it more viable to do on a GPU then? One factor is GPU memory bandwidth, which is the bandwidth between the GPU and it's local video memory. On contemporary mid-range GPUs this video memory bandwidth can be as high as 200GB/s (yes, that's 25x the PCIe 2.x bandwidth). Another factor is that the GPU is massively parallel, has hundreds of ALUs and is able to hide memory access latency by running thousands of threads at a time. &#xD;&#xA;&#xD;&#xA;All of these factors can contribute to the obvious win of pushing more work onto the GPU, but again YMMV depending on your target platform." />
  <row Id="6474" PostHistoryTypeId="5" PostId="3312" RevisionGUID="006b2eb1-fd01-4dfc-ae8c-fc12c679fc5b" CreationDate="2010-08-27T19:15:28.783" UserId="1232" Comment="added spiel about cpu ALU and memory throughput." Text="Many geometric transformations can be done on non-GPU processors, however one must consider the  target platform.  Your mileage will vary based on what platform you're targeting, and the bottlenecks of that platform.&#xD;&#xA;&#xD;&#xA;One consideration is bus bandwidth between the device that is generating the geometry, and the device that is rendering the geometry. &#xD;&#xA;&#xD;&#xA;In a typical modern PC system, the CPU is on one side of the PCIe bus (http://en.wikipedia.org/wiki/PCI_Express), and the GPU is on the other. The only way you can transfer per-frame generated data from CPU to GPU (and vice-versa) is via this bus. This means, you can be limited by the transfer speed of this bus. If your target platform has PCIe 2.x with 16 lanes, you have 8GB/s bandwidth. In practice, transfers across the PCIe are not 100% efficient, as some of the bandwidth is consumed for the protocol during your transfers. Depending on the size of your transfers, you could lose 5-10% of your bandwidth just on the per-packet overhead.&#xD;&#xA;&#xD;&#xA;eg. Given a PC platform that is running PCIe 2.x with 16 lanes, how much data can you generate per frame for feeding to the GPU? Assuming you want the run at 60fps, this translates to 8GB/60 = 136MB per frame for PCIe 2.x. Multiplying by some (guestimated) 90% factor to account for driver communication overhead and PCIe transfer protocol overhead, you can generate around 120Mb data per frame without being limited by PCIe 2.x bandwidth.&#xD;&#xA;&#xD;&#xA;Another question you have to answer: will the generation of this 120Mb of data be easily achievable in 1/60th of a second on your target CPU? Remembering that you have to perform a number of other game tasks on your CPU, you can run into a lack of time to generate the transformed data. In terms of just pure ALU throughput, this can limit you on CPU. In terms of CPU to sysmem buses, you can also be limited by the bandwidth (which varies, but is around ~8.5GB/s on recent CPUs).&#xD;&#xA;&#xD;&#xA;Alright, so what factors makes it more viable to do on a GPU then? One factor is GPU memory bandwidth, which is the bandwidth between the GPU and it's local video memory. On contemporary mid-range GPUs this video memory bandwidth can be as high as 200GB/s (yes, that's 25x the PCIe 2.x bandwidth). Another factor is that the GPU is massively parallel, has hundreds of ALUs and is able to hide memory access latency by running thousands of threads at a time. &#xD;&#xA;&#xD;&#xA;All of these factors can contribute to the obvious win of pushing more work onto the GPU, but again YMMV depending on your target platform." />
  <row Id="6475" PostHistoryTypeId="2" PostId="3314" RevisionGUID="ca3383a8-8fda-4734-a8b8-24b6b5fee825" CreationDate="2010-08-27T19:22:36.823" UserId="1456" Text="Programmer makes programs. But business model is a different story from industry to industry." />
  <row Id="6476" PostHistoryTypeId="5" PostId="3311" RevisionGUID="39013fbe-8206-4395-9b20-60d44dc83fea" CreationDate="2010-08-27T19:38:06.973" UserId="1628" Comment="added 308 characters in body" Text="A quick search through the web suggests there's quite a few methods of potentially detecting back-culled faces on the CPU.&#xD;&#xA;&#xD;&#xA;The purpose of the check is to evaluate whether to performing other operations such as tessellations is reasonable by dynamically altering the LOD of visible polys based on the number of polys on the screen.&#xD;&#xA;&#xD;&#xA;What would your suggestions be for implementing this? Speed isn't necessarily the greatest concern - for this prototype mathematical simplicity is more important. Code snippets welcome :-)&#xD;&#xA;&#xD;&#xA;Edit: It seems obvious to me to calculate the dot product based on the camera's viewing vector in world-space against the surface normal vector - but I'm asking this question because I'm intrigued as to why everyone and their (programming genius) dog seems to have an alternative method of handling this." />
  <row Id="6477" PostHistoryTypeId="2" PostId="3315" RevisionGUID="94e22513-9b66-4c35-aa07-730fef6d9b34" CreationDate="2010-08-27T19:49:13.993" UserId="1352" Text="I have mentioned it in another thread here, and I will mention it again:&#xD;&#xA;If you need a free Z-brush alternative, get Sculptris:&#xD;&#xA;&#xD;&#xA;http://sculptris.com/download.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6479" PostHistoryTypeId="16" PostId="3272" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-27T20:08:07.823" UserId="51" />
  <row Id="6480" PostHistoryTypeId="16" PostId="3276" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-27T20:08:07.823" UserId="51" />
  <row Id="6481" PostHistoryTypeId="16" PostId="3287" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-27T20:08:07.823" UserId="51" />
  <row Id="6482" PostHistoryTypeId="16" PostId="3301" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-27T20:08:07.823" UserId="51" />
  <row Id="6483" PostHistoryTypeId="16" PostId="3315" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-27T20:08:07.823" UserId="51" />
  <row Id="6484" PostHistoryTypeId="16" PostId="3270" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-08-27T20:08:07.823" UserId="51" />
  <row Id="6485" PostHistoryTypeId="5" PostId="3229" RevisionGUID="5e20f26f-e651-4e85-97e1-67419b2b38fc" CreationDate="2010-08-27T20:08:31.333" UserId="395" Comment="added 3 characters in body" Text="**[DoubleBuffered](http://doublebuffered.com/) by our very own JZig**&#xD;&#xA;&#xD;&#xA;I am personally a fan of [Why Can’t I Jump? The Perils of Player Autonomy](http://doublebuffered.com/2010/06/08/why-cant-i-jump-the-perils-of-player-autonomy/), but that might just be because that is one of my biggest pet peeves." />
  <row Id="6486" PostHistoryTypeId="5" PostId="3291" RevisionGUID="6b994b0a-32b7-47f0-b120-56ffb34760d3" CreationDate="2010-08-27T20:50:39.313" UserId="323" Comment="added 445 characters in body" Text="A while back I sat down and tried to come up with all of the fundamentally-different MMO combat roles I could, and I ended up with the following list, pasted pretty much directly out of my voluminous ideas file:&#xD;&#xA;&#xD;&#xA;**Standard trio**&#xD;&#xA;&#xD;&#xA;DPS: Kill monsters through sheer quantity of outgoing damage.&#xD;&#xA;&#xD;&#xA;Tank: A tank's sole job is to take a lot of damage (or, rather, to *not* take a lot of damage when anyone else *would* be taking a lot of damage.)&#xD;&#xA;&#xD;&#xA;Heal: Repair damage done to tank or to other players.&#xD;&#xA;&#xD;&#xA;**Conventional support**&#xD;&#xA;&#xD;&#xA;Buff: Make the group more powerful. Difficult to make fun - you'd need a situation where the optimal buffs were constantly changing.&#xD;&#xA;&#xD;&#xA;Debuff: Make the enemy monsters less powerful. Again, difficult to make fun.&#xD;&#xA;&#xD;&#xA;Crowd control: Completely nullify single enemies or groups of enemies so that the players can focus fire more effectively.&#xD;&#xA;&#xD;&#xA;Screening/defense: I'm thinking there's a distinction between &quot;heal damage that has been taken&quot;, &quot;be a tank&quot;, and &quot;prevent damage to other players&quot;. Some kind of a super-discipline priest. Fundamentally different, but difficult to show that.&#xD;&#xA;&#xD;&#xA;**Unconventional support**&#xD;&#xA;&#xD;&#xA;Sniper: Class whose sole purpose is to nullify single important parts of enemies. &quot;Spell interrupter&quot; would be a form of this. As a slightly more complex example I'm imagining a group of enemies that have a &quot;damage-dealing module&quot; and a &quot;damage-reflecting module&quot;, where only one can be disabled at a time - disable &quot;damage-dealing&quot; for the group that the players aren't killing, and &quot;damage-reflecting&quot; for the single creature the players *are* killing. Things can get arbitrarily complex from here.&#xD;&#xA;&#xD;&#xA;Threat management: Usually rolled into tank, but why? Make a class that can funnel threat from one character to another, or modify how threat is accumulated, or masquerade as one character. Misdirection+Intervene+Vigilance+more.&#xD;&#xA;&#xD;&#xA;Command: Raid leading is tough. Make a &quot;class&quot; whose sole purpose is to direct players, give them a bird's-eye view of the battle, stop forcing them to run their own character as well as the raid.&#xD;&#xA;&#xD;&#xA;Mobility/positioning: We've got a little of this with Death Grip, and now Life Grip in Cataclysm, but a class whose sole purpose is to move players or monsters around for optimal placement. Imagine some kind of crazy Thaddius/Hodir combo, where positioning is vital and everyone is moving around constantly, with this dude fixing issues as they come up.&#xD;&#xA;&#xD;&#xA;Recon: A class built around dealing with monsters that have not attacked yet - the ability to interrupt/redirect patrols, see who's coming before they come, split up groups temporarily. Rogue has a little of this with Distract.&#xD;&#xA;&#xD;&#xA;**Caution**&#xD;&#xA;&#xD;&#xA;Obviously it's difficult to come up with a way that many of these can actually be, you know, interesting, but I don't think it's impossible. You would, however, need a thoroughly different model from WoW's. Also I kind of dread the idea of &quot;okay it's time to go run Deadmines, we need twelve players from twelve completely different classes&quot;, so I feel like any functional game would either just pick a different set/layout of these from WoW or wrap up a bunch of them into one class.&#xD;&#xA;&#xD;&#xA;**Example**&#xD;&#xA;&#xD;&#xA;Just as an example of a possible combo, I really like the idea of Tank+Debuff+Sniper being one class, Threat+Mobility being another, and DPS+Healing being the third more common class. Your tank's job is to stay alive and keep the monsters from obliterating the party, you have one utility character constantly trying to redirect every monster to the tank and keep people out of fire, and you have three damage-dealers punching enemies and making health fly out. I think there's potential here. You can easily generate other interesting combos by just mixing and matching various roles.&#xD;&#xA;&#xD;&#xA;**WoW**&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that, with these roles in mind, WoW's &quot;standard trinity&quot; is actually much more complicated than you might think. It's not just &quot;Tank/Heal/DPS&quot;, it's Tank+Threat / Heal / DPS, but virtually everyone is also Buff/Debuff, DPS often has CC, Priests do Screening, and half a dozen classes have Sniper (for spell interrupts). But those are always in a rather minimal form, it's never the focus of the class." />
  <row Id="6487" PostHistoryTypeId="2" PostId="3316" RevisionGUID="a60eaeb2-5a94-4231-ac8d-94b72be8d715" CreationDate="2010-08-27T21:12:40.940" UserId="1456" Text="Single/double precision." />
  <row Id="6488" PostHistoryTypeId="2" PostId="3317" RevisionGUID="2dd04235-7358-4f5c-b8e7-1a57fe95aec5" CreationDate="2010-08-27T21:47:57.337" UserId="1199" Text="[Game School Gems][1] - a blog from one of the teachers at a game development school in Sweden. He's worked at Massive Entertainment for 12 years as Senior Software Engineer. Some very interesting stuff! (Spelling could be better ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gameschoolgems.blogspot.com/" />
  <row Id="6489" PostHistoryTypeId="16" PostId="3317" RevisionGUID="2dd04235-7358-4f5c-b8e7-1a57fe95aec5" CreationDate="2010-08-27T21:47:57.337" UserId="-1" />
  <row Id="6490" PostHistoryTypeId="2" PostId="3318" RevisionGUID="2084c00d-28ab-4869-9b46-86088d28e7b5" CreationDate="2010-08-27T21:48:16.837" UserId="452" Text="[TVTropes has an interesting list of archetypes in game characters][1]. While the terms used are less than technical, I'm sure you can translate them to whatever vocabulary you wish to use.&#xD;&#xA;&#xD;&#xA;  [1]: http://tvtropes.org/pmwiki/pmwiki.php/Main/VideogameCharacters" />
  <row Id="6491" PostHistoryTypeId="16" PostId="3318" RevisionGUID="2084c00d-28ab-4869-9b46-86088d28e7b5" CreationDate="2010-08-27T21:48:16.837" UserId="-1" />
  <row Id="6492" PostHistoryTypeId="2" PostId="3319" RevisionGUID="f4cbff1d-7e61-4624-af8d-4b309e1ab2f0" CreationDate="2010-08-27T22:04:57.403" UserId="1931" Text="I've been in and out of games as a programmer, and it has never been a problem. It is more about skills than anything.&#xD;&#xA;&#xD;&#xA;If you're paranoid, and assuming you're a C/C++ type of programmer, I'd recommend web server tech as something that should mesh well. Distributed computing is very hot these days. Mobile phones require a good understanding of the kind of stuff game programmers do as well, so that's something you could play around with in your spare time as well." />
  <row Id="6493" PostHistoryTypeId="2" PostId="3320" RevisionGUID="c3e500de-f309-4842-8e67-a54d361c4710" CreationDate="2010-08-27T22:38:35.807" UserId="119" Text="Use the library I created, [Gamepad][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.iainlobb.com/2010/04/introducing-gamepad.html" />
  <row Id="6494" PostHistoryTypeId="2" PostId="3321" RevisionGUID="a8ce1b64-4b1f-413c-b33b-5f04a80a0bc6" CreationDate="2010-08-27T22:46:16.357" UserId="1931" Text="The fundamental thing you need to do is just have code on one side that knows how to serialize data, and code on the other that knows how to deserialize.&#xD;&#xA;&#xD;&#xA;So, for variable length strings, just send the length first:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;   n = strlen(playerid) + 1; // for NULL terminator&#xD;&#xA;   sendto(server_sock,&amp;n,sizeof(n),0,0,0);&#xD;&#xA;   sendto(server_sock,playerid,n,0,0,0);&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;and then on the receiving side get the length, and read that many bytes.:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;   int n;&#xD;&#xA;   char *s;&#xD;&#xA;   recvfrom(client_sock,&amp;n,sizeof(n),0,0,0);&#xD;&#xA;   s = malloc(n)&#xD;&#xA;   recvfrom(client_sock,s,n,0,0,0)&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Of course, what you should really do is gather up your communication into packets, and then send blocks of data at once with headers, have type info in a debug mode for safety, etc. but that's the gist of it.&#xD;&#xA;&#xD;&#xA;Google protocol buffers look like they are a way of turning data into something serializable, so in that version of this example send and recv would be an XML string, which is great for general servers, but you may want more explicit control." />
  <row Id="6495" PostHistoryTypeId="2" PostId="3322" RevisionGUID="f7fd342f-0924-4c58-bffd-17ba15633c5d" CreationDate="2010-08-27T22:59:35.940" UserId="1931" Text="You didn't mention if a single server was an authority or not, but have a single time that every client syncs off of.&#xD;&#xA;&#xD;&#xA;In my experience with City of Heroes, latency can be streaky, so a running average (root mean square is easy) is a good way to approximate. We also timestamp all roundtrips as part of the packet header.&#xD;&#xA;&#xD;&#xA;Truth be told, since the cases that throw things off aren't predictable, there isn't much you can do when the hiccups come your way, and otherwise things are pretty smooth, so I wouldn't put too much effort into it." />
  <row Id="6496" PostHistoryTypeId="5" PostId="3290" RevisionGUID="90c973b8-02a4-414f-aa98-c1d544ab95f7" CreationDate="2010-08-27T23:18:20.160" UserId="962" Comment="added 141 characters in body; edited title" Text="What is the best method for creating user definable or user changeable keys in a flash game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: I meant, user changeable keys. Not user changeable flash buttons. Why would a user need to change the graphic of a button in a game?" />
  <row Id="6497" PostHistoryTypeId="4" PostId="3290" RevisionGUID="90c973b8-02a4-414f-aa98-c1d544ab95f7" CreationDate="2010-08-27T23:18:20.160" UserId="962" Comment="added 141 characters in body; edited title" Text="User definable keys for a flash game" />
  <row Id="6498" PostHistoryTypeId="2" PostId="3323" RevisionGUID="ee2ad68d-7755-42c3-be86-13ad2b9c3a18" CreationDate="2010-08-27T23:27:25.353" UserId="1232" Text="dot(CameraViewInv.at, SurfaceNormal) can return &gt; 0.0 even if the the surface is visible. Think of a box whose right side normal is slightly away from the camera - as it's moved to the left of the frustum, it can become visible. &#xD;&#xA;&#xD;&#xA;What avoids this phenomenon is dot(VecFromCameraToSurface, SurfaceNormal).&#xD;&#xA;&#xD;&#xA;Another way is to check the winding of your screen-space vertices (ie. vertices after model, view and projection transform). This is done by checking the sign of the z component of the cross product of two edges on the screen space triangle (or quad). Code is here (not OpenGL specific):&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;// culls CW verts, passes CCW verts. Invert the condition for opposite behavior.&#xD;&#xA;bool shouldCullTriangleScreenSpace(vec2 points[3])&#xD;&#xA;{&#xD;&#xA;  edgeA = points[1] - points[0];&#xD;&#xA;  edgeB = points[2] - points[0];&#xD;&#xA;  return (edgeA.x * edgeB.y - edgeA.y * edgeB.x) &lt; 0.0;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;" />
  <row Id="6499" PostHistoryTypeId="2" PostId="3324" RevisionGUID="9fa56f47-c755-4513-8a61-bbf96a6784a6" CreationDate="2010-08-28T03:01:22.557" UserId="953" Text="I'll answer the second question, &quot;Why would a user need to change the graphic of a button in a game?&quot;  I think it would be an awesome idea to have a game like Upgrade Complete that is focused around the user customizing and upgrading the UI.  Maybe the game has a set of undifferentiated buttons, and the player has to label and customize them so that she can figure out and remember what they do?&#xD;&#xA;&#xD;&#xA;As for custom keys?  Capture their keycodes and store them, then test against those keycodes in the input logic.  You'll have some sort of options screen where you can set the custom keycodes, then use the settings in the game proper instead of using constants or magic numbers for your action buttons.&#xD;&#xA;&#xD;&#xA;The trickiest part, oddly, is displaying the custom keys' names to the user.  As far as I can recall, Flash doesn't have a lookup table matching keycodes with key labels.  I'm guessing you'd need to create a dictionary yourself with the most important keys, and then just refer to any special cases as something like KEY_1876." />
  <row Id="6500" PostHistoryTypeId="2" PostId="3325" RevisionGUID="cfea617b-4582-47cd-9a6e-a4616d8d201a" CreationDate="2010-08-28T04:05:29.797" UserId="1934" Text="Hey. I want to be able to create a system for 2D skeletal animation in my game. I'm using [panda3d](http://www.panda3D.org) as my game engine. I'd like to be able to make simple bone structures and skin them with my sprites. I would prefer to do this with straight code and algorithms, but if I have to use a 3D modeler or something, then I can try to (I didn't do a great job last time I tried using Blender... &gt;.&lt;)" />
  <row Id="6501" PostHistoryTypeId="1" PostId="3325" RevisionGUID="cfea617b-4582-47cd-9a6e-a4616d8d201a" CreationDate="2010-08-28T04:05:29.797" UserId="1934" Text="Creating a 2D skeleton animation system for use with Panda3D" />
  <row Id="6502" PostHistoryTypeId="3" PostId="3325" RevisionGUID="cfea617b-4582-47cd-9a6e-a4616d8d201a" CreationDate="2010-08-28T04:05:29.797" UserId="1934" Text="&lt;2d&gt;&lt;animation&gt;&lt;skeletal&gt;&lt;python&gt;" />
  <row Id="6503" PostHistoryTypeId="2" PostId="3326" RevisionGUID="f6534868-ad30-482d-8c7d-6fdfb87cad7c" CreationDate="2010-08-28T07:14:33.513" UserId="469" Text="Some of you may know fraxy...&#xD;&#xA;&#xD;&#xA;Basically, I was watching this video: http://www.youtube.com/watch?v=uL7zWdDCtOE And there are some times where some sprites spin really fast (4:00 mark for example), and I cannot figure how the motion blur effect was done.&#xD;&#xA;&#xD;&#xA;I looked in the game folder, and found the sprite, it certainly does not has the blur added to it (in fact, it is even a .bmp! Not a PNG or anything that supporta alpha natively), and the engine IF using OpenGL, may not be clear (the resolution is fairly low too), also nothing else is getting blurred (so the effect is localized to some sprites... if you pay attention there are other moving objects that get blurry too).&#xD;&#xA;&#xD;&#xA;So, how they do this glowing blur?" />
  <row Id="6504" PostHistoryTypeId="1" PostId="3326" RevisionGUID="f6534868-ad30-482d-8c7d-6fdfb87cad7c" CreationDate="2010-08-28T07:14:33.513" UserId="469" Text="How to do this sprite motion blur?" />
  <row Id="6505" PostHistoryTypeId="3" PostId="3326" RevisionGUID="f6534868-ad30-482d-8c7d-6fdfb87cad7c" CreationDate="2010-08-28T07:14:33.513" UserId="469" Text="&lt;graphics&gt;&lt;graphics-programming&gt;&lt;graphic-effects&gt;&lt;special-effects&gt;" />
  <row Id="6506" PostHistoryTypeId="2" PostId="3327" RevisionGUID="eaa68200-872e-4da6-83c0-6049730eb5be" CreationDate="2010-08-28T07:34:12.310" UserId="1091" Text="Difficult to tell from the video exactly what you mean, but the simplest method of doing a sprite-based motion blur would just be to render the sprite several times, with some form of translucency.&#xD;&#xA;&#xD;&#xA;You could buffer the previous positions for use as the trail, or you could use a small time-step in the animation to render sub-frames.&#xD;&#xA;&#xD;&#xA;From the video in question I'd suggest a basic additive blend would work, which means you don't need alpha either in the texture or even in the vertex - just darken the sprite for the &quot;trail&quot;.&#xD;&#xA;&#xD;&#xA;Over-writing the same pixels makes them brighter, for the glow. If you have even a very dark glow around the object in the original image, you'll get a glowing halo if you additively blend a bunch together.&#xD;&#xA;&#xD;&#xA;Alternatively you could use a basic HDR-like hack as a post-process. Take the image without any glow, threshold it so you only have very bright pixels, blur it a lot, and add it back in to the original. TBH I don't think that's necessary here.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6507" PostHistoryTypeId="2" PostId="3328" RevisionGUID="84c362d0-0327-4135-813a-eb0ac7753e9a" CreationDate="2010-08-28T08:27:15.720" UserId="1738" Text="You can just check to see if your worldspace camera position is on the negative half-space of the the plane of the triangle you are considering (dot product of Normal and camera position and then a comparison to the plane constant).&#xD;&#xA;&#xD;&#xA;This can be done hierarchically to be efficient i.e., you group triangle with similar normals together - effectively the normals all fall within some reasonably small cone.  Then a test against this cone (effectively a dot product with a more conservative constant), can reject or accept many triangles at once.&#xD;&#xA;&#xD;&#xA;In general, it is best to let the hardware do it - the overhead of dynamically altering your index or vertex buffers (when non-indexed) and the coding effort required likely isn't worth it.&#xD;&#xA;&#xD;&#xA;Note that in your tesselation example, even if the pre-tesselated triangle or quad is invisible a tesselated AND displaced mesh may still have front facing triangles, so be careful. :-)" />
  <row Id="6508" PostHistoryTypeId="2" PostId="3329" RevisionGUID="974c8466-9dff-4fa0-b4db-a249ca2ec989" CreationDate="2010-08-28T08:51:52.460" UserDisplayName="user1664" Text="**[Ray Wenderlich][1]** &#xD;&#xA;&#xD;&#xA;An awesome blog with well-written, simple to follow tutorials for anyone interested in developing for iOS or using the cocos 2D game development framework.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.raywenderlich.com/ &quot;Ray Wenderlich&quot;" />
  <row Id="6509" PostHistoryTypeId="16" PostId="3329" RevisionGUID="974c8466-9dff-4fa0-b4db-a249ca2ec989" CreationDate="2010-08-28T08:51:52.460" UserId="-1" />
  <row Id="6510" PostHistoryTypeId="2" PostId="3330" RevisionGUID="d506b4ab-fa3d-448b-886c-0bd0378faee9" CreationDate="2010-08-28T09:00:46.657" UserId="1936" Text="Especially with CryEngine 3 this is not true. Yes, it halves the framerate, but turning on 3D does not cost you half your frames (or you need doubled hardware power). They use a reprojection cache and the available depth buffer to get the second image, thus the performance drop is 5-10% when turning on 3D. They call this &quot;&quot;Screen Space Re-Projection Stereo&quot;." />
  <row Id="6511" PostHistoryTypeId="2" PostId="3331" RevisionGUID="eabe51b8-e63e-4e1f-b774-6593694496ca" CreationDate="2010-08-28T13:55:06.157" UserId="457" Text="I couldn´t see what you meant in the video, but for doing some motion blur I would store the sprites motion vectors and use then to do the blur. Rendering the sprite multiple times don´t look that good in my opnion.&#xD;&#xA;&#xD;&#xA;If the sprite is spinning you would need the motion vectors for each pixel and this can be costly." />
  <row Id="6512" PostHistoryTypeId="2" PostId="3332" RevisionGUID="bf0c0535-8b9c-49a5-af13-cf4b23851748" CreationDate="2010-08-28T14:42:45.507" UserId="1477" Text="What are the common mistakes or oversights made when starting a new game studio?&#xD;&#xA;&#xD;&#xA;Please only one mistake or oversight per answer and if you can explain why it is an issue and what one should do to avoid falling into the mistake or recover if they've already made it." />
  <row Id="6513" PostHistoryTypeId="1" PostId="3332" RevisionGUID="bf0c0535-8b9c-49a5-af13-cf4b23851748" CreationDate="2010-08-28T14:42:45.507" UserId="1477" Text="What pitfalls should one look out for when starting a studio" />
  <row Id="6514" PostHistoryTypeId="3" PostId="3332" RevisionGUID="bf0c0535-8b9c-49a5-af13-cf4b23851748" CreationDate="2010-08-28T14:42:45.507" UserId="1477" Text="&lt;best-practices&gt;&lt;business&gt;&lt;pitfalls&gt;" />
  <row Id="6515" PostHistoryTypeId="16" PostId="3332" RevisionGUID="bf0c0535-8b9c-49a5-af13-cf4b23851748" CreationDate="2010-08-28T14:42:45.507" UserId="1477" />
  <row Id="6516" PostHistoryTypeId="5" PostId="3326" RevisionGUID="cf06a6d1-6d59-44df-b2c0-7271ea44730c" CreationDate="2010-08-28T15:55:47.870" UserId="469" Comment="added 389 characters in body" Text="Some of you may know fraxy...&#xD;&#xA;&#xD;&#xA;Basically, I was watching this video: http://www.youtube.com/watch?v=uL7zWdDCtOE And there are some times where some sprites spin really fast (4:00 mark for example), and I cannot figure how the motion blur effect was done.&#xD;&#xA;&#xD;&#xA;I looked in the game folder, and found the sprite, it certainly does not has the blur added to it (in fact, it is even a .bmp! Not a PNG or anything that supporta alpha natively), and the engine IF using OpenGL, may not be clear (the resolution is fairly low too), also nothing else is getting blurred (so the effect is localized to some sprites... if you pay attention there are other moving objects that get blurry too).&#xD;&#xA;&#xD;&#xA;So, how they do this glowing blur?&#xD;&#xA;&#xD;&#xA;EDIT: On the video I am talking about the two things &quot;spinning&quot; in the left and right edge of the screen, they are shooting, and the sprite of their bullets are the same as their own sprite, but if you pay attention as they spin their sprites leave a trail, actually if you put the video some seconds before, you will see with the screen more empty, and the effect can be seen clearly." />
  <row Id="6517" PostHistoryTypeId="2" PostId="3333" RevisionGUID="863fb2a5-fac2-47cb-ac09-ede6ab6188ad" CreationDate="2010-08-28T16:23:08.637" UserId="962" Text="**You do not loose half your performance when turning on stereo 3d.** The games logic, AI, physics, and anything the CPU does still is only run once. Only the rendering is done twice, and that is efficient, because the card has everything in memory for what each second frame is going to be, so it doesn't use any additional bandwidth.&#xD;&#xA;&#xD;&#xA;The only situation where this will be true is if you had a static 3d scene that was really complicated with the GPU doing everything and the CPU sitting idle. And even then I doubt it will be a 50% drop in performance&#xD;&#xA;&#xD;&#xA;I have tested a lot of games with nvidia 3d stereo, and no game ever dropped near 50% performance. " />
  <row Id="6518" PostHistoryTypeId="2" PostId="3334" RevisionGUID="05565b9f-79ca-4378-8d65-b98e0e56a0c5" CreationDate="2010-08-28T17:04:43.167" UserId="1923" Text="*Success* is defined as your equity in your studio is greater than the amount which you could have earned working for someone else's studio.&#xD;&#xA;&#xD;&#xA;By and large, it is the same as any industry. An individual that has much technical knowledge in a field is able to make very smart technical decisions because they have much experience doing it. At the same time, they lack experience making smart business decisions because they generally lack experience in business management.&#xD;&#xA;&#xD;&#xA;Making smart business decisions affects *success* way **way** more than making smart technical decisions.&#xD;&#xA;&#xD;&#xA;The oversight or common mistake is to not employ an experienced business manager early on in the enterprise or somehow mitigate this shortcoming within the enterprise.&#xD;&#xA;&#xD;&#xA;The morale: Find a good business manager and pay them more than anybody else in the enterprise. Sounds counter intuitive but the better manager you have, the sooner your enterprise hits critical mass where your studio achieves *success*. " />
  <row Id="6519" PostHistoryTypeId="16" PostId="3334" RevisionGUID="05565b9f-79ca-4378-8d65-b98e0e56a0c5" CreationDate="2010-08-28T17:04:43.167" UserId="-1" />
  <row Id="6520" PostHistoryTypeId="5" PostId="3333" RevisionGUID="fa67e41a-da9d-4a0a-8942-8e8337235d59" CreationDate="2010-08-28T17:52:38.093" UserId="962" Comment="deleted 1 characters in body" Text="**You do not lose half your performance when turning on stereo 3d.** The games logic, AI, physics, and anything the CPU does still is only run once. Only the rendering is done twice, and that is efficient, because the card has everything in memory for what each second frame is going to be, so it doesn't use any additional bandwidth.&#xD;&#xA;&#xD;&#xA;The only situation where this will be true is if you had a static 3d scene that was really complicated with the GPU doing everything and the CPU sitting idle. And even then I doubt it will be a 50% drop in performance&#xD;&#xA;&#xD;&#xA;I have tested a lot of games with nvidia 3d stereo, and no game ever dropped near 50% performance. " />
  <row Id="6521" PostHistoryTypeId="2" PostId="3335" RevisionGUID="f3bdd745-71b2-49c2-bb8a-4dc29a1933ec" CreationDate="2010-08-28T18:12:34.013" UserId="295" Text="It seems that the current climate of games seems to cater to an obvious progression of player power, whether that means getting a bigger, more explosive gun in Halo, leveling up in an RPG, or unlocking new options in Command and Conquer 4.&#xD;&#xA;&#xD;&#xA;Yet this concept is not exclusive to video or computer games -- even in Dungeons and Dragons players can strive to acquire a +2 sword to replace the +1 weapon they've been using.&#xD;&#xA;&#xD;&#xA;Yet as a systems designer, the concept of player progression is giving me headache after headache. Should I balance around the players exact capabilities and give up on a simple linear progression? (I think ESIV:Oblivion is a good example of this) Is it better to throw the players into an &quot;arms race&quot; with their opponents, where if the players *don't* progress in an orderly manner, it is only a matter of time until gameplay is unbearably difficult? (4th Edition DnD strikes me as a good example of this) Perhaps it would make most sense to untether the core gameplay mechanics from progression at all -- give them flashier, more interesting (but not more powerful!) ways to grow?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6522" PostHistoryTypeId="1" PostId="3335" RevisionGUID="f3bdd745-71b2-49c2-bb8a-4dc29a1933ec" CreationDate="2010-08-28T18:12:34.013" UserId="295" Text="Balancing game difficulty against player progression" />
  <row Id="6523" PostHistoryTypeId="3" PostId="3335" RevisionGUID="f3bdd745-71b2-49c2-bb8a-4dc29a1933ec" CreationDate="2010-08-28T18:12:34.013" UserId="295" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="6524" PostHistoryTypeId="2" PostId="3336" RevisionGUID="631c8017-dd6d-4c9e-8b58-c7f147e69d33" CreationDate="2010-08-28T20:07:03.307" UserId="51" Text="I think it heavily depends on the kind of experience you want to give to the player.&#xD;&#xA;&#xD;&#xA;As a player, I didn't like the way Oblivion handled it.  One of the positive feelings as a player gaining power and abilities is the fact that you can now dominate what used to be difficult.  With Oblivion and it's constantly tuned-to-your-level difficulty system, you lost the feeling that certain areas were safe and other areas were dangerous.  Sure, you were fighting harder monsters, but why they showed up felt unnatural.&#xD;&#xA;&#xD;&#xA;Personally I prefer the more traditional mechanisms.  Areas have predefined difficulties, and as the player progressed areas that were previously impossible now opened up.  And areas that used to be hard are now a cakewalk.  It gives you a better sense of progression.&#xD;&#xA;&#xD;&#xA;That's not to say that all dynamic difficulty systems are bad.  I just think that they need to be more subtle.  On Sin Episodes we did a very complicated system that didn't turn out too terrible.  The &lt;a href=&quot;http://www.ritualistic.com/games.php/sineps/info_dyndiff.php&quot;&gt;gist of it&lt;/a&gt; was that there were a lot of little factors that played into what knobs would be adjusted as the player goes through the game.  If the player got a lot of headshots, more enemies would spawn with helmets (which meant you had to shoot them in the head twice).  If you were proceeding through the game quicker than our par time, the difficulty knobs got turned up.  If your average health was lower than what we would like health packs would drop more often.  &#xD;&#xA;&#xD;&#xA;Unfortunately the curve wasn't linear.  One of the switches we implemented was to level up the kind of guys we would spawn for difficulty.  The last jump (assault rifle to machine gun) was a lot more of a jump than some of the earlier ones (pistol to assault rifle), and you could get into a situation where the designers would place two assault rifle guys and the game could spawn three machine gun guys (which is a much, much more difficult kind of fight).  But compared to Oblivion, it felt like there was still progress through the course of the game, but the system itself accounted for difficulty +/- a certain percent." />
  <row Id="6525" PostHistoryTypeId="5" PostId="3336" RevisionGUID="98a1dd57-5e25-4056-9280-8575e00ea3fb" CreationDate="2010-08-28T20:12:56.970" UserId="51" Comment="added 97 characters in body" Text="I think it heavily depends on the kind of experience you want to give to the player.&#xD;&#xA;&#xD;&#xA;As a player, I didn't like the way Oblivion handled it.  One of the positive feelings as a player gaining power and abilities is the fact that you can now dominate what used to be difficult.  With Oblivion and it's constantly tuned-to-your-level difficulty system, you lost the feeling that certain areas were safe and other areas were dangerous.  Sure, you were fighting harder monsters, but why they showed up felt unnatural.&#xD;&#xA;&#xD;&#xA;Personally I prefer the more traditional mechanisms.  Areas have predefined difficulties, and as the player progressed areas that were previously impossible now opened up.  And areas that used to be hard are now a cakewalk.  It gives you a better sense of progression.&#xD;&#xA;&#xD;&#xA;That's not to say that all dynamic difficulty systems are bad.  I just think that they need to be more subtle.  On Sin Episodes we did a very complicated system that didn't turn out too terrible.  The &lt;a href=&quot;http://www.ritualistic.com/games.php/sineps/info_dyndiff.php&quot;&gt;gist of it&lt;/a&gt; was that there were a lot of little factors that played into what knobs would be adjusted as the player goes through the game.  If the player got a lot of headshots, more enemies would spawn with helmets (which meant you had to shoot them in the head twice).  If you were proceeding through the game quicker than our par time, the difficulty knobs got turned up.  If your average health was lower than what we would like health packs would drop more often.  &#xD;&#xA;&#xD;&#xA;Unfortunately the curve wasn't linear.  One of the switches we implemented was to level up the kind of guys we would spawn for difficulty.  The last jump (assault rifle to machine gun) was a lot more of a jump than some of the earlier ones (pistol to assault rifle), and you could get into a situation where the designers would place two assault rifle guys and the game could spawn three machine gun guys (which is a much, much more difficult kind of fight).  But compared to Oblivion, it felt like there was still progress through the course of the game as the designers were mostly in control. The dynamic difficulty system itself accounted for only adjusting it up or down a certain amount based off player performance." />
  <row Id="6526" PostHistoryTypeId="5" PostId="3317" RevisionGUID="c7fd4d46-edd6-4ec8-b2ff-6f15ccf40ac3" CreationDate="2010-08-28T21:14:24.153" UserId="1199" Comment="added 18 characters in body" Text="[**Game School Gems**][1] &#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;A blog from one of the teachers at a game development school in Sweden. He's worked at Massive Entertainment for 12 years as Senior Software Engineer. Some very interesting stuff! (Spelling could be better ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gameschoolgems.blogspot.com/" />
  <row Id="6527" PostHistoryTypeId="5" PostId="3326" RevisionGUID="8d5c27c1-e5e5-4933-99fe-1771cfeaa374" CreationDate="2010-08-29T00:05:03.877" UserId="469" Comment="added 247 characters in body" Text="Some of you may know fraxy...&#xD;&#xA;&#xD;&#xA;Basically, I was watching this video: http://www.youtube.com/watch?v=uL7zWdDCtOE And there are some times where some sprites spin really fast (4:00 mark for example), and I cannot figure how the motion blur effect was done.&#xD;&#xA;&#xD;&#xA;I looked in the game folder, and found the sprite, it certainly does not has the blur added to it (in fact, it is even a .bmp! Not a PNG or anything that supporta alpha natively), and the engine IF using OpenGL, may not be clear (the resolution is fairly low too), also nothing else is getting blurred (so the effect is localized to some sprites... if you pay attention there are other moving objects that get blurry too).&#xD;&#xA;&#xD;&#xA;So, how they do this glowing blur?&#xD;&#xA;&#xD;&#xA;EDIT: On the video I am talking about the two things &quot;spinning&quot; in the left and right edge of the screen, they are shooting, and the sprite of their bullets are the same as their own sprite, but if you pay attention as they spin their sprites leave a trail, actually if you put the video some seconds before, you will see with the screen more empty, and the effect can be seen clearly.&#xD;&#xA;&#xD;&#xA;EDIT2: I don't think Fraxy use shaders, and I am sure it does not use OpenGL either (since it run on computers that don't run OpenGL games). I know it is easy to do with shaders, with per-pixel calculations, I am asking how to do WITHOUT them." />
  <row Id="6528" PostHistoryTypeId="2" PostId="3337" RevisionGUID="6f67631f-baf2-4f5d-8b0b-0ca07a3067e7" CreationDate="2010-08-29T02:31:22.333" UserId="312" Text="It looks like a fairly simple particle effect, just outputs a few flames every frame and they fade out." />
  <row Id="6529" PostHistoryTypeId="2" PostId="3338" RevisionGUID="98d1f482-c689-457f-a4f7-0b77e628f131" CreationDate="2010-08-29T06:52:45.757" UserId="140" Text="Prototype, winner of one of the Shmup-Dev competitions:&#xD;&#xA;&#xD;&#xA;http://xout.blackened-interactive.com/ProtoType/Prototype.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And the source code:&#xD;&#xA;&#xD;&#xA;http://xout.blackened-interactive.com/dump/new/ProtoType_src.zip&#xD;&#xA;&#xD;&#xA;Since I'm a code newbie I can't say much about the quality, but just skimming over it gave me some insights. Have fun." />
  <row Id="6530" PostHistoryTypeId="2" PostId="3339" RevisionGUID="76d7abaf-d083-4975-94e6-f47166391cac" CreationDate="2010-08-29T07:08:58.957" UserId="1864" Text="I concur with Tetrad; On the one hand I am a huge fan of JRPGs and I can be a total stat whole - collecting all the best equipment making sure my uber spells are totally uber etc.. but that is a grind and the grind has to be fun. FF series does a good job at making grinding and leveling fun because they pace the level progression with the storyline very well.&#xD;&#xA;&#xD;&#xA;However some other game types really do make it a grind and it becomes extra boring. Then there is the problem which happens constantly in FPS shooters is that unless you give the bots auto-aim headshots the game is a breeze. The player is usually way over powered - has much too much ammo - and a gigantic assortment of heavy weaponry.&#xD;&#xA;&#xD;&#xA;One of my fav games is Guild Wars, you can only get so powerful and that's the end; but what makes it really fun is the skills system - you can only take 10 skills with you into battle - so picking out the best combination is very entertaining and testing skills builds is very fun as well. So even though there is a level cap you still have tuns to explore and new skills to unlock. The Player is never over powering and the only grind comes finding those special skills or looking for collectables and appearance oriented content." />
  <row Id="6531" PostHistoryTypeId="2" PostId="3340" RevisionGUID="17d0c525-8cef-456b-bb52-e6086a7eac50" CreationDate="2010-08-29T08:42:52.447" UserId="1004" Text="I'd start with reading [this](http://www.sirlin.net/articles/balancing-multiplayer-games-part-1-definitions.html) [series](http://www.sirlin.net/articles/balancing-multiplayer-games-part-2-viable-options.html) [on](http://www.sirlin.net/articles/balancing-multiplayer-games-part-3-fairness.html) [balance](http://www.sirlin.net/articles/balancing-multiplayer-games-part-4-intuition.html) by Sirlin, so we know what we're talking about when we say that a game is &quot;balanced&quot;. Go ahead, i'll wait!&#xD;&#xA;&#xD;&#xA;Done? good! if you didn't, then at least read part 1, that has the bare minimum you need.&#xD;&#xA;&#xD;&#xA;    A multiplayer game is balanced if a reasonably large number of options available to the player are viable--especially, but not limited to, during high-level play by expert players.&#xD;&#xA;&#xD;&#xA;    --Sirlin, December 2001&#xD;&#xA;&#xD;&#xA;    A multiplayer game is deep if it is still strategically interesting to play after expert players have studied and practiced it for years, decades, or centuries.&#xD;&#xA;&#xD;&#xA;    --Sirlin, January 2002&#xD;&#xA;&#xD;&#xA;CCed here for those that TL,DRed still. While that says multiplayer games, it largely applies to single-player ones as well.&#xD;&#xA;&#xD;&#xA;I think i'd set up a system to track player metrics; for instance, in an overhead shmup, what weapon the player favors, the types of ships he's best at killing, how much health he's lost lately, etc. and mix it up so that the players that are doing well get more tough enemies and less powerups, while players that are struggling get enemies that they can fight and better tools to do so. &#xD;&#xA;&#xD;&#xA;I'm designing such a shmup (shameless plug: [the blog for it](http://infinitygame.wordpress.com/)), and i plan to do that. In short, the player will have to hunt enemy ships and peril the dangers of space to gain enough energy to fight the bosses, as well as look for upgrades for their ship. The thing to remember is that players will naturally want to progress through your game, so you can use that to drive your game forward.&#xD;&#xA;&#xD;&#xA;The advantage of a dynamic difficulty system is that all a player has to do to get the &quot;lower-level&quot; areas back is that they just need to play poorly; the game will think they're having trouble and give them an easier time.&#xD;&#xA;&#xD;&#xA;I wouldn't throw the player into an arms race by any means, but if it's a campaign type game (like a stealth shooter or something) then just sitting around while you have things to do should definitely ratchet up the pressure." />
  <row Id="6532" PostHistoryTypeId="2" PostId="3341" RevisionGUID="0c84a90c-6ee3-4653-9e6d-764751e2d767" CreationDate="2010-08-29T13:50:01.130" UserId="1286" Text="[This site][1] may help you, it contains a lot of examples of how to use the Java sound API (loading, playing, streaming, recording...).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jsresources.org/" />
  <row Id="6533" PostHistoryTypeId="2" PostId="3342" RevisionGUID="3c1c1775-5cbf-468f-8730-2b82a29910d8" CreationDate="2010-08-29T14:31:06.167" UserId="1216" Text="How to implement UIViewAnimationTransitionFlipFromRight in landscape mode? " />
  <row Id="6534" PostHistoryTypeId="1" PostId="3342" RevisionGUID="3c1c1775-5cbf-468f-8730-2b82a29910d8" CreationDate="2010-08-29T14:31:06.167" UserId="1216" Text="UIViewAnimationTransitionFlipFromRight in Landscape mode." />
  <row Id="6535" PostHistoryTypeId="3" PostId="3342" RevisionGUID="3c1c1775-5cbf-468f-8730-2b82a29910d8" CreationDate="2010-08-29T14:31:06.167" UserId="1216" Text="&lt;iphone&gt;" />
  <row Id="6536" PostHistoryTypeId="2" PostId="3343" RevisionGUID="92c2f455-915e-4411-8d41-1c31031e7a92" CreationDate="2010-08-29T22:51:45.067" UserId="141" Text="I'm using OpenTK and working in C#, if that matters. I'm trying to get lighting effects on a textured object. I'm using obj and mtl files to define them. No matter what I try my object is either invisible, unlit (plain texture), or completely white.&#xD;&#xA;&#xD;&#xA;I defined my mtl by having my texture mapped to diffusion (that is, map_Kd texture.png). I found that if I don't set both a Ka and Kd (in addition to the texture) the object is invisible. It also seems that the actual ambient values don't change anything - they could be 0 and transparent, as long as they're defined.&#xD;&#xA;&#xD;&#xA;If I set my material to have white ambient, diffuse, and specular, then the object is 100% white, no matter what I do with my light source. And this is after I set it to gl_separate_specular_color, as before that I just got the plain texture. I tried making sure I had a normal defined for at least one face of the model, with no luck. I'm trying to have my texture be dominant, with a little bit of specular lighting on it.&#xD;&#xA;&#xD;&#xA;What am I doing wrong? Is the lighting &quot;working&quot; but the all white means I haven't set my shininess properly? Is it being infinitely reflective or something?" />
  <row Id="6537" PostHistoryTypeId="1" PostId="3343" RevisionGUID="92c2f455-915e-4411-8d41-1c31031e7a92" CreationDate="2010-08-29T22:51:45.067" UserId="141" Text="opengl lighting with textures" />
  <row Id="6538" PostHistoryTypeId="3" PostId="3343" RevisionGUID="92c2f455-915e-4411-8d41-1c31031e7a92" CreationDate="2010-08-29T22:51:45.067" UserId="141" Text="&lt;opengl&gt;&lt;models&gt;&lt;lighting&gt;" />
  <row Id="6539" PostHistoryTypeId="2" PostId="3344" RevisionGUID="6e6114a2-64c9-4f75-b57a-06e7b61b23fc" CreationDate="2010-08-29T23:14:44.053" UserId="400" Text="See [&quot;Capturing Engine Sounds for Games&quot;][1] for ideas about how the pros do it.  The articke references [this SDK][2] which I worked on. Unfortunately, it is no longer supported.  It was free - there may be copies floating around somewhere...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/2935/capturing_engine_sounds_for_games.php?print=1&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/2965/product_review_analog_devices_.php&#xD;&#xA;" />
  <row Id="6540" PostHistoryTypeId="12" PostId="3337" RevisionGUID="793c4643-f38c-4da9-a609-b551ff453d43" CreationDate="2010-08-30T01:09:37.527" UserId="312" Text="[{&quot;Id&quot;:312,&quot;DisplayName&quot;:&quot;echeese&quot;}]" />
  <row Id="6541" PostHistoryTypeId="13" PostId="3337" RevisionGUID="80a74abb-e146-489d-9fd3-14804d68ffba" CreationDate="2010-08-30T01:09:53.173" UserId="312" Text="[{&quot;Id&quot;:312,&quot;DisplayName&quot;:&quot;echeese&quot;}]" />
  <row Id="6542" PostHistoryTypeId="2" PostId="3345" RevisionGUID="e77dff8c-8f2f-4353-bff6-e7c69eed8b86" CreationDate="2010-08-30T02:17:18.520" UserId="302" Text="Are there any recommendable middleware available for collision detection?&#xD;&#xA;&#xD;&#xA;I believe I've heard Bullet has a pretty good 3D collision detection that can be used without the physics engine, and that Box2D could also be used similarly for 2D. I'd like to hear if people have any experiences on those two or others for collision detection specifically." />
  <row Id="6543" PostHistoryTypeId="1" PostId="3345" RevisionGUID="e77dff8c-8f2f-4353-bff6-e7c69eed8b86" CreationDate="2010-08-30T02:17:18.520" UserId="302" Text="Collision-detection middleware" />
  <row Id="6544" PostHistoryTypeId="3" PostId="3345" RevisionGUID="e77dff8c-8f2f-4353-bff6-e7c69eed8b86" CreationDate="2010-08-30T02:17:18.520" UserId="302" Text="&lt;collision-detection&gt;&lt;middleware&gt;" />
  <row Id="6545" PostHistoryTypeId="2" PostId="3346" RevisionGUID="90564720-d8f5-4df9-b137-d690aa784122" CreationDate="2010-08-30T02:25:37.273" UserId="1947" Text="I want to programmatically determine at runtime how much video card memory is being used by my program.  Specifically I'm wondering about how to do it on a Windows machine using OpenGL, but am interested of ways to do it on other platforms as well.&#xD;&#xA;&#xD;&#xA;I know there are utilities out there that will show me the memory usage as my program is running, but I want to be able to query that information from my code.&#xD;&#xA;" />
  <row Id="6546" PostHistoryTypeId="1" PostId="3346" RevisionGUID="90564720-d8f5-4df9-b137-d690aa784122" CreationDate="2010-08-30T02:25:37.273" UserId="1947" Text="How can I tell how much video card memory I'm using?" />
  <row Id="6547" PostHistoryTypeId="3" PostId="3346" RevisionGUID="90564720-d8f5-4df9-b137-d690aa784122" CreationDate="2010-08-30T02:25:37.273" UserId="1947" Text="&lt;opengl&gt;&lt;c++&gt;&lt;windows&gt;&lt;c&gt;" />
  <row Id="6548" PostHistoryTypeId="2" PostId="3347" RevisionGUID="f1afcb30-7985-4446-bcb4-fcda5240ebbb" CreationDate="2010-08-30T02:31:07.807" UserId="189" Text="You can find the video memory of an Nvidia card using the [NVX_gpu_memory_info extension][1], or an ATI card using [ATI_meminfo][2]. Here is a [snippet of code][3] I found which might get you started.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, Paul Nettle at flipcode [wonders why one would want to find the available video memory, saying][4]:&#xD;&#xA;&#xD;&#xA;&gt;The reason it's difficult (and sometimes impossible) to determine the amount of video memory is very similar to the reasons why OpenGL won't let you lock the frame buffer and access it directly.&#xD;&#xA;&#xD;&#xA;And goes on to explain, in essence, that **an &quot;amount of video memory&quot; might not actually mean anything**. I concur with him on the reasoning that, for example, the amount of &quot;free&quot; memory in a Windows Vista/7 machine is irrelevant; hopefully there is no free memory, because free memory is wasted memory. But there is always some areas of memory dedicated to caches which are cleared by Windows, should an application need them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/opengl/specs/GL_NVX_gpu_memory_info.txt&#xD;&#xA;  [2]: http://www.opengl.org/registry/specs/ATI/meminfo.txt&#xD;&#xA;  [3]: http://www.mail-archive.com/wine-devel@winehq.org/msg64028.html&#xD;&#xA;  [4]: http://www.flipcode.com/archives/Determining_Free_Video_Memory.shtml" />
  <row Id="6550" PostHistoryTypeId="2" PostId="3349" RevisionGUID="6d2fda92-d93a-45a0-b440-104b39007901" CreationDate="2010-08-30T05:13:08.027" UserId="1745" Text="I'm beginning to write an iPhone game using OpenGL-ES and I've come across a problem with deciding what format my 3D models should be in.  I've read (link escapes me at the moment) that some developers prefer the models compiled in Objective-C .h files.  Still, others prefer having .obj as these are more portable (i.e., for deployment on non-iPhone platforms).&#xD;&#xA;&#xD;&#xA;Various 3D game engines seem to support many(?) formats, but I'm not going to use any of these engines as I would like to actually *learn* OpenGL-ES.  Am I putting myself at a disadvantage here by not using a packaged engine?  &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="6551" PostHistoryTypeId="1" PostId="3349" RevisionGUID="6d2fda92-d93a-45a0-b440-104b39007901" CreationDate="2010-08-30T05:13:08.027" UserId="1745" Text="iPhone 3d Model format: .h file, .obj, or some other?" />
  <row Id="6552" PostHistoryTypeId="3" PostId="3349" RevisionGUID="6d2fda92-d93a-45a0-b440-104b39007901" CreationDate="2010-08-30T05:13:08.027" UserId="1745" Text="&lt;iphone&gt;&lt;best-practices&gt;&lt;opengl-es&gt;" />
  <row Id="6553" PostHistoryTypeId="2" PostId="3350" RevisionGUID="8de3b539-5509-4ac5-a138-a628f869e358" CreationDate="2010-08-30T05:29:07.073" UserId="1580" Text="Bullet has a very well-working collision pipeline. They support various broadphases (sweep n prune, hashed broadphase, 3-axis sweep, etc) and have narrowphase with optimized bv-tree's. I've worked professionally with bullet for over a year and although their performance is not as good as havok(which I've worked with for over two years), it's free and the source code is maintained and enhanced often. &#xD;&#xA;&#xD;&#xA;It should be fairly easy to look into their source-code to figure out how to only use their collision detection.&#xD;&#xA;&#xD;&#xA;PhysX also has a collision-detection network but I haven't relly looked into it. Havok is a solution that costs a lot of money and I don't think anyone can afford retrieving their source-code unless you're a professional developer. They do have free-to-use libraries but then you can't modify it.&#xD;&#xA;" />
  <row Id="6554" PostHistoryTypeId="2" PostId="3351" RevisionGUID="8c0fbcf8-e505-4e35-be02-05c6a780d378" CreationDate="2010-08-30T07:54:38.407" UserId="1945" Text="Floating point was always troublesome for precision on large worlds.&#xD;&#xA;&#xD;&#xA;This &lt;a href=&quot;http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[A%20matter%20of%20precision]]&quot;&gt;article&lt;/a&gt; (http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[A%20matter%20of%20precision]]) explains behind-the-scenes and offers the obvious alternative - fixed point numbers. Some facts are really impressive, like:&#xD;&#xA;&#xD;&#xA;&quot;Well 64 bits of precision gets you to the furthest distance of Pluto from the Sun (7.4 billion km) with sub-micrometer precision. &quot;&#xD;&#xA;&#xD;&#xA;Well sub-micrometer precision is more than any fps needs (for positions and even velocities), and it would enable you to build really big worlds.&#xD;&#xA;&#xD;&#xA;My question is, why do we still use floating point if fixed point has such advantages? Most rendering apis and physics libraries use floating point (and suffer it's disadvantages, so developer needs to get his way around them).&#xD;&#xA;&#xD;&#xA;Are they so much slower?&#xD;&#xA;&#xD;&#xA;Additionally, how do you think scalable planetary engines like outerra or infinity handle the large scale? Do they use fixed point for positions or do they have some space dividing algorithm?" />
  <row Id="6555" PostHistoryTypeId="1" PostId="3351" RevisionGUID="8c0fbcf8-e505-4e35-be02-05c6a780d378" CreationDate="2010-08-30T07:54:38.407" UserId="1945" Text="About floating point precision and why do we still use it" />
  <row Id="6556" PostHistoryTypeId="3" PostId="3351" RevisionGUID="8c0fbcf8-e505-4e35-be02-05c6a780d378" CreationDate="2010-08-30T07:54:38.407" UserId="1945" Text="&lt;graphics&gt;&lt;physics&gt;" />
  <row Id="6557" PostHistoryTypeId="2" PostId="3352" RevisionGUID="84bfc50c-1bba-409d-8f39-fdee458e386e" CreationDate="2010-08-30T09:15:00.293" UserId="1004" Text="I'd compare video games to board games, since the two share many traits that they don't with any non-interactive media.&#xD;&#xA;&#xD;&#xA;Take Monopoly, for instance. The game's been around 50+ years (correct me if i'm wrong), and people still play it. Why? not for the story, but mainly for the gameplay. It's always fun to have a game of Monopoly and see who wins! Or Clue: people don't play that for the story either (there's almost no story: someone killed the whats-his-name of the mansion and it's your job to find out). The theme here is that board games bring people together to play games and have a good time interacting with each other.&#xD;&#xA;&#xD;&#xA;Video games offer the ability to play a game much like a board game, but there are different (and fewer) restrictions on what can be modeled. Only more recently have developers been working on multiplayer games and games with story, and thus the focus has been on making gameplay the king. Games allow you to do this in many ways not previously possible; you can do highly detailed models of the world or implement complex systems for interaction, which would be an incredible pain or impossible to do in real life.&#xD;&#xA;&#xD;&#xA;Games also pose a unique problem for telling stories in that it's difficult to both allow the player to play it as a game (not restrain him/her heavily) and move a story forward well. The industry has begun work on overcoming that, but it's a long road to do so.&#xD;&#xA;&#xD;&#xA;In short, right now games are prized for their interactivity and not their story, but remember that video games are a new medium (being around for 20-30 years at most), and it hasn't had time to mature like film or literature. As time goes on, people will find ways to integrate story into their games quite well. However, the &quot;games for the sake of playing&quot; will stay around quite a long time i imagine, judging from the length of time humans have invented ways to entertain themselves through (traditional) games :)" />
  <row Id="6558" PostHistoryTypeId="16" PostId="3352" RevisionGUID="84bfc50c-1bba-409d-8f39-fdee458e386e" CreationDate="2010-08-30T09:15:00.293" UserId="-1" />
  <row Id="6559" PostHistoryTypeId="2" PostId="3353" RevisionGUID="f33add77-da3d-4d2d-842d-e204ae14eb00" CreationDate="2010-08-30T10:23:06.243" UserId="1943" Text="If you didn't yet, you should definitively check out the [Planet Rendering tutorial][1] on GameDev.net. As for space division, one solution is to keep two separate position variables -- one macro scale and one micro scale. This works quite well (tested). &#xD;&#xA;&#xD;&#xA;The exact solution depends on how do you plan to handle extreme distances in the engine -- do you plan jump gates, or time compression?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/articles/article2074.asp" />
  <row Id="6560" PostHistoryTypeId="2" PostId="3354" RevisionGUID="e61b8a19-03b7-4e3c-b61d-02cc898ec344" CreationDate="2010-08-30T10:24:40.140" UserId="1943" Text="Every engine that you learn will actually teach you OpenGL ES better, as long as you see what is happening under the hood. You can roll your own engine, but be ready to rewrite it many, many times. It'd better to learn an existing one, and then decide wether you want to write from scratch.&#xD;&#xA;&#xD;&#xA;That said, personally I think that storing models in `.h` is a very crude and ugly way of doing it. It will work only if you have just a few models. Do not even start to think about in a case of a game that will need resource handling (ergo have more than a basic amount of models/textures)." />
  <row Id="6561" PostHistoryTypeId="2" PostId="3355" RevisionGUID="c3198d70-bdd6-466e-963e-6a751f0ea55b" CreationDate="2010-08-30T10:47:55.833" UserId="1156" Text="No. It all depends what you want to learn.&#xD;&#xA;&#xD;&#xA;If you want to learn game programming as a whole but more aimed towards logic, then use a game engine. &#xD;&#xA;&#xD;&#xA;If you want to learn OpenGL-ES, which is what you say, then it makes a great deal more sense not to use a game engine. That way you can see what works, and what doesn't. With a game engine, you would maybe do something like 'AddModel(&quot;address&quot;); RenderAll(); ' or whatever. This doesn't do a great deal of teaching OpenGL.&#xD;&#xA;&#xD;&#xA;And for the model format, I think it makes sense to keep them as an .obj file. You can edit them with a modelling program, and you learn how to load models universally, rather than just on iPhone." />
  <row Id="6562" PostHistoryTypeId="2" PostId="3356" RevisionGUID="69a59324-57a1-42cd-8b13-3258e1b224fc" CreationDate="2010-08-30T11:44:20.983" UserId="1628" Text="In an FPS context, fixed-point values might actually be a liability. Close to zero floating-point is more accurate. It is only over large distances fixed-point becomes more preferable. The answer is simply that its dependent on context.&#xD;&#xA;&#xD;&#xA;In something like a galaxy you can use frames of reference. Use a huge scale for the solar systems and then use the center of the Sun (or similar point) as the point of origin for anything inside the system. Using this system you can have your cake and eat it, so to speak, and its not difficult to envision.&#xD;&#xA;&#xD;&#xA;IIRC, the dev on Infinity stated that he was continuously iterating around scale issues in one of his interviews." />
  <row Id="6563" PostHistoryTypeId="2" PostId="3357" RevisionGUID="c93c4800-0d72-41b8-888a-c615dd352f52" CreationDate="2010-08-30T12:12:44.080" UserId="288" Text="If you will allow me a shameless plug, I'll give you an example from a &lt;a href=&quot;http://www.youtube.com/watch?v=2suHMoS42p4&quot;&gt;real game I'm working on&lt;/a&gt; (YouTube video link).&#xD;&#xA;&#xD;&#xA;The game has an infinite, procedurally generated world on a physics engine. It uses single-precision floating point. After a few hundred meters of game space, precision issues start to arise (and get progressively worse the further from the origin you get).&#xD;&#xA;&#xD;&#xA;My solution? Every 200m or so I move the entire world back by 200m towards the origin (if you care to find and try one of the prototypes on my site, and bring up the [w]orld debug overlay, you can see this happen).&#xD;&#xA;&#xD;&#xA;Why not use fixed point? Or double precision? Instead of single-precision? **Because *everything else* is using single precision floating point!**&#xD;&#xA;&#xD;&#xA;The physics engine I'm using uses it, XNA uses it, the data that gets loaded onto the graphics card is formatted as single-precision floating point. Even the *language itself* is designed to work with floating point numbers -- writing and (more importantly) reading `0.5f` is far easier than `0x80000000L`.&#xD;&#xA;&#xD;&#xA;It's simply a matter of what is easier in practice. And the clear winner is being aware of floating point precision issues and &lt;a href=&quot;http://andrewrussell.net/2010/06/triple-update/&quot;&gt;writing&lt;/a&gt; fairly simple &quot;move-the-world-back-to-zero&quot; functions (or implementing space partitioning or whatever suits your game).&#xD;&#xA;&#xD;&#xA;And finally another example - &lt;a href=&quot;http://orbit.medphys.ucl.ac.uk/home.php&quot;&gt;Orbiter&lt;/a&gt; is game (simulation, really) that really needs to care about precision. Not just in space but also in time (time acceleration plus orbiting bodies - don't want them to fall out of the sky, now). It also uses floating point numbers and &lt;a href=&quot;http://www.orbiterwiki.org/wiki/FAQ#Orbit_deteriorates_at_1000x_and_10000x_time_acceleration.&quot;&gt;employs a hack&lt;/a&gt; to maintain stability." />
  <row Id="6564" PostHistoryTypeId="2" PostId="3358" RevisionGUID="536c7289-5b2f-41e4-b27f-59e9e9daf1e6" CreationDate="2010-08-30T12:15:46.223" UserId="744" Text="First - yes, they are significantly faster. Even if you can get fixed point working as fast as a &quot;normal&quot; FPU, real floating point has advantageous instructions like fsel to stop branching, or SIMD to work on many floats at once. GPUs also use floating point, at least in their user-facing interfaces.&#xD;&#xA;&#xD;&#xA;Secondly, 64 bits gets you pretty far in floating point as well - most people still use 32, but the primary advantage is that it scales. That fixed point scale has a fixed accuracy. Whether you're measuring the sun to Pluto, or across the street, you get the same precision. Floating point will give you much more accurate results when all values involved are smaller. Since generic physics libraries are expected to work at least passably with lots of games at different scales - and some games themselves may have vastly different scales - they need to use a kind of number that works at many scales." />
  <row Id="6565" PostHistoryTypeId="2" PostId="3359" RevisionGUID="08cbf87b-51ef-4a09-9914-31828ae34e95" CreationDate="2010-08-30T12:58:14.123" UserId="382" Text="One of the reasons is that floating point arithmetic is &quot;good enough&quot; (or at least it has been), it produces fairly accurate results quickly.&#xD;&#xA;&#xD;&#xA;As long as you are aware of the limitations of floating point arithmetic and change your algorithms to cope with them (see Andrew Russell's answer) then you'll produce code that &quot;works&quot;." />
  <row Id="6566" PostHistoryTypeId="2" PostId="3360" RevisionGUID="163a0fb8-4c49-4ae9-b56d-f0653d1c2508" CreationDate="2010-08-30T13:09:53.070" UserId="1593" Text="It's easy to deal with the way locations interact on a clean Cartesian grid.  It's just vanilla math.  And you can kind of ignore the geometry of the sphere's surface for a bunch of it if you want to just truncate the poles or something.  But I keep coming up with ideas for games where the polar space matters.  Geo-coded ARGs and global roguelikes and stuff.&#xD;&#xA;&#xD;&#xA;I want square(ish?) locations -- reasonably representable by square tiles of the same size across the globe, anyway.&#xD;&#xA;&#xD;&#xA;This has to be a solved problem, right?&#xD;&#xA;&#xD;&#xA;What are the solutions?  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="6567" PostHistoryTypeId="1" PostId="3360" RevisionGUID="163a0fb8-4c49-4ae9-b56d-f0653d1c2508" CreationDate="2010-08-30T13:09:53.070" UserId="1593" Text="When mapping a sphere with tiles, how might you deal with polar distortion?" />
  <row Id="6568" PostHistoryTypeId="3" PostId="3360" RevisionGUID="163a0fb8-4c49-4ae9-b56d-f0653d1c2508" CreationDate="2010-08-30T13:09:53.070" UserId="1593" Text="&lt;tessellation&gt;&lt;maps&gt;" />
  <row Id="6569" PostHistoryTypeId="2" PostId="3361" RevisionGUID="89eedf60-979c-43b8-8259-1fca0fb2a5e4" CreationDate="2010-08-30T13:24:05.733" UserId="1943" Text="Take a cube, with the distance between the vertices and the center of the cube equal to the desired radius. You have a sphere made out of 6 quads.&#xD;&#xA;&#xD;&#xA;Now in each step, take every quad, divide it into 4, and move the new 5 vertices (one in the center, and 4 on the edges -- warning, they are SHARED) away from the center so that they like on the desired radius.&#xD;&#xA;&#xD;&#xA;No, this method is not perfect, but at least it's a more or less equal distribution over the sphere." />
  <row Id="6570" PostHistoryTypeId="2" PostId="3362" RevisionGUID="01c4cb25-145c-4736-be7f-1d20c1bb7480" CreationDate="2010-08-30T13:44:07.497" UserId="1923" Text="If you create a sphere using a geodesic base, the polar area is treated no different than any other region in terms of vertex spacing which facilitates uniform uv mapping.&#xD;&#xA;&#xD;&#xA;Most modeling apps allow you to create a sphere primitive using a geodesic design." />
  <row Id="6571" PostHistoryTypeId="4" PostId="3360" RevisionGUID="46c5b3f1-ecba-41dc-b4bb-49295ff57ebc" CreationDate="2010-08-30T13:47:09.487" UserId="1593" Comment="edited title" Text="When mapping the surface of a sphere with tiles, how might you deal with polar distortion?" />
  <row Id="6572" PostHistoryTypeId="2" PostId="3363" RevisionGUID="9366b9c2-82b3-490f-8e00-4554e137e23b" CreationDate="2010-08-30T15:13:31.270" UserId="458" Text="This seems like more of a philosophical question with no single &quot;right&quot; answer.&#xD;&#xA;&#xD;&#xA;A lot of players enjoy feeling like they're progressing and getting stronger, so removing progression from your game is not an automatic solution. For games in genres built on progression mechanics (like RPGs), removing that core would make for a relatively unique game... but one that you'd have to be careful about since you'd be treading in unfamiliar territory.&#xD;&#xA;&#xD;&#xA;Having enemies scale (as with Oblivion) is one way to prevent the game from getting too easy; the danger here is that sometimes players can feel as if they can never get ahead: the enemies level up with you, so it doesn't feel like progression.&#xD;&#xA;&#xD;&#xA;The more traditional way around this is simply to divide enemies into areas, where moving to the next area means harder enemies, and it's up to the player whether to move forward now, or grind for a bit in the previous area to &quot;level up&quot; to make the next area easier.&#xD;&#xA;&#xD;&#xA;An important thing to realize here is that the player's perceived difficulty is going to be a function of both their power level, and that of the enemies. If you give the player a huge power boost but give the enemies an even greater boost, the game will get harder in spite of the player's power increase. So it's a matter of what you want the difficulty curve to look like in your game. Do you want it to get progressively harder, or easier? Do you want to time the hardest points in the game to coincide with the most dramatic parts of your story arc? You can do it any which way and there's no &quot;right&quot; or &quot;wrong&quot; answer here, it comes down to your design goals and then finding the best difficulty progression to give the player the play experience you're after.&#xD;&#xA;&#xD;&#xA;See also my blog post on progression mechanics: &#xD;&#xA;http://gamebalanceconcepts.wordpress.com/2010/08/18/level-7-advancement-progression-and-pacing/" />
  <row Id="6573" PostHistoryTypeId="2" PostId="3364" RevisionGUID="2fab6cc5-f9b5-4910-a5a4-ee81c2e91064" CreationDate="2010-08-30T15:19:10.023" UserId="452" Text="You're essentially asking, &quot;Can I cover a sphere with square tiles, of about the same size, and all of them with roughly straight corners?&quot;&#xD;&#xA;&#xD;&#xA;The answer is no, you can't. (aside from the cube solution.) At some place in your sphere you'll have a corner where only three square tiles touch. How would you fit them together without distorting them a lot?&#xD;&#xA;&#xD;&#xA;If you want to make a worldwide grid, I suggest you divide the planet in countries or continents, and make a square grid properly centered on each. Let the ocean cover the seams." />
  <row Id="6574" PostHistoryTypeId="5" PostId="3360" RevisionGUID="459ccb02-2abf-4bd0-a076-3148facb6d5a" CreationDate="2010-08-30T15:31:17.777" UserId="1593" Comment="added 976 characters in body" Text="It's easy to deal with the way locations interact on a clean Cartesian grid.  It's just vanilla math.  And you can kind of ignore the geometry of the sphere's surface for a bunch of it if you want to just truncate the poles or something.  But I keep coming up with ideas for games where the polar space matters.  Geo-coded ARGs and global roguelikes and stuff.&#xD;&#xA;&#xD;&#xA;I want square(ish?) locations -- reasonably representable by square tiles of the same size across the globe, anyway.&#xD;&#xA;&#xD;&#xA;This has to be a solved problem, right?&#xD;&#xA;&#xD;&#xA;What are the solutions?  &#xD;&#xA;&#xD;&#xA;ETA:&#xD;&#xA;&#xD;&#xA;At the equator -- and assuming that your square locations are reasonably small, it's close enough to true that you can get away with having one square in the rows north and south of the most equatorial row.  And you could probably get away with that by just hand-waving the difference up to like 45-degrees or so.  But eventually, you need to have fewer squares in a pole-ward circumferential row.  If I reduce the length of the row by one and offset the squares by 1/2 then they're just like hexes  and it's relatively easy to do the coding to keep track of the connections.  But as you get pole-ward, it gets more and more extreme.&#xD;&#xA;&#xD;&#xA;Projecting the surface of the world onto the surface of a cube is tempting.  But I figured there must be more elegant solutions already in use.  &#xD;&#xA;&#xD;&#xA;If I did the cube thing (not dissecting it further through geodesy) Are there any pros and cons related to placing the pole at the center of a face or at the vertex of three sides?&#xD;&#xA;" />
  <row Id="6575" PostHistoryTypeId="5" PostId="3364" RevisionGUID="8030a9e6-7316-4c76-a54d-f01395787dbb" CreationDate="2010-08-30T15:33:55.010" UserId="452" Comment="deleted 357 characters in body" Text="If you want to make a worldwide grid, I suggest you divide the planet in countries or continents, and make a square grid properly centered on each. Let the ocean cover the seams." />
  <row Id="6576" PostHistoryTypeId="2" PostId="3365" RevisionGUID="a58584d9-6e4f-4855-a954-766ff4e13e30" CreationDate="2010-08-30T16:16:57.603" UserId="950" Text="To nuance what Steve H said, you need a tech savvy manager. &#xD;&#xA;&#xD;&#xA;In this industry, you need someone who is able to quickly grasp what can be achieved and when, what are the limits of you tech/skill pool, etc. Someone with a production experience is invaluable.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6577" PostHistoryTypeId="16" PostId="3365" RevisionGUID="a58584d9-6e4f-4855-a954-766ff4e13e30" CreationDate="2010-08-30T16:16:57.603" UserId="-1" />
  <row Id="6578" PostHistoryTypeId="2" PostId="3366" RevisionGUID="512cc53a-202f-4be2-897d-cb4b0bfed23a" CreationDate="2010-08-30T16:23:46.160" UserId="465" Text="Experience! &#xD;&#xA;&#xD;&#xA;If you don't have it consult people who do.&#xD;&#xA;Most mistakes can be avoided by a little bit of experience.&#xD;&#xA;&#xD;&#xA;The various business, technical, design and management aspects are too numerous to explain.&#xD;&#xA;&#xD;&#xA;There are many good books on business consult those and don't be tied to game specific resources.&#xD;&#xA;&#xD;&#xA;Also check in your area, consult local council or businesses as there may be support programs in the area for SME (Small Medium Enterprise). They often provide funding, services or advice." />
  <row Id="6579" PostHistoryTypeId="16" PostId="3366" RevisionGUID="512cc53a-202f-4be2-897d-cb4b0bfed23a" CreationDate="2010-08-30T16:23:46.160" UserId="-1" />
  <row Id="6580" PostHistoryTypeId="5" PostId="3334" RevisionGUID="e80915b7-1d40-4a8b-8177-3c3f2a4beeaf" CreationDate="2010-08-30T18:13:09.180" UserId="539" Comment="Fixing spelling error: morale =&gt; moral" Text="*Success* is defined as your equity in your studio is greater than the amount which you could have earned working for someone else's studio.&#xD;&#xA;&#xD;&#xA;By and large, it is the same as any industry. An individual that has much technical knowledge in a field is able to make very smart technical decisions because they have much experience doing it. At the same time, they lack experience making smart business decisions because they generally lack experience in business management.&#xD;&#xA;&#xD;&#xA;Making smart business decisions affects *success* way **way** more than making smart technical decisions.&#xD;&#xA;&#xD;&#xA;The oversight or common mistake is to not employ an experienced business manager early on in the enterprise or somehow mitigate this shortcoming within the enterprise.&#xD;&#xA;&#xD;&#xA;The moral: Find a good business manager and pay them more than anybody else in the enterprise. Sounds counter intuitive but the better manager you have, the sooner your enterprise hits critical mass where your studio achieves *success*. " />
  <row Id="6581" PostHistoryTypeId="2" PostId="3367" RevisionGUID="3a49c0ef-b737-44a4-b29e-540dc01bfdd2" CreationDate="2010-08-30T18:26:59.513" UserId="539" Text="I have never started my own studio or business so take this with a grain of salt. That said I do a great deal of reading and research on the subject so I thought I'd share something. My advice would be to:&#xD;&#xA;&#xD;&#xA;&gt; Identify your core assumptions, create tests to test the most risky ones first, repeat&#xD;&#xA;&#xD;&#xA;In practice this may mean validating your&#xD;&#xA;&#xD;&#xA;  * Who the players are&#xD;&#xA;  * Who the customers are (i.e. advertisers for a Flash game, the players for a traditional game)&#xD;&#xA;  * That the customers are interested in buying what you're selling&#xD;&#xA;  * The cost to acquire a customer&#xD;&#xA;&#xD;&#xA;An example experiment might be:&#xD;&#xA;&#xD;&#xA;  1. Create an advertisement&#xD;&#xA;  2. Create a landing page with additional copy and a prototype screenshot&#xD;&#xA;  3. Show your ad to the target audience on Facebook&#xD;&#xA;  4. Measure click through on ad, click through on &quot;Download Trial&quot; or &quot;Buy Now&quot; button&#xD;&#xA;&#xD;&#xA;All of this can be done for a couple hundred dollars and can help answer some of the above questions. (Method is known as dry testing.)&#xD;&#xA;&#xD;&#xA;If you want more information or to read a more formal framework for thinking about experiment driven processes take a look at:&#xD;&#xA;&#xD;&#xA;  1. [Steve Blank](http://steveblank.com/) author of Customer Development&#xD;&#xA;  2. [Eric Ries](http://www.startuplessonslearned.com) leading figure for Lean Development&#xD;&#xA;  3. [The Entrepreneur's Guide to Customer Development](http://www.amazon.com/Entrepreneurs-Guide-Customer-Development-Epiphany/dp/0982743602) a &quot;cheatsheet&quot; to some of the ideas from the two guys above" />
  <row Id="6582" PostHistoryTypeId="16" PostId="3367" RevisionGUID="3a49c0ef-b737-44a4-b29e-540dc01bfdd2" CreationDate="2010-08-30T18:26:59.513" UserId="-1" />
  <row Id="6583" PostHistoryTypeId="2" PostId="3368" RevisionGUID="47bab84d-00f6-41d3-8750-47901cff7ed0" CreationDate="2010-08-30T18:31:28.023" UserId="1780" Text="There is no way to &quot;map&quot; a sphere with squares (or rectangles) and have them all join up at &quot;common&quot; vertices.&#xD;&#xA;&#xD;&#xA;However, would it be feasible to generate the &quot;local view&quot; on demand?  The problem space isn't really stated in the question, but if I were working on something where I wanted a city view but wanted to be able to spin the world, I might temporarily just map a grid onto a &quot;flat enough&quot; section of the world.  The origin of the grid would be wherever your local center was, and the normal at that point matches the normal of the surface of the planet.&#xD;&#xA;&#xD;&#xA;Then, when one walks off of the grid, a new one is generated on demand.&#xD;&#xA;&#xD;&#xA;This may or may not work for the OP, but for some it might be useful." />
  <row Id="6584" PostHistoryTypeId="2" PostId="3369" RevisionGUID="8285eb28-d9d0-4cee-b4d6-d110989eb45d" CreationDate="2010-08-30T18:34:29.080" UserId="370" Text="I've always wanted to see a game where the spherical map used a regular *-hedron of some some sort instead of playing the world on a torus.  This technique is called [Dymaxion map][1].&#xD;&#xA;![alt text][2] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img src=&quot;http://www.grunch.net/synergetics/images/foldupdym.gif&quot;/&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would recommend an [Icosahedron][3].  You can still use grids in each triangle but the cut offs between section would be a bit trickier.  Here is another dymaxion map that uses a pure icosahedron.&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This way you can play on a &quot;true&quot; sphere with minimal distortion ([less than 2%][5]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dymaxion_map&#xD;&#xA;  [2]: http://i.stack.imgur.com/CX1cT.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Icosahedron&#xD;&#xA;  [4]: http://i.stack.imgur.com/Xgiqq.png&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Icosahedron#Uses_and_natural_forms" />
  <row Id="6585" PostHistoryTypeId="2" PostId="3370" RevisionGUID="54395c95-7267-42cf-a443-5e9d55167914" CreationDate="2010-08-30T18:46:54.320" UserId="1780" Text="My #1 mistake- going into business not only with a friend, but also with the spouse of said friend.  Thought it would be a good idea; the spouse had &quot;business&quot; experience, friend and I had complementary skills.&#xD;&#xA;&#xD;&#xA;This friend admitted to me one day that in any disagreement that I would always lose because the friend would always side with the spouse.&#xD;&#xA;&#xD;&#xA;I didn't last much longer in that business arrangement.  That business didn't last much longer than me, and the marriage wasn't to last much longer yet.&#xD;&#xA;&#xD;&#xA;Fun times in the world of &quot;business&quot;.&#xD;&#xA;&#xD;&#xA;Our #2 mistake: expecting to get anything useful without paying for it.  Nobody wants promises of profits or shares of company or any of that.  People want cash." />
  <row Id="6586" PostHistoryTypeId="16" PostId="3370" RevisionGUID="54395c95-7267-42cf-a443-5e9d55167914" CreationDate="2010-08-30T18:46:54.320" UserId="-1" />
  <row Id="6587" PostHistoryTypeId="5" PostId="3369" RevisionGUID="523d0b03-f412-437e-b1df-0fef491f7406" CreationDate="2010-08-30T18:59:41.827" UserId="370" Comment="added 393 characters in body" Text="I've always wanted to see a game where the spherical map used a regular polyhedron of some some sort instead of playing the world on a torus.  This technique is called [Dymaxion map][1].&#xD;&#xA;![alt text][2] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img src=&quot;http://www.grunch.net/synergetics/images/foldupdym.gif&quot;/&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would recommend an [Icosahedron][3].  Plop the current triangle so it's aligned on one edge of a square.  When the player moves off the triangle, pull up the next triangle and map it identically again.  The player's coordinates would then be remapped to the new section.  So each section of your map has its own coordinate system.  Also you'll need to draw the background for the 3 adjacent and 9 semi adjacent sections.  I don't think the user would be able to determine how it's implemented if it's well done.&#xD;&#xA;&#xD;&#xA;[Here][4] is an example of how this might work.&#xD;&#xA;&#xD;&#xA;Of course after reading this you'll probably use the classic torus map and I'll be waiting to see a true polyhedral universe.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dymaxion_map&#xD;&#xA;  [2]: http://i.stack.imgur.com/CX1cT.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Icosahedron&#xD;&#xA;  [4]: http://teczno.com/faumaxion-II/&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Icosahedron#Uses_and_natural_forms" />
  <row Id="6588" PostHistoryTypeId="2" PostId="3371" RevisionGUID="0c28783a-fd6a-42e9-b596-3e9c1dc80222" CreationDate="2010-08-30T19:19:58.920" UserId="1931" Text="    How to balance load problems?&#xD;&#xA;fixed geographical size + multiple instances is the easiest solution. The guys working on SWG tried dynamic size and regretted it.&#xD;&#xA;&#xD;&#xA;    How to manage the game state?&#xD;&#xA;Server is authoritative.&#xD;&#xA;&#xD;&#xA;    How to keep things synchronized?&#xD;&#xA;Periodic sync updates from server. (not quite sure what the concern is here)&#xD;&#xA;&#xD;&#xA;    How to protect the communication and client from reverse engineering?&#xD;&#xA;Impossible. just make sure you don't trust anything you receive from the client, and that the server is authoritative.&#xD;&#xA;&#xD;&#xA;    How to work around latency problems?&#xD;&#xA;This goes miles deep, but superficially you run the same simulation on the client as the server and when the sync happens, fix things. All decisions made on the client are simulated on the server as well, so there may be bad decisions, but things generally work out.&#xD;&#xA;&#xD;&#xA;    Which things should be computed local and which things on the server?&#xD;&#xA;Think of the client as running a non-authoritative sim of what is going on on the server. Responsiveness is key for the player experience, so you have to do *something* every time a player makes a decision, even if it is just starting a bar.&#xD;&#xA;&#xD;&#xA;Truth be told, a lot of these problems are orthogonal, and can have solutions applied later. Just start doing the game and don't worry too much about these things.&#xD;&#xA;" />
  <row Id="6589" PostHistoryTypeId="16" PostId="3371" RevisionGUID="0c28783a-fd6a-42e9-b596-3e9c1dc80222" CreationDate="2010-08-30T19:19:58.920" UserId="-1" />
  <row Id="6590" PostHistoryTypeId="5" PostId="3371" RevisionGUID="754861c9-6900-4c43-b764-a0fa999ba60e" CreationDate="2010-08-30T20:30:38.793" UserId="51" Comment="code -&gt; quote" Text="&gt; How to balance load problems?&#xD;&#xA;&#xD;&#xA;fixed geographical size + multiple instances is the easiest solution. The guys working on SWG tried dynamic size and regretted it.&#xD;&#xA;&#xD;&#xA;&gt; How to manage the game state?&#xD;&#xA;&#xD;&#xA;Server is authoritative.&#xD;&#xA;&#xD;&#xA;&gt; How to keep things synchronized?&#xD;&#xA;&#xD;&#xA;Periodic sync updates from server. (not quite sure what the concern is here)&#xD;&#xA;&#xD;&#xA;&gt; How to protect the communication and client from reverse engineering?&#xD;&#xA;&#xD;&#xA;Impossible. just make sure you don't trust anything you receive from the client, and that the server is authoritative.&#xD;&#xA;&#xD;&#xA;&gt; How to work around latency problems?&#xD;&#xA;&#xD;&#xA;This goes miles deep, but superficially you run the same simulation on the client as the server and when the sync happens, fix things. All decisions made on the client are simulated on the server as well, so there may be bad decisions, but things generally work out.&#xD;&#xA;&#xD;&#xA;&gt; Which things should be computed local and which things on the server?&#xD;&#xA;&#xD;&#xA;Think of the client as running a non-authoritative sim of what is going on on the server. Responsiveness is key for the player experience, so you have to do *something* every time a player makes a decision, even if it is just starting a bar.&#xD;&#xA;&#xD;&#xA;Truth be told, a lot of these problems are orthogonal, and can have solutions applied later. Just start doing the game and don't worry too much about these things.&#xD;&#xA;" />
  <row Id="6591" PostHistoryTypeId="2" PostId="3372" RevisionGUID="dfa0ffd9-52f4-4bad-90af-44c26b6e39ca" CreationDate="2010-08-30T20:40:11.470" UserId="891" Text="**Open Dynamics Engine** is another semi-popular open source middleware solution for physics and collision.&#xD;&#xA;&#xD;&#xA;[http://www.ode.org/][1]&#xD;&#xA;&#xD;&#xA;**PhysX** is another popular collision/physics middleware from NVIDIA.  Binary available.&#xD;&#xA;&#xD;&#xA;[http://developer.nvidia.com/object/physx.html][2]&#xD;&#xA;&#xD;&#xA;Last but not least is **Havok** which is the gold standard of collision/physics.  Binary available.&#xD;&#xA;&#xD;&#xA;[http://www.havok.com/][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ode.org/&#xD;&#xA;  [2]: http://developer.nvidia.com/object/physx.html&#xD;&#xA;  [3]: http://www.havok.com/" />
  <row Id="6592" PostHistoryTypeId="2" PostId="3373" RevisionGUID="5c315669-871a-450f-845c-1acc3ceaca7a" CreationDate="2010-08-30T21:05:12.883" UserId="1931" Text="Money. Someone has to be paying attention to this at all times or you're screwed. This is a full time job, it takes a lot of time and energy to drum up.&#xD;&#xA;&#xD;&#xA;A second thing is someone to handle the books, hr, etc. This can be outsourced, but it takes time and it is just a little silly when your server architect is firing up Quickbooks to make sure you don't get audited." />
  <row Id="6593" PostHistoryTypeId="16" PostId="3373" RevisionGUID="5c315669-871a-450f-845c-1acc3ceaca7a" CreationDate="2010-08-30T21:05:12.883" UserId="-1" />
  <row Id="6594" PostHistoryTypeId="2" PostId="3374" RevisionGUID="5291307b-1a9e-4867-9de1-47ce7cbafc4e" CreationDate="2010-08-31T00:11:13.767" UserId="891" Text="In academia **Big O** is taught over everything else.  Compared to space complexity, normal case analysis, simplicity over complexity, etc.&#xD;&#xA;&#xD;&#xA;In particular to game programming and industry, what really matters most and why.&#xD;&#xA;&#xD;&#xA;*References would be very helpful.*" />
  <row Id="6595" PostHistoryTypeId="1" PostId="3374" RevisionGUID="5291307b-1a9e-4867-9de1-47ce7cbafc4e" CreationDate="2010-08-31T00:11:13.767" UserId="891" Text="Does Big O really matter?" />
  <row Id="6596" PostHistoryTypeId="3" PostId="3374" RevisionGUID="5291307b-1a9e-4867-9de1-47ce7cbafc4e" CreationDate="2010-08-31T00:11:13.767" UserId="891" Text="&lt;programming&gt;&lt;algorithm&gt;&lt;best-practices&gt;" />
  <row Id="6597" PostHistoryTypeId="2" PostId="3375" RevisionGUID="ffdb4468-30b3-4cc4-aae3-739b561540c5" CreationDate="2010-08-31T00:24:44.283" UserId="865" Text="I have no references but Big O is at least handy to be aware of when analyzing a problem and discussion. On the other hand, of course, if the O(log n) version has a way more involved O than the O(n) version it's a moot comparison. And as with everything, there's always a trade off. Space complexity could be an issue, although that could be expressed in O in general as well. Normal case analysis...less so, as you don't want outliers to spike either. Simplicity over complexity, in my opinion, is relatively useless in game development as speed is almost always an issue, so unless the simplicity leads to to speedups (but then it means your complex case was wrong for the wrong reasons) simplicity will have to go out of the window in favour of speed. But Big O is definitely useful, as failing to grasp it will fail to help you analyze possible solutions and their impact." />
  <row Id="6598" PostHistoryTypeId="2" PostId="3376" RevisionGUID="2bd03801-fefb-4a40-b6bf-69aff3430ff1" CreationDate="2010-08-31T00:33:07.130" UserId="51" Text="My rule of thumb is that unless you're O(scary), your other issues are more pertinent.  &#xD;&#xA;&#xD;&#xA;My other rule of thumb is that data is king.  Unless you profile your code with a realistic data set you're just making guesses." />
  <row Id="6599" PostHistoryTypeId="2" PostId="3377" RevisionGUID="1d0a7354-dfa0-43e9-b70c-b7e8b79ac622" CreationDate="2010-08-31T00:43:32.660" UserId="469" Text="I NEVER, EVER did ANY sort of network code in C++, I don't know even the libraries that exist, but a popular demand for my game is online leaderboards...&#xD;&#xA;&#xD;&#xA;So, what sort of libraries I should research into?&#xD;&#xA;&#xD;&#xA;My game is multiplatform (win, gnu, mac), uses C++, ClanLib 1.0 and Lua. Also the engine is zlib (so proprietary stuff that I cannot release source don't work)" />
  <row Id="6600" PostHistoryTypeId="1" PostId="3377" RevisionGUID="1d0a7354-dfa0-43e9-b70c-b7e8b79ac622" CreationDate="2010-08-31T00:43:32.660" UserId="469" Text="Where to start the coding of online leaderboards?" />
  <row Id="6601" PostHistoryTypeId="3" PostId="3377" RevisionGUID="1d0a7354-dfa0-43e9-b70c-b7e8b79ac622" CreationDate="2010-08-31T00:43:32.660" UserId="469" Text="&lt;c++&gt;&lt;network&gt;&lt;online&gt;&lt;leaderboards&gt;" />
  <row Id="6602" PostHistoryTypeId="2" PostId="3378" RevisionGUID="df1292d4-e7d5-4f99-b4c2-5d745826b652" CreationDate="2010-08-31T00:44:30.513" UserId="1780" Text="As with *every other question* regarding &quot;what's the One True Path&quot;, these are all tools in your toolbox and there are cases where big-O trumps everything, and places where it doesn't matter(tm).&#xD;&#xA;&#xD;&#xA;You would &quot;never&quot; write a physics solver without being concerned about big-O.  You wouldn't implement a sorting algorithm (for any but the smallest of datasets) without being concerned about it.  If you're writing a networked game, you're going to be concerned with the way performance and network traffic scales per user.&#xD;&#xA;&#xD;&#xA;You might not be so concerned about big-O when, well, I can't really think of a time but I'm sure there are some.  :)  Thankfully, most of the things that we do in games scale linearly; you want to read a file off of disc?  It'll take an amount of time linearly proportional to the file size (discounting the constant factor of seeking and possible ramifications of sector size).&#xD;&#xA;&#xD;&#xA;However, what if you want to find a specific entity in the entity list?  That's a linear search each time you do it.  If you need to find the player once for every entity in the world, this approach will kill you for all but the most trivial of games, and even then it's probably worth &quot;optimizing&quot; this lookup to be constant time (e.g. store off the index of or a pointer to the player somewhere), giving you more time to do other things that actually are visible to the player.&#xD;&#xA;&#xD;&#xA;I guess that sums it up, though; any time the processor is doing something that isn't directly representable to the player, it's wasting time.  Maximizing the amount of time that the processor is computing data that will be shown to the player is maximizing the *WOW!* you're giving the player." />
  <row Id="6603" PostHistoryTypeId="2" PostId="3379" RevisionGUID="5a32b57a-b6b3-4de8-9387-3f1be8abe81f" CreationDate="2010-08-31T00:59:07.863" UserId="395" Text="First question, how much do you care about cheating? Making a simple webapp for leaderboards is probably pretty easy, but it will instantly be spammed out of existence. I would look at curl as a decent async HTTP library that you should be able to integrate into just about any client code. For the server side, I assume you have no budget for dedicated servers, so Google App Engine might be a good match if you know either Python or Java." />
  <row Id="6604" PostHistoryTypeId="2" PostId="3380" RevisionGUID="9e5a1d2e-ac13-47a9-828a-35a286b4b8c1" CreationDate="2010-08-31T01:04:42.207" UserId="47" Text="I'm developing an Android game.  Basically I want to pre-load all graphics/sounds when the app is first loaded.  But I also would like to show a progress bar as this is happening.  Here is a snippet of Java/Android code to display a progress bar while doing some work:&#xD;&#xA;&#xD;&#xA;    public class LoadingScreen extends Activity {&#xD;&#xA;	&#xD;&#xA;    private static int progress = 0;&#xD;&#xA;    private ProgressBar progressBar;&#xD;&#xA;    private int progressStatus = 0;&#xD;&#xA;    private Handler handler = new Handler();&#xD;&#xA;&#xD;&#xA;    /** Called when the activity is first created. */&#xD;&#xA;    @Override&#xD;&#xA;    public void onCreate(Bundle savedInstanceState) {&#xD;&#xA;        super.onCreate(savedInstanceState);&#xD;&#xA;        setContentView(R.layout.loadingscreen);&#xD;&#xA;        &#xD;&#xA;        progressBar = (ProgressBar) findViewById(R.id.progress);&#xD;&#xA;        &#xD;&#xA;        //---do some work in background thread---&#xD;&#xA;        new Thread(new Runnable() &#xD;&#xA;        {&#xD;&#xA;            public void run() &#xD;&#xA;            {&#xD;&#xA;                while (progressStatus &lt; 100) &#xD;&#xA;                {&#xD;&#xA;                    progressStatus = doSomeWork();&#xD;&#xA; &#xD;&#xA;                    //---Update the progress bar---&#xD;&#xA;                    handler.post(new Runnable() &#xD;&#xA;                    {&#xD;&#xA;                        public void run() {&#xD;&#xA;                            progressBar.setProgress(progressStatus);&#xD;&#xA;                        }&#xD;&#xA;                    });&#xD;&#xA; &#xD;&#xA;                }&#xD;&#xA;                //---hides the progress bar---&#xD;&#xA;                handler.post(new Runnable() &#xD;&#xA;                {&#xD;&#xA;                    public void run() {&#xD;&#xA;                        progressBar.setVisibility(8);&#xD;&#xA;                    }&#xD;&#xA;                });&#xD;&#xA;            }    &#xD;&#xA; &#xD;&#xA;            private int doSomeWork() &#xD;&#xA;            {&#xD;&#xA;                try &#xD;&#xA;                {&#xD;&#xA;                    //---simulate doing some work---&#xD;&#xA;                    Thread.sleep(50);&#xD;&#xA;                } catch (InterruptedException e) &#xD;&#xA;                {&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;                return ++progress;&#xD;&#xA;            }&#xD;&#xA; &#xD;&#xA;        }).start(); &#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;My question is: how do I design my Asset Manager to load &quot;chunks&quot; of data (bitmaps and sounds/music) in the `doSomeWork()` function?  Would it be some sort of stack that I keep popping off the next asset to load?  How do I determine how much of the progress bar I should increment after loading a &quot;chunk&quot; of data?&#xD;&#xA;&#xD;&#xA;Is there a better way to approach this or is this the correct way?" />
  <row Id="6605" PostHistoryTypeId="1" PostId="3380" RevisionGUID="9e5a1d2e-ac13-47a9-828a-35a286b4b8c1" CreationDate="2010-08-31T01:04:42.207" UserId="47" Text="How do I load chunks of data from an assest manager during a loading screen?" />
  <row Id="6606" PostHistoryTypeId="3" PostId="3380" RevisionGUID="9e5a1d2e-ac13-47a9-828a-35a286b4b8c1" CreationDate="2010-08-31T01:04:42.207" UserId="47" Text="&lt;graphics&gt;&lt;assets&gt;&lt;android&gt;&lt;loading&gt;&lt;preload&gt;" />
  <row Id="6607" PostHistoryTypeId="2" PostId="3381" RevisionGUID="52bfee96-2533-4f2d-8623-01fdbffde567" CreationDate="2010-08-31T01:55:46.210" UserId="1955" Text="It all begins with protocol design. What do you need to transmit over the wire? What kind of handshakes and verification mechanisms are needed? It could be as simple as a network packet is sent every time a game is over. It would simply contain the username with the score, for example `{ &quot;Joel&quot;, &quot;33&quot; }`&#xD;&#xA;&#xD;&#xA;The problem is that how do you confirm the score was achieved in a legitimate way? Perhaps someone simply analyzed your protocol packets with a network analyzer and concluded that only a username with the score is sent. Then he manually creates this packet and sends it. This is what coderanger meant by &quot;getting spammed out of existence&quot;.&#xD;&#xA;&#xD;&#xA;As for storing the leaderboard itself, I would recommend using a database, like SQLite. This gives you thread-safe and concurrent saving/access mechanism to the leaderboard. The underlying database takes care of synchronization.&#xD;&#xA;&#xD;&#xA;For the networking code itself, you need two parts. Something to send the data to the server and something that consumes and processes it at the server side. As coderange mentioned, it could be something as simple as HTTP/XML/JSON HTTP GET/POST and then a web server running on server side would consume that in a web service. The good part is that you don't have to deal with any of the networking code for the server's side as that is taken care of by the web server." />
  <row Id="6608" PostHistoryTypeId="2" PostId="3382" RevisionGUID="a8df3f16-f237-46ad-9f8d-91cb5e417771" CreationDate="2010-08-31T02:00:41.470" UserId="1923" Text="When you prototype a game function or an aspect of a game, you shouldn't worry about optimizing it **at all**.&#xD;&#xA;&#xD;&#xA;In the course of prototyping it and learning about the idiosyncrasies of that functionality, the necessary optimizations will become obvious &amp; will factor into the final design like 2nd nature... most of the time.&#xD;&#xA;&#xD;&#xA;Don't sweat it." />
  <row Id="6609" PostHistoryTypeId="2" PostId="3383" RevisionGUID="0e8b7a0b-db91-4e1d-bbe1-743a97ccab38" CreationDate="2010-08-31T02:37:12.147" UserId="776" Text="Community Wiki for Linux Game Engines.  Name, link, and intended use." />
  <row Id="6610" PostHistoryTypeId="1" PostId="3383" RevisionGUID="0e8b7a0b-db91-4e1d-bbe1-743a97ccab38" CreationDate="2010-08-31T02:37:12.147" UserId="776" Text="Linux Game Engines" />
  <row Id="6611" PostHistoryTypeId="3" PostId="3383" RevisionGUID="0e8b7a0b-db91-4e1d-bbe1-743a97ccab38" CreationDate="2010-08-31T02:37:12.147" UserId="776" Text="&lt;engine&gt;&lt;linux&gt;" />
  <row Id="6612" PostHistoryTypeId="16" PostId="3383" RevisionGUID="0e8b7a0b-db91-4e1d-bbe1-743a97ccab38" CreationDate="2010-08-31T02:37:12.147" UserId="776" />
  <row Id="6613" PostHistoryTypeId="2" PostId="3384" RevisionGUID="481a6e75-d4e8-4522-b0d5-ce46c222393c" CreationDate="2010-08-31T03:34:44.427" UserId="865" Text="Using .h files for your model is really only useful for something *really* quick and dirty. Every time you change anything about your model you need a rebuild. I could see it done for something that is crucial (say if you have a 3d loading image that has to be there even if loading fails) but apart from that it's even too oldskool for my liking (and I'm a dinosaur in most departments).&lt;br&gt;&#xD;&#xA;While I would hardcode a cube while getting to grips with an environment, I'd swap to loading models as soon as I got my prime renderer up and running as it's only a fraction harder to read the models and then index the data than it would be too reference hardcoded models.&lt;br&gt;&#xD;&#xA;Loading them also sets you up a lot better for reusing the engine because if you hardcode your models the rest of your code will probably end up following the same hardcoded philosophy and will be quite unreusable." />
  <row Id="6614" PostHistoryTypeId="2" PostId="3385" RevisionGUID="df34c64b-d251-4446-88f0-ab2313b83fe9" CreationDate="2010-08-31T03:55:14.990" UserId="1957" Text="Which 2d rendering algorithms are popular for mobile game engines and why? Are the same ones for the desktop and/or console world as effective here?" />
  <row Id="6615" PostHistoryTypeId="1" PostId="3385" RevisionGUID="df34c64b-d251-4446-88f0-ab2313b83fe9" CreationDate="2010-08-31T03:55:14.990" UserId="1957" Text="Which 2D rendering algorithm is the most suited for mobile devices?" />
  <row Id="6616" PostHistoryTypeId="3" PostId="3385" RevisionGUID="df34c64b-d251-4446-88f0-ab2313b83fe9" CreationDate="2010-08-31T03:55:14.990" UserId="1957" Text="&lt;2d&gt;&lt;opengl&gt;&lt;iphone&gt;&lt;android&gt;" />
  <row Id="6621" PostHistoryTypeId="5" PostId="3376" RevisionGUID="8ab3c92a-d440-46a2-b884-1e21fe6affed" CreationDate="2010-08-31T04:56:28.663" UserId="51" Comment="added 597 characters in body" Text="My rule of thumb is that unless you're O(scary), your other issues are more pertinent.  &#xD;&#xA;&#xD;&#xA;My other rule of thumb is that data is king.  Unless you profile your code with a realistic data set you're just making guesses.&#xD;&#xA;&#xD;&#xA;*Edit:* To go into a little more detail, your big O isn't that important since (at least in my experience) most of your data sets are relatively tiny.  You probably don't care about your upper bound of performance when you're working with a data structure with fewer than a few hundred elements.  And if your lists have 100k+ elements then you really need to consider all aspects of your algorithms.  That, and from my experience memory is more of a limiting factor than CPU speed.  A faster memory hogging algorithm might not be as good as a leaner but slower one depending on your use cases." />
  <row Id="6623" PostHistoryTypeId="2" PostId="3387" RevisionGUID="704acfb4-f90b-427e-9ad3-3ea9c10938be" CreationDate="2010-08-31T05:21:39.077" UserId="1738" Text="Big-O notation is by definition asymptotic complexity - i.e., it shows how time scales when N (or whatever variables you have) gets &quot;very&quot; large.  To re-iterate on Tetrad's comment (which I upped) &quot;data is king&quot;.  If N is &quot;very large&quot; in your specific situation, it matters, if N is &quot;very small&quot; it doesn't matter.  Experience and practice will give you a feel for how to quantify &quot;very large&quot; and &quot;very small&quot;.&#xD;&#xA;&#xD;&#xA;Obviously, always profile first, and optimize last (unless you are doing a feature feasibility study)." />
  <row Id="6624" PostHistoryTypeId="5" PostId="3383" RevisionGUID="2d276a82-d768-4dd5-9044-1b543f74a770" CreationDate="2010-08-31T06:02:35.390" UserId="1312" Comment="added 1 characters in body" Text="What Linux Game Engines are out there?.  Name, link, and intended use." />
  <row Id="6625" PostHistoryTypeId="2" PostId="3388" RevisionGUID="662627bd-cb3b-400e-b476-191631cbe77a" CreationDate="2010-08-31T06:07:22.123" UserId="1931" Text="For City of Heroes, we were lucky enough to have a community of fans who were very excited to give us feedback on the game, but having a pool of people you trust to give feedback is very important.&#xD;&#xA;&#xD;&#xA;I'd usually roll things out to as few people as possible because getting a few hundred people reporting the same bug is a waste of time. Once you started to get around a thousand people betaing, the noise outweighed the value so it was almost a promo at that point (we never had the heart to boot people from the beta and forums).&#xD;&#xA;&#xD;&#xA;Analyze feedback. This is important and time consuming. Make sure you have feedback gathering mechanisms in place. Forums work well, but instrumenting your code is important too. This can take a lot of time, and you usually think of the most important questions to ask after you wish you'd instrumented.&#xD;&#xA;&#xD;&#xA;Another easy mistake to make is rolling buggy stuff out. It is a complete waste to show anything to people if you know it is broken. Even when you think it is solid, hallway playtest with a single person (or small group) and just watch them play. Right now that's all I need for Neverwinter, when I start to get lots of conflicting advice and I'm unsure of what to do next I'll start rolling it out to more people.&#xD;&#xA;&#xD;&#xA;Finally, (and a little off-topic, sorry!) trust your gut and your vision. People are great at telling you *something* is wrong, but you almost never want to listen to their suggestions. You understand the big picture better than they do.&#xD;&#xA;&#xD;&#xA;good luck!" />
  <row Id="6626" PostHistoryTypeId="5" PostId="3383" RevisionGUID="cd35662c-ee52-4d50-befd-cadce46e981c" CreationDate="2010-08-31T06:27:26.227" UserId="450" Comment="removed . after ?" Text="What Linux Game Engines are out there? Name, link, and intended use." />
  <row Id="6627" PostHistoryTypeId="2" PostId="3389" RevisionGUID="139ecc69-abc6-4554-a4d5-d5b2362fa06a" CreationDate="2010-08-31T07:15:24.693" UserId="323" Text="It can be handy, but it can also be irrelevant. Take, for example, my most recent game, which is something of a Smash TV clone. Top-down game, monsters pour in from the sides, you shoot them.&#xD;&#xA;&#xD;&#xA;Now there's a lot of clever ways to determine collisions. You can use KDtrees to partition out the space so you're not testing bullets against monsters that they couldn't possibly hit. And, sure, I could have been clever, and I could have done that.&#xD;&#xA;&#xD;&#xA;But I was feeling lazy so I just compared every bullet against every monster. Even in the most hectic situations, the collision code was using far less than 10% of the game CPU at 60fps. Big-O: Unimportant.&#xD;&#xA;&#xD;&#xA;Similarly, I had a 4x-style game where you built cities on islands, and sometimes the cities got destroyed. I could have been clever and tried to subtract the city's income from the income variables. But I didn't. I just wiped out the income and recalculated it from scratch every time something changed. Totally irrelevant in terms of CPU.&#xD;&#xA;&#xD;&#xA;Big-O is just as important in games as it is in anything: that is to say, utterly unimportant, right up until it becomes critical.&#xD;&#xA;&#xD;&#xA;Go write some code. If it's too slow, then profile it." />
  <row Id="6628" PostHistoryTypeId="2" PostId="3390" RevisionGUID="b6241956-030a-4797-a401-48f3e9ce2b59" CreationDate="2010-08-31T07:17:39.180" UserId="323" Text="I'm not sure what you mean by &quot;rendering algorithm&quot;. The modern 2D rendering algorithm is &quot;you feed some quads into OpenGL, and if the rendering is kind of slow, you sort them by texture first, and if they're transparent, you sort them by order before any of that&quot;. I don't know of any platform with a different process - at least, without getting into game-specific techniques." />
  <row Id="6629" PostHistoryTypeId="2" PostId="3391" RevisionGUID="0dc65edd-3659-4819-96f7-e849b7c4123e" CreationDate="2010-08-31T07:38:00.380" UserId="1750" Text="In the real world only raw performance counts. Now, the Big-O of an algorithm might serve as a first indication of what to use, but depending on the hardware the implementation might be terribly inefficient. For example doing a linear search can often be faster then a binary search because you get linear memory access and no branches. &#xD;&#xA;&#xD;&#xA;Also, because of the current direction in multi-threaded platforms and architectures, Big-O is losing a lot of significance as it's only taking into account the vertical scalability of memory or data touches per operation instead of also taking into account into how the algorithm scales with a larger number of threads." />
  <row Id="6630" PostHistoryTypeId="2" PostId="3392" RevisionGUID="411d66e8-5e3c-43f0-8798-a32395294c52" CreationDate="2010-08-31T07:56:48.637" UserId="1279" Text="At first glance many consoles support the same OpenGL-like interface where you throw triangles at the hardware and it figures out how to do it best. In real life each hardware has been optimized for certain uses and modifying *how* you throw your triangles at it can make a difference.&#xD;&#xA;&#xD;&#xA;For instance, the iPhone uses a deferred tile renderer, where the driver collects triangles until a certain limit, then renders them in small tiles (see http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html). For the iPhone you should research building texture atlases, since texture unit switches are not free. You can also disable the depth buffer and also lower the graphic resolution from 32bit to 16bit to reduce memory consumption.&#xD;&#xA;&#xD;&#xA;I've heard that Gameboy-like hardware uses a more explicit tile renderer which you have to get at it at the low level to get good performance and is hard to do properly. PS3 consoles are multi-core, so there your algorithms work best if you are able to parallelize our load, I wonder how the PSP does in comparison, apparently it's between PS1 and PS2 tech level.&#xD;&#xA;&#xD;&#xA;Then there are OpenGL characteristics which may be used, abused or underutilized. In the case of the iPhone one would be Vertex Buffer Objects, advertised as the best thing since sliced bread, but in practice worthless (http://www.idealbinary.com/ib/blog/kevin/2010/1/12/iphone-opengl-es-performance). Again, from personal experience I found that the iPhone hardware is very much bandwidth limited. If you want to darken the screen, you could create a srite the whole size of the screen with translucency and blit it on the screen. Don't do it! It's better to create a smallish 4x4 sprite and let the hardware stretch it to the full size. The hardware has less pixels to read from the source, and that is faster than the stretching operation itself, which would be slow to do in software.&#xD;&#xA;&#xD;&#xA;Long ago I played with GPX2 hardware but not at the lower level, so I don't know about more mobile consoles. But most definitely, each mobile platform can use fine tuning, so unless you specify more your question it is going to be tough to answer it." />
  <row Id="6631" PostHistoryTypeId="5" PostId="3385" RevisionGUID="06400040-dad3-4435-ac3b-964aeb0a8084" CreationDate="2010-08-31T08:12:23.987" UserId="1957" Comment="added 23 characters in body" Text="Which 2d rendering algorithms are popular for mobile game engines (specifically Android) and why? Are the same ones for the desktop and/or console world as effective here?" />
  <row Id="6632" PostHistoryTypeId="2" PostId="3393" RevisionGUID="74cb45c7-50f4-43f8-8b3e-40d785612f65" CreationDate="2010-08-31T09:42:36.110" UserId="1156" Text="It shouldn't be the be-all and end-all. But it does help sort out obvious issues which could cause performance hits; why use something in O(n^2) time, when you can do the same thing in O(log n) time?&#xD;&#xA;&#xD;&#xA;I think it applies to games more than most other industries, since the market is the one who would most notice speed problems. Someone using a word processor won't care if there is a half-second delay for doing action X, but gamers will probably go 'omg omg game Y is so slow it takes ages to do action Z'." />
  <row Id="6633" PostHistoryTypeId="2" PostId="3394" RevisionGUID="cc640da4-aa08-4fa7-ba8d-a30f5765fe17" CreationDate="2010-08-31T09:49:09.590" UserId="1156" Text="I would've gone for the asset manager having a stack of data it needs to load. If there's an easy way to go about it, there's the option of adding to a size counter as you add elements to the stack - this means you could increase varyingly. So instead of a large texture and a quick sound effect both increasing loading by 10% say, it could increase by 13% and 2%, for example.&#xD;&#xA;&#xD;&#xA;Then pop off each piece of data as you load, handling errors and the like, and increase the amount of bar visible.&#xD;&#xA;&#xD;&#xA;I think that there's nothing wrong with that way, but I'm pretty sure someone would be able to give something more complex around here. :P&#xD;&#xA;" />
  <row Id="6634" PostHistoryTypeId="2" PostId="3395" RevisionGUID="5d9b8f09-52eb-43a7-871d-364e4408d20f" CreationDate="2010-08-31T10:14:08.740" UserId="1959" Text="HI All,&#xD;&#xA;&#xD;&#xA;I am just a new candidate who is going to work upon the unity 3d game engine so Guys i need some help to get some good tutorials where i can learn the moving characters , effects, and creating the surroundings .Is there i can get some links or pdf by whcih i can learn unity in a little time.&#xD;&#xA;&#xD;&#xA;Thanks !!!" />
  <row Id="6635" PostHistoryTypeId="1" PostId="3395" RevisionGUID="5d9b8f09-52eb-43a7-871d-364e4408d20f" CreationDate="2010-08-31T10:14:08.740" UserId="1959" Text="Start work Unity 3d " />
  <row Id="6636" PostHistoryTypeId="3" PostId="3395" RevisionGUID="5d9b8f09-52eb-43a7-871d-364e4408d20f" CreationDate="2010-08-31T10:14:08.740" UserId="1959" Text="&lt;unity&gt;" />
  <row Id="6637" PostHistoryTypeId="2" PostId="3396" RevisionGUID="3af553fc-a997-49a6-9081-f1bd5ec171a0" CreationDate="2010-08-31T10:38:45.723" UserId="1742" Text="Big O matters most of the time, but sometimes an apparently &quot;worse&quot; algorithm in theory turns out to be much faster in practice.&#xD;&#xA;&#xD;&#xA;Check out a great example from Tony Albrecht:&#xD;&#xA;http://seven-degrees-of-freedom.blogspot.com/2010/07/question-of-sorts.html&#xD;&#xA;&#xD;&#xA;You find this all over the place in games development where the number of items in the operation is either so large that a very different algorithm is quicker, or so small that a dumber algorithm is sufficient (or fits in cache so well it overrides the efficiency of the *better* algorithm).&#xD;&#xA;&#xD;&#xA;The problem with Big O is that it's a generic designation of complexity of the task and doesn't take into account the complexity of modern target hardware, nor does it offer any insight into the setup time overhead.&#xD;&#xA;&#xD;&#xA;In many cases, the best optimal solution is two step. In practice, games developers tend to tend towards low O algorithms but balanced against cost in time developing, or debugging. Once you have a reasonable solution you always have to look at how the hardware is handling the task, and how to let the hardware get more done in less time." />
  <row Id="6638" PostHistoryTypeId="2" PostId="3397" RevisionGUID="60a49597-cbff-4046-992c-96d4be9f0dd8" CreationDate="2010-08-31T10:44:08.347" UserId="350" Text="If you already know basic programming, go there:&#xD;&#xA;http://unity3dstudent.com/" />
  <row Id="6639" PostHistoryTypeId="5" PostId="3389" RevisionGUID="2c4844b5-03f8-42df-8ffa-47311872def7" CreationDate="2010-08-31T11:34:43.157" UserId="323" Comment="added 17 characters in body" Text="It can be handy, but it can also be irrelevant. Take, for example, my most recent game, which is something of a Smash TV clone. Top-down game, monsters pour in from the sides, you shoot them.&#xD;&#xA;&#xD;&#xA;Now there's a lot of clever ways to determine collisions. You can use KDtrees to partition out the space so you're not testing bullets against monsters that they couldn't possibly hit. And, sure, I could have been clever, and I could have done that.&#xD;&#xA;&#xD;&#xA;But I was feeling lazy so I just compared every bullet against every monster. Even in the most hectic situations, the collision code was using far less than 10% of the game CPU at 60fps. Big-O: Unimportant.&#xD;&#xA;&#xD;&#xA;Similarly, I had a 4x-style game where you built cities on islands, and sometimes the cities got destroyed. I could have been clever and tried to subtract the destroyed city's income from the income variables. But I didn't. I just wiped out the income and recalculated it from scratch every time something changed. Totally irrelevant in terms of CPU.&#xD;&#xA;&#xD;&#xA;Big-O is just as important in games as it is in everything else: that is to say, utterly unimportant, right up until it becomes critical.&#xD;&#xA;&#xD;&#xA;Go write some code. If it's too slow, then profile it." />
  <row Id="6640" PostHistoryTypeId="2" PostId="3398" RevisionGUID="026d55d2-489d-47b4-a934-feafc504b187" CreationDate="2010-08-31T11:52:18.963" UserId="1156" Text="[Linux Forums 'Good Free Game Engine'][1]   &#xD;&#xA;[Yahoo Answers 'Popular Linux Game Engine'][2]  &#xD;&#xA;[Linux Today, 16 Best Free Game Engines][3]  &#xD;&#xA;[Game Programming Wiki, List OF Game Engines][4]&#xD;&#xA;&#xD;&#xA;You'd be surprised what you can achieve with a&#xD;&#xA;[google search][5]. ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.linuxforums.org/forum/linux-programming-scripting/57964-good-free-game-engine.html&#xD;&#xA;  [2]: http://answers.yahoo.com/question/index?qid=20071119191536AAIRXDX&#xD;&#xA;  [3]: http://www.linuxtoday.com/news_story.php3?ltsn=2010-05-11-019-35-OS-GM&#xD;&#xA;  [4]: http://gpwiki.org/index.php/Game_Engines&#xD;&#xA;  [5]: http://www.google.co.uk/#hl=en&amp;source=hp&amp;q=linux+game+engines&amp;aq=f&amp;aqi=g1&amp;aql=&amp;oq=&amp;gs_rfai=&amp;fp=2b38767f5e770f58" />
  <row Id="6641" PostHistoryTypeId="16" PostId="3398" RevisionGUID="026d55d2-489d-47b4-a934-feafc504b187" CreationDate="2010-08-31T11:52:18.963" UserId="-1" />
  <row Id="6642" PostHistoryTypeId="2" PostId="3399" RevisionGUID="2e3f7e04-9c12-405e-a4d5-09e6d5fbbc0a" CreationDate="2010-08-31T12:03:04.527" UserId="1134" Text="When I'm coding in-engine, I'm often only concerned with a fixed `n`: I've already got a spacial partition limiting the number of objects receiving `update()`, `physics()`, and `render()` to approximately those on screen and surrounding areas.  The maximum batch size is usually pretty well-defined per-game, although it invariably is a little bit larger than you've planned.&#xD;&#xA;&#xD;&#xA;In this case I'm not as much concerned with `O(n)` as I am concerned with the constant factor multiplier and lower-order terms.  For a function with runtime like `a*n^2 + b*n + c` (which is `O(n^2)`), I'm often much more concerned with reducing `a` and possibly eliminating `c`.  A setup or teardown cost `c` may become proportionally large vs. a small `n`.&#xD;&#xA;&#xD;&#xA;However, this is not to say that big-O (or more particularly [big-theta][1]) is a great code smell indicator.  See an `O(n^4)` somewhere, or worse yet an `O(k^n)` geometric time, and it's time to make sure you're considering other options.&#xD;&#xA;&#xD;&#xA;I'm generally much more concerned about big-O optimality and jumping through hoops to find algorithms with lower big-O when I'm dealing with data make tools.  While the number of objects in a given level/streaming area generally is well-defined, the total number of objects/art assets/configuration files/etc across an entire game may not be.  It's also a lot larger number.  Even running a parallel data make, we still wait on the order of a minute (I know, whine whine -- data make for consoles can take hours -- we're mostly small handheld games) to go through a `jam data-clean &amp;&amp; jam data` cycle.&#xD;&#xA;&#xD;&#xA;To give a specific example: this got really out of hand with a background tile-streaming algorithm that streams 8x8 256-color tiles.  It's useful to share streaming buffers between background &quot;layers&quot;, and we might have up to 6 of them in a given level sharing the same buffer.  The problem is that estimating the size of the buffer needed is based on the possible positions of all 6 layers -- and if they're a prime-number width/height/scroll rate, you quickly start getting into an exhaustive search -- which starts approaching `O(6^numTiles)` -- which is in the &quot;longer than the universe will be around&quot; category in many cases.  Fortunately most cases are just 2-3 layers, but even then, we're up above half an hour runtime.  At the moment, we sample a very small subset of these possibilities, increasing granularity until a set amount of time has passed (or we've completed the task, which may happen for small double-layer configurations).  We bump this estimate up a bit based on prior statistics of how often we've been proved wrong, and then add a bit of extra padding for good measure.&#xD;&#xA;&#xD;&#xA;One other fun example: on a PC game a while back, the lead engineer experimented for a while with [skip lists][2].  The memory overhead ends up causing more cache effects, which adds a sort of non-constant multiplier to the whole affair -- so they're really not a good choices at all for small `n`.  But for larger sorted lists where searches are frequent, they provide a benefit.&#xD;&#xA;&#xD;&#xA;(I often find that the naive algorithm is higher big-O, faster on smaller sets, and easier to understand; the more interesting/complex ones (e.g. patricia trie) are harder for people to understand and maintain, but higher performance on larger sets.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/en/wiki/Big_O_notation#Related_asymptotic_notations&#xD;&#xA;  [2]: https://secure.wikimedia.org/wikipedia/en/wiki/Skip_list" />
  <row Id="6643" PostHistoryTypeId="5" PostId="3399" RevisionGUID="71a29952-beba-41fc-9737-7fb09812286b" CreationDate="2010-08-31T12:27:09.030" UserId="1134" Comment="added 9 characters in body" Text="When I'm coding in-engine, I'm often only concerned with a fixed `n`: I've already got a spacial partition limiting the number of objects receiving `update()`, `physics()`, and `render()` to approximately those on screen and surrounding areas.  The maximum batch size is usually pretty well-defined per-game, although it invariably is a little bit larger than you've planned.&#xD;&#xA;&#xD;&#xA;In this case I'm not as much concerned with big-O as I am concerned with the constant factor multiplier and lower-order terms.  For a function with runtime like `a*n^2 + b*n + c` (which is `O(n^2)`), I'm often much more concerned with reducing `a` and possibly eliminating `c`.  A setup or teardown cost `c` may become proportionally large vs. a small `n`.&#xD;&#xA;&#xD;&#xA;However, this is not to say that big-O (or more particularly [big-theta][1]) is a great code smell indicator.  See an `O(n^4)` somewhere, or worse yet an `O(k^n)` geometric time, and it's time to make sure you're considering other options.&#xD;&#xA;&#xD;&#xA;I'm generally much more concerned about big-O optimality and jumping through hoops to find algorithms with lower big-O when I'm dealing with data make tools.  While the number of objects in a given level/streaming area generally is well-defined, the total number of objects/art assets/configuration files/etc across an entire game may not be.  It's also a lot larger number.  Even running a parallel data make, we still wait on the order of a minute (I know, whine whine -- data make for consoles can take hours -- we're mostly small handheld games) to go through a `jam data-clean &amp;&amp; jam data` cycle.&#xD;&#xA;&#xD;&#xA;To give a specific example: this got really out of hand with a background tile-streaming algorithm that streams 8x8 256-color tiles.  It's useful to share streaming buffers between background &quot;layers&quot;, and we might have up to 6 of them in a given level sharing the same buffer.  The problem is that estimating the size of the buffer needed is based on the possible positions of all 6 layers -- and if they're a prime-number width/height/scroll rate, you quickly start getting into an exhaustive search -- which starts approaching `O(6^numTiles)` -- which is in the &quot;longer than the universe will be around&quot; category in many cases.  Fortunately most cases are just 2-3 layers, but even then, we're up above half an hour runtime.  At the moment, we sample a very small subset of these possibilities, increasing granularity until a set amount of time has passed (or we've completed the task, which may happen for small double-layer configurations).  We bump this estimate up a bit based on prior statistics of how often we've been proved wrong, and then add a bit of extra padding for good measure.&#xD;&#xA;&#xD;&#xA;One other fun example: on a PC game a while back, the lead engineer experimented for a while with [skip lists][2].  The memory overhead ends up causing more cache effects, which adds a sort of non-constant multiplier to the whole affair -- so they're really not a good choices at all for small `n`.  But for larger sorted lists where searches are frequent, they provide a benefit.&#xD;&#xA;&#xD;&#xA;(I often find that the naive algorithm is higher big-O, faster on smaller data sets, and easier to understand; the more interesting/complex ones (e.g. patricia trie) are harder for people to understand and maintain, but higher performance on larger data sets.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/en/wiki/Big_O_notation#Related_asymptotic_notations&#xD;&#xA;  [2]: https://secure.wikimedia.org/wikipedia/en/wiki/Skip_list" />
  <row Id="6644" PostHistoryTypeId="2" PostId="3400" RevisionGUID="b53b2e38-e7ce-4f43-b04d-38095512cd06" CreationDate="2010-08-31T12:45:19.030" UserId="1628" Text="Always, always spend that little bit extra on consulting a lawyer. Build up a good relationship with your lawyer if you can. I've never taken anyone to court but it's amazing how often running a tiny studio throws minor legal issues your way. How to handle trademark infringements, publishing contracts, hiring contractors... people will screw you if you give them the chance when there's money involved." />
  <row Id="6645" PostHistoryTypeId="16" PostId="3400" RevisionGUID="b53b2e38-e7ce-4f43-b04d-38095512cd06" CreationDate="2010-08-31T12:45:19.030" UserId="-1" />
  <row Id="6646" PostHistoryTypeId="2" PostId="3401" RevisionGUID="d5cf88b2-dad2-4237-adf2-0e59042adcbf" CreationDate="2010-08-31T12:47:02.983" UserId="1960" Text="I am new to game development. I am interested in developing 2D games for the Android platform. What is the best place to start with (i.e) What are the basics and how to proceed? I already have programming experience in Java but don't have any experience with graphics or animation." />
  <row Id="6647" PostHistoryTypeId="1" PostId="3401" RevisionGUID="d5cf88b2-dad2-4237-adf2-0e59042adcbf" CreationDate="2010-08-31T12:47:02.983" UserId="1960" Text="Where do I start?" />
  <row Id="6648" PostHistoryTypeId="3" PostId="3401" RevisionGUID="d5cf88b2-dad2-4237-adf2-0e59042adcbf" CreationDate="2010-08-31T12:47:02.983" UserId="1960" Text="&lt;graphics&gt;&lt;books&gt;&lt;animation&gt;&lt;android&gt;" />
  <row Id="6649" PostHistoryTypeId="4" PostId="3401" RevisionGUID="8997c9e9-3daf-43e6-b1cb-5f3085240ed7" CreationDate="2010-08-31T13:02:57.693" UserId="288" Comment="edited title" Text="How do I get started making Android games?" />
  <row Id="6650" PostHistoryTypeId="2" PostId="3402" RevisionGUID="1c0f6dcf-82fb-4c88-b242-cf3b104886bd" CreationDate="2010-08-31T13:47:58.320" UserId="18" Text="Android might not be the best choice for starting game development because you would be learning several different things at the same time (Android SDK, making games, optimization, different phone models, etc.). Consider making some simple Java games on your computer to get familiar with making games in general; [this tutorial](http://zetcode.com/tutorials/javagamestutorial/) looks like a good place to start. &#xD;&#xA;&#xD;&#xA;Once you're comfortable with both Java and game development, start with the [Android tutorials](http://developer.android.com/resources/tutorials/hello-world.html). The development guide is very useful, in particular you need to know [Android fundamentals](http://developer.android.com/guide/topics/fundamentals.html) and activity life cycle, as well as [graphics](http://developer.android.com/guide/topics/graphics/index.html). Get the [Android samples](http://developer.android.com/resources/samples/get.html) and check out the [Lunar Lander](http://developer.android.com/resources/samples/LunarLander/index.html) and [Snake](http://developer.android.com/resources/samples/Snake/index.html) game samples (there's also [JetBoy](http://developer.android.com/resources/samples/JetBoy/index.html), but that's focused on the JetPlayer).&#xD;&#xA;&#xD;&#xA;The canvas class is actually good enough for most 2D games, but if you need better performance or want to move to 3D graphics later you will have to learn [OpenGL ES](http://en.wikipedia.org/wiki/OpenGL_ES). However, this is beyond the scope of getting started (unless you already know OpenGL)." />
  <row Id="6651" PostHistoryTypeId="10" PostId="3395" RevisionGUID="cdd973fc-c411-452c-9750-7adb0d5c931d" CreationDate="2010-08-31T14:27:49.233" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:465,&quot;DisplayName&quot;:&quot;Kimau&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:678,&quot;DisplayName&quot;:&quot;Ranieri&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="6652" PostHistoryTypeId="5" PostId="3395" RevisionGUID="40c4f946-67f1-4dde-aaf3-d25c6c9873f1" CreationDate="2010-08-31T14:27:49.423" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Best place for learning how to write games in Unity3d](http://gamedev.stackexchange.com/questions/222/best-place-for-learning-how-to-write-games-in-unity3d)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;HI All,&#xD;&#xA;&#xD;&#xA;I am just a new candidate who is going to work upon the unity 3d game engine so Guys i need some help to get some good tutorials where i can learn the moving characters , effects, and creating the surroundings .Is there i can get some links or pdf by whcih i can learn unity in a little time.&#xD;&#xA;&#xD;&#xA;Thanks !!!" />
  <row Id="6653" PostHistoryTypeId="2" PostId="3403" RevisionGUID="730d45f8-563a-45fc-af4e-2fce12cdc19c" CreationDate="2010-08-31T14:38:42.767" UserId="47" Text="If you're already familiar with Android and doing basic UI applications with it, then you'll want to take a look at [this multi-part tutorial][1] that explains drawing graphics to an Android screen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html" />
  <row Id="6654" PostHistoryTypeId="2" PostId="3404" RevisionGUID="bf545e6b-378a-4c5a-8fde-cd5812509774" CreationDate="2010-08-31T14:49:10.023" UserId="1156" Text="For the architectural side of rendering, there's two main ways: having each object render itself, and having a single renderer which renders everything.&#xD;&#xA;&#xD;&#xA;I'm currently aiming for the second idea, for the following reasons:&#xD;&#xA;&#xD;&#xA; - The list can be sorted to only use shaders once. Else each object would have to...*cannot find word* activate? the shader, because it's not sure if it's active. The objects could be sorted and grouped.&#xD;&#xA;&#xD;&#xA; - Easier to swap APIs. With a few macro lines, it can be easy to swap between a DirectX renderer and an OpenGL renderer (not a reason for my project, but still a good point)&#xD;&#xA; - Easier to manage rendering code&#xD;&#xA;&#xD;&#xA;Of course, if anyone has strong recommendations for the first method, I will listen to them.&#xD;&#xA;&#xD;&#xA;But I was wondering how make this work.   &#xD;&#xA;&#xD;&#xA;**First idea**  &#xD;&#xA;The renderer has a list of pointers to the renderable components of each entity, which register themselves on RenderCompoent creation. However, I'm worrying that this may end up as a lot of extra pointer weight. But I can sort the list of pointers every so often.&#xD;&#xA;&#xD;&#xA;  **Second idea**  &#xD;&#xA;The entire list of entities is passed to the renderer each render call. The renderer then sorts the list (each call, or maybe once?) and gets what it wants. That's a lot of passing and/or sorting, however.&#xD;&#xA;&#xD;&#xA;**Other ideas**  &#xD;&#xA;???  &#xD;&#xA;&lt;strike&gt;PROFIT&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;Anyone got ideas? Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6655" PostHistoryTypeId="1" PostId="3404" RevisionGUID="bf545e6b-378a-4c5a-8fde-cd5812509774" CreationDate="2010-08-31T14:49:10.023" UserId="1156" Text="Architecture a for a central renderer rather than self-rendering" />
  <row Id="6656" PostHistoryTypeId="3" PostId="3404" RevisionGUID="bf545e6b-378a-4c5a-8fde-cd5812509774" CreationDate="2010-08-31T14:49:10.023" UserId="1156" Text="&lt;architecture&gt;&lt;language-agnostic&gt;&lt;rendering&gt;" />
  <row Id="6657" PostHistoryTypeId="2" PostId="3405" RevisionGUID="447921ec-fc6f-4ea9-b8b3-f1748ec41671" CreationDate="2010-08-31T15:18:41.850" UserId="1943" Text="Although I did this a couple of times from scratch, still no solution really fits. &#xD;&#xA;&#xD;&#xA;I'm using lua for scripting in my games. Lua holds the &quot;prototypes&quot; of the game elements, that are copied to each entity on it's creation. A prototype represents a class of objects (&quot;Soldier with shotgun&quot;). Also, each prototype may hold event hooks (OnDie, OnSpotEnemy, etc). Clearly it's a prototype, not the object that will be handled. &#xD;&#xA;&#xD;&#xA;So, each time a hook is executed, I need to create an object to represent the calling entity (and any entities it interacts with) *only for the lifetime of a single script execution*. What it means is that a instance of the object lives in lua only for the time needed to run this script.&#xD;&#xA;&#xD;&#xA;Simple execution of this idea wasn't much work -- I used `lightuserdata` to hold the C++ pointer to the entity encapsuled in a `being` class. To access the fields of the C++ object, I overloaded the metatable of `being`. However, the fact that the fields of the object are handled by a metatable practically breaks any reasonable implementation of inheritance.&#xD;&#xA;&#xD;&#xA;I pondered with the usage of normal userdata, but I'm afraid that the dynamic allocation needed to run each script (some of them being ran each tick in the game loop) are going to ruin performance.&#xD;&#xA;&#xD;&#xA;Any suggestions? Or maybe a better solution altogether?" />
  <row Id="6658" PostHistoryTypeId="1" PostId="3405" RevisionGUID="447921ec-fc6f-4ea9-b8b3-f1748ec41671" CreationDate="2010-08-31T15:18:41.850" UserId="1943" Text="Lightweight lua objects vs. inheritance" />
  <row Id="6659" PostHistoryTypeId="3" PostId="3405" RevisionGUID="447921ec-fc6f-4ea9-b8b3-f1748ec41671" CreationDate="2010-08-31T15:18:41.850" UserId="1943" Text="&lt;lua&gt;" />
  <row Id="6660" PostHistoryTypeId="2" PostId="3406" RevisionGUID="66e7acb4-3cae-47e6-b520-ab7a680fdfd8" CreationDate="2010-08-31T15:35:26.273" UserId="259" Text="If your normal userdata solution produces better code, I'd go with that.  Lua is so allocation-heavy anyway that you're probably not going to make a significant performance problem for yourself.  How many entities and events are you going to have anyway? 10s? 100s? You'll probably still be render-bound*.&#xD;&#xA;&#xD;&#xA;And if you do encounter issues, there's ways to mitigate it through the use of different allocators, such as object pools, tiny allocators, and slot allocators.&#xD;&#xA;&#xD;&#xA;Without firm profiler evidence either way, I'd always err on the side of cleaner code.&#xD;&#xA;&#xD;&#xA;`*` warning vast over-generalisation based on knowing nothing about your game" />
  <row Id="6661" PostHistoryTypeId="2" PostId="3407" RevisionGUID="34375867-4230-41f4-b4cc-73d3907de965" CreationDate="2010-08-31T15:35:50.797" UserId="744" Text="Use composition to model properties of complex entities rather than inheritance. More specifically, use a component-based design rather than an inheritance-based design for your entities. Each component has a known metadata table and your entity's metadata table just exposes a list of components.&#xD;&#xA;&#xD;&#xA; - http://gameprogrammingpatterns.com/component.html&#xD;&#xA; - http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA; - And lots of others if you search for &quot;game components&quot;." />
  <row Id="6662" PostHistoryTypeId="2" PostId="3408" RevisionGUID="5661ec5e-2132-457a-9a1d-d2c8cbf57be7" CreationDate="2010-08-31T15:36:05.120" UserId="187" Text="**Third idea**&#xD;&#xA;&#xD;&#xA;Each entity submits an encoded integer key, possibly with an associated value to the renderer for each item to be rendered. The renderer can then sort the keys using any fast integer sorting method, and submit each item to be rendered.&#xD;&#xA;&#xD;&#xA;By encoding the key in the order you want each component sorted, from MSB to LSB, you get the benefits of your second idea with a much faster sorting step.&#xD;&#xA;&#xD;&#xA;There's a huge amount of flexibility here in terms of how you encode your key, from something as minimal as:&#xD;&#xA;&#xD;&#xA;    |MaterialID|Depth|MeshID|&#xD;&#xA;    |         4|   20|      8|  (16 materials, 256 models)&#xD;&#xA;&#xD;&#xA;To a more complex [64-bit key &amp; pointer value][1]:&#xD;&#xA;&#xD;&#xA;    |Fullscreen|Viewport|Layer|Blend|Depth|MaterialID|  :  ptr_to_data&#xD;&#xA;    |         2|       3|    3|    2|   23|        30|&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are several additional benefits to using integer keys; for example, if you have a static section of the scene you can cache the resulting keys and simply re-submit the prepared list (if used often, pre-sort and use a suitable sorting algorithm).&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net/blog/?p=86" />
  <row Id="6663" PostHistoryTypeId="2" PostId="3409" RevisionGUID="57236713-be80-4cf8-90e1-56b3b74db176" CreationDate="2010-08-31T16:12:41.673" UserId="1794" Text="Processing.org is another good place to start for (somewhat simplifier) coding/development before diving into the Android SDK. It works on Max/Windows/Linux and has a [version][1] developed specifically for Android deployment. I highly recommend it - as long as you have an Android phone you can deploy games/apps to your phone that you make with that version of Processing. Hope it helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.processing.org/w/Android#Download" />
  <row Id="6664" PostHistoryTypeId="2" PostId="3410" RevisionGUID="3c317761-ecf6-47f6-84ef-69171edf6b8b" CreationDate="2010-08-31T16:34:26.157" UserId="1965" Text="I started a game studio a few years back. We were all engineers and artists. We didn't have a &quot;business guy&quot; - someone that was more interested in making a business that writing code or drawing pictures. If you want to make an awesome game, I'd suggest getting a job at an existing game company if that's possible. If your cup of tea is making a business please email me I'd love to start a company!" />
  <row Id="6665" PostHistoryTypeId="16" PostId="3410" RevisionGUID="3c317761-ecf6-47f6-84ef-69171edf6b8b" CreationDate="2010-08-31T16:34:26.157" UserId="-1" />
  <row Id="6666" PostHistoryTypeId="4" PostId="3265" RevisionGUID="b410de00-b3a7-4c54-b17c-b07b21e2fd5d" CreationDate="2010-08-31T16:41:56.220" UserId="51" Comment="yay -&gt; yea http://english.stackexchange.com/questions/817/yay-or-nay-yea-or-nay" Text="Premultiplied alpha, yea or nay?" />
  <row Id="6667" PostHistoryTypeId="4" PostId="268" RevisionGUID="51353be9-b938-4db7-a281-d36815bf02f3" CreationDate="2010-08-31T16:43:12.707" UserId="51" Comment="yay -&gt; yea http://english.stackexchange.com/questions/817/yay-or-nay-yea-or-nay" Text="STL for games, yea or nay?" />
  <row Id="6668" PostHistoryTypeId="2" PostId="3411" RevisionGUID="cca1c4c7-3c10-44ea-b0e7-2d4570a008f0" CreationDate="2010-08-31T16:56:18.657" UserId="1965" Text="Big-O analysis is important, but it's not the first thing to think about in game development. Since making games involved lots of complicated code, I'd always recommend **Code Simplicity** as the first criteria for an algorithm. Algorithms with complicated bookkeeping just waste your time.&#xD;&#xA;&#xD;&#xA;I think it's really important that your game always run at 60 fps during development. When you dip below that, the first thing you do is run a profiler. Once you find the bottleneck, you attack it. A lot of the time you need to do non-coding stuff like tell level designers to put less stuff in an area (and give them them tools for that).&#xD;&#xA;&#xD;&#xA;Sometimes you actually identify some code that needs to be sped up. I find this to be fun engineering! I wish I had more opportunities to do this. And of course you want to iterate changing one thing at a time and measuring performance. The tipical problems I find are:&#xD;&#xA;&#xD;&#xA; 1. Make sure you aren't calling new or malloc each frame (this is always the #1 problem)&#xD;&#xA; 2. Reduce work: fewer ray casts, less guys, etc.&#xD;&#xA; 3. Big-O algorithm type problems&#xD;&#xA; 4. Cache coherency: Put stuff in arrays rather than scattered memory&#xD;&#xA; 5. Don't use STL in debug mode. (and you always want debug mode to work)&#xD;&#xA;" />
  <row Id="6669" PostHistoryTypeId="2" PostId="3412" RevisionGUID="3f6fc551-032d-4d7a-b911-9a170d735c38" CreationDate="2010-08-31T17:30:57.550" UserId="1966" Text="In game (and most other) development, we are whining about one extra operation performed per loop:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; array.length; i ++) { /* ... */ }&#xD;&#xA;&#xD;&#xA;vs.&#xD;&#xA;&#xD;&#xA;    for (int i = 0, l = array.length; i &lt; l; i ++) { /* ... */ }&#xD;&#xA;&#xD;&#xA;Most modern games have physics, and you will find the &lt;a href=&quot;http://en.wikipedia.org/wiki/N-body_simulation&quot;&gt;n-body simulation&lt;/a&gt; problem. In a naive algorithm, it's O(n^2), but there is an optimization that makes it &lt;a href=&quot;http://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation&quot;&gt;O(n log n)&lt;/a&gt; (but sacrifices some accuracy).&#xD;&#xA;&#xD;&#xA;You could say, you are not programming gravity and particle interactions, but what about the team behavior of an army (of zombies) where they move dependent on others locations (in a more specific word: swarming)?&#xD;&#xA;&#xD;&#xA;In a conventional collision detection algorithm, the time complexity is O(n^2), like the n-body. However, there is a better way: Separate the world to many small parts so only objects inside same part are collision- detected. See http://www.videotutorialsrock.com/opengl_tutorial/collision_detection/text.php .&#xD;&#xA;" />
  <row Id="6670" PostHistoryTypeId="5" PostId="3412" RevisionGUID="60d52947-8fc8-44db-90d5-557f2a53b394" CreationDate="2010-08-31T17:37:56.327" UserId="1966" Comment="added 358 characters in body" Text="In game (and most other) development, we are whining about one extra operation performed per loop:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; array.length; i ++) { /* ... */ }&#xD;&#xA;&#xD;&#xA;vs.&#xD;&#xA;&#xD;&#xA;    for (int i = 0, l = array.length; i &lt; l; i ++) { /* ... */ }&#xD;&#xA;&#xD;&#xA;Most modern games have physics, and you will find the &lt;a href=&quot;http://en.wikipedia.org/wiki/N-body_simulation&quot;&gt;n-body simulation&lt;/a&gt; problem. In a naive algorithm, it's O(n^2), but there is an optimization that makes it &lt;a href=&quot;http://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation&quot;&gt;O(n log n)&lt;/a&gt; (but sacrifices some accuracy).&#xD;&#xA;&#xD;&#xA;You could say, you are not programming gravity and particle interactions, but what about the team behavior of an army (of zombies) where they move dependent on others locations (in a more specific word: swarming)?&#xD;&#xA;&#xD;&#xA;In a conventional collision detection algorithm, the time complexity is O(n^2), like the n-body. However, there is a better way: Separate the world to many small parts so only objects inside same part are collision- detected. See http://www.videotutorialsrock.com/opengl_tutorial/collision_detection/text.php .&#xD;&#xA;&#xD;&#xA;If you program OpenGL games in slow languages like Python and such, please analyze number-crunching part of the game that have non-constant growth in time, like rendering map objects and the problem above. Do not implement matrix calculation in Python while OpenGL has it (I think it does?). Main menu programming that have a constant running time is OK.&#xD;&#xA;" />
  <row Id="6671" PostHistoryTypeId="5" PostId="3412" RevisionGUID="f1edd34f-4023-4e16-8e3e-c4511435ae4f" CreationDate="2010-08-31T17:42:59.663" UserId="1966" Comment="deleted 158 characters in body" Text="In game (and most other) development, we are whining about one extra operation performed per loop:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; array.length; i ++) { /* ... */ }&#xD;&#xA;&#xD;&#xA;vs.&#xD;&#xA;&#xD;&#xA;    for (int i = 0, l = array.length; i &lt; l; i ++) { /* ... */ }&#xD;&#xA;&#xD;&#xA;Most modern games have physics, and you will find the &lt;a href=&quot;http://en.wikipedia.org/wiki/N-body_simulation&quot;&gt;n-body simulation&lt;/a&gt; problem. In a naive algorithm, it's O(n^2), but there is an optimization that makes it &lt;a href=&quot;http://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation&quot;&gt;O(n log n)&lt;/a&gt; (but sacrifices some accuracy).&#xD;&#xA;&#xD;&#xA;You could say, you are not programming gravity and particle interactions, but what about the team behavior of an army (of zombies) where they move dependent on others locations (in a more specific word: swarming)?&#xD;&#xA;&#xD;&#xA;In a conventional collision detection algorithm, the time complexity is O(n^2), like the n-body. However, there is a better way: Separate the world to many small parts so only objects inside same part are collision- detected. See http://www.videotutorialsrock.com/opengl_tutorial/collision_detection/text.php .&#xD;&#xA;&#xD;&#xA;If you game is scriptable, do NOT make the scripter write O(n^2) (and up) number-crunching algorithms in the script, such as searching the user's bag. Make a built-in function in the code instead.&#xD;&#xA;" />
  <row Id="6672" PostHistoryTypeId="2" PostId="3413" RevisionGUID="48b83aea-50d2-43d6-ae3a-f4a6bd834c67" CreationDate="2010-08-31T17:44:35.783" UserDisplayName="Donald" Text="Let's say I want to make a character (an animal) with a stick in its mouth.&#xD;&#xA;&#xD;&#xA;I dont understand if the animation (done in Blender) should have the stick in its mouth or if it should be done in Unity/Shiva, etc.&#xD;&#xA;&#xD;&#xA;Is there any place where I can read the theory behind it? How shall I do interaction between two objects like an animal eating something?&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="6673" PostHistoryTypeId="1" PostId="3413" RevisionGUID="48b83aea-50d2-43d6-ae3a-f4a6bd834c67" CreationDate="2010-08-31T17:44:35.783" UserDisplayName="Donald" Text="Where should the animation be done?" />
  <row Id="6674" PostHistoryTypeId="3" PostId="3413" RevisionGUID="48b83aea-50d2-43d6-ae3a-f4a6bd834c67" CreationDate="2010-08-31T17:44:35.783" UserDisplayName="Donald" Text="&lt;animation&gt;&lt;unity&gt;" />
  <row Id="6675" PostHistoryTypeId="2" PostId="3414" RevisionGUID="189eae56-7d31-4ded-9381-4627dbb07bd9" CreationDate="2010-08-31T18:08:26.877" UserId="1966" Text="This is a subjective question.&#xD;&#xA;&#xD;&#xA;I had fun in OpenArena and Nexuiz and other storyless open-source shooting games. It's fun because how exciting it is to jump around and pick up frags.&#xD;&#xA;&#xD;&#xA;I also played HeavyGunner, where there is a over 5-page description of the technology and history, and a one-page description of what happened after finished every bosses.&#xD;&#xA;&#xD;&#xA;I also played &lt;a href=&quot;http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=colony+-+armor+games&quot;&gt;Colony&lt;/a&gt;, the story is simple and brief, but it's fun to play online.&#xD;&#xA;&#xD;&#xA;Last, the game of Life (literally), a typical life (including mine), doesn't have a stunning plot like a romance novel have, and a life doesn't even have a clear objective (the objective is subjective: varies from person to person). However, if that game is made, it will become the seller over its realism and complexity and even scientific value.&#xD;&#xA;&#xD;&#xA;I also tried Grand Theft Auto on iPod Touch, I had hours of fun in the demo version, suicide bombing cops and blowing up cars, and I ignored all the missions except the first, mandatory one.&#xD;&#xA;&#xD;&#xA;Pokemon games, it can get boring over full of battles, and the battle mechanic never improved, plus a high learning curve for competitive battling online. The story between generations also follow a fixed template (8 Gyms, a criminal organization, Pokemon League, that's it), it's the Pokedex and the fanbase made them enjoyable.&#xD;&#xA;&#xD;&#xA;I think a good game should have a simple story that does not even require you to read it, and a good gameplay.&#xD;&#xA;&#xD;&#xA;As an English speaker, play a Japanese version of the game, and you will find the difference.&#xD;&#xA;" />
  <row Id="6676" PostHistoryTypeId="16" PostId="3414" RevisionGUID="189eae56-7d31-4ded-9381-4627dbb07bd9" CreationDate="2010-08-31T18:08:26.877" UserId="-1" />
  <row Id="6677" PostHistoryTypeId="2" PostId="3415" RevisionGUID="ac361ce3-5400-41a0-b879-e9ae5e4b8672" CreationDate="2010-08-31T18:12:22.167" UserId="1780" Text="I don't know where you could go to read about it, but the best way to go if you don't intend for the dog to always have the stick in its mouth is to make the stick a separate object, animate the dog as if the stick were in the mouth, and along with the dog have a &quot;locator&quot; for where the stick should be (including its orientation) as the animation progresses.&#xD;&#xA;&#xD;&#xA;It's ok to put the stick in the dog's mouth while you export it, but only if you can do it in such a way that they remain two separate objects for the export.  E.g. in Maya you would reference in the stick, and then your exporter would know not to export referenced geometry." />
  <row Id="6678" PostHistoryTypeId="2" PostId="3416" RevisionGUID="e815b7a7-eff6-4f87-96a4-08e4e9d27f99" CreationDate="2010-08-31T18:43:19.073" UserId="1974" Text="My 2 cents on this is that the STL works just fine. I've been developing a 3D game engine (not AAA quality, but advanced enough - scripted entity types, deferred renderer, integrated Bullet physics) for PC and I have yet to see containers become the main bottleneck. Incorrect 3D API usage and poor algorithms have been the best targets (determined by profiling!) every time I've gone in and tried to eek out a bit more performance." />
  <row Id="6679" PostHistoryTypeId="2" PostId="3417" RevisionGUID="9881d1ab-9d8c-4955-a936-ddb487bc33b7" CreationDate="2010-08-31T18:50:23.577" UserId="1974" Text="You should be able to create a texture (instead of a RenderBuffer) using the GL_DEPTH_STENCIL type. I'm not sure of the exact process for using depth from such a texture in a shader program (which I assume you're using, since you're using FBOs), but the OpenGL spec should specify which color channels get which values (my guess would be that R,G, and B all get set to depth and A gets set to stencil).&#xD;&#xA;&#xD;&#xA;I target OpenGL 3.2 these days, so you may need to verify that texture format is workable for you. I can never remember which versions introduce different features." />
  <row Id="6680" PostHistoryTypeId="5" PostId="3417" RevisionGUID="2e387819-b9d0-4e0b-827d-05517b1c3b4b" CreationDate="2010-08-31T18:57:00.777" UserId="1974" Comment="added 2 characters in body" Text="You should be able to create a texture (instead of a RenderBuffer) using the GL_DEPTH_STENCIL format. I'm not sure of the exact process for using depth from such a texture in a shader program (which I assume you're using, since you're using FBOs), but the OpenGL spec should specify which color channels get which values (my guess would be that R,G, and B all get set to depth and A gets set to stencil).&#xD;&#xA;&#xD;&#xA;I target OpenGL 3.2 these days, so you may need to verify that texture format is workable for you. I can never remember which versions introduce different features." />
  <row Id="6681" PostHistoryTypeId="2" PostId="3418" RevisionGUID="a48db6c3-f7fc-4a0f-af28-4970b8c7953e" CreationDate="2010-08-31T19:09:51.840" UserId="1974" Text="I use premultiplied alpha by default in my engine (the artist can force non-premultiplied in the material definition file, if it's needed for a special effect of some sort)&#xD;&#xA;&#xD;&#xA;Tools, as you've noticed, do not deal well with premultiplied alpha - the artist can set the color and alpha channels totally independently. I've set things up so my artist can create the texture images with non-premul alpha (which seems to be easier on artist brains), and the tool that converts to the engine's texture format multiplies the alpha by default. There's a switch so non-premultiplied can be generated if it's absolutely needed." />
  <row Id="6682" PostHistoryTypeId="5" PostId="3409" RevisionGUID="d05f6ca1-97ea-4220-a13e-55267719d064" CreationDate="2010-08-31T19:55:16.057" UserId="1794" Comment="Spelling" Text="Processing.org is another good place to start for (somewhat simplified) coding/development before diving into the Android SDK. It works on Max/Windows/Linux and has a [version][1] developed specifically for Android deployment. I highly recommend it - as long as you have an Android phone you can deploy games/apps to your phone that you make with that version of Processing. Hope it helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.processing.org/w/Android#Download" />
  <row Id="6683" PostHistoryTypeId="2" PostId="3419" RevisionGUID="d74c8780-1e71-4c4c-a458-6beb5354bfa9" CreationDate="2010-08-31T20:54:06.463" UserId="465" Text="I strongly recommend the [Airplay SDK][1] as it works on windows and deploys to most smart phones. They also have a great Indie license.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.airplaysdk.com/" />
  <row Id="6684" PostHistoryTypeId="5" PostId="3323" RevisionGUID="2fd3c7bb-8292-4793-8c60-3aee78122920" CreationDate="2010-08-31T21:02:31.763" UserId="1232" Comment="added spiel about taking into account post-tessellation normals." Text="dot(CameraViewInv.at, SurfaceNormal) can return &gt; 0.0 even if the the surface is visible. Think of a box whose right side normal is slightly away from the camera - as it's moved to the left of the frustum, it can become visible. &#xD;&#xA;&#xD;&#xA;What avoids this phenomenon is dot(VecFromCameraToSurface, SurfaceNormal).&#xD;&#xA;&#xD;&#xA;Another way is to check the winding of your screen-space vertices (ie. vertices after model, view and projection transform). This is done by checking the sign of the z component of the cross product of two edges on the screen space triangle (or quad). Code is here (not OpenGL specific):&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;// culls CW verts, passes CCW verts. Invert the condition for opposite behavior.&#xD;&#xA;bool shouldCullTriangleScreenSpace(vec2 points[3])&#xD;&#xA;{&#xD;&#xA;  edgeA = points[1] - points[0];&#xD;&#xA;  edgeB = points[2] - points[0];&#xD;&#xA;  return (edgeA.x * edgeB.y - edgeA.y * edgeB.x) &lt; 0.0;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;EDIT: I just wanted to mention an extension to the dot(VecFromCameraToSurface, SurfaceNormal) technique that takes into account post-tessellation extrusion. &#xD;&#xA;&#xD;&#xA;The idea is to precompute some metadata for the patch from the range of post-tessellation normals. First generate an average normal for the patch, and figure out the maximum angle of deviation for all normals on the patch from that normal. &#xD;&#xA;&#xD;&#xA;This can be done like this at precalculation time:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  void getConeAngleForPatch(Patch p, vec3&amp; coneDir, float&amp; cosConeAngle)&#xD;&#xA;  {&#xD;&#xA;    // compute cone direction (average of all normals in the post-tessellation patch)&#xD;&#xA;    vec3 coneDir = 0;&#xD;&#xA;    foreach normal N generated by p&#xD;&#xA;      coneDir += N&#xD;&#xA;    normalize(avg);&#xD;&#xA;    // calculate the cos of the maximum angle between normals N and coneDir&#xD;&#xA;    cosConeAngle = 1.0;&#xD;&#xA;    foreach normal N generated by p&#xD;&#xA;      cosConeAngle = min(cosConeAngle, dot(N, coneDir));&#xD;&#xA;  }&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Then your patch backface culling trick in the shader becomes:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  dot(UnitVecFromCameraToSurface, coneDir) &lt; -cosConeAngle&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;...instead of:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  dot(UnitVecFromCameraToSurface, SurfaceNormal) &lt; 0&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;" />
  <row Id="6685" PostHistoryTypeId="2" PostId="3420" RevisionGUID="f6e76012-b5fc-4cf7-b8d2-33813fbfdd4b" CreationDate="2010-08-31T21:12:16.897" UserId="891" Text="This is a great beginning resource that takes a look at all aspects of path finding in a very easy to digest approach.&#xD;&#xA;&#xD;&#xA;[***Amit’s Notes about Path-Finding***][1]&#xD;&#xA;&#xD;&#xA;&gt; ... Pathfinding addresses the problem of finding a good path from the starting point to the goal―avoiding obstacles, avoiding enemies, and minimizing costs (fuel, time, distance, equipment, money, etc.). Movement addresses the problem of taking a path and moving along it. It’s possible to spend your efforts on only one of these. At one extreme, a sophisticated pathfinder coupled with a trivial movement algorithm ...&#xD;&#xA;&#xD;&#xA;  [1]: http://theory.stanford.edu/~amitp/GameProgramming/" />
  <row Id="6686" PostHistoryTypeId="5" PostId="3183" RevisionGUID="f65c042e-e29a-45e9-b631-6ab27a010220" CreationDate="2010-08-31T21:18:43.203" UserId="1263" Comment="A more appropriate title" Text="Read this Slate [article][1]. In particular, the following struck me:&#xD;&#xA;&#xD;&#xA;&gt; When he looks at video games from a critical distance, Bissell is concerned mainly with their lack of narrative meaning. Games ask us to save the princess, save the country, save the world, save ourselves—but no one plays games to achieve those ends. We play for the puzzle, for the physics, for the sense of being embedded in a fully realized world. Indeed, for me, the &quot;story&quot; usually seems like filler, even in games like Grand Theft Auto and RDR [Red Dead Redemption], whose stories are smarter than the rest of the video-game pack. RDR begins and ends every mission with cleverly scripted movielike &quot;cut scenes&quot; that provide some explanation for why your character is doing what he's doing—but the game also lets you skip the scenes, which I usually elect to do. Thus I can't really explain why my character is doing what he's doing. The real answer is he's doing it because I am making him do it, and I am making him do it only because I am having fun.&#xD;&#xA;&#xD;&#xA;&gt; &quot;This is one of the most suspect things about the game form,&quot; Bissell writes. &quot;A game with an involving story and poor gameplay cannot be considered a successful game, whereas a game with superb gameplay and a laughable story can see its spine bend from the weight of many accolades—and those who praise the latter game will not be wrong.&quot; What's the solution to this quandary? Should games invest more in story, in an attempt to bring us narratives that are on the level of those of the other popular arts? Or should games abandon story—is the video game, as a form, simply incompatible with traditional concepts of narrative, and must game designers instead find other ways to invest their creations with lasting meaning?&#xD;&#xA;&#xD;&#xA;As if Bissell's uncertainty is echoing throughout the game industry, there has arisen a tendency to make many big-budget blockbuster games heavily story-driven. Even Starcraft II has a fairly story-driven campaign.&#xD;&#xA;&#xD;&#xA;Is a game without a high-quality narrative bereft of true value and meaning? Must games have any meaning at all in the literary sense in order to be considered worthwhile forms of entertainment? What about emergent narratives, where the player has a decisive role in determining the plot (ideally much more decisive than we've seen in any games so far released)? If games do not need a higher literary meaning, do they at least need to have some lasting emotional significance for the player?&#xD;&#xA;&#xD;&#xA;Those are just some thoughts that the article raised. The real question can be summed up like this: what is the true *value* of a video game? Is a game to be valued on its dynamic interaction with the player, on its ability to present a narrative in a way other mediums cannot, or on its ability to provide simple pleasure?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.slate.com/id/2256613/pagenum/all/" />
  <row Id="6687" PostHistoryTypeId="4" PostId="3183" RevisionGUID="f65c042e-e29a-45e9-b631-6ab27a010220" CreationDate="2010-08-31T21:18:43.203" UserId="1263" Comment="A more appropriate title" Text="Is story more important or the gameplay more important?" />
  <row Id="6688" PostHistoryTypeId="2" PostId="3421" RevisionGUID="3baf3a74-4acf-4024-9541-aef16922bb8e" CreationDate="2010-08-31T21:31:29.577" UserId="1232" Text="**Have your renderer persistently manage all the renderable data**&#xD;&#xA;&#xD;&#xA;When a new renderable instance is created the renderer passes back a handle. The handle allows the client code to make basic changes to the renderable, eg. make it invisible, change its transform, per instance material properties (eg. alpha) etc.&#xD;&#xA;&#xD;&#xA;Benefits of this architecture as I see them:&#xD;&#xA;&#xD;&#xA;* allows the renderable to remain in a predetermined bucket as determined by it's material/shader properties (see Jason's post for how to possibly classify these buckets) at creation time, not at run-time.&#xD;&#xA;* It also allows the renderer to keep these buckets/lists compact from frame to frame, allowing the renderer to manage the memory footprint of each bucket in a nice coherent way.&#xD;&#xA;* Allows the renderer to gather renderable instances to improve per-draw call overhead using instancing.&#xD;&#xA;* Allows the renderer to double buffer these lists, and dispatch jobs to multiple processors (eg. using DX11 deferred contexts, or asynchronous per-bucket sorting) without revealing the complexity of the implementation to the client code." />
  <row Id="6689" PostHistoryTypeId="2" PostId="3422" RevisionGUID="12bffdd6-7418-4868-9725-f8685ed7e77a" CreationDate="2010-08-31T21:33:25.357" UserId="1970" Text="**When everything is special, nothing is special.**&#xD;&#xA;&#xD;&#xA;Make sure that your level/game has a 'comfortable average' that is fun, but that the attention-grabbing moments can rise above." />
  <row Id="6690" PostHistoryTypeId="16" PostId="3422" RevisionGUID="12bffdd6-7418-4868-9725-f8685ed7e77a" CreationDate="2010-08-31T21:33:25.357" UserId="-1" />
  <row Id="6691" PostHistoryTypeId="2" PostId="3423" RevisionGUID="f64f4aab-1228-45cf-8944-9130c9fa8bbe" CreationDate="2010-08-31T21:39:02.523" UserId="1970" Text="Pathfinding is a pretty solved problem... as mentioned in almost every answer here, some variation on A* is going to be what you use.&#xD;&#xA;&#xD;&#xA;The bigger challenge to me, is how you want to represent your _path_. Using a grid, pathnodes, navmeshes, hierarchical grids or other complex structures, etc.&#xD;&#xA;&#xD;&#xA;I don't have any specific references in mind, but exploring [AIGameDev][1] will give you all kinds of ideas as to what's out there.&#xD;&#xA;&#xD;&#xA;Just remember that each representation has its pros and cons; it's not about finding the 'best one', it's about finding the one that is the best fit for _your gameplay_.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aigamedev.com/search/?tx_ttnews[swords]=pathfinding" />
  <row Id="6692" PostHistoryTypeId="2" PostId="3424" RevisionGUID="9e92709e-5e3f-4ab9-b02a-c2648ddd36ca" CreationDate="2010-08-31T21:54:15.867" UserId="422" Text="[This contest](http://www.html5contest.com/) looks pretty interesting but I'm having some concerns about the wording in the [rules](http://www.html5contest.com/rules):&#xD;&#xA;&#xD;&#xA;`Once submitted, a prize winning Submission becomes the exclusive property of Sponsor and will not be acknowledged or returned.&#xD;&#xA;You expressly agree that by entering into the Contest any rights you may own in respect to a prize winning Submission shall be transferred to Sponsor by means of this Agreement. You shall be obliged to perform any measures necessary in order to vest any intellectual property rights in the name of Sponsor in case required by any law or regulation. In such case, Entrant shall – at Sponsor’s first request – execute any deed or transfer or such other document as required in that effect. For the avoidance of doubt, Sponsor shall have the exclusive right to make any kind of sequels, spinoffs, changes and translating the prize winning Submission in any language , all in relation to the exploitation of the prize winning Submission on any kind of media now known or hereinafter developed, without territorial or time limitations. The responsibility to implement localizations made by Sponsor in up to 19 languages will be that of the developer.`&#xD;&#xA;&#xD;&#xA;So it sounds like they get full IP rights, but I can't read this law stuff. Anybody have any insight? Much appreciated!" />
  <row Id="6693" PostHistoryTypeId="1" PostId="3424" RevisionGUID="9e92709e-5e3f-4ab9-b02a-c2648ddd36ca" CreationDate="2010-08-31T21:54:15.867" UserId="422" Text="Help with legalese for an HTML5 contest" />
  <row Id="6694" PostHistoryTypeId="3" PostId="3424" RevisionGUID="9e92709e-5e3f-4ab9-b02a-c2648ddd36ca" CreationDate="2010-08-31T21:54:15.867" UserId="422" Text="&lt;legal&gt;" />
  <row Id="6695" PostHistoryTypeId="5" PostId="3323" RevisionGUID="bf06eb1f-bd13-40ee-94fc-e511c8cea148" CreationDate="2010-08-31T22:06:47.660" UserId="1232" Comment="fix typo" Text="dot(CameraViewInv.at, SurfaceNormal) can return &gt; 0.0 even if the the surface is visible. Think of a box whose right side normal is slightly away from the camera - as it's moved to the left of the frustum, it can become visible. &#xD;&#xA;&#xD;&#xA;What avoids this phenomenon is dot(VecFromCameraToSurface, SurfaceNormal).&#xD;&#xA;&#xD;&#xA;Another way is to check the winding of your screen-space vertices (ie. vertices after model, view and projection transform). This is done by checking the sign of the z component of the cross product of two edges on the screen space triangle (or quad). Code is here (not OpenGL specific):&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;// culls CW verts, passes CCW verts. Invert the condition for opposite behavior.&#xD;&#xA;bool shouldCullTriangleScreenSpace(vec2 points[3])&#xD;&#xA;{&#xD;&#xA;  edgeA = points[1] - points[0];&#xD;&#xA;  edgeB = points[2] - points[0];&#xD;&#xA;  return (edgeA.x * edgeB.y - edgeA.y * edgeB.x) &lt; 0.0;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;EDIT: I just wanted to mention an extension to the dot(VecFromCameraToSurface, SurfaceNormal) technique that takes into account post-tessellation extrusion. &#xD;&#xA;&#xD;&#xA;The idea is to precompute some metadata for the patch from the range of post-tessellation normals. First generate an average normal for the patch, and figure out the maximum angle of deviation for all normals on the patch from that normal. &#xD;&#xA;&#xD;&#xA;This can be done like this at precalculation time:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  void getConeAngleForPatch(Patch p, vec3&amp; coneDir, float&amp; cosConeAngle)&#xD;&#xA;  {&#xD;&#xA;    // compute cone direction (average of all normals in the post-tessellation patch)&#xD;&#xA;    vec3 coneDir = 0;&#xD;&#xA;    foreach normal N generated by p&#xD;&#xA;      coneDir += N&#xD;&#xA;    normalize(coneDir);&#xD;&#xA;    // calculate the cos of the maximum angle between normals N and coneDir&#xD;&#xA;    cosConeAngle = 1.0;&#xD;&#xA;    foreach normal N generated by p&#xD;&#xA;      cosConeAngle = min(cosConeAngle, dot(N, coneDir));&#xD;&#xA;  }&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Then your patch backface culling trick in the shader becomes:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  dot(UnitVecFromCameraToSurface, coneDir) &lt; -cosConeAngle&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;...instead of:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  dot(UnitVecFromCameraToSurface, SurfaceNormal) &lt; 0&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;" />
  <row Id="6696" PostHistoryTypeId="2" PostId="3425" RevisionGUID="d5ffd4d3-dbe8-41bb-b131-a8a9c39d35e6" CreationDate="2010-08-31T22:30:08.067" UserId="962" Text="&gt; Once submitted, a prize winning&#xD;&#xA;&gt; Submission becomes the exclusive&#xD;&#xA;&gt; property of Sponsor and will not be&#xD;&#xA;&gt; acknowledged or returned.&#xD;&#xA;&#xD;&#xA;If you win, your submission is now theirs, and theirs only.&#xD;&#xA;&#xD;&#xA;&gt;You expressly agree that by entering into the Contest any rights you may own in respect to a prize winning Submission shall be transferred to Sponsor by means of this Agreement.&#xD;&#xA;&#xD;&#xA;They also want all the exclusive rights for everything in the game that you own the rights to.&#xD;&#xA;&#xD;&#xA;&gt;You shall be obliged to perform any measures necessary in order to vest any intellectual property rights in the name of Sponsor in case required by any law or regulation. In such case, Entrant shall – at Sponsor’s first request – execute any deed or transfer or such other document as required in that effect.&#xD;&#xA;&#xD;&#xA;They want you to sign over on paper that they own the property.&#xD;&#xA;&#xD;&#xA;&gt;For the avoidance of doubt, Sponsor shall have the exclusive right to make any kind of sequels, spinoffs, changes and translating the prize winning Submission in any language , all in relation to the exploitation of the prize winning Submission on any kind of media now known or hereinafter developed, without territorial or time limitations.&#xD;&#xA;&#xD;&#xA;For clarification, they really want to completely own your IP, and want exclusive rights to any sequels or anything, and they can basically do what they want with it.&#xD;&#xA;&#xD;&#xA;&gt;The responsibility to implement localizations made by Sponsor in up to 19 languages will be that of the developer.&#xD;&#xA;&#xD;&#xA;If you win you have to translate your game into 19 submissions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, stay away from this unless you are willing to completely loose all rights to what you make." />
  <row Id="6697" PostHistoryTypeId="2" PostId="3426" RevisionGUID="bba0f96b-2ca5-456f-a806-b82f2b844508" CreationDate="2010-09-01T00:47:19.873" UserId="1799" Text="I will preface this by saying I haven't looked a huge amount of game source, nor built much in the way of games.&#xD;&#xA;&#xD;&#xA;But coming from trying to employ 'enterprise' coding practices in web apps, looking at game source code seriously hurts my head:&#xD;&#xA;&quot;What is this view logic doing in with business logic? this needs refactoring... so does this, refactor, refactorrr&quot;&#xD;&#xA;&#xD;&#xA;This worries me as I'm about to start a game project, and I'm not sure whether trying to mvc/tdd the dev process is going to hinder us or help us, as I don't see many game examples that use this or much push for better architectural practices it in the community.&#xD;&#xA;&#xD;&#xA;The following is an extract from a [great article on prototyping games][1], though to me it seemed exactly the attitude many game devs seem to use when writing production game code:&#xD;&#xA;&#xD;&#xA;&gt; Mistake #4: Building a system, not a game&#xD;&#xA;&#xD;&#xA;&gt; ...if you&#xD;&#xA;&gt; ever find yourself working on&#xD;&#xA;&gt; something that isn’t directly moving&#xD;&#xA;&gt; your forward, stop right there. As&#xD;&#xA;&gt; programmers, we have a tendency to try&#xD;&#xA;&gt; to generalize our code, and make it&#xD;&#xA;&gt; elegant and be able to handle every&#xD;&#xA;&gt; situation. We find that an itch&#xD;&#xA;&gt; terribly hard not scratch, but we need&#xD;&#xA;&gt; to learn how. It took me many years to&#xD;&#xA;&gt; realize that it’s not about the code,&#xD;&#xA;&gt; it’s about the game you ship in the&#xD;&#xA;&gt; end.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Don’t write an elegant game component&#xD;&#xA;&gt; system, skip the editor completely and&#xD;&#xA;&gt; hardwire the state in code, avoid the&#xD;&#xA;&gt; data-driven, self-parsing, XML&#xD;&#xA;&gt; craziness, and just code the damned&#xD;&#xA;&gt; thing.&#xD;&#xA;&gt; &#xD;&#xA;&gt; ... Just get stuff on the screen as&#xD;&#xA;&gt; quickly as you can.&#xD;&#xA;&gt; &#xD;&#xA;&gt; And don’t ever, ever, use the argument&#xD;&#xA;&gt; “if we take some extra time and do&#xD;&#xA;&gt; this the right way, we can reuse it in&#xD;&#xA;&gt; the game”. EVER.&#xD;&#xA;&#xD;&#xA;is it because games are (mostly) visually oriented so it makes sense that the code will be weighted heavily in the view, thus any benefits from moving stuff out to models/controllers, is fairly minimal, so why bother?&#xD;&#xA;&#xD;&#xA;I've heard the argument that MVC introduces a performance overhead, but this seems to me to be a premature optimisation, and that there'd more important performance issues to tackle before you worry about MVC overheads (eg render pipeline, AI algorithms, datastructure traversal, etc).&#xD;&#xA;&#xD;&#xA;Same thing regarding TDD. It's not often I see games employing test cases, but perhaps this is due to the design issues above (mixed view/business) and the fact that it's difficult to test visual components, or components that rely on probablistic results (eg operate within physics simulations). &#xD;&#xA;&#xD;&#xA;Perhaps I'm just looking at the wrong source code, but why do we not see more of these 'enterprise' practices employed in game design? Are games really so different in their requirements, or is a people/culture issue (ie game devs come from a different background and thus have different coding habits)? &#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/prototyping-youre-probably-doing-it-wrong" />
  <row Id="6698" PostHistoryTypeId="1" PostId="3426" RevisionGUID="bba0f96b-2ca5-456f-a806-b82f2b844508" CreationDate="2010-09-01T00:47:19.873" UserId="1799" Text="Why are MVC &amp; TDD not employed more in game architecture?" />
  <row Id="6699" PostHistoryTypeId="3" PostId="3426" RevisionGUID="bba0f96b-2ca5-456f-a806-b82f2b844508" CreationDate="2010-09-01T00:47:19.873" UserId="1799" Text="&lt;architecture&gt;&lt;best-practices&gt;&lt;language-agnostic&gt;&lt;project-management&gt;&lt;design-patterns&gt;" />
  <row Id="6700" PostHistoryTypeId="2" PostId="3427" RevisionGUID="5d37513c-6bba-4a87-bafe-ee3eb5c104f6" CreationDate="2010-09-01T01:08:29.107" UserId="189" Text="As the quote says, many programmers make the mistake of (trying to) build a system, not a game. Typically that system keeps ballooning out of control until it's so complex that *theoretically* it can handle anything, but in practicality all you have is a big bundle of code. Or more often, before you even get to a working stage, you are so tangled up in code that doesn't run that you lose focus (if you had any to begin with) and motivation (since nothing is truly working).&#xD;&#xA;&#xD;&#xA;Prototypes and iteration tend to work much better. In the end, a great design might come out of it, but more often something more simple and refined comes out of it. KISS and YAGNI come to mind.&#xD;&#xA;&#xD;&#xA;I personally believe there needs to be a balance. If there's a core mechanic of your game, work on it. You still need to iterate, but you do need to refine it. Hint: organization of your code is not a core mechanic of your game.&#xD;&#xA;&#xD;&#xA;Case in point: Peggle, by PopCap Games. A core mechanic of the game is the ball physics. They perfected it! I'm sure they spent quite a lot of time making sure it was absolutely perfect, because it is what makes the game. But at the same time, I can totally picture an early prototype of their game that maybe just draws sprites to the screen and does some type of more primitive collision detection and bouncing, just to see if the game idea is fun. Then once they found out that shooting a ball can actually be fun, they refined the bouncing of the ball. &lt;sub&gt;(this is all just speculation, of course)&lt;/sub&gt;&#xD;&#xA;&#xD;&#xA;It also depends on your technical requirements, which you should **nail** down early on. The platform that your game runs on should not change, or if it does, you need to know exactly how you plan to allow it to change, no more and no less. Design on that. If you're developing a game for OpenGL, and you don't care about DirectX, then really, **don't care** about it. That means that if it's more convenient for you to have each entity draw itself and not worry about Factories and other design patterns like that, then do that. It's okay, because it meets the requirements. You should not have to change it later, despite what you tell yourself. And really, worst case scenario? Refactor later. It takes time later but it lets you focus on the **now**, getting a working game on one platform even if it means it can't simultaneously and automatically run on your toaster.&#xD;&#xA;&#xD;&#xA;Test driven design, however, is a more opinionated topic. I am of the belief that game developers should do more of it. I also think game developers have some of the most rigorous, tight schedules, and they think they can't afford to spend time on TDD when they just want to get a game going. Also, again with the motivation, TDD is a lot slower and you get to see a lot less of a functioning game (in the beginning at least). This can have serious effects on programmer motivation.&#xD;&#xA;&#xD;&#xA;I think it's also just a general lack of knowledge. I don't think TDD is prevalent in other areas either, but like agile development, I think it's spreading. You might say it's ahead of its time (or maybe not, as the case may be years from now). More important than TDD is &quot;RDD&quot; - Requirements Driven Development. &lt;sub&gt;I just made that up.&lt;/sub&gt; What is your goal? To make a game. Everything else comes second. If you can prove that TDD increases productivity and helps teams reach deadlines, then don't you think everyone would be using it? And maybe that's the case. But right now, our industry is more competitive than ever, there are harder and sooner deadlines, and stuff just needs to work. Construction workers don't build scaffolding first; they lay a foundation, then they raise some walls and floors, and only then do they build selective bits of scaffolding to do specific tasks which scaffolding makes more convenient. I think the same applies to software development.&#xD;&#xA;&#xD;&#xA;Sorry for such a long post. I hope you've gained some bits of wisdom from it. I am just a student, talking about my observations, with very limited industry experience but a lot of reading from industry experts. So take my words with a grain of salt.&#xD;&#xA;&#xD;&#xA;And hey, do what you think will work. You can always change it or scrap it and start over. That's the cool thing about any form of engineering; if at first you don't succeed, try something different. (or something like that :-P ) You're not pouring concrete; software is malleable." />
  <row Id="6701" PostHistoryTypeId="5" PostId="3427" RevisionGUID="7b6cd60a-910c-4c23-9def-8e18204a2dcd" CreationDate="2010-09-01T01:16:03.510" UserId="189" Comment="added 1540 characters in body; added 275 characters in body" Text="As the quote says, many programmers make the mistake of (trying to) build a system, not a game. Typically that system keeps ballooning out of control until it's so complex that *theoretically* it can handle anything, but in practicality all you have is a big bundle of code. Or more often, before you even get to a working stage, you are so tangled up in code that doesn't run that you lose focus (if you had any to begin with) and motivation (since nothing is truly working).&#xD;&#xA;&#xD;&#xA;Prototypes and iteration tend to work much better. In the end, a great design might come out of it, but more often something more simple and refined comes out of it. [KISS][1] and [YAGNI][2] come to mind.&#xD;&#xA;&#xD;&#xA;I personally believe there needs to be a balance. If there's a core mechanic of your game, work on it. You still need to iterate, but you do need to refine it. Hint: organization of your code is not a core mechanic of your game.&#xD;&#xA;&#xD;&#xA;Case in point: Peggle, by PopCap Games. A core mechanic of the game is the ball physics. They perfected it! I'm sure they spent quite a lot of time making sure it was absolutely perfect, because it is what makes the game. But at the same time, I can totally picture an early prototype of their game that maybe just draws sprites to the screen and does some type of more primitive collision detection and bouncing, just to see if the game idea is fun. Then once they found out that shooting a ball can actually be fun, they refined the bouncing of the ball. &lt;sub&gt;(this is all just speculation, of course)&lt;/sub&gt;&#xD;&#xA;&#xD;&#xA;It also depends on your technical requirements, which you should **nail** down early on. The platform that your game runs on should not change, or if it does, you need to know exactly how you plan to allow it to change, no more and no less. Design on that. If you're developing a game for OpenGL, and you don't care about DirectX, then really, **don't care** about it. That means that if it's more convenient for you to have each entity draw itself and not worry about Factories and other design patterns like that, then do that. It's okay, because it meets the requirements. You should not have to change it later, despite what you tell yourself. And really, worst case scenario? Refactor later. It takes time later but it lets you focus on the **now**, getting a working game on one platform even if it means it can't simultaneously and automatically run on your toaster.&#xD;&#xA;&#xD;&#xA;Test driven design, however, is a more opinionated topic. I am of the belief that game developers should do more of it. I also think game developers have some of the most rigorous, tight schedules, and they think they can't afford to spend time on TDD when they just want to get a game going. Also, again with the motivation, TDD is a lot slower and you get to see a lot less of a functioning game (in the beginning at least). This can have serious effects on programmer motivation.&#xD;&#xA;&#xD;&#xA;I think it's also just a general lack of knowledge. I don't think TDD is prevalent in other areas either, but like agile development, I think it's spreading. You might say it's ahead of its time (or maybe not, as the case may be years from now). More important than TDD is &quot;RDD&quot; - Requirements Driven Development. &lt;sub&gt;I just made that up.&lt;/sub&gt; What is your goal? To make a game. Everything else comes second. If you can prove that TDD increases productivity and helps teams reach deadlines, then don't you think everyone would be using it? And maybe that's the case. But right now, our industry is more competitive than ever, there are harder and sooner deadlines, and stuff just needs to work. Construction workers don't build scaffolding first; they lay a foundation, then they raise some walls and floors, and only then do they build selective bits of scaffolding to do specific tasks which scaffolding makes more convenient. I think the same applies to software development.&#xD;&#xA;&#xD;&#xA;Sorry for such a long post. I hope you've gained some bits of wisdom from it. I am just a student, talking about my observations, with very limited industry experience but a lot of reading from industry experts. So take my words with a grain of salt.&#xD;&#xA;&#xD;&#xA;And hey, do what you think will work. You can always change it or scrap it and start over. That's the cool thing about any form of engineering; if at first you don't succeed, try something different. (or something like that :-P ) You're not pouring concrete; software is malleable.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, I've been asking this same type of question and researching these types of design principles for some time. Here are some questions, both here and in Stack Overflow, that you might find relevant:&#xD;&#xA;&#xD;&#xA; - [&quot;How to design a game's software such that it is easy to unit test?&quot;][3]&#xD;&#xA; - [&quot;Component based game engine design&quot;][4]&#xD;&#xA; - [&quot;Any good tutorials or resources for learning how to design a scalable and “component” based game 'framework'?&quot;][5]&#xD;&#xA; - [&quot;Seperation of game- and rendering logic&quot;][6]&#xD;&#xA; - [&quot;Is unit testing viable in game programming?&quot;][7]&#xD;&#xA; - [&quot;Is the MVC design pattern used in commercial computer games&quot;][8]&#xD;&#xA; - [&quot;Do any of you use Scrum for game development?&quot;][9]&#xD;&#xA; - [&quot;Architecture for Game - To couple or not to couple?&quot;][10]&#xD;&#xA; - [&quot;OO game design question&quot;][11]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/KISS_principle&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/YAGNI&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/2921/how-to-design-a-games-software-such-that-it-is-easy-to-unit-test&#xD;&#xA;  [4]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;  [5]: http://stackoverflow.com/questions/2752438/any-good-tutorials-or-resources-for-learning-how-to-design-a-scalable-and-compon&#xD;&#xA;  [6]: http://stackoverflow.com/questions/2756655/seperation-of-game-and-rendering-logic&#xD;&#xA;  [7]: http://stackoverflow.com/questions/2418845/is-unit-testing-viable-in-game-programming&#xD;&#xA;  [8]: http://stackoverflow.com/questions/2210026/is-the-mvc-design-pattern-used-in-commercial-computer-games&#xD;&#xA;  [9]: http://stackoverflow.com/questions/1992194/do-any-of-you-use-scrum-for-game-development&#xD;&#xA;  [10]: http://stackoverflow.com/questions/1044998/architecture-for-game-to-couple-or-not-to-couple&#xD;&#xA;  [11]: http://stackoverflow.com/questions/1145427/oo-game-design-question" />
  <row Id="6702" PostHistoryTypeId="2" PostId="3428" RevisionGUID="ab15420b-9c63-4618-b9c1-b23bb7ff3f28" CreationDate="2010-09-01T01:20:33.303" UserId="1759" Text="[KWIGBO][1] is pretty good.  I'm starting iPhone development using Cocos2D and it's great for that (and more).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://kwigbo.com/" />
  <row Id="6703" PostHistoryTypeId="16" PostId="3428" RevisionGUID="ab15420b-9c63-4618-b9c1-b23bb7ff3f28" CreationDate="2010-09-01T01:20:33.303" UserId="-1" />
  <row Id="6704" PostHistoryTypeId="5" PostId="3427" RevisionGUID="f7f65df8-3664-40b6-8fd1-3261f0c0dfd2" CreationDate="2010-09-01T01:22:11.697" UserId="189" Comment="added 179 characters in body" Text="As the quote says, many programmers make the mistake of (trying to) build a system, not a game. Typically that system keeps ballooning out of control until it's so complex that *theoretically* it can handle anything, but in practicality all you have is a big bundle of code. Or more often, before you even get to a working stage, you are so tangled up in code that doesn't run that you lose focus (if you had any to begin with) and motivation (since nothing is truly working).&#xD;&#xA;&#xD;&#xA;Prototypes and iteration tend to work much better. In the end, a great design might come out of it, but more often something more simple and refined comes out of it. [KISS][1] and [YAGNI][2] come to mind.&#xD;&#xA;&#xD;&#xA;I personally believe there needs to be a balance. If there's a core mechanic of your game, work on it. You still need to iterate, but you do need to refine it. Hint: organization of your code is not a core mechanic of your game.&#xD;&#xA;&#xD;&#xA;Case in point: [Peggle][3], by PopCap Games. A core mechanic of the game is the ball physics. They perfected it! I'm sure they spent quite a lot of time making sure it was absolutely perfect, because it is what makes the game. But at the same time, I can totally picture an early prototype of their game that maybe just draws sprites to the screen and does some type of more primitive collision detection and bouncing, just to see if the game idea is fun. Then once they found out that shooting a ball and watching it bounce can actually be fun, they refined the bouncing of the ball. &lt;sub&gt;(this is all just speculation, of course)&lt;/sub&gt;&#xD;&#xA;&#xD;&#xA;It also depends on your technical requirements, which you should nail down early on (not your game design, just the technical requirements). The platform that your game runs on should not change, or if it should be allowed to change, you need to know exactly the extent that you plan to allow it to change, no more and no less. Design on that. If you're developing a game for OpenGL, and you don't care about DirectX, then really, don't care about it. That means that if it's more convenient for you to have each entity draw itself and not worry about Factories and other design patterns like that, then do that. It's okay, because it meets the requirements. You should not have to change it later, despite what you tell yourself. And really, worst case scenario? Refactor later. It takes time later but it lets you focus on the **now**, getting a working game on one platform even if it means it can't simultaneously and automatically run on your toaster.&#xD;&#xA;&#xD;&#xA;Test driven design, however, is a more opinionated topic. I am of the belief that game developers should do more of it. I also think game developers have some of the most rigorous, tight schedules, and they think they can't afford to spend time on TDD when they just want to get a game going. Also, again with the motivation, TDD is a lot slower and you get to see a lot less of a functioning game (in the beginning at least). This can have serious negative effects on programmer motivation.&#xD;&#xA;&#xD;&#xA;I think it's also just a general lack of knowledge and practice. I don't think TDD is prevalent in other areas either, but like agile development, I think it's spreading. You might say it's ahead of its time (or maybe not, as the case may be years from now). More important than TDD is &quot;RDD&quot; - Requirements Driven Development. &lt;sub&gt;I just made that up.&lt;/sub&gt; What is your goal? To make a game. Everything else comes second. If you can prove that TDD increases productivity and helps teams reach deadlines, then don't you think everyone would be using it? And maybe that's the case. But right now, our industry is more competitive than ever, there are harder and sooner deadlines, and stuff just needs to work. Construction workers don't build scaffolding first; they lay a foundation, then they raise some walls and floors, and only then do they build selective bits of scaffolding to do specific tasks which scaffolding makes more convenient. I think the same applies to software development.&#xD;&#xA;&#xD;&#xA;Sorry for such a long post. I hope you've gained some bits of wisdom from it. I am just a student, talking about my observations, with very limited industry experience but a lot of reading from industry experts. So take my words with a grain of salt.&#xD;&#xA;&#xD;&#xA;And hey, do what you think will work. You can always change it or scrap it and start over. That's the cool thing about any form of engineering; if at first you don't succeed, try something different. (or something like that :-P ) You're not pouring concrete; software is malleable.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, I've been asking this same type of question and researching these types of design principles for some time. Here are some questions, both here and in Stack Overflow, that you might find relevant:&#xD;&#xA;&#xD;&#xA; - [&quot;How to design a game's software such that it is easy to unit test?&quot;][4]&#xD;&#xA; - [&quot;Component based game engine design&quot;][5]&#xD;&#xA; - [&quot;Any good tutorials or resources for learning how to design a scalable and “component” based game 'framework'?&quot;][6]&#xD;&#xA; - [&quot;Seperation of game- and rendering logic&quot;][7]&#xD;&#xA; - [&quot;Is unit testing viable in game programming?&quot;][8]&#xD;&#xA; - [&quot;Is the MVC design pattern used in commercial computer games&quot;][9]&#xD;&#xA; - [&quot;Do any of you use Scrum for game development?&quot;][10]&#xD;&#xA; - [&quot;Architecture for Game - To couple or not to couple?&quot;][11]&#xD;&#xA; - [&quot;OO game design question&quot;][12]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/KISS_principle&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/YAGNI&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Peggle&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/2921/how-to-design-a-games-software-such-that-it-is-easy-to-unit-test&#xD;&#xA;  [5]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;  [6]: http://stackoverflow.com/questions/2752438/any-good-tutorials-or-resources-for-learning-how-to-design-a-scalable-and-compon&#xD;&#xA;  [7]: http://stackoverflow.com/questions/2756655/seperation-of-game-and-rendering-logic&#xD;&#xA;  [8]: http://stackoverflow.com/questions/2418845/is-unit-testing-viable-in-game-programming&#xD;&#xA;  [9]: http://stackoverflow.com/questions/2210026/is-the-mvc-design-pattern-used-in-commercial-computer-games&#xD;&#xA;  [10]: http://stackoverflow.com/questions/1992194/do-any-of-you-use-scrum-for-game-development&#xD;&#xA;  [11]: http://stackoverflow.com/questions/1044998/architecture-for-game-to-couple-or-not-to-couple&#xD;&#xA;  [12]: http://stackoverflow.com/questions/1145427/oo-game-design-question" />
  <row Id="6705" PostHistoryTypeId="5" PostId="3427" RevisionGUID="aace8530-a1a8-4859-ae7d-145153ee7e21" CreationDate="2010-09-01T01:41:12.353" UserId="189" Comment="couple more links, wow" Text="As the quote says, many programmers make the mistake of (trying to) build a system, not a game. Typically that system keeps ballooning out of control until it's so complex that *theoretically* it can handle anything, but in practicality all you have is a big bundle of code. Or more often, before you even get to a working stage, you are so tangled up in code that doesn't run that you lose focus (if you had any to begin with) and motivation (since nothing is truly working).&#xD;&#xA;&#xD;&#xA;Prototypes and iteration tend to work much better. In the end, a great design might come out of it, but more often something more simple and refined comes out of it. [KISS][1] and [YAGNI][2] come to mind.&#xD;&#xA;&#xD;&#xA;I personally believe there needs to be a balance. If there's a core mechanic of your game, work on it. You still need to iterate, but you do need to refine it. Hint: organization of your code is not a core mechanic of your game.&#xD;&#xA;&#xD;&#xA;Case in point: [Peggle][3], by PopCap Games. A core mechanic of the game is the ball physics. They perfected it! I'm sure they spent quite a lot of time making sure it was absolutely perfect, because it is what makes the game. But at the same time, I can totally picture an early prototype of their game that maybe just draws sprites to the screen and does some type of more primitive collision detection and bouncing, just to see if the game idea is fun. Then once they found out that shooting a ball and watching it bounce can actually be fun, they refined the bouncing of the ball. &lt;sub&gt;(this is all just speculation, of course)&lt;/sub&gt;&#xD;&#xA;&#xD;&#xA;It also depends on your technical requirements, which you should nail down early on (not your game design, just the technical requirements). The platform that your game runs on should not change, or if it should be allowed to change, you need to know exactly the extent that you plan to allow it to change, no more and no less. Design on that. If you're developing a game for OpenGL, and you don't care about DirectX, then really, don't care about it. That means that if it's more convenient for you to have each entity draw itself and not worry about Factories and other design patterns like that, then do that. It's okay, because it meets the requirements. You should not have to change it later, despite what you tell yourself. And really, worst case scenario? Refactor later. It takes time later but it lets you focus on the **now**, getting a working game on one platform even if it means it can't simultaneously and automatically run on your toaster.&#xD;&#xA;&#xD;&#xA;Test driven design, however, is a more opinionated topic. I am of the belief that game developers should do more of it. I also think game developers have some of the most rigorous, tight schedules, and they think they can't afford to spend time on TDD when they just want to get a game going. Also, again with the motivation, TDD is a lot slower and you get to see a lot less of a functioning game (in the beginning at least). This can have serious negative effects on programmer motivation.&#xD;&#xA;&#xD;&#xA;I think it's also just a general lack of knowledge and practice. I don't think TDD is prevalent in other areas either, but like agile development, I think it's spreading. You might say it's ahead of its time (or maybe not, as the case may be years from now). More important than TDD is &quot;RDD&quot; - Requirements Driven Development. &lt;sub&gt;I just made that up.&lt;/sub&gt; What is your goal? To make a game. Everything else comes second. If you can prove that TDD increases productivity and helps teams reach deadlines, then don't you think everyone would be using it? And maybe that's the case. But right now, our industry is more competitive than ever, there are harder and sooner deadlines, and stuff just needs to work. Construction workers don't build scaffolding first; they lay a foundation, then they raise some walls and floors, and only then do they build selective bits of scaffolding to do specific tasks which scaffolding makes more convenient. I think the same applies to software development.&#xD;&#xA;&#xD;&#xA;Sorry for such a long post. I hope you've gained some bits of wisdom from it. I am just a student, talking about my observations, with very limited industry experience but a lot of reading from industry experts. So take my words with a grain of salt.&#xD;&#xA;&#xD;&#xA;And hey, do what you think will work. You can always change it or scrap it and start over. That's the cool thing about any form of engineering; if at first you don't succeed, try something different. (or something like that :-P ) You're not pouring concrete; software is malleable.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, I've been asking this same type of question and researching these types of design principles for some time. Here are some questions, both here and in Stack Overflow, that you might find relevant:&#xD;&#xA;&#xD;&#xA; - [&quot;How can you organize the code for a game to fit the MVC pattern?&quot;][4]&#xD;&#xA; - [&quot;How to design a game's software such that it is easy to unit test?&quot;][5]&#xD;&#xA; - [&quot;Component based game engine design&quot;][6]&#xD;&#xA; - [&quot;Any good tutorials or resources for learning how to design a scalable and “component” based game 'framework'?&quot;][7]&#xD;&#xA; - [&quot;Seperation of game- and rendering logic&quot;][8]&#xD;&#xA; - [&quot;Is unit testing viable in game programming?&quot;][9]&#xD;&#xA; - [&quot;Is the MVC design pattern used in commercial computer games&quot;][10]&#xD;&#xA; - [&quot;Is test driven development a normal approach in game development?&quot;][11]&#xD;&#xA; - [&quot;Do any of you use Scrum for game development?&quot;][12]&#xD;&#xA; - [&quot;Architecture for Game - To couple or not to couple?&quot;][13]&#xD;&#xA; - [&quot;OO game design question&quot;][14]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/KISS_principle&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/YAGNI&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Peggle&#xD;&#xA;  [4]: http://stackoverflow.com/questions/555283/how-can-you-organize-the-code-for-a-game-to-fit-the-mvc-pattern&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/2921/how-to-design-a-games-software-such-that-it-is-easy-to-unit-test&#xD;&#xA;  [6]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;  [7]: http://stackoverflow.com/questions/2752438/any-good-tutorials-or-resources-for-learning-how-to-design-a-scalable-and-compon&#xD;&#xA;  [8]: http://stackoverflow.com/questions/2756655/seperation-of-game-and-rendering-logic&#xD;&#xA;  [9]: http://stackoverflow.com/questions/2418845/is-unit-testing-viable-in-game-programming&#xD;&#xA;  [10]: http://stackoverflow.com/questions/2210026/is-the-mvc-design-pattern-used-in-commercial-computer-games&#xD;&#xA;  [11]: http://stackoverflow.com/questions/619634/is-test-driven-development-a-normal-approach-in-game-development&#xD;&#xA;  [12]: http://stackoverflow.com/questions/1992194/do-any-of-you-use-scrum-for-game-development&#xD;&#xA;  [13]: http://stackoverflow.com/questions/1044998/architecture-for-game-to-couple-or-not-to-couple&#xD;&#xA;  [14]: http://stackoverflow.com/questions/1145427/oo-game-design-question" />
  <row Id="6706" PostHistoryTypeId="2" PostId="3429" RevisionGUID="221ee44f-3f2d-40eb-a8b1-58d6c7a82bf0" CreationDate="2010-09-01T01:48:40.027" UserId="1413" Text="Game systems are slowly moving over to better practices. Frameworks like XNA provide an insight into making code more generalized/clean without adding too much overhead in design or execution time. But in general I would say that game systems are all about optimizing complexity vs execution speed, all while staying on a tight development schedule and staying motivated. Applying software engineering concepts and system design is just not priority #1 in such an environment. &#xD;&#xA;&#xD;&#xA;In my personal game projects, I try to comment code or at least make it readable, and I throw together systems that will allow a bit more flex later on (ie generality) as much as possible, but at the end of the day, if you haven't moved your game forward it just doesn't feel very good. &#xD;&#xA;&#xD;&#xA;Also typically by the time you've finished your game, you've got at least 1000 ideas on how to improve the underlying mechanics, the core systems, etc, in such a way that very little of that &quot;re-usable&quot; code will really be usable. By day I work a regular SE job, and while the systems we work on may be massive, in all honestly I think they pale in comparison to the complexity in games." />
  <row Id="6707" PostHistoryTypeId="2" PostId="3430" RevisionGUID="aaf1e794-e842-46a3-beec-2904269deac2" CreationDate="2010-09-01T02:03:09.180" UserId="1204" Text="I am writing a fairly simple breakout-style game for Android phones. I have successfully detected the collisions between the ball(s) and bricks. The problem that I am having is in calculating the new vector for the ball. Even though the bricks are rectangular, I want to treat them as circles for the purpose of introducing more uniqueness to the ball directions. &#xD;&#xA;&#xD;&#xA;I have the center point and vector of the ball and the center point of the brick which it has collided with and need to determine the new vector. The speed of the ball is always constant so the vector will be adjusted to that length but the direction is where I am having issues calculating. I've given it a few shots but they always end up being wildly incorrect.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;The following is the code which I wrote but it has unpredictable results. All of the calculations must be done directly or using any of the methods in the Android SDK without a physics library of any sort.&#xD;&#xA;&#xD;&#xA;    float collisionUnitVectorX = ball.getLocation().x - blockCenterX;&#xD;&#xA;    float collisionUnitVectorY = ball.getLocation().y - blockCenterY;&#xD;&#xA;    final double collisionVectorLength = Math.sqrt(Math.pow(collisionUnitVectorX, 2) + Math.pow(collisionUnitVectorY, 2));&#xD;&#xA;    collisionUnitVectorX /= collisionVectorLength;&#xD;&#xA;    collisionUnitVectorY /= collisionVectorLength;&#xD;&#xA;    &#xD;&#xA;    final double ballVectorLength = Math.sqrt(Math.pow(ball.getVectorX(), 2) + Math.pow(ball.getVectorY(), 2));&#xD;&#xA;    final float ballUnitVectorX = (float)(ball.getVectorX() / ballVectorLength);&#xD;&#xA;    final float ballUnitVectorY = (float)(ball.getVectorY() / ballVectorLength);&#xD;&#xA;    &#xD;&#xA;    ball.setVectorX((float)(collisionUnitVectorX + ballUnitVectorX));&#xD;&#xA;    ball.setVectorY((float)(collisionUnitVectorY + ballUnitVectorY));&#xD;&#xA;&#xD;&#xA;Here is a list of the information that I have for calculation:&#xD;&#xA;&#xD;&#xA; * ball center (x,y)&#xD;&#xA; * ball radius&#xD;&#xA; * ball vector (x,y)&#xD;&#xA; * block center (x,y)&#xD;&#xA;&#xD;&#xA;The calculation should result in a new vector x and y values which has a length equal to the constant `BALL_SPEED`.&#xD;&#xA;&#xD;&#xA;Remember, collision has already been determined, I am only looking for the new vector calculation. Thank you in advance.&#xD;&#xA;&#xD;&#xA;*(accepted answer author will be attributed in game credits)*" />
  <row Id="6708" PostHistoryTypeId="1" PostId="3430" RevisionGUID="aaf1e794-e842-46a3-beec-2904269deac2" CreationDate="2010-09-01T02:03:09.180" UserId="1204" Text="New Vector Calculation for Elastic Collision of Circle and Fixed Rectangle" />
  <row Id="6709" PostHistoryTypeId="3" PostId="3430" RevisionGUID="aaf1e794-e842-46a3-beec-2904269deac2" CreationDate="2010-09-01T02:03:09.180" UserId="1204" Text="&lt;physics&gt;&lt;collision-detection&gt;&lt;java&gt;" />
  <row Id="6710" PostHistoryTypeId="2" PostId="3431" RevisionGUID="7a597030-59f5-40d3-ba67-4567d4ee6f36" CreationDate="2010-09-01T02:41:11.663" UserId="302" Text="(This question was split off from http://gamedev.stackexchange.com/questions/3345/)&#xD;&#xA;&#xD;&#xA;Are there any recommendable middleware available for 2D collision detection?&#xD;&#xA;&#xD;&#xA;I believe I've heard that Box2D could be used for collision detection without the physics part. I'd like to hear if people have any experiences on Box2D or others libraries for 2D collision detection specifically." />
  <row Id="6711" PostHistoryTypeId="1" PostId="3431" RevisionGUID="7a597030-59f5-40d3-ba67-4567d4ee6f36" CreationDate="2010-09-01T02:41:11.663" UserId="302" Text="2D collision-detection middleware" />
  <row Id="6712" PostHistoryTypeId="3" PostId="3431" RevisionGUID="7a597030-59f5-40d3-ba67-4567d4ee6f36" CreationDate="2010-09-01T02:41:11.663" UserId="302" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;middleware&gt;" />
  <row Id="6713" PostHistoryTypeId="5" PostId="3345" RevisionGUID="26ba1459-fea7-424d-af56-237931e74864" CreationDate="2010-09-01T02:42:42.240" UserId="302" Comment="Split the 2D part of the question off into another question." Text="(I've split this question into two. For 2D, see: http://gamedev.stackexchange.com/questions/3431/)&#xD;&#xA;&#xD;&#xA;Are there any recommendable middleware available for 3D collision detection?&#xD;&#xA;&#xD;&#xA;I believe I've heard Bullet has a pretty good 3D collision detection that can be used without the physics engine. I'd like to hear if people have any experiences on Bullet or other libraries for 3D collision detection specifically." />
  <row Id="6714" PostHistoryTypeId="4" PostId="3345" RevisionGUID="26ba1459-fea7-424d-af56-237931e74864" CreationDate="2010-09-01T02:42:42.240" UserId="302" Comment="Split the 2D part of the question off into another question." Text="3D collision-detection middleware" />
  <row Id="6715" PostHistoryTypeId="6" PostId="3345" RevisionGUID="26ba1459-fea7-424d-af56-237931e74864" CreationDate="2010-09-01T02:42:42.240" UserId="302" Comment="Split the 2D part of the question off into another question." Text="&lt;3d&gt;&lt;collision-detection&gt;&lt;middleware&gt;" />
  <row Id="6716" PostHistoryTypeId="2" PostId="3432" RevisionGUID="0d0cae88-9ac1-42d1-953d-076d10cadc17" CreationDate="2010-09-01T02:43:38.293" UserId="469" Text="I had SEVERE issues with Box2D collision detection...&#xD;&#xA;&#xD;&#xA;Mostly, because Box2D collision detect broadphase is a binary tree, everything that use collision (even if they don't use physics) need to update that tree, and then the tree need to be searched back.&#xD;&#xA;&#xD;&#xA;For few objects with bizarre size differences (like a golf ball and a bus), Box2D is acceptable, or even fast, but for various objects of roughly the same size (like you would have in a clone of asteroids, or in a tile-based game, or anything like that) then it behaves extremely slow, even unstable sometimes as it need to write and read massive amounts of data on the tree.&#xD;&#xA;&#xD;&#xA;Chipmunk Physics fix this, they use a spatial hashing thing, that I really don't understand how it work, but it work!" />
  <row Id="6718" PostHistoryTypeId="5" PostId="3374" RevisionGUID="7e342853-a596-4b34-81d2-44c14b6b4095" CreationDate="2010-09-01T04:17:20.333" UserId="891" Comment="added 11 characters in body" Text="In academia worst case **Big O** is taught over everything else.  Compared to space complexity, normal case analysis, simplicity over complexity, etc.&#xD;&#xA;&#xD;&#xA;In particular to game programming and industry, what really matters most and why.&#xD;&#xA;&#xD;&#xA;*References would be very helpful.*" />
  <row Id="6719" PostHistoryTypeId="5" PostId="3425" RevisionGUID="fa78c359-3c48-4fc5-851f-3d7a4ba3fd42" CreationDate="2010-09-01T04:41:20.007" UserId="962" Comment="fixed misspelling" Text="&gt; Once submitted, a prize winning&#xD;&#xA;&gt; Submission becomes the exclusive&#xD;&#xA;&gt; property of Sponsor and will not be&#xD;&#xA;&gt; acknowledged or returned.&#xD;&#xA;&#xD;&#xA;If you win, your submission is now theirs, and theirs only.&#xD;&#xA;&#xD;&#xA;&gt;You expressly agree that by entering into the Contest any rights you may own in respect to a prize winning Submission shall be transferred to Sponsor by means of this Agreement.&#xD;&#xA;&#xD;&#xA;They also want all the exclusive rights for everything in the game that you own the rights to.&#xD;&#xA;&#xD;&#xA;&gt;You shall be obliged to perform any measures necessary in order to vest any intellectual property rights in the name of Sponsor in case required by any law or regulation. In such case, Entrant shall – at Sponsor’s first request – execute any deed or transfer or such other document as required in that effect.&#xD;&#xA;&#xD;&#xA;They want you to sign over on paper that they own the property.&#xD;&#xA;&#xD;&#xA;&gt;For the avoidance of doubt, Sponsor shall have the exclusive right to make any kind of sequels, spinoffs, changes and translating the prize winning Submission in any language , all in relation to the exploitation of the prize winning Submission on any kind of media now known or hereinafter developed, without territorial or time limitations.&#xD;&#xA;&#xD;&#xA;For clarification, they really want to completely own your IP, and want exclusive rights to any sequels or anything, and they can basically do what they want with it.&#xD;&#xA;&#xD;&#xA;&gt;The responsibility to implement localizations made by Sponsor in up to 19 languages will be that of the developer.&#xD;&#xA;&#xD;&#xA;If you win you have to translate your game into 19 different human languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, stay away from this unless you are willing to completely loose all rights to what you make.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Edit: I meant languages. :/*" />
  <row Id="6720" PostHistoryTypeId="2" PostId="3433" RevisionGUID="4322f820-c3fc-4fbd-aa9a-d04ab5791b15" CreationDate="2010-09-01T05:29:23.417" UserId="919" Text="I studied computer engineering before but have been lagging in the technical aspects as of late.&#xD;&#xA;&#xD;&#xA;Seeing as I think it would be to my advantage as a designer to understand how resources are used and calculated. I would like to ask if people here know of methods to compute to a certain degree how much power/resource a design would entail? (i.e. how many polygons per scene, how many AI running, how many physics components, particles etc.)?" />
  <row Id="6721" PostHistoryTypeId="1" PostId="3433" RevisionGUID="4322f820-c3fc-4fbd-aa9a-d04ab5791b15" CreationDate="2010-09-01T05:29:23.417" UserId="919" Text="What is the best approach to resource management in game design?" />
  <row Id="6722" PostHistoryTypeId="3" PostId="3433" RevisionGUID="4322f820-c3fc-4fbd-aa9a-d04ab5791b15" CreationDate="2010-09-01T05:29:23.417" UserId="919" Text="&lt;game-design&gt;&lt;best-practices&gt;" />
  <row Id="6723" PostHistoryTypeId="2" PostId="3434" RevisionGUID="33d2688e-7401-4cbb-badf-ccc8c32052ce" CreationDate="2010-09-01T05:38:01.340" UserId="1923" Text="Here is some pseudo code that will accomplish this. I'm assuming ball vector represents the position change (velocity) of the ball.&#xD;&#xA;&#xD;&#xA;    Vector collisionUnitVector = blockCtr - ball.GetLoc();&#xD;&#xA;    float cuvLength = collisionUnitVector.Length();&#xD;&#xA;    collisionUnitVector /= cuvLength;&#xD;&#xA;        &#xD;&#xA;    Vector Velocity = ball.GetVector();&#xD;&#xA;    float speed = velocity.Length();&#xD;&#xA;    Vector velocityNormal = velocity / speed;&#xD;&#xA;        &#xD;&#xA;    float dotProduct = Dot(collisionUnitVector, velocityNormal);&#xD;&#xA;       &#xD;&#xA;    Vector vFactor = 2 * (-collisionUnitVector * dotProduct * speed);&#xD;&#xA;        &#xD;&#xA;    Vector newVelocity = velocity + vFactor;&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/CRct0.png" />
  <row Id="6724" PostHistoryTypeId="2" PostId="3435" RevisionGUID="96211c8b-95cc-4881-acd5-08c4166079f2" CreationDate="2010-09-01T06:10:22.870" UserId="1931" Text="This is a pretty wide open question. Can you be more specific?&#xD;&#xA;&#xD;&#xA;In my experience, and I'm probably doing it wrong, there is a lot of dead reckoning and adjustment with performance. AI too expensive? run it less often. UI? optimize and hack. etc. So the things that are hard to do this with you have to get right early.&#xD;&#xA;&#xD;&#xA;Graphics budgets tend to be the most important things to get right because they're the most expensive to revisit. Environments are harder than characters. &#xD;&#xA;&#xD;&#xA;If you want to see what other games are doing, I believe PIX will tell you what is going on (there's a windows version). Your have different limitations across different generations of cards as well.&#xD;&#xA;&#xD;&#xA;If you're PC, just make sure you get a min-spec machine, and keep it working on that.&#xD;&#xA;&#xD;&#xA;Also, and maybe in line with what you're asking, I know the God of War guys give each designer a flexible budget for things like RAM, processing, etc. so they can choose what to emphasize for their levels. These are techniques and not solid numbers, but may be useful to you." />
  <row Id="6725" PostHistoryTypeId="5" PostId="3" RevisionGUID="302ae390-f9f6-4097-bb61-f4e71f8bb06e" CreationDate="2010-09-01T07:50:38.710" UserId="259" Comment="fixed A* link" Text="Pathfinding algorithms are basically a graph search problem solving algorithms. &#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Pathfinding#Algorithms&#xD;&#xA;&#xD;&#xA;Most known being Djikstra's algorithm: &lt;a href=&quot;http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm&quot;&gt;http://en.wikipedia.org/wiki/Dijkstra's_algorithm&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;and its variant A* search algorithm: &lt;a href=&quot;http://en.wikipedia.org/wiki/A%2A&quot;&gt;http://en.wikipedia.org/wiki/A*&lt;/a&gt;" />
  <row Id="6726" PostHistoryTypeId="2" PostId="3436" RevisionGUID="07950c7e-6f3c-4521-afee-3f1c20f565b2" CreationDate="2010-09-01T08:21:12.273" UserId="1750" Text="Because MVC doesn't fit in the architecture of a game. The dataflow for a game is entirely different than that of a enterprice application, because it's not as event driven and there is often a (very) tight millisecond budget in which to perform these operations. There are a lot of things that need to happen in 16.6 milliseconds so it's more beneficial to have a 'fixed' and rigid data pipeline that processes the data you need on screen in exactly that time. &#xD;&#xA;&#xD;&#xA;Also, the separation is there; most of the time it's just not wired the same way as the MVC pattern. There is a rendering engine (View), user input handling (Controller) and the rest such as gameplay logic, ai, and physics (Model). Think about it; if you're fetching user input, running the ai and rendering the image 60 times per second, then why would you need an Observer between the model and the view to tell you what has changed? Don't interpret this as me saying that you don't need the Observer pattern in games, you do, but in this case you really don't. You're doing all that work, every frame, anyway.&#xD;&#xA;&#xD;&#xA;Although TDD is hardly ever used in development studios, we do use Agile practices towards software development and SCRUM seems to be the popular choice at least here in Europe. The reason is simple, the changes come from everywhere. The artists might want more texture budget, larger worlds, more trees while the designers want a richer story (more content on disk), a streaming world and the publishers want you to finish on time, and on budget and so does the marketing department. And apart from that, the &quot;state of the art&quot; keeps changing rapidly.&#xD;&#xA;&#xD;&#xA;That doesn't mean that we don't do testing either, most studios have large Q&amp;A departments, run loads of regression tests and do unit tests on a regular basis. However, there's hardly any point doing unit tests upfront because a large part of the bugs are art/graphics related (holes in collision meshes, wrong textures whatever, glitch in the depth of field shader) that unit tests can't cover. And besides working code, the most important factor of **any** game is that it's fun, and there's no unit testing that." />
  <row Id="6727" PostHistoryTypeId="2" PostId="3437" RevisionGUID="6473ec61-d298-44c2-94b3-b46b3bb9dc31" CreationDate="2010-09-01T08:30:48.260" UserId="323" Text="In my experience, there's two major ways of doing it.&#xD;&#xA;&#xD;&#xA;1) Dead reckoning. Got someone on-staff who's written that kind of game before? Got someone who has really good instincts? Maybe they can tell you. If you're real lucky, their response will bear at least vague similarity to reality.&#xD;&#xA;&#xD;&#xA;2) Prototype it and find out. The only reliable way.&#xD;&#xA;&#xD;&#xA;There's a third, if you're using a well-established engine in a way that many other people have used that same engine, and not planning on doing anything fancy or out-of-the-ordinary:&#xD;&#xA;&#xD;&#xA;3) See what they did, then do the same thing.&#xD;&#xA;&#xD;&#xA;but that only really works if you're, say, making a first-person shooter with Unreal Engine 3." />
  <row Id="6728" PostHistoryTypeId="2" PostId="3438" RevisionGUID="b6c8b313-c3ed-42e0-b32f-1f04ba74510d" CreationDate="2010-09-01T08:40:08.667" UserId="119" Text="Having built a couple of games using a simple MVC pattern (not a huge framework) I've found the major problem is that your model needs to know about your view. It is very likely that you will need to use either sprite bitmap data, hitbox data or 3D geometry data from your art assets to help work out collision detection (or another similar task). This means each model needs a reference to its view, which breaks the classic MVC pattern - for example you can no longer create a new view to an existing model etc.&#xD;&#xA;&#xD;&#xA;The component model you see in e.g. Unity3D is the best way to organise game code." />
  <row Id="6729" PostHistoryTypeId="2" PostId="3439" RevisionGUID="c91519b7-74c3-4ae5-84a0-7e7107af64b1" CreationDate="2010-09-01T09:12:39.523" UserId="659" Text="If you just want collision detection, and not a full physics engine, it might be worth taking a look at OPCODE - http://www.codercorner.com/Opcode.htm (although it is a bit old now, there may be newer/better things out there?)" />
  <row Id="6730" PostHistoryTypeId="2" PostId="3440" RevisionGUID="5b381f51-fc76-43cd-88bc-c9c69cbb35b9" CreationDate="2010-09-01T09:19:13.227" UserId="744" Text="MVC, at some levels, is already used in game development. It's forced on it by the OS, which has different interfaces for input and graphics. Most games also have a few more instances of MVC in them, e.g. separating the physics and rendering and input threads. This works fine. The modern idea of MVC appears to be that it should be repeated, fractally, until no one can understand the code anymore. Games don't do that, thankfully.&#xD;&#xA;&#xD;&#xA;TDD is not used because it's rarely known a game is &quot;supposed to do&quot; before you iterate on a prototype many times. Practices from TDD, like continuous testing or integration testing, are often used in game development." />
  <row Id="6731" PostHistoryTypeId="2" PostId="3441" RevisionGUID="875cae70-29a0-42d6-ba28-c041b40b805a" CreationDate="2010-09-01T09:26:01.970" UserId="744" Text="Rather than guessing blind, one thing you can do is implement budgeting tools early in development. Get a test machine, get out your budgeting tool, and start seeing where performance falls over. Make the budgeting tool yell at programmers/artists/designers if they go over the limits." />
  <row Id="6732" PostHistoryTypeId="2" PostId="3442" RevisionGUID="343ce8b3-a301-47fd-bca6-13b282642923" CreationDate="2010-09-01T10:13:59.100" UserId="1742" Text="As this question seems to be coming from a designer, my response would be: design isn't about numbers, it's about ideas.&#xD;&#xA;&#xD;&#xA;Don't concentrate on the nitty gritty reality of how many polys you can render per frame. Once you have a design that must be made into a game, you will be able to work with a programmer to write up what gets resources and what gets stripped.&#xD;&#xA;&#xD;&#xA;Real games have limited budgets, and programmers work with designers to provide information about what each feature costs. Poly counts and AI time are features that can be optimized so you can stretch a little, and normally, a programmer can provide an alternative solution that provides the effect the design requires without actually implementing the specified feature that a designer may have assumed was necessary.&#xD;&#xA;&#xD;&#xA;As a designer, your role is to make the best usability model of the game problem. You must iterate through different control layouts or strategies, and try to mentally play through the game numerous times, trying out different progressions. Some designers I've worked with even wrote out paper versions of games they were developing just to see the flow better.&#xD;&#xA;&#xD;&#xA;In Conclusion, don't sweat what isn't your domain, but be prepared to prioritize your features.&#xD;&#xA;" />
  <row Id="6736" PostHistoryTypeId="2" PostId="3444" RevisionGUID="568b8390-5ea5-409c-bb1d-eba97c27f888" CreationDate="2010-09-01T11:59:55.817" UserId="1829" Text="Nowadays, game programming is like a big business-ish, technological, academical, programming havoc. There are dozen of engines, free or not, don't-reinvent-the-wheel dos and don't, plenty of different platform, plenty of game genres, and a lot of languages.&#xD;&#xA;&#xD;&#xA;The video game economy boomed around the 90's (I guess, with the NES etc), and just before that, I wonder how game programmers were doing their job, what languages they used, what was the equivalent of the current &quot;dev kit&quot;, anyways what were those few guys technics and tools to achieve a working game on such tiny computer power ?&#xD;&#xA;&#xD;&#xA;I read that the playstation had only 3MB memory total: besides CD-swapping, how could they achieve to build an executable to hold on 2mb or ram, for complex games like Metal Gear Solid or Vagrant Story ? &#xD;&#xA;&#xD;&#xA;Since I'm young and I missed all that, I have some questions...&#xD;&#xA;&#xD;&#xA;Were game makers only or most programmers ? Why do I think a game programmer who has played a lot, has a more important role that game designers, 3D artists, because they know how a game is really made ?&#xD;&#xA;Since C was invented in the 70, did all programmers use it, or were they forced to use ASM to get the best optimisation ?&#xD;&#xA;Is being a game programmer a safe job (I mean in the job market) ?&#xD;&#xA;Since computers are so freaking fast today, how has the optimisation task changed ? Do we use computer/console power to their maximum, or do we waste it because we can't come up with complex enough gameplay ?" />
  <row Id="6737" PostHistoryTypeId="1" PostId="3444" RevisionGUID="568b8390-5ea5-409c-bb1d-eba97c27f888" CreationDate="2010-09-01T11:59:55.817" UserId="1829" Text="What is the story of game programmers beside gaming history ?" />
  <row Id="6738" PostHistoryTypeId="3" PostId="3444" RevisionGUID="568b8390-5ea5-409c-bb1d-eba97c27f888" CreationDate="2010-09-01T11:59:55.817" UserId="1829" Text="&lt;game-design&gt;&lt;c&gt;" />
  <row Id="6740" PostHistoryTypeId="2" PostId="3446" RevisionGUID="4a85cad4-0bf3-4387-a22f-261383ab7929" CreationDate="2010-09-01T13:21:59.267" UserId="1134" Text="You may find the [Tonc Tutorials][1], which cover the GBA, quite interesting from a hardware history standpoint.  I can also highly recommend the iPhone apps [2600 Magic][2] and [Dragster Magic][3] for a look back even further toward the dawn of consoles.&#xD;&#xA;&#xD;&#xA;I can also recommend Steven Levy's book [Hackers: Heroes of the Computer Revolution][4], which covers a lot of the game industry's formative years.&#xD;&#xA;&#xD;&#xA;To address one specific question:&#xD;&#xA;&#xD;&#xA;Most computers/consoles, old or new, are not used even close &quot;to their maximum&quot; until they've been around for several years; as the developers get used to them and learn (and sometimes share) tips and tricks, the games come closer to utilizing the &quot;full potential&quot; of the hardware.  (However, even on &quot;ancient&quot; systems, it's going to be hard to say if you ever really reach 100% potential -- there are always crafty ways remaining to use these complex systems which may eek out more performance or new behaviors, and I'm sure there are a few centuries worth of computer science advances left in humanity.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.coranac.com/tonc/text/toc.htm&#xD;&#xA;  [2]: http://itunes.apple.com/us/app/2600-magic/id351446523&#xD;&#xA;  [3]: http://itunes.apple.com/us/app/dragster-magic/id354178382&#xD;&#xA;  [4]: https://secure.wikimedia.org/wikipedia/en/wiki/Hackers:_Heroes_of_the_Computer_Revolution" />
  <row Id="6743" PostHistoryTypeId="5" PostId="1176" RevisionGUID="d15c9c8b-6068-494c-9cb0-c398cdacbcbb" CreationDate="2010-09-01T14:19:14.617" UserId="119" Comment="added 278 characters in body" Text="Even though it is a commonly held belief that blitting is faster, I have not seen any benchmarks proving this. Some developers just prefer blitting because it allows them to treat Flash as more of a generic virtual machine, and control rendering themselves. However, if you like the built-in display list (which I do), Flash can happily move, scale, rotate and apply nice effects to hundreds of on-screen DisplayObjects (e.g. MovieClips, Sprites, Bitmaps) at high frame rates, so long as they are quite small in dimensions, e.g. less than 200x200 pixels each. You can use MovieClips without using vectors. Most games will use bitmap assets whichever system they use. But it is sometimes useful to layout and animate bitmap assets on the timeline, especially if you are working with a Flash-specialist designer rather than a pixel artist. By setting the stage quality to LOW you will get much better performance at the expense of uglier transforms. Flash will not render any objects that are off screen, so they do not slow you down. &#xD;&#xA;&#xD;&#xA;Where Flash can get slow is moving and transforming very large bitmaps - for example if you have a very large scrolling level, or lots of parallax layers. A hybrid approach of using MovieClips for your game objects while blitting the background from an offscreen buffer may be faster, and will allow you to have infinitely large levels, while still allowing the ease-of-use of standard Sprites and MovieClips." />
  <row Id="6744" PostHistoryTypeId="2" PostId="3447" RevisionGUID="42142d4f-4841-4b86-bfc3-af3b4205d357" CreationDate="2010-09-01T14:24:35.203" UserId="1101" Text="&gt; Why are MVC &amp; TDD not employed more in game architecture?&#xD;&#xA;&#xD;&#xA;Warning: opinion ahead.&#xD;&#xA;&#xD;&#xA;MVC isn't used (much) because:&#xD;&#xA;&#xD;&#xA; 1. MVC is a relatively new approach and games are typically built on old code. Most people making MVC apps are building them from nothing each time. (I know MVC itself is actually decades-old; what is new is the widespread interest in it, which essentially came from web apps like RoR). In the business software I worked on that was based on legacy code, there was no use for MVC there either. It is a culture thing, but it's not game-specific.&#xD;&#xA; 2. MVC is essentially a GUI pattern for event-driven programs. Games are neither GUI-dominated nor event-driven, hence the applicability is not as great as it is for web apps or other form-based applications. MVC is typically the Observer pattern with some well-known roles, and games often don't have the luxury of waiting to observe something interesting - they have to update everything every frame (or some variation on that) whether or not anybody has clicked anything.&#xD;&#xA;&#xD;&#xA;That's not to say games can't learn a lot from MVC. I always try and separate the model from the view in games I make. The traditional idea of the view and controller being 2 parts of the same (widget) object doesn't really work though, so you have to be a bit more abstract about it. I agree with you that performance is unlikely to be a real problem here. If anything performance can benefit from keeping visual stuff and logic stuff separate as that is more amenable to cache coherency, parallelism, etc.&#xD;&#xA;&#xD;&#xA;TDD isn't used (much) because:&#xD;&#xA;&#xD;&#xA; 1. It's really awkward to use in games. Again, it's fine for event-driven software where inputs come in and outputs come out and you can compare what you saw against what you expected and tick it off as correct. For simulations with large amounts of shared state it's significantly more awkward.&#xD;&#xA; 2. There's no indisputable evidence that it helps anything at all. Just a lot of claims, and some figures often based on self-reporting and appeals to authority. Perhaps it helps poor programmers become mediocre but holds back good programmers. Perhaps the time spent writing tests could be better spent learning SOLID principles, or designing the correct interface in the first place. Perhaps it gives a false sense of security to have tests that pass without any real proof that you have enough tests to ensure your object does the right thing.&#xD;&#xA;&#xD;&#xA;Again, as a caveat, I think unit tests are great, but I don't think &quot;test first&quot; is either beneficial or sensible. I also don't think it's practical to test the main simulation when there is so much shared state changing many times per second. I limit my tests to my low level and library code, generally.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, as you can probably guess, I am largely biased against &quot;'enterprise' coding practices&quot; as enterprises are well-known for overrunning timescales and budgets. *&quot;So do games developers!&quot;* I hear you say - well, yes. I don't think anybody really knows the best way to develop software right now and I'm not convinced that adopting regimented practices in mainstream software is at all a step up from the freer practices in entertainment software. In fact I suspect it's primarily of benefit to those who rely on commodity Java programmers where these approaches are not a ladder to climb to greater heights but a safety net to stop them falling too low." />
  <row Id="6745" PostHistoryTypeId="2" PostId="3448" RevisionGUID="77c57d1d-aa44-42e6-b6d3-3ed64243da5f" CreationDate="2010-09-01T14:30:00.697" UserId="189" Text="There are lots of results at [Stack Overflow][1] for `android game`. Lucky for you, I went through all of them and picked out the relevant ones to your question.&#xD;&#xA;&#xD;&#xA; - [&quot;Where to start game programming for Android&quot;][2]&#xD;&#xA; - [&quot;How did you get started with game development in Android&quot;][3]&#xD;&#xA; - [&quot;Tutorials and libraries for OpenGL-ES games on Android&quot;][4]&#xD;&#xA; - [&quot;android opengl game&quot;][5]&#xD;&#xA; - [&quot;Is there any Android game framework ready to use&quot;][6]&#xD;&#xA; - [&quot;Android - What classes to use for UI game development&quot;][7]&#xD;&#xA; - [&quot;Looking for Android Development Java Game Script&quot;][8]&#xD;&#xA; - [&quot;Which Android development blog has the most walkthroughs and tutorials?&quot;][9]&#xD;&#xA; - [&quot;How much Java should I have learnt before trying Android programming?&quot;][10]&#xD;&#xA; - [&quot;Android: 2D. OpenGl or android.graphics?&quot;][11]&#xD;&#xA; - [&quot;Roadmap to Android development&quot;][12]&#xD;&#xA; - [&quot;Getting started with OpenGL… in Android&quot;][13]&#xD;&#xA; - [&quot;Android OpenGL ES and 2D&quot;][14]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stackoverflow.com/&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2885533/where-to-start-game-programming-for-android&#xD;&#xA;  [3]: http://stackoverflow.com/questions/2696813/how-did-you-get-started-with-game-development-in-android&#xD;&#xA;  [4]: http://stackoverflow.com/questions/1629775/tutorials-and-libraries-for-opengl-es-games-on-android&#xD;&#xA;  [5]: http://stackoverflow.com/questions/2204086/android-opengl-game&#xD;&#xA;  [6]: http://stackoverflow.com/questions/2306793/is-there-any-android-game-framework-ready-to-use&#xD;&#xA;  [7]: http://stackoverflow.com/questions/3604244/android-what-classes-to-use-for-ui-game-development&#xD;&#xA;  [8]: http://stackoverflow.com/questions/3513398/looking-for-android-development-java-game-script&#xD;&#xA;  [9]: http://stackoverflow.com/questions/939444/which-android-development-blog-has-the-most-walkthroughs-and-tutorials&#xD;&#xA;  [10]: http://stackoverflow.com/questions/2981495/how-much-java-should-i-have-learnt-before-trying-android-programming&#xD;&#xA;  [11]: http://stackoverflow.com/questions/2755446/android-2d-opengl-or-android-graphics&#xD;&#xA;  [12]: http://stackoverflow.com/questions/2528684/roadmap-to-android-development&#xD;&#xA;  [13]: http://stackoverflow.com/questions/3469833/getting-started-with-opengl-in-android&#xD;&#xA;  [14]: http://stackoverflow.com/questions/3553244/android-opengl-es-and-2d" />
  <row Id="6746" PostHistoryTypeId="2" PostId="3449" RevisionGUID="0a025f92-cf84-4eb2-a819-90cdefe9a43b" CreationDate="2010-09-01T14:31:52.843" UserId="1101" Text="The importance of Big-O in your software is O(N&lt;sup&gt;2&lt;/sup&gt;). As N grows, the importance of having the right algorithm grows even more. :)" />
  <row Id="6747" PostHistoryTypeId="5" PostId="3438" RevisionGUID="9010e754-cc09-4f74-a5c0-b64be18e7e74" CreationDate="2010-09-01T14:54:52.443" UserId="119" Comment="added 126 characters in body; added 18 characters in body" Text="As Kylotan notes, &quot;In games you can't treat the presentation aspect as a detachable and replaceable concept like HTML and CSS is for web apps&quot;. Having built a couple of games using a simple MVC pattern (not a huge framework) I've found the major problem is that your model needs to know about your view. It is very likely that you will need to use either sprite bitmap data, hitbox data or 3D geometry data from your art assets to help work out collision detection (or another similar task). This means each model needs a reference to its view, which breaks the classic MVC pattern - for example you can no longer create a new view to an existing model etc.&#xD;&#xA;&#xD;&#xA;The component model you see in e.g. Unity3D is the best way to organise game code." />
  <row Id="6748" PostHistoryTypeId="2" PostId="3450" RevisionGUID="936d5b47-0480-4309-80c4-42aea001a570" CreationDate="2010-09-01T15:56:53.580" UserId="1909" Text="Is there an Silverlight 3d API ? or Isometric API ?" />
  <row Id="6749" PostHistoryTypeId="1" PostId="3450" RevisionGUID="936d5b47-0480-4309-80c4-42aea001a570" CreationDate="2010-09-01T15:56:53.580" UserId="1909" Text="Silverlight 3d api" />
  <row Id="6750" PostHistoryTypeId="3" PostId="3450" RevisionGUID="936d5b47-0480-4309-80c4-42aea001a570" CreationDate="2010-09-01T15:56:53.580" UserId="1909" Text="&lt;3d&gt;" />
  <row Id="6751" PostHistoryTypeId="6" PostId="3273" RevisionGUID="a06faa64-49fd-4ebf-b546-d6d93c5cb94c" CreationDate="2010-09-01T17:11:26.840" UserId="1477" Comment="edited tags" Text="&lt;algorithm&gt;&lt;physics&gt;&lt;language-agnostic&gt;&lt;graphics-programming&gt;" />
  <row Id="6752" PostHistoryTypeId="5" PostId="3414" RevisionGUID="43b4658e-1893-4608-b7b5-7f329c827808" CreationDate="2010-09-01T17:11:34.077" UserId="1966" Comment="added 202 characters in body" Text="This is a subjective question.&#xD;&#xA;&#xD;&#xA;EDIT: I have a better example. Pokemon games actually have the most generic storylines ever. Imagine they are published as novels.&#xD;&#xA;&#xD;&#xA;I had fun in OpenArena and Nexuiz and other storyless open-source shooting games. It's fun because how exciting it is to jump around and pick up frags.&#xD;&#xA;&#xD;&#xA;I also played HeavyGunner, where there is a over 5-page description of the technology and history, and a one-page description of what happened after finished every bosses.&#xD;&#xA;&#xD;&#xA;I also played &lt;a href=&quot;http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=colony+-+armor+games&quot;&gt;Colony&lt;/a&gt;, the story is simple and brief, but it's fun to play online.&#xD;&#xA;&#xD;&#xA;Last, the game of Life (literally), a typical life (including mine), doesn't have a stunning plot like a romance novel have, and a life doesn't even have a clear objective (the objective is subjective: varies from person to person). However, if that game is made, it will become the seller over its realism and complexity and even scientific value.&#xD;&#xA;&#xD;&#xA;I also tried Grand Theft Auto on iPod Touch, I had hours of fun in the demo version, suicide bombing cops and blowing up cars, and I ignored all the missions except the first, mandatory one.&#xD;&#xA;&#xD;&#xA;Pokemon games, it can get boring over full of battles, and the battle mechanic never improved, plus a high learning curve for competitive battling online. The story between generations also follow a fixed template (8 Gyms, a criminal organization, Pokemon League, that's it), it's the Pokedex and the fanbase made them enjoyable.&#xD;&#xA;&#xD;&#xA;I think a good game should have a simple story that does not even require you to read it, and a good gameplay.&#xD;&#xA;&#xD;&#xA;Here is a good test for your game: Reading skill test. Can someone who can't read English play your game? Can you play the game if it was translated to Japanese?&#xD;&#xA;" />
  <row Id="6753" PostHistoryTypeId="2" PostId="3451" RevisionGUID="e15b4bf3-3c28-493b-84e4-a80620e22bb3" CreationDate="2010-09-01T17:38:19.420" UserId="154" Text="&gt;Were game makers only or most programmers?&#xD;&#xA;&#xD;&#xA;In the earliest days of arcade games, and later Atari home systems, Spectrums, and C64's you would often have 1-2 man teams where people all had multiple hats and nearly everyone could program. By the time you hit the NES and later the art requirements for games required people dedicated to that role full time, and audio also had full time individuals who were often shared between multiple concurrent projects. Design was often someones part-time role, and not a dedicated field. &#xD;&#xA;&#xD;&#xA;&gt;Old games, how the F&amp;%K did they work?&#xD;&#xA;&#xD;&#xA;You look at the power of machines in the past with the ability to compare them to machines today. At the time those things were pretty fast, even if every machine has it's specific weaknesses. 20 years from now people will look back at x360/ps3 and wonder how we dealt with them.&#xD;&#xA;&#xD;&#xA;You just learn to deal with the issues, no different than using any other tool. &#xD;&#xA;&#xD;&#xA;&gt; Do we use computer/console power to their maximum, or do we waste it because we can't come up with complex enough gameplay?&#xD;&#xA;&#xD;&#xA;Actually it's the opposite. The more simple the gameplay the more power you can utilize from the machine. If all you want to do is throw polygons at the screen you can easily optimize that. As games get more complex we start throwing more and more systems together and being able to predict what's going to be on screen at any moment becomes more difficult. So everything has to be more general purpose and thus less efficient.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6754" PostHistoryTypeId="2" PostId="3452" RevisionGUID="09167d8e-7010-426a-b43f-f8874cf711d6" CreationDate="2010-09-01T18:00:04.927" UserId="1156" Text="[This thread:][1]&#xD;&#xA;&gt; Currently there is no support for true hardware accelerated 3D in Silverlight. It is not possible to write 3D games that run in browser nor is the development model similar to Managed Direct3D. Any kind of 3D game will be very hard to port to Silverlight. Silverlight is more suitable for development of games, that are currently built using Adobe Flash. &#xD;&#xA;&#xD;&#xA;I guess that's a no at the moment.&#xD;&#xA;  [1]: http://forums.silverlight.net/forums/t/1134.aspx " />
  <row Id="6755" PostHistoryTypeId="2" PostId="3453" RevisionGUID="35215d37-b120-499d-8c21-d1d5dca8de69" CreationDate="2010-09-01T18:18:26.513" UserId="1700" Text="I am using an entity system for my MMO server and I was thinking about defining the behavior of &quot;actions&quot; using Lua scripts. The server is written in C++. I am not very familiar with the speed/memory usage of Lua in C++ but I have used it for scripting the GUI of the client. Would using Lua to define the game logic on the server side cut the performance by a lot?" />
  <row Id="6756" PostHistoryTypeId="1" PostId="3453" RevisionGUID="35215d37-b120-499d-8c21-d1d5dca8de69" CreationDate="2010-09-01T18:18:26.513" UserId="1700" Text="Would using Lua scripts to define game logic for an MMO server be a lot slower than compiled in C++?" />
  <row Id="6757" PostHistoryTypeId="3" PostId="3453" RevisionGUID="35215d37-b120-499d-8c21-d1d5dca8de69" CreationDate="2010-09-01T18:18:26.513" UserId="1700" Text="&lt;mmo&gt;&lt;lua&gt;&lt;server&gt;" />
  <row Id="6758" PostHistoryTypeId="2" PostId="3454" RevisionGUID="11f9239b-2937-4af5-9a94-fac1602a9838" CreationDate="2010-09-01T18:19:28.803" UserId="962" Text="I am not using the built in 3d MovieClips, and I am storing the 3d location my way.&#xD;&#xA;&#xD;&#xA;I have read a few different articles on sorting depths, but most of them seem in efficient.&#xD;&#xA;&#xD;&#xA;I had a really efficient way to do it in AS2, but it was really hacky, and I am guessing there are more efficient ways that do not rely on possibly unreliable hacks.&#xD;&#xA;&#xD;&#xA;**What is the most efficient way to sort display depths using AS3 with Z depths I already have?**" />
  <row Id="6759" PostHistoryTypeId="1" PostId="3454" RevisionGUID="11f9239b-2937-4af5-9a94-fac1602a9838" CreationDate="2010-09-01T18:19:28.803" UserId="962" Text="Most effiecent 3d depth sorting for isometric 3d in AS3?" />
  <row Id="6760" PostHistoryTypeId="3" PostId="3454" RevisionGUID="11f9239b-2937-4af5-9a94-fac1602a9838" CreationDate="2010-09-01T18:19:28.803" UserId="962" Text="&lt;3d&gt;&lt;actionscript-3&gt;" />
  <row Id="6761" PostHistoryTypeId="2" PostId="3455" RevisionGUID="9e040bf1-c7f9-425e-86f4-349000894208" CreationDate="2010-09-01T18:29:31.383" UserId="962" Text="Short answer: Yes, yes it would.&#xD;&#xA;&#xD;&#xA;Long answer: It depends how much game logic, how much it is run, and how complex it is, and if you need to run it for every player. If it is very simple and is not repeated a lot, you might be fine with it. **But for most cases using LUA instead of C++ will give you much lower performance and will scale badly, assuming of course that the code is well designed and optimized.**" />
  <row Id="6762" PostHistoryTypeId="4" PostId="3454" RevisionGUID="2f6c7446-797d-44db-87a2-02b0b2d8198c" CreationDate="2010-09-01T18:53:21.780" UserId="51" Comment="edited title" Text="Most efficient 3d depth sorting for isometric 3d in AS3?" />
  <row Id="6763" PostHistoryTypeId="2" PostId="3456" RevisionGUID="e1c6a90f-de6f-4ef0-a11a-c5b53be98f2c" CreationDate="2010-09-01T19:47:42.900" UserDisplayName="Matt Palmerlee" Text="You might want to check this book out at amazon:&#xD;&#xA;[3D Game Development with Microsoft Silverlight 3: Beginner's Guide][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Development-Microsoft-Silverlight-Beginners/dp/1847198929/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1283370328&amp;sr=8-1" />
  <row Id="6764" PostHistoryTypeId="2" PostId="3457" RevisionGUID="c8d5d733-5cdc-42dc-9461-5b1f5725fa0b" CreationDate="2010-09-01T20:26:24.247" UserId="1720" Text="&lt;strong&gt;TL;DR: Lua does have overhead, but if used properly it is negligible and easily mitigated. Don't use it for heavy math operations or transforming geometry. You will probably not see any performance problems at all using it to script a GUI.&lt;/strong&gt;&#xD;&#xA;&#xD;&#xA;I've done some basic benchmarks regarding Lua's performance as a game scripting language, and it's pretty damn fast. Using tolua++ to bind LuaJIT to my game engine, I spawned 2,000  actors, each actor controlled by a Lua script called every game loop (with a time-delta argument). Half of the actors had a flocking script and the other half were doing a sort of random walk (and were avoided by the flock).&#xD;&#xA;&#xD;&#xA;Turning off the rendering component gave me a bit over 400 ticks per second on my Opteron 170 (2x2.0GHz, though my engine was single threaded at the time). I imagine I could have squeezed out quite a bit more than that if I dug in and optimized, perhaps moving some of the heavy work back into C++. Updating 2000 actors 400 times per second was still pretty impressive, and far exceeded my expectations at the time.&#xD;&#xA;&#xD;&#xA;I now use Lua in all of my projects, and it actually constitues quite a large portion of the actual game code (AI, GUI layout/logic, Events/Messages). Making games is MUCH more fun when you can quickly change something and test it without having to exit, recompile, and reinitialize. I've run into some performance issues from time to time, but those are easily solved by reimplementing the offending code in C++ (and then calling it from Lua).&#xD;&#xA;&#xD;&#xA;While slightly off-topic, EVE Online's servers are written almost completely in Stackless Python (I believe they defer most of their math operations to a C++ lib), which is considerably heavier than Lua, and, based on my own personal research and several available benchmarks, far less performant than LuaJIT. They manage to handle 30k+ concurrent players without too many issues. Granted, they do have a ton of expensive hardware running all of that, but I believe the majority of the cost is in their database cluster...&#xD;&#xA;&#xD;&#xA;Apologies for the wall of text." />
  <row Id="6765" PostHistoryTypeId="2" PostId="3458" RevisionGUID="e5a02354-88aa-4eb9-b846-308ff386bef9" CreationDate="2010-09-01T20:56:02.253" UserId="1780" Text="As far as I know, all Atari 2600 games (released in 1983?) were programmed entirely in assembler.  The Atari Jaguar had a compiler, but my understanding is that it never actually worked reliably enough to use.&#xD;&#xA;&#xD;&#xA;The Sony PlayStation had a C compiler that worked well, so by that time we were coding in C.  (This is when I joined the industry.)  This machine had 2M RAM and 1M VRAM.  So how did you do it?  Well- the first game I shipped on it had a separate executable for each level, with all of the assets baked into the executable itself.  After that though we went to a setup that allowed us to stream everything; our levels were 10+ megabytes so we had to come up with some way to bring it in bits at a time.  When streaming off of the disc, we streamed in terrain chunks and the textures that went with them.  Some modern PSP games on the other hand stream almost everything; area-specific animations for the player, enemies, and whatever else isn't necessary throughout the whole game.  I.e. we wouldn't stream the player character because he's needed everywhere.&#xD;&#xA;&#xD;&#xA;Remember, the PlayStation was CD-based.  CDs could hold 660 megs of stuff, so you could fill memory 300 times over just with what was on one disc.  The PSP's 1.8Gb UMD relative to its 24M RAM isn't quite that ridiculous, but still you can put a lot of stuff on the disc, the trick is getting it off at the right time without presenting the user with a &quot;loading&quot; screen." />
  <row Id="6766" PostHistoryTypeId="2" PostId="3459" RevisionGUID="e0d45df0-e2bd-4896-ba46-1b1fbc0ad5c9" CreationDate="2010-09-01T21:06:34.093" UserId="1970" Text="I don't know about efficiency, but this is the method I've been using for a long time:&#xD;&#xA;&#xD;&#xA;Pretty simple method: Just add the screen-Y and the Z to get a 'distance', and then keep them in a list sorted by this property.&#xD;&#xA;&#xD;&#xA;    // In the 'update' of each entity&#xD;&#xA;    entity.distance = entity.y + entity.z;&#xD;&#xA;&#xD;&#xA;Then use:&#xD;&#xA;&#xD;&#xA;    allEntities:Array;&#xD;&#xA;    // ...&#xD;&#xA;    &#xD;&#xA;    allEntities.sortOn(&quot;distance&quot;);&#xD;&#xA;&#xD;&#xA;Finally, rather than using Flash's rendering, I always blit things myself when I'm very concerned about depth sorting:&#xD;&#xA;&#xD;&#xA;    canvas:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight);&#xD;&#xA;    for each (var e:Entity in allEntities) {&#xD;&#xA;        // draw each entity in sorted order&#xD;&#xA;        canvas.draw(e, e.transform.matrix);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Caveat**: This opens up the can of worms which is doing your own blitting. But as I mentioned, I've always found it a road worth going down when trying to deal with depths in a precise way.&#xD;&#xA;" />
  <row Id="6767" PostHistoryTypeId="2" PostId="3460" RevisionGUID="f0b34a91-67a4-4b94-8a1b-01ef95514957" CreationDate="2010-09-01T22:38:42.030" UserId="667" Text="What are the best 3rd party DRM solutions available from a user experience, development integration, and security perspective?" />
  <row Id="6768" PostHistoryTypeId="1" PostId="3460" RevisionGUID="f0b34a91-67a4-4b94-8a1b-01ef95514957" CreationDate="2010-09-01T22:38:42.030" UserId="667" Text="Best 3rd Party DRM Solutions" />
  <row Id="6769" PostHistoryTypeId="3" PostId="3460" RevisionGUID="f0b34a91-67a4-4b94-8a1b-01ef95514957" CreationDate="2010-09-01T22:38:42.030" UserId="667" Text="&lt;security&gt;" />
  <row Id="6770" PostHistoryTypeId="2" PostId="3461" RevisionGUID="2cc61b47-2b41-4478-b2b7-022d9a7debdd" CreationDate="2010-09-01T23:08:28.877" UserId="1780" Text="I have no particular opinion of MVC outside of the fact that the view is often separated from the logic by the simple fact that the render loop is packaging a bunch of stuff up for some hardware to process and that's not the place where you want &quot;game logic&quot; happening concurrently.  The &quot;controller&quot; is also separated by hardware, but unfortunately many if not most game developers do &quot;interesting&quot; work in the controller handler.  (IMO the controller handler should be reading the buttons and sticks and building a &quot;presentation&quot; for the game to view, but my soapbox isn't that strong.)&#xD;&#xA;&#xD;&#xA;TDD on the other hand is something that I have very strong opinions about.  It just changes development in a way to yield software that is easier to build upon.  It is harder to do, no doubt about it.  Of course, since it's harder to do, it's not done.  Some folks whine about TDD (or more generally unit testing) having no value because &quot;the game is the test,&quot; but the fact is that in TDD, the testing is almost irrelevant.  The point of TDD is the software design and architecture that comes out of the process.&#xD;&#xA;&#xD;&#xA;Embracing TDD really changes one's approach to programming.  I had some feelings about what was right and what was wrong before I started down the TDD path, but once I jumped in with both feet I really came to understand a lot more about how the things I was doing was either helping or hindering future development.  Indeed, this is sort of the point behind the coderoom post, [TDD without the t](http://coderoom.wordpress.com/2010/04/27/tdd-without-the-t/).&#xD;&#xA;&#xD;&#xA;Back to why it's not used more in games, beyond being hard, it makes people realize that the way they've always done it in the past needlessly made their own jobs harder, and for programmers especially that's a bitter pill to even look at, much less swallow.&#xD;&#xA;&#xD;&#xA;I am convinced that people who refuse to accept TDD simply don't want to be better programmers.  They already think that they're &quot;excellent&quot; at programming or design or architecture, when in fact their code says something completely different." />
  <row Id="6771" PostHistoryTypeId="2" PostId="3462" RevisionGUID="8dc3aa4a-ae9f-4416-b68a-1eeb0dd4ae7a" CreationDate="2010-09-01T23:13:33.930" UserId="1780" Text="For a PC title, [Steam](http://www.steampowered.com/steamworks/) is really the only one that should be considered these days.  Safedisc and SecuROM install terrible things onto the user's computer and are uninstallable." />
  <row Id="6772" PostHistoryTypeId="2" PostId="3463" RevisionGUID="6804d108-71c2-492d-941e-6524d9a2f0de" CreationDate="2010-09-01T23:20:42.897" UserId="189" Text="I'm looking for **quotes from known game industry professionals** (designers, developers, etc.), relevant to the topic of game development.&#xD;&#xA;&#xD;&#xA;Please cite your quotes with a link to a primary source, if possible. (and a link to the person's bio wouldn't hurt).&#xD;&#xA;&#xD;&#xA;Hopefully this will become a collection of great quotes that can be referenced (e.g. in presentations) or, in my case, possibly to write on the board at my game dev club meetings to prompt discussion." />
  <row Id="6773" PostHistoryTypeId="1" PostId="3463" RevisionGUID="6804d108-71c2-492d-941e-6524d9a2f0de" CreationDate="2010-09-01T23:20:42.897" UserId="189" Text="Famous quotes from game industry professionals?" />
  <row Id="6774" PostHistoryTypeId="3" PostId="3463" RevisionGUID="6804d108-71c2-492d-941e-6524d9a2f0de" CreationDate="2010-09-01T23:20:42.897" UserId="189" Text="&lt;untagged&gt;" />
  <row Id="6775" PostHistoryTypeId="16" PostId="3463" RevisionGUID="6804d108-71c2-492d-941e-6524d9a2f0de" CreationDate="2010-09-01T23:20:42.897" UserId="189" />
  <row Id="6776" PostHistoryTypeId="2" PostId="3464" RevisionGUID="5ad566e6-a394-4ad7-9602-b72f65fb5af9" CreationDate="2010-09-01T23:22:16.913" UserId="154" Text="As a designer what you need to focus on is the priority of your features, and the minimum bar needed to pull each of them off. As you start prototyping and learning the various costs of certain mechanics, you'll use those priorities to figure out what gets cut back and what is axed completely. &#xD;&#xA;&#xD;&#xA;You aren't expected to know exactly how many resources will be allocated to each aspect of the game before you get started, although you should have a rough idea. But a team does expect you to be able to react intelligently to learning that some feature costs twice what was expected and that means it either needs to go away, be redesigned in a simpler fashion, or something else gets cut to make room. &#xD;&#xA;&#xD;&#xA;In time with experience you can better anticipate where stumbling blocks will occur. The more you work with an engine or hardware you get a feel for it's limitations and the relative cost of different features.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6777" PostHistoryTypeId="5" PostId="3463" RevisionGUID="cfc9fcd5-8cce-402e-a83c-857b5bdc8ff9" CreationDate="2010-09-01T23:28:22.927" UserId="189" Comment="added 180 characters in body" Text="I'm looking for **quotes from known game industry professionals** (designers, developers, etc.), relevant to the topic of game development.&#xD;&#xA;&#xD;&#xA;Please cite your quotes with a link to a primary source, if possible. (and a link to the person's bio wouldn't hurt).&#xD;&#xA;&#xD;&#xA;Hopefully this will become a collection of great quotes that can be referenced (e.g. in presentations) or, in my case, possibly to write on the board at my game dev club meetings to prompt discussion.&#xD;&#xA;&#xD;&#xA;Also please no duplicates from the Stack Overflow question [&quot;Great programming quotes&quot;][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/58640/great-programming-quotes-closed" />
  <row Id="6778" PostHistoryTypeId="2" PostId="3465" RevisionGUID="312316d6-41e6-463a-b525-827d3ba5d56c" CreationDate="2010-09-02T00:39:29.080" UserId="818" Text="There is no such thing as good DRM.  Consider it from the computer owner's perspective: DRM is a program whose function is to override the owner's ultimate control of the system and allow some other programmer somewhere else to dictate what he can and cannot do with the computer, which is his personal property.&#xD;&#xA;&#xD;&#xA;In any other context, this would be considered computer hacking, which is a serious crime.  The only reason people can get away with using DRM today is because the DMCA explicitly turns the entire legal issue inside out.  (It's now legal to hack anyone's computer pretty much however you want to as long as they have your copyrighted material on it, and the owner is the one guilty of a computer crime if they try to assert their natural right to control over their own property.)&#xD;&#xA;&#xD;&#xA;When programmers say they want DRM, what they really mean is that they want to protect against lost sales.  This is both futile and counterproductive.  Futile because in the age of the Internet, all it takes is for one person, anywhere, to produce a working crack and upload it somewhere, and your DRM is broken everywhere.  Counterproductive because DRM causes inconveniences for the user which lowers their perception of its quality and thus their incentive to buy it.  Just look at Spore, which was a mediocre game, but nowhere near as horrible as its reputation would have you believe.  It got crushed by backlash against its DRM, not by the game itself being bad.  On the flip side, look at Sins of a Solar Empire, the best-selling game of its year, released 100% DRM-free.  Consumers saw the lack of DRM as a positive feature that *increased* the perception of quality significantly.&#xD;&#xA;&#xD;&#xA;There is only one way to get people to pay money for your game, and it's not by hacking their computer.  It's by releasing a product whose perceived value is greater than the price you're asking for it.  Don't waste effort even thinking about DRM; work on making a game people will want to play." />
  <row Id="6779" PostHistoryTypeId="2" PostId="3466" RevisionGUID="00865e1c-b74c-4abb-9c77-6df5d72b2604" CreationDate="2010-09-02T00:59:09.257" UserId="1272" Text="Dunno if you want one answer per quote, but here are three great quotes I found [here][1] (an excellent collection of quotes relevant to game design, though not all from people in the games industry).&#xD;&#xA;&#xD;&#xA;&gt;*&quot;Do weird and difficult things.&quot;*&#xD;&#xA;&#xD;&#xA;-Masaya Matsuura [[bio]][2]&#xD;&#xA;&#xD;&#xA;&gt;*&quot;Focus groups tell you what people like, but they don’t tell you what people want.&quot;*&#xD;&#xA;&#xD;&#xA;-Ron Gilbert [[bio]][3]&#xD;&#xA;&#xD;&#xA;&gt;*&quot;What game is worth doing that’s not creatively risky?&quot;*&#xD;&#xA;&#xD;&#xA;-Tim Schafer [[bio]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designersnotebook.com/Quotes_for_Designers/quotes_for_designers.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Masaya_Matsuura&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Ron_Gilbert&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Tim_Schafer&#xD;&#xA;  [5]: http://www.designersnotebook.com/Quotes_for_Designers/quotes_for_designers.htm" />
  <row Id="6780" PostHistoryTypeId="16" PostId="3466" RevisionGUID="00865e1c-b74c-4abb-9c77-6df5d72b2604" CreationDate="2010-09-02T00:59:09.257" UserId="-1" />
  <row Id="6781" PostHistoryTypeId="5" PostId="3463" RevisionGUID="1cd86b4e-f587-44eb-a8b4-3747d42dc1cd" CreationDate="2010-09-02T01:24:51.773" UserId="51" Comment="added 25 characters in body" Text="I'm looking for **quotes from known game industry professionals** (designers, developers, etc.), relevant to the topic of game development.&#xD;&#xA;&#xD;&#xA;Please one quote per answer and cite your quotes with a link to a primary source, if possible. (and a link to the person's bio wouldn't hurt).&#xD;&#xA;&#xD;&#xA;Hopefully this will become a collection of great quotes that can be referenced (e.g. in presentations) or, in my case, possibly to write on the board at my game dev club meetings to prompt discussion.&#xD;&#xA;&#xD;&#xA;Also please no duplicates from the Stack Overflow question [&quot;Great programming quotes&quot;][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/58640/great-programming-quotes-closed" />
  <row Id="6782" PostHistoryTypeId="5" PostId="3462" RevisionGUID="a2c787b5-5b4a-4afa-bcd4-63f54c2a5c74" CreationDate="2010-09-02T01:33:26.330" UserId="1780" Comment="added 4 characters in body" Text="For a PC title, [Steam](http://www.steampowered.com/steamworks/) is really the only one that should be considered these days.  Safedisc and SecuROM install terrible things onto the user's computer and cannot be uninstalled." />
  <row Id="6783" PostHistoryTypeId="2" PostId="3467" RevisionGUID="9d46b9dd-0487-4158-9f85-1c728d4adca1" CreationDate="2010-09-02T01:37:43.767" UserId="51" Text="&gt; Great game-play is a stream of interesting decisions the player must resolve.&#xD;&#xA;&#xD;&#xA;From &lt;a href=&quot;http://www.gamasutra.com/features/20031126/carless_01.shtml&quot;&gt;an interview&lt;/a&gt; with Bruce Shelley, Age of Empires senior designer." />
  <row Id="6784" PostHistoryTypeId="16" PostId="3467" RevisionGUID="9d46b9dd-0487-4158-9f85-1c728d4adca1" CreationDate="2010-09-02T01:37:43.767" UserId="-1" />
  <row Id="6785" PostHistoryTypeId="5" PostId="3466" RevisionGUID="c2172dc2-87ea-4c82-80fd-4ee6154c2ec7" CreationDate="2010-09-02T01:46:42.643" UserId="1272" Comment="Cut down to a single quote to satisfy the one-per-answer requirement." Text="&gt;*&quot;Do weird and difficult things.&quot;*&#xD;&#xA;&#xD;&#xA;-Masaya Matsuura [[bio]][2]&#xD;&#xA;&#xD;&#xA;-[[Source]][1] (a collection of great game design-relevant quotes)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designersnotebook.com/Quotes_for_Designers/quotes_for_designers.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Masaya_Matsuura" />
  <row Id="6786" PostHistoryTypeId="2" PostId="3468" RevisionGUID="6301992a-87e3-40e0-ae83-3114d4647c4d" CreationDate="2010-09-02T01:49:13.580" UserId="1272" Text="&gt;*&quot;Focus groups tell you what people like, but they don’t tell you what people want.&quot;*&#xD;&#xA;&#xD;&#xA;-Ron Gilbert [[bio]][2]&#xD;&#xA;&#xD;&#xA;-[[Source]][1] (a collection of great game design-relevant quotes)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designersnotebook.com/Quotes_for_Designers/quotes_for_designers.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Ron_Gilbert" />
  <row Id="6787" PostHistoryTypeId="16" PostId="3468" RevisionGUID="6301992a-87e3-40e0-ae83-3114d4647c4d" CreationDate="2010-09-02T01:49:13.580" UserId="-1" />
  <row Id="6788" PostHistoryTypeId="2" PostId="3469" RevisionGUID="d2fb6d75-765c-4c8f-a5e4-4bb054c2b898" CreationDate="2010-09-02T01:50:43.537" UserId="1272" Text="&gt;*&quot;What game is worth doing that’s not creatively risky?&quot;*&#xD;&#xA;&#xD;&#xA;-Tim Schafer [[bio]][2]&#xD;&#xA;&#xD;&#xA;-[[Source]][1] (a collection of great game design-relevant quotes)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designersnotebook.com/Quotes_for_Designers/quotes_for_designers.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Tim_Schafer" />
  <row Id="6789" PostHistoryTypeId="16" PostId="3469" RevisionGUID="d2fb6d75-765c-4c8f-a5e4-4bb054c2b898" CreationDate="2010-09-02T01:50:43.537" UserId="-1" />
  <row Id="6791" PostHistoryTypeId="16" PostId="1670" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6792" PostHistoryTypeId="16" PostId="1672" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6793" PostHistoryTypeId="16" PostId="1697" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6794" PostHistoryTypeId="16" PostId="1734" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6795" PostHistoryTypeId="16" PostId="1744" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6796" PostHistoryTypeId="16" PostId="1748" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6798" PostHistoryTypeId="16" PostId="1667" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-02T05:38:56.283" UserId="51" />
  <row Id="6799" PostHistoryTypeId="2" PostId="3471" RevisionGUID="ee923972-7f65-44ec-b251-15f4a285be03" CreationDate="2010-09-02T06:35:33.243" UserId="102" Text="I'm curious to know if there is an XNA-like library for Java; that is, a library that&#xD;&#xA;&#xD;&#xA;1. Handles the game loop - i.e. you just implement an existing method, and it will get called every frame.&#xD;&#xA;2. Handles the rendering - i.e. you just tell it what to render, it will take care of displaying it to the monitor, hiding implementation details such as hardware acceleration.&#xD;&#xA;3. Contains many useful methods for graphic, sound and user input options.&#xD;&#xA;&#xD;&#xA;I'm interested in a library which supports both 2D and 3D options." />
  <row Id="6800" PostHistoryTypeId="1" PostId="3471" RevisionGUID="ee923972-7f65-44ec-b251-15f4a285be03" CreationDate="2010-09-02T06:35:33.243" UserId="102" Text="Is there an XNA-like library for Java?" />
  <row Id="6801" PostHistoryTypeId="3" PostId="3471" RevisionGUID="ee923972-7f65-44ec-b251-15f4a285be03" CreationDate="2010-09-02T06:35:33.243" UserId="102" Text="&lt;java&gt;&lt;libraries&gt;" />
  <row Id="6802" PostHistoryTypeId="2" PostId="3472" RevisionGUID="980647f1-3aa1-4f9f-b84e-14e3c5c3e0fa" CreationDate="2010-09-02T07:02:15.467" UserId="288" Text="Silverlight 3 introduced &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.media.projection(v=VS.95).aspx&quot;&gt;`Projection`&lt;/a&gt; which allows for 3D transformations of elements. And in Silverlight 4 it became hardware accelerated.&#xD;&#xA;&#xD;&#xA;(There are a very limited number of things that Silverlight 3 and 4 will hardware accelerate - and lots of ways to accidentally turn it off or make it perform poorly.)&#xD;&#xA;&#xD;&#xA;There are two projection elements: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.media.planeprojection(v=VS.95).aspx&quot;&gt;`PlaneProjection`&lt;/a&gt; and  &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.media.matrix3dprojection(v=VS.95).aspx&quot;&gt;`Matrix3DProjection`&lt;/a&gt;. The former is useful for making 3D interfaces. The latter will give you sufficient control to actually place elements in full 3D (providing you're pretty handy with your matrices).&#xD;&#xA;&#xD;&#xA;This is a **far cry** from a 3D engine that renders triangles. You will be basically placing textured quads in 3D space.&#xD;&#xA;&#xD;&#xA;Using this, a game that uses &quot;2.5D&quot; like Doom or Diablo 2 should be possible with *a lot* of work. It's worth pointing out that Silverlight as a whole is woefully inadequate for making games that require &quot;fancy&quot; graphics.&#xD;&#xA;&#xD;&#xA;For a more generic 3D engine, you could take a look at the Silverlight version of &lt;a href=&quot;http://balder.codeplex.com/&quot;&gt;Balder&lt;/a&gt;. Last time I looked, it was slow and buggy - although it seems to have improved since then. It does software rendering on Silverlight, so performance is going to limit you to the simplest of 3D environments." />
  <row Id="6803" PostHistoryTypeId="2" PostId="3473" RevisionGUID="7c31ddae-55aa-42d7-af5e-bb118fbd0a8f" CreationDate="2010-09-02T07:18:09.923" UserId="1216" Text="I am developing a game, of course a word game. I have UIView, in this I have to bring the keyboard, without using UITextField. Could you please suggest me something on how to do this?&#xD;&#xA;" />
  <row Id="6804" PostHistoryTypeId="1" PostId="3473" RevisionGUID="7c31ddae-55aa-42d7-af5e-bb118fbd0a8f" CreationDate="2010-09-02T07:18:09.923" UserId="1216" Text="How to bring iPad keyboard??" />
  <row Id="6805" PostHistoryTypeId="3" PostId="3473" RevisionGUID="7c31ddae-55aa-42d7-af5e-bb118fbd0a8f" CreationDate="2010-09-02T07:18:09.923" UserId="1216" Text="&lt;ipad&gt;" />
  <row Id="6806" PostHistoryTypeId="2" PostId="3474" RevisionGUID="f557bed0-94bc-44fc-9a0b-01cc3ba1f0e2" CreationDate="2010-09-02T07:26:26.547" UserId="51" Text="There is no API for the keyboard. You have to go through a text input UI element. You could write your own on-screen keyboard but don't forget about Bluetooth keyboard users. &#xD;&#xA;&#xD;&#xA;Also this isn't game dev specific. See here http://stackoverflow.com/questions/1472258/iphone-keyboard-without-textview" />
  <row Id="6807" PostHistoryTypeId="5" PostId="3404" RevisionGUID="0826221a-4713-4191-8ff3-09849029b195" CreationDate="2010-09-02T08:13:24.470" UserId="1156" Comment="deleted 26 characters in body" Text="For the architectural side of rendering, there's two main ways: having each object render itself, and having a single renderer which renders everything.&#xD;&#xA;&#xD;&#xA;I'm currently aiming for the second idea, for the following reasons:&#xD;&#xA;&#xD;&#xA; - The list can be sorted to only use shaders once. Else each object would have to bind the shader, because it's not sure if it's active. The objects could be sorted and grouped.&#xD;&#xA;&#xD;&#xA; - Easier to swap APIs. With a few macro lines, it can be easy to swap between a DirectX renderer and an OpenGL renderer (not a reason for my project, but still a good point)&#xD;&#xA; - Easier to manage rendering code&#xD;&#xA;&#xD;&#xA;Of course, if anyone has strong recommendations for the first method, I will listen to them.&#xD;&#xA;&#xD;&#xA;But I was wondering how make this work.   &#xD;&#xA;&#xD;&#xA;**First idea**  &#xD;&#xA;The renderer has a list of pointers to the renderable components of each entity, which register themselves on RenderCompoent creation. However, I'm worrying that this may end up as a lot of extra pointer weight. But I can sort the list of pointers every so often.&#xD;&#xA;&#xD;&#xA;  **Second idea**  &#xD;&#xA;The entire list of entities is passed to the renderer each render call. The renderer then sorts the list (each call, or maybe once?) and gets what it wants. That's a lot of passing and/or sorting, however.&#xD;&#xA;&#xD;&#xA;**Other ideas**  &#xD;&#xA;???  &#xD;&#xA;&lt;strike&gt;PROFIT&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;Anyone got ideas? Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6808" PostHistoryTypeId="2" PostId="3475" RevisionGUID="e2ee0a6b-42ae-4a85-a8dd-031f5ac904d6" CreationDate="2010-09-02T08:41:02.100" UserId="919" Text="&gt; Play Style Matters&#xD;&#xA;&#xD;&#xA;From Warren Spector of Deus EX fame and of the soon to be Epic Mickey. Is my favorite" />
  <row Id="6809" PostHistoryTypeId="16" PostId="3475" RevisionGUID="e2ee0a6b-42ae-4a85-a8dd-031f5ac904d6" CreationDate="2010-09-02T08:41:02.100" UserId="-1" />
  <row Id="6812" PostHistoryTypeId="2" PostId="3477" RevisionGUID="53dd5379-9638-4c57-a618-1a835ea7cb89" CreationDate="2010-09-02T09:40:06.593" UserId="119" Text="    private function positionOrthographic():void&#xD;&#xA;    {&#xD;&#xA;    	for each (var entity:Entity in entities)&#xD;&#xA;    	{&#xD;&#xA;    	entity.spriteView.x = entity.body.position.x;&#xD;&#xA;    	entity.spriteView.y = entity.body.position.y + entity.body.positionZ;&#xD;&#xA;				&#xD;&#xA;	    var sortedEntities:Array = entities.concat();&#xD;&#xA;	    sortedEntities.sort(sortDepths, Array.DESCENDING | Array.NUMERIC);&#xD;&#xA;			&#xD;&#xA;	    var numEntities:int = entities.length;&#xD;&#xA;			&#xD;&#xA;	    for (var i:int = 0; i &lt; numEntities; i++)&#xD;&#xA;	    {&#xD;&#xA;		    world.setChildIndex(sortedEntities[i].spriteView, i); &#xD;&#xA;	    }&#xD;&#xA;	}&#xD;&#xA;		&#xD;&#xA;	private function sortDepths(entity1:Entity, entity2:Entity):int&#xD;&#xA;	{&#xD;&#xA;	    if (entity1.layer &lt; entity2.layer) return 1;&#xD;&#xA;		if (entity1.layer &gt; entity2.layer) return -1;&#xD;&#xA;		if (entity1.body.position.y &gt; entity2.body.position.y)return -1;&#xD;&#xA;		if (entity1.body.position.y &lt; entity2.body.position.y)return 1;&#xD;&#xA;		return 0;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Splits sorting into a separate function. No idea how efficient it is, other than I've never noticed any slowdown from using it. Supports layers, so e.g. HUD and floating text things cab always appear on top, backgrounds always below, etc." />
  <row Id="6815" PostHistoryTypeId="5" PostId="1576" RevisionGUID="d6de2f85-5c22-4933-a861-d1fcdf4c65c3" CreationDate="2010-09-02T10:59:39.563" UserId="252" Comment="added 148 characters in body" Text="Introversion is now offering [the Darwinia+Multiwinia source for sale](http://store.introversion.co.uk/product_info.php?products_id=66), stating&#xD;&#xA;&#xD;&#xA;&gt; Note: You will need Windows and Visual Studio 2008 to build the games. We have tested that the code compiles correctly on the PC, but you will need to put some effort in to compile for Mac / Linux. There is no Xbox code in this release.&#xD;&#xA;&#xD;&#xA;Has anyone put this effort in already? The best answer would (be yes and) mention modifications that had to be done (also mentioning the distro used), the second-to-best would explain why it doesn't work right now. Since I haven't bought the source pack I'm relying on upvotes as confirmation, so please comment on answers if something doesn't work or has to be modified e.g. for another Linux distribution. I'm currently using Ubuntu 8.04, but 10.04 or e.g. Gentoo would be a choice, too.&#xD;&#xA;&#xD;&#xA;**edit** Clarification: The intention is to make a new game with that engine, but since this question is a prerequisite, it seems suitable here." />
  <row Id="6816" PostHistoryTypeId="2" PostId="3479" RevisionGUID="6b6afdaa-120b-4c4e-8475-13f150177a03" CreationDate="2010-09-02T11:41:25.217" UserId="189" Text="According to your first requirement, you are looking for a **framework** rather than a library.&#xD;&#xA;&#xD;&#xA;[jMonkeyEngine][1] is a framework for 3D games (i.e. it provides the main loop as you ask for, similar to XNA) but it wouldn't be a good choice for 2D.&#xD;&#xA;&#xD;&#xA;However, **a game loop isn't a hard thing to write**, and existing Java libraries handle your 2nd and 3rd requirements, so I highly suggest looking into a scene graph 3D library/engine or any 2D library, depending on if you're making a 2D or a 3D game.&#xD;&#xA;&#xD;&#xA;[Aviatrix3D][2], [Ardor3D][3], [Java3D][4] and [jMonkeyEngine][5] are my recommendations for scene graph 3D engines.&#xD;&#xA;&#xD;&#xA;For 2D libraries, you have [JGame][6], or you can choose to use OpenGL for max speed and use [LWJGL][7] or [JOGL][8]. You could also just go with Java's built-in [Graphics2D][9] library, which would be an especially good option if you plan to deploy your game as an applet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/&#xD;&#xA;  [2]: http://aviatrix3d.j3d.org/&#xD;&#xA;  [3]: http://www.ardor3d.com/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Java3d&#xD;&#xA;  [5]: http://www.jmonkeyengine.com/&#xD;&#xA;  [6]: http://www.13thmonkey.org/~boris/jgame/&#xD;&#xA;  [7]: http://www.lwjgl.org/&#xD;&#xA;  [8]: http://jogamp.org/jogl/www/&#xD;&#xA;  [9]: http://download.oracle.com/javase/tutorial/2d/index.html" />
  <row Id="6817" PostHistoryTypeId="5" PostId="227" RevisionGUID="22e7c173-a996-45ed-9c24-cfecb0378384" CreationDate="2010-09-02T11:57:09.687" UserId="93" Comment="fix url" Text="This is from my experience as a server programmer for a commercial MMO:&#xD;&#xA;&#xD;&#xA;MMO middleware is not a well established commercial field, and there have been very few successful attempts to use mmo-specific middleware, at least within the realm of large scale MMOs such as your World of Warcraft. &#xD;&#xA;&#xD;&#xA;[Multiverse][1] has been used in a few smaller MMOs and I believe is free for noncommercial MMOs. However, the graphics are somewhat dated and it is not designed for large scale deployment.&#xD;&#xA;&#xD;&#xA;[Hero Engine][2] has been around for several years, and has some very good content creation tools. I have no direct knowledge but have heard disappointing information about the usefulness of the back end server package, and I am yet to see a shipped game using this middleware. The upcoming The Old Republic MMO is using this engine, although I do not know to what extent.&#xD;&#xA;&#xD;&#xA;[BigWorld][3] has been integrated into several actually shipped medium-scale MMOs so has a bit of a leg up. I again have no personal knowledge other than being impressed by their content creation tool at GDC. I suspect they are not particularly cheap.&#xD;&#xA;&#xD;&#xA;In general, I would be extremely skeptical of using any Middleware solution that has not been used in actual shipping product. There is a huge gap between making content creation tools and making a scalable, working server architecture. Until an MMO has gone public and been hit with real users there's no way of knowing if the tech is good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.multiverse.net/index.html&#xD;&#xA;  [2]: http://www.heroengine.com/&#xD;&#xA;  [3]: http://www.bigworldtech.com/index/index.php" />
  <row Id="6818" PostHistoryTypeId="2" PostId="3480" RevisionGUID="27889a5f-949f-450f-9e42-7c2fea079019" CreationDate="2010-09-02T12:37:21.353" UserId="1882" Text="&lt;Blockquote&gt; *&quot;Story in a game is like a story in a porn movie. It's expected to be there, but it's not that important.&quot;*&#xD;&#xA;&#xD;&#xA;&lt;/Blockquote&gt;&#xD;&#xA;&#xD;&#xA;From Programming God, John Carmack ([Source][1])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikiquote.org/wiki/John_D._Carmack" />
  <row Id="6819" PostHistoryTypeId="16" PostId="3480" RevisionGUID="27889a5f-949f-450f-9e42-7c2fea079019" CreationDate="2010-09-02T12:37:21.353" UserId="-1" />
  <row Id="6820" PostHistoryTypeId="5" PostId="3436" RevisionGUID="e7295326-cbee-458b-85ca-076dfd283a14" CreationDate="2010-09-02T12:58:28.617" UserId="1750" Comment="added 308 characters in body" Text="Because MVC doesn't fit in the architecture of a game. The dataflow for a game is entirely different than that of a enterprice application, because it's not as event driven and there is often a (very) tight millisecond budget in which to perform these operations. There are a lot of things that need to happen in 16.6 milliseconds so it's more beneficial to have a 'fixed' and rigid data pipeline that processes the data you need on screen in exactly that time. &#xD;&#xA;&#xD;&#xA;Also, the separation is there; most of the time it's just not wired the same way as the MVC pattern. There is a rendering engine (View), user input handling (Controller) and the rest such as gameplay logic, ai, and physics (Model). Think about it; if you're fetching user input, running the ai and rendering the image 60 times per second, then why would you need an Observer between the model and the view to tell you what has changed? Don't interpret this as me saying that you don't need the Observer pattern in games, you do, but in this case you really don't. You're doing all that work, every frame, anyway.&#xD;&#xA;&#xD;&#xA;Although TDD is hardly ever used in development studios, we do use Agile practices towards software development and SCRUM seems to be the popular choice at least here in Europe. The reason is simple, the changes come from everywhere. The artists might want more texture budget, larger worlds, more trees while the designers want a richer story (more content on disk), a streaming world and the publishers want you to finish on time, and on budget and so does the marketing department. And apart from that, the &quot;state of the art&quot; keeps changing rapidly.&#xD;&#xA;&#xD;&#xA;That doesn't mean that we don't do testing either, most studios have large Q&amp;A departments, run loads of regression tests and do unit tests on a regular basis. However, there's hardly any point doing unit tests upfront because a large part of the bugs are art/graphics related (holes in collision meshes, wrong textures whatever, glitch in the depth of field shader) that unit tests can't cover. And besides working code, the most important factor of **any** game is that it's fun, and there's no unit testing that.&#xD;&#xA;&#xD;&#xA;Also remember that in the console world this is even different still, because you're programming more for the hardware then for anything else. This generally (PS2/PS3) means that the flow of the data is way more important then the flow of the code in nearly every case; due to performance considerations." />
  <row Id="6821" PostHistoryTypeId="2" PostId="3481" RevisionGUID="ee825003-d3c5-4ea3-8263-b11b64b36540" CreationDate="2010-09-02T13:01:01.063" UserId="189" Text="I asked a similar question over at Stack Overflow which got some decent responses that might help you: [&quot;What's wrong with the architecture of a game object drawing and updating itself?&quot;][1]. I think reading this question and its answers will help you validate that yes, you should have a central renderer (though you already seem to get that), and hopefully clarify how to do so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3000525/whats-wrong-with-the-architecture-of-a-game-object-drawing-and-updating-itself" />
  <row Id="6822" PostHistoryTypeId="2" PostId="3482" RevisionGUID="d5c4e23b-1dfd-47fb-b3dc-d9d9c8b28612" CreationDate="2010-09-02T13:01:28.567" UserId="1835" Text="Although it doesnt support 3D, [pulpcore][1] is a good gaming framework. I havent personally used it, but i have browsed thru the code just to check it out, and it looks nice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/pulpcore/ " />
  <row Id="6823" PostHistoryTypeId="5" PostId="3436" RevisionGUID="52795ef6-17c7-445a-ae51-b41420c4f190" CreationDate="2010-09-02T13:17:19.830" UserId="1750" Comment="added 158 characters in body" Text="Because MVC doesn't fit in the architecture of a game. The dataflow for a game is entirely different than that of a enterprice application, because it's not as event driven and there is often a (very) tight millisecond budget in which to perform these operations. There are a lot of things that need to happen in 16.6 milliseconds so it's more beneficial to have a 'fixed' and rigid data pipeline that processes the data you need on screen in exactly that time. &#xD;&#xA;&#xD;&#xA;Also, the separation is there; most of the time it's just not wired the same way as the MVC pattern. There is a rendering engine (View), user input handling (Controller) and the rest such as gameplay logic, ai, and physics (Model). Think about it; if you're fetching user input, running the ai and rendering the image 60 times per second, then why would you need an Observer between the model and the view to tell you what has changed? Don't interpret this as me saying that you don't need the Observer pattern in games, you do, but in this case you really don't. You're doing all that work, every frame, anyway.&#xD;&#xA;&#xD;&#xA;Although TDD is hardly ever used in development studios, we do use Agile practices towards software development and SCRUM seems to be the popular choice at least here in Europe. The reason is simple, the changes come from everywhere. The artists might want more texture budget, larger worlds, more trees while the designers want a richer story (more content on disk), a streaming world and the publishers want you to finish on time, and on budget and so does the marketing department. And apart from that, the &quot;state of the art&quot; keeps changing rapidly.&#xD;&#xA;&#xD;&#xA;That doesn't mean that we don't do testing either, most studios have large Q&amp;A departments, run loads of regression tests and do unit tests on a regular basis. However, there's hardly any point doing unit tests upfront because a large part of the bugs are art/graphics related (holes in collision meshes, wrong textures whatever, glitch in the depth of field shader) that unit tests can't cover. And besides working code, the most important factor of **any** game is that it's fun, and there's no unit testing that.&#xD;&#xA;&#xD;&#xA;Also remember that in the console world this is even different still, because you're programming more for the hardware then for anything else. This generally (PS2/PS3) means that the flow of the data is way more important then the flow of the code in nearly every case; due to performance considerations. Which nullifies the use of TDD as an architectural tool in most cases. Good OOP code generally has bad dataflow, making it hard to vectorize and parallelize." />
  <row Id="6826" PostHistoryTypeId="2" PostId="3483" RevisionGUID="917bdd82-9d2a-4a12-85ca-9e9d923ab534" CreationDate="2010-09-02T14:46:24.927" UserId="1463" Text="[RedDwarf][1] is a Java Game Engine.  This is the old Project DarkStar that Sun use to fund.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.reddwarfserver.org/" />
  <row Id="6827" PostHistoryTypeId="2" PostId="3484" RevisionGUID="d39cfd8e-0216-42fa-a188-9b9cd8482703" CreationDate="2010-09-02T14:49:32.490" UserId="1943" Text="&gt; John Romero's about to make you his bitch.&#xD;&#xA;&#xD;&#xA;While it's not a quote of a game professional, it's definitively the star example on how to **not** make game PR, and how easy it is to hype expectations to a startling and spectacular failure." />
  <row Id="6828" PostHistoryTypeId="16" PostId="3484" RevisionGUID="d39cfd8e-0216-42fa-a188-9b9cd8482703" CreationDate="2010-09-02T14:49:32.490" UserId="-1" />
  <row Id="6829" PostHistoryTypeId="2" PostId="3485" RevisionGUID="dc6bb890-3ace-4211-aa48-e76eb31a00bf" CreationDate="2010-09-02T14:52:18.337" UserId="1943" Text="&gt; *&quot;When it's done&quot;*&#xD;&#xA;&#xD;&#xA;Various. Positive example - *Blizzard*. Negative example - *3D Realms*." />
  <row Id="6830" PostHistoryTypeId="16" PostId="3485" RevisionGUID="dc6bb890-3ace-4211-aa48-e76eb31a00bf" CreationDate="2010-09-02T14:52:18.337" UserId="-1" />
  <row Id="6831" PostHistoryTypeId="2" PostId="3486" RevisionGUID="e2f8d927-9ffa-435f-88fc-13b8ec5a38fc" CreationDate="2010-09-02T15:14:12.530" UserId="2010" Text="If I create a client program using say C#, or develop something for the Android or Iphone, can I use Google App Engine for the server and communicate with the client application mentioned above?" />
  <row Id="6832" PostHistoryTypeId="1" PostId="3486" RevisionGUID="e2f8d927-9ffa-435f-88fc-13b8ec5a38fc" CreationDate="2010-09-02T15:14:12.530" UserId="2010" Text="Can Google App Engine communicate with a stand alone program?" />
  <row Id="6833" PostHistoryTypeId="3" PostId="3486" RevisionGUID="e2f8d927-9ffa-435f-88fc-13b8ec5a38fc" CreationDate="2010-09-02T15:14:12.530" UserId="2010" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;client-server&gt;&lt;google-app-engine&gt;" />
  <row Id="6834" PostHistoryTypeId="2" PostId="3487" RevisionGUID="6cce3191-fb01-416c-8367-13f50c997497" CreationDate="2010-09-02T15:18:21.260" UserId="891" Text="[**Slick**][1] is a nice 2D Java library based off of LWJGL.  It handles the game loop, rendering, and contains useful functionality to implement sprites.&#xD;&#xA;&#xD;&#xA;It comes bundled with many different demos and examples.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/" />
  <row Id="6835" PostHistoryTypeId="2" PostId="3488" RevisionGUID="e224aae5-b1e3-4b7f-991c-c6241f8a9d76" CreationDate="2010-09-02T15:50:40.370" UserDisplayName="youngProgrammer" Text="I download game called: Brain Exercise with Dr.Kawashima. This game is only one exe. And it can making saves, and I want to ask how ? It hasn't got any data files, only this exe ?" />
  <row Id="6836" PostHistoryTypeId="1" PostId="3488" RevisionGUID="e224aae5-b1e3-4b7f-991c-c6241f8a9d76" CreationDate="2010-09-02T15:50:40.370" UserDisplayName="youngProgrammer" Text="Saves in exe file" />
  <row Id="6837" PostHistoryTypeId="3" PostId="3488" RevisionGUID="e224aae5-b1e3-4b7f-991c-c6241f8a9d76" CreationDate="2010-09-02T15:50:40.370" UserDisplayName="youngProgrammer" Text="&lt;engine&gt;" />
  <row Id="6838" PostHistoryTypeId="2" PostId="3489" RevisionGUID="da7eb019-1b18-48bb-ad46-54860e393d88" CreationDate="2010-09-02T15:56:53.920" UserId="1134" Text="It may be making saves in the [Registry][1] or somewhere under your %APPDATA% folder, or in your homedir's &quot;My Documents&quot; or &quot;My Games&quot; subfolders.  Or anywhere else on your hard drive, for that matter.  It is unlikely to be modifying its own exe to save, although I suppose that is possible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry" />
  <row Id="6839" PostHistoryTypeId="2" PostId="3490" RevisionGUID="e84ac99d-ad63-436d-b936-605769868579" CreationDate="2010-09-02T16:34:24.380" UserId="395" Text="As long as the client speaks HTTP, sure. If you have more of this kind of general question, SO might be a better place for them." />
  <row Id="6840" PostHistoryTypeId="2" PostId="3491" RevisionGUID="a25f3666-37d9-44f9-ae05-a9bd5e5a6d7f" CreationDate="2010-09-02T16:35:49.667" UserId="395" Text="A fair number still use Speedtree, and Bink and Scaleform are as common in MMOs as they are everywhere else." />
  <row Id="6841" PostHistoryTypeId="16" PostId="3491" RevisionGUID="a25f3666-37d9-44f9-ae05-a9bd5e5a6d7f" CreationDate="2010-09-02T16:35:49.667" UserId="-1" />
  <row Id="6842" PostHistoryTypeId="5" PostId="3459" RevisionGUID="7e6d8dff-069d-44c7-99be-bd79284e118a" CreationDate="2010-09-02T17:01:26.603" UserId="1970" Comment="added 15 characters in body" Text="I don't know about efficiency, but this is the method I've been using for a long time:&#xD;&#xA;&#xD;&#xA;Pretty simple method: Just add the screen-Y and the Z to get a 'distance', and then keep them in a list sorted by this property.&#xD;&#xA;&#xD;&#xA;    // In the 'update' of each entity&#xD;&#xA;    entity.distance = entity.y + entity.z;&#xD;&#xA;&#xD;&#xA;Then use:&#xD;&#xA;&#xD;&#xA;    allEntities:Array;&#xD;&#xA;    // ...&#xD;&#xA;    &#xD;&#xA;    allEntities.sortOn(&quot;distance&quot;, Array.NUMERIC);&#xD;&#xA;&#xD;&#xA;Finally, rather than using Flash's rendering, I always blit things myself when I'm very concerned about depth sorting:&#xD;&#xA;&#xD;&#xA;    canvas:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight);&#xD;&#xA;    for each (var e:Entity in allEntities) {&#xD;&#xA;        // draw each entity in sorted order&#xD;&#xA;        canvas.draw(e, e.transform.matrix);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Caveat**: This opens up the can of worms which is doing your own blitting. But as I mentioned, I've always found it a road worth going down when trying to deal with depths in a precise way.&#xD;&#xA;" />
  <row Id="6843" PostHistoryTypeId="2" PostId="3492" RevisionGUID="188cf7e1-ad8e-408e-8f42-5844b9651113" CreationDate="2010-09-02T17:18:01.810" UserId="1966" Text="In some games, when you missed a pickup, you can never get them again unless you restart the game, and the pickups count in your collection. (therefore, you must restart the game to finish the collection, if you made any mistakes)&#xD;&#xA;&#xD;&#xA;In Pokemon, you have only one Master Ball, limited supply of Ethers and legendary Pokemon appear once per game. Trading fixes all of that problems.&#xD;&#xA;&#xD;&#xA;For more radical perfectionist, they demanded every dialogs, background music, and even items to be revisitable.&#xD;&#xA;Some games, like Naruto Ninja Council, satisfied all of that needs.&#xD;&#xA;&#xD;&#xA;Is it always a good practice to make things revisitable? Even cutscenes and music? When it's not a good practice to do so?&#xD;&#xA;" />
  <row Id="6844" PostHistoryTypeId="1" PostId="3492" RevisionGUID="188cf7e1-ad8e-408e-8f42-5844b9651113" CreationDate="2010-09-02T17:18:01.810" UserId="1966" Text="Revisitability of Game Elements" />
  <row Id="6845" PostHistoryTypeId="3" PostId="3492" RevisionGUID="188cf7e1-ad8e-408e-8f42-5844b9651113" CreationDate="2010-09-02T17:18:01.810" UserId="1966" Text="&lt;best-practices&gt;" />
  <row Id="6846" PostHistoryTypeId="2" PostId="3493" RevisionGUID="f987f1f7-2f00-4ed1-bb19-0f379f7b4b09" CreationDate="2010-09-02T17:45:09.407" UserId="465" Text="I've worked with several engines and I'm most comfortable with a mature engine, world editor and C++ codebase.&#xD;&#xA;&#xD;&#xA;I'm now looking at Unity as a side-project and have mostly been working in Javascript.&#xD;&#xA;&#xD;&#xA;Has anyone done a large scale project with Unity and does it require Visual Studio or is sticking to the Javascript approach best?&#xD;&#xA;&#xD;&#xA;Are there any big pitfalls with large scale Unity projects or with working with Visual Studio?&#xD;&#xA;&#xD;&#xA;Most the stuff I've seen has been focused at smaller Indies or people with little experience." />
  <row Id="6847" PostHistoryTypeId="1" PostId="3493" RevisionGUID="f987f1f7-2f00-4ed1-bb19-0f379f7b4b09" CreationDate="2010-09-02T17:45:09.407" UserId="465" Text="Should larger Unity Projects use Visual Studio" />
  <row Id="6848" PostHistoryTypeId="3" PostId="3493" RevisionGUID="f987f1f7-2f00-4ed1-bb19-0f379f7b4b09" CreationDate="2010-09-02T17:45:09.407" UserId="465" Text="&lt;best-practices&gt;&lt;unity&gt;" />
  <row Id="6849" PostHistoryTypeId="2" PostId="3494" RevisionGUID="5ac6dac7-41a8-4114-a310-f167fb7418ca" CreationDate="2010-09-02T17:50:11.950" UserId="465" Text="We used Google App Engine as a back-end for some mobile game projects. I strongly recommend it.&#xD;&#xA;&#xD;&#xA;It's simple and very awesome, and HTTP is simple to implement on most platforms as many include API's for it. You must design the systems with a RESTFUL approach.&#xD;&#xA;&#xD;&#xA;I also wrote an internal stat tracking and debugging tool using Goole App Engine which we used internally to monitor our test builds for console games." />
  <row Id="6850" PostHistoryTypeId="2" PostId="3495" RevisionGUID="56bfaa41-ae4e-4bc7-b869-0356d599961c" CreationDate="2010-09-02T18:10:43.647" UserId="1780" Text="As Unity is highly cross platform, I suspect that there is no requirement to use Visual Studio.  You should use whatever development tools you're comfortable with.  I've learned Vim over the past year and can't recommend it highly enough as an editor.  Presumably any code build you would need to do could be accomplished on the command line." />
  <row Id="6851" PostHistoryTypeId="5" PostId="3489" RevisionGUID="f4b4b66c-9965-4627-bdbd-ba79420d7b5b" CreationDate="2010-09-02T18:24:45.427" UserId="1134" Comment="added 88 characters in body" Text="It may be making saves in the [Registry][1] or somewhere under your %APPDATA% folder, or in your homedir's &quot;My Documents&quot; or &quot;My Games&quot; subfolders.  Or anywhere else on your hard drive, for that matter.  It is unlikely to be modifying its own exe to save, although I suppose that is possible (if a very bad idea: see AttackingHobo's comment below for a sample of the reasons why).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry" />
  <row Id="6852" PostHistoryTypeId="2" PostId="3496" RevisionGUID="4a39bde7-f3cf-486e-93a8-14e79e2908ea" CreationDate="2010-09-02T19:35:44.830" UserId="1970" Text="Depends what you mean by &quot;require Visual Studio&quot;. Your choice of IDE isn't really related to the language used or size of the project, in my opinion, just so long as you're using an editor you feel comfortable with.&#xD;&#xA;&#xD;&#xA;If you are looking for editors other than the default Scite that comes with Unity...&#xD;&#xA;&#xD;&#xA;If you feel like changing from Javascript to C# or Boo, I find [Monodevelop][1] to be very excellent. There are some other [suggestions here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://monodevelop.com/&#xD;&#xA;  [2]: http://www.unifycommunity.com/wiki/index.php?title=Script_Editors" />
  <row Id="6853" PostHistoryTypeId="2" PostId="3497" RevisionGUID="ce5c99bf-a5dc-4a80-aafb-f2ac1a9ab67f" CreationDate="2010-09-02T19:44:09.723" UserId="1970" Text="It definitely depends on what your intentions are for the game!&#xD;&#xA;&#xD;&#xA;For example: If the game is some sprawling RPG with 60h of gameplay and 1000 secrets, then yes, as a player I would expect to be able to slowly chart out the world and collect things. Or, they should be able to miss things (make them non-revisitable) by choice, but not by ignorance (i.e. get the Super Sword, or the Super Shield, but not both).&#xD;&#xA;&#xD;&#xA;Alternatively, if the game is short and/or linear, missing content on the first playthrough can provide motivation for second/third/... playthroughs. In this case it may be interesting to make it impossible to see everything in a single playthrough. Or it may not!&#xD;&#xA;&#xD;&#xA;It depends on how you want people to approach the game, what kind of value (both gameplay and real-world) these things hold, and why you want people to be gaining these things in the first place. Remember: You can't please everyone, all of the time. Figure out who your game is for and make a game for them!" />
  <row Id="6854" PostHistoryTypeId="2" PostId="3498" RevisionGUID="2687eae3-44b6-4275-ac9a-cfd45cfb1c3c" CreationDate="2010-09-02T19:52:24.167" UserId="187" Text="&gt; A game is a series of interesting choices.&#xD;&#xA;&#xD;&#xA;-Sid Meier [[Bio][1]]&#xD;&#xA;&#xD;&#xA;[[Source][2]]&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Sid_Meier&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Gameplay#cite_note-10&#xD;&#xA;" />
  <row Id="6855" PostHistoryTypeId="16" PostId="3498" RevisionGUID="2687eae3-44b6-4275-ac9a-cfd45cfb1c3c" CreationDate="2010-09-02T19:52:24.167" UserId="-1" />
  <row Id="6856" PostHistoryTypeId="2" PostId="3499" RevisionGUID="bac66727-5c66-4530-bb0b-51869651db32" CreationDate="2010-09-02T19:54:37.927" UserId="1156" Text="I would say it depends on the kind of game. Something like an RPG, it wouldn't fit the game that Mr. Look At Me With My Amazing Armour Which You Didn't Pick Up Earlier suddenly reappeared, with the set of unique armour just because you didn't pick it up and instead a band of rogues did. However, it would fit that, for example, you find those rogues with the armour later. Then again, the other issue would be that the player could not physically pick up said items. An idea would be that they are kept, somehow. **You do not want to punish players for something they cannot control or predict, such as inventory space.**&#xD;&#xA;&#xD;&#xA;On the other hand, an arcade game or something with less of a storyline would probably benefit from being able to replay. There's no reason for the player not to be able to re-defeat Master Foo, when the game is split up.&#xD;&#xA;&#xD;&#xA;Cinematics and the like, I would say, are a different ball-game. I know on Red Faction: Guerilla, I am a fan of the cutscenes and am glad that I can rewatch.&#xD;&#xA;&#xD;&#xA;It really depends on the game length, the type of market, and the game genre." />
  <row Id="6857" PostHistoryTypeId="5" PostId="3488" RevisionGUID="25a18e7f-ae3c-4650-a55b-f1f50b4e9ff1" CreationDate="2010-09-02T20:58:22.150" UserId="47" Comment="fixed grammar; added 2 characters in body" Text="I downloaded a game called *Brain Exercise with Dr.Kawashima*. This game contains only one exe and no data files.  However, the game can create saves. I wanted to ask how does it do that since it doesn't have any data files, just only the exe file?" />
  <row Id="6858" PostHistoryTypeId="2" PostId="3500" RevisionGUID="9dc3ead2-960b-4954-aab7-37bbc2b7e816" CreationDate="2010-09-02T21:02:36.967" UserId="47" Text="You shouldn't have any problems with using Google Apps as a server for your client via HTTP.  I'd even recommend it, especially since it is a free service ([with some limitations][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/appengine/docs/quotas.html" />
  <row Id="6859" PostHistoryTypeId="5" PostId="3473" RevisionGUID="ec053a61-e69c-4fd9-9ce6-8eced10f15ce" CreationDate="2010-09-02T21:03:46.500" UserId="47" Comment="deleted 11 characters in body; edited title" Text="I am developing a game, a word game. I have UIView, in this I have to show the keyboard, without using UITextField. Could you please suggest me something on how to do this?&#xD;&#xA;" />
  <row Id="6860" PostHistoryTypeId="4" PostId="3473" RevisionGUID="ec053a61-e69c-4fd9-9ce6-8eced10f15ce" CreationDate="2010-09-02T21:03:46.500" UserId="47" Comment="deleted 11 characters in body; edited title" Text="How to show iPad keyboard?" />
  <row Id="6861" PostHistoryTypeId="2" PostId="3501" RevisionGUID="3d30c4b1-267d-40a1-a703-02e4071735cd" CreationDate="2010-09-02T21:32:20.237" UserId="141" Text="I figured out that my problem was twofold. One, I didn't have enough normals defined. Two, I was using flat shading. With only one normal to go on, all the faces were using the same normal for shading, hence they all reflected light in exactly the same way. So my model was a uniform color. Adding more normals and using smooth shading made it look nice." />
  <row Id="6862" PostHistoryTypeId="2" PostId="3502" RevisionGUID="611780db-8593-4a9a-8b71-59f0b8922831" CreationDate="2010-09-02T22:00:17.953" UserId="1924" Text="First get the surface tangent from the surface normal: **t** = (normal.y, -normal.x)&#xD;&#xA;&#xD;&#xA;Then you can get the velocity component along the surface as **vt** = **v** dot **t**.&#xD;&#xA;&#xD;&#xA;Now you can calculate the rotation the ball: &#xD;&#xA;**w** = (**normal** * RADIUS) cross **vt**, where RADIUS is the radius of the ball. &#xD;&#xA;&#xD;&#xA;Here I assume the ball has no inertia and begins to spin instantly at the speed it would if it was to roll along the surface. You can use a coefficient of friction to make it more realistic and, if you want, take into account the inertia of the ball." />
  <row Id="6863" PostHistoryTypeId="5" PostId="3502" RevisionGUID="6ac296ab-0c1a-46a9-8676-8de62aca4e44" CreationDate="2010-09-02T22:33:04.403" UserId="1924" Comment="improved formatting" Text="First get the surface tangent from the surface normal: **t** = (ny, -nx)&#xD;&#xA;&#xD;&#xA;Then you can get the velocity component along the surface as **vt** = **v** dot **t**.&#xD;&#xA;&#xD;&#xA;Now you can calculate the rotation of the ball: &#xD;&#xA;w = |(**normal** * r) cross **vt**|, where r is the radius of the ball. &#xD;&#xA;&#xD;&#xA;Here I assume the ball has no inertia and begins to spin instantly at the speed it would if it was to roll along the surface. You can use a coefficient of friction to make it more realistic and, if you want, take into account the inertia of the ball." />
  <row Id="6864" PostHistoryTypeId="2" PostId="3503" RevisionGUID="17ca501a-c61c-4831-8662-c2a0c8474a86" CreationDate="2010-09-02T22:34:17.873" UserId="458" Text="I would say a lot depends on your intention.&#xD;&#xA;&#xD;&#xA;With the original Pokemon Red/Blue, I think it was flatly impossible to complete your collection without trading. But since trading and battling other players was a large part of the intended core gameplay, forcing the issue made sense. &#xD;&#xA;&#xD;&#xA;I think Chrono Trigger was the first game to offer the popular &quot;New Game+&quot; option that lets you restart after beating the game, preserving your inventory and levels and giving you immediate access to all game locations, specifically to aid completionist players. You might find that to be a good compromise, if the player might miss out on some things early on but be able to go back after the game is done.&#xD;&#xA;&#xD;&#xA;I'm sure at least some games had obscure secrets in them with no clues and no way to go back and get them again after passing a certain point, specifically as a ploy to sell more strategy guides. If that's your reason, I'd say that is borderline unethical design, at least." />
  <row Id="6865" PostHistoryTypeId="2" PostId="3504" RevisionGUID="cdeb3cc6-0295-46dd-832f-fd2577db1281" CreationDate="2010-09-02T22:35:45.130" UserId="831" Text="Can anyone suggest a memory efficient way to represent a tree of matrices, for example in a hierarchy model?&#xD;&#xA;&#xD;&#xA;I'm particularly keen to preserve data locality, and I suspect a structure-of-arrays (matrices &amp; indices to matrices) type approach might be suitable.&#xD;&#xA;&#xD;&#xA;As well as many chained matrix computations, this structure will probably be copied around in memory a fair bit, so having contiguous storage would be a big bonus.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6866" PostHistoryTypeId="1" PostId="3504" RevisionGUID="cdeb3cc6-0295-46dd-832f-fd2577db1281" CreationDate="2010-09-02T22:35:45.130" UserId="831" Text="Efficient structure for representing a transform hierarchy." />
  <row Id="6867" PostHistoryTypeId="3" PostId="3504" RevisionGUID="cdeb3cc6-0295-46dd-832f-fd2577db1281" CreationDate="2010-09-02T22:35:45.130" UserId="831" Text="&lt;memory-efficiency&gt;&lt;tree&gt;" />
  <row Id="6868" PostHistoryTypeId="5" PostId="3502" RevisionGUID="aacd049d-420f-409c-9600-38edc1e1c608" CreationDate="2010-09-02T22:54:03.013" UserId="1924" Comment="corrected terminology" Text="First get the surface tangent from the surface normal: **t** = (ny, -nx)&#xD;&#xA;&#xD;&#xA;Then you can get the velocity component along the surface as **vt** = **v** dot **t**.&#xD;&#xA;&#xD;&#xA;Now you can calculate the rotation of the ball: &#xD;&#xA;w = |(**normal** * r) cross **vt**|, where r is the radius of the ball. &#xD;&#xA;&#xD;&#xA;Here I assume the ball has no rotational inertia and begins to spin instantly at the speed it would if it was to roll along the surface. You can use a coefficient of friction to make it more realistic and, if you want, take into account the rotational inertia of the ball." />
  <row Id="6869" PostHistoryTypeId="2" PostId="3505" RevisionGUID="934a2873-0c00-491e-a8fa-1a3bd30b44b6" CreationDate="2010-09-03T02:17:46.883" UserId="1780" Text="The tree-as-array sounds like a win to me.  Just do a depth-first traversal of your hierarchy and fill out an array; when rewinding through the recursion you can either update the parent with the absolute index to the child or just the delta-from-me, and the children can store the parent indices either way as well.  Indeed, if you use relative offsets then you don't need to carry the root address around.  I suppose that the structure would probably look something like&#xD;&#xA;&#xD;&#xA;    struct Transform&#xD;&#xA;    {&#xD;&#xA;       Matrix m; // whatever you like&#xD;&#xA;       int parent;   // index or offset, you choose!&#xD;&#xA;       int sibling;&#xD;&#xA;       int firstchild;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;...so you'd need nodes to know how to get to siblings too since you can't (easily) have a variable size structure.  Although I guess if you used byte offsets instead of Transform offsets, you could have a variable number of children per transform:&#xD;&#xA;&#xD;&#xA;    struct Transform&#xD;&#xA;    {&#xD;&#xA;       Matrix m; // whatever you like&#xD;&#xA;       int parent;  // negative byte offest&#xD;&#xA;       int numchildren;&#xD;&#xA;       int child[0]; // can't remember if you put a 0 there or leave it empty;&#xD;&#xA;                     // but it's an array of positive byte offsets&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;...then you just need to make sure that you put successive Transforms in the right place." />
  <row Id="6870" PostHistoryTypeId="2" PostId="3506" RevisionGUID="81fecd72-7d33-40f3-977c-974a5509eb9e" CreationDate="2010-09-03T02:46:00.307" UserId="2017" Text="I have started a few game projects in the past, but have never finished anything.  I decided that it was probably because I was writing everything thing from scratch, and just ended up dropping the project once development started taking too long.&#xD;&#xA;&#xD;&#xA;I've decided that I want to finish my first game now, and needed some opinions on what sort of middleware would be good to use.  I was hoping that with an engine provided for me, I'd be able to finish the game.&#xD;&#xA;&#xD;&#xA;I am most familiar with C++, but do know quite a few other languages as well." />
  <row Id="6871" PostHistoryTypeId="1" PostId="3506" RevisionGUID="81fecd72-7d33-40f3-977c-974a5509eb9e" CreationDate="2010-09-03T02:46:00.307" UserId="2017" Text="What technology is best for building my first game" />
  <row Id="6872" PostHistoryTypeId="3" PostId="3506" RevisionGUID="81fecd72-7d33-40f3-977c-974a5509eb9e" CreationDate="2010-09-03T02:46:00.307" UserId="2017" Text="&lt;game-design&gt;&lt;engine&gt;" />
  <row Id="6873" PostHistoryTypeId="2" PostId="3507" RevisionGUID="f5bfbcb0-174a-4ab8-b016-005487c1f81f" CreationDate="2010-09-03T04:33:27.107" UserId="1588" Text="Your question is pretty broad as you haven't said what type of game you're making.&#xD;&#xA;I'm using 'pygame' as I like to make simple 2D games with sprites." />
  <row Id="6874" PostHistoryTypeId="2" PostId="3508" RevisionGUID="96f3aa5c-ea9c-48a9-bda6-c1d32831a3df" CreationDate="2010-09-03T04:42:13.677" UserId="891" Text="[**HGE - Haaf's Game Engine**][1] is a C++ 2D engine.  A very well established and very stable engine based off of DirectX.&#xD;&#xA;&#xD;&#xA;I would definitely recommend making clones of very simple 2D games to stop yourself from getting too ambitious.  Tetris, mine sweeper, pacman, etc. &#xD;&#xA;&#xD;&#xA;  [1]: http://hge.relishgames.com/" />
  <row Id="6875" PostHistoryTypeId="2" PostId="3509" RevisionGUID="f264b301-475b-477a-a7c9-07262af1e4af" CreationDate="2010-09-03T04:45:15.800" UserId="1529" Text="Indexing into array of matrices would probably be the most straight forward, memory efficient approach. &#xD;&#xA;&#xD;&#xA;A chain of transforms could be held in a LIFO as series of pointers or integers or other small struct that index into the matrix array. This would help prevent storing redundant matrices and would separate the data storage code from the data accessor code. &#xD;&#xA;&#xD;&#xA;Ultimately you would just push and pop index values from the LIFO to store or play back your transform chain.&#xD;&#xA;&#xD;&#xA;You might also be able to save a little memory if your matrix structure could also contain the transform type...rotation, translation, etc. Otherwise the type would need to be stored with the index resulting in more possible duplication." />
  <row Id="6876" PostHistoryTypeId="2" PostId="3510" RevisionGUID="a668d08e-9f8b-4e77-a889-68b34efcc10a" CreationDate="2010-09-03T05:45:04.680" UserId="539" Text="I would recommend Flash and probably the [Flixel](http://flixel.org/) engine. The engine abstracts a lot of Flash-isms from you and takes care of many common game components. Things like collision detection, tilemaps, spritesheets, and animations are all taken care of for you. As for tools you can use [Flash Develop](http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page) on Windows, it's free and one of the best editors for Flash. On Linux and OS X your options are slightly more limited I might recommend using the command line compiler and Vim, or [Flash Builder](http://www.adobe.com/products/flashbuilder/) at least while it's available on trail.&#xD;&#xA;&#xD;&#xA;The reasons I recommend Flash are as follows:&#xD;&#xA;&#xD;&#xA;  * Very high level language keeps you focused on game specific stuff instead of memory leaks, etc&#xD;&#xA;  * Large, mature community has likely solved any problem you run into, code and examples is easy to find with your favorite search engine&#xD;&#xA;  * Established market has simple ways to distribute your game to customers, you can self host, go through a sponsor, post to a portal, use Facebook, etc&#xD;&#xA;  * Mostly everyone can play a Flash game, getting a million plays isn't considered a big deal, so if you want to get your game out there it's a good choice.&#xD;&#xA;  * Likewise it's very easy to share with a friend or tester. Just send a link, no need to worry about run-times, installations, etc.&#xD;&#xA;  * Flash CS IDE is a world class editor for layout and asset management. Plus if you later want to hire an artist he will likely be an expert working with it.&#xD;&#xA;  * Great libraries such as [Tweenlite](http://www.greensock.com/tweenlite/) make it really easy to polish your game&#xD;&#xA;  * Multiple ways to monetize your game -- though don't expect it to be easy -- through sponsorships, advertisements, direct sales, etc&#xD;&#xA;  * Adobe AIR makes it pretty easy to make your game available as a &quot;native&quot; application, in my experience the process is better than, say, Java" />
  <row Id="6877" PostHistoryTypeId="2" PostId="3511" RevisionGUID="f5c18832-b8bd-43d6-a5dc-85c3ba3cd87e" CreationDate="2010-09-03T06:35:20.517" UserId="865" Text="Since in most isometric games most of the stuff is static it doesn't really matter how inefficient it is (within reason of course), as there's only a few objects you need to insert in the right place into an array that can be presorted already. If you are resorting everything everytime you draw, it would, but it means your algorithm is wrong to begin with.&lt;br&gt; &#xD;&#xA;Rule #1 in optimization: try if there's a more efficient solution on the macro level, before you optimize the micro level. (well, okay that's #2, #1 would be don't optimize before it's a *measured* bottleneck)" />
  <row Id="6878" PostHistoryTypeId="2" PostId="3512" RevisionGUID="0adfcb36-91cf-4976-8c30-cf4071c87725" CreationDate="2010-09-03T06:42:39.043" UserId="2018" Text="I had this chat with a friend of mine about whether an AI can be created or not that could beat any human without resource cheating in a real time strategy game. An AI that would play almost perfectly. The AI of today's games have many areas that can be improved, most of them rely on resource cheating, a better early base developement because of that, and attacking in waves.&#xD;&#xA;&#xD;&#xA;Still, the question is what would need to be done to improve on this to obtain the ultimate AI. Also, if you have any example of a game where a certain feature was used it would be great." />
  <row Id="6879" PostHistoryTypeId="1" PostId="3512" RevisionGUID="0adfcb36-91cf-4976-8c30-cf4071c87725" CreationDate="2010-09-03T06:42:39.043" UserId="2018" Text="what can be done to improve the ultimate insane real time strategy game AI?" />
  <row Id="6880" PostHistoryTypeId="3" PostId="3512" RevisionGUID="0adfcb36-91cf-4976-8c30-cf4071c87725" CreationDate="2010-09-03T06:42:39.043" UserId="2018" Text="&lt;ai&gt;" />
  <row Id="6881" PostHistoryTypeId="2" PostId="3513" RevisionGUID="905b2864-dc15-4eca-8e9b-2724f7646865" CreationDate="2010-09-03T06:53:18.637" UserId="1443" Text="As with most questions the answer is never &quot;yea or nay&quot;, black or white.  STL is a good fit for some problems, using it for those problems should be fine.  It's a mistake to assume it's useless, yet it's also a mistake to assume that it is appropriate to use in every situation.&#xD;&#xA;&#xD;&#xA;The biggest issue to watch out for when using STL in game development is memory allocation.  STL's default allocators don't seem to fit well into preferred allocation strategies for game development.  Of course custom allocators can be used, but this makes the whole idea less appealing if you're considering whether to add STL to a non-STL codebase.&#xD;&#xA;&#xD;&#xA;Add to this that if your codebase is non-STL, you may not have anyone familiar enough with STL or template concepts to implement the custom allocators correctly." />
  <row Id="6882" PostHistoryTypeId="2" PostId="3514" RevisionGUID="0af3ef87-bf59-46eb-8f51-55e9ba020ad7" CreationDate="2010-09-03T07:41:15.133" UserId="259" Text="It's kind of a difficulty question to answer. To state what needs improving, you need to have some known AI to work from. However here are some examples of RTS AI from aigamedev.com (registration required):&#xD;&#xA;&#xD;&#xA;* [Grand Strategy and Political Simulation in EUROPA UNIVERSALIS 3 with Henrik Fåhraeus][1]&#xD;&#xA;* [Using Potential Fields in a Real-time Strategy Game Scenario (Tutorial)][2]&#xD;&#xA;&#xD;&#xA;Unfortunately most of the really good stuff is behind the paywall.&#xD;&#xA;&#xD;&#xA;A common AI solution is the Goal-Orientated Action Planner, which uses rules to form plans to satsify goals. It's been around a while now but it's very cool. There's a [brief overview][3] (pdf) available on Jeff Orkin's site about how it's applied to an FPS, but exactly the same principle (with different rules and goals) works for RTSs.&#xD;&#xA;&#xD;&#xA;Many RTSs will use heirarchies of GOAPs, with different levels recieving goals from the level above, and concerned with different levels of detail of the battlefield. I read a great article on some WWII hex wargame's AI that was structured like this, but for all that is google I can't find the link now. Gold star for anyone who can help me out.&#xD;&#xA;&#xD;&#xA;Of course the effectiveness of GOAPs and other planners depend on how well you parse your game world, and how refined your actions and goals are.&#xD;&#xA;&#xD;&#xA;Other common tech includes [Utility architectures][4] (pdf) for scoring and priorities, and [blackboards][5] for parsing the game world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aigamedev.com/insider/interviews/europa-universalis/&#xD;&#xA;  [2]: http://aigamedev.com/open/tutorials/potential-fields/&#xD;&#xA;  [3]: http://web.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf&#xD;&#xA;  [4]: http://files.aigamedev.com/coverage/GDC10_UtilityTheory.pdf&#xD;&#xA;  [5]: http://aigamedev.com/open/highlights/static-blackboard/" />
  <row Id="6884" PostHistoryTypeId="2" PostId="3516" RevisionGUID="1de9127f-869f-4ccd-a7ea-1f730b6e8154" CreationDate="2010-09-03T08:22:52.243" UserId="1742" Text="I say nay to the STL. My reason is quite simple:&#xD;&#xA;&#xD;&#xA; 1. You dont' need the STL to write games. Not even large ones.&#xD;&#xA; 2. STL dramatically increases your compile time.&#xD;&#xA; 3. Large compile time leads to less iterations over your development.&#xD;&#xA;&#xD;&#xA;I hold iteration count to be of the highest importance, so I just stay away from the STL, and any other development technique that slows down iterations (like architecting for the sake of it, or script languages that need to be compiled).&#xD;&#xA;&#xD;&#xA;Costly iterations lead to huge development teams of people trying to get stuff done with very little actually happening. I've seen it and heard it, and one of the culprits seems to be compile times for template libraries." />
  <row Id="6886" PostHistoryTypeId="5" PostId="3477" RevisionGUID="52705819-3a17-457c-beeb-c94c46c3bc98" CreationDate="2010-09-03T09:20:23.703" UserId="119" Comment="added 155 characters in body; edited body" Text="    private function positionOrthographic():void&#xD;&#xA;    {&#xD;&#xA;     for each (var entity:Entity in entities)&#xD;&#xA;     {&#xD;&#xA;     entity.spriteView.x = entity.body.position.x;&#xD;&#xA;     entity.spriteView.y = entity.body.position.y + entity.body.positionZ;&#xD;&#xA;    &#xD;&#xA;     var sortedEntities:Array = entities.concat();&#xD;&#xA;     sortedEntities.sort(sortDepths, Array.DESCENDING | Array.NUMERIC);&#xD;&#xA;   &#xD;&#xA;     var numEntities:int = entities.length;&#xD;&#xA;   &#xD;&#xA;     for (var i:int = 0; i &lt; numEntities; i++)&#xD;&#xA;     {&#xD;&#xA;      world.setChildIndex(sortedEntities[i].spriteView, i); &#xD;&#xA;     }&#xD;&#xA; }&#xD;&#xA;  &#xD;&#xA; private function sortDepths(entity1:Entity, entity2:Entity):int&#xD;&#xA; {&#xD;&#xA;     if (entity1.layer &lt; entity2.layer) return 1;&#xD;&#xA;  if (entity1.layer &gt; entity2.layer) return -1;&#xD;&#xA;  if (entity1.body.position.y &gt; entity2.body.position.y)return -1;&#xD;&#xA;  if (entity1.body.position.y &lt; entity2.body.position.y)return 1;&#xD;&#xA;  return 0;&#xD;&#xA; }&#xD;&#xA;&#xD;&#xA;Important to note I'm using the y axis as depth into the scene here (would normally be Z). This is so I can share code between top-down and side-on games. Splits sorting into a separate function. No idea how efficient it is, other than I've never noticed any slowdown from using it. Supports layers, so e.g. HUD and floating text things can always appear on top, backgrounds always below, etc." />
  <row Id="6887" PostHistoryTypeId="2" PostId="3517" RevisionGUID="98edf9f8-1d4b-4d5b-8e23-1430260c1909" CreationDate="2010-09-03T10:05:06.350" UserId="1143" Text="The point is, if you've got an AI &#xD;&#xA;&#xD;&#xA;&gt; that could beat any human without resource cheating in a real time strategy game&#xD;&#xA;&#xD;&#xA;then you have a game no one will play becuase they couldn't get past the first level. &#xD;&#xA;&#xD;&#xA;The hardest part of AI programming is making the AI beatable, but beatable by someone with a bit of skill. Make it too easy to beat and players will be put off by a lack of a challenge, make it too hard and again, people will get fed up with being beaten all the time.&#xD;&#xA;&#xD;&#xA;So it's not about creating complex AI (which isn't difficult, after all, the AI can process everthing within its playing area simultaneously whereas a player can only process what's on screen), but more about creating a balanced game." />
  <row Id="6888" PostHistoryTypeId="2" PostId="3518" RevisionGUID="0cadb622-e413-4a31-a1cd-bfa034191d71" CreationDate="2010-09-03T11:40:02.207" UserId="2022" Text="You don't mention whether you're looking at building a 2D or 3D game, but as you say youy're most familiar with C++ there's also the Angel Engine, which is an open source 2D game prototyping engine available here: [http://code.google.com/p/angel-engine/][1]&#xD;&#xA;&#xD;&#xA;It's cross-platform (Windows, MacOS X and Linux) and is very much geared towards rapid development.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/" />
  <row Id="6889" PostHistoryTypeId="2" PostId="3519" RevisionGUID="9a0a77c5-2cce-41f1-88fa-ab78b5e061fc" CreationDate="2010-09-03T11:51:13.410" UserId="1251" Text="Start simple. I prefer Flash due to its easy-to-connect graphics and code nature. Flash is also the choice of thousands of people.&#xD;&#xA;The coding can be done in Actionscript, the latest being AS 3.0. And as you asked using an engine would be good. I prefer Box2d as it has a good way of applying physics into our games.&#xD;&#xA;&#xD;&#xA;I'd also like to tell you that, DO NOT EXPECT to make a gorgeously amazing physics bike race in a week! The first thing you have to learn from Game programming is that , This is programming taken to a whole new level of creativity. You can say a Game programmer is worth 3 Application Programmers. And I mean it. There is a lot of hard work and most importantly &quot;patience&quot; and will power to try again and again till you succeed.&#xD;&#xA;" />
  <row Id="6890" PostHistoryTypeId="2" PostId="3520" RevisionGUID="d40c9927-242d-4ca9-96b0-3544eb8e0e67" CreationDate="2010-09-03T12:08:14.947" UserId="721" Text="I'm working on mobile platforms as Android, IOS... Many users of &lt;a href=&quot;http://www.ellismarkov.com/moblox&quot;&gt;Moblox&lt;/a&gt; ask us a windows and an OS X version.&#xD;&#xA;There is no difficulties to provide these versions, because we are developing on OS X C++ code but we miss global scores and social network part (facebook, twitter). Is there any library to implement these functions on Desktops plaforms ?&#xD;&#xA;&#xD;&#xA;On mobile platforms, we have many SDK to provide theses functions as OpenFeint, ScoreLoop, Plus+. We have used cocoslive and uploaded scores with libcurl but it's very limited. &#xD;&#xA;" />
  <row Id="6891" PostHistoryTypeId="1" PostId="3520" RevisionGUID="d40c9927-242d-4ca9-96b0-3544eb8e0e67" CreationDate="2010-09-03T12:08:14.947" UserId="721" Text="Social Network Gaming on Windows, Linux and OS X" />
  <row Id="6892" PostHistoryTypeId="3" PostId="3520" RevisionGUID="d40c9927-242d-4ca9-96b0-3544eb8e0e67" CreationDate="2010-09-03T12:08:14.947" UserId="721" Text="&lt;c++&gt;" />
  <row Id="6894" PostHistoryTypeId="2" PostId="3521" RevisionGUID="94424017-6d9f-4611-b416-de265bb352ac" CreationDate="2010-09-03T14:06:27.593" UserId="1713" Text="&gt; Video Games are bad for you? That's&#xD;&#xA;&gt; what they said about Rock 'N' Roll.&#xD;&#xA;&#xD;&#xA;Shigeru Miyamoto, shame on you if you don't know him.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[[Source][1] and more Quotes from him]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.miyamotoshrine.com/theman/quotes/index.shtml" />
  <row Id="6895" PostHistoryTypeId="16" PostId="3521" RevisionGUID="94424017-6d9f-4611-b416-de265bb352ac" CreationDate="2010-09-03T14:06:27.593" UserId="-1" />
  <row Id="6896" PostHistoryTypeId="2" PostId="3522" RevisionGUID="70b9f09a-6c58-4a80-8806-7310dec88062" CreationDate="2010-09-03T14:53:29.487" UserId="1628" Text="Facebook and Twitter provide cross-system APIs accessible in a variety of ways, typically a simple HTTP request (or a few). " />
  <row Id="6897" PostHistoryTypeId="6" PostId="3520" RevisionGUID="e44b9034-f7d3-4890-9be9-432f07988b4c" CreationDate="2010-09-03T14:53:48.313" UserId="1628" Comment="edited tags" Text="&lt;c++&gt;&lt;social&gt;&lt;twitter&gt;&lt;faceook&gt;" />
  <row Id="6898" PostHistoryTypeId="6" PostId="3520" RevisionGUID="f1a77e3a-9325-4fa4-9405-44f5f48dd8da" CreationDate="2010-09-03T14:54:10.987" UserId="1628" Comment="edited tags" Text="&lt;c++&gt;&lt;social&gt;&lt;facebook&gt;&lt;twitter&gt;" />
  <row Id="6899" PostHistoryTypeId="5" PostId="3477" RevisionGUID="1daae353-fb8f-4b1c-b3af-c8d1beeb041a" CreationDate="2010-09-03T15:09:46.957" UserId="119" Comment="added 38 characters in body" Text="    private function positionOrthographic():void&#xD;&#xA;    {&#xD;&#xA;     for each (var entity:Entity in entities)&#xD;&#xA;     {&#xD;&#xA;     entity.spriteView.x = entity.body.position.x;&#xD;&#xA;     entity.spriteView.y = entity.body.position.y + entity.body.positionZ;&#xD;&#xA;    &#xD;&#xA;     var sortedEntities:Array = entities.concat();&#xD;&#xA;     sortedEntities.sort(sortDepths, Array.DESCENDING | Array.NUMERIC);&#xD;&#xA;   &#xD;&#xA;     var numEntities:int = entities.length;&#xD;&#xA;   &#xD;&#xA;     for (var i:int = 0; i &lt; numEntities; i++)&#xD;&#xA;     {&#xD;&#xA;      world.setChildIndex(sortedEntities[i].spriteView, i); &#xD;&#xA;     }&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;     private function sortDepths(entity1:Entity, entity2:Entity):int&#xD;&#xA;     {&#xD;&#xA;         if (entity1.layer &lt; entity2.layer) return 1;&#xD;&#xA;      if (entity1.layer &gt; entity2.layer) return -1;&#xD;&#xA;      if (entity1.body.position.y &gt; entity2.body.position.y)return -1;&#xD;&#xA;      if (entity1.body.position.y &lt; entity2.body.position.y)return 1;&#xD;&#xA;      return 0;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Important to note I'm using the y axis as depth into the scene here (would normally be Z). This is so I can share code between top-down and side-on games. Splits sorting into a separate function. No idea how efficient it is, other than I've never noticed any slowdown from using it. Supports layers, so e.g. HUD and floating text things can always appear on top, backgrounds always below, etc." />
  <row Id="6900" PostHistoryTypeId="2" PostId="3523" RevisionGUID="1c8b1551-ba81-49b3-a624-1c9cd2d6d1fc" CreationDate="2010-09-03T15:48:26.337" UserId="1989" Text="What relationship is there, if any, of &quot;materials&quot; and vertex/pixel shaders (or the &quot;effects&quot; that combine the latter two)?&#xD;&#xA;&#xD;&#xA;I have the impression that before the advent of HLSL, materials were explicitly handled by Direct3D or OpenGL.  I also have the impression that with HLSL, many prior effects are now handled directly (and generically) via the rendering pipeline in vertex/pixel shaders.  In other words, I hae the impression that materials are often little more than what DirectX would call an &quot;Effect.&quot;  If so, this means that many models that specify materials would be transformed by a content pipeline into an &quot;Effect&quot;.&#xD;&#xA;&#xD;&#xA;Is this correct?  Where can I get a little more history/info that either corroborates or corrects the impression I have?" />
  <row Id="6901" PostHistoryTypeId="1" PostId="3523" RevisionGUID="1c8b1551-ba81-49b3-a624-1c9cd2d6d1fc" CreationDate="2010-09-03T15:48:26.337" UserId="1989" Text="vertex/pixel shaders and &quot;materials&quot;" />
  <row Id="6902" PostHistoryTypeId="3" PostId="3523" RevisionGUID="1c8b1551-ba81-49b3-a624-1c9cd2d6d1fc" CreationDate="2010-09-03T15:48:26.337" UserId="1989" Text="&lt;shaders&gt;" />
  <row Id="6903" PostHistoryTypeId="2" PostId="3524" RevisionGUID="472acd9d-6ec2-4664-87c1-1c01d6851e75" CreationDate="2010-09-03T15:49:30.340" UserId="1156" Text="Depends on what you want to achieve and your current skillset. I'm taking this from the point of 'I want to learn gamedev' rather than 'I want to learn language X and gamedev'. Since you're comfortable with C++, I advise using that. The other major advice here is start 2D. It's more complex than it looks, so starting as small as possible is good. (Nobody wants a 1D game.)&#xD;&#xA;&#xD;&#xA;Then it comes down to what you want to do. The two routes are going to be using a lower-level graphics library, such as SDL or SFML, against a higher level graphics engine such as OGRE3D or its 2D cousin, TROLL2D. I would again advise the former. You gain a lot more from making your own little rendering routines (I'm not meaning rendering routines as shaders and the like, but more how sprites work) rather than using what people have done. &#xD;&#xA;&#xD;&#xA;Start small. Tetris may seem small, even Mario might. But these are still pretty big. I advise something like Tic-Tac-Toe if you aren't sure - no real time involved. But you would still need graphics, some AI, winning, a game loop, etc.&#xD;&#xA;&#xD;&#xA;If you want to aim a little higher, Pong is good. It is real time, so you would need real-time input, as well as collision detection (bounding boxes), better AI, maybe a simple menu. All this will teach you important skills.&#xD;&#xA;&#xD;&#xA;Then try Tetris: you've got timers, random generation, more collision detection.  Then PacMan or something. After you've made a few, you can go more wild.&#xD;&#xA;&#xD;&#xA;All it comes down to is practice. It's quite possible to learn gamedev by coding a 3D RPG in C++ (let's say you can, for example's sake) when the closest you've done to any programming is Excel macros. You would get there, but it would take an awfully long time from all the stuff you have to learn. Not to mention the fact you'll probably give up from finding it too difficult." />
  <row Id="6904" PostHistoryTypeId="2" PostId="3525" RevisionGUID="e0684c07-9270-4a10-b983-ffeec28b5f13" CreationDate="2010-09-03T16:30:08.150" UserId="1638" Text="**[Unity3d][1]** is a good way to start. They have good documentation and its a complete development package. The languages for scripting are C#,Boo, and Javascript. I had a simple first person &quot;shoot the bouncing balls&quot; game going in about a month and a half using only provided assets and default shapes. The documentation is great and the whole system is easy to understand and manipulate. The community for Unity is also of a nice size. If you want you can program custom shaders in C++ for Unity as well.&#xD;&#xA;&#xD;&#xA;The only thing that would be an issue is that Unity is 3d and making assets can be a big stopping point. I use **[Google Sketch Up][2]** to make most of my models and then export them as collada files which can be pulled into Unity. Sketch Up is incredibly simple and easy to use. The only time it becomes difficult is when you start trying to work with spheres or rounded surfaces so for the most part I stay away from those. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://sketchup.google.com/#utm_campaign=en&amp;utm_source=en-ha-na-us-google&amp;utm_medium=ha&amp;utm_term=google%20sketch%20up" />
  <row Id="6905" PostHistoryTypeId="2" PostId="3526" RevisionGUID="e66499ec-683f-473e-8ec4-b9645a8dfd00" CreationDate="2010-09-03T16:50:04.477" UserId="744" Text="Visual Studio's primary &quot;benefit&quot; is its project management, build system, integrated debugger, plugins and extensions, and so on. Most of those are not going to work well with Unity, especially a Unity program primarily in JavaScript. The basic editor will still work fine, but Visual Studio is kind of crap at editing compared to things whose main purpose is to edit text, like vim and Emacs.&#xD;&#xA;&#xD;&#xA;If your goal is a well-integrated and consistent deployment to your developers, you should probably just use Unity's built-in editor. It's not great, but it's fast, free, and works everywhere.&#xD;&#xA;&#xD;&#xA;On the other hand, if your developers have a lot of Visual Studio experience, they can use that if they want. It's just going to be as a text editor, and not as a project manager or compiler or debugger (except for the odd Unity native extension)." />
  <row Id="6906" PostHistoryTypeId="5" PostId="3493" RevisionGUID="68db8b3b-a56e-4652-9a0e-2db0986a0e7b" CreationDate="2010-09-03T16:55:48.887" UserId="465" Comment="added 93 characters in body" Text="I've worked with several engines and I'm most comfortable with a mature engine, world editor and C++ codebase.&#xD;&#xA;&#xD;&#xA;I'm now looking at Unity as a side-project and have mostly been working in Javascript.&#xD;&#xA;&#xD;&#xA;Has anyone done a large scale project with Unity and does it require Visual Studio or is sticking to the Javascript approach best?&#xD;&#xA;&#xD;&#xA;Are there any big pitfalls with large scale Unity projects or with working with Visual Studio?&#xD;&#xA;&#xD;&#xA;Most the stuff I've seen has been focused at smaller Indies or people with little experience.&#xD;&#xA;&#xD;&#xA;**I should have phrased this as an external IDE, Visual Studio is just my IDE of choice**" />
  <row Id="6907" PostHistoryTypeId="2" PostId="3527" RevisionGUID="8afe617a-52df-4347-bd24-f10111640e85" CreationDate="2010-09-03T17:12:23.963" UserId="950" Text="The meaning of this words are not set in stone. I use the following distinction : &#xD;&#xA;&#xD;&#xA; - a shader is the low level code that implements a material&#xD;&#xA; - a material is an instance of a material type with all slots set. it uses a shader.&#xD;&#xA; - a material type is a kind of material. it defines a format (like 3 textures, the first being used for diffuse, the second for normal and the third for specular.) but not the value of the slots (at this level we know the format but not what are the DNS textures). not the slots can be of any type (int, float, mat4, symbol).&#xD;&#xA;&#xD;&#xA;YMMV&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6908" PostHistoryTypeId="5" PostId="3505" RevisionGUID="eb3389d2-0474-4d1f-a73c-70e3148b6e3d" CreationDate="2010-09-03T17:17:43.520" UserId="1780" Comment="Method to build the transform &quot;array&quot;." Text="The tree-as-array sounds like a win to me.  Just do a depth-first traversal of your hierarchy and fill out an array; when rewinding through the recursion you can either update the parent with the absolute index to the child or just the delta-from-me, and the children can store the parent indices either way as well.  Indeed, if you use relative offsets then you don't need to carry the root address around.  I suppose that the structure would probably look something like&#xD;&#xA;&#xD;&#xA;    struct Transform&#xD;&#xA;    {&#xD;&#xA;       Matrix m; // whatever you like&#xD;&#xA;       int parent;   // index or offset, you choose!&#xD;&#xA;       int sibling;&#xD;&#xA;       int firstchild;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;...so you'd need nodes to know how to get to siblings too since you can't (easily) have a variable size structure.  Although I guess if you used byte offsets instead of Transform offsets, you could have a variable number of children per transform:&#xD;&#xA;&#xD;&#xA;    struct Transform&#xD;&#xA;    {&#xD;&#xA;       Matrix m; // whatever you like&#xD;&#xA;       int parent;  // negative byte offest&#xD;&#xA;       int numchildren;&#xD;&#xA;       int child[0]; // can't remember if you put a 0 there or leave it empty;&#xD;&#xA;                     // but it's an array of positive byte offsets&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;...then you just need to make sure that you put successive Transforms in the right place.&#xD;&#xA;&#xD;&#xA;Here's how you build a totally self-contained tree with embedded child &quot;pointers&quot;.&#xD;&#xA;&#xD;&#xA;    int BuildTransforms(Entity* e, OutputStream&amp; os, int parentLocation)&#xD;&#xA;    {&#xD;&#xA;        int currentLocation = os.Tell();&#xD;&#xA;&#xD;&#xA;        os.Write(e-&gt;localMatrix);&#xD;&#xA;        os.Write(parentLocation);&#xD;&#xA;        int numChildren = e-&gt;GetNumChildren();&#xD;&#xA;        os.Write(numChildren);&#xD;&#xA;&#xD;&#xA;        int childArray = os.Tell();&#xD;&#xA;        os.Skip(numChildren * sizeof(int));&#xD;&#xA;        os.AlignAsNecessary();  // if you need to align transforms&#xD;&#xA;    &#xD;&#xA;        childLocation = os.Tell();&#xD;&#xA;        for (int i = 0; i &lt; numChildren; ++i) {&#xD;&#xA;            os.Seek(childArray + (i * sizeof(int)));&#xD;&#xA;            os.Write(childLocation);&#xD;&#xA;            os.Seek(childLocation);&#xD;&#xA;            childLocation = BuildTransforms(e-&gt;GetChild(i), os, currentLocation);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return os.Tell();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void BuildTransforms(Entity* root)&#xD;&#xA;    {&#xD;&#xA;        OutputStream os;&#xD;&#xA;        BuildTransforms(root, os, -1, 0);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="6909" PostHistoryTypeId="5" PostId="3496" RevisionGUID="425d2b53-688e-46ed-a15a-c37a7f49b552" CreationDate="2010-09-03T17:24:33.110" UserId="1970" Comment="responding to edits in the question" Text="Depends what you mean by &quot;require Visual Studio&quot;. Your choice of IDE isn't really related to the language used or size of the project, in my opinion, just so long as you're using an editor you feel comfortable with.&#xD;&#xA;&#xD;&#xA;If you are looking for editors other than the default Scite that comes with Unity...&#xD;&#xA;&#xD;&#xA;If you feel like changing from Javascript to C# or Boo, I find [Monodevelop][1] to be very excellent. There are some other [suggestions here][2].&#xD;&#xA;&#xD;&#xA;**Updated for question update**&#xD;&#xA;&#xD;&#xA;Absolutely, use an external IDE or text editor. It's all just text files in the end, Unity doesn't offer any additional benefit from using Scite. Pick (or find) an editor you love and use that, it can only possibly make your life better (even on small projects!)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://monodevelop.com/&#xD;&#xA;  [2]: http://www.unifycommunity.com/wiki/index.php?title=Script_Editors" />
  <row Id="6910" PostHistoryTypeId="5" PostId="3505" RevisionGUID="8a898a1c-b2b2-48ef-acda-0b62f090c5e0" CreationDate="2010-09-03T17:34:37.363" UserId="1780" Comment="added 103 characters in body" Text="The tree-as-array sounds like a win to me.  Just do a depth-first traversal of your hierarchy and fill out an array; when rewinding through the recursion you can either update the parent with the absolute index to the child or just the delta-from-me, and the children can store the parent indices either way as well.  Indeed, if you use relative offsets then you don't need to carry the root address around.  I suppose that the structure would probably look something like&#xD;&#xA;&#xD;&#xA;    struct Transform&#xD;&#xA;    {&#xD;&#xA;       Matrix m; // whatever you like&#xD;&#xA;       int parent;   // index or offset, you choose!&#xD;&#xA;       int sibling;&#xD;&#xA;       int firstchild;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;...so you'd need nodes to know how to get to siblings too since you can't (easily) have a variable size structure.  Although I guess if you used byte offsets instead of Transform offsets, you could have a variable number of children per transform:&#xD;&#xA;&#xD;&#xA;    struct Transform&#xD;&#xA;    {&#xD;&#xA;       Matrix m; // whatever you like&#xD;&#xA;       int parent;  // negative byte offest&#xD;&#xA;       int numchildren;&#xD;&#xA;       int child[0]; // can't remember if you put a 0 there or leave it empty;&#xD;&#xA;                     // but it's an array of positive byte offsets&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;...then you just need to make sure that you put successive Transforms in the right place.&#xD;&#xA;&#xD;&#xA;Here's how you build a totally self-contained tree with embedded child &quot;pointers&quot;.&#xD;&#xA;&#xD;&#xA;    int BuildTransforms(Entity* e, OutputStream&amp; os, int parentLocation)&#xD;&#xA;    {&#xD;&#xA;        int currentLocation = os.Tell();&#xD;&#xA;&#xD;&#xA;        os.Write(e-&gt;localMatrix);&#xD;&#xA;        os.Write(parentLocation);&#xD;&#xA;        int numChildren = e-&gt;GetNumChildren();&#xD;&#xA;        os.Write(numChildren);&#xD;&#xA;&#xD;&#xA;        int childArray = os.Tell();&#xD;&#xA;        os.Skip(numChildren * sizeof(int));&#xD;&#xA;        os.AlignAsNecessary();  // if you need to align transforms&#xD;&#xA;    &#xD;&#xA;        childLocation = os.Tell();&#xD;&#xA;        for (int i = 0; i &lt; numChildren; ++i) {&#xD;&#xA;            os.Seek(childArray + (i * sizeof(int)));&#xD;&#xA;            os.Write(childLocation);&#xD;&#xA;            os.Seek(childLocation);&#xD;&#xA;            childLocation = BuildTransforms(e-&gt;GetChild(i), os, currentLocation);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return os.Tell();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void BuildTransforms(Entity* root)&#xD;&#xA;    {&#xD;&#xA;        OutputStream os;&#xD;&#xA;        BuildTransforms(root, os, -1, 0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(If you want to store relative locations, just add `- currentLocation` to the two &quot;location&quot; writes.)" />
  <row Id="6911" PostHistoryTypeId="16" PostId="3512" RevisionGUID="8462d552-8b20-4efe-99f5-62352b77b6ea" CreationDate="2010-09-03T18:00:06.313" UserId="2018" />
  <row Id="6912" PostHistoryTypeId="5" PostId="3512" RevisionGUID="8462d552-8b20-4efe-99f5-62352b77b6ea" CreationDate="2010-09-03T18:00:06.313" UserId="2018" Comment="clarifications" Text="I had this chat with a friend of mine about whether an AI can be created or not that could beat any human without resource cheating in a real time strategy game. An AI that would play almost perfectly. The AI of today's games have many areas that can be improved, most of them rely on resource cheating, a better early base developement because of that, and attacking in waves.&#xD;&#xA;&#xD;&#xA;Still, the question is what would need to be done to improve on this to obtain the ultimate AI. Also, if you have any example of a game where a certain feature was used it would be great.&#xD;&#xA;&#xD;&#xA;**Edit:** There is little clarification i can provide for those who haven't read the title or the few paragraphs describing the problem. This is about real time strategy games and the ultimate AI. That means Strarcraft, Warcraft, Generals, Red Alert, Age of Empires, AI War etc. Games that have more than one difficulty level, but the focus here is on the ultimate challenge.&#xD;&#xA;&#xD;&#xA;tenpn has a fantastic post filled with great resources. Thank you, tenpn! I wish more people would contribute in that direction." />
  <row Id="6913" PostHistoryTypeId="2" PostId="3528" RevisionGUID="d0ac0fbd-152d-491c-b9de-b8b2067c64af" CreationDate="2010-09-03T19:21:51.730" UserId="2027" Text="As far as I know, .X format can be text-bases and binary-based.&#xD;&#xA;&#xD;&#xA;I basically want to look into the model I'm playing with, get a better understanding of .X, possibly make some changes in it and convert back." />
  <row Id="6914" PostHistoryTypeId="1" PostId="3528" RevisionGUID="d0ac0fbd-152d-491c-b9de-b8b2067c64af" CreationDate="2010-09-03T19:21:51.730" UserId="2027" Text="How do I convert DirectX's .X from binary format to text and back" />
  <row Id="6915" PostHistoryTypeId="3" PostId="3528" RevisionGUID="d0ac0fbd-152d-491c-b9de-b8b2067c64af" CreationDate="2010-09-03T19:21:51.730" UserId="2027" Text="&lt;directx&gt;&lt;directx9&gt;" />
  <row Id="6916" PostHistoryTypeId="5" PostId="3528" RevisionGUID="f8298321-2f2d-47c4-a071-cbcde852da24" CreationDate="2010-09-03T20:20:18.370" UserId="2027" Comment="fixed terms: text-&gt;encoding" Text="As far as I know, .X format can be &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb206258%28v=VS.85%29.aspx&quot;&gt;text encoded&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb172359(v=VS.85).aspx&quot;&gt;binary-encoded&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;I basically want to look into the model I'm playing with, get a better understanding of .X, possibly make some changes in it and convert back." />
  <row Id="6917" PostHistoryTypeId="4" PostId="3528" RevisionGUID="f8298321-2f2d-47c4-a071-cbcde852da24" CreationDate="2010-09-03T20:20:18.370" UserId="2027" Comment="fixed terms: text-&gt;encoding" Text="How do I convert DirectX's .X from binary encoding to text encoding and back" />
  <row Id="6918" PostHistoryTypeId="2" PostId="3529" RevisionGUID="c3047871-8273-4a2c-a1ff-04e675d81d7e" CreationDate="2010-09-03T20:26:59.747" UserId="865" Text="While it's perfectly possible to modify the executable (it's what viruses do all the time, and you can append whatever you want to an exe and read from the end of the file - not sure how windows user levels interfere with it, haven't done it since the golden days of MS-DOS) I'd indeed suspect the registry is used.&lt;br&gt; &#xD;&#xA;Copy the executable over an install on another system and see if it has your savegame, if it does you know it's the exe being modified." />
  <row Id="6919" PostHistoryTypeId="2" PostId="3530" RevisionGUID="1574b1e3-6278-4d85-b1fc-e23b804d3862" CreationDate="2010-09-03T20:28:22.777" UserId="160" Text="It's a question of how complex you want your game to be. Everything that isn't revisitable implies there's state stored with the player's game to note which things have been visited and which things haven't. That state makes the game more complex to play (players must correctly do things in the right order), but more importantly, makes the game more complex to *design*.&#xD;&#xA;&#xD;&#xA;Every time you store an additional piece of state, the game designers have to carefully track how the game works when that data is in either state. For example, consider a key that is spawned somewhere and can unlock a door. If the game forgets that the player has gotten the key before and allows it to respawn, it's pretty simple. Any time the player needs that key, they can go there to get it.&#xD;&#xA;&#xD;&#xA;If the game doesn't let you revisit it, now designers have to make sure they handle situations like:&#xD;&#xA;&#xD;&#xA;1. The player dropped the key somewhere inaccessible. Are they stuck?&#xD;&#xA;2. What if they use the key on the wrong door. Can they still get a second key to use on the expected door?&#xD;&#xA;&#xD;&#xA;The more game state that gets tracked, the more complex the player's flow through the game world, and that complexity increases combinatorially. You can consider game state to be a [state machine](http://en.wikipedia.org/wiki/Finite_State_Machine). Every bit of state you store (&quot;has X been visited before?&quot;) *doubles* the number of states in that state machine." />
  <row Id="6920" PostHistoryTypeId="2" PostId="3531" RevisionGUID="e8a82462-e6b8-497c-98d3-cbba3da81403" CreationDate="2010-09-03T20:33:14.120" UserId="101" Text="Materials in the Direct3D 9 sense were simply parameters for the fixed function pipeline, which implements a Gouraud shading model (IIRC). The values of a D3DMATERIAL9 struct can be thought of as nothing more than shader constants. The definition of a &quot;material&quot; is entirely dependent upon context.&#xD;&#xA;&#xD;&#xA;It's the distinction between fixed function and programmable that is most important here. When you're using shaders, you define the shading model yourself. Therefore, even though many of the surface properties that are described by a D3DMATERIAL9 (e.g. diffuse color) would likely apply to your shading model of choice, it's up to you to do something with those values.&#xD;&#xA;&#xD;&#xA;The fixed function pipeline was essentially one monolithic &quot;effect&quot; (or pair of vertex/pixel shaders) that you couldn't change. You could only pass it different parameters to control the behavior, whether these parameters were render states or D3DMATERIAL9 structs.&#xD;&#xA;&#xD;&#xA;You might find this instructive: [FixedFuncShader][1]&#xD;&#xA;&#xD;&#xA;It's a partial reimplementation of the fixed function pipeline using D3DX effects. It'll help you understand the parallels between the two concepts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.amd.com/archive/gpusamples/FixedFuncShader/Pages/default.aspx" />
  <row Id="6921" PostHistoryTypeId="2" PostId="3532" RevisionGUID="1719b3b6-c9ec-4f57-9a46-0f0e15e04d7c" CreationDate="2010-09-03T20:36:55.470" UserId="160" Text="If you're talking a tile-based isometric game, you have a fixed number of different depths that are bounded between some known nearest and farthest depth. In that case, it's a perfect candidate for a [pigeonhole sort](http://en.wikipedia.org/wiki/Pigeonhole_sort), which has the best possible algorithmic complexity.&#xD;&#xA;&#xD;&#xA;Just make an array where each index corresponds to a depth, and each element is a collection of entities at that depth. Sorting is just (in pseudo-code):&#xD;&#xA;&#xD;&#xA;    sort(entities)&#xD;&#xA;        buckets = new Array(MaxDistance)&#xD;&#xA;    &#xD;&#xA;        for index in buckets&#xD;&#xA;            buckets[index] = new Array&#xD;&#xA;        end&#xD;&#xA;    &#xD;&#xA;        // distribute to buckets&#xD;&#xA;        for entity in entities&#xD;&#xA;            distance = calculateDistance(entity)&#xD;&#xA;            buckets[distance].add(entity)&#xD;&#xA;        end&#xD;&#xA;    &#xD;&#xA;        // flatten&#xD;&#xA;        result = new Array&#xD;&#xA;        for bucket in buckets&#xD;&#xA;            for entity in bucket&#xD;&#xA;                result.add(entity)&#xD;&#xA;            end&#xD;&#xA;        end&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;And that's from a completely unsorted collection. An even better option is to simply persist the buckets and keep the entity's bucket location updated when its depth changes." />
  <row Id="6922" PostHistoryTypeId="2" PostId="3533" RevisionGUID="ed1422ae-609d-4d51-8a62-7725b05c67ea" CreationDate="2010-09-03T20:39:58.920" UserId="160" Text="*Here's my original answer to [a similar question](http://stackoverflow.com/questions/2210026/is-the-mvc-design-pattern-used-in-commercial-computer-games) on SO from a while back, at least concerning the MVC part of your question:*&#xD;&#xA;&#xD;&#xA;It's rarely used in games. It took me a while to figure out why, but here's my thoughts:&#xD;&#xA;&#xD;&#xA;MVC exists to make a distinction between two representations. The Model is the abstract representation of your data. It's how the machine views the state of your application. The View (and Controllers) represent a more concrete visible instantiation of that system in a way that's meaningful to humans.&#xD;&#xA;&#xD;&#xA;In most business apps, these two worlds are pretty different. For example, a spreadsheet's model is simply a 2D grid of values. It doesn't have to think about how wide the cells are in pixels, where the scrollbars are, etc. At the same time, the spreadsheet view doesn't know how cell values are calculated or stored.&#xD;&#xA;&#xD;&#xA;In a game, those two worlds are much closer to each other. The game world (model) is typically a set of entities positioned in some virtual space. The game view is also a set of entities positioned in some virtual space. Bounding volumes, animation, position, etc., all things you would consider part of the &quot;view&quot; are also directly used by the &quot;model&quot;: animation can affect physics and AI, etc.&#xD;&#xA;&#xD;&#xA;The end result is that the line between model and view in a game would be arbitrary and not helpful: you'd end up duplicating a lot of state between them.&#xD;&#xA;&#xD;&#xA;Instead, games tend to decouple things along domain boundaries: AI, physics, audio, rendering, etc. will be kept as separate as possible.&#xD;&#xA;" />
  <row Id="6923" PostHistoryTypeId="2" PostId="3534" RevisionGUID="0e4f02be-bc36-4748-a98b-e5bcc4c63c3a" CreationDate="2010-09-03T21:29:54.647" UserId="962" Text="What would be the fastest method for doing anti-aliasing for a flash game that is drawn via blitting to a BitmapObject?&#xD;&#xA;&#xD;&#xA;A method I thought of would be to make games stage smaller than the BitmapObject that the game is drawn to, and then somehow shrink it to the size of the stage.&#xD;&#xA;&#xD;&#xA;Would that method work? If so what would be the fastest and highest quality to shrink the bitmap? Or would there be a completely different way to do it?" />
  <row Id="6924" PostHistoryTypeId="1" PostId="3534" RevisionGUID="0e4f02be-bc36-4748-a98b-e5bcc4c63c3a" CreationDate="2010-09-03T21:29:54.647" UserId="962" Text="Blitting in AS3 with anti-aliasing?" />
  <row Id="6925" PostHistoryTypeId="3" PostId="3534" RevisionGUID="0e4f02be-bc36-4748-a98b-e5bcc4c63c3a" CreationDate="2010-09-03T21:29:54.647" UserId="962" Text="&lt;actionscript-3&gt;" />
  <row Id="6926" PostHistoryTypeId="5" PostId="630" RevisionGUID="ced6fba7-20d2-48d0-873e-40cd9ca9ab81" CreationDate="2010-09-03T21:49:27.827" UserId="165" Comment="added 39 characters in body" Text="It's not so much hard to develop an MMO, as to develop another **World of Warcraft**. If you're willing to settle for only having a few thousand players, you *can* make an MMO, such as: &#xD;&#xA;&#xD;&#xA;  - [A Tale in the Desert][1] (created by one person)  &#xD;&#xA;[ATITD Wikipedia][2]&#xD;&#xA;&#xD;&#xA;  - [Sherwood Dungeon][3] (created by one person)  &#xD;&#xA;[How one man made an MMO][4]  &#xD;&#xA;[Maid Marion Wikipedia][5]&#xD;&#xA;&#xD;&#xA;  - [Runescape Latest Version][6] (Originally created by two people. The *original* version was *much* simpler than the current version - it was improved over time, which took more people.)  &#xD;&#xA;[Runescape Wikipedia][7]&#xD;&#xA;&#xD;&#xA;Not that I'm saying it was *easy* to make those games :) But it can be done by a small number of (skilled, dedicated) people.&#xD;&#xA;&#xD;&#xA;  [1]: http://atitd.com/index.shtml&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A_Tale_in_the_Desert&#xD;&#xA;  [3]: http://www.sherwooddungeon.com/&#xD;&#xA;  [4]: http://hanfordlemoore.com/v/how-one-man-made-an-mmo-an-interview-with-gene-endrody&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Maid_Marian_Entertainment&#xD;&#xA;  [6]: http://www.runescape.com/title.ws&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/RuneScape" />
  <row Id="6927" PostHistoryTypeId="2" PostId="3535" RevisionGUID="10f45e39-c375-4c5b-8666-1cd21b848c8b" CreationDate="2010-09-03T21:50:27.637" UserId="2022" Text="&gt; &quot;The only legitimate use of a computer is to play games.&quot; &#xD;&#xA;&#xD;&#xA;Wise words from Eujene Jarvis (Defender, Stargate, Robotron, Smash TV, etc)." />
  <row Id="6928" PostHistoryTypeId="16" PostId="3535" RevisionGUID="10f45e39-c375-4c5b-8666-1cd21b848c8b" CreationDate="2010-09-03T21:50:27.637" UserId="-1" />
  <row Id="6929" PostHistoryTypeId="2" PostId="3536" RevisionGUID="d752f0eb-6085-4791-bc52-466d9e437c9a" CreationDate="2010-09-03T21:54:43.543" UserId="51" Text="You should probably stick with MonoDevelop.  It's not as polished as visual studio but is the only debugger you're going to be able to use with Unity 3. &#xD;&#xA;&#xD;&#xA;Personally I use Visual Studio Professional when I'm on WIndows, and all of our projects stick to C# exclusively.  It's a great IDE and the C# integration (read: autocomplete) is pretty good." />
  <row Id="6930" PostHistoryTypeId="16" PostId="3507" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6931" PostHistoryTypeId="16" PostId="3508" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6932" PostHistoryTypeId="16" PostId="3510" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6933" PostHistoryTypeId="16" PostId="3518" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6934" PostHistoryTypeId="16" PostId="3519" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6935" PostHistoryTypeId="16" PostId="3524" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6936" PostHistoryTypeId="16" PostId="3525" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6937" PostHistoryTypeId="16" PostId="3506" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-03T21:55:06.597" UserId="51" />
  <row Id="6938" PostHistoryTypeId="5" PostId="3535" RevisionGUID="8c15126c-96bc-4d83-b698-5d24954d5317" CreationDate="2010-09-03T21:58:36.017" UserId="2022" Comment="added 72 characters in body" Text="&gt; &quot;The only legitimate use of a computer is to play games.&quot; &#xD;&#xA;&#xD;&#xA;Wise words from Eujene Jarvis (Defender, Stargate, Robotron, Smash TV, etc).&#xD;&#xA;&#xD;&#xA;[[Source]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Eugene_Jarvis" />
  <row Id="6939" PostHistoryTypeId="2" PostId="3537" RevisionGUID="c58a9a63-526c-4eb4-83f0-4fe32991d4e9" CreationDate="2010-09-03T22:00:33.330" UserId="1923" Text="When the model was exported from the 3d modeling app, whoever exported it chose binary instead of ascii.&#xD;&#xA;&#xD;&#xA;One way to convert it would be to import the model into any 3d modeling app that supports .x (there are free ones out there) &amp; re-export in ascii format." />
  <row Id="6940" PostHistoryTypeId="2" PostId="3538" RevisionGUID="b20f8467-6ac9-4ceb-b475-d66a48cb3fe2" CreationDate="2010-09-03T22:22:41.133" UserId="769" Text="I think that would work, and that you'd need to make your bitmap twice the screen size (or a higher integer multiplier) for the best quality.&#xD;&#xA;&#xD;&#xA;However, that means you have to either draw everything scaled (so no copyPixels) or just work with larger source bitmaps (larger file, more memory usage), and you might be losing more performance than blitting is giving you." />
  <row Id="6941" PostHistoryTypeId="2" PostId="3539" RevisionGUID="2325da68-f76e-4e46-9c91-33410825b27f" CreationDate="2010-09-03T23:37:36.540" UserId="953" Text="I believe that you could add a Bitmap to the stage that is twice the size of the stage, set its scalex and scaley to 0.5, and then blit to its BitmapObject.  I'm not sure how the performance would work out on it.&#xD;&#xA;&#xD;&#xA;I'm a bit confused as to why you need antialiasing at runtime, though.  Can't you antialias your bitmap resources beforehand, and just blit them directly, with alpha merge if necessary?" />
  <row Id="6944" PostHistoryTypeId="2" PostId="3540" RevisionGUID="5ab76f7a-0fca-4704-9263-8838913923ec" CreationDate="2010-09-04T02:58:07.770" UserId="1120" Text="The simple way is to let Flash do the bitmap resampling for you.  Rather than composing the scene with blitting, make a movable object an individual Bitmap added to a parent DisplayObject, give the Bitmap fractional x,y coordinates, and set its pixelSnapping to NEVER.  (The default for pixelSnapping is AUTO, which means Flash will round to int coordinates when the Bitmap's scale is close enough to 1.0, which I think is for aesthetic reasons as well as performance.)&#xD;&#xA;&#xD;&#xA;I don't know how fast this dynamic resampling will be in arbitrary conditions.  You should try it for your case and see if it's fast enough.  One complication: I think Flash will use the GPU for this when it can, so simple tests may be misleading.&#xD;&#xA;&#xD;&#xA;The much-more-work-but-maybe-faster way is to precompute resampled Bitmaps, like for one Bitmap, generate 16 Bitmaps, one for every .25 pixel offset in the x/y directions, and then blit whichever one is closest to the subpixel position." />
  <row Id="6945" PostHistoryTypeId="2" PostId="3541" RevisionGUID="32434e2c-ca24-4afa-aeb1-8a1c4d7f4a21" CreationDate="2010-09-04T03:33:51.370" UserId="1632" Text="Can the community recommend some good sites that have free Maya 3D model? I am trying to find some and export to OGRE3D, thanks." />
  <row Id="6946" PostHistoryTypeId="1" PostId="3541" RevisionGUID="32434e2c-ca24-4afa-aeb1-8a1c4d7f4a21" CreationDate="2010-09-04T03:33:51.370" UserId="1632" Text="free maya 3d model" />
  <row Id="6947" PostHistoryTypeId="3" PostId="3541" RevisionGUID="32434e2c-ca24-4afa-aeb1-8a1c4d7f4a21" CreationDate="2010-09-04T03:33:51.370" UserId="1632" Text="&lt;3d-meshes&gt;&lt;ogre&gt;" />
  <row Id="6948" PostHistoryTypeId="2" PostId="3542" RevisionGUID="3e0ba244-5b66-4ef6-9c85-c3ac6ff5f825" CreationDate="2010-09-04T06:09:15.400" UserId="865" Text="Well, apart from the suggestion given above to use a modeling package that can read/write both formats (polytrans can do it but ain't free), your original post links to both formats so if all else fails you got everything needed to be able to read and write both formats...." />
  <row Id="6949" PostHistoryTypeId="2" PostId="3543" RevisionGUID="6754f53c-bda0-45d9-a2f0-4386462c26d8" CreationDate="2010-09-04T06:25:00.543" UserId="1845" Text="What is the best way to start from nothing when building your own game? What programming languages do you need to learn, and which platform would it be best to start on?" />
  <row Id="6950" PostHistoryTypeId="1" PostId="3543" RevisionGUID="6754f53c-bda0-45d9-a2f0-4386462c26d8" CreationDate="2010-09-04T06:25:00.543" UserId="1845" Text="What is the Best Way to Start Building Your Own Games?" />
  <row Id="6951" PostHistoryTypeId="3" PostId="3543" RevisionGUID="6754f53c-bda0-45d9-a2f0-4386462c26d8" CreationDate="2010-09-04T06:25:00.543" UserId="1845" Text="&lt;game-design&gt;&lt;engine&gt;" />
  <row Id="6952" PostHistoryTypeId="2" PostId="3544" RevisionGUID="17f1c809-d464-4c89-bf2c-c664ea604b26" CreationDate="2010-09-04T06:31:34.047" UserId="865" Text="Ugh. Did I miss an As-Seen-On-TV ad?&lt;br&gt;&#xD;&#xA;Any game is a lot of work to make. Not just an MMO. Most console titles take somewhere from 18-30 months and from 30 to 200 people working on it, and that is generally with the basic infrastructure already in place (render engine, content framework, core libraries) and people with background in game development joining together years of experience.&lt;br&gt;&#xD;&#xA;With an MMO you throw some extra ingredients in the mix, like scalability, networking, lots of playtesting, and (generally) even more content.&lt;br&gt;&#xD;&#xA;Yeah, I'm fairly sure that if you'd try to do that by yourself you'd indeed need a couple of months....&lt;br&gt;" />
  <row Id="6953" PostHistoryTypeId="2" PostId="3545" RevisionGUID="6dfdd30e-3be2-4d68-aaad-b81f432d482a" CreationDate="2010-09-04T06:33:24.923" UserId="2015" Text="I've been struggling with how to implement scripting in my game engine. I only have a few requirements: It should be intuitive, I don't want to write a custom language, parser and interpreter, and I don't want to use threading. (I'm certain there's a simpler solution; I don't need the hassle of multiple game logic threads.) Here's an example script, in Python (aka pseudocode):&#xD;&#xA;&#xD;&#xA;    def dramatic_scene(actors):&#xD;&#xA;        alice = actors[&quot;alice&quot;]&#xD;&#xA;        bob = actors[&quot;bob&quot;]&#xD;&#xA;&#xD;&#xA;        alice.walk_to(bob)&#xD;&#xA;        if bob.can_see(alice):&#xD;&#xA;            bob.say(&quot;Hello again!&quot;)&#xD;&#xA;        else:&#xD;&#xA;            alice.say(&quot;Excuse me, Bob?&quot;)&#xD;&#xA;&#xD;&#xA;That epic piece of storytelling poses implementation problems. I can't just evaluate the whole method at once, because `walk_to` takes game time. If it returns right away, Alice would start walking up to Bob, and (in the same frame) say hello (or be greeted). But if `walk_to` is a blocking call that returns when she reaches Bob, then my game gets stuck, because it's blocking the same thread of execution that would make Alice walk.&#xD;&#xA;&#xD;&#xA;I considered making each function enqueue an action -- `alice.walk_to(bob)` would push an object onto a queue, which would get popped off after Alice reached Bob, wherever he was. That's more subtly broken: the `if` branch is evaluated immediately, so Bob might greet Alice even if his back is turned to her.&#xD;&#xA;&#xD;&#xA;How do other engines/people handle scripting without making threads? I'm starting to look in non-game-dev areas, like jQuery animation chains, for ideas. It seems like there should be some good patterns for this sort of problem." />
  <row Id="6954" PostHistoryTypeId="1" PostId="3545" RevisionGUID="6dfdd30e-3be2-4d68-aaad-b81f432d482a" CreationDate="2010-09-04T06:33:24.923" UserId="2015" Text="Scripting and Cinematics without Threading" />
  <row Id="6955" PostHistoryTypeId="3" PostId="3545" RevisionGUID="6dfdd30e-3be2-4d68-aaad-b81f432d482a" CreationDate="2010-09-04T06:33:24.923" UserId="2015" Text="&lt;scripting&gt;" />
  <row Id="6956" PostHistoryTypeId="2" PostId="3546" RevisionGUID="84ada20b-3097-45f7-b6f3-5a9083a02382" CreationDate="2010-09-04T06:50:25.460" UserId="2029" Text="You can pretty much start with any language you want. I'd recommend Java or C++ (just because those are the only ones I've learned). You'll need an IDE (integrated development environment), which includes the editor, compiler, linker, etc. all in one package.&#xD;&#xA;&#xD;&#xA;I'd recommend starting on Windows, but if you're experienced with Linux, why not start with that.&#xD;&#xA;&#xD;&#xA;If you've never programmed before, try not to get too excited about making graphical games from the get go or you will become disillusioned once you start learning a programming language. There's so much to learn about a language and learning how to use it. You'll begin in a console environment which just means making programs that include only text. No graphics (except ASCII drawings).&#xD;&#xA;&#xD;&#xA;Btw, really ask yourself what part of game development you're interested in. I've seen so many people who want to get into game development ask this questions and they think programming is the way to start out but most end up wanting only to do art, sound, or design. Most seem to begin programming only to find out soon that they loathe it.&#xD;&#xA;&#xD;&#xA;But if you think it's your thing, I wish you luck and hope you hang in for the long run." />
  <row Id="6957" PostHistoryTypeId="2" PostId="3547" RevisionGUID="870fe68d-fa6a-4da1-9a86-cb093d6359ae" CreationDate="2010-09-04T06:51:07.313" UserId="288" Text="The term you want to search for here is &quot;[coroutines][1]&quot; (and usually the language keyword or function name is `yeild`).&#xD;&#xA;&#xD;&#xA;&gt; Coroutines are program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations.&#xD;&#xA;&#xD;&#xA;The implementation will depend first of all on your language. For a game you want the implementation to be as light weight as possible (lighter than threads or even fibres). The Wikipedia page (linked) has some links to various language-specific implementations.&#xD;&#xA;&#xD;&#xA;I hear Lua has built-in support for coroutines. So does GameMonkey.&#xD;&#xA;&#xD;&#xA;UnrealScript implements this with what it calls &quot;states&quot; and &quot;latent functions&quot;.&#xD;&#xA;&#xD;&#xA;If you use C# you could look at &lt;a href=&quot;http://blog.nickgravelyn.com/2010/02/the-magic-of-yield/&quot;&gt;this blog post&lt;/a&gt; by Nick Gravelyn.&#xD;&#xA;&#xD;&#xA;Additionally the &quot;animation chains&quot; idea, while not the same thing, is a workable solution to the same problem. Nick Gravelyn also has [a C# implementation of this][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Coroutine&#xD;&#xA;  [2]: http://blog.nickgravelyn.com/2010/01/using-interpolators-and-timers/" />
  <row Id="6958" PostHistoryTypeId="2" PostId="3548" RevisionGUID="9fe2eed7-c543-41b2-a111-851ce37d0275" CreationDate="2010-09-04T07:30:21.817" UserId="1931" Text="not going threaded is smart. &#xD;&#xA;&#xD;&#xA;Most game engines work as a series of modular stages with stuff in memory driving each stage. For your 'walk to example', you usually have an AI stage where your walked characters are in a state where they shouldn't be looking for enemies to kill, an animation stage where they should be running animation X, a physics stage (or simulation stage) where their actual position is updated, etc.&#xD;&#xA;&#xD;&#xA;in your example above, 'alice' is an actor composed of pieces that live in many of these stages, so a blocking actor.walk_to call (or a coroutine you call next() on once per frame) would probably not have the proper context to make lots of decisions.&#xD;&#xA;&#xD;&#xA;Instead, a 'start_walk_to' function would probably do something like:&#xD;&#xA;&#xD;&#xA;    def start_cutscene_walk_to(actor,target):&#xD;&#xA;        actor.ai.setbrain(cutscene_brain)&#xD;&#xA;        actor.physics.nocoll = 1&#xD;&#xA;        actor.anims.force_anim('walk')&#xD;&#xA;        # etc.&#xD;&#xA;&#xD;&#xA;Then, your main loop runs its ai tick, its physics tick, its animation tick, and its cutscene tick, and the cutscene updates the state for each of the subsystems in your engine. The cutscene system should definitely track what each of its cutscenes is doing, and a coroutine driven system for something linear and deterministic like a custscene might make sense.&#xD;&#xA;&#xD;&#xA;The reason for this modularity is that it just keeps things nice and simple, and for some systems (like physics and AI), you need to know the state of everything at the same time to resolve things properly and keep the game in a consistent state.&#xD;&#xA;&#xD;&#xA;hope this helps!&#xD;&#xA;" />
  <row Id="6959" PostHistoryTypeId="2" PostId="3549" RevisionGUID="f16cfa55-8b81-4c27-91e7-6ea1878d23df" CreationDate="2010-09-04T07:35:34.023" UserId="1931" Text="Unity: great architecture, lots of good community support. run it with visual studio and you've got a great, easy to use system, for hitting the ground running.&#xD;&#xA;&#xD;&#xA;Just do stuff. don't spend too much time reading, experience trumps everything. Find tutorials where you do stuff and do it. Also, if you get stuck, move on. Just goof around with something else for a while.&#xD;&#xA;&#xD;&#xA;Try to reflect on everything you did, and get a big picture grasp of the architecture. If you can't do what was done in a tutorial without watching it, you didn't learn it.&#xD;&#xA;&#xD;&#xA;Finally, don't start with writing a big game. You'll hit roadblocks. break everything down to the simplest thing possible and sandbox that. &#xD;&#xA;&#xD;&#xA;Sorry for the vague BS, but let me say this again: do something, and be persistent." />
  <row Id="6960" PostHistoryTypeId="5" PostId="3547" RevisionGUID="4fc14b99-2836-4d82-8433-f1dc1a93a746" CreationDate="2010-09-04T08:21:24.660" UserId="51" Comment="edited body" Text="The term you want to search for here is &quot;[coroutines][1]&quot; (and usually the language keyword or function name is `yield`).&#xD;&#xA;&#xD;&#xA;&gt; Coroutines are program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations.&#xD;&#xA;&#xD;&#xA;The implementation will depend first of all on your language. For a game you want the implementation to be as light weight as possible (lighter than threads or even fibres). The Wikipedia page (linked) has some links to various language-specific implementations.&#xD;&#xA;&#xD;&#xA;I hear Lua has built-in support for coroutines. So does GameMonkey.&#xD;&#xA;&#xD;&#xA;UnrealScript implements this with what it calls &quot;states&quot; and &quot;latent functions&quot;.&#xD;&#xA;&#xD;&#xA;If you use C# you could look at &lt;a href=&quot;http://blog.nickgravelyn.com/2010/02/the-magic-of-yield/&quot;&gt;this blog post&lt;/a&gt; by Nick Gravelyn.&#xD;&#xA;&#xD;&#xA;Additionally the &quot;animation chains&quot; idea, while not the same thing, is a workable solution to the same problem. Nick Gravelyn also has [a C# implementation of this][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Coroutine&#xD;&#xA;  [2]: http://blog.nickgravelyn.com/2010/01/using-interpolators-and-timers/" />
  <row Id="6961" PostHistoryTypeId="16" PostId="3546" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-04T08:21:57.687" UserId="51" />
  <row Id="6962" PostHistoryTypeId="16" PostId="3549" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-04T08:21:57.687" UserId="51" />
  <row Id="6963" PostHistoryTypeId="16" PostId="3543" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-04T08:21:57.687" UserId="51" />
  <row Id="6964" PostHistoryTypeId="16" PostId="3541" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-04T08:23:21.273" UserId="51" />
  <row Id="6965" PostHistoryTypeId="2" PostId="3550" RevisionGUID="88595bc3-e624-4e51-b681-23cefc70aff7" CreationDate="2010-09-04T08:27:19.730" UserId="1696" Text="I would suggest using [**XNA**][1].&#xD;&#xA;-----------------------------------&#xD;&#xA;&#xD;&#xA;[C#][2] is awesome language. &#xD;&#xA;&#xD;&#xA;Visual Studio is probably the best IDE. The free version [Visual Studio Express][3] is pretty decent too.&#xD;&#xA;&#xD;&#xA;XNA wraps all the low level 'dirty' calls with DirectX or OpenGL into awesome classes etc. So it is much easier to understand. Even if you are planning to learn game dev with C++ or something else. I suggest learning XNA or the first few days because of this DirectX/OpenGL abstraction. And then go to C++ and you will be able to understand it easier.&#xD;&#xA;&#xD;&#xA;XNA is a very powerful framework. Is used mainly by game dev enthusiasts for indie game development etc. There is plenty games built with XNA out there.&#xD;&#xA;&#xD;&#xA;With XNA you can develop games for Windows, Xbox360 and for upcoming [Windows Phone 7][4] at once! All you would need to do is write few additional conditional lines of code for each device. For example:&#xD;&#xA;&#xD;&#xA;    #if XBOX360&#xD;&#xA;     // Do something for just XBOX360&#xD;&#xA;    #else&#xD;&#xA;     // Do something for the rest of the devices&#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/vcsharp/default.aspx&#xD;&#xA;  [3]: http://www.microsoft.com/express/downloads/&#xD;&#xA;  [4]: http://www.windowsphone7.com/" />
  <row Id="6966" PostHistoryTypeId="16" PostId="3550" RevisionGUID="88595bc3-e624-4e51-b681-23cefc70aff7" CreationDate="2010-09-04T08:27:19.730" UserId="-1" />
  <row Id="6967" PostHistoryTypeId="2" PostId="3551" RevisionGUID="e0b46344-765c-45da-8f2b-aac5974799a1" CreationDate="2010-09-04T08:37:30.473" UserId="490" Text="To start from nothing, from absolute zero to programming games. Good question.&#xD;&#xA;&#xD;&#xA;First, disregard your other question, it's irrelevant. The question which language you **need** to learn and which platform would be best to start on depends entirely on you. Start with a language that makes it easy to learn, definitely don't try C++ as your first language unless you're a programming demigod but just don't know it yet. Highly unlikely. &#xD;&#xA;&#xD;&#xA;C++ is the most ugly language to start learning, even though anyone would correctly point out that it's the most widely used language in the game industry - so why not start with that? For exactly the reason that you're not working in the game industry yet. Make it easy on yourself, stay motivated by learning a language that's easy on you.&#xD;&#xA;&#xD;&#xA;Instead try a couple beginner's languages and stick with the one you can get the most out of. Look for all-in-one solutions like [Game Maker][1] first, where you can transition from icon-based scripting to text-based scripting but you also learn how everything else, sprites, animations, sound, levels, etc fit together. &#xD;&#xA;&#xD;&#xA;It's also important to choose a community where you have people who are beginners just like you. In the Game Maker forum for example, you get help for the simplest of questions, besides being provided with great tutorials and a lot of example games.&#xD;&#xA;&#xD;&#xA;As for platform, pick the one you use. If you play a lot of Xbox360 you should be familiar with Xbox Live Indie Games, so consider [XNA][2]. If you own an iPod Touch or iPhone or Android, maybe try your luck with the Lua-based engine [Corona Game Edition][3]. If you prefer PC/Mac pick any of the available game-making programs (like Game Maker) or SDKs that you like. Wikipedia offers a good starting point for your research on [video game creation software][4].&#xD;&#xA;&#xD;&#xA;As a general rule of thumb: start simple. Forget whatever idea you have in mind for the game you want to create. Keep that fresh for a later time when you have more experience. Instead start by making clones of classic games like Tetris, Asteroids, Pac-Man, Boulder Dash. Those will keep you occupied for a long time and will help you think like a programmer by analyzing how things work in the original game and discussing possible approaches with peers.&#xD;&#xA;&#xD;&#xA;Another advice: to improve your programming skills, work with and talk to people who are just beyond your current skillset. You may often feel like the 5th wheel but you'll gain a lot of traction.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com/make&#xD;&#xA;  [2]: http://creators.xna.com&#xD;&#xA;  [3]: http://anscamobile.com/game-edition/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Category:Video_game_creation_software" />
  <row Id="6968" PostHistoryTypeId="16" PostId="3551" RevisionGUID="e0b46344-765c-45da-8f2b-aac5974799a1" CreationDate="2010-09-04T08:37:30.473" UserId="-1" />
  <row Id="6969" PostHistoryTypeId="5" PostId="3452" RevisionGUID="8209b2b3-eef5-4885-812f-6f67db9ee5ac" CreationDate="2010-09-04T11:45:21.870" UserId="1156" Comment="added 115 characters in body" Text="[This thread:][1]&#xD;&#xA;&gt; Currently there is no support for true hardware accelerated 3D in Silverlight. It is not possible to write 3D games that run in browser nor is the development model similar to Managed Direct3D. Any kind of 3D game will be very hard to port to Silverlight. Silverlight is more suitable for development of games, that are currently built using Adobe Flash. &#xD;&#xA;&#xD;&#xA;I guess that's a no at the moment.&#xD;&#xA;  [1]: http://forums.silverlight.net/forums/t/1134.aspx &#xD;&#xA;&#xD;&#xA;EDIT: It appears the thread I mentioned is slightly dated. So to some extent, there is hardware accelerated 3D." />
  <row Id="6970" PostHistoryTypeId="2" PostId="3552" RevisionGUID="b4f1fe6b-66eb-4ef2-bdcb-d64cb55b898d" CreationDate="2010-09-04T16:04:07.000" UserId="458" Text="Depends on your goal. Are you more interested in programming, art, or design? If all you want to do is make a playable game, take a stack of index cards and make something that you can play on a tabletop, and save yourself years of time that you no longer need to spend learning programming. Seriously, I think physical board and card games are the best place to start if you want to be a game designer, and once you're comfortable with that, THEN you can go back and learn the programming parts if you want." />
  <row Id="6971" PostHistoryTypeId="16" PostId="3552" RevisionGUID="b4f1fe6b-66eb-4ef2-bdcb-d64cb55b898d" CreationDate="2010-09-04T16:04:07.000" UserId="-1" />
  <row Id="6972" PostHistoryTypeId="5" PostId="3549" RevisionGUID="ecd95f5a-3613-42b7-b7ef-4c602fbb44a2" CreationDate="2010-09-04T18:12:17.850" UserId="165" Comment="added 49 characters in body" Text="[**Unity3D**][1]: great architecture, lots of good community support. run it with visual studio and you've got a great, easy to use system, for hitting the ground running.&#xD;&#xA;&#xD;&#xA;Just do stuff. don't spend too much time reading, experience trumps everything. Find tutorials where you do stuff and do it. Also, if you get stuck, move on. Just goof around with something else for a while.&#xD;&#xA;&#xD;&#xA;Try to reflect on everything you did, and get a big picture grasp of the architecture. If you can't do what was done in a tutorial without watching it, you didn't learn it.&#xD;&#xA;&#xD;&#xA;Finally, don't start with writing a big game. You'll hit roadblocks. break everything down to the simplest thing possible and sandbox that. &#xD;&#xA;&#xD;&#xA;Sorry for the vague BS, but let me say this again: do something, and be persistent.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/" />
  <row Id="6973" PostHistoryTypeId="2" PostId="3553" RevisionGUID="7a8ed839-a476-4543-9eb8-56fae599aa8e" CreationDate="2010-09-04T18:22:35.513" UserId="1989" Text="I understand that water ripples (e.g. stone thrown into a pond) are often handled with vertex shaders.  My first question is: are the ripples nothing more than an algorithm that is the function of time?&#xD;&#xA;&#xD;&#xA;If yes, it means that the size and diameter of ripples is not &quot;additive.&quot;  It means water vertices do not statefully &quot;remember&quot; their previous &quot;disturbance&quot; positions and accumulate more translation info.  Rather it means that, as a function of time, the position of &quot;disturbed&quot; water vertices are freshly computed each frame *per unit time*.&#xD;&#xA;&#xD;&#xA;If no, it means that indeed the vertices accumulate disturbance / translation information - the vertices are stateful.&#xD;&#xA;&#xD;&#xA;I hope the answer is &quot;yes,&quot; because that actually makes sense to me.  If the answer is no, the I feel it creates tremendous burden on the CPU/GPU to keep track of all the state-per-vertice.  If the answer is &quot;neither,&quot; do tell. :)&#xD;&#xA;&#xD;&#xA;My second question is, assuming a &quot;yes&quot; above, how does such a &quot;water disturbance shader algorithm&quot; account for continuous interaction with irregular shapes?  For example, please look at the video 40 second mark showing a [car crashing through water][1].  It is not so clear how the vertex shader knows how to make a rectangular disturbance shape (the shape of the car).  Perhaps, over-simplifying, the vertex shader takes both time and a vector to generate the ripples, where the vector is the speed/direction of a car (and the shader code always makes a car-shaped rectangle no matter what).&#xD;&#xA;&#xD;&#xA;Is this the right high-level understanding of how this water trick works?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=pwCCJTVhO4g" />
  <row Id="6974" PostHistoryTypeId="1" PostId="3553" RevisionGUID="7a8ed839-a476-4543-9eb8-56fae599aa8e" CreationDate="2010-09-04T18:22:35.513" UserId="1989" Text="Vertex Shader Fundamental Workings" />
  <row Id="6975" PostHistoryTypeId="3" PostId="3553" RevisionGUID="7a8ed839-a476-4543-9eb8-56fae599aa8e" CreationDate="2010-09-04T18:22:35.513" UserId="1989" Text="&lt;shaders&gt;" />
  <row Id="6976" PostHistoryTypeId="2" PostId="3554" RevisionGUID="43c21535-e0ea-492c-9c33-2e29c9efe5c9" CreationDate="2010-09-04T18:48:06.110" UserId="2022" Text="[**Shawn Hargreaves Blog** - Game programming with the XNA Framework][1]&#xD;&#xA;&#xD;&#xA;Shawn was the original developer of the Allegro library and is now one of the developers working on XNA at Microsoft.  His blog covers loads of stuff about XNA, but also touches on games he's worked on in the past, such as this post about the [AI coordinate system in MotoGP][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/&#xD;&#xA;  [2]: http://blogs.msdn.com/b/shawnhar/archive/2009/12/30/motogp-ai-coordinate-systems.aspx" />
  <row Id="6977" PostHistoryTypeId="16" PostId="3554" RevisionGUID="43c21535-e0ea-492c-9c33-2e29c9efe5c9" CreationDate="2010-09-04T18:48:06.110" UserId="-1" />
  <row Id="6978" PostHistoryTypeId="2" PostId="3555" RevisionGUID="f5f44687-131f-4643-8490-96759d95925a" CreationDate="2010-09-04T18:58:31.543" UserId="2022" Text="[**Cliffski's Blog**][1]&#xD;&#xA;&#xD;&#xA;Ex-Elixir Studios and Lionhead coder who went indie with his own one-man-band gamedev company, Positech Games.&#xD;&#xA;&#xD;&#xA;The blog covers all aspects of working as an Indie, including game design, programming and also the business side of things.  For example, this interesting post on [the marketing / production tradeoff][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://positech.co.uk/cliffsblog/&#xD;&#xA;  [2]: http://positech.co.uk/cliffsblog/?p=784" />
  <row Id="6979" PostHistoryTypeId="16" PostId="3555" RevisionGUID="f5f44687-131f-4643-8490-96759d95925a" CreationDate="2010-09-04T18:58:31.543" UserId="-1" />
  <row Id="6980" PostHistoryTypeId="2" PostId="3556" RevisionGUID="15d88ee2-f019-47ba-8060-4f8082d993a5" CreationDate="2010-09-04T19:10:42.513" UserId="395" Text="The way something like Panda does this is with callbacks. Instead of blocking it would be something like&#xD;&#xA;&#xD;&#xA;    def dramatic_scene(actors):&#xD;&#xA;        alice = actors[&quot;alice&quot;]&#xD;&#xA;        bob = actors[&quot;bob&quot;]&#xD;&#xA;        &#xD;&#xA;        def cb():&#xD;&#xA;            if bob.can_see(alice):&#xD;&#xA;                bob.say(&quot;Hello again!&quot;)&#xD;&#xA;            else:&#xD;&#xA;                alice.say(&quot;Excuse me, Bob?&quot;)&#xD;&#xA;        alice.walk_to(bob, cb)&#xD;&#xA;&#xD;&#xA;Having an on-complete callback allows you to chain these kinds of events as deeply as you want.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="6981" PostHistoryTypeId="2" PostId="3557" RevisionGUID="670cf5d9-31d0-42c5-8720-a088963a3e2f" CreationDate="2010-09-04T19:17:54.743" UserId="488" Text="Do any of you have any good examples from two or more games that share some of the same game logic, but are of entirely different genres? Could very well be one of your own games. Take Warcraft 3 and World of Warcraft for instance. Entirely different games, but they *could* have some game logic in common without us knowing." />
  <row Id="6982" PostHistoryTypeId="1" PostId="3557" RevisionGUID="670cf5d9-31d0-42c5-8720-a088963a3e2f" CreationDate="2010-09-04T19:17:54.743" UserId="488" Text="Good examples of 'transferable game logic' across genres?" />
  <row Id="6983" PostHistoryTypeId="3" PostId="3557" RevisionGUID="670cf5d9-31d0-42c5-8720-a088963a3e2f" CreationDate="2010-09-04T19:17:54.743" UserId="488" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="6984" PostHistoryTypeId="16" PostId="3557" RevisionGUID="670cf5d9-31d0-42c5-8720-a088963a3e2f" CreationDate="2010-09-04T19:17:54.743" UserId="488" />
  <row Id="6985" PostHistoryTypeId="2" PostId="3558" RevisionGUID="65019b16-8c66-4f8b-9aa3-6c9c44d1603e" CreationDate="2010-09-04T19:38:59.997" UserId="962" Text="I am not entirely sure, but in the video you linked of Dirt 2, I believe the water is handled by a 2d height-map height map simulation of the water, and then that data is used by tessellation shaders to make a high resolution 3d displacement of the water without using too much GPU or CPU time.&#xD;&#xA;&#xD;&#xA;Other games do something similar but use vertex shaders. I have seen some games that use pre-baked animations for the ripples and stuff so they are not additive, and some games use the 2d height map fluid simulation." />
  <row Id="6986" PostHistoryTypeId="2" PostId="3559" RevisionGUID="7a58f5ff-bb15-49ce-a773-5463fa486ac8" CreationDate="2010-09-04T21:28:19.010" UserId="458" Text="The easiest examples of this are two games that use the same engine, or one game that is a &quot;mod&quot; of another game (which is just a special case of &quot;same game engine&quot; really).&#xD;&#xA;&#xD;&#xA;And yes, of course you can do that. One of the Warcraft mods took away the concept of destroying the opponent and essentially created what is now known as the &quot;Tower Defense&quot; genre, which is a bit different from the Realtime Strategy genre. Portal and Half-Life 2 share their game engine in common; I'm not sure exactly what genre to call Portal, maybe a physics-based puzzle game, but I'd be hesitant to call it a pure first-person shooter.&#xD;&#xA;&#xD;&#xA;If you want to get technical, all games using, say, Game Maker are built using the same tools, and therefore share some of the same objects and behaviors. Or even games using C++ that are all using if statements, for loops and pointers, whether they be RPGs or FPSs or retro-arcade games. So it all depends on how loosely you define things.&#xD;&#xA;&#xD;&#xA;From the question title, I'm guessing that what you're REALLY looking for here is a general list of &quot;game programming&quot; tasks that are used in a variety of games, beyond just &quot;normal&quot; programming -- in other words, what functionality should be common to every &quot;game engine&quot;? And yes, there are a few things: random number generation; displaying sprites (for 2d games) or polygons (for 3d games) to the screen; ability to accept and respond to player input in real-time; collision detection; pathfinding; playing sound effects and background music." />
  <row Id="6987" PostHistoryTypeId="16" PostId="3559" RevisionGUID="7a58f5ff-bb15-49ce-a773-5463fa486ac8" CreationDate="2010-09-04T21:28:19.010" UserId="-1" />
  <row Id="6988" PostHistoryTypeId="2" PostId="3560" RevisionGUID="56eb59aa-4d80-4caa-853f-fba6a06e2960" CreationDate="2010-09-04T21:29:07.200" UserId="140" Text="What you define as 'resource cheating' is like 'boost balancing' in racing games. The 'boost' is used to try and keep the pack in relatively close proximity to each other to create the illusion of a tight race. If the player isn't in the lead it may keep the CPU player in sight, and if the player *is* in the lead it keeps the pressure on by putting opponents directly on your tail, even if the CPU itself is a mediocre driver.&#xD;&#xA;&#xD;&#xA;In an RTS you're looking at a collection of values which can be arranged optimally. You know exactly how long it takes to obtain a resource, how much building items costs, map traversal times, etc.&#xD;&#xA;&#xD;&#xA;If you're the one who has created the tables and has the info readily available to you it's just a matter of number crunching the data to find the best ratios for output.&#xD;&#xA;&#xD;&#xA;But how much fun is it to play against an enemy who always does exactly the same thing based on the context of the playing field?&#xD;&#xA;&#xD;&#xA;So you add chaos. You give the AI an efficiency on a sliding scale. You have it harass the player. If the player appears to be doing too well, you have the AI cheat a bit and give it some extra resources or reinforcements to keep the player on their toes.&#xD;&#xA;&#xD;&#xA;You want the player to feel the satisfaction of facing a challenging opponent, rather than spanking a weak AI or being slaughtered by Hal9000. The perfection of a CPU opponent lies in its imperfection. :)" />
  <row Id="6989" PostHistoryTypeId="16" PostId="3560" RevisionGUID="56eb59aa-4d80-4caa-853f-fba6a06e2960" CreationDate="2010-09-04T21:29:07.200" UserId="-1" />
  <row Id="6990" PostHistoryTypeId="2" PostId="3561" RevisionGUID="2835aefd-b86e-4237-9dac-a5c177e62686" CreationDate="2010-09-04T21:44:56.720" UserId="490" Text="A lot could be done but my immediate reaction to this question was a counter-question: why would anyone want the ultimate RTS AI? And why doesn't this person just play online, against another human opponent?&#xD;&#xA;&#xD;&#xA;The crux is: it's not the problem to make the AI unbeatable, it's the problem of making it think fast enough (eg. it **has** to take shortcuts) to be able to play against 3 or even 7 AI opponents on the same map with a regular computer. Even today, and tomorrow, and I expect it won't have changed even ten years from now.&#xD;&#xA;&#xD;&#xA;The next issue is: as long as the AI follows strict rules, it will be exploitable. Even fuzzy rules will make it vulnerable to exploits. The AI would have to learn, and it would have to make mistakes - intentional and unintentional. It would also need to surprise you. And then you're playing against another human being. Since AI doesn't even come close to copying a human's way of thinking both algorithmic and in terms of processing power, you're much better off not wasting your time on a single player AI that's not nearly as much fun to play against as another human being, if only for the social factors involved.&#xD;&#xA;" />
  <row Id="6991" PostHistoryTypeId="16" PostId="3561" RevisionGUID="2835aefd-b86e-4237-9dac-a5c177e62686" CreationDate="2010-09-04T21:44:56.720" UserId="-1" />
  <row Id="6992" PostHistoryTypeId="2" PostId="3562" RevisionGUID="ce8cfcae-4799-4378-9fd4-58420d8f163f" CreationDate="2010-09-04T21:53:42.433" UserId="490" Text="I believe this deals with logic like &quot;making the player jump&quot;. I've heard that question from inexperienced developers a couple times. What you're looking for is more algorithmic in nature. For example, the code to make an actor jump in a game could be uniformly used in any engine and any game that supports jumping characters.&#xD;&#xA;&#xD;&#xA;It needs:&#xD;&#xA;- a velocity vector for the actor&#xD;&#xA;- a force modifying the velocity (jump)&#xD;&#xA;- changing actor position based on velocity every frame&#xD;&#xA;- reducing velocity every frame based on gravity&#xD;&#xA;- certain minima and maxima, like min/max speed&#xD;&#xA;&#xD;&#xA;This works in a 2D Jump 'n Run, a 3rd person action-adventure or a 1st person shooter in any engine. Only the parameters (force, gravity, coordinate system) change.&#xD;&#xA;&#xD;&#xA;But sharing this kind of code across games of different genres is unlikely simply because developers:&#xD;&#xA;&#xD;&#xA; 1. change engines (sometimes depending on game genre)&#xD;&#xA; 2. stick to a certain genre anyway&#xD;&#xA; 3. simply re-write the code because it's so simple or requires significant architectural changes because of the game genre or game engine&#xD;&#xA; 4. love to reinvent the wheel (some do)" />
  <row Id="6993" PostHistoryTypeId="16" PostId="3562" RevisionGUID="ce8cfcae-4799-4378-9fd4-58420d8f163f" CreationDate="2010-09-04T21:53:42.433" UserId="-1" />
  <row Id="6994" PostHistoryTypeId="2" PostId="3563" RevisionGUID="df4febd2-c09d-43b3-8c75-530f754aa5dc" CreationDate="2010-09-04T21:57:59.150" UserId="769" Text="What do we know about hardware acceleration for drawing operations in Flash? I know that since 10.1 it's there for video playback (and mobile graphics) but that doesn't really help with rendering desktop game graphics.&#xD;&#xA;&#xD;&#xA;So, is there any information about it, or maybe talk or rumours going around? Do you think it's something we'll get at all within a reasonable period?&#xD;&#xA;&#xD;&#xA;I personally really keep hitting the ceiling with Flash' software renderer. A game scene that, were it hardware accelerated, my PC from 2003 could render while sleeping, runs at a low 20 fps on my quad core laptop.&#xD;&#xA;&#xD;&#xA;Or maybe I am wrong and Flash is already using the GPU, and my games are slow for other reasons?" />
  <row Id="6995" PostHistoryTypeId="1" PostId="3563" RevisionGUID="df4febd2-c09d-43b3-8c75-530f754aa5dc" CreationDate="2010-09-04T21:57:59.150" UserId="769" Text="Hardware acceleration for the Flash Player" />
  <row Id="6996" PostHistoryTypeId="3" PostId="3563" RevisionGUID="df4febd2-c09d-43b3-8c75-530f754aa5dc" CreationDate="2010-09-04T21:57:59.150" UserId="769" Text="&lt;flash&gt;&lt;gpu&gt;&lt;hardware-acceleration&gt;" />
  <row Id="6997" PostHistoryTypeId="2" PostId="3564" RevisionGUID="abb50363-8ee2-415e-a199-067085e815bd" CreationDate="2010-09-04T22:06:28.870" UserId="140" Text="One option if you have multiple servers is to require that any accounts from the same IP must be created on alternate servers.&#xD;&#xA;So if you want to create 10 accounts, great, but you'll have to create them on servers that don't interact with each other. This prevents people at the same location from being able to play together, so there is that drawback.&#xD;&#xA;On the plus side it also interferes with the effectiveness of proxies in cheating.&#xD;&#xA;&#xD;&#xA;You're going to end up with pros and cons to any solution you come up with, and you won't completely eliminate cheating. So decide how far you're willing to go and keep a close eye on how those changes effect the user base." />
  <row Id="6998" PostHistoryTypeId="5" PostId="3563" RevisionGUID="64ba09f0-12dd-429f-96e4-69a16fd52ce1" CreationDate="2010-09-04T22:21:02.690" UserId="769" Comment="added 60 characters in body" Text="What do we know about hardware acceleration for drawing operations in Flash? I know that since 10.1 it's there for video playback (and mobile graphics) but that doesn't really help with rendering desktop game graphics.&#xD;&#xA;&#xD;&#xA;So, is there any information about it, or maybe talk or rumours going around? Do you think it's something we'll get at all within a reasonable period?&#xD;&#xA;&#xD;&#xA;I personally really keep hitting the ceiling with Flash' software renderer. A game scene that, were it hardware accelerated, my PC from 2003 could render while sleeping, runs at a low 20 fps on my quad core laptop. It's a shame because the Flash VM is otherwise rather fast.&#xD;&#xA;&#xD;&#xA;Or maybe I am wrong and Flash is already using the GPU, and my games are slow for other reasons?" />
  <row Id="6999" PostHistoryTypeId="2" PostId="3565" RevisionGUID="62928d6f-35e6-475e-870d-e067dd738499" CreationDate="2010-09-04T22:59:07.287" UserId="1516" Text="I'm learning to create a game engine from scratch in XNA. I'm seeking examples of very small game engines, specifically the architecture and structure of source files, etc. It should include a scripting engine. Articles are also appreciated.&#xD;&#xA;&#xD;&#xA;More specifically, I have a problem knowing how to connect the scripting engine to the rest of the game engine, like loading a models from the script." />
  <row Id="7000" PostHistoryTypeId="1" PostId="3565" RevisionGUID="62928d6f-35e6-475e-870d-e067dd738499" CreationDate="2010-09-04T22:59:07.287" UserId="1516" Text="Available Small Open Source Game Engines for tutorial." />
  <row Id="7001" PostHistoryTypeId="3" PostId="3565" RevisionGUID="62928d6f-35e6-475e-870d-e067dd738499" CreationDate="2010-09-04T22:59:07.287" UserId="1516" Text="&lt;engine&gt;" />
  <row Id="7002" PostHistoryTypeId="5" PostId="3556" RevisionGUID="f7ef3ed7-58d8-4b4c-ba6e-5afbf23a4fe9" CreationDate="2010-09-04T23:24:34.600" UserId="395" Comment="added 406 characters in body" Text="The way something like Panda does this is with callbacks. Instead of blocking it would be something like&#xD;&#xA;&#xD;&#xA;    def dramatic_scene(actors):&#xD;&#xA;        alice = actors[&quot;alice&quot;]&#xD;&#xA;        bob = actors[&quot;bob&quot;]&#xD;&#xA;        &#xD;&#xA;        def cb():&#xD;&#xA;            if bob.can_see(alice):&#xD;&#xA;                bob.say(&quot;Hello again!&quot;)&#xD;&#xA;            else:&#xD;&#xA;                alice.say(&quot;Excuse me, Bob?&quot;)&#xD;&#xA;        alice.walk_to(bob, cb)&#xD;&#xA;&#xD;&#xA;Having an on-complete callback allows you to chain these kinds of events as deeply as you want.&#xD;&#xA;&#xD;&#xA;EDIT: JavaScript example since that has better syntax for this style:&#xD;&#xA;&#xD;&#xA;    function dramatic_scene(actors) {&#xD;&#xA;        var alice = actors.alice;&#xD;&#xA;        var bob = actors.bob;&#xD;&#xA;        alice.walk_to(bob, function() {&#xD;&#xA;            if(bob.can_see(alice)) {&#xD;&#xA;                bob.say('Hello again!');&#xD;&#xA;            } else {&#xD;&#xA;                alice.say('Excuse me, Bob?');&#xD;&#xA;            }&#xD;&#xA;         });&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7003" PostHistoryTypeId="2" PostId="3566" RevisionGUID="a4167408-1eb9-46a4-9dee-47e512f7128d" CreationDate="2010-09-04T23:26:01.633" UserId="189" Text="I like the book [Programming Role Playing Games with DirectX (2nd edition)][1] for its scripting section; I haven't really seen a start-to-finish tutorial on making a scripting engine elsewhere. And of course, being a book, it will walk you through step-by-step creating the scripting part of the engine (and the whole rest of the game engine that he establishes throughout the book, of course). Unfortunately the source code isn't available online.&#xD;&#xA;&#xD;&#xA;Once you have a scripting engine, I would **keep separate the 3D models from the scripts**. Scripts are typically in the logic side of things, while 3D models are most certainly the presentation/view side of things, and those shouldn't really be mixed. When a script commands a character to &quot;walk to (3,5)&quot;, it doesn't need to say &quot;load walking animation, set velocity to (-1,1), wait 3 seconds, set velocity to zero, load idle animation&quot;; you'd typically just have a `walkTo(x,y)` function available to the script, and the intermediate code would take care of 3D models, animations, etc.&#xD;&#xA;&#xD;&#xA;But hey, if you really need to, then define your own functions in your scripting interpreter which get 3D models and do whatever you need with them. I think you're thinking a bit too far ahead; worry first about writing a simple script interpreter, and then add the necessary functions to the interpreter as you're writing your scripts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Programming-Playing-Games-DirectX-Development/dp/159200315X/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1283642108&amp;sr=8-2" />
  <row Id="7004" PostHistoryTypeId="2" PostId="3567" RevisionGUID="75234f2d-7602-453d-9278-4a2b9ddeacb3" CreationDate="2010-09-05T02:13:50.797" UserId="1923" Text="yes to your first point. and yes to your &quot;if yes&quot;.&#xD;&#xA;&#xD;&#xA;Mystagogue: *how does such a &quot;water disturbance shader algorithm&quot; account for continuous interaction with irregular shapes?*&#xD;&#xA;&#xD;&#xA;It is probably less irregular than you think. Wave propagation simply has a direction, time, a magnitude (amplitude), frequency, &amp; some sort of dampening variable. In this case the direction is simply 90 degrees to the car's velocity. &#xD;&#xA;&#xD;&#xA;Knowing the point of entry into the pond and the car's speed &amp; direction (velocity), the propagation is simply calculated.&#xD;&#xA;" />
  <row Id="7005" PostHistoryTypeId="2" PostId="3568" RevisionGUID="b8a64398-bf68-42ec-b9d9-124e90d8c1b5" CreationDate="2010-09-05T02:24:14.947" UserId="288" Text="To answer your base question - a vertex shader does **not** modify the vertices of the mesh that it is acting on. A vertex shader is basically a transformation function that the vertices pass through when they are drawn. So vertices of the original model cannot accumulate movement.&#xD;&#xA;&#xD;&#xA;So how is Dirt 2 doing its water effect? A bit of googling revealed &lt;a href=&quot;http://www.flickr.com/photos/amd_unprocessed/4146790603/&quot;&gt;this page&lt;/a&gt; that explains it:&#xD;&#xA;&#xD;&#xA;&gt; An example of hardware tessellated dynamic water surfaces using DirectX 11 in DiRT 2. Many areas of the track are covered in water. The CPU generates the height field texture when cars drive through it. The tessellator using ATI Radeon hardware generates hundreds of triangles based on the camera position. The result: A beautiful, physically accurate, dynamic water surface. In the DirectX 9 version of the game, the surface is an illusion represented by just two triangles.&#xD;&#xA;&#xD;&#xA;So to take a stab at decoding this to explain how it works on a technical level:&#xD;&#xA;&#xD;&#xA;You have a texture (probably quite low resolution) that is generated each frame (or couple of frames) on the CPU that describes the waves that are moving through the water (probably height and velocity). Because it's on the CPU it can easily be accumulative.&#xD;&#xA;&#xD;&#xA;On DirectX 9 you have the vertex shader reading that texture and displacing the vertices of the water mesh based on the values in that texture.&#xD;&#xA;&#xD;&#xA;On DirectX 11, where, as well as vertex shaders, you have geometry shaders that can create vertices, it is also subdividing the water mesh to add additional detail. And it's probably generating that detail based off information originally coming from the texture describing the wave (adding small ripples and turbulence and so on).&#xD;&#xA;&#xD;&#xA;(It wouldn't surprise me if the pixel shader is also using the same texture, generated by the CPU, to figure out where to draw foam on the water's surface.)" />
  <row Id="7006" PostHistoryTypeId="2" PostId="3569" RevisionGUID="299ff372-55c0-4452-acc7-aff6c1f3fbd1" CreationDate="2010-09-05T03:06:05.787" UserId="865" Text="To me it's a rather simple thought experiment. If I take a game with story and gameplay and take out the story, is it still a game? I think so. Tetris is a good example of a game without story. Now if I have a game with story and gameplay and I take out the gameplay, is it still a game? Not so much. So, in order for something to be even classified as a game story seems less critical than gameplay." />
  <row Id="7007" PostHistoryTypeId="16" PostId="3569" RevisionGUID="299ff372-55c0-4452-acc7-aff6c1f3fbd1" CreationDate="2010-09-05T03:06:05.787" UserId="-1" />
  <row Id="7008" PostHistoryTypeId="2" PostId="3570" RevisionGUID="435c23a2-58c1-4c24-94ea-33e587c7da1f" CreationDate="2010-09-05T05:43:50.963" UserId="865" Text="Remember a lot of memory is blown by resources. On the PSX you had much less vertex throughput so models were smaller by default, no shaders so vertex data was smaller, and also the killer resource - textures, were smaller as they were not 32 bits but generally 8 bit palettized. Audio was either streamed from CD or in a mod/midi like format - no MP3 or wav eating memory like there's no tomorrow. On generations before that, there was no textures, and audio was a table of note pitch/note length mostly&lt;br&gt; &#xD;&#xA;As for assembly vs C, yes there was a C compiler for the PSX but it was relatively immature, we recoded our 3d engine in assembly in order to squeeze out performance, and it paid off. I guess it's also a mindset thingy, if you know you code in assembly you keep performance in mind, if you code in C (let alone C++) you might not think about it continuously." />
  <row Id="7009" PostHistoryTypeId="2" PostId="3571" RevisionGUID="3e264448-c927-4d28-a951-ff9834b6e235" CreationDate="2010-09-05T05:51:07.527" UserId="865" Text="From a security perspective, 3rd party DRM is never good, as it allows hackers to apply knowledge gleamed from other products using the same middleware.&lt;br&gt; &#xD;&#xA;Middleware and copy-protection are pretty much mutually exclusive, getting a custom solution will at least defer the process a bit allowing some sales before the game is hacked." />
  <row Id="7010" PostHistoryTypeId="2" PostId="3572" RevisionGUID="58c1c75f-3234-4d97-b191-469dbd1a5133" CreationDate="2010-09-05T05:58:10.390" UserId="1288" Text="**Game logic re-use can be a wonderful thing!** Here's where and how we've used much of ours from project to project. About 75% of our 2004 title exists throughout the games we've created in the subsequent six years, even though they are all quite different:&#xD;&#xA;&#xD;&#xA; - 2004 - Inago Rage, our first 3D title, an FPS&#xD;&#xA; - 2005 - Epidemic Groove, an early tower defense style game&#xD;&#xA; - 2008 - [The Wonderful End of the World][1], a casual action game&#xD;&#xA; - 2009 - [AaaaaAAaaaAAAaaAAAAaAAAAA!!!][2], a BASE jumping title&#xD;&#xA; - 2010 - [ooo! ooO! oOO! OOO!][3], where you fly and fight through levels created procedurally from your own music library&#xD;&#xA;&#xD;&#xA;Here are a few places where we've re-used modules:&#xD;&#xA;&#xD;&#xA; - **Tools:** The level editor for Inago Rage exists as part of Aaaaa! and Ooo!, but it also formed the basis for gameplay for Epidemic Groove (the player's interface for building defenses is an augmented version of the map editor from the previous game).&#xD;&#xA; - **Libraries:** The audio wrapper for our sound library of choice is shared between all five titles. We've improved this with each iteration.&#xD;&#xA; - **Game Logic:** Elements such as player movement logic were/are re-used where appropriate. No need to re-invent the wheel.&#xD;&#xA; - **Utility:** Certain elements such as text display/HUD are re-used and (ideally) augmented each time.&#xD;&#xA;&#xD;&#xA;**Pluses:** Over these titles, we've learned the following positive things:&#xD;&#xA;&#xD;&#xA; - Re-use reduces the time required to prototype new ideas.&#xD;&#xA; - It can also reduce time-to-market once we're past the prototype stage.&#xD;&#xA; - Elements that seem outdated can serve as a basis for more polished future work. For example, if the UI that displays the score is ugly and aliased, no matter -- we can use it during development, and polish when we're ready.&#xD;&#xA;&#xD;&#xA;**Minuses:** And the following negative things:&#xD;&#xA;&#xD;&#xA; - Re-use can sometimes constrain what we do when we prototype. For example, we never considered an RTS-style game because it was too far from what we'd done before.&#xD;&#xA; - Sometimes we neglect to refactor, so we end up with the code equivalent of junk DNA. There are routines that handle weapons upgrades from our 2004 FPS in our 2009 title whose gameplay does not involve combat.&#xD;&#xA; - If the code sits atop one engine, porting it all to another engine can be difficult. (For example, we want to move to Unity for cross-platform compatibility, but that requires a certain time investment we didn't want to make just yet.)&#xD;&#xA;&#xD;&#xA;Still, I think our inclination to re-use has kept us in business thus far, and would recommend the practice. Hope that helps!&#xD;&#xA;&#xD;&#xA;  [1]: http://dejobaan.com/wonderful/&#xD;&#xA;  [2]: http://dejobaan.com/aaaaa/&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=k6L8li9p5kw" />
  <row Id="7011" PostHistoryTypeId="16" PostId="3572" RevisionGUID="58c1c75f-3234-4d97-b191-469dbd1a5133" CreationDate="2010-09-05T05:58:10.390" UserId="-1" />
  <row Id="7012" PostHistoryTypeId="2" PostId="3573" RevisionGUID="593a873e-9825-43b4-838f-3959c27ece1d" CreationDate="2010-09-05T09:37:18.353" UserId="2022" Text="You may find this interesting: [Llamasoft History][1]&#xD;&#xA;&#xD;&#xA;It's all about how Jeff Minter (Yak) got into both programming and game development, which led him to start Llamasoft in the early 80s.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.llamasoft.co.uk/lshistory1.php" />
  <row Id="7013" PostHistoryTypeId="2" PostId="3574" RevisionGUID="cb232570-7646-48cc-a2f6-54b57155860d" CreationDate="2010-09-05T10:46:18.587" UserId="2036" Text="I want to move into some game development, but the only language I know really well is Ruby. Most of what I have read seems to point towards lower level languages like C++ for game development, or languages for specific frameworks like C# for using XNA. Does anyone have any experience using a language like ruby for game development? If so, would you advise for or against it?" />
  <row Id="7014" PostHistoryTypeId="1" PostId="3574" RevisionGUID="cb232570-7646-48cc-a2f6-54b57155860d" CreationDate="2010-09-05T10:46:18.587" UserId="2036" Text="Is ruby a suitable language for game development?" />
  <row Id="7015" PostHistoryTypeId="3" PostId="3574" RevisionGUID="cb232570-7646-48cc-a2f6-54b57155860d" CreationDate="2010-09-05T10:46:18.587" UserId="2036" Text="&lt;hobby-development&gt;" />
  <row Id="7016" PostHistoryTypeId="2" PostId="3575" RevisionGUID="3b11a96b-f623-4937-a18a-576a305e72be" CreationDate="2010-09-05T11:07:36.283" UserId="2022" Text="I've not touched Ruby myself (it's on the TODO list), but a friend of mine developed a [rather nice version of Berzerk][1] using Ruby and [Chingu][2], so it's certainly capable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ippa.se/berzerk.exe&#xD;&#xA;  [2]: http://ippa.se/chingu" />
  <row Id="7017" PostHistoryTypeId="2" PostId="3576" RevisionGUID="94604cb5-c92c-4a43-900e-3be2fdafae27" CreationDate="2010-09-05T11:20:57.140" UserId="1156" Text="There's no reason why you can't. As long as there's multimedia support for a language, then it's gamedev material. Heck, a large proportion of one of the Rollercoaster Tycoon games was done by hand in ASM." />
  <row Id="7018" PostHistoryTypeId="2" PostId="3577" RevisionGUID="7be15342-55f4-4ac4-9d51-065dfd696845" CreationDate="2010-09-05T11:39:54.653" UserId="1352" Text="Although I assume you're asking for PC games, I would like to add that Google provides their own license system for Android developers.&#xD;&#xA;&#xD;&#xA;http://developer.android.com/guide/publishing/licensing.html" />
  <row Id="7019" PostHistoryTypeId="2" PostId="3578" RevisionGUID="d11a8bdc-2ef2-4677-8f93-5b1ffca7a8dd" CreationDate="2010-09-05T11:46:01.503" UserId="1881" Text="my cocos2d game currently has a ccsprite attached to a box2d body.&#xD;&#xA;during the game i apply different CCAnimations on my sprite, i would like to perform certain manipulations to the box2d body according to the frame currently displayed by the sprite (change rotation of the body, etc.) my current idea on implementing this is to subclass ccsprite and change the setDisplayFrame implementation but i thought somebody here probably did the same and already has a solution, so any suggestions on how to implement this?&#xD;&#xA;&#xD;&#xA;thanks!" />
  <row Id="7020" PostHistoryTypeId="1" PostId="3578" RevisionGUID="d11a8bdc-2ef2-4677-8f93-5b1ffca7a8dd" CreationDate="2010-09-05T11:46:01.503" UserId="1881" Text="cocos2d: syncing CCAnimation frames with Box2d Shape manipulations" />
  <row Id="7021" PostHistoryTypeId="3" PostId="3578" RevisionGUID="d11a8bdc-2ef2-4677-8f93-5b1ffca7a8dd" CreationDate="2010-09-05T11:46:01.503" UserId="1881" Text="&lt;physics&gt;&lt;animation&gt;&lt;box2d&gt;&lt;cocos2d&gt;" />
  <row Id="7022" PostHistoryTypeId="2" PostId="3579" RevisionGUID="fe025095-da10-4901-a573-0e26e0425955" CreationDate="2010-09-05T13:25:48.253" UserId="2037" Text="Ruby is a nice language, but it's not really for games to be honest. If you don't want to use C++ but want something like Ruby check out Python. For a good Python framework you should check out something like www.cocos2d.org/." />
  <row Id="7023" PostHistoryTypeId="2" PostId="3580" RevisionGUID="2200a4ef-e944-4397-898a-21aadb031d9c" CreationDate="2010-09-05T14:06:42.940" UserId="1021" Text="I'm currently an independent game developer.  I'm open to the idea of working on a team in the game industry.  I'm under the impression that being a &quot;game tester&quot; is a relatively easy way to get a job... however that job may be somewhat undesirable.  **So how was your experience working as a tester in the game industry?**&#xD;&#xA;&#xD;&#xA;Some interesting experiences could include:&#xD;&#xA;&#xD;&#xA; - Did the game tester position lead to other more desirable positions?&#xD;&#xA; - How were the relationships between testers and developers?&#xD;&#xA; - Did you write any code? (test &quot;frameworks&quot;, unit tests etc)&#xD;&#xA; - If bugs made it into production was any (potentially unfair) blame put on the testers?" />
  <row Id="7024" PostHistoryTypeId="1" PostId="3580" RevisionGUID="2200a4ef-e944-4397-898a-21aadb031d9c" CreationDate="2010-09-05T14:06:42.940" UserId="1021" Text="How was your experience working as a game tester?" />
  <row Id="7025" PostHistoryTypeId="3" PostId="3580" RevisionGUID="2200a4ef-e944-4397-898a-21aadb031d9c" CreationDate="2010-09-05T14:06:42.940" UserId="1021" Text="&lt;career&gt;&lt;game-industry&gt;&lt;testing&gt;" />
  <row Id="7026" PostHistoryTypeId="16" PostId="3580" RevisionGUID="2200a4ef-e944-4397-898a-21aadb031d9c" CreationDate="2010-09-05T14:06:42.940" UserId="1021" />
  <row Id="7027" PostHistoryTypeId="2" PostId="3581" RevisionGUID="2983d02d-f4af-474f-bd69-fbf0d3718741" CreationDate="2010-09-05T15:29:33.427" UserId="2022" Text="The [Angel Engine][1] is very nice, small Open Source engine written in C++ and OpenGL.  Plus it has a Python scripting interface.  Although the engine is not written in C# it should give you a few pointers and ideas, and from the little I've played with it the code is very clean and easy to understand even if you're not totally up on C++.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/" />
  <row Id="7028" PostHistoryTypeId="5" PostId="3581" RevisionGUID="a69e928b-8022-4c0e-9f2c-ccfe3857d320" CreationDate="2010-09-05T17:50:10.570" UserId="2022" Comment="added 2 characters in body" Text="The [Angel Engine][1] is a very nice, small Open Source engine written in C++ and OpenGL.  Plus it has a Python scripting interface.  Although the engine is not written in C# it should give you a few pointers and ideas, and from the little I've played with it the code is very clean and easy to understand even if you're not totally up on C++.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/" />
  <row Id="7029" PostHistoryTypeId="2" PostId="3582" RevisionGUID="f8a7fb53-711d-4939-b899-22b41eb58496" CreationDate="2010-09-05T17:55:33.843" UserId="458" Text="I'm not a tester but I've worked on teams with them, and had students enter the industry as testers.&#xD;&#xA;&#xD;&#xA;Up sides:&#xD;&#xA;&#xD;&#xA; - Yes, it is a &quot;relatively&quot; easy way to get a job. Key word: relative. Testing jobs are still competitive.&#xD;&#xA; - You're one of the few people on the development team that can actually say you play games for a living.&#xD;&#xA; - It's a foot in the door.&#xD;&#xA;&#xD;&#xA;Down sides:&#xD;&#xA;&#xD;&#xA; - The best description I've heard of QA is that it's walking into a wall for 40 hours to make sure you can't walk through it. The job is tedious, to say the least, and most people really can't stomach it for very long.&#xD;&#xA; - You're one of the few people on the development team that works part-time, so the pay is lousy and you can pretty much count on being let go at the end of the current project. You're on a ticking clock, so if you want to work yourself into a more permanent position, you've gotta work hard and fast to do so. Actual transitions from part-time QA to full-time programmer or designer are rare (all the more so as more would-be developers are treating QA as an entry point).&#xD;&#xA; - In my experience, there has been a clear separation between development and QA. While testers are at least treated nicely as human beings, it can be frustrating when you write up a bug only to hear that the dev team isn't doing anything about it -- not because they don't want to, but because there aren't enough resources and the leads have to make tough calls about what to fix and what not to.&#xD;&#xA;&#xD;&#xA;To answer your other questions: I've not seen very many QA people doing test scripting or other programming-like things, but that might be because many testers have no programming skills, or because purchasing a license for an automated test suite isn't in the budget, more than anything. And yes, bugs ALWAYS make it into production, but I've NEVER seen the testers get blamed." />
  <row Id="7030" PostHistoryTypeId="16" PostId="3582" RevisionGUID="f8a7fb53-711d-4939-b899-22b41eb58496" CreationDate="2010-09-05T17:55:33.843" UserId="-1" />
  <row Id="7031" PostHistoryTypeId="2" PostId="3583" RevisionGUID="3b5595a2-c8be-445d-88b2-7e556ef61674" CreationDate="2010-09-05T17:58:58.553" UserId="1195" Text="I have found the videos at [3D Buzz][1] to be of very high quality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.3dbuzz.com/vbforum/sv_videonav.php?fid=0ff61b695c6bdfd1a409d4e94c13ae33" />
  <row Id="7032" PostHistoryTypeId="16" PostId="3583" RevisionGUID="3b5595a2-c8be-445d-88b2-7e556ef61674" CreationDate="2010-09-05T17:58:58.553" UserId="-1" />
  <row Id="7033" PostHistoryTypeId="2" PostId="3584" RevisionGUID="8c879b63-396e-478a-a3b6-f9b29d000275" CreationDate="2010-09-05T18:41:57.797" UserId="154" Text="Not a tester, but observations as a developer for big and small companies&#xD;&#xA;&#xD;&#xA;&gt; Did the game tester position lead to other more desirable positions?&#xD;&#xA;&#xD;&#xA;Sometimes, but rarely. The most common paths out of test are:&#xD;&#xA;&#xD;&#xA; * tester -&gt; test manager -&gt; Associate Producer on the dev team.&#xD;&#xA; * tester -&gt; lead tester -&gt; junior designer&#xD;&#xA;&#xD;&#xA;I've seen more testers go the producer route that design, but it depends on their skills and the team. The step out of test is hard, and often is down to timing and luck more than your ability. &#xD;&#xA;&#xD;&#xA;If you are currently developing games and have the necessary skills I'd try for an entry level design/programming job and exhaust that before going to test.&#xD;&#xA;&#xD;&#xA;&gt; How were the relationships between testers and developers?&#xD;&#xA;&#xD;&#xA;Depends on the team, but they are often pretty separated often in entirely different buildings. &#xD;&#xA;&#xD;&#xA;&gt; Did you write any code? (test &quot;frameworks&quot;, unit tests etc)&#xD;&#xA;&#xD;&#xA;Was never a tester, but most of their day is spent just trying to break the build in specific ways. In the later stages of the game, half the day is spent trying to reproduce various bugs the dev team thinks they've fixed.&#xD;&#xA;&#xD;&#xA;Unit test stuff is done on the dev team side of the equation.&#xD;&#xA;&#xD;&#xA;&gt; If bugs made it into production was any (potentially unfair) blame put on the testers&#xD;&#xA;&#xD;&#xA;There are always bugs that make it into the final build. A big retail game logs 10 of thousands of bugs over the course of development. While all known crash bugs are fixed before shipping on consoles, many of the minor ones are closed out as not worth fixing, since any fix has the potential of introducing future problems. The testing team isn't blamed for any of those choices which fall on the producers and leads.&#xD;&#xA;&#xD;&#xA;However on the console side there are specific requirements from each of the console manufacturers. If the testing team misses testing for one of these, then yes they would be blamed because they are known beforehand. Any test team for an established developer is very aware of this process though.  " />
  <row Id="7034" PostHistoryTypeId="16" PostId="3584" RevisionGUID="8c879b63-396e-478a-a3b6-f9b29d000275" CreationDate="2010-09-05T18:41:57.797" UserId="-1" />
  <row Id="7035" PostHistoryTypeId="2" PostId="3585" RevisionGUID="075da1f8-0e6c-4751-bf74-a9f194fc5d0f" CreationDate="2010-09-05T19:14:00.823" UserId="2039" Text="I'm using XNA and am having a simple issue which I can't figure out. I'm just messing around and want to get a firm grasp of local/world space coordinates. &#xD;&#xA;&#xD;&#xA;            Matrix rotateCharacter= Matrix.CreateRotationZ(MathHelper.ToRadians(45.0f));&#xD;&#xA;            &#xD;&#xA;            Matrix moveCharacter = Matrix.CreateTranslation(new Vector3(10,10,0));&#xD;&#xA;&#xD;&#xA;            Matrix multMat =Matrix.Identity * rotateCharacter * moveCharacter ;&#xD;&#xA;            &#xD;&#xA;            Matrix WorldToB = Matrix.Invert(multMat);&#xD;&#xA;&#xD;&#xA;            Vector2 worldCoord = new Vector2(10, 10);&#xD;&#xA;            Vector2 worldToB = Vector2.Transform(worldCoord, WorldToB);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So all I'm doing here in my example is initially rotating my sprite's local axis around the world origin and then translating it out into world space. Thus, a world space coordinate of something like (10,10) would be 0,0 (my pixel's starting coordinate) in the local space (worldToB should be (0,0)). However, this is not occurring I guess as my inverted matrix is incorrect. Can anyone give me an answer of what I'm doing wrong exactly?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7036" PostHistoryTypeId="1" PostId="3585" RevisionGUID="075da1f8-0e6c-4751-bf74-a9f194fc5d0f" CreationDate="2010-09-05T19:14:00.823" UserId="2039" Text="Why isn't my world coordinate mapping back to the proper local coordinate?" />
  <row Id="7037" PostHistoryTypeId="3" PostId="3585" RevisionGUID="075da1f8-0e6c-4751-bf74-a9f194fc5d0f" CreationDate="2010-09-05T19:14:00.823" UserId="2039" Text="&lt;xna&gt;&lt;math&gt;&lt;coordinates&gt;" />
  <row Id="7038" PostHistoryTypeId="2" PostId="3586" RevisionGUID="4c173c7e-8e28-4e34-ae69-4362ec6d2153" CreationDate="2010-09-05T20:03:41.333" UserId="189" Text="I have no preference towards Ruby (or Python), I'm a Java person myself. But UnknownDevice's answer about how Ruby is somehow &quot;not really for games&quot; and Python is, frustrated me. I do hope he will clarify.&#xD;&#xA;&#xD;&#xA;I know Pygame exists and has been around, and I recognize that Python has a larger userbase than Ruby. But to be honest, neither of them seems like a language &quot;for games&quot;. Neither does Java, and that's my game programming language of choice. (and when I say &quot;of choice&quot;, I do mean **by choice**, not because it's what's taught in school or because it's something I &quot;know&quot;). And really, what is a language &quot;for games&quot;? Well, speed is a factor, and obviously it must have libraries for graphics and other game systems (audio, input, etc).&#xD;&#xA;&#xD;&#xA;As far as speed goes, it seems to be a tossup between Ruby and Python. Do some searches and you'll quickly find benchmarks and arguments for both sides of the spectrum, and various configurations which put one or the other ahead. Python with something called &quot;Psycho&quot; seems a popular speed demon compared to Ruby, yet regular Python seems to be a bit slower than Ruby. In the end, if you're choosing such a high-level language you're obviously not concerned with native speeds anyway; go with the language you know best. And obviously you know Ruby best, so I encourage it!&#xD;&#xA;&#xD;&#xA;The other factor is whether the technology is there to create games; whether it can support drawing to the screen and collecting input and playing audio. Ruby can do all of these. In fact there are a good number of options in this respect. There's a [ruby-opengl][1] package at RubyForge which will give OpenGL support to Ruby (or it might be included by default?). Alternatively, [Chingu][2] provides &quot;lightning fast OpenGL accelerated 2D graphics!&quot; according to its homepage; it builds extra features on top of [Gosu][3], which you could choose to use if Chingu is too much for you. Or for 3D graphics, if you don't want to use ruby-opengl, try [G3DRuby][4], &quot;a very clean set of wrapper classes for many of the more advanced OpenGL features&quot;. There's even [Rubygame][5], which I can't find much information on but it claims to be &quot;a cross-platform multimedia library&quot; and given the name, must have emphasis on game development. If you are familiar with the popular [SDL][6] library for C++, there's [Ruby/SDL][7] or [RUDL][8], both of which are Ruby wrappers of SDL.&#xD;&#xA;&#xD;&#xA;There is no reason that Ruby should be less of a game programming language than Python; if there is one, I'd really like to hear it so I can argue against it. **If you feel most comfortable programming in Ruby, and you are aware of the pros and cons compared to other popular languages, then by all means you can certainly develop games in Ruby!**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ruby-opengl.rubyforge.org/&#xD;&#xA;  [2]: http://ippa.se/chingu&#xD;&#xA;  [3]: http://www.libgosu.org/&#xD;&#xA;  [4]: http://g3d-ruby.rubyforge.org/&#xD;&#xA;  [5]: http://rubygame.org/&#xD;&#xA;  [6]: http://www.libsdl.org/&#xD;&#xA;  [7]: http://www.kmc.gr.jp/~ohai/rubysdl.en.html&#xD;&#xA;  [8]: http://sourceforge.net/projects/rudl/" />
  <row Id="7039" PostHistoryTypeId="2" PostId="3587" RevisionGUID="c2c81211-aa20-4bf7-8a2d-22dda78a414f" CreationDate="2010-09-05T20:29:24.603" UserId="1923" Text="&#xD;&#xA;&gt;  (worldToB should be (0,0)). However, this is not occurring &#xD;&#xA;&#xD;&#xA;But the vector2 worldToB does end up being 0,0 in your code above..., within the realm of floating point error anyways.&#xD;&#xA;&#xD;&#xA;The actual value of worldToB.X is -0.0000002843... on my computer which for all practical purposes is 0.0f.&#xD;&#xA;" />
  <row Id="7040" PostHistoryTypeId="2" PostId="3588" RevisionGUID="99d0333b-05ff-4bcc-8a21-47e5febd4bc2" CreationDate="2010-09-05T23:05:01.003" UserId="1943" Text="No, I'm not looking for glPolygonMode. I'm searching for a method, possibly a GLSL shader that would produce that retro-style wireframe look for objects. Any suggestions?&#xD;&#xA;&#xD;&#xA;Something like Vector Tanks had.&#xD;&#xA;&#xD;&#xA;![http://toucharcade.com/wp-content/uploads/2009/01/picture-111-300x204.png][1]&#xD;&#xA;&#xD;&#xA;Preferably the solution should work on OpenGL ES 2.0 also.&#xD;&#xA;&#xD;&#xA;Any hints and pointers (as long as not NULL) appreciated!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zFBIP.png" />
  <row Id="7041" PostHistoryTypeId="1" PostId="3588" RevisionGUID="99d0333b-05ff-4bcc-8a21-47e5febd4bc2" CreationDate="2010-09-05T23:05:01.003" UserId="1943" Text="OpenGL wireframe" />
  <row Id="7042" PostHistoryTypeId="3" PostId="3588" RevisionGUID="99d0333b-05ff-4bcc-8a21-47e5febd4bc2" CreationDate="2010-09-05T23:05:01.003" UserId="1943" Text="&lt;opengl&gt;" />
  <row Id="7043" PostHistoryTypeId="2" PostId="3589" RevisionGUID="03d8f325-e0c1-40ff-bbf7-106fcb698901" CreationDate="2010-09-06T00:08:45.813" UserId="962" Text="&gt; I'm using various scaled Bitmap objects and a few vector gradient overlays&#xD;&#xA;&#xD;&#xA;You can use really inefficient methods with any other programing languages too.&#xD;&#xA;&#xD;&#xA;Scaled Bitmap objects = really bad performance.&#xD;&#xA;&#xD;&#xA;Vector Gradient overlays = really really bad performance.&#xD;&#xA;&#xD;&#xA;If you want to use the flash native render, use non scaled bitmap objects, and any vector stuff, make sure you use a low amount of curves, with no gradients other than on a small amount of objects.&#xD;&#xA;&#xD;&#xA;If you want performance with better looking graphics look into Blitting, it is less flexable than the native render, but if you are looking for performance, you are going to have to use this." />
  <row Id="7044" PostHistoryTypeId="2" PostId="3590" RevisionGUID="b6c99943-5417-4732-861b-76748b2d656c" CreationDate="2010-09-06T00:44:24.037" UserId="1543" Text="I know it's probably not what you're after, but it looks like Vector Tanks just uses textured models. The texture gives the wire frame look, it runs on my iPod touch which doesn't support shaders." />
  <row Id="7045" PostHistoryTypeId="2" PostId="3591" RevisionGUID="155d388d-a63a-4d18-a44c-6d0e67447443" CreationDate="2010-09-06T00:45:58.453" UserDisplayName="Matt Poirier" Text="My name is Matt Poirier. I wrote the music and sound for Octix. If you need music then I could do it for cheap. Here is some of my music: http://www.youtube.com/watch?v=Dpm97YjcDWY&#xD;&#xA;&#xD;&#xA;:)" />
  <row Id="7046" PostHistoryTypeId="16" PostId="3591" RevisionGUID="155d388d-a63a-4d18-a44c-6d0e67447443" CreationDate="2010-09-06T00:45:58.453" UserId="-1" />
  <row Id="7047" PostHistoryTypeId="2" PostId="3592" RevisionGUID="6c94d2e2-fc6a-4165-b5ff-533762227ede" CreationDate="2010-09-06T02:38:37.530" UserId="101" Text="[http://gafferongames.com/2009/01/11/ruby-is-not-at-all-suitable-for-game-development/][1]&#xD;&#xA;&#xD;&#xA;The URL is probably a bit of a spoiler.&#xD;&#xA;&#xD;&#xA;tl;dr: the naive garbage collector is a real problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/2009/01/11/ruby-is-not-at-all-suitable-for-game-development/" />
  <row Id="7048" PostHistoryTypeId="2" PostId="3593" RevisionGUID="0a8deed5-4d5e-4374-bc87-d59ba4f49f77" CreationDate="2010-09-06T03:00:04.267" UserId="2037" Text="I said Python because it has a bigger userbase and more choices when it comes to frameworks/libraries for games development. Its pretty obvious that this person has no experience in games development so it doesn't make sense to me to recommend that they use something like Ruby just because it's possible.&#xD;&#xA;&#xD;&#xA;When I work on games I use C++ with Lua, I don't go off and write my game in Visual Basic just because it has media support. I'm sure everyone here has heard someone say certain tools for certain jobs. I'm sure you can hammer a nail with a shoe, but why would you do that when you can use a hammer." />
  <row Id="7049" PostHistoryTypeId="2" PostId="3594" RevisionGUID="de702739-f44a-4f3f-97cf-84564e15effb" CreationDate="2010-09-06T03:32:21.760" UserId="189" Text="I would highly recommend using textures, as Dave said. It may be something of a pain, but it would provide much better performance, I think.&#xD;&#xA;&#xD;&#xA;You could try searching for **edge detection** algorithms. If you create your meshes using vertex coloring with solid colors and medium alpha values (for slight transparency), and then use an edge detection shader, it might look good enough. It wouldn't be quite the same, but you might like it even more; or maybe not.&#xD;&#xA;&#xD;&#xA;Otherwise you may be looking at a two-pass solution, drawing translucent polygons (again, set the vertex colors to a solid color with a medium alpha value), then setting [glPolygonMode][1](GL_LINE) and tweak [glLineWidth][2] as desired (perhaps based on the object distance) and draw the polygons again.&#xD;&#xA;&#xD;&#xA;It's a little late and I'm having a hard time reading through this, but [a forum discussion][3] points to this PDF: [Single-pass Wireframe Rendering][4]. My apologies if it isn't relevant.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml&#xD;&#xA;  [2]: http://www.talisman.org/opengl-1.1/Reference/glLineWidth.html&#xD;&#xA;  [3]: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=252848&#xD;&#xA;  [4]: http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/4884/pdf/imm4884.pdf" />
  <row Id="7050" PostHistoryTypeId="2" PostId="3595" RevisionGUID="013a766c-3b35-4490-9eb5-1b7103341722" CreationDate="2010-09-06T03:32:27.373" UserId="613" Text="The only way I've seen it done is with high-resolution, mostly-black textures, such as the ones in Tron 2.0. Their textures are almost universally either a flat black with a thick, colored border, or a simple Perlin noise texture.&#xD;&#xA;&#xD;&#xA;They applied [some simple post-processing](http://http.developer.nvidia.com/GPUGems/gpugems_ch21.html) to achieve the glow effect." />
  <row Id="7051" PostHistoryTypeId="2" PostId="3596" RevisionGUID="15f2dc5d-86eb-4496-b534-cdbcf0e8abb1" CreationDate="2010-09-06T03:57:27.313" UserId="919" Text="This is a very persistent question in game design, especially in games where you need to hold/retain players like MMO or social games. (On a side note grinding can easily calculated so its easy tool for engagement and timed progression).&#xD;&#xA;&#xD;&#xA;The question other than community building/competition are there solutions that can replace grinding and still hold your audience for certain period of time (without adding large amounts of game assets and code)?" />
  <row Id="7052" PostHistoryTypeId="1" PostId="3596" RevisionGUID="15f2dc5d-86eb-4496-b534-cdbcf0e8abb1" CreationDate="2010-09-06T03:57:27.313" UserId="919" Text="what is the best way to eliminate grinding in games?" />
  <row Id="7053" PostHistoryTypeId="3" PostId="3596" RevisionGUID="15f2dc5d-86eb-4496-b534-cdbcf0e8abb1" CreationDate="2010-09-06T03:57:27.313" UserId="919" Text="&lt;game-design&gt;" />
  <row Id="7054" PostHistoryTypeId="2" PostId="3597" RevisionGUID="96ad908c-9647-45a7-8307-e9b7c1382c28" CreationDate="2010-09-06T04:38:40.590" UserId="1994" Text="How can I make my game (right now just a C# Console Application) appear in the Start Menu under Games??&#xD;&#xA;&#xD;&#xA;I mean is it possible for any program to register as a Game in Windows Vista / 7?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7055" PostHistoryTypeId="1" PostId="3597" RevisionGUID="96ad908c-9647-45a7-8307-e9b7c1382c28" CreationDate="2010-09-06T04:38:40.590" UserId="1994" Text="Make Windows game appear in Start Menu - Games" />
  <row Id="7056" PostHistoryTypeId="3" PostId="3597" RevisionGUID="96ad908c-9647-45a7-8307-e9b7c1382c28" CreationDate="2010-09-06T04:38:40.590" UserId="1994" Text="&lt;c#&gt;&lt;windows&gt;&lt;console&gt;" />
  <row Id="7057" PostHistoryTypeId="2" PostId="3598" RevisionGUID="370997b7-af96-48d3-b4e5-d42e740e479d" CreationDate="2010-09-06T04:45:41.883" UserId="189" Text="Turn to MSDN for all your Windows answers!&#xD;&#xA;&#xD;&#xA;[&quot;Games for Windows Technical Requirements: Best Practices for Games on Windows XP, Windows Vista, and Windows 7&quot;][1] has a section on [Games Explorer Integration][2].&#xD;&#xA;&#xD;&#xA;&gt; Integration with Games Explorer requires that you author a game definition file (GDF), which is an XML text file that is embedded within a binary file (an executable file or a DLL) as a resource, along with a Windows icon. The game must then be registered with Games Explorer.&#xD;&#xA;&#xD;&#xA;&gt;...&#xD;&#xA;&#xD;&#xA;&gt;Details on integrating with Windows Games Explorer are provided in the DirectX SDK. The DirectX SDK includes a game definition file (GDF) editor, as well as an example GDF that is included in GDFExampleBinary, a sample. Another sample, GameUxInstallHelper, provides routines for integrating the required functionality into existing installation systems. The Game Definition File Validator (gdftrace.exe) provides debugging support for evaluating a GDF. Also see &quot;Windows Games Explorer Integration&quot; in the DirectX SDK Documentation for C++.&#xD;&#xA;&#xD;&#xA;There is another article too, [&quot;Windows Games Explorer for Game Developers&quot;][3], which might provide additional information.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee417691(VS.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee417691(VS.85).aspx#_1.1&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ee419047(VS.85).aspx" />
  <row Id="7058" PostHistoryTypeId="5" PostId="3598" RevisionGUID="dea90816-5dda-4b9e-b4c6-86f875a9c596" CreationDate="2010-09-06T04:59:28.213" UserId="189" Comment="added 828 characters in body" Text="Turn to MSDN for all your Windows answers!&#xD;&#xA;&#xD;&#xA;[&quot;Games for Windows Technical Requirements: Best Practices for Games on Windows XP, Windows Vista, and Windows 7&quot;][1] has a section on [Games Explorer Integration][2].&#xD;&#xA;&#xD;&#xA;&gt; Integration with Games Explorer requires that you author a game definition file (GDF), which is an XML text file that is embedded within a binary file (an executable file or a DLL) as a resource, along with a Windows icon. The game must then be registered with Games Explorer.&#xD;&#xA;&#xD;&#xA;&gt;...&#xD;&#xA;&#xD;&#xA;&gt;Details on integrating with Windows Games Explorer are provided in the DirectX SDK. The DirectX SDK includes a game definition file (GDF) editor, as well as an example GDF that is included in GDFExampleBinary, a sample. Another sample, GameUxInstallHelper, provides routines for integrating the required functionality into existing installation systems. The Game Definition File Validator (gdftrace.exe) provides debugging support for evaluating a GDF. Also see &quot;Windows Games Explorer Integration&quot; in the DirectX SDK Documentation for C++.&#xD;&#xA;&#xD;&#xA;There is another article too, [&quot;Windows Games Explorer for Game Developers&quot;][3], which might provide additional information, especially if you use an InstallShield or MSI installer. It looks like you can just integrate it into the installer.&#xD;&#xA;&#xD;&#xA;Also [this blog post][4] looks like a really great tutorial; even though it supposedly applies to XNA games, I read through it and it looks like it would still apply to you! Especially pay attention to this:&#xD;&#xA;&#xD;&#xA;&gt; Which brings us to our final task – the actual registration of the game. This stage is generally done by an installer such as Inno Setup or InstallShield rather than by the user or developer directly.&#xD;&#xA;&#xD;&#xA;And that (integration with an installer) seems to be covered by the above Windows Game Explorer for Game Developers article. So I think, given this information, it should be pretty straightforward!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee417691(VS.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee417691(VS.85).aspx#_1.1&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ee419047(VS.85).aspx&#xD;&#xA;  [4]: http://chris.charabaruk.com/articles/building-game-explorer-support-your-xna-project" />
  <row Id="7059" PostHistoryTypeId="2" PostId="3599" RevisionGUID="4d4f2cc1-5b15-4c68-a273-250c0d5c1a93" CreationDate="2010-09-06T05:52:43.347" UserId="2036" Text="You could always impose limits on play time, or specifically on performing the same action excessively in a certain time frame. This then leaves you needing other alternatives for players to gain acheivements/items.&lt;br&gt;&lt;br&gt; One idea is having a concept of 'quests', where a player needs to do a variety of different things and in different places in order to get rewards. The thing is, the rewards need to be valuable, worth forgoing grinding for a harder pursuit. The quests need to be long enough so that players couldn't repeat it over and over again in a short time (grinding), but short enough that they are still accessible and interesting. It's tough to balance, but if you do, they will be a lot more interesting for players than sitting doing the same thing over and over. " />
  <row Id="7060" PostHistoryTypeId="5" PostId="3599" RevisionGUID="e03d77bb-f9b7-4608-b4c8-12073e1b1591" CreationDate="2010-09-06T06:03:07.970" UserId="2036" Comment="added 613 characters in body" Text="You could always impose limits on play time, or specifically on performing the same action excessively in a certain time frame. This then leaves you needing other alternatives for players to gain acheivements/items. These alternatives need to not only be enjoyable (though just about anything is more enjoyable than grinding), they need to offer the same level-ups and rewards that grinding would do. Actually, having better rewards would be a good incentive for people to adopt them.&#xD;&#xA;&lt;br&gt;&lt;br&gt; One idea is having a concept of 'quests', where a player needs to do a variety of different things and in different places in order to get rewards. The thing is, the rewards need to be valuable, worth forgoing grinding for a harder pursuit. The quests need to be long enough so that players couldn't repeat it over and over again in a short time (grinding), but short enough that they are still accessible and interesting. It's tough to balance, but if you do, they will be a lot more interesting for players than sitting doing the same thing over and over. &#xD;&#xA;&#xD;&#xA;Another option is some sort of reward for achievements in multiple disciplines. For example, if your game has 'skills' like a game like Runescape has, maybe something could be given for getting to a certain level (a low to mid level) in a certain number of different skills. This encourages different activities to be explored by players." />
  <row Id="7061" PostHistoryTypeId="4" PostId="3597" RevisionGUID="85e28917-94be-4288-bf2d-d0a1729df893" CreationDate="2010-09-06T06:08:57.410" UserId="1994" Comment="edited title" Text="Make Windows game appear in Games Explorer (Start Menu - Games)" />
  <row Id="7062" PostHistoryTypeId="2" PostId="3600" RevisionGUID="fdefd196-f095-42e4-aea5-c76700bac237" CreationDate="2010-09-06T06:17:34.387" UserId="1091" Text="You could try some kind of simple distance function in the pixel shader. Perhaps something like barycentric coordinates (store different RGB at the vertices and the rasteriser will do most of the work for you).&#xD;&#xA;&#xD;&#xA;Then your pixel shader will have the information it needs about where on a polygon the current pixel is - near a vertex, near an edge, or in the middle...&#xD;&#xA;&#xD;&#xA;I suspect in practice it'd be easier to texture it though.&#xD;&#xA;" />
  <row Id="7063" PostHistoryTypeId="2" PostId="3601" RevisionGUID="97d0b02d-ef81-4036-b132-f1bff979436c" CreationDate="2010-09-06T06:29:38.193" UserId="1924" Text="Some links of interest:&#xD;&#xA;&#xD;&#xA;Baerentzen et al. &quot;Single-pass wireframe rendering&quot;&#xD;&#xA;http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=4884&#xD;&#xA;&#xD;&#xA;Nividia Corporation &quot;Solid Wireframe&quot; white paper&#xD;&#xA;http://developer.download.nvidia.com/SDK/10/direct3d/samples.html" />
  <row Id="7064" PostHistoryTypeId="2" PostId="3602" RevisionGUID="78ffe806-5453-4121-9cf0-d9e1ae85a034" CreationDate="2010-09-06T06:32:13.050" UserId="50" Text="Why don't you simply use Swing or Awt for a start (for 2D)? If you correclty design your game (I mean, a well though MVC design), you will be able to upgrage your game with a better game display engine later. The main goal, if you're working alone, is to quickly achieve to have something displayed on the screen, is'nt it ? It boosts your enthusiasm ..." />
  <row Id="7065" PostHistoryTypeId="2" PostId="3603" RevisionGUID="78249db8-c7a2-4b67-a194-c6d024c7eb05" CreationDate="2010-09-06T06:32:40.053" UserId="50" Text="Is there a well known IA technique to create an oppenent in the game Othello (aka Reversi) ? &#xD;&#xA;&#xD;&#xA;!" />
  <row Id="7066" PostHistoryTypeId="1" PostId="3603" RevisionGUID="78249db8-c7a2-4b67-a194-c6d024c7eb05" CreationDate="2010-09-06T06:32:40.053" UserId="50" Text="Is there an easy way to create an IA opponent for the Othello game ?" />
  <row Id="7067" PostHistoryTypeId="3" PostId="3603" RevisionGUID="78249db8-c7a2-4b67-a194-c6d024c7eb05" CreationDate="2010-09-06T06:32:40.053" UserId="50" Text="&lt;game-design&gt;&lt;ai&gt;&lt;competition&gt;" />
  <row Id="7068" PostHistoryTypeId="5" PostId="3601" RevisionGUID="978303ec-d1fb-4fcd-a385-4831ce7850ba" CreationDate="2010-09-06T06:36:22.753" UserId="1924" Comment="added 59 characters in body" Text="Some links of interest:&#xD;&#xA;&#xD;&#xA;Baerentzen et al. &quot;Single-pass wireframe rendering&quot;&#xD;&#xA;http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=4884&#xD;&#xA;&#xD;&#xA;Nividia Corporation &quot;Solid Wireframe&quot; white paper&#xD;&#xA;http://developer.download.nvidia.com/SDK/10/direct3d/samples.html&#xD;&#xA;&#xD;&#xA;edit: I see the first one was already mentioned, sorry!" />
  <row Id="7069" PostHistoryTypeId="2" PostId="3604" RevisionGUID="031b88ae-18f7-4b71-8fc4-d4c834cf8966" CreationDate="2010-09-06T06:40:31.443" UserId="1120" Text="Standard game-tree search techniques will beat most human players easily.  Othello has less combinatorial complexity than chess, and humans have a harder time forecasting the future in Othello.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Reversi#Computer_opponents_and_research&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Computer_Othello&#xD;&#xA;" />
  <row Id="7070" PostHistoryTypeId="2" PostId="3605" RevisionGUID="c92be68f-6a88-44c2-8e06-ba3d637fddf1" CreationDate="2010-09-06T08:47:17.997" UserId="919" Text="I have one answer to this but only applies to console games. Instead XP for skills you attach movesets to items (way of the samurai did this). Instead of rare drops items are obtained by killing condition (monster hunter had a mix of this and random drop with it's carving system).&#xD;&#xA;&#xD;&#xA;But I don't see this effective for an MMO setting though. " />
  <row Id="7071" PostHistoryTypeId="2" PostId="3606" RevisionGUID="d4046b1d-30d2-4ae7-b9bf-59dec04d6e01" CreationDate="2010-09-06T08:49:10.707" UserId="119" Text="I think this question is particular to MMOs, but the answer lies by looking outside MMOs. What is grinding? Completing a repetitive task with a guaranteed reward. How do you eliminate it? Provide puzzles, challenges, story, character and anything that motivates and engages the player outside of the gold/items economy of the game." />
  <row Id="7072" PostHistoryTypeId="2" PostId="3607" RevisionGUID="9a4e2f72-f537-44ae-a46a-863953f93d71" CreationDate="2010-09-06T08:56:31.810" UserId="119" Text="This is what you're after:&#xD;&#xA;&#xD;&#xA;http://www.bytearray.org/?p=1836&#xD;&#xA;&#xD;&#xA;Seems like all will be revealed at MAX on October 27 2010. From what I've heard there will be GPU accelerated 3D, which of course can also be used for 2D. If they are sensible though they will also provide 2D APIs, but we'll see. Someone can always write a framework on top of it to 2D-ize it. Personally I can't wait til October to find out!" />
  <row Id="7073" PostHistoryTypeId="2" PostId="3608" RevisionGUID="d6ae275c-7ff8-4f31-878e-719db3226f54" CreationDate="2010-09-06T09:49:28.530" UserId="744" Text="This question avoids one of the main problems with &quot;grinding&quot;, which is that no one agrees exactly what it is. In Everquest, grinding was fighting random mobs for XP. WoW switched the MMO format to a quest-based genre, so then grinding is doing uninteresting quests.&#xD;&#xA;&#xD;&#xA;Is grinding any low-attention play? Then you don't want to get rid of it entirely, because low-attention play is what drives a lot of social interaction. It also serves to make high-attention (i.e. &quot;difficult&quot;) play more exciting by highlighting it.&#xD;&#xA;&#xD;&#xA;Is grinding what you do after you make the interesting choices, e.g. grinding is actually fighting the raid boss after speccing out your gear? Then grinding is the test of your ability to play the game, and can't be gotten rid of.&#xD;&#xA;&#xD;&#xA;Is grinding a repetitive play pattern? Some repetition is necessary. It ensures players learn skills, and they usually feel good being able to demonstrate they have learned their skills. If players are complaining about doing something 3-5 times being &quot;grindy&quot;, the problem is probably that's is boring to do even once.&#xD;&#xA;&#xD;&#xA;Is grinding any boring element of a game? Not everyone is excited by the same things, so you'll never get rid of &quot;the grind&quot; in this case.&#xD;&#xA;&#xD;&#xA;Are complaints of grinding just whining because you can't get the best sword in the game in the first ten minutes? Sometimes.&#xD;&#xA;&#xD;&#xA;&quot;Grind&quot; is a term so abused and overloaded it's meaningless. First identify your market, then identify what they like doing, then make a game where they can do that. If people complain it's &quot;grindy&quot;, figure out what, if anything, they are actually complaining about." />
  <row Id="7074" PostHistoryTypeId="5" PostId="3608" RevisionGUID="fc957924-1f3f-4599-ba82-49567454dc73" CreationDate="2010-09-06T09:54:38.287" UserId="744" Comment="edited body" Text="This question avoids one of the main problems with &quot;grinding&quot;, which is that no one agrees exactly what it is. In Everquest, grinding was fighting random mobs for XP. WoW switched the MMO format to a quest-based genre, so then grinding is doing uninteresting quests.&#xD;&#xA;&#xD;&#xA;Is grinding any low-attention play? Then you don't want to get rid of it entirely, because low-attention play is what drives a lot of social interaction. It also serves to make high-attention (i.e. &quot;difficult&quot;) play more exciting by highlighting it.&#xD;&#xA;&#xD;&#xA;Is grinding what you do after you make the interesting choices, e.g. grinding is actually fighting the raid boss after speccing out your gear? Then grinding is the test of your ability to play the game, and can't be gotten rid of.&#xD;&#xA;&#xD;&#xA;Is grinding a repetitive play pattern? Some repetition is necessary. It ensures players learn skills, and they usually feel good being able to demonstrate they have learned their skills. If players are complaining about doing something 3-5 times being &quot;grindy&quot;, the problem is probably that it's boring to do even once.&#xD;&#xA;&#xD;&#xA;Is grinding any boring element of a game? Not everyone is excited by the same things, so you'll never get rid of &quot;the grind&quot; in this case.&#xD;&#xA;&#xD;&#xA;Are complaints of grinding just whining because you can't get the best sword in the game in the first ten minutes? Sometimes.&#xD;&#xA;&#xD;&#xA;&quot;Grind&quot; is a term so abused and overloaded it's meaningless. First identify your market, then identify what they like doing, then make a game where they can do that. If people complain it's &quot;grindy&quot;, figure out what, if anything, they are actually complaining about." />
  <row Id="7075" PostHistoryTypeId="2" PostId="3609" RevisionGUID="c161d356-ddf6-46f9-a17c-74c692b0347f" CreationDate="2010-09-06T11:30:50.240" UserId="1882" Text="I've always liked this one from the foreword of the incredible book, [*Half-Life 2: Raising the Bar*][1]..&#xD;&#xA;&#xD;&#xA;&lt;Blockquote&gt;*&quot;A single-player game is really a movie that you create in cooperation with the player, where the lead actor doesn't have a copy of the script.&quot;*&lt;/Blockquote&gt;&#xD;&#xA;&#xD;&#xA;From Valve Front-man, Gabe Newell&#xD;&#xA;&#xD;&#xA;The whole book is a collection of beautiful resources and stories that detail Valve's development process.. Highly recommended to artists, designers and programmers :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Half-Life-2-Raising-David-Hodgson/dp/0761543643" />
  <row Id="7076" PostHistoryTypeId="16" PostId="3609" RevisionGUID="c161d356-ddf6-46f9-a17c-74c692b0347f" CreationDate="2010-09-06T11:30:50.240" UserId="-1" />
  <row Id="7077" PostHistoryTypeId="2" PostId="3610" RevisionGUID="874d451a-e754-4528-84f0-d03cffd52b79" CreationDate="2010-09-06T11:53:27.930" UserId="2048" Text="Is there any significant difference between using a square or hexagonal grid for the area searched by a path finding algorithm. In other words, is square or hexagonal better, and if so why.  " />
  <row Id="7078" PostHistoryTypeId="1" PostId="3610" RevisionGUID="874d451a-e754-4528-84f0-d03cffd52b79" CreationDate="2010-09-06T11:53:27.930" UserId="2048" Text="Path finding #1" />
  <row Id="7079" PostHistoryTypeId="3" PostId="3610" RevisionGUID="874d451a-e754-4528-84f0-d03cffd52b79" CreationDate="2010-09-06T11:53:27.930" UserId="2048" Text="&lt;path-finding&gt;" />
  <row Id="7080" PostHistoryTypeId="2" PostId="3611" RevisionGUID="6f1e0da7-d783-4f4c-8e20-573ef77c167e" CreationDate="2010-09-06T12:14:10.033" UserId="1882" Text="Although graphics is my main area of focus, I've been dabbling with Game AI concepts for quite some time now; from simple A* path-finding to intricate Perceptrons..&#xD;&#xA;&#xD;&#xA;My question is this; Does anyone have any examples of successful (or perhaps more interestingly, failed) implementations of some higher-level AI concepts in large-scale commercial titles?&#xD;&#xA;&#xD;&#xA;By higher-level, I mean methods of simulating intelligence that are usually found in Pure AI.. For example..&#xD;&#xA;&#xD;&#xA;* Neural Networks&#xD;&#xA;* Genetic Algorithms&#xD;&#xA;* Decision Theory&#xD;&#xA;&#xD;&#xA;I understand that as well as a financial budget, developers also have a budget of memory usage (with AI often taking a back seat). Many of these methods are costly to implement and provide limited returns.. I am just intrigued to find out if anyone knows where or when any of these (or any other high-level concepts that I've forgot to mention) have been deployed in any well-known games :)&#xD;&#xA;&#xD;&#xA;I also know that in this industry, trade-secrets are a fact of life ;) Aside from the AAA titles, if you have any of your own success-stories (or disasters) it would be nice to hear them! :D" />
  <row Id="7081" PostHistoryTypeId="1" PostId="3611" RevisionGUID="6f1e0da7-d783-4f4c-8e20-573ef77c167e" CreationDate="2010-09-06T12:14:10.033" UserId="1882" Text="Do higher-level 'Pure AI' concepts (such as Neural-Nets or Genetic Algos) ever get implemented successfully in commercial games?" />
  <row Id="7082" PostHistoryTypeId="3" PostId="3611" RevisionGUID="6f1e0da7-d783-4f4c-8e20-573ef77c167e" CreationDate="2010-09-06T12:14:10.033" UserId="1882" Text="&lt;programming&gt;&lt;ai&gt;" />
  <row Id="7083" PostHistoryTypeId="2" PostId="3612" RevisionGUID="47ec9a88-6a2d-4009-82e7-65312f3fed7c" CreationDate="2010-09-06T13:00:28.097" UserId="953" Text="I'm not an AI expert by any means, but the difference should be negligible.  Square grids are a bit faster (4 connections per node instead of 6), but that's really not the limiting factor in the algorithmic runtime.  Depending on what algorithm you're planning to use, the code might be a bit more complex for a hex grid, since it's a bit more complicated to calculate coordinates, and it's harder to use the sort of quadtree/octree shortcuts that I believe are often used in pathfinding.&#xD;&#xA;&#xD;&#xA;But for a simple world like a turn-based-strategy game level, the difference between the two layouts shouldn't matter much; a square grid will be slightly simpler and faster." />
  <row Id="7084" PostHistoryTypeId="2" PostId="3613" RevisionGUID="af3f0fed-53f9-4c3a-8f0a-78948f8b6fd3" CreationDate="2010-09-06T14:00:46.693" UserId="1872" Text="**The immediate question is: in HLSL, how can I orient a surface normal generated in UV space so that I can apply it to a cube face?** &#xD;&#xA;&#xD;&#xA;The overall project is that I'm trying to build a procedural planet generator.  I'm using a cube projected to a sphere where each face is a quad-tree.  The intermediate project is that I want to generate a normal map for the terrain.  I think the best way for me to do this (and understand what I'm doing) is to generate the normals for the cube version first, then work out the transformations to warp those normals to the sphere.&#xD;&#xA;&#xD;&#xA;Ideally the method would not involve branching code based on which face I'm working on (i.e., if we're on the top side of the cube, then U = X and V = Y).  In other words, what I'm hoping for is some math-magic like &quot;Oh, just cross multiply the terrain normal by the dot product of the cube face normal and blah blah blah&quot;.&#xD;&#xA;" />
  <row Id="7085" PostHistoryTypeId="1" PostId="3613" RevisionGUID="af3f0fed-53f9-4c3a-8f0a-78948f8b6fd3" CreationDate="2010-09-06T14:00:46.693" UserId="1872" Text="How to orient a surface normal to a cubic surface" />
  <row Id="7086" PostHistoryTypeId="3" PostId="3613" RevisionGUID="af3f0fed-53f9-4c3a-8f0a-78948f8b6fd3" CreationDate="2010-09-06T14:00:46.693" UserId="1872" Text="&lt;procedural-generation&gt;&lt;terrain-rendering&gt;" />
  <row Id="7087" PostHistoryTypeId="2" PostId="3614" RevisionGUID="6135d30a-c342-4b0f-83fd-655c347dbb23" CreationDate="2010-09-06T14:16:57.060" UserId="1101" Text="Generally speaking neural networks and genetic algorithms are not used in games, and probably not that often outside of games either.&#xD;&#xA;&#xD;&#xA;The main reason these are taught in AI academia is not because of their practical applicability but because they are quite easy to explain as teaching devices - both have mathematical and biological analogues that allow a student to understand how they could work.&#xD;&#xA;&#xD;&#xA;In the real world, you typically need reliability and predictability. The problem with learning methods is that if they learn 'in the wild' then they can learn the wrong patterns and be unreliable. An NN or a GA could potentially reach a local maximum which is not guaranteed to be good enough to provide the gameplay experience required, for example. Other times, it might end up being too good, finding a perfect strategy that is unbeatable. Neither is desirable in most entertainment products.&#xD;&#xA;&#xD;&#xA;Even if you train offline (ie. before launch, and not during gameplay), an apparently good looking set of data could be hiding anomalies that, once found by a player, are easy to exploit. A neural network in particular typically evolves a set of weights which is quite opaque to study, and the decisions made by it are hard to reason about. It would be difficult for a designer to tweak such an AI routine to perform as desired.&#xD;&#xA;&#xD;&#xA;But perhaps the most damning problem is that GAs and NNs are generally not the best tools for any task. While good teaching devices, anybody with sufficient knowledge of the subject domain is generally better equipped to use a different method to achieve similar results. This could be anything from other AI techniques such as support vector machines or behaviour trees through to simpler approaches such as state machines or even a long chain of if-then conditionals. These approaches tend to make better use of the developer's domain knowledge and are more reliable and predictable than the learning methods.&#xD;&#xA;&#xD;&#xA;I have heard however that some developers have used neural networks during development to train a driver to find a good route around a racetrack, and then this route can then be shipped as part of the game. Note that the final game does not require any neural network code for this to function.&#xD;&#xA;&#xD;&#xA;The 'cost' of the method is not really the problem, incidentally. Both NNs and GAs can be implemented extremely cheaply, with the NN in particular lending itself to pre-calculation and optimisation. The issue is really that of being able to get something useful out of them." />
  <row Id="7088" PostHistoryTypeId="4" PostId="3610" RevisionGUID="b0e1cfc9-035c-4cca-b144-e3ca7b920b18" CreationDate="2010-09-06T14:29:18.453" UserId="259" Comment="improved title" Text="Are square or hex grids better for pathfinding?" />
  <row Id="7089" PostHistoryTypeId="6" PostId="3610" RevisionGUID="b0e1cfc9-035c-4cca-b144-e3ca7b920b18" CreationDate="2010-09-06T14:29:18.453" UserId="259" Comment="improved title" Text="&lt;ai&gt;&lt;path-finding&gt;" />
  <row Id="7090" PostHistoryTypeId="2" PostId="3615" RevisionGUID="ce6b2495-874b-427d-a6c3-8eb734c52fc1" CreationDate="2010-09-06T14:55:29.590" UserId="458" Text="The main consideration for deciding whether to use square vs hex grids shouldn't be ease of AI implementation -- breadth-first and depth-first search algorithms are pretty much the same no matter what kind of graph you have.&#xD;&#xA;&#xD;&#xA;Rather, this is a gameplay issue that should be considered by the game designers. Square grids are more accessible to the mass market (hex boards tend to look &quot;geeky&quot;), and in a world of up/down/left/right controls it's a lot more intuitive to navigate around squares than hexes from a UI standpoint. Square grids also tend to restrict movement a bit more; assuming orthogonal movement (and not diagonal), it takes 4 moves to walk around a one-square obstacle, compared to 3 moves in a hex grid. From a programming standpoint, hexes are also a little bit easier to implement but it's not about search algorithms as much as that a square grid equals a two-dimensional array, but a hex grid doesn't really map to a standard data structure.&#xD;&#xA;&#xD;&#xA;The down side of square grids is that the movement never feels right. Moving diagonally should take sqrt(2) movement points, but in practice it's either 1 movement (which makes it feel like walking on diagonals is fast and there's rarely a reason to walk orthogonally) or it's 2 movement (which makes diagonal movement feel too slow). With hex grids, movement distance is a lot more intuitive, as it's always the same distance from one hex to another no matter which path you take." />
  <row Id="7091" PostHistoryTypeId="2" PostId="3616" RevisionGUID="8275f99c-b479-40c6-87da-8ff7b1e27c8b" CreationDate="2010-09-06T15:08:58.287" UserId="288" Text="I'm surprised &lt;a href=&quot;http://creators.xna.com/&quot;&gt;**XNA**&lt;/a&gt; hasn't been mentioned yet!&#xD;&#xA;&#xD;&#xA; - The tools are free.&#xD;&#xA; - The language (C#) is like C++ but so much nicer.&#xD;&#xA; - There's a &lt;a href=&quot;http://creators.xna.com/en-US/education/catalog/&quot;&gt;huge library of *well coded* samples&lt;/a&gt;.&#xD;&#xA; - You can easily port your game to Xbox 360 and Windows Phone 7.&#xD;&#xA; - Suitable for 2D and 3D games.&#xD;&#xA;&#xD;&#xA;I found, when I moved from C++, that XNA and C# cover much of the boilerplate code that tends to bog down a C++ game project." />
  <row Id="7092" PostHistoryTypeId="16" PostId="3616" RevisionGUID="8275f99c-b479-40c6-87da-8ff7b1e27c8b" CreationDate="2010-09-06T15:08:58.287" UserId="-1" />
  <row Id="7093" PostHistoryTypeId="2" PostId="3617" RevisionGUID="7f898c6a-65a1-4890-a1e4-dbc273f49a2c" CreationDate="2010-09-06T17:26:07.837" UserId="1312" Text="I am starting to learn OpenGL with FreeGLUT using the Superbible and the knowledge i have from my elementary graphics to brush up on my skills.&#xD;&#xA;&#xD;&#xA;To get more from this experience i want to integrate a GUI to overwrite the one OpenGL uses, now my question is this: is this thing possible and what library should i use?&#xD;&#xA;&#xD;&#xA;Some characteristics for the library: &#xD;&#xA;&#xD;&#xA; - Open source &#xD;&#xA; - Multi-platform (Linux and Windows)  &#xD;&#xA; - C/C++&#xD;&#xA;&#xD;&#xA;If you have any other recommendations please feel free to post them along with your answers for my problem." />
  <row Id="7094" PostHistoryTypeId="1" PostId="3617" RevisionGUID="7f898c6a-65a1-4890-a1e4-dbc273f49a2c" CreationDate="2010-09-06T17:26:07.837" UserId="1312" Text="Good GUI for OpenGL" />
  <row Id="7095" PostHistoryTypeId="3" PostId="3617" RevisionGUID="7f898c6a-65a1-4890-a1e4-dbc273f49a2c" CreationDate="2010-09-06T17:26:07.837" UserId="1312" Text="&lt;opengl&gt;&lt;gui&gt;" />
  <row Id="7096" PostHistoryTypeId="2" PostId="3618" RevisionGUID="85400bcd-4ba2-4aea-b8eb-203503339784" CreationDate="2010-09-06T17:45:55.933" UserId="744" Text="&lt;a href=&quot;http://www.cegui.org.uk/wiki/index.php/Main_Page&quot;&gt;Crazy Eddie's GUI (CEGUI)&lt;/a&gt; is popular, and you can either crib one of the existing renderer backends or write your own targeting whatever OpenGL-backed API you want. It is open source, multi-platform, and C++. However, it values consistency, which is not always a good UI principle for games, which may have dozens of custom controls used in exactly one place.&#xD;&#xA;&#xD;&#xA;A recent popular pattern is &lt;a href=&quot;http://mollyrocket.com/forums/viewforum.php?f=10&quot;&gt;immediate mode GUi (IMGUI)&lt;/a&gt;, which is kind of &quot;no GUI library&quot;. It has pluses and minuses - it's very straightforward, but can be tricky to optimize, and I've yet to see really good IMGUI models for advanced controls like combo boxes or tree views. Nor have I see a good implementation of an IMGUI windowing system (and I spend some time trying to write one, which I was never happy with) - it is excellent for simple HUD elements however, and simple to do one-off controls." />
  <row Id="7097" PostHistoryTypeId="5" PostId="3618" RevisionGUID="667c8627-faf7-46b9-9504-d8f4a5d9b61f" CreationDate="2010-09-06T17:56:25.533" UserId="744" Comment="edited body" Text="&lt;a href=&quot;http://www.cegui.org.uk/wiki/index.php/Main_Page&quot;&gt;Crazy Eddie's GUI (CEGUI)&lt;/a&gt; is popular, and you can either crib one of the existing renderer backends or write your own targeting whatever OpenGL-backed API you want. It is open source, multi-platform, and C++. However, it values consistency, which is not always a good UI principle for games, which may have dozens of custom controls used in exactly one place.&#xD;&#xA;&#xD;&#xA;A recent popular pattern is &lt;a href=&quot;http://mollyrocket.com/forums/viewforum.php?f=10&quot;&gt;immediate mode GUI (IMGUI)&lt;/a&gt;, which is kind of &quot;no GUI library&quot;. It has pluses and minuses - it's very straightforward, but can be tricky to optimize, and I've yet to see really good IMGUI models for advanced controls like combo boxes or tree views. Nor have I see a good implementation of an IMGUI windowing system (and I spend some time trying to write one, which I was never happy with) - it is excellent for simple HUD elements however, and simple to do one-off controls." />
  <row Id="7099" PostHistoryTypeId="2" PostId="3620" RevisionGUID="9fdbaeaf-cfcd-4069-9884-f4f402aa598e" CreationDate="2010-09-06T19:42:06.170" UserId="370" Text="I've been fiddling with both [QuickGUI][1] and [MyGUI][2].  They're both Ogre GUI libraries that recent dropped the ogre requirement.  I don't have too much experience with either yet, but it looks like I'll be sticking with QuickGUI, as it is much smaller and simpler.&#xD;&#xA;&#xD;&#xA;I'm not sure if the QuickGUI wiki has been updated yet to point to the newest Ogre-free version.  Here is the latest release.&#xD;&#xA;&#xD;&#xA;http://www.stormsonggames.com/downloads/QuickGUI_10_8.zip&#xD;&#xA;&#xD;&#xA;There repo has seen a few cross-platform updates, so you'll be better off using the svn directly.&#xD;&#xA;&#xD;&#xA;http://stormsonggames.com/svn/SSE/Gaia2/QuickGUI  &#xD;&#xA;http://stormsonggames.com/svn/SSE/Gaia2/QuickGUIOgreDemo  &#xD;&#xA;http://stormsonggames.com/svn/SSE/Gaia2/QuickGUIOgrePlatform  &#xD;&#xA; &#xD;&#xA;Username: Anonymous  &#xD;&#xA;Password: QuickGUI&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Lastly here is the brief wiki on how to add diferent rendering backends.&#xD;&#xA;http://www.ogre3d.org/tikiwiki/QuickGUI+Integration+Tutorial&#xD;&#xA;&#xD;&#xA;MyGUI seems to have more features at the cost of getting bloated.  And honestly if simplicity isn't a requirement [CEGUI][3] blows MyGUI out of the water.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/QuickGUI&#xD;&#xA;  [2]: http://mygui.info/&#xD;&#xA;  [3]: http://www.cegui.org.uk/wiki/index.php/Main_Page" />
  <row Id="7100" PostHistoryTypeId="5" PostId="3617" RevisionGUID="db9b73e3-2fbc-42a7-8597-6fcc768c7295" CreationDate="2010-09-06T19:59:43.900" UserId="1312" Comment="added 2 characters in body" Text="I am starting to learn OpenGL with FreeGLUT using the Superbible and the knowledge i have from my elementary graphics to brush up on my skills.&#xD;&#xA;&#xD;&#xA;To get more from this experience i want to integrate a GUI to overwrite the one FreeGLUT uses, now my question is this: is this thing possible and what library should i use?&#xD;&#xA;&#xD;&#xA;Some characteristics for the library: &#xD;&#xA;&#xD;&#xA; - Open source &#xD;&#xA; - Multi-platform (Linux and Windows)  &#xD;&#xA; - C/C++&#xD;&#xA;&#xD;&#xA;If you have any other recommendations please feel free to post them along with your answers for my problem." />
  <row Id="7101" PostHistoryTypeId="2" PostId="3621" RevisionGUID="b8af05ea-ce64-4d1e-af7e-c668e54db93c" CreationDate="2010-09-06T20:32:30.390" UserId="744" Text="Some years ago, if you wrote in C and some subset of C++ and used a sufficient number of platform abstractions (via SDL or whatever), you could run on every platform an indie could get on - Linux, Windows, Mac OS of various versions, obscure stuff like BeOS, and the open consoles like the GP2X and post-death Dreamcast. If you got a contract for a closed platform at some point, you could port your game to that platform with &quot;minimal&quot; code changes as well.&#xD;&#xA;&#xD;&#xA;Today, indie developers must use XNA to get on the Xbox 360 (and upcoming Windows phone); must not use XNA to work anywhere else but Windows; until recently had to use Java on Android; Flash doesn't run on phones, HTML5 doesn't work on IE. Unlike e.g. DirectX vs. OpenGL or Windows vs. Unix, these are changes to the core language you write your code in and can't be papered over without, basically, writing a compiler. You can move some game logic into scripts and include an interpreter - except when you can't, because the iPhone SDK doesn't allow it, and performance suffers because no one allows JIT.&#xD;&#xA;&#xD;&#xA;So what can you do if you want a really cross-platform portable game, or even just a significant body of engine and logic code?&#xD;&#xA;&#xD;&#xA;Is this not a problem because the platforms have fundamentally diverged - it's just plain not worthwhile to try to target both an iPhone and the Xbox 360 with any shared code because such a game would be bad? (I find this very unlikely. I can easily see wanting to share a game between a Windows Mobile phone and an Android, or an Xbox 360 and an iPad.) Are interfaces so high-level now that porting time is negligible? (I might believe this for business applications, but not for games with strict performance requirements.)&#xD;&#xA;&#xD;&#xA;Is this going to become more pronounced in the future? Is the split going to be, somewhat scarily, still down vendor lines? Will we all rely on high-level middleware like Flash or Unity to get anything cross-platform done?&#xD;&#xA;&#xD;&#xA;**tl;dr - Is porting a problem, is it going to be a bigger problem in the future, and if so how do we solve it?**" />
  <row Id="7102" PostHistoryTypeId="1" PostId="3621" RevisionGUID="b8af05ea-ce64-4d1e-af7e-c668e54db93c" CreationDate="2010-09-06T20:32:30.390" UserId="744" Text="Cross-platform independent development" />
  <row Id="7103" PostHistoryTypeId="3" PostId="3621" RevisionGUID="b8af05ea-ce64-4d1e-af7e-c668e54db93c" CreationDate="2010-09-06T20:32:30.390" UserId="744" Text="&lt;cross-platform&gt;" />
  <row Id="7104" PostHistoryTypeId="16" PostId="3621" RevisionGUID="b8af05ea-ce64-4d1e-af7e-c668e54db93c" CreationDate="2010-09-06T20:32:30.390" UserId="744" />
  <row Id="7105" PostHistoryTypeId="2" PostId="3622" RevisionGUID="af347716-f0b9-43a7-89b2-cc11b8b7e41f" CreationDate="2010-09-06T21:12:38.690" UserId="1120" Text="One way to eliminate grinding is to allow people to write scripts that can play the game, which of course introduces other problems.&#xD;&#xA;" />
  <row Id="7106" PostHistoryTypeId="2" PostId="3623" RevisionGUID="c94295c9-56c7-46fc-b4b3-b98f1fa6024d" CreationDate="2010-09-06T21:35:41.527" UserId="490" Text="You say cross-platform **independent** development. The biggest hurdle then is resources, and that means a lack of time most of the time, but also lack of know-how and possibly finances (license fees, buying devices, etc).&#xD;&#xA;&#xD;&#xA;Indie or not, the biggest hurdle is actually design. As you say, a game that runs on Xbox360 and iPad might work, but they also need to be fundamentally different in terms of design. The 360 has a controller, the iPad a touch screen. Also, development for the 360 is done in Windows using C# as language, the iPad can only be targeted on Mac OS computers and using C, C++ or Objective-C. Or Javascript, if you prefer. Some things just don't mix that well whatever you do.&#xD;&#xA;&#xD;&#xA;What you say about the different platforms holds true today. Use C/C++ and SDL and you can write your program cross-platform on PC-like machines, probably much more smoothly than years ago. However it was always a problem and will always remain a problem to port games from PC to console to mobile, and vice versa. It has just become more pronounced in the recent years by allowing Indie developers to program for consoles (or developers hacking access to it to create homebrew games) and by the rise of mobile devices powerful enough to run games.&#xD;&#xA;&#xD;&#xA;Porting has the same problems it ever has, but there are more devices to port to. And some ports just don't make sense without re-designing the core of the game. This is not a problem that can be solved, it's one you have to consider from the outset even before you write your first line of code. Then it will be manageable, no more, no less.&#xD;&#xA;" />
  <row Id="7107" PostHistoryTypeId="16" PostId="3623" RevisionGUID="c94295c9-56c7-46fc-b4b3-b98f1fa6024d" CreationDate="2010-09-06T21:35:41.527" UserId="-1" />
  <row Id="7109" PostHistoryTypeId="2" PostId="3624" RevisionGUID="3a57c00c-07c7-4b52-83bd-3268f9674310" CreationDate="2010-09-06T23:11:36.530" UserId="2039" Text="I am each day making the art in illustrator more complete and now comes the time where I decide to invest in an animation program/route. I hear at times for people to use Toon Boom but the problem is I don't see a ton of tutorials and it seems like it's more for hand drawn animation. So, I'd use AE for example to draw out 15 or so frames for my robot rolling animation, adjusting the lines in different areas and then use a script to export that to a spritesheet I suppose. The main thing I want to avoid is the stiff puppet animation I see in many flash animations. So, do you guys have any thoughts on starting on either of these two programs for 2D animation or tips in general in relation to this process?" />
  <row Id="7110" PostHistoryTypeId="1" PostId="3624" RevisionGUID="3a57c00c-07c7-4b52-83bd-3268f9674310" CreationDate="2010-09-06T23:11:36.530" UserId="2039" Text="Your guys opinions on using AE and/or Flash for 2D animation?" />
  <row Id="7111" PostHistoryTypeId="3" PostId="3624" RevisionGUID="3a57c00c-07c7-4b52-83bd-3268f9674310" CreationDate="2010-09-06T23:11:36.530" UserId="2039" Text="&lt;2d&gt;&lt;art&gt;" />
  <row Id="7112" PostHistoryTypeId="4" PostId="3624" RevisionGUID="c12d983d-9c03-4723-aa7c-1c964fbc1544" CreationDate="2010-09-06T23:14:02.623" UserId="189" Comment="No sexism please, unintentional as it is" Text="Opinions on using AE and/or Flash for 2D animation?" />
  <row Id="7113" PostHistoryTypeId="2" PostId="3625" RevisionGUID="6b50a4ed-be88-4139-b7b2-cfd04103261b" CreationDate="2010-09-06T23:28:12.270" UserId="896" Text="The Unity engine gets you a huge chunk of the way there. Write once and you've got Mac/Windows Standalone and webplayer based.  Tweak your inputs, and mind your draw calls and you're on iOS/Android.  " />
  <row Id="7114" PostHistoryTypeId="16" PostId="3625" RevisionGUID="6b50a4ed-be88-4139-b7b2-cfd04103261b" CreationDate="2010-09-06T23:28:12.270" UserId="-1" />
  <row Id="7115" PostHistoryTypeId="2" PostId="3626" RevisionGUID="8c5eceb8-b59b-437a-8ce7-c8a9d0eea1b4" CreationDate="2010-09-06T23:57:40.850" UserDisplayName="Gelatinous Mutant Coconut" Text="A simple, portable and open interface framework is really needed, I think. Some musings:&#xD;&#xA;&#xD;&#xA;There currently seem to be four common kinds of game input methods: Keyboards, Mice, Controllers and Multi-Touch Surfaces. (I'll gloss over the issues of differing capabilities between, for example, gamepads and joysticks for now, though that should eventually be addressed.)&#xD;&#xA;&#xD;&#xA;Ideally, our developer would be able to specify in a general way a few different UIs that make sense for the kind of game being written. (They might decide to provide a Keyboard and Mouse UI, a Mouse Only UI and a Multi-Touch UI, as an arbitrary example.)&#xD;&#xA;&#xD;&#xA;The framework is then responsible for mediating IO between the platform and the game code, similar to how cross-platform GUI frameworks like QT and GTK function.&#xD;&#xA;&#xD;&#xA;Having such a framework wouldn't solve the incompatible language requirements problem, but would at least encapsulate all the system-specific calls behind a common API, which should make language porting much more straightforward.&#xD;&#xA;&#xD;&#xA;Well, now that I've written all of that: Does anyone know if a framework like that already exists?" />
  <row Id="7116" PostHistoryTypeId="16" PostId="3626" RevisionGUID="8c5eceb8-b59b-437a-8ce7-c8a9d0eea1b4" CreationDate="2010-09-06T23:57:40.850" UserId="-1" />
  <row Id="7117" PostHistoryTypeId="2" PostId="3627" RevisionGUID="9702f043-48cd-47ad-a071-79c769007387" CreationDate="2010-09-07T00:17:35.000" UserDisplayName="Gelatinous Mutant Coconut" Text="How about this: Take your model, and bevel the edges you want to appear as outlines. Color the faces that were created with a bright opaque green, while all the old faces are a dark translucent green.&#xD;&#xA;&#xD;&#xA;This requires no use of pixel shaders at all. (No textures either, in fact; just face colors.) It does require some model preprocessing on your part, which may or may not be an issue.&#xD;&#xA;&#xD;&#xA;You won't be able to see the outline when the beveled surface is perpendicular to the view. If this bothers you, you can extrude the beveled surface out a bit, coloring the extrusion as you would have the bevel. You can play around with different degrees of bevelling and extrusion to make thinner and thicker lines." />
  <row Id="7118" PostHistoryTypeId="2" PostId="3628" RevisionGUID="204b8350-e8b6-45cc-9fc1-13cb96805675" CreationDate="2010-09-07T02:14:15.323" UserId="1120" Text="I think this is an economic problem, not a technical problem.  Platforms like xbox360 have a strong incentive to be exclusionary, because they're trying to get users choosing their platform instead of some other platform.  &quot;We have these cool exclusive games&quot; is way more interesting than &quot;we can also play these games that everyone else has&quot;.  The ecosystem is dominated by the hardware manufacturers.&#xD;&#xA;&#xD;&#xA;I suspect this will change when social-networked gameplay matures, because there's potentially a lot more money in getting everyone into the same social-gaming system than in making yet-another-FPS-with-sexy-graphics." />
  <row Id="7119" PostHistoryTypeId="16" PostId="3628" RevisionGUID="204b8350-e8b6-45cc-9fc1-13cb96805675" CreationDate="2010-09-07T02:14:15.323" UserId="-1" />
  <row Id="7120" PostHistoryTypeId="2" PostId="3629" RevisionGUID="b479c7bc-c9cd-4a48-a922-750b923270aa" CreationDate="2010-09-07T06:34:10.770" UserId="1979" Text="I'm new to flash and web development too. But I have some background in c#/c++/Qt/python. So, I want to know, what is the best toolchain for quickest dive into.&#xD;&#xA;&#xD;&#xA;My task is to write a game for facebook.com/vkontakte.ru. I already have the design doc, great artist and game-designer, so, the coding is the only stumbling block we met. There are no significant obstacles at server-side, but, since we have not much time, I decided to ask some help on suitable toolchain definition.&#xD;&#xA;&#xD;&#xA;I think, that web-services (maybe WCF) are perfect for the backend, so, some of them should transfer JSON-ed data from/to client, incapsulate game-logic, and... here is the place I stuck. What next, what should I learn, what tools/toolsets will provide learing/productivity curve that meat least action principle.&#xD;&#xA;&#xD;&#xA;Maybe I'm on the wrong way and missing some basic and obvious (for web-devs) things... I do not know, so, any advices will be highly appreciated.&#xD;&#xA;&#xD;&#xA;*Yes, this is the copy of my question on SO, but it seems, that here is the really proper place to post it.*" />
  <row Id="7121" PostHistoryTypeId="1" PostId="3629" RevisionGUID="b479c7bc-c9cd-4a48-a922-750b923270aa" CreationDate="2010-09-07T06:34:10.770" UserId="1979" Text="What is the best toolchain for ActionScript3 social networks game gevelopment?" />
  <row Id="7122" PostHistoryTypeId="3" PostId="3629" RevisionGUID="b479c7bc-c9cd-4a48-a922-750b923270aa" CreationDate="2010-09-07T06:34:10.770" UserId="1979" Text="&lt;actionscript-3&gt;&lt;methodology&gt;&lt;facebook&gt;" />
  <row Id="7123" PostHistoryTypeId="4" PostId="3629" RevisionGUID="cac7f57e-f43a-419b-974a-cbfbab5df466" CreationDate="2010-09-07T08:54:33.817" UserId="119" Comment="edited title" Text="What is the best toolchain for ActionScript3 social networks game development?" />
  <row Id="7124" PostHistoryTypeId="2" PostId="3630" RevisionGUID="bcef3a08-e61d-4058-8080-50ade8bd67d4" CreationDate="2010-09-07T09:05:15.253" UserId="119" Text="With projects like MonoTouch and XNATouch it was looking like XNA might get you on most platforms with a bit of tweaking. Unfortunately Apple kind of torpedoed that when they changed their Terms and Conditions to restrict which languages you can use. Unity goes across pretty much everything now, although on XBOX it will get you on XBLA but not XBLIG, so not an option for smaller indies.&#xD;&#xA;&#xD;&#xA;One approach might be to create a framework that uses the same conventions across multiple languages/platforms, then it is just a matter of tweaking syntax to port games. You might want to launch your game in Flash, which can be developed quickly and reach a large audience, then if it is successful port to iPhone, XNA etc. This way you know you have a fun game before over-committing yourself." />
  <row Id="7125" PostHistoryTypeId="16" PostId="3630" RevisionGUID="bcef3a08-e61d-4058-8080-50ade8bd67d4" CreationDate="2010-09-07T09:05:15.253" UserId="-1" />
  <row Id="7126" PostHistoryTypeId="2" PostId="3631" RevisionGUID="cc07b657-e8d7-405a-8b75-703d2b535699" CreationDate="2010-09-07T09:29:46.353" UserId="1742" Text="Most companies have an editor, or a variable control system for tweaking stuff in games, but are there any middleware solutions to this problem? I've written two such systems in the past myself, and worked with five, maybe six different ones, but none of them were off the shelf.&#xD;&#xA;&#xD;&#xA;Each of these home grown solutions had problems, ranging from having to keep looking up values, to not being able to save the current state of the variables.&#xD;&#xA;&#xD;&#xA;Are there any mature Config/Runtime-variable control libraries/apps?&#xD;&#xA;" />
  <row Id="7127" PostHistoryTypeId="1" PostId="3631" RevisionGUID="cc07b657-e8d7-405a-8b75-703d2b535699" CreationDate="2010-09-07T09:29:46.353" UserId="1742" Text="Tweaking and Settings - Runtime variable modification and persistence" />
  <row Id="7128" PostHistoryTypeId="3" PostId="3631" RevisionGUID="cc07b657-e8d7-405a-8b75-703d2b535699" CreationDate="2010-09-07T09:29:46.353" UserId="1742" Text="&lt;assets&gt;&lt;tools&gt;&lt;databases&gt;&lt;editors&gt;&lt;design&gt;" />
  <row Id="7129" PostHistoryTypeId="5" PostId="1279" RevisionGUID="51ccc9f1-3806-4738-ac0d-958ef21dbe47" CreationDate="2010-09-07T10:37:53.547" UserId="202" Comment="deleted 3 characters in body" Text="I grew up with [Riemers.net](http://www.riemers.net/) - very nice tutorial site covering everything form basics (drawing Your first triangle) to advanced techniques (HLSL). In every tutorial You create a cool application, like a flight simulator for example." />
  <row Id="7131" PostHistoryTypeId="2" PostId="3633" RevisionGUID="8d3c521f-ba09-4af1-9dc8-0c687f715511" CreationDate="2010-09-07T11:13:07.117" UserId="259" Text="From a [question about real-time debugging][1], comes [David McGraw's answer][2] about [AsyncSocket][3] for iOS developers.  See his answer for more information.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/878/259&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/878/real-time-debugging-techniques/881#881&#xD;&#xA;  [3]: http://code.google.com/p/cocoaasyncsocket/" />
  <row Id="7132" PostHistoryTypeId="5" PostId="3631" RevisionGUID="e9b0fd52-b201-4e6e-9ac6-6e22a69ce588" CreationDate="2010-09-07T11:36:44.200" UserId="1742" Comment="added language and some expectation." Text="Most companies have an editor, or a variable control system for tweaking stuff in games, but are there any middleware solutions to this problem? I've written two such systems in the past myself, and worked with five, maybe six different ones, but none of them were off the shelf.&#xD;&#xA;&#xD;&#xA;Each of these home grown solutions had problems, ranging from having to keep looking up values, to not being able to save the current state of the variables.&#xD;&#xA;&#xD;&#xA;Are there any mature Config/Runtime-variable control libraries/apps?&#xD;&#xA;&#xD;&#xA;I generally code in C++, but I would think that a mature settings/variables editor would probably be socket based as all current development hardware apart from Nintendo stuff provides a mechanism to talk to servers.&#xD;&#xA;" />
  <row Id="7134" PostHistoryTypeId="2" PostId="3634" RevisionGUID="9b255cc4-0c6b-485f-b5b6-e7bab9c873ef" CreationDate="2010-09-07T11:49:50.063" UserId="1021" Text="I'd like to create a simple demo video of a game for iPhone and iPod Touch.  **What tools do people use for this?**  Ideally I can capture the device's screen... as opposed to the simulator.  Also the game uses tilt controls... hence capturing the device's screen helps put actual game play into the demo video." />
  <row Id="7135" PostHistoryTypeId="1" PostId="3634" RevisionGUID="9b255cc4-0c6b-485f-b5b6-e7bab9c873ef" CreationDate="2010-09-07T11:49:50.063" UserId="1021" Text="Tools/methods for creating demo videos of iPhone/iPod Touch games?" />
  <row Id="7136" PostHistoryTypeId="3" PostId="3634" RevisionGUID="9b255cc4-0c6b-485f-b5b6-e7bab9c873ef" CreationDate="2010-09-07T11:49:50.063" UserId="1021" Text="&lt;video&gt;&lt;screen-recording&gt;&lt;demo&gt;" />
  <row Id="7137" PostHistoryTypeId="2" PostId="3635" RevisionGUID="7240de4b-76f0-4e32-9b0e-be76b0c0333a" CreationDate="2010-09-07T12:30:28.137" UserId="1924" Text="See this stackoverflow question: http://stackoverflow.com/questions/200049/is-there-a-way-i-can-capture-my-iphone-screen-as-a-video" />
  <row Id="7138" PostHistoryTypeId="2" PostId="3636" RevisionGUID="a92a4ed9-51d8-4a16-b71e-7669b941dc17" CreationDate="2010-09-07T12:45:53.123" UserId="659" Text="&#xD;&#xA;For a small indie developer, with limited funds/time (and maybe more of a focus on 'making something cool' than 'making something profitable'), trying to go cross-platform from the start could be counterproductive. It takes a lot of effort to engineer solid cross platform tools and tech (different graphics APIs, endianness, input devices, and more) - time that could be spent on the more creative side of game development. &#xD;&#xA;&#xD;&#xA;But you probably want to make sure you've got a great game that works really well on one platform before worrying too much about getting it onto as many platforms as possible! If the game is a flop, there's no point wasting time and effort making it a multi-platform flop, is there?&#xD;&#xA;&#xD;&#xA;If you're coding in C/C++, mostly from scratch, then as long as you keep the code fairly modular and make sensible decisions about data formats and middleware/libraries, then supporting other platforms later shouldn't be too painful.&#xD;&#xA;&#xD;&#xA;If third-party cross-platform tech/tools (e.g. Unity) is an option for your project, then it's certainly worth considering.&#xD;&#xA;&#xD;&#xA;The main 'problem platforms' for indies would seem to be Xbox360 Indie Games (C# only, limited network access, etc), and possibly Android (massive differences in device performance/screen size/input devices).  If you're determined to support these, expect a more sizable porting job, or plan to focus on them exclusively." />
  <row Id="7139" PostHistoryTypeId="16" PostId="3636" RevisionGUID="a92a4ed9-51d8-4a16-b71e-7669b941dc17" CreationDate="2010-09-07T12:45:53.123" UserId="-1" />
  <row Id="7140" PostHistoryTypeId="2" PostId="3637" RevisionGUID="1d99855f-eb0a-40d2-acd6-60cf1aa38aae" CreationDate="2010-09-07T13:26:11.483" UserId="2056" Text="I have a degree in Computer Science and while I was in college, I created a simple 2D game in Game Maker.  I would like to recreate this game in C++ as a start to learning how to create games in C++.  What would be a good book to start out on programming games in C++ for someone who has a bit of C++ experience (My CS Major classes were taught using Java and I had a class in C++ to learn syntax) and knowing the concepts behind objects, methods, inheritance, etc?&#xD;&#xA;&#xD;&#xA;This would be a hobby of mine while I build up experience until I one day could work in the Vide Game Industry." />
  <row Id="7141" PostHistoryTypeId="1" PostId="3637" RevisionGUID="1d99855f-eb0a-40d2-acd6-60cf1aa38aae" CreationDate="2010-09-07T13:26:11.483" UserId="2056" Text="What is a good book to start programming a 2D C++ game?" />
  <row Id="7142" PostHistoryTypeId="3" PostId="3637" RevisionGUID="1d99855f-eb0a-40d2-acd6-60cf1aa38aae" CreationDate="2010-09-07T13:26:11.483" UserId="2056" Text="&lt;2d&gt;&lt;c++&gt;&lt;books&gt;" />
  <row Id="7143" PostHistoryTypeId="2" PostId="3638" RevisionGUID="d354705b-7d39-4679-95c7-3558fb691016" CreationDate="2010-09-07T13:56:21.643" UserId="93" Text="Since Quake 1 (I think it was the first), level design tools for FPS games have used solid brushes and CSG operations to define level geometry instead of more conventional poly modeling tools you see in general purpose 3d applications like 3DS MAX.&#xD;&#xA;&#xD;&#xA;Why is this? Is it:&#xD;&#xA;&#xD;&#xA;* More productive for the level designer?&#xD;&#xA;* More likely to lead to closed geometry that won't screw up potentially visible set pre-calc?&#xD;&#xA;* Results in lower poly count (more cumbersome tools dissuade designers from adding too much detail)?&#xD;&#xA;* ..." />
  <row Id="7144" PostHistoryTypeId="1" PostId="3638" RevisionGUID="d354705b-7d39-4679-95c7-3558fb691016" CreationDate="2010-09-07T13:56:21.643" UserId="93" Text="Use of solid brushes and CSG in level building" />
  <row Id="7145" PostHistoryTypeId="3" PostId="3638" RevisionGUID="d354705b-7d39-4679-95c7-3558fb691016" CreationDate="2010-09-07T13:56:21.643" UserId="93" Text="&lt;level-design&gt;&lt;modification&gt;" />
  <row Id="7146" PostHistoryTypeId="2" PostId="3639" RevisionGUID="2bf7175f-be05-4aa5-9c4f-206a49065c9d" CreationDate="2010-09-07T14:09:24.690" UserId="119" Text="Why not try starting out with something like http://libcinder.org/ - it's all free and has all the tutorials you need to get started." />
  <row Id="7147" PostHistoryTypeId="2" PostId="3640" RevisionGUID="57b12321-6515-4506-bcff-3a59f4be8372" CreationDate="2010-09-07T14:22:47.917" UserId="1742" Text="Mostly, in practice, it comes down to optimising lighting and visibility calculations. Portalling up a CSG world is relatively easy compared to polygon soup.&#xD;&#xA;&#xD;&#xA;It doesn't usually end up with a much lower poly count because many people who do use it allow decorative objects to spice up the world after building the body of the level.&#xD;&#xA;It's not normally better or worse for a level designer, but does allow a more &quot;rough it out&quot; approach than traditional mesh builder level design.&#xD;&#xA;" />
  <row Id="7148" PostHistoryTypeId="2" PostId="3641" RevisionGUID="2ce457bf-b72a-4651-b249-c2da702e0fb1" CreationDate="2010-09-07T14:53:01.187" UserId="240" Text="The part that wasn't clicking for me -- and, as I suspected, was very very simple -- was that it's just a matter of implementing the doPost() (or doGet(), but I use POST) routine, and write back to the responder.&#xD;&#xA;&#xD;&#xA;There were also some bits that I didn't follow quite correctly the first time about setting-up the responder class-names and URLs, in the web.xml file (in the war folder.)&#xD;&#xA;&#xD;&#xA;Once I got that (web.xml) set up correctly, then the doPost() routine was simply something along the lines of:&#xD;&#xA;&#xD;&#xA;    public void doPost(HttpServletRequest req, HttpServletResponse resp)&#xD;&#xA;      throws IOException {&#xD;&#xA;    	String reqTypeStr = req.getParameter(&quot;reqType&quot;);&#xD;&#xA;        if (reqTypeStr.equalsIgnoreCase(&quot;marco&quot;)&#xD;&#xA;    		resp.getWriter().println(&quot;Polo!&quot;);&#xD;&#xA;        else&#xD;&#xA;                resp.getWriter().println(&quot;huh?&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;There are myriad other details but those were the two that hung me up the most.  Once I broke that simple barrier, everything else flowed together very quickly.&#xD;&#xA;" />
  <row Id="7149" PostHistoryTypeId="2" PostId="3642" RevisionGUID="15122569-5fa0-4e7a-a491-e0c1c2ea9ea6" CreationDate="2010-09-07T15:16:33.960" UserId="2034" Text="I would recommend staying away from that Cinder library. Browsing through the tutorials is about as demotivational as it can get. Pick something that's easy, fun and fast to code with, like [SFML][1]. Think of it as a modern object-oriented replacement for SDL. If the [features][2] satisfy your needs, install it, go through the [tutorials][3] and just start playing with it. You can find source codes for existing [SFML projects][4] from the forums to look at how they implement things, such as the game loop, how they organize the code and the objects and make them communicate with one another and the [Wiki][5] has a number of tutorials and source codes you can use in your projects. And the forums are active so you can ask for help there anytime.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/index.php&#xD;&#xA;  [2]: http://www.sfml-dev.org/features.php&#xD;&#xA;  [3]: http://www.sfml-dev.org/tutorials/1.6/&#xD;&#xA;  [4]: http://www.sfml-dev.org/forum/viewforum.php?f=10&#xD;&#xA;  [5]: http://www.sfml-dev.org/wiki/en/index" />
  <row Id="7150" PostHistoryTypeId="2" PostId="3643" RevisionGUID="98036d2c-a59f-4734-b439-aa6c639d0110" CreationDate="2010-09-07T15:18:16.780" UserId="240" Text="I've been in development for 30+ years, and was QA for about 15 of that (also QA manager, and director of engineering, hiring both QA and developers.)&#xD;&#xA;&#xD;&#xA;If you can get a QA job -- if you have tenacity, attention to detail, and can reliably show up for work -- then, yes, it's a fairly &quot;easy&quot; way to get a foot in the door.&#xD;&#xA;&#xD;&#xA;However, do ***NOT*** fall for the romantic notion that game-tester means you &quot;play games all day long.&quot;  In fact, many people who become game-testers find that they come to really hate playing games in their spare time, as it &quot;feels too much like work.&quot;  In game testing, you may be asked to do things like&#xD;&#xA;&#xD;&#xA;* Play the same level 800 times until you can figure out the exact steps needed to make it mis-behave like it seems to about 1-in-50 times.&#xD;&#xA;&#xD;&#xA;* Skip all the cool parts of game-X and play this boring side-quest that nobody will ever do, because we need someone to test it.&#xD;&#xA;&#xD;&#xA;* Write-up your findings in excruciating detail, such that someone else can step-through your instructions and see exactly what you saw, but without asking anyone any questions -- they have to be able to do it from *just* your written instructions.&#xD;&#xA;&#xD;&#xA;Also, you need to be passionate, but without too much ego.  That is, you have to care enough to want to make things better, but ok with frequent shooting-down of your ideas for improvement, and not let it drive you bonkers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Back to your original question: what makes being software-QA (games or otherwise) an easy entry-level position is that the skill-set is something that anyone can develop, and doesn't require a lot of schooling.  As above, tenacity, attention to detail and reliability are more important than many technical skills.&#xD;&#xA;&#xD;&#xA;It's also a good growth position.  It's easy for a motivated person to go from &quot;entry level QA&quot; to &quot;lead tester&quot; in just a couple of years, and promotion opportunities are many.&#xD;&#xA;&#xD;&#xA;While it *CAN* lead to a development position, typically QA and developer skill sets are very different.&#xD;&#xA;&#xD;&#xA;It's also a lot of hard, frustrating work.  It is *NOT* &quot;playing games all day long&quot;!  Some folks love it, some folks leave to do something more enjoyable, like flipping burgers.  The difference lies with the individual more than with the job.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Btw, if you want to beef up your resume for an entry-level game-tester position, volunteer to do some beta-testing for games online, and *learn how to write a decent bug report*.  (You can Google this.  A good report is **not** &quot;paladins suck&quot; or &quot;the space orb needs nerfed.&quot;  Find out what it means to write a good bug report and then go out and write some.  When you go to a job interview, take along 2-3 of your best to show, and explain that you have no professional training, but that this is what you were able to learn on your own.  That's valuable skills, right there.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;" />
  <row Id="7151" PostHistoryTypeId="16" PostId="3643" RevisionGUID="98036d2c-a59f-4734-b439-aa6c639d0110" CreationDate="2010-09-07T15:18:16.780" UserId="-1" />
  <row Id="7152" PostHistoryTypeId="2" PostId="3644" RevisionGUID="12b6223d-d946-4be1-a073-e939f21568e6" CreationDate="2010-09-07T15:20:46.280" UserDisplayName="Jeff Weber" Text="[http://www.mashooo.com][1] has quite a few Silverlight games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mashooo.com" />
  <row Id="7153" PostHistoryTypeId="16" PostId="1075" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-07T16:05:26.053" UserId="51" />
  <row Id="7154" PostHistoryTypeId="16" PostId="1096" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-07T16:05:26.053" UserId="51" />
  <row Id="7155" PostHistoryTypeId="16" PostId="3644" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-07T16:05:26.053" UserId="51" />
  <row Id="7156" PostHistoryTypeId="16" PostId="1040" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-07T16:05:26.053" UserId="51" />
  <row Id="7157" PostHistoryTypeId="2" PostId="3645" RevisionGUID="1cad1483-b6cb-4136-a265-a06b4c01e807" CreationDate="2010-09-07T16:15:56.817" UserId="1477" Text="Applications of &quot;Academic&quot; AI in games tends to be alot more subtle then the types of things one normally thinks of as AI in the game sphere. Alot of my Game AI professor's focus back when I was in school was AI for camera control. (his other area of interest was AI narrative management which is as far as i know still limited to academia for the most part. a notable example of this later area would be [facade][1].) &#xD;&#xA;&#xD;&#xA;The main issue for &quot;Academic&quot; AI in games is that they are solving different problems. You often don't want to satisfy requirements in game you just want to satisfice. Or as it has been worded previosuly you don't want to to be easy but you don't want your AI opponent to be too difficult either.&#xD;&#xA;&#xD;&#xA;That being said Lionhead's [Black and White][2] series of games did use AI similar to what you are talking about with the question above and was at least successfull enough for them to make [a sequel][3].&#xD;&#xA;&#xD;&#xA;I remember reports of [Oblivion][4]'s radiant AI being an example of this vein of behavior originally as well but it had to be dumbed down because of strange unexpected behavior like NPCs killing eachother over food.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fa%C3%A7ade_(interactive_story) &quot;facade&quot;&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Black_%26_White_(video_game) &quot;black and white&quot;&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Black_%26_White_2&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Radiant_AI" />
  <row Id="7158" PostHistoryTypeId="2" PostId="3646" RevisionGUID="c7eeb25a-a651-4a53-8948-d206c13ffef8" CreationDate="2010-09-07T16:24:40.590" UserId="2060" Text="The stiff puppet animation you see is not a result of flash, but rather enabled by it.  I've seen really great animations done in flash, it just depends on how you use the software.  If you make an arm movieclip and put it on a spline or just rotate it in place then yes, you'll get the puppet animation.  Flash has functionality to ghost previous and next frames, to help you draw smooth transitions.  I've used it to draw pretty smooth stick figure animations before (my art abilities are limited).&#xD;&#xA;&#xD;&#xA;I think the major difference you need to factor into your choice is the type of drawing you want to do.  I find flash better to draw things precisely.  If I need it do be symmetric, with equivalent angles on every side, flash does it better for me.  For example, drawing tanks, cannons, spaceships.&#xD;&#xA;&#xD;&#xA;Actually making them look good, artistically, becomes a challenge.  Sure you can apply a simple gradient, but I find it harder to add the &quot;finishing touches&quot; in flash.  I usually export to images that I finish in Paint.NET or something.&#xD;&#xA;&#xD;&#xA;Of course, flash is very expensive.  If you have access to it, or have lots of spare money, I recommend using it.  Other wise, I have *tried* Toon Boom and it didn't seem that bad.  I just was familiar with Flash and Paint.NET, so that's what I used.&#xD;&#xA;&#xD;&#xA;I don't feel that flash will be worth it to you for the price.  But you should at least download a trial and see for yourself." />
  <row Id="7159" PostHistoryTypeId="2" PostId="3647" RevisionGUID="38e60129-64d9-4031-a11f-b8866b2b5f32" CreationDate="2010-09-07T16:55:56.943" UserId="356" Text="I don't know any book specitic to 2D games, but you should look at the answers [here][1]. After all, 2D and 3D games have a lot in common. There are many 3D games that have 2D gameplay. &#xD;&#xA;&#xD;&#xA;Maybe you could check the [tutorials by Lazy Foo][2], they cover many important subjects in a step by step basis. They use SDL and OpenGL.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1265/must-read-game-development-books&#xD;&#xA;  [2]: http://www.lazyfoo.net/SDL_tutorials/index.php" />
  <row Id="7160" PostHistoryTypeId="2" PostId="3648" RevisionGUID="f0b0e5fe-db07-4b27-9756-8f093fee9c91" CreationDate="2010-09-07T16:59:22.350" UserId="1742" Text="Seeing as you were using Game maker, I'm assuming you're on Windows, so jump in at the deep end with the direct-x SDK. The samples provide source code, and also give you a taste of the power available to you. Just because you want to do a 2D game doesn't mean you should stick with a 2D library, at some point you'll probably want to do something the library doesn't implement in itself (shaders or rotations or something random that you just NEED for your project).&#xD;&#xA;&#xD;&#xA;SDL -and probably SFML and Cinder- provides a high level *&quot;got the basics out of the way&quot;* approach to being an engine, so you would have all the power of doing it from scratch (so you could have pixel shaders in SDL), but you'd not learn how things got done. You'd then be doing real C++ inside a helper framework, which will help get stuff done, but won't be a great help in teaching you how to develop games if you're ever going to be working at a game dev company.&#xD;&#xA;&#xD;&#xA;SDL, SFML, and even Cinder are all clever ways of avoiding learning about the difficult stuff in C++. They normally wrap OpenGL, which is useful to learn if you want to code graphics for non-windows machines, but there's tonnes of resources for getting work done in Direct-X too (probably more as the Windows virus has spread to every corner of the world). &#xD;&#xA;&#xD;&#xA;If you don't want to learn the gritty stuff, then fine, but otherwise, don't be afraid to start from a raw Win32 app.&#xD;&#xA;&#xD;&#xA;I'd suggest, for comfort, you start out with all the different helper packages you can find, but head towards writing your own rendering engine. Writing an engine is good fun and can provide you with a resource to look back on in your future projects. Nothing creates good code like the wisdom from doing it wrong in the past." />
  <row Id="7161" PostHistoryTypeId="2" PostId="3649" RevisionGUID="b4a35092-a8bf-433c-8c7a-2d25f033d727" CreationDate="2010-09-07T17:44:40.663" UserId="539" Text="Try using [Flash Develop](http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page) or if you are willing to spend some money [Flash Builder](http://www.adobe.com/products/flashbuilder/). I have used both and would say they are comparable. Flash Builder is an Eclipse plug-in meaning it can integrate with the rest of your workflow a little better, but it is quite expensive. Another alternative is to download the [Flex SDK](http://www.adobe.com/products/flex/) (will likely need to do that for Flash Develop anyway) and use [Vim](http://www.vim.org/). With the right [Ant](http://ant.apache.org/) build file you can get pretty far with that. &#xD;&#xA;&#xD;&#xA;To manage content, I would recommend using [Flash CS](http://www.adobe.com/products/flash/) to manage your art assets. Your artist should be able to create animations, sprites, buttons, etc and lay things out visually using that. When he's finished he can [export the whole thing as a swc](http://help.adobe.com/cs_CZ/AS2LCR/Flash_10.0/help.html?content=00001910.html) which can be easily incorporated into your game.&#xD;&#xA;&#xD;&#xA;If you're coming from Visual Studio it might be worth ponying up for Flash Builder (try the 60 day trail first of course). It has unit testing integrated and through various plug-ins can support most other things. " />
  <row Id="7162" PostHistoryTypeId="2" PostId="3650" RevisionGUID="9c88181b-f1af-4b36-a986-9c3fc83a4cde" CreationDate="2010-09-07T17:56:08.217" UserId="1780" Text="Beyond a book, it's important to decide what sort of game you want to make.  That will help inform your path in general.  I would suggest picking something simple, Minesweeper or Tetris or maybe Lightcycles of Tron, where the game logic is fairly straight forward and the graphics requirements are minimal just to get something basic playing." />
  <row Id="7163" PostHistoryTypeId="2" PostId="3651" RevisionGUID="0e0565c4-7a38-4afd-8dcb-526a8ce372b0" CreationDate="2010-09-07T20:05:56.933" UserId="162" Text="Settings management seems to be one of those things that's redone from scratch for every game, probably due to how relatively simple it is and the high variability in the types of settings needed. Assuming you have a decent storage backend setup (SQL/whatever) you can code up a robust solution to settings management in a day or 2 so there doesn't seem to be much real business need for a middleware solution. Tacking it on top of whatever you use for player information storage is I think the best way to go in most cases." />
  <row Id="7164" PostHistoryTypeId="2" PostId="3652" RevisionGUID="862bbffc-5edf-48c3-a13c-e9cf4947463d" CreationDate="2010-09-07T20:10:43.517" UserId="769" Text="You can shortish, but very cheap looping background music on [Melody Loops][1]. The browsing interface is very user-friendly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://melodyloops.com" />
  <row Id="7165" PostHistoryTypeId="16" PostId="3652" RevisionGUID="862bbffc-5edf-48c3-a13c-e9cf4947463d" CreationDate="2010-09-07T20:10:43.517" UserId="-1" />
  <row Id="7166" PostHistoryTypeId="2" PostId="3653" RevisionGUID="68f059f8-1c89-4473-a3df-c69de1696969" CreationDate="2010-09-08T03:32:12.093" UserId="209" Text="Might be a little dated but [Advanced 2D Game Development][1] was a pretty good book. Check it out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1283916684&amp;sr=8-1" />
  <row Id="7167" PostHistoryTypeId="16" PostId="1046" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-08T03:32:52.280" UserId="14" />
  <row Id="7168" PostHistoryTypeId="16" PostId="1055" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-08T03:32:52.280" UserId="14" />
  <row Id="7169" PostHistoryTypeId="16" PostId="1044" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-08T03:32:52.280" UserId="14" />
  <row Id="7170" PostHistoryTypeId="2" PostId="3654" RevisionGUID="e93adba3-3490-4f63-9977-77860138cd00" CreationDate="2010-09-08T05:35:31.240" UserId="2065" Text="The [Tao Framework][1] (used in this book that I've found pretty useful: [C# Game Programming For Serious Game Creation][2]), which wraps OpenGL and many other useful game programming features (accessible via C#) is worth a look. However, it has been superceded by the [Open Toolkit Library][3] (OpenTK), which was mentioned in another answer. I find it odd that the book uses the Tao Framework instead of OpenTK, considering Tao has been inactive for about 2 years (and the book is brand new). Still, a useful framework that is worth checking out. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/taoframework/files/&#xD;&#xA;  [2]: http://www.amazon.com/Game-Programming-Serious-Creation/dp/1435455568/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1283923642&amp;sr=1-1&#xD;&#xA;  [3]: http://www.opentk.com/" />
  <row Id="7171" PostHistoryTypeId="2" PostId="3655" RevisionGUID="087009f1-e7e2-4f4c-8c43-f7c59935de3a" CreationDate="2010-09-08T05:46:57.840" UserId="370" Text="I've been working with a few game oriented gui libraries trying to find a good fit.  More specifically, a GUI that will work on Windows,Linux,iPhone, and Android with minimal special code.&#xD;&#xA;&#xD;&#xA;In my tinkering I've noticed a few libraries like to render the their GUI's to an off screen texture that just display the texture instead.&#xD;&#xA;&#xD;&#xA;Is this a common GUI technique?  &#xD;&#xA;Isn't there a performance hit with rapidly changing GUIs?&#xD;&#xA;&#xD;&#xA;Were I the implementer I would have just rendered the GUI directly each frame.  Is there anything particularly wrong or inefficient direct rendering?" />
  <row Id="7172" PostHistoryTypeId="1" PostId="3655" RevisionGUID="087009f1-e7e2-4f4c-8c43-f7c59935de3a" CreationDate="2010-09-08T05:46:57.840" UserId="370" Text="Gui Implementation techniques" />
  <row Id="7173" PostHistoryTypeId="3" PostId="3655" RevisionGUID="087009f1-e7e2-4f4c-8c43-f7c59935de3a" CreationDate="2010-09-08T05:46:57.840" UserId="370" Text="&lt;gui&gt;" />
  <row Id="7174" PostHistoryTypeId="2" PostId="3656" RevisionGUID="d2d76e0b-a974-41da-8001-712e9d74fb8a" CreationDate="2010-09-08T05:56:20.023" UserId="288" Text="I've been dealing with some frame-rate jittering issues with my game lately, and it seems that the best solution would be the one suggested by Glenn Fiedler (Gaffer on Games) in the classic &lt;a href=&quot;http://gafferongames.wordpress.com/game-physics/fix-your-timestep/&quot;&gt;Fix Your  Timestep!&lt;/a&gt; article.&#xD;&#xA;&#xD;&#xA;Now - I'm already using a fixed time-step for my update. The problem is that I'm not doing the suggested interpolation for rendering. The upshot is that I get doubled or skipped frames if my render rate doesn't match my update rate. These can be visually noticeable.&#xD;&#xA;&#xD;&#xA;**So I'd like to add interpolation to my game - and I'm interested to know how others have structured their data and code to support this.**&#xD;&#xA;&#xD;&#xA;Obviously I will need to store (where?/how?) two copies of game state information relevant to my renderer, so that it may interpolate between them.&#xD;&#xA;&#xD;&#xA;Additionally - this seems like a good place to add threading. I imagine that an update thread could work on a *third* copy of the game state, leaving the other two copies as read-only for the render thread. (Is this a good idea?)&#xD;&#xA;&#xD;&#xA;It seems that having two or three versions of the game's state could introduce performance and - *far* more importantly - reliability and developer productivity problems, compared to having just a single version. So I'm particularly interested in methods for mitigating those issues.&#xD;&#xA;&#xD;&#xA;Finally, it seems that some state is either not directly needed for rendering, or would be too difficult to track different versions of (eg: a third-party physics engine that stores a single state) - so I'd be interested to know how people have handled that kind of data within such a system." />
  <row Id="7175" PostHistoryTypeId="1" PostId="3656" RevisionGUID="d2d76e0b-a974-41da-8001-712e9d74fb8a" CreationDate="2010-09-08T05:56:20.023" UserId="288" Text="Data structures for interpolation and threading?" />
  <row Id="7176" PostHistoryTypeId="3" PostId="3656" RevisionGUID="d2d76e0b-a974-41da-8001-712e9d74fb8a" CreationDate="2010-09-08T05:56:20.023" UserId="288" Text="&lt;physics&gt;&lt;multithreading&gt;&lt;fixed-timestep&gt;&lt;interpolation&gt;" />
  <row Id="7177" PostHistoryTypeId="2" PostId="3657" RevisionGUID="e58c7889-5140-4479-b6ee-c65b85eee098" CreationDate="2010-09-08T07:37:39.250" UserId="919" Text="I know a bit about this question but I find that there are quite a lot of diverse opinions on the subject?&#xD;&#xA;&#xD;&#xA;I know from a players perspective that more options is almost always good. But on the other hand if it has multi-player more means higher complexity (meta game) both for the developers as well as players. &#xD;&#xA;&#xD;&#xA;On development complexity and time constraints always go hand in hand. Another would be  resource and platform constraints. Possible economic ramifications of holding back for later is sometimes a reason as well. &#xD;&#xA;&#xD;&#xA;So from people experience here aside from the above when should features be cut or be for later release?" />
  <row Id="7178" PostHistoryTypeId="1" PostId="3657" RevisionGUID="e58c7889-5140-4479-b6ee-c65b85eee098" CreationDate="2010-09-08T07:37:39.250" UserId="919" Text="When should to decide when a feature list is enough?" />
  <row Id="7179" PostHistoryTypeId="3" PostId="3657" RevisionGUID="e58c7889-5140-4479-b6ee-c65b85eee098" CreationDate="2010-09-08T07:37:39.250" UserId="919" Text="&lt;game-design&gt;" />
  <row Id="7184" PostHistoryTypeId="2" PostId="3660" RevisionGUID="d6aed7d5-9b5c-48f3-9283-c359300d3e9e" CreationDate="2010-09-08T08:12:18.910" UserId="2036" Text="When the time and effort needed to include them is greater than the value they add to the game. &lt;br&gt;&#xD;&#xA;For example, if you were creating a sporting game or something where players are likely to want to showcase their skills, multiplayer is a must. Guitar Hero wouldn't be the same without it. However, a solely individual game, where you reach beginning to end on your own, following a story or plot doesn't need multiplayer. The shoddy multiplayer system in Grand Theft Auto San Andreas is testament to that (even though that company probably didn't find multiplayer too hard). &lt;br&gt;&#xD;&#xA;Also, features that don't really fit with the story of the game, just are there because they can be. If it's not completely essential to gameplay, it's probably a good sign that they can be pushed to a later release if time is an issue." />
  <row Id="7185" PostHistoryTypeId="2" PostId="3661" RevisionGUID="cf913bd5-15ec-43b7-9213-93b46b41646c" CreationDate="2010-09-08T08:16:45.883" UserId="1352" Text="Complexity doesn't make your game fun.&#xD;&#xA;&#xD;&#xA;The right combination and balance of gameplay elements does. The player must be pushed to the extent of their skill-level and get a feeling of mastery from conquering challenges.&#xD;&#xA;&#xD;&#xA;Your feature list should change whenever you feel the current gameplay isn't fun. These changes must be made within your budget / time constrains. Make sure any changes you make aadd value to your game.&#xD;&#xA;&#xD;&#xA;Also, prototype early, don't just write up a huge feature list and assume it will all be fun when put together." />
  <row Id="7186" PostHistoryTypeId="2" PostId="3662" RevisionGUID="aeac7350-3b3c-416c-966a-a09453d3bb9e" CreationDate="2010-09-08T08:16:53.713" UserId="405" Text="I have found from my personal    experience that it is best to avoid    adding new unplanned features as soon as    possible.&#xD;&#xA;&#xD;&#xA;From a design point of view    a feature which has been added during    a spur of the moment &quot;wouldn't it be    nice to have feature x&quot; period will    add a lot of development time, might    not integrate well with the code, and    might not fit completely with the    rest of your design.&#xD;&#xA;&#xD;&#xA;In the worst case a project which has    had a lot of these moments can feel    like a messy, hacked together    combination of features, which really    should have had a lot more time spent    on them in the design phase and look    less professional as a result.&#xD;&#xA;&#xD;&#xA;As a general guideline I try to    follow these rules:&#xD;&#xA;&#xD;&#xA; - If a new feature comes up early in the project, take the time to go back to the design phase and really see how this feature can work in with your product while still remaining consistent with the rest of the design.&#xD;&#xA;   &#xD;&#xA; - If the project is drawing closer to release, consider making a list of features to add to a new version.&#xD;&#xA; - If you find that a lot of features keep coming up which you really want to implement, maybe you should consider going back to the design and look at why these new features haven't been considered earlier, possibly due to a lack of effort spent in the design phase.&#xD;&#xA;&#xD;&#xA;Obviously this fits some projects better than others, but really if you have a feature come up late in the project, you will probably will fine without it, at least until you start working on a new version.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7187" PostHistoryTypeId="4" PostId="3657" RevisionGUID="d7de978e-42d6-42fd-b1fa-e434d6167bdd" CreationDate="2010-09-08T08:31:20.650" UserId="119" Comment="edited title; edited title" Text="How do you decide when your feature list is long enough?" />
  <row Id="7189" PostHistoryTypeId="5" PostId="3660" RevisionGUID="505327ae-e34e-4e2e-9d69-780e36e00061" CreationDate="2010-09-08T08:39:07.263" UserId="2036" Comment="added 156 characters in body" Text="**When the time and effort needed to include them is greater than the value they add to the game**. &lt;br&gt; &lt;br&gt;&#xD;&#xA;For example, if you were creating a sporting game or something where players are likely to want to showcase their skills, multiplayer is a must. Guitar Hero wouldn't be the same without it. However, a solely individual game, where you reach beginning to end on your own, following a story or plot doesn't need multiplayer. The shoddy multiplayer system in Grand Theft Auto San Andreas is testament to that (even though that company probably didn't find multiplayer too hard). &lt;br&gt;&lt;br&gt;&#xD;&#xA;Also, features that don't really fit with the story of the game, just are there because they can be. If it's not completely essential to gameplay, it's probably a good sign that they can be pushed to a later release if time is an issue. &lt;br&gt;&lt;br&gt;&#xD;&#xA;The thing is, extra features aren't the quintessential element of a game. An exciting storyline combined with enjoyable gameplay is." />
  <row Id="7190" PostHistoryTypeId="2" PostId="3663" RevisionGUID="75314306-8731-4373-831a-2e0e3bb63d74" CreationDate="2010-09-08T08:40:14.207" UserId="1272" Text="While there is a degree to which variety in features is great (being able to do tons of random stuff in a GTA-ish game, having tons of variety in weapons and accessories in an RPG or Call of Duty-ish game, etc), I think more minimal gameplay focused tightly on a few core features can be highly effective.&#xD;&#xA;&#xD;&#xA;Look at Portal, it took its one core mechanic and really effectively built its puzzles around that without needing a lot of extra clutter.&#xD;&#xA;&#xD;&#xA;I think being strict about keeping the feature list as minimal as possible and really fleshing out a few core features allows for a more feasible project and often a more enjoyable experience (if Portal added RPG elements and driving sequences and slowmo and whatever other &quot;cool features&quot;, would it have been as good? Would the core mechanics have been as polished?).&#xD;&#xA;&#xD;&#xA;Now, as an indie dev I'm surely biased, but I think that usually &quot;less is more&quot; in features, and even though something might be cool or popular at the moment, if it doesn't make the overall experience noticeably better it should be cut." />
  <row Id="7191" PostHistoryTypeId="2" PostId="3664" RevisionGUID="ede8ff1e-0d49-47e3-8f20-5b824ff0d2dc" CreationDate="2010-09-08T09:05:12.497" UserId="1454" Text="Yes, this is a common technique and two immediate benefits spring to mind:&#xD;&#xA;&#xD;&#xA;1) The render-to-texture technique as a way to circumvent the inherent issues that come with supporting several resolutions and/or aspect ratios. You can scale the texture to your screen size or just render it in the centre. It's just a way of virtualising your coordinate system.&#xD;&#xA;&#xD;&#xA;2) If rendered onto a texture then this can be applied to a mesh or a quad and transformed. For instance, if you wanted your GUI (Menu) to appear at a 30 degree angle to the camera then you'd render to texture, wrap the texture on a quad and then transform the quad.&#xD;&#xA;&#xD;&#xA;Most rendering into a texture is essentially the same as rendering into a buffer, so no, there is little-to-no performance hit." />
  <row Id="7192" PostHistoryTypeId="2" PostId="3665" RevisionGUID="18f758d8-68bd-4eba-b8ed-e8e3059575f6" CreationDate="2010-09-08T09:30:49.013" UserId="2069" Text="As part of the project i am working on I am looking to produce some software that works on a LCD display (think call center info boards) and displays various graphs (the bars grow etc in realtime, so incoming call stats etc etc) and flicks between various 'plug-ins'.&#xD;&#xA;&#xD;&#xA;I asked before, and WPF was suggested, and it looks excellent.. However i really need to keep to Java (work standards).. So the question is what XNA style API is the best for this, I can see that JMonkey etc seem to provide 3d stuff, but I also need sprites etc.&#xD;&#xA;&#xD;&#xA;For example: Think, defused 3d planet rotating in the background, while call stats are printed over the top." />
  <row Id="7193" PostHistoryTypeId="1" PostId="3665" RevisionGUID="18f758d8-68bd-4eba-b8ed-e8e3059575f6" CreationDate="2010-09-08T09:30:49.013" UserId="2069" Text="Need some advice on a java api to use for a 'presentation display board' - based on game 2d/3d tech" />
  <row Id="7194" PostHistoryTypeId="3" PostId="3665" RevisionGUID="18f758d8-68bd-4eba-b8ed-e8e3059575f6" CreationDate="2010-09-08T09:30:49.013" UserId="2069" Text="&lt;2d&gt;&lt;3d&gt;&lt;sprites&gt;&lt;java&gt;" />
  <row Id="7195" PostHistoryTypeId="2" PostId="3666" RevisionGUID="79306472-9b86-4c6e-8c3b-ac766e4ce4c1" CreationDate="2010-09-08T09:43:41.870" UserDisplayName="huehmae" Text="You might want to consider also BlazeDS, Union Platform and Firebase.&#xD;&#xA;&#xD;&#xA;Even though Stratus seems to be a very efficient from data transfer efficiency point of view, it doesn't come without problems. As far as I understand, it works on top of the UDP layer (instead of TCP/IP), which could cause firewall related issues to some of your players. Furthermore, the technology seems to be at beta stage so I wouldn't build a commercial application on it yet (never tried, though, this is just an emotion based opinion)." />
  <row Id="7196" PostHistoryTypeId="2" PostId="3667" RevisionGUID="ef9f3aeb-ac3d-4bcb-ad5a-9a3239fd11ca" CreationDate="2010-09-08T10:28:37.357" UserId="1887" Text="Maybe the idea of [Tweakable Constants][1] fit your needs. It is so usable in fact that you'd *think* you would need a complex solution to have an effective run-time variables control, but in reality the implementation is almost too simple.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/snippets/features/tweakVal/" />
  <row Id="7197" PostHistoryTypeId="5" PostId="3667" RevisionGUID="7c784cdd-5790-4c0a-947f-3879952d7f53" CreationDate="2010-09-08T10:57:09.253" UserId="1887" Comment="added 168 characters in body" Text="Maybe the idea of [Tweakable Constants][1] fit your needs. It is so usable in fact that you'd *think* you would need a complex solution to have an effective run-time variables control, but in reality the implementation is almost too simple.&#xD;&#xA;&#xD;&#xA;**Edit:** Also here is the [original discussion][2] of this technique which is some interesting reading.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/snippets/features/tweakVal/&#xD;&#xA;  [2]: https://mollyrocket.com/forums/viewtopic.php?p=3355" />
  <row Id="7198" PostHistoryTypeId="2" PostId="3668" RevisionGUID="fec468e3-6256-47b3-abbf-0934fe2b403c" CreationDate="2010-09-08T11:49:28.627" UserId="1629" Text="## Keep lists short, be agile##&#xD;&#xA;&#xD;&#xA;Do not build feature lists at all, or if you do, build them very short, only worth a few weeks of development.&#xD;&#xA;&#xD;&#xA;Develop in agile style - start with the few most important features at all, test, based on what works and what does not, and then think about if it is worth adding some more features (you will be able to judge them a lot better if you already have some experience with the basic gameplay).&#xD;&#xA;&#xD;&#xA;##How to judge individual feature##&#xD;&#xA;Other than than, I would agree with bennybdbc criterion, &quot;When the time and effort needed to include them is greater than the value they add to the game.&quot;.&#xD;&#xA;&#xD;&#xA;That said, you also need to consider &quot;external&quot; world:&#xD;&#xA;&#xD;&#xA;- are you running out of money or out of time given by a contract?&#xD;&#xA;- are you running out of the publishing media space (DVD full)&#xD;&#xA;- are you running out of the performance space (new features would cause the game to run too slow)?&#xD;&#xA;- is a competing game coming to be published soon?&#xD;&#xA;&#xD;&#xA;Simple real-life issues like that need to considered as well, unless you are developing the game just for you fun.&#xD;&#xA;" />
  <row Id="7199" PostHistoryTypeId="2" PostId="3669" RevisionGUID="c035c0c2-83e5-4da1-8fb6-cb4182efd765" CreationDate="2010-09-08T11:57:10.683" UserId="1629" Text="Do not attempt to replicate the whole game state. Interpolating it would be a nightmare. Just isolate the parts which are variable and needed by rendering (let us call this a &quot;Visual State&quot;).&#xD;&#xA;&#xD;&#xA;For each object class create an accompanying class which will be able to hold the object Visual State. This object will be produced by the simulation, and consumed by the rendering. The interpolation will easily plug in between. If the state is immutable and passed by value, you will have no threading issues.&#xD;&#xA;&#xD;&#xA;The rendering usually does not need to know anything about logical relations between the objects, therefore the structure used for the rendering will be a plain vector, or at most a simple tree.&#xD;&#xA;" />
  <row Id="7200" PostHistoryTypeId="5" PostId="3669" RevisionGUID="932f2dca-45f1-402e-aae6-97b648cbfa3b" CreationDate="2010-09-08T12:08:36.677" UserId="1629" Comment="Added code sample" Text="Do not attempt to replicate the whole game state. Interpolating it would be a nightmare. Just isolate the parts which are variable and needed by rendering (let us call this a &quot;Visual State&quot;).&#xD;&#xA;&#xD;&#xA;For each object class create an accompanying class which will be able to hold the object Visual State. This object will be produced by the simulation, and consumed by the rendering. The interpolation will easily plug in between. If the state is immutable and passed by value, you will have no threading issues.&#xD;&#xA;&#xD;&#xA;The rendering usually does not need to know anything about logical relations between the objects, therefore the structure used for the rendering will be a plain vector, or at most a simple tree.&#xD;&#xA;&#xD;&#xA;##Example&#xD;&#xA;&#xD;&#xA;###Traditional design&#xD;&#xA;&#xD;&#xA;    class Actor&#xD;&#xA;    {&#xD;&#xA;      Matrix4x3 position;&#xD;&#xA;      float fuel;&#xD;&#xA;      float armor;&#xD;&#xA;      float stamina;&#xD;&#xA;      float age;&#xD;&#xA;    &#xD;&#xA;      void Simulate(float deltaT)&#xD;&#xA;      {&#xD;&#xA;        age += deltaT;&#xD;&#xA;        armor -= HitByAWeapon();&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;###Using Visual state&#xD;&#xA;    class IVisualState&#xD;&#xA;    {&#xD;&#xA;      public:&#xD;&#xA;      virtual void Interpolate(const IVisualState &amp;new, float f) {}&#xD;&#xA;    };&#xD;&#xA;    class Actor&#xD;&#xA;    {&#xD;&#xA;      struct VisualState: public IVisualState&#xD;&#xA;      {&#xD;&#xA;        Matrix4x3 position;&#xD;&#xA;        float fuel;&#xD;&#xA;        float armor;&#xD;&#xA;        float stamina;&#xD;&#xA;        float age;&#xD;&#xA;&#xD;&#xA;        virtual auto_ptr&lt;IVisualState&gt; Interpolate(const IVisualState &amp;new, float f)&#xD;&#xA;        {&#xD;&#xA;          const VisualState &amp;newState = static_cast&lt;const VisualState &amp;&gt;(new);&#xD;&#xA;          IVisualState *ret = new VisualState;&#xD;&#xA;          ret-&gt;age = lerp(this-&gt;age,newState.age);&#xD;&#xA;          // ... interpolate other properties as well, using any suitable interpolation method&#xD;&#xA;          // liner, spline, slerp, whatever works best for the given property&#xD;&#xA;          return ret;&#xD;&#xA;        };&#xD;&#xA;      };&#xD;&#xA;    &#xD;&#xA;      auto_ptr&lt;VisualState&gt; state_;&#xD;&#xA;    &#xD;&#xA;      void Simulate(float deltaT)&#xD;&#xA;      {&#xD;&#xA;        state_-&gt;age += deltaT;&#xD;&#xA;        state_-&gt;armor -= HitByAWeapon();&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7201" PostHistoryTypeId="5" PostId="3667" RevisionGUID="660744cf-1227-4743-b789-ed5a4ccdaa06" CreationDate="2010-09-08T12:16:37.200" UserId="1887" Comment="deleted 32 characters in body" Text="Maybe the idea of [Tweakable Constants][1] fit your needs. It is so usable in fact that you'd *think* you would need a complex solution to have an effective run-time variables control, but in reality the implementation is almost too simple. The [original discussion][2] of this technique is also an interesting read.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/snippets/features/tweakVal/&#xD;&#xA;  [2]: https://mollyrocket.com/forums/viewtopic.php?p=3355" />
  <row Id="7202" PostHistoryTypeId="2" PostId="3670" RevisionGUID="e65a13ff-df8a-4a27-a5cc-4ad3b2298cc0" CreationDate="2010-09-08T12:24:13.333" UserId="1179" Text="Hey all, I am trying to take into consideration the effect of inertia of the initial rotation of a ball, hitting a surface, into the exit velocity vector of the ball.&#xD;&#xA;&#xD;&#xA;My current theory is this:&#xD;&#xA;&#xD;&#xA; 1. Assume Ball initial rotation is **Ri**&#xD;&#xA; 2. Calculate an exit Velocity vector&#xD;&#xA;    without any consideration for the&#xD;&#xA;    ball's initial rotation, call this&#xD;&#xA;    **Ve**&#xD;&#xA; 3. Rotate **Ve** by an angle proportionate to **Ri** [while limiting the rotation, so ball new vector does not point *into* surface]. Call this new vector **rVe**&#xD;&#xA; 4. Calculate exit rotation of ball, by calculating it as a portion of max ball rotation speed, bas on angle between **rVe** &amp; **Vi** using dot product of these two vectors&#xD;&#xA;&#xD;&#xA;Does this sound right to you? Am I missing something here? Is there an easier way to do this?" />
  <row Id="7203" PostHistoryTypeId="1" PostId="3670" RevisionGUID="e65a13ff-df8a-4a27-a5cc-4ad3b2298cc0" CreationDate="2010-09-08T12:24:13.333" UserId="1179" Text="How to take into consideration the effect of initial rotation of a ball hitting &amp; reflecting off a surface" />
  <row Id="7204" PostHistoryTypeId="3" PostId="3670" RevisionGUID="e65a13ff-df8a-4a27-a5cc-4ad3b2298cc0" CreationDate="2010-09-08T12:24:13.333" UserId="1179" Text="&lt;2d&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="7205" PostHistoryTypeId="2" PostId="3671" RevisionGUID="35a503d7-5f6f-430e-9558-e2f5ab5ca8ca" CreationDate="2010-09-08T13:19:20.840" UserId="189" Text="*Note I'm not actually looking into interpolation so this answer doesn't address it; I am just concerned with having one copy of the game state for the rendering thread, and another for the update thread. So I can't comment on the issue of interpolation, though you could modify the following solution to interpolate.*&#xD;&#xA;&#xD;&#xA;I've been wondering about this as I've been designing and thinking about a multithreaded engine. So I asked a question on Stack Overflow, about [how to implement some sort of &quot;journaling&quot; or &quot;transactions&quot; design pattern][1]. I got some good responses, and the accepted answer really got me thinking.&#xD;&#xA;&#xD;&#xA;It's tough to create an immutable object, since all of its children must also be immutable, and you need to be really careful that everything truly is immutable. But if you are indeed careful, you could create a superclass `GameState` which contains all of the data (and subdata and so on) in your game; the &quot;Model&quot; part of the Model-View-Controller organizational style.&#xD;&#xA;&#xD;&#xA;Then, [as Jeffrey says][2], instances of your GameState object are fast, memory efficient, and thread safe. The big downside is that in order to change anything about the model, you sort of need to recreate the model, so you need to be really careful that your code doesn't turn into a huge mess. Setting a variable within the GameState object to a new value is more involved than just `var = val;`, in terms of lines of code.&#xD;&#xA;&#xD;&#xA;I'm terribly intrigued by it though. You don't need to copy your entire data structure every frame; you just copy a pointer to the immutable structure. That by itself is very impressive, don't you agree?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3359624/journaling-or-transactions-design-pattern&#xD;&#xA;  [2]: http://stackoverflow.com/questions/3359624/journaling-or-transactions-design-pattern/3365191#3365191" />
  <row Id="7206" PostHistoryTypeId="2" PostId="3672" RevisionGUID="a3de2a15-8755-466b-87f9-c4efaf53b2fa" CreationDate="2010-09-08T13:28:29.583" UserId="1286" Text="I'm successfully streaming ogg vorbis data to openAL with the Java library [JOrbis][1], but now I want to loop over a part of this stream, e.g from 30&quot; to 1'30&quot;.  &#xD;&#xA;&#xD;&#xA;I thought that at the end of the loop, I could redecode from the beginning of the file, skip the unwanted part, and then keep streaming until the end of the loop, and restart again. But I'm not really convinced by this method, as for example, if I want to loop over 4' and 4'30&quot;, I'll need to decode each loop 4 minutes of ogg data for nothing.&#xD;&#xA;&#xD;&#xA;Another way would be to put all the loop in memory, but it won't be streaming anymore and I want to avoid this.&#xD;&#xA;&#xD;&#xA;So is there a way to reach a point in an ogg vorbis stream without decoding the previous data every time ? Does ogg contains a kind of index that can be used, or is it possible to make one by decoding the whole file once before ?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;(ps: I could't give this question the right tags as I haven't yet 150 rep)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jcraft.com/jorbis/" />
  <row Id="7207" PostHistoryTypeId="1" PostId="3672" RevisionGUID="a3de2a15-8755-466b-87f9-c4efaf53b2fa" CreationDate="2010-09-08T13:28:29.583" UserId="1286" Text="How to loop over a part of an ogg vorbis stream ?" />
  <row Id="7208" PostHistoryTypeId="3" PostId="3672" RevisionGUID="a3de2a15-8755-466b-87f9-c4efaf53b2fa" CreationDate="2010-09-08T13:28:29.583" UserId="1286" Text="&lt;audio&gt;&lt;openal&gt;" />
  <row Id="7209" PostHistoryTypeId="2" PostId="3673" RevisionGUID="0fbacff0-b7f3-423c-9dce-72a6202ff0f1" CreationDate="2010-09-08T14:13:39.390" UserId="1629" Text="Yes, you can seek into an ogg, assuming the off file you are reading is seekable (which most file are). As I am not familiar with JOrbis, I will present native C/C++ solution (using vorbisFile.h - i.e. libvorbis), hopefully you will find some counterpart in your library.&#xD;&#xA;&#xD;&#xA;Use [ov_pcm_seek][1] to seek into your desired position, then you can continue reading normally using [ov_read][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xiph.org/vorbis/doc/vorbisfile/ov_pcm_seek.html&#xD;&#xA;  [2]: http://www.xiph.org/vorbis/doc/vorbisfile/ov_read.html" />
  <row Id="7210" PostHistoryTypeId="2" PostId="3674" RevisionGUID="1443748f-3d26-4dc5-a235-ccf15494ad8e" CreationDate="2010-09-08T14:14:05.600" UserId="744" Text="Backtracking and seeking in Vorbis files is notoriously tricky. Restarting from the beginning may be your best option, especially if you are using someone else's API.&#xD;&#xA;&#xD;&#xA;Another option would be to cut up the file into two, one of which is the full track and then a second 30 second track which you (hopefully) can transition to without a gap.&#xD;&#xA;&#xD;&#xA;A third option, if your API provides the information, would be to build a custom lookup table of granulepos -&gt; file offsets, and binary search through that, then read linearly from there. The table size can be adjusted based on memory requirements, unlike the disk file.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://nothings.org/&quot;&gt;Sean Barrett&lt;/a&gt; &lt;a href=&quot;http://nothings.org/stb_vorbis/&quot;&gt;wrote an Ogg Vorbis decoder for RAD&lt;/a&gt; and &lt;a href=&quot;http://nothings.org/stb_vorbis/ogg_seek.txt&quot;&gt;explained in some detail why the format is no good for seeking&lt;/a&gt;. It mirrors my experience working with Ogg Vorbis, and I didn't even have to touch the Vorbis part for my work." />
  <row Id="7211" PostHistoryTypeId="5" PostId="3655" RevisionGUID="80d2b047-5e3e-422c-bc36-469002ef1a1b" CreationDate="2010-09-08T14:15:31.143" UserId="370" Comment="clarify game centric GUI" Text="I've been working with a few game oriented gui libraries trying to find a good fit.  More specifically, a GUI that will work on Windows,Linux,iPhone, and Android with minimal special code.&#xD;&#xA;&#xD;&#xA;In my tinkering I've noticed a few libraries like to render the their GUI's to an off screen texture that just display the texture instead.&#xD;&#xA;&#xD;&#xA;Is this a common GUI technique?  &#xD;&#xA;Isn't there a performance hit with rapidly changing GUIs?&#xD;&#xA;&#xD;&#xA;Were I the implementer I would have just rendered the GUI directly each frame.  Is there anything particularly wrong or inefficient direct rendering?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;Update:&#xD;&#xA;By *'game-centric GUI'* I mean a GUI framework that doesn't own the window or the main loop.  There are other features I'd add but the main loop is the only critical one.  This usually involves various rendering backends, input injection, and an update method." />
  <row Id="7212" PostHistoryTypeId="5" PostId="3656" RevisionGUID="cb773429-ad5c-4c17-9a2e-4003e9522778" CreationDate="2010-09-08T14:16:33.617" UserId="288" Comment="added 113 characters in body" Text="I've been dealing with some frame-rate jittering issues with my game lately, and it seems that the best solution would be the one suggested by Glenn Fiedler (Gaffer on Games) in the classic &lt;a href=&quot;http://gafferongames.wordpress.com/game-physics/fix-your-timestep/&quot;&gt;Fix Your  Timestep!&lt;/a&gt; article.&#xD;&#xA;&#xD;&#xA;Now - I'm already using a fixed time-step for my update. The problem is that I'm not doing the suggested interpolation for rendering. The upshot is that I get doubled or skipped frames if my render rate doesn't match my update rate. These can be visually noticeable.&#xD;&#xA;&#xD;&#xA;**So I'd like to add interpolation to my game - and I'm interested to know how others have structured their data and code to support this.**&#xD;&#xA;&#xD;&#xA;Obviously I will need to store (where?/how?) two copies of game state information relevant to my renderer, so that it may interpolate between them.&#xD;&#xA;&#xD;&#xA;Additionally - this seems like a good place to add threading. I imagine that an update thread could work on a *third* copy of the game state, leaving the other two copies as read-only for the render thread. (Is this a good idea?)&#xD;&#xA;&#xD;&#xA;It seems that having two or three versions of the game's state could introduce performance and - *far* more importantly - reliability and developer productivity problems, compared to having just a single version. So I'm particularly interested in methods for mitigating those issues.&#xD;&#xA;&#xD;&#xA;Of particular note, I think, is the problem of how to handle adding and removing objects from the game state.&#xD;&#xA;&#xD;&#xA;Finally, it seems that some state is either not directly needed for rendering, or would be too difficult to track different versions of (eg: a third-party physics engine that stores a single state) - so I'd be interested to know how people have handled that kind of data within such a system." />
  <row Id="7213" PostHistoryTypeId="5" PostId="3674" RevisionGUID="7e837788-1705-4d60-b485-fc74ead3829b" CreationDate="2010-09-08T14:20:46.283" UserId="744" Comment="added 52 characters in body" Text="Backtracking and seeking in Vorbis files is notoriously tricky. Restarting from the beginning may be your best option, especially if you are using someone else's API.&#xD;&#xA;&#xD;&#xA;Another option would be to cut up the file into two, one of which is the full track and then a second 30 second track which you (hopefully) can transition to without a gap.&#xD;&#xA;&#xD;&#xA;A third option, if your API provides the information, would be to build a custom lookup table of granulepos -&gt; file offsets, and binary search through that, then read linearly from there. The table size can be adjusted based on memory requirements, unlike the disk file. Although, there are some tricky issues with that...&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://nothings.org/&quot;&gt;Sean Barrett&lt;/a&gt; &lt;a href=&quot;http://nothings.org/stb_vorbis/&quot;&gt;wrote an Ogg Vorbis decoder for RAD&lt;/a&gt; and &lt;a href=&quot;http://nothings.org/stb_vorbis/ogg_seek.txt&quot;&gt;explained in some detail why the format is no good for seeking&lt;/a&gt;. It mirrors my experience working with Ogg Vorbis, and I didn't even have to touch the Vorbis part for my work." />
  <row Id="7214" PostHistoryTypeId="6" PostId="3672" RevisionGUID="8c62ae75-8dbe-4112-9bbe-1e720fc4efcc" CreationDate="2010-09-08T14:27:42.407" UserId="744" Comment="edited tags" Text="&lt;optimization&gt;&lt;java&gt;&lt;audio&gt;&lt;openal&gt;&lt;ogg-vorbis&gt;" />
  <row Id="7215" PostHistoryTypeId="5" PostId="1119" RevisionGUID="e9546a35-3619-438f-a96a-b928a5bd9bd2" CreationDate="2010-09-08T14:40:32.537" UserId="370" Comment="added 6 characters in body" Text="How do game engine entities communicate?&#xD;&#xA;&#xD;&#xA;Two use cases:&#xD;&#xA;&#xD;&#xA; 1. How would `entity_A` send a `take-damage` message to `entity_B`?  &#xD;&#xA; 2. How would `entity_A` query `entity_B`'s HP?&#xD;&#xA;&#xD;&#xA;Here's what I've encountered so far:&#xD;&#xA;&#xD;&#xA; * [Message queue][1]  &#xD;&#xA;  1. `entity_A` creates a `take-damage` message and posts it to `entity_B`'s message queue.&#xD;&#xA;  2. `entity_A` creates a `query-hp` message and posts it to `entity_B`.  `entity_B` in return creates an `response-hp` message and posts it to `entity_A`.&#xD;&#xA; * [Publish/Subscribe][2]  &#xD;&#xA;   1. `entity_B` subscribes to `take-damage` messages (possibly with some preemptive filtering so only relevant message are delivered).  `entity_A` produces `take-damage` message that references `entity_B`.&#xD;&#xA;   2. `entity_A` subscribes to `update-hp` messages (possibly filtered).  Every frame `entity_B` broadcasts `update-hp` messages.&#xD;&#xA; * [Signal/Slots][3]&#xD;&#xA;  1. ???&#xD;&#xA;  2. `entity_A` connects an `update-hp` slot to `entity_B`'s `update-hp` signal.&#xD;&#xA; * Something better?&#xD;&#xA;&#xD;&#xA;Do I have a correct understanding of how these communication schemes would tie into a game engine's entity system?  &#xD;&#xA;How do entities in commercial game engines communicate?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Message_queue&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Publish/subscribe&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Signals_and_slots" />
  <row Id="7216" PostHistoryTypeId="2" PostId="3675" RevisionGUID="c0935cb3-6f3e-4049-84b5-05b771b8a7f2" CreationDate="2010-09-08T15:15:02.443" UserId="370" Text="My solution far less elegant/complicated than most.  I'm using Box2D as my physics engine so keeping more than one copy of the system state isn't manageable (clone the physics system then try to keep them in sync, there might be a better way but I couldn't come up with one).&#xD;&#xA;&#xD;&#xA;Instead I keep a running counter of the *physics generation*.  Each update increments the physics generation, when the physics system double updates, the generation counter double updates as well.&#xD;&#xA;&#xD;&#xA;The rendering system keeps track of the last rendered generation and the delta since that generation.  When rendering objects that wish to interpolate their position can use these values along with their position and velocity to guess where the object should be rendered.&#xD;&#xA;&#xD;&#xA;I didn't address what to do if the physics engine was too fast.  If you did both, you'd need to be careful to not cause the sprites to jump around by guessing too slow then guessing too fast." />
  <row Id="7217" PostHistoryTypeId="5" PostId="3675" RevisionGUID="4feb995a-f3f8-4447-ae1d-09392c376edc" CreationDate="2010-09-08T15:26:13.657" UserId="370" Comment="follow up" Text="My solution far less elegant/complicated than most.  I'm using [Box2D][1] as my physics engine so keeping more than one copy of the system state isn't manageable (clone the physics system then try to keep them in sync, there might be a better way but I couldn't come up with one).&#xD;&#xA;&#xD;&#xA;Instead I keep a running counter of the *physics generation*.  Each update increments the physics generation, when the physics system double updates, the generation counter double updates as well.&#xD;&#xA;&#xD;&#xA;The rendering system keeps track of the last rendered generation and the delta since that generation.  When rendering objects that wish to interpolate their position can use these values along with their position and velocity to guess where the object should be rendered.&#xD;&#xA;&#xD;&#xA;I didn't address what to do if the physics engine was too fast.  I'd almost argue that you shouldn't interpolate for fast movement.  If you did both, you'd need to be careful to not cause the sprites to jump around by guessing too slow then guessing too fast.&#xD;&#xA;&#xD;&#xA;When I wrote the interpolation stuff I was running the graphics at 60Hz and the physics at 30Hz.  It turns out that Box2D is much more stable when it is run at 120Hz.  Because of this my interpolation code gets very little use.  By doubling the target framerate the physics on average updates twice per frame.  With jitter that could be 1 or 3 times as well, but almost never 0 or 4+.  The higher physics rate kinda fixes the interpolation problem by itself.  When running both the physics and framerate at 60hz you might get 0-2 updates per frame.  The visual difference between 0 and 2 is huge compared to 1 and 3.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/" />
  <row Id="7218" PostHistoryTypeId="2" PostId="3676" RevisionGUID="2bf32aca-a0cd-4f7c-97bc-09c65ddf7dcd" CreationDate="2010-09-08T16:28:25.380" UserId="659" Text="I've heard this approach to timesteps suggested quite frequently, but in 10 years in games, I've never worked on a real-world project that relied on a fixed timestep and interpolation. &#xD;&#xA;&#xD;&#xA;It seems generally more effort than a variable timestep system (assuming a sensible range of framerates, in the 25Hz-100Hz sort of range).&#xD;&#xA;&#xD;&#xA;I did try the fixed timestep+interpolation approach once for a very small prototype - no threading, but fixed-timestep logic update, and as-fast-as-possible rendering when not updating that. My approach there was to have a few classes such as CInterpolatedVector and CInterpolatedMatrix - which stored previous/current values, and had an accessor used from the render code, to retrieve the value for the current render time (which would always be between the previous and current times) &#xD;&#xA;&#xD;&#xA;Each game object would, at the end of it's update, set it's current state in to a set of these interpolatable vectors/matrices. This sort of thing could be extended to support threading, you'd need at least 3 sets of values - one that was being updated, and at least 2 previous values to interpolate between...&#xD;&#xA;&#xD;&#xA;Note that some values can't be trivially interpolated (e.g. 'sprite animation frame', 'special effect active'). You may be able to skip interpolation entirely, or it may cause issues, depending on your game's needs.&#xD;&#xA;&#xD;&#xA;IMHO, it's best to just go variable timestep - *unless* you're making an RTS, or other game where you have a huge number of objects, and have to keep 2 independent simulations in sync for network games (sending only orders/commands over the network, rather than object positions). In that situation, fixed-timestep is the only option.&#xD;&#xA;" />
  <row Id="7219" PostHistoryTypeId="2" PostId="3677" RevisionGUID="2d57dc9e-c554-4900-a789-b40ed2649387" CreationDate="2010-09-08T16:57:57.847" UserId="891" Text="Depending on how much 3D you're really going to use will most likely be the largest factor.&#xD;&#xA;&#xD;&#xA;**Primarily 2D:**&#xD;&#xA;&#xD;&#xA;If your application is primarily 2D(*like 95% to really make this a viable option*) then use the [**Slick**][1] engine which is a 2D engine.  3D models will have to be done directly in openGL via [**SlickCallable**][2].&#xD;&#xA;&#xD;&#xA;**Primarily 3D:**&#xD;&#xA;&#xD;&#xA;It might be a lot easier to use the [**JMonkeyEngine**][3] 3 and use textured billboards if you need a lot of 3D graphics.  A lot of the expected sprite handling will needed to be coded by yourself though, although you can stay within the world of JMonkey and not have to drop to openGL.&#xD;&#xA;&#xD;&#xA;**Unique Hybrid of 2D and 3D:**&#xD;&#xA;&#xD;&#xA;Depending on how much interleaving of 2D and 3D technology you need it might be more beneficial to create your own hybrid engine straight from **[LWJGL][4]**.&#xD;&#xA;&#xD;&#xA;A tutorial on how to build a [**2D/3D asteroid game is located here**][5]&#xD;&#xA;&#xD;&#xA;[**Source code here**][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/&#xD;&#xA;  [2]: http://slick.cokeandcode.com/javadoc/org/newdawn/slick/opengl/SlickCallable.html&#xD;&#xA;  [3]: http://www.jmonkeyengine.com/home/&#xD;&#xA;  [4]: http://lwjgl.org/index.php&#xD;&#xA;  [5]: http://www.cokeandcode.com/asteroidstutorial&#xD;&#xA;  [6]: http://www.cokeandcode.com/asteroids/" />
  <row Id="7220" PostHistoryTypeId="5" PostId="1604" RevisionGUID="161ac9c4-174b-4d1e-a2e2-2c84893f0d9d" CreationDate="2010-09-08T17:24:51.260" UserId="370" Comment="recommend graphics interpolation" Text="There are two issues related to the question.&#xD;&#xA;&#xD;&#xA; * Should physics step rate be tied to frame rate?&#xD;&#xA; * Should physics be stepped with constant deltas?&#xD;&#xA;&#xD;&#xA;In Glen fielder's Fix your time step he says to &quot;Free the Physics&quot;.  That means your physics update rate should **not** be tied to your frame rate.&#xD;&#xA;&#xD;&#xA;&gt; For example, if the display framerate&#xD;&#xA;&gt; is 50fps and the simulation is&#xD;&#xA;&gt; designed to run at 100fps then we need&#xD;&#xA;&gt; to take two physics steps every&#xD;&#xA;&gt; display update to keep the physics in&#xD;&#xA;&gt; sync.&#xD;&#xA;&#xD;&#xA;In Erin Catto's recommendations for Box2D he advocates this as well.&#xD;&#xA;&#xD;&#xA;&gt; So don't tie&#xD;&#xA;&gt; the time step to your frame rate&#xD;&#xA;&gt; (unless you really, really have to).&#xD;&#xA;&#xD;&#xA;*Should Physics step rate be tied to your frame rate?* No.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Erin's thoughts on fixed step vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; Box2D uses a computational algorithm called an integrator. Integrators simulate the physics equations at discrete points of time. ... We also don't like the time step to change much. A variable time step produces variable results, which makes it difficult to debug.&#xD;&#xA;&#xD;&#xA;Glen's thoughts on fixed vs variable stepping:&#xD;&#xA;&#xD;&#xA;&gt; ###Fix your timestep or explode&#xD;&#xA;&gt; ...  If you have a series of really stiff spring constraints for shock absorbers in a car simulation then tiny changes in dt can actually make the simulation explode. ...&#xD;&#xA;&#xD;&#xA;*Should physics be stepped with constant deltas?* Yes.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The way to step the physics with constant deltas and not tie your physics update rate to the frame rate still is to use a time accumulator.  In my game I take it a step further.  I apply a smoothing function to incoming time.  That way large FPS spikes don't cause the physics to jump too far, instead they're simulated more quickly for a frame or two.&#xD;&#xA;&#xD;&#xA;You mention that with a fixed rate, the physics wouldn't sync up with the display.  This is true if the target physics rate is near the target frame rate.  It's worse the frame rate is larger than the physics rate.  In general it is better to target a physics update rate of twice your target FPS, if you can afford it.&#xD;&#xA;&#xD;&#xA;If you can't afford a large physics update rate, consider interpolating the graphics' positions between frames to make the drawn graphics appear to move more smoothly than the physics actually moves.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7221" PostHistoryTypeId="2" PostId="3678" RevisionGUID="ca6aff4a-2de5-4c7f-ad7a-dd9c2dd51b67" CreationDate="2010-09-08T17:27:46.150" UserId="93" Text="I haven't used Flash for a very long time, but I do remember it supporting 'tweening' which is where you move each vertex by hand for each keyframe and then Flash generates the inbetween frames. This is esstenially what Disney was doing for decades so of course you can achieve fantastic results with it. The downside is it's very time consuming. Programs like Anime Studio support a 2d version of the skin/bones animation found in 3d applications like Maya. A similar thing is called Puppet Warp in Photoshop CS5. In this you set up a skeleton behind your hand-draw art and then you can just move the skelton to where you like (within limits) and the art move with it, smoothly bending at the joins." />
  <row Id="7222" PostHistoryTypeId="2" PostId="3679" RevisionGUID="eb586a5d-9850-4630-8f2c-53b977704e37" CreationDate="2010-09-08T19:34:44.633" UserId="2075" Text="I have just recently became intrigued by the whole concept of making video games. I am not new to programming, but I am new to the process/requirements/methodologies of programming a video game. I would like to inevitably make games with similar 2d style as POP Caps Plants vs Zombies. Where would one start to do that? I have knowledge in C++, Java, (whole array of web technologies), but I have never done anything as large scale as a game. What language are they programmed in, what technologies/api's are needed? Any help you can give (examples, links, best practices) would be helpful. " />
  <row Id="7223" PostHistoryTypeId="1" PostId="3679" RevisionGUID="eb586a5d-9850-4630-8f2c-53b977704e37" CreationDate="2010-09-08T19:34:44.633" UserId="2075" Text="Plants vs Zombies style game" />
  <row Id="7224" PostHistoryTypeId="3" PostId="3679" RevisionGUID="eb586a5d-9850-4630-8f2c-53b977704e37" CreationDate="2010-09-08T19:34:44.633" UserId="2075" Text="&lt;programming&gt;" />
  <row Id="7225" PostHistoryTypeId="5" PostId="3679" RevisionGUID="346f95cf-2942-4bfa-8750-db101b1bc5d4" CreationDate="2010-09-08T19:45:09.477" UserId="2075" Comment="Added questions." Text="I have just recently became intrigued by the whole concept of making video games. I am not new to programming, but I am new to the process/requirements/methodologies of programming a video game. I would like to inevitably make games with similar 2d style as POP Caps Plants vs Zombies. Where would one start to do that? I have knowledge in C++, Java, (whole array of web technologies), but I have never done anything as large scale as a game. I am left with several questions:&#xD;&#xA;&#xD;&#xA; 1. What languages are needed?&#xD;&#xA; 2. What do I need to learn for the graphics (I know how to use vector and raster editors)?&#xD;&#xA; 3. Is there a common game SDK? If not what tools work the best?" />
  <row Id="7226" PostHistoryTypeId="6" PostId="3679" RevisionGUID="66a61e65-4be1-488f-bd50-1b35e74abbe5" CreationDate="2010-09-08T19:46:04.007" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;programming&gt;&lt;best-practices&gt;" />
  <row Id="7227" PostHistoryTypeId="5" PostId="3679" RevisionGUID="749a1e00-8726-4ce9-8318-c2aa7ea87945" CreationDate="2010-09-08T19:50:27.493" UserId="2075" Comment="Spelling corrections" Text="I have just recently became intrigued by the whole concept of making video games. I am not new to programming, but I am new to the process/requirements/methodologies of programming a video game. I would like to inevitably make games with similar 2d style as POP Caps Plants vs Zombies. Where would one start to do that? I have knowledge in C++, Java, (whole array of web technologies), but I have never done anything as large scale as a game. I am left with several questions:&#xD;&#xA;&#xD;&#xA; 1. What languages are needed?&#xD;&#xA; 2. What do I need to learn for the graphics (I know how to use vector and raster editors)?&#xD;&#xA; 3. Is there a common game SDK? If not what tools work the best?&#xD;&#xA; 4. Any Book recomendations?&#xD;&#xA;&#xD;&#xA;I am a total newb, I just need to know what it entails so I can dig up what I need." />
  <row Id="7228" PostHistoryTypeId="2" PostId="3680" RevisionGUID="0c092830-c40c-4c3a-8a30-b59b855f8c82" CreationDate="2010-09-08T19:59:43.180" UserId="360" Text="[AntTweakBar][1] is really useful for what you want to do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.antisphere.com/Wiki/tools:anttweakbar" />
  <row Id="7229" PostHistoryTypeId="5" PostId="3680" RevisionGUID="78d31a69-dd22-45c1-9324-27bd094734fa" CreationDate="2010-09-08T20:06:35.667" UserId="360" Comment="added 115 characters in body" Text="[AntTweakBar][1] is really useful for what you want to do, however, most of the time, you'd want to have methods that 'compile away' in release with some macros or similar. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.antisphere.com/Wiki/tools:anttweakbar" />
  <row Id="7230" PostHistoryTypeId="2" PostId="3681" RevisionGUID="e1273a91-9366-456e-82ac-eff57fa30d60" CreationDate="2010-09-08T20:21:57.943" UserId="1288" Text="I'd say it's a two-step process for us:&#xD;&#xA;&#xD;&#xA; - **Establish the game's goals.**&#xD;&#xA; - **Determine which features help us reach these goals.**&#xD;&#xA;&#xD;&#xA;The feature list is long enough when those two points match up. So:&#xD;&#xA;&#xD;&#xA;**1. Establish our goals** -- Figure out all the things that we want the game to do for the player/reviewer/whomever, then state them measurably. For example, with our latest ([see alpha test vid here][1]), we want to do these:&#xD;&#xA;&#xD;&#xA; - **Visuals:** We want every review to mention that the visuals are unusual and sexy, especially for an indie title. This is important to us because gamers often use their eyes as a quick metric of quality (though, of course, it's just one of many!), and we want that to draw them in.&#xD;&#xA; - **Exploration:** We also want to reward folks for exploring the game. To put that measurably, we want something around a fifth of the player's game time is spent doing neat little things outside the core gameplay. This is important to us because (IMO), much of the delight of a game comes outside of expected, core areas (we think about how clicking on pieces in Starcraft amuses us).&#xD;&#xA; - **Community:** We want everyone to tell at least one friend about the game.&#xD;&#xA;&#xD;&#xA;**2. Determine features that help us reach those goals** -- These almost fall naturally out of the above. So, the features that correspond to the above examples might look like this:&#xD;&#xA;&#xD;&#xA; - **Visuals:** As a small studio, if we want sexy visuals, we can't go up against EA or Sony on realism. So to approach the goal of remarkable visuals, one of the game's features is a surreal aesthetic. (From this, we're able to determine which tools we need, and so forth.)&#xD;&#xA; - **Exploration:** Tidbits corollary to the game's action fall out of this. In our [most recent title][2], we dropped a quick reference to [Ryo's questionable search for sailors in Shenmue][3]. It was a silly throwaway, but people liked and talked about it!&#xD;&#xA; - **Community:** We're asking ourselves all the ways to make a game worth mentioning to a friend. Making it fun is #1, of course. But we could also reward the players with a special item or level if they tweet about it. Pokemon made it worth while to have friends pick up the game -- there are some critters you could only get by interfacing with other people.&#xD;&#xA;&#xD;&#xA;When we go through this process, it helps us determine:&#xD;&#xA;&#xD;&#xA;- How much we need to implement for a minimum viable product ([MVP][4]).&#xD;&#xA;- What's most important, what can wait, and what we can drop altogether.&#xD;&#xA;- When we finally have all the features we need.&#xD;&#xA;&#xD;&#xA;It's worth noting that we don't slavishly stick to these rules! More often than not, some awesomely interesting things come about as a result of mid-project prototyping and just general futzing around. Especially for small games such as ours.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=k6L8li9p5kw&#xD;&#xA;  [2]: http://dejobaan.com/aaaaa&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=5IUQ1EEoFeg&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Minimum_viable_product" />
  <row Id="7231" PostHistoryTypeId="2" PostId="3682" RevisionGUID="d9c2ba46-487c-4d2b-aa33-1616c267da32" CreationDate="2010-09-08T20:28:34.787" UserId="1156" Text="When you run out of paper to write it on.&#xD;&#xA;&#xD;&#xA;The definite limit is going to be the media size; you can't fit 10GB of features on a 4.7GB DVD, for example.&#xD;&#xA;&#xD;&#xA;You don't want too many features as to overcomplicate the game, either. The best way is to wonder 'is this going to be significantly fun for the player? is it going to eat into our development time too much? is this even possible?'" />
  <row Id="7232" PostHistoryTypeId="2" PostId="3683" RevisionGUID="61ea3ecf-24b4-4707-b430-b87e289a7181" CreationDate="2010-09-08T20:43:43.290" UserId="1780" Text="&gt; Perfection is achieved, not when there is nothing more to add, but when there&#xD;&#xA;&gt; is nothing left to take away.&#xD;&#xA;&gt;&#xD;&#xA;&gt; -- Antoine de Saint-Exupery" />
  <row Id="7233" PostHistoryTypeId="2" PostId="3684" RevisionGUID="73497916-4343-4727-a6f5-ecb8dc60a4eb" CreationDate="2010-09-08T20:46:00.783" UserId="400" Text="It depends what type of game you are interested in writing. &#xD;&#xA;I've used ruby to write AI clients for several games, including [Diplomacy][2], poker, and [Lost Cities][1].  I find it's a very friendly language for quickly experimenting with different concepts.  On the other hand, I wouldn't want to use it to write my real-time shooter - it just won't have the performance I need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rubyquiz.com/quiz51.html&#xD;&#xA;  [2]: http://www.daide.org.uk/index.xml" />
  <row Id="7234" PostHistoryTypeId="2" PostId="3685" RevisionGUID="6766df05-1114-4886-bc0c-b571f389b3a3" CreationDate="2010-09-08T20:54:10.090" UserId="2022" Text="1. Lots of languages can be used to write simple 2D games like Plants vs Zombies, so it's really down to personal preference.  As you know C++ and Java already, I'd maybe stick to one of those.  Java has libraries like [Slick][1] which you may find useful (I've not used it myself).  Seeing as you know Java it also wouldn't be too much of a learning curve to get into C# and use the [XNA][2] framework as well.&#xD;&#xA;&#xD;&#xA;2. 2D games tend to use [Sprite][3] based graphics, so generally tools like Paint Shop Pro, Photoshop or specialist editors like [Pro Motion][4] are used.  There's no reason you can't use vector editors like Inkscape or Illustrator though and export in a format suited to sprite use (PNG for example).&#xD;&#xA;&#xD;&#xA;3. There's a huge variety of very good libraries and frameworks out there, the aforementioned Slick for Java, [Angel Engine][5] for C++.  I'd have a look at the APIs for a few (when you decide on a language) and see which ones suit your coding style and platform requirements the best.&#xD;&#xA;&#xD;&#xA;4. I quite liked [Game Coding Complete, Third Edition][6] which covers a lot of the basic requirements for a game engine in detail, and is also C++ based.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/&#xD;&#xA;  [2]: http://creators.xna.com&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Sprite_%28computer_graphics%29&#xD;&#xA;  [4]: http://www.cosmigo.com/promotion/index.php&#xD;&#xA;  [5]: http://code.google.com/p/angel-engine/&#xD;&#xA;  [6]: http://www.amazon.co.uk/Game-Coding-Complete-Mike-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1283977919&amp;sr=8-1" />
  <row Id="7235" PostHistoryTypeId="2" PostId="3686" RevisionGUID="7ff19ad1-d2ee-4f6f-b43e-6d24d828a0e5" CreationDate="2010-09-08T21:01:11.833" UserId="741" Text="I believe that you're missing consideration of both rotational momentum, and acceleration. See the answer by Danik on [your other question][1].&#xD;&#xA;&#xD;&#xA;The impact imparts a frictional force to the surface of the ball in a particular direction, tangential to the ball's surface. That force, combined with the ball's momentum, can be used to determine the rotational acceleration in the direction of the impact vector. If the ball is already spinning, that acceleration is going to act against whatever rotational velocity is already present.&#xD;&#xA;&#xD;&#xA;In certain cases (perfectly rigid balls, instantaneous collisions) the rotational velocity is roughly equivalent to the force * some fudge factor. But for more correct simulations (ball deforms, contact time during which the force is applied is non-zero), you're modelling acceleration against the mass/momentum of the ball to determine the velocity delta over time.&#xD;&#xA;&#xD;&#xA;That's for rotational velocity changes. To model how the initial rotation of the ball pre-collision affects the output velocity, again you're modelling the force acting on the surface of the ball. &#xD;&#xA;&#xD;&#xA;E.g.: A ball spinning to the left impacting on a surface travelling straight ahead, the surface acts against the ball, so the left-hand spin is reduced (will tend towards a forward spin instead). But similarly, the ball acts against the surface, imparting a force against the ball, changing the output velocity so the ball skews to the left as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2472/how-to-calculate-the-rotation-resulting-from-ball-bounce" />
  <row Id="7236" PostHistoryTypeId="5" PostId="3586" RevisionGUID="4ecadb0f-7e7b-495d-8502-f5e23914ab47" CreationDate="2010-09-08T22:45:29.437" UserId="189" Comment="added SFML" Text="I have no preference towards Ruby (or Python), I'm a Java person myself. But UnknownDevice's answer about how Ruby is somehow &quot;not really for games&quot; and Python is, frustrated me. I do hope he will clarify.&#xD;&#xA;&#xD;&#xA;I know Pygame exists and has been around, and I recognize that Python has a larger userbase than Ruby. But to be honest, neither of them seems like a language &quot;for games&quot;. Neither does Java, and that's my game programming language of choice. (and when I say &quot;of choice&quot;, I do mean **by choice**, not because it's what's taught in school or because it's something I &quot;know&quot;). And really, what is a language &quot;for games&quot;? Well, speed is a factor, and obviously it must have libraries for graphics and other game systems (audio, input, etc).&#xD;&#xA;&#xD;&#xA;As far as speed goes, it seems to be a tossup between Ruby and Python. Do some searches and you'll quickly find benchmarks and arguments for both sides of the spectrum, and various configurations which put one or the other ahead. Python with something called &quot;Psycho&quot; seems a popular speed demon compared to Ruby, yet regular Python seems to be a bit slower than Ruby. In the end, if you're choosing such a high-level language you're obviously not concerned with native speeds anyway; go with the language you know best. And obviously you know Ruby best, so I encourage it!&#xD;&#xA;&#xD;&#xA;The other factor is whether the technology is there to create games; whether it can support drawing to the screen and collecting input and playing audio. Ruby can do all of these. In fact there are a good number of options in this respect. There's a [ruby-opengl][1] package at RubyForge which will give OpenGL support to Ruby (or it might be included by default?). Alternatively, [Chingu][2] provides &quot;lightning fast OpenGL accelerated 2D graphics!&quot; according to its homepage; it builds extra features on top of [Gosu][3], which you could choose to use if Chingu is too much for you. Or for 3D graphics, if you don't want to use ruby-opengl, try [G3DRuby][4], &quot;a very clean set of wrapper classes for many of the more advanced OpenGL features&quot;. There's even [Rubygame][5], which I can't find much information on but it claims to be &quot;a cross-platform multimedia library&quot; and given the name, must have emphasis on game development. If you are familiar with the popular [SDL][6] library for C++, there's [Ruby/SDL][7] or [RUDL][8], both of which are Ruby wrappers of SDL. Or if you prefer the newer, more object-oriented [SFML][9], it is also available for Ruby!&#xD;&#xA;&#xD;&#xA;There is no reason that Ruby should be less of a game programming language than Python; if there is one, I'd really like to hear it so I can argue against it. **If you feel most comfortable programming in Ruby, and you are aware of the pros and cons compared to other popular languages, then by all means you can certainly develop games in Ruby!**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ruby-opengl.rubyforge.org/&#xD;&#xA;  [2]: http://ippa.se/chingu&#xD;&#xA;  [3]: http://www.libgosu.org/&#xD;&#xA;  [4]: http://g3d-ruby.rubyforge.org/&#xD;&#xA;  [5]: http://rubygame.org/&#xD;&#xA;  [6]: http://www.libsdl.org/&#xD;&#xA;  [7]: http://www.kmc.gr.jp/~ohai/rubysdl.en.html&#xD;&#xA;  [8]: http://sourceforge.net/projects/rudl/&#xD;&#xA;  [9]: http://www.sfml-dev.org/" />
  <row Id="7237" PostHistoryTypeId="5" PostId="3670" RevisionGUID="cb6f2c1a-e842-443e-a536-e9f885f082af" CreationDate="2010-09-08T22:47:59.290" UserId="189" Comment="added subscripts" Text="Hey all, I am trying to take into consideration the effect of inertia of the initial rotation of a ball, hitting a surface, into the exit velocity vector of the ball.&#xD;&#xA;&#xD;&#xA;My current theory is this:&#xD;&#xA;&#xD;&#xA; 1. Assume Ball initial rotation is **R&lt;sub&gt;i&lt;/sub&gt;**&#xD;&#xA; 2. Calculate an exit Velocity vector&#xD;&#xA;    without any consideration for the&#xD;&#xA;    ball's initial rotation, call this&#xD;&#xA;    **V&lt;sub&gt;e&lt;/sub&gt;**&#xD;&#xA; 3. Rotate **V&lt;sub&gt;e&lt;/sub&gt;** by an angle proportionate to **R&lt;sub&gt;i&lt;/sub&gt;** [while limiting the rotation, so ball new vector does not point *into* surface]. Call this new vector **r&lt;sub&gt;V&lt;sub&gt;e&lt;/sub&gt;&lt;/sub&gt;**&#xD;&#xA; 4. Calculate exit rotation of ball, by calculating it as a portion of max ball rotation speed, bas on angle between **r&lt;sub&gt;V&lt;sub&gt;e&lt;/sub&gt;&lt;/sub&gt;** &amp; **V&lt;sub&gt;i&lt;/sub&gt;** using dot product of these two vectors&#xD;&#xA;&#xD;&#xA;Does this sound right to you? Am I missing something here? Is there an easier way to do this?" />
  <row Id="7238" PostHistoryTypeId="2" PostId="3687" RevisionGUID="ff0a3dd6-d5ae-4a61-adc5-b2a1bec045b9" CreationDate="2010-09-08T23:06:13.060" UserId="370" Text="I like what [Noel][1] proposed on his blog.  A [telnet based variable tweaker][2].  By using telnet he was able to use any telnet client to edit the variables.  Later they built a gui around the protocol.  It seems sufficiently simple, that it probably isn't worth a middleware library but looking at his code might be useful.&#xD;&#xA;&#xD;&#xA;I disagree with his anti-Lua sentiment however.  A remote Lua console just seems awesome.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/&#xD;&#xA;  [2]: http://gamesfromwithin.com/remote-game-editing" />
  <row Id="7239" PostHistoryTypeId="2" PostId="3688" RevisionGUID="0471c8d9-d1e0-439f-9436-aea3c1d02cce" CreationDate="2010-09-08T23:09:42.243" UserId="189" Text="Muttley did a decent job of summarizing answers to your four questions, but you really just need to take a look around the site. Make use of the **search** box in the top right corner of every page:&#xD;&#xA;&#xD;&#xA; 1. a search for [language][1] reveals questions like [&quot;What are the most commonly used programming languages?&quot;][2] (remember, we're on a gamedev site so it is implied that the author means the most common languages *for game development*) and other questions about the use of specific languages for game development; &#xD;&#xA; 2. Not as many good search results for this; feel free to break it into a separate question to get detailed answers about pros and cons of the two types. But both have been used for game development; vector graphics mostly in Flash games (and all 3D meshes are vector-based), and raster (or sprite) graphics for, well, all other 2D games, and 3D textures (the images on 3D models).&#xD;&#xA; 3. A search for [library][3] or [engine][4] reveals many great questions.&#xD;&#xA; 4. A search for [book][5] reveals many great questions, including one asked just yesterday, [&quot;What is a good book to start programming a 2D C++ game?&quot;][6]&#xD;&#xA;&#xD;&#xA;Once you use the advice in the other questions to get started, feel free to ask more specific questions about how to develop very specific parts of your Plants vs Zombies imitation. But **always remember to check if your question has been asked before, and try to keep it to one question per, uh, question.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/search?q=language&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/339/what-are-the-most-commonly-used-programming-languages&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/search?q=library&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/tagged/engine&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/search?q=book&#xD;&#xA;  [6]: http://gamedev.stackexchange.com/questions/3637/what-is-a-good-book-to-start-programming-a-2d-c-game" />
  <row Id="7240" PostHistoryTypeId="2" PostId="3689" RevisionGUID="bcda0da1-8066-4ff6-ad14-88dbc671e797" CreationDate="2010-09-09T00:48:53.117" UserId="81" Text="While I'm not familiar with a lot of the deep spec work surrounding Ruby, Enterbrain created the game making programs RPG Maker VX and RPG Maker XP that use game scripts based off Ruby: http://www.rpgmakerweb.com/&#xD;&#xA;&#xD;&#xA;This was actually my first dive into the language. As most people said, you probably won't get the high performance of other languages, but if you're looking to start a 2D RPG (or other 2D game, really), it's probably one of the most sophisticated game editors out there to help. " />
  <row Id="7241" PostHistoryTypeId="10" PostId="3679" RevisionGUID="e50c293f-1aed-483f-937d-14f58812e580" CreationDate="2010-09-09T02:59:30.683" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:1780,&quot;DisplayName&quot;:&quot;dash-tom-bang&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="7242" PostHistoryTypeId="2" PostId="3690" RevisionGUID="169072a7-a479-44dd-8d67-8f18d9c6dd03" CreationDate="2010-09-09T04:08:54.020" UserId="1966" Text="I'm a &lt;a href=&quot;http://fsharp.net/&quot;&gt;F#&lt;/a&gt; user. What library should I use to develop games (2D and/or 3D) in F# and being cross-platform? Like how &lt;a href=&quot;http://processing.org&quot;&gt;Processing&lt;/a&gt; is.&#xD;&#xA;&#xD;&#xA;Don't answer DirectX or WPF or other things that are &quot;too .NET&quot; because they are not cross-platform.&#xD;&#xA;&#xD;&#xA;Show me a library suggestion and a code example and a link to help me to get started in your answer." />
  <row Id="7243" PostHistoryTypeId="1" PostId="3690" RevisionGUID="169072a7-a479-44dd-8d67-8f18d9c6dd03" CreationDate="2010-09-09T04:08:54.020" UserId="1966" Text="F# Game Development" />
  <row Id="7244" PostHistoryTypeId="3" PostId="3690" RevisionGUID="169072a7-a479-44dd-8d67-8f18d9c6dd03" CreationDate="2010-09-09T04:08:54.020" UserId="1966" Text="&lt;cross-platform&gt;" />
  <row Id="7245" PostHistoryTypeId="2" PostId="3691" RevisionGUID="612a4bd3-65d7-4ca2-8be5-b3699937b58b" CreationDate="2010-09-09T04:22:01.393" UserId="1004" Text="For developing a web game, i'd actually recommend learning [HaXe](http://haxe.org/). It has much friendlier syntax than ActionScript, as well as many more features you'll likely want (generics, automatic performance optimization, extra useful libraries, etc.). As Alex pointed out, FlashDevelop is a great tool to use and seems to be quite capable." />
  <row Id="7246" PostHistoryTypeId="2" PostId="3692" RevisionGUID="efcbe14b-1b2a-4d07-8e81-4e2a40e858d8" CreationDate="2010-09-09T05:20:41.500" UserId="1505" Text="[OpenTK][1] has OpenGL and OpenGL ES bindings and works well with F# on .NET and Mono&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opentk.com/" />
  <row Id="7247" PostHistoryTypeId="6" PostId="3690" RevisionGUID="eb970af2-186e-41b4-af03-70811bb2462f" CreationDate="2010-09-09T09:10:20.297" UserId="744" Comment="edited tags" Text="&lt;cross-platform&gt;&lt;.net&gt;" />
  <row Id="7250" PostHistoryTypeId="2" PostId="3694" RevisionGUID="5058fa61-6c31-4107-9868-94c472bf034a" CreationDate="2010-09-09T11:24:45.643" UserId="2079" Text="I'm trying to produce a shader to replicate a white plastic object with a colored light inside. Either by having a shader that will be translucent and if I put a light inside the object the light will show through or by having a shader that fakes the effect of a light inside.&#xD;&#xA;&#xD;&#xA;The effect im going for is kinda like a light going through a lamp shade similar to these pictures:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;![alt text][2]&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Ideally I would be able to control the strength and colour of the light to get it to pulse and rotate through some nice bright fluro colours&#xD;&#xA;&#xD;&#xA;Though I'm not sure where to start! &#xD;&#xA;&#xD;&#xA;My question is does anyone know the techniques I should be researching to be able to produce such a shader or have an example of the same/similar shader I can use as a starting point? Or even if you want to provide a shader that might do the job&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FPyzF.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/YAPyT.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/uknxS.jpg" />
  <row Id="7251" PostHistoryTypeId="1" PostId="3694" RevisionGUID="5058fa61-6c31-4107-9868-94c472bf034a" CreationDate="2010-09-09T11:24:45.643" UserId="2079" Text="HLSL Translucent Plastic Shader" />
  <row Id="7252" PostHistoryTypeId="3" PostId="3694" RevisionGUID="5058fa61-6c31-4107-9868-94c472bf034a" CreationDate="2010-09-09T11:24:45.643" UserId="2079" Text="&lt;graphics&gt;&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="7253" PostHistoryTypeId="5" PostId="3667" RevisionGUID="30813c5c-4dd7-4af8-8663-46b4bcb46fb2" CreationDate="2010-09-09T12:47:15.097" UserId="1887" Comment="added 877 characters in body" Text="Maybe the idea of [Tweakable Constants][1] fit your needs. It is so usable in fact that you'd *think* you would need a complex solution to have an effective run-time variables control, but in reality the implementation is almost too simple. The [original discussion][2] of this technique is also an interesting read.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;    glClearColor( H(1.0f), H(1.0f), H(1.0f), H(1.0f) );&#xD;&#xA;&#xD;&#xA;The `H` macro expands to something like `HotValue(x, __FILE__, __LINE__, __COUNTER__)`. This registers the value to some global registry. Then have a function like `RefreshHotValues()` that you call at regular intervals. The function looks up each entry in the registry, parses the specific source file and reloads the hot value.&#xD;&#xA;&#xD;&#xA;As you modify the actual source code, you have persistence right there.&#xD;&#xA;&#xD;&#xA;Obviously this will not work where `H()` is not evaluated every frame, but there are ways to solve this as [discussed here][2].&#xD;&#xA;&#xD;&#xA;You could expand on this idea to a socket-based solution, perhaps. There could be a significant performance overhead to call `HotValue()` every frame, but as you very easily can compile out the macro completely replacing it with the constant this is not an issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/snippets/features/tweakVal/&#xD;&#xA;  [2]: https://mollyrocket.com/forums/viewtopic.php?p=3355" />
  <row Id="7254" PostHistoryTypeId="2" PostId="3695" RevisionGUID="d350eb38-6dd6-4c5d-8f11-9ee8ae3961e1" CreationDate="2010-09-09T14:39:09.193" UserId="1025" Text="I'm in the middle of planning a game built using JavaScript and HTML5.  &#xD;&#xA;&#xD;&#xA;I'm having trouble understanding how you could prevent someone from simply copying the JavaScript from the web server and either making their own game with it (not my biggest concern), or substituting their own JavaScript functions and dashing any hope for reliable clients in the wild if the game was to eventually support multiplayer.&#xD;&#xA;&#xD;&#xA;Can anything be done to prevent just anybody from reading the JavaScript?  &#xD;&#xA;&#xD;&#xA;If not, should all game processing be taking place on a server somewhere with the client's only responsibilities being capturing user input and drawing graphics?  " />
  <row Id="7255" PostHistoryTypeId="1" PostId="3695" RevisionGUID="d350eb38-6dd6-4c5d-8f11-9ee8ae3961e1" CreationDate="2010-09-09T14:39:09.193" UserId="1025" Text="How do you prevent your JavaScript / HTML5 web game from being copied or altered?" />
  <row Id="7256" PostHistoryTypeId="3" PostId="3695" RevisionGUID="d350eb38-6dd6-4c5d-8f11-9ee8ae3961e1" CreationDate="2010-09-09T14:39:09.193" UserId="1025" Text="&lt;html5&gt;&lt;javascript&gt;&lt;client-server&gt;" />
  <row Id="7257" PostHistoryTypeId="2" PostId="3696" RevisionGUID="c0dc8e14-a884-474c-94c7-4d71fbcbe989" CreationDate="2010-09-09T14:40:10.373" UserId="1101" Text="&gt; Obviously I will need to store (where?/how?) two copies of game state information relevant to my renderer, so that it may interpolate between them.&#xD;&#xA;&#xD;&#xA;Yes, thankfully the key here is &quot;relevant to my renderer&quot;. This might be no more than adding an an old position and a timestamp for it into the mix. Given 2 positions you can interpolate to a position between them, and if you have a 3D animation system you can typically just request the pose at that precise point in time anyway.&#xD;&#xA;&#xD;&#xA;It's quite simple really - imagine your renderer has to be able to render your game object. It used to ask the object what it looks like, but now it has to ask it what it looked like at a certain time. You just need to store whatever information is necessary to answer that question.&#xD;&#xA;&#xD;&#xA;&gt; Additionally - this seems like a good place to add threading. I imagine that an update thread could work on a third copy of the game state, leaving the other two copies as read-only for the render thread. (Is this a good idea?)&#xD;&#xA;&#xD;&#xA;It just sounds like a recipe for added pain at this point. I haven't thought through the whole implications but I'm guessing you might gain a small bit of extra throughput at the cost of higher latency. Oh, and you may get some benefits from being able to use another core, but I dunno." />
  <row Id="7258" PostHistoryTypeId="5" PostId="3694" RevisionGUID="799b91c4-e6ba-4f71-959a-456445dd36b7" CreationDate="2010-09-09T14:40:23.507" UserId="14" Comment="deleted 7 characters in body" Text="I'm trying to produce a shader to replicate a white plastic object with a colored light inside. Either by having a shader that will be translucent and if I put a light inside the object the light will show through or by having a shader that fakes the effect of a light inside.&#xD;&#xA;&#xD;&#xA;The effect im going for is kinda like a light going through a lamp shade similar to these pictures:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;![alt text][2]&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Ideally I would be able to control the strength and colour of the light to get it to pulse and rotate through some nice bright fluro colours&#xD;&#xA;&#xD;&#xA;Though I'm not sure where to start! &#xD;&#xA;&#xD;&#xA;My question is does anyone know the techniques I should be researching to be able to produce such a shader or have an example of the same/similar shader I can use as a starting point? Or even if you want to provide a shader that might do the job&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FPyzF.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/YAPyT.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/uknxS.jpg" />
  <row Id="7259" PostHistoryTypeId="5" PostId="3631" RevisionGUID="6b7458f2-9c5d-4c55-8c67-9d2f96f0a521" CreationDate="2010-09-09T14:56:00.783" UserId="1742" Comment="further clarification" Text="Most companies have an editor, or a variable control system for tweaking stuff in games, but are there any middleware solutions to this problem? I've written two such systems in the past myself, and worked with five, maybe six different ones, but none of them were off the shelf.&#xD;&#xA;&#xD;&#xA;Each of these home grown solutions had problems, ranging from having to keep looking up values, to not being able to save the current state of the variables.&#xD;&#xA;&#xD;&#xA;Are there any mature Config/Runtime-variable control libraries/apps?&#xD;&#xA;&#xD;&#xA;I generally code in C++, but I would think that a mature settings/variables editor would probably be socket based (and therefore language agnostic to some extent) as all current development hardware apart from Nintendo stuff provides a mechanism to talk to servers. The code implementation would also need to be quite simple (I do like the hot_var/TweakableConstants article shared by Oskar, but it's not a package)&#xD;&#xA;" />
  <row Id="7260" PostHistoryTypeId="2" PostId="3697" RevisionGUID="15040980-c53b-43bc-8ef0-cfcf38fb89da" CreationDate="2010-09-09T15:05:49.000" UserId="1853" Text="Keep all your game data and logics on the server. Part of the game which is on the client side can be copied using appropriate tools anyway (even if it's in Flash or Java), so just accept it and don't care too much about it.&#xD;&#xA;&#xD;&#xA;To keep your javascript less copyable, because of bad readability, you can [minify it][1]. That's a good practice anyway as it makes the gaming site download faster.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.maxkiesler.com/2007/11/04/how-to-minimize-your-javascript-and-css-files-for-faster-page-loads/" />
  <row Id="7261" PostHistoryTypeId="2" PostId="3698" RevisionGUID="68aaa034-b9a9-4405-a3e9-8b56b384fb49" CreationDate="2010-09-09T15:24:22.617" UserId="316" Text="I'm in the process of developing and releasing an iOS game, and have found that it just won't run on an iPhone 3G (don't even ask about a 2G) for many reasons.  Primarily, the number of sprites and sounds needed for each level continually cause low memory crashes.  I've already pared it down to the bare minimum and strategically load/unload resources as needed, but some items need to be cached so they can be activated quickly.  My last resort (which I'm trying to avoid) is to make lower quality versions of all audio.  Graphics are already packed tightly into sprite sheets.&#xD;&#xA;&#xD;&#xA;The game runs wonderfully on an iPhone 4 and iPad, and even performs nicely on a 3GS.  Should I be concerned about no support for older devices? " />
  <row Id="7262" PostHistoryTypeId="1" PostId="3698" RevisionGUID="68aaa034-b9a9-4405-a3e9-8b56b384fb49" CreationDate="2010-09-09T15:24:22.617" UserId="316" Text="How much longer should I support iPhone 3G?" />
  <row Id="7263" PostHistoryTypeId="3" PostId="3698" RevisionGUID="68aaa034-b9a9-4405-a3e9-8b56b384fb49" CreationDate="2010-09-09T15:24:22.617" UserId="316" Text="&lt;iphone&gt;&lt;support&gt;" />
  <row Id="7264" PostHistoryTypeId="2" PostId="3699" RevisionGUID="fe6b6e08-56eb-4f85-a135-bf20a8b5817e" CreationDate="2010-09-09T16:03:39.613" UserId="1742" Text="Not a software project, but a documentation one:&#xD;&#xA;&#xD;&#xA;A game technical quality checklist (like trcs or tcrs)&#xD;&#xA;&#xD;&#xA;Many a time the design of a production game has been affected by these quite important documents. Indie games need them as much as professional games developers do, as it's at least a simple assurance that you've done a reasonable job." />
  <row Id="7265" PostHistoryTypeId="16" PostId="3699" RevisionGUID="fe6b6e08-56eb-4f85-a135-bf20a8b5817e" CreationDate="2010-09-09T16:03:39.613" UserId="-1" />
  <row Id="7266" PostHistoryTypeId="2" PostId="3700" RevisionGUID="35d7f29b-8705-498b-98f4-47400ded43b7" CreationDate="2010-09-09T16:20:09.203" UserId="1156" Text="There's older devices, and then older devices.&#xD;&#xA;&#xD;&#xA;Something like the iPhone 1G, maybe even extending to the 2G, is/are obviously not capable to do what the 4G is. There are few users on these, and you're only missing a very small amount of users.&#xD;&#xA;&#xD;&#xA;However, the iPhone 4 hasn't been out more than a few months. There's the few phone obsessed people, 'omg its new and better', and the geeks that upgrade whenever, as Nate Bross said. I'm still running on a 3rd gen iPod Touch (not exactly an iPhone, but close enough to it with a wifi signal).I know a good few people who still have 2G models.&#xD;&#xA;&#xD;&#xA;You've got to choose between trying to reduce memory usage even more, and missing out on the significant proportion of users who don't upgrade." />
  <row Id="7267" PostHistoryTypeId="5" PostId="2244" RevisionGUID="8ea7b9d1-b4bd-4c7b-b57d-3dc409ef0ecd" CreationDate="2010-09-09T16:20:29.810" UserId="1477" Comment="spelling/grammar. the edit is confusing in meaning and i didn't want to accidentally change what was being said so i left it alone." Text="Making games is about bringing &quot;real&quot; life to virtual reality. It is better to know more about real world/universe than less :)..&#xD;&#xA;Math is only tool. And if You are  making a plan, You have to put time for studying  in plans too.&#xD;&#xA;&#xD;&#xA;EDITED: I saw some misunderstanding :).. I think that set of math acquirements what You need to rule, depends on concrete things what You want to describe.&#xD;&#xA;Nobody knows everything. And better way how to do it is. Not to learn everything on beginning, but learn little piece , use, learn, use etc. Then You can do it during development, if You have good plan." />
  <row Id="7271" PostHistoryTypeId="2" PostId="3702" RevisionGUID="2ce32aa8-d73c-41e7-bc9c-df097e6343a4" CreationDate="2010-09-09T16:23:00.283" UserId="93" Text="I believe most developers will continue to support the 3G (and the similar spec iPod Touch 2nd Gen) until iOS5 is released in which it's expected that Apple will drop support for them. &#xD;&#xA;&#xD;&#xA;If you really can't make your game run on a 3G though and you can deal with not selling to 3G owners, it's up to you. I would expect to get a number of 1-star reviews from the inevitable idiots who still buy it even though the description says it doesn't support their device.&#xD;&#xA;&#xD;&#xA;There is an advantage in not supporting devices prior to the 3GS which is that you can use OpenGL ES 2 without having to provide an ES 1.1 fallback rendering path." />
  <row Id="7272" PostHistoryTypeId="5" PostId="3699" RevisionGUID="2bfd1f58-9227-44b6-9c75-f2490da3f8f0" CreationDate="2010-09-09T16:30:03.467" UserId="1742" Comment="adding certification info" Text="Not a software project, but a documentation one:&#xD;&#xA;&#xD;&#xA;A game technical quality checklist (like trcs or tcrs)&#xD;&#xA;&#xD;&#xA;Many a time the design of a production game has been affected by these quite important documents. Indie games need them as much as professional games developers do, as it's at least a simple assurance that you've done a reasonable job.&#xD;&#xA;&#xD;&#xA;There couldn't be a certifying body, but it could be a self certifying thing to start with. &#xD;&#xA;&#xD;&#xA;If the checklist was concise, it could more easily become a generally agreed upon checklist. Once agreed upon, it might then become reasonable for distributors to allow peer review to confirm or deny claims whereupon the information becomes part of the distributors basic information package about items in its store." />
  <row Id="7273" PostHistoryTypeId="2" PostId="3703" RevisionGUID="c3d78390-b512-4fff-8d8d-01ce7b43cab7" CreationDate="2010-09-09T16:32:48.627" UserId="1853" Text="I guess that open service for custom avatar sprites would be useful especially with the growth of online and mobile HTML5-based games. I described the idea [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aaiddennium.com/blog/2010/open-gaming-avatar-service-required/" />
  <row Id="7274" PostHistoryTypeId="16" PostId="3703" RevisionGUID="c3d78390-b512-4fff-8d8d-01ce7b43cab7" CreationDate="2010-09-09T16:32:48.627" UserId="-1" />
  <row Id="7275" PostHistoryTypeId="5" PostId="3699" RevisionGUID="f72a57bb-5b63-4c4a-97a7-b67da524722d" CreationDate="2010-09-09T16:38:02.250" UserId="1742" Comment="tarted up and added a prime candidate location" Text="Not a software project, but a documentation one:&#xD;&#xA;&#xD;&#xA;**A game technical quality checklist** (like trcs or tcrs)&#xD;&#xA;&#xD;&#xA;Many a time the design of a production game has been affected by these quite important documents. Indie games need them as much as professional games developers do, as it's at least a simple assurance that you've done a reasonable job.&#xD;&#xA;&#xD;&#xA;**Certification**&#xD;&#xA;&#xD;&#xA;There couldn't be a certifying body, but it could be a self certifying thing to start with. &#xD;&#xA;&#xD;&#xA;If the checklist was concise, it could more easily become a generally agreed upon checklist. Once agreed upon, it might then become reasonable for distributors to allow peer review to confirm or deny claims whereupon the information becomes part of the distributors basic information package about items in its store.&#xD;&#xA;&#xD;&#xA;**Location**&#xD;&#xA;&#xD;&#xA;Why not start one on the game dev wiki... http://wiki.gamedev.net/index.php/Main_Page&#xD;&#xA;?" />
  <row Id="7277" PostHistoryTypeId="2" PostId="3705" RevisionGUID="b1264682-2a97-4357-bbb3-f90d96fe1176" CreationDate="2010-09-09T17:40:22.607" UserId="2083" Text="Hey guys, I'm not sure if this is the right place to ask, but I'm also not sure where else to ask.  I have a 3D model in Solidworks that is imported from a STL file.  Solidworks imports the file multiple triangular faces and as either a solid, or a surface.  See pic below:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;What I need to do is take the model and have it be hollow but with a thickness, not that big.  Also it would help to have the surface be one smooth surface since I will be imported it to another program, ADINA.  Any ideas or suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/8VzwL.png" />
  <row Id="7278" PostHistoryTypeId="1" PostId="3705" RevisionGUID="b1264682-2a97-4357-bbb3-f90d96fe1176" CreationDate="2010-09-09T17:40:22.607" UserId="2083" Text="Solidworks (3D model) import help" />
  <row Id="7279" PostHistoryTypeId="3" PostId="3705" RevisionGUID="b1264682-2a97-4357-bbb3-f90d96fe1176" CreationDate="2010-09-09T17:40:22.607" UserId="2083" Text="&lt;3d&gt;&lt;models&gt;" />
  <row Id="7280" PostHistoryTypeId="6" PostId="3705" RevisionGUID="5e02feb1-c55a-4b89-a226-23d9f8f7b741" CreationDate="2010-09-09T17:43:11.087" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;models&gt;" />
  <row Id="7281" PostHistoryTypeId="2" PostId="3706" RevisionGUID="0625b6c2-16ae-41f6-a6a2-835baddb2f6c" CreationDate="2010-09-09T18:07:09.700" UserId="539" Text="You need to use a Javascript Minifier. There are many options available feel free to find one that you like. To save you some research here's one you could try [Yahoo Minifier](http://developer.yahoo.com/yui/compressor/). I haven't run that myself but I assume it will do what you need. The goal is to 1) reduce file size and 2) obfuscate code. This is accomplished by removing all whitespace, comments, and replacing variable names with shorter, nonsensical ones. &#xD;&#xA;&#xD;&#xA;Most web applications today have a significant amount of Javascript and use tools such as these to try to protect their IP. As others have said you should always ask, &quot;Can I do this on the server?&quot; for important or sensitive operations, but I believe this should offer some protection." />
  <row Id="7282" PostHistoryTypeId="2" PostId="3707" RevisionGUID="a0b5d799-37ee-41ed-bd93-507086228a1d" CreationDate="2010-09-09T18:29:45.393" UserId="89" Text="I'm currently a PacMan clone as my first ever game with the XNA Game Studio before eventually going to DirectX. &#xD;&#xA;&#xD;&#xA;As a first ever game, lots of things have given me great headaches, especially collision detection with the walls.&#xD;&#xA;&#xD;&#xA;The problem I have now is the &quot;AI&quot; I have implemented for the ghosts. It's wish-wash, really. The basic method is that, if the Ghost runs into a corner, it will change its speed vector, and ultimately its direction. &#xD;&#xA;&#xD;&#xA;However, the seed seems to be giving me the same pattern. If I launch them from the same corner multiple times, they keep taking the same direction. They have only rarely ever not taken the same route before getting stuck.&#xD;&#xA;&#xD;&#xA;I'm not sure how much code can be posted here, but this is my current algorithm. Beware, it's not very pretty at the moment. It was implemented just to see if it's viable. Now I just want it to work properly before refactoring it and making it more intelligent.&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;            // OMG! Is the ghost trying to hit a wall? Ha! No wall-hacking for you!&#xD;&#xA;            if (!wall_.Collides(frameSize_, pos_, direction_))&#xD;&#xA;                pos_ += direction_;&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                // a and b will change speed.&#xD;&#xA;                // if a and b are both 1 (diagonal vector), then c will determine&#xD;&#xA;                // which value a or b shall be taken.&#xD;&#xA;                // d negates the values for reversed direction.&#xD;&#xA;                Random rand = new Random();&#xD;&#xA;                int a, b, c, d;&#xD;&#xA;                a = b = 0;&#xD;&#xA;                while (0 == a &amp;&amp; 0 == b)&#xD;&#xA;                {&#xD;&#xA;                    a = rand.Next(2);&#xD;&#xA;                    b = rand.Next(2);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (1 == a &amp;&amp; 1 == b)&#xD;&#xA;                {&#xD;&#xA;                    c = rand.Next(2);&#xD;&#xA;                    if (0 == c)&#xD;&#xA;                        spd_ = new Vector2(a * 2, 0);&#xD;&#xA;                    else&#xD;&#xA;                        spd_ = new Vector2(0, b * 2);&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    d = rand.Next(2);&#xD;&#xA;                    if (1 == d)&#xD;&#xA;                    {&#xD;&#xA;                        if (1 == a)&#xD;&#xA;                            spd_ = new Vector2(a * 2, 0);&#xD;&#xA;                        else&#xD;&#xA;                            spd_ = new Vector2(0, b * 2);&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        if (1 == a)&#xD;&#xA;                            spd_ = new Vector2(-a * 2, 0);&#xD;&#xA;                        else&#xD;&#xA;                            spd_ = new Vector2(-b * 2, 0);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Addendum: What I also meant to add is that the ghosts get stuck eventually. They stop taking corner with a different direction. I've waited for about 20-40 tries, but they simply reversed direction. This happened repeatedly with several restarts of the game.&#xD;&#xA;" />
  <row Id="7283" PostHistoryTypeId="1" PostId="3707" RevisionGUID="a0b5d799-37ee-41ed-bd93-507086228a1d" CreationDate="2010-09-09T18:29:45.393" UserId="89" Text="Random Ghost Behavior in PacMan Clone Not Random?" />
  <row Id="7284" PostHistoryTypeId="3" PostId="3707" RevisionGUID="a0b5d799-37ee-41ed-bd93-507086228a1d" CreationDate="2010-09-09T18:29:45.393" UserId="89" Text="&lt;random&gt;" />
  <row Id="7285" PostHistoryTypeId="5" PostId="3707" RevisionGUID="917f7407-fe73-4ba2-a42b-b0f5c26afe50" CreationDate="2010-09-09T18:41:24.710" UserId="89" Comment="added 12 characters in body" Text="I'm currently programming a PacMan clone as my first ever game with the XNA Game Studio before eventually going to DirectX. &#xD;&#xA;&#xD;&#xA;As a first ever game, lots of things have given me great headaches, especially collision detection with the walls.&#xD;&#xA;&#xD;&#xA;The problem I have now is the &quot;AI&quot; I have implemented for the ghosts. It's wish-wash, really. The basic method is that, if the Ghost runs into a corner, it will change its speed vector, and ultimately its direction. &#xD;&#xA;&#xD;&#xA;However, the seed seems to be giving me the same pattern. If I launch them from the same corner multiple times, they keep taking the same direction. They have only rarely ever not taken the same route before getting stuck.&#xD;&#xA;&#xD;&#xA;I'm not sure how much code can be posted here, but this is my current algorithm. Beware, it's not very pretty at the moment. It was implemented just to see if it's viable. Now I just want it to work properly before refactoring it and making it more intelligent.&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;            // OMG! Is the ghost trying to hit a wall? Ha! No wall-hacking for you!&#xD;&#xA;            if (!wall_.Collides(frameSize_, pos_, direction_))&#xD;&#xA;                pos_ += direction_;&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                // a and b will change speed.&#xD;&#xA;                // if a and b are both 1 (diagonal vector), then c will determine&#xD;&#xA;                // which value a or b shall be taken.&#xD;&#xA;                // d negates the values for reversed direction.&#xD;&#xA;                Random rand = new Random();&#xD;&#xA;                int a, b, c, d;&#xD;&#xA;                a = b = 0;&#xD;&#xA;                while (0 == a &amp;&amp; 0 == b)&#xD;&#xA;                {&#xD;&#xA;                    a = rand.Next(2);&#xD;&#xA;                    b = rand.Next(2);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (1 == a &amp;&amp; 1 == b)&#xD;&#xA;                {&#xD;&#xA;                    c = rand.Next(2);&#xD;&#xA;                    if (0 == c)&#xD;&#xA;                        spd_ = new Vector2(a * 2, 0);&#xD;&#xA;                    else&#xD;&#xA;                        spd_ = new Vector2(0, b * 2);&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    d = rand.Next(2);&#xD;&#xA;                    if (1 == d)&#xD;&#xA;                    {&#xD;&#xA;                        if (1 == a)&#xD;&#xA;                            spd_ = new Vector2(a * 2, 0);&#xD;&#xA;                        else&#xD;&#xA;                            spd_ = new Vector2(0, b * 2);&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        if (1 == a)&#xD;&#xA;                            spd_ = new Vector2(-a * 2, 0);&#xD;&#xA;                        else&#xD;&#xA;                            spd_ = new Vector2(-b * 2, 0);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Addendum: What I also meant to add is that the ghosts get stuck eventually. They stop taking corner with a different direction. I've waited for about 20-40 tries, but they simply reversed direction. This happened repeatedly with several restarts of the game.&#xD;&#xA;" />
  <row Id="7286" PostHistoryTypeId="2" PostId="3708" RevisionGUID="a3520ff0-ac4b-4d17-a00a-7f216c3a2ca4" CreationDate="2010-09-09T18:41:55.973" UserDisplayName="softCoder" Text="I want to ask what is the best way to deal with &quot;mini-states&quot; in game? For example I making game like Simcity, i can build buildings, roads, rails, or I can change something in economy.&#xD;&#xA;I makig something like:&#xD;&#xA;enum&#xD;&#xA;{&#xD;&#xA;ROAD_CONSTRUCT,&#xD;&#xA;BUILDING_CONSTRUCT&#xD;&#xA;VIEW_MAP&#xD;&#xA;etc..&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;and in game loop big switch. But code is getting rise. Is there some solution for all popular languages ? I asking beacouse I writing in C++, AS3 and sometimes in C." />
  <row Id="7287" PostHistoryTypeId="1" PostId="3708" RevisionGUID="a3520ff0-ac4b-4d17-a00a-7f216c3a2ca4" CreationDate="2010-09-09T18:41:55.973" UserDisplayName="softCoder" Text="Deal with mini states in game" />
  <row Id="7288" PostHistoryTypeId="3" PostId="3708" RevisionGUID="a3520ff0-ac4b-4d17-a00a-7f216c3a2ca4" CreationDate="2010-09-09T18:41:55.973" UserDisplayName="softCoder" Text="&lt;architecture&gt;&lt;gameloop&gt;" />
  <row Id="7289" PostHistoryTypeId="2" PostId="3709" RevisionGUID="ec0b8a20-9c32-4a8e-908a-c1c80e52a57e" CreationDate="2010-09-09T18:46:14.480" UserId="744" Text="Break down the probabilities. Work down the tree of your conditionals, figuring out the probabilities at each step.&#xD;&#xA;&#xD;&#xA;There is a 1/3 chance of a == b == 1. Then is a 1/2 chance of (2, 0) and a 1/2 chance of (0, 2), so a 1/6 chance overall of either.&#xD;&#xA;&#xD;&#xA;Within the remaining 2/3 chance, there is a 1/2 chance of d = 1; then either a = 1 and you get (2, 0) or b = 1 and you get (0, 2) with equal probability, 1/2 each. So 2/3 * 1/2 * 1/2 = 1/6 chance each overall.&#xD;&#xA;&#xD;&#xA;Then the same math for d = 0. Either (-2, 0) or (0, -2), 1/6 overall chance of each.&#xD;&#xA;&#xD;&#xA;Summing those, we find there is a total of 1/3 chance for (2, 0), 1/3 chance for (0, 2), 1/6 chance for (-2, 0), and 1/6 chance for (0, -2).&#xD;&#xA;&#xD;&#xA;Since e.g. up/right is now twice as likely as down/left, they will get stuck." />
  <row Id="7290" PostHistoryTypeId="2" PostId="3710" RevisionGUID="bc533bc3-d595-454a-9955-c8e2df95d4c2" CreationDate="2010-09-09T18:55:49.370" UserId="744" Text="This question may be identical to http://gamedev.stackexchange.com/questions/1783/, but I'm not sure what you mean by mini-states.&#xD;&#xA;&#xD;&#xA;My answer to the question (http://gamedev.stackexchange.com/questions/1783/game-state-stack/1785#1785) works regardless of how &quot;important&quot; the state is. When states are sets rather than a single global or stack, you don't have to worry about one state unexpectedly excluding another. If you do want a convenient exclusion mechanism for state sets, you can use e.g. the top eight bits of the enumerated value to enforce state uniqueness. Thus states don't need to explicitly know about other states, but just compare their own masked bits to other active states." />
  <row Id="7291" PostHistoryTypeId="6" PostId="3708" RevisionGUID="79f44b98-f7e6-43bd-9889-a005a378b310" CreationDate="2010-09-09T18:59:20.463" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;state&gt;&lt;gameloop&gt;" />
  <row Id="7292" PostHistoryTypeId="2" PostId="3711" RevisionGUID="30583474-d51e-45aa-97f2-9f83a7bce785" CreationDate="2010-09-09T19:08:37.873" UserId="744" Text="A good Flash player, since Adobe seems uninterested / underfunded in really working on theirs on non-Windows OSs, and the existing implementations are lacking (even e.g. ScaleForm has significant problems being &quot;proper Flash&quot; as designers/artists expect)." />
  <row Id="7293" PostHistoryTypeId="16" PostId="3711" RevisionGUID="30583474-d51e-45aa-97f2-9f83a7bce785" CreationDate="2010-09-09T19:08:37.873" UserId="-1" />
  <row Id="7294" PostHistoryTypeId="2" PostId="3712" RevisionGUID="a0b487bf-b8d9-414a-ba51-f5e70c722635" CreationDate="2010-09-09T19:42:14.423" UserId="2051" Text="Any ideas where I can find info about making 2D jump &amp; run games? I need some general ideas, so I wouldn't reinvent wheel (at least where game design is concerned).&#xD;&#xA;&#xD;&#xA;Another point is that I am thinking of using boxes instead of images for collision testing. However, it should possible that I can implement slopes. Commander Keen 4+ is a good example of my idea.&#xD;&#xA;&#xD;&#xA;Actually, what is troubling me is of course the collision testing and simple physics (mainly gravity).&#xD;&#xA;&#xD;&#xA;I've got to build the engine myself and it for the J2ME.&#xD;&#xA;&#xD;&#xA;Thanks a lot, guys!" />
  <row Id="7295" PostHistoryTypeId="1" PostId="3712" RevisionGUID="a0b487bf-b8d9-414a-ba51-f5e70c722635" CreationDate="2010-09-09T19:42:14.423" UserId="2051" Text="Implementing a 2D Platforme Game Engine" />
  <row Id="7296" PostHistoryTypeId="3" PostId="3712" RevisionGUID="a0b487bf-b8d9-414a-ba51-f5e70c722635" CreationDate="2010-09-09T19:42:14.423" UserId="2051" Text="&lt;engine&gt;&lt;collision-detection&gt;&lt;2d-physics&gt;" />
  <row Id="7297" PostHistoryTypeId="2" PostId="3713" RevisionGUID="08da7807-7438-467c-a3f5-71cef56b089b" CreationDate="2010-09-09T19:54:57.380" UserId="356" Text="Here are some ideas from Sonic games: [Sonic Physics Guide][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://info.sonicretro.org/Sonic_Physics_Guide" />
  <row Id="7299" PostHistoryTypeId="2" PostId="3714" RevisionGUID="71902909-37df-4307-9a91-a902b95961bf" CreationDate="2010-09-09T20:26:46.223" UserId="1924" Text="I don't know HLSL so I can't give an exact answer.&#xD;&#xA;What you basicly can to do is set the color of each fragment depending on the distance from the lightsource (ignoring any self shadowing).&#xD;&#xA;&#xD;&#xA;In pseudocode it would be something like this:&#xD;&#xA;&#xD;&#xA;fragment_color = light_intensity * transparency_color * lightsource_color / (attenuation * distance_to_lightsource^2)&#xD;&#xA;&#xD;&#xA;You might also want to use a linear attenuation factor in addition to the squared to get the light to spread out more." />
  <row Id="7300" PostHistoryTypeId="2" PostId="3715" RevisionGUID="7a030f14-8782-4478-8f2e-ffde2a01c3c6" CreationDate="2010-09-09T20:52:26.693" UserId="454" Text="This is an effect known as &quot;Sub Surface Scattering.&quot;&#xD;&#xA;&#xD;&#xA;There is an example screen space implementation of this in the book &quot;GPU Pro: Advanced Rendering Techniques&quot; that is suitable for real time use." />
  <row Id="7301" PostHistoryTypeId="2" PostId="3716" RevisionGUID="9d178415-786b-4517-a028-eb1a1c2d3ca0" CreationDate="2010-09-09T21:21:44.360" UserId="1780" Text="Your problem is that you are recreating the Random object every time you do your computation.  You should only create one Random object (and assign it to a member variable, for instance) and query it when you want new random values." />
  <row Id="7302" PostHistoryTypeId="5" PostId="2032" RevisionGUID="596a302e-624b-4d4a-9fd3-a56c018fb4b6" CreationDate="2010-09-09T21:24:04.027" UserId="165" Comment="deleted 2 characters in body" Text="[**Binary**][1] and [**Hexadecimal**][2] numbering systems, and how to convert them to/from decimal numbers.&#xD;&#xA;&#xD;&#xA;Although you won't generally need to work with *raw* Binary numbers, they are frequently used for Flag variables, which require [boolean logic][3] and bit-shifting.&#xD;&#xA;&#xD;&#xA;Hex isn't quite as important (unless you want to process [0xDEADBEEF][4]), but at a minimum, you'd want to *recognize* when they're being used, and why.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Boolean_data_type&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Hexadecimal&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Boolean_logic&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Hexspeak" />
  <row Id="7303" PostHistoryTypeId="2" PostId="3717" RevisionGUID="24dbe119-9a2b-4045-bcea-c19dcd2d2af1" CreationDate="2010-09-09T21:50:08.873" UserId="283" Text="I highly recommend including an analytics tool such as Flurry in your app so you can get hard data after launch.  (Apple is not enforcing their ban on Flurry for now).  &#xD;&#xA;&#xD;&#xA;For my game, currently 25% of my sessions are on the 3G, so I wouldn't even think of dropping it right now.  I would highly recommend supporting it.  There are a lot of performance tricks with getting your app to work faster, so keep honing away at it." />
  <row Id="7304" PostHistoryTypeId="5" PostId="3717" RevisionGUID="fd472f79-6255-48c3-930f-e6480551af6d" CreationDate="2010-09-09T21:57:27.530" UserId="744" Comment="Add link." Text="I highly recommend including an analytics tool such as &lt;a href=&quot;http://www.flurry.com/&quot;&gt;Flurry&lt;/a&gt; in your app so you can get hard data after launch.  (Apple is not enforcing their ban on Flurry for now).  &#xD;&#xA;&#xD;&#xA;For my game, currently 25% of my sessions are on the 3G, so I wouldn't even think of dropping it right now.  I would highly recommend supporting it.  There are a lot of performance tricks with getting your app to work faster, so keep honing away at it." />
  <row Id="7305" PostHistoryTypeId="2" PostId="3718" RevisionGUID="a086f532-013e-4527-aaa4-d7c5844b2e55" CreationDate="2010-09-09T22:01:14.747" UserId="452" Text="Besides sines and cosines (which 50-75% of programmers I've met didn't know how to use), learn the magical arc-tan function and how it can be used to get the angle of any vector." />
  <row Id="7306" PostHistoryTypeId="16" PostId="3718" RevisionGUID="a086f532-013e-4527-aaa4-d7c5844b2e55" CreationDate="2010-09-09T22:01:14.747" UserId="-1" />
  <row Id="7307" PostHistoryTypeId="2" PostId="3719" RevisionGUID="5a608153-83d0-4bbb-aa16-2f476ed4e9a7" CreationDate="2010-09-09T22:17:00.457" UserId="1780" Text="I don't know what sort of interface you have available, but my guess is that you want to...&#xD;&#xA;&#xD;&#xA;Copy all of the faces and vertices.  Flip the copied faces' normals.  Move the copied verts (and/or the original verts) along their normals, as far as you need to get the thickness that you desire.&#xD;&#xA;&#xD;&#xA;Otherwise I can't think of what you mean by &quot;thickness&quot; and &quot;hollow,&quot; as presumably this triangle mesh only represents the object's surface and there are no vertices/edges/faces in the interior." />
  <row Id="7308" PostHistoryTypeId="2" PostId="3720" RevisionGUID="3c1c6dac-5d16-4644-b725-0bb51fb809d3" CreationDate="2010-09-09T22:53:03.447" UserId="1966" Text="Understand the dot product:&#xD;&#xA;If two vectors have about same direction, (theta &lt; 90 deg), then the dot product is positive, or else, negative. It can be used to test whenever the player is in sight (assuming FOV is 90 deg).&#xD;&#xA;&#xD;&#xA;And generalize your 2D game to higher dimensions. (use vector calculations)&#xD;&#xA;&#xD;&#xA;If you can implement a 3D engine by yourself, you are good to go." />
  <row Id="7309" PostHistoryTypeId="16" PostId="3720" RevisionGUID="3c1c6dac-5d16-4644-b725-0bb51fb809d3" CreationDate="2010-09-09T22:53:03.447" UserId="-1" />
  <row Id="7310" PostHistoryTypeId="5" PostId="3708" RevisionGUID="25bd6f6b-885e-4f50-93a1-992e915d6244" CreationDate="2010-09-10T00:10:40.810" UserId="160" Comment="added 57 characters in body" Text="I want to ask what is the best way to deal with &quot;mini-states&quot; in game? For example I making game like Simcity, i can build buildings, roads, rails, or I can change something in economy.&#xD;&#xA;I am making something like:&#xD;&#xA;&#xD;&#xA;    enum&#xD;&#xA;    {&#xD;&#xA;      ROAD_CONSTRUCT,&#xD;&#xA;      BUILDING_CONSTRUCT&#xD;&#xA;      VIEW_MAP&#xD;&#xA;      etc..&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and in the game loop big `switch`. But the code is getting big. Is there some solution for all popular languages? I am asking because I am writing in C++, AS3 and sometimes in C.&#xD;&#xA;" />
  <row Id="7311" PostHistoryTypeId="2" PostId="3721" RevisionGUID="c8efb88c-bd14-437c-ac15-de76237e1cd7" CreationDate="2010-09-10T00:14:20.037" UserId="160" Text="In an OOP language, the standard answer is to use polymorphism:&#xD;&#xA;&#xD;&#xA;    // Current game state. Should *not* really be a global var.&#xD;&#xA;    // This is just for demonstration. The current state can be&#xD;&#xA;    // changed by setting this to a new instance of a class that&#xD;&#xA;    // inherits State.&#xD;&#xA;    State * state;&#xD;&#xA;    &#xD;&#xA;    void gameLoop() {&#xD;&#xA;        while (true) {&#xD;&#xA;            state-&gt;update();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class State {&#xD;&#xA;    public:&#xD;&#xA;        virtual void update() = 0;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class ConstructRoadState : public State {&#xD;&#xA;    public:&#xD;&#xA;        virtual void update() {&#xD;&#xA;            // Do stuff...&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Other states...&#xD;&#xA;&#xD;&#xA;In C, you can accomplish the same thing using a callback for the current state." />
  <row Id="7312" PostHistoryTypeId="2" PostId="3722" RevisionGUID="45bbb7a8-c2e7-4a64-b22f-33d4b7d27f59" CreationDate="2010-09-10T01:38:44.943" UserId="51" Text="You can't really not support the 3G without also removing support for the 2nd gen touch (by making the app only run on armv7-supporting devices, for example).  From the analytics from a game we recently released those users are a minority but still a decent percentage of our users.&#xD;&#xA;&#xD;&#xA;The answer to your question, like so many others, is going to fall back to economics of your particular situation.  Are you losing your competitive edge by paring down the design or art resources of the game to work on the 3G?  Are the additional expected sales going to make up the money invested in that expenditure?  If you can answer those questions then the answer is obvious." />
  <row Id="7313" PostHistoryTypeId="2" PostId="3723" RevisionGUID="3c034f27-0467-4291-a47d-1b2e3a223519" CreationDate="2010-09-10T07:58:21.213" UserId="1453" Text="I started using FlashPunk for my first game development project, and so far it has been really slick. It is a Flash library built for game design. It is a bare-bones game engine similar to Flixel, but is more like GameMaker, being more user-friendly to beginners than Flixel. FlashPunk along with the Ogmo Editor make it very efficient to get right to level design without having to spend a lot of time on coding. More info about all three of these can be found at the [Flash Game Dojo][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flashpunk.net/&#xD;&#xA;  [2]: http://mattmakesgames.com/OgmoEditor/&#xD;&#xA;  [3]: http://flashgamedojo.com/" />
  <row Id="7314" PostHistoryTypeId="2" PostId="3724" RevisionGUID="f3e3cebb-c8f8-4dea-a7f2-042a00ed75fa" CreationDate="2010-09-10T08:04:55.663" UserId="1336" Text="The short answer, is Yes, you can definitely make an entire game in Unity3d. Many developers have.&#xD;&#xA;&#xD;&#xA;RE the previous answer: actually, for analytics, this link will take you to a C# integrated google analytics helper for Unity 3D&#xD;&#xA;http://www.persistentrealities.com/code/&#xD;&#xA;&#xD;&#xA;And now with Apple's &quot;Game Center&quot;, you might be able to skip Open Feint integration, though I still prefer Open Feint for now, personally.&#xD;&#xA;" />
  <row Id="7316" PostHistoryTypeId="2" PostId="3725" RevisionGUID="a3b1606e-2c47-4ab3-bada-ff1ab99afafe" CreationDate="2010-09-10T08:32:53.313" UserId="2036" Text="You could always find some simple open source projects that are similar to what you want to build, and see how they structure their project. &lt;br&gt;&#xD;&#xA;Also, there are plenty of tutorials around the web. A few are:&#xD;&#xA;&#xD;&#xA; - [Creating 2D Action Games with the Game API][1]&#xD;&#xA; - [Java Game Development Series][2]&#xD;&#xA; - [Writing Java Games: How we did it][3]&#xD;&#xA; - [Space Invaders 101][4] (this one is good, it goes through creating a simple game)&#xD;&#xA;&#xD;&#xA;If you are looking for a game framework to use, there is a good list at stackoverflow [here][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developers.sun.com/mobility/midp/articles/game/-&#xD;&#xA;  [2]: http://www.javalobby.org/articles/game-programming/&#xD;&#xA;  [3]: http://www.essentialmath.com/JavaGame.pdf&#xD;&#xA;  [4]: http://www.cokeandcode.com/info/tut2d.html&#xD;&#xA;  [5]: http://stackoverflow.com/questions/293079/java-2d-game-frameworks" />
  <row Id="7317" PostHistoryTypeId="2" PostId="3726" RevisionGUID="c9b8914a-8bff-4634-b697-19adb615e701" CreationDate="2010-09-10T08:41:41.590" UserId="999" Text="Graphics driver develpers. Without working graphics drivers other game-related projects are irrelevant.&#xD;&#xA;&#xD;&#xA;AMD and NVIDIA actually do make usable drivers, but I'm talking about open-source drivers. Mesa only supports OpenGL 2.1." />
  <row Id="7318" PostHistoryTypeId="16" PostId="3726" RevisionGUID="c9b8914a-8bff-4634-b697-19adb615e701" CreationDate="2010-09-10T08:41:41.590" UserId="-1" />
  <row Id="7319" PostHistoryTypeId="2" PostId="3727" RevisionGUID="e2bc7e88-3eb9-45ad-8eee-7336156ee7bc" CreationDate="2010-09-10T10:39:46.687" UserDisplayName="Ryan Wiancko" Text="Great lists here.. Glad to see [www.industrybroadcast.com][1] plugged.  Back recording articles again after a nice almost year long hiatus.  The podcast is certainly a bit more dry and serious as the topics covered can get insanely indepth, theoretical and technical.&#xD;&#xA;&#xD;&#xA;Outside of my biased opinion though I have to say A Life Well Wasted tops my list, not just in this genre but of any podcast I have ever listened to.. It is absolutely and purely brilliant&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.industrybroadcast.com&#xD;&#xA;" />
  <row Id="7320" PostHistoryTypeId="16" PostId="3727" RevisionGUID="e2bc7e88-3eb9-45ad-8eee-7336156ee7bc" CreationDate="2010-09-10T10:39:46.687" UserId="-1" />
  <row Id="7321" PostHistoryTypeId="5" PostId="3726" RevisionGUID="87f6a85a-02cd-407c-9a78-a4973d63b9fc" CreationDate="2010-09-10T12:21:56.200" UserId="999" Comment="added 54 characters in body" Text="Graphics driver develpers. Without working graphics drivers other game-related projects are irrelevant.&#xD;&#xA;&#xD;&#xA;AMD and NVIDIA actually do make usable drivers, but I'm talking about open-source drivers. Mesa only supports OpenGL 2.1.&#xD;&#xA;&#xD;&#xA;edit: This answer is only applicable to GNU/Linux." />
  <row Id="7333" PostHistoryTypeId="2" PostId="3733" RevisionGUID="4e2641f8-6d02-459b-918f-1d5fa13c263a" CreationDate="2010-09-10T14:13:30.463" UserId="1336" Text="I prefer to create an EMPTY in blender, that when Unity Imports the .blend file considers a separate object at the position of your EMPTY.&#xD;&#xA;&#xD;&#xA;From there, I would assign the world/global-space location to the stick via &quot;Transform.position&quot; of the EMPTY, of which you could also create separately in Unity itself.&#xD;&#xA;&#xD;&#xA;As long as you're using &quot;Transform.position&quot; in your code, your stick should always be able to position itself at the point of the empty(if you place it in your &quot;public void Update&quot; code section)." />
  <row Id="7334" PostHistoryTypeId="5" PostId="3725" RevisionGUID="dffcc8c7-f900-4cab-ac29-4e8d1fcebccb" CreationDate="2010-09-10T14:13:34.207" UserId="744" Comment="Fix link." Text="You could always find some simple open source projects that are similar to what you want to build, and see how they structure their project. &lt;br&gt;&#xD;&#xA;Also, there are plenty of tutorials around the web. A few are:&#xD;&#xA;&#xD;&#xA; - [Creating 2D Action Games with the Game API][1]&#xD;&#xA; - [Java Game Development Series][2]&#xD;&#xA; - [Writing Java Games: How we did it][3]&#xD;&#xA; - [Space Invaders 101][4] (this one is good, it goes through creating a simple game)&#xD;&#xA;&#xD;&#xA;If you are looking for a game framework to use, there is a good list at stackoverflow [here][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developers.sun.com/mobility/midp/articles/game/&#xD;&#xA;  [2]: http://www.javalobby.org/articles/game-programming/&#xD;&#xA;  [3]: http://www.essentialmath.com/JavaGame.pdf&#xD;&#xA;  [4]: http://www.cokeandcode.com/info/tut2d.html&#xD;&#xA;  [5]: http://stackoverflow.com/questions/293079/java-2d-game-frameworks" />
  <row Id="7335" PostHistoryTypeId="4" PostId="3712" RevisionGUID="4f94604d-c34a-4753-aa99-cd177265fe15" CreationDate="2010-09-10T15:43:32.950" UserId="51" Comment="edited title" Text="Implementing a 2D Platformer Game Engine" />
  <row Id="7336" PostHistoryTypeId="2" PostId="3734" RevisionGUID="7776515e-7806-4628-8840-5d26b63d6304" CreationDate="2010-09-10T15:47:22.647" UserId="1101" Text="It sounds to me that the problem isn't the states but the way you're handling them.&#xD;&#xA;&#xD;&#xA;Why do you need a big switch in the main loop? The only things that generally change are the mouse cursor and the click behaviour. Both of those should be wrapped up in separate functions." />
  <row Id="7337" PostHistoryTypeId="2" PostId="3735" RevisionGUID="3c692e34-5521-4c3e-98c1-b7a07fa875b9" CreationDate="2010-09-10T15:48:55.530" UserId="1101" Text="&gt; how you could prevent someone from simply copying the JavaScript from the web server and either making their own game with it (not my biggest concern)&#xD;&#xA;&#xD;&#xA;This is where the law helps. In practice this doesn't seem to happen very often.&#xD;&#xA;&#xD;&#xA;&gt; or substituting their own JavaScript functions and dashing any hope for reliable clients in the wild if the game was to eventually support multiplayer.&#xD;&#xA;&#xD;&#xA;There are no reliable clients in the wild, for exactly this sort of reason. Give up on this dream now. :)" />
  <row Id="7338" PostHistoryTypeId="2" PostId="3736" RevisionGUID="b7d6f306-b507-4474-a307-698b344d5952" CreationDate="2010-09-10T18:16:36.693" UserId="1628" Text="If it's so straight forward, why can't you solve it? No need to be rude. &#xD;&#xA;&#xD;&#xA;Anyway, the first hit on Google is the spec that tells you exactly how you can perform the conversion: http://msdn.microsoft.com/en-us/library/bb173014%28VS.85%29.aspx&#xD;&#xA;&#xD;&#xA;Alternatively, a Google for tools that will do this brings up plenty of hits.&#xD;&#xA;&#xD;&#xA;Straight-forward indeed." />
  <row Id="7339" PostHistoryTypeId="5" PostId="3542" RevisionGUID="a0d934db-c87b-4e67-bfbd-dcc72b48c286" CreationDate="2010-09-10T20:47:09.977" UserId="865" Comment="deleted 8 characters in body" Text="Well, apart from other's suggestion to use a modeling package that can read/write both formats (polytrans can do it but ain't free), your original post links to both formats so if all else fails you got everything needed to be able to read and write both formats...." />
  <row Id="7340" PostHistoryTypeId="2" PostId="3737" RevisionGUID="770fa91b-b383-4d3c-8021-386572cabf9c" CreationDate="2010-09-10T21:52:17.030" UserId="1477" Text="There is standard advice for game development to start off emulating simple games you know and build up from there. Which makes me wonder. What are good examples of action games or action rpgs that are very simple to begin with to try and emulate? What is necessary and what is superfluous?&#xD;&#xA;&#xD;&#xA;Please link to the game's site(or wikipedia page if its defunct) if you can, and only one game per answer please." />
  <row Id="7341" PostHistoryTypeId="1" PostId="3737" RevisionGUID="770fa91b-b383-4d3c-8021-386572cabf9c" CreationDate="2010-09-10T21:52:17.030" UserId="1477" Text="What are good, simple action games/action rpgs to emulate?" />
  <row Id="7342" PostHistoryTypeId="3" PostId="3737" RevisionGUID="770fa91b-b383-4d3c-8021-386572cabf9c" CreationDate="2010-09-10T21:52:17.030" UserId="1477" Text="&lt;game-design&gt;" />
  <row Id="7343" PostHistoryTypeId="16" PostId="3737" RevisionGUID="770fa91b-b383-4d3c-8021-386572cabf9c" CreationDate="2010-09-10T21:52:17.030" UserId="1477" />
  <row Id="7344" PostHistoryTypeId="2" PostId="3738" RevisionGUID="7d661145-3a6b-4c18-aac2-089a8171fd83" CreationDate="2010-09-10T22:22:46.110" UserId="1970" Text="&#xD;&#xA;&#xD;&#xA; - Pong&#xD;&#xA; - Pac Man&#xD;&#xA; - Tetris&#xD;&#xA; - Robotron&#xD;&#xA; - Space Invaders&#xD;&#xA; - Lunar Lander&#xD;&#xA; - Lode Runner&#xD;&#xA;&#xD;&#xA;Two things that I consider important to consider:&#xD;&#xA;&#xD;&#xA; 1. Make something with a menu, high-scores, levels, and other things 'beyond the gameplay'.&#xD;&#xA; &#xD;&#xA; 1. Make something with a distinct hero-character that the player controls (i.e. not cursor based), as this tends to avoid many GUI-related side tracks.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="7345" PostHistoryTypeId="16" PostId="3738" RevisionGUID="7d661145-3a6b-4c18-aac2-089a8171fd83" CreationDate="2010-09-10T22:22:46.110" UserId="-1" />
  <row Id="7346" PostHistoryTypeId="5" PostId="3738" RevisionGUID="b36d0917-5f0d-4629-aca9-2e723de6c115" CreationDate="2010-09-10T22:28:39.063" UserId="1970" Comment="added 527 characters in body; added 19 characters in body" Text="Things that I consider important when choosing a game to remake:&#xD;&#xA;&#xD;&#xA; 1. Make a game that you have enjoyed playing in the past and are intimately familiar with. You want to know the design like the back of your hand so that you can focus on implimentation.&#xD;&#xA;&#xD;&#xA; 1. Make something with a menu, high-scores, levels, and other things 'beyond the gameplay'.&#xD;&#xA; &#xD;&#xA; 1. Make something with a distinct hero-character that the player controls (i.e. not cursor based), as this tends to avoid many GUI-related side tracks.&#xD;&#xA;&#xD;&#xA; 1. Pick a game for which you've previously imagined 'more modes' or other additional features, so that when you finish it you can immediately build upon it (if you choose).&#xD;&#xA;&#xD;&#xA;The first point is really the thing. Asking for specific games is a bit over the top, [anything here][1] will get the job done really.&#xD;&#xA;&#xD;&#xA;_Edit: I had a list of games, focusing on advice instead...._&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_video_arcade_games" />
  <row Id="7347" PostHistoryTypeId="2" PostId="3739" RevisionGUID="4990d435-40e4-4b4a-9a99-564031f50adf" CreationDate="2010-09-10T22:37:07.283" UserId="1970" Text="In [Game Feel][1] by Steve Swink, he covers a lot of great design topics, including a detailed breakdown of the movement feel in platformers. Worth a peek.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Feel-Designers-Sensation-Kaufmann/dp/0123743281" />
  <row Id="7348" PostHistoryTypeId="2" PostId="3740" RevisionGUID="f41f34d3-ff42-48cc-b570-51dab8e3fdfb" CreationDate="2010-09-10T23:59:21.400" UserId="101" Text="[EA STL][1] (or equivalent).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html &quot;Electronic Arts STL&quot;" />
  <row Id="7349" PostHistoryTypeId="16" PostId="3740" RevisionGUID="f41f34d3-ff42-48cc-b570-51dab8e3fdfb" CreationDate="2010-09-10T23:59:21.400" UserId="-1" />
  <row Id="7350" PostHistoryTypeId="2" PostId="3741" RevisionGUID="e14b7aaf-c93e-4a60-90a3-c41d0f9a6104" CreationDate="2010-09-11T00:03:42.917" UserId="160" Text="Just to add a little standardization to the discussion, the classic CS term for this kind of data structures is a [pushdown automata](http://en.wikipedia.org/wiki/Pushdown_automata)." />
  <row Id="7351" PostHistoryTypeId="2" PostId="3742" RevisionGUID="a95bfd65-127d-453f-844d-b892700d8fa1" CreationDate="2010-09-11T01:57:13.117" UserId="2102" Text="What kind of game is prisonblock?  Any open source that I can learn the math behind it for user actions/gameplay?" />
  <row Id="7352" PostHistoryTypeId="1" PostId="3742" RevisionGUID="a95bfd65-127d-453f-844d-b892700d8fa1" CreationDate="2010-09-11T01:57:13.117" UserId="2102" Text="What kind of game is prisonblock?  Any open source that I can learn the math behind it?" />
  <row Id="7353" PostHistoryTypeId="3" PostId="3742" RevisionGUID="a95bfd65-127d-453f-844d-b892700d8fa1" CreationDate="2010-09-11T01:57:13.117" UserId="2102" Text="&lt;math&gt;" />
  <row Id="7354" PostHistoryTypeId="2" PostId="3743" RevisionGUID="71b6b899-8bc8-47f3-b3ff-6252f2a20400" CreationDate="2010-09-11T02:03:09.640" UserId="189" Text="As it says in the browser title, [Prison Block][1] is a &quot;FREE prison RPG game&quot; (RPG meaning Role-Playing Game). It also appears to be multiplayer and therefore can be considered a &quot;[MMO][2]&quot; or &quot;[MMORPG][3]&quot;, albeit browser-based (in contrast to popular MMOs such as World of Warcraft).&#xD;&#xA;&#xD;&#xA;I recommend looking at the source of [Legend of the Green Dragon][4] ([sourceforge project][5]). I'm not sure if it's still being updated, but I remember finding it several years ago and being impressed by it; so much so, that I made my own little web-based multiplayer game ([Magbor][6], [sf proj][7] - warning, it's messy and not too impressive!). It is a web-based multiplayer RPG as well, and completely open source.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.prisonblock.com/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Massively_multiplayer_online_game&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Mmorpg&#xD;&#xA;  [4]: http://www.lotgd.net/&#xD;&#xA;  [5]: http://sourceforge.net/projects/lotgd/&#xD;&#xA;  [6]: http://rickyc.org/magbor/&#xD;&#xA;  [7]: http://sourceforge.net/projects/magbor/" />
  <row Id="7355" PostHistoryTypeId="2" PostId="3744" RevisionGUID="f53b17ce-efe5-4665-994f-8fa7d2caa312" CreationDate="2010-09-11T02:32:12.457" UserId="2065" Text="I wouldn't call it an action or rpg game, but making a [Tetris][1] clone seems to be a common recommendation. Here is a good [article][2] on beginning game programming (I've linked to the section that recommends Tetris and why).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tetris&#xD;&#xA;  [2]: http://www.gamedev.net/reference/design/features/makegames/page2.asp" />
  <row Id="7356" PostHistoryTypeId="16" PostId="3744" RevisionGUID="f53b17ce-efe5-4665-994f-8fa7d2caa312" CreationDate="2010-09-11T02:32:12.457" UserId="-1" />
  <row Id="7357" PostHistoryTypeId="2" PostId="3745" RevisionGUID="ca0240fd-b838-4cca-a567-c640bd2fc6bb" CreationDate="2010-09-11T06:30:12.037" UserId="2104" Text="I asked a similar question in 'SO' not knowing about this place,anyways here goes:&#xD;&#xA;&#xD;&#xA;I wanted to know what the best approaches are while creating a platformer based game for handling background &amp; objects.&#xD;&#xA;&#xD;&#xA;Tiled method - Using small objects &amp; loading on-the-fly : &#xD;&#xA;I understand this is good for employing a level editor for the game later but wouldn't it become too processor intensive to manage so many tiles(using arrays, i assume). Especially if have many objects which also might be mutually exclusive (eg different sets of bg objects which react differently to user). Please throw some light on what usually the tile sizes often considered. I have a doubt that I used too small tiles which reduced my frame rate drastically.&#xD;&#xA;&#xD;&#xA;Create, store &amp; scale:&#xD;&#xA;Creating the whole level &amp; storing them in separate movie clips, scaling them while the level loads. I found this method could solve the frame rate problem, but I then had to handle the issue of not  being able to place objects (like enemy, power ups, etc) during runtime, as I no longer tracked the exact locations of the player (hero) in the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7358" PostHistoryTypeId="1" PostId="3745" RevisionGUID="ca0240fd-b838-4cca-a567-c640bd2fc6bb" CreationDate="2010-09-11T06:30:12.037" UserId="2104" Text="Handling Background &amp; other objects in a platformer" />
  <row Id="7359" PostHistoryTypeId="3" PostId="3745" RevisionGUID="ca0240fd-b838-4cca-a567-c640bd2fc6bb" CreationDate="2010-09-11T06:30:12.037" UserId="2104" Text="&lt;game-design&gt;&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="7360" PostHistoryTypeId="6" PostId="3574" RevisionGUID="65aee7ff-3986-4f57-9909-da759d2938bc" CreationDate="2010-09-11T08:15:13.863" UserId="2036" Comment="edited tags" Text="&lt;hobby-development&gt;&lt;ruby&gt;" />
  <row Id="7366" PostHistoryTypeId="2" PostId="3748" RevisionGUID="0fabaed0-0f55-4581-ad1f-476f078f3a50" CreationDate="2010-09-11T12:04:06.713" UserId="744" Text="I recommend Pac-Man:&#xD;&#xA;&#xD;&#xA; - Pac-Man has aged well. It's still a lot of fun to play, even in its basest form.&#xD;&#xA; - Everyone knows the game, and its core is simple and content-light.&#xD;&#xA; - It's renderable with whatever graphics you have or know, from full-blown 3D with shaders on the ghosts, down to a turn-based text mode game akin to &lt;a href=&quot;http://en.wikipedia.org/wiki/Robots_%28computer_game%29&quot;&gt;robots&lt;/a&gt;.&#xD;&#xA; - It has AI, but you can make the AI as simple or complicated as you want.&#xD;&#xA; - It has multiple levels, which lets you play with data serialization and a level editor if you want.&#xD;&#xA; - It has a lot of scriptable elements, if you want to learn how to embed a scripting language.&#xD;&#xA; - The design permits a lot of piecemeal extensions (new powerups, random levels, moving walls, ...).&#xD;&#xA;&#xD;&#xA;I do _not_ recommend an action RPG. Good action RPGs are probably some of the hardest games to make; they need quick control response, good AI and animation, and tons of content." />
  <row Id="7367" PostHistoryTypeId="16" PostId="3748" RevisionGUID="0fabaed0-0f55-4581-ad1f-476f078f3a50" CreationDate="2010-09-11T12:04:06.713" UserId="-1" />
  <row Id="7368" PostHistoryTypeId="5" PostId="3745" RevisionGUID="4264c633-d425-4182-bf0a-5944295059e8" CreationDate="2010-09-11T13:11:12.573" UserId="288" Comment="deleted 16 characters in body; edited tags; edited title" Text="I asked a similar question in 'SO' not knowing about this place,anyways here goes:&#xD;&#xA;&#xD;&#xA;I wanted to know what the best approaches are while creating a platformer based game for handling background &amp; objects.&#xD;&#xA;&#xD;&#xA;Tiled method - Using small objects &amp; loading on-the-fly : &#xD;&#xA;I understand this is good for employing a level editor for the game later but wouldn't it become too processor intensive to manage so many tiles(using arrays, i assume). Especially if have many objects which also might be mutually exclusive (eg different sets of bg objects which react differently to user). Please throw some light on what usually the tile sizes often considered. I have a doubt that I used too small tiles which reduced my frame rate drastically.&#xD;&#xA;&#xD;&#xA;Create, store &amp; scale:&#xD;&#xA;Creating the whole level &amp; storing them in separate movie clips, scaling them while the level loads. I found this method could solve the frame rate problem, but I then had to handle the issue of not  being able to place objects (like enemy, power ups, etc) during runtime, as I no longer tracked the exact locations of the player (hero) in the game." />
  <row Id="7369" PostHistoryTypeId="4" PostId="3745" RevisionGUID="4264c633-d425-4182-bf0a-5944295059e8" CreationDate="2010-09-11T13:11:12.573" UserId="288" Comment="deleted 16 characters in body; edited tags; edited title" Text="Handling Background &amp; other objects in a Flash platformer" />
  <row Id="7370" PostHistoryTypeId="6" PostId="3745" RevisionGUID="4264c633-d425-4182-bf0a-5944295059e8" CreationDate="2010-09-11T13:11:12.573" UserId="288" Comment="deleted 16 characters in body; edited tags; edited title" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;performance&gt;" />
  <row Id="7372" PostHistoryTypeId="5" PostId="3737" RevisionGUID="7d60cb8d-d6d9-429e-ba37-989374c42646" CreationDate="2010-09-11T13:55:45.020" UserId="744" Comment="added 2 characters in body; edited title" Text="There is standard advice for game development to start off emulating simple games you know and build up from there. Which makes me wonder. What are good examples of action games or action RPGs that are very simple to begin with to try and emulate? What is necessary and what is superfluous?&#xD;&#xA;&#xD;&#xA;Please link to the game's site (or Wikipedia page if it's defunct) if you can, and only one game per answer please." />
  <row Id="7373" PostHistoryTypeId="4" PostId="3737" RevisionGUID="7d60cb8d-d6d9-429e-ba37-989374c42646" CreationDate="2010-09-11T13:55:45.020" UserId="744" Comment="added 2 characters in body; edited title" Text="What are good, simple action games/action RPGs to emulate?" />
  <row Id="7375" PostHistoryTypeId="2" PostId="3749" RevisionGUID="11066356-08c7-4e13-aec9-b9580b763710" CreationDate="2010-09-11T14:23:31.557" UserId="953" Text="Even if you're using vector graphics, I recommend rasterizing them and using the &quot;blit to a single BitmapObject canvas&quot; method.  Since it seems that your game is suited to a tile-based approach, this would result in a much quicker game.  Just use BitmapData.copyPixels to place tiles and bypass the Flash display stack." />
  <row Id="7376" PostHistoryTypeId="2" PostId="3750" RevisionGUID="c1c3d93c-2b4f-4b0e-84ff-c35b435015c0" CreationDate="2010-09-11T15:50:24.990" UserId="659" Text="Disappointingly, Apple has started to deprecate the 3G (not the 3GS) by not supporting Game Center on it.&#xD;&#xA;&#xD;&#xA;There area a lot of these devices still out there. Really, if you're building games primarily for the 'low-def' iDevices, you might as well support the older iPhones and iPod Touches.&#xD;&#xA;&#xD;&#xA;If you're building a game for the higher-performance 'hi-def' iDevices, and porting it to the 3GS, then it may be more reasonable to drop support for the 3G for performance reasons?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7377" PostHistoryTypeId="5" PostId="3743" RevisionGUID="74efd289-376a-4e2f-b0cb-083260839c58" CreationDate="2010-09-11T17:27:19.753" UserId="189" Comment="added 13 characters in body" Text="As it says in the browser title, [Prison Block][1] is a &quot;FREE prison RPG game&quot; (RPG meaning Role-Playing Game). It also appears to be multiplayer and therefore can be considered a &quot;[MMO][2]&quot; or &quot;[MMORPG][3]&quot;, albeit browser-based (in contrast to popular MMOs such as World of Warcraft).&#xD;&#xA;&#xD;&#xA;I recommend looking at the source of [Legend of the Green Dragon][4] ([sourceforge project][5]). I'm not sure if it's still being updated, but I remember finding it several years ago and being impressed by it; so much so, that I made my own little web-based multiplayer game ([Magbor][6], [sf proj][7] - warning, it's messy and not too impressive!). LotGD is a web-based multiplayer RPG like Prison Block, and completely open source.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.prisonblock.com/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Massively_multiplayer_online_game&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Mmorpg&#xD;&#xA;  [4]: http://www.lotgd.net/&#xD;&#xA;  [5]: http://sourceforge.net/projects/lotgd/&#xD;&#xA;  [6]: http://rickyc.org/magbor/&#xD;&#xA;  [7]: http://sourceforge.net/projects/magbor/" />
  <row Id="7378" PostHistoryTypeId="2" PostId="3751" RevisionGUID="6502d015-5857-4d9d-891e-db9eb873c56a" CreationDate="2010-09-11T18:41:24.600" UserId="1021" Text="I recently submitted my iPhone game for review.  I also approved the in-app-purchase for my game (and provided the in-app-purchase screenshot).  It's a few days later and the app status has been updated from &quot;waiting for review&quot; to &quot;in review&quot;... while the in-app-purchase status is still &quot;waiting for review&quot;.  **Could the app go live in the store before the in-app-purchase?**  If so what happens when the user tries to make the in-app-purchase?  Anything the developer can do to remedy this?" />
  <row Id="7379" PostHistoryTypeId="1" PostId="3751" RevisionGUID="6502d015-5857-4d9d-891e-db9eb873c56a" CreationDate="2010-09-11T18:41:24.600" UserId="1021" Text="iPhone app activated before associated in-app-purchase activated?" />
  <row Id="7380" PostHistoryTypeId="3" PostId="3751" RevisionGUID="6502d015-5857-4d9d-891e-db9eb873c56a" CreationDate="2010-09-11T18:41:24.600" UserId="1021" Text="&lt;iphone&gt;" />
  <row Id="7381" PostHistoryTypeId="2" PostId="3752" RevisionGUID="20d9e126-f46b-4207-b620-d6480bf85bfa" CreationDate="2010-09-11T18:52:55.320" UserId="2077" Text="If your goal is to get a better understanding of the X file format, it might be worthwhile to write a converter yourself. All of the information you would need to do this is on the MSDN link that Rushyo provided: http://msdn.microsoft.com/en-us/library/bb173014%28VS.85%29.aspx." />
  <row Id="7382" PostHistoryTypeId="2" PostId="3753" RevisionGUID="9588ebf9-8b65-43a5-88fa-8816478b871f" CreationDate="2010-09-11T19:14:04.740" UserId="2077" Text="I'm currently looking into adding sound to my game. I have seen &lt;a href=&quot;http://connect.creativelabs.com/openal/default.aspx&quot;&gt;OpenAL&lt;/a&gt; and SDL, but I would like to know what else is out there. Can you recommend any good cross-platform Audio APIs for independent game development?&#xD;&#xA;&#xD;&#xA;Thanks for your time." />
  <row Id="7383" PostHistoryTypeId="1" PostId="3753" RevisionGUID="9588ebf9-8b65-43a5-88fa-8816478b871f" CreationDate="2010-09-11T19:14:04.740" UserId="2077" Text="Adding Sound to a Game" />
  <row Id="7384" PostHistoryTypeId="3" PostId="3753" RevisionGUID="9588ebf9-8b65-43a5-88fa-8816478b871f" CreationDate="2010-09-11T19:14:04.740" UserId="2077" Text="&lt;assets&gt;&lt;sound&gt;" />
  <row Id="7385" PostHistoryTypeId="2" PostId="3754" RevisionGUID="3e67de96-da3d-4e0a-a3c2-962a99b13ead" CreationDate="2010-09-11T19:17:28.180" UserId="189" Text="Stack Overflow question: [&quot;Cross platform sound API for games?&quot;][1]&#xD;&#xA;&#xD;&#xA;I agree with the accepted answer:&#xD;&#xA;&#xD;&#xA;&gt; I'm a big fan of SFML Library. It does provide additional Graphic and Network features, but what is relevant to this question, is that it also has neat Audio package.&#xD;&#xA;&#xD;&#xA;&gt;Audio features are:&#xD;&#xA;&#xD;&#xA;&gt; - Uses hardware acceleration whenever possible&#xD;&#xA;- Can load and save standard sound formats : ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64&#xD;&#xA;- Can load all audio resources directly from files in memory&#xD;&#xA;- 3D sound spacialization&#xD;&#xA;- Easy interface for capturing audio&#xD;&#xA;- Manages memory efficiently, so that you don't have to worry about resources lifetime or storage&#xD;&#xA;- Supports streaming for big files ; you can even write your custom streaming class for any source (network, ...)&#xD;&#xA;- Supports multi-channels formats (mono, stereo, 4.0, 5.1, 6.1, 7.1)&#xD;&#xA;&#xD;&#xA;&gt;Website:&#xD;&#xA;http://www.sfml-dev.org/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3636715/cross-platform-sound-api-for-games" />
  <row Id="7386" PostHistoryTypeId="2" PostId="3755" RevisionGUID="48e49566-e173-4fbe-9547-0ac465d8b675" CreationDate="2010-09-11T19:53:05.067" UserId="51" Text="The sort of de-facto API for sound implementation in games these days as far as I'm concerned is &lt;a href=&quot;http://www.fmod.org/index.php/fmod&quot;&gt;FMOD&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;It's free for non-commericial uses, and relatively inexpensive for &quot;casual&quot; (read: indie) development.&#xD;&#xA;&#xD;&#xA;It is a bit overkill for the simple &quot;play back this sound&quot; requirement, but does provide a huge feature set that's well tested on all sorts of platforms." />
  <row Id="7387" PostHistoryTypeId="5" PostId="3392" RevisionGUID="629a3bc3-8bc2-45dd-a38d-4f2d4b3a6fe6" CreationDate="2010-09-11T19:56:54.840" UserId="1279" Comment="Corrected spelling" Text="At first glance many consoles support the same OpenGL-like interface where you throw triangles at the hardware and it figures out how to do it best. In real life each hardware has been optimized for certain uses and modifying *how* you throw your triangles at it can make a difference.&#xD;&#xA;&#xD;&#xA;For instance, the iPhone uses a deferred tile renderer, where the driver collects triangles until a certain limit, then renders them in small tiles (see http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html). For the iPhone you should research building texture atlases, since texture unit switches are not free. You can also disable the depth buffer and also lower the graphic resolution from 32bit to 16bit to reduce memory consumption.&#xD;&#xA;&#xD;&#xA;I've heard that Gameboy-like hardware uses a more explicit tile renderer which you have to get at it at the low level to get good performance and is hard to do properly. PS3 consoles are multi-core, so there your algorithms work best if you are able to parallelize your load, I wonder how the PSP does in comparison, apparently it's between PS1 and PS2 tech level.&#xD;&#xA;&#xD;&#xA;Then there are OpenGL characteristics which may be used, abused or underutilized. In the case of the iPhone one would be Vertex Buffer Objects, advertised as the best thing since sliced bread, but in practice worthless (http://www.idealbinary.com/ib/blog/kevin/2010/1/12/iphone-opengl-es-performance). Again, from personal experience I found that the iPhone hardware is very much bandwidth limited. If you want to darken the screen, you could create a sprite the whole size of the screen with translucency and blit it on the screen. Don't do it! It's better to create a smallish 4x4 sprite and let the hardware stretch it to the full size. The hardware has less pixels to read from the source, and that is faster than the stretching operation itself, which would be slow to do in software.&#xD;&#xA;&#xD;&#xA;Long ago I played with GPX2 hardware but not at the lower level, so I don't know about more mobile consoles. But most definitely, each mobile platform can use fine tuning, so unless you specify more your question it is going to be tough to answer it." />
  <row Id="7388" PostHistoryTypeId="4" PostId="3753" RevisionGUID="611a25fb-4882-4eef-b29a-c7d7ccbb7c65" CreationDate="2010-09-11T20:01:22.877" UserId="2077" Comment="edited title" Text="Cross-Platform Audio API Suggestions" />
  <row Id="7389" PostHistoryTypeId="2" PostId="3756" RevisionGUID="fc308c4b-3c5e-427c-986c-582d36f04a40" CreationDate="2010-09-11T20:29:18.820" UserId="1799" Text="That's a nice teapot :) &#xD;&#xA;&#xD;&#xA;Not sure about details of Solidworks, but you could go about it like:&#xD;&#xA;&#xD;&#xA; 1. Duplicate the mesh&#xD;&#xA; 2. Scale down the copy&#xD;&#xA; 3. Subtract the space of the smaller model from the larger model &#xD;&#xA;&#xD;&#xA;If you can't figure out #3 do a search for 'solidworks boolean operations'.&#xD;&#xA;&#xD;&#xA;I'd probably optimize the model before I subtracted it too, as scaling down can lead to too much detail in some areas.&#xD;&#xA;&#xD;&#xA;You might find more specific help on a dedicated 3d modelling or solidworks forum, [here's one I found on google][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eng-tips.com/threadminder.cfm?pid=559&amp;page=1" />
  <row Id="7390" PostHistoryTypeId="2" PostId="3757" RevisionGUID="3a44fca5-74fc-4a81-9733-db1782f68d2b" CreationDate="2010-09-11T20:52:15.473" UserId="18" Text="If FMOD isn't an option then [Audiere](http://audiere.sourceforge.net/) is a good open source alternative. It hasn't been updated in a long time but it's cross platform, easy to use, and has a good [feature set](http://audiere.sourceforge.net/features.php)." />
  <row Id="7392" PostHistoryTypeId="2" PostId="3758" RevisionGUID="c8ffe78c-6bd6-4090-abd5-4888542b6163" CreationDate="2010-09-12T00:04:56.733" UserDisplayName="Austech" Text="I'm trying to set the origin of a box2d shape. By default, a shape rotates around the center. But I'm trying to get it to rotate around the left of the shape. Like a clock for example. &#xD;&#xA;&#xD;&#xA;I've heard of things like SetXForm but that function doesn't seem to even exist. I'm using C++ just in case you needed to know that. &#xD;&#xA;&#xD;&#xA;Thanks in advanced, any help is appreciated." />
  <row Id="7393" PostHistoryTypeId="1" PostId="3758" RevisionGUID="c8ffe78c-6bd6-4090-abd5-4888542b6163" CreationDate="2010-09-12T00:04:56.733" UserDisplayName="Austech" Text="Box 2D Set Origin" />
  <row Id="7394" PostHistoryTypeId="3" PostId="3758" RevisionGUID="c8ffe78c-6bd6-4090-abd5-4888542b6163" CreationDate="2010-09-12T00:04:56.733" UserDisplayName="Austech" Text="&lt;2d&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="7395" PostHistoryTypeId="2" PostId="3759" RevisionGUID="9529b1b3-9c66-4856-a9dc-25806232b56c" CreationDate="2010-09-12T04:16:08.330" UserDisplayName="Austech" Text="Never mind, I fount the answer. Apparently in the b2PolygonShape, when you call the function&#xD;&#xA;&#xD;&#xA;SetAsBox()&#xD;&#xA;&#xD;&#xA;There's a 2 overloads. And one of them is:&#xD;&#xA;&#xD;&#xA;SetAsBox(halfwidth, halfheight, center, angle);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7396" PostHistoryTypeId="5" PostId="3006" RevisionGUID="f9de3ee2-ae3e-47be-82f9-c875c6d16e47" CreationDate="2010-09-12T05:00:37.493" UserId="189" Comment="fixed jMonkeyEngine link and capitalization" Text="**Java Web Start** is a better choice over java applets.  JNLP allows you to access native level resources like OpenGL.  You can have the full power of the graphics card, while at the same time have your game launch from the browser without need the user to install any plugins(so long as they have java run time on their pc).&#xD;&#xA;&#xD;&#xA;The [**jMonkeyEngine**][1] is a great 3D engine which is built around that principle.  Running examples on their website.&#xD;&#xA;&#xD;&#xA;The **[Slick][2]** engine is a Java 2D engine which can also be launched from the browser.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/&#xD;&#xA;  [2]: http://slick.cokeandcode.com/" />
  <row Id="7397" PostHistoryTypeId="2" PostId="3760" RevisionGUID="113f2874-7689-4574-b707-c0b22083dd28" CreationDate="2010-09-12T08:41:49.900" UserId="744" Text="There are two kinds of shapes and three ways to make them in Box2D.&#xD;&#xA;&#xD;&#xA;A b2CircleShape always has its center at the center of the circle. If you want to make a &quot;lopsided circle&quot; you must fix the circle to another object (e.g. a tiny circle inside it) with a joint.&#xD;&#xA;&#xD;&#xA;A b2PolygonShape may be initialized with SetAsBox. SetAsBox by default places the origin in the middle of the rectangle, but you can pass a b2Vec2 as the third argument to place the origin elsewhere.&#xD;&#xA;&#xD;&#xA;A non-box b2PolygonShape is initialized with the origin at local coordinates 0,0. To make a shape that extents only one direction, e.g. right and up, simply specify coordinates like (0, 0), (0, 5), (5, 5), (5, 0), constructing the shape only along local coordinates that move up and right (and in CCW winding order).&#xD;&#xA;&#xD;&#xA;Remember, the origin of the shape is always local coordinate (0, 0). If you try to think of it as &quot;moving the origin&quot; you are just going to confuse yourself - what you are doing is offsetting the other vertices relative to the origin." />
  <row Id="7398" PostHistoryTypeId="2" PostId="3761" RevisionGUID="7f612336-a947-4cc7-8116-67d4db573e15" CreationDate="2010-09-12T09:29:37.927" UserDisplayName="Pitchfork" Text="If you look at how to best reach your customers (ie. which plugins are preinstalled most):&#xD;&#xA;&#xD;&#xA;1. JavaScript&#xD;&#xA;2. Flash&#xD;&#xA;3. Java&#xD;&#xA;4. Silverlight&#xD;&#xA;5. Unity WebPlayer&#xD;&#xA;6. Custom plugin&#xD;&#xA;&#xD;&#xA;If you look at what tools are best to achieve your specific goal you need to more clear about what type of game experience you try to create. Some tools are just not ready for high FPS, low latency game play while others are not good for 3D, some other have very slow toolchains etc.pp." />
  <row Id="7399" PostHistoryTypeId="16" PostId="3761" RevisionGUID="7f612336-a947-4cc7-8116-67d4db573e15" CreationDate="2010-09-12T09:29:37.927" UserId="-1" />
  <row Id="7400" PostHistoryTypeId="6" PostId="3003" RevisionGUID="a52b0b55-7544-49eb-a5a4-efa7a12a8505" CreationDate="2010-09-12T10:52:36.410" UserId="744" Comment="Better tags." Text="&lt;web&gt;&lt;language-choice&gt;&lt;online&gt;" />
  <row Id="7401" PostHistoryTypeId="2" PostId="3762" RevisionGUID="50ab1d6b-fbb1-4412-b43b-780b4d56a2cb" CreationDate="2010-09-12T12:51:34.880" UserId="1216" Text="I am developing an iphone app.&#xD;&#xA;It has following page structure, &#xD;&#xA;1.List of game levels in a UITableView&#xD;&#xA;2.Game page&#xD;&#xA;&#xD;&#xA;I use &quot;UIViewAnimationTransitionFlipFromRight&quot; between pages&#xD;&#xA;&#xD;&#xA;Game page has 3 views, One is a scrollView in that my game grid is drawn.&#xD;&#xA;Game grid is a sub class of UIView ,that added to Scrollview.&#xD;&#xA;To support zooming i use CATiledLayer to draw the grid(20*20).&#xD;&#xA;&#xD;&#xA;  MY problem is GameGrid shows white or last played puzzles grid contents for a few seconds and then refresh(flashing) to the new content.&#xD;&#xA;&#xD;&#xA;My GameGrid class as follows&#xD;&#xA; &#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;     @implementation GameGrid&#xD;&#xA;&#xD;&#xA;    +(Class)layerClass&#xD;&#xA;    {    &#xD;&#xA;     return [CATiledLayer class];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;     - (id)initWithFrame:(CGRect)frame {   &#xD;&#xA;            if ((self = [super initWithFrame:frame])) {&#xD;&#xA;               CATiledLayer *tempTiledLayer = (CATiledLayer*)self.layer;&#xD;&#xA;               tempTiledLayer.levelsOfDetail = 5;&#xD;&#xA;               tempTiledLayer.levelsOfDetailBias = 2;        &#xD;&#xA;                  self.opaque=YES;  &#xD;&#xA;               }&#xD;&#xA;                 return self;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void)drawRect:(CGRect)r&#xD;&#xA;    {&#xD;&#xA;     //empty&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context&#xD;&#xA;    {&#xD;&#xA;     // here i am drawing grid&#xD;&#xA;    // filling rect&#xD;&#xA;     // lines&#xD;&#xA;    // string etc..&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="7402" PostHistoryTypeId="1" PostId="3762" RevisionGUID="50ab1d6b-fbb1-4412-b43b-780b4d56a2cb" CreationDate="2010-09-12T12:51:34.880" UserId="1216" Text="CATiledLayer drawing delay" />
  <row Id="7403" PostHistoryTypeId="3" PostId="3762" RevisionGUID="50ab1d6b-fbb1-4412-b43b-780b4d56a2cb" CreationDate="2010-09-12T12:51:34.880" UserId="1216" Text="&lt;iphone&gt;" />
  <row Id="7404" PostHistoryTypeId="2" PostId="3763" RevisionGUID="794557aa-b7fc-4216-84c4-66b15b2942cd" CreationDate="2010-09-12T16:03:41.053" UserId="1829" Text="A little introduction:&#xD;&#xA;&#xD;&#xA;I'm 25, and going to this private french school, CreaJeux, which begins in october. I will be learning mostly game programming, something I wanted to do a long time ago, since the day I wondered how were 3d graphics working on my playstation, when I was 14 or so.&#xD;&#xA;&#xD;&#xA;I'm very eager and impatient to begin, and I can't think on anything else (I'm bored), I feel like I'm wasting my time doing nothing, and I wanted to just practice on something during my spare-time, whatever it is.&#xD;&#xA;&#xD;&#xA;I'm not a beginner in C/C++, I know how to program, but I didn't make a lot of stuff excepy a little tetris-like with pygame: I just want to make something in 3D, even if it awful and plain ugly, non-accelerated or whatever.&#xD;&#xA;&#xD;&#xA;Isn't there anything else than open source 3D engines like irrlicht, panda3d or ogre3d to start something ? Isn't there some game dedicated to modding or dedicated to educate begginners ? Or some projects or practices for begginners like me ? Even simple and ugly 3D seems hard to come by..." />
  <row Id="7405" PostHistoryTypeId="1" PostId="3763" RevisionGUID="794557aa-b7fc-4216-84c4-66b15b2942cd" CreationDate="2010-09-12T16:03:41.053" UserId="1829" Text="When learning, nothing is better than practice" />
  <row Id="7406" PostHistoryTypeId="3" PostId="3763" RevisionGUID="794557aa-b7fc-4216-84c4-66b15b2942cd" CreationDate="2010-09-12T16:03:41.053" UserId="1829" Text="&lt;engine&gt;&lt;c++&gt;&lt;3d&gt;&lt;python&gt;&lt;ogre&gt;" />
  <row Id="7407" PostHistoryTypeId="2" PostId="3764" RevisionGUID="a3876627-b6d3-45b7-b83f-70b87a77abb4" CreationDate="2010-09-12T16:10:53.153" UserId="953" Text="I recommend you grab Blender and the free version of Unity.  Blender will let you make 3D models (ugly or pretty) and Unity is a great development environment for simple 3D.  It isn't entirely beginner-friendly, but there are a bunch of great tutorials out there, and with some initiative you should be able to get started building stuff.&#xD;&#xA;&#xD;&#xA;Alternately, you could try making levels for a game like Half-Life 2, which has a well-developed modding community.  If that seems too intimidating, you could start playing with a game like Minecraft, which is partly designed around building simple 3D environments." />
  <row Id="7408" PostHistoryTypeId="2" PostId="3765" RevisionGUID="4e88d299-250d-4a76-b6f9-19905fe9b203" CreationDate="2010-09-12T17:18:46.750" UserId="1400" Text="I am getting my 3D modeling pipeline started and a few questions have come up about modeling packages and formats:&#xD;&#xA;&#xD;&#xA;What 3D model format is easy to parse, free to use, and is usable on the iOS/Mac platforms?&#xD;&#xA;Will I be able to create my own wrapper classes for said 3D model formats, or is it a code-and-format packaged deal?  Does this format come with a free or cheap toolchain for creating new models and editing old models?&#xD;&#xA;&#xD;&#xA;Thanks for the insight ahead of time!" />
  <row Id="7409" PostHistoryTypeId="1" PostId="3765" RevisionGUID="4e88d299-250d-4a76-b6f9-19905fe9b203" CreationDate="2010-09-12T17:18:46.750" UserId="1400" Text="3D Model package for Mac/iOS" />
  <row Id="7410" PostHistoryTypeId="3" PostId="3765" RevisionGUID="4e88d299-250d-4a76-b6f9-19905fe9b203" CreationDate="2010-09-12T17:18:46.750" UserId="1400" Text="&lt;iphone&gt;&lt;3d&gt;&lt;3d-engines&gt;" />
  <row Id="7411" PostHistoryTypeId="2" PostId="3766" RevisionGUID="aea33cb8-6892-4854-990e-30723fd11426" CreationDate="2010-09-12T17:40:21.723" UserId="1312" Text="For modding: look up an editor and try out a few and see what they can do. Here is a good site to get you started, it has tutorials, editors list, a good community that would give you feedback on your work: http://www.moddb.com/&#xD;&#xA;&#xD;&#xA;For 3D programming: start with a graphics API (OpenGL or DirectX) whatever you fancy. Personally i recommend OpenGL along with this [book][1]  that will take you through the basics to advance graphics.&#xD;&#xA;&#xD;&#xA;If you want to become a game programmer than you should reconsider your position on Ogre3D/Irrlicht or any other engines alike. Sure making a games is easier with some tools, however making good, original games comes from hard-work, strong organization skills and discipline. I'm not trying to pull you down or insinuate that game programming is a monstrous horrendous task that you can't master, just want to underline that it isn't the sum of a few clicks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321498828" />
  <row Id="7412" PostHistoryTypeId="2" PostId="3767" RevisionGUID="66b25e9c-a6c1-4efd-941c-20e7b5fd11c9" CreationDate="2010-09-12T18:37:12.547" UserId="1279" Text="A popular 3d package is [Blender](http://www.blender.org). It is used as the toolchain for [SIO2](http://sio2interactive.com/), which you might want to look into." />
  <row Id="7413" PostHistoryTypeId="5" PostId="3766" RevisionGUID="676d6353-b859-4da4-8b0d-59917bcf5418" CreationDate="2010-09-12T19:26:47.097" UserId="1312" Comment="deleted 1 characters in body" Text="For modding: look up an editor and try out a few and see what they can do. Here is a good site to get you started, it has tutorials, editors list, a good community that would give you feedback on your work: http://www.moddb.com/&#xD;&#xA;&#xD;&#xA;For 3D programming: start with a graphics API (OpenGL or DirectX) whatever you fancy. Personally i recommend OpenGL along with this [book][1]  that will take you through the basics to advance graphics.&#xD;&#xA;&#xD;&#xA;If you want to become a game programmer then you should reconsider your position on Ogre3D/Irrlicht or any other engines alike. Sure making a game is easier with some tools, however making good, original games comes from hard-work, strong organization skills and discipline. I'm not trying to pull you down or insinuate that game programming is a monstrous horrendous task that you can't master, just want to underline that it isn't the sum of a few clicks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321498828" />
  <row Id="7414" PostHistoryTypeId="2" PostId="3768" RevisionGUID="311352f0-b352-4f90-b3ec-c81ae5623e5e" CreationDate="2010-09-12T20:52:15.473" UserId="490" Text="A generic, cross-platform game editing tool that allows you to edit game content (2D and 3D) for any game engine. It can be supplemented by editing &amp; export plugins for a specific game engine, or for a specific game genre's editing needs (eg. 3D platform game editor, 2D user interface editor, 3D tilemap editor, etc).&#xD;&#xA;&#xD;&#xA;Rationale: most open source game engines do not provide editing tools. Most existing game editing tools are proprietary and only work with the vendor's game engine (Torque, Unity, Shiva, etc.), or have a limited use (2D Tilemap editing). If you switch engines or platforms, you usually have to leave whichever tools you were working with behind and either learn or even write a new tool, or work without any tools at all.&#xD;&#xA;&#xD;&#xA;What do you think of this idea? Do you think it's desireable? And would it be feasible?" />
  <row Id="7415" PostHistoryTypeId="16" PostId="3768" RevisionGUID="311352f0-b352-4f90-b3ec-c81ae5623e5e" CreationDate="2010-09-12T20:52:15.473" UserId="-1" />
  <row Id="7416" PostHistoryTypeId="2" PostId="3769" RevisionGUID="2bdc24f7-9af6-4d94-90eb-b6b0447102c1" CreationDate="2010-09-12T21:20:11.063" UserId="865" Text="I'm not quite sure what you're looking for. If you want to master the 3d aspect but are comfortable with C++ you could take any DirectX SDK sample and start modifying it until it becomes something game-like. Set targets and set out to implement them. Take a sample that loads and shows a model, take a sample that reads the joypad and combine them so you can move the model around. Add in animation, sound, see if you can come up with some challenge and you have a first game.&lt;br&gt;&#xD;&#xA;If you want to delve more in the game-dev aspect and don't want to be bothered with 3D coding you could consider looking into Source engine mods.&lt;br&gt;&#xD;&#xA;If you want to look into more isolated aspects of game dev, hmmm, then I guess you'd have to research subtopics and use an existing environment. Unity might work, it's not C++, but the concept translate well." />
  <row Id="7417" PostHistoryTypeId="2" PostId="3770" RevisionGUID="61136c4e-4cc8-4a39-9a0e-0e1e69efcfc9" CreationDate="2010-09-12T21:38:24.463" UserId="1829" Text="I read the stencil word a lot, and I don't have a clue what is its real purpose in computer graphics.&#xD;&#xA;&#xD;&#xA;Seeing the picture in black and white on wikipedia, I'm still having problem with it.&#xD;&#xA;&#xD;&#xA;Why do we use a stencil or a stencil buffer, and what is the difference with a Z-buffer ? Why using this word which seems to have some meaning in graphic design ?" />
  <row Id="7418" PostHistoryTypeId="1" PostId="3770" RevisionGUID="61136c4e-4cc8-4a39-9a0e-0e1e69efcfc9" CreationDate="2010-09-12T21:38:24.463" UserId="1829" Text="What is the purpose of the stencil buffer ? More precisely, what is a stencil in computer graphics ?" />
  <row Id="7419" PostHistoryTypeId="3" PostId="3770" RevisionGUID="61136c4e-4cc8-4a39-9a0e-0e1e69efcfc9" CreationDate="2010-09-12T21:38:24.463" UserId="1829" Text="&lt;graphics&gt;&lt;hardware&gt;&lt;graphic-effects&gt;&lt;hardware-acceleration&gt;" />
  <row Id="7420" PostHistoryTypeId="2" PostId="3771" RevisionGUID="9dd74c3f-4bfa-48d3-a647-795099870bc0" CreationDate="2010-09-12T22:16:39.973" UserId="659" Text="It's just a buffer that controls which pixels can be modified when polygons are rendered.  For each pixel, there's a corresponding stencil value, and pixels can be conditionally modified/ignored depending on these values&#xD;&#xA;&#xD;&#xA;At it's simplest, it can be used like a physical stencil - a mask that allows some pixels through, and stops other pixels being modified.&#xD;&#xA;&#xD;&#xA;It is very similar in behaviour to a z-buffer - like depth testing, stencil testing is a true/false test, and there are similar settings to control the stencil test (pass if greater/less/equal). But instead of writing a depth to it, it will usually have pre-defined values written to it, or be incremented/decremented when pixels are drawn, as used in stencil shadow algorithms." />
  <row Id="7421" PostHistoryTypeId="2" PostId="3772" RevisionGUID="f512bb6e-87ce-4852-bd5a-01dcb887d6e0" CreationDate="2010-09-12T22:24:17.863" UserId="160" Text="In its original incarnation, a stencil buffer was a one-bit-per-pixel (i.e. black or white, but no grays) framebuffer. You could render to it whatever you wanted like any other framebuffer. Then, later, you could use the contents of that buffer to &quot;stencil&quot; or mask out when drawing to your regular buffer.&#xD;&#xA;&#xD;&#xA;An example: Let's say you're making a driving game. You want to have a little rear-view mirror onscreen that shows you what's behind the car. You'll need to render a view pointing behind the car, but you only want to render that within the little rounded rectangle of the rear-view mirror. The typical solution is:&#xD;&#xA;&#xD;&#xA;1. Render the rounded rectangle shape to the stencil buffer.&#xD;&#xA;2. Enable stencilling.&#xD;&#xA;3. Render the backwards pointing view onto the regular buffer.&#xD;&#xA;&#xD;&#xA;The stencil will then mask it out so that you only draw into the shape of the mirror.&#xD;&#xA;&#xD;&#xA;Now that render pipelines are much more flexible and programmable, stencil buffers are used as just a generic 1-bit framebuffer that you can do whatever you want with. Shadows are a common use case." />
  <row Id="7422" PostHistoryTypeId="5" PostId="630" RevisionGUID="b55f71e7-eab3-4ded-908f-081e13a93037" CreationDate="2010-09-12T23:00:15.207" UserId="165" Comment="added 248 characters in body" Text="It's not so much hard to develop an MMO, as to develop another **World of Warcraft**. If you're willing to settle for only having a few thousand players, you *can* make an MMO, such as: &#xD;&#xA;&#xD;&#xA;  - [A Tale in the Desert][1] (created by one person)  &#xD;&#xA;[ATITD Wikipedia][2]&#xD;&#xA;&#xD;&#xA;  - [Sherwood Dungeon][3] (created by one person)  &#xD;&#xA;[How one man made an MMO][4]  &#xD;&#xA;[Maid Marion Wikipedia][5]&#xD;&#xA;&#xD;&#xA;  - [Runescape Latest Version][6] (Originally created by two people. The *original* version was *much* simpler than the current version - it was improved over time, which took more people.)  &#xD;&#xA;[Runescape Wikipedia][7]&#xD;&#xA;&#xD;&#xA;  - [Golemizer:][8] a browser-based, steam-punk/sandbox/crafting MMORPG. Developed by [Dave Toulouse][9] in 2008 (his bio says that it took him one year to make it).&#xD;&#xA;&#xD;&#xA;I'm not saying that it was *easy* to make those games :) But it *can* be done by a small number of (skilled, dedicated) people.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://atitd.com/index.shtml&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A_Tale_in_the_Desert&#xD;&#xA;  [3]: http://www.sherwooddungeon.com/&#xD;&#xA;  [4]: http://hanfordlemoore.com/v/how-one-man-made-an-mmo-an-interview-with-gene-endrody&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Maid_Marian_Entertainment&#xD;&#xA;  [6]: http://www.runescape.com/title.ws&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/RuneScape&#xD;&#xA;  [8]: http://www.golemizer.com/&#xD;&#xA;  [9]: http://www.over00.com/?page_id=2" />
  <row Id="7423" PostHistoryTypeId="5" PostId="630" RevisionGUID="b2fed448-05f6-4870-97e5-d4bbdf6364f4" CreationDate="2010-09-12T23:21:07.413" UserId="165" Comment="added 281 characters in body" Text="It's not so much hard to develop an MMO, as to develop another **World of Warcraft**. If you're willing to settle for only having a few thousand players, you *can* make an MMO, such as: &#xD;&#xA;&#xD;&#xA;  - [A Tale in the Desert][1] (created by one person)  &#xD;&#xA;[ATITD Wikipedia][2]&#xD;&#xA;&#xD;&#xA;  - [Sherwood Dungeon][3] (created by one person)  &#xD;&#xA;[How one man made an MMO][4]  &#xD;&#xA;[Maid Marion Wikipedia][5]&#xD;&#xA;&#xD;&#xA;  - [Runescape Latest Version][6] (Originally created by two people. The *original* version was *much* simpler than the current version - it was improved over time, which took more people.)  &#xD;&#xA;[Runescape Wikipedia][7]&#xD;&#xA;&#xD;&#xA;  - [Golemizer:][8] a free, browser-based, steam-punk/sandbox/crafting MMORPG. Developed by [Dave Toulouse][9] in 2008 (his bio says that it took him one year to make it).&#xD;&#xA;&#xD;&#xA;  - [Kingdom of Loathing:][10] another free browser-based MMO (apparently very successful).  &#xD;&#xA;[Interview: Seven Years Later][11]&#xD;&#xA;&#xD;&#xA;I'm not saying that it was *easy* to make those games :) But it *can* be done by a small number of (skilled, dedicated) people.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://atitd.com/index.shtml&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/A_Tale_in_the_Desert&#xD;&#xA;  [3]: http://www.sherwooddungeon.com/&#xD;&#xA;  [4]: http://hanfordlemoore.com/v/how-one-man-made-an-mmo-an-interview-with-gene-endrody&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Maid_Marian_Entertainment&#xD;&#xA;  [6]: http://www.runescape.com/title.ws&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/RuneScape&#xD;&#xA;  [8]: http://www.golemizer.com/&#xD;&#xA;  [9]: http://www.over00.com/?page_id=2&#xD;&#xA;  [10]: http://www3.kingdomofloathing.com/static.php?id=whatiskol&#xD;&#xA;  [11]: http://www.diygamer.com/2010/05/years-kingdom-loathing-interview/" />
  <row Id="7430" PostHistoryTypeId="2" PostId="3775" RevisionGUID="0e4b202c-c1c1-4756-bb62-288a3728a79d" CreationDate="2010-09-13T06:55:30.893" UserId="450" Text="In the game Stendhal we use a finite state machine to implement NPCs. &#xD;&#xA;&#xD;&#xA;The following diagram shows a little example from the [how to write quests tutorial][1].&#xD;&#xA;&#xD;&#xA;![FSM with states IDLE, ATTENDING and QUEST_OFFERED][2]&#xD;&#xA;&#xD;&#xA;At the beginning the NPC is in state IDEL and may be walking around. A player can start a conversation by saying &quot;hi&quot; and the NPC will go to state ATTENDING. In this state it answers to questions about his &quot;job&quot; and offers some game &quot;help&quot;. The player might ask for a quest and the NPC will go to state QUEST_OFFERED waiting for the player to accept (&quot;yes&quot;) or decline (&quot;no&quot;) it.&#xD;&#xA;&#xD;&#xA;We have defined a [set of conditions][3] that can be attached to transitions. For example completing a quest may only be possible if a [PlayerHasItemWithHimCondition][4] is met.&#xD;&#xA;&#xD;&#xA;After a transition was executed the NPC may say some text and/or execute an action. Similar to the conditions we have defined a reusable [set of actions][5] like [EquipItemAction][6] which is used to give a quest reward to a player.&#xD;&#xA;&#xD;&#xA;Multiple conditions can be combined using [AndCondition][7], [OrCondition][8] and [NotCondition][9]. Usually there is a number of actions to be done on quest completion, so there is a [MultipleActions][10] class as well.&#xD;&#xA;&#xD;&#xA;While the actual implementation in Stendhal suffers from not being translatable in other languages easily, I think the general concept is good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org/wiki/Stendhal_Quest_Coding_-_Part_2#Ask_the_players_whether_they_will_do_the_quest&#xD;&#xA;  [2]: http://stendhalgame.org/wiki/images/f/f3/Npc_with_quest_question.png&#xD;&#xA;  [3]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/package-summary.html&#xD;&#xA;  [4]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/PlayerHasItemWithHimCondition.html&#xD;&#xA;  [5]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/action/package-summary.html&#xD;&#xA;  [6]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/action/EquipItemAction.html&#xD;&#xA;  [7]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/AndCondition.html&#xD;&#xA;  [8]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/OrCondition.html&#xD;&#xA;  [9]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/NotCondition.html&#xD;&#xA;  [10]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/action/MultipleActions.html" />
  <row Id="7432" PostHistoryTypeId="2" PostId="3776" RevisionGUID="a13e37ec-81a7-413d-93e1-507da059c290" CreationDate="2010-09-13T11:18:40.610" UserId="115" Text="I recently started to create a sidescroller game, for learning purposes. While creating several levels for it, i stumbled upon the question, how to implement these levels into my game. I made (and i think this is the common way, correct me if i am wrong, i appreciate it) a state-based game, with a menu-state, a game-state and so on. So whats the common way to implement various levels in the game-state? Should i create a new state for each level? or should the game-state be the only &quot;playable&quot; state, and &quot;know&quot; (however realized) the current level it is in? How would you realize point-counting or something like that (like a live system, or a simple beat-the-highscore point system)" />
  <row Id="7433" PostHistoryTypeId="1" PostId="3776" RevisionGUID="a13e37ec-81a7-413d-93e1-507da059c290" CreationDate="2010-09-13T11:18:40.610" UserId="115" Text="Level Implementation" />
  <row Id="7434" PostHistoryTypeId="3" PostId="3776" RevisionGUID="a13e37ec-81a7-413d-93e1-507da059c290" CreationDate="2010-09-13T11:18:40.610" UserId="115" Text="&lt;game-design&gt;&lt;programming&gt;&lt;levels&gt;&lt;game-mechanics&gt;" />
  <row Id="7435" PostHistoryTypeId="2" PostId="3777" RevisionGUID="e86c5127-c91b-481b-b25c-623402ada1f7" CreationDate="2010-09-13T14:07:27.063" UserId="1742" Text="The implementation of the concept of level varies quite a lot, but two common techniques come to mind.&#xD;&#xA;&#xD;&#xA;Most open games, ones where levels/progress are merely an internal state of the player, the normal implementation is to have the game assets catch up with the player state (so if your level starts out &quot;in the docks&quot;, your game starts up by putting you there, and begins loading.) The game waits until all assets have finished loading, then switches to the &quot;loaded&quot; state.&#xD;&#xA;&#xD;&#xA;The other common technique is to have the level be more explicit. The level to be loaded still comes from player session information, but you load the level into the game and then place entities on their starting points. This is the norm for games that have literal levels that are arenas for play. Save games for these style games tend to only save the difference from the starting conditions of the level.&#xD;&#xA;&#xD;&#xA;As you can see, neither of these imply that you have a gamestate per level, only that the level is either playing catchup to player session information, or the assets are explicitly loaded for the level and the player is placed inside it.&#xD;&#xA;&#xD;&#xA;In your sidescroller, this could be taken as your session information containing the level index/ID, and then loading that level on game starr. When your level index changes, you store all info that needs to travel with you from one level to the next, then free the current level and load the new one, finally drop in your saved state.&#xD;&#xA;&#xD;&#xA;Points or game progress are normally managed through session info, which usually includes your current lives, score, time playing, but not the intra level information (such as health level, speed, number of bullets on screen). This separation is important in games where the level is not always mapped to the location (games where you revisit locations for example), but can help simplify your thinking even in linear games." />
  <row Id="7438" PostHistoryTypeId="2" PostId="3778" RevisionGUID="6cdbfd19-991a-4c90-b777-47fae247028e" CreationDate="2010-09-13T14:27:47.760" UserId="189" Text="I've actually been thinking about such a thing lately, and I think it would be a great candidate for an **Android app paired with a small library in whatever language you want**. The app would be a customizable set of buttons, toggles, dropdowns, etc. (any widget you want), and it would send the actions via WLAN (or USB if you wanted to complicate things) to the library. The library would have spawned a separate thread from the gameplay and would know which controls on the Android phone correspond to which variables in the game (you'd set them in your startup code) and would have a connection to the Android app.&#xD;&#xA;&#xD;&#xA;Then, messing with your game is as easy as touching things on your phone. You could even have some textboxes on the phone which show realtime variable values from the game, or you could have the library forward `stdin` or `stderr` to a scrolling textarea on the phone. The options are limitless!&#xD;&#xA;&#xD;&#xA;The only real concern is with speed. If speed and reaction time are crucial then you'd just hook the phone via USB and adb (android debugger) supports forwarding ports over USB to the phone. But otherwise, WLAN would only have a very tiny delay which I think would be plenty acceptable for this purpose.&#xD;&#xA;&#xD;&#xA;**I don't think such a thing as the above has been written, but I've been strongly considering writing it.** (I just haven't gotten far enough into development of my own games to need it yet)&#xD;&#xA;&#xD;&#xA;Of course, those of you that are Apple users can probably do the same with your iDevices. I personally find iOS development to be orders of magnitude more difficult than Android development, and of course the above app could easily be published to the Android market for easy distribution whereas Apple probably wouldn't allow a developer tool into the app store, so I feel the Android platform better suits this tool." />
  <row Id="7439" PostHistoryTypeId="2" PostId="3779" RevisionGUID="ab28f1ef-98f1-48c9-af0c-34e9f5668c9d" CreationDate="2010-09-13T15:44:03.483" UserId="1463" Text="If you use XML, make sure you build a small tool to edit the XML file.  You'll go crazy otherwise." />
  <row Id="7440" PostHistoryTypeId="2" PostId="3780" RevisionGUID="921cc47c-c448-4b2d-abbf-9986cfd095ce" CreationDate="2010-09-13T16:04:54.103" UserId="567" Text="**I don't belive I expressed well the title for my question so if you belive you can change it for a best suitable title please do so or drop me a comment.**&#xD;&#xA;&#xD;&#xA;Currently I am starting a 3D game with C# but I don't have a designer yet nor any images or anything or any money to invest on it.&#xD;&#xA;&#xD;&#xA; - I would like to develop it using some&#xD;&#xA;   sort of placeholder or whatever to&#xD;&#xA;   fill the graphs so i can make atleast&#xD;&#xA;   the basics of it and later simple&#xD;&#xA;   switch for the real thing, what tools&#xD;&#xA;   should i take into consideration for&#xD;&#xA;   this job that are non-commercial&#xD;&#xA;   and/or that won't limitate me once i&#xD;&#xA;   have the game ready to release in&#xD;&#xA;   terms of paying the 3rd parties for&#xD;&#xA;   extra resource or whatever ?" />
  <row Id="7441" PostHistoryTypeId="1" PostId="3780" RevisionGUID="921cc47c-c448-4b2d-abbf-9986cfd095ce" CreationDate="2010-09-13T16:04:54.103" UserId="567" Text="What options do i have for a 3D game without graphs but yet maintaining physics for later ?" />
  <row Id="7442" PostHistoryTypeId="3" PostId="3780" RevisionGUID="921cc47c-c448-4b2d-abbf-9986cfd095ce" CreationDate="2010-09-13T16:04:54.103" UserId="567" Text="&lt;3d&gt;&lt;c#&gt;&lt;hobby-development&gt;" />
  <row Id="7443" PostHistoryTypeId="5" PostId="3780" RevisionGUID="28ffb5a5-c686-42a2-bb42-1ba3ec697bcb" CreationDate="2010-09-13T16:24:48.013" UserId="189" Comment="added 1 characters in body; edited tags; edited title" Text="**I don't believe I expressed well the title for my question so if you believe you can change it for a more suitable title please do so or drop me a comment.**&#xD;&#xA;&#xD;&#xA;Currently I am starting a 3D game with C# but I don't have a designer yet nor any images or anything or any money to invest on it.&#xD;&#xA;&#xD;&#xA; - I would like to develop it using some&#xD;&#xA;   sort of placeholder or whatever to&#xD;&#xA;   fill the graphics so I can make at least&#xD;&#xA;   the basics of it and later simply&#xD;&#xA;   switch for the real thing. What tools&#xD;&#xA;   should I take into consideration for&#xD;&#xA;   this job that are non-commercial&#xD;&#xA;   and/or that won't limit me once I&#xD;&#xA;   have the game ready to release in&#xD;&#xA;   terms of paying the 3rd parties for&#xD;&#xA;   extra resource or whatever?" />
  <row Id="7444" PostHistoryTypeId="4" PostId="3780" RevisionGUID="28ffb5a5-c686-42a2-bb42-1ba3ec697bcb" CreationDate="2010-09-13T16:24:48.013" UserId="189" Comment="added 1 characters in body; edited tags; edited title" Text="What options do I have for a 3D game without graphics but yet maintaining physics for later ?" />
  <row Id="7445" PostHistoryTypeId="6" PostId="3780" RevisionGUID="28ffb5a5-c686-42a2-bb42-1ba3ec697bcb" CreationDate="2010-09-13T16:24:48.013" UserId="189" Comment="added 1 characters in body; edited tags; edited title" Text="&lt;3d&gt;&lt;c#&gt;&lt;indie&gt;&lt;hobby-development&gt;" />
  <row Id="7446" PostHistoryTypeId="5" PostId="3780" RevisionGUID="fcb4afcc-f562-44fc-9eae-d60ac36ef506" CreationDate="2010-09-13T16:42:35.890" UserId="567" Comment="added 188 characters in body" Text="**I don't believe I expressed well the title for my question so if you believe you can change it for a more suitable title please do so or drop me a comment.**&#xD;&#xA;&#xD;&#xA;Currently I am starting a 3D game with C# but I don't have a designer yet nor any images or anything or any money to invest on it.&#xD;&#xA;&#xD;&#xA; - I would like to develop it using some&#xD;&#xA;   sort of placeholder or whatever to&#xD;&#xA;   fill the graphics so I can make at least&#xD;&#xA;   the basics of it and later simply&#xD;&#xA;   switch for the real thing. What tools&#xD;&#xA;   should I take into consideration for&#xD;&#xA;   this job that are non-commercial&#xD;&#xA;   and/or that won't limit me once I&#xD;&#xA;   have the game ready to release in&#xD;&#xA;   terms of paying the 3rd parties for&#xD;&#xA;   extra resource or whatever?&#xD;&#xA;&#xD;&#xA; - Should the place holders be actual sample images or can I use for example a ball to represent a body (what will be the impact of it later when I switch to the actual body it self) ?" />
  <row Id="7447" PostHistoryTypeId="2" PostId="3781" RevisionGUID="bf422a65-51fb-4775-b74e-b6598346b036" CreationDate="2010-09-13T17:25:42.373" UserId="1780" Text="The easiest placeholder graphics are those that you just whip up in code.  For a 3D game, write something code to generate a plane, a box, a sphere, a cylinder.  Bam, now you have enough stuff to make a game!&#xD;&#xA;" />
  <row Id="7448" PostHistoryTypeId="2" PostId="3782" RevisionGUID="6b8b2a7d-a59c-4f98-a236-79ada008d618" CreationDate="2010-09-13T17:34:58.887" UserId="458" Text="If your heart is absolutely set on making an action-RPG, the simplest one I can think of is the original arcade version of Gauntlet. Overhead 2d view, simple mazes, a limited selection of stat-boost and single-use items, and less than ten enemy types. It's also fairly modular, so you can at least start with a single level and movement, then add walls, then add a monster type, and so on, adding one new feature at a time.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Gauntlet_%28arcade_game%29&#xD;&#xA;&#xD;&#xA;But as others have said, the point of &quot;emulate something you know&quot; is to build your programming skills, which means you want to keep it to very simple projects and not necessarily games that you like, so much as games that will teach you how to program." />
  <row Id="7449" PostHistoryTypeId="16" PostId="3782" RevisionGUID="6b8b2a7d-a59c-4f98-a236-79ada008d618" CreationDate="2010-09-13T17:34:58.887" UserId="-1" />
  <row Id="7450" PostHistoryTypeId="2" PostId="3783" RevisionGUID="3d1ffd85-bcab-447c-bc62-79e95a9f1c02" CreationDate="2010-09-13T17:44:16.837" UserId="458" Text="While there are plenty of books out there, I've not found one that I'm happy with. Most seem to stick to &quot;games&quot; that aren't particularly interesting from a play perspective, and don't really get into the implementation details of graphics, game loops, and so on.&#xD;&#xA;&#xD;&#xA;My recommendation would be, rather than looking for a book, teach yourself through Google searching. There are tons of online tutorials for making simple games, just pick a game like Tetris (or whatever), make yourself a list of programming tasks, and then when you get stuck on something (maybe you're not sure how to accept realtime input, or how to draw graphics to the screen) search for the answer to that one specific question. Repeat every time you get stuck, and by the time you're done you'll have a pretty good idea of how a game is put together." />
  <row Id="7451" PostHistoryTypeId="2" PostId="3784" RevisionGUID="06ef38c4-0e6a-4e0b-963e-74ae44fede5e" CreationDate="2010-09-13T19:45:07.590" UserId="1232" Text="In addition to the functional usage of stencil buffers that people have already discussed, stencil buffers can also be used for optimization.&#xD;&#xA;&#xD;&#xA;Due to the position of the stencil test in the graphics pipeline (which is *before* pixel shading), stencil testing can be used to kill pixels that do heavy shading work when they're not needed. Often this can be done at a coarser granularity than just a single pixel eg. a tile of pixels, so work can often be culled during the coarse rasterization stages too.&#xD;&#xA;" />
  <row Id="7452" PostHistoryTypeId="2" PostId="3785" RevisionGUID="cc042124-cd92-47df-9446-5ad583100dc0" CreationDate="2010-09-13T20:51:09.500" UserId="1780" Text="Simply, the game state can carry with it an index for the current level.  You'll want a trigger (a function at the very least) for when the level ends, so that you can unload the current level, update the current level index, then load the (new) current level and start playing.&#xD;&#xA;&#xD;&#xA;You could create another state for each level, but typically it's unnecessary.  The data differences between &quot;front end&quot; and &quot;in game&quot; are not the same as the differences between the levels.  If you wanted state-per-level, you could have another state machine in the game state, the most rudimentary form of that is an index representing the current level.  :)" />
  <row Id="7453" PostHistoryTypeId="2" PostId="3786" RevisionGUID="87bcd455-d835-4f64-a1cb-6ec6c135bc15" CreationDate="2010-09-14T02:19:27.140" UserId="1779" Text="I am a graphic artist and not a modeler or a programmer. For the last few months I have been developing the concept for a game, but could not find a proper team of collaborators to make a demo. Then, as luck would have it, I met a group of people from a local Design College that has a new degree in Game Design. After a brief chat with the program’s Director, he seems really interested in coming to an agreement. Most of his students need an actual project to work on for their final year, and I need a team to make a demo…&#xD;&#xA;&#xD;&#xA;So it works out great for both of us. I am trying to make a formal meet with the school’s administration to reach a formal agreement. Just one thing I am not sure of.&#xD;&#xA;&#xD;&#xA;Who owns the project?&#xD;&#xA;&#xD;&#xA;After everything is said and done, the end result is a demo and a Game Design Doc what will be presented to a publisher, but who owns the rights to the game? &#xD;&#xA;&#xD;&#xA;I know the answer technically is “who ever is agreed upon in the collaboration contract” but how does these collabs usually work?&#xD;&#xA;" />
  <row Id="7454" PostHistoryTypeId="1" PostId="3786" RevisionGUID="87bcd455-d835-4f64-a1cb-6ec6c135bc15" CreationDate="2010-09-14T02:19:27.140" UserId="1779" Text="Collaborations with colleges? How do you make them work?" />
  <row Id="7455" PostHistoryTypeId="3" PostId="3786" RevisionGUID="87bcd455-d835-4f64-a1cb-6ec6c135bc15" CreationDate="2010-09-14T02:19:27.140" UserId="1779" Text="&lt;game-design&gt;&lt;design-document&gt;" />
  <row Id="7456" PostHistoryTypeId="6" PostId="3786" RevisionGUID="c79cf69b-65cd-422e-89bf-6f3029528d68" CreationDate="2010-09-14T02:49:22.157" UserId="14" Comment="edited tags" Text="&lt;game-design&gt;&lt;legal&gt;&lt;design-document&gt;" />
  <row Id="7457" PostHistoryTypeId="2" PostId="3787" RevisionGUID="15e110e6-b2c0-4a1f-b2aa-c7239e1b65f1" CreationDate="2010-09-14T02:55:09.787" UserId="189" Text="You're right, that whoever is contractually established as the owner, is the owner. I get the feeling that you want the rights to the project. If that's the case, then be aggressive! In the end you need to come to an agreement with them, but if your hope is to keep the rights to the game and you feel it is a fair stance (or even if you don't), then state it from the beginning so that you can start negotiations to come to an agreement. Maybe they're okay with that; after all, if they are in desperate need of a project and yours is perfect for the situation, they may be willing to forgo the rights to sell the product in exchange for exclusive rights to develop it, for example.&#xD;&#xA;&#xD;&#xA;Most likely you'll need to meet them in the middle, though. I'd say just set up your formal meet, and meet with them. Discuss it, and come to an agreement that you're happy with. And then get it all in writing.&#xD;&#xA;&#xD;&#xA;&lt;sub&gt;As usual... IANAL (I Am Not A Lawyer)...&lt;/sub&gt;" />
  <row Id="7458" PostHistoryTypeId="2" PostId="3788" RevisionGUID="f292314a-04f8-4d79-94ee-4755c6ec9830" CreationDate="2010-09-14T02:56:57.930" UserId="919" Text="I know of the Truskill algorithm, it's quite complex but effective. &#xD;&#xA;&#xD;&#xA;My question is there other algorithms/methods to determine a players skill for accurate measuring for multi-player competitive play?" />
  <row Id="7459" PostHistoryTypeId="1" PostId="3788" RevisionGUID="f292314a-04f8-4d79-94ee-4755c6ec9830" CreationDate="2010-09-14T02:56:57.930" UserId="919" Text="Simplest most effective way to rank and measure player skill in a multi-player environment?" />
  <row Id="7460" PostHistoryTypeId="3" PostId="3788" RevisionGUID="f292314a-04f8-4d79-94ee-4755c6ec9830" CreationDate="2010-09-14T02:56:57.930" UserId="919" Text="&lt;game-design&gt;&lt;multiplayer&gt;&lt;methodology&gt;&lt;ranking&gt;" />
  <row Id="7461" PostHistoryTypeId="2" PostId="3789" RevisionGUID="f34c4fb5-f0c4-41b8-9adb-872c39b1ce4e" CreationDate="2010-09-14T03:05:03.177" UserId="2004" Text="Similar to [this question][1], are there any popular games that are written in Java?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="7462" PostHistoryTypeId="1" PostId="3789" RevisionGUID="f34c4fb5-f0c4-41b8-9adb-872c39b1ce4e" CreationDate="2010-09-14T03:05:03.177" UserId="2004" Text="Famous games written in Java" />
  <row Id="7463" PostHistoryTypeId="3" PostId="3789" RevisionGUID="f34c4fb5-f0c4-41b8-9adb-872c39b1ce4e" CreationDate="2010-09-14T03:05:03.177" UserId="2004" Text="&lt;java&gt;" />
  <row Id="7464" PostHistoryTypeId="16" PostId="3789" RevisionGUID="f34c4fb5-f0c4-41b8-9adb-872c39b1ce4e" CreationDate="2010-09-14T03:05:12.413" UserId="2004" />
  <row Id="7465" PostHistoryTypeId="2" PostId="3790" RevisionGUID="2fd79e3d-cc0b-47dc-8f6c-95f4629e72f9" CreationDate="2010-09-14T03:06:45.470" UserId="189" Text="![RuneScape][1]&#xD;&#xA;&#xD;&#xA;[RuneScape][2]!&#xD;&#xA;&#xD;&#xA;Straight out of [ye old Wikipedia][3]:&#xD;&#xA;&#xD;&#xA;&gt;RuneScape is a fantasy massively multiplayer online role-playing game (MMORPG) released in January 2001 by Andrew and Paul Gower, and developed by Jagex Ltd. It is a graphical browser game implemented on the client-side in Java, and incorporates 3D rendering. The game has approximately 10 million active accounts, over 130 million registered accounts, and is recognised by the Guinness World Records as the world's most popular free MMORPG.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/skTnb.jpg&#xD;&#xA;  [2]: http://www.runescape.com/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Runescape" />
  <row Id="7466" PostHistoryTypeId="16" PostId="3790" RevisionGUID="2fd79e3d-cc0b-47dc-8f6c-95f4629e72f9" CreationDate="2010-09-14T03:06:45.470" UserId="-1" />
  <row Id="7467" PostHistoryTypeId="2" PostId="3791" RevisionGUID="4a907331-cb8e-4c8b-97b3-09307a09148d" CreationDate="2010-09-14T03:07:21.310" UserId="1272" Text="**[Minecraft][1]**&#xD;&#xA;&#xD;&#xA;  [1]: http://www.minecraft.net/" />
  <row Id="7468" PostHistoryTypeId="16" PostId="3791" RevisionGUID="4a907331-cb8e-4c8b-97b3-09307a09148d" CreationDate="2010-09-14T03:07:21.310" UserId="-1" />
  <row Id="7469" PostHistoryTypeId="2" PostId="3792" RevisionGUID="af645f6b-7a86-412a-a21d-ceeb1ab59007" CreationDate="2010-09-14T03:10:04.297" UserId="189" Text="![FunOrb logo][1]&#xD;&#xA;&#xD;&#xA;All of the games at [FunOrb][2] (by Jagex, the makers of RuneScape) are written in Java and presented very similar to other Flash game portal sites.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/HMYrr.jpg&#xD;&#xA;  [2]: http://www.funorb.com/" />
  <row Id="7470" PostHistoryTypeId="16" PostId="3792" RevisionGUID="af645f6b-7a86-412a-a21d-ceeb1ab59007" CreationDate="2010-09-14T03:10:04.297" UserId="-1" />
  <row Id="7471" PostHistoryTypeId="5" PostId="3791" RevisionGUID="99ea3321-204f-4c38-98b8-39ae1a8e09cb" CreationDate="2010-09-14T03:10:53.127" UserId="189" Comment="added 58 characters in body" Text="![Minecraft][1]&#xD;&#xA;&#xD;&#xA;**[Minecraft][2]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/y0U5m.jpg&#xD;&#xA;  [2]: http://www.minecraft.net/" />
  <row Id="7472" PostHistoryTypeId="5" PostId="3791" RevisionGUID="a20b63f1-8d80-4cb0-954e-b9ff76855bb0" CreationDate="2010-09-14T03:12:39.953" UserId="1272" Comment="Added wikipedia description/link." Text="![Minecraft][1]&#xD;&#xA;&#xD;&#xA;**[Minecraft][2]**&#xD;&#xA;&#xD;&#xA;Description ([wikipedia][3]):&#xD;&#xA;&#xD;&#xA;&gt;Minecraft is a sandbox game which allows players to build constructions out of textured cubes in a 3D world. It is currently in development by Markus Persson, aka &quot;Notch&quot;. The gameplay is inspired by Dwarf Fortress, RollerCoaster Tycoon, Dungeon Keeper, and especially Infiniminer.[1][2]  The game is split into two variants, Alpha and Classic; Classic is both single- and multiplayer and includes only the building aspects of the game with unlimited blocks, and Alpha also has a single- and- multiplayer mode and includes monsters and a much greater variety of crafting available, as well as requiring players to mine their own blocks. Alpha is currently the latest release of Minecraft, and will move into beta sometime in September 2010. Minecraft  was developed for about a week before its public release on May 17, 2009 on the TIGSource forums, where it gained a considerable level of popularity. It has been continually updated since then.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/y0U5m.jpg&#xD;&#xA;  [2]: http://www.minecraft.net/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Minecraft" />
  <row Id="7473" PostHistoryTypeId="2" PostId="3793" RevisionGUID="2563eb8a-663c-43ac-820e-8a3398d28a55" CreationDate="2010-09-14T03:13:47.350" UserId="189" Text="![JavaGaming.org logo][1]&#xD;&#xA;&#xD;&#xA;It's not a game, but the [JavaGaming.org][2] forum hosts a lot of discussion and development of indie Java games and discussions on the technologies (libraries, etc.) that they use (e.g. LWJGL, JOGL). You can find indie Java games there!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/hejTg.gif&#xD;&#xA;  [2]: http://www.javagaming.org/" />
  <row Id="7474" PostHistoryTypeId="16" PostId="3793" RevisionGUID="2563eb8a-663c-43ac-820e-8a3398d28a55" CreationDate="2010-09-14T03:13:47.350" UserId="-1" />
  <row Id="7475" PostHistoryTypeId="2" PostId="3794" RevisionGUID="5caf1c19-10ac-4e17-8298-36808d2c02d2" CreationDate="2010-09-14T03:16:32.840" UserId="189" Text="I'm a college student, and I have a really boring class every Tuesday that's 2 hours and 45 minutes long. It's an interesting situation... attendance is required and checked, and electronic devices aren't allowed, but discussion isn't required and the lectures don't really matter to the exams. So I sit there in the back of the room either dozing off, doing Sudoku, doodling on my paper, pen-spinning, or trying to secretly use my phone without getting caught. I find myself wishing I could use the time productively.&#xD;&#xA;&#xD;&#xA;Just like when one sits down with paper and crayons and can't think of anything to draw, I find myself wanting to do something to further my game development skills (e.g. work on the design of a game) but as I sit there with a pen and paper and the professor droning on, nothing comes to mind.&#xD;&#xA;&#xD;&#xA;**Help me get through this tedious class! What are some things I could think through or work on, or how can I figure out things to think/work on?** Or even things I could print out in advance and read or solve during class. Remember the constraint is that I have no access to technology...&#xD;&#xA;&#xD;&#xA;And I'm not sure a book would be appropriate. Though now that I think of it, I should probably just read game dev books from the library. &lt;sub&gt;Why didn't I think of that before?&lt;/sub&gt; Anyway I still want to hear suggestions! What would you do with this time, if you were in this situation?" />
  <row Id="7476" PostHistoryTypeId="1" PostId="3794" RevisionGUID="5caf1c19-10ac-4e17-8298-36808d2c02d2" CreationDate="2010-09-14T03:16:32.840" UserId="189" Text="How to Further My Game Dev Studies Away from Technology?" />
  <row Id="7477" PostHistoryTypeId="3" PostId="3794" RevisionGUID="5caf1c19-10ac-4e17-8298-36808d2c02d2" CreationDate="2010-09-14T03:16:32.840" UserId="189" Text="&lt;help&gt;" />
  <row Id="7478" PostHistoryTypeId="2" PostId="3795" RevisionGUID="f190cfc5-1b72-44a2-8fc0-40d32549dd73" CreationDate="2010-09-14T03:25:38.163" UserId="323" Text="Puzzle Pirates is written entirely in Java. Gives it some nice crossplatformability, and as it's not a particularly cpu-intensive or ram-intensive game, it runs without noticeable hitches." />
  <row Id="7479" PostHistoryTypeId="16" PostId="3795" RevisionGUID="f190cfc5-1b72-44a2-8fc0-40d32549dd73" CreationDate="2010-09-14T03:25:38.163" UserId="-1" />
  <row Id="7480" PostHistoryTypeId="5" PostId="3789" RevisionGUID="169ff69b-8cb4-48ab-bfc8-a81b455ac993" CreationDate="2010-09-14T03:27:17.520" UserId="2004" Comment="Added more details, turned the question to community wiki" Text="Similar to [this question][1], are there any popular games that are written in Java? Please post links and only 1 answer per post&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="7481" PostHistoryTypeId="2" PostId="3796" RevisionGUID="07a69a22-a01e-4059-af07-3f91e48828ac" CreationDate="2010-09-14T03:28:01.627" UserId="919" Text="Possible things I did in class before&#xD;&#xA;&#xD;&#xA;1. I would draw on paper it mitigates ideas&#xD;&#xA;&#xD;&#xA;2. Think of a game design and play it on paper or in my head.&#xD;&#xA;&#xD;&#xA;3. Questioning the lecture is always helpful to warrant discussion to make things interesting it also builds communication skills. " />
  <row Id="7482" PostHistoryTypeId="5" PostId="3795" RevisionGUID="a8b3bb6e-6cf5-42f8-aa8b-16d0601e8eb3" CreationDate="2010-09-14T05:01:44.357" UserId="189" Comment="added 113 characters in body" Text="![Puzzle Pirates logo][1]&#xD;&#xA;&#xD;&#xA;[Puzzle Pirates][2] is written entirely in Java. Gives it some nice crossplatformability, and as it's not a particularly cpu-intensive or ram-intensive game, it runs without noticeable hitches.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/4hNLP.png&#xD;&#xA;  [2]: http://www.puzzlepirates.com/" />
  <row Id="7483" PostHistoryTypeId="2" PostId="3797" RevisionGUID="8168e266-6a18-42eb-bece-1ff3399ef43a" CreationDate="2010-09-14T06:24:27.327" UserId="1286" Text="[Altitude][1] is a multiplayer plane arena shooter.&#xD;&#xA;&#xD;&#xA;I don't know if it's written in Java or in another JVM language but in run in JVM.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://altitudegame.com/" />
  <row Id="7484" PostHistoryTypeId="16" PostId="3797" RevisionGUID="8168e266-6a18-42eb-bece-1ff3399ef43a" CreationDate="2010-09-14T06:24:27.327" UserId="-1" />
  <row Id="7485" PostHistoryTypeId="5" PostId="3789" RevisionGUID="ec20494b-f69f-4616-87ff-91fb882ce793" CreationDate="2010-09-14T06:55:56.160" UserId="2004" Comment="added 34 characters in body" Text="Similar to [this question][1], are there any popular games that are written in Java? Please post links and only 1 answer per post. Include logos/images if you can.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="7486" PostHistoryTypeId="2" PostId="3798" RevisionGUID="35ecf722-8316-458c-a337-2e386c8d9952" CreationDate="2010-09-14T08:03:42.380" UserId="678" Text="What about a pairwise system like [elo][1]? It has been used for ages in &quot;normal&quot; sports with excellent results.&#xD;&#xA;&#xD;&#xA;For free-for-all-matches you could interpret them as a bunch of pairwise matches and assign points based on the relative standings.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Elo_rating_system" />
  <row Id="7487" PostHistoryTypeId="2" PostId="3799" RevisionGUID="5097cb10-698e-43d1-ba74-291e89fb39d2" CreationDate="2010-09-14T08:49:32.243" UserId="2132" Text="Yes, this is another recommend game engine request; the 'twist' is I am doing a strategy game and on top of sprites, animation and abstraction of input controls, it has to have GUI support for rather complex controls, such as scroll-bars, select boxes, buttons and such.&#xD;&#xA;&#xD;&#xA;I  have tried XNA with various GUI libraries, but the problem is that those libraries was not 'completed'.&#xD;&#xA; I am just wondering if there are other engines which I can look at?" />
  <row Id="7488" PostHistoryTypeId="1" PostId="3799" RevisionGUID="5097cb10-698e-43d1-ba74-291e89fb39d2" CreationDate="2010-09-14T08:49:32.243" UserId="2132" Text="Recommend a game engine with 2D GUI for a UI-intensive strategy game" />
  <row Id="7489" PostHistoryTypeId="3" PostId="3799" RevisionGUID="5097cb10-698e-43d1-ba74-291e89fb39d2" CreationDate="2010-09-14T08:49:32.243" UserId="2132" Text="&lt;engine&gt;" />
  <row Id="7490" PostHistoryTypeId="2" PostId="3800" RevisionGUID="a7f5ca83-aa5b-4633-89c8-e9dd20dd1560" CreationDate="2010-09-14T08:53:23.537" UserId="1120" Text="iirc Puppy Games are written in Java.  http://www.puppygames.net/" />
  <row Id="7491" PostHistoryTypeId="16" PostId="3800" RevisionGUID="a7f5ca83-aa5b-4633-89c8-e9dd20dd1560" CreationDate="2010-09-14T08:53:23.537" UserId="-1" />
  <row Id="7492" PostHistoryTypeId="2" PostId="3801" RevisionGUID="f7bfd01d-f590-44a0-bbf1-a0a39dc46564" CreationDate="2010-09-14T09:56:29.833" UserId="1312" Text="Here is what I'm doing when a lecture is making me fall asleep&#xD;&#xA;&#xD;&#xA; - Think of a game design problem and try to solve it, going through some of the games you've played seeing what developers did wrong, what you can improve, what decision you would have took if you were in the position to do so, etc.&#xD;&#xA;&#xD;&#xA; - Make up a short story, it doesn't have to be complicated, just some characters and how do you think they should interact with each other. (e.g: i often think of a story of a midget elf who is trying to make something out of himself even though all the bigger elves laugh at him and call him name).&#xD;&#xA;&#xD;&#xA; - Write down whatever quirky thoughts you have, be it programming or design, having it lay down on paper with pros and cons, this can give you a better idea of how to balance elements in a game, in my honest opinion when you think about a design you have to nibble on it for a long time to see if it's good.&#xD;&#xA;&#xD;&#xA; - This may sound &quot;Inception&quot; like but draw labyrinths, level flow is extremely important in any game, you don't want just a corridor with some rooms now do you?&#xD;&#xA;&#xD;&#xA;From student to student: don't upset the teacher, being discrete in these kind of situation, where you have no interest in the course, is the best way to go about it. All I've written above can be seen as paying attention or taking lecture notes, so no danger there :)" />
  <row Id="7493" PostHistoryTypeId="2" PostId="3802" RevisionGUID="e4de5f84-835f-4392-bb6d-f9422be09fdb" CreationDate="2010-09-14T10:22:14.843" UserId="744" Text="Pay attention in class and bring something unique from the lecture into the next game you work on." />
  <row Id="7494" PostHistoryTypeId="2" PostId="3803" RevisionGUID="6a09992b-28db-474e-8b6a-5be53f50d65d" CreationDate="2010-09-14T10:27:37.167" UserId="744" Text="I don't know any free game engines that come with a Windows-level UI library, but &lt;a href=&quot;http://www.cegui.org.uk/wiki/index.php/Main_Page&quot;&gt;CEGUI&lt;/a&gt; is a mature solution for those using &lt;a href=&quot;http://www.ogre3d.org/&quot;&gt;OGRE&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Another option would be to use &lt;a href=&quot;http://www.gtk.org/&quot;&gt;GTK+&lt;/a&gt; or your platform's native widget set on Win32 / OS X, and embed an OpenGL context inside one of those widgets. Those are generally the &quot;best&quot; UIs if you're looking for a long feature list.&#xD;&#xA;&#xD;&#xA;If your target platform is XNA you won't find much useful. The key selling point of XNA is cross-platform compatibility, which means heavy mouse control is not a priority for people using it." />
  <row Id="7495" PostHistoryTypeId="2" PostId="3804" RevisionGUID="734d3d95-8b92-471e-b9e8-95e6db210db3" CreationDate="2010-09-14T10:34:58.833" UserId="744" Text="What did you find complicated about &lt;a href=&quot;http://research.microsoft.com/en-us/projects/trueskill/details.aspx&quot;&gt;TrueSkill&lt;/a&gt;? I thought it was a straightforward algorithm with just the right amount of knobs to tweak for different game modes, and it reduces to Elo when the game is head-to-head with high certainty.&#xD;&#xA;&#xD;&#xA;If you're looking for the simplest way to to effectively rank and measure a player in a multiplayer environment - my recommendation is TrueSkill." />
  <row Id="7496" PostHistoryTypeId="2" PostId="3805" RevisionGUID="f0067968-0faf-4b58-8952-12a4960e2f4f" CreationDate="2010-09-14T10:53:00.087" UserId="1101" Text="I think asking for &quot;simplest most effective&quot; is an unrealistic requirement, but there are certainly a few good approaches. Rather than go into detail, I'll link to an article:&#xD;&#xA;&#xD;&#xA;http://www.lifewithalacrity.com/2006/01/ranking_systems.html&#xD;&#xA;&#xD;&#xA;This covers:&#xD;&#xA;&#xD;&#xA;  - ELO&#xD;&#xA;  - an ELO variant by Days of Wonder&#xD;&#xA;  - TrueSkill (and glicko, which it appears to be based on or at least similar to)&#xD;&#xA;  - eGenesis Ranking (for Tales in the Desert)&#xD;&#xA;&#xD;&#xA;On the whole you'll see that they're all pretty much variations on the same theme - you pick a starting or average value for a player, and then the values are used to predict the game outcome. The difference between the actual outcome and the predicted outcome is used to modify the scores for each player, and the process repeats with the adjusted scores. Since each modification to the scores makes the predicted result more accurate, the scores converge on their 'true' values. (This actually assumes that it's a game of skill rather than chance, that the skill in question is capable of being linearly ranked, etc.)" />
  <row Id="7498" PostHistoryTypeId="2" PostId="3806" RevisionGUID="84effb25-f9e0-4cff-ad67-ef10e0c6db37" CreationDate="2010-09-14T12:12:24.973" UserDisplayName="firusvg" Text="[Tribal Trouble][1] is a real-time strategy video game for Microsoft Windows, Linux and Mac OS X. The game pits natives of tropical islands against invading Vikings. The game was developed by independent studio Oddlabs, and has won several awards, including four top 5 positions in indie game review site GameTunnel's 2005 awards in the categories of best multiplayer game, best graphics, best strategy game and best game overall. The game also spawned a sequel, Tribal Trouble 2. (source Wikipedia)&#xD;&#xA;&#xD;&#xA;*) please, someone, include picture from i.imgur.com/4kO9H.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tribaltrouble.com/&#xD;&#xA;" />
  <row Id="7499" PostHistoryTypeId="16" PostId="3806" RevisionGUID="84effb25-f9e0-4cff-ad67-ef10e0c6db37" CreationDate="2010-09-14T12:12:24.973" UserId="-1" />
  <row Id="7500" PostHistoryTypeId="2" PostId="3807" RevisionGUID="06156032-5437-4c4f-8981-40ee7afef8e1" CreationDate="2010-09-14T12:35:28.060" UserId="744" Text="I'm working on a platformer where I'd like to be able to move or copy bodies between multiple Box2D b2Worlds. The desire has cropped up three times now - moving objects between documents in my editor, moving the player between levels in normal game play, and giving the player a preview of a non-trivial projectile they can shoot in the game, which seems to be most accurately done by simulating the world for a few seconds ahead.&#xD;&#xA;&#xD;&#xA;It _looks like_ I can make a parallel world the &quot;long way&quot; - for each body in the world, copy the body data back into a def and re-create it, then copy the fixtures on it in the same way, then do the same for joints; re-set all the velocities; and if it's a &quot;move&quot; rather than a &quot;copy&quot; delete the original one.&#xD;&#xA;&#xD;&#xA;I was wondering if someone has already written this code (and if so, was it actually a workable design or not?), or if Box2D has some affordance for doing this within its API which I am missing." />
  <row Id="7501" PostHistoryTypeId="1" PostId="3807" RevisionGUID="06156032-5437-4c4f-8981-40ee7afef8e1" CreationDate="2010-09-14T12:35:28.060" UserId="744" Text="Parallel Worlds in Box2D" />
  <row Id="7502" PostHistoryTypeId="3" PostId="3807" RevisionGUID="06156032-5437-4c4f-8981-40ee7afef8e1" CreationDate="2010-09-14T12:35:28.060" UserId="744" Text="&lt;c++&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="7503" PostHistoryTypeId="2" PostId="3808" RevisionGUID="c219e6cc-9029-4a73-8654-4009a1173942" CreationDate="2010-09-14T12:47:16.197" UserId="1829" Text="Since the early days of accelerated graphics, programmers were obligated to use hardware-supported libraries like directX or OpenGL.&#xD;&#xA;&#xD;&#xA;If we wanted to explain someone what happened by introducing a graphic chip, the simple thing to say is &quot;we just copy the 3D data into a new memory, where another processor will take care of it, because this one processor is just faster at it&quot;.&#xD;&#xA;&#xD;&#xA;During this period, the processors have never ceased to evolve in term of speed and power.&#xD;&#xA;Today with the upcoming of multiple core processors, x86 is still there, graphic card get more power, and are now taking the role of a CPU with tools like OpenCL and CUDA.&#xD;&#xA;&#xD;&#xA;Back in the year, the AGP port speed was quite important, and PCI-express gave another big boost.&#xD;&#xA;&#xD;&#xA;I didn't heard a lot about AMD Fusion, but the idea might have come into the mind of any computer engineer:&#xD;&#xA;Since the heavy calculations made in a computer are either graphical or not, we separate them into 2 dedicated chips.&#xD;&#xA;&#xD;&#xA;But nowadays, any computer power is needed for both, especially in 3D games: to put it simply, at the beginning computer were just dealing with text, but today they all deal with at least 2d graphics, so why not design one chip that would take the role of both a CPU and a GPU ? Instead of having two memory block and having to copy all the textures and models into the graphic memory when a game loads, the &quot;CGPU&quot; would have some GDDR3, instead of having two separate memories, again cutting costs.&#xD;&#xA;&#xD;&#xA;I still wonder how this AMD fusion will have to be used from a programmer viewpoint, but I wonder that the graphic library would be somewhat easier to deal with that directX or OpenGL, since we would program just one processor.&#xD;&#xA;&#xD;&#xA;Is it right to think that this kind of dedicated hardware would also potentially just be faster for 3D games ?&#xD;&#xA;&#xD;&#xA;Pro:&#xD;&#xA;Single memory, no more AGP transfers, simple for the 3D programmer, cheaper to build.&#xD;&#xA;Cons:&#xD;&#xA;Complicated to come with such hardware, long and expensive research because of both new hardware AND software standards.&#xD;&#xA;&#xD;&#xA;What are you thinking ? Is it a new incoming step for computers, or just scifi ?" />
  <row Id="7504" PostHistoryTypeId="1" PostId="3808" RevisionGUID="c219e6cc-9029-4a73-8654-4009a1173942" CreationDate="2010-09-14T12:47:16.197" UserId="1829" Text="What will AMD Fusion or likewise hybrid CPU/GPU will change for the 3D programmer ? Are they potentially faster ?" />
  <row Id="7505" PostHistoryTypeId="3" PostId="3808" RevisionGUID="c219e6cc-9029-4a73-8654-4009a1173942" CreationDate="2010-09-14T12:47:16.197" UserId="1829" Text="&lt;graphics&gt;&lt;3d&gt;&lt;programming&gt;&lt;graphics-programming&gt;&lt;gpu&gt;" />
  <row Id="7506" PostHistoryTypeId="2" PostId="3809" RevisionGUID="167583c3-a52d-4fde-8b53-8fa05502e26f" CreationDate="2010-09-14T12:53:15.000" UserId="189" Text="AMD Fusion is the next logical step in onboard graphics; the first step was of course &quot;why don't we take the video card, and stamp it onto the motherboard instead!&quot; - of course, greatly reducing the power in the process. Now they're thinking &quot;why don't we take that onboard graphics chip, and built it into the processor&quot;. It will be low-powered, just like onboard graphics. But at the same time, integrated graphics chips have come a long way; today's integrated graphics chips can play World of Warcraft smoothly at a decent resolution, for example.&#xD;&#xA;&#xD;&#xA;**From a programming standpoint, the libraries and methods will not change. DirectX and OpenGL will still be the two standard low-level libraries.**" />
  <row Id="7507" PostHistoryTypeId="2" PostId="3810" RevisionGUID="942791e4-f531-4b3a-87a4-6ffa7a9cc557" CreationDate="2010-09-14T12:59:38.337" UserId="2134" Text="You may consider [immediate mode GUI](http://infiniteunity3d.com/immediate-mode-guis-a-different-way-to-think-about-real-time-user-interfaces/) method which is [available in **Unity 3D**](http://infiniteunity3d.com/immediate-mode-gui-unity3d/). [Unity 3D](http://unity3d.com/) is an awsome game engine which does very well 3-D, 2-D and GUI among other things." />
  <row Id="7508" PostHistoryTypeId="5" PostId="3809" RevisionGUID="50675948-6f21-4338-bb60-0bd702b91a88" CreationDate="2010-09-14T12:59:39.943" UserId="189" Comment="added 900 characters in body" Text="AMD Fusion is the next logical step in onboard graphics; the first step was of course &quot;why don't we take the video card, and stamp it onto the motherboard instead!&quot; - of course, greatly reducing the power in the process. Now they're thinking &quot;why don't we take that onboard graphics chip, and built it into the processor&quot;. It will be low-powered, just like onboard graphics. But at the same time, integrated graphics chips have come a long way; today's integrated graphics chips can play World of Warcraft smoothly at a decent resolution, for example.&#xD;&#xA;&#xD;&#xA;**From a programming standpoint, the libraries and methods will not change. DirectX and OpenGL will still be the two standard low-level libraries.**&#xD;&#xA;&#xD;&#xA;Regardless of how the architecture is, you still need to take some 3D data and draw it to the screen. OpenGL doesn't have a &quot;copy some data into graphics memory&quot; operation, it has &quot;draw this buffer&quot; or &quot;draw this array&quot;. The copying is all implied and handled by the library. So in your case, if the whole system memory is GDDR and no copying is necessary, then the OpenGL driver for the chip will not copy and just draw the buffer; that's perfectly fine, and it doesn't change our programming methods at all.&#xD;&#xA;&#xD;&#xA;For a long time now there has been an abstraction layer between CPU and graphics. Long gone are the days when we, as programmers, literally copied memory from one area to another in order to see it on the screen. So now as GPU and CPU merge, we won't have to change a thing. The hardware guys can worry about the merge, and we programmers can keep on moving forward with development." />
  <row Id="7509" PostHistoryTypeId="5" PostId="3809" RevisionGUID="8fccfcde-e046-44d3-a3ee-e5566c6320b7" CreationDate="2010-09-14T13:11:47.637" UserId="189" Comment="added 261 characters in body" Text="AMD Fusion is the next logical step in onboard graphics; the first step was of course &quot;why don't we take the video card, and stamp it onto the motherboard instead!&quot; - of course, greatly reducing the power in the process. Now they're thinking &quot;why don't we take that onboard graphics chip, and built it into the processor&quot;. It will be low-powered, just like onboard graphics. But at the same time, integrated graphics chips have come a long way; today's integrated graphics chips can play World of Warcraft smoothly at a decent resolution, for example. I get the feeling that discrete (video card) graphics chips will remain faster than these integrated solutions (whether motherboard integrated or CPU integrated), mainly since they can be separately cooled so there isn't as strict of a constraint on the power.&#xD;&#xA;&#xD;&#xA;**From a programming standpoint, the libraries and methods will not change. DirectX and OpenGL will still be the two standard low-level libraries.**&#xD;&#xA;&#xD;&#xA;Regardless of how the architecture is, you still need to take some 3D data and draw it to the screen. OpenGL doesn't have a &quot;copy some data into graphics memory&quot; operation, it has &quot;draw this buffer&quot; or &quot;draw this array&quot;. The copying is all implied and handled by the library. So in your case, if the whole system memory is GDDR and no copying is necessary, then the OpenGL driver for the chip will not copy and just draw the buffer; that's perfectly fine, and it doesn't change our programming methods at all.&#xD;&#xA;&#xD;&#xA;For a long time now there has been an abstraction layer between CPU and graphics. Long gone are the days when we, as programmers, literally copied memory from one area to another in order to see it on the screen. So now as GPU and CPU merge, we won't have to change a thing. The hardware guys can worry about the merge, and we programmers can keep on moving forward with development." />
  <row Id="7510" PostHistoryTypeId="2" PostId="3811" RevisionGUID="efb73bbc-0530-41ce-b59f-5fc23983f11e" CreationDate="2010-09-14T14:40:48.163" UserId="370" Text="###[Font Builder][1]&#xD;&#xA;&#xD;&#xA;Font Builder does almost everything I need.  Both Font Studio and Angel Code's BMFont and perform similar tasks.  Here are some of Font Builders features.&#xD;&#xA;&#xD;&#xA;* A QT app, and so works equally well on all platforms.&#xD;&#xA;* Open source so it can easily extend the app if needed&#xD;&#xA;* Designed to allow custom image and description(layout) exporters, making it even easier to extend&#xD;&#xA;* Loads fonts from the filesystem instead of windows registry.  This makes it a ton easier to generate texture fonts from my own TTFs.&#xD;&#xA;* Auto sizes the final image so I don't need to guess( like in FontStudio).  Further, these textures can be constrained to be power of 2 sizes.&#xD;&#xA;* Kerning pairs are supported, so that info can be exported if your TTF uses them.&#xD;&#xA;&#xD;&#xA;It's not all perfect however.  The default layout plugins suck.  The Box layout tool just fills the texture from top left to bottom right using the characters alphabetically.  Not very efficient.  I changed it to sort the characters by height first and quickly improved its efficiency (a 2 line change).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/fontbuilder/" />
  <row Id="7511" PostHistoryTypeId="2" PostId="3812" RevisionGUID="eb7df70e-0db5-4b45-8038-cf66f4a51336" CreationDate="2010-09-14T14:54:56.063" UserId="370" Text="[libRocket][1] recently went open source.&#xD;&#xA;&#xD;&#xA;It's not a game engine.  They describe themselves as middleware.  But the library is pretty well done, with focus on removing boilerplate code from you GUI design.  It's based on XHTML and CSS, so if you're already familiar with Web developoment it might be a great fit.&#xD;&#xA;&#xD;&#xA;But it is not a game engine you'll still need to solve those issues separately.  You might find some guidance with this question.  &#xD;&#xA;[Recommended 2D Game Engine for prototyping][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://librocket.com/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/536/recommended-2d-game-engine-for-prototyping" />
  <row Id="7512" PostHistoryTypeId="2" PostId="3813" RevisionGUID="cdd8e7f6-9424-4421-be04-44a4f86ba41e" CreationDate="2010-09-14T14:55:20.693" UserId="141" Text="I don't know if there's an accepted solution to this wicked problem. I'm thinking about the design of an online PvP game. A key aspect of the game, something that is just a given, and not my choice, is that people will join the game at very different times. New players can still show up after there are already powerful players established.&#xD;&#xA;&#xD;&#xA;How is it possible to balance such a game so that latecomers aren't immediately crushed by the powerful players? I've played several games like this, and the only way I've seen to mitigate this is to have regular restarts, where new game worlds are released periodically to give everyone a fair start. In one of my own games, I tried a protection system, where new players were immune from attack for 25 days. This worked, until the 25 days were up, whereby the crushing commenced as normal.&#xD;&#xA;&#xD;&#xA;This scenario causes a lot of frustration with new players, and makes many of them quit right away. Are there any genius solutions that might help? One I have in mind is keeping new players more physically distant from old ones so it takes the powerful players a while to find the newbies, giving them time to defend themselves. Thoughts?" />
  <row Id="7513" PostHistoryTypeId="1" PostId="3813" RevisionGUID="cdd8e7f6-9424-4421-be04-44a4f86ba41e" CreationDate="2010-09-14T14:55:20.693" UserId="141" Text="Balance in online PvP games" />
  <row Id="7514" PostHistoryTypeId="3" PostId="3813" RevisionGUID="cdd8e7f6-9424-4421-be04-44a4f86ba41e" CreationDate="2010-09-14T14:55:20.693" UserId="141" Text="&lt;game-design&gt;&lt;multiplayer&gt;&lt;balance&gt;&lt;pvp&gt;" />
  <row Id="7515" PostHistoryTypeId="2" PostId="3814" RevisionGUID="1683fee4-2f22-462a-9b46-b6f80543102e" CreationDate="2010-09-14T15:03:59.920" UserId="246" Text="You can set a specific release date later to ensure that it is not released without the in-app-purchase content." />
  <row Id="7516" PostHistoryTypeId="2" PostId="3815" RevisionGUID="b2173805-3880-411a-91ea-cc06cec0b740" CreationDate="2010-09-14T15:04:23.860" UserId="51" Text="It seems like the only real &quot;solution&quot; to this is to make PvP an opt-in experience only.  Something similar to PvE servers in WoW combined with level-capped Arenas." />
  <row Id="7517" PostHistoryTypeId="2" PostId="3816" RevisionGUID="e3f6e9b7-0cec-4c90-816b-05321468f025" CreationDate="2010-09-14T15:22:47.487" UserId="1700" Text="I think one way to deal with this is to make it so it does not take very long to reach a competitive level in PvP. In Ultima Online, players had a &quot;skill cap&quot; of 700 at the start, and a 225 stat cap (if I remember correctly). It did not take too long to reach the skill/stat cap if you were active enough. &#xD;&#xA;&#xD;&#xA;In other games like Darkfall Online, there are no caps on how many skills you can have and the stats take over 6-12 months if you don't use scripts to train them, so the gap between new players/veterans is massive. &#xD;&#xA;&#xD;&#xA;If your game is level based then you could separate people into different regions depending on their levels. The biggest thing is the difference between power gamers and casual gamers. You must find a way to cater to both. If you can't do that then I would think catering to casual gamers would be more important if you are trying to reach high populations." />
  <row Id="7518" PostHistoryTypeId="2" PostId="3817" RevisionGUID="48da3457-862c-476e-890b-f1bf6b26e927" CreationDate="2010-09-14T15:45:22.457" UserId="189" Text="I like RuneScape's method (at least, the old method back when the wilderness was PvP).&#xD;&#xA;&#xD;&#xA;Most of the game world is only PvE, but up north there is a huge desolate area called the Wilderness; it's PvP. When you first cross the clearly-marked border into the wilderness, you see an icon in the corner of your screen and it reads &quot;Level: 1&quot;. So you're in level 1 wilderness; you can attack people +/- 1 combat level from yours (combat level being your character's overall level, determined by a formula from your more specific combat-related skills).&#xD;&#xA;&#xD;&#xA;As you keep walking further north, deeper into the wilderness, the level keeps incrementing, and at any place in the wilderness you can attack other players who are +/- the wilderness level from your combat level.&#xD;&#xA;&#xD;&#xA;This introduces some interesting dynamics. First, a lot of wimpy people sat at the border of the wilderness, hoping to find other people that were just +/- 1 or 2 levels and then attacking and stunning them (so they can't move). Second, you have something of an incline; someone who is not so brave can stay in the lower levels of the wilderness and try to find people near their level. There were some good resources near the back of the wilderness (around level-40 wilderness); some rare mining rocks and high-level monsters for training. But of course, by going that far, you are risking that someone 40 levels higher than you can come and beat you down in a few hits. And of course, when someone does attack you, you can try to run south and retreat to a level of wilderness that is outside the &quot;range&quot; of your attacker's combat level.&#xD;&#xA;&#xD;&#xA;Nowadays, they switched it so that the wilderness is also PvE, but there are dedicated PvP servers in which the entire world is PvP. The only danger in the wilderness now are ghosts which are supposed to imitate the old PKers (player killers), but most players agree that the ghosts are much more powerful and have much worse rewards than PKers, so many people were upset by the change.&#xD;&#xA;&#xD;&#xA;I think this level system would work well in an all-PvP game, if the &quot;wilderness level&quot; was implemented as the distance from the nearest city's borders. So the no-man's land between cities is PvP, but cities are safe zones except for structured, agreed-upon duels in the streets. Then you can also introduce some cash sinks, by having transportation NPCs which will take you from one city to another for a price (for those players that wish to avoid PvP entirely). There should also be plenty of training zones where players can fight NPCs without the danger of PvP, again for those who don't want to participate in PvP. But really, at some point you must draw the line between players who never PvP (like myself) and players who only find fun out of PvP." />
  <row Id="7519" PostHistoryTypeId="2" PostId="3818" RevisionGUID="b839866d-e05e-4ad9-b466-379b96a7d161" CreationDate="2010-09-14T16:45:01.213" UserId="8" Text="Yes, the app can go live without the in-app purchase being activated. To prevent this, you need to delay your app's release by setting the release date to some future date. Most iPhone devs will delay the release anyway so they can time press coverage, etc better. One bonus: you can give out promo codes to review sites between app approval and the release date." />
  <row Id="7520" PostHistoryTypeId="2" PostId="3819" RevisionGUID="6be874b8-d64b-44b1-b023-0e5180fb676f" CreationDate="2010-09-14T16:47:14.003" UserId="2136" Text="I'm using XNA to program a game, and have been experimenting with various ways to achieve a 'selected' effect on my sprites. The trouble I am having is that each clickable that is drawn in the spritebatch is drawn using more than a single sprite (each object can be made up of up to 6 sprites).&#xD;&#xA;&#xD;&#xA;I'd appreciate it if someone could advise me on how I could achieve adding an outline to my sprites of X pixels (so the outline width can be various numbers of whole pixels).&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;&#xD;&#xA; - Greg." />
  <row Id="7521" PostHistoryTypeId="1" PostId="3819" RevisionGUID="6be874b8-d64b-44b1-b023-0e5180fb676f" CreationDate="2010-09-14T16:47:14.003" UserId="2136" Text="Efficient way of drawing outlines around sprites" />
  <row Id="7522" PostHistoryTypeId="3" PostId="3819" RevisionGUID="6be874b8-d64b-44b1-b023-0e5180fb676f" CreationDate="2010-09-14T16:47:14.003" UserId="2136" Text="&lt;2d&gt;&lt;xna&gt;&lt;sprites&gt;" />
  <row Id="7523" PostHistoryTypeId="2" PostId="3820" RevisionGUID="fda05cf3-7638-4c93-a65c-060647453921" CreationDate="2010-09-14T17:34:08.403" UserId="1156" Text="I'm not sure of effiency, but the easiest way I can see would be to draw a larger version of the sprite in the colour you want selected first. Draw the sprite on top of that. You'll only see the edge of the first sprite, giving the effect of selection." />
  <row Id="7524" PostHistoryTypeId="2" PostId="3821" RevisionGUID="84c86c4a-fb04-4192-a988-13ad9705cfa8" CreationDate="2010-09-14T18:00:56.737" UserId="1156" Text="The example I refer to, OGame, is a real time building type game, but I'm pretty sure you could adapt it to PvP in MMOs or similar.&#xD;&#xA;&#xD;&#xA;All the time, PvP went on; you couldn't 'opt-out' of the chance of someone raiding your planet. However, the way it worked I found was very nice: (You gained points for having resources, building structures, building ships, etc)&#xD;&#xA;&#xD;&#xA; - If you had less than 5,000 points - which is about a month or so of being fairly active - you could only attack or get attacked by people with under 5,000 points and who had +/- 25% of your score. So your little 250 point planet couldn't be attacked by veterans or even 4,900 point planets which would easily overwhelm you.&#xD;&#xA; - If you had between 5,000 and 25,000 points - this is a good few months of solid playing - again you could only be attacked by people in that boundary, but (IIRC) the boundary went up to +/- 50%.&#xD;&#xA; - Over 25,000 points - you could be attacked by anyone over 25,000 points.&#xD;&#xA;&#xD;&#xA;Obviously you wouldn't have points, but some skill calculations maybe?" />
  <row Id="7525" PostHistoryTypeId="2" PostId="3822" RevisionGUID="c6a0f80d-68d4-4311-bd5d-9b40126d725e" CreationDate="2010-09-14T18:06:40.157" UserId="119" Text="I guess you need to draw all the pieces who each object to a single sprite first. Then I think you'd have to write a shader to detect the edges of the sprite a draw a pixel where-ever it finds an edge. I expect there must be some shaders out there already to do this, which you could either use or port." />
  <row Id="7526" PostHistoryTypeId="2" PostId="3823" RevisionGUID="ac9b7c6a-45d3-4594-8e48-cf61798ac2e2" CreationDate="2010-09-14T19:19:13.450" UserId="154" Text="The simplest brute force approach is to build two copies of each sprite, a normal and a highlighted one. Then just swap them when highlighted. &#xD;&#xA;&#xD;&#xA;If you've got memory to spare there is no need to get more complicated then that. Plus artists have complete control over the look when highlighted so you can do an outline or anything else you'd like." />
  <row Id="7527" PostHistoryTypeId="2" PostId="3824" RevisionGUID="f211e159-51c5-429a-a38b-c927968c4882" CreationDate="2010-09-14T19:20:37.037" UserId="1120" Text="How about for each sprite, also have another sprite that's an outline of the base sprite.  When drawing an outlined object, draw the base sprites, then make a mask of the combined rendering, then draw the outline sprites excluding the mask." />
  <row Id="7528" PostHistoryTypeId="5" PostId="3820" RevisionGUID="60dad3d4-72e0-46cf-8786-6aa5b3fa8311" CreationDate="2010-09-14T19:33:18.630" UserId="1156" Comment="added 77 characters in body" Text="I'm not sure of effiency, but the easiest way I can see would be to draw a larger version of the sprite in the colour you want selected first. Draw the sprite on top of that. You'll only see the edge of the first sprite, giving the effect of selection.&#xD;&#xA;&#xD;&#xA;EDIT: However, as you can see from the comments, this isn't a good idea. " />
  <row Id="7529" PostHistoryTypeId="2" PostId="3825" RevisionGUID="06538005-4942-4d32-8f6d-92b10a6bdf5e" CreationDate="2010-09-14T19:52:24.653" UserId="656" Text="In my opinion, since your only job is art and design and you are by yourself, you have a very weak stance getting to become the owner of the project since you have the least contribution of work out of the whole team. You are highly dependant on them to make your project work, whereas they do not need you to get their passing mark on the finals.&#xD;&#xA;&#xD;&#xA;If you want full ownership, either work alone on your project, pay people to put it together, or somehow manage to convince the people you are working with to assign full ownership to you despite working for you for free.&#xD;&#xA;" />
  <row Id="7530" PostHistoryTypeId="2" PostId="3826" RevisionGUID="c1b3316c-c670-4e21-b136-bb5b1426bc2f" CreationDate="2010-09-14T20:08:56.750" UserId="659" Text="This may be slightly off topic, but I'd suggest thinking very carefully about whether you *really* need day/night cycles for your project.&#xD;&#xA;&#xD;&#xA;By supporting that feature, you're essentially saying 'no baked-in lighting/shadows allowed', which will make it *much* more challenging to get pretty results, whichever engine you choose.&#xD;&#xA;&#xD;&#xA;A lot of people were recently wowed by the Epic Citadel iPhone/iPad demo. Technically, it's not doing anything incredible - it's a combination of good art and nicely baked-in lighting." />
  <row Id="7531" PostHistoryTypeId="2" PostId="3827" RevisionGUID="b7299b0d-ee43-4a8e-95f9-6e6f5883a26c" CreationDate="2010-09-14T20:19:29.377" UserId="2077" Text="There are many complicated and feature-rich tools out there but my favorite tool for building bitmap fonts is &lt;a href=&quot;http://www.codehead.co.uk/cbfg/&quot;&gt;Codehead's Bitmap Font Generator (CBFG)&lt;/a&gt;. It's a simple tool which does one thing very well. It's clearly documented with tips for implementation.  &#xD;&#xA;&#xD;&#xA;Like most bitmap font creators, it is of course graphics API independent because it simply exports an image (and a data structure). However, implementing your own text-rendering system, in OpenGL or DirectX, is not too difficult--render a quad for each letter and apply the bitmap font texture with appropriate coordinates.  &#xD;&#xA;&#xD;&#xA;I hope this helps!&#xD;&#xA;&#xD;&#xA;Note: This is a Win32 application only, but I still recommend it!" />
  <row Id="7532" PostHistoryTypeId="5" PostId="3827" RevisionGUID="24029e60-4aaa-4db5-9b4a-3fe300a29fdf" CreationDate="2010-09-14T20:24:46.177" UserId="2077" Comment="added 1 characters in body" Text="There are many complicated and feature-rich tools out there but my favorite tool for building bitmap fonts is &lt;a href=&quot;http://www.codehead.co.uk/cbfg/&quot;&gt;Codehead's Bitmap Font Generator (CBFG)&lt;/a&gt;. It's a simple tool which does one thing very well. It's clearly documented with tips for implementation.  &#xD;&#xA;&#xD;&#xA;Like most bitmap font creators, it is of course graphics API independent because it simply exports an image (and a data structure). However, implementing your own text-rendering system, in OpenGL or Direct3D, is not too difficult--render a quad for each letter and apply the bitmap font texture with appropriate coordinates.  &#xD;&#xA;&#xD;&#xA;I hope this helps!&#xD;&#xA;&#xD;&#xA;Note: This is a Win32 application only, but I still recommend it!" />
  <row Id="7533" PostHistoryTypeId="2" PostId="3828" RevisionGUID="0cb58f01-a443-4129-9271-61223b83f9b3" CreationDate="2010-09-14T20:46:17.567" UserId="458" Text="There are a lot of solutions to this, and it's up to you as the designer to choose one (or more) that are right for your game.&#xD;&#xA;&#xD;&#xA;Making PvP strictly &quot;opt-in&quot; solves the problem directly. Giving temporary &quot;newbie protection&quot; is a lesser version.&#xD;&#xA;&#xD;&#xA;You can put restrictions on who can fight in PvP -- for example, only allowing players to affect those within 2 levels. (Reducing rewards for bashing people lower than you and increasing rewards for attacking those who are more powerful can curtail &quot;newbie-bashing&quot; in Achiever-type players who are trying to rise through the ranks, but not so much with Killer-type players who have more fun by ruining someone else's day.)&#xD;&#xA;&#xD;&#xA;Only activating PvP when players reach the level cap (and/or just shortening the time it takes to reach the cap) reduces the problem as well.&#xD;&#xA;&#xD;&#xA;Some games (think CCG/TCG type games, FPSs, or really any kind of purely skill-based online game) don't even have level progression as a core mechanic, and a new player can have just as much a chance of winning as an experienced player, other things being equal. The danger here is that experienced players tend to be better at the game so they will win on skill grounds; this can be lessened through ranking/rating systems (which again segregate players by skill level, if designed well), creating several servers for different play styles (casual, pro, family/kid friendly, etc.), or community management (giving experienced players and community leaders incentive to teach new players, for example).&#xD;&#xA;&#xD;&#xA;For games where players continue progressing indefinitely (a lot of Facebook games are like this), the solution I've seen is a reset of some kind. This can either be on an individual basis (when a player reaches the level cap, they're given the opportunity and incentive to restart with a new character) or a server-wide basis (monthly server resets, or a reset when some player or group of players manages to reach some kind of &quot;win&quot; condition, which gets them into a permanent &quot;winners&quot; list and causes a reset). This doesn't fix the problem immediately, but it does mean that anyone new to the game knows there will be a level playing field soon enough, and they are free to explore the game mechanics in the current cycle without worrying about screwing up too much." />
  <row Id="7534" PostHistoryTypeId="2" PostId="3829" RevisionGUID="91ce9563-2e7e-4fee-b565-08aaa611f393" CreationDate="2010-09-14T21:07:56.707" UserId="1477" Text="A friend and I are planning on pitching an idea to venture capitalists in a few weeks at [SIEGE 2010][1]. He is handling the business plan side of things and all those related questions so I only need technical questions here. What types of things should I be prepared to answer about our project?&#xD;&#xA;&#xD;&#xA;For reference its an economic game for mobile platforms(targeting android to start with).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.siegecon.net" />
  <row Id="7535" PostHistoryTypeId="1" PostId="3829" RevisionGUID="91ce9563-2e7e-4fee-b565-08aaa611f393" CreationDate="2010-09-14T21:07:56.707" UserId="1477" Text="What technical questions do you need to be prepared to answer before presenting an idea to venture capitalists?" />
  <row Id="7536" PostHistoryTypeId="3" PostId="3829" RevisionGUID="91ce9563-2e7e-4fee-b565-08aaa611f393" CreationDate="2010-09-14T21:07:56.707" UserId="1477" Text="&lt;techncal&gt;" />
  <row Id="7537" PostHistoryTypeId="2" PostId="3830" RevisionGUID="7c29ba65-f17a-4a70-8ffa-281cb66d1f44" CreationDate="2010-09-14T21:13:10.803" UserId="189" Text="If you are going to be implementing the idea then they will have the most questions about staying on schedule; involving things like **estimates of development time** and of **milestones** or **prototypes**, **test plans** and the equipment (**test devices**) you'll need to develop the app, and other technical resources you might need (if you need to **purchase any development software or libraries**). Also you might be fielding some questions regarding staff members; for example, do you think you can develop the app yourself or will you need to **hire some team members** for graphics, programming, testing, etc.&#xD;&#xA;&#xD;&#xA;If they are smart they will also be looking to the **future**; how will you ensure the app can run on future Android devices or even take advantage of new **features that are yet to come**? And how much **maintenance** will the app require? How often will it **update**? (updates are a great thing, they help remind users that the app is installed and I think they might bump your app to the top of the new list in the Market, though I'm not sure)." />
  <row Id="7538" PostHistoryTypeId="5" PostId="3827" RevisionGUID="224a927b-ceb9-4ac6-b035-60bc7bf2b665" CreationDate="2010-09-14T21:34:05.050" UserId="2077" Comment="added 14 characters in body" Text="There are many complicated and feature-rich tools out there but my favorite tool for building bitmap fonts is &lt;a href=&quot;http://www.codehead.co.uk/cbfg/&quot;&gt;Codehead's Bitmap Font Generator (CBFG)&lt;/a&gt;. It's a simple tool which does one thing very well. It's clearly documented with tips for implementation.  &#xD;&#xA;&#xD;&#xA;Like most bitmap font creators, it is of course graphics API independent because it simply exports an image (and an easy to read data structure). However, implementing your own text-rendering system, in OpenGL or Direct3D, is not too difficult--render a quad for each letter and apply the bitmap font texture with appropriate coordinates.  &#xD;&#xA;&#xD;&#xA;I hope this helps!&#xD;&#xA;&#xD;&#xA;Note: This is a Win32 application only, but I still recommend it!" />
  <row Id="7539" PostHistoryTypeId="2" PostId="3831" RevisionGUID="ce8c1c70-456a-4ae1-8776-cff2cf78600f" CreationDate="2010-09-14T21:55:43.373" UserId="1780" Text="Depending on requirements, what might also be effective is just creating an outline on-demand for the sprite.  I'm assuming your sprites have transparency, and are irregularly shaped rather than just being rectangles (while this would work fine for that, outline rectangles should be Trivial).&#xD;&#xA;&#xD;&#xA;    when selected:&#xD;&#xA;       outline = new sprite canvas of appropriate size&#xD;&#xA;       for sprite in object:&#xD;&#xA;          # use larger numbers for thicker outlines&#xD;&#xA;          for x in (-1, 0, 1) and y in (-1, 0, 1):&#xD;&#xA;             render sprite mask into canvas at x,y with desired color&#xD;&#xA;&#xD;&#xA;Note that you don't need to do this every draw (although I suppose you could), but just create the new outline sprite when switching sprites." />
  <row Id="7540" PostHistoryTypeId="2" PostId="3832" RevisionGUID="de9b43a7-ef93-45db-b3e7-a567ff87b3ab" CreationDate="2010-09-14T22:01:18.987" UserId="1780" Text="My first question as a VC would be, why are you targeting Android when it seems pretty clear that the ROI is much better at the present time on iOS?  Once you make your money back on iOS you can port to Android, but it seems like a weak platform to lead on.&#xD;&#xA;&#xD;&#xA;note: I own an Android device and detest the iOS devices.  This is not meant to endorse one or the other but rather to ask a question that the OP will likely encounter." />
  <row Id="7541" PostHistoryTypeId="2" PostId="3833" RevisionGUID="3dcd281f-9cf5-4156-8554-ce534570855f" CreationDate="2010-09-14T23:07:45.037" UserId="154" Text="VC's are rarely technical. The want to know you have the people in place to get the job done, but outside of that their concerns are more financial. They want to know:&#xD;&#xA;&#xD;&#xA;**People**&#xD;&#xA;&#xD;&#xA; - Who is involved in this venture?&#xD;&#xA; - What's their track record of success?&#xD;&#xA; - Have these people shipped products before? Shipped them together? &#xD;&#xA; - Do you need to hire more staff?&#xD;&#xA; - How do you plan on attracting qualified additional staff?&#xD;&#xA; - Are you depending on anyone else (Outsourcing/Middleware) to finish the job?&#xD;&#xA;&#xD;&#xA;**Market**&#xD;&#xA;&#xD;&#xA; - How competitive is the market?&#xD;&#xA; - Is the market growing/shrinking?&#xD;&#xA; - What makes you stand out in this market?&#xD;&#xA; - How can you leverage your work into other markets?&#xD;&#xA; - What's the average sales for titles in your market?&#xD;&#xA; - What are typical dev costs in your market?&#xD;&#xA;&#xD;&#xA;**Return**&#xD;&#xA;&#xD;&#xA; - How long till the company starts to see revenue?&#xD;&#xA; - What's your exit strategy? (a.k.a.) How do they make a 10x profit on money invested?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7542" PostHistoryTypeId="2" PostId="3834" RevisionGUID="47c5fe25-2b2c-417d-8393-4b5d0b5939ad" CreationDate="2010-09-14T23:09:40.117" UserId="458" Text="Depends on the game. There are a few problems you can get into:&#xD;&#xA;&#xD;&#xA;* For games that have a luck component and a skill component (Bridge, Poker, Magic:the Gathering, etc.), most algorithms don't account for the fact that a weaker player can sometimes get lucky. If your game falls into this category, you'll need to do some work. Generally this means figuring out what percent is luck and what percent is skill (a difficult trick, but if you've been using a skill-based algorithm like Elo already, you could run some metrics on the results to figure out how often the algorithm predicts an upset versus how often it actually happens). Then you have to change the algorithm, and exactly what to change it to is probably beyond the scope of this question.&#xD;&#xA;&#xD;&#xA;* For games where matches can be manipulated (I can choose to play a ranked game against my friend), you have to put extra safeguards in place to prevent players from purposefully throwing matches.&#xD;&#xA;&#xD;&#xA;* For games where a player can get &quot;out of practice&quot; if they don't play regularly, the system could involve some sort of time-based degradation. The Glicko system is a mod of Elo that adds an &quot;uncertainty&quot; variable to each player's ranking, based on how many games they've played and how recently they played them; the more certain a player's ranking is, the less it changes from game to game.&#xD;&#xA;&#xD;&#xA;* Multiplayer games (whether free-for-all, team-based, or some other player structure) need special care, of course. Some team-based games make it easier to figure out each individual's contribution, compared to others.&#xD;&#xA;&#xD;&#xA;* Also ask what the purpose of your rating/ranking system is. In professional games and sports, the purpose is statistical: rating is used as a predictor of the outcome of any given match. The primary goal here is accuracy. However, this is rarely what players want; instead they want progression, a feeling they are getting better and climbing through the ranks (whether they are actually getting better or not). In short, there is a tradeoff between accuracy and fun that you need to consider." />
  <row Id="7543" PostHistoryTypeId="2" PostId="3835" RevisionGUID="c12168f7-4d45-44a7-af02-0dd6ac6091c4" CreationDate="2010-09-14T23:15:00.293" UserId="458" Text="Does your studio not have access to legal advice? Ask an attorney specializing in contract law to draft a contract that clearly spells out everyone's rights, responsibilities, and ownership. As for &quot;who owns what&quot; -- it can be whatever all parties agree to!&#xD;&#xA;&#xD;&#xA;If this is unpaid work, you'll probably want to contact someone about this anyway to make sure the agreement is legal; I hear that in some states, &quot;unpaid internships&quot; are not allowed, for example.&#xD;&#xA;&#xD;&#xA;While you didn't ask, I'll give you two caveats with this kind of &quot;industry asks a student team to make a demo&quot; project:&#xD;&#xA;1) Student projects don't always work. Sometimes the students don't have the skills to pull it off, or they don't get it done in time, or they turn in something that's only partly done.&#xD;&#xA;2) Expect zero support after the academic term is over. Students will TELL you they want to keep working on it, but in practice they almost never do.&#xD;&#xA;&#xD;&#xA;Choose a project accordingly :)" />
  <row Id="7544" PostHistoryTypeId="2" PostId="3836" RevisionGUID="34a6e35e-c95a-4080-8c97-d7bc86bea44b" CreationDate="2010-09-14T23:25:51.630" UserId="656" Text="My questions as a VC to a technical person would be:&#xD;&#xA;&#xD;&#xA;* Who are you? What are your credentials?&#xD;&#xA;* What is your educational background, how many years of experience do you have as a programmer?&#xD;&#xA;* Show me two successful games/apps you have published or have participated in on the Android Market. What was your role in them?&#xD;&#xA;* What other major projects have you participated in or have accomplished in the past?&#xD;&#xA;* Do you develop for other platforms other than Android?&#xD;&#xA;* We receive alot of demos from all the other presenters who come to us, now show me yours." />
  <row Id="7545" PostHistoryTypeId="2" PostId="3837" RevisionGUID="fd004307-8dc2-4865-89b1-0088771f5a47" CreationDate="2010-09-15T00:26:05.593" UserId="288" Text="By far the easiest way to do this (so probably the best way, unless you are really strapped for performance) is to have two copies of your sprites.&#xD;&#xA;&#xD;&#xA; - The regular version&#xD;&#xA; - A&quot;fat&quot;, uncoloured version - basically a white version of your sprite X-many pixels &quot;fatter&quot; than the original.&#xD;&#xA;&#xD;&#xA;**Draw your entire object using the &quot;fat&quot; version, then draw the regular version over the top.**&#xD;&#xA;&#xD;&#xA;By making the &quot;fat&quot; version white, you can use SpriteBatch's built-in colour tinting to change the selection colour dynamically.&#xD;&#xA;&#xD;&#xA;To generate your &quot;fat&quot; verison I recommend writing a &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb447754.aspx&quot;&gt;Content Pipeline Extension&lt;/a&gt; that can automatically take your original sprites, read their alpha channel, create a new alpha channel by sampling the maximum alpha channel in the original image X-many pixels around each pixel, and setting RGB = (1,1,1).&#xD;&#xA;&#xD;&#xA;You will have to make sure your sprites all have sufficient transparent border to add the outline (you could check this in the content processor - and even make room if necessary).&#xD;&#xA;&#xD;&#xA;If you only have a few sprites, then you could just use a good image editor (GIMP, Photoshop) and do it by hand: Alpha channel to selection, expand selection, selection to alpha, fill colour channels white." />
  <row Id="7546" PostHistoryTypeId="2" PostId="3838" RevisionGUID="ed9c5a21-792a-4038-9c8b-13f5a868fb84" CreationDate="2010-09-15T03:20:39.130" UserId="2138" Text="One of the best ways to earn money with Flash games is by making sponsorship deals. The developer puts the sponsor's logo and a link to their site in the game and lets the game spread around the web. The sponsor gains money from the ads and the extra traffic to their website. Alternatively, they site-lock their game to their website (usually for a short period of time) so that people who want to play the game go to their website. It's true that one can remove the site-lock with some effort by decompiling the swf, but it's usually not done as it's not worth the effort and not legitimate. Another significant part of the Flash business model is to put advertisements in-game. There are other ways of earning money with Flash games, but from what I know, these two are the most prevalent ones.&#xD;&#xA;&#xD;&#xA;Since HTML5 is necessarily open source, it makes me wonder if this model would still work for HTML5. Even if you obfuscate your js, it's much easier than Flash to copy the game, so maybe it's worth the effort for someone to copy the game to their (illegitimate) site. If you add your sponsor's logo and link or advertisements, it might be worth the effort to remove them for their site, something that I think is much harder to do with Flash games. Perhaps even the illegitimate site could claim that their site is better because there are no in-game ads. There's still the legitimacy barrier, but I wonder if it's strong enough.&#xD;&#xA;&#xD;&#xA;Let's put aside all game development technical restrictions regarding HTML5 for this question (suppose for a moment that HTML5 works just as well as Flash for games). I have two very similar (pair of) questions. The first is, would the Flash business model work with HTML5? What changes to it would be helpful for HTML5 games? The second question is, what about the big picture for HTML5 games? Is adapting the Flash model really the best solution, or is there a better model for the HTML5 games world to &quot;turn&quot;?" />
  <row Id="7547" PostHistoryTypeId="1" PostId="3838" RevisionGUID="ed9c5a21-792a-4038-9c8b-13f5a868fb84" CreationDate="2010-09-15T03:20:39.130" UserId="2138" Text="Will the same Flash game business model work for HTML5 games?" />
  <row Id="7548" PostHistoryTypeId="3" PostId="3838" RevisionGUID="ed9c5a21-792a-4038-9c8b-13f5a868fb84" CreationDate="2010-09-15T03:20:39.130" UserId="2138" Text="&lt;flash&gt;&lt;monetization&gt;&lt;html5&gt;" />
  <row Id="7551" PostHistoryTypeId="2" PostId="3840" RevisionGUID="fc043967-024b-4725-a808-d77ab12e3e03" CreationDate="2010-09-15T06:14:46.023" UserId="919" Text="You could always have a flag that allows the player to be involved in PVP. This can't be set or turned off only during timed intervals of logged time. By default it should be off. This makes it the players choice.&#xD;&#xA;&#xD;&#xA;You can also set it up so that anybody who actually PK's will not be to set it off so easily (extra penalty on ability to set the flag)" />
  <row Id="7552" PostHistoryTypeId="2" PostId="3841" RevisionGUID="54856d5f-823d-4bf5-b07c-2120504a017a" CreationDate="2010-09-15T08:11:29.513" UserId="662" Text="I'm making a simple platformer, and I wanted simple collision handling. So I gave all my objects an AABB hitbox and tried to resolve collisions. However, I can't get it to work.&#xD;&#xA;&#xD;&#xA;My main character has a 32x32 hitbox and my walls have a 16x16 hitbox. I've used the separating axes solution to resolve the collision, like so (unoptimized):&#xD;&#xA;&#xD;&#xA;	Vec2 Box::Collides(Box* a_Other)&#xD;&#xA;	{&#xD;&#xA;		Vec2 sum_extents;&#xD;&#xA;		sum_extents.x = (m_Max.x - m_Min.x) + (a_Other-&gt;GetMax().x - a_Other-&gt;GetMin().x);&#xD;&#xA;		sum_extents.y = (m_Max.y - m_Min.y) + (a_Other-&gt;GetMax().y - a_Other-&gt;GetMin().y);&#xD;&#xA;&#xD;&#xA;		Vec2 double_center_to_center;&#xD;&#xA;		double_center_to_center.x = (a_Other-&gt;GetMin().x + a_Other-&gt;GetMax().x) - (m_Min.x + m_Max.x);&#xD;&#xA;		double_center_to_center.y = (a_Other-&gt;GetMin().y + a_Other-&gt;GetMax().y) - (m_Min.y + m_Max.y);&#xD;&#xA;&#xD;&#xA;		bool result = (fabsf(double_center_to_center.x) &lt; sum_extents.x) &amp;&amp; (fabsf(double_center_to_center.y) &lt; sum_extents.y);&#xD;&#xA;&#xD;&#xA;		if (result)&#xD;&#xA;		{&#xD;&#xA;			return (&#xD;&#xA;				Vec2(&#xD;&#xA;					((sum_extents).x - (double_center_to_center).x) / 2.f, &#xD;&#xA;					((sum_extents).y - (double_center_to_center).y) / 2.f&#xD;&#xA;				)&#xD;&#xA;			);	&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		return (Vec2(0.f, 0.f));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;My character just falls down onto the floor. I check the object I want to check against every other object and just see which one has the smallest intersection area.&#xD;&#xA;&#xD;&#xA;	Object* Scene::Collides(Object* a_Test, Vec2&amp; a_Difference)&#xD;&#xA;	{&#xD;&#xA;		float smallest_area = 10000.f;&#xD;&#xA;		Object* closest = NULL;&#xD;&#xA;		Vec2 final;&#xD;&#xA;&#xD;&#xA;		std::vector&lt;Vec2&gt; check;&#xD;&#xA;&#xD;&#xA;		for (uint32 i = 0; i &lt; s_ObjectTotal; i++)&#xD;&#xA;		{&#xD;&#xA;			if (a_Test == s_Objects[i]) { continue; }&#xD;&#xA;&#xD;&#xA;			Vec2 test = a_Test-&gt;GetCollision()-&gt;Collides(s_Objects[i]-&gt;GetCollision());&#xD;&#xA;			float area = test.x * test.y;&#xD;&#xA;			if (area &gt; 0.f)&#xD;&#xA;			{&#xD;&#xA;				check.push_back(test);&#xD;&#xA;&#xD;&#xA;				if (area &lt; smallest_area)&#xD;&#xA;				{&#xD;&#xA;					smallest_area = area;&#xD;&#xA;					final = test; &#xD;&#xA;					closest = s_Objects[i];&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if (closest) &#xD;&#xA;		{ &#xD;&#xA;			a_Difference = final;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		return closest;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;The hitbox for the player is `(32, 229.999995)(64, 261.999994)` and the hitbox for the floor is `(48, 256)(64, 272)`. So, the resulting movement (to resolve the collision) is `(16, 5.9999930)`. The y is correct, the x is not. As a result, the player character hits the floor, stays above it and slides to the right very fast.&#xD;&#xA;&#xD;&#xA;How do I resolve this collision?" />
  <row Id="7553" PostHistoryTypeId="1" PostId="3841" RevisionGUID="54856d5f-823d-4bf5-b07c-2120504a017a" CreationDate="2010-09-15T08:11:29.513" UserId="662" Text="2D AABB collision response" />
  <row Id="7554" PostHistoryTypeId="3" PostId="3841" RevisionGUID="54856d5f-823d-4bf5-b07c-2120504a017a" CreationDate="2010-09-15T08:11:29.513" UserId="662" Text="&lt;2d&gt;&lt;c++&gt;&lt;2d-physics&gt;&lt;bounding-boxes&gt;" />
  <row Id="7555" PostHistoryTypeId="2" PostId="3842" RevisionGUID="5ec4586c-d2e3-4153-89e7-edd868d8ea5c" CreationDate="2010-09-15T08:45:47.130" UserId="769" Text="I don't think a lot will change, actually. SWF files are easy to decompile. Yes, the ActionScript will have made some irreversible changes that will make the decompiled code harder to figure out (destroying variable names, inlining functions or whatever) but a Javascript obfuscator could do that as well.&#xD;&#xA;&#xD;&#xA;Hacking client software to remove ads is probably always possible, whatever language you use. So you have two options:&#xD;&#xA;&#xD;&#xA;- Make it as hard as possible so it's not worth the effort&#xD;&#xA;- Fight it the legal way, if there is one&#xD;&#xA;&#xD;&#xA;One possible issue might be that browser extension like AdBlock or Greasemonkey can more easily change the game at runtime." />
  <row Id="7556" PostHistoryTypeId="2" PostId="3843" RevisionGUID="11ac200d-3593-4063-90e5-667f9a9d60fd" CreationDate="2010-09-15T08:51:46.953" UserId="2143" Text="You could tie users into using only your implementation by having part of your game logic on a server (hosted by AppEngine etc) which is accessed from the HTML, and check on the server that the caller is in fact yours." />
  <row Id="7557" PostHistoryTypeId="2" PostId="3844" RevisionGUID="fa5bef76-a87d-4521-bcac-4239d50def46" CreationDate="2010-09-15T09:18:56.737" UserId="119" Text="HTML5 games face a lot of hurdles:&#xD;&#xA;&#xD;&#xA; - uncertain browser compatibility&#xD;&#xA; - stability&#xD;&#xA; - poor audio support&#xD;&#xA; - slow JavaScript execution speed&#xD;&#xA; - slow rendering speed&#xD;&#xA; - no designer tooling&#xD;&#xA; - source and assets are easily viewable / copyable&#xD;&#xA; - game is easily hackable while running&#xD;&#xA; - games embedded into other portals could run malicious code on the host portal&#xD;&#xA; - lack of in-game advertising infrastructure&#xD;&#xA; - game cannot be distributed to portals as a single file&#xD;&#xA; - games could potentially &quot;leak out&quot; of their frames onto the page if not embedded correctly&#xD;&#xA;&#xD;&#xA;So in summary, I don't think the current Flash game portal model will work for HTML5. I think where HTML5 might be successful is Facebook/Farmville style games. &#xD;&#xA;" />
  <row Id="7558" PostHistoryTypeId="2" PostId="3845" RevisionGUID="74cf15f6-f3e8-423a-9c7a-9a2201575b69" CreationDate="2010-09-15T10:33:54.963" UserId="192" Text="There is a thing I don't understand about game engines: why it is so common to use physics engines to do raycasting or collision testing? &#xD;&#xA;&#xD;&#xA;Say that you have a 3D scene loaded in your scene manager (Ogre or whatever) and you have to do some raycasting. Is it really efficient to load all your objects in the physical or collision world just to test them for intersection? Why do game engines don't implement the same structures so you don't need to load a physics engine? This sounds like a waste of resources, especially if you don't need physics." />
  <row Id="7559" PostHistoryTypeId="1" PostId="3845" RevisionGUID="74cf15f6-f3e8-423a-9c7a-9a2201575b69" CreationDate="2010-09-15T10:33:54.963" UserId="192" Text="Why do we use physics engines for collision testing or raycasting?" />
  <row Id="7560" PostHistoryTypeId="3" PostId="3845" RevisionGUID="74cf15f6-f3e8-423a-9c7a-9a2201575b69" CreationDate="2010-09-15T10:33:54.963" UserId="192" Text="&lt;engine&gt;&lt;physics-engine&gt;&lt;ray-casting&gt;&lt;collision-detection&gt;&lt;efficiency&gt;" />
  <row Id="7561" PostHistoryTypeId="2" PostId="3846" RevisionGUID="1eb1af16-0fa9-4976-ae1d-e10a7c6f189c" CreationDate="2010-09-15T10:54:04.347" UserId="2144" Text="In my opinion, you should move your player only by smaller part of the result movement. In this case (5.9..)" />
  <row Id="7562" PostHistoryTypeId="2" PostId="3847" RevisionGUID="79f87744-1075-45ea-8530-871143924782" CreationDate="2010-09-15T10:56:17.603" UserId="744" Text="(Rigid-body) Physics is collision testing, raycasting, and response. There's no magic pixie dust that changes that combination into &quot;physics engine&quot; - if you need collision testing and raycasting, you need some kind of physics engine, whether you use an existing one or roll your own." />
  <row Id="7563" PostHistoryTypeId="2" PostId="3848" RevisionGUID="ae039ea1-363b-41d0-a932-d0cb0ce5c465" CreationDate="2010-09-15T12:46:21.787" UserId="490" Text="Don't forget about alternate revenue streams! More often than not, your game's source code is worth quite a bit to fellow developers. The more so the more popular your game is and the harder it is for the average developer to replicate your gameplay or parts of it. &#xD;&#xA;&#xD;&#xA;You should license only the source code, and not the assets, to avoid spawning a myriad of look-alike copycats. You may still be afraid of copycats even using their own assets, in that case specify a &quot;non-compete&quot; in your license. But honestly, those who buy the source code either know better than to make a clone or are not experienced enough to keep up with you. It's also a great source of motivation to always stay ahead of the curve (others may see this as stressful though).&#xD;&#xA;&#xD;&#xA;Selling one's source code can be quite attractive. I summarized the sales of my Line-Drawing Game Starterkit (not a complete game, but close enough) here: &#xD;&#xA;http://www.learn-cocos2d.com/2010/08/starterkit-price-drop-sales-numbers/&#xD;&#xA;&#xD;&#xA;Quite easily I made more from selling the source code than I had if I had invested the additional 2-3 months to make it into a complete game that would actually stand a chance of making decent sales on the App Store. Other developers are more likely to value what you do than gamers. And they're definetely more willing to pay. And it changes your relationship with the customers from many angry nerds to few, grateful, like-minded individuals (few exceptions notwithstanding but the trend is obvious).&#xD;&#xA;&#xD;&#xA;One notion to get away from: your source code is not a trade secret that makes or breaks your business. It's not something to protect at all costs. For the most part you sell a lot of effort, lots of insights and expertise to developers who like to get a headstart and/or learn from you. There's probably nothing they couldn't do, it would just slow them down / take them a bit longer to get to what you have already achieved. They trade money for convenience. It's a good deal for both sides.&#xD;&#xA;" />
  <row Id="7564" PostHistoryTypeId="2" PostId="3849" RevisionGUID="f3c12a6e-d078-442d-b1f7-78e2bc9bb6e8" CreationDate="2010-09-15T13:58:28.203" UserId="288" Text="&gt; Is it really efficient to load all your objects in the physical or collision world just to test them for intersection?&#xD;&#xA;&#xD;&#xA;Yes it is efficient... **for the programmer**. There are lots of physics engines around and it's far easier to just use one - than to strip one down, or implement raycasting yourself.&#xD;&#xA;&#xD;&#xA;Talking about code (in fairly rough terms):&#xD;&#xA;&#xD;&#xA;You've got the code to create physics objects (you're not going to coldet/raycast against fully triangulated models, are you?) in a data structure that is efficient for doing coldet/raycast (you're not going to bruteforce it, are you?). And then some wasted code for various physical properties (and depending on the physics engine you can probably avoid much of this). Plus the CPU and memory requirements for the same (relatively small).&#xD;&#xA;&#xD;&#xA;Then you've got the raycasting code. You need that in any case.&#xD;&#xA;&#xD;&#xA;And finally the rest of the physics simulation code - which just sits in its binaries, never executed, never loaded to cache. Code doesn't take up much space anyway.&#xD;&#xA;&#xD;&#xA;So **the &quot;wastage&quot; here is utterly minuscule**. Especially compared to the massive effort involved in replacing or stripping down half a physics engine." />
  <row Id="7565" PostHistoryTypeId="2" PostId="3850" RevisionGUID="8c55d3c7-3d88-4a20-b3e6-8365953a339d" CreationDate="2010-09-15T14:22:41.593" UserId="369" Text="Google's new Go language is still in its infancy, and it has yet to find widespread real-world use or support.  Even so, it seems like a promising experiment, and I wonder if it could have a future in game development.  I haven't been able to find much game-specific discussion of Go elsewhere, and figured a CW discussion may be appropriate.&#xD;&#xA;&#xD;&#xA;Some thoughts:&#xD;&#xA;&#xD;&#xA;* According to [golang.org](http://golang.org/), Go programs &quot;run nearly as quickly as comparable C or C++ code&quot;--quick enough?&#xD;&#xA;* Is Go's garbage collection well suited for games?&#xD;&#xA;* How much mental re-tooling is necessary to create games in the land of concurrent goroutines?&#xD;&#xA;* Go is frequently called a &quot;systems&quot;-level language, with server software given as an example.  It's hard not to think of multiplayer game servers when hearing this.&#xD;&#xA;&#xD;&#xA;Your thoughts?&#xD;&#xA;" />
  <row Id="7566" PostHistoryTypeId="1" PostId="3850" RevisionGUID="8c55d3c7-3d88-4a20-b3e6-8365953a339d" CreationDate="2010-09-15T14:22:41.593" UserId="369" Text="Developing games in Go (the language)?" />
  <row Id="7567" PostHistoryTypeId="3" PostId="3850" RevisionGUID="8c55d3c7-3d88-4a20-b3e6-8365953a339d" CreationDate="2010-09-15T14:22:41.593" UserId="369" Text="&lt;language-choice&gt;" />
  <row Id="7568" PostHistoryTypeId="16" PostId="3850" RevisionGUID="8c55d3c7-3d88-4a20-b3e6-8365953a339d" CreationDate="2010-09-15T14:22:41.593" UserId="369" />
  <row Id="7569" PostHistoryTypeId="2" PostId="3851" RevisionGUID="6b4c27bd-2fa9-4e28-968d-653c796e4fa2" CreationDate="2010-09-15T14:23:10.363" UserId="189" Text="I'm not sure about your Scene collision. But it looks to me like your box collision has a problem. I've seen this mistake before; it looks to me like you're finding the centers of the boxes, and calculating distance between the centers. That's not box collision; that's sphere collision. Think about it for a moment.&#xD;&#xA;&#xD;&#xA;Honestly your algorithm is entirely unclear to me, when AABB collision is pretty simple (especially in 2 dimensions, which is essentially AAS (Axis-Aligned Square) collision).&#xD;&#xA;&#xD;&#xA;You can use the process of elimination:&#xD;&#xA;&#xD;&#xA; - Let's say box A is to the left of box B. Then if the right side of A is left of the left side of box B, there can be no collision.&#xD;&#xA; - Now suppose box A is to the right of box B. If the right side of B is left of the left side of A, there can be no collision.&#xD;&#xA; - If neither of the above two cases were true, then the boxes are overlapping in some way **in this dimension**.&#xD;&#xA; - Now do the same in the Y dimension (the two steps, but with above/below). If neither of the Y dimension cases were true, the boxes overlap in some way in the Y dimension.&#xD;&#xA; - So if the boxes overlap in the X dimension **and** and in the Y dimension, then they overlap. Otherwise, if they overlap in only one dimension, then they are just above/below each other, or left/right of each other, but not touching.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;So your algorithm should look something like this:&#xD;&#xA;&#xD;&#xA;    Vec2 Box::Collides(Box* a_Other)&#xD;&#xA;    {&#xD;&#xA;        final Vec2 nullResult(0.0f, 0.0f);&#xD;&#xA;        &#xD;&#xA;        float xOverlap = 0.0f, yOverlap = 0.0f;&#xD;&#xA;        &#xD;&#xA;        /* test the X direction */&#xD;&#xA;        if(m_Max.x &lt; a_Other-&gt;GetMin().x || a_Other-&gt;GetMax().x &lt; m_Min.x) {&#xD;&#xA;            return nullResult;&#xD;&#xA;        } else {&#xD;&#xA;            // get center X's of this and other box&#xD;&#xA;            float thisCenterX = (m_Min.x + m_Max.x) / 2.0f;&#xD;&#xA;            float otherCenterX = (a_Other-&gt;GetMin().x + a_Other-&gt;GetMax().x) / 2.0f;&#xD;&#xA;            &#xD;&#xA;            if(thisCenterX &lt; otherCenterX) {&#xD;&#xA;                xOverlap = m_Max.x - a_Other-&gt;GetMin().x;&#xD;&#xA;            } else {&#xD;&#xA;                xOverlap = a_Other-&gt;GetMax().x - m_Min.x;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        /* test the Y direction */&#xD;&#xA;        // (repeat the above but with Y instead of X)&#xD;&#xA;        &#xD;&#xA;        // if necessary, do the same in the Z direction&#xD;&#xA;        &#xD;&#xA;        return Vec2(xOverlap, yOverlap);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7570" PostHistoryTypeId="2" PostId="3852" RevisionGUID="cd30f1ff-b867-4742-8c18-59c5cce58c99" CreationDate="2010-09-15T14:23:36.133" UserId="1101" Text="&gt; Since the heavy calculations made in a computer are either graphical or not, we separate them into 2 dedicated chips.&#xD;&#xA;&#xD;&#xA;It's not really because they're graphical or not, it's that there are 2 distinct types of computation, which I shall term 'branching', being heavy on choices, loops, and conditionals, and 'linear' which has few or no conditionals and is a long line of predictable instructions.&#xD;&#xA;&#xD;&#xA;Typical computer operation is 'branching', and consists of algorithms require lots of &quot;if this, do that, otherwise do something else&quot;. This means a lot of jumping around in different parts of the code based on what data you have. This makes it hard to optimise the hardware since you have to wait until one instruction has finished to know which instruction to handle next.&#xD;&#xA;&#xD;&#xA;By contrast, computer graphics are one example of 'linear' code. You have a long block of data and you do exactly the same thing to each piece. Transform each vertex into the new coordinate system, iterate between the vertices for each pixel, perform a predictable number of lighting steps to render each pixel. This procedure is so straightforward by comparison that you know exactly which operations you'll need and in which order, so you can hard-wire that into your hardware. Each piece of data can be processed by one instruction and automatically shunted to the next instruction, while the next piece of data is being shunted in. This means you can have massive amounts of data being processed in parallel, one piece per instruction, whereas a traditional algorithm is performing just 1 instruction at any one time.&#xD;&#xA;&#xD;&#xA;Before anybody jumps on me, this is of course a simplification - these days the two types of processing have converged significantly. But, the fundamental fact remains that hardware that supports complex branching code is necessarily slower than hardware that primarily or exclusively supports linear code.&#xD;&#xA;&#xD;&#xA;&gt; so why not design one chip that would take the role of both a CPU and a GPU ? &#xD;&#xA;&#xD;&#xA;Hopefully the above has explained why a dual-purpose processor is not the optimal route, in terms of performance.&#xD;&#xA;&#xD;&#xA;&gt; Instead of having two memory block and having to copy all the textures and models into the graphic memory when a game loads&#xD;&#xA;&#xD;&#xA;You are assuming this separate memory is a performance hit. In fact, it's a performance gain. The memory on your video card is essentially a very large high speed cache which allows the GPU to get very quick access to it. Not only that, but it doesn't have to compete with the CPU over that access. If it had to use main memory all the time, you'd not have that initial cost of uploading but every access would be slower, and it would have to be carefully coordinated with the rest of the system to ensure it isn't reading memory that another process is trying to write.&#xD;&#xA;&#xD;&#xA;&gt; What are you thinking ? Is it a new incoming step for computers, or just scifi ?&#xD;&#xA;&#xD;&#xA;In future, when computers are so fast that top graphics are not a significant performance problem, it may well be better to have it all on one chip, for ease of development. Until then, I think we're going to be sticking with the different approaches, except for low end systems." />
  <row Id="7571" PostHistoryTypeId="2" PostId="3853" RevisionGUID="05fd91c8-dce0-4789-8845-ac87d15157f2" CreationDate="2010-09-15T14:45:05.607" UserId="189" Text="My take on your questions:&#xD;&#xA;&#xD;&#xA; - The language is plenty quick enough. The slower Java language is used for game development. Even Python (pygame) is used for game development, and it's significantly slower than Java. It all depends on the type of game and how processor-intensive it is.&#xD;&#xA; - Garbage collection in general is not very good for games. However, Go has a particularly bad garbage collection system (mark-and-sweep) which stops the world while it cleans up stuff. It'll be difficult to cope with and will cause something of a stop-and-go framerate.&#xD;&#xA; - A decent amount of mental retooling is necessary to create games with coroutines. Graphics and logic can't be concurrent in the traditional sense; but at a smaller level, parts of the logic are great candidates for concurrent goroutines (e.g. parallel processing of AI decisions, particle systems, etc.)&#xD;&#xA; - A multiplayer game server may indeed be a great candidate for the Go language.&#xD;&#xA;&#xD;&#xA;In my opinion, if you have a strong enough urge to try writing games with a language, go for it. Obviously if you're considering it then you have a passion to do so, and why not follow that passion instead of forcing yourself to conform to the norm? I could say a lot more but I've already said a lot in [my answer the question, &quot;Is Ruby a suitable language for game development?&quot;][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3574/is-ruby-a-suitable-language-for-game-development/3586#3586" />
  <row Id="7572" PostHistoryTypeId="16" PostId="3853" RevisionGUID="05fd91c8-dce0-4789-8845-ac87d15157f2" CreationDate="2010-09-15T14:45:05.607" UserId="-1" />
  <row Id="7573" PostHistoryTypeId="5" PostId="3223" RevisionGUID="8f45d33c-80a9-493e-9c21-8a31f334dc2e" CreationDate="2010-09-15T16:42:58.060" UserId="1477" Comment="added 40 characters in body" Text="What are good game development/design blogs to follow?&#xD;&#xA;&#xD;&#xA;Please one blog per answer (make sure to provide a [link][1]) and give a brief summary as to the content of the blog posts.  &#xD;&#xA;&#xD;&#xA;If you can, pick a single article that shows high value and share a snippet of it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.example.com" />
  <row Id="7574" PostHistoryTypeId="6" PostId="355" RevisionGUID="17fc3238-7abe-4f97-9c46-b4400b53dc9e" CreationDate="2010-09-15T16:44:59.897" UserId="1477" Comment="added resources tag as ebooks can be good game development resources" Text="&lt;books&gt;&lt;free&gt;&lt;resources&gt;" />
  <row Id="7575" PostHistoryTypeId="5" PostId="3829" RevisionGUID="86cf8d0f-40cd-473b-8f28-c42e5ed13b21" CreationDate="2010-09-15T16:55:37.917" UserId="1477" Comment="added 224 characters in body" Text="A friend and I are planning on pitching an idea to venture capitalists in a few weeks at [SIEGE 2010][1]. He is handling the business plan side of things and all those related questions so I only need technical questions here. What types of things should I be prepared to answer about our project?&#xD;&#xA;&#xD;&#xA;For reference its an economic game for mobile platforms(targeting android to start with).&#xD;&#xA;&#xD;&#xA;EDIT-CLARIFICATION: I am aware that they may be more interested in non-technical questions, but my friend is handling that end. I am mainly concerned with technical questions as he should be able to field most of the rest.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.siegecon.net" />
  <row Id="7576" PostHistoryTypeId="2" PostId="3854" RevisionGUID="78d89f95-d6a3-4d13-ab6e-c8c3961c7fde" CreationDate="2010-09-15T18:11:49.583" UserId="1780" Text="The problem with your solution (I think) is that you're resolving the axes independently in the case of a collision; even though the boxes are only touching in the Y, they are overlapping in the X so this algorithm is going to try to push them apart in that axis as well.  I'm not sure if there's an &quot;easy&quot; solution to this problem and suspect that the most straight forward way to deal with it would be to split your collision detection into four &quot;modes,&quot; which is bottom, left, right, and top collision with the player.  Actually, Kaemon's answer would do this as well.&#xD;&#xA;&#xD;&#xA;The problem with general collision resolution is that it requires a lot more state than you're passing in.  What direction are the bodies moving relative to one another?  If you know that, then you can figure out what direction to push them away from one another when a collision is triggered.  You could also resolve the corners against the other box's faces, which would allow you to spin the box if you wanted to (e.g. one corner is overlapping so it stops while the other corner keeps moving) (although if you want to keep things simple this would be undesirable).&#xD;&#xA;&#xD;&#xA;The easiest way to *detect* collision in AA bodies is something like this:&#xD;&#xA;&#xD;&#xA;    for axis in [x, y, etc...]:&#xD;&#xA;       if (body1.axis.min &gt; body2.axis.max) or (body1.axis.max &lt; body2.axis.min):&#xD;&#xA;          # can't possibly be colliding&#xD;&#xA;          return false&#xD;&#xA;    &#xD;&#xA;       # must be colliding if we got here&#xD;&#xA;       return true&#xD;&#xA;&#xD;&#xA;However, this only tells you *that* the bodies are colliding, not what to do.  Again, the decision about what to do requires more information." />
  <row Id="7577" PostHistoryTypeId="5" PostId="3854" RevisionGUID="6f780aab-e04a-433a-b435-4a2b6cd127bc" CreationDate="2010-09-15T18:44:33.840" UserId="1780" Comment="added 65 characters in body" Text="The problem with your solution (I think) is that you're resolving the axes independently in the case of a collision; even though the boxes are only touching in the Y, they are overlapping in the X so this algorithm is going to try to push them apart in that axis as well.  I'm not sure if there's an &quot;easy&quot; solution to this problem and suspect that the most straight forward way to deal with it would be to split your collision detection into four &quot;modes,&quot; which is bottom, left, right, and top collision with the player.  Actually, Kaemon's answer would do this, sort of, since it'll only move along the axis that is least-penetrating.&#xD;&#xA;&#xD;&#xA;The problem with general collision resolution is that it requires a lot more state than you're passing in.  What direction are the bodies moving relative to one another?  If you know that, then you can figure out what direction to push them away from one another when a collision is triggered.  You could also resolve the corners against the other box's faces, which would allow you to spin the box if you wanted to (e.g. one corner is overlapping so it stops while the other corner keeps moving) (although if you want to keep things simple this would be undesirable).&#xD;&#xA;&#xD;&#xA;The easiest way to *detect* collision in AA bodies is something like this:&#xD;&#xA;&#xD;&#xA;    for axis in [x, y, etc...]:&#xD;&#xA;       if (body1.axis.min &gt; body2.axis.max) or (body1.axis.max &lt; body2.axis.min):&#xD;&#xA;          # can't possibly be colliding&#xD;&#xA;          return false&#xD;&#xA;    &#xD;&#xA;       # must be colliding if we got here&#xD;&#xA;       return true&#xD;&#xA;&#xD;&#xA;However, this only tells you *that* the bodies are colliding, not what to do.  Again, the decision about what to do requires more information." />
  <row Id="7578" PostHistoryTypeId="2" PostId="3855" RevisionGUID="658b9c90-1a49-4e47-b7fb-fcb92888f8bc" CreationDate="2010-09-15T19:47:50.087" UserId="1141" Text="I can see a bunch of possibilities (most of them should be mentioned by now, I guess). You can use any of them, but they work best in some kind of combination:&#xD;&#xA;&#xD;&#xA;* Make character level / age / equipment have no meaning in respect to the PvP side. This turn your game into a player skill based MMO. An example of this would be Guild Wars - or any online FPS, really. Veterans will still have an edge over total newbies, but it won't be nearly as massive as it is with the exponential power curve most DikuMUD variants (EQ and WoW included) seem to feature.&#xD;&#xA;* Make characters expand horizontally (giving them more options) as they level up instead of vertically. UO did this to a certain extent, as does EVE Online. Free Realms and Final Fantasy XIV feature a similar system with the tons of &quot;jobs&quot; / &quot;classes&quot; they have which you can freely switch between and which you level separately, though of course they aren't PvP games. A newbie can specialise and reach the same power level as a veteran in short amount of time under such a system - but *only* in his specialised area, whereas the veteran will be able to change his playing style to suit his needs and fill many different roles.&#xD;&#xA;* Make the &quot;big&quot; things to fight over (control over areas, generally) be a group activity where lower levels have good reasons to work with the highest levels. This can be done by setting everyone's level to the same number upon start of the city sieges and similar scenarios, or simply giving the lower-level characters other important things to do while the higher-levels are on the front lines - operating artillery, ships or airships might be an example.&#xD;&#xA;* Have some *very* harsh negative feedback loops preventing any single group or coalition of people from dominating a significant portion of the server.&#xD;&#xA;* Have a *huge* world, where going out into the wilderness, disappearing for a few months with your pals to build up a small country far away from the rest of the player base, unseen and unfindable until you are ready to strike back from your hidden power base is an actual possibility.&#xD;&#xA;" />
  <row Id="7579" PostHistoryTypeId="2" PostId="3856" RevisionGUID="b7a8ec87-c0fb-40f4-8e26-4f9ed7f4f300" CreationDate="2010-09-15T21:06:28.540" UserId="490" Text="**[Learn &amp; Master Cocos2d Game Development][1]** - by Steffen Itterheim&#xD;&#xA;&#xD;&#xA;Shameless plug, it's my own website, I hope you don't mind. :)&#xD;&#xA;&#xD;&#xA;I offer [insights into sales][2], [compare array performance metrics][3] and cocos2d tutorials, links and other learning materials.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.learn-cocos2d.com&#xD;&#xA;  [2]: http://www.learn-cocos2d.com/2010/08/starterkit-price-drop-sales-numbers/&#xD;&#xA;  [3]: http://www.learn-cocos2d.com/2010/09/array-performance-comparison-carray-ccarray-nsarray-nsmutablearray/" />
  <row Id="7580" PostHistoryTypeId="16" PostId="3856" RevisionGUID="b7a8ec87-c0fb-40f4-8e26-4f9ed7f4f300" CreationDate="2010-09-15T21:06:28.540" UserId="-1" />
  <row Id="7581" PostHistoryTypeId="2" PostId="3857" RevisionGUID="4560202a-91b1-4909-aa1d-e2c2d6f4c18e" CreationDate="2010-09-15T21:20:22.160" UserId="662" Text="This is how I solved it.&#xD;&#xA;&#xD;&#xA;I already knew *when* it collides. There is lots of stuff on the interwebz about the separating axis theorem. Google that and you're halfway there.&#xD;&#xA;&#xD;&#xA;Now the hard part: resolving the collision. After a good hard discussion with a teacher, we came up with the following. A collision can be resolved in four ways:&#xD;&#xA;&#xD;&#xA;* Box A moves left to resolve collision with Box B  &#xD;&#xA;* Box A moves right to resolve collision with Box B   &#xD;&#xA;* Box A moves up to resolve collision with Box B  &#xD;&#xA;* Box A moves down to resolve collision with Box B&#xD;&#xA;&#xD;&#xA;And if you take the diagonals of Box B and determine on which side of the line the other box's center is... tadaa! It still has a tiny problem though: even though logic says it should resolve a collision from the bottom, it wants to resolve it to the right. I don't know what's up with that.&#xD;&#xA;&#xD;&#xA;	uint8 Box::Resolve(Box* a_Other)&#xD;&#xA;	{&#xD;&#xA;		Vec2 diff, perp;&#xD;&#xA;&#xD;&#xA;		diff = m_Pivot - a_Other-&gt;m_Pivot;&#xD;&#xA;&#xD;&#xA;		perp.x = -a_Other-&gt;m_Min.y + a_Other-&gt;m_Pivot.y;&#xD;&#xA;		perp.y = a_Other-&gt;m_Min.x - a_Other-&gt;m_Pivot.x;&#xD;&#xA;		float d1 = perp.GetDotProduct(diff);&#xD;&#xA;&#xD;&#xA;		perp.x = -a_Other-&gt;m_Min.y + a_Other-&gt;m_Pivot.y;&#xD;&#xA;		perp.y = a_Other-&gt;m_Max.x - a_Other-&gt;m_Pivot.x;&#xD;&#xA;		float d2 = perp.GetDotProduct(diff);&#xD;&#xA;&#xD;&#xA;		// left&#xD;&#xA;		if (d1 &lt; 0 &amp;&amp; d2 &lt; 0)&#xD;&#xA;		{&#xD;&#xA;			m_Pos.x = a_Other-&gt;m_Min.x - (m_HalfHeight * 2);&#xD;&#xA;			Compute();&#xD;&#xA;&#xD;&#xA;			return BOX_LEFT;&#xD;&#xA;		}&#xD;&#xA;		// right&#xD;&#xA;		if (d1 &gt; 0 &amp;&amp; d2 &gt; 0)&#xD;&#xA;		{&#xD;&#xA;			m_Pos.x = a_Other-&gt;m_Max.x;&#xD;&#xA;			Compute();&#xD;&#xA;&#xD;&#xA;			return BOX_RIGHT;&#xD;&#xA;		}&#xD;&#xA;		// down (and right?!)&#xD;&#xA;		if (d1 &lt; 0 &amp;&amp; d2 &gt; 0)&#xD;&#xA;		{&#xD;&#xA;			m_Pos.x = a_Other-&gt;m_Max.x;&#xD;&#xA;			Compute();&#xD;&#xA;&#xD;&#xA;			return BOX_RIGHT;&#xD;&#xA;		}&#xD;&#xA;		// up&#xD;&#xA;		if (d1 &gt; 0 &amp;&amp; d2 &lt; 0)&#xD;&#xA;		{&#xD;&#xA;			m_Pos.y = a_Other-&gt;m_Min.y - (m_HalfHeight * 2);&#xD;&#xA;			Compute();&#xD;&#xA;&#xD;&#xA;			return BOX_UP;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		return BOX_NONE;&#xD;&#xA;	}" />
  <row Id="7582" PostHistoryTypeId="6" PostId="3850" RevisionGUID="1d7f7474-9f92-4091-80ab-6ab60658e829" CreationDate="2010-09-15T21:44:22.377" UserId="18" Comment="Added go tag" Text="&lt;language-choice&gt;" />
  <row Id="7583" PostHistoryTypeId="2" PostId="3858" RevisionGUID="a89d78c8-a83b-4e9b-99e9-17848092c659" CreationDate="2010-09-15T21:45:58.283" UserId="2150" Text="I guess it really depends on what exactly your goal is.  Are you trying to do a quick little game before you get to school?  or are you interested in really learning how to make games and become a &quot;game programmer&quot;?  If it's the former, then definitely check out some of the popular free/open source engines, but remember that some of them (like Ogre3d) are actually just rendering engines, and will help you get things on the screen, but won't help you do a whole lot else.  These rendering engines provide a whole bunch of more advanced rendering features that a small  &quot;learning project&quot; doesn't really need, but they add substantial complexity because of it.&#xD;&#xA;&#xD;&#xA;As an example, if you're just trying to learn the basics of 3d game programming you're probably going to be less interested in a having a robust material/shader system than you are having basic collision detection and response.&#xD;&#xA;&#xD;&#xA;If you are more interested in becoming a game programmer and becoming good at it, I would recommend not using any of the popular engines and instead start writing your own.  It's going to be slow, ugly, and probably just plain bad (mine was), but you'll learn an immense amount.  Go download some samples for your graphics API of choice, read some tutorials, and start with the basics.  Get one object on screen, then multiple objects, then try and get them to collide with each other.  Add layers of abstraction, add features, rinse and repeat.  You'll learn something with every iteration and you'll accumulate far more knowledge than if you let someone else do the hard bits for you.  You'll also get a ton of great code samples and demo pieces to show potential employers (if you choose to go that route).&#xD;&#xA;&#xD;&#xA;As the title of your question says, &quot;nothing is better than practice&quot;." />
  <row Id="7584" PostHistoryTypeId="2" PostId="3859" RevisionGUID="dcb93d66-80a1-4f84-87d0-cf0f4f6af55e" CreationDate="2010-09-15T22:02:36.010" UserDisplayName="Alan McCloud" Text="I got couple of 2 .max files that were created on 2008 version of 3ds Max. The files are really very simple 3d models of room and furniture item.&#xD;&#xA;&#xD;&#xA;I am using blender 2.53 beta.&#xD;&#xA;&#xD;&#xA;I have 3ds Max 2011 version. Using this version I exported the model to Autodesk Collada (.dae file) and also to .OBJ files but neither work with blender 2.53. In blender I can import the files but most details are gone and wall edges look like annoying zig zag pattern and look worse than a silly cartoon.&#xD;&#xA;&#xD;&#xA;Even tried exporting to old .3ds format but that gives more problems.&#xD;&#xA;&#xD;&#xA;I looked at 3ds max collada plugin :&#xD;&#xA;http://update.multiverse.net/wiki/in...COLLADA_Plugin&#xD;&#xA;but it is not compatible with 3ds Max 2011 version.&#xD;&#xA;&#xD;&#xA;So I am confused what to do as I am new to blender and 3d. What is the best way to export from 3ds max when opening exisitng 3ds max 2008 version models and importing to blender 2.53?&#xD;&#xA;&#xD;&#xA;The models have simple lights and no animation is involved." />
  <row Id="7585" PostHistoryTypeId="1" PostId="3859" RevisionGUID="dcb93d66-80a1-4f84-87d0-cf0f4f6af55e" CreationDate="2010-09-15T22:02:36.010" UserDisplayName="Alan McCloud" Text="importing 3ds max ( .max) file into blender" />
  <row Id="7586" PostHistoryTypeId="3" PostId="3859" RevisionGUID="dcb93d66-80a1-4f84-87d0-cf0f4f6af55e" CreationDate="2010-09-15T22:02:36.010" UserDisplayName="Alan McCloud" Text="&lt;collada&gt;&lt;blender&gt;" />
  <row Id="7587" PostHistoryTypeId="6" PostId="3829" RevisionGUID="62f6f13b-17fa-4177-ac91-abfa0135869c" CreationDate="2010-09-15T22:58:20.163" UserId="1477" Comment="added tags now that i have enough rep" Text="&lt;techncal&gt;&lt;venture-capitalist&gt;&lt;fund-raising&gt;" />
  <row Id="7588" PostHistoryTypeId="2" PostId="3860" RevisionGUID="d3960fec-157b-46d6-9a9d-ba20d99147a4" CreationDate="2010-09-15T23:05:32.243" UserId="1780" Text="Unfortunately the only way to export 3DSMAX files is with a plugin (or script) running inside of 3DSMAX itself.  The Collada file *should* be the way to go, and maybe the Blender importer is just incorrect.  OBJ and 3DS files are very simple and should Just Work, maybe you can export to OBJ and edit it by hand to &quot;fix&quot; problem areas?  (It's just a text file so you can edit it in a text editor.)" />
  <row Id="7589" PostHistoryTypeId="2" PostId="3861" RevisionGUID="b12ba588-249b-4f92-8d13-0f4ebf5e4c81" CreationDate="2010-09-15T23:26:39.257" UserId="2141" Text="Raycasting and collision detection is a smaller subset of a physics engine. Therefore most people use physics engines for this task and they generally have a good implementation of these functions.&#xD;&#xA;&#xD;&#xA;You can use the the collisions detection and raycasting features of a physics engine without using the Rigid Body dynamics part. For example Bullet has a btCollisionWorld class that just does the basic collision and raycasting. btDynamicsWorld is built on top of that.&#xD;&#xA;&#xD;&#xA;ODE (another popular but older physics engine) uses OPCODE (downloadable as a separate library) for its collision and raycasting." />
  <row Id="7590" PostHistoryTypeId="2" PostId="3862" RevisionGUID="a83357c0-75fe-443a-bf29-c2712eb50698" CreationDate="2010-09-16T00:00:56.370" UserId="302" Text="I'm mostly a programmer, but I'd like to be able to do competent work on other parts of games I make when working on solo projects.&#xD;&#xA;&#xD;&#xA;What I'm specifically asking here is what sort of techniques or styles for visual asset creation should I study and use to be able to work with the most efficiency? Basically, what would end up being the least work as a whole, taking into account possible changes late on in the development, reuse of assets created for other projects, etc.&#xD;&#xA;&#xD;&#xA;What I mean by &quot;technique or style&quot; here is things like vector art, digital painting, pixel art, poly modeling, sculpting, etc. &#xD;&#xA;&#xD;&#xA;I'm mostly interested in comparisons of the various techniques as a whole. It's hard to get a good big picture view of the situation not having a lot of experience with doing real work with each technique. Also, obviously if you're making a 3D game you'll need to make 3D assets, but for now, let's talk about techniques for creating assets for a 2D game, where the assets could be either 2D or 3D.&#xD;&#xA;&#xD;&#xA;Here are some points I came up with myself:&#xD;&#xA;&#xD;&#xA;**Digital painting:**&#xD;&#xA;&#xD;&#xA; - Flexible for lots of visual styles&#xD;&#xA; - Lots of resources available for learning&#xD;&#xA; - Scales decently&#xD;&#xA;&#xD;&#xA;**Vector art:**&#xD;&#xA; &#xD;&#xA; - Easy to edit&#xD;&#xA; - Scales very well&#xD;&#xA; - Relatively easy to animate&#xD;&#xA;&#xD;&#xA;**Pixel art:**&#xD;&#xA; &#xD;&#xA; - Classic &quot;game look&quot;&#xD;&#xA; - Relatively easy to work with at low resolutions&#xD;&#xA; - Very very laborious at higher resolutions&#xD;&#xA; - Does not scale at all. Better have that sprite size locked up by the time you draw it.&#xD;&#xA;&#xD;&#xA;**3D in general:**&#xD;&#xA;&#xD;&#xA; - More work than 2D&#xD;&#xA; - After the model is created and rigged, making animations is easy in comparison. No redrawing.&#xD;&#xA;&#xD;&#xA;**Poly modeling:**&#xD;&#xA;&#xD;&#xA; - Specifically suited for angular geometric looking objects&#xD;&#xA;&#xD;&#xA;**Sculpting:**&#xD;&#xA;&#xD;&#xA; - Easier to create complex models than with poly modeling&#xD;&#xA; - Specifically well suited for smooth organic looking things&#xD;&#xA;" />
  <row Id="7591" PostHistoryTypeId="1" PostId="3862" RevisionGUID="a83357c0-75fe-443a-bf29-c2712eb50698" CreationDate="2010-09-16T00:00:56.370" UserId="302" Text="Style/technique to focus on for creating visual art assets efficiently" />
  <row Id="7592" PostHistoryTypeId="3" PostId="3862" RevisionGUID="a83357c0-75fe-443a-bf29-c2712eb50698" CreationDate="2010-09-16T00:00:56.370" UserId="302" Text="&lt;graphics&gt;&lt;2d&gt;&lt;assets&gt;&lt;art&gt;" />
  <row Id="7593" PostHistoryTypeId="2" PostId="3863" RevisionGUID="14bb8b5f-5a48-4d4e-a194-5c08452571e8" CreationDate="2010-09-16T00:23:53.940" UserId="162" Text="In addition to the factors above I can think of 2 questions I would expect to be able to answer. Remember, VCs care most about the possible financial windfall on large-scale success so expect to be able to answer:&#xD;&#xA;&#xD;&#xA; - How would your game/technology work if scaled to hundreds of thousands of players? For instance if your game has some sort of multiplayer component they would be concerned that your design may not scale above 10000 customers, which would not make it worth it to most VCs, who are looking for potentially big wins.&#xD;&#xA; - Can your technology become a &quot;platform&quot; for other types of experiences? VCs like platforms that can be the basis of a variety of experiences as opposed to just a single implemented game with no room for branching out." />
  <row Id="7594" PostHistoryTypeId="5" PostId="3796" RevisionGUID="ae17be0d-083d-4f1e-9b89-886ecf1f8c10" CreationDate="2010-09-16T01:17:32.543" UserId="919" Comment="added 3 characters in body" Text="Possible things I did in class before&#xD;&#xA;&#xD;&#xA;1. I would draw on paper it help you get ideas&#xD;&#xA;&#xD;&#xA;2. Think of a game design and play it on paper or in my head.&#xD;&#xA;&#xD;&#xA;3. Questioning the lecture is always helpful to warrant discussion to make things interesting it also builds communication skills. " />
  <row Id="7595" PostHistoryTypeId="2" PostId="3864" RevisionGUID="572a6872-c6db-4485-a37a-196bd9b80544" CreationDate="2010-09-16T06:44:36.513" UserId="1251" Text="I am looking for a place in the web where I can turn my current game development process into a vector based approach. I am sorry If this question has been asked once.&#xD;&#xA;&#xD;&#xA;According to my google search analysis, few places I've found pretty interesting are Tony Pa's tutorials and Metanet. But, due to limited explanations, I found it little bit tough to implement. I could try out the same examples as provided there, but when I have to use it in my games, I am STUCK. I want to know about the dot products and cross product stuff, Its uses and detecting collisions and predicting collisions with these mathematical techniques.&#xD;&#xA;&#xD;&#xA;Please, write down some links and a brief description of the link. Thank you" />
  <row Id="7596" PostHistoryTypeId="1" PostId="3864" RevisionGUID="572a6872-c6db-4485-a37a-196bd9b80544" CreationDate="2010-09-16T06:44:36.513" UserId="1251" Text="A good place to learn about Game Programming with Mathematical Vectors?" />
  <row Id="7597" PostHistoryTypeId="3" PostId="3864" RevisionGUID="572a6872-c6db-4485-a37a-196bd9b80544" CreationDate="2010-09-16T06:44:36.513" UserId="1251" Text="&lt;2d-physics&gt;&lt;math&gt;&lt;game-mechanics&gt;" />
  <row Id="7598" PostHistoryTypeId="2" PostId="3865" RevisionGUID="7ba7413c-c158-4e7f-bf87-f793f79afd6e" CreationDate="2010-09-16T06:57:56.390" UserId="734" Text="Here you go: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;&#xD;&#xA;This is the first entry in a series of (4) blog posts about linear algebra pertaining to game development. It'll explain about dot products, cross products and transformations using matrices." />
  <row Id="7599" PostHistoryTypeId="2" PostId="3866" RevisionGUID="240a93e2-f9af-44b4-b0a9-c2b445462f76" CreationDate="2010-09-16T07:58:11.457" UserId="192" Text="again. This question is strictly related to [this one][1] so, what is the technology that makes physics engines suitable for raycasting? It is a particular data structure? Has it to do with the engine's internal representation of the objects? If so, how do they represent objects so to be able to make polygon-precise raycasting? Do they hold the whole information about a mesh?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3845/why-do-we-use-physics-engines-for-collision-testing-or-raycasting" />
  <row Id="7600" PostHistoryTypeId="1" PostId="3866" RevisionGUID="240a93e2-f9af-44b4-b0a9-c2b445462f76" CreationDate="2010-09-16T07:58:11.457" UserId="192" Text="What are the technologies that makes physics engines so good for raycasting?" />
  <row Id="7601" PostHistoryTypeId="3" PostId="3866" RevisionGUID="240a93e2-f9af-44b4-b0a9-c2b445462f76" CreationDate="2010-09-16T07:58:11.457" UserId="192" Text="&lt;collision-detection&gt;&lt;performance&gt;&lt;physics-engine&gt;&lt;ray-casting&gt;&lt;data-structure&gt;" />
  <row Id="7602" PostHistoryTypeId="2" PostId="3867" RevisionGUID="779f881d-20f1-40b5-be50-2b34a39a77b8" CreationDate="2010-09-16T08:23:13.367" UserId="2022" Text="This is not a pure web site, but you can view some of the contents of Mathematics for 3D Game Programming &amp; Computer Graphics at Google Books here: [Mathematics for 3D Game Programming &amp; Computer Graphics][1].&#xD;&#xA;&#xD;&#xA;This is a very good book and well worth purchasing if you don't find a website to suit your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=bfcLeqRUsm8C&amp;printsec=frontcover&amp;dq=Mathematics+for+3D+Game+Programming+%26+Computer+Graphics&amp;hl=en&amp;ei=MdORTKncHpqK4ga177SfBA&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CDYQ6AEwAA" />
  <row Id="7603" PostHistoryTypeId="2" PostId="3868" RevisionGUID="77406377-d895-4ef4-9d19-1ac48ad97f69" CreationDate="2010-09-16T09:10:48.150" UserId="2134" Text="If you don't mind making some controls yourself and whish to have many custom controls and looks check out **[Scaleform](http://www.scaleform.com/)**. It's one of the leading in games menus UI.&#xD;&#xA;&#xD;&#xA;You may think of it like a in-game Flash player." />
  <row Id="7604" PostHistoryTypeId="2" PostId="3869" RevisionGUID="dd67b670-9e80-4911-a4c9-8911b5fd0dc4" CreationDate="2010-09-16T09:14:17.033" UserId="2022" Text="I don't think there are specific technologies that are *exlusive* to physics engines which makes them so good for [Ray Casting][1].  It's more the fact that in general they have very good ray casting capabilities because that's what they use to determine collisions between objects in the simulation.  These have generally been optimised and tested pretty well as they're a fundamental component to a physics simulation.&#xD;&#xA;&#xD;&#xA;Why re-invent the wheel if you can leverage existing, fast and well tested libraries?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Ray_casting" />
  <row Id="7605" PostHistoryTypeId="2" PostId="3870" RevisionGUID="8076b92d-e6f7-4305-a8b8-c7e7b830077f" CreationDate="2010-09-16T09:37:58.650" UserId="744" Text="Good physics engines:&#xD;&#xA;&#xD;&#xA; * Use algorithms and data structures with good theoretical (&quot;big-O&quot;) properties.&#xD;&#xA; * Use specific memory allocators and data layouts for improved cache efficiency.&#xD;&#xA; * Use microoptimized code, that not just has good big-O runtime but is also known to generate efficient code on real compilers / machines (e.g. SIMD and specialized instructions like fsel).&#xD;&#xA; * Use a variety of good spatial subdivision techniques (octrees, BSP trees, spatial hashes).&#xD;&#xA; * Use different levels of checks of various costs (e.g. first AABB, then tri-tri).&#xD;&#xA;" />
  <row Id="7606" PostHistoryTypeId="2" PostId="3871" RevisionGUID="3bdbd9e6-b065-4157-b3a2-140dfdf43fab" CreationDate="2010-09-16T09:40:11.490" UserId="659" Text="So many indies go for the lo-fi pixel art look. While this is great for rapid prototyping and time-limited gamedev competitions, I think it's becoming an overused style, and you'll struggle to make a real stand-out game, unless the gameplay is something truly special. &#xD;&#xA;&#xD;&#xA;Digital painting is currently somewhat underused in 2D games, and there's a lot of potential for interesting (and hi-def) 2D game backgrounds if you abandon tilemaps and go for the Braid/Aquaria approach (splatting arbitrary alpha-blended shapes around your level)&#xD;&#xA;&#xD;&#xA;But animation is challenging - unless you can come up with a way to (pre-)render 3D characters in a style that fits the backgrounds?&#xD;&#xA;&#xD;&#xA;Good quality 'traditional 3D' is always going to be extremely time-consuming, especially when you consider things like animation, or building and UV-mapping large scenes. You won't be able to come close to competing with the quality/scale of big commercail games. However, there are less traditional 3D styles that you could explore - maybe non-photorealistic styles (e.g. Love), or untextured 3D (e.g. Virtua Racing), an interesting style which is currently underused, and could still look impressive with good lighting/post effects/antialiasing.&#xD;&#xA;&#xD;&#xA;This is a must-read for anyone starting out on a 2D game project:&#xD;&#xA;&#xD;&#xA;http://www.davidhellman.net/blog/the-art-of-braid-index/" />
  <row Id="7607" PostHistoryTypeId="4" PostId="1576" RevisionGUID="6f903c62-b8af-4cbb-8e67-d3b538b3c2ab" CreationDate="2010-09-16T10:09:38.710" UserId="252" Comment="edited title" Text="How to compile Darwinia compile under Linux?" />
  <row Id="7608" PostHistoryTypeId="2" PostId="3872" RevisionGUID="3136c561-d96c-4faa-8de3-2ca4c29ae73f" CreationDate="2010-09-16T10:59:55.773" UserId="1101" Text="In MUDs it was common to physically disallow PvP between characters who aren't of a similar level. +/- 5 levels was a common range (in games which normally had 50 or 60 levels).&#xD;&#xA;&#xD;&#xA;A more subtle approach is to not block this behaviour but punish it. Your reputation could drop if you prey on weaker players, bounties could be put on your head, etc." />
  <row Id="7609" PostHistoryTypeId="2" PostId="3873" RevisionGUID="edf2b276-69f1-4ead-a296-8701c66bab4c" CreationDate="2010-09-16T11:19:55.607" UserId="1352" Text="Some suggestions:&#xD;&#xA;&#xD;&#xA;You could try with minimalistic 2D vector graphics.&#xD;&#xA;Look to games like flow, eufloria and limbo for inspiration.&#xD;&#xA;&#xD;&#xA;If you want to go for a hand-drawn look you can manage with minimalistic vector 2d + a &#xD;&#xA;hand-draw-look-shader which could apply a noise function to all your lines.&#xD;&#xA;&#xD;&#xA;I prefer making vector graphics over painting due to the the ability to rescale as I see fit, and the ability to reuse graphics components between sprites." />
  <row Id="7610" PostHistoryTypeId="5" PostId="3808" RevisionGUID="27a40e43-0ecc-4074-8306-b37e4eaaefc4" CreationDate="2010-09-16T11:21:16.837" UserId="1829" Comment="Asking something else or pretty just the same, but differently." Text="Since the early days of accelerated graphics, programmers were obligated to use hardware-supported libraries like directX or OpenGL.&#xD;&#xA;&#xD;&#xA;If we wanted to explain someone what happened by introducing a graphic chip, the simple thing to say is &quot;we just copy the 3D data into a new memory, where another processor will take care of it, because this one processor is just faster at it&quot;.&#xD;&#xA;&#xD;&#xA;During this period, the processors have never ceased to evolve in term of speed and power.&#xD;&#xA;Today with the upcoming of multiple core processors, x86 is still there, graphic card get more power, and are now taking the role of a CPU with tools like OpenCL and CUDA.&#xD;&#xA;&#xD;&#xA;Back in the year, the AGP port speed was quite important, and PCI-express gave another big boost.&#xD;&#xA;&#xD;&#xA;I didn't heard a lot about AMD Fusion, but the idea might have come into the mind of any computer engineer:&#xD;&#xA;Since the heavy calculations made in a computer are either graphical or not, we separate them into 2 dedicated chips.&#xD;&#xA;&#xD;&#xA;But nowadays, any computer power is needed for both, especially in 3D games: to put it simply, at the beginning computer were just dealing with text, but today they all deal with at least 2d graphics, so why not design one chip that would take the role of both a CPU and a GPU ? Instead of having two memory block and having to copy all the textures and models into the graphic memory when a game loads, the &quot;CGPU&quot; would have some GDDR3, instead of having two separate memories, again cutting costs.&#xD;&#xA;&#xD;&#xA;I still wonder how this AMD fusion will have to be used from a programmer viewpoint, but I wonder that the graphic library would be somewhat easier to deal with that directX or OpenGL, since we would program just one processor.&#xD;&#xA;&#xD;&#xA;Is it right to think that this kind of dedicated hardware would also potentially just be faster for 3D games ?&#xD;&#xA;&#xD;&#xA;Pro:&#xD;&#xA;Single memory, no more AGP transfers, simple for the 3D programmer, cheaper to build.&#xD;&#xA;Cons:&#xD;&#xA;Complicated to come with such hardware, long and expensive research because of both new hardware AND software standards.&#xD;&#xA;&#xD;&#xA;What are you thinking ? Is it a new incoming step for computers, or just scifi ?&#xD;&#xA;&#xD;&#xA;EDIT: Since I got an appropriate answerm I leave the question as I wrote it, I just add something to it:&#xD;&#xA;&#xD;&#xA;Since all computers, and especially consoles, require graphics acceleration, and since it requires a lot of transistor, and with the upcoming of tools like CUDA and OpenCL, why no industrial has yet come with a &quot;gaming chip&quot;, some sort of processor with an integrated graphic card, but nothing like a low-end chip; something more like an all-in-one processor unit, with the GPU and the CPU on the same die, but still clearly separated ?&#xD;&#xA;&#xD;&#xA;Since the playstation 3 has dedicated chips and since games requires that extra power desktops or servers don't, can it reduce costs and give a little boost ?" />
  <row Id="7611" PostHistoryTypeId="2" PostId="3874" RevisionGUID="ea4f25d8-d80f-4893-933b-17e51d21dde3" CreationDate="2010-09-16T11:48:13.523" UserId="323" Text="Eve Online actually has several different solutions, all intermixed nicely.&#xD;&#xA;&#xD;&#xA;First off, while your character gets &quot;more powerful&quot;, it's not really getting all *that* much more powerful over time. The first few weeks of training (which, keep in mind, happens offline) give you access to most of the basic cheap powerful ships. You can pump months into some specialty niche topics, giving you more powerful ships, but those more powerful ships are far, *far* more expensive.&#xD;&#xA;&#xD;&#xA;Second, Eve Online supports and strongly encourages group play, and groups are vastly stronger than solo fighters. Ten players with hundred-million-isk ships (&quot;isk&quot; is the game currency) can easily take down someone in a billion-isk ship. In fact, ten players in ten-million-isk ships can probably take down a billion-isk ship. Goonswarm, one of the most powerful alliances in-game for some time, got its start and its military backbone with sheer untrained numbers.&#xD;&#xA;&#xD;&#xA;Third, you don't have to gamble a lot on PvP if you don't want to. Those low-tech easily-trained ships won't cause you to lose much if you get blown up. The later high-tech ships will cause you to lose huge amounts, but nobody's forcing you to use them, you can keep on using the cheap less-powerful ships. While your skills definitely give you significant edges in combat, with a lot of 10-20%'s here and there that add up quickly, the second biggest determiner of your combat abilities is the hull and gear you're using, so a six-year-trained pilot in a cheap ship will still rapidly lose to a six-month-trained pilot in a pricey ship.&#xD;&#xA;&#xD;&#xA;(The biggest determiner is the player skill, of course - sheer character skill points comes as a rather distant third.)&#xD;&#xA;&#xD;&#xA;I haven't seen any attempt to import these mechanics into a conventional fantasy MMORPG, but I think doing so could be extremely fun and interesting." />
  <row Id="7612" PostHistoryTypeId="2" PostId="3875" RevisionGUID="db421428-b4a7-4b0d-a9c3-05962b94584b" CreationDate="2010-09-16T11:48:45.303" UserId="262" Text="You have probably noticed by now, but I thought I would add that you can now choose when you submit your app to:&#xD;&#xA;&#xD;&#xA;- Release app into the app store as soon as it is approved.&#xD;&#xA;- Ask from developer approval for release once it has been approved by Apple.&#xD;&#xA;&#xD;&#xA;This means you don't have to play guessing games about when your app is going to be approved. Just set the flag and release when you are ready." />
  <row Id="7613" PostHistoryTypeId="2" PostId="3876" RevisionGUID="fd48ab13-8355-41b3-9949-926acbb8f5e4" CreationDate="2010-09-16T11:53:28.593" UserId="262" Text="A unique graphical aesthetic is obviously important when developing a game.  I wonder if the same is true for audio?  Is it worth investing my time in recording, producing my own sounds or should I just buy stock effects?" />
  <row Id="7614" PostHistoryTypeId="1" PostId="3876" RevisionGUID="fd48ab13-8355-41b3-9949-926acbb8f5e4" CreationDate="2010-09-16T11:53:28.593" UserId="262" Text="Is it worthwhile recording your own or buying stock sound effects?" />
  <row Id="7615" PostHistoryTypeId="3" PostId="3876" RevisionGUID="fd48ab13-8355-41b3-9949-926acbb8f5e4" CreationDate="2010-09-16T11:53:28.593" UserId="262" Text="&lt;sound&gt;" />
  <row Id="7616" PostHistoryTypeId="2" PostId="3877" RevisionGUID="f68bf6ed-439b-4b21-b222-889a613f2ca0" CreationDate="2010-09-16T12:10:25.300" UserId="1875" Text="I have a MIDI keyboard with hundreds of sounds effects that I can use as I wish - or at least that is way I understand the terms of usage for it - so if you already have a source for effects and know how to make your sound files, save the money.  However, if you aren't setup for that (my keyboard was about $200) then buying sound effects packs is a quick and easy way to go. I use the Torque game engine and there is some very cool sound packs available for Torque, buy YMMV depending on development tools.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7617" PostHistoryTypeId="2" PostId="3878" RevisionGUID="d38f76b5-1117-4841-aa21-c6e0986accb5" CreationDate="2010-09-16T12:38:50.937" UserId="2022" Text="I think you really need both.&#xD;&#xA;&#xD;&#xA;For example, it's quite easy to generate a ship engine's rumble using a white-noise generatar and applying a low-pass filter to this.  However, you may find it difficult to get out and record the sound of trains going over tracks, so a stock sample my be more useful in that instance.&#xD;&#xA;&#xD;&#xA;Of course, learning how to post-process sounds is very important so you can tweak stock sounds for your own use.  As another example, I created the sound effect for one of the bad guys (the Feedback Monster) in Jeff Minter's Space Giraffe.  This effect ended up being a combination of a stock recording of some thunder, but then it was processed and I added several samples of guitar feedback that I recorded with my collection of guitars and amps.  Along with various EQs, delays and reverbs, etc." />
  <row Id="7618" PostHistoryTypeId="5" PostId="3878" RevisionGUID="71d10ace-a515-4568-abb0-aca73fdd24ef" CreationDate="2010-09-16T12:49:21.117" UserId="2022" Comment="fixed typo" Text="I think you really need both.&#xD;&#xA;&#xD;&#xA;For example, it's quite easy to generate a ship engine's rumble using a white-noise generator and applying a low-pass filter to this.  However, you may find it difficult to get out and record the sound of trains going over tracks, so a stock sample my be more useful in that instance.&#xD;&#xA;&#xD;&#xA;Of course, learning how to post-process sounds is very important so you can tweak stock sounds for your own use.  As another example, I created the sound effect for one of the bad guys (the Feedback Monster) in Jeff Minter's Space Giraffe.  This effect ended up being a combination of a stock recording of some thunder, but then it was processed and I added several samples of guitar feedback that I recorded with my collection of guitars and amps.  Along with various EQs, delays and reverbs, etc." />
  <row Id="7619" PostHistoryTypeId="2" PostId="3879" RevisionGUID="b9dc777a-911f-47e2-9922-9ea467c51f10" CreationDate="2010-09-16T13:28:51.707" UserId="1288" Text="I like to follow this rule of thumb:&#xD;&#xA;&#xD;&#xA; 1. **Use off-the shelf components wherever possible.**&#xD;&#xA; 2. **Replace them with unique elements as necessary!**&#xD;&#xA;&#xD;&#xA;We've [recently][1] used a lot of stock music from [IB Audio][2], and stock effects from [Sound Ideas][3] and [Sound Dogs][4].&#xD;&#xA;&#xD;&#xA; - **Music:** Places like IB Audio are nice, because they provide solid music at prices far below what we'd pay to have pieces created for us.&#xD;&#xA; - **SFX Collections:** CD/DVD effects collections such as Sound Ideas' are great, because we have access to the same, quality, royalty-free libraries that the big Hollywood studios use.&#xD;&#xA; - **Individual Effects:** We use Sound Dogs because they provide a la carte effects, which means that when we've needed a single sample of cheering spectators, we had it.&#xD;&#xA;&#xD;&#xA;This gives us the ability to focus on dev elements such as gameplay and concept testing. And, when we want to create something unique, such as a theme song or a sound effect of a space toilet being flushed into another space toilet, we can do that too.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dejobaan.com/aaaaa&#xD;&#xA;  [2]: http://www.ibaudio.com/&#xD;&#xA;  [3]: http://www.sound-ideas.com/&#xD;&#xA;  [4]: http://www.sounddogs.com/" />
  <row Id="7620" PostHistoryTypeId="2" PostId="3880" RevisionGUID="a521c384-90ce-4948-afb6-970b177830d7" CreationDate="2010-09-16T13:34:39.600" UserId="2132" Text="Long ago there was this web-based game called Utopia (and I'm sure it is still around), turns are by per hour. You only get new gold/lumber or what-not every hour.&#xD;&#xA;&#xD;&#xA;Some newer web based games have resources incrementing in finer resolution, like per minute. So say a player has a food production rate of 5 per minute - the player will have his food amount incrementing every minute. I am not sure if it is wise to constantly set a CRON job to update the SQL database, which I am assume what they are using, as it is web-based. Perhaps I am wrong, every minute.&#xD;&#xA;&#xD;&#xA;What techniques do those web-based games use?&#xD;&#xA;" />
  <row Id="7621" PostHistoryTypeId="1" PostId="3880" RevisionGUID="a521c384-90ce-4948-afb6-970b177830d7" CreationDate="2010-09-16T13:34:39.600" UserId="2132" Text="What techniques enable web based games to update player's resources frequently?" />
  <row Id="7622" PostHistoryTypeId="3" PostId="3880" RevisionGUID="a521c384-90ce-4948-afb6-970b177830d7" CreationDate="2010-09-16T13:34:39.600" UserId="2132" Text="&lt;web&gt;&lt;databases&gt;" />
  <row Id="7623" PostHistoryTypeId="2" PostId="3881" RevisionGUID="1ba9728a-ca2d-4816-9dee-9691ff7d0ba2" CreationDate="2010-09-16T13:45:22.977" UserId="189" Text="I am in favor of [KISS][1]: &quot;Keep It Simple, Stupid!&quot;&#xD;&#xA;&#xD;&#xA;I see no reason why a cron job wouldn't work, and the upside is that cheap web hosting options often don't let you directly run commands, but they do allow you to run cron commands. So there's no need for an expensive dedicated server.&#xD;&#xA;&#xD;&#xA;You can also do your update code in PHP or your language of preference, by having the cron command either `wget --spider http://yoursite.com/secretphppage.php` or use the `lynx` text browser. The instructions at [Configuring cron jobs][2] have several example commands which you could use to ping your own page at an interval.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/KISS_principle&#xD;&#xA;  [2]: http://drupal.org/cron" />
  <row Id="7624" PostHistoryTypeId="2" PostId="3882" RevisionGUID="8fcd0bd2-be04-45d0-8404-2bc7d8cc70bf" CreationDate="2010-09-16T14:01:06.477" UserId="1288" Text="I feel that small development teams do best when they go by this rule:&#xD;&#xA;&#xD;&#xA; 1. **Take a look at what all the big studios are doing.**&#xD;&#xA; 2. **Head in exactly the opposite direction.**&#xD;&#xA;&#xD;&#xA;If EA, Sony, and Microsoft are all going for the [hyper-realistic][1] aesthetic, how about something hyper-unrealistic? Indies have, lately, had a lot of success with [pixel art][2] (though the resurgence in that style means that (perhaps) that's something to steer clear of as well!). Since you're a programmer, why not leverage that to create something unique? A corrolary to the above rules:&#xD;&#xA;&#xD;&#xA; - **If everyone's using one tool, consider using or building a different one.**&#xD;&#xA;&#xD;&#xA;So, for aesthetic, we're in the process of developing a [surreal, geometric-looking aesthetic][3] for our upcoming title. And since, by and large, we're not artists, the approach is to do this procedurally, so we've been [experimenting][4] with math. For instance, we've built a [node-based utility][5] so that non-artists can create interesting 3d models.&#xD;&#xA;&#xD;&#xA;You've covered a good range of styles, from vector art to pixel art. As you're a programmer first, you might look into creating your own style programmatically. Some examples of this:&#xD;&#xA;&#xD;&#xA; - **Structure Synth** uses [context free grammar systems][6] to generate visuals.&#xD;&#xA; - **[Genetica][7]** uses a [graph][8] interface to build textures.&#xD;&#xA; - **Eskil Steenberg** uses really simple 3D models and applies a full-screen shader for a painterly effect for a unique aesthetic in [Love][9].&#xD;&#xA;&#xD;&#xA;There's a lot of great stuff yet to be discovered, and I think programmers (or, better yet, a programmer and someone with an artistic eye to consult) are in a great place to find/create/develop it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/images?q=crysis&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=en&amp;tab=wi&amp;biw=1261&amp;bih=766&#xD;&#xA;  [2]: http://www.google.com/images?um=1&amp;hl=en&amp;safe=off&amp;biw=1261&amp;bih=766&amp;tbs=isch:1&amp;sa=1&amp;q=pixel+art&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=k6L8li9p5kw&#xD;&#xA;  [4]: http://www.flickr.com/photos/dejobaan/sets/72157623385216189/&#xD;&#xA;  [5]: http://www.synthscribe.com/media/ding_atop_maya.png&#xD;&#xA;  [6]: http://www.flickr.com/groups/structuresynth/pool/&#xD;&#xA;  [7]: http://www.spiralgraphics.biz/genetica/help/index.htm?interface.htm&#xD;&#xA;  [8]: http://en.wikipedia.org/wiki/Graph_theory&#xD;&#xA;  [9]: http://www.quelsolaar.com/love/screen_shots.html" />
  <row Id="7625" PostHistoryTypeId="4" PostId="3850" RevisionGUID="b4fdc417-38ed-4879-b7c4-6d1afe92363b" CreationDate="2010-09-16T14:21:57.100" UserId="369" Comment="Changed title" Text="Developing games in Go?" />
  <row Id="7626" PostHistoryTypeId="2" PostId="3883" RevisionGUID="c41334a6-cbd3-4d2e-be8f-395f5f7ac2d6" CreationDate="2010-09-16T14:30:00.873" UserId="119" Text="If you have any kind of budget to spend on your game, you can probably just buy them in. A sound effect from a website like http://www.soundrangers.com costs about $5 to license. You'll need maybe 50 in your game? That's $250. 50 sounds would probably take at least 2 days to record, and you might not end up with the best quality if you're new to it. If 2 days of your time is worth more than $250, buy them in." />
  <row Id="7627" PostHistoryTypeId="5" PostId="3880" RevisionGUID="c98f3460-681c-4202-97c6-2b4245f29d94" CreationDate="2010-09-16T15:54:44.287" UserId="2132" Comment="added 64 characters in body" Text="Long ago there was this web-based game called Utopia (and I'm sure it is still around), turns are by per hour. You only get new gold/lumber or what-not every hour.&#xD;&#xA;&#xD;&#xA;Some newer web based games have resources incrementing in finer resolution, like per minute. So say a player has a food production rate of 5 per minute - the player will have his food amount incrementing every minute. I am not sure if it is wise to constantly set a CRON job to update the SQL database, which I am assume what they are using, as it is web-based. Perhaps I am wrong, every minute.&#xD;&#xA;&#xD;&#xA;What techniques do those web-based games use? **Added on Edit:** And can database can really handle the load?&#xD;&#xA;" />
  <row Id="7628" PostHistoryTypeId="2" PostId="3884" RevisionGUID="34851784-6836-46b0-8871-b804511b2a81" CreationDate="2010-09-16T16:01:29.550" UserId="1700" Text="I am working on an online game that will have very heavy collision detection processing. Player models will collide with other players, mobs, structures, terrain, and solid objects that only exist server side (not stored in client data files).&#xD;&#xA;&#xD;&#xA;For security purposes, should I do all collision detection server-side? Or should I have the client do the detection and have the server follow up on it somehow? I feel like it will be too much for the server to do by itself (I am designing the engine for hundreds of players on one server).&#xD;&#xA;&#xD;&#xA;Does anyone know how mainstream MMOs do it? I know that almost all MMOs right now are susceptible to physics hacks and usually deal with them by detecting hacks and banning people. I would rather the hacks did not work at all, at least for the physics component." />
  <row Id="7629" PostHistoryTypeId="1" PostId="3884" RevisionGUID="34851784-6836-46b0-8871-b804511b2a81" CreationDate="2010-09-16T16:01:29.550" UserId="1700" Text="Should collision detection be done server-side or cooperatively between client/server?" />
  <row Id="7630" PostHistoryTypeId="3" PostId="3884" RevisionGUID="34851784-6836-46b0-8871-b804511b2a81" CreationDate="2010-09-16T16:01:29.550" UserId="1700" Text="&lt;c++&gt;&lt;collision-detection&gt;&lt;mmo&gt;&lt;server&gt;" />
  <row Id="7631" PostHistoryTypeId="2" PostId="3885" RevisionGUID="558cb8d6-0e6f-4dfd-bd68-bade6f82e3e7" CreationDate="2010-09-16T16:11:29.890" UserId="51" Text="It seems like the obvious answer is to do most of your detection client-side (for smoothness), and then you interpolate to what the server says if your client is too far off.  The server will tick at a less frequent rate than the server (like, say, 10hz), and would probably need to have some basic &quot;can this player have reached where he says he currently is from his last known location&quot; code, which implies some kind of nav mesh-type solution and pathfinding.&#xD;&#xA;&#xD;&#xA;That might be prohibitively slow depending on what your needs are.  You might make a design decision, for example, to not care about player-player collision on the server.  Most games, as far as I know, don't even care about that on the client.  It really depends on what your needs are.&#xD;&#xA;&#xD;&#xA;But the rule of thumb is that you should never trust the client.  It if impacts gameplay, you have to at least verify it on the server." />
  <row Id="7632" PostHistoryTypeId="16" PostId="3862" RevisionGUID="a24c0e3e-336b-4d2f-b747-3e20ef37a6d1" CreationDate="2010-09-16T16:32:00.813" UserId="302" />
  <row Id="7633" PostHistoryTypeId="5" PostId="3862" RevisionGUID="a24c0e3e-336b-4d2f-b747-3e20ef37a6d1" CreationDate="2010-09-16T16:32:00.813" UserId="302" Comment="changed into community wiki. moving my own thoughts to an answer" Text="I'm mostly a programmer, but I'd like to be able to do competent work on other parts of games I make when working on solo projects.&#xD;&#xA;&#xD;&#xA;What I'm specifically asking here is what sort of techniques or styles for visual asset creation should I study and use to be able to work with the most efficiency? Basically, what would end up being the least work as a whole, taking into account possible changes late on in the development, reuse of assets created for other projects, etc.&#xD;&#xA;&#xD;&#xA;What I mean by &quot;technique or style&quot; here is things like vector art, digital painting, pixel art, poly modeling, sculpting, etc. &#xD;&#xA;&#xD;&#xA;I'm mostly interested in comparisons of the various techniques as a whole. It's hard to get a good big picture view of the situation not having a lot of experience with doing real work with each technique. Also, obviously if you're making a 3D game you'll need to make 3D assets, but for now, let's talk about techniques for creating assets for a 2D game, where the assets could be either 2D or 3D." />
  <row Id="7634" PostHistoryTypeId="2" PostId="3886" RevisionGUID="e11186ba-8576-4fdf-bd78-be6bbf502450" CreationDate="2010-09-16T16:32:35.087" UserId="302" Text="Here are some points I came up with myself:&#xD;&#xA;&#xD;&#xA;**Digital painting:**&#xD;&#xA;&#xD;&#xA; - Flexible for lots of visual styles&#xD;&#xA; - Lots of resources available for learning&#xD;&#xA; - Scales decently&#xD;&#xA;&#xD;&#xA;**Vector art:**&#xD;&#xA; &#xD;&#xA; - Easy to edit&#xD;&#xA; - Scales very well&#xD;&#xA; - Relatively easy to animate&#xD;&#xA;&#xD;&#xA;**Pixel art:**&#xD;&#xA; &#xD;&#xA; - Classic &quot;game look&quot;&#xD;&#xA; - Relatively easy to work with at low resolutions&#xD;&#xA; - Very very laborious at higher resolutions&#xD;&#xA; - Does not scale at all. Better have that sprite size locked up by the time you draw it.&#xD;&#xA;&#xD;&#xA;**3D in general:**&#xD;&#xA;&#xD;&#xA; - More work than 2D&#xD;&#xA; - After the model is created and rigged, making animations is easy in comparison. No redrawing.&#xD;&#xA;&#xD;&#xA;**Poly modeling:**&#xD;&#xA;&#xD;&#xA; - Specifically suited for angular geometric looking objects&#xD;&#xA;&#xD;&#xA;**Sculpting:**&#xD;&#xA;&#xD;&#xA; - Easier to create complex models than with poly modeling&#xD;&#xA; - Specifically well suited for smooth organic looking things" />
  <row Id="7635" PostHistoryTypeId="16" PostId="3886" RevisionGUID="e11186ba-8576-4fdf-bd78-be6bbf502450" CreationDate="2010-09-16T16:32:35.087" UserId="-1" />
  <row Id="7636" PostHistoryTypeId="2" PostId="3887" RevisionGUID="10cb4f39-bc2e-4ace-9e02-d0ea3208b5ab" CreationDate="2010-09-16T16:42:39.427" UserId="1370" Text="&#xD;&#xA;How can I make a p2p multiplayer game?&#xD;&#xA;I would like to have a server-less multiplayer game. But then, how all the clients know each other?&#xD;&#xA;&#xD;&#xA;Why the p2p-protocol is so famous in file transfer but not in multiplayer games?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7637" PostHistoryTypeId="1" PostId="3887" RevisionGUID="10cb4f39-bc2e-4ace-9e02-d0ea3208b5ab" CreationDate="2010-09-16T16:42:39.427" UserId="1370" Text="How can I make a peer-to-peer multiplayer game?" />
  <row Id="7638" PostHistoryTypeId="3" PostId="3887" RevisionGUID="10cb4f39-bc2e-4ace-9e02-d0ea3208b5ab" CreationDate="2010-09-16T16:42:39.427" UserId="1370" Text="&lt;multiplayer&gt;&lt;peer-to-peer&gt;" />
  <row Id="7639" PostHistoryTypeId="2" PostId="3888" RevisionGUID="fbd10045-cc71-4f70-a41e-a658b900abca" CreationDate="2010-09-16T16:56:16.853" UserId="263" Text="Something else to think about is that since Go is still relatively new, there may not be bindings for a lot of the common libraries used in game development yet." />
  <row Id="7640" PostHistoryTypeId="16" PostId="3888" RevisionGUID="fbd10045-cc71-4f70-a41e-a658b900abca" CreationDate="2010-09-16T16:56:16.853" UserId="-1" />
  <row Id="7641" PostHistoryTypeId="2" PostId="3889" RevisionGUID="dc09fa51-dec2-4aee-9575-108924047e09" CreationDate="2010-09-16T17:06:14.980" UserId="1198" Text="There are many reasons p2p is not popular in games, mostly due to lag. Everyone is as slow as the slowest player. We're not talking about bandwidth here, but bing time. &#xD;&#xA;&#xD;&#xA;p2p can transfer tons of data, but it does so with a quite high ping, games need to transmit very small amounts of data, with minimal ping time." />
  <row Id="7642" PostHistoryTypeId="2" PostId="3890" RevisionGUID="00da5acf-db00-4d92-a271-57f0fc488310" CreationDate="2010-09-16T17:10:04.923" UserId="1101" Text="Regarding the updates:&#xD;&#xA;&#xD;&#xA;Some use CRON jobs that hit a certain PHP page every so often.&#xD;&#xA;&#xD;&#xA;Some use CRON jobs, this time running a certain process.&#xD;&#xA;&#xD;&#xA;Another approach is to do 'just in time' updates - whenever any page is loaded, run through any pending updates and perform them at that point. This is generally what you have to do if you can't run CRON jobs or long-running processes.&#xD;&#xA;&#xD;&#xA;Finally, others are running the whole web application as one process, so they can update whenever they see it is time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The final system is the best if you have that option available as you can store the data in memory. Updating a few thousand players once per minute is trivial if you're just changing data in RAM rather than having to write to a traditional SQL database.&#xD;&#xA;&#xD;&#xA;But if you don't have that luxury, you can use some sort of caching. Something like [memcached][1] may be one option (dependent on your hosting) which is a half-way point between memory and a database. You can store transient values in memcache and only save them to the DB when absolutely necessary.&#xD;&#xA;&#xD;&#xA;Between memcache and a traditional SQL database there are other options, eg. the various key/value stores or document stores: stuff like [MongoDB][2], [CouchDB][3], the Amazon or Google offerings, etc... ie. all the systems under the umbrella term [NoSQL][4]. These typically don't give you the generic querying power nor always all the same safety guarantees of a traditional database but are often much faster in operation. (Which is not so surprising, as they are doing less for you.)&#xD;&#xA;&#xD;&#xA;But this is all assuming a normal database can't handle the load. In fact, in most cases it probably can. If I have to issue 10,000 UPDATE calls per minute to increase resource levels, that's not very scalable once you start adding everything else on top. But if you change that to update the resource for everybody with 1 SQL call, suddenly things look a lot more positive. So don't overestimate how expensive a certain feature is, as it can often be implemented in a more efficient form.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://memcached.org/&#xD;&#xA;  [2]: http://www.mongodb.org/&#xD;&#xA;  [3]: http://couchdb.apache.org/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/NoSQL" />
  <row Id="7643" PostHistoryTypeId="2" PostId="3891" RevisionGUID="678e2dc8-c8e0-43bc-b70a-16a367ab95d8" CreationDate="2010-09-16T17:10:16.017" UserId="2141" Text="Peer to peer games generally still have a game host. Its the game host that posts the game to the master games list and accepts new connections. Whenever the game host accepts a new client to the game it notifies all existing clients about the new client so that they can ensure they connect to the new client.&#xD;&#xA;&#xD;&#xA;The simplest way to implement p2p is with a lobby. All clients connect to the host in a lobby (or chat room). When the host is ready the player presses start and they all enter the game at the same time (commonly used in strategy games). A more complex approach is to use &quot;drop-in drop-out&quot; where players can join and leave mid game, however this is a lot more complex to implement in a p2p game and requires a feature called host-migration.&#xD;&#xA;&#xD;&#xA;A good number of games use peer to peer networking, including most strategy, sports and driving titles. Just about all Xbox360 and PS3 games use p2p networking. The client-server architecture is mostly used in first person shooter or MMO games.&#xD;&#xA;&#xD;&#xA;Client-Server is generally easier to implement as only 1 machine has not know the entire game state, the clients are basically just renderers with some prediction to make things look smooth.&#xD;&#xA;&#xD;&#xA;When you build a p2p engine, all clients need a full state of the game world and they all are required to stay in sync.&#xD;&#xA;&#xD;&#xA;For more details on p2p and client-server architectures I suggest you read the following article: http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/&#xD;&#xA;&#xD;&#xA;And if you're new to networking in general checkout the other great articles on that site. Glenn is a networking genius. " />
  <row Id="7644" PostHistoryTypeId="2" PostId="3892" RevisionGUID="35af7ea6-31b4-433f-ab18-2f0f0b1b5bfe" CreationDate="2010-09-16T18:00:27.377" UserId="1477" Text="You probably want to run with one player(We'll call him/her the &quot;Host&quot;) as a non authoritative server. You'll have all the other players communicate what they are doing on their end with our host, and the host will relay the messages to the other players.&#xD;&#xA;&#xD;&#xA;You probably also want to pass a list of what computers are connected to the hosting player so that if they drop a new host can be chosen somehow and start communicating with the remaining players.&#xD;&#xA;&#xD;&#xA;The documentation for [smartfoxserver][1] may help you out and/or you may end up wanting to use it for your game as well. You'd just embed it into your client game instead of having a separate client and server program.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.smartfoxserver.com/docs/index.htm" />
  <row Id="7645" PostHistoryTypeId="2" PostId="3893" RevisionGUID="4bc988e4-bd90-4cb7-a19c-c69aca05af51" CreationDate="2010-09-16T19:38:41.837" UserId="2164" Text="Impressive trailers for your game can really help show players how awesome your game is, but I'm having trouble finding tips that describe how to create a great trailer.  I would like to learn about the best way to decide trailer length, structure, music/sound, and content.  Basically, what parts of my game do I show in a trailer, how should the scenes be organized, and how would you do the sound?  &#xD;&#xA;&#xD;&#xA;Any advice on things to avoid would be great as well; for example, I read that splicing some video, switching to a screen with text, switching back to video, etc., probably isn't the best way to do it.  Thanks!" />
  <row Id="7646" PostHistoryTypeId="1" PostId="3893" RevisionGUID="4bc988e4-bd90-4cb7-a19c-c69aca05af51" CreationDate="2010-09-16T19:38:41.837" UserId="2164" Text="Tips for creating great game trailers" />
  <row Id="7647" PostHistoryTypeId="3" PostId="3893" RevisionGUID="4bc988e4-bd90-4cb7-a19c-c69aca05af51" CreationDate="2010-09-16T19:38:41.837" UserId="2164" Text="&lt;marketing&gt;&lt;tips&gt;&lt;trailer&gt;" />
  <row Id="7648" PostHistoryTypeId="2" PostId="3894" RevisionGUID="8b446ca4-6f09-44d4-9dd8-c765609ba592" CreationDate="2010-09-16T20:54:24.820" UserDisplayName="Unknown" Text="Nice code, tried it too&#xD;&#xA;but im having a little problem, im using this with&#xD;&#xA;2 boxes i created in 3DS max.&#xD;&#xA;they only collide when theyre 50% inside one another.&#xD;&#xA;when i exported them, the position (0,0,0) in 3DS max was at center bottom of the box.&#xD;&#xA;Should this have anything to say?&#xD;&#xA;if yes, anyway to fix it, besides exporting them again with a different position?" />
  <row Id="7649" PostHistoryTypeId="5" PostId="3885" RevisionGUID="14f8e3af-072f-4ef3-aec0-72befc3bbe37" CreationDate="2010-09-16T20:57:33.140" UserId="51" Comment="oops" Text="It seems like the obvious answer is to do most of your detection client-side (for smoothness), and then you interpolate to what the server says if your client is too far off.  The server will tick at a less frequent rate than the client (like, say, 10hz), and would probably need to have some basic &quot;can this player have reached where he says he currently is from his last known location&quot; code, which implies some kind of nav mesh-type solution and pathfinding.&#xD;&#xA;&#xD;&#xA;That might be prohibitively slow depending on what your needs are.  You might make a design decision, for example, to not care about player-player collision on the server.  Most games, as far as I know, don't even care about that on the client.  It really depends on what your needs are.&#xD;&#xA;&#xD;&#xA;But the rule of thumb is that you should never trust the client.  It if impacts gameplay, you have to at least verify it on the server." />
  <row Id="7650" PostHistoryTypeId="16" PostId="3893" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-16T20:59:09.643" UserId="51" />
  <row Id="7651" PostHistoryTypeId="2" PostId="3895" RevisionGUID="fe3e0a22-916c-40b2-bf30-56a4c5455362" CreationDate="2010-09-16T21:21:56.780" UserId="659" Text="A good example of 'true peer-to-peer' gameplay would be a real-time-strategy game such as Starcraft.&#xD;&#xA;&#xD;&#xA;In a game with hundreds of units/projectiles in motion, it's not practical to repeatedly send unit positions/states over the network to all other players, so one solution here is for all players to run the (exact same) simulation in sync.&#xD;&#xA;&#xD;&#xA;When one player performs an action, the command/order ('move zergling to X,Y') can be sent to all other players, to be executed by all instances of the simulation a fraction of a second later.&#xD;&#xA;&#xD;&#xA;In this situation, if any player disconnects, the game can continue - as there's no need for a server/host to be running the game, the remaining players can carry on.&#xD;&#xA;&#xD;&#xA;However, keeping the games in sync is non-trivial, you have to use a fixed timestep for the game logic updates, and must be very careful with use and seeding of random number generators, to ensure that the simulations will not diverge!" />
  <row Id="7652" PostHistoryTypeId="2" PostId="3896" RevisionGUID="16e4f096-4b5f-4157-baef-8b0f826de0f3" CreationDate="2010-09-16T21:30:01.343" UserId="659" Text="&#xD;&#xA;World of Warcraft doesn't do collision detection between players/mobs. There may or may not be technical reasons behind this decision, but really, this has to be more of a game design decision than a technical decision:&#xD;&#xA;&#xD;&#xA;Imagine how exploitable it could be in player-vs-player situations. Or how hard it would be to use the bank/auction house/mailboxes if other (often idle) players blocked your movement!&#xD;&#xA;&#xD;&#xA;As for client vs server based collision detection - really, unless movement is very slow, it has to be primarily client-side, so it looks right to each client. Laggy/delayed collision response, and/or colliding with 'invisible' objects would be quite unpleasant." />
  <row Id="7653" PostHistoryTypeId="2" PostId="3897" RevisionGUID="324825b6-87cd-4e61-a829-39623459158a" CreationDate="2010-09-16T21:43:51.693" UserId="2100" Text="Obviously there's no one answer to a question like this, because it depends on your audience. And that's part of the answer - you need to tailor your trailer to your audience or they won't see why they should like the game.&#xD;&#xA;&#xD;&#xA;You also need to tailor the trailer to the type of game. If you are showing a real-time strategy game, no one is going to want to see more than a couple seconds of building your initial base.&#xD;&#xA;&#xD;&#xA;Here are some things I think you should keep in mind:&#xD;&#xA;&#xD;&#xA; - Length - I wouldn't have a trailer any longer than 2.5 minutes, because if it takes longer than that it becomes a gameplay video and you've failed at accomplishing what a trailer is supposed to do in the time it's supposed to do it in.&#xD;&#xA;&#xD;&#xA; - Audio - Use music that represents the aesthetic of your game. If your audience likes that music, they're closer to giving your game a try. Try to stick with one song or have very smooth transitions between sounds, unless you are trying to jar your audience on purpose (which might be something you want to do, although you've got to be careful)&#xD;&#xA;&#xD;&#xA; - Video - Capture scenes (images/video) that represent the core gameplay. Quick, few-second bursts of many of these types of scenes tell the viewer both that the gameplay is stimulating, as well as make it seem as though there is a vast amount of content to explore the gameplay in. Don't misrepresent your content, or you'll create disappointment. I think it's essential to have the majority of your content be video or it will be boring and more importantly, not represent your content well. &#xD;&#xA;&#xD;&#xA; - Text - If you have to use text, I'd put it next to gameplay/screenshots or directly over it - a title card at the beginning and some lone text at the end is acceptable. I don't know how others feel about this one. Don't have 30 seconds of different text cards before you show gameplay. Everyone knows how to create text videos in Windows Movie Maker, and no one wants to read it when they're trying to understand what your game plays, looks, and sounds like.&#xD;&#xA;&#xD;&#xA; - Pacing - I think the most important thing you need to worry about with pacing is accurately representing the pace of your game. Don't have a light-speed trailer for a slow, methodical puzzle game. Try to keep your cuts and such in sync with music as much as possible - even if it's not an obvious synchronization viewer subconscious will fare better if the audio and video components are even mildly concerned with each other.&#xD;&#xA;&#xD;&#xA; - Random thought - If you can illustrate the entire game with one scene of varying action or complex puzzle solution, if it isn't more than a minute or two it could be a fantastic teaser. Think advertising Portal with one puzzle - the viewer is almost overwhelmed with how interesting the concept is on initial viewing.&#xD;&#xA;&#xD;&#xA;Hope that helps at least a bit." />
  <row Id="7654" PostHistoryTypeId="16" PostId="3897" RevisionGUID="324825b6-87cd-4e61-a829-39623459158a" CreationDate="2010-09-16T21:43:51.693" UserId="-1" />
  <row Id="7655" PostHistoryTypeId="2" PostId="3898" RevisionGUID="e417b120-695a-4832-a565-234ea14823fe" CreationDate="2010-09-16T22:10:47.773" UserId="908" Text="When it comes to music I'd also recommend Jamendo: They have their artist sign that they're not part of a collection society, so there's no second party you have to pay.&#xD;&#xA;&#xD;&#xA;Of course a lot depends on the game you're making. For And Yet It Moves, all sounds were created by hand. I'd also recommend [SoundSnap][1] for good quality sounds.&#xD;&#xA;&#xD;&#xA;Maybe the most important step is to learn what it is that you need for your game and develop an ear for game audio.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.soundsnap.com/" />
  <row Id="7656" PostHistoryTypeId="5" PostId="3897" RevisionGUID="035ae56f-c3db-4cd8-8b0f-dd55c359d929" CreationDate="2010-09-16T22:26:42.447" UserId="2100" Comment="changed content slightly" Text="Obviously there's no one answer to a question like this, because it depends on your audience. And that's part of the answer - you need to tailor your trailer to your audience or they won't see why they should like the game.&#xD;&#xA;&#xD;&#xA;You also need to tailor the trailer to the type of game. If you are showing a real-time strategy game, no one is going to want to see more than a couple seconds of building your initial base.&#xD;&#xA;&#xD;&#xA;Here are some things I think you should keep in mind:&#xD;&#xA;&#xD;&#xA; - Length - I wouldn't have a trailer any longer than 2.5 minutes, because if it takes longer than that it becomes a gameplay video and you've failed at accomplishing what a trailer is supposed to do in the time it's supposed to do it in.&#xD;&#xA;&#xD;&#xA; - Audio - Use music that represents the aesthetic of your game. If your audience likes that music, they're closer to giving your game a try. Try to stick with one song or have very smooth transitions between sounds, unless you are trying to jar your audience on purpose (which might be something you want to do, although you've got to be careful)&#xD;&#xA;&#xD;&#xA; - Video - Capture scenes (images/video) of varying length that represent the core gameplay. Quick, few-second bursts of many of these types of scenes tell the viewer both that the gameplay is stimulating, as well as make it seem as though there is a vast amount of content to explore the gameplay in. Don't misrepresent your content, or you'll create disappointment. I think it's essential to have the majority of your content be video or it will be boring and more importantly, not represent your content well. &#xD;&#xA;&#xD;&#xA; - Text - If you have to use text, I'd put it next to gameplay/screenshots or directly over it - a title card at the beginning and some lone text at the end is acceptable. I don't know how others feel about this one. Don't have 30 seconds of different text cards before you show gameplay. Everyone knows how to create text videos in Windows Movie Maker, and no one wants to read it when they're trying to understand what your game plays, looks, and sounds like.&#xD;&#xA;&#xD;&#xA; - Pacing - I think the most important thing you need to worry about with pacing is accurately representing the pace of your game. Don't have a light-speed trailer for a slow, methodical puzzle game. Try to keep your cuts and such in sync with music as much as possible - even if it's not an obvious synchronization viewer subconscious will fare better if the audio and video components are even mildly concerned with each other.&#xD;&#xA;&#xD;&#xA; - Random thought - If you can illustrate the entire game with one scene of varying action or complex puzzle solution, if it isn't more than a minute or two it could be a fantastic teaser. Think advertising Portal with one puzzle - the viewer is almost overwhelmed with how interesting the concept is on initial viewing.&#xD;&#xA;&#xD;&#xA;Hope that helps at least a bit." />
  <row Id="7657" PostHistoryTypeId="2" PostId="3899" RevisionGUID="508e0d36-e400-4199-8f72-c464e914849e" CreationDate="2010-09-17T00:44:26.953" UserId="288" Text="It seems to me that you could just store the production rates, the base resource level, and a last-updated timestamp. Then, whenever you need to know the actual resource level, you could just multiply the production rate by the elapsed time.&#xD;&#xA;&#xD;&#xA;Whenever the actual resource level changes - simply update the base level. Whenever the production rate changes, update the base level to the actual level, and the timestamp to the current time.&#xD;&#xA;&#xD;&#xA;This way, instead of updating every player (presumably including those not currently logged in) every minute, you're updating only rows that are actually actively being used by players.&#xD;&#xA;&#xD;&#xA;(If your game &quot;ticks&quot; once a minute, I imagine a &quot;turn number&quot; of some sort might be better than an actual timestamp.)&#xD;&#xA;&#xD;&#xA;A side-benefit of this system is that you can use the *same* logic used to update the database, and to predict values without modifying them - to only send the necessary information to the client (rather than updating once per minute), and to predict values on the client." />
  <row Id="7658" PostHistoryTypeId="2" PostId="3900" RevisionGUID="be80d969-5174-4a8f-9780-934d7679b88c" CreationDate="2010-09-17T00:55:30.390" UserId="2146" Text="Which brings better performance at run-time between a cube imported from a mesh, or a cube made from hardcoded vertices?&#xD;&#xA;&#xD;&#xA;Is there limitations to a certain method? Or is one better architectural-wise?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Max" />
  <row Id="7659" PostHistoryTypeId="1" PostId="3900" RevisionGUID="be80d969-5174-4a8f-9780-934d7679b88c" CreationDate="2010-09-17T00:55:30.390" UserId="2146" Text="Mesh vs Hardcoded vertices performance" />
  <row Id="7660" PostHistoryTypeId="3" PostId="3900" RevisionGUID="be80d969-5174-4a8f-9780-934d7679b88c" CreationDate="2010-09-17T00:55:30.390" UserId="2146" Text="&lt;3d&gt;&lt;3d-meshes&gt;" />
  <row Id="7661" PostHistoryTypeId="2" PostId="3901" RevisionGUID="bc737c85-1527-465e-b1b1-bc8ba85fdb18" CreationDate="2010-09-17T01:55:51.357" UserId="51" Text="Once it's in memory, verts are verts. " />
  <row Id="7662" PostHistoryTypeId="2" PostId="3902" RevisionGUID="de9c1ccb-1e96-4e59-b2d1-a24a4eb8af4e" CreationDate="2010-09-17T02:20:35.197" UserId="2077" Text="When it comes down to raw speed, a hard-coded set of vertices (and indices) embedded in the application's data region will be faster; this is because you avoid the cost of loading the mesh from disk. For simple applications, such as rendering a triangle or a cube on the screen, this approach is fine. In practice however, geometry and other resources such as textures are typically loaded from some resource file on disk into memory. This approach is beneficial for many reasons, but two major reasons are: loading and unloading resources at will and decoupling the application from its resources." />
  <row Id="7663" PostHistoryTypeId="2" PostId="3903" RevisionGUID="51c9fd9a-784c-4fb3-be5c-229a560187b6" CreationDate="2010-09-17T03:08:19.000" UserId="262" Text="I can think of several 2D games which use the Accelerometer successfully, but in my experience as a player, character control in a 3D environment tends to be frustrating.  Mostly because a 3D environment often involves a wider, continuous field of view which prevents me from sitting comfortably while playing.&#xD;&#xA;&#xD;&#xA;Is this an unfair generalisation? Are there examples of the Accelerometer working well for 3D games on mobile devices? There is the obvious tradeoff here, screen real estate unobscured by thumbs, but is it worth it?" />
  <row Id="7664" PostHistoryTypeId="1" PostId="3903" RevisionGUID="51c9fd9a-784c-4fb3-be5c-229a560187b6" CreationDate="2010-09-17T03:08:19.000" UserId="262" Text="Accelerometer or on screen controls for mobile UI in 3D games?" />
  <row Id="7665" PostHistoryTypeId="3" PostId="3903" RevisionGUID="51c9fd9a-784c-4fb3-be5c-229a560187b6" CreationDate="2010-09-17T03:08:19.000" UserId="262" Text="&lt;3d&gt;&lt;control&gt;&lt;mobile&gt;" />
  <row Id="7666" PostHistoryTypeId="2" PostId="3904" RevisionGUID="05920899-4a96-40a8-b56f-2d9050fc8469" CreationDate="2010-09-17T03:48:23.903" UserId="101" Text="If by hardcoded vertices, you mean glBegin ... glEnd (OpenGL), or Draw(Indexed)PrimitiveUP (Direct3D), these methods are inferior because they result in the vertices being transferred from system memory to the graphics card every time they're called.&#xD;&#xA;&#xD;&#xA;If, however, you're putting your vertices into a vertex buffer like you should be, it really doesn't matter. If your cube is logically an art asset, like the Horadric Cube, or the Weighted Companion Cube, it should probably be stored as a model on disk. If your cube is, on the other hand, intended to be used for skybox rendering, and therefore immutable, hard-coding it is probably fine." />
  <row Id="7667" PostHistoryTypeId="2" PostId="3905" RevisionGUID="c7fcbbb7-71dd-4800-8e54-26eff4a9ce21" CreationDate="2010-09-17T03:57:10.333" UserId="323" Text="So, a few answers here.&#xD;&#xA;&#xD;&#xA;* Client-side collision is ideal from a performance point of view and from a player feel point of view. You don't want collision to be laggy, you want players to run into a solid object and stop. If you do it server-side, you're either looking at rubberbanding players all over the place or giving players noticable lag when they try to move. Bad mojo, in both cases.&#xD;&#xA;&#xD;&#xA;* Server-side collision is ideal from a security point of view. The closer your clients get to &quot;dumb terminals&quot;, the less exploitable your game is. There's a reason that nobody playing a text-based MUD has to worry about wallhacks or speedhacks - it's because the client isn't doing anything worth mentioning.&#xD;&#xA;&#xD;&#xA;* Doing *both* is &quot;ideal&quot; in almost every case. Let the clients do their thing, then doublecheck on the server to make sure people aren't cheating. The downsides are complexity, synchronization (what exactly *do* you do if the two disagree), and sheer server CPU usage.&#xD;&#xA;&#xD;&#xA;* What I recommend is to do it almost entirely client-side. The client is authoritative about its position, just like in a full client-side system, and does all its own processing. On top of that, you randomly have the server check various players once in a while. Keep the server load low, but this will root out cheaters surprisingly fast.&#xD;&#xA;&#xD;&#xA;Alternatively, do it client-side for now, add the server-side verification at some point in the future if your game gets popular enough that people are cheating in it. Which, let's be honest, it probably won't, so there's no point in spending the coder time on it right now." />
  <row Id="7668" PostHistoryTypeId="2" PostId="3906" RevisionGUID="f5f64f62-f994-4e08-add1-373c58436d99" CreationDate="2010-09-17T05:07:52.910" UserId="1931" Text="If your dialogs are of any complexity, the most important thing you'll need for dialog implementation is a way to understand the complexity of your interaction. I recommend a Node editor of some kind to visualize this, though I don't have any good open systems to recommend.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7669" PostHistoryTypeId="2" PostId="3907" RevisionGUID="04575e1d-d0c6-4de4-a5e8-a2b898a5bb3a" CreationDate="2010-09-17T05:20:58.810" UserId="1931" Text="I'm not a film guy, so I'm afraid I can't give many specific tips about that, but if you're trying to generate buzz, make three or so and roll them out over time. Make sure you have a coherent theme, (presumably you've got one or two gameplay elements to show off that show well visually, I'd emphasize those), and maybe even make a single longer trailer and chop that up.&#xD;&#xA;&#xD;&#xA;The unsung note is the sweetest, so don't show stuff that looks bad and hide your week spots. Crank the resolution up all the way if you're doing screen grabs. Audio can help a ton for giving things feeling (not just music, but good hit sounds etc.).&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="7670" PostHistoryTypeId="16" PostId="3907" RevisionGUID="04575e1d-d0c6-4de4-a5e8-a2b898a5bb3a" CreationDate="2010-09-17T05:20:58.810" UserId="-1" />
  <row Id="7671" PostHistoryTypeId="2" PostId="3908" RevisionGUID="54aaa223-9862-479b-83b8-df1154d14329" CreationDate="2010-09-17T05:43:38.373" UserId="1931" Text="Do not use Go to develop a game, it will just be an albatross around your neck. The toolchain for game development extends so much deeper than just the language that you write things in that you're going to find obstacles at every turn that just won't be there if you just go with something established. &#xD;&#xA;&#xD;&#xA;Don't get me wrong, I love playing with new languages, but if you are trying to make games pick a language that has a community and support and you will be much better off." />
  <row Id="7672" PostHistoryTypeId="16" PostId="3908" RevisionGUID="54aaa223-9862-479b-83b8-df1154d14329" CreationDate="2010-09-17T05:43:38.373" UserId="-1" />
  <row Id="7673" PostHistoryTypeId="2" PostId="3909" RevisionGUID="98ea1e88-24c0-4a97-859c-017e4db10e16" CreationDate="2010-09-17T08:37:42.090" UserId="241" Text="Modern SQL databases that are commonly used (MySQL,Postgres,Oracle,MSSQL,etc) allow you to schedule stored procedures to be run with arbitrary time intervals. It's a very light weight method of running updates like this and removes the need to invoke external script or program to do it for you. &#xD;&#xA;&#xD;&#xA;This also allows the database to optimize the query you run just once, instead of doing it every time external script invokes it, so it's very useful from performance standpoint. Of course this only applies if your updates are trivial enough to be programmed in your databases own scripting language. Resource updates, automatic logouts, record purging and the likes are excellent candidates for these scheduled stored procedures. " />
  <row Id="7674" PostHistoryTypeId="5" PostId="3909" RevisionGUID="b49f3cc1-329b-4d54-bf0d-19337a80dad6" CreationDate="2010-09-17T08:46:42.253" UserId="241" Comment="performance part" Text="Modern SQL databases that are commonly used (MySQL,Postgres,Oracle,MSSQL,etc) allow you to schedule stored procedures to be run with arbitrary time intervals. It's a very light weight method of running updates like this and removes the need to invoke external script or program to do it for you. &#xD;&#xA;&#xD;&#xA;This also allows the database to optimize the query you run just once, instead of doing it every time external script invokes it, so it's very useful from performance standpoint. Of course this only applies if your updates are trivial enough to be programmed in your databases own scripting language. Resource updates, automatic time interval log outs, record purging and the likes are excellent candidates for these scheduled stored procedures. &#xD;&#xA;&#xD;&#xA;Most likely the load your database is experiencing comes 99.9% from page loads, game engine updates and the like, as a popular game can easily have hundreds of thousands of queries per second. Compared to the load that arises from running a few queries (although ones that touch large portion of a table) once a minute or so, the load should not be an issue. That is, unless you update values that are indexed by the database. You should avoid updating indexed columns at all costs if you worry about performance." />
  <row Id="7679" PostHistoryTypeId="2" PostId="3911" RevisionGUID="8091e6e5-33c4-4dbf-8d72-4d3914fb874b" CreationDate="2010-09-17T14:05:50.987" UserId="545" Text="It would be a bit disingenuous to claim that it's not famous for games when most Real Time Strategy games (Star Craft series, Command and Conquer Series) and many FPS games (Call of Duty: Modern Warfare 2) use it.&#xD;&#xA;&#xD;&#xA;That said how one learns about the game is up to the matchmaking / lobbying service that you use or create.  But even once one learns about the game, there still may be one or more peers that are more equal than others.  Consider the case of 3 clients wishing to play, one behind an open nat, 2 behind strict (Closed) nats.  The open nat peer can take connections from the other two.  But the 2 strict can not connect directly to each other, they will require the open nat to relay the packets.  If the open nat peer drops from the game, then either another relay would need to be found or the game will be disrupted.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7680" PostHistoryTypeId="2" PostId="3912" RevisionGUID="60b990b4-9567-4e0b-9a1c-704869b41b20" CreationDate="2010-09-17T14:58:44.077" UserId="1875" Text="I am an adjunct professor at a technical College in South Carolina.  I currently teach courses in .Net programming and Oracle PL/SQL.  We’ve noticed an influx of students who want to learn more about computer programming and game development in particular.   Their main interest stems from their experiences with video games.  I am a pretty good programmer and have done some simple 2D games in the past.  &#xD;&#xA;&#xD;&#xA;Now I have been asked to look at possibly developing an &quot;Intro to Game Programming&quot;.  The state actually allows the topic to be covered as an accredited course, just hardly any of the schools offer or have faculty that can instruct in the class.&#xD;&#xA;So, I am looking for advice/resources on how to structure the class.  My initial outline is the following.&#xD;&#xA;&#xD;&#xA;I plan to use Visual Studio Express C# Edition with XNA Game Development.  The XNA platform is very popular and allows a familiar environment for students and it is FREE!  I am personally a fan of Torque, but my students will all have been introduced to Visual Studio (via prerequisites) by the time they take this class, and I believe Torque will incur extra fees for them if they want to take work home and work outside the lab.&#xD;&#xA;Keep it simple – Input with Controls, 2D side scrolling, character and object animation,  pong type games, basic sound effects and simple collision detection problems.  Being an Intro class and students having to learn C# as they go, I can’t see trying to make this too intensive.  &#xD;&#xA;&#xD;&#xA;So, now the heart of my question – has anyone done this?  What is the best book to use to teach XNA in a class room setting?&#xD;&#xA;&#xD;&#xA;Should we try to write from scratch at the very beginning or go with a basic working game and teach the parts and then have them modify and improve as the semester goes along?&#xD;&#xA;&#xD;&#xA;I also feel I need to make it team oriented and make the teams compete with a final demonstration of their games to be voted/reviewed by random selection of students and faculty. &#xD;&#xA;&#xD;&#xA;Also, does anyone know of a program/business partnership where I could possibly be lent or given free hardware to use?  Over 90% of my students are full financial aid (Cheraw, SC is very economically depressed) so I need access to game controllers, etc.  Also, the computers we currently have (and budgets keep getting trimmed ) currently run Windows XP and not looking to be upgraded for at least another 2 years.  So an opportunity to borrow some higher end machines would be great along with maybe and Xbox 360!&#xD;&#xA;&#xD;&#xA;Also, I am open to using a platform other XNA, but I don’t want to get technically deeper than XNA – therefore going straight against DirectX with C++ is out of question.  Also, it has to be free at least for educational usage.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="7681" PostHistoryTypeId="1" PostId="3912" RevisionGUID="60b990b4-9567-4e0b-9a1c-704869b41b20" CreationDate="2010-09-17T14:58:44.077" UserId="1875" Text="Where can I find resouces for developing an &quot;Intro to Game Development&quot;  class at a Community College?" />
  <row Id="7682" PostHistoryTypeId="3" PostId="3912" RevisionGUID="60b990b4-9567-4e0b-9a1c-704869b41b20" CreationDate="2010-09-17T14:58:44.077" UserId="1875" Text="&lt;education&gt;" />
  <row Id="7683" PostHistoryTypeId="2" PostId="3913" RevisionGUID="669492d5-6214-43b7-8ba7-dad97ba8264c" CreationDate="2010-09-17T15:20:38.463" UserId="2100" Text="For a classroom setting, I haven't come across any book in particular that I thought would be good to teach a course with, but I'm no teacher either. About writing from scratch or starting with a basic game...&#xD;&#xA;&#xD;&#xA;I think you should absolutely start with a basic working game and teach the parts. Rank them so that you've got a good idea of which you want to focus on, and have the students rip out the parts and re-code them knowing what their purpose is, what they're trying to accomplish by improving the part, and how to test it properly. If it's team oriented, then different students can take over different parts of the game toward the end of the class and try to bring their modifications together.&#xD;&#xA;&#xD;&#xA;As far as your equipment goes, I'd start at one of [Microsoft's Education pages][1] and see what you can find. Get in touch with a representative as soon as possible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/education/default.mspx" />
  <row Id="7684" PostHistoryTypeId="5" PostId="3889" RevisionGUID="a80d325b-e5e2-4974-84a9-be7c7b6a8277" CreationDate="2010-09-17T15:34:58.867" UserId="1198" Comment="edited body" Text="There are many reasons p2p is not popular in games, mostly due to lag. Everyone is as slow as the slowest player. We're not talking about bandwidth here, but ping time. &#xD;&#xA;&#xD;&#xA;p2p can transfer tons of data, but it does so with a quite high ping, games need to transmit very small amounts of data, with minimal ping time." />
  <row Id="7685" PostHistoryTypeId="2" PostId="3914" RevisionGUID="9be029f6-0cfb-4206-83eb-2f4bb4d66920" CreationDate="2010-09-17T15:37:11.383" UserId="1156" Text="Depends.&#xD;&#xA;If we're talking something as simple as a cube, you're going to want to hardcode it. The loading time for all 8 vertices is not worth it. Same can be said for any simple geometric shape; just make a CreateSphereMesh, CreateCubeMesh, etc. set of functions.&#xD;&#xA;&#xD;&#xA;However, have fun making an OVER 9000 vertex model by specifying the individual vertices. And tweaking. Oh, and animating. That's when it's much better to have it as a model format.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7686" PostHistoryTypeId="2" PostId="3915" RevisionGUID="d5094694-0fbc-47d7-af9b-a7ecd62d2848" CreationDate="2010-09-17T15:38:53.770" UserId="370" Text="While I was a student, I successfully petitioned to get an intro to game programming taught at my university, [WSU][1].  The course was taught by [Scott Wallace][2], an associate professor at the Vancouver campus.  Most of the students myself included took the class at WSU Pullman (the main campus) via video streaming.&#xD;&#xA;&#xD;&#xA;The web pages from the classes are still up.  I believe 2006 was the only year the class was taught on both campuses.  It's been taught off and on at the Vancouver campus since 2004.  Do some url hacking, their sites are still up.&#xD;&#xA;&#xD;&#xA;[Computer Game Design 2006][3]&#xD;&#xA;&#xD;&#xA;I'm sure Dr. Wallace would be willing to answer some questions and give some pointers about your own class.  He may be willing to share his basic course template as a starting point.&#xD;&#xA;&#xD;&#xA;Dr. Wallace did his graduate work at [UMich][4] under [John Laird][5].  His course is based on a similar course Dr. Laird teaches: [Computer Game Design and Implementation][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wsu.edu/&#xD;&#xA;  [2]: http://ai.vancouver.wsu.edu/~wallaces/&#xD;&#xA;  [3]: http://ai.vancouver.wsu.edu/~wallaces/courses/2006/game-design/&#xD;&#xA;  [4]: http://www.umich.edu/&#xD;&#xA;  [5]: http://ai.eecs.umich.edu/people/laird&#xD;&#xA;  [6]: http://ai.eecs.umich.edu/soar/Classes/494/" />
  <row Id="7687" PostHistoryTypeId="2" PostId="3916" RevisionGUID="2c531eb5-4c96-4953-a883-e8008cd1dcf9" CreationDate="2010-09-17T16:32:56.207" UserId="2039" Text="So I currently have my background as a single PNG and some obstacles (like blocks as part of that PNG). In order to create a path, I currently store pixels above a unique green color (my hill) and use this to move the character. My question is, is it better to create something like a collision layer mask or somehow convert my PNG to a bunch of tiles? Is this possible?" />
  <row Id="7688" PostHistoryTypeId="1" PostId="3916" RevisionGUID="2c531eb5-4c96-4953-a883-e8008cd1dcf9" CreationDate="2010-09-17T16:32:56.207" UserId="2039" Text="Your recommendation for path construction from a single background image?" />
  <row Id="7689" PostHistoryTypeId="3" PostId="3916" RevisionGUID="2c531eb5-4c96-4953-a883-e8008cd1dcf9" CreationDate="2010-09-17T16:32:56.207" UserId="2039" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="7690" PostHistoryTypeId="2" PostId="3917" RevisionGUID="bc53b046-6196-4fb0-b088-477f6ee14853" CreationDate="2010-09-17T17:43:47.423" UserId="2179" Text="Here's my *guess*: one of them is **scarcity**. It's like (in the real world) a closing down sale (or any sale): it's now or never. Various games have limited resources which you *must get* to beat your opponents. Think of the ore miners in Command &amp; Conquer." />
  <row Id="7691" PostHistoryTypeId="5" PostId="3136" RevisionGUID="5f37b6ed-b3bb-4c2c-9a09-29bdac5e785f" CreationDate="2010-09-17T18:26:12.913" UserId="189" Comment="added link and quote block" Text="From [the MDA paper][1]:&#xD;&#xA;&#xD;&#xA;&gt;1. Sensation:&#xD;&#xA;Game as sense-pleasure&#xD;&#xA;2. Fantasy:&#xD;&#xA;Game as make-believe&#xD;&#xA;3. Narrative:&#xD;&#xA;Game as drama&#xD;&#xA;4. Challenge:&#xD;&#xA;Game as obstacle course&#xD;&#xA;5. Fellowship:&#xD;&#xA;Game as social framework&#xD;&#xA;6. Discovery:&#xD;&#xA;Game as uncharted territory&#xD;&#xA;7. Expression:&#xD;&#xA;Game as self-discovery&#xD;&#xA;8. Submission:&#xD;&#xA;Game as pastime&#xD;&#xA;&#xD;&#xA;Certainly sounds close, though not quite the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cs.northwestern.edu/~hunicke/MDA.pdf" />
  <row Id="7692" PostHistoryTypeId="2" PostId="3918" RevisionGUID="44ec0814-9319-4044-8e2c-35e7e4b50034" CreationDate="2010-09-17T18:49:00.060" UserId="666" Text="Yes, it is strongly suggested that you move to a data driven map, with layers and tiles. It will make your life easier, your maps will be editable in other tools(like map editors). You could even think of randomly generating maps and much much more!&#xD;&#xA;&#xD;&#xA;Happy coding!" />
  <row Id="7693" PostHistoryTypeId="2" PostId="3919" RevisionGUID="cf41be27-837d-4f3d-8b2b-e3092d7bb7c6" CreationDate="2010-09-17T19:57:19.473" UserId="656" Text="This is more of a question of, does the use of the accelerometer improves/or integrates well with the controls of your game or does it makes it worse. Having good controls contribute to the overall design of a game, so ask yourself whether you want to design a good game or a bad one, then implement the best controls (whether it be a touch interface, onscreen pad or accelerometer) for having the best experience for your game." />
  <row Id="7694" PostHistoryTypeId="2" PostId="3920" RevisionGUID="32eeae4e-ce31-469a-a146-36b3e8ca2eb1" CreationDate="2010-09-17T20:09:59.620" UserId="2102" Text="In these online games, say you are a person who has characteristics like:&#xD;&#xA;&#xD;&#xA;1. level&#xD;&#xA;2. strength&#xD;&#xA;3. experience&#xD;&#xA;4. defense&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;And now you walk into a room of 'others' that you want to e.g. recruit, how would you go about calculating this users ability to recruit?&#xD;&#xA;&#xD;&#xA;Or any other common action in a online web game like a battle, or looking for items in the grass, or looking for food etc.&#xD;&#xA;&#xD;&#xA;i.e. the ability or chances for success depend on the user's characteristics, **and they get progressively harder as the user level ups etc.**&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7695" PostHistoryTypeId="1" PostId="3920" RevisionGUID="32eeae4e-ce31-469a-a146-36b3e8ca2eb1" CreationDate="2010-09-17T20:09:59.620" UserId="2102" Text="Can someone provide a simple algorithm for calculating an outcome based on User characteristics?" />
  <row Id="7696" PostHistoryTypeId="3" PostId="3920" RevisionGUID="32eeae4e-ce31-469a-a146-36b3e8ca2eb1" CreationDate="2010-09-17T20:09:59.620" UserId="2102" Text="&lt;game-design&gt;&lt;math&gt;&lt;simulations&gt;" />
  <row Id="7697" PostHistoryTypeId="2" PostId="3921" RevisionGUID="495e9cb5-fb15-431a-a591-89102cdb16ba" CreationDate="2010-09-17T20:12:34.940" UserId="2179" Text="Another *guess*: **creativity**. I'm thinking here of the Command &amp; Conquer series and especially the various Sim games (most notably Sim City). Both give you huge amounts of *freedom* to *create* bases / cities etc. Games like Grand Theft Auto do it in a different way: multiple ways to solve the same problem.&#xD;&#xA;&#xD;&#xA;Maybe, based on GTA, also **exploration** is also a motivation. But even in C&amp;C exploration is part of the game, *discovering* what new units do. Perhaps **discovery**, then, is a better (more general) word than exploration." />
  <row Id="7698" PostHistoryTypeId="2" PostId="3922" RevisionGUID="ebb6b0c8-d57f-4af7-8231-b7bb7d491ad8" CreationDate="2010-09-17T20:29:37.590" UserId="1198" Text="Is it safe to just hookup a wired Xbox controller to my PC via USB? Do I need to buy a special PC Xbox controller? I've read conflicting reports. Any help is appreciated." />
  <row Id="7699" PostHistoryTypeId="1" PostId="3922" RevisionGUID="ebb6b0c8-d57f-4af7-8231-b7bb7d491ad8" CreationDate="2010-09-17T20:29:37.590" UserId="1198" Text="How do you test xbox (via PC) input w/out an xbox on XNA Game Studio?" />
  <row Id="7700" PostHistoryTypeId="3" PostId="3922" RevisionGUID="ebb6b0c8-d57f-4af7-8231-b7bb7d491ad8" CreationDate="2010-09-17T20:29:37.590" UserId="1198" Text="&lt;xna&gt;&lt;input&gt;&lt;xbox&gt;&lt;controllers&gt;" />
  <row Id="7701" PostHistoryTypeId="2" PostId="3923" RevisionGUID="7132483c-ff2f-49ce-89d5-31a416f8986d" CreationDate="2010-09-17T20:42:08.823" UserId="1477" Text="This is a confusing, vague question but I'll give it a shot&#xD;&#xA;&#xD;&#xA;First thing to consider is whether you want success chance to vary with or inversely too your factor for consideration(level, experience, defense, whatever)&#xD;&#xA;&#xD;&#xA;your fomula can be a fraction with things that you want to improve your chances in the numerator and things you want to decrease your chances in the denomenator(this can just be 1 if nothing decreases your chances)&#xD;&#xA;&#xD;&#xA;Suppose we wnat your chance to recruit someone to go down with your level(so it gets more difficult) but to go up with your strength. Our basic formula so far might look something like chance = strength/level&#xD;&#xA;&#xD;&#xA;This would be a linear function. Depending on how you want things to scale you may want a different type of function. If you have a theoretical maximum you could for instance use a logarithmic function to taper off towards some value&#xD;&#xA;&#xD;&#xA;chance = ln(strength/level) &#xD;&#xA;&#xD;&#xA;With this you get diminishing returns.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You also may not want throw in multiplicative factors or additive constants to tweak the data if it doesn't feel right with how you want to progress.&#xD;&#xA;&#xD;&#xA;chance = m * ln(strength/level) + k&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally since this is a percent chance you may want to try and normalize it and convert into a percent. For this we divide by your best possible values for chance and multiply by 100&#xD;&#xA;&#xD;&#xA;chance = 100 * (m * ln(strength/level) + k)/(m * ln(MAX_STRENGTH/MIN_LEVEL) + k)&#xD;&#xA;&#xD;&#xA;I hope this helps." />
  <row Id="7702" PostHistoryTypeId="2" PostId="3924" RevisionGUID="cfbfd8b0-dce9-40c7-ae45-d2ab1aa85363" CreationDate="2010-09-17T21:26:57.407" UserId="154" Text="You can use an Xbox wired controller, or you can pick up the wireless receiver which plugs into your USB port and lets you use the wireless controllers with windows.&#xD;&#xA;&#xD;&#xA;Here is a [link][1] to the wireless receiver.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/products/catalog?q=Xbox+360+Wireless+Gaming+Receiver+for+Windows&amp;cid=9984239196350938768&amp;ei=2tyTTNTMEIm4iwTKuqGdCw&amp;sa=title&amp;ved=0CAcQ8wIwADgA#p" />
  <row Id="7703" PostHistoryTypeId="2" PostId="3925" RevisionGUID="efc5bc2a-2c62-4fd4-bea1-df99c9fc8556" CreationDate="2010-09-17T21:49:54.733" UserId="2100" Text="Two programs you should at least take a look at are Mappy and Tiled. A library for XNA integration with Tiled called TiledLib has been developed and could be of some use, if only to take a look at for ideas.&#xD;&#xA;&#xD;&#xA; - Mappy - http://tilemap.co.uk/mappy.php&#xD;&#xA; - Tiled - mapeditor.org&#xD;&#xA; - TiledLib - tiledlib.codeplex.com&#xD;&#xA;&#xD;&#xA;I'll use hyperlinks when I have more reputation..." />
  <row Id="7704" PostHistoryTypeId="2" PostId="3926" RevisionGUID="64a22c5d-bc74-4c29-97cb-32510a534045" CreationDate="2010-09-17T21:51:13.003" UserId="450" Text="In Stendhal we use several layers of a map: ground, floor, objects, roof, roof_2. This way it is easy to create new maps based on images already created. We use two additional layers that only contain a green or red square called collision and protections.&#xD;&#xA;&#xD;&#xA;You may get some ideas from our [map tutorial][1]. The map editor &quot;Tiled&quot; is from http://www.mapeditor.org/ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org/wiki/HowToUseTiledToCreateStendhalMaps#Editing_the_map" />
  <row Id="7705" PostHistoryTypeId="6" PostId="3794" RevisionGUID="832ee230-c817-43fe-8d9e-67c1997e9ba4" CreationDate="2010-09-17T21:52:06.490" UserId="450" Comment="edited tags" Text="&lt;education&gt;" />
  <row Id="7706" PostHistoryTypeId="5" PostId="3925" RevisionGUID="c8092ebb-8ca0-4830-a6cb-ad25d85b4455" CreationDate="2010-09-17T22:05:46.673" UserId="2100" Comment="added hyperlinks" Text="Two programs you should at least take a look at are [**Mappy**][1] and [**Tiled**][2]. A library for XNA integration with Tiled called [**TiledLib**][3] has been developed and could be of some use, if only to take a look at for ideas.&#xD;&#xA;&#xD;&#xA;  [1]: http://tilemap.co.uk/mappy.php&#xD;&#xA;  [2]: http://www.mapeditor.org/&#xD;&#xA;  [3]: http://tiledlib.codeplex.com/" />
  <row Id="7707" PostHistoryTypeId="2" PostId="3927" RevisionGUID="2f3fdc25-9512-42d6-91f0-622e4744deee" CreationDate="2010-09-17T22:08:07.683" UserDisplayName="Alex" Text="Here is what I use in the class I teach:&#xD;&#xA;http://www.hipergames.com/palomar/CSIS240/textbook.html&#xD;&#xA;At Palomar College we are part of the Microsoft educational program which allows access to Visual Studio for free to faculty and students alike.&#xD;&#xA;Hope this helps!&#xD;&#xA;Alexander Ehrath" />
  <row Id="7708" PostHistoryTypeId="2" PostId="3928" RevisionGUID="4a396b9f-9984-40be-94fc-fc24b63510e3" CreationDate="2010-09-17T22:09:34.793" UserId="891" Text="While doing a BS in CS at a California State University there was only one game development course which was group based where each group was to deliver a complete game from scratch in 10 weeks.  Each group consisted of 4 programmers.  This single game was worth 100% of the grade.&#xD;&#xA;&#xD;&#xA;It was straight C++ and OpenGL with weekly deliveries from all groups.  One of the hardest classes I've ever had but at the same time we learned everything about how game engines really work.  Rarely do students learn this anymore since most are spoiled with engines or frameworks that abstract all the &quot;hard&quot; stuff away.&#xD;&#xA;&#xD;&#xA;My professor published a paper about the class in **37th ASEE/IEEE Frontiers in Education Conference 2007**&#xD;&#xA;&#xD;&#xA;[**Student Teamwork: A Capstone Course in Game Programming**][1]&#xD;&#xA;&#xD;&#xA;The game my group created  &#xD;&#xA;[**Images from my Portfolio**][2]  &#xD;&#xA;[**Video of the game from another teammate**][3]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.csupomona.edu/~rwkerbs/papers/kerbs_fie_2007.pdf&#xD;&#xA;  [2]: http://www.goliathdesigns.com/2009/12/phase/&#xD;&#xA;  [3]: http://www.korayhagen.com/Projects/PHASE.html" />
  <row Id="7709" PostHistoryTypeId="2" PostId="3929" RevisionGUID="f5f22c31-eb4d-4a55-962c-b1eec17a1577" CreationDate="2010-09-17T22:18:44.013" UserId="2100" Text="The site I always go to first for Maya resources is [Creative Crash][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.creativecrash.com/maya/home" />
  <row Id="7710" PostHistoryTypeId="16" PostId="3929" RevisionGUID="f5f22c31-eb4d-4a55-962c-b1eec17a1577" CreationDate="2010-09-17T22:18:44.013" UserId="-1" />
  <row Id="7711" PostHistoryTypeId="2" PostId="3930" RevisionGUID="f1c121f9-02d0-4d9e-b326-75bd1537b0fc" CreationDate="2010-09-17T22:48:56.123" UserId="2184" Text="Here's a tool that does just that - takes 3d models and turns them into sprite sheets, including rendering all the sprites for the animations:&#xD;&#xA;&#xD;&#xA;http://www.envygames.com/content/?page_id=65&#xD;&#xA;&#xD;&#xA;reasonably priced too!&#xD;&#xA;&#xD;&#xA;(caveat: I haven't personally used this tool, just read the review at: http://www.torquepowered.com/community/blog/view/16207/2 )" />
  <row Id="7712" PostHistoryTypeId="2" PostId="3931" RevisionGUID="ed24b6e3-fd0a-4a10-97f7-e0750e6262f7" CreationDate="2010-09-18T02:33:39.877" UserId="2039" Text="This is a kind of embarassing question to me since I'm getting more in-depth with XNA but some times my way of thinking about things in my head contradicts an example and I need to re-think it to make it work.&#xD;&#xA;&#xD;&#xA;So let's say I am just working with a sprite that is 10 wide and 10 high. &#xD;&#xA;&#xD;&#xA;Scaling:&#xD;&#xA;&#xD;&#xA;When I apply a scaling matrix, am I just shifting the points back or scaling the X-axis and Y-axis in the LOCAL coordinate space of that sprite? I ask because on this page:&#xD;&#xA;&#xD;&#xA;http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Coll_Detection_Matrices.php&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;http://www.riemers.net/eng/ExtraReading/matrices_geometrical.php&#xD;&#xA;&#xD;&#xA;It shows the X and Y axis being scaled down. So in my head, I think that a scaling means that you scale down the local axis space of the sprite which makes it smaller. &#xD;&#xA;&#xD;&#xA;Rotation:&#xD;&#xA;&#xD;&#xA;When I do a rotation matrix, am I rotating the local x and y axis of the sprite around the world origin or rather do I think about it as rotating the local coordinate space entirely around the world origin?" />
  <row Id="7713" PostHistoryTypeId="1" PostId="3931" RevisionGUID="ed24b6e3-fd0a-4a10-97f7-e0750e6262f7" CreationDate="2010-09-18T02:33:39.877" UserId="2039" Text="How to think about 2D scaling/rotation transformations " />
  <row Id="7714" PostHistoryTypeId="3" PostId="3931" RevisionGUID="ed24b6e3-fd0a-4a10-97f7-e0750e6262f7" CreationDate="2010-09-18T02:33:39.877" UserId="2039" Text="&lt;2d&gt;&lt;math&gt;" />
  <row Id="7715" PostHistoryTypeId="5" PostId="3931" RevisionGUID="fd94d2c5-b96c-4f3b-bb4e-9fd1b4e72cbc" CreationDate="2010-09-18T04:57:01.213" UserId="2039" Comment="Just wanted to add one part about translation and add the word local to clarify which axis I'm talking about." Text="This is a kind of embarassing question to me since I'm getting more in-depth with XNA but some times my way of thinking about things in my head contradicts an example and I need to re-think it to make it work.&#xD;&#xA;&#xD;&#xA;So let's say I am just working with a sprite that is 10 wide and 10 high. &#xD;&#xA;&#xD;&#xA;Scaling:&#xD;&#xA;&#xD;&#xA;When I apply a scaling matrix, am I just shifting the points back or scaling the X-axis and Y-axis in the LOCAL coordinate space of that sprite? I ask because on this page:&#xD;&#xA;&#xD;&#xA;http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Coll_Detection_Matrices.php&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;http://www.riemers.net/eng/ExtraReading/matrices_geometrical.php&#xD;&#xA;&#xD;&#xA;It shows the X and Y of the local axis the sprite is in being scaled down. So in my head, I think that a scaling means that you scale down the local axis space where the sprite is located which makes it smaller. &#xD;&#xA;&#xD;&#xA;Rotation:&#xD;&#xA;&#xD;&#xA;When I do a rotation matrix, am I rotating the local x and y axis of the sprite around the world origin or rather do I think about it as rotating the local coordinate space entirely around the world origin?&#xD;&#xA;&#xD;&#xA;Translation:&#xD;&#xA;&#xD;&#xA;This to me is just moving that scaled image with those smaller x and y axis to some other point in the world." />
  <row Id="7716" PostHistoryTypeId="2" PostId="3932" RevisionGUID="fc7d9324-bc6b-44f6-be8e-331fc8ede484" CreationDate="2010-09-18T05:37:57.870" UserId="2187" Text="For me, the easiest way to think about this is to remember that each coordinate space can be expressed in world coordinates by a vector from the world origin to the local origin which I just call the position vector and two (in 2D or three in 3D) basis vectors. Any translation moves only the head of the position vector (the tail is always anchored at the world origin). Rotation and scaling can affect all three (or four) vectors depending on the specific rotation or scale as well as the order you have applied transformations already.&#xD;&#xA;&#xD;&#xA;This, along with my knowledge that these transforms don't change the object in local space (a point at (1,0,0) is always at (1,0,0) in local space, no matter what the basis vectors are in world space), only its appearance in world space, allow me to visualize these transforms with relative ease. &#xD;&#xA;&#xD;&#xA;In essence you are thinking the right thing, but you must be aware that these transforms don't actually affect the local coordinate space of an object, only its mapping into world space.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;I have a an object defined by {(0,0), (1,0), (1,1), (0,1)} in local space. The Position vector is (0,0), and the basis vectors are (1,0) and (0,1). In other words, my transform matrix is just an identity matrix and the object looks like a square with bottom left corner at the origin both in the world view and in a local view.&#xD;&#xA;&#xD;&#xA;If I were to apply a translation, say by the vector (2,3), only the position vector changes. My object is still defined as {(0,0), (1,0), (1,1), (0,1)} in local space, but the object in world space has been moved up and over. The object still looks like a square in both views however.&#xD;&#xA;&#xD;&#xA;If I were to then apply a scale, say by (1/2, 1/3), the position vector would be changed to (1,1) and the basis vectors would be changed to (1/2, 0) and (0,1/3). Note that my object is STILL defined as {(0,0), (1,0), (1,1), (0,1)} in local space, but if I view it in world space it is a rectangle that has been shifted up and to the right, not a square with bottom left corner at the origin as it is defined in local space.&#xD;&#xA;&#xD;&#xA;Rotations are very similar, but the changes in the basis vectors are not as easy to calculate in my head so I shall do a very simple example with a 45 degree rotation counter clockwise around the origin. The position vector would be changed to (0,sqrt(2)), while the basis vectors would be changed to ~(-0.35, 0.35) and ~(0.24,0.24). The object would now be a slanted diamond moved up in world space.&#xD;&#xA;" />
  <row Id="7717" PostHistoryTypeId="2" PostId="3933" RevisionGUID="9bc23b26-ef3a-4ebd-ae9d-1fad94e561de" CreationDate="2010-09-18T05:41:33.560" UserId="1931" Text="Think of it as rotating an entire coordinate system from one basis to another. That matrix can take any tuple in (R,R) and it would have a point in the new coordinate system.&#xD;&#xA;&#xD;&#xA;If I have a rotation matrix like this:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;   0 -1&#xD;&#xA;   1  0&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;I pass vectors from my starting space, and they get turned into vectors in the finishing space. this include the axes [1,0] and [0,1] which get turned into [0,1], and [-1,0] (i.e. it gets rotated counter-clockwise 90 degrees.&#xD;&#xA;&#xD;&#xA;You may have noticed that the rotated axes are the columns of the matrix. In fact, the columns of a matrix represent the axes of whatever coordinate system you're transforming your numbers into *by definition*. That's because a coordinate system is just a way of representing a point in space in terms of its projection onto a bunch of independent vectors (blah blah).&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;" />
  <row Id="7718" PostHistoryTypeId="2" PostId="3934" RevisionGUID="1e57046b-7c38-441e-a14d-15ca1bb7f445" CreationDate="2010-09-18T07:27:20.773" UserId="1251" Text="I have made games with box2dflash, but how much ever i have wanted to try out the test bed, the resources on the net don't help me. I have a folder called Testbed and various Test???.as files inside it. It would be a great help if somebody could just jot down how the testing of a box2dflash game is done. Thank you" />
  <row Id="7719" PostHistoryTypeId="1" PostId="3934" RevisionGUID="1e57046b-7c38-441e-a14d-15ca1bb7f445" CreationDate="2010-09-18T07:27:20.773" UserId="1251" Text="How to use the testbed with box2dflash?" />
  <row Id="7720" PostHistoryTypeId="3" PostId="3934" RevisionGUID="1e57046b-7c38-441e-a14d-15ca1bb7f445" CreationDate="2010-09-18T07:27:20.773" UserId="1251" Text="&lt;box2d&gt;&lt;testing&gt;" />
  <row Id="7721" PostHistoryTypeId="2" PostId="3935" RevisionGUID="6e572140-90c5-4af7-9ab9-897417c386ba" CreationDate="2010-09-18T09:39:47.900" UserId="1829" Text="I even heard J. Carmack quickly talk about it...&#xD;&#xA;&#xD;&#xA;How a software can track a player's position so accurately, being on a such huge world, without loading between zones, and on a multiplayer scale ? How is the data formatted when it passes through the netcode ?&#xD;&#xA;&#xD;&#xA;I can understand how vertices are stored into the graphic card's memory, but when it comes to synchronize the multiplayer, I can't imagine what is best." />
  <row Id="7722" PostHistoryTypeId="1" PostId="3935" RevisionGUID="6e572140-90c5-4af7-9ab9-897417c386ba" CreationDate="2010-09-18T09:39:47.900" UserId="1829" Text="In what kind of variable type is the player position stored on a MMORPG such as WoW ?" />
  <row Id="7723" PostHistoryTypeId="3" PostId="3935" RevisionGUID="6e572140-90c5-4af7-9ab9-897417c386ba" CreationDate="2010-09-18T09:39:47.900" UserId="1829" Text="&lt;multiplayer&gt;" />
  <row Id="7724" PostHistoryTypeId="2" PostId="3936" RevisionGUID="88f904a7-ced4-447a-841f-1c81b362bf98" CreationDate="2010-09-18T09:50:59.507" UserId="395" Text="A float? Well, an array of 3 floats for a 3D game. At least for us we use feet as units so all you need is 3-4 decimal places to be at the point that float noise isn't a problem. If a big zone is only a mile or two on a side, its not all that big a deal. As for transparent zoning in MMOs, thats a different question altogether. In the grand scheme of difficult problems in an MMO, storing position is pretty low on the list." />
  <row Id="7725" PostHistoryTypeId="2" PostId="3937" RevisionGUID="f36bb847-aacc-41e2-b6b0-6a3eeac49671" CreationDate="2010-09-18T10:43:01.740" UserId="1156" Text="Background: I'm making a retro style game for both fun, and an unofficial contest. &#xD;&#xA;&#xD;&#xA;I have bought a song, song X. However, I then found notation for song X, and all the instruments. So basically, it's a program recreating song X in a sense.&#xD;&#xA;&#xD;&#xA;I took the notation, and used another program to make it sound like a chiptune does (just for the fun of it, and it sounds good :P). However, I would like to use this in my game. It's non-commercial, but is this allowed? I would've said yes, because I'm not actually using the original, copyrighted song." />
  <row Id="7726" PostHistoryTypeId="1" PostId="3937" RevisionGUID="f36bb847-aacc-41e2-b6b0-6a3eeac49671" CreationDate="2010-09-18T10:43:01.740" UserId="1156" Text="Using modified copyrighted music in non-commercial games" />
  <row Id="7727" PostHistoryTypeId="3" PostId="3937" RevisionGUID="f36bb847-aacc-41e2-b6b0-6a3eeac49671" CreationDate="2010-09-18T10:43:01.740" UserId="1156" Text="&lt;music&gt;&lt;audio&gt;&lt;copyright&gt;" />
  <row Id="7728" PostHistoryTypeId="5" PostId="3937" RevisionGUID="9282c5a9-168b-4e87-8985-0c3d9cba2182" CreationDate="2010-09-18T10:51:41.313" UserId="1156" Comment="added 218 characters in body" Text="Background: I'm making a retro style game for both fun, and an unofficial contest. &#xD;&#xA;&#xD;&#xA;I have bought a song, song X. However, I then found notation for song X, and all the instruments. So basically, it's a program recreating song X in a sense.&#xD;&#xA;&#xD;&#xA;I took the notation, and used another program to make it sound like a chiptune does (just for the fun of it, and it sounds good :P). However, I would like to use this in my game. It's non-commercial, but is this allowed? I would've said yes, because I'm not actually using the original, copyrighted song.&#xD;&#xA;&#xD;&#xA;I think the main point is can I:&#xD;&#xA;&#xD;&#xA; - Use the music with no reference to the author&#xD;&#xA; - Use the music with a reference, since it's non-profit.&#xD;&#xA; - Not use the music at all since the melody and rhythm is copyright." />
  <row Id="7729" PostHistoryTypeId="2" PostId="3938" RevisionGUID="c1ebf89c-e14d-4990-9432-9762a403b842" CreationDate="2010-09-18T11:00:17.910" UserId="1352" Text="For a huge zoneless world I would either go for a double precision vertex, or floating point with smaller chunks dividing the land. &#xD;&#xA;&#xD;&#xA;Each chunk would have it's own coordinate system. When you cross the border to each of these chunks you would transform everything to that coordinate system. That's how they do it in flight sims anyway.&#xD;&#xA;&#xD;&#xA;If you have small zones, I guess float will be enough." />
  <row Id="7730" PostHistoryTypeId="5" PostId="3775" RevisionGUID="4cfcc0ad-8624-4267-99d8-e6abbf853346" CreationDate="2010-09-18T12:12:20.023" UserId="450" Comment="added 8 characters in body" Text="In the game Stendhal we use a finite state machine to implement NPCs. &#xD;&#xA;&#xD;&#xA;The following diagram shows a little example from the [how to write quests tutorial][1].&#xD;&#xA;&#xD;&#xA;![FSM with states IDLE, ATTENDING and QUEST_OFFERED][2]&#xD;&#xA;&#xD;&#xA;At the beginning the NPC is in state IDEL and may be walking around. A player can start a conversation by saying &quot;hi&quot; and the NPC will go to state ATTENDING. In this state it answers to questions about his &quot;job&quot; and offers some game &quot;help&quot;. The player might ask for a quest and the NPC will go to state QUEST_OFFERED waiting for the player to accept (&quot;yes&quot;) or decline (&quot;no&quot;) it.&#xD;&#xA;&#xD;&#xA;We have defined a [set of conditions][3] that can be attached to transitions. For example completing a quest may only be possible if a [PlayerHasItemWithHimCondition][4] is met.&#xD;&#xA;&#xD;&#xA;After a transition was executed the NPC may say some text and/or execute an action. Similar to the conditions we have defined a reusable [set of actions][5] like [EquipItemAction][6] which is used to give a quest reward to a player.&#xD;&#xA;&#xD;&#xA;Multiple conditions can be combined using [AndCondition][7], [OrCondition][8] and [NotCondition][9]. Usually there is a number of actions to be done on quest completion, so there is a [MultipleActions][10] class as well.&#xD;&#xA;&#xD;&#xA;While the actual implementation in Stendhal suffers from not being translatable in other (human) languages easily, I think the general concept is good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org/wiki/Stendhal_Quest_Coding_-_Part_2#Ask_the_players_whether_they_will_do_the_quest&#xD;&#xA;  [2]: http://stendhalgame.org/wiki/images/f/f3/Npc_with_quest_question.png&#xD;&#xA;  [3]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/package-summary.html&#xD;&#xA;  [4]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/PlayerHasItemWithHimCondition.html&#xD;&#xA;  [5]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/action/package-summary.html&#xD;&#xA;  [6]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/action/EquipItemAction.html&#xD;&#xA;  [7]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/AndCondition.html&#xD;&#xA;  [8]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/OrCondition.html&#xD;&#xA;  [9]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/condition/NotCondition.html&#xD;&#xA;  [10]: http://stendhalgame.org/hudson/job/stendhal_HEAD/javadoc/games/stendhal/server/entity/npc/action/MultipleActions.html" />
  <row Id="7731" PostHistoryTypeId="2" PostId="3939" RevisionGUID="502cbe91-be87-4711-bea8-9c2ef0f7923d" CreationDate="2010-09-18T12:42:40.070" UserId="659" Text="For WoW, I expect that they use a simple float x/y/z - but relative to a specific 'zone'&#xD;&#xA;&#xD;&#xA;This would help to handle 'moving zones', for example, boats and zeppelins" />
  <row Id="7733" PostHistoryTypeId="6" PostId="3937" RevisionGUID="7af455aa-5185-48ed-844b-ff3699ca712d" CreationDate="2010-09-18T13:43:35.903" UserId="165" Comment="edited tags" Text="&lt;legal&gt;&lt;music&gt;&lt;audio&gt;&lt;copyright&gt;" />
  <row Id="7734" PostHistoryTypeId="2" PostId="3940" RevisionGUID="71d795dc-f186-4b00-9ca0-ee32dd49a430" CreationDate="2010-09-18T13:48:24.697" UserId="545" Text="I'd say a for actual location it's a vector of 3 floats.  But there would also be a zone index associated with the player as well.  (But not part of the location because everything handled by that zone server is in the same zone and hence doesn't need to be in the same data structure.)&#xD;&#xA;&#xD;&#xA;Remember there are at least 4 zones.  The 4 major continents.  I don't think any one of those is more than about 10km on a side.  For example, [this][1] blog pre the latest expansion calculates the entire travel-able area as 41 square miles.  All of the battlegrounds, all of the instances, are each with-in their own zone and coordinate space as well.  &#xD;&#xA;&#xD;&#xA;Using the LUA API you can get the position of the player GetPlayerMapPosition() returns two floats each from 0 to 1 as a proportion along the entire world map.&#xD;&#xA;&#xD;&#xA;  [1]: http://tobolds.blogspot.com/2007/01/how-big-is-azeroth.html" />
  <row Id="7735" PostHistoryTypeId="2" PostId="3941" RevisionGUID="1c70849d-3099-42b3-9da3-4a87cbc826b9" CreationDate="2010-09-18T13:57:41.597" UserId="2188" Text="Server restarts are always a very bad thing, that does not really solve the problem and also makes the game a much worst game in any case. That's lazy design.&#xD;&#xA;&#xD;&#xA;&quot;Noob protection&quot; and any other kind of arbitrary limitation are also a very annoying and useless thing: again that's not really solving the problem (as you have already noticed).&#xD;&#xA;&#xD;&#xA;If your game is so unfair that you need this kind of thing, you should fix the problem at its roots: trying to fix the symptom is pointless and will never give satisfactory results.&#xD;&#xA;&#xD;&#xA;Don't make your game unfair. Really, you have no reason to do it:&#xD;&#xA;&#xD;&#xA;1) design your game so that progressing means &quot;more options&quot; but not necessarily &quot;more power&quot;, so that the game is still interesting as you go on, but not unbalanced&#xD;&#xA;&#xD;&#xA;2) design it so that the actual skill of the player counts more than the power of the character, like in an FPS&#xD;&#xA;&#xD;&#xA;3) design it so that players are surrounded by players of a similar level (such as divisions in a sport game, arenas in WoW, and I guess you can figure out something for whatever-your-game-is too)&#xD;&#xA;&#xD;&#xA;4) make it *different* to attack lower players: think about the lower player as an insect and the bigger player as a human: two insects will fight against each other on the same level, but the fight between the human and the insect will be much more different, but still possible" />
  <row Id="7736" PostHistoryTypeId="2" PostId="3942" RevisionGUID="a63bdbc7-c8e2-462c-bada-76a65e53876c" CreationDate="2010-09-18T14:00:12.723" UserId="165" Text="I'll paraphrase my answer from [Audio copyright questions][1] (and I am **Not** a Lawyer :)&#xD;&#xA;&#xD;&#xA;Note that this assumes you're in the US (or other [Berne signatory][2] countries), and in particular, Canada *may* be different, as was discussed.&#xD;&#xA;&#xD;&#xA;It also assumes that when you say, &quot;bought a song&quot;, you meant bought a *copy* from Amazon or somewhere - if you actually bought *the copyright*, then that's different. :) But buying a copy of a song, does not give you a whole lot of rights (for instance, you can't play it at public performances, like a bar, without paying royalties).&#xD;&#xA;&#xD;&#xA;In general: Anything that is copyrighted, *requires* the copyright owner's permission to use - regardless of whether you intend to make money with the project or not. There are certain very *limited* exceptions, like Fair Use, but that generally only applies to *educational* projects that use short *excerpts* of the material, not an entire piece. And this applies to derivative works (although a parody of the original material is also an exception to that).&#xD;&#xA;&#xD;&#xA;Granted - if you aren't making money, the copyright owners probably *won't* come after you - but that's not the same as saying they *can't* legally. Even if it's a free project, they *could* take legal action against you.&#xD;&#xA;&#xD;&#xA;You may want to consider the [Where is Free Music][3] question.&#xD;&#xA;&#xD;&#xA;[RIAA goes after YouTube][4]  &#xD;&#xA;[RIAA sues the Girl Scouts][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com/questions/13157/audio-copyright-questions-and-etc&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Berne_Convention_for_the_Protection_of_Literary_and_Artistic_Works&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game&#xD;&#xA;  [4]: http://www.techdirt.com/articles/20090527/0253005023.shtml&#xD;&#xA;  [5]: http://archive.southcoasttoday.com/daily/08-96/08-23-96/b02li056.htm" />
  <row Id="7737" PostHistoryTypeId="5" PostId="3942" RevisionGUID="008a30b4-d2ce-448c-a448-0268e4066ac3" CreationDate="2010-09-18T14:11:47.427" UserId="165" Comment="added 89 characters in body" Text="I'll paraphrase my answer from [Audio copyright questions][1] (and I am **Not** a Lawyer :)&#xD;&#xA;&#xD;&#xA;Note that this assumes you're in the US (or other [Berne signatory][2] countries), and in particular, Canada *may* be different, as was discussed.&#xD;&#xA;&#xD;&#xA;It also assumes that when you say, &quot;bought a song&quot;, you meant bought a *copy* from Amazon or somewhere - if you actually bought *the copyright*, then that's different. :) But buying a copy of a song, does not give you a whole lot of rights. For instance, you can't play it at public performances, without paying royalties (say you were a bartender at a bar, and broadcast the song over the bar's PA system - that's a no-no.)&#xD;&#xA;&#xD;&#xA;In general: Anything that is copyrighted, *requires* the copyright owner's permission to use - regardless of whether you intend to make money with the project or not. There are certain very *limited* exceptions, like Fair Use, but that generally only applies to *educational* projects that use short *excerpts* of the material, not an entire piece. And this applies to derivative works (although a parody of the original material is also an exception to that).&#xD;&#xA;&#xD;&#xA;Granted - if you aren't making money, the copyright owners probably *won't* come after you - but that's not the same as saying they *can't* legally. Even if it's a free project, they *could* take legal action against you.&#xD;&#xA;&#xD;&#xA;You may want to consider the [Where is Free Music][3] question.&#xD;&#xA;&#xD;&#xA;[RIAA goes after YouTube][4]  &#xD;&#xA;[RIAA sues the Girl Scouts][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com/questions/13157/audio-copyright-questions-and-etc&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Berne_Convention_for_the_Protection_of_Literary_and_Artistic_Works&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game&#xD;&#xA;  [4]: http://www.techdirt.com/articles/20090527/0253005023.shtml&#xD;&#xA;  [5]: http://archive.southcoasttoday.com/daily/08-96/08-23-96/b02li056.htm" />
  <row Id="7738" PostHistoryTypeId="2" PostId="3943" RevisionGUID="edf8e5b3-45ed-4a16-98d8-a5ae6a030930" CreationDate="2010-09-18T14:28:46.247" UserId="189" Text="Scott Bilas worked on [Dungeon Siege][1] and wrote a paper, [&quot;The Continuous World of Dungeon Siege&quot;][2]. While Dungeon Siege is not a MMO, it does have a world, and he talks about player positioning in his paper. I found it to be a great read. Here is the relevant section:&#xD;&#xA;&#xD;&#xA;&gt;The Precision Issue&#xD;&#xA;&#xD;&#xA;&gt;From the beginning, the engineering team knew that the continuous world was going to significantly affect the engine and content design, and the core issue was numerical stability. Imagine two characters walking in formation two meters apart heading east away from the origin. At some point, the distance from each other is overwhelmed by the distance from the origin, and the characters will appear to be “at the same location”.&#xD;&#xA;&#xD;&#xA;&gt;With floating point, the further you get from the origin, the more precision you lose, which can cause all manner of nasty problems. Things don’t sort right, cracks appear between adjacent meshes, space starts to quantize, and cats and dogs start living together. Dungeon Siege uses the FPU in single precision mode for the obvious performance benefits, and to match the native precision of the video hardware. However, even if we increased the precision, it ultimately could never solve the problem because the world was planned to be, and ended up, incredibly large.&#xD;&#xA;&#xD;&#xA;&gt;The precision problem meant it would not be possible to have a unified world coordinate space like most other games. Instead, the solution was to segment the continuous world into a set of independent coordinate spaces, and switch among them periodically to reset the precision. A variety of ideas were tried out within these constraints, and we eventually settled on a variation of a standard portal system.&#xD;&#xA;&#xD;&#xA;&gt;Our solution consists of a relational node-based coordinate system, in which each chunk of geometry (Siege Node) has its own coordinate space, and is linked spatially to neighboring geometry via the doors it shares in common with those neighbors. The arrangement of nodes connected by doors forms a continuous graph that represents the entire world map. This node system evolved over time from its original goal of maintaining FPU precision to become the primary method of efficiently subdividing space, and the root of countless optimizations.&#xD;&#xA;&#xD;&#xA;&gt;In order to encapsulate the concept of a 3D position relative to a specific node, the traditional (x,y,z) vector had to be augmented with a node ID (x,y,z,node) and represent an offset from the origin of a specific node instead. This 4-tuple is encapsulated as a Siege Node Position, or SiegePos. Later on, we added a SiegeRot (quaternion,node) in order to handle comparisons between orientations across nodes.&#xD;&#xA;&#xD;&#xA;&gt;The phrase “there is no world space” became a mantra to the team, although it literally took years for everyone to fully grok what it meant.&#xD;&#xA;&#xD;&#xA;You can see [more of his papers on Dungeon Siege here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dungeon_Siege&#xD;&#xA;  [2]: http://scottbilas.com/files/2003/gdc_san_jose/continuous_world_paper.html&#xD;&#xA;  [3]: http://scottbilas.com/games/dungeon-siege/" />
  <row Id="7739" PostHistoryTypeId="2" PostId="3944" RevisionGUID="848344c6-f96e-4028-a41e-ca2664fe5742" CreationDate="2010-09-18T16:26:47.903" UserId="2167" Text="what making a good soundtrack for social game&#xD;&#xA;games like brain buddies,  who has the biggest brain and word challenge &#xD;&#xA;have a great soundtrack while playing and in the beginning of the game &#xD;&#xA;how to find a good soundtrack like this that's help to attract the user specially for games that need concentration ???" />
  <row Id="7740" PostHistoryTypeId="1" PostId="3944" RevisionGUID="848344c6-f96e-4028-a41e-ca2664fe5742" CreationDate="2010-09-18T16:26:47.903" UserId="2167" Text="what making a good soundtrack for social game" />
  <row Id="7741" PostHistoryTypeId="3" PostId="3944" RevisionGUID="848344c6-f96e-4028-a41e-ca2664fe5742" CreationDate="2010-09-18T16:26:47.903" UserId="2167" Text="&lt;game-design&gt;&lt;flash&gt;&lt;sound&gt;" />
  <row Id="7742" PostHistoryTypeId="2" PostId="3945" RevisionGUID="bac51857-3b6e-4cc3-a69a-b7ea7d824211" CreationDate="2010-09-18T16:48:44.537" UserId="656" Text="You are using a derivative of the song, which falls under copyright. Also it doesn't matter whether you credit the original artist or not make a profit. It is still copyrighted. " />
  <row Id="7743" PostHistoryTypeId="2" PostId="3946" RevisionGUID="d80057e7-19ca-4d96-be3d-43631d3504bd" CreationDate="2010-09-18T17:43:45.783" UserId="189" Text="Well you already listed good examples of casual games with good background soundtracks. So play those games and pay attention to qualities of the music, such as the instruments used, tempo, volume compared to any other sounds in the game, notes/chords (major vs minor), and so on. Really pay attention to the subtleties that set the music apart from other background music; you might want to play other games where the music is distracting or the game is more action-oriented, and compare those qualities to see exactly what makes the social game music better for concentration and calmness.&#xD;&#xA;&#xD;&#xA;Then apply these qualities that you have now noticed to your own music composition, or your search for background music, or convey the qualities to the person you are looking to hire to do your music." />
  <row Id="7744" PostHistoryTypeId="2" PostId="3947" RevisionGUID="0ac3e387-aa7b-4762-8ea9-25cfe0cac6d4" CreationDate="2010-09-18T19:46:21.730" UserId="452" Text="I'm trying to spawn a number of CharacterControllers and have them move around an area, but they keep getting stuck on each other. Is there a way to make them pass through each other while still respecting the terrain's obstructions?" />
  <row Id="7745" PostHistoryTypeId="1" PostId="3947" RevisionGUID="0ac3e387-aa7b-4762-8ea9-25cfe0cac6d4" CreationDate="2010-09-18T19:46:21.730" UserId="452" Text="Make CharacterControllers in Unity not collide with each other" />
  <row Id="7746" PostHistoryTypeId="3" PostId="3947" RevisionGUID="0ac3e387-aa7b-4762-8ea9-25cfe0cac6d4" CreationDate="2010-09-18T19:46:21.730" UserId="452" Text="&lt;unity&gt;" />
  <row Id="7747" PostHistoryTypeId="5" PostId="3944" RevisionGUID="03bc65b0-3df8-4cc4-b694-f66b9778b49b" CreationDate="2010-09-18T21:42:54.487" UserId="2167" Comment="added 98 characters in body" Text="there are many successful social games in Facebook and other social sites like brain buddies, who has the biggest brain and word challenge.both of them have a great soundtrack while playing and in the beginning of the game . my question is how to find a good soundtrack or what's i should look for to find a good soundtrack like this that's help to attract the user specially for games that need concentration ?" />
  <row Id="7748" PostHistoryTypeId="2" PostId="3948" RevisionGUID="36831125-36a7-4ecc-ac82-32d0c9c6aec7" CreationDate="2010-09-18T22:08:12.810" UserId="2193" Text="I'm developing an [abstract strategy][1] turn-based game in C#.&#xD;&#xA;&#xD;&#xA;Being so, high network load is not expected. The players don't even have to be connected all the time. The host could wait for the current player to connect and make his move. I know I could make a web site to run that, but I want anyone to be able to host their own games.&#xD;&#xA;&#xD;&#xA;I need something reliable and that enables me to have good productivity.&#xD;&#xA;&#xD;&#xA;I'm already underway with [WCF][2]. Was that a good choice? Which other network framework should I consider?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Abstract_strategy_game&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Windows_Communication_Foundation" />
  <row Id="7749" PostHistoryTypeId="1" PostId="3948" RevisionGUID="36831125-36a7-4ecc-ac82-32d0c9c6aec7" CreationDate="2010-09-18T22:08:12.810" UserId="2193" Text="Which network engine/library/system to use in a .NET turn-based game?" />
  <row Id="7750" PostHistoryTypeId="3" PostId="3948" RevisionGUID="36831125-36a7-4ecc-ac82-32d0c9c6aec7" CreationDate="2010-09-18T22:08:12.810" UserId="2193" Text="&lt;c#&gt;&lt;network&gt;&lt;libraries&gt;" />
  <row Id="7751" PostHistoryTypeId="2" PostId="3949" RevisionGUID="3abd5947-e73a-482e-a660-db08f2d6e172" CreationDate="2010-09-18T22:23:05.967" UserId="2193" Text="I think you will have to write your own engine.&#xD;&#xA;&#xD;&#xA;Have you ever looked at [Zillions of Games][1]? It's a commercial application that runs abstract games written in a script language called ZRF.&#xD;&#xA;&#xD;&#xA;I know you are not looking for You can get some inspiration by looking at ZRF language specification. The best documentation I've found is [here][2]. Of course, you can take a look at the implementation of other games [here][3] and [here][4].&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Zillions_of_Games&#xD;&#xA;  [2]: http://underworld.fortunecity.com/fifa/73/zrf.html&#xD;&#xA;  [3]: http://www.zillions-of-games.com/games/index.html&#xD;&#xA;  [4]: http://underworld.fortunecity.com/fifa/73/" />
  <row Id="7752" PostHistoryTypeId="6" PostId="3948" RevisionGUID="f0f3416b-4ad2-46af-8d40-2f28391f5ae1" CreationDate="2010-09-18T22:27:17.210" UserId="2193" Comment="tag added" Text="&lt;c#&gt;&lt;network&gt;&lt;libraries&gt;&lt;turn-based&gt;" />
  <row Id="7753" PostHistoryTypeId="2" PostId="3950" RevisionGUID="1edf837a-43aa-4760-8229-4c5e9b0c1018" CreationDate="2010-09-18T23:16:20.257" UserId="51" Text="Your best bet is to probably use rigidbodys and capsule colliders (a script to get them to behave similar to a character controller can be found &lt;a href=&quot;http://www.unifycommunity.com/wiki/index.php?title=RigidbodyFPSWalker&quot;&gt;here&lt;/a&gt;) and then use &lt;a href=&quot;http://unity3d.com/support/documentation/ScriptReference/Physics.IgnoreCollision.html&quot;&gt;`Physics.IgnoreCollision`&lt;/a&gt; to get them to pass through each other." />
  <row Id="7754" PostHistoryTypeId="2" PostId="3951" RevisionGUID="209bc211-238f-4468-9e9e-b9932d94bbcc" CreationDate="2010-09-19T02:04:24.263" UserId="2167" Text="I'm developing a flash game and i want to put it in Facebook &#xD;&#xA;,My question is the Proper maximum  size for it." />
  <row Id="7755" PostHistoryTypeId="1" PostId="3951" RevisionGUID="209bc211-238f-4468-9e9e-b9932d94bbcc" CreationDate="2010-09-19T02:04:24.263" UserId="2167" Text="what should the size of a flash game in Facebook be " />
  <row Id="7756" PostHistoryTypeId="3" PostId="3951" RevisionGUID="209bc211-238f-4468-9e9e-b9932d94bbcc" CreationDate="2010-09-19T02:04:24.263" UserId="2167" Text="&lt;game-design&gt;&lt;flash&gt;&lt;server&gt;" />
  <row Id="7757" PostHistoryTypeId="5" PostId="3951" RevisionGUID="a261a417-1ea2-47c2-b22e-783febbb668e" CreationDate="2010-09-19T02:29:59.777" UserId="2167" Comment="added 17 characters in body" Text="I'm developing a flash game and i want to put it in Facebook &#xD;&#xA;,My question is the Proper maximum  size for it.&#xD;&#xA;500 KB&#xD;&#xA;1 MG ??" />
  <row Id="7758" PostHistoryTypeId="2" PostId="3952" RevisionGUID="80b93752-47a8-4c26-95c2-3946c1a78253" CreationDate="2010-09-19T03:26:38.000" UserId="1705" Text="I'm making a 2D game where the map will be scrolled frequently, and only a small part of it will be visible at any time.&#xD;&#xA;&#xD;&#xA;Which implementation would run faster?&#xD;&#xA;&#xD;&#xA; - **The naive way:** Make the map a single&#xD;&#xA;   huge MovieClip and move it around.&#xD;&#xA; - **The elegant way:** Split the map into  &#xD;&#xA;   multiple chunks and use a frustum   &#xD;&#xA;   culling algorithm to render only the &#xD;&#xA;   ones that are visible.&#xD;&#xA;&#xD;&#xA;Now that I think of it, this question boils down to whether Flash does its own frustum culling on big MovieClips." />
  <row Id="7759" PostHistoryTypeId="1" PostId="3952" RevisionGUID="80b93752-47a8-4c26-95c2-3946c1a78253" CreationDate="2010-09-19T03:26:38.000" UserId="1705" Text="Is frustum culling necessary in a Flash/AS3 game?" />
  <row Id="7760" PostHistoryTypeId="3" PostId="3952" RevisionGUID="80b93752-47a8-4c26-95c2-3946c1a78253" CreationDate="2010-09-19T03:26:38.000" UserId="1705" Text="&lt;flash&gt;&lt;rendering&gt;&lt;actionscript-3&gt;&lt;maps&gt;&lt;culling&gt;" />
  <row Id="7761" PostHistoryTypeId="2" PostId="3953" RevisionGUID="c72229e2-4245-4a34-ac45-c5679bac4dac" CreationDate="2010-09-19T03:59:21.410" UserId="2162" Text="Couldn't you could just try it both ways, profile it, and use the faster one?" />
  <row Id="7762" PostHistoryTypeId="2" PostId="3954" RevisionGUID="c93df4b2-3952-47fc-8acf-5c5786b98892" CreationDate="2010-09-19T10:36:32.150" UserId="826" Text="Spend time implementing culling now. You'll be happy you did.&#xD;&#xA;&#xD;&#xA;Should you choose not to, at least avoid making it a MovieClip as there's no technical reason it shouldn't be anything more than a Sprite instance." />
  <row Id="7763" PostHistoryTypeId="2" PostId="3955" RevisionGUID="acb1b7db-f5ab-4382-97bd-de31d2b1c90d" CreationDate="2010-09-19T10:47:40.690" UserId="1156" Text="I'm taking you to mean .swf size, for loading vs presentation?&#xD;&#xA;&#xD;&#xA;I found [this link finding the average sizes for flash files.][1]&#xD;&#xA;Most seem to be 1MB-5MB. As long as you have a decent loading screen that keeps people attracted, and it's not too much of a wait, then it'll be fine.&#xD;&#xA;&#xD;&#xA;On Facebook, everyone's bored. :P&#xD;&#xA;&#xD;&#xA;  [1]: http://www.emanueleferonato.com/2010/07/23/the-perfect-swf-file-size-of-your-flash-games/" />
  <row Id="7764" PostHistoryTypeId="6" PostId="3951" RevisionGUID="8e40bff2-8354-484a-b29a-5d7e4f8b185c" CreationDate="2010-09-19T10:48:05.213" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;flash&gt;&lt;server&gt;&lt;facebook&gt;" />
  <row Id="7765" PostHistoryTypeId="2" PostId="3956" RevisionGUID="3370c417-f613-4392-a48f-2d1d5ca8d46c" CreationDate="2010-09-19T10:54:28.810" UserId="20" Text="Flash is actually pretty good at handling &quot;frustum culling&quot;. You should use the `scrollRect` property for this: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayObject.html#scrollRect&#xD;&#xA;&#xD;&#xA;If you plan to use a Image for your world map, you should be aware of the Bitmap-size limitations of the Flash player. If you target player 9, the limits are 2880x2880 pixels. Player 10 and up can handle images with a pixel sum of max. 4095^2 pixels (see: http://kb2.adobe.com/cps/496/cpsid_49662.html).&#xD;&#xA;&#xD;&#xA;If you think your map might exceed these limits, I think it would be a good idea to implement some tiling on your own.&#xD;&#xA;&#xD;&#xA;**Update:** Here's an article that explains `scrollRect` a bit better: http://www.gskinner.com/blog/archives/2006/11/understanding_d.html" />
  <row Id="7766" PostHistoryTypeId="5" PostId="3951" RevisionGUID="d1bc1375-ff0e-4306-9b13-cb9a996dd912" CreationDate="2010-09-19T14:33:39.533" UserId="2167" Comment="edited body" Text="I'm developing a flash game and i want to put it in Facebook &#xD;&#xA;,My question is the Proper maximum  size for it.&#xD;&#xA;500 KB&#xD;&#xA;1 MB ??" />
  <row Id="7771" PostHistoryTypeId="2" PostId="3958" RevisionGUID="fe9865c9-5f4e-4ca7-b6fa-b47649ff12e4" CreationDate="2010-09-19T21:00:57.170" UserId="2168" Text="Is anyone aware of a nice 3D map tutorial (how to import and use the map) using XNA without any engine but not limited to an external application (like Tiled for 2D maps) ?&#xD;&#xA;&#xD;&#xA;I did a search arund here but have'nt found anything towards xna 3d maps only 2d.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7772" PostHistoryTypeId="1" PostId="3958" RevisionGUID="fe9865c9-5f4e-4ca7-b6fa-b47649ff12e4" CreationDate="2010-09-19T21:00:57.170" UserId="2168" Text="Creating a 3D map for XNA ?" />
  <row Id="7773" PostHistoryTypeId="3" PostId="3958" RevisionGUID="fe9865c9-5f4e-4ca7-b6fa-b47649ff12e4" CreationDate="2010-09-19T21:00:57.170" UserId="2168" Text="&lt;3d&gt;&lt;xna&gt;&lt;c#&gt;&lt;maps&gt;" />
  <row Id="7774" PostHistoryTypeId="2" PostId="3959" RevisionGUID="42274100-c952-4344-898e-a058ab0c0c6c" CreationDate="2010-09-19T22:48:38.187" UserId="189" Text="You'll want to search for tutorials on &quot;terrain&quot;, which is the technical term for a 3D map. Also &quot;heightmap&quot; might return results.&#xD;&#xA;&#xD;&#xA;Here is one possibility (notice the &quot;Contents&quot; section on the right bottomish): http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php" />
  <row Id="7775" PostHistoryTypeId="2" PostId="3960" RevisionGUID="b38efc05-bb7f-4a78-ad14-e99a0248447b" CreationDate="2010-09-19T23:05:28.457" UserId="1198" Text="If you are simply passing &quot;turn&quot; changes back and forth then you are on the best path. WCF will allow you the greatest flexibility without adding very much to your development efforts, especially if you already know .NET.&#xD;&#xA;&#xD;&#xA;Since it seems that latency is not an issue in your game, WCF is a great choice, because it will abstract away all of the message encoding from you, and since you don't need to eek out every last bit of performance, this abstraction should be more benificial to you than harmful." />
  <row Id="7776" PostHistoryTypeId="5" PostId="3958" RevisionGUID="a29dedb3-08e7-46ba-b6ff-68a152b7a607" CreationDate="2010-09-19T23:05:40.180" UserId="2168" Comment="edit PS" Text="Is anyone aware of a nice 3D map tutorial (how to import and use the map) using XNA without any engine but not limited to an external application (like Tiled for 2D maps) ?&#xD;&#xA;&#xD;&#xA;I did a search arund here but have'nt found anything towards xna 3d maps only 2d.&#xD;&#xA;&#xD;&#xA;PS: **I am looking for material that can be read online.**&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7777" PostHistoryTypeId="5" PostId="889" RevisionGUID="b105f306-7f54-4577-9618-14376e0b74b6" CreationDate="2010-09-19T23:26:11.660" UserId="370" Comment="deleted 1 characters in body" Text="When optimizing the frame rate of a game, when should I focus on a large&#xD;&#xA;FPS and when should I focus on a consistent frame rate.&#xD;&#xA;&#xD;&#xA;This is often a hotly contested issue, so please note I'm **not** asking which&#xD;&#xA;is better.&#xD;&#xA;&#xD;&#xA;What are the pros and cons of each?  &#xD;&#xA;In which situations is one preferred over the other?&#xD;&#xA;&#xD;&#xA;Also note: my input polling/processing, physics, and game update rates are&#xD;&#xA;independent of my frame rate.  The only thing the FPS affects is how often a&#xD;&#xA;screen is rendered." />
  <row Id="7778" PostHistoryTypeId="5" PostId="3959" RevisionGUID="0640a358-387c-4fb8-86be-daa863d778c4" CreationDate="2010-09-20T02:19:43.367" UserId="189" Comment=" " Text="You'll want to search for tutorials on &quot;terrain&quot;, which is the technical term for a 3D map. Also &quot;heightmap&quot; might return results.&#xD;&#xA;&#xD;&#xA;Here is one possibility (notice the &quot;Contents&quot; section on the right bottomish): http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Due to the comment that you're looking for online content which can be read: This IS an online tutorial! It can indeed be read online! When you go to the above link, **look on the right side, the third section is &quot;Contents&quot;; in that box, look for the links under &quot;3D Series 1: Terrain&quot;.**&#xD;&#xA;&#xD;&#xA;For example, here is one very relevant section: [&quot;Terrain from file&quot;][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Terrain_from_file.php" />
  <row Id="7779" PostHistoryTypeId="2" PostId="3961" RevisionGUID="ed5fbc96-fc4d-419b-aba8-a93820ea2758" CreationDate="2010-09-20T02:30:49.677" UserId="2167" Text="i found all my effects except this bad one &#xD;&#xA;please if you have one like [brainbuddies][1] please help me .&#xD;&#xA;thanks in advance&#xD;&#xA;&#xD;&#xA;  [1]: http://apps.facebook.com/brainbuddies/?ref=ts" />
  <row Id="7780" PostHistoryTypeId="1" PostId="3961" RevisionGUID="ed5fbc96-fc4d-419b-aba8-a93820ea2758" CreationDate="2010-09-20T02:30:49.677" UserId="2167" Text="i need a wrong sound for puzzle game" />
  <row Id="7781" PostHistoryTypeId="3" PostId="3961" RevisionGUID="ed5fbc96-fc4d-419b-aba8-a93820ea2758" CreationDate="2010-09-20T02:30:49.677" UserId="2167" Text="&lt;flash&gt;&lt;sound&gt;&lt;flash-professional&gt;" />
  <row Id="7782" PostHistoryTypeId="2" PostId="3962" RevisionGUID="1f983859-48d7-43cd-b59f-6560dd3ba498" CreationDate="2010-09-20T03:27:52.953" UserId="919" Text="Well this sounds like a pretty vague question but please bear with me.&#xD;&#xA;&#xD;&#xA;I know of how Gaiaonline gave gold to people who participated in forum posts. &#xD;&#xA;&#xD;&#xA;I'm curious if in theory these could be applied to social aspects of games like Second life or Sims Online. &#xD;&#xA;&#xD;&#xA;The question what would be specific quantifiable actions/interactions could be measured tracked for rewards and achievements that would help build a community?&#xD;&#xA;&#xD;&#xA;(this'll probably end up as community wiki though)  " />
  <row Id="7783" PostHistoryTypeId="1" PostId="3962" RevisionGUID="1f983859-48d7-43cd-b59f-6560dd3ba498" CreationDate="2010-09-20T03:27:52.953" UserId="919" Text="How does one measure and reward social aspects in virtual worlds?" />
  <row Id="7784" PostHistoryTypeId="3" PostId="3962" RevisionGUID="1f983859-48d7-43cd-b59f-6560dd3ba498" CreationDate="2010-09-20T03:27:52.953" UserId="919" Text="&lt;game-design&gt;" />
  <row Id="7785" PostHistoryTypeId="2" PostId="3963" RevisionGUID="a8073b3e-850f-4ccc-b853-0823d7213288" CreationDate="2010-09-20T04:12:47.917" UserId="953" Text="I recommend you check http://www.pdsounds.org/ and http://www.freesound.org/ , both of which have sound effects available under free licenses.  Be aware that you're still ethically (and usually legally) required to give attribution.&#xD;&#xA;&#xD;&#xA;If you want to make your own 8-bit-sounding effects, you can use http://www.drpetter.se/project_sfxr.html .&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7786" PostHistoryTypeId="2" PostId="3964" RevisionGUID="680b33bc-a48d-4e0d-93e6-e85ac72ed46f" CreationDate="2010-09-20T09:04:18.317" UserId="119" Text="I don't want to use box2d or anything, I just want simple moving platforms (up-down, left-right, diagonal and circular paths). My question is to handle the update order / control hierarchy so that the player stays fixed to the platform solidly, without bouncing or wobbling?" />
  <row Id="7787" PostHistoryTypeId="1" PostId="3964" RevisionGUID="680b33bc-a48d-4e0d-93e6-e85ac72ed46f" CreationDate="2010-09-20T09:04:18.317" UserId="119" Text="How do I handle moving platforms in a platform game?" />
  <row Id="7788" PostHistoryTypeId="3" PostId="3964" RevisionGUID="680b33bc-a48d-4e0d-93e6-e85ac72ed46f" CreationDate="2010-09-20T09:04:18.317" UserId="119" Text="&lt;2d-physics&gt;&lt;moving-platforms&gt;&lt;platform-games&gt;" />
  <row Id="7789" PostHistoryTypeId="6" PostId="3962" RevisionGUID="65def4ee-19f6-4dbb-ab31-231b47ef5143" CreationDate="2010-09-20T09:08:09.813" UserId="919" Comment="edited tags; edited tags; edited tags" Text="&lt;game-design&gt;&lt;community-management&gt;" />
  <row Id="7790" PostHistoryTypeId="2" PostId="3965" RevisionGUID="2db2b30e-642d-4ffb-afd3-6f66132569ec" CreationDate="2010-09-20T10:09:44.450" UserId="2188" Text="I don't know how Gaia online does, but beware that doing such a thing you might actually make both the forums *and* the game a worst place: people will spam the forum (ruining it) just to get gold in game, where they will have an unfair advantage over other people (ruining the game too).&#xD;&#xA;&#xD;&#xA;You must be careful to give this kind of rewards somehow only if you did something to earn it, not just farming posts or stupid things like that.&#xD;&#xA;&#xD;&#xA;Moreover, you will probabily want not to give actual game gold, but nice stuff, like the pet companions in wow that have no effect on gameplay but are cute." />
  <row Id="7791" PostHistoryTypeId="2" PostId="3966" RevisionGUID="66efe837-1659-4c44-8c22-76c54a0a1183" CreationDate="2010-09-20T10:14:15.240" UserId="2188" Text="You might fix the player position not &quot;absolute in the level&quot; but &quot;relative to the platform&quot;, then have a function that gives his actual position. I don't like this though.&#xD;&#xA;&#xD;&#xA;It would be probably better (and simpler) to bind the player to the platform so that when the platform moves +x/+y, the player moves as much." />
  <row Id="7792" PostHistoryTypeId="2" PostId="3967" RevisionGUID="946261e7-e22e-4857-af21-c8fe4334b335" CreationDate="2010-09-20T10:17:25.417" UserId="1705" Text="My solution would be to treat every physical entity in the game map as a *tree node*, and the map itself as the *root node*. Nodes can contain other nodes. Every node is contained (directly or indirectly) inside the map node.&#xD;&#xA;&#xD;&#xA;For example, let's say your character is standing on a platform. The platform's node contains the character's node. So, whenever the platform moves, the nodes it contains (in this case the character) will move too.&#xD;&#xA;&#xD;&#xA;For this to happen, **every node should have an (x,y) position *relative to the parent node***. For example, your platform could be located at (10,10) *relative* to the game map, and your character could be located at (1,0) *relative* to the platform. That way, if the platform moves, your character will move along implicitly.&#xD;&#xA;&#xD;&#xA;In this hierarchical tree, the position of every node is equal to the sum of his position plus each of his parent nodes' positions. Let's say we want to get the character's position on the map. We calculate:&#xD;&#xA;&#xD;&#xA;(character's position) + (parent node's position) + (root node position) = (1,0) + (10,10) + (0,0) = **(11,0)**&#xD;&#xA;&#xD;&#xA;OK, so all this time your character has been standing on the platform. What about jumping? Well, the moment he jumps, you *detach him from the platform* and *attach him to the node containing the platform*; in this case, the map (root node).&#xD;&#xA;&#xD;&#xA;When he lands again, attach him to whatever node he landed on." />
  <row Id="7793" PostHistoryTypeId="16" PostId="3967" RevisionGUID="946261e7-e22e-4857-af21-c8fe4334b335" CreationDate="2010-09-20T10:17:25.417" UserId="1705" />
  <row Id="7794" PostHistoryTypeId="2" PostId="3968" RevisionGUID="a4c6f8cd-25b3-4844-86a1-35300e404a47" CreationDate="2010-09-20T11:07:26.493" UserId="744" Text="There are many in-game social actions that can be tracked trivially, because they're already going to be database transactions:&#xD;&#xA;&#xD;&#xA; * Joining a team, and leading a team.&#xD;&#xA; * Joining a guild, and founding a guild.&#xD;&#xA; * Putting items up for auction.&#xD;&#xA; * Creating public spaces for other players.&#xD;&#xA;&#xD;&#xA;Additionally, your game systems can provide some affordances for socially-driven players:&#xD;&#xA;&#xD;&#xA; * Contests - costume contests, minigame (e.g. fishing) contests, point-to-point races. Players will host these events anyway. If you provide even minimal systematic hooks for them, you can track and reward them.&#xD;&#xA; * Newbie help zones / tutorials.&#xD;&#xA; * Community approbation (Stack Overflow's approach). Most games have some way to &quot;downvote&quot; other players. Provide a way to &quot;upvote&quot; them too.&#xD;&#xA;&#xD;&#xA;As for rewarding, a key point missed by many designs is that you need to award like with like to motivate people. Reward the players that progress in your combat with the +5 sword; reward the players that create your social spaces with socially-visible items like titles, clothing, or emotes." />
  <row Id="7795" PostHistoryTypeId="2" PostId="3969" RevisionGUID="4bffea27-7121-4a4f-8b50-616b6b091354" CreationDate="2010-09-20T12:18:38.230" UserId="2205" Text="I'm currently creating a game framework/engine for educational games. My hope is that this can be used in elementary schools. It is of course extremely important that the games are both fun and educational.&#xD;&#xA;&#xD;&#xA;Any ideas what should be in my initial requirement specification?&#xD;&#xA;&#xD;&#xA;What makes a good educational game?&#xD;&#xA;&#xD;&#xA;Which platforms should I target?" />
  <row Id="7796" PostHistoryTypeId="1" PostId="3969" RevisionGUID="4bffea27-7121-4a4f-8b50-616b6b091354" CreationDate="2010-09-20T12:18:38.230" UserId="2205" Text="What makes a good educational game?" />
  <row Id="7797" PostHistoryTypeId="3" PostId="3969" RevisionGUID="4bffea27-7121-4a4f-8b50-616b6b091354" CreationDate="2010-09-20T12:18:38.230" UserId="2205" Text="&lt;programming&gt;&lt;cross-platform&gt;&lt;education&gt;" />
  <row Id="7798" PostHistoryTypeId="2" PostId="3970" RevisionGUID="1beeaf52-800b-417c-a0b6-89e0d70bad83" CreationDate="2010-09-20T12:57:55.053" UserId="1352" Text="Avast there fellow Norwegian!&#xD;&#xA;&#xD;&#xA;I just have a few ideas:&#xD;&#xA;&#xD;&#xA;* Pr. user performance reports. Can be used by teachers to evauluate who needs more follow up.&#xD;&#xA;&#xD;&#xA;* Easily customizable/ localizable textual content.&#xD;&#xA;&#xD;&#xA;* Good Teacher/student communication.&#xD;&#xA;&#xD;&#xA;* Multiplayer. Where the whole class can participate in engaging tasks. This will make it easier for timid children to show off their skills to the teacher. Some ideas for multiplayer games: Quiz, collaborative construction with physics simulation, collaborative puzzle solving.&#xD;&#xA;         &#xD;&#xA;&#xD;&#xA;* Don't underestimate small children's requirements for quality gameplay. Remember they all get their nintendo DS at a small age. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When it comes to target, I am guessing PC would be a good target, since most school children ( at least in Norway, where you're located) have their own.&#xD;&#xA;&#xD;&#xA;Best of luck to you!&#xD;&#xA;" />
  <row Id="7799" PostHistoryTypeId="10" PostId="3961" RevisionGUID="bf524b77-83af-4621-aa1b-4f8375db0a28" CreationDate="2010-09-20T13:00:26.500" UserId="-1" CloseReasonId="7" Text="[{&quot;Id&quot;:288,&quot;DisplayName&quot;:&quot;Andrew Russell&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="7800" PostHistoryTypeId="2" PostId="3971" RevisionGUID="e0e4a822-2df5-4a81-b233-e6e7d5df10a5" CreationDate="2010-09-20T13:19:49.200" UserId="138" Text="The International Game Developers Association ([IGDA][1]) has a [suggested framework][2] for game development curriculums.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://igda.org&#xD;&#xA;  [2]: http://archives.igda.org/academia/curriculum_framework.php" />
  <row Id="7801" PostHistoryTypeId="2" PostId="3972" RevisionGUID="236069f5-ba01-4bf9-aa50-f49be49226cb" CreationDate="2010-09-20T13:23:56.607" UserId="262" Text="I'll address the third question. I think the iPad has huge potential of educational games:&#xD;&#xA;&#xD;&#xA;- Accessible : The touch UI is intuitive and simple enough that most children immediately 'get it'.&#xD;&#xA;- Safe : The Apple walled garden delivers an environment that most parents are comfortable with.&#xD;&#xA;- Mobile : It is pretty clear that mobile educational devices have already enjoyed a great deal of success (Leapster etc...).&#xD;&#xA;- Nascent : There is still a lot of room on the iPad app store for educational games.&#xD;&#xA;- Decent Hardware : The iPad hardware is more than adequate for slick, well crafted educational games.&#xD;&#xA;" />
  <row Id="7802" PostHistoryTypeId="2" PostId="3973" RevisionGUID="ee937302-d6c3-4424-87a9-58e1b94bef67" CreationDate="2010-09-20T13:26:26.707" UserId="136" Text="[XPF][1] is still early in development, but it's progressing pretty quickly.  It's based loosely on WPF and Silverlight, but it's developed for XNA.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://red-badger.com/Blog/post/Introducing-XPF-e28093-A-Layout-Framework-for-XNA.aspx" />
  <row Id="7803" PostHistoryTypeId="5" PostId="3967" RevisionGUID="8d0067fc-14d4-44be-be29-eb16b7089273" CreationDate="2010-09-20T13:43:53.283" UserId="1705" Comment="fixed awkward phrasing" Text="My solution would be to treat every physical entity in the game map as a *tree node*, and the map itself as the *root node*. Nodes can contain other nodes. Every node is contained (directly or indirectly) inside the map node.&#xD;&#xA;&#xD;&#xA;For example, let's say your character is standing on a platform. The platform's node contains the character's node. So, whenever the platform moves, the nodes it contains (in this case the character) will move too.&#xD;&#xA;&#xD;&#xA;For this to happen, **every node should have an (x,y) position *relative to the parent node***. For example, your character could be located at (1,0) *relative* to the platform, which itself could be located at (10,10) *relative* to the game map. That way, if the platform moves, your character will move along implicitly.&#xD;&#xA;&#xD;&#xA;In this hierarchical tree, the position of every node is equal to the sum of his position plus each of his parent nodes' positions. Let's say we want to get the character's position on the map. We calculate:&#xD;&#xA;&#xD;&#xA;(character's position) + (parent node's position) + (root node position) = (1,0) + (10,10) + (0,0) = **(11,0)**&#xD;&#xA;&#xD;&#xA;OK, so all this time your character has been standing on the platform. What about jumping? Well, the moment he jumps, you *detach him from the platform* and *attach him to the node containing the platform*; in this case, the map (root node).&#xD;&#xA;&#xD;&#xA;When he lands again, attach him to whatever node he landed on." />
  <row Id="7804" PostHistoryTypeId="2" PostId="3974" RevisionGUID="751f45f3-2fee-4a61-a9ba-7ea27914a75e" CreationDate="2010-09-20T14:02:11.320" UserId="2167" Text="What i woona do is tp put a Google Ads in my flash game .&#xD;&#xA;The first question is how can i do that ?&#xD;&#xA;The second question is the best place to put it while loading , after finishing the game ??" />
  <row Id="7805" PostHistoryTypeId="1" PostId="3974" RevisionGUID="751f45f3-2fee-4a61-a9ba-7ea27914a75e" CreationDate="2010-09-20T14:02:11.320" UserId="2167" Text="how can i put a Google Ads in the flash game" />
  <row Id="7806" PostHistoryTypeId="3" PostId="3974" RevisionGUID="751f45f3-2fee-4a61-a9ba-7ea27914a75e" CreationDate="2010-09-20T14:02:11.320" UserId="2167" Text="&lt;game-design&gt;&lt;flash&gt;&lt;facebook&gt;" />
  <row Id="7807" PostHistoryTypeId="2" PostId="3975" RevisionGUID="20933683-2a4f-441e-9bc3-d34919a2e17e" CreationDate="2010-09-20T14:11:55.260" UserId="378" Text="So first of all, most &quot;pure social&quot; games still have a lot of economics going on so there's a lot of economy-related stuff you could give achievements for. But assuming you mean the more social-type things, you could give achievements for:&#xD;&#xA;&#xD;&#xA; - Participating in a poll&#xD;&#xA; - Upvoting/downvoting something X number of times (I remember A Tale in the Desert had challenges where, for example, a player had to get their sculptures voted favorably by denizens of the world -- this would reward voting for that thing)&#xD;&#xA; - Joining the forum&#xD;&#xA; - Posting to the forum **and having that post upvoted/thanked** (to address the spam issue brought up by Lo'oris)&#xD;&#xA; - Karma-type rewards that can be bestowed by other players&#xD;&#xA;&#xD;&#xA;Honestly, you would do well to look at the Badges system on this very website, as well as karma systems in places like Reddit.com. They do a relatively good job of encouraging users to be social in constructive ways." />
  <row Id="7808" PostHistoryTypeId="2" PostId="3976" RevisionGUID="7e0b8e46-1c9f-4214-9ed0-a13cb62b5919" CreationDate="2010-09-20T14:12:16.747" UserId="1198" Text="Your best bet is to put google ads on the page next to your game. " />
  <row Id="7810" PostHistoryTypeId="5" PostId="3974" RevisionGUID="d07aa1af-1515-4596-a950-d12fe55df739" CreationDate="2010-09-20T14:52:34.583" UserId="51" Comment="fixed everything; edited title" Text="What I want to do is put Google Ads in my flash game.&#xD;&#xA;&#xD;&#xA;The first question is how can I do that?&#xD;&#xA;&#xD;&#xA;The second question is the best place to put it; while loading, after finishing the game?" />
  <row Id="7811" PostHistoryTypeId="4" PostId="3974" RevisionGUID="d07aa1af-1515-4596-a950-d12fe55df739" CreationDate="2010-09-20T14:52:34.583" UserId="51" Comment="fixed everything; edited title" Text="How can I put Google Ads in a flash game?" />
  <row Id="7812" PostHistoryTypeId="5" PostId="3613" RevisionGUID="196003d0-0854-4479-b04c-f6ed215b46aa" CreationDate="2010-09-20T15:14:51.433" UserId="1872" Comment="added 627 characters in body" Text="**The immediate question is: in HLSL, how can I orient a surface normal generated in UV space so that I can apply it to a cube face?** &#xD;&#xA;&#xD;&#xA;The overall project is that I'm trying to build a procedural planet generator.  I'm using a cube projected to a sphere where each face is a quad-tree.  The intermediate project is that I want to generate a normal map for the terrain.  I think the best way for me to do this (and understand what I'm doing) is to generate the normals for the cube version first, then work out the transformations to warp those normals to the sphere.&#xD;&#xA;&#xD;&#xA;Ideally the method would not involve branching code based on which face I'm working on (i.e., if we're on the top side of the cube, then U = X and V = Y).  In other words, what I'm hoping for is some math-magic like &quot;Oh, just cross multiply the terrain normal by the dot product of the cube face normal and blah blah blah&quot;.&#xD;&#xA;&#xD;&#xA;**9/20/10 ETA:**&#xD;&#xA;&#xD;&#xA;I know how to calculate normals for a flat surface.  My subsequent problem is two-fold:&#xD;&#xA;&#xD;&#xA;1. How do I rotate the normal map so it is oriented correctly on each of the cube faces?&#xD;&#xA;2. how do I warp the flat normal map so that it wraps the sphere?&#xD;&#xA;&#xD;&#xA;I've found [one solution][1] that uses a Jacobian matrix, but I can't get it to work.  Even when all of the normals are pointing straight up (i.e. a flat surface), the HLSL code involving the Jacobian totally messes up the lighting--so it makes me not trust my implementation of the solution.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://acko.net/blog/making-worlds-3-thats-no-moon" />
  <row Id="7813" PostHistoryTypeId="2" PostId="3978" RevisionGUID="3332fdbd-6d5c-446b-94ee-23d7598db6a3" CreationDate="2010-09-20T16:37:30.860" UserId="2167" Text="you can use these function &#xD;&#xA;&#xD;&#xA;     &#xD;&#xA;    hitTestObject(obj:DisplayObject):Boolean&#xD;&#xA;    Evaluates the display object to see if it overlaps or intersects with the obj display object.&#xD;&#xA;    &#xD;&#xA;       &#xD;&#xA;    hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean&#xD;&#xA;    Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters.&#xD;&#xA;&#xD;&#xA;http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html&#xD;&#xA;" />
  <row Id="7814" PostHistoryTypeId="2" PostId="3979" RevisionGUID="3bfa9015-6269-440e-90b7-f1a782753e1a" CreationDate="2010-09-20T16:43:49.677" UserId="2167" Text="you can see this topic&#xD;&#xA;&#xD;&#xA;[Protect Your Flash Files From Decompilers by Using Encryption][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://active.tutsplus.com/tutorials/workflow/protect-your-flash-files-from-decompilers-by-using-encryption/" />
  <row Id="7815" PostHistoryTypeId="2" PostId="3980" RevisionGUID="f39ee442-35d4-44ea-8c8d-4ff82006896d" CreationDate="2010-09-20T17:09:01.917" UserDisplayName="Alex" Text="Hey guys, i was wondering how i would go about finding the perpendicular lines relative to a surface normal.&#xD;&#xA;&#xD;&#xA;For instance say i have (0,0,1) the expected output would be (1,0,0) and (0,1,0). What would be the best way of achieving this?&#xD;&#xA;&#xD;&#xA;I realize that i will be using the cross product, but that requires two vectors, how do i get my first perpendicular line?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="7816" PostHistoryTypeId="1" PostId="3980" RevisionGUID="f39ee442-35d4-44ea-8c8d-4ff82006896d" CreationDate="2010-09-20T17:09:01.917" UserDisplayName="Alex" Text="How to find two perpendicular lines given a single plane." />
  <row Id="7817" PostHistoryTypeId="3" PostId="3980" RevisionGUID="f39ee442-35d4-44ea-8c8d-4ff82006896d" CreationDate="2010-09-20T17:09:01.917" UserDisplayName="Alex" Text="&lt;3d&gt;&lt;programming&gt;&lt;math&gt;&lt;normals&gt;" />
  <row Id="7818" PostHistoryTypeId="2" PostId="3981" RevisionGUID="292c0ad3-57e9-4668-8933-e5749e2114de" CreationDate="2010-09-20T17:22:58.330" UserId="2214" Text="I'm looking at some ideas of creating a smale scale MMORPG game, based in Java, this is a side/hobby project to help my learning process&#xD;&#xA;&#xD;&#xA;I've already had a play with GAE and have put up a simple web app, I'm thinking of using this as my platform for a game&#xD;&#xA;&#xD;&#xA;Is this a good idea? Are there any games out there that use such a platform? I can't see any limitations so far, other than Google might be able to &quot;own&quot; it rather than myself" />
  <row Id="7819" PostHistoryTypeId="1" PostId="3981" RevisionGUID="292c0ad3-57e9-4668-8933-e5749e2114de" CreationDate="2010-09-20T17:22:58.330" UserId="2214" Text="Is Google App Engine a good platform for an online MMO?" />
  <row Id="7820" PostHistoryTypeId="3" PostId="3981" RevisionGUID="292c0ad3-57e9-4668-8933-e5749e2114de" CreationDate="2010-09-20T17:22:58.330" UserId="2214" Text="&lt;platform&gt;&lt;google-app-engine&gt;" />
  <row Id="7821" PostHistoryTypeId="2" PostId="3982" RevisionGUID="d1c882de-b7af-4e0b-81e7-592148de7a74" CreationDate="2010-09-20T17:23:06.757" UserId="2187" Text="If any of your normals have 0 in them, then a perpendicular vector will have a non zero component in that direction. IE (0,1,1) will be perpendicular to (x,0,0) for all x!=0. Other than that you can try (y,-x,z) for a perpendicular vector.&#xD;&#xA;&#xD;&#xA;Also, lines are not vectors, so you are really finding perpendicular vectors." />
  <row Id="7823" PostHistoryTypeId="2" PostId="3984" RevisionGUID="765d4f58-e9ce-4221-8be4-ee472d2088d8" CreationDate="2010-09-20T18:07:17.037" UserId="1738" Text="The Gram-Schmidt process will find these vectors for you.&#xD;&#xA;&#xD;&#xA;Firstly, the vectors you find will not be unique.  Any two perpendicular vectors in the plane can be rotated to find two more.&#xD;&#xA;&#xD;&#xA;To find an arbitrary pair of perpendicular vectors, just find another vector that is not a scalar multiple of your normal.  You can do this by adding a constant value to one of your components (check that the other two aren't zero -- if they are, then add the constant to one of the zero components).  Now that you have this other vector compute the cross product of this vector with the normal to get a vector in the plane.  Then compute the cross product between this vector and the normal to get a second vector in the plane - and you are done.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process" />
  <row Id="7826" PostHistoryTypeId="2" PostId="3985" RevisionGUID="54c67df2-e668-4cac-9c94-ac2742dd2632" CreationDate="2010-09-20T18:11:42.833" UserId="1923" Text="&gt; how do i get my first perpendicular line?&#xD;&#xA;&#xD;&#xA;1. Cross the normal with any arbitrary vector. We'll call this result1 and it is on the plane &amp; perp to the normal.&#xD;&#xA;2. Cross the normal &amp; result1 and this result (result2) is perpendicular to both normal &amp; result1.&#xD;&#xA;&#xD;&#xA;If the normal &amp; the arbitrary vectors are unit length, your results will be a basis for an orthonormal rotation matrix.&#xD;&#xA;&#xD;&#xA;edit - for the arbitrary vector, make sure it's not parallel to the normal.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7827" PostHistoryTypeId="5" PostId="3984" RevisionGUID="3ab78062-e79d-4cc3-881e-ce9cea3d2219" CreationDate="2010-09-20T18:13:23.490" UserId="1738" Comment="deleted 61 characters in body" Text="Firstly, the vectors you find will not be unique.  Any two perpendicular vectors in the plane can be rotated to find two more.&#xD;&#xA;&#xD;&#xA;To find an arbitrary pair of perpendicular vectors, just find another vector that is not a scalar multiple of your normal.  You can do this by adding a constant value to one of your components (check that the other two aren't zero -- if they are, then add the constant to one of the zero components).  Now that you have this other vector compute the cross product of this vector with the normal to get a vector in the plane.  Then compute the cross product between this vector and the normal to get a second vector in the plane - and you are done.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process" />
  <row Id="7828" PostHistoryTypeId="2" PostId="3986" RevisionGUID="59aeea53-7ae5-438e-9a52-d596b97db617" CreationDate="2010-09-20T18:48:11.563" UserId="666" Text="Sort of, depends on how much latency/speed you need. &#xD;&#xA;&#xD;&#xA;Every http request (to a dedicated server) takes anywhere between 300-600 ms. In the app engine that looks more like 600-900 ms or even more(if you have a lot of queries). At the same time a single connection to the GAE has to last less than 30 secs, so... &#xD;&#xA;&#xD;&#xA;What all that means is that you will have to be doing slow polling, which might be good enough for some turn-based, not real time games. &#xD;&#xA;&#xD;&#xA;If you want to do a real time game you need to leave HTTP and go to TCP or UDP(especially UDP).&#xD;&#xA;&#xD;&#xA;Having said that, if a slow latency/non-real time connection is good enough for your game, GAE scales pretty cheaply, and solves a lot of problems (no limit on the size of the db, no spam problems with large amount of emails, etc)" />
  <row Id="7829" PostHistoryTypeId="5" PostId="3985" RevisionGUID="acbad09c-2e38-4a19-8cb3-a037a9e4d7ab" CreationDate="2010-09-20T18:50:41.747" UserId="1923" Comment="added 27 characters in body" Text="&gt; how do i get my first perpendicular line?&#xD;&#xA;&#xD;&#xA;1. Cross the normal with any arbitrary vector. We'll call this result1 and it is on the plane &amp; perp to the normal.&#xD;&#xA;2. Cross the normal &amp; result1 and this result (result2) is perpendicular to both normal &amp; result1.&#xD;&#xA;&#xD;&#xA;If the normal &amp; the arbitrary vectors are unit length, and you normalize result1, your results will be a basis for an orthonormal rotation matrix.&#xD;&#xA;&#xD;&#xA;edit - for the arbitrary vector, make sure it's not parallel to the normal.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7830" PostHistoryTypeId="2" PostId="3987" RevisionGUID="f31f8404-a5f3-4072-bf56-5de109d35696" CreationDate="2010-09-20T18:59:49.573" UserId="2216" Text="I'm in the middle of an encounter system for an XNA RPG. The idea is, you walk around a dungeon, and certain tiles are makred as RandomBattleTiles, and you have an area in the map defining what monsters can be encountered. What I need is a way to layout the way a monster levels and how it's stat's increase. I was thinking something along these lines:&#xD;&#xA;&#xD;&#xA;    &lt;Species&gt;&#xD;&#xA;        &lt;Name&gt;MonsterA&lt;/Name&gt;&#xD;&#xA;        &lt;ID&gt;001&lt;/ID&gt;&#xD;&#xA;        &lt;SpriteName&gt;monstera_sprite&lt;/SpriteName&gt;&#xD;&#xA;        &lt;Levels&gt;&#xD;&#xA;           &lt;Level&gt;&#xD;&#xA;              &lt;LevelID&gt;1&lt;/LevelID&gt;&#xD;&#xA;              &lt;Stats&gt;&#xD;&#xA;                  &lt;Attack&gt;12&lt;/Attack&gt;&#xD;&#xA;                  &lt;Defense&gt;10&lt;/Defense&gt;&#xD;&#xA;                  &lt;Speed&gt;20&lt;/Speed&gt;&#xD;&#xA;              &lt;/Stats&gt;&#xD;&#xA;              &lt;Moves&gt;&#xD;&#xA;                   &lt;Move ID=&quot;1&quot; Level=&quot;2&quot;/&gt;&#xD;&#xA;              &lt;/Moves&gt;&#xD;&#xA;            &lt;/Level&gt;&#xD;&#xA;         &lt;/Levels&gt;&#xD;&#xA;    &lt;/Species&gt;&#xD;&#xA;&#xD;&#xA;Would this be proper? Moves would follow a similar definition pattern." />
  <row Id="7831" PostHistoryTypeId="1" PostId="3987" RevisionGUID="f31f8404-a5f3-4072-bf56-5de109d35696" CreationDate="2010-09-20T18:59:49.573" UserId="2216" Text="Developing an RPG Encounter System" />
  <row Id="7832" PostHistoryTypeId="3" PostId="3987" RevisionGUID="f31f8404-a5f3-4072-bf56-5de109d35696" CreationDate="2010-09-20T18:59:49.573" UserId="2216" Text="&lt;programming&gt;&lt;xna&gt;&lt;levels&gt;" />
  <row Id="7833" PostHistoryTypeId="2" PostId="3988" RevisionGUID="3886913b-cac2-4bb0-a881-9b5a02495d81" CreationDate="2010-09-20T19:28:38.553" UserId="1705" Text="I've seen this type of XML database used in a few roguelikes.&#xD;&#xA;&#xD;&#xA;I suggest you store the species and the random encounter tables separately.&#xD;&#xA;&#xD;&#xA;You don't need to put a separate set of stats for every possible level. Just use one for minimum level and one for maximum. Your game should interpolate between them to get the monster's stats according to its level.&#xD;&#xA;&#xD;&#xA;    &lt;Species&gt;&#xD;&#xA;        &lt;Name&gt;MonsterA&lt;/Name&gt;&#xD;&#xA;        &lt;ID&gt;001&lt;/ID&gt;&#xD;&#xA;        &lt;SpriteName&gt;monstera_sprite&lt;/SpriteName&gt;&#xD;&#xA;        &lt;Levels&gt;&#xD;&#xA;           &lt;!-- Monster's stats at level 1 --&gt;&#xD;&#xA;           &lt;Level&gt;&#xD;&#xA;              &lt;LevelID&gt;1&lt;/LevelID&gt;&#xD;&#xA;              &lt;Stats&gt;&#xD;&#xA;                  &lt;Attack&gt;12&lt;/Attack&gt;&#xD;&#xA;                  &lt;Defense&gt;10&lt;/Defense&gt;&#xD;&#xA;                  &lt;Speed&gt;20&lt;/Speed&gt;&#xD;&#xA;              &lt;/Stats&gt;&#xD;&#xA;           &lt;/Level&gt;&#xD;&#xA;           &lt;!-- Monster's stats at level 100 --&gt;&#xD;&#xA;           &lt;Level&gt;&#xD;&#xA;              &lt;LevelID&gt;100&lt;/LevelID&gt;&#xD;&#xA;              &lt;Stats&gt;&#xD;&#xA;                  &lt;Attack&gt;1200&lt;/Attack&gt;&#xD;&#xA;                  &lt;Defense&gt;900&lt;/Defense&gt;&#xD;&#xA;                  &lt;Speed&gt;15&lt;/Speed&gt;&#xD;&#xA;              &lt;/Stats&gt;&#xD;&#xA;           &lt;/Level&gt;&#xD;&#xA;        &lt;/Levels&gt;&#xD;&#xA;        &lt;Moves&gt;&#xD;&#xA;            &lt;!-- Monster's possible moves, according to its level and the circumstances of battle --&gt;&#xD;&#xA;            &lt;Move Name=&quot;Slash&quot; MinLevel=&quot;1&quot; MaxLevel=&quot;25&quot; AiRestrictions=&quot;Always&quot; /&gt;&#xD;&#xA;            &lt;Move Name=&quot;Heal&quot; MinLevel=&quot;15&quot; MaxLevel=&quot;100&quot; AiRestrictions=&quot;HP&lt;25%&quot; /&gt;&#xD;&#xA;            &lt;Move Name=&quot;Poison&quot; MinLevel=&quot;25&quot; MaxLevel=&quot;100&quot; AiRestrictions=&quot;Enemy.Status!=POISON&quot; /&gt;&#xD;&#xA;        &lt;/Moves&gt;&#xD;&#xA;    &lt;/Species&gt;&#xD;&#xA;&#xD;&#xA;Then, separately, create the random encounters:&#xD;&#xA;&#xD;&#xA;    &lt;RandomEncounters&gt;&#xD;&#xA;        &lt;RandomEncounter&gt;&#xD;&#xA;            &lt;ID&gt;100&lt;/ID&gt;&#xD;&#xA;            &lt;Probability&gt;3&lt;/Probability&gt;&#xD;&#xA;            &lt;ExperiencePoints&gt;3600&lt;/ExperiencePoints&gt;&#xD;&#xA;            &lt;Gold&gt;1000&lt;/Gold&gt;&#xD;&#xA;            &lt;Monsters&gt;&#xD;&#xA;                &lt;Monster Species=&quot;1&quot; MinLevel=&quot;17&quot; MaxLevel=&quot;20&quot; /&gt;&#xD;&#xA;                &lt;Monster Species=&quot;2&quot; MinLevel=&quot;11&quot; MaxLevel=&quot;12&quot; /&gt;&#xD;&#xA;                &lt;Monster Species=&quot;2&quot; MinLevel=&quot;11&quot; MaxLevel=&quot;12&quot; /&gt;&#xD;&#xA;            &lt;/Monsters&gt;&#xD;&#xA;        &lt;/RandomEncounter&gt;&#xD;&#xA;    &lt;/RandomEncounters&gt;" />
  <row Id="7834" PostHistoryTypeId="16" PostId="3988" RevisionGUID="3886913b-cac2-4bb0-a881-9b5a02495d81" CreationDate="2010-09-20T19:28:38.553" UserId="1705" />
  <row Id="7837" PostHistoryTypeId="5" PostId="3979" RevisionGUID="97049e20-e607-417f-925a-60adab9863ce" CreationDate="2010-09-20T21:56:59.953" UserId="2167" Comment="added 12 characters in body" Text="you can see this topic it may help&#xD;&#xA;&#xD;&#xA;[Protect Your Flash Files From Decompilers by Using Encryption][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://active.tutsplus.com/tutorials/workflow/protect-your-flash-files-from-decompilers-by-using-encryption/" />
  <row Id="7839" PostHistoryTypeId="2" PostId="3990" RevisionGUID="2f846eee-22d3-468a-803b-bcb2cafd4b77" CreationDate="2010-09-21T00:05:20.443" UserId="2220" Text="Google App Engine communicates in the way that any other web server would. Your C# client can access Google App Engine-hosted websites and use them as a basis for communication. C# makes this fairly easy and straightforward to accomplish using [System.Net.WebClient][1].&#xD;&#xA;&#xD;&#xA;(On the other hand, it is more difficult to have Google App Engine &quot;push&quot; messages out to your clients, if they aren't polling (or &quot;pulling&quot;) them. One strategy is to use App Engine's XMPP/Jabber support.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx" />
  <row Id="7840" PostHistoryTypeId="2" PostId="3991" RevisionGUID="7b5ebb4b-c866-486f-8707-54f5c56ba293" CreationDate="2010-09-21T00:06:01.333" UserId="48" Text="Last I checked you cannot embed Google Adsense in a Flash game/app, because Adsense is HTML+JS, which cannot be put inside Flash. &#xD;&#xA;&#xD;&#xA;You could hover it over your Flash game...but there are compatibility issues, doesn't work on all OS/Browsers, and may cause UI bugs with your Flash game.&#xD;&#xA;&#xD;&#xA;You could try hacking the Adsense code so that it requests the ad data and loads it &amp; displays it inside Flash...but this is against their terms of service.&#xD;&#xA;&#xD;&#xA;Your only option with Adsense is to place them on the same page next to your flash game (which isn't an option if you need your game to take up the full page). I suggest looking at [Mochi ads][1], they are specifically designed to be embedded in flash games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.mochimedia.com/developers/" />
  <row Id="7841" PostHistoryTypeId="2" PostId="3992" RevisionGUID="3e8ef960-5dc2-4749-9671-ba6138deaaf3" CreationDate="2010-09-21T00:10:32.603" UserId="2221" Text="Well, if you don't mind moving away from C# to C++ you could check out [HGE][1].  It's a little on the old side but is very easy to use and extend.  If you're willing to search the forums a bit you will find ports of it to DirectX 9 and maybe OpenGL (it has been a while).  By default it doesn't support things like shaders.  It does include sound and input, but no physics or collision detection.  For that there is always Bullet or Box2D.  For a turn based game or simple real time game that may not even be necessary.&#xD;&#xA;&#xD;&#xA;As far as GUI goes its built in GUI is garbage, but you can integrate CEGUI into it.  CEGUI is actually pretty easy to extend to different rendering systems, even if skinning it can be cumbersome.  The implementation for HGE is two files and they are pretty short.&#xD;&#xA;&#xD;&#xA;Clanlib may also be something you want to look into.  I haven't used it personally but it appears to be quite powerful and includes a pretty straightforward GUI component.  It is also actively developed while HGE hasn't been updated for a couple of years. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hge.relishgames.com/doc/index.html" />
  <row Id="7842" PostHistoryTypeId="2" PostId="3993" RevisionGUID="9e60c8dc-6cce-43e2-9bef-9e4ead22ea8a" CreationDate="2010-09-21T00:35:46.013" UserId="2220" Text="If you feel comfortable and productive in WCF there may not be a strong reason to use anything else. I certainly think that WCF is a good place to start because if you follow its contract pattern it is an easy pattern to convert to work with other systems, should that need arise.&#xD;&#xA;&#xD;&#xA;For one of my own projects, I started with a WCF prototype. When I started into &quot;the last mile&quot; I found that more often than not I was fighting WCF to get things done. I was particularly having issues with game matchmaking in WCF's peer-to-peer stack, which didn't quite give me the tools that I needed. In that project I ended up switching to XNA's network library, which gave me the Xbox-like matchmaking (and GamerTags and whatnot) that I was looking for and (badly) attempting to emulate in WCF. (Of course, XNA's networking library assumes you are working in an XNA game, and unfortunately still doesn't support publishing the game on Windows without a GfW Live contract.)&#xD;&#xA;&#xD;&#xA;I didn't touch that much of my networking code in the switch from WCF to XNA Net, because the contracts themselves (the interface classes) didn't change all that much (other than dropping the WCF attributes). Writing Reader/Writer classes that implemented or consumed my contracts was fairly straightforward. I probably could have kept support for both with a little bit of `#if WINDOWS` mangling, but I had decided to just drop WCF support at that time, because it simplified things on that project. Perhaps interesting, in starting other projects directly with XNA Networking, I've still been using something of WCF's interface/proxy-driven &quot;contract&quot; pattern. I've been meaning to write a blog post on that subject, actually, because I think it is a good pattern to follow." />
  <row Id="7843" PostHistoryTypeId="5" PostId="3958" RevisionGUID="19a6ed1f-0246-45d8-a903-de7e30147350" CreationDate="2010-09-21T01:33:15.067" UserId="2168" Comment="added 131 characters in body; added 1 characters in body" Text="Is anyone aware of a nice 3D map tutorial (how to import and use the map) using XNA without any engine but not limited to an external application (like Tiled for 2D maps) ?&#xD;&#xA;&#xD;&#xA;I did a search arund here but have'nt found anything towards xna 3d maps only 2d.&#xD;&#xA;&#xD;&#xA;PS: **I am looking for material that can be read online.**&#xD;&#xA;&#xD;&#xA;**I would be very interested in knowing any other contents related to this subject other then what  Ricket contributed.**&#xD;&#xA;&#xD;&#xA;Best regards.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7844" PostHistoryTypeId="2" PostId="3994" RevisionGUID="54a5891e-42ae-4aee-9645-47e58b51911b" CreationDate="2010-09-21T02:28:15.220" UserId="187" Text="How is collision detection and movement typically handled in a FPS, particularly handling slight changes in ground height such as stairs (both on incline and decline)?" />
  <row Id="7845" PostHistoryTypeId="1" PostId="3994" RevisionGUID="54a5891e-42ae-4aee-9645-47e58b51911b" CreationDate="2010-09-21T02:28:15.220" UserId="187" Text="FPS Collision detection and movement" />
  <row Id="7846" PostHistoryTypeId="3" PostId="3994" RevisionGUID="54a5891e-42ae-4aee-9645-47e58b51911b" CreationDate="2010-09-21T02:28:15.220" UserId="187" Text="&lt;collision-detection&gt;&lt;first-person-shooter&gt;" />
  <row Id="7847" PostHistoryTypeId="2" PostId="3995" RevisionGUID="1dd8e853-cb18-4b5a-9723-1fbb919ad26c" CreationDate="2010-09-21T02:36:43.400" UserId="1931" Text="Entities typically represented by a capsule (cylinder with spheres on the ends) against world geometry (or a simplified collision mesh) for world-ent collision.&#xD;&#xA;&#xD;&#xA;Stairs are usually either no-collide with an invisible ramp, or below a certain height you usually get a lift up as a side effect of collision resolution. (you'll get interpenetration with movement as a part of step size, and resolution will pop it out upward as the closest plane)&#xD;&#xA;&#xD;&#xA;I think this is how Unreal 3 works, but I could be wrong. I recall seeing a bounding box hierarchy in Source, but I can't remember if that was just for combat. regardless, capsules are simple and fast" />
  <row Id="7848" PostHistoryTypeId="2" PostId="3996" RevisionGUID="7c4da742-2e38-4937-adcf-41e7915c3d30" CreationDate="2010-09-21T04:28:57.977" UserId="1251" Text="I am trying to make the age-old version of pacman. And only then that I realized that I need to spend a heck lot of time for making the tile matrix itself. It gets messy more and more.&#xD;&#xA;&#xD;&#xA;I've also heard of this thing called level editors; Are there any of these kind for flash based games. If so, do write it down one line at a time. Thank You." />
  <row Id="7849" PostHistoryTypeId="1" PostId="3996" RevisionGUID="7c4da742-2e38-4937-adcf-41e7915c3d30" CreationDate="2010-09-21T04:28:57.977" UserId="1251" Text="Tile editor for flash based games?" />
  <row Id="7850" PostHistoryTypeId="3" PostId="3996" RevisionGUID="7c4da742-2e38-4937-adcf-41e7915c3d30" CreationDate="2010-09-21T04:28:57.977" UserId="1251" Text="&lt;engine&gt;&lt;flash&gt;&lt;level-design&gt;&lt;tiles&gt;" />
  <row Id="7851" PostHistoryTypeId="2" PostId="3997" RevisionGUID="62ad7f4a-855b-42be-9998-1aa36e01b040" CreationDate="2010-09-21T05:12:08.277" UserId="2220" Text="It's not exactly an MMO, but here's one article I read recently on using App Engine as a game server back-end:&#xD;&#xA;&#xD;&#xA;http://gamesfromwithin.com/google-app-engine-as-back-end-for-iphone-apps&#xD;&#xA;&#xD;&#xA;I have used GAE as a back-end for a couple of my projects, none of which was an MMO, but I certainly appreciate it as a strong web development platform that is easy to work with in general, and decidedly cheap to experiment with and bootstrap from.&#xD;&#xA;&#xD;&#xA;As @DFectuoso points out, for a real-time MMO you are going to have some issues using any web server, much less App Engine in particular. However, a turn-based and/or social MMO quite possibly could use App Engine as the sole back-end.&#xD;&#xA;&#xD;&#xA;Ultimately it does depend on your game architecture. There are strategies for doing near real-time or faking real-time where the main server is a web server like App Engine:&#xD;&#xA;&#xD;&#xA; - You could do real-time communications peer-to-peer, only updating the server at key moments.&#xD;&#xA; - You could attempt some real-time communication with strategies such as long polling, which is also referred to lately as &quot;comet requests&quot;, in which you make requests to the webserver and the server never &quot;finishes&quot; the response which results in very long requests/polling, but allows the webserver to continually push new data as it becomes available. (Deeper comet support is an upcoming feature in App Engine, according to the roadmap.)&#xD;&#xA; - In App Engine's case, you can also use XMPP/Jabber (an open IM protocol) to communicate quickly (just about real-time) with your game server. It might not be a great place to build a full real-time game, but there are many interesting chat bots written with App Engine's XMPP support." />
  <row Id="7852" PostHistoryTypeId="2" PostId="3998" RevisionGUID="522f5742-8b71-4a6f-80c4-7eddbe385686" CreationDate="2010-09-21T06:22:03.180" UserId="20" Text=" - [Tiled][1] is a cross platform and&#xD;&#xA;   quite powerful tile-editor.&#xD;&#xA; - [Ogmo Editor][2] is implemented in Flash (Adobe AIR), simple but good enough for most tasks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/&#xD;&#xA;  [2]: http://mattmakesgames.com/OgmoEditor/" />
  <row Id="7853" PostHistoryTypeId="2" PostId="3999" RevisionGUID="616dd8dd-89dd-4e79-9d2f-2e57df49103c" CreationDate="2010-09-21T06:37:35.627" UserId="2162" Text="&quot;I know how to calculate normals for a flat surface.&quot;  Exactly how are you doing this?  As far as I know, you shouldn't have to do anything to map it to a sphere other than map your UV's to the sphere surface correctly.  Normal maps are always in a &quot;flat&quot; plane because the texture itself is &quot;flat&quot;.  The shape of the object that you apply the normal map to shouldn't matter." />
  <row Id="7854" PostHistoryTypeId="2" PostId="4000" RevisionGUID="30722c2e-4ba9-4515-b232-f6fd6ad2ad9f" CreationDate="2010-09-21T06:41:31.467" UserId="2162" Text="Brady's answer is good, but if you want a hacky way to do it, you can just cast a ray down to your grounds collision geometry, figure out what triangle it hits, and then use a weighted average of the height of the verts of triangle to figure out the ground height." />
  <row Id="7855" PostHistoryTypeId="2" PostId="4001" RevisionGUID="3369ea8b-ee5e-498b-9680-addf0cde916b" CreationDate="2010-09-21T08:59:47.450" UserId="2167" Text="you can see &#xD;&#xA;http://www.infinitee-designs.com/Free-Maya-Models.htm &#xD;&#xA;&#xD;&#xA;http://gfx-3d-model.blogspot.com/&#xD;&#xA;&#xD;&#xA;[60 Excellent Free 3D Model Websites][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hongkiat.com/blog/60-excellent-free-3d-model-websites/" />
  <row Id="7856" PostHistoryTypeId="16" PostId="4001" RevisionGUID="3369ea8b-ee5e-498b-9680-addf0cde916b" CreationDate="2010-09-21T08:59:47.450" UserId="-1" />
  <row Id="7857" PostHistoryTypeId="2" PostId="4002" RevisionGUID="e96f1969-5b31-43b5-9009-927fee7b4963" CreationDate="2010-09-21T09:55:53.043" UserId="1101" Text="&gt; I'd like to know whether there are&#xD;&#xA;&gt; dedicated solutions available for&#xD;&#xA;&gt; implementing custom rules&#xD;&#xA;&#xD;&#xA;Yes, they're called programming languages. :)&#xD;&#xA;&#xD;&#xA;Seriously though, to make truly custom logic, you typically need a system that allows arbitrary conditions and actions, which is pretty much what a programming language does. Or to look at it from the other direction, it would be hard to imagine a system that could encapsulate any large variety of game rules that didn't end up resembling a full programming language of some sort.&#xD;&#xA;&#xD;&#xA;There isn't really any sort of standardisation in game rules or scoring mechanisms across games generally, so there's not much in the way of common functionality that you could meaningfully extract in this area." />
  <row Id="7858" PostHistoryTypeId="2" PostId="4003" RevisionGUID="917d71a2-c205-41cd-89c9-960ea40063eb" CreationDate="2010-09-21T11:31:50.383" UserId="2214" Text="As asked in a [previous question][1], I'm looking to create a small MMO that will be deployed onto GAE.&#xD;&#xA;&#xD;&#xA;I'm confused about what technologies I could use for the user interface, I've considered the following&#xD;&#xA;&#xD;&#xA;  1. **JSP Pages** - I've got experience with JSP/JSTL and I would find this easy to work with, it would require the user having to &quot;submit&quot; the page each time they perform an action so may become a little clumsey for players.&#xD;&#xA;  2. **Applet** - I could create an applet that sits on the front end and communicates to the back end game engine, however I'm not sure how good this method would be and have not used applets since university..&#xD;&#xA;&#xD;&#xA;What other options do I have? I don't have any experience in Flash/Flex so there would be a big learning curve there.&#xD;&#xA;&#xD;&#xA;Are there any other Java based options I may be able to use?&#xD;&#xA;&#xD;&#xA;My game will be text based, I may use some images, but I'm not intending to have any animations/graphics etc&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3981/is-google-app-engine-a-good-platform-for-an-online-mmo" />
  <row Id="7859" PostHistoryTypeId="1" PostId="4003" RevisionGUID="917d71a2-c205-41cd-89c9-960ea40063eb" CreationDate="2010-09-21T11:31:50.383" UserId="2214" Text="What technology(s)would be suitable for the front end part of a Java web game?" />
  <row Id="7860" PostHistoryTypeId="3" PostId="4003" RevisionGUID="917d71a2-c205-41cd-89c9-960ea40063eb" CreationDate="2010-09-21T11:31:50.383" UserId="2214" Text="&lt;java&gt;" />
  <row Id="7861" PostHistoryTypeId="2" PostId="4004" RevisionGUID="44e744bd-b033-4733-b9e4-ddbe9e6612d8" CreationDate="2010-09-21T11:35:25.383" UserId="189" Text="**JSP Pages that automatically refresh/poll via JavaScript (&quot;AJAX&quot;).** An applet is overkill and would be tough to get to interact with GAE as your &quot;server&quot;. Now if you had a dedicated server for socket communications then I would say applet, but given your situation, the best option is to learn some JavaScript so that you can update the page dynamically.&#xD;&#xA;&#xD;&#xA;That being said, if you're not familiar with JavaScript, that's a pretty big learning curve just to create your text game.&#xD;&#xA;&#xD;&#xA;This is how, for example, Gmail can show you new emails while you're on the page; it uses JavaScript and polls the server in the background." />
  <row Id="7862" PostHistoryTypeId="10" PostId="3541" RevisionGUID="981ee981-b403-4124-bef5-3fd5aaae7f7e" CreationDate="2010-09-21T12:34:40.433" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="7863" PostHistoryTypeId="5" PostId="3541" RevisionGUID="dea950bd-ea91-4a67-b69e-890494e5b4a5" CreationDate="2010-09-21T12:34:40.590" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Open-source 3D models easily usable in OGRE3D/jMonkeyEngine](http://gamedev.stackexchange.com/questions/2400/open-source-3d-models-easily-usable-in-ogre3d-jmonkeyengine)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Can the community recommend some good sites that have free Maya 3D model? I am trying to find some and export to OGRE3D, thanks." />
  <row Id="7864" PostHistoryTypeId="2" PostId="4005" RevisionGUID="d371fcc5-4099-4e56-ba39-dc9c35e015e2" CreationDate="2010-09-21T13:07:03.013" UserId="2229" Text="the terminology &quot;game state&quot; is a bit vague to me. Could anybody clarify, what is included in the game state, please? &#xD;&#xA;&#xD;&#xA;Is it a state of all the variables and objects within the game at particular moment?&#xD;&#xA;&#xD;&#xA;Thanks. Regards" />
  <row Id="7865" PostHistoryTypeId="1" PostId="4005" RevisionGUID="d371fcc5-4099-4e56-ba39-dc9c35e015e2" CreationDate="2010-09-21T13:07:03.013" UserId="2229" Text="What is a Game State?" />
  <row Id="7866" PostHistoryTypeId="3" PostId="4005" RevisionGUID="d371fcc5-4099-4e56-ba39-dc9c35e015e2" CreationDate="2010-09-21T13:07:03.013" UserId="2229" Text="&lt;game-design&gt;" />
  <row Id="7867" PostHistoryTypeId="2" PostId="4006" RevisionGUID="42403479-e311-441e-b932-f0625507ee34" CreationDate="2010-09-21T13:25:24.333" UserId="567" Text="&gt; An Introduction: Just what in the&#xD;&#xA;&gt; world is state?&#xD;&#xA;&gt; &#xD;&#xA;&gt; Game state can be used to mean a&#xD;&#xA;&gt; variety of things and you'll find it&#xD;&#xA;&gt; used in many different ways in the&#xD;&#xA;&gt; game industry. In this case I'm using&#xD;&#xA;&gt; &quot;game state&quot; to provide a description&#xD;&#xA;&gt; of an object at a given point in time&#xD;&#xA;&gt; in a game. Clear as mud to you now?&#xD;&#xA;&gt; Don't worry, I'll try to describe it&#xD;&#xA;&gt; in a different way, one as a geek like&#xD;&#xA;&gt; me you might identify with a little&#xD;&#xA;&gt; better.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Comic books. When buying used comic&#xD;&#xA;&gt; books, they often say what &quot;state&quot; or&#xD;&#xA;&gt; condition the comic book is in. The&#xD;&#xA;&gt; current state of the comic book gives&#xD;&#xA;&gt; you some indication of how the comic&#xD;&#xA;&gt; book is going to look when you&#xD;&#xA;&gt; purchase it. Mint, Fine and Poor all&#xD;&#xA;&gt; give an image in your mind of just how&#xD;&#xA;&gt; battered  or worn the comic book is.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The same is true for objects in your&#xD;&#xA;&gt; game. By defining the various valid&#xD;&#xA;&gt; states for your objects, your game&#xD;&#xA;&gt; will know just what to do when it is&#xD;&#xA;&gt; in that state. And just like the comic&#xD;&#xA;&gt; book industry has defined the various&#xD;&#xA;&gt; valid states for comic books, you as&#xD;&#xA;&gt; the governing board for your game must&#xD;&#xA;&gt; define valid states for your objects&#xD;&#xA;&gt; and just exactly how the game should&#xD;&#xA;&gt; respond when those objects are in any&#xD;&#xA;&gt; given state.&#xD;&#xA;&#xD;&#xA;Since this Game State introduction has a very nice way to explain it, i quoted it and you can find the complete article at http://www.xnadevelopment.com/tutorials/thestateofthings/thestateofthings.shtml" />
  <row Id="7868" PostHistoryTypeId="5" PostId="4005" RevisionGUID="76cbdcf1-4705-432f-b99a-af441153603e" CreationDate="2010-09-21T14:11:18.877" UserId="2229" Comment="deleted 33 characters in body" Text="The terminology &quot;game state&quot; is a bit vague to me. Could anybody clarify, what is included in the game state, please? &#xD;&#xA;&#xD;&#xA;Is it a state of all the variables and objects within the game at particular moment?" />
  <row Id="7869" PostHistoryTypeId="2" PostId="4007" RevisionGUID="77913206-4dc9-4ec4-bc97-80bf567e6c94" CreationDate="2010-09-21T15:41:30.520" UserId="1456" Text="I think , that You use your own script language for directing these type of game(if not, You should).Then expand your script for dialogs handling too.&lt;BR&gt;&#xD;&#xA;You can work with other game variables during creation of dialogs logic. &#xD;&#xA;Game engines are like Lego. You programmed only bricks and script uses them.&#xD;&#xA;It does not matter  if You make some script interpreter or compiler. But script is always useful." />
  <row Id="7870" PostHistoryTypeId="2" PostId="4008" RevisionGUID="9eefeff7-19c6-45ff-b292-5c69b0563e4e" CreationDate="2010-09-21T17:54:44.947" UserId="1791" Text="I think for adding in translations, you could still use XML for the logic as stated [above][1]. When you're getting into that type of complexity you should write your own dialogue tool. Your dialogue text would get stored as a key to a database that you could swap out depending on the language you'd want to display.&#xD;&#xA;&#xD;&#xA;For example you could have:&#xD;&#xA;&#xD;&#xA;    &lt;dialogue id=&quot;101&quot; condition=&quot;!npc.carsFixed&quot;&gt;&#xD;&#xA;      &lt;message&gt;Localize.FixMyCar&lt;/message&gt;&#xD;&#xA;      &lt;choices&gt;&#xD;&#xA;        &lt;choice condition=&quot;hero.carFixingSkill &gt; 5&quot; priority=&quot;7&quot; id=&quot;Localize.Sure&quot;&gt;&#xD;&#xA;          &lt;command&gt;hero.carFixingSkills += 1&lt;/command&gt;&#xD;&#xA;          &lt;command&gt;npc.carFixed = true&lt;/command&gt;&#xD;&#xA;          &lt;command&gt;hero.playSmokeAnimation()&lt;/command&gt;&#xD;&#xA;          &lt;command&gt;nextDialogue = 104&lt;/command&gt;&#xD;&#xA;        &lt;/choice&gt;&#xD;&#xA;        &lt;choice condition=&quot;hero.carFixingSkill &lt;= 5&quot; id=&quot;Localize.CantFix&quot;&gt;&#xD;&#xA;          &lt;command&gt;nextDialogue = 105&lt;/command&gt;&#xD;&#xA;        &lt;/choice&gt;&#xD;&#xA;        &lt;choice id=&quot;Localize.FixYourself&quot;&gt;&#xD;&#xA;          &lt;command&gt;npc.likesHero -= 1&lt;/command&gt;&#xD;&#xA;        &lt;/choice&gt;&#xD;&#xA;      &lt;/choices&gt;&#xD;&#xA;    &lt;/dialogue&gt;&#xD;&#xA;&#xD;&#xA;You would then have the quest text renderer replace &quot;Localize.FixMyCar&quot; with the appropriately translated text.&#xD;&#xA;&#xD;&#xA;Your tool would display what the player would see in a selectable language alongside the editable raw XML.&#xD;&#xA;&#xD;&#xA;Similarly you could use something like this from the [example you referenced][2]:&#xD;&#xA;&#xD;&#xA;    npc.add(ConversationStates.ATTENDING,&#xD;&#xA;            ConversationPhrases.QUEST_MESSAGES, &#xD;&#xA;            null,&#xD;&#xA;            ConversationStates.QUEST_OFFERED, &#xD;&#xA;            Localization[ &quot;BringMeABeer&quot; ],&#xD;&#xA;            null);&#xD;&#xA;&#xD;&#xA;If your keys are descriptive enough not having the complete text shouldn't be an issue.&#xD;&#xA;&#xD;&#xA;Something like this could be useful as well:&#xD;&#xA;&#xD;&#xA;    Localization[ &quot;&lt;Location&gt;.&lt;NPC_name&gt;.&lt;Dialogue_text_key&gt;&quot; ];&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/31/how-can-i-implement-dialog-trees-into-my-game/308#308&#xD;&#xA;  [2]: http://stendhalgame.org/wiki/Stendhal_Quest_Coding_-_Part_2#Ask_the_players_whether_they_will_do_the_quest" />
  <row Id="7871" PostHistoryTypeId="2" PostId="4009" RevisionGUID="576e9880-03a2-42bb-a77a-8c85cf03c83e" CreationDate="2010-09-21T18:01:59.853" UserId="136" Text="I've been using WCF for my own turn-based strategy game, and it's worked out very well.  The durable sessions area great, and duplex channels with client callbacks are ideal for pushing messages to the client at will from the server.  WCF also supports multiple endpoint bindings, so you can have the local player connect through a named pipe binding while remote players connect through TCP bindings.&#xD;&#xA;&#xD;&#xA;I recommend TCP bindings with binary formatting if you're sending lots of data on each turn." />
  <row Id="7872" PostHistoryTypeId="5" PostId="3974" RevisionGUID="60512f26-5484-4943-8e6b-0c9aa87a395a" CreationDate="2010-09-21T18:08:54.883" UserId="2167" Comment="added 57 characters in body" Text="What I want to do is put Google Ads in my flash game.&#xD;&#xA;&#xD;&#xA;The first question is how can I do that?&#xD;&#xA;&#xD;&#xA;The second question is the best place to put it; while loading, after finishing the game?&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/oE60K.jpg" />
  <row Id="7873" PostHistoryTypeId="2" PostId="4010" RevisionGUID="90a156aa-d38c-4023-9afc-62e98f04eb18" CreationDate="2010-09-21T19:00:58.413" UserId="284" Text="I'm thinking of incorporating a versus/competitive system into my webgame ( [ninjawars.net][1] ), based off of the old &quot;[mastermind][2]&quot; game.&#xD;&#xA;&#xD;&#xA;Let's call choosing the color dots in mastermind the &quot;defensive&quot; role, and determining what color dots were placed the &quot;offense&quot; role. &#xD;&#xA;&#xD;&#xA;Mastermind is already competitive, but when creating the &quot;color dots&quot; there's a limited amount of added difficulty that you can create (e.g. all random color nodes using a random number generator is probably the most difficult you could get) but what I would like to do is be able to allow players to increase the difficulty from their defensive role by adding to the number of color dots that the defender can use.&#xD;&#xA;For example, instead of 4 dots, the defender could have, I don't know, 20 dots, much harder.  Or only get to place 1 dot, so they have a much simpler defense.&#xD;&#xA;&#xD;&#xA;So the question is, how do I determine how many more dots to allow the defender?  Some measure of the simplicity of determining 1 dot, all the way up to the difficulty of X (quite a few) of dots?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Mastermind_(board_game)" />
  <row Id="7874" PostHistoryTypeId="1" PostId="4010" RevisionGUID="90a156aa-d38c-4023-9afc-62e98f04eb18" CreationDate="2010-09-21T19:00:58.413" UserId="284" Text="Mastermind type versus system..." />
  <row Id="7875" PostHistoryTypeId="3" PostId="4010" RevisionGUID="90a156aa-d38c-4023-9afc-62e98f04eb18" CreationDate="2010-09-21T19:00:58.413" UserId="284" Text="&lt;competition&gt;" />
  <row Id="7876" PostHistoryTypeId="5" PostId="4010" RevisionGUID="55b44964-b45a-4045-8350-aebd7e34dd4c" CreationDate="2010-09-21T19:06:58.073" UserId="284" Comment="added 99 characters in body" Text="I'm thinking of incorporating a versus/competitive system into my webgame ( [ninjawars.net][1] ), based off of the old &quot;[mastermind][2]&quot; game.&#xD;&#xA;&#xD;&#xA;Let's call choosing the color dots in mastermind the &quot;defensive&quot; role, and determining what color dots were placed the &quot;offense&quot; role. &#xD;&#xA;&#xD;&#xA;Mastermind is already competitive, but when creating the &quot;color dots&quot; there's a limited amount of added difficulty that you can create (e.g. all random color nodes using a random number generator is probably the most difficult you could get [I think that's true, random is the hardest case to crack, all one color is obviously the easiest]) but what I would like to do is be able to allow players to increase the difficulty from their defensive role by adding to the number of color dots that the defender can use.&#xD;&#xA;For example, instead of 4 dots, the defender could have, I don't know, 20 dots, much harder.  Or only get to place 1 dot, so they have a much simpler defense.&#xD;&#xA;&#xD;&#xA;So the question is, how do I determine how many more dots to allow the defender?  Some measure of the simplicity of determining 1 dot, all the way up to the difficulty of X (quite a few) of dots?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Mastermind_(board_game)" />
  <row Id="7877" PostHistoryTypeId="2" PostId="4011" RevisionGUID="0ca434a4-a970-48de-8315-bd55759055bc" CreationDate="2010-09-21T19:10:13.233" UserId="1547" Text="I'm interesting in getting into Game Development as a career, but I'm really not sure where to start.&lt;br /&gt;&#xD;&#xA;&#xD;&#xA;I know that I want to develop in C / C++ (as that's what the college I plan to go to in two years teaches), I'll be working with 2D / 3D, networking, native API (Windows, possible Mac and probably Linux), and that I'll likely be creating game engines, as well as using preexisting ones.&#xD;&#xA;&#xD;&#xA;So where would the best place for me to start? Should I learn more about the C / C++ standard library, or learn the Windows API, or just grab a copy of an open-source engine, find some assets and code until I have something that resembles a game, or what?&#xD;&#xA;&#xD;&#xA;If it'll help at all, I already know the basics behind C / C++ (nothing more than console interaction, and I don't know the standard library), and I have experience with web development (HTML, CSS, some PHP, JavaScript and SQL)&#xD;&#xA;&#xD;&#xA;Thanks for any help." />
  <row Id="7878" PostHistoryTypeId="1" PostId="4011" RevisionGUID="0ca434a4-a970-48de-8315-bd55759055bc" CreationDate="2010-09-21T19:10:13.233" UserId="1547" Text="Getting Started Questions" />
  <row Id="7879" PostHistoryTypeId="3" PostId="4011" RevisionGUID="0ca434a4-a970-48de-8315-bd55759055bc" CreationDate="2010-09-21T19:10:13.233" UserId="1547" Text="&lt;c++&gt;&lt;learning&gt;&lt;c&gt;&lt;education&gt;&lt;career&gt;" />
  <row Id="7880" PostHistoryTypeId="2" PostId="4012" RevisionGUID="ac70bacc-52cc-47e9-8fa2-589d0bb9fde1" CreationDate="2010-09-21T19:24:09.357" UserId="1490" Text="If you're looking for something Java-based, GWT seems like a natural fit, even though I've never tried to use it for a game.&#xD;&#xA;&#xD;&#xA;That being said if you're juste looking for a simple client, you might find that Flex learning curve is not so steep, and, as a bonus, it will allow you to easily extend your game if need be. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="7881" PostHistoryTypeId="2" PostId="4013" RevisionGUID="56ac30d1-2e13-4221-a7b7-6ba9947d4f06" CreationDate="2010-09-21T19:30:10.457" UserId="395" Text="Playtesting. Make a bunch of variations (you could also vary difficulty by changing the number of available colors) and bug everyone you know to try them. Look at the win/loss ratios of the various versions and go from there." />
  <row Id="7882" PostHistoryTypeId="2" PostId="4014" RevisionGUID="d56f2601-8e7e-4b98-9307-3ff6c994d53e" CreationDate="2010-09-21T19:51:03.283" UserId="1490" Text="I'd set my heart on something simple (say a Tetris, or Arkanoid, or something like that, *NOT* a full-fledged MMO/RPG/FPS :) ) and try to make it work with an open-source engine. &#xD;&#xA;&#xD;&#xA;I've found Allegro, even though it's C-based, to be a pretty cool engine to start with, because it's so simple, but that was a while ago. " />
  <row Id="7883" PostHistoryTypeId="2" PostId="4015" RevisionGUID="4d10c673-7a59-466b-9601-10fcd83b06af" CreationDate="2010-09-21T19:55:04.007" UserId="659" Text="One common application of this is to create a 'look-at' matrix for a camera&#xD;&#xA;&#xD;&#xA;In this case you can start with your camera direction vector, and the world up vector as your second vector, and do something along the lines of:&#xD;&#xA;&#xD;&#xA;    vForward = normalize( vAt - vFrom )&#xD;&#xA;    vRight   = normalize( cross( vForward, vWorldUp ) )&#xD;&#xA;    vUp      = cross( vRight,   vForward )&#xD;&#xA;&#xD;&#xA;And those vectors become the 3 rows of a 3x3 rotation matrix.&#xD;&#xA;&#xD;&#xA;Beware of the case where vForward == vWorldUp!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7884" PostHistoryTypeId="2" PostId="4016" RevisionGUID="4c2ad5ba-296e-4c13-ac3e-30f659128ba0" CreationDate="2010-09-21T19:55:24.697" UserId="2141" Text="I'd recommend you continue to learn C/C++ and the STL. The best way to learn the STL is to use it in a simple project.&#xD;&#xA;&#xD;&#xA;Looking at other game engines is a good place to start, but you probably want to do something in 2D first, with simple sprites. There are a bunch of tutorials around that cover using OpenGL/DirectX in 2D mode. Something like the SDL library will also allow you to ignore all the boilerplate initialisation and help you get started.&#xD;&#xA;&#xD;&#xA;There's a simple 2D engine tutorial on the gpwiki: http://gpwiki.org/index.php/SDL:Tutorials:Complete_2D_Engine_Overview, but if you find it too hard to read that code, then some more C/C++ learning may be required first.&#xD;&#xA;&#xD;&#xA;The Windows API is not very important, there is only a handful of functions you need to initialise Graphics, Sound and Input. Once you've done that all your coding will be specific to your game engine. A lot of Game Development is done on consoles, where the Win32 API is irrelevant.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7885" PostHistoryTypeId="2" PostId="4017" RevisionGUID="e5c8a24d-ed74-448a-a3fc-b2a259cf348a" CreationDate="2010-09-21T21:04:24.873" UserId="370" Text="While I was university student we set up a tour of [Radical Entertainment][1] for the game dev club.  We also toured EA Vancouver, but their tour was much more canned, we only got to talk with a lady from HR, though we did get to walk around their impressive campus.&#xD;&#xA;&#xD;&#xA;Radical's tour was very instructive, we got to see how it was all put together.  We got to talk with their lead developers about their hulk game.&#xD;&#xA;&#xD;&#xA;They gave us two pieces of advice that I can remember.&#xD;&#xA;&#xD;&#xA;They can and will train you on site to be a good game developer.  They however will not train to be a good programmer.  They expect that you'll be very wet behind the ears, but you'd better know C/C++.&#xD;&#xA;&#xD;&#xA;They love to see demos.  A resume without a demo is almost universally trumped by one with a demo.  Further those demos don't need to be complete games.  One project with lots of polish, and few more where you show off your interests, be that AI, graphics/shaders, sound, etc.&#xD;&#xA;&#xD;&#xA;A third piece of advice (mostly an opinion really) was that all game dev books suck.  Only the [Game Gems][2] series was at all usable.  Of course there were viewing the books worth from a professional level.  I don't know how they felt about using the books to learn as a beginner.&#xD;&#xA;&#xD;&#xA;So. Advice.&#xD;&#xA;* study hard.&#xD;&#xA;* build little side projects, build a big polished project near the end your college career.&#xD;&#xA;* get in touch with a college game dev club and they get going on the right foot.&#xD;&#xA;&#xD;&#xA;Personally, I'd look at [SFML][3] as pretty complete game library to use until you get more experience.  They've got some great tutorials to get you going.  My universities game dev club basically held live walkthroughs of these tutorials to get new/prospective members up to speed.&#xD;&#xA;&#xD;&#xA;Also, stay away from networking and 3D initially.  Top-down or side-scrollers are your friend.  2.5D is doable but it starts getting complicated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.radical.ca/&#xD;&#xA;  [2]: http://www.gameprogramminggems.com/&#xD;&#xA;  [3]: http://www.sfml-dev.org/" />
  <row Id="7886" PostHistoryTypeId="5" PostId="4010" RevisionGUID="b728faac-165c-413a-9a32-4df5d348aca3" CreationDate="2010-09-21T21:20:13.000" UserId="284" Comment="added 157 characters in body" Text="I'm thinking of incorporating a versus/competitive system into my webgame ( [ninjawars.net][1] ), based off of the old &quot;[mastermind][2]&quot; game.&#xD;&#xA;&#xD;&#xA;Let's call choosing the color dots in mastermind the &quot;defensive&quot; role, and determining what color dots were placed the &quot;offense&quot; role. &#xD;&#xA;&#xD;&#xA;Mastermind is already competitive, but when creating the &quot;color dots&quot; there's a limited amount of added difficulty that you can create (e.g. all random color nodes using a random number generator is probably the most difficult you could get [I think that's true, random is the hardest case to crack, all one color is obviously the easiest]) but what I would like to do is be able to allow players to increase the difficulty from their defensive role by adding to the number of color dots that the defender can use.&#xD;&#xA;For example, instead of 4 dots, the defender could have, I don't know, 20 dots, much harder.  Or only get to place 1 dot, so they have a much simpler defense.&#xD;&#xA;&#xD;&#xA;So the question is, how do I determine good amounts of more dots to allow the defender?  Some measure of the simplicity of determining 1 dot, all the way up to the difficulty of X (quite a few) of dots?  I'd really like to be able to mathematically determine number of possible combinations, but I... ...guess I was asleep during that part of school...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Mastermind_(board_game)" />
  <row Id="7887" PostHistoryTypeId="2" PostId="4018" RevisionGUID="3a3cf057-e28b-4721-ab30-a1c9fa8bbbb6" CreationDate="2010-09-21T22:11:35.283" UserId="490" Text="Consider Neutron: http://www.exitgames.com/Neutron&#xD;&#xA;&#xD;&#xA;It natively supports turn-based games, as well as account management and all the other things:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;However, it costs at least $100 per month.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7vsDV.jpg" />
  <row Id="7888" PostHistoryTypeId="2" PostId="4019" RevisionGUID="8d4f701b-da14-43bc-b657-d42a10016e79" CreationDate="2010-09-21T22:54:07.867" UserId="1853" Text="Besides salary, what are the benefits you dream to get from a game development company as an employee?" />
  <row Id="7889" PostHistoryTypeId="1" PostId="4019" RevisionGUID="8d4f701b-da14-43bc-b657-d42a10016e79" CreationDate="2010-09-21T22:54:07.867" UserId="1853" Text="Dream Benefits at a Game Development Company" />
  <row Id="7890" PostHistoryTypeId="3" PostId="4019" RevisionGUID="8d4f701b-da14-43bc-b657-d42a10016e79" CreationDate="2010-09-21T22:54:07.867" UserId="1853" Text="&lt;business&gt;&lt;career&gt;&lt;hiring&gt;&lt;motivation&gt;" />
  <row Id="7891" PostHistoryTypeId="2" PostId="4020" RevisionGUID="05a74025-3a2b-452f-9b52-0877d06766fa" CreationDate="2010-09-21T23:52:38.307" UserId="2180" Text="A good deal of research has been done for you, actually.  The enjoyable problem is trying to see how few moves can be done to solve the problem.  If you look up Mastermind_(board_game) in Wikipedia, you'll see that for a six-color four-slot game, there's a Six Guess algorithm, that Donald Knuth busted with a Five Guess algorithm, and later two more smart guys got it down to a little more than 4 guesses per game on average.&#xD;&#xA;&#xD;&#xA;Letting the user know a little bit about the problem space can help make it a little easier: e.g., do you use a color more than once, is there a pattern, etc.  Increasing the number of colors, or the number of slots, adds more complexity.&#xD;&#xA;&#xD;&#xA;I'd also point out that the game goes by the name of &quot;Bulls and Cows&quot;, &quot;Codebreaker&quot;, and &quot;Jotto&quot; -- you may be able to find independent research papers under these names that are useful." />
  <row Id="7892" PostHistoryTypeId="5" PostId="3991" RevisionGUID="857a674c-c41f-49b3-b872-b008c2b96047" CreationDate="2010-09-22T00:12:37.483" UserId="48" Comment="added 617 characters in body" Text="Last I checked you cannot embed Google Adsense in a Flash game/app, because Adsense is HTML+JS, which cannot be put inside Flash. &#xD;&#xA;&#xD;&#xA;You could hover it over your Flash game...but there are compatibility issues, doesn't work on all OS/Browsers, and may cause UI bugs with your Flash game.&#xD;&#xA;&#xD;&#xA;You could try hacking the Adsense code so that it requests the ad data and loads it &amp; displays it inside Flash...but this is against their terms of service.&#xD;&#xA;&#xD;&#xA;Your only option with Adsense is to place them on the same page next to your flash game (which isn't an option if you need your game to take up the full page). I suggest looking at [Mochi ads][1], they are specifically designed to be embedded in flash games.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;Edit: A user posted a link to [Google Adsense for Flash Games][2]...unfortunately they have quite strict requirements, which most people wont meet.&#xD;&#xA;&#xD;&#xA;Current Requirements:&#xD;&#xA;&#xD;&#xA;   1. Game plays: Minimum 500,000 per day&#xD;&#xA;   2. Game types: Web-based Flash only&#xD;&#xA;   3. Integration: Must be technically capable of SDK integration&#xD;&#xA;   4. Traffic source: Must be 80% US &amp; UK Traffic&#xD;&#xA;   5. Content: Family safe and targeted at users age 13 and up&#xD;&#xA;   6. Distribution: Must be able to report embed destination and have control over where games are distributed&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.mochimedia.com/developers/&#xD;&#xA;  [2]: http://www.google.com/ads/games/publishers.html" />
  <row Id="7893" PostHistoryTypeId="2" PostId="4021" RevisionGUID="4a325b92-51af-4fac-9e3c-7d8fc9e64002" CreationDate="2010-09-22T00:13:46.720" UserId="154" Text="The number one thing I'd look for from a game development company would be producers who have read and actually understand the concepts in [The Mythical Man Month][1]. Everything else is just there to make up for the hours you'll spend in the office because they didn't understand it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/The_Mythical_Man-Month" />
  <row Id="7894" PostHistoryTypeId="5" PostId="4021" RevisionGUID="82bb11f8-fdfa-41c6-ab28-7a5a01e6fb94" CreationDate="2010-09-22T00:19:16.730" UserId="154" Comment="deleted 14 characters in body" Text="The number one thing I'd look for from a game development company would be producers who actually understand the concepts in [The Mythical Man Month][1]. Everything else is just there to make up for the hours you'll spend in the office because they didn't understand it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/The_Mythical_Man-Month" />
  <row Id="7895" PostHistoryTypeId="2" PostId="4022" RevisionGUID="ff93c448-9e25-4b84-b8fb-8692e4c43dc9" CreationDate="2010-09-22T00:39:46.730" UserId="2239" Text="As for XNA, have you tried [FlatRedBall][1] combined with [Neoforce][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/frb/blog/&#xD;&#xA;  [2]: http://neoforce.codeplex.com/" />
  <row Id="7896" PostHistoryTypeId="5" PostId="4019" RevisionGUID="8d13dcc4-539d-483f-8445-fa84769d81dc" CreationDate="2010-09-22T01:35:59.630" UserId="1853" Comment="an example added" Text="Besides salary, what are the benefits you dream to get from a game development company as an employee?&#xD;&#xA;&#xD;&#xA;For example, I would find these things useful for both, me and a company:&#xD;&#xA;&#xD;&#xA; - Right to suggest own ideas.&#xD;&#xA; - Everyone participates in the brainstorming process.&#xD;&#xA; - 20% of the paid time spent on testing new games, making prototypes of own ideas, blogging about game development or giving presentations about related matter to colleagues.&#xD;&#xA; - At least some of the code produced should be open sourced.&#xD;&#xA; - Access to development-related books, magazine subscriptions.&#xD;&#xA; - Credits in the developed games with all developers and links to their personal websites of their choice.&#xD;&#xA; - International coworkers.&#xD;&#xA; - No more that 40 hours per week for work required, but optional over-time is paid.&#xD;&#xA;&#xD;&#xA;And if I founded a game development company myself in the future, I would like to have all that for the employees." />
  <row Id="7897" PostHistoryTypeId="2" PostId="4023" RevisionGUID="1ab8849f-06b9-43e2-9a2d-ad1dfba06b2c" CreationDate="2010-09-22T03:34:54.147" UserId="2168" Text="Currently I am learning XNA and while playing around with some tutorials knowing what I am aiming for a game it made me think that the Sprite Class will be something very important and re-used a lot of times, not sure if I am mistaken or not with this thinking.&#xD;&#xA;&#xD;&#xA;Bellow you can see the Sprite code I am using at the momment and I was wondering:&#xD;&#xA;&#xD;&#xA; - How a Sprite Class should be or what&#xD;&#xA;   functions in general it should have&#xD;&#xA;   or am I mistaken that the Sprite&#xD;&#xA;   Class will not be used by every&#xD;&#xA;   sprite in my game ?&#xD;&#xA;&#xD;&#xA;For example, in my sprite I could hold all property of the sprite even if one property is not being used, let's say an object that does not move around so it would have no speed which I could simple have a property saying that speed is disabled.&#xD;&#xA;&#xD;&#xA;So i guess my real question is:&#xD;&#xA;&#xD;&#xA; - How should I structure my Sprite&#xD;&#xA;   Class to have the best usage out of&#xD;&#xA;   it ?&#xD;&#xA;&#xD;&#xA;If you have a sample code to show I would appreciate aswell not really necessary, just for reference (also it doesnt need to be in c#).&#xD;&#xA;&#xD;&#xA;**Hope my question is not too confusing.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    &#xD;&#xA;    namespace MyGameTest&#xD;&#xA;    {&#xD;&#xA;        class Sprite&#xD;&#xA;        {&#xD;&#xA;            public string AssetName;&#xD;&#xA;    &#xD;&#xA;            public Rectangle Size;&#xD;&#xA;    &#xD;&#xA;            private float mScale = 1.0f;&#xD;&#xA;    &#xD;&#xA;            public Vector2 Position = new Vector2(0, 0);&#xD;&#xA;    &#xD;&#xA;            public Vector2 Speed = new Vector2(0, 0);&#xD;&#xA;            &#xD;&#xA;            private Texture2D mSpriteTexture;&#xD;&#xA;    &#xD;&#xA;            public float Scale&#xD;&#xA;            {&#xD;&#xA;                get { return mScale; }&#xD;&#xA;                set&#xD;&#xA;                {&#xD;&#xA;                    mScale = value;&#xD;&#xA;                    Size = new Rectangle(0, 0, (int)(mSpriteTexture.Width * Scale), (int)(mSpriteTexture.Height * Scale));&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void LoadContent(ContentManager theContentManager, string theAssetName)&#xD;&#xA;            {&#xD;&#xA;                mSpriteTexture = theContentManager.Load&lt;Texture2D&gt;(theAssetName);&#xD;&#xA;                AssetName = theAssetName;&#xD;&#xA;                Size = new Rectangle(0, 0, (int)(mSpriteTexture.Width * Scale), (int)(mSpriteTexture.Height * Scale));&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Draw(SpriteBatch theSpriteBatch)&#xD;&#xA;            {&#xD;&#xA;                theSpriteBatch.Draw(mSpriteTexture, Position,&#xD;&#xA;                                    new Rectangle(0, 0, mSpriteTexture.Width, mSpriteTexture.Height),&#xD;&#xA;                                    Color.White, 0.0f, Vector2.Zero, Scale, SpriteEffects.None, 0);&#xD;&#xA;            } &#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="7898" PostHistoryTypeId="1" PostId="4023" RevisionGUID="1ab8849f-06b9-43e2-9a2d-ad1dfba06b2c" CreationDate="2010-09-22T03:34:54.147" UserId="2168" Text="How to handle a Sprite Class ?" />
  <row Id="7899" PostHistoryTypeId="3" PostId="4023" RevisionGUID="1ab8849f-06b9-43e2-9a2d-ad1dfba06b2c" CreationDate="2010-09-22T03:34:54.147" UserId="2168" Text="&lt;xna&gt;&lt;c#&gt;&lt;sprites&gt;" />
  <row Id="7900" PostHistoryTypeId="2" PostId="4024" RevisionGUID="f785e9a9-28bf-4f34-89cd-f8f384379762" CreationDate="2010-09-22T03:37:16.597" UserId="919" Text="Games are about balance IMHO, the problem I have about this question is your giving an already strong position more advantages without considering strengthening the weaker position.&#xD;&#xA;&#xD;&#xA;The more options you give the defender naturally the harder it becomes to crack (because of permutation). But what about the attacker, competition in favor of a position is never good as it undermines the basic principle of fair play (equal opportunity)." />
  <row Id="7901" PostHistoryTypeId="2" PostId="4025" RevisionGUID="7c637706-c3fa-453b-8e41-30683bc13623" CreationDate="2010-09-22T03:39:57.090" UserId="189" Text="**You're thinking ahead of yourself**, trying to implement everything before you actually use it. **You don't even know what your Sprite class needs to do!** Why are you writing it then? Classes are meant to serve a purpose. You don't write them ahead of time; you write them as you need them.&#xD;&#xA;&#xD;&#xA;Start by actually starting on your game. You'll reach a point where you need to use a Sprite class. So then make it (or use it as it currently is). When you run into something which needs to be in the Sprite class, add it. But stop what you're doing, don't try and write a do-everything Sprite class because you'll just end up with a bunch of unused features that waste your time and probably aren't **tested** or implemented right.&#xD;&#xA;&#xD;&#xA;For example, right now. That entire class is unimplemented. There's no point to it until there is something using it, and once you start using it, it will be clear exactly what you need and don't need." />
  <row Id="7902" PostHistoryTypeId="2" PostId="4026" RevisionGUID="5f22e24f-2d2e-4340-98be-baf18429c338" CreationDate="2010-09-22T05:40:42.350" UserId="422" Text="**[Lost Decade Games][1]**&#xD;&#xA;&#xD;&#xA;An indie game company focusing on HTML5 and JavaScript game development.&#xD;&#xA;&#xD;&#xA;Some example posts:&#xD;&#xA;&#xD;&#xA;* [What to do when your game is too easy and too hard][2]&#xD;&#xA;* [A Simple Guide to Game Development Contests][3]&#xD;&#xA;* [Boing Boing Contest Post Mortem: Onslaught!][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.lostdecadegames.com &quot;Lost Decade Games&quot;&#xD;&#xA;  [2]: http://blog.lostdecadegames.com/what-to-do-when-your-game-is-too-easy-and-too&#xD;&#xA;  [3]: http://blog.lostdecadegames.com/a-simple-guide-to-game-development-contests&#xD;&#xA;  [4]: http://blog.lostdecadegames.com/boing-boing-contest-post-mortem-onslaught-0&#xD;&#xA;" />
  <row Id="7903" PostHistoryTypeId="16" PostId="4026" RevisionGUID="5f22e24f-2d2e-4340-98be-baf18429c338" CreationDate="2010-09-22T05:40:42.350" UserId="-1" />
  <row Id="7904" PostHistoryTypeId="2" PostId="4027" RevisionGUID="6c624854-9ba9-4a47-93b2-8d2f344355de" CreationDate="2010-09-22T07:20:39.803" UserId="2239" Text="Well, a sprite is just a texture with a scale and coordinate in space, there'll be hundreds or thousands of them if you're going to use animated sprites. You'll need something to handle sprite flipping ie another class that groups sprites for animation purposes and can flip between them accordingly?&#xD;&#xA;&#xD;&#xA;Here is some basics from [FlatRedBall and its wiki][1] (source is closed though); consider having a base class that is positioned, ie that has x, y (possibly z), rotation, scale, velocity, acceleration and whatever positioned objects will need. Have the sprite class and other relevant classes inherit this. Then have another class for actual game characters (entities) that are also positioned, but can either contain or some way be grouped (IAttachable) with sprites. Game characters generally need state as well as a lot of other things like collision bounds.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/frb/docs/index.php?title=FlatRedBallXna:Tutorials:Creating_a_Game_Entity" />
  <row Id="7905" PostHistoryTypeId="2" PostId="4028" RevisionGUID="9b6f7292-abde-4626-96f4-080a0c979be9" CreationDate="2010-09-22T07:54:50.750" UserId="659" Text="Small teams guaranteed. It's the number one way to keep game dev fun, and bring out the real passion and team spirit required to make great games.&#xD;&#xA;&#xD;&#xA;A fair employment contract that does not try to steal ideas/code I come up with outside of work, or contain any nasty non-compete clauses.&#xD;&#xA;&#xD;&#xA;When the pressure is on, weekends and holidays will be sacred. None of the 'no holidays between pre-alpha and submission' BS&#xD;&#xA;&#xD;&#xA;Guarantee of a decent spec development PC with two 24&quot; monitors or better (suprising now much old hardware, particularly monitors, is still in use at big studios)&#xD;&#xA;&#xD;&#xA;Management that know the abilities of their staff well - their strengths/weaknesses/skills/specializations - and don't just treat them as 'Programming resource X'&#xD;&#xA;&#xD;&#xA;A place that supports multi-talented developers. Artists that can do design/scripting, Coders that do a bit of audio work, etc - rather than 'you're a coder, your input about the art style is not welcome'&#xD;&#xA;&#xD;&#xA;An understanding that you can't make a baby in 1 month by using 9 pregnant women.&#xD;&#xA;" />
  <row Id="7906" PostHistoryTypeId="5" PostId="4028" RevisionGUID="d069faf7-7263-4381-8327-7fc2a4677abf" CreationDate="2010-09-22T07:59:54.867" UserId="659" Comment="deleted 2 characters in body" Text="Small teams guaranteed. It's the number one way to keep game dev fun, and bring out the real passion and team spirit required to make great games.&#xD;&#xA;&#xD;&#xA;A fair employment contract that does not try to steal ideas/code I come up with outside of work, or contain any nasty non-compete clauses.&#xD;&#xA;&#xD;&#xA;When the pressure is on, weekends and holidays will be sacred. None of the 'no holidays between pre-alpha and submission' BS&#xD;&#xA;&#xD;&#xA;Guarantee of a decent spec development PC with two 24&quot; monitors or better (suprising now much old hardware, particularly monitors, is still in use at big studios)&#xD;&#xA;&#xD;&#xA;Management that know the abilities of their staff well - their strengths/weaknesses/skills/specializations - and don't just treat them as 'Programming resource X'&#xD;&#xA;&#xD;&#xA;A place that supports multi-talented developers. Artists that can do design/scripting, Coders that do a bit of audio work, etc - rather than 'you're a coder, your input about the art style is not welcome'&#xD;&#xA;&#xD;&#xA;Understanding that 'you can't make a baby in 1 month by using 9 pregnant women'&#xD;&#xA;" />
  <row Id="7907" PostHistoryTypeId="2" PostId="4029" RevisionGUID="83936ecc-7582-4a2e-aff7-3a466b655fbc" CreationDate="2010-09-22T09:17:13.177" UserId="259" Text="Realistically, I think paid overtime or time-off-in-lieu is a necessity. It's a simple thing, but it makes such a difference to know that you're going to be fairly rewarded for all the crunch. Unfortunately it's still fairly rare, at least in the UK." />
  <row Id="7908" PostHistoryTypeId="16" PostId="4021" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-22T12:55:09.210" UserId="14" />
  <row Id="7909" PostHistoryTypeId="16" PostId="4028" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-22T12:55:09.210" UserId="14" />
  <row Id="7910" PostHistoryTypeId="16" PostId="4029" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-22T12:55:09.210" UserId="14" />
  <row Id="7911" PostHistoryTypeId="16" PostId="4019" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-22T12:55:09.210" UserId="14" />
  <row Id="7912" PostHistoryTypeId="2" PostId="4030" RevisionGUID="0912d2e9-f341-445f-ba54-bddd9fc234be" CreationDate="2010-09-22T13:06:31.233" UserId="288" Text="Speaking as somebody who has actually had a need to implement a sprite class for XNA, here's how I did it: First I took a look at SpriteBatch's [draw function][1] (the one with all argument specified):&#xD;&#xA;&#xD;&#xA;    public void Draw(Texture2D texture, Vector2 position,&#xD;&#xA;         Rectangle? sourceRectangle, Color color, float rotation,&#xD;&#xA;         Vector2 origin, Vector2 scale, SpriteEffects effects,&#xD;&#xA;         float layerDepth);&#xD;&#xA;&#xD;&#xA;And then I made my sprite class have these members:&#xD;&#xA;&#xD;&#xA;    class Sprite&#xD;&#xA;    {&#xD;&#xA;         Texture2D texture;&#xD;&#xA;         Vector2 position;&#xD;&#xA;         Rectangle? sourceRectangle;&#xD;&#xA;         Color color;&#xD;&#xA;         float rotation;&#xD;&#xA;         Vector2 origin;&#xD;&#xA;         Vector2 scale;&#xD;&#xA;         SpriteEffects effects;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Notice the similarity? ;)&#xD;&#xA;&#xD;&#xA;**However** I have a rather unusual reason for needing such a class. You probably **don't** really want one!&#xD;&#xA;&#xD;&#xA;What you are doing in your code is storing information about the image you are drawing as *data* inside an object. But what would be far better is to express as much information as possible **directly in the code**. In other words, say you have a bouncing ball with a position and a velocity. Here's what your class might look like:&#xD;&#xA;&#xD;&#xA;    class Ball&#xD;&#xA;    {&#xD;&#xA;         Vector2 position, velocity;&#xD;&#xA;&#xD;&#xA;         // Texture is a special case because the data cannot be expressed as code&#xD;&#xA;         Texture2D texture;&#xD;&#xA;&#xD;&#xA;         public void LoadContent(ContentManager cm)&#xD;&#xA;         {&#xD;&#xA;              // But the name of the texture can be!&#xD;&#xA;              texture = cm.Load&lt;Texture2D&gt;(&quot;ballTexture&quot;);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;         public void Draw(SpriteBatch sb)&#xD;&#xA;         {&#xD;&#xA;             sb.Draw(texture, position, null, Color.Red, 0,&#xD;&#xA;                     new Vector2(texture.Width/2f, texture.Height/2f),&#xD;&#xA;                     Vector2.One, SpriteEffects.None, 0f);&#xD;&#xA;         }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note how as much information as possible about drawing the object is simply &quot;hard coded&quot;. You should always have a preference for doing this, and make it data-driven only when absolutely necessary.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff433989.aspx" />
  <row Id="7913" PostHistoryTypeId="2" PostId="4031" RevisionGUID="eb3d00f1-5c2e-4c46-b555-0edcd1cf8588" CreationDate="2010-09-22T14:01:38.727" UserId="2233" Text="I'm looking to create a simple, &quot;randomly&quot; generated map for a small game.&#xD;&#xA;&#xD;&#xA;The game consists of a top-down view of a world, with land-mass and ocean areas.  Think of a simple outline map of the world for example.&#xD;&#xA;&#xD;&#xA;The closest thing I can think of that I've seen before was the level-generator for the old _SimCity_ games, or the _Civ_ series, where you can set a preference for single continent versus many islands, etc.&#xD;&#xA;&#xD;&#xA;What sort of algorithm would be suitable?  The map will need to be moderately zoomable, so I can have a &quot;whole world&quot; view, and also a more zoomed-in local view, but I think I'll sort that out later.&#xD;&#xA;&#xD;&#xA;Initially I don't need any concept of heights, just two areas - land and sea, although I might extend it later." />
  <row Id="7914" PostHistoryTypeId="1" PostId="4031" RevisionGUID="eb3d00f1-5c2e-4c46-b555-0edcd1cf8588" CreationDate="2010-09-22T14:01:38.727" UserId="2233" Text="Methods for generating a map" />
  <row Id="7915" PostHistoryTypeId="3" PostId="4031" RevisionGUID="eb3d00f1-5c2e-4c46-b555-0edcd1cf8588" CreationDate="2010-09-22T14:01:38.727" UserId="2233" Text="&lt;algorithm&gt;" />
  <row Id="7917" PostHistoryTypeId="2" PostId="4033" RevisionGUID="122acd23-0d42-4f6e-ae47-31be29fa1bac" CreationDate="2010-09-22T15:27:20.177" UserId="189" Text="The &quot;famous&quot; Amit (with the [giant page][1] of various game programming topics) has a game programming blog, and he just completed a 3-part tutorial of an interesting method of map generation. I really enjoyed the reads, and there's a working demo in the bottom of the third article which is pretty stellar.&#xD;&#xA;&#xD;&#xA;**&quot;Polygon map generation&quot; [part 1][2], [part 2][3], [part 3][4].**&#xD;&#xA;&#xD;&#xA;This may be a technique that you want to adapt to your needs! At the very least, he mentions the algorithms he uses at each step of the process: he starts by generation [Voronoi polygons][5], relaxes them to a more even distribution using [Lloyd relaxation][6], uses &quot;a simple function to divide the world into land and water&quot;, and then flood fills to determine oceans and lakes. It sounds like you can stop there, or read on for mountains and valleys and turning it into 3D and so on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www-cs-students.stanford.edu/~amitp/gameprog.html&#xD;&#xA;  [2]: http://simblob.blogspot.com/2010/09/polygon-map-generation-part-1.html&#xD;&#xA;  [3]: http://simblob.blogspot.com/2010/09/polygon-map-generation-part-2.html&#xD;&#xA;  [4]: http://simblob.blogspot.com/2010/09/polygon-map-generation-part-3.html&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Voronoi_diagram&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Lloyd's_algorithm" />
  <row Id="7918" PostHistoryTypeId="2" PostId="4034" RevisionGUID="b80f1d38-2b4d-43a5-9202-f4c028e368da" CreationDate="2010-09-22T16:30:14.797" UserId="1829" Text="I got 2 questions, the 2nd is more some kind of opinion question.&#xD;&#xA;&#xD;&#xA;1st question:&#xD;&#xA;&#xD;&#xA;Everybody heard of panda3d, OGRE and IrrLicht: they are great engines, with a lot of features. With OGRE you can do almost anything imaginable if you just learn the engine, with Irrlicht you can do a lot, but the engine is a little more beginner-friendly and lightweight. Panda3D is also great, python eases things, but a lot of things are also doable.&#xD;&#xA;&#xD;&#xA;Before the new age of programming brought by the evolution of C++, 3D games that needed to be run on slow machines were programmed in C, but since then, we everyday push the transistors to &#xD;&#xA;further limits, forgetting how horrible it was to program games in the &quot;old time&quot;. Okay maybe it was not horrible, but since 3D programming is complicated doing 2D, and since most engines support shiny stuff like shaders, scene manager, scene nodes, NURBS, shadows, animations etc, isn't out there some simple 3D engine or renderer that would just fit to people who has enough with plain simple 3D, without textures or just really simple textures ?&#xD;&#xA;&#xD;&#xA;Since I heard &quot;don't reinvent the wheel&quot;, I'm sure it's a little too much to learn how to make a complete engine using D3D or opengl, and since I'll learn D3D this next in a 3D programming school, I thought that with all the free engines out there, there must be one that is fitting my need.&#xD;&#xA;&#xD;&#xA;2nd question:&#xD;&#xA;&#xD;&#xA;Since the good old days of the PlayStation, I still view the upcoming of hi definition graphics (like the 360, PS3) like a plague:&#xD;&#xA;It is always harder to learn how to program more sophisticated software, it is challenging and gives a satisfying result, but in the end, it is still a stupid program that renders pixels !&#xD;&#xA;&#xD;&#xA;I feel the fun in games has either not evolved at all or just really dropped compared to the old days where the guys making the game were not needed to just feed the eye of the player, but were meant to give an experience and fun.&#xD;&#xA;&#xD;&#xA;I feel that nowadays games are just software that shows the available technology, but except some pearls, games are not ideas anymore, they are just some kind of demonstration of how invested dollars can shine in beauty on the CEO who doesn't know shit about how a game is made and what is really possible to do.&#xD;&#xA;&#xD;&#xA;Well except independents games of course which will shine one day or another thanks to the XBox Live and Steam, but it is far from allowing programmers and designers do what they want. I'm not saying &quot;evil corporations&quot; etc, but I sense that photo realism is just a bummer: even if we have thousands more computer power, what is the point to try: we can't really &quot;simulate reality&quot;, since it contradicts the laws of physics... We could compute a alternative reality, but still it would very complicated to design..." />
  <row Id="7919" PostHistoryTypeId="1" PostId="4034" RevisionGUID="b80f1d38-2b4d-43a5-9202-f4c028e368da" CreationDate="2010-09-22T16:30:14.797" UserId="1829" Text="Any dirty/cheap, lightweight 3d engine, beginner friendly out there ?" />
  <row Id="7920" PostHistoryTypeId="3" PostId="4034" RevisionGUID="b80f1d38-2b4d-43a5-9202-f4c028e368da" CreationDate="2010-09-22T16:30:14.797" UserId="1829" Text="&lt;3d-engines&gt;&lt;ogre&gt;&lt;directx&gt;" />
  <row Id="7921" PostHistoryTypeId="2" PostId="4035" RevisionGUID="47835029-eaab-4a0c-bd12-a53a077ffad6" CreationDate="2010-09-22T17:20:38.410" UserId="20" Text="If you don't want all the benefits (and bloat?) of a 3D Engine, why not use [GLUT][1]?&#xD;&#xA;&#xD;&#xA;I think SceneManagers and the like actually **add** to the *user-friendliness* of a 3D Engine as opposed to making things more complicated.&#xD;&#xA;&#xD;&#xA;You can do very basic rendering (no textures, no shaders) with all of the 3D Engines you mentioned. Some of them even have a modular (Plugin) architecture so that you can actually strip out all things you (currently) don't need.&#xD;&#xA;&#xD;&#xA;IMHO there's no such thing as a *beginner friendly* 3D Engine or even a *beginner-friendly* framework/library. You'll always have to learn and get used to a software-package first. It seems to me like you're trying to skip that step :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/libraries/glut/" />
  <row Id="7922" PostHistoryTypeId="5" PostId="4028" RevisionGUID="4db62a2f-12df-40a9-ac64-ce3fab45280a" CreationDate="2010-09-22T17:25:35.427" UserId="659" Comment="added 1 characters in body" Text="Small teams guaranteed. It's the number one way to keep game dev fun, and bring out the real passion and team spirit required to make great games.&#xD;&#xA;&#xD;&#xA;A fair employment contract that does not try to steal ideas/code I come up with outside of work, or contain any nasty non-compete clauses.&#xD;&#xA;&#xD;&#xA;When the pressure is on, weekends and holidays will be sacred. None of the 'no holidays between pre-alpha and submission' BS&#xD;&#xA;&#xD;&#xA;Guarantee of a decent spec development PC with two 24&quot; monitors or better (surprising now much old hardware, particularly monitors, is still in use at big studios)&#xD;&#xA;&#xD;&#xA;Management that know the abilities of their staff well - their strengths/weaknesses/skills/specializations - and don't just treat them as 'Programming resource X'&#xD;&#xA;&#xD;&#xA;A place that supports multi-talented developers. Artists that can do design/scripting, Coders that do a bit of audio work, etc - rather than 'you're a coder, your input about the art style is not welcome'&#xD;&#xA;&#xD;&#xA;Understanding that 'you can't make a baby in 1 month by using 9 pregnant women'&#xD;&#xA;" />
  <row Id="7923" PostHistoryTypeId="10" PostId="4019" RevisionGUID="0b6e9618-d5f5-424e-97c6-bce9e1b91f34" CreationDate="2010-09-22T18:25:28.497" UserId="-1" CloseReasonId="3" Text="[{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="7924" PostHistoryTypeId="2" PostId="4036" RevisionGUID="8596653c-0118-483d-969f-c093a3fdd37f" CreationDate="2010-09-22T20:59:03.940" UserId="2248" Text="Give the user the chance to choose between both things." />
  <row Id="7925" PostHistoryTypeId="2" PostId="4037" RevisionGUID="d16f0eb3-8642-4ba0-a8ca-02b53f043c30" CreationDate="2010-09-22T21:27:37.077" UserId="189" Text="Well, I'll give this a shot.&#xD;&#xA;&#xD;&#xA;In regards your first question, I wholeheartedly recommend [SDL][1] to you. It is not a scene graph engine, and all your graphics will be done with OpenGL, but it handles the essentials for you, such as creating a window, setting up the OpenGL context, receiving input and playing audio. I absolutely feel your pain when it comes to 3D engines, and I've found my study of OpenGL to be pretty interesting and challenging. I have personally moved to Java, using [LWJGL][2] (or [JOGL][3] if you prefer), because I enjoy the higher-level language and the use of applets, and Java similarly handles window creation, input, sound, etc. for you.&#xD;&#xA;&#xD;&#xA;Your second &quot;question&quot; is only an observation, and a depressing and (in my opinion) very wrong one at that. There are certainly bad games out there, graphics-heavy games with little gameplay. Movie games come to mind, since they're often the ones that aren't so great. But graphics and gameplay are not mutually exclusive. From reading your rant I almost wonder if you have played any games lately; there is a huge variety of choices out there and I'm sure there is something for you. But I don't see at all why nice graphics implies bad gameplay. And if you are completely against fancy graphics, there are still games out there for you. You could even go to eBay and purchase an old system and old games for dirt cheap.&#xD;&#xA;&#xD;&#xA;The funny thing is, I would be willing to bet this opinion has existed for a really long time now, through the last several generations of consoles. I'm sure people looked at the Nintendo 64 when it came out and thought the same thing: great graphics (for its time) = bad gameplay. And there were good and bad N64 games. And then I know for a fact people were worrying about this sort of thing during the era of Gamecube and PS2 and Xbox. Heck, I sat back and watched as games for the Xbox did this exact thing. So there are always good games and bad games, and you need to just calm down, take a deep breath, and go find some games that appeal to you. There will always be games on either end of the spectrum; low-res games that you can't stop playing years later (CounterStrike 1.6 anyone?), and high-res games that are total flops.&#xD;&#xA;&#xD;&#xA;And yes, there will always be more of the latter, because graphics are easier to crank out than good gameplay ideas. Their existence doesn't take away from the existence of the good games, or reduce their numbers. They just give designers more evidence of what not to do when designing their next game. Is that such a bad thing?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.lwjgl.org/&#xD;&#xA;  [3]: http://jogamp.org/jogl/" />
  <row Id="7926" PostHistoryTypeId="5" PostId="4037" RevisionGUID="b80da8f1-a072-4fb2-85e2-2fe1d32c9111" CreationDate="2010-09-22T21:33:37.833" UserId="189" Comment="added 823 characters in body; deleted 1 characters in body" Text="Well, I'll give this a shot.&#xD;&#xA;&#xD;&#xA;In regards your first question, I wholeheartedly recommend **[SDL][1]** to you. It is not a scene graph engine, and all your graphics will be done with OpenGL, but it handles the essentials for you, such as creating a window, setting up the OpenGL context, receiving input and playing audio. I absolutely feel your pain when it comes to 3D engines, and I've found my study of OpenGL to be pretty interesting and challenging. I have personally moved to Java, using [LWJGL][2] (or [JOGL][3] if you prefer), because I enjoy the higher-level language and the use of applets, and Java similarly handles window creation, input, sound, etc. for you.&#xD;&#xA;&#xD;&#xA;However, the fact that you will soon be learning DirectX might mean that you should focus on that. I don't know of any equivalent to SDL for DirectX, but I do believe DirectX nowadays has some helper functions which get you up and running pretty quickly. Unfortunately I really don't know much at all about DirectX so I can't talk about any specifics. But I do recommend you give it a try.&#xD;&#xA;&#xD;&#xA;&gt; I'm sure it's a little too much to learn how to make a complete engine using D3D or opengl&#xD;&#xA;&#xD;&#xA;Yes, it is too much. And I see it all the time. **Don't make an engine; make a game.** Don't get caught up in creating loads of classes with untested and unused code in them and call it a &quot;library&quot; or an &quot;engine&quot; because it's more likely just a &quot;theoretical mess&quot;. Just do what you need to do to make a game.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Your second &quot;question&quot; is only an observation, and a depressing and (in my opinion) very wrong one at that. There are certainly bad games out there, graphics-heavy games with little gameplay. Movie games come to mind, since they're often the ones that aren't so great. But **graphics and gameplay are not mutually exclusive**. From reading your rant I almost wonder if you have played any games lately; there is a huge variety of choices out there and I'm sure there is something for you. But I don't see at all why nice graphics implies bad gameplay. And if you are completely against fancy graphics, there are still games out there for you. You could even go to eBay and purchase an old system and old games for dirt cheap.&#xD;&#xA;&#xD;&#xA;The funny thing is, I would be willing to bet this opinion has existed for a really long time now, through the last several generations of consoles. I'm sure people looked at the Nintendo 64 when it came out and thought the same thing: great graphics (for its time) = bad gameplay. And there were good and bad N64 games. And then I know for a fact people were worrying about this sort of thing during the era of Gamecube and PS2 and Xbox. Heck, I sat back and watched as games for the Xbox did this exact thing. So there are always good games and bad games, and you need to just calm down, take a deep breath, and go find some games that appeal to you. There will always be games on either end of the spectrum; low-res games that you can't stop playing years later (CounterStrike 1.6 anyone?), and high-res games that are total flops.&#xD;&#xA;&#xD;&#xA;And yes, there will always be more of the latter, because **graphics are easier to crank out than good gameplay ideas**. Their existence doesn't take away from the existence of the good games, or reduce their numbers. They just give designers more evidence of what *not* to do when designing their next game. Is that such a bad thing?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.lwjgl.org/&#xD;&#xA;  [3]: http://jogamp.org/jogl/" />
  <row Id="7927" PostHistoryTypeId="2" PostId="4038" RevisionGUID="a612450b-d7a1-48c7-90ee-b1e2c150fcaf" CreationDate="2010-09-22T21:50:35.620" UserId="1705" Text="On the OpenGL side, I think Horde3D is worth mentioning. It's maybe not so beginner-friendly since it doesn't offer many GUI tools like Unreal SDK does, but that makes it very lightweight. Most of all, I think it's great for learning.&#xD;&#xA;&#xD;&#xA;Horde teaches you to be very organized with your code. It uses XML for data (meshes, shaders, scene graphs, etc) and C++ for control.&#xD;&#xA;&#xD;&#xA;I like the fact that it's not a &quot;game engine&quot;. It's a 3D rendering engine which handles culling, levels of detail, lightning, animation, etc, but leaves all program logic to you.&#xD;&#xA;&#xD;&#xA;Like bummzack said, every engine out there will allow you to do basic polygon stuff. But since you're on a learning path, you might want to learn an engine that will also allow you to tackle more complex subjects in the future." />
  <row Id="7928" PostHistoryTypeId="2" PostId="4039" RevisionGUID="be86fa45-096a-431d-9a22-3880fa952fe5" CreationDate="2010-09-22T21:55:22.290" UserId="1705" Text="(This is intented as a comment to bummzack's answer)&#xD;&#xA;&#xD;&#xA;Instead of using GLUT directly, I think [GLFW][1] might be more suited to games, since it also handles input and timing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.glfw.org/" />
  <row Id="7929" PostHistoryTypeId="5" PostId="4038" RevisionGUID="4d6b9a54-f1ef-45db-878d-bc8ed9aea602" CreationDate="2010-09-22T21:55:44.630" UserId="1705" Comment="added 41 characters in body" Text="On the OpenGL side, I think [Horde3D][1] is worth mentioning. It's maybe not so beginner-friendly since it doesn't offer many GUI tools like Unreal SDK does, but that makes it very lightweight. Most of all, I think it's great for learning.&#xD;&#xA;&#xD;&#xA;Horde teaches you to be very organized with your code. It uses XML for data (meshes, shaders, scene graphs, etc) and C++ for control.&#xD;&#xA;&#xD;&#xA;I like the fact that it's not a &quot;game engine&quot;. It's a 3D rendering engine which handles culling, levels of detail, lightning, animation, etc, but leaves all program logic to you.&#xD;&#xA;&#xD;&#xA;Like bummzack said, every engine out there will allow you to do basic polygon stuff. But since you're on a learning path, you might want to learn an engine that will also allow you to tackle more complex subjects in the future.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.horde3d.org/" />
  <row Id="7930" PostHistoryTypeId="2" PostId="4040" RevisionGUID="3e3e1e08-a4b0-4fbc-b56d-cf524e973510" CreationDate="2010-09-22T22:03:54.383" UserId="490" Text="Assume you have several 1024x1024 textures which contain an arbitrarily shaped and relatively complex cave system whose walls need to have collision polygons defined. The polygons need to be convex to work with the physics engine.&#xD;&#xA;&#xD;&#xA;What kind of process and tools can you think of that would make editing the vertices of these walls as efficient and painless as possible? Especially considering that the polygons need to be convex, and the designer needs to see when that is not the case." />
  <row Id="7931" PostHistoryTypeId="1" PostId="4040" RevisionGUID="3e3e1e08-a4b0-4fbc-b56d-cf524e973510" CreationDate="2010-09-22T22:03:54.383" UserId="490" Text="Good ways to edit arbitrary collision shapes for 2D physics engine?" />
  <row Id="7932" PostHistoryTypeId="3" PostId="4040" RevisionGUID="3e3e1e08-a4b0-4fbc-b56d-cf524e973510" CreationDate="2010-09-22T22:03:54.383" UserId="490" Text="&lt;tools&gt;&lt;2d-physics&gt;" />
  <row Id="7933" PostHistoryTypeId="2" PostId="4041" RevisionGUID="cbcf85b3-acc0-43c1-9b18-aa49a34b56ca" CreationDate="2010-09-22T22:22:45.343" UserId="360" Text="You could run your textures through an algorithm to generate polygons based on images, and store the polygon data for use separately.&#xD;&#xA;&#xD;&#xA;Several open source physics engines, such as FarseerPhysics, already incorporate a similar feature that you could inspect." />
  <row Id="7934" PostHistoryTypeId="5" PostId="4041" RevisionGUID="9ffc70e9-f85a-4a9d-82e6-4d0c1017b2a1" CreationDate="2010-09-22T22:29:07.330" UserId="360" Comment="added 239 characters in body" Text="You could run your textures through an algorithm to generate polygons based on images, and store the polygon data for use separately.&#xD;&#xA;&#xD;&#xA;Several open source physics engines, such as FarseerPhysics, already incorporate a similar feature that you could inspect.&#xD;&#xA;&#xD;&#xA;Alternatively, write a simple tool to load the image and allow you to manually 'draw' collision polygons. Depending on how detailed you need your polygons to be, and how many you'd need to create, this may actually be an easier option." />
  <row Id="7935" PostHistoryTypeId="2" PostId="4042" RevisionGUID="7f265e6b-7e28-4335-b186-2e3210ab4765" CreationDate="2010-09-22T22:46:18.523" UserId="2167" Text="If you like developing flash games just for fun, why not make money through them?&#xD;&#xA;There are different ways you can monetize your flash game:&#xD;&#xA;&#xD;&#xA;**In Game Ads:**&#xD;&#xA;&#xD;&#xA; - [mochiads][1]&#xD;&#xA; - [gamejacket][2]&#xD;&#xA; - [ad4game][3]&#xD;&#xA; - [cpmstar][4]&#xD;&#xA; - [inviziads][5]&#xD;&#xA;&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;  2- You can make money by helping the online gaming companies to test and evaluate their new online games. Many of those companies are seeking to get feedback and reviews on their newest games. &#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;3- Find a sponsor and license your game.&#xD;&#xA;&#xD;&#xA;One of the quickest yet hardest ways to make money from the flash games you create is to find a website who is willing to sponsor them. With a single sponsorship, an individual can make anywhere from $1000-$7000 for a game.&#xD;&#xA;&#xD;&#xA;**My questions** &#xD;&#xA;&#xD;&#xA; 1. what's the best Ads from these sites&#xD;&#xA;    ?&#xD;&#xA; 2. if the game will be in social&#xD;&#xA;    websites Facebook , Myspace it will&#xD;&#xA;    be useful to put it in  online&#xD;&#xA;    gaming sites ?&#xD;&#xA; 3. are there any other solutions to&#xD;&#xA;    earn from your flash game ?2.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mochiads.com/&#xD;&#xA;  [2]: http://www.gamejacket.com/&#xD;&#xA;  [3]: http://www.ad4game.com/&#xD;&#xA;  [4]: http://www.cpmstar.com/&#xD;&#xA;  [5]: http://www.inviziads.com/" />
  <row Id="7936" PostHistoryTypeId="1" PostId="4042" RevisionGUID="7f265e6b-7e28-4335-b186-2e3210ab4765" CreationDate="2010-09-22T22:46:18.523" UserId="2167" Text="Different ways to earn money through a flash game" />
  <row Id="7937" PostHistoryTypeId="3" PostId="4042" RevisionGUID="7f265e6b-7e28-4335-b186-2e3210ab4765" CreationDate="2010-09-22T22:46:18.523" UserId="2167" Text="&lt;flash&gt;&lt;monetization&gt;&lt;facebook&gt;&lt;free-to-play&gt;&lt;platform-games&gt;" />
  <row Id="7938" PostHistoryTypeId="2" PostId="4043" RevisionGUID="fd349c78-825e-4ca5-9bc9-edf4eaa31667" CreationDate="2010-09-22T23:07:32.470" UserId="1966" Text="When you tilted too much, you will hardly see the screen (eyes must move), which is bad for intense action games.&#xD;&#xA;&#xD;&#xA;I'm a joypad and keyboard gamer, so I'm used to key controls, and key or mouse controls give you an accurate directional feedback. So you know if you are driving straight.&#xD;&#xA;&#xD;&#xA;In the X-Plane app, I found it's missing the HUD that shows your yoke position, which FlightGear has.&#xD;&#xA;&#xD;&#xA;DO NOT use the accelerometer to look around, it's very difficult.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;About Tilt to Live, it requires practice to steer properly.&#xD;&#xA;&#xD;&#xA;That's my list of example cases." />
  <row Id="7939" PostHistoryTypeId="5" PostId="3301" RevisionGUID="88795550-1cd5-4b68-95db-ddc16bdc1afe" CreationDate="2010-09-22T23:09:41.773" UserId="1966" Comment="Fixed the link spelling" Text="[Wings 3D][1]. Great tool for modelling. I found it easier to learn than Blender and I managed to get shapes I wanted reasonably fast.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wings3d.com/" />
  <row Id="7944" PostHistoryTypeId="2" PostId="4045" RevisionGUID="e1be2d35-5e76-4080-88ec-863ef7086d96" CreationDate="2010-09-22T23:41:11.267" UserId="1265" Text="Implement Social Security ;)" />
  <row Id="7945" PostHistoryTypeId="2" PostId="4046" RevisionGUID="da121725-6231-4f36-8f2f-4cb978e47d02" CreationDate="2010-09-22T23:57:05.323" UserId="360" Text="I've been considering moving to a more component-based approach in my games. Does anyone else have any decent reference material or sample implementations that would help make this transition a little easier?&#xD;&#xA; " />
  <row Id="7946" PostHistoryTypeId="1" PostId="4046" RevisionGUID="da121725-6231-4f36-8f2f-4cb978e47d02" CreationDate="2010-09-22T23:57:05.323" UserId="360" Text="Component-Based System Information" />
  <row Id="7947" PostHistoryTypeId="3" PostId="4046" RevisionGUID="da121725-6231-4f36-8f2f-4cb978e47d02" CreationDate="2010-09-22T23:57:05.323" UserId="360" Text="&lt;architecture&gt;&lt;component-based&gt;" />
  <row Id="7948" PostHistoryTypeId="16" PostId="4046" RevisionGUID="da121725-6231-4f36-8f2f-4cb978e47d02" CreationDate="2010-09-22T23:57:05.323" UserId="360" />
  <row Id="7949" PostHistoryTypeId="2" PostId="4047" RevisionGUID="f64d3fb2-b223-4004-ba29-1fb89e459512" CreationDate="2010-09-23T00:03:14.403" UserId="189" Text="Please check out the links that I put in the bottom of [this answer][1]. A good number of them thoroughly answer this question, and I'd rather not duplicate the information here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture/3427#3427" />
  <row Id="7950" PostHistoryTypeId="16" PostId="4047" RevisionGUID="f64d3fb2-b223-4004-ba29-1fb89e459512" CreationDate="2010-09-23T00:03:14.403" UserId="-1" />
  <row Id="7951" PostHistoryTypeId="5" PostId="4047" RevisionGUID="287eb56d-d130-4b77-ac5b-e20a96209196" CreationDate="2010-09-23T00:15:57.920" UserId="189" Comment="added 213 characters in body" Text="Please check out the links that I put in the bottom of [this answer][1]. A good number of them thoroughly answer this question, and I'd rather not duplicate the information here.&#xD;&#xA;&#xD;&#xA;In particular, there is a question, [&quot;Component based game engine design&quot;][2] which I think directly answers your question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture/3427#3427&#xD;&#xA;  [2]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design" />
  <row Id="7954" PostHistoryTypeId="2" PostId="4048" RevisionGUID="972fd3e0-42e0-4c9c-9e23-076a5125dd74" CreationDate="2010-09-23T01:06:49.673" UserId="2220" Text="What you seem to be looking for is a refresher in Probability and Statistics.&#xD;&#xA;&#xD;&#xA;For instance, if a player can choose between 4 colors/symbols for 6 spots there are `4*4*4*4*4*4` or `4^6=4096` possible combinations. 4 colors/symbols for 20 spots is `4^20=1,099,511,627,776`. With over a trillion possible combinations, that means the probability of a player guessing the 20 spot on the first try is worse than winning most lotteries.&#xD;&#xA;&#xD;&#xA;In a game like Mastermind, each try eliminates possibilities (in Prob &amp; Stats terms, tries are not &quot;independent&quot;, unlike a game like &quot;guess the coin flip&quot;), improving the probabilities as the game continues. The more a player knows about the code from feedback (symbols locking, symbol match counts, and other feedback), the fewer combinations the player has remaining to check and the better the probability on the next check.&#xD;&#xA;&#xD;&#xA;Hopefully that should be a good start to help you find some of the difficulty information you are looking for." />
  <row Id="7955" PostHistoryTypeId="2" PostId="4049" RevisionGUID="99d62806-18f2-4b64-aeaf-3fbdf24fc620" CreationDate="2010-09-23T04:17:17.313" UserId="2253" Text="I develop my own game engine for fun (but not profit).  I have rendering in one thread and my scene graph updates (velocity, etc.) in another.  When it's time to render, the render thread adds the visible nodes to a new linear buffer and traverses them.&#xD;&#xA;&#xD;&#xA;In more detail, my scene graph is triple-buffered.  Each node in my scene graph has three copies of its relative and absolute transformation matrices (4x4).  At any given time, one copy is written to by the scene graph thread, one copy is read by the renderer, and a third exists so that the reader or writer can move on to the next without waiting on the other.  This prevents writing to something while it's being rendered and from rendering a half-updated scene graph.  Somehow I've also got a fourth copy of each matrix for the user to work with so as to not conflict with the update thread.  Without any locks, this seems to perform well and without deadlocks.&#xD;&#xA;&#xD;&#xA;However, this is a mess.&#xD;&#xA;&#xD;&#xA;These are my ultimate goals for the system:&#xD;&#xA;&#xD;&#xA; - Rendering and scene graph updating stay in separate threads.&#xD;&#xA; - Minimize how much these threads have to wait on one another.&#xD;&#xA; - Don't render a scene that's been halfway updated by the update thread.  This is particularly noticeable if the camera is moving fast and sometimes it's rendered before or after an update.&#xD;&#xA; - Reduced memory usage.  I have way too many matrices per Node.  I'm also considering moving to vectors for position/rotation/scale due to increased floating point drift with matrices.&#xD;&#xA; - Ability to handle tens of thousands of Nodes.  The current system does this reasonably well.&#xD;&#xA;&#xD;&#xA;I also hope to incorporate Bullet (the physics engine) and networking in the future, neither of which I've given much thought.&#xD;&#xA;&#xD;&#xA;What are some approaches for accomplishing a better scene graph?&#xD;&#xA;" />
  <row Id="7956" PostHistoryTypeId="1" PostId="4049" RevisionGUID="99d62806-18f2-4b64-aeaf-3fbdf24fc620" CreationDate="2010-09-23T04:17:17.313" UserId="2253" Text="Scene Graph in Separate Thread" />
  <row Id="7957" PostHistoryTypeId="3" PostId="4049" RevisionGUID="99d62806-18f2-4b64-aeaf-3fbdf24fc620" CreationDate="2010-09-23T04:17:17.313" UserId="2253" Text="&lt;multithreading&gt;&lt;3d-engines&gt;&lt;scene-graph&gt;" />
  <row Id="7958" PostHistoryTypeId="5" PostId="4017" RevisionGUID="74735969-690d-4377-b081-cda5c7e85927" CreationDate="2010-09-23T06:22:00.950" UserId="370" Comment="fixed formatting" Text="While I was university student we set up a tour of [Radical Entertainment][1] for the game dev club.  We also toured EA Vancouver, but their tour was much more canned, we only got to talk with a lady from HR, though we did get to walk around their impressive campus.&#xD;&#xA;&#xD;&#xA;Radical's tour was very instructive, we got to see how it was all put together.  We got to talk with their lead developers about their hulk game.&#xD;&#xA;&#xD;&#xA;They gave us two pieces of advice that I can remember.&#xD;&#xA;&#xD;&#xA;They can and will train you on site to be a good game developer.  They however will not train to be a good programmer.  They expect that you'll be very wet behind the ears, but you'd better know C/C++.&#xD;&#xA;&#xD;&#xA;They love to see demos.  A resume without a demo is almost universally trumped by one with a demo.  Further those demos don't need to be complete games.  One project with lots of polish, and few more where you show off your interests, be that AI, graphics/shaders, sound, etc.&#xD;&#xA;&#xD;&#xA;A third piece of advice (mostly an opinion really) was that all game dev books suck.  Only the [Game Gems][2] series was at all usable.  Of course there were viewing the books worth from a professional level.  I don't know how they felt about using the books to learn as a beginner.&#xD;&#xA;&#xD;&#xA;So. Advice.&#xD;&#xA;&#xD;&#xA;* study hard, become C/C++ programmer.&#xD;&#xA;* build little side projects, build a big polished project near the end your college career.&#xD;&#xA;* get in touch with a college game dev club and they get going on the right foot.&#xD;&#xA;&#xD;&#xA;Personally, I'd look at [SFML][3] as pretty complete game library to use until you get more experience.  They've got some great tutorials to get you going.  My universities game dev club basically held live walkthroughs of these tutorials to get new/prospective members up to speed.&#xD;&#xA;&#xD;&#xA;Also, stay away from networking and 3D initially.  Top-down or side-scrollers are your friend.  2.5D is doable but it starts getting complicated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.radical.ca/&#xD;&#xA;  [2]: http://www.gameprogramminggems.com/&#xD;&#xA;  [3]: http://www.sfml-dev.org/" />
  <row Id="7959" PostHistoryTypeId="2" PostId="4050" RevisionGUID="78e3a87a-3c46-4908-89a6-07b2f2e71bc0" CreationDate="2010-09-23T06:49:47.157" UserId="101" Text="Have you read Johannes Spohr's thesis on &quot;Pace&quot; and its renderer? It describes a so-called [&quot;submission engine&quot;*][3] parallel renderer, and may give you some ideas.&#xD;&#xA;&#xD;&#xA;[Here][1] is the summary page (in German), and [here][2] is a direct link to the PDF which is in English.&#xD;&#xA;&#xD;&#xA;*([\*: this link][3] also goes to the article where I originally heard about the thesis.)*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.plm.eecs.uni-kassel.de/plm/index.php?id=713&#xD;&#xA;  [2]: http://www.plm.eecs.uni-kassel.de/plm/fileadmin/pm/publications/chuerkamp/Diplomarbeiten/Johannes_Spohr_thesis.pdf&#xD;&#xA;  [3]: http://meshula.net/wordpress/?page_id=93" />
  <row Id="7960" PostHistoryTypeId="5" PostId="4050" RevisionGUID="1c6ccd3b-edec-49cc-b55a-26ff6c987791" CreationDate="2010-09-23T06:58:32.763" UserId="101" Comment="mea culpa" Text="Have you read Johannes Spohr's thesis on &quot;Pace&quot; and its renderer? It describes a so-called [&quot;submission engine&quot;*][3] parallel renderer, and may give you some ideas.&#xD;&#xA;&#xD;&#xA;[Here][1] is the summary page (in German), and [here][2] is a direct link to the PDF which is in English.&#xD;&#xA;&#xD;&#xA;*([\*: this link][3] also goes to the article where I originally heard about the thesis.)*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.plm.eecs.uni-kassel.de/plm/index.php?id=713&#xD;&#xA;  [2]: http://www.plm.eecs.uni-kassel.de/plm/fileadmin/pm/publications/chuerkamp/Diplomarbeiten/Johannes_Spohr_thesis.pdf&#xD;&#xA;  [3]: http://meshula.net/wordpress/?page_id=93&#xD;&#xA;&#xD;&#xA;EDIT: I'd only glossed over this previously, and I just looked at it again... and realized it really glosses over scene graph details. I guess I didn't realize how orthogonal his design was. Sorry if it's not particularly helpful." />
  <row Id="7961" PostHistoryTypeId="5" PostId="4050" RevisionGUID="c2a97978-b01d-436b-9a86-f1e0d71c40fb" CreationDate="2010-09-23T07:14:39.860" UserId="101" Comment="m-m-m-mega edit!" Text="Have you read Johannes Spohr's thesis on &quot;Pace&quot; and its renderer? It describes a so-called [&quot;submission engine&quot;*][3] parallel renderer, and may give you some ideas.&#xD;&#xA;&#xD;&#xA;[Here][1] is the summary page (in German), and [here][2] is a direct link to the PDF which is in English.&#xD;&#xA;&#xD;&#xA;*([\*: this link][3] also goes to the article where I originally heard about the thesis.)*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.plm.eecs.uni-kassel.de/plm/index.php?id=713&#xD;&#xA;  [2]: http://www.plm.eecs.uni-kassel.de/plm/fileadmin/pm/publications/chuerkamp/Diplomarbeiten/Johannes_Spohr_thesis.pdf&#xD;&#xA;  [3]: http://meshula.net/wordpress/?page_id=93&#xD;&#xA;&#xD;&#xA;EDIT: I'd only skimmed this previously, and I just looked at it again... and realized it really glosses over scene graph details. I guess I didn't realize how orthogonal his design was. Sorry if it's not particularly helpful." />
  <row Id="7962" PostHistoryTypeId="2" PostId="4051" RevisionGUID="357f750e-2cc2-4999-8398-c96cbd69fb9c" CreationDate="2010-09-23T07:25:09.077" UserId="20" Text="Why not let the Artist/Level-Designer draw the rough outline of the cave, then use an algorithm like the [ear-clip algorithm][1] to create convex polygons from that outline?&#xD;&#xA;&#xD;&#xA;You could even use a tool like [potrace][2] or [autotrace][3] to create vector outline from you images. Then use these directly or provide them to your Artist/Level-Designer as a starting-point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ewjordan.com/earClip/&#xD;&#xA;  [2]: http://potrace.sourceforge.net/&#xD;&#xA;  [3]: http://autotrace.sourceforge.net/" />
  <row Id="7963" PostHistoryTypeId="5" PostId="3958" RevisionGUID="210cce69-6856-433b-a0bd-32dd249ea45d" CreationDate="2010-09-23T10:10:38.990" UserId="2168" Comment="added 25 characters in body" Text="Is anyone aware of a nice 3D map tutorial (how to import and use the map) using XNA without any engine but not limited to an external application (like Tiled for 2D maps) ?&#xD;&#xA;&#xD;&#xA;I did a search arund here but have'nt found anything towards xna 3d maps only 2d.&#xD;&#xA;&#xD;&#xA;PS: **I am looking for material that can be read online with no cost if possible.**&#xD;&#xA;&#xD;&#xA;**I would be very interested in knowing any other contents related to this subject other then what  Ricket contributed.**&#xD;&#xA;&#xD;&#xA;Best regards.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7964" PostHistoryTypeId="5" PostId="4023" RevisionGUID="f2a14ab5-2df6-40c4-84bc-01fb171b7b7a" CreationDate="2010-09-23T10:11:44.970" UserId="2168" Comment="bolded the important question" Text="Currently I am learning XNA and while playing around with some tutorials knowing what I am aiming for a game it made me think that the Sprite Class will be something very important and re-used a lot of times, not sure if I am mistaken or not with this thinking.&#xD;&#xA;&#xD;&#xA;Bellow you can see the Sprite code I am using at the momment and I was wondering:&#xD;&#xA;&#xD;&#xA; - How a Sprite Class should be or what&#xD;&#xA;   functions in general it should have&#xD;&#xA;   or am I mistaken that the Sprite&#xD;&#xA;   Class will not be used by every&#xD;&#xA;   sprite in my game ?&#xD;&#xA;&#xD;&#xA;For example, in my sprite I could hold all property of the sprite even if one property is not being used, let's say an object that does not move around so it would have no speed which I could simple have a property saying that speed is disabled.&#xD;&#xA;&#xD;&#xA;So i guess my real question is:&#xD;&#xA;&#xD;&#xA; - **How should I structure my Sprite&#xD;&#xA;   Class to have the best usage out of&#xD;&#xA;   it ?**&#xD;&#xA;&#xD;&#xA;If you have a sample code to show I would appreciate aswell not really necessary, just for reference (also it doesnt need to be in c#).&#xD;&#xA;&#xD;&#xA;**Hope my question is not too confusing.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    &#xD;&#xA;    namespace MyGameTest&#xD;&#xA;    {&#xD;&#xA;        class Sprite&#xD;&#xA;        {&#xD;&#xA;            public string AssetName;&#xD;&#xA;    &#xD;&#xA;            public Rectangle Size;&#xD;&#xA;    &#xD;&#xA;            private float mScale = 1.0f;&#xD;&#xA;    &#xD;&#xA;            public Vector2 Position = new Vector2(0, 0);&#xD;&#xA;    &#xD;&#xA;            public Vector2 Speed = new Vector2(0, 0);&#xD;&#xA;            &#xD;&#xA;            private Texture2D mSpriteTexture;&#xD;&#xA;    &#xD;&#xA;            public float Scale&#xD;&#xA;            {&#xD;&#xA;                get { return mScale; }&#xD;&#xA;                set&#xD;&#xA;                {&#xD;&#xA;                    mScale = value;&#xD;&#xA;                    Size = new Rectangle(0, 0, (int)(mSpriteTexture.Width * Scale), (int)(mSpriteTexture.Height * Scale));&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void LoadContent(ContentManager theContentManager, string theAssetName)&#xD;&#xA;            {&#xD;&#xA;                mSpriteTexture = theContentManager.Load&lt;Texture2D&gt;(theAssetName);&#xD;&#xA;                AssetName = theAssetName;&#xD;&#xA;                Size = new Rectangle(0, 0, (int)(mSpriteTexture.Width * Scale), (int)(mSpriteTexture.Height * Scale));&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Draw(SpriteBatch theSpriteBatch)&#xD;&#xA;            {&#xD;&#xA;                theSpriteBatch.Draw(mSpriteTexture, Position,&#xD;&#xA;                                    new Rectangle(0, 0, mSpriteTexture.Width, mSpriteTexture.Height),&#xD;&#xA;                                    Color.White, 0.0f, Vector2.Zero, Scale, SpriteEffects.None, 0);&#xD;&#xA;            } &#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="7965" PostHistoryTypeId="2" PostId="4052" RevisionGUID="2483cf68-337a-4160-affe-591141b00398" CreationDate="2010-09-23T12:11:23.720" UserId="1323" Text="There are some interesting aspects about peer-to-peer systems and action games. I tried to post them as a comment on Glenn Fiedler's blog, but apparently he doesn't like to be proved wrong and pulled the whole article instead. [It's still in google's cache, in case you want to read it.][1]&#xD;&#xA;&#xD;&#xA;He didn't let the comment go online, so I'll quote it here:&#xD;&#xA;&gt;The Peer-to-Peer suggestion from the first post is actually an interesting starting point, even though it's a bit naive at times: The first possibility would be to combine the system with a standard client/server model with prediction as outlined in your post about game networking. &#xD;&#xA;The lower P2P ping would dramatically reduce the prediction lag between players depending on their location: The effect probably wouldn't be visible for most US gamers, but here in Europe pings of 200+ are normal on most servers and a direct connection would reduce the prediction lag to that of a European server.&#xD;&#xA;&#xD;&#xA;&gt;A true P2P approach without server is a bit more complex:&#xD;&#xA;A main concern with decentralized networks is ensuring consistency, especially if the simulation could suffer from butterfly effects because of slightly different timing of commands sent over the network or floating point issues. This is possible by networking the state of each object (players, NPCs, ...) at least periodically. It wouldn't even be necessary to do it for all objects at once, and each client could take possession of certain objects. Networking enough objects in a certain time should damp the difference that builds up between each synchronization of an object enough to become irrelevant even for sync-intervals of a second or more.&#xD;&#xA;&#xD;&#xA;&gt;The second problem with P2P systems is security, but that can be solved with a relatively small fix in this case: The clients can use their physics simulations to collect information about the error level on each physics object. Manipulated physics always result in a larger error, so the clients would simply &quot;vote&quot; to disconnect from the peer controlling a suspicious object. Additionally, control messages for non-physics objects are forwarded between clients based on their importance: Player updates can be forwarded randomly, important and infrequent updates should always be sent, but still to a random player. This way a player would have to control a large share of the connected clients to be able to cheat in any noticeable way.&#xD;&#xA;&#xD;&#xA;&gt;The only shocking thing I see here is how difficult it is to find an argument between intelligent people on the internet that doesn't end with everyone insulting each other, although this is one of the nastier ones, on both sides.&#xD;&#xA;&#xD;&#xA;&gt;Also: Your bandwidth-math from the first thread really is wrong, and in quite a blatant way, but he doesn't explain it very well either.&#xD;&#xA;&#xD;&#xA;You can find the thread I'm referencing at [http://www.devmaster.net/forums/showthread.php?t=14640][2].&#xD;&#xA;&#xD;&#xA;I think someone mentioned the firewall problems peer-to-peer has in one of the threads from the article. A possible solution would be a NAT-Punchthrough:  &#xD;&#xA;- [NAT Punchthrough overview][3]  &#xD;&#xA;- [Peer-to-Peer Communication Across Network Address Translators][4]&#xD;&#xA;&#xD;&#xA;There is no 100% success rate, so you should tell the players to open a port anyway.&#xD;&#xA;&#xD;&#xA;  [1]: http://webcache.googleusercontent.com/search?q=cache:0cNq1fLFfVAJ:gafferongames.com/2009/09/04/the-return-of-the-timestep-crusader/&amp;cd=1&amp;hl=de&amp;ct=clnk&amp;gl=de&#xD;&#xA;  [2]: http://www.devmaster.net/forums/showthread.php?t=14640&#xD;&#xA;  [3]: http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html&#xD;&#xA;  [4]: http://www.brynosaurus.com/pub/net/p2pnat/" />
  <row Id="7966" PostHistoryTypeId="2" PostId="4053" RevisionGUID="bcfcc038-4ff0-4056-81f5-0c42784d3ed3" CreationDate="2010-09-23T12:30:37.893" UserId="2248" Text="The game is 2D, how can I make simple physics for a group of ballons colliding in the screen.&#xD;&#xA;&#xD;&#xA;What I need is the ballons not to overlap and to bounce when they reach the limits of the screen or other ballons. &#xD;&#xA;&#xD;&#xA;Should I use something like box2d or is there a simple algorithm to do something like this?" />
  <row Id="7967" PostHistoryTypeId="1" PostId="4053" RevisionGUID="bcfcc038-4ff0-4056-81f5-0c42784d3ed3" CreationDate="2010-09-23T12:30:37.893" UserId="2248" Text="How to create simple physics for a group of ballons colliding in the screen (2D)" />
  <row Id="7968" PostHistoryTypeId="3" PostId="4053" RevisionGUID="bcfcc038-4ff0-4056-81f5-0c42784d3ed3" CreationDate="2010-09-23T12:30:37.893" UserId="2248" Text="&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="7969" PostHistoryTypeId="5" PostId="4053" RevisionGUID="1de162d1-8f67-412c-b5fe-d4a304be465c" CreationDate="2010-09-23T12:33:07.200" UserId="189" Comment="fixed &quot;balloon&quot; spelling" Text="The game is 2D, how can I make simple physics for a group of balloons colliding in the screen.&#xD;&#xA;&#xD;&#xA;What I need is the balloons not to overlap and to bounce when they reach the limits of the screen or other balloons. &#xD;&#xA;&#xD;&#xA;Should I use something like box2d or is there a simple algorithm to do something like this?" />
  <row Id="7970" PostHistoryTypeId="4" PostId="4053" RevisionGUID="1de162d1-8f67-412c-b5fe-d4a304be465c" CreationDate="2010-09-23T12:33:07.200" UserId="189" Comment="fixed &quot;balloon&quot; spelling" Text="How to create simple physics for a group of balloons colliding in the screen (2D)" />
  <row Id="7971" PostHistoryTypeId="2" PostId="4054" RevisionGUID="45198af0-28fd-40f4-b41e-1994e14fcaee" CreationDate="2010-09-23T12:40:07.607" UserId="189" Text="It sounds like this might be best approximated by circle-circle collision.&#xD;&#xA;&#xD;&#xA;Store the balloons in terms of a center point and a radius (of a circle which closely matches the balloon art). Given this, collision checking is simple! Remember your pythagorean theorem. If one balloon is at (x1,y1) with radius r1 and the other is at (x2, y2) with radius r2, then:&#xD;&#xA;&#xD;&#xA;    if((x2-x1)^2 + (y2-y1)^2 &lt; (r1+r2)^2) {&#xD;&#xA;        // collision&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So basically, the distance between them is `sqrt((x2-x1)^2 + (y2-y1)^2)` and the collision distance is `r1+r2`. Since `sqrt` is an expensive operation, square both of those to get rid of the square root, and you're left with the code I wrote above." />
  <row Id="7972" PostHistoryTypeId="2" PostId="4055" RevisionGUID="cb21f53f-8471-4db8-9f2a-8502c4b5d924" CreationDate="2010-09-23T13:49:54.630" UserId="744" Text="There are simple algorithms to do this, but they are probably better implemented in Box2D than you could yourself. In particular:&#xD;&#xA;&#xD;&#xA; * Box2D will let you have differently-sized and differently-dense (and so differently-massed) balloons, as well as different surface friction, and simulate them correctly.&#xD;&#xA; * Box2D will give you realistic behavior if you want to simulate e.g. an object heavier than air falling onto the balloons.&#xD;&#xA; * Box2D uses spatial subdivision, reducing the number of checks you need to do.&#xD;&#xA; * Box2D will correctly simulate a balloon &quot;pushing up&quot; between two others, which is going to be tricky to get good and stable if you hack up your own penetration-and-correction test." />
  <row Id="7973" PostHistoryTypeId="5" PostId="3187" RevisionGUID="ba63fd34-09a2-4a3e-84c5-a77d49c5428e" CreationDate="2010-09-23T14:11:21.167" UserId="1477" Comment="added 43 characters in body" Text="Creating resources endlessly is an issue but completely closed systems have their downfalls too. Take a look at [Shattered World][1]. Completely closed economy with player run shops, banks, etc. Monsters in the world were actually equipped by items purchased from player shops by the game. The hoarding instinct mentioned above killed the game though. There were taxes but there was also a player monarch who surprisingly also enjoyed hoarding of money.&#xD;&#xA;&#xD;&#xA;To make a closed system work you need to give the rich players incentives to spend their money. This is similar to the classic open economy with the caveat that rich players giving money to poor players helps this system while it does little for the open one. One interesting way to do this is to put in place systems to allow rich players to &quot;hire&quot; poorer ones out. One could require large reserves of stone to maintain their opulent castle, much more then they could mine on their own, and allow them to have an NPC reward money from their vaults to players who help supply stone for the keep.&#xD;&#xA;&#xD;&#xA;Depending on how other resources are handled in the game you may actually end up with large amounts of deflation with infinite veins etc mentioned before.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.shattered.org/" />
  <row Id="7974" PostHistoryTypeId="2" PostId="4056" RevisionGUID="c2a07b39-302d-4eb9-87b4-53538a27f354" CreationDate="2010-09-23T14:54:46.573" UserId="1198" Text="I have found the concepts and examples in Johnathan Harbor's book VB Game Programming with Direct X to be **very** useful when writing XNA and older MDX code. The book is OLD, and  its in Visual Basic 6, but his examples do use encapsulation (since vb6 didn't support inheritance) but they best illustrate the concept of building a basic 'system' through classes - I'd recommend browsing through it in the bookstore or library just to get some of the ideas: http://search.barnesandnoble.com/Visual-Basic-Game-Programming-with-DIRECTX/Jonathan-S-Harbour/e/9781931841252 -- Thats not to say there are not any of these concepts well demonstrated on line or by other authors, but I know and can vouche for the ones in this book.&#xD;&#xA;&#xD;&#xA;(This started as a comment but became too long pretty quickly)" />
  <row Id="7975" PostHistoryTypeId="5" PostId="4049" RevisionGUID="782e50c3-3eba-4f81-bc98-91052f16e3d0" CreationDate="2010-09-23T15:00:41.417" UserId="2253" Comment="added 6 characters in body" Text="I develop my own game engine for fun (but not profit).  I have rendering in one thread and my scene graph updates (velocity, etc.) in another.  When it's time to render, the render thread adds the visible nodes to a new linear buffer and traverses them.&#xD;&#xA;&#xD;&#xA;In more detail, my scene graph is triple-buffered.  Each node in my scene graph has three copies of its relative and absolute transformation matrices (4x4).  At any given time, one copy is written to by the scene graph thread, one copy is read by the renderer, and a third exists so that the reader or writer can move on to the next without waiting on the other.  This prevents writing to something while it's being rendered and from rendering a half-updated scene graph.  Somehow I've also got a fourth copy of each matrix for the user to work with so as to not conflict with the update thread.  This seems to perform well by avoiding having to synchronize all the time.&#xD;&#xA;&#xD;&#xA;However, this is a mess.&#xD;&#xA;&#xD;&#xA;These are my ultimate goals for the system:&#xD;&#xA;&#xD;&#xA; - Rendering and scene graph updating stay in separate threads.&#xD;&#xA; - Minimize how much these threads have to wait on one another.&#xD;&#xA; - Don't render a scene that's been halfway updated by the update thread.  This is particularly noticeable if the camera is moving fast and sometimes it's rendered before or after an update.&#xD;&#xA; - Reduced memory usage.  I have way too many matrices per Node.  I'm also considering moving to vectors for position/rotation/scale due to increased floating point drift with matrices.&#xD;&#xA; - Ability to handle tens of thousands of Nodes.  The current system does this reasonably well.&#xD;&#xA;&#xD;&#xA;I also hope to incorporate Bullet (the physics engine) and networking in the future, neither of which I've given much thought.&#xD;&#xA;&#xD;&#xA;What are some approaches for accomplishing a better scene graph?&#xD;&#xA;" />
  <row Id="7976" PostHistoryTypeId="2" PostId="4057" RevisionGUID="ec902c59-b4ef-4bf6-9b48-99cbefd1b268" CreationDate="2010-09-23T16:37:16.903" UserId="2223" Text="Could you please list a few free 3d OOP game engines, along with the pros and cons?" />
  <row Id="7977" PostHistoryTypeId="1" PostId="4057" RevisionGUID="ec902c59-b4ef-4bf6-9b48-99cbefd1b268" CreationDate="2010-09-23T16:37:16.903" UserId="2223" Text="What are the free 3d OOP game engines?" />
  <row Id="7978" PostHistoryTypeId="3" PostId="4057" RevisionGUID="ec902c59-b4ef-4bf6-9b48-99cbefd1b268" CreationDate="2010-09-23T16:37:16.903" UserId="2223" Text="&lt;3d-engines&gt;&lt;free&gt;" />
  <row Id="7979" PostHistoryTypeId="16" PostId="4057" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-23T16:44:01.917" UserId="14" />
  <row Id="7980" PostHistoryTypeId="2" PostId="4058" RevisionGUID="263676a2-bd68-4bd7-b099-dab4459bd7b3" CreationDate="2010-09-23T16:54:09.817" UserId="189" Text="Existing questions which should answer you:&#xD;&#xA;&#xD;&#xA;- [Linux Game Engines][1]&#xD;&#xA;- [C++ Game Library][2]&#xD;&#xA;- [Game Engine framework or library][3]&#xD;&#xA;- [Easy to use cross-platform 3D engines for C++ game development?][4]&#xD;&#xA;- [Pro's and Con's of Various 3D Game Engines][5]&#xD;&#xA;&#xD;&#xA;Also see the [3D Game and Graphics Engines Database][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3383/linux-game-engines&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2815/c-game-library-closed&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/2005/game-engine-framework-or-library&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/21/easy-to-use-cross-platform-3d-engines-for-c-game-development&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/351/pros-and-cons-of-various-3d-game-engines&#xD;&#xA;  [6]: http://www.devmaster.net/engines/" />
  <row Id="7981" PostHistoryTypeId="16" PostId="4058" RevisionGUID="263676a2-bd68-4bd7-b099-dab4459bd7b3" CreationDate="2010-09-23T16:54:09.817" UserId="-1" />
  <row Id="7982" PostHistoryTypeId="2" PostId="4059" RevisionGUID="06cc26c9-330f-4987-a1a7-32daaacd477f" CreationDate="2010-09-23T17:35:27.477" UserId="119" Text="[1]: http://i.stack.imgur.com/cAxy1.jpg&#xD;&#xA;&#xD;&#xA;![diagram][1]&#xD;&#xA;&#xD;&#xA;I'm making an isometric game. When the player tries to walk diagonally into a wall I want them to slide smoothly across it, so whatever portion of the movement would be legal is used, and anything in the direction of the normal is thrown away. Walls can be any angle, not just vertical or horizontal, and the player has 360 motion.&#xD;&#xA;&#xD;&#xA;I feel like I'm almost there but I can't put the last piece into place.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="7983" PostHistoryTypeId="1" PostId="4059" RevisionGUID="06cc26c9-330f-4987-a1a7-32daaacd477f" CreationDate="2010-09-23T17:35:27.477" UserId="119" Text="How to make the player slide smoothly against terrain" />
  <row Id="7984" PostHistoryTypeId="3" PostId="4059" RevisionGUID="06cc26c9-330f-4987-a1a7-32daaacd477f" CreationDate="2010-09-23T17:35:27.477" UserId="119" Text="&lt;math&gt;" />
  <row Id="7985" PostHistoryTypeId="2" PostId="4060" RevisionGUID="1eeefcea-5f37-420c-96f7-19c3874f1420" CreationDate="2010-09-23T17:47:24.020" UserId="1597" Text="Just project your vector of motion onto the plane normal and then subtract the result from your vector of motion.&#xD;&#xA;&#xD;&#xA;Vector undesiredMotion = normal * (dotProduct(input, normal));&#xD;&#xA;Vector correctedMotion = desired - undesiredMotion;&#xD;&#xA;&#xD;&#xA;Something like that anyway. Although in your lovely diagram the input seems to be away from the wall so I'm slightly confused. " />
  <row Id="7986" PostHistoryTypeId="2" PostId="4061" RevisionGUID="896c7609-55c7-42d1-a138-efd8a39a7323" CreationDate="2010-09-23T18:18:16.027" UserId="2260" Text="I've been working (off-and-on) on a pbbg that's pretty old school.  If you've ever played &lt;a href=&quot;www.carnageblender.com&quot;&gt;Carnage Blender&lt;/a&gt; then you get the idea.&#xD;&#xA;&#xD;&#xA;If not, it's a simple idea that's been done a lot:  A player is allocated a certain number of &quot;points&quot; each day, and spends those points to attack other players.  Points accrue over time, up to a certain cap.&#xD;&#xA;&#xD;&#xA;The point system is designed to prevent over-achievers from completely out-pacing casual players.&#xD;&#xA;&#xD;&#xA;In the case of carnage blender, a CAPTACHA system prevents a user from &quot;gaming&quot; the system with a bot or a script designed to use all of their points each day with minimal effort.  Every once in a while a random CAPTCHA is displayed, and if not passed the user will be suspended for an hour.&#xD;&#xA;&#xD;&#xA;What I'm wondering is how to make this more user friendly for my game.  I recognize that I must prevent bad behavior like this, and I could easily take the same CAPTCHA approach, but is there a more user friendly alternative?&#xD;&#xA;&#xD;&#xA;Initial research uncovered ASIRRA by Microsoft, but the fluffy/cute vibe doesn't work well with my intended game theme." />
  <row Id="7987" PostHistoryTypeId="1" PostId="4061" RevisionGUID="896c7609-55c7-42d1-a138-efd8a39a7323" CreationDate="2010-09-23T18:18:16.027" UserId="2260" Text="Persistent Browser Based Game:  To Captcha or not to Captcha?" />
  <row Id="7988" PostHistoryTypeId="3" PostId="4061" RevisionGUID="896c7609-55c7-42d1-a138-efd8a39a7323" CreationDate="2010-09-23T18:18:16.027" UserId="2260" Text="&lt;web&gt;&lt;game-mechanics&gt;&lt;interface&gt;&lt;security&gt;" />
  <row Id="7989" PostHistoryTypeId="2" PostId="4062" RevisionGUID="bf696554-afc6-4891-b402-f6e8651510ff" CreationDate="2010-09-23T18:35:47.090" UserId="1198" Text="I would not ban a failed CAPTACHA for an hour, that seems harsh, I would just prevent them moving forward until they successfully complete the CAPTACHA and allowing for a new CAPTACHA image to be shown.&#xD;&#xA;&#xD;&#xA;I would also only display the captcha if they making requests too quickly, I'd store the a DateTime on every request, and then compare it to the next request, if its less than 2-4 seconds, you display the CAPTACHA, otherwise let them go. You'll need to determine what a reasonable interval is for your game, server, and bandwidth. &#xD;&#xA;&#xD;&#xA;You could also do a &quot;forced&quot; CAPTACHA every X times that an action is taken, this will prevent even an automated script with a `pause` built in so it doesn't trigger the time limit CAPTACHA.&#xD;&#xA;" />
  <row Id="7990" PostHistoryTypeId="5" PostId="4061" RevisionGUID="905e5c96-ce34-4e13-bdc2-df80a6af0ff9" CreationDate="2010-09-23T18:43:53.350" UserId="2260" Comment="added 189 characters in body; added 287 characters in body" Text="I've been working (off-and-on) on a pbbg that's pretty old school.  If you've ever played &lt;a href=&quot;www.carnageblender.com&quot;&gt;Carnage Blender&lt;/a&gt; then you get the idea.&#xD;&#xA;&#xD;&#xA;If not, it's a simple idea that's been done a lot:  A player is allocated a certain number of &quot;points&quot; each day, and spends those points to attack other players.  Points accrue over time, up to a certain cap.&#xD;&#xA;&#xD;&#xA;The point system is designed to prevent over-achievers from completely out-pacing casual players.&#xD;&#xA;&#xD;&#xA;In the case of carnage blender, a CAPTACHA system prevents a user from &quot;gaming&quot; the system with a bot or a script designed to use all of their points each day with minimal effort.  Every once in a while a random CAPTCHA is displayed, and if not passed the user will be suspended for an hour.&#xD;&#xA;&#xD;&#xA;What I'm wondering is how to make this more user friendly for my game.  I recognize that I must prevent bad behavior like this, and I could easily take the same CAPTCHA approach, but is there a more user friendly alternative?&#xD;&#xA;&#xD;&#xA;Initial research uncovered ASIRRA by Microsoft, but the fluffy/cute vibe doesn't work well with my intended game theme.&#xD;&#xA;&#xD;&#xA;**UPDATE**  &#xD;&#xA;What I'm most interested in are alternatives to the standard &quot;spell this word&quot; CAPTCHA.  I want to try to keep game-play as uninterrupted as possible for the good players.&#xD;&#xA;&#xD;&#xA;I've seen what I call *One-Time-Use* CAPTCHAs, like asking a user &quot;what is five plus six minus two?&quot;  But this would require too much effort compiling a large enough database of questions to foil the malicious users.  Especially since the CAPTCHA is intended to be used so often.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="7994" PostHistoryTypeId="2" PostId="4064" RevisionGUID="2e5c6bbd-8c49-4dee-b3ef-3b1b10349291" CreationDate="2010-09-23T19:20:26.997" UserId="744" Text="&quot;is there a more user friendly alternative?&quot;&#xD;&#xA;&#xD;&#xA;A more user friendly alternative to what end? What is the captcha designed to achieve in your system?&#xD;&#xA;&#xD;&#xA;It sounds like it's designed to prevent botting, under the premise that bots can play &quot;faster&quot; than regular players. But you have also already capped the number of actions a user can take per day, which achieves the same goal. So the captcha seems redundant.&#xD;&#xA;&#xD;&#xA;I would encourage you to look at &lt;a href=&quot;http://www.kingdomofloathing.com&quot;&gt;Kingdom of Loathing&lt;/a&gt;'s alternate frontends. It uses a similar turns-per-day system, and has several popular alternate frontends &lt;a href=&quot;http://kolmafia.sourceforge.net/manual.html&quot;&gt;such as KoLmafia&lt;/a&gt;, which are in many ways indistinguishable from &quot;botting&quot; the game. Most players feel these add to, rather than take away from, the game, even for casual players. They make it easier to batch actions, automate some of the slower parts, and offer more options for in-game UI.&#xD;&#xA;&#xD;&#xA;If you already have checks in your game to ensure AIs can't simply play faster than humans - and by having turns-per-day, you have such a check - then I suggest you try _encouraging_ automating your game, as if your design is balanced, it can only improve player experience." />
  <row Id="7996" PostHistoryTypeId="5" PostId="4061" RevisionGUID="a3734891-3dc5-44a4-944b-bfe9eafb1b42" CreationDate="2010-09-23T19:37:58.457" UserId="2260" Comment="Wrong Reference!; edited body" Text="I've been working (off-and-on) on a pbbg that's pretty old school.  If you've ever played &lt;a href=&quot;www.carnageblender.com&quot;&gt;Carnage Blender&lt;/a&gt; then you get the idea.&#xD;&#xA;&#xD;&#xA;If not, it's a simple idea that's been done a lot:  A player is allocated a certain number of &quot;points&quot; each day, and spends those points to attack other players.  Points accrue over time, up to a certain cap.&#xD;&#xA;&#xD;&#xA;The point system is designed to prevent over-achievers from completely out-pacing casual players.&#xD;&#xA;&#xD;&#xA;In the case of carnage blender, a CAPTACHA system prevents a user from &quot;gaming&quot; the system with a bot or a script designed to use all of their points each day with minimal effort.  Every once in a while a random CAPTCHA is displayed, and if not passed the user will be suspended for an hour.&#xD;&#xA;&#xD;&#xA;What I'm wondering is how to make this more user friendly for my game.  I recognize that I must prevent bad behavior like this, and I could easily take the same CAPTCHA approach, but is there a more user friendly alternative?&#xD;&#xA;&#xD;&#xA;Initial research uncovered ASIRRA by Microsoft, but the fluffy/cute vibe doesn't work well with my intended game theme.&#xD;&#xA;&#xD;&#xA;**UPDATE**  &#xD;&#xA;What I'm most interested in are alternatives to the standard &quot;spell this word&quot; CAPTCHA.  I want to try to keep game-play as uninterrupted as possible for the good players.&#xD;&#xA;&#xD;&#xA;I've seen what I call *One-Time-Use* CAPTCHAs, like asking a user &quot;what is five plus six minus two?&quot;  But this would require too much effort compiling a large enough database of questions to foil the malicious users.  Especially since the CAPTCHA is intended to be used so often.&#xD;&#xA;&#xD;&#xA;**UPDATE #2**  &#xD;&#xA;As Joe Wreschnig pointed out in his answer, having a CAPTCHA system to limit bots from playing the game *faster* than humans is a bit redundant if turns are limited per day.  I didn't explain my point system to-the-letter, and that was my fault.  In reality, 10 or 20 points accrue every few minutes, and cap off at 200.  So, a very competitive player could return every few hours and use his points.  I want to reward those people who like my game so much that they return so often.  If I prevent them from playing until the next day when they get their points, I would be turning away players who would otherwise be enjoying my webgame.  This prevents a player from spending points **constantly** while still giving them a few points every few minutes.&#xD;&#xA;&#xD;&#xA;This is open to abuse." />
  <row Id="7997" PostHistoryTypeId="2" PostId="4065" RevisionGUID="ee5cf1a7-cf4c-46a9-a848-e853a43c7b0d" CreationDate="2010-09-23T19:41:33.597" UserId="1780" Text="While it's straight forward to just remove the component of the motion that is in the direction of the normal, it may suit your gameplay to rotate the motion vector instead.  For instance, in a 3rd-person action game, it may be easy to get slightly hung up on walls and other boundaries, so you can make some guesses at what the player intends.&#xD;&#xA;&#xD;&#xA;    // assume that 'normal' is unit length&#xD;&#xA;    Vector GetDesired(Vector input, Vector normal) {&#xD;&#xA;       // tune this to get where you stop when you're running into the wall,&#xD;&#xA;       // vs. bouncing off of it&#xD;&#xA;       static float k_runningIntoWallThreshold = cos(DEG2RAD(45));&#xD;&#xA;    &#xD;&#xA;       // tune this to &quot;fudge&quot; the &quot;push away&quot; from the wall&#xD;&#xA;       static float k_bounceFudge = 1.1f;&#xD;&#xA;    &#xD;&#xA;       // normalize input, but keep track of original size&#xD;&#xA;       float inputLength = input.GetLength();&#xD;&#xA;       input.Scale(1.0f / inputLength);&#xD;&#xA;    &#xD;&#xA;       float dot = DotProduct(input, normal);&#xD;&#xA;       &#xD;&#xA;       if (dot &lt; 0)&#xD;&#xA;       {&#xD;&#xA;          // we're not running into the wall&#xD;&#xA;          return input;&#xD;&#xA;       }&#xD;&#xA;       else if (dot &lt; k_runningIntoWallThreshold)&#xD;&#xA;       {&#xD;&#xA;          Vector intoWall = normal.Scale(dot);&#xD;&#xA;          intoWall.Scale(k_bounceFudge);&#xD;&#xA;    &#xD;&#xA;          Vector alongWall = (input - intoWall).Normalize();&#xD;&#xA;          alongWall.Scale(inputLength);&#xD;&#xA;    &#xD;&#xA;          return alongWall;&#xD;&#xA;       }&#xD;&#xA;       else&#xD;&#xA;       {&#xD;&#xA;          // we ran &quot;straight into the wall&quot;&#xD;&#xA;          return Vector(0, 0, 0);&#xD;&#xA;       }&#xD;&#xA;    }" />
  <row Id="7998" PostHistoryTypeId="2" PostId="4066" RevisionGUID="78de81be-a8e4-4d3c-a140-cd885af3a21a" CreationDate="2010-09-23T19:55:54.197" UserId="2261" Text="If players spend point to attack other players, and points are limited, the obvious abuse seems to me to be to create multiple accounts.&#xD;&#xA;&#xD;&#xA;If you successfully manage to limit people to a single account, then the issue with bots to me would be that under your system people can fire them off when they are asleep or at work.&#xD;&#xA;&#xD;&#xA;So given the constraints:&#xD;&#xA;(1) no advantage for bots&#xD;&#xA;(2) reward people for logging in multiple times per day&#xD;&#xA;&#xD;&#xA;It seems to me the ideal thing is to cap the number of actions they can use during a day to some reasonable number.&#xD;&#xA;&#xD;&#xA;E.g. you might decide that someone could reasonably log in multiple times over an 8 hour period, and tweak the system appropriately.&#xD;&#xA;Or someone might check it before they go to school/work in the morning, check it when they get home, check it again after dinner, and check it before going to bed.&#xD;&#xA;&#xD;&#xA;Determine what your 'ideal' user is doing, and then make the point system reward that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'd build a system that rewarded spending a chunk of points all in one go.  To do this I'd have a variable recharge rate on the points.  Every time you spend points, the recharge time to get the next point increases... so if a bot is spending points as fast as they get them, it will take longer and longer to get the next one, whereas if a person spends all the point they accumulated overnight before leaving the house in the morning, they will have got them all back by the time they get home from work/school (8-12 hours later).&#xD;&#xA;" />
  <row Id="7999" PostHistoryTypeId="5" PostId="4060" RevisionGUID="bea8c8c6-300d-406f-894e-e073da72bb09" CreationDate="2010-09-23T20:09:48.823" UserId="1597" Comment="Code formatting and renamed variables as per suggestion in comments." Text="Just project your vector of motion onto the plane normal and then subtract the result from your vector of motion.&#xD;&#xA;&#xD;&#xA;    Vector undesiredMotion = normal * (dotProduct(input, normal));&#xD;&#xA;    Vector desiredMotion = input - undesiredMotion;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something like that anyway. Although in your lovely diagram the input seems to be away from the wall so I'm slightly confused. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="8000" PostHistoryTypeId="5" PostId="4059" RevisionGUID="94073a1c-2c2f-4dfa-aa88-4f639ef92456" CreationDate="2010-09-23T20:44:33.727" UserId="119" Comment="added 247 characters in body; added 155 characters in body" Text="[1]: http://i.stack.imgur.com/cAxy1.jpg&#xD;&#xA;&#xD;&#xA;![diagram][1]&#xD;&#xA;&#xD;&#xA;I'm making an isometric game. When the player tries to walk diagonally into a wall I want them to slide smoothly across it, so whatever portion of the movement would be legal is used, and anything in the direction of the normal is thrown away. Walls can be any angle, not just vertical or horizontal, and the player has 360 motion.&#xD;&#xA;&#xD;&#xA;I feel like I'm almost there but I can't put the last piece into place.&#xD;&#xA;&#xD;&#xA;Update: great news everyone! I have it working. But... I'm a bit confused what I should be normalising and what not. The normal just needs to be a unit vector, right? but then I'm mixing that with my input so I'm normalising that - am I wrong?&#xD;&#xA;&#xD;&#xA;By the way, I have also found that I need to push the player 1 pixel in the direction of the normal, so that they don't get stuck on things - works well.&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="8003" PostHistoryTypeId="2" PostId="4069" RevisionGUID="4b69846e-dd64-4843-a08b-caa6cb7a2437" CreationDate="2010-09-23T21:52:11.630" UserId="1232" Text="To answer question 3, check this out:&#xD;&#xA;http://flashgamelicense.com/&#xD;&#xA;&#xD;&#xA;This site hosts developers and sponsors. Developers submit a tender for offers from sponsors and sponsors in turn bid on your game. At the end of bidding, you choose the offer that best matches your desired terms (cash vs. terms of offer). Sponsors typically then get a license to use your game on their advertising website.&#xD;&#xA;&#xD;&#xA;The author of Steambirds used this model pretty effectively, and describes his experiences with the process here: http://www.andymoore.ca/2010/03/steambirds-by-the-numbers/&#xD;&#xA;" />
  <row Id="8004" PostHistoryTypeId="2" PostId="4070" RevisionGUID="6f3cd2c2-53c5-4c02-b2cd-213f7646d380" CreationDate="2010-09-23T22:30:34.827" UserId="2188" Text="I'd never bother to play a game that demands captchas: they are really a terrible practice that should be avoided.&#xD;&#xA;&#xD;&#xA;Your game seems to have deeper problems than that anyway: ideally a game should give no advantage to a stupid bot, so that it would be pointless to use a stupid bot in the first place. If you cannot achieve that, that's a design problem that will have no real solution, only more-or-less valid workarounds.&#xD;&#xA;&#xD;&#xA;*With &quot;stupid bot&quot; I mean bots that do not take any meaningful decision and instead just &quot;farm&quot; (that's what happens here). Smart bots (such as aim-bots or chess playing bots) are a completely different matter.*&#xD;&#xA;&#xD;&#xA;Still, assuming you are comfortable with the idea of making a design-flawed game, there is still room for improvements.&#xD;&#xA;&#xD;&#xA;Accept the fact that you can't stop a really determined bot and instead focus on the only thing you can do: make it useless to use a bot. If people have no reason to use a bot... they won't use them (and if they do anyway it won't matter).&#xD;&#xA;&#xD;&#xA;A possible solution is to allow one login per week instead of one per day. If people will forget to login for more then a week, they are unlikely to be really interested in playing anyway, so they won't be using bots to keep gaining credits. If, on the other hand, there is someone so screwed that makes a bot that logs once a week and then comes back three months later to attack random people, well, you have just found someone so determined that would have cracked you anyway, whatever system you chose (unless you chose a non-flawed system, of course)." />
  <row Id="8005" PostHistoryTypeId="5" PostId="4070" RevisionGUID="fdf82b95-b3bd-4179-b1c7-c26875b86785" CreationDate="2010-09-23T22:35:43.970" UserId="2188" Comment="ps" Text="I'd never bother to play a game that demands captchas: they are really a terrible practice that should be avoided.&#xD;&#xA;&#xD;&#xA;Your game seems to have deeper problems than that anyway: ideally a game should give no advantage to a stupid bot, so that it would be pointless to use a stupid bot in the first place. If you cannot achieve that, that's a design problem that will have no real solution, only more-or-less valid workarounds.&#xD;&#xA;&#xD;&#xA;*With &quot;stupid bot&quot; I mean bots that do not take any meaningful decision and instead just &quot;farm&quot; (that's what happens here). Smart bots (such as aim-bots or chess playing bots) are a completely different matter.*&#xD;&#xA;&#xD;&#xA;Still, assuming you are comfortable with the idea of making a design-flawed game, there is still room for improvements.&#xD;&#xA;&#xD;&#xA;Accept the fact that you can't stop a really determined bot and instead focus on the only thing you can do: make it useless to use a bot. If people have no reason to use a bot... they won't use them (and if they do anyway it won't matter).&#xD;&#xA;&#xD;&#xA;A possible solution is to allow one login per week instead of one per day. If people will forget to login for more then a week, they are unlikely to be really interested in playing anyway, so they won't be using bots to keep gaining credits. If, on the other hand, there is someone so screwed that makes a bot that logs once a week and then comes back three months later to attack random people, well, you have just found someone so determined that would have cracked you anyway, whatever system you chose (unless you chose a non-flawed system, of course).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ps: don't make the mistake of putting more effort into working-around design flaws then actually solving them in the first place!" />
  <row Id="8006" PostHistoryTypeId="2" PostId="4071" RevisionGUID="cfea3583-35ed-49e0-b6c0-2fa1f0706bd5" CreationDate="2010-09-24T01:36:58.393" UserId="2262" Text="It depends on the language that you want to use. I have always liked the format of Java so I used the [jMonkeyEngine][1] to do this&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/" />
  <row Id="8007" PostHistoryTypeId="16" PostId="4071" RevisionGUID="cfea3583-35ed-49e0-b6c0-2fa1f0706bd5" CreationDate="2010-09-24T01:36:58.393" UserId="-1" />
  <row Id="8009" PostHistoryTypeId="2" PostId="4072" RevisionGUID="2b547bc6-7a32-4aa0-ad4a-270d69a7d949" CreationDate="2010-09-24T03:26:00.387" UserId="2156" Text="I wrote a post about embedding GameMonkey script to a game using DragonFire SDK here: &#xD;&#xA;[http://bit.ly/96vndP][1] Basically the idea is to expose your C\C++ functions to your chosen scripting language and use them from your script. In my tutorial, I exposed 2 functions from DragonFire SDK. At game start, I call onStart function from script and on update, I call onTimer function from script. &#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;  [1]: http://bit.ly/96vndP" />
  <row Id="8010" PostHistoryTypeId="2" PostId="4073" RevisionGUID="c4a1e62f-0cc6-4b50-b12a-f1829f841b84" CreationDate="2010-09-24T03:58:28.010" UserId="919" Text="I'm curious as my previous company is asking us (people who developed the game) on what to do to the game since it's no longer financially viable.&#xD;&#xA;&#xD;&#xA;My suggestion was to open source it so people can still enjoy the game at the same time it could at least be improved. &#xD;&#xA;&#xD;&#xA;But we did use a licensed Torque engine which was mostly recoded/reworked. Not sure if their license allows for the move though.&#xD;&#xA;&#xD;&#xA;(Also not sure if this is an appropriate question to ask here)" />
  <row Id="8011" PostHistoryTypeId="1" PostId="4073" RevisionGUID="c4a1e62f-0cc6-4b50-b12a-f1829f841b84" CreationDate="2010-09-24T03:58:28.010" UserId="919" Text="Does using an licensed game engine prevent you from open sourcing a defunct work?" />
  <row Id="8012" PostHistoryTypeId="3" PostId="4073" RevisionGUID="c4a1e62f-0cc6-4b50-b12a-f1829f841b84" CreationDate="2010-09-24T03:58:28.010" UserId="919" Text="&lt;engine&gt;&lt;open-source&gt;&lt;licensing&gt;" />
  <row Id="8013" PostHistoryTypeId="2" PostId="4074" RevisionGUID="0d4357da-5605-47b9-80ed-450323dbe174" CreationDate="2010-09-24T04:04:05.693" UserId="2156" Text="I use GameMonkey to script the game play and use the script from my C\C++ host game.&#xD;&#xA;I've got it working the script with my engine.&#xD;&#xA;But I have a question. In these engines like Torque, Unreal, Unity, etc. when you finally build the game, all the scripts are also compiled and you don't need to ship all the script source.&#xD;&#xA;&#xD;&#xA;How do I do that?&#xD;&#xA;Right now my engine needs GameMonkey source script to process the game logic.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="8014" PostHistoryTypeId="1" PostId="4074" RevisionGUID="0d4357da-5605-47b9-80ed-450323dbe174" CreationDate="2010-09-24T04:04:05.693" UserId="2156" Text="How to include compiled script in final game release instead of script source?" />
  <row Id="8015" PostHistoryTypeId="3" PostId="4074" RevisionGUID="0d4357da-5605-47b9-80ed-450323dbe174" CreationDate="2010-09-24T04:04:05.693" UserId="2156" Text="&lt;engine&gt;&lt;scripting&gt;" />
  <row Id="8016" PostHistoryTypeId="2" PostId="4075" RevisionGUID="0bdb7ea7-7188-45e5-85fb-19163a1b4540" CreationDate="2010-09-24T04:06:23.100" UserId="2156" Text="IMHO, may be you can open source TorqueScript game play code rather than the actual engine source." />
  <row Id="8018" PostHistoryTypeId="2" PostId="4076" RevisionGUID="047eac75-c17a-4feb-b7fd-3cb88f08c01f" CreationDate="2010-09-24T05:15:06.850" UserId="323" Text="Most likely not - I doubt Torque would want their engine to be open-sourced.&#xD;&#xA;&#xD;&#xA;For a real answer, read the license you signed when you bought the answer.&#xD;&#xA;&#xD;&#xA;For an even better answer, read the license, then hire a lawyer to read the license.&#xD;&#xA;&#xD;&#xA;What you may be able to do is distribute the Torque modifications as a patch. Anyone who has the engine source will be able to apply the patch and release a build. But, again, *consult a lawyer* before doing this." />
  <row Id="8019" PostHistoryTypeId="2" PostId="4077" RevisionGUID="43ed0ed9-bc7a-476f-ba81-89152c14362a" CreationDate="2010-09-24T07:23:12.877" UserId="891" Text="From the GameMonkey forum&#xD;&#xA;&#xD;&#xA;&gt; You want to gmMachine::CompileStringToLib() and later ExecuteLib(). You will want to do that  with SetDebugMode() disabled otherwise your source code will be included in the compiled library.&#xD;&#xA;&#xD;&#xA;[http://www.somedude.net/gamemonkey/forum/viewtopic.php?f=5&amp;t=555&amp;hilit=compile][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.somedude.net/gamemonkey/forum/viewtopic.php?f=5&amp;t=555&amp;hilit=compile" />
  <row Id="8020" PostHistoryTypeId="4" PostId="4074" RevisionGUID="4bb39698-1ba3-4992-be90-4bef4b152adc" CreationDate="2010-09-24T07:48:59.240" UserId="744" Comment="edited tags; edited title" Text="How to include compiled GameMonkey script in final game release instead of script source?" />
  <row Id="8021" PostHistoryTypeId="6" PostId="4074" RevisionGUID="4bb39698-1ba3-4992-be90-4bef4b152adc" CreationDate="2010-09-24T07:48:59.240" UserId="744" Comment="edited tags; edited title" Text="&lt;engine&gt;&lt;scripting&gt;&lt;release&gt;" />
  <row Id="8024" PostHistoryTypeId="6" PostId="4073" RevisionGUID="2fa4899a-b9d4-4788-8e41-44982f231373" CreationDate="2010-09-24T12:43:04.923" UserId="165" Comment="edited tags" Text="&lt;engine&gt;&lt;open-source&gt;&lt;legal&gt;&lt;licensing&gt;" />
  <row Id="8027" PostHistoryTypeId="2" PostId="4078" RevisionGUID="2e2d9066-e4aa-4a91-bcf3-60ef9431eeae" CreationDate="2010-09-24T13:11:44.600" UserId="1677" Text="Game objects as sets of components:&#xD;&#xA;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/  http://gameprogrammingpatterns.com/component.html&#xD;&#xA;&#xD;&#xA;Game engine as a set of components independently working with shared Data Storage:&#xD;&#xA;http://www.acims.arizona.edu/PUBLICATIONS/PDF/JeffPlummerMSthesis_wo_Appendix.pdf" />
  <row Id="8028" PostHistoryTypeId="16" PostId="4078" RevisionGUID="2e2d9066-e4aa-4a91-bcf3-60ef9431eeae" CreationDate="2010-09-24T13:11:44.600" UserId="-1" />
  <row Id="8029" PostHistoryTypeId="5" PostId="4078" RevisionGUID="30a9122f-f19e-47ab-b87e-66c1f38f3537" CreationDate="2010-09-24T13:18:42.967" UserId="1677" Comment="added 6 characters in body" Text="Game objects as sets of components:&#xD;&#xA;&#xD;&#xA;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/  &#xD;&#xA;http://gameprogrammingpatterns.com/component.html&#xD;&#xA;&#xD;&#xA;Game engine as a set of components independently working with shared Data Storage:&#xD;&#xA;&#xD;&#xA;http://www.acims.arizona.edu/PUBLICATIONS/PDF/JeffPlummerMSthesis_wo_Appendix.pdf" />
  <row Id="8041" PostHistoryTypeId="5" PostId="4042" RevisionGUID="a89f1d3e-2464-4e07-8376-1121f6508e10" CreationDate="2010-09-24T20:36:37.380" UserId="744" Comment="deleted 92 characters in body; edited tags; edited title" Text="If you like developing flash games just for fun, why not make money through them?&#xD;&#xA;There are different ways you can monetize your flash game:&#xD;&#xA;&#xD;&#xA;- **In Game Ads:** Some common examples:&#xD;&#xA; - [Mochi Ads][1]&#xD;&#xA; - [gamejacket][2]&#xD;&#xA; - [ad4game][3]&#xD;&#xA; - [CPMStar][4]&#xD;&#xA; - [InviziAds][5]&#xD;&#xA;- You can make money by **helping online gaming companies test and evaluate new games**. Many of those companies are seeking feedback and reviews of their newest games. &#xD;&#xA;- **Find a sponsor and license your game.** One of the quickest yet hardest ways to make money from the flash games you create is to find a website who is willing to sponsor them. With a single sponsorship, an individual can make anywhere from $1000-$7000 for a game.&#xD;&#xA;&#xD;&#xA;What are the best ads from these sites?&#xD;&#xA;&#xD;&#xA;If the game will be in social websites like Facebook and MySpace, will it still be useful to try other sites?&#xD;&#xA;&#xD;&#xA;Are there any other ways to earn money from a Flash game?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mochiads.com/&#xD;&#xA;  [2]: http://www.gamejacket.com/&#xD;&#xA;  [3]: http://www.ad4game.com/&#xD;&#xA;  [4]: http://www.cpmstar.com/&#xD;&#xA;  [5]: http://www.inviziads.com/" />
  <row Id="8042" PostHistoryTypeId="4" PostId="4042" RevisionGUID="a89f1d3e-2464-4e07-8376-1121f6508e10" CreationDate="2010-09-24T20:36:37.380" UserId="744" Comment="deleted 92 characters in body; edited tags; edited title" Text="Ways to earn money through Flash games" />
  <row Id="8043" PostHistoryTypeId="6" PostId="4042" RevisionGUID="a89f1d3e-2464-4e07-8376-1121f6508e10" CreationDate="2010-09-24T20:36:37.380" UserId="744" Comment="deleted 92 characters in body; edited tags; edited title" Text="&lt;flash&gt;&lt;monetization&gt;&lt;facebook&gt;&lt;free-to-play&gt;" />
  <row Id="8044" PostHistoryTypeId="2" PostId="4082" RevisionGUID="d4f5eb67-47b0-4f3a-ab8c-95d9fe7c02c0" CreationDate="2010-09-24T21:48:16.003" UserId="1829" Text="OGRE3D, IrrLicht, Horde3d, Panda3d.&#xD;&#xA;" />
  <row Id="8045" PostHistoryTypeId="16" PostId="4082" RevisionGUID="d4f5eb67-47b0-4f3a-ab8c-95d9fe7c02c0" CreationDate="2010-09-24T21:48:16.003" UserId="-1" />
  <row Id="8046" PostHistoryTypeId="2" PostId="4083" RevisionGUID="f5e18b65-fa3a-42b7-b9e2-2d913afc7bb0" CreationDate="2010-09-24T22:01:14.820" UserId="1829" Text="Well, I don't really what else to add to the question, since I don't really know what competitors have that OGRE doesn't.&#xD;&#xA;&#xD;&#xA;Of course I'm talking game rendering quality here, I don't really think there are very complicated programming stuff left, maybe AI...&#xD;&#xA;&#xD;&#xA;Since torchlight is the best game done with OGRE (I think), is it still a good solution for future games, whatever the 3D graphics technologies will be ?&#xD;&#xA;&#xD;&#xA;What prevents OGRE3D from not being the best engine ? (consoles excluded, since they used some specific graphic library, except the xbox360 maybe...)" />
  <row Id="8047" PostHistoryTypeId="1" PostId="4083" RevisionGUID="f5e18b65-fa3a-42b7-b9e2-2d913afc7bb0" CreationDate="2010-09-24T22:01:14.820" UserId="1829" Text="How viable ogre3d is for a commercial project ?" />
  <row Id="8048" PostHistoryTypeId="3" PostId="4083" RevisionGUID="f5e18b65-fa3a-42b7-b9e2-2d913afc7bb0" CreationDate="2010-09-24T22:01:14.820" UserId="1829" Text="&lt;ogre&gt;&lt;commercial&gt;" />
  <row Id="8049" PostHistoryTypeId="2" PostId="4084" RevisionGUID="419512c2-16fb-4682-a14b-79e48318d794" CreationDate="2010-09-24T22:57:05.433" UserId="891" Text="You need to define what you mean by best engine.  Ogre3D is strictly a Rendering Engine.  That point alone scares off a lot of would be game developers.&#xD;&#xA;&#xD;&#xA;Ogre3D does not have integrated collision, physics, networking, sound, scripting, etc.  Ogre3d is only the graphics part of a game engine.&#xD;&#xA;&#xD;&#xA;Ogre allows for easy integration with things like Nvidia Physx or Havok, etc but it is still up the developers to integrate the products.&#xD;&#xA;&#xD;&#xA;Another disadvantage to using Ogre is when you look at fully integrated game engines, Unity, Unreal, etc.  They have very nice in world editors designed for map makers, scripters, etc.&#xD;&#xA;&#xD;&#xA;It's a lot more upfront work to design something like that on top of everything else you will need to integrate to have a usable game engine to create something from.&#xD;&#xA;&#xD;&#xA;Ogre works well when the developer wants to be able to fully customize how they want their game engine.  What components they will have, which libraries they will use, etc.  This was the main idea behind why Ogre is and will always be a Rendering Engine." />
  <row Id="8050" PostHistoryTypeId="2" PostId="4085" RevisionGUID="dba0ee66-a3d9-4218-8738-0d5e895b6481" CreationDate="2010-09-24T23:52:33.203" UserId="1780" Text="Your license with the engine owner prevents you from open sourcing it, not the fact that you used or modified it.  Reading said license will confirm this.&#xD;&#xA;&#xD;&#xA;Another option would be to give it to Instant Action (the company that owns what was once known as Garage Games, who created Torque) and let them distribute it as a sample, or otherwise integrate your changes into their work.&#xD;&#xA;&#xD;&#xA;Console manufacturers explicitly disallow releasing code that uses their APIs to the public or to any non-licensed third parties, too, and I wouldn't be entirely surprised if Torque's license also forbade doing this with any of the code that you wrote." />
  <row Id="8057" PostHistoryTypeId="2" PostId="4088" RevisionGUID="822f5229-ec2c-4574-8772-dde5961b5654" CreationDate="2010-09-25T15:34:31.200" UserId="240" Text="I would say that the answer lies in your Torque license, which your company's legal department should read and base their decision on that.&#xD;&#xA;&#xD;&#xA;You could also just email the Torque folk (they're *quite* friendly!), explain what you want to do, and ask if they see any problems or can suggest a path that gets you what you want.&#xD;&#xA;&#xD;&#xA;This advice works in the abstract, too, and can be the answer for any question of the form &quot;does my XYZ license allow me to do FOO?&quot;" />
  <row Id="8058" PostHistoryTypeId="2" PostId="4089" RevisionGUID="ea23a1ec-e964-496f-82af-c9226de97922" CreationDate="2010-09-25T22:44:53.767" UserId="1829" Text="What about Mortal Selection ?&#xD;&#xA;No, it's a copy paste from natural selection.&#xD;&#xA;bleh." />
  <row Id="8059" PostHistoryTypeId="2" PostId="4090" RevisionGUID="fb92e3ce-75d2-446c-ae79-7d01dae47b7b" CreationDate="2010-09-26T01:46:03.663" UserId="2281" Text="Here's the situation.&#xD;&#xA;10 people decide to randomly give gifts to each other. Each person writes their name on a piece of paper and puts it in a hat. Then each person randomly draws a name from the hat to determine his secret friend. Each person walks over to the person he drew and holds their left hand in his right hand. What is the probability that the 10 people holding hands form a single continuous circle?" />
  <row Id="8060" PostHistoryTypeId="1" PostId="4090" RevisionGUID="fb92e3ce-75d2-446c-ae79-7d01dae47b7b" CreationDate="2010-09-26T01:46:03.663" UserId="2281" Text="How do you find the probability of a single continuous circle from 10 random names drawn from a hat?" />
  <row Id="8061" PostHistoryTypeId="3" PostId="4090" RevisionGUID="fb92e3ce-75d2-446c-ae79-7d01dae47b7b" CreationDate="2010-09-26T01:46:03.663" UserId="2281" Text="&lt;math&gt;" />
  <row Id="8063" PostHistoryTypeId="10" PostId="4090" RevisionGUID="bc940acf-e23d-404a-a525-307b3bc97d0d" CreationDate="2010-09-26T06:33:10.750" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Cyclops&quot;},{&quot;Id&quot;:187,&quot;DisplayName&quot;:&quot;Jason Kozak&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:101,&quot;DisplayName&quot;:&quot;Neverender&quot;},{&quot;Id&quot;:953,&quot;DisplayName&quot;:&quot;Gregory Weir&quot;}]" />
  <row Id="8065" PostHistoryTypeId="2" PostId="4091" RevisionGUID="20972969-98ae-4756-8f75-416d20fcb47e" CreationDate="2010-09-26T12:07:25.543" UserId="1829" Text="I know you asked for C++, but panda3d also works with C++, even if it's at first targeted to work with python. But it is a game engine, but whatever..." />
  <row Id="8066" PostHistoryTypeId="4" PostId="4042" RevisionGUID="1ba9e1c9-109e-4949-8ac1-14e187303704" CreationDate="2010-09-26T16:39:39.267" UserId="2167" Comment="edited title" Text="what's the best Ways to earn money through Flash games" />
  <row Id="8067" PostHistoryTypeId="5" PostId="480" RevisionGUID="2c45b693-026d-46f8-9793-4463f007dcab" CreationDate="2010-09-26T19:01:31.310" UserId="165" Comment="added 474 characters in body" Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4], plus commercial ones such as [Perforce][5]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;**For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.**&#xD;&#xA;&#xD;&#xA;Also, please list some brief details in your answer, about whether your VCS is free or commercial, distributed versus centralized, etc.&#xD;&#xA;&#xD;&#xA;*Update*: Found a nice article comparing two of the VCS below - apparently, [Git is MacGyver and Mercurial is Bond][6]. Well, I'm glad that's settled... And the author has a nice quote at the end:&#xD;&#xA;&#xD;&#xA;&gt; It’s OK to proselytize to those who&#xD;&#xA;&gt; have not switched to a distributed VCS&#xD;&#xA;&gt; yet, but trying to convert a Git user&#xD;&#xA;&gt; to Mercurial (or vice-versa) is a&#xD;&#xA;&gt; waste of everyone’s time and energy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/&#xD;&#xA;  [5]: http://www.perforce.com/&#xD;&#xA;  [6]: http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/" />
  <row Id="8068" PostHistoryTypeId="5" PostId="480" RevisionGUID="50d70a60-cd79-4cdd-bb08-02dc0b39e7f4" CreationDate="2010-09-26T19:08:20.563" UserId="165" Comment="added 235 characters in body" Text="There are a lot of [Version Control][1] systems available, including open-source ones such as [Subversion][2], [Git][3], and [Mercurial][4], plus commercial ones such as [Perforce][5]. How well do they support the process of game-development? What are the issues using VCS, with regard to non-text files (binary files), large projects, etc? What are solutions to these problems, if any?&#xD;&#xA;&#xD;&#xA;**For organization of Answers, let's try on a per-package basis. Update each package/Answer with your results.**&#xD;&#xA;&#xD;&#xA;Also, please list some brief details in your answer, about whether your VCS is free or commercial, distributed versus centralized, etc.&#xD;&#xA;&#xD;&#xA;*Update*: Found a nice article comparing two of the VCS below - apparently, [Git is MacGyver and Mercurial is Bond][6]. Well, I'm glad that's settled... And the author has a nice quote at the end:&#xD;&#xA;&#xD;&#xA;&gt; It’s OK to proselytize to those who&#xD;&#xA;&gt; have not switched to a distributed VCS&#xD;&#xA;&gt; yet, but trying to convert a Git user&#xD;&#xA;&gt; to Mercurial (or vice-versa) is a&#xD;&#xA;&gt; waste of everyone’s time and energy.  &#xD;&#xA;&#xD;&#xA;Especially since [Git and Mercurial's real enemy is Subversion][7]. Dang, it's a *code-eat-code* world out there in FOSS-land...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Version_control&#xD;&#xA;  [2]: http://subversion.apache.org/&#xD;&#xA;  [3]: http://git-scm.com/&#xD;&#xA;  [4]: http://mercurial.selenic.com/&#xD;&#xA;  [5]: http://www.perforce.com/&#xD;&#xA;  [6]: http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/&#xD;&#xA;  [7]: http://blog.bitquabit.com/2010/02/10/fightings-been-fun-and-all-its-time-shut-and-get-along/" />
  <row Id="8069" PostHistoryTypeId="2" PostId="4092" RevisionGUID="94c795f7-6b22-40d6-b200-587314104dcb" CreationDate="2010-09-26T19:55:37.563" UserId="2289" Text="I'm looking to develop a multitouch rhythm game in C#. So far, I've decided on several requirements for the game that must absolutely be present:  &#xD;&#xA;&#xD;&#xA;1) Unicode text display, without the characters being known beforehand (i.e. the displayed strings are not known at compile time, but entered in by the user).  &#xD;&#xA;2) Support for display of all the common image formats (PNG, JPG, BMP, GIF) and playback of various audio (MP3, WAV, OGG, FLAC) and video formats.  &#xD;&#xA;3) Full multitouch support (I'd like to support as many simultaneous inputs as the user's hardware allows).&#xD;&#xA;&#xD;&#xA;I had been fiddling with XNA, but I've found drawing arbitrary Unicode text with SpriteFonts difficult (it hates it when you try and load the entire CJK Unified set). In addition, I haven't found an easy way to load certain formats like Ogg Vorbis audio in XNA.&#xD;&#xA;&#xD;&#xA;So, with this in mind, I've started looking into using DirectX 10 via SlimDX. However, I'm very lost, and am unsure of how to start with it and if the features I need are even present in it. To top it off, SlimDX documentation seems to be very lacking, especially with me being new to game development. Which one of the two frameworks would be best for my goals?&#xD;&#xA;&#xD;&#xA;P.S.: Any references to starting game development with SlimDX (June 2010) would be very helpful as well, especially in relation to Direct2D, which what I'll most likely be using." />
  <row Id="8070" PostHistoryTypeId="1" PostId="4092" RevisionGUID="94c795f7-6b22-40d6-b200-587314104dcb" CreationDate="2010-09-26T19:55:37.563" UserId="2289" Text="XNA or SlimDX (DirectX 10) for multitouch rhythm game simulator" />
  <row Id="8071" PostHistoryTypeId="3" PostId="4092" RevisionGUID="94c795f7-6b22-40d6-b200-587314104dcb" CreationDate="2010-09-26T19:55:37.563" UserId="2289" Text="&lt;xna&gt;&lt;c#&gt;&lt;directx&gt;&lt;directx10&gt;&lt;slimdx&gt;" />
  <row Id="8072" PostHistoryTypeId="2" PostId="4093" RevisionGUID="e99edfe1-6d6c-42a3-b0dd-1a2e58b7194a" CreationDate="2010-09-26T19:58:16.520" UserId="2288" Text="In a 2d game, I have a basic camera class.  The guts of the class creates a transformation matrix that is later passed to the Begin() method of a SpriteBatch.  The transformation is done like this:&#xD;&#xA;&#xD;&#xA;        Transform = Matrix.Identity *&#xD;&#xA;                    Matrix.CreateTranslation(-Position.X, -Position.Y, 0) *&#xD;&#xA;                    Matrix.CreateTranslation(Origin.X, Origin.Y, 0) *&#xD;&#xA;                    Matrix.CreateScale(new Vector3(Scale, Scale, Scale));&#xD;&#xA;&#xD;&#xA;I'm trying to create an effect that zooms in on a specific point on the screen.  The issue is that the zoom/translation causes a strange &quot;swooping&quot; effect when applied.  For example, when the zoom is set to 1.0 and the current position is (0, 0), and I change these to 2.0 and (100, 200) over a 1 second interval, the camera appears to take a curved path to (100, 200).&#xD;&#xA;&#xD;&#xA;Here is my code to update the position / scale on each frame (I removed logic to determine when the transition is finished):&#xD;&#xA;&#xD;&#xA;            _positionTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;            _scaleTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;&#xD;&#xA;            Position = Vector2.Lerp(&#xD;&#xA;                _positionStart,&#xD;&#xA;                PositionDestination.Value,&#xD;&#xA;                (float)(_positionTimeElapsed / TransitionTimeMilliseconds));&#xD;&#xA;&#xD;&#xA;            Scale = (ScaleDestination.Value - _scaleStart)&#xD;&#xA;                 * (float)(_scaleTimeElapsed / TransitionTimeMilliseconds)&#xD;&#xA;                 + _scaleStart;&#xD;&#xA;&#xD;&#xA;I'm relatively confident that I'm missing something basic about Matrix math.  Does anyone know how to transition both position and scale simultaneously and have the camera appear to take a linear path to the destination?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8073" PostHistoryTypeId="1" PostId="4093" RevisionGUID="e99edfe1-6d6c-42a3-b0dd-1a2e58b7194a" CreationDate="2010-09-26T19:58:16.520" UserId="2288" Text="Zooming and panning a camera simultaneously causes a swooping effect" />
  <row Id="8074" PostHistoryTypeId="3" PostId="4093" RevisionGUID="e99edfe1-6d6c-42a3-b0dd-1a2e58b7194a" CreationDate="2010-09-26T19:58:16.520" UserId="2288" Text="&lt;2d&gt;&lt;c#&gt;&lt;math&gt;" />
  <row Id="8075" PostHistoryTypeId="2" PostId="4094" RevisionGUID="d5db39af-8958-4c2d-8e92-c1564cb357ca" CreationDate="2010-09-26T20:05:56.467" UserId="1248" Text="I have been working on a game for quite a while, and I am using Ogre3D for the rendering engine. It is getting to the point I need to move adjustable settings to a configuration file such as video settings/options, player keybindings, etc.&#xD;&#xA;&#xD;&#xA;I am using RapidXML for parsing and loading my scenes, but I am not sure this is the best way to go about doing configurations. As a long time fan of Valve games, I know there's are just a long list of settings, basically no grouping, just a list. Where as UT games do something like&#xD;&#xA;&#xD;&#xA;[VideoOptions]&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;[GameSettings]&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;Anyways, I am just wondering what the best way to go about this is." />
  <row Id="8076" PostHistoryTypeId="1" PostId="4094" RevisionGUID="d5db39af-8958-4c2d-8e92-c1564cb357ca" CreationDate="2010-09-26T20:05:56.467" UserId="1248" Text="Most Efficient way to read a Settings Configuration File" />
  <row Id="8077" PostHistoryTypeId="3" PostId="4094" RevisionGUID="d5db39af-8958-4c2d-8e92-c1564cb357ca" CreationDate="2010-09-26T20:05:56.467" UserId="1248" Text="&lt;game-design&gt;&lt;c++&gt;" />
  <row Id="8078" PostHistoryTypeId="2" PostId="4095" RevisionGUID="49275d5d-95fe-49c5-9765-74d96d3b015b" CreationDate="2010-09-26T20:52:24.417" UserId="1272" Text="This probably isn't the optimal solution, but I'm currently using Ogre's ConfigFile class ([here][1] is the API ref for it) for simple gfx/control/whatever config settings. Not a terribly robust solution, but it's worked fine for simple stuff.&#xD;&#xA;&#xD;&#xA;Its format is similar to the UT example you gave, for instance:&#xD;&#xA;&#xD;&#xA;    [GraphicsSettings]&#xD;&#xA;    Resolution=1024 x 768&#xD;&#xA;    Antialiasing=2&#xD;&#xA;    &#xD;&#xA;    [ControlSettings]&#xD;&#xA;    InvertLook=No&#xD;&#xA;    Sensitivity=2.0&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/docs/api/html/classOgre_1_1ConfigFile.html" />
  <row Id="8079" PostHistoryTypeId="4" PostId="4042" RevisionGUID="2274f3ad-0969-4cbc-9960-2b67ed1e4d51" CreationDate="2010-09-26T21:17:10.250" UserId="744" Comment="edited title" Text="Ways to earn money through Flash games" />
  <row Id="8080" PostHistoryTypeId="5" PostId="493" RevisionGUID="ba32f1d2-1117-4a9d-b79d-bcdeae36c21a" CreationDate="2010-09-26T22:09:59.077" UserId="189" Comment="fixed capitalization. Git is not an acronym, and if anything it may even be all lowercase (as it is spelled in the top left of the homepage)." Text="# [Git][1]  &#xD;&#xA;Recently I have been on the **Git** bandwagon (I've used SVN and Mercurial).  So far I really like what I get with Git. It is far from a pain to setup and more development tools are starting to adopt using it. &#xD;&#xA;&#xD;&#xA;It's a distributed version control system. This allows for us to have our own independent trunk-like area. I can work in my own area and invite you over to view changesets very easily. I can rollback in my own space without mucking up the central repo. I can commit, branch, and do everything you can do with SVN locally. I really like having this control. &#xD;&#xA;&#xD;&#xA;With SVN, you need access to your repo in order to commit. What if you're on the road or at a cafe with no internet? Not good.&#xD;&#xA;&#xD;&#xA;Sure, SVN is much simpler to learn but I think the advantages of distributed source control largely outweigh the fact that it has a little learning curve.&#xD;&#xA;&#xD;&#xA;I also like that it is smarter about merging. &#xD;&#xA;&#xD;&#xA;A major downside of GIT is that it stores the entire history locally. (Yes, you can perform surgery to cut that down, but it's the default behavior). It's not a problem at all for source files, but if you have a large project with gigabytes of asset data, it becomes a problem quickly. In my current experience, I'd recommend GIT only for smaller or source-only repos. &#xD;&#xA;&#xD;&#xA;If you're still curious about GIT, check out http://whygitisbetterthanx.com/ for some good information/metrics. Also check see https://git.wiki.kernel.org/index.php/GitSvnComparsion&#xD;&#xA;&#xD;&#xA;  [1]: http://git-scm.com/" />
  <row Id="8081" PostHistoryTypeId="2" PostId="4096" RevisionGUID="fc671583-b484-4475-a795-3ed9f3f0afe6" CreationDate="2010-09-27T02:08:19.987" UserId="2220" Text="All of these are pretty high level requirements you have. You may be answering your own questions in that SlimDX is intentionally very low-level, whereas XNA tries its best to answer these high-level requirements, even if the XNA answer isn't necessarily the answer that you particularly seem to be looking for. I haven't worked with SlimDX, so I can only provide some of the perspective of an XNA developer, but hopefully some of it will be useful.&#xD;&#xA;&#xD;&#xA;The better questions for XNA versus SlimDX more revolve around things like: which platforms are expecting to support? How much of DirectX do you know? How much of DirectX internals do you *care* to know?&#xD;&#xA;&#xD;&#xA;1) This is a large problem in program design, regardless of platform. There is a reason that text layout libraries are large monstrous beasts. If full, true Unicode support is that important to you, you are ultimately going to need to use non-game-oriented frameworks like WPF, Pango, etc. WPF and/or Silverlight may in fact be a better choice for your game than XNA or SlimDX. (SlimDX does appear to give low level access to the Windows Font API, but using it is rarely as straightforward as you might think and at the end of the day WPF is still Windows' best repository of handling code for dealing with complicated Unicode issues.)&#xD;&#xA;&#xD;&#xA;The XNA answer is that you need to find ways to cut down the amount of character graphics you load at once. Worst case that means that you write your own replacement for SpriteFont. (Writing a better SpriteFont isn't terribly hard, and to my knowledge you would need to do something like that in SlimDX anyway.) Most likely you find ways to partition and dynamically load SpriteFonts (that are each individually much smaller than, say, CJK Unified) as necessary at runtime. Certainly XNA doesn't have any direct samples to that effect, but you may find something in the community to help.&#xD;&#xA;&#xD;&#xA;The most common answer is really just to constrain your input set. Supporting all of Unicode is hard, but it is easy enough to find common subsets that should make most of your users happy. I'd suggest taking a look at the input methods in various games. You'll notice, for instance, that even in CJK modes something like the Xbox built-in keyboard is going to use just a fraction of CJK Unified... A game isn't a word processor and gamer probably isn't going to expect full unicode support at runtime.&#xD;&#xA;&#xD;&#xA;2) There are many .NET libraries that you can find to support various formats. Most of the image formats have good support in the standard library. Music and video formats can be trickier depending on how much you really need them (and which platforms you are looking to support). Again, taking good limits here can drastically simplify what it is that you are trying to accomplish.&#xD;&#xA;&#xD;&#xA;For instance, one strong available library in XNA is the MediaPlayer interface:&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.mediaplayer.aspx&#xD;&#xA;&#xD;&#xA;This API particularly allows you to interact with people's music libraries on the Xbox and Windows Phone 7 (and Zune). If you want people to provide their own music libraries, on those platforms, that is the API that you must use (there are no other options), and you are going to have to accept its limitations in format support. (Which most people will already be used to and have knowledge of if they are storing portions of the music libraries on those devices.)&#xD;&#xA;&#xD;&#xA;On Windows there are certainly many more options for libraries that you can make use of for format support. Finding these libraries are probably going to be the same research regardless of XNA or SlimDX.&#xD;&#xA;&#xD;&#xA;3) Multitouch is equally complicated in both XNA and SlimDX. XNA provides a useful multitouch API for Windows Phone 7 (and Zune HD):&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/ff434208.aspx&#xD;&#xA;&#xD;&#xA;Unfortunately the XNA multitouch API doesn't currently support Windows. On Windows with both XNA and SlimDX you will probably be using the same Windows multitouch API, which to my knowledge doesn't have a good, strong managed (C#) wrapper at all:&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/dd371406(VS.85).aspx&#xD;&#xA;&#xD;&#xA;There may be third party libraries that you can find, but again, that research will probably be the same regardless of what your framework game is built in." />
  <row Id="8082" PostHistoryTypeId="2" PostId="4097" RevisionGUID="ddb6d289-5bd2-4135-81fe-dd903d153b5e" CreationDate="2010-09-27T02:58:08.003" UserId="2156" Text="I'm looking for a C\C++ game dev framework that supports iPhone.&#xD;&#xA;It should have least Objective-C requirement to use it.&#xD;&#xA;&#xD;&#xA;The closest one I could find is Kanji engine.&#xD;&#xA;But that's not free.&#xD;&#xA;&#xD;&#xA;Other frameworks like cocos2d need to be code in obj-c.&#xD;&#xA;&#xD;&#xA;So do you know any C\C++ game dev framework for iPhone?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="8083" PostHistoryTypeId="1" PostId="4097" RevisionGUID="ddb6d289-5bd2-4135-81fe-dd903d153b5e" CreationDate="2010-09-27T02:58:08.003" UserId="2156" Text="Any free 2D C\C++ framework that supports iPhone?" />
  <row Id="8084" PostHistoryTypeId="3" PostId="4097" RevisionGUID="ddb6d289-5bd2-4135-81fe-dd903d153b5e" CreationDate="2010-09-27T02:58:08.003" UserId="2156" Text="&lt;c++&gt;&lt;iphone&gt;&lt;framework&gt;" />
  <row Id="8085" PostHistoryTypeId="2" PostId="4098" RevisionGUID="847405a2-8b35-42e7-beab-30dd63da71bc" CreationDate="2010-09-27T04:26:43.733" UserId="2196" Text="This might be of interest:&#xD;&#xA;http://code.google.com/p/oolongengine/" />
  <row Id="8086" PostHistoryTypeId="2" PostId="4099" RevisionGUID="f5ba3c8f-aaad-4613-8e6e-97d97f1a78fe" CreationDate="2010-09-27T05:21:01.903" UserId="2272" Text="Whether Ogre3d is the best or viable depends entirely on the type of game.  In the industry, what often happens is you use something like Ogre3d (or IdTech, or Source, or Unreal) as a starting point and build on it from there depending on your needs and requirements.&#xD;&#xA;&#xD;&#xA;For instance, compare a game like GTA IV to Modern Warfare 2.  The rendering requirements are completely different.  &#xD;&#xA;&#xD;&#xA;GTA IV has a day-night cycle, a weather system, fast moving vehicles, tons of light sources from cars to street lamps, a lot of animated actors on the screen, and it's an huge open world.  GTA IV runs around 30hz and the gameplay is such that some input lag is tolerable.&#xD;&#xA;&#xD;&#xA;MW2 is an fps with few vehicles, lots of explosions and screen effects, relatively few actors on screen, textures that your camera can go right up against, and a mostly predictable path through a pretty small world.  MW2 runs at 60hz and input lag severely impacts gameplay.&#xD;&#xA;&#xD;&#xA;It's impossible to make a rendering engine that's optimal for both kinds of games.&#xD;&#xA;&#xD;&#xA;Ogre3d could be a good starting point for what you're trying to do, but as Ranieri said, don't be afraid to get your hands dirty." />
  <row Id="8087" PostHistoryTypeId="5" PostId="4092" RevisionGUID="8ea745c4-99c5-4ebf-b46d-ad731b401b6e" CreationDate="2010-09-27T06:00:49.140" UserId="2289" Comment="added 44 characters in body" Text="I'm looking to develop a multitouch rhythm game in C#. So far, I've decided on several requirements for the game that should be present:  &#xD;&#xA;&#xD;&#xA;1) Unicode text display, without the characters being known beforehand (i.e. the displayed strings are not known at compile time, but entered in by the user).  &#xD;&#xA;2) Support for display of all the common image formats (PNG, JPG, BMP, GIF) and playback of various audio (MP3, WAV, OGG, FLAC) and video formats.  &#xD;&#xA;3) Full multitouch support (I'd like to support as many simultaneous inputs as the user's hardware allows). **VERY IMPORTANT, MUCH MORE SO THAN THE OTHER TWO.**&#xD;&#xA;&#xD;&#xA;I had been fiddling with XNA, but I've found drawing arbitrary Unicode text with SpriteFonts difficult (it hates it when you try and load the entire CJK Unified set). In addition, I haven't found an easy way to load certain formats like Ogg Vorbis audio in XNA.&#xD;&#xA;&#xD;&#xA;So, with this in mind, I've started looking into using DirectX 10 via SlimDX. However, I'm very lost, and am unsure of how to start with it and if the features I need are even present in it. To top it off, SlimDX documentation seems to be very lacking, especially with me being new to game development. Which one of the two frameworks would be best for my goals?&#xD;&#xA;&#xD;&#xA;P.S.: Any references to starting game development with SlimDX (June 2010) would be very helpful as well, especially in relation to Direct2D, which what I'll most likely be using." />
  <row Id="8088" PostHistoryTypeId="2" PostId="4100" RevisionGUID="1caf93b9-37f5-4726-8f80-cf575a8f81c2" CreationDate="2010-09-27T07:39:23.780" UserId="1047" Text="From what i know m4a and aac are the same thing with mp4 allowing video while the former only allows audio.&#xD;&#xA;&#xD;&#xA;Whats the difference between vorbis ogg and m4a? I looked it up and it seems that m4a/aac are patent free. What are reasons i may want to choose one from the other?&#xD;&#xA;&#xD;&#xA;Assume source will always be lossless (wav/aiff/flac) and i am choosing the encoding to distribute with my game/demo" />
  <row Id="8089" PostHistoryTypeId="1" PostId="4100" RevisionGUID="1caf93b9-37f5-4726-8f80-cf575a8f81c2" CreationDate="2010-09-27T07:39:23.780" UserId="1047" Text="Difference between Vorbis OGG and M4A/MP4/AAC?" />
  <row Id="8090" PostHistoryTypeId="3" PostId="4100" RevisionGUID="1caf93b9-37f5-4726-8f80-cf575a8f81c2" CreationDate="2010-09-27T07:39:23.780" UserId="1047" Text="&lt;audio&gt;&lt;ogg-vorbis&gt;" />
  <row Id="8091" PostHistoryTypeId="5" PostId="3392" RevisionGUID="444e0b50-ded8-4a4f-8838-d4c43b67612a" CreationDate="2010-09-27T08:57:02.000" UserId="1279" Comment="Made link href URL" Text="At first glance many consoles support the same OpenGL-like interface where you throw triangles at the hardware and it figures out how to do it best. In real life each hardware has been optimized for certain uses and modifying *how* you throw your triangles at it can make a difference.&#xD;&#xA;&#xD;&#xA;For instance, the iPhone uses a deferred tile renderer, where the driver collects triangles until a certain limit, then renders them in small tiles (see http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html). For the iPhone you should research building texture atlases, since texture unit switches are not free. You can also disable the depth buffer and also lower the graphic resolution from 32bit to 16bit to reduce memory consumption.&#xD;&#xA;&#xD;&#xA;I've heard that Gameboy-like hardware uses a more explicit tile renderer which you have to get at it at the low level to get good performance and is hard to do properly. PS3 consoles are multi-core, so there your algorithms work best if you are able to parallelize your load, I wonder how the PSP does in comparison, apparently it's between PS1 and PS2 tech level.&#xD;&#xA;&#xD;&#xA;Then there are OpenGL characteristics which may be used, abused or underutilized. In the case of the iPhone one would be Vertex Buffer Objects, advertised as the best thing since sliced bread, but in practice worthless ([http://www.idealbinary.com/ib/blog/kevin/2010/1/12/iphone-opengl-es-performance](http://www.idealbinary.com/ib/blog/kevin/2010/1/12/iphone-opengl-es-performance)). Again, from personal experience I found that the iPhone hardware is very much bandwidth limited. If you want to darken the screen, you could create a sprite the whole size of the screen with translucency and blit it on the screen. Don't do it! It's better to create a smallish 4x4 sprite and let the hardware stretch it to the full size. The hardware has less pixels to read from the source, and that is faster than the stretching operation itself, which would be slow to do in software.&#xD;&#xA;&#xD;&#xA;Long ago I played with GPX2 hardware but not at the lower level, so I don't know about more mobile consoles. But most definitely, each mobile platform can use fine tuning, so unless you specify more your question it is going to be tough to answer it." />
  <row Id="8092" PostHistoryTypeId="2" PostId="4101" RevisionGUID="1add8d62-1e30-446e-becc-1d870ce6c12a" CreationDate="2010-09-27T09:00:56.787" UserId="2220" Text="Ogg Vorbis is soup-to-nuts Open Source. Every bit of the Ogg Vorbis specification is available and there are no known patents that apply to Ogg Vorbis. It is often free and easy to work with. (That is, if your platform/framework of choice supports working with it. For instance, XNA/XACT don't support Vorbis, but if you are using XACT you will be giving it your lossless files anyway and using its built-in compression.)&#xD;&#xA;&#xD;&#xA;AAC is the product of a working group of corporations with several commercial goals in mind. M4A/AAC is not patent-free, it is patent encumbered:&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Advanced_Audio_Coding#Licensing_and_patents&#xD;&#xA;&#xD;&#xA;You don't need to pay patent royalties to use AAC files as a consumer, but if you were to deploy an AAC codec, for instance as a library dependency in a game, you may need to get a patent license and pay for it. (I am not a lawyer. You should talk to a lawyer.) That said, many platforms that you might be working on may already have an existing codec in place. XNA supports AAC in many places, and so does many Apple libraries, as two examples. Developing a cross-platform game with AAC is a bit more difficult (and you may want a lawyer involved).&#xD;&#xA;&#xD;&#xA;In terms of &quot;quality&quot;, just about every music codec out there is sufficient at a high enough bit-rate. In my experience the &quot;good&quot; bit-rates for normal music listening for Ogg Vorbis and AAC are reasonably similar. I think Ogg Vorbis is a good format and certainly a useful one when you need something open source and free as in beer and speech. (I have a good chunk of my personal music library in Ogg Vorbis, in fact. I like supporting strong open source efforts when I can.)" />
  <row Id="8093" PostHistoryTypeId="2" PostId="4102" RevisionGUID="7616a7bc-7989-4843-9610-3986c2e803b9" CreationDate="2010-09-27T09:03:18.857" UserId="1279" Text="[Allegro](http://alleg.sourceforge.net/) is a C/C++ 2D cross-platform programming library. They don't mention iPhone as a supported platform on the website, but it appears there in [the recent changelog](http://alleg.sourceforge.net/changes.html), so probably you can grab the development version and find something useful there." />
  <row Id="8094" PostHistoryTypeId="5" PostId="4093" RevisionGUID="4e0478be-3e65-44d2-b3e5-a0b92afca7cd" CreationDate="2010-09-27T09:34:32.390" UserId="2288" Comment="added 86 characters in body" Text="In a 2d game, I have a basic camera class.  The guts of the class creates a transformation matrix that is later passed to the Begin() method of a SpriteBatch.  The transformation is done like this (ScreenCenter is the center of the view port):&#xD;&#xA;&#xD;&#xA;        Origin = ScreenCenter / Scale;&#xD;&#xA;        Transform = Matrix.Identity *&#xD;&#xA;                    Matrix.CreateTranslation(-Position.X, -Position.Y, 0) *&#xD;&#xA;                    Matrix.CreateTranslation(Origin.X, Origin.Y, 0) *&#xD;&#xA;                    Matrix.CreateScale(new Vector3(Scale, Scale, Scale));&#xD;&#xA;&#xD;&#xA;I'm trying to create an effect that zooms in on a specific point on the screen.  The issue is that the zoom/translation causes a strange &quot;swooping&quot; effect when applied.  For example, when the zoom is set to 1.0 and the current position is (0, 0), and I change these to 2.0 and (100, 200) over a 1 second interval, the camera appears to take a curved path to (100, 200).&#xD;&#xA;&#xD;&#xA;Here is my code to update the position / scale on each frame (I removed logic to determine when the transition is finished):&#xD;&#xA;&#xD;&#xA;            _positionTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;            _scaleTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;&#xD;&#xA;            Position = Vector2.Lerp(&#xD;&#xA;                _positionStart,&#xD;&#xA;                PositionDestination.Value,&#xD;&#xA;                (float)(_positionTimeElapsed / TransitionTimeMilliseconds));&#xD;&#xA;&#xD;&#xA;            Scale = (ScaleDestination.Value - _scaleStart)&#xD;&#xA;                 * (float)(_scaleTimeElapsed / TransitionTimeMilliseconds)&#xD;&#xA;                 + _scaleStart;&#xD;&#xA;&#xD;&#xA;I'm relatively confident that I'm missing something basic about Matrix math.  Does anyone know how to transition both position and scale simultaneously and have the camera appear to take a linear path to the destination?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8095" PostHistoryTypeId="5" PostId="4093" RevisionGUID="fb8a00f6-55f8-4936-b027-efc6a22e2262" CreationDate="2010-09-27T09:52:36.320" UserId="2288" Comment="added 275 characters in body" Text="In a 2d game, I have a basic camera class.  The guts of the class creates a transformation matrix that is later passed to the Begin() method of a SpriteBatch.  The transformation is done like this:&#xD;&#xA;&#xD;&#xA;            Transform = Matrix.Identity *&#xD;&#xA;                        Matrix.CreateTranslation(-Position.X, -Position.Y, 0) *&#xD;&#xA;                        Matrix.CreateScale(new Vector3(Scale, Scale, Scale)) *&#xD;&#xA;                        Matrix.CreateTranslation(ScreenCenter.X, ScreenCenter.Y, 0);&#xD;&#xA;&#xD;&#xA;I'm trying to create an effect that zooms in on a specific point on the screen.  The issue is that the zoom/translation causes a strange &quot;swooping&quot; effect when applied.  For example, when the zoom is set to 1.0 and the current position is (0, 0), and I change these to 2.0 and (100, 200) over a 1 second interval, the camera appears to take a curved path to (100, 200).&#xD;&#xA;&#xD;&#xA;Here is my code to update the position / scale on each frame (I removed logic to determine when the transition is finished):&#xD;&#xA;&#xD;&#xA;            _positionTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;            _scaleTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;&#xD;&#xA;            Position = Vector2.Lerp(&#xD;&#xA;                _positionStart,&#xD;&#xA;                PositionDestination.Value,&#xD;&#xA;                (float)(_positionTimeElapsed / TransitionTimeMilliseconds));&#xD;&#xA;&#xD;&#xA;            Scale = (ScaleDestination.Value - _scaleStart)&#xD;&#xA;                 * (float)(_scaleTimeElapsed / TransitionTimeMilliseconds)&#xD;&#xA;                 + _scaleStart;&#xD;&#xA;&#xD;&#xA;I'm relatively confident that I'm missing something basic about Matrix math.  Does anyone know how to transition both position and scale simultaneously and have the camera appear to take a linear path to the destination?&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;Removed the &quot;Origin&quot; variable and replaced it with the unscaled ScreenCenter Vector2, which is the number of pixels from the top left of the view port to the center of the view port.  Makes it clear what all of the variables going into the calculation actually are.  This yields identical results to the original version." />
  <row Id="8098" PostHistoryTypeId="2" PostId="4104" RevisionGUID="19dffcba-e7f9-455f-a85d-00fabbf83265" CreationDate="2010-09-27T10:29:26.060" UserId="1887" Text="You may also be interested in [Boost.PropertyTree][1]. It let's you access properties in a hierarchical manner, e.g. `settings.get&lt;int&gt;(&quot;Graphics.Resolution.Width&quot;)`. The are parsers/loaders available for XML, JSON, and more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://beta.boost.org/doc/libs/1_44_0/doc/html/property_tree.html" />
  <row Id="8099" PostHistoryTypeId="2" PostId="4105" RevisionGUID="5e8c24c9-f05c-4c57-83f5-c5bb6972a17a" CreationDate="2010-09-27T11:12:20.150" UserId="1742" Text="Your swooping effect is because there is no stationary pixel during the interpolation. In a dolly and pan, there will be a point (a line actually) that doesn't change in appearance other than mip level.&#xD;&#xA;&#xD;&#xA;You're using a zoom/scale, and because of this you're suffering from an accelerated scale problem, if you tried going from 2.0 to 0.1, then it would become more obvious why this was a non-linear operation.&#xD;&#xA;&#xD;&#xA;You need to consider the zoom as it's inverse, then this goes away.&#xD;&#xA;at half-way, your zoom is 1.5, but if you took the inverse of your zoom (1.0 -&gt; 0.5 instead of 1.0 to 2.0), then half-way becomes 1.3333 (1.0/0.75), which actually gives you the zoom you want at that part of your linear interpolation across space (the 0,0 to 100,200)." />
  <row Id="8100" PostHistoryTypeId="2" PostId="4106" RevisionGUID="51bc2f14-b3fd-4244-965c-25d0f133c185" CreationDate="2010-09-27T11:35:55.910" UserId="2297" Text="I've used [cocos2D][1] on a project. It's pretty neat and easy to understand.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/" />
  <row Id="8101" PostHistoryTypeId="16" PostId="4098" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-27T13:27:42.413" UserId="14" />
  <row Id="8102" PostHistoryTypeId="16" PostId="4102" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-27T13:27:42.413" UserId="14" />
  <row Id="8103" PostHistoryTypeId="16" PostId="4106" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-27T13:27:42.413" UserId="14" />
  <row Id="8104" PostHistoryTypeId="16" PostId="4097" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-27T13:27:42.413" UserId="14" />
  <row Id="8105" PostHistoryTypeId="2" PostId="4107" RevisionGUID="38f26858-5ea7-4cdb-a242-6d5efb810c0c" CreationDate="2010-09-27T14:37:32.280" UserId="1934" Text="I'm trying to figure out a way to write a save/load system for my game in C++. As of right now, I'm doing it all using binary flags. Anyone got a clue on how to do it another way? I don't mind using binary, but I want to know my options. I also want something in which it would be easy to check on the status of just one event being complete or incomplete in order to decide certain things (a lot of the items system in this game is dependent on what the player has or has not done throughout the course of the game)." />
  <row Id="8106" PostHistoryTypeId="1" PostId="4107" RevisionGUID="38f26858-5ea7-4cdb-a242-6d5efb810c0c" CreationDate="2010-09-27T14:37:32.280" UserId="1934" Text="How can I write a Save/Load system for my game?" />
  <row Id="8107" PostHistoryTypeId="3" PostId="4107" RevisionGUID="38f26858-5ea7-4cdb-a242-6d5efb810c0c" CreationDate="2010-09-27T14:37:32.280" UserId="1934" Text="&lt;c++&gt;&lt;best-practices&gt;&lt;loading&gt;&lt;file&gt;" />
  <row Id="8108" PostHistoryTypeId="2" PostId="4108" RevisionGUID="60d5134b-98ef-4a9c-becc-96ad9256c99f" CreationDate="2010-09-27T14:47:49.683" UserId="2300" Text="Can someone suggest papers or algorithms about calculating shortest paths in Euclidean spaces with non-convex polygon as obstacles ?&#xD;&#xA;&#xD;&#xA;thanks" />
  <row Id="8109" PostHistoryTypeId="1" PostId="4108" RevisionGUID="60d5134b-98ef-4a9c-becc-96ad9256c99f" CreationDate="2010-09-27T14:47:49.683" UserId="2300" Text="How to compute the shortest path in Euclidean enviroments with non-convex polygons" />
  <row Id="8110" PostHistoryTypeId="3" PostId="4108" RevisionGUID="60d5134b-98ef-4a9c-becc-96ad9256c99f" CreationDate="2010-09-27T14:47:49.683" UserId="2300" Text="&lt;path-finding&gt;" />
  <row Id="8111" PostHistoryTypeId="5" PostId="4092" RevisionGUID="084b044b-247b-4e8d-aa5e-db61601d8485" CreationDate="2010-09-27T16:02:23.923" UserId="2289" Comment="added 119 characters in body" Text="I'm looking to develop a multitouch rhythm game in C#. It is aimed to be a simulator for an existing arcade game, similar to this: http://www.youtube.com/watch?v=TAiNNpA3wwg So far, I've decided on several requirements for the game that should be present:  &#xD;&#xA;&#xD;&#xA;1) Unicode text display, without the characters being known beforehand (i.e. the displayed strings are not known at compile time, but entered in by the user).  &#xD;&#xA;2) Support for display of all the common image formats (PNG, JPG, BMP, GIF) and playback of various audio (MP3, WAV, OGG, FLAC) and video formats.  &#xD;&#xA;3) Full multitouch support (I'd like to support as many simultaneous inputs as the user's hardware allows). **VERY IMPORTANT, MUCH MORE SO THAN THE OTHER TWO.**&#xD;&#xA;&#xD;&#xA;I had been fiddling with XNA, but I've found drawing arbitrary Unicode text with SpriteFonts difficult (it hates it when you try and load the entire CJK Unified set). In addition, I haven't found an easy way to load certain formats like Ogg Vorbis audio in XNA.&#xD;&#xA;&#xD;&#xA;So, with this in mind, I've started looking into using DirectX 10 via SlimDX. However, I'm very lost, and am unsure of how to start with it and if the features I need are even present in it. To top it off, SlimDX documentation seems to be very lacking, especially with me being new to game development. Which one of the two frameworks would be best for my goals?&#xD;&#xA;&#xD;&#xA;P.S.: Any references to starting game development with SlimDX (June 2010) would be very helpful as well, especially in relation to Direct2D, which what I'll most likely be using." />
  <row Id="8112" PostHistoryTypeId="2" PostId="4109" RevisionGUID="497f78f9-986e-47b9-96b1-277bd054aaa2" CreationDate="2010-09-27T16:40:30.970" UserId="370" Text="##[Angel Engine][1]&#xD;&#xA;&#xD;&#xA;I don't know that the stable version supports iPhone yet, but it does support Mac OSX.  There is a development branch thats specifically to enable iPhone support.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/" />
  <row Id="8113" PostHistoryTypeId="16" PostId="4109" RevisionGUID="497f78f9-986e-47b9-96b1-277bd054aaa2" CreationDate="2010-09-27T16:40:30.970" UserId="-1" />
  <row Id="8114" PostHistoryTypeId="2" PostId="4110" RevisionGUID="ce3daed8-e7c8-45df-8fb8-c446b4441e94" CreationDate="2010-09-27T18:18:53.860" UserId="1232" Text="Airplay SDK works well.&#xD;&#xA;&#xD;&#xA;  http://www.airplaysdk.com/&#xD;&#xA;&#xD;&#xA;I've used it with the express edition of Visual Studio. It comes with a decent emulator for windows too, and supports more than just iPhone platform:&#xD;&#xA;&#xD;&#xA;* iPhone OS&#xD;&#xA;* Android&#xD;&#xA;* Samsung Bada&#xD;&#xA;* Symbian&#xD;&#xA;* Windows Mobile&#xD;&#xA;* BREW&#xD;&#xA;* Palm/HP webOS&#xD;&#xA;* Maemo&#xD;&#xA;&#xD;&#xA;.. it also has pretty generous Indie licensing terms. $99 per seat/year if you earn &lt; $100k per year.&#xD;&#xA;&#xD;&#xA;http://www.airplaysdk.com/licensing_details&#xD;&#xA;" />
  <row Id="8115" PostHistoryTypeId="16" PostId="4110" RevisionGUID="ce3daed8-e7c8-45df-8fb8-c446b4441e94" CreationDate="2010-09-27T18:18:53.860" UserId="-1" />
  <row Id="8116" PostHistoryTypeId="2" PostId="4111" RevisionGUID="44db0e6b-bc46-4ff7-b524-215dbc5d8b1b" CreationDate="2010-09-27T18:47:35.710" UserId="10" Text="You could [serialize the class][1] or the data to a flat file and then [read it back when you load.][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.java2s.com/Tutorial/Cpp/0240__File-Stream/savespersonobjecttodisk.htm&#xD;&#xA;  [2]: http://www.java2s.com/Tutorial/Cpp/0240__File-Stream/Readpersonobjectfromdisk.htm" />
  <row Id="8117" PostHistoryTypeId="2" PostId="4112" RevisionGUID="431b2d13-55ff-430a-9b7a-108c29ed3869" CreationDate="2010-09-27T19:00:54.033" UserId="2289" Text="Serialization would be the way to go, and as for the status-checking, you could have logic in the deserializtion method to do so." />
  <row Id="8118" PostHistoryTypeId="2" PostId="4113" RevisionGUID="11cac891-b081-4793-a8f8-0b159d137f30" CreationDate="2010-09-27T19:04:27.553" UserId="2268" Text="I've studied the DOOM source code a bit. I'll tell you how it's done in there.&#xD;&#xA;&#xD;&#xA;D_DoomMain contains all of the open/save/load functions, as well as a slew of other things. As it says at the beginning of the file,&#xD;&#xA;&#xD;&#xA;    // DESCRIPTION:&#xD;&#xA;    //      DOOM main program (D_DoomMain) and game loop (D_DoomLoop),&#xD;&#xA;    //      plus functions to determine game mode (shareware, registered),&#xD;&#xA;    //      parse command line parameters, configure game parameters (turbo),&#xD;&#xA;    //      and call the startup functions.&#xD;&#xA;&#xD;&#xA;Basically, the whole file is full of `M_CheckParm`s from start to finish. That's what the D_DoomLoop consists of. It's one massive loop (something like 1000-2000 lines long).&#xD;&#xA;&#xD;&#xA;Since your question is 'How can I write?' I'm just going to paste some bits of code that refer to gamesaves, from D_DoomMain:&#xD;&#xA;&#xD;&#xA;here are the statements where that stuff gets used, at the very end of the loop.&#xD;&#xA;&#xD;&#xA;       p = M_CheckParm (&quot;-loadgame&quot;);&#xD;&#xA;       if (p &amp;&amp; p &lt; myargc-1)&#xD;&#xA;       {&#xD;&#xA;           if (M_CheckParm(&quot;-cdrom&quot;))&#xD;&#xA;               sprintf(file, &quot;c:\\doomdata\\&quot;SAVEGAMENAME&quot;%c.dsg&quot;,myargv[p+1][0]);&#xD;&#xA;           else&#xD;&#xA;               sprintf(file, SAVEGAMENAME&quot;%c.dsg&quot;,myargv[p+1][0]);&#xD;&#xA;           G_LoadGame (file);&#xD;&#xA;       }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       if ( gameaction != ga_loadgame )&#xD;&#xA;       {&#xD;&#xA;           if (autostart || netgame)&#xD;&#xA;               G_InitNew (startskill, startepisode, startmap);&#xD;&#xA;           else&#xD;&#xA;               D_StartTitle ();                // start up intro loop&#xD;&#xA;    &#xD;&#xA;       }&#xD;&#xA;    &#xD;&#xA;       D_DoomLoop ();  // never returns&#xD;&#xA;&#xD;&#xA;Here's the function that accesses the strings, which you find scattered throughout the code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void M_ReadSaveStrings(void)&#xD;&#xA;    {&#xD;&#xA;       int             handle;&#xD;&#xA;       int             count;&#xD;&#xA;       int             i;&#xD;&#xA;       char    name[256];&#xD;&#xA;    &#xD;&#xA;       for (i = 0;i &lt; load_end;i++)&#xD;&#xA;       {&#xD;&#xA;           if (M_CheckParm(&quot;-cdrom&quot;))&#xD;&#xA;               sprintf(name,&quot;c:\\doomdata\\&quot;SAVEGAMENAME&quot;%d.dsg&quot;,i);&#xD;&#xA;           else&#xD;&#xA;               sprintf(name,SAVEGAMENAME&quot;%d.dsg&quot;,i);&#xD;&#xA;    &#xD;&#xA;           handle = open (name, O_RDONLY | 0, 0666);&#xD;&#xA;           if (handle == -1)&#xD;&#xA;           {&#xD;&#xA;               strcpy(&amp;savegamestrings[i][0],EMPTYSTRING);&#xD;&#xA;               LoadMenu[i].status = 0;&#xD;&#xA;               continue;&#xD;&#xA;           }&#xD;&#xA;           count = read (handle, &amp;savegamestrings[i], SAVESTRINGSIZE);&#xD;&#xA;           close (handle);&#xD;&#xA;           LoadMenu[i].status = 1;&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You've also got a file called p_savegame.c with stuff that will save all of the user-associated data (which weapons you've got, where you are in which level, etc).&#xD;&#xA;&#xD;&#xA;And finally you've got the file which loads savegame data into a game scenario, arguably the most complex of all, because it also loads everything else. That one's called p_setup.c, and is located in the same directory.&#xD;&#xA;&#xD;&#xA;It worked well for me to `cat` these all into a text buffer and `pipe` that text to `sendmail` to my own email address. That way I can read through it at odd moments of the day, and use 'find' when I want to look for stuff like 'how does DOOM load a game'. The code is well-commented.&#xD;&#xA;" />
  <row Id="8119" PostHistoryTypeId="2" PostId="4114" RevisionGUID="8d32e12a-6850-41cf-8fbe-d1ca4ee96ef2" CreationDate="2010-09-27T19:51:34.903" UserId="2100" Text="This is a design question... I'm sure this could be generalized more, but I'm having a hard time with it. I am wondering about design for game object interactions - here is my example (2D puzzle-platformer).&#xD;&#xA;&#xD;&#xA;Say the player is trying to progress through a level. There are many lights that can be pointed in different directions. Here is an example of how these light objects might interact...&#xD;&#xA;&#xD;&#xA; - One light projects a platform that allows the player to cross a gap&#xD;&#xA; - One light decreases the friction coefficients of anything it touches, another increases it&#xD;&#xA; - One light nulls the effects of all lights, which would make the platform disappear while that light is on and null the friction modifiers&#xD;&#xA; - Etc...&#xD;&#xA;&#xD;&#xA;What is the best way to approach this problem when using a component architecture? Components for each major object seem obvious, as well as a clean way to define their effects on the environment. A class to &quot;resolve&quot; interaction (seems like that could become a mess quickly)? Some usage of the decorator pattern to create combined objects for those that are interacting at a given time? A data structure that lends itself to this?&#xD;&#xA;&#xD;&#xA;Also, connecting audio to these interactions? It seems like connecting audio to the system would be just like connecting any other property, like visibility or player movement/collision.&#xD;&#xA;&#xD;&#xA;Obviously as more components are added it would be nice if there was a robust system that could handle new ones with little modification, but I am not familiar with how to go about designing this." />
  <row Id="8120" PostHistoryTypeId="1" PostId="4114" RevisionGUID="8d32e12a-6850-41cf-8fbe-d1ca4ee96ef2" CreationDate="2010-09-27T19:51:34.903" UserId="2100" Text="How can I design an effective game object interaction scheme with a component architecture?" />
  <row Id="8121" PostHistoryTypeId="3" PostId="4114" RevisionGUID="8d32e12a-6850-41cf-8fbe-d1ca4ee96ef2" CreationDate="2010-09-27T19:51:34.903" UserId="2100" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;component-based&gt;" />
  <row Id="8122" PostHistoryTypeId="4" PostId="4114" RevisionGUID="b332a246-1dcb-4f24-a293-869076c6b768" CreationDate="2010-09-27T20:11:40.180" UserId="2100" Comment="revised title slightly" Text="How can I design an effective game object interaction scheme with a component-based architecture?" />
  <row Id="8123" PostHistoryTypeId="2" PostId="4115" RevisionGUID="9d67c805-0d8f-4435-95ea-0a2af39364c4" CreationDate="2010-09-27T22:19:45.157" UserId="1780" Text="In an object oriented system, the only real answer is that you should just do it the most straight forward way you can think of to get something up and running, and then change it when an easier expression becomes apparent.  Concerning yourself with choosing the right pattern before you've written any code is a good way to saddle yourself with the wrong answer from the get go; let all thoughts of patterns and components melt away and just follow these steps, starting from where you are today (assuming you have implemented a light component):&#xD;&#xA;&#xD;&#xA; 1. Add code to the light component to project platforms.  (Get this working.)&#xD;&#xA; 2. Copy that component into a new component, remove the platform stuff and add code to decrease friction of appropriate objects.  (Get this working, verify that #1 still works.)&#xD;&#xA; 3. Copy that component into a new component, removing the &quot;new&quot; code and add stuff to disable the other components' effects.  (Get this working, then verify that #1 and #2 still work.)&#xD;&#xA;&#xD;&#xA;At this point, you will (probably) have a ton of duplicated code.  Extract common code into functions or another class (maybe a base class) or whatever seems appropriate.  Just because you started with a &quot;light component&quot; though doesn't mean that LightComponent is an appropriate base; it could be that whatever code made up the light component isn't really a &quot;component&quot; per se and maybe that will be best represented by a set of functions or even a separate class that is aggregated into your new components (as a member variable)." />
  <row Id="8124" PostHistoryTypeId="5" PostId="4114" RevisionGUID="e2c00e25-45ea-4593-a73b-eabea816572f" CreationDate="2010-09-27T22:30:19.963" UserId="2100" Comment="added engine being used per comment request" Text="This is a design question... I'm sure this could be generalized more, but I'm having a hard time with it. I am wondering about design for game object interactions - here is my example (2D puzzle-platformer).&#xD;&#xA;&#xD;&#xA;Say the player is trying to progress through a level. There are many lights that can be pointed in different directions. Here is an example of how these light objects might interact...&#xD;&#xA;&#xD;&#xA; - One light projects a platform that allows the player to cross a gap&#xD;&#xA; - One light decreases the friction coefficients of anything it touches, another increases it&#xD;&#xA; - One light nulls the effects of all lights, which would make the platform disappear while that light is on and null the friction modifiers&#xD;&#xA; - Etc...&#xD;&#xA;&#xD;&#xA;What is the best way to approach this problem when using a component architecture? Components for each major object seem obvious, as well as a clean way to define their effects on the environment. A class to &quot;resolve&quot; interaction (seems like that could become a mess quickly)? Some usage of the decorator pattern to create combined objects for those that are interacting at a given time? A data structure that lends itself to this?&#xD;&#xA;&#xD;&#xA;Also, connecting audio to these interactions? It seems like connecting audio to the system would be just like connecting any other property, like visibility or player movement/collision.&#xD;&#xA;&#xD;&#xA;Obviously as more components are added it would be nice if there was a robust system that could handle new ones with little modification, but I am not familiar with how to go about designing this.&#xD;&#xA;&#xD;&#xA;Other Information:&#xD;&#xA;The engine I am using is an XNA engine called [IceCream][1].&#xD;&#xA;&#xD;&#xA;  [1]: https://www.assembla.com/wiki/show/IceCream" />
  <row Id="8125" PostHistoryTypeId="5" PostId="4115" RevisionGUID="e342ee7c-7a5f-4679-b123-2ebb175e52f6" CreationDate="2010-09-27T22:49:36.240" UserId="1780" Comment="added 49 characters in body" Text="In an object oriented system, the only real answer to the question of *what's the best way to do X* is that you should just do it the most straight forward way you can think of to get something up and running, and then change it when an easier expression becomes apparent.  Concerning yourself with choosing the right pattern before you've written any code is a good way to saddle yourself with the wrong answer from the get go; let all thoughts of patterns and components melt away and just follow these steps, starting from where you are today (assuming you have implemented a light component):&#xD;&#xA;&#xD;&#xA; 1. Add code to the light component to project platforms.  (Get this working.)&#xD;&#xA; 2. Copy that component into a new component, remove the platform stuff and add code to decrease friction of appropriate objects.  (Get this working, verify that #1 still works.)&#xD;&#xA; 3. Copy that component into a new component, removing the &quot;new&quot; code and add stuff to disable the other components' effects.  (Get this working, then verify that #1 and #2 still work.)&#xD;&#xA;&#xD;&#xA;At this point, you will (probably) have a ton of duplicated code.  Extract common code into functions or another class (maybe a base class) or whatever seems appropriate.  Just because you started with a &quot;light component&quot; though doesn't mean that LightComponent is an appropriate base; it could be that whatever code made up the light component isn't really a &quot;component&quot; per se and maybe that will be best represented by a set of functions or even a separate class that is aggregated into your new components (as a member variable)." />
  <row Id="8126" PostHistoryTypeId="12" PostId="4110" RevisionGUID="e4b7dd2c-0722-449d-b8a7-c20a9f108cb9" CreationDate="2010-09-27T23:47:39.240" UserId="1232" Text="[{&quot;Id&quot;:1232,&quot;DisplayName&quot;:&quot;jpaver&quot;}]" />
  <row Id="8127" PostHistoryTypeId="13" PostId="4110" RevisionGUID="e8316019-1e6f-40d1-9610-c021a6a3efd6" CreationDate="2010-09-27T23:54:23.407" UserId="1232" Text="[{&quot;Id&quot;:1232,&quot;DisplayName&quot;:&quot;jpaver&quot;}]" />
  <row Id="8128" PostHistoryTypeId="5" PostId="4110" RevisionGUID="5358db64-13f5-40ac-a036-d3279331f8cd" CreationDate="2010-09-27T23:55:22.963" UserId="1232" Comment="added 72 characters in body" Text="Airplay SDK works well.&#xD;&#xA;&#xD;&#xA;  http://www.airplaysdk.com/&#xD;&#xA;&#xD;&#xA;I've used it with the express edition of Visual Studio. It comes with a decent emulator for windows too, and supports more than just iPhone platform:&#xD;&#xA;&#xD;&#xA;* iPhone OS&#xD;&#xA;* Android&#xD;&#xA;* Samsung Bada&#xD;&#xA;* Symbian&#xD;&#xA;* Windows Mobile&#xD;&#xA;* BREW&#xD;&#xA;* Palm/HP webOS&#xD;&#xA;* Maemo&#xD;&#xA;&#xD;&#xA;.. it also has pretty generous Indie licensing terms. The iphone/ipod/ipad license is free. Other platforms are available for $99 per seat/year if you earn &lt; $100k per year.&#xD;&#xA;&#xD;&#xA;http://www.airplaysdk.com/licensing_details&#xD;&#xA;" />
  <row Id="8129" PostHistoryTypeId="2" PostId="4116" RevisionGUID="e1a8b22d-4f2f-4dd8-a5ab-54f644990aa1" CreationDate="2010-09-28T01:12:25.513" UserId="1021" Text="I'd like to find some &quot;magic numbers&quot; for the classic [helicopter game][1].  For example the numbers that determine how fast the helicopter accelerates up and down.  Also perhaps the &quot;randomness&quot; of the obstacles (uniformly distributed?  Gaussian?).  **Where can I find these numbers?**&#xD;&#xA;&#xD;&#xA;p.s. I don't care about the particular platform... Flash on the desktop browser is just as good as some implementation on a mobile device.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.helicopter-game.org" />
  <row Id="8130" PostHistoryTypeId="1" PostId="4116" RevisionGUID="e1a8b22d-4f2f-4dd8-a5ab-54f644990aa1" CreationDate="2010-09-28T01:12:25.513" UserId="1021" Text="Where can I find &quot;magic numbers&quot; for classic game play mechanics?" />
  <row Id="8131" PostHistoryTypeId="3" PostId="4116" RevisionGUID="e1a8b22d-4f2f-4dd8-a5ab-54f644990aa1" CreationDate="2010-09-28T01:12:25.513" UserId="1021" Text="&lt;untagged&gt;" />
  <row Id="8132" PostHistoryTypeId="2" PostId="4117" RevisionGUID="2514eb5c-1274-4ae4-8780-e1eb19a652bf" CreationDate="2010-09-28T01:40:13.457" UserId="1248" Text="Ogre3d (www.ogre3d.org) supports pretty much everything, and includes an SDK for iPhone development as well (OGRESDK/SDK/iPhone directory). It is free so no worries about any fees for using it. It is primarily a 3d rendering engine, although plenty of people have used it for 2D work, so if that is a problem you might want to look at some of the 2D options listed above." />
  <row Id="8133" PostHistoryTypeId="16" PostId="4117" RevisionGUID="2514eb5c-1274-4ae4-8780-e1eb19a652bf" CreationDate="2010-09-28T01:40:13.457" UserId="-1" />
  <row Id="8134" PostHistoryTypeId="2" PostId="4118" RevisionGUID="e098a0aa-a0c6-4b02-8360-b7f71c4b44bd" CreationDate="2010-09-28T01:45:23.167" UserId="1248" Text="I am about to purchase quite a few model packs from a website for prototyping my game. In the contract it states that I must protect them as to prevent the public from gaining access to them.&#xD;&#xA;&#xD;&#xA;I remember working with the Valve games, they used .gcf (game content file) that basically was an archive of all the content for each game. They packed in sound/materials/models/maps/etc. I figured it might not be a bad idea to develop something similar to this, and just write a small tool to let me add/remove files from it.&#xD;&#xA;&#xD;&#xA;Problem is I really have no idea how to go about starting on something like this. I tried Google but I didn't even know what to search for. If anyone has any ideas, links that might be of use, or anything else I would greatly appreciate it." />
  <row Id="8135" PostHistoryTypeId="1" PostId="4118" RevisionGUID="e098a0aa-a0c6-4b02-8360-b7f71c4b44bd" CreationDate="2010-09-28T01:45:23.167" UserId="1248" Text="Custom Content Package for Files" />
  <row Id="8136" PostHistoryTypeId="3" PostId="4118" RevisionGUID="e098a0aa-a0c6-4b02-8360-b7f71c4b44bd" CreationDate="2010-09-28T01:45:23.167" UserId="1248" Text="&lt;game-design&gt;&lt;c++&gt;" />
  <row Id="8137" PostHistoryTypeId="2" PostId="4119" RevisionGUID="9bde8131-8c21-40bb-a0e9-182bf9ee15f8" CreationDate="2010-09-28T01:50:04.427" UserId="2100" Text="A lot of times I notice that custom content packages tend to be a .zip or .rar archive with a different extension. Of course, this is no good if the web site wants custom encryption of some sort." />
  <row Id="8138" PostHistoryTypeId="2" PostId="4120" RevisionGUID="df2249a3-b431-4501-80c7-8af2fab7f43a" CreationDate="2010-09-28T01:52:11.927" UserId="1248" Text="I am personally using CEGUI in my game project, and it is a pretty robust solution. Problem is, sometimes it almost feels like to make one tiny change your altering tons of files.&#xD;&#xA;&#xD;&#xA;I have not used it, but libRocket just went completely free, removing all license fees and what not. The cool part about this lib is that you write it in html/css syntax. http://librocket.com" />
  <row Id="8139" PostHistoryTypeId="2" PostId="4121" RevisionGUID="8e1a1e44-24a1-420f-919c-cdf63a1c953a" CreationDate="2010-09-28T02:35:10.503" UserId="211" Text="If you're just prototyping, then I wouldn't worry about packing your assets into a GCF/ZIP/PAK file; the public isn't going to see your prototype!&#xD;&#xA;&#xD;&#xA;Furthermore, Valve's GCF provides as much protection for your content as a ZIP file would - i.e. zero. The file is not encrypted; you can download GCFScape to browse and extract its contents.&#xD;&#xA;&#xD;&#xA;It's not worth putting the effort into creating your own pack file system unless you have specific needs *right now* that aren't being met by ZIP files or the OS's own file access mechanism; in fact, the only reasons I can think of are:&#xD;&#xA;&#xD;&#xA; - Content obfuscation (keeping your files free from tinkering has its uses; I still suggest its overkill for your current needs),&#xD;&#xA; - Storing additional per-file metadata in a game specific way to help data-drive your content in some way,&#xD;&#xA; - Getting around the OS's filesystem limitations, such as needing to access thousands of small files quickly, or ensuring contiguous data access. (This is a defacto need when working on consoles.)" />
  <row Id="8140" PostHistoryTypeId="6" PostId="4114" RevisionGUID="97d97924-5aff-4830-9ee2-77d52447dc13" CreationDate="2010-09-28T03:22:12.883" UserId="2100" Comment="added tags" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;xna&gt;&lt;c#&gt;&lt;component-based&gt;" />
  <row Id="8141" PostHistoryTypeId="2" PostId="4122" RevisionGUID="cf43d412-1645-4f0e-a20d-d8b0255e4d3e" CreationDate="2010-09-28T03:38:04.000" UserId="962" Text="**Decompile the game to figure them out**, but don't use any of their code, I would say the fall rate of an object cannot be copyrighted." />
  <row Id="8142" PostHistoryTypeId="2" PostId="4123" RevisionGUID="14543361-7598-481d-88e0-b739fb86e803" CreationDate="2010-09-28T06:48:55.907" UserId="2156" Text="Say I'm making this big game in C# with XNA.&#xD;&#xA;&#xD;&#xA;What options do I have to include a scripting feature to my code base?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="8143" PostHistoryTypeId="1" PostId="4123" RevisionGUID="14543361-7598-481d-88e0-b739fb86e803" CreationDate="2010-09-28T06:48:55.907" UserId="2156" Text="Scripting engine for XNA" />
  <row Id="8144" PostHistoryTypeId="3" PostId="4123" RevisionGUID="14543361-7598-481d-88e0-b739fb86e803" CreationDate="2010-09-28T06:48:55.907" UserId="2156" Text="&lt;xna&gt;&lt;c#&gt;&lt;scripting&gt;" />
  <row Id="8145" PostHistoryTypeId="2" PostId="4124" RevisionGUID="7d1d7fc0-2a14-4342-8960-50edcc670019" CreationDate="2010-09-28T07:45:34.527" UserId="288" Text="I advocate &lt;b&gt;not using a scripting language in C#&lt;/b&gt;. C# is already solves the vast majority of problems that a scripting engine is used to solve. Just use C# in the way you would use a scripting language.&#xD;&#xA;&#xD;&#xA;Because I've been over this several times before, here is some reading material for you:&#xD;&#xA;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/2983675/a-scripting-language-for-xna/2986900#2986900&quot;&gt;A scripting language for XNA&lt;/a&gt; (duplicate of your question, but on SO)&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/1353456/recompile-c-while-running-without-appdomains&quot;&gt;Recompile C# while running, without AppDomains&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://gamedev.stackexchange.com/questions/1007/modifier-system-c/1464#1464&quot;&gt;Please don't use home-made scripting in C#!&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/3540231/implementing-a-simple-xml-based-scripting-language-for-an-xna-game/3540342#3540342&quot;&gt;Oh god please don't use XML-based home-made scripting in C#!&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://gamedev.stackexchange.com/questions/3545/scripting-and-cinematics-without-threading/3547#3547&quot;&gt;Using 'yield' in C# for state-based/latent scripting&lt;/a&gt;&#xD;&#xA;" />
  <row Id="8146" PostHistoryTypeId="2" PostId="4125" RevisionGUID="579e8fe7-9a82-4ee8-9e02-592daf45309f" CreationDate="2010-09-28T10:42:36.683" UserId="2188" Text="This requirement is, well, bullshit.&#xD;&#xA;&#xD;&#xA;Since the game can access the data, and the user has access to the game, if he is skilled and determined enough he'll manage to reverse-engineer the format you used to store the data and grab the eventual key if you were fool enough to encrypt it.&#xD;&#xA;&#xD;&#xA;You cannot add security. I repeat: you **just CANNOT add security**. You can only add obscurity, and obscurity is totally pointless, since - as I said - an user with enough skill and determination will just break it.&#xD;&#xA;&#xD;&#xA;Don't sign anything that asks you something that can't be done." />
  <row Id="8147" PostHistoryTypeId="2" PostId="4126" RevisionGUID="b8c95511-284b-45c3-9fae-34b894aa6e6a" CreationDate="2010-09-28T11:19:47.767" UserId="259" Text="In general terms, when an object of type A interacts with an object of type B, you want to have some effect C. This is called [&quot;double dispatch&quot;][1] and is very hard to do elegantly in C-like languages.&#xD;&#xA;&#xD;&#xA;The effective but hard-to-maintain way is just a bunch of switch and if statements, depending on the types of your objects.  You'll feel dirty writing it but it will get the job done. &#xD;&#xA;&#xD;&#xA;The [Visitor pattern][2] is a more robust solution that hides the nasty type switching, but can be clumbersome to set up. &#xD;&#xA;&#xD;&#xA;Normally any kind of type-switch in your code is a smell, but here you're trying to generalise polymorphism, which normally switches functions based on a single type, to switch functions based on two types. Polymorphism is a foundation of OOP so it's not a smell.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Double_dispatch&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Visitor_pattern" />
  <row Id="8148" PostHistoryTypeId="2" PostId="4127" RevisionGUID="a1567b05-8253-4441-af58-b8ce00b028a7" CreationDate="2010-09-28T11:46:52.207" UserId="2314" Text="The higher the framerate, the better the game looks, but the faster it drains the battery.&#xD;&#xA;&#xD;&#xA;What's a happy medium?&#xD;&#xA;&#xD;&#xA;(I'm making a relatively simple 2D game with sprites moving constantly. I want the movement to appear smooth but I know how irritating it is when a simple game sucks your battery dry.)" />
  <row Id="8149" PostHistoryTypeId="1" PostId="4127" RevisionGUID="a1567b05-8253-4441-af58-b8ce00b028a7" CreationDate="2010-09-28T11:46:52.207" UserId="2314" Text="What framerate should I aim for on a mobile phone?" />
  <row Id="8150" PostHistoryTypeId="3" PostId="4127" RevisionGUID="a1567b05-8253-4441-af58-b8ce00b028a7" CreationDate="2010-09-28T11:46:52.207" UserId="2314" Text="&lt;frame-rate&gt;&lt;mobile&gt;" />
  <row Id="8151" PostHistoryTypeId="2" PostId="4128" RevisionGUID="bcc8ddff-c328-4e40-9e87-8efc9399b739" CreationDate="2010-09-28T12:59:41.187" UserId="189" Text="Your framerate should be as low as looks good, but I think you're in a tough situation if all of your sprites are moving constantly. You should try your absolute hardest to keep a **consistent** framerate; a low, consistent framerate is better than a high but randomly stuttering framerate. Then turn it down until it doesn't look good.&#xD;&#xA;&#xD;&#xA;Consider matching the framerate of movies on the big screen: they are only **24 FPS**. But again, they are precisely consistent, which is why people are okay with just 24 FPS.&#xD;&#xA;&#xD;&#xA;Alternatively, if your sprites have an animation sequence and that has a FPS value, try matching that or a multiple of it. For example if they animate at 5 frames per second, then maybe try 25 or 30 frames per second so that the sprite animations can be precisely timed and make the game appear more smooth and consistent than it really is.&#xD;&#xA;&#xD;&#xA;I think the best option in this case is to try out some framerates and find a good default, and then put a setting in your options menu for the user to be able to turn it up or down according to the user's desired battery life." />
  <row Id="8152" PostHistoryTypeId="2" PostId="4129" RevisionGUID="3880f19a-64cd-4c86-8f8e-b63549f3d0ae" CreationDate="2010-09-28T13:25:18.390" UserId="1352" Text="Let me see. &#xD;&#xA;This is just something I cooked up in my head while I was writing, so sorry if I'm missing something.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Get all light nodes in a reasonable distance around your dude.&#xD;&#xA;&#xD;&#xA;For each light you render a polygon representing it's area of effect to a framebuffer object.  So a cone of light would create a cone of one type of pixels in your FBO. Render each node type in passes in appropriate priority.&#xD;&#xA;You could encode information into each pixel like green channel could be fricition, red be gravity, blue and alpha be something else.&#xD;&#xA;&#xD;&#xA;Clever color blending techniques could then create interesting effects. Each level could have it's own blending rules.You can also add fragment shading for psychedelic dynamic effects like pulsating gravity etc.&#xD;&#xA;&#xD;&#xA;Lastly, just check which pixels your mandude is touching, and do recalculation of the bitmap whenever you are nearing the edges of the precalculated area.&#xD;&#xA;&#xD;&#xA;Rough scetch made in 2 minutes kind of illustrating my idea:&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zfO9k.png" />
  <row Id="8153" PostHistoryTypeId="2" PostId="4130" RevisionGUID="caba71d7-d5cb-464a-9979-9d238b3bcc40" CreationDate="2010-09-28T13:35:40.927" UserId="2037" Text="When developing for mobile devices I always aim for 30. " />
  <row Id="8154" PostHistoryTypeId="2" PostId="4131" RevisionGUID="d23bea6d-280d-4285-b33b-775849c33a34" CreationDate="2010-09-28T13:42:54.573" UserId="1677" Text="A game is a set of Game States.&#xD;&#xA;&#xD;&#xA;Each Game State contains game objects, may be list, may be scene graph or any other data structure.&#xD;&#xA;&#xD;&#xA;We can use Game States as Game Locations, too.&#xD;&#xA;&#xD;&#xA;**How do you share data between Game States**, for example, hero and his/hero inventory when it moves from one location to another?&#xD;&#xA;&#xD;&#xA;It looks like Composite (hierarchical) Game State is a good idea. For example,&#xD;&#xA;&#xD;&#xA;	GameState MainMenu&#xD;&#xA;	GameState LoadLevel&#xD;&#xA;	GameState Gameplay - contains inner states&#xD;&#xA;		GameState Location1&#xD;&#xA;		GameState Location2&#xD;&#xA;		GameState Location3&#xD;&#xA;		GameState MiniGame1 - contains inner states&#xD;&#xA;			GameState LocationInMiniGame1&#xD;&#xA;			GameState LocationInMiniGame2&#xD;&#xA;&#xD;&#xA;So we can hold shared data (hero, inventory) in Gameplay object. But this approach does not look very correct and flexible. If some objects are outside scene graph (ie in the parent Game State), how would you include it in the scene graph? Via special node type that mounts different scene graphs or scene graph branches together?&#xD;&#xA;&#xD;&#xA;If we have stack of active Game States, and each state can contain inner state machine, and scene graphs of different Game States can be mounted into one giant graph, it can become very complex system that is hard to debug.&#xD;&#xA;&#xD;&#xA;Very interesting to read your suggestions. How do you organize game data between Game States in your real applications?&#xD;&#xA;&#xD;&#xA;(For editors: possible additional tags: OOP, game-state.)" />
  <row Id="8155" PostHistoryTypeId="1" PostId="4131" RevisionGUID="d23bea6d-280d-4285-b33b-775849c33a34" CreationDate="2010-09-28T13:42:54.573" UserId="1677" Text="Game state sharing data" />
  <row Id="8156" PostHistoryTypeId="3" PostId="4131" RevisionGUID="d23bea6d-280d-4285-b33b-775849c33a34" CreationDate="2010-09-28T13:42:54.573" UserId="1677" Text="&lt;engine&gt;&lt;architecture&gt;&lt;best-practices&gt;&lt;state&gt;" />
  <row Id="8157" PostHistoryTypeId="5" PostId="4129" RevisionGUID="af67b53c-93ce-473f-abef-9011fa88f16d" CreationDate="2010-09-28T13:45:06.767" UserId="1352" Comment="added 423 characters in body; added 95 characters in body" Text="Let me see. &#xD;&#xA;This is just something I cooked up in my head while I was writing, so sorry if I'm missing something.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Get all light nodes in a reasonable distance around your dude.&#xD;&#xA;&#xD;&#xA;For each light you render a polygon representing it's area of effect to a framebuffer object.  So a cone of light would create a cone of one type of pixels in your FBO. Render each node type in passes in appropriate priority.&#xD;&#xA;You could encode information into each pixel like green channel could be fricition, red be gravity, blue and alpha be something else.&#xD;&#xA;&#xD;&#xA;Clever color blending techniques could then create interesting effects. Each level could have it's own blending rules.You can also add fragment shading for psychedelic dynamic effects like pulsating gravity etc.&#xD;&#xA;&#xD;&#xA;Lastly, just check which pixels your mandude is touching, and do recalculation of the bitmap whenever you are nearing the edges of the precalculated area.&#xD;&#xA;&#xD;&#xA;Rough scetch made in 2 minutes kind of illustrating my idea:&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zfO9k.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: In practice this means the only thing you need is one light component emitting a certain color. The rules connected to what color does what can be somewhere else entirely.&#xD;&#xA;You can encode a lot of data into the 32 bits you have pr pixel. Alternatively you can have multiple FBO's containing different attributes that don't affect each other. You could have one gravity/friction FBO and one 1bit collision FBO. If you choose this, you would of course have to flag which FBO your light should render into. " />
  <row Id="8158" PostHistoryTypeId="2" PostId="4132" RevisionGUID="5c7a9900-6827-4255-ab65-8a3d7764d277" CreationDate="2010-09-28T13:55:57.497" UserId="189" Text="I started learning programming from web development. My first steps were opening notepad, writing some HTML, saving it, and opening it in a browser. Then I wrote another HTML file and saved it. And then I made a link. Suddenly I had two pages which I could go back and forth between.&#xD;&#xA;&#xD;&#xA;Then I got into PHP; I could handle user input! I could even save data about an user. I used cookies or the session to save data about the user between pages.&#xD;&#xA;&#xD;&#xA;Now just a few months ago, as I was thinking and wondering the same question as you, I realized game states are like PHP pages. They're very discrete, each one being a different view of your application (game, in this case), but they need some shared data. **They need session data.**&#xD;&#xA;&#xD;&#xA;Well, in PHP, to store something in the session you just use `$_SESSION['variablename']='value';`. Then you can later retrieve that data, from any PHP page visited by the same user in the same session, by referring to `$_SESSION['variablename'];`. Essentially, it's a **global** array, and in PHP you can easily add values to an array so it's essentially equivalent to a **Map**.&#xD;&#xA;&#xD;&#xA;So if you want to go this route, then add a global Map which acts as your &quot;session&quot; data. This will hold all of the data that needs to be shared between game states. Or simply make it a global object and add all the variables you need; this is entirely up to you, based on your needs. (obviously an object will get much better performance than a Map)&#xD;&#xA;&#xD;&#xA;It could even be a Singleton. I don't like them, but they do have their place sometimes.&#xD;&#xA;&#xD;&#xA;Note this is only one way to do it. I really kind of like the way you want to attach the data to the parent Gameplay object; but in my state system I didn't really account for sub-states so I was just thinking of the PHP way." />
  <row Id="8159" PostHistoryTypeId="2" PostId="4133" RevisionGUID="bbb19f03-2f03-4928-be35-18fa836eddb0" CreationDate="2010-09-28T14:14:54.690" UserId="1143" Text="It might seem obvious, but aim for whatever the refresh rate of the screen you're using, or a multiple of that, i.e. if the device does 24fps you could do 12fps. But as Ricket says, the ideal thing is to be consistent." />
  <row Id="8160" PostHistoryTypeId="2" PostId="4134" RevisionGUID="e1e54d5e-f13f-46e8-81aa-2e9beada49c5" CreationDate="2010-09-28T14:39:29.367" UserId="1677" Text="[Scene graph][1] is a popular method to organize game objects and UI. Scene graphs can be handy when you go totally data-driven. Wiki says:&#xD;&#xA;&#xD;&#xA;&gt; The scene graph is a structure that arranges the logical and often (but not necessarily) spatial representation of a graphical scene. The definition of a scene graph is fuzzy because programmers who implement scene graphs in applications and in particular the games industry take the basic principles and adapt these to suit particular applications. This means there is no consensus as to what a scene graph should be.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some links:&#xD;&#xA;&#xD;&#xA;[Understanding and Implementing Scene Graphs][2]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs][3]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs Revisited][4]&#xD;&#xA;&#xD;&#xA;[&quot;Dependency Graphs In Games&quot; by Jelle van der Beek][5]&#xD;&#xA;&#xD;&#xA;[Infinity: Pipeline system description][6]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Google image &quot;scene graph&quot; search][7] shows that there are many different approaches to build scene graphs. Some of them:&#xD;&#xA;&#xD;&#xA;1. Nodes contain only logic data.&#xD;&#xA;2. Nodes contain and combine logic data, meshes, rendering states, transformations etc.&#xD;&#xA;3. Nodes are used to separate spatial information to optimize collision checks etc.&#xD;&#xA;4. Nodes contain rendering pipelines only.&#xD;&#xA;&#xD;&#xA;Some implementations use [Visitor Pattern][10] and concept of [RenderPasses][11].&#xD;&#xA;&#xD;&#xA;[Some authors][8] recommend to use DAG (directed acyclic graphs) despite of tree graphs, because trees are not great for handling [Observer][9] relationships. Dirty bits are used to check if the node was updated during current pass.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;My question. It is very interesting to build scene graph classification. Scene graph concept is too abstract and can be broadly interpreted, that is why it's important to build a classification and basic guides.&#xD;&#xA;&#xD;&#xA;Please, post one classification per answer.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scene_graph&#xD;&#xA;  [2]: http://www.gamedev.net/reference/programming/features/scenegraph/&#xD;&#xA;  [3]: http://gamearchitect.net/Articles/GameObjects2.html&#xD;&#xA;  [4]: http://gamearchitect.net/Articles/GameObjects3.html&#xD;&#xA;  [5]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [6]: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350&amp;reply_id=2217583&#xD;&#xA;  [7]: http://www.google.lv/images?q=scene%20graph&amp;oe=utf-8&amp;rls=org.mozilla:ru:official&amp;client=firefox&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=ru&amp;tab=wi&amp;biw=1680&amp;bih=840&#xD;&#xA;  [8]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/Observer_pattern&#xD;&#xA;  [10]: http://en.wikipedia.org/wiki/Visitor_pattern&#xD;&#xA;  [11]: http://java.cms.livjm.ac.uk/homura/about.php?project=homura" />
  <row Id="8161" PostHistoryTypeId="1" PostId="4134" RevisionGUID="e1e54d5e-f13f-46e8-81aa-2e9beada49c5" CreationDate="2010-09-28T14:39:29.367" UserId="1677" Text="Scene graph classification" />
  <row Id="8162" PostHistoryTypeId="3" PostId="4134" RevisionGUID="e1e54d5e-f13f-46e8-81aa-2e9beada49c5" CreationDate="2010-09-28T14:39:29.367" UserId="1677" Text="&lt;architecture&gt;&lt;scene-graph&gt;" />
  <row Id="8163" PostHistoryTypeId="2" PostId="4135" RevisionGUID="0cfa493d-d866-4d86-b9ce-6ac6a4307d68" CreationDate="2010-09-28T14:45:14.743" UserId="1101" Text="Store your data in a slightly obscure archive format such as [7-Zip][1].&#xD;&#xA;&#xD;&#xA;Give them a different file extension so that a casual user can't easily open them with their zip program.&#xD;&#xA;&#xD;&#xA;Use [physfs][2] to read and access those files. It also lets you work with files in your local directory too, so you can easily test new resources without rebuilding your packages. Highly recommended.&#xD;&#xA;&#xD;&#xA;Consider very trivial encryption on the content, eg. [XOR encryption][3]. Write a little batch file or script to build your packages, encrypting the data as it goes in, and use the same function to decrypt the data in your game.&#xD;&#xA;&#xD;&#xA;This won't keep a determined user out - nothing will. But it will be good enough to satisfy the requirements of your model packs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.7-zip.org/&#xD;&#xA;  [2]: http://icculus.org/physfs/&#xD;&#xA;  [3]: http://www.infernodevelopment.com/c-xor-encryption-cipher-secret-messages" />
  <row Id="8164" PostHistoryTypeId="5" PostId="4131" RevisionGUID="b9fbe61c-ae30-4e41-a990-078feaee00c6" CreationDate="2010-09-28T14:52:38.903" UserId="1677" Comment="deleted 1 characters in body" Text="A game is a set of Game States.&#xD;&#xA;&#xD;&#xA;Each Game State contains game objects, may be list, may be scene graph or any other data structure.&#xD;&#xA;&#xD;&#xA;We can use Game States as Game Locations, too.&#xD;&#xA;&#xD;&#xA;**How do you share data between Game States**, for example, hero and his/her inventory when it moves from one location to another?&#xD;&#xA;&#xD;&#xA;It looks like Composite (hierarchical) Game State is a good idea. For example,&#xD;&#xA;&#xD;&#xA;	GameState MainMenu&#xD;&#xA;	GameState LoadLevel&#xD;&#xA;	GameState Gameplay - contains inner states&#xD;&#xA;		GameState Location1&#xD;&#xA;		GameState Location2&#xD;&#xA;		GameState Location3&#xD;&#xA;		GameState MiniGame1 - contains inner states&#xD;&#xA;			GameState LocationInMiniGame1&#xD;&#xA;			GameState LocationInMiniGame2&#xD;&#xA;&#xD;&#xA;So we can hold shared data (hero, inventory) in Gameplay object. But this approach does not look very correct and flexible. If some objects are outside scene graph (ie in the parent Game State), how would you include it in the scene graph? Via special node type that mounts different scene graphs or scene graph branches together?&#xD;&#xA;&#xD;&#xA;If we have stack of active Game States, and each state can contain inner state machine, and scene graphs of different Game States can be mounted into one giant graph, it can become very complex system that is hard to debug.&#xD;&#xA;&#xD;&#xA;Very interesting to read your suggestions. How do you organize game data between Game States in your real applications?&#xD;&#xA;&#xD;&#xA;(For editors: possible additional tags: OOP, game-state.)" />
  <row Id="8165" PostHistoryTypeId="2" PostId="4136" RevisionGUID="ae42014c-6f99-4a13-ac09-a471c7d4f980" CreationDate="2010-09-28T14:58:37.127" UserId="1101" Text="My suggestion is to not have game states like this whatsoever. Most of your essential game objects exists across and outside of all the states (eg. renderer, resource loading, input, networking, audio), and a massive amount of the rest span multiple states (eg. players, some NPCs, certain resources).&#xD;&#xA;&#xD;&#xA;On top of that, the stack system doesn't seem to work well in practice. What if I want to bring up an options menu from within the mini-game - how is that going to differ from bringing it up from the main menu? What if I can quit the whole game from within the mini-game?&#xD;&#xA;&#xD;&#xA;I'd ask, what value does this big state system give you? If you need to know what location you're in, store a location object or variable. If you're on the main menu, your GUI object will have a menu panel up; otherwise, it won't. Maybe there's an argument for pushing a new state when you enter a mini-game or cut-scene but I don't think I'd even do it then.&#xD;&#xA;&#xD;&#xA;So my answer to &quot;*how do you share data between same States*&quot; is to not have game states at all." />
  <row Id="8166" PostHistoryTypeId="5" PostId="4134" RevisionGUID="5244b6f8-464d-49d0-9ba8-c0e5aa72d926" CreationDate="2010-09-28T15:05:12.190" UserId="1677" Comment="added 4 characters in body" Text="[Scene graph][1] is a popular method to organize game objects and UI. Scene graphs can be handy when you go totally data-driven. Wiki says:&#xD;&#xA;&#xD;&#xA;&gt; The scene graph is a structure that arranges the logical and often (but not necessarily) spatial representation of a graphical scene. The definition of a scene graph is fuzzy because programmers who implement scene graphs in applications and in particular the games industry take the basic principles and adapt these to suit particular applications. This means there is no consensus as to what a scene graph should be.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some links:&#xD;&#xA;&#xD;&#xA;[Understanding and Implementing Scene Graphs][2]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs][3]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs Revisited][4]&#xD;&#xA;&#xD;&#xA;[&quot;Dependency Graphs In Games&quot; by Jelle van der Beek][5]&#xD;&#xA;&#xD;&#xA;[Infinity: Pipeline system description][6]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Google image &quot;scene graph&quot; search][7] shows that there are many different approaches to build scene graphs. Some of them:&#xD;&#xA;&#xD;&#xA;1. Nodes contain only logic data.&#xD;&#xA;2. Nodes contain and combine logic data, meshes, rendering states, transformations etc.&#xD;&#xA;3. Nodes are used to separate spatial information to optimize collision checks etc.&#xD;&#xA;4. Nodes contain rendering pipelines only.&#xD;&#xA;&#xD;&#xA;Some implementations use [Visitor Pattern][10] and concept of [RenderPasses][11].&#xD;&#xA;&#xD;&#xA;[Some authors][8] recommend to use DAG (directed acyclic graphs) despite of tree graphs, because trees are not great for handling [Observer][9] relationships. Dirty bits are used to check if the node was updated during current pass.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**My question**. It is very interesting to build scene graph classification. Scene graph concept is too abstract and can be broadly interpreted, that is why it's important to build a classification and basic guides.&#xD;&#xA;&#xD;&#xA;Please, post one classification per answer.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scene_graph&#xD;&#xA;  [2]: http://www.gamedev.net/reference/programming/features/scenegraph/&#xD;&#xA;  [3]: http://gamearchitect.net/Articles/GameObjects2.html&#xD;&#xA;  [4]: http://gamearchitect.net/Articles/GameObjects3.html&#xD;&#xA;  [5]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [6]: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350&amp;reply_id=2217583&#xD;&#xA;  [7]: http://www.google.lv/images?q=scene%20graph&amp;oe=utf-8&amp;rls=org.mozilla:ru:official&amp;client=firefox&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=ru&amp;tab=wi&amp;biw=1680&amp;bih=840&#xD;&#xA;  [8]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/Observer_pattern&#xD;&#xA;  [10]: http://en.wikipedia.org/wiki/Visitor_pattern&#xD;&#xA;  [11]: http://java.cms.livjm.ac.uk/homura/about.php?project=homura" />
  <row Id="8167" PostHistoryTypeId="2" PostId="4137" RevisionGUID="869e78af-51ef-4d56-9079-dec2e2a4785f" CreationDate="2010-09-28T15:14:38.620" UserId="2319" Text="Civilization IV was a highly moddable game, and many great mods/games were built off it &lt;sub&gt;([Fall From Heaven 2][1] being my personal favorite)&lt;/sub&gt;.&#xD;&#xA;&#xD;&#xA;Does Civilization V have the same opportunities for modding that Civilization IV offered?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://kael.civfanatics.net/About.shtml" />
  <row Id="8168" PostHistoryTypeId="1" PostId="4137" RevisionGUID="869e78af-51ef-4d56-9079-dec2e2a4785f" CreationDate="2010-09-28T15:14:38.620" UserId="2319" Text="Is Civ V as moddable as Civ IV?" />
  <row Id="8169" PostHistoryTypeId="3" PostId="4137" RevisionGUID="869e78af-51ef-4d56-9079-dec2e2a4785f" CreationDate="2010-09-28T15:14:38.620" UserId="2319" Text="&lt;modification&gt;" />
  <row Id="8170" PostHistoryTypeId="2" PostId="4138" RevisionGUID="3b3e94de-2579-41ab-9643-7489548ee3c4" CreationDate="2010-09-28T15:24:44.350" UserId="1101" Text="Another option is to embed a simple language like Lua and expose the configuration values you want to Lua. Then your configuration file becomes a series of assignments, and can be as complex or as simple as you like. I probably wouldn't do this just for loading configuration files, but scripting languages do come in very handy for many aspects of game development so it's worth considering." />
  <row Id="8171" PostHistoryTypeId="5" PostId="4105" RevisionGUID="45f0fde1-e781-4a1f-bb7e-c4b98cc3b72a" CreationDate="2010-09-28T15:33:06.417" UserId="1742" Comment="added a fuller explanation for Kylotan" Text="Your swooping effect is because there is no stationary pixel during the interpolation. In a dolly and pan, there will be a point (a line actually) that doesn't change in appearance other than mip level.&#xD;&#xA;&#xD;&#xA;You're using a zoom/scale, and because of this you're suffering from an accelerated scale problem, if you tried going from 2.0 to 0.1, then it would become more obvious why this was a non-linear operation.&#xD;&#xA;&#xD;&#xA;You need to consider the zoom as it's inverse, then this goes away.&#xD;&#xA;at half-way, your zoom is 1.5, but if you took the inverse of your zoom (1.0 -&gt; 0.5 instead of 1.0 to 2.0), then half-way becomes 1.3333 (1.0/0.75), which actually gives you the zoom you want at that part of your linear interpolation across space (the 0,0 to 100,200).&#xD;&#xA;&#xD;&#xA;For Kylotan: To make a camera look like it's not swooping, you have to be able to pin a point in the screen. What you're after is a linear interpolation of the top,bottom,left,and right values of the render rectangle, well, that's not going to happen if you're interpolating the scale, because that's the &quot;inverse&quot; of the size of the rectangle.&#xD;&#xA;&#xD;&#xA;What happened was, interpolating the scale cause the rectangle to shrink non linearly over time.&#xD;&#xA;example:&#xD;&#xA;assuming the rectangle was -100,100,-100,100 (that's left,right,top,bottom)&#xD;&#xA;translation moves it to 0,200,100,300,&#xD;&#xA;but shrinks (scaled 0.5) as the scene is zoomed to 50,150,150,250&#xD;&#xA;that's the final destination of the interpolation... but, if you interpolate the zoom...&#xD;&#xA;zoom at 1.5 == 0.666 scale in render rectangle, leading to &#xD;&#xA;-16.666,116.666,33.333,166.666&#xD;&#xA;&#xD;&#xA;At any point during the interpolation, the world point 200,400 should always appear in the same relative position to the render rectangle. At the start it is 200,400 but at scale 1, and at the end it is at 100,200 relative, but scaled up by 2 due to scene scaling, so it's still the same position relatively.&#xD;&#xA;&#xD;&#xA;if you take the halfway point, it's at 150,300, but the scene is scaled by 1/.75 at this point so the relative position is once again 200,400 (150/0.75==200 &amp; 300/0.75==400)&#xD;&#xA;" />
  <row Id="8172" PostHistoryTypeId="5" PostId="4134" RevisionGUID="dabe6fcb-5ffe-4a8e-8345-ecba8718a998" CreationDate="2010-09-28T15:36:39.577" UserId="1677" Comment="added 134 characters in body" Text="[Scene graph][1] is a popular method to organize game objects and UI. Scene graphs can be handy when you go totally data-driven. Wiki says:&#xD;&#xA;&#xD;&#xA;&gt; The scene graph is a structure that arranges the logical and often (but not necessarily) spatial representation of a graphical scene. The definition of a scene graph is fuzzy because programmers who implement scene graphs in applications and in particular the games industry take the basic principles and adapt these to suit particular applications. This means there is no consensus as to what a scene graph should be.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some links:&#xD;&#xA;&#xD;&#xA;[Understanding and Implementing Scene Graphs][2]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs][3]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs Revisited][4]&#xD;&#xA;&#xD;&#xA;[&quot;Dependency Graphs In Games&quot; by Jelle van der Beek][5]&#xD;&#xA;&#xD;&#xA;[Infinity: Pipeline system description][6]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Google image &quot;scene graph&quot; search][7] shows that there are many different approaches to build scene graphs. Some of them:&#xD;&#xA;&#xD;&#xA;1. Nodes contain only logic data.&#xD;&#xA;2. Nodes contain and combine logic data, meshes, rendering states, transformations etc.&#xD;&#xA;3. Nodes are used to separate spatial information to optimize collision checks etc.&#xD;&#xA;4. Nodes are used to set up [joints and constraints][8].&#xD;&#xA;4. Nodes contain rendering pipelines only.&#xD;&#xA;&#xD;&#xA;Some implementations use [Visitor Pattern][9] and concept of [RenderPasses][10].&#xD;&#xA;&#xD;&#xA;[Some authors][11] recommend to use DAG (directed acyclic graphs) despite of tree graphs, because trees are not great for handling [Observer][12] relationships. Dirty bits are used to check if the node was updated during current pass.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**My question**. It is very interesting to build scene graph classification. Scene graph concept is too abstract and can be broadly interpreted, that is why it's important to build a classification and basic guides.&#xD;&#xA;&#xD;&#xA;Please, post one classification per answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scene_graph&#xD;&#xA;  [2]: http://www.gamedev.net/reference/programming/features/scenegraph/&#xD;&#xA;  [3]: http://gamearchitect.net/Articles/GameObjects2.html&#xD;&#xA;  [4]: http://gamearchitect.net/Articles/GameObjects3.html&#xD;&#xA;  [5]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [6]: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350&amp;reply_id=2217583&#xD;&#xA;  [7]: http://www.google.lv/images?q=scene%20graph&amp;oe=utf-8&amp;rls=org.mozilla:ru:official&amp;client=firefox&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=ru&amp;tab=wi&amp;biw=1680&amp;bih=840&#xD;&#xA;  [8]: http://www.cc.gatech.edu/classes/AY2007/cs3451_spring/scene.pdf&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/Visitor_pattern&#xD;&#xA;  [10]: http://java.cms.livjm.ac.uk/homura/about.php?project=homura&#xD;&#xA;  [11]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [12]: http://en.wikipedia.org/wiki/Observer_pattern" />
  <row Id="8173" PostHistoryTypeId="5" PostId="4136" RevisionGUID="85a6bd36-3b67-4560-88ad-0348de757702" CreationDate="2010-09-28T15:41:00.080" UserId="1101" Comment="grammar..." Text="My suggestion is to not have game states like this whatsoever. Most of your essential game objects exist across and outside of all the states (eg. renderer, resource loading, input, networking, audio), and a massive amount of the rest span multiple states (eg. players, some NPCs, certain resources).&#xD;&#xA;&#xD;&#xA;On top of that, the stack system doesn't seem to work well in practice. What if I want to bring up an options menu from within the mini-game - how is that going to differ from bringing it up from the main menu? What if I can quit the whole game from within the mini-game?&#xD;&#xA;&#xD;&#xA;I'd ask, what value does this big state system give you? If you need to know what location you're in, store a location object or variable. If you're on the main menu, your GUI object will have a menu panel up; otherwise, it won't. Maybe there's an argument for pushing a new state when you enter a mini-game or cut-scene but I don't think I'd even do it then.&#xD;&#xA;&#xD;&#xA;So my answer to &quot;*how do you share data between same States*&quot; is to not have game states at all." />
  <row Id="8174" PostHistoryTypeId="2" PostId="4139" RevisionGUID="7bbc8642-5525-4998-a914-d7c4c24aa3d5" CreationDate="2010-09-28T16:07:19.797" UserId="1167" Text="In a previous game I wrote I  had a game character class. This class tracked the location, velocity, and a set of states. Except the states were tied very close to the animation. Each state would have a list of buttons that can transition it other states, and an animation that would go with that state (you could also do per-frame animation state changes, if you wanted to do something like have a very specifically timed punch or something). All of the collision data for the character was done on a per animation-frame basis. This was done for a fighting game, so it seemed necessary at the time to have the animation and collision tied so closely to the character state. &#xD;&#xA;&#xD;&#xA;But the programmer in me feels like this is mixing responsibilities. And now I'm making a game engine that I want to be a little bit more generic than that. How do you typically organize the structures relating to the characters, how they're drawn, how they interact with each other and the world, etc? &#xD;&#xA;&#xD;&#xA;I realize this is sort of a vague question that depends on the type of game I want to make, but I think seeing how other people handle this would be useful.&#xD;&#xA;&#xD;&#xA;(and if it matters, this is all for a 2D game.)" />
  <row Id="8175" PostHistoryTypeId="1" PostId="4139" RevisionGUID="7bbc8642-5525-4998-a914-d7c4c24aa3d5" CreationDate="2010-09-28T16:07:19.797" UserId="1167" Text="How to represent a game character in code?" />
  <row Id="8176" PostHistoryTypeId="3" PostId="4139" RevisionGUID="7bbc8642-5525-4998-a914-d7c4c24aa3d5" CreationDate="2010-09-28T16:07:19.797" UserId="1167" Text="&lt;collision-detection&gt;&lt;animation&gt;&lt;learning&gt;&lt;state&gt;" />
  <row Id="8177" PostHistoryTypeId="2" PostId="4140" RevisionGUID="fe2160bc-04c5-43a1-b981-7c24e3b588a0" CreationDate="2010-09-28T16:08:30.957" UserId="93" Text="Having noticed that UDK (Unreal) and Unity 3 include similar pre-computed visibility solutions that unlike Quake are not dependent on level geometry, I've been trying to figure out how the calculation is done.&#xD;&#xA;&#xD;&#xA;The original Quake system is well documented: You divide the world into convex volumes that limit both the camera and the geometry. Each volume has a list of all the other volumes that are visible from it.&#xD;&#xA;&#xD;&#xA;Visibility would be computed by firing rays at some random distribution of points in the target volume and see if any hit. And because the position of the camera in the source volume could have an effect, those thousands of rays would have to be fired from multiple places in the source cell.&#xD;&#xA;&#xD;&#xA;So what I'm wondering is if there's any been fundamental change to this basic scheme in the intervening 15 or so years? I can see how to adapt it to a UDK/Unity scheme that has regular source volumes and deals mostly with arbitrary meshes as the targets, but is there a better way than stochastic ray testing?" />
  <row Id="8178" PostHistoryTypeId="1" PostId="4140" RevisionGUID="fe2160bc-04c5-43a1-b981-7c24e3b588a0" CreationDate="2010-09-28T16:08:30.957" UserId="93" Text="Precomputing Visibility" />
  <row Id="8179" PostHistoryTypeId="3" PostId="4140" RevisionGUID="fe2160bc-04c5-43a1-b981-7c24e3b588a0" CreationDate="2010-09-28T16:08:30.957" UserId="93" Text="&lt;graphics&gt;&lt;pipeline&gt;" />
  <row Id="8180" PostHistoryTypeId="2" PostId="4141" RevisionGUID="6e3685b5-42f3-4545-a6e7-3397d5ee61c3" CreationDate="2010-09-28T16:24:14.287" UserId="744" Text="If the game behavior and the animation are closely related - as they are in fighting games - this is not necessarily mixing responsibilities.&#xD;&#xA;&#xD;&#xA;As munificent said in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture&quot;&gt;Why are MVC &amp; TDD not employed more in game architecture?&lt;/a&gt;, &lt;em&gt;In a game, [model and view] are much closer to each other. The game world (model) is typically a set of entities positioned in some virtual space. The game view is also a set of entities positioned in some virtual space... The end result is that the line between model and view in a game would be arbitrary and not helpful: you'd end up duplicating a lot of state between them.&lt;/em&gt;&#xD;&#xA;&#xD;&#xA;In other words, if a purported abstraction isn't helping parcel responsibility and improve maintainability, it's not abstraction, it's just a division.&#xD;&#xA;&#xD;&#xA;As to how I'd make a game engine that supported any model I needed - whether it's a closely tying animation and physics bits, or a total separation of object interaction and renderer, or both for different things in the same game - I'll give the standard answer. &lt;a href=&quot;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&quot;&gt;Evolve your hierarchy&lt;/a&gt; with &lt;a href=&quot;http://gameprogrammingpatterns.com/component.html&quot;&gt;component-based entities&lt;/a&gt;." />
  <row Id="8181" PostHistoryTypeId="2" PostId="4142" RevisionGUID="c67645fb-8166-4710-bcdf-2d619b1c78e3" CreationDate="2010-09-28T16:39:51.700" UserId="2219" Text="I'm building a game where I form words (think Scrabble) and I need to have them validated in real-time, meaning that I need to have some sort of word list loaded where I can check if the word made exists or not.&#xD;&#xA;&#xD;&#xA;I was wondering what would be the best way to store that list, should I just create an Array or use some sort of database (sqlite3 in this case).&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="8182" PostHistoryTypeId="1" PostId="4142" RevisionGUID="c67645fb-8166-4710-bcdf-2d619b1c78e3" CreationDate="2010-09-28T16:39:51.700" UserId="2219" Text="Best way to store a word list in Java/Android" />
  <row Id="8183" PostHistoryTypeId="3" PostId="4142" RevisionGUID="c67645fb-8166-4710-bcdf-2d619b1c78e3" CreationDate="2010-09-28T16:39:51.700" UserId="2219" Text="&lt;java&gt;&lt;android&gt;" />
  <row Id="8184" PostHistoryTypeId="2" PostId="4143" RevisionGUID="8ff27ee5-bb74-4b17-af86-19f11c863a40" CreationDate="2010-09-28T16:43:42.910" UserId="744" Text="One of the most space-efficient ways to store dictionary words for quick lookup is &lt;a href=&quot;http://en.wikipedia.org/wiki/Trie&quot;&gt;a trie&lt;/a&gt;." />
  <row Id="8185" PostHistoryTypeId="2" PostId="4144" RevisionGUID="1cdfb4bd-b5b4-411f-b291-18f31136f8fc" CreationDate="2010-09-28T17:38:49.450" UserId="469" Text="Game Industry Grunts&#xD;&#xA;&#xD;&#xA;http://gameindustrygrunts.com/&#xD;&#xA;&#xD;&#xA;The idea of this site is that it is free for everyone, so non-rich companies, and rich companies that want post entry-level jobs can post there." />
  <row Id="8186" PostHistoryTypeId="16" PostId="4144" RevisionGUID="1cdfb4bd-b5b4-411f-b291-18f31136f8fc" CreationDate="2010-09-28T17:38:49.450" UserId="-1" />
  <row Id="8187" PostHistoryTypeId="5" PostId="4134" RevisionGUID="7568e17a-8e1c-4837-8593-fc6ef9bbe6da" CreationDate="2010-09-28T18:05:42.797" UserId="1677" Comment="added 70 characters in body" Text="[Scene graph][1] is a popular method to organize game objects and UI. Scene graphs can be handy when you go totally data-driven. Wiki says:&#xD;&#xA;&#xD;&#xA;&gt; The scene graph is a structure that arranges the logical and often (but not necessarily) spatial representation of a graphical scene. The definition of a scene graph is fuzzy because programmers who implement scene graphs in applications and in particular the games industry take the basic principles and adapt these to suit particular applications. This means there is no consensus as to what a scene graph should be.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some links:&#xD;&#xA;&#xD;&#xA;[Understanding and Implementing Scene Graphs][2]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs][3]&#xD;&#xA;&#xD;&#xA;[Game Object Structure: Scene Graphs Revisited][4]&#xD;&#xA;&#xD;&#xA;[&quot;Dependency Graphs In Games&quot; by Jelle van der Beek][5]&#xD;&#xA;&#xD;&#xA;[Infinity: Pipeline system description][6]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Google image &quot;scene graph&quot; search][7] shows that there are many different approaches to build scene graphs. Some of them:&#xD;&#xA;&#xD;&#xA;1. Nodes contain only logic data.&#xD;&#xA;2. Nodes contain and combine logic data, meshes, rendering states, transformations etc.&#xD;&#xA;3. Nodes are used to separate spatial information to optimize collision checks etc.&#xD;&#xA;4. Nodes are used to set up [joints and constraints][8].&#xD;&#xA;4. Nodes contain rendering pipelines only.&#xD;&#xA;&#xD;&#xA;Some implementations use [Visitor Pattern][9] and concept of [RenderPasses][10].&#xD;&#xA;&#xD;&#xA;[Some authors][11] recommend to use DAG (directed acyclic graphs) despite of tree graphs, because trees are not great for handling [Observer][12] relationships. Dirty bits are used to check if the node was updated during current pass.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**My question**. It is very interesting to build scene graph classification. Scene graph concept is too abstract and can be broadly interpreted, that is why it's important to build a classification and basic guides. **Which scene graph classification do you know / would you propose?**&#xD;&#xA;&#xD;&#xA;Please, post one classification per answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scene_graph&#xD;&#xA;  [2]: http://www.gamedev.net/reference/programming/features/scenegraph/&#xD;&#xA;  [3]: http://gamearchitect.net/Articles/GameObjects2.html&#xD;&#xA;  [4]: http://gamearchitect.net/Articles/GameObjects3.html&#xD;&#xA;  [5]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [6]: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350&amp;reply_id=2217583&#xD;&#xA;  [7]: http://www.google.lv/images?q=scene%20graph&amp;oe=utf-8&amp;rls=org.mozilla:ru:official&amp;client=firefox&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=ru&amp;tab=wi&amp;biw=1680&amp;bih=840&#xD;&#xA;  [8]: http://www.cc.gatech.edu/classes/AY2007/cs3451_spring/scene.pdf&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/Visitor_pattern&#xD;&#xA;  [10]: http://java.cms.livjm.ac.uk/homura/about.php?project=homura&#xD;&#xA;  [11]: http://www.gamasutra.com/view/feature/2812/dependency_graphs_in_games.php?print=1&#xD;&#xA;  [12]: http://en.wikipedia.org/wiki/Observer_pattern" />
  <row Id="8188" PostHistoryTypeId="2" PostId="4145" RevisionGUID="d9f4926b-f60e-41ce-8d31-935b70a8cff5" CreationDate="2010-09-28T18:54:36.410" UserId="1677" Text="[Observer pattern][1] is one of the best solution. Message will be sent only to those objects (components) that are really interested in it. So reciever must subscribe on this message/event type.&#xD;&#xA;&#xD;&#xA;There are many signal/slot implementations. For example, in C++ there is a&#xD;&#xA;[sigslot library][2] &#xD;&#xA;&#xD;&#xA;For more information read about [Qt signals and slots][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Observer_pattern&#xD;&#xA;  [2]: http://sigslot.sourceforge.net/&#xD;&#xA;  [3]: http://doc.trolltech.com/3.3/signalsandslots.html" />
  <row Id="8189" PostHistoryTypeId="2" PostId="4146" RevisionGUID="f252ac64-53f6-4c70-9c40-a288e1dc7bfc" CreationDate="2010-09-28T19:01:17.027" UserId="1677" Text="&quot;The Secret of Monkey Island&quot;.&#xD;&#xA;&#xD;&#xA;What? A secret? - buyer asks. - I love secrets! What? A *Monkey* Island? Really? Where?&#xD;&#xA;&#xD;&#xA;...This is an example of a popular title that provokes many questions and funny associations. I think this is an example of a good title." />
  <row Id="8190" PostHistoryTypeId="2" PostId="4147" RevisionGUID="f438485b-43ce-446b-95cb-289775113708" CreationDate="2010-09-28T19:05:29.123" UserId="1677" Text="[SSG: A Simple Scene Graph API for OpenGL][1]&#xD;&#xA;&#xD;&#xA;[Open Scene Graph][2]&#xD;&#xA;&#xD;&#xA;[OpenSG][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://plib.sourceforge.net/ssg/index.html&#xD;&#xA;  [2]: http://www.openscenegraph.org/projects/osg&#xD;&#xA;  [3]: http://www.opensg.org/" />
  <row Id="8191" PostHistoryTypeId="2" PostId="4148" RevisionGUID="ca874d27-730f-4792-aaf4-492ccadca0e3" CreationDate="2010-09-28T19:07:19.333" UserDisplayName="jricher" Text="As has been mentioned, OGRE is a rendering engine only. However, there are systems such as Python-OGRE which include other libraries and wrappers that are needed for a real game engine, of course using OGRE as a rendering engine. " />
  <row Id="8192" PostHistoryTypeId="16" PostId="4134" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-28T19:55:00.093" UserId="14" />
  <row Id="8193" PostHistoryTypeId="5" PostId="4093" RevisionGUID="13127611-c3ed-4904-8814-5d8650843f37" CreationDate="2010-09-28T21:30:08.090" UserId="2288" Comment="deleted 76 characters in body" Text="In a 2d game, I have a basic camera class.  The guts of the class creates a transformation matrix that is later passed to the Begin() method of a SpriteBatch.  The transformation is done like this:&#xD;&#xA;&#xD;&#xA;            Transform = Matrix.Identity *&#xD;&#xA;                        Matrix.CreateTranslation(-Position.X, -Position.Y, 0) *&#xD;&#xA;                        Matrix.CreateScale(new Vector3(Scale, Scale, Scale)) *&#xD;&#xA;                        Matrix.CreateTranslation(ScreenCenter.X, ScreenCenter.Y, 0);&#xD;&#xA;&#xD;&#xA;I'm trying to create an effect that zooms in on a specific point on the screen.  The issue is that the zoom/translation causes a strange &quot;swooping&quot; effect when applied.  For example, when the zoom is set to 1.0 and the current position is (0, 0), and I change these to 2.0 and (100, 200) over a 1 second interval, the camera appears to take a curved path to (100, 200).&#xD;&#xA;&#xD;&#xA;Here is my code to update the position / scale on each frame (I removed logic to determine when the transition is finished):&#xD;&#xA;&#xD;&#xA;            _positionTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;            _scaleTimeElapsed += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;&#xD;&#xA;            Position = Vector2.Lerp(&#xD;&#xA;                _positionStart,&#xD;&#xA;                PositionDestination.Value,&#xD;&#xA;                (float)(_positionTimeElapsed / TransitionTimeMilliseconds));&#xD;&#xA;&#xD;&#xA;            Scale = (ScaleDestination.Value - _scaleStart)&#xD;&#xA;                 * (float)(_scaleTimeElapsed / TransitionTimeMilliseconds)&#xD;&#xA;                 + _scaleStart;&#xD;&#xA;&#xD;&#xA;I'm relatively confident that I'm missing something basic about Matrix math.  Does anyone know how to transition both position and scale simultaneously and have the camera appear to take a linear path to the destination?&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;Added two videos on YouTube that show the issue and the fix in action.  These videos zoom to 10x over 5 seconds to make the bug obvious.&#xD;&#xA;&#xD;&#xA;Broken: http://www.youtube.com/watch?v=d8fJ4Zf-sqU&#xD;&#xA;&#xD;&#xA;Fixed: http://www.youtube.com/watch?v=GpcUc25eZ8o" />
  <row Id="8194" PostHistoryTypeId="2" PostId="4149" RevisionGUID="e13abc46-3baf-4b84-9f67-f6c4c9fd8c6c" CreationDate="2010-09-28T22:01:56.590" UserId="1780" Text="The concept of state stacks is very valuable and very useful in games.  One particular game in my memory had the major states of &quot;main menu&quot;, &quot;playing a movie&quot;, &quot;in game&quot;, and &quot;in-game menu&quot;, with a centralized place that handled transitioning between these things.  It was great because you could push a ton of crap at once and end up where you wanted to be without guessing.  E.g. at startup &quot;main menu&quot; is pushed, then &quot;movie&quot; (gamelogo) then another &quot;movie&quot; (dev logo) then a third movie (pub logo).&#xD;&#xA;&#xD;&#xA;Then the in-game had a ton of state, and that state was per-level.  In this case it didn't make sense to make it a stack, since only one could be active at a time and the endlevel code would take care of transitioning to the next level (after pushing the load/save UI which in this case was part of the main menu).&#xD;&#xA;&#xD;&#xA;Each level will likely have a ton of &quot;areas&quot; or sublevels or whatever.  There is stuff that exists only in an area (e.g. the monsters), but there is the stuff that transcends the sublevels and is more appropriately &quot;owned&quot; by the level itself or even the in-game state &quot;object&quot;.  (The game I'm recalling had different player &quot;costumes&quot; in different levels, so it made sense to attach that to the level.  Other games might just load a single player model and use it for the life of the in-game state.)&#xD;&#xA;&#xD;&#xA;Some states do have sub-states though.  These aren't polluting the &quot;main&quot; state stack, these are internal state stacks.  E.g. the in-game menu will have a page stack like Ricket discusses so that &quot;back&quot; works uniformly.  The memory card handling may be another separate stack too since it runs asynchronous to the rest of the UI.&#xD;&#xA;&#xD;&#xA;*In short, put data where it makes the most sense to you, and don't hesitate to move it if another home becomes preferable.*" />
  <row Id="8195" PostHistoryTypeId="2" PostId="4150" RevisionGUID="bbaa934e-012a-4be9-a815-67d656f16fef" CreationDate="2010-09-28T22:13:52.897" UserId="1780" Text="***News flash!***&#xD;&#xA;&#xD;&#xA;Different people/teams do things differently!  My proposal would be to do what works for your game, since any answer is wrong for 90% of games.  Any *list* of methods that people use to construct and maintain their scenes is going to be similarly useless without substantial discussion about the pros and cons of said implementations." />
  <row Id="8196" PostHistoryTypeId="16" PostId="4150" RevisionGUID="bbaa934e-012a-4be9-a815-67d656f16fef" CreationDate="2010-09-28T22:13:52.897" UserId="-1" />
  <row Id="8197" PostHistoryTypeId="2" PostId="4151" RevisionGUID="b854e927-ad43-465d-a135-b7c2a039dc6c" CreationDate="2010-09-28T22:13:58.163" UserId="1232" Text="A few ideas:&#xD;&#xA;&#xD;&#xA;1] Have you used a standard model format (eg .obj, or .x) or do you use a custom model format when loading directly into your game? If you've got a custom format, and one would have have to reverse engineer your model format to get it into a useful form, then you've already got some level of protection against the opportunistic asset ripper.&#xD;&#xA;&#xD;&#xA;2] Kylotan's point about XOR encryption is excellent, except to note you can encrypt using a pseudo-random number generated sequence (possibly seeded by a hash on the filename) to avoid long sequences of zeroes in your source data showing your encryption string. Of course you'd have to in-place decrypt your files immediately after they're loaded, but breaking your encrypted file into restartable blocks will allow you to kick off in-place decryption on multiple threads if this really became a load-time burden.  But I seriously doubt this level of &quot;protection&quot; is required - particularly, as others have said, the determined ripper will get around it. eg. by intercepting the draw calls by using a DLL detour library, and reading back the vertex buffers/index buffers directly.&#xD;&#xA;&#xD;&#xA;3] You'd have to ask the original asset provider about their requirements for protection, but it could just be a matter of adding a blurb about asset copyrights to your program splash screen and/or to your EULA." />
  <row Id="8198" PostHistoryTypeId="6" PostId="4097" RevisionGUID="93adb2cb-ea38-4384-9ae0-543e95f08991" CreationDate="2010-09-28T23:40:00.017" UserId="1198" Comment="edited tags" Text="&lt;c++&gt;&lt;iphone&gt;&lt;c&gt;&lt;framework&gt;" />
  <row Id="8199" PostHistoryTypeId="5" PostId="4092" RevisionGUID="1b9606db-36df-4557-ac7f-b4b3168597eb" CreationDate="2010-09-28T23:44:24.323" UserId="2289" Comment="added 4 characters in body" Text="I'm looking to develop a multitouch rhythm game in C#. It is aimed to be a simulator for an existing arcade game, similar to this: http://www.youtube.com/watch?v=TAiNNpA3wwg So far, I've decided on several requirements for the game that should be present:  &#xD;&#xA;&#xD;&#xA;1) Unicode text display, without the characters being known beforehand (i.e. the displayed strings are not known at compile time, but entered in by the user).  &#xD;&#xA;2) Support for display of all the common image formats (PNG, JPG, BMP, and GIF) and playback of various audio (MP3, WAV, OGG, FLAC) and video formats.  &#xD;&#xA;3) Full multitouch support (I'd like to support as many simultaneous inputs as the user's hardware allows). **VERY IMPORTANT, MUCH MORE SO THAN THE OTHER TWO.**&#xD;&#xA;&#xD;&#xA;I had been fiddling with XNA, but I've found drawing arbitrary Unicode text with SpriteFonts difficult (it hates it when you try and load the entire CJK Unified set). In addition, I haven't found an easy way to load certain formats like Ogg Vorbis audio in XNA.&#xD;&#xA;&#xD;&#xA;So, with this in mind, I've started looking into using DirectX 10 via SlimDX. However, I'm very lost, and am unsure of how to start with it and if the features I need are even present in it. To top it off, SlimDX documentation seems to be very lacking, especially with me being new to game development. Which one of the two frameworks would be best for my goals?&#xD;&#xA;&#xD;&#xA;P.S.: Any references to starting game development with SlimDX (June 2010) would be very helpful as well, especially in relation to Direct2D, which what I'll most likely be using." />
  <row Id="8200" PostHistoryTypeId="2" PostId="4152" RevisionGUID="8ae719dd-91cd-4d71-b7b2-efc5f029678b" CreationDate="2010-09-29T00:25:25.670" UserId="1780" Text="I used basically this exact system in several systems orthogonally; the frontend and in-game menu (aka &quot;pause&quot;) states, for instance, had their own state stacks.  The in-game UI also used something like this although it had &quot;global&quot; aspects (like the healthbar and the map/radar) that the state switching might tint but which updated in a common way across states.&#xD;&#xA;&#xD;&#xA;The in-game menu may be &quot;better&quot; represented by a DAG, but with an implicit state machine (each menu option that goes to another screen knows how to go there, and pressing the back button always popped the top state) the effect was exactly the same.&#xD;&#xA;&#xD;&#xA;Some of these other systems also had &quot;replace top state&quot; functionality, but that was typically implemented as `StatePop()` followed by `StatePush(x);`.&#xD;&#xA;&#xD;&#xA;Memory card handling was similar since I did actually push a ton of &quot;operations&quot; into the operation queue (which functionally did the same thing as the stack, just as FIFO rather than LIFO); once you start using this sort of structure (&quot;there's one thing happening now, and when it's done it pops itself&quot;) it starts infecting every area of the code.  Even the AI started using something like this; the AI was &quot;clueless&quot; then switched into &quot;wary&quot; when the player made noises but wasn't seen, and then finally elevated to &quot;active&quot; when they saw the player (and unlike lesser games of the time, you couldn't hide in a cardboard box and make the enemy forget about you!  Not that I'm bitter...).&#xD;&#xA;&#xD;&#xA;GameState.h:&#xD;&#xA;&#xD;&#xA;    enum GameState&#xD;&#xA;    {&#xD;&#xA;       k_frontend,&#xD;&#xA;       k_gameplay,&#xD;&#xA;       k_inGameMenu,&#xD;&#xA;       k_moviePlayback,&#xD;&#xA;       k_numStates&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    void GameStatePush(GameState);&#xD;&#xA;    void GameStatePop();&#xD;&#xA;    void GameStateUpdate();&#xD;&#xA;&#xD;&#xA;GameState.cpp:&#xD;&#xA;&#xD;&#xA;    // k_maxNumStates could be bigger, but we don't need more than&#xD;&#xA;    // one of each state on the stack.&#xD;&#xA;    static const int k_maxNumStates = k_numStates;&#xD;&#xA;    static GameState s_states[k_maxNumStates] = { k_frontEnd };&#xD;&#xA;    static int s_numStates = 1;&#xD;&#xA;    &#xD;&#xA;    static void (*s_startupFunctions)()[] =&#xD;&#xA;       { FrontEndStart, GameplayStart, InGameMenuStart, MovieStart };&#xD;&#xA;    static void (*s_shutdownFunctions)()[] =&#xD;&#xA;       { FrontEndStop, GameplayStop, InGameMenuStop, MovieStop };&#xD;&#xA;    static void (*s_updateFunctions)()[] =&#xD;&#xA;       { FrontEndUpdate, GameplayUpdate, InGameMenuUpdate, MovieUpdate };&#xD;&#xA;    &#xD;&#xA;    static void GameStateStart(GameState);&#xD;&#xA;    static void GameStateStop(GameState);&#xD;&#xA;    &#xD;&#xA;    void GameStatePush(GameState gs)&#xD;&#xA;    {&#xD;&#xA;       Assert(s_numStates &lt; k_maxNumStates);&#xD;&#xA;       GameStateStop(s_states[s_numStates - 1])&#xD;&#xA;       s_states[s_numStates] = gs;&#xD;&#xA;       s_numStates++;&#xD;&#xA;       GameStateStart(gs);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void GameStatePop()&#xD;&#xA;    {&#xD;&#xA;       Assert(s_numStates &gt; 1);  // can't pop last state&#xD;&#xA;       s_numStates--;&#xD;&#xA;       GameStateStop(s_states[s_numStates]);&#xD;&#xA;       GameStateStart(s_states[s_numStates - 1]);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void GameStateUpdate()&#xD;&#xA;    {&#xD;&#xA;       GameState current = s_states[s_numStates - 1];&#xD;&#xA;       s_updateFunctions[current]();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void GameStateStart(GameState gs)&#xD;&#xA;    {&#xD;&#xA;       s_startupFunctions[gs]();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void GameStateStop(GameState gs)&#xD;&#xA;    {&#xD;&#xA;       s_shutdownFunctions[gs]();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8201" PostHistoryTypeId="2" PostId="4153" RevisionGUID="1f0d1d2f-dade-4a6e-9281-f04374e5629b" CreationDate="2010-09-29T05:52:11.550" UserId="1738" Text="On the exact analytic visibility side:&#xD;&#xA;&#xD;&#xA;Rather than casting a gazillion ray in the hope that N=gazillion is actually enough, there are researchers who have developed analytic algorithms, which will compute exactly which triangles, objects or cells are visible from another cell (i.e., the same result as if you case an infinite set of rays).&#xD;&#xA;&#xD;&#xA;See [Shaun Nirenstein's exact visibility page][1] for a set of publications on this subject.  You may note that one of the authors of the 2005 paper is the CTO of Umbra Sotware (the visibility middleware paired with Unity 3).  I don't know whether or not this technology is used in the Umbra product or not.  For scenes with specific structure (i.e., cell/portal), an analytic solution is covered nicely in Seth Teller's 1992 thesis [here][2].  Jiri Bittner's [thesis][3] also presents an analytic solution.&#xD;&#xA;&#xD;&#xA;Generally, analytic visibility is hard to get right (mathematically complex, numerical issues, speed, etc.), but if done right it would make for a compelling piece of middleware.&#xD;&#xA;&#xD;&#xA;On the ray casting side:&#xD;&#xA;&#xD;&#xA;The algorithm you described has been around since the late 80's&#xD;&#xA;(see [Towards Image Realism with Interactive Update Rates&#xD;&#xA;in Complex Virtual Building Environments][4]).&#xD;&#xA;&#xD;&#xA;There have been many advances in the ray-casting approaches in the last few years.  Researchers have devised algorithims that choose fewer, but better rays using heuristics, and also may compute visibility over multiple cells simultaneously.  See the papers on [Peter Wonka's page][5] (Guided Visibility Sampling and Adaptive Global Visibility Sampling).  These get great results.&#xD;&#xA;&#xD;&#xA;Probably the class of technique that is still used the most today in practice is the GPU accelerated hemicube algorithms.  These just sample visibility from a set of points by rendering a 6 sided cube map and reading back object/triangle/cell indices as data.  Occlusion queries can also be used to reduce the amount of data read back.  Algorithms based off this tend to be easy to implement and give good results in practice (fast as hell, since they use the GPU), but the sampling distribution (millions of rays cast from a realtively small set of single points), may make it take longer to converge on an accurate solution then one would think.  [This technique][6] tries to choose better visibility cube source locations than a simple uniform or random sampling.&#xD;&#xA;&#xD;&#xA;There are plenty of other visibility techniques (hundreds).  I suggest reading some of the background chapters in the theses linked to, if you want to know more.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nirenstein.com/e107/page.php?14&#xD;&#xA;  [2]: http://people.csail.mit.edu/seth/pubs/pubs.html&#xD;&#xA;  [3]: http://www.cgg.cvut.cz/members/bittner/&#xD;&#xA;  [4]: ftp://ftp.cs.unc.edu/pub/techreports/90-001.pdf&#xD;&#xA;  [5]: http://www.public.asu.edu/~pwonka/Publications/publications.html&#xD;&#xA;  [6]: http://www.nirenstein.com/e107/page.php?13" />
  <row Id="8202" PostHistoryTypeId="2" PostId="4154" RevisionGUID="db5dbd55-9f34-4d33-b557-b4a76987f94b" CreationDate="2010-09-29T09:53:07.720" UserId="1248" Text="I have gone down this road a few times, and always decided to put it off. I am finally to the point I need to choose an Audio library and stick with it. I switched physics engines 3 times which caused quite a bit of wasted time, so I would like to be set when I pick an Audio lib. I will be falling into the &quot;indie&quot; section as far as licensing goes. Here is what I have so far..&#xD;&#xA;&#xD;&#xA;FMOD - Quality Middleware, success has gone to their heads and it seems they did away with the indie license recently. Price range seems to go from Free - 3000$ - 6000$ which pretty much excludes this.&#xD;&#xA;&#xD;&#xA;BASS - So far this is what I am leaning towards. Simple API, great feature list, and quite a bit more. The pricing structure looks somewhat similar to FMOD, but I will need to pull out the Euro to Dollar calculator, and figure out if the Shareware license would be applicable to Digitally Distributed Content.&#xD;&#xA;&#xD;&#xA;IrrKlang - Pricing looks fair, features seem generic. Pretty much coming down to a battle between this and BASS. I have heard good and bad things.&#xD;&#xA;&#xD;&#xA;The other libraries such as OpenAL, PortAudio, Audiere, etc. were considered, but I am looking for something more drag and drop rather than something I am going to be basically writing my own front-end for. I am curious though, I remember stumbling across another library or two a few months ago on par with FMOD/BASS/etc that were fairly new. No matter how hard I look now, I cannot find them. Hopefully someone here knows what they might be called.&#xD;&#xA;&#xD;&#xA;Anyways, basically just looking for feedback from other member's experiences, thoughts, and so on." />
  <row Id="8203" PostHistoryTypeId="1" PostId="4154" RevisionGUID="db5dbd55-9f34-4d33-b557-b4a76987f94b" CreationDate="2010-09-29T09:53:07.720" UserId="1248" Text="Choosing an Audio API" />
  <row Id="8204" PostHistoryTypeId="3" PostId="4154" RevisionGUID="db5dbd55-9f34-4d33-b557-b4a76987f94b" CreationDate="2010-09-29T09:53:07.720" UserId="1248" Text="&lt;c++&gt;&lt;audio&gt;&lt;sound&gt;" />
  <row Id="8205" PostHistoryTypeId="2" PostId="4155" RevisionGUID="a55db383-cf01-4e1e-adc2-74735de43ad8" CreationDate="2010-09-29T10:18:06.150" UserId="744" Text="Thanks for reminding me about this.&#xD;&#xA;&#xD;&#xA;The answer, is _no, you can't do this in stock Box2D_. Joints don't have enough accessors to get back a correct JointDef. You can back-def-ify simple bodies, but nothing jointed, and the simple bodies are usually trivial enough you wouldn't need to do a copy of the world to predict their motion accurately anyway." />
  <row Id="8206" PostHistoryTypeId="2" PostId="4156" RevisionGUID="0ee087f1-b26b-406b-863f-1618668a898d" CreationDate="2010-09-29T10:55:58.377" UserId="919" Text="Someone I know suggested just making every customizable on the model then just hide the non active ones. But that doesn't sound very efficient for me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So my question is what is the best method to use for making customizable 3d avatars in general? And specifically what would be best used in Unity3d? &#xD;&#xA;" />
  <row Id="8207" PostHistoryTypeId="1" PostId="4156" RevisionGUID="0ee087f1-b26b-406b-863f-1618668a898d" CreationDate="2010-09-29T10:55:58.377" UserId="919" Text="What is the best methodology in mounting customizable to a 3d avatar in Unity?" />
  <row Id="8208" PostHistoryTypeId="3" PostId="4156" RevisionGUID="0ee087f1-b26b-406b-863f-1618668a898d" CreationDate="2010-09-29T10:55:58.377" UserId="919" Text="&lt;3d&gt;&lt;unity&gt;&lt;methodology&gt;" />
  <row Id="8209" PostHistoryTypeId="2" PostId="4157" RevisionGUID="2f5e6f9a-e2b3-4276-b8ac-7ce9243bfadf" CreationDate="2010-09-29T12:37:51.513" UserId="825" Text="I have a few books on Design Patterns, and have read some articles, but cannot intuitively figure out which programming design patterns would be useful in game development.&#xD;&#xA;&#xD;&#xA;For example, I have a book called ActionScript 3 with Design Patterns that details several design patterns such as Model View Controller, Singleton, Factory, Command, etc.&#xD;&#xA;&#xD;&#xA;As someone new to this, I cannot figure out which of these would be useful, or in fact if any of these are the design patterns I should be learning and trying to use.  Perhaps there are other, more game-programming-specific design patterns that I am not even aware of?&#xD;&#xA;&#xD;&#xA;If you have experience using a certain design pattern in game development, I'd love to hear it.  Reasoning as to why it was used, code samples, or online resources would all be very helpful as well if you have them.  I am at the moment most interested in ActionScript 3 and C++ implementations, but could definitely benefit from experience and examples from any language.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="8210" PostHistoryTypeId="1" PostId="4157" RevisionGUID="2f5e6f9a-e2b3-4276-b8ac-7ce9243bfadf" CreationDate="2010-09-29T12:37:51.513" UserId="825" Text="What are some programming design patterns that are useful in game development?" />
  <row Id="8211" PostHistoryTypeId="3" PostId="4157" RevisionGUID="2f5e6f9a-e2b3-4276-b8ac-7ce9243bfadf" CreationDate="2010-09-29T12:37:51.513" UserId="825" Text="&lt;c++&gt;&lt;programming&gt;&lt;best-practices&gt;&lt;actionscript-3&gt;&lt;design-patterns&gt;" />
  <row Id="8212" PostHistoryTypeId="16" PostId="4157" RevisionGUID="2f5e6f9a-e2b3-4276-b8ac-7ce9243bfadf" CreationDate="2010-09-29T12:37:51.513" UserId="825" />
  <row Id="8215" PostHistoryTypeId="2" PostId="4159" RevisionGUID="f33b9f16-e02c-4ccb-95d3-9e51d9a23d96" CreationDate="2010-09-29T13:19:18.000" UserId="1101" Text="All of them. Except Singleton.&#xD;&#xA;[/flippancy]" />
  <row Id="8216" PostHistoryTypeId="16" PostId="4159" RevisionGUID="f33b9f16-e02c-4ccb-95d3-9e51d9a23d96" CreationDate="2010-09-29T13:19:18.000" UserId="-1" />
  <row Id="8217" PostHistoryTypeId="2" PostId="4160" RevisionGUID="cbc77774-f6ec-4f4e-b5ca-68d0e16b6673" CreationDate="2010-09-29T13:19:38.167" UserId="14" Text="If I remember correctly you'd ideally want to use assetbundles to accomplish this. Asset Bundles are only available in Unity Pro, and they have an example project (with the webplayer and tutorial) to help you understand how to accomplish that effect.&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/resources/example-projects/charactercustomization" />
  <row Id="8218" PostHistoryTypeId="2" PostId="4161" RevisionGUID="ed789fcb-9272-453b-9849-06351a12b09b" CreationDate="2010-09-29T13:44:55.967" UserId="1101" Text="Now for a less flippant response, with some suggestions. Don't take these as implementation recommendations, more as examples of possible use.&#xD;&#xA;&#xD;&#xA;  - Builder: set up component-based entity one component at a time, based on data&#xD;&#xA;  - Factory Method: create NPCs or GUI widgets based on a string read from a file&#xD;&#xA;  - Prototype: store one generic 'Elf' character with initial properties and create Elf instances by cloning it.&#xD;&#xA;  - Singleton: [*this space deliberately left blank.*][1]&#xD;&#xA;  - Adapter: incorporate an optional 3rd party library by wrapping it in a layer that looks like your existing code. Very useful with DLLs.&#xD;&#xA;  - Composite: make a scene graph of renderable objects, or make a GUI out of a tree of Widgets&#xD;&#xA;  - Facade: simplify complex 3rd party libraries by providing a simpler interface to make your life easier later.&#xD;&#xA;  - Flyweight: store the shared aspects of an NPC (eg. models, textures, animations) separately from the individual aspects (eg. position, health) in a mostly transparent way&#xD;&#xA;  - Proxy: Create small classes on a client that represent larger, more complex classes on a server, and forward requests via the network.&#xD;&#xA;  - Chain of responsibility: handle input as a chain of handlers, eg. global keys (eg. for screen shots), then the GUI (eg. in case a text box is focused or a menu is up), then the game (eg. for moving a character)&#xD;&#xA;  - Command: encapsulate game functionality as commands which can be typed into a console, stored and replayed, or even scripted to help test the game&#xD;&#xA;  - Mediator: implement game entities as a small mediator class that operates on different components (eg. reading from the health component in order to pass the data to the AI component)&#xD;&#xA;  - Observer: have the renderable representation of a character listen to events from the logical representation, in order to change the visual presentation when necessary without the game logic needing to know anything about rendering code&#xD;&#xA;  - State: store NPC AI as one of several states, eg. Attacking, Wandering, Fleeing. Each can have its own update() method and whatever other data it needs (eg. storing which character it is attacking or fleeing from, the area in which it is wandering, etc.)&#xD;&#xA;  - Strategy: switch between different heuristics for your A* search, depending on what sort of terrain you're in, or perhaps even to use the same A* framework to do both pathfinding and more generic planning&#xD;&#xA;  - Template method: set up a generic 'combat' routine, with various hook functions to handle each step, eg. decrement ammo, calculate hit chance, resolve hit or miss, calculate damage, and each type of attack skill will implement the methods in their own specific way&#xD;&#xA;&#xD;&#xA;Some patterns left out due to lack of inspiration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.informit.com/articles/article.aspx?p=1404056" />
  <row Id="8219" PostHistoryTypeId="16" PostId="4161" RevisionGUID="ed789fcb-9272-453b-9849-06351a12b09b" CreationDate="2010-09-29T13:44:55.967" UserId="-1" />
  <row Id="8220" PostHistoryTypeId="2" PostId="4162" RevisionGUID="09c658de-184f-4410-85c8-051c79105381" CreationDate="2010-09-29T14:04:59.637" UserId="744" Text="One thing Brandon Eich had the good sense to bring up in &lt;a href=&quot;http://www.amazon.com/gp/product/1430219483&quot;&gt;&lt;i&gt;Coders at Work&lt;/a&gt;&lt;/i&gt; is that patterns are hacks and workarounds: &lt;em&gt;[Patterns] show some kind of defect in the language. These patterns are not free. There's no free lunch. So we should be looking for evolution in the language that adds the right bits.&lt;/em&gt;&#xD;&#xA;&#xD;&#xA;As game programmers rather than compiler designers we rarely get the option to evolve the languages we use, but we can learn to evolve our own style to better fit our language and requirements. Patterns are some of this, but _not using patterns_ is another part, especially since as Brandon says, patterns rarely go without a notable performance or memory or code agility cost. MVC just is not a great pattern for many things in games. Singleton is a workaround for lame C++ static initialization rules, and you probably shouldn't be doing those anyway. Factory simplifies complicated object creation - maybe your objects should just be simpler to start with. The popular patterns are tools to resort to _when we need them_ to manage something complex, not tools we should be longing to use to build something complex at the start. &#xD;&#xA;&#xD;&#xA;Good (game) code might use patterns, or it might not. If it does use patterns, fine - they're a great communication tool to explain code structure to other programmers at a high, language-independent level. If you think the code is better without using a pattern, don't beat yourself up over it - it probably is." />
  <row Id="8221" PostHistoryTypeId="16" PostId="4162" RevisionGUID="09c658de-184f-4410-85c8-051c79105381" CreationDate="2010-09-29T14:04:59.637" UserId="-1" />
  <row Id="8223" PostHistoryTypeId="2" PostId="4163" RevisionGUID="a6f2074e-72b0-499e-aea7-8ef10df0a03b" CreationDate="2010-09-29T14:30:10.223" UserId="1477" Text="Another idea. Figure out your max expected population for the world, and how much money would be reasonable for that population. Put that much money in the world, but have most of it be mineral that must be mined up and converted into coins. &#xD;&#xA;&#xD;&#xA;Allow humanoid NPCs to set up mining and don't give out money for non-humanoid npcs when it doesn't make sense for them to have money anyway. You can allow a skinning system to get material out of npcs that don't give money that they could trade for money(doesn't have to be just skins, claws, teeth, poison glands, whatever valuable body part the animal might have).&#xD;&#xA;&#xD;&#xA;If player growth outpaces NPC mining's generation of money currency will deflate and encourage players to set up their own mines(gold rush?) until you eventually reach your theoretical max and things get balanced out. When players close their accounts you could convert the money they had back into mineral wealth in a new vein or extending an old vein." />
  <row Id="8227" PostHistoryTypeId="2" PostId="4165" RevisionGUID="10f71a9c-3e1e-467f-aa4e-a9da52ba9d21" CreationDate="2010-09-29T14:50:23.600" UserId="953" Text="Of course, as others have said, all patterns are useful in the right circumstances, and part of learning how to use them is learning when to use them.  However, the excellent book *Core Techniques and Algorithms in Game Programming* by Daniel Sanchez-Crespo Dalmau, lists six programming patterns and six usability patterns as especially useful in game programming.&#xD;&#xA;&#xD;&#xA;Programming:&#xD;&#xA;&#xD;&#xA; - Singleton: I don't hate this one like many people do; it can be used for things like the single-player player or the keyboard reader.&#xD;&#xA; - Factory: Lets you create and destroy objects efficiently.&#xD;&#xA; - Strategy: Lets you change out AI strategies elegantly.&#xD;&#xA; - Spatial Index: Helps perform queries on spatial data sets.&#xD;&#xA; - Composite: Sets up a useful object heirarchy.&#xD;&#xA; - Flyweight: Frees memory by genericizing things like identical enemies.&#xD;&#xA;&#xD;&#xA;Usability:&#xD;&#xA;&#xD;&#xA; - Shield: Protects from accidental activation of dramatic actions.&#xD;&#xA; - State: Visual cues of the world/UI status.&#xD;&#xA; - Automatic Mode Cancellation: Makes the game work more intutitively.&#xD;&#xA; - Magnetism: Autoaiming and easy unit selection.&#xD;&#xA; - Focus: Eliminating distracting UI elements.&#xD;&#xA; - Progress: Universally useful.&#xD;&#xA;&#xD;&#xA;The book, of course, goes into more detail on each of these." />
  <row Id="8228" PostHistoryTypeId="16" PostId="4165" RevisionGUID="10f71a9c-3e1e-467f-aa4e-a9da52ba9d21" CreationDate="2010-09-29T14:50:23.600" UserId="-1" />
  <row Id="8234" PostHistoryTypeId="16" PostId="3754" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-29T16:27:14.860" UserId="51" />
  <row Id="8235" PostHistoryTypeId="16" PostId="3755" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-29T16:27:14.860" UserId="51" />
  <row Id="8236" PostHistoryTypeId="16" PostId="3757" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-29T16:27:14.860" UserId="51" />
  <row Id="8237" PostHistoryTypeId="16" PostId="3753" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-09-29T16:27:14.860" UserId="51" />
  <row Id="8238" PostHistoryTypeId="10" PostId="4154" RevisionGUID="28c83ead-b442-4ebb-b222-c72d6afbb09d" CreationDate="2010-09-29T16:27:31.537" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="8239" PostHistoryTypeId="5" PostId="4154" RevisionGUID="4f660446-da2e-4c34-8625-e76ee1859820" CreationDate="2010-09-29T16:27:31.663" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Cross-Platform Audio API Suggestions](http://gamedev.stackexchange.com/questions/3753/cross-platform-audio-api-suggestions)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have gone down this road a few times, and always decided to put it off. I am finally to the point I need to choose an Audio library and stick with it. I switched physics engines 3 times which caused quite a bit of wasted time, so I would like to be set when I pick an Audio lib. I will be falling into the &quot;indie&quot; section as far as licensing goes. Here is what I have so far..&#xD;&#xA;&#xD;&#xA;FMOD - Quality Middleware, success has gone to their heads and it seems they did away with the indie license recently. Price range seems to go from Free - 3000$ - 6000$ which pretty much excludes this.&#xD;&#xA;&#xD;&#xA;BASS - So far this is what I am leaning towards. Simple API, great feature list, and quite a bit more. The pricing structure looks somewhat similar to FMOD, but I will need to pull out the Euro to Dollar calculator, and figure out if the Shareware license would be applicable to Digitally Distributed Content.&#xD;&#xA;&#xD;&#xA;IrrKlang - Pricing looks fair, features seem generic. Pretty much coming down to a battle between this and BASS. I have heard good and bad things.&#xD;&#xA;&#xD;&#xA;The other libraries such as OpenAL, PortAudio, Audiere, etc. were considered, but I am looking for something more drag and drop rather than something I am going to be basically writing my own front-end for. I am curious though, I remember stumbling across another library or two a few months ago on par with FMOD/BASS/etc that were fairly new. No matter how hard I look now, I cannot find them. Hopefully someone here knows what they might be called.&#xD;&#xA;&#xD;&#xA;Anyways, basically just looking for feedback from other member's experiences, thoughts, and so on." />
  <row Id="8240" PostHistoryTypeId="5" PostId="3753" RevisionGUID="f31db07c-82d2-4eef-ab9e-b7f82f9b65a2" CreationDate="2010-09-29T16:27:53.940" UserId="51" Comment="deleted 55 characters in body" Text="I'm currently looking into adding sound to my game. I have seen &lt;a href=&quot;http://connect.creativelabs.com/openal/default.aspx&quot;&gt;OpenAL&lt;/a&gt; and SDL, but I would like to know what else is out there. Can you recommend any good cross-platform Audio APIs for  game development?&#xD;&#xA;" />
  <row Id="8241" PostHistoryTypeId="5" PostId="4057" RevisionGUID="9c5bffc1-ea49-4dfe-bab4-10483e8c2421" CreationDate="2010-09-29T16:41:48.020" UserId="2223" Comment="added datails" Text="Could you please list a few free 3d OOP game engines, along with the pros and cons?&#xD;&#xA;Embeddable in VB.net would be great." />
  <row Id="8242" PostHistoryTypeId="5" PostId="4165" RevisionGUID="f1136f3f-70e6-4d4b-adc2-24c505e1a5fc" CreationDate="2010-09-29T16:44:07.063" UserId="2258" Comment="added Amazon link to recommended book" Text="Of course, as others have said, all patterns are useful in the right circumstances, and part of learning how to use them is learning when to use them.  However, the excellent book [*Core Techniques and Algorithms in Game Programming*][1] by Daniel Sanchez-Crespo Dalmau, lists six programming patterns and six usability patterns as especially useful in game programming.&#xD;&#xA;&#xD;&#xA;Programming:&#xD;&#xA;&#xD;&#xA; - Singleton: I don't hate this one like many people do; it can be used for things like the single-player player or the keyboard reader.&#xD;&#xA; - Factory: Lets you create and destroy objects efficiently.&#xD;&#xA; - Strategy: Lets you change out AI strategies elegantly.&#xD;&#xA; - Spatial Index: Helps perform queries on spatial data sets.&#xD;&#xA; - Composite: Sets up a useful object heirarchy.&#xD;&#xA; - Flyweight: Frees memory by genericizing things like identical enemies.&#xD;&#xA;&#xD;&#xA;Usability:&#xD;&#xA;&#xD;&#xA; - Shield: Protects from accidental activation of dramatic actions.&#xD;&#xA; - State: Visual cues of the world/UI status.&#xD;&#xA; - Automatic Mode Cancellation: Makes the game work more intutitively.&#xD;&#xA; - Magnetism: Autoaiming and easy unit selection.&#xD;&#xA; - Focus: Eliminating distracting UI elements.&#xD;&#xA; - Progress: Universally useful.&#xD;&#xA;&#xD;&#xA;The book, of course, goes into more detail on each of these.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Core-Techniques-Algorithms-Game-Programming/dp/0131020099" />
  <row Id="8243" PostHistoryTypeId="2" PostId="4166" RevisionGUID="b7793f84-5f3a-4daf-8d42-7f3638cffc96" CreationDate="2010-09-29T17:09:43.670" UserId="2289" Text="In Andrew's comment on [my other question](http://gamedev.stackexchange.com/questions/4092/xna-or-slimdx-directx-10-for-multitouch-rhythm-game-simulator), he noted that it was possible to render text to a Texture2D using the Windows API, instead of drawing the text directly with a SpriteBatch. How is this done? I'm asking because this would allow me to render Unicode characters on-the-fly, instead of needing to pre-render all the needed glyphs using a SpriteFont (too many glyphs in Korean and Japanese). Thanks!" />
  <row Id="8244" PostHistoryTypeId="1" PostId="4166" RevisionGUID="b7793f84-5f3a-4daf-8d42-7f3638cffc96" CreationDate="2010-09-29T17:09:43.670" UserId="2289" Text="Rendering arbitrary text in XNA using Windows API?" />
  <row Id="8245" PostHistoryTypeId="3" PostId="4166" RevisionGUID="b7793f84-5f3a-4daf-8d42-7f3638cffc96" CreationDate="2010-09-29T17:09:43.670" UserId="2289" Text="&lt;xna&gt;&lt;c#&gt;&lt;windows&gt;" />
  <row Id="8246" PostHistoryTypeId="5" PostId="4166" RevisionGUID="03352b1b-9f8a-4b58-a7f5-793c7b984e32" CreationDate="2010-09-29T17:15:14.723" UserId="2289" Comment="added 126 characters in body" Text="In Andrew's comment on [my other question](http://gamedev.stackexchange.com/questions/4092/xna-or-slimdx-directx-10-for-multitouch-rhythm-game-simulator), he noted that it was possible to render text to a Texture2D using the Windows API, instead of drawing the text directly with a SpriteBatch. How is this done? I'm guessing there's an intermediate step before writing the image data to a Texture2D.&#xD;&#xA;&#xD;&#xA;I'm asking because this would allow me to render Unicode characters on-the-fly, instead of needing to pre-render all the needed glyphs using a SpriteFont (too many glyphs in Korean and Japanese to make this route feasible, sadly). Thanks!" />
  <row Id="8248" PostHistoryTypeId="2" PostId="4167" RevisionGUID="571e090a-1fd2-4690-bc63-da3bec77e425" CreationDate="2010-09-29T18:12:29.157" UserId="2167" Text="Hey all , I want to make something more interesting in my game some thing like a **charts Analysis** for a flash game. **When THE PLAYER FINISH THE GAME**  . The score appears in charts . I want to integrate it with ***actionscript3*** .&#xD;&#xA;&#xD;&#xA;**NOTE**&#xD;&#xA;&#xD;&#xA;The game is 60 seconds only I want to draw the score of the user in Y-axis And the Time in X-axis .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I read before about [highcharts][1], but i didn't get much information if there are something easier I'll be grateful .&#xD;&#xA;something like that&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.highcharts.com/demo/&#xD;&#xA;  [2]: http://i.stack.imgur.com/Rg2Np.png" />
  <row Id="8249" PostHistoryTypeId="1" PostId="4167" RevisionGUID="571e090a-1fd2-4690-bc63-da3bec77e425" CreationDate="2010-09-29T18:12:29.157" UserId="2167" Text="How to make a score charts analysis " />
  <row Id="8250" PostHistoryTypeId="3" PostId="4167" RevisionGUID="571e090a-1fd2-4690-bc63-da3bec77e425" CreationDate="2010-09-29T18:12:29.157" UserId="2167" Text="&lt;game-design&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;analytics&gt;" />
  <row Id="8252" PostHistoryTypeId="5" PostId="4166" RevisionGUID="197ebe94-30bf-4679-9ea3-3171c778d291" CreationDate="2010-09-29T19:13:59.677" UserId="2289" Comment="added 2 characters in body" Text="In Andrew's comment on [my other question](http://gamedev.stackexchange.com/questions/4092/xna-or-slimdx-directx-10-for-multitouch-rhythm-game-simulator), he noted that it was possible to render text to a Texture2D using the Windows API, instead of drawing the text directly with a SpriteBatch. How is this done? I'm guessing there's an intermediate step before writing the image data to a Texture2D.&#xD;&#xA;&#xD;&#xA;I'm asking because this would allow me to render Unicode characters on-the-fly, instead of needing to pre-render all the needed glyphs using a SpriteFont (too many glyphs in Korean and Japanese to make this route infeasible, sadly). Thanks!" />
  <row Id="8253" PostHistoryTypeId="2" PostId="4169" RevisionGUID="448cc618-691c-43e3-9f9f-b3c59ca6176e" CreationDate="2010-09-29T19:54:59.620" UserId="2063" Text="I just wondered how to create a mirror within a 3D game?&#xD;&#xA;My suggestion is/was to trace rays, hitting the &quot;mirror&quot; object then drawing a picture of a second cam onto the &quot;mirror&quot; object which is located at the original camera's mirror &quot;point&quot; by using the hit side of the mirror object as mirroring plane.&#xD;&#xA;&#xD;&#xA;We would have to use the one ray coming from the center of the original camera to determine the point where the center of the vision is located on the mirror plane.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8254" PostHistoryTypeId="1" PostId="4169" RevisionGUID="448cc618-691c-43e3-9f9f-b3c59ca6176e" CreationDate="2010-09-29T19:54:59.620" UserId="2063" Text="A mirror in a game programming sense" />
  <row Id="8255" PostHistoryTypeId="3" PostId="4169" RevisionGUID="448cc618-691c-43e3-9f9f-b3c59ca6176e" CreationDate="2010-09-29T19:54:59.620" UserId="2063" Text="&lt;graphics-programming&gt;" />
  <row Id="8256" PostHistoryTypeId="2" PostId="4170" RevisionGUID="46c15a70-3a9e-4a38-a6ce-a8ddace67839" CreationDate="2010-09-29T20:06:39.573" UserId="2336" Text="A blurb from my book:&#xD;&#xA;&#xD;&#xA;The XNA Framework includes built-in font support. We can use any TrueType font in our games. It also allows the use of bitmaps, which can either be drawn by hand or be generated with the Bitmap Font Maker Utility (ttf2bmp). This utility can be found on XNA Creators Club Online at &#xD;&#xA;http://creators.xna.com/en-US/utilities/bitmapfontmaker&#xD;&#xA;&#xD;&#xA;Check the Fonts section of Shawn's blog post list at www.talula.demon.co.uk/blogindex.html&#xD;&#xA;&#xD;&#xA;To modify the actual XML, check out the CharacterRegions element.  It contains the start and end characters that should be generated and available for drawing.&#xD;&#xA;&#xD;&#xA;Hope this helps,&#xD;&#xA;&#xD;&#xA;Chad" />
  <row Id="8257" PostHistoryTypeId="2" PostId="4171" RevisionGUID="d0b143bb-9009-4063-9a28-c9e72475df84" CreationDate="2010-09-29T21:02:51.303" UserId="450" Text="I am not sure if you are asking about how to get the data or how to draw the chart. In the second case you might want to have a look at Google Charts drawing service: http://code.google.com/intl/en/apis/chart/docs/making_charts.html" />
  <row Id="8258" PostHistoryTypeId="4" PostId="4167" RevisionGUID="39acf506-6b48-4f5a-b183-60b7dd2a2e76" CreationDate="2010-09-29T21:20:08.397" UserId="2167" Comment="edited title" Text="How to draw a  charts by flash cs5 " />
  <row Id="8261" PostHistoryTypeId="2" PostId="4173" RevisionGUID="78ab9cb0-4b7f-4209-a4ed-55fff451fc1a" CreationDate="2010-09-29T21:34:48.680" UserId="189" Text="If you are using OpenGL, the OpenGL FAQ section 9: Transformations covers exactly how to do this. And no, it doesn't involve raytracing, as that's understandably a very inefficient (but high quality) way to accomplish this.&#xD;&#xA;&#xD;&#xA;[9.170 How do I render a mirror?][1]&#xD;&#xA;&#xD;&#xA;Here is essentially what the FAQ entry says, and the [example code][2] demonstrates:&#xD;&#xA;&#xD;&#xA; - Set up a reflected view matrix. Doing this for axis-aligned mirrors is explained in the second paragraph.&#xD;&#xA; - Draw the scene&#xD;&#xA; - Restore the view matrix and clear the depth buffer&#xD;&#xA; - Render the scene again; the actual mirror geometry in this scene should be translucent or entirely transparent, in order to show through to the previously rendered mirrored scene.&#xD;&#xA;&#xD;&#xA;Obviously there is a lot of room for optimization. When rendering the reflected scene, you should probably as much culling as possible, since mirrors are typically small and the default off-screen culling won't kick in for the geometry which is on screen but not seen through the mirror. You can also render just a simplified version of the scene through the mirror. For effects, and to obscure the user from noticing the reduced quality, you could apply a shader (e.g. blur, or maybe bright/washed-out) when you do your mirrored render.&#xD;&#xA;&#xD;&#xA;I imagine, if you're using DirectX, the procedure would be much the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/faq/technical/transformations.htm#tran0170&#xD;&#xA;  [2]: http://www.opengl.org/resources/faq/technical/mirror.c" />
  <row Id="8262" PostHistoryTypeId="2" PostId="4174" RevisionGUID="f3f68105-2e8e-4965-9553-ff0edbec2a73" CreationDate="2010-09-29T21:47:51.270" UserId="1829" Text="May a possible good answer be &quot;use both&quot; ?&#xD;&#xA;&#xD;&#xA;As I heard that panda3d projects could be optimized, killing bottleneck either using some cython or either recode those parts.&#xD;&#xA;&#xD;&#xA;Most of the time, the parts which need to be optimized are the part with a lot of iterations and nesting or with a lot of numeric computing, so my (wild) guess is that one fair compromise would be to use both language, using C for parts that include a lot of low-level programming, so you can't do any misuse of the C++ language for the part which need speed, and C++ for the rest of the game.&#xD;&#xA;&#xD;&#xA;Ideally you do the fast part of the engine keeping with the high level in mind, and then use a scripting language or C++ which will use much less nest/loops.&#xD;&#xA;&#xD;&#xA;Of course you could never make such an engine that would fit all the games developers would need to do, except if you dedicate your engine for a special kind of game...&#xD;&#xA;&#xD;&#xA;But don't take my advice for granted since I'm not an experienced game developer nor an experienced developer... I think C forces you to write fast code, while writing good and fast C++ code for a project as big as a game is a different thing..." />
  <row Id="8264" PostHistoryTypeId="2" PostId="4176" RevisionGUID="e119ba0d-a256-4726-ba65-48d435b402e0" CreationDate="2010-09-30T00:21:35.967" UserId="1677" Text="Not really about patterns, but about basic principles behind them. In [&quot;Design Patterns: Elements of Reusable Object-Oriented Software&quot; (1995)][1], the gang of four (Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides) recommends only two principles for object oriented design: **(1)** program to an interface and not to an implementation and **(2)** favor object composition over class inheritance.&#xD;&#xA;&#xD;&#xA;These 2 principles are very helpful in many tasks of game development. For example, many game programmers have used a deep **class hierarchy** to represent game entities. There is another approach based on **composition** - component-based game objects. [Article][2] about this approach. [Even more links][3]. It is a [Decorator pattern][4] example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Design_Patterns_%28book%29&#xD;&#xA;  [2]: http://gamearchitect.net/Articles/GameObjects1.html&#xD;&#xA;  [3]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Decorator_pattern" />
  <row Id="8265" PostHistoryTypeId="16" PostId="4176" RevisionGUID="e119ba0d-a256-4726-ba65-48d435b402e0" CreationDate="2010-09-30T00:21:35.967" UserId="-1" />
  <row Id="8266" PostHistoryTypeId="4" PostId="4156" RevisionGUID="3e4c53c2-04df-4668-9798-e19dcbf79c9f" CreationDate="2010-09-30T01:13:41.960" UserId="919" Comment="edited title" Text="What is the best methodology in mounting customizables to a 3d avatar in Unity?" />
  <row Id="8267" PostHistoryTypeId="2" PostId="4177" RevisionGUID="daf1a047-7535-4eef-ac28-1ec31fc32556" CreationDate="2010-09-30T04:29:38.947" UserId="2100" Text="I am wondering what the best way to approach a &quot;lighting&quot; effect in 2D games is. For instance, if my main character is glowing, what techniques can I use to complete the visual effect of the character glowing when it is near other objects which would be affected by the light?" />
  <row Id="8268" PostHistoryTypeId="1" PostId="4177" RevisionGUID="daf1a047-7535-4eef-ac28-1ec31fc32556" CreationDate="2010-09-30T04:29:38.947" UserId="2100" Text="How is 2D lighting implemented?" />
  <row Id="8269" PostHistoryTypeId="3" PostId="4177" RevisionGUID="daf1a047-7535-4eef-ac28-1ec31fc32556" CreationDate="2010-09-30T04:29:38.947" UserId="2100" Text="&lt;game-design&gt;&lt;2d&gt;&lt;xna&gt;&lt;graphic-effects&gt;&lt;lighting&gt;" />
  <row Id="8270" PostHistoryTypeId="2" PostId="4178" RevisionGUID="d48b85b6-8c2e-4f0d-96dd-d02d2521e435" CreationDate="2010-09-30T06:08:04.220" UserId="2345" Text="I am having trouble deciding on what to recommend for you since I am not sure what your definition of &quot;best&quot; is. Also, the type of lighting you finally decide on depends on a combination of your skill level and the style you are working towards. &#xD;&#xA;&#xD;&#xA;You could overlay a simple glow effect texture with soft transparent edges or&#xD;&#xA;if you want lighting/shadows similar to what you may find in a 3d world you could do something like this: [http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/][1]. However, if you are new to HLSL, then that may be a little bit too much.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/" />
  <row Id="8271" PostHistoryTypeId="2" PostId="4179" RevisionGUID="6ffedf89-31bb-4438-9ad9-839a343e7745" CreationDate="2010-09-30T08:48:42.520" UserId="919" Text="Another programmer friend gave me this which I think is also an answer to the question&#xD;&#xA;&#xD;&#xA;http://forum.unity3d.com/threads/16485-quot-stitch-multiple-body-parts-into-one-character-quot" />
  <row Id="8272" PostHistoryTypeId="2" PostId="4180" RevisionGUID="39fd9607-52f8-45eb-90ac-c7613d9f4475" CreationDate="2010-09-30T09:46:49.057" UserId="20" Text="Yahoo also has a As3 Charting-library available: http://developer.yahoo.com/flash/astra-flash/charts/" />
  <row Id="8274" PostHistoryTypeId="2" PostId="4181" RevisionGUID="22dbc260-9d43-414f-b8ee-fea1c4e1ae8c" CreationDate="2010-09-30T13:26:55.033" UserId="2314" Text="For browser games and those on a mobile phones, it's common to have a global highscore table. It's also common for those tables to contain scores of 2,147,483,647 - where people have figured out the webservice call that's used to report the player's final score, and have used that to record fictitious scores.&#xD;&#xA;&#xD;&#xA;For simple puzzle games we can record every move the player made (and any random seeds used to generate the level) and send that as part of the score-reporting call. The entire game can then be reproduced and verified on the server.&#xD;&#xA;&#xD;&#xA;However, for anything above the scale of Pac-man this becomes infeasible.&#xD;&#xA;&#xD;&#xA;What other techniques are there to prevent cheating of this kind?" />
  <row Id="8275" PostHistoryTypeId="1" PostId="4181" RevisionGUID="22dbc260-9d43-414f-b8ee-fea1c4e1ae8c" CreationDate="2010-09-30T13:26:55.033" UserId="2314" Text="How can I prevent cheating on global highscore tables?" />
  <row Id="8276" PostHistoryTypeId="3" PostId="4181" RevisionGUID="22dbc260-9d43-414f-b8ee-fea1c4e1ae8c" CreationDate="2010-09-30T13:26:55.033" UserId="2314" Text="&lt;web&gt;&lt;anti-cheat&gt;&lt;mobile&gt;&lt;leaderboards&gt;" />
  <row Id="8277" PostHistoryTypeId="2" PostId="4182" RevisionGUID="20c996fe-c867-4541-9a45-a2a80e83aa42" CreationDate="2010-09-30T14:48:37.750" UserDisplayName="Javier" Text="I am not an expert in this field but if I were you, I will try to encrypt the score with an key embedded in the your code. Those people will need to apply reverse engineering over your code instead of the plain text used for the web-services." />
  <row Id="8278" PostHistoryTypeId="2" PostId="4183" RevisionGUID="56b52017-0d47-4e62-b9f9-3024b0993004" CreationDate="2010-09-30T14:59:53.057" UserId="953" Text="You can limit the most flagrant of abuses by monitoring the highest results in the top score table.  Depending on your game, you may have a &quot;perfect score,&quot; above which any score must be fraudulent.  If not, you can calculate the lowest &quot;impossible score;&quot; can the player shoot 10 shots per second, the game lasts 1 minute, and each killed enemy is worth 100 points?  Then any score higher than 60,000 must be fraudulent.&#xD;&#xA;&#xD;&#xA;You can also help mitigate the problem by sending along some metadata; not the full game history, as you describe, but just the components that make up the score.  Say: score 60000, 500 enemies killed, and one bonus item grabbed.  You can then perform simple checks.  This is &quot;security through obscurity,&quot; and therefore not secure at all, but it helps eliminate the most naive of attackers." />
  <row Id="8279" PostHistoryTypeId="2" PostId="4184" RevisionGUID="b2b9c370-1e08-4afd-880f-326608d1dfe2" CreationDate="2010-09-30T15:32:26.773" UserId="1091" Text="Ultimately you can only rule out impossibly high scores, because the rest are (by definition) merely implausible, and thus might be a legitimate (and awesome) player.&#xD;&#xA;&#xD;&#xA;Otherwise you have to rely on obfuscation techniques (such as encryption, and sending other stats beyond just score).&#xD;&#xA;&#xD;&#xA;You could also send the score periodically as the game is being played, which would add another level of complexity to cheating - i.e. the server can decide if the game has been played long enough to warrant a particular score, and also ensure that enough intermediate reports were received during the play-time (just don't make it 100% or the train going into a tunnel on my way home will result in my throwing the phone out the window).&#xD;&#xA;&#xD;&#xA;Ultimately someone will find a way to break it though, so don't kill yourself trying to stop them.&#xD;&#xA;" />
  <row Id="8280" PostHistoryTypeId="2" PostId="4185" RevisionGUID="de61d4e5-80a4-4470-805c-2af4d39b3ce3" CreationDate="2010-09-30T15:50:35.773" UserId="721" Text="For our game Moblox, we use at first our internal system (now it is OpenFeint):&#xD;&#xA; - we send a JSON message on HTTP (not HTTPS). In this message, we made a md5 on all fields plus a magic string and add it in the message;&#xD;&#xA; - on server, we check the integrity of the message with the same operation;&#xD;&#xA;&#xD;&#xA;To crack the system, you must find this key (the magic string). It is possible with reverse engineering. But, it's painful.&#xD;&#xA;&#xD;&#xA;OpenFeint, ScoreLoop and CocosLive uses the same trick with HTTPS. Very easy to implement.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="8281" PostHistoryTypeId="2" PostId="4186" RevisionGUID="7b265a71-0e01-4398-92bd-e42e6c71f32b" CreationDate="2010-09-30T16:19:15.430" UserId="2134" Text="*Entity systems* are a nice kind of pattern. It's not exactly a design pattern since it's not strickly OOP. However you can mix it with OOP.&#xD;&#xA;&#xD;&#xA;Some good links:&#xD;&#xA;&#xD;&#xA;  - http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/&#xD;&#xA;  - http://games.fh-hagenberg.at/wiki/index.php?title=Componentbased_entity_systems" />
  <row Id="8282" PostHistoryTypeId="16" PostId="4186" RevisionGUID="7b265a71-0e01-4398-92bd-e42e6c71f32b" CreationDate="2010-09-30T16:19:15.430" UserId="-1" />
  <row Id="8283" PostHistoryTypeId="5" PostId="4186" RevisionGUID="bdd87a76-e35b-4d7c-804a-9fabc872619f" CreationDate="2010-09-30T16:24:21.207" UserId="2134" Comment="Add link" Text="*Entity systems* are a nice kind of pattern. It's not exactly a design pattern since it's not strickly OOP. However you can mix it with OOP.&#xD;&#xA;&#xD;&#xA;Some good links (start from top for intro):&#xD;&#xA;&#xD;&#xA;  - http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=387&#xD;&#xA;  - http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/&#xD;&#xA;  - http://games.fh-hagenberg.at/wiki/index.php?title=Componentbased_entity_systems" />
  <row Id="8284" PostHistoryTypeId="2" PostId="4187" RevisionGUID="c9680cfe-0b40-4f47-951d-9f0969e2ce19" CreationDate="2010-09-30T16:37:12.597" UserId="136" Text="Using some reflection, you can grab the Direct3D surface pointer from a Texture2D.  From there, you can use any APIs that can render to a DX surface.  I did this recently to host XNA content with WPF's D3DImage (with alpha channel support).  DirectWrite can render to a DX surface, and you might even be able to use [managed APIs][1].  The DirectX .NET wrappers in that link only support Direct3D 10 and 11, and not Direct3D 9 (which XNA uses AFAIK).  However, you still might be able to get it to work.  On a side note, if you want to render vector graphics, you may be able to use a similar approach to interoperate with Direct2D.  Naturally, none of this will work on any XNA-supported platform other than Windows.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/WindowsAPICodePack" />
  <row Id="8285" PostHistoryTypeId="2" PostId="4188" RevisionGUID="7b1176b6-e810-4bab-a000-e6ed54777f97" CreationDate="2010-09-30T16:47:13.323" UserId="136" Text="As I recall, Firaxis has discussed plans to release an SDK for Civ V (as they did with Civ IV), but I do not believe they have released one *yet*.  If and when the SDK is released, you will be able to mod Civ V like there's no tomorrow.&#xD;&#xA;&#xD;&#xA;You can be reasonably sure this will happen--mods are a big deal in Civ V, and the game even has a built-in mod browser." />
  <row Id="8286" PostHistoryTypeId="2" PostId="4189" RevisionGUID="862cdc4f-ac02-45aa-8a62-e5d52f5035a8" CreationDate="2010-09-30T19:13:44.183" UserId="744" Text="While you're right that it's not always feasible to send entire replays to the server for complex games, a similar system can be used by having the server periodically (and semi-randomly) ask the client for some part of its state, while the game is running.&#xD;&#xA;&#xD;&#xA;For example, in an FPS, every minute you could ask &quot;How many kills do you have?&quot;, &quot;Where are all the enemies?&quot;, etc. If the client doesn't come back with a reasonable answer to a challenge in a reasonable amount of time, they are cheating.&#xD;&#xA;&#xD;&#xA;Of course, this only works if the game is online during the entire play session. Since the goal here is to be able to upload to an online leaderboard, I think that's reasonable - don't kick the player out of the game if they answer wrong, just don't let them on the score list.&#xD;&#xA;&#xD;&#xA;I would encourage you to reconsider sending replays however. All you really need is the initial random seed and timestamped input. This should really be a few hundred KB at most. Many arcade games do this already to save replays for player review purposes; having your server validate these might not be trivial, but it prevents all kinds of cheating except botting." />
  <row Id="8287" PostHistoryTypeId="2" PostId="4190" RevisionGUID="86d59790-8ed4-41bb-b5d4-d612399e66d9" CreationDate="2010-09-30T20:14:17.107" UserId="2351" Text="**The idea**&#xD;&#xA;&#xD;&#xA;I have an idea for a game. A few games, actually, that can built on top of the same general design.&#xD;&#xA;&#xD;&#xA;There is a game world that the player and the other actors exist in. The player can get information from the world about his surroundings. The player can also interact with the world, picking up an object for example.&#xD;&#xA;Now, I would like the same thing to be possible for other, scripted actors. They are the player's competition. Instead of navigating the world and performing actions based on human input, a script should decide what they do.&#xD;&#xA;&#xD;&#xA;**An example**&#xD;&#xA;&#xD;&#xA;I want to do this using a 2d world eventually, so I might as well give the example I want to build:&#xD;&#xA;&#xD;&#xA;There is a 2d world with objects of various sizes and shapes. Every actor has their own field of view. They get information from the world about the objects in their field of view. For the player, this information is displayed on the screen of the user. The player navigates the world by user input.&#xD;&#xA;&#xD;&#xA;Scripted actors navigate the world in a scripted way. They walk in a general direction, they follow a wall or things like that. Their scripts should be able to get the information about the objects in their field of view and act on it. If an other actor is detected in their field of view, they should walk in that direction for example.&#xD;&#xA;&#xD;&#xA;All of this should happen in pretty much real-time.&#xD;&#xA;&#xD;&#xA;The information gotten from the world (showed to the player, and given to the scripted actors) in this case would be something like a collection of &quot;what&quot;, &quot;where&quot;, and &quot;in what orientation&quot;.&#xD;&#xA;&#xD;&#xA;**The question**&#xD;&#xA;&#xD;&#xA;My question is: how I can program this effectively and efficiently?&#xD;&#xA;&#xD;&#xA;I am thinking to build this with C and Lua. C++ is also an option.&#xD;&#xA;I would store the game state and display the graphics using C.&#xD;&#xA;The part that I don't know how to handle is the interaction between C and Lua.&#xD;&#xA;Not programming-wise, but design-wise. The interaction between the world and the scripted actors.&#xD;&#xA;&#xD;&#xA;Should C provide the Lua actors with information, and then have the Lua actors call C functions that change their direction, move a step forward, etc? Will this work in real-time?&#xD;&#xA;&#xD;&#xA;I realize that this question is broad, but I think it's not unreasonable. There are obviously ways to do this and I would like to know some." />
  <row Id="8288" PostHistoryTypeId="1" PostId="4190" RevisionGUID="86d59790-8ed4-41bb-b5d4-d612399e66d9" CreationDate="2010-09-30T20:14:17.107" UserId="2351" Text="How do I build games with scripted actors?" />
  <row Id="8289" PostHistoryTypeId="3" PostId="4190" RevisionGUID="86d59790-8ed4-41bb-b5d4-d612399e66d9" CreationDate="2010-09-30T20:14:17.107" UserId="2351" Text="&lt;game-design&gt;&lt;c++&gt;&lt;c&gt;&lt;lua&gt;" />
  <row Id="8290" PostHistoryTypeId="2" PostId="4191" RevisionGUID="1dd21cd5-5b31-4f1a-87a7-45093895c014" CreationDate="2010-09-30T21:06:22.663" UserId="802" Text="I want to internationalize some texts in a flash (not flex) game I'm working on and I can not find an easy way to achieve that... I have found some libraries and other solutions, but I expected something a lot easier (it is really easy with other technologies). &#xD;&#xA;&#xD;&#xA;Do you have experience in this? How do you do it?" />
  <row Id="8291" PostHistoryTypeId="1" PostId="4191" RevisionGUID="1dd21cd5-5b31-4f1a-87a7-45093895c014" CreationDate="2010-09-30T21:06:22.663" UserId="802" Text="Internationalization (i18n) in Flash games? Is there an easy way?" />
  <row Id="8292" PostHistoryTypeId="3" PostId="4191" RevisionGUID="1dd21cd5-5b31-4f1a-87a7-45093895c014" CreationDate="2010-09-30T21:06:22.663" UserId="802" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="8293" PostHistoryTypeId="16" PostId="4191" RevisionGUID="1dd21cd5-5b31-4f1a-87a7-45093895c014" CreationDate="2010-09-30T21:06:22.663" UserId="802" />
  <row Id="8294" PostHistoryTypeId="2" PostId="4192" RevisionGUID="6214974c-526f-4935-8107-3432984d285b" CreationDate="2010-09-30T21:11:21.517" UserId="1272" Text="I added a quick/dirty high score table to a project of mine a while back and not being at all versed in internet security/etc it turned out sort of flawed. Surprisingly, with nearly 1,200,000 recorded scores, I've only had maybe 5 or 6 occasions of batches of blatantly incorrect scores reaching the top of the board. Most of the scores even looked more like a glitch in the game, than a true &quot;hacking&quot;. &#xD;&#xA;&#xD;&#xA;So I guess an important point is: **make sure your game's scoring system is airtight**, or at least do some really good score feasibility checking; now, this game I'm talking about was a Ludum Dare 48hr entry, so it wasn't the most stable thing around.. but on the whole I think it's often more likely that the casual player will discover/exploit an ingame glitch than having someone directly &quot;hack&quot; the leaderboard.&#xD;&#xA;&#xD;&#xA;That said, I'm working on a rewrite of this project right now, and I'm going all out with the obfuscation. I won't go into too much detail, but I basically have all scores submit a key value based on a bunch of random values and hashing and a magic string, then any score that passes that check and is high enough to make the actual &quot;Top X&quot; leaderboard has to pass another round of validation (this time with an expiring key value generated on the server end, and more thorough feasibility checks).&#xD;&#xA;&#xD;&#xA;**I'd also advise using a packet tracer of some sort** to test out what sort of things are visible (I was originally doing a much simpler verification that meant someone could use a packet tracer to find and duplicate an uploaded score's http request, without knowing the magic string or anything (meant you needed a legit score first, but you could send duplicates of that score as much as you wanted..)). I used [Wireshark][1] for testing this.&#xD;&#xA;&#xD;&#xA;Huh, this turned out a bit long, but hopefully it helps...&#xD;&#xA;  [1]: http://www.wireshark.org/" />
  <row Id="8295" PostHistoryTypeId="2" PostId="4193" RevisionGUID="180ea2f7-2a4d-4bd0-8316-3260dbac311d" CreationDate="2010-09-30T22:42:17.927" UserId="2343" Text="Currently developing a game for Android. I went through a tutorial to get sprites, loop, etc. up and running, and it all works fine. The way it is currently set up is that Main creates a canvas, the canvas then runs a thread which has the while loop calling update() and display() functions in the canvas class. All of the game code and classes are essentially called from the canvas.&#xD;&#xA;&#xD;&#xA;My question is, how do I expand this to include multiple screens/states, like menus, level selection, options, etc?" />
  <row Id="8296" PostHistoryTypeId="1" PostId="4193" RevisionGUID="180ea2f7-2a4d-4bd0-8316-3260dbac311d" CreationDate="2010-09-30T22:42:17.927" UserId="2343" Text="Handling game states for Android" />
  <row Id="8297" PostHistoryTypeId="3" PostId="4193" RevisionGUID="180ea2f7-2a4d-4bd0-8316-3260dbac311d" CreationDate="2010-09-30T22:42:17.927" UserId="2343" Text="&lt;java&gt;&lt;android&gt;&lt;state&gt;&lt;gameloop&gt;" />
  <row Id="8298" PostHistoryTypeId="2" PostId="4194" RevisionGUID="cb4df20f-90be-4f1d-aa73-c3064f8ebb26" CreationDate="2010-09-30T22:45:24.353" UserId="1677" Text="I would recommend to use C++ and [polymorphism (one of basic principles of OOP)][1].&#xD;&#xA;&#xD;&#xA;You can create a general Character class. It contains character's location, position in the world, inventory and other data, also virtual functions for updating and rendering character. Than you can subclass it with NPCharacter and PlayerCharacter.&#xD;&#xA;&#xD;&#xA;Method `PlayerCharacter::update()` listens to user inout events and updates Character's state accordingly.&#xD;&#xA;&#xD;&#xA;Method `NPCCharacter::update()` implements some AI logics and controls NPC in any way you want.&#xD;&#xA;&#xD;&#xA;You can create LuaCharacter also. `LuaCharacter::update()` simply calls Lua script that does the same thing as NPCCharacter, but in the script. Some games really call Lua script every frame. If you are concerned about performance, you can use Lua to implement callbacks and listeners to user input or other events only (no need to call these scripts every frame).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The same can be done using [composition][2] and [component-based approach][3], too. Just add different components to your game objects. For example, AICharacterCleverComponent, AICharacterDumbComponent, LuaScriptedAIComponent, PlayerInputControlComponent etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Object_composition&#xD;&#xA;  [3]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design" />
  <row Id="8299" PostHistoryTypeId="5" PostId="4194" RevisionGUID="a9183d33-9dd1-4a75-9f79-4ba6bad4cbdc" CreationDate="2010-09-30T22:51:26.607" UserId="1677" Comment="added 247 characters in body" Text="I would recommend to use C++ and [polymorphism (one of basic principles of OOP)][1].&#xD;&#xA;&#xD;&#xA;You can create a general Character class. It contains character's location, position in the world, inventory and other data, also virtual functions for updating and rendering character. Than you can subclass it with NPCharacter and PlayerCharacter.&#xD;&#xA;&#xD;&#xA;Method `PlayerCharacter::update()` listens to user input events and updates Character's state accordingly.&#xD;&#xA;&#xD;&#xA;Method `NPCCharacter::update()` implements some AI logics and controls NPC in any way you want.&#xD;&#xA;&#xD;&#xA;You can create LuaCharacter also. `LuaCharacter::update()` simply calls Lua script that does the same thing as NPCCharacter, but from the script. Some games really call Lua script every frame. If you are concerned about performance, it is better to minimize Lua calls, you can use Lua to implement callbacks and listeners to user input or other events only (no need to call these scripts every frame).&#xD;&#xA;&#xD;&#xA;    foreach (characters as character)&#xD;&#xA;       // we do not know what type of character it is - Player, AI, LuaScripted etc.&#xD;&#xA;       // they all are updated in the same manner&#xD;&#xA;       character.update(); &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The same can be done using [composition][2] and [component-based approach][3], too. Just add different components to your game objects. For example, AICharacterCleverComponent, AICharacterDumbComponent, LuaScriptedAIComponent, PlayerInputControlComponent etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Object_composition&#xD;&#xA;  [3]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;" />
  <row Id="8300" PostHistoryTypeId="2" PostId="4195" RevisionGUID="d7d51f95-c8ae-4619-88ee-64520e4710a5" CreationDate="2010-09-30T23:23:47.523" UserId="2188" Text="Speedruns are basically recording of every keystroke, and they are recording about a WHOLE game. So, yes, you can record the whole game, it's not unfeasible. *Any* other way to do that is crackable through reverse engineering (I can't stress it enough: you're not adding security, you're adding obscurity).&#xD;&#xA;&#xD;&#xA;Still, even if you do it this way they could actually submit a speedrun. You can do nothing to prevent that." />
  <row Id="8301" PostHistoryTypeId="2" PostId="4196" RevisionGUID="1556187d-acd8-457d-85fc-33cb75b732b0" CreationDate="2010-10-01T00:17:37.260" UserId="1780" Text="It's probably not appropriate to have Canvas be the controller of everything.  You probably want to create a Canvas and hand it to something else to draw into.&#xD;&#xA;&#xD;&#xA;The way I'd set it up would be something along these lines:&#xD;&#xA;&#xD;&#xA;    static public void Main() {&#xD;&#xA;       InputGatherer input = new InputGatherer();&#xD;&#xA;       GameSimulation sim = new GameSimulation();&#xD;&#xA;       Renderer renderer = new Renderer();&#xD;&#xA;    &#xD;&#xA;       // the renderer will internally create a canvas,&#xD;&#xA;       // which is irrelevant to the outside world.&#xD;&#xA;    &#xD;&#xA;       boolean done = false;&#xD;&#xA;    &#xD;&#xA;       while (!done) {&#xD;&#xA;          input.Update();&#xD;&#xA;          sim.Process(input);&#xD;&#xA;          sim.Render(renderer);&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8302" PostHistoryTypeId="2" PostId="4197" RevisionGUID="768cab93-2280-458f-b4d5-9cc3359ec28a" CreationDate="2010-10-01T01:38:45.247" UserId="2355" Text="If I create a custom map with the Starcraft 2 map editor, how can I specify that some unit upgrades are already researched?&#xD;&#xA;&#xD;&#xA;For example, if I want all the units to already have the weapons upgrade 1 at the beginning of the game, can I specify this in the editor?&#xD;&#xA;&#xD;&#xA;I've looked through the menus but didn't find anything that looked like it would relate to unit upgrades.&#xD;&#xA;" />
  <row Id="8303" PostHistoryTypeId="1" PostId="4197" RevisionGUID="768cab93-2280-458f-b4d5-9cc3359ec28a" CreationDate="2010-10-01T01:38:45.247" UserId="2355" Text="Can custom maps in Starcraft 2 automatically enable certain unit upgrades?" />
  <row Id="8304" PostHistoryTypeId="3" PostId="4197" RevisionGUID="768cab93-2280-458f-b4d5-9cc3359ec28a" CreationDate="2010-10-01T01:38:45.247" UserId="2355" Text="&lt;modification&gt;&lt;maps&gt;" />
  <row Id="8305" PostHistoryTypeId="6" PostId="4197" RevisionGUID="e9d52345-bc26-4ab5-a42d-1e773962c309" CreationDate="2010-10-01T03:17:07.050" UserId="51" Comment="edited tags" Text="&lt;maps&gt;&lt;modification&gt;&lt;starcraft-2&gt;" />
  <row Id="8307" PostHistoryTypeId="2" PostId="4199" RevisionGUID="6a0c3d5d-2abd-4775-bad1-833f4dd75e40" CreationDate="2010-10-01T06:36:00.720" UserId="20" Text="I recently developed a Flash Game that I translated to German and English. You can have a look at it here: http://www.bioaschi.ch/?lang=en#/game. You can change the language on the fly in the *settings* menu.&#xD;&#xA;&#xD;&#xA;To translate the game, I used the following approach:&#xD;&#xA;I have a custom written *Config* class that is basically just a registry of *key* =&gt; *value* pairs. The config class can read from an XML file and also dispatches events when a value changes.&#xD;&#xA;&#xD;&#xA;For the game I created 2 different config files. One is the `main` config, and then one file containing the translations (called `lang`). Them `main` config contains a key that specifies the language, eg. *lang = en*. In game I listen for change events on that key. Whenever that happens, I read/apply the values from the appropriate language.&#xD;&#xA;&#xD;&#xA;Here's a small snippet of code that shows how the language is switched in game:&#xD;&#xA;&#xD;&#xA;*Somewhere in the &quot;Settings&quot; panel code:*&#xD;&#xA;&#xD;&#xA;    Config.getConfig('main').setValue('lang', 'de'); // or 'en'&#xD;&#xA;&#xD;&#xA;*Then anywhere else where text needs to be localized:*&#xD;&#xA;&#xD;&#xA;            // this is in the construtor or some init method&#xD;&#xA;            ...&#xD;&#xA;            var cfg:Config = Config.getConfig('main');&#xD;&#xA;            cfg.addEventListener(ConfigEvent.CONFIG_CHANGE, onConfigChange);&#xD;&#xA;            &#xD;&#xA;            updateText(cfg.getValue('lang', 'en') + '.');&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private function updateText(langns:String) : void {&#xD;&#xA;            var langCfg:Config = Config.getConfig('lang');&#xD;&#xA;            this.title.htmlText = langCfg.getValue(langns + &quot;credits.TITLE&quot;, &quot;&lt;title&gt;&quot;);&#xD;&#xA;            this.text.htmlText = langCfg.getValue(langns + &quot;credits.TEXT&quot;, &quot;&lt;text&gt;&quot;);&#xD;&#xA;            _btnClose.label = langCfg.getValue(langns + 'highscore.CLOSE', 'X');&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private function onConfigChange(evt:ConfigEvent) : void {&#xD;&#xA;            if(evt.key == 'lang'){&#xD;&#xA;                updateText(evt.value + &quot;.&quot;);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;You can have a look at the file that is being loaded by the game here: http://www.bioaschi.ch/game/language.xml&#xD;&#xA;&#xD;&#xA;To substitute parts of the text with variables (eg. `your score is %d` transforms to `your score is 10000`), I suggest you use the excellent [*Polygonal Datastructures Library*][1]. It contains a AS3 implementation of [*Sprintf*][2].&#xD;&#xA;&#xD;&#xA;Instead of having all translations in one file, you could also easily have one single file per language.&#xD;&#xA;&#xD;&#xA;For the sake of completeness, here are some code listings:&#xD;&#xA;&#xD;&#xA; - [*Config* class][3]&#xD;&#xA; - [*ConfigEvent* class][4]&#xD;&#xA;&#xD;&#xA;Wow, this kinda turned out to be a long post, I'm sorry. The approach I took is rather simplistic and doesn't cover the more complicated topics of internationalization, like *date formats*, *number or currency formatting* etc. For simple translations it works just fine though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/polygonal/&#xD;&#xA;  [2]: http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/&#xD;&#xA;  [3]: http://pastie.org/1192774&#xD;&#xA;  [4]: http://pastie.org/1192792" />
  <row Id="8308" PostHistoryTypeId="16" PostId="4199" RevisionGUID="6a0c3d5d-2abd-4775-bad1-833f4dd75e40" CreationDate="2010-10-01T06:36:00.720" UserId="-1" />
  <row Id="8309" PostHistoryTypeId="2" PostId="4200" RevisionGUID="0726d0dd-ce7f-45fd-9d93-9fb622398892" CreationDate="2010-10-01T07:25:07.587" UserId="2360" Text="I have checked many different sites including jogamp but couldn't manage to find any zipped,rared or jared collection of builds and javadocs." />
  <row Id="8310" PostHistoryTypeId="1" PostId="4200" RevisionGUID="0726d0dd-ce7f-45fd-9d93-9fb622398892" CreationDate="2010-10-01T07:25:07.587" UserId="2360" Text="Where can I obtain the latest stable aggregated builds of JOGL ?" />
  <row Id="8311" PostHistoryTypeId="3" PostId="4200" RevisionGUID="0726d0dd-ce7f-45fd-9d93-9fb622398892" CreationDate="2010-10-01T07:25:07.587" UserId="2360" Text="&lt;3d&gt;&lt;java&gt;&lt;3d-engines&gt;" />
  <row Id="8312" PostHistoryTypeId="2" PostId="4201" RevisionGUID="50bb2294-e80a-44b7-9b0b-e2c9682cec2a" CreationDate="2010-10-01T09:17:54.117" UserId="908" Text="I'm currently writing a small cross-platform OpenGL-based 2D game engine for our studio. When I researched which 2D Vector class to use, I stumbled across three different design paradigms:&#xD;&#xA;&#xD;&#xA;- Float &amp; Call-by-value, like in &lt;a href=&quot;http://www.gamasutra.com/view/feature/4248/designing_fast_crossplatform_simd_.php&quot;&gt;this Gamasutra article&lt;/a&gt;. Seems to be fast but offers little precision (see also &lt;a href=&quot;http://gamedev.stackexchange.com/questions/3351/about-floating-point-precision-and-why-do-we-still-use-it&quot;&gt;this Thread&lt;/a&gt;). Pro: Fast, portable and compatible with most libraries.&#xD;&#xA;&#xD;&#xA;- Double &amp; Call-by-reference. If I understand the above article right, I could also use 2 double precision variables instead of the 4 float numbers. According to the above thread double's still slower than float.&#xD;&#xA;&#xD;&#xA;- Template for double and float: The widely popular book &quot;[Game Engine Architecture](http://www.amazon.com/Game-Engine-Architecture-Engineering-Applications/dp/012229064X)&quot; uses templates to make it possible to use float and double as needed. The obvious downside is code bloat. Also, I doubt it that the code can be optimized without basically writing two classes, anyway.&#xD;&#xA;&#xD;&#xA;I would appreciate to learn what solutions you're using in your in-house engines and how precise e.g. popular game engines are, so I can decide what solution I'll implement in our engine. In the moment I'm thinking about simply using float precision and live with it." />
  <row Id="8313" PostHistoryTypeId="1" PostId="4201" RevisionGUID="50bb2294-e80a-44b7-9b0b-e2c9682cec2a" CreationDate="2010-10-01T09:17:54.117" UserId="908" Text="Float, double or both for 2D Vector class?" />
  <row Id="8314" PostHistoryTypeId="3" PostId="4201" RevisionGUID="50bb2294-e80a-44b7-9b0b-e2c9682cec2a" CreationDate="2010-10-01T09:17:54.117" UserId="908" Text="&lt;math&gt;&lt;cross-platform&gt;" />
  <row Id="8315" PostHistoryTypeId="2" PostId="4202" RevisionGUID="4fad5a1c-1c97-42be-ae18-e583c3566bb8" CreationDate="2010-10-01T10:15:47.627" UserId="1248" Text="I have been around programming for a while as a hobby, but I did not start seeing this concept until recently. I have google'd &quot;what is serialization&quot; numerous times, but I never actually get any sort of definition, usually just examples of how to do it. I am seeing it around the Ogre forums, the Bullet forums, and every other forum I go to, so I think it is about time I actually understand what it is, and why to use it.&#xD;&#xA;&#xD;&#xA;Thank you :)" />
  <row Id="8316" PostHistoryTypeId="1" PostId="4202" RevisionGUID="4fad5a1c-1c97-42be-ae18-e583c3566bb8" CreationDate="2010-10-01T10:15:47.627" UserId="1248" Text="What is Serialization?" />
  <row Id="8317" PostHistoryTypeId="3" PostId="4202" RevisionGUID="4fad5a1c-1c97-42be-ae18-e583c3566bb8" CreationDate="2010-10-01T10:15:47.627" UserId="1248" Text="&lt;c++&gt;&lt;serialization&gt;" />
  <row Id="8318" PostHistoryTypeId="2" PostId="4203" RevisionGUID="528fa32f-eed2-44fb-b764-2f779a67204c" CreationDate="2010-10-01T10:20:40.363" UserId="2361" Text="As I understand it, serialization is just the concept of taking an object or a set of objects, transforming them into a byte stream (for data storage, or network transmission, etc.) and then later reconstructing the original object from that bytestream (&quot;deserialization&quot;).&#xD;&#xA;&#xD;&#xA;Whimsical: It's a bit like a Star Trek teleporter, now I think of it.&#xD;&#xA;&#xD;&#xA;A number of libraries exist for this, each of which deal with the little niggles that tend to get in the way (like bytestream endianness and such)." />
  <row Id="8319" PostHistoryTypeId="2" PostId="4204" RevisionGUID="82725d7f-24ba-41d3-8a43-1e051ea88fdd" CreationDate="2010-10-01T10:26:42.363" UserId="1352" Text="Since I don't have the editor at hand at the moment I can't answer you accurately... I can however tell you with some confidence that YES it is possible.&#xD;&#xA;&#xD;&#xA;I have used the Warcraft III editor extensively, and I know there's a way to do this in that editor. There is no reason for it not being possible in the SC2 editor.&#xD;&#xA;&#xD;&#xA;Look under the upgrades section and see if you can find a field called starting value or something. I know there's some section where you can define the starting value of your upgrades, and the maximum number of upgrades of that type.&#xD;&#xA;&#xD;&#xA;Sorry I can't give you anything more specific." />
  <row Id="8320" PostHistoryTypeId="5" PostId="4202" RevisionGUID="62a5cf13-f494-4b45-8d69-1d79f5e1874b" CreationDate="2010-10-01T10:27:39.557" UserId="1248" Comment="added 218 characters in body" Text="I have been around programming for a while as a hobby, but I did not start seeing this concept until recently. I have google'd &quot;what is serialization&quot; numerous times, but I never actually get any sort of definition, usually just examples of how to do it. I am seeing it around the Ogre forums, the Bullet forums, and every other forum I go to, so I think it is about time I actually understand what it is, and why to use it.&#xD;&#xA;&#xD;&#xA;*Edit*&#xD;&#xA;&#xD;&#xA;To clarify, I am looking more for why to use it, especially in the sense of game programming. For example, the Bullet Physics API talks a lot about serializing a mesh, so I want to understand why that is.&#xD;&#xA;&#xD;&#xA;Thank you :)" />
  <row Id="8321" PostHistoryTypeId="2" PostId="4205" RevisionGUID="4b82aa38-b999-428c-b07d-fd5a9381ac15" CreationDate="2010-10-01T10:55:41.467" UserId="744" Text="From the &lt;a href=&quot;http://www.boost.org/doc/libs/1_44_0/libs/serialization/doc/index.html&quot;&gt;boost.serialization documentation&lt;/a&gt;: &lt;em&gt;Here, we use the term &quot;serialization&quot; to mean the reversible deconstruction of an arbitrary set of C++ data structures to a sequence of bytes. Such a system can be used to reconstitute an equivalent structure in another program context. Depending on the context, this might used implement object persistence, remote parameter passing or other facility. In this system we use the term &quot;archive&quot; to refer to a specific rendering of this stream of bytes. This could be a file of binary data, text data, XML, or some other created by the user of this library. &lt;/em&gt;&#xD;&#xA;&#xD;&#xA;In other words, serialization is any process that transforms objects in memory into some kind of bytestream, and _deserialization_ does the reverse, taking a bytestream and transforming it back into objects in memory.&#xD;&#xA;&#xD;&#xA;The term &quot;serialization&quot; does not imply anything about the format of the bytestream. It may be an efficiently packed binary format, or a loose XML or YAML description. It may even be source code in the original language itself, or in another programming language, such as &lt;a href=&quot;http://www.json.org/&quot;&gt;JSON&lt;/a&gt;, which is a subset of JavaScript. The exact format of the serialized stream should be chosen based on how you intend to use it.&#xD;&#xA;&#xD;&#xA;Serialization is a built-in feature of many languages and environments - for example &lt;a href=&quot;http://java.sun.com/developer/technicalArticles/Programming/serialization/&quot;&gt;Java&lt;/a&gt; and &lt;a href=&quot;http://docs.python.org/library/pickle.html&quot;&gt;Python&lt;/a&gt;. In lower-level languages like C and C++, one must use (or write) &lt;a href=&quot;http://gamedev.stackexchange.com/questions/2269/what-are-good-solutions-for-serialization-in-c&quot;&gt;serialization libraries&lt;/a&gt;, as the mechanism provided by the language is usually not good enough - it cannot follow or serialize pointers and references, and is subject to endianness issues, for example.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://en.wikipedia.org/wiki/Serialization&quot;&gt;Wikipedia has a decent article on serialization.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Serialization is used extensively in games (and all software) for many purposes:&#xD;&#xA; * Loading the list of all spells in the game from resource files.&#xD;&#xA; * Saving and loading the game.&#xD;&#xA; * Recording the state of things (e.g. player positions and inventories) to a SQL or object database.&#xD;&#xA; * Invoking remote function calls over a network or other IPC link.&#xD;&#xA;" />
  <row Id="8322" PostHistoryTypeId="2" PostId="4206" RevisionGUID="8fe6c6f8-d8a7-4653-aabe-e84536070a25" CreationDate="2010-10-01T11:03:48.673" UserId="2037" Text="I personally use serialisation for networking. Outside of that I don't really have much use for it. If you want to know why it's used in Bullet, the best chance you have of getting an answer is by asking in the Bullet forums or reading the documentation. " />
  <row Id="8323" PostHistoryTypeId="5" PostId="4205" RevisionGUID="54f1a622-9e91-4c6d-a72d-da4f82a485df" CreationDate="2010-10-01T11:05:12.257" UserId="744" Comment="added 2 characters in body" Text="From the &lt;a href=&quot;http://www.boost.org/doc/libs/1_44_0/libs/serialization/doc/index.html&quot;&gt;boost.serialization documentation&lt;/a&gt;: &lt;em&gt;Here, we use the term &quot;serialization&quot; to mean the reversible deconstruction of an arbitrary set of C++ data structures to a sequence of bytes. Such a system can be used to reconstitute an equivalent structure in another program context. Depending on the context, this might used implement object persistence, remote parameter passing or other facility. In this system we use the term &quot;archive&quot; to refer to a specific rendering of this stream of bytes. This could be a file of binary data, text data, XML, or some other created by the user of this library. &lt;/em&gt;&#xD;&#xA;&#xD;&#xA;In other words, serialization is any process that transforms objects in memory into some kind of bytestream, and _deserialization_ does the reverse, taking a bytestream and transforming it back into objects in memory.&#xD;&#xA;&#xD;&#xA;The term &quot;serialization&quot; does not imply anything about the format of the bytestream. It may be an efficiently packed binary format, or a loose XML or YAML description. It may even be source code in the original language itself, or in another programming language, such as &lt;a href=&quot;http://www.json.org/&quot;&gt;JSON&lt;/a&gt;, which is a subset of JavaScript. The exact format of the serialized stream should be chosen based on how you intend to use it.&#xD;&#xA;&#xD;&#xA;Serialization is a built-in feature of many languages and environments - for example &lt;a href=&quot;http://java.sun.com/developer/technicalArticles/Programming/serialization/&quot;&gt;Java&lt;/a&gt; and &lt;a href=&quot;http://docs.python.org/library/pickle.html&quot;&gt;Python&lt;/a&gt;. In lower-level languages like C and C++, one must use (or write) &lt;a href=&quot;http://gamedev.stackexchange.com/questions/2269/what-are-good-solutions-for-serialization-in-c&quot;&gt;serialization libraries&lt;/a&gt;, as the mechanism provided by the language is usually not good enough - it cannot follow or serialize pointers and references, and is subject to endianness issues, for example.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://en.wikipedia.org/wiki/Serialization&quot;&gt;Wikipedia has a decent article on serialization.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Serialization is used extensively in games (and all software) for many purposes:&#xD;&#xA;&#xD;&#xA; * Loading the list of all spells in the game from resource files.&#xD;&#xA; * Saving and loading the game.&#xD;&#xA; * Recording the state of things (e.g. player positions and inventories) to a SQL or object database.&#xD;&#xA; * Invoking remote function calls over a network or other IPC link.&#xD;&#xA;" />
  <row Id="8324" PostHistoryTypeId="2" PostId="4207" RevisionGUID="f89050fd-798e-4f29-9ee6-c16922bb584b" CreationDate="2010-10-01T11:12:10.700" UserId="744" Text="I always use float unless I have a reason to use double, much as I use int unless I have a reason to use int64_t.&#xD;&#xA;&#xD;&#xA;Floats have no problem doing precise integer arithmetic up to 2&lt;sup&gt;24&lt;/sup&gt;, which is what most people are (mostly irrationally) afraid of. Doubles do not solve the problem of common values being unrepresentable exactly - whether you get 0.10000001 or 0.10000000000000001, you still must make sure your code considers it &quot;equal&quot; to 0.09999999.&#xD;&#xA;&#xD;&#xA;Doubles are slower on every platform you'll care about writing games, take twice the memory bandwidth, and have fewer specialized CPU instructions available.&#xD;&#xA;&#xD;&#xA;Single-precision floats remain the standard for hardware graphics interfaces, both on the C/C++ side and inside shaders." />
  <row Id="8325" PostHistoryTypeId="2" PostId="4208" RevisionGUID="938ebf40-6bb7-4a6c-a401-a6ec5bf99847" CreationDate="2010-10-01T11:12:48.390" UserId="1101" Text="To serialize something essentially means to change it into a series. This is necessary if you want to send something over a network or write it to a file, because both of those expect a series of bytes. So it's generally a fancy term for the save and load systems. In the case of Bullet, it's simply taking the mesh data and saving it out in a form that Bullet can effectively use. You can save this out and load it in later without needing to re-analyse your meshes." />
  <row Id="8326" PostHistoryTypeId="5" PostId="4207" RevisionGUID="c2de8c81-b0d9-4402-8be0-ec70a44daf8b" CreationDate="2010-10-01T11:21:42.303" UserId="744" Comment="added 595 characters in body" Text="I always use float unless I have a reason to use double, much as I use int unless I have a reason to use int64_t.&#xD;&#xA;&#xD;&#xA;Floats have no problem doing precise integer arithmetic up to 2&lt;sup&gt;24&lt;/sup&gt;, which is what most people are (mostly irrationally) afraid of. Doubles do not solve the problem of common values being unrepresentable exactly - whether you get 0.10000001 or 0.10000000000000001, you still must make sure your code considers it &quot;equal&quot; to 0.09999999.&#xD;&#xA;&#xD;&#xA;Doubles are slower on every platform you'll care about writing games, take twice the memory bandwidth, and have fewer specialized CPU instructions available.&#xD;&#xA;&#xD;&#xA;Single-precision floats remain the standard for hardware graphics interfaces, both on the C/C++ side and inside shaders.&#xD;&#xA;&#xD;&#xA;You'll probably need a double vector at some point, but it should be used when needed, not by default.&#xD;&#xA;&#xD;&#xA;As for templating - you're right, for maximum performance you'll want to specialize the templates manually anyway. Aside from that, I ran some tests for some templated code over the weekend (making a 4-ple IntRect and FloatRect), and found that the templated version took about 20x longer to compile than just repeating the code, which amounted to about 15 lines. Repetition sucks, but waiting for compiles sucks more - and it's not like I'm ever going to need a StringRect or FooRect." />
  <row Id="8327" PostHistoryTypeId="2" PostId="4209" RevisionGUID="a091fc5f-e0a1-4516-8b5f-83c0c2bfec05" CreationDate="2010-10-01T11:32:11.143" UserId="1101" Text="I'd recommend not writing long scripts for actors, and instead just having each script be an instant 'reaction' script - ie. it runs and terminates quickly and decides a state for the actor to be in. So, I'd implement a few event handling functions in script, to be called as a result of significant in-game events, and an update script which is called once a frame or something. Pass in a small amount of context about the event in question, and the script should be able to call back into C++ functions to query the environment, set new objectives, etc. For the most part the important changes to behaviour and state should occur on the C++ side: the scripts should be limited to querying the current environment and quickly making a decision, passing that back to the engine.&#xD;&#xA;&#xD;&#xA;So for example, you don't continually call a script which then calls a C++ function to say &quot;take a step forward&quot;, you call one saying &quot;move me to X,Y&quot; and then the normal C++ update loop will do that without reference to script for the next few seconds. When you arrive, you might call a script (eg. 'on_arrival') where the NPC can choose its next goal.&#xD;&#xA;&#xD;&#xA;I don't recommend trying to run actors via long-running scripts with lots of loops,  conditionals, and storing state within the script, because this quickly becomes a concurrent system, and concurrent systems are REALLY HARD. If you use native threads to handle each character, you're going to hit multithreading bugs very, very quickly, unless you fully understand the implications of such a design (which sadly can't be explained in a single StackExchange post). If you decide to use some sort of user threads (eg. Stackless Python tasklets, Lua coroutines, etc) then you still need to understand the implications of cooperative multitasking - eg. being able to yield up control to other actors (ie. why `while (1) { do_nothing(); }` is not going to work for a sentry), and also to appreciate that even if your game is 'thread safe' the logic is not necessarily 'coroutine-safe' - a variable in one coroutine can easily become invalidated by another.&#xD;&#xA;&#xD;&#xA;eg:&#xD;&#xA;&#xD;&#xA;    function duel():&#xD;&#xA;        self.aim_at_foe()&#xD;&#xA;        self.shoot_foe_dead()&#xD;&#xA;        self.celebrate_victory()&#xD;&#xA;    &#xD;&#xA;    a = new Sheriff()&#xD;&#xA;    b = new Outlaw()&#xD;&#xA;    &#xD;&#xA;    run_both_at_same_time(a.duel(), b.duel())&#xD;&#xA;&#xD;&#xA;What happens when the loser (whoever it is) tries to execute 'self.celebrate_victory()' and your system discovers that 'self' now refers to a dead actor? Or if it's reference counted, what if it allows a dead actor to celebrate his victory?&#xD;&#xA;&#xD;&#xA;Of course, some people are used to this sort of problem and know what they're doing; anybody in that category can ignore much of the above. :)" />
  <row Id="8328" PostHistoryTypeId="2" PostId="4210" RevisionGUID="f9707a73-365b-4ee5-8c76-e226cff3392c" CreationDate="2010-10-01T11:45:11.693" UserId="189" Text="The Microsoft XNA game framework has a Vector2 class which uses floats. This would be my personal biggest reason for going with floats, as I trust the wisdom and experience of the XNA team to be much greater than my own.&#xD;&#xA;&#xD;&#xA;I found it rather interesting to read the answer in this Stack Overflow question: [&quot;Float vs Double Performance&quot;][1]. There is also a [gamedev.net thread][2] with some discussion of double performance in GPUs. I think it's safe to assume that doubles are slower than floats, at least in many GPUs, and I personally always used the float OpenGL functions over their double counterparts. This may not apply nowadays, but if you consider that not everyone who runs your game has the latest GPU with native double support, I think this is reason enough to use floats and gain that extra bit of performance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/417568/float-vs-double-performance&#xD;&#xA;  [2]: http://www.gamedev.net/community/forums/topic.asp?topic_id=530435" />
  <row Id="8329" PostHistoryTypeId="2" PostId="4211" RevisionGUID="0e325610-cbb2-4089-a7f6-425254dfadb2" CreationDate="2010-10-01T12:02:04.250" UserId="189" Text="Essentially, all the files at JogAmp can be found at http://jogamp.org/deployment/.&#xD;&#xA;&#xD;&#xA;The latest build can be found at http://jogamp.org/deployment/jogamp-next/. I can't attest to its stability, so I don't know if it is a &quot;latest stable&quot; build or not, but I think it is. There's not a clear definition of what they mean when they suffix something with &quot;-next&quot;.&#xD;&#xA;&#xD;&#xA;You can browse around other builds by just exploring the folders at http://jogamp.org/deployment/.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://jogl.dev.java.net/servlets/ProjectDocumentList&#xD;&#xA;  [2]: http://jogamp.org/deployment/archive/" />
  <row Id="8330" PostHistoryTypeId="2" PostId="4212" RevisionGUID="9e231b1d-1b26-479f-a018-1caf20e23e1f" CreationDate="2010-10-01T12:05:56.957" UserId="2363" Text="I am developing an Ipad application. It supports both landscape and portrait mode. The app has keyboard.It also shows an action sheet with 4 buttons when required. In portrait mode it works perfectly. But in landscape mode action sheet only show 2 buttons when keyboard is there .Without keyboard it show all 4 buttons. &#xD;&#xA;Any solution?&#xD;&#xA;" />
  <row Id="8331" PostHistoryTypeId="1" PostId="4212" RevisionGUID="9e231b1d-1b26-479f-a018-1caf20e23e1f" CreationDate="2010-10-01T12:05:56.957" UserId="2363" Text="Ipad - actionsheet not showing all buttons in landscape mode when keyboard is present" />
  <row Id="8332" PostHistoryTypeId="3" PostId="4212" RevisionGUID="9e231b1d-1b26-479f-a018-1caf20e23e1f" CreationDate="2010-10-01T12:05:56.957" UserId="2363" Text="&lt;iphone&gt;&lt;ipad&gt;" />
  <row Id="8333" PostHistoryTypeId="5" PostId="4132" RevisionGUID="72069158-1550-481b-a7f9-16a076da1675" CreationDate="2010-10-01T12:17:15.280" UserId="189" Comment="added 199 characters in body" Text="I started learning programming from web development. My first steps were opening notepad, writing some HTML, saving it, and opening it in a browser. Then I wrote another HTML file and saved it. And then I made a link. Suddenly I had two pages which I could go back and forth between.&#xD;&#xA;&#xD;&#xA;Then I got into PHP; I could handle user input! I could even save data about an user. I used cookies or the session to save data about the user between pages.&#xD;&#xA;&#xD;&#xA;Now just a few months ago, as I was thinking and wondering the same question as you, I realized game states are like PHP pages. They're very discrete, each one being a different view of your application (game, in this case), but they need some shared data. **They need session data.**&#xD;&#xA;&#xD;&#xA;Well, in PHP, to store something in the session you just use `$_SESSION['variablename']='value';`. Then you can later retrieve that data, from any PHP page visited by the same user in the same session, by referring to `$_SESSION['variablename'];`. Essentially, it's a **global** array, and in PHP you can easily add values to an array so it's essentially equivalent to a **Map**.&#xD;&#xA;&#xD;&#xA;So if you want to go this route, then add a &quot;global&quot; Map which acts as your &quot;session&quot; data. This will hold all of the data that needs to be shared between game states. Or simply make it a &quot;global&quot; object and add all the variables you need; this is entirely up to you, based on your needs. (obviously an object will get much better performance than a Map) **- when I say &quot;global&quot;, I mean make it available to all of your game states. You shouldn't make it available to any other objects which don't need it. This can be done, for example, by a variable inside the gamestate namespace, or a package-private Singleton in a language like Java.**&#xD;&#xA;&#xD;&#xA;Note this is only one way to do it. I really kind of like the way you want to attach the data to the parent Gameplay object; but in my state system I didn't really account for sub-states so I was just thinking of the PHP way." />
  <row Id="8338" PostHistoryTypeId="2" PostId="4215" RevisionGUID="b994efe6-02f7-424c-8838-075a7f8d2802" CreationDate="2010-10-01T13:17:41.070" UserId="2212" Text="Serialize/De-serialize is simply prepping and writing/reading objects to/from disk." />
  <row Id="8339" PostHistoryTypeId="2" PostId="4216" RevisionGUID="1868dfdc-1f37-4af2-b5cd-bf0c261d0c2a" CreationDate="2010-10-01T14:21:43.140" UserId="2365" Text="I heard that it would be a lot easier to do java type games and then move on to Android gaming?&#xD;&#xA;I AM a total beginning but with motive and I have been reading about it from several sources, including similar questions on this site alone.&#xD;&#xA;But I need to know specific things from experienced users.&#xD;&#xA;&#xD;&#xA;As for getting the SDK and Eclipse on the computer, I'm having trouble with it, I am running Ubuntu btw so exe files are useless. But I have tired terminal use but I kind of failed because I don't think the SDK and Eclipse are installed, just downloaded.&#xD;&#xA;Ubuntu users especially, I can use help from you seeing how complicated Ubuntu can be compared to windows &quot;click install&quot; setups.&#xD;&#xA;&#xD;&#xA;Also if you guys really suggest me learning Java first (which is still a big question cause I don't want to waste time with something I don't want to really use, but getting the feel of gaming is pretty important I know) I am looking at this tutorial:&#xD;&#xA;&#xD;&#xA;http://zetcode.com/tutorials/javaswingtutorial/&#xD;&#xA;&#xD;&#xA;And it talks about using swing toolkit, but idk how to get that exactly, I tried searching. Sorry for the noobness, but gotta start somewhere and I'm new to this site so I'm really hoping you guys can really help me. I want to make simple games to put on the android market, and then advance.&#xD;&#xA;&#xD;&#xA;So going to the tutorial above, it just kind of starts with giving me coding and whatnot which is fine, just copy it but idk where exactly to do all this on (Swing toolkit?) so I can't even start with that.&#xD;&#xA;&#xD;&#xA;But really I want help getting this SDK and Eclipse/plugins on my computer and then I can continue with this guide:&#xD;&#xA;&#xD;&#xA;www.rbgrn.net/content/54-getting-started-android-game-development &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Which is the main guide that I probably should follow, and would be great if some expert skims it a little at least to see if I should start with that guide and skip the java.&#xD;&#xA;But again, I'm stuck on the SDK stuff.&#xD;&#xA;&#xD;&#xA;Sorry for the long questions, I am new and I really want to get out of this beginner stage, it's the worst part. Tank you to all and if you want my facebook or AIM to help me through with IM to at least get this SDK and stuff installed fine with Ubuntu OS, ask please (:&#xD;&#xA;" />
  <row Id="8340" PostHistoryTypeId="1" PostId="4216" RevisionGUID="1868dfdc-1f37-4af2-b5cd-bf0c261d0c2a" CreationDate="2010-10-01T14:21:43.140" UserId="2365" Text="Wanting to start Android gaming development " />
  <row Id="8341" PostHistoryTypeId="3" PostId="4216" RevisionGUID="1868dfdc-1f37-4af2-b5cd-bf0c261d0c2a" CreationDate="2010-10-01T14:21:43.140" UserId="2365" Text="&lt;android&gt;" />
  <row Id="8342" PostHistoryTypeId="2" PostId="4217" RevisionGUID="dd4201bb-f306-4979-98a5-92ce1049bb17" CreationDate="2010-10-01T15:16:39.893" UserId="2301" Text="We don't have zune HD in Canada (yet) just wondering if it has the same programmable features as WP7? Like gestures and accelerometer.&#xD;&#xA;&#xD;&#xA;Basically if I am just making a game, with screen controls (thumbsticks on the screen) is this an easy port to zune?  &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="8343" PostHistoryTypeId="1" PostId="4217" RevisionGUID="dd4201bb-f306-4979-98a5-92ce1049bb17" CreationDate="2010-10-01T15:16:39.893" UserId="2301" Text="Zune same features as WP7? (gesture, accelerometer) " />
  <row Id="8344" PostHistoryTypeId="3" PostId="4217" RevisionGUID="dd4201bb-f306-4979-98a5-92ce1049bb17" CreationDate="2010-10-01T15:16:39.893" UserId="2301" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="8345" PostHistoryTypeId="4" PostId="4216" RevisionGUID="26c48e8b-bcef-492c-9f0c-3dadd277727b" CreationDate="2010-10-01T15:19:27.103" UserId="14" Comment="edited title; edited title" Text="How do I get and install the Android SDK on my Ubuntu OS?" />
  <row Id="8346" PostHistoryTypeId="2" PostId="4218" RevisionGUID="64799fce-6550-46f7-aaac-984dba2440b4" CreationDate="2010-10-01T15:21:18.497" UserId="2366" Text="I think he actually left out 4 major points (as opposed to 3). These are my guesses based on experience.&#xD;&#xA;&#xD;&#xA;**Economies** - Not only do you earn points and level up but you may also spend them at your own will. For instance, look at the bounty system on Stack Ex&#xD;&#xA;&#xD;&#xA;change sites... I had a burning question to ask that was getting no feedback and had no reputation to spend on it, so I spend 4 days answering a ton of questions so I could post a juicy bounty (and it got me a great answer). There are players in China that play World of Warcraft as a full time job that dubbed gold miners because all they do is run around collecting gold in the game to sell online for real money. The same was also true in Diablo II where some of the items were so rare than out of the hundreds of thousands of players playing at any given time over the course of a few years would only find a couple. The rarest item (a Zod rune) of which only one had been found after 3 years of gameplay sold for a reportedly 1100 USD on ebay. If games are the future of social engineering, than Blizzard Entertainment are poised to take over the world because they are the masters. I quit playing World of Warcraft after two weeks because I could tell that the game was more designed to have go on forever, be relatively boring and slow moving, while being designed to be extremely addictive (I had been through a pretty extensive Diablo II phase in the past and learnt that lesson).&#xD;&#xA;&#xD;&#xA;**Identity** - Not only is it important to be able to level but it's important to be distinguishable as an individual. Whether that means that you use a alias as your handle or you use your real name. That's what made Facebook take over MySpace. By getting people to use their real names, not only was it easier to find your friends (past or present) online but, by attaching real identities to the handle, most of the trolling/trash talking/spaming/lurking stopped because the people taking part in it could be held accountable. Stack Exchange sites do this by adding the profile to each user's account. World of Warcraft does it by allowing you to customize your character in many ways to look unique. Tiger Woods Golf, as well as Nintendo Wii and XBox360 does it by allowing you to create a custom 3D avatar. Twitter, Stack Exchange, and many other social networks do it by allowing you to respond to a unique user by adding the @ prefix to their name making it easier to have a direct dialog instead of the typical 'talking to a wall' experience of commenting systems that don't use it (IMHO the single greatest simple innovation in social networking ever).&#xD;&#xA;&#xD;&#xA;**Scarcity** - Blizzard have mastered this since the days of Diablo I with the 'normal item', 'magical item', 'rare item', 'unique item'. In the early parts of the game, normal items work. As it gets harder magical items become a necessity. Harder still and rare items become a must. Then unique items. Then (in the case of Diablo II on hardest difficulty) they went as far as to make it near impossible to beat without working as a team. As I remember the trade for unique items was a pretty brutal marketplace. It took a lot of work/time/effort on the hardest difficulty to gain worthwhile unique items and it was always a hard bargain to trade for them. World of Warcraft took this a magnitude further by creating the automatic-auction system that mimics ebay to sell items online over the course of a pre-defined time allotment.&#xD;&#xA;&#xD;&#xA;**Social Dependence** - In World of Warcraft, It's a lot harder (and sometimes impossible) and a lot less fun to play alone. That alone makes it necessary to socialize and group up with other players. In Call of Duty, if you have a decent team all with headsets you gain a huge advantage by being able to share intel on the other team and coordinate attacks. A lot of services sold today offer the 'sign up a friend and save x amount on your first bill' bonuses. Facebook offers the like button and ability to comment on other's posts. Without comments and approval micro-blogging becomes pointless. Ever since the earliest games, the multi-player option has always been a necessity because once you beat a game on single player, there isn't much point in beating it again (IE, the story line is over). Multi-player games enable humans to play together or against each other. In almost every game I've ever played multi-player, with an equal set of advantages/disadvantages the human is always harder to play. About the upper limit of a single player game for playability length is about 60-100 hours of content. Anything beyond that feels tedious. With multi-player, it becomes unlimited (or until the next great multi-player game comes out) because human strategy is dynamic. A top sniper spot on one map one day may become common knowledge in a week thereby making it an easy target. Sometimes, there are anti-strategies where picking a strategically poor position may be a huge advantage because it is unpredictable. The only games where a computer can consistently win are lame algorithmic games with really limited sets of rules and dynamics like chess (IE the computer can calculate every possible move and counter-move before playing out its turn). IMHO, chess is too simplistic to be a chess game. I prefer to place it in the category of mental masturbation. The best part about social dependence is, the game sucks without your friends so you have to get them involved. How much more viral do you get than that. That's how MySpace and Facebook became successful. Nobody wants to have 0 friends online." />
  <row Id="8348" PostHistoryTypeId="2" PostId="4219" RevisionGUID="cde54b47-e5a2-43c9-87e4-49dca43ec1c5" CreationDate="2010-10-01T15:38:25.647" UserId="1217" Text="As the title suggests I'm developing a top down space game. &#xD;&#xA;&#xD;&#xA;I'm not looking to use neutonian (spelled that way?) physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that of FlatSpace 2 (awesome game). I can't figure out how to achieve this feeling with keyboard controls as opposed to mouse controls though. Any suggestions? &#xD;&#xA;&#xD;&#xA;I'm using Unity3d and C# or javaScript (unityScript or whatever is the correct term) works fine if you want to drop some code examples. " />
  <row Id="8349" PostHistoryTypeId="1" PostId="4219" RevisionGUID="cde54b47-e5a2-43c9-87e4-49dca43ec1c5" CreationDate="2010-10-01T15:38:25.647" UserId="1217" Text="Top down space game control problem" />
  <row Id="8350" PostHistoryTypeId="3" PostId="4219" RevisionGUID="cde54b47-e5a2-43c9-87e4-49dca43ec1c5" CreationDate="2010-10-01T15:38:25.647" UserId="1217" Text="&lt;c#&gt;&lt;unity&gt;&lt;javascript&gt;" />
  <row Id="8351" PostHistoryTypeId="2" PostId="4220" RevisionGUID="56912958-616a-4990-983f-31a00e1df6c1" CreationDate="2010-10-01T15:41:54.687" UserId="1352" Text="**About game programming**&#xD;&#xA;&#xD;&#xA;* Learn the basics of programming in the most fun and inspiring way you can, and don't be discouraged that you won't have anything good enough to release on the Android marked right away. &#xD;&#xA;&#xD;&#xA;* Aim for small mini-projects that can help you understand the different aspects of programming. &#xD;&#xA;&#xD;&#xA;* Don't bite over more than you can handle. Not understanding things is really demotivational.&#xD;&#xA;&#xD;&#xA;* Understand the game loop.&#xD;&#xA;* Get something visual up and running fast. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Some of the most memorable mistakes I made as a complete newbie were:&#xD;&#xA;&#xD;&#xA;* Creating new objects every frame of my game. Memory allocation is slow, garbage collection ( the deletion of unused objects ) even slower. If your mobile game does this your mobile will run out of juice pretty fast.&#xD;&#xA;* Incrementing my game logic every  frame by a fixed rate instead of a function of the time spent between frames.&#xD;&#xA;* No overall arcitechture or idea of how I would connect different parts of the logic that has to be handled in a game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**About embedded games programming**&#xD;&#xA;&#xD;&#xA;Although Java is a great language for beginners, the Android platform is not.&#xD;&#xA;&#xD;&#xA;I am currently working on a game engine for Android. What I can tell you is that making games is hard. Even more so on embedded systems because of limited hardware capabilities. &#xD;&#xA;&#xD;&#xA;**About the javax.swing library**&#xD;&#xA;&#xD;&#xA;I started with Java and swing as my first programming language and GUI toolkit.&#xD;&#xA;It was a great way to get started. The first year of programming I made more mini-projects than I have ever made since.&#xD;&#xA;&#xD;&#xA;The swing library is built into the standard libraries in standard Java, but is stripped out of the Android specific Java that runs on the Dalvik VM.&#xD;&#xA;&#xD;&#xA;All you need to do to use swing is to have an import javax.swing.*; statement in the top of your code file.&#xD;&#xA;&#xD;&#xA;**GPWiki**&#xD;&#xA;&#xD;&#xA;Lastly, I would like to direct you to these pages:&#xD;&#xA;&#xD;&#xA;http://gpwiki.org/index.php/How_do_I_get_Started&#xD;&#xA;&#xD;&#xA;http://gpwiki.org/index.php/Beginner_FAQ&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8355" PostHistoryTypeId="2" PostId="4222" RevisionGUID="c2200f5f-6556-4512-b9a6-400ac29dca5c" CreationDate="2010-10-01T16:06:40.290" UserId="1677" Text="Do you distinguish constant and changeable game objects when you save/load game? If yes, how do you do it?&#xD;&#xA;&#xD;&#xA;If not to save constant objects (for example, mountains and trees), we optimize memory usage and save/load time. But functional requirements for the game can change. Now you want trees to be mutable and destroyable. It can screw up all previous game states. Trees were not saved =&gt; saved game map is interpreted as the prairie without trees." />
  <row Id="8356" PostHistoryTypeId="1" PostId="4222" RevisionGUID="c2200f5f-6556-4512-b9a6-400ac29dca5c" CreationDate="2010-10-01T16:06:40.290" UserId="1677" Text="Distinction between constant and changeable game objects?" />
  <row Id="8357" PostHistoryTypeId="3" PostId="4222" RevisionGUID="c2200f5f-6556-4512-b9a6-400ac29dca5c" CreationDate="2010-10-01T16:06:40.290" UserId="1677" Text="&lt;state&gt;&lt;loading&gt;" />
  <row Id="8358" PostHistoryTypeId="2" PostId="4223" RevisionGUID="72568e20-d00b-4a53-a976-3c544cfc66c0" CreationDate="2010-10-01T16:14:35.760" UserId="744" Text="Saved games should either:&#xD;&#xA;&#xD;&#xA; * Completely describe everything, whether mutable or not. This is the safest way, and easy, but does use a lot more space. It doesn't really use more _memory_, since you need the trees either way. It just uses more persistent storage, which there is plenty of on anything that's not a Nintendo DS. It also means you can't fix bugs in levels without players having to restart the game to get the bug fix.&#xD;&#xA; * Describe *differences* between the default map state and its current state. This solves the tree example you give. The save game says nothing about trees; therefore the trees are in their default place on the map. It means you cannot do the reverse - change something from mutable to fixed - but there is obviously no way to do that and preserve the save file accurately." />
  <row Id="8359" PostHistoryTypeId="2" PostId="4224" RevisionGUID="8215dc09-2e6e-4f31-be9e-e865d2951c0b" CreationDate="2010-10-01T16:18:57.200" UserId="18" Text="The Swing library is part of the Java platform since Java 1.2, so you don't need to download the library separately. You can start following these tutorials right away assuming you got the JDK (Java Development Kit) installed.&#xD;&#xA;&#xD;&#xA;Do you already know Java? You might want to invest some time in learning that before you start learning game programming in Java. If you already know another language such as C++ then it shouldn't be hard for you to pick it up, otherwise you need to spend some time learning how to program. The [Java Tutorials](http://download.oracle.com/javase/tutorial/) are a good place to start. There are tons of other tutorials and books on programming, Java, and game development.&#xD;&#xA;&#xD;&#xA;I know you really want to get started with making games, and don't want to go through learning java, game programming, and then Android programming, but it is worth it. You *can* just start making a game for Android right away but you'll just get stuck sooner or later, eventually you need to learn all of this one way or another. I completely agree with [Nailer's answer](http://gamedev.stackexchange.com/questions/4216/how-do-i-get-and-install-the-android-sdk-on-my-ubuntu-os/4220#4220) and you should realize that learning to make games will take time and effort. You said that learning Java might be a waste of time but I strongly disagree, learning new skills is never a waste of time, even if you don't end up making a game using Java.&#xD;&#xA;&#xD;&#xA;Assuming you got the latest Ubuntu version (10.04, or even 9.10), you can use the [Ubuntu Software Center](http://en.wikipedia.org/wiki/Ubuntu_Software_Center) to download Eclipse and all of the other libraries required by it. You can find the software center through the Applications menu, and then just search for &quot;eclipse&quot; in the top right search box and install it. If you have an older Ubuntu version then you might need to download Eclipse from the [official website](http://www.eclipse.org). You probably need to download the JDK(`sudo apt-get install sun-java6-jdk` in the terminal) before you download Eclipse. Once you have both Eclipse and the JDK you can proceed to download the Android SDK and follow Google's [quick start guide](http://developer.android.com/sdk/index.html) or this [more detailed guide](http://developer.android.com/sdk/installing.html). Here are two more guides for you: [1](http://www.helloandroid.com/tutorials/how-set-eclipse-android-sdk-ubuntu-linux-904910-updated), [2](http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/). Note that you just need Eclipse and the JDK to follow the Swing tutorials.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8360" PostHistoryTypeId="4" PostId="4222" RevisionGUID="3fb78b44-22e5-4551-a0a0-265555e2a9fd" CreationDate="2010-10-01T16:22:33.953" UserId="744" Comment="Retitle as the question is really about save game loading and not mutable state." Text="How do you correctly load old save data with new static game data?" />
  <row Id="8361" PostHistoryTypeId="5" PostId="4224" RevisionGUID="342159d6-be14-45f0-9dd5-cf837d95819d" CreationDate="2010-10-01T16:24:20.370" UserId="18" Comment="deleted 20 characters in body; added 255 characters in body" Text="The Swing library is part of the Java platform since Java 1.2, so you don't need to download the library separately. You can start following these tutorials right away assuming you got the JDK (Java Development Kit) installed.&#xD;&#xA;&#xD;&#xA;Do you already know Java? You might want to invest some time in learning that before you start learning game programming in Java. If you already know another language such as C++ then it shouldn't be hard for you to pick it up, otherwise you need to spend some time learning how to program. The [Java Tutorials](http://download.oracle.com/javase/tutorial/) are a good place to start. There are tons of other tutorials and books on programming, Java, and game development.&#xD;&#xA;&#xD;&#xA;I know you really want to get started with making games, and don't want to go through learning java, game programming, and then Android programming, but it is worth it. You *can* start making a game for Android right away, but you'll get stuck sooner or later; you need to learn all of this one way or another. I completely agree with [Nailer's answer](http://gamedev.stackexchange.com/questions/4216/how-do-i-get-and-install-the-android-sdk-on-my-ubuntu-os/4220#4220) and you should realize that learning to make games will take time and effort. You said that learning Java might be a waste of time but I strongly disagree, learning new skills is never a waste of time, even if you don't end up making a game using Java.&#xD;&#xA;&#xD;&#xA;Assuming you got the latest Ubuntu version (10.04, or even 9.10), you can use the [Ubuntu Software Center](http://en.wikipedia.org/wiki/Ubuntu_Software_Center) to download Eclipse and all of the other libraries required by it. You can find the software center through the Applications menu, and then just search for &quot;eclipse&quot; in the top right search box and install it. If you have an older Ubuntu version then you might need to download Eclipse from the [official website](http://www.eclipse.org). You probably need to download the JDK(`sudo apt-get install sun-java6-jdk` in the terminal) before you download Eclipse. Once you have both Eclipse and the JDK you can proceed to download the Android SDK and follow Google's [quick start guide](http://developer.android.com/sdk/index.html) or this [more detailed guide](http://developer.android.com/sdk/installing.html). Here are two more guides for you: [1](http://www.helloandroid.com/tutorials/how-set-eclipse-android-sdk-ubuntu-linux-904910-updated), [2](http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/). Note that you just need Eclipse and the JDK to follow the Swing tutorials.&#xD;&#xA;&#xD;&#xA;If you have any problems with following these guides or with installing any required programs and libraries on Ubuntu, you can always ask at the [Ubuntu Stack Exchange site](http://ubuntu.stackexchange.com/) or the [Ubuntu Forums](http://ubuntuforums.org/)." />
  <row Id="8362" PostHistoryTypeId="7" PostId="4222" RevisionGUID="09d38659-6800-4380-9589-81c7ff64e0c0" CreationDate="2010-10-01T16:24:39.847" UserId="1677" Comment="Rollback to [c2200f5f-6556-4512-b9a6-400ac29dca5c]" Text="Distinction between constant and changeable game objects?" />
  <row Id="8363" PostHistoryTypeId="4" PostId="4222" RevisionGUID="d4eee80d-d3dc-4c74-b949-3e14f0e1deb5" CreationDate="2010-10-01T16:30:41.970" UserId="1677" Comment="edited title" Text="Distinction between constant and changeable game objects in save/load game?" />
  <row Id="8364" PostHistoryTypeId="5" PostId="4224" RevisionGUID="3523c5d2-06e0-409d-8da4-d58d878b7f9a" CreationDate="2010-10-01T16:31:18.240" UserId="18" Comment="added 115 characters in body" Text="The Swing library is part of the Java platform since Java 1.2, so you don't need to download the library separately. You can start following these tutorials right away assuming you got the JDK (Java Development Kit) installed.&#xD;&#xA;&#xD;&#xA;Do you already know Java? You might want to invest some time in learning that before you start learning game programming in Java. If you already know another language such as C++ then it shouldn't be hard for you to pick it up, otherwise you need to spend some time learning how to program. The [Java Tutorials](http://download.oracle.com/javase/tutorial/) are a good place to start. There are tons of other tutorials and books on programming, Java, and game development.&#xD;&#xA;&#xD;&#xA;I know you really want to get started with making games, and don't want to go through learning java, game programming, and then Android programming, but it is worth it. You *can* start making a game for Android right away, but you'll get stuck sooner or later; you need to learn all of this one way or another. I completely agree with [Nailer's answer](http://gamedev.stackexchange.com/questions/4216/how-do-i-get-and-install-the-android-sdk-on-my-ubuntu-os/4220#4220) and you should realize that learning to make games will take time and effort. You said that learning Java might be a waste of time but I strongly disagree, learning new skills is never a waste of time, even if you don't end up making a game using Java.&#xD;&#xA;&#xD;&#xA;Assuming you got the latest Ubuntu version (10.04, or even 9.10), you can use the [Ubuntu Software Center](http://en.wikipedia.org/wiki/Ubuntu_Software_Center) to download Eclipse and all of the other libraries required by it. You can find the software center through the Applications menu, and then just search for &quot;eclipse&quot; in the top right search box and install it. If you have an older Ubuntu version then you might need to download Eclipse from the [official website](http://www.eclipse.org). You probably need to download the JDK(`sudo apt-get install sun-java6-jdk` in the terminal) before you download Eclipse. Once you have both Eclipse and the JDK you can proceed to download the Android SDK and follow Google's [quick start guide](http://developer.android.com/sdk/index.html) or this [more detailed guide](http://developer.android.com/sdk/installing.html). Here are two more guides for you: [1](http://www.helloandroid.com/tutorials/how-set-eclipse-android-sdk-ubuntu-linux-904910-updated), [2](http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/). Note that you just need Eclipse and the JDK to follow the Swing tutorials, but make sure you create Java applications and not Android ones because Swing is not part of the Android platform.&#xD;&#xA;&#xD;&#xA;If you have any problems with following these guides or with installing any required programs and libraries on Ubuntu, you can always ask at the [Ubuntu Stack Exchange site](http://ubuntu.stackexchange.com/) or the [Ubuntu Forums](http://ubuntuforums.org/)." />
  <row Id="8365" PostHistoryTypeId="2" PostId="4225" RevisionGUID="865e6cbd-fdf6-45c1-8ceb-e7a4c20f9566" CreationDate="2010-10-01T16:42:45.370" UserId="2037" Text="If you're using Ubuntu and want to install Eclipse then then go to Application-&gt;Ubuntu Software Center. Then type Eclipse into the search tool at the top, you'll see a list of packages, just click the ones you need. I think you need to install Eclipse and eclipse-pde for plug-ins. &#xD;&#xA;&#xD;&#xA;For setting up the Android SDK check out this tutorial. http://lgjsheron.wordpress.com/2010/07/01/installing-eclipse-and-the-android-sdk-on-ubuntu-10-04/&#xD;&#xA;&#xD;&#xA;If you want more help on the programming side of things then you should check out this book: http://www.amazon.com/Pro-Android-Games-Vladimir-Silva/dp/1430226471 I've used it in the past and it was pretty helpful." />
  <row Id="8366" PostHistoryTypeId="5" PostId="4218" RevisionGUID="01716729-0991-416d-b1be-d74d9bff63d4" CreationDate="2010-10-01T16:49:58.963" UserId="2366" Comment="deleted 4 characters in body; deleted 5 characters in body" Text="I think he actually left out 4 major points (as opposed to 3). These are my guesses based on experience.&#xD;&#xA;&#xD;&#xA;**Economies** - Not only do you earn points and level up but you may also spend them at your own will. For instance, look at the bounty system on Stack Exchange sites... I had a burning question to ask that was getting no feedback and had no reputation to spend on it, so I spend 4 days answering a ton of questions so I could post a juicy bounty (and it got me a great answer). There are players in China that play World of Warcraft as a full time job dubbed gold miners because all they do is run around collecting gold in the game to sell online for real money. The same was also true in Diablo II where some of the items were so rare than out of the hundreds of thousands of players playing at any given time over the course of a few years would only find a couple. The rarest item (a Zod rune) of which only one had been found after 3 years of gameplay sold for a reportedly 1100 USD on ebay. If games are the future of social engineering, than Blizzard Entertainment are poised to take over the world because they are the masters. I quit playing World of Warcraft after two weeks because I could tell that the game was more designed to have go on forever, be relatively boring and slow moving, while being designed to be extremely addictive (I had been through a pretty extensive Diablo II phase in the past and learnt that lesson).&#xD;&#xA;&#xD;&#xA;**Identity** - Not only is it important to be able to level but it's important to be distinguishable as an individual. Whether that means that you use a alias as your handle or you use your real name. That's what made Facebook take over MySpace. By getting people to use their real names, not only was it easier to find your friends (past or present) online but, by attaching real identities to the handle, most of the trolling/trash talking/spaming/lurking stopped because the people taking part in it could be held accountable. Stack Exchange sites do this by adding the profile to each user's account. World of Warcraft does it by allowing you to customize your character in many ways to look unique. Tiger Woods Golf, as well as Nintendo Wii and XBox360 does it by allowing you to create a custom 3D avatar. Twitter, Stack Exchange, and many other social networks do it by allowing you to respond to a unique user by adding the @ prefix to their name making it easier to have a direct dialog instead of the typical 'talking to a wall' experience of commenting systems that don't use it (IMHO the single greatest simple innovation in social networking ever).&#xD;&#xA;&#xD;&#xA;**Scarcity** - Blizzard have mastered this since the days of Diablo I with the 'normal item', 'magical item', 'rare item', 'unique item'. In the early parts of the game, normal items work. As it gets harder magical items become a necessity. Harder still and rare items become a must. Then unique items. Then (in the case of Diablo II on hardest difficulty) they went as far as to make it near impossible to beat without working as a team. As I remember the trade for unique items was a pretty brutal marketplace. It took a lot of work/time/effort on the hardest difficulty to gain worthwhile unique items and it was always a hard bargain to trade for them. World of Warcraft took this a magnitude further by creating the automatic-auction system that mimics ebay to sell items online over the course of a pre-defined time allotment.&#xD;&#xA;&#xD;&#xA;**Social Dependence** - In World of Warcraft, It's a lot harder (and sometimes impossible) and a lot less fun to play alone. That alone makes it necessary to socialize and group up with other players. In Call of Duty, if you have a decent team all with headsets you gain a huge advantage by being able to share intel on the other team and coordinate attacks. A lot of services sold today offer the 'sign up a friend and save x amount on your first bill' bonuses. Facebook offers the like button and ability to comment on other's posts. Without comments and approval micro-blogging becomes pointless. Ever since the earliest games, the multi-player option has always been a necessity because once you beat a game on single player, there isn't much point in beating it again (IE, the story line is over). Multi-player games enable humans to play together or against each other. In almost every game I've ever played multi-player, with an equal set of advantages/disadvantages the human is always harder to play. About the upper limit of a single player game for playability length is about 60-100 hours of content. Anything beyond that feels tedious. With multi-player, it becomes unlimited (or until the next great multi-player game comes out) because human strategy is dynamic. A top sniper spot on one map one day may become common knowledge in a week thereby making it an easy target. Sometimes, there are anti-strategies where picking a strategically poor position may be a huge advantage because it is unpredictable. The only games where a computer can consistently win are lame algorithmic games with really limited sets of rules and dynamics like chess (IE the computer can calculate every possible move and counter-move before playing out its turn). IMHO, chess is too simplistic to be a chess game. I prefer to place it in the category of mental masturbation. The best part about social dependence is, the game sucks without your friends so you have to get them involved. How much more viral do you get than that. That's how MySpace and Facebook became successful. Nobody wants to have 0 friends online." />
  <row Id="8367" PostHistoryTypeId="5" PostId="4218" RevisionGUID="01108154-de1e-4e91-8435-2aef367bb1a7" CreationDate="2010-10-01T16:59:30.833" UserId="2366" Comment="deleted 1 characters in body; deleted 4 characters in body" Text="I think he actually left out 4 major points (as opposed to 3). These are my guesses based on experience.&#xD;&#xA;&#xD;&#xA;**Economies** - Not only do you earn points and level up but you may also spend them at your own will. For instance, look at the bounty system on Stack Exchange sites... I had a burning question to ask that was getting no feedback and had no reputation to spend on it, so I spend 4 days answering a ton of questions so I could post a juicy bounty (and it got me a great answer). There are players in China that play World of Warcraft as a full time job dubbed gold miners because all they do is run around collecting gold in the game to sell online for real money. The same was also true in Diablo II where some of the items were so rare than out of the hundreds of thousands of players playing at any given time over the course of a few years would only find a couple. The rarest item (a Zod rune) of which only one had been found after 3 years of gameplay sold for a reportedly 1100 USD on ebay. If games are the future of social engineering, than Blizzard Entertainment are poised to take over the world because they are the masters. I quit playing World of Warcraft after two weeks because I could tell that the game was more designed to have go on forever, be relatively boring and slow moving, while being designed to be extremely addictive (I had been through a pretty extensive Diablo II phase in the past and learnt that lesson).&#xD;&#xA;&#xD;&#xA;**Identity** - Not only is it important to be able to level but it's important to be distinguishable as an individual. Whether that means that you use a alias as your handle or you use your real name. That's what made Facebook win over MySpace. By getting people to use their real names, not only was it easier to find your friends (past or present) online but, by attaching real identities to the handle, most of the trolling/trash talking/spaming/lurking stopped because the people taking part in it could be held accountable. Stack Exchange sites do this by adding the profile to each user's account. World of Warcraft does it by allowing you to customize your character in many ways to look unique. Tiger Woods Golf, as well as Nintendo Wii and XBox360 does it by allowing you to create a custom 3D avatar. Twitter, Stack Exchange, and many other social networks do it by allowing you to respond to a unique user by adding the @ prefix to their name making it easier to have a direct dialog instead of the typical 'talking to a wall' experience of commenting systems that don't use it (IMHO the single greatest simple innovation in social networking ever).&#xD;&#xA;&#xD;&#xA;**Scarcity** - Blizzard have mastered this since the days of Diablo I with the 'normal item', 'magical item', 'rare item', 'unique item'. In the early parts of the game, normal items work. As it gets harder magical items become a necessity. Harder still and rare items become a must. Then unique items. Then (in the case of Diablo II on hardest difficulty) they went as far as to make it near impossible to beat without working as a team. As I remember the trade for unique items was a pretty brutal marketplace. It took a lot of work/time/effort on the hardest difficulty to gain worthwhile unique items and it was always a hard bargain to trade for them. World of Warcraft took this a magnitude further by creating the automatic-auction system that mimics ebay to sell items online over the course of a pre-defined time allotment.&#xD;&#xA;&#xD;&#xA;**Social Dependence** - In World of Warcraft, It's a lot harder (sometimes impossible) and a lot less fun to play alone. That alone makes it necessary to socialize and group up with other players. In Call of Duty, if you have a decent team all with headsets you gain a huge advantage by being able to share intel on the other team and coordinate attacks. A lot of services sold today offer the 'sign up a friend and save x amount on your first bill' bonuses. Facebook offers the like button and ability to comment on other's posts. Without comments and approval micro-blogging becomes pointless. Ever since the earliest games, the multi-player option has always been a necessity because once you beat a game on single player, there isn't much point in beating it again (IE, the story line is over). Multi-player games enable humans to play together or against each other. In almost every game I've ever played multi-player, with an equal set of advantages/disadvantages the human is always harder to play. About the upper limit of a single player game for playability length is about 60-100 hours of content. Anything beyond that feels tedious. With multi-player, it becomes unlimited (or until the next great multi-player game comes out) because human strategy is dynamic. A top sniper spot on one map one day may become common knowledge in a week thereby making it an easy target. Sometimes, there are anti-strategies where picking a strategically poor position may be a huge advantage because it is unpredictable. The only games where a computer can consistently win are lame algorithmic games with really limited sets of rules and dynamics like chess (IE the computer can calculate every possible move and counter-move before playing out its turn). IMHO, chess is too simplistic to be a chess game. I prefer to place it in the category of mental masturbation. The best part about social dependence is, the game sucks without your friends so you have to get them involved. How much more viral do you get than that. That's how MySpace and Facebook became successful. Nobody wants to have 0 friends online." />
  <row Id="8368" PostHistoryTypeId="2" PostId="4226" RevisionGUID="4a6cebe1-cf9c-4655-a8a0-5fdb42767383" CreationDate="2010-10-01T17:21:17.250" UserId="1677" Text="Why don't just say `100% = resource count`? Resource loaded =&gt; increment.&#xD;&#xA;&#xD;&#xA;I suppose you want to use stack to manage dependencies between resources? Push resource. Push dependencies... etc. Than you have 2 passes:&#xD;&#xA;&#xD;&#xA;1. collect resources in stack&#xD;&#xA;(count resources)&#xD;&#xA;2. load resources&#xD;&#xA;(increment status bar)" />
  <row Id="8369" PostHistoryTypeId="2" PostId="4227" RevisionGUID="6655eb55-cab5-4dcc-8629-82e53f32cb13" CreationDate="2010-10-01T17:38:52.157" UserId="1677" Text="[Formal grammars][1] are an essential way of describing plots.&#xD;&#xA;&#xD;&#xA;For example, [Vladimir Yakovlevich Propp][2] proposed a grammar for a typical folk tale in *&quot;Morphology of the Folk Tale&quot;*.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Formal_grammar&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Vladimir_Propp" />
  <row Id="8373" PostHistoryTypeId="2" PostId="4229" RevisionGUID="ace218b1-a83e-4e76-a189-560a1145c6e4" CreationDate="2010-10-01T18:09:09.750" UserId="2367" Text="I actually just started prototyping a couple of new web-based games for Facebook a few weeks ago and I have just been innundated with mental blocks and time sucks from re-coding.  I have the skills to code a game but I am slogging through trying to get the design patterns right. &#xD;&#xA;&#xD;&#xA;I would appreciate some advice on how to correctly attack this problem and keep myself on-task.  I am quickly learning how much differently a game engine is from a standard business website!&#xD;&#xA;&#xD;&#xA;Thank you all in advance!" />
  <row Id="8374" PostHistoryTypeId="1" PostId="4229" RevisionGUID="ace218b1-a83e-4e76-a189-560a1145c6e4" CreationDate="2010-10-01T18:09:09.750" UserId="2367" Text="What are the biggest pitfalls to consider when prototyping a new game?" />
  <row Id="8375" PostHistoryTypeId="3" PostId="4229" RevisionGUID="ace218b1-a83e-4e76-a189-560a1145c6e4" CreationDate="2010-10-01T18:09:09.750" UserId="2367" Text="&lt;design-patterns&gt;&lt;prototyping&gt;" />
  <row Id="8376" PostHistoryTypeId="2" PostId="4230" RevisionGUID="68a5d65f-6c59-403f-9335-c8b8498e86b4" CreationDate="2010-10-01T18:12:23.687" UserId="345" Text="I'm not as familiar with the WP7 API as I should be but I've done some Zune XNA programming and you have access to the touchscreen and accelerometer fairly straightforwardly. I can safely assume a port between the two would be relatively painless.&#xD;&#xA;&#xD;&#xA;You get a list of `TouchLocation`s from XInput and you can do what you will with them.  Each touch has an ID that allows you to identify drags/swipes.  &#xD;&#xA;&#xD;&#xA;The Accelerometer just gives you a 3D vector showing the current acceleration (with 0,-1,0 being the norm due to gravity). This [tutorial][1] gives a good example of using the Zune's interface.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.abstrys.com/2010/02/making-the-zune-hd-sparkle-with-xna-game-studio-3-1-part-1/" />
  <row Id="8377" PostHistoryTypeId="5" PostId="4229" RevisionGUID="05bfda0c-beba-4d33-bc13-666744558a39" CreationDate="2010-10-01T18:15:38.003" UserId="2367" Comment="added 501 characters in body" Text="I actually just started prototyping a couple of new web-based games for Facebook a few weeks ago and I have just been innundated with mental blocks and time sucks from re-coding.  I have the skills to code a game but I am slogging through trying to get the design patterns right. &#xD;&#xA;&#xD;&#xA;Normally when building a website I like to 'think in code' and I find it faster for me to just change the code/html to tweak it in.  This is probably because I am VERY comfortable in what I do and I know what to expect as I've done it over and over again.  At this point with game development I find myself starting on paper again (like I used to with websites) and I wonder if this is just my lack of focus and intuition with game logic or a good way to roll my thoughts out in advance of coding.&#xD;&#xA;&#xD;&#xA;I would appreciate some advice on how to correctly attack this problem and keep myself on-task.  I am quickly learning how much differently a game engine is from a standard business website!&#xD;&#xA;&#xD;&#xA;Thank you all in advance!" />
  <row Id="8378" PostHistoryTypeId="2" PostId="4231" RevisionGUID="8dd446be-cc0f-4ceb-be60-770eae30f885" CreationDate="2010-10-01T18:33:09.147" UserId="744" Text="The biggest pitfall when writing games is to worry about whether or not you're using the right design patterns instead of just writing code you feel good about." />
  <row Id="8379" PostHistoryTypeId="16" PostId="4231" RevisionGUID="8dd446be-cc0f-4ceb-be60-770eae30f885" CreationDate="2010-10-01T18:33:16.713" UserId="744" />
  <row Id="8380" PostHistoryTypeId="2" PostId="4232" RevisionGUID="b9b08b06-8352-45e8-a39e-247cd7e8b94e" CreationDate="2010-10-01T18:48:00.253" UserId="2301" Text="adding too many features.  Focus on the core of the game, build it, then if everything works well then add features.  People get too focused on adding cool things, and never getting anything done." />
  <row Id="8381" PostHistoryTypeId="2" PostId="4233" RevisionGUID="56c46e01-918d-428a-adbf-7ae5367276cc" CreationDate="2010-10-01T19:43:12.687" UserId="891" Text="This is a great article about how to prototype a game.  From your question is seems like you're missing the idea of what a prototype is supposed to be.&#xD;&#xA;&#xD;&#xA;**[Prototyping: You’re (Probably) Doing It Wrong][1]**&#xD;&#xA;&#xD;&#xA;Blurb:&#xD;&#xA;&#xD;&#xA;&gt; **Mistake #4: Building a system, not a game**  &#xD;&#xA;When you’re making a prototype, if you ever find yourself working on something that isn’t directly moving your forward, stop right there. As programmers, we have a tendency to try to generalize our code, and make it elegant and be able to handle every situation. We find that an itch terribly hard not scratch, but we need to learn how. It took me many years to realize that it’s not about the code, it’s about the game you ship in the end.&#xD;&#xA;&#xD;&#xA;&gt;Don’t write an elegant game component system, skip the editor completely and hardwire the state in code, avoid the data-driven, self-parsing, XML craziness, and just code the damned thing.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/prototyping-youre-probably-doing-it-wrong" />
  <row Id="8383" PostHistoryTypeId="5" PostId="4229" RevisionGUID="3fff56db-cbc7-4b46-ab72-491044822a9c" CreationDate="2010-10-01T20:17:39.330" UserId="2367" Comment="I re-worded the question a bit because prototyping was probably too specific, minor re-wording of content" Text="I actually just started prototyping a couple of new web-based games for Facebook a few weeks ago and I have just been innundated with mental blocks and time sucks from re-coding.  I have the skills to code a game but I am slogging through trying to get the design patterns right and make the product match what I see in my mind's eye. &#xD;&#xA;&#xD;&#xA;Normally when building a website I like to 'think in code' and I find it faster for me to just change the code/html to tweak it in.  This is probably because I am VERY comfortable in what I do and I know what to expect as I've done it over and over again.  At this point with game development I find myself starting on paper again (like I used to with websites) and I wonder if this is just my lack of focus and intuition with game logic or if this is an appropriate way to roll my thoughts out in advance of coding.&#xD;&#xA;&#xD;&#xA;I would appreciate some advice on how to correctly attack this problem and keep myself on-task.  I am quickly learning how much differently a game engine is from a standard business website!  Every time I do get something in place it just feels mooshy and incomplete and it's becoming darned frustrating.&#xD;&#xA;&#xD;&#xA;Thank you all in advance!" />
  <row Id="8384" PostHistoryTypeId="4" PostId="4229" RevisionGUID="3fff56db-cbc7-4b46-ab72-491044822a9c" CreationDate="2010-10-01T20:17:39.330" UserId="2367" Comment="I re-worded the question a bit because prototyping was probably too specific, minor re-wording of content" Text="What are the biggest pitfalls to consider when developing a new game?" />
  <row Id="8385" PostHistoryTypeId="2" PostId="4234" RevisionGUID="add18978-549e-49d1-a378-c05771b585cb" CreationDate="2010-10-01T20:25:51.043" UserId="320" Text="What are the pros / cons of the three?" />
  <row Id="8386" PostHistoryTypeId="1" PostId="4234" RevisionGUID="add18978-549e-49d1-a378-c05771b585cb" CreationDate="2010-10-01T20:25:51.043" UserId="320" Text="HLSL vs GLSL vs cg" />
  <row Id="8387" PostHistoryTypeId="3" PostId="4234" RevisionGUID="add18978-549e-49d1-a378-c05771b585cb" CreationDate="2010-10-01T20:25:51.043" UserId="320" Text="&lt;shaders&gt;&lt;glsl&gt;&lt;hlsl&gt;&lt;cg&gt;" />
  <row Id="8390" PostHistoryTypeId="2" PostId="4236" RevisionGUID="5cde11c6-7dd3-4cbf-b5bd-d40896c5f7e6" CreationDate="2010-10-01T21:04:27.227" UserId="395" Text="My very basic understanding is that HLSL is only for DirectX and GLSL is only for OpenGL. Cg is basically the same language as HLSL, but can be used with either DirectX or OpenGL (though via different runtime code)." />
  <row Id="8391" PostHistoryTypeId="5" PostId="4233" RevisionGUID="fb70d65a-443e-4f86-93c8-5cd18ad9dc8a" CreationDate="2010-10-01T21:30:15.587" UserId="891" Comment="added 1765 characters in body" Text="This is a great article about how to prototype a game.  From your question is seems like you're missing the idea of what a prototype is supposed to be.&#xD;&#xA;&#xD;&#xA;**[Prototyping: You’re (Probably) Doing It Wrong][1]**&#xD;&#xA;&#xD;&#xA;Blurb:&#xD;&#xA;&#xD;&#xA;&gt; **Mistake #4: Building a system, not a game**  &#xD;&#xA;When you’re making a prototype, if you ever find yourself working on something that isn’t directly moving your forward, stop right there. As programmers, we have a tendency to try to generalize our code, and make it elegant and be able to handle every situation. We find that an itch terribly hard not scratch, but we need to learn how. It took me many years to realize that it’s not about the code, it’s about the game you ship in the end.&#xD;&#xA;&#xD;&#xA;&gt;Don’t write an elegant game component system, skip the editor completely and hardwire the state in code, avoid the data-driven, self-parsing, XML craziness, and just code the damned thing.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I'm adding this just to clarify the difference between Prototype and Tracer Code.&#xD;&#xA;&#xD;&#xA;**Always remember: A Prototype is designed to be thrown away! Tracer Code is not.**&#xD;&#xA;&#xD;&#xA;**[The Prototype Pitfall][2]**&#xD;&#xA;&#xD;&#xA;&gt; ...The tracer code approach addresses a different problem. You need to know how the application as a whole hangs together. You want to show your users how the interactions will work in practice, and you want to give your developers an architectural skeleton on which to hang code. In this case, you might construct a tracer consisting of a trivial implementation of the container packing algorithm (maybe something like first-come, first-served) and a simple but working user interface. Once you have all the components in the application plumbed together, you have a framework to show your users and your developers. Over time, you add to this framework with new functionality, completing stubbed routines. But the framework stays intact, and you know the system will continue to behave the way it did when your first tracer code was completed.&#xD;&#xA;&#xD;&#xA;&gt;The distinction is important enough to warrant repeating. Prototyping generates disposable code. Tracer code is lean but complete, and forms part of the skeleton of the final system. Think of prototyping as the reconnaissance and intelligence gathering that takes place before a single tracer bullet is fired.&#xD;&#xA;&#xD;&#xA;More Information about the Tracer Code design, from [**The Pragmatic Programmer**][3]&#xD;&#xA;&#xD;&#xA;**[Tracer Bullets and Prototypes][4]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/prototyping-youre-probably-doing-it-wrong&#xD;&#xA;  [2]: http://www.codinghorror.com/blog/2005/04/the-prototype-pitfall.html&#xD;&#xA;  [3]: http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X/ref=sr_1_1?ie=UTF8&amp;qid=1285968579&amp;sr=8-1&#xD;&#xA;  [4]: http://www.artima.com/intv/tracerP.html" />
  <row Id="8392" PostHistoryTypeId="2" PostId="4237" RevisionGUID="b5798953-a37b-4f44-81e4-23d54ad37ad5" CreationDate="2010-10-01T22:39:39.960" UserId="1232" Text="Pitfalls: Not Separating your logic from your data. Not testing that your data produces the desired results.&#xD;&#xA;&#xD;&#xA;From your comment on Joe's post:&#xD;&#xA;&#xD;&#xA;&gt; You want me to code a battle engine for monster encounters, BOOM! I have re-written my engine at least three times this week and I never feel good about it. I mean, the math works, but when I try it out it just feels wonky. Does that make sense?&#xD;&#xA;&#xD;&#xA;It sounds like you're conflating engine with data here. Your monster encounter engine should be driven by data. If the data that affects your game balance/fun is wrong, there should be no need to completely rewrite your engine - just tweak your balance variables until it feels right.&#xD;&#xA;&#xD;&#xA;However, because balance variables are sometimes interdependent, changing one variable to better one scenario can have a vast (negative) effect on other scenarios.&#xD;&#xA;&#xD;&#xA;In order to test that your newly tweaked data doesn't muck up a whole bunch of other cases, it's useful to keep a few test cases around and make sure they aren't broken after tweaking. Here's an admitedly contrived example of how you would test this.&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;TestResult TestPlayerKillsMonsterDuringAttack(PlayerStats, MonsterStats, seed)&#xD;&#xA;{&#xD;&#xA;   Player player(PlayerStats);&#xD;&#xA;   Monster monster(MonsterStats);&#xD;&#xA;   &#xD;&#xA;   EncounterEngine.SeedRNG(seed);   &#xD;&#xA;   while(1)&#xD;&#xA;   {&#xD;&#xA;     result = EncounterEngine.Attack(player, monster);&#xD;&#xA;     if (result == PLAYER_DEAD)&#xD;&#xA;       return TEST_FAIL;&#xD;&#xA;     if (result == MONSTER_DEAD)&#xD;&#xA;       return TEST_PASS;&#xD;&#xA;     // result == MONSTER_DAMAGED, PLAYER_DAMAGED is expected. &#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Eg. If you call this with PlayerStats.Level == 5 and MonsterStats.Level == 3, you'd expect the player to always defeat this monster eventually.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8393" PostHistoryTypeId="2" PostId="4238" RevisionGUID="10bb6a77-4e35-4a4e-bbe9-7ba8fb633f5b" CreationDate="2010-10-01T22:41:02.440" UserId="1677" Text="I would recommend [Steve Pavlina][1]'s articles about time management and self-motivation:&#xD;&#xA;http://stevepavlina.narod.ru/&#xD;&#xA;&#xD;&#xA;He is programmer, too. His lifestyle experiments have generated some mainstream media interest.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Steve_Pavlina" />
  <row Id="8394" PostHistoryTypeId="2" PostId="4239" RevisionGUID="ea3723c5-b7a4-40ed-b774-5759bd871ab8" CreationDate="2010-10-01T23:00:54.960" UserId="1582" Text="I am making multiplayer (2 players) Minesweeper like the one that's available on MS Live Messenger.&#xD;&#xA;&#xD;&#xA;Client side is going to be silverlight, server side will be MVC Application. Client (the one who is waiting for his turn) will poll server every X seconds to get current state, the other client (who's turn it is will post his click to server and than roles will reverse)&#xD;&#xA;&#xD;&#xA;Now my question is: should domain model classes be the same for client and server side?&#xD;&#xA;I mean you need Minefield class on both sides, but while server-side class will have rules and logic, client-side will be more or less a data holder.&#xD;&#xA;" />
  <row Id="8395" PostHistoryTypeId="1" PostId="4239" RevisionGUID="ea3723c5-b7a4-40ed-b774-5759bd871ab8" CreationDate="2010-10-01T23:00:54.960" UserId="1582" Text="client/server Silverlight turn based game - domain model question" />
  <row Id="8396" PostHistoryTypeId="3" PostId="4239" RevisionGUID="ea3723c5-b7a4-40ed-b774-5759bd871ab8" CreationDate="2010-10-01T23:00:54.960" UserId="1582" Text="&lt;best-practices&gt;&lt;multiplayer&gt;&lt;client-server&gt;&lt;silverlight&gt;" />
  <row Id="8397" PostHistoryTypeId="5" PostId="4229" RevisionGUID="05857d29-cf6b-4f55-966d-d983f0fed0bb" CreationDate="2010-10-02T00:49:45.757" UserId="2367" Comment="Wanting to clarify my problems a bit." Text="I actually just started tracing (thanks David Young for the nomenclature correction) a couple of new web-based games for Facebook a few weeks ago and I have just been inundated with mental blocks and time sucks from re-coding.  I have the skills to code a game but I am slogging through trying to get the design patterns right and make the product match what I see in my mind's eye. &#xD;&#xA;&#xD;&#xA;Normally when building a website I like to 'think in code' and I find it faster for me to just change the code/HTML to tweak it in.  This is probably because I am VERY comfortable in what I do and I know what to expect as I've done it over and over again.  At this point with game development I find myself starting on paper again (like I used to with websites) and I wonder if this is just my lack of focus and intuition with game logic or if this is an appropriate way to roll my thoughts out in advance of coding.&#xD;&#xA;&#xD;&#xA;I would appreciate some advice on how to correctly attack this problem and keep myself on-task.  I am quickly learning how much differently a game engine is from a standard business website!  Every time I do get something in place it just feels mooshy and incomplete and it's becoming darned frustrating.&#xD;&#xA;&#xD;&#xA;**Extended**&#xD;&#xA;&#xD;&#xA;As an example, the battle engine that has been giving me so much issue recently takes a simple attack skill and then makes a random roll between -50% and +50% and then multiplies the original attack skill against that percent.  The same thing is done with defense and then I mesh those to determine if any damage is done against the enemy health.  I guess I should realize I am in over my head when I started asking myself if that is even the right way to do it, or if there even IS a 'right' way.  One major fault I found with this is two characters around the same level can have several 'rolls' where the attack is -50% and the defense is +50% so I end up with some EXTREMELY long battle sequences where nobody does anything.  FAIL&#xD;&#xA;&#xD;&#xA;Maybe my post should have been asking for suggested links describing simple game logic.&#xD;&#xA;&#xD;&#xA;**End Extension**&#xD;&#xA;&#xD;&#xA;Thank you all in advance!" />
  <row Id="8398" PostHistoryTypeId="2" PostId="4240" RevisionGUID="773f25e7-f042-4b84-b50d-18e7545cda05" CreationDate="2010-10-02T01:02:51.740" UserId="1677" Text="Jeff Plummer &quot;A Flexible and Expandable Architecture for Electronic Games&quot;:&#xD;&#xA;&#xD;&#xA;http://members.cox.net/jplummer/Writings/Writings.htm&#xD;&#xA;&#xD;&#xA;Nice overview and comparisson of different Game architectures." />
  <row Id="8399" PostHistoryTypeId="5" PostId="4229" RevisionGUID="bb06fc8e-8c37-48ed-ae4c-daca05d2aac4" CreationDate="2010-10-02T02:30:45.663" UserId="2367" Comment="added 79 characters in body" Text="I actually just started tracing (thanks David Young for the nomenclature correction) a couple of new web-based games for Facebook a few weeks ago and I have just been inundated with mental blocks and time sucks from re-coding.  I am working on something similar to the turn based (Vampire Wars) style RPG.  I have the skills to code a game but I am slogging through trying to get the design patterns right and make the product match what I see in my mind's eye. &#xD;&#xA;&#xD;&#xA;Normally when building a website I like to 'think in code' and I find it faster for me to just change the code/HTML to tweak it in.  This is probably because I am VERY comfortable in what I do and I know what to expect as I've done it over and over again.  At this point with game development I find myself starting on paper again (like I used to with websites) and I wonder if this is just my lack of focus and intuition with game logic or if this is an appropriate way to roll my thoughts out in advance of coding.&#xD;&#xA;&#xD;&#xA;I would appreciate some advice on how to correctly attack this problem and keep myself on-task.  I am quickly learning how much differently a game engine is from a standard business website!  Every time I do get something in place it just feels mooshy and incomplete and it's becoming darned frustrating.&#xD;&#xA;&#xD;&#xA;**Extended**&#xD;&#xA;&#xD;&#xA;As an example, the battle engine that has been giving me so much issue recently takes a simple attack skill and then makes a random roll between -50% and +50% and then multiplies the original attack skill against that percent.  The same thing is done with defense and then I mesh those to determine if any damage is done against the enemy health.  I guess I should realize I am in over my head when I started asking myself if that is even the right way to do it, or if there even IS a 'right' way.  One major fault I found with this is two characters around the same level can have several 'rolls' where the attack is -50% and the defense is +50% so I end up with some EXTREMELY long battle sequences where nobody does anything.  FAIL&#xD;&#xA;&#xD;&#xA;Maybe my post should have been asking for suggested links describing simple game logic.&#xD;&#xA;&#xD;&#xA;**End Extension**&#xD;&#xA;&#xD;&#xA;Thank you all in advance!" />
  <row Id="8400" PostHistoryTypeId="2" PostId="4241" RevisionGUID="f3218e6c-82a9-4cc4-8c71-6dee2a3d7ac7" CreationDate="2010-10-02T12:07:04.090" UserId="2258" Text="My son (15) has decided that he wants to pursue a career as a games programmer. I've said that he should get started now with a simple game. He has no programming experience yet, but I am a programmer (business apps, not games) so I can teach him programming, but what would be a good platform for him to start on? Initially I'm looking for something that can provide quick results, to keep his enthusiasm up.&#xD;&#xA;&#xD;&#xA;What would you suggest?" />
  <row Id="8401" PostHistoryTypeId="1" PostId="4241" RevisionGUID="f3218e6c-82a9-4cc4-8c71-6dee2a3d7ac7" CreationDate="2010-10-02T12:07:04.090" UserId="2258" Text="Good starting platform for a teenage games programmer" />
  <row Id="8402" PostHistoryTypeId="3" PostId="4241" RevisionGUID="f3218e6c-82a9-4cc4-8c71-6dee2a3d7ac7" CreationDate="2010-10-02T12:07:04.090" UserId="2258" Text="&lt;platform&gt;" />
  <row Id="8403" PostHistoryTypeId="2" PostId="4242" RevisionGUID="3dce30de-1562-41a9-88c8-1c5bb819d9e4" CreationDate="2010-10-02T12:21:50.390" UserId="1687" Text="[XNA][1] is a good solution for a fairly confident programmer. It would be a good goal to aim for in the future.&#xD;&#xA;&#xD;&#xA;The [Unreal Development Kit][2] is a way to get results far more quickly and easily, and might be a good place to start&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/&#xD;&#xA;  [2]: http://www.udk.com/" />
  <row Id="8404" PostHistoryTypeId="2" PostId="4243" RevisionGUID="1fd7c534-bc69-4042-b032-d06fde9e0c36" CreationDate="2010-10-02T12:47:20.530" UserId="1367" Text="As Martin mentioned, the UDK is probably the fastest way to get something working as it comes with so many premade things like AI, models and also a wealth of books. It has a very good map editor, and the language is Java-esque (and ECMA-script like).&#xD;&#xA;&#xD;&#xA;An alternative might be to try doing games in Flash or Silverlight - start off with simple 2D games. Whatever genre of games he/she likes dictates the toolkit." />
  <row Id="8405" PostHistoryTypeId="2" PostId="4244" RevisionGUID="2e6110fe-1b24-41f3-8684-f149883c9feb" CreationDate="2010-10-02T15:50:42.623" UserId="1134" Text="I know this will date me somewhat, but growing up I really enjoyed [P-Robots][1].  There's a really simple goal (beat the other robots), a simple API, and a short amount of time between changes to code and seeing the results.  It segues into AI, design patterns, and even larger-scale code structure (some of these robots can get pretty big -- and what about sharing code between robots?).  If you can find something similar but newer (maybe [Mindstorms][2]?) it would be a good way to get the &quot;getting started programming&quot; part.&#xD;&#xA;&#xD;&#xA;Once that's done, consider going for a really simple 2D scrolling shooter, platformer, or similar &quot;arcade-style&quot; game -- you can use SDL or XNA or whatever's most familiar.  Even getting a pong clone up and running in these is not *entirely* trivial.  This gives you a small echo of what it's like to build something &quot;ground up&quot;.&#xD;&#xA;&#xD;&#xA;After this, explore: a mod to an existing 3d game (a new object, or a bot, or something) to give a little insight into larger engines.&#xD;&#xA;&#xD;&#xA;The keys, from what I've seen, seem to be:&#xD;&#xA;&#xD;&#xA;* rapid iteration: the ability to see results quickly&#xD;&#xA;* prototypes: many small experiments to get breadth of experience and confidence (okay, how would we do a marble game?  how about space invaders?  etc)&#xD;&#xA;* exploration: learning to love looking into how other peoples' games are built, tweaking them, etc&#xD;&#xA;&#xD;&#xA;  [1]: http://corewar.co.uk/probots/&#xD;&#xA;  [2]: http://mindstorms.lego.com/en-us/Default.aspx" />
  <row Id="8406" PostHistoryTypeId="2" PostId="4245" RevisionGUID="696d8f6f-953c-428d-a972-f149433a6d69" CreationDate="2010-10-02T16:55:39.527" UserId="2037" Text="If he just wants to make games then he should use XNA, Unreal, Unity etc. If he wants to be a games programmer then he should learn C/C++ and OpenGL/SDL or D3D first. &#xD;&#xA;&#xD;&#xA;XNA, Unreal, Unity etc are great for making games but really bad at doing far too much for you. I'm sure people will disagree with me on this, but these basically turn you into a lazy programmer and when the time comes to learn things like points in C++ it'll be more difficult because you went with the easier options first. &#xD;&#xA;&#xD;&#xA;Peronally I never suggest anthing other C/C++ as the first language to learn if you want to be a games programmer. The main reason is that even if you go and learn C#/XNA , if you're seriously about becoming a games developer you will have to know C or C++ at some stage because no one will hire you otherwise. So if they're serious about the profession then you're only delaying learning what's expected from you." />
  <row Id="8407" PostHistoryTypeId="2" PostId="4246" RevisionGUID="0a696c8f-873e-48c7-9885-8affbb526203" CreationDate="2010-10-02T18:05:06.793" UserId="2382" Text="Mindstorms Roboter are really cool. We got some NXT's in school, and last week we started with programming things like follow a line, and that stuff. You can get easily results.&#xD;&#xA;&#xD;&#xA;Also i found www.3dgamestudio.de a while ago. I didn't got more into it, but it was really interesting. You can programm with lite-C which is:&#xD;&#xA;&#xD;&#xA;&gt; Lite-C is a programming language for multimedia applications and computer games, using a syntax subset of the C programming language with some elements of the C++ programming language&#xD;&#xA;&#xD;&#xA;At the http://tutorial.3dgamestudio.net/ you get into it. And there are also a level, model and terrain Editor.&#xD;&#xA;&#xD;&#xA;ps: I am 16 and started with a friend programming a website and customizing a programmed game server. So this could also be interesting for him.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.3dgamestudio.de/" />
  <row Id="8408" PostHistoryTypeId="2" PostId="4247" RevisionGUID="5022c2f5-e6b9-4fd3-89fe-76ac5f12ffdd" CreationDate="2010-10-02T18:50:43.327" UserId="370" Text="I'm defining a custom/simple file format for loading textures in my game.  I narrowed my choice of file formats to two options:&#xD;&#xA;&#xD;&#xA; * [Lua][1]&#xD;&#xA; * [protobuf][2]&#xD;&#xA;&#xD;&#xA;I chose Lua, because my game is already using Lua, I wouldn't need to add protobufs to the build.  Eventually, I'll use the engine to build a network game, at which point I'll add protobufs it's just that I don't need it yet and have other pressing needs in the engine.&#xD;&#xA;&#xD;&#xA;However, I'm kinda stuck.  Most (all?) of my support tools I write in python.  I can't find a small clean Lua module for python.  That means my python tools end up parsing the Lua syntax by hand.  It's not too onerous as file format uses a very small subset of Lua, but still annoying.&#xD;&#xA;&#xD;&#xA;So now I'm second guessing myself, *Should I have picked protobuf instead?*.  &#xD;&#xA;  Then I promptly third guessed myself, *Am I just afflicted with wanderlust and should stick with a solution that already kinda works?*.&#xD;&#xA;&#xD;&#xA;So which would/have you pick?  &#xD;&#xA;And more importantly why?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org&#xD;&#xA;  [2]: http://code.google.com/p/protobuf/" />
  <row Id="8409" PostHistoryTypeId="1" PostId="4247" RevisionGUID="5022c2f5-e6b9-4fd3-89fe-76ac5f12ffdd" CreationDate="2010-10-02T18:50:43.327" UserId="370" Text="Protobuf vs Lua for custom file format" />
  <row Id="8410" PostHistoryTypeId="3" PostId="4247" RevisionGUID="5022c2f5-e6b9-4fd3-89fe-76ac5f12ffdd" CreationDate="2010-10-02T18:50:43.327" UserId="370" Text="&lt;lua&gt;" />
  <row Id="8411" PostHistoryTypeId="2" PostId="4248" RevisionGUID="9975ada3-c9ab-409c-922d-56810cd650a0" CreationDate="2010-10-02T19:07:12.420" UserId="370" Text="I use C++ as my language as choice.  However, I generally use Python to write helper utilities and tools.&#xD;&#xA;&#xD;&#xA;My worry is that as my game engine continues to grow it's getting tedious to reimplement some of its features in Python.&#xD;&#xA;&#xD;&#xA;There has got to be a better way.&#xD;&#xA;&#xD;&#xA;Here are the options as I seem them&#xD;&#xA;&#xD;&#xA;* Keep on keeping on.  &#xD;&#xA;That is often the answer in a cooperate environment.  Maybe it has some merit.&#xD;&#xA;* Build bindings for Python (yuck) and have it use pieces of the engine directly.&#xD;&#xA;* Start building the tools using C++ instead.  &#xD;&#xA;I already use [QT][1] in the Python tools to provide a GUI when needed.  It doesn't seem like it'd be that much harder to use [QT in C++][2] instead.  However I'm worried my tool productivity will go down.  I generally strive to apply much less rigidity in tool code than I would in shipping code.&#xD;&#xA;&#xD;&#xA;So what is common practice?  &#xD;&#xA;What language should I use for tools?  &#xD;&#xA;How do I get that language to interact with the engine?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riverbankcomputing.co.uk/software/pyqt/intro&#xD;&#xA;  [2]: http://qt.nokia.com/" />
  <row Id="8412" PostHistoryTypeId="1" PostId="4248" RevisionGUID="9975ada3-c9ab-409c-922d-56810cd650a0" CreationDate="2010-10-02T19:07:12.420" UserId="370" Text="Which programming language to use for tools?" />
  <row Id="8413" PostHistoryTypeId="3" PostId="4248" RevisionGUID="9975ada3-c9ab-409c-922d-56810cd650a0" CreationDate="2010-10-02T19:07:12.420" UserId="370" Text="&lt;tools&gt;&lt;language-choice&gt;" />
  <row Id="8414" PostHistoryTypeId="5" PostId="4247" RevisionGUID="e88aec8a-0e28-436e-b28d-4f2c1e8c0e10" CreationDate="2010-10-02T19:25:37.957" UserId="370" Comment="added 493 characters in body" Text="I'm defining a custom/simple file format for loading textures in my game.  I narrowed my choice of file formats to two options:&#xD;&#xA;&#xD;&#xA; * [Lua][1]&#xD;&#xA; * [protobuf][2]&#xD;&#xA;&#xD;&#xA;I chose Lua, because my game is already using Lua, I wouldn't need to add protobufs to the build.  Eventually, I'll use the engine to build a network game, at which point I'll add protobufs it's just that I don't need it yet and have other pressing needs in the engine.&#xD;&#xA;&#xD;&#xA;However, I'm kinda stuck.  Most (all?) of my support tools I write in python.  I can't find a small clean Lua module for python.  That means my python tools end up parsing the Lua syntax by hand.  It's not too onerous as file format uses a very small subset of Lua, but still annoying.&#xD;&#xA;&#xD;&#xA;So now I'm second guessing myself, *Should I have picked protobuf instead?*.  &#xD;&#xA;  Then I promptly third guessed myself, *Am I just afflicted with wanderlust and should stick with a solution that already kinda works?*.&#xD;&#xA;&#xD;&#xA;So which would pick (or already did)?  &#xD;&#xA;And more importantly why?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Examples  &#xD;&#xA;###Lua&#xD;&#xA;&#xD;&#xA;    texture&#xD;&#xA;    {&#xD;&#xA;       width=256;&#xD;&#xA;       height=128;&#xD;&#xA;       format=GL_RGB;&#xD;&#xA;       pixels= [=[&#xD;&#xA;    &lt;binary-data-here&gt;]=];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;###protobuf&#xD;&#xA;&#xD;&#xA;    message Texture {&#xD;&#xA;       required uint32 width = 1;&#xD;&#xA;       required uint32 height = 2;&#xD;&#xA;       enum Format {&#xD;&#xA;          GL_RGB = 0;&#xD;&#xA;          GL_RGBA = 1;&#xD;&#xA;          ...&#xD;&#xA;          GL_LUMINANCE_ALPHA = N;&#xD;&#xA;       };&#xD;&#xA;       required Format format = 3;&#xD;&#xA;       required bytes pixels = 4;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org&#xD;&#xA;  [2]: http://code.google.com/p/protobuf/" />
  <row Id="8415" PostHistoryTypeId="5" PostId="4247" RevisionGUID="e26b626a-1141-4f2c-b97f-09a3cc45ebac" CreationDate="2010-10-02T19:47:04.070" UserId="370" Comment="added 721 characters in body" Text="I'm defining a custom/simple file format for loading textures in my game.  I narrowed my choice of file formats to two options:&#xD;&#xA;&#xD;&#xA; * [Lua][1]&#xD;&#xA; * [protobuf][2]&#xD;&#xA;&#xD;&#xA;I chose Lua, because my game is already using Lua, I wouldn't need to add protobufs to the build.  Eventually, I'll use the engine to build a network game, at which point I'll add protobufs it's just that I don't need it yet and have other pressing needs in the engine.&#xD;&#xA;&#xD;&#xA;However, I'm kinda stuck.  Most (all?) of my support tools I write in python.  I can't find a small clean Lua module for python.  That means my python tools end up parsing the Lua syntax by hand.  It's not too onerous as file format uses a very small subset of Lua, but still annoying.&#xD;&#xA;&#xD;&#xA;So now I'm second guessing myself, *Should I have picked protobuf instead?*.  &#xD;&#xA;  Then I promptly third guessed myself, *Am I just afflicted with wanderlust and should stick with a solution that already kinda works?*.&#xD;&#xA;&#xD;&#xA;So which would pick (or already did)?  &#xD;&#xA;And more importantly why?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;My thoughts. &#xD;&#xA;###Lua&#xD;&#xA;&#xD;&#xA;    texture&#xD;&#xA;    {&#xD;&#xA;       width=8;  --#256&#xD;&#xA;       height=7; --#128&#xD;&#xA;       format=GL_RGB;&#xD;&#xA;       pixels= [=[&#xD;&#xA;    &lt;binary-data-here&gt;]=];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; * **+** &quot;plain&quot; text format  &#xD;&#xA;Technically only the meta data is plain text but base64 encoding just for the sake of plain text is silly.&#xD;&#xA; * **+** parsing is trivial as the engine already supports Lua.&#xD;&#xA; * **-/+** easy (not trivial) to generate, and can be easily verified with luac.&#xD;&#xA; * **-** python tools have difficulty parsing&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;###protobuf&#xD;&#xA;&#xD;&#xA;    message Texture {&#xD;&#xA;       required uint32 width = 1;&#xD;&#xA;       required uint32 height = 2;&#xD;&#xA;       enum Format {&#xD;&#xA;          GL_RGB = 0;&#xD;&#xA;          GL_RGBA = 1;&#xD;&#xA;          ...&#xD;&#xA;          GL_LUMINANCE_ALPHA = N;&#xD;&#xA;       };&#xD;&#xA;       required Format format = 3;&#xD;&#xA;       required bytes pixels = 4;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; * **+** protobufs are well tested and optimized&#xD;&#xA; * **+** they will be needed eventually to do network communication&#xD;&#xA; * **-** networking isn't part of the engine yet (and wont be for some time, the next few games don't need it).&#xD;&#xA; * **+** trivial to parse&#xD;&#xA; * **+** trivial to generate&#xD;&#xA; * **-** complex binary format, impossible to edit, or verify by inspection.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org&#xD;&#xA;  [2]: http://code.google.com/p/protobuf/" />
  <row Id="8416" PostHistoryTypeId="2" PostId="4249" RevisionGUID="92387c45-e68b-4dbe-b5ba-e8516fda32db" CreationDate="2010-10-02T20:37:58.020" UserId="744" Text="I would pick protobufs. The temptation to do clever things with Lua would be too strong. First I would cave and write basic arithmetic because I can just eval it in Python. Next I would let myself use intermediate variables because they're easy to parse out. Eventually I'd need Lua-in-Python for any tools I wrote in Python, and then I'd want to go back in time and stop myself.&#xD;&#xA;&#xD;&#xA;Protobufs also support schemas, which can provide _structural and semantic_ validation; luac will only provide _syntactic_ validation.&#xD;&#xA;&#xD;&#xA;**However...**&#xD;&#xA;&#xD;&#xA;Protobufs are _not_ needed for network communication, so don't choose them for that reason. You can gzip Lua and send that just as easily, if you have the code written to serialize/deserialize Lua objects.&#xD;&#xA;&#xD;&#xA;(If I was doing this from scratch, I would pick neither, and use YAML. The protobuf syntax, especially the manual field numbering, annoys the crap out of me.)" />
  <row Id="8417" PostHistoryTypeId="2" PostId="4250" RevisionGUID="996e80f5-1a14-4df9-aea3-2268a5cdaff2" CreationDate="2010-10-02T20:50:05.400" UserId="744" Text="What do the tools do? Presumably, you mean tools for generating and editing data files which your engine can load, and not e.g. your profiler and debugger.&#xD;&#xA;&#xD;&#xA;You're working on a data-driven engine. You can apply the same philosophy to your tools - _write data-driven tools_.&#xD;&#xA;&#xD;&#xA;For example, let's say you are using protobufs. The protobuf libraries for C++ and Python will let you save structures in one and load in the other, no problem. But why not go a step further, and generate the tool UI from the protobuf schema as well? It won't be a great UI, but UIs for most game data are just string key / typed value pairs, and that's trivial to generate using Python and the UI library of your choice. And if it's a _really_ bad UI, at most you committed yourself to the work you're doing now anyway, by writing a custom one from scratch.&#xD;&#xA;&#xD;&#xA;At my last job, we used this style as a first-pass on (almost) every editor. Some of them stayed that way forever; a giant sheet of key/value pairs is a pretty good way to edit inventory item data, for example. For editors that needed more structure, such as the editor that assembled character models from parts, we had a custom top-level layout, with sub-panes generated this way (e.g. we placed the &quot;Tattoos&quot; pane by hand relative to the &quot;Bone Scaling&quot; pane, but their contents was dynamically generated from the structure schema)." />
  <row Id="8418" PostHistoryTypeId="16" PostId="4250" RevisionGUID="996e80f5-1a14-4df9-aea3-2268a5cdaff2" CreationDate="2010-10-02T20:50:05.400" UserId="744" />
  <row Id="8419" PostHistoryTypeId="5" PostId="4244" RevisionGUID="b94b67f1-4085-4b41-8537-1295070d1f6d" CreationDate="2010-10-02T20:58:59.820" UserId="1134" Comment="added 123 characters in body" Text="I know this will date me somewhat, but growing up I really enjoyed [P-Robots][1].  There's a really simple goal (beat the other robots), a simple API, and a short amount of time between changes to code and seeing the results.  It segues into AI, design patterns, and even larger-scale code structure (some of these robots can get pretty big -- and what about sharing code between robots?).  If you can find something similar but newer it would be a good way to get the &quot;getting started programming&quot; part.  Suggestions:&#xD;&#xA;&#xD;&#xA;* [Lego Mindstorms][2]&#xD;&#xA;* [Robocode][3] (suggested by Callum Rogers in a comment below)&#xD;&#xA;&#xD;&#xA;Once that's done, consider going for a really simple 2D scrolling shooter, platformer, or similar &quot;arcade-style&quot; game -- you can use SDL or XNA or whatever's most familiar.  Even getting a pong clone up and running in these is not *entirely* trivial.  This gives you a small echo of what it's like to build something &quot;ground up&quot;.&#xD;&#xA;&#xD;&#xA;After this, explore: a mod to an existing 3d game (a new object, or a bot, or something) to give a little insight into larger engines.&#xD;&#xA;&#xD;&#xA;The keys, from what I've seen, seem to be:&#xD;&#xA;&#xD;&#xA;* rapid iteration: the ability to see results quickly&#xD;&#xA;* prototypes: many small experiments to get breadth of experience and confidence (okay, how would we do a marble game?  how about space invaders?  etc)&#xD;&#xA;* exploration: learning to love looking into how other peoples' games are built, tweaking them, etc&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://corewar.co.uk/probots/&#xD;&#xA;  [2]: http://mindstorms.lego.com/en-us/Default.aspx&#xD;&#xA;  [3]: http://robocode.sourceforge.net/" />
  <row Id="8420" PostHistoryTypeId="2" PostId="4251" RevisionGUID="eabde8a6-954e-44f7-b3d8-60255f8f8776" CreationDate="2010-10-02T21:03:51.343" UserId="1248" Text="You might want to look into the RTSS (Run Time Shader System) that comes with Ogre as well. It is fairly new, but you basically write shaders in code rather than external files. I have not implemented it yet, but definitely plan to use this when the time comes.&#xD;&#xA;&#xD;&#xA;Here is a huge series of tutorials on the Ogre wiki as well for writing shaders.&#xD;&#xA;http://www.ogre3d.org/tikiwiki/JaJDoo+Shader+Guide&amp;structure=Sandbox+Structure&#xD;&#xA;&#xD;&#xA;As for your original question, like Praetor said, its not really a matter of pros/cons, it is a matter of what rendering system you want are going to use. Since using DX/OpenGL with Ogre is just a matter of loading the plugin, you will most likely want to use .cg format." />
  <row Id="8421" PostHistoryTypeId="16" PostId="4248" RevisionGUID="e8cea4c3-71c8-4711-9964-c788ee4550ef" CreationDate="2010-10-02T21:15:33.863" UserId="370" />
  <row Id="8422" PostHistoryTypeId="2" PostId="4252" RevisionGUID="2064f285-722c-49a0-badd-a6a0c167d99e" CreationDate="2010-10-02T21:16:02.747" UserId="2037" Text="I make all my tools using the Qf Framework, that way they're fairly easily cross platform. There's also loads of well maintained bindings for Qt, including Python Qt bindings." />
  <row Id="8423" PostHistoryTypeId="16" PostId="4252" RevisionGUID="2064f285-722c-49a0-badd-a6a0c167d99e" CreationDate="2010-10-02T21:16:02.747" UserId="-1" />
  <row Id="8424" PostHistoryTypeId="5" PostId="4242" RevisionGUID="ba386f18-a8d4-4e18-8693-4c9d8a3e24cf" CreationDate="2010-10-02T21:19:11.933" UserId="1687" Comment="added 179 characters in body; added 39 characters in body" Text="[XNA][1] is a good solution for a fairly confident programmer. It would be a good goal to aim for in the future.&#xD;&#xA;&#xD;&#xA;The [Unreal Development Kit][2] is a way to get results far more quickly and easily, and might be a good place to start&#xD;&#xA;&#xD;&#xA;[Unity][3] is an alternative, it will run on phones which is something UDK can't do (as far as I know). So if he's into programming games for phones, perhaps unity would be better?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com/en-US/&#xD;&#xA;  [2]: http://www.udk.com/&#xD;&#xA;  [3]: http://unity3d.com/unity/" />
  <row Id="8425" PostHistoryTypeId="2" PostId="4253" RevisionGUID="7636b686-25f9-468d-b8b4-827b636ee609" CreationDate="2010-10-02T22:36:54.523" UserDisplayName="Sergio" Text="I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a breakout clone. &#xD;&#xA;&#xD;&#xA;Keep in mind that I have **no** knowledge on game programming or even what maths I should apply to where, that's why I'm asking this question.&#xD;&#xA;&#xD;&#xA;With regards to this question; how can I determine where the ball should bounce when it hits the bottom bar?&#xD;&#xA;&#xD;&#xA;I'd imagine it would be something like:&#xD;&#xA;&#xD;&#xA;1. Capture speed and angle from incoming ball.&#xD;&#xA;2. Detect where it touched the bar (far left, far right, center) and according to that give it a higher speed if it touched the outer areas.&#xD;&#xA;3. This is where I'm stuck. Hehe.&#xD;&#xA;&#xD;&#xA;Any insights? I realize this is not a straightforward answer type question, but I'm sure it's one everyone faces at some point.&#xD;&#xA;&#xD;&#xA;I'm reading the book Linear Algebra that was recommended on this website, but I still have no idea if I should apply it here.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help." />
  <row Id="8426" PostHistoryTypeId="1" PostId="4253" RevisionGUID="7636b686-25f9-468d-b8b4-827b636ee609" CreationDate="2010-10-02T22:36:54.523" UserDisplayName="Sergio" Text="How do you calculate where a ball should go when it bounces off the bar?" />
  <row Id="8427" PostHistoryTypeId="3" PostId="4253" RevisionGUID="7636b686-25f9-468d-b8b4-827b636ee609" CreationDate="2010-10-02T22:36:54.523" UserDisplayName="Sergio" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="8428" PostHistoryTypeId="2" PostId="4254" RevisionGUID="17b16a15-be0b-4e29-b840-d28348f01b4f" CreationDate="2010-10-02T22:42:29.420" UserId="744" Text="The paddle in Breakout, when it follows the style you're describing is usually modelled as a curved surface. The angle of incidence changes based on where on the paddle it hits. On the dead center the tangent line to the curve is absolutely horizontal, and the ball reflects as expected. As you move off the center, the tangent to the curve becomes increasingly angled, and the ball reflects differently as a result.&#xD;&#xA;&#xD;&#xA;The key point is that the angle of reflection, not the ball speed, is what changes. The ball speed generally just increases slowly over time." />
  <row Id="8429" PostHistoryTypeId="5" PostId="4253" RevisionGUID="48c4f8df-ce62-410d-9d10-dbaed74f2744" CreationDate="2010-10-02T22:51:18.727" UserDisplayName="Sergio" Comment="added 159 characters in body; added 2 characters in body" Text="I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a breakout clone. &#xD;&#xA;&#xD;&#xA;Keep in mind that I have **no** knowledge on game programming or even what maths I should apply to where, that's why I'm asking this question.&#xD;&#xA;&#xD;&#xA;With regards to this question; how can I determine where the ball should bounce when it hits the bottom bar?&#xD;&#xA;&#xD;&#xA;I'd imagine it would be something like:&#xD;&#xA;&#xD;&#xA;1. Capture speed and angle from incoming ball.&#xD;&#xA;2. Detect where it touched the bar (far left, far right, center) and according to that give it a higher speed if it touched the outer areas.&#xD;&#xA;3. This is where I'm stuck. Hehe.&#xD;&#xA;&#xD;&#xA;Any insights? I realize this is not a straightforward answer type question, but I'm sure it's one everyone faces at some point.&#xD;&#xA;&#xD;&#xA;I'm reading the book Linear Algebra that was recommended on this website, but I still have no idea if I should apply it here.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I'd possibly like some code on what a vector would look like or how I could save the variable of the vector the balls has (speed and direction)." />
  <row Id="8430" PostHistoryTypeId="2" PostId="4255" RevisionGUID="c275c1e0-d3b9-4c81-8aa6-0f04141dec7b" CreationDate="2010-10-02T22:52:11.567" UserId="189" Text="Here's the relevant logic I used on the pong on [my homepage][1]: (please go play it before reading, so that you know the effect I'm achieving with the following code)&#xD;&#xA;&#xD;&#xA;    var relativeIntersectY = (paddle1Y+(PADDLEHEIGHT/2)) - intersectY;&#xD;&#xA;&#xD;&#xA;Take the middle Y value of the paddle, and subtract the Y intersection of the ball. If the paddle is 10 pixels high, this number will be between -5 and 5. I call this the &quot;relative intersect&quot; because it is in &quot;paddle space&quot; now, the ball's intersection relative to the middle of the paddle.&#xD;&#xA;&#xD;&#xA;    var normalizedRelativeIntersectionY = (relativeIntersectY/(PADDLEHEIGHT/2));&#xD;&#xA;    var bounceAngle = normalizedRelativeIntersectionY * MAXBOUNCEANGLE;&#xD;&#xA;&#xD;&#xA;Take the relative intersection and divide it by half the paddle height. Now our -5 to 5 number is a decimal from -1 to 1; it's *normalized*. Then multiply it by the maximum angle by which you want the ball to bounce. I set it to 5*Pi/12 radians (75 degrees).&#xD;&#xA;&#xD;&#xA;    ballVx = BALLSPEED*Math.cos(bounceAngle);&#xD;&#xA;    ballVy = BALLSPEED*-Math.sin(bounceAngle);&#xD;&#xA;&#xD;&#xA;Finally, calculate new ball velocities, using simple trigonometry.&#xD;&#xA;&#xD;&#xA;This might not quite be the effect you're going for, or you might want to also determine a speed by multiplying the normalized relative intersection by a max speed; this would make the ball go faster if it hits near the edge of a paddle, or slower if it hits near the center.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt;I'd possibly like some code on what a vector would look like or how I could save the variable of the vector the balls has (speed and direction).&#xD;&#xA;&#xD;&#xA;A vector contains both speed and direction, implicitly. I store my vector as a &quot;vx&quot; and &quot;vy&quot;; that is, the speed in the x direction and the speed in the y direction. If you haven't taken an introductory course in physics this might seem somewhat foreign to you.&#xD;&#xA;&#xD;&#xA;The reason I do this is because it reduces the per-frame calculations necessary; every frame, you just do `x += vx * time;` and `y += vy * time;` where time is the time since last frame, in milliseconds (therefore the velocities are in pixels per millisecond).&#xD;&#xA;&#xD;&#xA;  [1]: http://rickyc.org/&#xD;&#xA;  [2]: http://rickyc.org/" />
  <row Id="8431" PostHistoryTypeId="8" PostId="4253" RevisionGUID="e330beb3-9328-499a-b69a-d021d3abc4c5" CreationDate="2010-10-02T22:53:16.900" UserDisplayName="Sergio" Comment="Rollback to [7636b686-25f9-468d-b8b4-827b636ee609]" Text="I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a breakout clone. &#xD;&#xA;&#xD;&#xA;Keep in mind that I have **no** knowledge on game programming or even what maths I should apply to where, that's why I'm asking this question.&#xD;&#xA;&#xD;&#xA;With regards to this question; how can I determine where the ball should bounce when it hits the bottom bar?&#xD;&#xA;&#xD;&#xA;I'd imagine it would be something like:&#xD;&#xA;&#xD;&#xA;1. Capture speed and angle from incoming ball.&#xD;&#xA;2. Detect where it touched the bar (far left, far right, center) and according to that give it a higher speed if it touched the outer areas.&#xD;&#xA;3. This is where I'm stuck. Hehe.&#xD;&#xA;&#xD;&#xA;Any insights? I realize this is not a straightforward answer type question, but I'm sure it's one everyone faces at some point.&#xD;&#xA;&#xD;&#xA;I'm reading the book Linear Algebra that was recommended on this website, but I still have no idea if I should apply it here.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help." />
  <row Id="8432" PostHistoryTypeId="5" PostId="4255" RevisionGUID="14481cba-56f8-4b0f-9e56-b8f05b3b89bc" CreationDate="2010-10-02T22:57:24.600" UserId="189" Comment="added 394 characters in body" Text="Here's the relevant logic I used on the pong on [my homepage][1]: (please go play it before reading, so that you know the effect I'm achieving with the following code)&#xD;&#xA;&#xD;&#xA;Essentially, when the ball collides with the paddle, its direction is completely disregarded; it is given a new direction according to how far from the center of the paddle it collided. If the ball hits the paddle right in the center, it is sent away exactly horizontal; if it hits right on the edge, it flies off at an extreme angle (75 degrees). And it always travels at a constant speed.&#xD;&#xA;&#xD;&#xA;    var relativeIntersectY = (paddle1Y+(PADDLEHEIGHT/2)) - intersectY;&#xD;&#xA;&#xD;&#xA;Take the middle Y value of the paddle, and subtract the Y intersection of the ball. If the paddle is 10 pixels high, this number will be between -5 and 5. I call this the &quot;relative intersect&quot; because it is in &quot;paddle space&quot; now, the ball's intersection relative to the middle of the paddle.&#xD;&#xA;&#xD;&#xA;    var normalizedRelativeIntersectionY = (relativeIntersectY/(PADDLEHEIGHT/2));&#xD;&#xA;    var bounceAngle = normalizedRelativeIntersectionY * MAXBOUNCEANGLE;&#xD;&#xA;&#xD;&#xA;Take the relative intersection and divide it by half the paddle height. Now our -5 to 5 number is a decimal from -1 to 1; it's *normalized*. Then multiply it by the maximum angle by which you want the ball to bounce. I set it to 5*Pi/12 radians (75 degrees).&#xD;&#xA;&#xD;&#xA;    ballVx = BALLSPEED*Math.cos(bounceAngle);&#xD;&#xA;    ballVy = BALLSPEED*-Math.sin(bounceAngle);&#xD;&#xA;&#xD;&#xA;Finally, calculate new ball velocities, using simple trigonometry.&#xD;&#xA;&#xD;&#xA;This might not quite be the effect you're going for, or you might want to also determine a speed by multiplying the normalized relative intersection by a max speed; this would make the ball go faster if it hits near the edge of a paddle, or slower if it hits near the center.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt;I'd possibly like some code on what a vector would look like or how I could save the variable of the vector the balls has (speed and direction).&#xD;&#xA;&#xD;&#xA;A vector contains both speed and direction, implicitly. I store my vector as a &quot;vx&quot; and &quot;vy&quot;; that is, the speed in the x direction and the speed in the y direction. If you haven't taken an introductory course in physics this might seem somewhat foreign to you.&#xD;&#xA;&#xD;&#xA;The reason I do this is because it reduces the per-frame calculations necessary; every frame, you just do `x += vx * time;` and `y += vy * time;` where time is the time since last frame, in milliseconds (therefore the velocities are in pixels per millisecond).&#xD;&#xA;&#xD;&#xA;  [1]: http://rickyc.org/&#xD;&#xA;  [2]: http://rickyc.org/" />
  <row Id="8433" PostHistoryTypeId="2" PostId="4256" RevisionGUID="10791537-6151-4765-9e9a-f462c65c4614" CreationDate="2010-10-02T23:17:55.523" UserDisplayName="Sergio" Text="For example, I've asked about the breakout formula to calculate the ball bounce. Inside of XNA, I don't know where I would code this and to even display something I would need a lot of code.&#xD;&#xA;&#xD;&#xA;Is there something simple to visualize math formulas such as the one above?" />
  <row Id="8434" PostHistoryTypeId="1" PostId="4256" RevisionGUID="10791537-6151-4765-9e9a-f462c65c4614" CreationDate="2010-10-02T23:17:55.523" UserDisplayName="Sergio" Text="What environment should I use if I just want to test different math things?" />
  <row Id="8435" PostHistoryTypeId="3" PostId="4256" RevisionGUID="10791537-6151-4765-9e9a-f462c65c4614" CreationDate="2010-10-02T23:17:55.523" UserDisplayName="Sergio" Text="&lt;physics&gt;&lt;simulations&gt;" />
  <row Id="8436" PostHistoryTypeId="2" PostId="4257" RevisionGUID="e16ffed6-78f2-4fe6-b196-23f475e084f3" CreationDate="2010-10-03T00:03:42.857" UserId="189" Text="I tend to reason through problems on plain old **pencil and paper**. There's just nothing quite like it; it's completely unstructured.&#xD;&#xA;&#xD;&#xA;Otherwise, I mean, there are math problems like Maple, Matlab or Mathematica (those are the popular three) but they of course have a learning curve.&#xD;&#xA;&#xD;&#xA;Figuring out that particular problem was mostly just a matter of reasoning; define exactly what you want to accomplish, what variables you need (intersection point, velocity of ball, distance of intersection from center of paddle, minimum and maximum speeds), and then determine **how to go from what you have to what you want**.&#xD;&#xA;&#xD;&#xA;Sometimes maybe it just takes being familiar with the math too, or having solved similar problems or understanding different angles of the problem. For example, I had already seen similar problems like this one in my Calculus classes, so it was pretty easy for me to tackle. Math is important in game development." />
  <row Id="8437" PostHistoryTypeId="2" PostId="4258" RevisionGUID="f6c0843f-4ada-4516-8843-3cc8374a526b" CreationDate="2010-10-03T04:09:18.567" UserId="953" Text="Game Maker is an excellent choice for people with no programming experience.  It has a free version and a relatively cheap paid version.  It allows you to quickly make games with a drag-and-drop interface, but includes support for more advanced scripting." />
  <row Id="8438" PostHistoryTypeId="2" PostId="4259" RevisionGUID="3d08e2f1-bc20-4a60-b7d1-bd8beed525c6" CreationDate="2010-10-03T06:08:09.713" UserId="613" Text="If you're up for learning a new language, the [R language](http://www.r-project.org/) is designed specifically for visualizing pure math.&#xD;&#xA;&#xD;&#xA;[Processing.js](http://processingjs.org/) is another language geared toward visualization." />
  <row Id="8439" PostHistoryTypeId="2" PostId="4260" RevisionGUID="b237eec1-d80b-4e18-b988-2506e781f506" CreationDate="2010-10-03T10:26:36.637" UserId="1156" Text="I'm also 15, so I guess that could help? :P&#xD;&#xA;&#xD;&#xA;I've recently started learning Python (been doing C++ for a year or so), and I'm finding it much easier to learn than C++. There's a lot less pitfalls, and you need little code to get something on the screen - what I find makes you want to continue.&#xD;&#xA;&#xD;&#xA;And there's wrappers like Pygame and Pyglet over SDL/OpenGL for the graphics side.&#xD;&#xA;&#xD;&#xA;And before he starts making simple games, I would advise learning a language for at least a couple of months. (Of course, text based games like guess the number and hangman are good exercises during this time)" />
  <row Id="8440" PostHistoryTypeId="2" PostId="4261" RevisionGUID="27a12958-681c-4492-8214-c4237cde1149" CreationDate="2010-10-03T11:09:49.077" UserId="1780" Text="The reflection can either be done &quot;right&quot; or done &quot;easy.&quot;&#xD;&#xA;&#xD;&#xA;The &quot;right&quot; way is to compute vectors perpendicular to the walls.  In 2D that's pretty easy and you could probably just hard code them.  Then, the reflection step essentially leaves the &quot;parallel&quot; component of the motion intact and reverses the &quot;perpendicular&quot; component.  There's probably detailed information on the web for this, maybe at MathWorld even.&#xD;&#xA;&#xD;&#xA;The &quot;easy&quot; way is to just negate the X or Y motion when you hit a wall.  If you hit the side walls, you'd negate X.  If you hit the top you negate Y.  If you want to speed the ball up, just increase whatever you want; you can speed it up in its current direction by multiplying both the X and Y speeds or you can speed up only on one axis." />
  <row Id="8441" PostHistoryTypeId="2" PostId="4262" RevisionGUID="3dd8627e-1580-4ad7-80f4-10dbeba54ab3" CreationDate="2010-10-03T14:37:40.040" UserDisplayName="Sergio" Text="Any ideas on how to fix this? According to what I remember about XNA 3 was that when running the application from scratch, I would get a blue colored windows with nothing rendered.&#xD;&#xA;&#xD;&#xA;Any suggestions?&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/YkosH.png" />
  <row Id="8442" PostHistoryTypeId="1" PostId="4262" RevisionGUID="3dd8627e-1580-4ad7-80f4-10dbeba54ab3" CreationDate="2010-10-03T14:37:40.040" UserDisplayName="Sergio" Text="Created a new XNA 4.0 Windows Game project and receiving this error." />
  <row Id="8443" PostHistoryTypeId="3" PostId="4262" RevisionGUID="3dd8627e-1580-4ad7-80f4-10dbeba54ab3" CreationDate="2010-10-03T14:37:40.040" UserDisplayName="Sergio" Text="&lt;xna&gt;" />
  <row Id="8444" PostHistoryTypeId="2" PostId="4263" RevisionGUID="ace1804e-df0f-4591-aa53-d9d804e60549" CreationDate="2010-10-03T14:43:08.877" UserId="2132" Text="In a RPG context, what are the ways to quickly find a character's level, given his XP? There are two cases which I am looking at:&#xD;&#xA;&#xD;&#xA;1. For when a formula is defined, like in the case of D&amp;D, which is N = N*(N-1)*500, where N is the desired level.&#xD;&#xA;2. When no formula is defined, each level has an amount of XP require which is defined by a table.&#xD;&#xA;&#xD;&#xA;I guess the easiest way is to do a for loop and subtracting the XP required for that level from the character's XP pool, till he reaches a point where you can't attain the next level. What other ways are there to, given a character's XP, to find his level?" />
  <row Id="8445" PostHistoryTypeId="1" PostId="4263" RevisionGUID="ace1804e-df0f-4591-aa53-d9d804e60549" CreationDate="2010-10-03T14:43:08.877" UserId="2132" Text="Algo for given an amount of XP, find a character's level" />
  <row Id="8446" PostHistoryTypeId="3" PostId="4263" RevisionGUID="ace1804e-df0f-4591-aa53-d9d804e60549" CreationDate="2010-10-03T14:43:08.877" UserId="2132" Text="&lt;algorithm&gt;" />
  <row Id="8447" PostHistoryTypeId="5" PostId="4262" RevisionGUID="932f77d9-ad62-4011-a4d8-008bb45148b9" CreationDate="2010-10-03T14:45:21.717" UserDisplayName="Sergio" Comment="added 355 characters in body; edited title" Text="Any ideas on how to fix this? According to what I remember about XNA 3 was that when running the application from scratch, I would get a blue colored windows with nothing rendered.&#xD;&#xA;&#xD;&#xA;Any suggestions?&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;**EDIT!**&#xD;&#xA;&#xD;&#xA;I right clicked the project and selected Properties and changed the Game Profile from **Use HiDef** to **Use Reach**. Now the familiar blue tint window is showing as expected.&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;     &#xD;&#xA;What am I losing if I choose the limited API and why did I even have to choose this for it to work?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/YkosH.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/50G4Y.jpg" />
  <row Id="8448" PostHistoryTypeId="4" PostId="4262" RevisionGUID="932f77d9-ad62-4011-a4d8-008bb45148b9" CreationDate="2010-10-03T14:45:21.717" UserDisplayName="Sergio" Comment="added 355 characters in body; edited title" Text="Error on new XNA 4.0 game project - No suitable graphics card found." />
  <row Id="8449" PostHistoryTypeId="2" PostId="4264" RevisionGUID="f52d5516-45cf-4bd9-a353-d6b3d9d68e7c" CreationDate="2010-10-03T14:49:18.377" UserId="1352" Text="XNA Framework HiDef profile requires a DX10 capable video card.&#xD;&#xA;&#xD;&#xA;If you have a DX10 capable card, make sure your latest display drivers are installed.&#xD;&#xA;&#xD;&#xA;If you don't have a DX10 capable card go into project properties and change the profile from HiDef to Reach.&#xD;&#xA;&#xD;&#xA;Edit: I see you answered your own question, but to answer your question about what you will be missing:&#xD;&#xA;&#xD;&#xA;Probably antything related to DX10. I can't remember the exact differences in my head, but lighting and particle effects are two areas where DX10 excels over DX9. " />
  <row Id="8450" PostHistoryTypeId="2" PostId="4265" RevisionGUID="c5fd4d59-83bb-4c17-a462-e1bdaf58d206" CreationDate="2010-10-03T14:49:38.883" UserDisplayName="Sergio" Text="Why not use a keypair dictionary to save the level and experience points needed for a given level. Then when you want to find out the level according to experience just ask if the current XP is higher or lower from the closest keypair value. &#xD;&#xA;&#xD;&#xA;Once you reach a point where the value is right between two keypairs you know what level you are." />
  <row Id="8451" PostHistoryTypeId="2" PostId="4266" RevisionGUID="fc3b11af-989e-4678-8827-14ccefa78ad8" CreationDate="2010-10-03T15:49:20.833" UserId="1829" Text="I guess this kind of game or simulator already exist somewhere, but I'm not sure...&#xD;&#xA;&#xD;&#xA;Let's imagine I'm making a game where the proportions of the planet earth and the humans beings on it are the same as in the reality. I can't only use longitude/latitude with float because when being far away from the origin, precision would be lost: when the float exponent gets too high, the digit at the right would be rounded and thus, not considered. Or to say it simpler, `float` are not precise enough to position an object on earth using longitude/latitude while keeping smooth movements.&#xD;&#xA;&#xD;&#xA;Since there is a need to track each player's position in an homogenous way, I'm thinking about dividing the world map into indexed subparts (thus integers), and then precisely position the player using a float or double.&#xD;&#xA;&#xD;&#xA;This would look like this:&#xD;&#xA;&#xD;&#xA;    struct position_on_earth&#xD;&#xA;    {&#xD;&#xA;    int sector_x, sector_y;&#xD;&#xA;    float pos_x; pos_y;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Is it potentially faster to use this kind of data instead of using `double`s ?" />
  <row Id="8452" PostHistoryTypeId="1" PostId="4266" RevisionGUID="fc3b11af-989e-4678-8827-14ccefa78ad8" CreationDate="2010-10-03T15:49:20.833" UserId="1829" Text="What data should I use to track the player position on a world at the same size of the earth in a multiplayer game ?" />
  <row Id="8453" PostHistoryTypeId="3" PostId="4266" RevisionGUID="fc3b11af-989e-4678-8827-14ccefa78ad8" CreationDate="2010-10-03T15:49:20.833" UserId="1829" Text="&lt;c++&gt;&lt;position&gt;" />
  <row Id="8454" PostHistoryTypeId="2" PostId="4267" RevisionGUID="dcb40da2-d0bb-48f9-9bfb-d2521bd98822" CreationDate="2010-10-03T16:20:39.203" UserId="1352" Text="A bit of an unorthodox answer here:&#xD;&#xA;&#xD;&#xA;Starcraft II Galaxy Editor.&#xD;&#xA;&#xD;&#xA;You can make almost any game within Starcraft 2.&#xD;&#xA;&#xD;&#xA;It also teaches most programming constructs like loops and if statements in a GUI-centric way.&#xD;&#xA;&#xD;&#xA;Once he's confident with the basics, you can have him script stuff.&#xD;&#xA;&#xD;&#xA;If he's good at it, and finds this interesting, he will love proper game programming." />
  <row Id="8455" PostHistoryTypeId="2" PostId="4268" RevisionGUID="f6639c73-5548-4ce4-8015-dac5be07bd06" CreationDate="2010-10-03T16:33:21.247" UserId="2389" Text="Earth's Surface Area ~ 5.1×10^14 square meters&#xD;&#xA;&#xD;&#xA;If the world were flat, you would have enough precision from making pos_x and pos_y 32bit integers to divide the entire world into a uniform sub-millimeter grid. Depending on the scale of your simulation, this might well be enough precision.&#xD;&#xA;&#xD;&#xA;If you're going for a spherical world, however, you're going to need a different kind of coordinate system." />
  <row Id="8456" PostHistoryTypeId="2" PostId="4269" RevisionGUID="1f959a1c-0a66-4d1a-8736-4087834a7793" CreationDate="2010-10-03T16:36:04.700" UserId="27" Text="The RPG I worked on stored both the level as well as the current percentage to next level, instead of just a raw XP amount on the player. We did this so that if we ever wanted to change the values in the experience tables, the player wouldn't see a sudden drop or rise in level.&#xD;&#xA;&#xD;&#xA;For instance, imagine your player has 1000 XP, which is enough to make him 50% through 3rd level. If we were to suddenly make it so that 1000 XP is actually only 90% through 1st level, the next time the player plays the game you would need to level the character back down to 1st level.&#xD;&#xA;&#xD;&#xA;As experience is earned, you can add the percentage amount of experience to the player's current XP percentage. Most RPGs are actually designed so that the amount of experience given for an encounter is easily converted to this percentage. If the percentage is ever greater than 100%, increment the level of the player, subtract 100% away from the experience, and for the extra amount over 100% give them something like:&#xD;&#xA;&#xD;&#xA;    currentXPPercentage = ((Amount over 100%) * (Amount over 100% * Total XP for Previous Level)) / (Amount over 100% * Total XP for Previous Level)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;...in the end, if you did it that way you'd be storing the player's current level. Yay for no for loop to determine players level." />
  <row Id="8457" PostHistoryTypeId="2" PostId="4270" RevisionGUID="310fe6b0-d05b-4749-9166-eae842453489" CreationDate="2010-10-03T16:40:14.620" UserId="27" Text="You can use [MatLab][1], but I personally dont.&#xD;&#xA;&#xD;&#xA;Whenever I want to type out a bunch of quick code to test a formula, I actually use the python interpreter. Python is great for something like this, and running something in the interpreter is really quick and easy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mathworks.com/" />
  <row Id="8458" PostHistoryTypeId="5" PostId="4268" RevisionGUID="61453e0c-fd6f-4d8b-9b29-05b31ebbfc0b" CreationDate="2010-10-03T16:48:44.007" UserId="2389" Comment="Added details about spherical world gridding" Text="Earth's Surface Area ~ 5.1×10^14 square meters&#xD;&#xA;&#xD;&#xA;If the world were flat, you would have enough precision from making pos_x and pos_y 32bit integers to divide the entire world into a uniform sub-millimeter grid. Depending on the scale of your simulation, this might well be enough precision.&#xD;&#xA;&#xD;&#xA;If you're going for a spherical world, however, you're going to need a different kind of coordinate system.&#xD;&#xA;&#xD;&#xA;EDIT: In fact, just using a dumb 32bit int grid still isn't all that bad if you move to a sphere! Some more details about earth:&#xD;&#xA;&#xD;&#xA;Mean radius 6,371.0 km&#xD;&#xA;Equatorial radius 6,378.1 km&#xD;&#xA;Polar radius 6,356.8 km&#xD;&#xA;&#xD;&#xA;Lets say we put our model earth in a cube with sides 13,000 km in length. If we use 32bit ints for x, y and z coordinates, we still get sub-centimeter precision. As an added bonus, we don't need to handle altitude / depth as a separate special case anymore (although this might be viewed as a disadvantage, since we will need to check the direction to the planet's center when we apply gravity)." />
  <row Id="8459" PostHistoryTypeId="2" PostId="4271" RevisionGUID="9d7bc8e1-e874-47de-b441-8f2f6a5be211" CreationDate="2010-10-03T17:39:51.680" UserId="666" Text="I asked something like this some time ago in Stackoverflow.com and the [answers are pretty good.][1]&#xD;&#xA;&#xD;&#xA;I ended up using [Octave][2] and it was awesome.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/488502/best-language-to-program-some-math-free-fast-easy-cool-etc&#xD;&#xA;  [2]: http://www.gnu.org/software/octave/" />
  <row Id="8460" PostHistoryTypeId="2" PostId="4272" RevisionGUID="a9d97fa6-b389-489d-a3b9-351b7b04b9fe" CreationDate="2010-10-03T17:51:58.283" UserId="666" Text="I dont undertand what you mean with &quot;Actionsheet&quot;, but the trick here is that you have to subscribe to be notified that the keyboard will show and then move your buttons to a place where they can be displayed.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8461" PostHistoryTypeId="2" PostId="4273" RevisionGUID="f23bff56-9812-4194-8ecc-f1bb03352dfe" CreationDate="2010-10-03T17:52:02.247" UserId="189" Text="As I said in my other answer to your other very similar [question][1], you should read [&quot;The Continuous World of Dungeon Siege&quot;][2]. He does indeed suggest dividing the world up into a &quot;relational node-based coordinate system, in which each chunk of geometry (Siege Node) has its own coordinate space&quot;. Your struct seems to mirror this, so I think you're doing fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3935/in-what-kind-of-variable-type-is-the-player-position-stored-on-a-mmorpg-such-as-w&#xD;&#xA;  [2]: http://scottbilas.com/files/2003/gdc_san_jose/continuous_world_paper.html" />
  <row Id="8462" PostHistoryTypeId="2" PostId="4274" RevisionGUID="24e47d02-8759-40ba-8c9d-10576436b3f1" CreationDate="2010-10-03T18:56:26.787" UserId="2390" Text="If the formula is defined, just invert the formula to find the xp-to-level conversion. If you can't invert the formula, then use a [binary search][1] to find the level. This assumes that more xp always correlates with a higher level, but I think this is a safe assumption for most levelling systems :)&#xD;&#xA;&#xD;&#xA;If you have a table instead (and you are using C++) then you can use `std::lower_bound` to find the corresponding level for XP:&#xD;&#xA;&#xD;&#xA;    int[6] xpForLevel = {100, 200, 400, 800, 1600, 3200};&#xD;&#xA;    int* it = std::lower_bound(xpForLevel, xpForLevel + 6);&#xD;&#xA;    int level = it - xpForLevel;&#xD;&#xA;&#xD;&#xA;This will work in O(log(n)) time for n levels, so it's fast enough for pretty much any use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_search_algorithm" />
  <row Id="8463" PostHistoryTypeId="5" PostId="4274" RevisionGUID="e9ea91ff-c3a0-4cc8-87af-7a8bc0906295" CreationDate="2010-10-03T19:39:30.920" UserId="2390" Comment="added 4 characters in body" Text="If the formula is defined, just invert the formula to find the xp-to-level conversion. If you can't invert the formula, then use a [binary search][1] to find the level. This assumes that more xp always correlates with a higher level, but I think this is a safe assumption for most levelling systems :)&#xD;&#xA;&#xD;&#xA;If you have a table instead (and you are using C++) then you can use `std::lower_bound` to find the corresponding level for XP:&#xD;&#xA;&#xD;&#xA;    int[6] xpForLevel = {100, 200, 400, 800, 1600, 3200};&#xD;&#xA;    int* it = std::lower_bound(xpForLevel, xpForLevel + 6, xp);&#xD;&#xA;    int level = it - xpForLevel;&#xD;&#xA;&#xD;&#xA;This will work in O(log(n)) time for n levels, so it's fast enough for pretty much any use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_search_algorithm" />
  <row Id="8464" PostHistoryTypeId="5" PostId="4274" RevisionGUID="543585c4-0022-43e9-9911-5713e51aa5fb" CreationDate="2010-10-03T19:45:53.817" UserId="744" Comment="Use sizeof rather than hardcoded constants." Text="If the formula is defined, just invert the formula to find the xp-to-level conversion. If you can't invert the formula, then use a [binary search][1] to find the level. This assumes that more xp always correlates with a higher level, but I think this is a safe assumption for most levelling systems :)&#xD;&#xA;&#xD;&#xA;If you have a table instead (and you are using C++) then you can use `std::lower_bound` to find the corresponding level for XP:&#xD;&#xA;&#xD;&#xA;    int[6] xpForLevel = {100, 200, 400, 800, 1600, 3200};&#xD;&#xA;    int* it = std::lower_bound(xpForLevel, xpForLevel + sizeof(xpForLevel) / sizeof(xpForLevel[0]), xp);&#xD;&#xA;    int level = it - xpForLevel;&#xD;&#xA;&#xD;&#xA;This will work in O(log(n)) time for n levels, so it's fast enough for pretty much any use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_search_algorithm" />
  <row Id="8465" PostHistoryTypeId="5" PostId="4274" RevisionGUID="4bbebe08-8bc0-48f4-890d-6be9e168301b" CreationDate="2010-10-03T19:56:29.380" UserId="2390" Comment="added 5 characters in body" Text="If the formula is defined, just invert the formula to find the xp-to-level conversion. If you can't invert the formula, then use a [binary search][1] to find the level. This assumes that more xp always correlates with a higher level, but I think this is a safe assumption for most levelling systems :)&#xD;&#xA;&#xD;&#xA;If you have a table instead (and you are using C++) then you can use `std::lower_bound` to find the corresponding level for XP:&#xD;&#xA;&#xD;&#xA;    const int numLevels = 6;&#xD;&#xA;    int[numLevels] xpForLevel = {100, 200, 400, 800, 1600, 3200};&#xD;&#xA;    int* it = std::lower_bound(xpForLevel, xpForLevel + numLevels, xp);&#xD;&#xA;    int level = it - xpForLevel;&#xD;&#xA;&#xD;&#xA;This will work in O(log(n)) time for n levels, so it's fast enough for pretty much any use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_search_algorithm" />
  <row Id="8466" PostHistoryTypeId="5" PostId="4274" RevisionGUID="0702d6ed-dbd4-4c71-b269-e135aa51ab01" CreationDate="2010-10-03T21:32:35.490" UserId="2390" Comment="added 214 characters in body" Text="If the formula is defined, just invert the formula to find the xp-to-level conversion. If you can't invert the formula, then use a [binary search][1] to find the level. This assumes that more xp always correlates with a higher level, but I think this is a safe assumption for most levelling systems :)&#xD;&#xA;&#xD;&#xA;If you have a table instead (and you are using C++) then you can use `std::lower_bound` to find the corresponding level for XP:&#xD;&#xA;&#xD;&#xA;    const int numLevels = 6;&#xD;&#xA;    int[numLevels] xpForLevel = {100, 200, 400, 800, 1600, 3200};&#xD;&#xA;    int* it = std::lower_bound(xpForLevel, xpForLevel + numLevels, xp);&#xD;&#xA;    int level = it - xpForLevel;&#xD;&#xA;&#xD;&#xA;This will work in O(log(n)) time for n levels, so it's fast enough for pretty much any use.&#xD;&#xA;&#xD;&#xA;Note, if the given `xp` is less than that required for the lowest level, then `lower_bound` will return `xpForLevel + numLevels`.&#xD;&#xA;&#xD;&#xA;If you want to find the XP required for the *next* level up, use `upper_bound`.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_search_algorithm" />
  <row Id="8467" PostHistoryTypeId="2" PostId="4275" RevisionGUID="9e7d7a85-cdfe-4fc4-a183-a47d73597b70" CreationDate="2010-10-03T21:49:29.367" UserId="2392" Text="It has been a while since I've done this, but I think I've got this right.&#xD;&#xA;&#xD;&#xA;Given a perfect collision, the angle of reflection is equal to the angle of incidence.&#xD;&#xA;&#xD;&#xA;You know the normal of your paddle (presuming a flat surface): N&#xD;&#xA;You know your original position of your ball (at the beginning of your timestep): P&#xD;&#xA;You know your new position of the ball (at the end of the timestep): P'&#xD;&#xA;You know your point of collision: C&#xD;&#xA;Assuming that you calculated that the segment P -&gt; P' passes through your paddle, your new reflected postion (P'') would be:&#xD;&#xA;&#xD;&#xA;P' + 2 * (N * (P' dot -N) )&#xD;&#xA;&#xD;&#xA;The N * (P' dot -N) subexpression calculates the depth along the normal of collision the ball traveled.  The minus sign is to correct for the fact we're checking for depth opposite the direction of the normal.&#xD;&#xA;&#xD;&#xA;The P' + 2 * the part of the subexpression moves the ball back above the plane of collision by 2 times the depth of the collision.&#xD;&#xA;&#xD;&#xA;If you want a less than perfect collision, change the factor 2 to be (1 + (1-k)) where k is your coefficient of friction.  A perfect collision has a k value of 0, causing the reflection angle to be exactly that of the incoming angle.  A k value of 1 causes a collision where the ball would stay on the surface of the plane of collision.&#xD;&#xA;&#xD;&#xA;Your new velocity vector, V'', direction would be P'' - C.  Normalize it and multiply by your incoming velocity and your resultant velocity magnitude would be the same, but in the new direction.  You can monkey with that velocity by multiplying it by a coefficient, l, that would either increase (l &gt; 1) or decrease (l &lt; 1) the resulting velocity.&#xD;&#xA;&#xD;&#xA;To summarize: &#xD;&#xA;&#xD;&#xA;P'' = P' + (1-k) * (N*(P dot -N))&#xD;&#xA;V'' = l * V * ((P'' - C) / |P''-C|)&#xD;&#xA;&#xD;&#xA;Where k and l are coefficients of your choosing.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8468" PostHistoryTypeId="2" PostId="4276" RevisionGUID="f519c26e-ad6b-4331-887d-e634fd84928a" CreationDate="2010-10-03T22:32:38.253" UserId="2393" Text="I'm building an ability that drains energy from the target unit and gives it to caster unit.  I've tried to associate an actor that hooks in to the ability's start event to create the continuous beam, but the beam never appears.  What's the right way to do this?" />
  <row Id="8469" PostHistoryTypeId="1" PostId="4276" RevisionGUID="f519c26e-ad6b-4331-887d-e634fd84928a" CreationDate="2010-10-03T22:32:38.253" UserId="2393" Text="How do I animate a custom ability with a continuous beam?" />
  <row Id="8470" PostHistoryTypeId="3" PostId="4276" RevisionGUID="f519c26e-ad6b-4331-887d-e634fd84928a" CreationDate="2010-10-03T22:32:38.253" UserId="2393" Text="&lt;starcraft-2&gt;" />
  <row Id="8471" PostHistoryTypeId="2" PostId="4277" RevisionGUID="864aabd3-70a0-4917-947a-c5eb1ac91c09" CreationDate="2010-10-03T22:33:22.040" UserId="1047" Text="If i decide to write a simple game both text and graphical (2d) what libs may i use? Assuming we are using a HTML5 compatible browser.&#xD;&#xA;&#xD;&#xA;The main things i can think of&#xD;&#xA;&#xD;&#xA;- Rendering text on screen&#xD;&#xA;- Animating sprites (using images/css)&#xD;&#xA;- Input (capturing the arrow keys and getting relative mouse positions)&#xD;&#xA;- Perhaps some preloading resource or dynamically loading resources and choosing order&#xD;&#xA;- Sound (but i am unsure how important this will be to me at first). Perhaps with mixing and chaining sounds or looping forever until stop.&#xD;&#xA;- Networking (low priority) to connect a user to another or to continuously GET data without multiple request (i know this exist but i dont know how easy it is to setup or use. But this isnt important to me. Its for the question).&#xD;&#xA;" />
  <row Id="8472" PostHistoryTypeId="1" PostId="4277" RevisionGUID="864aabd3-70a0-4917-947a-c5eb1ac91c09" CreationDate="2010-10-03T22:33:22.040" UserId="1047" Text="What are good JS libraries for game dev? (HTML5)" />
  <row Id="8473" PostHistoryTypeId="3" PostId="4277" RevisionGUID="864aabd3-70a0-4917-947a-c5eb1ac91c09" CreationDate="2010-10-03T22:33:22.040" UserId="1047" Text="&lt;html5&gt;&lt;javascript&gt;" />
  <row Id="8474" PostHistoryTypeId="4" PostId="4276" RevisionGUID="2161fbdb-cb2a-4ba5-bd51-02052f78c5f4" CreationDate="2010-10-03T23:06:40.473" UserId="395" Comment="Make it clear that this is about SC2, currently only mentioned in tags." Text="How do I animate a custom ability with a continuous beam in Starcraft 2?" />
  <row Id="8475" PostHistoryTypeId="2" PostId="4278" RevisionGUID="d6d7a153-6a7b-459f-8d53-c7dd713ab739" CreationDate="2010-10-04T00:56:56.073" UserId="189" Text="**[jQuery][1]** and **[MooTools][2]** are awesome JavaScript libraries; I prefer jQuery myself. Either one will assist you in your JS game development if you use the DOM. If you go with Canvas rendering, I still think you should use one of those libraries, but you will need to learn the Canvas functions. [Here is a tutorial][3] which introduces you to canvas by creating a Breakout clone, so it might be exactly the kind of thing you're looking for (and it uses jQuery).&#xD;&#xA;&#xD;&#xA;Animating sprites is a matter of changing an image src, or preloading several images and swapping them out, or in a canvas just drawing frames of an animation. The above libraries can help with any of these cases. The libraries also help with input (look into events such as onkeypress and onmousemove).&#xD;&#xA;&#xD;&#xA;For preloading resources, I've seem some games that use a single &quot;sprite sheet&quot; image ([here is the one][4] for Google's [Pacman][5] game). I believe they basically create a DIV of one tile size, with the CSS background-image property set to the sprite sheet and the [background-position][6] property set to the offset of the tile on the sprite sheet. I haven't seen a library that will do this for you, but jQuery or MooTools can help you as far as dynamically creating the DIV and manipulating its CSS. Otherwise, preloading images is a matter of creating `&lt;img&gt;` tags of the images you want preloaded, and not adding them to the page (or adding them invisibly). Here's **[a blog post][7]** that has some code for a function using jQuery to preload images for you.&#xD;&#xA;&#xD;&#xA;**[SoundManager 2][8]** seems to be the JS sound library to use; I know [Vanthia][9] uses it, and Google's [Pacman][10] used something similar (or at least the same technique, of using a hidden Flash file on the page to play sounds).&#xD;&#xA;&#xD;&#xA;For networking, jQuery can handle [AJAX][11] for you, or if you want much more real-time networking (and have the server to do so), look into **[JavaScript sockets][12]**. I don't know if there's a stable library out there for it, but you might look into [this][13] or [this][14]. Essentially it uses a hidden Java or Flash file on the page so that you can do true [socket communication][15] with JavaScript, which is much quicker than AJAX polling and slightly more efficient than [&quot;AJAX Push&quot;][16]. However, most likely, AJAX Push will be what you want, and **[APE (Ajax Push Engine)][17]** is probably the library to use.&#xD;&#xA;&#xD;&#xA;Also, here is a Google tech talk about [&quot;Building a JavaScript-Based Game Engine for the Web&quot;][18]. It looks neat.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jquery.com/&#xD;&#xA;  [2]: http://mootools.net/&#xD;&#xA;  [3]: http://billmill.org/static/canvastutorial/&#xD;&#xA;  [4]: http://www.google.com/logos/pacman10-hp-sprite.png&#xD;&#xA;  [5]: http://www.google.com/pacman&#xD;&#xA;  [6]: http://www.w3schools.com/css/pr_background-position.asp&#xD;&#xA;  [7]: http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript&#xD;&#xA;  [8]: http://www.schillmania.com/projects/soundmanager2/&#xD;&#xA;  [9]: http://www.vanthia.com&#xD;&#xA;  [10]: http://www.google.com/pacman&#xD;&#xA;  [11]: http://api.jquery.com/category/ajax/&#xD;&#xA;  [12]: http://www.google.com/search?q=javascript+sockets&#xD;&#xA;  [13]: http://blog.mayflower.de/archives/117-Real-Javascript-Sockets!.html&#xD;&#xA;  [14]: http://aidamina.blogspot.com/2008/05/jsocket-javascript-with-socket.html&#xD;&#xA;  [15]: http://en.wikipedia.org/wiki/Berkeley_sockets&#xD;&#xA;  [16]: http://en.wikipedia.org/wiki/Ajax_Push&#xD;&#xA;  [17]: http://www.ape-project.org/&#xD;&#xA;  [18]: http://www.youtube.com/watch?v=_RRnyChxijA" />
  <row Id="8476" PostHistoryTypeId="2" PostId="4279" RevisionGUID="f0dbdac4-ce5e-404c-a856-a9a1521328cc" CreationDate="2010-10-04T01:27:07.670" UserId="323" Text="You're asking the wrong question.&#xD;&#xA;&#xD;&#xA;The right question is &quot;will this ever be a bottleneck in my game&quot;. The answer to that, I can nearly guarantee, is &quot;no&quot;. It will not be. You can implement this in the simplest most braindead manner and it will never use more than 0.01% of your game's CPU, most likely vastly less than that.&#xD;&#xA;&#xD;&#xA;Loop through levels 1 through MAX_LEVEL, find the first level with a higher XP requirement than the player has. There ya go.&#xD;&#xA;&#xD;&#xA;You're making a game, not a technology showcase. Make it work, don't agonize over every cycle." />
  <row Id="8477" PostHistoryTypeId="2" PostId="4280" RevisionGUID="a46dd2f8-fe7c-4fc7-9d81-06dfbbd5607b" CreationDate="2010-10-04T01:32:01.730" UserId="323" Text="Personally, I'd question why you're writing support tools in a different language than your game code. That seems like a dubious idea. :)&#xD;&#xA;&#xD;&#xA;I've used both Lua and Protobufs rather extensively. I've been using Lua lately, mostly because it is really ridiculously easy to merge them into a Lua-based game. However this is just a preference. They'll both work fine for nearly all purposes - unless you have a strong reason to change, I'd just stick with whatever you have.&#xD;&#xA;&#xD;&#xA;Two things to note:&#xD;&#xA;&#xD;&#xA;* Gzipped Lua is surprisingly compact.&#xD;&#xA;* Protocol buffers do have a text output option which is easy to edit and verify." />
  <row Id="8478" PostHistoryTypeId="2" PostId="4281" RevisionGUID="4567984c-33f4-4d3b-81c6-0574080a40cb" CreationDate="2010-10-04T03:15:34.647" UserId="2039" Text="My game a sidescrolling platformer. I've created my own Tile app which in the end export an xml file detailing what each 32x32 space (in the entire image) contains (environment, platform, etc.). I get how to use it for static things/collision detection and quad trees and so forth but still have no clue how to use this map xml file for keeping my character on a path in my background image which in my case is a hill with lots of odd curves. Can anyone give me an idea or an example?" />
  <row Id="8479" PostHistoryTypeId="1" PostId="4281" RevisionGUID="4567984c-33f4-4d3b-81c6-0574080a40cb" CreationDate="2010-10-04T03:15:34.647" UserId="2039" Text="Tiles and a walkable path" />
  <row Id="8480" PostHistoryTypeId="3" PostId="4281" RevisionGUID="4567984c-33f4-4d3b-81c6-0574080a40cb" CreationDate="2010-10-04T03:15:34.647" UserId="2039" Text="&lt;collision-detection&gt;&lt;tiles&gt;" />
  <row Id="8481" PostHistoryTypeId="5" PostId="4281" RevisionGUID="72ce8912-f49c-4968-8a22-d1d6bf4f2bf5" CreationDate="2010-10-04T03:32:29.867" UserId="2039" Comment="added 445 characters in body" Text="My game a sidescrolling platformer. I've created my own Tile app which in the end export an xml file detailing what each 32x32 space (in the entire image) contains (environment, platform, etc.). I get how to use it for static things/collision detection and quad trees and so forth but still have no clue how to use this map xml file for keeping my character on a path in my background image which in my case is a hill with lots of odd curves. &#xD;&#xA;&#xD;&#xA;Also, yes, there are tutorials on tile movement, but they are mostly movement from a top-down view which is slightly more trivial to implement. 80% of the image in my game is just a pure background and the very bottom are bricks covered with grass with some weirder angles. The thing is, I can have mixed tiles of empty space and grass which contains a part of a curve so I don't know how I would want the player leg to interact with this.&#xD;&#xA;Can anyone give me an idea or an example?" />
  <row Id="8482" PostHistoryTypeId="2" PostId="4282" RevisionGUID="38a44504-73e0-4207-9fa6-76523ac8e123" CreationDate="2010-10-04T04:27:44.490" UserId="288" Text="To answer your follow up question:&#xD;&#xA;&#xD;&#xA;&gt; What am I losing if I choose the limited API?&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/03/12/reach-vs-hidef.aspx&quot;&gt;This blog post explains the differences between Reach and HiDef&lt;/a&gt;. In a nutshell, the Reach profile does not allow the use of some of the more advanced graphics card features. But it runs on more hardware." />
  <row Id="8483" PostHistoryTypeId="2" PostId="4283" RevisionGUID="f1813d18-b559-4840-90e7-41aae086656b" CreationDate="2010-10-04T05:06:39.717" UserId="189" Text="Someone else with more knowledge of the subject should write a more thorough answer, but in an attempt to give you an answer (since nobody else has)...&#xD;&#xA;&#xD;&#xA;You should start by implementing pixelwise collision detection, or triangles (mesh collision) if they approximate your terrain well enough. Then, in order to accurately place your character's feet on the ground, perhaps rig your sprite with virtual bones. They could be controlled by a physics engine for best-looking results. Or, if you go the triangles way, you could also have a triangle collision mesh for your sprite, and borrow some of the techniques usually used in 3D games in order to calculate the best angle/distortion of the collision mesh onto the terrain." />
  <row Id="8484" PostHistoryTypeId="5" PostId="4248" RevisionGUID="1b8b0433-26b6-489b-83a7-e41f3e21f5ee" CreationDate="2010-10-04T07:49:53.537" UserId="370" Comment="added 132 characters in body" Text="I use C++ as my language as choice.  However, I generally use Python to write helper utilities and tools.&#xD;&#xA;&#xD;&#xA;My worry is that as my game engine continues to grow it's getting tedious to reimplement some of its features in Python.&#xD;&#xA;&#xD;&#xA;There has got to be a better way.&#xD;&#xA;&#xD;&#xA;Here are the options as I seem them&#xD;&#xA;&#xD;&#xA;* Keep on keeping on.  &#xD;&#xA;That is often the answer in a cooperate environment.  Maybe it has some merit.&#xD;&#xA;* Build bindings for Python (yuck) and have it use pieces of the engine directly.&#xD;&#xA;* Start building the tools using C++ instead.  &#xD;&#xA;I already use [QT][1] in the Python tools to provide a GUI when needed.  It doesn't seem like it'd be that much harder to use [QT in C++][2] instead.  However I'm worried my tool productivity will go down.  I generally strive to apply much less rigidity in tool code than I would in shipping code.&#xD;&#xA;&#xD;&#xA;So what is common practice, use the same language for tools, or use a more RAD friendly one?  &#xD;&#xA;What if you use a language that differs from the language of the game which do you use?&#xD;&#xA;How do tools interact with the game engine link to it directly or fake it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riverbankcomputing.co.uk/software/pyqt/intro&#xD;&#xA;  [2]: http://qt.nokia.com/" />
  <row Id="8485" PostHistoryTypeId="5" PostId="4263" RevisionGUID="ce453d3b-a9f3-4819-9539-19f2d6f06676" CreationDate="2010-10-04T07:56:10.603" UserId="2132" Comment="added 33 characters in body" Text="In a RPG context, what are the ways to quickly find a character's level, given his XP? There are two cases which I am looking at:&#xD;&#xA;&#xD;&#xA;1. For when a formula is defined, like in the case of D&amp;D, which is N = N*(N-1)*500, where N is the desired level.&#xD;&#xA;2. When no formula is defined, each level has an amount of XP require which is defined by a table.&#xD;&#xA;&#xD;&#xA;I guess the easiest way is to do a for loop and subtracting the XP required for that level from the character's XP pool, till he reaches a point where you can't attain the next level. What other ways are there to, given a character's XP, to find his level?&#xD;&#xA;&#xD;&#xA;**Edit:** The language is PHP" />
  <row Id="8486" PostHistoryTypeId="5" PostId="4219" RevisionGUID="9bf16abb-2fa4-423d-86a5-a85b477c0d2a" CreationDate="2010-10-04T08:11:08.643" UserId="1217" Comment="added 518 characters in body" Text="As the title suggests I'm developing a top down space game. &#xD;&#xA;&#xD;&#xA;I'm not looking to use newtonian (spelled that way?) physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that of FlatSpace 2 (awesome game). I can't figure out how to achieve this feeling with keyboard controls as opposed to mouse controls though. Any suggestions? &#xD;&#xA;&#xD;&#xA;I'm using Unity3d and C# or javaScript (unityScript or whatever is the correct term) works fine if you want to drop some code examples. &#xD;&#xA;&#xD;&#xA;Edit: Of course I should describe FlatSpace 2's control scheme, sorry. You hold the mouse button down and move the mouse in the direction you want the ship to move in. But it's not the controls I don't know how to do but rather the feeling of a mix of driving a car and flying an aircraft. It's really well made. Youtube link: [FlatSpace2 on iPhone][1] &#xD;&#xA;&#xD;&#xA;I'm not developing an iPhone game but the video shows the principle of the movement style.  &#xD;&#xA;[1]: http://www.youtube.com/watch?v=3dmSk-2sCpo&amp;feature=related" />
  <row Id="8487" PostHistoryTypeId="16" PostId="4277" RevisionGUID="f38f6587-22b8-4e3e-8c9e-31959eafdaec" CreationDate="2010-10-04T11:03:48.190" UserId="1047" />
  <row Id="8488" PostHistoryTypeId="2" PostId="4284" RevisionGUID="836c792d-f7e4-43a4-a59f-67c8660f8484" CreationDate="2010-10-04T13:19:51.317" UserId="1829" Text="I don't really know when vertex and/or pixel shaders became available for consoles and computers, but what could we do without them ? I don't really understand what is achievable with shaders and what is not without them, and what are the true advantages while using them.&#xD;&#xA;&#xD;&#xA;I guess the advantages of using shaders are performance and better flexibility, but on the other hand, I am quite speechless when looking at the syntax...&#xD;&#xA;&#xD;&#xA;I think a really good rendering quality can be achieved without using them, but I'm not sure which one..." />
  <row Id="8489" PostHistoryTypeId="1" PostId="4284" RevisionGUID="836c792d-f7e4-43a4-a59f-67c8660f8484" CreationDate="2010-10-04T13:19:51.317" UserId="1829" Text="What are the big advantages of shaders ? What is doable with them, and what can't be done without them ?" />
  <row Id="8490" PostHistoryTypeId="3" PostId="4284" RevisionGUID="836c792d-f7e4-43a4-a59f-67c8660f8484" CreationDate="2010-10-04T13:19:51.317" UserId="1829" Text="&lt;3d&gt;&lt;shaders&gt;" />
  <row Id="8491" PostHistoryTypeId="2" PostId="4285" RevisionGUID="f354e5fb-4731-4211-a837-c643c6f6429f" CreationDate="2010-10-04T14:18:56.203" UserId="999" Text="Just some examples that are hard to do without shaders:&#xD;&#xA;&#xD;&#xA;* Normal mapping&#xD;&#xA;* Parallax mapping&#xD;&#xA;* Cartoon rendering&#xD;&#xA;* Bloom&#xD;&#xA;" />
  <row Id="8492" PostHistoryTypeId="2" PostId="4286" RevisionGUID="10d8c02a-1c31-418d-bd37-98f301a8bd2f" CreationDate="2010-10-04T16:51:53.500" UserId="1101" Text="Shaders facilitate graphics rendering that is both flexible and efficient.&#xD;&#xA;&#xD;&#xA;Once upon a time all graphics were done in software. This was very flexible, but not very efficient.&#xD;&#xA;&#xD;&#xA;In the mid 90s add-on graphics cards became popular because they vastly accelerated graphics, but at the cost of flexibility. Writing pixels became a lot cheaper but reading them became much harder and/or slower.&#xD;&#xA;&#xD;&#xA;Now that graphics are faster, and technology has improved (or become more affordable, depending on how you look at it), some flexibility can be added back into the graphics pipeline. Shaders give you this flexibility. The syntax is quite low-level because the hardware it is aimed at is also quite low-level. It's a compromise.&#xD;&#xA;&#xD;&#xA;Really good rendering quality can indeed be achieved without them, depending on your definition of quality. You can stick to CPU-based graphics, if you don't mind those graphics being quite slow. Or, you can use the GPU and used the old fixed-function pipeline, which gives you a subset of the shader functionality. Whether that subset is &quot;really good&quot; or not is subjective - it was certainly good enough for many years - but you miss out on some interesting modern rendering techniques as a result, as the fixed function pipeline has no way of performing the completely arbitrary transformations on vertices and pixels that shaders can perform." />
  <row Id="8493" PostHistoryTypeId="2" PostId="4287" RevisionGUID="415fb7bd-0372-40ed-8548-83b5dfce957b" CreationDate="2010-10-04T18:16:53.977" UserId="539" Text="[Akihabara](http://www.kesiev.com/akihabara/) is a framework that I've seen come up in a number of places. A friend of mine also created a [series of tutorials](http://tinysubversions.com/2010/08/akihabara-documentation-is-online/) and documentation for the framework." />
  <row Id="8494" PostHistoryTypeId="16" PostId="4287" RevisionGUID="415fb7bd-0372-40ed-8548-83b5dfce957b" CreationDate="2010-10-04T18:16:53.977" UserId="-1" />
  <row Id="8495" PostHistoryTypeId="2" PostId="4288" RevisionGUID="44595770-9cd1-4d5d-a38b-96c274903fe1" CreationDate="2010-10-04T18:25:28.240" UserId="2365" Text="I'm new to all this game developing, and I'm starting to learn java because I was told it was a great way to start. I want to later on create games for the android market, and want to get a good view from you guys, so I know what I'm dealing with exactly.&#xD;&#xA;&#xD;&#xA;I DO realize that Android development has different architectures and whatnot (that a good way to say it?)&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="8496" PostHistoryTypeId="1" PostId="4288" RevisionGUID="44595770-9cd1-4d5d-a38b-96c274903fe1" CreationDate="2010-10-04T18:25:28.240" UserId="2365" Text="How hard and different is Java vs Android?" />
  <row Id="8497" PostHistoryTypeId="3" PostId="4288" RevisionGUID="44595770-9cd1-4d5d-a38b-96c274903fe1" CreationDate="2010-10-04T18:25:28.240" UserId="2365" Text="&lt;android&gt;" />
  <row Id="8498" PostHistoryTypeId="2" PostId="4289" RevisionGUID="2b72d822-04f3-45ab-983a-dbce27a3ce54" CreationDate="2010-10-04T19:28:17.033" UserDisplayName="Sergio" Text="I don't know what you mean between Java vs. Android. To create Android applications you use Java and the extension libraries that Android provides.&#xD;&#xA;&#xD;&#xA;Similar to Blackberry applications, you can use pure Java but most of the time you want to use the RIM libraries provided by RIM.&#xD;&#xA;&#xD;&#xA;If you're completely new to programming I would recommend first learning good Java principles, then learning the Android API provided by Google. If you learn Android first you'll get confused quick and not follow good programming practices.&#xD;&#xA;&#xD;&#xA;I recommend starting with the book Head First Java." />
  <row Id="8499" PostHistoryTypeId="5" PostId="4289" RevisionGUID="e68e7680-b1b5-476d-9485-9fd1e9918431" CreationDate="2010-10-04T19:35:44.837" UserDisplayName="Sergio" Comment="added 506 characters in body" Text="I don't know what you mean between Java vs. Android. To create Android applications you use Java and the extension libraries that Android provides. These aren't extensions in the Java Language sort of way; I mean libraries that are shipped with Android to help you achieve the common things you'd want to do on a cellphone.&#xD;&#xA;&#xD;&#xA;For example, Blackberry (*another Java-based mobile OS*) uses Java as the language of choice, and Research In Motion provides a set of libraries in the RIM package that helps me abstract things that I'd commonly do on my phone.&#xD;&#xA;&#xD;&#xA;You can use pure Java but most of the time you want to use the RIM libraries provided by RIM.&#xD;&#xA;&#xD;&#xA;If you're completely new to programming I would recommend first learning good Java principles - classes, methods, object-oriented programming, etc; then learning the Android API provided by Google. If you learn Android first you'll get confused quick and not follow good programming practices.&#xD;&#xA;&#xD;&#xA;I recommend starting with the book [Head First Java][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208" />
  <row Id="8500" PostHistoryTypeId="5" PostId="4289" RevisionGUID="dc5e3e3b-6341-4b4a-9d06-4637f0b7d5b5" CreationDate="2010-10-04T19:41:48.167" UserDisplayName="Sergio" Comment="deleted 53 characters in body" Text="To create Android applications you use Java and the extension libraries that Android provides. These aren't extensions in the Java Language sort of way; I mean libraries that are shipped with Android to help you achieve the common things you'd want to do on a cellphone.&#xD;&#xA;&#xD;&#xA;For example, Blackberry (*another Java-based mobile OS*) uses Java as the language of choice, and Research In Motion provides a set of libraries in the RIM package that helps me abstract things that I'd commonly do on my phone.&#xD;&#xA;&#xD;&#xA;You can use pure Java but most of the time you want to use the RIM libraries provided by RIM.&#xD;&#xA;&#xD;&#xA;If you're completely new to programming I would recommend first learning good Java principles - classes, methods, object-oriented programming, etc; then learning the Android API provided by Google. If you learn Android first you'll get confused quick and not follow good programming practices.&#xD;&#xA;&#xD;&#xA;I recommend starting with the book [Head First Java][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208" />
  <row Id="8501" PostHistoryTypeId="2" PostId="4290" RevisionGUID="e2428ec0-2a08-4acf-84cf-65d745ee76be" CreationDate="2010-10-04T20:38:18.123" UserId="666" Text="Pixie Plugins&#xD;&#xA;-------------&#xD;&#xA;&#xD;&#xA;The creators of [Contrasaurus][1] have released a lot of their individual components!!!&#xD;&#xA;&#xD;&#xA;They have code to do **matrix transformations**, **canvas abstractions** and many many more interesting things. &#xD;&#xA;&#xD;&#xA;Their **code is great** and their [libraries][2] are really useful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://contrasaurus.com/&#xD;&#xA;  [2]: http://pixie.strd6.com/developer/libraries" />
  <row Id="8502" PostHistoryTypeId="16" PostId="4290" RevisionGUID="e2428ec0-2a08-4acf-84cf-65d745ee76be" CreationDate="2010-10-04T20:38:18.123" UserId="-1" />
  <row Id="8503" PostHistoryTypeId="2" PostId="4291" RevisionGUID="2413ac90-ff31-4b71-9339-e81aef5ac5a6" CreationDate="2010-10-04T21:09:24.757" UserId="1477" Text="[Nolan Bushnell][1] gave a keynote at SIEGE this past weekend and talked about a similar issue with the original pong. You don't have to do alot of complicated calculations. If you hit on towards the left portion of hte panel, send the ball left. Do the same for the right side, and send it forward if it hits the middle. &#xD;&#xA;&#xD;&#xA;To start off with you can make each section just a third of the bar and the angle for the left and right sides 45 degrees. Once you finish the game you could if you want go back and make this more complicated but make this as simple as you can to begin with.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Nolan_Bushnell" />
  <row Id="8504" PostHistoryTypeId="2" PostId="4292" RevisionGUID="df73e1d1-25e1-4621-af71-325026314b4f" CreationDate="2010-10-04T21:57:18.743" UserId="20" Text="The fixed pipeline is rather limited. Something as simple as *Phong-Shading* already requires a shader (the shading capabilities of the fixed pipeline end with *Gouraud-Shading*). The possibilities that open up with shaders are huge. Some of them are: better shadowing-techniques, ambient-occlusion, normal-mapping, etc.&#xD;&#xA;&#xD;&#xA;That doesn't mean you can't create great looking games without shaders though. AFAIK [Torchlight](http://www.torchlightgame.com) only uses fixed pipeline and looks awesome. Also: If you're doing 2d graphics, you'll probably be fine with fixed pipeline only.  " />
  <row Id="8505" PostHistoryTypeId="5" PostId="4219" RevisionGUID="edd248db-599d-4c1f-8a93-a3f31d6309db" CreationDate="2010-10-04T22:00:46.883" UserId="1217" Comment="deleted 20 characters in body" Text="As the title suggests I'm developing a top down space game. &#xD;&#xA;&#xD;&#xA;I'm not looking to use newtonian physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that of FlatSpace 2 (awesome game). I can't figure out how to achieve this feeling with keyboard controls as opposed to mouse controls though. Any suggestions? &#xD;&#xA;&#xD;&#xA;I'm using Unity3d and C# or javaScript (unityScript or whatever is the correct term) works fine if you want to drop some code examples. &#xD;&#xA;&#xD;&#xA;Edit: Of course I should describe FlatSpace 2's control scheme, sorry. You hold the mouse button down and move the mouse in the direction you want the ship to move in. But it's not the controls I don't know how to do but rather the feeling of a mix of driving a car and flying an aircraft. It's really well made. Youtube link: [FlatSpace2 on iPhone][1] &#xD;&#xA;&#xD;&#xA;I'm not developing an iPhone game but the video shows the principle of the movement style.  &#xD;&#xA;[1]: http://www.youtube.com/watch?v=3dmSk-2sCpo&amp;feature=related" />
  <row Id="8506" PostHistoryTypeId="2" PostId="4293" RevisionGUID="92405bef-e0fc-4a50-9586-fc1c24ecbb97" CreationDate="2010-10-04T22:33:58.467" UserId="22" Text="I have been thinking for a while about making an online 2D RTS-like game. (2-6 players in a match, up to 50-60 units, no AI). The key thing here is that I want the game to be playable in a browser, so it'll have to be either flash or java applet, both using TCP sockets. At first I was entirely focused on flash because of a higher market penetration and accessibility. However, after reviewing different networking approaches I am unable to make a choice.  &#xD;&#xA;&#xD;&#xA;I really liked lock-step simulation approach where server and every client are running the exact same simulation, until I realized that it's going to be tough as hell (if not impossible) to implement exactly the same logic in two different languages, one of them being actionscript. This is where java comes in. With java client and server can share simulation related code - that may as well cut the development time in half.  &#xD;&#xA;&#xD;&#xA;But then there is another approach, where clients try to simulate (or rather extrapolate) the game state correctly as long as possible, but they don't have to do it right - at some point they are going to receive the full state snapshot an adjust accordingly. Flash looks like a viable option again, but still, lock-step simulation seems so much more straightforward, as there is no &quot;adjusting&quot; part.&#xD;&#xA;&#xD;&#xA;So are my assumptions correct? What would you suggest? " />
  <row Id="8507" PostHistoryTypeId="1" PostId="4293" RevisionGUID="92405bef-e0fc-4a50-9586-fc1c24ecbb97" CreationDate="2010-10-04T22:33:58.467" UserId="22" Text="Need help choosing the right networking approach/platform for an RTS" />
  <row Id="8508" PostHistoryTypeId="3" PostId="4293" RevisionGUID="92405bef-e0fc-4a50-9586-fc1c24ecbb97" CreationDate="2010-10-04T22:33:58.467" UserId="22" Text="&lt;network&gt;&lt;rts&gt;" />
  <row Id="8510" PostHistoryTypeId="2" PostId="4295" RevisionGUID="7786871a-b8ac-4b1f-bc59-55f298feb989" CreationDate="2010-10-05T00:37:04.317" UserId="1021" Text="I live in a large urban area and suspect there are groups of independent game developers that meet to discuss games and just hang out.  Are there any clubs or groups or associations or whatever for indie devs?" />
  <row Id="8511" PostHistoryTypeId="1" PostId="4295" RevisionGUID="7786871a-b8ac-4b1f-bc59-55f298feb989" CreationDate="2010-10-05T00:37:04.317" UserId="1021" Text="Where can I meet other independent game developers?" />
  <row Id="8512" PostHistoryTypeId="3" PostId="4295" RevisionGUID="7786871a-b8ac-4b1f-bc59-55f298feb989" CreationDate="2010-10-05T00:37:04.317" UserId="1021" Text="&lt;dev-groups&gt;&lt;game&gt;" />
  <row Id="8513" PostHistoryTypeId="2" PostId="4296" RevisionGUID="f29bb33e-94a6-4a3b-ab44-12b76d5989c7" CreationDate="2010-10-05T01:01:27.533" UserId="1288" Text="**Yes! Indie developers tend to be very social.** Without knowing which city you live in, it's tough to say what's available, but check out the IGDA's chapter list:&#xD;&#xA;&#xD;&#xA; - http://www.igda.org/chapters&#xD;&#xA;&#xD;&#xA;Though these events include students and non-indie industry members, your fellow indies will often be there in force. For example, here in Boston, we have the Boston Postmortem group which meets monthly:&#xD;&#xA;&#xD;&#xA; - http://www.bostonpostmortem.org/&#xD;&#xA;&#xD;&#xA;And there's a large enough dev scene in the Cambridge/Boston area such that we even have a monthly meeting specifically for indies:&#xD;&#xA;&#xD;&#xA; - http://www.facebook.com/pages/Boston-MA/Boston-Indies/293396506143&#xD;&#xA;&#xD;&#xA;Generally speaking, once you start networking with other local indies, you'll find out about everything that's going on in your city, whether you want to or not.&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="8514" PostHistoryTypeId="2" PostId="4297" RevisionGUID="acd7f61f-5f8c-49dd-9867-eb723cca0406" CreationDate="2010-10-05T01:07:28.753" UserId="953" Text="TIGSource has a forum for get-togethers at http://forums.tigsource.com/index.php?board=15.0" />
  <row Id="8515" PostHistoryTypeId="2" PostId="4298" RevisionGUID="3f4584e8-d83f-4b9d-a66b-5b2706a3a9ee" CreationDate="2010-10-05T02:46:12.963" UserId="1248" Text="I have been working on a game in Ogre for the last 6 months or so. It started as a learning project, and after a few rewrites it actually turned into a real game project. Physics scared me, and using Bullet with its lack of documentation was a nightmare, but I was able to atleast get some basics added and learned a lot. So as of now I am using Ogre with its default animation system (fairly basic) and Bullet Physics.&#xD;&#xA;&#xD;&#xA;I had always wanted to use Havok when I started out, but due to lack of integration information on the Ogre forums, and lack of tutorials on the net, I decided against it. Now that I am actually at the point where Bullet is just too much of a headache to proceed with (staring at forum threads praying someone answers) and the Ogre animation system is so basic, I am considering switching to Havok for Physics and Animation.&#xD;&#xA;&#xD;&#xA;The Physics system looks extremely polished and easy to use. The animation system looks incredible with the retargeting/blending/etc. The documentation is incredibly detailed as well (I guess when you come from Bullet, any documentation looks amazing)&#xD;&#xA;&#xD;&#xA;So my question is, as I am still somewhat of a 'newbie' to game development, should I just stick with what I am using now or should I make the switch over to Havok? The physics looks like I could get my project back to where it is now with minimal effort, and be able to expand much faster. The animation aspect looks extremely daunting as far as integrating it with Ogre." />
  <row Id="8516" PostHistoryTypeId="1" PostId="4298" RevisionGUID="3f4584e8-d83f-4b9d-a66b-5b2706a3a9ee" CreationDate="2010-10-05T02:46:12.963" UserId="1248" Text="Change from Bullet/OgreAnim to Havok?" />
  <row Id="8517" PostHistoryTypeId="3" PostId="4298" RevisionGUID="3f4584e8-d83f-4b9d-a66b-5b2706a3a9ee" CreationDate="2010-10-05T02:46:12.963" UserId="1248" Text="&lt;c++&gt;&lt;ogre&gt;&lt;havok&gt;" />
  <row Id="8518" PostHistoryTypeId="16" PostId="4295" RevisionGUID="cb0d5033-95d8-4cd5-8ec5-a80c5307e592" CreationDate="2010-10-05T02:48:27.607" UserId="1021" />
  <row Id="8520" PostHistoryTypeId="2" PostId="4299" RevisionGUID="b2c2b947-42f5-4072-afbf-15b2c4c7ef0a" CreationDate="2010-10-05T03:59:08.897" UserId="1477" Text="http://gamedev.meetup.com/" />
  <row Id="8521" PostHistoryTypeId="16" PostId="4299" RevisionGUID="b2c2b947-42f5-4072-afbf-15b2c4c7ef0a" CreationDate="2010-10-05T03:59:08.897" UserId="-1" />
  <row Id="8522" PostHistoryTypeId="2" PostId="4300" RevisionGUID="8a1d3a58-d4f1-4578-acbd-2af5090c3459" CreationDate="2010-10-05T04:32:10.080" UserId="2156" Text="If you're in NYC: http://www.nycgameindustry.com/" />
  <row Id="8523" PostHistoryTypeId="16" PostId="4300" RevisionGUID="8a1d3a58-d4f1-4578-acbd-2af5090c3459" CreationDate="2010-10-05T04:32:10.080" UserId="-1" />
  <row Id="8524" PostHistoryTypeId="2" PostId="4301" RevisionGUID="64fbc35d-99a5-4739-b70c-22f544768f65" CreationDate="2010-10-05T06:43:23.630" UserId="2272" Text="Every RTS that I know of uses lock-step simulation for it's network model, more or less for the same reasons:&#xD;&#xA;&#xD;&#xA;With lock-step you only need to exchange inputs which drastically reduces the amount of bandwidth required.  If you were to use the interpolation/extrapolation approach, with 60 units x 6 players worth of state x 6 players to send to - whoever is hosting will need a lot of upstream bandwidth.&#xD;&#xA; &#xD;&#xA;Furthermore, with lock-step you guarantee that everyone sees exactly the same things happen which is very important for an RTS to feel fair and be strategic.  In the extrapolation case you could see on your screen that you're winning a battle only to find upon receiving a new snapshot that you've actually lost.  And the worst case is that you could've won that battle if only you knew you were losing it.&#xD;&#xA;&#xD;&#xA;One final benefit, lock-step makes cheating harder since anything shady you do locally will cause a desync.  You would have to cheat everyone's simulation not just your own.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" />
  <row Id="8525" PostHistoryTypeId="2" PostId="4302" RevisionGUID="500971c1-7f7f-488b-8fc5-4257cce4b8cd" CreationDate="2010-10-05T08:19:01.503" UserId="2360" Text="As long as I understand you have two problems:&lt;br/&gt;&#xD;&#xA;1- you don't exactly know where the curves begin end or their functions.&lt;br/&gt;&#xD;&#xA;2- where your characters feet touch.&#xD;&#xA;&#xD;&#xA;If your characters collision behavior means just its Y position and keep its feet above the curve then:&#xD;&#xA;&#xD;&#xA; 1. Get your characters begin X and end X. Let's say x1,x2 to these.&#xD;&#xA; 2. Assuming you don't know what background there's someway you should get the image pixel data from the background falling between x1 and x2.&#xD;&#xA; 3. Then apply an edge detection algorithm(you may find immense number of libraries and code snippets around) to your partial background.&#xD;&#xA; 4. Edge detection will provide the edges of your background in white or black so looping down from the max y value of your platform you can find where the first edge pixel is. You may threshold the resulting edge detected image for better results.&#xD;&#xA; 5. Place your charater where the first edge is found.&#xD;&#xA;&#xD;&#xA;Note that if your curves on the background are very ambiguous edge detection may fail but I think this solution will be a swift and adequate one." />
  <row Id="8526" PostHistoryTypeId="2" PostId="4303" RevisionGUID="ce17b4c3-7cc9-4fa9-918b-fcd30c30346f" CreationDate="2010-10-05T08:26:52.603" UserId="142" Text="In San Francisco:&#xD;&#xA;&#xD;&#xA;http://www.meetup.com/sfgamedevelopers/&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;http://www.unknownworlds.com/postmortem&#xD;&#xA;&#xD;&#xA;Both very active monthly meetups." />
  <row Id="8527" PostHistoryTypeId="16" PostId="4303" RevisionGUID="ce17b4c3-7cc9-4fa9-918b-fcd30c30346f" CreationDate="2010-10-05T08:26:52.603" UserId="-1" />
  <row Id="8528" PostHistoryTypeId="2" PostId="4304" RevisionGUID="59ccafaa-bf1b-40cf-a018-6533995f01b8" CreationDate="2010-10-05T11:00:28.287" UserId="1141" Text="Your structure is potentially faster as long as nothing which needs a position (this includes path finding or finding out the distance to places halfway across the planet) crosses the section boundaries all that often - in other words, if all your algorithms and procedures have a strong *locality* to them. If your use case is the other way around, I'd suggest storing the position in precise, global uint32 values (which would have about a centimetre precision) and storing a float (or even just float16 if your hardware supports it) *displacement* value from this position for display on screen, local physics simulation and similar cases." />
  <row Id="8529" PostHistoryTypeId="5" PostId="4243" RevisionGUID="02e01256-071b-4421-9c1d-4d2f0b20ec14" CreationDate="2010-10-05T11:27:23.460" UserId="1367" Comment="deleted 4 characters in body" Text="As Martin mentioned, the UDK is probably the fastest way to get something working as it comes with so many premade things like AI, models and also a wealth of books. It has a very good map editor, and the language is Java-esque (and ECMA-script like).&#xD;&#xA;&#xD;&#xA;An alternative might be to try doing games in Flash or Silverlight - start off with simple 2D games. Whatever genre of games he likes dictates the toolkit." />
  <row Id="8530" PostHistoryTypeId="2" PostId="4305" RevisionGUID="7088d2c4-4547-4ed3-bfd6-d82fa863adc6" CreationDate="2010-10-05T11:47:07.567" UserId="916" Text="I choose Lua. Only having the possibility of insert some check functions in the last moment or to prototype some features is more than enough for me. However I'm assuming that performance isn't an issue because we are working in a network environment." />
  <row Id="8531" PostHistoryTypeId="2" PostId="4306" RevisionGUID="7c6c3e17-a845-450f-80c3-054226c9fa3b" CreationDate="2010-10-05T12:10:10.790" UserId="2408" Text="I have started to read up about the web technology available for doing web-based game with only Javascript, but I have no where got feedback about SVG with HTML5. Is is a viable choice ? Does it performs well compared to other technique like Canvas, DOM &amp; CSS Transformation, etc." />
  <row Id="8532" PostHistoryTypeId="1" PostId="4306" RevisionGUID="7c6c3e17-a845-450f-80c3-054226c9fa3b" CreationDate="2010-10-05T12:10:10.790" UserId="2408" Text="Is SVG a viable technology choice for web-based game ?" />
  <row Id="8533" PostHistoryTypeId="3" PostId="4306" RevisionGUID="7c6c3e17-a845-450f-80c3-054226c9fa3b" CreationDate="2010-10-05T12:10:10.790" UserId="2408" Text="&lt;performance&gt;&lt;web&gt;" />
  <row Id="8534" PostHistoryTypeId="2" PostId="4307" RevisionGUID="cbdf7ae3-fb94-4d16-8e57-7994d2c4c6ea" CreationDate="2010-10-05T12:49:22.567" UserDisplayName="Sergio" Text="Take a look at [this website][1] to see SVG compatibility. Right now it's dodgy at best and I wouldn't recommend it for anything other than test demos for showcases.&#xD;&#xA;&#xD;&#xA;Don't expect people to use the latest and greatest browser.&#xD;&#xA;&#xD;&#xA;I think using SVG would be a huge mistake and will shy your users away when they see things broken.&#xD;&#xA;&#xD;&#xA;  [1]: http://caniuse.com/#cats=SVG&amp;statuses=rec,pr,cr,wd,ietf" />
  <row Id="8535" PostHistoryTypeId="2" PostId="4308" RevisionGUID="7a67460d-c3d2-492f-ab8b-dba1cf174ac4" CreationDate="2010-10-05T13:14:08.530" UserId="2360" Text="&#xD;&#xA;I wonder what kind of animation techniques are used for creature and character animation in modern **hack&amp;slash type tile based** games? Keyframing for different actions may be one option. Skeletal framing may be another. But how about the physics? Or do they use a totally hybrid system of inverse kinematics supported with a skeleton,physics and mixed with interpolated keyframing for more realistic animations? If so, how and for what reasons? I can think of many different solutions for the issues below but I wonder what's used and best suited for issues like:&#xD;&#xA;&#xD;&#xA; 1. Walking or moving on an uneven terrain&#xD;&#xA; 2. Combat interaction, combat physics and collisions&#xD;&#xA; 3. Attaching rigid items to character and their iteractions ih physics world&#xD;&#xA; 4. Soft body dynamics like hair, vegetation, clothes and fabric in line with animations and iteractions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8536" PostHistoryTypeId="1" PostId="4308" RevisionGUID="7a67460d-c3d2-492f-ab8b-dba1cf174ac4" CreationDate="2010-10-05T13:14:08.530" UserId="2360" Text="What are the common character animation techniques used in tile based hack&amp;slash games?" />
  <row Id="8537" PostHistoryTypeId="3" PostId="4308" RevisionGUID="7a67460d-c3d2-492f-ab8b-dba1cf174ac4" CreationDate="2010-10-05T13:14:08.530" UserId="2360" Text="&lt;game-design&gt;&lt;3d&gt;&lt;physics&gt;&lt;animation&gt;&lt;tiles&gt;" />
  <row Id="8538" PostHistoryTypeId="2" PostId="4309" RevisionGUID="278c0446-b42c-496d-9bca-f25d3e63fa5a" CreationDate="2010-10-05T13:16:32.550" UserId="2229" Text="This article describes in general, how to draw sharp OpenGL 2D graphics, using fixed function pipeline.&#xD;&#xA;&#xD;&#xA; - http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Because OpenGL ES 2.0 has some ES 1.x functions not available (such as: glOrtho()), their functionality must be substituted in Fragment/Vertex shaders.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My question is, how to setup the following 2D projection in programmable function pipeline?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const XSize = 640, YSize = 480&#xD;&#xA;    glMatrixMode (GL_PROJECTION)&#xD;&#xA;    glLoadIdentity ();&#xD;&#xA;    glOrtho (0, XSize, YSize, 0, 0, 1)&#xD;&#xA;    glMatrixMode (GL_MODELVIEW)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How Fragment and Vertex shaders must be configured to fully substitute the above mentioned fixed function 2D projection setup?&#xD;&#xA;" />
  <row Id="8539" PostHistoryTypeId="1" PostId="4309" RevisionGUID="278c0446-b42c-496d-9bca-f25d3e63fa5a" CreationDate="2010-10-05T13:16:32.550" UserId="2229" Text="OpenGL ES 2.0: Setting up 2D Projection" />
  <row Id="8540" PostHistoryTypeId="3" PostId="4309" RevisionGUID="278c0446-b42c-496d-9bca-f25d3e63fa5a" CreationDate="2010-10-05T13:16:32.550" UserId="2229" Text="&lt;game-design&gt;&lt;2d&gt;&lt;shaders&gt;&lt;graphics-programming&gt;&lt;opengl-es&gt;" />
  <row Id="8541" PostHistoryTypeId="2" PostId="4310" RevisionGUID="3f25f32d-0cec-48dd-82a2-e75c6ad52299" CreationDate="2010-10-05T13:41:16.373" UserId="189" Text="You would be much better off using Canvas. Neither of them are supported in IE, and canvas is known to be a viable web-based game technology; plus it has decent rendering speed, especially in Chrome (and apparently also in IE9, according to the early demos; I haven't tried it recently). If you need to target older versions of IE and/or mobile platforms, stick to plain old DOM, which doesn't have very good performance but it's still acceptable for simple games (e.g. [Pacman][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/pacman/" />
  <row Id="8542" PostHistoryTypeId="2" PostId="4311" RevisionGUID="3b966f1e-1047-4442-8ad7-4e21f69d5cce" CreationDate="2010-10-05T14:03:36.320" UserId="1352" Text="So if I understand correctly, you want left and right arrows to turn your ship, and up and down arrows to control thrust.&#xD;&#xA;&#xD;&#xA;I have implemented this control scheme in a space shooter prototype I made once.&#xD;&#xA;&#xD;&#xA;The below code is very naive non-language specific code example. Don't take it too literally.&#xD;&#xA;&#xD;&#xA;    update( deltaTime ) &#xD;&#xA;    {&#xD;&#xA;       &#xD;&#xA;       if( leftButtonPressed ) &#xD;&#xA;       { &#xD;&#xA;          directionModifier = 1&#xD;&#xA;       }&#xD;&#xA;       else if ( rightButtonPressed ) {&#xD;&#xA;          directionModifier = -1&#xD;&#xA;       }&#xD;&#xA;       else {&#xD;&#xA;         directionModifier = 0;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       shipRotationAngle += ( shipRotationSpeed * directionModifier ) * deltaTime;&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;       if( upButtonPressed ) {&#xD;&#xA;         thrustModifier = 1&#xD;&#xA;       }&#xD;&#xA;       else if( downButtonPressed ) {&#xD;&#xA;         thrustModifier = -1&#xD;&#xA;       }&#xD;&#xA;       else {&#xD;&#xA;         thrustModifier = 0&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;       accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) - friction ) * deltaTime&#xD;&#xA;&#xD;&#xA;       directionVector = Vector2( cos( shipRotationAngle ), sin ( shipRotationAngle ) )&#xD;&#xA;       accelerationVector = Vector2( directionVector.x * accelerationModifier, directionVector.y * accelerationModifier )&#xD;&#xA;&#xD;&#xA;       shipSpeedVector += accelerationVector&#xD;&#xA;&#xD;&#xA;       //IMPORTANT: (I'm too lazy to add code here) Cap speedvector to a maximum speed.&#xD;&#xA;       //Remember to cap total speed, not just X and Y components of the speedVector &#xD;&#xA;       &#xD;&#xA;       &#xD;&#xA;       shipPositionVector += shipSpeedVector&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8543" PostHistoryTypeId="5" PostId="4311" RevisionGUID="fef93dde-4af9-4942-9aef-303c9fb545a7" CreationDate="2010-10-05T14:20:54.423" UserId="1352" Comment="added 206 characters in body" Text="So if I understand correctly, you want left and right arrows to turn your ship, and up and down arrows to control thrust.&#xD;&#xA;&#xD;&#xA;I have implemented this control scheme in a space shooter prototype I made once.&#xD;&#xA;&#xD;&#xA;The below code is very naive non-language specific code example. Don't take it too literally.&#xD;&#xA;&#xD;&#xA;EDIT: OOps, the code doesn't cap negative acceleration caused by friction. So the ship will actually start going backwards after a while. No matter, it's just a dirty example of how things could work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    update( deltaTime ) &#xD;&#xA;    {&#xD;&#xA;       &#xD;&#xA;       if( leftButtonPressed ) &#xD;&#xA;       { &#xD;&#xA;          directionModifier = 1&#xD;&#xA;       }&#xD;&#xA;       else if ( rightButtonPressed ) {&#xD;&#xA;          directionModifier = -1&#xD;&#xA;       }&#xD;&#xA;       else {&#xD;&#xA;         directionModifier = 0;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       shipRotationAngle += ( shipRotationSpeed * directionModifier ) * deltaTime;&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;       if( upButtonPressed ) {&#xD;&#xA;         thrustModifier = 1&#xD;&#xA;       }&#xD;&#xA;       else if( downButtonPressed ) {&#xD;&#xA;         thrustModifier = -1&#xD;&#xA;       }&#xD;&#xA;       else {&#xD;&#xA;         thrustModifier = 0&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;       accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) - friction ) * deltaTime&#xD;&#xA;&#xD;&#xA;       directionVector = Vector2( cos( shipRotationAngle ), sin ( shipRotationAngle ) )&#xD;&#xA;       accelerationVector = Vector2( directionVector.x * accelerationModifier, directionVector.y * accelerationModifier )&#xD;&#xA;&#xD;&#xA;       shipSpeedVector += accelerationVector&#xD;&#xA;&#xD;&#xA;       //IMPORTANT: (I'm too lazy to add code here) Cap speedvector to a maximum speed.&#xD;&#xA;       //Remember to cap total speed, not just X and Y components of the speedVector &#xD;&#xA;       &#xD;&#xA;       &#xD;&#xA;       shipPositionVector += shipSpeedVector&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8544" PostHistoryTypeId="5" PostId="4311" RevisionGUID="d4c71808-b255-430b-87b9-edef6ae22052" CreationDate="2010-10-05T14:27:43.743" UserId="1352" Comment="added 256 characters in body" Text="So if I understand correctly, you want left and right arrows to turn your ship, and up and down arrows to control thrust.&#xD;&#xA;&#xD;&#xA;I have implemented this control scheme in a space shooter prototype I made once.&#xD;&#xA;&#xD;&#xA;The below code is very naive non-language specific code example. Don't take it too literally.&#xD;&#xA;&#xD;&#xA;EDIT: OOps, the code doesn't cap negative acceleration caused by friction. So the ship will actually start going backwards after a while. So changed the &quot;code&quot; a bit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    update( deltaTime ) &#xD;&#xA;    {&#xD;&#xA;       &#xD;&#xA;       if( leftButtonPressed ) &#xD;&#xA;       { &#xD;&#xA;          directionModifier = 1&#xD;&#xA;       }&#xD;&#xA;       else if ( rightButtonPressed ) {&#xD;&#xA;          directionModifier = -1&#xD;&#xA;       }&#xD;&#xA;       else {&#xD;&#xA;         directionModifier = 0;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       shipRotationAngle += ( shipRotationSpeed * directionModifier ) * deltaTime;&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;       if( upButtonPressed ) {&#xD;&#xA;         thrustModifier = 1&#xD;&#xA;       }&#xD;&#xA;       else if( downButtonPressed ) {&#xD;&#xA;         thrustModifier = -1&#xD;&#xA;       }&#xD;&#xA;       else {&#xD;&#xA;         thrustModifier = 0&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;       accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) ) * deltaTime&#xD;&#xA;&#xD;&#xA;       directionVector = Vector2( cos( shipRotationAngle ), sin ( shipRotationAngle ) )&#xD;&#xA;       accelerationVector = Vector2( directionVector.x * accelerationModifier, directionVector.y * accelerationModifier )&#xD;&#xA;       &#xD;&#xA;       // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;       frictionVector = -directionVector * shipFriction&#xD;&#xA;&#xD;&#xA;       shipSpeedVector += accelerationVector&#xD;&#xA;&#xD;&#xA;       // APPLY friction vector to shipSpeedVector&#xD;&#xA;       // Make sure that friction vector doesn't speed to go in the opposite of the &#xD;&#xA;       // original direction. Otherwise your ship will go backwards instead of stop.&#xD;&#xA;&#xD;&#xA;       //IMPORTANT: (I'm too lazy to add code here) Cap speedvector to a maximum speed.&#xD;&#xA;       //Remember to cap total speed, not just X and Y components of the speedVector &#xD;&#xA;       &#xD;&#xA;       &#xD;&#xA;       shipPositionVector += shipSpeedVector&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8545" PostHistoryTypeId="2" PostId="4312" RevisionGUID="4757efb4-5584-4c17-a183-c70d6951e94b" CreationDate="2010-10-05T14:35:51.703" UserId="1374" Text="From the glOrtho doc, with values substituted:&#xD;&#xA;&#xD;&#xA;             2&#xD;&#xA;        ------------       0              0             -1&#xD;&#xA;           XSize&#xD;&#xA;                           2&#xD;&#xA;            0         ------------        0              1&#xD;&#xA;                       - Ysize&#xD;&#xA;            0              0              -2            -1&#xD;&#xA;            0              0              0              1&#xD;&#xA;&#xD;&#xA;Store this matrix in a uniform, and you can then apply it (ie do the M . v product) to your incoming vertex positions. &#xD;&#xA;" />
  <row Id="8546" PostHistoryTypeId="2" PostId="4313" RevisionGUID="14757e48-db22-4461-b5b3-d9551c0ef33b" CreationDate="2010-10-05T15:23:59.927" UserId="458" Text="I would roughly divide game development tools into three broad categories:&#xD;&#xA;&#xD;&#xA; 1. Easy to learn and use, but limited. Game Maker, Game Salad, RPG Maker, Adventure Game Studio all fall into this category.&#xD;&#xA; 2. Powerful, but with a steep learning curve. C++ and other &quot;hardcore&quot; programming languages fit here.&#xD;&#xA; 3. Intermediate languages, generally scripting languages like Lua, Python, and ActionScript, which split the difference by requiring you to actually write some code but taking care of the more obscure details like memory management for you.&#xD;&#xA;&#xD;&#xA;For people with no programming experience, I usually advise they start in the first category, just to get started doing SOMETHING. When they feel comfortable with a given authoring tool but are really feeling like the limitations are outweighing the benefits, it's time to learn something in the next category up." />
  <row Id="8547" PostHistoryTypeId="2" PostId="4314" RevisionGUID="df446cf2-1365-4c8c-a5dd-628aaf5c1c2c" CreationDate="2010-10-05T15:31:45.590" UserId="2413" Text="I am a huge MUD games fans. Though, MMORPG's rising popularity gives text-based games a strong opponents that they can't match.&#xD;&#xA;&#xD;&#xA;I started my own MUD engine (codebase) a while ago and I'm now looking for various ideas or features you guys have encountered in various games.&#xD;&#xA;&#xD;&#xA;I have come across various ideas so far :&#xD;&#xA;&#xD;&#xA;   1. A kind of GTA's wanted stars systems. Guards of different strenghts will comes for you.&#xD;&#xA;   2. The MUD game I'm familiar with do not have the abilities to attack someone in a room foreward. This could be fun when playing a ranged/spell caster class.&#xD;&#xA;&#xD;&#xA;Please note that I'm looking ideas for a medieval/fantasy theme MUD.&#xD;&#xA;&#xD;&#xA;What else ?&#xD;&#xA;&#xD;&#xA;I am aware that there is no good answer for my question and I'm not allowed to post Community Wiki yet." />
  <row Id="8548" PostHistoryTypeId="1" PostId="4314" RevisionGUID="df446cf2-1365-4c8c-a5dd-628aaf5c1c2c" CreationDate="2010-10-05T15:31:45.590" UserId="2413" Text="MUD Games ideas" />
  <row Id="8549" PostHistoryTypeId="3" PostId="4314" RevisionGUID="df446cf2-1365-4c8c-a5dd-628aaf5c1c2c" CreationDate="2010-10-05T15:31:45.590" UserId="2413" Text="&lt;game-design&gt;&lt;old-school&gt;" />
  <row Id="8550" PostHistoryTypeId="2" PostId="4315" RevisionGUID="ba2a7224-ec65-4e9d-8b15-7cee237ed4af" CreationDate="2010-10-05T15:33:29.977" UserId="458" Text="The pitfall here, as far as I can see, is that you're treating programming and game design as the same task, when really they are separate tasks. As you suggest, this isn't a programming or algorithmic problem (you can code the battle system any way you want), it's about what is fun and interesting to the player.&#xD;&#xA;&#xD;&#xA;The answer is, look up resources on game design and game balance. There are actually universities that devote an entire four-year program of study to the topics you're raising, so just giving you a quick-and-dirty answer is impossible (the same way that you'd probably be stumped if someone said &quot;yeah, I've got this idea for a game but I don't know how to program it, what should I watch out for?&quot;). There are books, courses, and online writings out there about game design; seek them out." />
  <row Id="8551" PostHistoryTypeId="2" PostId="4316" RevisionGUID="9f6f7340-bd7d-4369-b6bc-084056604406" CreationDate="2010-10-05T15:43:49.633" UserId="458" Text="Coming from the C++ world, the general idea for changing languages on the fly is to have all language text in memory in a table somewhere, with each string (or sprite that contains text) assigned a numeric ID. All IDs are the same in different languages, plus a language offset. For example:&#xD;&#xA;&#xD;&#xA;const LANG_EN:int = 0;&#xD;&#xA;const LANG_DE:int = 1000;&#xD;&#xA;&#xD;&#xA;const STRING_HELLO_WORLD:int = 0;&#xD;&#xA;&#xD;&#xA;var StringTable:array /* of string */;&#xD;&#xA;StringTable[STRING_HELLO_WORLD+LANG_EN] = &quot;Hello, World!&quot;&#xD;&#xA;StringTable[STRING_HELLO_WORLD+LANG_DE] = &quot;Hallo, Veldt!&quot;&#xD;&#xA;&#xD;&#xA;This takes considerable setup time, granted, but it only has to be done once.&#xD;&#xA;&#xD;&#xA;Then, in your code, you just reference the table using the string and current language offset:&#xD;&#xA;myObject.text = StringTable[STRING_HELLO_WORLD+currentLanguage];" />
  <row Id="8552" PostHistoryTypeId="16" PostId="4316" RevisionGUID="9f6f7340-bd7d-4369-b6bc-084056604406" CreationDate="2010-10-05T15:43:49.633" UserId="-1" />
  <row Id="8553" PostHistoryTypeId="16" PostId="4314" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-05T15:50:28.417" UserId="14" />
  <row Id="8554" PostHistoryTypeId="2" PostId="4317" RevisionGUID="7f3a91d3-233c-48f1-8615-319162c0b07c" CreationDate="2010-10-05T15:51:03.677" UserId="458" Text="While you're at it, there's the question of whether a high score is simply a player who found an exploit (for example, if some things in the game give a score penalty, and a bug causes a negative score to &quot;wrap around&quot; to become highly positive... or just a player who finds a certain game condition like a safe spot on the board where they can just sit there and not have to worry about losing, indefinitely).&#xD;&#xA;&#xD;&#xA;In order to tell the difference between a hack and a game exploit, uploading at least some play data would be good. It'll help you fix the exploits, at least.&#xD;&#xA;&#xD;&#xA;For some games (particularly turn-based ones), you can actually have the game played through the server, where all of the game logic exists on the server side and the client is just an interface. This not only makes score hacking a lot harder, but it also enables you to log all player actions on the server trivially, and thus replay any game at any time. I realize for something like a twitch action shooter, this might be impractical." />
  <row Id="8555" PostHistoryTypeId="2" PostId="4318" RevisionGUID="6ffd7602-b521-485b-9c9a-c086991c3e85" CreationDate="2010-10-05T17:05:30.763" UserId="2289" Text="So far, in my rhythm game, I've been using XNA's Content Pipeline for loading static resources in my app (videos, sound effects, etc). However, down the road I'd want to allow user to create their own themes, as well as making custom notecharts for whatever songs they'd like to play. Is there any way to load say, a Texture2D or Video object, from disk without using the Content Pipeline, given a file path to the resource?" />
  <row Id="8556" PostHistoryTypeId="1" PostId="4318" RevisionGUID="6ffd7602-b521-485b-9c9a-c086991c3e85" CreationDate="2010-10-05T17:05:30.763" UserId="2289" Text="Programatically loading fonts, textures, and media in XNA" />
  <row Id="8557" PostHistoryTypeId="3" PostId="4318" RevisionGUID="6ffd7602-b521-485b-9c9a-c086991c3e85" CreationDate="2010-10-05T17:05:30.763" UserId="2289" Text="&lt;xna&gt;&lt;c#&gt;&lt;resources&gt;" />
  <row Id="8558" PostHistoryTypeId="2" PostId="4319" RevisionGUID="8051aa2e-c54b-4dd7-9e1a-862a06c71ede" CreationDate="2010-10-05T17:06:24.613" UserId="1598" Text="There is also gameQuery, a jQuery based game engine.  Has decent documentation on their API, as well as, a few sound wrapper APIs they link to on their site.&#xD;&#xA;&#xD;&#xA;http://gamequery.onaluf.org/" />
  <row Id="8559" PostHistoryTypeId="16" PostId="4319" RevisionGUID="8051aa2e-c54b-4dd7-9e1a-862a06c71ede" CreationDate="2010-10-05T17:06:24.613" UserId="-1" />
  <row Id="8560" PostHistoryTypeId="2" PostId="4320" RevisionGUID="b5e86f09-c40c-43e3-bf34-ae211703cff4" CreationDate="2010-10-05T17:13:54.830" UserId="189" Text="**Please include a good crafting system!**&#xD;&#xA;&#xD;&#xA;I find fighting to be boring and crafting to be somehow entertaining. I know many people feel the opposite, thus the popularity of MMOs like WoW and Guild Wars which focus almost entirely on combat. But please don't neglect to have a nice crafting system in your MUD for people like me. I know I'm not alone! It's just so rewarding to take raw materials and make useful things out of them, even if it's just a game and the actual action of making something might just be a click or a word.&#xD;&#xA;&#xD;&#xA;I don't have quite enough MUD-playing experience to know for sure though. Maybe crafting wouldn't be the same in a MUD. If that's the case then just ignore me. :)" />
  <row Id="8561" PostHistoryTypeId="16" PostId="4320" RevisionGUID="b5e86f09-c40c-43e3-bf34-ae211703cff4" CreationDate="2010-10-05T17:13:54.830" UserId="-1" />
  <row Id="8562" PostHistoryTypeId="2" PostId="4321" RevisionGUID="d558f108-031d-4a5f-8d40-b0d918128259" CreationDate="2010-10-05T17:16:58.240" UserId="189" Text="Use the [`Texture2D.FromFile`][1] method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb196945%28XNAGameStudio.31%29.aspx" />
  <row Id="8563" PostHistoryTypeId="12" PostId="4321" RevisionGUID="420fc8d5-5bef-492f-ab19-809000e5fe32" CreationDate="2010-10-05T17:18:37.253" UserId="189" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="8564" PostHistoryTypeId="5" PostId="4318" RevisionGUID="795c44c4-3473-455d-907e-a8a41f46ec37" CreationDate="2010-10-05T17:20:02.533" UserId="2289" Comment="Fixed minor spelling errors" Text="So far, in my rhythm game, I've been using XNA's Content Pipeline for loading static resources in my app (videos, sound effects, etc). However, down the road I'd want to allow users to create their own themes, as well as making custom notecharts for whatever songs they'd like to play. Is there any way to load say, a Texture2D or Video object, from disk without using the Content Pipeline, given a file path to the resource?" />
  <row Id="8565" PostHistoryTypeId="13" PostId="4321" RevisionGUID="5588095f-87a4-4bce-a5bd-faa1b69363c1" CreationDate="2010-10-05T17:20:44.813" UserId="189" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="8566" PostHistoryTypeId="5" PostId="4321" RevisionGUID="840c22a9-e272-450d-97f8-a4ed817c75c6" CreationDate="2010-10-05T17:22:11.283" UserId="189" Comment="added 172 characters in body; added 192 characters in body; added 16 characters in body" Text="Use the [`Texture2D.FromFile`][1] method; for the first parameter, give it your `GraphicsDevice` which is a property of the `Game` class (so from within a method of the Game class, just use `this.GraphicsDevice`).&#xD;&#xA;&#xD;&#xA;Unfortunately only `Texture2D` objects can be loaded this way; [a `Video` object is not so easy to load][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb196945%28XNAGameStudio.31%29.aspx&#xD;&#xA;  [2]: http://stackoverflow.com/questions/1949264/how-to-load-a-video-from-file-in-xna-pc-only" />
  <row Id="8567" PostHistoryTypeId="5" PostId="4318" RevisionGUID="0482a543-ce56-4e21-b97b-7c9c39a136fb" CreationDate="2010-10-05T17:37:47.057" UserId="2289" Comment="added 91 characters in body" Text="So far, in my rhythm game, I've been using XNA's Content Pipeline for loading static resources in my app (videos, sound effects, etc). However, down the road I'd want to allow users to create their own themes, as well as making custom notecharts for whatever songs they'd like to play. Is there any way to load say, a Texture2D or Video object, from disk without using the Content Pipeline, given a file path to the resource?&#xD;&#xA;&#xD;&#xA;**EDIT**: Even thought this is XNA, I'm targeting Windows only (no Zune, WP7, or Xbox)." />
  <row Id="8568" PostHistoryTypeId="2" PostId="4322" RevisionGUID="5b4607ad-ebf1-4fc3-9640-facea9e1ec7c" CreationDate="2010-10-05T18:55:28.953" UserId="2150" Text="It's entirely possible to run the content build process at runtime using MSBuild.  The following sample shows you basically how to do it:  http://creators.xna.com/en-GB/sample/winforms_series2.  This particular example uses windows forms, but there is nothing preventing you from doing the same thing in an actual game.&#xD;&#xA;&#xD;&#xA;The big problem is that the content pipeline assembly (which is where all the processors/importers/build tasks necessary for building are) is not included in the XNA Framework redistributable.  This means that in order to actually create and/or load custom content your users would need to install whatever version of XNA Game Studio your game was built with.  They would never need to actually use any of the software included in it, but they would need to install it.  Depending on your game and who you expect to be creating and using custom content this may or may not be acceptable." />
  <row Id="8569" PostHistoryTypeId="5" PostId="4291" RevisionGUID="af7f0c9b-8cbf-4184-a60d-211499fe3be5" CreationDate="2010-10-05T19:22:17.157" UserId="1477" Comment="deleted 84 characters in body" Text="[Nolan Bushnell][1] gave a keynote at SIEGE this past weekend and talked about a similar issue with the original pong. You don't have to do alot of complicated calculations. If you hit on towards the left portion of hte panel, send the ball left. Do the same for the right side. &#xD;&#xA;&#xD;&#xA;To start off with you can make the angle for the left and right sides 45 degrees. Once you finish the game you could if you want go back and make this more complicated but make this as simple as you can to begin with.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Nolan_Bushnell" />
  <row Id="8570" PostHistoryTypeId="2" PostId="4323" RevisionGUID="ea920f62-4552-439d-a65a-e6d01693cccb" CreationDate="2010-10-05T20:58:40.973" UserId="2418" Text="Impact is going to be sick! Just take a look at the demo game, [Biolab Disaster][1].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.phoboslab.org/biolab/" />
  <row Id="8571" PostHistoryTypeId="16" PostId="4323" RevisionGUID="ea920f62-4552-439d-a65a-e6d01693cccb" CreationDate="2010-10-05T20:58:40.973" UserId="-1" />
  <row Id="8572" PostHistoryTypeId="2" PostId="4324" RevisionGUID="dfdfe9da-5401-434a-8b70-f160ebbd4016" CreationDate="2010-10-05T21:16:41.787" UserId="2188" Text="Don't try to do the same things that a MMORPG does, because you'll be no match. Try to be different.&#xD;&#xA;&#xD;&#xA;1) no real time action: that's really horrible in a MUD, people will run away; do everything turn-based&#xD;&#xA;&#xD;&#xA;2) a lot of roleplay and narration will help&#xD;&#xA;&#xD;&#xA;3) user-created content will be a key feature" />
  <row Id="8573" PostHistoryTypeId="16" PostId="4324" RevisionGUID="dfdfe9da-5401-434a-8b70-f160ebbd4016" CreationDate="2010-10-05T21:16:41.787" UserId="-1" />
  <row Id="8574" PostHistoryTypeId="2" PostId="4325" RevisionGUID="5a94eff0-613d-4572-92ca-8f76270892b0" CreationDate="2010-10-05T22:41:44.063" UserId="2419" Text="These guys have been promising to put some code up for a bit.  So this doesn't quite answer your question, but it might be something worth tuning into later.&#xD;&#xA;&#xD;&#xA;http://www.iryokufx.com/mlaa/&#xD;&#xA;" />
  <row Id="8575" PostHistoryTypeId="16" PostId="4325" RevisionGUID="5a94eff0-613d-4572-92ca-8f76270892b0" CreationDate="2010-10-05T22:41:44.063" UserId="-1" />
  <row Id="8576" PostHistoryTypeId="2" PostId="4326" RevisionGUID="036e53f4-2f55-4848-ad90-687a684dc195" CreationDate="2010-10-05T23:39:18.900" UserId="721" Text="In my OpenGL ES 2.X engine, i compute the MVP matrix (Model View Projection) on CPU Side&#xD;&#xA;and inject it in vertex shader.&#xD;&#xA;&#xD;&#xA;The Orthogonal projection is a [4*4 matrix][1]. When i have the MVP, i inject it in the&#xD;&#xA;vertex shader with:&#xD;&#xA;&#xD;&#xA;     mMvpLoc = getUniformLocation(&quot;uMvp&quot;);&#xD;&#xA;     glUniformMatrix4fv(mMvpLoc, 1, false, mMvp.pointer());&#xD;&#xA;&#xD;&#xA;The mMvp is my matrix 4*4 on CPU side. The getUniformLocation can be done only one time after you have loaded the program shader.&#xD;&#xA;&#xD;&#xA;An example of vertex shader:&#xD;&#xA;&#xD;&#xA;    uniform mat4    uMvp;&#xD;&#xA;    attribute vec3 aPosition;&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;       vec4 position = vec4(aPosition.xyz, 1.);&#xD;&#xA;       gl_Position = uMvp * position;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The gl_Position is a special predefined variable. It must contain the position of the&#xD;&#xA;vertex.&#xD;&#xA;&#xD;&#xA;An example of fragment shader. For each point to draw, the final color &quot;gl_FragColor&quot;&#xD;&#xA;must be computed:&#xD;&#xA;&#xD;&#xA;    #ifdef GL_ES&#xD;&#xA;    precision highp float;&#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;       gl_FragColor = vColor;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This program draw a triangle with a smoothing of colors defined for each vertex.&#xD;&#xA;&#xD;&#xA;For a better tutorial, look [this wonderful document.][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml&#xD;&#xA;  [2]: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html" />
  <row Id="8577" PostHistoryTypeId="2" PostId="4327" RevisionGUID="12fb6c58-e3a8-4075-9202-9fda165372e9" CreationDate="2010-10-06T06:23:54.777" UserId="1012" Text="Are there are any modern resources on how to develop games for Mac OS?  I suppose this would include objective c, cocoa and opengl 3+.&#xD;&#xA;&#xD;&#xA;The book [Beginning Mac OS X Game Development with Cocoa][1] looks very promising but isn't out until early next year.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://apress.com/book/view/9781430231653" />
  <row Id="8578" PostHistoryTypeId="1" PostId="4327" RevisionGUID="12fb6c58-e3a8-4075-9202-9fda165372e9" CreationDate="2010-10-06T06:23:54.777" UserId="1012" Text="What resources are available for Mac OS game development?" />
  <row Id="8579" PostHistoryTypeId="3" PostId="4327" RevisionGUID="12fb6c58-e3a8-4075-9202-9fda165372e9" CreationDate="2010-10-06T06:23:54.777" UserId="1012" Text="&lt;opengl&gt;&lt;objective-c&gt;&lt;cocoa&gt;&lt;macos&gt;" />
  <row Id="8580" PostHistoryTypeId="2" PostId="4328" RevisionGUID="8d658455-357a-4fef-ae28-4566e5389e3e" CreationDate="2010-10-06T06:41:55.443" UserId="1047" Text="Why dont you have him learn regex to have a taste of what programming is http://gskinner.com/RegExr/ have him also do that classic console guessing game (my number is from 1 to 100. Guess).&#xD;&#xA;&#xD;&#xA;In my class the teacher had us implement a game with an image falling from the sky. I learned a lot. Such as random numbers to get them to drop at different speeds and member vars to make the speed consistent." />
  <row Id="8581" PostHistoryTypeId="2" PostId="4329" RevisionGUID="f5b467eb-88f7-4211-abeb-4843f1898a32" CreationDate="2010-10-06T06:54:49.727" UserId="2345" Text="Have you considered using something like [Unity 3d][1]? It has the advantage of running on [multiple platforms][2] (web/iphone/ipad/andriod/wii/pc/mac and soon ps3 &amp; xbox360). &#xD;&#xA;&#xD;&#xA;Here are some resources for Unity 3d,&#xD;&#xA;&#xD;&#xA; - Video:&#xD;&#xA;   http://www.youtube.com/watch?v=5-X-Ebh1kYA&#xD;&#xA;   &#xD;&#xA; - Books:&#xD;&#xA;   http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=unity+3d&amp;x=0&amp;y=0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/&#xD;&#xA;  [2]: http://unity3d.com/unity/publishing/" />
  <row Id="8582" PostHistoryTypeId="5" PostId="4329" RevisionGUID="09bd938c-2529-4c6a-90dd-64e514e89222" CreationDate="2010-10-06T06:59:53.210" UserId="2345" Comment="added 15 characters in body" Text="Have you considered using something like [Unity 3d][1]? It has the advantage of running on [multiple platforms][2] (web/iphone/ipad/andriod/wii/pc/mac and soon ps3 &amp; xbox360). &#xD;&#xA;&#xD;&#xA;Here are some resources for Unity 3d,&#xD;&#xA;&#xD;&#xA; - http://unity3d.com/support/resources/&#xD;&#xA; - http://www.youtube.com/watch?v=5-X-Ebh1kYA&#xD;&#xA; - http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=unity+3d&amp;x=0&amp;y=0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/&#xD;&#xA;  [2]: http://unity3d.com/unity/publishing/" />
  <row Id="8583" PostHistoryTypeId="2" PostId="4330" RevisionGUID="5724582e-b970-45dd-8161-82ca9e5db791" CreationDate="2010-10-06T07:00:07.353" UserId="148" Text="SVG is supported in HTML5; whether the browser your player is using supports it is a different story.&#xD;&#xA;&#xD;&#xA;Depending on your needs you should check out [RaphaelJS][1]. Raphael provides SVG-like support for IE by switching to [VML][2] when rendering for IE. Raphael provides a lot of functionality including animations and Cufon font support. It's definitely worth a look.&#xD;&#xA;&#xD;&#xA;Since SVG is a part of the DOM it is pretty simple to attach DOM events like &quot;click&quot; and &quot;hover&quot; to the created SVG elements. This might make SVG more suitable for HUD-type displays rather than animating sprites, etc.&#xD;&#xA;&#xD;&#xA;You probably have a lot of testing ahead of you to determine the relative performance characteristics of SVG versus canvas, however.&#xD;&#xA;&#xD;&#xA;Straight DOM manipulation will probably be the worst of the bunch. As you change things in the DOM the browser's layout engine will recalculate the layout of the page to accomodate your changes which will probably kill your game's performance. If you have to go this route, prefer CSS (especially CSS3-specific features like transformations and keyframing).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://raphaeljs.com/&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb263898(VS.85).aspx" />
  <row Id="8584" PostHistoryTypeId="2" PostId="4331" RevisionGUID="3ba34cc8-81ea-4e94-968d-11a8e52c543d" CreationDate="2010-10-06T07:45:16.987" UserId="2360" Text="From my point of view the main difference between bullet/ogre and havok configuration is licensing. While ogre/bullet comes with open source code, need for self effort and time, havok comes with a licensing cost. So this decision is based on your purpose. I would always prefer gnu,gpl,zlib like licensed products for my development environment as long as I want to be free on distributing or selling or sharing my products." />
  <row Id="8585" PostHistoryTypeId="2" PostId="4332" RevisionGUID="81fa11df-86e4-49ae-9d1c-836bc8ba4c65" CreationDate="2010-10-06T09:57:58.677" UserId="1959" Text="HI All,&#xD;&#xA; what is the steps of to install the unity package in to iphone and create a build (app file )that my client can also able to install in his iphone .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;balraj. &#xD;&#xA;" />
  <row Id="8586" PostHistoryTypeId="1" PostId="4332" RevisionGUID="81fa11df-86e4-49ae-9d1c-836bc8ba4c65" CreationDate="2010-10-06T09:57:58.677" UserId="1959" Text="install unity package in to iphone ?" />
  <row Id="8587" PostHistoryTypeId="3" PostId="4332" RevisionGUID="81fa11df-86e4-49ae-9d1c-836bc8ba4c65" CreationDate="2010-10-06T09:57:58.677" UserId="1959" Text="&lt;unity&gt;" />
  <row Id="8588" PostHistoryTypeId="2" PostId="4333" RevisionGUID="9dc3513a-7fcd-4fad-926d-32b3a8f3b9df" CreationDate="2010-10-06T10:11:28.703" UserId="364" Text="coderanger is right about HLSL targeting DirectX, GLSL targeting OpenGL and CG being available with both interfaces.&#xD;&#xA;&#xD;&#xA;However there are other things to consider (learned on the OGRE forum) :&#xD;&#xA;&#xD;&#xA; - CG will not allow you to use the latest features of GLSL (I'm not sure about HLSL). It's a middle ground so you'll not be able to fully exploit the GLSL features, only the common one until Shader Model 3.0 (AFAI understood).&#xD;&#xA; - CG is made by NVidia that optimize it for it's card but don't seem to do lot of work for ATI cards... some people report that there might be problems with ATI cards using CG.&#xD;&#xA; - OpenGL seem to be a bit slower than DirectX on Windows platforms. That's really relative to what you're doing but it's good to know before you choose the API and the associated shader language. However, OpenGL is the only one interface available on all (win/mac/unix/some consoles) platforms. So knowing that, using exclusively GLSL might be the better choice for a non-Microsft-centric-cross-platform game.&#xD;&#xA; - NVidia drivers on Linux seem to be more stable than ATI drivers, making CG more interesting if you need to be sure it works nicely on linux (that's all reported informations, you'll have to check for details)&#xD;&#xA;&#xD;&#xA;So, if you're not using the lastest shader features, CG seem a good choice. GLSL seem a beter one if you're going full OpenGL. HLSL if you're going exclusively on Microsoft platforms. &#xD;&#xA;&#xD;&#xA;Now first developping in HLSL for windows to use DirectX and then convert to GLSL for linux and mac could be the better solution to be sure of performances and have the larger set of shader features available. It might however be a lot of work (didn't do it myself so I cannot tell). OGRE grpahic engine (and other engine) allow to use any API (DirectX or OpenGL or others) so it helps, but there is still shader code to convert if you go this way.&#xD;&#xA;&#xD;&#xA;That's all the informations I gathered while choosing my shader language (I've not made my decision yet)." />
  <row Id="8589" PostHistoryTypeId="6" PostId="4262" RevisionGUID="2237b4be-c096-4b7a-b276-32240dbf22f6" CreationDate="2010-10-06T11:31:45.447" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="8590" PostHistoryTypeId="6" PostId="4253" RevisionGUID="4793c8aa-dbc0-481f-85e1-02d8b42a9ee3" CreationDate="2010-10-06T11:32:10.580" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="8591" PostHistoryTypeId="2" PostId="4334" RevisionGUID="4401d8be-910c-4b5f-83cb-ad743fad46ca" CreationDate="2010-10-06T12:12:18.430" UserDisplayName="Sergio" Text="Here are some tutorials that you might find useful from [UnifyCommunity][1].&#xD;&#xA;&#xD;&#xA;Then there's this presentation over on Scribd regarding [&quot;Unity iPhone Newbie Guide&quot;][2]; maybe that's something you would like to read.&#xD;&#xA;&#xD;&#xA;Then there's the [iPhone Publishing][3] page directly from the horses mouth over at Unity.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=Tutorials&#xD;&#xA;  [2]: http://www.scribd.com/doc/15494658/Unity-iPhone-Newbie-Guide-Lesson1&#xD;&#xA;  [3]: http://unity3d.com/unity/features/iphone-publishing.html" />
  <row Id="8592" PostHistoryTypeId="6" PostId="4332" RevisionGUID="17c7ec6d-d7c7-4649-a0ef-e7a0b190b67a" CreationDate="2010-10-06T12:14:58.383" UserId="288" Comment="edited tags" Text="&lt;iphone&gt;&lt;unity&gt;" />
  <row Id="8593" PostHistoryTypeId="2" PostId="4335" RevisionGUID="bb4b001c-4fff-4164-a1f4-da852327cd44" CreationDate="2010-10-06T13:15:42.777" UserId="2427" Text="   I'm making an arkanoid-ish game myself too and I think the solution on how the ball should behave when hitting the paddle is quite simpler and faster than getting into the sin/cos approach... it works fine for the purposes of a game like this. Here's what I do:&#xD;&#xA;&#xD;&#xA;- Of course, since the ball speed increases in time I interpolate the before/after x,y steps to keep accurate collision detection, looping through all &quot;stepX&quot; and &quot;stepY&quot; which are calculated dividing each speed component by the modulus of the vector formed by the current and future ball positions.&#xD;&#xA;&#xD;&#xA;- If a collision against the paddle occurs I divide the Y speed by 20. This &quot;20&quot; is the most convenient value I found to get my resulting maximum angle when the ball hits on the sides of the paddle, but you can change it to whatever your needs are, just play with some values and choose the better for you. By dividing, let's say a speed of 4, which is my initial game speed by this number (20), I get a &quot;rebound factor&quot; of 0.25. This calculation keeps my angles quite proportional when the speed increases in time up to my maximum speed value which, for example, could be 15 (in that case: 15/20 = 0.75). Considering that my paddle x, y coords are midhandled (x and y represent the center of the paddle), I then multiply this result by the difference between the ball position and the paddle position. The greater the difference, the greatear the resulting angle. Besides, using a midhandled padlle, you get the correct sign for the x increment depending on the side the ball hits without having to worry about calculating the center. In pseudo-code:&#xD;&#xA;&#xD;&#xA;For n = 0 to modulus&#xD;&#xA;  ...&#xD;&#xA;&#xD;&#xA;  if collision_detected then&#xD;&#xA;    speedX = -(speedY / 20 )  * (paddleX - ballX); &#xD;&#xA;    speedY = -speedY;     &#xD;&#xA;    exit; &#xD;&#xA;  end if &#xD;&#xA;&#xD;&#xA;  ...&#xD;&#xA;&#xD;&#xA;  x = x + stepX;&#xD;&#xA;  y = y + stepY;&#xD;&#xA;&#xD;&#xA;end for&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Remeber, always try to keep things SIMPLE. I hope it helps!" />
  <row Id="8594" PostHistoryTypeId="5" PostId="4318" RevisionGUID="79e5f0a2-b3bb-44c2-ba9d-57f8dfa59a8e" CreationDate="2010-10-06T13:42:55.707" UserId="2289" Comment="added 4 characters in body" Text="So far, in my rhythm game, I've been using XNA's Content Pipeline for loading static resources in my app (videos, sound effects, etc). However, down the road I'd want to allow users to create their own themes, as well as making custom notecharts for whatever songs they'd like to play. Is there any way to load say, a Texture2D or Video object, from disk without using the Content Pipeline, given a file path to the resource?&#xD;&#xA;&#xD;&#xA;**EDIT**: Even thought this is XNA, I'm targeting Windows only (no Zune, WP7, or Xbox 360)." />
  <row Id="8595" PostHistoryTypeId="6" PostId="4295" RevisionGUID="62994ade-51be-479d-b32e-2dc06c67a39b" CreationDate="2010-10-06T14:11:30.957" UserId="51" Comment="edited tags" Text="&lt;dev-groups&gt;" />
  <row Id="8596" PostHistoryTypeId="2" PostId="4336" RevisionGUID="21610a7a-ae4e-4d1e-82e3-9082bfd20d42" CreationDate="2010-10-06T15:31:37.270" UserDisplayName="Sergio" Text="I was told that I should start learning Linear Algebra in order to create good games with good physics. &#xD;&#xA;&#xD;&#xA;I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with solving linear equations (two equations, two variables) and I remember learning about that in school, but almost immediately he jumps into other things that seem to be taken directly from the Necronomicon.&#xD;&#xA;&#xD;&#xA;What book can I read to learn some good math, but from the fundamentals; I want to be wined and dined, not savagely raped with a rusty tire iron.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help.&#xD;&#xA;" />
  <row Id="8597" PostHistoryTypeId="1" PostId="4336" RevisionGUID="21610a7a-ae4e-4d1e-82e3-9082bfd20d42" CreationDate="2010-10-06T15:31:37.270" UserDisplayName="Sergio" Text="Reading up on a Linear Algebra book and everything is completely foreign to me." />
  <row Id="8598" PostHistoryTypeId="3" PostId="4336" RevisionGUID="21610a7a-ae4e-4d1e-82e3-9082bfd20d42" CreationDate="2010-10-06T15:31:37.270" UserDisplayName="Sergio" Text="&lt;math&gt;&lt;books&gt;&lt;linear-algebra&gt;" />
  <row Id="8599" PostHistoryTypeId="2" PostId="4337" RevisionGUID="dd5bfc68-c659-4ccd-8e21-b236033f6c57" CreationDate="2010-10-06T15:33:16.297" UserId="378" Text="In addition to some of the game-making frameworks that are out there, you should be aware of the Burst Engine, which is a JS framework for displaying SVG-based animations in an HTML5 Canvas:&#xD;&#xA;&#xD;&#xA;http://burst.bocoup.com/&#xD;&#xA;&#xD;&#xA;So far I've seen people mention the &lt;audio&gt; and &lt;video&gt; tags, but there are other DOM things that are vital to JS/HTML game development, including stuff like adding EventListener callbacks to the &lt;canvas&gt; element for things like the 'mousemove' and 'mousedown' events. For example, this takes the first canvas element it can find and sets it up so that when you click on the canvas, it calls a function you've defined called &quot;shootAtClick&quot;:&#xD;&#xA;&#xD;&#xA;document.getElementsByTagName(&quot;CANVAS&quot;)[0].addEventListener('mousedown', shootAtClick, false);&#xD;&#xA;&#xD;&#xA;You can see it in action in [this example][1] where I've extended the Akihabara engine to accept basic mouse control. (Press Z to begin, use arrow keys to move, click the mouse to shoot in the direction of the cursor.)&#xD;&#xA;&#xD;&#xA;  [1]: http://tools.bostongamejams.com/akihabara_tutorials/tutx_mouse_controls2/" />
  <row Id="8600" PostHistoryTypeId="2" PostId="4338" RevisionGUID="d6a01947-6ab2-4e98-8246-7c0b9056419f" CreationDate="2010-10-06T15:45:30.460" UserId="345" Text="What level of math are you at? Do you understand things like vectors and matrices?  What about geometry and trigonometry? &#xD;&#xA;&#xD;&#xA;I have [Mathematics for 3D Game Programming and Computer Graphics][1] 2nd edition by Eric Lengyel and it's a great refresher on math related to games.  It starts with a very basic introduction to linear algebra with vectors and matrices and works through more advanced things like illumination, visibility determination, computational geometry, and game physics systems.&#xD;&#xA;&#xD;&#xA;The only downside from a programmers point of view is that it is very equation heavy.  If you are the type that gets scared or frustrated by equations I would look elsewhere for reference.&#xD;&#xA;&#xD;&#xA;The one thing you need to make sure to do regardless of the book you choose is to do the exercises!  You can't learn unless you actually do them.  For fun you could even implement them to allow you to see how the math maps to code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/1584502770/ref=pd_lpo_k2_dp_sr_2?pf_rd_p=486539851&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=1584500379&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=1W181JS88BY4CEG23YB8" />
  <row Id="8601" PostHistoryTypeId="2" PostId="4339" RevisionGUID="e27ca817-fcec-4ff0-9412-3bd3d3430bbb" CreationDate="2010-10-06T15:47:38.147" UserId="891" Text="Sergio you might want to aim more toward a Game Development math book like&#xD;&#xA;&#xD;&#xA;[**Essential Mathematics for Games and Interactive Applications, Second Edition: A Programmer's Guide**][1]&#xD;&#xA;&#xD;&#xA;Instead of the classical Linear Algebra you would learn in college.  Also like Ron Warholic said, stating what your math comfort level is would better help us taylor a specific book.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Essential-Mathematics-Interactive-Applications-Second/dp/0123742978/ref=sr_1_2?s=books&amp;ie=UTF8&amp;qid=1286379759&amp;sr=1-2#reader_0123742978" />
  <row Id="8602" PostHistoryTypeId="2" PostId="4340" RevisionGUID="52be2518-8982-4c83-aa54-ef676fa54163" CreationDate="2010-10-06T15:58:32.810" UserId="378" Text="The only way to be reasonably certain that your game code will be secure is to build a client/server type of game and put as much code as you can on the server. And of course, make that server secure!&#xD;&#xA;&#xD;&#xA;The main issue is that if code is running on my computer, I can inspect it, decompile it, and figure out how it works. This is true for JavaScript, Flash, C++, anything else. In fact, in MMO development (which is where the bulk of my professional experience is) the assumption from the very beginning is that the client is compromised: whatever you have written for the client is already in the hands of whoever wants it, malicious or not.&#xD;&#xA;&#xD;&#xA;Minifying code does provide a tiny amount of protection against people who are too lazy to unminify it using one of the many tools out there. (But production code *should* be minified to reduce its data footprint.)&#xD;&#xA;&#xD;&#xA;But if you're in a situation where, say, your boss wants some kind of code protection, you can google &quot;Javascript obfuscator&quot; -- there's a lot of free and for-pay software out there that makes JS at least about as impervious to decompiling as Flash is." />
  <row Id="8603" PostHistoryTypeId="5" PostId="4219" RevisionGUID="77b0a916-7ee0-414a-9fc0-022258420a2d" CreationDate="2010-10-06T16:15:37.570" UserId="1217" Comment="Pasted some code" Text="As the title suggests I'm developing a top down space game. &#xD;&#xA;&#xD;&#xA;I'm not looking to use newtonian physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that of FlatSpace 2 (awesome game). I can't figure out how to achieve this feeling with keyboard controls as opposed to mouse controls though. Any suggestions? &#xD;&#xA;&#xD;&#xA;I'm using Unity3d and C# or javaScript (unityScript or whatever is the correct term) works fine if you want to drop some code examples. &#xD;&#xA;&#xD;&#xA;Edit: Of course I should describe FlatSpace 2's control scheme, sorry. You hold the mouse button down and move the mouse in the direction you want the ship to move in. But it's not the controls I don't know how to do but rather the feeling of a mix of driving a car and flying an aircraft. It's really well made. Youtube link: [FlatSpace2 on iPhone][1] &#xD;&#xA;&#xD;&#xA;I'm not developing an iPhone game but the video shows the principle of the movement style.  &#xD;&#xA;[1]: http://www.youtube.com/watch?v=3dmSk-2sCpo&amp;feature=related&#xD;&#xA;&#xD;&#xA;Edit: This is the code I've come up with so far. It doesn't work at all though.. I must say that I don't entirely understand the conecpt behind nailer's proposed solution. An explanation would be highly appreciated!&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;//Controls the client playership. Input from user to client.&#xD;&#xA;&#xD;&#xA;//var for turning direction&#xD;&#xA;var directionModifier = 0;&#xD;&#xA;&#xD;&#xA;var shipRotationAngle = 1;&#xD;&#xA;var shipRotationSpeed = 1;&#xD;&#xA;&#xD;&#xA;//Var for movement forward/backwads&#xD;&#xA;var thrustModifier = 1;&#xD;&#xA;var accelerationModifier = 1;&#xD;&#xA;var shipBaseAcceleration = 1;&#xD;&#xA;&#xD;&#xA;var shipSpeedVector = Vector2(0,0);&#xD;&#xA;var frictionVector = Vector2(0,0);&#xD;&#xA;var accelerationVector = Vector2( 0,0);&#xD;&#xA;var directionVector = Vector2(0,0);&#xD;&#xA;&#xD;&#xA;var shipFriction = 1;&#xD;&#xA;var shipPositionVector = Vector2(0,0);&#xD;&#xA;function Update()&#xD;&#xA;{&#xD;&#xA;	if(Input.GetAxis(&quot;Horizontal&quot;) &lt; 0)&#xD;&#xA;	{&#xD;&#xA;		//Left&#xD;&#xA;		directionModifier = 1;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	if(Input.GetAxis(&quot;Horizontal&quot;) &gt; 0)&#xD;&#xA;	{&#xD;&#xA;		//Right&#xD;&#xA;		directionModifier = -1;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	shipRotationAngle += ( shipRotationSpeed * directionModifier ) * Time.deltaTime;&#xD;&#xA;	&#xD;&#xA;	if(Input.GetAxis(&quot;Vertical&quot;) &gt; 0)&#xD;&#xA;	{&#xD;&#xA;		//Forwards&#xD;&#xA;		thrustModifier = 1;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;	else if (Input.GetAxis(&quot;Vertical&quot;) &lt; 0)&#xD;&#xA;	{&#xD;&#xA;		//Backwards&#xD;&#xA;		thrustModifier = -1;&#xD;&#xA;	}&#xD;&#xA;	else&#xD;&#xA;	{&#xD;&#xA;		thrustModifier = 0;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Do acceleration&#xD;&#xA;	accelerationModifier = ( shipBaseAcceleration * thrustModifier ) * Time.deltaTime;&#xD;&#xA;	&#xD;&#xA;	directionVector = Vector2( Mathf.Cos ( shipRotationAngle ), Mathf.Sin(shipRotationAngle));&#xD;&#xA;	accelerationVector = Vector2 ( directionVector.x * accelerationModifier, directionVector.y * accelerationModifier);&#xD;&#xA;	&#xD;&#xA;	frictionVector = -directionVector * shipFriction;&#xD;&#xA;	&#xD;&#xA;	shipSpeedVector += accelerationVector;&#xD;&#xA;	&#xD;&#xA;	shipPositionVector += shipSpeedVector;&#xD;&#xA;	transform.Translate(shipSpeedVector.x, 0, shipSpeedVector.y);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&lt;code&gt;" />
  <row Id="8604" PostHistoryTypeId="2" PostId="4341" RevisionGUID="db53763c-3293-4259-9b13-19321502acd5" CreationDate="2010-10-06T17:19:09.573" UserId="37" Text="Knowledge of what HTML5 components are supported in what browsers.&#xD;&#xA;&#xD;&#xA;Though cross browser compatibility is getting better and more uniform as time goes on some of the newer components are still not supported entirely equally. &#xD;&#xA;&#xD;&#xA;Local storage may have some browser specific differences, and for legacy support you'll definitely need a library such as [jStorage][1] or [YUI Storage Lite][2].&#xD;&#xA;&#xD;&#xA;Web sockets as well may have browser specific differences, but [socket.io][3] looks like a promising library that provides a convenient abstraction.&#xD;&#xA;&#xD;&#xA;Audio compatibility is a pretty major component that requires different sound files for different browsers: [http://html5doctor.com/native-audio-in-the-browser/][4]&#xD;&#xA;&#xD;&#xA;Chrome has a couple of significant audio bugs, such as [being unable to play short audio files][5], and playing many simultaneous sounds can crash the entire browser.&#xD;&#xA;&#xD;&#xA;The main thing is to understand the browser differences, using libraries to abstract and provide legacy support as needed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/andris9/jStorage&#xD;&#xA;  [2]: http://yuilibrary.com/gallery/show/storage-lite&#xD;&#xA;  [3]: http://socket.io/&#xD;&#xA;  [4]: http://html5doctor.com/native-audio-in-the-browser/&#xD;&#xA;  [5]: http://code.google.com/p/chromium/issues/detail?id=25972" />
  <row Id="8605" PostHistoryTypeId="2" PostId="4342" RevisionGUID="f1a1cb7e-0fba-4c7d-9e08-25b9495b2162" CreationDate="2010-10-06T17:44:20.120" UserId="101" Text="Not a book, but you should check out the math curriculum over at the [Khan Academy][1]. I'm in the process of using these videos to brush up on my own math skills. They cover an extremely broad range of material, and the author has been praised for his teaching style.&#xD;&#xA;&#xD;&#xA;IMO, truly an amazing resource.&#xD;&#xA;&#xD;&#xA;[http://www.khanacademy.org/#Linear Algebra][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.khanacademy.org/&#xD;&#xA;  [2]: http://www.khanacademy.org/#Linear%20Algebra" />
  <row Id="8606" PostHistoryTypeId="2" PostId="4343" RevisionGUID="3d2803c0-fd9e-4f74-ab37-88a181daf5d4" CreationDate="2010-10-06T18:06:49.617" UserId="539" Text="For anyone in Seattle please join us at the [Seattle Games Co-op](http://www.meetup.com/SeattleGamesCooperative/). We currently meet twice a month, once to present a topic of interest -- say Blender or Linear Algebra -- and once just to hang out and have a beer.&#xD;&#xA;&#xD;&#xA;We're always looking for fellow game developers to participate and we're planning a lot of great stuff for the future, so get involved now!" />
  <row Id="8607" PostHistoryTypeId="16" PostId="4343" RevisionGUID="3d2803c0-fd9e-4f74-ab37-88a181daf5d4" CreationDate="2010-10-06T18:06:49.617" UserId="-1" />
  <row Id="8608" PostHistoryTypeId="5" PostId="4336" RevisionGUID="c944118c-1e5c-4713-9aa2-4fd1feb96411" CreationDate="2010-10-06T18:11:17.750" UserId="891" Comment="deleted 65 characters in body" Text="I was told that I should start learning Linear Algebra in order to create good games with good physics. &#xD;&#xA;&#xD;&#xA;I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with solving linear equations (two equations, two variables) and I remember learning about that in school, but almost immediately he jumps into other things that seem to be taken directly from the Necronomicon.&#xD;&#xA;&#xD;&#xA;What book can I read to learn some good math, but stating from the fundamentals.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help.&#xD;&#xA;" />
  <row Id="8609" PostHistoryTypeId="2" PostId="4344" RevisionGUID="6cd39c64-ba70-4213-90a3-50214103f8be" CreationDate="2010-10-06T18:22:28.340" UserId="542" Text="Short answer yes.&#xD;&#xA;&#xD;&#xA;Long answer,&#xD;&#xA;&#xD;&#xA;I don't know why people keep saying svg isn't supported in IE6. I still work in an environment totally dependent on IE6 and have [used this wonderful library for charts.][1] I definitely love canvas and prefer it for writing games with js, but in reality svg currently is more widely supported (because of IE6-IE8). So if you want to make a game in svg I say do it, other games have been created using it (see Raphael examples). Regardless you will still be using JS to do it, so if you want to transition to canvas, it wont be as painful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://raphaeljs.com/" />
  <row Id="8610" PostHistoryTypeId="5" PostId="4335" RevisionGUID="7a35a4be-f973-4803-a21c-2513f40711bd" CreationDate="2010-10-06T18:27:52.890" UserId="2427" Comment="edited body" Text="   I'm making an arkanoid-ish game myself too and I think the solution on how the ball should behave when hitting the paddle is quite simpler and faster than getting into the sin/cos approach... it works fine for the purposes of a game like this. Here's what I do:&#xD;&#xA;&#xD;&#xA;- Of course, since the ball speed increases in time I interpolate the before/after x,y steps to keep accurate collision detection, looping through all &quot;stepX&quot; and &quot;stepY&quot; which are calculated dividing each speed component by the modulus of the vector formed by the current and future ball positions.&#xD;&#xA;&#xD;&#xA;- If a collision against the paddle occurs I divide the Y speed by 20. This &quot;20&quot; is the most convenient value I found to get my resulting maximum angle when the ball hits on the sides of the paddle, but you can change it to whatever your needs are, just play with some values and choose the better for you. By dividing, let's say a speed of 5, which is my initial game speed by this number (20), I get a &quot;rebound factor&quot; of 0.25. This calculation keeps my angles quite proportional when the speed increases in time up to my maximum speed value which, for example, could be 15 (in that case: 15/20 = 0.75). Considering that my paddle x, y coords are midhandled (x and y represent the center of the paddle), I then multiply this result by the difference between the ball position and the paddle position. The greater the difference, the greatear the resulting angle. Besides, using a midhandled padlle, you get the correct sign for the x increment depending on the side the ball hits without having to worry about calculating the center. In pseudo-code:&#xD;&#xA;&#xD;&#xA;For n = 0 to modulus&#xD;&#xA;  ...&#xD;&#xA;&#xD;&#xA;  if collision_detected then&#xD;&#xA;    speedX = -(speedY / 20 )  * (paddleX - ballX); &#xD;&#xA;    speedY = -speedY;     &#xD;&#xA;    exit; &#xD;&#xA;  end if &#xD;&#xA;&#xD;&#xA;  ...&#xD;&#xA;&#xD;&#xA;  x = x + stepX;&#xD;&#xA;  y = y + stepY;&#xD;&#xA;&#xD;&#xA;end for&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Remeber, always try to keep things SIMPLE. I hope it helps!" />
  <row Id="8611" PostHistoryTypeId="5" PostId="4052" RevisionGUID="0505d3f0-497c-4f35-8d7f-e7e69d192624" CreationDate="2010-10-06T19:30:56.007" UserId="1323" Comment="deleted 366 characters in body" Text="There are some interesting aspects about peer-to-peer systems and action games. I tried to post them as a comment on Glenn Fiedler's blog, but apparently he doesn't like to be proved wrong and pulled the whole article instead. [It's still in google's cache, in case you want to read it.][1]&#xD;&#xA;&#xD;&#xA;He didn't let the comment go online, so I'll quote it here:&#xD;&#xA;&gt;The Peer-to-Peer suggestion from the first post is actually an interesting starting point, even though it's a bit naive at times: The first possibility would be to combine the system with a standard client/server model with prediction as outlined in your post about game networking. &#xD;&#xA;The lower P2P ping would dramatically reduce the prediction lag between players depending on their location: The effect probably wouldn't be visible for most US gamers, but here in Europe pings of 200+ are normal on most servers and a direct connection would reduce the prediction lag to that of a European server.&#xD;&#xA;&#xD;&#xA;&gt;A true P2P approach without server is a bit more complex:&#xD;&#xA;A main concern with decentralized networks is ensuring consistency, especially if the simulation could suffer from butterfly effects because of slightly different timing of commands sent over the network or floating point issues. This is possible by networking the state of each object (players, NPCs, ...) at least periodically. It wouldn't even be necessary to do it for all objects at once, and each client could take possession of certain objects. Networking enough objects in a certain time should damp the difference that builds up between each synchronization of an object enough to become irrelevant even for sync-intervals of a second or more.&#xD;&#xA;&#xD;&#xA;&gt;The second problem with P2P systems is security, but that can be solved with a relatively small fix in this case: The clients can use their physics simulations to collect information about the error level on each physics object. Manipulated physics always result in a larger error, so the clients would simply &quot;vote&quot; to disconnect from the peer controlling a suspicious object. Additionally, control messages for non-physics objects are forwarded between clients based on their importance: Player updates can be forwarded randomly, important and infrequent updates should always be sent, but still to a random player. This way a player would have to control a large share of the connected clients to be able to cheat in any noticeable way.&#xD;&#xA;&#xD;&#xA;&gt;[...]&#xD;&#xA;&#xD;&#xA;You can find the thread I'm referencing at [http://www.devmaster.net/forums/showthread.php?t=14640][2].&#xD;&#xA;&#xD;&#xA;I think someone mentioned the firewall problems peer-to-peer has in one of the threads from the article. A possible solution would be a NAT-Punchthrough:  &#xD;&#xA;- [NAT Punchthrough overview][3]  &#xD;&#xA;- [Peer-to-Peer Communication Across Network Address Translators][4]&#xD;&#xA;&#xD;&#xA;There is no 100% success rate, so you should tell the players to open a port anyway.&#xD;&#xA;&#xD;&#xA;  [1]: http://webcache.googleusercontent.com/search?q=cache:0cNq1fLFfVAJ:gafferongames.com/2009/09/04/the-return-of-the-timestep-crusader/&amp;cd=1&amp;hl=de&amp;ct=clnk&amp;gl=de&#xD;&#xA;  [2]: http://www.devmaster.net/forums/showthread.php?t=14640&#xD;&#xA;  [3]: http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html&#xD;&#xA;  [4]: http://www.brynosaurus.com/pub/net/p2pnat/" />
  <row Id="8612" PostHistoryTypeId="2" PostId="4345" RevisionGUID="a93d7cc9-2f62-4c6a-a7b6-ad42e175b89b" CreationDate="2010-10-06T21:33:07.067" UserDisplayName="Sergio" Text="For example, I created my character drawing on Paint.NET using the Pencil tool and now it's a sprite like asset.&#xD;&#xA;&#xD;&#xA;If I want him to move do I need to create many different poses for him and render them according a timer? Or do I need to have each pose side by side in a single image, then render the rectangle I need, thus loading the picture only once?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="8613" PostHistoryTypeId="1" PostId="4345" RevisionGUID="a93d7cc9-2f62-4c6a-a7b6-ad42e175b89b" CreationDate="2010-10-06T21:33:07.067" UserDisplayName="Sergio" Text="How to prepare a sprite for a game?" />
  <row Id="8614" PostHistoryTypeId="3" PostId="4345" RevisionGUID="a93d7cc9-2f62-4c6a-a7b6-ad42e175b89b" CreationDate="2010-10-06T21:33:07.067" UserDisplayName="Sergio" Text="&lt;rendering&gt;&lt;sprites&gt;" />
  <row Id="8615" PostHistoryTypeId="6" PostId="2314" RevisionGUID="5b93dd5f-1796-42d8-82b1-2eb3f29dd7a1" CreationDate="2010-10-06T21:35:35.070" UserId="1477" Comment="added tag" Text="&lt;graphics&gt;&lt;algorithm&gt;&lt;graphics-programming&gt;&lt;procedural&gt;" />
  <row Id="8616" PostHistoryTypeId="6" PostId="4306" RevisionGUID="17f62e25-4e79-45cf-8679-ee312613c9cd" CreationDate="2010-10-06T21:36:43.097" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;performance&gt;&lt;web&gt;&lt;svg&gt;" />
  <row Id="8617" PostHistoryTypeId="6" PostId="3887" RevisionGUID="4cbacf36-4ea9-43b2-8760-b50ec36da071" CreationDate="2010-10-06T21:38:43.343" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;peer-to-peer&gt;" />
  <row Id="8618" PostHistoryTypeId="6" PostId="4314" RevisionGUID="66631e55-1580-405d-bf66-07f1ed6e8484" CreationDate="2010-10-06T21:39:18.210" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;game-design&gt;&lt;old-school&gt;&lt;mud&gt;" />
  <row Id="8619" PostHistoryTypeId="6" PostId="4288" RevisionGUID="d9f82963-880a-47da-b0dc-b8d91e0a8743" CreationDate="2010-10-06T21:43:11.917" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;java&gt;&lt;android&gt;" />
  <row Id="8620" PostHistoryTypeId="2" PostId="4346" RevisionGUID="64f1692b-edf9-4c1d-aac5-5d410806808d" CreationDate="2010-10-06T21:55:37.590" UserId="666" Text="Usually you try to have them in a single file(maybe even fit multiple characters/backgrounds in just 1 image) and then do all the magic **in memory**.&#xD;&#xA;&#xD;&#xA;This files with a lot of images are called [**Sprite Sheets**][1] and you can find a lot of them online.&#xD;&#xA;&#xD;&#xA;There are many tools out there to manage sprites and aprite sheets both language/framework specific or general use. &#xD;&#xA;&#xD;&#xA;Some of the things to consider is if you have things of different sizes, perspectives, how do you represent that information about the sprite sheet.&#xD;&#xA;&#xD;&#xA;Depending on the platform and type of game it might be more or less important to use optimization in this area, I would suggest to always **Keep It Simple** if possible.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/images?q=spritesheets&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=en&amp;tab=wi&amp;biw=1728&amp;bih=831" />
  <row Id="8621" PostHistoryTypeId="2" PostId="4347" RevisionGUID="035cc0a6-b692-4d8f-bf86-568018216969" CreationDate="2010-10-07T00:07:21.863" UserId="1780" Text="I can't say whether or not it's a good idea, but you could ask Havok if you could evaluate their package to see if it is as easy to integrate as you think.  Then if you're ready to give them many thousands of dollars (it was $75k last time I knew anything about that aspect) you can get some of the source code too.&#xD;&#xA;&#xD;&#xA;The nice thing about Ogre and Bullet is that they are open source so you get all of the code.  The code is always the most certain place to find the answers to questions as other documentation may be out of date.  I don't remember Havok's documentation but I never really spent a lot of time with it." />
  <row Id="8622" PostHistoryTypeId="2" PostId="4348" RevisionGUID="e7d2d0ca-5bc7-4abe-ab0b-a76cc2f24c70" CreationDate="2010-10-07T05:24:01.700" UserId="1251" Text="I have seen this game&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.addictinggames.com/fancypantsadventure2.html&quot;&gt; Fancy Pants 2 &lt;/a&gt;. And the thing I noticed apart from the physics and beautiful animations is that the character is moving along slopes , even curved slopes. I have little experience in Box2d, but this concept of curved slopes is new to me. It would be a great help to me If somebody enlightened me on this concept and its implementation. Even If the implementation is not in box2d, it is welcome." />
  <row Id="8623" PostHistoryTypeId="1" PostId="4348" RevisionGUID="e7d2d0ca-5bc7-4abe-ab0b-a76cc2f24c70" CreationDate="2010-10-07T05:24:01.700" UserId="1251" Text="Making a character move along a curved slope in a World with gravity" />
  <row Id="8624" PostHistoryTypeId="3" PostId="4348" RevisionGUID="e7d2d0ca-5bc7-4abe-ab0b-a76cc2f24c70" CreationDate="2010-10-07T05:24:01.700" UserId="1251" Text="&lt;game-design&gt;&lt;box2d&gt;&lt;physics-engine&gt;" />
  <row Id="8625" PostHistoryTypeId="2" PostId="4349" RevisionGUID="4911e9b0-12ea-43d1-a795-c14d5ebba347" CreationDate="2010-10-07T07:12:56.430" UserId="2360" Text="&#xD;&#xA;I have a past with jbullet but the existing jogl compatible sources and demos seems uncompleted. I have managed to implement it to an extent but still looking for a better documented engine with more demo applications. &#xD;&#xA;&#xD;&#xA;My answer to this question is currently **JBullet** but wondering if there are any better and easier solutions.&#xD;&#xA;&#xD;&#xA;Any ideas &amp; suggestions?" />
  <row Id="8626" PostHistoryTypeId="1" PostId="4349" RevisionGUID="4911e9b0-12ea-43d1-a795-c14d5ebba347" CreationDate="2010-10-07T07:12:56.430" UserId="2360" Text="What's the best open source physics engine to use with JOGL?" />
  <row Id="8627" PostHistoryTypeId="3" PostId="4349" RevisionGUID="4911e9b0-12ea-43d1-a795-c14d5ebba347" CreationDate="2010-10-07T07:12:56.430" UserId="2360" Text="&lt;3d&gt;&lt;opengl&gt;&lt;physics&gt;&lt;java&gt;&lt;physics-engine&gt;" />
  <row Id="8628" PostHistoryTypeId="2" PostId="4350" RevisionGUID="1cc70311-e176-4fe7-a18e-a7be52806a56" CreationDate="2010-10-07T07:41:33.490" UserId="2360" Text="This may not be the exact answer to your question but I may suggest you an approach on this issue.&#xD;&#xA;&#xD;&#xA;Actually your problem is two problems combined.&#xD;&#xA;&#xD;&#xA; 1. Finding shortest paths&#xD;&#xA; 2. Finding collisions&#xD;&#xA;&#xD;&#xA;And the second problem is embedded into first. I may recommend understanding blind search first. Here's a very simple presentation about it: [Blind Search][1]&#xD;&#xA;&#xD;&#xA;If you read the document for building the state space, you will need to generate state points and they must be legal meaning these states can be on your shortest path so they shouldn't collide with any objects in your space. From now on you can continue with Euclidian collision algorithms. After building your state space and search tree restricted with collisions you may chose any of the shortest path algorithms or one of your own or modified one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.rpi.edu/~hollingd/ai/notes/blindsearch/blindsearch.pdf" />
  <row Id="8629" PostHistoryTypeId="2" PostId="4351" RevisionGUID="cd958515-274f-4312-b9fb-e510ba1f0282" CreationDate="2010-10-07T08:58:35.553" UserId="2437" Text="I know how to display a 2D map with tiles.&#xD;&#xA;&#xD;&#xA;I know how to make a pathfinding algorithm using A*.&#xD;&#xA;&#xD;&#xA;Those two things demand a structure or a class. My question is : do you use the same structure for displaying and path-computing ? Node structure for pathfinding demand to add some data : x position, y position, F, G, H plus the Parent Node. Tile structure for displaying can be optimized to almost only one information : the value of the tile. &#xD;&#xA;&#xD;&#xA;Do you use a big class for your tiles, that handle both displaying and pathfinding, or do you use a different method ? Thank you for your advices !" />
  <row Id="8630" PostHistoryTypeId="1" PostId="4351" RevisionGUID="cd958515-274f-4312-b9fb-e510ba1f0282" CreationDate="2010-10-07T08:58:35.553" UserId="2437" Text="Pathfinding and tiles structure" />
  <row Id="8631" PostHistoryTypeId="3" PostId="4351" RevisionGUID="cd958515-274f-4312-b9fb-e510ba1f0282" CreationDate="2010-10-07T08:58:35.553" UserId="2437" Text="&lt;tiles&gt;&lt;data-structure&gt;" />
  <row Id="8632" PostHistoryTypeId="2" PostId="4352" RevisionGUID="129f981d-75b9-4972-80fe-b6271bfb469f" CreationDate="2010-10-07T09:47:04.600" UserId="1219" Text="From a software development perspective, it's always good to **keep different things separate**.&#xD;&#xA;&#xD;&#xA;For a quick and dirty solution, put everything together and start working on game specifics.&#xD;&#xA;&#xD;&#xA;For an extendable solution, keep things apart: you don't want to be changing tile classes because your pathfinding algorithm got changed!&#xD;&#xA;Keep two structures: one representing visible game tiles and one representing the pathfinding structure. Ideally, a pathfinding algorithm is kept low level, so maybe an array of x,y points as input to the algorithm is a better idea than to provide it with your tile classes. The algorithm itself can setup arrays for F,G,H values.&#xD;&#xA;&#xD;&#xA;I think in this case (and I assume that you strive to be a good programmer), you should go for the extendable solution, because it won't take you that much extra effort but it keeps your code cleaner and you will gain good practice experience." />
  <row Id="8633" PostHistoryTypeId="2" PostId="4353" RevisionGUID="53e0b280-ee22-4a02-b651-9c6dccdf07d6" CreationDate="2010-10-07T10:25:21.900" UserId="1101" Text="&gt; My question is : do you use the same structure for displaying and path-computing ?&#xD;&#xA;&#xD;&#xA;No, I don't. You can get some optimisation out of calculating your A* directly onto the tile-map, but then you can't easily use your A* algorithm for things that don't map directly to the tiles. Also, it means you can't run the A* algorithm simultaneously in multiple threads as they end up sharing the map data. Finally, certain methods of moving don't allow the tile=node optimisation; a vehicle that needs space to turn around could potentially arrive at the same tile from different directions and have different options in each case - they can't be merged into one score.&#xD;&#xA;&#xD;&#xA;So I suggest keeping the data separate." />
  <row Id="8634" PostHistoryTypeId="6" PostId="4351" RevisionGUID="9eacac29-e93d-4283-abef-8e421d4b12ec" CreationDate="2010-10-07T11:18:45.057" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;path-finding&gt;&lt;tiles&gt;&lt;data-structure&gt;" />
  <row Id="8635" PostHistoryTypeId="2" PostId="4354" RevisionGUID="98325faa-a6ad-4286-aae6-090b058e3eee" CreationDate="2010-10-07T12:13:46.693" UserId="2413" Text="I am working on a MUD engine and I want to do it a little differently then all the MUD games I played. I find a &quot;cycle&quot; system very boring. One of the idea I had is to make every clients socket working in their own Thread. I am aware that it wont end with hundreds of player but I would like to know if there are problems creating &quot;alot&quot; of thread in a single process.&#xD;&#xA;&#xD;&#xA;Or, what other strategy I could use if I want to make it (eg. combats) in &quot;real-time&quot;.&#xD;&#xA;&#xD;&#xA;I hope you guys understand the question.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="8636" PostHistoryTypeId="1" PostId="4354" RevisionGUID="98325faa-a6ad-4286-aae6-090b058e3eee" CreationDate="2010-10-07T12:13:46.693" UserId="2413" Text="Get rid of the usual MUD cycles" />
  <row Id="8637" PostHistoryTypeId="3" PostId="4354" RevisionGUID="98325faa-a6ad-4286-aae6-090b058e3eee" CreationDate="2010-10-07T12:13:46.693" UserId="2413" Text="&lt;multithreading&gt;&lt;mud&gt;" />
  <row Id="8638" PostHistoryTypeId="2" PostId="4355" RevisionGUID="a90cff64-5e53-466c-9bca-d357236facc9" CreationDate="2010-10-07T14:13:46.587" UserId="1477" Text="You could allow combat commands as they come in and then add a time delay after commands based on how long they would take to execute.&#xD;&#xA;&#xD;&#xA;[Dragonrealms][1] uses this method for combat as well as many other actions, it is called Roundtime there. Heavier weapons get a greater time and you can reduce it, but not eliminate it with strength and agility.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dragonrealms.net" />
  <row Id="8639" PostHistoryTypeId="2" PostId="4356" RevisionGUID="0c4fa6cc-ae50-4660-b5e4-f77013fb7441" CreationDate="2010-10-07T15:03:01.013" UserId="1052" Text="The [Effect Games engine][1] (javascript) is fantastic for 2d, tile/sprite-based games. The website doesn't do a very good job of describing what's so great about it, but as soon as you dig into the excellent documentation you'll see how much has been covered for you:&#xD;&#xA;&#xD;&#xA;- spriting&#xD;&#xA;- collision detection&#xD;&#xA;- level editing&#xD;&#xA;- asset management&#xD;&#xA;- audio&#xD;&#xA;- input and control&#xD;&#xA;- tileset creation and management&#xD;&#xA;- layering&#xD;&#xA;- animation&#xD;&#xA;- performance (lock to a framerate)&#xD;&#xA;- cross-browser support and abstractions&#xD;&#xA;- hosting&#xD;&#xA;- embedding&#xD;&#xA;- HUD support&#xD;&#xA;&#xD;&#xA;I really can't provide an exhaustive list as it's so fully featured. One thing that's missing is the ability to create in-game menus and UI (eg. equipment managers etc), but it's supposedly on the todo list.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.effectgames.com/effect/" />
  <row Id="8640" PostHistoryTypeId="16" PostId="4356" RevisionGUID="0c4fa6cc-ae50-4660-b5e4-f77013fb7441" CreationDate="2010-10-07T15:03:01.013" UserId="-1" />
  <row Id="8641" PostHistoryTypeId="2" PostId="4357" RevisionGUID="4e94c040-77b0-4532-982b-957efd6d36cc" CreationDate="2010-10-07T15:03:39.893" UserId="744" Text="MUD cycles are generally not there because the server has trouble processing everything within the available time or serving network requests fast enough. They are there because spamming commands as fast as possible should not be a valid tactic.&#xD;&#xA;&#xD;&#xA;Simply have a cooldown / charge-up timer associated with each ability. Depending on your social design this might also include &quot;move&quot; and &quot;speak&quot;, or not.&#xD;&#xA;&#xD;&#xA;Generally, having more than one thread per core for network processing in a game is pointless. If you are packet-processing-bound, then a thread per core will be maxing out your system - more threads would just starve the others of CPU time they need. If you are not packet-processing-bound, a thread per core is small enough that it won't affect the rest of the system via too many context switches." />
  <row Id="8642" PostHistoryTypeId="4" PostId="4351" RevisionGUID="fbd6c01b-ae3b-47a2-b624-511f33cbed7f" CreationDate="2010-10-07T15:05:14.940" UserId="744" Comment="More searachable title." Text="Should I share the same tile structure for display and pathfinding?" />
  <row Id="8643" PostHistoryTypeId="4" PostId="4336" RevisionGUID="a3b6af4d-e6e9-4e70-913a-e347ac2b818b" CreationDate="2010-10-07T15:07:33.773" UserId="744" Comment="More searchable title.; edited title" Text="What is a good linear algebra book for game programmers?" />
  <row Id="8644" PostHistoryTypeId="2" PostId="4358" RevisionGUID="a94fd92d-b583-4c69-a0fc-155d8237bcd0" CreationDate="2010-10-07T15:15:24.047" UserId="744" Text="The simplest approach is to turn the non-convex polygons into multiple convex ones, then do normal convex collision and pathfinding (via A* or D* or whatever). The first process is often called &lt;a href=&quot;http://en.wikipedia.org/wiki/Polygon_triangulation&quot;&gt;triangulation&lt;/a&gt; in computational geometry, and there are several common ways to do it." />
  <row Id="8645" PostHistoryTypeId="8" PostId="4336" RevisionGUID="00759f7a-f0e0-4b72-a321-641d3c591eb1" CreationDate="2010-10-07T15:16:53.377" UserDisplayName="Sergio" Comment="Rollback to [21610a7a-ae4e-4d1e-82e3-9082bfd20d42]" Text="I was told that I should start learning Linear Algebra in order to create good games with good physics. &#xD;&#xA;&#xD;&#xA;I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with solving linear equations (two equations, two variables) and I remember learning about that in school, but almost immediately he jumps into other things that seem to be taken directly from the Necronomicon.&#xD;&#xA;&#xD;&#xA;What book can I read to learn some good math, but from the fundamentals; I want to be wined and dined, not savagely raped with a rusty tire iron.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help.&#xD;&#xA;" />
  <row Id="8646" PostHistoryTypeId="7" PostId="4336" RevisionGUID="00759f7a-f0e0-4b72-a321-641d3c591eb1" CreationDate="2010-10-07T15:16:53.377" UserDisplayName="Sergio" Comment="Rollback to [21610a7a-ae4e-4d1e-82e3-9082bfd20d42]" Text="Reading up on a Linear Algebra book and everything is completely foreign to me." />
  <row Id="8647" PostHistoryTypeId="5" PostId="4336" RevisionGUID="5296a770-dfb3-4bfe-b234-2cf5cc31d6bd" CreationDate="2010-10-07T15:17:20.343" UserDisplayName="Sergio" Comment="added 9 characters in body" Text="I was told that I should start learning Linear Algebra in order to create good games with good physics. &#xD;&#xA;&#xD;&#xA;I'm reading Linear Algebra book and it's completely foreign to me. The author starts out with solving linear equations (two equations, two variables) and I remember learning about that in school, but almost immediately he jumps into other things that seem to be taken directly from the Necronomicon.&#xD;&#xA;&#xD;&#xA;What book can I read to learn some good math, but starting from the fundamentals; I want to be wined and dined, not savagely raped with a rusty tire iron.&#xD;&#xA;&#xD;&#xA;Thanks a lot for the help.&#xD;&#xA;" />
  <row Id="8648" PostHistoryTypeId="2" PostId="4359" RevisionGUID="cbe6288d-20a7-4faa-992b-9cf73678c903" CreationDate="2010-10-07T16:19:54.940" UserId="1141" Text="Networking is serial in nature anyway (at least until you get into multi-Tbps fibre-optic lines). Having one thread for network I/O separate from game logic and *maybe* some autonomous agent threads makes sense. Everything else is overkill." />
  <row Id="8649" PostHistoryTypeId="2" PostId="4360" RevisionGUID="50126ba5-eda0-4556-b6b9-9e3f674740a9" CreationDate="2010-10-07T18:09:03.230" UserId="1130" Text="I've just started to learn Unity3D.&#xD;&#xA;&#xD;&#xA;I want to create a simple 3D menu with just two 3D Text instances.&#xD;&#xA;I've created and named them, then dropped this script:&#xD;&#xA;&#xD;&#xA;    function Awake(){&#xD;&#xA;    	print(&quot;MenuItem &quot;+gameObject.name+&quot; init!&quot;);&#xD;&#xA;    }&#xD;&#xA;    function OnMouseEnter(){&#xD;&#xA;    	print(&quot;OnMouseEnter &quot; + gameObject.name);&#xD;&#xA;    }&#xD;&#xA;    function OnMouseDown(){&#xD;&#xA;    	print(&quot;OnMouseDown &quot; + gameObject.name);&#xD;&#xA;    }&#xD;&#xA;I only see the init/awake message printed in the console.&#xD;&#xA;&#xD;&#xA;What am I missing ?" />
  <row Id="8650" PostHistoryTypeId="1" PostId="4360" RevisionGUID="50126ba5-eda0-4556-b6b9-9e3f674740a9" CreationDate="2010-10-07T18:09:03.230" UserId="1130" Text="How can I get OnMouseEnter to trigger on a 3D Text in Unity3D ?" />
  <row Id="8651" PostHistoryTypeId="3" PostId="4360" RevisionGUID="50126ba5-eda0-4556-b6b9-9e3f674740a9" CreationDate="2010-10-07T18:09:03.230" UserId="1130" Text="&lt;unity&gt;" />
  <row Id="8653" PostHistoryTypeId="2" PostId="4362" RevisionGUID="e53c8183-d2f1-420a-a5b3-87deca96ae5a" CreationDate="2010-10-07T19:51:34.357" UserId="51" Text="First make sure that everything else is set up correctly.&#xD;&#xA;&#xD;&#xA;In a different script that's running somewhere, put in this bit of code (C#, and from memory so it may not be 100% accurate):&#xD;&#xA;&#xD;&#xA;    RaycastHit hitInfo;&#xD;&#xA;    if( Physics.Raycast( Camera.main.ScreenPointToRay( Input.mousePosition ), out hitInfo ) )&#xD;&#xA;    {&#xD;&#xA;        Debug.Log( &quot;mouse is over object &quot; + hitInfo.collider.name );&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;If that doesn't work then you probably don't have your colliders set up correctly.  If it does print out something then you have something else messed up." />
  <row Id="8654" PostHistoryTypeId="5" PostId="4360" RevisionGUID="b0f9c6c1-5859-42e6-8059-9bb4b4cfc8cd" CreationDate="2010-10-07T19:53:15.823" UserId="1130" Comment="improved formatting" Text="I've just started to learn Unity3D.&#xD;&#xA;&#xD;&#xA;I want to create a simple 3D menu with just two 3D Text instances.&#xD;&#xA;I've created and named them, then dropped this script:&#xD;&#xA;&#xD;&#xA;    function Awake(){&#xD;&#xA;    	print(&quot;MenuItem &quot;+gameObject.name+&quot; init!&quot;);&#xD;&#xA;    }&#xD;&#xA;    function OnMouseEnter(){&#xD;&#xA;    	print(&quot;OnMouseEnter &quot; + gameObject.name);&#xD;&#xA;    }&#xD;&#xA;    function OnMouseDown(){&#xD;&#xA;    	print(&quot;OnMouseDown &quot; + gameObject.name);&#xD;&#xA;    }&#xD;&#xA;I only see the init/awake message printed in the console.&#xD;&#xA;&#xD;&#xA;What am I missing ?&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;Sorry, I forgot to add the BoxCollider(Physics&gt;Box Collider) to my object, so no events were triggered." />
  <row Id="8656" PostHistoryTypeId="2" PostId="4363" RevisionGUID="b89c2b2d-9de5-42a3-b94d-45180456cac9" CreationDate="2010-10-07T22:11:37.643" UserId="469" Text="I made a motion blur using OpenGL immediate mode, basically it involves saving screen to texture, then rendering blended texture back (let's skip the details) with something like this:&#xD;&#xA;&#xD;&#xA;    glBegin(GL_QUADS);&#xD;&#xA;            glColor4f(1.0f, 1.0f, 1.0f, 1.0f);&#xD;&#xA;            glTexCoord2f(0.0f, 1.0f); glVertex2f(0, 0);	// Bottom Left Of The Texture and Quad&#xD;&#xA;            glTexCoord2f(1.0f, 1.0f); glVertex2f(800, 0);	// Bottom Right Of The Texture and Quad&#xD;&#xA;            glTexCoord2f(1.0f, 0.0f); glVertex2f(800,  600);	// Top Right Of The Texture and Quad&#xD;&#xA;            glTexCoord2f(0.0f, 0.0f); glVertex2f(0,  600);&#xD;&#xA;        glEnd();&#xD;&#xA;&#xD;&#xA;My problem is: When I use the motion blur, seemly the blended screen get 1 pixel shifted to the opposite of (0, 0), resulting in everything getting blurry, not only the moving stuff.&#xD;&#xA;&#xD;&#xA;The stronger I apply the effect, the stronger everything else blurs (as seemly every frame of blur get 1 more pixel shifted).&#xD;&#xA;&#xD;&#xA;How I fix that?" />
  <row Id="8657" PostHistoryTypeId="1" PostId="4363" RevisionGUID="b89c2b2d-9de5-42a3-b94d-45180456cac9" CreationDate="2010-10-07T22:11:37.643" UserId="469" Text="Motion blur is blurring static stuff..." />
  <row Id="8658" PostHistoryTypeId="3" PostId="4363" RevisionGUID="b89c2b2d-9de5-42a3-b94d-45180456cac9" CreationDate="2010-10-07T22:11:37.643" UserId="469" Text="&lt;opengl&gt;&lt;special-effects&gt;&lt;blur&gt;&lt;effects&gt;" />
  <row Id="8659" PostHistoryTypeId="5" PostId="4255" RevisionGUID="4e821362-e645-4f87-b4eb-3ebb7378f6b0" CreationDate="2010-10-07T23:26:03.450" UserId="189" Comment="added 1708 characters in body" Text="Here's the relevant logic I used on the pong on [my homepage][1]: (please go play it before reading, so that you know the effect I'm achieving with the following code)&#xD;&#xA;&#xD;&#xA;Essentially, when the ball collides with the paddle, its direction is completely disregarded; it is given a new direction according to how far from the center of the paddle it collided. If the ball hits the paddle right in the center, it is sent away exactly horizontal; if it hits right on the edge, it flies off at an extreme angle (75 degrees). And it always travels at a constant speed.&#xD;&#xA;&#xD;&#xA;    var relativeIntersectY = (paddle1Y+(PADDLEHEIGHT/2)) - intersectY;&#xD;&#xA;&#xD;&#xA;Take the middle Y value of the paddle, and subtract the Y intersection of the ball. If the paddle is 10 pixels high, this number will be between -5 and 5. I call this the &quot;relative intersect&quot; because it is in &quot;paddle space&quot; now, the ball's intersection relative to the middle of the paddle.&#xD;&#xA;&#xD;&#xA;    var normalizedRelativeIntersectionY = (relativeIntersectY/(PADDLEHEIGHT/2));&#xD;&#xA;    var bounceAngle = normalizedRelativeIntersectionY * MAXBOUNCEANGLE;&#xD;&#xA;&#xD;&#xA;Take the relative intersection and divide it by half the paddle height. Now our -5 to 5 number is a decimal from -1 to 1; it's *normalized*. Then multiply it by the maximum angle by which you want the ball to bounce. I set it to 5*Pi/12 radians (75 degrees).&#xD;&#xA;&#xD;&#xA;    ballVx = BALLSPEED*Math.cos(bounceAngle);&#xD;&#xA;    ballVy = BALLSPEED*-Math.sin(bounceAngle);&#xD;&#xA;&#xD;&#xA;Finally, calculate new ball velocities, using simple trigonometry.&#xD;&#xA;&#xD;&#xA;This might not quite be the effect you're going for, or you might want to also determine a speed by multiplying the normalized relative intersection by a max speed; this would make the ball go faster if it hits near the edge of a paddle, or slower if it hits near the center.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt;I'd possibly like some code on what a vector would look like or how I could save the variable of the vector the balls has (speed and direction).&#xD;&#xA;&#xD;&#xA;A vector contains both speed and direction, implicitly. I store my vector as a &quot;vx&quot; and &quot;vy&quot;; that is, the speed in the x direction and the speed in the y direction. If you haven't taken an introductory course in physics this might seem somewhat foreign to you.&#xD;&#xA;&#xD;&#xA;The reason I do this is because it reduces the per-frame calculations necessary; every frame, you just do `x += vx * time;` and `y += vy * time;` where time is the time since last frame, in milliseconds (therefore the velocities are in pixels per millisecond).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Regarding implementing the ability to curve the ball:&#xD;&#xA;&#xD;&#xA;First of all, you'd need to know the paddle's velocity at the time the ball hits; which means you'd need to keep track of the paddle's history, so that you can know one or more of the paddle's past positions so that you can compare them to its current position to see if it moved. (change in position / change in time = velocity; so you need 2 or more positions, and the times of those positions)&#xD;&#xA;&#xD;&#xA;You now also need to track an [angular velocity][2] of the ball, which practically represents the curve along which it is traveling, but is equivalent to the real-world spin of the ball. Similar to how you would interpolate the bounce angle from the relative position of the ball on collision with the paddle, you would also need to interpolate this angular velocity (or spin) from the velocity of the paddle on collision. Rather than simply setting the spin like you do with the bounce angle, you might want to add or subtract to the ball's existing spin, because that tends to work well in games (the player can notice the ball is spinning, and cause it to spin even more wildly, or counter the spin in an attempt to make it travel straight).&#xD;&#xA;&#xD;&#xA;Note, however, that while this is the most common sense and probably easiest way to implement it, the actual physics of a bounce doesn't rely solely on the velocity of the object it hits; an object with no angular velocity (no spin) which hits a surface at an angle, will have a spin imparted upon it. This might lead to a better game mechanic, so you may want to look into this, but I'm not certain of the physics behind it so I'm not going to try to explain it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rickyc.org/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Angular_velocity" />
  <row Id="8660" PostHistoryTypeId="2" PostId="4364" RevisionGUID="3819b5f8-98c6-4f11-99e1-f37bcadce4c5" CreationDate="2010-10-07T23:58:41.747" UserId="634" Text="(Disclaimer: I work for Havok)&#xD;&#xA;&#xD;&#xA;There is a binary-only version of Havok Physics and Animation for Win32, available through Intel [here][1]. It's been a while since I read through the licensing agreement, but IIRC, essentially it's completely free if you're selling your game for less that 10 USD, and free but subject to an approval process if the price is more than 10 USD. The longer explanation is [here][2].&#xD;&#xA;&#xD;&#xA;Intel has a [forum][3] that's dedicated to supporting the free version. Havok support engineers read and reply on the forum regularly (plus an occasional guest appearance by yours truly).&#xD;&#xA;&#xD;&#xA;As for the animation component, you could initially keep most of your decompression/playback/blending in Ogre, and just convert the final pose to Havok format for ragdoll driving. Once that's working, you could switch the animation format and your toolchain over to Havok if you though it was worth it; otherwise you could just stick with the Ogre tools/format.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.havok.com/tryhavok&#xD;&#xA;  [2]: http://www.havok.com/index.php?page=pro&#xD;&#xA;  [3]: http://software.intel.com/en-us/forums/havok/" />
  <row Id="8661" PostHistoryTypeId="2" PostId="4365" RevisionGUID="041b34cd-9992-4428-a4a9-4aa8c740c431" CreationDate="2010-10-08T00:30:36.827" UserId="422" Text="Mozilla Gaming has a list on its [Resources](https://gaming.mozillalabs.com/resources) pages. It links to [Diggy](http://github.com/lostdecade/diggy), which is a DHTML game engine I built a while back. [Live demo here!](http://playbombada.appspot.com/)" />
  <row Id="8662" PostHistoryTypeId="16" PostId="4365" RevisionGUID="041b34cd-9992-4428-a4a9-4aa8c740c431" CreationDate="2010-10-08T00:30:36.827" UserId="-1" />
  <row Id="8663" PostHistoryTypeId="2" PostId="4366" RevisionGUID="40615d9c-2dd4-4654-8a61-7736fc05e72d" CreationDate="2010-10-08T01:40:51.947" UserDisplayName="maleki" Text="I could post quite a few ideas for you to try. Here are two.&#xD;&#xA;&#xD;&#xA;### Ditch Fantasy ###&#xD;&#xA;I know that you said that you are looking for ideas about medieval/fantasy, but I would suggest that you don't. If you don't like the topic for which you hobby program, you are not likely to finish it. So I am not telling you to ditch fantasy if it is your favorite thing.&#xD;&#xA;&#xD;&#xA;I simply recommend not doing fantasy because it has been done upwards and downwards; especially in the mudding community. Not to mention that there are now plenty of mmorpg's that trod up and down the fantasy path. It will be hard to stand out even a little with so much background noise. Even if you decide to go with a fantasy route, put very unique hooks in to the mix. Then make sure that those are readily apparent.&#xD;&#xA;&#xD;&#xA;### Meaningful Player Content Creation ###&#xD;&#xA;I can't stress this one enough. If you create ways for players to create and change the world, then they will feel more invested in the experience. I don't just mean player houses. I am talking about things that the players feel change things.&#xD;&#xA;&#xD;&#xA; - Player driven economies. ie, the best potions, armor, spells are player crafted.&#xD;&#xA; - Player effected areas. Have ways for players to change areas people interact in.&#xD;&#xA;&#xD;&#xA;So that seems a little vague. I will give you an example of what I mean.&#xD;&#xA;&#xD;&#xA;A medieval castle building game. All players are given an empire upon start of the game. It is each player's mission to create a flourishing civilization. Everyone's civilizations are reached through a player hub. You increase your civilization through many ways. These include personal questing, reinvestment of settlement resources, and interactions with different people's civilization. Give people a reason to care about their own area. Then give people a reason to seek out the areas of others. Make it so when you see someone elses area, their personality and decisions show.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8664" PostHistoryTypeId="16" PostId="4366" RevisionGUID="40615d9c-2dd4-4654-8a61-7736fc05e72d" CreationDate="2010-10-08T01:40:51.947" UserId="-1" />
  <row Id="8665" PostHistoryTypeId="2" PostId="4367" RevisionGUID="165dcdde-6d8b-4b4d-81cc-b5a9f787b77d" CreationDate="2010-10-08T03:42:54.980" UserId="2168" Text="How can you dump GPU memory (images and such that are loaded on it) to the standard format ?" />
  <row Id="8666" PostHistoryTypeId="1" PostId="4367" RevisionGUID="165dcdde-6d8b-4b4d-81cc-b5a9f787b77d" CreationDate="2010-10-08T03:42:54.980" UserId="2168" Text="Dump texture from memory to the original format ?" />
  <row Id="8667" PostHistoryTypeId="3" PostId="4367" RevisionGUID="165dcdde-6d8b-4b4d-81cc-b5a9f787b77d" CreationDate="2010-10-08T03:42:54.980" UserId="2168" Text="&lt;textures&gt;&lt;gpu&gt;" />
  <row Id="8668" PostHistoryTypeId="2" PostId="4368" RevisionGUID="83f5b169-51b9-4426-8ba3-ae2d65acce8f" CreationDate="2010-10-08T04:56:44.477" UserId="2077" Text="As far as dumping resources from running Direct3D 6.x, 8.x and 9.x applications, you might want to check out &lt;a href=&quot;http://www.deep-shadows.com/hax/3DRipperDX.htm&quot;&gt;3D Ripper DX&lt;/a&gt;.  &#xD;&#xA;&#xD;&#xA;Here's a quote from the tool's website about its features:&#xD;&#xA;&gt; With 3D Ripper DX you can:  &#xD;&#xA;- Capture all geometry, textures and shaders, rendered during single frame;  &#xD;&#xA;- Import captured geometry into 3D Studio Max or Maya;  &#xD;&#xA;- See what exactly has been drawn by each individual draw call;  &#xD;&#xA;- See renderstate, textures, vertex streams, index stream, vertex declaration, vertex and pixel shaders (including HLSL source code if available) of each individual draw call.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="8669" PostHistoryTypeId="2" PostId="4369" RevisionGUID="c496772a-9ad3-4377-bc1f-6424bb98db5e" CreationDate="2010-10-08T05:11:38.127" UserId="2077" Text="Frank D. Luna provides a brief but comprehensive introduction to the applicable concepts of linear algebra in his books on game development with Direct3D. You might want to take a look at his latest book, &lt;a href=&quot;http://d3dcoder.net/d3d10.aspx&quot;&gt;*Introduction to 3D Game Programming with DirectX 10*&lt;/a&gt;." />
  <row Id="8670" PostHistoryTypeId="5" PostId="4369" RevisionGUID="92c9aae8-6537-41e2-9832-5e29851fd54c" CreationDate="2010-10-08T07:09:50.883" UserId="2077" Comment="added 1 characters in body; deleted 1 characters in body" Text="Frank D. Luna provides a brief but comprehensive introduction to the applicable concepts of linear algebra in his books on game development with Direct3D. You might want to take a look at his latest book, &lt;a href=&quot;http://d3dcoder.net/d3d10.aspx&quot;&gt;*Introduction to 3D Game Programming with DirectX 10*&lt;/a&gt;." />
  <row Id="8671" PostHistoryTypeId="2" PostId="4370" RevisionGUID="bd29d7aa-b391-476e-a0c3-607b74a24dce" CreationDate="2010-10-08T09:22:11.623" UserId="1091" Text="The texel co-ordinates, if you have bilinear filtering, are falling between the texels rather than being centered.&#xD;&#xA;&#xD;&#xA;You either need to to add half a texel to the UVs, or turn off filtering.&#xD;&#xA;" />
  <row Id="8672" PostHistoryTypeId="2" PostId="4371" RevisionGUID="76831ef8-36ba-474e-b1af-ebc5c333db92" CreationDate="2010-10-08T12:10:05.150" UserId="50" Text="Is there an academic way to have NPC walking randomly on a map, but having a believable comportment ?" />
  <row Id="8673" PostHistoryTypeId="1" PostId="4371" RevisionGUID="76831ef8-36ba-474e-b1af-ebc5c333db92" CreationDate="2010-10-08T12:10:05.150" UserId="50" Text="Random paths for NPC" />
  <row Id="8674" PostHistoryTypeId="3" PostId="4371" RevisionGUID="76831ef8-36ba-474e-b1af-ebc5c333db92" CreationDate="2010-10-08T12:10:05.150" UserId="50" Text="&lt;path-finding&gt;&lt;random&gt;" />
  <row Id="8676" PostHistoryTypeId="4" PostId="4371" RevisionGUID="7c8f289d-77c9-44c6-b405-2ddd129db0f1" CreationDate="2010-10-08T12:18:01.797" UserId="744" Comment="edited tags; edited title" Text="How do I make NPC pathfinding look believable?" />
  <row Id="8677" PostHistoryTypeId="6" PostId="4371" RevisionGUID="7c8f289d-77c9-44c6-b405-2ddd129db0f1" CreationDate="2010-10-08T12:18:01.797" UserId="744" Comment="edited tags; edited title" Text="&lt;ai&gt;&lt;path-finding&gt;&lt;random&gt;" />
  <row Id="8678" PostHistoryTypeId="4" PostId="4336" RevisionGUID="d39d1348-3714-455b-9988-f3ed8083ead1" CreationDate="2010-10-08T12:19:04.793" UserId="744" Comment="edited title" Text="What is a good linear algebra book for game programmers?" />
  <row Id="8679" PostHistoryTypeId="2" PostId="4373" RevisionGUID="88b92b02-d883-4402-9697-08d507ed45bb" CreationDate="2010-10-08T12:20:06.677" UserId="20" Text="I suggest you have a look at [Craig Reynolds Steering Behaviors][1]. To make things more interesting, you could also switch behaviors depending on the situation the NPC is in. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="8680" PostHistoryTypeId="5" PostId="4371" RevisionGUID="cf25df25-61e6-4396-b130-1892ecd29022" CreationDate="2010-10-08T12:21:33.183" UserId="50" Comment="added 285 characters in body; deleted 2 characters in body" Text="Is there an &quot;academic&quot; way to have NPC walking randomly on a map, but having a believable comportment ?&#xD;&#xA;&#xD;&#xA;The obvious scenario is a armed guard who is walking around a basement to secure it. It's quite easy to set up a &quot;believable&quot; path.&#xD;&#xA;&#xD;&#xA;What I'm looking for is a way to simulation a crowd in a small town, in fact. How can I make their move look like they aren't goalless robots." />
  <row Id="8682" PostHistoryTypeId="2" PostId="4374" RevisionGUID="cbdfe836-5e2d-4239-8222-40115aa42e51" CreationDate="2010-10-08T12:37:40.637" UserId="50" Text="My question is about the data structure (and logical way to use this structure) behind this type of comportment of NPC enemy : How does he computes the place where he can take cover when the player is shooting at him ? &#xD;&#xA;&#xD;&#xA;It can be in a FPS-like, or a &quot;board game&quot; view game..." />
  <row Id="8683" PostHistoryTypeId="1" PostId="4374" RevisionGUID="cbdfe836-5e2d-4239-8222-40115aa42e51" CreationDate="2010-10-08T12:37:40.637" UserId="50" Text="What's the best practice to have NPC enemies taking cover in an FPS game ?" />
  <row Id="8684" PostHistoryTypeId="3" PostId="4374" RevisionGUID="cbdfe836-5e2d-4239-8222-40115aa42e51" CreationDate="2010-10-08T12:37:40.637" UserId="50" Text="&lt;best-practices&gt;&lt;ai&gt;" />
  <row Id="8685" PostHistoryTypeId="2" PostId="4375" RevisionGUID="e819c545-2ddd-44a9-b90a-f8384676b63f" CreationDate="2010-10-08T13:10:34.153" UserId="1251" Text="Breakout is a classic beginners work for starting to dive into the world of physics based game programming.&#xD;&#xA;Basically the ball has a bounce motion when it hits on the wall. As somebody above suggested the angle of incidence is equal to the angle of reflection.&#xD;&#xA;But when you consider the ball hitting the paddle. The logic is divided into 3 sections. &#xD;&#xA;1.) The ball hitting the center portion of the paddle.&#xD;&#xA;2.) The ball hitting the leftward portion of the paddle.&#xD;&#xA;3.) The ball hitting the rightward position of the paddle.&#xD;&#xA;&#xD;&#xA;When you consider the center portion: You need not differ the bounce effect of that which is applied when hitting the ball. The ball just gets deflected normally.But, when either direction is hit, the case is different.&#xD;&#xA;&#xD;&#xA;When the ball is hit on the leftward side, ie consider the ball coming from the leftward side of the screen and you are coming with the paddle from the right side. Then when you hit the ball with the leftward portion, the ball should reflect to the direction it came from .ie.leftwards with the same angle it came from. Same is the case vice versa. In the rightward portion also the same thing applies.&#xD;&#xA;&#xD;&#xA;This movement of the ball towards the leftward or rightward direction when it is being hit  makes it more believable.&#xD;&#xA;&#xD;&#xA;Hope you got the idea,at least logic wise.Thank you" />
  <row Id="8686" PostHistoryTypeId="2" PostId="4376" RevisionGUID="7fab4ae6-e409-4560-9d92-0caa4a97b872" CreationDate="2010-10-08T14:14:37.043" UserId="136" Text="Some of the content processors expose classes which do a lot of the heavy lifting, e.g. take in a Stream and produce an intermediate object (like the data necessary to construct a mesh, but not an actual Mesh object).  You may be able to do some additional processing to transform the intermediate object into the final object that you want to consume.  Some of those classes may actually even spit out the final object for you.  It varies by the type of content.  I suggest digging through the content processors for the relevant content types and see anything useful is exposed.  You may have to rewrite some bits yourself (Reflector is your friend), but it could be worth the effort if you really don't want to use &quot;precompiled&quot; assets." />
  <row Id="8687" PostHistoryTypeId="2" PostId="4377" RevisionGUID="474bbfb8-dccb-48cf-a071-c625fcf11614" CreationDate="2010-10-08T14:19:27.857" UserId="136" Text="I suppose you could use the same objects on the client side to represent the state of the &quot;game board&quot;, but the client shouldn't need much more than that.  When a player makes a move (clears a block), the client should only need to issue a command to the server (with the payload being the coordinates of the block to clear).  The server could then process the move, and the clients would download the new game board state.  The game board state itself should not contain any logic, so it could be quite appropriately used by both the clients and the server." />
  <row Id="8688" PostHistoryTypeId="2" PostId="4378" RevisionGUID="7c304e20-0a6c-4e83-a781-0935de988103" CreationDate="2010-10-08T14:24:06.060" UserId="2446" Text="Fancy Pants was made in Flash, and Flash has a specific method called 'hitTest' which allows you to test a pixel (in this case, he probably does 2-3 pixel hitTests along the bottom of the Fancy Pants character) against whatever is drawn within a designated movieclip object. It can be a bit tricky to get it feeling right, but this built-in function is why so many Flash games have collisions with curved slopes. The process is much more complicated for most other engines, and usually has to be done manually, but there are a few different methods.&#xD;&#xA;&#xD;&#xA;The method I'm most familiar with is if your engine is tile-based (think Sonic the Hedgehog), the tiles designated as curved could each have a formula which determines the 'Y' collision position based on the character's current 'X' position on that tile. You would have to determine the formula based on how steep of a slope and how curved you're looking for. You could use a graphing calculator or graphing program to experiment with the formulas. You can have multiple tiles with different curves and formulas associated with them this way." />
  <row Id="8689" PostHistoryTypeId="2" PostId="4379" RevisionGUID="f0613013-14f9-4760-becf-1021073646dd" CreationDate="2010-10-08T14:26:09.853" UserId="2447" Text="&gt; aren't goalless robots.&#xD;&#xA;&#xD;&#xA;Easy, give them goals.  Give each NPC a destination depending on the map you may not even have to path find for them just Steering, or precompute the path between doors in town. " />
  <row Id="8690" PostHistoryTypeId="2" PostId="4380" RevisionGUID="59ab14e7-7ea8-44ba-a376-348ee9ef1d2c" CreationDate="2010-10-08T14:28:20.133" UserId="136" Text="If you're asking how to dump the texture into the original **file format** from which it was loaded, there is no way to do this.  Once the texture is loaded, be it from a JPEG, PNG, BMP, TGA, etc., it is represented as an in-memory bitmap using one of many standard pixel formats.  There is often no way to determine what the source file format was.  However, you can save it back to any format you choose.  Keep in mind that if the texture started out in a lossy format (like JPEG) then there is no way to get that &quot;original&quot; JPEG back once it's been loaded into memory--it would have to be re-compressed to be saved in JPEG format again, and that could very well lead to further quality loss.  However, you could save it to a lossless format like PNG to avoid that quality loss." />
  <row Id="8691" PostHistoryTypeId="2" PostId="4381" RevisionGUID="c2d696b3-3256-4c61-8908-63e8841b2a5f" CreationDate="2010-10-08T15:00:13.363" UserId="136" Text="Sorry for the late reply, but you may want to take a look at an OpenGL UI framework called GG.  GG was developed as part of the [FreeOrion][1] project and is included in their SVN repository (and their downloadable SDK).  It seems pretty capable.  I've included a screenshot below; you can click the image to view the full version.&#xD;&#xA;&#xD;&#xA;[![Screenshot of FreeOrion's GG-based UI][2]](http://i.stack.imgur.com/42TKN.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freeorion.org/&#xD;&#xA;  [2]: http://i.stack.imgur.com/42TKN.png" />
  <row Id="8692" PostHistoryTypeId="6" PostId="3617" RevisionGUID="9a539fb3-31a9-44c1-ab36-573bb3f13ae4" CreationDate="2010-10-08T15:28:14.607" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;opengl&gt;&lt;gui&gt;" />
  <row Id="8693" PostHistoryTypeId="2" PostId="4382" RevisionGUID="f3465dc6-f03b-4c1e-8ea4-f07b6c8d59e7" CreationDate="2010-10-08T16:22:54.317" UserId="1926" Text="A combination of node-navigation and steering behaviors actually produces some nice results, if you believe research documents (I personally haven't tried this approach):&#xD;&#xA;[Link to paper:Steering a Virtual Crowd Based on a. Semantically Augmented Navigation Graph][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/url?sa=t&amp;source=web&amp;cd=3&amp;ved=0CB0QFjAC&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.88.1746%26rep%3Drep1%26type%3Dpdf&amp;rct=j&amp;q=a*%20node%20navigation%20steering&amp;ei=3kSvTMXoJ8P7lwftz9XmDw&amp;usg=AFQjCNH0iXPNqe6li6-DHBKzTuoYqA8zxA&amp;cad=rja" />
  <row Id="8694" PostHistoryTypeId="16" PostId="3617" RevisionGUID="263cd213-0295-4fa0-8f8c-a38442fb1110" CreationDate="2010-10-08T16:44:49.500" UserId="1312" />
  <row Id="8695" PostHistoryTypeId="2" PostId="4383" RevisionGUID="6a706299-acff-45f9-826b-d6f0e55060c3" CreationDate="2010-10-08T16:58:54.920" UserId="111" Text="How do you query the amount of VRAM available when using DirectX?" />
  <row Id="8696" PostHistoryTypeId="1" PostId="4383" RevisionGUID="6a706299-acff-45f9-826b-d6f0e55060c3" CreationDate="2010-10-08T16:58:54.920" UserId="111" Text="How much VRAM is available on a Windows machine?" />
  <row Id="8697" PostHistoryTypeId="3" PostId="4383" RevisionGUID="6a706299-acff-45f9-826b-d6f0e55060c3" CreationDate="2010-10-08T16:58:54.920" UserId="111" Text="&lt;graphics&gt;&lt;directx&gt;&lt;windows&gt;" />
  <row Id="8698" PostHistoryTypeId="2" PostId="4384" RevisionGUID="5bfe4f44-7e7e-4454-b7b0-9a6bc29c557c" CreationDate="2010-10-08T17:21:29.237" UserId="1156" Text="According to Game Coding Complete 3, there are a few ways:&#xD;&#xA;&#xD;&#xA; - DX7's GetAvailableVidMem() - usually pretty good. Doesn't work too well on cards with shared memory.&#xD;&#xA; - WMI (Windows Management Interface) has a similar result to the above.&#xD;&#xA; - DxDiag uses both to give a better result.&#xD;&#xA; - D3D9 has a GetAvailableTextureMemory() function, but can only be used on Windows Vista/7.&#xD;&#xA;&#xD;&#xA;Look for a DX sample in March 08 or later SDK called 'VideoMemory'." />
  <row Id="8699" PostHistoryTypeId="2" PostId="4385" RevisionGUID="71560459-e315-411f-a461-166cea650740" CreationDate="2010-10-08T17:30:48.850" UserId="111" Text="For DX9EX on Vista and later:&#xD;&#xA;&#xD;&#xA;    IDXGIDevice * pDXGIDevice;&#xD;&#xA;    hr = g_pd3dDevice-&gt;QueryInterface(__uuidof(IDXGIDevice), (void **)&amp;pDXGIDevice);&#xD;&#xA;    IDXGIAdapter * pDXGIAdapter;&#xD;&#xA;    pDXGIDevice-&gt;GetAdapter(&amp;pDXGIAdapter);&#xD;&#xA;    DXGI_ADAPTER_DESC adapterDesc;&#xD;&#xA;    pDXGIAdapter-&gt;GetDesc(&amp;adapterDesc);&#xD;&#xA;    return adapterDesc.DedicatedVideoMemory;&#xD;&#xA;&#xD;&#xA;(from http://msdn.microsoft.com/en-us/library/bb174526(v=VS.85).aspx )&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8700" PostHistoryTypeId="2" PostId="4386" RevisionGUID="a72e398a-6abb-4e6e-99a8-12a28b75bd6d" CreationDate="2010-10-08T17:31:59.783" UserId="962" Text="I think the best way to do it would be to manually set up boxes in the area(s) that you want the NPCs to take cover in. &#xD;&#xA;&#xD;&#xA;Have a variable for &quot;fear&quot; or some other metric you want, when a threshold is reached the NPC should move to the closest box that is out of the players line of sight.&#xD;&#xA;&#xD;&#xA;You could figure a way to dynamically have enemies take cover over behind any object, but more times than not those can generate some strange and illogical cover positions." />
  <row Id="8701" PostHistoryTypeId="2" PostId="4387" RevisionGUID="858fbc27-6458-4740-8319-e9af7c49086a" CreationDate="2010-10-08T18:44:59.720" UserId="2301" Text="I am looking for a tool that I can make Sprite sheet easily, right now I am using Illustrator, but I can never get the center of the character in the exact position, so it looks like it is moving around(even though its always in one place), while being loop through the sprite sheet.  Is there any better tools that I can be using?&#xD;&#xA;&#xD;&#xA;Also what kind of tips would you give for working with a sprite sheet?  Should I create each part of the character in individual layers (left arm, right arm, body, etc.) or everything at once?  any other tips would also be helpful! thank you" />
  <row Id="8702" PostHistoryTypeId="1" PostId="4387" RevisionGUID="858fbc27-6458-4740-8319-e9af7c49086a" CreationDate="2010-10-08T18:44:59.720" UserId="2301" Text="Tool for creating Spritesheet? and Tips." />
  <row Id="8703" PostHistoryTypeId="3" PostId="4387" RevisionGUID="858fbc27-6458-4740-8319-e9af7c49086a" CreationDate="2010-10-08T18:44:59.720" UserId="2301" Text="&lt;graphics&gt;&lt;animation&gt;&lt;art&gt;&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="8704" PostHistoryTypeId="16" PostId="3618" RevisionGUID="72500f12-91fd-4104-930b-06c9e4337611" CreationDate="2010-10-08T18:46:08.873" UserId="744" />
  <row Id="8705" PostHistoryTypeId="2" PostId="4388" RevisionGUID="474d1818-d19f-4d07-b1a5-1cbbc7838ae6" CreationDate="2010-10-08T19:01:36.030" UserId="891" Text="If you have 3D models there is a program made by EnvyGames, [**SpriteWorks**][1], which will make 2D sprite sheets out of the models for you.  Allows you to play animations and customize a bunch of stuff.&#xD;&#xA;&#xD;&#xA;I think it's a bit pricey for what it is, $49.99.&#xD;&#xA;&#xD;&#xA;Here is a tutorial on how to use SpriteWorks&#xD;&#xA;&#xD;&#xA;[**Creating Sprites from 3D Models - EnvyGames**][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.envygames.com/content/index.php/tools/turn-3d-models-into-2d-animated-sprites&#xD;&#xA;  [2]: http://blogs.silverlight.net/blogs/msnow/archive/2009/03/02/silverlight-tip-of-the-day-97-creating-sprites-from-3d-models-envygames.aspx" />
  <row Id="8706" PostHistoryTypeId="2" PostId="4389" RevisionGUID="da29a201-7eed-4d1a-8ee8-973226c1ad7e" CreationDate="2010-10-08T19:35:41.277" UserId="1248" Text="I am using Ogre for my rendering engine, and I planned on just using the .mesh format that is setup by default with Ogre. However, I recently purchased a large number of 3d assets from a company, only to find out that they use 7 blend weights where as Ogre has a max limit of 4.&#xD;&#xA;&#xD;&#xA;I don't know much about modeling and animation (which is why I purchased the art) but just from thinking, it is probably fairly difficult to change something like this in the model without having to reanimate it.&#xD;&#xA;&#xD;&#xA;So this led me to think about a custom model format. I know the basics of what is stored, verts/polygons/etc, but I am wondering if this is something I am right in thinking I probably need to do? If so, are there any good resources on developing a custom model format? Tutorials/samples/anything would be great. So far all I have found is http://www.falloutsoftware.com/tutorials/gl/gl6.htm which is helpful but not complete." />
  <row Id="8707" PostHistoryTypeId="1" PostId="4389" RevisionGUID="da29a201-7eed-4d1a-8ee8-973226c1ad7e" CreationDate="2010-10-08T19:35:41.277" UserId="1248" Text="Writing a custom model file format" />
  <row Id="8708" PostHistoryTypeId="3" PostId="4389" RevisionGUID="da29a201-7eed-4d1a-8ee8-973226c1ad7e" CreationDate="2010-10-08T19:35:41.277" UserId="1248" Text="&lt;c++&gt;&lt;ogre&gt;&lt;file&gt;&lt;models&gt;" />
  <row Id="8709" PostHistoryTypeId="2" PostId="4390" RevisionGUID="3dd3e9f5-2036-40be-9302-1976d0eb521d" CreationDate="2010-10-08T19:48:15.430" UserId="1156" Text="[Google returned this result on the GD.Net forums.][1]&#xD;&#xA;&#xD;&#xA;Then again, could you use another existing mesh format with Ogre instead?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/community/forums/topic.asp?topic_id=523849" />
  <row Id="8710" PostHistoryTypeId="2" PostId="4391" RevisionGUID="6babd7d4-01e1-4c44-85c9-3929ec1bbd1b" CreationDate="2010-10-08T20:24:53.187" UserId="14" Text="From the problems that you are having I recommend that you do the following:&#xD;&#xA;&#xD;&#xA;First, work with layers and folders. It really does help, Group individual sprites together in folders so that you can move the whole of them around and parts that are replicated should exist on seperate layers.&#xD;&#xA;&#xD;&#xA;(So if there is a sword or something it should be on a layer, eyes should be on a layer, etc). Thats where the real power of these type of applications are for such a task. If you mess something up, you don't mess it all up just that layer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, enable the ruler and enable the grid. (Also take the time to set them up correctly in the preferences menu). If click the grid and drag away from it, you can create guidelines. Setting up your own limits using the guidelines will allow you to snap the sprites (which should now be in folders) to the grid lines allowing you to position them far better.&#xD;&#xA;&#xD;&#xA;Then finally, if things still seem a bit out of phase when the animation is playing. If you zoom all the way in (you may need to make sure this is enabled in the preferences menu) you can see an individual per-pixel grid. Which should allow you to place things exactly where you need them to be.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8711" PostHistoryTypeId="2" PostId="4392" RevisionGUID="fa675ed2-2f12-41f8-9be8-2957c6090609" CreationDate="2010-10-08T20:56:12.613" UserId="2452" Text="I am using Ardor3D, and find the spotlight is quite bumpy. Anybody has a good pixel shader can smooth the edges of the spot light?&#xD;&#xA;&#xD;&#xA;thanks," />
  <row Id="8712" PostHistoryTypeId="1" PostId="4392" RevisionGUID="fa675ed2-2f12-41f8-9be8-2957c6090609" CreationDate="2010-10-08T20:56:12.613" UserId="2452" Text="Where can I find a pixel shader example for smooth SpotLight?" />
  <row Id="8713" PostHistoryTypeId="3" PostId="4392" RevisionGUID="fa675ed2-2f12-41f8-9be8-2957c6090609" CreationDate="2010-10-08T20:56:12.613" UserId="2452" Text="&lt;special-effects&gt;" />
  <row Id="8714" PostHistoryTypeId="4" PostId="4392" RevisionGUID="f20b74e4-dfab-49e1-860e-c27c418ab2d2" CreationDate="2010-10-08T21:01:13.653" UserId="2452" Comment="edited title" Text="Where can I find a opengl pixel shader example for smooth SpotLight?" />
  <row Id="8715" PostHistoryTypeId="2" PostId="4393" RevisionGUID="ab30cc88-b027-48f4-94e0-93854f154942" CreationDate="2010-10-09T00:25:31.587" UserId="570" Text="I'm thinking of like the SNES, N64, Atari... even the DS today, I suppose.&#xD;&#xA;&#xD;&#xA;SNES games did not usually take up more than 4 MB of space, and N64 games were usually 32 to 64 MB worth of data.&#xD;&#xA;&#xD;&#xA;These days, you can barely compile a &quot;hello world!&quot; program without the resulting compilation generating 1.21 gigabytes!! of data. (Joking aside, files today do take up tons and tons of space compared to some of the technology back then.)&#xD;&#xA;&#xD;&#xA;So... how did they do it?&#xD;&#xA;&#xD;&#xA;- What did they program these games in? ASM? *The entire thing in ASM?!*&#xD;&#xA;- How were graphics created? What technology did they have to create sprite sheets and, in some cases (like the N64), 3D models?&#xD;&#xA;- How did they fit so many levels, characters, quests and items on these cartridges? I mean, Super Mario World on the SNES clocks in around 1 MB, and it has 96 exits! Ocarina of Time, Banjo-Kazooie, DK64 and a few other games take up less than 64 MB and had huge worlds, tons of content and 3D models!&#xD;&#xA;&#xD;&#xA;Sorry if my questions seem a little out-there, I'm just amazed that a lot of great titles out there managed to fit in such a small storage space. &#xD;&#xA;&#xD;&#xA;It's fascinating to me because even tiniest and most trivial of files and games manage to take up at least a few MB, so imagining that huge levels like those in GoldenEye 007 managed to take almost no data at all is mind-blowing." />
  <row Id="8716" PostHistoryTypeId="1" PostId="4393" RevisionGUID="ab30cc88-b027-48f4-94e0-93854f154942" CreationDate="2010-10-09T00:25:31.587" UserId="570" Text="How were cartridge-based games programmed?" />
  <row Id="8717" PostHistoryTypeId="3" PostId="4393" RevisionGUID="ab30cc88-b027-48f4-94e0-93854f154942" CreationDate="2010-10-09T00:25:31.587" UserId="570" Text="&lt;old-school&gt;" />
  <row Id="8718" PostHistoryTypeId="16" PostId="4393" RevisionGUID="9aa1247c-8c70-4f1c-b16f-1ac0efdc4c50" CreationDate="2010-10-09T01:45:26.997" UserId="570" />
  <row Id="8719" PostHistoryTypeId="2" PostId="4394" RevisionGUID="fb78c2a4-bcb0-4490-bb02-5e5107c03656" CreationDate="2010-10-09T01:56:23.570" UserId="2455" Text="Earth-Centered, Earth-Fixed&#xD;&#xA;&#xD;&#xA;[ECEF][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/ECEF&#xD;&#xA;&#xD;&#xA;Edit: don't worry about the gravity vector, it's always easy to get a unit vector to the origin.&#xD;&#xA;Doubles will do your XYZ units just fine." />
  <row Id="8720" PostHistoryTypeId="2" PostId="4395" RevisionGUID="b8bb6495-840a-4566-8110-211e908acb91" CreationDate="2010-10-09T02:27:25.973" UserId="2220" Text="There are a lot of sub-topics in almost all of the questions you are asking. Optimization is a huge field all to itself and there are a lot of things to explore.&#xD;&#xA;&#xD;&#xA;If you are interested in this sort of optimization, one of the things you might explore is the [demoscene][1]. The demoscene, and some of its related art cultures, has long retained a sense of wonder about trying to create intricate art for computers that takes up as little space as possible. Many of them will have information on how they did some or all of their &quot;tricks&quot;.&#xD;&#xA;&#xD;&#xA;Often there is an artful mix of common sense, although there are &quot;tricks&quot; and &quot;hacks&quot; specific to a game or genre. Often there's a bit of &quot;luck&quot; involved, and a team knowing the limits they are working for (perhaps continually butting heads with those limits throughout the process), knowing their available trade-offs, and be willing to make some of the necessary trade-offs and sacrifices to meet their limits.&#xD;&#xA;&#xD;&#xA;Here are some of the things that I can think of that can help a team get a game to smaller sizes:&#xD;&#xA;&#xD;&#xA;- Reuse What You Can: reusing the same sprites, and the variations that you can easily make from a single sprite image (such as reflections, rotations, palette shifts) will save you space. The same goes for code, music, and nearly everything else in a game.&#xD;&#xA;- Compress What You Can: there are a number of compression schemes out there, and knowing which ones to use can be a huge space savings. Even sometimes simple compression schemes like run-length encoding can make a surprising difference. Not only that, but there are compression schemes (and alternative formats that aren't exactly compression) for individual file types, often with quality trade-offs. For instance, wave/CD audio files can be compressed, with some marginal loss of information, into MP3 files. Also, file formats like MIDI and sampler-based MOD are alternative formats that take up a lot less space, but encode music entirely differently and require different skills to make them sound good.&#xD;&#xA;* Lose What You Don't Need: can you do it cheaper? For instance, can you still get the &quot;personality&quot; of a character across in fewer pixels (or polygons)? Does the placement of tiles need to be exactly defined by a designer or can they be randomly generated in your program code?&#xD;&#xA;* Code Is Often Cheaper: although you made a joke about how much space a code compile typically takes now ideas (and there are reasons for why this 'platform' has increased over the years, and ways to shrink it when you absolutely need to), but generally if you can do something algorithmically/procedurally/in-code easily, that approach will also be easier to tweak and to reuse for other similar but different looking/feeling assets. Fractals are a particularly easy to see example: you could have an image of an intricate fractal that takes up a lot of space with comparison to the mathematical formula that generates it. The mathematical formula, additionally, may have parameters that can generate similar, but sometimes surprisingly different looking images.&#xD;&#xA;&#xD;&#xA;Anyway, for such a big, loaded set of questions, hopefully some of the topics above will be good starting points for you to learn more.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Demoscene" />
  <row Id="8721" PostHistoryTypeId="16" PostId="4395" RevisionGUID="b8bb6495-840a-4566-8110-211e908acb91" CreationDate="2010-10-09T02:27:25.973" UserId="-1" />
  <row Id="8722" PostHistoryTypeId="2" PostId="4396" RevisionGUID="acc9fbc8-8987-4501-b25e-46ab945d2f4e" CreationDate="2010-10-09T02:50:50.613" UserId="154" Text="It's the art and audio resources that take up space, choice of programming language was more about getting the most of out of the hardware.&#xD;&#xA;&#xD;&#xA;Using N64 as an example, most of the 3rd party games were 8, 12, or 16Mb. The 32 &amp; 64Mb games were mostly from Nintendo as it was so expensive to ship on carts that big for everyone else. That sounds tiny, but then so were the art assets and the final visual output. You have to remember that most N64 games rendered at 320x240 not the 1280x760 or more of today. With such a small output resolution, textures and sprites were much smaller than they are today.&#xD;&#xA;&#xD;&#xA;Because of the tiny texture cache on the N64, most textures were 32x64 pixels with a 4/8bit palette (aka 16/256 colors). Extra color detail was often done by mixing textures and vertex colors. The Banjo games are a good example of this. &#xD;&#xA;&#xD;&#xA;Today a single rock in an Unreal engine game will have multiple 512x512x24bpp or even 32bpp. Plus instead of just a single diffuse texture you've now got normal maps, specular masks, reflection masks, reflection cubemaps and more. So an object that used to have 4Kb of textures is now covered in several MB of data. &#xD;&#xA;&#xD;&#xA;Old games also have a massive amount of reuse of textures. The bushes in Super Mario Bros. are the same texture as the clouds, the hills are the same as the mushrooms. Different characters are just color shifted versions of the same art resources. All of this got more usage out of each texture that was on the cart.&#xD;&#xA;&#xD;&#xA;Audio is another big difference for modern games. Nearly everything in the old days was done with midi tracks. Now both music tracks, voice and sound effects are stored in various compressed audio formats. While certainly smaller than uncompressed data, they are still significantly bigger than their midi equivalents.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8723" PostHistoryTypeId="16" PostId="4396" RevisionGUID="acc9fbc8-8987-4501-b25e-46ab945d2f4e" CreationDate="2010-10-09T02:50:50.613" UserId="-1" />
  <row Id="8724" PostHistoryTypeId="2" PostId="4397" RevisionGUID="6b66429d-b3f1-4681-a019-ee7235410654" CreationDate="2010-10-09T03:04:15.083" UserId="154" Text="Create goal nodes at logical places of interest in your world and then have the NPCs navigate between these nodes. Ideally you also have animations associated with the goals such as looking at a billboard, throwing trash into a trash can, sitting on a bus bench. &#xD;&#xA;&#xD;&#xA;Then as NPCs spawn give them a target to go to and use. Once they've finished the animation at a target, give them a new one. &#xD;&#xA;&#xD;&#xA;To break this up further, having some random idle time after finishing a goal, so they don't all go to the next thing immediately. Also spawn some NPCs at their first target so they immediately start playing the goal animation. The more interesting objects you have in the world the more it will feel like a place." />
  <row Id="8725" PostHistoryTypeId="2" PostId="4398" RevisionGUID="548a65ff-43b6-4379-95f1-922af646e625" CreationDate="2010-10-09T03:21:30.383" UserId="154" Text="You've got 3 main options:&#xD;&#xA;&#xD;&#xA;**Option #1:** (Most robust, but most CPU Intensive)&#xD;&#xA;&#xD;&#xA;In real-time calculate corner areas wide enough for the NPC to hide and that aren't exposed to the player. Choose the nearest for the player to hide.&#xD;&#xA;&#xD;&#xA;This will work on any level which is nice and on levels with geometry that changes during gameplay. But it will take the longest to get working consistently and will use up to most CPU resources during the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Option #2:** (Save level designer time, minimal real-time hit)&#xD;&#xA;&#xD;&#xA;Create an offline tool that does the corner test and then places nodes in your level for all potential cover areas. LD's can then tweak these nodes or remove ones that aren't appropriate. &#xD;&#xA;&#xD;&#xA;During gameplay just find the nearest valid node.&#xD;&#xA;&#xD;&#xA;This is nice in that your corner finding routing doesn't have to be 100% accurate since LD's can screen out a few bad nodes here and there. Can't respond to changes in geometry though unless you start getting clever with attaching them to objects, or scripting them on/off.&#xD;&#xA;&#xD;&#xA;**Option #3:** (Brute Force, minimal real-time hit)&#xD;&#xA;&#xD;&#xA;Have LD's manually place all cover nodes, and then just choose the nearest valid node during gameplay. &#xD;&#xA;&#xD;&#xA;If you have lots of levels or big levels expect the LDs to complain. " />
  <row Id="8726" PostHistoryTypeId="2" PostId="4399" RevisionGUID="9f33d10f-8e97-448c-89bc-8957d7d07113" CreationDate="2010-10-09T03:28:13.943" UserId="2289" Text="Is there any way to enable a temporary clipping mask in XNA while using a SpriteBatch? I'm drawing a bunch of Texture2D objects and Sprites in a given rectangle, and I want to make sure that said objects aren't drawn outside of that rectangle. If it's of any help, I'm already drawing my content within a Viewport, I'm not sure if I can draw, for instance, in another Viewport within that Viewport.&#xD;&#xA;&#xD;&#xA;Illustrative image of what I'm trying to accomplish: http://i955.photobucket.com/albums/ae34/ThatsGobbles/Untitled-1.png" />
  <row Id="8727" PostHistoryTypeId="1" PostId="4399" RevisionGUID="9f33d10f-8e97-448c-89bc-8957d7d07113" CreationDate="2010-10-09T03:28:13.943" UserId="2289" Text="Clipping a SpriteBatch Draw() in XNA" />
  <row Id="8728" PostHistoryTypeId="3" PostId="4399" RevisionGUID="9f33d10f-8e97-448c-89bc-8957d7d07113" CreationDate="2010-10-09T03:28:13.943" UserId="2289" Text="&lt;xna&gt;&lt;c#&gt;&lt;sprites&gt;" />
  <row Id="8729" PostHistoryTypeId="2" PostId="4400" RevisionGUID="aec76a3a-0041-430c-8acd-659cd7fa54dc" CreationDate="2010-10-09T03:32:27.350" UserId="189" Text="You need to use a [Stencil Buffer][1]. This is specified by passing a [DepthStencilState][2] into your [SpriteBatch.Begin][3] method call.&#xD;&#xA;&#xD;&#xA;&gt;For example, to remove an object from a scene, fill a stencil buffer with a cut out pattern (using zeros) for each pixel where the object is visible. This is done by setting the reference stencil value to 0, clearing the stencil buffer, and rendering the object. Then set the reference stencil value to 1, set the compare function to CompareFunction.LessEqual, and render again. The stencil data masks those pixels whose value is non zero but less than 1, resulting in drawing over (or removing) the object.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb976074.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.depthstencilstate.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ff433699.aspx" />
  <row Id="8730" PostHistoryTypeId="2" PostId="4401" RevisionGUID="cc03c5fd-8595-45cd-a1d1-9b7e4591eb4c" CreationDate="2010-10-09T04:32:13.523" UserId="2272" Text="The scissor rect is a bit easier to use than the stencil buffer.  You need to set [ScissorRect][1] to your Rectangle and set [ScissorTestEnable][2] to true.&#xD;&#xA;&#xD;&#xA;            spriteBatch.GraphicsDevice.RenderState.ScissorTestEnable = true;&#xD;&#xA;            spriteBatch.GraphicsDevice.ScissorRectangle = clipRect;&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevice.scissorrectangle(v=XNAGameStudio.31).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.renderstate.scissortestenable(v=XNAGameStudio.31).aspx" />
  <row Id="8731" PostHistoryTypeId="2" PostId="4402" RevisionGUID="7c05c240-56eb-443e-839b-a4f8421e8a38" CreationDate="2010-10-09T06:39:30.110" UserId="2456" Text="Are there any major/fundamental concepts that one should know about game programming versus control driven programming? &#xD;&#xA;&#xD;&#xA;Game Programming is event based? with a timer? An outer-infinite loop?&#xD;&#xA;&#xD;&#xA;I come with a background of C++, Java and Ruby. I'm interested in making a basic 2D Game in Flash. Is there anything else that may be easier for me to jump into? I'm currently interested in only 2D since I don't think I'm ready for 3D. &#xD;&#xA;&#xD;&#xA;Any great books that a interested game programmer should read?&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="8732" PostHistoryTypeId="1" PostId="4402" RevisionGUID="7c05c240-56eb-443e-839b-a4f8421e8a38" CreationDate="2010-10-09T06:39:30.110" UserId="2456" Text="Game Programming " />
  <row Id="8733" PostHistoryTypeId="3" PostId="4402" RevisionGUID="7c05c240-56eb-443e-839b-a4f8421e8a38" CreationDate="2010-10-09T06:39:30.110" UserId="2456" Text="&lt;game-mechanics&gt;" />
  <row Id="8734" PostHistoryTypeId="2" PostId="4403" RevisionGUID="35a6b7d2-e860-4e69-b1aa-2f74339bf883" CreationDate="2010-10-09T07:42:18.663" UserId="2458" Text="How to detect a collision between a sprite and a user generated shape of some sort.&#xD;&#xA;&#xD;&#xA;For example. There are some objects on the screen. The user takes their finger and draws an circle shape around a object (The selection rule is painting circle around the sprite, but the painting shapes may be various). I need to detect which object selected, which just like:&#xD;&#xA;&#xD;&#xA;(demo images)&#xD;&#xA;http://i52.tinypic.com/28h0t1g.png" />
  <row Id="8735" PostHistoryTypeId="1" PostId="4403" RevisionGUID="35a6b7d2-e860-4e69-b1aa-2f74339bf883" CreationDate="2010-10-09T07:42:18.663" UserId="2458" Text="How to detect collisions between sprite and a user generated shape of some sort?" />
  <row Id="8736" PostHistoryTypeId="3" PostId="4403" RevisionGUID="35a6b7d2-e860-4e69-b1aa-2f74339bf883" CreationDate="2010-10-09T07:42:18.663" UserId="2458" Text="&lt;collision-detection&gt;" />
  <row Id="8737" PostHistoryTypeId="5" PostId="4076" RevisionGUID="b979fc5a-92ba-4ccb-8d36-148256d5fa46" CreationDate="2010-10-09T08:29:02.003" UserId="323" Comment="edited body" Text="Most likely not - I doubt Torque would want their engine to be open-sourced.&#xD;&#xA;&#xD;&#xA;For a real answer, read the license you signed when you bought the engine.&#xD;&#xA;&#xD;&#xA;For an even better answer, read the license, then hire a lawyer to read the license.&#xD;&#xA;&#xD;&#xA;What you may be able to do is distribute the Torque modifications as a patch. Anyone who has the engine source will be able to apply the patch and release a build. But, again, *consult a lawyer* before doing this." />
  <row Id="8738" PostHistoryTypeId="4" PostId="4169" RevisionGUID="c11836a4-ceb3-45d1-9295-a9874a6ec6a4" CreationDate="2010-10-09T11:04:35.000" UserId="744" Comment="edited title" Text="How do I render a mirror or other reflective surfaces?" />
  <row Id="8739" PostHistoryTypeId="2" PostId="4404" RevisionGUID="6d46be29-a7a2-4fb5-b765-0bfb9cc73f3c" CreationDate="2010-10-09T12:05:00.063" UserId="20" Text="Your question sounds a lot like the one I answered here: http://gamedev.stackexchange.com/questions/335/what-is-a-good-tool-for-producing-animated-sprites/385#385&#xD;&#xA;&#xD;&#xA;You can basically create your animations in whichever program you prefer. When using Illustrator I suggest you create the animation-steps on layers or even import the artwork into Flash for animation (since Flash CS4 you can also create bones in flash. [See here for a tutorial][1]).&#xD;&#xA;&#xD;&#xA;Once you have your animations done, just export the frames to images and then use the method described in my answer (above) to create a sprite-sheet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=6wylebW68c4" />
  <row Id="8740" PostHistoryTypeId="4" PostId="3807" RevisionGUID="53e4ba3e-1d1b-4af8-b0ce-38b3dd921a24" CreationDate="2010-10-09T13:44:37.737" UserId="744" Comment="edited title" Text="How can I copy or back-calculate definitions for an entire b2World?" />
  <row Id="8741" PostHistoryTypeId="4" PostId="4383" RevisionGUID="8b33177d-5988-491f-a78c-662840e7189a" CreationDate="2010-10-09T13:46:15.303" UserId="744" Comment="edited title" Text="How do I query available video memory using DirectX?" />
  <row Id="8742" PostHistoryTypeId="2" PostId="4405" RevisionGUID="9b4e04a9-ad8f-44fa-89d9-90b4bf0145c9" CreationDate="2010-10-09T13:58:36.773" UserId="744" Text="**How do you get curves in Box2D?**&#xD;&#xA;&#xD;&#xA;In &lt;a href=&quot;http://code.google.com/p/box2d/source/list&quot;&gt;the unreleased version of Box2D&lt;/a&gt;, there are two new shape types, &lt;a href=&quot;http://code.google.com/p/box2d/source/browse/trunk/Box2D/Box2D/Collision/Shapes/b2LoopShape.cpp&quot;&gt;b2LoopShape&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/box2d/source/browse/trunk/Box2D/Box2D/Collision/Shapes/b2EdgeShape.cpp&quot;&gt;b2EdgeShape&lt;/a&gt;, which let you build curves out of a sequence of line segments.&#xD;&#xA;&#xD;&#xA;In the released version, you can use multiple small boxes set at angles to get a similar effect, but bodies have a tendency to do unstable and unexpected things near connection points. So I'd recommend using the unreleased version.&#xD;&#xA;&#xD;&#xA;**How can a character fall down the curve?**&#xD;&#xA;&#xD;&#xA;Make the character a wheel! &lt;a href=&quot;http://gamedev.stackexchange.com/questions/2799/good-2d-platformer-physics&quot;&gt;My question about platformer physics has some discussion on this&lt;/a&gt;, but the basic idea is to mount your character's body on a rotating wheel, and move by applying rotational force to the wheel. Even though (actually, because) the wheel has friction, the downward force from gravity will cause it to rotate down slopes - like a real wheel. By changing the &lt;a href=&quot;http://box2d.org/manual.html#_Toc258082974&quot;&gt;revolute joint's motor parameters&lt;/a&gt;, you can make it resist rotation as much as is necessary to avoid it rolling down small inclines." />
  <row Id="8743" PostHistoryTypeId="2" PostId="4406" RevisionGUID="5c1d16b5-b0fe-4d7a-a7c3-9c5ae4a9ed59" CreationDate="2010-10-09T14:45:44.300" UserId="1677" Text="If shape is hand-drawn like in [Crayon Physics][1], you can hold an array of straight lines and check collisions with each of them. Despite of straight lines you can use [Bezier curves][2] or something like that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.crayonphysics.com/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/B%C3%A9zier_curve" />
  <row Id="8744" PostHistoryTypeId="2" PostId="4407" RevisionGUID="00275c14-bf0b-40f9-8caf-19f8730cb449" CreationDate="2010-10-09T15:14:37.730" UserId="189" Text="Ignoring your book question, since that is answered elsewhere...&#xD;&#xA;&#xD;&#xA;&gt;Game Programming is event based? with a timer? An outer-infinite loop?&#xD;&#xA;&#xD;&#xA;Typically the latter is the case, that you have an &quot;outer-infinite loop&quot;, or [game loop][1], which repeatedly updates the game state and renders to the screen.&#xD;&#xA;&#xD;&#xA;However, in Flash, I believe they use a timer to simulate this game loop; a function is called repeatedly, and that function should update the state of your game. You don't need to redraw the entire screen in Flash, but instead you move entities and change keyframes and things like that, using ActionScript. The Flash plugin handles drawing things.&#xD;&#xA;&#xD;&#xA;The only games that would be event-based would be perhaps puzzle games or card games. For example, Solitaire would not require a game loop rendering the screen at 60 FPS; it can just react to user input actions and draw when necessary.&#xD;&#xA;&#xD;&#xA;Flash affords other features you can take advantage of; for example, its timeline nature means that you can implement different game screens as keyframes on the timeline (game screens being the different states of your game - main menu, game, pause screen, credits,...).&#xD;&#xA;&#xD;&#xA;It's good that you're aiming for 2D. Flash doesn't really do 3D, and it is indeed an added level of complexity that you shouldn't have to deal with until you are clear about the game loop and other important game programming basics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Game_programming#Game_structure" />
  <row Id="8745" PostHistoryTypeId="2" PostId="4408" RevisionGUID="919cdafb-8c51-4e36-b17c-389aacd1c6c9" CreationDate="2010-10-09T15:53:35.920" UserId="573" Text="I'm working on a game that uses sprite sheets with rotation for animations.  While the effect is pretty good, the quality of the rotations is somewhat lacking.  I exported a flash animation to png sequence and then used a C# app to do matrix based rotations (System.Drawing.Drawing2D.Matrix).&#xD;&#xA;&#xD;&#xA;Unfortunately, there are several places where the image gets clipped.&#xD;&#xA;&#xD;&#xA;What would you suggest for a way to get high quality rotations from either flash or the exported PNGs?  A circle should fit within the same image boundaries.  I don't mind a new program that I must write or an existing program I must download/buy.&#xD;&#xA;&#xD;&#xA;![Example Sprite sheet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/TcrtQ.png" />
  <row Id="8746" PostHistoryTypeId="1" PostId="4408" RevisionGUID="919cdafb-8c51-4e36-b17c-389aacd1c6c9" CreationDate="2010-10-09T15:53:35.920" UserId="573" Text="How to get quality sprite sheet generation with rotations" />
  <row Id="8747" PostHistoryTypeId="3" PostId="4408" RevisionGUID="919cdafb-8c51-4e36-b17c-389aacd1c6c9" CreationDate="2010-10-09T15:53:35.920" UserId="573" Text="&lt;flash&gt;&lt;sprites&gt;&lt;spritesheet&gt;&lt;image&gt;&lt;rotation&gt;" />
  <row Id="8748" PostHistoryTypeId="2" PostId="4409" RevisionGUID="8d3538df-0fba-4542-b636-51227af61e74" CreationDate="2010-10-09T15:59:38.790" UserId="469" Text="I have the following problem: Although I know some of color theory, and the interface design ideals (about how it must be usable, and etc...), my interfaces are REALLY ugly. fugly, eye bleed material, etc...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am not finding anywhere, information on how to create the graphical part of a interface, how to choose the layout, objects, colours, cursor, etc...&#xD;&#xA;&#xD;&#xA;I am doing now most by copying other games, or by &quot;feeling&quot;, something that does not always work correctly...&#xD;&#xA;&#xD;&#xA;So, what I need to know about it? Where I find it? How I do it?" />
  <row Id="8749" PostHistoryTypeId="1" PostId="4409" RevisionGUID="8d3538df-0fba-4542-b636-51227af61e74" CreationDate="2010-10-09T15:59:38.790" UserId="469" Text="GRAPHICAL interface design." />
  <row Id="8750" PostHistoryTypeId="3" PostId="4409" RevisionGUID="8d3538df-0fba-4542-b636-51227af61e74" CreationDate="2010-10-09T15:59:38.790" UserId="469" Text="&lt;gui&gt;&lt;interface&gt;&lt;design&gt;" />
  <row Id="8751" PostHistoryTypeId="5" PostId="4344" RevisionGUID="bee3c038-bd05-4092-8ba0-b2044a1f47d8" CreationDate="2010-10-09T16:04:27.607" UserId="542" Comment="deleted 111 characters in body" Text="Short answer yes.&#xD;&#xA;&#xD;&#xA;Long answer,&#xD;&#xA;&#xD;&#xA;I still work in an environment totally dependent on IE6 and have [used this wonderful library for charts.][1] (which uses VML for IE6-IE8) I definitely love canvas and prefer it for writing games with js. So if you want to make a game in svg I say do it, other games have been created using it (see Raphael examples). Regardless you will still be using JS to do it, so if you want to transition to canvas, it wont be as painful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://raphaeljs.com/" />
  <row Id="8752" PostHistoryTypeId="5" PostId="4391" RevisionGUID="d003c610-5ea1-49ca-bdbd-cea7f2b89277" CreationDate="2010-10-09T16:46:01.273" UserId="14" Comment="added 1 characters in body" Text="From the problems that you are having I recommend that you do the following:&#xD;&#xA;&#xD;&#xA;First, work with layers and folders. It really does help, Group individual sprites together in folders so that you can move the whole of them around and parts that are replicated should exist on seperate layers.&#xD;&#xA;&#xD;&#xA;(So if there is a sword or something it should be on a layer, eyes should be on a layer, etc). Thats where the real power of these type of applications are for such a task. If you mess something up, you don't mess it all up just that layer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, enable the ruler and enable the grid. (Also take the time to set them up correctly in the preferences menu). If click the ruler and drag away from it, you can create guidelines. Setting up your own limits using the guidelines will allow you to snap the sprites (which should now be in folders) to the grid lines allowing you to position them far better.&#xD;&#xA;&#xD;&#xA;Then finally, if things still seem a bit out of phase when the animation is playing. If you zoom all the way in (you may need to make sure this is enabled in the preferences menu) you can see an individual per-pixel grid. Which should allow you to place things exactly where you need them to be.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8753" PostHistoryTypeId="2" PostId="4410" RevisionGUID="09e8218d-20df-4781-8c98-97da20254e7b" CreationDate="2010-10-09T20:16:06.860" UserId="27" Text="If you have a bunch of images, here's a tool you can use to create sprite sheets:&#xD;&#xA;&#xD;&#xA;http://www.retroaffect.com/blog/159/Image_Atlas_Packer/#b&#xD;&#xA;&#xD;&#xA;It's completely free, and will pack a bunch of images into N number of sprite sheets." />
  <row Id="8754" PostHistoryTypeId="2" PostId="4411" RevisionGUID="21495f0f-e9d4-4202-a733-bb66c44993a9" CreationDate="2010-10-09T21:41:35.883" UserId="360" Text="I think what you're looking for is something similar to soft shadows, only lightening instead. You could have a look at both nVidia and ATI's developer sections for sample shaders to do all sorts of things." />
  <row Id="8755" PostHistoryTypeId="2" PostId="4412" RevisionGUID="837ff1d9-1ed6-45f2-893d-795f6317aa8a" CreationDate="2010-10-09T22:03:37.027" UserId="490" Text="Spritesheets? Mac? Take Zwoptex: http://zwoptexapp.com/&#xD;&#xA;" />
  <row Id="8756" PostHistoryTypeId="2" PostId="4413" RevisionGUID="25a94ffd-b695-463c-9e19-b63ac409a4f4" CreationDate="2010-10-09T23:59:44.400" UserId="2338" Text="If a 24bit RGB image with a range of 0-255 per channel is displayed on a television that displays a range of approx. 16-235 per channel, color detail will be lost, correct?&#xD;&#xA;&#xD;&#xA;If so, should images be pre-processed to only store a valid range? I would like to do this with code, not in a picture editing application. I vaguely recall reading that a linear mapping is not the best way to do this, but unfortunately I can't locate the article I was reading! What is this process called? What other details do I need to know?" />
  <row Id="8757" PostHistoryTypeId="1" PostId="4413" RevisionGUID="25a94ffd-b695-463c-9e19-b63ac409a4f4" CreationDate="2010-10-09T23:59:44.400" UserId="2338" Text="Should the color of a texture be adjusted for display on a televsion?" />
  <row Id="8758" PostHistoryTypeId="3" PostId="4413" RevisionGUID="25a94ffd-b695-463c-9e19-b63ac409a4f4" CreationDate="2010-10-09T23:59:44.400" UserId="2338" Text="&lt;textures&gt;&lt;c&gt;&lt;console&gt;&lt;image&gt;" />
  <row Id="8759" PostHistoryTypeId="4" PostId="4413" RevisionGUID="9002eb2d-4270-4f22-89e1-142b56dfcb04" CreationDate="2010-10-10T00:59:20.853" UserId="2338" Comment="edited title" Text="Should the color of a texture be adjusted for display on a television?" />
  <row Id="8760" PostHistoryTypeId="2" PostId="4414" RevisionGUID="b8f0e68a-4916-4701-97d5-b1e51d836f1e" CreationDate="2010-10-10T02:02:25.693" UserId="2345" Text="Some color data will be lost or changes regardless of your texture format. However, a bigger problem will be gamma correction. Gamma correction can be a tricky subject since your game will not appear visually the same across all display technologies and finding a single solution is not going to be easy.&#xD;&#xA;&#xD;&#xA;These might help you out:&#xD;&#xA;&#xD;&#xA;- http://maddieman.wordpress.com/2009/06/23/gamma-correction-and-linear-colour-space-simplified/&#xD;&#xA;- http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html&#xD;&#xA;- http://blog.wolfire.com/2010/02/Gamma-correct-lighting&#xD;&#xA;- http://renderwonk.com/blog/index.php/archive/adventures-with-gamma-correct-rendering/&#xD;&#xA;- http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html" />
  <row Id="8761" PostHistoryTypeId="5" PostId="4414" RevisionGUID="13aaca74-46ed-45bd-b73c-36e0ff7ec36f" CreationDate="2010-10-10T02:08:47.207" UserId="2345" Comment="edited body" Text="Some color data will be lost or changed regardless of your texture format. However, a bigger problem will be gamma correction. Gamma correction can be a tricky subject since your game will not appear visually the same across all display technologies and finding a single solution is not going to be easy.&#xD;&#xA;&#xD;&#xA;These might help you out:&#xD;&#xA;&#xD;&#xA;- http://maddieman.wordpress.com/2009/06/23/gamma-correction-and-linear-colour-space-simplified/&#xD;&#xA;- http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html&#xD;&#xA;- http://blog.wolfire.com/2010/02/Gamma-correct-lighting&#xD;&#xA;- http://renderwonk.com/blog/index.php/archive/adventures-with-gamma-correct-rendering/&#xD;&#xA;- http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html" />
  <row Id="8762" PostHistoryTypeId="2" PostId="4415" RevisionGUID="fdc53421-96ef-4f78-8959-e8c8f4ce2cbf" CreationDate="2010-10-10T04:40:17.420" UserId="1021" Text="What ad providers/networks do you use to put ads in your games?  What has been your experience?" />
  <row Id="8763" PostHistoryTypeId="1" PostId="4415" RevisionGUID="fdc53421-96ef-4f78-8959-e8c8f4ce2cbf" CreationDate="2010-10-10T04:40:17.420" UserId="1021" Text="What advertising provider/network do you use when placing ads in your games?" />
  <row Id="8764" PostHistoryTypeId="3" PostId="4415" RevisionGUID="fdc53421-96ef-4f78-8959-e8c8f4ce2cbf" CreationDate="2010-10-10T04:40:17.420" UserId="1021" Text="&lt;marketing&gt;" />
  <row Id="8765" PostHistoryTypeId="4" PostId="4415" RevisionGUID="441e4c1b-1e37-4446-ba7e-28357f1985f7" CreationDate="2010-10-10T04:49:53.370" UserId="1021" Comment="title" Text="What ad provider/network do you use when placing ads in your games?" />
  <row Id="8766" PostHistoryTypeId="2" PostId="4416" RevisionGUID="a79024ac-2eff-4118-af17-2ef493fb4aad" CreationDate="2010-10-10T08:58:20.303" UserId="744" Text="Linear mapping is probably not the _best_ solution (which I believe involves converting your RGB to a &lt;a href=&quot;http://en.wikipedia.org/wiki/CIE_1931_color_space&quot;&gt;CIE colorspace&lt;/a&gt;, scaling there, and converting back), but it is very easy to implement, and the range difference is small enough it probably won't matter.&#xD;&#xA;&#xD;&#xA;If you use &lt;a href=&quot;http://www.lonesock.net/soil.html&quot;&gt;SOIL&lt;/a&gt;, it can automatically do this when loading the image, by passing SOIL_FLAG_NTSC_SAFE_RGB to the load functions.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ee418274.aspx&quot;&gt;Microsoft's documentation&lt;/a&gt; says to clamp, and recommends doing it in a pixel shader. (Linear scaling should also be easy in one.) It also mentions chroma crawl, which in my experience is a much more annoying phenomenon when working on TV displays." />
  <row Id="8767" PostHistoryTypeId="2" PostId="4417" RevisionGUID="3ec8d14b-2cc3-45e7-80ca-7f7c5d81531a" CreationDate="2010-10-10T15:41:51.730" UserId="2184" Text="Portland, Oregon, USA:  http://pagdig.org  has a monthly get together" />
  <row Id="8768" PostHistoryTypeId="2" PostId="4418" RevisionGUID="ba66b02e-77ff-4a8d-81f9-c4db7cefb09e" CreationDate="2010-10-10T15:48:26.563" UserId="2184" Text="http://zwoptexapp.com/ might do what you want (It's a Mac OS X application)" />
  <row Id="8769" PostHistoryTypeId="2" PostId="4419" RevisionGUID="06a35881-9f19-4718-ac73-ef47fd4c1489" CreationDate="2010-10-10T17:41:55.313" UserId="259" Text="For the Cambridge, UK indie scene, including Chris Delay of Introversion and the creator of VVVVVV, see [Cambridge Friendship Club][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cambridgeindies.co.uk/" />
  <row Id="8770" PostHistoryTypeId="2" PostId="4420" RevisionGUID="e1589621-4291-476e-a7ab-56be2c7f61b8" CreationDate="2010-10-10T20:35:52.577" UserId="2081" Text="Whenever I need to do large batch image transformations, I immediately turn to [the GIMP](http://www.gimp.org/). You can very easily write a [Scheme](http://www.gimp.org/tutorials/Basic_Scheme2/) program that uses the (thorougly documented, easily searchable) GIMP data API to manipulate images in any way you can name, and it's possible to do it all [from the command line](http://www.gimp.org/tutorials/Basic_Batch/), as well. Over time I've developed a host of scripts that have made my life as a developer *much* easier, and gotten good experience working with Scheme in the process. If you're not comfortable working in Scheme, there are language bindings for [Perl](http://www.gimp.org/tutorials/Basic_Perl/) as well. You can use the Script-Fu Procedure Browser that comes with the GIMP to search the documentation.&#xD;&#xA;&#xD;&#xA;Some procedures of interest to get you started:&#xD;&#xA;&#xD;&#xA;  * `gimp-image-new`&#xD;&#xA;  * `gimp-image-resize`&#xD;&#xA;  * `gimp-image-get-layers`&#xD;&#xA;  * `gimp-drawable-transform-rotate`&#xD;&#xA;  * `gimp-image-merge-visible-layers`&#xD;&#xA;  * `gimp-image-set-active-layer`&#xD;&#xA;" />
  <row Id="8771" PostHistoryTypeId="2" PostId="4421" RevisionGUID="47b0f9ce-94dd-4355-9bb6-aa6bb5c8719d" CreationDate="2010-10-10T20:47:27.520" UserId="962" Text="**Write some Actionscript to generate the spritesheets for you, and either use the BitmapData in flash, or use as3corelib to export the pngs for you.**&#xD;&#xA;&#xD;&#xA;If your originals are vector, it is probably best for flash to take care of the rendering at different rotations/scales, as rotating a png is destructive, and lowers the quality.&#xD;&#xA;&#xD;&#xA;If you are doing a game in ActionScript, there is no need to export a PNG for the graphics, you can make sprite sheets in memory from regular Timeline Animations.&#xD;&#xA;&#xD;&#xA;If you need the PNGs for a non ActionScript game, you could make the sprite sheets in ActionScript from timeline animations and export the BitmapData with this library that can export different formats with the help of a webserver with PHP.&#xD;&#xA;&#xD;&#xA;http://github.com/mikechambers/as3corelib&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8772" PostHistoryTypeId="2" PostId="4422" RevisionGUID="31c35a9a-fda9-498d-b793-9dcb34341ebd" CreationDate="2010-10-11T03:20:01.860" UserId="831" Text="So my long term one-man indie project is turning into a two-man indie project, and I feel I need to take a step back and at least have a &quot;sell-sheet&quot; as a basis for the game design.&#xD;&#xA;&#xD;&#xA;Does anyone have any good templates or tips?" />
  <row Id="8773" PostHistoryTypeId="1" PostId="4422" RevisionGUID="31c35a9a-fda9-498d-b793-9dcb34341ebd" CreationDate="2010-10-11T03:20:01.860" UserId="831" Text="An good example sell-sheets for a game?" />
  <row Id="8774" PostHistoryTypeId="3" PostId="4422" RevisionGUID="31c35a9a-fda9-498d-b793-9dcb34341ebd" CreationDate="2010-10-11T03:20:01.860" UserId="831" Text="&lt;game-design&gt;&lt;design-document&gt;" />
  <row Id="8775" PostHistoryTypeId="6" PostId="4348" RevisionGUID="4c60ec4f-23e3-4216-8071-e9ac9a25cd21" CreationDate="2010-10-11T08:33:01.620" UserId="744" Comment="edited tags" Text="&lt;game-design&gt;&lt;flash&gt;&lt;box2d&gt;&lt;physics-engine&gt;" />
  <row Id="8776" PostHistoryTypeId="4" PostId="4422" RevisionGUID="83b43ca2-25b4-48b9-96d4-d89981819739" CreationDate="2010-10-11T08:34:25.953" UserId="744" Comment="edited title" Text="Where can I see example sell-sheets for a game?" />
  <row Id="8777" PostHistoryTypeId="2" PostId="4423" RevisionGUID="20f5b87d-69aa-447a-b37e-bdc1d340fd4c" CreationDate="2010-10-11T09:59:57.823" UserId="685" Text="In OgreConfig.h you can find the OGRE_MAX_BLEND_WEIGHTS option. It is set to 4 by default and I never tried setting it to anything else myself, but it is worth a try.&#xD;&#xA;&#xD;&#xA;The Ogre mesh file format itself has no limit for the number of bone assignments per vertex. The binary format simply stores bone assignment as arrays of {unsigned int vertexindex; unsigned short boneindex; float weight;}&#xD;&#xA;&#xD;&#xA;On the other hand, seven blend weights seems like overkill, so another way is to leave out the three assignments with the smallest weights and adjust the other four bone assignments." />
  <row Id="8778" PostHistoryTypeId="5" PostId="4423" RevisionGUID="f9212614-798a-44a7-b28c-4b42ca00106a" CreationDate="2010-10-11T12:23:58.730" UserId="685" Comment="added 51 characters in body" Text="In OgreConfig.h you can find the OGRE_MAX_BLEND_WEIGHTS option. It is set to 4 by default and I never tried setting it to anything else myself, but it is worth a try. (You have to recompile Ogre afterwards of course.)&#xD;&#xA;&#xD;&#xA;The Ogre mesh file format itself has no limit for the number of bone assignments per vertex. The binary format simply stores bone assignment as arrays of {unsigned int vertexindex; unsigned short boneindex; float weight;}&#xD;&#xA;&#xD;&#xA;On the other hand, seven blend weights seems like overkill, so another way is to leave out the three assignments with the smallest weights and adjust the other four bone assignments." />
  <row Id="8779" PostHistoryTypeId="2" PostId="4424" RevisionGUID="ca0dbdd7-a5d0-4749-a1ae-b9589e35c407" CreationDate="2010-10-11T14:21:45.460" UserId="1101" Text="We used [IGA][1] for our game. My personal experience - not speaking on behalf of our company - was that it was a bit fiddly to use. The API, despite being really small, seemed to change quite often, and they could be quite demanding about how much effort you had to go to in order to register an ad impression (to the point where performance could potentially suffer).&#xD;&#xA;&#xD;&#xA;My experience is a year or more old however and I can't comment on the current state of their offering.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.igaworldwide.com/" />
  <row Id="8780" PostHistoryTypeId="2" PostId="4425" RevisionGUID="b4020809-45db-4fcb-ba93-0e5cbd1c0204" CreationDate="2010-10-11T14:30:14.753" UserId="1101" Text="You will always get some clipping if you restrict the rotated images to the same dimensions as the original image. Even your circular image is ultimately made up of squares, and when you rotate a square, the corners will move outside the original boundaries.&#xD;&#xA;&#xD;&#xA;To accommodate a 10 pixel square in all possible rotations you need at least 15 pixels to accommodate the 45° rotation, ie. the length of the diagonal. You can calculate this using Pythagoras' theorem: for squares you need about 42% extra space in both directions, for example." />
  <row Id="8781" PostHistoryTypeId="2" PostId="4426" RevisionGUID="26d1c49c-2963-4c3d-a275-bfc94a29c2e3" CreationDate="2010-10-11T15:59:52.910" UserId="1592" Text="I own a small web dev shop, and in our down time, I plan on having my guys work on a game (I will be paying them anyway, right?). A few buddies and I started talking about this game, and have been going through the motions of talking/designing it out.&#xD;&#xA;&#xD;&#xA;Only problem we are at an impasse, and can't seem to get passed it. The vote is at 50/50%. Compromising hasn't worked.&#xD;&#xA;&#xD;&#xA;I have though about just making an executive decision since I am funding the development/design of the game, but I don't want to lose my friends support for the game, and their other opinions.&#xD;&#xA;&#xD;&#xA;I don't know what to do." />
  <row Id="8782" PostHistoryTypeId="1" PostId="4426" RevisionGUID="26d1c49c-2963-4c3d-a275-bfc94a29c2e3" CreationDate="2010-10-11T15:59:52.910" UserId="1592" Text="What do you do when you are at an impasse in the design phase?" />
  <row Id="8783" PostHistoryTypeId="3" PostId="4426" RevisionGUID="26d1c49c-2963-4c3d-a275-bfc94a29c2e3" CreationDate="2010-10-11T15:59:52.910" UserId="1592" Text="&lt;game-design&gt;" />
  <row Id="8784" PostHistoryTypeId="2" PostId="4427" RevisionGUID="e0903e1c-2a43-4f2e-9bf9-a891511f933a" CreationDate="2010-10-11T16:43:55.343" UserId="962" Text="**Building games by committee is a bad idea, you end up with all the ideas watered down or not implemented correctly.**&#xD;&#xA;&#xD;&#xA;From the beginning you should have put yourself in the &quot;Lead Designer&quot; position, but now I think it could be a bit late for that.&#xD;&#xA;&#xD;&#xA;You should start by having them work on some different 1 or 2 day prototypes to get some of the base gameplay down and then go from there. A lot of ideas that sound bad or too complicated on paper are actually really fun.&#xD;&#xA;&#xD;&#xA;Have each group break off and make a small prototype to test the ideas. Then you have something tangeable to compare, instead of most likely poorly communicated ideas." />
  <row Id="8785" PostHistoryTypeId="2" PostId="4428" RevisionGUID="ce41d1f6-bbce-41d3-8b04-70fafc6adaec" CreationDate="2010-10-11T18:18:58.880" UserId="37" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;[Contrasaurus][2]&#xD;&#xA;&#xD;&#xA;This game was painstakingly created with blood, sweat, tears, and HTML5. The core matrix transform library was spun out as [Matrix.js][3]. Additionally many of the core language extensions, sprites, sounds, and canvas libraries are working their way into [The Pixie Game Platform][4]. &#xD;&#xA;&#xD;&#xA;No Flash, all HTML5 Canvas and Audio. Works best in Chrome.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/BLFCs.png&#xD;&#xA;  [2]: http://contrasaur.us&#xD;&#xA;  [3]: http://github.com/STRd6/matrix.js&#xD;&#xA;  [4]: http://pixie.strd6.com" />
  <row Id="8786" PostHistoryTypeId="2" PostId="4429" RevisionGUID="7ae78a2d-590c-4bb5-8f97-8ca1193817d8" CreationDate="2010-10-11T18:22:03.193" UserId="37" Text="[Matrix.js][1] is good if you want to get Flash style matrix transforms.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/STRd6/matrix.js" />
  <row Id="8787" PostHistoryTypeId="2" PostId="4430" RevisionGUID="58fb2cbb-d8b7-43a0-913d-ebed81d17e3b" CreationDate="2010-10-11T18:33:10.467" UserId="2478" Text="I near completion of implementing mymultiplayer game (in WPF/.NET). I want to exploit the game commercially. To do so, I compiled a list of requirements:&#xD;&#xA;&#xD;&#xA; - .NET/WPF&#xD;&#xA; - Game server (multiplayer)&#xD;&#xA; - Data server (website/ingame info/widgets/etc)&#xD;&#xA; - Website (rules/docs/download)&#xD;&#xA; - Forum&#xD;&#xA; - Rating system (chess-like, but for 4 players)&#xD;&#xA;&#xD;&#xA;What options do I have to create a platform for hosting the game? Obviously, I can create everything myself, which has advantages and disadvantages. Do you have any experience utilizing exisiting services offering (part or complete) above requirements?" />
  <row Id="8788" PostHistoryTypeId="1" PostId="4430" RevisionGUID="58fb2cbb-d8b7-43a0-913d-ebed81d17e3b" CreationDate="2010-10-11T18:33:10.467" UserId="2478" Text="Game platform for .NET" />
  <row Id="8789" PostHistoryTypeId="3" PostId="4430" RevisionGUID="58fb2cbb-d8b7-43a0-913d-ebed81d17e3b" CreationDate="2010-10-11T18:33:10.467" UserId="2478" Text="&lt;platform&gt;" />
  <row Id="8791" PostHistoryTypeId="5" PostId="4430" RevisionGUID="b6050c19-f22a-4ef9-b2b7-a3acd8e16522" CreationDate="2010-10-11T18:57:24.007" UserId="2478" Comment="added 59 characters in body" Text="I near completion of implementing mymultiplayer game (in WPF/.NET). I want to exploit the game commercially. To do so, I compiled a list of requirements:&#xD;&#xA;&#xD;&#xA; - .NET/WPF&#xD;&#xA; - Game server (multiplayer)&#xD;&#xA; - Data server (website/ingame info/widgets/etc)&#xD;&#xA; - Website (rules/docs/download)&#xD;&#xA; - Forum&#xD;&#xA; - Rating system (chess-like, but for 4 players)&#xD;&#xA; - OSS is a big pro (or ability to move to OSS in future)&#xD;&#xA;&#xD;&#xA;What options do I have to create a platform for hosting the game? Obviously, I can create everything myself, which has advantages and disadvantages. Do you have any experience utilizing exisiting services offering (part or complete) above requirements?" />
  <row Id="8792" PostHistoryTypeId="2" PostId="4432" RevisionGUID="e57284fc-a786-40fd-bfdd-60f7c71a6b19" CreationDate="2010-10-11T19:33:02.900" UserId="154" Text="The basic structure is:&#xD;&#xA;&#xD;&#xA; - One liner (aka Logline) - 1 sentence description of your game&#xD;&#xA; - High Level Concept - Short paragraph giving an overview of the world/setting&#xD;&#xA; - Gameplay - Short paragraph of your take on the genre, and 3-5 bullet points of key features&#xD;&#xA;&#xD;&#xA;The difference between a 1 pager and a 4-5 pager is that each bullet point then gets a more detailed description explaining how it works. Sprinkle in any art you have where you can. &#xD;&#xA;&#xD;&#xA;Unfortunately I can't share any real ones, but if you'd like to see some early documents from actual shipped games you should check out [http://www.gamepitches.com][1]. Lots of cool peaks at early pitch and design documents from shipped games. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamepitches.com" />
  <row Id="8793" PostHistoryTypeId="2" PostId="4433" RevisionGUID="e149065e-ebaf-42a0-aba4-094dbb90df88" CreationDate="2010-10-11T19:52:48.863" UserId="154" Text="Really depends on how central this issue is to the gameplay and how quickly you can get the two options up and running. &#xD;&#xA;&#xD;&#xA;**Big Central Issue**&#xD;&#xA;&#xD;&#xA;If you are talking something central, like half the team wants to make an FPS and the other half an RTS then there are no easy solutions. Look at the space you are going to be releasing the game in (web/phone/...) and go with the one that's more commercially viable if you plan on selling it.&#xD;&#xA;&#xD;&#xA;**Easy to prototype issue**&#xD;&#xA;&#xD;&#xA;If the problem is small and can be easily prototyped you can at least try both versions out. Unfortunately if there isn't a very clear winner in the prototyping it will suffer from confirmation bias and both sides will still think their side is right. &#xD;&#xA;&#xD;&#xA;**Avoiding in the future**&#xD;&#xA;&#xD;&#xA;You need to get out of the design by committee mindset, as mentioned by AttackingHobo, it's not conducive to making quick or coherent decisions. Unfortunately if no one of the team has experience making games it can be difficult to get everyone to follow one person since everyone thinks they can be a designer. &#xD;&#xA;&#xD;&#xA;While you are learning the game development process I would suggest looking at other games similar to what you want to make for a lot of solutions. While you don't want to just make a carbon copy of an existing title you only need 1 solid new feature to differentiate your game. Outside of that core feature just copy what the market leader for your genre is doing. You'll learn a lot about what they are doing right and it's easy to justify a design decision by pointing at a successful title and saying we are doing it just like that.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8794" PostHistoryTypeId="2" PostId="4434" RevisionGUID="24bf1369-42ae-4fc4-884b-7b4dcfdbe82c" CreationDate="2010-10-11T20:03:42.373" UserId="539" Text="[Amazon Web Services](http://aws.amazon.com/application-hosting/) might serve as hosting for your game server, database, and website, etc. I believe you could run one instance for your .NET services and a second instance, running linux, for your PHP services. You'd likely want to find open source PHP based forum software. You may have to roll your own rating system." />
  <row Id="8795" PostHistoryTypeId="2" PostId="4435" RevisionGUID="0c03b351-ed88-476b-9f83-56d051ff7a11" CreationDate="2010-10-11T20:05:15.957" UserId="539" Text="[Windows Azure](http://www.microsoft.com/windowsazure/windowsazure/default.aspx) might serve as hosting for your game server, database, and website. I believe it has support for PHP in addition to .NET meaning you could use any open source PHP forum software." />
  <row Id="8796" PostHistoryTypeId="2" PostId="4436" RevisionGUID="49fe7877-7bc0-433c-8088-8a9e514973f5" CreationDate="2010-10-11T20:22:22.077" UserId="2479" Text="Okay, here goes.&#xD;&#xA;&#xD;&#xA;I have a camera at (Xc, Yc, Zc.) The Xc and Yc coordinates are latitude/longitude, and the Zc coordinate is an altitude in metres. I have a point at (Xp, Yp, Zp) and a field of view on the camera (Th1, Th2) - where Th1 is horizontal FOV and Th2 is vertical FOV.&#xD;&#xA;&#xD;&#xA;Given this information, I'd like to:&#xD;&#xA;&#xD;&#xA; - test if the point is visible (i.e. in the camera's FOV) &#xD;&#xA; - project the point as the camera would see it&#xD;&#xA;&#xD;&#xA;I've figured out already that the camera's horizontal view at any given distance is tan(Th1) * distance, but I don't know how to test if the point is visible.&#xD;&#xA;&#xD;&#xA;Accuracy is not critical. I would prefer a simple solution over a complicated solution, if it works well enough. The computations will be performed by a small microcontroller, which isn't very fast at things like trig functions.&#xD;&#xA;&#xD;&#xA;P.S. this is not homework, I'm doing this for some game development. It will be integrated with the real world, hence the latitude/longitude/altitude. It involves flying real RC planes through virtual hoops (or chasing virtual targets), so I have to project the positions of these hoops on a display." />
  <row Id="8797" PostHistoryTypeId="1" PostId="4436" RevisionGUID="49fe7877-7bc0-433c-8088-8a9e514973f5" CreationDate="2010-10-11T20:22:22.077" UserId="2479" Text="Camera field of view: 3D projections &amp; trigonometry" />
  <row Id="8798" PostHistoryTypeId="3" PostId="4436" RevisionGUID="49fe7877-7bc0-433c-8088-8a9e514973f5" CreationDate="2010-10-11T20:22:22.077" UserId="2479" Text="&lt;3d&gt;" />
  <row Id="8799" PostHistoryTypeId="2" PostId="4437" RevisionGUID="14ebb03a-7af3-4a37-b9a5-6fc37a1a9a0c" CreationDate="2010-10-11T23:37:56.420" UserId="160" Text="Game design is an empirical science. Not even the world's best designers can design in their head. Slap together a prototype and try it out. In about five minutes of playing the game, you'll be able to tell if the idea works or not." />
  <row Id="8800" PostHistoryTypeId="2" PostId="4438" RevisionGUID="32767a26-31e6-4a46-bcc8-e575a636dc89" CreationDate="2010-10-12T00:37:28.740" UserId="2481" Text="Im a senior this year and I'm seriously looking at colleges that can help me get into the game in the Game industry. I've been told countless times it's better if I go to a University(Usc, Becker college, etc) than go to somewhere like Digipen or Full Sail. I'm just really confused about how I should tackle this path. I'd appreciate some help and advice please?" />
  <row Id="8801" PostHistoryTypeId="1" PostId="4438" RevisionGUID="32767a26-31e6-4a46-bcc8-e575a636dc89" CreationDate="2010-10-12T00:37:28.740" UserId="2481" Text="Should I go to a University or Trade school to be a Game artist?" />
  <row Id="8802" PostHistoryTypeId="3" PostId="4438" RevisionGUID="32767a26-31e6-4a46-bcc8-e575a636dc89" CreationDate="2010-10-12T00:37:28.740" UserId="2481" Text="&lt;game-design&gt;" />
  <row Id="8803" PostHistoryTypeId="2" PostId="4439" RevisionGUID="0c52cb7f-6169-4e8b-9f46-65a6858ef077" CreationDate="2010-10-12T00:48:08.397" UserId="891" Text="You can kill two birds in one stone.  &#xD;&#xA;&#xD;&#xA;USC Interactive Media Division&#xD;&#xA;or USC Game Development&#xD;&#xA;&#xD;&#xA;The Princeton Review rated USC as the number 1 Game Design school, Digipen rated 2nd.&#xD;&#xA;&#xD;&#xA;http://www.princetonreview.com/top-eight-game-design-programs.aspx" />
  <row Id="8804" PostHistoryTypeId="2" PostId="4440" RevisionGUID="746ca985-c62e-4307-b35f-93b6dd610d95" CreationDate="2010-10-12T00:54:16.163" UserId="1232" Text="You're missing some information - you've haven't got the direction that the camera is facing. I normally represent this by a matrix, but you could use axis/angle or quaternion representations too. So, assuming you already have a matrix M_view that takes a world-space point and converts it into a view space point, you can easily do it without any trig or floating point divides. My thoughts are this:&#xD;&#xA;&#xD;&#xA;* project point into view space. Ie. P_view = M_view * P_world.&#xD;&#xA;* calculate the horizontal view span size given the depth of P_view (ie. P_View.z * absCosTH1)&#xD;&#xA;* calculate the vertical view span size given the depth of P_view (ie. P_view.Z * absCosTH2)&#xD;&#xA;* check whether P_view.xy are within both horizontal and vertical spans.&#xD;&#xA;&#xD;&#xA;In the end you should have a function that looks like this:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;bool isPointInFrustum(vec3&amp; P_view, float absCosTH1, float absCosTH2)&#xD;&#xA;{&#xD;&#xA;  if (abs(P_view.x) &lt; (absCosTH1 * P_view.z)) || &#xD;&#xA;      abs(P_view.y) &lt; (absCosTH2 * P_view.z))&#xD;&#xA;    return false;&#xD;&#xA;  return true;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;absCosTH1 are pre-calculated constants, computed like this:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  absCosTH1 = abs(cos(TH1));&#xD;&#xA;  absCosTH2 = abs(cos(TH2));&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;" />
  <row Id="8805" PostHistoryTypeId="5" PostId="4440" RevisionGUID="bbbe086c-0a6f-40b2-9da1-f5604e02de8d" CreationDate="2010-10-12T01:12:43.357" UserId="1232" Comment="added behind camera check and added comments to each exit condition" Text="You're missing some information - you've haven't got the direction that the camera is facing. I normally represent this by a matrix, but you could use axis/angle or quaternion representations too. So, assuming you already have a matrix M_view that takes a world-space point and converts it into a view space point, you can easily do it without any trig or floating point divides. My thoughts are this:&#xD;&#xA;&#xD;&#xA;* project point into view space. Ie. P_view = M_view * P_world.&#xD;&#xA;* calculate the horizontal view span size given the depth of P_view (ie. P_View.z * absCosTH1)&#xD;&#xA;* calculate the vertical view span size given the depth of P_view (ie. P_view.Z * absCosTH2)&#xD;&#xA;* check whether P_view.xy are within both horizontal and vertical spans.&#xD;&#xA;&#xD;&#xA;In the end you should have a function that looks like this:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;bool isPointInFrustum(vec3&amp; P_view, float absCosTH1, float absCosTH2)&#xD;&#xA;{&#xD;&#xA;  if (P_view.z &lt; 0.0 ||                          // point is behind camera&#xD;&#xA;      abs(P_view.x) &lt; (absCosTH1 * P_view.z)) || // point is outside horizontal planes of frustum&#xD;&#xA;      abs(P_view.y) &lt; (absCosTH2 * P_view.z))    // point is outside vertical planes of frustum&#xD;&#xA;    return false;&#xD;&#xA;  return true;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;absCosTH1 are pre-calculated constants, computed like this:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  absCosTH1 = abs(cos(TH1));&#xD;&#xA;  absCosTH2 = abs(cos(TH2));&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;" />
  <row Id="8806" PostHistoryTypeId="5" PostId="4440" RevisionGUID="465bbded-e3fb-465d-a5f6-764fa599d463" CreationDate="2010-10-12T01:19:08.770" UserId="1232" Comment="fixed mistake on my part. absCosTH* -&gt; absTanTH*" Text="You're missing some information - you've haven't got the direction that the camera is facing. I normally represent this by a matrix, but you could use axis/angle or quaternion representations too. So, assuming you already have a matrix M_view that takes a world-space point and converts it into a view space point, you can easily do it without any trig or floating point divides. My thoughts are this:&#xD;&#xA;&#xD;&#xA;* project point into view space. Ie. P_view = M_view * P_world.&#xD;&#xA;* calculate the horizontal view span size given the depth of P_view (ie. P_View.z * absTanTH1)&#xD;&#xA;* calculate the vertical view span size given the depth of P_view (ie. P_view.Z * absTanTH2)&#xD;&#xA;* check whether P_view.xy are within both horizontal and vertical spans.&#xD;&#xA;&#xD;&#xA;In the end you should have a function that looks like this:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;bool isPointInFrustum(vec3&amp; P_view, float absTanTH1, float absTanTH2)&#xD;&#xA;{&#xD;&#xA;  if (P_view.z &lt; 0.0 ||                          // point is behind camera&#xD;&#xA;      abs(P_view.x) &lt; (absTanTH1 * P_view.z)) || // point is outside horizontal planes of frustum&#xD;&#xA;      abs(P_view.y) &lt; (absTanTH2 * P_view.z))    // point is outside vertical planes of frustum&#xD;&#xA;    return false;&#xD;&#xA;  return true;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;absTanTH1/TH2 are pre-calculated constants, computed like this:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;  absTanTH1 = abs(tan(TH1));&#xD;&#xA;  absTanTH2 = abs(tan(TH2));&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;" />
  <row Id="8807" PostHistoryTypeId="2" PostId="4441" RevisionGUID="7c302d12-5194-4c25-96dd-e080571377ac" CreationDate="2010-10-12T01:42:32.643" UserDisplayName="Sergio" Text="I'm following the book Microsoft XNA Game Studio Creators Guide v2. and there is a snippet in the book that is used to return a Rectangle that represents the safe area you can draw without the fear of 'drawing' outside the screen.&#xD;&#xA;&#xD;&#xA;Except in my IDE Visual Studio 2010, that method doesn't show up in intellisense and in fact doesn't show up anywhere.&#xD;&#xA;&#xD;&#xA;Here is the snippet:&#xD;&#xA;&#xD;&#xA;    private void UpdateAsteroid(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        // time between frames&#xD;&#xA;        float timeLapse = (float)gameTime.ElapsedGameTime.Milliseconds;&#xD;&#xA;        if (move == true)&#xD;&#xA;        { // asteroid centered at the middle of the image&#xD;&#xA;            Rectangle safeArea = TitleSafeRegion(rockWidth/2, rockHeight/2);&#xD;&#xA;    &#xD;&#xA;          // asteroid right edge exceeds right window edge&#xD;&#xA;        if (rockPosition.X &gt; safeArea.Right){&#xD;&#xA;            rockPosition.X = safeArea.Right; // move it back&#xD;&#xA;            rockSpeed *= -1.0f; // reverse direction&#xD;&#xA;        }&#xD;&#xA;    // asteroid left edge precedes the left window edge&#xD;&#xA;    else if (rockPosition.X - rockCenter.X &lt; 0){&#xD;&#xA;    rockPosition.X = rockCenter.X; // move it back&#xD;&#xA;    rockSpeed *= -1.0f; // reverse direction&#xD;&#xA;    }&#xD;&#xA;    // asteroid within window bounds so update rockPosition&#xD;&#xA;    else&#xD;&#xA;    rockPosition.X += rockSpeed * timeLapse;&#xD;&#xA;    // Scale radians by time between frames so rotation is uniform&#xD;&#xA;    // rate on all systems. Cap between 0 &amp; 2PI for full rotation.&#xD;&#xA;    const float SCALE = 50.0f;&#xD;&#xA;    rockRotation += rockRotationSpeed * timeLapse/SCALE;&#xD;&#xA;    rockRotation = rockRotation % (MathHelper.Pi * 2.0f);&#xD;&#xA;    }&#xD;&#xA;    }" />
  <row Id="8808" PostHistoryTypeId="1" PostId="4441" RevisionGUID="7c302d12-5194-4c25-96dd-e080571377ac" CreationDate="2010-10-12T01:42:32.643" UserDisplayName="Sergio" Text="TitleSafeRegion isn't available on XNA 4?" />
  <row Id="8809" PostHistoryTypeId="3" PostId="4441" RevisionGUID="7c302d12-5194-4c25-96dd-e080571377ac" CreationDate="2010-10-12T01:42:32.643" UserDisplayName="Sergio" Text="&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="8810" PostHistoryTypeId="2" PostId="4442" RevisionGUID="fba7ed77-2234-4096-97be-6d2a9fee8903" CreationDate="2010-10-12T01:59:21.800" UserId="2200" Text="Are you sure that method isn't defined earlier in the book? From your calling code example it's an instance/static method of the class that UpdateAsteroid is a member of - it doesn't appear in MSDN as a member of the `Game` class (for 4.0 or 3.1).&#xD;&#xA;&#xD;&#xA;Alternatively, [Viewport.TitleSafeArea](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.viewport.titlesafearea.aspx) property might help." />
  <row Id="8811" PostHistoryTypeId="2" PostId="4443" RevisionGUID="6a373894-ccc0-47c5-a587-ad9531427ecc" CreationDate="2010-10-12T02:12:47.167" UserId="953" Text="The question you need to ask first is &quot;What do I want to do?&quot;  From what I understand, if you want to, say, make 3D models for games, or design AAA-style shooty-boom games, trade schools will probably serve you well.  However, I remember a story Anna Anthropy told of quitting her tradeschool after they were assigned to make a 3D model of a gun.  It had to be a weapon.  Trade schools may have narrow views of the nature of games.&#xD;&#xA;&#xD;&#xA;If you want to be a programmer and work on the code side, I'd say go for a proper Computer Science (or Software Engineering) degree at a &quot;real university.&quot;  Note that I'm biased, as I have a BS in CS from an engineering college.  The general-purpose knowledge and versatile coding know-how you'll get will be invaluable, and give you something to fall back on if gaming jobs are thin.&#xD;&#xA;&#xD;&#xA;If you want to design artsy games or really stretch the nature of the form, you might want to check out a school that's got a good New Media or Interactive Media program; Georgia Tech comes to mind, but there are tons of others.  Note that this usually comes at games from a humanities perspective, so if you like English better than Math or Art, this is probably the approach for you.&#xD;&#xA;&#xD;&#xA;So, in short, what subject most appeals to you?&#xD;&#xA;&#xD;&#xA; - Art, Architecture, Shop: Trade school. &#xD;&#xA; - Math, Science: CS or SE program at a university. &#xD;&#xA; - English, History: Humanities-focused program (harder to find).&#xD;&#xA;&#xD;&#xA;I can't speak on music, as it's my area of least expertise.  I'd assume that a general-purpose composition program would be best, though." />
  <row Id="8812" PostHistoryTypeId="2" PostId="4444" RevisionGUID="5fbabf4f-1b97-4eb5-a525-7d34af1bbb1c" CreationDate="2010-10-12T02:23:22.483" UserId="229" Text="[Impact JavaScript Game Engine for iOS][1] looks promising. The link shows a demo, but it has not been released, yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.phoboslab.org/log/2010/10/impact-for-ios" />
  <row Id="8813" PostHistoryTypeId="2" PostId="4445" RevisionGUID="23cffe08-45ec-4d68-b620-70ffee5caefa" CreationDate="2010-10-12T02:48:39.577" UserId="2187" Text="If your aim is to become an artist (as opposed to a designer or programmer), I would say a full on fine art degree will be the most useful. The game specific skills, like 3d modeling or texture painting can all be done on your own. There are many websites that you can post your work on to get criticism and pointers from industry artists ([forums.cgsociety.org][1], [www.Game-Artist.net][2], [www.polycount.com][3]). The REAL value of the university will be the basics of art: colour theory, composition, form, etc. &#xD;&#xA;&#xD;&#xA;There are very few, if any, institutions which can give you a full on, useful, game art education and positions will be quite competitive. I bet you could learn the same things, if not more, on your own with the internet and some hard work in the same amount of time. I would recommend you check out those websites before you make any sort of decision. Many of the regulars have done some sort of formal education, and they are much more qualified to speak on the matter than I am. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.cgsociety.org&#xD;&#xA;  [2]: http://www.game-artist.net&#xD;&#xA;  [3]: http://www.polycount.com" />
  <row Id="8814" PostHistoryTypeId="5" PostId="4421" RevisionGUID="ef2053b5-ee39-46a2-82cb-0ffcca5b3294" CreationDate="2010-10-12T03:40:07.910" UserId="962" Comment="added 748 characters in body" Text="**Write some Actionscript to generate the spritesheets for you, and either use the BitmapData in flash, or use as3corelib to export the pngs for you.**&#xD;&#xA;&#xD;&#xA;If your originals are vector, it is probably best for flash to take care of the rendering at different rotations/scales, as rotating a png is destructive, and lowers the quality.&#xD;&#xA;&#xD;&#xA;If you are doing a game in ActionScript, there is no need to export a PNG for the graphics, you can make sprite sheets in memory from regular Timeline Animations.&#xD;&#xA;&#xD;&#xA;If you need the PNGs for a non ActionScript game, you could make the sprite sheets in ActionScript from timeline animations and export the BitmapData with this library that can export different formats with the help of a webserver with PHP.&#xD;&#xA;&#xD;&#xA;http://github.com/mikechambers/as3corelib&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;**To make Spritesheets from Timeline Animations**&#xD;&#xA;&#xD;&#xA;Make sure what ever you have animated stays inside of the size of the Sprite, or it will clip off.&#xD;&#xA;&#xD;&#xA;Make a bitmapObject that's height is the same size as the height cell. But have the width of the bitmapObject = spriteWidth*animationMC.totalFrames&#xD;&#xA;&#xD;&#xA;That makes the bitmapObject wide enough for each frame, so they will all fit on one sheet.&#xD;&#xA;&#xD;&#xA;Make a loop that runs once for each frame. In the loop use the draw function to draw the movieclip to the sprite, but position the .tx variable of the matrix to (animationMC.currentFrame-1)*spriteWidth&#xD;&#xA;&#xD;&#xA;For your case you would make the bitmap taller for holding the different rotations. It would be spriteHeight*howManyCellsHigh.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8815" PostHistoryTypeId="6" PostId="4438" RevisionGUID="5678ce77-ab1f-4a67-92af-37379b420066" CreationDate="2010-10-12T05:16:55.167" UserId="51" Comment="edited tags" Text="&lt;art&gt;&lt;education&gt;" />
  <row Id="8816" PostHistoryTypeId="5" PostId="4247" RevisionGUID="42f9e87e-6468-40f3-819c-5e9c4644776e" CreationDate="2010-10-12T05:37:16.230" UserId="370" Comment="cleaned up english" Text="I'm defining a custom/simple file format for loading textures in my game.  I narrowed my choice of file formats to two options:&#xD;&#xA;&#xD;&#xA; * [Lua][1]&#xD;&#xA; * [protobuf][2]&#xD;&#xA;&#xD;&#xA;I chose Lua, because my game is already using Lua, I wouldn't need to add protobufs to the build.  Eventually, I'll use the engine to build a network game, at which point I'll add protobufs it's just that I don't need it yet and have other pressing needs in the engine.&#xD;&#xA;&#xD;&#xA;However, I'm kinda stuck.  Most (all?) of my support tools I write in python.  I can't find a small clean Lua module for python.  That means my python tools end up parsing the Lua syntax by hand.  It's not too onerous as file format uses a very small subset of Lua, but still annoying.&#xD;&#xA;&#xD;&#xA;So now I'm second guessing myself, *Should I have picked protobuf instead?*.  &#xD;&#xA;  Then I promptly third guessed myself, *Am I just afflicted with wanderlust and should stick with a solution that already kinda works?*.&#xD;&#xA;&#xD;&#xA;So which would you pick (or already did)?  &#xD;&#xA;And more importantly why?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;My thoughts. &#xD;&#xA;###Lua&#xD;&#xA;&#xD;&#xA;    texture&#xD;&#xA;    {&#xD;&#xA;       width=8;  --#256&#xD;&#xA;       height=7; --#128&#xD;&#xA;       format=GL_RGB;&#xD;&#xA;       pixels= [=[&#xD;&#xA;    &lt;binary-data-here&gt;]=];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; * **+** &quot;plain&quot; text format  &#xD;&#xA;Technically only the meta data is plain text but base64 encoding just for the sake of plain text is silly.&#xD;&#xA; * **+** parsing is trivial as the engine already supports Lua.&#xD;&#xA; * **-/+** easy (not trivial) to generate, and can be easily verified with luac.&#xD;&#xA; * **-** python tools have difficulty parsing&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;###protobuf&#xD;&#xA;&#xD;&#xA;    message Texture {&#xD;&#xA;       required uint32 width = 1;&#xD;&#xA;       required uint32 height = 2;&#xD;&#xA;       enum Format {&#xD;&#xA;          GL_RGB = 0;&#xD;&#xA;          GL_RGBA = 1;&#xD;&#xA;          ...&#xD;&#xA;          GL_LUMINANCE_ALPHA = N;&#xD;&#xA;       };&#xD;&#xA;       required Format format = 3;&#xD;&#xA;       required bytes pixels = 4;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; * **+** protobufs are well tested and optimized&#xD;&#xA; * **+** they will be needed eventually to do network communication&#xD;&#xA; * **-** networking isn't part of the engine yet (and wont be for some time, the next few games don't need it).&#xD;&#xA; * **+** trivial to parse&#xD;&#xA; * **+** trivial to generate&#xD;&#xA; * **-** complex binary format, impossible to edit, or verify by inspection.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org&#xD;&#xA;  [2]: http://code.google.com/p/protobuf/" />
  <row Id="8817" PostHistoryTypeId="5" PostId="4421" RevisionGUID="9a2ce1e6-bd2b-4d0c-8149-74f9c5de5c6d" CreationDate="2010-10-12T08:01:04.407" UserId="962" Comment="Need to multiply by the loop, I forgot that." Text="**Write some Actionscript to generate the spritesheets for you, and either use the BitmapData in flash, or use as3corelib to export the pngs for you.**&#xD;&#xA;&#xD;&#xA;If your originals are vector, it is probably best for flash to take care of the rendering at different rotations/scales, as rotating a png is destructive, and lowers the quality.&#xD;&#xA;&#xD;&#xA;If you are doing a game in ActionScript, there is no need to export a PNG for the graphics, you can make sprite sheets in memory from regular Timeline Animations.&#xD;&#xA;&#xD;&#xA;If you need the PNGs for a non ActionScript game, you could make the sprite sheets in ActionScript from timeline animations and export the BitmapData with this library that can export different formats with the help of a webserver with PHP.&#xD;&#xA;&#xD;&#xA;http://github.com/mikechambers/as3corelib&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;**To make Spritesheets from Timeline Animations**&#xD;&#xA;&#xD;&#xA;Make sure what ever you have animated stays inside of the size of the Sprite, or it will clip off.&#xD;&#xA;&#xD;&#xA;Make a bitmapObject that's height is the same size as the height cell. But have the width of the bitmapObject = spriteWidth*animationMC.totalFrames&#xD;&#xA;&#xD;&#xA;That makes the bitmapObject wide enough for each frame, so they will all fit on one sheet.&#xD;&#xA;&#xD;&#xA;Make a loop that runs once for each frame. In the loop use the draw function to draw the movieclip to the sprite, but position the .tx variable of the matrix to (animationMC.currentFrame-1)*spriteWidth*loopNumber&#xD;&#xA;&#xD;&#xA;For your case you would make the bitmap taller for holding the different rotations. It would be spriteHeight*howManyCellsHigh.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8818" PostHistoryTypeId="5" PostId="4421" RevisionGUID="cb1e016c-bcc7-4860-8432-2a5fd9c9c677" CreationDate="2010-10-12T08:08:02.987" UserId="962" Comment="deleted 316 characters in body" Text="**Write some Actionscript to generate the spritesheets for you, and either use the BitmapData in flash, or use as3corelib to export the pngs for you.**&#xD;&#xA;&#xD;&#xA;If your originals are vector, it is probably best for flash to take care of the rendering at different rotations/scales, as rotating a png is destructive, and lowers the quality.&#xD;&#xA;&#xD;&#xA;If you are doing a game in ActionScript, there is no need to export a PNG for the graphics, you can make sprite sheets in memory from regular Timeline Animations.&#xD;&#xA;&#xD;&#xA;If you need the PNGs for a non ActionScript game, you could make the sprite sheets in ActionScript from timeline animations and export the BitmapData with this library that can export different formats with the help of a webserver with PHP.&#xD;&#xA;&#xD;&#xA;http://github.com/mikechambers/as3corelib&#xD;&#xA;&#xD;&#xA;Edit: I tried to explain it, but I realized my explaination was broken. &#xD;&#xA;&#xD;&#xA;Instead of trying to poorly retype it. This is a better resource. Although I don't know why he draws the clips to the stage with EnterFrame for each rotation, you can just loop through the clip without ever having to make it a display child. &#xD;&#xA;&#xD;&#xA;http://www.8bitrocket.com/2008/1/20/Tutorial-Using-Flash-CS3-and-Actionscript-3-to-create-Atari-7800-Asteroids-Part-1/ &#xD;&#xA;" />
  <row Id="8820" PostHistoryTypeId="2" PostId="4446" RevisionGUID="a53a7035-7547-43d7-a108-35e3263d0883" CreationDate="2010-10-12T11:56:04.807" UserId="364" Text="What type of support/format do you use to store and diffuse your game design documentation?&#xD;&#xA;Wiki? Doc files? Files in Repository? Shared folder? Google Doc?&#xD;&#xA;&#xD;&#xA;Please provide pros and cons for each one.&#xD;&#xA;" />
  <row Id="8821" PostHistoryTypeId="1" PostId="4446" RevisionGUID="a53a7035-7547-43d7-a108-35e3263d0883" CreationDate="2010-10-12T11:56:04.807" UserId="364" Text="What type of document for game design?" />
  <row Id="8822" PostHistoryTypeId="3" PostId="4446" RevisionGUID="a53a7035-7547-43d7-a108-35e3263d0883" CreationDate="2010-10-12T11:56:04.807" UserId="364" Text="&lt;game-design&gt;&lt;design-document&gt;" />
  <row Id="8823" PostHistoryTypeId="2" PostId="4447" RevisionGUID="63a5533c-06cf-41d6-b1c8-c6fb10300a7f" CreationDate="2010-10-12T12:31:58.467" UserDisplayName="Sergio" Text="I'm using [Google Docs][1] because all I really need is a text editor that's online. I can collaborate with people online with relative ease and I know my information is secure there in case my computer crashes.&#xD;&#xA;&#xD;&#xA;Another option worth looking at is using [Dropbox][2]. Drop a Word document in there and you instantly have a collaborative environment with version control. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.google.com/&#xD;&#xA;  [2]: http://www.dropbox.com/" />
  <row Id="8824" PostHistoryTypeId="16" PostId="4447" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-12T12:34:37.770" UserId="14" />
  <row Id="8825" PostHistoryTypeId="16" PostId="4446" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-12T12:34:37.770" UserId="14" />
  <row Id="8826" PostHistoryTypeId="10" PostId="4402" RevisionGUID="7e3680ee-6b53-4844-ba00-f3431c3a7604" CreationDate="2010-10-12T12:36:00.823" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:288,&quot;DisplayName&quot;:&quot;Andrew Russell&quot;},{&quot;Id&quot;:13,&quot;DisplayName&quot;:&quot;Michael Barth&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="8827" PostHistoryTypeId="2" PostId="4448" RevisionGUID="aa3d530d-0b1a-4756-b379-bb1d4c6dc189" CreationDate="2010-10-12T13:40:42.170" UserId="490" Text="Don't use a document format/editor that's not multi-user capable (eg. MS Word, Open Office Writer). Only one person can edit the doc, and even with source control it's too easy to start working on an outdated version, and by saving that you basically destroy everything the other user(s) have done since the last time that user has updated his version of the document. &#xD;&#xA;&#xD;&#xA;Shared folders are by far the worst solution and an absolute no go for any kind of asset that's supposed to be worked on collaboratively. You can never be sure that someone else is working on that file right now, or will do so in the next couple minutes. You also don't have change tracking and can't revert back to a previous version in case of a disaster (human error or human stupidity or human neglect).&#xD;&#xA;&#xD;&#xA;Preferably use a Wiki, but one that's user friendly and is truely WYSIWYG. I personally swear by [Confluence][1], which is also used in bigger game dev studios and is only $10 for up to 10 users and unlimited viewers. &#xD;&#xA;&#xD;&#xA;Most other wikis (MediaWiki, TikiWiki, etc.) have the downside that they have a steep learning curve or are even practically unusable by non-technical personnel. Not that they couldn't learn it but they (rightfully) don't accept using a document system that's basically requiring you to write code like HTML. This is my pet peeve: Wikis that say they are WYSIWYG but all they do is insert the syntax into the text you're writing. That's not WYSIWYG!&#xD;&#xA;&#xD;&#xA;The guideline for using a wiki is to put every heading on a seperate page, so you can cut the document into many manageable parts. Confluence offers features with which you can then aggregate all those subpages back into a single site or document, which can be exported to PDF for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.atlassian.com/software/confluence/" />
  <row Id="8828" PostHistoryTypeId="2" PostId="4449" RevisionGUID="0d2747d7-b7ee-4a95-9478-922ebbacdecb" CreationDate="2010-10-12T14:19:10.373" UserId="1101" Text="**Wiki**&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; * Latest version always accessible over web, from off-site, etc.&#xD;&#xA; * Fairly easy to use (if you steer clear of those with a trainwreck for formatting like  MediaWiki, that is)&#xD;&#xA; * Automatic indexing, searching, easy categorisation&#xD;&#xA; * Easy to attribute changes to people and to make them accountable for changes&#xD;&#xA; * Supports linking and makes it easy and effective to factor out details&#xD;&#xA; * Can link to wiki pages directly from internal bug reports and other correspondence, making verification of a bug very easy&#xD;&#xA; * Version history and revision control typically built in&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; * Sometimes TOO easy to change (*see below) and requires discipline&#xD;&#xA; * Pages can get out of sync when edited in isolation (often no 'global search and replace', for example)&#xD;&#xA; * Pages get orphaned or superceded and left as potential minefields for coders later. (*&quot;What do you mean we're not implementing that any more? It's still in the design wiki!&quot;*)&#xD;&#xA; * Syntax can be a little esoteric unless you get the right package&#xD;&#xA; * Have to arrange hosting, or accept what is available online for free&#xD;&#xA; * No clear route through the document - how do you read it 'all'?&#xD;&#xA; * Hard to print. Can you print it all out with one click? Can you easily print out everything relevant to one given feature in order to take it into a meeting? Can you annotate the digital version easily without obscuring the underlying document?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;(* We used a wiki for one project and designers were always tempted to go in and 'improve' parts of it, even on features that had been signed off and sent to be coded up. Then when QA got to testing the feature, it would be a nightmare because often the design would suggest something different to what was actually coded, and it would take a fair bit of frustrating work to find out which happened first, the change to the design or the code.)" />
  <row Id="8829" PostHistoryTypeId="2" PostId="4450" RevisionGUID="6df194b7-ccb7-4196-b4ca-f9336fcc071b" CreationDate="2010-10-12T14:50:48.160" UserId="2490" Text="I create a math game where the user has to solve an equation. If the user is right, the application plays sound A. If he's wrong, it plays sound B.&#xD;&#xA;&#xD;&#xA;What criteria should I use to choose sounds for A and B?" />
  <row Id="8830" PostHistoryTypeId="1" PostId="4450" RevisionGUID="6df194b7-ccb7-4196-b4ca-f9336fcc071b" CreationDate="2010-10-12T14:50:48.160" UserId="2490" Text="How to choose a success and failure sound" />
  <row Id="8831" PostHistoryTypeId="3" PostId="4450" RevisionGUID="6df194b7-ccb7-4196-b4ca-f9336fcc071b" CreationDate="2010-10-12T14:50:48.160" UserId="2490" Text="&lt;audio&gt;" />
  <row Id="8832" PostHistoryTypeId="2" PostId="4451" RevisionGUID="6eb33c01-f352-47b2-8a45-a86286ad7646" CreationDate="2010-10-12T14:51:47.613" UserId="141" Text="Good sounds are generally higher pitched and more crisp than bad sounds." />
  <row Id="8833" PostHistoryTypeId="2" PostId="4452" RevisionGUID="992c457b-d773-4ff1-bb36-53c022912569" CreationDate="2010-10-12T15:13:54.203" UserId="2491" Text="Not that I have a direct answer for you, but you might browse [Freesound.org][1] for good sounds.  You can tag search for &quot;success&quot; and &quot;failure&quot; (or other suggested keyword around here like &quot;crisp&quot;) to find sounds people have associated with those.  Listening to a lot of samples should give you a better feel for what you want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freesound.org/" />
  <row Id="8834" PostHistoryTypeId="2" PostId="4453" RevisionGUID="f91d813e-f61d-481f-a3be-15840b69b879" CreationDate="2010-10-12T15:26:43.023" UserId="2491" Text="I'm working on a simple Sinistar-style shooter in XNA, and I'm constantly running into trouble with transformations.  I feel like I'll get it eventually, but this problem is really bending my mind.&#xD;&#xA;&#xD;&#xA;My little ship has two states: idle and engines-firing.  Idle is a single frame, and engines is a few frames that animate. Got all that.  Part 1 of the issue: Instead of using rotated images, I just use XNA's rotation to orient the ship.  Seems to work ok, but I think my origin point is off because it seems to rotate at a point just below the vertical axis of the ship (default orientation is ship's nose pointing up), instead of in the dead center of the ship.  Likewise, when I switch to engines, the sprites are different heights (due to the flames) so the origin of rotation doesn't seem like it would be constant.  Do I need to specify all my frames the same size so as to preserve the origin point?&#xD;&#xA;&#xD;&#xA;Second bit: The gun turret sits on top of the ship, as a separate sprite.  With a bit of trial-and-error and calculation, I can get the gun to align on top where I want it.  But then when the ship rotates, it rotates out from under the gun!  Would fixing the first problem adequately cover this one, or is there some trick to getting the gun's position to translate properly?&#xD;&#xA;&#xD;&#xA;So:&#xD;&#xA;&#xD;&#xA;1. Do I need to have all my sprite's frame-rectangles be the same dimensions?&#xD;&#xA;2. Is there a standard technique in XNA for stacking multiple sprites so they act as one unit, including for rotations?" />
  <row Id="8835" PostHistoryTypeId="1" PostId="4453" RevisionGUID="f91d813e-f61d-481f-a3be-15840b69b879" CreationDate="2010-10-12T15:26:43.023" UserId="2491" Text="How to rotate &quot;stacked sprites&quot; in XNA?" />
  <row Id="8836" PostHistoryTypeId="3" PostId="4453" RevisionGUID="f91d813e-f61d-481f-a3be-15840b69b879" CreationDate="2010-10-12T15:26:43.023" UserId="2491" Text="&lt;2d&gt;&lt;xna&gt;&lt;sprites&gt;" />
  <row Id="8837" PostHistoryTypeId="2" PostId="4454" RevisionGUID="fce18c34-c88e-4a47-8581-2bd3e3b66288" CreationDate="2010-10-12T15:38:03.340" UserId="2491" Text="**Text Files**&#xD;&#xA;&#xD;&#xA;On my current project, I'm using simple plain-text files in my &quot;Docs&quot; folder of the project, stored in the repository beside the code.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA;* Documentation is kept close to the actual work, so its easy to find.&#xD;&#xA;* Simple formatting means it is easy and fast to maintain documentation.&#xD;&#xA;* Simple format also means there's little risk of losing documentation due to server crashes, file corruptions, etc.&#xD;&#xA;* Absolutely minimal set-up time makes this a great start for single-developer or tiny (2-3 person) teams.&#xD;&#xA;* Using version control means that changes are tracked, and often one can link changes in documentation directly with a change in the code.&#xD;&#xA;* As easy to work with as text, so searching, editing, and so on can often be done with command line tools.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA;* More than a couple of users and the document would get out of sync easily.&#xD;&#xA;* No links, so either you use one grotesquely large document or several smaller but disconnected documents.&#xD;&#xA;* Limited formatting and publication options (though conversion, such as through Markdown, is easy to do.)&#xD;&#xA;* As easy to work with as text, so the only way to get searching, advanced editing, and so on is often to use command line tools.&#xD;&#xA;&#xD;&#xA;Its not something you want to rely for any kind of team work, but the power of text files in the repo to let you get to right to work should not be underestimated for the single-developer.  Currently I use one document as a kind of overview/master-planner that contains the general design, a second document that acts as a ToDo-list of specific things the game needs, a third document as a loose bug tracker, and ancillary documents to elaborate on &quot;feature x&quot; as needed.&#xD;&#xA;  " />
  <row Id="8838" PostHistoryTypeId="2" PostId="4455" RevisionGUID="767d60a6-d376-48a2-b5ec-5b19611f5fbd" CreationDate="2010-10-12T15:40:18.280" UserDisplayName="Sergio" Text="What you want to do is get the center coordinate for you ship sprite and turn it on that point. I don't have the code with my here at work, but when I get home I'll share a little snippet that I made that does just want you want. &#xD;&#xA;&#xD;&#xA;For this to work however your sprite has to be well centered in the first place. Your image needs to be very aligned and centered using Photoshop or whatever program you use. If your image is not aligned correctly then using the established techniques to rotate won't work because your picture center won't be the same as your pictureContent center." />
  <row Id="8839" PostHistoryTypeId="5" PostId="4255" RevisionGUID="ac01c2df-d12b-4ced-b345-4db9057f622b" CreationDate="2010-10-12T15:57:06.190" UserId="189" Comment="changed my domain name" Text="Here's the relevant logic I used on the pong on [my homepage][1]: (please go play it before reading, so that you know the effect I'm achieving with the following code)&#xD;&#xA;&#xD;&#xA;Essentially, when the ball collides with the paddle, its direction is completely disregarded; it is given a new direction according to how far from the center of the paddle it collided. If the ball hits the paddle right in the center, it is sent away exactly horizontal; if it hits right on the edge, it flies off at an extreme angle (75 degrees). And it always travels at a constant speed.&#xD;&#xA;&#xD;&#xA;    var relativeIntersectY = (paddle1Y+(PADDLEHEIGHT/2)) - intersectY;&#xD;&#xA;&#xD;&#xA;Take the middle Y value of the paddle, and subtract the Y intersection of the ball. If the paddle is 10 pixels high, this number will be between -5 and 5. I call this the &quot;relative intersect&quot; because it is in &quot;paddle space&quot; now, the ball's intersection relative to the middle of the paddle.&#xD;&#xA;&#xD;&#xA;    var normalizedRelativeIntersectionY = (relativeIntersectY/(PADDLEHEIGHT/2));&#xD;&#xA;    var bounceAngle = normalizedRelativeIntersectionY * MAXBOUNCEANGLE;&#xD;&#xA;&#xD;&#xA;Take the relative intersection and divide it by half the paddle height. Now our -5 to 5 number is a decimal from -1 to 1; it's *normalized*. Then multiply it by the maximum angle by which you want the ball to bounce. I set it to 5*Pi/12 radians (75 degrees).&#xD;&#xA;&#xD;&#xA;    ballVx = BALLSPEED*Math.cos(bounceAngle);&#xD;&#xA;    ballVy = BALLSPEED*-Math.sin(bounceAngle);&#xD;&#xA;&#xD;&#xA;Finally, calculate new ball velocities, using simple trigonometry.&#xD;&#xA;&#xD;&#xA;This might not quite be the effect you're going for, or you might want to also determine a speed by multiplying the normalized relative intersection by a max speed; this would make the ball go faster if it hits near the edge of a paddle, or slower if it hits near the center.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt;I'd possibly like some code on what a vector would look like or how I could save the variable of the vector the balls has (speed and direction).&#xD;&#xA;&#xD;&#xA;A vector contains both speed and direction, implicitly. I store my vector as a &quot;vx&quot; and &quot;vy&quot;; that is, the speed in the x direction and the speed in the y direction. If you haven't taken an introductory course in physics this might seem somewhat foreign to you.&#xD;&#xA;&#xD;&#xA;The reason I do this is because it reduces the per-frame calculations necessary; every frame, you just do `x += vx * time;` and `y += vy * time;` where time is the time since last frame, in milliseconds (therefore the velocities are in pixels per millisecond).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Regarding implementing the ability to curve the ball:&#xD;&#xA;&#xD;&#xA;First of all, you'd need to know the paddle's velocity at the time the ball hits; which means you'd need to keep track of the paddle's history, so that you can know one or more of the paddle's past positions so that you can compare them to its current position to see if it moved. (change in position / change in time = velocity; so you need 2 or more positions, and the times of those positions)&#xD;&#xA;&#xD;&#xA;You now also need to track an [angular velocity][2] of the ball, which practically represents the curve along which it is traveling, but is equivalent to the real-world spin of the ball. Similar to how you would interpolate the bounce angle from the relative position of the ball on collision with the paddle, you would also need to interpolate this angular velocity (or spin) from the velocity of the paddle on collision. Rather than simply setting the spin like you do with the bounce angle, you might want to add or subtract to the ball's existing spin, because that tends to work well in games (the player can notice the ball is spinning, and cause it to spin even more wildly, or counter the spin in an attempt to make it travel straight).&#xD;&#xA;&#xD;&#xA;Note, however, that while this is the most common sense and probably easiest way to implement it, the actual physics of a bounce doesn't rely solely on the velocity of the object it hits; an object with no angular velocity (no spin) which hits a surface at an angle, will have a spin imparted upon it. This might lead to a better game mechanic, so you may want to look into this, but I'm not certain of the physics behind it so I'm not going to try to explain it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://richardcarter.org/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Angular_velocity" />
  <row Id="8840" PostHistoryTypeId="5" PostId="4454" RevisionGUID="ba341346-875b-431f-8178-4486419ccaa0" CreationDate="2010-10-12T16:24:22.137" UserId="2491" Comment="deleted 2 characters in body" Text="**Text Files**&#xD;&#xA;&#xD;&#xA;On my current project, I'm using simple plain-text files in my &quot;Docs&quot; folder of the project, stored in the repository beside the code.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA;* Documentation is kept close to the actual work, so its easy to find.&#xD;&#xA;* Simple formatting means it is easy and fast to maintain documentation.&#xD;&#xA;* Simple format also means there's little risk of losing documentation due to server crashes, file corruptions, etc.&#xD;&#xA;* Absolutely minimal set-up time makes this a great start for single-developer or tiny (2-3 person) teams.&#xD;&#xA;* Using version control means that changes are tracked, and often one can link changes in documentation directly with a change in the code.&#xD;&#xA;* As easy to work with as text, so searching, editing, and so on can often be done with command line tools.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA;* More than a couple of users and the document would get out of sync easily.&#xD;&#xA;* No links, so either you use one grotesquely large document or several smaller but disconnected documents.&#xD;&#xA;* Limited formatting and publication options (though conversion, such as through Markdown, is easy to do.)&#xD;&#xA;* As easy to work with as text, so often the only way to get searching, advanced editing, and so on is to use command line tools.&#xD;&#xA;&#xD;&#xA;It's not something you want to rely for any kind of team work, but the power of text files in the repo to let you get right to work should not be underestimated for the single-developer.  Currently I use one document as a kind of overview/master-planner that contains the general design, a second document that acts as a ToDo-list of specific things the game needs, a third document as a loose bug tracker, and ancillary documents to elaborate on &quot;feature x&quot; as needed.&#xD;&#xA;  " />
  <row Id="8841" PostHistoryTypeId="2" PostId="4456" RevisionGUID="996d23a4-6d31-4b8b-9499-8c010452c08d" CreationDate="2010-10-12T17:48:06.730" UserId="1400" Text="If the shape is drawn primarily with line segments from the user (or Bezier curves with control points), you can implement a fairly widely used algorithm known as [Separating-Axis-Theorem][1].  Simply put: if there is an axis (unit-vector representing a direction) on which the shapes don't overlap (their projected values do not result in a positive difference), the objects are not overlapping.  I have used this in the past and it has worked like a charm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="8842" PostHistoryTypeId="2" PostId="4457" RevisionGUID="a71baa04-837d-4e3d-989b-9e8a4be0d21f" CreationDate="2010-10-12T17:58:22.033" UserId="1581" Text="You need a bigger image, or a (slightly) smaller ball.&#xD;&#xA;&#xD;&#xA;It is a known issue that raster image algorithms tend to create ugly aliases on round(ish) objects, if they touch the 'edges'.&#xD;&#xA;&#xD;&#xA;The easiest fix is adding a small 'background space' to all your balls. So for each of your generated tiles, instead of this:&#xD;&#xA;&#xD;&#xA;    +-----+&#xD;&#xA;    |.000.|&#xD;&#xA;    |00000|&#xD;&#xA;    |00000|&#xD;&#xA;    |00000|&#xD;&#xA;    |.000.|&#xD;&#xA;    +-----+&#xD;&#xA;&#xD;&#xA;You add some blank space, like so:&#xD;&#xA;&#xD;&#xA;    +-------+&#xD;&#xA;    |.......|&#xD;&#xA;    |..000..|&#xD;&#xA;    |.00000.|&#xD;&#xA;    |.00000.|&#xD;&#xA;    |.00000.|&#xD;&#xA;    |..000..|&#xD;&#xA;    |.......|&#xD;&#xA;    +-------+&#xD;&#xA;&#xD;&#xA;For such small images, a 1-pixel border should be enough. Bigger ones sometimes require 2 or 3 pixels.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8843" PostHistoryTypeId="2" PostId="4458" RevisionGUID="b68ad9fd-fad7-4863-8ff9-c7a90ab0dcfe" CreationDate="2010-10-12T18:31:59.323" UserId="1581" Text="It depends on the tone of your game.&#xD;&#xA;&#xD;&#xA;If it is humoristic, you can probably go with a 'ta-daaaa!' trumpet sound for correct answers, and a 'sad trumpet' (wa-waa-waaa-waaaa) sound for incorrect answers.&#xD;&#xA;&#xD;&#xA;If the tone is more 'abstract', then a correct sound should have its pitch &quot;going up&quot; (like the Super Mario Coin sound), while an incorrect sound should have its pitch &quot;going down&quot;.&#xD;&#xA;&#xD;&#xA;You can also go &quot;the Street fighter way&quot; and have the program say the equivalent of &quot;You Win!&quot; and &quot;You Loose!&quot; in plain English.&#xD;&#xA;&#xD;&#xA;Profesor Layton's series, for example, have their main characters tell you &quot;That answer is spot on!&quot; or &quot;Mmm... that doesn't look too right...&quot; (they still have trumpets and whatnot on the background)&#xD;&#xA;&#xD;&#xA;Another important thing is duration: sounds derived from clicking a button should be short, specially if the user is supposed to answer lots of questions quickly. Sounds emitted after resolving a 5-minutes problem can be a little longer." />
  <row Id="8844" PostHistoryTypeId="2" PostId="4459" RevisionGUID="a1b50fcf-c637-403b-84ec-abd5590d05e7" CreationDate="2010-10-12T21:09:04.720" UserId="2494" Text="i'm learning something about game programming from a book about &quot;pyGame&quot;. pyGame is simple, but... python is a little complex and different from my previous knoweledge about programming. &#xD;&#xA;I know &quot;classical&quot; language: C# (also C/C++), Java ... I know a lot of people love Python but for me is a little harder to learn!&#xD;&#xA;So i'm looking something like &quot;pyGame&quot; but for java or for c# ... A library with which i can do almost the same thing i can do with pygame (so .. do more with less code ... and headhace).&#xD;&#xA;&#xD;&#xA;Thank you &#xD;&#xA;&#xD;&#xA;Ps: excuse my &quot;poor&quot; english!" />
  <row Id="8845" PostHistoryTypeId="1" PostId="4459" RevisionGUID="a1b50fcf-c637-403b-84ec-abd5590d05e7" CreationDate="2010-10-12T21:09:04.720" UserId="2494" Text="Alternative to pyGame ?" />
  <row Id="8846" PostHistoryTypeId="3" PostId="4459" RevisionGUID="a1b50fcf-c637-403b-84ec-abd5590d05e7" CreationDate="2010-10-12T21:09:04.720" UserId="2494" Text="&lt;libraries&gt;&lt;language-choice&gt;" />
  <row Id="8847" PostHistoryTypeId="2" PostId="4460" RevisionGUID="7b31fd8e-bce1-4061-b81a-a9be77523312" CreationDate="2010-10-12T21:49:46.447" UserDisplayName="Sergio" Text="I'm not familiar with pyGame but if you're looking for a nice easy framework to use for game development why not use XNA 4.0? It's free and lets you create games that can be played on the XBox 360, Zune HD or Windows Phone 7.&#xD;&#xA;&#xD;&#xA;The benefit of using this is you can very easily leverage your C# knowledge and start working right away with learning the framework instead of wrestling with the language.&#xD;&#xA;&#xD;&#xA;I **highly** suggest you start learning XNA by following this great series of tutorials made by [Riemers][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://riemers.net/" />
  <row Id="8848" PostHistoryTypeId="6" PostId="4459" RevisionGUID="3b591015-9252-453d-9a82-e214577f697b" CreationDate="2010-10-12T21:51:49.610" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;language-choice&gt;&lt;framework&gt;&lt;pygame&gt;" />
  <row Id="8849" PostHistoryTypeId="5" PostId="4455" RevisionGUID="2f2e9590-1c2b-48b1-9bfd-93b01c4ec864" CreationDate="2010-10-12T22:19:22.153" UserDisplayName="Sergio" Comment="Added the code I wanted to show you guys." Text="What you want to do is get the center coordinate for you ship sprite and turn it on that point. I don't have the code with my here at work, but when I get home I'll share a little snippet that I made that does just want you want. &#xD;&#xA;&#xD;&#xA;For this to work however your sprite has to be well centered in the first place. Your image needs to be very aligned and centered using Photoshop or whatever program you use. If your image is not aligned correctly then using the established techniques to rotate won't work because your picture center won't be the same as your pictureContent center.&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;Ok, I got back from work and here's  a little example. I'm going to rotate a cannon barrel on a given point using the following code:&#xD;&#xA;&#xD;&#xA;    //Angle is just a float variable that saves the angle the cannon is facing.&#xD;&#xA;    players[currentPlayer].Angle -= 0.1f;&#xD;&#xA;&#xD;&#xA;The code above is only run when the left key is pressed. I'm moving the angle to the left or counter-clockwise.&#xD;&#xA;&#xD;&#xA;Now in the Draw method which in XNA is called 60 times every second I redraw the cannon. Using the .Angle property I modified earlier I know exactly where to draw it and at what angle.&#xD;&#xA;&#xD;&#xA;    spriteBatch.Draw(CannonBody, player.Position, null, player.Color, 0, new Vector2(0, CannonBody.Height), playerScaling, SpriteEffects.None, 0);&#xD;&#xA;    spriteBatch.Draw(CannonBarrel, new Vector2(xPosition + 20, yPosition - 10), null, player.Color, player.Angle, cannonOrigin, playerScaling, SpriteEffects.None, 1);&#xD;&#xA;&#xD;&#xA;Basically, you want to draw the cannon using modified positions every given second; then each second modify the position so you get that fluid movement effect.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8850" PostHistoryTypeId="2" PostId="4461" RevisionGUID="ec194f21-162c-4eb1-b3d3-f32aa625a10d" CreationDate="2010-10-12T22:53:54.000" UserId="539" Text="I think [One Note](http://office.microsoft.com/en-us/onenote/) is a good option. It is something like a Wiki but with lots of rich text editing support. In addition to the standard desktop client which comes with Office there is a web based version with the [Office Live](http://office.live.com/) suite. Honestly, I think the web based version, which is free, should be enough for most needs and when combined with Skydrive you have a pretty good system to collaborate on a live document." />
  <row Id="8851" PostHistoryTypeId="2" PostId="4462" RevisionGUID="57c2666d-b946-4a9c-9398-979163258e6a" CreationDate="2010-10-12T23:32:00.813" UserId="891" Text="Ctrl+C Ctrl+P from another question I posted on&#xD;&#xA;&#xD;&#xA;&gt; [**Slick**][1] is a nice 2D Java&#xD;&#xA;&gt; library based off of LWJGL. It handles&#xD;&#xA;&gt; the game loop, rendering, and contains&#xD;&#xA;&gt; useful functionality to implement&#xD;&#xA;&gt; sprites.&#xD;&#xA;&gt; &#xD;&#xA;&gt; It comes bundled with many different&#xD;&#xA;&gt; demos and examples.&#xD;&#xA;&#xD;&#xA;Things like tilemaps, sprite maps, etc are all built in.  Basically lets you focus on the game, not how to write a engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/" />
  <row Id="8852" PostHistoryTypeId="2" PostId="4463" RevisionGUID="e3e1a66c-55ef-453f-9c86-8627113f0676" CreationDate="2010-10-13T02:21:47.087" UserId="395" Text="[Love](http://love2d.org/) offers a similar level of complexity as PyGame, though I'm not sure you will find Lua much easier than Python. If you want to just go with something more direct, look for bindings for SDL ([SDL.NET](http://cs-sdl.sourceforge.net/index.php/Main_Page) for example) for your favorite language, or even just use it directly in C. Many PyGame APIs are just thin wrappers for SDL functionality." />
  <row Id="8853" PostHistoryTypeId="2" PostId="4464" RevisionGUID="21ed7b1d-5fba-40ac-876f-9df0d4a8e641" CreationDate="2010-10-13T07:54:27.470" UserId="2496" Text="In a effort to learn the blender interface, which is confusing to say the least, I've chosen to model a [model][1] from referrence pictures easily found on the web. &#xD;&#xA;&#xD;&#xA;Problem is that I can't ( and won't ) get perfect &quot;right&quot;, &quot;front&quot; and &quot;top&quot; pictures. Blender only allows you to see the background pictures when in ortographic mode and only from right|front|top, which doesn't help me.&#xD;&#xA;&#xD;&#xA;How to I proceed to model from non-perfect guide images?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.google.com/search?ie=UTF-8&amp;oe=UTF-8&amp;sourceid=navclient&amp;gfns=1&amp;q=elly+tran+ha" />
  <row Id="8854" PostHistoryTypeId="1" PostId="4464" RevisionGUID="21ed7b1d-5fba-40ac-876f-9df0d4a8e641" CreationDate="2010-10-13T07:54:27.470" UserId="2496" Text="blender: 3D model from guide images" />
  <row Id="8855" PostHistoryTypeId="3" PostId="4464" RevisionGUID="21ed7b1d-5fba-40ac-876f-9df0d4a8e641" CreationDate="2010-10-13T07:54:27.470" UserId="2496" Text="&lt;models&gt;&lt;blender&gt;" />
  <row Id="8856" PostHistoryTypeId="2" PostId="4465" RevisionGUID="d7bbc172-09d4-4097-a086-7cb6e392d029" CreationDate="2010-10-13T09:27:30.807" UserId="62" Text="A log of game events (as opposed to error / debug logs) for an entire cluster/shard is very useful for a commercial MMO that is in a live production environment, providing vital support for customer service, and the means for historical analytics.&#xD;&#xA;&#xD;&#xA;The project that I am currently working on uses a relational database to store all of the game event logs, and while that method works fine it seems to me that the read-only, chronological nature of the logs would allow for a more efficient storage format.&#xD;&#xA;&#xD;&#xA;I'm not sure where to begin learning about building custom binary log formats, however. What are your experiences with creating custom log formats, or any recommended papers / articles on the subject?" />
  <row Id="8857" PostHistoryTypeId="1" PostId="4465" RevisionGUID="d7bbc172-09d4-4097-a086-7cb6e392d029" CreationDate="2010-10-13T09:27:30.807" UserId="62" Text="Game log format for MMO servers" />
  <row Id="8858" PostHistoryTypeId="3" PostId="4465" RevisionGUID="d7bbc172-09d4-4097-a086-7cb6e392d029" CreationDate="2010-10-13T09:27:30.807" UserId="62" Text="&lt;mmo&gt;&lt;server&gt;&lt;events&gt;" />
  <row Id="8859" PostHistoryTypeId="2" PostId="4466" RevisionGUID="6b78b313-aa16-47a0-a88a-fbb3fdd3842a" CreationDate="2010-10-13T10:20:25.103" UserId="2501" Text="http://wiki.python.org/moin/PythonGames has the list of python game engines/libraries. Some of the game engines in the list are not Python only. Ogre and Panda are well known ones in both you can use c++." />
  <row Id="8860" PostHistoryTypeId="5" PostId="2306" RevisionGUID="069e8d43-9516-4fed-9fa4-b851808cf6f7" CreationDate="2010-10-13T10:41:43.943" UserId="1101" Comment="Added edit drawing attention to Joe's first comment about Cryptic DB" Text="Basically, there's a whole range of approaches, and I think they're chosen based more on the experiences of their developers as much as the properties of the database.&#xD;&#xA;At one end, many MMOs are using standard relational databases - eg. Dark Ages of Camelot used/uses (are they still going?) [MySQL][1], FreeRealms use a modified [Postgresql][2], etc.&#xD;&#xA;&#xD;&#xA;Moving along the scale, you have Guild Wars: [they use SQL Server][3], but they stick their data in there as a single BLOB. This means they get the benefits of their usual binary formats with some of the benefits that a database provides. Needless to say, you can probably see some disadvantages of this approach too, but for a company used to working with flat files, it's probably still a step up.&#xD;&#xA;&#xD;&#xA;Then there are probably some places using the various formalised NoSQL approaches, although it's still early days yet. Farmville uses [membase][4], which they made for the purpose, based on memcached apparently. This shares many features with the likes of MongoDB, CouchDB, etc. Again with these approaches you're typically rolling your own storage formats but get the benefits of distribution, caching, redundancy, etc.&#xD;&#xA;&#xD;&#xA;Some are rolling their own NoSQL entirely: Cryptic [said they did something similar][5] but also said they weren't using it in production. (**EDIT**: but see comments below.)&#xD;&#xA;&#xD;&#xA;And then you come to people who are using flat text or binary files - as I understand it the older games like Ultima Online, Everquest, etc all went down this route, and for a company with game development experience but little database experience this works well too.&#xD;&#xA;&#xD;&#xA;Note also that you almost never get around writing your own database in some loose sense of the term - in games you'll always have bespoke data that you need to manage either in-memory or on-disk in ways that don't lend themselves to generic software. You can't do SQL queries every time you want some data so you will need to be mirroring a lot of your information in the code no matter what back end you use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mysql.com/customers/view/?id=729&#xD;&#xA;  [2]: http://www.enterprisedb.com/company/news_events/press_releases/2010_09.do&#xD;&#xA;  [3]: http://www.dbms2.com/2007/06/09/the-database-technology-of-guild-wars/&#xD;&#xA;  [4]: http://www.membase.org/&#xD;&#xA;  [5]: http://doublebuffered.com/2008/02/26/gdc-08-sql-considered-harmful/" />
  <row Id="8861" PostHistoryTypeId="2" PostId="4467" RevisionGUID="bf50a342-4554-4b92-973d-ebf05051a6df" CreationDate="2010-10-13T12:08:26.617" UserId="2479" Text="I want to compare angles and get an idea of the distance between them. For this application, I'm working in degrees, but it would also work for radians and grads. The problem with angles is that they depend on modular arithmetic, i.e. 0-360 degrees.&#xD;&#xA;&#xD;&#xA;Say one angle is at 15 degrees and one is at 45. The difference is 30 degrees, and the 45 degree angle is greater than the 15 degree one. &#xD;&#xA;&#xD;&#xA;But, this breaks down when you have, say, 345 degrees and 30 degrees. Although they compare properly, the difference between them is 315 degrees instead of the correct 45 degrees.&#xD;&#xA;&#xD;&#xA;How can I solve this? I could write algorithmic code:&#xD;&#xA;&#xD;&#xA;    if(angle1 &gt; angle2) delta_theta = 360 - angle2 - angle1;&#xD;&#xA;    else delta_theta = angle2 - angle1;&#xD;&#xA;&#xD;&#xA;But I'd prefer a solution that avoids compares/branches, and relies entirely on arithmetic." />
  <row Id="8862" PostHistoryTypeId="1" PostId="4467" RevisionGUID="bf50a342-4554-4b92-973d-ebf05051a6df" CreationDate="2010-10-13T12:08:26.617" UserId="2479" Text="Comparing angles and working out the difference" />
  <row Id="8863" PostHistoryTypeId="3" PostId="4467" RevisionGUID="bf50a342-4554-4b92-973d-ebf05051a6df" CreationDate="2010-10-13T12:08:26.617" UserId="2479" Text="&lt;language-agnostic&gt;" />
  <row Id="8864" PostHistoryTypeId="2" PostId="4468" RevisionGUID="5d05352c-3ffe-4750-b523-cb76f43c8f20" CreationDate="2010-10-13T12:33:44.547" UserId="1251" Text="i guess i could say&#xD;&#xA;&#xD;&#xA;    angle1=angle1%360;&#xD;&#xA;    angle2=angle2%360;&#xD;&#xA;    var distance = Math.abs(angle1-angle2);&#xD;&#xA;&#xD;&#xA;ofcourse, considering the angle is measured in degrees." />
  <row Id="8865" PostHistoryTypeId="2" PostId="4469" RevisionGUID="ba8180fe-8a87-4af3-8e44-15b8ad466367" CreationDate="2010-10-13T13:49:03.820" UserId="1101" Text="&gt; Although they compare properly, the difference between them is 315 degrees instead of the correct 45 degrees.&#xD;&#xA;&#xD;&#xA;What makes you think 315 is incorrect? In one direction, it is 315 degrees, in the other direction, it's 45. You want to choose whichever is the smallest of the 2 possible angles and this seems to intrinsically require a conditional. You can't solve it with wrap-around arithmetic (ie. via modulus operator) because as you gradually increase one angle the angle between them grows until it hits 180 and then starts declining.&#xD;&#xA;&#xD;&#xA;I think you either have to check both angles and decide which direction you want to measure, or calculate both directions and decide which result you want.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8866" PostHistoryTypeId="2" PostId="4470" RevisionGUID="b7f72d69-ed59-4243-96b5-41016a247669" CreationDate="2010-10-13T14:01:21.483" UserId="2091" Text="What about this?&#xD;&#xA;&#xD;&#xA;    min( (a1-a2+360)%360, (a2-a1+360)%360 )&#xD;&#xA;&#xD;&#xA;The addition of 360 is there in order to avoid negative differences, because a modulo of a negative number returns a negative result.  Then you get the smaller of the two possible results.&#xD;&#xA;&#xD;&#xA;There is still an implicit decision, but I don't know how to avoid it.  Basically you compare the two angles by computing the difference clockwise or counterclockwise, and it seems that you explicitly want the smaller of these two differences.  I don't know how to get that result without comparing them.  That is, without using &quot;abs&quot;, &quot;min&quot;, &quot;max&quot; or some similar operator.&#xD;&#xA;" />
  <row Id="8867" PostHistoryTypeId="2" PostId="4471" RevisionGUID="ef32718b-b4af-4409-9ef7-5af8c7ef2992" CreationDate="2010-10-13T14:01:26.443" UserId="1101" Text="What do you mean by efficiency? Whether it's size on disk or query speed, a relational database is almost certainly going to beat or equal your proprietary binary format, and be much easier and more flexible to use.&#xD;&#xA;&#xD;&#xA;Each table you use in a relational DB pretty much lets you specify to the exact byte how much space per row you're going to allow. If you're not logging plain text - and *&quot;log of game events (as opposed to error / debug logs)&quot;* implies that you're not, or at least don't need to - then the fixed-width field approach of a relational database is rather close to optimal in terms of space, which makes them pretty fast in the first place. On top of that relational databases are pretty handy at making indexes for very fast access, and optimising queries to make the most of them.&#xD;&#xA;&#xD;&#xA;So I'd recommend sticking with what you've got." />
  <row Id="8868" PostHistoryTypeId="2" PostId="4472" RevisionGUID="18825eb2-2d50-4d63-a00f-1a422173447e" CreationDate="2010-10-13T14:13:43.230" UserId="1091" Text="You can take an angle from 0 to 360 and &quot;wrap&quot; it without branches. It's almost certainly worse than using min(), but here you go:&#xD;&#xA;&#xD;&#xA;wrap_ang = abs(((ang % 360) - (ang % 180)) * 2 - (ang % 360));&#xD;&#xA;&#xD;&#xA;I haven't bothered trying to reduce that, in the interests of (slight) readability.&#xD;&#xA;" />
  <row Id="8869" PostHistoryTypeId="2" PostId="4473" RevisionGUID="d8d850f9-e230-4f0c-907b-7662af55de01" CreationDate="2010-10-13T14:18:42.287" UserId="51" Text="While your question made no reference of them, I'm going to be working on the assumption that your angle calculation question stems from wanting to know the minimum angle between two *vectors*.&#xD;&#xA;&#xD;&#xA;That calculation is easy.  Assuming A and B are your vectors:&#xD;&#xA;&#xD;&#xA;`angle_between = acos( Dot( A.normalized, B.normalized ) )`&#xD;&#xA;&#xD;&#xA;If you didn't have vectors and wanted to use this approach you could construct unit length vectors given your angles by doing `new Vector2( cos( angle ), sin ( angle ) )`." />
  <row Id="8870" PostHistoryTypeId="5" PostId="4462" RevisionGUID="09912a90-ea92-4600-882e-5a1876e97f99" CreationDate="2010-10-13T15:05:56.397" UserId="891" Comment="added 3 characters in body" Text="Ctrl+C Ctrl+P from another question I posted on&#xD;&#xA;&#xD;&#xA;&gt; [**Slick**][1] is a nice 2D Java&#xD;&#xA;&gt; library based off of LWJGL. It handles&#xD;&#xA;&gt; the game loop, rendering, and contains&#xD;&#xA;&gt; useful functionality to implement&#xD;&#xA;&gt; sprites.&#xD;&#xA;&gt; &#xD;&#xA;&gt; It comes bundled with many different&#xD;&#xA;&gt; demos and examples.&#xD;&#xA;&#xD;&#xA;Things like tilemaps, sprite sheets, etc are all built in.  Basically lets you focus on the game, not how to write an engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/" />
  <row Id="8871" PostHistoryTypeId="2" PostId="4474" RevisionGUID="5b1b3fbb-c01d-425e-aa84-aba1e5fb2fa1" CreationDate="2010-10-13T15:26:15.973" UserId="1141" Text="Assuming *true* evaluates to -1 and *false* evaluates to 0, and '~', '&amp;' and '|' are bitwise *not*, *and* and *or* operators respectively, and we're working with two's-complement arithmetic:&#xD;&#xA;&#xD;&#xA;    temp1 := angle1 &gt; angle2&#xD;&#xA;    /* most processors can do this without a jump; for example, under the x86 family,&#xD;&#xA;       it's the result of CMP; SETLE; SUB .., -1 instructions */&#xD;&#xA;    temp2 := angle1 - angle2&#xD;&#xA;    temp1 := (temp1 &amp; temp2) | (~temp1 &amp; -temp2)&#xD;&#xA;    /* in x86 again: only SUB, AND, OR, NOT and NEG are used, no jumps&#xD;&#xA;       at this point, we have the positive difference between the angles in temp1;&#xD;&#xA;       we can now do the same trick again */&#xD;&#xA;    temp2 := temp1 &gt; 180&#xD;&#xA;    temp2 := (temp2 &amp; temp1) | (~temp2 &amp; (360 - temp1))&#xD;&#xA;    /* the result is in temp2 now */" />
  <row Id="8873" PostHistoryTypeId="2" PostId="4476" RevisionGUID="1de6ba93-6fb5-4c4b-9d06-cbc6b6ba98b0" CreationDate="2010-10-13T16:45:21.053" UserId="395" Text="It is true you could probably save a few bytes with a custom format, or ever just gzipped text, storage is cheap so it really isn't worth optimizing for anymore. What is more important is deal with things like I/O buffering and querying, both of which an off-the-shelf SQL server probably does pretty well. If it is working for you on those fronts, I would run with it. We wrote our own buffering log server which writes to custom files and then has a separate parser program to read it into a database for queries, I wouldn't recommend it." />
  <row Id="8874" PostHistoryTypeId="6" PostId="1639" RevisionGUID="352d3c09-15de-4117-9fc3-c860d5543e81" CreationDate="2010-10-13T16:51:41.937" UserId="285" Comment="removed extra marketing tag" Text="&lt;marketing&gt;" />
  <row Id="8875" PostHistoryTypeId="2" PostId="4477" RevisionGUID="0b42d1d4-68ca-489d-afd3-faf2aefced7b" CreationDate="2010-10-13T17:32:09.957" UserDisplayName="Adam Coburn" Text="I have a game that uses the accelerometer to move a guy back and forth on the screen.  After a few seconds the screen goes dim.  Is there any way to keep it alive and bright during the game activity?" />
  <row Id="8876" PostHistoryTypeId="1" PostId="4477" RevisionGUID="0b42d1d4-68ca-489d-afd3-faf2aefced7b" CreationDate="2010-10-13T17:32:09.957" UserDisplayName="Adam Coburn" Text="Keeping Android Screen bright during Game Android" />
  <row Id="8877" PostHistoryTypeId="3" PostId="4477" RevisionGUID="0b42d1d4-68ca-489d-afd3-faf2aefced7b" CreationDate="2010-10-13T17:32:09.957" UserDisplayName="Adam Coburn" Text="&lt;android&gt;" />
  <row Id="8878" PostHistoryTypeId="2" PostId="4478" RevisionGUID="1fca461a-91ce-414b-8307-71aff9af1d12" CreationDate="2010-10-13T18:25:04.670" UserId="2039" Text="Simple question I have here.&#xD;&#xA;&#xD;&#xA;Say my tile map is based on 32x32 tiles for an 800x600 image so let's say 25 tiles across and 19 down.&#xD;&#xA;&#xD;&#xA;So now I have that cell 0 of any row contains the first 0-31 pixels, cell 1 contains then 32nd-63rd pixels, cell 2 has 64-96 pixels and so on. If I have my player somewhere and now I want to get the corresponding tile, what can I do? I can't just divide by 32 as this doesn't always work such as here:&#xD;&#xA;&#xD;&#xA;Let's say I am testing both 64 and 96 in the x direction and am testing against the range of 64-96 (which should be in cell 2 of any row)&#xD;&#xA;&#xD;&#xA;64/32 = 2 (this is the correct column for my tile map for any row)&#xD;&#xA;96/32 = 3 (incorrect, the 96th pixel is still within column 2 for any row of the tile map)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8879" PostHistoryTypeId="1" PostId="4478" RevisionGUID="1fca461a-91ce-414b-8307-71aff9af1d12" CreationDate="2010-10-13T18:25:04.670" UserId="2039" Text="Tile coordinates" />
  <row Id="8880" PostHistoryTypeId="3" PostId="4478" RevisionGUID="1fca461a-91ce-414b-8307-71aff9af1d12" CreationDate="2010-10-13T18:25:04.670" UserId="2039" Text="&lt;tiles&gt;&lt;coordinates&gt;" />
  <row Id="8881" PostHistoryTypeId="2" PostId="4479" RevisionGUID="07880ac9-f2a3-4db5-bc85-920a573b6c65" CreationDate="2010-10-13T18:25:08.940" UserId="721" Text="Yes you can.&#xD;&#xA;&#xD;&#xA;You must use this API: [PowerManager API][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;warning you must add one permission:&#xD;&#xA;&#xD;&#xA;    &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/reference/android/os/PowerManager.html" />
  <row Id="8882" PostHistoryTypeId="5" PostId="4479" RevisionGUID="5caa1f66-76ab-4ae3-8bd7-8c30e329c8d5" CreationDate="2010-10-13T18:33:51.117" UserId="721" Comment="added 104 characters in body" Text="With the [PowerManager API][1], you can acquire and release locks to:&#xD;&#xA;&#xD;&#xA; - prevent your device to pause;&#xD;&#xA; - prevent your device to dim;&#xD;&#xA; - force brightness&#xD;&#xA; - ...&#xD;&#xA;&#xD;&#xA;Warning you must add one permission:&#xD;&#xA;&#xD;&#xA;    &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/reference/android/os/PowerManager.html" />
  <row Id="8883" PostHistoryTypeId="2" PostId="4480" RevisionGUID="55e85d1a-94c1-4467-a1c8-fb32fe357627" CreationDate="2010-10-13T18:40:00.727" UserId="141" Text="Actually it seems that your calculation is correct - you are just mistaken about pixel 96. Column 3 contains pixels 64-95 inclusive, not 64-96. Dividing by the tile size is in fact the correct method." />
  <row Id="8884" PostHistoryTypeId="5" PostId="1846" RevisionGUID="cf35dbf2-41a0-46f2-8d96-e09a19a5895e" CreationDate="2010-10-13T18:59:34.627" UserId="1174" Comment="added 2 characters in body" Text="OpenGL is a C API. There are bindings for other languages but samples in books and tutorials tend to be written in C.&#xD;&#xA;&#xD;&#xA;Because of this knowing C can help. You definitely don't have to learn C++ to use OpenGL though." />
  <row Id="8885" PostHistoryTypeId="2" PostId="4481" RevisionGUID="7548ef99-acb0-463c-8537-e4a93972cf8e" CreationDate="2010-10-13T20:28:14.950" UserId="2509" Text="I am trying to turn some items visibility off when submitting a high score.&#xD;&#xA;&#xD;&#xA;I have the following code but it does not appear to work.  Any suggestions?&#xD;&#xA;&#xD;&#xA;mSignText = (EditText) findViewById(R.id.sign);&#xD;&#xA;&#xD;&#xA;submitBtn = (ImageView) this.findViewById(R.id.submitbtn);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;mSignText.setVisibility(View.GONE);&#xD;&#xA;&#xD;&#xA;submitBtn.setVisibility(View.GONE);" />
  <row Id="8886" PostHistoryTypeId="1" PostId="4481" RevisionGUID="7548ef99-acb0-463c-8537-e4a93972cf8e" CreationDate="2010-10-13T20:28:14.950" UserId="2509" Text="Turning layout items invisible in Android layout." />
  <row Id="8887" PostHistoryTypeId="3" PostId="4481" RevisionGUID="7548ef99-acb0-463c-8537-e4a93972cf8e" CreationDate="2010-10-13T20:28:14.950" UserId="2509" Text="&lt;android&gt;" />
  <row Id="8888" PostHistoryTypeId="2" PostId="4482" RevisionGUID="f1e67bb3-e15f-4cf7-8598-a5a02c9ec164" CreationDate="2010-10-13T21:00:02.030" UserId="721" Text="For visibility, you must use setVisibility as you have done:&#xD;&#xA;&#xD;&#xA; - View.VISIBLE&#xD;&#xA; - View.INVISIBLE&#xD;&#xA; - View.GONE&#xD;&#xA;&#xD;&#xA;GONE set the view as invisible, and it doesn't take any space for layout purposes.&#xD;&#xA;&#xD;&#xA;http://developer.android.com/reference/android/view/View.html#setVisibility" />
  <row Id="8889" PostHistoryTypeId="2" PostId="4483" RevisionGUID="38926545-7e21-481c-80d4-7e56cca4d536" CreationDate="2010-10-13T21:07:56.313" UserId="450" Text="In [Stendhal][1] we solved the performance issue by adding game events to a queue and then processing them [asynchronously in the background][2].&#xD;&#xA;&#xD;&#xA;In our case the events are not just records but objects which have a little bit of logic because in some cases we need to do two inserts with a link between them. For example the first time a item is handled in game, it needs to be inserted into the item table first before an item-event can be logged.&#xD;&#xA;&#xD;&#xA;But writing the log is only one side of the problem:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**What questions do you want to answer with the logs?** &#xD;&#xA;&#xD;&#xA;It is easy to just read the complete log in chronologically order; or to filter it for one player.&#xD;&#xA;&#xD;&#xA;But there might be questions like: &#xD;&#xA;&#xD;&#xA; - Which items has Anton put on the ground that have been picked up by Beth yesterday? Which player owns them now? (Anton complained about his item being stolen)&#xD;&#xA; - How much time does an average player need to reach level 100? Which players have been significantly faster?  only for first characters?&#xD;&#xA; - Are there players that handle huge amounts of game-money? To which players is it passed? Without anything valuable in return?&#xD;&#xA; - Are weak players able to kill strong creatures that they should not be able to kill legally?&#xD;&#xA; - ...&#xD;&#xA;&#xD;&#xA;In Stendhal we use a relational database for game logs because that is the easiest way to allow performant ad-hoc queries. If you use a custom log format, you basically have to code all those queries when need arises. And doing that with sufficient performance gets rather difficult.&#xD;&#xA;&#xD;&#xA;Our gameEvents table has 51,429,139 rows (last year) and we have a dedicated itemlog table which has 60,360,657 rows (all time) for 15,893,831 items.&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org&#xD;&#xA;  [2]: http://stendhalgame.org/wiki/Asynchronous_Database_Access" />
  <row Id="8890" PostHistoryTypeId="5" PostId="4474" RevisionGUID="f03d5b7e-fc03-45d4-b3c0-777ef73f0c4b" CreationDate="2010-10-13T21:45:40.670" UserId="1141" Comment="SUB syntax was wrong ..." Text="Assuming *true* evaluates to -1 and *false* evaluates to 0, and '~', '&amp;' and '|' are bitwise *not*, *and* and *or* operators respectively, and we're working with two's-complement arithmetic:&#xD;&#xA;&#xD;&#xA;    temp1 := angle1 &gt; angle2&#xD;&#xA;    /* most processors can do this without a jump; for example, under the x86 family,&#xD;&#xA;       it's the result of CMP; SETLE; SUB .., 1 instructions */&#xD;&#xA;    temp2 := angle1 - angle2&#xD;&#xA;    temp1 := (temp1 &amp; temp2) | (~temp1 &amp; -temp2)&#xD;&#xA;    /* in x86 again: only SUB, AND, OR, NOT and NEG are used, no jumps&#xD;&#xA;       at this point, we have the positive difference between the angles in temp1;&#xD;&#xA;       we can now do the same trick again */&#xD;&#xA;    temp2 := temp1 &gt; 180&#xD;&#xA;    temp2 := (temp2 &amp; temp1) | (~temp2 &amp; (360 - temp1))&#xD;&#xA;    /* the result is in temp2 now */" />
  <row Id="8891" PostHistoryTypeId="2" PostId="4484" RevisionGUID="929aae54-f337-46fb-bec4-2f16c08a8fb3" CreationDate="2010-10-13T21:50:47.893" UserId="136" Text="I'd suggest the multiplayer server run locally on the host's machine.  WCF is a great choice if you don't need very high throughput.  Otherwise, there is a pretty decent networking library for .NET called [Lidgren][1]; it supports TCP as well as reliable UDP-based messaging.&#xD;&#xA;&#xD;&#xA;I would try to find a lobby system that you can hook, preferably one with a web service API that your clients could use to locate and advertise multiplayer games.  I have no idea what's available in this area, but I suspect you may have to wrap an unmanaged library or roll your own.  The lobby application, if you host it yourself, could be hosted on Windows Azure, along with your game's website and forums.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/lidgren-library-network/" />
  <row Id="8892" PostHistoryTypeId="2" PostId="4485" RevisionGUID="c264b586-04e6-4f6e-b7d1-9340eac5866c" CreationDate="2010-10-13T22:52:08.883" UserId="962" Text="The Bitmap has transparency, and only non-transparent pixels are solid and used for hit detection for the physics engine and gameplay.&#xD;&#xA;&#xD;&#xA;I have seen some versions done with convex hulls, but for multiple reasons I am not using convex hulls to build the levels in my game.&#xD;&#xA;&#xD;&#xA;**How can I implement 2d shadows on a level made out of a Bitmap?**" />
  <row Id="8893" PostHistoryTypeId="1" PostId="4485" RevisionGUID="c264b586-04e6-4f6e-b7d1-9340eac5866c" CreationDate="2010-10-13T22:52:08.883" UserId="962" Text="2D Real-Time shadows on level on Bitmap level" />
  <row Id="8894" PostHistoryTypeId="3" PostId="4485" RevisionGUID="c264b586-04e6-4f6e-b7d1-9340eac5866c" CreationDate="2010-10-13T22:52:08.883" UserId="962" Text="&lt;2d&gt;&lt;actionscript-3&gt;&lt;lighting&gt;&lt;shadows&gt;" />
  <row Id="8895" PostHistoryTypeId="4" PostId="4485" RevisionGUID="a7eee1a7-6df2-437c-ab04-6e8c4e759bf5" CreationDate="2010-10-13T23:10:21.863" UserId="962" Comment="fixed grammer" Text="2D Real-Time shadows on level on a level made from a Bitmap" />
  <row Id="8896" PostHistoryTypeId="2" PostId="4486" RevisionGUID="40024b99-9cf6-4962-97ff-71f8bc84b392" CreationDate="2010-10-14T00:21:16.050" UserId="1232" Text="This is only one way to approach the problem.&#xD;&#xA;&#xD;&#xA;For each source pixel in your bitmap, ray march towards the pixel that currently represents the light source. If you hit a non-transparent pixel along the way, stop marching and assign a shadow value to your source pixel. If you reach the light pixel, the source pixel is lit.&#xD;&#xA;&#xD;&#xA;As you can probably tell, marching and testing every pixel along the way for every source pixel can get expensive, especially when adding multiple lights. Fortunately, there are things that can be done:&#xD;&#xA;&#xD;&#xA;* assign a bounding circle to your light. Before marching, test if the pixel is inside or outside of this circle radius. If it's outside, it's considered in shadow by default and there is no need to march. If it's inside, do the ray march. If the ray march yields that the pixel is lit, use a falloff function to determine how bright it is. (side note: interesting falloff functions can be derived to make your lights flicker and animate)&#xD;&#xA;&#xD;&#xA;* To avoid marching and testing every pixel, pre-compute a distance field for your static bitmap. The distance field simply stores the distance to the closest opaque pixel for every pixel. Then when marching along a ray, you look at the distance field, and are guaranteed to hit no opaque pixels by stepping that amount. (side note: you can use these distance fields for your physics too).&#xD;&#xA;" />
  <row Id="8897" PostHistoryTypeId="2" PostId="4487" RevisionGUID="2426ad9f-cee4-458c-897b-1bda38214671" CreationDate="2010-10-14T00:29:13.907" UserId="2510" Text="I'm working in 3ds max on models for an Iphone game project and finding that using the Physique modifier is to general for rigging. When working with so few vertices I want to be able to directly tell how much weight a bone should have on a specific vertex.&#xD;&#xA;&#xD;&#xA;Is there a 3ds max equivalent to the Softimage XSI vertex weight painting? As this would be perfect for this job. &#xD;&#xA;&#xD;&#xA;Many thanks" />
  <row Id="8898" PostHistoryTypeId="1" PostId="4487" RevisionGUID="2426ad9f-cee4-458c-897b-1bda38214671" CreationDate="2010-10-14T00:29:13.907" UserId="2510" Text="3DS Max equivalent to vertex weight painting" />
  <row Id="8899" PostHistoryTypeId="3" PostId="4487" RevisionGUID="2426ad9f-cee4-458c-897b-1bda38214671" CreationDate="2010-10-14T00:29:13.907" UserId="2510" Text="&lt;3d-meshes&gt;&lt;models&gt;&lt;rigging&gt;" />
  <row Id="8900" PostHistoryTypeId="2" PostId="4488" RevisionGUID="60eed387-60a8-49e1-af66-e52c15064875" CreationDate="2010-10-14T00:40:30.730" UserId="2509" Text="Just curious of a rough estimate:  About how many impressions would it take to make 300 dollars a day in ad revenue?&#xD;&#xA;&#xD;&#xA;Thanks for any help!" />
  <row Id="8901" PostHistoryTypeId="1" PostId="4488" RevisionGUID="60eed387-60a8-49e1-af66-e52c15064875" CreationDate="2010-10-14T00:40:30.730" UserId="2509" Text="Number of Impressions on Admob for revenue" />
  <row Id="8902" PostHistoryTypeId="3" PostId="4488" RevisionGUID="60eed387-60a8-49e1-af66-e52c15064875" CreationDate="2010-10-14T00:40:30.730" UserId="2509" Text="&lt;android&gt;" />
  <row Id="8903" PostHistoryTypeId="2" PostId="4489" RevisionGUID="881bbcdc-a71c-4fbe-9a3d-22a2ef417645" CreationDate="2010-10-14T01:49:40.230" UserId="2509" Text="I am playing sounds in my application I have the following code&#xD;&#xA;&#xD;&#xA;    sounds = new HashMap&lt;String, MediaPlayer&gt;();&#xD;&#xA;&#xD;&#xA;Then when guys are created on screen they are given a sound.&#xD;&#xA;&#xD;&#xA;    sounds.put(&quot;sounds&quot;+Integer.toString(ncount), MediaPlayer.create(this, R.raw.hit));&#xD;&#xA;&#xD;&#xA;I want to remove the MediaPlayer from the hashmap like I do the enemies when they die&#xD;&#xA;&#xD;&#xA;    sounds.get(&quot;sounds&quot;+Integer.toString(ncount)).setOnCompletionListener( new MediaPlayer.OnCompletionListener() {&#xD;&#xA;&#xD;&#xA;        public void onCompletion(MediaPlayer mp) {&#xD;&#xA;&#xD;&#xA;            sounds.remove(&quot;sounds&quot;+Integer.toString(ncount));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;This errors out... how would I reference the sounds hashmap to remove the associated MediaPlayer when sound is complete?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;" />
  <row Id="8904" PostHistoryTypeId="1" PostId="4489" RevisionGUID="881bbcdc-a71c-4fbe-9a3d-22a2ef417645" CreationDate="2010-10-14T01:49:40.230" UserId="2509" Text="Playing Sounds and removing instances once they have played -- Android" />
  <row Id="8905" PostHistoryTypeId="3" PostId="4489" RevisionGUID="881bbcdc-a71c-4fbe-9a3d-22a2ef417645" CreationDate="2010-10-14T01:49:40.230" UserId="2509" Text="&lt;android&gt;" />
  <row Id="8906" PostHistoryTypeId="4" PostId="1838" RevisionGUID="70a5b986-1146-409f-94d7-5adabd53b012" CreationDate="2010-10-14T03:44:05.350" UserId="14" Comment="edited title" Text="Do I need to learn C++ to use Open GL?" />
  <row Id="8907" PostHistoryTypeId="2" PostId="4490" RevisionGUID="518bd6b7-9fe8-4e4f-a6a2-9cf1f11dec7e" CreationDate="2010-10-14T03:53:57.637" UserId="154" Text="Actually you want to use Skin not Physique. It's mainly in there for backward compatibility with character studio from years ago.&#xD;&#xA;&#xD;&#xA;Max: [Rigging tutorial][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/3dsmaxhowtos#p/c/54DFAAA0320637A6" />
  <row Id="8908" PostHistoryTypeId="5" PostId="4468" RevisionGUID="e9674c0f-f1fa-4437-b6f2-a1c49b9d46e4" CreationDate="2010-10-14T04:34:25.030" UserId="1251" Comment="added 70 characters in body" Text="i guess i could say&#xD;&#xA;&#xD;&#xA;    angle1=angle1%360;&#xD;&#xA;    angle2=angle2%360;&#xD;&#xA;    var distance = Math.abs(angle1-angle2);&#xD;&#xA;    //edited&#xD;&#xA;    if(distance&gt;180)&#xD;&#xA;      distance=360-distance;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ofcourse, considering the angle is measured in degrees.&#xD;&#xA;" />
  <row Id="8909" PostHistoryTypeId="2" PostId="4491" RevisionGUID="5b4604ed-e829-42d7-8fe3-8c0f19381757" CreationDate="2010-10-14T08:17:32.903" UserId="478" Text="The answer to the following question has a link you might find very useful : [How is 2D lighting implemented?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4177/how-is-2d-lighting-implemented &quot;How is 2D lighting implemented?&quot;" />
  <row Id="8910" PostHistoryTypeId="2" PostId="4492" RevisionGUID="f323fe43-e543-45cf-a699-86cdcf56f507" CreationDate="2010-10-14T08:50:51.203" UserId="919" Text="When should a Designer draw the line in design decisions when marketing does step in?&#xD;&#xA;&#xD;&#xA;Where should the bounds be set? &#xD;&#xA;&#xD;&#xA;(For most part I know this is might mostly be situational. Gut feel like thing. But would like to get some inputs on this as well)&#xD;&#xA;" />
  <row Id="8911" PostHistoryTypeId="1" PostId="4492" RevisionGUID="f323fe43-e543-45cf-a699-86cdcf56f507" CreationDate="2010-10-14T08:50:51.203" UserId="919" Text="When should design give way to marketing and vice versa?" />
  <row Id="8912" PostHistoryTypeId="3" PostId="4492" RevisionGUID="f323fe43-e543-45cf-a699-86cdcf56f507" CreationDate="2010-10-14T08:50:51.203" UserId="919" Text="&lt;game-design&gt;&lt;marketing&gt;&lt;job-hierarchy&gt;" />
  <row Id="8913" PostHistoryTypeId="2" PostId="4493" RevisionGUID="b2a80351-e43b-4ced-96c4-e8402dca1e38" CreationDate="2010-10-14T12:34:48.097" UserId="2047" Text="Solution with a schedule is good. Note that every entity should have a list of pointers to its future actions, which gives possibility to invalidate future actions if necessary. Ie. sleeping animal wakes up instantly when attacked, so you have to invalidate its wake-up action in the future." />
  <row Id="8914" PostHistoryTypeId="2" PostId="4494" RevisionGUID="f0eb64bd-4d42-43db-b934-74ed13c4fdbc" CreationDate="2010-10-14T13:20:16.077" UserId="2509" Text="I have a thread that uses TimeUnit.MILLISECONDS.sleep(5);&#xD;&#xA;&#xD;&#xA;Problem is when I load my app on a faster phone say with a snapdragon, it runs at lightning speed.&#xD;&#xA;&#xD;&#xA;Is there a way to control this speed so processor speed is not an attributing factor?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="8915" PostHistoryTypeId="1" PostId="4494" RevisionGUID="f0eb64bd-4d42-43db-b934-74ed13c4fdbc" CreationDate="2010-10-14T13:20:16.077" UserId="2509" Text="Thread runs faster on a faster processor... how to control Thread speed" />
  <row Id="8916" PostHistoryTypeId="3" PostId="4494" RevisionGUID="f0eb64bd-4d42-43db-b934-74ed13c4fdbc" CreationDate="2010-10-14T13:20:16.077" UserId="2509" Text="&lt;android&gt;" />
  <row Id="8917" PostHistoryTypeId="2" PostId="4495" RevisionGUID="8e26d9fd-9eb1-4da0-8e42-d50ed29a6271" CreationDate="2010-10-14T13:34:56.690" UserId="2515" Text="Instead of sleeping to regulate game speed, use the time elapsed per frame to give everything a consistent speed.&#xD;&#xA;&#xD;&#xA;    myObject.Move(elapsedTime*moveSpeed,0,0);&#xD;&#xA;&#xD;&#xA;Something to that effect. No matter what speed the processor runs at or the framerate, the object would always move at the same speed. Make sure any movement or rotation that requires a specific speed uses the same idea." />
  <row Id="8918" PostHistoryTypeId="6" PostId="4494" RevisionGUID="b2634ec0-cd0b-43d3-a90e-360f09b00a96" CreationDate="2010-10-14T13:56:07.300" UserDisplayName="Sergio" Comment="edited tags" Text="&lt;android&gt;&lt;timer&gt;" />
  <row Id="8919" PostHistoryTypeId="2" PostId="4496" RevisionGUID="05a88ab0-5537-44a2-b088-3032cc5d52ab" CreationDate="2010-10-14T16:07:25.957" UserId="744" Text="There's always the trick of doing both branches and letting the comparison result pick one:&#xD;&#xA;&#xD;&#xA;    delta_theta = (angle1 &gt; angle2) * (360 - angle2 - angle1)&#xD;&#xA;                  + (angle2 &gt; angle1) * (angle2 - angle1);&#xD;&#xA;&#xD;&#xA;I don't know of a way to do it without _comparisons_, but usually the _branch_ is what makes code slow and long, not the compare. At least in my opinion, this is more readable than Martin's answer (any good C programmer will recognize it as a branchless equivalent and see what it's doing), but also less efficient.&#xD;&#xA;&#xD;&#xA;But like I said in my comment, branchless algorithms are good on processors with deep pipelines and bad prediction - a microcontroller usually has a tiny pipeline, and a desktop PC usually has good prediction, so unless you are targeting a gaming console, the branching version is likely best route if it reduces instruction count.&#xD;&#xA;&#xD;&#xA;As always, profiling - which might be as simple as op-counting for your system - will give you the real answer." />
  <row Id="8920" PostHistoryTypeId="2" PostId="4497" RevisionGUID="c5140fba-02b8-4abe-8db2-ac6e57ca5263" CreationDate="2010-10-14T16:24:17.157" UserId="1352" Text="He'res the class I wrote for this purpose. Use it by first calling start() and then sleepRequiredTime() in your gameloop. call getTimeSinceLastSleep() for elapsed time.&#xD;&#xA;&#xD;&#xA;runsPrSecondHint will dictate your wanted FPS. I'm not sure this solution is perfect though, so any input from others is welcome.&#xD;&#xA;&#xD;&#xA;    package com.ngame.spacegame.utils;&#xD;&#xA;&#xD;&#xA;    public class ThreadSleepManager {&#xD;&#xA;    &#xD;&#xA;    private int m_runsPrSecondHint;&#xD;&#xA;    private float m_maxAllowedSleepTime;&#xD;&#xA;    private boolean m_running;&#xD;&#xA;    &#xD;&#xA;    private long m_startTime = 0;&#xD;&#xA;    private long m_lastSleepTime = 0;&#xD;&#xA;    &#xD;&#xA;    private int[] m_lastRuntimes;&#xD;&#xA;    private int m_runtimeToWriteToIndex = 0;&#xD;&#xA;    private int m_averageSleepTime = 0;&#xD;&#xA;    private int m_timeSinceLastSleep = 0;&#xD;&#xA;    &#xD;&#xA;    private static final int AVERAGE_POOL = 10;&#xD;&#xA;    &#xD;&#xA;    public ThreadSleepManager( int runsPrSecondHint ) {&#xD;&#xA;        m_runsPrSecondHint = runsPrSecondHint;&#xD;&#xA;        &#xD;&#xA;        m_maxAllowedSleepTime = 1000.0f / m_runsPrSecondHint;&#xD;&#xA;        initLastRuntimes();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    private void initLastRuntimes() {&#xD;&#xA;        m_lastRuntimes = new int[AVERAGE_POOL];&#xD;&#xA;        for ( int i : m_lastRuntimes ) {&#xD;&#xA;            m_lastRuntimes[ i ] = (int)m_maxAllowedSleepTime; &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int getTimeSinceLastSleep() {&#xD;&#xA;        return m_timeSinceLastSleep;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int getAverageSleepTime() {&#xD;&#xA;        return m_averageSleepTime;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public void start() {&#xD;&#xA;        m_startTime = System.currentTimeMillis();&#xD;&#xA;        m_lastSleepTime = m_startTime;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /**&#xD;&#xA;     * Sleeps an optimal amount of time for trying &#xD;&#xA;     * to have the current thread calling run at m_runsPrSecondHint&#xD;&#xA;     */&#xD;&#xA;    public void sleepRequiredTime() {&#xD;&#xA;        assert( m_running == true );&#xD;&#xA;        long currentTime = System.currentTimeMillis();&#xD;&#xA;        m_timeSinceLastSleep = (int) (currentTime - m_lastSleepTime);&#xD;&#xA;        &#xD;&#xA;        // Update data used for average sleep time calculation&#xD;&#xA;        m_lastRuntimes[ m_runtimeToWriteToIndex ] = m_timeSinceLastSleep;&#xD;&#xA;        m_runtimeToWriteToIndex = ( m_runtimeToWriteToIndex + 1 ) % AVERAGE_POOL;&#xD;&#xA;        &#xD;&#xA;        // Sleep long enough for the average time since last sleep to stay as close as&#xD;&#xA;        // possible to m_maxAllowedSleepTime&#xD;&#xA;        m_averageSleepTime = calcAverageTimeSinceLastSleep();&#xD;&#xA;&#xD;&#xA;        int timeToSleep = (int) (m_maxAllowedSleepTime - m_averageSleepTime);&#xD;&#xA;        if( timeToSleep &gt; 0 ) {&#xD;&#xA;            try {&#xD;&#xA;                Thread.sleep( timeToSleep );&#xD;&#xA;            }&#xD;&#xA;            catch( InterruptedException e ) {&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        m_lastSleepTime = currentTime;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    private int calcAverageTimeSinceLastSleep() {&#xD;&#xA;        int sum_sleep_time = 0;&#xD;&#xA;        &#xD;&#xA;        for ( int runtime : m_lastRuntimes ) {&#xD;&#xA;            sum_sleep_time += runtime; &#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        return sum_sleep_time / m_lastRuntimes.length;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;" />
  <row Id="8921" PostHistoryTypeId="2" PostId="4498" RevisionGUID="001711e6-be6a-48d5-bc07-fe0397abcea8" CreationDate="2010-10-14T16:36:12.520" UserId="962" Text="You need to **Fix Your Timestep!**&#xD;&#xA;&#xD;&#xA;http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="8922" PostHistoryTypeId="5" PostId="4472" RevisionGUID="431171e7-c5ee-4424-8bbe-f8bc3d918f58" CreationDate="2010-10-14T16:51:53.197" UserId="1091" Comment="deleted 25 characters in body" Text="I'm not sure if my comment was getting lost or not, so here's my simplified, branchless, compare-free, no min/max version...&#xD;&#xA;&#xD;&#xA;angle = 180 - abs((abs(a1 - a2) % 360) - 180); &#xD;&#xA;&#xD;&#xA;Only arguable expensive operation is the modulo, which I think is inevitable.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="8923" PostHistoryTypeId="2" PostId="4499" RevisionGUID="19d2409d-b76a-40f0-860f-479a1668f7e8" CreationDate="2010-10-14T16:54:15.440" UserId="656" Text="It is not possible to determine an accurate estimate because the rate of each click-through or impression changes for each ad that is displayed.&#xD;&#xA;&#xD;&#xA;However, if we take some made up stats from http://developer.admob.com/wiki/Definitions, it gives that you could theoretically have a estimated cost-per-1000-impression (eCPM) of $1.11. Based on that, it means you would need over 270,000 **unique** impressions a day to make $300. If your eCPM was only half of that, you would have to double the numbers.&#xD;&#xA;&#xD;&#xA;If we look at the cost-per-click model, and you assume the average cost-per-click is $0.30 (again, a made up figure obtained from the link above), then it will take 1000 **unique** clicks a day to make $300/day.&#xD;&#xA;&#xD;&#xA;Remember, the above stats are completely made up. Each person will have a different experience and the only true way to find out is to implement it in your app and record your own stats." />
  <row Id="8924" PostHistoryTypeId="5" PostId="4472" RevisionGUID="c0cdfc90-780b-4fc2-98a1-347166e34eca" CreationDate="2010-10-14T18:40:39.333" UserId="1091" Comment="added 45 characters in body" Text="I'm not sure if my comment was getting lost or not, so here's my simplified, branchless, compare-free, no min/max version...&#xD;&#xA;&#xD;&#xA;angle = 180 - abs(abs(a1 - a2) - 180); &#xD;&#xA;&#xD;&#xA;Removed the modulo, as the inputs are sufficiently constrained (thanks to Martin for pointing that out).&#xD;&#xA;&#xD;&#xA;Two abs, three subtracts. " />
  <row Id="8926" PostHistoryTypeId="2" PostId="4500" RevisionGUID="428ac10d-d1e4-478f-bc63-89f0d1f27cda" CreationDate="2010-10-14T19:23:12.243" UserId="891" Text="What I've seen in most **Game Engines** and game engine design is that the **Physics Engine** is the **be all end all system**.  &#xD;&#xA;&#xD;&#xA;Basically, **AI** for example may want to travel to some position, but it simply sends that request (*velocity, direction*) to the **Physics Engine**.  If the AI really gets to that position is up to the will of the Physics Engine.&#xD;&#xA;&#xD;&#xA;Is there some Design or Physics Engine which will let you plan out how Physics will react? Before it will actually occur?&#xD;&#xA;&#xD;&#xA;Take for example that you can do Motion Planning by the AI to nearly eliminate foot sliding.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;![alt text][3]  &#xD;&#xA;*images from aigamedev.com -* [**Motion Planning for Fun and Profit!**][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kvfWk.jpg&#xD;&#xA;  [2]: http://aigamedev.com/insider/discussion/motion-planning-thoughts/&#xD;&#xA;  [3]: http://i.stack.imgur.com/XlzeJ.jpg" />
  <row Id="8927" PostHistoryTypeId="1" PostId="4500" RevisionGUID="428ac10d-d1e4-478f-bc63-89f0d1f27cda" CreationDate="2010-10-14T19:23:12.243" UserId="891" Text="Taking Physics into account for AI Planning" />
  <row Id="8928" PostHistoryTypeId="3" PostId="4500" RevisionGUID="428ac10d-d1e4-478f-bc63-89f0d1f27cda" CreationDate="2010-10-14T19:23:12.243" UserId="891" Text="&lt;game-design&gt;&lt;physics&gt;&lt;ai&gt;&lt;planning&gt;" />
  <row Id="8929" PostHistoryTypeId="2" PostId="4501" RevisionGUID="f3f83621-e766-4887-a9c9-cc7ecf0dcb93" CreationDate="2010-10-14T21:17:37.173" UserId="189" Text="Is there a good algorithm that simulates falling snow? I'm particularly interested in snow that falls slowly, so it doesn't quite fall in a straight line but deviates a bit. Maybe even including simulation of flurries (drafts of wind), variable size, etc. Are there any papers or articles on an algorithm that mimics real-life snow movements or simulates it in the context of a game?&#xD;&#xA;&#xD;&#xA;I'm particularly interested in a 2D algorithm, but I imagine any algorithm can be taken to 3D easily." />
  <row Id="8930" PostHistoryTypeId="1" PostId="4501" RevisionGUID="f3f83621-e766-4887-a9c9-cc7ecf0dcb93" CreationDate="2010-10-14T21:17:37.173" UserId="189" Text="Realistic slow-falling snow algorithm?" />
  <row Id="8931" PostHistoryTypeId="3" PostId="4501" RevisionGUID="f3f83621-e766-4887-a9c9-cc7ecf0dcb93" CreationDate="2010-10-14T21:17:37.173" UserId="189" Text="&lt;algorithm&gt;&lt;physics&gt;" />
  <row Id="8932" PostHistoryTypeId="2" PostId="4502" RevisionGUID="f85daeef-dd69-4383-8ba2-b9e748b0f1d0" CreationDate="2010-10-14T21:27:30.753" UserId="891" Text="Something like this?&#xD;&#xA;&#xD;&#xA;Blurb:&#xD;&#xA;&#xD;&#xA;&gt;Realistic-looking rain and snow greatly enhance scenes of outdoor reality, with applications including computer games and motion pictures. We present a novel technique for realistically and efficiently rendering precipitation in scenes with moving camera po- sitions. We map textures onto a double cone, and translate and elongate them using hardware texture transforms.&#xD;&#xA;&#xD;&#xA;[**Rendering Falling Rain and Snow**][1] - SIGGRAPH submission of the paper&#xD;&#xA;&#xD;&#xA;Actual published paper - **Let It Snow, Let It Snow, Let It Snow (and Rain) - Game Programming Gems 5**&#xD;&#xA;&#xD;&#xA;Written by Niniane Wang(*absurdly smart, who gradautes cal tech in CS at 18??!!!@!@!$*) and Bretton Wade&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://niniane.org/rainsnow/rainsnow-sketch.pdf" />
  <row Id="8933" PostHistoryTypeId="2" PostId="4503" RevisionGUID="0ff1365a-8ba9-4fdf-99f1-31e859da214e" CreationDate="2010-10-14T22:02:45.470" UserId="1232" Text="This is very contextual, and there is no one right answer.&#xD;&#xA;&#xD;&#xA;Upfront it's important to recognize marketing and design have different and sometimes opposing roles. Designers attempt to make a coherent, fun game experience. Marketing attempt to make money off it. Both are crucial to the success of a game and the survival of the folk making it.&#xD;&#xA;&#xD;&#xA;Before you fight with marketing folk, it helps to try understand them and try and speak their lingo. Giving clear, rational responses to their concerns and bringing up your concerns in their language can go a long way towards resolving conflicts.&#xD;&#xA;&#xD;&#xA;Marketing is typically driven by the current market realities as determined by empirical data. The degree to which they look at new trends in the market may vary depending on who is doing the marketing, but typically marketing folk won't take well to unproved ideas or designs. &#xD;&#xA;&#xD;&#xA;When drawing a line in the sand it may be helpful to consider a number of factors:&#xD;&#xA;&#xD;&#xA;1] Can you compete in the market with your current design? If competitor X completely outclasses your game, a marketing driven design changes may actually be helpful!&#xD;&#xA;&#xD;&#xA;2] At what stage are you in development? :&#xD;&#xA;&#xD;&#xA;* Early stage: design changes now can make your game more appropriate for your target demographic, make you better able to compete, but can also homogenize your design to such a degree that your game is not differentiated in the market place. The concept of differentiation is one that marketing folk understand so try to explain your ideas in terms of differentiation.&#xD;&#xA;&#xD;&#xA;* Mid-&gt;Late stage: design changes at this stage can yield wasted work (very quantifiable, just take axed features and multiply by number of devs it took and how much it cost the company for each dev). Moreover, design changes at this stage could push the schedule out, forcing you to miss important marketing dates.&#xD;&#xA;&#xD;&#xA;3] Is the marketing requested change reasonable? Is it trivial or is it core to the whole game design thus far? If it's trivial, sometimes it's easier to bite the bullet. If you're dealing with unreasonable requests of a core nature, you're probably out of luck and no attempt to rationalize things is going to get you very far. In these cases, unless you're the boss it's probably best not to expend the effort fighting it - just try to protect yourself against future blame by making it clear this was not your design change.&#xD;&#xA;&#xD;&#xA;Given these factors then, the question then becomes: how do I shield myself from the risk of design changes? Almost certainly it involves a whole bunch of cheap upfront work, normally called preproduction, during which a game is prototyped, and it's fun is proved, and market viability is tested *before* it is actually built.&#xD;&#xA;" />
  <row Id="8934" PostHistoryTypeId="6" PostId="4488" RevisionGUID="3cb1c3ae-059f-4e06-affd-5f9ada0877fa" CreationDate="2010-10-14T22:25:16.223" UserId="51" Comment="edited tags" Text="&lt;android&gt;&lt;revenue&gt;" />
  <row Id="8935" PostHistoryTypeId="6" PostId="4489" RevisionGUID="30dc7dcd-f777-432a-9919-171daaa25b3e" CreationDate="2010-10-14T22:26:13.257" UserId="51" Comment="edited tags" Text="&lt;android&gt;&lt;sound&gt;" />
  <row Id="8936" PostHistoryTypeId="2" PostId="4504" RevisionGUID="f9c0d55e-8a60-49ad-ba34-a0f806b1a31f" CreationDate="2010-10-14T22:26:32.533" UserId="2520" Text="I've found some HTML/Canvas/Javascript browser based games that I don't particularly enjoy playing, but which I think would be fun to write robots for. Are there any tools out there which help remove some of the tedium of the work, and get me closer to writing the actual AI portion of the code?" />
  <row Id="8937" PostHistoryTypeId="1" PostId="4504" RevisionGUID="f9c0d55e-8a60-49ad-ba34-a0f806b1a31f" CreationDate="2010-10-14T22:26:32.533" UserId="2520" Text="Are there any good tools or suites out there that help with building AI/Robots for browser based games?" />
  <row Id="8938" PostHistoryTypeId="3" PostId="4504" RevisionGUID="f9c0d55e-8a60-49ad-ba34-a0f806b1a31f" CreationDate="2010-10-14T22:26:32.533" UserId="2520" Text="&lt;ai&gt;&lt;web&gt;&lt;client&gt;" />
  <row Id="8939" PostHistoryTypeId="2" PostId="4505" RevisionGUID="c6550601-69d0-4ba3-bc6c-da10f8552662" CreationDate="2010-10-14T22:35:00.513" UserId="891" Text="Why bother writing the boring interface code and use AI Api's directly?  Program the AI not the interaction with the game itself.&#xD;&#xA;&#xD;&#xA;## Starcraft 1##&#xD;&#xA;&#xD;&#xA;The very popular BroodWars API allows for commanding all the units to do anything a real player could.  You can even battle against other players or AI's with your AI&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/bwapi/&#xD;&#xA;&#xD;&#xA;## Super Mario##&#xD;&#xA;&#xD;&#xA;This API allows for you to control Mario!  It was a contest for the best level generation and fastest level completion AI. (A\* actually won)&#xD;&#xA;&#xD;&#xA;http://www.marioai.org/&#xD;&#xA;&#xD;&#xA;## Galcon ##&#xD;&#xA;&#xD;&#xA;There is currently a contest for the best Galcon AI, a Google AI Challenge.  Of course Galcon API is provided.&#xD;&#xA;&#xD;&#xA;http://ai-contest.com/&#xD;&#xA;" />
  <row Id="8940" PostHistoryTypeId="5" PostId="4503" RevisionGUID="83b04a9a-5255-4033-9367-5c39f087bc67" CreationDate="2010-10-14T22:46:22.253" UserId="1232" Comment="added blurb about communications channels" Text="This is very contextual, and there is no one right answer.&#xD;&#xA;&#xD;&#xA;Upfront it's important to recognize marketing and design have different and sometimes opposing roles. Designers attempt to make a coherent, fun game experience. Marketing attempt to make money off it. Both are crucial to the success of a game and the survival of the folk making it.&#xD;&#xA;&#xD;&#xA;Before you fight with marketing folk, it helps to try understand them and try and speak their lingo. Giving clear, rational responses to their concerns and bringing up your concerns in their language can go a long way towards resolving conflicts.&#xD;&#xA;&#xD;&#xA;Marketing is typically driven by the current market realities as determined by empirical data. The degree to which they look at new trends in the market may vary depending on who is doing the marketing, but typically marketing folk won't take well to unproved ideas or designs. &#xD;&#xA;&#xD;&#xA;When drawing a line in the sand it may be helpful to consider a number of factors:&#xD;&#xA;&#xD;&#xA;1] Can you compete in the market with your current design? If competitor X completely outclasses your game, a marketing driven design changes may actually be helpful!&#xD;&#xA;&#xD;&#xA;2] At what stage are you in development? :&#xD;&#xA;&#xD;&#xA;* Early stage: design changes now can make your game more appropriate for your target demographic, make you better able to compete, but can also homogenize your design to such a degree that your game is not differentiated in the market place. The concept of differentiation is one that marketing folk understand so try to explain your ideas in terms of differentiation.&#xD;&#xA;&#xD;&#xA;* Mid-&gt;Late stage: design changes at this stage can yield wasted work (very quantifiable, just take axed features and multiply by number of devs it took and how much it cost the company for each dev). Moreover, design changes at this stage could push the schedule out, forcing you to miss important marketing dates.&#xD;&#xA;&#xD;&#xA;3] Is the marketing requested change reasonable? Is it trivial or is it core to the whole game design thus far? If it's trivial, sometimes it's easier to bite the bullet. If you're dealing with unreasonable requests of a core nature, you're probably out of luck and no attempt to rationalize things is going to get you very far. In these cases, unless you're the boss it's probably best not to expend the effort fighting it - just try to protect yourself against future blame by making it clear this was not your design change.&#xD;&#xA;&#xD;&#xA;Given these factors then, the question then becomes: how do I shield myself from the risk of design changes? Almost certainly it involves a whole bunch of cheap upfront work, normally called preproduction, during which a game is prototyped, and it's fun is proved, and market viability is tested *before* it is actually built.&#xD;&#xA;&#xD;&#xA;Just to note that despite what I've said here, there are often strict communications channels in game organizations. Designers typically communicate through their leads, as do coders and artists. Also design changes driven by marketing or by design, should strictly go through coder leads, art leads and marketing before they're set in stone. this is important so that all the major stakeholders can review the viability of the design and how it impacts their schedule." />
  <row Id="8941" PostHistoryTypeId="2" PostId="4506" RevisionGUID="0453edac-9e03-4ca1-af2a-81f16f826df6" CreationDate="2010-10-14T22:54:58.123" UserId="891" Text="So it looks like what the author of the question wants is basically to hack server calls of web based games?&#xD;&#xA;&#xD;&#xA;If that's the case I'm adding another answer which is very different from my first answer&#xD;&#xA;&#xD;&#xA;## [Fiddler][1] ##&#xD;&#xA;**Fiddler** is a web debugging proxy.  It will let you setup a proxy between you(*the client*) and the server.  &#xD;&#xA;The proxy has a ton of configurations will will let you save sessions, replay sessions, pause AJAX requests and edit them on the fly.&#xD;&#xA;&#xD;&#xA;It can log all AJAX requests so you could build a HTTP robot which could simulate playing the game.&#xD;&#xA;&#xD;&#xA;Fiddler was originally created for debugging websites, and web interactions of applications.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fiddler2.com/fiddler2/&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/awt/Robot.html" />
  <row Id="8942" PostHistoryTypeId="5" PostId="4506" RevisionGUID="7518e748-1b72-4d46-9151-085af95035c2" CreationDate="2010-10-14T23:16:47.843" UserId="891" Comment="added 21 characters in body" Text="So it looks like what the author of the question wants is basically to hack server calls of web based games?&#xD;&#xA;&#xD;&#xA;If that's the case I'm adding another answer which is very different from my first answer&#xD;&#xA;&#xD;&#xA;## [Fiddler][1] ##&#xD;&#xA;**Fiddler** is a web debugging proxy.  It will let you setup a proxy between you(*the client*) and the server.  &#xD;&#xA;The proxy has a ton of configurations will will let you save sessions, replay sessions, pause AJAX requests and edit them on the fly.&#xD;&#xA;&#xD;&#xA;It can log all AJAX requests so you could build a HTTP robot which could simulate playing the game.&#xD;&#xA;&#xD;&#xA;Fiddler was originally created by a PM at Microsoft for debugging websites, and web interactions of applications.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fiddler2.com/fiddler2/&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/awt/Robot.html" />
  <row Id="8945" PostHistoryTypeId="2" PostId="4509" RevisionGUID="e8c8cd81-96d8-4159-884a-9a3b5014ca27" CreationDate="2010-10-15T09:22:01.883" UserId="1586" Text="Anyone know of any (active) groups or events in London, UK ?" />
  <row Id="8946" PostHistoryTypeId="2" PostId="4510" RevisionGUID="4d1e88b9-8b60-48c2-8d8b-81d83aa74bb7" CreationDate="2010-10-15T09:35:13.630" UserId="1101" Text="Hmm, that's not my experience - the physics system may well implement things at the lowest level but it's equally likely that player motion is done without much recourse to the physics system at all. Either way, the job of the AI system is usually to generate a path such that the act of locomotion is simplified, eg. along a sequence of straight unblocked paths. This means the physics of the player's motion becomes mostly irrelevant for the purposes of making the path. However, if the low level physics or collision handling detects a new obstacle during execution of that plan, it can report that back to the AI system and re-plan the route. (Preferably after trying intermediate recovery strategies, eg. steering around the obstacle.)&#xD;&#xA;&#xD;&#xA;To actually plan for the exact detail of what the physics will do would require immense CPU time as you'd really need to simulate every nearby object in the system for many timesteps to predict what would happen. It *may* actually be practical to do this to extrapolate your current position to anticipate any problems, but it's not going to be practical to do this for every node of the planning tree.&#xD;&#xA;&#xD;&#xA;If on the other hand by 'physics' you are really just meaning the acceleration and velocity of the player, then that is trivially calculable in the original pathfinding plan - but then that doesn't take into account the other actors in the world, who are ultimately the only ones likely to impede an existing plan." />
  <row Id="8950" PostHistoryTypeId="2" PostId="4512" RevisionGUID="7705bc5f-613d-4609-90c9-1788f8c3959c" CreationDate="2010-10-15T12:52:55.420" UserId="1251" Text="I have a platform flash game which includes a level with just two backgrounds which are flipped side by side so that a looping background effect is created. In this I have to include Obstacles. Basically, when I designed the level, that was neat and good. But now I want to make the obstacles come randomly . Another factor is that since the player character in the platformer always keeps on running, if two obstacles come almost close together, it results in an impossible condition to win the game. So i need to avoid that too, without losing the factor of making the player think that the game is random." />
  <row Id="8951" PostHistoryTypeId="1" PostId="4512" RevisionGUID="7705bc5f-613d-4609-90c9-1788f8c3959c" CreationDate="2010-10-15T12:52:55.420" UserId="1251" Text="How to &quot;repeat&quot; a sprite in the gameworld in a random fashion?" />
  <row Id="8952" PostHistoryTypeId="3" PostId="4512" RevisionGUID="7705bc5f-613d-4609-90c9-1788f8c3959c" CreationDate="2010-10-15T12:52:55.420" UserId="1251" Text="&lt;game-design&gt;&lt;actionscript-3&gt;&lt;logic&gt;&lt;platform-games&gt;" />
  <row Id="8953" PostHistoryTypeId="2" PostId="4513" RevisionGUID="42f1b69a-b7ba-4e26-b964-53133931ce64" CreationDate="2010-10-15T13:10:25.320" UserId="1868" Text="http://rocketpack.fi/ seems to have something coming up." />
  <row Id="8955" PostHistoryTypeId="16" PostId="4503" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-15T13:57:50.800" UserId="51" />
  <row Id="8956" PostHistoryTypeId="16" PostId="4492" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-15T13:57:50.800" UserId="51" />
  <row Id="8957" PostHistoryTypeId="2" PostId="4515" RevisionGUID="6b71263f-e671-4580-b67e-cf2050b72923" CreationDate="2010-10-15T14:39:02.803" UserId="2530" Text="I'm wondering how to move objects, with rotation taken into account, to follow a curved line&#xD;&#xA;&#xD;&#xA;see: http://www.youtube.com/watch?v=iPpO24FeAX4 for an example" />
  <row Id="8958" PostHistoryTypeId="1" PostId="4515" RevisionGUID="6b71263f-e671-4580-b67e-cf2050b72923" CreationDate="2010-10-15T14:39:02.803" UserId="2530" Text="How to smoothly let an object move along a curved line" />
  <row Id="8959" PostHistoryTypeId="3" PostId="4515" RevisionGUID="6b71263f-e671-4580-b67e-cf2050b72923" CreationDate="2010-10-15T14:39:02.803" UserId="2530" Text="&lt;math&gt;" />
  <row Id="8960" PostHistoryTypeId="5" PostId="4515" RevisionGUID="19e60f80-1033-44df-9c52-5dfec83d4e16" CreationDate="2010-10-15T14:46:18.170" UserId="2530" Comment="added 227 characters in body; added 30 characters in body" Text="I'm wondering how to move objects, with rotation taken into account, to follow a curved line&#xD;&#xA;&#xD;&#xA;see: http://www.youtube.com/watch?v=iPpO24FeAX4 for an example&#xD;&#xA;&#xD;&#xA;In particular I wonder:&#xD;&#xA;&#xD;&#xA; 1. how to store the points, how many&#xD;&#xA;    points to store for a smooth line&#xD;&#xA;    like that &#xD;&#xA; 2. how to interpolate the&#xD;&#xA;    curves &#xD;&#xA; 3. how to interpolate between&#xD;&#xA;    the object and the first &quot;waypoint&quot;&#xD;&#xA;    along the line" />
  <row Id="8962" PostHistoryTypeId="2" PostId="4516" RevisionGUID="284238a3-81ff-4c16-9d83-83c46a81c162" CreationDate="2010-10-15T16:40:22.977" UserId="215" Text="I am casually working on an RPG type game in java but I am having trouble figuring out how I can have items that can do many different things without creating a different class for every item.&#xD;&#xA;&#xD;&#xA;As an example, how would I create an Axe that could chop trees and attack monsters?&#xD;&#xA;&#xD;&#xA;If I extend either the chopping or the weapon class then I can't extend the other class.&#xD;&#xA;&#xD;&#xA;If I have chopping and weapon be an interface then I will have a lot of duplicated code when a dagger can also attack monsters and a different axe can cut trees.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am hoping there is a way to have a single Item class and load the item's and their respective abilities from a file. If that is possible how can it be done? If it isn't then what is the best way to have items in a game?" />
  <row Id="8963" PostHistoryTypeId="1" PostId="4516" RevisionGUID="284238a3-81ff-4c16-9d83-83c46a81c162" CreationDate="2010-10-15T16:40:22.977" UserId="215" Text="What are different ways to define items in an RPG like game?" />
  <row Id="8964" PostHistoryTypeId="3" PostId="4516" RevisionGUID="284238a3-81ff-4c16-9d83-83c46a81c162" CreationDate="2010-10-15T16:40:22.977" UserId="215" Text="&lt;java&gt;" />
  <row Id="8965" PostHistoryTypeId="2" PostId="4517" RevisionGUID="96aa592c-5d3a-4379-95aa-ff1e477c3b95" CreationDate="2010-10-15T17:03:22.947" UserId="953" Text="The Component (not Composite) design pattern is great for this purpose: http://gameprogrammingpatterns.com/component.html&#xD;&#xA;&#xD;&#xA;Basically, an Axe would be an instance of the Item class that contained a WeaponComponent and a ToolComponent (maybe).  To test if something can be used as a weapon, check if it has a WeaponComponent attached, and then talk to that WeaponComponent instance to get the item's weapon info.&#xD;&#xA;&#xD;&#xA;Loading from a file is a separate exercise, of course." />
  <row Id="8966" PostHistoryTypeId="2" PostId="4518" RevisionGUID="4f1d0abe-dec1-458b-b71b-478ea9ae1535" CreationDate="2010-10-15T17:09:02.963" UserId="2534" Text="I asked this same question [here][1], but was closed and told to ask it on this site instead.&#xD;&#xA;&#xD;&#xA;How much would it cost to develop a video game. I mean like a major PS3/360 video game. I know there really is no set price; but there has to be a pall bark, 100 grand, 10 mil, etc.&#xD;&#xA;&#xD;&#xA;I am asking how much the games cost to make, (studio cost, developer salaries, etc.)&#xD;&#xA;&#xD;&#xA;Examples would be nice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gaming.stackexchange.com/questions/9085/how-much-does-it-cost-to-produce-a-major-video-game" />
  <row Id="8967" PostHistoryTypeId="1" PostId="4518" RevisionGUID="4f1d0abe-dec1-458b-b71b-478ea9ae1535" CreationDate="2010-10-15T17:09:02.963" UserId="2534" Text="How much does it cost to produce a major video game?" />
  <row Id="8968" PostHistoryTypeId="3" PostId="4518" RevisionGUID="4f1d0abe-dec1-458b-b71b-478ea9ae1535" CreationDate="2010-10-15T17:09:02.963" UserId="2534" Text="&lt;xbox360&gt;&lt;playstation3&gt;&lt;costs&gt;" />
  <row Id="8969" PostHistoryTypeId="2" PostId="4519" RevisionGUID="1088f1e4-3049-4945-b58c-1dbd6f3c4c76" CreationDate="2010-10-15T17:16:05.337" UserId="395" Text="Somewhere between $20M and $100M would be reasonable depending on genre for a AAA game. XBLA/PSN downloadable games often cost much less, and people have made XBLIG games for a few hundred dollars in their spare time. As a recent example, APB was rumored to have cost $100M (MMOs are among the most expensive games to produce)." />
  <row Id="8970" PostHistoryTypeId="2" PostId="4520" RevisionGUID="171c85d4-4e68-4d8f-8d81-1e604de0bd6f" CreationDate="2010-10-15T17:17:33.153" UserId="395" Text="The answer to all 3 is usually [splines](http://en.wikipedia.org/wiki/B-spline) or some other similar curve." />
  <row Id="8971" PostHistoryTypeId="2" PostId="4521" RevisionGUID="4b32365c-a82d-4b51-bba8-de4b5fe95db5" CreationDate="2010-10-15T17:20:59.077" UserId="2061" Text="Well, everything on [pogo.com](http://www.pogo.com) and [games.yahoo.com.](http://games.yahoo.com)&#xD;&#xA;&#xD;&#xA;Also, most games for older smart-phones." />
  <row Id="8972" PostHistoryTypeId="2" PostId="4522" RevisionGUID="7a3cbfe5-1e69-474d-b749-8675b66c433c" CreationDate="2010-10-15T17:43:45.807" UserId="2491" Text="What you are basically talking about is Procedural Content Generation.  Roughly, you want to use a randomizing algorithm to make a &quot;map&quot; of upcoming content, and then run a check over that map to look for problems like &quot;This gap is too small and makes the level impossible.&quot;&#xD;&#xA;&#xD;&#xA;I found, of all things, a wiki dedicated to the topic, which also has some code samples: http://pcg.wikidot.com/  &#xD;&#xA;&#xD;&#xA;You might also check out the roguelike development resources here: http://roguebasin.roguelikedevelopment.org/index.php?title=Roguelike_Dev_FAQ&#xD;&#xA;&#xD;&#xA;The techniques applied to roguelikes can usually apply to most 2D games." />
  <row Id="8973" PostHistoryTypeId="2" PostId="4523" RevisionGUID="3b058f98-04ae-4b26-88ef-d57f34329c3c" CreationDate="2010-10-15T17:50:09.117" UserId="2536" Text="My first (successful) Blender modeling-from-reference-images experience came from the fantastically useful [Blender Noob-to-Pro wiki][1].  The [fox modeling exercise][2] not only supplies the images for you, but gave me some ideas about how I could combine household items and my phone's camera to produce my own reference images - since I'm not patient enough right now to learn how to sketch my own...&#xD;&#xA;&#xD;&#xA;Honestly, going through most of that wiki got me to the point where I was able to make sense of almost all of the other tutorials I could find Googling.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikibooks.org/wiki/Main_Page&#xD;&#xA;  [2]: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Modeling_a_Fox_from_Guide_Images" />
  <row Id="8974" PostHistoryTypeId="2" PostId="4524" RevisionGUID="0124841f-1e2b-4c00-8231-28bb805235f7" CreationDate="2010-10-15T18:46:29.867" UserId="1134" Text="Look into [Bezier curves][1] and [Hermite curves][2], both of which you can compose into splines.  Both usually take the form of a [parametric equation][3] where you input a time `t` between 0 and 1; time 0 would be the start of the spline, time 1 would be the end.&#xD;&#xA;&#xD;&#xA;Rotation is a matter of calculating the tangent to the curve.&#xD;&#xA;&#xD;&#xA;4 control points for the first segment followed by 3 additional points per additional segment is common for this kind of spline, although some types may want more points.&#xD;&#xA;&#xD;&#xA;Note that with parametric splines you often may have difficulty computing position on the spline as a function of distance instead of time, so if you want to answer the question &quot;I've moved X distance, where would I be along the curve&quot; you're in for some integrating.  Similarly, instantaneous velocity may vary depending on the density and position of control points.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/B%C3%A9zier_curve&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Hermite_curve&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Parametric_equation" />
  <row Id="8975" PostHistoryTypeId="5" PostId="4485" RevisionGUID="ed9822d9-3027-4247-bcd0-a759e0567654" CreationDate="2010-10-15T18:50:28.637" UserId="962" Comment="added 154 characters in body" Text="The Bitmap has transparency, and only non-transparent pixels are solid and used for hit detection for the physics engine and gameplay.&#xD;&#xA;&#xD;&#xA;I have seen some versions done with convex hulls, but for multiple reasons I am not using convex hulls to build the levels in my game.&#xD;&#xA;&#xD;&#xA;**How can I implement 2d shadows on a level made out of a Bitmap?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*The answer jpaver posted is good, but I am sure there are some other ways to do this. Does anyone else have any more information on this question?*" />
  <row Id="8976" PostHistoryTypeId="2" PostId="4525" RevisionGUID="da7b161d-6a80-4fd2-85e6-7eb7dda60ae9" CreationDate="2010-10-15T19:26:01.327" UserId="337" Text="I'm developing some algorithms in Lua which are run mostly in Lua (few calls to C++) and I'm noticing a huge slowdown when I'm running them from my app rather than the default Lua interpreter.&#xD;&#xA;The script returns in about 11 seconds with the interpreter, and about 5+ _minutes_ with my program.&#xD;&#xA;&#xD;&#xA;I don't think it is a problem with calling the C++ function, overruling that function with an empty function in the script has no noticeable effect for time.&#xD;&#xA;&#xD;&#xA;Both Lua and the program are compiled with Visual Studio 2010 (I created a new solution for Lua, with projects for both the interpreter and static library)&#xD;&#xA;&#xD;&#xA;I've run a profiler on the code (the Very Sleepy profiler, can't get a Lua profiler working but haven't tried to much) and found that in my application around 50% of the time is spend on malloc.. and 40% on free, both called from the Lua garbage collector (tried disabling that to check, but that crashes with using to much memory (understandably), the Lua interpreter peeks at about 4mb ram usage).&#xD;&#xA;&#xD;&#xA;I'm new at Lua, so its very possible I've done something wrong somewhere, anyone got a few hints to try?" />
  <row Id="8977" PostHistoryTypeId="1" PostId="4525" RevisionGUID="da7b161d-6a80-4fd2-85e6-7eb7dda60ae9" CreationDate="2010-10-15T19:26:01.327" UserId="337" Text="Huge slowdown when running Lua as statically linked lib versus stand alone interpreter." />
  <row Id="8978" PostHistoryTypeId="3" PostId="4525" RevisionGUID="da7b161d-6a80-4fd2-85e6-7eb7dda60ae9" CreationDate="2010-10-15T19:26:01.327" UserId="337" Text="&lt;c++&gt;&lt;lua&gt;" />
  <row Id="8979" PostHistoryTypeId="2" PostId="4526" RevisionGUID="11da259c-0585-45bc-8bb7-574b96692ad4" CreationDate="2010-10-15T20:13:50.817" UserId="962" Text="Here is one way to do it.&#xD;&#xA;&#xD;&#xA;**Set a minimum distance that things can spawn at, so things can always be winnable, but make this distance almost impossible to win.**&#xD;&#xA;&#xD;&#xA;**Have a difficulty variable that that starts out high for easy, and lowers as it gets harder.**&#xD;&#xA;&#xD;&#xA;**Set the position of the next object at the minimum distance + difficulty variable + a small random number.**&#xD;&#xA;&#xD;&#xA;This will ensure that stuff spawns randomly, but it just has some rules to follow before it spawns.&#xD;&#xA;&#xD;&#xA;There are other more complex way to do it, but for what you are describing I think this is the best." />
  <row Id="8980" PostHistoryTypeId="2" PostId="4527" RevisionGUID="2576658f-dc51-4065-8cbb-36e8e28f5874" CreationDate="2010-10-15T21:31:39.413" UserId="676" Text="Can you give me an idea for a simple and interesting mission for online text-based game that doesn't require much reading? Or maybe link to a website with a list with missions?&#xD;&#xA;&#xD;&#xA;I love programming, but I hate when it comes to create things like this, because I am not creative at all.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="8981" PostHistoryTypeId="1" PostId="4527" RevisionGUID="2576658f-dc51-4065-8cbb-36e8e28f5874" CreationDate="2010-10-15T21:31:39.413" UserId="676" Text="Interesting and simple missions for text-based game" />
  <row Id="8982" PostHistoryTypeId="3" PostId="4527" RevisionGUID="2576658f-dc51-4065-8cbb-36e8e28f5874" CreationDate="2010-10-15T21:31:39.413" UserId="676" Text="&lt;mission-design&gt;" />
  <row Id="8983" PostHistoryTypeId="2" PostId="4528" RevisionGUID="c2deb5fa-a90a-4dca-b808-fd55ad6f3e95" CreationDate="2010-10-15T21:48:44.210" UserId="2330" Text="Might be worth having a read through these [common RPG scenarios][1]. Hard to say if they'll apply directly to your game without knowing what you're doing but they should be applicable to any genre really without too much imagination.&#xD;&#xA;&#xD;&#xA;(And if you love programming you're at least a little bit creative!)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fanpop.com/external/10070" />
  <row Id="8984" PostHistoryTypeId="5" PostId="4486" RevisionGUID="ae085913-bf6c-4f0d-a4c1-226ba037eae8" CreationDate="2010-10-15T22:26:54.447" UserId="1232" Comment="some minor clarifying edits" Text="This is only one way to approach the problem.&#xD;&#xA;&#xD;&#xA;For each source pixel in your bitmap, ray march towards the pixel that currently represents the light source. If you hit a non-transparent pixel along the way, stop marching and assign a shadow value to your source pixel. If you reach the light pixel, the source pixel is lit.&#xD;&#xA;&#xD;&#xA;As you can probably tell, marching and testing every pixel along the way for every source pixel can get expensive, especially when adding multiple lights. Fortunately, there are things that can be done:&#xD;&#xA;&#xD;&#xA;* assign a bounding circle to your light. Before marching, test if the pixel is inside or outside of this circle radius. If it's outside, it's considered in shadow by default and there is no need to march. If it's inside, do the ray march. If the ray march yields that the pixel is lit, use a falloff function to determine how bright it is. (side note: interesting falloff functions can be derived to make your lights flicker and animate)&#xD;&#xA;&#xD;&#xA;* To avoid marching and testing every pixel, pre-compute a distance field for your static bitmap. The distance field simply stores the distance to the closest opaque pixel for every pixel. Then when marching along a ray, you look at the distance field, and are guaranteed to hit no opaque pixels by stepping that amount. (side note: you can use these distance fields for your physics too).&#xD;&#xA;&#xD;&#xA;EDIT: to answer comment about dynamic updating problem:&#xD;&#xA;&#xD;&#xA;If you have a dynamic bitmap field, updating the distance field is a bit of a pain. I'm sure there are clever techniques for doing this out there, I'm just not versed in them. Someone else is free to comment here if they are in the know! :)&#xD;&#xA;&#xD;&#xA;An alternative technique to accelerate your ray marching is to use an tiled hierarchy that encodes your empty space in a much more efficient way. You can precompute the hierarchy from your original level bitmap, and only need to update parts of it when you add or remove opaque pixels.&#xD;&#xA;&#xD;&#xA;So what does the hierarchy look like? If your original data of size MxN is mip0, then:&#xD;&#xA;&#xD;&#xA;* mip1 is M/2 x N/2 (ie. half as big as mip0 in each dimension)&#xD;&#xA;* mip2 is M/4 x N/4 (ie. half as big as mip1 in each dimension)&#xD;&#xA;* mip3 is M/8 x N/8 (ie. half as big as mip2 in each dimension)&#xD;&#xA;* etc.&#xD;&#xA;&#xD;&#xA;The higher mips store whether there is any opaque geometry in the lower mip level pixels. &#xD;&#xA;If you wanted to update mip[k] at pixel(i,j), you'd probably do something like this:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;  mip[k].opaque[i][j] = mip[k-1].opaque[i*2][j*2] || &#xD;&#xA;                        mip[k-1].opaque[i*2+1][j*2] || &#xD;&#xA;                        mip[k-1].opaque[i*2][j*2+1] || &#xD;&#xA;                        mip[k-1].opaque[i*2+1][j*2+1];&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Once you have the data structure computed, you can march your ray directly to the edge of a tile if that tile contains no opaque pixels. Your algorithm would look like this:&#xD;&#xA;&#xD;&#xA;(extreme pseudo-code)&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;&#xD;&#xA;void StepOnce(int &amp;x, int &amp;y, int xDir, int yDir)&#xD;&#xA;{&#xD;&#xA;   int k = COARSEST_MIP;&#xD;&#xA;   while (k &gt; 0)&#xD;&#xA;   {&#xD;&#xA;      int x_in_mip = x &gt;&gt; k; &#xD;&#xA;      int y_in_mip = y &gt;&gt; k;&#xD;&#xA;      if (!mip[k].opaque[i_in_mip][j_in_mip])&#xD;&#xA;      {&#xD;&#xA;        // Here we can step (i,j) to the next tile for mip(k)&#xD;&#xA;        // (I'll leave the math as an exercise to the reader)&#xD;&#xA;        return; // exit since we've stepped once&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;         // go to a finer level tile.&#xD;&#xA;         k--;&#xD;&#xA;      }&#xD;&#xA;   }&#xD;&#xA;   // do the math to step once.&#xD;&#xA;   return &#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Updating this structure is simply a matter of tracking a dirty region (ie. rectangle) for level 0 every frame. Once you've accumulated all changes, just update those pixels falling in the dirty region and update higher levels that touch that region too." />
  <row Id="8985" PostHistoryTypeId="2" PostId="4529" RevisionGUID="5d2b72a1-081d-44eb-ad1b-35f03eae878a" CreationDate="2010-10-15T22:29:24.327" UserId="601" Text="Heres another good list:&#xD;&#xA;&#xD;&#xA;http://www.io.com/~sjohn/plots.htm&#xD;&#xA;&#xD;&#xA;Also I second what the first poster said. If you like problem solving and programming, you ARE creative." />
  <row Id="8986" PostHistoryTypeId="2" PostId="4530" RevisionGUID="0d35a699-fee7-4cfd-874e-d5a091de8a67" CreationDate="2010-10-15T23:07:38.810" UserId="490" Text="I've implemented this in my [Line-Drawing Game Starterkit][1] and avoided using the over-engineered solutions. You probably need a point every 10 pixels distance, so you can get a decently smooth line without using too much memory or draw calls. Then it's a simple matter of moving the objects from point A to B. To make them appear as traveling smoothly along the path, you simply rotate them to the direction of motion. This is done over time and not instantly, so you get smooth, following a curved line movement without the need to used Bezier curves or similar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.learn-cocos2d.com/store/line-drawing-game-starterkit/" />
  <row Id="8987" PostHistoryTypeId="5" PostId="4486" RevisionGUID="70c207be-bb34-420f-94d9-7dd041700d9b" CreationDate="2010-10-15T23:08:29.700" UserId="1232" Comment="added notes about SSE and improving cache hit rates." Text="This is only one way to approach the problem.&#xD;&#xA;&#xD;&#xA;For each source pixel in your bitmap, ray march towards the pixel that currently represents the light source. If you hit a non-transparent pixel along the way, stop marching and assign a shadow value to your source pixel. If you reach the light pixel, the source pixel is lit.&#xD;&#xA;&#xD;&#xA;As you can probably tell, marching and testing every pixel along the way for every source pixel can get expensive, especially when adding multiple lights. Fortunately, there are things that can be done:&#xD;&#xA;&#xD;&#xA;* assign a bounding circle to your light. Before marching, test if the pixel is inside or outside of this circle radius. If it's outside, it's considered in shadow by default and there is no need to march. If it's inside, do the ray march. If the ray march yields that the pixel is lit, use a falloff function to determine how bright it is. (side note: interesting falloff functions can be derived to make your lights flicker and animate)&#xD;&#xA;&#xD;&#xA;* To avoid marching and testing every pixel, pre-compute a distance field for your static bitmap. The distance field simply stores the distance to the closest opaque pixel for every pixel. Then when marching along a ray, you look at the distance field, and are guaranteed to hit no opaque pixels by stepping that amount. (side note: you can use these distance fields for your physics too).&#xD;&#xA;&#xD;&#xA;EDIT: to answer comment about dynamic updating problem:&#xD;&#xA;&#xD;&#xA;If you have a dynamic bitmap field, updating the distance field is a bit of a pain. I'm sure there are clever techniques for doing this out there, I'm just not versed in them. Someone else is free to comment here if they are in the know! :)&#xD;&#xA;&#xD;&#xA;An alternative technique to accelerate your ray marching is to use an tiled hierarchy that encodes your empty space in a much more efficient way. You can precompute the hierarchy from your original level bitmap, and only need to update parts of it when you add or remove opaque pixels.&#xD;&#xA;&#xD;&#xA;So what does the hierarchy look like? If your original data of size MxN is mip0, then:&#xD;&#xA;&#xD;&#xA;* mip1 is M/2 x N/2 (ie. half as big as mip0 in each dimension)&#xD;&#xA;* mip2 is M/4 x N/4 (ie. half as big as mip1 in each dimension)&#xD;&#xA;* mip3 is M/8 x N/8 (ie. half as big as mip2 in each dimension)&#xD;&#xA;* etc.&#xD;&#xA;&#xD;&#xA;The higher mips store whether there is any opaque geometry in the lower mip level pixels. &#xD;&#xA;If you wanted to update mip[k] at pixel(i,j), you'd probably do something like this:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;  mip[k].opaque[i][j] = mip[k-1].opaque[i*2][j*2] || &#xD;&#xA;                        mip[k-1].opaque[i*2+1][j*2] || &#xD;&#xA;                        mip[k-1].opaque[i*2][j*2+1] || &#xD;&#xA;                        mip[k-1].opaque[i*2+1][j*2+1];&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Once you have the data structure computed, you can march your ray directly to the edge of a tile if that tile contains no opaque pixels. Your algorithm would look like this:&#xD;&#xA;&#xD;&#xA;(extreme pseudo-code)&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;&#xD;&#xA;void StepOnce(int &amp;x, int &amp;y, int xDir, int yDir)&#xD;&#xA;{&#xD;&#xA;   int k = COARSEST_MIP;&#xD;&#xA;   while (k &gt; 0)&#xD;&#xA;   {&#xD;&#xA;      int x_in_mip = x &gt;&gt; k; &#xD;&#xA;      int y_in_mip = y &gt;&gt; k;&#xD;&#xA;      if (!mip[k].opaque[i_in_mip][j_in_mip])&#xD;&#xA;      {&#xD;&#xA;        // Here we can step (i,j) to the next tile for mip(k)&#xD;&#xA;        // (I'll leave the math as an exercise to the reader)&#xD;&#xA;        return; // exit since we've stepped once&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;         // go to a finer level tile.&#xD;&#xA;         k--;&#xD;&#xA;      }&#xD;&#xA;   }&#xD;&#xA;   // do the math to step once.&#xD;&#xA;   return &#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Updating this structure is simply a matter of tracking a dirty region (ie. rectangle) for level 0 every frame. Once you've accumulated all changes, just update those pixels falling in the dirty region and update higher levels that touch that region too.&#xD;&#xA;&#xD;&#xA;Note: if you're doing this on CPU, you may want to:&#xD;&#xA;&#xD;&#xA;* rearrange the ordering of pixels in your bitmap data so that a tile of NxN all fall within the same cacheline. This will tend to improve your cache hit rate tremendously when ray tracing vertically.&#xD;&#xA;* also, if you ray march your pixels in tile order rather than screen-width scanline order (one at a time, or 4 at a time using SSE), you will further improve your cache hit rate." />
  <row Id="8988" PostHistoryTypeId="5" PostId="4485" RevisionGUID="c23fe0a1-44ad-49ea-926a-fcf3661639f6" CreationDate="2010-10-15T23:10:24.383" UserId="962" Comment="added 8 characters in body; edited title" Text="The Bitmap has transparency, and only non-transparent pixels are solid and used for hit detection for the physics engine and gameplay.&#xD;&#xA;&#xD;&#xA;I have seen some versions done with convex hulls, but for multiple reasons I am not using convex hulls to build the levels in my game.&#xD;&#xA;&#xD;&#xA;**How can I implement 2d shadows on a level made out of a Dynamic Bitmap?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*The answer jpaver posted is good, but I am sure there are some other ways to do this. Does anyone else have any more information on this question?*" />
  <row Id="8989" PostHistoryTypeId="4" PostId="4485" RevisionGUID="c23fe0a1-44ad-49ea-926a-fcf3661639f6" CreationDate="2010-10-15T23:10:24.383" UserId="962" Comment="added 8 characters in body; edited title" Text="2D Real-Time shadows on level on a level made from a Dynamic Bitmap" />
  <row Id="8990" PostHistoryTypeId="5" PostId="4530" RevisionGUID="40163ea5-77e8-4ecb-a177-d61d87217008" CreationDate="2010-10-15T23:14:39.217" UserId="490" Comment="added 639 characters in body; added 20 characters in body" Text="I've implemented this in my [Line-Drawing Game Starterkit][1] and avoided using the over-engineered solutions. You probably need a point every 10 pixels distance, so you can get a decently smooth line without using too much memory or draw calls. Then it's a simple matter of moving the objects from point A to B. To make them appear as traveling smoothly along the path, you simply rotate them to the direction of motion. This is done over time and not instantly, so you get smooth, following a curved line movement without the need to used Bezier curves or similar.&#xD;&#xA;&#xD;&#xA;The points are stored in a simple array, inside a Path class that also knows how to draw the path using OpenGL. You can have any number of path points but I would limit them to 50 to 300 depending on the device and required smoothness.&#xD;&#xA;&#xD;&#xA;To interpolate the line you should look up the [McMaster's Slide Averaging Algorithm (theory)][2].&#xD;&#xA;&#xD;&#xA;The object is moving to the first point only when the user has drawn at least two points, to avoid the object spinning wildly. Once moving towards the first point its the same code as moving to the second, third, fourth and so on. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.learn-cocos2d.com/store/line-drawing-game-starterkit/&#xD;&#xA;  [2]: http://www.geom.unimelb.edu.au/gisweb/LGmodule/LGDigitalGeneralisation.htm" />
  <row Id="8991" PostHistoryTypeId="2" PostId="4531" RevisionGUID="864f493d-fe86-400f-bf42-40f19968c57b" CreationDate="2010-10-16T00:27:48.107" UserId="1780" Text="Depending on your location and how awesome an office and benefits you're looking at, (in the US) you can count on $8,000 to $15,000 per developer per month.  This is the fully loaded cost and includes IT and HR costs as well as equipment and other infrastructure.&#xD;&#xA;&#xD;&#xA;For $8000 per person-month, though, you're going to be in a pretty crappy warehouse on the wrong side of the tracks in the middle of nowhere.  In Southern California the range is more like 11-15k per person-month, although some studios may go even higher than that." />
  <row Id="8992" PostHistoryTypeId="2" PostId="4532" RevisionGUID="b8eb0b18-cdf4-43f1-93f0-1c6bcbda60bd" CreationDate="2010-10-16T01:47:46.397" UserId="1885" Text="In many entertainment professions there suggestions, loose rules, or general frameworks one follows that appeal to humans in one way or another.  For instance, many movies and books follow the monomyth.&#xD;&#xA;&#xD;&#xA;In video games I find many types of games that attract people in different ways.  Some are addicted to facebook gem matching games.  Others can't get enough of FPS games.&#xD;&#xA;&#xD;&#xA;Once in awhile, though, you find a game that seems to transcend stereotypes and appeals almost immediately to everyone that plays it.  For instance, Plants Versus Zombies seems to have a very, very large demographic of players.  There are other games similar in reach.&#xD;&#xA;&#xD;&#xA;I'm curious what books, blogs, etc there are that explore these game types and styles, and tries to suss out one or more popular frameworks/styles that satisfy people, while keeping them coming back for more." />
  <row Id="8993" PostHistoryTypeId="1" PostId="4532" RevisionGUID="b8eb0b18-cdf4-43f1-93f0-1c6bcbda60bd" CreationDate="2010-10-16T01:47:46.397" UserId="1885" Text="What should my game have in order to keep humans playing it?" />
  <row Id="8994" PostHistoryTypeId="3" PostId="4532" RevisionGUID="b8eb0b18-cdf4-43f1-93f0-1c6bcbda60bd" CreationDate="2010-10-16T01:47:46.397" UserId="1885" Text="&lt;game-design&gt;" />
  <row Id="8995" PostHistoryTypeId="4" PostId="4532" RevisionGUID="95a49bfb-4315-401b-bb04-06bc36b889d7" CreationDate="2010-10-16T02:48:10.393" UserId="1885" Comment="edited title" Text="What should a game have in order to keep humans playing it?" />
  <row Id="8996" PostHistoryTypeId="2" PostId="4533" RevisionGUID="91277c14-3c3c-4cac-8b67-7923b816039a" CreationDate="2010-10-16T04:13:16.703" UserId="2522" Text="Heres the best education i got in ky math is ap calculas and no technolgy class that teachs programming language. so should i just go get a computer science degree or a game programming based one? might not be alot ask if you need more info to decide." />
  <row Id="8997" PostHistoryTypeId="1" PostId="4533" RevisionGUID="91277c14-3c3c-4cac-8b67-7923b816039a" CreationDate="2010-10-16T04:13:16.703" UserId="2522" Text="Should i get a game focused programming degree or a computer science one?" />
  <row Id="8998" PostHistoryTypeId="3" PostId="4533" RevisionGUID="91277c14-3c3c-4cac-8b67-7923b816039a" CreationDate="2010-10-16T04:13:16.703" UserId="2522" Text="&lt;best-practices&gt;" />
  <row Id="8999" PostHistoryTypeId="2" PostId="4534" RevisionGUID="e13fcdfe-3b55-4967-a7fb-04a2db97d114" CreationDate="2010-10-16T04:50:03.023" UserId="1217" Text="**Get the CS Degree** is what my reaction tells me. &#xD;&#xA;&#xD;&#xA;If you really want to game develop, you'll be doing your small projects during your education. When you're finished you've got an extremely robust education that will function as a CV booster and competence base you can build on. And one day if you don't want to game develop anymore you've probably got a wider spectrum of possible careers with the CS degree.&#xD;&#xA;&#xD;&#xA;But in the end, it depends more on you as a person than on your degree. If you can convince your employer that you're good enough it won't matter much what degree you have. Unless the company needs to brag to their clients about how many degrees their employees have (which is actually the case with some consultant companies at least).&#xD;&#xA;&#xD;&#xA;Don't forget about the possibility to make it as an entrepreneur. It is hard but it can pay itself. " />
  <row Id="9000" PostHistoryTypeId="2" PostId="4535" RevisionGUID="4d6f2f8b-8b62-4ba6-a8b4-e2fe013523d5" CreationDate="2010-10-16T04:56:08.137" UserId="1217" Text="I +1:ed the suggestion to use XML/JSON to structure the save games. This way you are very prepared to make the saves &quot;cloud&quot; based. Or at least, you'll have a structure you could use for future projects which might involve the web. As long as the files aren't stored in a way that's too easy to read they should give you loads of benefits. Like metrics! Hooray" />
  <row Id="9001" PostHistoryTypeId="2" PostId="4536" RevisionGUID="0bc43434-8816-49b6-96cd-5d2ff360b021" CreationDate="2010-10-16T05:11:43.460" UserId="1217" Text="To get you started without reading too much:&#xD;&#xA;&#xD;&#xA;Not so distant future. Person waking up without memories. World is controlled by two huge rivalling corporations. The person (our protagonist) needs to do missions and get too deeply involved with both of the corporations to be able to discover his/her past and why he/she has so many enemies. &#xD;&#xA;&#xD;&#xA;Then continue to steal stuff from the matrix, bourne, johnny mnemonic etc and then at least I'll be interested in the story :)" />
  <row Id="9002" PostHistoryTypeId="5" PostId="4533" RevisionGUID="a55d8ad9-192c-487e-b93c-031ac6e9ca0a" CreationDate="2010-10-16T05:24:28.217" UserId="189" Comment="Tried to clean it up a bit (mostly spelling) while preserving the horrible grammar." Text="Heres the best education I got in ky math is AP Calculus and no technology class that teaches a programming language. So should I just go get a Computer Science degree or a game programming-based one? Might not be a lot; ask if you need more info to decide." />
  <row Id="9003" PostHistoryTypeId="4" PostId="4533" RevisionGUID="a55d8ad9-192c-487e-b93c-031ac6e9ca0a" CreationDate="2010-10-16T05:24:28.217" UserId="189" Comment="Tried to clean it up a bit (mostly spelling) while preserving the horrible grammar." Text="Should I get a game focused programming degree or a computer science one?" />
  <row Id="9004" PostHistoryTypeId="2" PostId="4537" RevisionGUID="c4be2e98-38ea-4a31-9c25-db2082bbab38" CreationDate="2010-10-16T05:40:21.500" UserId="189" Text="If anything I would go for a computer science degree; I'm doing it myself. But I am also pursuing a **[game development concentration][1]**. Whatever school you are planning to attend, you may want to investigate if they have this option; I highly recommend it! I will graduate with a computer science degree and all the same courses as any other CS major, so if I choose not to enter the game industry I still have all the education of anyone else with a CS degree. But I am also taking some game-related courses, which give me focused knowledge in game development.&#xD;&#xA;&#xD;&#xA;For example I am currently enrolled in a general game development course which is taught by the president and CTO of a local game company, so I'm gaining a lot of practical and real-world knowledge from him (as opposed to some other CS courses which can go deep into theory at times). But I'm also taking a course in software engineering, in which I am practicing Java and proper software engineering methods which apply to all areas of computer science.&#xD;&#xA;&#xD;&#xA;At the very least, **do your research** about the school you're planning on attending. Find out who the professors are and look them up; do they know their stuff? Are they in the industry or have connections? Are they IGDA members? Look at the list of courses and see if it appeals to you. Check out the area around the school and see if there are any game companies. All of these factors play a big part in figuring out whether the school has a genuinely great game development degree/concentration, or if it's just a gimmick because game development is the latest &quot;cool&quot; thing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.csc.ncsu.edu/academics/undergrad/bs-csc-gdc.php" />
  <row Id="9005" PostHistoryTypeId="2" PostId="4538" RevisionGUID="6890ba62-dab6-4ae2-8286-0e515ac5bd09" CreationDate="2010-10-16T07:28:32.347" UserId="962" Text="&gt; For instance, Plants Versus Zombies seems to have a very, very large demographic of players. There are other games similar in reach.&#xD;&#xA;&#xD;&#xA;**Take pop culture item, draw it with cute colorful cartoon art, advertise the hell out of it, offer a free demo, and make it a super Casual game with shiny things and little &quot;ding&quot; sounds going off all the time.**&#xD;&#xA;&#xD;&#xA;There, the secret is out." />
  <row Id="9006" PostHistoryTypeId="2" PostId="4539" RevisionGUID="f6c9edad-9049-4e94-9eed-d3174d442ff1" CreationDate="2010-10-16T08:59:22.120" UserId="1632" Text="Ogre3D&#xD;&#xA;&#xD;&#xA;I would like to put some [space junk][1] in my game environment. Can the community give some suggestion on how to implement this? Should I use particle in Ogre3D or create entities for those junks, or any other approach? If using particle, how should I make the object still and spread out around the earth? Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/images?q=space+junk" />
  <row Id="9007" PostHistoryTypeId="1" PostId="4539" RevisionGUID="f6c9edad-9049-4e94-9eed-d3174d442ff1" CreationDate="2010-10-16T08:59:22.120" UserId="1632" Text="Approach to implement space junk" />
  <row Id="9008" PostHistoryTypeId="3" PostId="4539" RevisionGUID="f6c9edad-9049-4e94-9eed-d3174d442ff1" CreationDate="2010-10-16T08:59:22.120" UserId="1632" Text="&lt;ogre&gt;" />
  <row Id="9009" PostHistoryTypeId="5" PostId="4539" RevisionGUID="52abdac3-59d3-4e53-be7b-2b704026dd78" CreationDate="2010-10-16T09:12:51.797" UserId="1632" Comment="added 148 characters in body" Text="Ogre3D&#xD;&#xA;&#xD;&#xA;I would like to put some [space junk][1] in my game environment. Make it look like the first 2 search results. Those junks don't need to be interactive. Just need to have a 3D junk circling around the earth.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can the community give some suggestion on how to implement this? Should I use particle in Ogre3D or create entities for those junks, or any other approach? If using particle, how should I make the object still and spread out around the earth? Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/images?q=space+junk" />
  <row Id="9010" PostHistoryTypeId="2" PostId="4540" RevisionGUID="568aa458-b788-4bb6-9cd8-3c1d1041490d" CreationDate="2010-10-16T10:34:01.383" UserId="938" Text="I would like to add a new field to a Quake 3/Quake Live HUD that shows the following number:&#xD;&#xA;&#xD;&#xA;    min(health + armour, health * 3) * (1.5 if guard_rune else 1)&#xD;&#xA;&#xD;&#xA;This is the amount of damage you can take before getting killed, btw.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is this even possible?" />
  <row Id="9011" PostHistoryTypeId="1" PostId="4540" RevisionGUID="568aa458-b788-4bb6-9cd8-3c1d1041490d" CreationDate="2010-10-16T10:34:01.383" UserId="938" Text="Is it possible to make calculations in a Quake 3/Live hud?" />
  <row Id="9012" PostHistoryTypeId="3" PostId="4540" RevisionGUID="568aa458-b788-4bb6-9cd8-3c1d1041490d" CreationDate="2010-10-16T10:34:01.383" UserId="938" Text="&lt;2d&gt;" />
  <row Id="9013" PostHistoryTypeId="2" PostId="4541" RevisionGUID="da899854-f629-4d8c-983b-29f13b7c4f4f" CreationDate="2010-10-16T11:23:38.000" UserId="938" Text="Some games, including Dungeon Crawl ([example][1]), use a balancing technique that attempts to prevent certain values (stats, damage, etc.) from being excessively high. The algorithm looks like this:&#xD;&#xA;&#xD;&#xA;    if value &gt; 20:&#xD;&#xA;      value = 20 + (value - 20)/2&#xD;&#xA;    #70 → 45&#xD;&#xA;&#xD;&#xA;...and can be applied multiple times:&#xD;&#xA;&#xD;&#xA;    if value &gt; 20:&#xD;&#xA;      value = 20 + (value - 20)/2&#xD;&#xA;    if value &gt; 40:&#xD;&#xA;      value = 40 + (value - 40)/2&#xD;&#xA;    # 70 → 45 → 37.5&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://crawl.akrasiac.org/learndb.html#dodging" />
  <row Id="9014" PostHistoryTypeId="1" PostId="4541" RevisionGUID="da899854-f629-4d8c-983b-29f13b7c4f4f" CreationDate="2010-10-16T11:23:38.000" UserId="938" Text="What is the name of the balancing technique that reduces the incremental value of bonuses?" />
  <row Id="9015" PostHistoryTypeId="3" PostId="4541" RevisionGUID="da899854-f629-4d8c-983b-29f13b7c4f4f" CreationDate="2010-10-16T11:23:38.000" UserId="938" Text="&lt;balance&gt;&lt;terminology&gt;" />
  <row Id="9016" PostHistoryTypeId="2" PostId="4542" RevisionGUID="2a4a57bd-8d99-4af6-b618-92569111290b" CreationDate="2010-10-16T13:05:53.650" UserId="891" Text="They usually use **[diminishing returns][1]** for stat values so as you add more of the same stat it actually makes less of a difference.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Diminishing_returns" />
  <row Id="9017" PostHistoryTypeId="2" PostId="4543" RevisionGUID="5cf91ace-960c-4148-8ee4-428a9a8a1c8e" CreationDate="2010-10-16T13:06:46.697" UserId="2535" Text="It has to be fun for the person playing it.  It really is that simple.  Unfortunately, there's not a recipe to creating fun; I think you just stumble upon it and you're surprised by it.  That's why you see a lot of advice telling people to create games for themselves.  If it's fun for you then it's not wasted effort and someone, somewhere will also enjoy it.  That's where the marketing comes in to play.  How do we find the people who will enjoy the game?&#xD;&#xA;&#xD;&#xA;Anyway, trying to make a successful game is like designing by committee, it hardly ever turns out like you wanted.  Design something fun for you and then you just have to find others who enjoy it.  " />
  <row Id="9018" PostHistoryTypeId="2" PostId="4544" RevisionGUID="3ec3ba12-5732-472f-a6f7-5d0444c911ff" CreationDate="2010-10-16T13:27:24.410" UserId="2535" Text="How about exploring a space craft adrift in space?  You could start with 15 rooms or areas to explore and throw in puzzles.  Maybe the onboard computer has gained self awareness and actively tries to trip up the player to protect itself (remember HAL from 2001: A Space Odyssey?)  Throw in some rogue androids, maybe some mercenaries are in the middle of ransacking the craft and the player now has to evade them.  There's a bunch of &quot;surprises&quot; you can throw in to this setting and it can grow if you want to expand it.  The player used a pod to escape from the mercenaries and has now landed on a planet. Now we enter another adventure.  The possibilities are endless!&#xD;&#xA;&#xD;&#xA;I'm inspired to create my own adventure game now!  I haven't made one of these since I had my Atari 800 as a boy (I'm 40.)  Anyway, good luck and have fun!" />
  <row Id="9019" PostHistoryTypeId="2" PostId="4545" RevisionGUID="6245345f-d6e7-4087-a76f-d18dd035fd87" CreationDate="2010-10-16T14:44:32.663" UserId="744" Text="As you say, Lua does memory allocations like crazy by default. You should consider &lt;a href=&quot;http://www.lua.org/manual/5.1/manual.html#lua_setallocf&quot;&gt;writing a custom allocator&lt;/a&gt; that has better knowledge of the allocation patterns typically used by your Lua programs, or plugging in something like &lt;a href=&quot;http://goog-perftools.sourceforge.net/doc/tcmalloc.html&quot;&gt;tcmalloc&lt;/a&gt; for better allocation performance all around." />
  <row Id="9020" PostHistoryTypeId="2" PostId="4546" RevisionGUID="f9905b3b-2ffa-4108-a42a-c57e87e8db29" CreationDate="2010-10-16T14:58:58.090" UserId="744" Text="Gregory Weir's answer is my favorite for how to structure the item instances in order to perform multiple roles.&#xD;&#xA;&#xD;&#xA;To load from a file:&#xD;&#xA;&#xD;&#xA;**First, use YAML.** YAML is a featureful data description language; it can be parsed relatively quickly, read and edited by humans, supports binary data, and libraries exist for most programming languages. &lt;a href=&quot;http://stackoverflow.com/questions/450399/which-java-yaml-library-should-i-use&quot;&gt;There is a Stack Overflow question about Java libraries for YAML&lt;/a&gt;. This solves the &quot;how do I get data from files into objects?&quot;&#xD;&#xA;&#xD;&#xA;**Second, use the &lt;a href=&quot;http://en.wikipedia.org/wiki/Flyweight_pattern&quot;&gt;flyweight pattern&lt;/a&gt;.** Most of the data you read from those files is static. It's not going to change per instance (&quot;axe does 1d10 base damage and breaks wood but not stone&quot; - that's true of all five axes a player has). What you actually read from the YAML files are these platonic definition, and your individual item instances have unowned (and constant) references to these, along with per-instance data like &quot;How many swings before I break?&quot;, &quot;Did the player give me a custom name?&quot;, and so on.&#xD;&#xA;&#xD;&#xA;By sharing the cross-instance data in a single object, you preserve lots of memory, and make it easy to update items without persisted game state (save games or player database).&#xD;&#xA;&#xD;&#xA;So your class structure looks something like:&#xD;&#xA;&#xD;&#xA;* class Item - One instance per item&#xD;&#xA; * Owns-a Weapon instance&#xD;&#xA; * Owns-a Tool instance&#xD;&#xA; * Has-a custom name, etc.&#xD;&#xA;* class Weapon - (Up to) one instance per item&#xD;&#xA; * Is-a ItemComponent&#xD;&#xA; * Refers-to WeaponDef&#xD;&#xA; * Has-a bonus enchantment level, etc.&#xD;&#xA;* class Tool - (Up to) one instance per item&#xD;&#xA; * Is-a ItemComponent&#xD;&#xA; * Refers-to ToolDef&#xD;&#xA; * Has-a durability, etc.&#xD;&#xA;* class WeaponDef - One instance per kind of weapon&#xD;&#xA; * Read from a file, fields should be constant.&#xD;&#xA; * Has-a base damage amount, 1 or 2 hands, etc.&#xD;&#xA;* class ToolDef - One instance per kind of tool&#xD;&#xA; * Read from a file, fields should be constant.&#xD;&#xA; * Has-a base durability, materials it can break, etc." />
  <row Id="9021" PostHistoryTypeId="6" PostId="4540" RevisionGUID="651ebb53-0c33-4e6c-a9d7-7db9a12c9ecf" CreationDate="2010-10-16T15:05:06.887" UserId="744" Comment="edited tags" Text="&lt;2d&gt;&lt;gui&gt;" />
  <row Id="9022" PostHistoryTypeId="2" PostId="4547" RevisionGUID="c2672d26-6100-476c-a674-bc9823a66000" CreationDate="2010-10-16T15:09:31.907" UserId="744" Text="A gun, pointed at their loved ones, and a willingness to pull the trigger if they don't come back to play your game in X hours." />
  <row Id="9023" PostHistoryTypeId="16" PostId="4547" RevisionGUID="c2672d26-6100-476c-a674-bc9823a66000" CreationDate="2010-10-16T15:10:03.003" UserId="744" />
  <row Id="9024" PostHistoryTypeId="2" PostId="4548" RevisionGUID="9fce79da-5abf-490d-b6f1-4e8dfdc9b957" CreationDate="2010-10-16T15:57:32.123" UserId="2545" Text="If your goal is getting into the game industry as an artist, your portfolio is what is going to sell you, rather than your degree. I went to a university and then switched to a technical institute, but I would never have gotten a job based solely on the skills I learned there. The trick is to constantly supplement your education by educating yourself. If you have a degree in Game Art and Design but your portfolio is a mess, no one is going to hire you. If your portfolio is amazing but the school you went to isn't as well known, it's not going to be a big deal. They will hire you for your work.&#xD;&#xA;&#xD;&#xA;As for supplementing your education, there are a lot of good ways to do this. &#xD;&#xA;&#xD;&#xA;I'm a 2d artist, but there are similar methods for 3d art too. A good place to start focusing on specifics would be sites like gnomon, where you can get videos specified for very specific aspects in art, and ones that are more general. (Designing a weapon, or Animal Anatomy, for example.) They also have program-specific tutorials, like using Z-brush. (Since I just started here, I can't post hyperlinks more than once, so you will have to google these places to find them.)&#xD;&#xA;&#xD;&#xA;Conceptart.org also has tutorial videos, and classes, and they also have an online school. It's pretty new though, so I can't guarantee quality, but the forums have been around forever and always have inspiration kicking around. I got my first game job by doing a contest on that site and having my entry seen by the Art Director, so doing contests I recommend for sure! (The one I did was the Character of the Week). &#xD;&#xA;&#xD;&#xA;Art forums in general are a good way to guage how ready you are, get feedback, and learn new things. Other than CA, I also recommend CGHub, CGSociety, and Apedogs (smaller but awesome.) CG society also has some workshops.&#xD;&#xA;&#xD;&#xA;Practice Practice Practice constantly. Work at your craft. Get feedback, get your work out there, get noticed. &#xD;&#xA;&#xD;&#xA;Hope this helps. :]" />
  <row Id="9025" PostHistoryTypeId="2" PostId="4549" RevisionGUID="1af10105-3e62-4456-a84c-36032854939a" CreationDate="2010-10-16T16:11:47.660" UserId="1021" Text="I'm interested in working as an artist in the game industry.  Many job postings contain the phrase &quot;pixel art&quot;.  **What exactly is pixel art?**" />
  <row Id="9026" PostHistoryTypeId="1" PostId="4549" RevisionGUID="1af10105-3e62-4456-a84c-36032854939a" CreationDate="2010-10-16T16:11:47.660" UserId="1021" Text="What is &quot;pixel art&quot;?" />
  <row Id="9027" PostHistoryTypeId="3" PostId="4549" RevisionGUID="1af10105-3e62-4456-a84c-36032854939a" CreationDate="2010-10-16T16:11:47.660" UserId="1021" Text="&lt;art&gt;&lt;game-industry&gt;" />
  <row Id="9028" PostHistoryTypeId="2" PostId="4550" RevisionGUID="6dec8497-55ae-4ce4-8c62-6ff999d9b14e" CreationDate="2010-10-16T16:23:03.097" UserId="2540" Text="As a quick search will tell you, [pixel art][1] is digital artwork that is created by drawing individual pixels in an image rather than say, rendering a 3D model. It commonly refers to clean, cartoonish graphics reminiscent of old 2D video games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pixel_art" />
  <row Id="9032" PostHistoryTypeId="2" PostId="4552" RevisionGUID="8545ca69-c6dc-4194-84b4-58d959aa4b97" CreationDate="2010-10-16T16:28:46.310" UserId="2545" Text="This is the kind of question that's better answered with google. Pixel art is game art that is very restricted - you are literally using pixels to draw something, so they end up having a very boxy look. (Though a lot of pixel art now is done on a much larger scale and then made to look like it's been edited pixel by pixel.)&#xD;&#xA;&#xD;&#xA;Example: &#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;You can see in the bottom right of this image the actual size of the art, and then the larger left portion what it looks like zoomed in. There are no lines, or shading, but instead are implied by individual pixels put in a particular colour.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/6FUsH.jpg" />
  <row Id="9033" PostHistoryTypeId="5" PostId="4552" RevisionGUID="7fd89dc3-26b1-4318-9049-5301c08cb7f5" CreationDate="2010-10-16T16:50:00.963" UserId="2545" Comment="added 68 characters in body" Text="This is the kind of question that's better answered with google. Pixel art is game art that is very restricted - you are literally using pixels to draw something, so they end up having a very boxy look. (Though a lot of pixel art now is done on a much larger scale and then made to look like it's been edited pixel by pixel.)&#xD;&#xA;&#xD;&#xA;Example: &#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;You can see in the bottom right of this image the actual size of the art, and then the larger left portion what it looks like zoomed in. Lines and shading are implied by individual pixels put in a particular colour. (An outline, for example, is achieved by making all the pixels along the outside edge black.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/6FUsH.jpg" />
  <row Id="9034" PostHistoryTypeId="10" PostId="4533" RevisionGUID="8be10ef2-bc6a-4a40-adb4-adef19890b21" CreationDate="2010-10-16T16:53:40.820" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="9035" PostHistoryTypeId="5" PostId="4533" RevisionGUID="e50c6e21-c7f3-4e89-a717-db2c435c5e26" CreationDate="2010-10-16T16:53:40.947" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Game Development Degree vs Computer Science Degree](http://gamedev.stackexchange.com/questions/1611/game-development-degree-vs-computer-science-degree)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Heres the best education I got in ky math is AP Calculus and no technology class that teaches a programming language. So should I just go get a Computer Science degree or a game programming-based one? Might not be a lot; ask if you need more info to decide." />
  <row Id="9037" PostHistoryTypeId="2" PostId="4553" RevisionGUID="1eb0bcf5-86e7-4cc4-901e-f72d5b2f1d7a" CreationDate="2010-10-16T17:43:03.727" UserId="1413" Text="This forum is a pretty good place to get a good idea, because they also have a forum for &quot;low spec art&quot;, which you can compare to their &quot;pixel art&quot; forum and see the difference. &#xD;&#xA;&#xD;&#xA;http://www.wayofthepixel.net/pixelation/index.php" />
  <row Id="9038" PostHistoryTypeId="2" PostId="4554" RevisionGUID="80314e77-58e6-4c5b-96b2-aa5723bef752" CreationDate="2010-10-16T18:50:08.963" UserId="228" Text="The [curiously recurring template pattern][1] can be really useful for avoiding virtual methods and the performance penalty that can come from the virtual function calls.&#xD;&#xA;&#xD;&#xA;This can be the appropriate pattern when you don't actually need to have a container of the base class type which has the interface you're after, but you'd like to have similarly named behaviors and interfaces.&#xD;&#xA;&#xD;&#xA;For example you can use this when compiling classes for multiple platforms or engines (dx vs. opengl) where the variance of type is known at compile time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern" />
  <row Id="9039" PostHistoryTypeId="2" PostId="4555" RevisionGUID="b5676c4b-a670-4520-a2b3-b5d2ea5fefe1" CreationDate="2010-10-16T22:31:29.250" UserId="2253" Text="Is deferred rendering the future of real-time 3d rendering on pc hardware (at least until raytracing becomes feasible)?  I'm aware of the benefits (lots of lights, less state changes) trouble spots such as anti-aliasing, translucent items, and high use of memory bandwidth.&#xD;&#xA;&#xD;&#xA;But will the next-gen engines all be using deferred and is forward rendering a thing of the past?" />
  <row Id="9040" PostHistoryTypeId="1" PostId="4555" RevisionGUID="b5676c4b-a670-4520-a2b3-b5d2ea5fefe1" CreationDate="2010-10-16T22:31:29.250" UserId="2253" Text="Is Deferred Rendering The Future?" />
  <row Id="9041" PostHistoryTypeId="3" PostId="4555" RevisionGUID="b5676c4b-a670-4520-a2b3-b5d2ea5fefe1" CreationDate="2010-10-16T22:31:29.250" UserId="2253" Text="&lt;rendering&gt;&lt;deferred-rendering&gt;" />
  <row Id="9042" PostHistoryTypeId="2" PostId="4556" RevisionGUID="8881434b-f366-4969-8d3e-64df868d4eea" CreationDate="2010-10-17T00:32:19.220" UserId="189" Text="If anything I would go for a computer science degree; I'm doing it myself. But I am also pursuing a **[game development concentration][1]**. Whatever school you are planning to attend, you may want to investigate if they have this option; I highly recommend it! I will graduate with a computer science degree and all the same courses as any other CS major, so if I choose not to enter the game industry I still have all the education of anyone else with a CS degree. But I am also taking some game-related courses, which give me focused knowledge in game development.&#xD;&#xA;&#xD;&#xA;For example I am currently enrolled in a general game development course which is taught by the president and CTO of a local game company, so I'm gaining a lot of practical and real-world knowledge from him (as opposed to some other CS courses which can go deep into theory at times). But I'm also taking a course in software engineering, in which I am practicing Java and proper software engineering methods which apply to all areas of computer science.&#xD;&#xA;&#xD;&#xA;At the very least, **do your research** about the school you're planning on attending. Find out who the professors are and look them up; do they know their stuff? Are they in the industry or have connections? Are they IGDA members? Look at the list of courses and see if it appeals to you. Check out the area around the school and see if there are any game companies. All of these factors play a big part in figuring out whether the school has a genuinely great game development degree/concentration, or if it's just a gimmick because game development is the latest &quot;cool&quot; thing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.csc.ncsu.edu/academics/undergrad/bs-csc-gdc.php" />
  <row Id="9043" PostHistoryTypeId="5" PostId="4555" RevisionGUID="0355a147-72ef-42f9-8d45-a3313366bc67" CreationDate="2010-10-17T02:41:53.987" UserId="2253" Comment="added 4 characters in body" Text="Is deferred rendering the future of real-time 3d rendering on pc hardware (at least until raytracing becomes feasible)?  I'm aware of the benefits (lots of lights, less state changes) and also trouble spots such as anti-aliasing, translucent items, and higher memory bandwidth.&#xD;&#xA;&#xD;&#xA;But will the next-gen engines all be using deferred and is forward rendering a thing of the past?" />
  <row Id="9044" PostHistoryTypeId="2" PostId="4557" RevisionGUID="0296321b-6baa-4acd-9439-6cb6ca15b7d9" CreationDate="2010-10-17T04:39:06.193" UserId="2545" Text="Not really an answer, so much as an extended note : &#xD;&#xA;&#xD;&#xA;Digital painting requires a lot of learning time to get anything that looks hi-def. If you're already a competent drawer or painting in traditional mediums then it can be quite rewarding, but if you are looking for the easiest way for you to create art assets for yourself, it might not be the best way to go. Something like vectors or pixel art is probably best if you can't put in the needed time to really learn digital painting, since they are more easily manipulated and edited. If you make a mistake on a painting, you need to re-paint it, whereas with vector art you can just edit the shape/line to fix it." />
  <row Id="9045" PostHistoryTypeId="2" PostId="4558" RevisionGUID="c325bc51-6efa-4ba8-ae74-22607432000c" CreationDate="2010-10-17T04:49:36.200" UserId="2290" Text="Although there is already an accepted answer, I chose to write this answer to expound upon some of the previously discussed points, as well as address a few errors I noticed in other answers.&#xD;&#xA;&#xD;&#xA;Disclaimer&#xD;&#xA;-------&#xD;&#xA;Because it is relevant to the subject matter being discussed, I feel it is important that those reading my answer know that I am a graduate of Full Sail University, currently employed at a AAA game studio. That being said, I plan to keep my answer as objective as possible, so that readers can make decisions based on facts, rather than disguised opinions.&#xD;&#xA;&#xD;&#xA;Accreditation&#xD;&#xA;-------&#xD;&#xA;First and foremost, there are two kinds of accreditation in the United States:&#xD;&#xA;&#xD;&#xA; - **Regional** - This is the process traditional colleges and universities go through&#xD;&#xA; - **National** - This is the process specialty and vocational school go through&#xD;&#xA;&#xD;&#xA;There's a lot of information out there that goes into detail about the different processes, but here is what you need to know:&#xD;&#xA;&#xD;&#xA; - If you get a degree at a nationally accredited school, you can pursue a degree at regionally accredited institution (and vice versa).&#xD;&#xA; - If, for whatever reason, you decide to transfer from a nationally accredited school to any other school (nationally or regionally accredited), **before you have your degree**, the new school **does not** have to accept **any** of your credits.&#xD;&#xA;&#xD;&#xA;What to look for in an institution/degree &#xD;&#xA;-------&#xD;&#xA;There are a ton of schools out there that offer game development education (traditional and specialty), and a lot of them aren't worth 2 cents. Be sure to do your research and learn as much as you can about a school before committing to it.&#xD;&#xA;&#xD;&#xA; - **Degree or Certificate?** - When you graduate, will you get a degree or certificate?&#xD;&#xA; - **Professors** - What are their backgrounds? Do they seem qualified to teach the subjects in their curriculum?&#xD;&#xA; - **Curriculum** - Are the majority of the courses based on theory or application? Specifically look for courses that teach software architecture, rendering (Direct X or OpenGL), artificial intelligence, calculus, and trigonometry&#xD;&#xA; - **Students** - How many students find jobs? What companies? Ask to see sample projects completed by students, and examples of what those students contributed to the finished product.&#xD;&#xA; - **Industry** - Does the school seem connected to the industry? Are there game/software/simulation companies in the area? Do guest speakers visit the school? Is there a local IGDA chapter?&#xD;&#xA;&#xD;&#xA;General tips&#xD;&#xA;-------&#xD;&#xA; - **Experience is more important than formal education** - In this industry, talent is everything, that is why it is important to...&#xD;&#xA; - **Work on games outside of school** - It doesn't matter if you're going to a traditional or specialty school (or what kind of degree you're pursuing), you should make a **serious** effort to work on game projects in your spare time.&#xD;&#xA; - **Network, network, network!**&#xD;&#xA;&#xD;&#xA;If you have an questions, or would like me to clarify any of the points made, feel free to leave a comment. :)" />
  <row Id="9046" PostHistoryTypeId="2" PostId="4559" RevisionGUID="90e94d1f-382d-4f0d-83ea-186cecb53962" CreationDate="2010-10-17T04:59:20.847" UserId="160" Text="I started writing a book on exactly that topic: [Game Programming Patterns](http://gameprogrammingpatterns.com/). It's unfortunately on hiatus right now, but the chapters that are there might be helpful for you." />
  <row Id="9047" PostHistoryTypeId="2" PostId="4560" RevisionGUID="e02729ce-2b41-4418-a495-fff3487fc5ed" CreationDate="2010-10-17T05:30:12.560" UserId="2290" Text="I've spoken with a couple of artists in the industry on this very topic, and the general consensus has been that some of the best game artists are those that have a very deep traditional art education that they either learned through school or on their own. For example, a strong traditional art background can have a very significant impact an artist's textures.&#xD;&#xA;&#xD;&#xA;Unfortunately, there is no easy answer to your question, as there are great traditional and trade institutions you can learn from. What I would recommend is looking into the schools individually and deciding whether or not they are a good match for you. Below are a couple of things you should look for in the school you plan on attending:&#xD;&#xA;&#xD;&#xA; - Mixture of traditional 2d &amp; 3d art courses, in addition to game art specific curriculum&#xD;&#xA; - Exposure to different aspects of game art (prop modeling vs character modeling, organic modeling, texturing, rigging, special effects, animation, etc.)&#xD;&#xA; - Exposure to different tools&#xD;&#xA; - Exposure to different engines (Unreal/UDK, Source, Crytek, etc.)&#xD;&#xA;&#xD;&#xA;Like many others, I would highly recommend supplementing your education by spending time on popular game art websites. I would even recommend asking your question to people there, to get their input. Lots of industry professionals hang out on those sites and offer free critiques and advice. It'd be a waste not to use such a valuable resource!" />
  <row Id="9048" PostHistoryTypeId="2" PostId="4561" RevisionGUID="bfcafd17-03c8-4bd4-b921-94ff1d2fb0a0" CreationDate="2010-10-17T05:50:42.013" UserId="2290" Text="Game development costs are something developers tend to keep pretty close to the vest, so it can be difficult to find examples.&#xD;&#xA;&#xD;&#xA;In 2009, Ubisoft CEO Yves Guillemot is quoted as saying the cost for creating a major title for PS3 or Xbox 360 is typically between $20 million and $30 million.&#xD;&#xA;&#xD;&#xA;Nintendo's Reggie Fils-Aime is quoted as saying costs can be $20 million up to a staggering $50 million with sales of 1.3 to 1.5 million units to make money.&#xD;&#xA;&#xD;&#xA;Obviously, MMOs and games built in tandem with their engines, cost significantly more." />
  <row Id="9049" PostHistoryTypeId="2" PostId="4562" RevisionGUID="68be15bc-3bc5-4f08-9092-92459a7eb21e" CreationDate="2010-10-17T06:21:59.240" UserId="2289" Text="In my game, I have a base Note class, and various subclasses of Note. In addition, I have a NoteCollection class which contains a collection of these Note objects and draws them to the screen. Normally, I'd just do something like this in NoteCollection:&#xD;&#xA;&#xD;&#xA;    public override Draw(GameTime gametime) {&#xD;&#xA;        ...&#xD;&#xA;        spriteBatch.Begin(...);&#xD;&#xA;        foreach(Note n in notes)&#xD;&#xA;            n.Draw(gameTime);&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However, some of these Note subclasses also need to draw 3D primitives in their Draw() methods. I imagine setting vertex buffers in the middle of a SpriteBatch Begin()/End() block isn't a good idea (I've tried it, anyways). What would be nice would be a SpriteBatch.Pause() method that would save the state of the SpriteBatch, and then you could resume drawing your sprites with, say, a SpriteBatch.Resume(). But alas, there's no much methods.&#xD;&#xA;&#xD;&#xA;In short, is there any way to go about this? I'd rather not call SpriteBatch.End()/Begin() from each Note.Draw(), as it'd be really slow and I wouldn't necessarily know what parameters the original outside Begin() was called with." />
  <row Id="9050" PostHistoryTypeId="1" PostId="4562" RevisionGUID="68be15bc-3bc5-4f08-9092-92459a7eb21e" CreationDate="2010-10-17T06:21:59.240" UserId="2289" Text="Mixing sprite drawing with 3D primitive drawing in XNA?" />
  <row Id="9051" PostHistoryTypeId="3" PostId="4562" RevisionGUID="68be15bc-3bc5-4f08-9092-92459a7eb21e" CreationDate="2010-10-17T06:21:59.240" UserId="2289" Text="&lt;xna&gt;&lt;c#&gt;&lt;sprites&gt;" />
  <row Id="9056" PostHistoryTypeId="2" PostId="4564" RevisionGUID="676a9c42-ffa8-4a99-9c03-619452a89bf3" CreationDate="2010-10-17T11:16:08.677" UserId="2555" Text="I'm a bit confused. The question is: when I'm developing a XNA game for Xbox (of Windows), is it possible to use DirectX (to make use of the GPU)? Or is everything getting calculated by the CPU?&#xD;&#xA;&#xD;&#xA;A quick Google search didn't gave any results of combining those two..." />
  <row Id="9057" PostHistoryTypeId="1" PostId="4564" RevisionGUID="676a9c42-ffa8-4a99-9c03-619452a89bf3" CreationDate="2010-10-17T11:16:08.677" UserId="2555" Text="XBOX + Xna != DirectX  ??" />
  <row Id="9058" PostHistoryTypeId="3" PostId="4564" RevisionGUID="676a9c42-ffa8-4a99-9c03-619452a89bf3" CreationDate="2010-10-17T11:16:08.677" UserId="2555" Text="&lt;graphics&gt;&lt;xna&gt;&lt;directx&gt;" />
  <row Id="9059" PostHistoryTypeId="6" PostId="4540" RevisionGUID="37d9e3c7-c259-49ba-817b-deceb558ff4a" CreationDate="2010-10-17T11:16:27.043" UserId="1687" Comment="edited tags" Text="&lt;2d&gt;&lt;gui&gt;" />
  <row Id="9060" PostHistoryTypeId="2" PostId="4565" RevisionGUID="31703501-b6a8-4baf-b5f6-aa26016008b2" CreationDate="2010-10-17T12:05:46.570" UserId="1004" Text="As far as i know, it's no different from PC + XNA: draw calls you make (anything using Spritebatch, any of the DrawIndexedPrimitives, rendering models, etc.) are done via the GPU (since XNA is a layer on DirectX). Anything else goes on the CPU(s)." />
  <row Id="9062" PostHistoryTypeId="2" PostId="4566" RevisionGUID="18da6e2e-a894-404d-bba0-8f3a55eb033e" CreationDate="2010-10-17T15:35:36.993" UserId="2290" Text="Unfortunately, there are no real interface design standards in the game industry, which makes it difficult to find accurate information this topic. If game interface design is something you're seriously interested in, I would take the following steps:&#xD;&#xA;&#xD;&#xA; - **Learn as much as you can about interaction design patterns** - A lot of the research done on design patterns doesn't directly relate to video games or software for that matter, but if you look hard enough, you'll find that there are a lot of parallels.&#xD;&#xA; - **Learn general computer UI theory** - When is a text box better than a drop-down/combo-box? What are the strengths and weaknesses of each?&#xD;&#xA; - **Learn from the successes and failures of others** - Look at, and dissect as many UIs as you can (and don't limit yourself just to games!). Go through each UI element, analyzing how and why the component behaves that way. For example:&#xD;&#xA;  - In an FPS, why does the reticle expand when the player shoots? Why does it contract when you crouch or prone?&#xD;&#xA;  - In a fighting game, when a player takes damage, why does their health bar deplete immediately, instead of fading over time?&#xD;&#xA;  - In a RTS, what is the purpose of the minimap?&#xD;&#xA;  - In any game, how do you know if you're winning/losing?&#xD;&#xA;  - What steps does the player have to go through to start a new game, load a saved game, change the options, exit the game, etc.? Could this process be simplified?&#xD;&#xA;&#xD;&#xA;I haven't run across any particularly good game UI reading material, but below are a few interaction design books I highly recommend looking into:&#xD;&#xA;&#xD;&#xA; - [Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition][1]&#xD;&#xA; - [The Design of Everyday Things][2]&#xD;&#xA; - [The Design of Future Things][3]&#xD;&#xA; - [Universal Principles of Design][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758&#xD;&#xA;  [2]: http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0465067107&#xD;&#xA;  [3]: http://www.amazon.com/Design-Future-Things-Don-Norman/dp/0465002285&#xD;&#xA;  [4]: http://www.amazon.com/Universal-Principles-Design-William-Lidwell/dp/1592530079" />
  <row Id="9063" PostHistoryTypeId="5" PostId="4566" RevisionGUID="460a149c-e917-44c8-bf6a-871f3f0bbdee" CreationDate="2010-10-17T15:55:56.710" UserId="2290" Comment="added 276 characters in body" Text="Unfortunately, there are no real interface design standards in the game industry, which makes it difficult to find accurate information this topic. If game interface design is something you're seriously interested in, I would take the following steps:&#xD;&#xA;&#xD;&#xA; - **Learn as much as you can about interaction design patterns** - A lot of the research done on design patterns doesn't directly relate to video games or software for that matter, but if you look hard enough, you'll find that there are a lot of parallels.&#xD;&#xA; - **Learn general computer UI theory** - When is a text box better than a drop-down/combo-box? What are the strengths and weaknesses of each?&#xD;&#xA; - **Learn from the successes and failures of others** - Look at, and dissect as many UIs as you can (and don't limit yourself just to games!). Go through each UI element, analyzing how and why the component behaves that way. For example:&#xD;&#xA;  - In an FPS, why does the reticle expand when the player shoots? Why does it contract when you crouch or prone?&#xD;&#xA;  - In a fighting game, when a player takes damage, why does their health bar deplete immediately, instead of fading over time?&#xD;&#xA;  - In a RTS, what is the purpose of the minimap?&#xD;&#xA;  - In any game, how do you know if you're winning/losing?&#xD;&#xA;  - What steps does the player have to go through to start a new game, load a saved game, change the options, exit the game, etc.? Could this process be simplified?&#xD;&#xA; - **Practice, practice, practice!** - Once you feel like you have a good understanding of what UIs are out there, and how they're composed, try your hand at creating UIs again. Remember to always analyze your work, in addition to having others critique it, from time to time.&#xD;&#xA;&#xD;&#xA;I haven't run across any particularly good game UI reading material, but below are a few interaction design books I highly recommend looking into:&#xD;&#xA;&#xD;&#xA; - [Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition][1]&#xD;&#xA; - [The Design of Everyday Things][2]&#xD;&#xA; - [The Design of Future Things][3]&#xD;&#xA; - [Universal Principles of Design][4]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758&#xD;&#xA;  [2]: http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0465067107&#xD;&#xA;  [3]: http://www.amazon.com/Design-Future-Things-Don-Norman/dp/0465002285&#xD;&#xA;  [4]: http://www.amazon.com/Universal-Principles-Design-William-Lidwell/dp/1592530079" />
  <row Id="9064" PostHistoryTypeId="2" PostId="4567" RevisionGUID="cea47bb9-22c3-4ac6-bf59-f3e3882bd458" CreationDate="2010-10-17T16:59:21.820" UserId="1677" Text="I'm creating a [component-based game object system][1]. Some tips:&#xD;&#xA;&#xD;&#xA; 1. `GameObject` is simply a list of `Components`.&#xD;&#xA; 2. There are `GameSubsystems`. For example, rendering, physics etc. Each `GameSubsystem` contains pointers to some of `Components`. `GameSubsystem` is a very powerful and flexible abstraction: it represents any slice (or aspect) of the game world.&#xD;&#xA;&#xD;&#xA;There is a need in a mechanism of registering `Components` in `GameSubsystems` (when `GameObject` is created and composed). There are **4 approaches**:&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; - 1: [Chain of responsibility][2] pattern. Every `Component` is offered to every `GameSubsystem`. `GameSubsystem` makes a decision which `Components` to register (and how to organize them). For example, GameSubsystemRender can register Renderable Components.&#xD;&#xA;&#xD;&#xA;pro. `Components` know nothing about how they are used. Low coupling. **A.** We can add new `GameSubsystem`. For example, let's add GameSubsystemTitles that registers all ComponentTitle and guarantees that every title is unique and provides interface to quering objects by title. Of course, ComponentTitle should not be rewrited or inherited in this case. **B.** We can reorganize existing `GameSubsystems`. For example, GameSubsystemAudio, GameSubsystemRender, GameSubsystemParticleEmmiter can be merged into GameSubsystemSpatial (to place all audio, emmiter, render `Components` in the same hierarchy and use parent-relative transforms).&#xD;&#xA;&#xD;&#xA;con. Every-to-every check. Very innefficient.&#xD;&#xA;&#xD;&#xA;con. `Subsystems` know about `Components`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; - 2: Each `Subsystem` searches for `Components` of specific types.&#xD;&#xA;&#xD;&#xA;pro. Better performance than in `Approach 1`.&#xD;&#xA;&#xD;&#xA;con. `Subsystems` still know about `Components`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; - 3: `Component` registers itself in `GameSubsystem(s)`. We know at compile-time that there is a GameSubsystemRenderer, so let's ComponentImageRender will call something like GameSubsystemRenderer::register(ComponentRenderBase*).&#xD;&#xA;&#xD;&#xA;pro. Performance. No unnecessary checks as in `Approach 1`.&#xD;&#xA;&#xD;&#xA;con. `Components` are badly coupled with `GameSubsystems`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA; - 4: [Mediator][3] pattern. `GameState` (that contains `GameSubsystems`) can implement registerComponent(Component*).&#xD;&#xA;&#xD;&#xA;pro. `Components` and `GameSubystems` know nothing about each other.&#xD;&#xA;&#xD;&#xA;con. In C++ it would look like ugly and slow typeid-switch.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Questions:**&#xD;&#xA;Which approach is better and mostly used in component-based design? What Practice says? Any suggestions about implementation of `Approach 4`?&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Mediator_pattern" />
  <row Id="9065" PostHistoryTypeId="1" PostId="4567" RevisionGUID="cea47bb9-22c3-4ac6-bf59-f3e3882bd458" CreationDate="2010-10-17T16:59:21.820" UserId="1677" Text="Register Game Object Components in Game Subsystems? (Component-based Game Object design)" />
  <row Id="9066" PostHistoryTypeId="3" PostId="4567" RevisionGUID="cea47bb9-22c3-4ac6-bf59-f3e3882bd458" CreationDate="2010-10-17T16:59:21.820" UserId="1677" Text="&lt;c++&gt;&lt;architecture&gt;&lt;component-based&gt;" />
  <row Id="9067" PostHistoryTypeId="2" PostId="4568" RevisionGUID="415236a5-4108-4e25-9fb4-465f55eeeedc" CreationDate="2010-10-17T17:01:03.670" UserId="2345" Text="What I would do is create 2 draw lists (`List&lt;IDrawable&gt;` or better yet, create your own `IDraw` interface which includes a `CullTest(Camera camera)` method and a `BoundingBox` parameter). Then add all the drawprimitives nodes into one drawlist and the spritebatch calls in the other list. Then I would depth sort the drawprimitives list from closest to furthest away from the camera. After that you can draw both lists. This way you are using only one spritebatch. This is much cheaper than creating a new spritebatch for every node since each spritebatch.Start() sets a whole slew of renderstates. Also, you are reducing the drawprimitives overdraw from drawing distant occluded objects before the objects in front of them (why make the pixel shader shade pixels which are not visible?)." />
  <row Id="9068" PostHistoryTypeId="5" PostId="4568" RevisionGUID="5d912918-664c-4a50-8d3b-c9ee73a1d90e" CreationDate="2010-10-17T17:17:18.587" UserId="2345" Comment="added 697 characters in body" Text="What I would do is create 2 draw lists (`List&lt;IDrawable&gt;` or better yet, create your own `IDraw` interface which includes a `CullTest(Camera camera)` method and a `BoundingBox` parameter). Then add all the drawprimitives nodes into one drawlist and the spritebatch calls in the other list. Then I would depth sort the drawprimitives list from closest to furthest away from the camera. After that you can draw both lists. This way you are using only one spritebatch. This is much cheaper than creating a new spritebatch for every node since each spritebatch.Start() sets a whole slew of renderstates. Also, you are reducing the drawprimitives overdraw from drawing distant occluded objects before the objects in front of them (why make the pixel shader shade pixels which are not visible?).&#xD;&#xA;&#xD;&#xA;If you do roll your own `IDraw` interface you can do something like this:&#xD;&#xA;&#xD;&#xA;	public interface IDraw : ICullable, IEntity&#xD;&#xA;	{&#xD;&#xA;		void Draw(DrawState state);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface IEntity:&#xD;&#xA;	{&#xD;&#xA;		BoundingBox AABB { get; }&#xD;&#xA;		Vector3 position { get; set; }&#xD;&#xA;		...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface ICullable&#xD;&#xA;	{&#xD;&#xA;		bool CullTest(ICamera camera);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface ICamera&#xD;&#xA;	{&#xD;&#xA;		BoundingFrustum boundingfrustum { get; }&#xD;&#xA;		//and anything else common between your camera classes: &#xD;&#xA;        //fov, aspect, far, near, position, target...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public class DrawState&#xD;&#xA;	{&#xD;&#xA;		//Elapsed time&#xD;&#xA;		//Current camera&#xD;&#xA;		//Current shader&#xD;&#xA;		//anything else that you are sharing between draw calls&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9069" PostHistoryTypeId="5" PostId="4568" RevisionGUID="32676937-6210-4a69-ad80-3ace018f46df" CreationDate="2010-10-17T17:22:25.150" UserId="2345" Comment="added 169 characters in body; added 53 characters in body" Text="What I would do is create 2 draw lists (`List&lt;IDrawable&gt;` or better yet, create your own `IDraw` interface which includes a `CullTest(Camera camera)` method and a `BoundingBox` parameter). Then add all the drawprimitives notes into one drawlist and the spritebatch calls in the other list. If you are mixing drawprimitives and spritebatch draw calls inside the note.Draw() methods you should break it up into 2 calls (note.SpriteBatchDraw() and note.Draw()). Then I would depth sort the drawprimitives list from closest to furthest away from the camera. After that you can draw both lists. This way you are using only one spritebatch. This is much cheaper than creating a new spritebatch for every node since each spritebatch.Start() sets a whole slew of renderstates. Also, you are reducing the drawprimitives overdraw from drawing distant occluded objects before the objects in front of them (why make the pixel shader shade pixels which are not visible?).&#xD;&#xA;&#xD;&#xA;If you do roll your own `IDraw` interface you can do something like this:&#xD;&#xA;&#xD;&#xA;	public interface IDraw : ICullable, IEntity&#xD;&#xA;	{&#xD;&#xA;		void DrawPrimitives(DrawState state);&#xD;&#xA;		void DrawSpriteBatch(DrawState state); &#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface IEntity:&#xD;&#xA;	{&#xD;&#xA;		BoundingBox AABB { get; }&#xD;&#xA;		Vector3 position { get; set; }&#xD;&#xA;		...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface ICullable&#xD;&#xA;	{&#xD;&#xA;		bool CullTest(ICamera camera);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface ICamera&#xD;&#xA;	{&#xD;&#xA;		BoundingFrustum boundingfrustum { get; }&#xD;&#xA;		//and anything else common between your camera classes: &#xD;&#xA;        //fov, aspect, far, near, position, target...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public class DrawState&#xD;&#xA;	{&#xD;&#xA;		//Elapsed time&#xD;&#xA;		//Current camera&#xD;&#xA;		//Current shader&#xD;&#xA;		//anything else that you are sharing between draw calls&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9070" PostHistoryTypeId="5" PostId="4568" RevisionGUID="773a142a-10bf-4b69-ab2a-bd59b2c56055" CreationDate="2010-10-17T17:28:14.253" UserId="2345" Comment="added 128 characters in body; deleted 8 characters in body; added 10 characters in body" Text="What I would do is create 2 draw lists (`List&lt;IDrawable&gt;` or better yet, create your own `IDraw` interface which includes a `CullTest(Camera camera)` method and a `BoundingBox` parameter). Then add all the drawprimitives notes into one drawlist and the spritebatch calls in the other list. If you are mixing drawprimitives and spritebatch draw calls inside the note.Draw() methods you should break it up into 2 calls (note.DrawSpriteBatch() and note.DrawPrimitives()). Then I would depth sort the drawprimitives list from closest to furthest away from the camera. After that you can draw both lists. This way you are using only one spritebatch. This is much cheaper than creating a new spritebatch for every node since each spritebatch.Start() sets a whole slew of renderstates. Also, you are reducing the drawprimitives overdraw from drawing distant occluded objects before the objects in front of them (why make the pixel shader shade pixels which are not visible?).&#xD;&#xA;&#xD;&#xA;If you do roll your own `IDraw` interface you can do something like this:&#xD;&#xA;&#xD;&#xA;	public interface IDraw : ICullable, IEntity&#xD;&#xA;	{&#xD;&#xA;		void DrawPrimitives(DrawState state);&#xD;&#xA;		void DrawSpriteBatch(DrawState state); &#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface IEntity:&#xD;&#xA;	{&#xD;&#xA;		BoundingBox AABB { get; }&#xD;&#xA;		Vector3 position { get; set; }&#xD;&#xA;		...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public interface ICullable&#xD;&#xA;	{&#xD;&#xA;		bool CullTest(ICamera camera);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    //this is useful for being able to switch camera types without &#xD;&#xA;    //changing any code which relies on the camera class&#xD;&#xA;	public interface ICamera &#xD;&#xA;	{&#xD;&#xA;		BoundingFrustum boundingfrustum { get; }&#xD;&#xA;		//and anything else common between your camera classes: &#xD;&#xA;        //fov, aspect, far, near, position, target...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public class DrawState&#xD;&#xA;	{&#xD;&#xA;		//Elapsed time, Current camera, Current shader&#xD;&#xA;		//anything else that you are sharing between draw calls&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9071" PostHistoryTypeId="2" PostId="4569" RevisionGUID="379a1428-5d73-4abe-9846-2b621e0fced7" CreationDate="2010-10-17T18:27:37.010" UserId="2494" Text="unfortunately, i'm not good in math, so i'm here to ask you how to manage, in a simple 2d game, the car acceleration and break. &#xD;&#xA;I'm trying to develop it (as a hobby) in c# and sdl.net.&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9072" PostHistoryTypeId="1" PostId="4569" RevisionGUID="379a1428-5d73-4abe-9846-2b621e0fced7" CreationDate="2010-10-17T18:27:37.010" UserId="2494" Text="Car (or other &quot;object&quot;) acceleration and break: how to do ? " />
  <row Id="9073" PostHistoryTypeId="3" PostId="4569" RevisionGUID="379a1428-5d73-4abe-9846-2b621e0fced7" CreationDate="2010-10-17T18:27:37.010" UserId="2494" Text="&lt;algorithm&gt;&lt;physics&gt;" />
  <row Id="9074" PostHistoryTypeId="2" PostId="4570" RevisionGUID="112d393d-3340-4c42-b0ec-0b6f7dd24913" CreationDate="2010-10-17T18:40:12.957" UserId="2100" Text="To get you thinking, here is how you might consider it:&#xD;&#xA;&#xD;&#xA;You've got a velocity variable that starts at zero. As you hold the acceleration key/button, the velocity is increased by say, 2 units per frame, or whatever you want. And every frame that the velocity button isn't held, you decrement 1 unit per frame (until you get to zero). To break, decrease 2 units every frame the break button is held.&#xD;&#xA;&#xD;&#xA;This way, you've got a car that is always slowing down while the acceleration isn't held. Of course, you can increase/decrease however much you want, based on your car's stats, the friction of the ground it's on, etc...&#xD;&#xA;&#xD;&#xA;Now, to move the car, you look at the velocity and move it however many units you want to in the game world, based on how fast your velocity units are." />
  <row Id="9075" PostHistoryTypeId="2" PostId="4571" RevisionGUID="ed3a528a-92fd-49df-9ce8-c5db45c6af58" CreationDate="2010-10-17T19:02:39.443" UserId="2100" Text="I am creating a simple input component to hold on to actions and key states, and a short history of the last ten or so states. The idea is that everything that is interested in input will ask this component for the latest input, and I am wondering where I should create it. &#xD;&#xA;&#xD;&#xA;I am also wondering how I should create components that are specific to my game objects - I envision them as variables, but then how do their Update/Draw methods get called?&#xD;&#xA;&#xD;&#xA;What I'm trying to ask is, what are the best practices for adding components to the proper collections? Right now I've added my input component in the main Game class that XNA creates when everything is first initialized, saying something along the lines of `this.Components.Add(new InputComponent(this))`, which looks a little odd to me, and I'd still want to hang onto that reference so I can ask it things.&#xD;&#xA;&#xD;&#xA;An answer to my input component's dilemma is great, but also I'm guessing there is a right way to do this in general in XNA." />
  <row Id="9076" PostHistoryTypeId="1" PostId="4571" RevisionGUID="ed3a528a-92fd-49df-9ce8-c5db45c6af58" CreationDate="2010-10-17T19:02:39.443" UserId="2100" Text="How are components properly instantiated and used in XNA 4.0?" />
  <row Id="9077" PostHistoryTypeId="3" PostId="4571" RevisionGUID="ed3a528a-92fd-49df-9ce8-c5db45c6af58" CreationDate="2010-10-17T19:02:39.443" UserId="2100" Text="&lt;game-design&gt;&lt;xna&gt;&lt;input&gt;&lt;component-based&gt;&lt;xna-4.0&gt;" />
  <row Id="9078" PostHistoryTypeId="2" PostId="4572" RevisionGUID="b70364e4-0b87-456d-aa32-fa899f6488b9" CreationDate="2010-10-17T19:47:55.950" UserId="2522" Text="Im askining here since people would be experianced in different areas more but i dont know wether i should go online or campus since the closest college that offers game programmign degrees is in a different state 6 hours away so any advise?" />
  <row Id="9079" PostHistoryTypeId="1" PostId="4572" RevisionGUID="b70364e4-0b87-456d-aa32-fa899f6488b9" CreationDate="2010-10-17T19:47:55.950" UserId="2522" Text="Do online colleges give you the same experiance needed for programming or is it better to go on campus?" />
  <row Id="9080" PostHistoryTypeId="3" PostId="4572" RevisionGUID="b70364e4-0b87-456d-aa32-fa899f6488b9" CreationDate="2010-10-17T19:47:55.950" UserId="2522" Text="&lt;education&gt;" />
  <row Id="9081" PostHistoryTypeId="2" PostId="4573" RevisionGUID="0bcc4ed1-5ccc-4777-a320-3ada7251819d" CreationDate="2010-10-17T20:54:54.763" UserId="2290" Text="Do online colleges offer a similar curriculum as traditional colleges? Probably&#xD;&#xA;&#xD;&#xA;Do online colleges offer a similar experience as traditional colleges? Probably not.&#xD;&#xA;&#xD;&#xA;In my experience, a lot of online courses will try to mimic the classroom experience through software like digital whiteboards, video conferencing, etc., but it's never quite the same as being in a classroom. To me, online courses fell more rigid, professors fell more distant, and classmates seem less like classmates and more like passers-by. Not to mention the countless social opportunities and interactions you'll miss out on.&#xD;&#xA;&#xD;&#xA;Given the choice, I would definitely choose to pursue a degree on campus, unless there is some particular reason you need/want to stay in your area." />
  <row Id="9082" PostHistoryTypeId="2" PostId="4574" RevisionGUID="6618d63e-ab9c-4004-bf08-f0737c5976b0" CreationDate="2010-10-17T21:01:48.053" UserId="2345" Text="The online college will deprive you of the opportunity to build relationships with professors and industry professionals. While they try to mimic the classroom experience through webcams and chat rooms, those will only take you so far. You will likely not get to know your peers as well as you would if you had to endure painful all nighters in a lab with them. These relationships may lead to job opportunities in the future as well as potential partnerships.  " />
  <row Id="9083" PostHistoryTypeId="2" PostId="4575" RevisionGUID="7748eba9-9681-4ef8-b198-2f8d00c2f399" CreationDate="2010-10-17T21:20:44.437" UserId="1091" Text="As you highlight yourself, deferred rendering isn't a silver-bullet which solves all problems, and it also introduces new issues.&#xD;&#xA;&#xD;&#xA;So no, it's probably not the future, nor will it be used in all engines.&#xD;&#xA;&#xD;&#xA;Instead I think you're going to see a mix of technologies, including forward and deferred rendering used for some time to come.&#xD;&#xA;" />
  <row Id="9084" PostHistoryTypeId="2" PostId="4576" RevisionGUID="dfb0df69-b968-4bc7-b213-d6ca977f3c91" CreationDate="2010-10-17T21:51:00.073" UserId="656" Text="Attending college not only builds your skills as a programmer, it gives you an opportunity to builds your social, communication and teamwork skills. Just the social aspect of being with other people is a necessary experience for working in teams inside a company.&#xD;&#xA;&#xD;&#xA;Beware of online school scams, however (same goes for some colleges, but there are alot of online ones which are just scams). They'll take your money, give you a pass and hand you a diploma, but that diploma won't be recognized by any company once you graduate. Be careful!" />
  <row Id="9085" PostHistoryTypeId="5" PostId="4558" RevisionGUID="4c3abd2c-ce57-4ff3-be42-49b2af518c02" CreationDate="2010-10-17T22:17:26.867" UserId="2290" Comment="deleted 381 characters in body" Text="Although there is already an accepted answer, I chose to write this answer to expound upon some of the previously discussed points, as well as address a few errors I noticed in other answers.&#xD;&#xA;&#xD;&#xA;Accreditation&#xD;&#xA;-------&#xD;&#xA;First and foremost, there are two kinds of accreditation in the United States:&#xD;&#xA;&#xD;&#xA; - **Regional** - This is the process traditional colleges and universities go through&#xD;&#xA; - **National** - This is the process specialty and vocational school go through&#xD;&#xA;&#xD;&#xA;There's a lot of information out there that goes into detail about the different processes, but here is what you need to know:&#xD;&#xA;&#xD;&#xA; - If you get a degree at a nationally accredited school, you can pursue a degree at regionally accredited institution (and vice versa).&#xD;&#xA; - If, for whatever reason, you decide to transfer from a nationally accredited school to any other school (nationally or regionally accredited), **before you have your degree**, the new school **does not** have to accept **any** of your credits.&#xD;&#xA;&#xD;&#xA;What to look for in an institution/degree &#xD;&#xA;-------&#xD;&#xA;There are a ton of schools out there that offer game development education (traditional and specialty), and a lot of them aren't worth 2 cents. Be sure to do your research and learn as much as you can about a school before committing to it.&#xD;&#xA;&#xD;&#xA; - **Degree or Certificate?** - When you graduate, will you get a degree or certificate?&#xD;&#xA; - **Professors** - What are their backgrounds? Do they seem qualified to teach the subjects in their curriculum?&#xD;&#xA; - **Curriculum** - Are the majority of the courses based on theory or application? Specifically look for courses that teach software architecture, rendering (Direct X or OpenGL), artificial intelligence, calculus, and trigonometry&#xD;&#xA; - **Students** - How many students find jobs? What companies? Ask to see sample projects completed by students, and examples of what those students contributed to the finished product.&#xD;&#xA; - **Industry** - Does the school seem connected to the industry? Are there game/software/simulation companies in the area? Do guest speakers visit the school? Is there a local IGDA chapter?&#xD;&#xA;&#xD;&#xA;General tips&#xD;&#xA;-------&#xD;&#xA; - **Experience is more important than formal education** - In this industry, talent is everything, that is why it is important to...&#xD;&#xA; - **Work on games outside of school** - It doesn't matter if you're going to a traditional or specialty school (or what kind of degree you're pursuing), you should make a **serious** effort to work on game projects in your spare time.&#xD;&#xA; - **Network, network, network!**&#xD;&#xA;&#xD;&#xA;If you have an questions, or would like me to clarify any of the points made, feel free to leave a comment. :)" />
  <row Id="9086" PostHistoryTypeId="2" PostId="4577" RevisionGUID="08426d86-96dc-4377-b6f1-b8c4e9fc6d7e" CreationDate="2010-10-17T22:31:01.257" UserId="2560" Text="In my experience, college classes are nowhere near as helpful as actually meeting other students. In most of the classes I've taken, the teachers teach everything extremely slowly. While your teachers are busy telling you how multi-threading is &quot;too hard&quot;, you can make friends with other students and learn from them. Most of what I've learned in my classes is a result of me and friends doing homework in strange ways to entertain ourselves. I see that as a huge advantage over online classes.&#xD;&#xA;&#xD;&#xA;I would say it would be better to just make friends with a couple programmers and skip college entirely, but what you really want are other people at a similar level as you, and an environment that will get you in the mood to do programming." />
  <row Id="9087" PostHistoryTypeId="2" PostId="4578" RevisionGUID="89ae1f2c-f236-4624-b810-5b4f12c1cc6d" CreationDate="2010-10-18T02:37:51.777" UserId="2563" Text="From my personal experience in a game design education, what really matters isn't the specific degree, but your dedication to learning and improving your programming skills and demonstrating your talents. I've met a lot of people with degrees not specifically game deign oriented like fine arts, networking, and computer science, who apply them in the industry. I say find a school that teaches you what you'd like to learn, then apply those skills to making a game by yourself or with friends. It will demonstrate your technical skills along with passion for video games." />
  <row Id="9088" PostHistoryTypeId="2" PostId="4579" RevisionGUID="96efa4f4-8145-4cf4-afde-66260aad5f4c" CreationDate="2010-10-18T02:39:03.803" UserId="458" Text="As with any college or university program (online or otherwise), you're going to be spending a shockingly large amount of money -- probably more than your first car, and at least with the car you probably took a test drive and kicked the tires. So be sure of what you're getting!&#xD;&#xA;&#xD;&#xA;Unfortunately there is no single concept of &quot;online class,&quot; it varies by school. Some schools consider &quot;online&quot; to equal &quot;self-taught&quot;: as in, you get the textbook, teach yourself, hand in the exercises, and some remote instructor who is just a glorified grader gives you a score. Some schools include more content, everything from text to podcasts to video lectures, possibly even &quot;live&quot; remote lectures with courseware that simulates you being in a physical classroom. Some schools expect you to do most of the work on your own, but the instructor is expected to be there as a resource for you if you need help or get stuck.&#xD;&#xA;&#xD;&#xA;If there is a specific school you're considering, find out more about their program. Find out exactly what is involved, what a typical class looks like, what kind of level of support you can expect, what your rights and responsibilities as a student are. If they can't tell you or they refuse to show you... run away!&#xD;&#xA;&#xD;&#xA;Caveat emptor." />
  <row Id="9089" PostHistoryTypeId="2" PostId="4580" RevisionGUID="1bf7f8b4-8164-42f3-bbfe-f9823ed0ed9e" CreationDate="2010-10-18T03:04:41.513" UserId="458" Text="It varies widely. Ballpark is 8 figures for a big-budget (&quot;AAA&quot;) title these days... i.e. 10 to 100 Million (US $). But a lot depends on how you count, and there are tons of exceptions.&#xD;&#xA;&#xD;&#xA;Here's a good way to guesstimate:&#xD;&#xA;&#xD;&#xA;1) How many people on the team? A small team is around 20-30 people, large team would be several hundred. Look at the credits of a few games you own (either on the Credits screen from main menu if there is one, or in the back of the instruction book... or just check www.mobygames.com).&#xD;&#xA;&#xD;&#xA;2) What was the length of development? Typical range for AAA development is 2-5 years.&#xD;&#xA;&#xD;&#xA;3) Where was it developed? Games made in San Francisco are going to cost more in payroll than those made in Denver. Look up the IGDA Salary Survey, adjust for cost-of-living of the area, and cut it by a small amount because the Salary Survey is slightly inflated.&#xD;&#xA;&#xD;&#xA;If you have a particular kind of game in mind, find some similar games (same genre, comparable production values) and you can probably research all three of the above things for a similar title.&#xD;&#xA;&#xD;&#xA;Then, multiply: size of team (number of people) X length of development (years) X average annual developer salary ($/year). That gives you the baseline development cost in payroll.&#xD;&#xA;&#xD;&#xA;Example for a small game: 20 people X 2 years X $40K/year = $1.6M&#xD;&#xA;Example for a large game: 200 people X 5 years X $60K/year = $60M&#xD;&#xA;&#xD;&#xA;What about other &quot;operations&quot; costs (office space, computer hardware and software, electricity, payroll services, etc.)? Ballpark, estimate those as 25% of the total dev cost, with payroll being the other 75%. So multiply the above figure by an extra 4/3 to get the final dev cost estimate.&#xD;&#xA;&#xD;&#xA;If you want to include publisher costs (manufacturing, distribution, advertising), ballpark that as equal to the dev cost, so multiply your figure by 2 to get the final total cost of a game.&#xD;&#xA;&#xD;&#xA;Hint: next time you hear someone complain about how video games are so expensive because they cost $60, remind them that the little package in their hand cost a lot more than $60 to develop :)" />
  <row Id="9090" PostHistoryTypeId="2" PostId="4581" RevisionGUID="39725317-1afa-4ea1-be05-563d1858a6f6" CreationDate="2010-10-18T04:19:41.560" UserId="2248" Text="I'm writing a game where the player has to connect a group of letters to form words. Something like bookworm but it will be very different I hope. &#xD;&#xA;&#xD;&#xA;The point of the question is that I need to build a dictionary of words. &#xD;&#xA;&#xD;&#xA;I made a simple java program that crawls the web and  extracts words, but a lot of trash is mixed with the good words and it's impossible to clean it. I'm talking about 100,000 words. &#xD;&#xA;&#xD;&#xA;Is there any dictionary available that can be freely used or anybody has an idea of how to build one?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="9091" PostHistoryTypeId="1" PostId="4581" RevisionGUID="39725317-1afa-4ea1-be05-563d1858a6f6" CreationDate="2010-10-18T04:19:41.560" UserId="2248" Text="Dictionary of words for a bookworm-like game" />
  <row Id="9092" PostHistoryTypeId="3" PostId="4581" RevisionGUID="39725317-1afa-4ea1-be05-563d1858a6f6" CreationDate="2010-10-18T04:19:41.560" UserId="2248" Text="&lt;assets&gt;" />
  <row Id="9093" PostHistoryTypeId="2" PostId="4582" RevisionGUID="91369858-281a-4233-a361-c8bcb56be671" CreationDate="2010-10-18T04:33:20.540" UserId="2100" Text="The following site is attempting to accumulate links to different open dictionary projects. If I understand what they're doing correctly, they are offering dictionary packages that you could potentially download and read with your application. Hopefully this leads you in a helpful direction.&#xD;&#xA;&#xD;&#xA;[Open Dictionary Databases][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.okfn.org/2009/07/21/open-dictionary-databases-an-overview/" />
  <row Id="9094" PostHistoryTypeId="2" PostId="4583" RevisionGUID="f9e8f35d-b453-4c09-aa2f-16d86bc16809" CreationDate="2010-10-18T06:18:28.823" UserId="919" Text="Compulsion loops is one way to do it.But do note they only work to a certain degree relative to interest and attention span of a player. &#xD;&#xA;&#xD;&#xA;Also there is no proven formula to appeal to all except the general rule of making a fun game which can also be subjective. This is probably because to be human usually means to be very varied in taste and behavior.&#xD;&#xA;&#xD;&#xA;Note: I do believe this answer borders to the dark side of game design. =p&#xD;&#xA;&#xD;&#xA; " />
  <row Id="9095" PostHistoryTypeId="4" PostId="4581" RevisionGUID="ea0d7df8-dad5-4101-a72c-cda4b70aad3a" CreationDate="2010-10-18T08:24:51.737" UserId="744" Comment="Retitle to avoid confusion with &quot;How should I store a dictionary of words in memory?&quot;" Text="Where can I find a free dictionary of words?" />
  <row Id="9096" PostHistoryTypeId="2" PostId="4584" RevisionGUID="90b6a700-cf4b-4244-aca8-347550dbdf93" CreationDate="2010-10-18T09:06:15.583" UserId="1141" Text="The [Moby project][1] is the biggest one I know of. It's also the source for Fedora's &quot;words&quot; package for example, at least in English.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://icon.shef.ac.uk/Moby/" />
  <row Id="9097" PostHistoryTypeId="2" PostId="4585" RevisionGUID="4d7a550b-b113-427e-ad2d-a0f286d6b7e6" CreationDate="2010-10-18T09:38:13.637" UserId="1251" Text="I've been programming games for a long time now.Started doing tic tac toe, breakout,pong etc..when I was in school.Now,till date the most advanced game I've made is a 8-ball pool game made with the physics engine Box2dFlashAS3 and a platform game with levels.&#xD;&#xA;When I did platform games, I've always wished if &quot;I knew&quot;  how to make an engine, so that I could re-use it. When I see games that have slopes , curved slopes, perfect gravity and real-life physics, I've always wished I knew how to &quot;code&quot; the engine.&#xD;&#xA;Please suggest me techniques and also include links and articles to whatever relevant knowledge-base is necessary.&#xD;&#xA;Well,when replying, please write down the answers point-wise." />
  <row Id="9098" PostHistoryTypeId="1" PostId="4585" RevisionGUID="4d7a550b-b113-427e-ad2d-a0f286d6b7e6" CreationDate="2010-10-18T09:38:13.637" UserId="1251" Text="How to build a custom 2d Physics Engine" />
  <row Id="9099" PostHistoryTypeId="3" PostId="4585" RevisionGUID="4d7a550b-b113-427e-ad2d-a0f286d6b7e6" CreationDate="2010-10-18T09:38:13.637" UserId="1251" Text="&lt;game-design&gt;&lt;2d-physics&gt;&lt;physics-engine&gt;" />
  <row Id="9100" PostHistoryTypeId="5" PostId="3669" RevisionGUID="60426c88-fbfd-4d89-8158-483213f76956" CreationDate="2010-10-18T10:02:03.330" UserId="1629" Comment="Fixed new-&gt;newVS" Text="Do not attempt to replicate the whole game state. Interpolating it would be a nightmare. Just isolate the parts which are variable and needed by rendering (let us call this a &quot;Visual State&quot;).&#xD;&#xA;&#xD;&#xA;For each object class create an accompanying class which will be able to hold the object Visual State. This object will be produced by the simulation, and consumed by the rendering. The interpolation will easily plug in between. If the state is immutable and passed by value, you will have no threading issues.&#xD;&#xA;&#xD;&#xA;The rendering usually does not need to know anything about logical relations between the objects, therefore the structure used for the rendering will be a plain vector, or at most a simple tree.&#xD;&#xA;&#xD;&#xA;##Example&#xD;&#xA;&#xD;&#xA;###Traditional design&#xD;&#xA;&#xD;&#xA;    class Actor&#xD;&#xA;    {&#xD;&#xA;      Matrix4x3 position;&#xD;&#xA;      float fuel;&#xD;&#xA;      float armor;&#xD;&#xA;      float stamina;&#xD;&#xA;      float age;&#xD;&#xA;    &#xD;&#xA;      void Simulate(float deltaT)&#xD;&#xA;      {&#xD;&#xA;        age += deltaT;&#xD;&#xA;        armor -= HitByAWeapon();&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;###Using Visual state&#xD;&#xA;    class IVisualState&#xD;&#xA;    {&#xD;&#xA;      public:&#xD;&#xA;      virtual void Interpolate(const IVisualState &amp;newVS, float f) {}&#xD;&#xA;    };&#xD;&#xA;    class Actor&#xD;&#xA;    {&#xD;&#xA;      struct VisualState: public IVisualState&#xD;&#xA;      {&#xD;&#xA;        Matrix4x3 position;&#xD;&#xA;        float fuel;&#xD;&#xA;        float armor;&#xD;&#xA;        float stamina;&#xD;&#xA;        float age;&#xD;&#xA;&#xD;&#xA;        virtual auto_ptr&lt;IVisualState&gt; Interpolate(const IVisualState &amp;newVS, float f)&#xD;&#xA;        {&#xD;&#xA;          const VisualState &amp;newState = static_cast&lt;const VisualState &amp;&gt;(newVS);&#xD;&#xA;          IVisualState *ret = new VisualState;&#xD;&#xA;          ret-&gt;age = lerp(this-&gt;age,newState.age);&#xD;&#xA;          // ... interpolate other properties as well, using any suitable interpolation method&#xD;&#xA;          // liner, spline, slerp, whatever works best for the given property&#xD;&#xA;          return ret;&#xD;&#xA;        };&#xD;&#xA;      };&#xD;&#xA;    &#xD;&#xA;      auto_ptr&lt;VisualState&gt; state_;&#xD;&#xA;    &#xD;&#xA;      void Simulate(float deltaT)&#xD;&#xA;      {&#xD;&#xA;        state_-&gt;age += deltaT;&#xD;&#xA;        state_-&gt;armor -= HitByAWeapon();&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9101" PostHistoryTypeId="2" PostId="4586" RevisionGUID="e769020a-4063-4fe0-a326-38b44958308c" CreationDate="2010-10-18T10:54:22.223" UserId="2144" Text="I think this could be useful: http://gafferongames.com/game-physics/integration-basics/" />
  <row Id="9102" PostHistoryTypeId="2" PostId="4587" RevisionGUID="ecc14d0a-1da3-4f0f-b59f-37035c62e852" CreationDate="2010-10-18T11:27:16.283" UserId="744" Text="Erin Catto has &lt;a href=&quot;http://code.google.com/p/box2d/downloads/list&quot;&gt;all the GDC lectures about Box2D's implementation&lt;/a&gt; online. Box2D also has straightforward code to read, in my experience." />
  <row Id="9103" PostHistoryTypeId="6" PostId="4253" RevisionGUID="76586db5-60bd-4757-bbfb-d48e2ecdba72" CreationDate="2010-10-18T12:09:01.367" UserId="252" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;physics&gt;" />
  <row Id="9105" PostHistoryTypeId="2" PostId="4589" RevisionGUID="65529630-884d-42e9-a115-500c87fde3d6" CreationDate="2010-10-18T12:37:36.983" UserId="20" Text="I think this article perfectly answers the question :)&#xD;&#xA;&#xD;&#xA;http://www.cracked.com/article_18461_5-creepy-ways-video-games-are-trying-to-get-you-addicted_p1.html" />
  <row Id="9106" PostHistoryTypeId="2" PostId="4590" RevisionGUID="105aad11-1f88-4713-9f79-6447aaef1b8e" CreationDate="2010-10-18T13:35:54.377" UserId="2156" Text="As you all know, Apple recently change the terms for app developers using 3rd dev tools.&#xD;&#xA;&#xD;&#xA;I'm wondering how could Apple know whether an app is made with a specific technology like Flash or Unity or GameSalad or any other engines out there?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9107" PostHistoryTypeId="1" PostId="4590" RevisionGUID="105aad11-1f88-4713-9f79-6447aaef1b8e" CreationDate="2010-10-18T13:35:54.377" UserId="2156" Text="How can Apple know how an iOS game is made?" />
  <row Id="9108" PostHistoryTypeId="3" PostId="4590" RevisionGUID="105aad11-1f88-4713-9f79-6447aaef1b8e" CreationDate="2010-10-18T13:35:54.377" UserId="2156" Text="&lt;flash&gt;&lt;iphone&gt;&lt;unity&gt;" />
  <row Id="9109" PostHistoryTypeId="2" PostId="4591" RevisionGUID="d8322f97-f7ae-4c73-bb4d-35d42ff9092f" CreationDate="2010-10-18T14:01:16.063" UserId="33" Text="I would recommend you to read [A Theory of Fun for Game Design][1], written by Raph Koster, an experienced game designer who started as a writer.&#xD;&#xA;&#xD;&#xA;He basically proposes that we humans are living things that love watching and learning patterns everywhere. We basically want to get better at things, and games are a powerful learning tool. Games offer simple mechanisms that add themselves up to enable players to do really complex stuff (e.g. see how a player who loves playing fighting games learns to play those games).&#xD;&#xA;&#xD;&#xA;What makes a player to return to a game? A fun mechanism is vital, but there is also another ingredient. Remember when you learned how to play Tic-tac-toe? it was a pretty fun game until you understood how to play it, and what strategies you used to win or tie every time. When we begin doing any activity (being playing a game, playing an instrument, painting, etc.) we start to do exactly that: learn what are the best strategies to do best what we like to do. If the activity is simple enough to know those strategies quickly, then that activity becomes boring. If the activity is too complex, we also get bored and we opt out of it.&#xD;&#xA;&#xD;&#xA;So there are two extremes, see? assuming that we like what we are doing, if it's very simple, we will get bored quickly because our brain concludes that it took everything he needed and can predict now the next steps. If it's very complex, we will also get bored because we are unable to grasp the concepts that enables us to win the game/paint nicely/play clarinet beautifully.&#xD;&#xA;&#xD;&#xA;So games are especialized in that: they present an activity with a carefully balanced difficulty setting, so the game is easy on us when we learn the controls, but as we gain experience playing it, the difficulty keeps rising and rising.&#xD;&#xA;&#xD;&#xA;When we get to this fragile state of mind, we call that being &quot;in the zone&quot;. That's an important thing to achieve when designing a game, and watch people who play if they're in the zone, whether they're playing WoW or minesweeper.&#xD;&#xA;&#xD;&#xA;You should also read the [Princess Rescuing Application slides][2], by Daniel Cook, which also present an insight on how games trap us.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.theoryoffun.com/&#xD;&#xA;  [2]: http://www.lostgarden.com/2008/10/princess-rescuing-application-slides.html" />
  <row Id="9110" PostHistoryTypeId="5" PostId="4572" RevisionGUID="2011e233-3afe-407e-85e5-ebd93aff8973" CreationDate="2010-10-18T14:51:09.620" UserId="2522" Comment="edited body" Text="Im asking here since people would be experienced in different areas more, but I don't know whether I should go online or campus since the closest college that offers game programming degree is in a different state 6 hours away so any advise?" />
  <row Id="9111" PostHistoryTypeId="5" PostId="4562" RevisionGUID="3f6921e7-8ca1-46d8-b2a1-a57508913956" CreationDate="2010-10-18T14:54:42.900" UserId="2289" Comment="added 121 characters in body" Text="In my game, I have a base Note class, and various subclasses of Note. In addition, I have a NoteCollection class which contains a collection of these Note objects and draws them to the screen. Normally, I'd just do something like this in NoteCollection:&#xD;&#xA;&#xD;&#xA;    public override Draw(GameTime gametime) {&#xD;&#xA;        ...&#xD;&#xA;        spriteBatch.Begin(...);&#xD;&#xA;        foreach(Note n in notes)&#xD;&#xA;            n.Draw(gameTime);&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However, some of these Note subclasses also need to draw 3D primitives in their Draw() methods. I imagine setting vertex buffers in the middle of a SpriteBatch Begin()/End() block isn't a good idea (I've tried it, anyways). What would be nice would be a SpriteBatch.Pause() method that would save the state of the SpriteBatch, and then you could resume drawing your sprites with, say, a SpriteBatch.Resume(). But alas, there's no much methods.&#xD;&#xA;&#xD;&#xA;In short, is there any way to go about this? I'd rather not call SpriteBatch.End()/Begin() from each Note.Draw(), as it'd be really slow and I wouldn't necessarily know what parameters the original outside Begin() was called with.&#xD;&#xA;&#xD;&#xA;**EDIT**: Even though I'm using 3D primitives, my game is still in 2D. All of the Z-coordinates of my vertices are 0." />
  <row Id="9112" PostHistoryTypeId="2" PostId="4592" RevisionGUID="dfbc7414-9cd1-4d83-b78d-a497ab17f4d3" CreationDate="2010-10-18T17:01:39.983" UserId="2567" Text="Flash tutorials and examples have been around so long it is hard to know what sites to actually read for good, current AS3 game dev.&#xD;&#xA;&#xD;&#xA;I'm looking for a good start to finish for flash game development, covering things such as:&#xD;&#xA;&#xD;&#xA;Preloader (when to use, how to implement)&#xD;&#xA;UI (AS3 only, no FLEX)&#xD;&#xA;OOP architecture.  (I come from C++/C# world)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm just trying to create a simple game, sort of an &quot;escape the room&quot; style." />
  <row Id="9113" PostHistoryTypeId="1" PostId="4592" RevisionGUID="dfbc7414-9cd1-4d83-b78d-a497ab17f4d3" CreationDate="2010-10-18T17:01:39.983" UserId="2567" Text="AS3/Flash Game Dev:  Looking for good &amp; current step by step." />
  <row Id="9114" PostHistoryTypeId="3" PostId="4592" RevisionGUID="dfbc7414-9cd1-4d83-b78d-a497ab17f4d3" CreationDate="2010-10-18T17:01:39.983" UserId="2567" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;tutorials&gt;" />
  <row Id="9115" PostHistoryTypeId="2" PostId="4593" RevisionGUID="17cfbc25-e69c-46dd-b35d-5bbe22327b78" CreationDate="2010-10-18T17:08:08.160" UserId="2290" Text="Thought Process&#xD;&#xA;----&#xD;&#xA;Rather than showing the implementation, this answer will walk you through the thought process used to design a basic 2D car without steering.  Each of the headings below (behaviors, variables, and formulas) represent a portion of the thought process, and the car’s implementation.&#xD;&#xA;&#xD;&#xA;Note: All the &quot;code&quot; is pseudo-code.&#xD;&#xA;&#xD;&#xA;Behaviors&#xD;&#xA;----&#xD;&#xA;To start, we need to think about what high-level behaviors we’d like our car object to exhibit. These behaviors give insight into the methods that will need to be implemented. The key behaviors for our car are:&#xD;&#xA;&#xD;&#xA; - Starting at a defined position, with zero velocity&#xD;&#xA; - Adjusting velocity based on player input (accelerate and break), and modifying the car’s position&#xD;&#xA;&#xD;&#xA;Members&#xD;&#xA;----&#xD;&#xA;The next thing we need to do is look at our behaviors and think about what pieces of information they’ll need to share with each other. These pieces of information will be our class’s member variables. The members  for our car are:&#xD;&#xA;&#xD;&#xA; - It’s position (xPos, yPos)&#xD;&#xA; - It’s velocity (xVel, yVel)&#xD;&#xA;&#xD;&#xA;Formulas&#xD;&#xA;----&#xD;&#xA;Finally, we use our formulas (which utilize our members), to define the behaviors we listed earlier.&#xD;&#xA;&#xD;&#xA;**Start at a defined position, with zero velocity**&#xD;&#xA;&#xD;&#xA;    (xPos, yPos) = (starX, startY)&#xD;&#xA;    (xVel, yVel) = (0,0)&#xD;&#xA;&#xD;&#xA;**Adjust velocity based on player input**&#xD;&#xA;	&#xD;&#xA;    // acceleratedX/Y represents the acceleration/deceleration amount&#xD;&#xA;    (xVel, yVel) += (acceleratedX, acceleratedY)&#xD;&#xA;&#xD;&#xA;**Simulate drag to slow the car down**&#xD;&#xA;&#xD;&#xA;    (xVel, yVel) -= (drag,drag)&#xD;&#xA;&#xD;&#xA;**Make sure we don't go in reverse!**&#xD;&#xA;&#xD;&#xA;    if (xVel &lt; 0) { xVel = 0 }&#xD;&#xA;    if (yVel &lt; 0) { yVel = 0 }&#xD;&#xA;&#xD;&#xA;And our car should work! :D" />
  <row Id="9116" PostHistoryTypeId="2" PostId="4594" RevisionGUID="7c8c3a89-63e7-4c58-a490-72ce7a849ed6" CreationDate="2010-10-18T17:13:11.330" UserId="1134" Text="A simple (but not foolproof) way might be to use the [`strings`][1] utility to examine the binary for known strings: version stamps, error messages, etc.&#xD;&#xA;&#xD;&#xA;If symbols aren't entirely stripped (not likely in a submitted build) you can use something like `nm` or `objdump` or the like to see the names of symbols.  Some symbol names may be a good indication that a particular tool, compiler, library, or framework was used.&#xD;&#xA;&#xD;&#xA;You could look for machine code or data headers that are known to correspond to a specific version of a compiler, library, or tool.&#xD;&#xA;&#xD;&#xA;You could suspend the app and scan its memory region, potentially, to do similar checks, looking for known patterns (akin to the way a virus scanner might work).&#xD;&#xA;&#xD;&#xA;Of course there are a number of ways to attempt to guard an app against such checks.  For example, you could compress and/or encrypt the majority of the executable and/or data.  But if your app can decrypt it, likely so can an investigator...&#xD;&#xA;&#xD;&#xA;I'd imagine they don't bother investigating unless they have reason to.  They might potentially automate some of these checks if they really cared, but these checks might only flag the obvious uses of the tech...&#xD;&#xA;&#xD;&#xA;  [1]: http://www.manpagez.com/man/1/strings/" />
  <row Id="9117" PostHistoryTypeId="2" PostId="4595" RevisionGUID="665f6efe-524e-404a-ad8b-6104dc301843" CreationDate="2010-10-18T17:39:07.493" UserId="20" Text="If you don't mind using a Flash-Game-Framework such as [FlashPunk][1] or [Flixel][2], I suggest you have a look at the [Flash Game Dojo][3]. It's not a very extensive site, but a good place to start.&#xD;&#xA;&#xD;&#xA;  [1]: http://flashpunk.net/&#xD;&#xA;  [2]: http://flixel.org/&#xD;&#xA;  [3]: http://flashgamedojo.com/" />
  <row Id="9118" PostHistoryTypeId="2" PostId="4596" RevisionGUID="4694f937-4b46-46f6-858f-316d31657111" CreationDate="2010-10-18T17:45:52.760" UserId="1134" Text="While I recommend *against* rolling your own physics engine for anything other than the experience of doing it (just realize you probably should throw it away when you're done -- it's really hard to get all the edgecases and numeric limit/stability issues sorted out, and your time may be much better used by contributing to an existing engine), here are a few resources:&#xD;&#xA;&#xD;&#xA;[Pool Hall Lessons: Fast, Accurate Collision Detection Between Circles or Spheres][1] discusses circle/circle and sphere/sphere collision.&#xD;&#xA;&#xD;&#xA;The [N Tutorials][2] are wonderful for a basic understanding of Separating Axis Theorem-based detection and response.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php&#xD;&#xA;  [2]: http://www.metanetsoftware.com/technique.html" />
  <row Id="9119" PostHistoryTypeId="5" PostId="4569" RevisionGUID="cb6d1d9f-4496-4505-9256-ac131d531c21" CreationDate="2010-10-18T18:20:32.800" UserId="51" Comment="deleted 31 characters in body; edited title" Text="I'm not good in math so I'm here to ask you how to manage, in a simple 2d game, the car acceleration and braking. &#xD;&#xA;&#xD;&#xA;I'm trying to develop it (as a hobby) in c# and sdl.net.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9120" PostHistoryTypeId="4" PostId="4569" RevisionGUID="cb6d1d9f-4496-4505-9256-ac131d531c21" CreationDate="2010-10-18T18:20:32.800" UserId="51" Comment="deleted 31 characters in body; edited title" Text="Car (or other &quot;object&quot;) acceleration and braking: how to? " />
  <row Id="9122" PostHistoryTypeId="2" PostId="4598" RevisionGUID="06118783-f2e4-4be1-bc44-55ac4678b315" CreationDate="2010-10-18T18:35:52.107" UserId="2494" Text="as i told in previous question, i'm using SDL.NET (wrapper in C# of SDL). Unfortunately the API website is down so i'm trying to learn it by myself. &#xD;&#xA;I would like simply to print text on my screen / surface ... i don't know how to do!&#xD;&#xA;&#xD;&#xA;My goal is to print variable status/values, to &quot;debug&quot; directly on the run and on the screen (in the lower corner for example).&#xD;&#xA;Can somebody help me ?&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="9123" PostHistoryTypeId="1" PostId="4598" RevisionGUID="06118783-f2e4-4be1-bc44-55ac4678b315" CreationDate="2010-10-18T18:35:52.107" UserId="2494" Text="How to simply print (write) text on a Surface in SDL.NET ?" />
  <row Id="9124" PostHistoryTypeId="3" PostId="4598" RevisionGUID="06118783-f2e4-4be1-bc44-55ac4678b315" CreationDate="2010-10-18T18:35:52.107" UserId="2494" Text="&lt;libraries&gt;" />
  <row Id="9125" PostHistoryTypeId="2" PostId="4599" RevisionGUID="fdd2ed03-a336-41e4-a65f-9c906e31d6c4" CreationDate="2010-10-18T18:38:13.003" UserId="1156" Text="[This one][1] seems pretty nice, though I don't know about compared to others.&#xD;&#xA;&#xD;&#xA;Seems to be in an easily parsable and readable format too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/tutorial/collections/interfaces/examples/dictionary.txt" />
  <row Id="9126" PostHistoryTypeId="2" PostId="4600" RevisionGUID="dcf32d2f-edf0-4cb7-82b6-e342ab4d7a4e" CreationDate="2010-10-18T18:55:57.443" UserId="2494" Text="Ok, i found the solution on an example project: &#xD;&#xA;&#xD;&#xA;    SdlDotNet.Graphics.Font myfont = new SdlDotNet.Graphics.Font(&quot;arial.ttf&quot;,12);&#xD;&#xA;    Point dest = new Point(600,400);            &#xD;&#xA;    surfVar = myfont.Render(&quot;Values: &quot;,Color.White);&#xD;&#xA;    Video.Screen.Blit(surfVar,dest);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9127" PostHistoryTypeId="2" PostId="4601" RevisionGUID="465f059c-6f89-4d8d-8529-ef664a6f5a02" CreationDate="2010-10-18T18:56:16.643" UserId="395" Text="http://forums.tigsource.com/index.php?topic=8531.0 has an example of using Graphics.Font to render text to a surface (which is a wrapper for SDL_ttf I think). Basically you load a TTF font into a Font object and then use .Render on that to make a surface from a given string." />
  <row Id="9128" PostHistoryTypeId="2" PostId="4602" RevisionGUID="a103098a-20b2-4851-a6ef-6dca9f504ea3" CreationDate="2010-10-18T19:09:48.080" UserId="228" Text="Door number 3...  Component registers itself in GameSubsystem(s) &#xD;&#xA;&#xD;&#xA;The component is in place to keep the coupling abstracted from the GameObject itself.  Somehow, somewhere something does in fact need to interact with the subsystems and this is the component and its purpose.  &#xD;&#xA;&#xD;&#xA;The coupling isn't actually a bad thing in this case.&#xD;&#xA;&#xD;&#xA;The performance is essentially *required* in this case if you expect to have any complexity in your system, you just can't afford the search style approaches of the other options.&#xD;&#xA;&#xD;&#xA;Finally if one subsystem needs to be reactive to another (renderer, physics, audio all need to do stuff when something happens) the components can facilitate this with each other through the game object and keep this particular type of cross system-coupling managable through the components.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9129" PostHistoryTypeId="5" PostId="4572" RevisionGUID="62776f50-f0a3-41ab-a46e-fd89b2c20df8" CreationDate="2010-10-18T20:07:27.023" UserId="51" Comment="rewrote the question to fix " Text="I don't know whether I should go online for my game programming degree or to be on campus.  The closest college that offers game programming degree is in a different state 6 hours away.  Any advice?" />
  <row Id="9130" PostHistoryTypeId="4" PostId="4572" RevisionGUID="62776f50-f0a3-41ab-a46e-fd89b2c20df8" CreationDate="2010-10-18T20:07:27.023" UserId="51" Comment="rewrote the question to fix " Text="Do online colleges give you the same experience needed for programming or is it better to go on campus?" />
  <row Id="9134" PostHistoryTypeId="2" PostId="4603" RevisionGUID="3014ecee-f86f-430a-9577-10907063fdae" CreationDate="2010-10-18T21:09:11.243" UserDisplayName="McThrustin" Text="I'm getting back into hobby game programming after a long 4-year hiatus from college and I find that my understanding of coordinate systems is somewhat lacking.&#xD;&#xA;&#xD;&#xA;I'm trying my skills at creating a simple skeletal animation system but I'm having a hard time wrapping my head around converting local coordinates (of say, a joint) to world coordinates, particularly when it comes to rotated sprites.&#xD;&#xA;&#xD;&#xA;I'm trying to create a test app in XNA and accomplish this using their built-in matrix class.  Can anyone assist me in either linking a resource or helping me understand the operations I'd need to do to convert any point that is Scaled/Rotated/Translated from a local to a world coordinate and back?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9135" PostHistoryTypeId="1" PostId="4603" RevisionGUID="3014ecee-f86f-430a-9577-10907063fdae" CreationDate="2010-10-18T21:09:11.243" UserDisplayName="McThrustin" Text="Local to World coordinates in 2D and back." />
  <row Id="9136" PostHistoryTypeId="3" PostId="4603" RevisionGUID="3014ecee-f86f-430a-9577-10907063fdae" CreationDate="2010-10-18T21:09:11.243" UserDisplayName="McThrustin" Text="&lt;2d&gt;&lt;xna&gt;&lt;math&gt;&lt;education&gt;" />
  <row Id="9137" PostHistoryTypeId="2" PostId="4604" RevisionGUID="96ecf460-6220-4010-8ffc-2f69f6a8fbf5" CreationDate="2010-10-18T21:12:53.497" UserDisplayName="lolmaster" Text="As the title mentions, I'm looking to get the palette of an 8bit surface in SDL.NET if possible, or (more than likely) using Tao.SDL. This is because I want to do palette swapping with the palette directly, instead of blitting surfaces together to replace colours like how you would do it with a 32bit surface. I posted this on the official SDL.NET forums, however it seems like they aren't very active, and I haven't gotten a reply yet.&#xD;&#xA;&#xD;&#xA;I've gotten the SDL_Surface and the SDL_PixelFormat, however when I go to get the palette in the same way, I get a System.ExecutionEngineException:&#xD;&#xA;&#xD;&#xA;    private Tao.Sdl.Sdl.SDL_Palette GetPalette(Surface surf)&#xD;&#xA;    {&#xD;&#xA;&#xD;&#xA;    // Get surface.&#xD;&#xA;    Tao.Sdl.Sdl.SDL_Surface sdlSurface = (Tao.Sdl.Sdl.SDL_Surface)System.Runtime.InteropServices.Marshal.PtrToStructure(surf.Handle,&#xD;&#xA;        typeof(Tao.Sdl.Sdl.SDL_Surface));&#xD;&#xA;&#xD;&#xA;    // Get pixel format.&#xD;&#xA;    Tao.Sdl.Sdl.SDL_PixelFormat pixelFormat = (Tao.Sdl.Sdl.SDL_PixelFormat)System.Runtime.InteropServices.Marshal.PtrToStructure(sdlSurface.format,&#xD;&#xA;        typeof(Tao.Sdl.Sdl.SDL_PixelFormat));&#xD;&#xA;&#xD;&#xA;    // Execution exception here.&#xD;&#xA;    Tao.Sdl.Sdl.SDL_Palette palette = (Tao.Sdl.Sdl.SDL_Palette)System.Runtime.InteropServices.Marshal.PtrToStructure(pixelFormat.palette,&#xD;&#xA;        typeof(Tao.Sdl.Sdl.SDL_Palette));&#xD;&#xA;&#xD;&#xA;    return palette;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When I used unsafe code to get the palette, I got a compile time error: &quot;Cannot take the address of, get the size of, or declare a pointer to a managed type ('Tao.Sdl.Sdl.SDL_Palette')&quot;.&#xD;&#xA;&#xD;&#xA;My unsafe code to get the palette was this:&#xD;&#xA;&#xD;&#xA;    unsafe&#xD;&#xA;    {&#xD;&#xA;        Tao.Sdl.Sdl.SDL_Palette* pal = (Tao.Sdl.Sdl.SDL_Palette*)pixelFormat.palette;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;From what I've read, a managed type in this case is when a structure has some sort of reference inside it as a field. The SDL_Palette structure happens to have an array of SDL_Color's, so I'm assuming that's the reference type that is causing issues. However I'm still not sure how to work around that to get the underlying palette.&#xD;&#xA;&#xD;&#xA;So if anyone knows how to get the palette from an 8 bit surface, whether it's through safe or unsafe code, the help would be greatly appreciated." />
  <row Id="9138" PostHistoryTypeId="1" PostId="4604" RevisionGUID="96ecf460-6220-4010-8ffc-2f69f6a8fbf5" CreationDate="2010-10-18T21:12:53.497" UserDisplayName="lolmaster" Text="Getting palette of 8 bit surface in SDL.NET or Tao.SDL" />
  <row Id="9139" PostHistoryTypeId="3" PostId="4604" RevisionGUID="96ecf460-6220-4010-8ffc-2f69f6a8fbf5" CreationDate="2010-10-18T21:12:53.497" UserDisplayName="lolmaster" Text="&lt;c#&gt;&lt;image&gt;&lt;palette&gt;" />
  <row Id="9140" PostHistoryTypeId="2" PostId="4605" RevisionGUID="a2bf0357-5675-4ce0-80be-343043adaf05" CreationDate="2010-10-18T21:16:45.720" UserId="2253" Text="I'm having trouble understanding the benefit of the newer [GL_EXT_draw_instanced][1] over traditional VBO's.  Don't both keep geometry cached on the gpu for faster redrawing?  VBO's seem much more flexible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/registry/specs/EXT/draw_instanced.txt" />
  <row Id="9141" PostHistoryTypeId="1" PostId="4605" RevisionGUID="a2bf0357-5675-4ce0-80be-343043adaf05" CreationDate="2010-10-18T21:16:45.720" UserId="2253" Text="GL_EXT_draw_instanced vs VBO's" />
  <row Id="9142" PostHistoryTypeId="3" PostId="4605" RevisionGUID="a2bf0357-5675-4ce0-80be-343043adaf05" CreationDate="2010-10-18T21:16:45.720" UserId="2253" Text="&lt;opengl&gt;" />
  <row Id="9143" PostHistoryTypeId="2" PostId="4606" RevisionGUID="c9f949c5-4a21-49c6-bbba-5a50191b95ab" CreationDate="2010-10-18T21:54:17.277" UserId="2575" Text="I'm not a dev noob, but definitely never done anything in game dev. There is a trump based card game we play in town that I plan on coding. I'll be either using python/ajax/pyqt or c++/qt. &#xD;&#xA;&#xD;&#xA;My question is as follow, what kind of advice would you give to writing card based games?" />
  <row Id="9144" PostHistoryTypeId="1" PostId="4606" RevisionGUID="c9f949c5-4a21-49c6-bbba-5a50191b95ab" CreationDate="2010-10-18T21:54:17.277" UserId="2575" Text="Writing Logic behind card games " />
  <row Id="9145" PostHistoryTypeId="3" PostId="4606" RevisionGUID="c9f949c5-4a21-49c6-bbba-5a50191b95ab" CreationDate="2010-10-18T21:54:17.277" UserId="2575" Text="&lt;c++&gt;&lt;python&gt;&lt;logic&gt;" />
  <row Id="9146" PostHistoryTypeId="5" PostId="4531" RevisionGUID="8f3e728c-78f0-4856-b3ee-ce3bf07567fc" CreationDate="2010-10-18T22:13:24.833" UserId="1780" Comment="added 446 characters in body" Text="Depending on your location and how awesome an office and benefits you're looking at, (in the US) you can count on $8,000 to $15,000 per developer per month.  This is the fully loaded cost and includes IT and HR costs as well as equipment and other infrastructure.&#xD;&#xA;&#xD;&#xA;For $8000 per person-month, though, you're going to be in a pretty crappy warehouse on the wrong side of the tracks in the middle of nowhere.  In Southern California the range is more like 11-15k per person-month, although some studios may go even higher than that.&#xD;&#xA;&#xD;&#xA;**Edit:** It's worth reiterating even though it's probably obvious.  The above costs do not reflect the salaries alone.  While there are a few people in the US game industry making $150k+, it is rare.  The above numbers are salary plus benefits plus taxes plus facilities and all that jazz.  Health insurance is huge, social security is 7.5% of your salary out of the company's pocket (and another 7.5% comes out of your paycheck), etc., etc." />
  <row Id="9147" PostHistoryTypeId="2" PostId="4607" RevisionGUID="29928fd1-6ba6-49f0-aa4a-a7f9024f8668" CreationDate="2010-10-18T22:27:03.850" UserId="395" Text="AJAX/PyQT? Not sure how that would work out. Card games aren't especially complicated unless you are trying to make some kind of generic card game engine (don't do that). Just don't focus too much on the tech, pick something you are comfortable with and make it fun first. Once it is fun, worry about making it snazzy." />
  <row Id="9148" PostHistoryTypeId="2" PostId="4608" RevisionGUID="9bff66b5-f310-4bd4-8791-d830112a5deb" CreationDate="2010-10-18T22:47:09.557" UserId="2577" Text="Here is a good summary of how to go back and forth between world and local coordinates:&#xD;&#xA;&#xD;&#xA;www.enchantedage.com/xna-transforms&#xD;&#xA;&#xD;&#xA;Here is another good discussion of transforms:&#xD;&#xA;http://gamedev.stackexchange.com/questions/3931/how-to-think-about-2d-scaling-rotation-transformations" />
  <row Id="9149" PostHistoryTypeId="2" PostId="4609" RevisionGUID="96244045-8f6f-451c-82c8-d00f8934391b" CreationDate="2010-10-18T23:07:51.547" UserId="2577" Text="Use an Ellipsoid emitter for your particles.&#xD;&#xA;&#xD;&#xA;There is an example of the Ellipsoid here: http://www.ogre3d.org/tikiwiki/ParticleExampleSun&amp;structure=Cookbook&#xD;&#xA;&#xD;&#xA;Since you want the particles fixed in space, you will need to experiment with the time_to_live, duration, etc." />
  <row Id="9150" PostHistoryTypeId="2" PostId="4610" RevisionGUID="e918db1a-f553-44c1-9bf8-10b297797aae" CreationDate="2010-10-19T02:01:37.323" UserId="2578" Text="What he said in his speech is &quot;...with seven game dynamics you can get anyone to do anything...&quot; there was the implication that there were *only* four more.&#xD;&#xA;Then I did some digging and found: http://techcrunch.com/2010/08/25/scvngr-game-mechanics/&#xD;&#xA;If the site I accessed is at all correct, there are not four more game dynamics - there are **forty four** more (for a total of 47).  &gt;phew&lt;&#xD;&#xA;Instead of listing them all here - just visit the link.  :) " />
  <row Id="9151" PostHistoryTypeId="5" PostId="4576" RevisionGUID="2e8f6b01-615d-4e03-b5d0-734d228b5239" CreationDate="2010-10-19T02:23:09.923" UserId="656" Comment="deleted 1 characters in body" Text="Attending college not only builds your skills as a programmer, it gives you an opportunity to build your social, communication and teamwork skills. Just the social aspect of being with other people is a necessary experience for working in teams inside a company.&#xD;&#xA;&#xD;&#xA;Beware of online school scams, however (same goes for some colleges, but there are alot of online ones which are just scams). They'll take your money, give you a pass and hand you a diploma, but that diploma won't be recognized by any company once you graduate. Be careful!" />
  <row Id="9152" PostHistoryTypeId="2" PostId="4611" RevisionGUID="663a7812-5c1a-4060-9175-33ece4a3d825" CreationDate="2010-10-19T04:06:59.923" UserId="2253" Text="I started by having three copies of the game state of each node in my scene graph.  One is being written to by the scene graph thread, one is being read by the renderer, and a third is available for reading/writing as soon as one of those needs to swap.  This worked well, but was over complicated.&#xD;&#xA;&#xD;&#xA;I then realized I only need to keep three states of what was going to be rendered.  My update thread now fills one of three much smaller buffers of &quot;RenderCommands&quot;, and the Renderer reads from the newest buffer that's not currently being written to, which prevents the threads from ever waiting on one another.&#xD;&#xA;&#xD;&#xA;In my setup, each RenderCommand has the 3d geometry/materials, a transformation matrix, and a list of lights that affect it (still doing forward rendering).&#xD;&#xA;&#xD;&#xA;My render thread no longer has to do any culling or light distance calculations, and this sped things up considerably on large scenes." />
  <row Id="9153" PostHistoryTypeId="2" PostId="4612" RevisionGUID="22f1006b-ad5c-446d-a030-970916c8e16d" CreationDate="2010-10-19T04:23:04.213" UserId="2290" Text="I'm not really sure what card game you're trying to create, but here are the general steps I would go through:&#xD;&#xA;&#xD;&#xA; 1. **Write the rules down on paper** -  Write the rules down in bullet format. This will get your brain thinking about the logic, and will provide you with a handy reference to use later on.&#xD;&#xA; 2. **Rewrite the rules to follow the programmatic flow** - Keep the rules in bullet format, but reorder and indent them, so they form an outline of the programmatic flow.&#xD;&#xA; 3. **Write the pseudo-code** - Using your outline as reference, write out the pseudo code.&#xD;&#xA; 4. **Create the classes** - Make a list of classes you'll need, based on your pseudo code, and implement them.&#xD;&#xA; 5. **Replace your pseudo-code with code**&#xD;&#xA;&#xD;&#xA;The process is a little slow, but it has a number of benefits to someone in your situation:&#xD;&#xA;&#xD;&#xA; - Each step creates documentation that can be referenced in future steps&#xD;&#xA; - You have multiple opportunities to catch mistakes in your logic before you ever touch code&#xD;&#xA; - It's very easy to see how logic should breakdown into code&#xD;&#xA;&#xD;&#xA;Best of luck on your programming adventure! If you have any questions or something seems unclear, let me know. :)" />
  <row Id="9154" PostHistoryTypeId="2" PostId="4613" RevisionGUID="b4c7a1cc-bec4-4c09-bb82-fff1d9ea527b" CreationDate="2010-10-19T05:42:25.867" UserId="1091" Text="The advantage to instancing is to allow multiple objects to be drawn in a single draw-call, reducing the overhead of calling the API.&#xD;&#xA;&#xD;&#xA;Typically as well as the geometry, you would also have a buffer containing multiple transforms, and perhaps other per-object data. This could be used in the shader to vary the appearance of each object by modifying its colour, or using a different texture (generally the texture variations would be achieved by using a texture atlas to pack multiple textures into a single texture).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9155" PostHistoryTypeId="2" PostId="4614" RevisionGUID="6ce9c219-96cb-4f1c-ae8d-f686f14ec30c" CreationDate="2010-10-19T06:44:42.600" UserId="2290" Text="Kongregate's [&quot;Shootorials&quot;][1] (shooting tutorials) are second to none! They walk you through the process of creating a side-scrolling space shooter from start to finish (they even provide all the assets!). The tutorials were originally written for AS2, but they do provide a link to the AS3 source code [here][2], and a mobile version written in AS3 [here][3]. I found that going through the tutorials and looking at the AS3 source code was enough for me to understand what was going on, so I'm sure you'll be able to pick it up in no time. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kongregate.com/labs&#xD;&#xA;  [2]: http://cdn2.kongregate.com/assets/files/0000/1183/shoot-as3.zip&#xD;&#xA;  [3]: http://cdn2.kongregate.com/assets/files/0000/1420/shoot_mobile.zip" />
  <row Id="9156" PostHistoryTypeId="2" PostId="4615" RevisionGUID="5f099d46-295e-4bb6-aef5-a0548b822421" CreationDate="2010-10-19T07:07:10.513" UserId="2538" Text="[Wyvern][1] is written in Java (and also some Jython, which is Python on the JVM).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cabochon.com/" />
  <row Id="9157" PostHistoryTypeId="2" PostId="4616" RevisionGUID="607c49ad-782a-4be9-8d47-f75673a4f8b7" CreationDate="2010-10-19T07:56:44.423" UserId="1495" Text="In order to detect and reproduce bugs in an MMO, recording game sessions can help.&#xD;&#xA;&#xD;&#xA;How can such recording and replay of the data be implemented to be accurate, i.e. be 100% deterministic / produce exactly the same result on each replay?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;In particular, consider **timing issues**:&#xD;&#xA;&#xD;&#xA;If run-time for computations on playback differ from the run-times when recorded, frame times will also differ and can for example affect the movement of NPC units (move 3px instead of 1px).&#xD;&#xA;&#xD;&#xA;How to make sure that in the replay AI has the same time constraints compared to when recorded? Fixed time-step? Record the time deltas between each frame and on replay make sure those deltas determine the actual frame time?&#xD;&#xA;&#xD;&#xA;*The MMO in question is mainly I/O driven (act on incoming network messages plus simple periodic AI), and is in 2D. C++ and Lua, RDBMS for storage*" />
  <row Id="9158" PostHistoryTypeId="1" PostId="4616" RevisionGUID="607c49ad-782a-4be9-8d47-f75673a4f8b7" CreationDate="2010-10-19T07:56:44.423" UserId="1495" Text="Accurately record and play back game sessions in an MMO - timing issues?" />
  <row Id="9159" PostHistoryTypeId="3" PostId="4616" RevisionGUID="607c49ad-782a-4be9-8d47-f75673a4f8b7" CreationDate="2010-10-19T07:56:44.423" UserId="1495" Text="&lt;mmo&gt;&lt;testing&gt;&lt;game-recording&gt;" />
  <row Id="9160" PostHistoryTypeId="2" PostId="4617" RevisionGUID="78ec4924-d75b-45c6-8a3d-23b60e7af053" CreationDate="2010-10-19T08:26:26.270" UserId="249" Text="For a number of reasons I'd recommend running such a game at a fixed framerate when it comes to updates. Rendering can run variable framerate using interpolation or extrapolation.&#xD;&#xA;&#xD;&#xA;Other than that, I'm not sure what's what in your system. Is it the client or the server you're talking about here? I'll assume the client since you're talking pixel values, but can't work out how that relates to the server. How often are you sending updates? It'd be a reasonable goal to keep things deterministic between network data updates and input, ie if you save those two input streams and replay them you get exactly the same result." />
  <row Id="9161" PostHistoryTypeId="5" PostId="4616" RevisionGUID="b802a2f0-16bb-4fc1-8d1e-504699e2145e" CreationDate="2010-10-19T08:45:56.747" UserId="1495" Comment="added 14 characters in body; added 96 characters in body" Text="In order to detect and reproduce bugs in an MMO, recording game sessions on the server can help.&#xD;&#xA;&#xD;&#xA;How can such recording and replay of the data be implemented to be accurate, i.e. be 100% deterministic / produce exactly the same result on each replay?&#xD;&#xA;&#xD;&#xA;*The MMO in question is mainly I/O driven (act on incoming network messages plus simple periodic AI), and is in 2D. C++ and Lua, RDBMS for storage.&#xD;&#xA;I intend to record timestamped incoming messages as the only data necessary, if possible.*&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;In particular, consider **timing issues**:&#xD;&#xA;&#xD;&#xA;If run-time for computations on playback differ from the run-times when recorded, frame times will also differ and can for example affect the movement of NPC units (move 3px instead of 1px).&#xD;&#xA;&#xD;&#xA;How to make sure that in the replay AI has the same time constraints compared to when recorded? Fixed time-step? Record the time deltas between each frame and on replay make sure those deltas determine the actual frame time?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9162" PostHistoryTypeId="5" PostId="4616" RevisionGUID="5c5829b0-7c7d-4137-bc29-881bd01dd8df" CreationDate="2010-10-19T08:51:20.800" UserId="1495" Comment="added 4 characters in body; deleted 2 characters in body" Text="In order to detect and reproduce bugs in an MMO, recording game sessions **on the server** can help.&#xD;&#xA;&#xD;&#xA;How can such recording and replay of the data be implemented to be accurate, i.e. be 100% deterministic / produce exactly the same result on each replay?&#xD;&#xA;&#xD;&#xA;The MMO in question is mainly I/O driven (act on incoming network messages plus simple periodic AI), and is in 2D. C++ and Lua, RDBMS for storage.&#xD;&#xA;I intend to record timestamped incoming messages as the only data necessary, if possible.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;In particular, consider **timing issues**:&#xD;&#xA;&#xD;&#xA;If run-time for computations on playback differ from the run-times when recorded, frame times will also differ and can for example affect the movement of NPC units (move 3px instead of 1px).&#xD;&#xA;&#xD;&#xA;How to make sure that in the replay AI has the same time constraints compared to when recorded? Fixed time-step? Record the time deltas between each frame and on replay make sure those deltas determine the actual frame time?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9163" PostHistoryTypeId="5" PostId="4616" RevisionGUID="efaf0447-c2e1-45dd-bde1-d7a1d2b23a02" CreationDate="2010-10-19T08:58:28.453" UserId="1495" Comment="More clarifications on what my intentions are" Text="In order to detect and reproduce bugs in an MMO, recording game sessions **on the server** can help.&#xD;&#xA;&#xD;&#xA;How can such recording and replay of the data be implemented to be accurate, i.e. be 100% deterministic / produce exactly the same result on each replay?&#xD;&#xA;&#xD;&#xA;I intend to record timestamped incoming messages as the only data necessary, if possible.&#xD;&#xA;The playback would use the database snapshot as present at the beginning of the recording.&#xD;&#xA;&#xD;&#xA;Details about the MMO &#xD;&#xA;&#xD;&#xA;- mainly I/O driven (act on incoming network messages plus simple periodic AI) &#xD;&#xA;- 2D&#xD;&#xA;- C++ and Lua, RDBMS for storage.&#xD;&#xA;- Clients send updates at around 1-3 times per second due to the simple nature of the MMO&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;In particular, consider **timing issues**:&#xD;&#xA;&#xD;&#xA;If run-time for computations on playback differ from the run-times when recorded, frame times will also differ and can for example affect the movement of NPC units (move 3px instead of 1px).&#xD;&#xA;&#xD;&#xA;How to make sure that in the replay AI has the same time constraints compared to when recorded? Fixed time-step? Record the time deltas between each frame and on replay make sure those deltas determine the actual frame time?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9164" PostHistoryTypeId="2" PostId="4618" RevisionGUID="e5519003-48e4-45a4-8615-e2b91cd03e1b" CreationDate="2010-10-19T10:06:32.630" UserId="1101" Text="I think you'll be lucky to find specific names for balancing techniques. ;) There isn't exactly a large body of standardised science here..." />
  <row Id="9165" PostHistoryTypeId="2" PostId="4619" RevisionGUID="de7b5c57-d5d0-48c7-9b19-427b5cfa660b" CreationDate="2010-10-19T10:14:14.023" UserId="1141" Text="I'd call it &quot;lazy design&quot; or alternatively &quot;mindlessly applying design principles from brain-driven pen &amp; paper games to CPU-driven computer games without stopping to think if it makes any sense&quot;. If you want to use a **logarithmic scale** for a value (and the algorithm cited is a rough approximation of that), *use a logarithm*. " />
  <row Id="9166" PostHistoryTypeId="2" PostId="4620" RevisionGUID="28c7a4c7-97a2-462d-b134-b77c434b718e" CreationDate="2010-10-19T10:15:16.627" UserId="1101" Text="You could probably make a cheap AAA console title for $2 or $3 million, but that would be with quite a small team using existing technology. Anything content-rich would require more artists and/or designers and hence cost more. Most of the money goes on salaries, in any case.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9167" PostHistoryTypeId="2" PostId="4621" RevisionGUID="31c6632d-1d8a-4b88-8e4d-37f34046ef66" CreationDate="2010-10-19T10:16:22.057" UserId="1251" Text="I think you can use [Kirupa][1] and also the [Actionscript forum][2]. They helped me a lot when I was a beginner. Also you might find useful the numerous tutorials and source code provided from [GotoAndPlay][3]. This is one site which made me interested into the gaming side of flash programming.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kirupa.com/&#xD;&#xA;  [2]: http://www.actionscript.org/&#xD;&#xA;  [3]: http://www.gotoandplay.it" />
  <row Id="9168" PostHistoryTypeId="2" PostId="4622" RevisionGUID="81e7c230-573f-4ad6-ba5f-0bcb15817ff0" CreationDate="2010-10-19T11:53:52.717" UserId="2360" Text="What's the most efficient way of creating shadows for object on a isometric terrain with OpenGL and JOGL? Note that this terrain is not flat and is not heightmap generated. Think it as another model. However objects' shadows on other objects is just nice to have.Objects must drop shadows just on the terrain.&#xD;&#xA; " />
  <row Id="9169" PostHistoryTypeId="1" PostId="4622" RevisionGUID="81e7c230-573f-4ad6-ba5f-0bcb15817ff0" CreationDate="2010-10-19T11:53:52.717" UserId="2360" Text="State of art shadowing technique for OpenGL on isometric terrain?" />
  <row Id="9170" PostHistoryTypeId="3" PostId="4622" RevisionGUID="81e7c230-573f-4ad6-ba5f-0bcb15817ff0" CreationDate="2010-10-19T11:53:52.717" UserId="2360" Text="&lt;opengl&gt;&lt;java&gt;&lt;terrain-rendering&gt;&lt;shadows&gt;" />
  <row Id="9171" PostHistoryTypeId="2" PostId="4623" RevisionGUID="706b78f9-7fcf-4f38-b72b-cfe400455d72" CreationDate="2010-10-19T12:00:13.850" UserId="192" Text="[Projective shadow mapping][1] is a very common technique, almost inexpensive on current hardware and used in most of AAA video games around. The nice thing is that you can cast shadows on any object, regardless of their shape, and you can easily obtain soft shadows with a number of techniques, e.g. [percentage closer filtering] (PCF)[3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Shadow_mapping&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems/gpugems_ch11.html&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems/gpugems_ch11.html" />
  <row Id="9172" PostHistoryTypeId="2" PostId="4624" RevisionGUID="ebdc3d5c-d791-4953-a309-77360d7f5994" CreationDate="2010-10-19T14:27:01.497" UserId="228" Text="There's a really good article on just this, [2D car physics][1] at gamedev.net and its based on C#.&#xD;&#xA;  [1]: http://www.gamedev.net/reference/programming/features/2dcarphys/" />
  <row Id="9173" PostHistoryTypeId="2" PostId="4625" RevisionGUID="902c1ac4-8278-4fc0-8bf7-697eb148c801" CreationDate="2010-10-19T14:27:46.597" UserId="2081" Text="For loads of examples, links to resources and tutorials, a thriving, friendly, no-nonsense community, pixel-art-related news, and weekly challenges, check out [PixelJoint](http://www.pixeljoint.com/) and your perspective will be forever changed.&#xD;&#xA;" />
  <row Id="9174" PostHistoryTypeId="2" PostId="4626" RevisionGUID="66e9ed96-d4b7-45c3-97a7-e7cb4d16e53a" CreationDate="2010-10-19T14:35:49.773" UserId="136" Text="For one of my open-source projects, we've been using (gasp) SharePoint to store documents and media.  Managing users and permissions is pretty straightforward, and it has support for full version history.  We've had the SharePoint site for about four years now, so there may very well be better options nowadays.  However, it *has* worked out pretty well for us.  It's hosted by a third party (for around $20/month), so after the initial setup there has been virtually no maintenance on our part.  In addition to supporting document and image libraries, SharePoint has Wiki support, though I'm not sure how well it measures up against the more popular Wiki engines." />
  <row Id="9175" PostHistoryTypeId="2" PostId="4627" RevisionGUID="fb35dd26-9487-47b0-bcb5-238c6e98a035" CreationDate="2010-10-19T14:55:01.230" UserId="2290" Text="[This website][1] has a list of 58,112 (British) English words available in uppercase or lowercase formats.&#xD;&#xA;&#xD;&#xA;[This website][2] has a variety of word lists available, but I'd recommend checking out the &quot;Official 12Dicts Package&quot;, which can be downloaded from [here][3], as it has been rigorously checked for errors and provides better documentation than most lists out there. The lists in this package contain approximately 40,000 words.&#xD;&#xA;&#xD;&#xA;In terms of minimal effort on your part, I believe the resources above are probably your best solution.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mieliestronk.com/wordlist.html&#xD;&#xA;  [2]: http://wordlist.sourceforge.net/&#xD;&#xA;  [3]: http://downloads.sourceforge.net/wordlist/12dicts-5.0.zip" />
  <row Id="9176" PostHistoryTypeId="2" PostId="4628" RevisionGUID="688b63e2-1a72-4a8c-873b-67dfc0e33b14" CreationDate="2010-10-19T15:46:35.023" UserId="1156" Text="I'm sure you all know of games like Dwarf Fortress -  massive, procedural generated wilderness and land. Something like this, taken from [this very useful article.][1]&#xD;&#xA;&#xD;&#xA;However, I was wondering how I could apply this to a much larger scale; the scale of Minecraft comes to mind (isn't that something like 8x the size of the Earth's surface?). Pseudo-infinite, I think the best term would be.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![:D][2]&#xD;&#xA;&#xD;&#xA;The article talks about fractal perlin noise. I am no way an expert on it, but I get the general idea (it's some kind of randomly generated noise which is semi-coherent, so not just random pixel values). &#xD;&#xA;&#xD;&#xA;I could just define regions X by X in size, add some region loading type stuff, and have one bit of noise generating a region. But this would result in just huge amounts of islands.&#xD;&#xA;&#xD;&#xA;On the other extreme, I don't think I can really generate a supermassive sheet of perlin noise. And it would just be one big island, I think.&#xD;&#xA;&#xD;&#xA;I am pretty sure Perlin noise, or some noise, would be the answer in some way. I mean, the map is really nice looking. And you could replace the ascii with tiles, and get something very nice looking.&#xD;&#xA;&#xD;&#xA;Anyone have any ideas? &#xD;&#xA;&#xD;&#xA;Thanks. :D&#xD;&#xA;&#xD;&#xA;-TheCommieDuck&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nolithius.com/game-development/world-generation-breakdown&#xD;&#xA;  [2]: http://i.stack.imgur.com/0gRm4.png" />
  <row Id="9177" PostHistoryTypeId="1" PostId="4628" RevisionGUID="688b63e2-1a72-4a8c-873b-67dfc0e33b14" CreationDate="2010-10-19T15:46:35.023" UserId="1156" Text="Huge procedurally generated 'wilderness' worlds" />
  <row Id="9178" PostHistoryTypeId="3" PostId="4628" RevisionGUID="688b63e2-1a72-4a8c-873b-67dfc0e33b14" CreationDate="2010-10-19T15:46:35.023" UserId="1156" Text="&lt;procedural-generation&gt;&lt;procedural&gt;&lt;worldmap&gt;&lt;infinite&gt;&lt;roguelikes&gt;" />
  <row Id="9179" PostHistoryTypeId="2" PostId="4629" RevisionGUID="79fd96c7-881d-479a-8b9f-3cc856431b4d" CreationDate="2010-10-19T16:06:37.930" UserId="2520" Text="Imagine having a 4x4 square, with 16 smaller squares inside of it, with associated data on what the squares should look like (ie., opacity, colour, etc...).&#xD;&#xA;&#xD;&#xA;Is there an existing, efficient, algorithm, for converting this set of squares into an open-gl compatible triangle strip?" />
  <row Id="9180" PostHistoryTypeId="1" PostId="4629" RevisionGUID="79fd96c7-881d-479a-8b9f-3cc856431b4d" CreationDate="2010-10-19T16:06:37.930" UserId="2520" Text="Is there an efficient, available online, algorithm for converting a matrix of squares into a triangle strip?" />
  <row Id="9181" PostHistoryTypeId="3" PostId="4629" RevisionGUID="79fd96c7-881d-479a-8b9f-3cc856431b4d" CreationDate="2010-10-19T16:06:37.930" UserId="2520" Text="&lt;opengl&gt;&lt;algorithm&gt;" />
  <row Id="9182" PostHistoryTypeId="2" PostId="4630" RevisionGUID="e0c19a30-730d-458c-b0d8-ae0c8885959b" CreationDate="2010-10-19T16:16:17.093" UserId="1091" Text="Firstly, I'd suggest that if your primitives (the squares) have different appearances, especially opacity, then tri-stripping may not make sense (i.e. the vertices aren't really shared).&#xD;&#xA;&#xD;&#xA;Secondly, these days you're probably better off with indexed geometry, rather than an actual tri-strip, so consider going that route.&#xD;&#xA;&#xD;&#xA;Finally, if you really want to generate a tri-strip, have a look at nvtristrip, which is available from nVidia:&#xD;&#xA;&#xD;&#xA;[NVTriStrip][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/nvtristrip_library.html" />
  <row Id="9183" PostHistoryTypeId="5" PostId="4630" RevisionGUID="e77a74f1-9444-4f9e-934f-8d4bdabc303e" CreationDate="2010-10-19T16:21:31.543" UserId="1091" Comment="added 86 characters in body" Text="Firstly, I'd suggest that if your primitives (the squares) have different appearances, especially opacity, then tri-stripping may not make sense (i.e. the vertices aren't really shared).&#xD;&#xA;&#xD;&#xA;Secondly, these days you're probably better off with indexed geometry, rather than an actual tri-strip, so consider going that route.&#xD;&#xA;&#xD;&#xA;Finally, if you really want to generate a tri-strip, have a look at nvtristrip, which is available from nVidia:&#xD;&#xA;&#xD;&#xA;[NVTriStrip][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/nvtristrip_library.html&#xD;&#xA;&#xD;&#xA;(indeed, it will also generate efficient indexed lists, so look at it regardless)." />
  <row Id="9184" PostHistoryTypeId="2" PostId="4631" RevisionGUID="10e06498-9f67-4ddf-be8d-90a6849d140d" CreationDate="2010-10-19T17:30:31.463" UserId="1875" Text="I am a very seasoned Delphi developer (over 12 years of experience not counting my Turbo Pascal experience) and was wondering does anyone write games in Delphi?  I have seen DirectX API wrappers in Delphi that allow you to program against DirectX (even wrote a simple solitaire game with a friend), but haven't seen anything out there that shows me that I should keep up with Delphi.  I just hate to walk away from so much knowledge and Object Pascal language, but I am not seeing much as to a reason to keep going with Delphi.  &#xD;&#xA;&#xD;&#xA;I currently program in C# and thinking about XNA, but it seems to me that the dominating opinion is go C/C++ route with DirectX.&#xD;&#xA;&#xD;&#xA;Any other Delphi developers out there struggle with this too?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;MDV&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9185" PostHistoryTypeId="1" PostId="4631" RevisionGUID="10e06498-9f67-4ddf-be8d-90a6849d140d" CreationDate="2010-10-19T17:30:31.463" UserId="1875" Text="Does anyone write games in Delphi?" />
  <row Id="9186" PostHistoryTypeId="3" PostId="4631" RevisionGUID="10e06498-9f67-4ddf-be8d-90a6849d140d" CreationDate="2010-10-19T17:30:31.463" UserId="1875" Text="&lt;directx&gt;&lt;platform&gt;" />
  <row Id="9187" PostHistoryTypeId="2" PostId="4632" RevisionGUID="7eac41f3-4652-4037-879f-544ea5a3525c" CreationDate="2010-10-19T18:03:26.877" UserId="2345" Text="To create a large island you do not need to generate it all at once. I would build regions asynchronously as you visit them. &#xD;&#xA;&#xD;&#xA;Instead of using a mask to create the island as the article describes, one thing you can do is play with the perlin noise octave wavelengths to achieve the look you are going for. Usually, the first octave describes the general shape of the terrain. All octaves after it simply add more fine grain detail. Therefore, play with the wavelength of the first octave to control how large your landmasses will be. If you want the landmass to be in the center you can simply reduce the height map by an increasing amount as you move away from the center and then normalize the noise. For instance imagine combining these two to create your island:&#xD;&#xA; &#xD;&#xA;![first octave][1] &#xD;&#xA;![details][2]&#xD;&#xA;&#xD;&#xA;This article should help: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/owmsR.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/zFjdp.jpg" />
  <row Id="9188" PostHistoryTypeId="5" PostId="4632" RevisionGUID="f46e1408-f8fd-4a72-ba4d-7df7bb86aa5c" CreationDate="2010-10-19T18:14:54.440" UserId="2345" Comment="added 386 characters in body" Text="To create a large island you do not need to generate it all at once. I would build regions asynchronously as you visit them. &#xD;&#xA;&#xD;&#xA;Instead of using a mask to create the island as the article describes, one thing you can do is play with the perlin noise octave wavelengths to achieve the look you are going for. Usually, the first octave describes the general shape of the terrain. All octaves after it simply add more fine grain detail. Therefore, play with the wavelength of the first octave to control how large your landmasses will be. If you want the landmass to be in the center you can simply reduce the height map by an increasing amount as you move away from the center and then normalize the noise. For instance imagine combining these two to create your island:&#xD;&#xA; &#xD;&#xA;![first octave][1] &#xD;&#xA;![details][2]&#xD;&#xA;&#xD;&#xA;This article should help: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;&#xD;&#xA;If you want to learn about infinite 3d worlds and about various tricks you can use to change the appearance of the terrain through playing with the noise input and output, have a look at this article: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html&#xD;&#xA;&#xD;&#xA;It may be a little bit of a difficult read if you are not familiar with the graphics pipeline and shader programming.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/owmsR.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/zFjdp.jpg" />
  <row Id="9189" PostHistoryTypeId="6" PostId="4631" RevisionGUID="3fa03249-da3f-4756-978a-4d22932d4995" CreationDate="2010-10-19T18:32:18.717" UserId="51" Comment="edited tags" Text="&lt;directx&gt;&lt;platform&gt;" />
  <row Id="9190" PostHistoryTypeId="2" PostId="4633" RevisionGUID="d2f87d93-b841-45d5-9101-fb383ec47801" CreationDate="2010-10-19T18:38:57.547" UserId="51" Text="For more information, visit http://unity3d.com" />
  <row Id="9191" PostHistoryTypeId="2" PostId="4634" RevisionGUID="379fd508-5e58-4b94-8536-c61f7589503c" CreationDate="2010-10-19T18:38:57.547" UserId="51" Text="Unity3D is a cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end." />
  <row Id="9192" PostHistoryTypeId="5" PostId="4634" RevisionGUID="09047fb1-64b6-4584-aa3d-619e5d8b87c9" CreationDate="2010-10-19T18:45:37.877" UserId="51" Comment="fixed the engine name." Text="Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end." />
  <row Id="9193" PostHistoryTypeId="2" PostId="4635" RevisionGUID="43479e4d-6665-4454-80fa-1143220f69f2" CreationDate="2010-10-19T19:48:54.270" UserId="1198" Text="Not to dodge the main title of your question, but I can offer some advice in respect to the other aspect (where should you go next, since it seems you've already decided.) C# and XNA are simply an abstraction layer above DirectX. Using C# and XNA will help you increase time to market, and can reduce some development costs; however, that is at the expence of some performance and control.&#xD;&#xA;&#xD;&#xA;C/C++ and raw Direct X is popular because you get maximum performance and control. It really depends on your goals. Personally, I use C# and XNA because its entry level costs are basically zero (especially if you already know C#) and it only costs $99/year to be part of the Creators Club, which is only a requirement if you want to deploy your game to Xbox and or Windows Phone 7. Doing C# and XNA for Windows only is absolutly free, and can produce amazing results. At a minimum, I recommend you check it out before jumping headlong into C++ and raw Direct X." />
  <row Id="9194" PostHistoryTypeId="2" PostId="4636" RevisionGUID="069add9b-fdab-4a59-926d-f14087359b2f" CreationDate="2010-10-19T20:00:31.360" UserId="395" Text="[Soldat](http://en.wikipedia.org/wiki/Soldat) is written entirely in Delphi I think." />
  <row Id="9195" PostHistoryTypeId="2" PostId="4637" RevisionGUID="ae58e16d-b713-499e-baef-07e1949bb007" CreationDate="2010-10-19T21:44:05.017" UserId="1677" Text="Let's see history of success. Which popular games (and game engines) where built using [component-based game object system][1]? Each answer should contain:&#xD;&#xA;&#xD;&#xA;1. Game Title (one per answer)&#xD;&#xA;2. Author / Company&#xD;&#xA;3. Year&#xD;&#xA;4. Development time (optional)&#xD;&#xA;5. Link to postmortem (optional)&#xD;&#xA;6. Links to docs/source code (optional)&#xD;&#xA;&#xD;&#xA;To moderators: CW, of course.&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design/3495647#3495647" />
  <row Id="9196" PostHistoryTypeId="1" PostId="4637" RevisionGUID="ae58e16d-b713-499e-baef-07e1949bb007" CreationDate="2010-10-19T21:44:05.017" UserId="1677" Text="Component-based game object systems in practice" />
  <row Id="9197" PostHistoryTypeId="3" PostId="4637" RevisionGUID="ae58e16d-b713-499e-baef-07e1949bb007" CreationDate="2010-10-19T21:44:05.017" UserId="1677" Text="&lt;component-based&gt;&lt;game-industry&gt;" />
  <row Id="9198" PostHistoryTypeId="16" PostId="4637" RevisionGUID="5c1e41ae-52bc-49e0-971e-fe3cd51d23fc" CreationDate="2010-10-19T21:51:10.937" UserId="51" />
  <row Id="9199" PostHistoryTypeId="5" PostId="4637" RevisionGUID="5c1e41ae-52bc-49e0-971e-fe3cd51d23fc" CreationDate="2010-10-19T21:51:10.937" UserId="51" Comment="deleted 31 characters in body" Text="Let's see history of success. Which popular games (and game engines) where built using [component-based game object system][1]? Each answer should contain:&#xD;&#xA;&#xD;&#xA;1. Game Title (one per answer)&#xD;&#xA;2. Author / Company&#xD;&#xA;3. Year&#xD;&#xA;4. Development time (optional)&#xD;&#xA;5. Link to postmortem (optional)&#xD;&#xA;6. Links to docs/source code (optional)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design/3495647#3495647" />
  <row Id="9200" PostHistoryTypeId="2" PostId="4638" RevisionGUID="3ff9af77-9b04-480c-a060-3fcd570365ce" CreationDate="2010-10-19T22:06:28.980" UserId="1677" Text="Some useful links for you about auto world generation:&#xD;&#xA;&#xD;&#xA;http://pcg.wikidot.com/ - Procedural Content Generation&#xD;&#xA;&#xD;&#xA;http://www-cs-students.stanford.edu/~amitp/gameprog.html#tiles - Amit's Building Worlds set of algorithms" />
  <row Id="9201" PostHistoryTypeId="2" PostId="4639" RevisionGUID="57ab9698-c97b-4a1b-8337-bf33e4bf7f9c" CreationDate="2010-10-19T22:44:51.457" UserId="2354" Text="Try this site: http://flashgameu.com/&#xD;&#xA;&#xD;&#xA;I found those tutorials quite useful." />
  <row Id="9202" PostHistoryTypeId="2" PostId="4640" RevisionGUID="a04334e6-2fff-41a1-b33d-10359377ab93" CreationDate="2010-10-19T22:56:57.197" UserId="2306" Text="First: if you're already playing with C#, you've no doubt noticed the incredible similarities between in and Delphi. Your Delphi experience will help a great deal given the similar object models, exception handling, etc. &#xD;&#xA;&#xD;&#xA;The only advantage that Delphi has over C# is that it is compiled to native code. The only other game in town for that these days seems to be C and C++. &#xD;&#xA;&#xD;&#xA;I'm having fantastic success with C# and XNA. The performance of managed code these days is very near that of native code. If you want to code for multiple platforms (windows, xbox, ps3, etc), you'll need to stick with c++ because it's the only thing that will build for everything. &#xD;&#xA;&#xD;&#xA;If you're sticking with Windows and the Xbox, xna is a great tool. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="9203" PostHistoryTypeId="2" PostId="4641" RevisionGUID="e8b027da-a976-4320-91c7-9d0d63eadb79" CreationDate="2010-10-19T23:17:20.477" UserId="360" Text="**Dungeon Siege** by *Gas Powered Games*&#xD;&#xA;&#xD;&#xA;[Scott Bilas][1] released a lot of information about Dungeon Siege which featured component-based systems, amongst other things.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://scottbilas.com/games/dungeon-siege" />
  <row Id="9204" PostHistoryTypeId="5" PostId="4640" RevisionGUID="b69ba137-edbc-4302-9369-2ea62d1c8138" CreationDate="2010-10-19T23:21:39.227" UserId="2306" Comment="added 432 characters in body" Text="Okay, I hate to say it, but Delphi is effectively dead. I know, I know - it's depressing.  Fear not, however: even better languages have evolved that have 99% of the advantages of Delphi, but are *gasp* still  (REALLY) supported and enjoying widespread industry adoption. You're not doing your career any favors by sticking with Delphi. I worked with Delphi for about six wonderful years before following Anders over to the dark side. &#xD;&#xA;&#xD;&#xA;If you're already playing with C#, you've no doubt noticed the incredible similarities between in and Delphi. Your Delphi experience will help a great deal given the similar object models, exception handling, etc. &#xD;&#xA;&#xD;&#xA;The only advantage that Delphi has over C# is that it is compiled to native code. The only other game in town for that these days seems to be C and C++. &#xD;&#xA;&#xD;&#xA;I'm having fantastic success with C# and XNA. The performance of managed code these days is very near that of native code. If you want to code for multiple platforms (windows, xbox, ps3, etc), you'll need to stick with c++ because it's the only thing that will build for everything. &#xD;&#xA;&#xD;&#xA;If you're sticking with Windows and the Xbox, xna is a great tool. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="9205" PostHistoryTypeId="5" PostId="4641" RevisionGUID="297f85e4-a135-4609-8630-8e25281937c5" CreationDate="2010-10-19T23:47:18.690" UserId="1677" Comment="added 35 characters in body" Text="**Dungeon Siege** by *Gas Powered Games*&#xD;&#xA;&#xD;&#xA;[Scott Bilas][1] released a lot of information about Dungeon Siege which featured component-based systems, amongst other things.&#xD;&#xA;&#xD;&#xA;Dungeon Siege was released in 2002.&#xD;&#xA;&#xD;&#xA;  [1]: http://scottbilas.com/games/dungeon-siege" />
  <row Id="9206" PostHistoryTypeId="2" PostId="4642" RevisionGUID="1f3f8a70-c17f-43c4-b220-22f35adfb763" CreationDate="2010-10-20T01:30:41.610" UserId="2591" Text="How is a game cinematic made? I can't find a decent article anywhere to give at least starting point into understanding what it takes to create a cinematic.&#xD;&#xA;&#xD;&#xA;I don't mean typical scripted game play, rather, the really nice cut scenes games have, like the ones Blizzard has for almost every game they develop.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=OGwCU_qA22U&#xD;&#xA;&#xD;&#xA;Note: I'm not sure what to tag this under.&#xD;&#xA;" />
  <row Id="9207" PostHistoryTypeId="1" PostId="4642" RevisionGUID="1f3f8a70-c17f-43c4-b220-22f35adfb763" CreationDate="2010-10-20T01:30:41.610" UserId="2591" Text="How are game cinematics made?" />
  <row Id="9208" PostHistoryTypeId="3" PostId="4642" RevisionGUID="1f3f8a70-c17f-43c4-b220-22f35adfb763" CreationDate="2010-10-20T01:30:41.610" UserId="2591" Text="&lt;trailer&gt;&lt;video&gt;" />
  <row Id="9209" PostHistoryTypeId="2" PostId="4643" RevisionGUID="5f60a2cf-ccda-4499-82cc-340fccd9885c" CreationDate="2010-10-20T01:46:08.877" UserId="1198" Text="They use a product like 3DS Max or Maya." />
  <row Id="9210" PostHistoryTypeId="2" PostId="4644" RevisionGUID="740990e5-9998-4826-b08f-1ac0b053c3b8" CreationDate="2010-10-20T02:24:11.563" UserId="919" Text="Step 1:&#xD;&#xA;Create assets in 3d program (3DS Max, Maya or blender)&#xD;&#xA;&#xD;&#xA;Step 2:&#xD;&#xA;Rig assets&#xD;&#xA;&#xD;&#xA;Step 3:&#xD;&#xA;Animate the needed animations on the rigged assets&#xD;&#xA;&#xD;&#xA;Step 4:&#xD;&#xA;Create the scene, render and record. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9211" PostHistoryTypeId="2" PostId="4645" RevisionGUID="3ad8343d-15f3-4ca6-8514-6daf495ab711" CreationDate="2010-10-20T03:11:43.353" UserDisplayName="John McMillan" Text="Take a look at PLAYXPERT.  It's a tool that takes care of the overlay using the driver sub-system and lets you build widgets in C# .NET." />
  <row Id="9212" PostHistoryTypeId="2" PostId="4646" RevisionGUID="269d49ac-0581-4284-b56b-53e283cdf72a" CreationDate="2010-10-20T03:28:21.673" UserId="2200" Text="**Blood, sweat and &lt;strike&gt;tears&lt;/strike&gt; beers**&#xD;&#xA;&#xD;&#xA;For the movie-quality cinematics you see from companies like Blizzard, they are often following a process similar (albeit on a smaller scale) to the processes of professional movie studios like Pixar. This involves professional 3D artists, modellers, animators, etc, as well as various high-end technologies like 3DS Max, Maya, etc.&#xD;&#xA;&#xD;&#xA;For the teaser trailer for Starcraft II, [this interview with Blizzard](http://eu.starcraft2.com/features/interviews/cinematicteaser.xml) (Part III particularly) mentions how the Marine 3D model had 5 million polygons, and the cinematic broke their renderer.&#xD;&#xA;&#xD;&#xA;The Australian magazine Atomic also have a good article on Blizzard's cinematic development process [here](http://www.atomicmpc.com.au/Feature/146035,eye-of-the-storm-blizzards-cinematics-team.aspx/1)" />
  <row Id="9213" PostHistoryTypeId="5" PostId="4637" RevisionGUID="1a673b99-2f5a-4829-a963-f667606d6c89" CreationDate="2010-10-20T04:11:11.370" UserId="660" Comment="corrected spelling" Text="Let's see history of success. Which popular games (and game engines) were built using [component-based game object system][1]? Each answer should contain:&#xD;&#xA;&#xD;&#xA;1. Game Title (one per answer)&#xD;&#xA;2. Author / Company&#xD;&#xA;3. Year&#xD;&#xA;4. Development time (optional)&#xD;&#xA;5. Link to postmortem (optional)&#xD;&#xA;6. Links to docs/source code (optional)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design/3495647#3495647" />
  <row Id="9214" PostHistoryTypeId="2" PostId="4647" RevisionGUID="c7a9d62d-9457-4dcf-998a-166f7425f779" CreationDate="2010-10-20T04:11:32.113" UserId="2594" Text="I'm looking for language/platform-agnostic best practices for a small or solo game development team. High-level strategies -- and suggestions in terms of frameworks, engines or IDEs which might offer a good ROI -- are welcome." />
  <row Id="9215" PostHistoryTypeId="1" PostId="4647" RevisionGUID="c7a9d62d-9457-4dcf-998a-166f7425f779" CreationDate="2010-10-20T04:11:32.113" UserId="2594" Text="What are effective strategies for a small game development team?" />
  <row Id="9216" PostHistoryTypeId="3" PostId="4647" RevisionGUID="c7a9d62d-9457-4dcf-998a-166f7425f779" CreationDate="2010-10-20T04:11:32.113" UserId="2594" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;cross-platform&gt;&lt;language-agnostic&gt;&lt;3d-engines&gt;" />
  <row Id="9217" PostHistoryTypeId="5" PostId="4647" RevisionGUID="d9f7c1c0-e5a3-49ab-a535-c8de8a717cba" CreationDate="2010-10-20T04:26:35.103" UserId="2594" Comment="added 31 characters in body" Text="I'm looking for language/platform-agnostic best practices for a small game development team of intermediate to advanced developers. High-level strategies -- and suggestions in terms of frameworks, engines or IDEs which might offer a good ROI -- are welcome." />
  <row Id="9218" PostHistoryTypeId="2" PostId="4648" RevisionGUID="665681fc-90cd-498d-8e55-b53b2fa8dfa7" CreationDate="2010-10-20T05:08:52.953" UserId="2545" Text="Artists are generally as lousy and unreliable as the client is, so the answer is to be professional and to look for professionals.&#xD;&#xA;&#xD;&#xA;I second a lot of things David said in his post about Networking - this is the only way you will find reliable artists to work on your game for little to no money. But I will add some tips as well:&#xD;&#xA;&#xD;&#xA;1. Never, never promise 'payments once we've made a profit'. This is a red flag to artists. It means we're never going to get paid. No matter how good you think your game is, promising profits is a really bad idea, and will scare away professional artists.&#xD;&#xA;&#xD;&#xA;2. If you want us to be reliable, we need the same thing from you. On a non-paid game, this means: getting all the info from you that we need for each asset, not having a ton of arbitrary revisions (as this is a lot of extra work), a reasonable deadline (if we're doing it for free, we can't do it fast - we need to work, too), and timely communication (don't leave us hanging for weeks). For a paid project, make sure you pay on time. I can speak from experience when I say that promises left unkept will halt all art production in the meantime. In the end, a non-paying gig is only going to hold us so far, as we need to eat and pay rent too. If you really want an artist to stick with you for a while without pay, you have to find someone really invested in both the game, and their partnership with you.&#xD;&#xA;&#xD;&#xA;3. Budget Negotiations. If you have a really tight budget, tell the artist! Many professional artists can be willing to dip their fees if the project is something they really believe in. If you can only afford $XXX to go toward art assets, tell them what the budget is upfront, and ask them to tell you how many assets/how much work that your budget can afford you. A good artist should be able to bring up an estimate, and as long as you're both reasonable, even if you can't work out a deal immediately, you can leave a good impression on each other and leave open the possibility of working together in the future.&#xD;&#xA;&#xD;&#xA;4. Find an artist who's work you love and that you think will fit the project. You're much more likely to find a good fit if you find them, rather than them replying to a job ad. A good idea is to maybe find 20 artists that you like, and contact them. Even better if you can find the common thread that you liked about their work - because then even if you get negative replies to your first batch, you have the vocabulary to tell other artists exactly what you want.&#xD;&#xA;&#xD;&#xA;5. Check out art forums. Some good ones: www.conceptart.org , www.cghub.com , www.cgsociety.org . There is also deviantart.com, but I would stay wary - the general population of artists there are in the amateur category, and while they may be really enthusiastic, they probably don't have a lot of experience and will therefore be more unreliable.&#xD;&#xA;&#xD;&#xA;6. Ask for a resume, portfolio, list of references. Just like any other job! Follow up on the references, and if they have published titles, look at the titles! Someone with published work under their belt is much more likely to follow the game through - they've done it already!&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="9219" PostHistoryTypeId="2" PostId="4649" RevisionGUID="31cb1919-481f-493f-9a67-846d35bb5018" CreationDate="2010-10-20T06:21:46.470" UserId="2595" Text="I would suggest treating this as a pseudo-physics problem and solve it by using ground friction.&#xD;&#xA;&#xD;&#xA;You're already using gravity to hold the character on the ground, this handles the situations where platforms move up and down.  To handle the left and right movement, the ground should exert a great deal of friction on the character.  Typically this friction level would be 1.0, or 100%.&#xD;&#xA;&#xD;&#xA;If the character is standing still, then their velocity is 0, and they instead inherit 100% of the velocity of the platform because of the friction.  Something like the following:&#xD;&#xA;&#xD;&#xA;    character_velocity = friction * platform_velocity&#xD;&#xA;&#xD;&#xA;The benefit of this approach is that it easily lends itself to additional platforming mechanics, like being able to overcome the friction on steep slopes, allowing your character to slide.  It also allows you to easily reduce the friction to create ice that the character will slide on.&#xD;&#xA;&#xD;&#xA;It also is easier to deal with issues like low hanging walls that can knock your player off a moving platform.  If you simply treat the character as a child of a parent platform, there's a good chance it won't interact very easily with the rest of your collision detection without a lot of work." />
  <row Id="9220" PostHistoryTypeId="2" PostId="4650" RevisionGUID="5e268a5e-733e-438e-9a61-c9993960d1f5" CreationDate="2010-10-20T06:30:12.133" UserId="154" Text="The creation process is very similar to building geometry for games. Same tools for modeling &amp; animation Max, Maya, zBrush. Most characters for current gen are built to extremely high detail for normal map generation anyway, so often those assets can translate easily to the pre-rendered realm. The main differences are in shader complexity, rendering, and lighting. &#xD;&#xA;&#xD;&#xA;A studio can do this all internally, particularly someone like Blizzard who are known for cinematics. It does require some individuals with a specific skillset so you need to keep them busy with work. Today most companies find it easier to farm out pre-rendered cinematics to external houses that focus on that sort of work. As an example you'll recognize several recent pieces done by [Blur][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://vz2.blur.com/work/cinematics" />
  <row Id="9221" PostHistoryTypeId="5" PostId="4350" RevisionGUID="18193e22-7e8e-4e10-abf8-847544cbd704" CreationDate="2010-10-20T07:11:00.767" UserId="2360" Comment="fixed grammar" Text="This may not be the exact answer to your question but I may suggest you an approach on this issue.&#xD;&#xA;&#xD;&#xA;Actually your problem is two problems combined.&#xD;&#xA;&#xD;&#xA; 1. Finding shortest paths&#xD;&#xA; 2. Finding collisions&#xD;&#xA;&#xD;&#xA;And the second problem is embedded into first. I may recommend understanding blind search first. Here's a very simple presentation about it: [Blind Search][1]&#xD;&#xA;&#xD;&#xA;If you read the document for building the state space, you will need to generate state points and they must be legal meaning these states can be on your shortest path so they shouldn't collide with any objects in your space. From now on you can continue with Euclidian collision algorithms. After building your state space and search tree restricted with collisions you may chose any of the shortest path algorithms or one of your own or a modified hybrid one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.rpi.edu/~hollingd/ai/notes/blindsearch/blindsearch.pdf" />
  <row Id="9222" PostHistoryTypeId="2" PostId="4651" RevisionGUID="ed2e34f5-7e40-4d66-abe9-671cf11bf3d4" CreationDate="2010-10-20T07:50:27.513" UserId="364" Text="Small team + small budget = small games. Never forget that you're on a budget so the team/budget ratio have to define the time you can work on each game.&#xD;&#xA;&#xD;&#xA;That said, take time to prototype. You can't afford to make not good enough games. &#xD;&#xA;&#xD;&#xA;For the game engine, the current best all-in-one and cross-platform engine affordable for (very) small teams is Unity.&#xD;&#xA;&#xD;&#xA;If you think that the games you will make require precise control of the game engine (if it's not an established genre), then you'd better setup a framework made of several specialized libraries (Ogre, FMod, CAudio, RakNet, etc.). &#xD;&#xA;That said, it means you'll have to maintain the glue code yourself, so it have a cost. If you can't afford it, take a full engine anyway and try to wrap your game concepts in it.&#xD;&#xA;&#xD;&#xA;Frameworks like SFML might be good for you as it provide basic bricks to build game-specific engine on (but it's more oriented to 2D games).&#xD;&#xA;&#xD;&#xA;If you want to make a lot of games quickly, you'd better go the Flash way, as it's like some kind of basic game engine platform. There are a lot of game engine built on it and it's cross-platform.&#xD;&#xA;&#xD;&#xA;For the tools, use whatever source control that works fine with your team organisation. Ides are relative to the language you want to use, so you'll have to search. Just know that if you work on Windows with C++ or C# then Visual Studio is always the best choice. It seems XCode is the best on Mac. I'm not sure for other unix platforms. &#xD;&#xA;&#xD;&#xA;If you want to make a cross-platform game that is not based on an already cross-platform engine, then use C++. If you target only Windows and want to get fast to game programming (and find an adequate game engine like NeoAxis), then use C#. Python, over a cross-platform game engine or framework like SFML, can be a good idea too.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9223" PostHistoryTypeId="5" PostId="4651" RevisionGUID="5f197b30-186b-4dab-a950-e0f003d4ba44" CreationDate="2010-10-20T07:56:43.130" UserId="364" Comment="added 453 characters in body" Text="Small team + small budget = small games. Never forget that you're on a budget so the team/budget ratio have to define the time you can work on each game.&#xD;&#xA;&#xD;&#xA;That said, take time to prototype. You can't afford to make not good enough games. &#xD;&#xA;&#xD;&#xA;For the game engine, the current best all-in-one and cross-platform engine affordable for (very) small teams is Unity.&#xD;&#xA;&#xD;&#xA;If you think that the games you will make require precise control of the game engine (if it's not an established genre), then you'd better setup a framework made of several specialized libraries (Ogre, FMod, CAudio, RakNet, etc.). &#xD;&#xA;That said, it means you'll have to maintain the glue code yourself, so it have a cost. If you can't afford it, take a full engine anyway and try to wrap your game concepts in it.&#xD;&#xA;&#xD;&#xA;Frameworks like SFML might be good for you as it provide basic bricks to build game-specific engine on (but it's more oriented to 2D games).&#xD;&#xA;&#xD;&#xA;If you want to make a lot of games quickly, you'd better go the Flash way, as it's like some kind of basic game engine platform. There are a lot of game engine built on it and it's cross-platform.&#xD;&#xA;&#xD;&#xA;For the tools, use whatever source control that works fine with your team organisation. Ides are relative to the language you want to use, so you'll have to search. Just know that if you work on Windows with C++ or C# then Visual Studio is always the best choice. It seems XCode is the best on Mac. I'm not sure for other unix platforms. &#xD;&#xA;&#xD;&#xA;If you want to make a cross-platform game that is not based on an already cross-platform engine, then use C++. If you target only Windows and want to get fast to game programming (and find an adequate game engine like NeoAxis), then use C#. Python, over a cross-platform game engine or framework like SFML, can be a good idea too.&#xD;&#xA;&#xD;&#xA;If you have the time, setup a project management tool. If you don't have time, don't bother and just make someone keep track of everyone's tasks. Redmine or TRAC are good candidates for this kind of stuff, but requires that you know how to install them. A quicker alternative might be Mantis that is php only (copy/past in your web hosting ftp). There are a lot of other simple alternatives on the web but don't spend too much time looking for them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9224" PostHistoryTypeId="2" PostId="4652" RevisionGUID="061fe4d4-d35c-4b81-b11e-47e1c08fa222" CreationDate="2010-10-20T10:04:34.173" UserId="2132" Text="I will recommend the book &quot;[ActionScript 3.0 Game University][1]&quot; which has many step by step tutorials for all genre of games (puzzle, match-3, platform, maze, shooter). His site is also full of examples not in the book. One of the better books out there (though there aren't really many game development books for AS3).&#xD;&#xA;&#xD;&#xA;A new edition of the book seems to be on the way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flashgameu.com/" />
  <row Id="9225" PostHistoryTypeId="2" PostId="4653" RevisionGUID="0d5414b4-ce6d-4508-aada-49f8327e11bc" CreationDate="2010-10-20T10:16:30.087" UserId="950" Text="Small team must target &quot;small but beautiful&quot;. &#xD;&#xA;&#xD;&#xA; - Be sure of your target. Easy &amp; broad supply is vital.&#xD;&#xA; - The Game design should be very simple(no rpg but more like some tabletop games or oldies), &#xD;&#xA; - The art should be minimalistic/2D (or using procedural&#xD;&#xA;   tech) &#xD;&#xA; - the tools must be high level: use a established game engine.&#xD;&#xA; - the Language must be high level also (Python, Lua, C#). You prefer a low dev time over a very speedy program.&#xD;&#xA;&#xD;&#xA;But do not sacrifice quality, that the only way to stand out.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9226" PostHistoryTypeId="2" PostId="4654" RevisionGUID="0d6dc70a-d6f2-41c2-9099-58c2f35e2a03" CreationDate="2010-10-20T10:55:44.607" UserId="1101" Text="I think I better understand what you are asking now.&#xD;&#xA;&#xD;&#xA;Noise is not random - it's random-looking but is completely based on a mathematical formula and is repeatable. All the information is encoded in the formula. This means that you can have a formula that potentially covers an infinite area, and just use the formula on the coordinates of the area you need. When you need an adjacent area, you just re-use the formula on the new coordinates, and since the formula yields continuous values, the areas will join seamlessly.&#xD;&#xA;&#xD;&#xA;Here's a simplified example, using sine instead of perlin noise for the height generation, and imagining the world is infinite in the X axis but only 1 unit high in the Y and Z axes.&#xD;&#xA;&#xD;&#xA;Formula is: `height(x,y) = sin(x/20)`&#xD;&#xA;&#xD;&#xA;The game starts, and we generate heights for the nearby area, ie. (0,0) to (9,0):&#xD;&#xA;&#xD;&#xA;`[0.0, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.34, 0.39, 0.43]`&#xD;&#xA;&#xD;&#xA;We have a hill, rising up towards the right. Let's say we walk to the end of it and need to generate the values from (10,0 to 19,0) now:&#xD;&#xA;&#xD;&#xA;`[0.48, 0.52, 0.56, 0.61, 0.64, 0.68, 0.72, 0.75, 0.78, 0.81]`&#xD;&#xA;&#xD;&#xA;Notice how the hill keeps rising steadily, and that the value at (10,0) follows on nicely from the one at (9,0). This is because the sine function is continuous, which basically means that if you feed it 2 adjacent numbers in, you'll get 2 adjacent results out - for a certain definition of adjacent. So if you use your world coordinates as the parameters to the function that defines your world, you will get a continuous landscape that fits together no matter how much or little of it you generate at once. When you generate new parts, they will flow on from the existing parts automatically, because the heights are already pre-determined.&#xD;&#xA;&#xD;&#xA;If the world isn't going to change, you don't even need to store anything, since you can calculate exactly what the height is at any given point from the formula. Obviously with something like Minecraft the world is totally deformable so you just save each chunk as you create it. Given that there is a high degree of coherence between adjacent chunks (ie. if 1 block is grass, it's more likely than not that the block next to it will be grass too) you can compress the data very efficiently - run length encoding would work well, but then so would almost any standard compression algorithm.&#xD;&#xA;&#xD;&#xA;Whereas I have talked about height as the most obvious value, you can use the same system to generate any characteristic you want. Use a mathematical function with continuous properties and where the inputs are your world coordinates and that can decide the presence of landmarks, mineral deposits, spawn points, whatever you like. (Obviously the values in one formula may affect another - no point placing a coal deposit in mid-air, so you generate the world height map and then only calculate coal possibilities for the blocks that are far enough below ground.)" />
  <row Id="9227" PostHistoryTypeId="2" PostId="4655" RevisionGUID="369942d0-5256-4061-b696-8f8b1af74b48" CreationDate="2010-10-20T11:02:27.093" UserId="2132" Text="[Unity3][1]D uses a component-based system by default. It is superb for creating game entities from a text file and dependency injection.&#xD;&#xA;&#xD;&#xA;    function createEnemy() {&#xD;&#xA;       &#xD;&#xA;       // extract AI type for enemy&#xD;&#xA;       // definition is a custom structure holding parameters to create the enemy&#xD;&#xA;       var aitypename = definition.ai;&#xD;&#xA;    &#xD;&#xA;       // AIType can be an interface or abstract class&#xD;&#xA;       // you can create a component from a string or from a type&#xD;&#xA;       var ai : AIType = this.gameObject.AddComponent(aitypename);&#xD;&#xA;       ai.setup(definition.ai_settings);&#xD;&#xA;    &#xD;&#xA;       // set rule for enemy when it is destroyed&#xD;&#xA;       this.gameObject.AddComponent(definition.when_destoryed); &#xD;&#xA;     &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Those components could look like this&#xD;&#xA;&#xD;&#xA;    class AI_Scout extends AIType&#xD;&#xA;    {&#xD;&#xA;      // called per update-frame on the game-object with this script&#xD;&#xA;      public function Update() {&#xD;&#xA;        // run Scout AI here&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    class Spawn_Ammo_On_Destroyed extends When_Destroyed&#xD;&#xA;    {&#xD;&#xA;       // automatically called by the engine when the game object this script is attached to is&#xD;&#xA;       // destroyed&#xD;&#xA;       public function OnDestroyed() {&#xD;&#xA;        // spawn ammo&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unity3d.com" />
  <row Id="9228" PostHistoryTypeId="5" PostId="4623" RevisionGUID="365fa5c6-6cb0-4b77-84a9-612a60009525" CreationDate="2010-10-20T13:03:42.680" UserId="192" Comment="edited body" Text="[Projective shadow mapping][1] is a very common technique, almost inexpensive on current hardware and used in most of AAA video games around. The nice thing is that you can cast shadows on any object, regardless of their shape, and you can easily obtain soft shadows with a number of techniques, e.g. [percentage closer filtering][3] (PCF).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Shadow_mapping&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems/gpugems_ch11.html&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems/gpugems_ch11.html" />
  <row Id="9229" PostHistoryTypeId="2" PostId="4656" RevisionGUID="6ba2936a-df6f-4354-8c65-ce535cc201ad" CreationDate="2010-10-20T13:04:06.503" UserId="2545" Text="I'd like to second what Olafur and Iain said, but to add a comment to Iain's fourth point.&#xD;&#xA;&#xD;&#xA;Character can speak, and they can speak a lot, as long as you make sure that their dialouge builds the story, and that story is engaging. A good example of this in a 'male-oriented' game that still really appeals to me as a female, would be Red Dead Redemption. Totally opposite most of my points! But his story is very strong and emotionally engaging, so I still want to get behind him and support him, even if his experience is very hard from my own. &#xD;&#xA;&#xD;&#xA;Beyond that, I'd like to add one of the things I read in the book &quot;Gender Inclusive Game Design&quot; that always sticks with me:&#xD;&#xA;&#xD;&#xA;Have a female option for the main character!&#xD;&#xA;&#xD;&#xA;Having the option to play as male or female will already help you get your character to appeal to a wider audience, and help the female side of your audience empathize with the story. &#xD;&#xA;&#xD;&#xA;If you can only have one character option (as is necessary in some games), try to see if you can make it female instead of male. Given the option, most women prefer to play as women, and a lot of men to prefer to play as women too! (Gives them something nice to look at. :) ) &#xD;&#xA;&#xD;&#xA;If your concept has absolutely no way it can have women in the character base, then try to make your characters a little more base appealing. Some examples would be: The characters from Team Fortress 2 (Strong silhouhettes, bright colours, good humour and many options), and Link from Legend of Zelda (Androgynous enough that let's be honest, he can be a girl if you pretend hard enough). " />
  <row Id="9235" PostHistoryTypeId="2" PostId="4660" RevisionGUID="c4342de1-cb2d-427f-8b75-c183f33cd8c0" CreationDate="2010-10-20T15:43:17.667" UserId="309" Text="**Resistance 1-2 (possibly 3)** (2006-2008) by *Insomniac Games*&#xD;&#xA;&#xD;&#xA;Terrance Cohen lists these games in his [A Dynamic Component Architecture for High Performance Gameplay][1] talk from GDC Canada 2010.&#xD;&#xA;&#xD;&#xA;Not sure if this was applied to the recent Ratchet &amp; Clank games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.insomniacgames.com/research_dev/articles/2010/1530793" />
  <row Id="9237" PostHistoryTypeId="2" PostId="4662" RevisionGUID="52242669-3f16-4868-9047-e21eed6a3718" CreationDate="2010-10-20T16:10:04.997" UserId="2100" Text="From examples I've seen, the best way to instantiate a component and then use it depends on what type of component it is. For the mentioned input component, keep a reference to it in the main Game class in XNA, and in the Game's Update() method, add a line like `input.Update(referenceToSomethingIfNeeded)` so that the Game class manages its component updates. For other components that are needed within specific game objects, have the game object Update() methods do the same for their components. " />
  <row Id="9238" PostHistoryTypeId="2" PostId="4663" RevisionGUID="b1e78c84-c975-49ce-b486-975f570f883f" CreationDate="2010-10-20T16:42:20.923" UserId="1477" Text="There are two projects we can work on. One would be  a free game to try and get our name out/build an audience. The second is our main idea for a first product. &#xD;&#xA;&#xD;&#xA;What are the pros and cons of building the free game first instead of focusing that time/effort into the main money making project." />
  <row Id="9239" PostHistoryTypeId="1" PostId="4663" RevisionGUID="b1e78c84-c975-49ce-b486-975f570f883f" CreationDate="2010-10-20T16:42:20.923" UserId="1477" Text="What are the pros and cons to building an audience with a free game first as opposed to focusing efforts on a commercial release" />
  <row Id="9240" PostHistoryTypeId="3" PostId="4663" RevisionGUID="b1e78c84-c975-49ce-b486-975f570f883f" CreationDate="2010-10-20T16:42:20.923" UserId="1477" Text="&lt;marketing&gt;&lt;planning&gt;" />
  <row Id="9241" PostHistoryTypeId="2" PostId="4664" RevisionGUID="cf0d0c53-daef-4528-b6c4-b31ee90ea188" CreationDate="2010-10-20T16:42:42.127" UserId="1543" Text="I'm in the process of developing a game for the iPhone and I want to add Game Center support to it. The problem, as I see it, is that I need to have named my app, created an icon and uploaded screenshots etc. before I can create a leaderboard and start implementation?&#xD;&#xA;&#xD;&#xA;My game is unfinished and the iTunes Connect developer guide seems to indicate that certain information can't be edited once entered. Can anyone point me in the right direction on this one?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="9242" PostHistoryTypeId="1" PostId="4664" RevisionGUID="cf0d0c53-daef-4528-b6c4-b31ee90ea188" CreationDate="2010-10-20T16:42:42.127" UserId="1543" Text="Can I start implementing Game Center in my iPhone app, without having created a new app in iTunes connect?" />
  <row Id="9243" PostHistoryTypeId="3" PostId="4664" RevisionGUID="cf0d0c53-daef-4528-b6c4-b31ee90ea188" CreationDate="2010-10-20T16:42:42.127" UserId="1543" Text="&lt;iphone&gt;&lt;game-center&gt;" />
  <row Id="9244" PostHistoryTypeId="2" PostId="4665" RevisionGUID="39cc7eef-7d1f-4eb1-8564-6eae072101dd" CreationDate="2010-10-20T16:45:14.307" UserId="1477" Text="For a new studio that will be focusing on social, mobile platform games. What are roles do we need to fill and how many of each role would be ideal?" />
  <row Id="9245" PostHistoryTypeId="1" PostId="4665" RevisionGUID="39cc7eef-7d1f-4eb1-8564-6eae072101dd" CreationDate="2010-10-20T16:45:14.307" UserId="1477" Text="Staffing a new studio" />
  <row Id="9246" PostHistoryTypeId="3" PostId="4665" RevisionGUID="39cc7eef-7d1f-4eb1-8564-6eae072101dd" CreationDate="2010-10-20T16:45:14.307" UserId="1477" Text="&lt;planning&gt;&lt;human-resources&gt;" />
  <row Id="9247" PostHistoryTypeId="5" PostId="4647" RevisionGUID="323a4e5f-b41c-48e9-87e6-ba62aad2695b" CreationDate="2010-10-20T16:45:29.520" UserId="2594" Comment="cleanup more 'questiony'" Text="What are language/platform-agnostic best practices for a small game development team of intermediate to advanced developers? &#xD;&#xA;&#xD;&#xA;High-level strategies (as well as suggestions in terms of frameworks, engines or IDEs which might offer a good ROI) are welcome." />
  <row Id="9248" PostHistoryTypeId="2" PostId="4666" RevisionGUID="ec23ba2b-a0a2-4b8b-9f8a-32cd9ecb1f12" CreationDate="2010-10-20T16:48:55.850" UserId="2491" Text="I'm considering how to implement a component-based game, as that seems to be the hot thing and I like the idea of such a flexible design.  One of the features of such a design is that adding new things to the game can be done through data, often presented as loading content through text files such as XML.  This has the advantage of being human readable and easily editable in any text editor.  On the downside, text can be slower to deal with, and you have to manage a large collection of data files.  Similar text-based formats like JSON or config files would have similar benefits.&#xD;&#xA;&#xD;&#xA;On the other side, there are small, portable databases like SQLite or Tokyo Cabinet.  While not directly human readable, these files are easy to interface with, and I'd imagine some kind of editing tool would be preferable for game content design anyway.  Using a DB allows for a consistent storage of config information and easy retrieval.  You could serialize data into a DB for save games as well.  &#xD;&#xA;&#xD;&#xA;Performance wise, I think generally XML is faster for small files but a database scales better to large amounts of data.  I'd imagine any real game is going to have a whole lot of game objects.&#xD;&#xA;&#xD;&#xA;So the question:&#xD;&#xA;Which is the preferable approach?  I'm leaning towards the DB, but I want to know if there are hidden pitfalls or real strong advantages to text files.  Or if there are other alternatives besides these (serialize to binary format I guess?)" />
  <row Id="9249" PostHistoryTypeId="1" PostId="4666" RevisionGUID="ec23ba2b-a0a2-4b8b-9f8a-32cd9ecb1f12" CreationDate="2010-10-20T16:48:55.850" UserId="2491" Text="Would it be better to use XML/JSON/Text or a database to store game content?" />
  <row Id="9250" PostHistoryTypeId="3" PostId="4666" RevisionGUID="ec23ba2b-a0a2-4b8b-9f8a-32cd9ecb1f12" CreationDate="2010-10-20T16:48:55.850" UserId="2491" Text="&lt;component-based&gt;&lt;databases&gt;&lt;xml&gt;&lt;data&gt;&lt;configuration&gt;" />
  <row Id="9251" PostHistoryTypeId="2" PostId="4667" RevisionGUID="f24dbae9-662f-41c7-b644-ab637abe3685" CreationDate="2010-10-20T17:01:52.600" UserId="51" Text="Just because a game is &quot;free&quot; doesn't mean you can't monetize it.  See this question: http://gamedev.stackexchange.com/questions/297/what-are-some-common-ways-to-generate-revenue-from-a-free-game&#xD;&#xA;&#xD;&#xA;In short, &quot;freemium&quot; (namely, releasing a game for free to build up a user base and relying on microtransactions to build up revenue) is one of the better ways these days to make money on smaller games.  Which I'm assuming your game would be in order for your studio to be able to stay afloat." />
  <row Id="9252" PostHistoryTypeId="2" PostId="4668" RevisionGUID="8ad4fd1c-c134-46ee-98df-23c744f9056f" CreationDate="2010-10-20T17:03:57.793" UserId="395" Text="It might not come up so much for a small personal game, but one hard problem when it comes to game data is multi-user editing/versioning. We use a lot of small text files that get baked down to a small number of binary blobs by a build process. This makes life easier for designers since they have a lot of flexibility in their workflow. CCP, as a counter example, uses a central editing database that all designers connect to. This makes the build step unneeded (or at least a lot simpler) but it means you need to implement all the versioning and workflow features yourself, so they are bound to be simpler than other tools out there. You can deal with performance in either case, so the real question is what do you want for a designer workflow and how can you get there?" />
  <row Id="9253" PostHistoryTypeId="2" PostId="4669" RevisionGUID="b0147c7d-ebe2-4376-a068-ae493fbe55ab" CreationDate="2010-10-20T17:04:22.373" UserId="2491" Text="It depends a lot on what the two games are, your distribution channels, and what kind of time/money the team has available.&#xD;&#xA;&#xD;&#xA;Ideally, your two game ideas are somewhat similar: close themes, close genres, something.  If you get fans based on your great free racing game, then release a fantasy RPG, there won't be much cross over in the audiences.  Also, two games with similarities can share code.  You won't be &quot;wasting time&quot; making a free game first if you can reuse large chunks of the code and content as the basis for the premium new game.&#xD;&#xA;&#xD;&#xA;Distribution is important.  A free PC game and a premium Xbox game wouldn't have much crossover.  Again, you want to ensure that the audience you build up from the free game would actually be likely and able to purchase your premium offering.  Consider your options here too.  For a free PC game, you're main distribution is going to be your own website.  For a pay game, you may be able to access additional avenues like Steam or other content sellers who will open your game up to a wider audience.  If you need something out there to impress these sellers that your company is a good risk, then the free game is going to valuable both as a audience builder AND a resume booster for the company.&#xD;&#xA;&#xD;&#xA;An additional note on distribution, if you are eligible for any kind of contests or awards with either game, make sure to enter them.  Just being a contestant gets you exposure beyond your own word of mouth.  Making a free game is more appealing if you can enter it in an indie game competition and get free advertising for your website.&#xD;&#xA;&#xD;&#xA;Finally you have to honestly assess your own time.  If everyone involved is doing this as their job, you may need paying work out there now.  On the other hand, if the game design thing is a hobby outside of real work, you may be able to use advertising and donation revenue from a free game to help fund work on the premium game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Some additional thoughts:&#xD;&#xA;Let's say your two games are pretty different.  Different enough that you can't really share code or lots of audience between them.  What else is there to consider?&#xD;&#xA;&#xD;&#xA;On the free game, you might also look at how you can charge for it.  Is there premium content you can add to that?  Can you sell it as a beta on the promise of making it bigger and better in the future?  (the &quot;Minecraft model&quot; )  Can you sell a premium &quot;HD&quot; version of the free game later? (EDIT: Tetrad's excellent answer points to some further ways to monetize the free game, making it both an audience builder and a revenue stream for future game development.)&#xD;&#xA;&#xD;&#xA;On the premium game, could you spend time working on a free demo or shareware version of it?  It might be better to have a demo of your main game out there instead of a free but unrelated game." />
  <row Id="9254" PostHistoryTypeId="2" PostId="4670" RevisionGUID="2b192b79-a4a4-44a0-8088-9e69670884c8" CreationDate="2010-10-20T17:05:20.653" UserId="744" Text="It really depends on the kind of game you are making - are you doing procedural content or multiple platforms at once? Budget an extra programmer. Multiplayer? Another half a designer at least. The studio founders (I'm guessing there are between 2 and 4) should sit down and do a rough schedule for the first few games, and then figure out what the headcount should be.&#xD;&#xA;&#xD;&#xA;Some positions that are easy to overlook:&#xD;&#xA;&#xD;&#xA;* User interface designer/artist - A small studio will probably want to merge the positions, but the importance a good UI cannot be overstated for mobile games.&#xD;&#xA;* Marketing. Even if it's just your CEO pestering every gaming news site with review codes constantly and your concept-artist-web-designer-art-director putting together a press sheet, you're going to need to budget some person-time for this.&#xD;&#xA;* Testing and integration. Again, maybe this is just part of a programmer, but you should have someone whose priority is making sure your builds work and don't regress. When you don't have a fully staffed QA department, this is your only defense against 3AM checkins and oh-crap-we-need-this-immediately-for-the-demo changes." />
  <row Id="9255" PostHistoryTypeId="2" PostId="4671" RevisionGUID="acccd3e9-b0e6-433a-bf6a-1d848b7c1c7f" CreationDate="2010-10-20T17:05:28.400" UserId="891" Text="If you wanted to stay in the XML realm of things you can use **[Binary XML][1]** to help increase load performance.&#xD;&#xA;&#xD;&#xA;For example **[Fast Infoset][2]** is an implementation of binary xml&#xD;&#xA;&#xD;&#xA;&gt; One can think of Fast Infoset as gzip&#xD;&#xA;&gt; for XML, though FI aims to optimize&#xD;&#xA;&gt; both document size and processing&#xD;&#xA;&gt; performance, whereas gzip optimizes&#xD;&#xA;&gt; only the size. While the original&#xD;&#xA;&gt; formatting is lost, no information is&#xD;&#xA;&gt; lost in the conversion from XML to FI&#xD;&#xA;&gt; and back to XML.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_XML&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Fast_Infoset" />
  <row Id="9256" PostHistoryTypeId="4" PostId="4665" RevisionGUID="69a85df5-7d88-4125-a594-5e6a248488f6" CreationDate="2010-10-20T17:06:07.390" UserId="744" Comment="edited title" Text="What developer roles are important when staffing up a mobile studio?" />
  <row Id="9257" PostHistoryTypeId="5" PostId="4663" RevisionGUID="6396f3b8-5a01-4821-b2c8-7b5e6da9303a" CreationDate="2010-10-20T17:10:16.323" UserId="1477" Comment="added 20 characters in body; edited title" Text="There are two projects we can work on. One would be a small free game to try and get our name out/build an audience. The second is our main idea for a first product. &#xD;&#xA;&#xD;&#xA;What are the pros and cons of building the small, simple, free game first instead of focusing that time/effort into the main money making project." />
  <row Id="9258" PostHistoryTypeId="4" PostId="4663" RevisionGUID="6396f3b8-5a01-4821-b2c8-7b5e6da9303a" CreationDate="2010-10-20T17:10:16.323" UserId="1477" Comment="added 20 characters in body; edited title" Text="What are the pros and cons to building an audience with a small, simple, free game first as opposed to focusing efforts on a commercial release" />
  <row Id="9259" PostHistoryTypeId="5" PostId="4635" RevisionGUID="67b9c62d-5c56-42cd-9fcf-cf724cd62733" CreationDate="2010-10-20T17:28:41.513" UserId="1198" Comment="edited body" Text="Not to dodge the main title of your question, but I can offer some advice in respect to the other aspect (where should you go next, since it seems you've already decided.) C# and XNA are simply an abstraction layer above DirectX. Using C# and XNA will help you decrease time to market, and can reduce some development costs; however, that is at the expence of some performance and control.&#xD;&#xA;&#xD;&#xA;C/C++ and raw Direct X is popular because you get maximum performance and control. It really depends on your goals. Personally, I use C# and XNA because its entry level costs are basically zero (especially if you already know C#) and it only costs $99/year to be part of the Creators Club, which is only a requirement if you want to deploy your game to Xbox and or Windows Phone 7. Doing C# and XNA for Windows only is absolutly free, and can produce amazing results. At a minimum, I recommend you check it out before jumping headlong into C++ and raw Direct X." />
  <row Id="9260" PostHistoryTypeId="4" PostId="4665" RevisionGUID="a702ac6d-615a-4f5c-b33e-5daaaef23966" CreationDate="2010-10-20T17:49:19.410" UserId="1477" Comment="previous title edit limited scope" Text="What roles are important when staffing up a mobile studio?" />
  <row Id="9261" PostHistoryTypeId="2" PostId="4672" RevisionGUID="3f17da56-828a-4dbb-9e99-da73e6c188af" CreationDate="2010-10-20T17:50:42.010" UserId="2456" Text="What is elasticity? How do I implement such a thing? Thank you in advance. " />
  <row Id="9262" PostHistoryTypeId="1" PostId="4672" RevisionGUID="3f17da56-828a-4dbb-9e99-da73e6c188af" CreationDate="2010-10-20T17:50:42.010" UserId="2456" Text="C# XNA Elasticity  Behavior" />
  <row Id="9263" PostHistoryTypeId="3" PostId="4672" RevisionGUID="3f17da56-828a-4dbb-9e99-da73e6c188af" CreationDate="2010-10-20T17:50:42.010" UserId="2456" Text="&lt;c#&gt;" />
  <row Id="9264" PostHistoryTypeId="2" PostId="4673" RevisionGUID="9a7c94bc-28ba-426f-9830-65a2d4af26e7" CreationDate="2010-10-20T18:15:15.143" UserId="1902" Text="I say &quot;deceleration&quot; because I'm not using acceleration at the moment (it is being calculated, it's just set to 0 0); what I mean is moving the velocity back towards zero, eventually stopping.&#xD;&#xA;&#xD;&#xA;I'm relatively new to vectors and not so great with physics and such, how is &quot;deceleration&quot; normally handled?&#xD;&#xA;&#xD;&#xA;What I have now seems kind of hackish to me but it does work.&#xD;&#xA;&#xD;&#xA;	update:function(Game, t, dt) {&#xD;&#xA;		var speed = Game.Input.isKeyDown('shift') ? 8 : 4;&#xD;&#xA;		&#xD;&#xA;		if (Game.Input.isKeyDown('a')) {&#xD;&#xA;			this.velocity.i -= speed;&#xD;&#xA;		}&#xD;&#xA;		else if (Game.Input.isKeyDown('d')) {&#xD;&#xA;			this.velocity.i += speed;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			if (Math.abs(Math.floor(this.velocity.i)) &gt; 3) {&#xD;&#xA;				this.velocity.i += (this.velocity.i &gt; 0) ? -speed : speed;&#xD;&#xA;			}&#xD;&#xA;			else {&#xD;&#xA;				this.velocity.i = 0;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		if (Game.Input.isKeyDown('w')) {&#xD;&#xA;			this.velocity.j -= speed;&#xD;&#xA;		}&#xD;&#xA;		else if (Game.Input.isKeyDown('s')) {&#xD;&#xA;			this.velocity.j += speed;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			if (Math.abs(Math.floor(this.velocity.j)) &gt; 3) {&#xD;&#xA;				this.velocity.j += (this.velocity.j &gt; 0) ? -speed : speed;&#xD;&#xA;			}&#xD;&#xA;			else {&#xD;&#xA;				this.velocity.j = 0;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;			&#xD;&#xA;		this.updateVectors(dt);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;I used 3 because anything lower exhibits weird behaviour, I'm guessing if I raised the speed then it would need to be changed." />
  <row Id="9265" PostHistoryTypeId="1" PostId="4673" RevisionGUID="9a7c94bc-28ba-426f-9830-65a2d4af26e7" CreationDate="2010-10-20T18:15:15.143" UserId="1902" Text="Not sure how to handle &quot;deceleration&quot;." />
  <row Id="9266" PostHistoryTypeId="3" PostId="4673" RevisionGUID="9a7c94bc-28ba-426f-9830-65a2d4af26e7" CreationDate="2010-10-20T18:15:15.143" UserId="1902" Text="&lt;2d&gt;&lt;physics&gt;&lt;math&gt;&lt;2d-physics&gt;" />
  <row Id="9267" PostHistoryTypeId="2" PostId="4674" RevisionGUID="28a2fc37-cc3e-423a-b006-e523b3cac5d1" CreationDate="2010-10-20T18:16:58.663" UserId="632" Text="You're on the right track. Getting a reference to a GameComponent from other GameComponents relies on GameServices.&#xD;&#xA;&#xD;&#xA;Revised code would look something like:&#xD;&#xA;&#xD;&#xA;    var inputComponent = new InputComponent(this);&#xD;&#xA;    this.Components.Add(inputComponent);&#xD;&#xA;    this.Services.Add(typeof(IInputComponent), inputComponent);&#xD;&#xA;&#xD;&#xA;Getting the component back out from another component would look like:&#xD;&#xA;&#xD;&#xA;    var inputService = (IInputComponent)Game.GameServices.GetService(typeof(IInputComponent));&#xD;&#xA;&#xD;&#xA;More information about the GameComponent and GameServices architecture can be found here: http://www.nuclex.org/articles/architecture/6-game-components-and-game-services" />
  <row Id="9268" PostHistoryTypeId="5" PostId="4673" RevisionGUID="46604e65-6c89-4a62-9407-c8c988547a5d" CreationDate="2010-10-20T18:20:55.837" UserId="1902" Comment="stackexchange swallowed an edit" Text="I say &quot;deceleration&quot; because I'm not using acceleration at the moment (it is being calculated, it's just set to 0 0); what I mean is moving the velocity back towards zero, eventually stopping.&#xD;&#xA;&#xD;&#xA;I'm relatively new to vectors and not so great with physics and such, how is &quot;deceleration&quot; normally handled? &#xD;&#xA;&#xD;&#xA;What I have now works, but it seems kind of _hackish_.&#xD;&#xA;&#xD;&#xA;	update:function(Game, t, dt) {&#xD;&#xA;		var speed = Game.Input.isKeyDown('shift') ? 8 : 4;&#xD;&#xA;		&#xD;&#xA;		if (Game.Input.isKeyDown('a')) {&#xD;&#xA;			this.velocity.i -= speed;&#xD;&#xA;		}&#xD;&#xA;		else if (Game.Input.isKeyDown('d')) {&#xD;&#xA;			this.velocity.i += speed;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			if (Math.abs(this.velocity.i) &gt; 3) {&#xD;&#xA;				this.velocity.i += (this.velocity.i &gt; 0) ? -speed : speed;&#xD;&#xA;			}&#xD;&#xA;			else {&#xD;&#xA;				this.velocity.i = 0;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		if (Game.Input.isKeyDown('w')) {&#xD;&#xA;			this.velocity.j -= speed;&#xD;&#xA;		}&#xD;&#xA;		else if (Game.Input.isKeyDown('s')) {&#xD;&#xA;			this.velocity.j += speed;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			if (Math.abs(this.velocity.j) &gt; 3) {&#xD;&#xA;				this.velocity.j += (this.velocity.j &gt; 0) ? -speed : speed;&#xD;&#xA;			}&#xD;&#xA;			else {&#xD;&#xA;				this.velocity.j = 0;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;			&#xD;&#xA;		this.updateVectors(dt);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;I used 3 because anything lower exhibits weird behaviour, I'm guessing if I raised the speed then it would need to be changed." />
  <row Id="9269" PostHistoryTypeId="2" PostId="4675" RevisionGUID="c514f7ea-b8b1-436c-b49a-a9def5b0dff1" CreationDate="2010-10-20T18:22:29.823" UserId="891" Text="Something as simple as&#xD;&#xA;&#xD;&#xA;    this.velocity.i *= 0.9;&#xD;&#xA;&#xD;&#xA;works nicely." />
  <row Id="9270" PostHistoryTypeId="2" PostId="4676" RevisionGUID="14fce79c-7da4-4f4e-ada4-eb8ea90dc5bc" CreationDate="2010-10-20T18:24:16.897" UserId="1156" Text="Very simply put, in pseudo code:&#xD;&#xA;&#xD;&#xA;    if(no movement keys pressed) [Meaning we want to start to decelerate]&#xD;&#xA;    current speed *= 0.85 [Or some number between 0 and 1, the smaller the faster the deceleration]&#xD;&#xA;&#xD;&#xA;However, you would need to check if(current speed &lt; 0.001f) or something and set to 0." />
  <row Id="9271" PostHistoryTypeId="2" PostId="4677" RevisionGUID="51c43e01-b38a-44ab-8237-394e4f612d28" CreationDate="2010-10-20T18:53:46.270" UserId="2132" Text="I know that there are several open-source/free 2D game engines out there; I am just wondering about commercial ones (if any). The idea of wanting of looking for a commercial engine is for support and continual updates.&#xD;&#xA;&#xD;&#xA;Off the bat I know that there is DarkBasic, Blitz Basic and Torque 2D. What's else are there?" />
  <row Id="9272" PostHistoryTypeId="1" PostId="4677" RevisionGUID="51c43e01-b38a-44ab-8237-394e4f612d28" CreationDate="2010-10-20T18:53:46.270" UserId="2132" Text="Commerical 2D game engines?" />
  <row Id="9273" PostHistoryTypeId="3" PostId="4677" RevisionGUID="51c43e01-b38a-44ab-8237-394e4f612d28" CreationDate="2010-10-20T18:53:46.270" UserId="2132" Text="&lt;engine&gt;" />
  <row Id="9274" PostHistoryTypeId="16" PostId="4677" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-20T19:05:08.803" UserId="51" />
  <row Id="9275" PostHistoryTypeId="2" PostId="4678" RevisionGUID="df9c482f-2ce9-4e7b-91e4-93ab83d57843" CreationDate="2010-10-20T19:06:38.500" UserId="1970" Text="The answers here (`vel = vel * 0.9`) are actually *damping*, not what I would consider *'deceleration'*.&#xD;&#xA;&#xD;&#xA;I often do deceleration like this:&#xD;&#xA;&#xD;&#xA;	if ( Game.Input.isKeyDown( &quot;w&quot; ) )&#xD;&#xA;	{&#xD;&#xA;		this.velocity.i = Math.max( -WALKSPEED, this.velocity.i - WALKFORCE);&#xD;&#xA;	}&#xD;&#xA;	else if ( Game.Input.isKeyDown( &quot;d&quot; ) )&#xD;&#xA;	{&#xD;&#xA;		this.velocity.i = Math.min( WALKSPEED, this.velocity.i + WALKFORCE);&#xD;&#xA;	}&#xD;&#xA;	else&#xD;&#xA;	{&#xD;&#xA;		if (this.velocity.i &lt; 0)&#xD;&#xA;		{&#xD;&#xA;			this.velocity.i = Math.min( 0, this.velocity.i + WALKFORCE);&#xD;&#xA;		}&#xD;&#xA;		else if (this.velocity.i &gt; 0)&#xD;&#xA;		{&#xD;&#xA;			this.velocity.i = Math.max( 0, this.velocity.i - WALKFORCE);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Some pros and cons vs. damping:&#xD;&#xA;&#xD;&#xA;*Pros*:&#xD;&#xA;&#xD;&#xA;* The speeding up acceleration and the slowing down acceleration are both linear, which gives a pleasant subtle 'game feel' that I think damping doesn't provide. This is the **important** part.&#xD;&#xA;* The character comes to a predictable complete stop after a predictable number of iterations.&#xD;&#xA;&#xD;&#xA;*Cons*:&#xD;&#xA;&#xD;&#xA;* This is trickier to implement if you are using non-orthogonal motion (which it sounds like you are?) Basically, you have to get a force vector that is aligned with the velocity, compare lengths, and subtract or zero-out as approrpriate. (If you want that explained with code, just ask.)&#xD;&#xA;" />
  <row Id="9276" PostHistoryTypeId="6" PostId="4677" RevisionGUID="538eb15b-50dc-4c8c-9bed-f0fc6fb8af24" CreationDate="2010-10-20T19:09:44.473" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;engine&gt;" />
  <row Id="9277" PostHistoryTypeId="2" PostId="4679" RevisionGUID="e13105ba-4d13-4f2b-abd1-ade3ae8b4e8d" CreationDate="2010-10-20T19:35:20.487" UserId="619" Text="In Pseudocode, I do variations of this:&#xD;&#xA;&#xD;&#xA;Speed += ((MoveDirection * MaximumSpeed) - Speed) * AccelerationFactor&#xD;&#xA;&#xD;&#xA;Where:&#xD;&#xA;&#xD;&#xA;* Speed is the current speed the entity is travelling at on the current axis.&#xD;&#xA;* MoveDirection is the direction the entity is trying to travel in on the current axis, 1 is forward, 0 is still and -1 is backwards. All values in between are allowed.&#xD;&#xA;* MaximumSpeed is a constant determining the fastest that the entity can travel on the current axis.&#xD;&#xA;* AccelerationFactor is a constant between 0 and 1 that represents the rate of acceleration and deceleration. 1 is instant, and 0 will never move.&#xD;&#xA;&#xD;&#xA;Which handles *both* Acceleration and Deceleration nicely in a curved, rather than line. If you want different acceleration and deceleration rates you could do IF statements that determine whether the player is attempting to not move or move in the opposite direction." />
  <row Id="9279" PostHistoryTypeId="2" PostId="4680" RevisionGUID="e4a60de9-903f-47ef-8725-fa16a9445b32" CreationDate="2010-10-20T19:55:35.407" UserId="889" Text="Well it depends on what are your needs. I dont know about DarkBasic and Blitz Basic but for Torque2D, depending on your experience you will encounter some &quot;weird&quot; situations because TorqueScript is not the type of language we are really used to use. First of all it's a scripting language, and maybe it is what you need but maybe not.&#xD;&#xA;&#xD;&#xA;I Sugest you take a look on this list : [http://en.wikipedia.org/wiki/List_of_game_engines][1]&#xD;&#xA;&#xD;&#xA;As it's seems quite complete. Maybe you could tell us what are your specific needs ? This way we could sugest some engines.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_game_engines" />
  <row Id="9281" PostHistoryTypeId="5" PostId="1814" RevisionGUID="36acd04c-ac77-491e-a4de-90a0c0d43052" CreationDate="2010-10-20T21:39:12.677" UserId="891" Comment="Uploaded the linked image onto gamedev" Text="Naming is one of those things that people can spend a lot of time tossing around.  A little comedic value always makes it more memorable - for instance, the difficulty levels from Rise of the Triad were more descriptive phrases that gave it a little more character.&#xD;&#xA;&#xD;&#xA;![Rise of the Triad difficulty screen][1]&#xD;&#xA;&#xD;&#xA;Sean's advice is spot on too - theme them after something related to your game.  Here are some examples:&#xD;&#xA;&#xD;&#xA;### Street racing game using import tuner-type cars:&#xD;&#xA;* I use auto-only&#xD;&#xA;* Where's third gear?&#xD;&#xA;* There is no speed limit&#xD;&#xA;* The Flash eats my dust&#xD;&#xA;&#xD;&#xA;The intended audience is probably the type of kid who likes cars but can't drive yet, so a little attitude to goad (I mean, encourage) them wouldn't be out of line.&#xD;&#xA;&#xD;&#xA;### Puzzle game using blocks:&#xD;&#xA;* First time on the block&#xD;&#xA;* Blocks are my friends&#xD;&#xA;* Blockhead&#xD;&#xA;&#xD;&#xA;Here I use some fairly simple tie-ins with the puzzle type and the descriptions.&#xD;&#xA;&#xD;&#xA;### Farm-building whatever:&#xD;&#xA;* Mouse&#xD;&#xA;* Piglet&#xD;&#xA;* Horse&#xD;&#xA;* Cow&#xD;&#xA;&#xD;&#xA;A simple way to have the user correlate difficulty with the size of the animal.  Much more memorable than &quot;easy&quot; etc.  You could sneak in an unlockable &quot;There is no cow level&quot; if you feel snarky enough.  This goes back to one-word descriptions too, if you're sticking to that limit.&#xD;&#xA;&#xD;&#xA;### Side-scrolling platformer with very wacky theme&#xD;&#xA;* Ooze-ball&#xD;&#xA;* Magic fairy&#xD;&#xA;* Toaster&#xD;&#xA;* Spinach&#xD;&#xA;&#xD;&#xA;I'm thinking of something like Earthworm Jim, although I don't think there were more than 2 difficulty levels and I don't remember if they had names either, but this is with that in mind.  In this one, my idea was to be completely nonsensical, and try to use names for which there ARE NO correlations to difficulty.  The desired affect is to make it more memorable by being silly, and if the players talk to each other, they know immediately what they're referring to which makes it an inside joke and thus more memorable.&#xD;&#xA;&#xD;&#xA;Anyway, from these examples hopefully you get idea how to approach it.  If you're really stuck, grab a thesaurus and find synonyms for &quot;easy&quot;, etc.  At least it would be different. =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/OG7AC.jpg" />
  <row Id="9282" PostHistoryTypeId="2" PostId="4681" RevisionGUID="6325f0fb-fafb-47dc-9123-a1860b544d3e" CreationDate="2010-10-20T22:48:50.307" UserId="160" Text="[This tutorial](http://www.stuffwithstuff.com/robot-frog/3d/hills/index.html) I wrote years ago might give you something like what you want:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/lH4ek.jpg&#xD;&#xA;&#xD;&#xA;If you do the island modification in the last step, it tends towards a single landmass that doesn't reach the edge of the map." />
  <row Id="9283" PostHistoryTypeId="2" PostId="4682" RevisionGUID="5b8ff1ee-160d-4b4b-b7a7-652f9def17ef" CreationDate="2010-10-20T23:08:53.213" UserId="889" Text="What scripting language would you recommend for a C++ game project ?&#xD;&#xA;&#xD;&#xA;By scripting here I mean not just putting config data in a script, but scripting parts of the projet like some class methods, test specific game loop, etc. To accelerate development and further, allowing players to see some of theses scripts to tweak some aspect of the game.&#xD;&#xA;&#xD;&#xA;Some language like Lua benefits some wrappers like luabind, but I used it already (some time ago) and we finally had problems because it didn't support methods redefinition in a context of inheritance.&#xD;&#xA;&#xD;&#xA;So what are your sugestions of language / wrappers to use or not to use ? Maybe some great engines have the needed features, they are good answers as long as they are free. Feel free to share experience with some of theses if any, it could help having a better idea." />
  <row Id="9284" PostHistoryTypeId="1" PostId="4682" RevisionGUID="5b8ff1ee-160d-4b4b-b7a7-652f9def17ef" CreationDate="2010-10-20T23:08:53.213" UserId="889" Text="Using scipts in C++ game project" />
  <row Id="9285" PostHistoryTypeId="3" PostId="4682" RevisionGUID="5b8ff1ee-160d-4b4b-b7a7-652f9def17ef" CreationDate="2010-10-20T23:08:53.213" UserId="889" Text="&lt;c++&gt;&lt;engine&gt;&lt;programming&gt;&lt;scripting&gt;&lt;libraries&gt;" />
  <row Id="9286" PostHistoryTypeId="2" PostId="4683" RevisionGUID="e7e3002d-0767-4125-b4af-666e827d006c" CreationDate="2010-10-20T23:10:12.603" UserId="889" Text="Here are links to luabind and tolua, wrappers for lua / c++&#xD;&#xA;&#xD;&#xA;http://luabind.sourceforge.net/&#xD;&#xA;&#xD;&#xA;http://www.tecgraf.puc-rio.br/~celes/tolua/" />
  <row Id="9287" PostHistoryTypeId="2" PostId="4684" RevisionGUID="e7c54aff-462c-4f1b-a89e-3d11c14c34d6" CreationDate="2010-10-20T23:32:10.547" UserId="889" Text="I am a student in Game Programming at University and a lot of students like me are wondering the best way of entering the industry. With a bachelor degree in game programming, but no real experience in the game industry, how can students begin developing real projects ?&#xD;&#xA;&#xD;&#xA;Major game companies requires you to have 2 - 3 years of experience, so how do you guys suggest us to make our way through this selective industry ? Start in smaller buisness ? Build a kick-ass demo could maybe be enough ? Massively read all game programming books we can ?&#xD;&#xA;&#xD;&#xA;Thanks for your suggestions, the question is yours !" />
  <row Id="9288" PostHistoryTypeId="1" PostId="4684" RevisionGUID="e7c54aff-462c-4f1b-a89e-3d11c14c34d6" CreationDate="2010-10-20T23:32:10.547" UserId="889" Text="Starting career with enough education but no experience ?" />
  <row Id="9289" PostHistoryTypeId="3" PostId="4684" RevisionGUID="e7c54aff-462c-4f1b-a89e-3d11c14c34d6" CreationDate="2010-10-20T23:32:10.547" UserId="889" Text="&lt;education&gt;&lt;game-industry&gt;" />
  <row Id="9290" PostHistoryTypeId="2" PostId="4685" RevisionGUID="034e4b59-4951-4d3e-b505-5776471f2f4b" CreationDate="2010-10-20T23:44:50.977" UserDisplayName="Some2" Text="Well you need 2 things: the first one is this book: http://oreilly.com/catalog/9780596526948 and the second one is - lot of beer. Furthermore you want to learn about flash events and events handling, display list model and drawing api. When you re done with that you can take a tour in collision detection principles, sprites animation, orthogonal and isometric projection methods unless you want to go 3D. After all that learned you are fine to go, not meaning you can't learn in progressing thriugh your project. Good luck!   " />
  <row Id="9291" PostHistoryTypeId="2" PostId="4686" RevisionGUID="0375f452-e4e2-4f20-88f8-81f306842963" CreationDate="2010-10-20T23:48:18.830" UserId="2100" Text="I think one of the better ways to establish yourself in the industry is to do just that - establish yourself in the industry. Develop an independent game, keep a blog, have it heavily publicized, and then everyone is going to know who you are, or be able to find out quickly. Like you said, game companies require you to have experience, so you can apply all you want, but in the meantime one of the only ways to fulfill that requirement is to create the experience yourself. Of course, one of the key dependencies of this plan is the fact that you must put out a quality product by yourself or in a small team/business. A portfolio of any sort will give you a much better chance of succeeding than those without one." />
  <row Id="9292" PostHistoryTypeId="2" PostId="4687" RevisionGUID="307f2064-f8d8-4032-ad3e-e4d8fc455ab2" CreationDate="2010-10-21T00:16:50.043" UserId="1677" Text="I would recommend Lua.  &#xD;&#xA;[Python][1] is very popular, too. Many big game engines us it (Blender, for example).   C++::Boost has a [library][2] to work with Python.  &#xD;&#xA;I've read about [Squirell][3], but didn't use it.  &#xD;&#xA;&#xD;&#xA;You can read [this Game Engine overview][4]. There is a `Scripting` column. You can see that Lua and Python are most popular scripting languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.python.org/&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_44_0/libs/python/doc/index.html&#xD;&#xA;  [3]: http://www.python.org/&#xD;&#xA;  [4]: http://gpwiki.org/index.php/Game_Engines" />
  <row Id="9293" PostHistoryTypeId="5" PostId="4687" RevisionGUID="df3956f0-a4f2-4c28-9de1-fe4a81f7af4f" CreationDate="2010-10-21T00:22:24.220" UserId="1677" Comment="added 7 characters in body" Text="I would recommend Lua.  &#xD;&#xA;[Python][1] is very popular, too. Many featured game engines (Blender, for example) use it.  &#xD;&#xA;C++::Boost has a [library][2] to work with Python.  &#xD;&#xA;I've read about [Squirell][3], but didn't use it.  &#xD;&#xA;&#xD;&#xA;You can read [this Game Engine overview][4]. There is a `Scripting` column. You can see that Lua and Python are most popular scripting languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.python.org/&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_44_0/libs/python/doc/index.html&#xD;&#xA;  [3]: http://www.python.org/&#xD;&#xA;  [4]: http://gpwiki.org/index.php/Game_Engines" />
  <row Id="9294" PostHistoryTypeId="4" PostId="4682" RevisionGUID="8f86aa3b-4c6e-40a9-96d2-968736fca101" CreationDate="2010-10-21T00:36:51.377" UserId="51" Comment="edited title" Text="Using scripts in C++ game project" />
  <row Id="9295" PostHistoryTypeId="2" PostId="4688" RevisionGUID="caf1f7b9-534e-40df-902d-d28a7f60502c" CreationDate="2010-10-21T00:44:59.100" UserId="1272" Text="I've been liking [Chaiscript][1]; I haven't been using it for very long, but it seems pretty solid so far.&#xD;&#xA;&#xD;&#xA;Unlike Python or lua, it's built from the ground up to be used with C++. The binding process seems a lot cleaner than with luabind/etc.&#xD;&#xA;&#xD;&#xA;Here's the website's summary:&#xD;&#xA;&#xD;&#xA;&gt;ChaiScript is the first and only scripting language designed from the ground up with C++ &gt;compatibility in mind. It is an ECMAScript-inspired, embedded functional-like language.&#xD;&#xA;&gt;&#xD;&#xA;&gt;ChaiScript is licensed under the BSD license.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chaiscript.com/" />
  <row Id="9296" PostHistoryTypeId="2" PostId="4689" RevisionGUID="d97f4b2f-aaa5-4450-8a28-c6f2dd5abf8f" CreationDate="2010-10-21T02:20:01.187" UserId="154" Text="As someone trying to get into the programming side you've got two main options.&#xD;&#xA;&#xD;&#xA;**Internships**&#xD;&#xA;&#xD;&#xA;Look for any internships you can find with game companies in your area. These are a great way to get your foot in the door. Many larger publishers use internships as a try-before-you-buy plan with students. If you can prove yourself in a real production situation then you will often find a job offer at the end of that internship, if the company has open slots. &#xD;&#xA;&#xD;&#xA;However, please come into it with mindset to learn as much as you can. There are few things more annoying than a student who has spent a couple years in school and thinks they know how everything works.&#xD;&#xA;&#xD;&#xA;**Make Something, Show your Passion!**&#xD;&#xA;&#xD;&#xA;When looking at two inexperienced candidates if one of them has some software they can show that's certainly a leg up on someone that has nothing. It doesn't have to be a finished game, but obviously if another candidate has a game and you don't that looks better on them. Most importantly it needs to be easily demonstrated (have video of it running as well as the code) and you should be able to clearly explain what you did. &#xD;&#xA;&#xD;&#xA;Note, you've likely made some projects in school, but so has everyone else and often similar projects. I'd advise against showing those unless they are very good, or you've taken them far beyond the class requirements. Think about the message you send with what you show. Class work says, &quot;I couldn't be bothered to do more than the minimum.&quot; That's not the message you want to send.&#xD;&#xA;" />
  <row Id="9297" PostHistoryTypeId="2" PostId="4690" RevisionGUID="53e4c5eb-305a-4279-91e7-008fe3712dc0" CreationDate="2010-10-21T03:36:16.377" UserId="37" Text="The barrier for developing games is so low now that if you are truly interested you have no excuse not to.&#xD;&#xA;&#xD;&#xA;Use Flash, HTML5, Java, Ruby, Python, even GameMaker. You can create a game for a [game making competition][1], or just for yourself, but the important thing is to make one and complete it. It really adds a lot of perspective into what matters and what doesn't when you sit down and complete a game.&#xD;&#xA;&#xD;&#xA;Additionally be sure to get your games in front of real players and get their real feedback. All the university courses, and even industry experience are a poor proxy for seeing how real people interact with your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ludumdare.com/compo/" />
  <row Id="9298" PostHistoryTypeId="2" PostId="4691" RevisionGUID="0915535a-0f0f-458f-9165-da0231b89677" CreationDate="2010-10-21T04:45:48.957" UserId="2545" Text="I've been working in the 2d art side of games for a while now, and my full time job keeps me very busy on the art side of things, but I'm becoming more and more interested in learning to prototype my own games.&#xD;&#xA;&#xD;&#xA;I know very very little programming, though I did take some in college (in TorqueScript, of all things), and while I could probably take the time to learn it, the learning curve is a bit too steep for me as it's completely separated from my current job.&#xD;&#xA;&#xD;&#xA;I'm wondering if there are any game engines out there with an interface designed with artists in mind, where the learning curve might be easier for me, and where my current skill set will be more easily applied. I bought an indy license for Torque Game Builder but it still requires a lot of scripting and finding good, basic, entry-level tutorials is proving difficult.&#xD;&#xA;&#xD;&#xA;Basically I'm looking for a tool where I can focus on the art and game design, and where the programming is minimal, or is easy to learn and has really excellent documentation. No idea if anything like that exists, but it's worth a shot. :]&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="9299" PostHistoryTypeId="1" PostId="4691" RevisionGUID="0915535a-0f0f-458f-9165-da0231b89677" CreationDate="2010-10-21T04:45:48.957" UserId="2545" Text="Simple game engines / development tools made with artists in mind?" />
  <row Id="9300" PostHistoryTypeId="3" PostId="4691" RevisionGUID="0915535a-0f0f-458f-9165-da0231b89677" CreationDate="2010-10-21T04:45:48.957" UserId="2545" Text="&lt;game-design&gt;&lt;engine&gt;&lt;programming&gt;&lt;art&gt;" />
  <row Id="9301" PostHistoryTypeId="2" PostId="4692" RevisionGUID="ba2bc8ac-c208-475e-9735-a5338d509727" CreationDate="2010-10-21T05:01:33.780" UserId="2290" Text="My recommendation would be to check out [Unity][1], as it is one of the simplest, yet deceptively powerful, engines I have run across. The engine is [well documented][2], [the community][3] is very active and friendly, and there are a number of [tutorials][4] available to help you get up to speed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://unity3d.com/support/documentation/&#xD;&#xA;  [3]: http://unity3d.com/support/community&#xD;&#xA;  [4]: http://unity3d.com/support/resources/tutorials/" />
  <row Id="9302" PostHistoryTypeId="5" PostId="4656" RevisionGUID="ae804147-27d4-424b-b345-5ed7bdc4c538" CreationDate="2010-10-21T05:10:57.813" UserId="2545" Comment="added 1 characters in body" Text="I'd like to second what Olafur and Iain said, but to add a comment to Iain's fourth point.&#xD;&#xA;&#xD;&#xA;Characters can speak, and they can speak a lot, as long as you make sure that their dialouge builds the story, and that story is engaging. A good example of this in a 'male-oriented' game that still really appeals to me as a female, would be Red Dead Redemption. Totally opposite most of my points! But his story is very strong and emotionally engaging, so I still want to get behind him and support him, even if his experience is very hard from my own. &#xD;&#xA;&#xD;&#xA;Beyond that, I'd like to add one of the things I read in the book &quot;Gender Inclusive Game Design&quot; that always sticks with me:&#xD;&#xA;&#xD;&#xA;Have a female option for the main character!&#xD;&#xA;&#xD;&#xA;Having the option to play as male or female will already help you get your character to appeal to a wider audience, and help the female side of your audience empathize with the story. &#xD;&#xA;&#xD;&#xA;If you can only have one character option (as is necessary in some games), try to see if you can make it female instead of male. Given the option, most women prefer to play as women, and a lot of men to prefer to play as women too! (Gives them something nice to look at. :) ) &#xD;&#xA;&#xD;&#xA;If your concept has absolutely no way it can have women in the character base, then try to make your characters a little more base appealing. Some examples would be: The characters from Team Fortress 2 (Strong silhouhettes, bright colours, good humour and many options), and Link from Legend of Zelda (Androgynous enough that let's be honest, he can be a girl if you pretend hard enough). " />
  <row Id="9303" PostHistoryTypeId="2" PostId="4693" RevisionGUID="220483c9-c0fb-48bf-8cbf-5ae96714436d" CreationDate="2010-10-21T05:45:26.210" UserId="2290" Text="## [Game Job Hunter][1] ##&#xD;&#xA;&#xD;&#xA;**Cost:**&#xD;&#xA;&#xD;&#xA;- Basic job ads - Free&#xD;&#xA;- Spotlight job ads links on home page - $50/week&#xD;&#xA;- Header banner ad, appears on all pages (728x90, jpg or gif) - $250/week&#xD;&#xA;- Skyscraper ad, appears on all pages (120x600, jpg or gif) - $200/week&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamejobhunter.com/" />
  <row Id="9304" PostHistoryTypeId="5" PostId="4677" RevisionGUID="30e9ed47-d120-4192-90f7-ad81db0315c3" CreationDate="2010-10-21T06:16:19.437" UserId="2132" Comment="added 476 characters in body" Text="I know that there are several open-source/free 2D game engines out there; I am just wondering about commercial ones (if any). The idea of wanting of looking for a commercial engine is for support and continual updates.&#xD;&#xA;&#xD;&#xA;Off the bat I know that there is DarkBasic, Blitz Basic and Torque 2D. What's else are there?&#xD;&#xA;&#xD;&#xA;What I am looking for (technical wise):&#xD;&#xA;&#xD;&#xA; - Sprites and Animation capability&#xD;&#xA; - GUI (menus, dialogs, simple controls)&#xD;&#xA; - Math helper for usual math operations -vectors, rotation, turning an entity to face another...&#xD;&#xA; - Entity management&#xD;&#xA; - Particles&#xD;&#xA; - Serialization of game data&#xD;&#xA; - Level design tools&#xD;&#xA; - Deployment tools&#xD;&#xA;&#xD;&#xA;And support wise&#xD;&#xA;&#xD;&#xA;  - Documentation&#xD;&#xA;  - Examples and Tutorials&#xD;&#xA;  - Continual update&#xD;&#xA;  - Support through forum/emails/private channels" />
  <row Id="9305" PostHistoryTypeId="2" PostId="4694" RevisionGUID="f3f71be3-d0b9-43cb-b9c3-e76d4551b945" CreationDate="2010-10-21T06:20:39.817" UserId="2132" Text="For 2D rapid-prototyping, I would suggest [Game Maker][1]. It allows a designer to quickly import art assets and turn them into animated sprites, and feature a simple object system which is event based. You can prototype simple games using drag and drop.&#xD;&#xA;&#xD;&#xA;Another one I would recommend is [Multimedia Fusion][2]. It takes a different approach to programming in which it uses a big event table to handle interactions between objects. There are some simple scripting too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com&#xD;&#xA;  [2]: http://www.clickteam.com/eng/mmf2.php" />
  <row Id="9306" PostHistoryTypeId="2" PostId="4695" RevisionGUID="f33f8754-b671-4f26-ae69-ff8bc2bfc00b" CreationDate="2010-10-21T08:55:46.923" UserId="950" Text="For 2D, I think Game Maker is good. &#xD;&#xA;&#xD;&#xA;For 3D, I think 3DVIA is the better choice because you can script the engine with a graph.&#xD;&#xA;&#xD;&#xA;Unity is very good but you'll have to learn a bit of programming to make it shine." />
  <row Id="9307" PostHistoryTypeId="2" PostId="4696" RevisionGUID="4e64a724-73df-417b-b933-4a2cd07693d3" CreationDate="2010-10-21T12:03:05.777" UserId="119" Text="The important thing in the age of online news, twitter and blogs is to be well known. To get a job in the games industry you only really need to do 2 (not so easy) things:&#xD;&#xA;&#xD;&#xA; - make an amazing independent game&#xD;&#xA; - publicize your game like crazy&#xD;&#xA;&#xD;&#xA;As soon as you are &quot;that guy who created *Angry Farm*&quot; rather than some anonymous person, you will find it easy to get a foot in the door." />
  <row Id="9308" PostHistoryTypeId="2" PostId="4697" RevisionGUID="9dd462e8-0611-4678-a964-87442c32e127" CreationDate="2010-10-21T12:49:35.137" UserId="338" Text="There is a description of how the AI of killzone searched the position space to get a good position [here][1] (PDF). You could change the evaluation function to augment the value of a cover position if the AI is shooted at, or heavily damaged. Thus AI that are not shooted at would take a little more risk to get the target.   &#xD;&#xA;&#xD;&#xA;You could also add AttackingHobbo's solution, augmenting the cover interest depending on the fear factor (ie 0 : i'm invincible / 1 : i take care / 5 please make it stop)&#xD;&#xA;&#xD;&#xA;regards&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cgf-ai.com/docs/straatman_remco_killzone_ai.pdf" />
  <row Id="9309" PostHistoryTypeId="5" PostId="4692" RevisionGUID="fbcc31d4-a3d5-4bb2-a32a-7a91c51d7e4f" CreationDate="2010-10-21T13:58:53.860" UserId="2290" Comment="added 585 characters in body" Text="My recommendation would be to check out [Unity][1], as it is one of the simplest, yet deceptively powerful, engines I have run across. The engine is [well documented][2], [the community][3] is very active and friendly, and there are a number of [tutorials][4] available to help you get up to speed.&#xD;&#xA;&#xD;&#xA;**Update:** Although Unity has a bit of a learning curve, I chose to recommend it over other engines for a couple of reasons:&#xD;&#xA;&#xD;&#xA; - **Workflow** - Unlike simpler engines out there, Unity uses a workflow that is similar in many aspects to what is used in the game industry, meaning that your time spent learning is an investment toward your career, not just learning a tool.&#xD;&#xA; - **Support** - Unity has a very active and friendly community, which is something a lot of smaller engines don't have.&#xD;&#xA; - **Power** -  Unity comes with a lot of features and supports a number of platforms.&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://unity3d.com/support/documentation/&#xD;&#xA;  [3]: http://unity3d.com/support/community&#xD;&#xA;  [4]: http://unity3d.com/support/resources/tutorials/" />
  <row Id="9310" PostHistoryTypeId="2" PostId="4698" RevisionGUID="1792b105-9d98-424d-a3a8-90517b7eda75" CreationDate="2010-10-21T14:03:59.793" UserId="2615" Text="I want to make a very simple &quot;escape the room&quot; game.  I was hoping for something that looks something like [this](http://www.escapetheroomgames.net/play-11952-raysroom.html).  You would see images of some room and you click around to move or to add things to inventory.  Then, you can select something in your inventory to use that item with something on the screen.  During the whole game there would be a text box describing what is happening (probably in really broken English instead of Japanese).&#xD;&#xA;&#xD;&#xA;I am looking for something that can be quite simple.  I would prefer to have the ability to play sound (probably mp3's) when something happens.  It can be web-based or a downloaded executable or .jar file.  It doesn't have to be perfect, just a proof-of-concept really.&#xD;&#xA;&#xD;&#xA;What is the best approach to get this game working with minimal effort?  Are there some libraries that can help?  I have plenty of Java experience and some C++, PHP, and others.  I'd rather avoid Windows-based technology as I primarily run Linux.  I am willing to learn other languages if they have a huge advantage.&#xD;&#xA;&#xD;&#xA;Ideally, if someone could point me to an example program that I can modify.  I'm not expecting to sell or distribute this game." />
  <row Id="9311" PostHistoryTypeId="1" PostId="4698" RevisionGUID="1792b105-9d98-424d-a3a8-90517b7eda75" CreationDate="2010-10-21T14:03:59.793" UserId="2615" Text="How to make a simple escape the room game?" />
  <row Id="9312" PostHistoryTypeId="3" PostId="4698" RevisionGUID="1792b105-9d98-424d-a3a8-90517b7eda75" CreationDate="2010-10-21T14:03:59.793" UserId="2615" Text="&lt;game-design&gt;&lt;linux&gt;" />
  <row Id="9313" PostHistoryTypeId="2" PostId="4699" RevisionGUID="6449083a-f435-49cc-afe7-c043eb866019" CreationDate="2010-10-21T14:21:03.803" UserId="2290" Text="Personally, I'd recommend sticking to the programming language you know best, and checking out the graphic/audio libraries available to you. If you're familiar with Flash, there is a [tutorial on how to make a basic escape the room game][1]. Even if you don't know Flash, that tutorial should help give you an idea as to how such games are constructed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tutorialized.com/tutorial/Escape-the-Room-game-tutorial/33960" />
  <row Id="9314" PostHistoryTypeId="2" PostId="4700" RevisionGUID="53207f53-cb77-430b-bc7e-015bc26d0d07" CreationDate="2010-10-21T14:24:27.657" UserId="249" Text="Depends on the style of game. It's fairly common to let level designers place cover objects, which can be either a volume, a shape representing a covering object or a node. This is more labor-intensive for LDs but gives much more control, which is usually wanted in a tightly scripted game.&#xD;&#xA;&#xD;&#xA;For open-world games, you need an automatic cover detection system. We used one that detected cover at runtime in Battlefield: Bad Company (1 &amp; 2) in order to be able to invalidate and re-detect on environmental destruction." />
  <row Id="9319" PostHistoryTypeId="2" PostId="4702" RevisionGUID="ebfb312f-2678-4947-ab6f-95e47ca5f94f" CreationDate="2010-10-21T15:10:01.227" UserId="20" Text="The [Blender Game Engine][1] might also be worth a look. It is part of the free 3d animation and modelling software [Blender][2]. It doesn't require any programming skills to create something but is also extendable by using python scripting.&#xD;&#xA;This probably only makes sense if you're using blender for asset creation anyway though.&#xD;&#xA;&#xD;&#xA;[1]: http://wiki.blender.org/index.php/Doc:Manual/Game_Engine#Blender_Game_Engine_Overview&#xD;&#xA;[2]: http://blender3d.org" />
  <row Id="9320" PostHistoryTypeId="2" PostId="4703" RevisionGUID="6c1ebcf1-6cfc-43be-9782-deb8227d859b" CreationDate="2010-10-21T15:11:32.707" UserId="2567" Text="Has anyone found an official spec or documentation on the XFL file layout?&#xD;&#xA;&#xD;&#xA;Are there any design tools in existence or planned that can create XFL files? (Besides the official Adobe Flash Professional program)" />
  <row Id="9321" PostHistoryTypeId="1" PostId="4703" RevisionGUID="6c1ebcf1-6cfc-43be-9782-deb8227d859b" CreationDate="2010-10-21T15:11:32.707" UserId="2567" Text="Documentation/Spec for Flash's XFL layout?" />
  <row Id="9322" PostHistoryTypeId="3" PostId="4703" RevisionGUID="6c1ebcf1-6cfc-43be-9782-deb8227d859b" CreationDate="2010-10-21T15:11:32.707" UserId="2567" Text="&lt;flash&gt;" />
  <row Id="9323" PostHistoryTypeId="2" PostId="4704" RevisionGUID="25ba08ef-c708-4d2f-a323-d5a2ae9b5a5e" CreationDate="2010-10-21T15:12:58.570" UserId="458" Text="It all depends on the games themselves, and the team that's working on them. &#xD;&#xA;&#xD;&#xA;If for example the small game is a Breakout clone and the large game is a full-scale RPG, the former won't really help &quot;establish&quot; you to do the latter.&#xD;&#xA;&#xD;&#xA;If the small game isn't a project worth doing in its own right -- if it's just a derivative clone or similarly uninspired -- then the only thing it will &quot;establish&quot; is that your team doesn't know how to make a great game.&#xD;&#xA;&#xD;&#xA;If your team has not made a game before at all, then it IS worth working on (and completing) one or more small projects, but the purpose of these is not to get your name out there, it's to get experience completing projects. It is very easy to start a large project with grand plans and huge ideas, only to never finish it because the scope is just too large for the team. An inexperienced team would do well to work on a few simpler projects first, whether they are released or not, simply to get a feel for what it's like to work together on a team.&#xD;&#xA;&#xD;&#xA;Then there's the question of burn rate. Do you NEED to make money to support yourselves, or do you all have day jobs? How soon do you need to be profitable? Do you have a business plan? Are you actually treating this like a business, or is this just the three-guys-in-a-garage model where it's great if you make money but that's not the priority? If this is a business question, then top priority should be to halt development until you create a viable business plan first, and once you have one, that should answer your question right there." />
  <row Id="9324" PostHistoryTypeId="2" PostId="4705" RevisionGUID="dfae6292-9eca-4fc2-9298-c02570cc4b87" CreationDate="2010-10-21T15:20:49.843" UserId="458" Text="The good news about card games is, they are some of the simplest to program, so this is a great first project for getting into game dev. Why? Because you don't have to deal with a great deal of graphics (simple sprites for the cards, no scrolling, no 3d, not even necessarily any animation) nor do you require realtime input (when you say &quot;trump based&quot; I assume this is a turn-based game where you select cards one at a time to take tricks), so the event-driven programming that you're used to in more general software development can apply here just fine.&#xD;&#xA;&#xD;&#xA;If you're an experienced programmer, there are likely only two things you'll need to learn here. One is how to draw sprites to the screen, which is not terribly hard -- there are tons of libraries that will let you do this, PyGame has the functionality built in if you go with Python. The other is, assuming this is a multiplayer game to be played over the internet, you'll need to figure out how to establish a connection and send messages over a network. But that's really it... aside from that, treat it like any other software project." />
  <row Id="9325" PostHistoryTypeId="2" PostId="4706" RevisionGUID="3723f6a9-1e98-4ba9-bf65-96d3e2f0445e" CreationDate="2010-10-21T15:43:37.560" UserId="93" Text="I'd suggest you check out [UDK][1] (the free-to-download Unreal engine and tools). There instead of having to write script, they have a system called [Kismet][2] which allows you to 'script' a lot of the typical gameplay events using a drag-drop system. What's more, there's a whole [video tutorial series][3] recorded by the good people at [3DBuzz][4]. Ofc it's a 3d engine which might not suit, but there are tutorials on how to create a top-down game with it.&#xD;&#xA;&#xD;&#xA;The trouble with most of the other suggestions here is that while they are good systems, they still require you to learn a programming language and if you found TorqueScript too much of a learning curve then I doubt Python (as used by Blender) or some of the other options are going to be any easier (although they are better documented than TorqueScript - everything is better documented than Torquescript :) )&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/&#xD;&#xA;  [2]: http://www.udk.com/features-scripting&#xD;&#xA;  [3]: http://www.udk.com/documentation&#xD;&#xA;  [4]: http://www.3dbuzz.com/" />
  <row Id="9326" PostHistoryTypeId="2" PostId="4707" RevisionGUID="d1efdb08-abd1-45a2-a473-bc196c141b14" CreationDate="2010-10-21T17:00:51.903" UserId="802" Text="I have a game in which the player earns money for wining races and, then, he can spend that money to unlock new levels or to improve his vehicle. Now, I am choosing the money you earn and the prices of things without a clear criteria, I just test them and see if it feels right... Do you think there is a better way? How do you do it?" />
  <row Id="9327" PostHistoryTypeId="1" PostId="4707" RevisionGUID="d1efdb08-abd1-45a2-a473-bc196c141b14" CreationDate="2010-10-21T17:00:51.903" UserId="802" Text="How do you choose the right price of items in your games?" />
  <row Id="9328" PostHistoryTypeId="3" PostId="4707" RevisionGUID="d1efdb08-abd1-45a2-a473-bc196c141b14" CreationDate="2010-10-21T17:00:51.903" UserId="802" Text="&lt;game-design&gt;" />
  <row Id="9329" PostHistoryTypeId="2" PostId="4708" RevisionGUID="e039349f-79ad-4485-965d-496abc2b5db8" CreationDate="2010-10-21T17:31:27.657" UserId="154" Text="Build yourself an Excel spreadsheet. There you can calculate exactly how much money a player who is placing first each race will have acquired at any point in the game. The same goes for a player at the bottom end of your payout bracket.&#xD;&#xA;&#xD;&#xA;Once you know the money range for a good/bad player then just ask yourself how many parts do you want them to be able to buy after 1 race, after 3 races, after X races. You can plot the cost of the parts vs. the income of the players over time. &#xD;&#xA;&#xD;&#xA;Using VBscript you should be able to play through the entire progression game in Excel." />
  <row Id="9330" PostHistoryTypeId="5" PostId="716" RevisionGUID="2ffae31f-4698-49c0-99dc-92db9c009904" CreationDate="2010-10-21T18:14:30.437" UserId="241" Comment="fixed grammar" Text="What properties make the main character of a game such that players can easily identify with it? Can the same set properties be used when designing the NPC characters players interact with, or should a different set of properties be considered? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="9331" PostHistoryTypeId="6" PostId="4707" RevisionGUID="b2f90296-ecfc-4462-b012-698109df5f6c" CreationDate="2010-10-21T19:41:32.483" UserId="802" Comment="edited tags" Text="&lt;game-design&gt;&lt;balance&gt;" />
  <row Id="9332" PostHistoryTypeId="2" PostId="4709" RevisionGUID="a1c0d993-540a-44a4-bbd3-f6501424b7a8" CreationDate="2010-10-21T20:10:03.213" UserId="490" Text="You have to add a new App to iTunes Connect in order to use Game Center.&#xD;&#xA;&#xD;&#xA;However, all of the data can be bogus (it just needs to be valid) and you can change it later. Except for the App's name if I remember correctly. If you need to change that, you can still simply create a new App with the desired name, and then transfer the Achievements and Leaderboards setup to the new App, which is a bit of work but nothing you can't do in an hour or so.&#xD;&#xA;&#xD;&#xA;A lot of the restrictions about what you can't edit in hindsight is only in regards to an App that has been submitted and approved. That's when a few things get locked in, I think keywords being one of them. Even then you can submit an update of your App and you'll be able to change some of the App's data that's otherwise no longer editable.&#xD;&#xA;" />
  <row Id="9333" PostHistoryTypeId="2" PostId="4710" RevisionGUID="b036a580-32d8-4050-8289-98444ffcf69a" CreationDate="2010-10-21T20:21:09.913" UserId="1885" Text="If I develop a game using gamecenter, does itunes connect lock me in to only supporting 3GS and above with iOS 4.0 and above, or will it still allow sales of my game on older devices (as long as I build in fallback so it never calls gamecenter framework)?" />
  <row Id="9334" PostHistoryTypeId="1" PostId="4710" RevisionGUID="b036a580-32d8-4050-8289-98444ffcf69a" CreationDate="2010-10-21T20:21:09.913" UserId="1885" Text="Game uses gamecenter in iphone - can I design a fallback for 3G and prior devices?" />
  <row Id="9335" PostHistoryTypeId="3" PostId="4710" RevisionGUID="b036a580-32d8-4050-8289-98444ffcf69a" CreationDate="2010-10-21T20:21:09.913" UserId="1885" Text="&lt;iphone&gt;" />
  <row Id="9336" PostHistoryTypeId="2" PostId="4711" RevisionGUID="99f33e8f-8e75-40ac-a4d6-e51fdc2bdb13" CreationDate="2010-10-21T20:22:26.960" UserId="490" Text="These are the ones I know of which are commercial and 2D, at least primarily. Pushbutton is an edge case, since the engine is free but components cost money. If you take that into account, I guess a few more engines could be seen as commercial if you count the byproducts that are being sold. Cocos2D for iPhone would be an example for that, or SIO2 Interactive.&#xD;&#xA;&#xD;&#xA; - [Corona Game Edition][1] (Lua) iOS &amp; Android&#xD;&#xA; - [Kanji 2D Game Engine][2] (Win, Mac, iOS)&#xD;&#xA; - [PushButton Engine][3] (Flash) Only components are commercial.&#xD;&#xA; - [DragonFire SDK][4] (iOS Development&#xD;&#xA;   in Windows)&#xD;&#xA; - [GameSalad][5] Game Creator for iOS&#xD;&#xA; - [Stencyl][6] Game Creator for Flixel&#xD;&#xA; - [The Games Factory 2][7] Game Creator&#xD;&#xA; - [Game Maker 8][8] Game Creator&#xD;&#xA;&#xD;&#xA;Plus all the other, specialized Game Creators. For example for RPGs, Adventures, Shoot'em Ups, Jump'n Runs, etc ...&#xD;&#xA;&#xD;&#xA;  [1]: http://anscamobile.com/corona&#xD;&#xA;  [2]: http://www.kanjiengine.com/cms/&#xD;&#xA;  [3]: http://pushbuttonengine.com/&#xD;&#xA;  [4]: http://www.dragonfiresdk.com/index.htm&#xD;&#xA;  [5]: http://www.gamesalad.com&#xD;&#xA;  [6]: http://www.stencyl.com/&#xD;&#xA;  [7]: http://www.clickteam.com/website/usa/the-games-factory-2.html&#xD;&#xA;  [8]: http://www.yoyogames.com/gamemaker/" />
  <row Id="9337" PostHistoryTypeId="6" PostId="4710" RevisionGUID="b5e34cc0-84c2-4f0d-8b51-9987e0e9f8f1" CreationDate="2010-10-21T20:32:06.277" UserId="1156" Comment="edited tags" Text="&lt;iphone&gt;&lt;game-center&gt;" />
  <row Id="9338" PostHistoryTypeId="2" PostId="4712" RevisionGUID="dd73d9f9-dbbe-4216-abe7-66d5a93befa6" CreationDate="2010-10-21T21:18:45.267" UserId="8" Text="You can include Game Center without limiting which devices can run your game. First you have to set the 'Base SDK' to 4.1 or higher and the 'Deployment Target' to the minimum you want to support e.g. 3.1.3. Then you weak link and use GameKit as described in the Apple docs about [Optionally Using Game Center In Your Application][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/GameCenterOverview/GameCenterOverview.html" />
  <row Id="9339" PostHistoryTypeId="5" PostId="4711" RevisionGUID="71480da6-859b-4594-9693-faaf55f002a7" CreationDate="2010-10-21T21:19:38.710" UserId="490" Comment="added 77 characters in body" Text="These are the ones I know of which are commercial and 2D, at least primarily. Pushbutton is an edge case, since the engine is free but components cost money. If you take that into account, I guess a few more engines could be seen as commercial if you count the byproducts that are being sold. Cocos2D for iPhone would be an example for that, or SIO2 Interactive.&#xD;&#xA;&#xD;&#xA; - [Corona Game Edition][1] (Lua) iOS &amp; Android&#xD;&#xA; - [Kanji 2D Game Engine][2] (Win, Mac, iOS)&#xD;&#xA; - [PushButton Engine][3] (Flash) Only components are commercial.&#xD;&#xA; - [DragonFire SDK][4] (iOS Development&#xD;&#xA;   in Windows)&#xD;&#xA; - [GameSalad][5] Game Creator for iOS&#xD;&#xA; - [Stencyl][6] Game Creator for Flixel&#xD;&#xA; - [The Games Factory 2][7] Game Creator&#xD;&#xA; - [Game Maker 8][8] Game Creator&#xD;&#xA; - [Game Editor][9] Game Creator&#xD;&#xA;&#xD;&#xA;Plus all the other, specialized Game Creators. For example for RPGs, Adventures, Shoot'em Ups, Jump'n Runs, etc ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://anscamobile.com/corona&#xD;&#xA;  [2]: http://www.kanjiengine.com/cms/&#xD;&#xA;  [3]: http://pushbuttonengine.com/&#xD;&#xA;  [4]: http://www.dragonfiresdk.com/index.htm&#xD;&#xA;  [5]: http://www.gamesalad.com&#xD;&#xA;  [6]: http://www.stencyl.com/&#xD;&#xA;  [7]: http://www.clickteam.com/website/usa/the-games-factory-2.html&#xD;&#xA;  [8]: http://www.yoyogames.com/gamemaker/&#xD;&#xA;  [9]: http://game-editor.com/Main_Page" />
  <row Id="9340" PostHistoryTypeId="2" PostId="4713" RevisionGUID="ce078f37-a58a-44cd-9d31-fe3a1c98f7e0" CreationDate="2010-10-21T21:20:42.893" UserId="490" Text="I think you would do well choosing one of the many game making tools. There's little to no programming involved. Some even offer graphical, drag &amp; drop programming interfaces.&#xD;&#xA;&#xD;&#xA; - [GameSalad][5] Game Creator for iOS&#xD;&#xA; - [Stencyl][6] Game Creator for Flixel&#xD;&#xA; - [The Games Factory 2][7] Game Creator&#xD;&#xA; - [Game Maker 8][8] Game Creator&#xD;&#xA; - [Game Editor][9] Game Creator&#xD;&#xA;&#xD;&#xA;  [1]: http://anscamobile.com/corona&#xD;&#xA;  [2]: http://www.kanjiengine.com/cms/&#xD;&#xA;  [3]: http://pushbuttonengine.com/&#xD;&#xA;  [4]: http://www.dragonfiresdk.com/index.htm&#xD;&#xA;  [5]: http://www.gamesalad.com&#xD;&#xA;  [6]: http://www.stencyl.com/&#xD;&#xA;  [7]: http://www.clickteam.com/website/usa/the-games-factory-2.html&#xD;&#xA;  [8]: http://www.yoyogames.com/gamemaker/&#xD;&#xA;  [9]: http://game-editor.com/Main_Page" />
  <row Id="9342" PostHistoryTypeId="2" PostId="4714" RevisionGUID="faee40a8-1206-4817-af27-4288394d84b4" CreationDate="2010-10-21T23:39:33.147" UserId="1677" Text="[Gamasutra. &quot;It Builds Character: Character Development Techniques in Games&quot; by Rafael Chandler][1] Inspiring technique to create interesting Game Characters using Tarot Deck.&#xD;&#xA;&#xD;&#xA;&quot;[Creating Emotion in Games: The Craft and Art of Emotioneering&quot; By David Freeman][2] (ISBN : 1-5927-3007-8):&#xD;&#xA;&#xD;&#xA;Chapter 2.1. Emotioneering Techniques Category #1: NPC Interesting Techniques  &#xD;&#xA;Chapter 2.2. Emotioneering Techniques Category #2: NPC Deepening Techniques &#xD;&#xA;&#xD;&#xA;Freeman describes &quot;Character Diamond&quot; technique:&#xD;&#xA;&gt; Character Diamond - The group of Traits (personality aspects) — usually four, but sometimes three or five—that determine how a major character sees the world, thinks, speaks, and acts. Having a Character Diamond of three to five Traits makes characters dimensional. Character Diamonds make characters interesting, but not deep—unless some of the character's Traits are also Deepening Techniques. Major NPCs, as well as the character played by the gamer, can have Character Diamonds.&#xD;&#xA;&#xD;&#xA;Example of Character Diamond - Han Solo:&#xD;&#xA;&#xD;&#xA; 1. Swashbuckling&#xD;&#xA; 2. Brave&#xD;&#xA; 3. Have a dry wit&#xD;&#xA; 4. A bit arrogant&#xD;&#xA;&#xD;&#xA;Example for Gandolf:&#xD;&#xA;&#xD;&#xA; 1. Magical&#xD;&#xA; 2. Mysterious&#xD;&#xA; 3. Good&#xD;&#xA; 4. Wise&#xD;&#xA;&#xD;&#xA;I found this method very simple and useful.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/2369/it_builds_character_character_.php&#xD;&#xA;  [2]: http://www.amazon.com/Creating-Emotion-Games-Craft-Emotioneering/dp/1592730078" />
  <row Id="9343" PostHistoryTypeId="4" PostId="4677" RevisionGUID="6a5cd473-28ea-4f30-b0a0-f58be15dda8e" CreationDate="2010-10-22T00:19:38.160" UserId="51" Comment="edited title" Text="Commercial 2D game engines?" />
  <row Id="9344" PostHistoryTypeId="2" PostId="4715" RevisionGUID="512b5307-8eb1-4bf8-b6c1-154046fd9c16" CreationDate="2010-10-22T00:29:05.867" UserId="1413" Text="I know you've already marked an answer on this, but just another thought to throw out there: If you have a solid portfolio of art &amp; game design, finding a programmer to help you prototype out some stuff and maybe even make a full game would be a good way to prototype without having to code yourself. Its not exactly a tool persay, but depending on your intent it might be the most effective way. &#xD;&#xA;&#xD;&#xA;Obviously with a tool you don't have to worry about depending on or motivating someone else. However it can also release you from having to fight the beast that is code even in something like Unity, letting you handle the creative side with all your effort.&#xD;&#xA;&#xD;&#xA;I know as a programmer with the opposite problem, ie looking for ways to make art with minimal effort, I have found working with an artist to be a much more delightful experience than working both disciplines myself and trying to do art through the most minimal tools. ;)" />
  <row Id="9346" PostHistoryTypeId="2" PostId="4716" RevisionGUID="60ea73f4-d088-45d6-b4b1-90eb93b6bb33" CreationDate="2010-10-22T01:50:21.907" UserId="2625" Text="You have plenty of Java experience? Use Java.&#xD;&#xA;&#xD;&#xA;[Famous games written in Java][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java" />
  <row Id="9347" PostHistoryTypeId="2" PostId="4717" RevisionGUID="acb96efe-c479-4b67-a0b3-63853e1a28bf" CreationDate="2010-10-22T01:55:31.070" UserId="2625" Text="[Lua-scripted video games][1]  &#xD;&#xA;[Lua-scriptable game engines][2]&#xD;&#xA;&#xD;&#xA;I think Lua is the best shot.&#xD;&#xA;&#xD;&#xA;[This article][3] is about integrating Lua and C++. It says:&#xD;&#xA;&#xD;&#xA;&gt; LuaBind is great product but for me it looked too complicated. For one the code is not easy to follow where the classes and objects are. Also seeing that I wanted to integrate Lua into a wxWidgets application, using templates was a bit of a no no (you can read cross-platform issues on the wxWidgets site).&#xD;&#xA;&#xD;&#xA;There are many other binding libraries:&#xD;&#xA;&#xD;&#xA;http://luabridge.sourceforge.net/  &#xD;&#xA;http://www.stackedboxes.org/~lmb/diluculum/  &#xD;&#xA;http://cpplua.sourceforge.net/  &#xD;&#xA;http://www.tecgraf.puc-rio.br/~celes/tolua/&#xD;&#xA;&#xD;&#xA;[What is the best C++/Lua wrapper?][4]&#xD;&#xA;&#xD;&#xA;Just select and enjoy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Category:Lua-scripted_video_games&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Category:Lua-scriptable_game_engines&#xD;&#xA;  [3]: http://www.codeproject.com/KB/cpp/luaincpp.aspx&#xD;&#xA;  [4]: http://www.gamedev.net/community/forums/topic.asp?topic_id=301533&#xD;&#xA;" />
  <row Id="9348" PostHistoryTypeId="5" PostId="4656" RevisionGUID="c9f4bf49-7661-454e-839b-9178f83472b4" CreationDate="2010-10-22T04:59:03.220" UserId="2545" Comment="word change" Text="I'd like to second what Olafur and Iain said, but to add a comment to Iain's fourth point.&#xD;&#xA;&#xD;&#xA;Characters can speak, and they can speak a lot, as long as you make sure that their dialouge builds the story, and that story is engaging. A good example of this in a 'male-oriented' game that still really appeals to me as a female, would be Red Dead Redemption. Totally opposite most of my points! But his story is very strong and emotionally engaging, so I still want to get behind him and support him, even if his experience is very differnt from my own. &#xD;&#xA;&#xD;&#xA;Beyond that, I'd like to add one of the things I read in the book &quot;Gender Inclusive Game Design&quot; that always sticks with me:&#xD;&#xA;&#xD;&#xA;Have a female option for the main character!&#xD;&#xA;&#xD;&#xA;Having the option to play as male or female will already help you get your character to appeal to a wider audience, and help the female side of your audience empathize with the story. &#xD;&#xA;&#xD;&#xA;If you can only have one character option (as is necessary in some games), try to see if you can make it female instead of male. Given the option, most women prefer to play as women, and a lot of men to prefer to play as women too! (Gives them something nice to look at. :) ) &#xD;&#xA;&#xD;&#xA;If your concept has absolutely no way it can have women in the character base, then try to make your characters a little more base appealing. Some examples would be: The characters from Team Fortress 2 (Strong silhouhettes, bright colours, good humour and many options), and Link from Legend of Zelda (Androgynous enough that let's be honest, he can be a girl if you pretend hard enough). " />
  <row Id="9349" PostHistoryTypeId="2" PostId="4718" RevisionGUID="3b1d4150-fb43-4a27-ad23-b1d00aba12e9" CreationDate="2010-10-22T06:35:04.193" UserDisplayName="Claudiu" Text="If you plan to stick with C++, you could give a try to Allegro ( http://www.allegro.cc/ ) Simple to learn and suitable for what you need. Technically tough, I see this easier to build with PHP and some Javascript, without any libraries except maybe jQuery. It's all up to which language you're more comfortable with." />
  <row Id="9350" PostHistoryTypeId="2" PostId="4719" RevisionGUID="955c6472-30d2-4e28-81ee-0f419f0e6ce2" CreationDate="2010-10-22T07:22:38.567" UserId="2289" Text="I have several Spline2D objects in my code, each of which has a Position, Velocity, and Acceleration method that returns a vector of the specified quantity at a particular time. I've been using these vectors in order to construct geometry to create gradient strokes for the curves, but I'm having problems with self-intersections at steep curves. As an example, here's one curve where I'm having this occur:&#xD;&#xA;&#xD;&#xA;Wireframe: http://twitpic.com/2zplw1/full  &#xD;&#xA;Filled: http://twitpic.com/2zpmnt/full&#xD;&#xA;&#xD;&#xA;As you can see, on the second bend, the inner portion intersects itself, which causes that ugly artifact. Is there a good algorithm/method to stroke curves without causing that self-intersection?" />
  <row Id="9351" PostHistoryTypeId="1" PostId="4719" RevisionGUID="955c6472-30d2-4e28-81ee-0f419f0e6ce2" CreationDate="2010-10-22T07:22:38.567" UserId="2289" Text="How to avoid self-intersection when stroking a curve?" />
  <row Id="9352" PostHistoryTypeId="3" PostId="4719" RevisionGUID="955c6472-30d2-4e28-81ee-0f419f0e6ce2" CreationDate="2010-10-22T07:22:38.567" UserId="2289" Text="&lt;algorithm&gt;&lt;splines&gt;" />
  <row Id="9353" PostHistoryTypeId="2" PostId="4720" RevisionGUID="33e64597-7dc3-472d-baf8-e7b13d987c99" CreationDate="2010-10-22T07:41:50.300" UserId="2629" Text="You can use the Wintermute adventure engine http://dead-code.org/home/index.php/lang-pref/en/" />
  <row Id="9354" PostHistoryTypeId="5" PostId="4687" RevisionGUID="0b037de5-e70f-43df-9153-09a539265133" CreationDate="2010-10-22T11:22:55.397" UserId="1677" Comment="deleted 5 characters in body; added 7 characters in body" Text="I would recommend Lua.  &#xD;&#xA;[Python][1] is very popular, too. Many featured game engines (Blender, for example) use it.  &#xD;&#xA;C++::Boost has a [library][2] to work with Python.  &#xD;&#xA;I've read about [Squirell][3], but didn't use it.  &#xD;&#xA;&#xD;&#xA;You can read [this Game Engine overview][4]. There is a `Scripting` column. You can see that Lua and Python are most popular scripting languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.python.org/&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_44_0/libs/python/doc/index.html&#xD;&#xA;  [3]: http://squirrel-lang.org&#xD;&#xA;  [4]: http://gpwiki.org/index.php/Game_Engines" />
  <row Id="9355" PostHistoryTypeId="2" PostId="4721" RevisionGUID="d7272c08-f345-4361-921e-d522b0b9170b" CreationDate="2010-10-22T13:30:59.677" UserId="2632" Text="I'm coming to the end of my first year of CS which has been primarily a Java based course. I'd like to get my feet wet with some game development but I'm not sure where to start.&#xD;&#xA;&#xD;&#xA;Some people have suggested I start with game maker which has a C-styled scripting language(which should be easy to pick up) as it is probably the simplest and allows me to focus mainly on the game design and how the whole game fits together.&#xD;&#xA;&#xD;&#xA;I see a lot people recommended XNA, as it has good abstraction of opengl and directX through its APIs. I also hear C# is very similar to Java.&#xD;&#xA;&#xD;&#xA;I have also considered game programming in Java since I am quite comfortable with it and have been doing extra reading on multi-threading and the 2d graphics APIs.&#xD;&#xA;&#xD;&#xA;Finally, a friend has recently shown me pygame which also sounds very good although I don't know all that much about it.&#xD;&#xA;&#xD;&#xA;I don't know if C++ is a good starting point, a lot of the posts I've seen for beginner game devs don't recommend it for a first game project.&#xD;&#xA;&#xD;&#xA;I'd appreciate any input, especially from those who got into game dev from a Java background&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9356" PostHistoryTypeId="1" PostId="4721" RevisionGUID="d7272c08-f345-4361-921e-d522b0b9170b" CreationDate="2010-10-22T13:30:59.677" UserId="2632" Text="Advice for a first year CS major" />
  <row Id="9357" PostHistoryTypeId="3" PostId="4721" RevisionGUID="d7272c08-f345-4361-921e-d522b0b9170b" CreationDate="2010-10-22T13:30:59.677" UserId="2632" Text="&lt;game-design&gt;&lt;java&gt;" />
  <row Id="9358" PostHistoryTypeId="2" PostId="4722" RevisionGUID="2d231d4d-5527-4826-8689-95e4f0108df6" CreationDate="2010-10-22T13:35:52.040" UserId="1101" Text="Remember, price is a placeholder for value or utility. You should have an idea of how much value a player should get from winning a race, ie. how much that should benefit them in a future race. When you know the relative values of the different items you can buy, then you can assign prices to them based on those values." />
  <row Id="9359" PostHistoryTypeId="2" PostId="4723" RevisionGUID="d36c4b98-019e-4440-9a3e-532ad9711093" CreationDate="2010-10-22T13:56:23.750" UserId="1742" Text="The &quot;Fix&quot; is going to depend on what you want the resultant output to look like. The problem hasn't reallly been defined well enough here: what's it meant to look like?&#xD;&#xA;&#xD;&#xA;I'd suggest you first try making an even more extreme example of the glitch, then using photoshop/paint to fix it you might find inspiration for a solution.&#xD;&#xA;&#xD;&#xA;Do you want it to fold up? Overlap with the edge? Pull in until it doesn't overlap?" />
  <row Id="9360" PostHistoryTypeId="2" PostId="4724" RevisionGUID="d5cfb0f7-d310-451d-99c1-1916f2f2a3e8" CreationDate="2010-10-22T14:09:50.250" UserId="953" Text="Any of those would be a good start, speaking as a dev whose initial CS education was in Java.  &#xD;&#xA;&#xD;&#xA;C# is very close to Java (I sometimes joke that it's limited-platform Java with better libraries), so XNA might be a good choice.  Minecraft is developed in Java with the lwjgl game library, so if you want to stick with Java, that's a good method.  Of course, 3D development is kind of complicated; depending on your knowledge, experience, and perseverance, you might want to wait on 3D (or even 2D in a 3D-based system) until you get more education under your belt.&#xD;&#xA;&#xD;&#xA;For 2D solutions: Game Maker is very simple, and has been used to make some great games.  You should be able to pick up its scripting language quite easily, but it might be *too* simple for someone with a year of Java experience.  I develop in Flash using pure AS3 ([tutorial][1]), which is close enough to Java for your skills to easily translate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flashgamedojo.com/go/" />
  <row Id="9361" PostHistoryTypeId="2" PostId="4725" RevisionGUID="1ec4dc2a-3b1c-4728-b1fb-48f18b83c112" CreationDate="2010-10-22T14:10:06.590" UserId="1885" Text="Are there any frameworks or projects that support cross-platform mobile game development?  At the moment Titanium does cross platform development, but doesn't support high end graphics APIs, so many things still have to be written specifically for a given platform." />
  <row Id="9362" PostHistoryTypeId="1" PostId="4725" RevisionGUID="1ec4dc2a-3b1c-4728-b1fb-48f18b83c112" CreationDate="2010-10-22T14:10:06.590" UserId="1885" Text="Cross platform mobile game design - any options?" />
  <row Id="9363" PostHistoryTypeId="3" PostId="4725" RevisionGUID="1ec4dc2a-3b1c-4728-b1fb-48f18b83c112" CreationDate="2010-10-22T14:10:06.590" UserId="1885" Text="&lt;iphone&gt;&lt;android&gt;&lt;cross-platform&gt;&lt;mobile&gt;" />
  <row Id="9364" PostHistoryTypeId="2" PostId="4726" RevisionGUID="f5488dcb-dee6-4088-a35d-934d78be552c" CreationDate="2010-10-22T14:14:15.013" UserId="2301" Text="Could always do some java based games, nothing wrong with those (http://zetcode.com/tutorials/javagamestutorial/)&#xD;&#xA;&#xD;&#xA;XNA and AS3 are very close, and can create games as complicated or as simple as desired. (though same holds true with java)&#xD;&#xA;&#xD;&#xA;One thing to remember is always practice, and just play around with the code." />
  <row Id="9365" PostHistoryTypeId="2" PostId="4727" RevisionGUID="938c0eb7-e65d-4d40-bcf3-beb7d0a9e556" CreationDate="2010-10-22T14:32:46.090" UserId="1198" Text="[Unity][1] is probably your best bet, it supports both iOS and Android, as well as Windows and Mac.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="9366" PostHistoryTypeId="2" PostId="4728" RevisionGUID="39ac8062-04cc-45b7-9161-f647294fbdde" CreationDate="2010-10-22T14:36:59.653" UserId="284" Text="I find the most interesting method of player vs. player protection to be one that somewhat models itself after reality.&#xD;&#xA;&#xD;&#xA;IRL, it is the threat of inevitable and pervasive society reprisal that keeps violent elements of society calm.&#xD;&#xA;&#xD;&#xA;In game, it's great fun to have a system where npcs around the pcs react to unsanctioned violence by attacking the aggressor.  So if you provide strong npcs in the general area of safe location, e.g. town guards in a starting city,  that attack people who initiate pvp.  The system isn't foolproof (there are a lot of chaotic effects that can occur: players can initiate attacks with full knowledge of the backlash, bystanders can be drawn into fights, for two example) but it's much more interesting and vibrant than any kind of mathematical &quot;you are level 5, so you cannot attack a level 1&quot; system.&#xD;&#xA;&#xD;&#xA;Non-cities become wild places where attacks can happen, and population centers generally become safe-zones.  Pretty realistic result." />
  <row Id="9367" PostHistoryTypeId="2" PostId="4729" RevisionGUID="0550cfce-fe35-4422-91ae-3832df8adf10" CreationDate="2010-10-22T14:40:15.823" UserId="1477" Text="**[Java Monkey Engine][1]**&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you are most comfortable with Java, you could use Java Monkey Engine for a framework to use while making games. It also has a decent amount of documentation/tutorials including instructions for integrating with Netbeans and Eclipse.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/" />
  <row Id="9368" PostHistoryTypeId="2" PostId="4730" RevisionGUID="02b93ee5-57db-48f6-bf42-b5537a8c2632" CreationDate="2010-10-22T14:49:00.497" UserId="1352" Text="A non programming related advice from me:&#xD;&#xA;&#xD;&#xA;Create a neat project and show it off to your professors.&#xD;&#xA;&#xD;&#xA;That's how I got summer-jobs as a programmer after the first and second year at school." />
  <row Id="9369" PostHistoryTypeId="2" PostId="4731" RevisionGUID="f956b540-b08e-4250-99b2-a74b68b18022" CreationDate="2010-10-22T15:05:46.337" UserId="2634" Text="There are lots of good choices. (I teach CS1 and CS2, as well as game programming.)  First, of course, learn to think like a computer scientist. Don't get too tied up in the language, because the concepts truly are universal.  &#xD;&#xA;&#xD;&#xA;Java is a pretty good language, but building a game in Java is a bit tedious. There are some interesting engines out there that make the process a bit easier. Unfortunately, it can be kind of painful to attach a game engine to your editing tool.&#xD;&#xA;&#xD;&#xA;I like the FANG engine (sadly I can't post hyperlinks yet, so look it up on Google.)  One interesting part of this project is the online editor. This means you can start right away without having to mess with eclipse settings.&#xD;&#xA;&#xD;&#xA;I'm really not a fan of Game Maker. The GUI is fine for people who don't want to learn how to program, and it's a decent (but not great) prototyping tool.  However, there are two things about it I don't like. First, it's commercial. That isn't a bad thing, but if there are free open-source alternatives that are just as good (and there are) maybe you should look into them first. The bigger problem with Game Maker is the scripting language. Eventually you're going to outgrow the GUI, and you'll want to actually start writing code. The Scripting language in GM is pretty backwards-thinking. Since you're a CS major, you are (I hope) interested in code re-use, elegance, clarity, efficiency, and modularity.  The GM language will disappoint you.&#xD;&#xA;&#xD;&#xA;I love Python and Pygame. (In fact, I wrote a book about them. See all my notes and online videos on my site if you want. You're welcome to those resources whether you have the book or not.)  Python is a nice elegant language that isn't too difficult to learn (especially if you already know how to program.) Pygame is a wrapper on the popular SDL 2D engine.  In fact, I've added a second wrapper to pygame to make it about as easy to work with as Flash.  &#xD;&#xA;&#xD;&#xA;Speaking of Flash, I don't think that's worth it. (I know you didn't ask) It's a good platform, but the cost and uncertainty about how it will fare on mobile devices means it may not be that great a learning tool.  (I wrote a book about game dev in Flash, too, but I don't teach Flash any more.)&#xD;&#xA;&#xD;&#xA;Here's some other great things to try.  Get a copy of scratch from MIT:&#xD;&#xA;scratch.mit.edu&#xD;&#xA;It's made for kids, but don't let that put you off.  It is an absolutely incredible game and animation tool. The programming uses tiles, so it's easy to get started with. You'll be utterly amazed at what you can do with it.&#xD;&#xA;&#xD;&#xA;You might also try Alice from Carnegie Melon www.alice.org The latest (3rd) edition is actually an extension to Java, which uses Sims2 Models.&#xD;&#xA;&#xD;&#xA;Both Scratch and Alice are free.&#xD;&#xA;&#xD;&#xA;One more great tool to look into is Blender&#xD;&#xA;www.blender.org  &#xD;&#xA;&#xD;&#xA;It's a 3D modeling tool, but many people don't know it's also a complete game engine with a drag-and-drop programming interface. Once you've outgrown the tiles, it has Python support built in.&#xD;&#xA;&#xD;&#xA;Now I'm quite interested in HTML5 (Which is barely HTML - It's really HTML, CSS, and JavaScript.) It isn't quite there as a game development environment, but I believe it will be a big player. My next book will be on game development in HTML5. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Best of luck to you, and let me know if you have more questions.  &#xD;&#xA;" />
  <row Id="9370" PostHistoryTypeId="2" PostId="4732" RevisionGUID="ac1f3bcf-4908-46fd-9b92-e27b24d739f1" CreationDate="2010-10-22T15:09:40.937" UserId="1156" Text="If you're just looking for game development, why learn another language at the same time? I would stick with Java, unless you want to learn a new language. &#xD;&#xA;&#xD;&#xA;Main options for Java I know about are jMonkeyEngine, which is a 3D graphics engine and generally considered pretty good.&#xD;&#xA;&#xD;&#xA;And there's jOGL, which is a Java wrapper over OpenGL. This is naturally a lot lower level. &#xD;&#xA;&#xD;&#xA;If you're just starting out and want to work with the logic more than dealing with buffers and shader binding and the like, go with jMonkeyEngine. If you want to get deep in to start, go with jOGL.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to learn a new language, out of C# and Python I would probably say C#. The syntax is very similar to Java, and XNA and SlimDX are very good for graphics. XNA being higher level, and having done some things for you. However, this does come with a Windows-only restriction, without Mono.&#xD;&#xA;&#xD;&#xA;Python is a very easy language to get (took me about a week at max with little attention from a book, coming from a year of C++). Pygame is a wrapper around the SDL libraries from C, so probably doesn't have the same amount of functionality as XNA." />
  <row Id="9371" PostHistoryTypeId="2" PostId="4733" RevisionGUID="71005f5a-bc09-46bb-9789-71f6a2266cf4" CreationDate="2010-10-22T15:16:16.060" UserId="2634" Text="Take a look at Scratch: http://www.scratch.org&#xD;&#xA;It was designed to teach kids, but it's very suitable for adults, and it's an absolutely wonderful prototyping engine.  &#xD;&#xA;&#xD;&#xA;It has an integrated audio sampler and image editor. You can also import images and audio files.  It doesn't have a state mechanism, which could be useful in this type of game, but that's not really a major problem.&#xD;&#xA;&#xD;&#xA;This is probably easier than just about any other approach, as the language uses a tile-based programming system (no code typing.)  It works fine in Linux (I'm an Ubuntu guy myself) and it creates web friendly apps in a Java Applet container.  &#xD;&#xA;&#xD;&#xA;You could do this entirely in HTML and JavaScript, too. Use an imagemap for the background image (or small absolutely positioned elements.)  You can keep track of your inventory with JavaScript code.  You could also have the inventory pop up as a secondary window.  " />
  <row Id="9372" PostHistoryTypeId="2" PostId="4734" RevisionGUID="345a99a0-2dd6-407d-a1d2-a9935a34c0a9" CreationDate="2010-10-22T15:19:51.703" UserId="2634" Text="Take a look at Scratch:  http://scratch.mit.edu&#xD;&#xA;It's a free tool designed for kids by MIT, but it might be exactly what you're looking for. All the programming is done with tiles, so you don't need to learn any syntax. You can import your own graphics and audio, and the scripting is going to be relatively easy (I've taught 9-year-olds to make decent games in two hours.)&#xD;&#xA;&#xD;&#xA;-um, and it's free, so there's really not a good reason NOT to try it." />
  <row Id="9373" PostHistoryTypeId="2" PostId="4735" RevisionGUID="e246b87f-e0b7-4bf1-8893-72e29154513e" CreationDate="2010-10-22T16:32:00.430" UserId="953" Text="Flash has their iPhone packager out, and Flash works on Android devices... but I really can't recommend the iPhone packager at the moment, as I had terrible difficulties with it.  Your mileage may vary, though." />
  <row Id="9374" PostHistoryTypeId="5" PostId="4719" RevisionGUID="f29dc850-08bd-47d5-9f73-47124c50cf60" CreationDate="2010-10-22T16:47:19.847" UserId="2289" Comment="Added more extreme examples and a mock-up of what I'd like to achieve." Text="I have several Spline2D objects in my code, each of which has a Position, Velocity, and Acceleration method that returns a vector of the specified quantity at a particular time. I've been using these vectors in order to construct geometry to create gradient strokes for the curves, but I'm having problems with self-intersections at steep curves. As an example, here's one curve where I'm having this occur:&#xD;&#xA;&#xD;&#xA;Wireframe: http://twitpic.com/2zplw1/full  &#xD;&#xA;Filled: http://twitpic.com/2zpmnt/full&#xD;&#xA;&#xD;&#xA;As you can see, on the second bend, the inner portion intersects itself, which causes that ugly artifact. Is there a good algorithm/method to stroke curves without causing that self-intersection?&#xD;&#xA;&#xD;&#xA;**EDIT**: More extreme examples, plus a mock-up of what I'd like to achieve:&#xD;&#xA;&#xD;&#xA;Wireframe: http://twitpic.com/2ztwzi/full  &#xD;&#xA;Filled: http://twitpic.com/2ztwkt/full  &#xD;&#xA;Ideal Outcome (Mock-Up): http://twitpic.com/2ztxa8/full" />
  <row Id="9375" PostHistoryTypeId="2" PostId="4736" RevisionGUID="583379b2-3838-4cc5-bc10-01416b6c48a5" CreationDate="2010-10-22T16:58:21.930" UserId="136" Text="I would strongly recommend going with XNA.  It's a pretty capable and well-supported platform with a growing community.  XNA is really starting to find its &quot;place&quot; in the ecosystem now that the framework is shipping on more platforms than ever (including Windows Phone 7).  More importantly, however, using XNA will force you to learn C# and general .NET development.  It would behoove you to gain experience with this platform regardless of whether you decide to go into game development, as .NET development is growing and has a very healthy job market.  Java, on the other hand, has been slowly dying for some time now, and recent events have only served to hasten its demise.  If your CS program, like the one I completed, is heavily Java-centric, then it would serve you well to learn C#/.NET on your own time.&#xD;&#xA;&#xD;&#xA;Even if Java does live on, and you decide to pursue a career in Java development, you will likely end up having to integrate with .NET systems anyway.  So, however things turn out, the experience would only help you in the long run." />
  <row Id="9376" PostHistoryTypeId="2" PostId="4737" RevisionGUID="317c3e49-2af6-4da6-8c4c-5ad694eef1f9" CreationDate="2010-10-22T16:58:52.553" UserDisplayName="crooksy88" Text="The errors are to do with the Box2D engine being updated. The excellent tutorials by FlashyTodd are unfortunately out of date now (22/10/10). Although he does mention this at the top of the videos the link to the things that have changed isn't much use for the novice (myself included).&#xD;&#xA;&#xD;&#xA;Also the link above to the Box2D manual from DrDeth is the C++ manual, not AS3 which is what FlashyTodd is working through.&#xD;&#xA;&#xD;&#xA;I also found this [useful example][1] which notes the changes made from 2.0 to 2.1 code.&#xD;&#xA;&#xD;&#xA;For anyone else that comes across this, here is the FlashyTodd example HelloBoxWorld updated to be Box2D 2.1 compliant. (just a floor and dynamic box)&#xD;&#xA;&#xD;&#xA;    package{&#xD;&#xA;&#xD;&#xA;import flash.display.MovieClip;&#xD;&#xA;import flash.display.Sprite;&#xD;&#xA;import flash.events.Event;&#xD;&#xA;&#xD;&#xA;import Box2D.Dynamics.b2World;&#xD;&#xA;import Box2D.Collision.Shapes.b2PolygonShape;&#xD;&#xA;import Box2D.Dynamics.b2Body;&#xD;&#xA;import Box2D.Dynamics.b2Fixture;&#xD;&#xA;import Box2D.Dynamics.b2FixtureDef;&#xD;&#xA;import Box2D.Dynamics.b2BodyDef;&#xD;&#xA;import Box2D.Common.Math.b2Vec2;&#xD;&#xA;import Box2D.Collision.b2AABB;&#xD;&#xA;import Box2D.Dynamics.b2DebugDraw;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	public class HelloBoxWorld extends MovieClip{&#xD;&#xA;		&#xD;&#xA;		protected var _world:b2World;&#xD;&#xA;		&#xD;&#xA;		//ratio of pixels to meters.&#xD;&#xA;		public static const RATIO:Number = 30;&#xD;&#xA;		private var _fallingCrate:b2Body;&#xD;&#xA;		&#xD;&#xA;		private var timeStep:Number = 1.0 / 30.0;&#xD;&#xA;		private var velocityIterations:int = 6;&#xD;&#xA;		private var positionIterations:int = 2;&#xD;&#xA;		&#xD;&#xA;		public function HelloBoxWorld() {&#xD;&#xA;			&#xD;&#xA;			//1. set up the world&#xD;&#xA;			setupWorld();&#xD;&#xA;			&#xD;&#xA;			//2. create walls and floor			&#xD;&#xA;			createWallsAndFloor();&#xD;&#xA;			&#xD;&#xA;			//3. make create			&#xD;&#xA;			addACrate();&#xD;&#xA;			&#xD;&#xA;			setupDebugDraw();&#xD;&#xA;			&#xD;&#xA;			addEventListener(Event.ENTER_FRAME, newFrameEvent);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;private function setupDebugDraw():void {&#xD;&#xA;		&#xD;&#xA;		var spriteToDrawOn:Sprite = new Sprite();&#xD;&#xA;		addChild(spriteToDrawOn);&#xD;&#xA;		&#xD;&#xA;		var artistForHire:b2DebugDraw = new b2DebugDraw();&#xD;&#xA;		artistForHire.SetSprite(spriteToDrawOn);&#xD;&#xA;		&#xD;&#xA;		artistForHire.SetDrawScale(RATIO);&#xD;&#xA;		artistForHire.SetFlags(b2DebugDraw.e_shapeBit);&#xD;&#xA;		artistForHire.SetLineThickness(2.0);&#xD;&#xA;		artistForHire.SetFillAlpha(0.6);&#xD;&#xA;		&#xD;&#xA;		_world.SetDebugDraw(artistForHire);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;private function newFrameEvent(e:Event):void {&#xD;&#xA;			&#xD;&#xA;	&#xD;&#xA;	//variables assigned at the top&#xD;&#xA;	_world.Step(timeStep, velocityIterations, positionIterations);&#xD;&#xA;	_world.ClearForces();&#xD;&#xA;	&#xD;&#xA;	_world.DrawDebugData();&#xD;&#xA;	&#xD;&#xA;	trace(&quot;Falling Craete is at x:&quot;+_fallingCrate.GetPosition().x +&quot;,y:&quot;+_fallingCrate.GetPosition().y);&#xD;&#xA;}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		private function setupWorld():void {&#xD;&#xA;			&#xD;&#xA;			//1. set up the size of the universe&#xD;&#xA;			//var universeSize:b2AABB = new b2AABB();&#xD;&#xA;			//universeSize.lowerBound.Set (-3000/RATIO,-3000/RATIO);&#xD;&#xA;			//universeSize.upperBound.Set (3000/RATIO,3000/RATIO);&#xD;&#xA;			&#xD;&#xA;			//2. Define gravity&#xD;&#xA;			&#xD;&#xA;			var gravity:b2Vec2 = new b2Vec2(0, 9.8);&#xD;&#xA;			&#xD;&#xA;			//3. Ignore sleeping objects.&#xD;&#xA;			var ignoreSleeping:Boolean = true;&#xD;&#xA;			&#xD;&#xA;			_world = new b2World(gravity, ignoreSleeping);&#xD;&#xA;			&#xD;&#xA;			trace (&quot;My world has &quot;+_world.GetBodyCount()+&quot; bodies&quot;);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function createWallsAndFloor():void {&#xD;&#xA;			&#xD;&#xA;			//1. Define a body with a position		&#xD;&#xA;			var groundBodyDef:b2BodyDef = new b2BodyDef();&#xD;&#xA;			//x,y of centre. set as integers, not floats&#xD;&#xA;			groundBodyDef.position.Set(250 / RATIO, 400 / RATIO);&#xD;&#xA;&#xD;&#xA;			&#xD;&#xA;			//2. Use the world object to create the body using the body definition above&#xD;&#xA;			var groundBody = _world.CreateBody(groundBodyDef);&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			//3. Define fixtures with a shape, friction, density, etc.&#xD;&#xA;			var groundBox:b2PolygonShape =  new b2PolygonShape();&#xD;&#xA;			//width ,height. set as integers, not floats&#xD;&#xA;			groundBox.SetAsBox(200 / RATIO, 20 / RATIO);&#xD;&#xA;			&#xD;&#xA;			var fixtureDef:b2FixtureDef = new b2FixtureDef();&#xD;&#xA;			fixtureDef.shape = groundBox;&#xD;&#xA;			fixtureDef.density = 0.0;//density is set to 0.0 by default so this isnt really needed here&#xD;&#xA;			fixtureDef.friction = 0.5;&#xD;&#xA;			&#xD;&#xA;			groundBody.CreateFixture(fixtureDef);&#xD;&#xA;			&#xD;&#xA;			trace (&quot;My world has &quot;+_world.GetBodyCount()+&quot; bodies&quot;);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function addACrate():void {&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			//moving object&#xD;&#xA;			var movingBodyDef:b2BodyDef = new b2BodyDef();&#xD;&#xA;			&#xD;&#xA;			//set the type of body here&#xD;&#xA;			movingBodyDef.type = b2Body.b2_dynamicBody;//b2_dynamicBody is a property of b2Body. !manual is confusing here.&#xD;&#xA;			movingBodyDef.position.Set(100.0 / RATIO, 100.0 / RATIO);&#xD;&#xA;			movingBodyDef.angle = 30 * Math.PI / 180;&#xD;&#xA;&#xD;&#xA;			_fallingCrate = _world.CreateBody(movingBodyDef);&#xD;&#xA;			&#xD;&#xA;			var dynamicBox:b2PolygonShape =  new b2PolygonShape();&#xD;&#xA;			dynamicBox.SetAsBox(50.0 / RATIO, 50.0 / RATIO);&#xD;&#xA;			&#xD;&#xA;			var dynamicfixtureDef:b2FixtureDef = new b2FixtureDef();&#xD;&#xA;			dynamicfixtureDef.shape = dynamicBox;&#xD;&#xA;			dynamicfixtureDef.density = 1.0;&#xD;&#xA;			dynamicfixtureDef.friction = 0.3;&#xD;&#xA;			&#xD;&#xA;			_fallingCrate.CreateFixture(dynamicfixtureDef);&#xD;&#xA;			&#xD;&#xA;			trace (&quot;My world has &quot;+_world.GetBodyCount()+&quot; bodies&quot;);&#xD;&#xA;				&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.emanueleferonato.com/2010/01/27/box2dflash-2-1a-released-what-changed/" />
  <row Id="9377" PostHistoryTypeId="2" PostId="4738" RevisionGUID="c6ad4f88-e5df-4e71-9f3b-22d596beb436" CreationDate="2010-10-22T17:03:34.527" UserId="154" Text="It depends on what your goal is, and what part of game development you want to get into. &#xD;&#xA;&#xD;&#xA;Are you more interested in the actual nuts and bolts of how game engines work and building something from the ground up or do you want to get into the game parts of development as quickly as possible.&#xD;&#xA;&#xD;&#xA;**Nuts and bolts:** [XNA][1] is a nice way to dip your toes into that arena. The framework does a lot for you, but you can slowly replace each piece with your own code as you become more comfortable with C#. Learning C# is good for the future game development positions as tools are often built with C#. &#xD;&#xA;&#xD;&#xA;**Gameplay programing:** [Unity][2] is a good option here. Free, and lets you code in multiple languages including JavaScript and C#. You'll be able to get things up and running quickly which is a nice motivation boost. Plus you can transition to another language and even mix languages to help you practice broadening your understanding.&#xD;&#xA;&#xD;&#xA;The nice bit is that they are both free to play around with and can be connected to a variety of hardware for at pretty minimal cost. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/&#xD;&#xA;  [2]: http://unity3d.com/" />
  <row Id="9378" PostHistoryTypeId="2" PostId="4739" RevisionGUID="17fee5fa-0d0f-4e8d-b12a-02dfb3ea2aca" CreationDate="2010-10-22T17:16:30.293" UserId="2491" Text="I understand that an XNA project for XBox 360 will use a specialized version of the .NET Compact Framework.  But let's say I want to release for both XBox 360 and Windows.  &#xD;&#xA;&#xD;&#xA;Will the XBox version (using compact framework) still work if distributed for Windows, or would I need to rebuild against the regular framework (or the non-Xbox CF) in order to distribute?" />
  <row Id="9379" PostHistoryTypeId="1" PostId="4739" RevisionGUID="17fee5fa-0d0f-4e8d-b12a-02dfb3ea2aca" CreationDate="2010-10-22T17:16:30.293" UserId="2491" Text="Will an XNA &quot;XBox 360 Project&quot; also work on Windows?" />
  <row Id="9380" PostHistoryTypeId="3" PostId="4739" RevisionGUID="17fee5fa-0d0f-4e8d-b12a-02dfb3ea2aca" CreationDate="2010-10-22T17:16:30.293" UserId="2491" Text="&lt;xna&gt;&lt;windows&gt;&lt;xbox360&gt;" />
  <row Id="9381" PostHistoryTypeId="2" PostId="4740" RevisionGUID="f8307465-d461-45ca-a200-137a14043e38" CreationDate="2010-10-22T17:30:50.357" UserId="1690" Text="[Unity][1]&#xD;&#xA;=====&#xD;&#xA;I would say try **Unity**. They have a free version and you can get your feet wet in few hours to get the basic idea by following two tutorials provided by Unity:&#xD;&#xA;  &#xD;&#xA;  - [GUI Essentials][2] (3 - 4 hours)&#xD;&#xA;  - [Scripting Essentials][3] (2 hours)&#xD;&#xA;&#xD;&#xA;The other cool thing about unity is that you can use JavaScript as a scripting language and you can publish your game on Windows, MacOS, Web, iPhone and now with the version 3 on Android devices as well. &#xD;&#xA;&#xD;&#xA;Also they are using StackExchange engine for the [Unity Answers][4] and they have wonderful community for all your Unity related questions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://docwiki.unity3d.com/uploads/Main/GUI%20Essentials.pdf&#xD;&#xA;  [3]: http://docwiki.unity3d.com/uploads/Main/Scripting%20Tutorial.pdf&#xD;&#xA;  [4]: http://answers.unity3d.com/" />
  <row Id="9382" PostHistoryTypeId="5" PostId="4731" RevisionGUID="371ed8bd-38db-4425-aac9-5fd6e2055b19" CreationDate="2010-10-22T17:44:09.733" UserId="14" Comment="Added links for you" Text="There are lots of good choices. (I teach CS1 and CS2, as well as game programming.)  First, of course, learn to think like a computer scientist. Don't get too tied up in the language, because the concepts truly are universal.  &#xD;&#xA;&#xD;&#xA;Java is a pretty good language, but building a game in Java is a bit tedious. There are some interesting engines out there that make the process a bit easier. Unfortunately, it can be kind of painful to attach a game engine to your editing tool.&#xD;&#xA;&#xD;&#xA;I like the [FANG engine][1] (sadly I can't post hyperlinks yet, so look it up on Google.)  One interesting part of this project is the online editor. This means you can start right away without having to mess with eclipse settings.&#xD;&#xA;&#xD;&#xA;I'm really not a fan of Game Maker. The GUI is fine for people who don't want to learn how to program, and it's a decent (but not great) prototyping tool.  However, there are two things about it I don't like. First, it's commercial. That isn't a bad thing, but if there are free open-source alternatives that are just as good (and there are) maybe you should look into them first. The bigger problem with Game Maker is the scripting language. Eventually you're going to outgrow the GUI, and you'll want to actually start writing code. The Scripting language in GM is pretty backwards-thinking. Since you're a CS major, you are (I hope) interested in code re-use, elegance, clarity, efficiency, and modularity.  The GM language will disappoint you.&#xD;&#xA;&#xD;&#xA;I love Python and Pygame. (In fact, I wrote a book about them. See all my notes and online videos on my site if you want. You're welcome to those resources whether you have the book or not.)  Python is a nice elegant language that isn't too difficult to learn (especially if you already know how to program.) Pygame is a wrapper on the popular SDL 2D engine.  In fact, I've added a second wrapper to pygame to make it about as easy to work with as Flash.  &#xD;&#xA;&#xD;&#xA;Speaking of Flash, I don't think that's worth it. (I know you didn't ask) It's a good platform, but the cost and uncertainty about how it will fare on mobile devices means it may not be that great a learning tool.  (I wrote a book about game dev in Flash, too, but I don't teach Flash any more.)&#xD;&#xA;&#xD;&#xA;Here's some other great things to try.  Get a copy of scratch from MIT:&#xD;&#xA;[scratch.mit.edu][2]&#xD;&#xA;It's made for kids, but don't let that put you off.  It is an absolutely incredible game and animation tool. The programming uses tiles, so it's easy to get started with. You'll be utterly amazed at what you can do with it.&#xD;&#xA;&#xD;&#xA;You might also try Alice from Carnegie Melon [www.alice.org][3] The latest (3rd) edition is actually an extension to Java, which uses Sims2 Models.&#xD;&#xA;&#xD;&#xA;Both Scratch and Alice are free.&#xD;&#xA;&#xD;&#xA;One more great tool to look into is Blender&#xD;&#xA;[www.blender.org][4]  &#xD;&#xA;&#xD;&#xA;It's a 3D modeling tool, but many people don't know it's also a complete game engine with a drag-and-drop programming interface. Once you've outgrown the tiles, it has Python support built in.&#xD;&#xA;&#xD;&#xA;Now I'm quite interested in HTML5 (Which is barely HTML - It's really HTML, CSS, and JavaScript.) It isn't quite there as a game development environment, but I believe it will be a big player. My next book will be on game development in HTML5. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Best of luck to you, and let me know if you have more questions.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fangengine.org/index.php/Main_Page&#xD;&#xA;  [2]: http://scratch.mit.edu&#xD;&#xA;  [3]: http://www.alice.org&#xD;&#xA;  [4]: http://www.blender.org" />
  <row Id="9383" PostHistoryTypeId="2" PostId="4741" RevisionGUID="8ef03d71-6484-4682-b709-c689e05c6d02" CreationDate="2010-10-22T17:57:11.237" UserId="120" Text="Yes, different platforms run different .net runtimes.&#xD;&#xA;&#xD;&#xA;The way this works in xna 3/3.1/4 is you create your game project for a single platform (say, create a new Windows Xna game project in visual studio). In visual studios 'solution explorer', right click the project and then chooses 'create copy of project for X', where x is the platform you want the new project to target. Thats pretty much all there is to it.&#xD;&#xA;![create copy of project][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;These two projects are kept in synch, anything you add to one will show up in the other. Use #if WINDOWS or #if XBOX or #if WINDOWS_PHONE blocks to add code that is specific to a single platform.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/WjajX.png" />
  <row Id="9384" PostHistoryTypeId="2" PostId="4742" RevisionGUID="e56a65ae-3d0b-4ee5-b3af-4d361d3ab5a1" CreationDate="2010-10-22T18:00:12.217" UserId="1597" Text="You need to rebuild for Windows. There is a tool to automate the process of converting the visual studio projects. Since you started on the 360 and the compact framework you should be largely okay. Going the other way you can run into issues where you use .Net framework features that aren't supported by the compact framework.&#xD;&#xA;&#xD;&#xA;The docs contain a section on differences between the two (for example, you can't set the processor affinity on Windows). If you're actually releasing your game on the PC you might run into compatibility issues. Eg, your render buffer format might not be supported, or your shaders might not compile. This is the curse of PC development though and not specific to XNA." />
  <row Id="9385" PostHistoryTypeId="6" PostId="3051" RevisionGUID="7fb27a81-ca17-4b71-99d6-100360265db3" CreationDate="2010-10-22T18:13:17.670" UserId="354" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;box2d&gt;" />
  <row Id="9387" PostHistoryTypeId="2" PostId="4743" RevisionGUID="c214e41a-01fc-4f7b-bc7f-707982065c17" CreationDate="2010-10-22T18:29:41.487" UserId="562" Text="You consider using [OpenFeint][1] and support both it and GameCenter if you want to. OpenFeint works on 3.1+ firmware, GameCenter works on 4.1+ firmware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://openfeint.com/" />
  <row Id="9389" PostHistoryTypeId="4" PostId="4719" RevisionGUID="78324ce4-1065-4701-9cf7-95d26e69b20e" CreationDate="2010-10-22T18:33:14.907" UserId="2289" Comment="edited title" Text="How to avoid self-intersection when applying stroke to a curve?" />
  <row Id="9390" PostHistoryTypeId="2" PostId="4745" RevisionGUID="2f0f498e-59bf-45d1-806f-7366776f04af" CreationDate="2010-10-22T19:18:57.590" UserId="2661" Text="Well...in theory you could also try using C++, then create bindings in Objective C and Java too import the goods." />
  <row Id="9391" PostHistoryTypeId="2" PostId="4746" RevisionGUID="0dffd383-b103-4059-9109-e4592a8c7493" CreationDate="2010-10-22T19:25:34.567" UserId="2663" Text="If your game doesn't lend itself to a straight model like excel (although if it does, do that), then you should try and get statistics about when things are purchased and what is with your beta testers. Steam has had a lot of success with this model, so much so to provide heat maps of popular death zones in maps to find problematic regions. There's no reason you can't use that to place your price points." />
  <row Id="9392" PostHistoryTypeId="2" PostId="4747" RevisionGUID="c9dfff54-a9db-4d85-aad8-dfcd5615fbaa" CreationDate="2010-10-22T19:29:18.770" UserId="2664" Text="There are a ton of options for this, so it really depends on your budget and long term hopes.  If you're planning on just making a one-off, then something like MonoTouch, Flash and Unity would be perfectly fine.  If you want this code to be something you can grow and own yourself, then writing your own C++ layer that works with OpenGL on both platforms would be the best way to go." />
  <row Id="9393" PostHistoryTypeId="2" PostId="4748" RevisionGUID="bb892294-b184-4e4f-a43d-1f6e2a211f86" CreationDate="2010-10-22T19:33:33.257" UserId="2664" Text="If you're interested in game *design*, why not start with making a card game, or something that requires no programming at all?  That will allow you to focus on the design and mechanics of the game rather than fighting your way through APIs, languages and frameworks you're not familiar with." />
  <row Id="9394" PostHistoryTypeId="2" PostId="4749" RevisionGUID="c659ccad-2da4-44d4-815b-10c3f49c7d61" CreationDate="2010-10-22T19:37:04.887" UserId="457" Text="The powder game&#xD;&#xA;&#xD;&#xA;http://dan-ball.jp/en/javagame/dust/" />
  <row Id="9395" PostHistoryTypeId="2" PostId="4750" RevisionGUID="152a84ad-094a-4411-a881-aaa3294b6d41" CreationDate="2010-10-22T19:41:27.327" UserDisplayName="Tony Zatelli" Text="[Smallball][1], is all written in Java. It used to be very popular but it seems to have trailed off because of lack of updates in recent years.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.smallball.com" />
  <row Id="9396" PostHistoryTypeId="2" PostId="4751" RevisionGUID="9f59d89a-080f-4b4c-af74-25004f840184" CreationDate="2010-10-22T19:49:17.640" UserId="2669" Text="You might also enjoy using http://Processing.org. It is a great environment for learning graphics programming. While not strictly a game-dev tool it has a lot to offer.&#xD;&#xA;It's language is an extension/simplification of java and it will be quick to learn." />
  <row Id="9397" PostHistoryTypeId="2" PostId="4752" RevisionGUID="ef2427c4-1119-47ee-837c-ed58ea2e2784" CreationDate="2010-10-22T19:57:02.650" UserId="1232" Text="If you're rendering these with the GPU and any modern 3D api (eg. OpenGL/D3D), it looks to me like you can get rid of this with depth testing. If you assign your outside verts to be z=FAR , and your inside verts to be z=NEAR, the depth testing should help. With OpenGL:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;  // don't forget to clear depth buffer to 1.0f at beginning of frame.&#xD;&#xA;  glClearDepth(1.0f);&#xD;&#xA;  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;  // enable depth testing.&#xD;&#xA;  glEnable(GL_DEPTH_TEST);&#xD;&#xA;  // draw the Spline2D&#xD;&#xA;  for each segment in spline&#xD;&#xA;    for each vert in segment&#xD;&#xA;      if (vert is an outer vert), set vert.z = 1.0, otherwise set vert.z=0.0&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;" />
  <row Id="9399" PostHistoryTypeId="2" PostId="4753" RevisionGUID="9eba945a-9cb4-4101-b2e4-2190d0fe0807" CreationDate="2010-10-22T20:27:09.003" UserId="1320" Text="Another vote for [Unity][1].  You will have plenty of time in your next few years of CS study to engage C++ and other languages.  If your goal is to develop a game, getting tied up in what is essentially the work of developing an engine is going to take too much time.  If you want to be an engine designer, definitely come back and try lower level implementation.&#xD;&#xA;&#xD;&#xA;The Unity engine will allow you to abstract away most of the details so you can focus on gameplay programming.  The community on the [forums][2] and the Stack Exchange based [Unity Answers][3] are incredibly helpful.  You can program in either Javascript or C#. Coming from Java, I started with Javascript because a lot of the tutorials were written for it, but switched to C# (which was quite an easy switch).&#xD;&#xA;&#xD;&#xA;I think XNA and Pygame could also be good (since they abstract some of the more tedious stuff away), but I don't have experience with them.&#xD;&#xA;&#xD;&#xA;Finally, don't aim too big with your first game. It can be very easy to underestimate how time consuming it is to implement features into a game.  Start with a core game mechanic that allows you to get the game in a playable state quickly.  Then you can start adding other elements.&#xD;&#xA;&#xD;&#xA;Have fun!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://forum.unity3d.com/&#xD;&#xA;  [3]: http://answers.unity3d.com/" />
  <row Id="9400" PostHistoryTypeId="2" PostId="4754" RevisionGUID="d4e5af63-6d33-483f-a881-b10ac8d18505" CreationDate="2010-10-22T21:10:07.277" UserId="2679" Text="I have some objects in my game which are &quot;thrown&quot;. At the moment I am trying to implement this by having these objects follow a parabolic curve. I know the start point, the end point, the vertex and the speed of the object.&#xD;&#xA;&#xD;&#xA;1. How can I determine at any given time or frame what the x &amp; y co-ordinates are?&#xD;&#xA;2. Is a parabolic curve even the right curve to be using?" />
  <row Id="9401" PostHistoryTypeId="1" PostId="4754" RevisionGUID="d4e5af63-6d33-483f-a881-b10ac8d18505" CreationDate="2010-10-22T21:10:07.277" UserId="2679" Text="Determing an object's position along a curve over time" />
  <row Id="9402" PostHistoryTypeId="3" PostId="4754" RevisionGUID="d4e5af63-6d33-483f-a881-b10ac8d18505" CreationDate="2010-10-22T21:10:07.277" UserId="2679" Text="&lt;2d-physics&gt;" />
  <row Id="9403" PostHistoryTypeId="2" PostId="4755" RevisionGUID="f9f747c3-fee7-4ffa-a17c-0fc9c1afb526" CreationDate="2010-10-22T21:13:55.420" UserId="37" Text="HTML5 and JavaScript are getting better every day. They may not have as developed toolchains as more existing platforms, but in six months or a year they look to be pretty strong.&#xD;&#xA;&#xD;&#xA;The main advantage is that you can code and test by making a browser accessible webpage and navigating to it from the mobile device. Additionally the platform specific differences are very limited, though still present.&#xD;&#xA;&#xD;&#xA;[PhoneGap][1] can also assist in creating &quot;native&quot; apps from cross platform web apps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.phonegap.com/" />
  <row Id="9404" PostHistoryTypeId="5" PostId="4752" RevisionGUID="d2d4b7d0-8f84-4a77-a1e1-053d3d5a3c21" CreationDate="2010-10-22T22:28:09.000" UserId="1232" Comment="better phrasing, added depthfunc to code snippet and added note about translucency." Text="If you're rendering these with the GPU and any modern 3D api (eg. OpenGL/D3D), it looks to me like you can get rid of this with depth testing. If you assign your outside verts to be z=FAR , and your inside verts to be z=NEAR, the depth testing should prevent the overlap from showing. With OpenGL:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;  // don't forget to clear depth buffer to 1.0f at beginning of frame.&#xD;&#xA;  glClearDepth(1.0f);&#xD;&#xA;  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;  // enable depth testing.&#xD;&#xA;  glEnable(GL_DEPTH_TEST);&#xD;&#xA;  glDepthFunc(GL_LEQUAL);&#xD;&#xA;&#xD;&#xA;  // draw the Spline2D&#xD;&#xA;  for each segment in spline&#xD;&#xA;    for each vert in segment&#xD;&#xA;      if (vert is an outer vert), set vert.z = 1.0, otherwise set vert.z=0.0&#xD;&#xA;&lt;/pre&gt;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Caveat emptor: this won't work if you need translucent strokes." />
  <row Id="9407" PostHistoryTypeId="2" PostId="4756" RevisionGUID="30980bf4-cbc4-4b38-9a94-c6d06825e538" CreationDate="2010-10-22T23:39:25.633" UserId="2686" Text="Any good pointers on how to get the refractive look of glass? I'm looking to create a think piece of glass type of look, sort of the type that you'd have on bathroom shower doors." />
  <row Id="9408" PostHistoryTypeId="1" PostId="4756" RevisionGUID="30980bf4-cbc4-4b38-9a94-c6d06825e538" CreationDate="2010-10-22T23:39:25.633" UserId="2686" Text="Looking for an example of glass with XNA or DirectX 9" />
  <row Id="9409" PostHistoryTypeId="3" PostId="4756" RevisionGUID="30980bf4-cbc4-4b38-9a94-c6d06825e538" CreationDate="2010-10-22T23:39:25.633" UserId="2686" Text="&lt;graphics&gt;&lt;xna&gt;&lt;directx&gt;&lt;shaders&gt;" />
  <row Id="9410" PostHistoryTypeId="2" PostId="4757" RevisionGUID="9cedcb12-1b0d-4583-accc-4c2a078ffd4a" CreationDate="2010-10-23T00:34:23.540" UserId="2469" Text="So I'm writing a small game using Direct3D 9 and I'm using multitexturing for the terrain. All I'm doing is sampling 3 textures and a blend map and getting the overall color from the three textures based on the color channels from the blend map. Anyway, I am getting a massive frame rate drop when I sample more than 1 texture, I'm going from 120+ fps to just under 50.&#xD;&#xA;&#xD;&#xA;This is the HLSL code responsible for the slow down:&#xD;&#xA;&#xD;&#xA;	float3 ground = tex2D(GroundTex, multiTex).rgb;&#xD;&#xA;	float3 stone  = tex2D(StoneTex, multiTex).rgb;&#xD;&#xA;	float3 grass  = tex2D(GrassTex, multiTex).rgb;&#xD;&#xA;	float3 blend  = tex2D(BlendMapTex, blendMap).rgb;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Am I doing it wrong ? If anyone has any info or tips about texture sampling or anything, that would be nice.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="9411" PostHistoryTypeId="1" PostId="4757" RevisionGUID="9cedcb12-1b0d-4583-accc-4c2a078ffd4a" CreationDate="2010-10-23T00:34:23.540" UserId="2469" Text="Very slow  direct3D texture sampling" />
  <row Id="9412" PostHistoryTypeId="3" PostId="4757" RevisionGUID="9cedcb12-1b0d-4583-accc-4c2a078ffd4a" CreationDate="2010-10-23T00:34:23.540" UserId="2469" Text="&lt;textures&gt;&lt;directx&gt;&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="9413" PostHistoryTypeId="2" PostId="4758" RevisionGUID="5739e93f-c31e-4df2-8e66-997e2888a877" CreationDate="2010-10-23T00:49:37.693" UserId="2688" Text="Finding the equation of a curve that you want your object to move along is one way to accomplish what you want, but probably not the best.&#xD;&#xA;&#xD;&#xA;Instead, one usually keeps track of local properties of an object (velocity, acceleration) and then uses these values to update the object's position every frame.&#xD;&#xA;&#xD;&#xA;Since you mentioned a parabola I am assuming that you are throwing a ball in 2D and you want it to fall down along the y-axis. So, your object has constant acceleration in the y-direction (let's call that `g`) and no acceleration in the x-direction. When the object is thrown it is given some velocity, let's call that `vx` and `vy`.&#xD;&#xA;&#xD;&#xA;Then, every frame of your application you would add the object's acceleration to its velocity, and then add it's velocity to it's position. Something like:&#xD;&#xA;&#xD;&#xA;    vy += g;&#xD;&#xA;    x += vx;&#xD;&#xA;    y += vy;&#xD;&#xA;&#xD;&#xA;Do this every frame and your ball will start to move. There is a lot more to know about this, but it's a start." />
  <row Id="9414" PostHistoryTypeId="2" PostId="4759" RevisionGUID="bf45e23a-923e-4aad-8438-828d2d1c07e4" CreationDate="2010-10-23T00:59:48.530" UserId="2345" Text="I am a little confused about what you are asking. I think you might be asking how to create water droplets in an indirect way. I will answer both. =)&#xD;&#xA;&#xD;&#xA;If you want to create water droplets you can use a very simple distortion shader to offset the current pixel coordinates. However, there are many ways to do water droplets. Here is one which works well: http://blogs.msdn.com/b/shawnhar/archive/2009/04/13/motogp-raindrops-keep-falling-on-my-lens.aspx&#xD;&#xA;&#xD;&#xA;If you want to create the refractive look of glass then you are going to have to create an environment map. This essentially is your scene rendered from the 6 sides of a cube, if you choose a cube map. I suggest using XNA 4 because it now comes with a built in `EnvironmentMapEffect` shader. &#xD;&#xA;&#xD;&#xA;&gt; **EnvironmentMapEffect** — An environment&#xD;&#xA;&gt; map effect uses a diffuse texture to&#xD;&#xA;&gt; color or detail an object, and a cube&#xD;&#xA;&gt; map texture containing an environment&#xD;&#xA;&gt; map to shade the object due to the&#xD;&#xA;&gt; environment. Because the object&#xD;&#xA;&gt; reflects the scene, this makes the&#xD;&#xA;&gt; object look more like it is in a real&#xD;&#xA;&gt; scene. Also, you can use the fresnel&#xD;&#xA;&gt; parameter to tune the amount of light&#xD;&#xA;&gt; reflected (shininess) based on the&#xD;&#xA;&gt; geometry of the surface.&#xD;&#xA;&#xD;&#xA;Here are some articles which describe the process in more detail (keep in mind the new EnvironmentMapEffect for XNA 4.0):&#xD;&#xA;&#xD;&#xA;http://blogs.msdn.com/b/shawnhar/archive/2010/08/09/environmentmapeffect.aspx&#xD;&#xA;&#xD;&#xA;http://digierr.spaces.live.com/blog/cns!2B7007E9EC2AE37B!585.entry?wa=wsignin1.0&amp;sa=736960100&#xD;&#xA;&#xD;&#xA;http://xna-uk.net/blogs/randomchaos/archive/2009/01/06/basic-hlsl-lighting-techniques-episode-6-environment-maps-reflection-amp-refraction.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="9415" PostHistoryTypeId="2" PostId="4760" RevisionGUID="2c780677-2401-4209-871a-303b0b9f5276" CreationDate="2010-10-23T01:11:06.963" UserId="2345" Text="If you want to speed things up you can use something called a texture atlas. &#xD;&#xA;&#xD;&#xA;&gt; **Wikipedia** — A texture atlas is a large&#xD;&#xA;&gt; image, or &quot;atlas&quot; which contains many&#xD;&#xA;&gt; smaller sub-images, each of which is a&#xD;&#xA;&gt; texture for some part of a 3D object.&#xD;&#xA;&gt; The sub-textures can be rendered by&#xD;&#xA;&gt; modifying the texture coordinates of&#xD;&#xA;&gt; the object's uvmap on the atlas,&#xD;&#xA;&gt; essentially telling it which part of&#xD;&#xA;&gt; the image its texture is in. In an&#xD;&#xA;&gt; application  where many small textures&#xD;&#xA;&gt; are used frequently, it is often more&#xD;&#xA;&gt; efficient to store the textures in a&#xD;&#xA;&gt; texture atlas which is treated as a&#xD;&#xA;&gt; unit by the graphics hardware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It is more efficient for a GPU to sample a single large texture 4 times versus 4 images sampled once each. Here is an example of a terrain texture atlas.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1r1hR.jpg" />
  <row Id="9416" PostHistoryTypeId="5" PostId="4759" RevisionGUID="70bb8597-2a51-4d51-b8b4-d318692acded" CreationDate="2010-10-23T01:15:23.630" UserId="2345" Comment="added 14 characters in body" Text="I am a little confused about what you are asking. I think you might be asking how to create water droplets in an indirect way. I will answer both. =)&#xD;&#xA;&#xD;&#xA;If you want to create water droplets you can use a very simple distortion shader to offset the current pixel coordinates. However, there are many ways to do water droplets. Here is one which works well: http://blogs.msdn.com/b/shawnhar/archive/2009/04/13/motogp-raindrops-keep-falling-on-my-lens.aspx&#xD;&#xA;&#xD;&#xA;If you want to create the refractive look of glass then you are going to have to create an environment map. This essentially is your scene rendered from the 6 sides of a cube, if you choose a cube map. I suggest using XNA 4 because it now comes with a built in `EnvironmentMapEffect` shader. &#xD;&#xA;&#xD;&#xA;&gt; **EnvironmentMapEffect** — An environment&#xD;&#xA;&gt; map effect uses a diffuse texture to&#xD;&#xA;&gt; color or detail an object, and a cube&#xD;&#xA;&gt; map texture containing an environment&#xD;&#xA;&gt; map to shade the object due to the&#xD;&#xA;&gt; environment. Because the object&#xD;&#xA;&gt; reflects the scene, this makes the&#xD;&#xA;&gt; object look more like it is in a real&#xD;&#xA;&gt; scene. Also, you can use the fresnel&#xD;&#xA;&gt; parameter to tune the amount of light&#xD;&#xA;&gt; reflected (shininess) based on the&#xD;&#xA;&gt; geometry of the surface.&#xD;&#xA;&#xD;&#xA;Here are some articles which describe the process in more detail (keep in mind the new [EnvironmentMapEffect for XNA 4.0][1]):&#xD;&#xA;&#xD;&#xA;http://digierr.spaces.live.com/blog/cns!2B7007E9EC2AE37B!585.entry?wa=wsignin1.0&amp;sa=736960100&#xD;&#xA;&#xD;&#xA;http://xna-uk.net/blogs/randomchaos/archive/2009/01/06/basic-hlsl-lighting-techniques-episode-6-environment-maps-reflection-amp-refraction.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2010/08/09/environmentmapeffect.aspx" />
  <row Id="9417" PostHistoryTypeId="2" PostId="4761" RevisionGUID="101ae6ed-5911-4498-a93d-9338463e1bdf" CreationDate="2010-10-23T02:12:48.260" UserId="2693" Text="XNA is a great solution if you're coming off Java. C# will look and read almost IDENTICALLY to java for you, so you'll be able to jump in really fast without learning new syntax. The XNA framework provides tons of good APIs to work with, and there are lots of free &quot;microsoft permissive licence&quot; open code to get you started on some projects.&#xD;&#xA;&#xD;&#xA;I wouldn't recommend you use Java, most of the graphics APIs are terrible, there's not a ton of 3d support, and generally Java just runs slow; not a big deal for most java apps, but videogames need LOTS of performance.&#xD;&#xA;&#xD;&#xA;C++ is the way to make videogames, pretty much period. However, going from java -&gt; C++ is going to be pretty jarring. Not to mention that most low-level hardcore graphics programming is really C style, not C++, so you're going to do a bunch of pointer arithmetic to try to squeeze out more performance. It can be interesting, but time consuming. It can also take alot to get you started.&#xD;&#xA;&#xD;&#xA;There are lots of good game engines out there like Ogre, but then you have to spend tons of time learning how to do things with it first, it can feel overly complicated.&#xD;&#xA;&#xD;&#xA;Be careful, as awesome as many of your gaming ideas may be, remember that video games are expensive, take a long development time, and have large development teams.&#xD;&#xA;&#xD;&#xA;If you want to make a game and be the only person who works on it, you're almost going to HAVE to make it a 2D game (though you should start with 2D anyways) and you're going to have to start REALLY, REALLY simple.&#xD;&#xA;&#xD;&#xA;Almost anything you can imagine that would be fun is likely too ambitious for right now.&#xD;&#xA;&#xD;&#xA;My advice:&#xD;&#xA;Get the free visual studio 2010 express if you don't have it.&#xD;&#xA;Download the XNA game studio, and the .net framework 4.&#xD;&#xA;Download an XNA demo.&#xD;&#xA;Run the demo, then look through the code and see what does what. Try reading some documentation on how XNA does 2D games.&#xD;&#xA;&#xD;&#xA;THEN, Pick your favorite, old school, super easy game. Pac-man? Pong? Asteroids? Space Invaders? Mario?&#xD;&#xA;Pick something STUPID, STUPID easy. Then just remake the game exactly as it was. You've got enough to worry about with programming and learning a new API that you DO NOT need to bother with game design; it will just distract you.&#xD;&#xA;&#xD;&#xA;Then, once you've got your mario clone going or whatever you made, you can start to experiment with gameplay and try adding new things. &#xD;&#xA;&#xD;&#xA;Start small, baby steps, and it'll be much more fun and you'll learn alot more.&#xD;&#xA;&#xD;&#xA;Try to jump into modifying the Quake3 source code in C++ to make a game and you're going to get really frustrated, and even if you make it work, you're not going to learn alot from doing it.&#xD;&#xA;&#xD;&#xA;JUST HAVE FUN :D" />
  <row Id="9418" PostHistoryTypeId="2" PostId="4762" RevisionGUID="a3938a19-0f7a-44f0-87cd-7502c9e99372" CreationDate="2010-10-23T02:44:56.200" UserId="2469" Text="Brandon's answer is pretty good, but if you're looking for something more advances, you might want to check out linear interpolation: http://en.wikipedia.org/wiki/Linear_interpolation&#xD;&#xA;&#xD;&#xA;Also, if your curve is a function, you can know the x and y (and z) coords at a given time.&#xD;&#xA;This might help too: http://www.ucl.ac.uk/Mathematics/geomath/level2/fvec/fv8.html#l1" />
  <row Id="9419" PostHistoryTypeId="2" PostId="4763" RevisionGUID="03cb9002-f3a6-4b43-bc35-c85196be1654" CreationDate="2010-10-23T03:53:38.993" UserId="2039" Text="Just curious what to do from here. So I am done with my tile editor program and currently have it set up so that my background (which is one large image) is mapped in XML to 32x32 tiles (again, a mapping, nothing is really split into tiles). &#xD;&#xA;&#xD;&#xA;So when I have my character (this is a platformer rpg) comes across a tile which I have labeled as obstacle or something, they stop. This is nice and all except for some ugly space in between my character and tile where the edge of my rock is. I can't do pixel detection because it will never be sound.&#xD;&#xA;&#xD;&#xA;For example, if my character's pinky ends up in the cell marked as an obstacle and for some reason, there is some black along an edge from a castle from the previous cell, this is a hit even though the player didn't actually touch any part of the rock but rather a part of the pinky hit that black edge.&#xD;&#xA;&#xD;&#xA;The only thing I had which makes things seem to nicely lineup is to map it to a 16x16 array.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9420" PostHistoryTypeId="1" PostId="4763" RevisionGUID="03cb9002-f3a6-4b43-bc35-c85196be1654" CreationDate="2010-10-23T03:53:38.993" UserId="2039" Text="2D collision and getting closer to objects" />
  <row Id="9421" PostHistoryTypeId="3" PostId="4763" RevisionGUID="03cb9002-f3a6-4b43-bc35-c85196be1654" CreationDate="2010-10-23T03:53:38.993" UserId="2039" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="9422" PostHistoryTypeId="2" PostId="4764" RevisionGUID="58a39cdb-eb7c-4d83-b02d-c4614c40be9a" CreationDate="2010-10-23T04:03:08.320" UserId="370" Text="###[Weapon of Choice][1]&#xD;&#xA;&#xD;&#xA;Weapon of Choice is an Indie game from [Mommy's Best Games][2].  The game is written in C#/XNA.  Gamasutra has a great [post-mortem][3] where the developer discusses using C# to write a game (he had been using C/C++ prior to going independent).&#xD;&#xA;&#xD;&#xA;I don't know if it's considered famous but it did [win some awards][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mommysbestgames.com/weaponofchoice.html&#xD;&#xA;  [2]: http://www.mommysbestgames.com/&#xD;&#xA;  [3]: http://www.gamasutra.com/view/feature/3899/postmortem_mommys_best_games_.php&#xD;&#xA;  [4]: http://www.mommysbestgames.com/press.html" />
  <row Id="9423" PostHistoryTypeId="2" PostId="4765" RevisionGUID="0c2e5508-09cb-484b-877b-b3cea3b95473" CreationDate="2010-10-23T05:52:25.900" UserId="2696" Text="I am programming a particle engine for a 3D game written in XNA. I was wondering if somebody could point me in the right direction or perhaps give me some pointers in making the particles collide with geometry in game. In essence, I want to be able to make a spark emitter that will bounce and collide down say, a cylindrical tube." />
  <row Id="9424" PostHistoryTypeId="1" PostId="4765" RevisionGUID="0c2e5508-09cb-484b-877b-b3cea3b95473" CreationDate="2010-10-23T05:52:25.900" UserId="2696" Text="3D Particle-Geometry collision" />
  <row Id="9425" PostHistoryTypeId="3" PostId="4765" RevisionGUID="0c2e5508-09cb-484b-877b-b3cea3b95473" CreationDate="2010-10-23T05:52:25.900" UserId="2696" Text="&lt;xna&gt;&lt;physics&gt;&lt;collision-detection&gt;&lt;3d-engines&gt;&lt;particles&gt;" />
  <row Id="9426" PostHistoryTypeId="2" PostId="4766" RevisionGUID="25795a62-8211-4e89-8b48-40212ae08586" CreationDate="2010-10-23T09:26:34.757" UserDisplayName="Syx" Text="[Night Squad 2][1] is a First Person Shooter written in Java&#xD;&#xA;&#xD;&#xA;Sorry, stackexchange won't let me post the image or link:&#xD;&#xA;i.imgur.com/pfDoU.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://4p.de/nightsquad2&#xD;&#xA;" />
  <row Id="9427" PostHistoryTypeId="2" PostId="4767" RevisionGUID="2cdee75e-084d-4289-9fbf-77eeae5de77c" CreationDate="2010-10-23T11:41:27.643" UserId="721" Text="For 3d physics, you can use 3D Physics Engine as [Bullet][1] or [O.D.E][2]. It is probably at first sight overhead...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bullet_(software)&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Bullet_(software)" />
  <row Id="9428" PostHistoryTypeId="5" PostId="4767" RevisionGUID="e353aadc-399d-4c23-89ad-add422733b44" CreationDate="2010-10-23T11:49:51.380" UserId="721" Comment="added 75 characters in body" Text="For 3d physics, you can use 3D Physics Engines as [Bullet][1] or [O.D.E][2]. It is probably at first sight overhead... but you can use it for many great effects or add physic in your gameplay.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bullet_(software)&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Bullet_(software)" />
  <row Id="9429" PostHistoryTypeId="2" PostId="4768" RevisionGUID="7786c96c-3c77-4517-bcef-4dfde9ad769a" CreationDate="2010-10-23T12:55:55.347" UserId="862" Text="Also, take into account that while not full games, parts of important AAA games have been written in .NET. Supreme Commander used it for it's multiplayer part and Neverwinter Nights Aurora editor was written in .NET." />
  <row Id="9430" PostHistoryTypeId="2" PostId="4769" RevisionGUID="8cbab96f-169d-48ca-97db-b8527f282417" CreationDate="2010-10-23T12:59:16.837" UserDisplayName="Travis Berthelot" Text="I have 9 java games.  They have been played millions of times over the last 8 years.&#xD;&#xA;&#xD;&#xA;http://www.abappsstore.com/&#xD;&#xA;&#xD;&#xA;Zepto Towers&#xD;&#xA;MiniSpaceWar&#xD;&#xA;ZeptoRacer&#xD;&#xA;MiniSpaceWar Vector&#xD;&#xA;SantasWorldWar&#xD;&#xA;Obama Stimulus&#xD;&#xA;Don’t Lose Your Balls!&#xD;&#xA;Zepto Wars&#xD;&#xA;&#xD;&#xA;I am working on my first multiplayer java game now." />
  <row Id="9432" PostHistoryTypeId="2" PostId="4771" RevisionGUID="d81d3259-e1fb-45ae-ada0-08b6322f6449" CreationDate="2010-10-23T13:34:27.687" UserId="450" Text="&lt;small&gt;Hm, I am not sure if it is okay to post a game to which I have contributed. But it was Sourceforge [project of the month][1] in March.&lt;/small&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**[Stendhal][3]** is a multiplayer online adventures game (MORPG) developed using the Arianne game system. It is completely open source (client, server, graphics, everything). While it is still heavily developed, it is fully playable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[&lt;img src=&quot;http://arianne.sourceforge.net/screens/stendhal/client87.png&quot; width=&quot;449&quot; height=&quot;336&quot; alt=&quot;Stendhal Screenshot with GUI. It shows the NPC postman and 12 players in plains north of Semos City&quot;&gt;][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Stendhal features a rich and expanding world in which you can explore towns, buildings, plains, caves and dungeons. There are many NPCs with tasks and quests for valuable experience and cold hard cash. With the money new items can be bought and armour and weapons can be improved. And for the blood thirsty ones of you; satisfy your killing desires by roaming the world in search of evil monsters! &#xD;&#xA;&#xD;&#xA;http://stendhalgame.org&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/community/potm-201003/&#xD;&#xA;  [2]: http://i.stack.imgur.com/xq1f9.png&#xD;&#xA;  [3]: http://stendhalgame.org" />
  <row Id="9433" PostHistoryTypeId="2" PostId="4772" RevisionGUID="ce7fccf1-82ec-4e51-a75a-2c7da1d1f78f" CreationDate="2010-10-23T15:33:59.823" UserId="1868" Text="I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side.&#xD;&#xA;&#xD;&#xA;The data sent over would consists of position of each player, direction, velocity and such. The player movements are simple force physics, so I should be able to extrapolate movements before next update from server.&#xD;&#xA;&#xD;&#xA;Any tips or best practices on the communications side? Should I send information in every pass of the game loop or with specified intervals? Also, I don't mind if it doesn't work with older browsers. " />
  <row Id="9434" PostHistoryTypeId="1" PostId="4772" RevisionGUID="ce7fccf1-82ec-4e51-a75a-2c7da1d1f78f" CreationDate="2010-10-23T15:33:59.823" UserId="1868" Text="Tips for communication between JS browser game and node.js server?" />
  <row Id="9435" PostHistoryTypeId="3" PostId="4772" RevisionGUID="ce7fccf1-82ec-4e51-a75a-2c7da1d1f78f" CreationDate="2010-10-23T15:33:59.823" UserId="1868" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;javascript&gt;&lt;client-server&gt;&lt;node.js&gt;" />
  <row Id="9436" PostHistoryTypeId="5" PostId="4772" RevisionGUID="199d0a79-352d-406f-a390-c8d0255e59f3" CreationDate="2010-10-23T15:47:52.797" UserId="1868" Comment="added 39 characters in body; edited body" Text="I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side.&#xD;&#xA;&#xD;&#xA;The data sent over would consists of position of each player, direction, velocity and such. The player movements are simple force physics, so I should be able to extrapolate movements before next update from server.&#xD;&#xA;&#xD;&#xA;Any tips or best practices on the communications side? I guess web sockets are the way to go. Should I send information in every pass of the game loop or with specified intervals? Also, I don't mind if it doesn't work with older browsers. " />
  <row Id="9437" PostHistoryTypeId="2" PostId="4773" RevisionGUID="38d8c6a1-2d33-469d-9ed9-41f5eb021395" CreationDate="2010-10-23T16:15:35.307" UserId="450" Text="I'd suggest to keep things apart.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the Stendhal which is a 2D MORPG written Java, we did the following things and it works out pretty fine:&#xD;&#xA;&#xD;&#xA;- The client uses a fast loop for drawing. It does smooth animation and some predictions to minimize lag.&#xD;&#xA;- The server uses a loop to process all the game logic. In our case it can be a lot slower than the drawing loop. While the clients make some predictions, the server always wins.&#xD;&#xA;&#xD;&#xA;Communication between client and server is done using actions and perceptions:&#xD;&#xA;&#xD;&#xA;- *Actions* done by the users like &quot;move up&quot; are sent to the server when they occur. The server queues them up and processes them in its own loop.&#xD;&#xA;- *Perceptions* are sent from the server to the client to update their view of the world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We did some &quot;tricks&quot; to gain additional performance:&#xD;&#xA;&#xD;&#xA; - We have two kinds of perception messages: A full one used on login and players joining a zone. And incremental updates used after that. This saves a lot of network bandwidth.&#xD;&#xA; - We split perception messages into a public and a private part: All players in the same zone share the same public part so we save processing time because serialisation turned out to be a bottle neck on Java (not JavaScript)." />
  <row Id="9438" PostHistoryTypeId="2" PostId="4774" RevisionGUID="4f444bbe-eeee-4c08-bd32-d5cbc9bb392b" CreationDate="2010-10-23T16:47:49.237" UserId="721" Text="Android uses its own Java like implementation. You write Java syntax code and can use Many Java APIs, but there are many differences:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA; - Code is compiled into Dalvik opcodes (not java byte code);&#xD;&#xA; - Many APIs are similars but you don't have all J2SE APIs. You must check on&#xD;&#xA; the [developper site][1];&#xD;&#xA; - Many APIs are limited to Android (Contacts, Power Management, Graphics...);&#xD;&#xA; - IHM are android onlys (no Swing, no JavaFX ...). You use XML to declare you GUI;&#xD;&#xA; - you can use java jars (if they use only compatible APIs) but they are converted into&#xD;&#xA;dalvik.&#xD;&#xA;&#xD;&#xA;  [1]: http://d.android.com/reference/android/os/PowerManager.html" />
  <row Id="9439" PostHistoryTypeId="5" PostId="4774" RevisionGUID="7a89ccf8-33b5-4a61-a9f2-342d45e6e416" CreationDate="2010-10-23T16:58:10.037" UserId="721" Comment="added 589 characters in body" Text="Android uses its own Java like implementation. You write Java syntax code and can use Many Java APIs, but there are many differences:&#xD;&#xA;  &#xD;&#xA; - Android applications have a special Lifecycle:&#xD;&#xA;   - no main function&#xD;&#xA;   - your applications contains Activities with onCreate, onResume, onPause, onDestroy functions that you must override&#xD;&#xA; - Code is compiled into Dalvik opcodes (not java byte code);&#xD;&#xA; - Many APIs are similars but you don't have all J2SE APIs. You must check on&#xD;&#xA; the [developper site][1];&#xD;&#xA; - Many APIs are limited to Android (Contacts, Power Management, Graphics...);&#xD;&#xA; - IHM are android onlys (no Swing, no JavaFX ...). You must use XML to declare you GUI;&#xD;&#xA; - you can use java jars (if they use only compatible APIs) but they are converted into&#xD;&#xA;dalvik.&#xD;&#xA;&#xD;&#xA;So, it is like a new platform; but, if you know Java, it is very easy to develop on Android. Download the SDK and try to play with provided samples and customize them.&#xD;&#xA;You can use good IDE as Eclipse and Idea (Android plugin will arrive in Idea 10 Community editions).&#xD;&#xA;&#xD;&#xA;For C/C++ geeks, you can use NDK (Native Development Kit) but you need some Java bootstrap code and JNI knowledge.&#xD;&#xA;&#xD;&#xA;  [1]: http://d.android.com/reference/android/os/PowerManager.html" />
  <row Id="9440" PostHistoryTypeId="2" PostId="4775" RevisionGUID="5f9ff164-8567-4033-8609-64be777d07c6" CreationDate="2010-10-23T17:11:56.983" UserId="2705" Text="This is kind of an odd question, but what would be the best solution for rendering a 3D scene without a render window active? The end goal would be to simply render a 3D scene to an image file.&#xD;&#xA;&#xD;&#xA;I have done similar things in the past with DirectX and XNA but both required me to have a render window running in-order for the API to initialize. Is there a way to render directly to a texture so that you could perform the rendering with a DLL file in other desktop applications?&#xD;&#xA;&#xD;&#xA;The way I envision it working is you create a self contained DLL which has all the rendering logic, a user is using a standard windows application to customize his parameters, once he has them locked he sends a render request to the DLL and it responds with a PNG file of the rendered scene. Ideally this would be a CPU based render since performance is not a huge issue.&#xD;&#xA;&#xD;&#xA;Are there APIs out there which one could use to accomplish this?" />
  <row Id="9441" PostHistoryTypeId="1" PostId="4775" RevisionGUID="5f9ff164-8567-4033-8609-64be777d07c6" CreationDate="2010-10-23T17:11:56.983" UserId="2705" Text="Rendering a 3D scene without a window" />
  <row Id="9442" PostHistoryTypeId="3" PostId="4775" RevisionGUID="5f9ff164-8567-4033-8609-64be777d07c6" CreationDate="2010-10-23T17:11:56.983" UserId="2705" Text="&lt;3d&gt;&lt;rendering&gt;&lt;image&gt;" />
  <row Id="9443" PostHistoryTypeId="2" PostId="4776" RevisionGUID="fdbf0cc0-a417-4dc3-a5d5-9a1c09bddb53" CreationDate="2010-10-23T17:56:38.947" UserId="683" Text="There are lots of software rendering programs out there.  The most common model is just to execute the renderer as another process, rather than call into a DLL.  (Though, that exists as well.)  Depending on your needs you may find that Aqsis or LuxRender suits your needs.  Another renderer to check out is PovRay.&#xD;&#xA;&#xD;&#xA;Many such applications exist.  Hopefully, those couple of examples will give you enough information to get you started.&#xD;&#xA;&#xD;&#xA;Another way to go would be an OpenGL FBO.  That's basically rendering to a texture in memory on the GPU.  You can then use it for whatever you want, such as reading back to host memory, and writing it out as a PNG." />
  <row Id="9444" PostHistoryTypeId="2" PostId="4777" RevisionGUID="d76b91b2-2eb9-4527-b081-c101009bb05b" CreationDate="2010-10-23T18:15:11.527" UserId="2345" Text="It sounds to me like you are looking for a ray tracer. It has many benefits over rasterization but if you need something fast then it might not be for you.&#xD;&#xA;&#xD;&#xA;&gt; **[Ray Tracing][1]** is a technique for generating an image by tracing the&#xD;&#xA;&gt; path of light through pixels in an&#xD;&#xA;&gt; image plane  and simulating the&#xD;&#xA;&gt; effects of its encounters with virtual&#xD;&#xA;&gt; objects. The technique is capable of&#xD;&#xA;&gt; producing a very high degree of visual&#xD;&#xA;&gt; realism, usually higher than that of&#xD;&#xA;&gt; typical scanline rendering methods,&#xD;&#xA;&gt; but at a greater computational cost.&#xD;&#xA;&gt; This makes ray tracing best suited for&#xD;&#xA;&gt; applications where the image can be&#xD;&#xA;&gt; rendered slowly ahead of time, such as&#xD;&#xA;&gt; in still images and film and&#xD;&#xA;&gt; television special effects, and more&#xD;&#xA;&gt; poorly suited for real-time&#xD;&#xA;&gt; applications like computer games where&#xD;&#xA;&gt; speed is critical. Ray tracing is&#xD;&#xA;&gt; capable of simulating a wide variety&#xD;&#xA;&gt; of optical effects, such as reflection&#xD;&#xA;&gt; and refraction, scattering, and&#xD;&#xA;&gt; chromatic aberration.&#xD;&#xA;&#xD;&#xA;I am not aware of any major ray tracing specifications or platforms other then openrt. However, it appears to be an [outdated][2] project now.&#xD;&#xA;&#xD;&#xA;I would recommend visiting the &quot;ray tracing&quot; forums ([http://ompf.org/forum/][3]) if you have more specific questions. Also, they have a tools section where you may find something that suits your needs. For example [TinyRT][4] is a good place to start. &#xD;&#xA;&#xD;&#xA;Also, here are some articles to get you started:&#xD;&#xA;&#xD;&#xA;**C#:** &#xD;&#xA;&#xD;&#xA; - http://www.codeproject.com/KB/graphics/Simple_Ray_Tracing_in_C7.aspx&#xD;&#xA;&#xD;&#xA;**C++:** &#xD;&#xA;&#xD;&#xA; - http://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_1_Introduction.shtml&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29&#xD;&#xA;  [2]: http://www.gamedev.net/community/forums/topic.asp?topic_id=533940&#xD;&#xA;  [3]: http://ompf.org/forum/&#xD;&#xA;  [4]: http://ompf.org/forum/viewtopic.php?f=8&amp;t=1333" />
  <row Id="9445" PostHistoryTypeId="2" PostId="4778" RevisionGUID="c7efe139-c35b-4d44-a87b-462829d61fbe" CreationDate="2010-10-23T19:26:53.650" UserId="1713" Text="I recently made a asteroids/geometry wars crossover with Node.js / JavaScript:  &#xD;&#xA;http://github.com/BonsaiDen/NodeGame-Shooter&#xD;&#xA;&#xD;&#xA;It has a fat Server which processes the game and thin clients which are basically just views.&#xD;&#xA;The client does some interpolation and things to make it look smooth.&#xD;&#xA;&#xD;&#xA;You may want to look at these two files, which contain the underlying networking logic, as well as the actor and client models:  &#xD;&#xA;http://github.com/BonsaiDen/NodeGame-Shooter/blob/master/client/nodegame.client.js  &#xD;&#xA;http://github.com/BonsaiDen/NodeGame-Shooter/blob/master/server/nodegame.js  &#xD;&#xA;&#xD;&#xA;The whole game is based on Actors which handle their &quot;update events&quot;(the stuff that gets send to the clients) on their own, for the most part. It's also possible to hide actors from specific client to implement, for example, invisibility.&#xD;&#xA;&#xD;&#xA;One can also record games and just feed the messages into the client to play them back.&#xD;&#xA;&#xD;&#xA;As far as the tech goes:  &#xD;&#xA;WebSockets are the way to go here. I also did a custom binary encoding for JS that, while giving up on things like more than 2 decimal places on floats, is about 50% smaller than JSON(and is 2x as fast under V8 than *native* JSON encoding)" />
  <row Id="9446" PostHistoryTypeId="2" PostId="4779" RevisionGUID="069c840e-7977-4ded-83ed-c6d5bb1c99ca" CreationDate="2010-10-23T19:55:16.947" UserId="2709" Text="I am working on generation 3d perlin noise. The C# Math library seems like overkill for what I need since most of its functions use double percision. I use Math.Sin() in several places to generate the noise. Does anyone know of a faster sine function?" />
  <row Id="9447" PostHistoryTypeId="1" PostId="4779" RevisionGUID="069c840e-7977-4ded-83ed-c6d5bb1c99ca" CreationDate="2010-10-23T19:55:16.947" UserId="2709" Text="Is there a faster sine function?" />
  <row Id="9448" PostHistoryTypeId="3" PostId="4779" RevisionGUID="069c840e-7977-4ded-83ed-c6d5bb1c99ca" CreationDate="2010-10-23T19:55:16.947" UserId="2709" Text="&lt;xna&gt;&lt;c#&gt;&lt;math&gt;" />
  <row Id="9449" PostHistoryTypeId="2" PostId="4780" RevisionGUID="7c4fb11e-0b8b-4366-b445-4c976456fbc1" CreationDate="2010-10-23T19:59:54.970" UserId="2345" Text="You can use a parabola to aproximate the value of the sine function. This has the advantage of having the roots at exactly -pi/2 and pi/2 which is usually not the case with other fast approximations based on the [TaylorSeries][1] or [MaclaurinSeries][2]. &#xD;&#xA;&#xD;&#xA;    public float Sin(float x)&#xD;&#xA;    {&#xD;&#xA;        const float B = 4 / PI;&#xD;&#xA;        const float C = -4 / (TwoPi);&#xD;&#xA;&#xD;&#xA;        return -(B * x + C * x * ((x &lt; 0) ? -x : x));&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Here is a comparison to the actual sine function:&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mathworld.wolfram.com/TaylorSeries.html&#xD;&#xA;  [2]: http://mathworld.wolfram.com/MaclaurinSeries.html&#xD;&#xA;  [3]: http://i.stack.imgur.com/TSYQu.gif" />
  <row Id="9450" PostHistoryTypeId="5" PostId="4780" RevisionGUID="8a75ede0-2eee-435f-9b8d-3e36523ce09e" CreationDate="2010-10-23T20:06:47.233" UserId="2345" Comment="edited body" Text="You can use a parabola to aproximate the value of the sine function. This has the advantage of having the roots at exactly -pi/2 and pi/2 which is usually not the case with other fast approximations based on the [TaylorSeries][1] or [MaclaurinSeries][2]. &#xD;&#xA;&#xD;&#xA;    public float Sin(float x)&#xD;&#xA;    {&#xD;&#xA;        const float B = 4 / PI;&#xD;&#xA;        const float C = -4 / (PI*PI);&#xD;&#xA;&#xD;&#xA;        return -(B * x + C * x * ((x &lt; 0) ? -x : x));&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Here is a comparison to the actual sine function:&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mathworld.wolfram.com/TaylorSeries.html&#xD;&#xA;  [2]: http://mathworld.wolfram.com/MaclaurinSeries.html&#xD;&#xA;  [3]: http://i.stack.imgur.com/TSYQu.gif" />
  <row Id="9451" PostHistoryTypeId="2" PostId="4781" RevisionGUID="67910e16-ea34-46b2-8894-41ce02535e84" CreationDate="2010-10-23T20:30:23.700" UserId="2686" Text="Specifically iPhone/iTouch, Droids, and the new Windows Phone 7? I don't know how to quantify this, or if any research has been done. I am wondering how important the music is to the gaming and what % of games come with music at all, if good music at that." />
  <row Id="9452" PostHistoryTypeId="1" PostId="4781" RevisionGUID="67910e16-ea34-46b2-8894-41ce02535e84" CreationDate="2010-10-23T20:30:23.700" UserId="2686" Text="How important is music to mobile phone (smart PDA) games?" />
  <row Id="9453" PostHistoryTypeId="3" PostId="4781" RevisionGUID="67910e16-ea34-46b2-8894-41ce02535e84" CreationDate="2010-10-23T20:30:23.700" UserId="2686" Text="&lt;game-design&gt;&lt;audio&gt;&lt;sound&gt;&lt;music&gt;&lt;mobile&gt;" />
  <row Id="9454" PostHistoryTypeId="2" PostId="4782" RevisionGUID="0974106d-a08e-4a64-897a-e938e2099c83" CreationDate="2010-10-23T20:48:06.167" UserId="136" Text="I wouldn't say music is critical, but good music on any platform can greatly enhance the player's experience.  The most important consideration with respect to music is that the music be appropriate--it should fit the game, and it should be somewhat subtle; it should not be too distracting.  I would argue that poorly chosen music can easily be worse than no music at all, so it's worth investing time (and often money) to put together a good soundtrack.  Your soundtrack should be large enough that it does not become too repetitive, and there *must* be a way to adjust the volume and switch the music on/off entirely (this functionality is usually provided for you in mobile devices).&#xD;&#xA;&#xD;&#xA;If securing a proper soundtrack is not a viable option for you, then consider subtle ambient background sounds instead (see *Angry Birds* for an example).&#xD;&#xA;&#xD;&#xA;I have no meaningful figures about the percentage of mobile games shipping with music, but most of the games I've played do include music, or at least ambient background sounds.  There are some notable exceptions of excellent games without music, including *Trainyard* on the iPhone, which easily ranks in my Top 10 favorite mobile games." />
  <row Id="9455" PostHistoryTypeId="2" PostId="4783" RevisionGUID="d5d402b1-e4d0-42af-b074-b38efa7a5a74" CreationDate="2010-10-23T22:35:43.817" UserDisplayName="doolin" Text="Particle mechanics isn't terribly difficult to understand in general, but there are some messy details.&#xD;&#xA;&#xD;&#xA;The single biggest thing to remember is Truesdell's Axiom: &quot;No two distinct masses may occupy the same point in space at the same point in time.&quot; Simulating particle dynamics is largely about creatively breaking that axiom, while still preserving physical plausibility.&#xD;&#xA;&#xD;&#xA;There's several methods for enforcing non-penetration: measure differential inclusions, displacement based penalties, and velocity based restitution are fairly well developed computationally.&#xD;&#xA;&#xD;&#xA;Since you're interested in gaming, I'd recommend focusing on restitution-based methods which produce diagonal systems of equations (i.e., you can solve them explicitly). &#xD;&#xA;&#xD;&#xA;A good first reference for details is &quot;D. Baraff, Dynamic Simulation of Non-Penetrating Rigid Bodies, (Ph. D thesis), Technical Report 92-1275, Computer Science Department, Cornell University, 1992.&quot;&#xD;&#xA;&#xD;&#xA;I would start with Baraff's work and either Bullet or O.D.E. Work in parallel between theory and code. &#xD;&#xA;&#xD;&#xA;Also, if you can find papers on Distinct Element Method by Peter Cundall, you might find those an easier entry point.&#xD;&#xA;&#xD;&#xA;Particle interaction is very rich. Don't expect overnight success, and you will have a lot of fun." />
  <row Id="9456" PostHistoryTypeId="2" PostId="4784" RevisionGUID="5fb3724f-c64b-4e5f-a421-5f62cc49c06c" CreationDate="2010-10-24T04:01:45.607" UserId="1677" Text="There are more or less standardized TV-show/movie formats and recommended timings:&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;&gt; By the early 1960s, television companies commonly presented half-hour long &quot;comedy&quot; series, or one hour long &quot;dramas.&quot; Half-hour series were mostly restricted to situation comedy or family comedy, and were usually aired with either a live or artificial laugh track. One hour dramas included genre series such as police and detective series, westerns, science fiction, and, later, serialized prime time soap operas. Programs today still overwhelmingly conform to these half-hour and one hour guidelines. [Source][1]&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;&gt; In the United States, most medical dramas are one hour long. [Source][2]&#xD;&#xA;&#xD;&#xA;3.&#xD;&#xA;&#xD;&#xA;&gt; Traditionally serials were broadcast as fifteen minute installments each weekday in daytime slots. In 1956 As the World Turns debuted as the first half-hour soap opera. All soap operas broadcast half-hour episodes by the end of the 1960s. With increased popularity in the 1970s most soap operas expanded to an hour (Another World even expanded to ninety minutes for a short time). More than half of the serials had expanded to one hour episodes by 1980. As of 2010, six of the seven US serials air one hour episodes each weekday. [Source][3]&#xD;&#xA;&#xD;&#xA;Interesting. **Are there any standards of timing in game development?**&#xD;&#xA;&#xD;&#xA;Well, 5-20 minutes casual games, of course. There is even a [&quot;5-minutes-game&quot; site][4]. And [1-hour-gamer][5] site. **Are there 1-week, 1-year, 1-eternity game formats?** Chess and Go - deep games that you can study all your life; but they are played in hour or several days (pro games). Addictive long-term online role-playing games (without win-condition) are played in monthes and, possibly, years. Replayability is an important factor to consider.&#xD;&#xA;&#xD;&#xA;It's good when game design document contains a line: &quot;A game is designed for solving in X hours&quot;. **How can it be measured before there is any prototype or demo?** When you know your game format, you know your audience (and vice versa). It is practical question.&#xD;&#xA;&#xD;&#xA;**Are there psychological researches about dynamic of gaming interest and involvement?**&#xD;&#xA;&#xD;&#xA;And **is there a correlation between game format and game genre?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Comedy-drama&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Medical_drama&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Soap_opera&#xD;&#xA;  [4]: http://www.5minutesgames.com/&#xD;&#xA;  [5]: http://www.onehourgamer.com/" />
  <row Id="9457" PostHistoryTypeId="1" PostId="4784" RevisionGUID="5fb3724f-c64b-4e5f-a421-5f62cc49c06c" CreationDate="2010-10-24T04:01:45.607" UserId="1677" Text="Game timings and formats" />
  <row Id="9458" PostHistoryTypeId="3" PostId="4784" RevisionGUID="5fb3724f-c64b-4e5f-a421-5f62cc49c06c" CreationDate="2010-10-24T04:01:45.607" UserId="1677" Text="&lt;game-design&gt;&lt;time-management&gt;" />
  <row Id="9459" PostHistoryTypeId="5" PostId="4767" RevisionGUID="d2e11e0d-5c4a-4892-b85d-89b260fb24c2" CreationDate="2010-10-24T04:42:25.087" UserId="721" Comment="deleted 27 characters in body" Text="For 3d physics, you can use 3D Physics Engines as [Bullet][1] or [O.D.E][2]. It is probably at first sight overhead... but you can use it for many great effects or add physic in your gameplay.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bullet_(software)&#xD;&#xA;  [2]: http://www.ode.org/" />
  <row Id="9460" PostHistoryTypeId="5" PostId="4767" RevisionGUID="f1e53f42-3065-480b-8867-81e0e4c3256d" CreationDate="2010-10-24T04:53:04.380" UserId="721" Comment="added 64 characters in body; added 106 characters in body" Text="For 3d physics, you can use 3D Physics Engines as [Bullet][1], [Newton][3] or [O.D.E][2]. It is probably at first sight overhead... but you can use it for many great effects or add physic in your gameplay.&#xD;&#xA;&#xD;&#xA;You can use [PAL][4] to abstract the Physics Engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bullet_(software)&#xD;&#xA;  [2]: http://www.ode.org/&#xD;&#xA;  [3]: http://newtondynamics.com/forum/newton.php&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/PAL_(software)" />
  <row Id="9461" PostHistoryTypeId="6" PostId="4784" RevisionGUID="c07503f5-6a95-4ce3-a669-ae23e071cef3" CreationDate="2010-10-24T05:16:01.507" UserId="919" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="9462" PostHistoryTypeId="5" PostId="4763" RevisionGUID="a8b2c84c-5423-4d10-80ca-2483670cfc86" CreationDate="2010-10-24T06:29:50.220" UserId="2039" Comment="added 86 characters in body" Text="Just curious what to do from here. So I am done with my tile editor program and currently have it set up so that my background (which is one large image) is mapped in XML to 32x32 tiles (again, a mapping, nothing is really split into tiles). &#xD;&#xA;&#xD;&#xA;So when I have my character (this is a platformer rpg) comes across a tile which I have labeled as obstacle or something, they stop. This is nice and all except for some ugly space in between my character and tile where the edge of my rock is. I can't do pixel detection because it will never be sound.&#xD;&#xA;&#xD;&#xA;For example, if my character's pinky ends up in the cell marked as an obstacle and for some reason, there is some black along an edge from a castle from the previous cell, this is a hit even though the player didn't actually touch any part of the rock but rather a part of the pinky hit that black edge.&#xD;&#xA;&#xD;&#xA;The only thing I had which makes things seem to nicely lineup is to map it to a 16x16 array.&#xD;&#xA;&#xD;&#xA;**Edit:** I will give the example with pic in the morning since site came back up.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9463" PostHistoryTypeId="2" PostId="4785" RevisionGUID="f7ab5c85-9b4b-403c-ba8e-320bfd2934ea" CreationDate="2010-10-24T06:38:13.583" UserId="1700" Text="I have seen the PCG wiki, and it is a great resource. But a lot of the articles are very brief and it is hard to find good links on specific things.&#xD;&#xA;&#xD;&#xA;I have been searching for ways to transform my Perlin noise height maps to make ridges, rivers, and other terrain features. I also can't find any articles on how to divide up the map into different areas for calculating texture coordinates or other values specific to the game. I have only been able to find websites detailing their software that can generate the different things, but no code or explanations. Are there any good sources of code examples/explanations on how to do the above mentioned with Perlin noise?&#xD;&#xA;&#xD;&#xA;PS. This should probably be a community wiki. I don't know how to make it as one though." />
  <row Id="9464" PostHistoryTypeId="1" PostId="4785" RevisionGUID="f7ab5c85-9b4b-403c-ba8e-320bfd2934ea" CreationDate="2010-10-24T06:38:13.583" UserId="1700" Text="Where can I find code examples of different variations of Perlin noise?" />
  <row Id="9465" PostHistoryTypeId="3" PostId="4785" RevisionGUID="f7ab5c85-9b4b-403c-ba8e-320bfd2934ea" CreationDate="2010-10-24T06:38:13.583" UserId="1700" Text="&lt;procedural-generation&gt;" />
  <row Id="9466" PostHistoryTypeId="5" PostId="4763" RevisionGUID="ce28bae5-2af2-412f-a8e4-e4ab1a5cec02" CreationDate="2010-10-24T06:39:28.043" UserId="2039" Comment="Wanted to explain my issue a bit better" Text="Just curious what to do from here. So I am done with my tile editor program and currently have it set up so that my background (which is one large image) is mapped in XML to 32x32 tiles (again, a mapping, nothing is really split into tiles). &#xD;&#xA;&#xD;&#xA;So when I have my character (this is a platformer rpg) comes across a tile which I have labeled as obstacle or something, they stop. This is nice and all except for some ugly space in between my character and tile where the edge of my rock is. I can't do pixel detection because it will never be sound.&#xD;&#xA;&#xD;&#xA;For example, if my character's pinky ends up in the cell marked as an obstacle and for some reason, there is some black along an edge from a castle from the previous cell, this is a hit even though the player didn't actually touch any part of the rock but rather a part of the pinky hit that black edge.&#xD;&#xA;&#xD;&#xA;The only thing I had which makes things seem to nicely lineup is to map it to a 16x16 array.&#xD;&#xA;&#xD;&#xA;**Edit:** I will give the example with pic in the morning since site came back up but for now I'll give a better explanation.&#xD;&#xA;&#xD;&#xA;My tile editor exports an XML file of my tile mapping...so, if I specified 32x32 tiles over an 800x600 image, my XML file will contain mappings for each 32x32 tile spread across the region. So I could have my XML file with tile 2 having a type of &quot;Obstacle&quot;. I then in XNA just read the XML into a list storing each tile and their characteristics.&#xD;&#xA;&#xD;&#xA;I then in my program do a collision check for now. In doing this, I create a rectangle around my player. Each time I move, I check for collision by doing this:&#xD;&#xA;&#xD;&#xA;1. Does my rectangle intersect any collisions with a characteristic of obstacle or wall and so on...&#xD;&#xA;&#xD;&#xA;2. If so, return true that a collision occurred.&#xD;&#xA;&#xD;&#xA;So let's say that my background image has a blue background, a castle and a rock in the middle. In a tile I marked as being an obstacle, it contains a piece of the black wall of the castle and to the right of this is a piece of that rock along my path. So my character is now running to the right, will have an intersection with this obstacle tile and as a result, have something like 29 pixels between the player and the start of the rock. This collision occurred as the player hit a tile marked as an obstacle. &#xD;&#xA;&#xD;&#xA;Using pixel color collision detection won't help either as a piece of my player could be hitting that black edge of the castle I talked about and the alpha values are never going to be 0. &#xD;&#xA;&#xD;&#xA;I'll give a picture example but I am just detailing it a bit better for now.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9467" PostHistoryTypeId="2" PostId="4786" RevisionGUID="fa7bd0f3-c7e2-403a-820c-17b29ff7d57f" CreationDate="2010-10-24T09:16:55.383" UserId="1550" Text="I'm wondering what would be the best way to store password and login in the client. Many people complain that they need to re-enter this every time they log in and they want me to make a way to save it. But how to save it? Saving it as plain text in game folder wouldn't be clever, but neither crypting it would help so much. It would be still easy to decrypt data.&#xD;&#xA;&#xD;&#xA;How would you do that people?&#xD;&#xA;&#xD;&#xA;Best regards!" />
  <row Id="9468" PostHistoryTypeId="1" PostId="4786" RevisionGUID="fa7bd0f3-c7e2-403a-820c-17b29ff7d57f" CreationDate="2010-10-24T09:16:55.383" UserId="1550" Text="Client-side login and password save" />
  <row Id="9469" PostHistoryTypeId="3" PostId="4786" RevisionGUID="fa7bd0f3-c7e2-403a-820c-17b29ff7d57f" CreationDate="2010-10-24T09:16:55.383" UserId="1550" Text="&lt;c++&gt;&lt;mmo&gt;&lt;python&gt;" />
  <row Id="9470" PostHistoryTypeId="2" PostId="4787" RevisionGUID="74304521-7919-4123-ba38-71278c7a474d" CreationDate="2010-10-24T09:47:54.317" UserId="450" Text="I think there are two issues to keep in mind:&#xD;&#xA;&#xD;&#xA; - unauthorized access to your server&#xD;&#xA; - learning the password to access other services (because people are lazy and reuse passwords)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to prevent abuse of the decrypted password elsewhere?&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;The second attack vector can be prevented by not storing the real password in any decryptable form at all. But a token generated by the server or a password hash that the server will accept instead of the password.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; How to prevent unauthorized access to your game? &#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;We are assuming here, that the attacker has access to the users computer in order to retrieve the password file. Based on this assumption it is likely that the attacker has write access, too. But if he has write access, he can modify program files and do all sorts of nasty things. So we have lost.&#xD;&#xA;&#xD;&#xA;That being said, there is a number of things you can do to make it more difficult for the attacker. Based on my experience with Stendhal most attacks are done by family members, who don't have a deep knowledge. So easy tricks make a difference:&#xD;&#xA;&#xD;&#xA; - hiding the password file somewhere outside the game folder&#xD;&#xA; - &quot;bind&quot; it to a specific computer by using the MAC address of the first network card or the serial number of the hard disk to encrypt the authentication information with.&#xD;&#xA; - &quot;bind&quot; it to the username by using it to encrypt the authentication information with.&#xD;&#xA;&#xD;&#xA;Note: None of this things give you real security. But they do reduce the number of incidents and thus reduce support costs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;By the way: WoW, which is quite famous, does not allow to save the password." />
  <row Id="9471" PostHistoryTypeId="2" PostId="4788" RevisionGUID="15a33704-882d-49e9-9c68-a9146bc64b55" CreationDate="2010-10-24T09:58:54.397" UserId="1386" Text="**I'm looking for a high performance vector graphics library I can use in my games.**&#xD;&#xA;&#xD;&#xA;I'm thinking along the lines of vector graphics such as those that can be made with [SVG](http://en.wikipedia.org/wiki/Scalable_Vector_Graphics).&#xD;&#xA;&#xD;&#xA;I'll consider any language at the moment (but must run on Windows).&#xD;&#xA;A solution that takes advantage of GPU hardware would be great.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="9472" PostHistoryTypeId="1" PostId="4788" RevisionGUID="15a33704-882d-49e9-9c68-a9146bc64b55" CreationDate="2010-10-24T09:58:54.397" UserId="1386" Text="High Performance Vector Graphics Solutions" />
  <row Id="9473" PostHistoryTypeId="3" PostId="4788" RevisionGUID="15a33704-882d-49e9-9c68-a9146bc64b55" CreationDate="2010-10-24T09:58:54.397" UserId="1386" Text="&lt;graphics&gt;&lt;svg&gt;" />
  <row Id="9474" PostHistoryTypeId="2" PostId="4789" RevisionGUID="26ae0fb5-2b34-4a92-adcc-0d1daf58f0f2" CreationDate="2010-10-24T10:15:26.880" UserId="1677" Text="[World Generation Breakdown][1]  &#xD;&#xA;[Perlin Noise][2]  &#xD;&#xA;[advanced perlin noise][3]  &#xD;&#xA;[NVidia GPU Gems 2. Chapter 26. Implementing Improved Perlin Noise][4]  &#xD;&#xA;[NVidia GPU Gems 3. Chapter 1. Generating Complex Procedural Terrains Using the GPU][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nolithius.com/game-development/world-generation-breakdown&#xD;&#xA;  [2]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;  [3]: http://www.iquilezles.org/www/articles/morenoise/morenoise.htm&#xD;&#xA;  [4]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter26.html&#xD;&#xA;  [5]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html" />
  <row Id="9475" PostHistoryTypeId="5" PostId="4789" RevisionGUID="cae9eb37-b133-4ee4-b311-f0b6b34911ec" CreationDate="2010-10-24T10:29:00.440" UserId="1677" Comment="added 161 characters in body" Text="[World Generation Breakdown][1]  &#xD;&#xA;[Perlin Noise][2]  &#xD;&#xA;[advanced perlin noise][3]  &#xD;&#xA;[NVidia GPU Gems 2. Chapter 26. Implementing Improved Perlin Noise][4]  &#xD;&#xA;[NVidia GPU Gems 3. Chapter 1. Generating Complex Procedural Terrains Using the GPU][5]&#xD;&#xA;&#xD;&#xA;Also 2 articles (in Russian) with source code:&#xD;&#xA;&#xD;&#xA;http://blog.wonderville.ru/procedural-perlin-noise/  &#xD;&#xA;http://blog.wonderville.ru/perlin-noise-simplex-noise/&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nolithius.com/game-development/world-generation-breakdown&#xD;&#xA;  [2]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;  [3]: http://www.iquilezles.org/www/articles/morenoise/morenoise.htm&#xD;&#xA;  [4]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter26.html&#xD;&#xA;  [5]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html" />
  <row Id="9476" PostHistoryTypeId="2" PostId="4790" RevisionGUID="7ae4dec9-5cb0-4c5d-8499-fd4830c513e7" CreationDate="2010-10-24T10:56:35.830" UserId="101" Text="[Scaleform GFx][1] is a commercial middleware library for integrating Adobe Flash movies (optimized rendering, ActionScript, and more) into your engine.&#xD;&#xA;&#xD;&#xA;In a past life, Scaleform GFx's codebase was that of [GameSWF][2]. GameSWF is open source.&#xD;&#xA;&#xD;&#xA;(I'll expand on this answer a little bit later.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scaleform.com/products/gfx &quot;Scaleform GFx product page&quot;&#xD;&#xA;  [2]: http://tulrich.com/geekstuff/gameswf.html &quot;GameSWF home page&quot;" />
  <row Id="9477" PostHistoryTypeId="2" PostId="4791" RevisionGUID="d88a6ffb-55f6-480f-9e0b-4ebd77c6c210" CreationDate="2010-10-24T13:20:04.997" UserId="889" Text="I would like to start a little discussion about serious video games. Do you think serious games DO have their place in today's world ? What kind of serious games do you think the most interesting in term of education / work tools ?&#xD;&#xA;&#xD;&#xA;I've recently read an article about the educational power of such games in early ages. Do you think serious video games could become a ubiquitous learning tool in primary school ?&#xD;&#xA;&#xD;&#xA;Any experience, title share or ideas are heightly appreciated, I want to get a feel of this question from experienced game developper that are interested of writing an answer !" />
  <row Id="9478" PostHistoryTypeId="1" PostId="4791" RevisionGUID="d88a6ffb-55f6-480f-9e0b-4ebd77c6c210" CreationDate="2010-10-24T13:20:04.997" UserId="889" Text="Discussion about Serious Games : Their lacks and forces" />
  <row Id="9479" PostHistoryTypeId="3" PostId="4791" RevisionGUID="d88a6ffb-55f6-480f-9e0b-4ebd77c6c210" CreationDate="2010-10-24T13:20:04.997" UserId="889" Text="&lt;game-design&gt;&lt;education&gt;" />
  <row Id="9480" PostHistoryTypeId="2" PostId="4792" RevisionGUID="1892f2d0-9981-4293-96f0-5f8bf29a13ab" CreationDate="2010-10-24T13:24:24.267" UserId="1946" Text="As an alternative to using cells, you could map the edges of your obstables with vectors (lines), this does not have to be highly accurate, just an approximation of the obstacle shape. &#xD;&#xA;&#xD;&#xA;When you do your collision detection you can check if you characters bounding rect intersects with one of the vectors. You can map the vectors to a cell to limit the number of vectors you check against, so when you enter a cell you check your character against the vectors in the cell. " />
  <row Id="9481" PostHistoryTypeId="9" PostId="4784" RevisionGUID="7786814a-5769-42e2-96d0-0492ed6bf954" CreationDate="2010-10-24T13:30:47.337" UserId="1677" Comment="Rollback to [5fb3724f-c64b-4e5f-a421-5f62cc49c06c]" Text="&lt;game-design&gt;&lt;time-management&gt;" />
  <row Id="9482" PostHistoryTypeId="2" PostId="4793" RevisionGUID="e77b6d45-d23c-4237-8ec3-f35a2cdf9326" CreationDate="2010-10-24T13:49:11.860" UserId="165" Text="What is the range of input values to your *sin()* function? For what you're using it for, it sounds like they might be limited, which means you could **pre-compute the values**. For instance, if you're rounding up the input values to the nearest degree, then you only have 360 possible values - just pre-compute them and store in a table.&#xD;&#xA;&#xD;&#xA;If you need slightly more values, say to one decimal place, you could interpolate from the table - I'm not familiar with *perlin noise*, but the word &quot;noise&quot; seems to indicate it doesn't require high accuracy. :) (You could also just make a larger table, 3600 entries isn't much space)." />
  <row Id="9483" PostHistoryTypeId="2" PostId="4794" RevisionGUID="03bd6d08-a64a-4b93-b3d3-59c33ac0474e" CreationDate="2010-10-24T14:54:02.190" UserId="2668" Text="If Windows (Vista and beyond) is your only platform you should look into [Direct2D][1], which provides GPU accelerated 2D vector graphics rendering with software fallback. For a more x-platform solution look into Cairo (see cairographics.org - sorry, I am too low on reputation for two links…), which I believe to have a GPU accelerated rasterizer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd370990(VS.85).aspx&#xD;&#xA;" />
  <row Id="9484" PostHistoryTypeId="2" PostId="4795" RevisionGUID="18e1da8e-e9c9-4470-9456-d5d4df2c9363" CreationDate="2010-10-24T16:08:29.383" UserId="721" Text="For particle computations with OpenGL ES 2.x (iPhone 3GS, 4 or many Android Phones), you can use the vertex shader but the equation must be very simple and depend on few variables.&#xD;&#xA;&#xD;&#xA;The main idea is to send parameters with uniform or attributes: &#xD;&#xA;&#xD;&#xA; - time elapsed: uniform&#xD;&#xA; - initial position of particle: attribute&#xD;&#xA; - initial velocity of particle: attribute&#xD;&#xA; - color: attribute&#xD;&#xA;&#xD;&#xA;You can use a static VBO to send these data one times. If you need advanced physics, this is probably not the solution and you must use the CPU. With Neon instructions, you can have a great speedup. Warning the Tegra2 (available on few android tablets) doesn't support this instructions set. " />
  <row Id="9485" PostHistoryTypeId="2" PostId="4796" RevisionGUID="ddebebaf-e53c-4b26-996b-a0223edbd078" CreationDate="2010-10-24T16:17:27.687" UserId="2509" Text="Is there code available to view the specs of a phone that is running your application?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="9486" PostHistoryTypeId="1" PostId="4796" RevisionGUID="ddebebaf-e53c-4b26-996b-a0223edbd078" CreationDate="2010-10-24T16:17:27.687" UserId="2509" Text="Java code to get android phone hardware specs" />
  <row Id="9487" PostHistoryTypeId="3" PostId="4796" RevisionGUID="ddebebaf-e53c-4b26-996b-a0223edbd078" CreationDate="2010-10-24T16:17:27.687" UserId="2509" Text="&lt;android&gt;" />
  <row Id="9488" PostHistoryTypeId="2" PostId="4797" RevisionGUID="730bd493-31b2-4020-addf-946f7d65d526" CreationDate="2010-10-24T16:56:48.670" UserId="2698" Text="Airing times exist for scheduling reasons. Games, not suffering from such a predicament, are free of the burden of attempting to adhere to scheduling standards.&#xD;&#xA;&#xD;&#xA;A game should go on for exactly as long as its designers feel it should to generate the effect they desire in the player. An arbitrary time constraint has no relevance here, and no designer should be concerned with attempting to fulfill one.&#xD;&#xA;&#xD;&#xA;Players will play as long as they would enjoy doing so, and this has very little to do with time. Instead it has to do with a player's experience, and how that experience changes (or doesn't) over time. Difficulty level is apparently a [significant contributing factor][1] to whether the player would actually like to hang around, but I'm sure there are a ton more factors (e.g. whether the game gets repetitive or remains interesting).&#xD;&#xA;&#xD;&#xA;[1]: http://www.joystiq.com/2009/10/28/gamasutra-examines-gamerscore-and-game-completion-statistics/" />
  <row Id="9489" PostHistoryTypeId="2" PostId="4798" RevisionGUID="ea8b259c-077a-42c7-817e-65a6594ce44f" CreationDate="2010-10-24T16:59:34.170" UserId="2469" Text="If you are using windows XP or want something that works on most versions of windows, you should check out [DirectDraw][1] (even though it's a little old now) or [GDI+][2], or you could use Flash, which seems pretty good for vector rendering, and is cross platform.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/DirectDraw&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ms533798%28VS.85%29.aspx" />
  <row Id="9490" PostHistoryTypeId="5" PostId="4797" RevisionGUID="7ef13855-a2a0-4dc3-b900-717e912a9f10" CreationDate="2010-10-24T17:02:53.753" UserId="2698" Comment="added 323 characters in body; deleted 6 characters in body" Text="Standard episode times exist because it **makes time scheduling simpler**. Games, not suffering from such a predicament, are free of the burden of attempting to adhere to scheduling standards.&#xD;&#xA;&#xD;&#xA;A game exists for a designer to generate an experience for a player, and a game should go on for exactly as long as the designer feels it's necessary to generate that experience. An arbitrary time constraint has no use here unless it actually contributes to that experience.&#xD;&#xA;&#xD;&#xA;People will play a game until they cease to enjoy doing so, and time along has no bearing on it. Instead it has to do with a player's experience, and how that experience changes (or doesn't) over time. You might cease to enjoy a game just because you realise you've spent so-and-so hours/days/years on it, but that's still just because of the player's experience of the game - they now experience that game as a waste of time.&#xD;&#xA;&#xD;&#xA;**Difficulty level** is apparently a [significant contributing factor][1] to whether the player would actually like to hang around, but there are no doubt a ton more gameplay factors responsible (e.g. whether the game gets repetitive or remains interesting).&#xD;&#xA;&#xD;&#xA;[1]: http://www.joystiq.com/2009/10/28/gamasutra-examines-gamerscore-and-game-completion-statistics/" />
  <row Id="9491" PostHistoryTypeId="2" PostId="4799" RevisionGUID="810e121c-d9cb-480a-8eb6-cf9c104065ce" CreationDate="2010-10-24T17:04:15.413" UserId="2469" Text="You might want to read [this][1] too, it's got fast sine and cosine approximations&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://lab.polygonal.de/2007/07/18/fast-and-accurate-sinecosine-approximation/" />
  <row Id="9492" PostHistoryTypeId="2" PostId="4800" RevisionGUID="1d804c84-0882-4838-9615-8993f3da54c0" CreationDate="2010-10-24T18:59:36.617" UserId="2733" Text="Most pages claiming to cover perlin noise actually cover something else. If you want the real deal, read [Improved Noise reference implementation](http://mrl.nyu.edu/~perlin/noise/) by Ken Perlin himself. There you will also find a link to the [SIGGRAPH 2002 paper](http://mrl.nyu.edu/~perlin/paper445.pdf) describing the algorithm in detail." />
  <row Id="9493" PostHistoryTypeId="6" PostId="4791" RevisionGUID="5e3aac2a-aa4b-4c73-a9bc-ba15c2871623" CreationDate="2010-10-24T19:33:31.663" UserId="2290" Comment="edited tags" Text="&lt;game-design&gt;&lt;education&gt;&lt;serious-games&gt;" />
  <row Id="9494" PostHistoryTypeId="2" PostId="4801" RevisionGUID="98e8fbac-2537-4599-8c0c-b77d945dc646" CreationDate="2010-10-24T19:37:53.570" UserId="1386" Text="When I visualise a three dimensional rotation matrix, or scaling matrix I visualize it as three axes.&#xD;&#xA;&#xD;&#xA;**Is there a similar way that I can visualize a rotation quaternion?**" />
  <row Id="9495" PostHistoryTypeId="1" PostId="4801" RevisionGUID="98e8fbac-2537-4599-8c0c-b77d945dc646" CreationDate="2010-10-24T19:37:53.570" UserId="1386" Text="How can you visualize a quaternion?" />
  <row Id="9496" PostHistoryTypeId="3" PostId="4801" RevisionGUID="98e8fbac-2537-4599-8c0c-b77d945dc646" CreationDate="2010-10-24T19:37:53.570" UserId="1386" Text="&lt;math&gt;" />
  <row Id="9497" PostHistoryTypeId="2" PostId="4802" RevisionGUID="2697f521-3afe-4bc0-93cc-510c38d027e2" CreationDate="2010-10-24T19:50:03.920" UserId="1134" Text="I'm not sure why this is &quot;today's world&quot;: growing up in the 80s, I have fond memories of [Where in the World is Carmen Sandiego][1], [Reader Rabbit and Math Rabbit][2], [Number Munchers][3], and the various standalone [Speak and Spell][4] devices.&#xD;&#xA;&#xD;&#xA;I work in a game company now.  We do maybe 70% commercial titles to keep the company busy, but the remaining 30% are educational, philanthropic, or otherwise socially responsible.  We've done or prototyped (often for academia or government or both) games targeted at teaching science to young kids, games to teach better practices to third world denizens, and even games to help people with specific health issues.&#xD;&#xA;&#xD;&#xA;We also regularly aim our commercial games slightly high for the intended audience, at least in terms of dialogue and story.  I like to think of this as the &quot;Rocky and Bullwinkle&quot; phenomenon: you can teach kids very well by having something that is basically fun, zany, and engaging, and throw in more &quot;adult&quot; themes.  Almost all of Jim Henson's work falls in this category too.&#xD;&#xA;&#xD;&#xA;The lines blur a bit.  I'm not sure I like the term &quot;serious games&quot; due to the connotations of &quot;serious&quot;; people play complicated flight or submarine simulators for fun, health-related games are often more effective with fun and/or addictive content, and on the opposite end of the spectrum, children learn more when their zany entertainment has a literate, political, social, or scientific underpinning.&#xD;&#xA;&#xD;&#xA;The goal is to prey upon our nature: find something that sparks the desire to explore, to create, to solve problems, or even to compete.  Get to a place we'll naturally be intrigued or enjoying ourselves, where we'll naturally want to do more (play more of the game, do more related activities or exploration) and the learning follows.&#xD;&#xA;&#xD;&#xA;I don't ever see games taking over entire cirricula.  I think you need balance between forms of learning, otherwise you wear things out and you don't form as many associations to strengthen knowledge.&#xD;&#xA;&#xD;&#xA;But I _do_ strongly believe that games will make a great part of that particular balanced breakfast.  Even for adults concerned with ongoing education and expansion of their abilities; even for reflex training, exercise, or the like.&#xD;&#xA;&#xD;&#xA;As an aside, you may be interested in [Games in Education][5]; it's a conference held in the northeast each year, which is fairly teacher-centric.  Many educators come to speak about their experiences using games to teach -- what has worked, what hasn't, etc.  There should be video on the site, somewhere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Where_in_the_World_Is_Carmen_Sandiego%3F&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Reader_Rabbit&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Number_Munchers&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Speak_%26_Spell_(toy)&#xD;&#xA;  [5]: http://www.gamesineducation.org/" />
  <row Id="9498" PostHistoryTypeId="10" PostId="4791" RevisionGUID="52ddfb6d-e080-4cd0-a262-24c931f0e331" CreationDate="2010-10-24T19:55:21.613" UserId="14" CloseReasonId="4" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="9499" PostHistoryTypeId="11" PostId="4791" RevisionGUID="49aac396-f373-458a-a90c-2826574d8f90" CreationDate="2010-10-24T19:57:06.950" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="9500" PostHistoryTypeId="2" PostId="4803" RevisionGUID="34f52eda-eddd-4982-8831-fa6714f89c95" CreationDate="2010-10-24T20:00:11.113" UserId="2693" Text="You can, but it becomes difficult. Instead of three separate axis of rotation, or three gimbals that are each moving independently one at a time, you have to picture a quaternion as a description of the full three dimensional rotation angle and the magnitude at once as a single description of the entire translation.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Quaternion_rotation&#xD;&#xA;&#xD;&#xA;Quaternions are definitely not an area I'm rock solid on, but that wiki page has some decent info on it. Wikipedia talks about rotations on a hypersphere though, gets a little confusing. Good luck!" />
  <row Id="9501" PostHistoryTypeId="2" PostId="4804" RevisionGUID="200eb581-ba4c-4c93-ba6b-67a9856767ea" CreationDate="2010-10-24T20:22:33.653" UserId="2734" Text="I'm trying to write a game where player picks where they are going by just mouse-clicking on that position and it goes there (just like RuneScape's point-and-click mouse interface).&#xD;&#xA;&#xD;&#xA;I'm trying to get it working on the `jme3test.bullet.TestWalkingChar` example.&#xD;&#xA;&#xD;&#xA;I've tried:&#xD;&#xA;&#xD;&#xA;    character.setLocalTranslation(&#xD;&#xA;        cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f));&#xD;&#xA;&#xD;&#xA;Also tried:&#xD;&#xA;&#xD;&#xA;    Vector3f worldCoordinates = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f);&#xD;&#xA;    Vector3f localCoordinates = null;&#xD;&#xA;    		&#xD;&#xA;    character.worldToLocal(worldCoordinates, localCoordinates);&#xD;&#xA;    character.setLocalTranslation(localCoordinates);&#xD;&#xA;&#xD;&#xA;and:&#xD;&#xA;&#xD;&#xA;    Vector3f worldCoordinates = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f);&#xD;&#xA;    Vector3f localCoordinates = null;&#xD;&#xA; &#xD;&#xA;    character.setLocalTranslation(character.worldToLocal(worldCoordinates, localCoordinates));&#xD;&#xA;&#xD;&#xA;But it's just teleporting the player to some unrelated coordinates.&#xD;&#xA;&#xD;&#xA;Any ideas?&#xD;&#xA;&#xD;&#xA;BTW: If there's a complete example on how to do that, it'd be great. I don't care about game engine - I prefer jME3 but it doesn't really matter for me.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="9502" PostHistoryTypeId="1" PostId="4804" RevisionGUID="200eb581-ba4c-4c93-ba6b-67a9856767ea" CreationDate="2010-10-24T20:22:33.653" UserId="2734" Text="Mouse-driven Movement" />
  <row Id="9503" PostHistoryTypeId="3" PostId="4804" RevisionGUID="200eb581-ba4c-4c93-ba6b-67a9856767ea" CreationDate="2010-10-24T20:22:33.653" UserId="2734" Text="&lt;java&gt;&lt;mmo&gt;" />
  <row Id="9504" PostHistoryTypeId="2" PostId="4805" RevisionGUID="5d1ed654-a2a5-4f0f-9a08-d911bc43d53b" CreationDate="2010-10-24T20:28:51.660" UserId="2290" Text="I know serious games have gained a lot of momentum over the past few years, with the growth of the simulation industry, and are beginning to gain more and more attention in the game industry, as serious game developers have started utilizing commercial game technologies.&#xD;&#xA;&#xD;&#xA;Do I think serious games have a place in today's world? Absolutely! Video games are an incredibly powerful medium, and I think that leveraging the medium to educate, train, and raise awareness of important topics is something we as a community should wholeheartedly embrace. That being said, I do believe there is still a lot of value to traditional education and learning, and that the best use of serious games is as a supplement to traditional education, not as a replacement.&#xD;&#xA;&#xD;&#xA;Are serious games new? Absolutely not! Although it wasn't too long ago, I remember playing a number of educational video games in my youth - and between you and me, I remember a couple of them being a lot more fun than some of today's supposed AAA games. :P&#xD;&#xA;&#xD;&#xA;Resources&#xD;&#xA;-------&#xD;&#xA;Here are some resources I think you may find useful in your quest for information on serious games:&#xD;&#xA;&#xD;&#xA; - Organizations &amp; Communities&#xD;&#xA;  - [Serious Games Initiative][1]&#xD;&#xA;  - [Games for Change][2]&#xD;&#xA; - Conferences and Events&#xD;&#xA;  - [Games for Health Conference][3]&#xD;&#xA;  - [Games for Change Festival][4]&#xD;&#xA;  - [The Power of Design: Youth Making Social Issue][5]&#xD;&#xA;  - [Games, Learning, and Society Conference][6]&#xD;&#xA;  - [Future Play][7]&#xD;&#xA;  - [I/ITSEC][8]&#xD;&#xA; - Video Games&#xD;&#xA;  - [Wikipedia listing of &quot;Children's Educational Video Games&quot;][10]&#xD;&#xA;&#xD;&#xA;This list is by no means definitive, but my hope is that these resources will give you a good starting point for your research. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.seriousgames.org/&#xD;&#xA;  [2]: http://www.gamesforchange.org/&#xD;&#xA;  [3]: http://www.gamesforhealth.org/&#xD;&#xA;  [4]: http://www.gamesforchange.org/fest2010-archive&#xD;&#xA;  [5]: http://vimeo.com/channels/112464&#xD;&#xA;  [6]: http://www.glsconference.org/2010/&#xD;&#xA;  [7]: http://www.futureplay.org/&#xD;&#xA;  [8]: http://www.iitsec.org/&#xD;&#xA;  [9]: http://www.bistudio.com/&#xD;&#xA;  [10]: http://en.wikipedia.org/wiki/Category:Children%27s_educational_video_games" />
  <row Id="9505" PostHistoryTypeId="6" PostId="3969" RevisionGUID="6d240f4e-20ba-49d6-8a9f-951d194e05bc" CreationDate="2010-10-24T20:37:08.263" UserId="2290" Comment="edited tags" Text="&lt;programming&gt;&lt;cross-platform&gt;&lt;education&gt;&lt;serious-games&gt;" />
  <row Id="9506" PostHistoryTypeId="2" PostId="4806" RevisionGUID="e77055b6-55cc-46e2-9f68-ccacfe8cd84c" CreationDate="2010-10-24T20:46:09.347" UserId="2735" Text="I've designed my game entities using a common pattern of separating the entity from its components.  In my case, I've used the Strategy pattern to give each of my entities an IDrawable component.&#xD;&#xA;&#xD;&#xA;I construct my entities using a factory, which constructs the entity and adds an appropriate drawable, e.g.:&#xD;&#xA;&#xD;&#xA;    public static PlayerEntity CreatePlayerEntity(...)&#xD;&#xA;    {&#xD;&#xA;       PlayerEntity playerEntity = new PlayerEntity(...);&#xD;&#xA;       SpriteDrawable spriteDrawable = new SpriteDrawable(...);&#xD;&#xA;       playerEntity.Drawable = spriteDrawable;&#xD;&#xA;    &#xD;&#xA;       ...&#xD;&#xA;    &#xD;&#xA;       return playerEntity;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now here's the question: If I later want to update the player drawable in some way (e.g. modify the sprite, change the animation, etc.), how and where should I do this?&#xD;&#xA;&#xD;&#xA;My first thought is to have C# events that the PlayerEntity publishes and the Drawable subscribes to, but this gets tricky from a purist standpoint, because it's hard to do this without the Drawable requiring a reference to a PlayerEntity.  My current hacky solution is to subscribe to these events from within the CreatePlayerEntity() method itself, using anonymous delegates, which can take advantage of the fact that you've still got a reference to the concrete IDrawable implementation.  It just doesn't seem right for the factory to have this responsibility, though:&#xD;&#xA;&#xD;&#xA;    public static PlayerEntity CreatePlayerEntity(...)&#xD;&#xA;    {&#xD;&#xA;       PlayerEntity playerEntity = new PlayerEntity(...);&#xD;&#xA;       SpriteDrawable spriteDrawable = new SpriteDrawable(...);&#xD;&#xA;       playerEntity.Drawable = spriteDrawable;&#xD;&#xA;    &#xD;&#xA;      playerEntity.SomeEvent += new EventHandler((sender, e) =&gt; { spriteDrawable.Texture = blah; });&#xD;&#xA;&#xD;&#xA;       ...&#xD;&#xA;    &#xD;&#xA;       return playerEntity;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;What is a better, approved way to accomplish this communication between concrete implementations?" />
  <row Id="9507" PostHistoryTypeId="1" PostId="4806" RevisionGUID="e77055b6-55cc-46e2-9f68-ccacfe8cd84c" CreationDate="2010-10-24T20:46:09.347" UserId="2735" Text="Where to update Game Entity Drawables (in C#) ?" />
  <row Id="9508" PostHistoryTypeId="3" PostId="4806" RevisionGUID="e77055b6-55cc-46e2-9f68-ccacfe8cd84c" CreationDate="2010-10-24T20:46:09.347" UserId="2735" Text="&lt;game-design&gt;" />
  <row Id="9509" PostHistoryTypeId="2" PostId="4807" RevisionGUID="62330384-9193-4173-b2d6-45e7537cb384" CreationDate="2010-10-24T21:25:09.173" UserId="678" Text="I visualize my quaternions as three-dimensional vectors (direction + length) with a bit to the side to be able to show rotation along the vector's axis.&#xD;&#xA;&#xD;&#xA;It's a common way to visualize rotation vector in physics, but the name escapes me." />
  <row Id="9510" PostHistoryTypeId="6" PostId="4806" RevisionGUID="63830a33-d55a-45ee-a2f9-f3213abd6720" CreationDate="2010-10-24T22:01:45.083" UserId="2735" Comment="edited tags" Text="&lt;architecture&gt;" />
  <row Id="9511" PostHistoryTypeId="5" PostId="2108" RevisionGUID="76c1daf7-17fc-4031-9fa3-b95a2c89289f" CreationDate="2010-10-24T22:30:54.287" UserId="189" Comment="added 7 characters in body" Text="At my school we have some masters students studying AI, and they do so using the Unreal engine. They pair up with an art student who makes some 3D models (they certainly don't have to be fancy) and then they work their AI magic in UnrealScript and the Unreal editor, and end up with something functional which can be studied and played with. This is the end goal of AI, after all: an actual game or prototype which demonstrates the AI concepts. Because anything less is just a concept, not a demonstration.&#xD;&#xA;&#xD;&#xA;I would imagine you could substitute any engine for Unreal; Unity of course is very popular, and Valve's Source engine is also doing some great AI things. I think the end result is that you need to use all the middleware you can, so that you can get past the foundation and quickly get to actually testing AI concepts.&#xD;&#xA;&#xD;&#xA;Many of your questions are very much case-by-case basis. You may want multiple examples of one AI concept each, or you may want one big AI sandbox world with all sorts of AIs running around interacting. It really depends on what exactly you're doing or showing.&#xD;&#xA;&#xD;&#xA;&gt;Also as a portfolio piece ideally there would be an executable, and videos which should show off whatever is trying to be shown off within only a few minutes.&#xD;&#xA;&#xD;&#xA;This isn't a question, so: yes! Also I'd recommend getting a personal website so that you can hopefully direct them to it, or even show it to them in an interview if there is a computer in the room. Make sure the website is as standard as possible; use HTML5 video and Flash (whichever one the browser is compatible with), and have screenshots in case the computer is so locked down that none of these are available. Also if you have a portable video-playing device (iPod, phone, etc.) load up videos of your portfolio and bring that! There might be nothing more impressive in an interview without a computer, than pulling out your *insert device here* and actually showing the interviewer your work.&#xD;&#xA;&#xD;&#xA;Also, one final note: there is a big difference between pretty and polished. It doesn't have to have stellar graphics; but the graphics that are there should at least look finished, not placeholders, no glitches or bugs, etc. Just because it doesn't need to be fine art, doesn't mean it shouldn't look like a finished prototype ready to present." />
  <row Id="9512" PostHistoryTypeId="2" PostId="4808" RevisionGUID="d0fcc4c1-3128-4603-84d4-751961344412" CreationDate="2010-10-24T23:03:14.753" UserId="2693" Text="Regular Restarts is absolutely not the answer. If you have regular restarts, everybody is going to quit. Thats the exact OPPOSITE of the point of an MMORPG, which is all about character development and time investment. And if you're talking about a more traditional competative online PvP system, then what do you mean restarts? Are you talking about an RPG with character development? Then again, you don't want to undo people's advancement. Are you talking about a skill based game? Then you CANT erase people's skill. So what?&#xD;&#xA;&#xD;&#xA;If you're talking about games like WoW, which regularly releases expansion packs to keep the game interesting, you are misunderstanding the game design involved. Thats not a restart.&#xD;&#xA;&#xD;&#xA;The way they balance the game is not with character restarts, but with a &quot;levels&quot; system. Players who have played longer are more powerful, but they are higher level. Higher level players move on to higher level areas, and as such are not near the low level players. &#xD;&#xA;&#xD;&#xA;To keep someone who has been playing the game since it came out non-stop from being unstoppable, nearly every successful MMORPG has implemented level caps. So once you hit the highest level, your character cannot gain stats any further. Furthermore characters cannot usually challenge characters who are X levels lower than them, or at least receive a penalty for doing so. &#xD;&#xA;&#xD;&#xA;You can't force high level characters to be far away from low level characters, thats just not fair. Players need to have control. However, like I said, if you have proper level design that takes into account character progression, then high level players will have moved on to higher level content, and will naturally be farther away. But this does not prevent them from running back to the low level areas, and gank low level players. And this definitely happens all the time.&#xD;&#xA;&#xD;&#xA;If, however, you're not talking about an open-world persistant MMO, then I don't see what your problem is. If you're just talking about a traditional online pvp game, then you're just talking about a matchmaking system.&#xD;&#xA;&#xD;&#xA;Record a skill level for each player, and then increase or decrease that skill level after each &quot;game&quot; they play pvp, with increase for a win and decrease for a loss, and the amount being based upon the difference between the players' skill levels. See ELHO.&#xD;&#xA;&#xD;&#xA;So you just match up the high level players to fight each other, and the low level players to fight each other. See: Halo, Warcraft3, League of Legends, etc. etc. etc." />
  <row Id="9513" PostHistoryTypeId="5" PostId="3806" RevisionGUID="3019f5f3-f3f9-4189-afb2-10f6390c6acc" CreationDate="2010-10-24T23:11:50.353" UserId="202" Comment="included the cover image of the game as wished by the author" Text="[Tribal Trouble][1] is a real-time strategy video game for Microsoft Windows, Linux and Mac OS X. The game pits natives of tropical islands against invading Vikings. The game was developed by independent studio Oddlabs, and has won several awards, including four top 5 positions in indie game review site GameTunnel's 2005 awards in the categories of best multiplayer game, best graphics, best strategy game and best game overall. The game also spawned a sequel, Tribal Trouble 2. (source Wikipedia)&#xD;&#xA;&#xD;&#xA;![Cover image from the game 'Tribal Trouble'](http://i.stack.imgur.com/4kO9H.jpg)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tribaltrouble.com/&#xD;&#xA;" />
  <row Id="9514" PostHistoryTypeId="5" PostId="4797" RevisionGUID="00e12162-f3f8-461b-87c3-0aadc70d3e92" CreationDate="2010-10-24T23:26:18.350" UserId="2698" Comment="deleted 578 characters in body; deleted 16 characters in body" Text="The thing to take note of is that standard episode times exist to make TV channel scheduling simpler. There's no equivalent of that in games, so why should designers worry about standard times?&#xD;&#xA;&#xD;&#xA;One source of the idea might be because people only play games for so many total hours. That's not a function of the time itself though. That's a function of the player's relationship to the game's experience. [Difficulty is a large contributor][1] to how long a player sticks around: too easy and predictable, or unforgivingly difficult, and you won't try to go further.&#xD;&#xA;&#xD;&#xA;[1]: http://www.joystiq.com/2009/10/28/gamasutra-examines-gamerscore-and-game-completion-statistics/" />
  <row Id="9515" PostHistoryTypeId="5" PostId="4797" RevisionGUID="bbd63c6e-1961-4fe6-8c41-4d2777544753" CreationDate="2010-10-24T23:31:35.020" UserId="2698" Comment="added 551 characters in body" Text="The thing to take note of is that standard episode times exist to make TV channel scheduling simpler. There's no equivalent of that in games, so why should designers worry about standard times?&#xD;&#xA;&#xD;&#xA;It's not like standard times improve the experience. Look at movies; they pick whatever duration they like, just bearing in mind their customer has expectations that they'll get their moneys' worth and probably don't want to sit in a room for five hours, and because the producers probably couldn't afford to gamble with the cost of even more footage.&#xD;&#xA;&#xD;&#xA;Okay, so it's a fact gamers will only play a given game for so many total hours. That's not a function of the time itself though. That's a function of the player's relationship to the game's experience. [Difficulty is a large contributor][1] to how long a player sticks around: too easy and predictable, or unforgivingly difficult, and you won't try to go further.&#xD;&#xA;&#xD;&#xA;In movies you'll get tired after five hours because you want to be elsewhere. The solution in games? Saving. There, another problem we don't suffer from: games can last for more than one sitting now.&#xD;&#xA;&#xD;&#xA;[1]: http://www.joystiq.com/2009/10/28/gamasutra-examines-gamerscore-and-game-completion-statistics/" />
  <row Id="9516" PostHistoryTypeId="5" PostId="4797" RevisionGUID="a86a9b01-1691-4b72-b441-e75c59c95fa4" CreationDate="2010-10-24T23:38:59.553" UserId="2698" Comment="deleted 415 characters in body" Text="The thing to take note of is that standard episode times exist to make TV channel scheduling simpler. There's no equivalent of that in games, so why should designers worry about standard times?&#xD;&#xA;&#xD;&#xA;We know gamers will only play a given game for so many total hours. We _are_ those gamers. However that's not a function of the time we spent, we didn't look at our watch, notice we'd chalked up ten hours total on Mario and suddenly ceased to enjoy it. We stopped enjoying a game because our relationship to the experience changed over time: it no longer had anything we enjoyed. It became too easy or predictable, for instance. [Difficulty is a large contributor][1] to how long a player will stick around.&#xD;&#xA;&#xD;&#xA;[1]: http://www.joystiq.com/2009/10/28/gamasutra-examines-gamerscore-and-game-completion-statistics/" />
  <row Id="9517" PostHistoryTypeId="2" PostId="4809" RevisionGUID="930d8102-3167-4b85-b575-21270c920020" CreationDate="2010-10-24T23:53:05.050" UserId="2698" Text="You're taking **absolute** world coordinates and feeding them to _setLocalTranslation_ which, being a translation, sounds like it should take **relative** coordinates.&#xD;&#xA;&#xD;&#xA;i.e. if your character is at (10,10) and you click (10,20), I'll bet your character will move to (20,30) - it moved 10 horizontally and 20 vertically, not _to_ (10,20).&#xD;&#xA;&#xD;&#xA;Instead you should find a method which takes absolute coordinates.&#xD;&#xA;&#xD;&#xA;If that method doesn't exist (I will be genuinely surprised if it doesn't), you can instead determine the relative coordinates and feed them to _setLocalTranslation_ instead. However this approach involves a lot of unnecessary calculations.&#xD;&#xA;&#xD;&#xA;How to determine those relative coordinates, as pseudocode:&#xD;&#xA;&#xD;&#xA;    Vector clickedPos&#xD;&#xA;    Vector characterPos&#xD;&#xA;    Vector translation&#xD;&#xA;    translation.X = clickedPos.X - characterPos.X&#xD;&#xA;    translation.Y = clickedPos.Y - characterPos.Y&#xD;&#xA;    translation.Z = et cetera...&#xD;&#xA;    ...&#xD;&#xA;    character.setLocalTranslation(translation)" />
  <row Id="9521" PostHistoryTypeId="2" PostId="4811" RevisionGUID="150e75df-46a2-4830-9d9f-083260e2ce5d" CreationDate="2010-10-25T02:28:39.193" UserId="849" Text="Just wondering what people nowadays use for developing Commodore 64 Games?&#xD;&#xA;&#xD;&#xA;I've got the [Programmer's Reference Guide][1] which goes into all the details, but in the modern Age I assume I won't have to do development on an actual C64 itself?&#xD;&#xA;&#xD;&#xA;Are there tools that run on Windows or Mac OS X that are a bit like an IDE that offers some help and some debugging facilities (e.g., by hooking into an Emulator) or easy packaging into .d64 disk images?&#xD;&#xA;&#xD;&#xA;Is 6502 Assembler the one chosen language, or is C development feasible? (Ignoring BASIC here)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.commodore.ca/manuals/c64_programmers_reference/c64-programmers_reference.htm" />
  <row Id="9522" PostHistoryTypeId="1" PostId="4811" RevisionGUID="150e75df-46a2-4830-9d9f-083260e2ce5d" CreationDate="2010-10-25T02:28:39.193" UserId="849" Text="Tools for developing C64 Games" />
  <row Id="9523" PostHistoryTypeId="3" PostId="4811" RevisionGUID="150e75df-46a2-4830-9d9f-083260e2ce5d" CreationDate="2010-10-25T02:28:39.193" UserId="849" Text="&lt;tools&gt;" />
  <row Id="9524" PostHistoryTypeId="6" PostId="4811" RevisionGUID="00289d97-d2d0-478b-a3d7-38b1a8e0f8bf" CreationDate="2010-10-25T02:31:06.857" UserId="2100" Comment="edited tags" Text="&lt;tools&gt;" />
  <row Id="9525" PostHistoryTypeId="6" PostId="4811" RevisionGUID="d1a8c198-fbee-43f5-8919-4fd8948f9ce0" CreationDate="2010-10-25T02:31:41.490" UserId="2100" Comment="edited tags" Text="&lt;tools&gt;" />
  <row Id="9526" PostHistoryTypeId="2" PostId="4812" RevisionGUID="2211cd0d-fb19-46cf-935e-a13fe894339e" CreationDate="2010-10-25T02:40:59.493" UserId="849" Text="Script changes are easy to deploy. For example, you can keep scripts in a database which means that instead of a full binary redeploy and possible service restart, you just issue a single SQL UPDATE statement, possibly followed by a signal to your running service to reload the script.&#xD;&#xA;&#xD;&#xA;Also script languages are often simple to understand and easy to program in so you don't need the 'hardcore' devs (the ones dealing with Memory Management/Pointers and cpu-level optimizations) for the majority of code (if a large RPG, the scripts for AI, Spells, Item Effects and the world itself are often bigger than the engine code). Script languages allow a lot more focusing on the 'what' rather than the 'how' due to Garbage Collection (in case of Lua) and a higher level of abstraction." />
  <row Id="9527" PostHistoryTypeId="2" PostId="4813" RevisionGUID="58c52fe8-c804-479b-a829-a562467b7bde" CreationDate="2010-10-25T04:59:28.240" UserId="560" Text="While this question is a little old now http://gamedev.michaeljameswilliams.com/2008/09/17/avoider-game-tutorial-1/ seems to be exactly what you are after." />
  <row Id="9528" PostHistoryTypeId="2" PostId="4814" RevisionGUID="d23f5b2f-cce3-43c0-9a4b-58d02ae155d3" CreationDate="2010-10-25T05:50:29.120" UserId="2748" Text="I'm far from being an expert on this, since I'm just picking c64 stuff up again as well, but I'm really liking [Kick Assembler][1].&#xD;&#xA;&#xD;&#xA;It has a nice macro syntax, which makes things feel a bit higher-level. eg. 6510 assembler with lists, loops, hash tables, easy import of image/sound data...&#xD;&#xA;&#xD;&#xA;Written in java, so it should run fairly painlessly on windows &amp; OS X (&quot;works for me&quot; on windows &amp; linux).&#xD;&#xA;&#xD;&#xA;There are a bunch of other tools listed over at the [C64 Codebase site][2],&#xD;&#xA;including a [c compiler][3], and some other &#xD;&#xA;useful [cross-platform dev info][4] ([debugging via emulator][5], [putting your PRG's into a D64 file][6], etc).&#xD;&#xA;&#xD;&#xA;The c compiler looks really cool, but I haven't tried it yet. Just about all the sample code &quot;out there&quot; tends to be in one of the assembly flavours, so for me it's easier to go with the flow for now.  If you're already well versed, it might be an easy switch for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.theweb.dk/KickAssembler/Main.php&#xD;&#xA;  [2]: http://codebase64.org/doku.php?id=tools:start&#xD;&#xA;  [3]: http://www.cc65.org/&#xD;&#xA;  [4]: http://codebase64.org/doku.php?id=base:crossdev&#xD;&#xA;  [5]: http://codebase64.org/doku.php?id=base:using_the_vice_monitor&#xD;&#xA;  [6]: http://codebase64.org/doku.php?id=base:tools_for_putting_files_into_a_.d64_image" />
  <row Id="9529" PostHistoryTypeId="2" PostId="4815" RevisionGUID="7c06ccf4-1976-422c-869c-83995d593e7b" CreationDate="2010-10-25T06:36:44.753" UserId="2132" Text="Is it possible to skin Qt 4.5 such that it looks less like an application framework but more of a game? I guess this probably means replacing the canvas, the title-bar and the artwork of the various widgets. Will such an approach be platform independent too?" />
  <row Id="9530" PostHistoryTypeId="1" PostId="4815" RevisionGUID="7c06ccf4-1976-422c-869c-83995d593e7b" CreationDate="2010-10-25T06:36:44.753" UserId="2132" Text="Is it possible to skin Qt 4.5 such that it has a 'game-like' interface?" />
  <row Id="9531" PostHistoryTypeId="3" PostId="4815" RevisionGUID="7c06ccf4-1976-422c-869c-83995d593e7b" CreationDate="2010-10-25T06:36:44.753" UserId="2132" Text="&lt;gui&gt;" />
  <row Id="9532" PostHistoryTypeId="4" PostId="4806" RevisionGUID="1941ffd7-60f7-4d4a-8b44-e1fca9787df7" CreationDate="2010-10-25T06:50:46.280" UserId="2735" Comment="edited title" Text="How should I isolate game entities with their concrete Drawable components (in C#) ?" />
  <row Id="9533" PostHistoryTypeId="2" PostId="4816" RevisionGUID="0bade6c9-72fd-46a2-b423-e4e00379cc81" CreationDate="2010-10-25T07:12:12.660" UserId="1386" Text="Yes you can, and such an approach will be platform independent.&#xD;&#xA;&#xD;&#xA;See [Qt reference](http://doc.qt.nokia.com/4.3/stylesheet.html) and [this tutorial](http://thesmithfam.org/blog/2009/09/10/qt-stylesheets-tutorial/) for a quick run-down on how to do it." />
  <row Id="9534" PostHistoryTypeId="2" PostId="4817" RevisionGUID="5c8a0de2-c246-4aa3-91d8-d31292e05524" CreationDate="2010-10-25T07:15:57.210" UserDisplayName="BBLN" Text="Flex/Flash + RED5. &#xD;&#xA;Its free." />
  <row Id="9536" PostHistoryTypeId="2" PostId="4818" RevisionGUID="aa9e0696-b1da-4698-9fbe-c3d5330de81b" CreationDate="2010-10-25T10:25:56.513" UserId="560" Text="Great question. I am currently working in the education department as a developer in Australia. My role, and the people I work with, is to create resources to be used by teachers and students. &#xD;&#xA;&#xD;&#xA;In the past year or so we have been pushing hard to try and develop more game orientated solutions. The great thing about using games as a teaching tool is that kids don't realise that they are learning, to them it is a fun game, but in the process they are learning and thinking.&#xD;&#xA;&#xD;&#xA;Traditionally we have developed fairly boring multiple choice forms, drag and drop activities, etc. The problem with these activities is that it does not really engage students to think (who can blame them). If they want, they can just randomly click until they get something right. This passive learning has limited value. Games on the other hand force a child to actively think, I mean how many times have we subconsciously learnt things when playing AAA &quot;non educational&quot; games?&#xD;&#xA;&#xD;&#xA;So if a game has educational value, then it's a win/win scenario - they get to have fun while they learn. Also, this will help foster an environment where they enjoy and look forward to &quot;learning&quot;, which is one of the hardest things to achieve.&#xD;&#xA;&#xD;&#xA;Unfortunately, being a lowly developer means that our vision and ideas are often overlooked. It certainly has been a struggle to create the few games that we have done. Managers tend to be much older and perhaps have not been exposed to games in the same way that Gen Y has. Perhaps there is also the association that games mean fun only and school shouldn't be fun :S" />
  <row Id="9537" PostHistoryTypeId="2" PostId="4819" RevisionGUID="ac504be9-fa47-435b-a3e0-fa227c4287df" CreationDate="2010-10-25T10:38:30.987" UserId="1101" Text="Good question. But I don't think it can be done effectively. TV shows have fixed durations and nothing the viewer can do will extend that. However most games progress at the speed of the player. Even the best estimate is not going to apply in some cases.&#xD;&#xA;&#xD;&#xA;&gt; When you know your game format, you know your audience (and vice versa). It is practical question.&#xD;&#xA;&#xD;&#xA;Even knowing your audience isn't enough. I play FPS games but I play them quite stealthily. I found I was taking 4x longer on certain Doom levels than other people I know because instead of running around shooting wildly I was creeping around every corner, picking off the demons, then retreating.&#xD;&#xA;&#xD;&#xA;Obviously it's possible to measure how long it takes a tester to complete the game, but they aren't necessarily representative of a typical player.&#xD;&#xA;&#xD;&#xA;Also, another danger of using such figures is that they don't translate well to different types of game. MMOs might provide virtually infinite continual content, whereas other games might only provide a handful of hours - but do the latter games have replayability? How do you meaningfully compare an RTS (many short sessions) against an RPG (one long session)?&#xD;&#xA;" />
  <row Id="9538" PostHistoryTypeId="2" PostId="4820" RevisionGUID="ee61c08a-0dd8-427c-91d3-4022b3d9a91b" CreationDate="2010-10-25T13:21:37.417" UserId="2763" Text="If you did want to use a Scripting Engine, check out [Managed Scripting][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://managedscripting.codeplex.com/" />
  <row Id="9539" PostHistoryTypeId="2" PostId="4821" RevisionGUID="9712f6ca-9cf6-480a-a93a-aad62910a8e8" CreationDate="2010-10-25T13:45:58.193" UserId="1505" Text="&lt;A HREF=&quot;http://www.airplaysdk.com/&quot;&gt;Airplay SDK&lt;/A&gt; uses C++ and works across different mobile platforms (Android, iPhone, Symbian, etc)" />
  <row Id="9540" PostHistoryTypeId="2" PostId="4822" RevisionGUID="bccced90-08d4-4cba-831b-4b8a49f67aa5" CreationDate="2010-10-25T14:16:04.660" UserId="141" Text="A lot of people are still getting used to component systems, and there can be debate on the good or bad ways of doing this. But why not use a reference to PlayerEntity?&#xD;&#xA;&#xD;&#xA;I would suggest giving all components a reference to their parent Entity. Your player entity does have a base class, right? And that class should also have a method for adding components, where it sets the `component.Parent = this`. The property setter for the component can handle all the subscriptions. If you need, you can have a method on the entity that fetches any desired component. Myself, I used a generic method and stored a dictionary from types to components:&#xD;&#xA;&#xD;&#xA;    public Component GetComponent&lt;T&gt;()&#xD;&#xA;    {&#xD;&#xA;        if (components.ContainsKey(T)) return components[T];&#xD;&#xA;        return null;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That exact code may have syntax / semantic errors, it's off the top of my head." />
  <row Id="9541" PostHistoryTypeId="2" PostId="4823" RevisionGUID="9533af56-f7bc-43fd-ad70-b6cdb41a76e3" CreationDate="2010-10-25T14:19:24.733" UserId="470" Text="**Flash**&#xD;&#xA;&#xD;&#xA;Flash's AS3 is a fantastic language for wrapping your head around important OOP concepts without having to worry about memory management and writing header files. It's also pretty much a complete 2D game engine, with a display tree, event system, and all kinds of other handy features. &#xD;&#xA;&#xD;&#xA;There is a HUGE community of Flash game developers out there, and contrary to popular belief, you can develop Flash games using open source tools. If you're on Windows, I'd recommend [FlashDevelop][1]. &#xD;&#xA;&#xD;&#xA;I would argue that Flash is even more cross platform friendly than Java or really any other technology except maybe Unity. 99% of people can view Flash stuff in their desktop browser, so it's easy to share your creations with the world. Most smartphones are slowly getting Flash support, and for iOS, the one platform that won't support Flash in-browser, you can create apps with Flash CS5 (although that does have a cost).  &#xD;&#xA;&#xD;&#xA;I think it'd be a shame for you to have to struggle with something more complex like C++ or even C# when you could start learning the basics of game creation right now with AS3. Once you understand AS3, it'll be easy to switch to other languages later. In my own case, I was a Flash developer, but I learned how to program with Objective-C and managed to make a hit iPhone game. &#xD;&#xA;&#xD;&#xA;**Unity**&#xD;&#xA;&#xD;&#xA;Unity has a lot of the same benefits of Flash, but in 3D. &#xD;&#xA;&#xD;&#xA;With Unity, you can program in C#  or in UnityScript (which is javascript-y). It's not open source, but it is free. It's very well supported and there's a great community. The problem with developing 3D games is that for most games you'll need lots of art and assets. This can also be an issue with 2D games, but generally, 3D art takes a lot longer and it's a lot harder to make &quot;programmer art&quot;.  &#xD;&#xA;&#xD;&#xA;**A note on open source**&#xD;&#xA;&#xD;&#xA;There is nothing wrong with using open source software, but you're shortchanging yourself if you're only using it **because** it's open source. Choose the best language and tools that'll help you learn the fastest with the least friction.&#xD;&#xA;&#xD;&#xA;  [1]: http://flashdevelop.org" />
  <row Id="9542" PostHistoryTypeId="2" PostId="4824" RevisionGUID="4ffe814c-1a90-4c25-9cd0-f49f4035b6ff" CreationDate="2010-10-25T14:26:17.040" UserId="1386" Text="&gt; Now here's the question: If I later&#xD;&#xA;&gt; want to update the player drawable in&#xD;&#xA;&gt; some way (e.g. modify the sprite,&#xD;&#xA;&gt; change the animation, etc.), how and&#xD;&#xA;&gt; where should I do this?&#xD;&#xA;&#xD;&#xA;Well, what should be responsible for making those changes?&#xD;&#xA;One thing is for sure: whatever is responsible it must know about the specific type of Drawable it is operating on, you can't change the texture without knowing it has a texture. You did this in CreatePlayerEntity, because at that point the type of drawable is known. If you want to do it elsewhere  then you may need to rethink your design.&#xD;&#xA;&#xD;&#xA;If the PlayerEntity has state that controls entirely how it is drawn, pass the PlayerEntity state into the SpriteDrawables draw function. That does mean that there's a coupling between PlayerEntity state and SpriteDrawable. Note that the PlayerEntity state could be a separate class (e.g. PlayerEntityState). If don't want this coupling, or you want to control arbitrarily how it is drawn depending on other state in your game then have the object that aggregates PlayerEntity directly aggregate the  Drawable so you can control it there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9543" PostHistoryTypeId="2" PostId="4825" RevisionGUID="218cc8fc-0625-432b-a0ce-5405efeef673" CreationDate="2010-10-25T14:26:40.520" UserId="1101" Text="Instead of having a reference to the Drawable in the Entity, I'd have a reference to the Entity in the Drawable. I'd also make the Drawables observe the Entity so that when the Entity changes, the Drawable is notified and can pull any relevant changes.&#xD;&#xA;&#xD;&#xA;eg. Your entity changes action, so it notifies all observers that something has changed. The Drawable calls entity.getAction() to find out what action is underway, and sets its own animation accordingly." />
  <row Id="9544" PostHistoryTypeId="5" PostId="4823" RevisionGUID="8ed63a96-7e63-496c-9948-f44e1fa93ca3" CreationDate="2010-10-25T14:27:03.137" UserId="470" Comment="added 214 characters in body; added 34 characters in body; added 144 characters in body" Text="**Flash**&#xD;&#xA;&#xD;&#xA;Flash's AS3 is a fantastic language for wrapping your head around important OOP concepts without having to worry about memory management and writing header files. It's also pretty much a complete 2D game engine, with a display tree, event system, and all kinds of other handy features. &#xD;&#xA;&#xD;&#xA;There is a HUGE community of Flash game developers out there, and contrary to popular belief, you can develop Flash games using open source tools. If you're on Windows, I'd recommend [FlashDevelop][1]. &#xD;&#xA;&#xD;&#xA;I would argue that Flash is even more cross platform friendly than Java or really any other technology except maybe Unity. 99% of people can view Flash stuff in their desktop browser, so it's easy to share your creations with the world. Most smartphones are slowly getting Flash support, and for iOS, the one platform that won't support Flash in-browser, you can create apps with Flash CS5 (although that does have a cost).  &#xD;&#xA;&#xD;&#xA;I think it'd be a shame for you to have to struggle with something more complex like C++ or even C# when you could start learning the basics of game creation right now with AS3. Once you understand AS3, it'll be easy to switch to other languages later. In my own case, I was a Flash developer, but I learned how to program with Objective-C and managed to make a hit iPhone game. Do yourself a favor and visit [http://www.flashgamedojo.com/][2] - I don't think you'll be disappointed!&#xD;&#xA;&#xD;&#xA;**Unity**&#xD;&#xA;&#xD;&#xA;Unity has a lot of the same benefits of Flash, but in 3D. &#xD;&#xA;&#xD;&#xA;With Unity, you can program in C#  or in UnityScript (which is javascript-y). It's not open source, but it is free. It's very well supported and there's a great community. The problem with developing 3D games is that for most games you'll need lots of art and assets. This can also be an issue with 2D games, but generally, 3D art takes a lot longer and it's a lot harder to make &quot;programmer art&quot;.  &#xD;&#xA;&#xD;&#xA;**A note on open source**&#xD;&#xA;&#xD;&#xA;There is nothing wrong with using open source software, but you're shortchanging yourself if you're only using it **because** it's open source. Choose the best language and tools that'll help you learn the fastest with the least friction. Along the same lines, the mentality of &quot;learn the hardest thing first&quot; (ie. C++) is crazy. What you really should be learning is logic, not syntax, so learn whichever language has the least baggage and barriers to entry. In my opinion, that's AS3.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flashdevelop.org&#xD;&#xA;  [2]: http://www.flashgamedojo.com/" />
  <row Id="9545" PostHistoryTypeId="2" PostId="4826" RevisionGUID="30b80fa3-2344-4d4f-a27e-a3bd967f474e" CreationDate="2010-10-25T14:34:05.527" UserId="470" Text="Definitely look at Flash. http://flashgamedojo.com has all you need to get started! &#xD;&#xA;&#xD;&#xA;Also, take a look at [Multimedia Fusion][1] or [The Games Factory][2]. They both have drag and drop interfaces, but they're incredibly powerful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.clickteam.com/website/usa/multimedia-fusion-2.html&#xD;&#xA;  [2]: http://www.clickteam.com/website/usa/the-games-factory-2.html" />
  <row Id="9546" PostHistoryTypeId="2" PostId="4827" RevisionGUID="f20b3e7d-2b2f-4f3f-92df-d4c89778b017" CreationDate="2010-10-25T16:43:31.507" UserId="2771" Text="Some of the approaches are described here:&#xD;&#xA;&#xD;&#xA;http://gameprogrammingpatterns.com/component.html&#xD;&#xA;&#xD;&#xA;I suggest you have a look at the Mediator pattern and messaging. This is a nice way to avoid coupling.&#xD;&#xA;&#xD;&#xA;Why do you need to change Drawable from the outside? Maybe you need another type of component(s)?&#xD;&#xA;&#xD;&#xA;I would do something like:&#xD;&#xA;&#xD;&#xA;DyingComponent -&gt; {send message via Entity/Mediator} -&gt; DrawableComponent {receive message and switch to death animation}." />
  <row Id="9547" PostHistoryTypeId="2" PostId="4828" RevisionGUID="6237e478-6fa5-4d2e-b626-65b531cf866a" CreationDate="2010-10-25T17:22:10.157" UserId="2774" Text="I'm a freelance game designer, and I can't afford to hire someone to do skyboxes for me.&#xD;&#xA;&#xD;&#xA;However, I am unable to do them my self.&#xD;&#xA;&#xD;&#xA;Let's say I have a texture that can be tiled on four sides...&#xD;&#xA;&#xD;&#xA;If I put that very texture on each side of the skybox.. It just comes out looking like a cube.&#xD;&#xA;&#xD;&#xA;I'd like to know how exactly I need to &quot;warp&quot; a texture, so that when applied to a cube on all four sides, it looks spherical.&#xD;&#xA;&#xD;&#xA;Thanks! -- G" />
  <row Id="9548" PostHistoryTypeId="1" PostId="4828" RevisionGUID="6237e478-6fa5-4d2e-b626-65b531cf866a" CreationDate="2010-10-25T17:22:10.157" UserId="2774" Text="Skybox Development Help" />
  <row Id="9549" PostHistoryTypeId="3" PostId="4828" RevisionGUID="6237e478-6fa5-4d2e-b626-65b531cf866a" CreationDate="2010-10-25T17:22:10.157" UserId="2774" Text="&lt;textures&gt;&lt;sky&gt;" />
  <row Id="9550" PostHistoryTypeId="6" PostId="4788" RevisionGUID="366cdded-6c79-412f-8803-68cb391901e5" CreationDate="2010-10-25T17:41:32.880" UserId="1386" Comment="edited tags" Text="&lt;graphics&gt;&lt;svg&gt;&lt;vector&gt;" />
  <row Id="9551" PostHistoryTypeId="6" PostId="4801" RevisionGUID="cee95227-a3d2-4cce-992a-91738296fed1" CreationDate="2010-10-25T17:42:00.027" UserId="1386" Comment="edited tags" Text="&lt;math&gt;&lt;quaternion&gt;" />
  <row Id="9552" PostHistoryTypeId="2" PostId="4829" RevisionGUID="66bbdd66-9984-420f-a1be-68b9fc639c70" CreationDate="2010-10-25T18:04:21.907" UserId="2345" Text="There is an entire 600 page book on &quot;Visualizing Quaternions&quot;: &#xD;&#xA;http://books.google.ca/books?id=CoUB09xzme4C&amp;lpg=PP1&amp;ots=uEdJHsni9y&amp;dq=Visualizing%20Quaternions&amp;pg=PP1#v=onepage&amp;q&amp;f=false&#xD;&#xA;&#xD;&#xA;The book is actually quite good, covering a wide range of topics, if you are interested you might want to pick it up: http://www.amazon.com/Visualizing-Quaternions-Kaufmann-Interactive-Technology/dp/0120884003 " />
  <row Id="9553" PostHistoryTypeId="2" PostId="4830" RevisionGUID="fdebad96-d7fd-433a-9145-a2dc7a06d77b" CreationDate="2010-10-25T18:07:29.777" UserId="2491" Text="I've been researching component-based designs pretty heavily myself, and while I'm still in some pretty heavy confusion, I think I can offer some thoughts on this.&#xD;&#xA;&#xD;&#xA;According to Gerold Meisinger in a [blog post][1], there are basically two ways to address the problem of inter-component communication: looking it up on the parent, and message/event passing.  A third would be reference holding, which is what you were debating.  My own attempts to implement such a system basically showed the same thing.  &#xD;&#xA;&#xD;&#xA;The basic foundation is that you have an Entity class whose only job is to hold parts and manage them.  If you wanted to change the animation (say the player's state changed) then you'd have a StateComponent or maybe a PlayerState component, and it would need to communicate &quot;My state has changed&quot; to any other parts that need to know that.&#xD;&#xA;&#xD;&#xA;Method 1 (Look-ups) would be that the DrawComponent knows it needs to check state before drawing. It calls &quot;GetComponentWithType(Type t)&quot; to get the StateComponent (or more likely an IState interface), checks the state, then draws.  Ditto position, rotation, etc.&#xD;&#xA;&#xD;&#xA;Method 2 (Events) would be that the StateComponent emits a message when it changes, and any subscribers to that event get alerted.  Typically the factory would wire that up, adding a DrawComponent, then setting it to have message handlers to watch StateComponent for changes.  &#xD;&#xA;&#xD;&#xA;You could also use the parent Entity as a kind of message board, holding a log of posted messages that each component checks for interesting messages. This is a slight optimization since it makes both the sender and the receiver &quot;lazy.&quot;  Each sender only posts one message (to the host) and each receiver only asks for messages when it needs them to update, and then only gets the latest message, ignoring any irrelevant in-between states.&#xD;&#xA;&#xD;&#xA;Method 3 (Reference) is an optimization of method 1.  Instead of asking for a reference to the component, it just has one already.  Either the factory gave it one, or it stored the reference after it asked for it the first time.&#xD;&#xA;&#xD;&#xA;You'll note that each method has complexities and problems that would have to be worked around.  If you stick with OOP though, I would say that's just part of what you have to pay for flexibility though.  I was very confused about the whole thing until I realized that the Factory pattern is essential because the factory is the only thing that actually knows how to hook it all up in the first place.&#xD;&#xA;&#xD;&#xA;I think I've mostly come into agreement with Gerold Meisinger though, and have been looking into F# as an alternative.  Because I think a post he made on StackOverflow is very accurate: the more componentized I've tried to make the design, the smaller and more function-like each component becomes until I've just got a messy bag of states and chained functions trying to pass the states around.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But that is to say that there's a spectrum: at present you've only got 1 entity containing some state and one component.  I'd probably opt to have the drawable component receive packets of &quot;DrawableInfo&quot; through events.  But just keep an eye on the complexity or pretty soon you too will be wondering if switching to a functional language might not be better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://lambdor.net/?p=171" />
  <row Id="9554" PostHistoryTypeId="5" PostId="4829" RevisionGUID="fe834069-9c6f-40fd-a351-b53c223e5159" CreationDate="2010-10-25T18:10:26.760" UserId="2345" Comment="added 229 characters in body" Text="There is an entire 600 page book on &quot;Visualizing Quaternions&quot;: &#xD;&#xA;http://books.google.ca/books?id=CoUB09xzme4C&amp;lpg=PP1&amp;ots=uEdJHsni9y&amp;dq=Visualizing%20Quaternions&amp;pg=PP1#v=onepage&amp;q&amp;f=false&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;The book is actually quite good, covering a wide range of topics. It starts with a good introduction to game related linear algebra, it talks about matrices and vectors, their shortcomings and why you would want to use Quaternions. It then explains what they are and how to make use of them. If you are interested you might want to pick it up: http://www.amazon.com/Visualizing-Quaternions-Kaufmann-Interactive-Technology/dp/0120884003 " />
  <row Id="9555" PostHistoryTypeId="2" PostId="4831" RevisionGUID="22193cac-da62-4632-9053-310ae869f156" CreationDate="2010-10-25T18:26:28.163" UserId="2776" Text="As you know, Quaternion is based on complex numbers and represents rotation of 4D sphere in 4D dimension. So you cannot visualize it 'as is'. I see that you know it too. And one and only one choice will be visualization of result of rotation. For example result of rotation of basis; Or you can render 3D sphere and paint it by layered 'temperature' of rotation by each axis; Good luck!" />
  <row Id="9556" PostHistoryTypeId="2" PostId="4832" RevisionGUID="b5a95552-d35b-4962-b44e-30c3a024c7c7" CreationDate="2010-10-25T18:47:20.497" UserId="2777" Text="Additionally to FMOD, there is [Audiokinetic Wwise][1], which is more and more used in the game industry as a professional cross-platform sound design tool and API.  It has a large selection of effects (including convolution reverb), complex sound logic system, sound layering, profiling, interactive music tools, etc... It provides a good selection of decoding algorithms and is also free for non-commercial projects.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.audiokinetic.com/en/products/wwise/solution-overview" />
  <row Id="9557" PostHistoryTypeId="2" PostId="4833" RevisionGUID="a2241343-a730-48bf-874f-fc1efc471a95" CreationDate="2010-10-25T18:47:44.160" UserId="2776" Text="[UDK by Epic Games][1] will be the best choice for you;) It has a lot of stuff for artists and you can program on UnrealScript. As I understand UnrealScript's library is mirror of native C++ code. So you'll find some interesting tricks in programming of hierarchy structures, animation, triggers and etc. You can see and control pipeline of your gameplay and art. And of course the programming can be minimal. Because you can &quot;draw&quot; your game with embedded script editor &quot;Unreal Kismet&quot;. There are a lot of video tutorials. Enjoy!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/" />
  <row Id="9558" PostHistoryTypeId="2" PostId="4834" RevisionGUID="1c663e9a-918b-4975-b0cc-8a3b33d9ebe6" CreationDate="2010-10-25T19:09:02.350" UserId="889" Text="If you are a programmer talking about skyboxes, I assume you have some knowledge of the 3D engine / librairy / tool you are using. If not, you should ask questions about this engine / librairy / tool to get help on how to create such a skybox (I mean, the programmer job of creating the entity correctly).&#xD;&#xA;&#xD;&#xA;Otherwise, all you need is a nice texture to apply to your skybox and there is plenty of websites that will offer you free textures for you to use in your project.&#xD;&#xA;&#xD;&#xA;Here are some that I've found :&#xD;&#xA;&#xD;&#xA;http://forums.epicgames.com/showthread.php?t=555904&#xD;&#xA;&#xD;&#xA;http://www.tutorialsforblender3d.com/Textures/Skys/Sky_Box_2.html&#xD;&#xA;&#xD;&#xA;Here is a tread on BlenderArtist and another from GameDev about it :&#xD;&#xA;&#xD;&#xA;http://blenderartists.org/forum/showthread.php?t=64228&#xD;&#xA;&#xD;&#xA;http://www.gamedev.net/community/forums/topic.asp?topic_id=201602&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9559" PostHistoryTypeId="5" PostId="4833" RevisionGUID="b712f3fb-a8fe-406f-8087-0d1c0cfd3ae1" CreationDate="2010-10-25T19:09:21.513" UserId="2776" Comment="added 101 characters in body" Text="[UDK by Epic Games][1] will be the best choice for you;) It has a lot of stuff for artists and you can program on UnrealScript. As I understand UnrealScript's library is mirror of native C++ code. So you'll find some interesting tricks in programming of hierarchy structures, animation, triggers and etc. You can see and control pipeline of your gameplay and art. And of course the programming can be minimal. Because you can &quot;draw&quot; your game with embedded script editor &quot;Unreal Kismet&quot;. There are a lot of video tutorials. Enjoy!&#xD;&#xA;&#xD;&#xA;**Update:**&#xD;&#xA;I must say that UDK works &quot;from the box&quot;. I think it is very good reason to choose;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/" />
  <row Id="9560" PostHistoryTypeId="2" PostId="4835" RevisionGUID="b8512d4e-a5b1-4320-9743-6e341908b149" CreationDate="2010-10-25T19:25:19.890" UserId="1386" Text="Particles would be a decent solution. It really depends on how close the player will get to the junk.&#xD;&#xA;&#xD;&#xA;For positioning each piece of junk you can generate a random direction vector, and a random float called distance. You would then position that piece of junk at direction * (minimumJunkDistance+distance).&#xD;&#xA;&#xD;&#xA;To have it circle the earth I would simple apply trigonometry to have it move on a fixed orbit at a fixed velocity.&#xD;&#xA;&#xD;&#xA;I'm not sure if Ogre automatically does this, but it would be nice if the junk fades out before it hits the camera's near plane to stop it from dissapearing suddenly." />
  <row Id="9561" PostHistoryTypeId="2" PostId="4836" RevisionGUID="607d2412-7667-4755-b32f-234647722777" CreationDate="2010-10-25T21:40:38.713" UserId="659" Text="Do your textures have mipmaps?&#xD;&#xA;&#xD;&#xA;Without mipmapping, texture sampling can be particularly expensive (loads of cache misses)" />
  <row Id="9562" PostHistoryTypeId="5" PostId="4766" RevisionGUID="8d39e13a-0b05-40b9-9b3c-933808c8dc51" CreationDate="2010-10-25T21:52:02.510" UserId="233" Comment="picturified" Text="[Night Squad 2][1] is a First Person Shooter written in Java.&#xD;&#xA;&#xD;&#xA;![i.imgur.com/pfDoU.jpg][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://4p.de/nightsquad2&#xD;&#xA;  [2]: http://i.stack.imgur.com/pfDoU.jpg" />
  <row Id="9563" PostHistoryTypeId="5" PostId="4737" RevisionGUID="7815e9da-5043-492a-a8b8-f0601d0d3366" CreationDate="2010-10-25T22:17:25.307" UserId="51" Comment="added 652 characters in body" Text="The errors are to do with the Box2D engine being updated. The excellent tutorials by FlashyTodd are unfortunately out of date now (22/10/10). Although he does mention this at the top of the videos the link to the things that have changed isn't much use for the novice (myself included).&#xD;&#xA;&#xD;&#xA;Also the link above to the Box2D manual from DrDeth is the C++ manual, not AS3 which is what FlashyTodd is working through.&#xD;&#xA;&#xD;&#xA;I also found this [useful example][1] which notes the changes made from 2.0 to 2.1 code.&#xD;&#xA;&#xD;&#xA;For anyone else that comes across this, here is the FlashyTodd example HelloBoxWorld updated to be Box2D 2.1 compliant. (just a floor and dynamic box)&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       package{&#xD;&#xA;    &#xD;&#xA;    import flash.display.MovieClip;&#xD;&#xA;    import flash.display.Sprite;&#xD;&#xA;    import flash.events.Event;&#xD;&#xA;    &#xD;&#xA;    import Box2D.Dynamics.b2World;&#xD;&#xA;    import Box2D.Collision.Shapes.b2PolygonShape;&#xD;&#xA;    import Box2D.Dynamics.b2Body;&#xD;&#xA;    import Box2D.Dynamics.b2Fixture;&#xD;&#xA;    import Box2D.Dynamics.b2FixtureDef;&#xD;&#xA;    import Box2D.Dynamics.b2BodyDef;&#xD;&#xA;    import Box2D.Common.Math.b2Vec2;&#xD;&#xA;    import Box2D.Collision.b2AABB;&#xD;&#xA;    import Box2D.Dynamics.b2DebugDraw;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	public class HelloBoxWorld extends MovieClip{&#xD;&#xA;    		&#xD;&#xA;    		protected var _world:b2World;&#xD;&#xA;    		&#xD;&#xA;    		//ratio of pixels to meters.&#xD;&#xA;    		public static const RATIO:Number = 30;&#xD;&#xA;    		private var _fallingCrate:b2Body;&#xD;&#xA;    		&#xD;&#xA;    		private var timeStep:Number = 1.0 / 30.0;&#xD;&#xA;    		private var velocityIterations:int = 6;&#xD;&#xA;    		private var positionIterations:int = 2;&#xD;&#xA;    		&#xD;&#xA;    		public function HelloBoxWorld() {&#xD;&#xA;    			&#xD;&#xA;    			//1. set up the world&#xD;&#xA;    			setupWorld();&#xD;&#xA;    			&#xD;&#xA;    			//2. create walls and floor			&#xD;&#xA;    			createWallsAndFloor();&#xD;&#xA;    			&#xD;&#xA;    			//3. make create			&#xD;&#xA;    			addACrate();&#xD;&#xA;    			&#xD;&#xA;    			setupDebugDraw();&#xD;&#xA;    			&#xD;&#xA;    			addEventListener(Event.ENTER_FRAME, newFrameEvent);&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    private function setupDebugDraw():void {&#xD;&#xA;    		&#xD;&#xA;    		var spriteToDrawOn:Sprite = new Sprite();&#xD;&#xA;    		addChild(spriteToDrawOn);&#xD;&#xA;    		&#xD;&#xA;    		var artistForHire:b2DebugDraw = new b2DebugDraw();&#xD;&#xA;    		artistForHire.SetSprite(spriteToDrawOn);&#xD;&#xA;    		&#xD;&#xA;    		artistForHire.SetDrawScale(RATIO);&#xD;&#xA;    		artistForHire.SetFlags(b2DebugDraw.e_shapeBit);&#xD;&#xA;    		artistForHire.SetLineThickness(2.0);&#xD;&#xA;    		artistForHire.SetFillAlpha(0.6);&#xD;&#xA;    		&#xD;&#xA;    		_world.SetDebugDraw(artistForHire);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    		&#xD;&#xA;    private function newFrameEvent(e:Event):void {&#xD;&#xA;    			&#xD;&#xA;    	&#xD;&#xA;    	//variables assigned at the top&#xD;&#xA;    	_world.Step(timeStep, velocityIterations, positionIterations);&#xD;&#xA;    	_world.ClearForces();&#xD;&#xA;    	&#xD;&#xA;    	_world.DrawDebugData();&#xD;&#xA;    	&#xD;&#xA;    	trace(&quot;Falling Craete is at x:&quot;+_fallingCrate.GetPosition().x +&quot;,y:&quot;+_fallingCrate.GetPosition().y);&#xD;&#xA;    }&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		private function setupWorld():void {&#xD;&#xA;    			&#xD;&#xA;    			//1. set up the size of the universe&#xD;&#xA;    			//var universeSize:b2AABB = new b2AABB();&#xD;&#xA;    			//universeSize.lowerBound.Set (-3000/RATIO,-3000/RATIO);&#xD;&#xA;    			//universeSize.upperBound.Set (3000/RATIO,3000/RATIO);&#xD;&#xA;    			&#xD;&#xA;    			//2. Define gravity&#xD;&#xA;    			&#xD;&#xA;    			var gravity:b2Vec2 = new b2Vec2(0, 9.8);&#xD;&#xA;    			&#xD;&#xA;    			//3. Ignore sleeping objects.&#xD;&#xA;    			var ignoreSleeping:Boolean = true;&#xD;&#xA;    			&#xD;&#xA;    			_world = new b2World(gravity, ignoreSleeping);&#xD;&#xA;    			&#xD;&#xA;    			trace (&quot;My world has &quot;+_world.GetBodyCount()+&quot; bodies&quot;);&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		private function createWallsAndFloor():void {&#xD;&#xA;    			&#xD;&#xA;    			//1. Define a body with a position		&#xD;&#xA;    			var groundBodyDef:b2BodyDef = new b2BodyDef();&#xD;&#xA;    			//x,y of centre. set as integers, not floats&#xD;&#xA;    			groundBodyDef.position.Set(250 / RATIO, 400 / RATIO);&#xD;&#xA;    &#xD;&#xA;    			&#xD;&#xA;    			//2. Use the world object to create the body using the body definition above&#xD;&#xA;    			var groundBody = _world.CreateBody(groundBodyDef);&#xD;&#xA;    			&#xD;&#xA;    			&#xD;&#xA;    			//3. Define fixtures with a shape, friction, density, etc.&#xD;&#xA;    			var groundBox:b2PolygonShape =  new b2PolygonShape();&#xD;&#xA;    			//width ,height. set as integers, not floats&#xD;&#xA;    			groundBox.SetAsBox(200 / RATIO, 20 / RATIO);&#xD;&#xA;    			&#xD;&#xA;    			var fixtureDef:b2FixtureDef = new b2FixtureDef();&#xD;&#xA;    			fixtureDef.shape = groundBox;&#xD;&#xA;    			fixtureDef.density = 0.0;//density is set to 0.0 by default so this isnt really needed here&#xD;&#xA;    			fixtureDef.friction = 0.5;&#xD;&#xA;    			&#xD;&#xA;    			groundBody.CreateFixture(fixtureDef);&#xD;&#xA;    			&#xD;&#xA;    			trace (&quot;My world has &quot;+_world.GetBodyCount()+&quot; bodies&quot;);&#xD;&#xA;    			&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		private function addACrate():void {&#xD;&#xA;    			&#xD;&#xA;    			&#xD;&#xA;    			//moving object&#xD;&#xA;    			var movingBodyDef:b2BodyDef = new b2BodyDef();&#xD;&#xA;    			&#xD;&#xA;    			//set the type of body here&#xD;&#xA;    			movingBodyDef.type = b2Body.b2_dynamicBody;//b2_dynamicBody is a property of b2Body. !manual is confusing here.&#xD;&#xA;    			movingBodyDef.position.Set(100.0 / RATIO, 100.0 / RATIO);&#xD;&#xA;    			movingBodyDef.angle = 30 * Math.PI / 180;&#xD;&#xA;    &#xD;&#xA;    			_fallingCrate = _world.CreateBody(movingBodyDef);&#xD;&#xA;    			&#xD;&#xA;    			var dynamicBox:b2PolygonShape =  new b2PolygonShape();&#xD;&#xA;    			dynamicBox.SetAsBox(50.0 / RATIO, 50.0 / RATIO);&#xD;&#xA;    			&#xD;&#xA;    			var dynamicfixtureDef:b2FixtureDef = new b2FixtureDef();&#xD;&#xA;    			dynamicfixtureDef.shape = dynamicBox;&#xD;&#xA;    			dynamicfixtureDef.density = 1.0;&#xD;&#xA;    			dynamicfixtureDef.friction = 0.3;&#xD;&#xA;    			&#xD;&#xA;    			_fallingCrate.CreateFixture(dynamicfixtureDef);&#xD;&#xA;    			&#xD;&#xA;    			trace (&quot;My world has &quot;+_world.GetBodyCount()+&quot; bodies&quot;);&#xD;&#xA;    				&#xD;&#xA;    			&#xD;&#xA;    			&#xD;&#xA;    			&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.emanueleferonato.com/2010/01/27/box2dflash-2-1a-released-what-changed/&#xD;&#xA;" />
  <row Id="9564" PostHistoryTypeId="2" PostId="4837" RevisionGUID="5c790e92-310b-47fb-9712-d76729c3995e" CreationDate="2010-10-25T22:20:44.177" UserId="2491" Text="There's some discussion here and there on how to work SVG graphics into the XNA game engine.  One here: http://wam-games.com/2010/04/svg-in-xna/  and here's a post on this very site: http://gamedev.stackexchange.com/questions/2196/rendering-svg-art-directly-in-xna&#xD;&#xA;&#xD;&#xA;XNA pipes pretty much everything through Direct3D as I understand it, so it's all GPU accelerated.  You basically must program in C# to use it (you can kind of use other languages, but you have to hack at it.) Using XNA gets you Windows for sure, but also the possibility of porting to XBox360 and a couple of portable platforms." />
  <row Id="9565" PostHistoryTypeId="2" PostId="4838" RevisionGUID="201313b3-a9bb-42b1-8516-62439434ec4a" CreationDate="2010-10-25T23:04:18.067" UserId="1538" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;... and a videogame: [**Facade**][2]&#xD;&#xA;&#xD;&#xA;Interactive drama, AI-based, Java + OpenGL. 500,000+ downloads since 2005.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://grandtextauto.org/archives/atlantic.jpg&#xD;&#xA;  [2]: http://www.interactivestory.net/" />
  <row Id="9566" PostHistoryTypeId="2" PostId="4839" RevisionGUID="4cf5453d-8ebb-4f30-b6da-aa75214c239d" CreationDate="2010-10-26T03:01:47.647" UserId="919" Text="I know preparing mount points and the like. But what's the best way to prevent Z fighting with customizations close to moving parts like elbows and knees?&#xD;&#xA;" />
  <row Id="9567" PostHistoryTypeId="1" PostId="4839" RevisionGUID="4cf5453d-8ebb-4f30-b6da-aa75214c239d" CreationDate="2010-10-26T03:01:47.647" UserId="919" Text="Best methodology to prepare 3d models for avatar customization?" />
  <row Id="9568" PostHistoryTypeId="3" PostId="4839" RevisionGUID="4cf5453d-8ebb-4f30-b6da-aa75214c239d" CreationDate="2010-10-26T03:01:47.647" UserId="919" Text="&lt;3d&gt;&lt;3d-meshes&gt;" />
  <row Id="9569" PostHistoryTypeId="2" PostId="4840" RevisionGUID="8d3cb619-9285-4c6a-aa3e-7d5b48a2f0d9" CreationDate="2010-10-26T04:38:01.370" UserId="849" Text="This is more of an open ended question, but I hope to get some good insight on how to avoid the issue.&#xD;&#xA;&#xD;&#xA;When playing Games on Windows, I might want to ALT-TAB out of it. Some games have no problems, others are not so easy: They may take AGES to switch out and back in. Some are even prone to crashing or to weird behaviour like graphic distortion or stuttering sound.&#xD;&#xA;&#xD;&#xA;I just wonder what causes this behavior? Is this more a DirectX or an OpenGL thing? Is it caused by Games being 'clever' and caching/wiping the cache whenever the screen settings change? (I assume they do get some sort of signal when I ALT-TAB?)&#xD;&#xA;&#xD;&#xA;I don't have any problem of my own, but I'd like to know what to avoid and which 'clever' trick may cause this type of horrible customer experience?" />
  <row Id="9570" PostHistoryTypeId="1" PostId="4840" RevisionGUID="8d3cb619-9285-4c6a-aa3e-7d5b48a2f0d9" CreationDate="2010-10-26T04:38:01.370" UserId="849" Text="What can cause ALT-TAB to be 'annoying'/slow/glitchy?" />
  <row Id="9571" PostHistoryTypeId="3" PostId="4840" RevisionGUID="8d3cb619-9285-4c6a-aa3e-7d5b48a2f0d9" CreationDate="2010-10-26T04:38:01.370" UserId="849" Text="&lt;architecture&gt;&lt;windows&gt;" />
  <row Id="9572" PostHistoryTypeId="2" PostId="4841" RevisionGUID="af3dc168-de4b-4261-a9ad-e2a52972c59c" CreationDate="2010-10-26T05:18:30.830" UserId="370" Text="###[OpenAL][1]&#xD;&#xA;I really like OpenAL as a cross-platform audio library.  The API is a bit low level but you can easily wrap it into a nicer engine friendly interface.  It's truly cross platform with first class support for: iPhone, Android, MacOSX, Windows, and Linux.&#xD;&#xA;&#xD;&#xA;Take a look at [Djinn Engine sound code][2].  Two files, maybe 300 lines between them (counting comments etc) and you'vd got a workable sound system.&#xD;&#xA;&#xD;&#xA;I've never build an audio centric game, so OpenAL might not fit the bill if extreme control is needed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://connect.creativelabs.com/openal&#xD;&#xA;  [2]: http://code.google.com/p/djinnengine/source/browse/trunk/CPP+Classes/Sound+Manager/" />
  <row Id="9573" PostHistoryTypeId="2" PostId="4842" RevisionGUID="4d49309d-19bf-4612-9f93-3fd3ec17f333" CreationDate="2010-10-26T05:56:04.197" UserId="370" Text="What your looking for a parametric plot of the parabolic function.  It's easiest to make the parametric function use a range of t [0,1].&#xD;&#xA;&#xD;&#xA;The canonical form for a parametric parabola is&#xD;&#xA;&#xD;&#xA;    a := some constant&#xD;&#xA;    f_x(t) = 2at&#xD;&#xA;    f_y(t) = at^2&#xD;&#xA;&#xD;&#xA;Using this formula and some basic algebra for function morphing and I got&#xD;&#xA;&#xD;&#xA;    #If t is in the range `[0,1]` both x and y will be in the range `[0,1]` as well.&#xD;&#xA;    x = t&#xD;&#xA;    y = 4*t - 4*t*t&#xD;&#xA;&#xD;&#xA;So to get these functions will produce the numbers you're looking for.&#xD;&#xA;&#xD;&#xA;    float total_time = 2;&#xD;&#xA;    float x_min = 0;&#xD;&#xA;    float x_max = 480;&#xD;&#xA;    float y_min = 0;&#xD;&#xA;    float y_max = 320;&#xD;&#xA;    &#xD;&#xA;    float f_x( float time )&#xD;&#xA;    {&#xD;&#xA;       float t = time/total_time;&#xD;&#xA;       return x_min + (x_max-x_min)*t;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    float f_y( float time )&#xD;&#xA;    {&#xD;&#xA;       float t = time/total_time;&#xD;&#xA;       return y_min + (y_max-y_min)*(4*t-4*t*t);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9574" PostHistoryTypeId="2" PostId="4843" RevisionGUID="59446cc0-8c83-4adf-8a79-86be54655044" CreationDate="2010-10-26T07:22:11.897" UserId="2790" Text="It can be the available amount of free ram. If it is too low, when your game runs, Windows hides most of its services into the swap area (i.e it takes most of the data loaded in RAM and put it in a special area of your hard drive instead) in order for your game to have as mush available RAM space as possible.  &#xD;&#xA;&#xD;&#xA;Then, when you alt+tab from the game to windows, it needs these services to be loaded in RAM in order to work, so it will take your game data from the RAM, store it in the swap, and pull the windows data from the swap to the RAM.  &#xD;&#xA;&#xD;&#xA;And as you know, writing to the hard-drive can take AGES compared to the RAM. The same thing actually also happens when you quit a heavy game. That's why having enough RAM space for both a game and windows can be really more comfortable." />
  <row Id="9575" PostHistoryTypeId="2" PostId="4844" RevisionGUID="3c958a73-5437-47b6-8e5a-e33dc687435f" CreationDate="2010-10-26T07:28:53.943" UserId="1386" Text="In some situations ALT-TAB will cause the DirectX device to be lost.&#xD;&#xA;When the device is lost all GPU resources (vertices, textures, shaders and so on) must be considered invalid and cannot be used again. [MSDN reference here][1].&#xD;&#xA;&#xD;&#xA;These lost resources must be released, and then recreated when the device is restored. In the case of most games restoring these resources requires a lot of data to be loaded from disk again - often the same loading procedure as done at the start of the game/level.&#xD;&#xA;&#xD;&#xA;**What can be done to avoid this?**&#xD;&#xA;&#xD;&#xA; - You can keep a cache of your data in&#xD;&#xA;   ram so transferring it back to the&#xD;&#xA;   GPU will be faster than reloading&#xD;&#xA;   from HD. I believe there's a way to&#xD;&#xA;   make DirectX do this automatically.&#xD;&#xA; - Use a new version of DirectX. This quote is&#xD;&#xA;   from MSDN on DirectX 9Ex:&#xD;&#xA;&#xD;&#xA;&gt; Devices are now only lost under two&#xD;&#xA;&gt; circumstances; when the hardware is&#xD;&#xA;&gt; reset because it is hanging, and when&#xD;&#xA;&gt; the device driver is stopped. When&#xD;&#xA;&gt; hardware hangs, the device can be&#xD;&#xA;&gt; reset by calling ResetEx. If hardware&#xD;&#xA;&gt; hangs, texture memory is lost.hangs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb174714(VS.85).aspx" />
  <row Id="9576" PostHistoryTypeId="2" PostId="4845" RevisionGUID="f8285515-7078-4b0e-a868-2979f595af29" CreationDate="2010-10-26T07:41:01.200" UserId="18" Text="In Direct3D a device can become [lost](http://msdn.microsoft.com/en-us/library/bb174714%28v=VS.85%29.aspx) when you ALT-TAB out of the full screen window. If that happens you have to release and restore the resources and reset the device. This can be hard to do properly depending on the complexity of the game or the laziness of developers (hi Valve!). I don't think OpenGL suffers from the same problem because the driver is responsible for keeping the OpenGL context for you, but I'm not sure.&#xD;&#xA;&#xD;&#xA;There's a question on StackOverflow about the [best practices for ALT-TAB support in a DirectX app](http://stackoverflow.com/questions/972299/best-practices-for-alt-tab-support-in-a-directx-app) which includes useful links from MSDN and other sources." />
  <row Id="9577" PostHistoryTypeId="5" PostId="4844" RevisionGUID="24d61799-da01-468e-837b-4dbcaf66c272" CreationDate="2010-10-26T08:01:39.177" UserId="1386" Comment="deleted 6 characters in body" Text="In some situations ALT-TAB will cause the DirectX device to be lost.&#xD;&#xA;When the device is lost all GPU resources (vertices, textures, shaders and so on) must be considered invalid and cannot be used again. [MSDN reference here][1].&#xD;&#xA;&#xD;&#xA;These lost resources must be released, and then recreated when the device is restored. In the case of most games restoring these resources requires a lot of data to be loaded from disk again - often the same loading procedure as done at the start of the game/level.&#xD;&#xA;&#xD;&#xA;**What can be done to avoid this?**&#xD;&#xA;&#xD;&#xA; - You can keep a cache of your data in&#xD;&#xA;   ram so transferring it back to the&#xD;&#xA;   GPU will be faster than reloading&#xD;&#xA;   from HD. I believe there's a way to&#xD;&#xA;   make DirectX do this automatically.&#xD;&#xA; - Use a new version of DirectX. This quote is&#xD;&#xA;   from MSDN on DirectX 9Ex:&#xD;&#xA;&#xD;&#xA;&gt; Devices are now only lost under two&#xD;&#xA;&gt; circumstances; when the hardware is&#xD;&#xA;&gt; reset because it is hanging, and when&#xD;&#xA;&gt; the device driver is stopped. When&#xD;&#xA;&gt; hardware hangs, the device can be&#xD;&#xA;&gt; reset by calling ResetEx. If hardware&#xD;&#xA;&gt; hangs, texture memory is lost.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb174714(VS.85).aspx" />
  <row Id="9578" PostHistoryTypeId="2" PostId="4846" RevisionGUID="b03f4ce9-adee-4a18-8c2a-fe225ad451de" CreationDate="2010-10-26T08:37:58.230" UserId="631" Text="**Why not build your own?**&#xD;&#xA;&#xD;&#xA;If you've got time, patience and the willingness to learn - you could always try developing your own scripting engine with all the features and syntax that you need.&#xD;&#xA;&#xD;&#xA;**Advantages**  &#xD;&#xA;&#xD;&#xA; 1. You'll learn about an interesting part of Computer Science.&#xD;&#xA; 2. By developing an 'in-house' scripting engine, it gives you complete control from start to finish by allowing you to tailor the engine to exactly what you need.&#xD;&#xA; 3. If you need to make any changes later down the road, they can made somewhat easier knowing the in's and out's of your own codebase, rather than learning the in's and out's of someone elses.&#xD;&#xA; 4. You won't have to worry about keeping your engine up to date with someone else's patches.&#xD;&#xA;&#xD;&#xA;**Disadvantages**&#xD;&#xA;&#xD;&#xA; 1. Time.  Not many people have it.  If you need something NOW, try an already existing engine (like one of those already suggested).&#xD;&#xA;&#xD;&#xA; 2. Speed.  A lot of existing scripting engines are very fast - a custom solution may not be as fast.&#xD;&#xA;&#xD;&#xA; 3. Team Size.  A lot of existing scripting engines have larger teams of people working on the codebase, whether that be private teams or global volunteers, there is something to be said for code that is checked and re-checked by many other people.&#xD;&#xA;&#xD;&#xA; 4. A scripting engine requires a certain amount of initial planning to pull of effectively.  There is a lot of groundwork that would need to be implemented as well that may not have to do with the actual scripting engine at all.&#xD;&#xA; 5.  Your playerbase/developers would have to come accustomed to your scripting engine.  This may not be a problem if the syntax and functionality is nearly the same as most modern scripting engines, but just be aware of that.&#xD;&#xA;&#xD;&#xA;This is by no means an exhaustive list.  If you find yourself having to make an large amount of changes to the back-end of an existing scripting language to get the functionality you want, IMO you should probably look for another engine that fits your requirements more closely or just build your own.&#xD;&#xA;&#xD;&#xA;I realize people enjoy throwing around &quot;laziness&quot; and &quot;don't re-invent the wheel&quot; but I think there is something to be said about learning how this stuff is done.  And a specific implementation is probably going to be better for your project than a generic implementation.&#xD;&#xA;&#xD;&#xA;&quot;Creating Scripting Systems in C++&quot; seems to be the favored article(s) that people share when discussing the topic: http://www.gamedev.net/reference/list.asp?categoryid=76" />
  <row Id="9579" PostHistoryTypeId="2" PostId="4847" RevisionGUID="f9bd9ee2-b865-4aae-995e-dbe0f88c09db" CreationDate="2010-10-26T09:32:29.383" UserId="2792" Text="If you want refractions, you will need to copy your back buffer to use as a texture for a distortion pass. There are a couple of ways to do this pass, but the most common is to create a distortion buffer some where early in your rendering pipeline after your Z has been written where you blend in your distortion directions.&#xD;&#xA;&#xD;&#xA;You can then do a pass where you find it suitable (after opaque and before transparent for example) where you copy screen to a texture and distort back onto the screen using your distortion map. It will not be correct but it will be quite fast.&#xD;&#xA;&#xD;&#xA;An alternative is to copy screen for each glass that is supposed to distort, this will give you a more correct look but it will cost a lot." />
  <row Id="9580" PostHistoryTypeId="2" PostId="4848" RevisionGUID="da5b6c34-7a6b-47f8-9eba-bde8396c3c97" CreationDate="2010-10-26T09:55:10.593" UserDisplayName="maborg" Text="javascript? nobody use it? I think the google v8 engine could be quite funny to use." />
  <row Id="9581" PostHistoryTypeId="5" PostId="4844" RevisionGUID="84bff4aa-1ca0-467b-80dd-d9b8a6b4adc0" CreationDate="2010-10-26T11:18:10.560" UserId="1386" Comment="Added link to quote source." Text="In some situations ALT-TAB will cause the DirectX device to be lost.&#xD;&#xA;When the device is lost all GPU resources (vertices, textures, shaders and so on) must be considered invalid and cannot be used again. [MSDN reference here][1].&#xD;&#xA;&#xD;&#xA;These lost resources must be released, and then recreated when the device is restored. In the case of most games restoring these resources requires a lot of data to be loaded from disk again - often the same loading procedure as done at the start of the game/level.&#xD;&#xA;&#xD;&#xA;**What can be done to avoid this?**&#xD;&#xA;&#xD;&#xA; - You can keep a cache of your data in&#xD;&#xA;   ram so transferring it back to the&#xD;&#xA;   GPU will be faster than reloading&#xD;&#xA;   from HD. I believe there's a way to&#xD;&#xA;   make DirectX do this automatically.&#xD;&#xA; - Use a new version of DirectX. This quote ([source][2]) is&#xD;&#xA;   from MSDN on DirectX 9Ex:&#xD;&#xA;&#xD;&#xA;&gt; Devices are now only lost under two&#xD;&#xA;&gt; circumstances; when the hardware is&#xD;&#xA;&gt; reset because it is hanging, and when&#xD;&#xA;&gt; the device driver is stopped. When&#xD;&#xA;&gt; hardware hangs, the device can be&#xD;&#xA;&gt; reset by calling ResetEx. If hardware&#xD;&#xA;&gt; hangs, texture memory is lost.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb174714(VS.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb219800(v=VS.85).aspx" />
  <row Id="9583" PostHistoryTypeId="2" PostId="4849" RevisionGUID="550efff9-d0d2-4f9a-8d0f-2fe18fbf870c" CreationDate="2010-10-26T14:04:58.153" UserId="991" Text="You might want to take a look at Sky Domes. Due to their shape it's a lot easier to get a decent result.&#xD;&#xA;&#xD;&#xA;Here you can find a tutorial on how to implement it:&#xD;&#xA;&#xD;&#xA;http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Skydome.php&#xD;&#xA;&#xD;&#xA;And here's a very nice example of how it can look like if you put some work into it:&#xD;&#xA;&#xD;&#xA;.http://sites.google.com/site/wlifeengine/home/screenshots" />
  <row Id="9584" PostHistoryTypeId="5" PostId="4842" RevisionGUID="8f3e48f7-b76c-4f3f-8e31-8274c76c8595" CreationDate="2010-10-26T14:36:37.067" UserId="370" Comment="Clearly use parameter notation instead of time notation." Text="What your looking for a parametric plot of the parabolic function.  It's easiest to make the parametric function use a range of p ∈ [0,1].&#xD;&#xA;&#xD;&#xA;The canonical form for a parametric parabola is&#xD;&#xA;&#xD;&#xA;&gt; k := some constant  &#xD;&#xA;&gt; f_x(p) = 2kp  &#xD;&#xA;&gt; f_y(p) = kp&amp;#178;  &#xD;&#xA;&#xD;&#xA;Using this formula and some basic algebra for function morphing and I got&#xD;&#xA;&#xD;&#xA;&gt; p &amp;#8712; [0,1] &amp;rarr; x,y &amp;#8712; [0,1]  &#xD;&#xA;&gt;  or in other words keep p between 0 and 1 and x,y will be between 0 and 1 as well.  &#xD;&#xA;&gt; x = p  &#xD;&#xA;&gt; y = 4p - 4p&amp;#178;&#xD;&#xA;&#xD;&#xA;So to get these functions will produce the numbers you're looking for.&#xD;&#xA;&#xD;&#xA;    float total_time = 2;&#xD;&#xA;    float x_min = 0;&#xD;&#xA;    float x_max = 480;&#xD;&#xA;    float y_min = 0;&#xD;&#xA;    float y_max = 320;&#xD;&#xA;    &#xD;&#xA;    float f_x( float time )&#xD;&#xA;    {&#xD;&#xA;       float p = time/total_time;&#xD;&#xA;       return x_min + (x_max-x_min)*p;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    float f_y( float time )&#xD;&#xA;    {&#xD;&#xA;       float p = time/total_time;&#xD;&#xA;       return y_min + (y_max-y_min)*(4*p-4*p*p);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9585" PostHistoryTypeId="2" PostId="4850" RevisionGUID="172329eb-8cdc-4d75-b20c-485fa6208cd4" CreationDate="2010-10-26T15:19:52.253" UserId="1974" Text="Instancing should be used in conjunction with VBOs, and is most useful in OpenGL3/4.&#xD;&#xA;&#xD;&#xA;The &quot;correct&quot; usage is to have a uniform-array of transform matrices, one for each instance. You then use one instanced draw call to render all the objects that use the same mesh. In your vertex shader, you can then select which transformation matrix to use based on the index ID.&#xD;&#xA;&#xD;&#xA;You can do the same for any other number of attributes, but the more attributes you want to change, the fewer instances you can draw at once, due to constraints on the number of uniforms available. If you just want to use a transform matrix, for example, thats 4096/16=256 instances at once on the latest-and-greatest hardware. (assuming no other uniforms in your shaders). If you add colors to that, you're down to 4096/20=204 instances at once." />
  <row Id="9586" PostHistoryTypeId="2" PostId="4851" RevisionGUID="30fa6a6c-c918-4ccf-9140-e67d0075dd6f" CreationDate="2010-10-26T15:42:47.107" UserId="2132" Text="Suppose I am doing a JavaScript game, and I wish the game to update the server if the user has successfully completes the game and his outcome.&#xD;&#xA;&#xD;&#xA;How should I ensure that the request came from the JavaScript game, and that the data sent has not been tampered with. I am using PHP as the server-side language.&#xD;&#xA;&#xD;&#xA;I do understand that no strategies are going to be 100% fool-proof, and any measures taken is more of a deterrence than absolute protection." />
  <row Id="9587" PostHistoryTypeId="1" PostId="4851" RevisionGUID="30fa6a6c-c918-4ccf-9140-e67d0075dd6f" CreationDate="2010-10-26T15:42:47.107" UserId="2132" Text="Securing HTTP data from a JavaScript game to server" />
  <row Id="9588" PostHistoryTypeId="3" PostId="4851" RevisionGUID="30fa6a6c-c918-4ccf-9140-e67d0075dd6f" CreationDate="2010-10-26T15:42:47.107" UserId="2132" Text="&lt;javascript&gt;&lt;security&gt;&lt;php&gt;" />
  <row Id="9589" PostHistoryTypeId="5" PostId="4682" RevisionGUID="a51b4f8a-5a7c-47e7-928b-d78a9a1c068c" CreationDate="2010-10-26T15:43:24.140" UserId="51" Comment="Fixed english, changed title to be more accurate" Text="By scripting here I mean not just putting config data in a script, but scripting parts of the project like some class methods, test specific game loop, etc. This would be not just to accelerate development, but also allow players to see some of these scripts to tweak some aspects of the game.&#xD;&#xA;&#xD;&#xA;Some language like Lua have some wrappers like luabind, but when I've used it in the past it had problems because it didn't support method redefinition in a context of inheritance.&#xD;&#xA;&#xD;&#xA;What are your suggestions of language / wrappers to use or not to use? " />
  <row Id="9590" PostHistoryTypeId="4" PostId="4682" RevisionGUID="a51b4f8a-5a7c-47e7-928b-d78a9a1c068c" CreationDate="2010-10-26T15:43:24.140" UserId="51" Comment="Fixed english, changed title to be more accurate" Text="What scripting language would you recommend for a C++ game project? " />
  <row Id="9591" PostHistoryTypeId="5" PostId="4851" RevisionGUID="137b0aa2-d0f5-44ac-b866-ddace8b7973b" CreationDate="2010-10-26T15:58:42.337" UserId="2132" Comment="added 306 characters in body; added 321 characters in body; added 11 characters in body" Text="Suppose I am doing a JavaScript game, and I wish the game to update the server if the user has successfully completes the game and his outcome.&#xD;&#xA;&#xD;&#xA;How should I ensure that the request came from the JavaScript game, and that the data sent has not been tampered with. I am using PHP as the server-side language.&#xD;&#xA;&#xD;&#xA;I do understand that no strategies are going to be 100% fool-proof, and any measures taken is more of a deterrence than absolute protection.&#xD;&#xA;&#xD;&#xA;**On Edit:** Let's supposed we're not using server verification of each user's step (as in a traditional MMO). The game could be a mini-game as part of a web game or educational game (a sliding block puzzle, for example) and requiring a server-side component for each of those games could be tedious.&#xD;&#xA;&#xD;&#xA;**Example:** Supposed, when the game is completed, a request is sent to the server via. AJAX &#xD;&#xA;&#xD;&#xA;    game_finished.php?user_id=1&amp;outcome=success&amp;score=88&#xD;&#xA;&#xD;&#xA;A user could 'fake' the server in believing that the game has been completed correctly by sending that request to game_finished.php. How could this be made more difficult?&#xD;&#xA;" />
  <row Id="9592" PostHistoryTypeId="2" PostId="4852" RevisionGUID="5fd6c299-c650-45c8-b5f5-22a30ed9b803" CreationDate="2010-10-26T16:07:19.267" UserId="1477" Text="For an artist who won't be dealing directly with the code, what formats for animation could they use that would be portable into an android game?&#xD;&#xA;&#xD;&#xA;In my particular case there are no collision requirements or anything, just need to be able to place the animation on screen at a specific point." />
  <row Id="9593" PostHistoryTypeId="1" PostId="4852" RevisionGUID="5fd6c299-c650-45c8-b5f5-22a30ed9b803" CreationDate="2010-10-26T16:07:19.267" UserId="1477" Text="What external animation formats can I use in android?" />
  <row Id="9594" PostHistoryTypeId="3" PostId="4852" RevisionGUID="5fd6c299-c650-45c8-b5f5-22a30ed9b803" CreationDate="2010-10-26T16:07:19.267" UserId="1477" Text="&lt;android&gt;&lt;animation&gt;&lt;pipeline&gt;&lt;file-format&gt;&lt;importing&gt;" />
  <row Id="9596" PostHistoryTypeId="2" PostId="4854" RevisionGUID="75c8cbd9-f0e5-4248-866c-092d07a72ae7" CreationDate="2010-10-26T16:32:48.960" UserId="2649" Text="I'm building a simple Plattformer Jump n' Run Style game. I do not use tiles - instead i've geometrical shapes for my level entities (and the player is one too). I finished my collision detection code and everything works fine so far. &#xD;&#xA;&#xD;&#xA;Next, I wanted to implement jumping. Just checking if the player hits the appropriate key and add some upwards velocity. Works fine. But it works even if the player is in-air, which is not what I want. ;-) &#xD;&#xA;&#xD;&#xA;So, I have to check if the player stands on something. My first idea was to check if there was a collision in the last frame and mark the player as &quot;able to jump&quot;, but this would even trigger if the player hits a wall in-air. As my math skills aren't that good, i ask for help - even hints would do how to implement this.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="9597" PostHistoryTypeId="1" PostId="4854" RevisionGUID="75c8cbd9-f0e5-4248-866c-092d07a72ae7" CreationDate="2010-10-26T16:32:48.960" UserId="2649" Text="Building a Plattformer - How to determine if a player is allowed to jump?" />
  <row Id="9598" PostHistoryTypeId="3" PostId="4854" RevisionGUID="75c8cbd9-f0e5-4248-866c-092d07a72ae7" CreationDate="2010-10-26T16:32:48.960" UserId="2649" Text="&lt;math&gt;&lt;collision-detection&gt;" />
  <row Id="9599" PostHistoryTypeId="2" PostId="4855" RevisionGUID="9b786c76-ecae-465b-9f78-636401a092e8" CreationDate="2010-10-26T16:38:19.180" UserId="14" Text="Are you checking what type of surface your character is colliding on? Or where on the character shape the collision is occurring? If you can determine the difference between ground and wall, or collision under the character and anywhere else then you could implement it that way.&#xD;&#xA;" />
  <row Id="9600" PostHistoryTypeId="2" PostId="4856" RevisionGUID="a492a1e9-9053-4eac-ae9c-16a59e627fe5" CreationDate="2010-10-26T16:52:47.843" UserId="744" Text="_a sliding block puzzle, for example_&#xD;&#xA;&#xD;&#xA;This is an example where server-side verification is trivial. It doesn't need to verify each step until the game is over. Just send the entire move list, and the server replays it to make sure it's correct." />
  <row Id="9601" PostHistoryTypeId="5" PostId="4851" RevisionGUID="5c92dabb-9a14-4f85-bc4b-b4496d10f646" CreationDate="2010-10-26T16:56:55.377" UserId="2132" Comment="added 12 characters in body" Text="Suppose I am doing a JavaScript game, and I wish the game to update the server if the user has successfully completes the game and his outcome.&#xD;&#xA;&#xD;&#xA;How should I ensure that the request came from the JavaScript game, and that the data sent has not been tampered with. I am using PHP as the server-side language.&#xD;&#xA;&#xD;&#xA;I do understand that no strategies are going to be 100% fool-proof, and any measures taken is more of a deterrence than absolute protection.&#xD;&#xA;&#xD;&#xA;**On Edit:** Let's supposed we're not using server verification of each user's step (as in a traditional MMO). The game could be a mini-game as part of a web game or educational game (space invaders or a real-time game, for example) and requiring a server-side component for each of those games could be tedious.&#xD;&#xA;&#xD;&#xA;**Example:** Supposed, when the game is completed, a request is sent to the server via. AJAX &#xD;&#xA;&#xD;&#xA;    game_finished.php?user_id=1&amp;outcome=success&amp;score=88&#xD;&#xA;&#xD;&#xA;A user could 'fake' the server in believing that the game has been completed correctly by sending that request to game_finished.php. How could this be made more difficult?&#xD;&#xA;" />
  <row Id="9602" PostHistoryTypeId="5" PostId="4856" RevisionGUID="52c01135-ae65-4a5e-8453-b5d1a44024d0" CreationDate="2010-10-26T17:02:45.133" UserId="744" Comment="added 268 characters in body" Text="_a sliding block puzzle, for example_&#xD;&#xA;&#xD;&#xA;This is an example where server-side verification is trivial. It doesn't need to verify each step until the game is over. Just send the entire move list, and the server replays it to make sure it's correct.&#xD;&#xA;&#xD;&#xA;(Edit: The point of this answer isn't to pick on examples until you find one that isn't trivially validatable. Rather, it should make you go back and look at the game you're actually making - it's probably trivially validatable, or only needs a small tweak to be.)" />
  <row Id="9603" PostHistoryTypeId="2" PostId="4857" RevisionGUID="6ab7e151-d79b-4dda-b3ba-8c0d4b0d9606" CreationDate="2010-10-26T17:13:04.760" UserId="154" Text="Two options spring to mind:&#xD;&#xA;&#xD;&#xA; - First thought is to tag the geometry with an ID and then check to see if the collision is with geometry tagged as floor. This offers the most control of jumpable surfaces but at a cost in level creation time.&#xD;&#xA; - Second is to check the normal of the collision, if it's pointing up then allow jump. Or within some margin of up, depends on if you have slanting floors. This is flexible and doesn't require any tagging, but if you have slanted floors and walls you might get some jumping where you don't want it. " />
  <row Id="9604" PostHistoryTypeId="2" PostId="4858" RevisionGUID="614b78c6-c984-4d98-8d94-50907f331805" CreationDate="2010-10-26T17:14:02.733" UserId="2808" Text="I've used MongoDB (NoSQL), it's a very fast document store that can be accessed over TCP. Give it a try! It's awesome!&#xD;&#xA;&#xD;&#xA;Writing your own DB is a daunting task. I suggest you first explore what's already out there and if you can't find any thing that matches your specific set of criteria, build your own. Oh, and don't forget to open source it. :)" />
  <row Id="9605" PostHistoryTypeId="2" PostId="4859" RevisionGUID="0f9c10c4-4b5d-4ddc-ae8f-8c88fc5d2e88" CreationDate="2010-10-26T17:18:00.097" UserId="2808" Text="I remember having a look at some Planetarion clone's code. Everything's PHP, but the ticker code is in raw C - with C MySQL bindings. Because the data model was very simple the updates happen really fast. " />
  <row Id="9606" PostHistoryTypeId="2" PostId="4860" RevisionGUID="9d4d0a3f-bd86-4c44-8a2c-10d02753e2d3" CreationDate="2010-10-26T17:19:52.923" UserId="889" Text="You surely should implement some kind of suface Type. Think of it, how will you manage if you can climb up a ladder if you can't know if your character just collided a wall or a ladder ? You could simply use OOP to manage a type hierarchy using heritage, but I would suggest you to use &quot;Categories&quot; in a config class.&#xD;&#xA;&#xD;&#xA;Here is the idea :&#xD;&#xA;&#xD;&#xA;Config class have a static constant variable for each category. For exemple :&#xD;&#xA;&#xD;&#xA;    static const int FloorCategory( 1 &lt;&lt; 0 );&#xD;&#xA;    static const int LadderCategory( 1 &lt;&lt; 1 );&#xD;&#xA;&#xD;&#xA;Then, you could do something like this to set up some collision groups (again, this should be static):&#xD;&#xA;&#xD;&#xA;    const int Config::PlayerCollision( Config::FloorCategory | Config::LadderCategory | Config::EnnemyCategory );&#xD;&#xA;&#xD;&#xA;With this method, you will be able to test if the player juste collided anything that you should manage, so your engine can call a &quot;Collided&quot; Method of the entity :&#xD;&#xA;&#xD;&#xA;    void Player::Collided( int group )&#xD;&#xA;    {&#xD;&#xA;       if ( group == Config::LadderCategory )&#xD;&#xA;       {&#xD;&#xA;          // Manage Ladder Collision&#xD;&#xA;       }&#xD;&#xA;       else if ( group == Config::FloorCategory )&#xD;&#xA;       {&#xD;&#xA;          // Manage Floor Collision&#xD;&#xA;       }&#xD;&#xA;       else if ( group == Config::EnnemyCategory )&#xD;&#xA;       {&#xD;&#xA;          // Manage Ennemy Collision&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The method use binary flags and binary &quot;Or&quot; operator to assure each group have a different value, based on categories binary value. This method works fine and is easily scalable so you can create customs collision groups." />
  <row Id="9607" PostHistoryTypeId="5" PostId="4860" RevisionGUID="be565a40-9e1c-4390-9973-b672dca6ef94" CreationDate="2010-10-26T17:33:08.040" UserId="889" Comment="added 543 characters in body" Text="You surely should implement some kind of suface Type. Think of it, how will you manage if you can climb up a ladder if you can't know if your character just collided a wall or a ladder ? You could simply use OOP to manage a type hierarchy using heritage, but I would suggest you to use &quot;Categories&quot; in a config class.&#xD;&#xA;&#xD;&#xA;Here is the idea :&#xD;&#xA;&#xD;&#xA;Config class have a static constant variable for each category. For exemple :&#xD;&#xA;&#xD;&#xA;    static const int FloorCategory( 1 &lt;&lt; 0 );&#xD;&#xA;    static const int LadderCategory( 1 &lt;&lt; 1 );&#xD;&#xA;&#xD;&#xA;Then, you could do something like this to set up some collision groups (again, this should be static):&#xD;&#xA;&#xD;&#xA;    const int Config::PlayerCollision( Config::FloorCategory | Config::LadderCategory | Config::EnnemyCategory );&#xD;&#xA;&#xD;&#xA;With this method, you will be able to test if the player juste collided anything that you should manage, so your engine can call a &quot;Collided&quot; Method of the entity :&#xD;&#xA;&#xD;&#xA;    void Player::Collided( int group )&#xD;&#xA;    {&#xD;&#xA;       if ( group == Config::LadderCategory )&#xD;&#xA;       {&#xD;&#xA;          // Manage Ladder Collision&#xD;&#xA;       }&#xD;&#xA;       else if ( group == Config::FloorCategory )&#xD;&#xA;       {&#xD;&#xA;          // Manage Floor Collision&#xD;&#xA;       }&#xD;&#xA;       else if ( group == Config::EnnemyCategory )&#xD;&#xA;       {&#xD;&#xA;          // Manage Ennemy Collision&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The method use binary flags and binary &quot;Or&quot; operator to assure each group have a different value, based on categories binary value. This method works fine and is easily scalable so you can create customs collision groups.&#xD;&#xA;&#xD;&#xA;**EDIT :**&#xD;&#xA;&#xD;&#xA;Sorry, I have forgotten to explain how to actually bind theses categories to entities. You can just add a filter in your Entity / Token base class. This filter will be affected a category so when a collision occurs, you can add a contact using the two objects filters. My english is not quite correct maybe, let me explain with some code :&#xD;&#xA;&#xD;&#xA;    void PhysicEngine::OnCollision(...)&#xD;&#xA;    {&#xD;&#xA;        mPhysics.AddContact( body1, body1.GetFilter(), body2, body2.GetFilter );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I hope my exemple is correctly explained..." />
  <row Id="9608" PostHistoryTypeId="2" PostId="4861" RevisionGUID="70fc5aea-5f6f-4e97-bfc7-3e77d6948213" CreationDate="2010-10-26T17:39:48.930" UserId="2810" Text="As noted above [Unity][1] is a solid choice, it supports Mac and Windows machines (desktop and web), iOS and Android devices as well as all three consoles (PS3, Wii, X360, downloadable and retail titles). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com" />
  <row Id="9609" PostHistoryTypeId="2" PostId="4862" RevisionGUID="f50375de-c707-4d6d-b985-2d63ef08e6ff" CreationDate="2010-10-26T18:18:38.423" UserId="2812" Text="I would recommend going through a CS, Software Engineering or similar program.  Back in university, we had game companies like EA who came about twice per year to recruit coops and new grads.  The school didn't provide any game degrees at that time and they were targeting CS and Soft Eng students.&#xD;&#xA;&#xD;&#xA;There are some courses in university like Computer Graphics which you can take to create basic games, ray tracers and other graphical projects from scratch.  Do extremely well in those projects and you can use them as a portfolio to sell yourself to game companies.&#xD;&#xA;&#xD;&#xA;If you manage to get in the game industry and not enjoy it, you can always count on your CS or Soft Eng degree to find other development jobs in different fields." />
  <row Id="9610" PostHistoryTypeId="2" PostId="4863" RevisionGUID="37c906ff-1402-4395-b53f-9e4e38f1a5a3" CreationDate="2010-10-26T18:45:58.380" UserId="889" Text="I want to make objects in a side project interatible with each other. For this, I want to be able to create rules so &quot;Collisions&quot; (Interactions) can be recognised by testing the rules. The rules should be able to reference what object does the player is trying use, in what state the object is, with which object does he try to interact with (could be nothing) and the state of this object. Maybe the rules will need to consider the state of the game as well.&#xD;&#xA;&#xD;&#xA;With this in mind, here is my question. How could I create a rule-based system that I could use ? What design patterns could I use to create something scalable and that will allow me to add, remove and modify rules without having to regenerate the project ?" />
  <row Id="9611" PostHistoryTypeId="1" PostId="4863" RevisionGUID="37c906ff-1402-4395-b53f-9e4e38f1a5a3" CreationDate="2010-10-26T18:45:58.380" UserId="889" Text="Custom Rule-Based System for Action Recognition in a Game" />
  <row Id="9612" PostHistoryTypeId="3" PostId="4863" RevisionGUID="37c906ff-1402-4395-b53f-9e4e38f1a5a3" CreationDate="2010-10-26T18:45:58.380" UserId="889" Text="&lt;programming&gt;&lt;design-patterns&gt;" />
  <row Id="9613" PostHistoryTypeId="2" PostId="4864" RevisionGUID="2e7d81d5-b499-4bd2-8869-6cb599015951" CreationDate="2010-10-26T18:46:47.440" UserId="136" Text="If you plan on targeting the XBox360 or Windows Phone 7, then your options are limited.  Those platforms do not support runtime code generation, so your only option would be an interpreted language.  I would recommend steering clear of interpreted languages, as their performance tends to range from &quot;sub-par&quot; to &quot;abysmal&quot;.&#xD;&#xA;&#xD;&#xA;If you are only targeting Windows, and you really need/want a scripting language, then have a look at IronPython or IronRuby.  Both target the DLR and perform very well." />
  <row Id="9614" PostHistoryTypeId="5" PostId="4864" RevisionGUID="c5f22372-5f35-40e7-ab2d-1516d6fb5eec" CreationDate="2010-10-26T19:04:53.587" UserId="136" Comment="added 30 characters in body" Text="If you plan on targeting the XBox360 or Windows Phone 7, then your options are limited.  Those platforms do not support runtime code generation, so your only option would be an interpreted language.  I would recommend steering clear of interpreted languages, as their performance tends to range from &quot;sub-par&quot; to &quot;abysmal&quot;.&#xD;&#xA;&#xD;&#xA;If you are only targeting Windows, and you really need/want a scripting language, then have a look at IronPython or IronRuby.  Both target the DLR and perform very well (for being dynamic languages)." />
  <row Id="9615" PostHistoryTypeId="2" PostId="4865" RevisionGUID="8741de1b-f262-45bb-a8cf-d6b2ad32cf00" CreationDate="2010-10-26T19:06:53.080" UserId="1232" Text="If you consider your character's foot as alway under the character by a certain distance, and if you're not moving away from the surface then your character is on the ground.&#xD;&#xA;&#xD;&#xA;In rough pseudo-code:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;bool isOnGround(Character&amp; char)&#xD;&#xA;{&#xD;&#xA;   // down vector is opposite from your characters current up vector.&#xD;&#xA;   vec down = -char.up;&#xD;&#xA;&#xD;&#xA;   // if feet are moving away from any surface, can't be on the ground&#xD;&#xA;   if (dot(char.velocity, down) &lt; 0.0f)&#xD;&#xA;     return false;&#xD;&#xA;&#xD;&#xA;   // generate line from character centre to the foot position&#xD;&#xA;   vec linePos0 = char.position;&#xD;&#xA;   vec linePos1 = char.position + (down * char.footDistanceFromCentre);&#xD;&#xA;&#xD;&#xA;   // test line against world. If it returns a hit surface, we're on the ground&#xD;&#xA;   if (testLineAgainstWorld(line0, line1, &amp;surface)&#xD;&#xA;     return true;&#xD;&#xA;&#xD;&#xA;   return false;&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;" />
  <row Id="9616" PostHistoryTypeId="2" PostId="4866" RevisionGUID="58da18d1-5fce-4f88-ba25-a4a1e7e24403" CreationDate="2010-10-26T19:34:11.593" UserId="2734" Text="Turns out that there is built-in functionality for this in the jMonkeyEngine framework:&#xD;&#xA;&#xD;&#xA;    Vector3f origin = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f);&#xD;&#xA;    Vector3f direction = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.3f);&#xD;&#xA;   &#xD;&#xA;    direction.subtractLocal(origin).normalizeLocal();&#xD;&#xA;&#xD;&#xA;    CollisionResults results = new CollisionResults();&#xD;&#xA;    rootNode.collideWith(new Ray(origin, direction), results);&#xD;&#xA;&#xD;&#xA;    if (results.size() &gt; 0) {&#xD;&#xA;        character.setLocalTranslation(results.getClosestCollision().getContactPoint());&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Thanks anyway!" />
  <row Id="9617" PostHistoryTypeId="2" PostId="4867" RevisionGUID="361525c3-e78e-4ad3-9300-b5439d58ba51" CreationDate="2010-10-26T19:39:29.717" UserId="136" Text="It depends on the requirements of your design.  For example, do you want one unique/global &quot;Activate&quot; action, or do you want discrete activation actions for different types of objects?  Is the &quot;Activate&quot; action for a light switch the same as the &quot;Activate&quot; action for a coffee maker, but with different behavior?  Or are they completely different actions with identical names?&#xD;&#xA;&#xD;&#xA;If you want to be able to bind actions to input gestures (e.g. keystrokes), then you'll probably want to go with the first option.  In that case, you probably don't want the action to know every object on which it can be performed.  You might not want a rigid set of actions supported by each object, either.  Instead, your design could enable you to *bind* (or *attach*) action handlers to potential targets, delegating the behavior out to a callback.  Action bindings could be bound to object types (metadata) or to actual object instances (or both).&#xD;&#xA;&#xD;&#xA;Let's say I have a light switch, and I want it to support the Activate action.  My code might look something like this:&#xD;&#xA;&#xD;&#xA;    lightSwitch.ActionBindings.Add(&#xD;&#xA;        new ActionBinding(&#xD;&#xA;            StandardActions.Activate,&#xD;&#xA;            delegate (object target)&#xD;&#xA;            {&#xD;&#xA;                var lightSwitch = (LightSwitch)target;&#xD;&#xA;                if (lightSwitch.IsDestroyed)&#xD;&#xA;                    return false;&#xD;&#xA;                lightSwitch.IsActivated = !lightSwitch.IsActivated;&#xD;&#xA;                return true;&#xD;&#xA;            }));&#xD;&#xA;&#xD;&#xA;This is simplified a bit, but the idea is that the behavior is injected via a callback, and the callback could return a value indicating success.  In practice, you would probably want a second &quot;can execute&quot; callback in addition to the default &quot;execute&quot; callback.&#xD;&#xA;&#xD;&#xA;Now, when the player hits the key bound to the &quot;Activate&quot; action, the target object should be queried to see if it has an ActionBinding for the &quot;Activate&quot; action.  If so, the &quot;can execute&quot; callback should be checked (if one exists), and on successful evaluation, the &quot;execute&quot; callback should be invoked.  If the action succeeds, stop.  Otherwise, walk up the object tree until you find an object which will accept the action.  That last step is only necessary if your objects are grouped in a hierarchy, i.e. the object is part of a larger composite object which might be the &quot;true&quot; action target.&#xD;&#xA;&#xD;&#xA;Your callbacks could easily query the target object or game state as necessary.  You might consider exposing services or state using a Service Locator pattern." />
  <row Id="9618" PostHistoryTypeId="5" PostId="4860" RevisionGUID="5b80c820-35d0-424b-a977-64ee6d8be1cc" CreationDate="2010-10-26T19:54:33.017" UserId="744" Comment="Use an enumerated type rather than ints.; added 6 characters in body" Text="You surely should implement some kind of surface type. Think of it, how will you manage if you can climb up a ladder if you can't know if your character just collided a wall or a ladder? You could simply use OOP to manage a type hierarchy using heritage, but I would suggest you to use &quot;categories&quot; implemented using an enumerated type:&#xD;&#xA;&#xD;&#xA;Here is the idea: A &quot;Collisions&quot; enumeration has a flag for each category. For example:&#xD;&#xA;&#xD;&#xA;    namespace Collisions&#xD;&#xA;    {&#xD;&#xA;        enum Type&#xD;&#xA;        {&#xD;&#xA;            None   = 0,&#xD;&#xA;            Floor  = 1 &lt;&lt; 0,&#xD;&#xA;            Ladder = 1 &lt;&lt; 1,&#xD;&#xA;            Enemy  = 1 &lt;&lt; 2,&#xD;&#xA;            ... // And whatever else you need.&#xD;&#xA;&#xD;&#xA;            // Then, you can construct named groups of flags.&#xD;&#xA;            Player = Floor | Ladder | Enemy&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With this method, you will be able to test if the player juste collided anything that you should manage, so your engine can call a &quot;Collided&quot; Method of the entity :&#xD;&#xA;&#xD;&#xA;    void Player::Collided( Collisions::Type group )&#xD;&#xA;    {&#xD;&#xA;       if ( group &amp; Collisions::Ladder )&#xD;&#xA;       {&#xD;&#xA;          // Manage Ladder Collision&#xD;&#xA;       }&#xD;&#xA;       if ( group &amp; Collisions::Floor )&#xD;&#xA;       {&#xD;&#xA;          // Manage Floor Collision&#xD;&#xA;       }&#xD;&#xA;       if ( group &amp; Collisions::Enemy )&#xD;&#xA;       {&#xD;&#xA;          // Manage Enemy Collision&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The method use bitwise flags and the bitwise &quot;Or&quot; operator to assure each group have a different value, based on category's binary value. This method works fine and is easily scalable so you can create customs collision groups. Each Entity (Player, Enemy, etc.) in your game has some bits called a &quot;filter&quot;, which are used to determine what it can collide with. Your collision code should check to see if bits match and react accordingly, with some code that might look like:&#xD;&#xA;&#xD;&#xA;    void PhysicEngine::OnCollision(...)&#xD;&#xA;    {&#xD;&#xA;        mPhysics.AddContact( body1, body1.GetFilter(), body2, body2.GetFilter() );&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="9619" PostHistoryTypeId="5" PostId="4865" RevisionGUID="74b59c77-9a79-4686-bf6c-d66980ae11c3" CreationDate="2010-10-26T20:20:11.570" UserId="1232" Comment="revised code to show how you could generalize direction of foot and animate it to support wall jumps" Text="If you consider your character's foot as alway under the character by a certain distance, and if you're not moving away from the surface then your character is on the ground.&#xD;&#xA;&#xD;&#xA;In rough pseudo-code:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;bool isOnGround(Character&amp; char)&#xD;&#xA;{&#xD;&#xA;   // down vector is opposite from your characters current up vector.&#xD;&#xA;   // if you want to support wall jumps, animate the vecToFoot as appropriate.&#xD;&#xA;   vec vecToFoot = -char.up * char.footDistanceFromCentre;&#xD;&#xA;&#xD;&#xA;   // if feet are moving away from any surface, can't be on the ground&#xD;&#xA;   if (dot(char.velocity, down) &lt; 0.0f)&#xD;&#xA;     return false;&#xD;&#xA;&#xD;&#xA;   // generate line from character centre to the foot position&#xD;&#xA;   vec linePos0 = char.position;&#xD;&#xA;   vec linePos1 = char.position + vecToFoot;&#xD;&#xA;&#xD;&#xA;   // test line against world. If it returns a hit surface, we're on the ground&#xD;&#xA;   if (testLineAgainstWorld(line0, line1, &amp;surface)&#xD;&#xA;     return true;&#xD;&#xA;&#xD;&#xA;   return false;&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;" />
  <row Id="9620" PostHistoryTypeId="2" PostId="4868" RevisionGUID="04b29fc9-0aa9-40eb-aac3-2c5db5306779" CreationDate="2010-10-26T21:54:20.303" UserId="2817" Text="If I am creating a board-game type game, does anyone know if it is legal to use others' names in the game?&#xD;&#xA;&#xD;&#xA;ie. A playing card with &quot;George Bush&quot; or &quot;Michael Jackson&quot; on it.&#xD;&#xA;&#xD;&#xA;Also, is it the same for brand names?" />
  <row Id="9621" PostHistoryTypeId="1" PostId="4868" RevisionGUID="04b29fc9-0aa9-40eb-aac3-2c5db5306779" CreationDate="2010-10-26T21:54:20.303" UserId="2817" Text="Legality of using names in a game?" />
  <row Id="9622" PostHistoryTypeId="3" PostId="4868" RevisionGUID="04b29fc9-0aa9-40eb-aac3-2c5db5306779" CreationDate="2010-10-26T21:54:20.303" UserId="2817" Text="&lt;legal&gt;" />
  <row Id="9623" PostHistoryTypeId="2" PostId="4869" RevisionGUID="5eb8e4d8-8f3e-4981-88c3-a33f724f1fb1" CreationDate="2010-10-26T22:38:51.543" UserId="1677" Text="You can use [Prolog][1] (as a *logic, declarative* scripting language) as it provides model of rule-based deduction process. One my friend has used his own Prolog-like language in games with success.&#xD;&#xA;&#xD;&#xA;&gt; The program logic is expressed in&#xD;&#xA;&gt; terms of relations, represented as&#xD;&#xA;&gt; facts and rules. A computation is&#xD;&#xA;&gt; initiated by running a query over&#xD;&#xA;&gt; these relations.&#xD;&#xA;&#xD;&#xA;If your host program is in C++, here some links to bind C++ and Prolog:&#xD;&#xA;&#xD;&#xA;http://www.amzi.com/articles/prolog_cpp.htm  &#xD;&#xA;http://www.google.lv/search?q=Prolog+C%2B%2B&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Prolog" />
  <row Id="9624" PostHistoryTypeId="2" PostId="4870" RevisionGUID="73d5743d-39d5-4f33-9e5f-74d1fe2fab98" CreationDate="2010-10-26T22:52:48.693" UserId="2819" Text="Try using Bryce to generate sky bitmaps for use with your skydomes. There is a lot of variation in Bryce's generated imagery." />
  <row Id="9625" PostHistoryTypeId="2" PostId="4871" RevisionGUID="3168523e-2717-4a75-b64f-584a235b6b6f" CreationDate="2010-10-26T23:06:58.283" UserId="560" Text="I would say no, unless you have been given permission. For example, think of sports games that do not own the rights to the league they are covering. They end up resorting to using similar, but different names to their real life counterparts." />
  <row Id="9626" PostHistoryTypeId="5" PostId="4871" RevisionGUID="57f0954a-aa71-443b-8005-391fcda76f7c" CreationDate="2010-10-26T23:16:23.030" UserId="560" Comment="added 366 characters in body" Text="I would say no, unless you have been given permission. For example, think of sports games that do not own the rights to the league they are covering. They end up resorting to using similar, but different names to their real life counterparts.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I found this discussion about using sports peoples names in websites http://www.linkedin.com/answers/law-legal/property-law/LAW_PRL/566138-50912703 &#xD;&#xA;It seems a name itself can not be copyright (so you can use their name in a news article for instance), however if you are benefiting from using their name/image then it is a violation of publicity rights." />
  <row Id="9627" PostHistoryTypeId="2" PostId="4872" RevisionGUID="8696038d-7175-4c30-a43f-193ccde23aca" CreationDate="2010-10-27T01:18:04.940" UserDisplayName="J3M7OR3" Text="As I understand it, MMORPGs are games that run on your computer like any other normal 3d video game but, with each action that happens with in the game, changes are made to the universe via HTTP calls to the server. So the players computer does all the heavy lifting in terms of rendering the graphics and animations but, web frameworks do the online communication.&#xD;&#xA;&#xD;&#xA; - So I am wondering what web frameworks, web servers and databases are being used to create MMORPGs like EVE Online and W.O.W.? &#xD;&#xA;&#xD;&#xA; - Also, what programming languages and 3d game engines are being used to make the client side (3d graphics/animation/sounds) part of the game?" />
  <row Id="9628" PostHistoryTypeId="1" PostId="4872" RevisionGUID="8696038d-7175-4c30-a43f-193ccde23aca" CreationDate="2010-10-27T01:18:04.940" UserDisplayName="J3M7OR3" Text="What languages are used to develop MMORPGs like EVE Online and WOW?" />
  <row Id="9629" PostHistoryTypeId="3" PostId="4872" RevisionGUID="8696038d-7175-4c30-a43f-193ccde23aca" CreationDate="2010-10-27T01:18:04.940" UserDisplayName="J3M7OR3" Text="&lt;c++&gt;&lt;mmo&gt;&lt;3d-engines&gt;&lt;server&gt;&lt;framework&gt;" />
  <row Id="9630" PostHistoryTypeId="2" PostId="4873" RevisionGUID="117fbc6d-0fa8-4ebe-8e28-1b429ab38972" CreationDate="2010-10-27T02:09:02.053" UserId="2509" Text="I am making a game using SmartFox Server.  During testing... if I take a few minutes before loading the game, SmartFox stops running and I can't connect.  So I then have to restart smartfox.   Very cumbersome.   Is there away to keep the connection alive?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="9631" PostHistoryTypeId="1" PostId="4873" RevisionGUID="117fbc6d-0fa8-4ebe-8e28-1b429ab38972" CreationDate="2010-10-27T02:09:02.053" UserId="2509" Text="SmartFox Server stopping after brief idle time.  How to keep connection open?" />
  <row Id="9632" PostHistoryTypeId="3" PostId="4873" RevisionGUID="117fbc6d-0fa8-4ebe-8e28-1b429ab38972" CreationDate="2010-10-27T02:09:02.053" UserId="2509" Text="&lt;android&gt;" />
  <row Id="9633" PostHistoryTypeId="2" PostId="4874" RevisionGUID="678ccc49-2497-4a9c-91f5-adc1d1e1efd0" CreationDate="2010-10-27T03:02:55.310" UserId="1677" Text="There are Objects and Actions (Interactions). Callback for interacting can be selected via [multiple dispatch][1] (multimethods).&#xD;&#xA;&#xD;&#xA;For example, Action: *&quot;Look at A&quot;* is selected by Action &quot;Look at&quot; and Object A (double dispatch).&#xD;&#xA;&#xD;&#xA;Action: *&quot;Mix A and B&quot;* is selected by Action &quot;Look at&quot; and Object A and Object B (3 arguments).&#xD;&#xA;&#xD;&#xA;Read *Item 31 of Scott Meyers's book &quot;More Effective C++&quot;* and [*&quot;Modern C++ design&quot; by Andrei Alexandrescu*][2], Chapter 11, for different double dispatcher implementations in C++. Another [article][3].&#xD;&#xA;&#xD;&#xA;Example of usage:&#xD;&#xA;&#xD;&#xA;    Dispatcher2 action_mix;&#xD;&#xA;    action_mix.registerInteraction&lt;ObjectType1, ObjectType2&gt;(callback_1_2);&#xD;&#xA;    action_mix.registerDefaultInteraction(callback_default); // for unregistered pairs&#xD;&#xA;    //...&#xD;&#xA;    action_mix.call(object1, object2);&#xD;&#xA;    &#xD;&#xA;Another example:&#xD;&#xA;&#xD;&#xA;    Dispatcher2&lt;BaseActionType, BaseObjectType&gt; any_action_to_any_obj;&#xD;&#xA;    any_action_to_any_obj.registerInteraction&lt;ActionType1, ObjectType1&gt;(callback_a1_t1);&#xD;&#xA;    //...&#xD;&#xA;    any_action_to_any_obj.call(action, object);&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Multiple_dispatch&#xD;&#xA;  [2]: http://books.google.lv/books?id=aJ1av7UFBPwC&amp;lpg=PA295&amp;ots=YQiLXrVl51&amp;dq=multiple%20dispatch%20alexandrescu&#xD;&#xA;  [3]: http://www.drdobbs.com/184405527&#xD;&#xA;" />
  <row Id="9634" PostHistoryTypeId="2" PostId="4875" RevisionGUID="ac66e491-5d22-431d-b1ce-539dc9327b05" CreationDate="2010-10-27T03:40:39.220" UserId="2821" Text="There are dozens of game engines out there. The two that pop into my mind are Unreal engine and Source.&#xD;&#xA;&#xD;&#xA;As for languages, that depends on the task. The rendering and other performance critical parts are usually done in one of native languages. C++ for example. &#xD;&#xA;But it is common to use some dynamic language to define scripts because this code is more likely to change and is often written by less 'hardcore' programmers :-)&#xD;&#xA;Lua, Python, Ruby - they all can be used here.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9635" PostHistoryTypeId="2" PostId="4876" RevisionGUID="beb217ec-f8a4-4644-8fae-f90b756ee280" CreationDate="2010-10-27T03:53:20.610" UserId="2821" Text="I want to create a simple Flash game. Let's say, it's about soccer hooligans. I would need the characters to walk around the isometric landscape, drink, fight or whatever it is they do.&#xD;&#xA;&#xD;&#xA;Now, how do I create those characters? I imagine it could be possible just to draw a separate movie clip for every action for 8 different directions (will 8 be enough?). But this seems like a little bit of work, to say the least.&#xD;&#xA;&#xD;&#xA;Some people recommend creating and animating the models in some 3D editor (3DS Max, for instance). This looks better. But, how do I use them? There's no 'native' 3D in Flash (yet). And I don't really feel like being involved with one of the flash 3D engines (some have overly sophisticated APIs, others have bugs, the rest are not maintained anymore).&#xD;&#xA;&#xD;&#xA;I could pre-render the animations to frame sequences and then just download them, right? But that makes a HUGE chunk of data.&#xD;&#xA;&#xD;&#xA;Any thoughts or advices?" />
  <row Id="9636" PostHistoryTypeId="1" PostId="4876" RevisionGUID="beb217ec-f8a4-4644-8fae-f90b756ee280" CreationDate="2010-10-27T03:53:20.610" UserId="2821" Text="3D models in 2D world" />
  <row Id="9637" PostHistoryTypeId="3" PostId="4876" RevisionGUID="beb217ec-f8a4-4644-8fae-f90b756ee280" CreationDate="2010-10-27T03:53:20.610" UserId="2821" Text="&lt;3d&gt;&lt;flash&gt;&lt;models&gt;" />
  <row Id="9638" PostHistoryTypeId="2" PostId="4877" RevisionGUID="91100e80-5efc-4030-a1f0-1ed975c5c5b0" CreationDate="2010-10-27T04:33:56.847" UserId="631" Text="A few links for EVE Online:&#xD;&#xA;&#xD;&#xA;http://www.eveonline.com/devblog.asp?a=blog&amp;bid=663  &#xD;&#xA;http://www.eveonline.com/devblog.asp?a=blog&amp;bid=653  &#xD;&#xA;http://www.eveonline.com/devblog.asp?a=blog&amp;bid=632   &#xD;&#xA;http://www.eveonline.com/devblog.asp?a=blog&amp;bid=589&#xD;&#xA;&#xD;&#xA;Basically, EVE Online runs on SQL Server 2005 and some other Microsoft software.  The client backbone is mostly written in Python however (Stackless Python to be exact, from what I can remember) and some C++ most likely.&#xD;&#xA;&#xD;&#xA;As for World of Warcraft, I do know they use Lua for all of the client GUI stuff, but aside from that I don't think they use Lua for anything else.  C++ is likely what is used.&#xD;&#xA;WoW, I would think also uses some Windows boxes but it seems likely that they would have some other types of boxes specific to certain tasks that may not be Windows-based at all.&#xD;&#xA;&#xD;&#xA;Not a lot of info, but hope it helps.&#xD;&#xA;&#xD;&#xA;A lot of these games seperate servers based on functionality, so they would have a database server that is only responsible for storing objects/whatever and the servers that actually run the game world (validate player actions, etc.)." />
  <row Id="9639" PostHistoryTypeId="2" PostId="4878" RevisionGUID="2fe3a15e-2ada-4215-b3f2-884c2419d6fd" CreationDate="2010-10-27T04:49:59.113" UserId="560" Text="Is this a true isometric game? If so I question the value of using real 3D models since the idea of isometric engines is to create the illusion of 3D without it being proper 3D. Or by 3D models did you mean just the appearance of 3D? In that case 4 different directions should be enough (up, down, left, right) which is not too much work. You could maybe look at reusing some of the animations by scaling them with the Flash IDE transformation tools (so down could scale the down animation into the left animation, but they will look like flat pieces of paper). I would avoid pre-rendering the animations as frame sequences unless you could really keep the size down to something reasonable.&#xD;&#xA;&#xD;&#xA;However, maybe you meant a 3D game with the camera aligned in the sky facing down towards the ground (like with SC2). In that case you will need to use one of the 3D engines out there. Papervision has a nice API and plenty of documentation. Some footage of the next gen 3D apis for Flash have been released recently and look promising http://www.youtube.com/watch?v=tgwi0lWgX8w" />
  <row Id="9640" PostHistoryTypeId="5" PostId="4878" RevisionGUID="1dbb0d54-20e9-477f-b8dc-9851b3ba3372" CreationDate="2010-10-27T04:55:01.517" UserId="560" Comment="added 12 characters in body" Text="Is this a true isometric game? If so I question the value of using real 3D models since the idea of isometric engines is to create the illusion of 3D without it being proper 3D. Or by 3D models did you mean just the appearance of 3D? In that case 4 different directions should be enough (up, down, left, right) which is not too much work. You could maybe look at reusing some of the animations by scaling them with the Flash IDE transformation tools (so scale the down animation into the left animation, but they will look like flat pieces of paper which you may not want). I would avoid pre-rendering the animations as frame sequences unless you could really keep the size down to something reasonable.&#xD;&#xA;&#xD;&#xA;However, maybe you meant a 3D game with the camera aligned in the sky facing down towards the ground (like with SC2). In that case you will need to use one of the 3D engines out there. Papervision has a nice API and plenty of documentation. Some footage of the next gen 3D apis for Flash have been released recently and look promising http://www.youtube.com/watch?v=tgwi0lWgX8w" />
  <row Id="9641" PostHistoryTypeId="2" PostId="4879" RevisionGUID="9ebefab1-fb6e-4a50-a7e9-8668cf9c281b" CreationDate="2010-10-27T07:11:17.237" UserId="20" Text="I would definitely go for the 3D modeling and pre-rendering. Even drawing your Sprites from 4 sides is going to be a lot of work and if you have several similar looking characters, you'll probably do that work multiple times.&#xD;&#xA;&#xD;&#xA;When using a 3D modeling tool, it's going to take some time to get that base-model done, but after that you can easily create multiple characters from the same base-model by changing textures or add an item like a &quot;hat&quot; or other accessories.&#xD;&#xA;&#xD;&#xA;I don't know if your sprites are animated, but if yes, that will also be easier when using 3D.&#xD;&#xA;&#xD;&#xA;As for the workflow, I suggest you animate your character in a 3D tool and place (orthographic) cameras for all directions. Then you render the animation with every camera.&#xD;&#xA;&#xD;&#xA;Once you got the rendered frames, you can combine them to a sprite-sheet using this technique: http://gamedev.stackexchange.com/questions/335/what-is-a-good-tool-for-producing-animated-sprites/385#385&#xD;&#xA;&#xD;&#xA;I don't know about your file-size constraints, but these sprite-sheets shouldn't get very large in terms of file-size. If they do, you could still render the animations with less frames (chunky movement) or change them to a indexed-palette (works best if your background tiles all have roughly the same color).&#xD;&#xA;" />
  <row Id="9642" PostHistoryTypeId="2" PostId="4880" RevisionGUID="5c406032-6c87-4121-801e-f22e26aab46f" CreationDate="2010-10-27T07:36:31.113" UserId="2710" Text="I'm not quite sure about EVE and WoW, but I've seen MMO games use C++, C#, Java and even PHP for server (the latter only for simple browser-based games, though). &#xD;&#xA;&#xD;&#xA;Client is most often written in C++ (or Flash if it's a browser-based game); I've worked with a .NET-based client once (C# mixed with C++/CLI). &#xD;&#xA;&#xD;&#xA;And almost always some kind of dynamic scripting language is used to facilitate developing &quot;designer&quot; content - e.g. abilities, quests, etc - things that change often, and can be changed by game designers as opposed to programmers." />
  <row Id="9643" PostHistoryTypeId="2" PostId="4881" RevisionGUID="6e2de211-2095-4a64-9a3a-8ab82319c9b8" CreationDate="2010-10-27T07:54:15.733" UserId="395" Text="Most companies use C++. Eve is an outlier, the core graphics engine is in C++, while the game logic is, as others have noted, in Python. CCP also makes a lot of contributions to Stackless itself, which is in C for the most part. WoW is C++ for the game itself, though the UI is scripted in Lua. Cryptic (Champions Online, Star Trek Online) uses plain C, but that it is somewhat rare in the industry. Java pops up every now and then, ex. Runescape, but I can't think of anything AAA. Disney has used Panda3D (a Python-based engine written in C) for a number of their MMOs, but as with Eve thats uncommon.&#xD;&#xA;&#xD;&#xA;Overall it seems like C++ for the game logic and engine, with Lua for client scripting is the closest you will find to a standard.&#xD;&#xA;&#xD;&#xA;As for the web side, it is all over. We (Cryptic) use a mix of PHP, C, and Python (Django) for various bits. CCP uses ASP for the website itself, and Python to power the backend (slowly drifting together though). WAR and LOTRO both use PHP for their site, though it isn't clear what particular frameworks they are using (if any).&#xD;&#xA;&#xD;&#xA;You mentioned that MMOs work via web API calls though, which isn't the case. An HTTP-based protocol would be far too inefficient, and HTTP is not designed for long-running connections. Pretty much all MMOs (that aren't web based like Kingdom of Loathing or Urban Dead) use custom servers and custom protocols. The clients are highly stateful, doing something like bringing up an inventory UI isn't going to fire off a request to the server since all that information is cached on the client. " />
  <row Id="9646" PostHistoryTypeId="2" PostId="4883" RevisionGUID="e07d0f54-21c1-41c7-9908-edf7cf3bbe79" CreationDate="2010-10-27T13:36:46.127" UserId="2566" Text="Irrlicht uses namespaces, a C++ feature not available in Objective-C:&#xD;&#xA;&#xD;&#xA;    /*&#xD;&#xA;    In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if&#xD;&#xA;    you want to use a class of the engine, you have to write irr:: before the name&#xD;&#xA;    of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice.&#xD;&#xA;    To get rid of the irr:: in front of the name of every class, we tell the&#xD;&#xA;    compiler that we use that namespace from now on, and we will not have to write&#xD;&#xA;    irr:: anymore.&#xD;&#xA;    */&#xD;&#xA;    using namespace irr;&#xD;&#xA;&#xD;&#xA;How can I still use Objecive-C with Irrlicht? Thanks." />
  <row Id="9647" PostHistoryTypeId="1" PostId="4883" RevisionGUID="e07d0f54-21c1-41c7-9908-edf7cf3bbe79" CreationDate="2010-10-27T13:36:46.127" UserId="2566" Text="How to use Irrlicht with Objective-C?" />
  <row Id="9648" PostHistoryTypeId="3" PostId="4883" RevisionGUID="e07d0f54-21c1-41c7-9908-edf7cf3bbe79" CreationDate="2010-10-27T13:36:46.127" UserId="2566" Text="&lt;c++&gt;&lt;objective-c&gt;" />
  <row Id="9649" PostHistoryTypeId="2" PostId="4884" RevisionGUID="7613edba-e41e-4c2c-9099-b2f2f4a77438" CreationDate="2010-10-27T13:52:02.853" UserId="189" Text="There is [a forum thread][2] in which some people are trying to get the OpenGL ES branch to compile for iPhone; there are some instructions there, so you might have success with it in Objective-C.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://maniacdev.com/2009/08/the-open-source-iphone-game-engine-comparison/&#xD;&#xA;  [2]: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=34035&amp;postdays=0&amp;postorder=asc&amp;start=0" />
  <row Id="9650" PostHistoryTypeId="5" PostId="4884" RevisionGUID="a853931c-ef6b-4039-a4dc-2d1774042c2b" CreationDate="2010-10-27T13:58:01.353" UserId="189" Comment="added 303 characters in body" Text="There is [a forum thread][1] in which some people are trying to get the OpenGL ES branch to compile for iPhone; there are some instructions there, so you might have success with it in Objective-C.&#xD;&#xA;&#xD;&#xA;Here is [another thread][2] which covers some Objective-C Irrlicht problems.&#xD;&#xA;&#xD;&#xA;At this point it's probably blatantly obvious I'm just searching around to try and help you. If these didn't help I'll just delete my answer, since I am obviously not (yet) a Mac guy. :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=34035&amp;postdays=0&amp;postorder=asc&amp;start=0&#xD;&#xA;  [2]: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=38678&amp;highlight=&amp;sid=226a7d32cb83f2c6b6195554c40a136c" />
  <row Id="9651" PostHistoryTypeId="2" PostId="4885" RevisionGUID="604b8360-81aa-4d47-b696-ad573c568d12" CreationDate="2010-10-27T14:39:37.807" UserId="2301" Text="I think with celebrities you would be fine(as long as its not slander). It would be safer to use names that are close, if you are using them as a character in a game. &#xD;&#xA;But for board games you should be alright." />
  <row Id="9652" PostHistoryTypeId="2" PostId="4886" RevisionGUID="91ece178-7eea-4a8c-a3eb-7ea213a078ec" CreationDate="2010-10-27T15:36:24.030" UserId="2634" Text="Although it may appear to be 3D, 'hack and slash' games (like Diablo) are really 2D games. Often the components (the sprites) are created in a 3D modeling tool, but only the 2D renders of the sprites are used in the actual game.  This type of game tends to be much more about the data interactions (the map, the player, the treasures, and the monsters) than about the visual representation.&#xD;&#xA;&#xD;&#xA;2D games tend to not use dynamic animation (skeletons and deformations.) Instead, the animations are often created in a 3D package and saved as a library of images.  The sprite then has a lookup table of images (either stored as a single massive sprite sheet or as a series of individual images.) During the game animation phase, the sprite determines what image to display based on the sprite's current state. For example, I have an animation of a cow (http://www.aharrisbooks.net/pythonGame/ch08/cow.py) that walks in eight direction. Each direction is an animation of ten frames.  &#xD;&#xA;&#xD;&#xA;(more examples in Python at http://wwww.aharrisbooks.net/pythonGame)&#xD;&#xA;&#xD;&#xA;The sample program checks the direction and frame, then displays the appropriate image. My example is written in Python, but the language is not important; the idea remains the same.&#xD;&#xA;&#xD;&#xA;The visual aspects of being in different states (combat, wounded, etc) would be handled by simply adding more animations to the stack.&#xD;&#xA;&#xD;&#xA;However, the more difficult aspects of these things are the data aspects. For example, how is terrain managed. I'd likely use a variation of the A* algorithm to pick a path between where the sprite is and where it wants to go, and I'd add some sort of weight to each node to depict the difficulty of that terrain. (roads would have a very light weight, mountains and oceans would be very 'heavy')  &#xD;&#xA;&#xD;&#xA;I probably wouldn't worry about soft-body dynamics in a 2D engine.  That can be added later, but it's not key to the functioning of the game.&#xD;&#xA;&#xD;&#xA;You could certainly build a 'hack and slash' in 3D.  However, the added challenges of 3D modeling make it harder to concentrate on the gameplay mechanics which often attract players to this kind of game.&#xD;&#xA;&#xD;&#xA;Best of luck to you...." />
  <row Id="9653" PostHistoryTypeId="2" PostId="4887" RevisionGUID="6afe187a-99d7-43e5-8e17-cf37fe15a5fb" CreationDate="2010-10-27T15:59:22.307" UserId="1829" Text="I can understand when to use lists, but I don't understand when it is better to use vectors than using lists in video games: when it is better to have fast random access ?&#xD;&#xA;&#xD;&#xA;(And I understand why it's faster to insert/delete in lists because it just removes/adds pointers, but it still has to find the corresponding item...)" />
  <row Id="9654" PostHistoryTypeId="1" PostId="4887" RevisionGUID="6afe187a-99d7-43e5-8e17-cf37fe15a5fb" CreationDate="2010-10-27T15:59:22.307" UserId="1829" Text="When should vector/list be used ?" />
  <row Id="9655" PostHistoryTypeId="3" PostId="4887" RevisionGUID="6afe187a-99d7-43e5-8e17-cf37fe15a5fb" CreationDate="2010-10-27T15:59:22.307" UserId="1829" Text="&lt;c++&gt;&lt;vector&gt;&lt;list&gt;" />
  <row Id="9656" PostHistoryTypeId="2" PostId="4888" RevisionGUID="cca8d3f7-8f47-442f-9cf3-95d8d8792499" CreationDate="2010-10-27T16:06:08.947" UserId="51" Text="My rule of thumb, and I'm sure there will be debate on this, is to *never* use lists (unless you need to very, very frequently remove things from the middle of large lists).&#xD;&#xA;&#xD;&#xA;The speed you'll gain by having all your elements in your container in contiguous memory (and therefore more cache-friendly) is worth the offset of the additional costs of adding/removing/resizing the vector." />
  <row Id="9657" PostHistoryTypeId="2" PostId="4889" RevisionGUID="fd3d99d9-86cd-4995-8ab2-39eea7235644" CreationDate="2010-10-27T16:31:37.023" UserId="20" Text="Usually lists are used for structures like queues where there are lots of append and remove operations. **Example:** An ever changing list of entities that should be updated. The list itself only contains entities on screen and therefore changes frequently.&#xD;&#xA;&#xD;&#xA;Vectors (or arrays) are better suited for a collection that doesn't change that much and where you need fast access to individual items within the collection. **Example:** A tile-map where you have to lookup tiles at a given index.&#xD;&#xA;&#xD;&#xA;Tetrads opinion might be true, but it depends on the programming language that is used. I see that you tagged your question `c++`, but I tried to give an answer that isn't language-specific." />
  <row Id="9658" PostHistoryTypeId="2" PostId="4890" RevisionGUID="1c875f91-250b-4e6c-89cf-7bd44747d1c2" CreationDate="2010-10-27T16:32:11.830" UserId="2447" Text="  Use a list when iterator invalidation caused by modifying the middle of your data structure is going to cause a problem, or you need to keep your elements sorted so the swap and pop trick for quick middle collection deletes won't work and you have a large number of mid collection deletes.&#xD;&#xA;&#xD;&#xA;You may also want to consider using a Deque.  It has similar performance characteristics to a vector but doesn't have vector's need for contiguous memory, and is a little more flexable." />
  <row Id="9660" PostHistoryTypeId="2" PostId="4892" RevisionGUID="90579485-27af-45c4-884d-6839fa30369f" CreationDate="2010-10-27T16:45:47.087" UserId="2447" Text="Mono supports iphone (mono touch) and android (mono droid) I am not sure how well game development would be supported through either of those.  You would also be able to support WP7 as well.  Sure the platform interface code would be different but you should be able to use 80- 90% of your code on all three platforms." />
  <row Id="9661" PostHistoryTypeId="2" PostId="4893" RevisionGUID="691c3480-8474-4a6c-afde-8b1b417eaa90" CreationDate="2010-10-27T16:46:54.810" UserId="889" Text="Your choice should reflect your needs. All the elements of the vectors are continous in memory and lists has pointers to next / previous elements so they each have their advantage / disavantages :&#xD;&#xA;&#xD;&#xA;Lists :&#xD;&#xA;&#xD;&#xA;- Each elements takes 2 integers to point previous and next elements, so most commonly, that's 8 bytes more for each elements in your list&#xD;&#xA;- Insert is linear in time : O(n)&#xD;&#xA;- Remove is a constant operation : O(1)&#xD;&#xA;- Access the x element is linear in time : O(n)&#xD;&#xA;&#xD;&#xA;Vectors :&#xD;&#xA;&#xD;&#xA;- Needs less memory (no pointers to other elements, it's a simple math algorithm)&#xD;&#xA;- Remove is linear in time : O(n)&#xD;&#xA;- Access the x element is constant : O(1) (That's because the elements are continious in memory so it's a simple math operation vectorPtr + ( x * bytesOfTheType ) )&#xD;&#xA;- Insert can be in linear time, but most commonly, it's a constant operation : O(1) (That's because the vector in an array but always reserve 2 times it's capacity when the array is full so array copy is not frequent )&#xD;&#xA;&#xD;&#xA;So list is better when you program needs to add and remove elements frequently, but never access (or rarely access) a particular element without the need of the others before. The vector should be used for better access time, but lacks effeciency when you need to remove or add elements.&#xD;&#xA;&#xD;&#xA;Check this post on stackoverflow, it present a really nice graph with basic questions on your needs that drives you to a specific container depending on your answers :&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/366432/extending-stdlist&#xD;&#xA;" />
  <row Id="9662" PostHistoryTypeId="2" PostId="4894" RevisionGUID="fbb36b93-6949-4ea1-81f8-318aa973bfb4" CreationDate="2010-10-27T17:37:47.320" UserId="2843" Text="Almost all big titles that I have played require you to install the MSVC runtime. There have been numerous questions about &quot;statically vs. dynamically linked CRT&quot; on StackOverflow, the reasons for dynamic CRT generally boil down to:&#xD;&#xA;&#xD;&#xA;1. Reduced memory usage if other programs are using the same libs&#xD;&#xA;2. Can update the libraries independently.&#xD;&#xA;&#xD;&#xA;But I wonder, how often are these reasons related to game development?&#xD;&#xA;&#xD;&#xA;- Most games spend at least a hundred MB of RAM and it's not like saving some KBs really matter. Besides, games are supposed to capture the user's sole attention so he'll probably not be running other programs to share the CRT.&#xD;&#xA;- I don't think I have seen a game needing to upgrade its CRT in its life-cycle.&#xD;&#xA;&#xD;&#xA;So, why don't games statically link their CRT so they can reduce the extra step of installing MSVC runtime?&#xD;&#xA;" />
  <row Id="9663" PostHistoryTypeId="1" PostId="4894" RevisionGUID="fbb36b93-6949-4ea1-81f8-318aa973bfb4" CreationDate="2010-10-27T17:37:47.320" UserId="2843" Text="Why do games dynamically link to the CRT?" />
  <row Id="9664" PostHistoryTypeId="3" PostId="4894" RevisionGUID="fbb36b93-6949-4ea1-81f8-318aa973bfb4" CreationDate="2010-10-27T17:37:47.320" UserId="2843" Text="&lt;c++&gt;" />
  <row Id="9665" PostHistoryTypeId="2" PostId="4895" RevisionGUID="bb1a1c1d-e56f-4f9b-b9a9-ef314b6e7f78" CreationDate="2010-10-27T17:44:39.440" UserId="1829" Text="If you want to make a MMORPG like WoW, of course it will be long and hard, but the main reasons for that are the content making, the server/network knowledge required to set up a smooth game, and also a team and a good set of tools to maintain the whole game running with as few problem as possible.&#xD;&#xA;&#xD;&#xA;Programming a game like WoW is of course a complex work, but the most problematic challenge of such a game is to think about a good architecture for it, in terms of &quot;which data is where, where events happens on which machine would it be a client or a server and what data can be omitted and what cannot&quot; etc, and at the end, benchmark the system to see how a server can handle a certain quantity of players, and when it start to be &quot;laggy&quot;.&#xD;&#xA;&#xD;&#xA;Technically speaking, WoW is a good product, but don't forget it is very much optimized in term of network and server load.&#xD;&#xA;&#xD;&#xA;Now if you want to make a MMORPG, you have to ask yourself if you would make a game as massive as WoW: it is impossible to make content as good as the one WoW features: it's coherent, artistically beautiful, and has not too many polygons.&#xD;&#xA;&#xD;&#xA;Personally I wouldn't think about making such good content: you have good artists or you don't have them.&#xD;&#xA;I think the bigger problem in a MMORPG like WoW is the bandwidth: 5000 players at the same time costs a lot of bandwidth, and I'm sure some day when the internet is a little faster, the server will be able to manage less traffic thanks to p2p protocols... but that's just an idea..." />
  <row Id="9666" PostHistoryTypeId="2" PostId="4896" RevisionGUID="7dc3a703-0fc4-4d6b-9ede-daf2ead684e3" CreationDate="2010-10-27T17:46:44.623" UserId="2821" Text="Doesn't it come preinstalled with windows? I am not a full-time gamer, but I don't remember a single time when I had to install/update MSVC runtime. " />
  <row Id="9667" PostHistoryTypeId="6" PostId="4217" RevisionGUID="1d033fa9-7a6b-423c-9977-ccc0d4fecbc5" CreationDate="2010-10-27T17:48:45.193" UserId="120" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;windows-phone-7&gt;" />
  <row Id="9668" PostHistoryTypeId="6" PostId="1684" RevisionGUID="fa04be88-3f7a-4353-84c5-7c30962be411" CreationDate="2010-10-27T17:53:40.557" UserId="120" Comment="edited tags" Text="&lt;2d&gt;&lt;xna&gt;&lt;engine&gt;" />
  <row Id="9670" PostHistoryTypeId="5" PostId="4888" RevisionGUID="e066bd51-c444-462b-8c9c-40359b9c7d4b" CreationDate="2010-10-27T18:03:25.580" UserId="51" Comment="added 359 characters in body" Text="My rule of thumb, and I'm sure there will be debate on this, is to *never* use lists (unless you need to very, very frequently remove things from the middle of large lists).&#xD;&#xA;&#xD;&#xA;The speed you'll gain by having all your elements in your container in contiguous memory (and therefore more cache-friendly) is worth the offset of the additional costs of adding/removing/resizing the vector.&#xD;&#xA;&#xD;&#xA;Edit: Just to clarify a bit more, of course it should go without saying that any kind of &quot;which is faster&quot; question should be tested on whatever platform with whatever data sets are pertinent to your particular needs.  If I just need a collection of elements that isn't super performance critical I just use vector unless there's a good reason *not* to.  " />
  <row Id="9671" PostHistoryTypeId="5" PostId="4888" RevisionGUID="33f6f6d8-4005-496c-b458-0ec76aa4f7c5" CreationDate="2010-10-27T18:09:44.817" UserId="51" Comment="removed performance note" Text="My rule of thumb, and I'm sure there will be debate on this, is to *never* use lists (unless you need to very, very frequently remove things from the middle of large lists).&#xD;&#xA;&#xD;&#xA;The speed you'll gain by having all your elements in your container in contiguous memory (and therefore more cache-friendly) is worth the offset of the additional costs of adding/removing/resizing the vector.&#xD;&#xA;&#xD;&#xA;Edit: Just to clarify a bit more, of course it should go without saying that any kind of &quot;which is faster&quot; question should be tested on whatever platform with whatever data sets are pertinent to your particular needs.  If I just need a collection of elements I just use vector (or deque, which is almost the same thing) unless there's a good reason *not* to.  " />
  <row Id="9672" PostHistoryTypeId="2" PostId="4898" RevisionGUID="2afdc6d0-4b47-41c5-a6cb-c984484384e5" CreationDate="2010-10-27T18:32:33.827" UserId="141" Text="The component based game programming paradigm is becoming much more popular. I was wondering, are there any projects out there that offer a reusable component framework? In any language, I guess I don't care about that. It's not for my own project, I'm just curious.&#xD;&#xA;&#xD;&#xA;Specifically I mean are there projects that include a base `Entity` class, a base `Component` class, and maybe some standard components? It would then be much easier starting a game if you didn't want to reinvent the wheel, or maybe you want a `GraphicsComponent` that does sprites with Direct3D, but you figure it's already been done a dozen times.&#xD;&#xA;&#xD;&#xA;A quick Googling turns up [Rusher][1]. Has anyone heard of this / does anyone use it?&#xD;&#xA;If there are no popular ones, then why not? Is it too difficult to make something like this reusable, and they need heavy customization? In my own implementation I found a lot of boilerplate that could be shoved into a framework.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cjcat.blogspot.com/2010/02/rusher-game-framework.html" />
  <row Id="9673" PostHistoryTypeId="1" PostId="4898" RevisionGUID="2afdc6d0-4b47-41c5-a6cb-c984484384e5" CreationDate="2010-10-27T18:32:33.827" UserId="141" Text="Are there existing FOSS component-based frameworks?" />
  <row Id="9674" PostHistoryTypeId="3" PostId="4898" RevisionGUID="2afdc6d0-4b47-41c5-a6cb-c984484384e5" CreationDate="2010-10-27T18:32:33.827" UserId="141" Text="&lt;framework&gt;&lt;component-based&gt;" />
  <row Id="9675" PostHistoryTypeId="5" PostId="4865" RevisionGUID="701d92b6-230b-45db-bd8a-a87a065929dd" CreationDate="2010-10-27T18:37:17.727" UserId="1232" Comment="changed 'char' to 'chr' (char should not be used in pseudocode ;-D)" Text="If you consider your character's foot as alway under the character by a certain distance, and if you're not moving away from the surface then your character is on the ground.&#xD;&#xA;&#xD;&#xA;In rough pseudo-code:&#xD;&#xA;&lt;code&gt;&lt;pre&gt;&#xD;&#xA;bool isOnGround(Character&amp; chr)&#xD;&#xA;{&#xD;&#xA;   // down vector is opposite from your characters current up vector.&#xD;&#xA;   // if you want to support wall jumps, animate the vecToFoot as appropriate.&#xD;&#xA;   vec vecToFoot = -chr.up * chr.footDistanceFromCentre;&#xD;&#xA;&#xD;&#xA;   // if feet are moving away from any surface, can't be on the ground&#xD;&#xA;   if (dot(chr.velocity, down) &lt; 0.0f)&#xD;&#xA;     return false;&#xD;&#xA;&#xD;&#xA;   // generate line from character centre to the foot position&#xD;&#xA;   vec linePos0 = chr.position;&#xD;&#xA;   vec linePos1 = chr.position + vecToFoot;&#xD;&#xA;&#xD;&#xA;   // test line against world. If it returns a hit surface, we're on the ground&#xD;&#xA;   if (testLineAgainstWorld(line0, line1, &amp;surface)&#xD;&#xA;     return true;&#xD;&#xA;&#xD;&#xA;   return false;&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;" />
  <row Id="9677" PostHistoryTypeId="2" PostId="4899" RevisionGUID="29d6d7db-4099-4d45-a4fc-805cf8f91a59" CreationDate="2010-10-27T20:28:02.720" UserId="119" Text="I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff in XNA. So should I use this stuff? Should my Entity class extend game component/drawable game component? I'm sure it will be quicker just to port my AS3 code, but I thought this built-in stuff may have some advantages?" />
  <row Id="9678" PostHistoryTypeId="1" PostId="4899" RevisionGUID="29d6d7db-4099-4d45-a4fc-805cf8f91a59" CreationDate="2010-10-27T20:28:02.720" UserId="119" Text="In XNA, should I use the built-in game component classes?" />
  <row Id="9679" PostHistoryTypeId="3" PostId="4899" RevisionGUID="29d6d7db-4099-4d45-a4fc-805cf8f91a59" CreationDate="2010-10-27T20:28:02.720" UserId="119" Text="&lt;xna&gt;&lt;architecture&gt;&lt;framework&gt;&lt;game-component&gt;" />
  <row Id="9680" PostHistoryTypeId="2" PostId="4900" RevisionGUID="5885a0c6-767b-411d-bfc6-7220e3702360" CreationDate="2010-10-27T20:49:04.980" UserId="2491" Text="I suppose it depends entirely on how you want to do things.  I can say that most of the XNA tutorials and examples I've seen use them sparingly.  Typically I see the built in GameComponent/DrawableComponent types being used as the base class for services, and then those services call customized draw/update methods on the child-objects they manage.&#xD;&#xA;&#xD;&#xA;The main advantage you get from them is that if you add them to the Game.Components collection, the game will call their update, draw, and initialize methods during that phase of the game's cycle.  You can get the same effect by just putting your own code into the Game's overrides for those methods and managing object collections yourself." />
  <row Id="9681" PostHistoryTypeId="5" PostId="4899" RevisionGUID="49dda9ee-cb38-4eaf-ab8a-f7ccbf436a0d" CreationDate="2010-10-27T20:56:04.733" UserId="119" Comment="added 109 characters in body" Text="I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff in XNA. So should I use this stuff? Should my Entity class extend game component/drawable game component? I'm sure it will be quicker just to port my AS3 code, but I thought this built-in stuff may have some advantages?&#xD;&#xA;&#xD;&#xA;UPDATE: I decided not to use them. It doesn't seem that they are meant to be used in the way I described." />
  <row Id="9682" PostHistoryTypeId="2" PostId="4901" RevisionGUID="b45ccee2-beb0-4484-99d9-0c25e7d4cdb3" CreationDate="2010-10-27T21:02:15.910" UserId="119" Text="I use a lot of 2D vectors in my Flash games - basically all velocities, positions etc I store in this way. My Vector2D class has lots of built in functions for rotation, dotproduct, projectOnto etc. The native Vector2 class doesn't seem to have half of this stuff, but it is used in a lot of places. The Vector3 has all this stuff, but has an extra dimension I don't need. So should I use either of the built in ones or port my AS3 class? Or should I try to extend Vector2 and add the extra functionality I need. Could that cause any problems?" />
  <row Id="9683" PostHistoryTypeId="1" PostId="4901" RevisionGUID="b45ccee2-beb0-4484-99d9-0c25e7d4cdb3" CreationDate="2010-10-27T21:02:15.910" UserId="119" Text="For a 2D XNA game, should I use the built in Vector2 or Vector3 or port my own class from ActionScript?" />
  <row Id="9684" PostHistoryTypeId="3" PostId="4901" RevisionGUID="b45ccee2-beb0-4484-99d9-0c25e7d4cdb3" CreationDate="2010-10-27T21:02:15.910" UserId="119" Text="&lt;xna&gt;&lt;vector&gt;" />
  <row Id="9685" PostHistoryTypeId="2" PostId="4902" RevisionGUID="202721af-76c8-4dab-8255-bad38a166e8a" CreationDate="2010-10-27T21:13:17.170" UserId="2332" Text="The XNA Vector classes also have a hell of a lot of functionality, and the Matrix functions take in Vector classes specific to XNA, so personally, I'd probably use the XNA ones. Why reinvent the wheel?" />
  <row Id="9686" PostHistoryTypeId="2" PostId="4903" RevisionGUID="b23eb448-70f0-49e5-a20c-28b03b10307c" CreationDate="2010-10-27T21:14:15.423" UserDisplayName="xnaCCCoder" Text="I making now engine for my game, it is based on component system ( every game object is a set of some components like: render, physics, ai etc ). I want to make my game extensible, i now how to make plugin system with .net but how to make game able to add at runtime new resurces from plugins ( like graphics, sounds, etc ) ? And how plugin that store content can look ? I want to make simple system like Total Annihilation have, to be able to add new units.  " />
  <row Id="9687" PostHistoryTypeId="1" PostId="4903" RevisionGUID="b23eb448-70f0-49e5-a20c-28b03b10307c" CreationDate="2010-10-27T21:14:15.423" UserDisplayName="xnaCCCoder" Text="Extensible engine in XNA" />
  <row Id="9688" PostHistoryTypeId="3" PostId="4903" RevisionGUID="b23eb448-70f0-49e5-a20c-28b03b10307c" CreationDate="2010-10-27T21:14:15.423" UserDisplayName="xnaCCCoder" Text="&lt;xna&gt;&lt;engine&gt;" />
  <row Id="9689" PostHistoryTypeId="2" PostId="4904" RevisionGUID="449b76ce-5bc5-4c7f-9b72-6a543dff6a47" CreationDate="2010-10-27T21:28:04.340" UserId="2851" Text="Good JavaScript 3d engine (here you will have 3d engine in any browser - that is really cross-platform):&#xD;&#xA;http://github.com/mrdoob/three.js/" />
  <row Id="9690" PostHistoryTypeId="2" PostId="4905" RevisionGUID="24850f05-215c-4c82-a54d-83e7e6a1b976" CreationDate="2010-10-27T22:05:21.880" UserId="189" Text="&gt; The native Vector2 class doesn't seem to have half of this stuff, but it is used in a lot of places. The Vector3 has all this stuff, but has an extra dimension I don't need.&#xD;&#xA;&#xD;&#xA;I believe you're mistaken; Vector2 and Vector3 both have extensive functionality. Note that **this functionality is exposed as static methods to the Vector2/Vector3 class**, rather than of the form `someVector.operationOn(otherVector)`. So for example, for the dot product of two `Vector2`s, you simply write `Vector2.Dot(firstVector, secondVector)`. In addition, the same set of methods has existed since XNA 2.0, so I'm certain we are not talking about different versions.&#xD;&#xA;&#xD;&#xA;Here is the list of [Vector2 Members][1] and [Vector3 Members][2] from Microsoft. The pages default to the latest XNA version, but you can view prior versions by clicking on the &quot;Other Versions&quot; dropdown at the top of the page, right under the title.&#xD;&#xA;&#xD;&#xA;You will see, though, that the class does not implement rotation and projection. Of course, the projection operation is simply `Vector2.Multiply(vecB, Vector2.Dot(vecA, vecB))` so you can write a small function for that if you use it often. For rotation, you should make use of Vector2.Transform and feed it a rotation matrix; I definitely recommend writing a function for that.&#xD;&#xA;&#xD;&#xA;Overall, I recommend using the built-in Vector2 class, and I think you'll find it suits most of your needs. The rest, like I said, are very short functions which you can port. But no need to duplicate the entire class, right? But if you feel the need to rewrite it, I don't see a strong reason why you shouldn't, as I can't see how XNA may somehow implement it better than you can.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector2_members.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector3_members.aspx" />
  <row Id="9691" PostHistoryTypeId="16" PostId="410" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-27T22:44:25.690" UserId="51" />
  <row Id="9692" PostHistoryTypeId="16" PostId="4904" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-27T22:44:25.690" UserId="51" />
  <row Id="9693" PostHistoryTypeId="16" PostId="351" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-27T22:44:25.690" UserId="51" />
  <row Id="9694" PostHistoryTypeId="2" PostId="4906" RevisionGUID="e1d65b65-26b7-4a86-8b1c-52fd368c0e5a" CreationDate="2010-10-27T22:47:55.070" UserId="2854" Text="For EVE, they gave a talk about StacklessIO on PyCon 2009: http://us.pycon.org/2009/conference/schedule/event/91/" />
  <row Id="9695" PostHistoryTypeId="2" PostId="4907" RevisionGUID="f4a2824c-5300-4cb4-8f6e-dae4f2a9df8a" CreationDate="2010-10-27T23:10:48.923" UserId="2787" Text="WoW uses Lua for all their internal scripting as well. I'm not sure if they modified the language itself, but I wouldn't doubt it so it could suit their needs. You can bet they have different tools that make it easy for their designers to modify/tweak scripts.&#xD;&#xA;This is insider information from friends of mine that are/used to be WoW devs." />
  <row Id="9696" PostHistoryTypeId="2" PostId="4908" RevisionGUID="dffe6ca3-4cfa-463f-a5bc-dc170c569354" CreationDate="2010-10-28T02:12:40.540" UserId="288" Text="You can create as many instances of `ContentManager` as you like. Just create a new instance for each plugin and set its root directory to something specific to that plugin.&#xD;&#xA;&#xD;&#xA;For example, you could organise your plugin directory like this:&#xD;&#xA;&#xD;&#xA;    Plugins&#xD;&#xA;    |&#xD;&#xA;    +- TotallyCoolPlugin&#xD;&#xA;       |&#xD;&#xA;       +- TotallyCoolPlugin.dll&#xD;&#xA;       |&#xD;&#xA;       +- Content&#xD;&#xA;          |&#xD;&#xA;          +- TotallyCoolImage.xnb&#xD;&#xA;&#xD;&#xA;Presumably your plugin will have some kind of plugin object that you can use reflection to find and instance. Tell it its base path, so then you can have it create a content manager (or something like this - it depends on your implementation). For example:&#xD;&#xA;&#xD;&#xA;    [PluginMainClass]&#xD;&#xA;    public class MyTotallyCoolPlugin : Plugin&#xD;&#xA;    {&#xD;&#xA;        public override void LoadPlugin(string basePath)&#xD;&#xA;        {&#xD;&#xA;            ContentManager content = new ContentManager();&#xD;&#xA;            content.RootDirectory = Path.Combine(basePath, @&quot;Content&quot;);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Once you have something like this working, you could expand it with other clever things. One possible example is to use &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.resourcecontentmanager.aspx&quot;&gt;`ResourceContentManager`&lt;/a&gt; to embed your content in the DLL itself. Read &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2007/06/12/embedding-content-as-resources.aspx&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;http://forums.create.msdn.com/forums/t/36049.aspx&quot;&gt;this&lt;/a&gt;." />
  <row Id="9697" PostHistoryTypeId="2" PostId="4909" RevisionGUID="12114fc0-903f-44d4-9ede-fe594a2010b3" CreationDate="2010-10-28T04:01:19.837" UserId="2821" Text="I am making a flash game that will interact heavily with the server. For quite some time already I am using 'request hashing' technique to make sure that request data hasn't been tampered with. This works pretty well. However, in this game I'd like to go a little bit further and completely hide the protocol from the observer (right now it's plain JSON).&#xD;&#xA;&#xD;&#xA;I imagine that I could zip and encrypt data (using one of symmetric algorithms). That would make it pretty unreadable by human, right (also smaller)? And SWF encryption/obfuscation should protect the encryption key (it is being done anyway).&#xD;&#xA;&#xD;&#xA;As a side benefit that will also protect dynamically loaded resources from directly saving them to disk (or copying from the cache).&#xD;&#xA;&#xD;&#xA;**Questions**:  &#xD;&#xA;* are there tools that allow you to simply dump the SWF with all its content, received and decrypted? If yes, this will render 'the side benefit' invalid.  &#xD;&#xA;* do you think it's worth it to burn all that CPU power?&#xD;&#xA;&#xD;&#xA;To support my point, I will say that I like to inspect data being exchanged between client and server. And occasionally I find a bug or two which I can use to my benefit. But then there was a game that was sending and receiving some binary data. Being a lazy attacker, I decided not to analyze further. Otherwise, who knows what I could find :-)&#xD;&#xA;&#xD;&#xA;Comments, ideas, criticism, suggestions? :-)&#xD;&#xA; " />
  <row Id="9698" PostHistoryTypeId="1" PostId="4909" RevisionGUID="12114fc0-903f-44d4-9ede-fe594a2010b3" CreationDate="2010-10-28T04:01:19.837" UserId="2821" Text="Flash &lt;=&gt; server, protocol protection" />
  <row Id="9699" PostHistoryTypeId="3" PostId="4909" RevisionGUID="12114fc0-903f-44d4-9ede-fe594a2010b3" CreationDate="2010-10-28T04:01:19.837" UserId="2821" Text="&lt;flash&gt;&lt;client-server&gt;&lt;encryption&gt;" />
  <row Id="9700" PostHistoryTypeId="2" PostId="4910" RevisionGUID="a915cbb2-986b-4ca4-96b1-24eab004e688" CreationDate="2010-10-28T04:59:36.557" UserId="962" Text="**Yes there are many tools that allow dumping of the full swf, and/or all of the actionscript.** http://www.buraks.com/asv/index.html being one of the many out there.&#xD;&#xA;&#xD;&#xA;**No, its not worth the CPU power as it will be easy to crack and design a fake program using your &quot;hidden&quot; key.** If someone is going through the trouble of hacking your game, a &quot;hidden&quot; key and data transfer protocol are going to be easy to find.&#xD;&#xA;&#xD;&#xA;Treat the client as hostile, always, and assume any protection that is in the client program will be hacked.&#xD;&#xA;&#xD;&#xA;**Design your server software to detect cheating instead of the client.** " />
  <row Id="9701" PostHistoryTypeId="2" PostId="4911" RevisionGUID="15119f3e-edfc-4c22-a7a7-a37445e662ae" CreationDate="2010-10-28T08:30:21.127" UserId="2612" Text="I'm trying to decide on how to structure my main game loop  - every example I've seen of the game loop looks a bit like this:&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        UpdateGame();&#xD;&#xA;        DrawGame();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;i.e. it ignores the menu.  Should my game loop look like this:&#xD;&#xA;&#xD;&#xA;    if (ShowMenu() == Play) {&#xD;&#xA;        PlayGame();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    PlayGame() {&#xD;&#xA;        while (true) {&#xD;&#xA;            UpdateGame();&#xD;&#xA;            DrawGame();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ShowMenu() {&#xD;&#xA;        while (true) {&#xD;&#xA;            HandleUserInput();&#xD;&#xA;            DrawMenu();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(I.e. the menu and game have separate loops), or should I structure my loop as such:&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        switch (state) {&#xD;&#xA;        case Menu:&#xD;&#xA;            MenuLoop();&#xD;&#xA;            break;&#xD;&#xA;        case Game:&#xD;&#xA;            GameLoop();&#xD;&#xA;            break;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    GameLoop() {&#xD;&#xA;        HandleUserInput();&#xD;&#xA;        DrawMenu();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MenuLoop() {&#xD;&#xA;        HandleUserInput();&#xD;&#xA;        DrawMenu();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I.e. one big outermost loop. (or does it not really matter?)&#xD;&#xA;&#xD;&#xA;For what its worth I'm using SDL / C (although I'd like to think that the question is language agnostic)&#xD;&#xA;" />
  <row Id="9702" PostHistoryTypeId="1" PostId="4911" RevisionGUID="15119f3e-edfc-4c22-a7a7-a37445e662ae" CreationDate="2010-10-28T08:30:21.127" UserId="2612" Text="How should I structure my menu / game loop?" />
  <row Id="9703" PostHistoryTypeId="3" PostId="4911" RevisionGUID="15119f3e-edfc-4c22-a7a7-a37445e662ae" CreationDate="2010-10-28T08:30:21.127" UserId="2612" Text="&lt;gameloop&gt;" />
  <row Id="9704" PostHistoryTypeId="2" PostId="4912" RevisionGUID="bf30a251-53fd-4e77-8acc-ba2055d27731" CreationDate="2010-10-28T09:22:10.730" UserId="2710" Text="The golden rule of security is &quot;always assume that your client is compromised&quot;. You're giving the client away, and no matter what you do, someone, somewhere WILL hack it. Unless no-one play your game, of course.&#xD;&#xA;&#xD;&#xA;So, encrypting protocol with a key &quot;hidden&quot; in the client is about the same as not encrypting at all. If you're worried about cheating, the best way to cope with it is check everything server-side. If you're worried about players' privacy, use safe protocol like SSL for communications. AND check everything server-side." />
  <row Id="9705" PostHistoryTypeId="2" PostId="4913" RevisionGUID="155c69b7-cace-41a4-aee9-4d23e12f0c98" CreationDate="2010-10-28T10:08:39.450" UserId="2612" Text="From having read a couple of the related questions posted by Joe I've identified that menu state and game state is often maintained through a stack of states.  For example if the user is playing the game and brings up the menu, then after navigating around a bit the game state stack might look a little like this:&#xD;&#xA;&#xD;&#xA; - Graphics menu&#xD;&#xA; - Options menu&#xD;&#xA; - Main menu&#xD;&#xA; - Playing game&#xD;&#xA;&#xD;&#xA;The game loop is then structured as single outer loop that updates the current state stack (rather than a loop for each state) - This has the added advantage of being able to cope with a far more complex menu system, for example one where multiple states are layered on top of each other, however the previous state is still visible.&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        // This example only updates the topmost state,&#xD;&#xA;        // however it might be necessary to perform processing on&#xD;&#xA;        // the other states if (for example) the menu doesn't obscure&#xD;&#xA;        // the entire screen and the game itself still needs drawing&#xD;&#xA;        Tick(GetTopmostState());&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The following questions are related to this and cover it in more detail:&#xD;&#xA;&#xD;&#xA; - [What is the best way to make a main menu system?][1]&#xD;&#xA; - [Deal with mini states in game][2]&#xD;&#xA; - [Game State 'Stack'?][3]&#xD;&#xA; - [What is a Game State?][4]&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2499/what-is-the-best-way-to-make-a-main-menu-system&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/3708/deal-with-mini-states-in-game&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/1783/game-state-stack&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/4005/what-is-a-game-state" />
  <row Id="9706" PostHistoryTypeId="2" PostId="4914" RevisionGUID="f960e5cc-f0a5-4fce-bd1a-6b8aa484ed7c" CreationDate="2010-10-28T11:01:48.077" UserId="2771" Text="What are the &quot;smallest&quot; physics components in your component-based game engine?&#xD;&#xA;&#xD;&#xA;Would it make sense to create something like Positionable, Rotatable, Movable, Collidable and combine them the way you want or is it better to use one unified component like PhysicsInteractable?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9707" PostHistoryTypeId="1" PostId="4914" RevisionGUID="f960e5cc-f0a5-4fce-bd1a-6b8aa484ed7c" CreationDate="2010-10-28T11:01:48.077" UserId="2771" Text="Fundamental physics component(s) in component-based game engine" />
  <row Id="9708" PostHistoryTypeId="3" PostId="4914" RevisionGUID="f960e5cc-f0a5-4fce-bd1a-6b8aa484ed7c" CreationDate="2010-10-28T11:01:48.077" UserId="2771" Text="&lt;engine&gt;&lt;physics&gt;&lt;component-based&gt;" />
  <row Id="9709" PostHistoryTypeId="2" PostId="4915" RevisionGUID="2926b6d4-d57f-494d-9602-84bee0e59e21" CreationDate="2010-10-28T11:24:13.247" UserId="2862" Text="I want to start off developing for my Xbox 360, and I've heard of the XNA framework that can target both the PC and Xbox. This sounds like an attractive option since my clients can use the game/app on normal computers as well.&#xD;&#xA;&#xD;&#xA;However I'm very new to the Xbox scene. Is XNA only for hobbyist development, and is it not recommended for semi-professional or corporate application development? Does XNA lack the capabilities of a C++ developed solution, or dos it badly reduce performance of a game/app running on the Xbox?&#xD;&#xA;&#xD;&#xA;Is it possible to target the Xbox using C#, and without XNA? What are the advantages?&#xD;&#xA;&#xD;&#xA;Low-level programming would be in C++ directly working with DirectX. What are the advantages?&#xD;&#xA;" />
  <row Id="9710" PostHistoryTypeId="1" PostId="4915" RevisionGUID="2926b6d4-d57f-494d-9602-84bee0e59e21" CreationDate="2010-10-28T11:24:13.247" UserId="2862" Text="Is XNA good for professional development for the Xbox 360?" />
  <row Id="9711" PostHistoryTypeId="3" PostId="4915" RevisionGUID="2926b6d4-d57f-494d-9602-84bee0e59e21" CreationDate="2010-10-28T11:24:13.247" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;" />
  <row Id="9712" PostHistoryTypeId="2" PostId="4916" RevisionGUID="f003bdf9-7060-4f94-9df3-9155ac056e3c" CreationDate="2010-10-28T12:01:47.143" UserId="2798" Text="XNA is a double-edged blade; it's relatively easy to use, but very extensible and customizable. The problem is, being based on a managed language and having a so-so Compact Framework implementation, squeezing some performance from a complex game can be very painful and frustrating.&#xD;&#xA;&#xD;&#xA;You can only deploy to your Xbox via C#/XNA, or via C++/DirectX, but the second option requires qualifying for a XBLA license and paying for the devkit, which can be very expensive (~10000$).&#xD;&#xA;&#xD;&#xA;And remember that the Xbox is a closed system. Forget any direct TCP/IP interaction, you can only communicate with other consoles present in the Xbox Live! network, and you can't do raw HTTP connections.&#xD;&#xA;&#xD;&#xA;So, if you are thinking of a game, give XNA a try and move to a devkit if you need more raw power (and you have the money). If you are thinking of an application... just target for another platform." />
  <row Id="9713" PostHistoryTypeId="2" PostId="4917" RevisionGUID="49922f8b-35bf-4f2a-8630-bf0cc418b22d" CreationDate="2010-10-28T12:05:22.603" UserId="288" Text="The short answer: **Yes**.&#xD;&#xA;&#xD;&#xA;XNA is just a tool. It is suitable for all but the most processor- and graphically-intensive games. If you are considering XNA for an Xbox 360 game, here's what you will miss out on:&#xD;&#xA;&#xD;&#xA; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;There might be more - this is off the top of my head.&#xD;&#xA;&#xD;&#xA;(Speculation: if you *are* a professional developer (as in: have a devkit), I *think* that you can use XNA with native code, same as P/Invoke on Windows. Best of both worlds. You'd have to ask Microsoft. See also &lt;a href=&quot;http://en.wikipedia.org/wiki/Microsoft_XNA#XDK_Extensions&quot;&gt;XDK&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;The bottom line is that an XNA game is *almost* as fast as a native game and can do *almost* as much stuff. I'd suggest you use it unless you find a compelling reason not to.&#xD;&#xA;&#xD;&#xA;I do not know if there is any kind of managed DirectX for the 360. Perhaps &lt;a href=&quot;http://slimdx.org/&quot;&gt;SlimDX&lt;/a&gt; is a good place to start." />
  <row Id="9714" PostHistoryTypeId="2" PostId="4918" RevisionGUID="0caca8df-d3e4-4257-b92f-8a19d95556e4" CreationDate="2010-10-28T12:06:30.857" UserId="2798" Text="Well, it depends of the overall look of your engine. I have always aimed for static and dynamic objects; the static ones just sit there with their collision data and the dynamic ones get updated and checked against static and other dynamic objects." />
  <row Id="9715" PostHistoryTypeId="5" PostId="4917" RevisionGUID="f148312a-b2a7-4897-ac2b-e0df76042543" CreationDate="2010-10-28T12:10:44.743" UserId="288" Comment="added 1 characters in body" Text="The short answer: **Yes**.&#xD;&#xA;&#xD;&#xA;XNA is just a tool. It is suitable for all but the most processor- and graphically-intensive games. If you are considering XNA for an Xbox 360 game, here's what you will miss out on:&#xD;&#xA;&#xD;&#xA; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;There might be more - this is off the top of my head.&#xD;&#xA;&#xD;&#xA;(Speculation: if you *are* a professional developer (as in: have a devkit), I *think* that you can use XNA with native code, same as P/Invoke on Windows. Best of both worlds. You'd have to ask Microsoft. See also &lt;a href=&quot;http://en.wikipedia.org/wiki/Microsoft_XNA#XDK_Extensions&quot;&gt;XDK&lt;/a&gt;.)&#xD;&#xA;&#xD;&#xA;The bottom line is that an XNA game is *almost* as fast as a native game and can do *almost* as much stuff. I'd suggest you use it unless you find a compelling reason not to.&#xD;&#xA;&#xD;&#xA;I do not know if there is any kind of managed DirectX for the 360. Perhaps &lt;a href=&quot;http://slimdx.org/&quot;&gt;SlimDX&lt;/a&gt; is a good place to start." />
  <row Id="9716" PostHistoryTypeId="2" PostId="4919" RevisionGUID="3626653e-03df-4e5b-8c30-34e767a764d1" CreationDate="2010-10-28T12:36:44.657" UserId="34" Text="I have a couple of games up on the App Store right now that were written in 100% Obj-C.  There are definitely some areas where a naive approach would suck in Obj-C (particles, for example), but overall it's not as bad as some people make it out to be.&#xD;&#xA;&#xD;&#xA;By using Obj-C, I was able to make heavy use of the foundation collection classes, like NSMutableArray, NSMutableSet, etc, etc.  I can't stress how nice it was to be able to just use Obj-C's fast enumeration to quickly apply a change to set of game objects.  I use them everywhere.&#xD;&#xA;&#xD;&#xA;My suggestion would be to make sure your low level code is written well and not to worry about the higher level code unless you see something that needs to be addressed performance wise.  There are plenty of games that you can write without having to worry about dropping down to C++ or C -- even on the original iPhone." />
  <row Id="9717" PostHistoryTypeId="5" PostId="4852" RevisionGUID="c10adb1d-d49e-44d4-b67a-8f34c483a2d3" CreationDate="2010-10-28T12:53:49.620" UserId="1477" Comment="added 3 characters in body; edited title" Text="For an artist who won't be dealing directly with the code, what formats for 2d animation could they use that would be portable into an android game?&#xD;&#xA;&#xD;&#xA;In my particular case there are no collision requirements or anything, just need to be able to place the animation on screen at a specific point." />
  <row Id="9718" PostHistoryTypeId="4" PostId="4852" RevisionGUID="c10adb1d-d49e-44d4-b67a-8f34c483a2d3" CreationDate="2010-10-28T12:53:49.620" UserId="1477" Comment="added 3 characters in body; edited title" Text="What external 2d animation formats can I use in android?" />
  <row Id="9720" PostHistoryTypeId="2" PostId="4920" RevisionGUID="f617e244-0d6b-4566-9e6a-47af255abff1" CreationDate="2010-10-28T13:32:35.680" UserId="2469" Text="You could use the page flipping technique. You generate the animation as a sequence of images, where each image is a frame of animation. Then if you display each image (or frame) in succession, you get your animation.&#xD;&#xA;&#xD;&#xA;You could/should also add all the images to the [sprite sheet][1], so that you only need to load one image, and then just display each portion of the sprite sheet that contains the current frame.&#xD;&#xA;&#xD;&#xA;So if your animation images are all 64*64 pixels, and let's say you have 4 frames in the animation, you would end up with 4 images that each represent a frame of the animation. Those 4 images would be added to a bigger image or 256 * 64 pixels, and when you render each image to display the animation, you would first render only the 64 * 64 first pixels. Then you move over by 64 pixels and render the next 64 * 64 rectangle of pixels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=sprite+sheet" />
  <row Id="9724" PostHistoryTypeId="2" PostId="4922" RevisionGUID="1c13fe6d-ed96-4af7-82c8-51aece2fe7de" CreationDate="2010-10-28T13:42:18.013" UserId="2708" Text="I'm looking for an engine that constructs it's entities using Lua or other scripting language. This is in order to find inspiration and do it in my own engine as well.&#xD;&#xA;&#xD;&#xA;I know that Cryengine does use Lua to make their entities, but I wanted to know if there are some other alternatives that I can look up. &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="9725" PostHistoryTypeId="1" PostId="4922" RevisionGUID="1c13fe6d-ed96-4af7-82c8-51aece2fe7de" CreationDate="2010-10-28T13:42:18.013" UserId="2708" Text="Game engine with good Lua entity creation/management" />
  <row Id="9726" PostHistoryTypeId="3" PostId="4922" RevisionGUID="1c13fe6d-ed96-4af7-82c8-51aece2fe7de" CreationDate="2010-10-28T13:42:18.013" UserId="2708" Text="&lt;engine&gt;&lt;scripting&gt;&lt;lua&gt;" />
  <row Id="9727" PostHistoryTypeId="2" PostId="4923" RevisionGUID="914e0a0d-ba0c-4e30-958d-920284803e0b" CreationDate="2010-10-28T14:13:31.527" UserId="2290" Text="I'd recommend taking a look at [LÖVE][1] &quot;an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X and Linux.&quot; It's **clearly** not an alternative to the Cryengine, but should certainly demonstrate how to effectively utilize the potential of Lua for entity creation and game logic. Combine that knowledge with how Cryengine/other AAA engines utilize script backends, and you should have all the inspiration you need to create your own engine with robust scripting capabilities. :)&#xD;&#xA;&#xD;&#xA;I'd also recommend taking a gander at The Game Programming Wiki's [table of game engines][2], which has a column for scripting that you might find useful for your research.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/&#xD;&#xA;  [2]: http://gpwiki.org/index.php/Game_Engines" />
  <row Id="9728" PostHistoryTypeId="2" PostId="4924" RevisionGUID="c19258c4-47ec-42fd-9c07-093816258968" CreationDate="2010-10-28T14:14:29.943" UserId="1630" Text="If the CRT contains a critical bug, it means they don't need to recompile their huge code base as they would have to do with static linking. &#xD;&#xA;it also adds ease to certain debugging tools that replace crt calls(IAT hooks are easier than finding every call instance and rerouting it).&#xD;&#xA;&#xD;&#xA;Imo, static linking of the CRT should be avoided, as lot of older games had this, but some of them now suffer due to changes in the CRT of the host not matching what the internal CRT is doing." />
  <row Id="9729" PostHistoryTypeId="2" PostId="4925" RevisionGUID="ad929f07-9236-4dd4-9133-acca1465ef3e" CreationDate="2010-10-28T14:32:00.333" UserId="1088" Text="The argument for dynamic linking the CRT is that you get bug fixes for free. If a bug is fixed in the CRT and the user updates his machine and gets the fix then your program is fixed where it wouldn't be if you were static linked.&#xD;&#xA;&#xD;&#xA;The argument against is that you get bug fixes for free. You might be relying on the potentially undocumented and incorrect behaviour and the 'fix' breaks your code. Suddenly your game stops working for 'no reason'. &#xD;&#xA;&#xD;&#xA;Personally I tend to avoid dynamic linking wherever possible." />
  <row Id="9730" PostHistoryTypeId="2" PostId="4926" RevisionGUID="bb925b9b-8156-4835-8bed-c75561bf6789" CreationDate="2010-10-28T14:41:59.330" UserId="2865" Text="There are many methods, but all of them will fail eventually. You can add some hash value, or query key renewed with every query.&#xD;&#xA;&#xD;&#xA;But the most important thing is, that all of your super **encoding functions are send as source codes to clients' browser** and that is THE problem. To make it little harder, you can use function send by Ajax query, so sources won't be available under an url. Function should be send compressed, and maybe even in parts, so it will be harder to copy it all. I would also check this code in page like http://jsbeautifier.org/ if after making it readable your code is easy to understand. " />
  <row Id="9731" PostHistoryTypeId="2" PostId="4927" RevisionGUID="db2baaa8-bbcd-440d-9e30-bed9434163d1" CreationDate="2010-10-28T14:59:29.717" UserId="2787" Text="[Agile Game Development][1]&#xD;&#xA;&#xD;&#xA;I follow this one and it has some good thoughts on using agile methodologies in the game development space. I find it a pretty good read most of the time.&#xD;&#xA;&#xD;&#xA;  [1]: http://feeds.feedburner.com/agilegamedevelopmentl&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9733" PostHistoryTypeId="2" PostId="4928" RevisionGUID="c49edf54-30d7-4f2d-9f19-933655574b00" CreationDate="2010-10-28T15:45:18.130" UserId="2528" Text="These are just a couple of ideas I have regarding MMORPG's and eliminating the grind:&#xD;&#xA;&#xD;&#xA;Write quests with differing plots. **Think of your quest plot as the plot of a short story.** Is it a mystery, action, drama, etc. Don't ever give menial tasks out as quests. Your quest should tell a story.&#xD;&#xA;&#xD;&#xA;Let players create (and hand out) their own menial tasks. Need a caravan guard? Ask a player. Need 20 hides? Ask a player. You get the idea. **Implement an inter-player contract system for menial tasks.** So the boring &quot;quests&quot; are player generated and will involve some player-player interaction.&#xD;&#xA;&#xD;&#xA;**Make encounters with NPCs as unique as possible.** Some fly, are invisible, run really fast, burrow under ground, shoot from afar, can mind-control, charge at you, sneak up to you before attacking, grab you, etc. They don't just have differing DPS. The Stalker team tried this and succeeded quite well, just a shame there aren't more types of mutants. Collectible card games (Magic The Gathering) are also good at allowing players to &quot;bend the rules&quot; of the game all the time by using cards with outside-the-box abilities.&#xD;&#xA;&#xD;&#xA;See what lessons you can learn from PvP. Try to replicate the PvP feeling in the rest of the game. **It should be a test of skill, not time or patience.** How you do this is beyond me...&#xD;&#xA;&#xD;&#xA;Any game that focuses on the player's skill instead of the in-game character's skill (or XP) will automatically be way less grindy. **Focus on strategy and tactics to get past obstacles** instead of &quot;training&quot; to get past an obstacle.&#xD;&#xA;&#xD;&#xA;An element of risk always adds to the excitement. **Make defeat costly and players won't go into autopilot mode as often.** This is a difficult thing to implement and most games just go with the default &quot;respawn with temporary negative effects&quot; approach because it's simple and easy with less rage quits, I guess.&#xD;&#xA;&#xD;&#xA;These are all just ideas that I've always had. Whether they are good or bad is up for the professionals to decide and it looks like most of them have decided they're bad, or too much effort." />
  <row Id="9734" PostHistoryTypeId="5" PostId="4927" RevisionGUID="22264917-4974-43a7-8e24-092bd71fa69c" CreationDate="2010-10-28T15:48:54.690" UserId="1677" Comment="deleted 1 characters in body" Text="[Agile Game Development][1]&#xD;&#xA;&#xD;&#xA;I follow this one and it has some good thoughts on using agile methodologies in the game development space. I find it a pretty good read most of the time.&#xD;&#xA;&#xD;&#xA;  [1]: http://feeds.feedburner.com/agilegamedevelopment&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9735" PostHistoryTypeId="2" PostId="4929" RevisionGUID="7c206890-10ee-40da-bec1-784c8cc1004d" CreationDate="2010-10-28T15:59:31.233" UserId="2063" Text="I ran into that crisis where I do not know anymore, which things I should store inside hardcore while the runtime and which things I should store outside in XML files or similar things.&#xD;&#xA;&#xD;&#xA;I extended my engines GUI from procedural style to object orientated style, but I still have to create menues, buttons etc.&#xD;&#xA;So I got the choice to create each menue via a class or have a static main class which loads menues from a XML file.&#xD;&#xA;My problem is that I actually like to have static and external storage in XML because it keeps the code and the project clean.&#xD;&#xA;But if a GUI Object is created e.g. a button I want to have delegates/callbacks/events on it, but I think that isn't possible with loading and creating GUI Objects by XML files that only contain ints and strings." />
  <row Id="9736" PostHistoryTypeId="1" PostId="4929" RevisionGUID="7c206890-10ee-40da-bec1-784c8cc1004d" CreationDate="2010-10-28T15:59:31.233" UserId="2063" Text="Runtime Storage vs Static Storage" />
  <row Id="9737" PostHistoryTypeId="3" PostId="4929" RevisionGUID="7c206890-10ee-40da-bec1-784c8cc1004d" CreationDate="2010-10-28T15:59:31.233" UserId="2063" Text="&lt;gui&gt;&lt;file&gt;&lt;xml&gt;" />
  <row Id="9738" PostHistoryTypeId="2" PostId="4930" RevisionGUID="8483feed-7f0d-4ff7-bd88-13400e5ba075" CreationDate="2010-10-28T16:01:18.217" UserId="1829" Text="The problem with computer sciences, and especially with learning how to program, is that it is an applied science: the theory doesn't lead to a lot of applications...&#xD;&#xA;&#xD;&#xA;You can learn theory about maths without doing a lot of exercises, but there are no way you can be good at programming without coding: all the problem is about getting something to program so you can train, and that, the gamedev school will give you.&#xD;&#xA;&#xD;&#xA;Programming will earn you money because you solve problem and create applications: the theory is easy, but the technique and practice to achieve work is harder to obtain...&#xD;&#xA;&#xD;&#xA;CS is good to learn the basics, but NOTHING replaces DOING something.&#xD;&#xA;&#xD;&#xA;Either go to the gamedev school or find a good project to do, but the latter choice is risky..." />
  <row Id="9739" PostHistoryTypeId="2" PostId="4931" RevisionGUID="6e529b6f-8f6e-45e8-aaaf-583798c9f156" CreationDate="2010-10-28T16:23:40.807" UserId="2798" Text="You need a higher level of abstraction there. You can create a fixed set of functions that can be executed from your GUI elements (OpenMenu, ShowWindow, AddControl...) and then tag each one with a constant string. Then, when adding that property to the XML of the control, you will know what in-game code to execute.&#xD;&#xA;&#xD;&#xA;Or, you can extend it with a script/plug-in system that allows bidirectional communication between your game code and your XML files." />
  <row Id="9740" PostHistoryTypeId="2" PostId="4932" RevisionGUID="e10b050c-16ef-4f4d-b8ee-406fc01c7120" CreationDate="2010-10-28T16:24:47.187" UserId="2787" Text="The best way I have seen to reduce the 'grind' element is to have the **players drive** everything. The original Star Wars Galaxies did this very well even though there were some 'grind' spots in the game. There was always an **end goal** and they were very **different depending on the person playing the game**. It could be getting the best pieces of loot in order to make awesome armor or weapons for a customer, it could be gathering resources to craft various items for players, it could be building a large city, etc.&#xD;&#xA;&#xD;&#xA;You see the great thing is that the **player creates their own entertainment** so in their mind they don't feel that it is a 'grind'.&#xD;&#xA;&#xD;&#xA;Of course this doesn't work very well if your playerbase doesn't like sandbox games in which they are basically **generating their own content**. I would make the **decision based on what kind of game you want to have**." />
  <row Id="9741" PostHistoryTypeId="2" PostId="4933" RevisionGUID="a59a14a3-89ef-42fd-841a-796402f54981" CreationDate="2010-10-28T16:34:18.650" UserId="1199" Text="There's this indie game developer who tried to come up with a new original idea for a game every day for a year - and he put all his thoughts on his website. **+200 ideas** so far, if I remember correctly.&#xD;&#xA;&#xD;&#xA;I don't remember the URL to his site, or the name of the author. Anyone know what I'm talking about? &#xD;&#xA;&#xD;&#xA;[Delete this post if it doesn't belong here! Just wanted to add it to the blog thread if I managed to find it]" />
  <row Id="9742" PostHistoryTypeId="1" PostId="4933" RevisionGUID="a59a14a3-89ef-42fd-841a-796402f54981" CreationDate="2010-10-28T16:34:18.650" UserId="1199" Text="What's the URL to that guy...?" />
  <row Id="9743" PostHistoryTypeId="3" PostId="4933" RevisionGUID="a59a14a3-89ef-42fd-841a-796402f54981" CreationDate="2010-10-28T16:34:18.650" UserId="1199" Text="&lt;resources&gt;&lt;blog&gt;" />
  <row Id="9744" PostHistoryTypeId="2" PostId="4934" RevisionGUID="dd2e1da2-222a-490c-a2b6-a2cff029cbd3" CreationDate="2010-10-28T16:37:49.940" UserId="2491" Text="I think you mean [Squidi's 300 Game Mechanics.][1].  &#xD;&#xA;&#xD;&#xA;I wonder how many of those have gotten actual use.  I know the light/dark idea (his first 3 posts) got implemented as fairly popular flash games, but I don't know if he did that or someone else did.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.squidi.net/three/index.php" />
  <row Id="9745" PostHistoryTypeId="2" PostId="4935" RevisionGUID="e72be685-844a-4113-a5f6-3c899cf493e6" CreationDate="2010-10-28T16:37:59.933" UserId="1198" Text="My rule of thumb is that if it has double quotes around it, it should probably be in an XML configuration file, unless the double quotes are being used to index into a configuration file." />
  <row Id="9746" PostHistoryTypeId="2" PostId="4936" RevisionGUID="0ab31763-91f4-4660-9753-390fb67e2a33" CreationDate="2010-10-28T16:45:23.360" UserId="1199" Text="**[Squidi.net][1]**&#xD;&#xA;&#xD;&#xA;&gt;Originally, it was a challenge to myself to create a new game idea or gameplay mechanic once per day for 300 days. I failed this challenge and stopped updating daily at entry #050. However, I still occasionally update with new entries as the impulse hits me. I hope to reach the full three hundred one day.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.squidi.net/three/index.phpBlockquote" />
  <row Id="9747" PostHistoryTypeId="2" PostId="4937" RevisionGUID="d8daf63a-124d-4ee1-a0e6-9ff9ccf62e1a" CreationDate="2010-10-28T17:02:25.260" UserId="2491" Text="Issues of &quot;what is grinding&quot; aside, one obvious solution to &quot;repeating the same content&quot; is to add more content.  Now adding content is expensive, and takes time, so how do you work around that?  Well, games throughout history have found many ways to get more from their content:&#xD;&#xA;&#xD;&#xA;**&quot;Palette Swapping&quot;**&#xD;&#xA;&#xD;&#xA;Same enemy, different skin, different bullets. A technique passed down from the very early ages. Why have just one orange &quot;Hill Orc&quot; when you can have red &quot;Fire Orcs&quot; and blue &quot;Ice Orcs&quot; and green &quot;Forest Orcs&quot;?&#xD;&#xA;&#xD;&#xA;Cons: Unless you really vary up the strategies for them, most people will see killing red orcs as largely the same to killing green orcs. So...&#xD;&#xA;&#xD;&#xA;**Better AI**&#xD;&#xA;&#xD;&#xA;Grinding is usually considered mindless, so add some mind to your encounters and they won't be grinding.  If Fire Orcs behave in a different way from Ice Orcs, then encounters with both will feel fresh.  Implementation varies from giving them different attacks to actually giving them different behaviors.  &#xD;&#xA;&#xD;&#xA;Cons:  AI is a lot of work!  Plus most MMOs don't have processing to spare on AI.  Also...&#xD;&#xA;&#xD;&#xA;**More Terrain**&#xD;&#xA;&#xD;&#xA;Vary up the landscape, make encounters that actually use the terrain, then take advantage of that.  Orcs in tight hallways should feel different from orcs in wide open fields.  Let specialized monsters take advantage of terrain, like Fire Orcs are immune to fire so they can attack from unexpected directions in a firey landscape.  &#xD;&#xA;&#xD;&#xA;Cons:  But all this stuff still requires a lot of content and players will eventually burn through any amount of content you make.  WoW does all of these things AND MORE and there's still not enough content to completely eliminate repetition.  Which means...&#xD;&#xA;&#xD;&#xA;**Procedural Content Generation**&#xD;&#xA;&#xD;&#xA;Will Wright talked heavily about this prior to Spore coming out.  Unless you have a 100 person art and design team cranking out quests and assets, its very hard to have a lot of content.  The solution is to have a little bit of componentized content and then to mix-and-match the pieces.&#xD;&#xA;&#xD;&#xA;Any game with procedural content is a good example for this: Minecraft, Noctis, any roguelike, etc.  Look at Nethack: that's a 30 year old game that's still popular. Yeah it gets updates pretty often, but people come back again and again because the randomized, generated content is always fresh.&#xD;&#xA;&#xD;&#xA;This is a strategy that plays well with the above too.  Nethack has a lot of predefined monsters, but the terrain varies heavily.  Different mixes of monsters, in different terrains, require different strategies depending on the player's class, race, and item loadout.  The number of permutations means that almost any encounter will be somewhat unique, but still building on everything the player has learned to that point.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;Ahh, but the downside is that procedural content is HARD to get right, and can easily shift from awesome to boring.  Who cares if you have billions of miles of generated terrain to explore, if all of it is empty and boring?  Likewise look at Spore: lots and lots of monsters, including thousands generated by players and available as automatic downloads.  Lots of varied and interesting worlds.  But only about 3 AI routines so no matter how cool a monster looks, they all play exactly the same.  Also a very limited selection of powers and abilities.  Every game plays out exactly the same, just with different skins.&#xD;&#xA;&#xD;&#xA;Procedural Content is only good when: &#xD;&#xA;&#xD;&#xA;1) it is constrained to make sense and be playable (&quot;I spawned in a sealed room full of lava?!&quot;)&#xD;&#xA;&#xD;&#xA;2) it is actually varied enough to be fresh and the player's don't see the illusion that all of it is just new configurations of the same old crap&#xD;&#xA;&#xD;&#xA;3) the rest of the game is built to support and reinforce the value you gain through procedural content generation.  Your game has to build on top of the PCG assets, not just rely on PCG to provide gameplay." />
  <row Id="9748" PostHistoryTypeId="2" PostId="4938" RevisionGUID="c8c442c3-6a87-46f3-8e2b-1f2450a58e23" CreationDate="2010-10-28T17:15:39.387" UserId="1477" Text="First off my assumption of what grinding means is repetition of an uninteresting task that is required for advancement.&#xD;&#xA;&#xD;&#xA;so there are three things you can address here:  &#xD;&#xA;&#xD;&#xA; 1. Repetition&#xD;&#xA; 2. Lack of interest&#xD;&#xA; 3. required for advancement&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Repetition**  &#xD;&#xA;  This one there is difficult to get around if your game is of an appreciable length. At least within your constraints of not adding a bunch of new code or assets. The best way to avoid repetition is to allow multiple avenues to achieve what the player is using the &quot;grindy&quot; experience for. I think player content creation systems are the best way to do this but that would not be without its on headaches.  &#xD;&#xA;  &#xD;&#xA;**Lack of interest**  &#xD;&#xA;This ties in closely with the other points. Repetition is most problematic when what you are repeating isn't fun in the first place. I like the idea of making a toy out of your core mechanics, and then once you have a solid, fun mechanic, then add goals and direction and make it a game. I.E. League of Legends has tons of repetition but its interesting activity(usually) so the repetition is not as noticeable.  &#xD;&#xA;  &#xD;&#xA;**Required for advancement**  &#xD;&#xA;This is a big killer for grindy-ness. The player wants X but to get it they have to do Y so many times. I think that players should have to work for rewards but this becomes a problem when this is cross-activity. If someone is a [socializer][1] and wants a purely aesthetic item to help in that regard requiring a huge combat challenge may be daunting. If they had a social avenue to get their social reward that may be much more palletable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mud.co.uk/richard/hcds.htm" />
  <row Id="9749" PostHistoryTypeId="2" PostId="4939" RevisionGUID="590ff1d8-ba74-4cd3-8865-62bda2eb8917" CreationDate="2010-10-28T17:30:36.380" UserId="2787" Text="[In the Games of Madness][1]&#xD;&#xA;&#xD;&#xA;The blog of frictional games, the 5 person development team that created the fantastic Amnesia The Dark Decent. &#xD;&#xA;&#xD;&#xA;&gt; Frictional Games is a small game&#xD;&#xA;&gt; company located in the dark depths of&#xD;&#xA;&gt; Sweden. We have   currently developed&#xD;&#xA;&gt; the Penumbra games series and Amnesia:&#xD;&#xA;&gt; The Dark Descent.The Dark Descent.&#xD;&#xA;&#xD;&#xA;Any aspiring game developer is sure to gather inspiration and hope from these guys and their blogs.&#xD;&#xA;&#xD;&#xA;[1]: http://frictionalgames.blogspot.com/The Dark Descent&#xD;&#xA;" />
  <row Id="9750" PostHistoryTypeId="5" PostId="4939" RevisionGUID="dfc2eeaa-d98a-4bb2-a1ae-5933dddfb13a" CreationDate="2010-10-28T17:36:32.800" UserId="2787" Comment="deleted 15 characters in body" Text="[In the Games of Madness][1]&#xD;&#xA;&#xD;&#xA;The blog of frictional games, the 5 person development team that created the fantastic Amnesia The Dark Decent. &#xD;&#xA;&#xD;&#xA;&gt; Frictional Games is a small game&#xD;&#xA;&gt; company located in the dark depths of&#xD;&#xA;&gt; Sweden. We have   currently developed&#xD;&#xA;&gt; the Penumbra games series and Amnesia:&#xD;&#xA;&gt; The Dark Descent.The Dark Descent.&#xD;&#xA;&#xD;&#xA;Any aspiring game developer is sure to gather inspiration and hope from these guys and their blogs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://frictionalgames.blogspot.com" />
  <row Id="9751" PostHistoryTypeId="2" PostId="4940" RevisionGUID="f5dbe439-f1ea-4bd5-a34b-0d04f0f57118" CreationDate="2010-10-28T18:04:25.260" UserId="2871" Text="There is Push Button Engine for Flash:&#xD;&#xA;http://pushbuttonengine.com/&#xD;&#xA;&#xD;&#xA;And there is Panda3D for c++/python:&#xD;&#xA;panda3d dot com&#xD;&#xA;(sorry I'm only allowed 1 url per post as a n00b)&#xD;&#xA;&#xD;&#xA;I'm sure there are tons more out there :)" />
  <row Id="9752" PostHistoryTypeId="5" PostId="4936" RevisionGUID="08a82625-31c7-4c1d-9529-5f3be0b673e3" CreationDate="2010-10-28T18:09:20.247" UserId="1199" Comment="added 128 characters in body" Text="**[Squidi.net][1]**&#xD;&#xA;&#xD;&#xA;Avid gamer (and game developer?) who set up a goal to create a new game idea or gameplay mechanic once per day for 300 days.&#xD;&#xA;&#xD;&#xA;&gt;Originally, it was a challenge to myself to create a new game idea or gameplay mechanic once per day for 300 days. I failed this challenge and stopped updating daily at entry #050. However, I still occasionally update with new entries as the impulse hits me. I hope to reach the full three hundred one day.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.squidi.net/three/index.phpBlockquote" />
  <row Id="9753" PostHistoryTypeId="5" PostId="4936" RevisionGUID="9a7c036c-ead9-4443-90b2-501232e8bc77" CreationDate="2010-10-28T18:37:51.023" UserId="1199" Comment="Fixed link" Text="**[Squidi.net][1]**&#xD;&#xA;&#xD;&#xA;Avid gamer (and game developer?) who set up a goal to create a new game idea or gameplay mechanic once per day for 300 days.&#xD;&#xA;&#xD;&#xA;&gt;Originally, it was a challenge to myself to create a new game idea or gameplay mechanic once per day for 300 days. I failed this challenge and stopped updating daily at entry #050. However, I still occasionally update with new entries as the impulse hits me. I hope to reach the full three hundred one day.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.squidi.net/three/index.php" />
  <row Id="9754" PostHistoryTypeId="5" PostId="4019" RevisionGUID="3d9d31c7-df92-4288-94bf-daec04de365d" CreationDate="2010-10-28T19:13:13.183" UserId="1853" Comment="edited body" Text="Besides salary, what are the benefits you dream to get from a game development company as an employee?&#xD;&#xA;&#xD;&#xA;For example, I would find these things useful for both, me and a company:&#xD;&#xA;&#xD;&#xA; - Right to suggest own ideas.&#xD;&#xA; - Everyone participates in the brainstorming process.&#xD;&#xA; - 20% of the paid time spent on testing new games, making prototypes of own ideas, blogging about game development or giving presentations about related matter to colleagues.&#xD;&#xA; - At least some of the code produced should be open sourced.&#xD;&#xA; - Access to development-related books, magazine subscriptions.&#xD;&#xA; - Credits in the developed games with all developers and links to their personal websites of their choice.&#xD;&#xA; - International coworkers.&#xD;&#xA; - No more than 40 hours per week for work required, but optional over-time is paid.&#xD;&#xA;&#xD;&#xA;And if I founded a game development company myself in the future, I would like to have all that for the employees." />
  <row Id="9755" PostHistoryTypeId="2" PostId="4941" RevisionGUID="c9a23393-27d5-4d02-8121-3bf8b3cebf1c" CreationDate="2010-10-28T20:09:27.443" UserId="2710" Text="Well, the rule of thumb is: &quot;If something is going to change a lot, use config files or dynamic scripting. Otherwise, hardcode&quot;.&#xD;&#xA;&#xD;&#xA;The idea is, hardcoding saves you time now, and soft-coding saves you time later.. provided your config files can be edited more easily than code. So, if your GUI is relatively simple, and you're not going to change it a lot, you're better off hardcoding it. &#xD;&#xA;If you want to change GUI rapidly, use XML or some kind of dynamic scripting, but be careful. These systems quite often turn out to be actually harder to read and write than code. Xml is especially prone to that." />
  <row Id="9756" PostHistoryTypeId="5" PostId="4786" RevisionGUID="ede4ee60-b992-4470-ac33-75877ed62fd3" CreationDate="2010-10-28T20:40:42.460" UserId="1550" Comment="deleted 3 characters in body" Text="I'm wondering what would be the best way to store password and login in the client. Many people complain that they need to re-enter this every time they log in and they want me to make a way to save it. But how to save it? Saving it as plain text in game folder wouldn't be clever, but neither crypting it would help so much. It would be still easy to decrypt the data.&#xD;&#xA;&#xD;&#xA;How would you do that?&#xD;&#xA;&#xD;&#xA;Best regards!" />
  <row Id="9757" PostHistoryTypeId="2" PostId="4942" RevisionGUID="8135edd4-3fcb-4591-8a52-eae4795d41f8" CreationDate="2010-10-28T22:58:21.983" UserId="142" Text="Patrick Curry did &quot;A new game idea every week&quot; a few years ago:&#xD;&#xA;&#xD;&#xA;http://www.patrickcurry.com/thoughts/a-new-game-idea-every-week/" />
  <row Id="9758" PostHistoryTypeId="2" PostId="4943" RevisionGUID="5fbcfdb6-7b94-45c4-a8bb-57244ff18819" CreationDate="2010-10-29T00:15:45.687" UserId="1573" Text="I've tried Lua, Python, and Squirrel. Lua worked out the best; it has a larger community and better support than Squirrel, and much better memory and performance characteristics than Python." />
  <row Id="9759" PostHistoryTypeId="5" PostId="4943" RevisionGUID="a752f75f-667b-4403-bf1e-598c0294d308" CreationDate="2010-10-29T00:29:31.870" UserId="1573" Comment="added 154 characters in body" Text="I've tried Lua, Python, Scheme, and Squirrel. Lua worked out the best; it has a larger community and better support than Squirrel, and much better memory and performance characteristics than Python. Scheme worked really well too, and has a really tiny interpreter, but it was hard for designers to wrap their heads around a functional language." />
  <row Id="9760" PostHistoryTypeId="2" PostId="4944" RevisionGUID="bd48a4c8-acb4-44f1-b406-f6ece6aa2032" CreationDate="2010-10-29T01:46:25.447" UserId="2798" Text="Why don't you try Terragen? It's a terrain generator that allows you to render to the six faces of a cube and save the images to use them as a skybox.&#xD;&#xA;&#xD;&#xA;http://www.planetside.co.uk/" />
  <row Id="9761" PostHistoryTypeId="2" PostId="4945" RevisionGUID="e2398a76-4763-4f4d-92db-e75fd9193617" CreationDate="2010-10-29T03:29:55.030" UserId="1632" Text="I am using Ogre3D.&#xD;&#xA;&#xD;&#xA;How can I implement an energy shield like this [image][1]?&#xD;&#xA;&#xD;&#xA;In the picture, the shield is a semi-sphere, where I want to make it a sphere surround my object. The shield should be transparent (this should be adjustable). Can the community advise how to do this?  Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://images3.wikia.nocookie.net/__cb20090414152808/starwars/images/5/54/Energy_shield-1-.jpg" />
  <row Id="9762" PostHistoryTypeId="1" PostId="4945" RevisionGUID="e2398a76-4763-4f4d-92db-e75fd9193617" CreationDate="2010-10-29T03:29:55.030" UserId="1632" Text="How to implement a starwar energy shield in game" />
  <row Id="9763" PostHistoryTypeId="3" PostId="4945" RevisionGUID="e2398a76-4763-4f4d-92db-e75fd9193617" CreationDate="2010-10-29T03:29:55.030" UserId="1632" Text="&lt;ogre&gt;" />
  <row Id="9764" PostHistoryTypeId="2" PostId="4946" RevisionGUID="86acc1cd-07f6-4cf9-b3c3-4df42067bad4" CreationDate="2010-10-29T04:55:57.967" UserId="2595" Text="One way to discourage grinding is to use diminishing rewards.  Reduce the amount of gold, experience or the frequency of item drops if they keep killing the same monsters over and over again.&#xD;&#xA;&#xD;&#xA;This can be done intelligently by comparing the player's experience points or level to that of the monster.  If the player's level is lower than the monster's, the player gains more experience for killing them.  Likewise, if the player's level is higher, they gain less experience." />
  <row Id="9765" PostHistoryTypeId="2" PostId="4947" RevisionGUID="69c55544-3e37-4db1-8ae3-ab52f19f4452" CreationDate="2010-10-29T05:19:19.303" UserId="395" Text="Wouldn't that just be a sphere with a partially transparent texture on it? You would need to break it into discrete polygons, but any 3D modeling package will have a drawing tool for this. The shimmer effect might be a little trickier, not sure how complex you are looking for though. Are you trying to do that kind of rippling impact animation too? The &quot;right way&quot; would probably be to implement it as a geometry shader, but that might be a lot harder than you need." />
  <row Id="9766" PostHistoryTypeId="2" PostId="4948" RevisionGUID="0eea2fe2-374c-458a-8314-c69cc4776c09" CreationDate="2010-10-29T06:47:59.867" UserId="192" Text="I would use:&#xD;&#xA;&#xD;&#xA; - a semi-transparent sphere with a nice texture on it,&#xD;&#xA; - a collision detection system to understand where the sphere has been hit,&#xD;&#xA; - vertex and pixel shaders to implement ripples leaving from the contact point (maybe even with bump mapping, without displacing vertices)." />
  <row Id="9767" PostHistoryTypeId="2" PostId="4949" RevisionGUID="8d6009b8-c09f-49ec-b582-e3e75ba6f3d6" CreationDate="2010-10-29T07:46:53.070" UserId="97" Text="I have a couple models that I've made or found in Google Sketchup, and I want to be able to use them in some programs I have that only support 3DS.  What is the best way to convert, without paying for Sketchup Pro?&#xD;&#xA;&#xD;&#xA;Right now sketchup can export to .dae, so a .dae to 3ds would be just as helpful :)" />
  <row Id="9768" PostHistoryTypeId="1" PostId="4949" RevisionGUID="8d6009b8-c09f-49ec-b582-e3e75ba6f3d6" CreationDate="2010-10-29T07:46:53.070" UserId="97" Text="Converting a Google Sketchup file to 3DS?" />
  <row Id="9769" PostHistoryTypeId="3" PostId="4949" RevisionGUID="8d6009b8-c09f-49ec-b582-e3e75ba6f3d6" CreationDate="2010-10-29T07:46:53.070" UserId="97" Text="&lt;3d&gt;&lt;models&gt;&lt;file-format&gt;" />
  <row Id="9770" PostHistoryTypeId="2" PostId="4950" RevisionGUID="53a32845-b535-4af4-83b2-93a2d26a8061" CreationDate="2010-10-29T08:50:41.327" UserId="2887" Text="Here are some examples of (open source) games that use scripting to implement entity behaviour:&#xD;&#xA;&#xD;&#xA;**Frogato** implements entities using a custom scripting language.&#xD;&#xA;**Battle for Wesnoth** implements entities using a custom description language in which Lua scripts can be embedded.&#xD;&#xA;**KQ** implements entity behaviour using Lua scripts.&#xD;&#xA;&#xD;&#xA;(Could not post links due to retarded anti-spam measures...)&#xD;&#xA;" />
  <row Id="9771" PostHistoryTypeId="2" PostId="4951" RevisionGUID="e3f109f6-f550-41d9-94a8-0ecb9481cfe0" CreationDate="2010-10-29T10:32:20.060" UserId="2798" Text="Download Autodesk's free FBX Converter. Convert your COLLADA file to FBX, and then select the newly exported file. You will see that the program now gives you more export formats, including 3DS.&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&amp;id=10775855" />
  <row Id="9772" PostHistoryTypeId="2" PostId="4952" RevisionGUID="e1931257-e2c9-44f6-8340-86cb6abc099d" CreationDate="2010-10-29T10:46:31.937" UserId="2798" Text="For the &quot;border&quot; effect on the shield, you could try some Fresnel/Rim lighting shader." />
  <row Id="9773" PostHistoryTypeId="2" PostId="4953" RevisionGUID="51940d76-9961-45f6-a544-4449849b0056" CreationDate="2010-10-29T11:18:42.273" UserId="2862" Text="I'm going to start developing a game for the Xbox 360, its a small homebrew development and I don't have an Xbox 360 yet. Is it possible for me to develop the entire game targeting the XNA framework on Windows, and lastly &quot;Create Copy of Project for Xbox 360&quot; and have it work flawlessly?&#xD;&#xA;&#xD;&#xA;What are the issues I would run into? Why do you recommend targeting and deploying to the Xbox 360 during development? and do I really need an Xbox 360 during development?&#xD;&#xA;&#xD;&#xA;I'm also planning on using the superbly built [Torque X][1] game engine. Would this work well on my PC alone as well? And then transition over to the Xbox 360 without changing much code?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torquepowered.com/products/torque-x" />
  <row Id="9774" PostHistoryTypeId="1" PostId="4953" RevisionGUID="51940d76-9961-45f6-a544-4449849b0056" CreationDate="2010-10-29T11:18:42.273" UserId="2862" Text="Can you develop a game in XNA only on Windows for the Xbox 360?" />
  <row Id="9775" PostHistoryTypeId="3" PostId="4953" RevisionGUID="51940d76-9961-45f6-a544-4449849b0056" CreationDate="2010-10-29T11:18:42.273" UserId="2862" Text="&lt;xna&gt;&lt;windows&gt;&lt;xbox360&gt;" />
  <row Id="9776" PostHistoryTypeId="2" PostId="4954" RevisionGUID="fa255a0d-6f57-46b7-8ed1-4b6d326de4fc" CreationDate="2010-10-29T11:25:56.733" UserId="2469" Text="Yes you can build your entire game with XNA targeting Windows, and then with a few minor adjustements, you can also deploy the same code to Xbox360.&#xD;&#xA;I think there are a few places where you might have to add some #if #endif conditions, the code for controls and keyboard for instance. That code would be a little different.&#xD;&#xA;&#xD;&#xA;All in all XNA is designed to be deployed on Windows and XBox, so it should not be a problem, I have done this before, and after 5 months of programming, our game was &quot;ported&quot; to Xbox too with just a little bit more work.&#xD;&#xA;&#xD;&#xA;As for Torque X, I don't know about that, but if it is an engine for XNA, it shouldn't be a problem." />
  <row Id="9777" PostHistoryTypeId="6" PostId="4953" RevisionGUID="9d7bc17c-386d-4de8-ab16-e36013ef0ed9" CreationDate="2010-10-29T11:58:29.803" UserId="288" Comment="edited tags" Text="&lt;xna&gt;&lt;windows&gt;&lt;xbox360&gt;&lt;torque-x&gt;" />
  <row Id="9778" PostHistoryTypeId="2" PostId="4955" RevisionGUID="e4af4f0b-c07f-416d-af0b-8b4c4b993261" CreationDate="2010-10-29T12:08:31.630" UserId="891" Text="For example, Havok Content tools allows you to define physic bodies, properties, connections, etc in Maya.&#xD;&#xA;&#xD;&#xA;For creating scenes/levels is this really the correct approach or is there some better way to do things." />
  <row Id="9779" PostHistoryTypeId="1" PostId="4955" RevisionGUID="e4af4f0b-c07f-416d-af0b-8b4c4b993261" CreationDate="2010-10-29T12:08:31.630" UserId="891" Text="How to create complex Physics scenes in Maya with Havok" />
  <row Id="9780" PostHistoryTypeId="3" PostId="4955" RevisionGUID="e4af4f0b-c07f-416d-af0b-8b4c4b993261" CreationDate="2010-10-29T12:08:31.630" UserId="891" Text="&lt;physics&gt;&lt;assets&gt;" />
  <row Id="9781" PostHistoryTypeId="2" PostId="4956" RevisionGUID="982c5f19-759b-4abd-a6ee-16a7d9419571" CreationDate="2010-10-29T12:13:00.977" UserId="288" Text="First of all - let me say - I have done exactly this (developing on PC and then porting to Xbox 360 late in development) and had only minimal trouble.&#xD;&#xA;&#xD;&#xA;With XNA 4.0 and the introduction of the profiles (HiDef is what you want to target for the 360) it has become significantly easier to keep within the specifications of the Xbox.&#xD;&#xA;&#xD;&#xA;You basically need to remember that the Xbox 360 has different performance characteristics to a PC. So while your game may port fine, you may have to spend some time doing performance tuning, especially if you are doing anything &quot;fancy&quot;.&#xD;&#xA;&#xD;&#xA;By far the biggest performance gotcha is the garbage collector on the Xbox 360. It is *slow* - certainly a lot slower than the one on the PC. So when you are developing on the PC you will want to use the [Microsoft CLR Profiler][1] to profile your memory: Once your game has loaded and is running you want to see close to zero allocations (XNA on Windows will still allocate a few things, usually to do with input, that are not a problem on the 360). &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2007/07/02/twin-paths-to-garbage-collector-nirvana.aspx&quot;&gt;Here is a blog post about avoiding garbage collector issues&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;I recommend buying some Xbox 360 controllers early on, and using those during PC development.&#xD;&#xA;&#xD;&#xA;The other thing to be aware of when developing for the 360 is the &lt;a href=&quot;http://create.msdn.com/en-US/resources/help/peer_review_evil_checklist&quot;&gt;The Evil Checklist&lt;/a&gt; that your game is checked against during peer-review.&#xD;&#xA;&#xD;&#xA;You will notice that there's a lot of stuff in there to do with profiles, the guide, the marketplace and particularly storage devices. These cause issues that just don't come up on PC. If your game stores data, does networking, needs to interact with profiles, etc, I would recommend getting an Xbox 360 *early* in your development cycle. Also - remember to build in support for a demo, as it is required for XBLIG.&#xD;&#xA;&#xD;&#xA;I also can't speak much about Torque-X, but I assume that it's just a bunch of libraries that use XNA - so it should not cause any issues.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/downloads/details.aspx?familyid=86ce6052-d7f4-4aeb-9b7a-94635beebdda&amp;displaylang=en" />
  <row Id="9782" PostHistoryTypeId="5" PostId="4955" RevisionGUID="3d595e0a-91b2-4072-847b-77bc6f1cfcfc" CreationDate="2010-10-29T12:40:22.227" UserId="891" Comment="added 5 characters in body" Text="For example, Havok Content Tools allows you to define physic bodies, properties, connections, etc in Maya.&#xD;&#xA;&#xD;&#xA;For creating full scenes/levels is this really the correct approach or is there some better way to do things." />
  <row Id="9783" PostHistoryTypeId="2" PostId="4957" RevisionGUID="d3001b1e-f0e8-4448-bd11-072a89c045c6" CreationDate="2010-10-29T13:15:38.763" UserDisplayName="J3M7OR3" Text="I have heard that Ogre 3D is not actually a game engine, rather it is a 3D render engine. I have also heard people claim that one can piece it together with other components (engines?) to create a full featured game engine. So my question is:&#xD;&#xA;&#xD;&#xA; - What are the other **types** of&#xD;&#xA;   components/engines one would have to&#xD;&#xA;   add to Ogre 3D to create a game&#xD;&#xA;   engine?&#xD;&#xA;&#xD;&#xA; - Also, what are the most popular and&#xD;&#xA;   powerful examples of these other&#xD;&#xA;   components/engines?" />
  <row Id="9784" PostHistoryTypeId="1" PostId="4957" RevisionGUID="d3001b1e-f0e8-4448-bd11-072a89c045c6" CreationDate="2010-10-29T13:15:38.763" UserDisplayName="J3M7OR3" Text="What other components would one have to combine with Ogre 3D render engine to make a full fledged custom game engine?" />
  <row Id="9785" PostHistoryTypeId="3" PostId="4957" RevisionGUID="d3001b1e-f0e8-4448-bd11-072a89c045c6" CreationDate="2010-10-29T13:15:38.763" UserDisplayName="J3M7OR3" Text="&lt;engine&gt;&lt;3d-engines&gt;&lt;ogre&gt;&lt;physics-engine&gt;" />
  <row Id="9786" PostHistoryTypeId="2" PostId="4958" RevisionGUID="3e48257b-261e-457d-b58e-bf63744a72b0" CreationDate="2010-10-29T13:24:05.867" UserId="2862" Text="I want to get started with XNA game development, and I have bought the Pro edition of Visual Studio 2010 so I have the required software to run XNA Game Studio.&#xD;&#xA;&#xD;&#xA;How do I get it? Is it released yet?  &#xD;&#xA;Is it a free download on some Microsoft site?  &#xD;&#xA;Do I have to pay anything? Where?&#xD;&#xA;&#xD;&#xA;Is [this][1] it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-us/resources/downloads" />
  <row Id="9787" PostHistoryTypeId="1" PostId="4958" RevisionGUID="3e48257b-261e-457d-b58e-bf63744a72b0" CreationDate="2010-10-29T13:24:05.867" UserId="2862" Text="How do I get XNA Game Studio 4.0?" />
  <row Id="9788" PostHistoryTypeId="3" PostId="4958" RevisionGUID="3e48257b-261e-457d-b58e-bf63744a72b0" CreationDate="2010-10-29T13:24:05.867" UserId="2862" Text="&lt;xna&gt;&lt;windows&gt;&lt;xbox360&gt;" />
  <row Id="9789" PostHistoryTypeId="5" PostId="4958" RevisionGUID="34a00c3e-65db-4a38-acd5-1e96ab1d9fe7" CreationDate="2010-10-29T13:30:12.687" UserId="2862" Comment="added 299 characters in body" Text="I want to get started with XNA game development, and I have bought the Pro edition of Visual Studio 2010 so I have the required software to run XNA Game Studio.&#xD;&#xA;&#xD;&#xA;How do I get it? Is it released yet?  &#xD;&#xA;Is it a free download on some Microsoft site?  &#xD;&#xA;Do I have to pay anything? Where?&#xD;&#xA;&#xD;&#xA;**Edit:** &#xD;&#xA;Is [this][1] it?&#xD;&#xA;&#xD;&#xA;**Conclusion:** &#xD;&#xA;I found it here as a part of the [Windows 7 Phone Devkit][2] (here's the [ISO download][3])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-us/resources/downloads&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&amp;displaylang=en&#xD;&#xA;  [3]: http://go.microsoft.com/fwlink/?LinkId=201927" />
  <row Id="9790" PostHistoryTypeId="2" PostId="4959" RevisionGUID="664f5e37-ae0d-4ff0-a704-1c2635e8957e" CreationDate="2010-10-29T13:30:44.363" UserId="2469" Text="Yep that's the one, just download and install it." />
  <row Id="9791" PostHistoryTypeId="5" PostId="4948" RevisionGUID="f3bc3206-536e-4922-a9d0-571f421af556" CreationDate="2010-10-29T14:01:34.950" UserId="192" Comment="added 9 characters in body" Text="I would use:&#xD;&#xA;&#xD;&#xA; - a semi-transparent sphere with a nice texture on it,&#xD;&#xA; - a collision detection system to understand where the sphere has been hit,&#xD;&#xA; - vertex and pixel shaders to implement ripples leaving from the contact point (maybe even with bump mapping, without actually displacing vertices)." />
  <row Id="9792" PostHistoryTypeId="4" PostId="4933" RevisionGUID="416d45c4-1e10-4e3b-9795-c3064e51c279" CreationDate="2010-10-29T14:02:06.400" UserId="744" Comment="edited tags; edited title; edited title" Text="Who kept a blog for a year with a new game idea every day, and where is it?" />
  <row Id="9793" PostHistoryTypeId="6" PostId="4933" RevisionGUID="416d45c4-1e10-4e3b-9795-c3064e51c279" CreationDate="2010-10-29T14:02:06.400" UserId="744" Comment="edited tags; edited title; edited title" Text="&lt;game-design&gt;&lt;resources&gt;&lt;blog&gt;" />
  <row Id="9794" PostHistoryTypeId="2" PostId="4960" RevisionGUID="e4964b85-88cc-4dd1-b92a-caa4a954261a" CreationDate="2010-10-29T14:14:27.137" UserId="2892" Text="I'm currently making a PC game in XNA. It's actually a collection of mini-games (there's 3 mini-games at the moment) however I plan to make and add more, in downloadable 'packs'.&#xD;&#xA;&#xD;&#xA;My question is, what's the best way to achieve this?&#xD;&#xA;&#xD;&#xA;Currently my thoughts are:&#xD;&#xA;&#xD;&#xA; - Create a 'game' interface&#xD;&#xA; - Build games to this interface but create them as .dlls &#xD;&#xA; - Have the main .exe file scan a directory and load in the .dlls at runtime.&#xD;&#xA;&#xD;&#xA;I've not messed around with the idea much, but I know there are applications at-least that use this plug-in approach (Notepad++ seems to), but I'm not sure of any games that do (although I'm sure they must exist). However it seems that this is a problem that has been solved previously, so I'm wondering if there's any form of established best-practice." />
  <row Id="9795" PostHistoryTypeId="1" PostId="4960" RevisionGUID="e4964b85-88cc-4dd1-b92a-caa4a954261a" CreationDate="2010-10-29T14:14:27.137" UserId="2892" Text="How can I make a collection of mini-games in XNA where the user can download packs of minigames and the main .exe can run them without being altered?" />
  <row Id="9796" PostHistoryTypeId="3" PostId="4960" RevisionGUID="e4964b85-88cc-4dd1-b92a-caa4a954261a" CreationDate="2010-10-29T14:14:27.137" UserId="2892" Text="&lt;xna&gt;&lt;c#&gt;&lt;best-practices&gt;" />
  <row Id="9797" PostHistoryTypeId="2" PostId="4961" RevisionGUID="c9fedc8a-173f-437a-b28f-26ee3bc6f9d7" CreationDate="2010-10-29T14:44:52.570" UserId="2871" Text="First you will need to have as many sections as are needed so that you can fill the size of the screen plus one. So if you have a screen width 480 and a section width of 480 you need two sections to repeat. If your section width is only 240 then you would need 3 sections.&#xD;&#xA;&#xD;&#xA;I would step back from using this CCParallaxNode for now and just get a single layer to endlessly scroll. You can do it by subclassing Layer to make EndlessLayer and then when it pans you will move the sections accordingly and move the floating extra section from the left to right if you are scrolling right (or left if you are moving left). Once you have this it is a piece of cake to just layer as many of these new layer types over each other and just move each one a fraction of what the nearest layer moves. You could even group this behavior into a new class like EndlessParallaxNode." />
  <row Id="9798" PostHistoryTypeId="2" PostId="4962" RevisionGUID="30bf9cd7-34e4-4468-9cdb-153c41da849b" CreationDate="2010-10-29T14:59:57.017" UserId="1868" Text="The game would be a race from A to B through several checkpoints. I think there are two approaches for the concept of time.&#xD;&#xA;&#xD;&#xA;1. The game starts with some time and player has to make it to the finish before it runs out. Extra time is granted at the checkpoints. Time left at the finish is counted as a score.&#xD;&#xA;&#xD;&#xA;2. The time at the start is 00:00 and the stopwatch is halted at the finish. Player still has to go through checkpoints.&#xD;&#xA;&#xD;&#xA;Opinions about these? I think the option 1 is more common but I find it frustrating for beginners." />
  <row Id="9799" PostHistoryTypeId="1" PostId="4962" RevisionGUID="30bf9cd7-34e4-4468-9cdb-153c41da849b" CreationDate="2010-10-29T14:59:57.017" UserId="1868" Text="Checkpoints in a racing game?" />
  <row Id="9800" PostHistoryTypeId="3" PostId="4962" RevisionGUID="30bf9cd7-34e4-4468-9cdb-153c41da849b" CreationDate="2010-10-29T14:59:57.017" UserId="1868" Text="&lt;game-design&gt;&lt;timer&gt;&lt;racing&gt;" />
  <row Id="9801" PostHistoryTypeId="2" PostId="4963" RevisionGUID="3a4c438f-c650-4f91-8aa6-0e73daa5a9ff" CreationDate="2010-10-29T15:05:22.163" UserId="744" Text="The first option is more common because of racing games' origins in arcades, where you want play length to grow as a function of skill and credits. Since you're not trying to get quarters out of players (I assume), just recording times at each checkpoint is less frustrating for players, and gives the same numerical results." />
  <row Id="9802" PostHistoryTypeId="2" PostId="4964" RevisionGUID="3b2bf837-57ae-4d3e-996a-4153750a5ad2" CreationDate="2010-10-29T15:09:04.490" UserId="1101" Text="This question is pretty much 'what is a game engine'. Game engines are whatever software is needed to make a game, and there is no accepted checklist of what needs to be in such an engine for it to qualify.&#xD;&#xA;&#xD;&#xA;That said, any simulation-style game will essentially do three things: acquire input, perform simulation, and present output.&#xD;&#xA;&#xD;&#xA;For input you need to consider spatial peripherals such as mice, keyboards, joysticks, joypads, tablets, touch-screens, computer vision systems like Kinect or Wiimotes, etc. You might also consider audio peripherals such as microphones and indeed speech-to-text one layer up from that. The network is also another potential form of input.&#xD;&#xA;&#xD;&#xA;For simulation, a lot of this is game-specific so it's hard to provide generic functionality that suits all games. But systems that may exist for this purpose could include physics simulation, pathfinding and planning algorithms, hooks for script-based decision-making, different types of time-based animation, and so on.&#xD;&#xA;&#xD;&#xA;For output, the classic one is graphics - typically divided into the presentation of 3D models (which in turn tends to divide into environments and vehicles/characters) and 2D sprites and particles, but often with some overlap between the two and additional functionality for post-processing. There may also be support for video streaming support, multi-monitor displays, a GUI/HUD system, etc. Beyond graphics you have sound, usually including positional and non-positional sound effects, streamed music, and maybe filters to apply to the sound. Other forms of output include networking (again), force-feedback devices, log files (often more complex than you think), on-screen debugging aids and overlays.&#xD;&#xA;&#xD;&#xA;There will also be some systems that exist outside of or parallel to the simulation which are useful for development - eg. tools for creating and manipulating game assets, persistence of game state (for save/load), script editors, internationalisation and localisation tools, test suites, etc.&#xD;&#xA;&#xD;&#xA;How many game engines contain all of the above? Probably none of them. I expect some of the commercial offerings come pretty close however.&#xD;&#xA;&#xD;&#xA;What would you have to add to Ogre to get a full game engine? Well, you find out what you need for the kind of game you want, see what Ogre provides for you, and add the rest." />
  <row Id="9803" PostHistoryTypeId="2" PostId="4965" RevisionGUID="8bf7197e-9fad-4627-b2fe-0da31a6363fa" CreationDate="2010-10-29T15:20:33.950" UserId="678" Text="On windows, you can you can just open an assembly (dll) and import types and execute methods. See the [Assembly Class documentation][1].&#xD;&#xA;&#xD;&#xA;On the Xbox 360 you do not have access to System.Reflection. Here you should rely on the XBLA store API. I'm not sure how much of this functionality is available to XBLIG applications.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.reflection.assembly.aspx" />
  <row Id="9804" PostHistoryTypeId="2" PostId="4966" RevisionGUID="f044d93e-4f68-4ba1-bf94-26e9badbfdda" CreationDate="2010-10-29T15:22:02.007" UserId="1101" Text="&gt; If there are no popular ones, then why not?&#xD;&#xA;&#xD;&#xA;Because there is nothing resembling a consensus on how such a framework would operate.&#xD;&#xA;&#xD;&#xA;On a thread on Gamedev.net I determined that when people talk about component-based game systems there are actually at least 8 possible permutations of how they expect them to work, based on 3 different factors:&#xD;&#xA;&#xD;&#xA;**Inboard vs. outboard** - should components be aggregated into an entity, or should they be part of a subsystem and only associated by an entity ID?&#xD;&#xA;&#xD;&#xA;**Static vs. dynamic composition** - should entities consist of a known set of components (eg. 1 Physics, 1 Animation, 1 AI, etc) that can communicate in code via well-known interfaces, or can entities have arbitrary quantities of components added to them (with associated strategies for locating other components of interest)&#xD;&#xA;&#xD;&#xA;**Data on component vs data on entity** - Should data be held by the component that primarily operates upon it? Or should data be stored on the entity in a shared space, accessible by all components?&#xD;&#xA;&#xD;&#xA;Beyond that there are further questions over how the components should communicate (via the shared data? Via function pointers? Via signals/slots? Or not at all?), how they should update (in a fixed order based on component type? a per-entity order defined at creation time? based on a topological sort of component interdependencies?), etc.&#xD;&#xA;&#xD;&#xA;Each of these choices are completely arbitrary, and anything you can do with one system can be done with the other. But the way in which you have to code it is quite different in each case. And people seem to have strong opinions over which way works best for them.&#xD;&#xA;&#xD;&#xA;Right now people are still too caught up in the idea that components are somehow a replacement for object orientation (which they're not) and also imagining that they're a massive change from how games were traditionally made (which again, they were not - people have factored out the various subsystems in their entities for ages), so there's a lot of hyperbole and not much agreement. Maybe in a few years things will have settled down and people will settle on one or two fairly standard approaches." />
  <row Id="9805" PostHistoryTypeId="2" PostId="4967" RevisionGUID="dd3dc56e-3d54-42c6-bc71-e6edb5f00e5a" CreationDate="2010-10-29T15:27:58.197" UserId="1345" Text="I am a newbie so when ever i start over i get stuck how to organize things (code) or what should be the order of my work. Can you share your experience of project granularity so i can make my mind what should be done first and so on." />
  <row Id="9806" PostHistoryTypeId="1" PostId="4967" RevisionGUID="dd3dc56e-3d54-42c6-bc71-e6edb5f00e5a" CreationDate="2010-10-29T15:27:58.197" UserId="1345" Text="how to breakdown my game project?" />
  <row Id="9807" PostHistoryTypeId="3" PostId="4967" RevisionGUID="dd3dc56e-3d54-42c6-bc71-e6edb5f00e5a" CreationDate="2010-10-29T15:27:58.197" UserId="1345" Text="&lt;programming&gt;&lt;project-management&gt;&lt;motivation&gt;" />
  <row Id="9808" PostHistoryTypeId="2" PostId="4968" RevisionGUID="7a909e9f-2982-4281-ba09-0e750d8cca4a" CreationDate="2010-10-29T16:21:39.957" UserId="1853" Text="What business models exist for online games?" />
  <row Id="9809" PostHistoryTypeId="1" PostId="4968" RevisionGUID="7a909e9f-2982-4281-ba09-0e750d8cca4a" CreationDate="2010-10-29T16:21:39.957" UserId="1853" Text="Business models for online games" />
  <row Id="9810" PostHistoryTypeId="3" PostId="4968" RevisionGUID="7a909e9f-2982-4281-ba09-0e750d8cca4a" CreationDate="2010-10-29T16:21:39.957" UserId="1853" Text="&lt;business&gt;&lt;monetization&gt;&lt;online&gt;&lt;business-model&gt;" />
  <row Id="9811" PostHistoryTypeId="2" PostId="4969" RevisionGUID="befa0c13-d4e0-4367-952f-d66c135cabdc" CreationDate="2010-10-29T16:43:05.760" UserId="2447" Text=" 1. Ads &#xD;&#xA; 2. subscriptions &#xD;&#xA; 3. sell items, perks,  etc.&#xD;&#xA; " />
  <row Id="9812" PostHistoryTypeId="2" PostId="4970" RevisionGUID="21f00666-62e1-432b-a325-9ebd073ae9da" CreationDate="2010-10-29T16:52:54.157" UserId="2290" Text="Here are the general steps I would go through:&#xD;&#xA;&#xD;&#xA; 1. **Understand what you're goal is** - Without a clear understanding of what you're trying to achieve, you'll have a hard time completing a project of any scale.&#xD;&#xA; 2. **Write the rules down on paper** -  Every system has rules. Take the time to write them down in bullet format. This will get your brain thinking about the logic, and will provide you with a handy reference to use later on.&#xD;&#xA; 3. **Rewrite the rules to follow the programmatic flow** - Keep the rules in bullet format, but reorder and indent them, so they form an outline of the programmatic flow.&#xD;&#xA; 4. **Write the pseudo-code** - Using your outline as reference, write out the pseudo code.&#xD;&#xA; 5. **Create the classes** - Make a list of classes you'll need, based on your pseudo code, and implement them.&#xD;&#xA; 6. **Replace your pseudo-code with code**&#xD;&#xA;&#xD;&#xA;The process is a little slow, but it has a number of benefits to someone in your situation:&#xD;&#xA;&#xD;&#xA; - Each step creates documentation that can be referenced in future steps&#xD;&#xA; - You have multiple opportunities to catch mistakes in your logic before you ever touch code&#xD;&#xA; - It's very easy to see how logic should breakdown into code" />
  <row Id="9813" PostHistoryTypeId="2" PostId="4971" RevisionGUID="b3f052d3-6f91-4d2e-a7ef-4ca6b969bc7b" CreationDate="2010-10-29T16:54:38.983" UserId="2862" Text="As of 2010 with the release of XNA 4.0, if I buy an Xbox 360 with Kinect will I be able to access its motion sensing data with the XNA game I'm developing? Or is this only restricted to C++ developers with a devkit?" />
  <row Id="9814" PostHistoryTypeId="1" PostId="4971" RevisionGUID="b3f052d3-6f91-4d2e-a7ef-4ca6b969bc7b" CreationDate="2010-10-29T16:54:38.983" UserId="2862" Text="Can you access Kinect motion sensing from XNA?" />
  <row Id="9815" PostHistoryTypeId="3" PostId="4971" RevisionGUID="b3f052d3-6f91-4d2e-a7ef-4ca6b969bc7b" CreationDate="2010-10-29T16:54:38.983" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;xna-4.0&gt;&lt;motion-control&gt;" />
  <row Id="9816" PostHistoryTypeId="2" PostId="4972" RevisionGUID="d3a6bfd5-8813-4e32-8373-b2c2397ca309" CreationDate="2010-10-29T16:56:35.103" UserId="2447" Text="Mostly it sounds like what you need to do is read up on software engineering.  The approach I use is called the spiral development model.  In this model you repeatedly do the software development cycle(design, code, test, release) on an ever slightly expanding project.&#xD;&#xA;&#xD;&#xA;Lets say we were going to apply this to a 2d shooter.&#xD;&#xA;&#xD;&#xA;first spiral open a window.&#xD;&#xA;&#xD;&#xA;second spiral get player on screen and moving to user input.&#xD;&#xA;&#xD;&#xA;third spiral get enemies on screen.&#xD;&#xA;&#xD;&#xA;fourth spiral be able to shoot stuff.&#xD;&#xA;&#xD;&#xA;5th spiral ad AI to enemy units.&#xD;&#xA;&#xD;&#xA;6th spiral polish." />
  <row Id="9817" PostHistoryTypeId="2" PostId="4973" RevisionGUID="592ff93f-f808-4745-89b4-df6488b64180" CreationDate="2010-10-29T17:05:17.240" UserId="2390" Text="[Freemium][1] - Make the bulk of your game available for free, but provide paid premium content (e.g. *Fantastic Contraption* and *Quake Live*)&#xD;&#xA;&#xD;&#xA;[Adware][2] - Make your game completely free, but with adverts.&#xD;&#xA;&#xD;&#xA;[Subscription based][3] - Players pay a regular subscription fee to play (e.g. most MMORPGs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Freemium&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Advertising-supported_software&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Subscription_business_model" />
  <row Id="9818" PostHistoryTypeId="2" PostId="4974" RevisionGUID="ef2fb3c0-7d57-49e8-9c9c-606e55ab17f8" CreationDate="2010-10-29T17:07:55.777" UserId="2895" Text="http://www.computerandvideogames.com/article.php?id=258873?cid=OTC-RSS&amp;attr=CVG-News-RSS&#xD;&#xA;&#xD;&#xA;Looks like for the moment it's only for select Microsoft partners." />
  <row Id="9819" PostHistoryTypeId="5" PostId="4973" RevisionGUID="e2c8e391-9e22-4e28-8eae-e379e1f24a24" CreationDate="2010-10-29T17:11:25.510" UserId="2390" Comment="added 618 characters in body; added 2 characters in body" Text="[Freemium][1] - Make the bulk of your game available for free, but provide paid premium content (e.g. *Fantastic Contraption* and *Quake Live*). There's obviously a bit of a balancing act with choosing how much to give away for free: you have to make sure you give enough so that they can enjoy the game, but not enough to satiate their appetite.&#xD;&#xA;&#xD;&#xA;[Adware][2] - Make your game completely free, but with adverts. Ads could be in-game, around the game canvas (for browser games), or could be shown intermittently throughout the game (like television ads). Note that the viability of this is debatable (*Quake Live* was originally ad-based, but turned to freemium when they realised that they weren't making enough money to cover running costs).&#xD;&#xA;&#xD;&#xA;[Subscription based][3] - Players pay a regular subscription fee to play (e.g. most MMORPGs). This could also be complemented with an initial free period (e.g. first month free).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Freemium&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Advertising-supported_software&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Subscription_business_model" />
  <row Id="9820" PostHistoryTypeId="2" PostId="4975" RevisionGUID="d69ffd84-52c0-46f2-883e-7605f26e0002" CreationDate="2010-10-29T17:13:03.930" UserId="1199" Text="[Micropayments][1] - allow users to buy in-game items for tiny sums of money.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Micro_transaction" />
  <row Id="9821" PostHistoryTypeId="2" PostId="4976" RevisionGUID="2443fdc6-3ac7-4cb1-bea8-2ae162d9c726" CreationDate="2010-10-29T17:16:43.313" UserId="2862" Text="XNA 4 includes the Microsoft.Xna.Framework.Audio.[Microphone][1] class which can seemingly read the raw sound data off the microphone via its API as documented:&#xD;&#xA;&#xD;&#xA;&gt; **GetData** - Gets the latest recorded data from the microphone.&#xD;&#xA;&#xD;&#xA;&gt; **GetSampleDuration** - Returns the duration of audio playback based on the size of the buffer.&#xD;&#xA;&#xD;&#xA;&gt; **GetSampleSizeInBytes** - Returns the size of the byte array required to hold the specified duration of audio for this microphone object. &#xD;&#xA;&#xD;&#xA;Can I read sound data using this class, record it in an array and then play it back? On the Xbox 360?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.microphone_members.aspx" />
  <row Id="9822" PostHistoryTypeId="1" PostId="4976" RevisionGUID="2443fdc6-3ac7-4cb1-bea8-2ae162d9c726" CreationDate="2010-10-29T17:16:43.313" UserId="2862" Text="Can you record raw sound data in XNA?" />
  <row Id="9823" PostHistoryTypeId="3" PostId="4976" RevisionGUID="2443fdc6-3ac7-4cb1-bea8-2ae162d9c726" CreationDate="2010-10-29T17:16:43.313" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;sound&gt;&lt;audio&gt;&lt;voice&gt;" />
  <row Id="9824" PostHistoryTypeId="2" PostId="4977" RevisionGUID="14be971f-9a19-4cf7-a77c-10bf920bb0a9" CreationDate="2010-10-29T17:27:50.540" UserId="2862" Text="Can I develop an XNA 4.0 game for the older Xbox 360 Elite? Or would I need a newer Slim model?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9825" PostHistoryTypeId="1" PostId="4977" RevisionGUID="14be971f-9a19-4cf7-a77c-10bf920bb0a9" CreationDate="2010-10-29T17:27:50.540" UserId="2862" Text="Does the older Xbox 360 Elite support XNA 4?" />
  <row Id="9826" PostHistoryTypeId="3" PostId="4977" RevisionGUID="14be971f-9a19-4cf7-a77c-10bf920bb0a9" CreationDate="2010-10-29T17:27:50.540" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;" />
  <row Id="9827" PostHistoryTypeId="6" PostId="3223" RevisionGUID="3e22bb0e-fa2c-482c-bfb3-0d795818d7cf" CreationDate="2010-10-29T17:30:38.450" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;resources&gt;&lt;free&gt;&lt;blog&gt;" />
  <row Id="9828" PostHistoryTypeId="2" PostId="4978" RevisionGUID="f98b6309-0924-4713-942b-e23a3b9e15b9" CreationDate="2010-10-29T17:33:27.357" UserId="849" Text="Any Xbox 360 will do, regardless if old or new since they are essentially all the same in terms of CPU/RAM/GPU." />
  <row Id="9829" PostHistoryTypeId="2" PostId="4979" RevisionGUID="32810fd6-5b88-49a4-8fb3-63b92902c521" CreationDate="2010-10-29T17:35:29.897" UserId="744" Text="The development platform for all Xbox 360 models is identical - that's the nice aspect of developing on consoles. The models differ in mostly incidental things like disc drive speed, number of cooling fans, and hard drive size.&#xD;&#xA;&#xD;&#xA;The speed of the hard drive and disc drive are the only things that even remotely affect game quality / technical requirement compliance, and unless you're streaming lots of data, they're unlikely to matter for you." />
  <row Id="9830" PostHistoryTypeId="2" PostId="4980" RevisionGUID="593ba584-a534-4a4f-9b60-2e3b5c51f25a" CreationDate="2010-10-29T17:47:06.737" UserId="2634" Text="That depends a little bit on how the menu is related to your game.&#xD;&#xA;&#xD;&#xA;If you are using the standard GUI stack for menus (say you have a traditional GUI form with a drop-down menu but your game in a specialized canvas context) then the event loops are already separated, and you would use the primary event system for your GUI to handle menu events. This won't go into the main loop, because your GUI system presumably already has one.&#xD;&#xA;&#xD;&#xA;If instead your menus are part of the context of the game, there are still two options - The menu pops up as part of the game, or the menu state is a completely separate state.  In either case, I would probably make the menu elements based on the same kinds of content as the rest of your game, SDL sprites for example. That way, if the menu is integrated into the game, you can just have a sprite group containing the menu elements, and break your event-handling code into code to read traditional elements and menu elements (maybe as separate functions.)&#xD;&#xA;&#xD;&#xA;If the menu is in an entirely different state, the easiest thing is to have your entire game switch states and have a new event-handling trigger inside the menu state.&#xD;&#xA;&#xD;&#xA;Hope this helps...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9831" PostHistoryTypeId="2" PostId="4981" RevisionGUID="19ce1dbb-fe97-484c-a793-0c7faeb7ceca" CreationDate="2010-10-29T18:23:58.307" UserId="2469" Text="I was looking at the d3dx math .h and noticed that a difference between the &quot;+&quot; and &quot;+=&quot; operators:&#xD;&#xA;&#xD;&#xA;    D3DXVECTOR3&amp; operator += ( CONST D3DXVECTOR3&amp; );&#xD;&#xA;    D3DXVECTOR3 operator + ( CONST D3DXVECTOR3&amp; ) const;&#xD;&#xA;&#xD;&#xA;Why is it returning a reference in the case of a += operation and a copy in the case of + operation ?&#xD;&#xA;&#xD;&#xA;I'm guessing in the first case it's modifying the vector on which you call the += operation, something like this:&#xD;&#xA;&#xD;&#xA;    this-&gt;_x += x;&#xD;&#xA;    ...&#xD;&#xA;    return *this;&#xD;&#xA;&#xD;&#xA;and in the case of a + operation it would be doing something like this:&#xD;&#xA;    &#xD;&#xA;    return D3DXVECTOR3(this-&gt;_x + x, this-&gt;_y + y, this-&gt;_z + z);&#xD;&#xA;&#xD;&#xA;That being said, if that's what happens in the D3DXVECTOR3 implementation, why not return a reference in the case of + operation ?" />
  <row Id="9832" PostHistoryTypeId="1" PostId="4981" RevisionGUID="19ce1dbb-fe97-484c-a793-0c7faeb7ceca" CreationDate="2010-10-29T18:23:58.307" UserId="2469" Text="When to return a reference and when to return a copy ?" />
  <row Id="9833" PostHistoryTypeId="3" PostId="4981" RevisionGUID="19ce1dbb-fe97-484c-a793-0c7faeb7ceca" CreationDate="2010-10-29T18:23:58.307" UserId="2469" Text="&lt;c++&gt;&lt;directx&gt;&lt;vector&gt;" />
  <row Id="9834" PostHistoryTypeId="5" PostId="4975" RevisionGUID="5bc2895b-3b91-4de5-a506-8485519c5448" CreationDate="2010-10-29T18:40:17.773" UserId="1199" Comment="added 8 characters in body" Text="[Micropayments][1] - allow users to buy in-game items &amp; perks for tiny sums of money.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Micro_transaction" />
  <row Id="9835" PostHistoryTypeId="2" PostId="4982" RevisionGUID="004f8392-9db8-419f-926b-9ca5ee5c4f20" CreationDate="2010-10-29T19:01:19.570" UserId="2870" Text="In the `operator +=` case, the method is probably modifying the calling object in place. On the other hand, `operator +` is creating a new `D3DXVECTOR3` that is the sum of the calling object and the argument." />
  <row Id="9836" PostHistoryTypeId="2" PostId="4983" RevisionGUID="57bdecb2-1961-4cca-bb5f-8900e315977e" CreationDate="2010-10-29T19:03:25.513" UserId="891" Text="You return a reference to the original vector in a += because you are modifying the actual vector itself and the vector will not fall out of scope.&#xD;&#xA;&#xD;&#xA;While in a + you do not want any modification of the original vector.  Instead a + operator computes a new value and uses copy constructors to return the value.  &#xD;&#xA;&#xD;&#xA;If you would try something like&#xD;&#xA;&#xD;&#xA;D3DXVECTOR3 newVal = D3DXVECTOR3(this-&gt;_x + x, this-&gt;_y + y, this-&gt;_z + z);&#xD;&#xA;return &amp;newVal;&#xD;&#xA;&#xD;&#xA;You would return a reference to a vector which fell out of scope and therefore will be cleaned up very soon." />
  <row Id="9837" PostHistoryTypeId="5" PostId="4983" RevisionGUID="8749215e-da67-4069-87f5-4c7e717fad8a" CreationDate="2010-10-29T19:05:10.813" UserId="51" Comment="added 8 characters in body" Text="You return a reference to the original vector in a += because you are modifying the actual vector itself and the vector will not fall out of scope.&#xD;&#xA;&#xD;&#xA;While in a + you do not want any modification of the original vector.  Instead a + operator computes a new value and uses copy constructors to return the value.  &#xD;&#xA;&#xD;&#xA;If you would try something like&#xD;&#xA;&#xD;&#xA;    D3DXVECTOR3 newVal = D3DXVECTOR3(this-&gt;_x + x, this-&gt;_y + y, this-&gt;_z + z);&#xD;&#xA;    return &amp;newVal;&#xD;&#xA;&#xD;&#xA;You would return a reference to a vector which fell out of scope and therefore will be cleaned up very soon." />
  <row Id="9838" PostHistoryTypeId="2" PostId="4984" RevisionGUID="87a645b6-87e3-4cfc-a4c0-6b5d7d2621e9" CreationDate="2010-10-29T19:09:42.953" UserId="2873" Text="**Why is a reference returned for += ?**&#xD;&#xA;&#xD;&#xA;A reference is returned because the object is (likely) being modified directly, and as such it wouldn't make sense to create a copy for the sole purpose of returning one.&#xD;&#xA;&#xD;&#xA;Note that the reference can still be converted to a copy by other operations (such as =):&#xD;&#xA;&#xD;&#xA;    D3DXVECTOR3 a (1,2,3);&#xD;&#xA;    D3DXVECTOR3 b (1,2,3);&#xD;&#xA;    a+=b;                 //no copy made&#xD;&#xA;    D3DXVECTOR3 c = a+=b; //one copy made&#xD;&#xA;&#xD;&#xA;So this approach (returning by reference) allows for the least amount of work to be done in each situation.&#xD;&#xA;&#xD;&#xA;**Why is a reference NOT returned for + ?**&#xD;&#xA;&#xD;&#xA;A reference is not returned for + because a copy is made as part of the operation, so it's returned. Consider what would happen if you added two D3DXVECTOR3's together, like this: (a + b). Which of the two objects should the result be referencing? Well obviously the answer is neither - the result should be a copy. Hence a copy is returned." />
  <row Id="9839" PostHistoryTypeId="2" PostId="4985" RevisionGUID="b98620a2-4215-418e-9a77-aedbdf03a67b" CreationDate="2010-10-29T19:47:23.667" UserId="891" Text="Typically in C++ game development speed is valued over encapsulation, you therefore see a ton of publicly accessible class members which really shouldn't be public.&#xD;&#xA;&#xD;&#xA;I seem to find in case that only a very select few clases really need to known the inner workings of another classes to the point of modifying or reading their private data.&#xD;&#xA;&#xD;&#xA;Creating public getters/setters for this private data exposes things which really shouldn't be modified willy-nilly.&#xD;&#xA;&#xD;&#xA;Would a compromise here be to use friend classes? or is there some drawback to friend classes I'm not seeing." />
  <row Id="9840" PostHistoryTypeId="1" PostId="4985" RevisionGUID="b98620a2-4215-418e-9a77-aedbdf03a67b" CreationDate="2010-10-29T19:47:23.667" UserId="891" Text="Using &quot;friend&quot; classes in game development" />
  <row Id="9841" PostHistoryTypeId="3" PostId="4985" RevisionGUID="b98620a2-4215-418e-9a77-aedbdf03a67b" CreationDate="2010-10-29T19:47:23.667" UserId="891" Text="&lt;c++&gt;&lt;best-practices&gt;&lt;design-patterns&gt;" />
  <row Id="9842" PostHistoryTypeId="2" PostId="4986" RevisionGUID="b01df156-f42f-4f23-a164-9d44ce1b3d20" CreationDate="2010-10-29T20:15:56.540" UserId="2710" Text=" 1. Subscription. The easiest model, where you simply require a sum of money from your players each month. Monthly payments are most common, but variants exist. Most famous example - WoW.&#xD;&#xA; 2. Freemium subscription. Essentially the same as subscription, but players CAN play for free with some limitations. For example, non-paying players can't visit all locations, or reach maximum level, or somesuch. Dungeon runners used this model, and Dofus IIRC.&#xD;&#xA; 3. Box sales. You simply sell boxed version of your game for some fixed amount, and let players who bought it play forever after. Guild Wars does it; also this model is common among team shooters like TF2 and COD:MW2.&#xD;&#xA; 4. In-game advertising. Show some ads to players and hope they bring enough money. I'm not aware of games that use advertising as a single, or biggest, source of income.&#xD;&#xA; 5. Microtransactions. You sell some virtual items to your players for trivial (or sometimes not) amounts of cash. Some games only sell &quot;cosmetic&quot; items that do not affect gameplay; some sell &quot;helpers&quot; that make the game a little easier; still others sell all kind of game-breaking uber-weapons and such. Almost all Asian games use this model extensively. &#xD;&#xA; 6. Virtual currency. A very special case of microtransactions, this is where in-game virtual currency has a fixed rate of exchange with real-world currency, and can be exchanged both ways. The only game that does it, as far as I know, is Entropia Universe.&#xD;&#xA; 7. Server leasing. You sell virtual space in your game, allowing players to have their own place in the game. Second Life uses this model.&#xD;&#xA;&#xD;&#xA;That's all I can think of at the moment, but I'm sure I missed several more." />
  <row Id="9843" PostHistoryTypeId="2" PostId="4987" RevisionGUID="06b946c6-9f97-445e-a5f6-24639f020894" CreationDate="2010-10-29T20:17:10.087" UserId="51" Text="There are two major drawbacks to friending classes.&#xD;&#xA;&#xD;&#xA; 1. You can't pick and choose what you want to expose to your friends.  It's all or nothing.  This can prove problematic if you're trying to enforce mandatory use of some kind of non-inconsequential setter.&#xD;&#xA; 2. Your two classes are now somewhat coupled in the sense that the friend-er knows about the friend.&#xD;&#xA; &#xD;&#xA;That being said, using friend classes can definitely improve encapsulation, especially if the alternative is public getters/setters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, related question on SO: http://stackoverflow.com/questions/521754/when-to-use-friend-class-in-c&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9844" PostHistoryTypeId="5" PostId="4986" RevisionGUID="32e67d7d-8342-454d-989e-94c263b72ece" CreationDate="2010-10-29T20:28:20.667" UserId="2710" Comment="added 2 more" Text=" 1. Subscription. The easiest model, where you simply require a sum of money from your players each month. Monthly payments are most common, but variants exist. Most famous example - WoW.&#xD;&#xA; 2. Freemium subscription. Essentially the same as subscription, but players CAN play for free with some limitations. For example, non-paying players can't visit all locations, or reach maximum level, or somesuch. Dungeon runners used this model, and Dofus IIRC.&#xD;&#xA; 3. Box sales. You simply sell boxed version of your game for some fixed amount, and let players who bought it play forever after. Guild Wars does it; also this model is common among team shooters like TF2 and COD:MW2.&#xD;&#xA; 4. In-game advertising. Show some ads to players and hope they bring enough money. I'm not aware of games that use advertising as a single, or biggest, source of income.&#xD;&#xA; 5. Microtransactions. You sell some virtual items to your players for trivial (or sometimes not) amounts of cash. Some games only sell &quot;cosmetic&quot; items that do not affect gameplay; some sell &quot;helpers&quot; that make the game a little easier; still others sell all kind of game-breaking uber-weapons and such. Almost all Asian games use this model extensively. &#xD;&#xA; 6. Virtual currency. A very special case of microtransactions, this is where in-game virtual currency has a fixed rate of exchange with real-world currency, and can be exchanged both ways. The only game that does it, as far as I know, is Entropia Universe.&#xD;&#xA; 7. Server leasing. You sell virtual space in your game, allowing players to have their own place in the game. Second Life uses this model.&#xD;&#xA; 8. Merchandise. The game itself is free, and you make money by selling game-related merchandise like posters and t-shirts and the like. Kingdom of Loathing is a game that uses this model.&#xD;&#xA; 9. Offer walls. A kind of microtransactions, but instead of selling items for cash, you show your players a &quot;wall&quot; of offers from your partners. Something like &quot;Participate in this online survey, and receive some in-game currency&quot;. D&amp;D Online had it at one time, and a lot of social games use this model in addition to simple microtransactions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That's all I can think of at the moment, but I'm sure I missed several more." />
  <row Id="9845" PostHistoryTypeId="2" PostId="4988" RevisionGUID="7eddf08d-5ac8-4c04-b8c3-04af17c4539c" CreationDate="2010-10-29T21:23:17.247" UserId="1687" Text="You could try submitting the data from the microphone to a [Dynamic Sound Effect][1]. I havem't tested this to make sure it works, but it sounds like it should.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.dynamicsoundeffectinstance_members.aspx" />
  <row Id="9846" PostHistoryTypeId="5" PostId="4988" RevisionGUID="45116ebc-8060-4c45-8fe2-536968380a0c" CreationDate="2010-10-29T21:31:08.537" UserId="1687" Comment="added 790 characters in body" Text="You could try submitting the data from the microphone to a [Dynamic Sound Effect][1].&#xD;&#xA;&#xD;&#xA;I just wrote some code to test this, it works.&#xD;&#xA;&#xD;&#xA;    DynamicSoundEffectInstance sound;&#xD;&#xA;    &#xD;&#xA;    protected override void Initialize()&#xD;&#xA;    {&#xD;&#xA;        sound = new DynamicSoundEffectInstance(Microphone.Default.SampleRate, AudioChannels.Mono);&#xD;&#xA;    &#xD;&#xA;        Microphone.Default.BufferReady += (a, b) =&gt;&#xD;&#xA;        {&#xD;&#xA;            byte[] data = new byte[Microphone.Default.GetSampleSizeInBytes(Microphone.Default.BufferDuration)];&#xD;&#xA;            Microphone.Default.GetData(data);&#xD;&#xA;    &#xD;&#xA;            sound.SubmitBuffer(data);&#xD;&#xA;        };&#xD;&#xA;        Microphone.Default.Start();&#xD;&#xA;    &#xD;&#xA;        base.Initialize();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        if (gameTime.TotalGameTime.TotalSeconds &gt; 5)&#xD;&#xA;        {&#xD;&#xA;            Microphone.Default.Stop();&#xD;&#xA;            sound.Play();&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        base.Update(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.dynamicsoundeffectinstance_members.aspx" />
  <row Id="9847" PostHistoryTypeId="5" PostId="4790" RevisionGUID="5aa4c489-378f-4cc1-95be-eea62d17ccfe" CreationDate="2010-10-29T21:36:32.387" UserId="101" Comment="added 382 characters in body" Text="[Scaleform GFx][1] is a commercial middleware library for integrating Adobe Flash movies (optimized rendering, ActionScript, and more) into your engine.&#xD;&#xA;&#xD;&#xA;In a past life, Scaleform GFx's codebase was that of [GameSWF][2]. GameSWF is open source.&#xD;&#xA;&#xD;&#xA;I planned to add more to this answer, but by the time I got back to it, most of main points I wanted to hit on were mentioned in other answers.&#xD;&#xA;&#xD;&#xA;The only other thing I can think to mention that's relevant to the Flash-based approach is the fact that Adobe has released the source code to their ActionScript virtual machine, which now lives at the [Tamarin Project][3] at Mozilla.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scaleform.com/products/gfx &quot;Scaleform GFx product page&quot;&#xD;&#xA;  [2]: http://tulrich.com/geekstuff/gameswf.html &quot;GameSWF home page&quot;&#xD;&#xA;  [3]: http://www.mozilla.org/projects/tamarin/" />
  <row Id="9848" PostHistoryTypeId="5" PostId="4274" RevisionGUID="aa9280da-1d39-4961-ad36-3bcfa2e821a6" CreationDate="2010-10-29T21:55:22.370" UserId="2390" Comment="edited body" Text="If the formula is defined, just invert the formula to find the xp-to-level conversion. If you can't invert the formula, then use a [binary search][1] to find the level. This assumes that more xp always correlates with a higher level, but I think this is a safe assumption for most levelling systems :)&#xD;&#xA;&#xD;&#xA;If you have a table instead (and you are using C++) then you can use `std::lower_bound` to find the corresponding level for XP:&#xD;&#xA;&#xD;&#xA;    const int numLevels = 6;&#xD;&#xA;    int xpForLevel[numLevels] = {100, 200, 400, 800, 1600, 3200};&#xD;&#xA;    int* it = std::lower_bound(xpForLevel, xpForLevel + numLevels, xp);&#xD;&#xA;    int level = it - xpForLevel;&#xD;&#xA;&#xD;&#xA;This will work in O(log(n)) time for n levels, so it's fast enough for pretty much any use.&#xD;&#xA;&#xD;&#xA;Note, if the given `xp` is less than that required for the lowest level, then `lower_bound` will return `xpForLevel + numLevels`.&#xD;&#xA;&#xD;&#xA;If you want to find the XP required for the *next* level up, use `upper_bound`.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_search_algorithm" />
  <row Id="9849" PostHistoryTypeId="5" PostId="4970" RevisionGUID="aa73c35d-5f8f-4bc0-9dc5-be5e843d8979" CreationDate="2010-10-29T22:36:46.513" UserId="189" Comment="you're -&gt; your" Text="Here are the general steps I would go through:&#xD;&#xA;&#xD;&#xA; 1. **Understand what your goal is** - Without a clear understanding of what you're trying to achieve, you'll have a hard time completing a project of any scale.&#xD;&#xA; 2. **Write the rules down on paper** -  Every system has rules. Take the time to write them down in bullet format. This will get your brain thinking about the logic, and will provide you with a handy reference to use later on.&#xD;&#xA; 3. **Rewrite the rules to follow the programmatic flow** - Keep the rules in bullet format, but reorder and indent them, so they form an outline of the programmatic flow.&#xD;&#xA; 4. **Write the pseudo-code** - Using your outline as reference, write out the pseudo code.&#xD;&#xA; 5. **Create the classes** - Make a list of classes you'll need, based on your pseudo code, and implement them.&#xD;&#xA; 6. **Replace your pseudo-code with code**&#xD;&#xA;&#xD;&#xA;The process is a little slow, but it has a number of benefits to someone in your situation:&#xD;&#xA;&#xD;&#xA; - Each step creates documentation that can be referenced in future steps&#xD;&#xA; - You have multiple opportunities to catch mistakes in your logic before you ever touch code&#xD;&#xA; - It's very easy to see how logic should breakdown into code" />
  <row Id="9850" PostHistoryTypeId="5" PostId="4985" RevisionGUID="7765634e-8645-4f90-8b75-50ac4cecffbb" CreationDate="2010-10-30T00:16:55.653" UserId="891" Comment="added 6 characters in body" Text="Typically in C++ game development speed is valued over encapsulation, you therefore see a ton of publicly accessible class members which really shouldn't be public.&#xD;&#xA;&#xD;&#xA;I seem to find in most cases that only a very select few clases really need to known the inner workings of another classes to the point of modifying or reading their private data.&#xD;&#xA;&#xD;&#xA;Creating public getters/setters for this private data exposes things which really shouldn't be modified willy-nilly.&#xD;&#xA;&#xD;&#xA;Would a compromise here be to use friend classes? or is there some drawback to friend classes I'm not seeing." />
  <row Id="9851" PostHistoryTypeId="2" PostId="4989" RevisionGUID="7b12c04f-2c44-406c-918c-94fa6db2c678" CreationDate="2010-10-30T01:00:48.767" UserId="1581" Text="Encapsulation is nice, but separation of concerns is nicer.&#xD;&#xA;&#xD;&#xA;A class accessing &quot;some private part&quot; of other class could indicate that the code isn't well designed in the first place.&#xD;&#xA;&#xD;&#xA;Every time you find yourself in the &quot;gosh, I need to make a friend class here&quot; spot, the question you should ask yourself is &quot;am I doing this correctly, or is there a cleaner way?&quot; (a.k.a. &quot;Is this going to bite me in the ass later on?&quot;).&#xD;&#xA;&#xD;&#xA;If you are sure about the &quot;friendliness&quot;, put it there without hesitation.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9852" PostHistoryTypeId="2" PostId="4990" RevisionGUID="dd4cd666-b586-47a2-b811-eb5c0bc31227" CreationDate="2010-10-30T01:17:18.840" UserId="2837" Text="My problem is this. I have a simple box made in 3DS Max 2009, the Box is 10x10x10. I've tried to load it on XNA and traslate the camera for 15 units, but I can seem to find the values needed to see the box properly. Can anyone point me to a good resource where I can find some good introduction to XNA coordinate system and how is a simple box made in 3DS Max imported properly&#xD;&#xA;&#xD;&#xA;Best regards,&#xD;&#xA;David" />
  <row Id="9853" PostHistoryTypeId="1" PostId="4990" RevisionGUID="dd4cd666-b586-47a2-b811-eb5c0bc31227" CreationDate="2010-10-30T01:17:18.840" UserId="2837" Text="Coordinates from 3DS to XNA 3.5 " />
  <row Id="9854" PostHistoryTypeId="3" PostId="4990" RevisionGUID="dd4cd666-b586-47a2-b811-eb5c0bc31227" CreationDate="2010-10-30T01:17:18.840" UserId="2837" Text="&lt;xna&gt;&lt;3d&gt;&lt;c#&gt;&lt;coordinates&gt;" />
  <row Id="9855" PostHistoryTypeId="2" PostId="4991" RevisionGUID="8c6e5eb4-a538-4754-a28d-58c3fbaf7242" CreationDate="2010-10-30T02:24:21.050" UserId="2290" Text="According to the [MSDN][3]:&#xD;&#xA;&#xD;&#xA;&gt; The XNA Framework uses a&#xD;&#xA;&gt; [right-handed coordinate system][4],&#xD;&#xA;&gt; with the positive z-axis pointing&#xD;&#xA;&gt; toward the observer when the positive&#xD;&#xA;&gt; x-axis is pointing to the right, and&#xD;&#xA;&gt; the positive y-axis is pointing up.&#xD;&#xA;&#xD;&#xA;[Here is a video][1] on how to export animated 3d meshes from 3DS Max to XNA, using [kW X-port][2], which is a quick and easy way of exporting 3d meshes as DirectX .x model files and loading them into XNA using the SkinnedModelProcessor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=h5gmTpvlFZI&#xD;&#xA;  [2]: http://www.kwxport.org/&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb203910.aspx&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions" />
  <row Id="9856" PostHistoryTypeId="2" PostId="4992" RevisionGUID="d54728ea-1018-4e16-9e8e-63a43f7bb826" CreationDate="2010-10-30T02:25:43.993" UserId="1794" Text="I'm interested in adding to my game either recorded human or synthesized speech. I'm interested in what game devs have to say regarding the value of recorded human voice over voice synthesis. Thanks in advance!&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Points to consider:&#xD;&#xA;&#xD;&#xA; - I searched the responses for [Is it worthwhile recording your own or buying stock sound effects?](http://gamedev.stackexchange.com/q/3876/1794) - I'm basically wondering the same thing but for voice-specific solutions.&#xD;&#xA; - Did you find value or any benefit in opting for recorded human voice?&#xD;&#xA; - What are some good voice synthesis or text-to-speech tools (preferably free)? I'm currently trying out Fruity Loops, which seems to get the job done (I input a phrase and it generates synthesized speech) however some words do not sound as realistic/convincing as others.&#xD;&#xA; - Consider that the platform is Android (i.e. memory constraints).&#xD;&#xA;" />
  <row Id="9857" PostHistoryTypeId="1" PostId="4992" RevisionGUID="d54728ea-1018-4e16-9e8e-63a43f7bb826" CreationDate="2010-10-30T02:25:43.993" UserId="1794" Text="Recorded Voice or Synthesized Speech?" />
  <row Id="9858" PostHistoryTypeId="3" PostId="4992" RevisionGUID="d54728ea-1018-4e16-9e8e-63a43f7bb826" CreationDate="2010-10-30T02:25:43.993" UserId="1794" Text="&lt;android&gt;&lt;audio&gt;&lt;voice&gt;" />
  <row Id="9859" PostHistoryTypeId="16" PostId="4969" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-30T02:25:47.600" UserId="51" />
  <row Id="9860" PostHistoryTypeId="16" PostId="4973" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-30T02:25:47.600" UserId="51" />
  <row Id="9861" PostHistoryTypeId="16" PostId="4975" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-30T02:25:47.600" UserId="51" />
  <row Id="9862" PostHistoryTypeId="16" PostId="4986" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-30T02:25:47.600" UserId="51" />
  <row Id="9863" PostHistoryTypeId="16" PostId="4968" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-30T02:25:47.600" UserId="51" />
  <row Id="9864" PostHistoryTypeId="2" PostId="4993" RevisionGUID="90e3de2a-26fa-4cd8-a412-c6046fa82e80" CreationDate="2010-10-30T02:32:11.273" UserId="962" Text="**I would rather read than have to listen to a synthesized voice.** &#xD;&#xA;&#xD;&#xA;Android where space is at a premium, I don't think any speech would worth the size penalty, but if you had to have speech, use a real human's voice.&#xD;&#xA;&#xD;&#xA;The only reason to have synthesized voices is generating them live to save space, but on android were you are also limited on processing power, you will not want to generate speech live." />
  <row Id="9865" PostHistoryTypeId="5" PostId="4992" RevisionGUID="b4f307bd-4cb5-413d-9ced-686671db74b9" CreationDate="2010-10-30T02:36:50.130" UserId="1794" Comment="clarification, forgot key info" Text="I'm interested in adding to my game either recorded human or synthesized speech. I'm interested in what game devs have to say regarding the value of recorded human voice over voice synthesis. Thanks in advance!&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Points to consider:&#xD;&#xA;&#xD;&#xA; - I searched the responses for [Is it worthwhile recording your own or buying stock sound effects?](http://gamedev.stackexchange.com/q/3876/1794) - I'm basically wondering the same thing but for voice-specific solutions.&#xD;&#xA; - Did you find value or any benefit in opting for recorded human voice?&#xD;&#xA; - What are some good voice synthesis or text-to-speech tools (preferably free)? I'm currently trying out Fruity Loops, which seems to get the job done (I input a phrase and it generates synthesized speech) however some words do not sound as realistic/convincing as others.&#xD;&#xA; - The platform is Android (i.e. memory constraints).&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA; - The game is meant for kids (i.e. when you see an image of apple, a voice says &quot;a is for apple&quot;)" />
  <row Id="9866" PostHistoryTypeId="5" PostId="4992" RevisionGUID="7fc7a617-d46a-40a4-87be-ed84e61ed6c9" CreationDate="2010-10-30T02:42:03.277" UserId="1794" Comment="point to game on appbrain; deleted 1 characters in body" Text="I'm interested in adding to my game either recorded human or synthesized speech. I'm interested in what game devs have to say regarding the value of recorded human voice over voice synthesis. Thanks in advance!&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Points to consider:&#xD;&#xA;&#xD;&#xA; - I searched the responses for [Is it worthwhile recording your own or buying stock sound effects?](http://gamedev.stackexchange.com/q/3876/1794) - I'm basically wondering the same thing but for voice-specific solutions.&#xD;&#xA; - Did you find value or any benefit in opting for recorded human voice?&#xD;&#xA; - What are some good voice synthesis or text-to-speech tools (preferably free)? I'm currently trying out Fruity Loops, which seems to get the job done (I input a phrase and it generates synthesized speech) however some words do not sound as realistic/convincing as others.&#xD;&#xA; - The platform is Android (i.e. memory constraints).&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA; - The game is meant for kids (i.e. when you see an image of apple, a voice says &quot;a is for apple&quot;) - here it is on [Appbrain][1] (currently sans audio...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.appbrain.com/app/letter-baby-free-beta/processing.android.test.letterbaby" />
  <row Id="9867" PostHistoryTypeId="2" PostId="4994" RevisionGUID="f4428a93-67a2-400d-8091-6f6b20525cb8" CreationDate="2010-10-30T02:50:10.970" UserId="2290" Text="Recorded Speech&#xD;&#xA;----&#xD;&#xA;- Pros&#xD;&#xA; - Potential for higher quality audio&#xD;&#xA; - Can capture emotion and emphasis&#xD;&#xA;- Cons&#xD;&#xA; - Requires voice talent&#xD;&#xA; - More memory intensive&#xD;&#xA;&#xD;&#xA;Text to Speech&#xD;&#xA;----&#xD;&#xA;- Pros&#xD;&#xA; - Generated at runtime&#xD;&#xA; - Can more easily support multiple languages (with translated text)&#xD;&#xA;- Cons&#xD;&#xA; - More processor intensive&#xD;&#xA; - Audio feels robotic&#xD;&#xA;&#xD;&#xA;If memory is a major concern, I would consider replacing speech with text, or possibly providing an option for players to turn on text to speech. On platforms where memory is limited, your audio budget is *much* better spent on background music and sound effects." />
  <row Id="9868" PostHistoryTypeId="12" PostId="4994" RevisionGUID="e83e1848-cfa7-4899-b66a-96d144d83e59" CreationDate="2010-10-30T02:51:10.860" UserId="2290" Text="[{&quot;Id&quot;:2290,&quot;DisplayName&quot;:&quot;Ari Patrick&quot;}]" />
  <row Id="9869" PostHistoryTypeId="13" PostId="4994" RevisionGUID="f164df47-8719-4b81-bf47-1f5f916bd705" CreationDate="2010-10-30T02:51:27.223" UserId="2290" Text="[{&quot;Id&quot;:2290,&quot;DisplayName&quot;:&quot;Ari Patrick&quot;}]" />
  <row Id="9870" PostHistoryTypeId="12" PostId="4994" RevisionGUID="7c2861ef-3a97-40a8-99d8-e67011b08238" CreationDate="2010-10-30T02:51:41.263" UserId="2290" Text="[{&quot;Id&quot;:2290,&quot;DisplayName&quot;:&quot;Ari Patrick&quot;}]" />
  <row Id="9871" PostHistoryTypeId="13" PostId="4994" RevisionGUID="79475697-3ed6-4a3e-b84d-6b1a8ef5c9d0" CreationDate="2010-10-30T02:51:54.917" UserId="2290" Text="[{&quot;Id&quot;:2290,&quot;DisplayName&quot;:&quot;Ari Patrick&quot;}]" />
  <row Id="9872" PostHistoryTypeId="12" PostId="4994" RevisionGUID="282f67a3-9a62-44ce-b009-28f445bfd45f" CreationDate="2010-10-30T02:51:58.130" UserId="2290" Text="[{&quot;Id&quot;:2290,&quot;DisplayName&quot;:&quot;Ari Patrick&quot;}]" />
  <row Id="9873" PostHistoryTypeId="13" PostId="4994" RevisionGUID="66bb0fdf-1c87-4ff5-9575-db6210903745" CreationDate="2010-10-30T02:52:00.390" UserId="2290" Text="[{&quot;Id&quot;:2290,&quot;DisplayName&quot;:&quot;Ari Patrick&quot;}]" />
  <row Id="9874" PostHistoryTypeId="5" PostId="4994" RevisionGUID="efc2a90c-171b-4055-bde0-024ef4008517" CreationDate="2010-10-30T02:59:30.273" UserId="2290" Comment="Updating answer to better fit the updated question; added 5 characters in body; added 3 characters in body" Text="For the type of game you are creating, I would say that some form of audio is a must! From a development perspective, I would go with synthetic speech, as the words and sentences are fairly simple, reducing the chances of your audio sounding &quot;robotic&quot;. One thing you'll have to pay very close attention to is how the speech system pronounces each word. If it pronounces any word in a sentence incorrectly, you'll have to either &quot;con&quot; the system into pronouncing words the right way, or pick new words. With your target demographic being toddlers, you **cannot** afford to have mispronounced words in your game." />
  <row Id="9875" PostHistoryTypeId="5" PostId="4992" RevisionGUID="a90a2581-b238-4c24-908c-72cdfe1858eb" CreationDate="2010-10-30T03:22:09.840" UserId="1794" Comment="added 14 characters in body; added 7 characters in body" Text="I'm interested in adding to my game either recorded human or synthesized speech. I'm interested in what game devs have to say regarding the value of recorded human voice over voice synthesis. Thanks in advance!&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Points to consider:&#xD;&#xA;&#xD;&#xA; 1. **EDIT:** First and foremost, the game is meant for kids (i.e. when you see an image of an apple, a voice says &quot;a is for apple&quot;) - here it is on [Appbrain][1] (currently sans audio...)&#xD;&#xA; 2.  I searched the responses for [Is it worthwhile recording your own or buying stock sound effects?](http://gamedev.stackexchange.com/q/3876/1794) - I'm basically wondering the same thing but for voice-specific audio.&#xD;&#xA; 3.  Do you find value or any benefit in opting for recorded human voice?&#xD;&#xA; 4.  What are some good voice synthesis or text-to-speech tools (preferably free)? I'm currently trying out Fruity Loops, which seems to get the job done (I input a phrase and it generates synthesized speech) however some words do not sound as realistic/convincing as others.&#xD;&#xA; 5. The platform is Android (i.e. memory constraints).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.appbrain.com/app/letter-baby-free-beta/processing.android.test.letterbaby" />
  <row Id="9876" PostHistoryTypeId="2" PostId="4995" RevisionGUID="cdaa2335-b276-45ad-bdcf-1d9e8eceff04" CreationDate="2010-10-30T03:53:58.203" UserId="171" Text="In my 2D game I have AI turrets that should assist the player by automatically firing towards enemies. I would like to make them fire intelligently and lead their target instead of just targeting an enemy's current position. So, given the (always constant) velocity and position vector of both the enemy and the turret's projectile, how can I find a vector that represents the actual position the turret must target in order for the projectile to intersect (and hit) the enemy? &#xD;&#xA;&#xD;&#xA;Any links to articles that describe the math, algorithms, etc. would be appreciated!&#xD;&#xA;" />
  <row Id="9877" PostHistoryTypeId="1" PostId="4995" RevisionGUID="cdaa2335-b276-45ad-bdcf-1d9e8eceff04" CreationDate="2010-10-30T03:53:58.203" UserId="171" Text="Predicting enemy position in order to have an object lead its target" />
  <row Id="9878" PostHistoryTypeId="3" PostId="4995" RevisionGUID="cdaa2335-b276-45ad-bdcf-1d9e8eceff04" CreationDate="2010-10-30T03:53:58.203" UserId="171" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;aiming&gt;" />
  <row Id="9879" PostHistoryTypeId="2" PostId="4996" RevisionGUID="72f7ac46-6282-413a-a1bb-d9344a392b51" CreationDate="2010-10-30T04:11:08.973" UserDisplayName="chl" Text="You could give Squid a try.&#xD;&#xA;It's an engine independent gui sdk for .net (written by me :P).&#xD;&#xA;Over here: http://www.ionstar.org/?page_id=4" />
  <row Id="9880" PostHistoryTypeId="2" PostId="4997" RevisionGUID="068c7f59-8b93-4bf5-b34b-8324a18940c8" CreationDate="2010-10-30T04:25:53.897" UserId="2290" Text="[This question on GameDev][1], and [this question on StackOverflow][2] should provide you with the answer you're looking for. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1885/target-tracking-when-to-accelerate-and-decelerate-a-rotating-turret&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2248876/2d-game-fire-at-a-moving-target-by-predicting-intersection-of-projectile-and-un" />
  <row Id="9881" PostHistoryTypeId="5" PostId="4993" RevisionGUID="f9a04227-86e0-4523-b67c-3de8c179b1a3" CreationDate="2010-10-30T05:38:04.550" UserId="962" Comment="added 244 characters in body" Text="**I would rather read than have to listen to a synthesized voice.** &#xD;&#xA;&#xD;&#xA;Android where space is at a premium, I don't think any speech would worth the size penalty, but if you had to have speech, use a real human's voice.&#xD;&#xA;&#xD;&#xA;The only reason to have synthesized voices is generating them live to save space, but on android were you are also limited on processing power, you will not want to generate speech live.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Edit*:&#xD;&#xA;&#xD;&#xA;*For your game you might want to look into the build in voice support, or use one of those libraries, as it seems that your game will not require extreme performance, so using a bit of CPU for voice generation should be fine.* " />
  <row Id="9882" PostHistoryTypeId="2" PostId="4998" RevisionGUID="452f939b-2bcd-4f8d-9114-89af977f3efa" CreationDate="2010-10-30T07:14:17.657" UserId="1829" Text="I'd say the most important are:&#xD;&#xA;&#xD;&#xA;Sound&#xD;&#xA;Physics&#xD;&#xA;Networking&#xD;&#xA;&#xD;&#xA;Of course, depending of the kind of game you want to do, you have to choose how to implement the game architecture and the AI. I don't really know if there is a common way to program AIs of such or such kind. And you may also strike out networking if you want to make a solo game.&#xD;&#xA;&#xD;&#xA;Of course there are dozens and dozens of other feature you might want to implement in a game engine, but those are subject to how you plan to design your game engine. Things like game file loading, GUI...&#xD;&#xA;&#xD;&#xA;Sound: Fmod, IrrKlang&#xD;&#xA;Physics: Havok, Bullet, PhysX&#xD;&#xA;Networking: I don't really know if there exists a popular networking engine... networking in a game has already several architectures to choose from and even then, it depends a lot on the architecture of the game (I think)." />
  <row Id="9883" PostHistoryTypeId="2" PostId="4999" RevisionGUID="d8e48e90-33ac-4dac-9ffe-77a1a2450e7b" CreationDate="2010-10-30T09:10:16.310" UserId="2815" Text="Also consider if you want to port it to other languages.  Though that will take so much more if you don't speak that language yourself.&#xD;&#xA;&#xD;&#xA;Speech synthesizing for non-english are limited as I understand it.  And if you don't speak that language yourself you need to hire someone to either validate the synthesized speach or record their speach.&#xD;&#xA;&#xD;&#xA;However, if the synthesize engine is just as good in spanish as it is for english, then porting for that language will be very cheap." />
  <row Id="9884" PostHistoryTypeId="5" PostId="4950" RevisionGUID="d2c16536-da95-4cb8-bd8e-90457b41d705" CreationDate="2010-10-30T09:45:37.563" UserId="2887" Comment="added 95 characters in body" Text="Here are some examples of (open source) games that use scripting to implement entity behaviour:&#xD;&#xA;&#xD;&#xA;[Frogato][1] implements entities using a custom scripting language.&#xD;&#xA;[Battle for Wesnoth][2] implements entities using a custom description language in which Lua scripts can be embedded.&#xD;&#xA;[KQ][3] implements entity behaviour using Lua scripts.&#xD;&#xA;&#xD;&#xA;Edit: Posted links not that I'm allowed to...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.frogatto.com/&#xD;&#xA;  [2]: http://www.wesnoth.org/&#xD;&#xA;  [3]: http://kqlives.sourceforge.net/" />
  <row Id="9885" PostHistoryTypeId="2" PostId="5000" RevisionGUID="7b3908e4-1db9-47c2-b7da-9ee561a2871e" CreationDate="2010-10-30T09:57:58.333" UserId="2862" Text="I'm looking forward to buying an Xbox 360 Slim 4GB to get started with XNA development. Can I develop games/apps on my Windows PC and [deploy][1] them to the Xbox without a Creators Club subscription? I'm not looking at publishing my work or putting it up on a marketplace.&#xD;&#xA;&#xD;&#xA;And does this model of Xbox 360 support game deployment and storage? I heard that it doesn't. Can anyone confirm which model of Xbox I should purchase to begin XNA development? If I buy the 4GB Slim what development features would not be supported?&#xD;&#xA;&#xD;&#xA;&gt; The new Xbox 360 4GB Slim does not support XNA development without a harddrive. – [Arriu][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb975643.aspx&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/users/2345/arriu" />
  <row Id="9886" PostHistoryTypeId="1" PostId="5000" RevisionGUID="7b3908e4-1db9-47c2-b7da-9ee561a2871e" CreationDate="2010-10-30T09:57:58.333" UserId="2862" Text="Can I develop XNA games without a subscription?" />
  <row Id="9887" PostHistoryTypeId="3" PostId="5000" RevisionGUID="7b3908e4-1db9-47c2-b7da-9ee561a2871e" CreationDate="2010-10-30T09:57:58.333" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;" />
  <row Id="9888" PostHistoryTypeId="5" PostId="5000" RevisionGUID="ffd90f35-8cac-4594-a755-a176276bc066" CreationDate="2010-10-30T10:04:02.810" UserId="2862" Comment="added 285 characters in body; added 11 characters in body" Text="I'm looking forward to buying an Xbox 360 Slim 4GB to get started with XNA development. Can I develop games/apps on my Windows PC and [deploy][1] them to the Xbox without a Creators Club subscription? I'm not looking at publishing my work or putting it up on a marketplace.&#xD;&#xA;&#xD;&#xA;And does this model of Xbox 360 support game deployment and storage? I heard that it doesn't. Can anyone confirm which model of Xbox I should purchase to begin XNA development? If I buy the 4GB Slim what development features would not be supported?&#xD;&#xA;&#xD;&#xA;[One MSDN deployment article][2] says:&#xD;&#xA;&#xD;&#xA;&gt; At the very least, you will need a Silver Xbox LIVE membership, an XNA Creators Club premium membership, and a hard drive for your Xbox 360 console to be able to develop games for Xbox 360 using XNA Game Studio. &#xD;&#xA;&#xD;&#xA;Another [deployment technique article][3] is a little ambiguous.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb975643.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb975643.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb203929.aspx" />
  <row Id="9889" PostHistoryTypeId="2" PostId="5001" RevisionGUID="6e249bc3-ef5a-408f-a9f6-b9c7c162fb52" CreationDate="2010-10-30T11:07:12.253" UserId="281" Text="If you're a student, head over to www.dreamspark.com and you can get a free one year Creators Club subscription. It doesn't include access to the premium materials on the website, but it is enough to deploy to your 360." />
  <row Id="9890" PostHistoryTypeId="2" PostId="5002" RevisionGUID="5ea6eab4-7200-40fb-a065-68ce8da33546" CreationDate="2010-10-30T11:41:59.003" UserId="744" Text="Another option is to use the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pimpl&quot;&gt;PIMPL idiom&lt;/a&gt;, where part of the structure's implementation is a pointer to another type. Most users of the class will just include the normal header file, where the implementation is an opaque pointer. Classes that need access to the private data can include the header defining the other type, and use the interface it provides.&#xD;&#xA;&#xD;&#xA;This a common pattern for C programmers wanting friend-like functionality. In my opinion it also hews more closely to thinking about &lt;a href=&quot;http://en.wikipedia.org/wiki/Separation_of_concerns&quot;&gt;separation of concerns&lt;/a&gt; (a generally good design principle that leads to reusable, orthogonal code) rather than encapsulation (an OO-specific technique that is useful for implementing separation of concerns, but also often misused to overcomplicate things).&#xD;&#xA;&#xD;&#xA;It has an advantage over friend that it doesn't couple the friend-er to the friend-ee at all. Some people might claim that's a disadvantage, since now anyone can &quot;friend&quot; your class. I think that's an unwarranted fear, since you're still making the relationship explicit (by including the header). If you're afraid of that, you're afraid of your (or your coworker's) ability to make smart architectural decisions. But if you can't make those decisions properly later, why are you trusting yourself with `friend` now?&#xD;&#xA;&#xD;&#xA;It has a disadvantage of runtime cost. By storing the data in a pointer you have worse cache coherency and more allocation counts, and you also need a destructor to clean it up." />
  <row Id="9891" PostHistoryTypeId="2" PostId="5003" RevisionGUID="9160e162-5eb8-47b4-b256-ca7c79b24194" CreationDate="2010-10-30T11:45:30.340" UserDisplayName="Shakiru" Text="I have a game concept which i wish to develop but dont have the funding to begin it. what should i do?" />
  <row Id="9892" PostHistoryTypeId="1" PostId="5003" RevisionGUID="9160e162-5eb8-47b4-b256-ca7c79b24194" CreationDate="2010-10-30T11:45:30.340" UserDisplayName="Shakiru" Text="NEW GAME CONCEPT TO REACH OVER FIVE MILLION PEOPLE" />
  <row Id="9893" PostHistoryTypeId="3" PostId="5003" RevisionGUID="9160e162-5eb8-47b4-b256-ca7c79b24194" CreationDate="2010-10-30T11:45:30.340" UserDisplayName="Shakiru" Text="&lt;game-design&gt;" />
  <row Id="9896" PostHistoryTypeId="2" PostId="5005" RevisionGUID="eeb186b9-fdd3-4bde-8b6d-a4c149eede83" CreationDate="2010-10-30T12:59:18.857" UserId="2239" Text="I recall [this tutorial][1] being quite helpful in learning to refactor and (re)structure code - while doing something fun (physics engine with opengl visualisation). I especially enjoy the way test-driven development is introduced in a fairly practically way..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.taumuon.co.uk/jabuka/index.html" />
  <row Id="9897" PostHistoryTypeId="2" PostId="5006" RevisionGUID="0477d101-1eb6-42ca-a017-ad62668a3500" CreationDate="2010-10-30T14:06:10.720" UserId="14" Text="I recommend that first, you really evaluate your concept. What are the issues in funding it? Why do you need someone to fund it, are you capable of building it yourself (or with some friends) sans-funding? &#xD;&#xA;&#xD;&#xA;To put it the best, and nicest way, I can. No one, will fund a AAA quality game (if this is what your concept is in your head) if you don't have a track record of quality selling games.&#xD;&#xA;&#xD;&#xA;So what do you do if you are in that boat? The only way to get funding is to make, well... pretty much all of the game without funding. Then you could get people to possibly reimburse you and handle marketing (but you'd be giving away most of your IP in the process more than likely) but if funding is what you need that's where you are.&#xD;&#xA;&#xD;&#xA;In the event that you need funding to pay people to develop your idea because you are just an idea guy, you are going to need to learn some if not all of the skills (to some capacity) necessary so that you can make the demos that attract people to work on your titles.&#xD;&#xA;&#xD;&#xA;But yes, this question has been asked time and time again. I recommend you read.. well everything here: &#xD;&#xA;&#xD;&#xA;[Sloperama Game Development Advice FAQ][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sloperama.com/advice.html" />
  <row Id="9898" PostHistoryTypeId="6" PostId="5003" RevisionGUID="aa00b578-ef9d-4885-8212-82cda0cd9849" CreationDate="2010-10-30T14:06:49.517" UserId="14" Comment="Making the title look less spam-y" Text="&lt;business&gt;&lt;fund-raising&gt;" />
  <row Id="9899" PostHistoryTypeId="4" PostId="5003" RevisionGUID="aa00b578-ef9d-4885-8212-82cda0cd9849" CreationDate="2010-10-30T14:06:49.517" UserId="14" Comment="Making the title look less spam-y" Text="How to develop a concept to recieve funding?" />
  <row Id="9900" PostHistoryTypeId="2" PostId="5007" RevisionGUID="b4e63789-5d8d-402c-a1f8-14df77a8de2a" CreationDate="2010-10-30T14:16:32.763" UserId="1156" Text="If you're aiming at kids, then I would say human voices are probably the best way to do it.&#xD;&#xA;&#xD;&#xA;First off, there's the pronounciation issues. When I was a lot younger (age 8 or so), I had a lot of fun with some free 'Kids Encyclopedia' disk which had synthesized voice that spoke your name. It wasn't great, and I remember spending a while messing with how badly it pronounced stuff.&#xD;&#xA;&#xD;&#xA;Second off, there is often a great difference between synthesized and human sounding. If it's for kids as young as 'a is for apple' level, then they might either a) be scared or b)not recognize something sounding so different from what they're used to; i.e. parents/guardians.&#xD;&#xA;&#xD;&#xA;Lastly, the price of developing or buying a license for that kind of software is probably much higher than getting a voice actor to do it. Or getting yourself to do it. :)" />
  <row Id="9901" PostHistoryTypeId="2" PostId="5008" RevisionGUID="21447961-35fa-4358-baa0-25e396c7fdc4" CreationDate="2010-10-30T14:34:07.210" UserId="1156" Text="Make sure to know what you're doing. Have a definite plan, design document, whatever - you don't want the problem of 'done that, ooh this sounds good-I'll add this. Oh and this and maybe I'll try adding this thing I just though of'.&#xD;&#xA;&#xD;&#xA;I cannot remember if this is top down or bottom up. It's one of them. But if you're newbie, a very important point is to get stuff done. I mean:&#xD;&#xA;&#xD;&#xA; - Don't spend weeks on a highly generic&#xD;&#xA;   system.&#xD;&#xA; - [Make sure you make your game, not an engine.][1] &#xD;&#xA; - Get stuff on the screen. This is the best way to make sure you stick with it; you'll feel better about having a square moving around shooting red balls than having a 2d sprite animation and component system and not even a window open.&#xD;&#xA;&#xD;&#xA;  [1]: http://scientificninja.com/blog/write-games-not-engines" />
  <row Id="9902" PostHistoryTypeId="2" PostId="5009" RevisionGUID="42b99add-ea5c-430c-a3c0-a8a819e135e6" CreationDate="2010-10-30T14:35:29.807" UserId="2290" Text="Without specific details about your game development background, your game, etc, it is difficult to answer your question. Could you please edit your question with details about the following:&#xD;&#xA;&#xD;&#xA;- What is your game development background?&#xD;&#xA;- Have you ever made a game before?&#xD;&#xA;- Is your current game idea similar (or smaller) in scope to previous games you've developed?&#xD;&#xA;- How large is the game idea scope?&#xD;&#xA;- What **specifically** are you trying to raise funds for?&#xD;&#xA;&#xD;&#xA;Understand that although these questions are fairly personal, they just scratch the surface of what any potential investor might ask. I'm not asking that you disclose your complete game idea, just the information necessary for people here to give you answers that are accurate for your situation.&#xD;&#xA;&#xD;&#xA;Below are some resources I think you may find useful:&#xD;&#xA;&#xD;&#xA;- [Sloperama][1] - Excellent advice for anyone interested or currently working in the game industry&#xD;&#xA;- [Fundraising 101 for the Game Sector][1] - A quick overview of things to know/do, if you want to get funding&#xD;&#xA;- [Global Video Games Investment Review][2] - Analysis of the MMO, casual, mobile, console, and online gambling markets, from an investment perspective&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sloperama.com/advice.html&#xD;&#xA;  [2]: http://www.slideshare.net/pheydon/fundraising-101-for-the-game-sector&#xD;&#xA;  [3]: http://www.slideshare.net/timmerel/global-video-games-investment-review-290310-tim-merel-ibis-capital" />
  <row Id="9904" PostHistoryTypeId="2" PostId="5010" RevisionGUID="8d47aae3-4cf6-446f-a08a-6d937cb91115" CreationDate="2010-10-30T15:02:51.850" UserId="1923" Text="For a particular game, option 1 might be best, for another game, option 2 might be best. I like option 1 in games because of the stress it gives me when I'm down to the wire wondering if I'm going to make it to the checkpoint in time and it adds to the exhilaration of the game when I do. I believe it adds value to the game. It's fun to get that rush of accomplishment and then have to suppress it because you are still racing and have to concentrate to not screw up the next segment. But, of course, it would not be appropriate for a real world sim games like PGR or Forza." />
  <row Id="9905" PostHistoryTypeId="2" PostId="5011" RevisionGUID="deaa3b7a-ef6c-4058-b63c-f2a5d24265ef" CreationDate="2010-10-30T15:53:55.783" UserId="2910" Text="I plan to use XNA to build a game project. I'm not entirely sure at the moment if I want to add multiplayer functionality or not, bearing I have a lot of other problems to solve that I'm still new at. I don't want the project to necessarily get out of hand.&#xD;&#xA;&#xD;&#xA;My question is, If I head into my project with no plan to add multiplayer support, is it easy to go backwards (It's usually not) and add the necessary code to capture a multiplayer game?" />
  <row Id="9906" PostHistoryTypeId="1" PostId="5011" RevisionGUID="deaa3b7a-ef6c-4058-b63c-f2a5d24265ef" CreationDate="2010-10-30T15:53:55.783" UserId="2910" Text="Multiplayer Implementation, Can I implement it later if I chose to?" />
  <row Id="9907" PostHistoryTypeId="3" PostId="5011" RevisionGUID="deaa3b7a-ef6c-4058-b63c-f2a5d24265ef" CreationDate="2010-10-30T15:53:55.783" UserId="2910" Text="&lt;game-design&gt;&lt;xna&gt;&lt;multiplayer&gt;" />
  <row Id="9908" PostHistoryTypeId="2" PostId="5012" RevisionGUID="ac8ac4d6-4a0c-4b06-81d3-b45b21c3a53a" CreationDate="2010-10-30T16:12:51.023" UserId="229" Text="Here is sound advice taken from the [Zoidcom networking library manual][1]:&#xD;&#xA;&#xD;&#xA;&gt; If your project is in the planning&#xD;&#xA;&gt; stage, it is advised to design the&#xD;&#xA;&gt; project for networking right from the&#xD;&#xA;&gt; start. Bolting on network code in a&#xD;&#xA;&gt; late state of the project will most&#xD;&#xA;&gt; likely either lead to massive&#xD;&#xA;&gt; refactoring or a large amount of&#xD;&#xA;&gt; hacking, resulting in hardly&#xD;&#xA;&gt; maintanable and bug ridden code.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The cleanest way is to implement the&#xD;&#xA;&gt; whole game as if it were a pure&#xD;&#xA;&gt; network game. That is, implement code&#xD;&#xA;&gt; for a dedicated server, and implement&#xD;&#xA;&gt; this code for being server code only.&#xD;&#xA;&gt; Implement the game client code in a&#xD;&#xA;&gt; similar manner. Server and client can&#xD;&#xA;&gt; run in the same process and don't even&#xD;&#xA;&gt; need to use a real network socket, but&#xD;&#xA;&gt; they should be seperate entities and&#xD;&#xA;&gt; all code should be designed to work&#xD;&#xA;&gt; that way. When the player jumps, don't&#xD;&#xA;&gt; alter the player's jump vector&#xD;&#xA;&gt; directly, but send a&#xD;&#xA;&gt; 'jump-key-pressed' packet to the&#xD;&#xA;&gt; server and let the server handle that.&#xD;&#xA;&gt; &#xD;&#xA;&gt; This means that even in a singleplayer&#xD;&#xA;&gt; game, there is an invisible server&#xD;&#xA;&gt; running in the background. A&#xD;&#xA;&gt; multiplayer version of the same game&#xD;&#xA;&gt; just needs to connect to a remote&#xD;&#xA;&gt; server instead of the local one et&#xD;&#xA;&gt; voila, multiplayer done. The&#xD;&#xA;&gt; advantages of this are:&#xD;&#xA;&gt; &#xD;&#xA;&gt; no seperate code for single and&#xD;&#xA;&gt; multiplayer the network code is tested&#xD;&#xA;&gt; and developed during the whole project&#xD;&#xA;&gt; clean code&#xD;&#xA;&gt; &#xD;&#xA;&gt; Projects using this scheme are almost&#xD;&#xA;&gt; all games using any of the Quake&#xD;&#xA;&gt; engines, Civilization 4, Neverwinter&#xD;&#xA;&gt; Nights and many many more.&#xD;&#xA;&gt; &#xD;&#xA;&gt; For connecting client and server in&#xD;&#xA;&gt; the same process with zero latency,&#xD;&#xA;&gt; local sockets can be used. These are&#xD;&#xA;&gt; provided by Zoidcom and pass packets&#xD;&#xA;&gt; directly from one ZCom_Control to&#xD;&#xA;&gt; another, without going through an OS&#xD;&#xA;&gt; level socket.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zoidcom.com/docs/AppDesign.html" />
  <row Id="9909" PostHistoryTypeId="2" PostId="5013" RevisionGUID="32d0d4b2-bdf7-4334-98f1-ad39658fe81d" CreationDate="2010-10-30T16:19:13.487" UserId="2917" Text="[crossposted from stackoverflow]&#xD;&#xA;&#xD;&#xA;In a game such as Warcraft 3 or Age of Empires, the ways that an AI opponent can move about the map seem almost limitless. The maps are huge and the position of other players is constantly changing.&#xD;&#xA;&#xD;&#xA;How does the AI path-finding in games like these work? Standard graph-search methods (such as DFS, BFS or A*) seem impossible in such a setup.&#xD;&#xA;" />
  <row Id="9910" PostHistoryTypeId="1" PostId="5013" RevisionGUID="32d0d4b2-bdf7-4334-98f1-ad39658fe81d" CreationDate="2010-10-30T16:19:13.487" UserId="2917" Text="How does pathfinding in RTS games work?" />
  <row Id="9911" PostHistoryTypeId="3" PostId="5013" RevisionGUID="32d0d4b2-bdf7-4334-98f1-ad39658fe81d" CreationDate="2010-10-30T16:19:13.487" UserId="2917" Text="&lt;ai&gt;&lt;path-finding&gt;&lt;game-mechanics&gt;&lt;search&gt;" />
  <row Id="9912" PostHistoryTypeId="2" PostId="5014" RevisionGUID="6f2a7d43-438c-4fc0-ae1d-5b825df89247" CreationDate="2010-10-30T16:58:54.947" UserId="2910" Text="Most games do use some sort of Search Algorithm or A* to find paths on a map. The AI is tweaked in some aspects obviously for performance reasons. &#xD;&#xA;&#xD;&#xA;You will notice this in Starcraft 2 where Zerglings obviously don't path well at all, it would be a CPU nightmare to do that for Zerglings. They just do there best to get from A to B and don't even attempt to find the best path. They will get as close as possible then bottle neck at the chokes or ramps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9913" PostHistoryTypeId="2" PostId="5015" RevisionGUID="4996ca75-6af0-4c8e-ad26-3a2bdbfbd63d" CreationDate="2010-10-30T17:38:01.593" UserId="2919" Text="That's pretty easy to do with both DirectX and OpenGL: You initialize with an hidden window (for OpenGL and DX9) or no window at all (DX10+). Then you create FBO or RenderTargets of arbitrary size and do all your rendering into those. This also allows you to render images with higher than screen resolution without problems. In all that cases, no window will be visible to the user and no rendering is ever blitted on the screen. You can read back those buffers by simply mapping the underlying surface.&#xD;&#xA;&#xD;&#xA;You might consider to write a renderer in CUDA/OpenCL, in that case, you can just create a buffer on the GPU to write to. The reason for using DX/GL/etc. is that you usually can get results on screen faster than writing your own ray-tracer :)&#xD;&#xA;&#xD;&#xA;Of course, if you just want to render an image, a CPU only implementation is probably the easiest thing to do. As mentioned, look at [Aqsis][1] for a complete renderer which can be linked into your app. It basically boils down to providing some API to pass data from the app to the renderer and retrieve the image. Usually you don't want to send PNGs back though, but rather provide a callback so the calling application can provide progress output as well as store it in any format it wants.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aqsis.org" />
  <row Id="9914" PostHistoryTypeId="2" PostId="5016" RevisionGUID="5fb975f0-925c-4fe3-b26e-fac5145b0e48" CreationDate="2010-10-30T17:44:08.740" UserId="2919" Text="Your normals should be in tangent space, that way you can apply them onto any surface for which you can create a tangent space (trivial for spheres.) Basically the normal map describes how the normal differs from the actual normal on a small patch on the surface. The tangent space is what you probably try to get with your Jacobian matrix -- for a sphere, you can create a tangent space coordinate system at any given point by using the normal at the point and two perpendicular vector -- just orient them consistently (for instance, along u and v) and your done. You can then translate your incoming light vector into tangent space (or the other way round) and light with the new normal. The advantage is that your normal map will work on any object with a defined tangent space and UV mapping. &#xD;&#xA;&#xD;&#xA;On the cube, your tangent space for each face is simply that face itself (i.e. if you have a face which has a normal -Z for instance, and your tangent space up is +Y, you just rotate that normal using a matrix which maps -Z to +Y.)" />
  <row Id="9915" PostHistoryTypeId="2" PostId="5017" RevisionGUID="da8ffd14-2cf7-4842-b4e7-f8f55731e307" CreationDate="2010-10-30T18:00:40.647" UserId="2798" Text="You need to apply the bone transforms to the model before drawing it. Check the &quot;Draw the model&quot; section in the following page for a example of what you need to do:&#xD;&#xA;&#xD;&#xA;http://www.toymaker.info/Games/XNA/html/xna_models.html" />
  <row Id="9916" PostHistoryTypeId="2" PostId="5018" RevisionGUID="f7f8ce0a-be9e-4457-921e-adcdd5cfa411" CreationDate="2010-10-30T18:11:28.243" UserId="189" Text="I agree with the advice quoted in Leftium's answer; **design it for networking from the start, because you won't be able to add it later**.&#xD;&#xA;&#xD;&#xA;The first time I tried to make a multiplayer game (I wasn't even trying to make a single player game!), I figured I would first get the game working and then add networking. Bad idea. I was left with a prototype of a really boring single player game and no clue how to transform that into a multiplayer game. I scrapped it entirely and started over, this time writing multiplayer networking code right from the start. Everything clicked.&#xD;&#xA;&#xD;&#xA;I'm sure it's not *impossible* to start with a one-player game and add multiplayer functionality. If you think it through, plan it correctly and make sure you know your strategy then sure, give it a try. I think it would be an interesting puzzle to work through at the very least. But really make sure you know your plan as to how you're going to add networking.&#xD;&#xA;&#xD;&#xA;I think there is a middle ground (though I've never tried it). You could write some dummy classes for networking/multiplayer features, and be diligent in using them as you're writing the single player game. Then later, if you decide to implement multiplayer, just fill in the dummy classes and you'd be most of the way done. This very much approaches the server/client method, but you might be able to get away with less work; after all, a single player game is easier to make than a multiplayer game, so if you're going to write your single player game like a multiplayer game then why not just make it multiplayer?" />
  <row Id="9917" PostHistoryTypeId="2" PostId="5019" RevisionGUID="349df680-5407-4f13-ad3a-ff51f51795f8" CreationDate="2010-10-30T18:32:32.947" UserDisplayName="J3M7OR3" Text="I have noticed that in general it seems like the 3d graphics and animations for MMOs and MMORPGs seem not as seductive and polished as the graphics for normal, non-online 3d games.&#xD;&#xA;&#xD;&#xA; - **How come this is the case?**&#xD;&#xA;&#xD;&#xA; or&#xD;&#xA;&#xD;&#xA; - **Is my judgement inaccurate?**&#xD;&#xA;&#xD;&#xA; *If my judgement is inaccurate please provide examples of MMORPGs that render 3d graphics and animations that are superior to normal, non-online 3d games.*&#xD;&#xA;" />
  <row Id="9918" PostHistoryTypeId="1" PostId="5019" RevisionGUID="349df680-5407-4f13-ad3a-ff51f51795f8" CreationDate="2010-10-30T18:32:32.947" UserDisplayName="J3M7OR3" Text="How come the 3d graphics and animations of MMORPGs are usually worse than non-online 3d games?  " />
  <row Id="9919" PostHistoryTypeId="3" PostId="5019" RevisionGUID="349df680-5407-4f13-ad3a-ff51f51795f8" CreationDate="2010-10-30T18:32:32.947" UserDisplayName="J3M7OR3" Text="&lt;graphics&gt;&lt;3d&gt;&lt;animation&gt;&lt;mmo&gt;&lt;rendering&gt;" />
  <row Id="9920" PostHistoryTypeId="2" PostId="5020" RevisionGUID="400f5708-b21b-4438-af67-5c65f1b9cc8e" CreationDate="2010-10-30T18:39:24.277" UserId="189" Text="MMOs often have **much** more content than traditional games. If you think about it, your traditional one-player game has a mostly linear storyline, so the levels are very straightforward, linear, small and restricted. They can be scrutinized and made to a high level of detail. A MMO, however, has an entire world's worth of content, so a lot more art and content is required to match that same level of detail.&#xD;&#xA;&#xD;&#xA;It is also the case that MMOs often have many things on the screen at once; this can differ based on the game, but some games allow many people to be standing in one area (for example if there is an important event or party). That is a lot of polygons; so each character must be low detailed in order to be able to draw them all on the screen at once. Similarly, even in the fighting areas there can be a generous number of NPCs/mobs on the screen at once. Level-of-detail algorithms can be used to tune the detail levels based on how much is on screen, but then you are introducing even more content that needs to be made (each thing would then need to be made several times -- or an algorithm can try to do it automatically).&#xD;&#xA;" />
  <row Id="9921" PostHistoryTypeId="2" PostId="5021" RevisionGUID="762e3def-3aa4-4cff-86a1-5026b9d2f370" CreationDate="2010-10-30T18:42:30.630" UserId="2798" Text="Your point is valid. But keep in mind that a MMORPG has more models, textures and animations than a normal game; making those assets in a very high resolution would need a lot of disk space, and they wouldn't be easy to stream to system/graphics RAM. So they are kept low-res to easily load a higher part of the world, and to make the development of the game shorter." />
  <row Id="9922" PostHistoryTypeId="2" PostId="5022" RevisionGUID="17f74f23-7454-487d-b00b-d72fe77fdd51" CreationDate="2010-10-30T18:55:30.713" UserId="323" Text="Check out the [Flowfield][1] algorithm used in Supreme Commander 2. It does a much better job than most RTS pathfinding systems do (skip ahead to 0:50 for a few examples.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=bovlsENv1g4" />
  <row Id="9923" PostHistoryTypeId="2" PostId="5023" RevisionGUID="ec536d1e-9b90-4316-bbf7-b654380f3fd8" CreationDate="2010-10-30T19:29:39.723" UserId="2862" Text="I'm sending an Xbox 360 to a guy in India. Will he be able to play the games I'm sending along in India? Will Xbox Live work in India with my US-bought Xbox? Can he do XNA development on it?" />
  <row Id="9924" PostHistoryTypeId="1" PostId="5023" RevisionGUID="ec536d1e-9b90-4316-bbf7-b654380f3fd8" CreationDate="2010-10-30T19:29:39.723" UserId="2862" Text="Can a US Xbox work in another country?" />
  <row Id="9925" PostHistoryTypeId="3" PostId="5023" RevisionGUID="ec536d1e-9b90-4316-bbf7-b654380f3fd8" CreationDate="2010-10-30T19:29:39.723" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;" />
  <row Id="9929" PostHistoryTypeId="2" PostId="5025" RevisionGUID="7c9022ba-81c0-47e9-b14a-2e964dd4e813" CreationDate="2010-10-30T19:50:45.780" UserId="953" Text="The other answers are quite good.  Another reason for MMOs to be low-tech in the graphics department is that they are often designed to be played by low-end hardware, to increase the possible user base and encourage gameplay on laptops or while multitasking." />
  <row Id="9930" PostHistoryTypeId="2" PostId="5026" RevisionGUID="a5ea0b08-982d-48e6-8ec5-0c423b7555c6" CreationDate="2010-10-30T19:59:03.963" UserId="744" Text="According to &lt;a href=&quot;http://forums.create.msdn.com/forums/t/22137.aspx&quot;&gt;the Create MSDN forum&lt;/a&gt;, your friend will be able to develop XNA games, and deploy them locally to the Xbox, but cannot upload them to the XBLIG store nor download other people's games, as there is no XBLIG store in India.&#xD;&#xA;&#xD;&#xA;It is possible to set up a US XBL account from elsewhere in the world. I suspect there are many legal issues involved if you try to do that and then accept payments. &lt;a href=&quot;http://create.msdn.com/en-US/home/faq/xbox_live_indie_games&quot;&gt;The XNA XBLIG FAQ contains several questions related to this&lt;/a&gt; - I'd suggest consulting a lawyer or reading it and your tax codes very carefully." />
  <row Id="9931" PostHistoryTypeId="2" PostId="5027" RevisionGUID="b4b90640-9e44-4dd2-99d5-d382b9d29f3e" CreationDate="2010-10-30T19:59:04.043" UserId="2922" Text="I think the answer is in the definition of MMO:  Massive Multiplayer.  These games are typically aimed to run on as wide of a player base as possible, including low-end hardware, laptops, netbooks, etc.  So the graphics usually don't take advantage of the latest advances in hardware and CPU tech.  All the reasons above are also good as well.&#xD;&#xA;&#xD;&#xA;P.S. - Looks like Gregory beat me to it :)" />
  <row Id="9932" PostHistoryTypeId="4" PostId="5023" RevisionGUID="ec01aa37-ca97-4da5-8630-05dd294f0ffc" CreationDate="2010-10-30T20:01:29.347" UserId="744" Comment="edited title" Text="Can I develop XNA using an Xbox 360 in India?" />
  <row Id="9933" PostHistoryTypeId="2" PostId="5028" RevisionGUID="c185a978-0014-4f2a-992d-0e278a723786" CreationDate="2010-10-30T20:15:23.997" UserId="744" Text="The main reason is that _MMOs blow away any attempt at asset budgeting_.&#xD;&#xA;&#xD;&#xA;Take a game like Crysis or Gears of War, with top-end graphics. They have a fixed number of player models. The enemy types are often broken down by zone or level; often those enemies will share textures or materials with other things in the environment, to save memory. At most you're going to have a dozen people (by far the most expensive things to render) on-screen at once.&#xD;&#xA;&#xD;&#xA;By sharing textures and only having a handful of models, these games can afford to have more polygons, more shader effects, and more detailed animations. So when they fix their budget at, say, 512MB of RAM and a 3.2GHz processor, they know exactly what the most expensive scene in the game is, and can make sure that machine can play it at an acceptable framerate.&#xD;&#xA;&#xD;&#xA;In MMOs, you don't have that luxury. The levels are large. Enemies can be trained from one end of the map to the other. Players can wear whatever they want, and expect that to appear on their character model - meaning their models are often many separate models in practice. You need to be able to render dozens or hundreds of players and enemies at once. You're animating more, and you need to be prepared to render any character model or texture at any time.&#xD;&#xA;&#xD;&#xA;When figuring out the budget for an MMO, you _have no idea what the most expensive scene is_. Fifty players in your frustum? A rare item you didn't expect to need to load? Better have the graphics memory and CPU resources ready!&#xD;&#xA;&#xD;&#xA;But these are exactly the kind of situations players love - as many people as possible at the same place, drawing myriad mobs into the middle of a town, showing off as much sparkly alpha-blended light-emitting gear as possible.&#xD;&#xA;&#xD;&#xA;What everyone else has said about MMOs targeting lower hardware is sometimes true, but it really comes down to that. The worst rendering scene in an MMO is _not known at development time_ and you can count on players to try to make it as bad as possible, no matter how good their hardware is. The &quot;worse&quot; graphics you have, the more you can scale up before the game becomes unplayable." />
  <row Id="9934" PostHistoryTypeId="4" PostId="5000" RevisionGUID="659d22fa-1acf-4695-899a-1ea840309c89" CreationDate="2010-10-30T20:29:15.280" UserId="744" Comment="edited title" Text="Can I develop XNA games without an XNACC subscription?" />
  <row Id="9935" PostHistoryTypeId="5" PostId="5027" RevisionGUID="8dc6462b-0601-439c-afda-3dd913ce58f5" CreationDate="2010-10-30T20:57:40.810" UserId="2922" Comment="added 422 characters in body; added 17 characters in body" Text="I think the answer is in the definition of MMO:  Massive Multiplayer.  These games are typically aimed to run on as wide of a player base as possible, including low-end hardware, laptops, netbooks, etc.  So the graphics usually don't take advantage of the latest advances in hardware and CPU tech.  All the reasons above are also good as well.&#xD;&#xA;&#xD;&#xA;P.S. - Looks like Gregory beat me to it :)&#xD;&#xA;&#xD;&#xA;Edit: Vote down if you want, but I'm not stating an opinion, it's an absolute fact.  WoW has 11 million players and Blizz has stated many times that they want to keep the game so that it can run on low-end hardware.  Age of Conan, Aion, where are those games now?  They're not so massive, if you get my drift.  Name a successful MMO, one that actually has, you know, players, that requires a high end graphics card and then we'll talk." />
  <row Id="9939" PostHistoryTypeId="2" PostId="5031" RevisionGUID="37e77013-3766-4999-9d43-26bdccbf9f15" CreationDate="2010-10-31T03:24:10.227" UserId="2837" Text="Well,&#xD;&#xA;&#xD;&#xA;The question is pretty explicit on its own. I want to know if I can deploy a game from my PC directly to a XBox. I'm not a professional developer of games, I do it on my free time because it amuses me, but nothing else. Im planning on buying an XBox but only if I can connect directly to my Visual Studio and test the games. I don't want to connect to XNA creators club or anything like it, is this possible?&#xD;&#xA;&#xD;&#xA;I have XNA 4.0 with VS Ultimate 2k10&#xD;&#xA;&#xD;&#xA;Best regards and many thanks in advance,&#xD;&#xA;David" />
  <row Id="9940" PostHistoryTypeId="1" PostId="5031" RevisionGUID="37e77013-3766-4999-9d43-26bdccbf9f15" CreationDate="2010-10-31T03:24:10.227" UserId="2837" Text="Offline XNA Deployment to XBOX. Can it be done?" />
  <row Id="9941" PostHistoryTypeId="3" PostId="5031" RevisionGUID="37e77013-3766-4999-9d43-26bdccbf9f15" CreationDate="2010-10-31T03:24:10.227" UserId="2837" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;xna-4.0&gt;" />
  <row Id="9942" PostHistoryTypeId="5" PostId="4764" RevisionGUID="dbac7117-02f3-44d7-917c-097b3c09570b" CreationDate="2010-10-31T03:24:33.020" UserId="2837" Comment="small typo" Text="###[Weapon of Choice][1]&#xD;&#xA;&#xD;&#xA;Weapon of Choice is an Indie game from [Mommy's Best Games][2].  The game is written in C#/XNA.  Gamasutra has a great [post-mortem][3] where the developer discusses using C# to write a game (he had been using C/C++ prior to going independent).&#xD;&#xA;&#xD;&#xA;I don't know if it's considered famous but it did [won some awards][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mommysbestgames.com/weaponofchoice.html&#xD;&#xA;  [2]: http://www.mommysbestgames.com/&#xD;&#xA;  [3]: http://www.gamasutra.com/view/feature/3899/postmortem_mommys_best_games_.php&#xD;&#xA;  [4]: http://www.mommysbestgames.com/press.html" />
  <row Id="9943" PostHistoryTypeId="2" PostId="5032" RevisionGUID="a84693da-e038-4c87-a12e-d69a68de47bd" CreationDate="2010-10-31T03:31:40.670" UserId="189" Text="Well, you do need the XNA Creators Club membership activated on your Xbox, in order to get their app running (which connects to your computer and to the Visual Studio add-in). But once you have that app in your Xbox, the act of running (or debugging) your game is as simple as hitting the &quot;Start Debugging&quot; button in VS. The game is automatically transferred to your Xbox and starts. You can even pause it and debug it via Visual Studio. It's really neat!" />
  <row Id="9944" PostHistoryTypeId="2" PostId="5033" RevisionGUID="883424bf-7086-4d1f-a20b-1653304928ba" CreationDate="2010-10-31T04:00:24.793" UserId="2345" Text="No, you need to be connected to Xbox Live at all times. If the connection drops for any reason you will be kicked out of your game. Therefore, if you are offline, you cannot run any XNA games. &#xD;&#xA;&#xD;&#xA;You also need an XNA Creators Club membership to deploy onto the Xbox 360. This plus Xbox Live Gold will set you back about $150. If you are a student you can get a free version of the XNA Creators Club membership over to www.dreamspark.com. However, it is not the same as the full version and does have limitations. " />
  <row Id="9945" PostHistoryTypeId="2" PostId="5034" RevisionGUID="4f72c19a-ce09-43b8-a6fb-ca5a0c625c70" CreationDate="2010-10-31T08:15:14.003" UserId="101" Text="I realized I should probably update this, in case anyone reading this neglected to click through to the thread on the UDK forums. I was told by a moderator that everything I want to do is impossible without engine modifications.&#xD;&#xA;&#xD;&#xA;&lt;blockquote&gt;1) Unfortunately the custom node is the only way to get HLSL into UDK materials.&lt;br/&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;2) UE3 doesn't do full deferred, so only color and depth are available in postprocess effects. There's currently no node that lets you access position at the current pixel, but it would be very useful (and this calculation is done in lots of shaders like shadow filtering).&lt;br/&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;3) Rendering from alternate POV's is supported through scene captures, but the only attribute that can be captured is color.&lt;br/&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;4) This is only possible with changes to engine code.&lt;br/&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;Basically all the things you are asking about require full access to UE3 source.&lt;/blockquote&gt;&#xD;&#xA;&#xD;&#xA;Citation: http://forums.epicgames.com/showthread.php?p=27609556#post27609556" />
  <row Id="9946" PostHistoryTypeId="2" PostId="5035" RevisionGUID="9a512f12-2893-4d84-866b-4567692b7e6c" CreationDate="2010-10-31T09:32:14.443" UserId="1156" Text="I've seen a couple of these, namely [Java][1] and [C#/XNA][2]...and I've recently been picking up Python. Which kind of made me think.&#xD;&#xA;&#xD;&#xA;What (famous) games have been written in Python, with Pygame/Pyglet/Pyopengl?&#xD;&#xA;&#xD;&#xA;*Note: I'm meaning games written in Python, rather than something like C++ and Python scripted.*&#xD;&#xA;&#xD;&#xA;Note to mods/high-rep: I can't seem to find the 'Community Wiki' checkbox that's normally there; sorry.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="9947" PostHistoryTypeId="1" PostId="5035" RevisionGUID="9a512f12-2893-4d84-866b-4567692b7e6c" CreationDate="2010-10-31T09:32:14.443" UserId="1156" Text="Famous games written in Python" />
  <row Id="9948" PostHistoryTypeId="3" PostId="5035" RevisionGUID="9a512f12-2893-4d84-866b-4567692b7e6c" CreationDate="2010-10-31T09:32:14.443" UserId="1156" Text="&lt;python&gt;" />
  <row Id="9949" PostHistoryTypeId="2" PostId="5036" RevisionGUID="95b5bd79-af07-4b9e-b7d9-f94b1dcedde5" CreationDate="2010-10-31T10:16:47.337" UserId="2930" Text="I'm totally not experienced, but I think that a good solution is based on heuristics, not on a complete checking of the known map. Heuristics I can think of are locally based and experience based. Local controls can be based on local terrain check and obstacles, keeping moving toward the required direction. I think that most maps don't require complex maze-like movements, but are pretty connected.&#xD;&#xA;Another heuristic is to use previous known paths (explored by other units or explicitly by the user) to move units to known or near-known positions.&#xD;&#xA;But I'm talking about moving on big maps, not really in closed spaces like ZorbaTHut said. In crowded cases the algorithm may be more complex, requiring sorts of &quot;prediction&quot;, coordination among units of the same team or just semaphore-like waiting strategies. Also, note that continuous or discrete terrain and unit size calculation are really important when working on this case.&#xD;&#xA;&#xD;&#xA;I think heuristic algorithms are good because they usually provide a good solution on big spaces with a reasonable computation time (which does matter, when you're moving many units).&#xD;&#xA;&#xD;&#xA;Sorry if this a generic answer: I worked with crowds, but the space was pretty peculiar and I can't explain exactly how the algorithm worked (was agent based, anyway, not globally defined). I hope you can get some useful ideas from my answer." />
  <row Id="9950" PostHistoryTypeId="2" PostId="5037" RevisionGUID="e2d8c36e-86d8-4735-9e84-fd7a66f75dba" CreationDate="2010-10-31T10:23:17.837" UserId="2930" Text="The magic in that screenshot is the Fresnel effect at the border. A plain transparent sphere with a texture is not sufficient. There is a [demo][1] in the Ogre programming book, but I don't know if sources are available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=GifUrbWat14C&amp;pg=PA168&amp;lpg=PA168&amp;dq=fresnel+example+ogre&amp;source=bl&amp;ots=gim2v3ppLj&amp;sig=DWaAav4l9fBO0K6dO26-ORMecI4&amp;hl=en&amp;ei=JUPNTLbzGIb6sgbHuNGWCA&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=2&amp;ved=0CB8Q6AEwAQ#v=onepage&amp;q&amp;f=false" />
  <row Id="9951" PostHistoryTypeId="2" PostId="5038" RevisionGUID="db5fca0b-9190-4bea-872a-fc7da8be364a" CreationDate="2010-10-31T10:37:26.683" UserId="1386" Text="Shadow mapping uses the depth buffer to calculate where shadows should be drawn.&#xD;&#xA;&#xD;&#xA;My problem is that I'd like some semi transparent textured quads to cast shadows - for example billboarded trees. As the depth value will be set across all of the quad and not just the visible parts it will cast a quad shadow, which is not what I want.&#xD;&#xA;&#xD;&#xA;**How can I make my transparent quads cast correct shadows using shadow mapping?**" />
  <row Id="9952" PostHistoryTypeId="1" PostId="5038" RevisionGUID="db5fca0b-9190-4bea-872a-fc7da8be364a" CreationDate="2010-10-31T10:37:26.683" UserId="1386" Text="Shadow Mapping and Transparent Quads" />
  <row Id="9953" PostHistoryTypeId="3" PostId="5038" RevisionGUID="db5fca0b-9190-4bea-872a-fc7da8be364a" CreationDate="2010-10-31T10:37:26.683" UserId="1386" Text="&lt;shadows&gt;&lt;shadow-mapping&gt;&lt;depth-buffer&gt;&lt;transparency&gt;" />
  <row Id="9954" PostHistoryTypeId="5" PostId="4929" RevisionGUID="76c8e363-77d4-45bc-be9b-275c4ac1c41d" CreationDate="2010-10-31T12:13:01.740" UserId="2063" Comment="Made it looking more like a Wiki entry" Text="**Runtime Storage (hardcoded) vs Static Storage (file storage)**&#xD;&#xA;&#xD;&#xA;&gt; *(original question)*&#xD;&#xA;&gt; &#xD;&#xA;&gt; I extended my engines GUI from&#xD;&#xA;&gt; procedural style to object orientated&#xD;&#xA;&gt; style, but I still have to create&#xD;&#xA;&gt; menues, buttons etc. So I got the&#xD;&#xA;&gt; choice to create each menue via a&#xD;&#xA;&gt; class or have a static main class&#xD;&#xA;&gt; which loads menues from a XML file. My&#xD;&#xA;&gt; problem is that I actually like to&#xD;&#xA;&gt; have static and external storage in&#xD;&#xA;&gt; XML because it keeps the code and the&#xD;&#xA;&gt; project clean. But if a GUI Object is&#xD;&#xA;&gt; created e.g. a button I want to have&#xD;&#xA;&gt; delegates/callbacks/events on it, but&#xD;&#xA;&gt; I think that isn't possible with&#xD;&#xA;&gt; loading and creating GUI Objects by&#xD;&#xA;&gt; XML files that only contain ints and&#xD;&#xA;&gt; strings.&#xD;&#xA;&#xD;&#xA;The question is when do you hardcode parts of your game and when do you store them locally.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Runtime Storage**&#xD;&#xA;&#xD;&#xA;\+ You safe time while you do not have to write a parser or something similar.&#xD;&#xA;&#xD;&#xA;\- You lose a lot of flexibility in late development &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Static Storage**&#xD;&#xA;&#xD;&#xA;\+ You gain a lot of flexibility in the late development&#xD;&#xA;&#xD;&#xA;\- You spent a lot of time into a system to read and write, and also handle the storage" />
  <row Id="9955" PostHistoryTypeId="2" PostId="5039" RevisionGUID="61027631-9a22-442d-b365-4deaf3a02e94" CreationDate="2010-10-31T12:23:25.893" UserId="2933" Text="The only way I can think of doing this is creating a seperate depth map texture, rendering the trees into it, outputting for depth where alpha != 0, otherwise outputting depth = 1, then combining this shadow map texture with the scene shadow map texture, which should be simple enough, simply take the smallest of the two values and add that to the final depth map.&#xD;&#xA;&#xD;&#xA;This doesn't solve blending orders though, if you output a depth behind an alpha texture it will be overriden when you render the quad with the texture on it, so for this effect to work you're going to have to render each quad individually into the depth map texture..." />
  <row Id="9956" PostHistoryTypeId="2" PostId="5040" RevisionGUID="7e5bbd51-17fb-42c8-b120-14f38eb41c3c" CreationDate="2010-10-31T12:25:15.597" UserId="2933" Text="I've been googling this for a while and haven't been able to find anything (blenders importer does not work). How can I import a .x file to 3D Studio Max? There are heaps of resources in converting formats readable by Max to .x but not the other way around." />
  <row Id="9957" PostHistoryTypeId="1" PostId="5040" RevisionGUID="7e5bbd51-17fb-42c8-b120-14f38eb41c3c" CreationDate="2010-10-31T12:25:15.597" UserId="2933" Text="Importing a .x file to 3D Studio Max?" />
  <row Id="9958" PostHistoryTypeId="3" PostId="5040" RevisionGUID="7e5bbd51-17fb-42c8-b120-14f38eb41c3c" CreationDate="2010-10-31T12:25:15.597" UserId="2933" Text="&lt;3d&gt;&lt;directx&gt;&lt;models&gt;" />
  <row Id="9959" PostHistoryTypeId="2" PostId="5041" RevisionGUID="bce4682e-d945-4281-b059-7470bb2d4763" CreationDate="2010-10-31T12:30:20.200" UserId="2494" Text="this is a graphics/math problem. &#xD;&#xA;Consider this 2 sprite / surface&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vcd15.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/c5bUE.png&#xD;&#xA;&#xD;&#xA;As you can see they are a tank and his gun turret. &#xD;&#xA;Now, i manage the turret rotation, and it works, and, also, the rotation of the tank on the screen. &#xD;&#xA;&#xD;&#xA;What it'snt work is the correct &quot;blitting&quot; of the turret on my tank. &#xD;&#xA;&#xD;&#xA;The problem is that the turret is never blitted correctly on the tank. &#xD;&#xA;This is a math problem, and i'm not so good in math !&#xD;&#xA;How can i correct blit the turret centered on the &quot;right&quot; hole of my tank sprite ?&#xD;&#xA;&#xD;&#xA;I'm using c# and sdl.net and actually i blit the turret with this code ( 13,13 are the X and Y position of the 'black' hole of the tank, but, i know, this is not the right method to blit it!):&#xD;&#xA;&#xD;&#xA;                Surface tmpsurf = new Surface(&quot;graphics/tank_turret_long.png&quot;);&#xD;&#xA;&#xD;&#xA;                Surface turretSurf = tmpsurf.CreateRotatedSurface(cannonangle);&#xD;&#xA;&#xD;&#xA;                turretSurf.Transparent = true;&#xD;&#xA;&#xD;&#xA;                turretSurf.TransparentColor = Color.Black;                &#xD;&#xA;&#xD;&#xA;                Point posTurret = new Point(13+this.X,13+this.Y);&#xD;&#xA;                Video.Screen.Blit(torrettaSurf,posTorretta); &#xD;&#xA;&#xD;&#xA;Thank in advance" />
  <row Id="9960" PostHistoryTypeId="1" PostId="5041" RevisionGUID="bce4682e-d945-4281-b059-7470bb2d4763" CreationDate="2010-10-31T12:30:20.200" UserId="2494" Text="Correct Blitting 2 surface problem" />
  <row Id="9961" PostHistoryTypeId="3" PostId="5041" RevisionGUID="bce4682e-d945-4281-b059-7470bb2d4763" CreationDate="2010-10-31T12:30:20.200" UserId="2494" Text="&lt;c#&gt;&lt;algorithm&gt;&lt;math&gt;" />
  <row Id="9962" PostHistoryTypeId="16" PostId="5035" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-10-31T12:42:30.677" UserId="51" />
  <row Id="9963" PostHistoryTypeId="2" PostId="5042" RevisionGUID="806347fe-6eaf-4279-9b41-93760979f8cb" CreationDate="2010-10-31T12:43:28.673" UserId="2494" Text="i'm wondering: how to create a simple &quot;car headlight&quot; (for i.e) or a torch spotlight in Sdl or Sdl.NET ?&#xD;&#xA;Does anyone know how ?&#xD;&#xA;Thanks" />
  <row Id="9964" PostHistoryTypeId="1" PostId="5042" RevisionGUID="806347fe-6eaf-4279-9b41-93760979f8cb" CreationDate="2010-10-31T12:43:28.673" UserId="2494" Text="How to create a simple &quot;spot light&quot; effect with Sdl or Sdl.Net ?" />
  <row Id="9965" PostHistoryTypeId="3" PostId="5042" RevisionGUID="806347fe-6eaf-4279-9b41-93760979f8cb" CreationDate="2010-10-31T12:43:28.673" UserId="2494" Text="&lt;lighting&gt;" />
  <row Id="9966" PostHistoryTypeId="2" PostId="5043" RevisionGUID="c8e27c4f-b383-4552-82da-4bf6c1ea6d86" CreationDate="2010-10-31T13:00:01.403" UserId="2934" Text="Your problem seems to be that you're blitting the turret with respect to its top left corner, when you actually want to blit it with respect to the center of the actual turret. Now, assuming your turret has its center at `x_1`, `y_1`, rotating it clockwise by `theta` degrees should give you a &quot;new&quot; center at `x_2=x_1*cos(theta)`,  `y_2=y_1*sin(theta)`. You then have to line this up with the center of the turret hole, located at `13,13`. This shouldn't be a problem (keep in mind I'm not very versed in C#, so this is probably syntactically incorrect):&#xD;&#xA;&#xD;&#xA;    Point posTurret = new Point(13 + this.X - x1*Math.cos(cannonangle),&#xD;&#xA;                                13 + this.Y - y1*Math.sin(cannonangle));&#xD;&#xA;&#xD;&#xA;Where `x1` and `y1` are the coordinates of the center of the turret in &quot;`tank_turret_long.png`&quot;." />
  <row Id="9967" PostHistoryTypeId="5" PostId="5035" RevisionGUID="b9c31944-5fc6-4533-a83b-e365f1cea5ea" CreationDate="2010-10-31T13:15:30.990" UserId="1156" Comment="deleted 107 characters in body" Text="I've seen a couple of these, namely [Java][1] and [C#/XNA][2]...and I've recently been picking up Python. Which kind of made me think.&#xD;&#xA;&#xD;&#xA;What (famous) games have been written in Python, with Pygame/Pyglet/Pyopengl?&#xD;&#xA;&#xD;&#xA;*Note: I'm meaning games written in Python, rather than something like C++ and Python scripted.*&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="9968" PostHistoryTypeId="2" PostId="5044" RevisionGUID="f210acf9-ad53-4b8c-b999-0d52a80b7989" CreationDate="2010-10-31T13:20:06.617" UserId="165" Text="[**Eve Online**][1] is probably the biggest, and uses [Stackless Python][2], a lightweight, microthreaded version of Python. And Civilization IV had a Python interpreter built-in, but I'm not sure if that was for scripting only, or how much of the game was written in it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eveonline.com/&#xD;&#xA;  [2]: http://www.stackless.com/" />
  <row Id="9969" PostHistoryTypeId="6" PostId="5042" RevisionGUID="0887e30f-64f0-4dc9-a83c-420d46060385" CreationDate="2010-10-31T13:21:09.660" UserId="1156" Comment="edited tags" Text="&lt;lighting&gt;&lt;sdl&gt;" />
  <row Id="9970" PostHistoryTypeId="5" PostId="5044" RevisionGUID="a1c92e9c-502f-40a2-9c77-3f48af5d60c8" CreationDate="2010-10-31T13:31:30.930" UserId="165" Comment="added 637 characters in body; deleted 2 characters in body" Text="[**Eve Online**][1] is probably the biggest, and uses [Stackless Python][2], a lightweight, microthreaded version of Python. And Civilization IV had a Python interpreter built-in, but I'm not sure if that was for scripting only, or how much of the game was written in it.&#xD;&#xA;&#xD;&#xA;Also, Disney's [Pirates of the Caribbean][3] was written using the [Panda3d][4] game engine (which allows both Python and C++ scripting, I don't know which Disney used). I don't think the *engine* is in Python, probably C++, but then again, the Python *interpreter* itself also uses a lot of C code. :)&#xD;&#xA;&#xD;&#xA;Ah, yes, *Pirates* does use Python. From:&#xD;&#xA;&#xD;&#xA;  - [Python Games][5]&#xD;&#xA;&#xD;&#xA;which also covers a lot of well-known games, like [Mount and Blade][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eveonline.com/&#xD;&#xA;  [2]: http://www.stackless.com/&#xD;&#xA;  [3]: http://www.panda3d.org/showss.php?shot=ssg-pirates/pirates01&#xD;&#xA;  [4]: http://www.panda3d.org/&#xD;&#xA;  [5]: http://wiki.python.org/moin/PythonGames&#xD;&#xA;  [6]: http://www.taleworlds.com/" />
  <row Id="9971" PostHistoryTypeId="5" PostId="5044" RevisionGUID="f62ba5c3-cecf-4198-88e0-8c1786397567" CreationDate="2010-10-31T13:52:08.850" UserId="165" Comment="deleted 5 characters in body" Text="[**Eve Online**][1] is probably the biggest, and uses [Stackless Python][2], a lightweight, microthreaded version of Python. And Civilization IV had a Python interpreter built-in, but I'm not sure if that was for scripting only, or how much of the game was written in it.&#xD;&#xA;&#xD;&#xA;Also, Disney's [Pirates of the Caribbean][3] was written using the [Panda3d][4] game engine (which allows both Python and C++ scripting, but from googling it - Disney used Python). I don't think the *engine* is in Python, probably C++, but then again, the Python *interpreter* itself also uses a lot of C code. :)&#xD;&#xA;&#xD;&#xA;For a long list of games:&#xD;&#xA;&#xD;&#xA;  - [Python Games][5]&#xD;&#xA;&#xD;&#xA;which also covers a lot of well-known games, like [Mount and Blade][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eveonline.com/&#xD;&#xA;  [2]: http://www.stackless.com/&#xD;&#xA;  [3]: http://www.panda3d.org/showss.php?shot=ssg-pirates/pirates01&#xD;&#xA;  [4]: http://www.panda3d.org/&#xD;&#xA;  [5]: http://wiki.python.org/moin/PythonGames&#xD;&#xA;  [6]: http://www.taleworlds.com/" />
  <row Id="9972" PostHistoryTypeId="5" PostId="5039" RevisionGUID="7426c7c0-fd00-4a1d-b1f2-e030d5606699" CreationDate="2010-10-31T13:53:18.730" UserId="2933" Comment="edited body" Text="The only way I can think of doing this is creating a seperate depth map texture, rendering the trees into it, outputting for depth where alpha != 0, otherwise outputting depth = 1, then combining this shadow map texture with the scene shadow map texture, which should be simple enough, simply take the smallest of the two values and set that to the final depth map.&#xD;&#xA;&#xD;&#xA;This doesn't solve blending orders though, if you output a depth behind an alpha texture it will be overriden when you render the quad with the texture on it, so for this effect to work you're going to have to render each quad individually into the depth map texture..." />
  <row Id="9973" PostHistoryTypeId="2" PostId="5045" RevisionGUID="9ff35e06-3103-4466-9d5b-1118f82defac" CreationDate="2010-10-31T16:00:10.447" UserId="2290" Text="If you download [Milkshape][1], you can import the DirectX file and export it as a Collada, Fbx, or Obj, which can be imported into 3DS Max.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chumbalum.swissquake.ch" />
  <row Id="9974" PostHistoryTypeId="2" PostId="5046" RevisionGUID="f071598e-fda1-4887-afdc-2fa4a10c0a4a" CreationDate="2010-10-31T16:29:21.370" UserId="2494" Text="i'm developing a 2d game (top down), and i'm a beginner. &#xD;&#xA;Now, i've to create a map, with object (to interact with) ... &#xD;&#xA;I don't know how to .. manage the problem ! &#xD;&#xA;Does anyone can help me ? What are the methodology used ?&#xD;&#xA;Thanks" />
  <row Id="9975" PostHistoryTypeId="1" PostId="5046" RevisionGUID="f071598e-fda1-4887-afdc-2fa4a10c0a4a" CreationDate="2010-10-31T16:29:21.370" UserId="2494" Text="2d map: how to manage it ?" />
  <row Id="9976" PostHistoryTypeId="3" PostId="5046" RevisionGUID="f071598e-fda1-4887-afdc-2fa4a10c0a4a" CreationDate="2010-10-31T16:29:21.370" UserId="2494" Text="&lt;design-patterns&gt;&lt;maps&gt;&lt;level-design&gt;" />
  <row Id="9977" PostHistoryTypeId="2" PostId="5047" RevisionGUID="cc1af2fc-3eaa-4e8b-a76f-d303fae7e2e7" CreationDate="2010-10-31T16:34:31.933" UserId="2938" Text="I would like to draw a land for a motocross game. I've been thinking of Bezier Curves but I am not sure whether this is the best approach. Can you give me some advice? I want to do it in JavaScript, not very good choice but it's personal project so for time being it's OK." />
  <row Id="9978" PostHistoryTypeId="1" PostId="5047" RevisionGUID="cc1af2fc-3eaa-4e8b-a76f-d303fae7e2e7" CreationDate="2010-10-31T16:34:31.933" UserId="2938" Text="Draw land for motocross game" />
  <row Id="9979" PostHistoryTypeId="3" PostId="5047" RevisionGUID="cc1af2fc-3eaa-4e8b-a76f-d303fae7e2e7" CreationDate="2010-10-31T16:34:31.933" UserId="2938" Text="&lt;linear-algebra&gt;" />
  <row Id="9980" PostHistoryTypeId="2" PostId="5048" RevisionGUID="10fd5429-c33c-4a56-9861-920539b9930b" CreationDate="2010-10-31T16:34:49.187" UserId="2100" Text="I answered with the following for [this question][1]. If you look for tutorials for using these technologies, you should be able to get started or at least have other more detailed questions.&#xD;&#xA;&#xD;&#xA;Two programs you should at least take a look at are [**Mappy**][2] and [**Tiled**][3]. A library for XNA integration with Tiled called [**TiledLib**][4] has been developed and could be of some use, if only to take a look at for ideas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3916/your-recommendation-for-path-construction-from-a-single-background-image&#xD;&#xA;  [2]: http://tilemap.co.uk/mappy.php&#xD;&#xA;  [3]: http://www.mapeditor.org/&#xD;&#xA;  [4]: http://tiledlib.codeplex.com/" />
  <row Id="9981" PostHistoryTypeId="6" PostId="5047" RevisionGUID="537b049c-37e6-441f-a080-0916de8fbf89" CreationDate="2010-10-31T16:45:38.067" UserId="2938" Comment="edited tags" Text="&lt;algorithm&gt;&lt;linear-algebra&gt;" />
  <row Id="9982" PostHistoryTypeId="2" PostId="5049" RevisionGUID="09cbade1-60c8-470b-a5e5-1eb7b20161c3" CreationDate="2010-10-31T16:50:08.193" UserId="2290" Text="In most cases, using [A*][1] over a [navigation mesh][2] (commonly referred to as a &quot;navmesh&quot;) is the best pathfinding solution for RTSs. There is a detailed explanation of how navmeshes work, why they are a better solution than waypoint systems, and links to implementation resources, [here][3].&#xD;&#xA;&#xD;&#xA;If you're planning on developing special game modes (point/node capture), units that take cover,  or units that patrolling, cover, etc., you will probably want to implement a waypoint layer atop your navmesh, to control AI behavior (**not pathfinding**).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bit.ly/136l00&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Navigation_mesh&#xD;&#xA;  [3]: http://www.ai-blog.net/archives/000152.html" />
  <row Id="9983" PostHistoryTypeId="6" PostId="5046" RevisionGUID="d7a0c542-95d8-4553-9783-2d911ecb756b" CreationDate="2010-10-31T16:52:58.170" UserId="1156" Comment="edited tags" Text="&lt;design-patterns&gt;&lt;tiles&gt;&lt;maps&gt;&lt;level-design&gt;" />
  <row Id="9984" PostHistoryTypeId="5" PostId="5049" RevisionGUID="7a2a3ad3-5d88-456b-99b0-936acb510990" CreationDate="2010-10-31T16:55:20.690" UserId="2290" Comment="added 1 characters in body" Text="In most cases, using [A*][1] over a [navigation mesh][2] (commonly referred to as a &quot;navmesh&quot;) is the best pathfinding solution for RTSs. There is a detailed explanation of how navmeshes work, why they are a better solution than waypoint systems, and links to implementation resources, [here][3].&#xD;&#xA;&#xD;&#xA;If you're planning on developing special game modes (point/node capture), units that take cover,  or units that patrol, take cover, etc., you will probably want to implement a waypoint layer atop your navmesh, to control AI behavior (**not pathfinding**).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bit.ly/136l00&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Navigation_mesh&#xD;&#xA;  [3]: http://www.ai-blog.net/archives/000152.html" />
  <row Id="9985" PostHistoryTypeId="2" PostId="5050" RevisionGUID="6527072b-c1d6-49f6-b2d0-d0a71ba610ba" CreationDate="2010-10-31T17:09:39.110" UserId="2898" Text="I'm using XNA to create an FPS camera that uses a Direction vector instead of a Target vector control the camera's orientation.&#xD;&#xA;&#xD;&#xA;I'm having trouble with the math for looking up and down when the camera is rotated about the Y axis. No problems looking left and right.&#xD;&#xA;&#xD;&#xA;Here's my code:&#xD;&#xA;&#xD;&#xA;    Vector3 LookDirection {get;set;}&#xD;&#xA;&#xD;&#xA;    public void LookLeft(float scale)&#xD;&#xA;    {&#xD;&#xA;        LookDirection = Vector3.Transform(LookDirection, Matrix.CreateRotationY(MathHelper.ToRadians(scale)));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void LookRight(float scale)&#xD;&#xA;    {&#xD;&#xA;        LookDirection = Vector3.Transform(LookDirection, Matrix.CreateRotationY(MathHelper.ToRadians(-scale)));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void LookUp(float scale)&#xD;&#xA;    {&#xD;&#xA;        //doesn't work when camera is rotated into the X axis&#xD;&#xA;        LookDirection = Vector3.Transform(LookDirection, Matrix.CreateRotationZ(MathHelper.ToRadians(scale)));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void LookDown(float scale)&#xD;&#xA;    {&#xD;&#xA;        //doesn't work when camera is rotated into the X axis&#xD;&#xA;        LookDirection = Vector3.Transform(LookDirection, Matrix.CreateRotationZ(MathHelper.ToRadians(-scale)));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I know I need to manipulate both the X and Z components when looking up and down, I just can't figure out exactly what to do. Thanks" />
  <row Id="9986" PostHistoryTypeId="1" PostId="5050" RevisionGUID="6527072b-c1d6-49f6-b2d0-d0a71ba610ba" CreationDate="2010-10-31T17:09:39.110" UserId="2898" Text="FPS Camera Look Direction" />
  <row Id="9987" PostHistoryTypeId="3" PostId="5050" RevisionGUID="6527072b-c1d6-49f6-b2d0-d0a71ba610ba" CreationDate="2010-10-31T17:09:39.110" UserId="2898" Text="&lt;xna&gt;&lt;camera&gt;" />
  <row Id="9988" PostHistoryTypeId="2" PostId="5051" RevisionGUID="2975262b-ef6b-4f1d-bf5a-21b21600ff2c" CreationDate="2010-10-31T17:22:42.883" UserId="2938" Text="I found a couple of links that might be useful for others:&#xD;&#xA;&#xD;&#xA;Example script of Bezier implementation in JS&lt;br /&gt;&#xD;&#xA;http://jsfromhell.com/math/bezier&#xD;&#xA;&#xD;&#xA;It can be used from JavaScript or ActionScript to animate along a bezier path. &lt;br /&gt;&#xD;&#xA;http://code.google.com/p/javascript-beziers/&#xD;&#xA;&#xD;&#xA;Online drawing script/plot, quite useful if you want to make some tests&lt;br /&gt;&#xD;&#xA;http://jsdraw2d.jsfiction.com/demo/curvesbezier.htm&#xD;&#xA;&#xD;&#xA;A bit of theory and an implementation example&lt;br /&gt;&#xD;&#xA;http://13thparallel.com/archive/bezier-curves/" />
  <row Id="9989" PostHistoryTypeId="2" PostId="5052" RevisionGUID="9008e7db-b68d-45ac-b793-5d2dac94b9b0" CreationDate="2010-10-31T17:35:37.463" UserId="2631" Text="I think you would be better off having separate variables to store the amount of up/down and left/right rotation. These variables should be adjusted by your functions. Then you can calculate your rotation matrix in one place on each frame as in the code below and use that matrix to rotate your LookDirection.&#xD;&#xA;&#xD;&#xA;    Matrix rotation = Matrix.CreateRotationX(upDownRotation) * Matrix.CreateRotationY(leftRightRotation);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9990" PostHistoryTypeId="2" PostId="5053" RevisionGUID="f1a38f11-7ab7-4799-b24c-fcc9785b952b" CreationDate="2010-10-31T17:39:16.290" UserId="1713" Text="In order to save bandwidth in my [multiplayer game][1], I do not update every object every server tick, instead each object has an updateRate which tells the game that this object is expected to be updated every X server ticks.&#xD;&#xA;&#xD;&#xA;When I receive an update message for an object I calculate the time I expect the next update to come in:  &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    origin = serverCurrentPosition&#xD;&#xA;    diff = serverNextPosition - origin&#xD;&#xA;    arriveTime = now + timeBetweenTicks * updateRate&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;When I draw the object I calculate the time that's left till the next update and interpolate the position accordingly:&#xD;&#xA;&#xD;&#xA;    step = 100 / timeBetweenTicks * updateRate&#xD;&#xA;    delta = 1 - step * ((arriveTime - now) / 100)&#xD;&#xA;    position = origin + diff * delta&#xD;&#xA;&#xD;&#xA;It works... but there's still a bit of jitter in the drawing, although in my theory every thing should work out fine, since the scaling should take care of *some amount* of lag, should it?&#xD;&#xA;&#xD;&#xA;So the question here is, is this the best approach? Should I put actual lag into the computation? If so, how would I do that? I did some experiements, but the jitter only got worse.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bonsaiden.github.com/NodeGame-Shooter/" />
  <row Id="9991" PostHistoryTypeId="1" PostId="5053" RevisionGUID="f1a38f11-7ab7-4799-b24c-fcc9785b952b" CreationDate="2010-10-31T17:39:16.290" UserId="1713" Text="Interpolating positions in a multiplayer game" />
  <row Id="9992" PostHistoryTypeId="3" PostId="5053" RevisionGUID="f1a38f11-7ab7-4799-b24c-fcc9785b952b" CreationDate="2010-10-31T17:39:16.290" UserId="1713" Text="&lt;multiplayer&gt;&lt;client-server&gt;&lt;interpolation&gt;" />
  <row Id="9993" PostHistoryTypeId="2" PostId="5054" RevisionGUID="72a786bb-6ddf-4798-81a1-587b447fefd6" CreationDate="2010-10-31T18:24:58.577" UserId="395" Text="The original version of [Galcon](http://www.galcon.com/) was in pure Python, though it has long since been ported to other languages (at last count there were Obj-C, Flash, and C++ versions). It does still use Python for AI via the TinyPy library, but I suppose that is &quot;just scripting&quot;. &#xD;&#xA;&#xD;&#xA;As a general comment, Python isn't really well suited for making a blazingly fast graphics engine. You get far more control writing the core, performance-sensitive code in C or C++ and then writing the complex game logic in Python. Python excels at the more logic related areas since its expressiveness is a productivity win over C and the drop in performance isn't an issue. This is why everyone (CCP, Panda3D, Unity, Civ4, etc) all work like this. The real question is does this count as being &quot;in Python&quot;? For example, in Eve everything related to the actual game (more or less) is in Python, the C++ part is just a generic game engine that handles pushing pixels and audio." />
  <row Id="9994" PostHistoryTypeId="2" PostId="5055" RevisionGUID="01375ede-0df1-4998-a4d2-5cab1d47d182" CreationDate="2010-10-31T19:00:18.747" UserId="1024" Text="Here are some ways to prevent z fighting. &#xD;&#xA;&#xD;&#xA; - Make the near and far planes close together and the space between clothing parts as far as possible. &#xD;&#xA; - Depending on the types of animations and the situation it might be possible to disable z testing/writing and rely on painters algorithm. &#xD;&#xA; - Write a screen capture app. Go through your characters and animations and have your artist adjust the animations if there are problems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9995" PostHistoryTypeId="2" PostId="5056" RevisionGUID="741fe815-d422-4d22-9ce3-4d63d791081d" CreationDate="2010-10-31T19:29:27.677" UserId="1024" Text="There are situations where having everything on rendered on the GPU might make sense, but you can't set constants inside a shader and there is really no where else to set them up except on the CPU side before a draw call. &#xD;&#xA;&#xD;&#xA;Even if you could compute your constants, like the bone transformation matrices, on the GPU with a custom initialization program, you probably wouldn't want to. the GPU is really good at parallel execution, but has a much slower clock speed.&#xD;&#xA;&#xD;&#xA;Transforming a hierarchy is not trivially parallelizable, because the child nodes depend on the parents, but transforming all the vertices in a mesh is, because the vertices are computational independent from each other. &#xD;&#xA;&#xD;&#xA;The general rule is:&#xD;&#xA;&#xD;&#xA; - Serial processing : CPU&#xD;&#xA; - Parallel processing : GPU&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="9996" PostHistoryTypeId="2" PostId="5057" RevisionGUID="a6d5b28e-4fb2-4c77-b30c-66c4180a6752" CreationDate="2010-10-31T20:40:32.843" UserId="744" Text="&lt;a href=&quot;http://fretsonfire.sourceforge.net/&quot;&gt;Frets on Fire&lt;/a&gt; (in addition to Galcon, which is not native Python anymore) is the only &quot;native Python&quot; game I can think of that achieved some degree of lasting fame." />
  <row Id="9997" PostHistoryTypeId="5" PostId="5035" RevisionGUID="eaa20800-7f32-4903-939d-a10e0f557448" CreationDate="2010-10-31T21:28:16.827" UserId="1156" Comment="deleted 100 characters in body" Text="I've seen a couple of these, namely [Java][1] and [C#/XNA][2]...and I've recently been picking up Python. Which kind of made me think.&#xD;&#xA;&#xD;&#xA;What (famous) games have been written in Python, with Pygame/Pyglet/Pyopengl?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="9998" PostHistoryTypeId="5" PostId="5049" RevisionGUID="8b6d1cf0-ef03-4e73-84a2-f9ebce93364c" CreationDate="2010-10-31T22:30:03.113" UserId="2290" Comment="deleted 25 characters in body" Text="In most cases, using [A*][1] over a [navigation mesh][2] (commonly referred to as a &quot;navmesh&quot;) is the best pathfinding solution for RTSs. There is a detailed explanation of how navmeshes work, why they are a better solution than waypoint systems, and links to implementation resources, [here][3].&#xD;&#xA;&#xD;&#xA;If you're planning on developing special game modes (point/node capture) or units that patrol, take cover, etc., you will probably want to implement a waypoint layer atop your navmesh, to control AI behavior (**not pathfinding**).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bit.ly/136l00&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Navigation_mesh&#xD;&#xA;  [3]: http://www.ai-blog.net/archives/000152.html" />
  <row Id="9999" PostHistoryTypeId="8" PostId="4764" RevisionGUID="1425e9d5-decd-4c01-a12a-1381489c24c2" CreationDate="2010-11-01T00:25:46.127" UserId="370" Comment="Rollback to [58a39cdb-eb7c-4d83-b02d-c4614c40be9a]" Text="###[Weapon of Choice][1]&#xD;&#xA;&#xD;&#xA;Weapon of Choice is an Indie game from [Mommy's Best Games][2].  The game is written in C#/XNA.  Gamasutra has a great [post-mortem][3] where the developer discusses using C# to write a game (he had been using C/C++ prior to going independent).&#xD;&#xA;&#xD;&#xA;I don't know if it's considered famous but it did [win some awards][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mommysbestgames.com/weaponofchoice.html&#xD;&#xA;  [2]: http://www.mommysbestgames.com/&#xD;&#xA;  [3]: http://www.gamasutra.com/view/feature/3899/postmortem_mommys_best_games_.php&#xD;&#xA;  [4]: http://www.mommysbestgames.com/press.html" />
  <row Id="10002" PostHistoryTypeId="2" PostId="5059" RevisionGUID="59fd3d00-74d1-4f15-b12d-37e3c091690d" CreationDate="2010-11-01T01:15:45.133" UserId="1687" Text="I have solved this problem before with some success with an approach I call &quot;network shadows&quot;. I don't know if this is something other people do, but it's always worked for me.&#xD;&#xA;&#xD;&#xA;Each entity which is being synchronised across the network has an invisible network shadow entity. When an update comes in from the network, you teleport the shadow directly to the position the network says it should be at, then you slowly interpolate the local visible entity towards the shadow over time.&#xD;&#xA;&#xD;&#xA;I included a lot of detail about this approach in my previous answer [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3276821/dealing-with-lag-in-xna-lidgren/3276994#3276994" />
  <row Id="10003" PostHistoryTypeId="5" PostId="5016" RevisionGUID="e2101987-4ce5-4a0a-9e69-97efb72b2eab" CreationDate="2010-11-01T03:06:21.080" UserId="2919" Comment="added 3 characters in body" Text="Your normals should be in tangent space, that way you can apply them onto any surface for which you can create a tangent space (trivial for spheres.) Basically the normal map describes how the normal differs from the actual normal on a small patch on the surface. The tangent space is what you probably try to get with your Jacobian matrix -- for a sphere, you can create a tangent space coordinate system at any given point by using the normal at the point and two perpendicular vectors -- just orient them consistently (for instance, along u and v) and you're done. You can then translate your incoming light vector into tangent space (or the other way round) and light with the new normal. The advantage is that your normal map will work on any object with a defined tangent space and UV mapping. &#xD;&#xA;&#xD;&#xA;On the cube, your tangent space for each face is simply that face itself (i.e. if you have a face which has a normal -Z for instance, and your tangent space up is +Y, you just rotate that normal using a matrix which maps -Z to +Y.)" />
  <row Id="10004" PostHistoryTypeId="2" PostId="5060" RevisionGUID="607545b2-39eb-4e93-afbd-7ef3480f2826" CreationDate="2010-11-01T03:48:25.557" UserId="2137" Text="So I've been looking around, but it seems that information on this is scarce.&#xD;&#xA;&#xD;&#xA;If one wants to develop an arcade game (as in, coin operated), ignoring the software side, where does one start on the hardware side?&#xD;&#xA;&#xD;&#xA;I mean, is there some kind of company that sells arcade systems with some kind of spec for you to develop things on, etc?&#xD;&#xA;&#xD;&#xA;I suppose this question is asking a lot more about the entrepreneurial side of stuff, but it's probably still related to game development.." />
  <row Id="10005" PostHistoryTypeId="1" PostId="5060" RevisionGUID="607545b2-39eb-4e93-afbd-7ef3480f2826" CreationDate="2010-11-01T03:48:25.557" UserId="2137" Text="Independent Arcade Game Development" />
  <row Id="10006" PostHistoryTypeId="3" PostId="5060" RevisionGUID="607545b2-39eb-4e93-afbd-7ef3480f2826" CreationDate="2010-11-01T03:48:25.557" UserId="2137" Text="&lt;business&gt;" />
  <row Id="10007" PostHistoryTypeId="6" PostId="5060" RevisionGUID="e1fb3d6b-532f-4baf-af45-b0ed76c8e301" CreationDate="2010-11-01T04:29:16.750" UserId="2290" Comment="edited tags" Text="&lt;business&gt;&lt;hardware&gt;" />
  <row Id="10008" PostHistoryTypeId="2" PostId="5061" RevisionGUID="1ee867f4-c884-4278-8d4c-6cda8ec7c47c" CreationDate="2010-11-01T04:56:23.377" UserDisplayName="yuudai80" Text="Hey guys, I am also reading the same book, and that method is defined as a procedure in the game class ( File Game1.cs) as&#xD;&#xA;&#xD;&#xA;    Rectangle TitleSafeRegion( int spriteWidth, int spriteHeight )&#xD;&#xA;    {&#xD;&#xA;        #if XBOX&#xD;&#xA;        // some televisions only show 80% of the window&#xD;&#xA;        [... code here ...]&#xD;&#xA;        // ensure image drawn in safe region on all sides&#xD;&#xA;        return new Rectangle( [... code here ...] );&#xD;&#xA;        #endif&#xD;&#xA;  &#xD;&#xA;        // show entire region on the PC or Zune&#xD;&#xA;        return new Rectangle( 0, 0, [... Code here ...] );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It isn't part of Viewport, the author implemented his own method to show compatibility with XBOX, PC, and Zune.  It is found on Chapter 4, page 44.  Hope this answered your question.  Sorry, for the late post." />
  <row Id="10009" PostHistoryTypeId="2" PostId="5062" RevisionGUID="e7b30ee4-fac2-4c76-8bbc-3a70fbd7390c" CreationDate="2010-11-01T05:30:24.913" UserId="2951" Text="I have been looking for and found any." />
  <row Id="10010" PostHistoryTypeId="1" PostId="5062" RevisionGUID="e7b30ee4-fac2-4c76-8bbc-3a70fbd7390c" CreationDate="2010-11-01T05:30:24.913" UserId="2951" Text="Is there any opensource game frameworks in browser ?" />
  <row Id="10011" PostHistoryTypeId="3" PostId="5062" RevisionGUID="e7b30ee4-fac2-4c76-8bbc-3a70fbd7390c" CreationDate="2010-11-01T05:30:24.913" UserId="2951" Text="&lt;framework&gt;&lt;javascript&gt;" />
  <row Id="10012" PostHistoryTypeId="2" PostId="5063" RevisionGUID="170c329b-3266-4ba9-a992-b80e410b16da" CreationDate="2010-11-01T05:50:48.240" UserId="999" Text="You can implement the light as a translucent image, e.g. a .png with an alpha channel. Then you just rotate it to point to your looking direction." />
  <row Id="10013" PostHistoryTypeId="2" PostId="5064" RevisionGUID="b4550246-335a-4bf5-beb5-79b92f2abc41" CreationDate="2010-11-01T07:39:30.893" UserId="2781" Text="You can purchase a cabinet from any number of cabinet manufacturers. I can recommend [NorthCoast Custom Arcades][1]. Then you need a screen, which is just a monitor, and an input device, which is usually a set of panel-mounted joysticks and buttons and can be had from many manufacturers (I think mameroom's controller offerings are very overkill). Finally you need a coin/token/bill/card acceptor, which is also available from numerous sources depending on exactly how you want to take payment. Once you have all that, you can just connect it to a PC installed inside the case.&#xD;&#xA;&#xD;&#xA;Which is to say, in response to what you might have been trying to ask... No, there is no &quot;standard&quot; arcade cabinet &quot;platform&quot; that you would design for. Most companies use their own mix of hardware and software.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mameroom.com/home.asp" />
  <row Id="10014" PostHistoryTypeId="2" PostId="5065" RevisionGUID="fac091e2-fcce-4b0a-ab88-a33afbed8592" CreationDate="2010-11-01T08:38:33.587" UserId="2865" Text="There are many, some of most famous:&#xD;&#xA;&#xD;&#xA;http://gamequery.onaluf.org/&#xD;&#xA;&#xD;&#xA;http://www.sean.co.uk/a/webdesign/javascript_gamelib/javascript_gamelib.shtm&#xD;&#xA;&#xD;&#xA;http://www.effectgames.com/effect/&#xD;&#xA;&#xD;&#xA;http://mccormick.cx/projects/jsGameSoup/&#xD;&#xA;&#xD;&#xA;http://rocketpack.fi/engine/" />
  <row Id="10015" PostHistoryTypeId="2" PostId="5066" RevisionGUID="8f83ad99-eca6-40be-9fe0-31af1e6eabef" CreationDate="2010-11-01T08:49:43.650" UserId="744" Text="While Sparr is correct that there is no single standard platform, there are some hardware standards you need to know about.&#xD;&#xA;&#xD;&#xA;If you want to sell games (i.e. a PC and hard drive) rather than entire cabinets, you'll need to make sure your hardware of choice supports &lt;a href=&quot;http://en.wikipedia.org/wiki/JAMMA#JAMMA_Video_Standard&quot;&gt;JAMMA&lt;/a&gt;, which is the input/video port used on arcade machines.&#xD;&#xA;&#xD;&#xA;If you don't want to spend a lot of time developing your own hardware platform or learning a new one, you might want to consider &lt;a href=&quot;http://en.wikipedia.org/wiki/Taito_Type_X&quot;&gt;the Taito Type X series of arcade boards&lt;/a&gt;. These boards run hardware similar to a standard PC, and porting PC games to them is generally easy.&#xD;&#xA;&#xD;&#xA;Note that the arcade market is dead in most countries, very competitive, and very expensive to enter. Your best bet is to get a company already in the arcade market to buy your game, and they'll probably dictate their hardware platform based on what they have experience in." />
  <row Id="10016" PostHistoryTypeId="2" PostId="5067" RevisionGUID="85edf727-67ce-48dd-8723-19c1b114fd9d" CreationDate="2010-11-01T09:27:49.307" UserId="2710" Text="You have jitter, because you lag is changing constantly. This means, that while server sends updates exactly every `timeBetweenTicks` ticks, the *client* receives them after some variable time. That time is probably close to `timeBetweenTicks` on a good connection, but not exactly equal (And besides, you may have server lag and different clock speeds on server and client).&#xD;&#xA;&#xD;&#xA;So, when you rely on receiving the update in exactly the specified time, you constantly arrive at the destination a bit before/after the actual update. Hence, jitter. &#xD;&#xA;&#xD;&#xA;Simple approach to reduce jitter is using &quot;rubber-banding&quot;, which is what Martin suggests in another answer. Basically, when you receive update, you don't immediately change the object's position. Instead, if client position and server position differ only slightly, you begin interpolating client position, so that after some specified time (say, halfway to next update) client and server positions converge. &#xD;&#xA;&#xD;&#xA;Another idea to reduce jitter in your setup: since you transmit both &quot;current&quot; and &quot;next&quot; coordinates, you can calculate the velocity of the object. Then, when update lags, you don't stop the object at its destination (i.e. &quot;next&quot; position), but continue moving it with the same velocity. If your objects don't change their speeds abruptly, this will really improve motion smoothness on the client." />
  <row Id="10017" PostHistoryTypeId="2" PostId="5068" RevisionGUID="66246f6f-7865-485b-a790-cbc8d7c7800b" CreationDate="2010-11-01T09:49:55.510" UserId="2710" Text="I believe everybody has heard of Minecraft. It is a deceptively simple game, that was made by a single indie developer, and sold more than 500k copies - despite having no active marketing and being technically a buggy alpha-version.&#xD;&#xA;&#xD;&#xA;That is really great success for an indie game. And I think we can all learn much from it. So I want to examine Minecraft's game design: what, in your opinion, makes it so great? What choices work well, how they combine together to make a great game? And what design decision are bad (I don't think *everything* is ideal in Minecraft)&#xD;&#xA;&#xD;&#xA;What do you think?" />
  <row Id="10018" PostHistoryTypeId="1" PostId="5068" RevisionGUID="66246f6f-7865-485b-a790-cbc8d7c7800b" CreationDate="2010-11-01T09:49:55.510" UserId="2710" Text="What makes Minecraft so great?" />
  <row Id="10019" PostHistoryTypeId="3" PostId="5068" RevisionGUID="66246f6f-7865-485b-a790-cbc8d7c7800b" CreationDate="2010-11-01T09:49:55.510" UserId="2710" Text="&lt;game-design&gt;" />
  <row Id="10020" PostHistoryTypeId="2" PostId="5069" RevisionGUID="9865848f-5481-4042-9cd6-4b7ba181ecac" CreationDate="2010-11-01T10:21:30.320" UserId="680" Text="It's fun without being a chore to play.&#xD;&#xA;&#xD;&#xA;Personally, (and this question is going to be subjective anyway) I find the whole remove-build blocks mechanic to be a compelling reminder of playing with lego when I was a kid, except now the things I make are required to survive the zombie hordes." />
  <row Id="10021" PostHistoryTypeId="2" PostId="5070" RevisionGUID="4da40437-95a6-4c4d-8d49-cc8cd74fbc0e" CreationDate="2010-11-01T12:20:47.180" UserId="2316" Text="Also, this:&#xD;&#xA;&#xD;&#xA;http://www.penny-arcade.com/comic/2010/9/17/&#xD;&#xA;&#xD;&#xA;It's like getting to be on the &quot;staff picks&quot; of the App Store." />
  <row Id="10022" PostHistoryTypeId="2" PostId="5071" RevisionGUID="a2e8bb75-41a0-4639-9e57-9d2195f5bacf" CreationDate="2010-11-01T12:35:30.733" UserId="2316" Text="I'm looking to have people share game content, save files, or characters on a mobile game platform.  That means they need to be able to upload and download from their phone, other iOS device, or computer.&#xD;&#xA;&#xD;&#xA;What's the best way to do this?&#xD;&#xA;&#xD;&#xA;Does Apple have a history of allowing games to download 'content' (incl. graphics) that hasn't been approved?&#xD;&#xA;&#xD;&#xA;Are there any apps that do this, that I can try out?&#xD;&#xA;&#xD;&#xA;Thanks," />
  <row Id="10023" PostHistoryTypeId="1" PostId="5071" RevisionGUID="a2e8bb75-41a0-4639-9e57-9d2195f5bacf" CreationDate="2010-11-01T12:35:30.733" UserId="2316" Text="Save File sharing over Mobile Networks" />
  <row Id="10024" PostHistoryTypeId="3" PostId="5071" RevisionGUID="a2e8bb75-41a0-4639-9e57-9d2195f5bacf" CreationDate="2010-11-01T12:35:30.733" UserId="2316" Text="&lt;iphone&gt;" />
  <row Id="10025" PostHistoryTypeId="2" PostId="5072" RevisionGUID="64870577-6cbc-47b2-8f86-581b88801819" CreationDate="2010-11-01T12:40:59.730" UserId="953" Text="The game works well because (in part) it appeals to many different types of play.  It allows for exploration, construction, combat, socialization, optimization, and creativity.  Its graphics are quite cute, while it often becomes very tense due to the player's fragility.&#xD;&#xA;&#xD;&#xA;The game also provides an excellent feeling of accomplishment and increasing power.  At the start of the game, the player is quite vulnerable and weak, and nearly every player gets the &quot;huddling in a dirt hut&quot; experience.  As the player gets more resources and learns to build a more effective base, she is conquering the world around her.  By late-game, the player has mined down to the core of the earth, has an expansive castle network, controls elaborate monster-traps, is wearing clothes made of diamonds, and no longer has quite the same fear of a lone skeleton." />
  <row Id="10026" PostHistoryTypeId="2" PostId="5073" RevisionGUID="c8415632-23cc-4064-96b6-3353d4a9e624" CreationDate="2010-11-01T12:50:08.580" UserId="2958" Text="I've think about this every time I play the game.&#xD;&#xA;&#xD;&#xA;What bug me is that someone made a open-source clone of the game: [Manic Digger][1]. The clone, for some reason, doesn't have the same feel as MineCraft does, and I do not know why.&#xD;&#xA;&#xD;&#xA;One of the reasons I think MineCraft is popular even though there's a lot of bugs, is because Markus is very close to his fans/gamers/customers. It gives you the feeling that you know him. &#xD;&#xA;&#xD;&#xA;When I create something, even tough it isn't finished, and I show it to my closest friends, they tend to be impressed. They're impressed even though theres a lot much better working projects out here - but because they know me, they think it's more well done.&#xD;&#xA;&#xD;&#xA;I think this goes for MineCraft as well. Because we sort of know Markus, we tend to like what he does better.&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/manicdigger/" />
  <row Id="10027" PostHistoryTypeId="2" PostId="5074" RevisionGUID="a7fbc0f9-1729-4082-821c-28d8ff61fb95" CreationDate="2010-11-01T13:14:53.157" UserId="288" Text="Say I have a list of (in my case, indie) game ideas, from which I need to select a new project to work on.&#xD;&#xA;&#xD;&#xA;What are the questions/heuristics that you would use - and ideally have already used successfully in the past - to narrow down such a list to a single idea to work on?" />
  <row Id="10028" PostHistoryTypeId="1" PostId="5074" RevisionGUID="a7fbc0f9-1729-4082-821c-28d8ff61fb95" CreationDate="2010-11-01T13:14:53.157" UserId="288" Text="Questions to answer and heuristics to use when selecting a new project?" />
  <row Id="10029" PostHistoryTypeId="3" PostId="5074" RevisionGUID="a7fbc0f9-1729-4082-821c-28d8ff61fb95" CreationDate="2010-11-01T13:14:53.157" UserId="288" Text="&lt;best-practices&gt;&lt;business&gt;&lt;project-management&gt;&lt;planning&gt;" />
  <row Id="10030" PostHistoryTypeId="2" PostId="5075" RevisionGUID="450e2a08-b9c7-4d07-b079-b02642fec02a" CreationDate="2010-11-01T13:33:54.907" UserId="2290" Text="If I had to come up with a system, it would be similar to this:&#xD;&#xA;&#xD;&#xA; - Ask &quot;Would working on the idea break any legal agreements/contracts I signed?&quot;&#xD;&#xA;  - Cross out all the projects that you answer &quot;yes&quot; to. Highlight any &quot;maybe&quot; or &quot;idk&quot; projects&#xD;&#xA; - For each of the projects that are not crossed out, assign an estimated &quot;time to complete&quot; value&#xD;&#xA; - Ask &quot;How much time do I foresee myself having to work on any project?&quot;&#xD;&#xA;  - Cross out all the projects with estimates over your answer&#xD;&#xA; - For each of the projects that are not crossed out, assign a value between 1 and 4 (inclusive) that indicates how fun/exciting the idea is to you&#xD;&#xA; - Select the idea that has the highest fun/excitement value, and the lowest &quot;time to complete&quot; value&#xD;&#xA;&#xD;&#xA;In reality though, I tend to prototype the ideas that I'm most excited about, and more often then not, the idea I end up choosing is the prototype I'm working on when I look up at my clock and realize it's 4am...on a work day." />
  <row Id="10031" PostHistoryTypeId="2" PostId="5076" RevisionGUID="a90f6ce9-e745-442e-8484-9a8d35903935" CreationDate="2010-11-01T13:55:04.090" UserId="2962" Text="**Do what you know best**&#xD;&#xA;&#xD;&#xA;Don't make a strategy game if you have been into action games all your life. Pick a genre you know well and stick to it.&#xD;&#xA;&#xD;&#xA;**Follow your instinct**&#xD;&#xA;&#xD;&#xA;There are too many different opinions and good advices out there. You will be ripped in parts if follow every complain you will encounter by feedback. That does not mean feedback is worthless. Write everything down and sort it by importance (e.g. occurance in your feedback stream). Then go through it and fix real issues. Forget the rest.&#xD;&#xA;&#xD;&#xA;**Don't get browbeaten**&#xD;&#xA;&#xD;&#xA;Every day brings a new load of game releases. Some of them are similar to your project and just look so good that you can't compete. Should you give up? NO! Brainstorm and make a list of uncommon USPs (unique selling points - features other titles don't have) and add some of them to your game. Differentiation will save your game from drowning in obscurity." />
  <row Id="10032" PostHistoryTypeId="2" PostId="5077" RevisionGUID="bc558f1e-86e0-45e4-8461-f934105ffeb0" CreationDate="2010-11-01T14:17:59.420" UserId="89" Text="A partner and I are in the midst of creating a (not so) simple game via C++ and SFML (2D). We have both created some simple games (not together) and would like to start work on a more serious, larger project that challenges our abilities to program, interact with large code as well as working together without getting in each other's way.&#xD;&#xA;&#xD;&#xA;The problem is the getting in each other's way- well, not yet at least.&#xD;&#xA;&#xD;&#xA;We had our first group session today (us two working on the project, one to-be tester and a friend of ours) and wrote down some ideas. It's going to be a birds-eye perspective zelda-like (from SNES) game with a streamlined map and quasi-linear gameplay like Gothic (open world, but you'll likely get yourself killed if you wander around too much).&#xD;&#xA;&#xD;&#xA;Needless to say, I'm not sure if we're aiming too high for the moment, but our biggest concern is the division of responsibilities. Our first impulse was to work on aspects of the game that had nothing in relation to the other (I would work on the menu, he would work on the map, for example).&#xD;&#xA;&#xD;&#xA;Our next impulse was to work on closely-related things in a list-manner. (First the menu, then a map, then the character, then the monster, etc) so we can, piece-by-piece, see our code coming to life in an orderly fashion.&#xD;&#xA;&#xD;&#xA;We haven't picked a SVN yet, but I'm thinking it's going to be Mercurial for the simple reason that I have heard good things of it (neither of us have yet to use a SVN).&#xD;&#xA;&#xD;&#xA;Question:  What would be the proper way to divy up the responsibilities between the two of us? How should we start, how should we continue and how do we do it together with maximum efficiency? Any other tips would be greatly appreciated!" />
  <row Id="10033" PostHistoryTypeId="1" PostId="5077" RevisionGUID="bc558f1e-86e0-45e4-8461-f934105ffeb0" CreationDate="2010-11-01T14:17:59.420" UserId="89" Text="How to Divide Responsibilities Between a Two-Man Group?" />
  <row Id="10034" PostHistoryTypeId="3" PostId="5077" RevisionGUID="bc558f1e-86e0-45e4-8461-f934105ffeb0" CreationDate="2010-11-01T14:17:59.420" UserId="89" Text="&lt;2d&gt;&lt;project-management&gt;&lt;dev-groups&gt;" />
  <row Id="10035" PostHistoryTypeId="16" PostId="5069" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T14:50:12.983" UserId="51" />
  <row Id="10036" PostHistoryTypeId="16" PostId="5070" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T14:50:12.983" UserId="51" />
  <row Id="10037" PostHistoryTypeId="16" PostId="5072" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T14:50:12.983" UserId="51" />
  <row Id="10038" PostHistoryTypeId="16" PostId="5073" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T14:50:12.983" UserId="51" />
  <row Id="10039" PostHistoryTypeId="16" PostId="5068" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T14:50:12.983" UserId="51" />
  <row Id="10040" PostHistoryTypeId="5" PostId="5077" RevisionGUID="2687e649-4291-4722-b927-b841beafc503" CreationDate="2010-11-01T14:55:35.167" UserId="89" Comment="edited body" Text="A partner and I are in the midst of creating a (not so) simple game via C++ and SFML (2D). We have both created some simple games (not together) and would like to start work on a more serious, larger project that challenges our abilities to program, interact with large code as well as working together without getting in each other's way.&#xD;&#xA;&#xD;&#xA;The problem is the getting in each other's way- well, not yet at least.&#xD;&#xA;&#xD;&#xA;We had our first group session today (us two working on the project, one to-be tester and a friend of ours) and wrote down some ideas. It's going to be a birds-eye perspective zelda-like (from SNES) game with a streamlined map and quasi-linear gameplay like Gothic (open world, but you'll likely get yourself killed if you wander around too much).&#xD;&#xA;&#xD;&#xA;Needless to say, I'm not sure if we're aiming too high for the moment, but our biggest concern is the division of responsibilities. Our first impulse was to work on aspects of the game that had nothing in relation to the other (I would work on the menu, he would work on the map, for example).&#xD;&#xA;&#xD;&#xA;Our next impulse was to work on closely-related things in a list-manner. (First the menu, then a map, then the character, then the monster, etc) so we can, piece-by-piece, see our code coming to life in an orderly fashion.&#xD;&#xA;&#xD;&#xA;We haven't picked a VCS yet, but I'm thinking it's going to be Mercurial for the simple reason that I have heard good things of it (neither of us have yet to use a VCS).&#xD;&#xA;&#xD;&#xA;Question:  What would be the proper way to divy up the responsibilities between the two of us? How should we start, how should we continue and how do we do it together with maximum efficiency? Any other tips would be greatly appreciated!" />
  <row Id="10041" PostHistoryTypeId="2" PostId="5078" RevisionGUID="4a926d89-e1ae-4460-93b1-bdb516cc5691" CreationDate="2010-11-01T15:00:29.883" UserId="51" Text="One of the key components to it's virality (and therefore success), is how varied and *personal* the user stories are.  There are certain games that you can't just help talk about them when you're in a group.  Blizzard games are a perfect example, WoW players and SC2 players will talk about their respective games with other people who care every chance they get.  I find that to be very similar to the behavior of people who play minecraft.&#xD;&#xA;&#xD;&#xA;Why is that?  Judging from the stories I've heard, a lot of it is due to the content creation.  People are *proud* of their bases/traps/other emergent gameplay elements.  The fact that the game isn't hyper realistic at all leads to some very interesting side effects.  And the ease of death (like the point Gregory Weir made), means that the game isn't one of those games where you're just going through the motions to get to the next cutscene or see the next level.  Smart players will come up with interesting ideas on how to better survive the world (like placing a chest near the spawn point filled with backup weapons and laying down some construction pointing to their home base, or maybe take advantage of the infinite fire bug of previous versions to have a scorched-earth-style breadcrumb system) and enjoy *sharing* that with other people.&#xD;&#xA;" />
  <row Id="10042" PostHistoryTypeId="2" PostId="5079" RevisionGUID="a9b066f8-07b1-4726-9fb2-8dbe8a3e73d9" CreationDate="2010-11-01T15:02:13.780" UserId="889" Text="Personally, I think you NEED a server for managing files, assets, versions, etc. Yet for a 2-man project, SVN can be tricky to learn when you never used it (for making merges for exemple), but still it's a good tool and completely free.&#xD;&#xA;&#xD;&#xA;For dividing tasks, it highly depends on the time you two will need to complete tasks. In video games, tasks are really often binded to other tasks (Need to map editor to place units, need the inventory to choose object to use...). Game industries usually use a project management tool called SCRUM. It is tricky to understand and need time to use correctly so I don't think you should use this method, but there actually is some concepts that could be quite interesting for you.&#xD;&#xA;&#xD;&#xA;For exemple, Scrum method says to divide a project in small iterations. Each iteration should give you a functionnal game (yet not complete). Using this will allow you to get a demo of your game every 3 - 4 weeks to see where you guys are and make adjustment of project scope. Next interesting feature is, in each iterations, write a set of game features that should be implemented. Theses features are not from the programmer view, but from the player's. For exemple if you want to give the ability to jump, do not write &quot;Add physic module to Player class to push upward acceleration&quot; anyway the way you think it should be implemented will change. The task should be &quot;Make the hero jump&quot;. Using this method, you will choose what you are working on when it's the time. When a feature is finished, choose another one.&#xD;&#xA;&#xD;&#xA;Another advantage of using such methods is that none of you will be the &quot;Hero of map editor&quot; or &quot;Hero of physic module&quot;. If you guys are approximatively the same level, you should work on every modules of the game. Code quality is a thing you want to make sure to respect and a double check is always good. So you should work on all module to assure the quality of work, but to make your brain work on other types of problems to, it's good for the motivation! Finally I would suggest you to make your friend check every features you finish before you make the final commit in the game. Like this, you guys will learn about each others, you will help each other out and you will know about how the other modules of the game are coded. The latter will help you creating new modules.&#xD;&#xA;&#xD;&#xA;I suggest you to check this http://www.agile42.com/cms/pages/agilo/ it's a free Scrum tool that you can use with SVN. I used it in a project with friends and it work quite well for small projects.&#xD;&#xA;&#xD;&#xA;Good luck ! :)" />
  <row Id="10043" PostHistoryTypeId="2" PostId="5080" RevisionGUID="fe389aaf-fbd8-42a4-9e93-5183108574f6" CreationDate="2010-11-01T15:04:19.737" UserId="189" Text="I have found that it's best to **have something to start with**. Then it's easier to list the things that need to be added or fixed, and divvy those out. So you might consider [pair programming][1] at first, just to get some basic stuff running and some organized code laid out.&#xD;&#xA;&#xD;&#xA;Just schedule a few hours one day, both of you sit down, one of you be the coder (or switch off), and start from scratch. Create the project, import the libraries, write some basic code, get something on screen. Maybe develop another couple features, to have something working. And then check it into the repository. From that point forward, split so that both of you are working on different things. Make a list, based on what you now have working, of what should be the logical next things to add. There are bound to be features that can be added simultaneously and don't conflict or rely on each other. Then each of you start owning a feature, coding it, and pushing it into the repository once it's stable (and between stable, push it to a branch repository for backup). Rinse, repeat.&#xD;&#xA;&#xD;&#xA;Also when working with version control systems, it's very important to **commit and push often**. Similarly, you then also need to pull and update (and test!) often. When you pull &amp; update a lot of code and something breaks, you're going to be relieved that you can just revert to where you were and update one change at a time until you find the breaking change.&#xD;&#xA;&#xD;&#xA;Another thing, possibly even more important, is to **keep a working copy of your game at all times**. It's like a foundation, something to show friends when they ask how the game is coming and something to inspire you when you're so deep in code that you don't think you'll ever finish and have the game running again.&#xD;&#xA;&#xD;&#xA;But I think I'm getting off topic. Basically, once you get started together, you'll find it's not as hard as you think! You just need to get off the ground.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pair_programming" />
  <row Id="10044" PostHistoryTypeId="16" PostId="766" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10045" PostHistoryTypeId="16" PostId="767" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10046" PostHistoryTypeId="16" PostId="768" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10047" PostHistoryTypeId="16" PostId="789" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10048" PostHistoryTypeId="16" PostId="918" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10049" PostHistoryTypeId="16" PostId="965" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10050" PostHistoryTypeId="16" PostId="970" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10051" PostHistoryTypeId="16" PostId="1095" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10052" PostHistoryTypeId="16" PostId="1100" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10053" PostHistoryTypeId="16" PostId="1106" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10054" PostHistoryTypeId="16" PostId="1114" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10055" PostHistoryTypeId="16" PostId="1120" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10056" PostHistoryTypeId="16" PostId="1199" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10057" PostHistoryTypeId="16" PostId="1409" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10058" PostHistoryTypeId="16" PostId="5076" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10059" PostHistoryTypeId="16" PostId="765" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:08:27.377" UserId="51" />
  <row Id="10060" PostHistoryTypeId="16" PostId="5065" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:09:48.030" UserId="51" />
  <row Id="10061" PostHistoryTypeId="16" PostId="5062" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T15:09:48.030" UserId="51" />
  <row Id="10062" PostHistoryTypeId="2" PostId="5081" RevisionGUID="d27627a4-3976-479d-8b00-1bd6f0aa7788" CreationDate="2010-11-01T15:11:26.343" UserId="189" Text="It's full of [emergent gameplay][1]!&#xD;&#xA;&#xD;&#xA;Empower the player to be able to build and break anything, give them a loose goal (survive the night) and the means to do it any way they see fit, and everyone's experience is different. This is in stark contrast to the majority of games today.&#xD;&#xA;&#xD;&#xA;I think it also helps that it can be played in the browser as an applet. You can tell someone about Minecraft, and then show them just by going to minecraft.net and clicking a link, from any computer (with Java installed). Don't underestimate the power of ease of access. I think this is what helped get it started, but now of course everywhere you turn there's an article or a YouTube video about it and it might not be as important any more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Emergent_gameplay" />
  <row Id="10063" PostHistoryTypeId="2" PostId="5082" RevisionGUID="ccac8a96-4a4b-4b9b-81f4-ea30d6dca60e" CreationDate="2010-11-01T15:39:44.217" UserId="2491" Text="**Do Build Your Community, Don't Be a Jerk**&#xD;&#xA;&#xD;&#xA;Indie games, being small, have small but often fanatically loyal fan bases.  No matter how your fans act, there's value in catering to your hardcore community and keeping them happy.  Keep a dev blog and twitter account, personally visit the forums and respond to issues.  The community loves a developer who gives them personal attention.  Sometimes keeping a public list of bugs to fix or features to develop can be good too.  ToadyOne (Dwarf Fortress) and Notch (Minecraft) both do this to some degree and the community really loves knowing when they can expect X feature or bug fix.  &#xD;&#xA;&#xD;&#xA;*As an Indie, your community is your boss and you should keep them informed and invested in your project as such.*&#xD;&#xA;&#xD;&#xA;On a similar note, though, don't be a jerk, don't bad mouth other game devs.  That's just unprofessional, and it makes you look petty.  Sometimes big game developers talk too much and the gaming press usually annihilates them if the fans don't do it first.  As an indie, you want friends, lots of them.  You want other indie devs to go &quot;Wow, that guy is a class act, I want to work with him, maybe do a bundle release of our games so we'll both sell more.&quot;&#xD;&#xA;&#xD;&#xA;EDIT: **Caveat, Hardcore**&#xD;&#xA;&#xD;&#xA;I forgot to mention one little clarification on &quot;no matter how your fans act.&quot;  Obviously you don't want to be a jerk, but you don't want your fans to be a jerk by proxy for you either.  This is a serious problem in the fighting game scene, where the fans of some games are seen as so generally unpleasant that those games are banned just so their fans won't show up at tournaments.  See also: No Mutants Allowed and Fallout.  &#xD;&#xA;&#xD;&#xA;If your game can sustain itself on a hardcore group, that's fine.  But if you want broad appeal, take care not to encourage a community of elitism that scares away newbies.  One big appeal of games like Minecraft or Dwarf Fortress is that both have active community wikis and forums that make the game more inviting to new players." />
  <row Id="10064" PostHistoryTypeId="2" PostId="5083" RevisionGUID="6458fa1c-224c-4e41-8904-9db1123a79da" CreationDate="2010-11-01T16:07:09.463" UserId="2964" Text="Are there any tools that would let multiple people edit things like sprites or code at the same time? Perhaps something that works with services that host code." />
  <row Id="10065" PostHistoryTypeId="1" PostId="5083" RevisionGUID="6458fa1c-224c-4e41-8904-9db1123a79da" CreationDate="2010-11-01T16:07:09.463" UserId="2964" Text="What tools are available for collaborative game development?" />
  <row Id="10066" PostHistoryTypeId="3" PostId="5083" RevisionGUID="6458fa1c-224c-4e41-8904-9db1123a79da" CreationDate="2010-11-01T16:07:09.463" UserId="2964" Text="&lt;programming&gt;&lt;tools&gt;" />
  <row Id="10070" PostHistoryTypeId="2" PostId="5085" RevisionGUID="78700c2e-d6e7-4340-8d5a-6c5b2ac48064" CreationDate="2010-11-01T16:31:41.063" UserId="178" Text="For a text-editor which supports multi-user-editing, try [Gobby][1],&#xD;&#xA;also there is a project from mozilla labs called [Skywriter][2], which allows you to to embed a multi-user-editor on your website.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gobby.0x539.de/trac/&#xD;&#xA;  [2]: https://mozillalabs.com/skywriter/" />
  <row Id="10071" PostHistoryTypeId="2" PostId="5086" RevisionGUID="d63f3c9c-15cf-4822-8803-57b5a7ebbe82" CreationDate="2010-11-01T17:00:22.350" UserId="2966" Text="Surely a source control system is what you need?  Check-ins, check-outs, version history, that sort of thing." />
  <row Id="10073" PostHistoryTypeId="2" PostId="5087" RevisionGUID="0ecaec18-9126-483c-a8c7-e6958d681b70" CreationDate="2010-11-01T17:55:47.780" UserId="2968" Text="I'm interested in tinkering with the AI in Civ 5.  I know there are XML files that can adjust the AI's strategies, but are there other easily moddable AI components?  The XML files contain comments that reference some CPP files, are those available to end users or are those comments just aimed at internals?" />
  <row Id="10074" PostHistoryTypeId="1" PostId="5087" RevisionGUID="0ecaec18-9126-483c-a8c7-e6958d681b70" CreationDate="2010-11-01T17:55:47.780" UserId="2968" Text="What AI modding is possible in Civ 5?" />
  <row Id="10075" PostHistoryTypeId="3" PostId="5087" RevisionGUID="0ecaec18-9126-483c-a8c7-e6958d681b70" CreationDate="2010-11-01T17:55:47.780" UserId="2968" Text="&lt;ai&gt;&lt;modification&gt;" />
  <row Id="10076" PostHistoryTypeId="2" PostId="5088" RevisionGUID="92387901-d8ff-4bcc-a398-79f131b0e94c" CreationDate="2010-11-01T18:39:33.587" UserId="2289" Text="We've seen that multi-touch on smartphones has been wildly successful. On the iPhone, in fact, it's the only tactile input the user can provide! However, I'm wondering how likely it'll be for multi-touch to take off on desktop PCs (and PC gaming) in the future. Right now, it's mostly a lack of good multi-touch monitors on the market, but the fact that there's not much of a push by manufacturers is disconcerting. It'd be really nice to have multi-touch gestures to navigate in an RTS, for instance, and music games would be really fun with multi-touch input (think Elite Beat Agents or DJ Max Technika, but on the PC).&#xD;&#xA;&#xD;&#xA;Do you think that multi-touch for PCs will eventually take foot and become popular, or will it stagnate?&#xD;&#xA;&#xD;&#xA;P.S. I'm guessing this would be best suited for CW, so if a mod feels like it's appropriate, feel free to mark it as such." />
  <row Id="10077" PostHistoryTypeId="1" PostId="5088" RevisionGUID="92387901-d8ff-4bcc-a398-79f131b0e94c" CreationDate="2010-11-01T18:39:33.587" UserId="2289" Text="Will multi-touch become an important/standard method of input for PC games in the future?" />
  <row Id="10078" PostHistoryTypeId="3" PostId="5088" RevisionGUID="92387901-d8ff-4bcc-a398-79f131b0e94c" CreationDate="2010-11-01T18:39:33.587" UserId="2289" Text="&lt;input&gt;&lt;multitouch&gt;" />
  <row Id="10079" PostHistoryTypeId="2" PostId="5089" RevisionGUID="27cef346-af3d-49c0-9806-093c2e401fac" CreationDate="2010-11-01T19:01:19.643" UserId="849" Text="I don't think that Multi-Touch will ever be big on the PC. One big reason: Just try pushing your monitor. If you are like 99% of all users who have their monitor on a feet or arm, the monitor will now be pushed back.&#xD;&#xA;&#xD;&#xA;Multitouch works on the iPhone because you hold it in your other hand and provide resistance.&#xD;&#xA;&#xD;&#xA;But on a PC, finding the right balance between proper placement of the screen for working AND ergonomic usage just won't happen. Either you tire out too easily or you can't see properly or you have stuff in your way on the desktop, e.g. keyboard and mouse. Trying to move the monitor then results in cables being in the way.&#xD;&#xA;&#xD;&#xA;Sure, you can solve that by mounting it on a flexible arm and moving between work and play modes - welcome to the &lt;1% of users who have such a setup.&#xD;&#xA;&#xD;&#xA;Multitouch is a nice idea, but the ergonomics are simply too horrible and there is no viable solution anywhere near." />
  <row Id="10080" PostHistoryTypeId="2" PostId="5090" RevisionGUID="d11e5bf2-c9bf-4dfc-9534-7f7662fe6b24" CreationDate="2010-11-01T19:01:36.377" UserId="51" Text="If multitouch becomes more popular and supported in games, it'll more than likely be due to multitouch trackpads on gaming-capable laptops becoming more and more pervasive and not due to touch monitors.&#xD;&#xA;&#xD;&#xA;For desktop work, I don't see multitouch monitors being that popular.  I don't think the ergonomics support it.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10081" PostHistoryTypeId="16" PostId="5089" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T19:01:56.357" UserId="51" />
  <row Id="10082" PostHistoryTypeId="16" PostId="5090" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T19:01:56.357" UserId="51" />
  <row Id="10083" PostHistoryTypeId="16" PostId="5088" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T19:01:56.357" UserId="51" />
  <row Id="10084" PostHistoryTypeId="2" PostId="5091" RevisionGUID="59b1a38d-5c4a-424f-a7ae-7b8d1a6a1b56" CreationDate="2010-11-01T19:28:22.150" UserId="891" Text="## Alienbrain ##&#xD;&#xA;&#xD;&#xA;[Alienbrain][1] is one of the only version control systems made for art assets.&#xD;&#xA;&#xD;&#xA;Refer to **SO**: [Version Control for Graphics][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.alienbrain.com&#xD;&#xA;  [2]: http://stackoverflow.com/questions/29292/version-control-for-graphics" />
  <row Id="10085" PostHistoryTypeId="5" PostId="5088" RevisionGUID="a8bd15b9-7a6d-4fad-ad42-09dfad524d21" CreationDate="2010-11-01T20:15:16.180" UserId="2289" Comment="added 69 characters in body" Text="We've seen that multi-touch on smartphones has been wildly successful. On the iPhone, in fact, it's the only tactile input the user can provide! However, I'm wondering how likely it'll be for multi-touch to take off on desktop PCs (and PC gaming) in the future. Right now, it's mostly a lack of good multi-touch monitors on the market, but the fact that there's not much of a push by manufacturers is disconcerting. It'd be really nice to have multi-touch gestures to navigate in an RTS, for instance, and music games would be really fun with multi-touch input (think Elite Beat Agents or DJ Max Technika, but on the PC). &lt;a href=&quot;http://www.youtube.com/watch?v=JZSGwwhO0AI&quot;&gt;An example&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Do you think that multi-touch for PCs will eventually take foot and become popular, or will it stagnate?&#xD;&#xA;&#xD;&#xA;P.S. I'm guessing this would be best suited for CW, so if a mod feels like it's appropriate, feel free to mark it as such." />
  <row Id="10086" PostHistoryTypeId="16" PostId="5085" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T20:36:53.333" UserId="51" />
  <row Id="10087" PostHistoryTypeId="16" PostId="5086" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T20:36:53.333" UserId="51" />
  <row Id="10088" PostHistoryTypeId="16" PostId="5091" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T20:36:53.333" UserId="51" />
  <row Id="10089" PostHistoryTypeId="16" PostId="5083" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-01T20:36:53.333" UserId="51" />
  <row Id="10090" PostHistoryTypeId="2" PostId="5092" RevisionGUID="19e93619-995e-4866-a325-e6e0e60b17db" CreationDate="2010-11-01T20:50:15.553" UserId="422" Text="**Version Control:**&#xD;&#xA;&#xD;&#xA;Try [GitHub](https://github.com/) for version control. It's fantastic -- you can use [git](http://git-scm.com/) or [svn](http://subversion.tigris.org/) (whichever you're more comfortable with) and your repositories get free [issue tracking](http://github.com/blog/411-github-issue-tracker), [wikis](http://github.com/blog/699-making-github-more-open-git-backed-wikis) and cool [visual graphs](http://github.com/blog/39-say-hello-to-the-network-graph-visualizer). The only downside is that if you want your project hosted privately, [you have to pay](http://github.com/plans). (It's as low as $7/month as of this writing; [we](http://github.com/lostdecade) pay and find it well worth the cost.)&#xD;&#xA;&#xD;&#xA;**File Sharing:**&#xD;&#xA;&#xD;&#xA;We also love and use [Dropbox](http://www.dropbox.com/referrals/NTUxMTM0Mjk). It supports Windows, Mac and Linux and [features](https://www.dropbox.com/features) automatic file syncing across multiple machines. You can even hook it into [Growl](http://growl.info/) to see what your collaborators are doing realtime! Best of all, the [basic plan](https://www.dropbox.com/plans) is free and gives you a very generous 2GB of storage." />
  <row Id="10091" PostHistoryTypeId="2" PostId="5093" RevisionGUID="e3b3e151-4ef3-40b8-a44f-bf0cdbb56222" CreationDate="2010-11-01T21:06:04.490" UserId="1198" Text="You'll want to use something like [Amazon S3][1] or [Azure Blob storage][2]. Both of these services will charge you for data transfer both IN and OUT; as well as the average storage amount you are using on their servers.&#xD;&#xA;&#xD;&#xA;They both offer a simple API to read and write data to and from, you can write iOS, Android, BlackBerry, Windows, Mac, Linux, etc versions of your application, which would all consume the same web service API. This gives you the ability to have users interact with data on any platform, and have those changes immediatly available on any other platform.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aws.amazon.com/s3/&#xD;&#xA;  [2]: http://www.microsoft.com/windowsazure/storage/default.aspx" />
  <row Id="10092" PostHistoryTypeId="2" PostId="5094" RevisionGUID="2a6d6448-236b-453d-829f-2061cc962c89" CreationDate="2010-11-01T21:08:29.897" UserId="2798" Text="You need a custom shader for the shadow map generation, so you can output a valid occluder when the transparency of the pixel/fragment is greater than the treshold you specify. This whay, the depth map will be generated per pixel and not per polygon." />
  <row Id="10093" PostHistoryTypeId="2" PostId="5095" RevisionGUID="b8100ca1-c60b-4d57-a638-bf7fa86e605d" CreationDate="2010-11-01T21:15:15.450" UserId="1477" Text="donations ala the [humble indie bundle][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolfire.com/humble" />
  <row Id="10094" PostHistoryTypeId="5" PostId="4968" RevisionGUID="f06b1935-80d5-49e1-a290-ba056f66be15" CreationDate="2010-11-01T21:24:43.380" UserId="744" Comment="Regardless of what the intent of the question was, this is what all the answers actually covered." Text="What revenue models exist for online games?" />
  <row Id="10095" PostHistoryTypeId="4" PostId="4968" RevisionGUID="f06b1935-80d5-49e1-a290-ba056f66be15" CreationDate="2010-11-01T21:24:43.380" UserId="744" Comment="Regardless of what the intent of the question was, this is what all the answers actually covered." Text="Revenue models for online games" />
  <row Id="10096" PostHistoryTypeId="5" PostId="5093" RevisionGUID="5fd5d94d-acba-4cdb-a5a3-4cb71fc65ae6" CreationDate="2010-11-01T21:40:55.207" UserId="1198" Comment="added 296 characters in body" Text="You'll want to use something like [Amazon S3][1] or [Azure Blob storage][2]. Both of these services will charge you for data transfer both IN and OUT; as well as the average storage amount you are using on their servers.&#xD;&#xA;&#xD;&#xA;They both offer a simple API to read and write data to and from, you can write iOS, Android, BlackBerry, Windows, Mac, Linux, etc versions of your application, which would all consume the same web service API. This gives you the ability to have users interact with data on any platform, and have those changes immediatly available on any other platform.&#xD;&#xA;&#xD;&#xA;Optionally, you could write a simple web-service which handles your data conversion between platforms, you could use something like [Amazon EC2][3] to host a service like this. Depending on the complexity of the data you are storing this might be over-kill.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aws.amazon.com/s3/&#xD;&#xA;  [2]: http://www.microsoft.com/windowsazure/storage/default.aspx&#xD;&#xA;  [3]: http://aws.amazon.com/ec2/" />
  <row Id="10097" PostHistoryTypeId="2" PostId="5096" RevisionGUID="1b917b80-b2e6-4f30-a61a-ea9c190d7f1d" CreationDate="2010-11-01T22:55:12.297" UserId="849" Text="**[Breath of Death VII][1]**&#xD;&#xA;&#xD;&#xA;Received a ton of media buzz, including&#xD;&#xA;&#xD;&#xA;* [Kotaku][2]&#xD;&#xA;* [Kotaku (again)][3]&#xD;&#xA;* [The Escapist][4]&#xD;&#xA;* [Gamasutra][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://marketplace.xbox.com/en-US/Product/Breath-of-Death-VII/66acd000-77fe-1000-9115-d802585504bd&#xD;&#xA;  [2]: http://kotaku.com/5550463/xbox-games-you-need-to-know-about&#xD;&#xA;  [3]: http://kotaku.com/5648871/how-an-indie-xbox-answer-to-old+school-dragon-warrior-reached-30k&#xD;&#xA;  [4]: http://www.escapistmagazine.com/news/view/103836-1-Xbox-Live-Indie-RPG-Successfully-Sells-30K&#xD;&#xA;  [5]: http://www.gamasutra.com/blogs/RobertBoyd/20100924/6069/Breath_of_Death_VII_The_Beginning__A_Postmortem.php" />
  <row Id="10098" PostHistoryTypeId="2" PostId="5097" RevisionGUID="a2cfe34a-2f73-42c4-a6a4-e605b2d2fba4" CreationDate="2010-11-01T23:01:59.913" UserId="2974" Text="I wouldn't say this video tutorial series is the best way, but it is very well explained: [www.71squared.com/2009/03/iphone-game-programming-tutorial-1][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.71squared.com/2009/03/iphone-game-programming-tutorial-1/" />
  <row Id="10099" PostHistoryTypeId="2" PostId="5098" RevisionGUID="d100d176-a356-4147-a9ad-fe6f49485703" CreationDate="2010-11-01T23:50:09.713" UserId="678" Text="Funcom's (of Age of Conan/Anarchy Online fame) new game [Bloodline Champions][1] is written in XNA. It's currently in closed beta, but they have been quite generous with the beta keys.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bloodlinechampions.com/" />
  <row Id="10100" PostHistoryTypeId="2" PostId="5099" RevisionGUID="94802d0e-df59-4547-8829-fed52e7e7ee9" CreationDate="2010-11-02T00:08:01.977" UserDisplayName="Hybrid" Text="PC doesn't have to take all &quot;good&quot; interfaces.&#xD;&#xA;Even if we have multi-touch monitors right now, I think it would be very inconvenient.&#xD;&#xA;I would not use it! Even iPhone game plying is painful if you play long. (not too long for PC/Console Game)&#xD;&#xA;&#xD;&#xA;I think new devices for multi-touch screen(for PC, but not main monitor) will become available.(for designer for example?) But I don't think such devices are greatly concerned in game development." />
  <row Id="10101" PostHistoryTypeId="2" PostId="5100" RevisionGUID="8b772713-da0c-4876-9de4-d1213ad496d1" CreationDate="2010-11-02T00:38:37.443" UserId="154" Text="Ergonomics of multi-touch vertical monitors just doesn't work, not to mention that having your hands in front of the screen isn't ideal for visibility.&#xD;&#xA;&#xD;&#xA;The idea of multi-touch pads for desktops is interesting, but they have issues. Wacom and similar tablets work well because they can sense the pen when it hovers over the tablet. This allows the user to move a cursor around the screen without committing to a button press. You can't do that with multi-touch, so either the user is always pressing a button, or you need some other indicator for clicking. Neither option there is ideal." />
  <row Id="10102" PostHistoryTypeId="2" PostId="5101" RevisionGUID="7333ffa7-831f-4cc2-bab3-6e326c4531ae" CreationDate="2010-11-02T00:57:38.517" UserId="2860" Text="I can say multi-touch games will be a different genre, not another standard method of input for pc games. There are games people will still prefer to use on controllers. (Imagine street fighter using multi-touch)&#xD;&#xA;&#xD;&#xA;Multi-touch might only just be useful for entertainment and future homes or even educational game purposes." />
  <row Id="10103" PostHistoryTypeId="2" PostId="5102" RevisionGUID="374222c7-d3ad-49ad-b075-7bdb6b806309" CreationDate="2010-11-02T01:58:23.477" UserId="2760" Text="One of my favorite simulators, [Auran's Trainz][1] is written primarily in .NET.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.auran.com/" />
  <row Id="10104" PostHistoryTypeId="2" PostId="5103" RevisionGUID="9c1b366f-3c88-42dc-b21a-65f5d6953464" CreationDate="2010-11-02T02:34:38.307" UserId="1198" Text="Just to toss this out there, you can build your own and simply stuff a standard PC inside it, Scott Hanselman did this with his Hanselcade -- http://www.hanselman.com/blog/CategoryView.aspx?category=Arcade very labor intensive, but if its for a pet-project this may be what you (or some googler down the road) is looking for." />
  <row Id="10105" PostHistoryTypeId="2" PostId="5104" RevisionGUID="e8fb2150-43c1-4482-91c9-a257d386e096" CreationDate="2010-11-02T02:51:15.953" UserId="2870" Text="Does anyone have specifications for the bio2s scripting language from Bohemia Interactive? They develop Operation Flashpoint, Armed Assault, and Virtual Battlespace." />
  <row Id="10106" PostHistoryTypeId="1" PostId="5104" RevisionGUID="e8fb2150-43c1-4482-91c9-a257d386e096" CreationDate="2010-11-02T02:51:15.953" UserId="2870" Text="Bohemia Interactive's bio2s format" />
  <row Id="10107" PostHistoryTypeId="3" PostId="5104" RevisionGUID="e8fb2150-43c1-4482-91c9-a257d386e096" CreationDate="2010-11-02T02:51:15.953" UserId="2870" Text="&lt;scripting&gt;&lt;languages&gt;" />
  <row Id="10108" PostHistoryTypeId="2" PostId="5105" RevisionGUID="48dc4539-d18d-4937-a747-c94cdadb690b" CreationDate="2010-11-02T03:11:48.837" UserId="2870" Text="Do you know of any terrain formats for FPS games that use a [triangulated irregular network (TIN)](http://en.wikipedia.org/wiki/Triangulated_irregular_network) instead of a grid for elevation representation? Or at least a game whose development tools accept a TIN as input for terrain elevation?&#xD;&#xA;&#xD;&#xA;The only example I have is the [ASCII Scene Export (ASE)](http://wiki.beyondunreal.com/Legacy:ASE_File_Format) format that can be used as input in the terrain editor for the Unreal engine (UnrealEd). I am mainly looking for format that supports terrain holes (both visually and in collision detection) and allow underground models. I want to avoid having to carve and cover gridded terrain elevation grids to place underground models." />
  <row Id="10109" PostHistoryTypeId="1" PostId="5105" RevisionGUID="48dc4539-d18d-4937-a747-c94cdadb690b" CreationDate="2010-11-02T03:11:48.837" UserId="2870" Text="Examples of TIN-based terrain formats in FPS games" />
  <row Id="10110" PostHistoryTypeId="3" PostId="5105" RevisionGUID="48dc4539-d18d-4937-a747-c94cdadb690b" CreationDate="2010-11-02T03:11:48.837" UserId="2870" Text="&lt;first-person-shooter&gt;&lt;file-format&gt;" />
  <row Id="10111" PostHistoryTypeId="5" PostId="5049" RevisionGUID="70fe4c47-7176-44f5-9460-7f2ae217d457" CreationDate="2010-11-02T03:20:57.947" UserId="2290" Comment="Reworded to remove bias" Text="In most cases, using [A*][1] over a [navigation mesh][2] (commonly referred to as a &quot;navmesh&quot;) is the pathfinding solution commercial RTSs use. There is a detailed explanation of how navmeshes work, why they are a better solution than waypoint systems, and links to implementation resources, [here][3].&#xD;&#xA;&#xD;&#xA;If you're planning on developing special game modes (point/node capture) or units that patrol, take cover, etc., you will probably want to implement a waypoint layer atop your navmesh, to control AI behavior (**not pathfinding**).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bit.ly/136l00&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Navigation_mesh&#xD;&#xA;  [3]: http://www.ai-blog.net/archives/000152.html" />
  <row Id="10112" PostHistoryTypeId="2" PostId="5106" RevisionGUID="888c15e0-a7b2-4cc4-af8b-eff11aedbf6c" CreationDate="2010-11-02T07:02:14.617" UserId="2735" Text="I've seen great questions on similar topics, but none that addressed this particular method:&#xD;&#xA;&#xD;&#xA;Given that I have multiple collections of game entities in my [XNA Game Studio] game, with many entities belonging to multiple lists, I'm considering ways I could keep track of whenever an entity is destroyed and remove it from the lists it belongs to.&#xD;&#xA;&#xD;&#xA;A lot of potential methods seem sloppy/convoluted, but I'm reminded of a way I've seen before in which, instead of having multiple collections of game entities, you have collections of game entity *IDs* instead.  These IDs map to game entities via a central &quot;database&quot; (perhaps just a hash table).  &#xD;&#xA;&#xD;&#xA;So, whenever any bit of code wants to access a game entity's members, it first checks to see if it's even in the database still.  If not, it can react accordingly.  &#xD;&#xA;&#xD;&#xA;Is this a sound approach?  It seems that it would eliminate many of the risks/hassles of storing multiple lists, with the tradeoff being the cost of the lookup every time you want to access an object." />
  <row Id="10113" PostHistoryTypeId="1" PostId="5106" RevisionGUID="888c15e0-a7b2-4cc4-af8b-eff11aedbf6c" CreationDate="2010-11-02T07:02:14.617" UserId="2735" Text="Managing multiple references of the same game entity in different places using IDs" />
  <row Id="10114" PostHistoryTypeId="3" PostId="5106" RevisionGUID="888c15e0-a7b2-4cc4-af8b-eff11aedbf6c" CreationDate="2010-11-02T07:02:14.617" UserId="2735" Text="&lt;xna&gt;&lt;architecture&gt;" />
  <row Id="10115" PostHistoryTypeId="2" PostId="5107" RevisionGUID="65db1337-7ccc-4fa4-87d1-db30235d3291" CreationDate="2010-11-02T08:06:13.843" UserId="2137" Text="In another thread I was asking about independent arcade system development, and partly it was because I'm interested in using available 3D holographic technology for the displays.&#xD;&#xA;&#xD;&#xA;I saw one which involved a rotating mirror at very high speeds, so that's probably not going to be too feasible (I'd hate to think of what happens when something goes wrong).&#xD;&#xA;&#xD;&#xA;However, I looked around for videos from trade shows, and I found this:&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=Vl0EIngM-RA&#xD;&#xA;&#xD;&#xA;But information is scarce, and I'm led to believe it's just using mirrors and reflections, and does not convey true 3D depth like the one using rotating mirrors at high speed:&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=YKCUGQ-uo8c&#xD;&#xA;&#xD;&#xA;So yeah, does anyone know if there's something better available today?" />
  <row Id="10116" PostHistoryTypeId="1" PostId="5107" RevisionGUID="65db1337-7ccc-4fa4-87d1-db30235d3291" CreationDate="2010-11-02T08:06:13.843" UserId="2137" Text="Current state of the art for holographic displays?" />
  <row Id="10117" PostHistoryTypeId="3" PostId="5107" RevisionGUID="65db1337-7ccc-4fa4-87d1-db30235d3291" CreationDate="2010-11-02T08:06:13.843" UserId="2137" Text="&lt;hardware&gt;" />
  <row Id="10118" PostHistoryTypeId="2" PostId="5108" RevisionGUID="4823e6d0-a26a-458b-ac68-91074fbeb87f" CreationDate="2010-11-02T08:38:46.093" UserId="1251" Text="I've noticed that the trend of movies is diving into the world of movies with 3-dimensional camera.For me it provoked a thought as if it was the same feeling people got when they saw a colour movie for the first time, like in the transition from black and white to colour it is a whole new experience. For the first time we are experiencing the Z(depth) factor and I really mean when I said &quot;experiencing&quot;. &#xD;&#xA;&#xD;&#xA;So my question is or maybe if not a question, but Is there a possibility of a genre of 3d camera games upcoming?" />
  <row Id="10119" PostHistoryTypeId="1" PostId="5108" RevisionGUID="4823e6d0-a26a-458b-ac68-91074fbeb87f" CreationDate="2010-11-02T08:38:46.093" UserId="1251" Text="Will we see a trend of &quot;3d&quot; games coming up in the near future?" />
  <row Id="10120" PostHistoryTypeId="3" PostId="5108" RevisionGUID="4823e6d0-a26a-458b-ac68-91074fbeb87f" CreationDate="2010-11-02T08:38:46.093" UserId="1251" Text="&lt;3d&gt;&lt;camera&gt;&lt;game-industry&gt;" />
  <row Id="10121" PostHistoryTypeId="2" PostId="5109" RevisionGUID="c834b15d-f1ac-4d2d-ad64-666b47a465b0" CreationDate="2010-11-02T08:42:46.293" UserId="2710" Text="Short answer: yes.&#xD;&#xA;&#xD;&#xA;Long answer: Actually, all games I've seen worked in this way. Hash-table lookup is fast enough; and if you don't care about actual ID values (i.e. they're not used anywhere else) you can use a vector instead of a hash-table. Which is even faster.&#xD;&#xA;&#xD;&#xA;As an added bonus, this setup makes it possible to *re-use* your game objects, reducing your memory allocation rate. When a game object is destroyed, instead of &quot;freeing&quot; it, you just clean up its fields, and put in some &quot;object pool&quot;. Then, when you need a new object, just take an existing one from the pool. If new objects spawn constantly, this can noticeably improve performance." />
  <row Id="10122" PostHistoryTypeId="2" PostId="5110" RevisionGUID="60a9de3f-7644-4a9f-bc46-84e066787d48" CreationDate="2010-11-02T09:01:44.930" UserId="678" Text="I certainly hope so. The current crop of glasses-bound 3D displays is too awkward for filmed entertainment, especially if you wish to watch it in company. I will not re-iterate the arguments here, but suffice to say I saw an ad yesterday that said &quot;now with free second pair of 3D glasses&quot;.&#xD;&#xA;&#xD;&#xA;However, this is not necessarily a problem for games. Gaming is an immersive activity, meaning that when you game that's the main focus of your attention, more-so than watching a film. Having to wear special glasses is less of a burden. Since the scene is especially rendered for your situation, a bit of basic head-tracking could solve the single biggest problem with current-gen 3D, the horrible parallax you see when you move your head even a little bit.&#xD;&#xA;&#xD;&#xA;To summarize, I surely hope we get some good 3D games in the near future, because the current crop of 3D displays are worthless for all other endeavours." />
  <row Id="10123" PostHistoryTypeId="2" PostId="5111" RevisionGUID="f372499e-55cb-46c7-aba0-8d2f4c00c83c" CreationDate="2010-11-02T09:19:27.290" UserId="1632" Text="In the example I found, it usually uses one images for a particle system. Is it possible to use multiple images in a system? Thanks." />
  <row Id="10124" PostHistoryTypeId="1" PostId="5111" RevisionGUID="f372499e-55cb-46c7-aba0-8d2f4c00c83c" CreationDate="2010-11-02T09:19:27.290" UserId="1632" Text="Ogre3D how to use many images in a particle system" />
  <row Id="10125" PostHistoryTypeId="3" PostId="5111" RevisionGUID="f372499e-55cb-46c7-aba0-8d2f4c00c83c" CreationDate="2010-11-02T09:19:27.290" UserId="1632" Text="&lt;ogre&gt;" />
  <row Id="10126" PostHistoryTypeId="2" PostId="5112" RevisionGUID="c440ab99-b494-4a5e-9e75-fd6fa1484b30" CreationDate="2010-11-02T10:40:13.057" UserId="1101" Text="[Google Docs][1] is one way you can share and edit design documents.&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.google.com/" />
  <row Id="10127" PostHistoryTypeId="2" PostId="5113" RevisionGUID="52977292-f48d-462b-96a3-610476d55516" CreationDate="2010-11-02T10:51:36.333" UserId="1101" Text="&gt; Is this a sound approach? It seems that it would eliminate many of the risks/hassles of storing multiple lists, with the tradeoff being the cost of the lookup every time you want to access an object.&#xD;&#xA;&#xD;&#xA;All you've done is move the burden of performing the check from the time of destruction to the time of use. I wouldn't claim I've never done this before, but I don't consider it 'sound'.&#xD;&#xA;&#xD;&#xA;I suggest using one of several more robust alternatives. If the number of lists is known, you can get away with simply removing the object from all lists. That is harmless if the object is not in a given list, and you're guaranteed to have removed it correctly.&#xD;&#xA;&#xD;&#xA;If the number of lists is unknown or impractical then store back-references to them on the object. The typical implementation of this is the [observer pattern][1], but you can probably achieve a similar effect with delegates, which call back to remove the item from any containing lists when necessary.&#xD;&#xA;&#xD;&#xA;Or sometimes you don't really need multiple lists at all. Often you can keep an object in just one list and use dynamic queries to generate other transient collections when you need them. eg. Instead of having a separate list for a character's inventory, you can just pull out all objects where &quot;carried-by&quot; equals the current character. This might sound fairly inefficient, but it's good enough for relational databases and can be optimised by clever indexing.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Observer_pattern" />
  <row Id="10128" PostHistoryTypeId="2" PostId="5114" RevisionGUID="8af4dfa3-4ef7-4113-9348-8ea70ba026a1" CreationDate="2010-11-02T10:52:09.377" UserId="1868" Text="How action game controls should be implemented so that they would work on smart phones as well?&#xD;&#xA;&#xD;&#xA;At the moment I use wasd/arrow keys and I am able to handle for example two keys down at the same time.&#xD;&#xA;&#xD;&#xA;But many phones has no physical keyboard so should I render some control areas? Are there any JS libraries for this?" />
  <row Id="10129" PostHistoryTypeId="1" PostId="5114" RevisionGUID="8af4dfa3-4ef7-4113-9348-8ea70ba026a1" CreationDate="2010-11-02T10:52:09.377" UserId="1868" Text="multi touch on HTML5 with JavaScript?" />
  <row Id="10130" PostHistoryTypeId="3" PostId="5114" RevisionGUID="8af4dfa3-4ef7-4113-9348-8ea70ba026a1" CreationDate="2010-11-02T10:52:09.377" UserId="1868" Text="&lt;iphone&gt;&lt;input&gt;&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="10131" PostHistoryTypeId="2" PostId="5115" RevisionGUID="c24f2067-67d0-40d8-851c-46e5452f151e" CreationDate="2010-11-02T11:00:51.157" UserId="1101" Text="Sponsorship and licensing. Example: [Flash Game License][1].&#xD;&#xA;&#xD;&#xA;&gt; &quot;Developers can showcase their games&#xD;&#xA;&gt; and even get valuable feedback about&#xD;&#xA;&gt; them, while sponsors can browse an&#xD;&#xA;&gt; extensive game library, choosing&#xD;&#xA;&gt; exactly the games that fit their&#xD;&#xA;&gt; needs.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flashgamelicense.com/" />
  <row Id="10132" PostHistoryTypeId="2" PostId="5116" RevisionGUID="d09820df-8b0e-4160-b16f-6472ad6c1edd" CreationDate="2010-11-02T11:24:31.583" UserId="20" Text="The [Akihabara][1] framework provides special input areas for games when they run on multitouch-devices.&#xD;&#xA;&#xD;&#xA;[1]: http://www.kesiev.com/akihabara/" />
  <row Id="10133" PostHistoryTypeId="2" PostId="5117" RevisionGUID="bcafaee6-48b1-4192-b5f8-d57435eedb7d" CreationDate="2010-11-02T11:26:15.050" UserId="2862" Text="I know that XNA for Xbox 360 has limited access to networking, rumored to only allow communication via a propitiatory Microsoft protocol to other Xbox 360 units.&#xD;&#xA;&#xD;&#xA;What are the networking possibilities XNA offers? How many Xbox 360 units can be connected to the same subnet? 16 maximum? Can any Xbox send data to any other Xbox on the subnet like Peer-to-peer communication? Can an Xbox communicate with XNA on Windows PC's as well? Are there any other devices you can communicate with?&#xD;&#xA;&#xD;&#xA;And what about game servers? Can you setup your own multiplayer game server and have Xbox's connect to it and communicate freely? What platform would you write the game server code in? C++ on Unix? How many Xbox units can connect to a server at a time? If you cannot setup your own game server are there unofficial 'hacks' that enable indie developers to develop and run a game server?&#xD;&#xA;&#xD;&#xA;Since I'm no Xbox developer (ie. I don't own a $10000 devkit) I cannot use C++ libraries like [Zoidcom][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zoidcom.com/" />
  <row Id="10134" PostHistoryTypeId="1" PostId="5117" RevisionGUID="bcafaee6-48b1-4192-b5f8-d57435eedb7d" CreationDate="2010-11-02T11:26:15.050" UserId="2862" Text="What are the networking possibilities with XNA and Xbox 360?" />
  <row Id="10135" PostHistoryTypeId="3" PostId="5117" RevisionGUID="bcafaee6-48b1-4192-b5f8-d57435eedb7d" CreationDate="2010-11-02T11:26:15.050" UserId="2862" Text="&lt;xna&gt;&lt;network&gt;&lt;xbox360&gt;" />
  <row Id="10136" PostHistoryTypeId="2" PostId="5118" RevisionGUID="3bcfe0ef-4b2f-4356-9e9d-767a1ad65383" CreationDate="2010-11-02T11:52:42.373" UserId="288" Text="This seems to just be a more specific instance of the &quot;how to remove objects from a list, while iterating through it&quot; problem, which is easy to solve (iterating in reverse order is probably the simplest way for a array-style list like C#'s `List`).&#xD;&#xA;&#xD;&#xA;If an entity is going to be referenced from multiple places, then **it should be a reference type** anyway. So you don't have to go through a convoluted ID system - a class in C# already provides the necessary indirection.&#xD;&#xA;&#xD;&#xA;And finally - why bother &quot;checking the database&quot;? Just give each entity an `IsDead` flag and check that." />
  <row Id="10137" PostHistoryTypeId="5" PostId="4958" RevisionGUID="5c17a2dc-6b46-45c6-90bb-bea5cc325def" CreationDate="2010-11-02T13:15:57.297" UserId="2862" Comment="deleted 111 characters in body; edited tags; deleted 174 characters in body" Text="I want to get started with XNA game development, and I have bought the Pro edition of Visual Studio 2010 so I have the required software to run XNA Game Studio.&#xD;&#xA;&#xD;&#xA;How do I get it? Is it released yet?  &#xD;&#xA;Is it a free download on some Microsoft site?  &#xD;&#xA;Do I have to pay anything? Where?&#xD;&#xA;&#xD;&#xA;**Edit:** &#xD;&#xA;Is [this][1] it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-us/resources/downloads" />
  <row Id="10138" PostHistoryTypeId="6" PostId="4958" RevisionGUID="5c17a2dc-6b46-45c6-90bb-bea5cc325def" CreationDate="2010-11-02T13:15:57.297" UserId="2862" Comment="deleted 111 characters in body; edited tags; deleted 174 characters in body" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;windows&gt;" />
  <row Id="10139" PostHistoryTypeId="2" PostId="5119" RevisionGUID="9671bbf6-d430-42a6-a543-1f22ec559eeb" CreationDate="2010-11-02T13:16:44.623" UserId="2862" Text="I found the whole XNA Game Studio 4.0 as a part of the [Windows 7 Phone Devkit][2]&#xD;&#xA;&#xD;&#xA;(and here's the [ISO download][3] if you need to install it on multiple PCs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&amp;displaylang=en&#xD;&#xA;  [3]: http://go.microsoft.com/fwlink/?LinkId=201927" />
  <row Id="10140" PostHistoryTypeId="2" PostId="5120" RevisionGUID="77ec2db4-0982-4b7b-ae8c-0c091084d5eb" CreationDate="2010-11-02T13:43:22.483" UserId="2491" Text="Another way to handle your cleanup is to invert control and use a Disposable object.  You probably have a factor allocating your entities, so pass the factory all lists that it should be added to.  The entity keeps a reference to all lists that it is a part of, and implements IDisposable.  In the dispose method, it removes itself from all the lists.  Now you only have to be concerned with list management in two places: factory (creation) and dispose.  Deleting in the object is as simple as entity.Dispose().&#xD;&#xA;&#xD;&#xA;The issue of names vs references in C# is really only important for managing components or value types.  If you have lists of components that are linked to one entity, using an ID field as a hashmap key can be useful.  If you just have lists of entities though, just use lists with a reference. C# references are safe and simple to work with.&#xD;&#xA;&#xD;&#xA;To remove or add items from the list, you can use a Queue or any number of other solutions to dealing with adding and deleting from lists. " />
  <row Id="10141" PostHistoryTypeId="5" PostId="5071" RevisionGUID="e97c5fa7-6b41-4f73-a2d5-372f50266bc3" CreationDate="2010-11-02T13:45:33.983" UserId="2316" Comment="added 104 characters in body" Text="I'm looking to have people share game content, save files, or characters on a mobile game platform.  That means they need to be able to upload and download from their phone, other iOS device, or computer.&#xD;&#xA;&#xD;&#xA;What's the best way to do this?&#xD;&#xA;&#xD;&#xA;Does Apple have a history of allowing games to download 'content' (incl. graphics) that hasn't been approved?&#xD;&#xA;&#xD;&#xA;Are there any apps that do this, that I can try out?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;[EDIT]&#xD;&#xA;&#xD;&#xA;The files I want to share will be simple *.plist files, probably in binary format." />
  <row Id="10142" PostHistoryTypeId="2" PostId="5121" RevisionGUID="50c70e00-36dc-432d-92b3-c6886d49a172" CreationDate="2010-11-02T14:04:32.040" UserId="2316" Text="From a game design perspective, I've got the following idea:&#xD;&#xA;&#xD;&#xA;Traditional Tower Defense game. - an open, mazeable field as monsters approach the castle.&#xD;&#xA;&#xD;&#xA;&quot;Towers&quot; consist of ground-pounding units like foot soldiers, moats, and other things. *yawn*&#xD;&#xA;&#xD;&#xA;However, I'm adding the following features:&#xD;&#xA;&#xD;&#xA; - &quot;Town&quot; - a separate screen for&#xD;&#xA;   upgrading units and buying new&#xD;&#xA;   abilities.&#xD;&#xA;   &#xD;&#xA; - &quot;Tap Defense&quot; - There are archers&#xD;&#xA;   sitting on the wall with excellent&#xD;&#xA;   range - tap monsters to shoot them. &#xD;&#xA;   RoF, Damage upgradeable in town.&#xD;&#xA;   &#xD;&#xA; - &quot;Tap Defense+&quot; - for cash purchases,&#xD;&#xA;   you can buy wizard spells that deal&#xD;&#xA;   mega-damage (think Eagle in Angry&#xD;&#xA;   Birds).&#xD;&#xA;   &#xD;&#xA; - &quot;Underground&quot; - the paid version will&#xD;&#xA;   come with Dwarven Sappers, which give&#xD;&#xA;   you an additional screen of &quot;mazing&quot;&#xD;&#xA;   and towers &quot;underneath&quot; the current&#xD;&#xA;   map, so you can build defenses in at&#xD;&#xA;   least 2 levels.&#xD;&#xA;&#xD;&#xA;Is mazing, tapping, and 2 z-levels too much?&#xD;&#xA;&#xD;&#xA;What kinds of things should be considered?  I already know that pausing while placing structures will probably be needed (or wanted).  Anything else?" />
  <row Id="10143" PostHistoryTypeId="1" PostId="5121" RevisionGUID="50c70e00-36dc-432d-92b3-c6886d49a172" CreationDate="2010-11-02T14:04:32.040" UserId="2316" Text="How much is too much?" />
  <row Id="10144" PostHistoryTypeId="3" PostId="5121" RevisionGUID="50c70e00-36dc-432d-92b3-c6886d49a172" CreationDate="2010-11-02T14:04:32.040" UserId="2316" Text="&lt;game-design&gt;&lt;fun&gt;" />
  <row Id="10145" PostHistoryTypeId="2" PostId="5122" RevisionGUID="bc5a1dc2-0c68-4c7c-9e30-eef27c6bd782" CreationDate="2010-11-02T14:18:39.313" UserId="2301" Text="Start with a traditional tower game, and once that is complete add on to it.  &#xD;&#xA;&#xD;&#xA;Unless you are asking is it too much for the user, in that case, I don't believe that would be that much for the average user to handle (just make sure to explain everything in a help button)" />
  <row Id="10146" PostHistoryTypeId="2" PostId="5123" RevisionGUID="3e29add0-47ea-4b8a-bbff-6c6ddeaaa25a" CreationDate="2010-11-02T14:19:18.363" UserId="1198" Text="Provided that your interface is intuitive and you don't price yourself too high, I don't think its too much at all. On the contrary, I feel that the tower defense genre of games is mature enough even with casual gamers, that they will not be intimidated by these new features." />
  <row Id="10147" PostHistoryTypeId="2" PostId="5124" RevisionGUID="86b0cc32-a8a0-4ac0-a9e3-6b157a6d983c" CreationDate="2010-11-02T14:21:51.653" UserId="1198" Text="XNA Games on 360 use and are required to use `Live` -- which as I recall means max users per &quot;game&quot; is 32, and you can not connect to any outside services at all.&#xD;&#xA;&#xD;&#xA;--------------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;Form post confirming the 32 player max -- http://forums.create.msdn.com/forums/t/27446.aspx" />
  <row Id="10148" PostHistoryTypeId="2" PostId="5125" RevisionGUID="0813bc91-fd16-45a4-b056-0359bdccd784" CreationDate="2010-11-02T14:27:18.050" UserId="2316" Text="I'm working on a board game called [Farlanthia: Lords of War][1]. And I need some help with resolving diplomacy during play.&#xD;&#xA;&#xD;&#xA;My original idea was to have Diplomacy be a form of &quot;attack&quot; like in RISK. This would force another player to perform an action (like a trade, or peace treaty, etc.) The idea is that each &quot;season&quot; you would send a diplomat to court, and politics would play out. Sometimes things go your way, sometimes they don't. This would allow me to use modifier cards (say, you have as prisoner a general from the other player, this would give you +2 in diplomacy with them).&#xD;&#xA;&#xD;&#xA;However, as was pointed out on [BoardGameGeek][2] this isn't optimal for everyone. So I'm considering adding in a voluntary portion where if both parties agree to the treaty at hand, it goes into place without die rolling.&#xD;&#xA;&#xD;&#xA;Thoughts? I'm just not sure how to arbitrate the rules of diplomacy during an otherwise concrete game if the diplomatic actions aren't just as concrete.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;[(Cross-posted to Board and Card Games)][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.strongfortress.com/board-games/farlanthia-lords-of-war/&#xD;&#xA;  [2]: http://www.boardgamegeek.com/thread/564277/new-board-game-combining-risk-and-carcasonne&#xD;&#xA;  [3]: http://boardgames.stackexchange.com/questions/1112/resolving-diplomatic-actions-in-a-risk-style-board-game" />
  <row Id="10149" PostHistoryTypeId="1" PostId="5125" RevisionGUID="0813bc91-fd16-45a4-b056-0359bdccd784" CreationDate="2010-11-02T14:27:18.050" UserId="2316" Text="Resolving Diplomatic actions in a RISK-style board game" />
  <row Id="10150" PostHistoryTypeId="3" PostId="5125" RevisionGUID="0813bc91-fd16-45a4-b056-0359bdccd784" CreationDate="2010-11-02T14:27:18.050" UserId="2316" Text="&lt;game-design&gt;" />
  <row Id="10151" PostHistoryTypeId="2" PostId="5126" RevisionGUID="2c0b77cc-5980-4fa3-8bfc-20ff4129300c" CreationDate="2010-11-02T14:27:34.537" UserId="2091" Text="Start with the most fun of the alternatives and make a game centered on that.  Discard the rest.  When you're done, come up with new features based on the one you implemented.&#xD;&#xA;&#xD;&#xA;If you find that the basic tower defense is boring because it's been done hundreds of times (and I agree), just skip it.&#xD;&#xA;&#xD;&#xA;Personally I like your description of &quot;Tap Defense&quot;, but that is just a matter of personal taste.  The idea would be to implement that directly, avoiding the &quot;Tower&quot; and &quot;Town&quot; mechanics.  Later, you can add &quot;Tap+&quot; or other ideas." />
  <row Id="10152" PostHistoryTypeId="5" PostId="5124" RevisionGUID="dc07a584-6b61-4659-aac6-6b2d3c17a22b" CreationDate="2010-11-02T15:26:50.040" UserId="1198" Comment="added 357 characters in body; added 100 characters in body" Text="XNA Games on 360 use and are required to use `Live` -- which as I recall means max users per &quot;game&quot; is 32, and you can not connect to any outside services at all.&#xD;&#xA;&#xD;&#xA;--------------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;**Update 1:** Form post confirming the 32 player max -- http://forums.create.msdn.com/forums/t/27446.aspx&#xD;&#xA;&#xD;&#xA;--------------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;**Update 2:** It should be noted that `XNA on Windows != (XNA on Xbox | XNA on Windows Phone)` that is to say that on Windows, XNA can do anything any other .NET application can do; on Xbox and WP7 XNA is restricted to using the Xbox Live Gaming Services.&#xD;&#xA;&#xD;&#xA;MSDN Documentation on Xbox Live and XNA -- http://msdn.microsoft.com/en-us/library/bb975642.aspx" />
  <row Id="10153" PostHistoryTypeId="2" PostId="5127" RevisionGUID="362184f2-bc87-466e-be56-a67aee1f64d6" CreationDate="2010-11-02T16:01:46.077" UserId="2991" Text="new to the site, so don't know how to &quot;comment&quot; as I've seen done on other questions.&#xD;&#xA;Do you have to worry about populace? i.e. How much micro-management does the player engage in during gameplay? In large part, the complexity of the game can influence the amount of control you (as game designer) have over individual aspects of gameplay and consequently, the more strange player-generated outcomes are possible.&#xD;&#xA;&#xD;&#xA;My thoughts so far based on what I'm hearing:&#xD;&#xA;&#xD;&#xA;- The card idea is good.&#xD;&#xA;- Diplomacy is by nature based on human interaction, so the only random element (in the form of dice, RISK-attack style) would be the populace's reaction to whatever policy was being decided on. As a result, it is not necessary to &quot;force&quot; the other player to react. Instead, you could have a heavy incentive (for instance, the negative effects on public opinion are doubled if the player does nothing). In some situations, this negative penalty could be waived, leading to diplomatic situations which are ignored because the penalty for not acting would be less than the potential trouble involved in acting.&#xD;&#xA;- If you are going for realism in all its complexity, you'll have to post some more info on how gameplay works.&#xD;&#xA;&#xD;&#xA;A rule of thumb is: If you are intentionally simplifying things (e.g. soldiers &quot;cancel out&quot;, populace mindlessly works) simply take into account how much you are simplifying and try to modify the game mechanics to reflect that simplification. (A good example would be Sid Meier's _Civilization_ games. Very simplified representation, but very interdependent as far as game balance, resulting in highly complex gameplay.)" />
  <row Id="10154" PostHistoryTypeId="2" PostId="5128" RevisionGUID="3743720f-f03e-41d3-aab3-6de667ab8541" CreationDate="2010-11-02T16:31:10.473" UserId="2862" Text="There are two types of online multiplayer games available when you create a networked game with XNA Game Studio:&#xD;&#xA;&#xD;&#xA;1. System link game sessions (LAN)&#xD;&#xA;&#xD;&#xA;2. LIVE sessions. (Internet)&#xD;&#xA;&#xD;&#xA;Session types available:&#xD;&#xA;&#xD;&#xA;1. *Xbox to Xbox/PC*  &#xD;&#xA;   Use System Link for Local Area Network gameplay&#xD;&#xA;&#xD;&#xA;2. *Xbox to Xbox*  &#xD;&#xA;Sign in to Xbox LIVE and Games for Windows - LIVE Servers&#xD;&#xA;&#xD;&#xA;3. *Xbox to PC*  &#xD;&#xA;Use LIVE to connect to other machines over the Internet while the game is in development&#xD;&#xA;&#xD;&#xA;For a system link game, you can use any one of the following hardware configurations to test a networked game:&#xD;&#xA;&#xD;&#xA;  * *One development computer and one Xbox 360*  &#xD;&#xA;   (running one instance of the game on the development computer and one on the Xbox 360). The creator needs one Xbox LIVE Silver and one Creators Club membership to run code on the Xbox 360.&#xD;&#xA;&#xD;&#xA;  * *One development computer and one client computer*  &#xD;&#xA;(running one instance of the game on each computer). Creators cannot run two networked XNA Framework games at the same time on the same computer. Creators need a second machine to run a second game instance for testing purposes. No Xbox LIVE memberships or Creators Club memberships are required for this scenario.&#xD;&#xA;&#xD;&#xA;  * *One development computer and two Xbox 360 consoles*  &#xD;&#xA;(running one instance of the game on each Xbox 360). Here a creator deploys and debugs the game on two Xbox 360s. The creator needs at least two Xbox LIVE Silver memberships and two Creators Club memberships (one pair for each Xbox 360) for this scenario.&#xD;&#xA;&#xD;&#xA;~ [Developing Xbox LIVE Multiplayer Games][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb975642.aspx" />
  <row Id="10155" PostHistoryTypeId="5" PostId="5128" RevisionGUID="b06de050-bf1c-47dd-9d50-fdcecbe734ee" CreationDate="2010-11-02T16:37:13.440" UserId="2862" Comment="deleted 64 characters in body; added 357 characters in body" Text="**Data transfer over LAN or Internet**&#xD;&#xA;&#xD;&#xA;There are two types of online multiplayer games available when you create a networked game with XNA Game Studio:&#xD;&#xA;&#xD;&#xA;1. System link game sessions (LAN)&#xD;&#xA;2. LIVE sessions. (Internet)&#xD;&#xA;&#xD;&#xA;Session types available:&#xD;&#xA;&#xD;&#xA;1. Use System Link for Local Area Network gameplay&#xD;&#xA;2. Sign in to Xbox LIVE and Games for Windows - LIVE Servers&#xD;&#xA;3. Use LIVE to connect to other machines over the Internet while the game is in development&#xD;&#xA;&#xD;&#xA;For a system link game, you can use any one of the following hardware configurations to test a networked game:&#xD;&#xA;&#xD;&#xA;  * *One development computer and one Xbox 360*  &#xD;&#xA;   (running one instance of the game on the development computer and one on the Xbox 360). The creator needs one Xbox LIVE Silver and one Creators Club membership to run code on the Xbox 360.&#xD;&#xA;&#xD;&#xA;  * *One development computer and one client computer*  &#xD;&#xA;(running one instance of the game on each computer). Creators cannot run two networked XNA Framework games at the same time on the same computer. Creators need a second machine to run a second game instance for testing purposes. No Xbox LIVE memberships or Creators Club memberships are required for this scenario.&#xD;&#xA;&#xD;&#xA;  * *One development computer and two Xbox 360 consoles*  &#xD;&#xA;(running one instance of the game on each Xbox 360). Here a creator deploys and debugs the game on two Xbox 360s. The creator needs at least two Xbox LIVE Silver memberships and two Creators Club memberships (one pair for each Xbox 360) for this scenario.&#xD;&#xA;&#xD;&#xA;~ [Developing Xbox LIVE Multiplayer Games][1], MSDN&#xD;&#xA;&#xD;&#xA;**Voice transfer over network**&#xD;&#xA;&#xD;&#xA;The `LocalNetworkGamer.EnableSendVoice()`  method allows a game to programmatically specify which players can talk. Titles can use this to implement team chat or proximity voice. &#xD;&#xA;&#xD;&#xA;~ [Voice Support][2], MSDN&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb975642.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb976068.aspx" />
  <row Id="10156" PostHistoryTypeId="2" PostId="5129" RevisionGUID="c5f58fdd-9e92-48a5-9dcf-9a3ebf35f195" CreationDate="2010-11-02T16:37:57.700" UserId="136" Text="The Civ 5 SDK has been released, which should include the source code for the core game library, including all of the AI code (including those files referenced in the XML comments).  You should be able to change the AI to any extent you like, even going so far as to rewrite it completely if you so desired.  Have fun! :)" />
  <row Id="10157" PostHistoryTypeId="5" PostId="5128" RevisionGUID="151c195a-254d-4128-aa85-6e9d50a12af2" CreationDate="2010-11-02T16:44:20.680" UserId="2862" Comment="Sending Network Data; added 79 characters in body; added 8 characters in body" Text="**Data transfer over LAN or Internet**&#xD;&#xA;&#xD;&#xA;There are two types of online multiplayer games available when you create a networked game with XNA Game Studio:&#xD;&#xA;&#xD;&#xA;1. System link game sessions (LAN)&#xD;&#xA;2. LIVE sessions. (Internet)&#xD;&#xA;&#xD;&#xA;Session types available:&#xD;&#xA;&#xD;&#xA;1. Use System Link for Local Area Network gameplay&#xD;&#xA;2. Sign in to Xbox LIVE and Games for Windows - LIVE Servers&#xD;&#xA;3. Use LIVE to connect to other machines over the Internet while the game is in development&#xD;&#xA;&#xD;&#xA;(quoting [Developing Xbox LIVE Multiplayer Games][1])&#xD;&#xA;&#xD;&#xA;Data transfer between connected Xbox and PC units is implemented using the LocalNetworkGamer class (supported on Xbox 360) and data is written using a PacketWriter as follows:&#xD;&#xA;&#xD;&#xA;    foreach (LocalNetworkGamer gamer in session.LocalGamers)&#xD;&#xA;    {&#xD;&#xA;        // Get the tank associated with this player.&#xD;&#xA;        Tank myTank = gamer.Tag as Tank;&#xD;&#xA;        // Write the data.&#xD;&#xA;        packetWriter.Write(myTank.Position);&#xD;&#xA;        packetWriter.Write(myTank.TankRotation);&#xD;&#xA;        packetWriter.Write(myTank.TurretRotation);&#xD;&#xA;        packetWriter.Write(myTank.IsFiring);&#xD;&#xA;        packetWriter.Write(myTank.Health);&#xD;&#xA;&#xD;&#xA;        // Send it to everyone.&#xD;&#xA;        gamer.SendData(packetWriter, SendDataOptions.None);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(quoting [Sending Network Data][2])&#xD;&#xA;&#xD;&#xA;**Network topologies**&#xD;&#xA;&#xD;&#xA;For a system link game, you can use any one of the following hardware configurations to test a networked game:&#xD;&#xA;&#xD;&#xA;  * *One development computer and one Xbox 360*  &#xD;&#xA;   (running one instance of the game on the development computer and one on the Xbox 360). The creator needs one Xbox LIVE Silver and one Creators Club membership to run code on the Xbox 360.&#xD;&#xA;&#xD;&#xA;  * *One development computer and one client computer*  &#xD;&#xA;(running one instance of the game on each computer). Creators cannot run two networked XNA Framework games at the same time on the same computer. Creators need a second machine to run a second game instance for testing purposes. No Xbox LIVE memberships or Creators Club memberships are required for this scenario.&#xD;&#xA;&#xD;&#xA;  * *One development computer and two Xbox 360 consoles*  &#xD;&#xA;(running one instance of the game on each Xbox 360). Here a creator deploys and debugs the game on two Xbox 360s. The creator needs at least two Xbox LIVE Silver memberships and two Creators Club memberships (one pair for each Xbox 360) for this scenario.&#xD;&#xA;&#xD;&#xA;(quoting [Developing Xbox LIVE Multiplayer Games][1])&#xD;&#xA;&#xD;&#xA;**Voice transfer over network**&#xD;&#xA;&#xD;&#xA;The `LocalNetworkGamer.EnableSendVoice()`  method allows a game to programmatically specify which players can talk. Titles can use this to implement team chat or proximity voice. &#xD;&#xA;&#xD;&#xA;(quoting [Voice Support][3])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb975642.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb975947.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb976068.aspx" />
  <row Id="10158" PostHistoryTypeId="5" PostId="5128" RevisionGUID="0d6bc273-e55b-4acf-b9cc-0361a7429063" CreationDate="2010-11-02T16:50:42.787" UserId="2862" Comment="added 65 characters in body; added 5 characters in body" Text="**Data transfer over LAN or Internet**&#xD;&#xA;&#xD;&#xA;There are two types of [online multiplayer games][1] available when you create a networked game with XNA Game Studio:&#xD;&#xA;&#xD;&#xA;1. System link game sessions (LAN)&#xD;&#xA;2. LIVE sessions. (Internet)&#xD;&#xA;&#xD;&#xA;[Session types][1] available:&#xD;&#xA;&#xD;&#xA;1. Use System Link for Local Area Network gameplay&#xD;&#xA;2. Sign in to Xbox LIVE and Games for Windows - LIVE Servers&#xD;&#xA;3. Use LIVE to connect to other machines over the Internet while the game is in development&#xD;&#xA;&#xD;&#xA;[Data transfer][2] between connected Xbox and PC units is implemented using the LocalNetworkGamer class (supported on Xbox 360) and data is written using a PacketWriter as follows:&#xD;&#xA;&#xD;&#xA;    foreach (LocalNetworkGamer gamer in session.LocalGamers)&#xD;&#xA;    {&#xD;&#xA;        // Get the tank associated with this player.&#xD;&#xA;        Tank myTank = gamer.Tag as Tank;&#xD;&#xA;        // Write the data.&#xD;&#xA;        packetWriter.Write(myTank.Position);&#xD;&#xA;        packetWriter.Write(myTank.TankRotation);&#xD;&#xA;        packetWriter.Write(myTank.TurretRotation);&#xD;&#xA;        packetWriter.Write(myTank.IsFiring);&#xD;&#xA;        packetWriter.Write(myTank.Health);&#xD;&#xA;&#xD;&#xA;        // Send it to everyone.&#xD;&#xA;        gamer.SendData(packetWriter, SendDataOptions.None);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Network topologies**&#xD;&#xA;&#xD;&#xA;For a system link game, you can use any one of the following [hardware configurations][1] to test a networked game:&#xD;&#xA;&#xD;&#xA;  * *One development computer and one Xbox 360*  &#xD;&#xA;   (running one instance of the game on the development computer and one on the Xbox 360). The creator needs one Xbox LIVE Silver and one Creators Club membership to run code on the Xbox 360.&#xD;&#xA;&#xD;&#xA;  * *One development computer and one client computer*  &#xD;&#xA;(running one instance of the game on each computer). Creators cannot run two networked XNA Framework games at the same time on the same computer. Creators need a second machine to run a second game instance for testing purposes. No Xbox LIVE memberships or Creators Club memberships are required for this scenario.&#xD;&#xA;&#xD;&#xA;  * *One development computer and two Xbox 360 consoles*  &#xD;&#xA;(running one instance of the game on each Xbox 360). Here a creator deploys and debugs the game on two Xbox 360s. The creator needs at least two Xbox LIVE Silver memberships and two Creators Club memberships (one pair for each Xbox 360) for this scenario.&#xD;&#xA;&#xD;&#xA;**Voice transfer over network**&#xD;&#xA;&#xD;&#xA;[Voice data][3] is automatically transmitted and replayed without any title effort whatsoever. Titles can use this to implement team chat or proximity voice.&#xD;&#xA;&#xD;&#xA;The XNA Framework does not expose direct program access to the voice data stream. &#xD;&#xA;&#xD;&#xA;  * Do they have voice access? - NetworkGamer.HasVoice&#xD;&#xA;  * Are they currently talking? - NetworkGamer.IsTalking&#xD;&#xA;  * Are they muted? - NetworkGamer.IsMutedByLocalUser&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb975642.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb975947.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb976068.aspx" />
  <row Id="10159" PostHistoryTypeId="2" PostId="5130" RevisionGUID="ddffc53e-296d-40cb-93dd-54c38cb290e8" CreationDate="2010-11-02T17:12:09.857" UserId="2994" Text="Take a look at this example, it's an example of loading spore collada files: &#xD;&#xA;&#xD;&#xA;http://people.mozilla.com/~vladimir/webgl/spore/sporeview.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10160" PostHistoryTypeId="2" PostId="5131" RevisionGUID="6945992e-4a2c-46d5-8575-92192d5b960c" CreationDate="2010-11-02T17:18:36.040" UserId="51" Text="Short term, yes but for two different reasons.&#xD;&#xA;&#xD;&#xA;1) The Nintendo 3DS is coming out soon with its set of 3D games.  That platform has glasses-free hardware built in, and I'm sure the majority of those games are going to take advantage of it in some fashion (it may even be a cert requirement for the platform, I don't know).&#xD;&#xA;&#xD;&#xA;2) At least in the living room space, the console makers (Sony specifically) are asking their teams to include 3D features in their games so they have something they can use to push 3D TVs.  The hardware isn't there yet to make the investment worth it from an independent developer point of view, but people like Sony can use it as an excuse to improve their sales across the entirety of their product lineup." />
  <row Id="10161" PostHistoryTypeId="2" PostId="5132" RevisionGUID="f60beca4-e325-4d87-9420-f5982db617a5" CreationDate="2010-11-02T18:56:14.557" UserId="2992" Text="Interesting game.&#xD;&#xA;The one thing I would change is the way leadership works. Instead of lowest to highest why not make it the other way around (highest to lowest). The you can use the sum as a sort of currency to do actions. ie. action points. This allows more flexibility than just spending die.&#xD;&#xA;&#xD;&#xA;For instance, you roll the 3D6 and get the sum. That represents how many action points (AP) you have that turn. Certain actions then cost AP to perform. For instance, scouting a tile might cost 4AP. The player then removes that from his sum represented by the dice in front of him.&#xD;&#xA;&#xD;&#xA;This allows for more actions per turn. Cards to modify this sum (negatively or positively) to provide some added strategy and to supplement the diplomacy.&#xD;&#xA;&#xD;&#xA;Personally, I would not want to resolve diplomacy directly with the roll of a die. Free-form diplomacy always works the best (and is the most fun). You could allow people a number of diplomacy options then set the number of AP it costs to propose the action and offer player a chance to &quot;sweeten&quot; the deal. The player being propositioned can then propose a counter-offer which is then accepted or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example, if I roll a 2, 4, 6 on my turn I would have 12 AP to spend. Imagine I really want a 2 season truce with my neighbour (Tommy). So I consult the chart and see that it costs 4 AP to make the proposal. So I remove this from my dice total immediately (2,6 = 8) that is my risk since I dont know if Tommy will agree. I look through the chart to see what I can offer, ie. troops, AP, die, territory, etc.&#xD;&#xA;So I make an offer for 6 AP this turn for 2 season truce. He makes a counter offer, which cannot change the term (2 season truce) but can change the incentives. So Tommy offers the 2 turn truce for 6 AP now and 1 die next turn. If I refuse the initial AP is lost. If I accept the agreement goes into effect immediately.&#xD;&#xA;&#xD;&#xA;Diplomacy would have to occur earlier in the action list (likely first).&#xD;&#xA;&#xD;&#xA;Hope I explained that properly :S  Once you get the game finished let me know I can help produce it for you :)&#xD;&#xA;&#xD;&#xA;Aaron&#xD;&#xA;Field Marshal Games" />
  <row Id="10162" PostHistoryTypeId="2" PostId="5133" RevisionGUID="d72f4d20-3680-4990-a5b9-0afa5b69584f" CreationDate="2010-11-02T19:55:45.550" UserId="2494" Text="This question is simple, but for me is hard to do!&#xD;&#xA;How to implement side (horizontal and vertical) scrolling for (i.e.) a 2d car game ?&#xD;&#xA;Both car and background must move. &#xD;&#xA;How to ?&#xD;&#xA;Thank you!" />
  <row Id="10163" PostHistoryTypeId="1" PostId="5133" RevisionGUID="d72f4d20-3680-4990-a5b9-0afa5b69584f" CreationDate="2010-11-02T19:55:45.550" UserId="2494" Text="Side scrolling: how to do ?" />
  <row Id="10164" PostHistoryTypeId="3" PostId="5133" RevisionGUID="d72f4d20-3680-4990-a5b9-0afa5b69584f" CreationDate="2010-11-02T19:55:45.550" UserId="2494" Text="&lt;game-design&gt;" />
  <row Id="10165" PostHistoryTypeId="2" PostId="5134" RevisionGUID="c6a5d851-4daa-4693-8ae4-69c15c42b38f" CreationDate="2010-11-02T20:57:45.060" UserId="424" Text="One way to go is to render on screen controls for mobile/touch devices. However, I feel like this isn't the best approach. In order to have the best possible experience for your game it should respond to touch events within the game itself. (Touch a unit to select it, touch &amp; drag an item from slot to slot, etc)&#xD;&#xA;&#xD;&#xA;Take Plants vs Zombies on iPad for example. One of the reasons why it's such a great game on that platform is that the gameplay itself meshes well with touch controls.&#xD;&#xA;&#xD;&#xA;On screen controls are definitely the &quot;easy way out&quot; when trying to port your game to mobile touch environments but they feel clunky and probably won't give your users the best experience with your game.&#xD;&#xA;&#xD;&#xA;Some games just aren't meant for touch interfaces and if a developer wants to support mobile/touch they're better off designing their game to accept that style of input from the start." />
  <row Id="10166" PostHistoryTypeId="5" PostId="5092" RevisionGUID="cfe28c1a-440d-45dc-a19f-7b7b32a80362" CreationDate="2010-11-02T21:02:55.467" UserId="422" Comment="Added warning about Dropbox collaboration." Text="**Version Control:**&#xD;&#xA;&#xD;&#xA;Try [GitHub](https://github.com/) for version control. It's fantastic -- you can use [git](http://git-scm.com/) or [svn](http://subversion.tigris.org/) (whichever you're more comfortable with) and your repositories get free [issue tracking](http://github.com/blog/411-github-issue-tracker), [wikis](http://github.com/blog/699-making-github-more-open-git-backed-wikis) and cool [visual graphs](http://github.com/blog/39-say-hello-to-the-network-graph-visualizer). The only downside is that if you want your project hosted privately, [you have to pay](http://github.com/plans). (It's as low as $7/month as of this writing; [we](http://github.com/lostdecade) pay and find it well worth the cost.)&#xD;&#xA;&#xD;&#xA;**File Sharing:**&#xD;&#xA;&#xD;&#xA;We also love and use [Dropbox](http://www.dropbox.com/referrals/NTUxMTM0Mjk). It supports Windows, Mac and Linux and [features](https://www.dropbox.com/features) automatic file syncing across multiple machines. You can even hook it into [Growl](http://growl.info/) to see what your collaborators are doing realtime! Best of all, the [basic plan](https://www.dropbox.com/plans) is free and gives you a very generous 2GB of storage. _(Note: should be mentioned to be careful with Dropbox files, as your collaborators could inadvertently destroy your changes. Luckily Dropbox provides some versioning but extra precautions on your end are recommended!)_" />
  <row Id="10167" PostHistoryTypeId="2" PostId="5135" RevisionGUID="93be67b3-0d01-4ca7-bc04-fa9d584c1074" CreationDate="2010-11-02T21:27:58.673" UserId="2862" Text="Before I start development of an XNA game, I need to choose a 3D game engine to develop upon. Is this belief unfounded? Does XNA have basic object transformation, lighting and mesh/texture importing functionality by which you can develop a decent 3D side-scrolling game?&#xD;&#xA;&#xD;&#xA;Chances are I'm going to need a 3D engine such as [Torque X][1] to handle most of the special effects, animation and sound for me. What are the engines that you recommend building an XNA game with? What work reliably in your experience? Is XNA alone enough? do you have repositories of code that work directly with XNA to create effects and other game environments with sunlight, fog and rain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torquepowered.com/products/torque-x" />
  <row Id="10168" PostHistoryTypeId="1" PostId="5135" RevisionGUID="93be67b3-0d01-4ca7-bc04-fa9d584c1074" CreationDate="2010-11-02T21:27:58.673" UserId="2862" Text="3D game engines for XNA games" />
  <row Id="10169" PostHistoryTypeId="3" PostId="5135" RevisionGUID="93be67b3-0d01-4ca7-bc04-fa9d584c1074" CreationDate="2010-11-02T21:27:58.673" UserId="2862" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;windows&gt;&lt;3d-engines&gt;" />
  <row Id="10170" PostHistoryTypeId="2" PostId="5136" RevisionGUID="03184f5c-deb7-4f56-891f-e3e925666dc6" CreationDate="2010-11-02T22:27:45.983" UserId="2998" Text="I am fairly new to c/c++ but I do have experiance with directx and opengl with java and c#. My goal is to create a 2d game in c with under 2 pages of code. Most of what I have seen requires 3 pages of code to just get a window running.&#xD;&#xA;&#xD;&#xA;I would like to know the shortest code to get a window running where I can draw lines. I believe this can be done in less lines with opengl versus directx. Is there maybe an api or framework i can use to shorten it more?&#xD;&#xA;&#xD;&#xA;Also, it would be nice if the solution were cross platform compatible." />
  <row Id="10171" PostHistoryTypeId="1" PostId="5136" RevisionGUID="03184f5c-deb7-4f56-891f-e3e925666dc6" CreationDate="2010-11-02T22:27:45.983" UserId="2998" Text="What is the easiest and shortest way to draw a 2d line in c/c++?" />
  <row Id="10172" PostHistoryTypeId="3" PostId="5136" RevisionGUID="03184f5c-deb7-4f56-891f-e3e925666dc6" CreationDate="2010-11-02T22:27:45.983" UserId="2998" Text="&lt;c++&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="10173" PostHistoryTypeId="2" PostId="5137" RevisionGUID="28e016b9-d658-4188-ac51-533fbe7127ab" CreationDate="2010-11-02T22:34:15.757" UserId="1352" Text="[GLUT][1] might be what you're looking for. It is a cross platform Open GL wrapper that helps setting up the basics.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xmission.com/~nate/glut.html" />
  <row Id="10174" PostHistoryTypeId="2" PostId="5138" RevisionGUID="764a2012-2f8a-40f7-95e4-a5cdb7bc3a07" CreationDate="2010-11-02T23:00:59.920" UserId="2999" Text="I am currently working on an OpenGL procedural planet generator.  I hope to use it for a space RPG, that will not allow players to go down to the surface of a planet so I have ignored anything ROAM related.  At the momement I am drawing a cube with VBOs and mapping onto a sphere.&#xD;&#xA;&#xD;&#xA;I am familiar with most fractal heightmap generating techniques and have already implemented my own version of midpoint displacement(not that useful in this case I know).&#xD;&#xA;&#xD;&#xA;My question is, what is the best way to procedurally generate the heightmap.  I have looked at libnoise which allows me to make tilable heightmaps/textures, but as far as I can see I would need to generate a net like [this][1].&#xD;&#xA;&#xD;&#xA;Leaving the tiling obvious.&#xD;&#xA;&#xD;&#xA;Could anyone advise me on the best route to take?  &#xD;&#xA;&#xD;&#xA;Any input would be much appreciated.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;Henry.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Sv7NE.png" />
  <row Id="10175" PostHistoryTypeId="1" PostId="5138" RevisionGUID="764a2012-2f8a-40f7-95e4-a5cdb7bc3a07" CreationDate="2010-11-02T23:00:59.920" UserId="2999" Text="Procedural Planets, Heightmaps and Textures" />
  <row Id="10176" PostHistoryTypeId="3" PostId="5138" RevisionGUID="764a2012-2f8a-40f7-95e4-a5cdb7bc3a07" CreationDate="2010-11-02T23:00:59.920" UserId="2999" Text="&lt;opengl&gt;&lt;textures&gt;&lt;cubemap&gt;" />
  <row Id="10177" PostHistoryTypeId="2" PostId="5139" RevisionGUID="d5c0dccd-af46-467e-868d-08dfd8d71241" CreationDate="2010-11-02T23:05:48.473" UserId="136" Text="I often use this approach in my own C#/.NET game.  Aside from the other benefits described here, it can also help avoid serialization issues.&#xD;&#xA;&#xD;&#xA;If you want to leverage the .NET Framework's built-in binary serialization facilities, then using entity IDs can help minimize the size of the object graph that gets written out.  By default, .NET's binary formatter will serialize out an entire object graph at the field level.  Let's say I want to serialize a `Ship` instance.  If `Ship` has an `_owner` field referencing the `Player` who owns it, then that `Player` instance would get serialized out too.  If `Player` contains a `_ships` field (of, say, `ICollection&lt;Ship&gt;`), then *all* of the player's ships will also get written out, along with any other objects referenced at the field level (recursively).  It's easy to accidentally serialize a huge object graph when you only want serialize one small part of it.&#xD;&#xA;&#xD;&#xA;If, instead, I have an `_ownerId` field, then I can use that value to resolve the `Player` reference on demand.  My public API can even remain unchanged, with the `Owner` property simply performing the lookup.&#xD;&#xA;&#xD;&#xA;While hash-based lookups are generally very fast, the added overhead could become a problem for very large entity sets with frequent lookups.  If it becomes a problem for you, you can cache the reference using a field that does not get serialized.  For example, you could do something like this:&#xD;&#xA;&#xD;&#xA;    public class Ship&#xD;&#xA;    {&#xD;&#xA;        private int _ownerId;&#xD;&#xA;        [NonSerialized] private Lazy&lt;Player&gt; _owner;&#xD;&#xA;&#xD;&#xA;        public Player Owner&#xD;&#xA;        {&#xD;&#xA;            get { return _owner.Value; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public Ship(Player owner)&#xD;&#xA;        {&#xD;&#xA;            _ownerId = owner.PlayerID;&#xD;&#xA;            EnsureCache();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private void EnsureCache()&#xD;&#xA;        {&#xD;&#xA;            if (_owner == null)&#xD;&#xA;                _owner = new Lazy&lt;Player&gt;(() =&gt; Game.Current.Players[_ownerId]);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        [OnDeserialized]&#xD;&#xA;        private void OnDeserialized(StreamingContext context)&#xD;&#xA;        {&#xD;&#xA;            EnsureCache();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="10178" PostHistoryTypeId="5" PostId="5139" RevisionGUID="d639c0f9-7911-49ae-aae0-3261656204ef" CreationDate="2010-11-02T23:10:48.553" UserId="136" Comment="added 246 characters in body; added 15 characters in body" Text="I often use this approach in my own C#/.NET game.  Aside from the other benefits (and hazards!) described here, it can also help avoid serialization issues.&#xD;&#xA;&#xD;&#xA;If you want to leverage the .NET Framework's built-in binary serialization facilities, then using entity IDs can help minimize the size of the object graph that gets written out.  By default, .NET's binary formatter will serialize out an entire object graph at the field level.  Let's say I want to serialize a `Ship` instance.  If `Ship` has an `_owner` field referencing the `Player` who owns it, then that `Player` instance would get serialized out too.  If `Player` contains a `_ships` field (of, say, `ICollection&lt;Ship&gt;`), then *all* of the player's ships will also get written out, along with any other objects referenced at the field level (recursively).  It's easy to accidentally serialize a huge object graph when you only want serialize one small part of it.&#xD;&#xA;&#xD;&#xA;If, instead, I have an `_ownerId` field, then I can use that value to resolve the `Player` reference on demand.  My public API can even remain unchanged, with the `Owner` property simply performing the lookup.&#xD;&#xA;&#xD;&#xA;While hash-based lookups are generally very fast, the added overhead could become a problem for very large entity sets with frequent lookups.  If it becomes a problem for you, you can cache the reference using a field that does not get serialized.  For example, you could do something like this:&#xD;&#xA;&#xD;&#xA;    public class Ship&#xD;&#xA;    {&#xD;&#xA;        private int _ownerId;&#xD;&#xA;        [NonSerialized] private Lazy&lt;Player&gt; _owner;&#xD;&#xA;&#xD;&#xA;        public Player Owner&#xD;&#xA;        {&#xD;&#xA;            get { return _owner.Value; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public Ship(Player owner)&#xD;&#xA;        {&#xD;&#xA;            _ownerId = owner.PlayerID;&#xD;&#xA;            EnsureCache();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private void EnsureCache()&#xD;&#xA;        {&#xD;&#xA;            if (_owner == null)&#xD;&#xA;                _owner = new Lazy&lt;Player&gt;(() =&gt; Game.Current.Players[_ownerId]);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        [OnDeserialized]&#xD;&#xA;        private void OnDeserialized(StreamingContext context)&#xD;&#xA;        {&#xD;&#xA;            EnsureCache();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course, this approach can also make serialization *harder* when you actually *want* to serialize out a large object graph.  In those cases, you would need devise some sort of 'container' to ensure that all the necessary objects are included." />
  <row Id="10179" PostHistoryTypeId="2" PostId="5140" RevisionGUID="ba75538d-a2ae-46c6-b7a4-85eacdc16a9e" CreationDate="2010-11-02T23:15:03.933" UserId="2494" Text="Also look at [SDL][1]. A good wrapper multiplatform to Directx (on Win)and OpenGl (on Linux and also Win ..). &#xD;&#xA;I'm using SDL and... it is easy to understand for a beginner!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For Sdl exists a binding to C# and Java. For C# is called. [SDL.NET][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://cs-sdl.sourceforge.net/index.php/Main_Page" />
  <row Id="10180" PostHistoryTypeId="2" PostId="5141" RevisionGUID="97e2d79e-5d75-44c5-8518-8db64293adb6" CreationDate="2010-11-03T04:00:59.027" UserId="3004" Text="First of all, I'm not sure why you want to implement a height map (i.e. geometry displacement) if people won't be able to land, it just seems more efficient to normal map it or something.&#xD;&#xA;&#xD;&#xA;With that said, what you want is to convert from an arbitrary `(x, y, z)` to a `(u, v)` coordinate, which is trivial. No cubemap needed.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;1. Every `(u, v)` texel has a height (heightmap `RGB = height`) and a position `(x, y, z) = pos`.&#xD;&#xA;2. Find and normalize the position, `NORMAL(x, y, z) = N`.&#xD;&#xA;3. New vertex = `pos+N*height`.&#xD;&#xA;&#xD;&#xA;This will work better with a higher tessellation. Also use the proper `libnoise` spherical mapping for your heightmap.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/HbzaB.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/9tP7K.png" />
  <row Id="10181" PostHistoryTypeId="2" PostId="5142" RevisionGUID="dbf9233f-35b2-4c8a-a9c2-db27498926d3" CreationDate="2010-11-03T04:55:28.403" UserId="3004" Text="Particle system can only use one material type. The particle system can, however, alter the tint and transparency (obviously) of specific particles as well as have an arbitrary number of emitters. To get more complex effects, however, you will need to combine different systems." />
  <row Id="10182" PostHistoryTypeId="5" PostId="5141" RevisionGUID="dcda72bb-e7f6-4e00-860a-12b87cb4c630" CreationDate="2010-11-03T05:02:04.933" UserId="3004" Comment="added 116 characters in body" Text="First of all, I'm not sure why you want to implement a height map (i.e. geometry displacement) if people won't be able to land, it just seems more efficient to normal map it or something.&#xD;&#xA;&#xD;&#xA;With that said, what you want is to convert from an arbitrary `(x, y, z)` to a `(u, v)` coordinate, which is trivial. No cubemap needed.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;1. Every `(u, v)` texel has a height (heightmap `RGB = height`) and a position `(x, y, z) = pos`.&#xD;&#xA;2. Find and normalize the position, `NORMAL(x, y, z) = N`.&#xD;&#xA;3. New vertex = `pos+N*height`.&#xD;&#xA;&#xD;&#xA;This will work better with a higher tessellation. Also use the proper `libnoise` spherical mapping for your heightmap, which will look something like this (but black and white):&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/HbzaB.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/9tP7K.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/7gFAx.jpg" />
  <row Id="10183" PostHistoryTypeId="2" PostId="5143" RevisionGUID="02183c92-afb7-48d2-b89a-72c4a94ac35b" CreationDate="2010-11-03T06:43:24.017" UserId="1251" Text="Actually, your post indicates a very high level of laziness, but considering my novice days, I guess I might answer this.&#xD;&#xA;&#xD;&#xA;In a top-down racing game (that is what you call a game that move on all fours, because the view is from the top of the car), basically the car is made to move over the tracks by &quot;faking&quot; track movement.&#xD;&#xA;For example: Consider the car is lying on the center of the screen. I push the move up key. We know the car has to move up the track. But what we do in actuality is we dont move the car ,but we move the track downwards. ie. for every movement of the car, the track is moved by the distance to be moved in reverse direction. So when you look at the game from the aerial point of view(top-down) you &quot;believe&quot; the car is moving.&#xD;&#xA;This is just the essence of a top-down side-scroller game.&#xD;&#xA;&#xD;&#xA;And once you have accomplished this, you might want to add a &quot;feel&quot; to the acceleration. This can be done by adding a &quot;braking factor&quot; to the car at every instant in the gameloop also ensuring that the speed doesn't go negative.&#xD;&#xA;&#xD;&#xA;Hoping you'd achieve what you want. Best wishes" />
  <row Id="10184" PostHistoryTypeId="2" PostId="5144" RevisionGUID="d07ed6d1-16dc-43ef-a70a-012286f9cfc0" CreationDate="2010-11-03T08:13:06.623" UserId="1400" Text="Hey guys! My physics engine is coming along quite nicely (thanks for asking!) and I'm ready to start working on some even more advanced junk. Case in point, I'm trying to set up my collision engine so that an arbitrary delegate can be notified when a collision occurs. Let me set up a scenario for you:&#xD;&#xA;&#xD;&#xA;Say we have object A, object B, and object C in the physics simulation. I want to be able to inform a delegate about a collision between A and B, AND inform a potentially DIFFERENT delegate about a collision between A and C.&#xD;&#xA;&#xD;&#xA;A little background information: I have a known interface for the delegate, I have the potential of storing state for my collision detector (but don't atm), and have the ability to store state in the objects themselves. Similarly, I use this delegate model to handle collision resolution, simply setting the physics engine as the delegate for all objects by default, allowing the user to change the delegate if desired.&#xD;&#xA;&#xD;&#xA;Now, I already tried having each object store it's own collision delegate that would be informed when a collision occurred. This didn't work because when the objects had the same collision delegate, the same collision was handled twice. When I switched to only using the delegate of the first object (however that was decided), the order of simulation became an issue. I want to use a dictionary, but that introduces a significant amount of overhead. However, that seems like the direction I need to be heading.&#xD;&#xA;&#xD;&#xA;So here's the question: fight to the death over a suitable solution. How would YOU solve this problem?" />
  <row Id="10185" PostHistoryTypeId="1" PostId="5144" RevisionGUID="d07ed6d1-16dc-43ef-a70a-012286f9cfc0" CreationDate="2010-11-03T08:13:06.623" UserId="1400" Text="Collision Detection Delegate Scheme" />
  <row Id="10186" PostHistoryTypeId="3" PostId="5144" RevisionGUID="d07ed6d1-16dc-43ef-a70a-012286f9cfc0" CreationDate="2010-11-03T08:13:06.623" UserId="1400" Text="&lt;engine&gt;&lt;collision-detection&gt;" />
  <row Id="10187" PostHistoryTypeId="2" PostId="5145" RevisionGUID="375469df-16de-4430-9692-4f87154124ac" CreationDate="2010-11-03T08:37:11.477" UserId="2710" Text="I'm not sure I completely understand your problem, but it seems easy. When your engine is handling a collision, you must have a list of colliding objects. And that list is probably only 2 objects 99% of the time. So, you can simply compare all of the objects' delegates right here. For example: (pseudocode)&#xD;&#xA;&#xD;&#xA;    // When ObjA and ObjB collide&#xD;&#xA;    ObjA.OnCollision(ObjA, ObjB);&#xD;&#xA;    if(ObjA.OnCollision!=ObjB.OnCollision)&#xD;&#xA;        ObjB.OnCollision(ObjA, ObjB);&#xD;&#xA;&#xD;&#xA;Order of the simulation shouldn't matter here, because either the delegates are the same anyway, or both will be called." />
  <row Id="10188" PostHistoryTypeId="2" PostId="5146" RevisionGUID="68d834d6-1668-4c18-b9d0-163ff0f731cf" CreationDate="2010-11-03T08:55:04.770" UserId="2710" Text="It's hard to decide in advance, how much is too much. You have to play and see. &#xD;&#xA;&#xD;&#xA;But a loose guideline, you can count possible interactions that a player is presented with - simultaneously. Simply put, how many different things can you do at any moment? You want to present just ONE thing to a complete newbie (e.g. when the game just started), 3-4 for casual play and if there's more than 7, the game is probably hard-core." />
  <row Id="10189" PostHistoryTypeId="2" PostId="5147" RevisionGUID="a169b499-294e-4232-8e7c-60431677eaa9" CreationDate="2010-11-03T09:00:33.683" UserId="678" Text="XNA offers everything you need to get your models on the screen. Its content pipeline is unmatched by anything I have seen so far. However, the interface to the rendering subsystems is fairly low-level, and you will most likely end up pushing a model's meshes to the hardware &quot;by hand&quot;. &#xD;&#xA;&#xD;&#xA;A good engine will help you batch submeshes with the same materials, handle transparent polygons and all that jazz. Adding a good scene manager will ensure that you do not send geometry that cannot be seen to the hardware. You can code all these things yourself, or you can get a rendering engine to do it for you.&#xD;&#xA;&#xD;&#xA;And we haven't even considered things other than rendering, such as sound and physics." />
  <row Id="10190" PostHistoryTypeId="2" PostId="5148" RevisionGUID="0b3ebf0e-e0ba-4816-a54c-ad80935ade11" CreationDate="2010-11-03T09:26:16.563" UserId="2239" Text="Considering how little work is generally required to add 3D support to a game and that most earlier solutions for PCs had simple driver shims that added this on-the-fly for many games without even rewriting them, yes certainly - now that 3D movies have (re)started mainstream interest in the concept... " />
  <row Id="10191" PostHistoryTypeId="2" PostId="5149" RevisionGUID="ea00cb79-cbef-4641-8861-9182041336bf" CreationDate="2010-11-03T09:28:36.717" UserId="1386" Text="For my answer I'll assume you are managing lists of objects.&#xD;&#xA;&#xD;&#xA;    list&lt;Object&gt; objects;&#xD;&#xA;&#xD;&#xA;It sounds to me like you are checking for collision by checking if each object has collided with any other object, for example if you have three objects in the list it would do nine comparisons - if you had four objects (A,B,C,D) you would check for collisions with the following combinations:&#xD;&#xA;&#xD;&#xA;    AB, AC, AD,&#xD;&#xA;    BA, BC, BD,&#xD;&#xA;    CA, CB, CD&#xD;&#xA;    DA, DB, DC&#xD;&#xA;&#xD;&#xA;This isn't required, you only need to check for collisions that haven't already been compared - in the above algorithm AB *and* BA is being compared, which isn't necessary.&#xD;&#xA;&#xD;&#xA;In the case of four objects ABCD you need to check for collisions with the following combinations:&#xD;&#xA;&#xD;&#xA;    AB, AC, AD&#xD;&#xA;    BC, BD&#xD;&#xA;    CD&#xD;&#xA;&#xD;&#xA;Pseudocode for the above algorithm:&#xD;&#xA;&#xD;&#xA;    for(objectIterator i=list.begin; i!= list.end; i++)&#xD;&#xA;    {&#xD;&#xA;      objectIterator n=i; n++;&#xD;&#xA;      for(; i!=list.end; i++)&#xD;&#xA;      {&#xD;&#xA;         // check for collision here between i and n and call the delegate of either.&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="10192" PostHistoryTypeId="2" PostId="5150" RevisionGUID="fb6687be-9d7b-4bb7-bb19-17141ba9e2b3" CreationDate="2010-11-03T10:24:40.573" UserId="2080" Text="I'm currently working on a side-scroller which lets the player alter their speed and I wondered how should I properly generate and control background tiles for such a kind o game. I'm using Flixel but I believe it's a strictly mathematical problem. Here's how I see and do it right now:&#xD;&#xA;&#xD;&#xA; - actually the player is static but he has a pseudo-velocity, that can be increased and decreased (but there is some minimal pseudo-velocity)&#xD;&#xA; - tiles are random so they are not kept in any tilemap - they are generated by an emitter instead&#xD;&#xA; - background tiles observe player's pseudo-velocity and alter their own velocity (base velocity is static for a given tile but different tiles can have different base velocities) based on it (so they use their velocity to move in the opposite direction to the player but they also increase/decrease this velocity according to the player to create the illusion of acceleration/deceleration)&#xD;&#xA; - the starting velocity of each background tile is maintained no matter what the pseudo-velocity of player is (so when the player accelerates, two given tiles with different velocities approach faster to the player but there is no change in the delta of their velocities, so you can say  that one tile aproaches the player fast and the other even faster :-))&#xD;&#xA; - background tiles are generated based on same frequency which is also dependend on the player's pseudo-velocity (so when for example the velocity of all tiles is constant, the distance between consecutive tiles is also constant but when the player accelerates, the frequency of tile generation should increase to retain the same distance between generated tiles)&#xD;&#xA; - and the last one trick: when the player is moving at minimal speed their sprite is located exactly on the center of the screen but when they accelerate the sprite floats to the left edge of the screen (proportionally to the current speed but with some lag) so the player can see more and has more time to react&#xD;&#xA;&#xD;&#xA;Ok, now it's finally time for the problems! :D&#xD;&#xA;&#xD;&#xA; - I cannot come up with the proper formula for the tile generation frequency according to the player's pseudo-velocity (when the player accelerates the frequency increases too slowly and the distance between tiles increases, and when the player decelerates the frequency decreases also too slowly and the distance between tiles gets much too small, they begin to clutter)&#xD;&#xA; - the problem is also intensified by the last point of the above list - when the pseudo-velocity increases the player's sprite is moved to the left so the tile generation frequency should be additionally increased (and respectively delayed during player's deceleration)&#xD;&#xA;&#xD;&#xA;Phew! I think that's a whole description of the problem. Has any of you ever fiddled with such a game mechanic and if yes, have you encountered similar problems and what were your solutions?&#xD;&#xA;&#xD;&#xA;If the description is not clear enough, please let my know and I'll provide working example showing above concerns." />
  <row Id="10193" PostHistoryTypeId="1" PostId="5150" RevisionGUID="fb6687be-9d7b-4bb7-bb19-17141ba9e2b3" CreationDate="2010-11-03T10:24:40.573" UserId="2080" Text="Generating background tiles for a side-scroller with variable player speed" />
  <row Id="10194" PostHistoryTypeId="3" PostId="5150" RevisionGUID="fb6687be-9d7b-4bb7-bb19-17141ba9e2b3" CreationDate="2010-11-03T10:24:40.573" UserId="2080" Text="&lt;2d&gt;&lt;math&gt;&lt;actionscript-3&gt;&lt;tiles&gt;&lt;parallaxscrolling&gt;" />
  <row Id="10196" PostHistoryTypeId="2" PostId="5152" RevisionGUID="b1557384-4a60-4955-a551-7fd91dcd5d79" CreationDate="2010-11-03T11:36:38.087" UserId="3011" Text="Checkout [Robbert Penner's][1] easing classes and examples.&#xD;&#xA;They are very easy to convert to C#.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.robertpenner.com/easing/&#xD;&#xA;" />
  <row Id="10197" PostHistoryTypeId="5" PostId="5149" RevisionGUID="d65d3151-54a8-4169-84aa-43d48d15a303" CreationDate="2010-11-03T11:39:06.553" UserId="744" Comment="Fix pseudocode to not exhaust the i iterator each loop." Text="For my answer I'll assume you are managing lists of objects.&#xD;&#xA;&#xD;&#xA;    list&lt;Object&gt; objects;&#xD;&#xA;&#xD;&#xA;It sounds to me like you are checking for collision by checking if each object has collided with any other object, for example if you have three objects in the list it would do nine comparisons - if you had four objects (A,B,C,D) you would check for collisions with the following combinations:&#xD;&#xA;&#xD;&#xA;    AB, AC, AD,&#xD;&#xA;    BA, BC, BD,&#xD;&#xA;    CA, CB, CD&#xD;&#xA;    DA, DB, DC&#xD;&#xA;&#xD;&#xA;This isn't required, you only need to check for collisions that haven't already been compared - in the above algorithm AB *and* BA is being compared, which isn't necessary.&#xD;&#xA;&#xD;&#xA;In the case of four objects ABCD you need to check for collisions with the following combinations:&#xD;&#xA;&#xD;&#xA;    AB, AC, AD&#xD;&#xA;    BC, BD&#xD;&#xA;    CD&#xD;&#xA;&#xD;&#xA;Pseudocode for the above algorithm:&#xD;&#xA;&#xD;&#xA;    for(objectIterator i=list.begin; i!= list.end; i++)&#xD;&#xA;    {&#xD;&#xA;      objectIterator n=i;&#xD;&#xA;      n++;&#xD;&#xA;      for(; n!=list.end; n++)&#xD;&#xA;      {&#xD;&#xA;         // check for collision here between i and n and call the delegate of either.&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="10198" PostHistoryTypeId="2" PostId="5153" RevisionGUID="497748f6-7f0f-42ed-aecc-d9452a73765a" CreationDate="2010-11-03T12:13:56.103" UserId="862" Text="You can develop a 3D game without the need of using an existing game engine as XNA gives you plenty of classes for that.&#xD;&#xA;&#xD;&#xA;But if you really want to use a 3D engine, your best bet right now is using the SunBurn Engine:&#xD;&#xA;&#xD;&#xA;http://www.synapsegaming.com/&#xD;&#xA;&#xD;&#xA;Version 1.X is only a lighting engine, but Synapse has said that version 2.X will be a full game engine." />
  <row Id="10199" PostHistoryTypeId="2" PostId="5154" RevisionGUID="a19eb687-8482-4d29-aea3-b659320c67dc" CreationDate="2010-11-03T12:18:13.010" UserId="862" Text="For XNA 4.0 you have two different downloads. One for users in Windows XP that only includes the XNA 4.0 Framework and another for users in Vista/W7 that includes XNA 4.0 and the WP7 Dev Tools. You can get both from here:&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-us/resources/downloads&#xD;&#xA;&#xD;&#xA;In the XNA Game Studio 4.0 section." />
  <row Id="10200" PostHistoryTypeId="5" PostId="5147" RevisionGUID="639e55cd-7d96-4c91-b24f-2b4123e53bf1" CreationDate="2010-11-03T13:50:15.873" UserId="678" Comment="added 134 characters in body; added 6 characters in body" Text="XNA offers everything you need to get your models on the screen. Its content pipeline is unmatched by anything I have seen so far. However, the interface to the rendering subsystems is fairly low-level, and you will most likely end up pushing a model's meshes to the hardware &quot;by hand&quot;. &#xD;&#xA;&#xD;&#xA;A good engine will help you batch submeshes with the same materials, handle transparent polygons and all that jazz. Adding a good scene manager will ensure that you do not send geometry that cannot be seen to the hardware. You can code all these things yourself, or you can get a rendering engine to do it for you.&#xD;&#xA;&#xD;&#xA;And we haven't even considered things other than rendering, such as sound and physics.&#xD;&#xA;&#xD;&#xA;You will find a wealth of interesting links on the [XNA developer's Survival Kit (XDSK)][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nelxon.com/191/xdsk/" />
  <row Id="10201" PostHistoryTypeId="2" PostId="5155" RevisionGUID="a14794fd-540f-410e-ab5b-15b2e6d2a04e" CreationDate="2010-11-03T14:04:41.800" UserId="3015" Text="**TL;DR:**&#xD;&#xA;&#xD;&#xA;Where should elevation be anchored on a civ-style hexagonal grid? Center, side or vertex? (Or more complex?)&#xD;&#xA;&#xD;&#xA;**Question proper:**&#xD;&#xA;&#xD;&#xA;Consider for a moment a classic game we all know and love (maybe?), Sid Meier's Alpha Centauri. The map model introduced the brand new concept of visible terrain elevation to the classic Civ formula. In SMAC, every vertex of the game board had an elevation, allowing the map beautiful rolling hills, a complete necessity, considering the mind worm boils waiting around every corner.&#xD;&#xA;&#xD;&#xA;Would a vertex-only elevation map translate neatly to a hexagonal grid?&#xD;&#xA;&#xD;&#xA;The obvious alternatives are side-based elevation mapping and center-based elevation mapping; as well as inner-vertex elevation mapping (giving the opportunity for cliffs! Yay!)&#xD;&#xA;&#xD;&#xA;The last option is applying a triangular lattice to the game grid encompassing centers and vertices, and having vertex-only or inner-vertex elevation.&#xD;&#xA;&#xD;&#xA;Which of these options is likely to work well? Which are likely to suck all the juice out of the CPU and RAM in a hurry?" />
  <row Id="10202" PostHistoryTypeId="1" PostId="5155" RevisionGUID="a14794fd-540f-410e-ab5b-15b2e6d2a04e" CreationDate="2010-11-03T14:04:41.800" UserId="3015" Text="Elevation model for hexagonal game grids" />
  <row Id="10203" PostHistoryTypeId="3" PostId="5155" RevisionGUID="a14794fd-540f-410e-ab5b-15b2e6d2a04e" CreationDate="2010-11-03T14:04:41.800" UserId="3015" Text="&lt;game-mechanics&gt;&lt;coordinates&gt;&lt;turn-based&gt;&lt;worldmap&gt;" />
  <row Id="10204" PostHistoryTypeId="2" PostId="5156" RevisionGUID="6d335364-2713-4d6d-8a56-4ec4f46958f4" CreationDate="2010-11-03T14:07:03.343" UserId="2316" Text="I'm developing an RPG [(goodness, I'm doing a lot actually.)](http://www.strongfortress.com) and I'm trying to come up with a decent die roll mechanic for skills.&#xD;&#xA;&#xD;&#xA;In d20 systems, it's usually&#xD;&#xA;&#xD;&#xA;    Die Roll + Skill + Bonuses - Penalties &gt;= Some Target Number&#xD;&#xA;&#xD;&#xA;For Many Warhammer (old) systems, you:&#xD;&#xA;&#xD;&#xA;    compare skill vs. skill on chart, Die Roll &gt;= # given on chart.&#xD;&#xA;&#xD;&#xA;For the HERO system, it's generally:&#xD;&#xA;&#xD;&#xA;    Roll 3D6 &lt;= Skill + Bonuses - Penalties&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;But for each of these systems, they use a different die mechanic to determine the outcome  of the action.  D20 is notorious for using D8s, D10s, [D12s](http://www.giantitp.com/forums/showthread.php?t=66433), etc.  Which you total up, and deal to someone else.  That other person is then *fine* until they drop to 0hp.  (other games are similarly designed, HERO for example using Body, STUN, and END).&#xD;&#xA;&#xD;&#xA;Are there games that discard a second mechanic for action resolution as well as success?&#xD;&#xA;&#xD;&#xA;For example, I'm thinking of using a black-jack mechanic.&#xD;&#xA;&#xD;&#xA;    Die Roll &lt;= Skill + Attributes + Bonuses - Penalties&#xD;&#xA;&#xD;&#xA;to determine if an attacker hits an opponent, and then that opponent must &quot;resist&quot; the damage caused by the attack, using a very similar roll.  This is used on the table-top Warhammer games (Roll to-hit, Break Toughness, Armor Saves).  &#xD;&#xA;&#xD;&#xA;Damage is measured in penalties instead of in numbers.  (ex. if a combatant failed 2 resists in combat, he'd suffer a -2 penalty for all other skill rolls).  The penalties being easy to see/keep track of using counters etc.  &#xD;&#xA;&#xD;&#xA; - What pitfalls am I missing? &#xD;&#xA; - What games use a mechanic similar to this?&#xD;&#xA; - What other mechanics should I be concerned about?&#xD;&#xA;&#xD;&#xA;Thanks," />
  <row Id="10205" PostHistoryTypeId="1" PostId="5156" RevisionGUID="6d335364-2713-4d6d-8a56-4ec4f46958f4" CreationDate="2010-11-03T14:07:03.343" UserId="2316" Text="Die Roll Mechanics" />
  <row Id="10206" PostHistoryTypeId="3" PostId="5156" RevisionGUID="6d335364-2713-4d6d-8a56-4ec4f46958f4" CreationDate="2010-11-03T14:07:03.343" UserId="2316" Text="&lt;game-design&gt;&lt;indie&gt;" />
  <row Id="10207" PostHistoryTypeId="2" PostId="5157" RevisionGUID="de172fa1-4f6c-4341-94b7-33e1159b4f63" CreationDate="2010-11-03T14:31:24.247" UserId="3017" Text="For a long time I've tried to search for an open source manager game, but without any luck. I'm looking for a suitable project for a reference to my own pet project. Features like well designed data model, tournament and fixture generation and understandable match simulation algorithm would be a great bonuses.&#xD;&#xA;&#xD;&#xA;I'm especially interested in game projects like [Hattrick](http://hattrick.org/) and SI Games' Football Manager, although it is irrelevant what the particular sport is. The project should be preferably web-based as Hattrick is.&#xD;&#xA;&#xD;&#xA;I've crawled through GitHub and SourceForge, but I found only a few sports simulation projects. Projects, which I have found, were either dead or not fulfilling my wishes.&#xD;&#xA;&#xD;&#xA;Do you know any open source manager game / fantasy sports game project, which would be available as open source, OR at least any material, which would be useful when building a such project?" />
  <row Id="10208" PostHistoryTypeId="1" PostId="5157" RevisionGUID="de172fa1-4f6c-4341-94b7-33e1159b4f63" CreationDate="2010-11-03T14:31:24.247" UserId="3017" Text="Is there an open source sports manager project?" />
  <row Id="10209" PostHistoryTypeId="3" PostId="5157" RevisionGUID="de172fa1-4f6c-4341-94b7-33e1159b4f63" CreationDate="2010-11-03T14:31:24.247" UserId="3017" Text="&lt;open-source&gt;&lt;web&gt;&lt;management&gt;" />
  <row Id="10210" PostHistoryTypeId="6" PostId="5155" RevisionGUID="95f50d01-a669-40a4-9e9d-f1f7bb0df244" CreationDate="2010-11-03T14:33:56.477" UserId="3015" Comment="edited tags" Text="&lt;tiles&gt;&lt;game-mechanics&gt;" />
  <row Id="10211" PostHistoryTypeId="2" PostId="5158" RevisionGUID="2505c589-c9f2-4a87-992a-00b75216ded7" CreationDate="2010-11-03T14:41:45.843" UserId="2494" Text="i'm a newbie. I'm trying to develop a 2d game (top-down view). &#xD;&#xA;I would like to load a standard background, a textured ground... My &quot;world&quot; is big, for example 3000px X 3000px. &#xD;&#xA;I think it is not a good idea to load a 3000px x 3000px image and move it... &#xD;&#xA;So, how is the best practice ? &#xD;&#xA;To load a single small image (64x64) and repeat it for N times ? &#xD;&#xA;If yes, ok, but how i can manage the &quot;background&quot; movement ? &#xD;&#xA;Thanks &#xD;&#xA;Bye!" />
  <row Id="10212" PostHistoryTypeId="1" PostId="5158" RevisionGUID="2505c589-c9f2-4a87-992a-00b75216ded7" CreationDate="2010-11-03T14:41:45.843" UserId="2494" Text="Tiled game: how to correct load background image ?" />
  <row Id="10213" PostHistoryTypeId="3" PostId="5158" RevisionGUID="2505c589-c9f2-4a87-992a-00b75216ded7" CreationDate="2010-11-03T14:41:45.843" UserId="2494" Text="&lt;game-design&gt;" />
  <row Id="10214" PostHistoryTypeId="6" PostId="5158" RevisionGUID="54c9eabd-8a97-407c-a2e8-e3255d89984f" CreationDate="2010-11-03T14:49:36.987" UserId="2494" Comment="edited tags" Text="&lt;game-design&gt;&lt;tiles&gt;&lt;game-mechanics&gt;" />
  <row Id="10215" PostHistoryTypeId="2" PostId="5159" RevisionGUID="9eb5706c-3c6c-4494-8055-64b0538fe789" CreationDate="2010-11-03T15:03:41.290" UserId="953" Text="The New World of Darkness Storytelling System combines to-hit and damage in the same roll.  Rolls use a pool of d10s of a size appropriate to the difficulty of the roll, and each d10 which rolls 8 or above is considered a &quot;success&quot; on the test.  Attack rolls work like:&#xD;&#xA;&#xD;&#xA;    Attribute + Skill + Weapon Damage - target's Defense and Armor&#xD;&#xA;&#xD;&#xA;The &quot;successes&quot; on that roll are equal to the number of points of damage taken by the target.  There are three types of damage (bashing, lethal, and aggravated), but regardless of the type of damage, the character starts getting penalties when she has 3 or fewer &quot;hit points&quot; left.&#xD;&#xA;&#xD;&#xA;This takes some feeling of agency away from the target, as she doesn't get to roll to resist getting damaged, but it makes combat a bit faster in tabletop: a single roll (single handful of dice) determines damage, and if you're repeating the attack the modifiers remain the same.&#xD;&#xA;&#xD;&#xA;One pitfall to look out for is whether the penalties from damage will affect the target's defense.  I recommend against this; it can suck when getting hurt makes it easier for you to get hurt." />
  <row Id="10216" PostHistoryTypeId="2" PostId="5160" RevisionGUID="bd28e0ad-488b-4242-8e6c-dee652779e57" CreationDate="2010-11-03T15:10:34.683" UserDisplayName="p_iotrek" Text="http://www.sfml-dev.org/ &lt;- Making window, and drawing lines is very easy" />
  <row Id="10217" PostHistoryTypeId="2" PostId="5161" RevisionGUID="a858c806-11c3-4974-b54b-7141927e2b35" CreationDate="2010-11-03T15:12:19.737" UserId="3018" Text="Random question, but are there any PlayStation 3 games whose source code is available to the public to view?&#xD;&#xA;&#xD;&#xA;I have no experience developing computer games (my experience is in developing websites and web applications) but have always been interested in seeing what goes into a computer game." />
  <row Id="10218" PostHistoryTypeId="1" PostId="5161" RevisionGUID="a858c806-11c3-4974-b54b-7141927e2b35" CreationDate="2010-11-03T15:12:19.737" UserId="3018" Text="Are there any PS3 games whose source code is open source?" />
  <row Id="10219" PostHistoryTypeId="3" PostId="5161" RevisionGUID="a858c806-11c3-4974-b54b-7141927e2b35" CreationDate="2010-11-03T15:12:19.737" UserId="3018" Text="&lt;playstation3&gt;" />
  <row Id="10220" PostHistoryTypeId="5" PostId="4955" RevisionGUID="b34afced-e673-4b21-9e73-0951f41635f4" CreationDate="2010-11-03T15:21:35.323" UserId="891" Comment="added 20 characters in body; edited tags; edited title" Text="For example, Havok Content Tools allows you to define physic bodies, properties, connections, etc in Maya, 3d Studio Max, etc.&#xD;&#xA;&#xD;&#xA;For creating full scenes/levels is this really the correct approach or is there some better way to do things." />
  <row Id="10221" PostHistoryTypeId="4" PostId="4955" RevisionGUID="b34afced-e673-4b21-9e73-0951f41635f4" CreationDate="2010-11-03T15:21:35.323" UserId="891" Comment="added 20 characters in body; edited tags; edited title" Text="How to create complex Physics scenes with the Havok Content Tools" />
  <row Id="10222" PostHistoryTypeId="6" PostId="4955" RevisionGUID="b34afced-e673-4b21-9e73-0951f41635f4" CreationDate="2010-11-03T15:21:35.323" UserId="891" Comment="added 20 characters in body; edited tags; edited title" Text="&lt;physics&gt;&lt;assets&gt;&lt;havok&gt;" />
  <row Id="10223" PostHistoryTypeId="2" PostId="5162" RevisionGUID="2dc48de4-28c4-4c53-893b-94ab1cce2dae" CreationDate="2010-11-03T15:34:19.153" UserId="1198" Text="I'd try to render images at the same size as the source image, so if that is truely the max size (and also the size of your .png or whatever) I'd render it as-is and be done with it (unless I saw noticable framerate drop by doing that). &#xD;&#xA;&#xD;&#xA;If you do see performance problems, or you anticipate much larger imagery, you'd need to come up with a tiling scheme, which will determine which tiles of your map need to be on the screen and render them. One way to do it (maybe not the best) is to use a Tile class, then have an `array[x,y]` of tiles. Each Tile knows its realitive position on the screen and can react to user-input in order to move on the correct axis." />
  <row Id="10225" PostHistoryTypeId="2" PostId="5163" RevisionGUID="bc9ee627-0992-43f0-b7b4-a7b8fd6b945d" CreationDate="2010-11-03T16:24:37.537" UserId="395" Text="No, but there is little difference between a PS3 game and a game for any other platform. The only thing that defines it as a PS3 game is the use of the PS3 APIs for graphics, IO, etc, all of which would have to be removed since they are under heavy NDA. If you want to look at game code, maybe check out Doom or Quake (both are GPL now)." />
  <row Id="10226" PostHistoryTypeId="5" PostId="5129" RevisionGUID="bbe83c84-797f-4478-a8d3-02537575998e" CreationDate="2010-11-03T16:36:21.037" UserId="136" Comment="added 637 characters in body" Text="The Civ 5 SDK has been released, which should include the source code for the core game library, including all of the AI code (including those files referenced in the XML comments).  You should be able to change the AI to any extent you like, even going so far as to rewrite it completely if you so desired.  Have fun! :)&#xD;&#xA;&#xD;&#xA;**EDIT:** My apologies, but it seems I was a bit premature.  It was my understanding that the sources would be included in the SDK as they were for Civ 4.  Further inspection of the SDK reveals that those sources are *not* included.  I suspect the sources will be made available eventually, and that they were excluded from the initial SDK release in order to get *something* into the hands of anxious mod creators.  It's possible that Firaxis reconsidered their SDK strategy and decided not to release the sources at all, but I imagine that would invite quite a backlash from the community.  I guess we'll just have to wait and see." />
  <row Id="10227" PostHistoryTypeId="2" PostId="5164" RevisionGUID="133ba801-dde9-428a-968d-b385a9411cc2" CreationDate="2010-11-03T16:55:26.580" UserDisplayName="amir" Text="Major in Computer Science, with a specialization in Game Development... UC Irvine has such a program, if you have the grades and SAT scores for UCI, go for it. Also UCI is located in southern california, where so many top game dev companies are... which helps a lot in landing a great job in the field. " />
  <row Id="10228" PostHistoryTypeId="2" PostId="5165" RevisionGUID="4971baee-90f7-484c-824d-12b5189e9c59" CreationDate="2010-11-03T17:35:00.757" UserId="154" Text="Potential issues that come to mind:&#xD;&#xA;&#xD;&#xA;**Negative Feedback Loop**&#xD;&#xA;&#xD;&#xA;The biggest issue with degradation of skills/abilities when damaged is that you have potential for a feedback loop. The first entity to land a hit not only pushes their opponent towards death, but limits the opponents ability to respond. This makes it almost impossible for the loser at the beginning of an encounter to rally.&#xD;&#xA;&#xD;&#xA;**Asymptopic Damage Reduction**&#xD;&#xA;&#xD;&#xA;If both sides of a battle reduce their ability to hit/damage as they injure one another you may get to a point where both of them are constantly missing each other or doing such little damage that they fight to the equivalent of a standstill.&#xD;&#xA;&#xD;&#xA;**Tactical Consideration Time Available to the Player**&#xD;&#xA;&#xD;&#xA;If characters change in ability during the course of a fight the player needs the time to adjust to their changing status and react accordingly. Table top games are inherently turn based giving players plenty of time to make such considerations. If your combat resolves in real-time the effects of a degradation system can be lost of players adding confusion instead of a layer of strategic thinking.&#xD;&#xA;" />
  <row Id="10229" PostHistoryTypeId="2" PostId="5166" RevisionGUID="d5a442a9-7df6-45e6-bda3-a53bdfb6e9be" CreationDate="2010-11-03T17:49:07.157" UserId="3025" Text="I am planning on making a simple real-time strategy game from the series Stargate Universe. For those who don't know, in the series' center is a spaceship called Destiny. It has a nice control room, with a control interface, what has a holographic control screen. The game basically would run on this. That's what I want to do, easily.&#xD;&#xA;&#xD;&#xA;Can you suggest me ANY free 2D engine, what has:&#xD;&#xA;- A top-view area for combat and ship management&#xD;&#xA;- Many UI elements what can be used easily&#xD;&#xA;- a top-on GUI part, where the actual GUI can be put&#xD;&#xA;- a nice GUI for putting all together (a game development framework or workbench)&#xD;&#xA;&#xD;&#xA;And written in:&#xD;&#xA;- C#&#xD;&#xA;- ActionScript (Flash)&#xD;&#xA;&#xD;&#xA;It is a bit reverse-like, as at the bottom of the layers would be the UI, over it the buttons, and over them would be the actual playground (battlefields, ship elements, etc).&#xD;&#xA;&#xD;&#xA;Can you please help me?" />
  <row Id="10230" PostHistoryTypeId="1" PostId="5166" RevisionGUID="d5a442a9-7df6-45e6-bda3-a53bdfb6e9be" CreationDate="2010-11-03T17:49:07.157" UserId="3025" Text="2D game engine for UI - suggestion needed" />
  <row Id="10231" PostHistoryTypeId="3" PostId="5166" RevisionGUID="d5a442a9-7df6-45e6-bda3-a53bdfb6e9be" CreationDate="2010-11-03T17:49:07.157" UserId="3025" Text="&lt;2d&gt;&lt;engine&gt;&lt;gui&gt;" />
  <row Id="10232" PostHistoryTypeId="2" PostId="5167" RevisionGUID="47a9a5b9-21bd-4c3e-b323-b1bd53527b92" CreationDate="2010-11-03T17:51:04.257" UserId="1156" Text="[Score OS][1] came up on the google search. It's open source [(Google code)][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scoreos.org/&#xD;&#xA;  [2]: http://code.google.com/p/scoreos/" />
  <row Id="10233" PostHistoryTypeId="6" PostId="5161" RevisionGUID="ae7f6b69-7465-4f37-9582-83806352cb85" CreationDate="2010-11-03T17:51:55.910" UserId="1156" Comment="edited tags" Text="&lt;open-source&gt;&lt;playstation3&gt;&lt;source-code&gt;" />
  <row Id="10234" PostHistoryTypeId="2" PostId="5168" RevisionGUID="fbc3baa8-07bb-46ab-b540-18588528a49a" CreationDate="2010-11-03T17:58:00.443" UserId="1352" Text="There are already some similar questions to this. I'll just point you to them.&#xD;&#xA;&#xD;&#xA;[recommend-a-game-engine-with-2d-gui-for-a-ui-intensive-strategy-game][1]&#xD;&#xA;&#xD;&#xA;[recommended-2d-game-engine-for-prototyping][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3799/recommend-a-game-engine-with-2d-gui-for-a-ui-intensive-strategy-game&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/536/recommended-2d-game-engine-for-prototyping&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10235" PostHistoryTypeId="5" PostId="5166" RevisionGUID="567e2ec3-2ad3-419d-84bc-f0ecba76f86b" CreationDate="2010-11-03T18:39:13.193" UserId="3025" Comment="added 14 characters in body" Text="I am planning on making a simple real-time strategy game from the series Stargate Universe. For those who don't know, in the series' center is a spaceship called Destiny. It has a nice control room, with a control interface, what has a holographic control screen. The game basically would run on this. That's what I want to do, easily.&#xD;&#xA;&#xD;&#xA;Can you suggest me ANY free 2D engine, what has:&#xD;&#xA;- A top-view area for combat and ship management&#xD;&#xA;&#xD;&#xA;- Many UI elements what can be used easily&#xD;&#xA;&#xD;&#xA;- a top-on GUI part, where the actual GUI can be put&#xD;&#xA;&#xD;&#xA;- a nice GUI for putting all together (a game development framework or workbench)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And written in:&#xD;&#xA;&#xD;&#xA;- C#&#xD;&#xA;&#xD;&#xA;- ActionScript (Flash)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It is a bit reverse-like, as at the bottom of the layers would be the UI, over it the buttons, and over them would be the actual playground (battlefields, ship elements, etc).&#xD;&#xA;&#xD;&#xA;Can you please help me?" />
  <row Id="10236" PostHistoryTypeId="2" PostId="5169" RevisionGUID="55715e24-fb53-4a5d-9a4d-38f51a8604cf" CreationDate="2010-11-03T19:43:12.813" UserId="2653" Text="One oversight with your system; unless I'm just missing it (possible), you don't actually detail how someone is defeated. Presumably at some level of penalties, they would be considered dead/incapacitated, but you don't actually spell that out. And for that matter, such a system isn't very different from hit points. It's still a resource which combatants, which is reduced by combat, and when it hits the magic number you fall over.&#xD;&#xA;&#xD;&#xA;Your idea reminds me a bit of Mutants &amp; Masterminds, a d20-based (albeit heavily modified) superheroes game.&#xD;&#xA;&#xD;&#xA;Characters and enemies don't have hit points, they have toughness. The damage dealt to them is inflicted as a DC which they must beat on a toughness save. If they make the DC, they're fine. If they fail the DC by less than 5 (I think? been a while), they take a -1 penalty to further toughness save. If they fail the DC by more than 5, they're KOd.&#xD;&#xA;&#xD;&#xA;So there's an idea to differentiate it from HP. Instead of dying when you reach a certain threshold, if you ever fail a check by a certain amount then you drop." />
  <row Id="10237" PostHistoryTypeId="2" PostId="5170" RevisionGUID="9c6c90dc-9b86-4230-b03f-bb28fa486497" CreationDate="2010-11-03T20:02:54.720" UserId="3004" Text="&gt; Would a vertex-only elevation map&#xD;&#xA;&gt; translate neatly to a hexagonal grid?&#xD;&#xA;&#xD;&#xA;It depends on the tessellation of the grid. If you tessellate your plane like so, then yes.&#xD;&#xA;&#xD;&#xA;![Grids][1]&#xD;&#xA;&#xD;&#xA;In this case, you can change the green triangle (x6) any way you like:&#xD;&#xA;![hextri][2]&#xD;&#xA;&#xD;&#xA;&gt; Which of these options is likely to&#xD;&#xA;&gt; work well?&#xD;&#xA;&#xD;&#xA;They all work well. Chances are that you'll be using multiple methods, anyway. You can't *just* use mid-point elevation unless you just want one-tile mountain features, you'd have to &quot;raise&quot; the edges as you go up a mountain if you want multiple-tile topography.&#xD;&#xA;&#xD;&#xA;&gt; Which are likely to suck all the juice&#xD;&#xA;&gt; out of the CPU and RAM in a hurry?&#xD;&#xA;&#xD;&#xA;This is a non-issue (unless you're writing this for some sort of embedded system?) as all the map generation work will be done before anyone plays the game, during the loading phase.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/mihdV.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/W1f22.jpg" />
  <row Id="10238" PostHistoryTypeId="2" PostId="5171" RevisionGUID="b415cc2b-025c-4a85-8282-98d54e835264" CreationDate="2010-11-03T20:44:27.397" UserId="2998" Text="A large png on disk may only take up a couple megabytes but I imagine that on the gpu the same png is stored in an uncompressed format which takes up much more space. Is this true? If it is true, how much space?" />
  <row Id="10239" PostHistoryTypeId="1" PostId="5171" RevisionGUID="b415cc2b-025c-4a85-8282-98d54e835264" CreationDate="2010-11-03T20:44:27.397" UserId="2998" Text="How much memory does a texture take up on the GPU?" />
  <row Id="10240" PostHistoryTypeId="3" PostId="5171" RevisionGUID="b415cc2b-025c-4a85-8282-98d54e835264" CreationDate="2010-11-03T20:44:27.397" UserId="2998" Text="&lt;xna&gt;&lt;textures&gt;&lt;gpu&gt;" />
  <row Id="10242" PostHistoryTypeId="2" PostId="5173" RevisionGUID="16b49d9f-44c4-4ceb-abdc-0fb4a937e477" CreationDate="2010-11-03T20:53:30.073" UserId="89" Text="I apologize for the subjective &quot;best&quot; keyword.&#xD;&#xA;&#xD;&#xA;My friend and I have started creation of a 2D adventure game. It will be top-down in the style of pokemon or zelda (just the perspective). We have been discussing methods of creating a large world-map that the player can traverse without straining the memory capabilities of our machine.&#xD;&#xA;&#xD;&#xA;Our first impulse was to create a large map and a circle around the player in which content will be loaded. We figured this won't hold for long and decided to partition the map into sections. First we had four large sections, but realized we could simply break it down into many tiny sections.&#xD;&#xA;&#xD;&#xA;I played some Zelda from the SNES and saw that, during the shift of a map, the content could be loaded just then. What I mean is, instead of just checking a rectangular area for data to load, we simply section the map into many tiny chunks that load and de-load data as we move from map-portion to map-portion.&#xD;&#xA;&#xD;&#xA;Today, he told me he wanted to create a simply 2D array map[WIDTH][HEIGHT] that contains data about every grid in the game and is a constant save-to-disk operation for data that we don't need.&#xD;&#xA;&#xD;&#xA;I'm not sure about these ideas and thought that I might as it here. Any links, resources or tutorials on the subject would be greatly appreciated as well as direct answers to our question on how to do it efficiently." />
  <row Id="10243" PostHistoryTypeId="1" PostId="5173" RevisionGUID="16b49d9f-44c4-4ceb-abdc-0fb4a937e477" CreationDate="2010-11-03T20:53:30.073" UserId="89" Text="Best Way to Create A Map for a 2D Game?" />
  <row Id="10244" PostHistoryTypeId="3" PostId="5173" RevisionGUID="16b49d9f-44c4-4ceb-abdc-0fb4a937e477" CreationDate="2010-11-03T20:53:30.073" UserId="89" Text="&lt;game-design&gt;&lt;2d&gt;&lt;maps&gt;" />
  <row Id="10246" PostHistoryTypeId="2" PostId="5175" RevisionGUID="5120b0c5-6248-41f8-891b-2935fd436247" CreationDate="2010-11-03T21:38:21.390" UserId="2962" Text="AFAIK it's the images width * height * BPP, independent if it's a PNG, JPG or BMP. I don't know how DDS or other compressable formats are layed out.&#xD;&#xA;&#xD;&#xA;Mip-mapping will increase the need for video memory to.&#xD;&#xA;&#xD;&#xA;My knowledge in this topic may be a little outdated. I've abandoned 3D a while ago." />
  <row Id="10247" PostHistoryTypeId="6" PostId="5173" RevisionGUID="73e37872-590d-430e-83c8-8812b1f34e61" CreationDate="2010-11-03T21:52:13.300" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;2d&gt;&lt;tiles&gt;&lt;maps&gt;" />
  <row Id="10248" PostHistoryTypeId="2" PostId="5176" RevisionGUID="016a2dfc-077e-4cf4-a01c-69c56fae5507" CreationDate="2010-11-03T21:58:12.423" UserId="1129" Text="Disclaimer: I'm first a programmer and then an RTS gamer. This means I'm a complete and utter newb in terms of patterns, best practices and glossary of technical terms on the game dev world.&#xD;&#xA;&#xD;&#xA;Since I was a kid that most of my electric/electronic toys were always taken apart to learn how they were made and most of the pieces were stored for future use.  &#xD;&#xA;This gave me a VERY curious mind in terms of: How does it work?&#xD;&#xA;&#xD;&#xA;I've started planning/scribbling for more RTS games than the market has dished out, but never got around to implement any of them due to the lack of basic knowledge about Game Devel.&#xD;&#xA;&#xD;&#xA;So what I'm asking is that someone could point me in the direction of the engine schematics of an RTS game like SimCity/Civ/Settlers. Something that will assume a bit of programming background but will introduce the terms used for programming a RTS base game.&#xD;&#xA;&#xD;&#xA;* How do they do the Unit Manager? Is it called this way?&#xD;&#xA;* Is creating a complex multi threading system wise?&#xD;&#xA;* Should I use multi-threading just for groups of units?&#xD;&#xA;&#xD;&#xA;Well, I think you get the picture of how newb I am ;)&#xD;&#xA;&#xD;&#xA;Many thanks in advance." />
  <row Id="10249" PostHistoryTypeId="1" PostId="5176" RevisionGUID="016a2dfc-077e-4cf4-a01c-69c56fae5507" CreationDate="2010-11-03T21:58:12.423" UserId="1129" Text="Mental Image of the engine behind an RTS like SimCity/Settlers, what is it?" />
  <row Id="10250" PostHistoryTypeId="3" PostId="5176" RevisionGUID="016a2dfc-077e-4cf4-a01c-69c56fae5507" CreationDate="2010-11-03T21:58:12.423" UserId="1129" Text="&lt;game-design&gt;&lt;engine&gt;&lt;game-mechanics&gt;&lt;rts&gt;" />
  <row Id="10251" PostHistoryTypeId="2" PostId="5177" RevisionGUID="046f73ba-c1a4-4077-9164-dd920a914f9b" CreationDate="2010-11-03T22:40:04.917" UserId="2798" Text="Actually, in modern engines a texture *does* take the same space on disk than on the VRAM, except for some bytes that make up the texture's data header. RGB/RGBA and S3TC/DXTn/BCn are the most widely used formats, because they are readen straight into memory without any processing. JPG and PNG need to be decompressed on-the-fly to acquire raw RGB data, thus requiring more processing power for the loading.&#xD;&#xA;&#xD;&#xA;So, these are the sizes for different texture formats:&#xD;&#xA;&#xD;&#xA; - RGB: width * height * 3 bytes.&#xD;&#xA; - RGBA: width * height * 4 bytes.&#xD;&#xA; - DXT1/BC1: (width * height * 4 bytes) / 8 (8:1 compression ratio).&#xD;&#xA; - DXT3/BC2/DXT5/BC3: (width * height * 4 bytes) / 4 (4:1 compression ratio).&#xD;&#xA;&#xD;&#xA;If you use a image with mipmaps, multiply the size of the base image x1.33." />
  <row Id="10252" PostHistoryTypeId="2" PostId="5178" RevisionGUID="efc8b4e1-3e42-4c8a-8cf1-2e66dc82e237" CreationDate="2010-11-03T22:40:18.710" UserId="288" Text="Obviously: **It depends on the format.**&#xD;&#xA;&#xD;&#xA;Let's take a 256 by 256 pixel square texture. If it's uncompressed 32-bit with an alpha channel (`Color` in XNA) then it takes **256KB** (`256*256*4` bytes).&#xD;&#xA;&#xD;&#xA;16-bit formats (eg: `Bgr565`) will obviously be half the size (**128KB**)&#xD;&#xA;&#xD;&#xA;Then you get onto the compressed formats. In XNA you have DXT1, DXT3 and DXT5 (also known as &lt;a href=&quot;http://en.wikipedia.org/wiki/S3_Texture_Compression&quot;&gt;S3 Compression&lt;/a&gt;). This is a lossy compression format. It is also a block-based format - which means that you *can* sample from it (because you know which block a pixel is in). It's also faster, because you use less bandwidth.&#xD;&#xA;&#xD;&#xA;The compression ratio of DXT1 is 8:1 and for DXT3 and DXT5 is 4:1.&#xD;&#xA;&#xD;&#xA;So a DXT1 image of 256x256 is **32KB**. And DXT3 or DXT5 is **64KB**.&#xD;&#xA;&#xD;&#xA;And then there's **mipmapping**. If this is enabled, this creates a series of images in graphics memory each half the size of the previous. So for our 256x256 image: 128x128, 64x64, 32x32, 16x16, 8x8, 4x4, 2x2, 1x1. A texture with mipmapping is **133%** the size of the original." />
  <row Id="10253" PostHistoryTypeId="5" PostId="5178" RevisionGUID="deecd454-bdb4-4d6c-b2a7-73d0ee53dfa7" CreationDate="2010-11-03T22:45:32.627" UserId="288" Comment="added 15 characters in body" Text="Obviously: **It depends on the format.**&#xD;&#xA;&#xD;&#xA;Let's take a 256 by 256 pixel square texture. If it's uncompressed 32-bit with an alpha channel (`Color` in XNA) then it takes **256KB** (`256*256*4` bytes).&#xD;&#xA;&#xD;&#xA;16-bit formats (eg: `Bgr565`) will obviously be half the size - **128KB**.&#xD;&#xA;&#xD;&#xA;Then you get onto the compressed formats. In XNA you have DXT1, DXT3 and DXT5 (also known as &lt;a href=&quot;http://en.wikipedia.org/wiki/S3_Texture_Compression&quot;&gt;S3 Compression&lt;/a&gt;). This is a lossy compression format. It is also a block-based format - which means that you *can* sample from it (because you know which block a pixel is in). It's also faster, because you use less bandwidth.&#xD;&#xA;&#xD;&#xA;The compression ratio of DXT1 is 8:1 and for DXT3 and DXT5 is 4:1.&#xD;&#xA;&#xD;&#xA;So a DXT1 image of 256x256 is **32KB**. And DXT3 or DXT5 is **64KB**.&#xD;&#xA;&#xD;&#xA;And then there's **mipmapping**. If this is enabled, this creates a series of images in graphics memory each half the size of the previous. So for our 256x256 image: 128x128, 64x64, 32x32, 16x16, 8x8, 4x4, 2x2, 1x1. A texture with mipmapping is approximately **133%** the size of the original." />
  <row Id="10254" PostHistoryTypeId="5" PostId="5177" RevisionGUID="90daf66f-041f-4d8a-920c-774c27d16532" CreationDate="2010-11-03T22:51:27.167" UserId="2798" Comment="added 641 characters in body" Text="Actually, in modern engines a texture *does* take the same space on disk than on the VRAM, except for some bytes that make up the texture's data header. RGB/RGBA and S3TC/DXTn/BCn are the most widely used formats, because they are readen straight into memory without any processing (DXT textures are precompressed). JPG and PNG need to be decompressed on-the-fly to acquire raw RGB data, thus requiring more processing power for the loading.&#xD;&#xA;&#xD;&#xA;So, these are the sizes for different texture formats:&#xD;&#xA;&#xD;&#xA; - RGB (color, no alpha): width * height * 3 bytes.&#xD;&#xA; - RGBA (color with alpha): width * height * 4 bytes.&#xD;&#xA; - DXT1/BC1 (color, binary alpha): (width * height * 4 bytes) / 8 (8:1 compression ratio).&#xD;&#xA; - DXT3/BC2 (color, sharp alpha)/DXT5/BC3 (color, gradient alpha): (width * height * 4 bytes) / 4 (4:1 compression ratio).&#xD;&#xA;&#xD;&#xA;If you use a image with mipmaps, multiply the size of the base image x1.33.&#xD;&#xA;&#xD;&#xA;More info on DXT: it's a lossy compression; this means, some color data is lost when compressing the texture. This has a negative impact on your texture, distorting sharp borders and creating &quot;blocks&quot; on gradients; but the benefits are far better than the disadvantages (if you have a texture that looks horribly bad in DXT, just keep it uncompressed; the other ones will make up for the size loss). Also, since the pixels are compressed by blocks, the texture width and height must be power of two. " />
  <row Id="10255" PostHistoryTypeId="2" PostId="5179" RevisionGUID="6595c49d-fc41-40c8-80e6-d4e9c0cd0e87" CreationDate="2010-11-03T22:54:48.220" UserId="1232" Text="Most GPUs can only read a very specific compression format. eg. BC*, DXT*, not formats like png. So yes, it is true for the most part that a .png will take more space in video memory than on disk.&#xD;&#xA;&#xD;&#xA;Textures can be stored compressed or uncompressed in both video memory and system memory.&#xD;&#xA;&#xD;&#xA;For uncompressed textures, the general rule of thumb is that it will take the same amount of space in video memory as it does in uncompressed form in system memory. &#xD;&#xA;&#xD;&#xA;For DXT1 compressed textures. the GPU stores 8 bytes for each 4x4 tile in your texture. The uncompressed data (at 8-bits per RGB channel) would ordinarily be 4x4x3 = 48 bytes, so that's a compression ratio of 6:1. For DXT3/DXT5 compressed textures, the GPU stores 16 bytes for each 4x4 tile in your texture. That's a slightly lower compression ratio of 3:1.&#xD;&#xA;&#xD;&#xA;There are some caveats with both uncompressed and compressed textures:&#xD;&#xA;&#xD;&#xA;* Most memory is allocated in pages (the size of which varies between GPUs) of a fixed size. eg. 4KB and often that is not sub-allocated and shared with other gpu data. Ie. if your texture footprint is smaller than the page size, the footprint in vid mem will often still be the page size.&#xD;&#xA;&#xD;&#xA;* Some gpus have very specific alignment requirements. In the past, some GPUs had the requirement that textures be a power of 2 in size. This was often required to support a swizzled representation (see Morton Ordering: http://en.wikipedia.org/wiki/Z-order_(curve)) to improve access locality when sampling from the texture. This meant that textures of odd sizes would be padded in order to preserve these requirements (typically this padding is handled by the driver). While morton-order is not necessarily used in modern gpus, there may still be bloating to support the specific requirements of the gpu.&#xD;&#xA; &#xD;&#xA;* Multiple representations of your texture may exist in memory at any point in time, especially if you're using discard locks on them. This can bloat your memory usage until representations are no longer used by the gpu (which is typically a few frames behind CPU rendering)&#xD;&#xA;&#xD;&#xA;* If you enable mipmapping, the additional mips will consume on average around a third of the base mip level. YMMV based on the above caveats." />
  <row Id="10256" PostHistoryTypeId="2" PostId="5180" RevisionGUID="a2bd7eef-91e4-41ef-8109-85ce458c5a3a" CreationDate="2010-11-03T23:20:54.423" UserId="3029" Text="**Do a computer science degree.** If the course is worth its salt you'll be well-qualified for a job in the games industry and if the worst comes to the worst and you don't manage to get a job in the games industry (or decide it's not for you - I know plenty of people who've changed their minds about their career between starting and finishing their degree) you'll *also* be well-qualified for a multitude of other jobs. The same cannot be said about a specific games programming degree.&#xD;&#xA;&#xD;&#xA;There are a lot of things you can do that will increase your job prospects a lot more than doing a specific degree. One of the biggest things I look for when I'm recruiting programmers (admittedly not for the computer games industry) is evidence of a passion for the subject. Students who turn up to most lectures, do the coursework and get reasonable marks in the exam are ten a penny. The really good candidates are those who've done something extra, like working on a personal project in their spare time, going out and getting work experience in the holidays and just generally putting in more than minimal effort.&#xD;&#xA;&#xD;&#xA;Do a computer science degree, but keep working on game-related stuff in your spare time. Pester local (and remote!) game companies for work experience in the university holidays (the worst they can say is no). Work on a small game that you enhance over the years - you may even be able to get some university use out of it for your dissertation. If you then go to a games company looking for a job, and can show them the game that you built up on your own, the technologies you taught yourself to make it, the fact that you spent three months doing unit tests for game company X instead of having a summer holiday *as well as* knowing all the fundamentals from a computer science degree, they'll be a lot more interested in hiring you than if you just freewheeled through a games development degree. (Who knows - game company X might have really liked you from your unit testing, and feel you're ready to do some full-time programming for them.)" />
  <row Id="10262" PostHistoryTypeId="2" PostId="5182" RevisionGUID="991c7cf0-2666-4412-ae30-7a3f47a2c01e" CreationDate="2010-11-04T03:53:57.070" UserId="3032" Text="So far I've done web design/development and applications programming and of course video games has always been one of those things that I've wanted to take a stab at but never tried outside of a few minor and failed incursions. The only notable game programming I can say I have done was a little puzzle-ish game for the NES written in 6502 assembly so that doesn't exactly count for much.&#xD;&#xA;&#xD;&#xA;Basically, what would be a good jumping off point for me? I do know C++ and Java if that gets me anywhere." />
  <row Id="10263" PostHistoryTypeId="1" PostId="5182" RevisionGUID="991c7cf0-2666-4412-ae30-7a3f47a2c01e" CreationDate="2010-11-04T03:53:57.070" UserId="3032" Text="Applications programmer - Where to start?" />
  <row Id="10264" PostHistoryTypeId="3" PostId="5182" RevisionGUID="991c7cf0-2666-4412-ae30-7a3f47a2c01e" CreationDate="2010-11-04T03:53:57.070" UserId="3032" Text="&lt;game-design&gt;" />
  <row Id="10266" PostHistoryTypeId="2" PostId="5183" RevisionGUID="b4061a58-976d-4db7-8fcd-a4c5865a5e1d" CreationDate="2010-11-04T04:48:13.027" UserId="1251" Text="&gt; The only notable game programming I&#xD;&#xA;&gt; can say I have done was a little&#xD;&#xA;&gt; puzzle-ish game for the NES written in&#xD;&#xA;&gt; 6502 assembly so that doesn't exactly&#xD;&#xA;&gt; count for much.&#xD;&#xA;&#xD;&#xA;Don't say so, if you had had to make one game, then you know &quot;how&quot; game programming is different from conventional programming. And i guess, it might be the reason you want to make more. Cheers!!&#xD;&#xA;In my opinion nobody was born as a game programmer, everybody started with some application programming language like c, c++ or java.And I feel becoming a game programmer is like getting a promotion from your current designation called programmer.  So if you know these languages thoroughly , you can make a great start by first learning the distinctions of a Game versus an Application.&#xD;&#xA;&#xD;&#xA;[You should read this][1], it is a really good fundamental guide page. [And this is one page i just completely adore.][2]It provides you with the inspiration and tells you to start with what.&#xD;&#xA;Best Wishes&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/start_here/&#xD;&#xA;  [2]: http://www.gamedev.net/reference/design/features/makegames/" />
  <row Id="10268" PostHistoryTypeId="2" PostId="5184" RevisionGUID="0f3e059e-dee1-43b2-8fde-aec8e2a44537" CreationDate="2010-11-04T07:31:49.363" UserId="20" Text="Personally, I'd build the map using a designated tile-editor like [TileEd][1]. This approach yields several benefits:&#xD;&#xA;&#xD;&#xA; - Uses less resources. You just have to load a tile-sheet and data-file with indexes to build a potentially endless map.&#xD;&#xA; - Since you'll have your map divided into really small chunks (depending on your tile-size), you can easily add/remove rows/columns while the character is moving through the world. &#xD;&#xA; - Having a data-file that describes your map also allows you to add terrain-information easily. This allows for different tile-types like walls or lakes (i.e. obstacles) or a swamp where movement of the character could be slowed down...&#xD;&#xA; - Last but not least, a tile-based map is also much easier to edit and tweak later on because you can always fire up the editor, change some things and save a new data-file.&#xD;&#xA;&#xD;&#xA;I suggest you avoid loading bits of the map during gameplay to prevent lag. As mentioned previously, this should not be necessary as you'll probably be able to keep the tile-sheet in memory. When the character enters another part of the &quot;world&quot; you could swap the tile-sheet with a different one (eg. snow-tiles replaced with desert-tiles).&#xD;&#xA;&#xD;&#xA;[Blitting][2] the tiles to screen is probably the fastest way to render your map. I don't know SFML, but from the docs on their site you should be looking into the `Sprite` class or use the `Copy` function of the `Image` class.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/&#xD;&#xA;  [2]: http://www.toymaker.info/Games/html/blitting.html" />
  <row Id="10270" PostHistoryTypeId="5" PostId="5184" RevisionGUID="0a81858f-17db-41b5-ae98-b362871046fb" CreationDate="2010-11-04T08:05:44.043" UserId="20" Comment="added some more information" Text="Personally, I'd build the map using a designated tile-editor like [TileEd][1]. This approach yields several benefits:&#xD;&#xA;&#xD;&#xA; - Uses less resources. You just have to load a tile-sheet and data-file with indexes to build a potentially endless map.&#xD;&#xA; - Since you'll have your map divided into really small chunks (depending on your tile-size), you can easily add/remove rows/columns while the character is moving through the world. &#xD;&#xA; - Having a data-file that describes your map also allows you to add terrain-information easily. This allows for different tile-types like walls or lakes (i.e. obstacles) or a swamp where movement of the character could be slowed down...&#xD;&#xA; - Last but not least, a tile-based map is also much easier to edit and tweak later on because you can always fire up the editor, change some things and save a new data-file.&#xD;&#xA;&#xD;&#xA;I suggest you avoid loading bits of the map during gameplay to prevent lag. As mentioned previously, this should not be necessary as you'll probably be able to keep the tile-sheet in memory. When the character enters another part of the &quot;world&quot; you could swap the tile-sheet with a different one (eg. snow-tiles replaced with desert-tiles).&#xD;&#xA;&#xD;&#xA;[Blitting][2] the tiles to screen is probably the fastest way to render your map. I don't know SFML, but from the docs on their site you should be looking into the `Sprite` class or use the `Copy` function of the `Image` class.&#xD;&#xA;&#xD;&#xA;**Update:** I just read some of the SFML docs and you should definitely use `Drawable` or `Sprite` instead of manipulating images for the sake of performance. Apparently there's a [Tiled SFML loader][3] out there. That's probably a good way to get something up and running fast.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/&#xD;&#xA;  [2]: http://www.toymaker.info/Games/html/blitting.html&#xD;&#xA;  [3]: http://sourceforge.net/projects/tiledsfmlloader/" />
  <row Id="10271" PostHistoryTypeId="2" PostId="5186" RevisionGUID="3c4ab671-da48-4dbc-8b22-f1c89e3bf2eb" CreationDate="2010-11-04T08:37:11.567" UserId="2710" Text="First off, estimate your map size. Don't just assume that a &quot;big world&quot; is not going to fit in memory. Nowadays, a map taking upwards of 10 mb in memory is absolutely acceptable, and you can stuff a LOT in 10 mb in a simple tile-based 2D world.&#xD;&#xA;&#xD;&#xA;If you have a *really* large world, the most robust solution is indeed use map chunks. Split your world into fixed-size chunks (say, 64x64). Load chunks on-the-fly as player moves around, keeping at least one chunk loaded in all directions (i.e. load the chunk the player is in and all its neighbors).&#xD;&#xA;&#xD;&#xA;As for unloading chunks, you can choose between several strategies. Eagerly unloading means you unload and save to disk all chunks the moment player moves sufficiently far away; but you can also delay unloading to improve performance (saving chunk, as any disk access, is a costly operation)." />
  <row Id="10272" PostHistoryTypeId="2" PostId="5187" RevisionGUID="15c6943e-c029-4888-a660-9fef9acdc78d" CreationDate="2010-11-04T08:55:29.007" UserId="3015" Text="**TL;DR:** How do you design a ruleset for a Civ-style TBS game that prevents city smallpox from being a profitable or viable strategy?&#xD;&#xA;&#xD;&#xA;**Long version:** Civ-style games are pretty great. Bringing a civilization from cradle to grave is a great endeavor, and practicing diplomacy with hard-line human players is fun and challenging. *In theory.*&#xD;&#xA;&#xD;&#xA;*In practice*, however, many of these games has, especially in multiplayer, exactly one viable strategy: City smallpox, a.k.a. infinite city spread, a.k.a. covering all available space with 1-citizen cities, packed as tight as they will go. I suppose this could count as emergent gameplay, but still; it could hardly be considered to be in the spirit of the class of game.&#xD;&#xA;&#xD;&#xA;The Civilization series, of course, is stuck in their more or less fixed rule sets, established with Civilization. Yes, there have been major changes in some respects, but the rules pertaining to city building and maintenance have stayed pretty similar.&#xD;&#xA;&#xD;&#xA;So the question, then: If you build a ruleset for a TBS from the ground up; what rules should be in place to prevent Infinite City Sprawl from being a viable strategy?&#xD;&#xA;&#xD;&#xA;***Should** ICS be a viable strategy?*" />
  <row Id="10273" PostHistoryTypeId="1" PostId="5187" RevisionGUID="15c6943e-c029-4888-a660-9fef9acdc78d" CreationDate="2010-11-04T08:55:29.007" UserId="3015" Text="Designing rules to fight smallpox in Civ-style TBS games" />
  <row Id="10274" PostHistoryTypeId="3" PostId="5187" RevisionGUID="15c6943e-c029-4888-a660-9fef9acdc78d" CreationDate="2010-11-04T08:55:29.007" UserId="3015" Text="&lt;game-mechanics&gt;&lt;turn-based&gt;" />
  <row Id="10275" PostHistoryTypeId="2" PostId="5188" RevisionGUID="81fb2f03-69da-4dbd-bcf9-c5ba1a59a759" CreationDate="2010-11-04T09:14:52.590" UserId="678" Text="ICS could be a viable strategy, but the problem is that&#xD;&#xA;&#xD;&#xA; 1. It is usually much much much more powerful than non-ICS. This gives the player no choice as the challenges become larger.&#xD;&#xA; 1. It places an unusual strain on the player because he needs to manage 10-20 times as many cities as in a non-ICS scenario.&#xD;&#xA;&#xD;&#xA;You can try and combat ICS the &quot;civilization way&quot;, with the stick. I do not think this has worked particularly well so far, but these are the popular measures.&#xD;&#xA;&#xD;&#xA; - Efficiency. More cities means more lost revenue.&#xD;&#xA; - Unhappiness. For every city you add more people become unhappy.&#xD;&#xA; - Wonders that require you to build building X in every city.&#xD;&#xA;&#xD;&#xA;I think it's better to tackle the root causes that encourage ICS in the first place. The main reason for ICS is that many essential resources are city-based. You have one build-queue per city for units. You can only have one of a certain building (and associated bonusses) per city. Resources needed for city growth scale super-linearly, it takes more food to get from 10 to 11 than to get 4 cities from 1 to 2. &#xD;&#xA;&#xD;&#xA;I think that the real solution for eliminate ICS to eliminate these special properties of cities. De-couple build-queues and cities (let them build &quot;workshops&quot; directly on the map as improvements?), allow multiple buildings of the same kind in a city (but not more than 1 per square?) etc. With these mechanics in place, the user does not need to ICS. The reason to found another city is dictated more by strategy and geography (as it should!) than resource min-maxing.&#xD;&#xA;&#xD;&#xA;Another (better?) option is to get rid of cities all-together and just have squares that can be improved, yield resources and can populated (perhaps as an additional resource). But this requires re-engineering pretty much the entire genre.&#xD;&#xA;&#xD;&#xA;Whatever you do, DO NOT add mechanics that actively encourage ICS by giving away free resources/buildings to every city. See &quot;The Cloudbase Academy&quot; for Alien Crossfire as a way to completely wreck any non-ICS strategy. This wonder basically allows empty cities to grow and thrive using only resources from the player's civ-wide satellite constellation. " />
  <row Id="10276" PostHistoryTypeId="5" PostId="5188" RevisionGUID="5ec3462d-a377-403e-a9fb-16ee6abf1997" CreationDate="2010-11-04T09:24:08.287" UserId="678" Comment="added 5 characters in body" Text="ICS could be a viable strategy, but the problem is that&#xD;&#xA;&#xD;&#xA; 1. It is usually much much much more powerful than non-ICS. This gives the player no choice as the challenges become larger.&#xD;&#xA; 1. It places an unusual strain on the player because he needs to manage 10-20 times as many cities as in a non-ICS scenario.&#xD;&#xA;&#xD;&#xA;You can try and combat ICS the &quot;civilization way&quot;, with the stick. I do not think this has worked particularly well so far, but these are the popular measures.&#xD;&#xA;&#xD;&#xA; - Efficiency. More cities means more lost revenue.&#xD;&#xA; - Unhappiness. For every city you add more people become unhappy.&#xD;&#xA; - Wonders that require you to build building X in every city.&#xD;&#xA;&#xD;&#xA;I think it's better to tackle the root causes that encourage ICS in the first place.&#xD;&#xA;&#xD;&#xA;The main reason for ICS is that many essential resources are city-based. You have one build-queue per city for units. You can only have one of a certain building (and associated bonusses) per city. Resources needed for city growth scale super-linearly, it takes more food to get from 10 to 11 than to get 4 cities from 1 to 2. &#xD;&#xA;&#xD;&#xA;I think that the real solution to eliminate ICS is to eliminate these special properties of cities. De-couple build-queues and cities (let them build &quot;workshops&quot; directly on the map as improvements?), allow multiple buildings of the same kind in a city (but not more than 1 per square?) etc. With these mechanics in place, the user does not need to ICS. The reason to found another city is dictated more by strategy and geography (as it should!) than resource min-maxing.&#xD;&#xA;&#xD;&#xA;Another (better?) option is to get rid of cities all-together and just have squares that can be improved, yield resources and can populated (perhaps as an additional resource). But this requires re-engineering pretty much the entire genre.&#xD;&#xA;&#xD;&#xA;Whatever you do, DO NOT add mechanics that actively encourage ICS by giving away free resources/buildings to every city. See &quot;The Cloudbase Academy&quot; for Alien Crossfire as a way to completely wreck any non-ICS strategy. This wonder basically allows empty cities to grow and thrive using only resources from the player's civ-wide satellite constellation. " />
  <row Id="10277" PostHistoryTypeId="2" PostId="5189" RevisionGUID="5a8acae0-ec8f-4340-9afd-973de57ba93f" CreationDate="2010-11-04T10:06:31.350" UserId="2710" Text="The root of the problem is basically a positive feedback loop. Each city gives resources, more resources allow for more cities, that give yet more resources, ad nauseum.&#xD;&#xA;&#xD;&#xA;To solve it, the feedback loop must be broken^ that is, cities should *stop* giving resources after a while. (Or not give them in the first place.. but that kinda defeats the purpose). &#xD;&#xA;&#xD;&#xA;Civ IV tried to break the loop by increasing maintenance exponentially with number of cities, and it worked to an extent. I haven't played Civ V yet, but from what I heard they deal with ICS in t better than in IV.&#xD;&#xA;&#xD;&#xA;Instead of simply increasing maintenance, you can try to break the loop by making small cities progressively less effective (i.e. the more/larger cities you have, the less resources you obtain from a new small city).&#xD;&#xA;&#xD;&#xA;Another way to approach this is to keep ICS as a viable strategy, but add another loop, where few large cities give about the same amount of resources as a lot of small ones. However, this is really hard to balance, because even a slight shift in balance will grow exponentially during the course of the game." />
  <row Id="10278" PostHistoryTypeId="2" PostId="5190" RevisionGUID="95095c93-15b0-457d-81fc-89c415d38c76" CreationDate="2010-11-04T10:34:12.783" UserId="678" Text="Since this is a hobby project, pick something you **want to do**. If you are motivated, it will be easier to pick up the skill you will need.&#xD;&#xA;&#xD;&#xA;Beware of projects that require **a lot of art and content**. Things like adventure games etc. consist for a disproportionate amount of artwork and level design. Especially for a developer starting out, these can be the kiss of burn-out death.&#xD;&#xA;&#xD;&#xA;Pick something with a **defined scope** and **measurable goals** in between. The sense of accomplishment you get from finishing every little milestone along the way will go a long way in keeping you motivated throughout the project and into the next.&#xD;&#xA;&#xD;&#xA;For me, this advice led to re-creating a 3D version of a popular 1980s game. But your interests are different, so you will most likely end up somewhere else ;)" />
  <row Id="10279" PostHistoryTypeId="5" PostId="5190" RevisionGUID="3249bf9e-0bbf-434d-a993-a94d889d1828" CreationDate="2010-11-04T10:43:20.733" UserId="678" Comment="added 277 characters in body" Text="Since this is a hobby project, pick something you **want to do**. If you are motivated, it will be easier to pick up the skill you will need.&#xD;&#xA;&#xD;&#xA;Beware of projects that require **a lot of art and content**. Things like adventure games etc. consist for a disproportionate amount of artwork and level design. Especially for a developer starting out, these can be the kiss of burn-out death.&#xD;&#xA;&#xD;&#xA;Pick something with a **defined scope** and **measurable goals** in between. The sense of accomplishment you get from finishing every little milestone along the way will go a long way in keeping you motivated throughout the project and into the next.&#xD;&#xA;&#xD;&#xA;For me, this advice led to re-creating a 3D version of a popular 1980s game. But your interests are different, so you will most likely end up somewhere else.&#xD;&#xA;&#xD;&#xA;I would say, think about it for a while and come up with the simplest possible project that you still find compelling. If you need assistance figuring out what technology/platforms to use to make it, just post another question. We love arguing about technology around here ;)" />
  <row Id="10280" PostHistoryTypeId="2" PostId="5191" RevisionGUID="6aaa18b7-63a5-43d9-8919-e94b9821b58e" CreationDate="2010-11-04T11:01:26.720" UserId="2494" Text="As other told you, my advice is to start from something simple. For example a 2d scroll based game, maybe using pre-done art found with Google Images, or OpenGameArt.org. &#xD;&#xA;Use a framework/library. **XNA** for Windows or **SDL** for cross platform development.&#xD;&#xA;Look also at **SDL.NET** if you want to do your game in managed **C#**." />
  <row Id="10281" PostHistoryTypeId="2" PostId="5192" RevisionGUID="f4b6e6be-4f77-477b-a586-1fb85a04fbed" CreationDate="2010-11-04T11:10:13.480" UserId="364" Text="What are the features and language objectives (general problems to solves) or paradigms that a fictive programming language targetted at games (any kind of game) would require?&#xD;&#xA;&#xD;&#xA;For example, obviously we would have at least Performance (in speed and memory) (because a lot of games simply require that), but it have a price in the languages we currently use.&#xD;&#xA;Expressivity might be a common feature that is required for all languages.&#xD;&#xA;&#xD;&#xA;I guess some concepts from not-usually-used-for-games paradigms, like actor-based languages, or language-based message passing, might be useful too. So I ask you what would be ideal for games.&#xD;&#xA;&#xD;&#xA;(maybe one day someone will take those answers and build a language over it? :D )&#xD;&#xA;&#xD;&#xA;Please set 1 feature/objective/paradigm per answer.&#xD;&#xA;&#xD;&#xA;Note: maybe that question don't make sense to you. In this case please explain why in an answer. It's a good thing to have answers to this question that might pop in your head sometimes." />
  <row Id="10282" PostHistoryTypeId="1" PostId="5192" RevisionGUID="f4b6e6be-4f77-477b-a586-1fb85a04fbed" CreationDate="2010-11-04T11:10:13.480" UserId="364" Text="Game-oriented programming language features/objectives/paradigm?" />
  <row Id="10283" PostHistoryTypeId="3" PostId="5192" RevisionGUID="f4b6e6be-4f77-477b-a586-1fb85a04fbed" CreationDate="2010-11-04T11:10:13.480" UserId="364" Text="&lt;programming&gt;&lt;language-agnostic&gt;" />
  <row Id="10284" PostHistoryTypeId="5" PostId="5156" RevisionGUID="cf9973e9-80a6-4a88-8888-6f7f7161427b" CreationDate="2010-11-04T12:04:53.613" UserId="2316" Comment="added comments on damage, and role-playing.; added 168 characters in body" Text="I'm developing an RPG [(goodness, I'm doing a lot actually.)](http://www.strongfortress.com) and I'm trying to come up with a decent die roll mechanic for skills.&#xD;&#xA;&#xD;&#xA;In d20 systems, it's usually&#xD;&#xA;&#xD;&#xA;    Die Roll + Skill + Bonuses - Penalties &gt;= Some Target Number&#xD;&#xA;&#xD;&#xA;For Many Warhammer (old) systems, you:&#xD;&#xA;&#xD;&#xA;    compare skill vs. skill on chart, Die Roll &gt;= # given on chart.&#xD;&#xA;&#xD;&#xA;For the HERO system, it's generally:&#xD;&#xA;&#xD;&#xA;    Roll 3D6 &lt;= Skill + Bonuses - Penalties&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;But for each of these systems, they use a different die mechanic to determine the outcome  of the action.  D20 is notorious for using D8s, D10s, [D12s](http://www.giantitp.com/forums/showthread.php?t=66433), etc.  Which you total up, and deal to someone else.  That other person is then *fine* until they drop to 0hp.  (other games are similarly designed, HERO for example using Body, STUN, and END).&#xD;&#xA;&#xD;&#xA;Are there games that discard a second mechanic for action resolution as well as success?&#xD;&#xA;&#xD;&#xA;For example, I'm thinking of using a black-jack mechanic.&#xD;&#xA;&#xD;&#xA;    Die Roll &lt;= Skill + Attributes + Bonuses - Penalties&#xD;&#xA;&#xD;&#xA;to determine if an attacker hits an opponent, and then that opponent must &quot;resist&quot; the damage caused by the attack, using a very similar roll.  This is used on the table-top Warhammer games (Roll to-hit, Break Toughness, Armor Saves).  &#xD;&#xA;&#xD;&#xA;Damage is measured in penalties instead of in numbers.  (ex. if a combatant failed 2 resists in combat, he'd suffer a -2 penalty for all other skill rolls).  The penalties being easy to see/keep track of using counters etc.  &#xD;&#xA;&#xD;&#xA; - What pitfalls am I missing? &#xD;&#xA; - What games use a mechanic similar to this?&#xD;&#xA; - What other mechanics should I be concerned about?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[EDIT] Thanks for all the answers.  These are really great.&#xD;&#xA;&#xD;&#xA;**Damage and Death**&#xD;&#xA;&#xD;&#xA;So the game has two types of damage, Injury and Wounds.&#xD;&#xA;&#xD;&#xA;Each Injury (IJY) over the Injury Threshold (IJT) gives the player a -1 penalty.  If the number of IJY exceed the Injury Limit (IJL), they are converted wounds instead.&#xD;&#xA;&#xD;&#xA;Each Wound (WND) over the Wound Threshold (WDT) gives the player a -4 penalty.  If the number of wounds exceed the Wound Limit (WDL), they go into a coma and begin to die.&#xD;&#xA;&#xD;&#xA;So for the complete n00b, the numbers would look something like this:&#xD;&#xA;&#xD;&#xA; - Injury Threshold 3&#xD;&#xA; - Injury Limit 6&#xD;&#xA; - Wound Threshold 0&#xD;&#xA; - Wound Limit 3&#xD;&#xA;&#xD;&#xA;A mid-level cyborg might look something like this:&#xD;&#xA;&#xD;&#xA; - Injury Threshold 6&#xD;&#xA; - Injury Limit 12&#xD;&#xA; - Wound threshold 2&#xD;&#xA; - Wound Limit 6&#xD;&#xA;&#xD;&#xA;Able to take far more damage, and shrug off the first few strikes in combat.&#xD;&#xA;&#xD;&#xA;Healing will also be non-random, and if a character uses a healing item - there's no roll or chance involved.  They gain the benefit, and can go on with their life.&#xD;&#xA;&#xD;&#xA;**Enemies**&#xD;&#xA;&#xD;&#xA;I like very much the mechanics in Feng Shui and in DnD 4E in regards to Minions, Monsters, and Villains.  I intend for Minions to have Wound Limits of 0. (one-hit kills) while Villains would be large, hard-to-take-down mosters where tactics and cover will be your best friends.&#xD;&#xA;&#xD;&#xA;**Role-Playing Mechanics**&#xD;&#xA;&#xD;&#xA;Similar to [HEX][1], players can spend &quot;points&quot; the earn during roleplaying to negate bad rolls, or improve good successes.  Players are not just at the whim of their dice, but can use other resources like points tactically.&#xD;&#xA;&#xD;&#xA;And yes, this is intended as a table-top turn-based game.  &#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.exilegames.com/games/hex.html" />
  <row Id="10285" PostHistoryTypeId="2" PostId="5193" RevisionGUID="f5ab02cd-5f8a-439a-b398-f8f5404e5a25" CreationDate="2010-11-04T12:05:39.337" UserId="2968" Text="It's not unrealistic to have lots of little cities, but civilization games are supposed to be about the major cities.  So it seems the best way to combat ICS is to strongly encourage larger cities.  Ways to do that might include&#xD;&#xA;&#xD;&#xA;- As mentioned above, make a single city with 4 population give significantly more resources than 4 cities with 1 population (Civ generally has the opposite becuase of the free resources from the city tile)&#xD;&#xA;- Make buildings have minimum populations that are required to build.  You can't man a factory in a rural town.&#xD;&#xA;- Make small cities a liability in conflicts.  They aren't very defensible, and maybe there is a strong penalty for losing a city.  OR maybe small cities can be annexed by nearby larger cities, with the population and buildings being added to the larger city.&#xD;&#xA;&#xD;&#xA;Basically, try to imagine a country where no town had more than 5,000 people, and think what that country would be missing versus countries with major metropolises." />
  <row Id="10286" PostHistoryTypeId="2" PostId="5194" RevisionGUID="7e6d70d2-e1b0-48de-bf1f-c82c5f205002" CreationDate="2010-11-04T12:17:24.223" UserId="2316" Text="The entire concept of programming language fits right in with modeling games.&#xD;&#xA;&#xD;&#xA;    class D20PC&#xD;&#xA;    {&#xD;&#xA;       int level&#xD;&#xA;       string charname&#xD;&#xA;       string playername&#xD;&#xA;       EnumClassName mainclass&#xD;&#xA;       EnumClassName multiclass&#xD;&#xA;       CBackpack *inventory&#xD;&#xA;       Array *feats&#xD;&#xA;       CSkillList *skills&#xD;&#xA;       Image *charPortrait&#xD;&#xA;       int Strength&#xD;&#xA;       int Dexterity&#xD;&#xA;       etc...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It all just flows naturally.  I mean if you wanted to build a library where you import game rules and the language builds class templates for you... but other than that I don't think there's anything specific about one language feature or another that's more important than the rest.&#xD;&#xA;&#xD;&#xA;Obviously, being Object-Oriented is good.  Having access to Databases is good too, but outside of that, any OO language would work.  I've done games in C#, C++, Objective-C, and Java, and I don't find that they really lack anything.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[EDIT]&#xD;&#xA;&#xD;&#xA;And IMO, LISP would be a horrible choice for programming an RPG game engine.  I just have no idea how it would be done.&#xD;&#xA;" />
  <row Id="10287" PostHistoryTypeId="2" PostId="5195" RevisionGUID="1f92d788-acf2-488e-93ab-c684599888bd" CreationDate="2010-11-04T12:29:01.853" UserId="2316" Text="Make resource production proportional to the number of civilians in that city, up to a point.&#xD;&#xA;&#xD;&#xA;Obviously, real cities work this way, and the number of civilians that a city can support should increase with advances in technology and medicine.&#xD;&#xA;&#xD;&#xA;More workers = more resources. `if (#W &lt; CivLimit) +1W = +1R - 0.1R*W` (upkeep of pop)&#xD;&#xA;&#xD;&#xA;Too many workers = drain on resources. `if (#W &gt; CivLimit) +1W = +1R - 0.5R*W` (upkeep of pop)&#xD;&#xA;&#xD;&#xA;And if you really want to get fancy, migratory workers usually add less upkeep to a civ than a natural born citizen does (no flames, please!) and work for lower rates.  Have implement natural migration where if the `#W &gt; CivLimit` then workers migrate to locations where the ration of `W:R` is better.&#xD;&#xA;&#xD;&#xA;Caveat: Never played Civ (shame, I know!) but those are just my thoughts." />
  <row Id="10288" PostHistoryTypeId="2" PostId="5196" RevisionGUID="70e98dc6-9bad-4f21-9570-ed665e59ec38" CreationDate="2010-11-04T12:35:24.810" UserId="2316" Text="Unless you're planing on re-building ultima-online (Fallout 3, or Oblivion), there's no reason the world needs to be seamless.  Baldur's Gate and Icewind Dale are two games that come to mind that implement effective maps that do not detract from gameplay.&#xD;&#xA;&#xD;&#xA;Granted, you've got a lot more computing horsepower than they did so loading screens should be minimal, but even Fallout and Oblivion have loading screens for some things." />
  <row Id="10290" PostHistoryTypeId="6" PostId="5187" RevisionGUID="4d16f950-bf9e-4709-91b8-a8db76034f3d" CreationDate="2010-11-04T12:45:45.530" UserId="3015" Comment="retag" Text="&lt;game-mechanics&gt;&lt;turn-based-strategy&gt;" />
  <row Id="10291" PostHistoryTypeId="6" PostId="5155" RevisionGUID="0806bb88-1136-4888-be71-b53b63dab287" CreationDate="2010-11-04T12:46:21.597" UserId="3015" Comment="retag" Text="&lt;tiles&gt;&lt;game-mechanics&gt;&lt;topography&gt;" />
  <row Id="10292" PostHistoryTypeId="5" PostId="5196" RevisionGUID="2d306ecf-7a5f-4fb9-aa8a-0cfdb13f1742" CreationDate="2010-11-04T12:46:24.967" UserId="2316" Comment="added 697 characters in body" Text="Unless you're planing on re-building ultima-online (Fallout 3, or Oblivion), there's no reason the world needs to be seamless.  Baldur's Gate and Icewind Dale are two games that come to mind that implement effective maps that do not detract from gameplay.&#xD;&#xA;&#xD;&#xA;Granted, you've got a lot more computing horsepower than they did so loading screens should be minimal, but even Fallout and Oblivion have loading screens for some things.&#xD;&#xA;&#xD;&#xA;All I can tell you is that for me, I'm writing a small Obj-C lib for the iPhone that takes a 32x32 tileset and draws it into an NSImage.  I get about 10fps this way, and I probably should be using OpenGL, but I only need to re-draw if the character moves out of the rect.&#xD;&#xA;&#xD;&#xA;You should split the map up into 9 screen-sizes (for me it's 960x640 blocks) so if the character moves out of the center block, I re-draw the 9-screens into a large image (about 1.2MB - gives a lot of room under the 20MB limit on iPhone 3G).  That happens fairly slowly (much slower than 10fps) so the re-drawing is not noticeable during play.&#xD;&#xA;&#xD;&#xA;I'll likely move to OpenGL ES at some point, but for now it works fine." />
  <row Id="10293" PostHistoryTypeId="2" PostId="5197" RevisionGUID="3854d4ab-16f2-4e69-8058-aedc0b12f42a" CreationDate="2010-11-04T13:09:13.143" UserId="2316" Text="Use a Tiling Algorithm.  Unless each pixel of your 36MB map is unique, you can break your map up into tiles.  See the [RPGMaker](http://www.rpgmakerweb.com/) to get a feel for how it's done.&#xD;&#xA;&#xD;&#xA;Then, you'll just need several small images, and a grid describing the map in 32x32 chunks.  During a frameDraw, just draw the portion of the grid relating to what the screen around the character shows.  It keeps memory down, and performance up." />
  <row Id="10294" PostHistoryTypeId="2" PostId="5198" RevisionGUID="d9d346d3-4628-41ec-87a4-4b7f4dfc1919" CreationDate="2010-11-04T13:29:39.983" UserId="953" Text="You can add value to empty space.  Perhaps give cities a bonus depending on how close they are to an unclaimed &quot;countryside&quot; space, to represent folks' desire for nature or their needs for agriculture.  Or maybe allow population to be assigned to some sort of non-city entity that offers a bonus too good to be turned down." />
  <row Id="10295" PostHistoryTypeId="2" PostId="5199" RevisionGUID="07f43088-d533-49bb-85ff-6bcdc48071bb" CreationDate="2010-11-04T14:38:32.580" UserId="3015" Text="What angles and long-side:short-side ratios give the most aesthetically pleasing and graphically regular isometric (squashed, flat side up) hexes; that additionally resolve to whole pixel sizes for several sizes when rendered?" />
  <row Id="10296" PostHistoryTypeId="1" PostId="5199" RevisionGUID="07f43088-d533-49bb-85ff-6bcdc48071bb" CreationDate="2010-11-04T14:38:32.580" UserId="3015" Text="Pleasing isometric hexagons" />
  <row Id="10297" PostHistoryTypeId="3" PostId="5199" RevisionGUID="07f43088-d533-49bb-85ff-6bcdc48071bb" CreationDate="2010-11-04T14:38:32.580" UserId="3015" Text="&lt;game-design&gt;&lt;graphics&gt;&lt;tiles&gt;&lt;subjective&gt;" />
  <row Id="10298" PostHistoryTypeId="5" PostId="5193" RevisionGUID="b3cf7cc8-6921-4712-999d-66d21cadabb1" CreationDate="2010-11-04T14:45:38.323" UserId="2968" Comment="Adding more ideas; added 7 characters in body" Text="It's not unrealistic to have lots of little cities, but civilization games are supposed to be about the major cities.  So it seems the best way to combat ICS is to strongly encourage larger cities.  Ways to do that might include&#xD;&#xA;&#xD;&#xA;- As mentioned above, make a single city with 4 population give significantly more resources than 4 cities with 1 population (Civ generally has the opposite becuase of the free resources from the city tile)&#xD;&#xA;- Make buildings have minimum populations that are required to build.  You can't man a factory in a rural town.&#xD;&#xA;- Make buildings have effects that scale with population.  A colosseum isn't going to have much effect unless it is in a big city.  &#xD;&#xA;- Make small cities a liability in conflicts.  They aren't very defensible, and maybe there is a strong penalty for losing a city.  Or maybe small cities can be annexed by nearby larger cities, with the population and buildings being added to the larger city.&#xD;&#xA;- Give empire-wide bonuses based on the number of &quot;large&quot; cities you have, or give bonuses to the player with the largest city.  &#xD;&#xA;&#xD;&#xA;Basically, try to imagine a country where no town had more than 5,000 people, and think what that country would be missing versus countries with major metropolises." />
  <row Id="10299" PostHistoryTypeId="5" PostId="5195" RevisionGUID="8505fb17-fff5-42c1-851a-4485edf0c811" CreationDate="2010-11-04T15:13:12.523" UserId="2316" Comment="added 57 characters in body" Text="Make resource production proportional to the number of civilians in that city, up to a point.&#xD;&#xA;&#xD;&#xA;Obviously, real cities work this way, and the number of civilians that a city can support should increase with advances in technology and medicine.&#xD;&#xA;&#xD;&#xA;few workers = less resources `if (#W &lt; CivMin) +1W = +0.75R - 0.1R*W`(upkeep of pop)&#xD;&#xA;&#xD;&#xA;More workers = more resources. `if (#W &lt; CivLimit) +1W = +1R - 0.1R*W` &#xD;&#xA;&#xD;&#xA;Too many workers = drain on resources. `if (#W &gt; CivLimit) +1W = +1R - 0.5R*W`&#xD;&#xA;&#xD;&#xA;And if you really want to get fancy, migratory workers usually add less upkeep to a civ than a natural born citizen does (no flames, please!) and work for lower rates.  Have implement natural migration where if the `#W &gt; CivLimit` then workers migrate to locations where the ration of `W:R` is better.&#xD;&#xA;&#xD;&#xA;Caveat: Never played Civ (shame, I know!) but those are just my thoughts." />
  <row Id="10300" PostHistoryTypeId="5" PostId="5187" RevisionGUID="e9092cb7-83ba-4dce-99c0-eb4800cdeccf" CreationDate="2010-11-04T15:34:16.100" UserId="3015" Comment="clarfied intent of last paragraph" Text="**TL;DR:** How do you design a ruleset for a Civ-style TBS game that prevents city smallpox from being a profitable or viable strategy?&#xD;&#xA;&#xD;&#xA;**Long version:** Civ-style games are pretty great. Bringing a civilization from cradle to grave is a great endeavor, and practicing diplomacy with hard-line human players is fun and challenging. *In theory.*&#xD;&#xA;&#xD;&#xA;*In practice*, however, many of these games has, especially in multiplayer, exactly one viable strategy: City smallpox, a.k.a. infinite city spread, a.k.a. covering all available space with 1-citizen cities, packed as tight as they will go. I suppose this could count as emergent gameplay, but still; it could hardly be considered to be in the spirit of the class of game.&#xD;&#xA;&#xD;&#xA;The Civilization series, of course, is stuck in their more or less fixed rule sets, established with Civilization. Yes, there have been major changes in some respects, but the rules pertaining to city building and maintenance have stayed pretty similar.&#xD;&#xA;&#xD;&#xA;So the question, then: If you build a ruleset for a TBS from the ground up; what rules should be in place to prevent Infinite City Sprawl from being a viable strategy?&#xD;&#xA;&#xD;&#xA;Or *should* ICS be a viable strategy?" />
  <row Id="10301" PostHistoryTypeId="5" PostId="5195" RevisionGUID="24ac0bd7-a2e5-4370-8738-a34f3a5616b1" CreationDate="2010-11-04T15:50:04.037" UserId="2316" Comment="added 134 characters in body" Text="Real cities don't work a linear fashion, it's more gaussian.  The number of civilians that a city can support should increase with advances in technology and medicine (and thus the amount of resources output).  But cities also need some kind of minimal population, which also increases with technology.  (you need XW to run the bio-chem plant, but only YW workers for the farm).&#xD;&#xA;&#xD;&#xA;few workers = less resources `if (#W &lt; CivMin) +1W = +0.75R - 0.1R*W`(upkeep of pop)&#xD;&#xA;&#xD;&#xA;More workers = more resources. `if (#W &lt; CivLimit) +1W = +1R - 0.1R*W` &#xD;&#xA;&#xD;&#xA;Too many workers = drain on resources. `if (#W &gt; CivLimit) +1W = +1R - 0.5R*W`&#xD;&#xA;&#xD;&#xA;And if you really want to get fancy, migratory workers usually add less upkeep to a civ than a natural born citizen does (no flames, please!) and work for lower rates.  Have implement natural migration where if the `#W &gt; CivLimit` then workers migrate to locations where the ration of `W:R` is better.&#xD;&#xA;&#xD;&#xA;Caveat: Never played Civ (shame, I know!) but those are just my thoughts." />
  <row Id="10302" PostHistoryTypeId="2" PostId="5200" RevisionGUID="62618086-066f-4c23-9cef-640f6d428186" CreationDate="2010-11-04T15:55:11.297" UserId="136" Text="By &quot;flat side up&quot;, I assume you mean &quot;flat side horizontal&quot; (as &quot;up&quot; could mean either the edge itself points up or it &quot;faces&quot; up, i.e. its normal points up).&#xD;&#xA;&#xD;&#xA;I experimented with both orientations for a game I developed in college.  Personally, I found [&quot;flat side vertical&quot;][1] hexagons more pleasing on the eyes, but I could certainly be in the minority.  I know that most of the online resources I found regarding hex grids used the &quot;flat side horizontal&quot; orientation, and thus I had to adjust many of the equations I came across.&#xD;&#xA;&#xD;&#xA;I used a resolution-independent UI framework that performed device pixel snapping automatically, and thus I did not spend much time tweaking the angles and ratios.  I believe my bounding box ended up being 96 device independent pixels along each edge (96 device pixels on a standard 96dpi display with scale = 1.0).  You should be able to derive the rest from the screenshot :).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://startreksupremacy.com/blog/galactic_supremacy.jpg" />
  <row Id="10303" PostHistoryTypeId="5" PostId="5200" RevisionGUID="2b76d93d-9878-4cbe-b959-0caea18eaffc" CreationDate="2010-11-04T16:01:24.893" UserId="136" Comment="added 74 characters in body; added 85 characters in body" Text="By &quot;flat side up&quot;, I assume you mean &quot;flat side horizontal&quot; (as &quot;up&quot; could mean either the edge itself points up or it &quot;faces&quot; up, i.e. its normal points up).&#xD;&#xA;&#xD;&#xA;I experimented with both orientations for a game I developed in college.  Personally, I found [&quot;flat side vertical&quot;][1] hexagons more pleasing on the eyes, but I could certainly be in the minority.  I know that most of the [online resources][2] I found regarding hex grids used the &quot;flat side horizontal&quot; orientation, and thus I had to adjust many of the equations I came across ([this site][3] helped).&#xD;&#xA;&#xD;&#xA;I used a resolution-independent UI framework that performed device pixel snapping automatically, and thus I did not spend much time tweaking the angles and ratios.  I believe my bounding box ended up being 96 device independent pixels along each edge (96 device pixels on a standard 96dpi display with scale = 1.0).  You should be able to derive the rest from the screenshot :).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://startreksupremacy.com/blog/galactic_supremacy.jpg&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex&#xD;&#xA;  [3]: http://playtechs.blogspot.com/2007/04/hex-grids.html" />
  <row Id="10304" PostHistoryTypeId="5" PostId="5200" RevisionGUID="84ddb388-af21-44d2-9e28-c64ea9f29e4a" CreationDate="2010-11-04T16:09:14.060" UserId="136" Comment="added 87 characters in body" Text="By &quot;flat side up&quot;, I assume you mean &quot;flat side horizontal&quot; (as &quot;up&quot; could mean either the edge itself points up or it &quot;faces&quot; up, i.e. its normal points up).&#xD;&#xA;&#xD;&#xA;I experimented with both orientations for a game I developed in college.  Personally, I found [&quot;flat side vertical&quot;][1] hexagons more pleasing on the eyes.  I could certainly be in the minority here, but I believe Civilization V uses the same orientation, so I'm definitely not alone.  I know that most of the [online resources][2] I found regarding hex grids used the &quot;flat side horizontal&quot; orientation, and thus I had to adjust many of the equations I came across ([this site][3] helped).&#xD;&#xA;&#xD;&#xA;I used a resolution-independent UI framework that performed device pixel snapping automatically, and thus I did not spend much time tweaking the angles and ratios.  I believe my bounding box ended up being 96 device independent pixels along each edge (96 device pixels on a standard 96dpi display with scale = 1.0).  You should be able to derive the rest from the screenshot :).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://startreksupremacy.com/blog/galactic_supremacy.jpg&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex&#xD;&#xA;  [3]: http://playtechs.blogspot.com/2007/04/hex-grids.html" />
  <row Id="10305" PostHistoryTypeId="16" PostId="5194" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-04T16:14:39.193" UserId="51" />
  <row Id="10306" PostHistoryTypeId="16" PostId="5192" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-04T16:14:39.193" UserId="51" />
  <row Id="10307" PostHistoryTypeId="2" PostId="5201" RevisionGUID="7052f351-48de-48ee-ae50-d6f511d24d73" CreationDate="2010-11-04T16:24:39.490" UserId="51" Text="&#xA;&lt;p&gt;&#xA;    Game Development - Stack Exchange is for &lt;span class=&quot;revision-comment&quot;&gt;professional and amateur video/computer game developers&lt;/span&gt;.&#xA;&lt;/p&gt;&#xA;" />
  <row Id="10308" PostHistoryTypeId="5" PostId="5200" RevisionGUID="e6a857ff-f7cd-43fd-8f3a-37618c2741f1" CreationDate="2010-11-04T16:24:59.633" UserId="136" Comment="added 5 characters in body; added 110 characters in body" Text="By &quot;flat side up&quot;, I assume you mean &quot;flat side horizontal&quot; (as &quot;up&quot; could mean either the edge itself points up or it &quot;faces&quot; up, i.e. its normal points up).&#xD;&#xA;&#xD;&#xA;I experimented with both orientations for a game I developed in college.  Personally, I found [&quot;flat side vertical&quot;][1] hexagons more pleasing on the eyes.  I could certainly be in the minority here, but I believe Civilization V uses the same orientation, so I'm definitely not alone.  If you're not dead set on using one orientation over the other, then I suggest you experiment with both.  Since most of the [online resources][2] I've found regarding hex grids use the &quot;flat side horizontal&quot; orientation, many equations you come across may require adjustments; [this site][3] should help.&#xD;&#xA;&#xD;&#xA;I built my project with a resolution-independent UI framework that performed device pixel snapping automatically, and thus I did not spend much time tweaking the angles and ratios.  I believe my bounding box ended up being 96 device independent pixels along each edge (96 device pixels on a standard 96dpi display with scale = 1.0).  You should be able to derive the rest from the screenshot :).&#xD;&#xA;&#xD;&#xA;  [1]: http://startreksupremacy.com/blog/galactic_supremacy.jpg&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex&#xD;&#xA;  [3]: http://playtechs.blogspot.com/2007/04/hex-grids.html" />
  <row Id="10309" PostHistoryTypeId="2" PostId="5202" RevisionGUID="15a5b60c-8ec4-46a0-ad6b-671c61310a6f" CreationDate="2010-11-04T16:29:08.177" UserId="744" Text="Aaron Reed's &lt;a href=&quot;http://www.amazon.com/Creating-Interactive-Fiction-Inform-7/dp/1435455061&quot;&gt;Creating Interactive Fiction with Inform 7&lt;/a&gt;. Although I'm not nearly a good enough writer (yet?) to do much with &lt;a href=&quot;http://inform7.com/&quot;&gt;Inform 7&lt;/a&gt;, I think the platform is a model for accessibility in programming, and a great environment for game designers with weak programming skills as well as strong programmer/writers.&#xD;&#xA;&#xD;&#xA;Aaron's book is a worked example of a full Inform project, and goes into details on writing styles for interactive fiction as well as the technical details of the Inform language, interpreter, and editor." />
  <row Id="10310" PostHistoryTypeId="5" PostId="5200" RevisionGUID="d900d7c2-d5a0-4c46-ab3d-313d388e228e" CreationDate="2010-11-04T16:44:57.617" UserId="136" Comment="deleted 7 characters in body" Text="By &quot;flat side up&quot;, I assume you mean &quot;flat side horizontal&quot; (as &quot;up&quot; could mean either the edge itself points up or it &quot;faces&quot; up, i.e. its normal points up).&#xD;&#xA;&#xD;&#xA;I experimented with both orientations for a game I developed in college.  Personally, I found [&quot;flat side vertical&quot;][1] hexagons more pleasing on the eyes.  I could certainly be in the minority here, but I believe Civilization V uses the same orientation, so I'm definitely not alone.  If you're not dead set on using one orientation over the other, then I suggest you experiment with both.  Since most of the [online resources][2] I've found regarding hex grids use the &quot;flat side horizontal&quot; orientation, many equations you come across may require adjustments; [this site][3] should help.&#xD;&#xA;&#xD;&#xA;I built my project with a resolution-independent UI framework that performed device pixel snapping automatically, so I didn't spend much time tweaking the angles and ratios.  I believe my bounding box ended up being 96 device independent pixels along each edge (96 device pixels on a standard 96dpi display with scale = 1.0).  You should be able to derive the rest from the screenshot :).&#xD;&#xA;&#xD;&#xA;  [1]: http://startreksupremacy.com/blog/galactic_supremacy.jpg&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex&#xD;&#xA;  [3]: http://playtechs.blogspot.com/2007/04/hex-grids.html" />
  <row Id="10311" PostHistoryTypeId="5" PostId="5200" RevisionGUID="3ffd26f9-7997-407d-807d-6419e19e8e34" CreationDate="2010-11-04T17:10:35.490" UserId="136" Comment="edited body" Text="By &quot;flat side up&quot;, I assume you mean &quot;flat side horizontal&quot; (as &quot;up&quot; could mean either the edge itself points up or it &quot;faces&quot; up, i.e. its normal points up).&#xD;&#xA;&#xD;&#xA;I experimented with both orientations for a game I developed in college.  Personally, I found [&quot;flat side vertical&quot;][1] hexagons more pleasing on the eyes.  I could certainly be in the minority here, but I believe Civilization V uses the same orientation, so I'm definitely not alone.  If you're not dead set on using one orientation over the other, then I suggest you experiment with both.  Since most of the [online resources][2] I've found regarding hex grids use the &quot;flat side horizontal&quot; orientation, many equations you come across may require adjustments; [this site][3] should help.&#xD;&#xA;&#xD;&#xA;I built my project with a resolution-independent UI framework that performed device pixel snapping automatically, so I didn't spend much time tweaking the angles and ratios.  I believe each of my hexes had a bounding box of 96 device independent pixels squared (96 device pixels on a standard 96dpi display with scale = 1.0).  You should be able to derive the rest from the screenshot :).&#xD;&#xA;&#xD;&#xA;  [1]: http://startreksupremacy.com/blog/galactic_supremacy.jpg&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#hex&#xD;&#xA;  [3]: http://playtechs.blogspot.com/2007/04/hex-grids.html" />
  <row Id="10312" PostHistoryTypeId="5" PostId="5196" RevisionGUID="ed2d2f0d-8938-421d-a533-a2a7af786880" CreationDate="2010-11-04T17:20:33.753" UserId="2316" Comment="added 265 characters in body" Text="Unless you're planing on re-building ultima-online (Fallout 3, or Oblivion), there's no reason the world needs to be seamless.  Baldur's Gate and Icewind Dale are two games that come to mind that implement effective maps that do not detract from gameplay.&#xD;&#xA;&#xD;&#xA;Granted, you've got a lot more computing horsepower than they did so loading screens should be minimal, but even Fallout and Oblivion have loading screens for some things.&#xD;&#xA;&#xD;&#xA;All I can tell you is that for me, I'm writing a small Obj-C lib for the iPhone that takes a 32x32 tileset and draws it into an NSImage.  I get about 10fps this way, and I probably should be using OpenGL, but I only need to re-draw if the character moves out of the rect.&#xD;&#xA;&#xD;&#xA;You should split the map up into 9 screen-sizes (for me it's 960x640 blocks) so if the character moves out of the center block, I re-draw the 9-screens into a large image (about 1.2MB - gives a lot of room under the 20MB limit on iPhone 3G).  That happens fairly slowly (much slower than 10fps) so the re-drawing is not noticeable during play.&#xD;&#xA;&#xD;&#xA;I'll likely move to OpenGL ES at some point, but for now it works fine.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[EDIT]&#xD;&#xA;&#xD;&#xA;Allow me to clarify.&#xD;&#xA;&#xD;&#xA;The drawing algorithm for the 9-screen background takes 0.1 seconds (10fps flat-out).  Unless your player can traverse an entire screen in less than a tenth of a second, the redrawing should be imperceptible during play." />
  <row Id="10313" PostHistoryTypeId="2" PostId="5203" RevisionGUID="57f4fbcc-4f16-45b3-83c6-386dcab201de" CreationDate="2010-11-04T18:03:46.507" UserId="37" Text="Start by making the map the size required to tell the story you wish the game to tell. Test on the machine with the minimum spec required for people to play your game. If it is too slow, profile and optimize." />
  <row Id="10314" PostHistoryTypeId="2" PostId="5204" RevisionGUID="7c430d49-506d-42ba-b501-c61673ae80ce" CreationDate="2010-11-04T18:42:38.737" UserId="1705" Text="I have a simple grid-based map composed of rooms, like this (A=entry, B=exit):&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;   0 1 2 3&#xD;&#xA;  #########&#xD;&#xA;0 #B# #####&#xD;&#xA;  #########&#xD;&#xA;1 #   ### #&#xD;&#xA;  #########&#xD;&#xA;2 # #     #&#xD;&#xA;  # #     #&#xD;&#xA;3 # #     #&#xD;&#xA;  #########&#xD;&#xA;4 # ###   #&#xD;&#xA;  #########&#xD;&#xA;5 ###A    #&#xD;&#xA;  ###     #&#xD;&#xA;6 ###     #&#xD;&#xA;  #########&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;And I'm stuck trying to make a suitable algorithm to create a path of doors between the rooms, in such a way that the player has to explore most of the map before finding the exit.&#xD;&#xA;&#xD;&#xA;In other words, I'm trying to find the **longest possible path from A to B**.&#xD;&#xA;&#xD;&#xA;(I'm aware that this problem can be solved for acyclic graphs; however, in this case there can be cycles.)" />
  <row Id="10315" PostHistoryTypeId="1" PostId="5204" RevisionGUID="7c430d49-506d-42ba-b501-c61673ae80ce" CreationDate="2010-11-04T18:42:38.737" UserId="1705" Text="Longest path algorithm for roguelike maze generation" />
  <row Id="10316" PostHistoryTypeId="3" PostId="5204" RevisionGUID="7c430d49-506d-42ba-b501-c61673ae80ce" CreationDate="2010-11-04T18:42:38.737" UserId="1705" Text="&lt;path-finding&gt;&lt;roguelikes&gt;" />
  <row Id="10317" PostHistoryTypeId="2" PostId="5205" RevisionGUID="43f7afb8-4d4c-47ec-b61f-7eb3c004fe18" CreationDate="2010-11-04T18:46:33.240" UserId="1705" Text="A possible alternative would be to create a (maximum?) spanning tree using Prim/Kruskal and apply a traditional longest path algorithm on the spanning tree.&#xD;&#xA;&#xD;&#xA;However, I'm worried that the spanning tree algorithm will tend to create dead-end branches, forcing the player to backtrack constantly." />
  <row Id="10318" PostHistoryTypeId="2" PostId="5206" RevisionGUID="91fc7061-22b0-4e62-9d42-18925692f39c" CreationDate="2010-11-04T18:55:38.253" UserId="136" Text="It sounds like you're in the same boat that I was in a few years back.  I wanted to dabble in game development, but my professional experience was mostly with enterprise/line-of-business applications.  I decided to ease my way in by choosing a game of a familiar genre could be built using similar architectural principles to what I was used to.&#xD;&#xA;&#xD;&#xA;I ultimately decided on a &quot;simultaneous&quot; turn-based strategy game (similar to *Master or Orion* or *Birth of the Federation*) for the following reasons:&#xD;&#xA;&#xD;&#xA; 1. TBS games are highly stateful, and there is very little &quot;ambient&quot; processing.  Almost all logic executes either in direct response to player commands or as part of the &quot;turn processing&quot; phase following each turn.&#xD;&#xA;&#xD;&#xA; 2. The synchronous, turn-based nature of the game lends itself well to a client/server system in which all logic/processing takes place on the server, with the changes later pushed back to the clients.  There is no real-time interaction between players, so clients can issue orders locally and then transmit those orders in a single batch at the end of a turn.  Since the turns are synchronous, the server will not process the turn until all clients have transmitted their orders.  It becomes almost trivial to avoid synchronization/currency issues between clients: do all processing on the server and have each client download a new game state at the beginning of each turn.&#xD;&#xA;&#xD;&#xA; 3. Most network communication occurs at the beginning and end of each turn, with clients downloading the game state and transmitting orders, respectively.  There is very little network traffic in between.  Thus, there is no need for the kind of high throughput, low latency networking system that realtime games often require.  A service-based design built with WCF would be sufficient, and it would also free me from having to do any low-level network programming. &#xD;&#xA;&#xD;&#xA; 4. My design called for a detailed and highly interactive UI not unlike those required by many enterprise applications.  The design was also heavily 2D and was not very demanding in terms of graphics capabilities.  I built my client using WPF (then code-named &quot;Avalon&quot;), which enabled me to create a highly stylized UI (something that *looked* like a game) while leveraging a very rich set of controls and APIs for input processing, eventing, and commanding.  I followed the same UI architectural patterns that I would use for any other application (MVP or some derivation thereof).&#xD;&#xA;&#xD;&#xA; 5. Since I would be building the game using the same language and framework that I use for my day job (C#/.NET), the project could double as a sort of &quot;sandbox&quot; for trying out new development tools and frameworks in a &quot;real world&quot; application that was not also a &quot;mission critical&quot; application.&#xD;&#xA;&#xD;&#xA;Long story short, my decision worked out very well.  I've been working on the project for a few years now (in my spare time), and I'm pretty happy with what I've come up with.  Moreover, I learned a _**lot**_, and not just about game development--I took every opportunity to get hands-on time with new development tech, I've also become more effective in my day job as a result.  A lot of code originally written for my game has evolved and found its way into some of our enterprise applications.&#xD;&#xA;&#xD;&#xA;So I guess my advice would be to choose a project relevant to your existing skill set, and then use that project as a vehicle to dive deeper into game development." />
  <row Id="10319" PostHistoryTypeId="2" PostId="5207" RevisionGUID="3cd54d4d-ca0d-40cc-a53a-7e949cecbbe5" CreationDate="2010-11-04T19:02:57.733" UserId="744" Text="I think you're going about this the wrong way. Maximal path in a graph with cycles is technically undefined because it's infinite if the cycle lies between the start and end. There are probably clever ways you can extend/restrict the definition of maximal path, but I don't think that's the best approach here.&#xD;&#xA;&#xD;&#xA;You're not trying to model an actual long path (e.g. a robot trying to explore as much area in a map as possible). You're just trying to get the player to explore many rooms.&#xD;&#xA;&#xD;&#xA;So, _make the chance the player finds the exit proportional to the percentage of the map explored so far_. Let's say there's X rooms on a level, and the player character has explored Y. Next time the character enters a room, place the exit there with f(Y, X) probability. A trivial example of f might be (Y*Y)/(X*X) - e.g. for 10 rooms, there's a 100% chance the exit in the last room, 81% chance it's in the next to last room - and only a 1% chance it's in the first room.&#xD;&#xA;&#xD;&#xA;You can tweak the equation however you want to make the game feel right, and maybe even give the player some abilities to make it more likely to generate. The key part is, don't generate the exit until the character actually enters the room. This method is also immune to player knowledge of the dungeon generation algorithm; even if the player has strange movement patterns like the knight's jump in NetHack or teleportation, they're going to have to explore more rooms to find the exit.&#xD;&#xA;&#xD;&#xA;If you _must_ statically generate the exit, you can use the same idea with a virtual character. Imagine a flood fill starting from the character's position, moving once cell each iteration. The last room to be filled is the room where the exit belongs (in fact, the last cell to be filled is the cell where it's farthest from the player). However, in this case the player has more information about the exit - if they're on the left, it's most likely on the right - and if they can teleport, may actually be able to get there faster than a normal random walk.&#xD;&#xA;&#xD;&#xA;Finally, I just finished a roguelike where the exit spawned on the other side of the map from the player character, and then wandered randomly. Some items in the dungeon made it visible on the map, at the expense of getting hungry faster. I didn't do any analysis, but it definitely felt like I had to explore more of the map to find it, and it gave the levels a unique feel." />
  <row Id="10320" PostHistoryTypeId="5" PostId="5205" RevisionGUID="8b4c9fd7-2d4e-4d69-a6d0-e1c8cdcb3390" CreationDate="2010-11-04T19:05:48.317" UserId="1705" Comment="clarified motives for finding a spanning tree" Text="A possible alternative would be to create a (maximum?) spanning tree using Prim/Kruskal (in order to eliminate cycles) and apply a traditional longest path algorithm on the spanning tree.&#xD;&#xA;&#xD;&#xA;However, I'm worried that the spanning tree algorithm will tend to create dead-end branches, forcing the player to backtrack constantly." />
  <row Id="10321" PostHistoryTypeId="5" PostId="5206" RevisionGUID="b174a331-aad7-4d55-955f-341b47b7ce10" CreationDate="2010-11-04T19:24:16.153" UserId="136" Comment="deleted 1 characters in body" Text="It sounds like you're in the same boat that I was in a few years back.  I wanted to dabble in game development, but my professional experience was mostly with enterprise/line-of-business applications.  I decided to ease my way in by choosing a game of a familiar genre could be built using similar architectural principles to what I was used to.&#xD;&#xA;&#xD;&#xA;I ultimately decided on a &quot;simultaneous&quot; turn-based strategy game (similar to *Master or Orion* or *Birth of the Federation*) for the following reasons:&#xD;&#xA;&#xD;&#xA; 1. TBS games are highly stateful, and there is very little &quot;ambient&quot; processing.  Almost all logic executes either in direct response to player commands or as part of the &quot;turn processing&quot; phase following each turn.&#xD;&#xA;&#xD;&#xA; 2. The synchronous, turn-based nature of the game lends itself well to a client/server system in which all logic/processing takes place on the server, with the changes later pushed back to the clients.  There is no real-time interaction between players, so clients can issue orders locally and then transmit those orders in a single batch at the end of a turn.  Since the turns are synchronous, the server will not process the turn until all clients have transmitted their orders.  It becomes almost trivial to avoid synchronization/currency issues between clients: do all processing on the server and have each client download a new game state at the beginning of each turn.&#xD;&#xA;&#xD;&#xA; 3. Most network communication occurs at the beginning and end of each turn, with clients downloading the game state and transmitting orders, respectively.  There is very little network traffic in between.  Thus, there is no need for the kind of high throughput, low latency networking system that realtime games often require.  A service-based design built with WCF would be sufficient, and it would also free me from having to do any low-level network programming. &#xD;&#xA;&#xD;&#xA; 4. My design called for a detailed and highly interactive UI not unlike those required by many enterprise applications.  The design was also heavily 2D and was not very demanding in terms of graphics capabilities.  I built my client using WPF (then code-named &quot;Avalon&quot;), which enabled me to create a highly stylized UI (something that *looked* like a game) while leveraging a very rich set of controls and APIs for input processing, eventing, and commanding.  I followed the same UI architectural patterns that I would use for any other application (MVP or some derivation thereof).&#xD;&#xA;&#xD;&#xA; 5. Since I would be building the game using the same language and framework that I use for my day job (C#/.NET), the project could double as a sort of &quot;sandbox&quot; for trying out new development tools and frameworks in a &quot;real world&quot; application that was not also a &quot;mission critical&quot; application.&#xD;&#xA;&#xD;&#xA;Long story short, my decision worked out very well.  I've been working on the project for a few years now (in my spare time), and I'm pretty happy with what I've come up with.  Moreover, I learned a _**lot**_, and not just about game development--I took every opportunity to get hands-on time with new development tech, and I've become more effective at my day job as a result.  A lot of code originally written for my game has evolved and found its way into some of our enterprise applications.&#xD;&#xA;&#xD;&#xA;So I guess my advice would be to choose a project relevant to your existing skill set, and then use that project as a vehicle to dive deeper into game development." />
  <row Id="10322" PostHistoryTypeId="2" PostId="5208" RevisionGUID="f52bbd7e-d794-4abf-a4cb-db35574d07c6" CreationDate="2010-11-04T19:29:37.430" UserId="3053" Text="I would like to create an online implementation of a board game. What engines could I use to write the game and make it easily accessible to as many people as possible?&#xD;&#xA;&#xD;&#xA;I would like it to be as widely accessible as possible, so it would be best if the user interface would run in a browser, not in a separately downloaded app. Likewise, it should be cross platform, not limited to a single platform; pure JavaScript/HTML would be best, as that would allow it to be usable on the iPad as well, though Flash or Java may be acceptable. Silverlight doesn't have the market penetration (I don't have it installed, for instance) and XNA is far too limited.&#xD;&#xA;&#xD;&#xA;Other features that would be nice would be good chat and social features (or integration with other chat or social network systems), leaderderboard or tournament systems, and easy integration of bots to provide AI opponents in case there aren't enough human players around. Game timers, to keep people moving at a reasonable rate, would also be good. Saving game records, and allowing people to replay and review records for study, would be nice too, though I'm not expecting much as those types of features tend to only show up in purpose-built engines for games like chess or Go.&#xD;&#xA;&#xD;&#xA;Being free/open-source software would be a big plus, so I could extend it myself, though closed or hosted solutions might be acceptable if they provide enough of the above features or provide some means for extending them.&#xD;&#xA;&#xD;&#xA;Are there any such systems that meet my needs? Or any that are close even if not exactly matching?" />
  <row Id="10323" PostHistoryTypeId="1" PostId="5208" RevisionGUID="f52bbd7e-d794-4abf-a4cb-db35574d07c6" CreationDate="2010-11-04T19:29:37.430" UserId="3053" Text="Online board game engines" />
  <row Id="10324" PostHistoryTypeId="3" PostId="5208" RevisionGUID="f52bbd7e-d794-4abf-a4cb-db35574d07c6" CreationDate="2010-11-04T19:29:37.430" UserId="3053" Text="&lt;engine&gt;&lt;javascript&gt;&lt;social&gt;&lt;online&gt;" />
  <row Id="10325" PostHistoryTypeId="2" PostId="5209" RevisionGUID="b2746f51-c0f0-4cc7-9d54-bbba9b8df496" CreationDate="2010-11-04T19:43:21.510" UserId="1232" Text="A google search for &quot;rts engine schematics&quot; turns up a few relevant hits.&#xD;&#xA;&#xD;&#xA;ORTS:&#xD;&#xA;&#xD;&#xA;* http://skatgame.net/mburo/orts/orts.html&#xD;&#xA;* doxygen documentation for that over here: http://skatgame.net/mburo/orts/doxygen/html/&#xD;&#xA;&#xD;&#xA;Stratagus:&#xD;&#xA;&#xD;&#xA;* http://stratagus.sourceforge.net/&#xD;&#xA;* http://stratagus.sourceforge.net/download.shtml&#xD;&#xA;&#xD;&#xA;These might not necessarily be the best examples of code design (I haven't looked in detail), but by looking at them you should be able to pick up a few ideas - both on how to structure your code and how NOT to structure your code. Lessons on structuring code will also come with more experience.&#xD;&#xA;&#xD;&#xA;To answer your questions:&#xD;&#xA;&#xD;&#xA;* The name of the logic that manages units is basically irrelevant; there are multiple ways to do this, and often this kind of logic transcends the genre of the game.&#xD;&#xA;* In general, the simpler the multithreading system, the better. If it helps you to reach your target frame-rate on your target platform, then thread your systems. &#xD;&#xA;* Yes, if you're targeting multi-core systems as your min spec. Most modern PCs and consoles will benefit from task-level parallelism, but often that can introduce latencies depending on how granular and dependent your tasks are.&#xD;&#xA;&#xD;&#xA;Most RTS game engines will have similar structure to other game engines, both in terms of unit management and multithreading. The difference in engine would be reflected based on the specific differences in the RTS genre versus other genres. &#xD;&#xA;&#xD;&#xA;There is too much information to cover here, but here are only a small number of characteristics of an RTS that would reflect the engine and content evolution:&#xD;&#xA;&#xD;&#xA;1] RTS games are played from top-down view. This means a visibility system (occlusion and/or sector/portal) is unlikely to be worthwhile. Artists can spend more time adding detail to the top and sides of objects than the bottom.&#xD;&#xA;&#xD;&#xA;2] RTS games are mostly played from a fixed height. Firstly, this typically means you have a limited range in which action is happening. In other words, a Level of Detail (LOD) system based on distance from camera is also probably not worthwhile. The artists should be able to produce assets that are optimally detailed for the camera height.&#xD;&#xA;&#xD;&#xA;3] Units in RTS games are not controlled directly, but are controlled by sending commands to them. A higher latency between when the command is received and when the unit is executed is more tolerable to the user in an RTS game than in an action game. This is a desirable property because most RTS games operate in a networked environment which often has to handle the inherent latencies of the network.&#xD;&#xA;&#xD;&#xA;4] Often, there are many units of the same type on the screen at the same time. This means that a system for batching/instancing for objects is likely to have benefit.&#xD;&#xA;&#xD;&#xA;5] Often commands are dispatched to groups of many units at the same time. This means that any path-finding, navigation and obstacle avoidance logic, and acceleration data structures can be shared between individual units within the group.&#xD;&#xA;" />
  <row Id="10326" PostHistoryTypeId="2" PostId="5210" RevisionGUID="05211d2e-53a3-4d61-bf6e-ce77e849299e" CreationDate="2010-11-04T19:57:57.880" UserId="3051" Text="I'm in the very, very early brainstorming stages of a game which centers around the manipulation of water and the terrain around it. (i.e., changing the water's state between solid, liquid, gas; building up or tearing down hills to control its flow; and so forth.)  I'm not yet sure if it should be a puzzle game, a platformer, or what.&#xD;&#xA;&#xD;&#xA;Usually, when brainstorming a game, I try to find games with similar mechanics to see what is done well, poorly, etc.  But this time, I'm having trouble thinking of any games that use the flow of water as a primary mechanic.  ([Pipe Dream][1] is about all that comes to mind.)&#xD;&#xA;&#xD;&#xA;So, I'm asking around...  does anyone know of any games where controlling water is a major aspect?  Is there much reference material (of any kind) on the subject of water as a gameplay mechanic?  Or any ideas where to look?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pipe_Mania" />
  <row Id="10327" PostHistoryTypeId="1" PostId="5210" RevisionGUID="05211d2e-53a3-4d61-bf6e-ce77e849299e" CreationDate="2010-11-04T19:57:57.880" UserId="3051" Text="Are there many games involving the manipulation of water?" />
  <row Id="10328" PostHistoryTypeId="3" PostId="5210" RevisionGUID="05211d2e-53a3-4d61-bf6e-ce77e849299e" CreationDate="2010-11-04T19:57:57.880" UserId="3051" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="10329" PostHistoryTypeId="2" PostId="5211" RevisionGUID="292b7ee5-bced-496d-8688-8cad92189498" CreationDate="2010-11-04T20:04:43.797" UserId="20" Text="I sincerely doubt that such a game engine exists. A.I. for example, is very domain specific and you probably won't find an engine that provides the A.I. you need out of the box.&#xD;&#xA;&#xD;&#xA;Also: The interest in JavaScript by game-developers just started to increase with HTML5 and the iOS platform. Don't expect to find any mature game-engines implemented in JavaScript yet. If you want to go the JavaScript route, your best bet would probably be to implement most of the game-logic server-side and program a thin-client in JavaScript. &#xD;&#xA;&#xD;&#xA;As already mentioned, online-games also require a client-server model in most cases. This makes it even more difficult to find an engine (one that covers both client and server software). My experience with game-engines is, that they usually cover the client-side very well but you'll have to implement most of the server-side stuff yourself. Of course you'll find software/scripts for leaderboards or online data-storage but these are usually not part of a game-engine." />
  <row Id="10330" PostHistoryTypeId="2" PostId="5212" RevisionGUID="d75a7204-d61e-4b85-a7b9-67a8d7f81bec" CreationDate="2010-11-04T20:13:11.730" UserId="3004" Text="[Dwarf Fortress][1] comes to mind. Water can be pressurized and (re-)routed through a mountain as it's constantly influenced by gravity.&#xD;&#xA;&#xD;&#xA;The game isn't *about* water (it's essentially a city-building game), but the water mechanics really add to the depth of the gameplay. There's a good article on Gamasutra on how they did the water. I'll try to find it.&#xD;&#xA;&#xD;&#xA;**Edit**: [found it][2]. Here's some representative images..&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bay12games.com/dwarves/&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3549/interview_the_making_of_dwarf_.php&#xD;&#xA;  [3]: http://i.stack.imgur.com/x2qiY.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/PA0Vz.jpg" />
  <row Id="10331" PostHistoryTypeId="16" PostId="5212" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-04T20:14:12.223" UserId="51" />
  <row Id="10332" PostHistoryTypeId="16" PostId="5210" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-04T20:14:12.223" UserId="51" />
  <row Id="10333" PostHistoryTypeId="2" PostId="5213" RevisionGUID="561e71be-a9f1-4ec8-92ef-e59140dffad4" CreationDate="2010-11-04T20:15:40.320" UserId="51" Text="BioShock had several levels with pretty fancy water effects.  Don't know how much that actually affected the gameplay, though." />
  <row Id="10334" PostHistoryTypeId="2" PostId="5214" RevisionGUID="8d692755-6b53-49e4-9d3b-9deb57d9bc6a" CreationDate="2010-11-04T20:26:57.030" UserId="395" Text="[Dust](http://www.youtube.com/watch?v=CfKQCAxizrA) comes to mind, though not much information has been released. Similarly, Minecraft has a lot of complexity in its water system (see also: the invention of the waterladder)." />
  <row Id="10335" PostHistoryTypeId="2" PostId="5215" RevisionGUID="079e8e8e-2b23-42a8-9daa-0acb1a9e696d" CreationDate="2010-11-04T20:38:31.403" UserId="1352" Text="[Hydrophobia][1] is a game that is centered around the physics of water. So I guess this game is what you're looking for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hydrophobia_%28video_game%29" />
  <row Id="10336" PostHistoryTypeId="2" PostId="5216" RevisionGUID="d2ba882b-73f2-4a9a-b04f-23474fd6aa5e" CreationDate="2010-11-04T20:48:12.890" UserId="953" Text="Some games that come to mind:&#xD;&#xA;&#xD;&#xA; - Puddle: http://puddle-game.com/&#xD;&#xA; - Vessel: http://www.strangeloopgames.com/&#xD;&#xA; - I-Fluid (sort of): http://www.i-fluid.com/&#xD;&#xA;&#xD;&#xA;There's also a game I seem to remember but wasn't able to find where you are adjusting the terrain of a flat world in preparation for rain to fall, with the goal of trapping the water.&#xD;&#xA;&#xD;&#xA;Minecraft has water physics in a similar way that Dwarf Fortress does." />
  <row Id="10337" PostHistoryTypeId="2" PostId="5217" RevisionGUID="41d3e7ae-f207-4cd7-9b66-2fe0b5a9b154" CreationDate="2010-11-04T20:51:37.880" UserId="891" Text="## [Wetrix][1] ##&#xD;&#xA;&#xD;&#xA;Wetrix was a cross between Tetris, and water manipulation.  The idea was to create lakes by raising terrain to capture water.  It was pretty fun for the N64 and PC&#xD;&#xA;&#xD;&#xA;&gt;In the classic mode, you start out with a flat piece of land; the ultimate goal being to gain as many points as possible, managing a landscape of lakes and ponds. This is accomplished by maneuvering different types of random pieces that fall onto the playing area, one at a time (much like the puzzle game Tetris). These pieces each have differing effects upon the arena, but the standard pieces are uppers, which increase the land level by one tier, and fall in different shapes. These can be used to sculpt walls and dams, and the perimeters of lakes. Shortly into the game, water bubble pieces will begin to fall, which burst upon impact with the land, and flow realistically like a fluid across the landscape. The main method of gathering points is by using the fireball piece to evaporate lakes, the amount of points depending upon the volume of water. On the right side of the screen is a water gauge, which fills up as water falls off the edge of the landscape, or down holes created by bombs. The player loses the game when the gauge fills up to the top. The only way to reduce the level of the water gauge is by evaporating water with fireballs, again the amount it is reduced by depends on the amount of water evaporated.&#xD;&#xA;&#xD;&#xA;[&lt;img src=&quot;http://i.stack.imgur.com/BxXsq.jpg&quot; width=&quot;300&quot; height=&quot;250&quot;&gt;][2] [&lt;img src=&quot;http://i.stack.imgur.com/WE8bU.jpg&quot; width=&quot;300&quot; height=&quot;250&quot;&gt;][3][&lt;img src=&quot;http://i.stack.imgur.com/k9XGE.jpg&quot; width=&quot;300&quot; height=&quot;250&quot;&gt;][4] [&lt;img src=&quot;http://i.stack.imgur.com/D52r4.jpg&quot; width=&quot;300&quot; height=&quot;250&quot;&gt;][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wetrix&#xD;&#xA;  [2]: http://i.stack.imgur.com/BxXsq.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/WE8bU.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/k9XGE.jpg&#xD;&#xA;  [5]: http://i.stack.imgur.com/D52r4.jpg" />
  <row Id="10338" PostHistoryTypeId="2" PostId="5218" RevisionGUID="49362047-3bf4-4ef9-838c-ba2add104761" CreationDate="2010-11-04T21:25:46.993" UserId="2080" Text="It appears that the problem was the tile generation algorithm itself. I've completely rebuild the mechanism according to the solution given here: http://forums.tigsource.com/index.php?topic=15642.msg450370#msg450370&#xD;&#xA;&#xD;&#xA;So instead of applying velocity adjustments to each and every tile and generating one tile at a time with adjusted frequency, it proved to be much easier and efficient to just generate tiles in groups that can be refilled with tiles and reused after they get out of the screen.&#xD;&#xA;&#xD;&#xA;I hope this question (and answer) will be useful for someone." />
  <row Id="10339" PostHistoryTypeId="2" PostId="5219" RevisionGUID="ce6e83a0-ef06-44b8-a3b0-04d45cb30d51" CreationDate="2010-11-04T21:30:37.440" UserId="1232" Text="Charles Bloom built a little game around fluids in the very first Indie Game Jam:&#xD;&#xA;http://www.indiegamejam.com/igj0/games.html#flow&#xD;&#xA;The goal was to manipulate the terrain to guide the fluid molecules to a goal area." />
  <row Id="10340" PostHistoryTypeId="2" PostId="5220" RevisionGUID="12a95b05-073e-433a-82ae-8eadbea59355" CreationDate="2010-11-04T21:31:21.887" UserId="154" Text="Since you presenting the hexmap through an isometric view that shifts things around.&#xD;&#xA;&#xD;&#xA;Here is the traditional version with horizontal hexes that are effectively squished in the vertical axis to make a pseudo-isometric look.&#xD;&#xA;&#xD;&#xA;![hex view 2][2]&#xD;&#xA;&#xD;&#xA;This takes a different approach with the hexes that are rotated to present no vertical or horizontal lines.&#xD;&#xA;&#xD;&#xA;![hex view 1][1]&#xD;&#xA;&#xD;&#xA;Either style can work, just depends on what you want to do, the primary direction players will move through the world, and how much you want to avoid zig-zagging.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/gnfGr.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/V3CdB.jpg" />
  <row Id="10341" PostHistoryTypeId="2" PostId="5221" RevisionGUID="8b35e7d5-dd93-46a9-97d8-a03eafb4b97c" CreationDate="2010-11-04T21:34:27.870" UserId="3057" Text="It's not quite water, maybe better.&#xD;&#xA;&#xD;&#xA;There is a flash game called &quot;Creeper World&quot; that has fantastic fluid dynamics.&#xD;&#xA;&#xD;&#xA;It's more of a &quot;Goo&quot; than water, so it tends to spread out more slowly, but the dynamics are spot-on." />
  <row Id="10342" PostHistoryTypeId="5" PostId="5204" RevisionGUID="fc7e472b-1b2b-4772-abd1-87453c0391fb" CreationDate="2010-11-04T21:45:39.137" UserId="1705" Comment="added floodfill example" Text="I have a simple grid-based map composed of rooms, like this (A=entrance, B=exit):&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;   0 1 2 3&#xD;&#xA;  #########&#xD;&#xA;0 #B# #####&#xD;&#xA;  #########&#xD;&#xA;1 #   ### #&#xD;&#xA;  #########&#xD;&#xA;2 # #     #&#xD;&#xA;  # #     #&#xD;&#xA;3 # #     #&#xD;&#xA;  #########&#xD;&#xA;4 # ###   #&#xD;&#xA;  #########&#xD;&#xA;5 ###A    #&#xD;&#xA;  ###     #&#xD;&#xA;6 ###     #&#xD;&#xA;  #########&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;And I'm stuck trying to make a suitable algorithm to create a path of doors between the rooms, in such a way that the player has to explore most of the map before finding the exit.&#xD;&#xA;&#xD;&#xA;In other words, I'm trying to find the **longest possible path from A to B**.&#xD;&#xA;&#xD;&#xA;(I'm aware that this problem can be solved for acyclic graphs; however, in this case there can be cycles.)&#xD;&#xA;&#xD;&#xA;EDIT: Another example where rooms are connected using floodfill, and the exit is chosen as the farthest room from the entrance:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;   0 1 2 3&#xD;&#xA;  #########&#xD;&#xA;0 #B#     #&#xD;&#xA;  # #-#####&#xD;&#xA;1 # | #   #&#xD;&#xA;  ### #   #&#xD;&#xA;2 ### #   #&#xD;&#xA;  ###-#-###&#xD;&#xA;3 #   | ###&#xD;&#xA;  #-#######&#xD;&#xA;4 #A|     #&#xD;&#xA;  # #     #&#xD;&#xA;5 # #     #&#xD;&#xA;  # #     #&#xD;&#xA;6 # #     #&#xD;&#xA;  #########&lt;/pre&gt;" />
  <row Id="10343" PostHistoryTypeId="2" PostId="5222" RevisionGUID="29d12add-8a78-42bf-a424-8528227d65ee" CreationDate="2010-11-04T21:46:52.680" UserId="3057" Text="People have built things with clay, brick, wood, stone and paint for years.  They have loved doing so and often create just for the joy of creating.&#xD;&#xA;&#xD;&#xA;To be able to do so online in collaboration with friends is even more awesome.&#xD;&#xA;&#xD;&#xA;Add being able to sit in your own house/bed while you do so... I'm there.&#xD;&#xA;&#xD;&#xA;Seriously though, A lot of it for me was the potential.  This guy is willing to work with developers (enough to provide an API) and intends to Open Source it.  If it weren't for those two things and the alpha price, I'd have skipped it." />
  <row Id="10344" PostHistoryTypeId="5" PostId="5177" RevisionGUID="ddbace34-2b84-4cf7-adbe-ff29130c868d" CreationDate="2010-11-04T21:49:27.683" UserId="744" Comment="added 503 characters in body; added 25 characters in body" Text="JPG and PNG files will almost always be smaller on-disk than in memory; they need to be decompressed on-the-fly to acquire raw RGB data, thus requiring more processing power for the loading and more RAM afterwards. So many modern engines opt to store the same format on disk as they do in memory, leading to files that are the same size as the texture's memory requirements (but also larger than a PNG or JPG). RGB/RGBA and S3TC/DXTn/BCn are the most widely used formats, because they are read straight into memory without any processing (DXT textures are precompressed).&#xD;&#xA;&#xD;&#xA;So, these are the sizes for different common texture formats:&#xD;&#xA;&#xD;&#xA; - L (luminance, e.g. greyscale): width * height * 1 byte.&#xD;&#xA; - LA (luminance and alpha, common for fonts): width * height * 2 bytes.&#xD;&#xA; - RGB (color, no alpha): width * height * 3 bytes.&#xD;&#xA; - RGBA (color with alpha): width * height * 4 bytes.&#xD;&#xA; - DXT1/BC1 (color, binary alpha): (width * height * 4 bytes) / 8 (8:1 compression ratio).&#xD;&#xA; - DXT3/BC2 (color, sharp alpha)/DXT5/BC3 (color, gradient alpha): (width * height * 4 bytes) / 4 (4:1 compression ratio).&#xD;&#xA;&#xD;&#xA;If you use a image with &lt;a href=&quot;http://en.wikipedia.org/wiki/Mipmap&quot;&gt;mipmaps&lt;/a&gt;, the texture will require 4/3 as much memory. Additionally, the texture width and height may be rounded up internally to be a power of two on old or less capable hardware, and on some very limited hardware, also forced to be a square.&#xD;&#xA;&#xD;&#xA;More info on DXT: it's a lossy compression; this means, some color data is lost when compressing the texture. This has a negative impact on your texture, distorting sharp borders and creating &quot;blocks&quot; on gradients; but the benefits are far better than the disadvantages (if you have a texture that looks horribly bad in DXT, just keep it uncompressed; the other ones will make up for the size loss). Also, since the pixels are compressed by fixed-size blocks, the texture width and height must be a multiple of four." />
  <row Id="10345" PostHistoryTypeId="5" PostId="5217" RevisionGUID="27792bf4-2759-4107-a678-cc220b1f14c7" CreationDate="2010-11-04T22:41:41.487" UserId="891" Comment="added 87 characters in body; added 1 characters in body; added 1 characters in body" Text="## [Wetrix][1] ##&#xD;&#xA;&#xD;&#xA;Wetrix was a cross between Tetris, and water manipulation.  The idea was to create lakes by raising terrain to capture water.  It was pretty fun for the N64 and PC&#xD;&#xA;&#xD;&#xA;&gt;In the classic mode, you start out with a flat piece of land; the ultimate goal being to gain as many points as possible, managing a landscape of lakes and ponds. This is accomplished by maneuvering different types of random pieces that fall onto the playing area, one at a time (much like the puzzle game Tetris). These pieces each have differing effects upon the arena, but the standard pieces are uppers, which increase the land level by one tier, and fall in different shapes. These can be used to sculpt walls and dams, and the perimeters of lakes. Shortly into the game, water bubble pieces will begin to fall, which burst upon impact with the land, and flow realistically like a fluid across the landscape. The main method of gathering points is by using the fireball piece to evaporate lakes, the amount of points depending upon the volume of water. On the right side of the screen is a water gauge, which fills up as water falls off the edge of the landscape, or down holes created by bombs. The player loses the game when the gauge fills up to the top. The only way to reduce the level of the water gauge is by evaporating water with fireballs, again the amount it is reduced by depends on the amount of water evaporated.&#xD;&#xA;&#xD;&#xA;[&lt;img src=&quot;http://i.stack.imgur.com/BxXsq.jpg&quot; width=&quot;300&quot; height=&quot;225&quot;&gt;][2] [&lt;img src=&quot;http://i.stack.imgur.com/WE8bU.jpg&quot; width=&quot;300&quot; height=&quot;225&quot;&gt;][3][&lt;img src=&quot;http://i.stack.imgur.com/k9XGE.jpg&quot; width=&quot;300&quot; height=&quot;225&quot;&gt;][4] [&lt;img src=&quot;http://i.stack.imgur.com/D52r4.jpg&quot; width=&quot;300&quot; height=&quot;225&quot;&gt;][5]  &#xD;&#xA;*Images by [ign.com*][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wetrix&#xD;&#xA;  [2]: http://i.stack.imgur.com/BxXsq.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/WE8bU.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/k9XGE.jpg&#xD;&#xA;  [5]: http://i.stack.imgur.com/D52r4.jpg&#xD;&#xA;  [6]: http://media.pc.ign.com/media/009/009927/imgs_1.html" />
  <row Id="10346" PostHistoryTypeId="5" PostId="5208" RevisionGUID="7bcf2e2b-79cd-408b-8dae-e93a200aeaea" CreationDate="2010-11-04T22:54:57.943" UserId="3053" Comment="added 938 characters in body" Text="I would like to create an online implementation of a board game. What engines could I use to write the game and make it easily accessible to as many people as possible?&#xD;&#xA;&#xD;&#xA;I would like it to be as widely accessible as possible, so it would be best if the user interface would run in a browser, not in a separately downloaded app. Likewise, it should be cross platform, not limited to a single platform; pure JavaScript/HTML would be best, as that would allow it to be usable on the iPad as well, though Flash or Java may be acceptable. Silverlight doesn't have the market penetration (I don't have it installed, for instance) and XNA is far too limited.&#xD;&#xA;&#xD;&#xA;Other features that would be nice would be good chat and social features (or integration with other chat or social network systems), leaderderboard or tournament systems, and easy integration of bots to provide AI opponents in case there aren't enough human players around. Game timers, to keep people moving at a reasonable rate, would also be good. Saving game records, and allowing people to replay and review records for study, would be nice too, though I'm not expecting much as those types of features tend to only show up in purpose-built engines for games like chess or Go.&#xD;&#xA;&#xD;&#xA;Being free/open-source software would be a big plus, so I could extend it myself, though closed or hosted solutions might be acceptable if they provide enough of the above features or provide some means for extending them.&#xD;&#xA;&#xD;&#xA;Are there any such systems that meet my needs? Or any that are close even if not exactly matching?&#xD;&#xA;&#xD;&#xA;Some similar systems, that don't quite meet my needs, would include:&#xD;&#xA;&#xD;&#xA;* [Yahoo Gaems][1], which is web based, but I can't write my own games for it, or any of many similar servers in that category.&#xD;&#xA;* [Volity][2], which is built on SVG and XMPP. It's open source, designed to be an open standard, has support for bots, etc, but it requires a separate client download, and seems not to be actively developed or used any more.&#xD;&#xA;* [SuperDuperGames][3], which is an open source, online system for doing turn-based (play-by-mail style) games. That is, it's not live or real time, but instead you submit your moves, and wait for someone to submit theirs, within the next day or so. It's an active community, but I want something where I can play games live, not over the course of weeks or months.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://games.yahoo.com/&#xD;&#xA;  [2]: http://volity.net/&#xD;&#xA;  [3]: http://superdupergames.org/&#xD;&#xA;  [4]: http://www.zillions-of-games.com/" />
  <row Id="10347" PostHistoryTypeId="2" PostId="5223" RevisionGUID="8244e2b0-3350-47f5-adb2-38e414c4ec79" CreationDate="2010-11-04T23:03:20.617" UserId="1437" Text="If you're using C++0x, use `std::unique_ptr&lt;T&gt;`.&#xD;&#xA;&#xD;&#xA;It has no performance overhead, unlike `std::shared_ptr&lt;T&gt;` which has reference counting overhead.  A unique_ptr *owns* its pointer, and you can transfer ownership around with C++0x's *move semantics*.  You can't copy them - only move them.&#xD;&#xA;&#xD;&#xA;It can also be used in containers, e.g. `std::vector&lt;std::unique_ptr&lt;T&gt;&gt;`, which is binary-compatible and identical in performance to `std::vector&lt;T*&gt;`, but will not leak memory if you erase elements or clear the vector.  This also has better compatibility with STL algorithms than `ptr_vector`.&#xD;&#xA;&#xD;&#xA;IMO for a lot of purposes this is an ideal container: random access, exception safe, prevents memory leaks, low overhead for vector reallocation (just shuffles around pointers behind the scenes).  Very useful for many purposes." />
  <row Id="10348" PostHistoryTypeId="2" PostId="5224" RevisionGUID="f3db7702-a8a3-4c34-9c12-ebe82dc0fe52" CreationDate="2010-11-04T23:43:58.757" UserId="3060" Text="Hey guys, I'm trying to figure out how to generate tileable fractals in code (for game maps, *but that's irrelevant*)&#xD;&#xA;I've been trying to modify the Solid Noise plug-in shipped with GIMP (with my extremely limited understanding of how the code works)  but I cant get mine to work correctly.&#xD;&#xA;&#xD;&#xA;My modified code so far (http://pastebin.com/KhHjg3L4) (Java)   &#xD;&#xA;&#xD;&#xA;GIMP's solid noise module that I'm basing my code off of (http://pastebin.com/SuzydfGw) (C)&#xD;&#xA;&#xD;&#xA;Here is what I'm trying to achieve (http://upload.wikimedia.org/wikipedia/commons/d/da/Perlin_noise.jpg) but&#xD;&#xA;This is what I'm getting (http://imgur.com/9bBus.jpg)&#xD;&#xA;&#xD;&#xA;So if anybody can see what I've done wrong, or has a suggestion how I could go about doing it differently, I'd greatly appreciate it. **Thanks in advance.**&#xD;&#xA;And if I'm asking way to much or if just a huge failure at life, I apologize. &#xD;&#xA;&#xD;&#xA;--Sorry about the links, cant post more than one since this is my first post here" />
  <row Id="10349" PostHistoryTypeId="1" PostId="5224" RevisionGUID="f3db7702-a8a3-4c34-9c12-ebe82dc0fe52" CreationDate="2010-11-04T23:43:58.757" UserId="3060" Text="How do I create tileable solid noise for map generation?" />
  <row Id="10350" PostHistoryTypeId="3" PostId="5224" RevisionGUID="f3db7702-a8a3-4c34-9c12-ebe82dc0fe52" CreationDate="2010-11-04T23:43:58.757" UserId="3060" Text="&lt;java&gt;&lt;procedural-generation&gt;&lt;maps&gt;" />
  <row Id="10351" PostHistoryTypeId="2" PostId="5225" RevisionGUID="92c87f50-3912-488b-999b-e6d6ab2d5723" CreationDate="2010-11-05T03:04:36.523" UserId="3032" Text="I know the question is already answered but there is a great book by Steven L. Kent called [The Ultimate History of Video Games][1] it actually starts off with coin-operated games like pinball and works into the video games beginnings. I would recommend you check it out if you are looking to read about the history of games.&#xD;&#xA;&#xD;&#xA;It really gets into details about how certain things were done and Mr. Kent interviewed a lot of people involved in the industry from the past and present.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://search.barnesandnoble.com/The-Ultimate-History-of-Video-Games/Steven-Kent/e/9780761536437" />
  <row Id="10352" PostHistoryTypeId="2" PostId="5226" RevisionGUID="d4cb9a28-5ec8-426a-9e1c-410745622f40" CreationDate="2010-11-05T03:57:16.507" UserId="2995" Text="I've got an XNA Creators Club trial membership via DreamSpark, but I cannot download the [XNA Game Studio Connect][1] app due to a bug in the site. Users from Finland and US experienced this [before][2] and MS fixed something in the Marketplace configuration that enabled them to download this. You need this app to deploy apps to Xbox 360 during development.&#xD;&#xA;&#xD;&#xA;Can someone with a Creators Club account please download this app for me and upload it [someplace][3]?&#xD;&#xA;&#xD;&#xA;I'm completely legal since my account on App Hub (aka. creators club) shows Registered, and I can view the My Dashboard page which doesn't appear to unregistered users. Also, the Faq states that you get all required dev tools for Xbox 360 at [$0 for DreamSpark students][4], which I am.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://marketplace.xbox.com/en-US/Product/XNA-Game-Studio-Connect/00000000-0000-400c-80af-e002584e07d1&#xD;&#xA;  [2]: http://forums.create.msdn.com/forums/t/12850.aspx&#xD;&#xA;  [3]: http://www.mediafire.com/&#xD;&#xA;  [4]: http://create.msdn.com/en-us/home/faq" />
  <row Id="10353" PostHistoryTypeId="1" PostId="5226" RevisionGUID="d4cb9a28-5ec8-426a-9e1c-410745622f40" CreationDate="2010-11-05T03:57:16.507" UserId="2995" Text="Cannot download XNA Connect app" />
  <row Id="10354" PostHistoryTypeId="3" PostId="5226" RevisionGUID="d4cb9a28-5ec8-426a-9e1c-410745622f40" CreationDate="2010-11-05T03:57:16.507" UserId="2995" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;pc&gt;" />
  <row Id="10355" PostHistoryTypeId="5" PostId="5226" RevisionGUID="2f3e855b-31c0-4c99-b380-7f8812838bda" CreationDate="2010-11-05T04:05:15.213" UserId="2995" Comment="deleted 183 characters in body; edited title" Text="I've got an XNA Creators Club trial membership via DreamSpark, but I cannot download the [XNA Game Studio Connect][1] app due to a bug in the site. Users from Finland and US experienced this [before][2] and MS fixed something in the Marketplace configuration that enabled them to download this. You need this app to deploy apps to Xbox 360 during development.&#xD;&#xA;&#xD;&#xA;Can someone with a Creators Club account please download this app for me and upload it [someplace][3]?&#xD;&#xA;&#xD;&#xA;I'm legal since my account on App Hub shows Registered, Student, and Premium Member.&#xD;&#xA;&#xD;&#xA;![Premium Member pic][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://marketplace.xbox.com/en-US/Product/XNA-Game-Studio-Connect/00000000-0000-400c-80af-e002584e07d1&#xD;&#xA;  [2]: http://forums.create.msdn.com/forums/t/12850.aspx&#xD;&#xA;  [3]: http://www.mediafire.com/&#xD;&#xA;  [4]: http://i.stack.imgur.com/tqsRb.png" />
  <row Id="10356" PostHistoryTypeId="4" PostId="5226" RevisionGUID="2f3e855b-31c0-4c99-b380-7f8812838bda" CreationDate="2010-11-05T04:05:15.213" UserId="2995" Comment="deleted 183 characters in body; edited title" Text="Can you download the XNA Connect app in US so I can deploy to Xbox 60?" />
  <row Id="10357" PostHistoryTypeId="4" PostId="5226" RevisionGUID="d424b209-8fc5-4ee7-9816-3c9cc2a6bc8b" CreationDate="2010-11-05T04:20:03.893" UserId="2995" Comment="edited title" Text="Can you download the XNA Connect app in US so I can deploy to Xbox 360?" />
  <row Id="10358" PostHistoryTypeId="2" PostId="5227" RevisionGUID="0dd5d8ea-edfb-435a-91b4-ea4edd77115f" CreationDate="2010-11-05T04:44:18.143" UserId="189" Text="I only see a button to download to my Xbox 360. When I clicked it, it said it was added to my &quot;queue&quot;, and I guess it will magically show up on my Xbox? But there is nothing I saw to download...&#xD;&#xA;&#xD;&#xA;Here is a screenshot of the page I see: (notice the &quot;Download to Xbox 360&quot; button in the bottom right)&#xD;&#xA;&#xD;&#xA;![XNA Game Studio Connect][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/96FqT.png" />
  <row Id="10359" PostHistoryTypeId="2" PostId="5228" RevisionGUID="2750d9d1-893d-45e1-a200-9aac24543d68" CreationDate="2010-11-05T08:33:08.660" UserId="3064" Text="In my opinion the best is to store the information from the application in a mysql database (google analytics is too limited), and if you want to handle things really professional, then you should translate the mysql data to a vertica database and conect it with tableau which is an excelent tool that allows doing tons of analysis, graphs, anything you need for BI. Regarding what to measure, well there are mainly the following things:&#xD;&#xA;&#xD;&#xA;-Churn rates are familiar to anyone who has analyzed a subscription-based business like cable television or phones: the churn rate is the percentage of customers who will stop using the product in a given month&#xD;&#xA;&#xD;&#xA;-The viral coefficient is in some ways the opposite of the churn rate: it’s average organic growth rate in users in a given month. &#xD;&#xA;&#xD;&#xA;-user aquisitions:new registered users&#xD;&#xA;&#xD;&#xA;-ARPU: average money earned by users&#xD;&#xA;&#xD;&#xA;-DAU: daily active users&#xD;&#xA;&#xD;&#xA;-Engagement: We are going to measure it by taking the amount of time the user plays each day (dough there are other things that can be taken in account such as the amount of features the user access)&#xD;&#xA;&#xD;&#xA;-MAU: monthly active users&#xD;&#xA;&#xD;&#xA;-DAU/MAU: Comparing Daily Active Users to Monthly Active Users shows roughly how many days per month your average user engages with your game&#xD;&#xA;" />
  <row Id="10360" PostHistoryTypeId="2" PostId="5229" RevisionGUID="1b116be7-0847-4489-bcf8-3fc73317e920" CreationDate="2010-11-05T09:01:07.137" UserId="678" Text="I recommend you use the [diamond-square algorithm][1], also known as plasma fractal or random mid-point displacement fractal. Using this algorithm it is very easy to constrain the edges to have the same values. When you generate a value for an edge, copy it to the corresponding edge on the other side. This yields a perfectly tiling map.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Diamond-square_algorithm" />
  <row Id="10361" PostHistoryTypeId="2" PostId="5230" RevisionGUID="74c4f566-f547-4877-9821-47b36d78df89" CreationDate="2010-11-05T09:03:03.637" UserId="1352" Text="Just skimmed through the Java and C versions and noticed a slight difference in the way you use the noise function. Here's yours:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    int val = Math.abs((int) Math.floor(255.0 * noise(((double)col/(double)width), ((double)row/(double)height))));&#xD;&#xA;&#xD;&#xA;C code:&#xD;&#xA;&#xD;&#xA;    val = (guchar) floor (255.0 * noise ((col - xoffset) / width,&#xD;&#xA;&#xD;&#xA;                                               (row - yoffset) / height));&#xD;&#xA;&#xD;&#xA;Why have you chosen not to subtract the offset? (col - xoffset) and (row - yoffset)&#xD;&#xA;&#xD;&#xA;Just wondering. I don't have time to do a full analysis of the code. &#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="10362" PostHistoryTypeId="2" PostId="5231" RevisionGUID="a974abb3-3072-443c-aae1-01b2de8f85d1" CreationDate="2010-11-05T09:04:21.633" UserId="678" Text="According to [the XNA team's blog][1] today (Fri Nov 5) the connect application will be updated to accept XNA4.0 deployments. I'm guessing you are seeing transients related to the upgrade process.&#xD;&#xA;&#xD;&#xA;If I were you I would try again later today, once the new connect app has been fielded in all markets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/xna/archive/2010/11/03/xblig-4-0-submission-opens-on-app-hub-this-friday.aspx" />
  <row Id="10363" PostHistoryTypeId="2" PostId="5232" RevisionGUID="180e5dce-ba80-4e08-b8b3-1c04334f76a6" CreationDate="2010-11-05T09:17:40.107" UserId="2633" Text="I don't follow your code exactly, but here is a simplified description of the algorithm that will roughly achieve the effect (based on the image you posted).&#xD;&#xA;&#xD;&#xA;The following explanation is not the super optimised version, but is one that's conceptually clear (I hope). Once you have got it running, you can optimise it (quite drastically, in fact).&#xD;&#xA;&#xD;&#xA; 1. Generate n layers of uniform random&#xD;&#xA;    noise (just random greyscale&#xD;&#xA;    pixels). &#xD;&#xA; 2. Now sample each of these by skipping over, 0, 1 (i.e. no) 2, 4, 8, ... 2^(n-1) pixels. Each layer is smoother than the previous one, and interpolating the intermediate pixels.&#xD;&#xA; 3. Now scale of these with a factor of 1, 2, 4, 8, etc. Each layer is darker than the previous one.&#xD;&#xA; 4. Add all these together. &#xD;&#xA; 5. Normalise by dividing each pixel with (1 + 2 + 4 + 8 + ... 2^(n-1)).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The difficult step is the sampling and interpolation step. Suppose we are in the layer skipping over m pixels. Here is the basic idea for m &gt; 1 (if m is 1, we use the image as is):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    for each pixel x and y&#xD;&#xA;       left_sample_coord = m *(x / m) //(integer division, automatically truncated)&#xD;&#xA;       right_sample_coord = (left_sample_point + m) % image_width&#xD;&#xA;       top_sample_point = m*(y / m) &#xD;&#xA;       bottom_sample_coord = (top_sample_point + m) % image_height&#xD;&#xA;    &#xD;&#xA;       horizontal_weight = (x - left_sample_point) / (m - 1)&#xD;&#xA;       vertical_weight = (y - top_sample_point) / (m - 1)&#xD;&#xA;    &#xD;&#xA;       sample_top_left = image(left_sample_coord, top_sample_point)&#xD;&#xA;       //and the same for the other four corners&#xD;&#xA;    &#xD;&#xA;       //now combine the top two points&#xD;&#xA;       top_interpolate = sample_top_left * horizontal_weight + sample_top_right * (1-horizontal_weight)&#xD;&#xA;    &#xD;&#xA;      //now combine the bottom two points&#xD;&#xA;      bottom_interpolate = sample_bottom_left * horizontal_weight + sample_bottom_right * (1-horizontal_weight)&#xD;&#xA;    &#xD;&#xA;      //and combine these two last obtained values&#xD;&#xA;    &#xD;&#xA;      smooth_noise(x, y) = top_interpolate * vertical_weight  + bottom_interpolate * (1 - vertical_weight)&#xD;&#xA;&#xD;&#xA;A few tips:&#xD;&#xA;&#xD;&#xA; - The result of the algorithm above might seem a bit washed out. You can reduce this effect by using the same layer of noise for all layers, or be contrast enhancing the image afterwards.&#xD;&#xA; - The algorithm above uses linear interpolation, but cosine interpolation (do a search) gives much better results.&#xD;&#xA; - Make it possible to look at your layers separately during all parts of the algorithm. This will help you flush out bugs quickly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10364" PostHistoryTypeId="2" PostId="5233" RevisionGUID="60790b01-8ec5-4525-892d-e5f13ba496c2" CreationDate="2010-11-05T09:28:26.267" UserId="2710" Text="There's a great article about noise generation [here][1]. It's not Perlin noise as the article claims (it's pink noise actually), but it is still incredibly useful to understand how noise images are generated.&#xD;&#xA;&#xD;&#xA;So, to actually answer your question: to make a tileable noise image, you just need to keep &quot;tileability&quot; throughout the generation. That is, when noise is smoothed, you smooth it as if it is repeated infinitely in all directions - tiled.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm" />
  <row Id="10365" PostHistoryTypeId="5" PostId="5232" RevisionGUID="1904202e-0d6b-4741-a529-20e3ecc5ffa7" CreationDate="2010-11-05T09:28:49.377" UserId="2633" Comment="deleted 9 characters in body; deleted 2 characters in body" Text="I don't follow your code exactly, but here is a simplified description of the algorithm that will roughly achieve the effect (based on the image you posted).&#xD;&#xA;&#xD;&#xA;The following explanation is not the super optimised version, but is one that's conceptually clear (I hope). Once you have got it running, you can optimise it (quite drastically, in fact).&#xD;&#xA;&#xD;&#xA; 1. Generate n layers of uniform random&#xD;&#xA;    noise (just random greyscale&#xD;&#xA;    pixels). &#xD;&#xA; 2. Now sample each of these by sampling every, 1, 2, 4, 8, ... 2^(n-1) pixels, and interpolating the intermediate pixels. Each layer is smoother than the previous one.&#xD;&#xA; 3. Now scale of these with a factor of 1, 2, 4, 8, etc. Each layer is darker than the previous one.&#xD;&#xA; 4. Add all these together. &#xD;&#xA; 5. Normalise by dividing each pixel with (1 + 2 + 4 + 8 + ... 2^(n-1)).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The difficult step is the sampling and interpolation step. Suppose we are in the layer skipping over m pixels. Here is the basic idea for m &gt; 1 (if m is 1, we use the image as is):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    for each pixel x and y&#xD;&#xA;       left_sample_coord = m *(x / m) //(integer division, automatically truncated)&#xD;&#xA;       right_sample_coord = (left_sample_point + m) % image_width&#xD;&#xA;       top_sample_point = m*(y / m) &#xD;&#xA;       bottom_sample_coord = (top_sample_point + m) % image_height&#xD;&#xA;    &#xD;&#xA;       horizontal_weight = (x - left_sample_point) / (m - 1)&#xD;&#xA;       vertical_weight = (y - top_sample_point) / (m - 1)&#xD;&#xA;    &#xD;&#xA;       sample_top_left = image(left_sample_coord, top_sample_point)&#xD;&#xA;       //and the same for the other four corners&#xD;&#xA;    &#xD;&#xA;       //now combine the top two points&#xD;&#xA;       top_interpolate = sample_top_left * horizontal_weight + sample_top_right * (1-horizontal_weight)&#xD;&#xA;    &#xD;&#xA;      //now combine the bottom two points&#xD;&#xA;      bottom_interpolate = sample_bottom_left * horizontal_weight + sample_bottom_right * (1-horizontal_weight)&#xD;&#xA;    &#xD;&#xA;      //and combine these two last obtained values&#xD;&#xA;    &#xD;&#xA;      smooth_noise(x, y) = top_interpolate * vertical_weight  + bottom_interpolate * (1 - vertical_weight)&#xD;&#xA;&#xD;&#xA;A few tips:&#xD;&#xA;&#xD;&#xA; - The result of the algorithm above might seem a bit washed out. You can reduce this effect by using the same layer of noise for all layers, or be contrast enhancing the image afterwards.&#xD;&#xA; - The algorithm above uses linear interpolation, but cosine interpolation (do a search) gives much better results.&#xD;&#xA; - Make it possible to look at your layers separately during all parts of the algorithm. This will help you flush out bugs quickly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10366" PostHistoryTypeId="5" PostId="4964" RevisionGUID="22e0ef8e-e37c-4997-a0d1-52ccaaf0450f" CreationDate="2010-11-05T10:53:38.117" UserId="1101" Comment="Decided that Wiimote isn't really computer vision. :)" Text="This question is pretty much 'what is a game engine'. Game engines are whatever software is needed to make a game, and there is no accepted checklist of what needs to be in such an engine for it to qualify.&#xD;&#xA;&#xD;&#xA;That said, any simulation-style game will essentially do three things: acquire input, perform simulation, and present output.&#xD;&#xA;&#xD;&#xA;For input you need to consider spatial peripherals such as mice, keyboards, joysticks, joypads, tablets, touch-screens, computer vision systems like Kinect, Wiimotes, etc. You might also consider audio peripherals such as microphones and indeed speech-to-text one layer up from that. The network is also another potential form of input.&#xD;&#xA;&#xD;&#xA;For simulation, a lot of this is game-specific so it's hard to provide generic functionality that suits all games. But systems that may exist for this purpose could include physics simulation, pathfinding and planning algorithms, hooks for script-based decision-making, different types of time-based animation, and so on.&#xD;&#xA;&#xD;&#xA;For output, the classic one is graphics - typically divided into the presentation of 3D models (which in turn tends to divide into environments and vehicles/characters) and 2D sprites and particles, but often with some overlap between the two and additional functionality for post-processing. There may also be support for video streaming support, multi-monitor displays, a GUI/HUD system, etc. Beyond graphics you have sound, usually including positional and non-positional sound effects, streamed music, and maybe filters to apply to the sound. Other forms of output include networking (again), force-feedback devices, log files (often more complex than you think), on-screen debugging aids and overlays.&#xD;&#xA;&#xD;&#xA;There will also be some systems that exist outside of or parallel to the simulation which are useful for development - eg. tools for creating and manipulating game assets, persistence of game state (for save/load), script editors, internationalisation and localisation tools, test suites, etc.&#xD;&#xA;&#xD;&#xA;How many game engines contain all of the above? Probably none of them. I expect some of the commercial offerings come pretty close however.&#xD;&#xA;&#xD;&#xA;What would you have to add to Ogre to get a full game engine? Well, you find out what you need for the kind of game you want, see what Ogre provides for you, and add the rest." />
  <row Id="10370" PostHistoryTypeId="2" PostId="5235" RevisionGUID="c1675b6c-98eb-43aa-bc01-4946d8d550e7" CreationDate="2010-11-05T12:51:56.253" UserId="2316" Text="[Vassal][1] is an open-source Java engine, I believe.  Might not be too difficult to port to JS/HTML5.&#xD;&#xA;&#xD;&#xA;[Aves][2] is put out by Dextrose, but that just got acquired by Zynga, so I don't know any availability for it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vassalengine.org/&#xD;&#xA;  [2]: http://www.dextrose.com/en/projects/aves-engine" />
  <row Id="10371" PostHistoryTypeId="2" PostId="5236" RevisionGUID="d97f6f04-90a6-4306-bae0-d74a133e9e9d" CreationDate="2010-11-05T13:50:12.390" UserId="2167" Text="I'm designing a game calculator . My problem is how to link between the keyboard event and the button. **When I click no.2 button on my Keyboard the button doesn't roolover . &#xD;&#xA;I want the exact button roolover wen I use the keyboard . &#xD;&#xA;## Note&#xD;&#xA;every button have it's instance name &#xD;&#xA;ex:&#xD;&#xA;the button of number one : one_mc&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/SA9rs.jpg&#xD;&#xA;&#xD;&#xA;my code is&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	switch (event.keyCode)&#xD;&#xA;		{&#xD;&#xA;		case 97 :&#xD;&#xA;		 res[1].appendText(&quot;1&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 98 :&#xD;&#xA;		 res[1].appendText(&quot;2&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 99 :&#xD;&#xA;		 res[1].appendText(&quot;3&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 100 :&#xD;&#xA;		 res[1].appendText(&quot;4&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 101 :&#xD;&#xA;		 res[1].appendText(&quot;5&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 102 :&#xD;&#xA;		 res[1].appendText(&quot;6&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 103 :&#xD;&#xA;		 res[1].appendText(&quot;7&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 104 :&#xD;&#xA;		 res[1].appendText(&quot;8&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 105 :&#xD;&#xA;		 res[1].appendText(&quot;9&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 96 :&#xD;&#xA;		 res[1].appendText(&quot;0&quot;);&#xD;&#xA;		break;&#xD;&#xA;		case 8 :&#xD;&#xA;		  res[1].replaceText(res[1].text.length-1,res[1].text.length,'');&#xD;&#xA;		break;&#xD;&#xA;		}" />
  <row Id="10372" PostHistoryTypeId="1" PostId="5236" RevisionGUID="d97f6f04-90a6-4306-bae0-d74a133e9e9d" CreationDate="2010-11-05T13:50:12.390" UserId="2167" Text="How to make the button roolover by a keyboardEvent" />
  <row Id="10373" PostHistoryTypeId="3" PostId="5236" RevisionGUID="d97f6f04-90a6-4306-bae0-d74a133e9e9d" CreationDate="2010-11-05T13:50:12.390" UserId="2167" Text="&lt;game-design&gt;&lt;flash&gt;&lt;flex&gt;" />
  <row Id="10375" PostHistoryTypeId="2" PostId="5237" RevisionGUID="3fa1a718-c1a7-4138-9ed2-bcac30e3adf3" CreationDate="2010-11-05T14:53:42.693" UserId="189" Text="Well, the keyboard doesn't exactly have a &quot;rollover&quot; since it's not a mouse. But you can use the keydown event to change the image to the rollover image, and the keyup event to change it back to the normal image. Then put your code (which you pasted in the question) into either keyup or keypress. This should make the behavior you're looking for.&#xD;&#xA;&#xD;&#xA;By the way, what happens when you press backspace before entering any numbers? I suspect a JavaScript error will occur; look at your `case 8`." />
  <row Id="10376" PostHistoryTypeId="5" PostId="5208" RevisionGUID="4ad29433-465b-43d1-b81e-7d04bf9aa8f5" CreationDate="2010-11-05T15:17:07.220" UserId="3053" Comment="added 1 characters in body" Text="I would like to create an online implementation of a board game. What engines could I use to write the game and make it easily accessible to as many people as possible?&#xD;&#xA;&#xD;&#xA;I would like it to be as widely accessible as possible, so it would be best if the user interface would run in a browser, not in a separately downloaded app. Likewise, it should be cross platform, not limited to a single platform; pure JavaScript/HTML would be best, as that would allow it to be usable on the iPad as well, though Flash or Java may be acceptable. Silverlight doesn't have the market penetration (I don't have it installed, for instance) and XNA is far too limited.&#xD;&#xA;&#xD;&#xA;Other features that would be nice would be good chat and social features (or integration with other chat or social network systems), leaderderboard or tournament systems, and easy integration of bots to provide AI opponents in case there aren't enough human players around. Game timers, to keep people moving at a reasonable rate, would also be good. Saving game records, and allowing people to replay and review records for study, would be nice too, though I'm not expecting much as those types of features tend to only show up in purpose-built engines for games like chess or Go.&#xD;&#xA;&#xD;&#xA;Being free/open-source software would be a big plus, so I could extend it myself, though closed or hosted solutions might be acceptable if they provide enough of the above features or provide some means for extending them.&#xD;&#xA;&#xD;&#xA;Are there any such systems that meet my needs? Or any that are close even if not exactly matching?&#xD;&#xA;&#xD;&#xA;Some similar systems, that don't quite meet my needs, would include:&#xD;&#xA;&#xD;&#xA;* [Yahoo Games][1], which is web based, but I can't write my own games for it (or any of many similar servers in that category).&#xD;&#xA;* [Volity][2], which is built on SVG and XMPP. It's open source, designed to be an open standard, has support for bots, etc, but it requires a separate client download, and seems not to be actively developed or used any more.&#xD;&#xA;* [SuperDuperGames][3], which is an open source, online system for doing turn-based (play-by-mail style) games. That is, it's not live or real time, but instead you submit your moves, and wait for someone to submit theirs, within the next day or so. It's an active community, but I want something where I can play games live, not over the course of weeks or months.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://games.yahoo.com/&#xD;&#xA;  [2]: http://volity.net/&#xD;&#xA;  [3]: http://superdupergames.org/&#xD;&#xA;  [4]: http://www.zillions-of-games.com/" />
  <row Id="10382" PostHistoryTypeId="6" PostId="5199" RevisionGUID="070cd6d0-5712-4d2f-8c40-5730c0f7eb0c" CreationDate="2010-11-05T16:43:59.023" UserId="51" Comment="removing subjective tag" Text="&lt;game-design&gt;&lt;graphics&gt;&lt;tiles&gt;" />
  <row Id="10383" PostHistoryTypeId="2" PostId="5239" RevisionGUID="decda1be-7cc4-4f0c-af65-614b9be6b407" CreationDate="2010-11-05T17:15:29.603" UserId="3076" Text="I have developed and sponsored (the flash game version of selling) an online board game which I made in 5 days. It is called [Quintarow Online.][1]&#xD;&#xA;&#xD;&#xA;My method was to use the development tool called Multimedia Fusion 2 which allows you to very speedily prototype game ideas. A working engine of Quintarow Online was developed in about three hours. The software has an extension which implements the quite wonderful Lacewing Networking Protocol and the server was something I custom wrote in Python using the Lacewing-Python implementation[pyLacewing. It was all a very painless experience.&#xD;&#xA;&#xD;&#xA;That's just how I did it, you might find getting the software too expensive, or it doesnt &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cranktrain.com/quintarow.html" />
  <row Id="10384" PostHistoryTypeId="2" PostId="5240" RevisionGUID="9c487cd9-5416-4d18-9052-ac84434004b5" CreationDate="2010-11-05T17:24:20.150" UserId="1705" Text="From the screenshot, my guess is that only the &quot;big&quot; layers are being generated, which is why the noise appears too regular and lacks detail.&#xD;&#xA;&#xD;&#xA;This may sound stupid, but did you try increasing the &quot;detail&quot; variable (line 16)? In your code, it's set to 1, which means the algorithm will only generate two layers of detail before stopping. Try increasing it to something like 8." />
  <row Id="10385" PostHistoryTypeId="2" PostId="5241" RevisionGUID="fa44f269-d81d-4926-8388-b84228270502" CreationDate="2010-11-05T17:59:39.917" UserId="276" Text="There was a great game for the Acorn Archimedes called Cataclysm - [Video here][1] - which featured water leaking through a space ship.  You had to capture enough water to avoid disaster...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=VMlZ2MwYvuA" />
  <row Id="10386" PostHistoryTypeId="2" PostId="5242" RevisionGUID="a1d43643-9546-42d0-a87b-8458fe0dfd53" CreationDate="2010-11-05T19:23:40.913" UserId="1947" Text="There's a puzzle game called [Enigmo][1] that uses water drops that you may want to check out.  Basically you have to get water (or lava) from the source to the destination container using various contraptions to bounce, accelerate and slide the drops.&#xD;&#xA;&#xD;&#xA;![Enigmo screenshot][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pangeasoft.net/enigmo/index.html&#xD;&#xA;  [2]: http://i.stack.imgur.com/G6Suj.jpg&#xD;&#xA;" />
  <row Id="10387" PostHistoryTypeId="2" PostId="5243" RevisionGUID="534e5ac0-c5c3-447b-b9e0-247f157292eb" CreationDate="2010-11-05T19:33:35.307" UserId="1386" Text="**Assuming I were to develop a graphics engine for a modern game that used only DirectX or OpenGL, which techniques could I use to make sure it ran quickly?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is a fairly open-ended question so I'd be happy for it to be made CW." />
  <row Id="10388" PostHistoryTypeId="1" PostId="5243" RevisionGUID="534e5ac0-c5c3-447b-b9e0-247f157292eb" CreationDate="2010-11-05T19:33:35.307" UserId="1386" Text="How to Make A Fast Graphics Engine?" />
  <row Id="10389" PostHistoryTypeId="3" PostId="5243" RevisionGUID="534e5ac0-c5c3-447b-b9e0-247f157292eb" CreationDate="2010-11-05T19:33:35.307" UserId="1386" Text="&lt;opengl&gt;&lt;directx&gt;&lt;graphics-programming&gt;" />
  <row Id="10390" PostHistoryTypeId="5" PostId="5243" RevisionGUID="e1da6c4c-da97-4eca-9905-43f396b54a6d" CreationDate="2010-11-05T19:38:49.857" UserId="1386" Comment="removed comment about CW." Text="**Assuming I were to develop a graphics engine for a modern game that used only DirectX or OpenGL, which techniques could I use to make sure it ran quickly?**" />
  <row Id="10391" PostHistoryTypeId="2" PostId="5244" RevisionGUID="6d110f36-7c6a-420a-bdc5-3b661a11061b" CreationDate="2010-11-05T19:41:19.480" UserId="3015" Text="Use an existing engine. You can't just &quot;make&quot; an engine; it has to fulfill a need.  If there is no market for a new engine; there is no new engine. " />
  <row Id="10392" PostHistoryTypeId="5" PostId="5243" RevisionGUID="00ef83b2-024b-4829-b18c-787a2d1c313c" CreationDate="2010-11-05T19:53:35.377" UserId="1386" Comment="added 368 characters in body; deleted 164 characters in body; added 3 characters in body" Text="**Assuming I were to develop a graphics engine for a modern PC game that used only DirectX or OpenGL, which techniques could I use to make sure it ran quickly?**&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;I'm looking for any approaches that I could take that would result in a speed increase.&#xD;&#xA;&#xD;&#xA;By *graphics engine* I mean general purpose game engine - such as the one used in Unity or Ogre3D.&#xD;&#xA;" />
  <row Id="10393" PostHistoryTypeId="5" PostId="5243" RevisionGUID="bcee5370-dcbf-4885-abe0-ad7ebd1a1603" CreationDate="2010-11-05T19:59:04.183" UserId="1386" Comment="added 4 characters in body" Text="**Assuming I were to develop a graphics engine for a modern PC game that used only DirectX or OpenGL, which techniques could I use to make sure it ran quickly?**&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;I'm looking for any approaches that I could take that would result in a speed increase.&#xD;&#xA;&#xD;&#xA;By *graphics engine* I mean general purpose graphics engine - such as the one used in Unity or Ogre3D.&#xD;&#xA;" />
  <row Id="10394" PostHistoryTypeId="2" PostId="5245" RevisionGUID="188616d0-91a1-4dd5-8244-b9695d692937" CreationDate="2010-11-05T20:02:08.337" UserId="715" Text="That question is quite the rabbit hole, as stated in another answer don't just make an engine. That's your first mistake you're generalizing something that is inherently specific, performance is all about specifics you have to write code tailored to a specific platform to run a specific type of game.&#xD;&#xA;&#xD;&#xA;These optimizing tend to go as low level as possible, writing custom memory allocators, optimizing cache use, making good use of parallelism, having good algorithms, etc. and like I said a lot of these topics are a big rabbit hole full of &quot;black magic&quot;, that will take months to learn much less master.&#xD;&#xA;&#xD;&#xA;Unless you have a concrete game idea and a platform you will dedicate yourself to for a while, just don't bother you'll be better of with good enough performance and more time on the actual important thing, a good game. Besides hardware is always getting faster so speed won't be an issue for long anyway." />
  <row Id="10395" PostHistoryTypeId="2" PostId="5246" RevisionGUID="347cd115-610c-4790-8307-7621fa41464c" CreationDate="2010-11-05T20:03:50.793" UserId="2316" Text="Depending on the language, you could do this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    switch (Event.keyCode)&#xD;&#xA;    {&#xD;&#xA;      case (int)'0':&#xD;&#xA;        myButton0.click();&#xD;&#xA;        res[1].appendText(&quot;0&quot;);&#xD;&#xA;      break;&#xD;&#xA;      ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It's hard to answer specifics if you don't provide a language.&#xD;&#xA;" />
  <row Id="10396" PostHistoryTypeId="2" PostId="5247" RevisionGUID="0a06ad67-3145-43aa-baee-28a67582dc3f" CreationDate="2010-11-05T20:15:38.657" UserId="2316" Text="Here's something to fiddle with:&#xD;&#xA;&#xD;&#xA;    Connect each room with a door to another room.&#xD;&#xA;    N = 0.75*TotalNumberOfRooms&#xD;&#xA;    Until (pathSize &gt; N) {&#xD;&#xA;      Use A* pathing to get a path from A to B. (G being size of room, or # of monsters)&#xD;&#xA;      if (pathSize &lt; N) remove a connection/door&#xD;&#xA;      if (noPath) choose a different door/connection&#xD;&#xA;      if (room.doors &lt; 1) choose a different door/connection&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;I'd remove doors randomly along the path, otherwise you end up with 1 door at the exit, and tons of doors at the start.&#xD;&#xA;&#xD;&#xA;I think this is `O(n^2)` so not great for large maps." />
  <row Id="10397" PostHistoryTypeId="5" PostId="5216" RevisionGUID="91eca5b1-15f4-4bb8-b70b-17b303a63e2f" CreationDate="2010-11-05T20:35:38.023" UserId="953" Comment="Added identity of Wetrix." Text="Some games that come to mind:&#xD;&#xA;&#xD;&#xA; - Puddle: http://puddle-game.com/&#xD;&#xA; - Vessel: http://www.strangeloopgames.com/&#xD;&#xA; - I-Fluid (sort of): http://www.i-fluid.com/&#xD;&#xA;&#xD;&#xA;There's also a game I seem to remember but wasn't able to find where you are adjusting the terrain of a flat world in preparation for rain to fall, with the goal of trapping the water.&#xD;&#xA;&#xD;&#xA;EDIT: David Young put it in his answer.  Wetrix is what I was thinking of.&#xD;&#xA;&#xD;&#xA;Minecraft has water physics in a similar way that Dwarf Fortress does." />
  <row Id="10398" PostHistoryTypeId="5" PostId="5205" RevisionGUID="3233e8f7-c477-456c-b577-8ca4f27f1080" CreationDate="2010-11-05T21:14:34.043" UserId="1705" Comment="added Kruskal example" Text="A possible alternative would be to create a (maximum?) spanning tree using Prim/Kruskal (in order to eliminate cycles) and apply a traditional longest path algorithm on the spanning tree.&#xD;&#xA;&#xD;&#xA;However, I'm worried that the spanning tree algorithm will tend to create dead-end branches, forcing the player to backtrack constantly.&#xD;&#xA;&#xD;&#xA;**EDIT:** Result of using a Kruskal-based algorithm and placing the exit at the end of the longest branch:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;   0 1 2 3&#xD;&#xA;  #########&#xD;&#xA;0 #A|     #&#xD;&#xA;  # #####-#&#xD;&#xA;1 # #     #&#xD;&#xA;  ###     #&#xD;&#xA;2 ###     #&#xD;&#xA;  ###     #&#xD;&#xA;3 ###     #&#xD;&#xA;  ###-#####&#xD;&#xA;4 #   |   #&#xD;&#xA;  #-#####-#&#xD;&#xA;5 # ###   #&#xD;&#xA;  #-#######&#xD;&#xA;6 #     #B#&#xD;&#xA;  #     #-#&#xD;&#xA;7 #     | #&#xD;&#xA;  #########&lt;/pre&gt;" />
  <row Id="10399" PostHistoryTypeId="5" PostId="5204" RevisionGUID="350ebc9e-a23d-4882-ac8d-582bc1a62b61" CreationDate="2010-11-05T21:54:42.747" UserId="1705" Comment="clarified example" Text="I have a simple grid-based map composed of rooms, like this (A=entrance, B=exit):&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;   0 1 2 3&#xD;&#xA;  #########&#xD;&#xA;0 #B# #####&#xD;&#xA;  #########&#xD;&#xA;1 #   ### #&#xD;&#xA;  #########&#xD;&#xA;2 # #     #&#xD;&#xA;  # #     #&#xD;&#xA;3 # #     #&#xD;&#xA;  #########&#xD;&#xA;4 # ###   #&#xD;&#xA;  #########&#xD;&#xA;5 ###A    #&#xD;&#xA;  ###     #&#xD;&#xA;6 ###     #&#xD;&#xA;  #########&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;And I'm stuck trying to make a suitable algorithm to create a path of doors between the rooms, in such a way that the player has to explore most of the map before finding the exit.&#xD;&#xA;&#xD;&#xA;In other words, I'm trying to find the **longest possible path from A to B**.&#xD;&#xA;&#xD;&#xA;(I'm aware that this problem can be solved for acyclic graphs; however, in this case there can be cycles.)&#xD;&#xA;&#xD;&#xA;**EDIT:** Another example where rooms are connected using floodfill, and the exit is chosen as the farthest room from the entrance:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;   0 1 2 3&#xD;&#xA;  #########&#xD;&#xA;0 #B#     #&#xD;&#xA;  # #-#####&#xD;&#xA;1 # | #   #&#xD;&#xA;  ### #   #&#xD;&#xA;2 ### #   #&#xD;&#xA;  ###-#-###&#xD;&#xA;3 #   | ###&#xD;&#xA;  #-#######&#xD;&#xA;4 #A|     #&#xD;&#xA;  # #     #&#xD;&#xA;5 # #     #&#xD;&#xA;  # #     #&#xD;&#xA;6 # #     #&#xD;&#xA;  #########&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Note that the path to the exit is not the longest possible path at all." />
  <row Id="10400" PostHistoryTypeId="4" PostId="5236" RevisionGUID="207ad967-b0c4-42bc-8278-4a09baa5d260" CreationDate="2010-11-05T23:39:38.840" UserId="395" Comment="Fixing title" Text="How to make the button rollover by a keyboardEvent" />
  <row Id="10401" PostHistoryTypeId="5" PostId="5244" RevisionGUID="75c00dc7-552b-4f6d-8318-defaccea411a" CreationDate="2010-11-06T00:24:25.513" UserId="3015" Comment="Clarified intent" Text="Use an existing engine.&#xD;&#xA;&#xD;&#xA;You can't just &quot;make&quot; an engine; it has to fulfill a need.  If there is no market for a new engine; there is no new engine. " />
  <row Id="10402" PostHistoryTypeId="5" PostId="5227" RevisionGUID="af68d79d-5a87-4478-ac8b-80e2fc6dd411" CreationDate="2010-11-06T00:41:50.837" UserId="189" Comment="added 288 characters in body" Text="I only see a button to download to my Xbox 360. When I clicked it, it said it was added to my &quot;queue&quot;, and I guess it will magically show up on my Xbox? But there is nothing I saw to download...&#xD;&#xA;&#xD;&#xA;Here is a screenshot of the page I see: (notice the &quot;Download to Xbox 360&quot; button in the bottom right)&#xD;&#xA;&#xD;&#xA;![XNA Game Studio Connect][1]&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Edit: I found the queue. And it is as I suspected. My Xbox hasn't recognized the download yet, but I think I already have the XNA Game Studio Connect app on my Xbox, so I'm not sure if it will ever (re-)download.&#xD;&#xA;![Xbox Download Queue][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/96FqT.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/rozRH.png" />
  <row Id="10403" PostHistoryTypeId="5" PostId="5244" RevisionGUID="27accf32-aa51-41e5-8303-7892a836a98b" CreationDate="2010-11-06T00:46:47.643" UserId="3015" Comment="deleted 80 characters in body" Text="Use an existing engine.&#xD;&#xA;&#xD;&#xA;There is no &quot;general purpose&quot; in gaming.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10404" PostHistoryTypeId="2" PostId="5248" RevisionGUID="9de422ae-da97-4d13-a96f-6f9371ba8cc3" CreationDate="2010-11-06T01:20:03.283" UserId="3015" Text="**TL;DR:** Using CSS as an element in defining rulesets in Civ-style turn-based strategy games: Madness or just plain old insanty?&#xD;&#xA;&#xD;&#xA;**Real question:**&#xD;&#xA;&#xD;&#xA;Designing ruleset parse rules is a pain. Every single game out there seems to define its own ruleset for how rulesets are to be parsed (insofar as the game features customizable rulesets, of course).&#xD;&#xA;&#xD;&#xA;Is it time for the game dev. community to embrace standardized synatces for rulesets?&#xD;&#xA;&#xD;&#xA;Is CSS a viable option for customizable games?" />
  <row Id="10405" PostHistoryTypeId="1" PostId="5248" RevisionGUID="9de422ae-da97-4d13-a96f-6f9371ba8cc3" CreationDate="2010-11-06T01:20:03.283" UserId="3015" Text="Usage of standards-compliant tech in gaming: yay or nay?" />
  <row Id="10406" PostHistoryTypeId="3" PostId="5248" RevisionGUID="9de422ae-da97-4d13-a96f-6f9371ba8cc3" CreationDate="2010-11-06T01:20:03.283" UserId="3015" Text="&lt;game-design&gt;&lt;configuration&gt;" />
  <row Id="10407" PostHistoryTypeId="16" PostId="5248" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-06T01:20:55.280" UserId="14" />
  <row Id="10408" PostHistoryTypeId="5" PostId="5248" RevisionGUID="0b87c59d-5cc4-494b-9468-993cca295cd7" CreationDate="2010-11-06T01:29:25.813" UserId="3015" Comment="added 331 characters in body" Text="**TL;DR:** Using CSS as an element in defining rulesets in Civ-style turn-based strategy games: Madness or just plain old insanty?&#xD;&#xA;&#xD;&#xA;**Real question:**&#xD;&#xA;&#xD;&#xA;Designing ruleset parse rules is a pain. Every single game out there seems to define its own ruleset for how rulesets are to be parsed (insofar as the game features customizable rulesets, of course).&#xD;&#xA;&#xD;&#xA;Is it time for the game dev. community to embrace standardized synatces for rulesets?&#xD;&#xA;&#xD;&#xA;Is CSS a viable option for customizable games?&#xD;&#xA;&#xD;&#xA;**Example:** Consider a Civ-like with customizable rulesets; how nice would it not be to be able to design rulesets as follows:&#xD;&#xA;&#xD;&#xA;    artillery:era(modern) {&#xD;&#xA;      range: 2;&#xD;&#xA;      sprite: url(/isophex/artillery.png);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    artillery:era(classical) {&#xD;&#xA;      range: 1;&#xD;&#xA;      sprite: url(/isophex/cannon.png);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="10409" PostHistoryTypeId="2" PostId="5249" RevisionGUID="08ce02d4-5394-40e3-91a0-35422befb572" CreationDate="2010-11-06T01:54:47.710" UserId="395" Text="I'm not sure that is really CSS syntax, so this is more of &quot;$selector { $rules; }&quot; format than CSS itself. My gut reaction is that the &quot;cascading&quot; part of CSS would end up being overly complicated to work with and it would end up looking too much like code at that point." />
  <row Id="10410" PostHistoryTypeId="4" PostId="5248" RevisionGUID="e2cb6712-51a4-4b19-9c0a-4d7e60d4f5b2" CreationDate="2010-11-06T02:09:52.347" UserId="3015" Comment="edited title" Text="Usage of standardized syntaces in gaming: yay or nay?" />
  <row Id="10411" PostHistoryTypeId="4" PostId="5248" RevisionGUID="d0b9fcba-2051-4baf-bea9-701981f44c08" CreationDate="2010-11-06T02:13:53.437" UserId="51" Comment="edited title" Text="Usage of standardized syntaces in gaming: yea or nay?" />
  <row Id="10412" PostHistoryTypeId="4" PostId="5248" RevisionGUID="11c48933-7323-4c5a-b5c5-4e980f43b651" CreationDate="2010-11-06T02:16:31.710" UserId="3015" Comment="edited title" Text="Usage of standardized syntaxes in gaming: yea or nay?" />
  <row Id="10413" PostHistoryTypeId="5" PostId="5248" RevisionGUID="cb696a9f-d9de-45e4-83bb-422630ca8666" CreationDate="2010-11-06T02:17:06.007" UserId="2290" Comment="Fixed spelling" Text="**TL;DR:** Using CSS as an element in defining rulesets in Civ-style turn-based strategy games: Madness or just plain old insanity?&#xD;&#xA;&#xD;&#xA;**Real question:**&#xD;&#xA;&#xD;&#xA;Designing ruleset parse rules is a pain. Every single game out there seems to define its own ruleset for how rulesets are to be parsed (insofar as the game features customizable rulesets, of course).&#xD;&#xA;&#xD;&#xA;Is it time for the game dev. community to embrace standardized synatxes for rulesets?&#xD;&#xA;&#xD;&#xA;Is CSS a viable option for customizable games?&#xD;&#xA;&#xD;&#xA;**Example:** Consider a Civ-like with customizable rulesets; how nice would it not be to be able to design rulesets as follows:&#xD;&#xA;&#xD;&#xA;    artillery:era(modern) {&#xD;&#xA;      range: 2;&#xD;&#xA;      sprite: url(/isophex/artillery.png);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    artillery:era(classical) {&#xD;&#xA;      range: 1;&#xD;&#xA;      sprite: url(/isophex/cannon.png);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="10414" PostHistoryTypeId="10" PostId="5243" RevisionGUID="acac27fa-9111-404f-84b7-98eb0cbd135b" CreationDate="2010-11-06T02:22:49.683" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="10415" PostHistoryTypeId="2" PostId="5250" RevisionGUID="45261b93-51a2-48d9-af12-3769fc4b54a0" CreationDate="2010-11-06T03:16:12.180" UserId="294" Text="As I understand your proposal, you are eanerspeaking about creating an external [Domain Specific Language (DSL)][1] for your game rules, that adheres to a precise and standard syntax.&#xD;&#xA;&#xD;&#xA;From my experience in building DSLs for game rulesets and my reading of [Martin Fowler's recent book on DSLs][2], I gather that two main parts are required to build something like your idea :&#xD;&#xA;&#xD;&#xA; - A Semantic model (or Business model) for what your DSL represents. If you do OOP that would be a class to hold the units with attributes like era, range, strength, etc. (Yet OOP is not compulsory)&#xD;&#xA; - A Parser to populate that model from text files that use your chosen syntax.&#xD;&#xA;&#xD;&#xA;I think that the larger effort is actually in building the model and not the parser, but choosing a standard syntax will make the parser much faster and easier to build. Moreover if the syntax is simple and/or known to the people who write the rules it will be that much easier for them to do that.&#xD;&#xA;&#xD;&#xA;So yes, by all means build a rich business model for your rulesets and then write them using a standard syntax. XML is indeed very often used in that capacity in games and elsewhere, but it's generally thought to be too verbose and is increasingly replaced with leaner formats such as Json or Yaml (and why not CSS).&#xD;&#xA;&#xD;&#xA;Hope that helps put your idea in a different light.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Domain-specific_language&#xD;&#xA;  [2]: http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-Martin/dp/product-description/0321712943" />
  <row Id="10416" PostHistoryTypeId="2" PostId="5251" RevisionGUID="d91e8e73-b70f-4dd2-8f2d-25a743df98cf" CreationDate="2010-11-06T04:13:27.483" UserId="849" Text="Your language looks like CSS, but it isn't. It's your own Domain Specific Language.&#xD;&#xA;&#xD;&#xA;Ask yourself this: Do you really want to create your own file format, for which you need to write a parser. This parser needs to be fast and robust. You also need to document your file format and teach people how it works - after all, it's a customized language. You then need to be aware that you may run into issues you never thought of - maybe someone thought it's a great idea to create a 50 MB file and your parser crashes, corrupting a savegame or so. Or you decide you need to add a feature that can only be implemented with a breaking syntax change, thus breaking all the existing files.&#xD;&#xA;&#xD;&#xA;The reason why formats like XML are so popular is because XML has these problems solved. You can find many great XML parsers that are proven to be robust, fast and leak-free. Also, many people know XML files and how to edit them, and because it's such a generic but well defined syntax you can be sure that you can extend later.&#xD;&#xA;&#xD;&#xA;Your motivation seems to be easy editing by hand, which is common in community SDKs. Now, the reason people edit those files by hand is that they don't have the tools the Game Devs use. You can assume that a company developing a game for several years has some graphical tools for editing such files - they may not be great and bugfree, but they edit the files for you and developers only rarely edit them by hand in order to tweak something. Those tools are rarely released in 'Modding SDKs', so most modders edit by hand.&#xD;&#xA;&#xD;&#xA;So my initial reaction would be: Instead of spending time developing a new, unproven format that is easy to edit by hand, I'd rather use a battle-proven format and spend the time writing tools that make editing easy.&#xD;&#xA;&#xD;&#xA;But blanket statements don't work like that. It always depends. If you spend 3 or more years writing a big game with a sizable dev team, then you can spend a lot of time developing, testing and finetuning your system. If you have 15000 files to parse, then finding ways to reduce memory usage becomes important.&#xD;&#xA;&#xD;&#xA;But for small/medium/indie games, I'd go with a known and well-supported format like XML and a nice tool to edit it." />
  <row Id="10417" PostHistoryTypeId="2" PostId="5252" RevisionGUID="34b442c5-63ae-4bcd-bc6d-ec9006c0934d" CreationDate="2010-11-06T05:13:27.583" UserId="189" Text="I agree with Michael Stum's [suggestion][1] to keep with XML, to avoid writing your own CSS-like parser. If you can find an existing CSS parsing library that's cool, but otherwise, [KISS][2].&#xD;&#xA;&#xD;&#xA;Here's how your example might look in XML:&#xD;&#xA;&#xD;&#xA;    &lt;artillery era=&quot;modern&quot;&gt;&#xD;&#xA;        &lt;range&gt;2&lt;/range&gt;&#xD;&#xA;        &lt;sprite&gt;/isophex/artillery.png&lt;/sprite&gt;&#xD;&#xA;    &lt;/artillery&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;artillery era=&quot;classical&quot;&gt;&#xD;&#xA;        &lt;range&gt;1&lt;/range&gt;&#xD;&#xA;        &lt;sprite&gt;/isophex/cannon.png&lt;/sprite&gt;&#xD;&#xA;    &lt;/artillery&gt;&#xD;&#xA;&#xD;&#xA;Not too different, eh? And with one of the many XML parsing libraries out there, I guarantee it'll be a piece of cake to load such a file.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5248/usage-of-standardized-syntaxes-in-gaming-yea-or-nay/5250#5250&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/KISS_principle" />
  <row Id="10418" PostHistoryTypeId="2" PostId="5253" RevisionGUID="a2205c8c-45ec-47bd-b673-dcd18258936c" CreationDate="2010-11-06T05:47:04.190" UserId="2995" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Commercial**&#xD;&#xA;&#xD;&#xA;- [Blade3d][1] - v1.0 Released November 2008. Died July 2009 &#xD;&#xA;- [Visual3d.net][2] - always seems to be in beta. &#xD;&#xA;- [TorqueX][3] - 1.0 was 2d only. 2.0 release adds 3d.&#xD;&#xA;  - TorqueX Game Builder available (for free for Creators club members) to help build 2D games from a drag and drop UI. &#xD;&#xA;  - TorqueX World Builder to help build 3D game levels with a 3d object and lighting editor&#xD;&#xA;-  [SunBurn][4] (Rendering engine). There is a discount for Premium members. &#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;-  [Axiom3d][5] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [Flat Red Ball][6] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;-  [Ox][7] - a 3d version of the ButterMilk 2d engine &#xD;&#xA;-  [QuickStart 3D Game Engine][8] - now at [v0.2][9]&#xD;&#xA;-  [X-Engine][10]: 3D Graphics and Physics Engine for XNA &#xD;&#xA;-  [BetaCell][11] &#xD;&#xA;-  [Thrust][12] - part engine part framework &#xD;&#xA;- The [Ship Game][13] and the [Robot Game][14] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [EGGEngine][15]&#xD;&#xA;- [Tomahawk][16] - Pretty well supported engine.&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][17]&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products. You should look at each one and determine pricing and licensing.&#xD;&#xA;&#xD;&#xA;- [Farseer][18] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][19] - Source available, port of C++ [JigLib][20], formerly JiggleX &#xD;&#xA;- [Bullet][21]  &#xD;&#xA;   - [BulletX][22]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][23]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][24] &#xD;&#xA;- [Oops! 3D Physics Framework][25] &#xD;&#xA;- [Bepu physics][26] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][27] - soft body physics. Used in [JelloCar][28] and other fun [Walaber][29] games. &#xD;&#xA;- [Physics2D.Net][30] - see demo video &#xD;&#xA;&#xD;&#xA;If you are only targetting windows then you can use any of the commercial, or open source engines. Some have managed wrappers or you may need to roll your own&#xD;&#xA;&#xD;&#xA;- [PhysX][31] &#xD;&#xA;    - [PhysX.NET][32]&#xD;&#xA;    - MS Robotics Studio has a wrapper but check the license. &#xD;&#xA;- [ODE][33] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][34] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly. &#xD;&#xA;- [Newton Game Dynamics][35]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blade3d.com/&#xD;&#xA;  [2]: http://www.visual3d.net/&#xD;&#xA;  [3]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [4]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [5]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [6]: http://www.flatredball.com/frb/&#xD;&#xA;  [7]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [8]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [9]: http://forums.xna.com/forums/t/38853.aspx&#xD;&#xA;  [10]: http://www.codeplex.com/xengine&#xD;&#xA;  [11]: http://www.betacell3d.com/&#xD;&#xA;  [12]: http://focusedgames.com/fg-framework/&#xD;&#xA;  [13]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [14]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [15]: http://www.portalgames.org/&#xD;&#xA;  [16]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [17]: http://www.codeplex.com/mpe&#xD;&#xA;  [18]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [19]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [20]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [21]: http://bulletphysics.com/&#xD;&#xA;  [22]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [23]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [24]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [25]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [26]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [27]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [28]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [29]: http://walaber.com/&#xD;&#xA;  [30]: http://physics2d.googlepages.com/&#xD;&#xA;  [31]: http://www.ageia.com/&#xD;&#xA;  [32]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [33]: http://ode.org/&#xD;&#xA;  [34]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [35]: http://www.newtondynamics.com/" />
  <row Id="10419" PostHistoryTypeId="5" PostId="5253" RevisionGUID="e2173da9-f47b-486a-a300-fc0ad8fe9de0" CreationDate="2010-11-06T05:55:37.203" UserId="2995" Comment="added 54 characters in body" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Commercial**&#xD;&#xA;&#xD;&#xA;- [Visual3d.net][1] - always seems to be in beta. &#xD;&#xA;- [TorqueX][2] - 2.0 release adds 3d.&#xD;&#xA;  - TorqueX Game Builder available (for free for Creators club members) to help build 2D games from a drag and drop UI. &#xD;&#xA;  - TorqueX World Builder to help build 3D game levels with a 3d object and lighting editor&#xD;&#xA;-  [SunBurn][3] (Rendering engine). There is a discount for Premium members. &#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;-  **[Ox Game Engine][6]** - **a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows** (recommended)&#xD;&#xA;-  [Axiom3d][4] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [Flat Red Ball][5] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;-  [QuickStart][7] 3D Game Engine - now at [v0.2][8]&#xD;&#xA;-  [X-Engine][9]: 3D Graphics and Physics Engine for XNA &#xD;&#xA;-  [BetaCell][10] &#xD;&#xA;-  [Thrust][11] - part engine part framework &#xD;&#xA;- The [Ship Game][12] and the [Robot Game][13] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [EGGEngine][14]&#xD;&#xA;- [Tomahawk][15] - Pretty well supported engine.&#xD;&#xA;- [FireFly][16]&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][17]&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products. You should look at each one and determine pricing and licensing.&#xD;&#xA;&#xD;&#xA;- [Farseer][18] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][19] - Source available, port of C++ [JigLib][20], formerly JiggleX &#xD;&#xA;- [Bullet][21]  &#xD;&#xA;   - [BulletX][22]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][23]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][24] &#xD;&#xA;- [Oops! 3D Physics Framework][25] &#xD;&#xA;- [Bepu physics][26] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][27] - soft body physics. Used in [JelloCar][28] and other fun [Walaber][29] games. &#xD;&#xA;- [Physics2D.Net][30] - see demo video &#xD;&#xA;&#xD;&#xA;If you are only targetting windows then you can use any of the commercial, or open source engines. Some have managed wrappers or you may need to roll your own&#xD;&#xA;&#xD;&#xA;- [PhysX][31] &#xD;&#xA;    - [PhysX.NET][32]&#xD;&#xA;    - MS Robotics Studio has a wrapper but check the license. &#xD;&#xA;- [ODE][33] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][34] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly. &#xD;&#xA;- [Newton Game Dynamics][35]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.visual3d.net/&#xD;&#xA;  [2]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [3]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [4]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [5]: http://www.flatredball.com/frb/&#xD;&#xA;  [6]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [7]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [8]: http://forums.xna.com/forums/t/38853.aspx&#xD;&#xA;  [9]: http://www.codeplex.com/xengine&#xD;&#xA;  [10]: http://www.betacell3d.com/&#xD;&#xA;  [11]: http://focusedgames.com/fg-framework/&#xD;&#xA;  [12]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [13]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [14]: http://www.portalgames.org/&#xD;&#xA;  [15]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [16]: http://www.codeplex.com/FireflyEngine&#xD;&#xA;  [17]: http://www.codeplex.com/mpe&#xD;&#xA;  [18]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [19]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [20]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [21]: http://bulletphysics.com/&#xD;&#xA;  [22]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [23]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [24]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [25]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [26]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [27]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [28]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [29]: http://walaber.com/&#xD;&#xA;  [30]: http://physics2d.googlepages.com/&#xD;&#xA;  [31]: http://www.ageia.com/&#xD;&#xA;  [32]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [33]: http://ode.org/&#xD;&#xA;  [34]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [35]: http://www.newtondynamics.com/" />
  <row Id="10420" PostHistoryTypeId="5" PostId="5253" RevisionGUID="ece99c09-c405-4e50-a664-07cfa128933f" CreationDate="2010-11-06T06:00:53.570" UserId="2995" Comment="added 170 characters in body; added 68 characters in body" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Commercial**&#xD;&#xA;&#xD;&#xA;- [Visual3d.net][1] - always seems to be in beta. &#xD;&#xA;- [TorqueX][2] - 2.0 release adds 3d.&#xD;&#xA;  - TorqueX Game Builder available (for free for Creators club members) to help build 2D games from a drag and drop UI. &#xD;&#xA;  - TorqueX World Builder to help build 3D game levels with a 3d object and lighting editor&#xD;&#xA;-  [SunBurn][3] (Rendering engine). There is a discount for Premium members. &#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;-  **[Ox Game Engine][4]** - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows&#xD;&#xA;-  [Axiom3d][5] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [Flat Red Ball][6] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;-  [QuickStart][7] 3D Game Engine - now at [v0.2][8]&#xD;&#xA;-  [X-Engine][9]: 3D Graphics and Physics Engine for XNA &#xD;&#xA;-  [BetaCell][10] &#xD;&#xA;-  [Thrust][11] - part engine part framework &#xD;&#xA;- The [Ship Game][12] and the [Robot Game][13] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [EGGEngine][14]&#xD;&#xA;- [Tomahawk][15] - Pretty well supported engine.&#xD;&#xA;- [FireFly][16]&#xD;&#xA;- [TXna Game Engine][17] - Includes scene editor&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][18]&#xD;&#xA;- [Dynamic Particle System Framework][19]&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products. You should look at each one and determine pricing and licensing.&#xD;&#xA;&#xD;&#xA;- [Farseer][20] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][21] - Source available, port of C++ [JigLib][22], formerly JiggleX &#xD;&#xA;- [Bullet][23]  &#xD;&#xA;   - [BulletX][24]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][25]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][26] &#xD;&#xA;- [Oops! 3D Physics Framework][27] &#xD;&#xA;- [Bepu physics][28] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][29] - soft body physics. Used in [JelloCar][30] and other fun [Walaber][31] games. &#xD;&#xA;- [Physics2D.Net][32] - see demo video &#xD;&#xA;&#xD;&#xA;If you are only targetting windows then you can use any of the commercial, or open source engines. Some have managed wrappers or you may need to roll your own&#xD;&#xA;&#xD;&#xA;- [PhysX][33] &#xD;&#xA;    - [PhysX.NET][34]&#xD;&#xA;    - [Wrapper][35] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][36] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][37] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly. &#xD;&#xA;- [Newton Game Dynamics][38]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.visual3d.net/&#xD;&#xA;  [2]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [3]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [4]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [5]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [6]: http://www.flatredball.com/frb/&#xD;&#xA;  [7]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [8]: http://forums.xna.com/forums/t/38853.aspx&#xD;&#xA;  [9]: http://www.codeplex.com/xengine&#xD;&#xA;  [10]: http://www.betacell3d.com/&#xD;&#xA;  [11]: http://focusedgames.com/fg-framework/&#xD;&#xA;  [12]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [13]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [14]: http://www.portalgames.org/&#xD;&#xA;  [15]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [16]: http://www.codeplex.com/FireflyEngine&#xD;&#xA;  [17]: http://sourceforge.net/projects/txnagameengine/&#xD;&#xA;  [18]: http://www.codeplex.com/mpe&#xD;&#xA;  [19]: http://dpsf.danskingdom.com/&#xD;&#xA;  [20]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [21]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [22]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [23]: http://bulletphysics.com/&#xD;&#xA;  [24]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [25]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [26]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [27]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [28]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [29]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [30]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [31]: http://walaber.com/&#xD;&#xA;  [32]: http://physics2d.googlepages.com/&#xD;&#xA;  [33]: http://www.ageia.com/&#xD;&#xA;  [34]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [35]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [36]: http://ode.org/&#xD;&#xA;  [37]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [38]: http://www.newtondynamics.com/" />
  <row Id="10421" PostHistoryTypeId="2" PostId="5254" RevisionGUID="8cb77416-77c9-4845-ace6-f4f4947e70ab" CreationDate="2010-11-06T08:07:10.743" UserId="3076" Text="Here's two methods not yet discussed:&#xD;&#xA;&#xD;&#xA;Microtransactions! These are the cheap extras that people can buy from within a game. These can be extra weapons, more maps or even just the other half of the game itself (treating the free offering as a demo version). There are three 'big' companies that make this easy for developers. [Mochi's Coins][1] make it very easy, but they take 40% and that is *before* 'costs'. FlashGameLicense do [GamerSafe][2] which has the same 40/60 split between them and the developer, *but* they have far, far less branding than Mochi. Mochi also forces the player to go to their site to buy Coins. Better, however, than both of these is Jambool's [Social Gold][3] which comes straight out of the Facebook microtransaction goldrush. There is no branding, users can buy your virtual currency straight in your game and you keep 90% of the profits. I'd use Social Gold if I were you. A few other notes, Sponsors hate microtransactions, so unless you have an awesome game, don't expect to get a good sponsorship while microtransactions are within your game. I think microtransactions work at their best when there is a multiplayer, or at least social, aspect to the game. &#xD;&#xA;&#xD;&#xA;Self-publishing is a risky move, but it can pay off in the long term. This is where you host your games yourself. You are basically running a portal and revenue comes not just from in-game ads but from the ads scattered round the design of the site. Not a particularly *nice* option because you may have to spend a year or two just building an audience and having people return to your arcade daily. It's a massively competitive market too. On top of all that, administering that website really is a full time job and you'll probably do less game development as a result.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.mochimedia.com/developers/coins.html&#xD;&#xA;  [2]: http://GamerSafe.com&#xD;&#xA;  [3]: http://www.jambool.com/socialgold/why_use_social_gold" />
  <row Id="10422" PostHistoryTypeId="2" PostId="5255" RevisionGUID="eea95c50-2ae0-4afe-875f-c1ff9b89662d" CreationDate="2010-11-06T08:19:02.053" UserId="20" Text="Personally, I would also use XML for rulesets or other config-files.&#xD;&#xA;&#xD;&#xA;There are some other alternatives like [YAML][1] or [JSON][2] though. These are usually smaller in file-size than XML files (if that's a concern) and there are robust parsers out there to read these files. Their syntax is also closer to CSS if that's important to you :-)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yaml.org/&#xD;&#xA;  [2]: http://json.org/" />
  <row Id="10423" PostHistoryTypeId="2" PostId="5256" RevisionGUID="5e475a6e-e84d-4490-b0ff-3256c18e8406" CreationDate="2010-11-06T09:15:48.037" UserId="20" Text="Don't use Buttons, use MovieClip instances (different states on different frames) instead. That gives some more work to do since you'll have to switch states manually, but gives more flexibility.&#xD;&#xA;&#xD;&#xA;Here's an example with 3 different states (normal, hover, click): http://pastie.org/1276725&#xD;&#xA;&#xD;&#xA;As you can see, it has public methods to trigger all states. The mouse-events are triggered automatically, but you can use these public methods to change states externally (eg. from keyboard input)." />
  <row Id="10424" PostHistoryTypeId="2" PostId="5257" RevisionGUID="ca39d552-a9fe-4413-b13f-5d0a2f84e6b7" CreationDate="2010-11-06T11:00:28.160" UserId="744" Text="What you're proposing isn't a standard syntax. It _looks like_ a standard syntax, but it's not really CSS, and the CSS model doesn't fit what you're trying to do. The syntax is good at selecting structures, but not describing them.&#xD;&#xA;&#xD;&#xA;Screw XML. It's verbose, noisy, annoying to parse, lots of tricky edge cases, and for all its claims of validation, no one really does that. I suggest &lt;a href=&quot;http://yaml.org/&quot;&gt;YAML&lt;/a&gt;. It's a standard data description format, with parsing libraries available for any practical programming language.&#xD;&#xA;&#xD;&#xA;So here's what your code would look like in YAML - first as a bare untyped variant, then with optional type tags for people who are too pedantic to actually get work done.&#xD;&#xA;&#xD;&#xA;    artillery:&#xD;&#xA;        modern:&#xD;&#xA;            range: 2&#xD;&#xA;            sprite: /isophex/artillery.png&#xD;&#xA;        classical:&#xD;&#xA;            range: 1&#xD;&#xA;            sprite: /isophex/cannon.png&#xD;&#xA;&#xD;&#xA;    --&#xD;&#xA;    artillery:&#xD;&#xA;        !Era modern: !Artillery&#xD;&#xA;            range: 2&#xD;&#xA;            sprite: !URI /isophex/artillery.png&#xD;&#xA;        !Era classical: !Artillery&#xD;&#xA;            range: 1&#xD;&#xA;            sprite: !URI /isophex/cannon.png&#xD;&#xA;&#xD;&#xA;The second format sucks. In practice, you don't really care if someone puts an !Era or a !Period or just a plain untyped dictionary there, as long as it has the keys you want - range and sprite. It's analogous to &lt;a href=&quot;http://en.wikipedia.org/wiki/Duck_typing&quot;&gt;duck typing&lt;/a&gt; in programming languages, and it makes things a lot more readable. If it doesn't have the keys you want, it's easy to detect that at load-time even without a schema. Which is great, because you need the code anyway, so why repeat yourself? (It also means as long as the application knows how to resolve URIs, you don't run the risk of someone accidentally calling them URLs and failing to validate for stupid reasons, as you've already done.)&#xD;&#xA;&#xD;&#xA;If you really need to have a parsable description of the data files - like, you want to automatically generate property sheets for editors and for some reason doing it in the same codebase as your engine is not acceptable - you can use something like &lt;a href=&quot;http://www.kuwata-lab.com/kwalify/&quot;&gt;Kwalify&lt;/a&gt; schemas." />
  <row Id="10426" PostHistoryTypeId="5" PostId="1271" RevisionGUID="0475d617-0752-468a-aef8-d35d8ba1a59b" CreationDate="2010-11-06T12:03:40.657" UserId="1199" Comment="Edited the format, added a link - let's make it a standard!" Text="**[Game Programming Gems][1]**, all of them.&lt;br/&gt; &#xD;&#xA;&#xD;&#xA;Even just reading them will give you a lot of ideas and insights in different approaches that will spark your thought processes and will give you a nice interdisciplinary toolbag. Also, lots of references to other interesting works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprogramminggems.com/" />
  <row Id="10427" PostHistoryTypeId="5" PostId="1306" RevisionGUID="c4d7b4f0-007c-4758-9352-cca0c8180d1c" CreationDate="2010-11-06T12:04:58.173" UserId="1199" Comment="Edited the format, let's make it a standard!" Text="**[Mathematics and Physics for Programmers][1]**&lt;br /&gt;&#xD;&#xA;&#xD;&#xA;I see no one talked about this one, wich I think is a must-must for any game programmers. A lot of good stuff about mathematics used in video games like trigonometry, vectors, ballistic and collisions and some more complex motion laws. It's a must have in your bookshelf !&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;And I almost forget... &quot;**Clean Code**&quot; and &quot;**The Pragmatic Programmer**&quot; are really nice books to read and keep not too far when working in a developer team. Teach you about how to make good programs that will save time and money to your team.&#xD;&#xA;&#xD;&#xA;Don't have the Rep to post more than one hyperlink sorry...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279840452&amp;sr=8-1" />
  <row Id="10428" PostHistoryTypeId="5" PostId="1269" RevisionGUID="700308ef-7c13-40af-96c6-0e78bf350186" CreationDate="2010-11-06T12:06:46.783" UserId="1199" Comment="Edited the format and added a link - let's make it a standard!; edited body" Text="**[Programming Game AI by Example][1], by Mat Buckland**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782" />
  <row Id="10429" PostHistoryTypeId="5" PostId="1293" RevisionGUID="936f7593-b9e5-4822-908f-8c0d8876e14c" CreationDate="2010-11-06T12:07:25.863" UserId="1199" Comment="Edited the format - let's make it a standard!; added 6 characters in body" Text="**[Real Time Cameras][1]**&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;I really liked this one. Its contents are pretty standard in terms of engine/rendering structure, but it also considers game narrative through cameras. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimecameras.com/ &quot;Real Time Cameras&quot;" />
  <row Id="10430" PostHistoryTypeId="5" PostId="1277" RevisionGUID="c2236fab-8495-4739-8462-6db0d721048b" CreationDate="2010-11-06T12:09:32.333" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[Game Engine Architecture](http://rads.stackoverflow.com/amzn/click/1568814135) by Jason Gregory**&lt;br /&gt;  &#xD;&#xA;Touches on most areas involved in game development. Because of the number of subjects covered the book doesn't go into depth in any specific area but gives a broader view. I recommend anyone interested in game development read this book.&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;&#xD;&#xA;**[Real-time Rendering](http://rads.stackoverflow.com/amzn/click/1568814240)**&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;If your interests lie in 3D rendering; this is **the** reference book to own. The book is theoretical and requires the reader have strong math skills.&#xD;&#xA;&#xD;&#xA;Also if you're developing shaders (then you probably already know this but) the ShaderX series are a great read, and the series will continue under the name [GPU Pro](http://rads.stackoverflow.com/amzn/click/1568814720). (I have not read this one yet though)&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;&#xD;&#xA;**[Real-Time Collision Detection](http://rads.stackoverflow.com/amzn/click/1558607323) by Christer Ericson&lt;br /&gt;**  &#xD;&#xA;Collision detection has always been an integral part of game development, and this is a great book on the subject covering a huge area." />
  <row Id="10431" PostHistoryTypeId="5" PostId="1271" RevisionGUID="0fb8e9ce-202c-497a-9904-ff86d3801bab" CreationDate="2010-11-06T12:09:46.437" UserId="1199" Comment="edited body" Text="**[Game Programming Gems][1], all of them.**&lt;br/&gt; &#xD;&#xA;&#xD;&#xA;Even just reading them will give you a lot of ideas and insights in different approaches that will spark your thought processes and will give you a nice interdisciplinary toolbag. Also, lots of references to other interesting works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprogramminggems.com/" />
  <row Id="10432" PostHistoryTypeId="5" PostId="1431" RevisionGUID="7d9a416b-401d-463a-a7db-08d49a3b77de" CreationDate="2010-11-06T12:10:42.817" UserId="1199" Comment="Edited the format a bit - let's make it a standard!" Text="**[The Design of Everyday Things][1]**&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;Someone said it's a must read for all programmers and I completely agree with that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/8Qan " />
  <row Id="10433" PostHistoryTypeId="5" PostId="1283" RevisionGUID="a68e6b4e-04b0-46dd-a12f-a99f46bd8ad5" CreationDate="2010-11-06T12:11:26.323" UserId="1199" Comment="Edited the format a bit. Let's make it a standard!" Text="**[Game Coding Complete 3rd, Ed.][1]**&#xD;&#xA;&#xD;&#xA;This one is great for programming best practices and tips from the trenches.  Tons of game programming books have you go down the same path with whatever scripting language or engine they are pimping.  This book goes into WHY you should do things for game development.  For example, the networking section talks about why you should do things for games that normally would never be done for non-game applications.  Those nuggets of information, backed up by experience, are priceless.&#xD;&#xA;&#xD;&#xA;For game design, the best book, hands down, is The Art of Game Design (linked in other answers)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279833961&amp;sr=8-1&#xD;&#xA;" />
  <row Id="10434" PostHistoryTypeId="5" PostId="1428" RevisionGUID="878317ca-d024-436b-a2d7-90ba13dfdee5" CreationDate="2010-11-06T12:11:39.117" UserId="1199" Comment="added 8 characters in body" Text="**[The Pragmatic Programmer: From Journeyman to Master][1]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I learn something every time I read this.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pragprog.com/titles/tpp/the-pragmatic-programmer" />
  <row Id="10435" PostHistoryTypeId="5" PostId="1298" RevisionGUID="56ef0374-19e9-4fa7-9727-09edd99a1975" CreationDate="2010-11-06T12:12:16.713" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[Rules of Play](http://www.amazon.com/Rules-Play-Game-Design-Fundamentals/dp/0262240459/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279837235&amp;sr=8-1)**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Personally, I'm a huge fan of this one for game designers.  It offers a lot of examples and exercises for people looking into game design as a career." />
  <row Id="10436" PostHistoryTypeId="5" PostId="1285" RevisionGUID="4827a086-b08d-4d78-9f52-b6137a8eacdd" CreationDate="2010-11-06T12:13:27.430" UserId="1199" Comment="Edited the format a bit - let's make it a standard!" Text="**[Code Complete 2][1]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Although it is a general programming book, you shouldn't miss it! &#xD;&#xA;It teaches you a lot of things every programmer should know.&#xD;&#xA;  [1]: http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1279834743&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10437" PostHistoryTypeId="5" PostId="1378" RevisionGUID="cc4acbe0-ef77-4769-9140-aae030a0a6c0" CreationDate="2010-11-06T12:13:59.053" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[Introduction to 3D Game Programming with DirectX 9.0c: a Shader Approach][1]** &#xD;&#xA;&#xD;&#xA;This was the best book I've ever found on teaching game/graphics development. It starts with an overview of the math involved and moves on to explaining DirectX. But the lessons can useful beyond DirectX: it explains, at a mathematical level, lighting and shadows and normals and many other things.&#xD;&#xA;&#xD;&#xA;I recommend it for all the newbies like me &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/dp/1598220160?tag=ebookpdf-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=1598220160&amp;adid=16QGKH8NSMRYQJ0SPG5J&amp;" />
  <row Id="10438" PostHistoryTypeId="5" PostId="1309" RevisionGUID="d3e3808c-800a-4799-896a-bf059b46e2db" CreationDate="2010-11-06T12:14:25.057" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[OpenGL Red Book][1]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is a must have on your bookshelf as a developer.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321552628/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1279840731&amp;sr=8-2" />
  <row Id="10439" PostHistoryTypeId="5" PostId="1275" RevisionGUID="352728c6-3d88-4be2-ac5e-66c4fb701ba9" CreationDate="2010-11-06T12:14:57.770" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[Game Development Essentials][1]**&#xD;&#xA;&#xD;&#xA;I'm just starting them but the series looks promising.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.delmarlearning.com/browse_quicksearch.aspx?search=Game+Development+Essentials" />
  <row Id="10440" PostHistoryTypeId="5" PostId="1326" RevisionGUID="9e2c75c2-61f6-44e8-b2bf-0c247cad3856" CreationDate="2010-11-06T12:15:37.317" UserId="1199" Comment="Edited the format a bit, let's make it a standard! " Text="**[Game Engine Architecture][1]** &#xD;&#xA;&#xD;&#xA;It gives an overview of a game engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135" />
  <row Id="10441" PostHistoryTypeId="5" PostId="1266" RevisionGUID="df016892-ac92-4e0b-b77c-e4cfc2810fca" CreationDate="2010-11-06T12:16:13.183" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[The Art of Game Design: A book of lenses][1]**&#xD;&#xA;&#xD;&#xA;**[A Theory of Fun for Game Design][2]**&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965&#xD;&#xA;  [2]: http://www.amazon.com/Theory-Fun-Game-Design/dp/1932111972/" />
  <row Id="10442" PostHistoryTypeId="5" PostId="2910" RevisionGUID="64123efd-aace-4f90-8e2c-c6006431f9a0" CreationDate="2010-11-06T12:16:57.113" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[Rapid Development (Amazon.com)][1]**&#xD;&#xA;&#xD;&#xA;Even though it's more about the development process than actual programming, I'd still recommend anyone involved in development to read Rapid Development (the &quot;other&quot; Steve McConnell book)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Rapid-Development-Taming-Software-Schedules/dp/1556159005/" />
  <row Id="10443" PostHistoryTypeId="5" PostId="1357" RevisionGUID="9bcec722-6053-4232-90e2-16f12c278205" CreationDate="2010-11-06T12:18:02.213" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[&quot;For The Win&quot;][1]**&#xD;&#xA;&#xD;&#xA;This is a novel book but seems like a perfect book for Gamedev according to me.&#xD;&#xA;Free download at http://craphound.com/ftw/download/ by the BoingBoing founder.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://craphound.com/ftw/download/" />
  <row Id="10444" PostHistoryTypeId="5" PostId="1432" RevisionGUID="bbda4b90-b547-476b-8790-f557bd4eab2c" CreationDate="2010-11-06T12:18:30.997" UserId="1199" Comment="Edited the format a bit, let's make it a standard!" Text="**[Game Scripting Mastery][1]** &#xD;&#xA;&#xD;&#xA;takes you up from the basics of scripting to assemblers, compilers and virtual machines. I love this book.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Scripting-Mastery-Premier-Press-Development/dp/1931841578" />
  <row Id="10445" PostHistoryTypeId="5" PostId="1280" RevisionGUID="f0c7e179-2628-401d-b87c-26bb6e2511ad" CreationDate="2010-11-06T12:20:21.773" UserId="1199" Comment="Edited the format a bit, let's make it a standard! One series per answer? " Text="**[3D Game Engine Design](http://www.amazon.com/dp/0122290631/) and [3D Game Engine Architecture](http://www.amazon.com/dp/012229064X/)**&#xD;&#xA;&#xD;&#xA;both by David Eberly, are quite good, if a bit heavy on the math.&#xD;&#xA;&lt;br /&gt;&lt;br/&gt;&lt;br/&gt;&#xD;&#xA;**[Game Engine Gems](http://www.amazon.com/dp/0763778885/)** &#xD;&#xA;&#xD;&#xA;*just* came out, and I've been enjoying its content so far. It's been a lot more helpful in some areas than the Game Programming Gems series (of which I've read up to Vol. 5)." />
  <row Id="10446" PostHistoryTypeId="2" PostId="5258" RevisionGUID="07e17e15-cae4-43af-a204-4522e7d2cd80" CreationDate="2010-11-06T12:21:00.733" UserId="3071" Text="**[Tricks of the Windows Game Programming Gurus (2nd Edition)][1]**&#xD;&#xA;&#xD;&#xA;This book taught me a lot...&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Tricks-Windows-Game-Programming-Gurus/dp/0672323699/ref=sr_1_fkmr1_2?ie=UTF8&amp;qid=1289045893&amp;sr=8-2-fkmr1" />
  <row Id="10447" PostHistoryTypeId="2" PostId="5259" RevisionGUID="3d58b620-f616-4632-8952-e1847915356e" CreationDate="2010-11-06T13:46:15.037" UserId="3096" Text="Flood on the amgia had a water filling effect.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=8EbGjm_x808&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;worse things happen at sea (don't be put by the graphics, this game was awesome fun!)&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/uXeMK.gif" />
  <row Id="10448" PostHistoryTypeId="2" PostId="5260" RevisionGUID="2b681bb4-2471-492a-a059-ace984602932" CreationDate="2010-11-06T14:52:35.790" UserId="2156" Text="I'm currently talking with a design studio for the artworks of my game. They are saying they want to still own the IP of their chracter graphic in my game as they want to sell merchandise with my character idea and their artwork.&#xD;&#xA;&#xD;&#xA;I'd like to know what kind of stuffs should I look out for in such an agreement. Does owning the character graphics mean, later they can come up and say me I can't use it in my game?" />
  <row Id="10449" PostHistoryTypeId="1" PostId="5260" RevisionGUID="2b681bb4-2471-492a-a059-ace984602932" CreationDate="2010-11-06T14:52:35.790" UserId="2156" Text="Character and graphic IP question" />
  <row Id="10450" PostHistoryTypeId="3" PostId="5260" RevisionGUID="2b681bb4-2471-492a-a059-ace984602932" CreationDate="2010-11-06T14:52:35.790" UserId="2156" Text="&lt;legal&gt;" />
  <row Id="10451" PostHistoryTypeId="2" PostId="5261" RevisionGUID="77455fb8-8ac3-4813-aa89-1ae769a9e039" CreationDate="2010-11-06T14:59:50.767" UserId="1345" Text="In which category these phone games can be placed and how they can be differentiate with other platforms." />
  <row Id="10452" PostHistoryTypeId="1" PostId="5261" RevisionGUID="77455fb8-8ac3-4813-aa89-1ae769a9e039" CreationDate="2010-11-06T14:59:50.767" UserId="1345" Text="How can be andoid and iPhone game classified?" />
  <row Id="10453" PostHistoryTypeId="3" PostId="5261" RevisionGUID="77455fb8-8ac3-4813-aa89-1ae769a9e039" CreationDate="2010-11-06T14:59:50.767" UserId="1345" Text="&lt;iphone&gt;&lt;android&gt;" />
  <row Id="10454" PostHistoryTypeId="2" PostId="5262" RevisionGUID="1d561631-254f-4d2b-990b-6078de3df527" CreationDate="2010-11-06T15:06:08.873" UserId="2815" Text="Looks to me like they create the artwork and own everything, but you buy the right for like one game.  So if you have the right contract they cannot say you can't use it in your game, but any later game they can say that.  And you probably will have to buy the rights again for any later game.  But this is all in what you sign.  If the contract say you can use the caracter in all later games and they have the rights for any other merchandise - then that's the agreement.&#xD;&#xA;&#xD;&#xA;I'd say just read and understand the contract before signing..." />
  <row Id="10455" PostHistoryTypeId="5" PostId="5261" RevisionGUID="f0c58085-8299-4213-b49f-8ca5729f61a6" CreationDate="2010-11-06T16:05:09.727" UserId="1345" Comment="added 1 characters in body" Text="In which category these phone games can be placed and how they can be differentiated with other platforms." />
  <row Id="10456" PostHistoryTypeId="2" PostId="5263" RevisionGUID="87e9ea4b-2842-48a8-b246-6e0ac77eb7cd" CreationDate="2010-11-06T16:07:13.830" UserId="189" Text="They are typically called **[mobile games][1]**, which covers a game that runs on a mobile device. This is distinct from console games (Xbox, Wii,...) and PC games.&#xD;&#xA;&#xD;&#xA;In addition, most mobile games (but not all of them!) are **[casual games][2]**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mobile_game&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Casual_game" />
  <row Id="10457" PostHistoryTypeId="2" PostId="5264" RevisionGUID="a7735bfa-82fb-4567-9682-e1f5f22d96fb" CreationDate="2010-11-06T17:00:46.057" UserId="613" Text="Hire an attorney.&#xD;&#xA;&#xD;&#xA;There is no substitute to having some actual legal advice, especially in an instance like this. No one here can give you the advice you *need*.&#xD;&#xA;&#xD;&#xA;Business folks who are after a contract over &quot;IP&quot; are usually looking for a way to screw you over. You need an attorney to help you avoid losing your rights." />
  <row Id="10458" PostHistoryTypeId="2" PostId="5265" RevisionGUID="370a21e8-14ca-41fe-9800-f52041a1f652" CreationDate="2010-11-06T17:06:30.167" UserId="3054" Text="2 Stack Overflow posts similar to this one:&#xD;&#xA;[graph longest path](http://stackoverflow.com/questions/2529130/graph-longest-path), [reference from same post](http://stackoverflow.com/questions/2500877/count-of-distinct-acyclic-paths-from-aa-b-to-ac-d/2532646#2532646) .&#xD;&#xA;" />
  <row Id="10460" PostHistoryTypeId="5" PostId="5261" RevisionGUID="740c0801-6039-488b-b161-f8a146ce2411" CreationDate="2010-11-06T18:08:59.150" UserId="744" Comment="Fix some grammar." Text="In what category can games for Android and the iPhone be placed so they can be differentiated from other platforms?" />
  <row Id="10461" PostHistoryTypeId="4" PostId="5261" RevisionGUID="740c0801-6039-488b-b161-f8a146ce2411" CreationDate="2010-11-06T18:08:59.150" UserId="744" Comment="Fix some grammar." Text="What term is used to refer to iPhone and Android games?" />
  <row Id="10462" PostHistoryTypeId="6" PostId="5261" RevisionGUID="740c0801-6039-488b-b161-f8a146ce2411" CreationDate="2010-11-06T18:08:59.150" UserId="744" Comment="Fix some grammar." Text="&lt;iphone&gt;&lt;android&gt;&lt;naming&gt;" />
  <row Id="10463" PostHistoryTypeId="6" PostId="5261" RevisionGUID="52250ce4-e9bf-4e06-a1f8-d0241c91ef2b" CreationDate="2010-11-06T19:02:35.463" UserId="2290" Comment="edited tags" Text="&lt;iphone&gt;&lt;android&gt;&lt;mobile&gt;&lt;terminology&gt;" />
  <row Id="10464" PostHistoryTypeId="2" PostId="5267" RevisionGUID="a61dff07-88d3-42fb-bcbb-51a2042958ad" CreationDate="2010-11-06T19:13:26.510" UserId="2290" Text="I highly recommend checking out [FlatRedBall][1], as the engine is pretty straightforward, frequently updated, and the development team offers great support. I worked with the A.R.E.S.: Extinction Agenda development team while they were using FRB, and they had nothing but high praise.&#xD;&#xA;&#xD;&#xA;Here are a few links to get you started:&#xD;&#xA;&#xD;&#xA;- [Official Website][2]&#xD;&#xA;- [Tutorials][3]&#xD;&#xA;- [Wiki][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com&#xD;&#xA;  [2]: http://www.flatredball.com&#xD;&#xA;  [3]: http://www.flatredball.com/frb/docs/index.php?title=Category:FlatRedBall_XNA_Tutorials&#xD;&#xA;  [4]: http://www.flatredball.com/frb/docs/?title=Category:Reference" />
  <row Id="10465" PostHistoryTypeId="5" PostId="5250" RevisionGUID="52f07fb6-b6ed-46b5-a36b-0bd968d8c8aa" CreationDate="2010-11-06T19:38:29.900" UserId="294" Comment="deleted 5 characters in body" Text="As I understand your proposal, you are speaking about creating an external [Domain Specific Language (DSL)][1] for your game rules, that adheres to a precise and standard syntax.&#xD;&#xA;&#xD;&#xA;From my experience in building DSLs for game rulesets and my reading of [Martin Fowler's recent book on DSLs][2], I gather that two main parts are required to build something like your idea :&#xD;&#xA;&#xD;&#xA; - A Semantic model (or Business model) for what your DSL represents. If you do OOP that would be a class to hold the units with attributes like era, range, strength, etc. (Yet OOP is not compulsory)&#xD;&#xA; - A Parser to populate that model from text files that use your chosen syntax.&#xD;&#xA;&#xD;&#xA;I think that the larger effort is actually in building the model and not the parser, but choosing a standard syntax will make the parser much faster and easier to build. Moreover if the syntax is simple and/or known to the people who write the rules it will be that much easier for them to do that.&#xD;&#xA;&#xD;&#xA;So yes, by all means build a rich business model for your rulesets and then write them using a standard syntax. XML is indeed very often used in that capacity in games and elsewhere, but it's generally thought to be too verbose and is increasingly replaced with leaner formats such as Json or Yaml (and why not CSS).&#xD;&#xA;&#xD;&#xA;Hope that helps put your idea in a different light.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Domain-specific_language&#xD;&#xA;  [2]: http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-Martin/dp/product-description/0321712943" />
  <row Id="10466" PostHistoryTypeId="2" PostId="5268" RevisionGUID="1d518287-904d-4d4d-994a-bd6b5cf13a40" CreationDate="2010-11-06T19:50:28.070" UserId="3106" Text="You should also take a look at [Simplex Noise][1], which was developed by Ken Perlin to fix some of Perlin noise's shortcomings.&#xD;&#xA;&#xD;&#xA;I've been working on an implementation of Simplex Noise for a C++ game.  It supports multi-octave 1D/2D/3D/4D noise.  Right now, the only built-in texture is marble, but you could easily add more:&#xD;&#xA;&#xD;&#xA;(http://code.google.com/p/battlestar-tux/source/browse/trunk/src/lib/procedural/)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Simplex_noise" />
  <row Id="10468" PostHistoryTypeId="6" PostId="984" RevisionGUID="6f0b6603-41a4-4042-a06a-514ddda66852" CreationDate="2010-11-06T22:32:05.373" UserId="2290" Comment="edited tags" Text="&lt;game-design&gt;&lt;testing&gt;&lt;balance&gt;&lt;difficultly&gt;" />
  <row Id="10469" PostHistoryTypeId="2" PostId="5269" RevisionGUID="60c09014-f224-40aa-bfe9-d9eae0dcab17" CreationDate="2010-11-06T22:37:11.280" UserId="3108" Text="You might want to use [Cairo][1] to draw 2d graphics on any backend.&#xD;&#xA;You can combine it with SDL or OpenGL or GTK, as display-backend, or with .png or .svg or .pdf as file-backend, too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cairographics.org" />
  <row Id="10470" PostHistoryTypeId="2" PostId="5270" RevisionGUID="67dcfa9c-8a76-423c-8384-449922b4a428" CreationDate="2010-11-06T23:23:27.247" UserId="3108" Text="As far as I understand it, you have the IP of that character without the graphics, and they have the IP of the graphics without any reference to your character. So, if they want to sell merchandise, you might want to profit from your property and decide where and how it will be used.&#xD;&#xA;&#xD;&#xA;Think about your well crafted character with its character name and all the effort you put into that character creation and the graphics you used  in a sexual offending picture on a good selling cheap t-shirt. Your game will be disliked and they make money out of it.&#xD;&#xA;&#xD;&#xA;If you do not have the exclusive rights of using those graphics, then think about why you want to pay for it at all: They still could give those artwork away for free to anyone, right after selling them to you for big money.&#xD;&#xA;&#xD;&#xA;Compare it to this:&#xD;&#xA;&#xD;&#xA; 1. You buy the exclusive rights.&#xD;&#xA; 2. You sell them some rights back, where you can prevent them to abuse your property.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10471" PostHistoryTypeId="2" PostId="5271" RevisionGUID="faa4bfcb-20e0-4e11-ab2d-9c2a9415afd4" CreationDate="2010-11-06T23:38:04.537" UserId="3108" Text="As long as it is possible to use human voice, use it. Synthetized speech is only good in a few languages, probably only in japanese. If you do not want to port your program to other languages, then you can test the synthetized speech system and probably reduce the effort of developing the program.&#xD;&#xA;&#xD;&#xA;The best choice might be to design it retargettable, so that you can switch between both systems dynamically.&#xD;&#xA;" />
  <row Id="10472" PostHistoryTypeId="5" PostId="5224" RevisionGUID="787ca1de-9c96-45ea-b87e-6ddd09e45a5f" CreationDate="2010-11-06T23:43:29.533" UserId="3060" Comment="fixed links" Text="Hey guys, I'm trying to figure out how to generate tileable fractals in code (for game maps, *but that's irrelevant*)&#xD;&#xA;I've been trying to modify the Solid Noise plug-in shipped with GIMP (with my extremely limited understanding of how the code works)  but I cant get mine to work correctly.&#xD;&#xA;&#xD;&#xA;[My modified code so far](http://pastebin.com/KhHjg3L4) (Java)   &#xD;&#xA;&#xD;&#xA;[GIMP's solid noise module that I'm basing my code off of](http://pastebin.com/SuzydfGw) (C)&#xD;&#xA;&#xD;&#xA;[Here is what I'm trying to achieve](http://upload.wikimedia.org/wikipedia/commons/d/da/Perlin_noise.jpg) but&#xD;&#xA;[This is what I'm getting](http://imgur.com/9bBus.jpg)&#xD;&#xA;&#xD;&#xA;So if anybody can see what I've done wrong, or has a suggestion how I could go about doing it differently, I'd greatly appreciate it. **Thanks in advance.**&#xD;&#xA;And if I'm asking way to much or if just a huge failure at life, I apologize. " />
  <row Id="10473" PostHistoryTypeId="2" PostId="5272" RevisionGUID="6cc74d87-90e0-4715-a696-31d533778249" CreationDate="2010-11-07T00:32:44.567" UserId="284" Text="So I'm working on expanding the uses of items over at [www.ninjawars.net][1], and I'm not exactly sure how to represent them flexibly in the relational database that we use.&#xD;&#xA;&#xD;&#xA;I may be barking up the wrong tree, so feel free to make suggestions in other directions, but currently I'm thinking that each item should have relational tags.&#xD;&#xA;&#xD;&#xA;For example, a Katana is currently a row in the &quot;items&quot; database.  To make it into a weapon, and a holdable thing, I was thinking that I would have a database of &quot;uses&quot;, and a item_uses table that simply linked between them.&#xD;&#xA;&#xD;&#xA;item_id | item&#xD;&#xA;1 | Naginata&#xD;&#xA;&#xD;&#xA;use_id | uses&#xD;&#xA;1 | weapon&#xD;&#xA;2 | holdable&#xD;&#xA;&#xD;&#xA;_item_id | _use_id | item_use_data&#xD;&#xA;1 | 1 | damage: 5 damage_type: sharp &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm not really sure how to model extra data (e.g. the damage that a sword will do, the damage_type, etc).&#xD;&#xA;&#xD;&#xA;I'm also not especially happy that the whole of an item would be stored in more than one place, e.g. in order to create a copy of an item with a different name, like a &quot;short sword&quot;, I would have to copy from multiple tables to create the duplicate item.&#xD;&#xA;&#xD;&#xA;Is there a better way to lay this stuff out that I'm missing?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net" />
  <row Id="10474" PostHistoryTypeId="1" PostId="5272" RevisionGUID="6cc74d87-90e0-4715-a696-31d533778249" CreationDate="2010-11-07T00:32:44.567" UserId="284" Text="For a text-based game, what is a flexible way to model game item uses in a sql database?" />
  <row Id="10475" PostHistoryTypeId="3" PostId="5272" RevisionGUID="6cc74d87-90e0-4715-a696-31d533778249" CreationDate="2010-11-07T00:32:44.567" UserId="284" Text="&lt;items&gt;&lt;relational-database&gt;&lt;browser-based-game&gt;" />
  <row Id="10476" PostHistoryTypeId="5" PostId="5272" RevisionGUID="12743229-a51f-416b-ab0a-571a30533369" CreationDate="2010-11-07T00:49:16.770" UserId="284" Comment="added 38 characters in body" Text="So I'm working on expanding the uses of items over at [www.ninjawars.net][1], and I'm not exactly sure how to represent them flexibly in the relational database that we use.&#xD;&#xA;&#xD;&#xA;I may be barking up the wrong tree, so feel free to make suggestions in other directions, but currently I'm thinking that each item should have relational tags.&#xD;&#xA;&#xD;&#xA;For example, a Katana is currently a row in the &quot;items&quot; database.  To make it into a weapon, and a holdable thing, I was thinking that I would have a database of &quot;uses&quot;, and a item_uses table that simply linked between them.&#xD;&#xA;&#xD;&#xA;    item_id | item&#xD;&#xA;    1 | Naginata&#xD;&#xA;    &#xD;&#xA;    use_id | uses&#xD;&#xA;    1 | weapon&#xD;&#xA;    2 | holdable&#xD;&#xA;    &#xD;&#xA;    _item_id | _use_id | item_use_data&#xD;&#xA;    1 | 1 | damage: 5 damage_type: sharp &#xD;&#xA;&#xD;&#xA;I'm not really sure how to model extra data (e.g. the damage that a sword will do, the damage_type, etc).&#xD;&#xA;&#xD;&#xA;I'm also not especially happy that the whole of an item would be stored in more than one place, e.g. in order to create a copy of an item with a different name, like a &quot;short sword&quot;, I would have to copy from multiple tables to create the duplicate item.&#xD;&#xA;&#xD;&#xA;Is there a better way to lay this stuff out that I'm missing?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10477" PostHistoryTypeId="2" PostId="5273" RevisionGUID="3a360288-9594-4740-a2ee-17d5c9461fb4" CreationDate="2010-11-07T03:51:43.303" UserId="3115" Text="I've been designing databases and played around with many game ideas for years now. My personal favorite at the moment, is some kinda textbased, human-readable format for configurations, but then parsing these &quot;slow scripts&quot; into something more runable. Much like JAVA and .NET is compiled into Run-time bytecode.&#xD;&#xA;&#xD;&#xA;Same idea goes here. I have a &quot;source&quot; version of components and then a pre-compiler/parser runs through these. If they take up too much memory, you can put them in a fast SQL-datbase of some kinda or save them as binary files. But my point is, use the memory or SQL-database as your workspace/cache so that you dont have to parse the scripts over and over again. You could make the compiler, move the parsed files into a &quot;source-lib&quot; and this way let the precompiler do the versioning too (keeping the previous files for rollback purpose).&#xD;&#xA;&#xD;&#xA;If its about &quot;unlimited harddrive space&quot;, then sign up to something like Dropbox or Amazon S3 and sync with them.&#xD;&#xA;&#xD;&#xA;**So the plan for me is currently:**&#xD;&#xA;&#xD;&#xA; 1. Config/scripts/xml (some human readable format) as textfiles (just like sourcecode)&#xD;&#xA; 2. Parser/validator that runs through new scripts and checkes they are following rules&#xD;&#xA; 3. Compiler that makes binary or SQL-row out of the original files, so that these are fast to retreive + fast to run.&#xD;&#xA;&#xD;&#xA;Regarding stability, I'm currently building the database to be &quot;co-location hosted&quot; and autosync between multiple locations too, so that if there is a network/hardware failure one location, the other sites should be able to handle the same traffic/gamestates.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10478" PostHistoryTypeId="2" PostId="5274" RevisionGUID="4e7f50d3-d00b-413b-b0d5-5f1ea44c0d71" CreationDate="2010-11-07T04:05:17.457" UserId="3116" Text="The answer to this depends on the what language you are using for the game.&#xD;&#xA;&#xD;&#xA;If you are using C++, you would be well advised to use one of the existing XML libraries (such as [TinyXml](http://www.grinninglizard.com/tinyxml/) or [eXpat](http://expat.sourceforge.net/)).&#xD;&#xA;&#xD;&#xA;On the other hand, if you were using PHP, you could very easily use a database server such as MySQL or SQLite. (Keep in mind that if you go this route, you will need more resources because the database server will be running as a separate process and larger database applications like MySQL can consume a lot of RAM when running.)&#xD;&#xA;&#xD;&#xA;JSON is gaining a lot of momentum and is certainly the best choice if your application is written using more than one language.&#xD;&#xA;&#xD;&#xA;In short, it depends on what is easily usable in your language." />
  <row Id="10479" PostHistoryTypeId="6" PostId="5272" RevisionGUID="b82df4dd-655b-45a2-8d11-dd5ef69e5d4f" CreationDate="2010-11-07T05:04:15.567" UserId="2290" Comment="edited tags" Text="&lt;architecture&gt;&lt;web&gt;&lt;databases&gt;" />
  <row Id="10480" PostHistoryTypeId="2" PostId="5275" RevisionGUID="df55f8bb-ba8e-4fcd-81ab-14928a870847" CreationDate="2010-11-07T05:29:25.817" UserId="2290" Text="Unfortunately, situations like this are where relational databases (such as SQL) fall short, and non-relational databases (such as [MongoDB][1]) excel. That being said, since it seems like your codebase is already reliant on SQL, here is the model I would go with:&#xD;&#xA;&#xD;&#xA;Instead of creating an item and uses table, create a table and &quot;[item]_type&quot; reference table for each item type.&#xD;&#xA;&#xD;&#xA;Here's an example:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;&#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    1 | Mana&#xD;&#xA;&#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | HP | 5&#xD;&#xA;    2 | Mana Drainer | Mana | -5&#xD;&#xA;&#xD;&#xA;This solution gives you a lot of long-term flexibility and is self-documenting (unlike &quot;item_use_data&quot;). It involves a little more setup on your part, but in my opinion, it's definitely worth it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mongodb.org/" />
  <row Id="10481" PostHistoryTypeId="5" PostId="5275" RevisionGUID="6f57f721-164c-47c5-99c6-366d8a492c0f" CreationDate="2010-11-07T08:05:11.797" UserId="2290" Comment="added 47 characters in body" Text="Unfortunately, situations like this are where relational databases (such as SQL) fall short, and non-relational databases (such as [MongoDB][1]) excel. That being said, since it seems like your codebase is already reliant on SQL, here is the model I would go with:&#xD;&#xA;&#xD;&#xA;Instead of creating an item and uses table, create a table and &quot;[item]_type&quot; reference table for each item type.&#xD;&#xA;&#xD;&#xA;Here's an example:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;&#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    1 | Mana&#xD;&#xA;&#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | HP | 5&#xD;&#xA;    2 | Mana Drainer | Mana | -5&#xD;&#xA;&#xD;&#xA;This solution gives you a lot of long-term flexibility, it reduces (if not eliminates) wasted space, and is self-documenting (unlike &quot;item_use_data&quot;). It involves a little more setup on your part, but, in my opinion, it's definitely worth it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mongodb.org/" />
  <row Id="10482" PostHistoryTypeId="2" PostId="5276" RevisionGUID="4f58a902-f9bc-4faa-8a02-3ae011ba0db3" CreationDate="2010-11-07T08:06:31.690" UserId="3120" Text="I am new to UDK and Blender but I've some prior game development experience on XNA. Now I want to know should I start using Blender gaming engine which is open source and gives lot of freedom to programmer or UDK which is awesome tool to create 3D games but it is very specific and bounds you to use Unreal script. Which one should I start?" />
  <row Id="10483" PostHistoryTypeId="1" PostId="5276" RevisionGUID="4f58a902-f9bc-4faa-8a02-3ae011ba0db3" CreationDate="2010-11-07T08:06:31.690" UserId="3120" Text="UDK or Blender ??" />
  <row Id="10484" PostHistoryTypeId="3" PostId="5276" RevisionGUID="4f58a902-f9bc-4faa-8a02-3ae011ba0db3" CreationDate="2010-11-07T08:06:31.690" UserId="3120" Text="&lt;blender&gt;&lt;udk&gt;" />
  <row Id="10485" PostHistoryTypeId="2" PostId="5277" RevisionGUID="96d3bcc1-1372-4b27-bcdb-6a4118e3fa0d" CreationDate="2010-11-07T09:38:34.883" UserId="3020" Text="I have coded several C++ games and now I'm building my own game engine and editor.&#xD;&#xA;&#xD;&#xA;I have some doubts about the design and I wish to find great examples to follow.&#xD;&#xA;&#xD;&#xA;What is the best designed in your opinion?&#xD;&#xA;&#xD;&#xA;Must be object oriented. Programming language does not matter, but I prefer in this order: C++, C#, Java or another similar.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10486" PostHistoryTypeId="1" PostId="5277" RevisionGUID="96d3bcc1-1372-4b27-bcdb-6a4118e3fa0d" CreationDate="2010-11-07T09:38:34.883" UserId="3020" Text="What is the best designed open source game engine?" />
  <row Id="10487" PostHistoryTypeId="3" PostId="5277" RevisionGUID="96d3bcc1-1372-4b27-bcdb-6a4118e3fa0d" CreationDate="2010-11-07T09:38:34.883" UserId="3020" Text="&lt;engine&gt;&lt;open-source&gt;&lt;source-code&gt;" />
  <row Id="10488" PostHistoryTypeId="4" PostId="5277" RevisionGUID="19815937-0ea4-4730-a3c1-fce380f45398" CreationDate="2010-11-07T09:47:46.540" UserId="3020" Comment="edited title" Text="What is the best designed open source game engine to take example?" />
  <row Id="10489" PostHistoryTypeId="2" PostId="5278" RevisionGUID="1ca46bae-cefb-4449-9f73-a8f7827944cf" CreationDate="2010-11-07T10:06:06.070" UserId="2710" Text="Using SQL was your grave mistake. It absolutely NOT suited for storing static game-design data.&#xD;&#xA;&#xD;&#xA;If you can't move away from SQL, I'd consider storing items in a serialized from. I.e. &#xD;&#xA;    &#xD;&#xA;    item_id (int) | item (BLOB)&#xD;&#xA;    1             | &lt;binary data&gt;&#xD;&#xA;&#xD;&#xA;Of course, that's ugly and throws all the SQL &quot;niceties&quot; out of the window, but do you actually *need* them? Most probably, you read all of your item data at the game start anyway, and never `SELECT` by anything other than `item_id`." />
  <row Id="10490" PostHistoryTypeId="2" PostId="5279" RevisionGUID="831d1197-d5c3-4983-808e-98d05d6ff8be" CreationDate="2010-11-07T11:10:54.220" UserId="2167" Text="I need some ideas to make the **USER** interest in the game result &amp; play back again to get high score . **My game is a calculation game measure the  speed of calculation of the user** .&#xD;&#xA;&#xD;&#xA;I added in the result :&#xD;&#xA;&#xD;&#xA; 1. The No. Right Answers&#xD;&#xA; 1. The No. Wrong Answers&#xD;&#xA; 1. Score of player . &#xD;&#xA;&#xD;&#xA;What shall I add to get attract the player to play the game again .&#xD;&#xA; &#xD;&#xA;" />
  <row Id="10491" PostHistoryTypeId="1" PostId="5279" RevisionGUID="831d1197-d5c3-4983-808e-98d05d6ff8be" CreationDate="2010-11-07T11:10:54.220" UserId="2167" Text="what are the best ways to evaluate the player after finishing the game " />
  <row Id="10492" PostHistoryTypeId="3" PostId="5279" RevisionGUID="831d1197-d5c3-4983-808e-98d05d6ff8be" CreationDate="2010-11-07T11:10:54.220" UserId="2167" Text="&lt;game-design&gt;&lt;flash&gt;&lt;math&gt;&lt;actionscript-3&gt;&lt;game-center&gt;" />
  <row Id="10493" PostHistoryTypeId="2" PostId="5280" RevisionGUID="ee172d8e-d8d5-4b3d-83ee-c6f8daab3693" CreationDate="2010-11-07T11:31:59.220" UserId="450" Text="A high score list in which player can see their rank relative to other people may give some motivation. I am not sure if this works for your game, but it may be possible to collect stats like total number of right answers summing up all played matches.&#xD;&#xA;&#xD;&#xA;If you use an internet based high score list, it may be a good idea to split it into &quot;recent players&quot; and &quot;all times&quot;. The standard approach of only displaying a  all time list has the issue that it will be really hard for new players a couple of month after release." />
  <row Id="10494" PostHistoryTypeId="2" PostId="5281" RevisionGUID="b8955458-fec8-418a-9462-714961023dfa" CreationDate="2010-11-07T13:12:50.880" UserId="2634" Text="I think the best way to go about building a game engine is to start with what you already know pretty well and add those features that are tedious or repetitive.&#xD;&#xA;&#xD;&#xA;For example, I do a lot with Python / pygame (which is an SDL wrapper)  I enjoy the system quite a bit, but there were three things that bothered me:&#xD;&#xA;&#xD;&#xA; - Building the animation loop is&#xD;&#xA;   tedious, and they're all pretty much&#xD;&#xA;   the same. &#xD;&#xA; - The basic sprite object is&#xD;&#xA;   very limited. I wanted an improved&#xD;&#xA;   sprite with direction and speed,&#xD;&#xA;   ability to handle various screen edge&#xD;&#xA;   conditions, multiple images, and&#xD;&#xA;   multiple collision schemes.&#xD;&#xA; - Pygame has no UI features. I wanted simple labels, buttons and a number chooser I  &#xD;&#xA;   could easily add to my games.&#xD;&#xA;&#xD;&#xA;It was relatively easy to create an object-oriented wrapper around these features.  Take a look at chapter 10 and the Game Engine documentation available here:&#xD;&#xA;http://aharrisbooks.net/pythonGame/&#xD;&#xA;&#xD;&#xA;(This was written as part of a book, but you're welcome to the game engine even if you don't want the book.)&#xD;&#xA;&#xD;&#xA;Chapter 10 explains the motivation and techniques for building a basic 2D game engine.  You might enjoy it as you build your own. The actual language is not that important (except of course you'll need an OOP language to support OOP.)  If you're already using SDL with C++, you might begin by adapting my engine to C++ / SDL." />
  <row Id="10495" PostHistoryTypeId="2" PostId="5282" RevisionGUID="cd140dce-610e-40e2-b617-f1247e39f3b8" CreationDate="2010-11-07T13:19:40.310" UserId="2634" Text="Make it very easy to play again, and less easy to quit. For example, as soon as the game is over, display the user's current score and best score.  Have them simply click the mouse (anywhere, not on a particular button) to play again.  This will greatly increase the 'one more time' factor.&#xD;&#xA;&#xD;&#xA;Of course, the most important thing is for the game to be fun.  Nobody will play it again if it isn't fun.  If they got a little adrenalin rush at the end of the last game, they'll be eager to give it another shot.  Even calculation games can be fun.&#xD;&#xA;&#xD;&#xA;High score lists with worldwide players only provide motivation to very skilled players.  A beginner will simply be discouraged that he's ranked 8 millionth in the world.  Early on, it's better to compare the user with his own previous efforts.&#xD;&#xA;&#xD;&#xA;Also, it's nice to have intermediate goals.  Provide the player with something to play for.  It can be as simple as additional skins, powerups, or skills.  Tantalize the user so he's sure he can get that next prize with 'just one more turn.'&#xD;&#xA;" />
  <row Id="10496" PostHistoryTypeId="2" PostId="5283" RevisionGUID="ca27b987-1acb-48fd-9d44-bf244c7a1b06" CreationDate="2010-11-07T13:36:33.270" UserId="2634" Text="The language usually isn't the most critical aspect of game development. However, certain aspects of a language could make it more or less suitable for game development.&#xD;&#xA;&#xD;&#xA; - **Data Management** - Games are ultimately about data. Probably the most critical decision you make when you build a game is how the data will be managed.  Pick a language that has good data management features. If all you've got is arrays, that's fine, but Objects, Structures, and advanced data types like linked lists and trees are often extremely helpful. Sure, you can build these things yourself, but it's great if they're already a part of the language.  &#xD;&#xA; - **Object-oriented** - Games are one area (GUIs are another) where the object-oriented paradigm really shines. It really makes sense to think of the map as an object, each player as an object, items and inventory as objects, and so on.&#xD;&#xA; - **Event-driven** - This really goes hand-in-hand with OOP.  Games are about events: the passage of time, user input, objects bonking into each other, robot zombie oppossums falling out of the sky, whatever.  It's best if the language already has robust support for event-handling. Most OOP languages already have this.&#xD;&#xA; - **Access to libraries** - Typically you'll rely on some sort of rendering library to do the graphics work. You'll want a language to have a binding to at least the most basic libraries (DirectX / Direct3D for Windows, SDL / OpenGL for everything else) It's even better if you have access to some higher-level libraries that simplify the process.&#xD;&#xA; - **Ease of use** - Writing a game is hard. It's even harder if you're wrestling with your programming language. Often this is subjective, because a language is easy if you already know it. However, some languages (like Python) have a clean syntax and seem to stay out of the way. Java and C++ are great languages, but if you're not completely comfortable with their way of thinking, you'll fight the language more than write code.&#xD;&#xA; - **Performance** - You may be surprised that this factor is so low on the list, but I think that's appropriate.  Certainly you don't want a language that prevents your game from playing at an adequate speed, but usually the language is not the problem with slow games, algorithms and data structures are the real logjams. Some quite impressive games have been built with Flash, which is about as slow as a modern game development platform can be.  Optimize when necessary, but not before.&#xD;&#xA;&#xD;&#xA;All in all, the programmer is a lot more important than the language. There is no perfect game programming language, but there are several that are good. I've taught and written about game programming in several languages: C++, Java, Python, and Flash.  My current favorite gaming language is Python.  It meets most of the criteria above.  While Python is sometimes criticized for being slow, it usually relies on graphics engines written in C/C++ for the heavy lifting. Also, it's quite easy to write a critical section in C++ and run it from Python as an external module.  &#xD;&#xA;&#xD;&#xA;Hope this helps..." />
  <row Id="10497" PostHistoryTypeId="2" PostId="5284" RevisionGUID="e3b057f3-de86-4949-ad9d-13648e81370d" CreationDate="2010-11-07T13:47:48.183" UserId="2634" Text="Either is fine, but Blender has some very interesting advantages:&#xD;&#xA;&#xD;&#xA; 1. It contains both the modeling tool and the game engine. You don't need another tool for creating the models. Use the same tool for both.&#xD;&#xA; 2. The game engine uses a tile-based system. When you start with the game engine, you can use a tile-based drag-and-drop system to get your game working. You can get a pretty sophisticated game working (drive a vehicle around - shoot bad guys, take damage, scorekeeping) without writing a single line of traditional code.&#xD;&#xA; 3. When you're ready for 'real' programming, Python is built in.  Python is becoming a very popular language for game development because it's pretty sensible.  It's already built into Blender (much of the blender UI is built with it.)&#xD;&#xA; 4. True multiplatform. A game you've built with the game engine can be exported to an executable in the local OS.  &#xD;&#xA;&#xD;&#xA;The down side is the documentation, which basically stinks.&#xD;&#xA;I've got a series of videos (actually, it's one of my classes) which goes through blender and the game engine pretty thoroughly.  Check it out at&#xD;&#xA;http://synapse.cs.iupui.edu/Mediasite/Catalog/Front.aspx?cid=5d511316-3092-446e-9a69-79d35c41b62d&#xD;&#xA;&#xD;&#xA;The blender stuff starts at lecture 17, and the game engine stuff begins at lecture 27." />
  <row Id="10498" PostHistoryTypeId="2" PostId="5285" RevisionGUID="323736de-4e06-4d81-9c8d-646a0a9a4198" CreationDate="2010-11-07T13:49:19.807" UserId="1386" Text="Here is an example program that draws a line to a window using the cross platform library [Qt][1]. Includes have been omitted.&#xD;&#xA;&#xD;&#xA;    struct MyWindow: public QMainWindow&#xD;&#xA;    {&#xD;&#xA;      Q_OBJECT&#xD;&#xA;    &#xD;&#xA;      MyWindow(QWidget *parent = 0, Qt::WFlags flags = 0){ui.setupUi(this);}&#xD;&#xA;      ~MyWindow(){}&#xD;&#xA;    &#xD;&#xA;      void paintEvent(QPaintEvent *)&#xD;&#xA;      {&#xD;&#xA;        QPainter painter(this);&#xD;&#xA;        painter.setPen(Qt::blue);&#xD;&#xA;    &#xD;&#xA;        QLineF line(10.0, 80.0, 90.0, 20.0);&#xD;&#xA;        painter.drawLine(line);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      Ui::MyWindow ui;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;      QApplication a(argc, argv);&#xD;&#xA;      MyWindow w;&#xD;&#xA;      w.show();&#xD;&#xA;      return a.exec();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://qt.nokia.com/products/" />
  <row Id="10499" PostHistoryTypeId="5" PostId="5285" RevisionGUID="57426ee3-0e5f-48c8-a1ed-481114371bb7" CreationDate="2010-11-07T14:10:02.477" UserId="1386" Comment="added 127 characters in body; edited body" Text="Here is an example program that draws a line to a window using the cross platform library [Qt][1]. Includes have been omitted.&#xD;&#xA;&#xD;&#xA;    struct MyWindow: public QMainWindow&#xD;&#xA;    {&#xD;&#xA;      Q_OBJECT&#xD;&#xA;    &#xD;&#xA;      MyWindow(QWidget *parent = 0, Qt::WFlags flags = 0){ui.setupUi(this);}&#xD;&#xA;      ~MyWindow(){}&#xD;&#xA;    &#xD;&#xA;      void paintEvent(QPaintEvent *)&#xD;&#xA;      {&#xD;&#xA;        QPainter painter(this);&#xD;&#xA;        painter.setPen(Qt::blue);&#xD;&#xA;    &#xD;&#xA;        QLineF line(10.0, 80.0, 90.0, 20.0);&#xD;&#xA;        painter.drawLine(line);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      Ui::MyWindow ui;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;      QApplication a(argc, argv);&#xD;&#xA;      MyWindow w;&#xD;&#xA;      w.show();&#xD;&#xA;      return a.exec();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that this example does not use OpenGL. To render to OpenGL using the same draw calls simply derive a class from QGLWidget.&#xD;&#xA;  [1]: http://qt.nokia.com/products/" />
  <row Id="10500" PostHistoryTypeId="2" PostId="5286" RevisionGUID="016ffac5-c6df-41dc-b367-25f470f99423" CreationDate="2010-11-07T14:21:07.557" UserId="3064" Text="First I am going to assume that that evaluation is going to be shown to the player, if so, I would enumerate all the accomplishments he had on that playing session, lets say winning a certain amount of virtual money, reaching a certain level, it can congratulate the player if it was the best game he played so far, and tell him he beat his previous scores.&#xD;&#xA;&#xD;&#xA;But if you wanna evaluate him to keep track of him for analyzing it later on, you can store how he plays (style, or player profile), frequency, times at which he plays, and other measures." />
  <row Id="10501" PostHistoryTypeId="2" PostId="5287" RevisionGUID="4d97b969-366b-49c1-92af-9073fde21b3f" CreationDate="2010-11-07T14:35:49.153" UserId="953" Text="Blender Game Engine is very unproven.  I've seen very few games released using it, and all of those that I have played felt a bit dodgy (subjective term, sorry).  UDK, on the other hand, is totally proven; there are a bunch of games, especially student games out there, that use it.  They have varying degrees of success (generally, FPSes are the easiest sort of games to make in the engine), but there's gonna be more resources and mentors out there.&#xD;&#xA;&#xD;&#xA;Does that mean you can't trailblaze and make a great game in Blender?  Of course you can.  Its just a higher-risk choice.&#xD;&#xA;&#xD;&#xA;An alternative if you like Blender and want free coding in multiple languages is Unity.  Unity will work seamlessly with Blender models, and it's much more proven than the Blender Game Engine." />
  <row Id="10502" PostHistoryTypeId="5" PostId="5232" RevisionGUID="700004ff-96d6-427c-a2bf-6ba0c9023b49" CreationDate="2010-11-07T14:48:44.287" UserId="2633" Comment="added 12 characters in body" Text="I don't follow your code exactly, but here is a simplified description of the algorithm that will roughly achieve the effect (based on the image you posted).&#xD;&#xA;&#xD;&#xA;The following explanation is not the super optimised version, but is one that's conceptually clear (I hope). Once you have got it running, you can optimise it (quite drastically, in fact).&#xD;&#xA;&#xD;&#xA; 1. Generate n layers of uniform random&#xD;&#xA;    noise (just random greyscale&#xD;&#xA;    pixels). &#xD;&#xA; 2. Now sample each of these by sampling every, 1, 2, 4, 8, ... 2^(n-1) pixels, and interpolating the intermediate pixels. Each layer is smoother than the previous one.&#xD;&#xA; 3. Now scale of these with a factor of 1, 2, 4, 8, etc. Each layer is darker than the previous one.&#xD;&#xA; 4. Add all these together. &#xD;&#xA; 5. Normalise by dividing each pixel with (1 + 2 + 4 + 8 + ... 2^(n-1)).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The difficult step is the sampling and interpolation step. Suppose we are in the layer skipping sampling every m-th pixel. Here is the basic idea for m &gt; 1 (if m is 1, we use the image as is):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    for each pixel x and y&#xD;&#xA;       left_sample_coord = m *(x / m) //(integer division, automatically truncated)&#xD;&#xA;       right_sample_coord = (left_sample_point + m) % image_width&#xD;&#xA;       top_sample_point = m*(y / m) &#xD;&#xA;       bottom_sample_coord = (top_sample_point + m) % image_height&#xD;&#xA;    &#xD;&#xA;       horizontal_weight = (x - left_sample_point) / (m - 1)&#xD;&#xA;       vertical_weight = (y - top_sample_point) / (m - 1)&#xD;&#xA;    &#xD;&#xA;       sample_top_left = image(left_sample_coord, top_sample_point)&#xD;&#xA;       //and the same for the other four corners&#xD;&#xA;    &#xD;&#xA;       //now combine the top two points&#xD;&#xA;       top_interpolate = sample_top_left * horizontal_weight + sample_top_right * (1-horizontal_weight)&#xD;&#xA;    &#xD;&#xA;      //now combine the bottom two points&#xD;&#xA;      bottom_interpolate = sample_bottom_left * horizontal_weight + sample_bottom_right * (1-horizontal_weight)&#xD;&#xA;    &#xD;&#xA;      //and combine these two last obtained values&#xD;&#xA;    &#xD;&#xA;      smooth_noise(x, y) = top_interpolate * vertical_weight  + bottom_interpolate * (1 - vertical_weight)&#xD;&#xA;&#xD;&#xA;A few tips:&#xD;&#xA;&#xD;&#xA; - The result of the algorithm above might seem a bit washed out. You can reduce this effect by using the same layer of noise for all layers, or be contrast enhancing the image afterwards.&#xD;&#xA; - The algorithm above uses linear interpolation, but cosine interpolation (do a search) gives much better results.&#xD;&#xA; - Make it possible to look at your layers separately during all parts of the algorithm. This will help you flush out bugs quickly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10503" PostHistoryTypeId="2" PostId="5288" RevisionGUID="f7c6be04-7efc-4360-85e3-fed94a5e9417" CreationDate="2010-11-07T15:02:33.933" UserId="982" Text="Yeah yeah I know, best is probably a bad way to phrase this. But I need some pros and cons. I need a new phone and if I'm going to get a smartphone and pay all that money, I better get one that I can develop for, and games are what I want to make (not apps).&#xD;&#xA;&#xD;&#xA;So the way I see it is the iPhone would be a bit too expensive to get into. I currently do not own a Mac and do not know Objective-C, so both of those things would be major road blocks to getting an iPhone for game dev purposes. Are there any really good or bad things to know about iPhone game development?&#xD;&#xA;&#xD;&#xA;Windows Phone 7 is pretty attractive to me, since I already have a basis in XNA and it would be pretty easy and cheap to pick up. For game development it looks pretty attractive.&#xD;&#xA;&#xD;&#xA;After that, my research kind of dies. I have no idea what the deal is on Android, RIM's OS or any other mobile OSes. Does anyone have any experience on these?" />
  <row Id="10504" PostHistoryTypeId="1" PostId="5288" RevisionGUID="f7c6be04-7efc-4360-85e3-fed94a5e9417" CreationDate="2010-11-07T15:02:33.933" UserId="982" Text="What's the best phone for game development?" />
  <row Id="10505" PostHistoryTypeId="3" PostId="5288" RevisionGUID="f7c6be04-7efc-4360-85e3-fed94a5e9417" CreationDate="2010-11-07T15:02:33.933" UserId="982" Text="&lt;programming&gt;&lt;mobile&gt;&lt;hobby-development&gt;" />
  <row Id="10506" PostHistoryTypeId="2" PostId="5289" RevisionGUID="78c29d2b-b30f-43ab-ba5d-0f6e4a92d3b1" CreationDate="2010-11-07T15:47:56.070" UserId="2301" Text="This is very opinion based.  But if you already have XNA experience, and you don't want to learn a new language, seems reasonable to stick with that. (it also has a great IDE..Visual Studios!, imo)" />
  <row Id="10507" PostHistoryTypeId="5" PostId="5279" RevisionGUID="a9759068-4f55-44ac-89f3-2d8b41b7a958" CreationDate="2010-11-07T16:51:35.723" UserId="51" Comment="added 12 characters in body" Text="I need some ideas to make the **USER** interest in the game result &amp; play back again to get high score . **My game is a calculation game measure the  speed of calculation of the user** .&#xD;&#xA;&#xD;&#xA;I added in the result :&#xD;&#xA;&#xD;&#xA; 1. The number of Right Answers&#xD;&#xA; 1. The number of Wrong Answers&#xD;&#xA; 1. Score of player . &#xD;&#xA;&#xD;&#xA;What shall I add to get attract the player to play the game again .&#xD;&#xA; &#xD;&#xA;" />
  <row Id="10508" PostHistoryTypeId="10" PostId="5277" RevisionGUID="8ba6e3ad-8346-44c0-8a84-4b8a7401855b" CreationDate="2010-11-07T16:53:43.943" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="10509" PostHistoryTypeId="5" PostId="5277" RevisionGUID="a4c9b426-5b3b-4813-b796-d637d73790ac" CreationDate="2010-11-07T16:53:44.100" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find good (well organized) examples of game code?](http://gamedev.stackexchange.com/questions/1497/where-can-i-find-good-well-organized-examples-of-game-code)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have coded several C++ games and now I'm building my own game engine and editor.&#xD;&#xA;&#xD;&#xA;I have some doubts about the design and I wish to find great examples to follow.&#xD;&#xA;&#xD;&#xA;What is the best designed in your opinion?&#xD;&#xA;&#xD;&#xA;Must be object oriented. Programming language does not matter, but I prefer in this order: C++, C#, Java or another similar.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10510" PostHistoryTypeId="16" PostId="1502" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10512" PostHistoryTypeId="16" PostId="1511" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10513" PostHistoryTypeId="16" PostId="1513" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10514" PostHistoryTypeId="16" PostId="1839" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10515" PostHistoryTypeId="16" PostId="1902" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10516" PostHistoryTypeId="16" PostId="3338" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10517" PostHistoryTypeId="16" PostId="1497" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-07T16:54:53.880" UserId="51" />
  <row Id="10518" PostHistoryTypeId="2" PostId="5290" RevisionGUID="3b03b209-f857-4f56-9e44-a4617a658859" CreationDate="2010-11-07T17:09:33.357" UserId="652" Text="[Phun][1] (2D physics sandbox game) allows you to [play with water][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.phunland.com/&#xD;&#xA;  [2]: http://www.youtube.com/results?search_query=phun+water" />
  <row Id="10523" PostHistoryTypeId="2" PostId="5293" RevisionGUID="7d89b66e-5bc5-4211-8b12-7d4d28cca258" CreationDate="2010-11-07T18:38:30.177" UserId="3128" Text="I'm working on a 3d game using OpenGL and would like to take it in a fantasy direction.  Specifically I'm thinking of having magic with effects for fire, water, ice, and lightning.  My problem is I have no idea how to create these effects.  Are there any resources for me on how to learn something like this?  " />
  <row Id="10524" PostHistoryTypeId="1" PostId="5293" RevisionGUID="7d89b66e-5bc5-4211-8b12-7d4d28cca258" CreationDate="2010-11-07T18:38:30.177" UserId="3128" Text="3D game special effects, fire, lightning, water, and ice." />
  <row Id="10525" PostHistoryTypeId="3" PostId="5293" RevisionGUID="7d89b66e-5bc5-4211-8b12-7d4d28cca258" CreationDate="2010-11-07T18:38:30.177" UserId="3128" Text="&lt;xna&gt;&lt;graphics&gt;&lt;3d&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="10526" PostHistoryTypeId="4" PostId="5279" RevisionGUID="2a03e48b-b294-415d-ae3b-841dd73cd1b5" CreationDate="2010-11-07T18:40:18.990" UserId="2167" Comment="edited title; added 67 characters in body" Text="How can I make my score-based game addictive" />
  <row Id="10529" PostHistoryTypeId="5" PostId="5279" RevisionGUID="2a03e48b-b294-415d-ae3b-841dd73cd1b5" CreationDate="2010-11-07T18:40:18.990" UserId="2167" Comment="edited title; added 67 characters in body" Text="I need some ideas to make the **USER** interest in the game result.  Other Wise he  plays  again to get high score . **My game is a calculation game measure the  speed of calculation of the user** .&#xD;&#xA;&#xD;&#xA;I added in the result :&#xD;&#xA;&#xD;&#xA; 1. The number of Right Answers&#xD;&#xA; 1. The number of Wrong Answers&#xD;&#xA; 1. Score of player . &#xD;&#xA; 1. High score of all player &quot;Mochi High score&quot;  . &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What shall I add to get attract the player to play the game again .&#xD;&#xA; &#xD;&#xA;" />
  <row Id="10530" PostHistoryTypeId="2" PostId="5294" RevisionGUID="78bad5c1-9c95-4ec5-a584-9248f1fd5b8a" CreationDate="2010-11-07T18:48:35.170" UserId="2776" Text="First of all try to play with such effects in [UDK][1] Taste there realization in Unreal Engine 3. Then you can read something from [Nvidia SDK][2] and read math of cook from there [book][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://udk.com/&#xD;&#xA;  [2]: http://developer.download.nvidia.com/SDK/9.5/Samples/samples.html&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html" />
  <row Id="10531" PostHistoryTypeId="2" PostId="5295" RevisionGUID="8ab1f522-6844-47f2-b44a-afbb5be4223e" CreationDate="2010-11-07T18:48:39.030" UserDisplayName="openglNewbie" Text="I making simple model viewer using OpenGL, and I have some problem now, beacouse when I i want to pick object OpenGL retrun nothing or object that is on other place :/&#xD;&#xA;This my my code:&#xD;&#xA;&#xD;&#xA;    GLuint buff[1024] = {0};&#xD;&#xA;    GLint hits,view[4];&#xD;&#xA;    &#xD;&#xA;    glSelectBuffer(1024,buff);&#xD;&#xA;    glGetIntegerv(GL_VIEWPORT, view);&#xD;&#xA;    &#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glPushMatrix();&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPickMatrix(x,y,1.0,1.0,view);&#xD;&#xA;    gluPerspective(45,(float)view[2]/(float)view[4],1.0,1500.0);&#xD;&#xA;    &#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glRenderMode(GL_SELECT);&#xD;&#xA;    &#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    //I make the same transformations for normal render&#xD;&#xA;    glTranslatef(0, 0, -zoom);&#xD;&#xA;    glMultMatrixf(transform.M);&#xD;&#xA;    glInitNames();&#xD;&#xA;    glPushName(-1);&#xD;&#xA;    for(int j=0;j&lt;allNodes.size();j++)&#xD;&#xA;    {&#xD;&#xA;    glLoadName(allNodes.at(j)-&gt;id);&#xD;&#xA;    allNodes.at(j)-&gt;Draw(textures);&#xD;&#xA;    }&#xD;&#xA;    glPopName();&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glPopMatrix();&#xD;&#xA;    hits = glRenderMode(GL_RENDER);" />
  <row Id="10532" PostHistoryTypeId="1" PostId="5295" RevisionGUID="8ab1f522-6844-47f2-b44a-afbb5be4223e" CreationDate="2010-11-07T18:48:39.030" UserDisplayName="openglNewbie" Text="Problem with picking in OpenGL" />
  <row Id="10533" PostHistoryTypeId="3" PostId="5295" RevisionGUID="8ab1f522-6844-47f2-b44a-afbb5be4223e" CreationDate="2010-11-07T18:48:39.030" UserDisplayName="openglNewbie" Text="&lt;opengl&gt;" />
  <row Id="10534" PostHistoryTypeId="5" PostId="5295" RevisionGUID="7bf79e21-a23e-4625-bf37-4eaef5e05e1b" CreationDate="2010-11-07T19:05:03.710" UserId="744" Comment="Better title." Text="I am making simple model viewer using OpenGL. When I want to pick an object OpenGL returns nothing or an object that is in another place.&#xD;&#xA;&#xD;&#xA;This is my code:&#xD;&#xA;&#xD;&#xA;    GLuint buff[1024] = {0};&#xD;&#xA;    GLint hits,view[4];&#xD;&#xA;    &#xD;&#xA;    glSelectBuffer(1024,buff);&#xD;&#xA;    glGetIntegerv(GL_VIEWPORT, view);&#xD;&#xA;    &#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glPushMatrix();&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPickMatrix(x,y,1.0,1.0,view);&#xD;&#xA;    gluPerspective(45,(float)view[2]/(float)view[4],1.0,1500.0);&#xD;&#xA;    &#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glRenderMode(GL_SELECT);&#xD;&#xA;    &#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    //I make the same transformations for normal render&#xD;&#xA;    glTranslatef(0, 0, -zoom);&#xD;&#xA;    glMultMatrixf(transform.M);&#xD;&#xA;    glInitNames();&#xD;&#xA;    glPushName(-1);&#xD;&#xA;    for(int j=0;j&lt;allNodes.size();j++)&#xD;&#xA;    {&#xD;&#xA;        glLoadName(allNodes.at(j)-&gt;id);&#xD;&#xA;        allNodes.at(j)-&gt;Draw(textures);&#xD;&#xA;    }&#xD;&#xA;    glPopName();&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glPopMatrix();&#xD;&#xA;    hits = glRenderMode(GL_RENDER);" />
  <row Id="10535" PostHistoryTypeId="6" PostId="5295" RevisionGUID="7bf79e21-a23e-4625-bf37-4eaef5e05e1b" CreationDate="2010-11-07T19:05:03.710" UserId="744" Comment="Better title." Text="&lt;c++&gt;&lt;opengl&gt;&lt;graphics-programming&gt;" />
  <row Id="10536" PostHistoryTypeId="4" PostId="5295" RevisionGUID="7bf79e21-a23e-4625-bf37-4eaef5e05e1b" CreationDate="2010-11-07T19:05:03.710" UserId="744" Comment="Better title." Text="What's wrong with this OpenGL model picking code?" />
  <row Id="10537" PostHistoryTypeId="2" PostId="5296" RevisionGUID="a734498f-7d0a-483a-b04f-94f627cf04aa" CreationDate="2010-11-07T19:26:10.697" UserId="2734" Text="I'm looking for a 3D graphics library (not a complete game engine). Preferred a **scene graph**. **Something small** (unlike jME, XNA or Unity), that I can easily expand and change.&#xD;&#xA;&#xD;&#xA;Preferred features: &#xD;&#xA;&#xD;&#xA; - Cross Platform&#xD;&#xA; - Wrriten in Java/Scala (JOGL or LWJGL), C# (preferred OpenTK), Python or JavaScript/WebGL.&#xD;&#xA; - Support for OpenGL is a must. Direct3D is optional.&#xD;&#xA; - Some material system&#xD;&#xA; - Full support for some model format with full animation support (preferred COLLADA)&#xD;&#xA; - Level of Detail (LOD) support &#xD;&#xA; - Lighting support&#xD;&#xA; - Shaders, GUI, Input and Terrain/Water support are also preferred, but not required&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="10538" PostHistoryTypeId="1" PostId="5296" RevisionGUID="a734498f-7d0a-483a-b04f-94f627cf04aa" CreationDate="2010-11-07T19:26:10.697" UserId="2734" Text="Small 3D Scene Graph" />
  <row Id="10539" PostHistoryTypeId="3" PostId="5296" RevisionGUID="a734498f-7d0a-483a-b04f-94f627cf04aa" CreationDate="2010-11-07T19:26:10.697" UserId="2734" Text="&lt;graphics&gt;&lt;scene-graph&gt;" />
  <row Id="10540" PostHistoryTypeId="2" PostId="5297" RevisionGUID="7aea6918-8d3b-43a2-bb4b-e5a0f4215016" CreationDate="2010-11-07T19:53:35.250" UserId="2776" Text="Blender is not game engine by it's purposes. But it consists of some game engine modules. I think Blender is better for creating Cg stuff;) So if for me I'll choose UDK;)" />
  <row Id="10541" PostHistoryTypeId="11" PostId="5277" RevisionGUID="626b46a6-6e0e-4b76-958d-e11764298f06" CreationDate="2010-11-07T19:58:39.750" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="10542" PostHistoryTypeId="2" PostId="5298" RevisionGUID="f942171b-caf7-4061-ab1a-6b7ae33b1195" CreationDate="2010-11-07T19:59:53.133" UserId="982" Text="Super Mario Sunshine!&#xD;&#xA;&#xD;&#xA;:P" />
  <row Id="10543" PostHistoryTypeId="2" PostId="5299" RevisionGUID="0589210f-ea44-480f-bede-90bfd7748b87" CreationDate="2010-11-07T20:08:34.653" UserId="51" Text="Your two options for low-cost hobby development are the android and WP7 platforms.  The WP7 platform has a &lt;a href=&quot;http://create.msdn.com/en-us/home/membership&quot;&gt;$99 yearly fee&lt;/a&gt; (same as the iPhone developer agreement, for reference).  With that you get XNA which is going to get you up and running without additional middleware pretty quickly, plus you said you have experience in that platform so you'll spend less time trying to learn the tech and more time making games.&#xD;&#xA;&#xD;&#xA;However your best bet from a purely dollar-cost perspective is probably the android platform.  It's an open platform (read: free).  With the &lt;a href=&quot;http://developer.android.com/sdk/ndk/index.html&quot;&gt;native development kit&lt;/a&gt; you can write your apps in C++.  The graphics API is OpenGL ES (same as the iPhone, more or less).  It's a lot more barebones in the sense that there isn't nearly as much of game-related things in the SDK like XNA has.  However, given that it's a fairly standard/open interface, there's a lot of existing middleware (like &lt;a href=&quot;http://code.google.com/p/cocos2d-android/&quot;&gt;this&lt;/a&gt;) that can help you get up and running on that platform quickly.&#xD;&#xA;" />
  <row Id="10544" PostHistoryTypeId="5" PostId="5277" RevisionGUID="5937e52d-0327-4723-afcc-a0a0c59eba40" CreationDate="2010-11-07T20:21:15.807" UserId="3020" Comment="edited to clarify the cuestion" Text="&gt; **Possible Duplicate:**  &#xD;&#xA;&gt; [Where can I find good (well organized) examples of game code?](http://gamedev.stackexchange.com/questions/1497/where-can-i-find-good-well-organized-examples-of-game-code)  &#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;I have coded several C++ games and now I'm building my own game engine and editor.&#xD;&#xA;&#xD;&#xA;I have some doubts about the design and I wish to find great examples to follow.&#xD;&#xA;&#xD;&#xA;What is the best designed in your opinion?&#xD;&#xA;&#xD;&#xA;Must be object oriented. Programming language does not matter, but I prefer in this order: C++, C#, Java or another similar.&#xD;&#xA;&#xD;&#xA;**EDITED: To clarify more, I'm not interested on game-specific code. I want general purpose game engines.**" />
  <row Id="10545" PostHistoryTypeId="2" PostId="5300" RevisionGUID="597ab550-6196-4965-97f7-7e3dabce124c" CreationDate="2010-11-07T20:22:47.693" UserId="1037" Text="How do you implement a touch hash code and reference it later? I have read about a &quot;hash&quot; code, but I don't understand how to use it. I want to know when two of my Sprites are touched at the same time, like as if pressing a chord on two keys of a piano.&#xD;&#xA;&#xD;&#xA;Here is an example of what I have for my ccTouchesBegan:&#xD;&#xA;&#xD;&#xA;    - (void) ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {&#xD;&#xA;    &#xD;&#xA;      NSSet *allTouches = [event allTouches];&#xD;&#xA;      int validTouchCount = 0;&#xD;&#xA;      for (UITouch* touch in allTouches) {&#xD;&#xA;    &#xD;&#xA;        BOOL touchIsValid = FALSE;&#xD;&#xA;    &#xD;&#xA;        CGPoint location = [touch locationInView: [touch view]];&#xD;&#xA;        CGPoint convertedLocation = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;    &#xD;&#xA;        if (CGRectContainsPoint(_fourButtonsRect, convertedLocation)) {&#xD;&#xA;            NSLog(@&quot;Touch is within four buttons&quot;);&#xD;&#xA;            touchIsValid = TRUE;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        _playerDidAction = 0;&#xD;&#xA;        NSLog(@&quot;before the loop&quot;);&#xD;&#xA;        if (touchIsValid) {&#xD;&#xA;    &#xD;&#xA;            validTouchCount++;&#xD;&#xA;            NSLog(@&quot;Within ValidTouches loop&quot;);&#xD;&#xA;            CGPoint validLocation = [touch locationInView: [touch view]];&#xD;&#xA;            CGPoint convertedValidLocation = [[CCDirector sharedDirector] convertToGL:validLocation];&#xD;&#xA;    &#xD;&#xA;            if (CGRectContainsPoint(_redButtonSprite.boundingBox, convertedValidLocation)) {&#xD;&#xA;                _redButtonStatus = TRUE;&#xD;&#xA;                [_redButtonSprite setTexture:_redButtonLit];&#xD;&#xA;                if (validTouchCount == 1) {&#xD;&#xA;                    _playerDidAction = 1;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;                else if (CGRectContainsPoint(_blueButtonSprite.boundingBox, convertedValidLocation)) {  &#xD;&#xA;                    _blueButtonStatus = TRUE;&#xD;&#xA;                    [_blueButtonSprite setTexture:_blueButtonLit];&#xD;&#xA;                    if (validTouchCount == 1) {&#xD;&#xA;                        _playerDidAction = 2;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                    else if (CGRectContainsPoint(_greenButtonSprite.boundingBox, convertedValidLocation)) { &#xD;&#xA;                        _greenButtonStatus = TRUE;&#xD;&#xA;                        [_greenButtonSprite setTexture:_greenButtonLit];&#xD;&#xA;                        if (validTouchCount == 1) {&#xD;&#xA;                            _playerDidAction = 3;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                        else if (CGRectContainsPoint(_yellowButtonSprite.boundingBox, convertedValidLocation)) {    &#xD;&#xA;                            _yellowButtonStatus = TRUE;&#xD;&#xA;                            [_yellowButtonSprite setTexture:_yellowButtonLit];&#xD;&#xA;                            if (validTouchCount == 1) {&#xD;&#xA;                                _playerDidAction = 4;&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;            if (validTouchCount &gt; 1) {&#xD;&#xA;    &#xD;&#xA;                if (_redButtonStatus &amp;&amp; _blueButtonStatus) {&#xD;&#xA;                    _comboRB = TRUE;&#xD;&#xA;                    _playerDidAction = 5;&#xD;&#xA;                }&#xD;&#xA;                    else if (_redButtonStatus &amp;&amp; _greenButtonStatus) {&#xD;&#xA;                        _comboRG = TRUE;&#xD;&#xA;                        _playerDidAction = 6;&#xD;&#xA;                    }&#xD;&#xA;                        else if (_redButtonStatus &amp;&amp; _yellowButtonStatus) {&#xD;&#xA;                            _comboRY = TRUE;&#xD;&#xA;                            _playerDidAction = 7;&#xD;&#xA;                        }&#xD;&#xA;                            else if (_blueButtonStatus &amp;&amp; _greenButtonStatus) {&#xD;&#xA;                                _comboBG = TRUE;&#xD;&#xA;                                _playerDidAction = 8;&#xD;&#xA;                            }&#xD;&#xA;                                else if (_blueButtonStatus &amp;&amp; _yellowButtonStatus) {&#xD;&#xA;                                    _comboBY = TRUE;&#xD;&#xA;                                    _playerDidAction = 9;&#xD;&#xA;                                }&#xD;&#xA;                                    else if (_greenButtonStatus &amp;&amp; _yellowButtonStatus) {&#xD;&#xA;                                        _comboGY = TRUE;&#xD;&#xA;                                        _playerDidAction = 10;&#xD;&#xA;                                    }&#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And here is the beginning of my ccTouchesEnded:&#xD;&#xA;&#xD;&#xA;    - (void)ccTouchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {&#xD;&#xA;    &#xD;&#xA;        for (UITouch *touch in touches) {&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            CGPoint location = [touch locationInView: [touch view]];&#xD;&#xA;            CGPoint convertedLocation = [[CCDirector sharedDirector] convertToGL:location];     &#xD;&#xA;            if (CGRectContainsPoint(_redButtonSprite.boundingBox, convertedLocation)) { &#xD;&#xA;                _redButtonStatus = FALSE;&#xD;&#xA;                [_redButtonSprite setTexture:_redButtonNormal];&#xD;&#xA;            }&#xD;&#xA;            if (CGRectContainsPoint(_blueButtonSprite.boundingBox, convertedLocation)) {    &#xD;&#xA;                _blueButtonStatus = FALSE;&#xD;&#xA;                [_blueButtonSprite setTexture:_blueButtonNormal];&#xD;&#xA;            }&#xD;&#xA;            if (CGRectContainsPoint(_greenButtonSprite.boundingBox, convertedLocation)) {   &#xD;&#xA;                _greenButtonStatus = FALSE;&#xD;&#xA;                [_greenButtonSprite setTexture:_greenButtonNormal];&#xD;&#xA;            }&#xD;&#xA;            if (CGRectContainsPoint(_yellowButtonSprite.boundingBox, convertedLocation)) {  &#xD;&#xA;                _yellowButtonStatus = FALSE;&#xD;&#xA;                [_yellowButtonSprite setTexture:_yellowButtonNormal];&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Could you give me an example of how I would code the capture of the hash code in the touchesBegan and then reference the hash code in the touchesEnded? I have been struggling and can't get the hash code to work - just not understanding how the hash code can be used to reference a touch later. I guess what I'm trying to make would be called a hash tracker?&#xD;&#xA;&#xD;&#xA;I am sure there is a much less convoluted way to do it using the hash codes and less state variables. I haven't fleshed out the ccTouchesEnded method with the other state variable effects because I was hoping to find a simpler way (I know I still need to make the ccTouchesMoved and Canceled methods too).&#xD;&#xA;&#xD;&#xA;Any advise would be very appreciated as I am stuck!  B)" />
  <row Id="10546" PostHistoryTypeId="1" PostId="5300" RevisionGUID="597ab550-6196-4965-97f7-7e3dabce124c" CreationDate="2010-11-07T20:22:47.693" UserId="1037" Text="Tracking Multiple Touches using Hash codes in Cocos2d for iPhone" />
  <row Id="10547" PostHistoryTypeId="3" PostId="5300" RevisionGUID="597ab550-6196-4965-97f7-7e3dabce124c" CreationDate="2010-11-07T20:22:47.693" UserId="1037" Text="&lt;iphone&gt;&lt;cocos2d&gt;&lt;cocos2d-iphone&gt;&lt;multitouch&gt;" />
  <row Id="10548" PostHistoryTypeId="2" PostId="5301" RevisionGUID="dd0d87dc-3a18-4090-a79f-22e9994af049" CreationDate="2010-11-07T20:24:03.777" UserId="469" Text="I would say Cube 2.&#xD;&#xA;&#xD;&#xA;You know, you limited yourself too much, there are plenty of good options out there, Unity is cool, UDK, Source SDK (if you don't want to buy a source game, get Alien Swarm), Torque 3D is popular (although in my opinion it suck...), and so on...&#xD;&#xA;&#xD;&#xA;Also there are some scenegraph stuff if you are willing to learn C++, like Horde3D (really great, REALLY great...), Ogre3D (really bloated... but good, and popular), Irrlicht (lighter than Ogre3D, more flexible than Horde3D, but the age and clutter shows...), and so on...&#xD;&#xA;&#xD;&#xA;Your two options are limited in my opinion. I would say to you use Cube 2, it has a good scripting language (the original author of the engine is a professional langauge designer, that designed Far Cry 1 language, among other stuff), and it is open source too if you want to hack it to do more custom stuff." />
  <row Id="10549" PostHistoryTypeId="2" PostId="5302" RevisionGUID="1b558063-576c-4435-98bb-e516a3a7f4a6" CreationDate="2010-11-07T20:27:15.573" UserId="2798" Text="Do you have an ATI card? I think they deprecated some portions of OpenGL (picking included) a long time ago." />
  <row Id="10550" PostHistoryTypeId="5" PostId="5275" RevisionGUID="e65e6056-9bdb-4711-8ba6-b182c0bb0962" CreationDate="2010-11-07T21:37:47.693" UserId="2290" Comment="Corrected potion_type_id" Text="Unfortunately, situations like this are where relational databases (such as SQL) fall short, and non-relational databases (such as [MongoDB][1]) excel. That being said, since it seems like your codebase is already reliant on SQL, here is the model I would go with:&#xD;&#xA;&#xD;&#xA;Instead of creating an item and uses table, create a table and &quot;[item]_type&quot; reference table for each item type.&#xD;&#xA;&#xD;&#xA;Here's an example:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;&#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    2 | Mana&#xD;&#xA;&#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | 1| 5&#xD;&#xA;    2 | Mana Drainer | 2| -5&#xD;&#xA;&#xD;&#xA;This solution gives you a lot of long-term flexibility, it reduces (if not eliminates) wasted space, and is self-documenting (unlike &quot;item_use_data&quot;). It involves a little more setup on your part, but, in my opinion, it's definitely worth it.&#xD;&#xA;&#xD;&#xA;**Edit:** Corrected an error with the potion_type_id field&#xD;&#xA;  [1]: http://www.mongodb.org/" />
  <row Id="10551" PostHistoryTypeId="2" PostId="5303" RevisionGUID="eb5c0d6b-e0ec-44ea-8dd0-0dc19da50182" CreationDate="2010-11-07T22:12:50.283" UserId="2734" Text="How can I represent 3D world space with 2D tiles? **I do not mean isometric**, which is *visually* represent 3D objects in 2D space. &#xD;&#xA;&#xD;&#xA;Let's say there's [some height map][1], and each 2D tile (X, Y) represents a coordinate on **the top of the map** - so the Y is generated automatically, X stays the same and the tile's Y is the 3D Z component. Is it the right way to transform 2D coordinate to a 3D coordinate (again, on top of the terrain)? &#xD;&#xA;&#xD;&#xA;Also - is it possible to implement water effect this way?&#xD;&#xA;&#xD;&#xA;I'd like to read any articles/tutorials/opinions on this subject and how to implement it.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprogrammer.com/fractal/heightmap.jpg" />
  <row Id="10552" PostHistoryTypeId="1" PostId="5303" RevisionGUID="eb5c0d6b-e0ec-44ea-8dd0-0dc19da50182" CreationDate="2010-11-07T22:12:50.283" UserId="2734" Text="Representing 3D World Space with 2D Tiles" />
  <row Id="10553" PostHistoryTypeId="3" PostId="5303" RevisionGUID="eb5c0d6b-e0ec-44ea-8dd0-0dc19da50182" CreationDate="2010-11-07T22:12:50.283" UserId="2734" Text="&lt;2d&gt;&lt;graphics&gt;&lt;3d&gt;&lt;tiles&gt;" />
  <row Id="10554" PostHistoryTypeId="2" PostId="5304" RevisionGUID="6340a6ab-3b2d-4581-82c0-ab4d0f8b7ebd" CreationDate="2010-11-07T22:18:54.227" UserId="27" Text="I'm looking into doing a 2d lighting system with a result similar to this: http://forums.tigsource.com/index.php?topic=15619.0 This thread I believe disregards color, as well as doesn't really list a clear final solution, which is something we could provide here.&#xD;&#xA;&#xD;&#xA;What I'd like to do is start with a solid black texture, and render colored lights to it. When I render a colored light onto the texture, I'd like it to subtract the alpha away from the solid black texture but also add in the color of the light. In the end, my goal would be to have a texture that I can blend normally on top of my scene, using glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), which would let the background show through in the &quot;lighted&quot; areas in addition to adding some of that lights color to the area.&#xD;&#xA;&#xD;&#xA;To start I fill the texture with black:&#xD;&#xA;&#xD;&#xA;    glColor4f( 0.0f, 0.0f, 0.0f, 1.0 )&#xD;&#xA;&#xD;&#xA;Then I set the blend function to subtract and draw the lights:&#xD;&#xA;&#xD;&#xA;    glBlendEquation( GL_FUNC_SUBTRACT );&#xD;&#xA;    glBlendFunc( ??? , ??? ); // Not quite sure what to put here&#xD;&#xA;&#xD;&#xA;    // Draw a triangle fan for the circle of light.&#xD;&#xA;    glColor4f( 0.0f, 0.0f, 0.0f, 0.8f );&#xD;&#xA;    glBegin(GL_TRIANGLE_FAN);&#xD;&#xA;    glVertex2f(0, 0);&#xD;&#xA;    glColor4f( 0.0f, 0.0f, 0.0f, 0.0f );&#xD;&#xA;    for (float angle = 0; angle &lt;= 6.28; angle+=0.1) {&#xD;&#xA;        glVertex2f(sin(angle) * sizeOfLight, cos(angle) * sizeOfLight);&#xD;&#xA;    }&#xD;&#xA;    glVertex2f(sin(3.14159*2) * sizeOfLight, cos(3.14159*2) * sizeOfLight);&#xD;&#xA;    glEnd();&#xD;&#xA;&#xD;&#xA;    // Reset this back to normal&#xD;&#xA;    glBlendEquation(GL_FUNC_ADD);&#xD;&#xA;&#xD;&#xA;The guts of my question is what type of blending would I need here, on the second line of this code block." />
  <row Id="10555" PostHistoryTypeId="1" PostId="5304" RevisionGUID="6340a6ab-3b2d-4581-82c0-ab4d0f8b7ebd" CreationDate="2010-11-07T22:18:54.227" UserId="27" Text="Blending 2d images to subtract alpha" />
  <row Id="10556" PostHistoryTypeId="3" PostId="5304" RevisionGUID="6340a6ab-3b2d-4581-82c0-ab4d0f8b7ebd" CreationDate="2010-11-07T22:18:54.227" UserId="27" Text="&lt;2d&gt;&lt;opengl&gt;&lt;lighting&gt;&lt;blending&gt;" />
  <row Id="10561" PostHistoryTypeId="2" PostId="5307" RevisionGUID="663ce419-1295-4a92-ad35-17c308da59ae" CreationDate="2010-11-07T23:04:29.427" UserId="1386" Text="This [tutorial (msdn)][1] gives a description of a vertex layout.&#xD;&#xA;&#xD;&#xA;This is an example of a input layout:&#xD;&#xA;&#xD;&#xA;    D3D11_INPUT_ELEMENT_DESC layout[] =&#xD;&#xA;    {&#xD;&#xA;        { &quot;POSITION&quot;, 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },  &#xD;&#xA;    };&#xD;&#xA;    UINT numElements = ARRAYSIZE(layout);&#xD;&#xA;&#xD;&#xA;It seems to me that it would be easier to bypass this and simply consider data sent to the vertex shader/pixel shader as a block of floats and allow the vertex or pixel shader to interpret it as it wants.&#xD;&#xA;&#xD;&#xA;**My question is this:**&#xD;&#xA;&#xD;&#xA; - What is the purpose of a vertex&#xD;&#xA;   layout?&#xD;&#xA; - Is a vertex layout optional&#xD;&#xA;   in Direct3D 11?&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff729719(v=VS.85).aspx" />
  <row Id="10562" PostHistoryTypeId="1" PostId="5307" RevisionGUID="663ce419-1295-4a92-ad35-17c308da59ae" CreationDate="2010-11-07T23:04:29.427" UserId="1386" Text="What is the purpose of a Direct3D vertex layout?" />
  <row Id="10563" PostHistoryTypeId="3" PostId="5307" RevisionGUID="663ce419-1295-4a92-ad35-17c308da59ae" CreationDate="2010-11-07T23:04:29.427" UserId="1386" Text="&lt;directx&gt;&lt;directx11&gt;&lt;vertex&gt;" />
  <row Id="10565" PostHistoryTypeId="2" PostId="5308" RevisionGUID="d21ba98a-f4e6-447f-a9cb-7cf585e586b3" CreationDate="2010-11-08T01:28:38.167" UserId="1543" Text="Look in to [Particle Systems][1] or particle effects.&#xD;&#xA;&#xD;&#xA;Here are some links to tutorials:&#xD;&#xA;&#xD;&#xA;http://gpwiki.org/index.php/OpenGL:Tutorials:Tutorial_Framework:Particles&#xD;&#xA;&#xD;&#xA;http://www.swiftless.com/tutorials/opengl/particles.html&#xD;&#xA;&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Particle_system" />
  <row Id="10566" PostHistoryTypeId="2" PostId="5309" RevisionGUID="1367c7c6-03db-46ac-93e1-ea60df33e286" CreationDate="2010-11-08T02:05:53.803" UserId="3115" Text="I agree upon the other answers her already, but also, try to think of WoW/Warcraft3 as actual 2D worlds. They arent that different from tilebased, its just the tiles.&#xD;&#xA;&#xD;&#xA;You could also think of how does a GPS find the best path? there a loads of algortimns for pathfinding through linked maps.&#xD;&#xA;&#xD;&#xA;I think some of the first &quot;Quake bots&quot; scripts also might help you, as they were developed to work in &quot;unknown areas&quot; because we could design our own levels from scratch.&#xD;&#xA;&#xD;&#xA;All in all, my personal way to deal with such a map, would be to think of it as the A* pathfinder. But first I would pre-calc every &quot;tile point&quot; and index all these with &quot;nearest neighbour&quot; etc. Then when an object needed to go from A to B then just lookup in B, see to what its connected and keep repeating until you reach the goal. &#xD;&#xA;&#xD;&#xA;Depending on the type of game and landscape/scenario, different pre-scan tactics might be usefull too. Some games have very little obstracles and these can be &quot;streight line&quot; movement + some &quot;how do I get around&quot; for objects.&#xD;&#xA;&#xD;&#xA;Hope this makes a little sense and perhaps gave you some thoughts to work with." />
  <row Id="10567" PostHistoryTypeId="2" PostId="5310" RevisionGUID="74efb20a-26c2-48d8-be8a-3de4408884b4" CreationDate="2010-11-08T02:06:01.283" UserId="1919" Text="Man, I'm really bad at drawing...&#xD;&#xA;I feel myself really ashamed because I cannot draw even a little nice sword... :(&#xD;&#xA;&#xD;&#xA;The problem is, on game development (I will be on the programming part, relax!) I will need to explain some game ideas to game artists, like &quot;I need that city like this&quot; or &quot;that character needs to have that look and feel&quot;.&#xD;&#xA;&#xD;&#xA;My idea is, I really need some BASIC skills on drawing some draft of what I'm thinking...&#xD;&#xA;&#xD;&#xA;I'm bad in pen/paper drawing and photoshop/corel drawing, but I'm convicted to learn photoshop or corel to draft something...&#xD;&#xA;&#xD;&#xA;Someone has passed that problem? What you recommend?" />
  <row Id="10568" PostHistoryTypeId="1" PostId="5310" RevisionGUID="74efb20a-26c2-48d8-be8a-3de4408884b4" CreationDate="2010-11-08T02:06:01.283" UserId="1919" Text="Drawing to create game drafts" />
  <row Id="10569" PostHistoryTypeId="3" PostId="5310" RevisionGUID="74efb20a-26c2-48d8-be8a-3de4408884b4" CreationDate="2010-11-08T02:06:01.283" UserId="1919" Text="&lt;game-design&gt;" />
  <row Id="10570" PostHistoryTypeId="2" PostId="5311" RevisionGUID="3e40431f-1386-4aed-817d-d29655be0a0b" CreationDate="2010-11-08T02:11:14.200" UserId="189" Text="I'm pretty terrible at any sort of drawing too, but I bought a **[Wacom tablet][1]** anyway. I find that it's much easier for me to draw something with pen and tablet, than to try and draw it with a mouse, or (even worse) to draw it, scan it in, and then try and clean it up to where it is usable as an asset.&#xD;&#xA;&#xD;&#xA;Another option is to get really good at [Google image search][2], and then make a [collage][3] of downloaded images. This can be used to give artists a sense of the overall art style of a game, or to choose a color palette, or anything else you want to do. And the best part is it's as easy as downloading images and copy and pasting them together. For example, if you want to convey that a character should have a certain look and feel, search for an image of the body type, and then images of clothes, and images of other accessories (weapons, etc.). The artists should get a great sense of what you want, and they can use their artistic ability to fill in the blanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wacom.com/intuos/&#xD;&#xA;  [2]: http://images.google.com/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Collage" />
  <row Id="10571" PostHistoryTypeId="2" PostId="5312" RevisionGUID="6eb9bfdb-ce2c-44e9-a58a-695412c88f63" CreationDate="2010-11-08T02:33:20.023" UserId="3115" Text="If you get the real artist for the job, all you need to be able to draw is actual simple crosses, boxes, circles etc.&#xD;&#xA;&#xD;&#xA;But use a &quot;grid&quot; and perhaps some colors (kids pens are enough for a start) and then remember to write down what each color really means.&#xD;&#xA;&#xD;&#xA;Dont use paint as you will have to draw with a mouse.&#xD;&#xA;&#xD;&#xA;Rather use &quot;Squares&quot; and &quot;circles&quot; and &quot;lines&quot; for a start.&#xD;&#xA;&#xD;&#xA;I always try to make some sort of &quot;grid/layout&quot; of the actual gameuniverse + I use a lot of papers trying to divide my idea into objects I can explain and put into systems later. Might not always give me the best result first time, but the more you do it, the better you will get.&#xD;&#xA;&#xD;&#xA;Instead of a Wacom tablet you could just buy a Flatbed Scanner. (I have a Canon Lide 90)&#xD;&#xA;secondly, use Google Images for prototype." />
  <row Id="10572" PostHistoryTypeId="2" PostId="5313" RevisionGUID="35b9eb2e-ba4f-472d-bc3f-c70a806d6161" CreationDate="2010-11-08T02:42:51.713" UserId="2634" Text="Just get yourself a copy of dia http://projects.gnome.org/dia/&#xD;&#xA;It's an open-source vector drawing program.  If all you're drawing is circles, squares, lines, and text, it's all you really need.  &#xD;&#xA;&#xD;&#xA;Here's a game outline I did in DIA: (converted to png format)&#xD;&#xA;http://www.aharrisbooks.net/pythonGame/ch07/mailPilot.png&#xD;&#xA;&#xD;&#xA;...and here's a state diagram for an adventure game&#xD;&#xA;http://www.aharrisbooks.net/pythonGame/ch10/adventure.png&#xD;&#xA;&#xD;&#xA;That's enough to get the basic ideas.  &#xD;&#xA;&#xD;&#xA;I also spent the time to learn some basic 3D modeling in Blender http://www.blender.org.&#xD;&#xA;I haven't any particular artistic skills, but I can usually knock together a cartoony model pretty quickly and use a snapshot of it for 2D game sprites.  &#xD;&#xA;&#xD;&#xA;I have some videos about blender as part of one of my classes:&#xD;&#xA;http://synapse.cs.iupui.edu/Mediasite/Catalog/Front.aspx?cid=5d511316-3092-446e-9a69-79d35c41b62d&#xD;&#xA;Blender stuff starts at video 13.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="10573" PostHistoryTypeId="2" PostId="5314" RevisionGUID="12c5ba03-b53a-4fbc-8805-749fd4025f9a" CreationDate="2010-11-08T04:15:26.137" UserId="37" Text="I've created an HTML5 Canvas and JS game that runs great on a desktop or laptop in Chrome (30fps), but on mobile Safari I only get around 8 fps. Are there any simple tips or tricks to increase the framerate?" />
  <row Id="10574" PostHistoryTypeId="1" PostId="5314" RevisionGUID="12c5ba03-b53a-4fbc-8805-749fd4025f9a" CreationDate="2010-11-08T04:15:26.137" UserId="37" Text="How does one optimize an HTML5 Canvas and JavaScript web application for Mobile Safari?" />
  <row Id="10575" PostHistoryTypeId="3" PostId="5314" RevisionGUID="12c5ba03-b53a-4fbc-8805-749fd4025f9a" CreationDate="2010-11-08T04:15:26.137" UserId="37" Text="&lt;optimization&gt;&lt;javascript&gt;&lt;html5&gt;&lt;mobile&gt;" />
  <row Id="10576" PostHistoryTypeId="2" PostId="5315" RevisionGUID="aceb05b7-31e4-48aa-a331-cd21b67dbb7e" CreationDate="2010-11-08T04:20:24.367" UserId="37" Text="I've built a web app that makes heavy use of JavaScript and HTML5 canvas. It's easy to debug in Chrome, but on a mobile device the developer tools are much less robust. Is there a tool or technique that will enable me to easily debug and profile my application on an iPod in Mobile Safari?" />
  <row Id="10577" PostHistoryTypeId="1" PostId="5315" RevisionGUID="aceb05b7-31e4-48aa-a331-cd21b67dbb7e" CreationDate="2010-11-08T04:20:24.367" UserId="37" Text="What is the best way to debug and profile a web application on an iPod in Mobile Safari?" />
  <row Id="10578" PostHistoryTypeId="3" PostId="5315" RevisionGUID="aceb05b7-31e4-48aa-a331-cd21b67dbb7e" CreationDate="2010-11-08T04:20:24.367" UserId="37" Text="&lt;javascript&gt;&lt;html5&gt;&lt;mobile&gt;&lt;debug&gt;" />
  <row Id="10579" PostHistoryTypeId="5" PostId="5275" RevisionGUID="1d71d2a5-2397-41d8-9c2c-0a4793de0822" CreationDate="2010-11-08T04:26:02.337" UserId="2290" Comment="Added more detail on non-relational vs relational databases to provide additional perspective" Text="Unfortunately, situations like this are where relational databases (such as SQL) fall short, and non-relational databases (such as [MongoDB][1]) excel. That being said, it is not impossible to model the data in a relational database, and since it seems like your codebase is already reliant on SQL, here is the model I would go with:&#xD;&#xA;&#xD;&#xA;Instead of creating an item and uses table, create a table and &quot;[item]_type&quot; reference table for each item type.&#xD;&#xA;&#xD;&#xA;Here are a few examples:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;&#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    2 | Mana&#xD;&#xA;&#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | 1| 5&#xD;&#xA;    2 | Mana Drainer | 2| -5&#xD;&#xA;&#xD;&#xA;This solution gives you a lot of long-term flexibility and scalability, it reduces (if not eliminates) wasted space, and is self-documenting (unlike &quot;item_use_data&quot;). It involves a little more setup on the developer's end, but, in my opinion, it is the most elegant solution available for situations where you need to use a relational database to store your data. Generally speaking, non-relational databases are much better for game development, as they are more flexible in how they model data, while being more performant than SQL-based databases - making them a &quot;win-win&quot; choice. &#xD;&#xA;&#xD;&#xA;**Edit 1:** Corrected an error with the potion_type_id field&#xD;&#xA;&#xD;&#xA;**Edit 2:** Added more detail on non-relational vs relational databases to provide additional perspective&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mongodb.org/" />
  <row Id="10580" PostHistoryTypeId="2" PostId="5316" RevisionGUID="711fe338-7697-4402-95b3-77cf8b9f633f" CreationDate="2010-11-08T04:49:53.053" UserId="1311" Text="Out of an opportunity and boredom, a friend and I decided to make a web based game. This is the first 'game' I will be making, since usually I program web apps in django. &#xD;&#xA;&#xD;&#xA;I've opted to use the same framework for the game, but I am not totally sure about the data storage, since I cannot foresee future requirements and DB related issues. Lately, the noSQL movement is gaining force and I would like to explore that area. &#xD;&#xA;&#xD;&#xA;Therefore I have the following questions:&#xD;&#xA;&#xD;&#xA;- Would a noSQL datastorage (document-based, such as MongoDB) would be suitable for a web-based game?&#xD;&#xA;- What are the issues that might arise using a conventional RDBMS, such as MySQL?&#xD;&#xA;- How to insurance data consistency amongst users with MongoDB, during gameplay or at timed events, such as cron jobs?&#xD;&#xA;&#xD;&#xA;Game overview:&#xD;&#xA;Typical adventure game, with the player fighting monsters and gaining items and such.&#xD;&#xA;&#xD;&#xA;- Some data is static across all players: items, weapons, potion, maps, etc.&#xD;&#xA;- Some data tied to the player: inventory, metrics (stats), progress, etc.&#xD;&#xA;- A player might need to know the stats and state of another player&#xD;&#xA;- Scheduled tasks will be run at certain time interval&#xD;&#xA;" />
  <row Id="10581" PostHistoryTypeId="1" PostId="5316" RevisionGUID="711fe338-7697-4402-95b3-77cf8b9f633f" CreationDate="2010-11-08T04:49:53.053" UserId="1311" Text="noSQL - Is it a valid option for web based game?" />
  <row Id="10582" PostHistoryTypeId="3" PostId="5316" RevisionGUID="711fe338-7697-4402-95b3-77cf8b9f633f" CreationDate="2010-11-08T04:49:53.053" UserId="1311" Text="&lt;architecture&gt;&lt;web&gt;&lt;python&gt;&lt;databases&gt;" />
  <row Id="10586" PostHistoryTypeId="2" PostId="5318" RevisionGUID="f3e54fcb-7782-472b-8a05-6a170a4d5d8e" CreationDate="2010-11-08T05:35:10.220" UserId="800" Text="How can I render some graphics using XNA to a widget/control in a WPF app? Specifically, I don't need any WPF controls inside the XNA graphics window, I just want to put some controls around it for a level editor." />
  <row Id="10587" PostHistoryTypeId="1" PostId="5318" RevisionGUID="f3e54fcb-7782-472b-8a05-6a170a4d5d8e" CreationDate="2010-11-08T05:35:10.220" UserId="800" Text="How to use XNA in WPF?" />
  <row Id="10588" PostHistoryTypeId="3" PostId="5318" RevisionGUID="f3e54fcb-7782-472b-8a05-6a170a4d5d8e" CreationDate="2010-11-08T05:35:10.220" UserId="800" Text="&lt;xna&gt;&lt;c#&gt;&lt;wpf&gt;" />
  <row Id="10589" PostHistoryTypeId="2" PostId="5319" RevisionGUID="b7fb93c6-0311-4934-a50e-9e42faadde44" CreationDate="2010-11-08T05:51:56.207" UserId="288" Text="&lt;a href=&quot;http://blogs.msdn.com/b/nicgrave/archive/2010/07/25/rendering-with-xna-framework-4-0-inside-of-a-wpf-application.aspx&quot;&gt;Nick Gravelyn explains how to do it on his blog.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Although, if it's just for an editor, you may find using &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/winforms_series_1&quot;&gt;WinForms&lt;/a&gt; is easier and better supported." />
  <row Id="10590" PostHistoryTypeId="2" PostId="5320" RevisionGUID="056d9077-3994-4f42-ab15-0408cf39fb7c" CreationDate="2010-11-08T06:04:08.940" UserId="3142" Text="i'm guessing that you are tiring of typing all those if statements.&#xD;&#xA;&#xD;&#xA;maybe a simple addition to what you already seem to have going on is to add a setStatus method to your sprite class. also make the sprite object track what its state TRUE and state FALSE textures are. then you can just iterate thru the touches and check all your objects in a loop with a single setState call.&#xD;&#xA;&#xD;&#xA;unless you have a zillion sprites it will probably be no slower than what you have going on now.&#xD;&#xA;&#xD;&#xA;im not sure at all what you mean by hash codes in this instance?" />
  <row Id="10593" PostHistoryTypeId="2" PostId="5321" RevisionGUID="3d65013e-2a1d-47c1-8851-a846624ebd59" CreationDate="2010-11-08T06:17:13.917" UserId="3142" Text="JSON is very lightweight and easy to understand. I think it's better suited for a game. cJSON is really nice. it will also incorporate into your source in the same manner as SQLlite does.&#xD;&#xA;&#xD;&#xA;XML files are harder for users to edit than you may think. if you go that route you may want to make an editor for folks to use to help them avoid common pitfalls." />
  <row Id="10594" PostHistoryTypeId="2" PostId="5322" RevisionGUID="038366ec-2563-4cf4-90cf-6600013491be" CreationDate="2010-11-08T06:35:25.590" UserId="2290" Text="Would a noSQL database be suitable for a web-based game?&#xD;&#xA;----------------------------------------&#xD;&#xA;Absolutely! Generally speaking, non-relational databases (such as MongoDB) are much better for games, as they are more flexible in how they model data, while being more performant than relational databases (such as SQL) - making them a &quot;win-win&quot; choice.&#xD;&#xA;&#xD;&#xA;What are the issues that might arise using a conventional RDBMS?&#xD;&#xA;----------------------------------------&#xD;&#xA;There are two major drawbacks to using relational databases:&#xD;&#xA;&#xD;&#xA; - Lack of flexibility in the way you model data &#xD;&#xA; - Performance&#xD;&#xA;&#xD;&#xA;Lack of flexibility in the way you model data is a major drawback, because using a relational database forces you to model data to fit the needs of the database, rather than the database accommodating the needs of the model. For example, consider you're creating the model for how you'll store items in a game using a relational database and you decide on the following model:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;    &#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    2 | Mana&#xD;&#xA;    &#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | 1| 5&#xD;&#xA;    2 | Mana Drainer | 2| -5&#xD;&#xA;&#xD;&#xA;Now consider how you'd need to modify the model to meet do the following:&#xD;&#xA;&#xD;&#xA; - Add a new item type&#xD;&#xA; - Create a weapon with multiple weapon types&#xD;&#xA; - Create a potion item that can also be used as a weapon&#xD;&#xA;&#xD;&#xA;Certainly all these actions are doable, but you won't be the happiest person while you're doing them, and you'll probably wonder, &quot;is there a better solution out there for what I want to do?,&quot; when you could design a much more flexible model in a non-relational database.&#xD;&#xA;&#xD;&#xA;There are a lot of good articles on the performance of NoSQL vs SQL databases, but here is one which provides application examples so you can perform your own tests: [MongoDB vs. SQL Server 2008 Performance Showdown][1]&#xD;&#xA;&#xD;&#xA;How do I insure data consistency amongst users with MongoDB?&#xD;&#xA;----------------------------------------&#xD;&#xA;MongoDB supports read/write atomic operations on single data entities (documents), so &#xD;&#xA;query results from MongoDB should always be accurate with what is stored within the database.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.michaelckennedy.net/blog/2010/04/29/MongoDBVsSQLServer2008PerformanceShowdown.aspx" />
  <row Id="10595" PostHistoryTypeId="2" PostId="5323" RevisionGUID="86640fa2-f88b-4395-94e1-2ce44d8a9402" CreationDate="2010-11-08T07:20:51.967" UserId="424" Text="Unfortunately, the answer is to draw less. I've found the bottleneck with canvas based applications (on any platform, really) is the time it takes to actually draw pixels.&#xD;&#xA;&#xD;&#xA;Here are some things to try:&#xD;&#xA;&#xD;&#xA;1. Use several canvas layers. Draw your background to one layer which drawing your objects to another layer (absolutely positioned on top of the background layer). (Note: I haven't tried this on mobile safari, but it can help on other platforms)&#xD;&#xA;&#xD;&#xA;2. Only redraw sprites that have changed. This is tricky but definitely increases performance. The idea is to store whether or not a sprite needs to be redrawn and redraw only sprites that need it along with the background behind them. (This also needs to cascade to other objects that sprite might be overlapping.)&#xD;&#xA;&#xD;&#xA;The thing with developing on Chrome is that a) its JavaScript engine (V8) is fast as hell and b) the newest versions (7,8,9) all have some GPU acceleration when it comes to canvas rendering. That coupled with the fact that mobile hardware just isn't as powerful as your desktop/laptop means that it'll be really difficult to get anywhere near the same performance on mobile safari.&#xD;&#xA;&#xD;&#xA;I think, for the time being, the best approach might be to target your game at mobile safari from the get go and try and build a game that's not as redraw intensive.&#xD;&#xA;" />
  <row Id="10596" PostHistoryTypeId="2" PostId="5324" RevisionGUID="1f6e4c73-44bb-4a16-b515-743f788bbea6" CreationDate="2010-11-08T07:47:17.873" UserId="3142" Text="everything @Gosub said plus:&#xD;&#xA;&#xD;&#xA;look at whatever math you're doing, see if there's anyway to use more efficient algorithms.&#xD;&#xA;&#xD;&#xA;use smaller images. try making the dimensions of the image powers of 2&#xD;&#xA;&#xD;&#xA;see if you can get rid of alpha blending on the canvas or dont use CSS opacity property. &#xD;&#xA;&#xD;&#xA;please post back your results. would be interesting to know what things helped most." />
  <row Id="10597" PostHistoryTypeId="5" PostId="5323" RevisionGUID="2f76e89e-9071-42e1-bc42-fe96d973ba7f" CreationDate="2010-11-08T07:56:49.903" UserId="424" Comment="Fixed misspelling." Text="Unfortunately, the answer is to draw less. I've found the bottleneck with canvas based applications (on any platform, really) is the time it takes to actually draw pixels.&#xD;&#xA;&#xD;&#xA;Here are some things to try:&#xD;&#xA;&#xD;&#xA;1. Use several canvas layers. Draw your background to one layer while drawing your objects to another layer (absolutely positioned on top of the background layer). (Note: I haven't tried this on mobile safari, but it can help on other platforms)&#xD;&#xA;&#xD;&#xA;2. Only redraw sprites that have changed. This is tricky but definitely increases performance. The idea is to store whether or not a sprite needs to be redrawn and redraw only sprites that need it along with the background behind them. (This also needs to cascade to other objects that sprite might be overlapping.)&#xD;&#xA;&#xD;&#xA;The thing with developing on Chrome is that a) its JavaScript engine (V8) is fast as hell and b) the newest versions (7,8,9) all have some GPU acceleration when it comes to canvas rendering. That coupled with the fact that mobile hardware just isn't as powerful as your desktop/laptop means that it'll be really difficult to get anywhere near the same performance on mobile safari.&#xD;&#xA;&#xD;&#xA;I think, for the time being, the best approach might be to target your game at mobile safari from the get go and try and build a game that's not as redraw intensive.&#xD;&#xA;" />
  <row Id="10598" PostHistoryTypeId="2" PostId="5325" RevisionGUID="cd725be9-289c-42cf-8ef6-984437006f8d" CreationDate="2010-11-08T08:43:33.483" UserId="3068" Text="I think the best solution for you would to be to make a 3D evironment and have a fixed camera, somewhat similar to Starcraft 2. Where they have actual 3D models and terrain, water, etc. Just that you use a fixed camera angle. There are many [pre made 3D engines][1] available to buy, and you can customise the camera to stay fixed. &#xD;&#xA;&#xD;&#xA;Trying to implement 3D visuals into a 2D game will probably just be far too much work when there's a simple solution already available :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.no/search?sourceid=chrome&amp;ie=UTF-8&amp;q=3D+engine" />
  <row Id="10599" PostHistoryTypeId="2" PostId="5326" RevisionGUID="85b966c0-f9b5-46b6-b4fd-afa46dc513d9" CreationDate="2010-11-08T09:03:05.953" UserId="1581" Text="&gt; * Would a noSQL datastorage (document-based, such as MongoDB)&#xD;&#xA;&gt; would be suitable for a web-based&#xD;&#xA;&gt; game?&#xD;&#xA;&#xD;&#xA;I'd advise to give a look at [couchdb][1]&#xD;&#xA;&#xD;&#xA;Its interface is javascript-based, so it will blend pretty well with HTML5/javascript based games.&#xD;&#xA;&#xD;&#xA;It is also able to work 'off-line' (making a local copy of the db) and then synchronize itself with the server later on (you might use this for instanced dungeons, for example)&#xD;&#xA;&#xD;&#xA;&gt; * What are the issues that might arise using a conventional RDBMS, such as&#xD;&#xA;&gt; MySQL?&#xD;&#xA;&#xD;&#xA;The main issue would be that no-sql databases handle pretty differently from relational databases. Making the mental switch can be difficult.&#xD;&#xA;&#xD;&#xA;For example, take a look at how &quot;[queries][2]&quot; are done in couchdb. Everything is done in javascript.&#xD;&#xA;&#xD;&#xA;&gt; * How to insurance data consistency amongst users with MongoDB, during&#xD;&#xA;&gt; gameplay or at timed events, such as&#xD;&#xA;&gt; cron jobs?&#xD;&#xA;&#xD;&#xA;The process of 'synchronizing' databases is called *replication* in couchdb's lingo. You will also see the term *consistency* a lot.&#xD;&#xA;There are several built-in services that deal with replication &amp; consistency. See for example the [incremental replication][3] process.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://couchdb.apache.org/&#xD;&#xA;  [2]: http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views&#xD;&#xA;  [3]: http://guide.couchdb.org/draft/consistency.html#incremental" />
  <row Id="10600" PostHistoryTypeId="2" PostId="5327" RevisionGUID="8b625e85-e445-4aff-83ed-97433a34db9b" CreationDate="2010-11-08T09:09:03.903" UserId="1581" Text="If you use [couchdb][1] you will essentially be saving everything as a JSON structure. Couchdb will take care of replicating your (multiple) user's data more or less painlessly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://couchdb.apache.org/" />
  <row Id="10601" PostHistoryTypeId="2" PostId="5328" RevisionGUID="9d20594a-66bb-4557-a385-63046dec9921" CreationDate="2010-11-08T10:08:37.653" UserId="3015" Text="**TL;DR:** Does the short development time required for HTTP/XML offset its size issues compared to sockets?&#xD;&#xA;&#xD;&#xA;As some of you might have divined; I'm currently working on a turn-based strategy game of the massively multiplayeriffic variety. The target turn-length is anywhere from 6 hours and up, so synchronization will be, on the whole, a bit easier than, say, an FPS or an MMORPG.&#xD;&#xA;&#xD;&#xA;The issue then, is how the clients connect to the server. As I see it, I have basically two options: HTTP using some manner of XML exchange, or socket communication using some arcane protocol.&#xD;&#xA;&#xD;&#xA;Because casual gaming is the &quot;big thing&quot; nowadays; the idea is that the game will be the sort of game where you can pick it up, play for 5 or 10 minutes, and then put it down and come back the day after; an approach that would greatly benefit from having the communication be stateless (as in HTTP).&#xD;&#xA;&#xD;&#xA;On the other hand, target devices include the iPad and (perhaps) other mobile devices down the road; any protocol used would probably benefit greatly from being compact, if not so much for the speed (see above), but more in order to not cost the user everything he has if he plays on the road using cellular data networks.&#xD;&#xA;&#xD;&#xA;On the gripping hand; using HTTP as the basic communication protocol greatly facilitates the creation of a web-based client.&#xD;&#xA;&#xD;&#xA;All of this leaves me, as far as I can see, anyway, with 3 options:&#xD;&#xA;&#xD;&#xA;  1. XML over HTTP: A bit of bloat, but easy to implement in all cases.&#xD;&#xA;  2. Sockets: Allows for a very streamlined protocol, but trickier to implement.&#xD;&#xA;  3. All of the above: Small protocol for application clients; big protocol for web clients, increases implementation complexity geometrically.&#xD;&#xA;&#xD;&#xA;Does the short development time required for HTTP/XML offset its size issues compared to sockets?" />
  <row Id="10602" PostHistoryTypeId="1" PostId="5328" RevisionGUID="9d20594a-66bb-4557-a385-63046dec9921" CreationDate="2010-11-08T10:08:37.653" UserId="3015" Text="Server-client communication: HTTP or Sockets?" />
  <row Id="10603" PostHistoryTypeId="3" PostId="5328" RevisionGUID="9d20594a-66bb-4557-a385-63046dec9921" CreationDate="2010-11-08T10:08:37.653" UserId="3015" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;network&gt;" />
  <row Id="10604" PostHistoryTypeId="5" PostId="5328" RevisionGUID="d72888c1-8d88-4373-ab39-989145d93338" CreationDate="2010-11-08T10:26:34.743" UserId="3015" Comment="added 87 characters in body; edited title" Text="**TL;DR:** Does the short development time required for HTTP/XML offset its size issues compared to developing a custom protocol?&#xD;&#xA;&#xD;&#xA;As some of you might have divined; I'm currently working on a turn-based strategy game of the massively multiplayeriffic variety. The target turn-length is anywhere from 6 hours and up, so synchronization will be, on the whole, a bit easier than, say, an FPS or an MMORPG.&#xD;&#xA;&#xD;&#xA;The issue then, is how the clients connect to the server. As I see it, I have basically two options: HTTP using some manner of XML exchange, or direct socket communication using some arcane protocol.&#xD;&#xA;&#xD;&#xA;Because casual gaming is the &quot;big thing&quot; nowadays; the idea is that the game will be the sort of game where you can pick it up, play for 5 or 10 minutes, and then put it down and come back the day after; an approach that would greatly benefit from having the communication be stateless (as in HTTP).&#xD;&#xA;&#xD;&#xA;On the other hand, target devices include the iPad and (perhaps) other mobile devices down the road; any protocol used would probably benefit greatly from being compact, if not so much for the speed (see above), but more in order to not cost the user everything he has if he plays on the road using cellular data networks.&#xD;&#xA;&#xD;&#xA;On the gripping hand; using HTTP as the basic communication protocol greatly facilitates the creation of a web-based client.&#xD;&#xA;&#xD;&#xA;All of this leaves me, as far as I can see, anyway, with 3 options:&#xD;&#xA;&#xD;&#xA;  1. XML over HTTP: A bit of bloat, but easy to implement in all cases.&#xD;&#xA;  2. Custom protocol: Allows for a very streamlined protocol, but trickier to implement.&#xD;&#xA;  3. All of the above: Small protocol for application clients; big protocol for web clients, increases implementation complexity and maintenance time required geometrically.&#xD;&#xA;&#xD;&#xA;Does the short development time required for HTTP/XML offset its size issues compared to developing a custom protocol?" />
  <row Id="10605" PostHistoryTypeId="4" PostId="5328" RevisionGUID="d72888c1-8d88-4373-ab39-989145d93338" CreationDate="2010-11-08T10:26:34.743" UserId="3015" Comment="added 87 characters in body; edited title" Text="Server-client communication: Quick and verbose or involved and compact?" />
  <row Id="10606" PostHistoryTypeId="2" PostId="5329" RevisionGUID="288dfdd6-6252-4c87-a775-29c7f9118477" CreationDate="2010-11-08T10:30:08.670" UserId="3015" Text="By using the iOS simulator that comes with the (free) iOS development kit you can achieve a lot; but profiling is generally tricky. Run it with the debug console; but do the major testing in Safari. (Not Mobile Safari, but the desktop version.) This should help you root out most actual errors.&#xD;&#xA;&#xD;&#xA;As for performance, there's not a lot more you can do than to simply test it on a number of representative devices and see if it's fast enough. (2nd gen. iPod Touch, iPhone 3G, iPhone 3GS etc, with both iOS 3 and iOS 4 (latest versions) should be a good starting point.)" />
  <row Id="10607" PostHistoryTypeId="2" PostId="5330" RevisionGUID="2196229a-285a-46a7-8303-e95d69b018cb" CreationDate="2010-11-08T10:31:44.470" UserId="3146" Text="The venerable Quake (ID tech) engine design has withstood the test of time and is probably the most successful game engine design of all time. Everything besides the renderer has been largely unchanged since the late mid 90s and is still used in modern games like ETQW. &#xD;&#xA;&#xD;&#xA;Full source code for four iterations of this engine (Quake 1 through 3, plus Wolf ET) is available under the GPL. There are probably over a hundred actively-developed community-supported Quake-based game engines which are keeping them relevant in the modern age. Especially worth a look is XreaL for its fantastic renderer and ioQuake3 for its faithful maintenance of Quake 3 optimized for modern hardware. Also, for more-recent &quot;official&quot; ID versions of the engine, the game logic (not the whole engine) is available as well.&#xD;&#xA;&#xD;&#xA;Even if you don't end up using this game engine, it's worthy of study." />
  <row Id="10608" PostHistoryTypeId="5" PostId="5330" RevisionGUID="b9fc4209-ec4d-4383-912d-cdf08c53fe86" CreationDate="2010-11-08T10:42:01.967" UserId="3146" Comment="better describe why it is worthy of study." Text="The venerable Quake (ID tech) engine design has withstood the test of time and is probably the most successful game engine design of all time. Everything besides the renderer has been largely unchanged since the late mid 90s and is still used in modern games like ETQW. &#xD;&#xA;&#xD;&#xA;Full source code for four iterations of this engine (Quake 1 through 3, plus Wolf ET) is available under the GPL. There are probably over a hundred actively-developed community-supported Quake-based game engines which are keeping them relevant in the modern age. Especially worth a look is XreaL for its fantastic renderer and ioQuake3 for its faithful maintenance of Quake 3 optimized for modern hardware. Also, for more-recent &quot;official&quot; ID versions of the engine, the game logic (not the whole engine) is available as well.&#xD;&#xA;&#xD;&#xA;Even if you don't end up using this game engine, it's worthy of study for its well-thought-out client-server separation architecture and segregation of game logic from low-level details." />
  <row Id="10609" PostHistoryTypeId="2" PostId="5331" RevisionGUID="c532ca39-33a5-4827-9832-3824ac03acb3" CreationDate="2010-11-08T10:48:55.360" UserId="2091" Text="[Panda3D][1].&#xD;&#xA;&#xD;&#xA; - Cross platform ( All desktop OSes )&#xD;&#xA; - Python API ( although the core is written in C++ )&#xD;&#xA; - OpenGL support&#xD;&#xA; - At least I'm sure you can import models from Blender (there's a Blender plugin for that)&#xD;&#xA; - shaders, HUD, input, and whatnot&#xD;&#xA; - and it's open source (meaning that you can expand it)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.panda3d.org/" />
  <row Id="10610" PostHistoryTypeId="2" PostId="5332" RevisionGUID="ab2244df-d872-4993-b50f-3215aed30116" CreationDate="2010-11-08T11:23:39.430" UserId="3147" Text="Yes, there is a built in class you can use.  &#xD;&#xA;&#xD;&#xA;http://developer.android.com/reference/android/os/Build.html&#xD;&#xA;&#xD;&#xA;Also you might like to checkout PhoneGap.java for some other useful tidbits.&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/phonegap/source/browse/trunk/android/src/com/nitobi/phonegap/PhoneGap.java" />
  <row Id="10611" PostHistoryTypeId="2" PostId="5333" RevisionGUID="7a188c59-b3a9-41d9-a03f-579e62030a80" CreationDate="2010-11-08T11:41:38.437" UserId="2710" Text="Do some back-of-the-envelope estimates: how often does the game state change? How often is this change communicated to the clients? How much data is communicated each time? For a turn-based strategy, I guess, you'll have only a handful of updates, but each relatively big in terms of data.&#xD;&#xA;&#xD;&#xA;If I'm right, then you're not going to save much traffic with a custom binary protocol: you'll shave off a little from each packet, but since there's not many of them, savings won't add up.&#xD;&#xA;&#xD;&#xA;In any case, you should try to completely separate your game logic and communication layers. That way, you'll be able to swap custom binary protocol with HTTP and vice-versa without much trouble." />
  <row Id="10612" PostHistoryTypeId="2" PostId="5334" RevisionGUID="b786d3fd-ebdf-46cd-9ca7-a3fd303b24aa" CreationDate="2010-11-08T11:56:48.407" UserId="3089" Text="okay guys, I'm working on a web-browser based 3D first person shooter game using webGL, HTML5 and JavaScript. It is supposed to target PCs and net-books with webgl-enabled-web-browser installed &#xD;&#xA;I'm wondering if there is an open source 3D physics engine exists written in JavaScript " />
  <row Id="10613" PostHistoryTypeId="1" PostId="5334" RevisionGUID="b786d3fd-ebdf-46cd-9ca7-a3fd303b24aa" CreationDate="2010-11-08T11:56:48.407" UserId="3089" Text="do any Open Source javascript 3D physics engines exist?" />
  <row Id="10614" PostHistoryTypeId="3" PostId="5334" RevisionGUID="b786d3fd-ebdf-46cd-9ca7-a3fd303b24aa" CreationDate="2010-11-08T11:56:48.407" UserId="3089" Text="&lt;engine&gt;&lt;web&gt;&lt;3d-engines&gt;&lt;javascript&gt;&lt;physics-engine&gt;" />
  <row Id="10615" PostHistoryTypeId="2" PostId="5335" RevisionGUID="9245b231-deec-4e34-97ab-797e8c40460d" CreationDate="2010-11-08T11:59:21.413" UserId="3132" Text="Couple of words do defend SQL databases.&#xD;&#xA;&#xD;&#xA;1 - If you have SQL database you can work with your data not only by primary key.  Most of queries in  MMO goes by PK but when you need to find all users with level &gt; 30 what will you do in NoSQL world? &#xD;&#xA;&#xD;&#xA;2 - If you have SQL language you may create &quot;hotfixes&quot; to repair broken data. For example: &quot;update player_items set flag=0 where item_type_id = 100&quot;. How can you fix this in NoSQL? I think you will have to make a script which will parse all your data...&#xD;&#xA;&#xD;&#xA;3 - SQL databases are not so slow as you can think. My collegues create the web based MMO game, wich make 5000 transaction per second in MySQL. Is it not  enough for you? If not, you may use sharding to scale your database.&#xD;&#xA;&#xD;&#xA;4 - SQL has a foreign key constraints and such good stuff, which will help you to find bugs in your code. &#xD;&#xA;&#xD;&#xA;NoSQL is not a silver bullet. It solves only couple of problems and brings many new problems. **So my advice - think twice before choose NoSQL.**" />
  <row Id="10616" PostHistoryTypeId="2" PostId="5336" RevisionGUID="40fe6a64-8874-4757-bdbf-80ca8245ec13" CreationDate="2010-11-08T12:09:39.530" UserId="20" Text="I don't know about any 3D physics-engine implemented in JavaScript. But maybe you could have a look at the Quake2 &gt; HTML5 port and look how they did it: http://code.google.com/p/quake2-gwt-port/&#xD;&#xA;&#xD;&#xA;From what I understood, they used the [Google Web Toolkit (GWT)][1] to compile Java-Sources to JavaScript. I think this approach may have some benefits for your project as well, since it's much more likely that you'll find a good 3D physics-engine for Java than for JavaScript.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/webtoolkit/" />
  <row Id="10617" PostHistoryTypeId="2" PostId="5337" RevisionGUID="bf17818c-d50f-4d2e-8d52-44ba1c800464" CreationDate="2010-11-08T12:10:32.600" UserId="83" Text="Though I am an artist myself I don't believe you need great art skills to get your point across. I suggest you focus on what you are great at. The book [Level Up!: The Guide to Great Video Game Design][1] (not an affiliate link) has some examples of simple drawings to get ideas across. The author is a game designer and learned you can get a lot more information across quickly using simple drawings. &#xD;&#xA;&#xD;&#xA;My suggestion is to not focus on detailed drawings but focus on how to portray action, movement and basic shape.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Level-Up-Guide-Great-Design/dp/047068867X/ref=sr_1_1?ie=UTF8&amp;qid=1289217970&amp;sr=8-1" />
  <row Id="10618" PostHistoryTypeId="2" PostId="5338" RevisionGUID="75191c55-bc80-4eb3-99b0-cd812c1845c0" CreationDate="2010-11-08T12:15:13.150" UserId="3149" Text="No one use OpenGL picking this days, you have to implement it yourself. Transforming from camera to worlds space is a bit tricky, here is a good article http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/MousePicking" />
  <row Id="10622" PostHistoryTypeId="2" PostId="5340" RevisionGUID="dfc16ec3-556b-448c-bc23-8ec9b8fe1499" CreationDate="2010-11-08T14:20:29.257" UserId="3089" Text="Use Google closure compiler http://code.google.com/closure/compiler/&#xD;&#xA;It is not just a js minimizer ;)&#xD;&#xA;&#xD;&#xA;What are the benefits of using Closure Compiler?&#xD;&#xA;&#xD;&#xA; 1. Efficiency. The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs.&#xD;&#xA;&#xD;&#xA; 2. Code checking. The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and and easier to maintain.1." />
  <row Id="10623" PostHistoryTypeId="5" PostId="5246" RevisionGUID="6e92b871-d160-4070-8737-dea85213f135" CreationDate="2010-11-08T14:57:11.060" UserId="2316" Comment="added 224 characters in body" Text="Depending on the language, you could do this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    switch (Event.keyCode)&#xD;&#xA;    {&#xD;&#xA;      case (int)'0':&#xD;&#xA;        myButton0.click();&#xD;&#xA;        res[1].appendText(&quot;0&quot;);&#xD;&#xA;      break;&#xD;&#xA;      ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It's hard to answer specifics if you don't provide a language.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Edit]&#xD;&#xA;&#xD;&#xA;I don't know anything about `actions script3` sorry.  Some languages allow you to set the depressed button status.&#xD;&#xA;&#xD;&#xA;    myButton.setDepressed = true;&#xD;&#xA;    wait(100);&#xD;&#xA;    myButton.setDepressed = false;&#xD;&#xA;" />
  <row Id="10624" PostHistoryTypeId="2" PostId="5341" RevisionGUID="a480f0e8-a57b-490a-a091-54095f325ada" CreationDate="2010-11-08T16:15:18.927" UserDisplayName="Paul Brunt" Text="There are a couple both jiglib and bullet have been ported but it's still very early days. See http://www.jiglibjs.org and pl4n3.blogspot.com/2010/11/webglbulletjs-demo.html" />
  <row Id="10625" PostHistoryTypeId="2" PostId="5342" RevisionGUID="8023a30a-f7dd-474a-bdf2-81bc9a43d520" CreationDate="2010-11-08T16:47:40.640" UserId="51" Text="The Ogre3D rendering library is pretty close to engine code and from all accounts I've heard is very well designed and very OO.&#xD;&#xA;&#xD;&#xA;http://www.ogre3d.org/" />
  <row Id="10626" PostHistoryTypeId="2" PostId="5343" RevisionGUID="6cd5fcf8-6cdd-4c9f-b7ba-4cca97002ffa" CreationDate="2010-11-08T17:37:21.060" UserId="395" Text="Aside from all this talk of code obfuscation, be sure to put a very clear copyright declaration at the top of each file and make it obvious that the license doesn't allow for alteration or commercial usage. This gives you legal recourse if someone does try to copy it. If you aren't willing to go to court over it, then this whole question is mostly academic." />
  <row Id="10627" PostHistoryTypeId="5" PostId="5322" RevisionGUID="6dad4f3a-ac5e-4ede-b071-ce92eb4c57ce" CreationDate="2010-11-08T18:04:53.687" UserId="2290" Comment="added 689 characters in body; added 201 characters in body" Text="Would a noSQL database be suitable for a web-based game?&#xD;&#xA;----------------------------------------&#xD;&#xA;Absolutely! Generally speaking, non-relational databases (such as MongoDB) are much better for games, as they are more flexible in how they model data, while being more performant than relational databases (such as SQL) - making them a &quot;win-win&quot; choice.&#xD;&#xA;&#xD;&#xA;What are the issues that might arise using a conventional RDBMS?&#xD;&#xA;----------------------------------------&#xD;&#xA;There are two major drawbacks to using relational databases:&#xD;&#xA;&#xD;&#xA; - Lack of flexibility in the way you model data &#xD;&#xA; - Performance&#xD;&#xA;&#xD;&#xA;Lack of flexibility in the way you model data is a major drawback, because using a relational database forces you to model data to fit the needs of the database, rather than the database accommodating the needs of the model. For example, consider you're creating the model for how you'll store items in a game using a relational database and you decide on the following model:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;    &#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    2 | Mana&#xD;&#xA;    &#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | 1| 5&#xD;&#xA;    2 | Mana Drainer | 2| -5&#xD;&#xA;&#xD;&#xA;Now consider how you'd need to modify the model to meet do the following:&#xD;&#xA;&#xD;&#xA; - Add a new item type&#xD;&#xA; - Create a weapon with multiple weapon types&#xD;&#xA; - Create a potion item that can also be used as a weapon&#xD;&#xA;&#xD;&#xA;Certainly all these actions are doable, but you won't be the happiest person while you're doing them, and you'll probably wonder, &quot;is there a better solution out there for what I want to do?,&quot; when you could design a much more flexible model in a non-relational database.&#xD;&#xA;&#xD;&#xA;**Note:** If you are unfamiliar with how document-based databases store information, please check out [this link][1] before continuing.&#xD;&#xA;&#xD;&#xA;    db.itemTypes&#xD;&#xA;    name: Weapon&#xD;&#xA;    types: Sharp&#xD;&#xA;    &#xD;&#xA;    name: Potion&#xD;&#xA;    types: HP, Mana&#xD;&#xA;    &#xD;&#xA;    db.items&#xD;&#xA;    name: Short Sword&#xD;&#xA;    weapon&#xD;&#xA;        type: Sharp (db.itemTypes reference)&#xD;&#xA;        damage: 5&#xD;&#xA;    &#xD;&#xA;    name: Healing Elixer&#xD;&#xA;    potion&#xD;&#xA;        type:  HP (db.itemTypes reference)&#xD;&#xA;        modifier: 5&#xD;&#xA;    &#xD;&#xA;    name: Mana Drainer&#xD;&#xA;    potion&#xD;&#xA;        type:  Mana (db.itemTypes reference)&#xD;&#xA;        modifier: -5  &#xD;&#xA;    &#xD;&#xA;    name:  Healing Potion Sword&#xD;&#xA;    potion&#xD;&#xA;        type: HP (db.itemTypes reference)&#xD;&#xA;        modifier: 10&#xD;&#xA;    weapon&#xD;&#xA;        type: Sharp (db.itemTypes reference)&#xD;&#xA;        damage: 15&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are a lot of good articles on the performance of NoSQL vs SQL databases, but here is one which provides application examples so you can perform your own tests: [MongoDB vs. SQL Server 2008 Performance Showdown][2]&#xD;&#xA;&#xD;&#xA;How do I insure data consistency amongst users with MongoDB?&#xD;&#xA;----------------------------------------&#xD;&#xA;MongoDB supports read/write atomic operations on single data entities (documents), so &#xD;&#xA;query results from MongoDB should always be accurate with what is stored within the database.&#xD;&#xA;&#xD;&#xA;**Edit:** Provided NoSQL example of item database&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mongodb.org/display/DOCS/Schema+Design&#xD;&#xA;  [2]: http://www.michaelckennedy.net/blog/2010/04/29/MongoDBVsSQLServer2008PerformanceShowdown.aspx" />
  <row Id="10628" PostHistoryTypeId="2" PostId="5344" RevisionGUID="741f6c07-3df8-4b62-9b2c-8e217a8ebebf" CreationDate="2010-11-08T18:13:38.623" UserId="1748" Text="I need to find someone talented to create a series of 2D graphics a la cart for my mobile games.  My graphics are just not impressive enough, but the game play is solid and fun.&#xD;&#xA;&#xD;&#xA;This is sort of a multi-part question:&#xD;&#xA;&#xD;&#xA;Where do I start to find someone?   &#xD;&#xA;&#xD;&#xA;What should I expect to pay for custom sprites and backgrounds?&#xD;&#xA;&#xD;&#xA;What kinds of terms should I use so I receive exclusive, royalty-free, ownership of the artwork when it's finished?" />
  <row Id="10629" PostHistoryTypeId="1" PostId="5344" RevisionGUID="741f6c07-3df8-4b62-9b2c-8e217a8ebebf" CreationDate="2010-11-08T18:13:38.623" UserId="1748" Text="Where to hire graphic designers for mobile games?" />
  <row Id="10630" PostHistoryTypeId="3" PostId="5344" RevisionGUID="741f6c07-3df8-4b62-9b2c-8e217a8ebebf" CreationDate="2010-11-08T18:13:38.623" UserId="1748" Text="&lt;graphics&gt;&lt;design&gt;" />
  <row Id="10631" PostHistoryTypeId="2" PostId="5345" RevisionGUID="5f55cf24-95c3-4fe9-a638-2fcca6cdebda" CreationDate="2010-11-08T18:50:39.223" UserId="14" Text="There are a number of websites around that have places for posting career and freelance opportunities. The most awesome places I know of for Pixel Art are [Way of the Pixel][1] and the Spriter's Resource. For any other art, I'd check out Conceptart.org or DeviantArt to find other artists.&#xD;&#xA;&#xD;&#xA;This amount will vary based on what you negotiate with your artist and what you are looking for, I couldn't reasonably give you any sort of potential figure without knowing what you are going for. And even then, its highly subject to all kinds of other things.&#xD;&#xA;&#xD;&#xA;You need to negotiate a transfer of rights between the artist and yourself. In general, getting a professional artist to sign over rights raises the cost but its necessary to get said rights to reproduce the work. (You could face some serious consequences if you do not)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wayofthepixel.net/" />
  <row Id="10632" PostHistoryTypeId="2" PostId="5346" RevisionGUID="93b5a357-0560-4369-b3b6-5f57a733c070" CreationDate="2010-11-08T18:52:55.343" UserId="136" Text="You can use reflection to snag the Direct3D render target handle and hook it up with D3DImage.  I've done this successfully with WPF and XNA 3.1, but I had some issues with XNA 4.0 because they changed the surface format mappings.  But supposedly other people have gotten it working with XNA 4.0." />
  <row Id="10633" PostHistoryTypeId="5" PostId="5322" RevisionGUID="3c102d61-0e6a-49f7-8cdf-180a36617034" CreationDate="2010-11-08T18:55:51.673" UserId="2290" Comment="added 112 characters in body" Text="Would a noSQL database be suitable for a web-based game?&#xD;&#xA;----------------------------------------&#xD;&#xA;Absolutely! Generally speaking, non-relational databases (such as MongoDB) are much better for games, as they are more flexible in how they model data, while being more performant than relational databases (such as SQL) - making them a &quot;win-win&quot; choice.&#xD;&#xA;&#xD;&#xA;What are the issues that might arise using a conventional RDBMS?&#xD;&#xA;----------------------------------------&#xD;&#xA;There are two major drawbacks to using relational databases:&#xD;&#xA;&#xD;&#xA; - Lack of flexibility in the way you model data &#xD;&#xA; - Performance&#xD;&#xA;&#xD;&#xA;Lack of flexibility in the way you model data is a major drawback, because using a relational database forces you to model data to fit the needs of the database, rather than the database accommodating the needs of the model. For example, consider you're creating the model for how you'll store items in a game using a relational database and you decide on the following model:&#xD;&#xA;&#xD;&#xA;    weapon_type_id | weapon_type&#xD;&#xA;    1 | sharp&#xD;&#xA;    &#xD;&#xA;    weapon_id | weapon| weapon_type_id | damage&#xD;&#xA;    1 | Short Sword | 1 | 5&#xD;&#xA;    &#xD;&#xA;    potion_type_id | potion_type&#xD;&#xA;    1 | HP&#xD;&#xA;    2 | Mana&#xD;&#xA;    &#xD;&#xA;    potion_id | potion| potion_type_id | modifier&#xD;&#xA;    1 | Healing Elixer | 1| 5&#xD;&#xA;    2 | Mana Drainer | 2| -5&#xD;&#xA;&#xD;&#xA;Now consider how you'd need to modify the model to meet do the following:&#xD;&#xA;&#xD;&#xA; - Add a new item type&#xD;&#xA; - Create a weapon with multiple weapon types&#xD;&#xA; - Create a potion item that can also be used as a weapon&#xD;&#xA;&#xD;&#xA;Certainly all these actions are doable, but you won't be the happiest person while you're doing them, and you'll probably wonder, &quot;is there a better solution out there for what I want to do?,&quot; when you could design a much more flexible model in a non-relational database.&#xD;&#xA;&#xD;&#xA;**Note:** If you are unfamiliar with how document-based databases store information, please check out [this link][1] before continuing. The model presented below designed to use similar logic to what is presented in the aforementioned article.&#xD;&#xA;&#xD;&#xA;    db.itemTypes&#xD;&#xA;&#xD;&#xA;    name: Weapon&#xD;&#xA;    types: Sharp&#xD;&#xA;    &#xD;&#xA;    name: Potion&#xD;&#xA;    types: HP, Mana&#xD;&#xA;    &#xD;&#xA;    db.items&#xD;&#xA;&#xD;&#xA;    name: Short Sword&#xD;&#xA;    weapon&#xD;&#xA;        type: Sharp (db.itemTypes reference)&#xD;&#xA;        damage: 5&#xD;&#xA;    &#xD;&#xA;    name: Healing Elixer&#xD;&#xA;    potion&#xD;&#xA;        type:  HP (db.itemTypes reference)&#xD;&#xA;        modifier: 5&#xD;&#xA;    &#xD;&#xA;    name: Mana Drainer&#xD;&#xA;    potion&#xD;&#xA;        type:  Mana (db.itemTypes reference)&#xD;&#xA;        modifier: -5  &#xD;&#xA;    &#xD;&#xA;    name:  Healing Potion Sword&#xD;&#xA;    potion&#xD;&#xA;        type: HP (db.itemTypes reference)&#xD;&#xA;        modifier: 10&#xD;&#xA;    weapon&#xD;&#xA;        type: Sharp (db.itemTypes reference)&#xD;&#xA;        damage: 15&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are a lot of good articles on the performance of NoSQL vs SQL databases, but here is one which provides application examples so you can perform your own tests: [MongoDB vs. SQL Server 2008 Performance Showdown][2]&#xD;&#xA;&#xD;&#xA;How do I insure data consistency amongst users with MongoDB?&#xD;&#xA;----------------------------------------&#xD;&#xA;MongoDB supports read/write atomic operations on single data entities (documents), so &#xD;&#xA;query results from MongoDB should always be accurate with what is stored within the database.&#xD;&#xA;&#xD;&#xA;**Edit:** Provided NoSQL example of item database&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mongodb.org/display/DOCS/Schema+Design&#xD;&#xA;  [2]: http://www.michaelckennedy.net/blog/2010/04/29/MongoDBVsSQLServer2008PerformanceShowdown.aspx" />
  <row Id="10634" PostHistoryTypeId="2" PostId="5347" RevisionGUID="82ef3220-1136-436e-b41f-711bbf411f03" CreationDate="2010-11-08T19:09:48.013" UserDisplayName="Tyrathect" Text="It's pretty easy to pack fonts because all (or the great majority) of the glyph textures are nearly the same size. Do the simplest thing that occurs to you and it will be very close to optimal.&#xD;&#xA;&#xD;&#xA;Cleverness becomes more important when you're packing images of very different sizes.  Then you want to be able to pack into gaps, etc.  Even then, though, a simple algorithm like the scanline order search discussed earlier will produce very reasonable results.&#xD;&#xA;&#xD;&#xA;None of the advanced algos are magic.  They won't be 50% more effecient than a simpel algo, and you won't get consistent benefits from them unless you have a staggering number of texture sheets.  that's because the small improvements that better algorithms make will only be seen in aggregate.&#xD;&#xA;&#xD;&#xA;Go simple, and move on to something where your efforts will be better rewarded" />
  <row Id="10635" PostHistoryTypeId="2" PostId="5348" RevisionGUID="c36c193b-a761-48e0-8c06-a693fb145a03" CreationDate="2010-11-08T19:20:37.947" UserId="154" Text="As a programmer/designer there are three types of imagery you will likely be producing.&#xD;&#xA;&#xD;&#xA;**Technical Specification Images**&#xD;&#xA;&#xD;&#xA;These are simple crude drawings showing artists/LDs how to place information nodes in the world, how sections of geometry need to be cut up for streaming, how models need to be split for customization and so on. &#xD;&#xA;&#xD;&#xA;Pen and Paper are fine for low tech, Photoshop + Wacom is the nicer but expensive solution. You just need to communicate enough information that the artist knows what they are supposed to do. If this is some requirement multiple artists need to deal with, have one of them redraw the image after you explain it to them. Helps them commit the concept to memory and you end up with a nice drawing.&#xD;&#xA;&#xD;&#xA;**System Visualization/Flowcharts**&#xD;&#xA;&#xD;&#xA;This is less for artists and more to visually look at gameflow, state machines, or a UI design and make sure you aren't missing anything. [Visio][1] is a good tool here which you may already have depending on your version of Office, although GraphViz &amp; Dia are freeware alternatives.&#xD;&#xA;&#xD;&#xA;**Reference Art**&#xD;&#xA;&#xD;&#xA;For designers providing reference art if you can't draw well then don't waste the time. Google Image Search is your friend. Just grab images that match the components of what you need. It's helpful to draw over these images with any painting program to make sure it's clear what part of the image is important. If you just like the fabric of a couch and not the shape write that on the image so that three weeks later when the artist is looking at it for reference there isn't any confusion.&#xD;&#xA;&#xD;&#xA;Photoshop obviously works here, but [Paint.Net][2] is a nice freeware alternative.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://office.microsoft.com/en-us/visio/&#xD;&#xA;  [2]: http://www.getpaint.net/" />
  <row Id="10636" PostHistoryTypeId="6" PostId="5310" RevisionGUID="20a42f6a-7c82-42cc-a176-4fc736372750" CreationDate="2010-11-08T19:23:06.427" UserId="2862" Comment="edited tags" Text="&lt;game-design&gt;&lt;art&gt;&lt;drawing&gt;&lt;sketching&gt;&lt;designing&gt;" />
  <row Id="10637" PostHistoryTypeId="6" PostId="5316" RevisionGUID="f23e3352-5aec-4eeb-82be-feacfc02cb23" CreationDate="2010-11-08T19:23:33.010" UserId="2862" Comment="edited tags" Text="&lt;architecture&gt;&lt;web&gt;&lt;python&gt;&lt;databases&gt;&lt;sql&gt;" />
  <row Id="10639" PostHistoryTypeId="2" PostId="5350" RevisionGUID="a8b6b102-976f-404c-9d6e-d960b153cc0b" CreationDate="2010-11-08T19:30:50.623" UserId="2862" Text="PS3 games are typically developed with a devkit that costs about $10,000 in C++ using propriatory Playstation APIs, where you optimize your game for its multicore processor. An experienced gamedev once commented that the PS3 is far harder to write for since its multicore pipeline is unusual and requires special efforts to optimize game code.&#xD;&#xA;&#xD;&#xA;Another method would be [installing a Linux OS on your PS3][1] and then developing your program for that breed of Unix, either in C++ or any other supported platform. This is quite cheap since you can manage this on any ordinary PS3. (no expensive dev kit needed)&#xD;&#xA;&#xD;&#xA;Developing for the Xbox 360 on the other hand is free for students, I recommend you start with XNA for Xbox 360 since there are many [open source games and game engines][2] to help you out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/467711/develop-for-playstation-3-linux&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/5135/3d-game-engines-for-xna-games" />
  <row Id="10640" PostHistoryTypeId="5" PostId="5253" RevisionGUID="888ee06f-6ccd-4a14-9728-59fd1669a5a8" CreationDate="2010-11-08T19:45:00.770" UserId="2995" Comment="updates; added 87 characters in body" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;-  **[Ox Game Engine][1]** - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows&#xD;&#xA;-  [Axiom3d][2] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [Flat Red Ball][3] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;-  [QuickStart][4] 3D Game Engine - now at [v0.2][5]&#xD;&#xA;-  [X-Engine][6]: 3D Graphics and Physics Engine for XNA &#xD;&#xA;-  [BetaCell][7] &#xD;&#xA;-  [Thrust][8] - part engine part framework &#xD;&#xA;- The [Ship Game][9] and the [Robot Game][10] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [EGGEngine][11]&#xD;&#xA;- [Tomahawk][12] - Pretty well supported engine.&#xD;&#xA;- [FireFly][13]&#xD;&#xA;- [TXna Game Engine][14] - Includes scene editor&#xD;&#xA;- [Attolo 3D XNA Engine][15] - Includes particle effects, model loading, terrain, etc.&#xD;&#xA;- [Reactor 3D][16] - development stopped&#xD;&#xA;&#xD;&#xA;**Commercial**&#xD;&#xA;&#xD;&#xA;- [Kitae][17] - 2D game engine with tile/level editor, collision detection, sprites, fonts, etc.&#xD;&#xA;- [TorqueX][18] - [(not recommended)][19]&#xD;&#xA;  - 2D - TorqueX Game Builder to edit levels from a drag and drop UI. &#xD;&#xA;  - 3D - TorqueX World Builder to build 3D game levels with objects and lighting&#xD;&#xA;- [Visual3d.net][20] - (Windows only)&#xD;&#xA;- [SunBurn][21] (Rendering engine). There is a discount for Premium members.&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][22]&#xD;&#xA;- [Dynamic Particle System Framework][23]&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products. You should look at each one and determine pricing and licensing.&#xD;&#xA;&#xD;&#xA;- [Farseer][24] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][25] - Source available, port of C++ [JigLib][26], formerly JiggleX &#xD;&#xA;- [Bullet][27]  &#xD;&#xA;   - [BulletX][28]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][29]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][30] &#xD;&#xA;- [Oops! 3D Physics Framework][31] &#xD;&#xA;- [Bepu physics][32] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][33] - soft body physics. Used in [JelloCar][34] and other fun [Walaber][35] games. &#xD;&#xA;- [Physics2D.Net][36] - see demo video &#xD;&#xA;&#xD;&#xA;If you are only targetting windows then you can use any of the commercial, or open source engines. Some have managed wrappers or you may need to roll your own&#xD;&#xA;&#xD;&#xA;- [PhysX][37] &#xD;&#xA;    - [PhysX.NET][38]&#xD;&#xA;    - [Wrapper][39] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][40] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][41] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly.&#xD;&#xA;- [Newton Game Dynamics][43]&#xD;&#xA;- [XnaHavok][42] - C# port of Havok&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [2]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [3]: http://www.flatredball.com/frb/&#xD;&#xA;  [4]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [5]: http://forums.xna.com/forums/t/38853.aspx&#xD;&#xA;  [6]: http://www.codeplex.com/xengine&#xD;&#xA;  [7]: http://www.betacell3d.com/&#xD;&#xA;  [8]: http://focusedgames.com/fg-framework/&#xD;&#xA;  [9]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [10]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [11]: http://www.portalgames.org/&#xD;&#xA;  [12]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [13]: http://www.codeplex.com/FireflyEngine&#xD;&#xA;  [14]: http://sourceforge.net/projects/txnagameengine/&#xD;&#xA;  [15]: http://attollo3d.codeplex.com/&#xD;&#xA;  [16]: http://www.reactor3d.com/forums/index.php?www&#xD;&#xA;  [17]: http://www.nullcity.com/Default.aspx?section=Kitae&#xD;&#xA;  [18]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [19]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products/2950#2950&#xD;&#xA;  [20]: http://www.visual3d.net/&#xD;&#xA;  [21]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [22]: http://www.codeplex.com/mpe&#xD;&#xA;  [23]: http://dpsf.danskingdom.com/&#xD;&#xA;  [24]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [25]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [26]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [27]: http://bulletphysics.com/&#xD;&#xA;  [28]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [29]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [30]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [31]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [32]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [33]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [34]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [35]: http://walaber.com/&#xD;&#xA;  [36]: http://physics2d.googlepages.com/&#xD;&#xA;  [37]: http://www.ageia.com/&#xD;&#xA;  [38]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [39]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [40]: http://ode.org/&#xD;&#xA;  [41]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [42]: http://sourceforge.net/projects/xnahavok/&#xD;&#xA;  [43]: http://www.newtondynamics.com/" />
  <row Id="10641" PostHistoryTypeId="5" PostId="5253" RevisionGUID="4b392852-c30b-4e65-b8f0-56bb6bf4ba9a" CreationDate="2010-11-08T19:57:42.927" UserId="2995" Comment="added 153 characters in body" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;- [Phoenix XNA Engine][14] - rebirth of FireFly and includes terrain, sky, GUI components, lighting, particles&#xD;&#xA;-  **[Ox Game Engine][1]** - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows&#xD;&#xA;-  [Axiom3d][2] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [Flat Red Ball][3] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;-  [QuickStart][4] 3D Game Engine - now at [v0.2][5]&#xD;&#xA;-  [X-Engine][6]: 3D Graphics and Physics Engine for XNA &#xD;&#xA;-  [BetaCell][7] &#xD;&#xA;-  [Thrust][8] - part engine part framework &#xD;&#xA;- The [Ship Game][9] and the [Robot Game][10] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [EGGEngine][11]&#xD;&#xA;- [Tomahawk][12] - Pretty well supported engine.&#xD;&#xA;- [FireFly][13]&#xD;&#xA;- [TXna Game Engine][15] - Includes scene editor&#xD;&#xA;- [Attolo 3D XNA Engine][16] - Includes particle effects, model loading, terrain, etc.&#xD;&#xA;- [Reactor 3D][17] - development stopped&#xD;&#xA;&#xD;&#xA;**Commercial**&#xD;&#xA;&#xD;&#xA;- [Kitae][18] - 2D game engine with tile/level editor, collision detection, sprites, fonts, etc.&#xD;&#xA;- [TorqueX][19] - [(not recommended)][20]&#xD;&#xA;  - 2D - TorqueX Game Builder to edit levels from a drag and drop UI. &#xD;&#xA;  - 3D - TorqueX World Builder to build 3D game levels with objects and lighting&#xD;&#xA;- [Visual3d.net][21] - (Windows only)&#xD;&#xA;- [SunBurn][22] (Rendering engine). There is a discount for Premium members.&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][23]&#xD;&#xA;- [Dynamic Particle System Framework][24]&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products. You should look at each one and determine pricing and licensing.&#xD;&#xA;&#xD;&#xA;- [Farseer][25] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][26] - Source available, port of C++ [JigLib][27], formerly JiggleX &#xD;&#xA;- [Bullet][28]  &#xD;&#xA;   - [BulletX][29]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][30]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][31] &#xD;&#xA;- [Oops! 3D Physics Framework][32] &#xD;&#xA;- [Bepu physics][33] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][34] - soft body physics. Used in [JelloCar][35] and other fun [Walaber][36] games. &#xD;&#xA;- [Physics2D.Net][37] - see demo video &#xD;&#xA;&#xD;&#xA;If you are only targetting windows then you can use any of the commercial, or open source engines. Some have managed wrappers or you may need to roll your own&#xD;&#xA;&#xD;&#xA;- [PhysX][38] &#xD;&#xA;    - [PhysX.NET][39]&#xD;&#xA;    - [Wrapper][40] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][41] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][42] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly.&#xD;&#xA;- [Newton Game Dynamics][43]&#xD;&#xA;- [XnaHavok][44] - C# port of Havok&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [2]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [3]: http://www.flatredball.com/frb/&#xD;&#xA;  [4]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [5]: http://forums.xna.com/forums/t/38853.aspx&#xD;&#xA;  [6]: http://www.codeplex.com/xengine&#xD;&#xA;  [7]: http://www.betacell3d.com/&#xD;&#xA;  [8]: http://focusedgames.com/fg-framework/&#xD;&#xA;  [9]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [10]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [11]: http://www.portalgames.org/&#xD;&#xA;  [12]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [13]: http://www.codeplex.com/FireflyEngine&#xD;&#xA;  [14]: http://phoenixxna.codeplex.com/&#xD;&#xA;  [15]: http://sourceforge.net/projects/txnagameengine/&#xD;&#xA;  [16]: http://attollo3d.codeplex.com/&#xD;&#xA;  [17]: http://www.reactor3d.com/forums/index.php?www&#xD;&#xA;  [18]: http://www.nullcity.com/Default.aspx?section=Kitae&#xD;&#xA;  [19]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [20]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products/2950#2950&#xD;&#xA;  [21]: http://www.visual3d.net/&#xD;&#xA;  [22]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [23]: http://www.codeplex.com/mpe&#xD;&#xA;  [24]: http://dpsf.danskingdom.com/&#xD;&#xA;  [25]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [26]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [27]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [28]: http://bulletphysics.com/&#xD;&#xA;  [29]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [30]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [31]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [32]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [33]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [34]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [35]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [36]: http://walaber.com/&#xD;&#xA;  [37]: http://physics2d.googlepages.com/&#xD;&#xA;  [38]: http://www.ageia.com/&#xD;&#xA;  [39]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [40]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [41]: http://ode.org/&#xD;&#xA;  [42]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [43]: http://www.newtondynamics.com/&#xD;&#xA;  [44]: http://sourceforge.net/projects/xnahavok/" />
  <row Id="10642" PostHistoryTypeId="6" PostId="5310" RevisionGUID="b8c281de-63f5-4139-aa1d-dbb64fb80911" CreationDate="2010-11-08T20:08:04.240" UserId="14" Comment="edited tags" Text="&lt;game-design&gt;&lt;art&gt;" />
  <row Id="10643" PostHistoryTypeId="6" PostId="5316" RevisionGUID="7e141f73-14e2-4397-91c6-47f77c8ba912" CreationDate="2010-11-08T20:14:06.130" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;web&gt;&lt;python&gt;&lt;databases&gt;" />
  <row Id="10644" PostHistoryTypeId="5" PostId="5253" RevisionGUID="40aefba5-7f4e-410c-a2f1-717535b12525" CreationDate="2010-11-08T20:18:39.937" UserId="2995" Comment="remove dead engines and add some" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;- [Phoenix XNA Engine][1] - rebirth of FireFly and includes terrain, sky, GUI components, lighting, particles&#xD;&#xA;-  [Ox Game Engine][2] - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows&#xD;&#xA;-  [Axiom3d][3] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [QuickStart][4] 3D Game Engine - now at [v0.2][5]&#xD;&#xA;- [Engine Nine][6] - animation, terrain, sky, post processing screen effects &#xD;&#xA;- The [Ship Game][7] and the [Robot Game][8] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [Tomahawk][9] - Pretty well supported engine.&#xD;&#xA;- [FireFly][10]&#xD;&#xA;- [TXna Game Engine][11] - Includes scene editor&#xD;&#xA;- [Attolo 3D XNA Engine][12] - Includes particle effects, model loading, terrain, etc.&#xD;&#xA;- [Reactor 3D][13] - development stopped&#xD;&#xA;- [Titanium XNA Game Engine][14] - fog, lighting&#xD;&#xA;&#xD;&#xA;2D&#xD;&#xA; &#xD;&#xA;- [Flat Red Ball][15] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;- [Jemgine][16] - 2D game engine with level editor, components, visual scripting language&#xD;&#xA;- [Box2D.XNA][17] - A C# port of the Box2D engine&#xD;&#xA;- [DEngine][18] - 2D tile engine with basic editor&#xD;&#xA;&#xD;&#xA;**Commercial game engines**&#xD;&#xA;&#xD;&#xA;- [Kitae][19] - 2D game engine with tile/level editor, collision detection, sprites, fonts, etc.&#xD;&#xA;- [TorqueX][20] - [(not recommended)][21]&#xD;&#xA;  - 2D - TorqueX Game Builder to edit levels from a drag and drop UI. &#xD;&#xA;  - 3D - TorqueX World Builder to build 3D game levels with objects and lighting&#xD;&#xA;- [Visual3d.net][22] - (Windows only)&#xD;&#xA;- [SunBurn][23] (Rendering engine). There is a discount for Premium members.&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][24]&#xD;&#xA;- [Dynamic Particle System Framework][25]&#xD;&#xA;- [Simple AI][26] - path finding, path following, behaviours&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products. You should look at each one and determine pricing and licensing.&#xD;&#xA;&#xD;&#xA;- [Farseer][27] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][28] - Source available, port of C++ [JigLib][29], formerly JiggleX &#xD;&#xA;- [Bullet][30]  &#xD;&#xA;   - [BulletX][31]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][32]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][33] &#xD;&#xA;- [Oops! 3D Physics Framework][34] &#xD;&#xA;- [Bepu physics][35] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][36] - soft body physics. Used in [JelloCar][37] and other fun [Walaber][38] games. &#xD;&#xA;- [Physics2D.Net][39] - see demo video &#xD;&#xA;- [Henge3D Physics Library][40] - Rigid body physics with constraints and joints&#xD;&#xA;- [XnaHavok][41] - C# port of Havok&#xD;&#xA;- [X-Engine][42] - rigid body physics (development stopped)&#xD;&#xA;&#xD;&#xA;If you are only targetting **windows** then you can use any of the commercial, or open source engines. Some have managed wrappers or you may need to roll your own:&#xD;&#xA;&#xD;&#xA;- [PhysX][43] &#xD;&#xA;    - [PhysX.NET][44]&#xD;&#xA;    - [Wrapper][45] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][46] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][47] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly.&#xD;&#xA;- [Newton Game Dynamics][48]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://phoenixxna.codeplex.com/&#xD;&#xA;  [2]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [3]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [4]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [5]: http://forums.xna.com/forums/t/38853.aspx&#xD;&#xA;  [6]: http://nine.codeplex.com/&#xD;&#xA;  [7]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [8]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [9]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [10]: http://www.codeplex.com/FireflyEngine&#xD;&#xA;  [11]: http://sourceforge.net/projects/txnagameengine/&#xD;&#xA;  [12]: http://attollo3d.codeplex.com/&#xD;&#xA;  [13]: http://www.reactor3d.com/forums/index.php?www&#xD;&#xA;  [14]: http://txnage.codeplex.com/&#xD;&#xA;  [15]: http://www.flatredball.com/frb/&#xD;&#xA;  [16]: http://jemgine.codeplex.com/&#xD;&#xA;  [17]: http://box2dxna.codeplex.com/&#xD;&#xA;  [18]: http://dengine.codeplex.com/&#xD;&#xA;  [19]: http://www.nullcity.com/Default.aspx?section=Kitae&#xD;&#xA;  [20]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [21]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products/2950#2950&#xD;&#xA;  [22]: http://www.visual3d.net/&#xD;&#xA;  [23]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [24]: http://www.codeplex.com/mpe&#xD;&#xA;  [25]: http://dpsf.danskingdom.com/&#xD;&#xA;  [26]: http://simpleai.codeplex.com/&#xD;&#xA;  [27]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [28]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [29]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [30]: http://bulletphysics.com/&#xD;&#xA;  [31]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [32]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [33]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [34]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [35]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [36]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [37]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [38]: http://walaber.com/&#xD;&#xA;  [39]: http://physics2d.googlepages.com/&#xD;&#xA;  [40]: http://henge3d.codeplex.com/&#xD;&#xA;  [41]: http://sourceforge.net/projects/xnahavok/&#xD;&#xA;  [42]: http://www.codeplex.com/xengine&#xD;&#xA;  [43]: http://www.ageia.com/&#xD;&#xA;  [44]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [45]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [46]: http://ode.org/&#xD;&#xA;  [47]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [48]: http://www.newtondynamics.com/" />
  <row Id="10645" PostHistoryTypeId="5" PostId="5253" RevisionGUID="345b6a7a-ee39-4ab5-8ed4-e9c3777cea8e" CreationDate="2010-11-08T20:42:42.317" UserId="2995" Comment="important usable engines - only Ox as of now" Text="I found and assembled this list:&#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;-  **[Ox Game Engine][1]** - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows&#xD;&#xA;- [TXna Game Engine][7] - Includes lighting, camera controllers&#xD;&#xA;-  [Axiom3d][2] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [QuickStart 3D Game Engine][3] - particles, rain, fog, water, terrain&#xD;&#xA;- [Engine Nine][4] - animation, terrain, sky, post processing screen effects &#xD;&#xA;- The [Ship Game][5] and the [Robot Game][6] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [Attolo 3D XNA Engine][8] - Includes particle effects, model loading, terrain, etc.&#xD;&#xA;- [Reactor 3D][9] - development stopped&#xD;&#xA;- [Titanium XNA Game Engine][10] - fog, lighting&#xD;&#xA;- [Tomahawk][11] - Pretty well supported engine.&#xD;&#xA;- [Phoenix][12] - still in development&#xD;&#xA;&#xD;&#xA;2D&#xD;&#xA; &#xD;&#xA;- [Flat Red Ball][13] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;- [Jemgine][14] - 2D game engine with level editor, components, visual scripting language&#xD;&#xA;- [Box2D.XNA][15] - A C# port of the Box2D engine&#xD;&#xA;- [DEngine][16] - 2D tile engine with basic editor&#xD;&#xA;&#xD;&#xA;**Commercial game engines**&#xD;&#xA;&#xD;&#xA;- [Kitae][17] - 2D game engine with tile/level editor, collision detection, sprites, fonts, etc.&#xD;&#xA;- [TorqueX][18] - [(not recommended)][19]&#xD;&#xA;  - 2D - TorqueX Game Builder to edit levels from a drag and drop UI. &#xD;&#xA;  - 3D - TorqueX World Builder to build 3D game levels with objects and lighting&#xD;&#xA;- [Visual3d.net][20] - (Windows only)&#xD;&#xA;- [SunBurn][21] (Rendering engine). There is a discount for Premium members.&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][22]&#xD;&#xA;- [Dynamic Particle System Framework][23]&#xD;&#xA;- [Simple AI][24] - path finding, path following, behaviours&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products.&#xD;&#xA;&#xD;&#xA;- [Farseer][25] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][26] - Source available, port of C++ [JigLib][27], formerly JiggleX &#xD;&#xA;- [Bullet][28]  &#xD;&#xA;   - [BulletX][29]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][30]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][31] &#xD;&#xA;- [Oops! 3D Physics Framework][32] &#xD;&#xA;- [Bepu physics][33] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][34] - soft body physics. Used in [JelloCar][35] and other fun [Walaber][36] games. &#xD;&#xA;- [Physics2D.Net][37] - see demo video &#xD;&#xA;- [Henge3D Physics Library][38] - Rigid body physics with constraints and joints&#xD;&#xA;- [XnaHavok][39] - C# port of Havok&#xD;&#xA;- [X-Engine][40] - rigid body physics (development stopped)&#xD;&#xA;&#xD;&#xA;If you are only targetting **windows** then you can use any of these:&#xD;&#xA;&#xD;&#xA;- [PhysX][41] &#xD;&#xA;    - [PhysX.NET][42]&#xD;&#xA;    - [Wrapper][43] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][44] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][45] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly.&#xD;&#xA;- [Newton Game Dynamics][46]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [2]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [3]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [4]: http://nine.codeplex.com/&#xD;&#xA;  [5]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [6]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [7]: http://txnagameengine.sourceforge.net/&#xD;&#xA;  [8]: http://attollo3d.codeplex.com/&#xD;&#xA;  [9]: http://www.reactor3d.com/forums/index.php?www&#xD;&#xA;  [10]: http://txnage.codeplex.com/&#xD;&#xA;  [11]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [12]: http://phoenixxna.codeplex.com/&#xD;&#xA;  [13]: http://www.flatredball.com/frb/&#xD;&#xA;  [14]: http://jemgine.codeplex.com/&#xD;&#xA;  [15]: http://box2dxna.codeplex.com/&#xD;&#xA;  [16]: http://dengine.codeplex.com/&#xD;&#xA;  [17]: http://www.nullcity.com/Default.aspx?section=Kitae&#xD;&#xA;  [18]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [19]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products/2950#2950&#xD;&#xA;  [20]: http://www.visual3d.net/&#xD;&#xA;  [21]: http://www.synapsegaming.com/products/sunburn/&#xD;&#xA;  [22]: http://www.codeplex.com/mpe&#xD;&#xA;  [23]: http://dpsf.danskingdom.com/&#xD;&#xA;  [24]: http://simpleai.codeplex.com/&#xD;&#xA;  [25]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [26]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [27]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [28]: http://bulletphysics.com/&#xD;&#xA;  [29]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [30]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [31]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [32]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [33]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [34]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [35]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [36]: http://walaber.com/&#xD;&#xA;  [37]: http://physics2d.googlepages.com/&#xD;&#xA;  [38]: http://henge3d.codeplex.com/&#xD;&#xA;  [39]: http://sourceforge.net/projects/xnahavok/&#xD;&#xA;  [40]: http://www.codeplex.com/xengine&#xD;&#xA;  [41]: http://www.ageia.com/&#xD;&#xA;  [42]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [43]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [44]: http://ode.org/&#xD;&#xA;  [45]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [46]: http://www.newtondynamics.com/" />
  <row Id="10646" PostHistoryTypeId="2" PostId="5351" RevisionGUID="12c04940-5d13-45c9-82f0-e34365c02c67" CreationDate="2010-11-08T20:56:22.803" UserId="744" Text="The answer is _yes, it's a valid option_ but _no, it probably isn't a great idea_.&#xD;&#xA;&#xD;&#xA;There are two major problems with SQL that NoSQL tries to address, when it comes to games.&#xD;&#xA;&#xD;&#xA;The first is latency, or lag. In one sense, SQL databases are blazingly fast, processing thousands of transactions or more in tenths of a second. In another sense, they're incredibly slow, because processing just a few transactions can take that same amount of time. For most database uses, this doesn't matter, but games have a real-time component so it's not just about how many transactions you can do per second, but about the average time it takes to respond to a database transaction.&#xD;&#xA;&#xD;&#xA;This latency is a major problem for real-time games. Many developers that need large databases (usually for MMOs) build out a caching layer that sits between the database and the game servers in order to avoid these stalls, and then flush the cache periodically. The problem? You just threw out the main reasons to use a database - &lt;a href=&quot;http://en.wikipedia.org/wiki/ACID&quot;&gt;atomicity, consistency, isolation, and durability&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;***But that problem doesn't apply to web games.*** You've already got a high-latency connection between the player and the game, so you might as well get the throughput SQL provides, as well as the benefits of mature, well-known software.&#xD;&#xA;&#xD;&#xA;The second problem, however, does apply to you, and that's the &lt;a href=&quot;http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch&quot;&gt;object-relational impedance mismatch&lt;/a&gt;. Games deal with objects, databases deal with rows. If you're lucky an object can be made into a row just by listing its fields, but most of the time objects are hierarchical, and you've got to flatten them out in some way to get them into rows.&#xD;&#xA;&#xD;&#xA;Document-based databases, like CouchDB and MongoDB, solve this problem by promoting the document to the top-level object, rather than row (&quot;document&quot; in this case is a synonym for &quot;object&quot;). But by doing this, they lose many of the benefits of SQL databases. The throughput is much lower, and the locking algorithms become much more complicated.&#xD;&#xA;&#xD;&#xA;The good news is, &lt;a href=&quot;http://en.wikipedia.org/wiki/Object-relational_mapping&quot;&gt;there are already a lot of object-relational mapping (ORM)&lt;/a&gt; tools available for whatever language you're using. They let you translate between objects in memory and rows in the database fairly transparently. These tools are generally not appropriate for large-scale real-time games, because they can present the worst performance aspects of SQL and NoSQL databases. But it's fine for a web game - at worst, when you run into performance problems, you can go back to doing transactions the old-fashioned way. The latency problem doesn't hurt you, and the increased throughput helps you.&#xD;&#xA;&#xD;&#xA;Finally, &lt;a href=&quot;http://gamedev.stackexchange.com/questions/2282/what-kind-of-databases-are-usually-used-in-an-mmorpg/2389#2389&quot;&gt;to belabor a point I've made elsewhere&lt;/a&gt;: _This isn't about static game data._ I'm not talking about your item descriptions or your weapon damage or sprites or anything here. I mean the real, mutable game data, like what's in a player's inventory or what their stats are. All you need for the static data is a data store. Maybe it turns out that the easiest thing to do is use the same database as the data store for that because you have a great ORM; maybe you'll just need the filesystem. It's two separate problems, and one answer needn't (and probably won't) fit both cases." />
  <row Id="10647" PostHistoryTypeId="5" PostId="5253" RevisionGUID="5efe3384-9be4-4e84-a34e-7dee77c3e78e" CreationDate="2010-11-08T21:01:37.687" UserId="2995" Comment="typo" Text="In short, the most **usable** 3D game engines written in fully managed C# code (which allows you to develop for the Windows and Xbox 360) are:&#xD;&#xA;&#xD;&#xA;-  **[Ox Game Engine][1]** - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows. **Free**.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;- **[SunBurn][3]** - AAA rendering with dynamic lighting &amp; shadowing, occulusion, HDR rendering, spectacular, diffuse and bump maps, and includes a 3D Game world editor to edit models, lights, materials. **$200** or more.&#xD;&#xA;&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;I would have mentioned **Torque X** on the top list but the negative response has been so overwhelming that I'm quite convinced it really a mess.&#xD;&#xA;&#xD;&#xA;The other engines are listed here:&#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;- [TXna Game Engine][5] - Includes lighting, camera controllers&#xD;&#xA;-  [Axiom3d][6] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [QuickStart 3D Game Engine][7] - particles, rain, fog, water, terrain&#xD;&#xA;- [Engine Nine][8] - animation, terrain, sky, post processing screen effects &#xD;&#xA;- The [Ship Game][9] and the [Robot Game][10] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [Attolo 3D XNA Engine][11] - Includes particle effects, model loading, terrain, etc.&#xD;&#xA;- [Reactor 3D][12] - development stopped&#xD;&#xA;- [Titanium XNA Game Engine][13] - fog, lighting&#xD;&#xA;- [Tomahawk][14] - Pretty well supported engine.&#xD;&#xA;- [Phoenix][15] - still in development&#xD;&#xA;&#xD;&#xA;2D&#xD;&#xA; &#xD;&#xA;- [Flat Red Ball][16] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;- [Jemgine][17] - 2D game engine with level editor, components, visual scripting language&#xD;&#xA;- [Box2D.XNA][18] - A C# port of the Box2D engine&#xD;&#xA;- [DEngine][19] - 2D tile engine with basic editor&#xD;&#xA;&#xD;&#xA;**Commercial game engines**&#xD;&#xA;&#xD;&#xA;- [Kitae][20] - 2D game engine with tile/level editor, collision detection, sprites, fonts, etc.&#xD;&#xA;- [TorqueX][21] - [(not recommended)][22]&#xD;&#xA;  - 2D - TorqueX Game Builder to edit levels from a drag and drop UI. &#xD;&#xA;  - 3D - TorqueX World Builder to build 3D game levels with objects and lighting&#xD;&#xA;- [Visual3d.net][23] - (Windows only)&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][24]&#xD;&#xA;- [Dynamic Particle System Framework][25]&#xD;&#xA;- [Simple AI][26] - path finding, path following, behaviours&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products.&#xD;&#xA;&#xD;&#xA;- [Farseer][27] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][28] - Source available, port of C++ [JigLib][29], formerly JiggleX &#xD;&#xA;- [Bullet][30]  &#xD;&#xA;   - [BulletX][31]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][32]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][33] &#xD;&#xA;- [Oops! 3D Physics Framework][34] &#xD;&#xA;- [Bepu physics][35] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][36] - soft body physics. Used in [JelloCar][37] and other fun [Walaber][38] games. &#xD;&#xA;- [Physics2D.Net][39] - see demo video &#xD;&#xA;- [Henge3D Physics Library][40] - Rigid body physics with constraints and joints&#xD;&#xA;- [XnaHavok][41] - C# port of Havok&#xD;&#xA;- [X-Engine][42] - rigid body physics (development stopped)&#xD;&#xA;&#xD;&#xA;If you are only targetting **windows** then you can use any of these:&#xD;&#xA;&#xD;&#xA;- [PhysX][43] &#xD;&#xA;    - [PhysX.NET][44]&#xD;&#xA;    - [Wrapper][45] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][46] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][47] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly.&#xD;&#xA;- [Newton Game Dynamics][48]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [2]: http://i.stack.imgur.com/dW9Zi.png&#xD;&#xA;  [3]: http://www.synapsegaming.com/products/sunburn/engine/&#xD;&#xA;  [4]: http://i.stack.imgur.com/ta32d.png&#xD;&#xA;  [5]: http://txnagameengine.sourceforge.net/&#xD;&#xA;  [6]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [7]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [8]: http://nine.codeplex.com/&#xD;&#xA;  [9]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [10]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [11]: http://attollo3d.codeplex.com/&#xD;&#xA;  [12]: http://www.reactor3d.com/forums/index.php?www&#xD;&#xA;  [13]: http://txnage.codeplex.com/&#xD;&#xA;  [14]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [15]: http://phoenixxna.codeplex.com/&#xD;&#xA;  [16]: http://www.flatredball.com/frb/&#xD;&#xA;  [17]: http://jemgine.codeplex.com/&#xD;&#xA;  [18]: http://box2dxna.codeplex.com/&#xD;&#xA;  [19]: http://dengine.codeplex.com/&#xD;&#xA;  [20]: http://www.nullcity.com/Default.aspx?section=Kitae&#xD;&#xA;  [21]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [22]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products/2950#2950&#xD;&#xA;  [23]: http://www.visual3d.net/&#xD;&#xA;  [24]: http://www.codeplex.com/mpe&#xD;&#xA;  [25]: http://dpsf.danskingdom.com/&#xD;&#xA;  [26]: http://simpleai.codeplex.com/&#xD;&#xA;  [27]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [28]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [29]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [30]: http://bulletphysics.com/&#xD;&#xA;  [31]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [32]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [33]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [34]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [35]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [36]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [37]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [38]: http://walaber.com/&#xD;&#xA;  [39]: http://physics2d.googlepages.com/&#xD;&#xA;  [40]: http://henge3d.codeplex.com/&#xD;&#xA;  [41]: http://sourceforge.net/projects/xnahavok/&#xD;&#xA;  [42]: http://www.codeplex.com/xengine&#xD;&#xA;  [43]: http://www.ageia.com/&#xD;&#xA;  [44]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [45]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [46]: http://ode.org/&#xD;&#xA;  [47]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [48]: http://www.newtondynamics.com/" />
  <row Id="10649" PostHistoryTypeId="2" PostId="5352" RevisionGUID="3e6ae792-99c9-4b83-aa9d-b453d0e1bcbf" CreationDate="2010-11-08T21:28:55.013" UserId="2400" Text="I'm programming a dedicated server in C# using BeamServer2 DLL's.&#xD;&#xA;At first I wanted to be able to see other players move on our already made Omuni map.&#xD;&#xA;This I did by just sending your position to the server each frame.&#xD;&#xA;This worked out and I was able to play with a few friends but the movement wasn't laggfree.&#xD;&#xA;So I started trying to add movement smoothing and also some security so they can't just send a false position to the server without the server stopping it from reaching the other clients.&#xD;&#xA;&#xD;&#xA;What I than did, I made a masterClient that has a movementController on the remotePlayer.&#xD;&#xA;When a client wants to move he moves localy and sends a message to the server with hes direction to move. The server than takes hes speed and sends it to the masterClient.&#xD;&#xA;The masterClient than moves the remotePlayer just like the remotePlayer moves himself.&#xD;&#xA;When he stopes moving he sends a message with hes position in it. The masterclient than checkes if the position that he has come to is as close as the position he has from the client, if it is realistic according to the ping of the client the server puts him on the client's position.&#xD;&#xA;&#xD;&#xA;This works, but I still have a lagg problem and I'm not sure how to fix this.&#xD;&#xA;I must make movement smoothing on the client but I found out myself that I can just lerp (x/2,y/2,z/2) to the position and put him on the real position next frame, I failed at that and I will try again soon. Even if that is added I'm not sure if the lagg is fixed.&#xD;&#xA;&#xD;&#xA;Any other techniques, suggestions, questions, ... ?&#xD;&#xA;Thanks, Diede." />
  <row Id="10650" PostHistoryTypeId="1" PostId="5352" RevisionGUID="3e6ae792-99c9-4b83-aa9d-b453d0e1bcbf" CreationDate="2010-11-08T21:28:55.013" UserId="2400" Text="Networking and movement in MMORPG's UNITY" />
  <row Id="10651" PostHistoryTypeId="3" PostId="5352" RevisionGUID="3e6ae792-99c9-4b83-aa9d-b453d0e1bcbf" CreationDate="2010-11-08T21:28:55.013" UserId="2400" Text="&lt;c#&gt;&lt;network&gt;&lt;mmo&gt;&lt;unity&gt;" />
  <row Id="10652" PostHistoryTypeId="2" PostId="5353" RevisionGUID="c2dac52b-9407-4f46-9019-f7621a16a144" CreationDate="2010-11-08T21:50:50.410" UserId="891" Text="[Ogre4J][1]&#xD;&#xA;----&#xD;&#xA;- Cross Platform - **Yes**  &#xD;&#xA;- Written in Java&#xD;&#xA;- Support for OpenGL is a must. Direct3D is optional. - **Both**  &#xD;&#xA;- Some material system - **Yes**  &#xD;&#xA;- Full support for some model format with full animation support (preferred COLLADA) - Ogre animations which has exports for Maya and 3d Studio Max  &#xD;&#xA;- Level of Detail (LOD) support - **Yes**  &#xD;&#xA;- Lighting support - **Yes**  &#xD;&#xA;- Shaders, GUI, Input and Terrain/Water support are also preferred, but not required - **Yes**&#xD;&#xA;&#xD;&#xA;Ogre4J is a binding to the Ogre C++ graphics renderer.  Going straight to C++ is probably preferred though.&#xD;&#xA;&#xD;&#xA;Ogre is a scene graph based rendering engine which does everything you're looking for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ogre4j.sourceforge.net/" />
  <row Id="10653" PostHistoryTypeId="2" PostId="5354" RevisionGUID="cf25fe9f-0339-48d1-95c1-f3b8a95f95d1" CreationDate="2010-11-08T21:51:56.640" UserId="879" Text="Commercial PS3 games?  No.  But (to my mind) the unique and most interesting part of PS3 development involve the SPUs, and there's public code/info available for the Cell and SPUs in particular.&#xD;&#xA;&#xD;&#xA;If you have a PS3 capable of it (&quot;Fat&quot; PS3, pre 3.21 OS version), GNU/Lunix is a great environment to learn Cell programming." />
  <row Id="10654" PostHistoryTypeId="2" PostId="5355" RevisionGUID="ccc0d730-0328-490f-af66-914dd29da0c1" CreationDate="2010-11-08T23:06:18.243" UserId="1581" Text="If you use a modern database such as [couchdb][1] you will get a way to store your game state and get the syncronization basically for free.&#xD;&#xA;&#xD;&#xA;It also  works using a javascript interface, so it should blend well with your HTML5 app.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://couchdb.apache.org/" />
  <row Id="10655" PostHistoryTypeId="2" PostId="5356" RevisionGUID="01e3e76d-750f-491d-aa0f-eed56344462a" CreationDate="2010-11-08T23:15:24.097" UserId="1581" Text="In order to represent 3d data, you need 3 coordinates (x,y,z). There's no way around that.&#xD;&#xA;&#xD;&#xA;If you are using a heightmap, let's say, like this one:&#xD;&#xA;&#xD;&#xA;    11111111111111&#xD;&#xA;    11122222222111&#xD;&#xA;    11222333322211&#xD;&#xA;    11222300322211&#xD;&#xA;    11222333322211&#xD;&#xA;    11122222222111&#xD;&#xA;    11111111111111&#xD;&#xA;&#xD;&#xA;Then you are *already* using 3 coordinates. x and y are the coordinates of each tile, and z is the number inside the tile." />
  <row Id="10656" PostHistoryTypeId="5" PostId="5355" RevisionGUID="a8b25fae-e7a2-409e-8407-2b8537d606cc" CreationDate="2010-11-08T23:16:50.430" UserId="1581" Comment="added 134 characters in body" Text="If you use a modern database such as [couchdb][1] you will get a way to store your game state and get the syncronization basically for free.&#xD;&#xA;&#xD;&#xA;It also  works using a javascript interface, so it should blend well with your HTML5 app.&#xD;&#xA;&#xD;&#xA;EDIT: I forgot to mention- the client-server communication happens in JSON, which is less verbose than XML but equally expressive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://couchdb.apache.org/" />
  <row Id="10657" PostHistoryTypeId="2" PostId="5357" RevisionGUID="25669e96-deed-417f-a8f6-c7776d324a1b" CreationDate="2010-11-09T00:32:40.357" UserId="3171" Text="A lot of times you can just give decent text instructions, and trust your artist to do their job. I think I drew at most one or two stick men to get a [Best Visual Arts][1] award (thanks of course to my artists!).&#xD;&#xA;&#xD;&#xA;You can compile reference material by scanning or copying stuff for your artist -- if you want a particular architecture style, chances are at least parts of it exist already.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.igf.com/2000finalistswinners.html" />
  <row Id="10658" PostHistoryTypeId="2" PostId="5358" RevisionGUID="6e4a8ebc-cbca-4c4c-98b8-d745ea826b8a" CreationDate="2010-11-09T00:38:02.067" UserId="3171" Text="Mobile, but if you don’t like that, perhaps “handheld” (since mobile implies telephony, and things like a DS are also handheld)." />
  <row Id="10659" PostHistoryTypeId="2" PostId="5359" RevisionGUID="039ead0f-dcc0-4443-8971-3392b8b6aadd" CreationDate="2010-11-09T00:41:22.343" UserId="3171" Text="Sure. Scripting logic is highly unlikely to be your bottleneck (you will actually profile with Shark or Instruments, right?). I worked on the iPhone version of Marooned, which used a lot of Lua for game logic. I did a lot of performance tuning, and basically Lua was 0%.&#xD;&#xA;&#xD;&#xA;(Lua was a grey area when we released Marooned, but it’s since been officially blessed for iOS development.)" />
  <row Id="10660" PostHistoryTypeId="2" PostId="5360" RevisionGUID="83fbf6fc-736b-4a7e-99dd-75fac158683a" CreationDate="2010-11-09T01:00:29.730" UserId="3089" Text="The Best world class course in linear algebra is [MIT's one][1] with the great Gilbert Strang&#xD;&#xA;&#xD;&#xA;It is about 34 lectures&#xD;&#xA;&#xD;&#xA;You may face few calculus examples which you can ignore them&#xD;&#xA;&#xD;&#xA;check the syllabus for his text&#xD;&#xA;  [1]: http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/index.htm" />
  <row Id="10661" PostHistoryTypeId="2" PostId="5361" RevisionGUID="43b74ea5-8414-4093-af97-8fd46edd7da1" CreationDate="2010-11-09T01:04:55.337" UserId="3171" Text="That's pretty much supposed to happen, it's doing (some of) the drawing in a thread.&#xD;&#xA;&#xD;&#xA;It's been a while since I worked on this, but I used&#xD;&#xA;&#xD;&#xA;    @interface FastCATiledLayer : CATiledLayer&#xD;&#xA;    @end&#xD;&#xA;    &#xD;&#xA;    @implementation FastCATiledLayer&#xD;&#xA;    &#xD;&#xA;    +(CFTimeInterval)fadeDuration&#xD;&#xA;    {&#xD;&#xA;    	return 0.0;		// Normally it’s 0.25&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    @end&#xD;&#xA;&#xD;&#xA;because I didn't like the forced initial delay. That may help.&#xD;&#xA;" />
  <row Id="10662" PostHistoryTypeId="2" PostId="5362" RevisionGUID="44d77fc2-1b66-4a0c-9450-8df0ba49d422" CreationDate="2010-11-09T02:19:24.873" UserDisplayName="David" Text="When a person mouse down, moves the mouse, and mouses up the system gets the different in the mouse down coord and the mouse up coords and loads in the new map items. However, the problem is it loads them every time so I want a way to track what has been loaded without too much work on checking or storing checks.&#xD;&#xA;&#xD;&#xA;- Most promising. Came up with while typing this. Section the screen into 250x250 sectors and check if that sector has been loaded.&#xD;&#xA;&#xD;&#xA;- Keep track of each corner of the screen and see if there is an area of those that have not loaded.&#xD;&#xA;&#xD;&#xA;- Keep a record of the corners of the screen. When mouse up coords are greater then load the different. Problem is if they are at coord 10,000 then it will load from -10k to 10k positive and that is a lot of items to load.&#xD;&#xA;&#xD;&#xA;- Check every item on the page to see if it is loaded. If I do this I might as well reload the whole page.&#xD;&#xA;&#xD;&#xA;If anyone has some suggestions; feel free to pass them on." />
  <row Id="10663" PostHistoryTypeId="1" PostId="5362" RevisionGUID="44d77fc2-1b66-4a0c-9450-8df0ba49d422" CreationDate="2010-11-09T02:19:24.873" UserDisplayName="David" Text="jquery ondrag map load only what has not been viewed" />
  <row Id="10664" PostHistoryTypeId="3" PostId="5362" RevisionGUID="44d77fc2-1b66-4a0c-9450-8df0ba49d422" CreationDate="2010-11-09T02:19:24.873" UserDisplayName="David" Text="&lt;javascript&gt;&lt;maps&gt;" />
  <row Id="10665" PostHistoryTypeId="2" PostId="5363" RevisionGUID="4583cc98-947d-4cdc-a3d6-da843c4612ad" CreationDate="2010-11-09T02:51:28.187" UserId="3115" Text="There a many problems/tasks involved when programming &quot;no lagging&quot; realtime network games.&#xD;&#xA;&#xD;&#xA; - hardware speed (CPU power needed pr. player both client and server)&#xD;&#xA; - network distance and equipment (connection LAN or WAN?)&#xD;&#xA; - server bandwidth (how many players)&#xD;&#xA; &#xD;&#xA;Secondly you have the &quot;bad guys&quot; who always tries to cheat in games. If your game is going public, then consider what would happend if I sat down and injected &quot;false&quot; network packages. Consider if someone posted &quot;unreachable positions&quot; or &quot;full health/ammo&quot;.&#xD;&#xA;&#xD;&#xA;**My suggestion for your architecture for a start, would be something like this:**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; * Server, controls all vital data, calculates AND validates movement.&#xD;&#xA; * Client, receives data on what to show on the screen + some &quot;think ahead&quot; data on moving objects.&#xD;&#xA;&#xD;&#xA;Most realtime FPS's as I know, does some sort of &quot;we know you are moving this direction at this speed, so we just simulate that until we get other details from the server&quot;&#xD;&#xA;&#xD;&#xA;So your client should post &quot;what it requests&quot; and might even start to move itself that direction, but it might get &quot;forced back&quot; by the server if the server rejects the movement. Here you have to think, what if the client posts &quot;false coords&quot; outside the map, or suddently &quot;jumps&quot;. The server needs to track if the new position is possible from its previous point OR the server just receives the message that says: &quot;CLIENT MOVE FORWARD 200&quot; and then the server process what this will do according to map and game data.&#xD;&#xA;&#xD;&#xA;This will give some lag, but again, if you let the client receive these data and does some math itself, it does not need an update every ms/frame, it can lag a little without noticeable lag on the screen.&#xD;&#xA;&#xD;&#xA;Perhaps you can even divide the map into &quot;virtual tiles&quot; (if its a vector game) so that you have a fast way to calculate where the objects should be next.&#xD;&#xA;&#xD;&#xA;**World of Warcraft/Battlefield/Counterstrike**&#xD;&#xA;&#xD;&#xA;I believe WOW is doing it this way too. You press a key, the server receives your movement &quot;wish&quot; and reply with &quot;you are moving now&quot; and then the client shows this + the server simulates the new position on the server in some sort of &quot;session pr. client&quot;. This is were the &quot;maximum amount of players pr. game&quot; is getting nasty, because your server has to keep track of everyone and basically do this as &quot;turnbased&quot; - but so fast that it looks realtime.&#xD;&#xA;&#xD;&#xA;So... &#xD;&#xA;&#xD;&#xA;    Foreach (Client in GameSessionList)&#xD;&#xA;    {&#xD;&#xA;       ParseInput();&#xD;&#xA;       ParseMovement(); // including collission test&#xD;&#xA;       ResponseSend(); // new positions+movement data for client and objects/other players&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10666" PostHistoryTypeId="2" PostId="5364" RevisionGUID="20b50739-d741-4c70-89d2-3e72cd586479" CreationDate="2010-11-09T03:13:43.123" UserId="1573" Text="I really liked Eric Lengyel's [Mathematics for 3D Game Programming and Computer Graphics][1]. It's been my constant desk companion since school. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Development/dp/1584502770/ref=ntt_at_ep_dpt_2" />
  <row Id="10667" PostHistoryTypeId="2" PostId="5365" RevisionGUID="292ab9c2-53f1-47ac-a536-5967a8548d50" CreationDate="2010-11-09T06:07:20.057" UserId="2815" Text="I'd create the client like it's a non-network game.  That is, anything you do you do it immideately on the client.  Then add, parallel to that, your network code.  This code will get the movement data.  Simple as from coords, direction and speed.  It just sends this to the server who validate.  Server sends you an ok or a new position.&#xD;&#xA;&#xD;&#xA;So you have all you client code running like it's alone in the world.  Then it just recieve new correction data from the server or an ok.  If you press forward and hold it for ten seconds, then the server will just recieve that one data.  You might concider sending/recieving data every second even though you're just holding the forward button, or else, if you hit a lag spike you might run forever." />
  <row Id="10668" PostHistoryTypeId="2" PostId="5366" RevisionGUID="cd3f0411-e626-411c-b750-3a54d2c8e0ae" CreationDate="2010-11-09T07:50:20.670" UserId="3179" Text="You can check [XNA Tweener][1] library that has *Elastic* function among others. Its an adoption of Robbert Penner's easing framework.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnatweener.codeplex.com/" />
  <row Id="10669" PostHistoryTypeId="2" PostId="5367" RevisionGUID="12578d1f-8930-4ded-b22a-6b6371a30533" CreationDate="2010-11-09T08:59:05.657" UserId="678" Text="The challenging part in lag compensation is that you will get updates from clients that are out of order. A laggy client's command sent at time T may very well arrive after a non-laggy client command sent at T+40ms. Applying the commands in the order you get them will lead to all sorts of nastiness. Doing it correctly on the other hand involves winding back time and replaying all commands that have been issued since.&#xD;&#xA;&#xD;&#xA;There is no easy way around this, but there are multiple valid solutions. You can find a relatively easy one described [here][1].&#xD;&#xA;&#xD;&#xA;There's a lot of research in this field, have a look around!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ra.is/unlagged/solution.html#AS" />
  <row Id="10670" PostHistoryTypeId="2" PostId="5368" RevisionGUID="fe2315d9-325b-4363-af2b-ab904fdc2871" CreationDate="2010-11-09T13:26:32.553" UserId="3182" Text="I know someone who is thinking about getting into game design, and I wondered, what does the job *game designer* entail? what tools do you have to learn how to use? what unique skills do you need? what exactly is it you'd do from day to day. I may be wording this a bit wrong because I'm not sure if the college program is *become a game designer* or learn *game design*. but I think the same questions apply either way." />
  <row Id="10671" PostHistoryTypeId="1" PostId="5368" RevisionGUID="fe2315d9-325b-4363-af2b-ab904fdc2871" CreationDate="2010-11-09T13:26:32.553" UserId="3182" Text="What does a Game Designer do? what skills do they need?" />
  <row Id="10672" PostHistoryTypeId="3" PostId="5368" RevisionGUID="fe2315d9-325b-4363-af2b-ab904fdc2871" CreationDate="2010-11-09T13:26:32.553" UserId="3182" Text="&lt;game-design&gt;&lt;jobs&gt;&lt;job-hierarchy&gt;" />
  <row Id="10673" PostHistoryTypeId="2" PostId="5369" RevisionGUID="f851c489-1c4f-4136-ad84-c22d6940b1d6" CreationDate="2010-11-09T14:02:15.207" UserId="3162" Text="Hardly anyone does *game design* full time: typically game design is only part of a job. Some designers are also *producers*: they manage the personnel, schedules, budgets, and contracts of the games they design. Others combine game design with *development* (programming, art, audio, etc).&#xD;&#xA;&#xD;&#xA;So if you want to do game design as a career, you should become expert at a related skill and find some way to move into design. There are different career paths: for example, you might join a big company, demonstrate your design talents, and move up into design. Or you might join a small company (or start your own) where everyone has to do a bit of everything by necessity.&#xD;&#xA;&#xD;&#xA;The key skills, in my opinion, of being a game designer, are:&#xD;&#xA;&#xD;&#xA;* A wide knowledge of games of a lot of different types, so that you have a lot of background to draw on for solutions to problems (&quot;Our game has become unbalanced because it's too easy to accumulate health, but I remember how they solved that problem in *Foobar RPG VII*, they gave you the option to exchange health for experience, which created an interesting trade-off...&quot;)&#xD;&#xA;* The analytical skills to be able to determine *why* games have particular qualities. (&quot;Even though they have very similar gameplay, *Ico* creates a much more effective sense of peril than *Prince of Persia* because ...&quot; [Well, I won't spoil it for you: let's say it's an exercise for the reader!])&#xD;&#xA;* The communication skills to explain to artists, programmers, level designers and other developers how to achieve the effects you want. Big projects need big game design documents and you are going to want to write good ones. (&quot;We need to give the player enough warning of the attack that they have a chance to establish their guard, so the boss attack sequence needs to have a distinctive motion at least 1 second before the damage is dealt. Also, we need to arrange the camera angle so that this signal is visible.&quot;)&#xD;&#xA;* The discipline to realise that *you* are not the only person the game is aimed at (or even necessarily part of the target audience at all), and that your own intuitions about what is fun are not an infallible guide. You have to be able to look at data from real players in the market you are aiming to reach. (&quot;In the office, we all loved the hyper-death-mode, but when we tried it out, we found that 72% of beginners turned off the game in disgust when they were killed after 30 seconds and all their equipment was stolen.&quot;)&#xD;&#xA;* An awareness of your own limitations as a designer. Perhaps you know everything there is to know about balancing unit types for a turn-based strategy game, but you wouldn't know where to start when it comes to a racing game. Better to be humble than make a bad game!" />
  <row Id="10674" PostHistoryTypeId="2" PostId="5370" RevisionGUID="205acb35-4e4e-4e00-afd4-8da478790cc1" CreationDate="2010-11-09T14:18:57.903" UserId="744" Text="One of the best things I've reading describing the evolution of the job title _video game designer_ - as distinct from  programmer, artist, composer, etc., all of whom also _design games_  - and what they do is &lt;a href=&quot;http://www.gamasutra.com/php-bin/news_index.php?story=20748&quot;&gt;Jim Mummery's Tightening up the Graphics on Level Three&lt;/a&gt; (and &lt;a href=&quot;http://www.gamesetwatch.com/2009/02/opinion_finally_tightening_up.php&quot;&gt;part 2&lt;/a&gt;)." />
  <row Id="10675" PostHistoryTypeId="5" PostId="5370" RevisionGUID="3d1d81e1-82f3-4280-8148-a22eeaf3e8af" CreationDate="2010-11-09T14:28:04.817" UserId="744" Comment="added 13 characters in body" Text="One of the best things I've reading describing the evolution of the job title _video game designer_ - as distinct from  programmer, artist, composer, etc., all of whom also _design games_  - and what they do is &lt;a href=&quot;http://www.gamasutra.com/php-bin/news_index.php?story=20748&quot;&gt;Jim Mummery's Tightening up the Graphics on Level Three&lt;/a&gt; (and &lt;a href=&quot;http://www.gamesetwatch.com/2009/02/opinion_finally_tightening_up.php&quot;&gt;part 2&lt;/a&gt;, not as good)." />
  <row Id="10676" PostHistoryTypeId="2" PostId="5371" RevisionGUID="b370cfab-0b45-4f80-8339-759425ae7470" CreationDate="2010-11-09T16:02:40.257" UserDisplayName="openglNewbie1" Text="Ok, but for 3d viewer application opengl isn't better ? &#xD;&#xA;My doesn't work, beacouse I have two mistakes:&#xD;&#xA;**1.** &#xD;&#xA;&#xD;&#xA;    gluPerspective(45,(float)view[2]/(float)view[3],1.0,1500.0);&#xD;&#xA;&#xD;&#xA;**2.**&#xD;&#xA;&#xD;&#xA;    gluPickMatrix(x,view[3]-y,1.0,1.0,view);&#xD;&#xA;&#xD;&#xA;So it is looking that picking still works on ati, my friend said my that picking can be making by software implementation of opengl." />
  <row Id="10677" PostHistoryTypeId="2" PostId="5372" RevisionGUID="9b3ef1bb-8c17-4c96-81df-e4d176ca3601" CreationDate="2010-11-09T16:49:46.870" UserId="2653" Text="I was contemplating the design of a game (translating a boardgame to the computer, specifically, which I suppose is relevant in this case) and it occurred to me that it might make sense to build the 'game' separate from the 'display.'&#xD;&#xA;&#xD;&#xA;It would allow me to prototype something quickly with a simple text interface, and then go pretty it up later. It would also let me port the game to other media more easily.&#xD;&#xA;&#xD;&#xA;Is this sort of compartmentalization common in games? Should I try to break things down further? Are there complications I might be missing?" />
  <row Id="10678" PostHistoryTypeId="1" PostId="5372" RevisionGUID="9b3ef1bb-8c17-4c96-81df-e4d176ca3601" CreationDate="2010-11-09T16:49:46.870" UserId="2653" Text="MVC-like compartmentalization in games?" />
  <row Id="10679" PostHistoryTypeId="3" PostId="5372" RevisionGUID="9b3ef1bb-8c17-4c96-81df-e4d176ca3601" CreationDate="2010-11-09T16:49:46.870" UserId="2653" Text="&lt;design-patterns&gt;" />
  <row Id="10680" PostHistoryTypeId="2" PostId="5373" RevisionGUID="0f1e9b2f-7c97-47e8-9e95-0c35ebc8fa46" CreationDate="2010-11-09T16:52:48.420" UserId="1713" Text="OK, I already posted this over at math.stackechange.com but didn't get any answers :(&#xD;&#xA;&#xD;&#xA;First of here's a picture of my problem, the description follows afterwards:  &#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;So I got all the points and values set up.&#xD;&#xA;&#xD;&#xA;The ship starts out moving around the left planet `P1` with `S=0.27 Degrees` per gametick, when it reaches `Point A` it starts following the bezier curve till it reaches `Point D`, then it travels around the right planet `P2` with `S=0.42 Degrees` per game tick. The difference in `S` is so that the travel with the same movement speed around the planets.&#xD;&#xA;&#xD;&#xA;So far so good, I got that up and running, now my problem.&#xD;&#xA;&#xD;&#xA;When `S P1` and `S P2` differ to much, the ship jumps between the two speeds when it reaches it's destination, which looks pretty bad. So I need to accelerate the ship between `Point A` and `Point D` from `S P1` to `S P2`.&#xD;&#xA;&#xD;&#xA;The thing I'm missing are in purple, those are:  &#xD;&#xA;&#xD;&#xA; - A way to calculate the ticks it takes the ship to move along the bezier considering the acceleration.&#xD;&#xA;&#xD;&#xA; - And a way to find a position on the bezier curve based on T, again considering the acceleration.&#xD;&#xA;&#xD;&#xA;ATM I calculate the length of the bezier by calculating the distance between `N` of its points. So what I *think* I need, is a way to scale the `T` I need to put into my bezier calculation accordingly to the acceleration.&#xD;&#xA;&#xD;&#xA;PS: Although I'm no that deep into the math, I do not expect to be presented with ready to ship code, but I also do not expect to be pointed at pages and pages of mathematical symbols, because that won' help me in anyway. I already spent like 5 hours trying to figure the thing out on my own.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/hXQea.png" />
  <row Id="10681" PostHistoryTypeId="1" PostId="5373" RevisionGUID="0f1e9b2f-7c97-47e8-9e95-0c35ebc8fa46" CreationDate="2010-11-09T16:52:48.420" UserId="1713" Text="Moving ships between two planets along a bezier, missing some equations for acceleration" />
  <row Id="10682" PostHistoryTypeId="3" PostId="5373" RevisionGUID="0f1e9b2f-7c97-47e8-9e95-0c35ebc8fa46" CreationDate="2010-11-09T16:52:48.420" UserId="1713" Text="&lt;2d&gt;&lt;math&gt;" />
  <row Id="10683" PostHistoryTypeId="2" PostId="5374" RevisionGUID="1c6fc51f-6eb7-4882-b50e-a48a86bd6db0" CreationDate="2010-11-09T17:37:35.447" UserId="3189" Text="That kind of compartmentalization is the split between an Engine and gamecode, and is quite common. There is plenty of room for abstraction along the way.&#xD;&#xA;&#xD;&#xA;Your Engine and your games specific graphic data could be though of as the View, your gamecode the Model, and the controller would be whatever glue you use to tell your engine which texture to apply to which entity in your gamecode." />
  <row Id="10684" PostHistoryTypeId="2" PostId="5375" RevisionGUID="28eb5266-c1c1-4519-b254-76f572428b0d" CreationDate="2010-11-09T17:40:12.777" UserId="2081" Text="In addition to Pixelation, mentioned above, there's [PixelJoint](http://www.pixeljoint.com/), home to numerous professional pixel and low-spec artists for hire. You can post job listings in the [forum](http://www.pixeljoint.com/forum/), and you should be able to discuss and negotiate pay on an individual basis. You can get an idea of the skills of various artists by browsing the gallery.&#xD;&#xA;&#xD;&#xA;As for pricing, individual sprites and basic animations will tend to run you $50&amp;ndash;$100 apiece, while backgrounds are typically more costly. It really depends on the style you want to go for, but I think high-quality low-spec art is generally more time-consuming (since it is so detail-oriented) and hence costlier than other forms of game art.&#xD;&#xA;" />
  <row Id="10685" PostHistoryTypeId="5" PostId="5375" RevisionGUID="b5c0f4f8-1c05-4723-8b58-73915b1aff8b" CreationDate="2010-11-09T17:50:52.583" UserId="2081" Comment="added 431 characters in body" Text="In addition to Pixelation, mentioned above, there's [PixelJoint](http://www.pixeljoint.com/), home to numerous professional pixel and low-spec artists for hire. You can post job listings in the [forum](http://www.pixeljoint.com/forum/), and you should be able to discuss and negotiate pay on an individual basis. You can get an idea of the skills of various artists by browsing the gallery.&#xD;&#xA;&#xD;&#xA;As for pricing, individual sprites and basic animations will tend to run you $50&amp;ndash;$100 apiece, while backgrounds are typically more costly. It really depends on the style you want to go for, but I think high-quality low-spec art is generally more time-consuming (since it is so detail-oriented) and hence costlier than other forms of game art.&#xD;&#xA;&#xD;&#xA;Edit: [Here's](http://www.gamasutra.com/blogs/AdamSaltsman/20090724/2571/Pixel_Art_Freelance_Best_Practices__Guidelines.php) a great article all about the business side of pixel art: when and where to use it, what to expect from it, and how much it costs. All of the art in the article is by [Fool](http://www.pixeljoint.com/p/6741.htm), one of the most (if not the very most) highly skilled and respected pixel artists around.&#xD;&#xA;" />
  <row Id="10686" PostHistoryTypeId="2" PostId="5376" RevisionGUID="fe704f50-8299-4477-ba2b-f07c5212b5ce" CreationDate="2010-11-09T18:06:35.920" UserId="3120" Text="Do we need MAC OS for Ogre Iphone SDK? and Is there any other way for developing iphone game on windows i mean free open source SDK?" />
  <row Id="10687" PostHistoryTypeId="1" PostId="5376" RevisionGUID="fe704f50-8299-4477-ba2b-f07c5212b5ce" CreationDate="2010-11-09T18:06:35.920" UserId="3120" Text="Ogre For iPhone" />
  <row Id="10688" PostHistoryTypeId="3" PostId="5376" RevisionGUID="fe704f50-8299-4477-ba2b-f07c5212b5ce" CreationDate="2010-11-09T18:06:35.920" UserId="3120" Text="&lt;iphone&gt;" />
  <row Id="10689" PostHistoryTypeId="2" PostId="5377" RevisionGUID="7f7a05fe-a13b-48fe-b30b-36cd9b8bf6c8" CreationDate="2010-11-09T18:16:48.317" UserId="1198" Text="Since iPhone code is C/C++/Objective-C you can write the code anywhere. To use the SDK, compiler and debugger, a computer running OSX is required. Per the license agreement this must be an Apple built piece of hardware, although I've heard that hackintosh machines work just fine." />
  <row Id="10690" PostHistoryTypeId="5" PostId="5277" RevisionGUID="14761122-e30c-4437-bd9f-67d2404ed48f" CreationDate="2010-11-09T18:23:07.430" UserId="3020" Comment="added 258 characters in body" Text="&gt; **Possible Duplicate:**  &#xD;&#xA;&gt; [Where can I find good (well organized) examples of game code?](http://gamedev.stackexchange.com/questions/1497/where-can-i-find-good-well-organized-examples-of-game-code)  &#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;I have coded several C++ games and now I'm building my own game engine and editor.&#xD;&#xA;&#xD;&#xA;I have some doubts about the design and I wish to find great examples to follow.&#xD;&#xA;&#xD;&#xA;What is the best designed in your opinion?&#xD;&#xA;&#xD;&#xA;Must be object oriented. Programming language does not matter, but I prefer in this order: C++, C#, Java or another similar.&#xD;&#xA;&#xD;&#xA;**EDITED: To clarify more, I'm not interested on game-specific code. I want general purpose game engines.**&#xD;&#xA;&#xD;&#xA;**EDITED:** This article explains what is a game engine: [game engine at wikipedia](http://en.wikipedia.org/wiki/Game_engine) and here is a list of known game engines: [list of game engines at wikipedia](http://en.wikipedia.org/wiki/List_of_game_engines)" />
  <row Id="10691" PostHistoryTypeId="2" PostId="5378" RevisionGUID="155acba4-2e3d-4419-9b64-754904cb1416" CreationDate="2010-11-09T18:45:03.143" UserId="962" Text="That kind of modeling is strange, and can produce weird illogical results. Especially if the starting planets speed is really slow.&#xD;&#xA;&#xD;&#xA;Model the ships with a thrust power.&#xD;&#xA;&#xD;&#xA;When the ships are on their last orbit on the starting planet, accelerate with full thrust.&#xD;&#xA;&#xD;&#xA;When the ship gets within a certain distance use reverse thrust to slow the ship down to the target planet's orbit speed." />
  <row Id="10692" PostHistoryTypeId="2" PostId="5379" RevisionGUID="af827b80-9914-4a0a-b131-52943dc73801" CreationDate="2010-11-09T19:37:38.740" UserId="1163" Text="If you have played GTA 4, then you have probably been drunk at some stage. This is one of the best intoxicated simulators I have ever seen. It is actually hard or sometimes almost impossible to drive a vehicle while drunk in this game.&#xD;&#xA;&#xD;&#xA;I know that a lot of the things that make up this drunk experience are changes to the controls or having random changes in direction, but how would the camera be done?&#xD;&#xA;&#xD;&#xA;The camera seems to wave in and out and side to side. It also has changing blur, and other effects going on. Would this be some kind of shader? What are the effects that are used on top of each other to create the experience?" />
  <row Id="10693" PostHistoryTypeId="1" PostId="5379" RevisionGUID="af827b80-9914-4a0a-b131-52943dc73801" CreationDate="2010-11-09T19:37:38.740" UserId="1163" Text="How to create the &quot;drunk camera&quot; effect in GTA 4?" />
  <row Id="10694" PostHistoryTypeId="3" PostId="5379" RevisionGUID="af827b80-9914-4a0a-b131-52943dc73801" CreationDate="2010-11-09T19:37:38.740" UserId="1163" Text="&lt;graphics&gt;&lt;graphic-effects&gt;&lt;special-effects&gt;" />
  <row Id="10695" PostHistoryTypeId="2" PostId="5380" RevisionGUID="caa0dd8a-719b-4661-9e3c-00ac84f7bc21" CreationDate="2010-11-09T19:57:10.787" UserId="1780" Text="Oh man this game should be used for drunk driving reeducation, because the one thing that I learned about drinking from this game is that the results suck.&#xD;&#xA;&#xD;&#xA;I think they were doing a couple of things, although I haven't played it since it was new so my memory may be fuzzy.  One big thing you can do is change the FOV.  Then you can swirl the camera location around and maybe even the look-at position.  Finally, to get truly vertigo inducing, you could skew the frustum." />
  <row Id="10696" PostHistoryTypeId="2" PostId="5381" RevisionGUID="bb18d7c1-ce33-496d-bb91-971bd9c6b257" CreationDate="2010-11-09T20:01:24.393" UserId="1024" Text="I'm in the process of debugging GLSL vertex shaders and I can't shake the feeling that I'm doing it wrong. &#xD;&#xA;&#xD;&#xA;In general I have two stragies to make up for the lack of tracing&#xD;&#xA;&#xD;&#xA; - I stuff values into a debug color varying that I pass to the fragment shader to and then try to interpret the colors.&#xD;&#xA; - I change the vertex shader code and see what happens.&#xD;&#xA;&#xD;&#xA;I'm thinking that ideally I could make up for the lack of tracing by writing values to a texture somehow, reading the texture from the GPU and printed the values stuffed in the texture.&#xD;&#xA;&#xD;&#xA;My guess is that there might be way better ways. Any suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10697" PostHistoryTypeId="1" PostId="5381" RevisionGUID="bb18d7c1-ce33-496d-bb91-971bd9c6b257" CreationDate="2010-11-09T20:01:24.393" UserId="1024" Text="Shader Debugging Workflow" />
  <row Id="10698" PostHistoryTypeId="3" PostId="5381" RevisionGUID="bb18d7c1-ce33-496d-bb91-971bd9c6b257" CreationDate="2010-11-09T20:01:24.393" UserId="1024" Text="&lt;shaders&gt;&lt;debug&gt;" />
  <row Id="10699" PostHistoryTypeId="6" PostId="4672" RevisionGUID="82aa951e-0863-4cf5-9009-3621440612e2" CreationDate="2010-11-09T20:47:20.337" UserId="1199" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="10700" PostHistoryTypeId="5" PostId="5378" RevisionGUID="af8a1c89-7d59-4c8b-b43b-3b858560dc3f" CreationDate="2010-11-09T21:00:27.093" UserId="962" Comment="added 196 characters in body" Text="That kind of modeling is strange, and can produce weird illogical results. Especially if the starting planets speed is really slow.&#xD;&#xA;&#xD;&#xA;Model the ships with a thrust power.&#xD;&#xA;&#xD;&#xA;When the ships are on their last orbit on the starting planet, accelerate with full thrust.&#xD;&#xA;&#xD;&#xA;When the ship gets within a certain distance use reverse thrust to slow the ship down to the target planet's orbit speed.&#xD;&#xA;&#xD;&#xA;**Edit: Do the entire simulation at once when a node is about to leave the orbit. either send all the data, or send just a few of movement vectors at intervals, and interpolate between them.**" />
  <row Id="10701" PostHistoryTypeId="2" PostId="5382" RevisionGUID="d843ce00-e877-4ef3-aff1-51fad7c30318" CreationDate="2010-11-09T21:44:13.123" UserId="3162" Text="If I understand it correctly, your problem is over-constrained.&#xD;&#xA;&#xD;&#xA;I believe that you want the spaceship to travel along a specified path between orbits in some time *t*, and you also want it to accelerate from speed *s1* to speed *s2* in the same time *t*. Unfortunately, you can't (in general) find an acceleration that satisfies both of these constraints simultaneously.&#xD;&#xA;&#xD;&#xA;You're going to have to relax your problem a bit to make it solvable." />
  <row Id="10702" PostHistoryTypeId="2" PostId="5383" RevisionGUID="332f5ff3-4d08-44be-ad3b-d8813e395cc1" CreationDate="2010-11-09T23:11:54.213" UserId="1311" Text="Take this example, a player has a sword composed of the handle and a blade. Together, they generate a strength of X and that combination adds qualitative attributes (induce more damage to fire creatures). If the player encounter 2 enemies, both at same defence level, but one is made of fire. Then, I need to calculate the probability of hitting the enemies, knowing that it may be higher for the fire creature.&#xD;&#xA;&#xD;&#xA;Given the example, I need to calculate the:&#xD;&#xA;&#xD;&#xA;- Weapon's strength, by combining different parts?&#xD;&#xA;- Probability of the outcome of an encounter?&#xD;&#xA;- Inclusion of qualitative attributes in the calculation?&#xD;&#xA;&#xD;&#xA;So far, I though of the following and I am not sure if it is good enough. &#xD;&#xA;&#xD;&#xA;- For the weapon, I would associate a value to each component. Then, I would determine that the handle represents 25% of the total strength; allowing me to calculate the total strength&#xD;&#xA;&#xD;&#xA;- The enemy will get a defence value.&#xD;&#xA;&#xD;&#xA;- For the encounter, I would generate a random number between 1 and the (player strength)+(enemy defence). If that number is higher than the enemy's defence, than it's a hit. This means that if they are equal, then it's 50% chance of success.&#xD;&#xA;&#xD;&#xA;- For the physical attributes, if the enemies has a weakness towards an elements, then I would deduct a certain value of he's defence before calculating the probability.&#xD;&#xA;&#xD;&#xA;Is this a viable approach? If not, what would be a suitable implementation? or where can I find more ressources on these kinds of problems." />
  <row Id="10703" PostHistoryTypeId="1" PostId="5383" RevisionGUID="332f5ff3-4d08-44be-ad3b-d8813e395cc1" CreationDate="2010-11-09T23:11:54.213" UserId="1311" Text="Determining the probability of a successful attack based on the equipped weapon?" />
  <row Id="10704" PostHistoryTypeId="3" PostId="5383" RevisionGUID="332f5ff3-4d08-44be-ad3b-d8813e395cc1" CreationDate="2010-11-09T23:11:54.213" UserId="1311" Text="&lt;math&gt;&lt;web&gt;&lt;turn-based-strategy&gt;" />
  <row Id="10705" PostHistoryTypeId="2" PostId="5384" RevisionGUID="7f9b185f-2e62-42c7-95f6-50a29ac00263" CreationDate="2010-11-09T23:25:10.593" UserId="1198" Text="With the proliferation of touch based devices, many lacking a true D-Pad, I'm wondering if anyone has any resources on how to emulate a D-Pad on a touch screen? I'm specifically interested in XNA and/or Android code examples." />
  <row Id="10706" PostHistoryTypeId="1" PostId="5384" RevisionGUID="7f9b185f-2e62-42c7-95f6-50a29ac00263" CreationDate="2010-11-09T23:25:10.593" UserId="1198" Text="Making (or emulating) a &quot;D-Pad&quot; on a touch-screen; virtual d-pad" />
  <row Id="10707" PostHistoryTypeId="3" PostId="5384" RevisionGUID="7f9b185f-2e62-42c7-95f6-50a29ac00263" CreationDate="2010-11-09T23:25:10.593" UserId="1198" Text="&lt;xna&gt;&lt;android&gt;&lt;input&gt;&lt;wp7&gt;&lt;touch&gt;" />
  <row Id="10708" PostHistoryTypeId="2" PostId="5385" RevisionGUID="3f10eaa9-d9cd-4c01-a770-f90e1c2fdde6" CreationDate="2010-11-09T23:36:19.067" UserId="3119" Text="I asked the Team XNA about this a few weeks ago and they told me that currently that will not be available via the XNA Framework.&#xD;&#xA;&#xD;&#xA;I´m sure they´ll open the Kinect development some day, I just don´t think that will be soon." />
  <row Id="10709" PostHistoryTypeId="2" PostId="5386" RevisionGUID="760d4cad-e73b-4b98-a550-7f1f927ab0ff" CreationDate="2010-11-09T23:38:43.260" UserId="3162" Text="Can I discourage you from attempting to emulate a D-pad on a touchscreen device?&#xD;&#xA;&#xD;&#xA;The problems with emulating a D-pad on a touch screen are:&#xD;&#xA;&#xD;&#xA;* the D-pad takes up screen space that you could be using for the game;&#xD;&#xA;* unlike a real D-pad, an emulated D-pad offers almost no feedback: as a player, you can't tell which direction you're pressing in, neither by feel nor by sight (since your finger is covering up the D-pad on the screen). So your finger all too easily slips off the D-pad, or onto the wrong part of it, leading to fumbles and frustration.&#xD;&#xA;&#xD;&#xA;A touchscreen device is much more than a device &quot;lacking a true D-pad&quot;, as you put it. A touchscreen device allows the player to touch *anywhere on the screen* and so *interact with any visible game element*. This gives a wide range of game design possibilities, and these designs are likely to be much more pleasant to use than an emulated D-pad." />
  <row Id="10710" PostHistoryTypeId="2" PostId="5387" RevisionGUID="32a91d74-b979-4d34-b266-0c11b8a77316" CreationDate="2010-11-09T23:47:06.027" UserId="154" Text="I know this isn't the most useful answer, but unless you are porting a project over from another platform, I'd suggest reconsidering on the virtual D-Pad. Most implementations of virtual D-Pads have been poor at best, the lack of tactile feedback make them a poor choice for the platform.&#xD;&#xA;&#xD;&#xA;You are far better off looking at building an interface to your game that highlights the platforms strengths instead of building to the platforms weakness." />
  <row Id="10711" PostHistoryTypeId="2" PostId="5388" RevisionGUID="f8ade7d9-7915-45b3-8b54-a3a363f59558" CreationDate="2010-11-10T00:02:17.070" UserId="3162" Text="Your first question should be, *who is my audience?*&#xD;&#xA;&#xD;&#xA;If you know who's going to be playing this game, then you should be able to work out the appropriate level of complexity for that audience." />
  <row Id="10712" PostHistoryTypeId="2" PostId="5389" RevisionGUID="b5f02b77-3ab9-4b10-ae96-22da6dd378ae" CreationDate="2010-11-10T00:09:49.947" UserId="154" Text="There is no &quot;one-way-to-rule-them-all&quot; to handle combat resolution and damage. The most important thing is that the resolution is understandable by the player. &#xD;&#xA;&#xD;&#xA;In general you want to separate three elements.&#xD;&#xA;&#xD;&#xA; - Chance to Hit&#xD;&#xA; - Damage Applied&#xD;&#xA; - Attack Rate &#xD;&#xA;&#xD;&#xA;This gives you the ability to make a wide range of weapons. &#xD;&#xA;&#xD;&#xA;*Chance to Hit* - tends to be calculated from a combination of player skill (agility or similar), enemy skill (agility/dodge or similar), weapon quality and weapon type. Sometimes elemental matching or magic effects are a part of this calculation.&#xD;&#xA;&#xD;&#xA;*Damage* - tends to include a player skill, weapon type, enemy armor type/quality. Elemental matching or magic effects are often applied at the damage level. So a flaming sword may &quot;hit&quot; a flaming enemy and then do no damage or only do the base damage of the weapon but fail to apply the flaming damage effect. &#xD;&#xA;&#xD;&#xA;*Attack Rate* - tends to be derived primarily from weapon type and player skill&#xD;&#xA;&#xD;&#xA;**Reference**&#xD;&#xA;&#xD;&#xA;If you want some good references go grab a bunch of different D&amp;D style rule books and look at all their combat systems. " />
  <row Id="10713" PostHistoryTypeId="2" PostId="5390" RevisionGUID="5ae96cd3-94b6-49a2-a071-7f8cd81e3730" CreationDate="2010-11-10T00:42:34.523" UserId="154" Text="**What does the job game designer entail?** &#xD;&#xA;&#xD;&#xA;I always explain design to people like this:&#xD;&#xA;&#xD;&#xA;&lt;blockquote&gt;What's the difference between Black Jack and Poker?&lt;/blockquote&gt;&#xD;&#xA;&#xD;&#xA;They both involved players and the same deck of cards, but are entirely different games because the rules that define how the games are played are different. In essence that is what a designer does, writes a series of rules as to how a game plays.&#xD;&#xA;&#xD;&#xA;These days as games get more complicated, the job often includes narrative elements in the areas of story/setting/characters. Although many parts of that are given to people dedicated to writing and not design.&#xD;&#xA;&#xD;&#xA;Design is a pretty broad term in the industry and it covers everything from high level system design (rules) to narrative design (story/character) to level design (the placing of assets and scripting)&#xD;&#xA;&#xD;&#xA;**What tools do you have to learn how to use?** &#xD;&#xA;&#xD;&#xA;Getting a job directly as a designer is hard. Many of us came from either Programming or Art backgrounds or in my case both. On smaller teams, it'll be expected that you can do something other than design full time as well. The tools change depending on the type of design you are doing.&#xD;&#xA;&#xD;&#xA;*System designer/Creative Director* - Most time spent in Excel, Word, and Powerpoint. &#xD;&#xA;&#xD;&#xA;*Narrative designer* - Word, maybe Final Draft. These guys are mostly writers.&#xD;&#xA;&#xD;&#xA;*Level Designers* - Excel, custom level design software or common 3rd party tools (UnrealEd, and so on) Typically should be comfortable navigating the popular 3D-art packages (Max/Maya)&#xD;&#xA;&#xD;&#xA;**What unique skills do you need?** &#xD;&#xA;&#xD;&#xA;Communication, both writing and verbal is probably your most often used skill once you get to the higher levels of design. Coming up with a design is a pretty small part of the job. You spend most of the time communicating how to build that design to the rest of the team.&#xD;&#xA;&#xD;&#xA;Critical thinking, ability to break down a problem into a series of small discrete steps. It's not enough to play a bunch of games. You need to be able to clearly understand how the parts of those game work together. When/why the combine and work, and why the can fail when combined.&#xD;&#xA;&#xD;&#xA;Level designers benefit from an art background. An understanding of composition and architecture both help.&#xD;&#xA;&#xD;&#xA;A basic psychology understanding is also helpful for designers. The more you understand about how and why people respond to stimulus the better your can predict their response to future designs. " />
  <row Id="10714" PostHistoryTypeId="5" PostId="5381" RevisionGUID="5f6885c9-9bb5-4e83-8c72-65bef101c2f0" CreationDate="2010-11-10T01:32:59.357" UserId="1024" Comment="deleted 3 characters in body" Text="I'm in the process of debugging GLSL vertex shaders and I can't shake the feeling that I'm doing it wrong. &#xD;&#xA;&#xD;&#xA;In general I have two stragies to make up for the lack of tracing&#xD;&#xA;&#xD;&#xA; - I stuff values into a debug color varying that I pass to the fragment shader and then try to interpret the colors.&#xD;&#xA; - I change the vertex shader code and see what happens.&#xD;&#xA;&#xD;&#xA;I'm thinking that ideally I could make up for the lack of tracing by writing values to a texture somehow, reading the texture from the GPU and printed the values stuffed in the texture.&#xD;&#xA;&#xD;&#xA;My guess is that there might be way better ways. Any suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10715" PostHistoryTypeId="2" PostId="5391" RevisionGUID="b085fba5-6cc0-472c-82fa-90d40bfa5043" CreationDate="2010-11-10T02:31:05.137" UserId="3198" Text="It's worth noting that designer is an overhead position. Meaning, it's not completely necessary to have a person dedicated to design when making a game.&#xD;&#xA;&#xD;&#xA;People who make games, programmers and artist, they have some idea of the design of the game, the team designs the game that they want to make.&#xD;&#xA;&#xD;&#xA;Only when the project is large enough that design becomes a burden is a designer really needed(usually).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That being said, the designer is the one who manages, not controls, the design of the game. What ideas work, how to implement certain features. They work with the programmers and artists to figure out what works, what can be done, what it feasible and then they put it all together so that everyone can get in on it and get it done." />
  <row Id="10716" PostHistoryTypeId="2" PostId="5392" RevisionGUID="e988b14c-c70e-4491-b704-180deab4c0e3" CreationDate="2010-11-10T02:37:17.393" UserId="3198" Text="Like the others have said, it's best to come up with a design that fits the environment, not force the environment to fit your design, but if you do stick with the D-Pad, here's how you might do it:&#xD;&#xA;&#xD;&#xA;If you think of the &quot;touch point&quot; as a mouse cursor, you are basically create a &quot;hot spot&quot; that reacts to the cursor movement.&#xD;&#xA;&#xD;&#xA;The best/simplest way to do it I think is to make a semi-transparent(remember, you are covering the game screen) box or circle in one of the bottom corners, where the player is most likely to have their finger already. Then you just track the position of the player's finger relative to the center of the hot spot, and that's your input delta value." />
  <row Id="10717" PostHistoryTypeId="5" PostId="5373" RevisionGUID="15a51c06-7554-4e8b-8a0a-ff6b35c74ec5" CreationDate="2010-11-10T02:45:20.197" UserId="1713" Comment="added 781 characters in body" Text="OK, I already posted this over at math.stackechange.com but didn't get any answers :(&#xD;&#xA;&#xD;&#xA;First of here's a picture of my problem, the description follows afterwards:  &#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;So I got all the points and values set up.&#xD;&#xA;&#xD;&#xA;The ship starts out moving around the left planet `P1` with `S=0.27 Degrees` per gametick, when it reaches `Point A` it starts following the bezier curve till it reaches `Point D`, then it travels around the right planet `P2` with `S=0.42 Degrees` per game tick. The difference in `S` is so that the travel with the same movement speed around the planets.&#xD;&#xA;&#xD;&#xA;So far so good, I got that up and running, now my problem.&#xD;&#xA;&#xD;&#xA;When `S P1` and `S P2` differ to much, the ship jumps between the two speeds when it reaches it's destination, which looks pretty bad. So I need to accelerate the ship between `Point A` and `Point D` from `S P1` to `S P2`.&#xD;&#xA;&#xD;&#xA;The thing I'm missing are in purple, those are:  &#xD;&#xA;&#xD;&#xA; - A way to calculate the ticks it takes the ship to move along the bezier considering the acceleration.&#xD;&#xA;&#xD;&#xA; - And a way to find a position on the bezier curve based on T, again considering the acceleration.&#xD;&#xA;&#xD;&#xA;ATM I calculate the length of the bezier by calculating the distance between `N` of its points. So what I *think* I need, is a way to scale the `T` I need to put into my bezier calculation accordingly to the acceleration.&#xD;&#xA;&#xD;&#xA;PS: Although I'm no that deep into the math, I do not expect to be presented with ready to ship code, but I also do not expect to be pointed at pages and pages of mathematical symbols, because that won' help me in anyway. I already spent like 5 hours trying to figure the thing out on my own.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit** &#xD;&#xA;OK, after *some* (read 5) more hours of googling and finding big [PDFs][2] about arc-length parameterization, I finally found a [site][3] with a more code based approach on the whole thing(and it has nice pictures too!).&#xD;&#xA;&#xD;&#xA;After reading the article, I got everthing implemented in just about 10 minutes:  &#xD;&#xA;https://gist.github.com/670236&#xD;&#xA;&#xD;&#xA;So now I'm able to map 0..1 onto what one would actually expect geometrically:  &#xD;&#xA;&#xD;&#xA;![alt text][4]&#xD;&#xA;&#xD;&#xA;Next step is to map the speed onto 0...1 and there you go, I guess gonna update the question again when everything is working.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/hXQea.png&#xD;&#xA;  [2]: http://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf&#xD;&#xA;  [3]: http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;  [4]: http://i.stack.imgur.com/CfhLZ.png" />
  <row Id="10718" PostHistoryTypeId="2" PostId="5393" RevisionGUID="636393da-c414-4cc2-aba4-e58a2fda6d5f" CreationDate="2010-11-10T03:23:00.223" UserId="3199" Text="I have a png which is mostly transparent, except for a shape I've drawn in white. I want to be able to blend this bitmap with a color when drawing it with Canvas. I'd like something like [Sa, (Dc * (1 - Sa)) + (Sc * C * Sa)], where C would be the color I want to blend with. I assumed I would just set the paint color to C, then call drawBitmap, but the default behavior doesn't seem to be blending.&#xD;&#xA;&#xD;&#xA;Is this the right approach? Are there some Xfer codes I'm missing? Can I create a custom shader to do this? Is there an example in the android sdk api I missed that does this?&#xD;&#xA;&#xD;&#xA;As an additional constraint, I should mention I want to avoid just creating a new bitmap with the blended color to use. The color C (above) could change every frame, and I don't want to have to generate 100's of these bitmaps for every color that I might need." />
  <row Id="10719" PostHistoryTypeId="1" PostId="5393" RevisionGUID="636393da-c414-4cc2-aba4-e58a2fda6d5f" CreationDate="2010-11-10T03:23:00.223" UserId="3199" Text="How do I blend a bitmap with a color?" />
  <row Id="10720" PostHistoryTypeId="3" PostId="5393" RevisionGUID="636393da-c414-4cc2-aba4-e58a2fda6d5f" CreationDate="2010-11-10T03:23:00.223" UserId="3199" Text="&lt;android&gt;" />
  <row Id="10721" PostHistoryTypeId="2" PostId="5394" RevisionGUID="a1c5401a-fdd6-4ac3-ae3f-50060b4106ec" CreationDate="2010-11-10T03:29:58.737" UserId="189" Text="    Paint p = new Paint(Color.RED);&#xD;&#xA;    ColorFilter filter = new LightingColorFilter(Color.RED, 1);&#xD;&#xA;    p.setColorFilter(filter);&#xD;&#xA;Then draw with that `Paint` object.&#xD;&#xA;&#xD;&#xA;Found at [&quot;How do you tint a bitmap in Android?&quot;][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3499095/how-do-you-tint-a-bitmap-in-android" />
  <row Id="10722" PostHistoryTypeId="2" PostId="5395" RevisionGUID="e270e599-95a6-4dec-89d9-d06cdfc5ecd6" CreationDate="2010-11-10T03:33:38.063" UserId="3119" Text="If you want to implement a D-Pad, the easiest way that comes to my head is to create four rectangles (one for each direction of the D-Pad) and then check if the touch location is within the bounds of any of the rectangles.&#xD;&#xA;&#xD;&#xA;As the other guys said; think twice before implementing a D-Pad on a touch screen. On the other hand I´ve seen people playing those GBA emulators all day on their iPhones. &#xD;&#xA;&#xD;&#xA;It´s up to you ... can you tell us what are you planning to do that involves a simulated D-Pad?" />
  <row Id="10723" PostHistoryTypeId="2" PostId="5396" RevisionGUID="a9072ef7-f74d-4965-b56a-763477b460a8" CreationDate="2010-11-10T06:27:13.267" UserDisplayName="shadowprotocol" Text="I'm thinking of picking up the book Killer Game Programming by Andrew Davidson, but its pretty old now. I know Java, and I've been messing with jMonkeyEngine for a few days now, but I'm curious to see if people would think I would benefit from starting from the 3D chapters of this book and working my way through them, having ? &#xD;&#xA;&#xD;&#xA;How is the source code? Has Java changed to the point where this book is now obsolete? Will I have my hand held through most of it, or is it just concepts? &#xD;&#xA;&#xD;&#xA;The chapters at the end of the book that seem to explain how to take all the 3D drawing in a scene graph you learned and then applying it to the creation of a client/server and having multiple avatars move around in this 3D world seems amazing to me, but I fear it may just be book marketing and that there isnt full source code in the book.&#xD;&#xA;&#xD;&#xA;If you definitely think I shouldn't get this book, can you post references/tutorials/books to other sources you recommend for 3D game programming? &#xD;&#xA;Maybe theres a website that runs through full tutorials on game building with LWJGL or something. &#xD;&#xA;&#xD;&#xA;Thanks so much! " />
  <row Id="10724" PostHistoryTypeId="1" PostId="5396" RevisionGUID="a9072ef7-f74d-4965-b56a-763477b460a8" CreationDate="2010-11-10T06:27:13.267" UserDisplayName="shadowprotocol" Text="Killer Game Programming [Java 3D] outdated?" />
  <row Id="10725" PostHistoryTypeId="3" PostId="5396" RevisionGUID="a9072ef7-f74d-4965-b56a-763477b460a8" CreationDate="2010-11-10T06:27:13.267" UserDisplayName="shadowprotocol" Text="&lt;3d&gt;&lt;programming&gt;&lt;java&gt;&lt;books&gt;" />
  <row Id="10726" PostHistoryTypeId="2" PostId="5397" RevisionGUID="e1b117d8-0fcc-4faf-9580-ce317b5d902d" CreationDate="2010-11-10T06:51:27.897" UserId="1251" Text="&gt; Has Java changed to the point where&#xD;&#xA;&gt; this book is now obsolete?&#xD;&#xA;&#xD;&#xA;Never, apart from few changes in the JDK, it is nowhere near the word &quot;obsolete&quot;.&#xD;&#xA;&#xD;&#xA;IMHO, its always better if you know about the old technology and how it evolved well in hand before you start learning the new technology." />
  <row Id="10727" PostHistoryTypeId="2" PostId="5398" RevisionGUID="2fbe9519-2d79-4ec1-85c8-9c34d3a14ad4" CreationDate="2010-11-10T08:29:09.080" UserId="744" Text="A friend of mine has used &lt;a href=&quot;http://www.vis.uni-stuttgart.de/glsldevil/&quot;&gt;glslDevil&lt;/a&gt; for this, and said it was okay.&#xD;&#xA;&#xD;&#xA;If you're not tied to GLSL, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ee417062%28v=VS.85%29.aspx&quot;&gt;Microsoft has an incredible tool for DirectX called PIX&lt;/a&gt;, but I don't think there's anything equivalent for OpenGL." />
  <row Id="10728" PostHistoryTypeId="4" PostId="5381" RevisionGUID="286143cc-bf4a-4ba5-8ca3-c0e37130b805" CreationDate="2010-11-10T08:32:15.850" UserId="744" Comment="edited title" Text="How can I debug shader programs?" />
  <row Id="10729" PostHistoryTypeId="2" PostId="5399" RevisionGUID="ac8a3fb2-961b-42dc-b578-f3de4bc803e9" CreationDate="2010-11-10T09:02:41.850" UserId="1859" Text="My take on it:&#xD;&#xA;&#xD;&#xA; - The **model** is where most data lies and all logic takes place.&lt;br /&gt;&#xD;&#xA;It reads a queue of input events, and modifies the game state accordingly.&lt;br /&gt;&#xD;&#xA;It then processes stuff like physics and other core components that also update the game state.&lt;br /&gt;&#xD;&#xA;Loop. That's all.&lt;br /&gt;&#xD;&#xA;The goal is to make the model independant: it doesn't have any dependency on view or controller stuff: you should be able to make a program that only runs a model.&#xD;&#xA; - The **view** simply reads the model's game state, updates its own components dedicated to the representation of the data, and display things on the screen.&lt;br /&gt;&#xD;&#xA;It never writes anything on the model, it's a read-only process, except maybe the registration of some event handler (like &quot;Hey Mister Model, when you detect a collision between those two objects, please call my event handler that plays a sound!&quot;).&#xD;&#xA; - The **controller** catches input events and passes them to the model's input queue. It reads the view (did this button click happen on a UI button?).&#xD;&#xA;&#xD;&#xA;That way you can plug a fake controller that reads a file that contains pre-recorded input events.&lt;br /&gt;&#xD;&#xA;Also make a simple view that just logs things on a file.&lt;br /&gt;&#xD;&#xA;Very usefull for testing and debugging.&#xD;&#xA;&#xD;&#xA;Remember to make the model update at a constant rate (fixed time step), and the view and controller as fast as possible (but not too much variable)." />
  <row Id="10730" PostHistoryTypeId="2" PostId="5400" RevisionGUID="997c2b45-b9df-4a8d-b341-a34d4c6f069a" CreationDate="2010-11-10T09:06:27.187" UserId="1352" Text="nVidia has an awesome shader debugger. You can find it, and it's specs, [HERE][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/nv_shader_debugger_home.html" />
  <row Id="10731" PostHistoryTypeId="2" PostId="5401" RevisionGUID="aec49477-f3d2-49ad-9926-3064300cfa8f" CreationDate="2010-11-10T10:32:34.420" UserId="2071" Text="There is an XNA sample of touch thumbsticks [here][1]&#xD;&#xA;&#xD;&#xA;I would reiterate that a dpad is unlikely to be the right interface for a touch screen like device.&#xD;&#xA;&#xD;&#xA;Something like what epic has done with Infinity Blade for the iPhone may give you inspiration [Movie Link][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/sample/touchthumbsticks&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=JDvPIhCd8N4" />
  <row Id="10732" PostHistoryTypeId="5" PostId="5369" RevisionGUID="fb3c1e70-1407-4116-ade3-6ee9c7a77758" CreationDate="2010-11-10T11:44:16.127" UserId="3162" Comment="update to reflect comments" Text="&lt;s&gt;Hardly anyone&lt;/s&gt; A select few (see comments) do *game design* full time: but more typically game design is only part of a job. Some designers are also *producers*: they manage the personnel, schedules, budgets, and contracts of the games they design. Others combine game design with *development* (programming, art, audio, etc).&#xD;&#xA;&#xD;&#xA;So if you want to do game design as a career, you should become expert at a related skill and find some way to move into design. There are different career paths: for example, you might join a big company, demonstrate your design talents, and move up into design. Or you might join a small company (or start your own) where everyone has to do a bit of everything by necessity.&#xD;&#xA;&#xD;&#xA;The key skills, in my opinion, of being a game designer, are:&#xD;&#xA;&#xD;&#xA;* A wide knowledge of games of a lot of different types, so that you have a lot of background to draw on for solutions to problems (&quot;Our game has become unbalanced because it's too easy to accumulate health, but I remember how they solved that problem in *Foobar RPG VII*, they gave you the option to exchange health for experience, which created an interesting trade-off...&quot;)&#xD;&#xA;* The analytical skills to be able to determine *why* games have particular qualities. (&quot;Even though they have very similar gameplay, *Ico* creates a much more effective sense of peril than *Prince of Persia* because ...&quot; [Well, I won't spoil it for you: let's say it's an exercise for the reader!])&#xD;&#xA;* The communication skills to explain to artists, programmers, level designers and other developers how to achieve the effects you want. Big projects need big game design documents and you are going to want to write good ones. (&quot;We need to give the player enough warning of the attack that they have a chance to establish their guard, so the boss attack sequence needs to have a distinctive motion at least 1 second before the damage is dealt. Also, we need to arrange the camera angle so that this signal is visible.&quot;)&#xD;&#xA;* The discipline to realise that *you* are not the only person the game is aimed at (or even necessarily part of the target audience at all), and that your own intuitions about what is fun are not an infallible guide. You have to be able to look at data from real players in the market you are aiming to reach. (&quot;In the office, we all loved the hyper-death-mode, but when we tried it out, we found that 72% of beginners turned off the game in disgust when they were killed after 30 seconds and all their equipment was stolen.&quot;)&#xD;&#xA;* An awareness of your own limitations as a designer. Perhaps you know everything there is to know about balancing unit types for a turn-based strategy game, but you wouldn't know where to start when it comes to a racing game. Better to be humble than make a bad game!" />
  <row Id="10733" PostHistoryTypeId="2" PostId="5402" RevisionGUID="fabf70d5-5882-42b3-b8b0-18aeb2754ebf" CreationDate="2010-11-10T13:30:26.447" UserId="1871" Text="I'm working in a free MMORPG and I have a problem.&#xD;&#xA;&#xD;&#xA;I'm (with other people) developing a video recording system for the game. The idea is basically: we record all the packages sent &amp; received with timestamps, plus some local data from the client, and then dump it in a file. For playing the video, we just emulate everything that's on the file. We also have an option to export the video to avi with ffmpeg.&#xD;&#xA;&#xD;&#xA;The problem is: when we change between versions of the game, it is hard to maintain backwards compatibility for the video (commands added / removed, function changes, etc). Is there a good way to handle this problem? instead of having a bunch of different players and choose the right one for each version of the video file?&#xD;&#xA;&#xD;&#xA;It would be helpful to know how does other games handle this situation. &#xD;&#xA;&#xD;&#xA;Thanks for the help, sorry for my english." />
  <row Id="10734" PostHistoryTypeId="1" PostId="5402" RevisionGUID="fabf70d5-5882-42b3-b8b0-18aeb2754ebf" CreationDate="2010-11-10T13:30:26.447" UserId="1871" Text="Video Recording - Backwards Compatibility [MMORPG]" />
  <row Id="10735" PostHistoryTypeId="3" PostId="5402" RevisionGUID="fabf70d5-5882-42b3-b8b0-18aeb2754ebf" CreationDate="2010-11-10T13:30:26.447" UserId="1871" Text="&lt;mmo&gt;&lt;multiplayer&gt;&lt;video&gt;" />
  <row Id="10736" PostHistoryTypeId="2" PostId="5403" RevisionGUID="a1795714-3e96-49f0-875a-38b0767ac35d" CreationDate="2010-11-10T13:37:26.797" UserId="3212" Text="Is it possible by nay means to have a game developed for iPhone using the iPhone sdk on Windows?" />
  <row Id="10737" PostHistoryTypeId="1" PostId="5403" RevisionGUID="a1795714-3e96-49f0-875a-38b0767ac35d" CreationDate="2010-11-10T13:37:26.797" UserId="3212" Text="Can we develop a game for iPhone on Windows platform?" />
  <row Id="10738" PostHistoryTypeId="3" PostId="5403" RevisionGUID="a1795714-3e96-49f0-875a-38b0767ac35d" CreationDate="2010-11-10T13:37:26.797" UserId="3212" Text="&lt;iphone&gt;" />
  <row Id="10739" PostHistoryTypeId="2" PostId="5404" RevisionGUID="b662ec28-8205-45ea-be1f-22d558b81fc2" CreationDate="2010-11-10T13:42:40.543" UserId="189" Text="Though it is against Apple's policy, you can install OS X into a virtual machine and develop an app that way. And if you can manage it, you technically *can* write the code and such on a Windows machine; it is, of course, only text. But the compiler, SDK, etc. is completely OS X-only.&#xD;&#xA;&#xD;&#xA;You can also look into other ways to make iPhone games, such as the Unity engine, or Flash (I know at one point they compiled to iPhone games, I think they have since discontinued that)" />
  <row Id="10740" PostHistoryTypeId="2" PostId="5405" RevisionGUID="aa9d0c9b-1f6b-41ae-8387-a33e4a81559b" CreationDate="2010-11-10T13:50:51.423" UserId="3162" Text="See [this question][1] on stackoverflow.com.&#xD;&#xA;&#xD;&#xA;Even if there's some way to do it with virtual machines, jailbroken phones and so on, I can't believe the hassle would be worth it. The time you spend dealing with all the issues is time that you won't have to improve the game.&#xD;&#xA;&#xD;&#xA;If you're using a cross-platform development environment like [Unity][2], you'll be able to do most of the development on Windows, but you'll still need a Mac in order to deploy to the phone for testing or release. (And testing on the device is vital: a finger on a touch screen is not like a mouse pointer on a window.)&#xD;&#xA;&#xD;&#xA;It's not as if you need a powerful machine to develop an iPhone game: a Mac Mini for $699 will do just fine.&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/113547/iphone-development-on-windows&#xD;&#xA;  [2]: http://unity3d.com/" />
  <row Id="10741" PostHistoryTypeId="5" PostId="5403" RevisionGUID="f5b686ff-1e17-423c-9ed1-7c7274853702" CreationDate="2010-11-10T14:02:18.473" UserId="189" Comment="Fixed the word &quot;nay&quot; =&gt; &quot;any&quot;. It was bugging me." Text="Is it possible by any means to have a game developed for iPhone using the iPhone sdk on Windows?" />
  <row Id="10742" PostHistoryTypeId="2" PostId="5406" RevisionGUID="4746285b-6d52-4d51-8196-39b5fdbccd79" CreationDate="2010-11-10T14:07:31.277" UserId="3162" Text="I think you need to start with the questions, *who am I making this game for?* and *what kind of experience do I want my players to have?*&#xD;&#xA;&#xD;&#xA;* Are you trying to make a realistic simulation of mêlée combat or something that's unrealistic but fun?&#xD;&#xA;* Are you making a game for a broad or &quot;casual&quot; market, or for hard-core gamers?&#xD;&#xA;* Are you trying to create strategically interesting player-vs-player combat?&#xD;&#xA;* Are you making something for people who like to study a system of rules in detail, or for people who are probably just going to run around and mash on the X button?&#xD;&#xA;&#xD;&#xA;Only once you know the answers to these questions, can you start to figure out what kinds of solutions will be appropriate." />
  <row Id="10743" PostHistoryTypeId="5" PostId="5406" RevisionGUID="2c69a712-2ef6-42cc-94d9-e37d4d08c5a0" CreationDate="2010-11-10T14:13:45.357" UserId="3162" Comment="added 34 characters in body; added 93 characters in body" Text="I think you need to start with the questions, *who am I making this game for?* and *what kind of experience do I want my players to have?*&#xD;&#xA;&#xD;&#xA;* Is this an online game or not?&#xD;&#xA;* Are you trying to make a realistic simulation of mêlée combat or something that's unrealistic but fun?&#xD;&#xA;* Are you making a game for a broad or &quot;casual&quot; market, or for hard-core gamers?&#xD;&#xA;* Are you trying to create strategically interesting player-vs-player combat?&#xD;&#xA;* Are you making something for people who like to study a system of rules in detail, or for people who are probably just going to run around and mash on the X button?&#xD;&#xA;* Why do you need combat to be probabilistic? What would go wrong if it were deterministic?&#xD;&#xA;&#xD;&#xA;Only once you know the answers to these questions, can you start to figure out what kinds of solutions will be appropriate." />
  <row Id="10744" PostHistoryTypeId="2" PostId="5407" RevisionGUID="53db1f07-d093-458b-a24f-df56e6b325f0" CreationDate="2010-11-10T14:27:47.227" UserId="853" Text="So, I've been a programmer for 3 years and am finishing up my first graduate semester. I want to get into independent software( mostly mobile ) development with a interest in game development. &#xD;&#xA;&#xD;&#xA;The university I go to does research in software development but not computer graphics, but they do offer  courses in computer graphics and advanced computer graphics. I took the first computer graphics class this semester. &#xD;&#xA;&#xD;&#xA;We used very little OpenGL. We have had 4 main projects where we have implemented the algorithms behind anti-aliasing, clipping, polygon filling, implementing our own transformations( replacing glRotate/Scale/Translate ), and phong lighting equation. From talking to a friend, he says it sounds like a good course.&#xD;&#xA;&#xD;&#xA;I have a choice to make next semester, take software design or advanced computer graphics. I've talked to the professor teaching the advanced computer graphics class and he says we are going to be implementing the algorithms our selfs again, but it is focused on more ray-tracing type algorithms. I'm not sure how this class could help me in the realm of game development. &#xD;&#xA;&#xD;&#xA;Now, the software design class I feel I could really use. I only took one class on software engineering in my undergrad and I have the possibility to do research in software engineering if choose to. I have found my self when working on my own iPhone apps in the past of hating some of the code I wrote. I did some design but just to get things going. I know that I need to do better at software design if I'm going to be a successful software developer. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, I know I need both but I guess what would be more useful taking at a university? Which ever one I don't take I probably will try to teach myself in my own time. I'm kind of leaning towards Software Design just so I can see how it's really suppose to be done. Where as the advanced computer graphics algorithms aren't subjective in any way and just need to be implemented.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;FYI: I won't be able to take the other class in the future as both of these classes are only offered once every 2-3 years.&#xD;&#xA;&#xD;&#xA;Description on each class&#xD;&#xA;&#xD;&#xA;Advanced Graphics:&#xD;&#xA;Realistic, three-dimensional image generation;modeling techniques for complex three-dimensional scences; advanced illumination techniques;fractual surface modeling; modeling and rendering of natural phenomena.&#xD;&#xA;&#xD;&#xA;Software Design:&#xD;&#xA;Software design principles, attributes, models, and methodologies; object-oriented designs; real-time system design;user interface design;design verification; reusability issues;tools;current issues.&#xD;&#xA;" />
  <row Id="10745" PostHistoryTypeId="1" PostId="5407" RevisionGUID="53db1f07-d093-458b-a24f-df56e6b325f0" CreationDate="2010-11-10T14:27:47.227" UserId="853" Text="Software Design or Advanced Computer Graphics for Game Dev Wannabe" />
  <row Id="10746" PostHistoryTypeId="3" PostId="5407" RevisionGUID="53db1f07-d093-458b-a24f-df56e6b325f0" CreationDate="2010-11-10T14:27:47.227" UserId="853" Text="&lt;education&gt;" />
  <row Id="10747" PostHistoryTypeId="2" PostId="5408" RevisionGUID="777c3460-3373-43d9-9ca6-f15321515db6" CreationDate="2010-11-10T15:17:11.407" UserId="953" Text="Since you're most interested in the software design class, take it.  Those tasks are universal, and the &quot;advanced graphics&quot; description seems a bit more targeted at pre-rendered rather than real-time (gaming) graphics.  If you've got the cash, though, you might want to pick up the textbook for the advanced graphics course while it's in the bookstore; it could serve as a good reference and learning tool on its own." />
  <row Id="10748" PostHistoryTypeId="2" PostId="5409" RevisionGUID="bc2b0eef-f1d3-404c-a69e-89abc3316912" CreationDate="2010-11-10T15:20:12.323" UserId="2316" Text="You may want to learn [javascript][1] and [webgl][2] instead.  Combined with HTML5 that will allow you to develop platform-independent games for mobile and computer.&#xD;&#xA;&#xD;&#xA;It doesn't really answer your question, but it might be better for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://benfirshman.com/projects/jsnes/&#xD;&#xA;  [2]: http://www.khronos.org/webgl/" />
  <row Id="10749" PostHistoryTypeId="2" PostId="5410" RevisionGUID="1df1477a-fa89-4196-a817-6afc6c47f401" CreationDate="2010-11-10T15:29:10.830" UserId="962" Text="##Definitely go with the Software Design course.##&#xD;&#xA;&#xD;&#xA;The Advanced Graphics course is a class on advanced ray traced graphics which are more suited to pre-rendered 3d graphics.&#xD;&#xA;&#xD;&#xA;You also said you were not happy with your programming skill, and the Software Design course would help you increase your skills much more than the Graphics course." />
  <row Id="10750" PostHistoryTypeId="5" PostId="5400" RevisionGUID="a391d7c1-b64c-4776-8bf6-ff5ff4bb99e7" CreationDate="2010-11-10T15:34:29.510" UserId="1352" Comment="deleted 1 characters in body" Text="nVidia has an awesome shader debugger. You can find it, and its specs, [HERE][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/nv_shader_debugger_home.html" />
  <row Id="10751" PostHistoryTypeId="2" PostId="5411" RevisionGUID="1dcf3752-6bae-4ed5-93de-a8ac67152b03" CreationDate="2010-11-10T15:40:45.197" UserId="3214" Text="I've actually already made a small game with JavaScript and HTML5, and not interested in continuing that right now, thanks for suggestion though!&#xD;&#xA;&#xD;&#xA;Found another book on 3D, but it is also old: http://www.amazon.com/Developing-Games-Java-David-Brackeen/dp/1592730051 &#xD;&#xA;Developing Games in Java by David Brackeen.  I heard the book is a fantastic learning source but the source code has no comments (the book should do the explaining anyways).&#xD;&#xA;&#xD;&#xA;While it seems like a decent read, I think I'd probably be better off picking up LWJGL and finding some tutorials specifically geared towards LWJGL, or sticking with jMonkeyEngine, although everything is abstracted from me (which is a good thing I suppose), but while I'm learning I'd like to know what's REALLY going on under the hood.&#xD;&#xA;&#xD;&#xA;Your thoughts?&#xD;&#xA;&#xD;&#xA;[hmm I should create an account so I get to keep these reputation points eh?]" />
  <row Id="10752" PostHistoryTypeId="2" PostId="5412" RevisionGUID="67958981-6097-4bb0-bd47-120648974406" CreationDate="2010-11-10T15:58:22.797" UserId="3212" Text="So now that the restrictions are lifted from the third party developer by Apple. And the new packager for iPhone for Flash in CS5 is available for download. How much efficient it can be to develop a game in Flash for iPhone. How much worth it can be to invest time in developing games on Flash? anybody started working on game development on Flash for iPhone can help a lot.     " />
  <row Id="10753" PostHistoryTypeId="1" PostId="5412" RevisionGUID="67958981-6097-4bb0-bd47-120648974406" CreationDate="2010-11-10T15:58:22.797" UserId="3212" Text="Using Flash in CS5 for Game Development" />
  <row Id="10754" PostHistoryTypeId="3" PostId="5412" RevisionGUID="67958981-6097-4bb0-bd47-120648974406" CreationDate="2010-11-10T15:58:22.797" UserId="3212" Text="&lt;iphone&gt;&lt;flash&gt;" />
  <row Id="10755" PostHistoryTypeId="2" PostId="5413" RevisionGUID="be4d017e-b64b-4539-b65d-77884f659d78" CreationDate="2010-11-10T16:05:02.127" UserId="2316" Text="Unless you're interested in designing *new* game graphics, a ton of work has already been done by the wonderful people at [Unity][1] and [Cocos2d][2].&#xD;&#xA;&#xD;&#xA;As I'm currently in a Software Engineering class, I can tell you it teaches you how to be a better designer and programmer, think &quot;meta&quot; about your program and design it better.&#xD;&#xA;&#xD;&#xA;Graphics is just a tool library, and unless you're going into high-performance graphics rendering, you can just harness the hard work of others.  I've self-taught both OpenGL and cocos2d over the past year, but I don't think I could have self-taught Design (or at least, been motivated enough to learn on my own).&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/" />
  <row Id="10756" PostHistoryTypeId="2" PostId="5414" RevisionGUID="59d43653-dac3-4f0a-bfca-fe0d89ee86d5" CreationDate="2010-11-10T16:16:29.273" UserId="853" Text="I'm curious to know the workflow when creating a game in Unity3D? &#xD;&#xA;&#xD;&#xA;Does it generate a lot of code for you?&#xD;&#xA;&#xD;&#xA;My understanding is that you describe the game in Unity and do scripting on the back end to do the logic. Kind of like you use Unity to describe the puppets and you use a scripting language as the puppet master." />
  <row Id="10757" PostHistoryTypeId="1" PostId="5414" RevisionGUID="59d43653-dac3-4f0a-bfca-fe0d89ee86d5" CreationDate="2010-11-10T16:16:29.273" UserId="853" Text="Unity3D, how much code do you write?" />
  <row Id="10758" PostHistoryTypeId="3" PostId="5414" RevisionGUID="59d43653-dac3-4f0a-bfca-fe0d89ee86d5" CreationDate="2010-11-10T16:16:29.273" UserId="853" Text="&lt;unity&gt;" />
  <row Id="10760" PostHistoryTypeId="2" PostId="5416" RevisionGUID="12adfe0e-06ec-4170-8cb8-6235ade41db0" CreationDate="2010-11-10T16:31:19.187" UserId="2132" Text="Unity3D is more of a wrapper/library than a 'drag and drop' game engine. It doesn't generate code nor does it come with 'off-the-shelf' scripts. &#xD;&#xA;&#xD;&#xA;For example, Unreal has a default first person camera, character controller, collision detection and AI. &#xD;&#xA;&#xD;&#xA;You have none of that in Unity3D. What you get from Unity3D is a game loop, component-based entity system, a comprehensive math library, means to load media, handling of meshes, camera, immediate mode GUI, shaders, rendering pipeline and other low level functionality. Plus a nice editor. You just have to worry about high level functionality. For example, you still have to code your own first person camera (if you are not using the default one). However, you do not need to deal with calculating the look-at vectors and such.&#xD;&#xA;&#xD;&#xA;Unity3D doesn't generate any code for your game, strictly (It does generate code for running your game, to be more accurate, but none for your gameplay)&#xD;&#xA;&#xD;&#xA;You will have to use the API to define your game. You can look at the examples that come with Unity3D and re-uses those code; there are a couple of pre-defined scripts, but usually you have to customize those to meet your needs.&#xD;&#xA;&#xD;&#xA;You create the game through scripting; you write scripts for behaviours, design the level in Unity3D, and assign those behaviours to entities (or game-objects). It's very flexible, but it still requires effort to write a game. I would compare it to Flash for 3D." />
  <row Id="10761" PostHistoryTypeId="2" PostId="5417" RevisionGUID="810380b6-ea27-4584-b6fd-7195ffeeb3e7" CreationDate="2010-11-10T16:32:38.613" UserId="3162" Text="Unity3D consists of a game engine plus a (fairly rudimentary) 3D editor. It provides meshes, textures, shaders, terrain, cameras, animations, particle systems, audio samples, and other kinds of object that are useful in video games. It includes [PHYSX][1] (a proprietary physics engine owned by Nvidia), and [Mono][2] (the open source implementation of the Common Language Runtime, aka .NET).&#xD;&#xA;&#xD;&#xA;How much of this you use is up to you. You can represent all your data structures as Unity objects, build your world in Unity's editor, turn on the physics, and let events take their course (with maybe a bit of scripting to customize things). Alternatively, you could turn off the physics engine, construct your world algorithmically, and explicitly program all the behaviour and physics of the objects.&#xD;&#xA;&#xD;&#xA;You can choose to program behaviour entirely in Mono (using one of the languages C#, JavaScript, or Boo), or you can write it in another language and link it with your Unity project. (The actual integration with the game objects must be via Mono, but this can be a fairly thin layer if you like.)&#xD;&#xA;&#xD;&#xA;The workflow is much the same as with any game engine. Artists make models and textures and animations, audio specialists make the sounds, programmers write shaders and behaviour.&#xD;&#xA;&#xD;&#xA;The best way to find out is to [try it out][3]: the basic version is free, and you get a 30-day trial period for the &quot;Pro&quot; version.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nvidia.com/page/pg_55418.html&#xD;&#xA;  [2]: http://mono-project.com/Main_Page&#xD;&#xA;  [3]: http://unity3d.com/unity/download/" />
  <row Id="10762" PostHistoryTypeId="5" PostId="5417" RevisionGUID="250d9a28-0584-412c-8c2d-ab614f7c1532" CreationDate="2010-11-10T16:42:24.717" UserId="3162" Comment="deleted 25 characters in body; added 224 characters in body" Text="Unity3D consists of a game engine plus a (fairly rudimentary) 3D editor. It provides meshes, textures, shaders, terrain, cameras, animations, particle systems, audio samples, and other kinds of object that are useful in video games. It includes [PHYSX][1] (a proprietary physics engine owned by Nvidia), and [Mono][2] (the open source implementation of the Common Language Runtime, aka .NET).&#xD;&#xA;&#xD;&#xA;How much of this you use is up to you. You can represent all your data structures as Unity objects, build your world in Unity's editor, turn on the physics, and let events take their course, with a minimum of scripting. Alternatively, you could turn off the physics engine, construct your world algorithmically, and explicitly program all the behaviour and physics of the objects.&#xD;&#xA;&#xD;&#xA;You can choose to program behaviour entirely in Mono (using one of the languages C#, JavaScript, or Boo), or you can write it in another language and link it with your Unity project. (The actual integration with the game objects must be via Mono, but this can be a fairly thin layer if you like.)&#xD;&#xA;&#xD;&#xA;The workflow is much the same as with any game engine. Artists make models and textures and animations, audio specialists make the sounds, programmers write shaders and behaviour.&#xD;&#xA;&#xD;&#xA;The community of Unity programmers is very helpful, both at [answers.unity3d.com][3] and [forum.unity3d.com][4]. (And maybe here at Stack Exchange?)&#xD;&#xA;&#xD;&#xA;The best way to find out is to [try it out][5]: the basic version is free, and you get a 30-day trial period for the &quot;Pro&quot; version.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nvidia.com/page/pg_55418.html&#xD;&#xA;  [2]: http://mono-project.com/Main_Page&#xD;&#xA;  [3]: http://answers.unity3d.com/&#xD;&#xA;  [4]: http://forum.unity3d.com/&#xD;&#xA;  [5]: http://unity3d.com/unity/download/" />
  <row Id="10763" PostHistoryTypeId="2" PostId="5418" RevisionGUID="cecfba06-6e68-4c38-b2ac-91802a9dfa44" CreationDate="2010-11-10T17:39:38.683" UserId="395" Text="Our basic rule is to never change an existing packet type. Everything is either added at the end of an existing one, or a new command. This also makes it far less likely for two people to stomp on each other's work." />
  <row Id="10771" PostHistoryTypeId="2" PostId="5421" RevisionGUID="0b1774fe-f21a-48e6-b347-d9491d08b5c8" CreationDate="2010-11-10T19:06:26.550" UserId="862" Text="As a reference, you may also interested in checking how the Fire Emblem games calculate their possibilities of hit, damage, speed,... You can find all the formulas, stats and explanations here:&#xD;&#xA;&#xD;&#xA;http://serenesforest.net/fe10/calc.html" />
  <row Id="10772" PostHistoryTypeId="2" PostId="5422" RevisionGUID="fa753fc1-9490-449d-adc5-e3a426790e7f" CreationDate="2010-11-10T20:04:16.280" UserDisplayName="john griffin" Text="My take is to look for a traditional 4-year college that has a game development division of it computer science or computer engineering division. Maybe it just has a professor that's in the industry. Maybe you could do a thesis or independent study in game design. Your best bet will be to do a lot of research like this into some 4year schools that you have the grades to get into - you want to see if they have a backdoor/side door into &lt;a href=&quot;http://www.gameshastra.com/Video-Game-Development.html&quot;&gt;game development&lt;/a&gt;." />
  <row Id="10775" PostHistoryTypeId="2" PostId="5424" RevisionGUID="ee80d603-3676-4ed0-96d4-0fc091b29f72" CreationDate="2010-11-10T21:44:52.373" UserId="2063" Text="Programmers and Artists are machines dedicated to their ability of creating what they get as input. The ultimate idea comes from the Designer. He has the vision.&#xD;&#xA;He his the mastermind, but no brain can function without body, so you need a team.&#xD;&#xA;&#xD;&#xA;The job &quot;Game Designer&quot; has no real profile, each project / company defines what this person's tasks are.&#xD;&#xA;A game designer can be a writer up to a visionary like Will Wright or Steve Jobs.&#xD;&#xA;&#xD;&#xA;The fine thing about the &quot;Game Designer&quot; is, that this job currently does not exist.&#xD;&#xA;Because even if you can tell me what a game designer has to have as skills, tell me how to teach a person to be creative.&#xD;&#xA;&#xD;&#xA;I have read once a quote that said: &quot;To become a (Game) Designer is impossible, either you are one or you are not.&quot;&#xD;&#xA;&#xD;&#xA;This might sound very final, but the core part of this quote is in my very honest opinion right.&#xD;&#xA;There is a component, a combination of social and scientific that you must have to be a real &quot;designer&quot;.&#xD;&#xA;&#xD;&#xA;Let's say that a designer has to own the skills he needs to design what he wants to design.&#xD;&#xA;Because there is a huge difference between designing a small level, or game and designing a real game." />
  <row Id="10776" PostHistoryTypeId="5" PostId="5381" RevisionGUID="d30c1a08-a890-45ac-9ae8-231618169140" CreationDate="2010-11-10T22:24:58.500" UserId="51" Comment="added 2 characters in body" Text="I'm in the process of debugging GLSL vertex shaders and I can't shake the feeling that I'm doing it wrong. &#xD;&#xA;&#xD;&#xA;In general I have two strategies to make up for the lack of tracing&#xD;&#xA;&#xD;&#xA; - I stuff values into a debug color varying that I pass to the fragment shader and then try to interpret the colors.&#xD;&#xA; - I change the vertex shader code and see what happens.&#xD;&#xA;&#xD;&#xA;I'm thinking that ideally I could make up for the lack of tracing by writing values to a texture somehow, reading the texture from the GPU and printed the values stuffed in the texture.&#xD;&#xA;&#xD;&#xA;My guess is that there might be way better ways. Any suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10777" PostHistoryTypeId="2" PostId="5425" RevisionGUID="203be195-7bab-4ff7-affb-e05507ecece4" CreationDate="2010-11-10T22:31:47.803" UserId="3222" Text="I'd recommend looking into Mono.  It allows you to write .NET apps on your iphone/ipad.&#xD;&#xA;&#xD;&#xA;[Mono Touch][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://monotouch.net/" />
  <row Id="10778" PostHistoryTypeId="2" PostId="5426" RevisionGUID="55b5d43b-2745-4f5e-9b34-d13f0545abf9" CreationDate="2010-11-10T22:38:46.110" UserId="2974" Text="I was looking for a solution to develop apps on Windows. In the end I bought a Mac mini and I am glad I did. The Mac and the develop tools are working just fine. The time I saved figuring out configuring Windows/Virtual machines/OSX and so on I spent on actually developing Apps." />
  <row Id="10779" PostHistoryTypeId="2" PostId="5427" RevisionGUID="e6de13d6-4710-4741-b6fa-f5237c20a911" CreationDate="2010-11-11T00:20:36.700" UserId="1713" Text="OK, I've got everything working, it took forever, so I'm going to post my detailed solution here.  &#xD;&#xA;*Note: All code samples are in JavaScript.*&#xD;&#xA;&#xD;&#xA;**So let's break down the problem into the basic parts:**  &#xD;&#xA;&#xD;&#xA; 1. You need to compute the length of, as well as points between `0..1` on the bezier curve&#xD;&#xA;&#xD;&#xA; 2. You now need to adjust the scaling of your `T` to accelerate the ship from one speed to another&#xD;&#xA;&#xD;&#xA;**Getting the Bezier right**&#xD;&#xA;----------------------------&#xD;&#xA;&#xD;&#xA;Finding some code for drawing a Bezier curve is easy, there are a number of different approaches though, one of them is the [DeCasteljau Algorithm][1], but you can also just use the [equation][2] for cubic Bézier curves:  &#xD;&#xA;&#xD;&#xA;    // Part of a class, a, b, c, d are the four control points of the curve&#xD;&#xA;    x: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;               + (t * t * t) * this.d.x;&#xD;&#xA;    },&#xD;&#xA;    &#xD;&#xA;    y: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;               + (t * t * t) * this.d.y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With this one can now draw a bezier curve by calling `x` and `y` with `t` which ranges from `0 to 1`, let's take a look:  &#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Uh... that's not really an even distribution of the points, is it? No, it's not.  &#xD;&#xA;Due to the nature of the Bézier curve, the points on `0...1` have different `arc lenghts`, so segements near the beginning and the end are longer than the one near to the middle of the curve.&#xD;&#xA;&#xD;&#xA;**Mapping T evenly on the curve AKA arc-length parameterization**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;So what to do? Well in simple terms we need a function to map our `T` to the `t` on the curve, so that our `T 0.25` results in the `t` that's at 25% of the lenght of the curve.&#xD;&#xA;&#xD;&#xA;How do we do that? Well, we Google... but it turns out that the term isn't that *googleable*, and some point you'll hit this [PDF][4]. Which sure is a great read, but in the case that you've already forgotten all the math stuff you learned back in school(or you don't like those mathematical symbols) it's pretty useless.&#xD;&#xA;&#xD;&#xA;What now? Well go and goolge some more(read: 6 hours), and you finally find a **great** article on the topic(including nice pictures! ^_^&quot;):  &#xD;&#xA;http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Doing the actual code**&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;In case you just couldn't resist downloading that PDF's *although* you'd already lost you mathematical knowledge long long ago(and you managed to skip the *great* article link), you might now think: &quot;God, this will take hundreds of lines of code and tons of CPU&quot;&#xD;&#xA;&#xD;&#xA;No, it will not. Because we do what all programmers do, when it comes to math stuff:  &#xD;&#xA;**We cheat.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Arc-length parameterization, the lazy way**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Let's face it, we don't need endless precision in our game, do we? So unless you're working at Nasa and planning on sending people the the Mars, you won't need a `0.0001 pixel` perfect solution.&#xD;&#xA;&#xD;&#xA;So how do we map `T` onto `t`? It's simple and only consists of 3 steps:  &#xD;&#xA;&#xD;&#xA;  1. Calculate `N` points on the curve using `t` and store the `arc-length`(aka the length of the curve) at that position into an array&#xD;&#xA;&#xD;&#xA;  2. To map `T` onto `t`, first multiply `T` by the total length of the curve to get `u` and then search the array of lengths for the index of the largest value that's smaller than `u`&#xD;&#xA;&#xD;&#xA;  3. If we had an exact hit, return the array value at that index divided by `N`, if not interpolate a bit between the point we found and the next one, divide the thing once again by `N` and return.&#xD;&#xA;&#xD;&#xA;That's all! So now let's take a look at the complete code:  &#xD;&#xA;&#xD;&#xA;    function Bezier(a, b, c, d) {&#xD;&#xA;        this.a = a;&#xD;&#xA;        this.b = b;&#xD;&#xA;        this.c = c;&#xD;&#xA;        this.d = d;&#xD;&#xA;        &#xD;&#xA;        this.len = 100;&#xD;&#xA;        this.arcLengths = new Array(this.len + 1);&#xD;&#xA;        this.arcLengths[0] = 0;&#xD;&#xA;        &#xD;&#xA;        var ox = this.x(0), oy = this.y(0), clen = 0;&#xD;&#xA;        for(var i = 1; i &lt;= this.len; i += 1) {&#xD;&#xA;            var x = this.x(i * 0.05), y = this.y(i * 0.05);&#xD;&#xA;            var dx = ox - x, dy = oy - y;        &#xD;&#xA;            clen += Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;            this.arcLengths[i] = clen;&#xD;&#xA;            ox = x, oy = y;&#xD;&#xA;        }&#xD;&#xA;        this.length = clen;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This initializes our new curve and computes the `arg-lenghts`, it also stores the last of the lengths as the total length of the curve, key factor here is `this.len` which is our `N`. The higher, the more precise the mapping will be, for a curve of the size in the picture above `100 points` seem to be enough, if you just need a good length estimate, something like `25` will already do the job with being only 1 pixel off in our example, but then you will have a less precise mapping which will result in not so even distribution of `T` when mapped to `t`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Bezier.prototype = {&#xD;&#xA;        map: function(u) {&#xD;&#xA;            var targetLength = u * this.arcLengths[this.len];&#xD;&#xA;            var low = 0, high = this.len, index = 0;&#xD;&#xA;            while (low &lt; high) {&#xD;&#xA;                index = low + (((high - low) / 2) | 0);&#xD;&#xA;                if (this.arcLengths[index] &lt; targetLength) {&#xD;&#xA;                    low = index + 1;&#xD;&#xA;                &#xD;&#xA;                } else {&#xD;&#xA;                    high = index;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if (this.arcLengths[index] &gt; targetLength) {&#xD;&#xA;                index--;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            var lengthBefore = this.arcLengths[index];&#xD;&#xA;            if (lengthBefore === targetLength) {&#xD;&#xA;                return index / this.len;&#xD;&#xA;            &#xD;&#xA;            } else {&#xD;&#xA;                return (index + (targetLength - lengthBefore) / (this.arcLengths[index + 1] - lengthBefore)) / this.len;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        mx: function (u) {&#xD;&#xA;            return this.x(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        my: function (u) {&#xD;&#xA;            return this.y(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;The actual mapping code, first we do a simple `binary search` on our stored lengths to find the largest that's smaller then `targetLength`, then we just return or do the interpolation and return.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        x: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;                   + (t * t * t) * this.d.x;&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        y: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;                   + (t * t * t) * this.d.y;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Again this computes `t` on the curve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Time for results**&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;![alt text][6]&#xD;&#xA;&#xD;&#xA;So there you go! By now using `mx` and `my` you get an evenly distributed `T` on the curve :)&#xD;&#xA;&#xD;&#xA;Wasn't that hard, was it? Once again, it turns out that a simple(although not perfect solution) will be enough for a game.&#xD;&#xA;&#xD;&#xA;In case you want to see the complete code, there's a Gist available:  &#xD;&#xA;https://gist.github.com/670236&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cubic.org/docs/bezier.htm&#xD;&#xA;  [2]: http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/TljZY.png&#xD;&#xA;  [4]: http://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf&#xD;&#xA;  [5]: http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;  [6]: http://i.stack.imgur.com/CfhLZ.png" />
  <row Id="10780" PostHistoryTypeId="5" PostId="5373" RevisionGUID="2ba68a63-5d54-4536-9dd4-def28612a5fb" CreationDate="2010-11-11T00:21:05.140" UserId="1713" Comment="deleted 883 characters in body" Text="OK, I already posted this over at math.stackechange.com but didn't get any answers :(&#xD;&#xA;&#xD;&#xA;First of here's a picture of my problem, the description follows afterwards:  &#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;So I got all the points and values set up.&#xD;&#xA;&#xD;&#xA;The ship starts out moving around the left planet `P1` with `S=0.27 Degrees` per gametick, when it reaches `Point A` it starts following the bezier curve till it reaches `Point D`, then it travels around the right planet `P2` with `S=0.42 Degrees` per game tick. The difference in `S` is so that the travel with the same movement speed around the planets.&#xD;&#xA;&#xD;&#xA;So far so good, I got that up and running, now my problem.&#xD;&#xA;&#xD;&#xA;When `S P1` and `S P2` differ to much, the ship jumps between the two speeds when it reaches it's destination, which looks pretty bad. So I need to accelerate the ship between `Point A` and `Point D` from `S P1` to `S P2`.&#xD;&#xA;&#xD;&#xA;The thing I'm missing are in purple, those are:  &#xD;&#xA;&#xD;&#xA; - A way to calculate the ticks it takes the ship to move along the bezier considering the acceleration.&#xD;&#xA;&#xD;&#xA; - And a way to find a position on the bezier curve based on T, again considering the acceleration.&#xD;&#xA;&#xD;&#xA;ATM I calculate the length of the bezier by calculating the distance between `N` of its points. So what I *think* I need, is a way to scale the `T` I need to put into my bezier calculation accordingly to the acceleration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/hXQea.png&#xD;&#xA;  [2]: http://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf&#xD;&#xA;  [3]: http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;  [4]: http://i.stack.imgur.com/CfhLZ.png" />
  <row Id="10781" PostHistoryTypeId="5" PostId="5427" RevisionGUID="fa329506-9689-4550-b1d4-f4201b252513" CreationDate="2010-11-11T00:47:42.533" UserId="1713" Comment="added 1982 characters in body" Text="OK, I've got everything working, it took forever, so I'm going to post my detailed solution here.  &#xD;&#xA;*Note: All code samples are in JavaScript.*&#xD;&#xA;&#xD;&#xA;**So let's break down the problem into the basic parts:**  &#xD;&#xA;&#xD;&#xA; 1. You need to compute the length of, as well as points between `0..1` on the bezier curve&#xD;&#xA;&#xD;&#xA; 2. You now need to adjust the scaling of your `T` to accelerate the ship from one speed to another&#xD;&#xA;&#xD;&#xA;**Getting the Bezier right**&#xD;&#xA;----------------------------&#xD;&#xA;&#xD;&#xA;Finding some code for drawing a Bezier curve is easy, there are a number of different approaches though, one of them is the [DeCasteljau Algorithm][1], but you can also just use the [equation][2] for cubic Bézier curves:  &#xD;&#xA;&#xD;&#xA;    // Part of a class, a, b, c, d are the four control points of the curve&#xD;&#xA;    x: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;               + (t * t * t) * this.d.x;&#xD;&#xA;    },&#xD;&#xA;    &#xD;&#xA;    y: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;               + (t * t * t) * this.d.y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With this one can now draw a bezier curve by calling `x` and `y` with `t` which ranges from `0 to 1`, let's take a look:  &#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Uh... that's not really an even distribution of the points, is it? No, it's not.  &#xD;&#xA;Due to the nature of the Bézier curve, the points on `0...1` have different `arc lenghts`, so segements near the beginning and the end are longer than the one near to the middle of the curve.&#xD;&#xA;&#xD;&#xA;**Mapping T evenly on the curve AKA arc-length parameterization**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;So what to do? Well in simple terms we need a function to map our `T` to the `t` on the curve, so that our `T 0.25` results in the `t` that's at 25% of the lenght of the curve.&#xD;&#xA;&#xD;&#xA;How do we do that? Well, we Google... but it turns out that the term isn't that *googleable*, and some point you'll hit this [PDF][4]. Which sure is a great read, but in the case that you've already forgotten all the math stuff you learned back in school(or you don't like those mathematical symbols) it's pretty useless.&#xD;&#xA;&#xD;&#xA;What now? Well go and goolge some more(read: 6 hours), and you finally find a **great** article on the topic(including nice pictures! ^_^&quot;):  &#xD;&#xA;http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Doing the actual code**&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;In case you just couldn't resist downloading that PDF's *although* you'd already lost you mathematical knowledge long long ago(and you managed to skip the *great* article link), you might now think: &quot;God, this will take hundreds of lines of code and tons of CPU&quot;&#xD;&#xA;&#xD;&#xA;No, it will not. Because we do what all programmers do, when it comes to math stuff:  &#xD;&#xA;**We cheat.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Arc-length parameterization, the lazy way**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Let's face it, we don't need endless precision in our game, do we? So unless you're working at Nasa and planning on sending people the the Mars, you won't need a `0.0001 pixel` perfect solution.&#xD;&#xA;&#xD;&#xA;So how do we map `T` onto `t`? It's simple and only consists of 3 steps:  &#xD;&#xA;&#xD;&#xA;  1. Calculate `N` points on the curve using `t` and store the `arc-length`(aka the length of the curve) at that position into an array&#xD;&#xA;&#xD;&#xA;  2. To map `T` onto `t`, first multiply `T` by the total length of the curve to get `u` and then search the array of lengths for the index of the largest value that's smaller than `u`&#xD;&#xA;&#xD;&#xA;  3. If we had an exact hit, return the array value at that index divided by `N`, if not interpolate a bit between the point we found and the next one, divide the thing once again by `N` and return.&#xD;&#xA;&#xD;&#xA;That's all! So now let's take a look at the complete code:  &#xD;&#xA;&#xD;&#xA;    function Bezier(a, b, c, d) {&#xD;&#xA;        this.a = a;&#xD;&#xA;        this.b = b;&#xD;&#xA;        this.c = c;&#xD;&#xA;        this.d = d;&#xD;&#xA;        &#xD;&#xA;        this.len = 100;&#xD;&#xA;        this.arcLengths = new Array(this.len + 1);&#xD;&#xA;        this.arcLengths[0] = 0;&#xD;&#xA;        &#xD;&#xA;        var ox = this.x(0), oy = this.y(0), clen = 0;&#xD;&#xA;        for(var i = 1; i &lt;= this.len; i += 1) {&#xD;&#xA;            var x = this.x(i * 0.05), y = this.y(i * 0.05);&#xD;&#xA;            var dx = ox - x, dy = oy - y;        &#xD;&#xA;            clen += Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;            this.arcLengths[i] = clen;&#xD;&#xA;            ox = x, oy = y;&#xD;&#xA;        }&#xD;&#xA;        this.length = clen;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This initializes our new curve and computes the `arg-lenghts`, it also stores the last of the lengths as the total length of the curve, key factor here is `this.len` which is our `N`. The higher, the more precise the mapping will be, for a curve of the size in the picture above `100 points` seem to be enough, if you just need a good length estimate, something like `25` will already do the job with being only 1 pixel off in our example, but then you will have a less precise mapping which will result in not so even distribution of `T` when mapped to `t`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Bezier.prototype = {&#xD;&#xA;        map: function(u) {&#xD;&#xA;            var targetLength = u * this.arcLengths[this.len];&#xD;&#xA;            var low = 0, high = this.len, index = 0;&#xD;&#xA;            while (low &lt; high) {&#xD;&#xA;                index = low + (((high - low) / 2) | 0);&#xD;&#xA;                if (this.arcLengths[index] &lt; targetLength) {&#xD;&#xA;                    low = index + 1;&#xD;&#xA;                &#xD;&#xA;                } else {&#xD;&#xA;                    high = index;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if (this.arcLengths[index] &gt; targetLength) {&#xD;&#xA;                index--;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            var lengthBefore = this.arcLengths[index];&#xD;&#xA;            if (lengthBefore === targetLength) {&#xD;&#xA;                return index / this.len;&#xD;&#xA;            &#xD;&#xA;            } else {&#xD;&#xA;                return (index + (targetLength - lengthBefore) / (this.arcLengths[index + 1] - lengthBefore)) / this.len;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        mx: function (u) {&#xD;&#xA;            return this.x(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        my: function (u) {&#xD;&#xA;            return this.y(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;The actual mapping code, first we do a simple `binary search` on our stored lengths to find the largest that's smaller then `targetLength`, then we just return or do the interpolation and return.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        x: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;                   + (t * t * t) * this.d.x;&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        y: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;                   + (t * t * t) * this.d.y;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Again this computes `t` on the curve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Time for results**&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;![alt text][5]&#xD;&#xA;&#xD;&#xA;By now using `mx` and `my` you get an evenly distributed `T` on the curve :)&#xD;&#xA;&#xD;&#xA;Wasn't that hard, was it? Once again, it turns out that a simple(although not perfect solution) will be enough for a game.&#xD;&#xA;&#xD;&#xA;In case you want to see the complete code, there's a Gist available:  &#xD;&#xA;https://gist.github.com/670236&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Finally, accelerating the ships**&#xD;&#xA;-----------------------------------&#xD;&#xA;&#xD;&#xA;So all that's left now is to accelerate the ships along their path, by mapping the position onto `T` which we then use to find the `t` on our curve.&#xD;&#xA;&#xD;&#xA;First we need two of the [equations of motion][6], namely `ut + 1/2at²` and `(v - u) / 2`&#xD;&#xA;&#xD;&#xA;In actual code that would look like this:  &#xD;&#xA;    &#xD;&#xA;    startSpeed = getStartingSpeedInPixels() // Note: pixels&#xD;&#xA;    endSpeed = getFinalSpeedInPixels() // Note: pixels&#xD;&#xA;    acceleration = (endSpeed - startSpeed) // since we scale to 0...1 we can leave out the division by 1 here&#xD;&#xA;    position = 0.5 * acceleration * t * t + startSpeed * t;&#xD;&#xA;&#xD;&#xA;Then we scale that down to `0...1` by doing:  &#xD;&#xA;&#xD;&#xA;    maxPosition = 0.5 * acceleration + startSpeed;&#xD;&#xA;    newT = 1 / maxPosition * position;&#xD;&#xA;&#xD;&#xA;And there you go, the ships are now moving smoothly along the path.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In case it doesn't work...**&#xD;&#xA;------------------------------&#xD;&#xA;&#xD;&#xA;When you're reading this, everything works fine and dandy, but I initially had some problems with the acceleration part, when explaining the problem to someone in the gamedev chatroom I found the final error in my thinking.&#xD;&#xA;&#xD;&#xA;In case you haven't forgotten already about the picture in the original question, I mention `s` there, turns out that `s` is speed in ***degrees***, but the ships move along the path in ***pixels*** and I had forgotten about that fact. So what I needed to do in this case was to convert the displacement in degrees into a displacement in pixels, turns out that this is rather easy:  &#xD;&#xA;&#xD;&#xA;    function rotationToMovement(planetSize, rotationSpeed) {&#xD;&#xA;        var r = shipAngle * Math.PI / 180;&#xD;&#xA;        var rr = (shipAngle + rotationSpeed) * Math.PI / 180;&#xD;&#xA;        var orbit = planetSize + shipOrbit;&#xD;&#xA;        var dx = Math.cos(r) * orbit - Math.cos(rr) * orbit;&#xD;&#xA;        var dy = Math.sin(r) * orbit - Math.sin(rr) * orbit;&#xD;&#xA;        return Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;So and that's all! Thanks for reading ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cubic.org/docs/bezier.htm&#xD;&#xA;  [2]: http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/TljZY.png&#xD;&#xA;  [4]: http://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf&#xD;&#xA;  [5]: http://i.stack.imgur.com/CfhLZ.png&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Equations_of_motion" />
  <row Id="10782" PostHistoryTypeId="2" PostId="5428" RevisionGUID="c94a8a8d-33f0-4eff-80cc-c4a7f3038b85" CreationDate="2010-11-11T02:39:48.837" UserId="312" Text="I am working on a game in JavaScript and my current implementation of collision uses the shortest distance to push the intersecting object away, which isn't always correct. I've made this diagram of the ideal collision. The red box represents the starting position, the green box represents the proper position and the black box represents the static object it is colliding against. The blue arrow is the velocity vector. With my current implementation, the object would be placed in its final position and pushed out (and in this case it would be pushed left)&#xD;&#xA;&#xD;&#xA;![Diagram of collision][1]&#xD;&#xA;&#xD;&#xA;How can I fix this?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/0BAYq.png" />
  <row Id="10783" PostHistoryTypeId="1" PostId="5428" RevisionGUID="c94a8a8d-33f0-4eff-80cc-c4a7f3038b85" CreationDate="2010-11-11T02:39:48.837" UserId="312" Text="How can I implement rectangle collision response?" />
  <row Id="10784" PostHistoryTypeId="3" PostId="5428" RevisionGUID="c94a8a8d-33f0-4eff-80cc-c4a7f3038b85" CreationDate="2010-11-11T02:39:48.837" UserId="312" Text="&lt;physics&gt;&lt;collision-detection&gt;&lt;2d-physics&gt;" />
  <row Id="10785" PostHistoryTypeId="2" PostId="5429" RevisionGUID="804f0a58-c118-432d-8920-272f8b83fca7" CreationDate="2010-11-11T02:46:19.783" UserId="2856" Text="Also, a general tip for making a distortion effect is that you can render the scene onto *another* plane overlaid on the scene, and then warp that plane.  This is useful for other things too, because you can have the overlay partially transparent (flash bang effect maybe?)." />
  <row Id="10786" PostHistoryTypeId="5" PostId="5427" RevisionGUID="b40779cb-cc0a-4956-a619-7314a14b9f2d" CreationDate="2010-11-11T03:13:27.500" UserId="1713" Comment="edited body; added 1 characters in body" Text="OK, I've got everything working, it took forever, so I'm going to post my detailed solution here.  &#xD;&#xA;*Note: All code samples are in JavaScript.*&#xD;&#xA;&#xD;&#xA;**So let's break down the problem into the basic parts:**  &#xD;&#xA;&#xD;&#xA; 1. You need to compute the length of, as well as points between `0..1` on the bezier curve&#xD;&#xA;&#xD;&#xA; 2. You now need to adjust the scaling of your `T` to accelerate the ship from one speed to another&#xD;&#xA;&#xD;&#xA;**Getting the Bezier right**&#xD;&#xA;----------------------------&#xD;&#xA;&#xD;&#xA;Finding some code for drawing a Bezier curve is easy, there are a number of different approaches though, one of them is the [DeCasteljau Algorithm][1], but you can also just use the [equation][2] for cubic Bézier curves:  &#xD;&#xA;&#xD;&#xA;    // Part of a class, a, b, c, d are the four control points of the curve&#xD;&#xA;    x: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;               + (t * t * t) * this.d.x;&#xD;&#xA;    },&#xD;&#xA;    &#xD;&#xA;    y: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;               + (t * t * t) * this.d.y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With this one can now draw a bezier curve by calling `x` and `y` with `t` which ranges from `0 to 1`, let's take a look:  &#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Uh... that's not really an even distribution of the points, is it? No, it's not.  &#xD;&#xA;Due to the nature of the Bézier curve, the points on `0...1` have different `arc lenghts`, so segements near the beginning and the end are longer than the one near to the middle of the curve.&#xD;&#xA;&#xD;&#xA;**Mapping T evenly on the curve AKA arc-length parameterization**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;So what to do? Well in simple terms we need a function to map our `T` to the `t` on the curve, so that our `T 0.25` results in the `t` that's at 25% of the lenght of the curve.&#xD;&#xA;&#xD;&#xA;How do we do that? Well, we Google... but it turns out that the term isn't that *googleable*, and some point you'll hit this [PDF][4]. Which sure is a great read, but in the case that you've already forgotten all the math stuff you learned back in school(or you don't like those mathematical symbols) it's pretty useless.&#xD;&#xA;&#xD;&#xA;What now? Well go and goolge some more(read: 6 hours), and you finally find a **great** article on the topic(including nice pictures! ^_^&quot;):  &#xD;&#xA;http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Doing the actual code**&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;In case you just couldn't resist downloading that PDF's *although* you'd already lost your mathematical knowledge long long ago(and you managed to skip the *great* article link), you might now think: &quot;God, this will take hundreds of lines of code and tons of CPU&quot;&#xD;&#xA;&#xD;&#xA;No, it will not. Because we do what all programmers do, when it comes to math stuff:  &#xD;&#xA;**We cheat.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Arc-length parameterization, the lazy way**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Let's face it, we don't need endless precision in our game, do we? So unless you're working at Nasa and planning on sending people the the Mars, you won't need a `0.0001 pixel` perfect solution.&#xD;&#xA;&#xD;&#xA;So how do we map `T` onto `t`? It's simple and only consists of 3 steps:  &#xD;&#xA;&#xD;&#xA;  1. Calculate `N` points on the curve using `t` and store the `arc-length`(aka the length of the curve) at that position into an array&#xD;&#xA;&#xD;&#xA;  2. To map `T` onto `t`, first multiply `T` by the total length of the curve to get `u` and then search the array of lengths for the index of the largest value that's smaller than `u`&#xD;&#xA;&#xD;&#xA;  3. If we had an exact hit, return the array value at that index divided by `N`, if not interpolate a bit between the point we found and the next one, divide the thing once again by `N` and return.&#xD;&#xA;&#xD;&#xA;That's all! So now let's take a look at the complete code:  &#xD;&#xA;&#xD;&#xA;    function Bezier(a, b, c, d) {&#xD;&#xA;        this.a = a;&#xD;&#xA;        this.b = b;&#xD;&#xA;        this.c = c;&#xD;&#xA;        this.d = d;&#xD;&#xA;        &#xD;&#xA;        this.len = 100;&#xD;&#xA;        this.arcLengths = new Array(this.len + 1);&#xD;&#xA;        this.arcLengths[0] = 0;&#xD;&#xA;        &#xD;&#xA;        var ox = this.x(0), oy = this.y(0), clen = 0;&#xD;&#xA;        for(var i = 1; i &lt;= this.len; i += 1) {&#xD;&#xA;            var x = this.x(i * 0.05), y = this.y(i * 0.05);&#xD;&#xA;            var dx = ox - x, dy = oy - y;        &#xD;&#xA;            clen += Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;            this.arcLengths[i] = clen;&#xD;&#xA;            ox = x, oy = y;&#xD;&#xA;        }&#xD;&#xA;        this.length = clen;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This initializes our new curve and computes the `arg-lenghts`, it also stores the last of the lengths as the total length of the curve, key factor here is `this.len` which is our `N`. The higher, the more precise the mapping will be, for a curve of the size in the picture above `100 points` seem to be enough, if you just need a good length estimate, something like `25` will already do the job with being only 1 pixel off in our example, but then you will have a less precise mapping which will result in not so even distribution of `T` when mapped to `t`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Bezier.prototype = {&#xD;&#xA;        map: function(u) {&#xD;&#xA;            var targetLength = u * this.arcLengths[this.len];&#xD;&#xA;            var low = 0, high = this.len, index = 0;&#xD;&#xA;            while (low &lt; high) {&#xD;&#xA;                index = low + (((high - low) / 2) | 0);&#xD;&#xA;                if (this.arcLengths[index] &lt; targetLength) {&#xD;&#xA;                    low = index + 1;&#xD;&#xA;                &#xD;&#xA;                } else {&#xD;&#xA;                    high = index;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if (this.arcLengths[index] &gt; targetLength) {&#xD;&#xA;                index--;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            var lengthBefore = this.arcLengths[index];&#xD;&#xA;            if (lengthBefore === targetLength) {&#xD;&#xA;                return index / this.len;&#xD;&#xA;            &#xD;&#xA;            } else {&#xD;&#xA;                return (index + (targetLength - lengthBefore) / (this.arcLengths[index + 1] - lengthBefore)) / this.len;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        mx: function (u) {&#xD;&#xA;            return this.x(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        my: function (u) {&#xD;&#xA;            return this.y(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;The actual mapping code, first we do a simple `binary search` on our stored lengths to find the largest that's smaller then `targetLength`, then we just return or do the interpolation and return.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        x: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;                   + (t * t * t) * this.d.x;&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        y: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;                   + (t * t * t) * this.d.y;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Again this computes `t` on the curve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Time for results**&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;![alt text][5]&#xD;&#xA;&#xD;&#xA;By now using `mx` and `my` you get an evenly distributed `T` on the curve :)&#xD;&#xA;&#xD;&#xA;Wasn't that hard, was it? Once again, it turns out that a simple(although not perfect solution) will be enough for a game.&#xD;&#xA;&#xD;&#xA;In case you want to see the complete code, there's a Gist available:  &#xD;&#xA;https://gist.github.com/670236&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Finally, accelerating the ships**&#xD;&#xA;-----------------------------------&#xD;&#xA;&#xD;&#xA;So all that's left now is to accelerate the ships along their path, by mapping the position onto `T` which we then use to find the `t` on our curve.&#xD;&#xA;&#xD;&#xA;First we need two of the [equations of motion][6], namely `ut + 1/2at²` and `(v - u) / t`&#xD;&#xA;&#xD;&#xA;In actual code that would look like this:  &#xD;&#xA;    &#xD;&#xA;    startSpeed = getStartingSpeedInPixels() // Note: pixels&#xD;&#xA;    endSpeed = getFinalSpeedInPixels() // Note: pixels&#xD;&#xA;    acceleration = (endSpeed - startSpeed) // since we scale to 0...1 we can leave out the division by 1 here&#xD;&#xA;    position = 0.5 * acceleration * t * t + startSpeed * t;&#xD;&#xA;&#xD;&#xA;Then we scale that down to `0...1` by doing:  &#xD;&#xA;&#xD;&#xA;    maxPosition = 0.5 * acceleration + startSpeed;&#xD;&#xA;    newT = 1 / maxPosition * position;&#xD;&#xA;&#xD;&#xA;And there you go, the ships are now moving smoothly along the path.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In case it doesn't work...**&#xD;&#xA;------------------------------&#xD;&#xA;&#xD;&#xA;When you're reading this, everything works fine and dandy, but I initially had some problems with the acceleration part, when explaining the problem to someone in the gamedev chatroom I found the final error in my thinking.&#xD;&#xA;&#xD;&#xA;In case you haven't forgotten already about the picture in the original question, I mention `s` there, turns out that `s` is speed in ***degrees***, but the ships move along the path in ***pixels*** and I had forgotten about that fact. So what I needed to do in this case was to convert the displacement in degrees into a displacement in pixels, turns out that this is rather easy:  &#xD;&#xA;&#xD;&#xA;    function rotationToMovement(planetSize, rotationSpeed) {&#xD;&#xA;        var r = shipAngle * Math.PI / 180;&#xD;&#xA;        var rr = (shipAngle + rotationSpeed) * Math.PI / 180;&#xD;&#xA;        var orbit = planetSize + shipOrbit;&#xD;&#xA;        var dx = Math.cos(r) * orbit - Math.cos(rr) * orbit;&#xD;&#xA;        var dy = Math.sin(r) * orbit - Math.sin(rr) * orbit;&#xD;&#xA;        return Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;So and that's all! Thanks for reading ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cubic.org/docs/bezier.htm&#xD;&#xA;  [2]: http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/TljZY.png&#xD;&#xA;  [4]: http://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf&#xD;&#xA;  [5]: http://i.stack.imgur.com/CfhLZ.png&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Equations_of_motion" />
  <row Id="10787" PostHistoryTypeId="2" PostId="5430" RevisionGUID="7dead96f-5800-4dd7-9d66-c8433207e7fd" CreationDate="2010-11-11T03:42:43.563" UserId="3199" Text="There are a few ways to do this, but one easy way is a binary search over the timeline between last frame and the current one. Say that last frame is at time t, and this frame is at t+1. If a collision happened, back up the objects to t+.5. If a collision is still happening, try t+.25, if not try t+.75. Keep going until the steps are sufficiently small. Then do your test for shortest distance push back. Then make sure to play forward the remaining amount of time (since you backed up to find the collision point.)&#xD;&#xA;&#xD;&#xA;The key is to get as close to that point in time as you can, since that will definitively tell you which face collided with which other face." />
  <row Id="10788" PostHistoryTypeId="2" PostId="5431" RevisionGUID="35f579ec-8989-447f-8855-6141378a125f" CreationDate="2010-11-11T03:56:42.110" UserId="312" Text="What it sounds like you want to do is additively blend your lights together, and then multiply the results on top of your scene." />
  <row Id="10789" PostHistoryTypeId="2" PostId="5432" RevisionGUID="42dfbf0b-84a0-4190-998d-cd7ae0ba6c16" CreationDate="2010-11-11T05:01:18.677" UserId="953" Text="I tried out the iPhone packager for a bit, although I was using it from the command line (I work in FlashDevelop, not CS5).  I had a great deal of difficulty getting existing game code to work; I ran into a number of issues that were near-impossible to track down, including an error that I couldn't get info on using fdb.  I was able to get an early version working fine, but when I tried switching it to AIR in order to get hardware features, I had so much trouble that I couldn't even get a version working again.&#xD;&#xA;&#xD;&#xA;Your mileage may vary, but for the moment I would consider Flash for the iPhone a very high-risk prospect.  There's limited support and experience out there, and the process is a bit convoluted.  I'd invest only a bit of time at first; if things go smoothly, then go for it.  But don't bet much on the platform until you're comfortable that things are gonna work." />
  <row Id="10790" PostHistoryTypeId="2" PostId="5433" RevisionGUID="bf50662f-246d-401e-9314-0cb76da65553" CreationDate="2010-11-11T05:07:25.690" UserId="51" Text="You can procedurally find out how to do a moving AABB/AABB trace with the formulas on this page.&#xD;&#xA;&#xD;&#xA;http://www.realtimerendering.com/intersections.html&#xD;&#xA;&#xD;&#xA;Basically those equations will tell you what percentage of your move you should do that frame, which will allow you to place your square at the correct location." />
  <row Id="10792" PostHistoryTypeId="4" PostId="5412" RevisionGUID="f42588de-91fe-4de3-a02c-528bbc8972df" CreationDate="2010-11-11T08:57:56.230" UserId="744" Comment="edited title; edited title" Text="Using Flash in CS5 for iOS" />
  <row Id="10793" PostHistoryTypeId="2" PostId="5434" RevisionGUID="78dd8172-2a81-4cb6-9358-931515af3632" CreationDate="2010-11-11T11:49:27.347" UserId="119" Text="I built a game using the Flash CS5 iPhone packager which is still available: http://itunes.apple.com/us/app/monster-ball/id356171232?mt=8&#xD;&#xA;&#xD;&#xA;My experiences were that it was quite easy to get going, and obviously you bring all your existing Flash skills - the problem is that performance is very slow, to the point where you can only make very, very simple games.&#xD;&#xA;&#xD;&#xA;Unless you're making a very simple &quot;fart app&quot; type game, my advice would be to avoid Flash and go with Unity3D or cocos2D etc It will mean learning a new dev environment and language, but you will be able to make much better games." />
  <row Id="10794" PostHistoryTypeId="2" PostId="5435" RevisionGUID="eee35bbb-272a-47d8-a5cf-d1d9a3676964" CreationDate="2010-11-11T12:08:55.740" UserId="119" Text="A board game is a good example of a game that could be made using MVC, as the game logic (model) does exist quite independently of the visuals (view). However if you consider an action game like Gears of War, the geometry of the 3D models is intrinsic to the game logic, so separating out the view as if it were interchangable becomes pointless. Unity3D is a great example of a more game-specific way of organising code. You have a base entity class which you add functionality to with components, where one component might handle drawing the entity, one handle game logic etc. Check out these famous blog posts on the subject:&#xD;&#xA;&#xD;&#xA;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;&#xD;&#xA;http://gameprogrammingpatterns.com/component.html " />
  <row Id="10795" PostHistoryTypeId="2" PostId="5436" RevisionGUID="6c5ba4f6-3e01-46b7-8ed3-dc0bb826c380" CreationDate="2010-11-11T13:05:42.317" UserId="2815" Text="I see most people here thinks a D-Pad is a bad idea, and they are right - most of the time.  Dungeon Hunter from Gameloft for Android is a great example of a great D-Pad for touch-screens.  It is responsive, have a 360 degree direction, an is not &quot;dumb&quot;.  What I mean that it is not &quot;dumb&quot;, is that when you press the D-Pad and slide you finger out from the D-Pad area, it doesn't interfare with what happens on the screen - it just extends.  So if you accidentaly slip out of the D-Pad area you won't loose movement.&#xD;&#xA;&#xD;&#xA;I think 360 degree direction and out-of-bounds responsivness is important and if you can do that you will have a chance in doing the D-Pad right." />
  <row Id="10796" PostHistoryTypeId="2" PostId="5437" RevisionGUID="e226cbc2-8d28-4073-a490-94699c25b84d" CreationDate="2010-11-11T14:02:03.537" UserId="1829" Text="When talking about game engine, I guess you are thinking about anything that is not the render engine, sound engine, physics engine, input engine, etc.&#xD;&#xA;&#xD;&#xA;So you might be thinking about game architecture, AI, or design pattern/systems etc, which are used to structurate a software into managing data and other components to create some sort of scene/thater/illusion, thus producing a manageable sets of rules to tweak to create an actual &quot;video game&quot;.&#xD;&#xA;&#xD;&#xA;This is the actual top layer of a video game, and I even tried to learn a little about it, it's vast, complicated and requires a lot of knowledge into all other subjects. Imagine you want to recreate a alternate reality from nothing, keet track of and computing every each event, and regenerate accurate data from those, at whatever moment: for every kind of game there is some kind of subset game-engine, and I don't think it's actually possible to make a generic engine which is mathematically fast enough. Even for a game where you control a single character, there are still a lot of things which can vary and can still require the game to change the whole architecture.&#xD;&#xA;&#xD;&#xA;The gaming industry is not as well-served by open-source as other fields of computer sciences, just because entertainment has different kinds of license types, which involve artistic licenses: game product is only paid by a customer, and AFAIK, there is only few engines that seems good enough to work for you :&#xD;&#xA;Hord3d, NeoAxis, blendelf, Panda3D. But I can't assure you they will be as much easy to use as tools like Unity, Torque, C4 and others; keep in mind that a game engine is, with the graphical renderer, I think the most difficult type of software you'll find in game-making." />
  <row Id="10797" PostHistoryTypeId="6" PostId="5135" RevisionGUID="1e677e82-5692-4a5d-a194-d425f98e7267" CreationDate="2010-11-11T15:29:18.950" UserId="2862" Comment="edited tags" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;3d-engines&gt;&lt;windows&gt;&lt;lists&gt;" />
  <row Id="10798" PostHistoryTypeId="6" PostId="482" RevisionGUID="0324bfa3-3500-4728-bcab-0eba23f8eab1" CreationDate="2010-11-11T15:29:55.877" UserId="2862" Comment="edited tags" Text="&lt;learning&gt;&lt;lists&gt;" />
  <row Id="10799" PostHistoryTypeId="6" PostId="1528" RevisionGUID="fb410cb9-4cb2-4ce5-836d-d6ae324c34ab" CreationDate="2010-11-11T15:30:19.090" UserId="2862" Comment="edited tags" Text="&lt;mmo&gt;&lt;anti-cheat&gt;&lt;lists&gt;" />
  <row Id="10800" PostHistoryTypeId="2" PostId="5438" RevisionGUID="edf3bde4-5672-48a1-84c5-ad4ac0b1ca38" CreationDate="2010-11-11T15:49:57.500" UserId="2992" Text="The issue is that a ship would not take that trajectory naturally. So even with it working perfectly it still won't look right.&#xD;&#xA;&#xD;&#xA;If you want to simulate the smooth transition between planets I would suggest actually modeling it. The equations are very simple as you only have two significant forces: gravity, and thrust.&#xD;&#xA;&#xD;&#xA;You just need to set your constants: Mass of P1, P2, ship&#xD;&#xA;&#xD;&#xA;With each game-tick (time: t) you are doing 3 things&#xD;&#xA;&#xD;&#xA; 1. Calculate the gravity of p1 on ship and p2 on ship, add the resultant vectors to the thrust vector.&#xD;&#xA; &#xD;&#xA; 2. Calculate your new velocity based on your new acceleration from step 1&#xD;&#xA;&#xD;&#xA; 3. Move the ship according to your new velocity&#xD;&#xA;&#xD;&#xA;Might seem like a lot of work but it can be done in a dozen lines of code and will look very natural.&#xD;&#xA;&#xD;&#xA;If you need help with the physics let me know." />
  <row Id="10801" PostHistoryTypeId="2" PostId="5439" RevisionGUID="99840795-e3bb-4d14-873d-fd6725271a88" CreationDate="2010-11-11T16:12:17.073" UserId="3214" Text="I've used Python before with PyGame to make games, but PyGame doesn't seem to be so popular anymore, and there arent that many good resources for it. I hear lots of buzz about Lua as a fast scripting language to be used inside of projects made in other languages.&#xD;&#xA;&#xD;&#xA;I work much faster and enjoy the higher-level programming that is Python, so that naturally leads me to Lua, which seems to be getting a lot of attention recently. I know it's been around for a while but I think WoW add-on creation made it more popular..&#xD;&#xA;&#xD;&#xA;Can Lua make games on its own as a stand-alone language with any 2D or 3D libraries, or is that not really the Lua domain?&#xD;&#xA;&#xD;&#xA;I won't bother asking about 3D in Python here, I'll make a new question for that. Thanks!" />
  <row Id="10802" PostHistoryTypeId="1" PostId="5439" RevisionGUID="99840795-e3bb-4d14-873d-fd6725271a88" CreationDate="2010-11-11T16:12:17.073" UserId="3214" Text="Lua as a stand-alone for game programming like Python?" />
  <row Id="10803" PostHistoryTypeId="3" PostId="5439" RevisionGUID="99840795-e3bb-4d14-873d-fd6725271a88" CreationDate="2010-11-11T16:12:17.073" UserId="3214" Text="&lt;programming&gt;&lt;lua&gt;" />
  <row Id="10804" PostHistoryTypeId="2" PostId="5440" RevisionGUID="426673e8-dd14-45f9-b4b6-69afd0d4155e" CreationDate="2010-11-11T16:27:38.000" UserId="889" Text="[**Clean Code**][1]&#xD;&#xA;&#xD;&#xA;A nice book that teach you how to write code that can be easily understood, a must-read that taught me much more than I though at first. Talks about meaningful names, comments, functions, formatting, objects and data structure and much more. I highly recommend !&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1289492513&amp;sr=1-1" />
  <row Id="10805" PostHistoryTypeId="2" PostId="5441" RevisionGUID="e96f2b9b-4553-4ee8-a497-33a092c68cd8" CreationDate="2010-11-11T16:32:23.213" UserId="889" Text="[**The Pragmatic Programmer : Journeyman to Master**][1]&#xD;&#xA;&#xD;&#xA;If I'm putting together a project, it's the authors of this book that I want. . . . And failing that I'd settle for people who've read their book.&quot; -- Ward Cunningham&#xD;&#xA;&#xD;&#xA;A book that present tips on various topics. The book doesn't need to be red from the beginning to the end, just read about the tips you want ! Here are the topics covered :&#xD;&#xA;&#xD;&#xA; - Fight software rot;&#xD;&#xA; - Avoid the trap of duplicating&#xD;&#xA;   knowledge;&#xD;&#xA; - Write flexible, dynamic, and&#xD;&#xA;   adaptable code;&#xD;&#xA; - Avoid programming by coincidence;&#xD;&#xA; - Bullet-proof your code with&#xD;&#xA;   contracts, assertions, and&#xD;&#xA;   exceptions;&#xD;&#xA; - Capture real requirements;&#xD;&#xA; - Test ruthlessly and effectively;&#xD;&#xA; - Delight your users;&#xD;&#xA; - Build teams of pragmatic programmers;&#xD;&#xA; - Make your developments more precise&#xD;&#xA;   with automation.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1289492882&amp;sr=1-1" />
  <row Id="10806" PostHistoryTypeId="2" PostId="5442" RevisionGUID="cbdb46ef-0f48-4be8-8686-263ea1c0bd5f" CreationDate="2010-11-11T16:33:10.080" UserId="2290" Text="If you're interested in developing games using Lua, I'd highly recommend checking out [LÖVE][1] which is a framework for making 2D games in Lua. Checkout their [wiki][2] for lot of resources to get you started. :)&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/&#xD;&#xA;  [2]: http://love2d.org/wiki/Main_Page" />
  <row Id="10807" PostHistoryTypeId="2" PostId="5443" RevisionGUID="c1db11f9-b090-4163-bc13-8998c83cac49" CreationDate="2010-11-11T16:35:38.837" UserId="889" Text="[**Design Patterns : Elements of Reusable Object-Oriented Software**][1]&#xD;&#xA;&#xD;&#xA;A must have reference book written by the GOF who are highly know in the litterature of programming. Begins with a quik presentation of each patterns in the book and then explain them one by one with exemples, when to use, UML representation and more.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Design-Patterns-Elements-Object-Oriented-ebook/dp/B000SEIBB8/ref=sr_1_11?s=books&amp;ie=UTF8&amp;qid=1289493165&amp;sr=1-11" />
  <row Id="10808" PostHistoryTypeId="2" PostId="5444" RevisionGUID="3fab2021-4b08-42e5-a523-25475e64fda0" CreationDate="2010-11-11T16:40:22.720" UserId="889" Text="[**Refactoring : Improving the Design of Existing Code**][1]&#xD;&#xA;&#xD;&#xA;I think this book is the logic one to read when you finish Clean Code (See other answer). It teach you how to deal with bad design of code and rework it into well-designed, robust code. The author present you how to deal with such code in a nice and easily-understandable way. A must have in your bookshelf !&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1289493348&amp;sr=1-1" />
  <row Id="10809" PostHistoryTypeId="5" PostId="5427" RevisionGUID="3ecf0fdd-bfe6-46bd-b044-11707047a34e" CreationDate="2010-11-11T16:46:23.480" UserId="1713" Comment="Typo fixes" Text="OK, I've got everything working, it took forever, so I'm going to post my detailed solution here.  &#xD;&#xA;*Note: All code samples are in JavaScript.*&#xD;&#xA;&#xD;&#xA;**So let's break down the problem into the basic parts:**  &#xD;&#xA;&#xD;&#xA; 1. You need to compute the length of, as well as points between `0..1` on the bezier curve&#xD;&#xA;&#xD;&#xA; 2. You now need to adjust the scaling of your `T` to accelerate the ship from one speed to another&#xD;&#xA;&#xD;&#xA;**Getting the Bezier right**&#xD;&#xA;----------------------------&#xD;&#xA;&#xD;&#xA;Finding some code for drawing a Bezier curve is easy, there are a number of different approaches though, one of them is the [DeCasteljau Algorithm][1], but you can also just use the [equation][2] for cubic Bézier curves:  &#xD;&#xA;&#xD;&#xA;    // Part of a class, a, b, c, d are the four control points of the curve&#xD;&#xA;    x: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;               + (t * t * t) * this.d.x;&#xD;&#xA;    },&#xD;&#xA;    &#xD;&#xA;    y: function (t) {&#xD;&#xA;        return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;               + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;               + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;               + (t * t * t) * this.d.y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With this, one can now draw a bezier curve by calling `x` and `y` with `t` which ranges from `0 to 1`, let's take a look:  &#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;Uh... that's not really an even distribution of the points, is it?  &#xD;&#xA;Due to the nature of the Bézier curve, the points on `0...1` have different `arc lenghts`, so segments near the beginning and the end, are longer than the ones which are near to the middle of the curve.&#xD;&#xA;&#xD;&#xA;**Mapping T evenly on the curve AKA arc-length parameterization**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;So what to do? Well in simple terms we need a function to map our `T` onto the `t` of the curve, so that our `T 0.25` results in the `t` that's at `25%` of the length of the curve.&#xD;&#xA;&#xD;&#xA;How do we do that? Well, we Google... but it turns out that the term isn't that *googleable*, and at some point you'll hit this [PDF][4]. Which sure is a great read, but in the case that you've already forgotten all the math stuff you learned back in school(or you just don't like those mathematical symbols) it's pretty useless.&#xD;&#xA;&#xD;&#xA;What now? Well go and Google some more(read: 6 hours), and you finally find a **great** article on the topic(including nice pictures! ^_^&quot;):  &#xD;&#xA;http://www.planetclegg.com/projects/WarpingTextToSplines.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Doing the actual code**&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;In case you just couldn't resist downloading that PDF's *although* you'd already lost your mathematical knowledge a long, long, time ago(and you managed to skip the *great* article link), you might now think: &quot;God, this will take hundreds of lines of code and tons of CPU&quot;&#xD;&#xA;&#xD;&#xA;No, it will not. Because we do what all programmers do, when it comes to math stuff:  &#xD;&#xA;**We simply cheat.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Arc-length parameterization, the lazy way**&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Let's face it, we don't need endless precision in our game, do we? So unless you're working at Nasa and planning on sending people the the Mars, you won't need a `0.000001 pixel` perfect solution.&#xD;&#xA;&#xD;&#xA;So how do we map `T` onto `t`? It's simple and only consists of 3 steps:  &#xD;&#xA;&#xD;&#xA;  1. Calculate `N` points on the curve using `t` and store the `arc-length`(aka the length of the curve) at that position into an array&#xD;&#xA;&#xD;&#xA;  2. To map `T` onto `t`, first multiply `T` by the total length of the curve to get `u` and then search the array of lengths for the index of the largest value that's smaller than `u`&#xD;&#xA;&#xD;&#xA;  3. If we had an exact hit, return the array value at that index divided by `N`, if not interpolate a bit between the point we found and the next one, divide the thing once again by `N` and return.&#xD;&#xA;&#xD;&#xA;That's all! So now let's take a look at the complete code:  &#xD;&#xA;&#xD;&#xA;    function Bezier(a, b, c, d) {&#xD;&#xA;        this.a = a;&#xD;&#xA;        this.b = b;&#xD;&#xA;        this.c = c;&#xD;&#xA;        this.d = d;&#xD;&#xA;        &#xD;&#xA;        this.len = 100;&#xD;&#xA;        this.arcLengths = new Array(this.len + 1);&#xD;&#xA;        this.arcLengths[0] = 0;&#xD;&#xA;        &#xD;&#xA;        var ox = this.x(0), oy = this.y(0), clen = 0;&#xD;&#xA;        for(var i = 1; i &lt;= this.len; i += 1) {&#xD;&#xA;            var x = this.x(i * 0.05), y = this.y(i * 0.05);&#xD;&#xA;            var dx = ox - x, dy = oy - y;        &#xD;&#xA;            clen += Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;            this.arcLengths[i] = clen;&#xD;&#xA;            ox = x, oy = y;&#xD;&#xA;        }&#xD;&#xA;        this.length = clen;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This initializes our new curve and computes the `arg-lenghts`, it also stores the last of the lengths as the `total length` of the curve, key factor here is `this.len` which is our `N`. The higher, the more precise the mapping will be, for a curve of the size in the picture above `100 points` seem to be enough, if you just need a good length estimate, something like `25` will already do the job with being only 1 pixel off in our example, but then you will have a less precise mapping which will result in not so even distribution of `T` when mapped to `t`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Bezier.prototype = {&#xD;&#xA;        map: function(u) {&#xD;&#xA;            var targetLength = u * this.arcLengths[this.len];&#xD;&#xA;            var low = 0, high = this.len, index = 0;&#xD;&#xA;            while (low &lt; high) {&#xD;&#xA;                index = low + (((high - low) / 2) | 0);&#xD;&#xA;                if (this.arcLengths[index] &lt; targetLength) {&#xD;&#xA;                    low = index + 1;&#xD;&#xA;                &#xD;&#xA;                } else {&#xD;&#xA;                    high = index;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if (this.arcLengths[index] &gt; targetLength) {&#xD;&#xA;                index--;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            var lengthBefore = this.arcLengths[index];&#xD;&#xA;            if (lengthBefore === targetLength) {&#xD;&#xA;                return index / this.len;&#xD;&#xA;            &#xD;&#xA;            } else {&#xD;&#xA;                return (index + (targetLength - lengthBefore) / (this.arcLengths[index + 1] - lengthBefore)) / this.len;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        mx: function (u) {&#xD;&#xA;            return this.x(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        my: function (u) {&#xD;&#xA;            return this.y(this.map(u));&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;The actual mapping code, first we do a simple `binary search` on our stored lengths to find the largest length that's smaller then `targetLength`, then we just return or do the interpolation and return.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        x: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.x&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.x&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.x&#xD;&#xA;                   + (t * t * t) * this.d.x;&#xD;&#xA;        },&#xD;&#xA;        &#xD;&#xA;        y: function (t) {&#xD;&#xA;            return ((1 - t) * (1 - t) * (1 - t)) * this.a.y&#xD;&#xA;                   + 3 * ((1 - t) * (1 - t)) * t * this.b.y&#xD;&#xA;                   + 3 * (1 - t) * (t * t) * this.c.y&#xD;&#xA;                   + (t * t * t) * this.d.y;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Again this computes `t` on the curve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Time for results**&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;![alt text][5]&#xD;&#xA;&#xD;&#xA;By now using `mx` and `my` you get an evenly distributed `T` on the curve :)&#xD;&#xA;&#xD;&#xA;Wasn't that hard, was it? Once again, it turns out that a simple(although not perfect solution) will be enough for a game.&#xD;&#xA;&#xD;&#xA;In case you want to see the complete code, there's a Gist available:  &#xD;&#xA;https://gist.github.com/670236&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Finally, accelerating the ships**&#xD;&#xA;-----------------------------------&#xD;&#xA;&#xD;&#xA;So all that's left now is to accelerate the ships along their path, by mapping the position onto `T` which we then use to find the `t` on our curve.&#xD;&#xA;&#xD;&#xA;First we need two of the [equations of motion][6], namely `ut + 1/2at²` and `(v - u) / t`&#xD;&#xA;&#xD;&#xA;In actual code that would look like this:  &#xD;&#xA;    &#xD;&#xA;    startSpeed = getStartingSpeedInPixels() // Note: pixels&#xD;&#xA;    endSpeed = getFinalSpeedInPixels() // Note: pixels&#xD;&#xA;    acceleration = (endSpeed - startSpeed) // since we scale to 0...1 we can leave out the division by 1 here&#xD;&#xA;    position = 0.5 * acceleration * t * t + startSpeed * t;&#xD;&#xA;&#xD;&#xA;Then we scale that down to `0...1` by doing:  &#xD;&#xA;&#xD;&#xA;    maxPosition = 0.5 * acceleration + startSpeed;&#xD;&#xA;    newT = 1 / maxPosition * position;&#xD;&#xA;&#xD;&#xA;And there you go, the ships are now moving smoothly along the path.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In case it doesn't work...**&#xD;&#xA;------------------------------&#xD;&#xA;&#xD;&#xA;When you're reading this, everything works fine and dandy, but I initially had some problems with the acceleration part, when explaining the problem to someone in the gamedev chatroom I found the final error in my thinking.&#xD;&#xA;&#xD;&#xA;In case you haven't forgotten already about the picture in the original question, I mention `s` there, turns out that `s` is speed in ***degrees***, but the ships move along the path in ***pixels*** and I had forgotten about that fact. So what I needed to do in this case was to convert the displacement in degrees into a displacement in pixels, turns out that this is rather easy:  &#xD;&#xA;&#xD;&#xA;    function rotationToMovement(planetSize, rotationSpeed) {&#xD;&#xA;        var r = shipAngle * Math.PI / 180;&#xD;&#xA;        var rr = (shipAngle + rotationSpeed) * Math.PI / 180;&#xD;&#xA;        var orbit = planetSize + shipOrbit;&#xD;&#xA;        var dx = Math.cos(r) * orbit - Math.cos(rr) * orbit;&#xD;&#xA;        var dy = Math.sin(r) * orbit - Math.sin(rr) * orbit;&#xD;&#xA;        return Math.sqrt(dx * dx + dy * dy);&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;So and that's all! Thanks for reading ;)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cubic.org/docs/bezier.htm&#xD;&#xA;  [2]: http://www.efg2.com/Lab/Graphics/Jean-YvesQueinecBezierCurves.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/TljZY.png&#xD;&#xA;  [4]: http://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf&#xD;&#xA;  [5]: http://i.stack.imgur.com/CfhLZ.png&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Equations_of_motion" />
  <row Id="10810" PostHistoryTypeId="2" PostId="5445" RevisionGUID="5651ab70-91ef-4880-be8f-1efb0a61f981" CreationDate="2010-11-11T17:35:32.800" UserId="3234" Text="I'll disagree with most of the popular posts on here and say that it's really NOT that much work to create an MMO. &#xD;&#xA;But don't confuse MMO with WOW.&#xD;&#xA;&#xD;&#xA;Really, the idea of an MMO can broken down:&#xD;&#xA;&#xD;&#xA;O - Online. This is a game played over the net&#xD;&#xA;&#xD;&#xA;M - Multiplayer. Not just you.&#xD;&#xA;&#xD;&#xA;M - Massive. This implies that you are playing multiplayer with people you dont know, and it implies that the game persists past when you start/stop playing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Doing something like wouldn't really take much work as other people here have pointed out. The rolling ball example, Runescape, Travian, etc.&#xD;&#xA;&#xD;&#xA;I think people confuse 'Why is it hard to make an MMO' with &#xD;&#xA;&#xD;&#xA;'Why is it hard to make a huge 3D interactive world with thousands of animated monsters, weapons, spells, character classes, craploads of sound effects, music, and enough plot to fill 40 fantasy novels.' &#xD;&#xA;&#xD;&#xA;And when you phrase it like that it's pretty obvious. It makes you realize that just making a one player offline version of WOW would take almost as much time." />
  <row Id="10815" PostHistoryTypeId="2" PostId="5447" RevisionGUID="9dd54554-4bc7-4be2-9a77-70b380beced5" CreationDate="2010-11-11T19:09:11.567" UserId="1677" Text="Creating interesting, original, logical, thoughtful puzzles is an art.&#xD;&#xA;&#xD;&#xA;What techniques and methods do you use to create good puzzles?&#xD;&#xA;&#xD;&#xA;Do you write storyline before designing puzzles or combine these 2 processes?&#xD;&#xA;" />
  <row Id="10816" PostHistoryTypeId="1" PostId="5447" RevisionGUID="9dd54554-4bc7-4be2-9a77-70b380beced5" CreationDate="2010-11-11T19:09:11.567" UserId="1677" Text="Puzzle design in Adventure games" />
  <row Id="10817" PostHistoryTypeId="3" PostId="5447" RevisionGUID="9dd54554-4bc7-4be2-9a77-70b380beced5" CreationDate="2010-11-11T19:09:11.567" UserId="1677" Text="&lt;game-design&gt;&lt;adventure&gt;" />
  <row Id="10818" PostHistoryTypeId="2" PostId="5448" RevisionGUID="ce0b6e69-4cf6-47bc-b467-5b9f83e36d9b" CreationDate="2010-11-11T19:09:58.757" UserId="1677" Text="Some general inspiring approaches to create puzzles:&#xD;&#xA;&#xD;&#xA;  1. One possible inspiring method is to use puzzle classifications.   &#xD;&#xA;[Adventure UML (Visual representation)][1]  &#xD;&#xA;[Adventure UML (Source article)][2]  &#xD;&#xA;[Mark Newheiser's classification][3]  &#xD;&#xA;[&quot;Making Better Puzzles&quot; by Stephen Granade][4]&#xD;&#xA;&#xD;&#xA;  All these classifications can be used to stimulate your creativity and brainstorming.&#xD;&#xA;&#xD;&#xA;  2. TRIZ - &quot;a problem-solving, analysis and forecasting tool derived from the study of patterns of invention in the global patent literature&quot;. It was developed by Soviet engineer and researcher Genrich Altshuller and his colleagues, beginning in 1946. In English the name is typically rendered as &quot;the theory of inventive problem solving&quot;, and occasionally goes by the English acronym &quot;TIPS&quot;.&#xD;&#xA;&#xD;&#xA;  TRIZ is variously described as a methodology, tool set, knowledge base, and model-based technology for generating new ideas and solutions for problem solving. It is intended for application in problem formulation, system analysis, failure analysis, and patterns of system evolution. Splits have occurred within TRIZ advocacy, and interpretation of its findings and applications are disputed.&#xD;&#xA;[TRIZ (wiki)][5]&#xD;&#xA;&#xD;&#xA;  3. Edward de Bono's methods of creative thinking.&#xD;&#xA;[Edward de Bono (wiki)][6]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bigbluecup.com/yabb/index.php?topic=38322.0&#xD;&#xA;  [2]: http://www.godpatterns.com/2006/04/adventure-game-design-patterns.html&#xD;&#xA;  [3]: http://www.adventureclassicgaming.com/index.php/site/features/423/&#xD;&#xA;  [4]: http://www.brasslantern.org/writers/iftheory/betterpuzzles-a.html&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/TRIZ&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Edward_de_Bono" />
  <row Id="10819" PostHistoryTypeId="2" PostId="5449" RevisionGUID="28479e49-9898-4de8-9d87-ab1b7482f340" CreationDate="2010-11-11T19:52:50.453" UserId="744" Text="**Name:** Writing secure networking code.&#xD;&#xA;&#xD;&#xA;**Game Type:** Any, but especially good for MMOs.&#xD;&#xA;&#xD;&#xA;**Website:** Any real trusted networking standard, &lt;a href=&quot;http://www.amazon.com/Writing-Secure-Code-Strategies-Applications/dp/0735617228/&quot;&gt;Writing Secure Code&lt;/a&gt;, and many others specific to your language.&#xD;&#xA;&#xD;&#xA;**Features:**&#xD;&#xA;&#xD;&#xA; * Fewer angry or confused users.&#xD;&#xA; * No unexpected overhead due to poorly-written third party programs.&#xD;&#xA; * Likely to have trickle-down effects improving the rest of your project's code.&#xD;&#xA; * Cannot be defeated by kernel drivers, virtual machine trickery, or &lt;a href=&quot;http://www.amazon.com/Exploiting-Online-Games-Massively-Distributed/dp/0132271915/&quot;&gt;other well-documented undetectable methods of cheating&lt;/a&gt;." />
  <row Id="10820" PostHistoryTypeId="2" PostId="5450" RevisionGUID="d2c870e2-33c3-45b9-86a1-7b0f08b9cabc" CreationDate="2010-11-11T20:17:53.443" UserId="2515" Text="[Airplay SDK][1] claims to allow you to develop in Visual Studio on a Windows PC.  I have not tried it out, so no idea how well it works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.airplaysdk.com" />
  <row Id="10821" PostHistoryTypeId="2" PostId="5451" RevisionGUID="96d80ec6-c330-4871-b665-34d64ec64178" CreationDate="2010-11-11T20:26:03.113" UserId="962" Text="**How would one generate cracks in different materials?**&#xD;&#xA;&#xD;&#xA;I would want to have the ability to simulate different variables like brittleness, or other variables to get varied end results.&#xD;&#xA;&#xD;&#xA;I would mainly need to generate impact cracks, so it would need to react to different impact angles and speeds.&#xD;&#xA;&#xD;&#xA;I am using ActionScript3, but general theory answers will be helpful as well." />
  <row Id="10822" PostHistoryTypeId="1" PostId="5451" RevisionGUID="96d80ec6-c330-4871-b665-34d64ec64178" CreationDate="2010-11-11T20:26:03.113" UserId="962" Text="Fractal Cracking Effect" />
  <row Id="10823" PostHistoryTypeId="3" PostId="5451" RevisionGUID="96d80ec6-c330-4871-b665-34d64ec64178" CreationDate="2010-11-11T20:26:03.113" UserId="962" Text="&lt;physics&gt;&lt;math&gt;&lt;actionscript-3&gt;" />
  <row Id="10824" PostHistoryTypeId="6" PostId="1528" RevisionGUID="39d05afb-caa5-481a-b9cd-0d4f4e88b7cb" CreationDate="2010-11-11T20:29:43.917" UserId="14" Comment="edited tags" Text="&lt;mmo&gt;&lt;anti-cheat&gt;" />
  <row Id="10825" PostHistoryTypeId="6" PostId="5135" RevisionGUID="c25ad55a-74a4-4b7b-a2d1-3756fd5488ab" CreationDate="2010-11-11T20:30:13.917" UserId="14" Comment="edited tags" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;3d-engines&gt;&lt;windows&gt;" />
  <row Id="10826" PostHistoryTypeId="6" PostId="482" RevisionGUID="22dd4cd9-72d3-49ef-805b-4bcc4494ddbe" CreationDate="2010-11-11T20:30:21.153" UserId="14" Comment="edited tags" Text="&lt;learning&gt;" />
  <row Id="10827" PostHistoryTypeId="5" PostId="5451" RevisionGUID="63691161-43ba-4417-b1e6-2d9361baca6f" CreationDate="2010-11-11T21:44:03.467" UserId="962" Comment="Made the question huge, as I was asked in chat if I just want to do this for glass." Text="#How would one generate cracks in different materials?#&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would want to have the ability to simulate different variables like brittleness, or other variables to get varied end results.&#xD;&#xA;&#xD;&#xA;I would mainly need to generate impact cracks, so it would need to react to different impact angles and speeds.&#xD;&#xA;&#xD;&#xA;I am using ActionScript3, but general theory answers will be helpful as well." />
  <row Id="10828" PostHistoryTypeId="2" PostId="5452" RevisionGUID="158bd281-82e9-466f-be85-206ca03e5510" CreationDate="2010-11-11T21:54:26.217" UserDisplayName="Taksan" Text="If you want a single framework to support both 2D and 3D the closest I have seen is jPct. It is 3D but inside their forums they have some tweaks to do 2D.&#xD;&#xA;&#xD;&#xA;I recommend you go with Xith3D or Java Monkey Engine for 3D.&#xD;&#xA;And Slick or GTGE for 2D.&#xD;&#xA;&#xD;&#xA;I'm writing a book about java game development, I already completed the chapters on the basics for 2D and 3D java game development, it can give you a starting point, look here:&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/lucu&#xD;&#xA;&#xD;&#xA;Taksan" />
  <row Id="10829" PostHistoryTypeId="5" PostId="3479" RevisionGUID="7ddc903c-c48d-4a1f-84b7-faa21396b1fa" CreationDate="2010-11-11T22:09:12.037" UserId="189" Comment="added 410 characters in body" Text="According to your first requirement, you are looking for a **framework** rather than a library.&#xD;&#xA;&#xD;&#xA;[jMonkeyEngine][1] is a framework for 3D games (i.e. it provides the main loop as you ask for, similar to XNA) but it wouldn't be a good choice for 2D.&#xD;&#xA;&#xD;&#xA;However, **a game loop isn't a hard thing to write**, and existing Java libraries handle your 2nd and 3rd requirements, so I highly suggest looking into a scene graph 3D library/engine or any 2D library, depending on if you're making a 2D or a 3D game.&#xD;&#xA;&#xD;&#xA;[Aviatrix3D][2], [Ardor3D][3], [Java3D][4] and [jMonkeyEngine][5] are my recommendations for scene graph 3D engines.&#xD;&#xA;&#xD;&#xA;For 2D libraries, you have [JGame][6], or you can choose to use OpenGL for max speed and use [LWJGL][7] or [JOGL][8]. You could also just go with Java's built-in [Graphics2D][9] library, which would be an especially good option if you plan to deploy your game as an applet.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For going the built-in Graphics2D route, look at the [source code][10] to [Metagun][11] (click to play in applet form). It's a small but very well-written 2D Java game, and I think it's an excellent example of a small game; copy its structure and you have your optimal game loop/framework.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/&#xD;&#xA;  [2]: http://aviatrix3d.j3d.org/&#xD;&#xA;  [3]: http://www.ardor3d.com/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Java3d&#xD;&#xA;  [5]: http://www.jmonkeyengine.com/&#xD;&#xA;  [6]: http://www.13thmonkey.org/~boris/jgame/&#xD;&#xA;  [7]: http://www.lwjgl.org/&#xD;&#xA;  [8]: http://jogamp.org/jogl/www/&#xD;&#xA;  [9]: http://download.oracle.com/javase/tutorial/2d/index.html&#xD;&#xA;  [10]: http://www.mojang.com/compo/metagun/metagun-source.zip&#xD;&#xA;  [11]: http://www.mojang.com/compo/metagun/" />
  <row Id="10830" PostHistoryTypeId="2" PostId="5453" RevisionGUID="19efc215-057c-4f1e-945a-08542f07c15c" CreationDate="2010-11-11T22:41:04.643" UserId="312" Text="You could use a recursive function to generate a root crack, and along that root crack, generate smaller branches of cracks, and so on. You could even animate this to make the effect even cooler." />
  <row Id="10831" PostHistoryTypeId="2" PostId="5454" RevisionGUID="dd890900-a02b-48a5-a7b8-4562848df38a" CreationDate="2010-11-11T22:45:31.707" UserId="312" Text="Some things you could do are sway the camera, delay the controls, make the controls unresponsive or unpredictable, as well as blend in previous frames." />
  <row Id="10832" PostHistoryTypeId="2" PostId="5455" RevisionGUID="d15b47ce-b8d6-477e-94b2-baaee8181ae9" CreationDate="2010-11-11T23:13:14.770" UserId="2787" Text="I am on a small development team that is tasked with completing the server side programming for an Open Source MMO project that has been in progress for about 5 years now. Approximately a year ago we Open Sourced the project hoping to draw in new developers, this was without much success and in fact we haven't gained even one active developer in our project. The Project [Star Wars Galaxies A New Hope][1], is something near and dear to myself and the other few people working on the project. It is a quest to bring back one of the golden eras in gaming, Patch 14.1 for Star Wars galaxies. &#xD;&#xA;&#xD;&#xA;The progress as of this summer was extremely slow and it seemed as if we were taking two steps forward and one back every change we made. The codebase wasn't designed very well and we looked into completely rewriting it from scratch. After a couple of weeks we realized this couldn't be done in a timely manner and perhaps we should take another look at the old core to see if we couldn't revive it. We found it was worth just revamping the old core and continuing to push forward, we've made some really good changes that will help with the future of development. One reason we didn't really want to push heavy developer recruiting was the state of the existing codebase. &#xD;&#xA;&#xD;&#xA;Now that it is somewhat cleaned up, how do we go about recruiting quality individuals that are interested in finishing up this Open Source MMO project and delivering what we promised to the community?&#xD;&#xA;&#xD;&#xA;[Github Project][https://github.com/swganh] - not enough rep :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swganh.com&#xD;&#xA;" />
  <row Id="10833" PostHistoryTypeId="1" PostId="5455" RevisionGUID="d15b47ce-b8d6-477e-94b2-baaee8181ae9" CreationDate="2010-11-11T23:13:14.770" UserId="2787" Text="How do we attract more developers and indie enthusiasts to our Open Source MMO Emulation Project?" />
  <row Id="10834" PostHistoryTypeId="3" PostId="5455" RevisionGUID="d15b47ce-b8d6-477e-94b2-baaee8181ae9" CreationDate="2010-11-11T23:13:14.770" UserId="2787" Text="&lt;mmo&gt;&lt;open-source&gt;" />
  <row Id="10835" PostHistoryTypeId="4" PostId="5455" RevisionGUID="8b8031f0-abb6-44b6-9dbf-c3fd46edc5b7" CreationDate="2010-11-11T23:24:28.207" UserId="2787" Comment="edited title" Text="How do we attract more developers and other Volunteers to our Open Source MMO Emulation Project?" />
  <row Id="10836" PostHistoryTypeId="5" PostId="5455" RevisionGUID="f1a05659-de15-490b-b90c-5920985168f9" CreationDate="2010-11-11T23:48:15.230" UserId="2787" Comment="deleted 8 characters in body" Text="I am on a small development team that is tasked with completing the server side programming for an Open Source MMO project that has been in progress for about 5 years now. Approximately a year ago we Open Sourced the project hoping to draw in new developers, this was without much success and in fact we haven't gained even one active developer in our project. The Project [Star Wars Galaxies A New Hope][1], is something near and dear to myself and the other few people working on the project. It is a quest to bring back one of the golden eras in gaming, Patch 14.1 for Star Wars galaxies. &#xD;&#xA;&#xD;&#xA;The progress as of this summer was extremely slow and it seemed as if we were taking two steps forward and one back every change we made. The codebase wasn't designed very well and we looked into completely rewriting it from scratch. After a couple of weeks we realized this couldn't be done in a timely manner and perhaps we should take another look at the old core to see if we couldn't revive it. We found it was worth just revamping the old core and continuing to push forward, we've made some really good changes that will help with the future of development. One reason we didn't really want to push heavy developer recruiting was the state of the existing codebase. &#xD;&#xA;&#xD;&#xA;Now that it is somewhat cleaned up, how do we go about recruiting quality individuals that are interested in finishing up this Open Source MMO project and delivering what we promised to the community?&#xD;&#xA;&#xD;&#xA;[Github Project][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swganh.com&#xD;&#xA;[2]: https://github.com/swganh&#xD;&#xA;" />
  <row Id="10837" PostHistoryTypeId="2" PostId="5456" RevisionGUID="ba626fd4-6aac-4ec6-be05-bae5357e6f73" CreationDate="2010-11-12T00:04:04.323" UserDisplayName="Nathan Lands" Text="We're working on open sourcing this kind of discussion for the community at the Gamification Wiki @ http://www.gamification.org .   Contributions in terms of content and feedback highly appreciated:) " />
  <row Id="10838" PostHistoryTypeId="5" PostId="5451" RevisionGUID="bfd70548-c2cb-40d6-baec-e1261d93947c" CreationDate="2010-11-12T00:13:25.713" UserId="962" Comment="Fixed question details." Text="#How would one generate a texture for cracks in different materials?#&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would want to have the ability to simulate different variables like brittleness, or other variables to get varied end results.&#xD;&#xA;&#xD;&#xA;I would mainly need to generate impact cracks, so it would need to react to different impact angles and speeds.&#xD;&#xA;&#xD;&#xA;I am using ActionScript3, but general theory answers will be helpful as well.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10839" PostHistoryTypeId="6" PostId="5403" RevisionGUID="cfb6f70a-5353-4896-a202-a523cb4c757c" CreationDate="2010-11-12T00:42:45.177" UserId="2290" Comment="edited tags" Text="&lt;iphone&gt;&lt;windows&gt;" />
  <row Id="10840" PostHistoryTypeId="5" PostId="5104" RevisionGUID="aee207ed-36e3-4d68-a4d2-fafc8697370d" CreationDate="2010-11-12T02:51:52.053" UserId="2870" Comment="Clarified purpose of bio2s format and provide links to examples." Text="Does anyone have specifications for the bio2s scripting language from Bohemia Interactive? They develop Operation Flashpoint, Armed Assault (ArmA), and Virtual Battlespace.&#xD;&#xA;&#xD;&#xA;These scripts are sometimes called O2 or Oxygen scripts and are used in their terrain and modeling tools. Oxygen is Bohemia Interactive's modeling tool. &#xD;&#xA;&#xD;&#xA;I found additional examples of the format in [this VBS2 tutorial](http://developer.vbs2.com/onlinehelp/Content/Adding_Models/How_to/AMHT_Thermal_Imaging_How.htm) and this [ArmA forum thread](http://forums.bistudio.com/archive/index.php/t-70517.html).&#xD;&#xA;&#xD;&#xA;EDIT: I clarified the purpose of the bio2s format and provided some links to examples." />
  <row Id="10841" PostHistoryTypeId="2" PostId="5457" RevisionGUID="d7fbf4f4-bcb4-42c5-9be6-1881cb228519" CreationDate="2010-11-12T03:12:48.963" UserDisplayName="JinrohDev" Text="&lt;h3&gt;&lt;a href=&quot;http://www.amazon.com/Programming-Multiplayer-DirectX-Game-Development/dp/1584503637/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1289531474&amp;sr=1-1&quot;&gt;Programming A Multiplayer FPS in DirectX&lt;/a&gt;&lt;/h3&gt;&#xD;&#xA;   Great book that covers making an FPS engine with DirectX with multiplayer and an engine that supports Octree and Occlusion Culling" />
  <row Id="10842" PostHistoryTypeId="2" PostId="5458" RevisionGUID="3a2ccc3a-3e35-43b2-a7ea-0db5c7829f47" CreationDate="2010-11-12T03:52:50.630" UserDisplayName="JinrohDev" Text="&lt;h3&gt;&lt;a href=&quot;http://www.amazon.com/Tricks-Programming-Gurus-Advanced-Graphics-Rasterization/dp/0672318350/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1289531384&amp;sr=8-1&quot;&gt;Tricks of the 3D Game Programming Gurus&lt;/a&gt;&lt;/h3&gt;&#xD;&#xA;   All Aspects of the 3D Pipeline and how to optimize and implement them in software most efficiently as possible. Has many techniques that transfer to hardware well too." />
  <row Id="10843" PostHistoryTypeId="2" PostId="5459" RevisionGUID="5bea9bb6-e325-492f-bc99-2d12426fae86" CreationDate="2010-11-12T04:08:36.843" UserId="290" Text="Take a look at http://gamedev.stackexchange.com/questions/2791/finding-other-programmers-to-help-on-a-project/2800#2800 and see if my answer there resonates.  You have already started with the code cleanup. Basically, you just need to find groups of like minded people in clumps and pitch your idea." />
  <row Id="10844" PostHistoryTypeId="2" PostId="5460" RevisionGUID="b4032e77-2995-4374-a7c3-e3cfde903ac6" CreationDate="2010-11-12T04:37:53.503" UserId="2522" Text="I ask here so since y’all (I’m from Kentucky so bear me on it because it’s going to happen again) have experience in or around game programming and I’m trying to find as many options I can before my senior year, that be next year. So y’all (I still can’t believe I type that naturally) got any opinions on the matter of which would give me a better education in programming?&#xD;&#xA;&#xD;&#xA;Please no talking about anything other than the two degrees because I know of game programming degrees out there but I like to see which of these would provide the best alternate choice.&#xD;&#xA;" />
  <row Id="10845" PostHistoryTypeId="1" PostId="5460" RevisionGUID="b4032e77-2995-4374-a7c3-e3cfde903ac6" CreationDate="2010-11-12T04:37:53.503" UserId="2522" Text="Which is better a computer science degree or a Software engineer degree?" />
  <row Id="10846" PostHistoryTypeId="3" PostId="5460" RevisionGUID="b4032e77-2995-4374-a7c3-e3cfde903ac6" CreationDate="2010-11-12T04:37:53.503" UserId="2522" Text="&lt;education&gt;" />
  <row Id="10847" PostHistoryTypeId="2" PostId="5461" RevisionGUID="b58c1de2-964a-4f43-aee1-c1a3977b3a7a" CreationDate="2010-11-12T04:47:10.630" UserId="3212" Text="**[David Perry On Game Design: A Brainstorming Toolbox by David Perry, Rusel Demaria][1]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   It's the biggest book on game design ever written, at over 1,000 pages long. It's designed to help students &amp; designers come up with innovative new ideas, and also to expand current ideas. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/David-Perry-Game-Design-Brainstorming/dp/1584506687/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1289537312&amp;sr=1-1" />
  <row Id="10848" PostHistoryTypeId="2" PostId="5462" RevisionGUID="69a27bd2-0287-420b-83eb-4b747109460e" CreationDate="2010-11-12T04:47:53.897" UserId="2634" Text="There are indeed game designers out there, and it seems like a pretty interesting job. Usually folks are attracted to this job because they want the creative and leadership aspects of game development but aren't ready for the many years of hard work and preparation needed to do game programming or 3D art.  There's some expectation that there are programmers and artists out there just waiting for somebody to give them a great idea and tell them what to do. That's not been my experience.&#xD;&#xA;&#xD;&#xA;Unfortunately, a lot of college game design programs teach exactly this illusion.  Students pay a lot of money for a program that teaches a skill that may not really be in demand.&#xD;&#xA;&#xD;&#xA;Game programmers are usually game designers too. Programmers with the skills to work on games could often make quite a bit more with a lot less pain working in more traditional sectors. Game programming requires much more knowledge of math and physics than traditional business and database programming, for example. &#xD;&#xA;&#xD;&#xA;Game programmers usually started out as designers who learned an important truth:&#xD;&#xA;&#xD;&#xA;**You can become a game designer in two ways** - write the code or write the check. If you can pay somebody to implement the game you design, you're a designer.  If you can't pay, you probably need to learn some programming.&#xD;&#xA;&#xD;&#xA;To be fair, 3D art (especially the more challenging aspects: rigging, texture-mapping, animation, and lighting) is another great way to work yourself towards design, but the competition is much more fierce than in the programming arena.  &#xD;&#xA;&#xD;&#xA;The surest path to working in the game industry is to get a solid degree in computer science. Take all the math and physics he can, as well as the theoretical classes like data structures and algorithms.  &#xD;&#xA;&#xD;&#xA;This hard-core CS background can provide a significant competitive edge. If the person decides that the gaming industry isn't such a perfect deal (my students sometimes meet a girl, and everything changes) then they have a 'backup' that starts at 60K a year, has six openings for every applicant (at least in my state) and they'll still have the skills to write the game they really want to write on their own terms." />
  <row Id="10849" PostHistoryTypeId="2" PostId="5463" RevisionGUID="052e33c7-e9fe-401e-9596-0d12b5dd0fcd" CreationDate="2010-11-12T04:59:55.160" UserId="2634" Text="Since you're asking on the game development forum, I'm assuming you're interested in a game development career.  Both programs would be fine. They have some overlap, but they also would lead you in different directions.&#xD;&#xA;&#xD;&#xA;A traditional computer science program is aimed at the more theoretical aspects of computing. You'd generally work in more traditional languages (C/C++/Java) and you'd spend a lot of time contemplating data structures, algorithms, and efficiency. CS majors typically are required to take a great deal of Math and Science. (I encourage our students to get a Math minor, because they're only one course away by the time they take our requirements.)  The focus on math and theory are good preparation for certain kinds of game programming (say building game engines and creating lighting models.)  &#xD;&#xA;&#xD;&#xA;Software engineering has a different focus. Software engineering programs are typically more focused on business applications. The emphasis is on working with large teams of developers and building large software projects.  Games are a form of business application, so the skills would be applicable.&#xD;&#xA;&#xD;&#xA;Plenty of CS majors move into software engineering as they gain experience, but fewer people seem to move into CS after they've studied software engineering." />
  <row Id="10850" PostHistoryTypeId="2" PostId="5464" RevisionGUID="e9a43656-2e15-48cf-aeb7-4653b5febef6" CreationDate="2010-11-12T05:13:54.117" UserId="3212" Text="While working on a game project for Android i was digging for some information on **performance optimization** for game code. And i came to know that use of Java **Collections** like List,Arraylist etc are not encouraged in game codes,though collection is an useful tool in Java programming.Why is it so? I would like to know technical details as how much impact can Collection framework have on Android systems and why?&#xD;&#xA;Any help in this regard will be great.   " />
  <row Id="10851" PostHistoryTypeId="1" PostId="5464" RevisionGUID="e9a43656-2e15-48cf-aeb7-4653b5febef6" CreationDate="2010-11-12T05:13:54.117" UserId="3212" Text="Use of Collections in Android Game Development is not encouraged?" />
  <row Id="10852" PostHistoryTypeId="3" PostId="5464" RevisionGUID="e9a43656-2e15-48cf-aeb7-4653b5febef6" CreationDate="2010-11-12T05:13:54.117" UserId="3212" Text="&lt;android&gt;" />
  <row Id="10853" PostHistoryTypeId="2" PostId="5465" RevisionGUID="42b29bcd-ac2a-4ddd-80a3-77d9e5e31afb" CreationDate="2010-11-12T05:39:05.857" UserId="3214" Text="I've made games in 2D in the past, but on and off for the last 4 years I've been trying to learn 3D with no success. It is extremely demoralizing to me as a programmer to have never gotten passed this hurdle of mine. &#xD;&#xA;&#xD;&#xA;I literally have searched the web for a good -complete- walkthrough of the basics, 3D doesn't seem to be something that you can have your hand held through, whereas with a 2D game, it is QUITE easy to find tutorials in multiple languages that go through the creation of a window with such and such library, loading and drawing images, setting up game loop, calling update(dt) and draw() functions. &#xD;&#xA;&#xD;&#xA;My strongest language is Python, and I know PyGame well (for 2D). Is there a starting point on the web for 3D using PyGame? I have heard of PyOpenGL, which would be exactly what I need (since OpenGL is what most languages use for 3D), but there are ZERO books on OpenGL in Python, and I'm not sure if I can create a window in PyGame and run OpenGL code inside it.&#xD;&#xA;&#xD;&#xA;Your thoughts? Thanks" />
  <row Id="10854" PostHistoryTypeId="1" PostId="5465" RevisionGUID="42b29bcd-ac2a-4ddd-80a3-77d9e5e31afb" CreationDate="2010-11-12T05:39:05.857" UserId="3214" Text="Starting programming in 3D with Python" />
  <row Id="10855" PostHistoryTypeId="3" PostId="5465" RevisionGUID="42b29bcd-ac2a-4ddd-80a3-77d9e5e31afb" CreationDate="2010-11-12T05:39:05.857" UserId="3214" Text="&lt;3d&gt;&lt;python&gt;&lt;pygame&gt;" />
  <row Id="10856" PostHistoryTypeId="2" PostId="5466" RevisionGUID="3b2b88a4-ae0a-40be-a6b9-d454112ead3e" CreationDate="2010-11-12T05:52:33.940" UserId="395" Text="Maybe before jumping in to OpenGL it would be helpful to start with something higher level like [Panda3D](http://www.panda3d.org/manual/index.php/Main_Page). It provides a much simpler scene graph and animation interface, as well as numerous other supporting systems. It still isn't as simple as a 2D environment, but it should get you started a lot faster." />
  <row Id="10857" PostHistoryTypeId="2" PostId="5467" RevisionGUID="93a8d0c6-3c02-4afb-a9db-2f1ebaf8abce" CreationDate="2010-11-12T05:56:49.507" UserId="3196" Text="http://nehe.gamedev.net/default.asp is pretty good for learning opengl.  I can't find anything for pyopengl though." />
  <row Id="10858" PostHistoryTypeId="5" PostId="5465" RevisionGUID="a061e364-9b80-437c-971a-959a404f4d66" CreationDate="2010-11-12T06:00:09.550" UserId="3214" Comment="deleted 243 characters in body; edited tags; edited title" Text="EDIT: There aren't sufficient enough tutorials for what I'm trying to do in Python, so I'm going to take my time and slowly build up my skills in C++. It's hard to trip and not land in a book of C++ tutorials on game development and 3D programming.&#xD;&#xA;&#xD;&#xA;Once I get passed the basic syntax for classes in multiple files with preprocessor declarations, what is the next step in 3D?&#xD;&#xA;&#xD;&#xA;Do I use DirectX or OpenGL? If I use DirectX, are there sufficient enough books on the subject for a BEGINNER? Same question for OpenGL. I love programming books, I just feel that most of them are way below par - they either have good general explanations and terrible source code, or vice versa.&#xD;&#xA;&#xD;&#xA;Thanks for your time. I'll do my best to turn this into an active discussion on the matter." />
  <row Id="10859" PostHistoryTypeId="4" PostId="5465" RevisionGUID="a061e364-9b80-437c-971a-959a404f4d66" CreationDate="2010-11-12T06:00:09.550" UserId="3214" Comment="deleted 243 characters in body; edited tags; edited title" Text="Starting programming in 3D with C++" />
  <row Id="10860" PostHistoryTypeId="6" PostId="5465" RevisionGUID="a061e364-9b80-437c-971a-959a404f4d66" CreationDate="2010-11-12T06:00:09.550" UserId="3214" Comment="deleted 243 characters in body; edited tags; edited title" Text="&lt;c++&gt;&lt;3d&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="10861" PostHistoryTypeId="2" PostId="5468" RevisionGUID="bda59207-f193-47fb-b204-d957636e9fab" CreationDate="2010-11-12T06:49:05.250" UserId="666" Text="I just started this path with the [OpenGL SuperBible][1] and I would say its a good(long, 700 hardcore pages) path to start if you are confident, focused and dedicated. It starts really good and then it build up to the complicated shaders in a very nice way.&#xD;&#xA;&#xD;&#xA;Its a real challenge to do 3d programming at all and we (in gamedev) **not only want to do  3d programming**, we want 3d GAME programming, which makes things 10 times more complicated. Because everything is more complicated from modeling movement, to collision detection and all the way to assets and textures, everything is **exponentially more complicated.**&#xD;&#xA;&#xD;&#xA;I would say that the road ahead(to do a cool, nice, 3d game) is looking something like this from where I am standing:&#xD;&#xA;&#xD;&#xA; - Learn openGL(read a book or 2) (&lt; I&#xD;&#xA;   am in the middle of this&gt;)&#xD;&#xA; - Do stuff with openGL(do a toy project&#xD;&#xA;   or 2)&#xD;&#xA; - Learn about 3d engines(read a book or&#xD;&#xA;   2)&#xD;&#xA; - Do a 3d engine(do a prototype)&#xD;&#xA; - Make a simple game&#xD;&#xA; - Learn more (think, read, see other&#xD;&#xA;   engines)&#xD;&#xA; - Do a better 3d engine/settle for a 3d&#xD;&#xA;   engine made by someone else&#xD;&#xA; - Feel confortable with 3d, do big projects.&#xD;&#xA;&#xD;&#xA;So all and all, it seems like a path of over a year to get there, and I really hope is worth it!&#xD;&#xA;  [1]: http://www.starstonesoftware.com/OpenGL/" />
  <row Id="10862" PostHistoryTypeId="2" PostId="5469" RevisionGUID="dfe8d27c-3b85-4294-8807-953cc71b8f49" CreationDate="2010-11-12T07:29:10.467" UserId="2132" Text="There are more tutorials online for OpenGL than Direct3D, last I check. [Beginning OpenGL Games Programming][1] has a second edition, so it may be more recent. If you are looking to do an engine, I have read [C++ Games Programming from Start to Finish][2] and found it helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-OpenGL-Game-Programming-Second/dp/159863528X/ref=sr_1_1?ie=UTF8&amp;qid=1289546723&amp;sr=8-1&#xD;&#xA;  [2]: http://www.amazon.com/Game-Programming-Start-Finish-Development/dp/1584504323/ref=sr_1_7?ie=UTF8&amp;s=books&amp;qid=1289546897&amp;sr=8-7" />
  <row Id="10863" PostHistoryTypeId="2" PostId="5470" RevisionGUID="85949920-8225-4936-acb5-d8367bc93e54" CreationDate="2010-11-12T07:34:44.810" UserId="2132" Text="Does the game engine you use affect monetization of indie games? Of course, targeting difficult platforms is one of the issues.&#xD;&#xA;&#xD;&#xA;Besides that, how would the game engine used impact monetization of games, assuming cases where the developers is going through a portal and handling the online distribution themselves? As an example, if I make a game in DarkBASIC, will it be harder to sell it than one made with Popcaps Framework or ClanLib etc.?" />
  <row Id="10864" PostHistoryTypeId="1" PostId="5470" RevisionGUID="85949920-8225-4936-acb5-d8367bc93e54" CreationDate="2010-11-12T07:34:44.810" UserId="2132" Text="Game engines and  monetization of indie games" />
  <row Id="10865" PostHistoryTypeId="3" PostId="5470" RevisionGUID="85949920-8225-4936-acb5-d8367bc93e54" CreationDate="2010-11-12T07:34:44.810" UserId="2132" Text="&lt;monetization&gt;&lt;game-engines&gt;" />
  <row Id="10866" PostHistoryTypeId="2" PostId="5471" RevisionGUID="5a095058-b836-4379-840d-a424aec36494" CreationDate="2010-11-12T10:08:51.100" UserId="3076" Text="Certain engines are cross-platform, others are not. In theory, the more operating systems and devices that you can get your game on, the larger your potential audience. This is one of the great advantages of an engine like Unity3D where the theory is, you write code once and run it on PCs, Macs, browsers, iPads/iPhones and even consoles like the XBox and PS3. Engines which can do this though usually charge for each export option, and each export option has its own costs associated (like the $100 developer subscription to write iPhone apps).&#xD;&#xA;&#xD;&#xA;You want an engine which can give you as much control as you require. If you write a game in DarkBASIC, can you implement the Steam API if you want to get it on that platform?&#xD;&#xA;&#xD;&#xA;You mention that you will be selling through a portal, in that case, you certainly want to go for the most stable engine you can find. Casual gamers aren't the most computer savvy, you'll want your game to automatically load at the right resolution for their machine and you'll need to it 'just work'. Absolutely no error messages, otherwise the portals will get frustrated forwarding support queries to you.&#xD;&#xA;&#xD;&#xA;So out of Popcap's Framework and DarkBASIC? Definitely go for Popcap's framework, which isn't DirectX based and is way more proven." />
  <row Id="10867" PostHistoryTypeId="2" PostId="5472" RevisionGUID="be6e17ac-aef8-4a79-9002-eb582f9b456f" CreationDate="2010-11-12T11:00:05.170" UserId="338" Text="i'm doing a tactical game (X-Com / Fallout style) for fun.&#xD;&#xA;I've decided to use an hexagonal map, but i'm having a graphic problem. &#xD;&#xA;&#xD;&#xA;My current map display is HUD-like, with only the border of the map cells displayed, without any texture. it's simple and allow for display of different types of informations by varying the color of the border. For exemple the &quot;danger view mode&quot; displays the borders with a color going from green (no damage possible) to red (prob of damage &gt; 90%).&#xD;&#xA;&#xD;&#xA;Now, It's a bit hard to différenciate the kind of tile the player is on. I could put a plain color (green is grass, pale blue is water...), but this is going to limit the possibilities. Thus, i would like to display a texture on my tiles. Since the map are generated, i can not use a picture for the whole map with the HUD over.&#xD;&#xA;&#xD;&#xA;So, my question is : does any one knows how i could generate the sealess hexagonal textures (algo or plugin), or if there is a site with some hexagonal tiles ?&#xD;&#xA;&#xD;&#xA;Regards   &#xD;&#xA;Guillaume PATRY&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10868" PostHistoryTypeId="1" PostId="5472" RevisionGUID="be6e17ac-aef8-4a79-9002-eb582f9b456f" CreationDate="2010-11-12T11:00:05.170" UserId="338" Text="Hexagonal Tiles" />
  <row Id="10869" PostHistoryTypeId="3" PostId="5472" RevisionGUID="be6e17ac-aef8-4a79-9002-eb582f9b456f" CreationDate="2010-11-12T11:00:05.170" UserId="338" Text="&lt;tiles&gt;" />
  <row Id="10870" PostHistoryTypeId="2" PostId="5473" RevisionGUID="a5a25af2-4b26-4508-a38c-fd70efbce390" CreationDate="2010-11-12T11:27:38.457" UserId="2693" Text="The obvious answer seems to be, what are the contracts for said game engines? If they're open-source, what licence are they under? Do you accept the terms of that licence?&#xD;&#xA;&#xD;&#xA;Some game engines cost millions of dollars to licence. So obviously thats going to effect the monetization of your game.&#xD;&#xA;&#xD;&#xA;I don't see the engine making too much of a difference past that, though if the engine makes the game especially difficult to install or something then thats a problem. &#xD;&#xA;&#xD;&#xA;I'd say its more a question of, can you do all that you want with that engine?" />
  <row Id="10871" PostHistoryTypeId="2" PostId="5474" RevisionGUID="8422365a-6b63-4dbf-b3d3-05783539bf4c" CreationDate="2010-11-12T12:11:17.967" UserId="1352" Text="It's mostly about memory allocation and garbage collection. Memory allocations during runtime gives your garbage collector a chance to bring out the trash. Which hurts your performance. GC should happen as seldom as possible.&#xD;&#xA;&#xD;&#xA;Most java collections do:&#xD;&#xA;&#xD;&#xA;**A)** Allocate more memory than they need. &#xD;&#xA;&#xD;&#xA;**B)** Allocate memory when you don't want them to. &#xD;&#xA;&#xD;&#xA;**C)** Allocate memory for each iterator when iterating through a collection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To circumvent these things:&#xD;&#xA;&#xD;&#xA;**A)** Allocate collections with fixed sizes. ie. create object pools.&#xD;&#xA;&#xD;&#xA;**B)** Allocate these pools at program init.&#xD;&#xA;&#xD;&#xA;**C)** Avoid the for( Object obj : collection ) for those collection types that has a size() and a .get(int index) method.&#xD;&#xA;" />
  <row Id="10872" PostHistoryTypeId="2" PostId="5475" RevisionGUID="3836f893-6d0c-41e7-a7fc-5afbbfeb1c4f" CreationDate="2010-11-12T12:40:34.723" UserId="51" Text="Can't you just do a planar projection of a regular tiling texture onto your tiles and just have hard edges where your tile types switch?  So on your hexes that are &quot;grass&quot; just map their UVs in &quot;map space&quot; to a repeating grass texture. " />
  <row Id="10873" PostHistoryTypeId="2" PostId="5476" RevisionGUID="0392f019-ebcd-49cc-b83a-d72a7eda529a" CreationDate="2010-11-12T13:39:24.853" UserId="2316" Text="[cocos2d][1] is an **AMAZING** library.  They do hex tile maps.  :D&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gaminghorror.net/steffenj/first-steps-towards-a-cocos2d-hex-tile-engine/" />
  <row Id="10874" PostHistoryTypeId="2" PostId="5477" RevisionGUID="5bddc35c-a982-4319-b9c2-36390d0a4ead" CreationDate="2010-11-12T13:48:30.503" UserId="119" Text="If I wanted to launch a free-to-play game with different characters, weapons, items and clothes that can be either unlocked through gameplay or bought with real money, what percentage of items should only be available for real money? This isn't &quot;subjective&quot; - I'm interested in examples of real games and estimates of what percentage of their content is free." />
  <row Id="10875" PostHistoryTypeId="1" PostId="5477" RevisionGUID="5bddc35c-a982-4319-b9c2-36390d0a4ead" CreationDate="2010-11-12T13:48:30.503" UserId="119" Text="What percentage of game content is normally free on a Free-to-Play game?" />
  <row Id="10876" PostHistoryTypeId="3" PostId="5477" RevisionGUID="5bddc35c-a982-4319-b9c2-36390d0a4ead" CreationDate="2010-11-12T13:48:30.503" UserId="119" Text="&lt;free-to-play&gt;" />
  <row Id="10877" PostHistoryTypeId="2" PostId="5478" RevisionGUID="f9d1e293-5672-4900-bb1f-31740484d971" CreationDate="2010-11-12T14:09:18.030" UserId="2316" Text="Both will give you a good education in programming.  The primary difference is that Comp Sci will enable you to [solve problems that no one else can][1], whereas Comp Eng is geared more towards delivering products to customers.&#xD;&#xA;&#xD;&#xA;Both are necessary for good development, and will round out a good dev team.  It depends on whether you are more science minded (answer questions) or engineering minded (design solutions).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fast_inverse_square_root" />
  <row Id="10878" PostHistoryTypeId="2" PostId="5479" RevisionGUID="4d09ae3c-6836-45ca-8894-cb87d5fb9b5a" CreationDate="2010-11-12T14:13:27.570" UserId="3015" Text="## Analysis&#xD;&#xA;&#xD;&#xA;The problem with asking for a hard figure here, is that this is an extremely variable number.&#xD;&#xA;&#xD;&#xA;On the one hand, you have something like World of Warcraft, which, while not exactly Free-to-Play, still might serve as an illustrative example on the one end of the spectrum, with *approximately* 0% of content that is only available for cash. (The Spectral Horsie)&#xD;&#xA;&#xD;&#xA;On the other side of the spectrum you have producers like Zynga (of FarmVille fame) who maintain a catalog that is, at a wild guesstimate, about 50-60% cash-only items, and a fair chunk of these items are additionally time-limited (e.g. Halloween stuff, Christmas stuff, etc.)&#xD;&#xA;&#xD;&#xA;On the gripping hand, it might be interesting to mention the spectacularly successful game by EA, The Sims 3. If you discount the initial cost of the game, which is relatively low and a one-time expenditure; their model works a lot like a Free-to-Play game.&#xD;&#xA;&#xD;&#xA;Another wild guesstimate on my part puts their for-cash catalog at about 50%; unless you count content from the expansions. (A fairly rough breakdown puts cash-only content at about 30% of their catalog; free content at about 30%, and an additional 40% in expansion pack content.)&#xD;&#xA;&#xD;&#xA;And here's the real clever bit what they do: With each expansion they bump the version number, giving players a host of new gameplay features; if you don't buy the expansion, but keep the &quot;free-to-play&quot; version; you only get the framework, and not the content required to make the feature interesting.&#xD;&#xA;&#xD;&#xA;## Summary&#xD;&#xA;&#xD;&#xA;How much pay-to-play content you can get away with is strongly related to how much the game costs to play. In a Free-to-play game, you can probably get away with as much as 60-70%; but a more optimal popularity/profit-scale is probably achieved from setting it at about 50%.&#xD;&#xA;&#xD;&#xA;Additionally, as demonstrated by the WoW example above; the ratio is not as important as the price and relative coolness of the item. Even if you only have *one* cash-only item, if it's insanely awesome you can make an incredible amount of money from it, even if it's just cosmetic, so long as you have enough players. (Estimates put the Celestial Steed at about **$2.5 million** of income, at the very least.)&#xD;&#xA;&#xD;&#xA;## Summary of the summary&#xD;&#xA;&#xD;&#xA;  1. Make items that confer stat bonuses, power and glory attainable to all players, or you'll lose them as they realize your free-to-play game is actually free-to-play-pay-to-win.&#xD;&#xA;&#xD;&#xA;  2. Package your ball-shatteringly awesome cosmetic items with ho-hum or sub-par stats up and sell them to your large player base for a stiff but reasonable price.&#xD;&#xA;&#xD;&#xA;  3. ????&#xD;&#xA;&#xD;&#xA;  4. [Profit][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://knowyourmeme.com/memes/profit" />
  <row Id="10879" PostHistoryTypeId="5" PostId="5479" RevisionGUID="d66207a1-fd75-4033-8ff9-a796b78b649d" CreationDate="2010-11-12T14:34:32.630" UserId="3015" Comment="added 436 characters in body" Text="## Analysis&#xD;&#xA;&#xD;&#xA;The problem with asking for a hard figure here, is that this is an extremely variable number.&#xD;&#xA;&#xD;&#xA;On the one hand, you have something like World of Warcraft, which, while not exactly Free-to-Play, still might serve as an illustrative example on the one end of the spectrum, with *approximately* 0% of content that is only available for cash. (The Celestial Steed)&#xD;&#xA;&#xD;&#xA;On the other side of the spectrum you have producers like Zynga (of FarmVille fame) who maintain a catalog that is, at a wild guesstimate, about 50-60% cash-only items, and a fair chunk of these items are additionally time-limited (e.g. Halloween stuff, Christmas stuff, etc.) (**Note:** For various reasons, these numbers are difficult or impossible to pin down to an exact number; but when browsing the store in a game like FarmVille or FrontierVille, it seems as if basically every other item is bought with for-cash currency.)&#xD;&#xA;&#xD;&#xA;On the gripping hand, it might be interesting to mention the spectacularly successful game by EA, The Sims 3. If you discount the initial cost of the game, which is relatively low and a one-time expenditure; their model works a lot like a Free-to-Play game.&#xD;&#xA;&#xD;&#xA;Another wild guesstimate on my part puts their for-cash catalog at about 50%; unless you count content from the expansions. (A fairly rough breakdown puts cash-only content at about 30% of their catalog; free content at about 30%, and an additional 40% in expansion pack content.) (**Note:** Again, these numbers are hard to pin down, as they aren't exactly published anywhere; but these rough estimates are based on observation of the EA store for TS3 content.)&#xD;&#xA;&#xD;&#xA;And here's the real clever bit what they do: With each expansion they bump the version number, giving players a host of new gameplay features; if you don't buy the expansion, but keep the &quot;free-to-play&quot; version; you only get the framework, and not the content required to make the feature interesting.&#xD;&#xA;&#xD;&#xA;## Summary&#xD;&#xA;&#xD;&#xA;How much pay-to-play content you can get away with is strongly related to how much the game costs to play. In a Free-to-play game, you can probably get away with as much as 60-70%; but a more optimal popularity/profit-scale is probably achieved from setting it at about 50%.&#xD;&#xA;&#xD;&#xA;Additionally, as demonstrated by the WoW example above; the ratio is not as important as the price and relative coolness of the item. Even if you only have *one* cash-only item, if it's insanely awesome you can make an incredible amount of money from it, even if it's just cosmetic, so long as you have enough players. (Estimates put the Celestial Steed at about **$2.5 million** of income, at the very least.)&#xD;&#xA;&#xD;&#xA;## Summary of the summary&#xD;&#xA;&#xD;&#xA;  1. Make items that confer stat bonuses, power and glory attainable to all players, or you'll lose them as they realize your free-to-play game is actually free-to-play-pay-to-win.&#xD;&#xA;&#xD;&#xA;  2. Package your ball-shatteringly awesome cosmetic items with ho-hum or sub-par stats up and sell them to your large player base for a stiff but reasonable price.&#xD;&#xA;&#xD;&#xA;  3. ????&#xD;&#xA;&#xD;&#xA;  4. [Profit][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://knowyourmeme.com/memes/profit" />
  <row Id="10880" PostHistoryTypeId="5" PostId="5460" RevisionGUID="6a6402a6-5c53-4604-84c4-98a828587a27" CreationDate="2010-11-12T14:59:26.047" UserId="2522" Comment="added 35 characters in body" Text="I'm asking here so since y’all (I’m from Kentucky so bear me on it because it’s going to happen again) have experience in or around game programming,that's what I want to do, and I’m trying to find as many options I can before my senior year, that be next year. So y’all (I still can’t believe I type that naturally) got any opinions on the matter of which would give me a better education in programming?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please no talking about anything other than the two degrees because I know of game programming degrees out there but I like to see which of these would provide the best alternate choice.&#xD;&#xA;" />
  <row Id="10881" PostHistoryTypeId="2" PostId="5480" RevisionGUID="e178eef0-7425-436b-8eb5-fd1e16346902" CreationDate="2010-11-12T15:07:23.573" UserId="2316" Text="The [US Virtual Good market][1] (freemium games qualify) is expected to hit 1.6 Billion dollars this year.&#xD;&#xA;&#xD;&#xA;0.01% of that is still 100K.  &#xD;&#xA;&#xD;&#xA;You shouldn't concern yourself with percentage, per se, but with content.  *Which* items are paid for may be more important than *how many.*  &#xD;&#xA;&#xD;&#xA;My general rule is this, if an Item can save someone 5-10 minutes during game play, or advance to the next &quot;level&quot; automatically (like a +1 item) charge a buck.  Angry Birds uses this idea with the [Mighty Eagle][2].&#xD;&#xA;&#xD;&#xA;In all the zynga games I've played, it was either A) advertise for them by friending people, or B) pay money to advance past an hour of play.  I don't necessarily like this style, because it frustrates me and forces me to stop playing if I don't have the friends.&#xD;&#xA;&#xD;&#xA;In my game (Shining Force style game) I'm making 'promotion' cost money.  You can still beat the game with a level 30 fighter, but a level 30 dragoon will be so much cooler.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://venturebeat.com/2010/01/26/as-farmville-players-buy-little-pink-tractors-u-s-virtual-goods-revenue-is-expected-to-hit-1-6b/&#xD;&#xA;  [2]: http://www.tuaw.com/2010/09/15/angry-birds-introducing-mighty-eagle-costs-real-money-to-skip-l/" />
  <row Id="10882" PostHistoryTypeId="2" PostId="5481" RevisionGUID="50adc169-ef82-4a9c-94ec-1a2a30a75e20" CreationDate="2010-11-12T15:08:26.800" UserId="2188" Text="I've recently locked most of my game; despite having really few users you might be interested.&#xD;&#xA;&#xD;&#xA;There are 6 classes (&quot;levels&quot;), and non-paying users may only acquire class 0 or class 1 players and weapons. Also, they can't do direct trading with other users, but they are allowed to use the auction (still can buy only class 0 or class 1 stuff).&#xD;&#xA;&#xD;&#xA;Moreover, I have set up an exclusive conference, that will be the &quot;main&quot; conference, only for paying users. Non-paying users can still play as much as they want in the &quot;lesser&quot; conference." />
  <row Id="10883" PostHistoryTypeId="5" PostId="5460" RevisionGUID="6ba651f4-f45d-423c-adc2-389af2f40902" CreationDate="2010-11-12T15:08:28.517" UserId="2522" Comment="deleted 2 characters in body" Text="I'm asking here so since y’all (I’m from Kentucky so bear me on it because it’s going to happen again) have experience in or around game programming,that's what I want to do, and I’m trying to find as many options I can before my senior year, that be next year. So y’all (I still can’t believe I type that naturally) got any opinions on the matter of which would give me a better education in programming?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please no talking about anything other than the two degrees because I know of game programming degrees out there but I like to see which of these would provide the best alternate choice." />
  <row Id="10884" PostHistoryTypeId="2" PostId="5482" RevisionGUID="30bb0748-c710-4c03-864c-bcc5b2feb4b1" CreationDate="2010-11-12T15:21:33.850" UserId="2522" Text="Well you'ed have to guess on it really since most of the games change there what the player can only buy with real money list, sorry best thing I could think of. Most of the games I've played with free-to-play usally keep around, and I'm guessing a bit, like 5-10 percent like  Joe Wreschnig said, but it is really up to how big it is. If it is like a small game, like im guessing yours would be at the beggining, they make almost everything avaible in-game but really hard to get like a very rare drop and might have a few items that you can only buy, but it gives you a big advantage.&#xD;&#xA;&#xD;&#xA;Check games like holy-war, Shogon Kingdom, and maybe game company's like perfect world if you want to reasearch your self." />
  <row Id="10885" PostHistoryTypeId="2" PostId="5483" RevisionGUID="61d18e11-42ae-4aa9-bb7c-e878e3afef49" CreationDate="2010-11-12T16:50:52.850" UserId="3267" Text="Playing around with creating minecraftish/lego world landscapes in Unity 3D (procedurally generated voxel landscapes with cubes), I'm finding that the meshes created for these landscapes take up a LOT of memory. The mesh currently only consists of vertices for visible sides of a cube. Memory usage for a complex terrain may take 6 or 7 hundred megs.&#xD;&#xA;&#xD;&#xA;These meshes could be optimized, but I'm struggling to find a decent algorithm to do this.&#xD;&#xA;&#xD;&#xA;The algorithm has to take into account that you don't want to &quot;merge&quot; blocks that are of different terrain types. I guess a really simple start might be to just process all blocks along one axis, and do extra sweeps for the other two axis.&#xD;&#xA;&#xD;&#xA;Any thoughts/suggestions/tips on this? Thanks in advance.&#xD;&#xA;&#xD;&#xA;Here's a link to an image I currently have. Lots of blocks.\&#xD;&#xA;http://img716.imageshack.us/img716/408/bigcliffs2.jpg&#xD;&#xA;" />
  <row Id="10886" PostHistoryTypeId="1" PostId="5483" RevisionGUID="61d18e11-42ae-4aa9-bb7c-e878e3afef49" CreationDate="2010-11-12T16:50:52.850" UserId="3267" Text="I need to optimize a mesh" />
  <row Id="10887" PostHistoryTypeId="3" PostId="5483" RevisionGUID="61d18e11-42ae-4aa9-bb7c-e878e3afef49" CreationDate="2010-11-12T16:50:52.850" UserId="3267" Text="&lt;3d-meshes&gt;" />
  <row Id="10888" PostHistoryTypeId="4" PostId="5483" RevisionGUID="4214b29c-2e6b-4987-b57e-434b1083bfe0" CreationDate="2010-11-12T17:03:57.673" UserId="3267" Comment="Made title more accurate" Text="Optimizing a mesh for voxel cube landscapes" />
  <row Id="10889" PostHistoryTypeId="5" PostId="5483" RevisionGUID="aef2b148-072b-4bcc-85ff-30dd2521a6f0" CreationDate="2010-11-12T17:11:33.807" UserId="3267" Comment="added 314 characters in body" Text="Playing around with creating minecraftish/lego world landscapes in Unity 3D (procedurally generated voxel landscapes with cubes), I'm finding that the meshes created for these landscapes take up a LOT of memory. The mesh currently only consists of vertices for visible sides of a cube. Memory usage for a complex terrain may take 6 or 7 hundred megs.&#xD;&#xA;&#xD;&#xA;These meshes could be optimized, but I'm struggling to find a decent algorithm to do this.&#xD;&#xA;&#xD;&#xA;The algorithm has to take into account that you don't want to &quot;merge&quot; blocks that are of different terrain types. I guess a really simple start might be to just process all blocks along one axis, and do extra sweeps for the other two axis.&#xD;&#xA;&#xD;&#xA;Any thoughts/suggestions/tips on this? Thanks in advance.&#xD;&#xA;&#xD;&#xA;Here's a link to an image I currently have. Lots of blocks.\&#xD;&#xA;http://img716.imageshack.us/img716/408/bigcliffs2.jpg&#xD;&#xA;&#xD;&#xA;I forgot to mention an important bit of information. I need to keep the mesh shape, that is no merging of vertices to the point that empty or solid space is changed. The reason is, there may be creatures/etc that still need to navigate around the mesh. So I can't just create a really low detail, distorted mesh." />
  <row Id="10890" PostHistoryTypeId="5" PostId="5390" RevisionGUID="cee62e38-762f-4575-a8af-f4439cf5c121" CreationDate="2010-11-12T17:53:58.560" UserId="154" Comment="grammer/spelling fix" Text="**What does the job game designer entail?** &#xD;&#xA;&#xD;&#xA;I always explain design to people like this:&#xD;&#xA;&#xD;&#xA;&lt;blockquote&gt;What's the difference between Black Jack and Poker?&lt;/blockquote&gt;&#xD;&#xA;&#xD;&#xA;They both involved players and the same deck of cards, but are entirely different games because the rules that define how the games are played are different. In essence that is what a designer does, writes a series of rules as to how a game plays.&#xD;&#xA;&#xD;&#xA;These days as games get more complicated, the job often includes narrative elements in the areas of story/setting/characters. Although many parts of that are given to people dedicated to writing and not design.&#xD;&#xA;&#xD;&#xA;Design is a pretty broad term in the industry and it covers everything from high level system design (rules) to narrative design (story/character) to level design (the placing of assets and scripting)&#xD;&#xA;&#xD;&#xA;**What tools do you have to learn how to use?** &#xD;&#xA;&#xD;&#xA;Getting a job directly as a designer is hard. Many of us came from either Programming or Art backgrounds or in my case both. On smaller teams, it'll be expected that you can do something other than design full time as well. The tools change depending on the type of design you are doing.&#xD;&#xA;&#xD;&#xA;*System designer/Creative Director* - Most time spent in Excel, Word, and Powerpoint. &#xD;&#xA;&#xD;&#xA;*Narrative designer* - Word, maybe Final Draft. These guys are mostly writers.&#xD;&#xA;&#xD;&#xA;*Level Designers* - Excel, custom level design software or common 3rd party tools (UnrealEd, and so on) Typically should be comfortable navigating the popular 3D-art packages (Max/Maya)&#xD;&#xA;&#xD;&#xA;**What unique skills do you need?** &#xD;&#xA;&#xD;&#xA;Communication, both writing and verbal is probably your most often used skill once you get to the higher levels of design. Coming up with a design is a pretty small part of the job. You spend most of the time communicating how to build that design to the rest of the team.&#xD;&#xA;&#xD;&#xA;Critical thinking, ability to break down a problem into a series of small discrete steps. It's not enough to play a bunch of games. You need to be able to clearly understand how the parts of those games work together. When/why they combine and work, and why they can fail when combined.&#xD;&#xA;&#xD;&#xA;Level designers benefit from an art background. An understanding of composition and architecture both help.&#xD;&#xA;&#xD;&#xA;A basic psychology understanding is also helpful for designers. The more you understand about how and why people respond to stimulus the better your can predict their response to future designs. " />
  <row Id="10891" PostHistoryTypeId="2" PostId="5484" RevisionGUID="aa43d114-31e5-4554-bb7a-14dc48e943d7" CreationDate="2010-11-12T18:01:33.683" UserId="370" Text="Computer Science and Software Engineering should be different courses of study, but you'll find that most colleges only offer one.  Most schools only offer a Computer Science program, which is essentially combining the two.&#xD;&#xA;&#xD;&#xA;I attribute this to the relative youth of computer science as an area of study.  Just a decade or two ago most Universities didn't have a computer science departments.  The computer scientists where just part of the mathematics department." />
  <row Id="10892" PostHistoryTypeId="5" PostId="5478" RevisionGUID="c9465a8c-2536-4a81-af28-9e684a7f8eff" CreationDate="2010-11-12T18:23:01.707" UserId="2316" Comment="typo, changed `comp eng` to `soft eng`" Text="Both will give you a good education in programming.  The primary difference is that Comp Sci will enable you to [solve problems that no one else can][1], whereas Soft Eng is geared more towards delivering products to customers.&#xD;&#xA;&#xD;&#xA;Both are necessary for good development, and will round out a good dev team.  It depends on whether you are more science minded (answer questions) or engineering minded (design solutions).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fast_inverse_square_root" />
  <row Id="10893" PostHistoryTypeId="2" PostId="5485" RevisionGUID="a4efd5aa-971e-4796-b22b-176686a736c3" CreationDate="2010-11-12T18:27:52.333" UserId="51" Text="Are you only creating the cubes for parts of the geometry the player can see?  That would be my first step.  Depending on the size of your terrain you don't have to have the entirety of the world loaded/drawing/visible/whatever." />
  <row Id="10894" PostHistoryTypeId="5" PostId="5460" RevisionGUID="ebe106f1-bff7-43d9-b6d5-682880d409a1" CreationDate="2010-11-12T18:28:57.420" UserId="51" Comment="seriously..." Text="I'm asking here so since you all have experience in or around game programming, that's what I want to do, and I’m trying to find as many options as I can before my senior year, which is next year. So do you have any opinions on the matter of which would give me a better education in programming?&#xD;&#xA;&#xD;&#xA;Please no talking about anything other than the two degrees because I know of game programming degrees out there but I like to see which of these would provide the best alternate choice." />
  <row Id="10895" PostHistoryTypeId="2" PostId="5486" RevisionGUID="26665c59-eaf3-49a3-8382-144faa672102" CreationDate="2010-11-12T18:39:17.670" UserId="51" Text="I point you to [my popular answer](http://gamedev.stackexchange.com/questions/1611/game-development-degree-vs-computer-science-degree/1612#1612) in the CS vs. Game Dev degree question.&#xD;&#xA;&#xD;&#xA;Basically I feel it really doesn't matter all that much as to which degree you choose.  Pick whichever one has courses that seem most interesting to you, take advantage of electives in your major that seem pertinent (i.e. algorithms, numerical analysis, etc) and learn game specific programming or do some mod work on the side.  " />
  <row Id="10896" PostHistoryTypeId="2" PostId="5487" RevisionGUID="79bd3dac-de37-4614-915a-7b3d710a92fd" CreationDate="2010-11-12T18:46:19.790" UserId="1875" Text="I checked out the Torque site and realized they are for sale. Read More Here -&gt;[Torque Site][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torquepowered.com/community/blogs/view/20495&#xD;&#xA;&#xD;&#xA;My question is would an engine product like this be viable if it went to Open Source? I can't imagine the not opening it up if they are not going to support it anymore. It does give you cross-platform Windows/Mac/Linux base.&#xD;&#xA;" />
  <row Id="10897" PostHistoryTypeId="1" PostId="5487" RevisionGUID="79bd3dac-de37-4614-915a-7b3d710a92fd" CreationDate="2010-11-12T18:46:19.790" UserId="1875" Text="Torque Game Engine Out of Business?" />
  <row Id="10898" PostHistoryTypeId="3" PostId="5487" RevisionGUID="79bd3dac-de37-4614-915a-7b3d710a92fd" CreationDate="2010-11-12T18:46:19.790" UserId="1875" Text="&lt;engine&gt;&lt;torque&gt;&lt;torque-x&gt;" />
  <row Id="10899" PostHistoryTypeId="2" PostId="5488" RevisionGUID="a241fb4b-06f3-45d6-86b6-2263b899262d" CreationDate="2010-11-12T18:54:02.887" UserId="1352" Text="My question is: &#xD;&#xA;&#xD;&#xA;Why would you need the mesh itself to do creature movement?&#xD;&#xA;&#xD;&#xA;Can't you do the pathing calculation on a 3d matrix of id's?&#xD;&#xA;&#xD;&#xA;I think Minecraft uses a 3d matrix with 4 bits pr block. It also only simulates creatures a certain radius around the player.&#xD;&#xA;&#xD;&#xA;You could store your chunks in a oc-tree structure, where each chunk is compressed.&#xD;&#xA;&#xD;&#xA;If you keep the compressed data in RAM you can decompress the data quite quickly when needed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10900" PostHistoryTypeId="2" PostId="5489" RevisionGUID="2156ba7b-9440-4505-9b60-203595b6b42f" CreationDate="2010-11-12T19:07:00.360" UserId="2910" Text="http://www.escapistmagazine.com/videos/view/extra-credits/2443-So-You-Want-to-be-a-Game-Designer&#xD;&#xA;&#xD;&#xA;=D" />
  <row Id="10901" PostHistoryTypeId="10" PostId="5487" RevisionGUID="51aeb8ed-9eba-4bc4-afb6-1e2775b0a409" CreationDate="2010-11-12T20:09:23.387" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="10902" PostHistoryTypeId="5" PostId="5488" RevisionGUID="856bac1d-09cc-4b31-9f8a-7b4ad5f17a53" CreationDate="2010-11-12T20:21:03.877" UserId="1352" Comment="added 53 characters in body" Text="My question is: &#xD;&#xA;&#xD;&#xA;Why would you need the mesh itself to do creature movement?&#xD;&#xA;&#xD;&#xA;Can't you do the pathing calculation on a 3d matrix of id's?&#xD;&#xA;&#xD;&#xA;I think Minecraft uses a 3d matrix with 4 bits pr block. It also only simulates creatures a certain radius around the player.&#xD;&#xA;&#xD;&#xA;You could store your chunks in a oc-tree structure, where each chunk is compressed.&#xD;&#xA;&#xD;&#xA;If you keep the compressed data in RAM you can decompress the data quite quickly when needed.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/oiMoK.png" />
  <row Id="10903" PostHistoryTypeId="2" PostId="5490" RevisionGUID="1c1ac071-1396-4c52-af21-e22719ba0e22" CreationDate="2010-11-12T20:46:00.743" UserId="3214" Text="For OpenGL, the OpenGL SuperBible 5th edition was just released only a few months ago, and is considered a fantastic, highly rated book for not only learning OpenGL 3 (Part 1 of the book), but it also goes into advanced OpenGL topics in Parts 2 and 3.&#xD;&#xA;&#xD;&#xA;For DirectX, what is the current material we should be reading to learn? Books &amp; websites with tutorials welcome. Are there any modern books available that go through the CURRENT version of DirectX that are intended for a beginning audience with a decent grasp of C++, but with no experience for DirectX at all? &#xD;&#xA;" />
  <row Id="10904" PostHistoryTypeId="1" PostId="5490" RevisionGUID="1c1ac071-1396-4c52-af21-e22719ba0e22" CreationDate="2010-11-12T20:46:00.743" UserId="3214" Text="What are the current books for DirectX (w/ focus on 3D)?" />
  <row Id="10905" PostHistoryTypeId="3" PostId="5490" RevisionGUID="1c1ac071-1396-4c52-af21-e22719ba0e22" CreationDate="2010-11-12T20:46:00.743" UserId="3214" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="10906" PostHistoryTypeId="5" PostId="5490" RevisionGUID="1960d9b8-0962-4bea-87d3-caa35dcd3eea" CreationDate="2010-11-12T21:01:19.050" UserId="3214" Comment="added 190 characters in body" Text="For OpenGL, the OpenGL SuperBible 5th edition was just released only a few months ago, and is considered a fantastic, highly rated book for not only learning OpenGL 3 (Part 1 of the book), but it also goes into advanced OpenGL topics in Parts 2 and 3.&#xD;&#xA;&#xD;&#xA;For DirectX, what is the current material we should be reading to learn? Books &amp; websites with tutorials welcome. Are there any modern books available that go through the CURRENT version of DirectX that are intended for a beginning audience with a decent grasp of C++, but with no experience for DirectX at all? &#xD;&#xA;&#xD;&#xA;This one seems to be highly praised, I'll check it out!: http://www.amazon.com/Introduction-Game-Programming-DirectX-ebook/dp/B0028085RK/ref=sr_1_cc_1?ie=UTF8&amp;qid=1289595540&amp;sr=1-1-catcorr" />
  <row Id="10907" PostHistoryTypeId="2" PostId="5491" RevisionGUID="580a867c-a847-45b4-88ec-29d9721a5328" CreationDate="2010-11-12T21:10:10.867" UserId="1573" Text="The question that should really make your decision is &quot;which is the better school?&quot;  When I'm reviewing resumes, I typically consider CS and SE degrees to be pretty much equivalent. I know the curricula differ, but not in any standard way between schools, and a high GPA in either degree serves the same purpose of imbecile-filtering." />
  <row Id="10908" PostHistoryTypeId="2" PostId="5492" RevisionGUID="e0d29e23-3b40-4f3d-acf2-9f94aadc5650" CreationDate="2010-11-12T22:17:09.030" UserId="744" Text="Unlike OpenGL, which has a hodgepodge of tutorials, many vendors and implementations, and good but somewhat archaic (unless you're like me and enjoy reading man page style) reference documentation, DirectX has one implementation, and &lt;a href=&quot;http://msdn.microsoft.com/en-us/directx/default.aspx&quot;&gt;Microsoft maintains a good DirectX hub on MSDN&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Not that there aren't good books about DirectX, but &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ee416804%28v=VS.85%29.aspx&quot;&gt;many of these tutorials&lt;/a&gt; are equivalent in content and more up-to-date, e.g. &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ee416568%28v=VS.85%29.aspx&quot;&gt;the DirectX 11 tutorial and samples&lt;/a&gt;." />
  <row Id="10909" PostHistoryTypeId="2" PostId="5493" RevisionGUID="5651ba7c-3d3a-4a37-a657-4574b2b5b094" CreationDate="2010-11-12T22:24:12.840" UserId="225" Text="I know about BSP trees, Octrees and Portal that where used for a long time. But modern games still use this systems or they are using new things?&#xD;&#xA;&#xD;&#xA;If it's possible with pros and cons, considering rendering and collision detection.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;PS: If someone could tag this correctly would be great, I don't have reputation to create tags, I was thinking something like: bsp, octree, space-partitioning&#xD;&#xA;" />
  <row Id="10910" PostHistoryTypeId="1" PostId="5493" RevisionGUID="5651ba7c-3d3a-4a37-a657-4574b2b5b094" CreationDate="2010-11-12T22:24:12.840" UserId="225" Text="What's the state of the art in Space Partitioning for games?" />
  <row Id="10911" PostHistoryTypeId="3" PostId="5493" RevisionGUID="5651ba7c-3d3a-4a37-a657-4574b2b5b094" CreationDate="2010-11-12T22:24:12.840" UserId="225" Text="&lt;language-agnostic&gt;" />
  <row Id="10912" PostHistoryTypeId="5" PostId="5451" RevisionGUID="f77c7981-8e86-47e0-8a3c-895d0c33c367" CreationDate="2010-11-12T22:25:19.203" UserId="744" Comment="Make the question the question." Text="&#xD;&#xA;I would want to have the ability to simulate different variables like brittleness, or other variables to get varied end results.&#xD;&#xA;&#xD;&#xA;I would mainly need to generate impact cracks, so it would need to react to different impact angles and speeds.&#xD;&#xA;&#xD;&#xA;I am using ActionScript3, but general theory answers will be helpful as well.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10913" PostHistoryTypeId="4" PostId="5451" RevisionGUID="f77c7981-8e86-47e0-8a3c-895d0c33c367" CreationDate="2010-11-12T22:25:19.203" UserId="744" Comment="Make the question the question." Text="How would one generate a texture for cracks in different materials?" />
  <row Id="10914" PostHistoryTypeId="2" PostId="5494" RevisionGUID="9fc5b7d5-53ed-4742-bfb4-5050c2d8a720" CreationDate="2010-11-12T22:53:04.007" UserId="3271" Text="Unlike most of the other posts in this thread, I'm going to go the other way and say making an MMO is actually not that hard if you make realistic goals for it.&#xD;&#xA;&#xD;&#xA;I made an MMORPG myself when I was in high school, which took about 8 months to put together. It got to the point of having just over 1000 users and an average of 80 on at a time before my ISP made me shut it down because apparently that's not allowed on residential ISPs. Oops.&#xD;&#xA;&#xD;&#xA;Compared to making a traditional RPG, the online component doesn't actually add many complications, if you are clever about it. The most important thing to do is never trust the players; people will always try to cheat. A well-programmed MMO should actually be not that different from a VNC client--essentially all the client should do is send keyboard and mouse states to the server, render graphics and play sounds. If you think of it in those terms, it's actually fairly easy to layout the framework.&#xD;&#xA;&#xD;&#xA;The biggest mistake game developers tend to make in MMORPG development is to start with the client. Because you should never trust the client, you are actually much better off starting by making a basic MUD server and a simple console-based client (even telnet should work).&#xD;&#xA;&#xD;&#xA;What the players sees is mostly irrelevant to the server, and what the player does is mostly irrelevant to the client. If you think in those terms it's actually not that hard, it's mostly just syncing state changes." />
  <row Id="10915" PostHistoryTypeId="5" PostId="5494" RevisionGUID="2e77d91e-190d-41bb-b464-947bde831e52" CreationDate="2010-11-12T22:59:35.907" UserId="3271" Comment="deleted 137 characters in body" Text="Unlike most of the other posts in this thread, I'm going to go the other way and say making an MMO is actually not that hard if you make realistic goals for it.&#xD;&#xA;&#xD;&#xA;I made an MMORPG myself when I was in high school, which took about 8 months to put together. It got to the point of having just over 1000 users and an average of 80 on at a time before my ISP made me shut it down because apparently that's not allowed on residential ISPs. Oops.&#xD;&#xA;&#xD;&#xA;Compared to making a traditional RPG, the online component doesn't actually add many complications, if you are clever about it. The biggest mistake game developers tend to make in MMORPG development is to start with the client. A well-programmed MMO should actually be not that different from a VNC client--essentially all the client should do is send keyboard and mouse states to the server, render graphics and play sounds. You are actually much better off starting by making a basic MUD server and a simple console-based client (even telnet should work). If you think of it in those terms, it's actually fairly easy to layout the framework. &#xD;&#xA;&#xD;&#xA;What the players sees is mostly irrelevant to the server, and what the player does is mostly irrelevant to the client. If you think in those terms it's actually not that hard, it's mostly just syncing state changes." />
  <row Id="10916" PostHistoryTypeId="5" PostId="5494" RevisionGUID="e0fba07b-9ce0-40aa-8f5e-954e7f6375e8" CreationDate="2010-11-12T23:05:17.617" UserId="3271" Comment="deleted 87 characters in body; deleted 10 characters in body" Text="Unlike most of the other posts in this thread, I'm going to go the other way and say making an MMO is actually not that hard if you make realistic goals for it.&#xD;&#xA;&#xD;&#xA;I made an MMORPG myself when I was in high school, which took about 8 months to put together. It got to the point of having just over 1000 users and an average of 80 on at a time before my ISP made me shut it down because apparently that's not allowed on residential ISPs. Oops.&#xD;&#xA;&#xD;&#xA;Compared to making a traditional RPG, the online component doesn't actually add many complications, if you are clever about it. The biggest mistake game developers tend to make in MMORPG development is to start with the client. A well-programmed MMO should actually be not that different from a VNC system--essentially all the client should do is send keyboard and mouse states to the server, render graphics and play sounds. You are much better off starting by making a basic MUD server and a simple console-based client, even telnet should work.&#xD;&#xA;&#xD;&#xA;What the players sees is mostly irrelevant to the server, and what the player does is mostly irrelevant to the client. If you think in those terms it's actually not that hard, it's mostly just syncing state changes." />
  <row Id="10918" PostHistoryTypeId="6" PostId="5493" RevisionGUID="6a731be3-f46a-4e43-b5fb-236e1501b743" CreationDate="2010-11-12T23:36:05.377" UserId="1386" Comment="edited tags" Text="&lt;language-agnostic&gt;&lt;octree&gt;&lt;bsp&gt;" />
  <row Id="10919" PostHistoryTypeId="2" PostId="5495" RevisionGUID="c746eedd-8003-4f06-816e-2017675f4669" CreationDate="2010-11-12T23:42:11.283" UserId="1446" Text="Recursion sounds like the right idea, but that alone doesn't cover it.  If you want to include things like impact angles things an get pretty complicated.  the simple way is to just use the angle as a way of calculating approximate force.  using the approximate force and the brittleness you can calculate the size of the initial cracks and the depth of recursion.  &#xD;&#xA;&#xD;&#xA;If you're really looking into breaking an object along the cracks, [Binary Space Partitioning][1] might be something to look into.  otherwise, generating textures is probably your best bet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bsp_tree &quot;Binary Space Partitioning&quot;" />
  <row Id="10920" PostHistoryTypeId="5" PostId="5495" RevisionGUID="8aa7fcc0-8beb-4c20-858a-11e60b93fa40" CreationDate="2010-11-12T23:48:20.567" UserId="1446" Comment="responded to request for examples" Text="Recursion sounds like the right idea, but that alone doesn't cover it.  If you want to include things like impact angles things an get pretty complicated.  the simple way is to just use the angle as a way of calculating approximate force.  using the approximate force and the brittleness you can calculate the size of the initial cracks and the depth of recursion.  &#xD;&#xA;&#xD;&#xA;If you're really looking into breaking an object along the cracks, [Binary Space Partitioning][1] might be something to look into.  otherwise, generating textures is probably your best bet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bsp_tree &quot;Binary Space Partitioning&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT In response to your request for an example:&#xD;&#xA;&#xD;&#xA;You can take a line, straight or jagged, and pick several points along its length from which to draw other, smaller lines. off of those you can draw yet smaller lines. look into fractals if you want detailed examples. Are you looking for code?&#xD;&#xA;    &#xD;&#xA;" />
  <row Id="10921" PostHistoryTypeId="2" PostId="5496" RevisionGUID="b47704e2-6591-424a-8136-8ccfb1ed3b1c" CreationDate="2010-11-13T00:02:58.183" UserDisplayName="john" Text="i had a simple quiz game which seemed to be animating at 10-15 fps running on my iphone 3g. So i made a test app and had only two bit maps alpha fade in and out with one background image. It still looked to be 10-15 fps. I have seen Demos of apps made from the iphone packager and it seemed smooth, but my simple app was not smooth at all. I think the flash packager still needs alot of work." />
  <row Id="10922" PostHistoryTypeId="2" PostId="5497" RevisionGUID="eaea2e4d-59be-4c09-a169-3123cf93c24d" CreationDate="2010-11-13T01:52:38.707" UserId="284" Text="I'd like to use some pixel characters as a base for tweaking into characters for my browser-based-game http://ninjawars.net .  (In other words, I take a base template and I modify it with colors and pixels slightly to make character variations)&#xD;&#xA;&#xD;&#xA;Now, my bbg is mostly ninja oriented, so a ninja avatar to work off of would be great, but more varied character types would be good as well.  And I can probably fudge a &quot;ninja&quot; from some other template.&#xD;&#xA;&#xD;&#xA;But, err, free-to-use-for-commercial-purposes (e.g. public domain) would be necessary.  I'm already makin' a little money off the site from Ads, and would certainly like to make more, so I can't use stuff for &quot;non-commercial use only&quot;, unfortunately.&#xD;&#xA;&#xD;&#xA;So any source for free-for-commercial-use pixel-y 32-bit-y characters to use as a starting design base?" />
  <row Id="10923" PostHistoryTypeId="1" PostId="5497" RevisionGUID="eaea2e4d-59be-4c09-a169-3123cf93c24d" CreationDate="2010-11-13T01:52:38.707" UserId="284" Text="Is there a free source for flat/32-bit character avatars to build off of?" />
  <row Id="10924" PostHistoryTypeId="3" PostId="5497" RevisionGUID="eaea2e4d-59be-4c09-a169-3123cf93c24d" CreationDate="2010-11-13T01:52:38.707" UserId="284" Text="&lt;free&gt;&lt;character&gt;&lt;avatar&gt;" />
  <row Id="10925" PostHistoryTypeId="2" PostId="5498" RevisionGUID="e30fcbf5-b308-4fc2-8a62-0293387e4ee7" CreationDate="2010-11-13T02:57:34.367" UserId="2634" Text="There's a couple of nice resources.&#xD;&#xA;&#xD;&#xA;Try Reiner's tilesets:&#xD;&#xA;http://reinerstileset.4players.de/englisch.html&#xD;&#xA;&#xD;&#xA;This is a terrific set of sprites. All were created originally with a 3D modeler, and then cut into 2D images. Many images have multiple animations from multiple viewpoints.  Most of the images are in a traditional RPG theme, but there's a good chance you can find something you like. They are free to use in your own games with permission.&#xD;&#xA;&#xD;&#xA;I also like Ari's spritelib:&#xD;&#xA;http://www.flyingyogi.com/fun/spritelib.html&#xD;&#xA;This guy wrote a book about creating 2D game graphics, and he's done graphics for several games. He released a terrific set of graphics under the GPL license. These graphics are a bit more dated, but they are also a super starting place. &#xD;&#xA;&#xD;&#xA;There's another great set available here:&#xD;&#xA;http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html&#xD;&#xA;&#xD;&#xA;I haven't used these tiles myself, but they look beautiful. They're a bit 'cuter' than you're probably looking for.&#xD;&#xA;&#xD;&#xA;Yet another nice royalty-free set available here:&#xD;&#xA;http://www.spicypixel.net/2008/01/10/gfxlib-fuzed-a-free-developer-graphic-library/&#xD;&#xA;This set looks ideal for platformers. I may use it in one of my upcoming books. (I've already used ari and reiner works)&#xD;&#xA;&#xD;&#xA;Hope this helps..." />
  <row Id="10926" PostHistoryTypeId="2" PostId="5499" RevisionGUID="fde1bef0-64ec-4e6d-825f-412f39793e10" CreationDate="2010-11-13T02:57:42.680" UserId="1910" Text="Hey there! I've been pondering this question for some months now, and have been unable to get an answer from anyone in the industry (likely because I know no one in the industry).&#xD;&#xA;&#xD;&#xA;**I am currently completing a B.S. in Computer Science, and I want to know if minoring in math will look good on my resume to gaming companies large and small.**&#xD;&#xA;&#xD;&#xA;I am not set on becoming a game developer, but I certainly want to have that option available to me." />
  <row Id="10927" PostHistoryTypeId="1" PostId="5499" RevisionGUID="fde1bef0-64ec-4e6d-825f-412f39793e10" CreationDate="2010-11-13T02:57:42.680" UserId="1910" Text="Does a minor in math increase my hirability?" />
  <row Id="10928" PostHistoryTypeId="3" PostId="5499" RevisionGUID="fde1bef0-64ec-4e6d-825f-412f39793e10" CreationDate="2010-11-13T02:57:42.680" UserId="1910" Text="&lt;math&gt;&lt;education&gt;&lt;jobs&gt;" />
  <row Id="10929" PostHistoryTypeId="2" PostId="5500" RevisionGUID="e52a74c8-716d-4874-99bc-765da1ad9143" CreationDate="2010-11-13T03:13:19.317" UserId="3106" Text="I have a B.S. in Computer Science with a minor in math!  What they told me in school was that they weren't so much teaching me all the things I had to know, but how to learn on my own.  Unless you're at a game-programming school, what you're learning now is generalized and not specific to game development.&#xD;&#xA;&#xD;&#xA;Having a minor in math lays the foundation for all the more specialized topics you'll have to learn about on the job.  And hopefully, your future employer will see that you have experience with more difficult maths and know that you won't be scared away when they throw hard, boring problems at you ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Full disclosure: I'm not currently working in the game industry." />
  <row Id="10930" PostHistoryTypeId="2" PostId="5501" RevisionGUID="7c8a2fc2-30c4-4a39-a8c9-9cfd5ba1d688" CreationDate="2010-11-13T03:25:08.733" UserId="51" Text="Hiring is kind of a black box.  It really depends on the person who's looking at your resume/CV.&#xD;&#xA;&#xD;&#xA;All I can say is that saying you have a minor in something is just another bullet point.  Sometimes that helps.  Maybe it shows you're more useful on the heavy math side of programming which some generalists programmers have trouble with.  Maybe the person looking over your resume completely skips the education section because it generally isn't relevant.&#xD;&#xA;&#xD;&#xA;I can't think of a reason it would hurt, though.  At worse it should do nothing." />
  <row Id="10931" PostHistoryTypeId="16" PostId="5492" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-13T03:30:34.297" UserId="51" />
  <row Id="10932" PostHistoryTypeId="16" PostId="5490" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-13T03:30:34.297" UserId="51" />
  <row Id="10933" PostHistoryTypeId="2" PostId="5502" RevisionGUID="8597f755-603d-4270-87a7-412bf9afbce8" CreationDate="2010-11-13T04:34:27.230" UserId="1573" Text="As an engineer at a mid-size studio, if I'm reviewing your resume, then yes it certainly helps -- but it also means that I'd drill deeper into linear algebra and geometry during the interview. It also signals that you are more interested in the systems/engine side of programming.&#xD;&#xA;&#xD;&#xA;A minor in the creative arts or language or so on can also be a positive signal, if you are interviewing for a gameplay programmer or hybrid code/design position." />
  <row Id="10934" PostHistoryTypeId="2" PostId="5503" RevisionGUID="ae905f78-1579-45b3-a8ab-1b5ac1d88d2d" CreationDate="2010-11-13T04:38:38.960" UserId="2919" Text="Yes, the Unreal engine 3 for instance still uses a BSP -- mainly because it's used during the CSG process. Doom3/id tech 4 uses portals, and I think I've read something that id Tech 5 is back to BSP trees. There are some games which use octrees, too. In game, my understanding is that UE3 moved to a more dynamic approach with occlusion queries, but I would be surprised if they don't use the BSP to at least determine which static meshes are in sight. Other games might just use view-frustum culling (Civilization for instance.) It really depends on what type of game you look.&#xD;&#xA;&#xD;&#xA;The reason that BSPs and stuff is still around is because you can't do much better. If you have static geometry, a BSP is great if you construct it right. It requires you to write a BSP builder though, which is tricky (but it might happen for free if your CSG solution uses one!) Octrees and more dynamic solutions (like relying on occlusion queries for everything) are simpler to implement, have higher runtime cost but don't require (expensive) pre-processing of the levels. That's a trade-off that some games are willing to do (Crytek for instance wants everything to run in real-time, so they don't spend processing time to build a static acceleration structure.) Other runtime approaches are for instance software rasterization on the CPU and performing occlusion queries on the CPU (this is used by the Frostbite engine.)&#xD;&#xA;&#xD;&#xA;For a really modern approach, look at [Umbra][1], which is a middleware for visibility queries. If you search the web a bit, you should find some of the master thesis which describe the early beginnings of Umbra. &#xD;&#xA;&#xD;&#xA;Bottom line: Whether you want to use a BSP/Octree/no AS will highly depend on the type of game you want to create. If your levels are mostly static, you should take advantage of that and build some static acceleration structure. If everything is dynamic, you need of course another approach.&#xD;&#xA;&#xD;&#xA;For collision detection, I would take a look at Bullet and PhysX and their collision detection algorithms. But my feeling is that the physics solutions are less tied to the visibility than they used to be -- a physics solution might want to use a GPU based BVH, in that case, there's not much sense to try to use that for visibility queries.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.umbrasoftware.com/" />
  <row Id="10935" PostHistoryTypeId="2" PostId="5504" RevisionGUID="26e35f5f-f9d3-4052-8d0e-e5c5a766e0dc" CreationDate="2010-11-13T07:19:53.840" UserId="3278" Text="I honestly don't know what next-gen engines are using these days, but I will tell you what I do know. It's easy to get confused between an optimization and the data structure used to assist in that optimization. All of the things mentioned below are for optimizations though, but I'll point out which ones are data structures specifically.&#xD;&#xA;&#xD;&#xA;**BSP**: Data Structure - For detecting intersection between a dynamic moving objects and static world geometry. Used to be used for both collision detection and rendering of geometry correctly without a zbuffer, but it is no longer used for rendering anymore since we have enough memory for a z buffer now days. They're technically generated slightly differently though but still considered the same tree type. Requires preprocessing.&#xD;&#xA;&#xD;&#xA;**Octree or Kd-Tree**: Data Structure - used for determining what objects are in the same &quot;cell&quot; or area to avoid doing an n^2 check on all dynamic objects.&#xD;&#xA;&#xD;&#xA;These aren't the only ones, but are probably the most common. There are also a lot of optimizations that allow the engine to avoid rendering geometry in general. But the following just cull out the geometry, and that's usually all it's used for:&#xD;&#xA;&#xD;&#xA;**Portals**: Not technically a data structure, but requires a special one to do culling. Used for visibility culling of world geometry and dynamic object geometry from view. Requires preprocessing to divide the world into areas I think. But I haven't actually implemented this, so I don't know.&#xD;&#xA;&#xD;&#xA;**Occlusion culling**: Optimization - used for visibility culling for whatever you want, probably dynamic objects.&#xD;&#xA;&#xD;&#xA;**Regular Viewport culling**: Optimization - culls objects that aren't in the camera's view.&#xD;&#xA;&#xD;&#xA;**More viewport culling**: Optimization - Regular viewport culling can be optimized even further by using an octree. You can cull out entire cells of the octree that are behind the camera or not in its view. This includes patches of terrain (if you're outside).  Whatever isn't culled by the octree you would perform &quot;regular viewport culling&quot;. Then, whatever is left, you would render.&#xD;&#xA;&#xD;&#xA;**Backface culling**: Optimization - culls geometry facing away from the camera to prevent rasterization. Usually done in hardware if the render state is set properly.&#xD;&#xA;&#xD;&#xA;Special case data structures:&#xD;&#xA;&#xD;&#xA;**AABB trees or Sphere trees**: These are kind of special case data structures. They turn a concave shape into a convex one. For example a character with bones is technically concave. It breaks it up into smaller convex pieces. Can be used as an optimization for collision detection, visibility culling of dynamic objects (usually), and makes it easier to do intersection tests against since it's convex. These would go inside of say, an octree since they're usually dynamic objects. These could also be used to assist with the occlusion culling optimization.&#xD;&#xA;&#xD;&#xA;There is no reason why you have to use a single structure to represent everything (such as a scene graph). In my opinion, you would be better to use different data structures for different tasks instead of attempting to use one general purpose tree of some sort. For example, the engine I'm working on presently, I plan to implement a BSP/Octree/AABB Tree combination with the following optimizations: occlusion culling, viewport, &amp;, of course, backface culling. This means I'll have one bsp tree, one octree, and probably multiple aabb trees within that octree.&#xD;&#xA;&#xD;&#xA;The selection of the best data structures and algorithms/optimizations is probably the single largest and most beneficial thing you can do for your engine." />
  <row Id="10936" PostHistoryTypeId="2" PostId="5505" RevisionGUID="bdca6f2a-d1ec-486d-aa79-2091654cfe2a" CreationDate="2010-11-13T07:29:20.327" UserId="2735" Text="I've heard countless times about the pitfalls of Singletons / globals, and I understand why they're so often frowned upon.&#xD;&#xA;&#xD;&#xA;What I don't understand is what the elegant, non-messy alternative is.  It seems that the alternative to using Singletons/globals always involves passing objects a million levels down through your engine objects until they reach the objects that need them.&#xD;&#xA;&#xD;&#xA;For example, in my game, I preload some assets when the game starts up.  These assets aren't used until much later when the player navigates through the main menu and enters the game.  Am I supposed to pass this data from my Game object, to my ScreenManager object (despite the fact that only one Screen actually cares about this data), then to the appropriate Screen object, and anywhere else?&#xD;&#xA;&#xD;&#xA;It just seems that I'm trading global state data for cluttered dependency injection, passing data to objects that don't even care about the data except for the purpose of passing it on to child objects.&#xD;&#xA;&#xD;&#xA;Is this a case where a Singleton would be a good thing, or is there some elegant solution I'm missing?&#xD;&#xA;" />
  <row Id="10937" PostHistoryTypeId="1" PostId="5505" RevisionGUID="bdca6f2a-d1ec-486d-aa79-2091654cfe2a" CreationDate="2010-11-13T07:29:20.327" UserId="2735" Text="Alternatives to Singletons / globals" />
  <row Id="10938" PostHistoryTypeId="3" PostId="5505" RevisionGUID="bdca6f2a-d1ec-486d-aa79-2091654cfe2a" CreationDate="2010-11-13T07:29:20.327" UserId="2735" Text="&lt;architecture&gt;" />
  <row Id="10939" PostHistoryTypeId="2" PostId="5506" RevisionGUID="1f8af876-ffe7-4b3d-964f-426d5a33304b" CreationDate="2010-11-13T08:02:13.520" UserDisplayName="chris" Text="pre rendered graphics have practically disappeared for the HD generation of consoles, expect the trend to continue in the future unless you wouldn't mind working on smaller, xbox arcade style games. " />
  <row Id="10940" PostHistoryTypeId="2" PostId="5507" RevisionGUID="ff9f1960-0c39-4902-8ad1-e2172062730f" CreationDate="2010-11-13T08:12:59.093" UserId="13" Text="One alternative is to make the class static, [as discussed here][1]. If that's to inflexible for you, you could also use the [Factory pattern to replace Singleton][2].&#xD;&#xA;&#xD;&#xA;&gt; It gives you all of the flexibility of the Singleton, with nowhere near as many problems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/steveyegge2/singleton-considered-stupid&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2764712/can-the-singleton-be-replaced-by-factory" />
  <row Id="10941" PostHistoryTypeId="2" PostId="5508" RevisionGUID="84ddb14b-b6b5-4375-a6dd-2fa6038c3c7f" CreationDate="2010-11-13T08:19:54.297" UserId="1091" Text="If you don't/can't have one part of the code magically &quot;know&quot; about some data, then it will need to be passed in somehow. However that doesn't mean it must necessarily by passed only through arguments.&#xD;&#xA;&#xD;&#xA;In your example case, could you not have some kind of &quot;AssetManager&quot; which would load and store the assets, and then the ScreenManager would only need to be given a reference to that (probably at creation)? In that sense you're passing the references to the assets wrapped up in another object, and you can pass that once, at initialisation, rather than pass it down to the leaf function when it's required.&#xD;&#xA;&#xD;&#xA;Now IMHO that AssetManager, being the kind of thing you only want one of, might as well be a singleton. Provided you understand the pitfalls, and code specifically to avoid them (assume that singleton will be accessed simultaneously from multiple threads and stab yourself with a fork any time you do something that needs to block), then knock yourself out.&#xD;&#xA;" />
  <row Id="10942" PostHistoryTypeId="5" PostId="5507" RevisionGUID="e48ebc6f-fe3c-4229-aabc-fe77332d7fd6" CreationDate="2010-11-13T08:27:17.537" UserId="13" Comment="added 89 characters in body; added 720 characters in body" Text="You could use the [Factory pattern to replace Singleton][2]. Then the factory class has the control over how many instances you can create, which you can easily change later when you find you need more than one `AssetManager`. [As stated in this article][1]:&#xD;&#xA;&#xD;&#xA;&gt; It gives you all of the flexibility of the Singleton, with nowhere near as many problems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another, rather limited, possibility is to make the class static (which I don't think is feasible for an AssetManager). But that works only if you don't need inheritance/polymorphism. It's a very inflexible solution:&#xD;&#xA;&#xD;&#xA;&gt; static methods are as flexible as granite. Every time you use one, you're casting part of your program in concrete. Just make sure you don't have your foot jammed in there as you're watching it harden. Someday you will be amazed that, by gosh, you really DO need another implementation of that dang PrintSpooler class, and it should have been an interface, a factory, and a set of implementation classes. D'oh! &#xD;&#xA;&#xD;&#xA;This is about static methods, but it can be applied to static classes, too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/steveyegge2/singleton-considered-stupid&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2764712/can-the-singleton-be-replaced-by-factory" />
  <row Id="10943" PostHistoryTypeId="2" PostId="5509" RevisionGUID="83503b88-4122-491b-b756-1a4817d48dd3" CreationDate="2010-11-13T08:28:43.167" UserId="1091" Text="Having more maths knowledge/ability is never a bad thing.&#xD;&#xA;&#xD;&#xA;However don't take it as a bullet point for the CV - it's only going to be useful to you, and/or an employer, if you actually get something out of it. Which means actually learning stuff, and being able to demonstrate it in an interview and use it in the real world.&#xD;&#xA;&#xD;&#xA;That can be tough, because IME maths is quite often a subject taught without much context. You may have to provide your own - look at what each topic can be used for and you'll probably absorb it a bit better.&#xD;&#xA;&#xD;&#xA;I wish I had done this a bit more myself. There are topics in maths I *know* I covered at university, but didn't take in because I wasn't given any indication of what they were useful for. Now, 15-20 years later I'm coming across things where I need that knowledge... and it's not there ;)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="10944" PostHistoryTypeId="2" PostId="5510" RevisionGUID="aa2101e9-c105-4bd8-9abe-0db1f181593a" CreationDate="2010-11-13T09:10:00.213" UserId="1199" Text="**[Amit’s Game Programming Information][1]**&#xD;&#xA;&#xD;&#xA;&gt; **What’s on this page?** &lt;br /&gt;I’m interested in producing complexity out of simple parts. This page contains bookmarks that I collected while working on games; I did not write most of the content linked from here. As a result the set of links here reflects the types of things I needed to know: only a few specific topics (not everything related to game programming), general ideas instead of platform-specific information (graphics, sound, compilers), and ideas and designs instead of source code (I find it easier to go from an idea to code than from code to an idea).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www-cs-students.stanford.edu/~amitp/gameprog.html" />
  <row Id="10945" PostHistoryTypeId="2" PostId="5511" RevisionGUID="4b634668-5f4a-4c00-9dae-092d46afd7f5" CreationDate="2010-11-13T11:33:00.247" UserId="744" Text="If I was looking at your resume, no. A math minor is probably the most common thing to accompany a CS major, and at most universities requires only one or two more classes - sometimes not even that, just a careful choice of electives. It won't hurt you at all, but all it tells me is that you're good at playing the college course picking game, not anything about your skills.&#xD;&#xA;&#xD;&#xA;On the other hand, _knowing more math_ can increase your hirability. If the best way for you to learn more math is to take more math classes, then definitely it will.&#xD;&#xA;&#xD;&#xA;But if you know the math or would learn it on your own anyway, and don't particularly want to take the courses, I'd pick something else you enjoy. You'll stand out more, have more fun, and have something to talk about in interviews other than matrices." />
  <row Id="10946" PostHistoryTypeId="2" PostId="5512" RevisionGUID="5c309181-b2da-4a9f-b06e-8380a50a3183" CreationDate="2010-11-13T11:42:03.050" UserId="744" Text="Don't conflate singletons and globals. While some kind of global variables are usually necessary, the singleton is _not_ just a replacement for a global variable, but _primarily_ &lt;a href=&quot;http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.14&quot;&gt;a way to work around problems of static initialization order in C++&lt;/a&gt; (&lt;a href=&quot;http://yosefk.com/c++fqa/ctors.html#fqa-10.12&quot;&gt;and FQA&lt;/a&gt;).&#xD;&#xA;&#xD;&#xA;If you can just use a global pointer instead of a singleton, and make sure it's initialized (manually) before anything needs it, you avoid the function call and branch overhead, the lame syntax to get at the object, and you can actually make a second instance of the class when you need to for tests or because your design changed.&#xD;&#xA;&#xD;&#xA;For the few global variables you want (common examples being audio output, list of open windows, keyboard handler, etc.), I recommend &lt;a href=&quot;http://gameprogrammingpatterns.com/service-locator.html&quot;&gt;the service locator pattern&lt;/a&gt;. It makes it easy to replace things with different implementations (e.g. real vs. null audio device), and collects all your globals into one structure to avoid polluting your namespace." />
  <row Id="10947" PostHistoryTypeId="5" PostId="5507" RevisionGUID="3bd80f6c-4bf1-47aa-b064-079e31db0cb6" CreationDate="2010-11-13T13:06:37.683" UserId="13" Comment="added 63 characters in body; added 12 characters in body" Text="You could use the [Factory pattern to replace Singleton][2]. Then the factory class has the control over how many instances you can create, which you can easily change later when you find you need more than one `AssetManager`. [As stated in this article][1]:&#xD;&#xA;&#xD;&#xA;&gt; It gives you all of the flexibility of the Singleton, with nowhere near as many problems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Another, rather limited, possibility is to make the class static (which I don't think is feasible for an AssetManager and only possible in languages that have static classes at all). But that works only if you don't need inheritance/polymorphism. It's a very inflexible solution:&#xD;&#xA;&#xD;&#xA;&gt; static methods are as flexible as granite. Every time you use one, you're casting part of your program in concrete. Just make sure you don't have your foot jammed in there as you're watching it harden. Someday you will be amazed that, by gosh, you really DO need another implementation of that dang PrintSpooler class, and it should have been an interface, a factory, and a set of implementation classes. D'oh! &#xD;&#xA;&#xD;&#xA;This is about static methods, but it can be applied to static classes, too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/steveyegge2/singleton-considered-stupid&#xD;&#xA;  [2]: http://stackoverflow.com/questions/2764712/can-the-singleton-be-replaced-by-factory" />
  <row Id="10948" PostHistoryTypeId="5" PostId="5512" RevisionGUID="052ad9d6-e44d-41e2-b1cc-4ba41fa89252" CreationDate="2010-11-13T13:50:30.013" UserId="744" Comment="added 135 characters in body" Text="Don't conflate singletons and globals. While some kind of global variables are usually necessary, the singleton is _not_ just a replacement for a global variable, but _primarily_ &lt;a href=&quot;http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.14&quot;&gt;a way to work around problems of static initialization order in C++&lt;/a&gt; (&lt;a href=&quot;http://yosefk.com/c++fqa/ctors.html#fqa-10.12&quot;&gt;and FQA&lt;/a&gt;). (In other languages, it's a way to work around different language deficiencies, like the lack of global variables and bare functions.)&#xD;&#xA;&#xD;&#xA;If you can just use a global pointer instead of a singleton, and make sure it's initialized (manually) before anything needs it, you avoid the function call and branch overhead, the lame syntax to get at the object, and you can actually make a second instance of the class when you need to for tests or because your design changed.&#xD;&#xA;&#xD;&#xA;For the few global variables you want (common examples being audio output, list of open windows, keyboard handler, etc.), I recommend &lt;a href=&quot;http://gameprogrammingpatterns.com/service-locator.html&quot;&gt;the service locator pattern&lt;/a&gt;. It makes it easy to replace things with different implementations (e.g. real vs. null audio device), and collects all your globals into one structure to avoid polluting your namespace." />
  <row Id="10949" PostHistoryTypeId="12" PostId="5510" RevisionGUID="19b1bb02-c516-4cca-804a-0355f17ebedc" CreationDate="2010-11-13T14:21:34.900" UserId="1199" Text="[{&quot;Id&quot;:1199,&quot;DisplayName&quot;:&quot;Zolomon&quot;}]" />
  <row Id="10954" PostHistoryTypeId="6" PostId="5470" RevisionGUID="7612fd54-04ac-4c90-b750-3bd43f46df62" CreationDate="2010-11-13T14:35:59.163" UserId="2290" Comment="edited tags" Text="&lt;engine&gt;&lt;monetization&gt;" />
  <row Id="10956" PostHistoryTypeId="13" PostId="5510" RevisionGUID="408bd1fe-26d9-421b-96a5-8f7e11a74c0d" CreationDate="2010-11-13T14:42:03.667" UserId="1199" Text="[{&quot;Id&quot;:1199,&quot;DisplayName&quot;:&quot;Zolomon&quot;}]" />
  <row Id="10957" PostHistoryTypeId="2" PostId="5515" RevisionGUID="99ddb72b-8207-4065-b492-2c1ff30b2387" CreationDate="2010-11-13T15:37:27.637" UserId="3120" Text="Is there any open source android gaming engine ?" />
  <row Id="10958" PostHistoryTypeId="1" PostId="5515" RevisionGUID="99ddb72b-8207-4065-b492-2c1ff30b2387" CreationDate="2010-11-13T15:37:27.637" UserId="3120" Text="Android gaming engine" />
  <row Id="10959" PostHistoryTypeId="3" PostId="5515" RevisionGUID="99ddb72b-8207-4065-b492-2c1ff30b2387" CreationDate="2010-11-13T15:37:27.637" UserId="3120" Text="&lt;android&gt;" />
  <row Id="10960" PostHistoryTypeId="6" PostId="5515" RevisionGUID="ec0e2de3-37e4-4ba1-812f-83b34d843ae7" CreationDate="2010-11-13T15:40:08.047" UserId="1199" Comment="edited tags" Text="&lt;engine&gt;&lt;android&gt;" />
  <row Id="10961" PostHistoryTypeId="2" PostId="5516" RevisionGUID="0d65678b-1c5b-41fd-bea8-94169d09059b" CreationDate="2010-11-13T15:59:30.077" UserId="1156" Text="[The AndEngine][1]  &#xD;&#xA;[Candroid][2]   &#xD;&#xA;[Cuttlefish Engine (Commercial)][3]  &#xD;&#xA;[Mages (mostly networking AFAIK)][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.andengine.org/&#xD;&#xA;  [2]: http://code.google.com/p/candroidengine/&#xD;&#xA;  [3]: http://www.cuttlefishengine.com/&#xD;&#xA;  [4]: http://code.google.com/p/mages/&#xD;&#xA;&#xD;&#xA;All these from googling 'android game engine'." />
  <row Id="10962" PostHistoryTypeId="2" PostId="5517" RevisionGUID="daa7adec-f382-429e-bf28-60b760662666" CreationDate="2010-11-13T17:02:23.767" UserId="998" Text="I'm writing a basic spriting engine for a blackberry app, and I want to know the best way to draw tons of sprites using the `glDrawArrays()` command.&#xD;&#xA;&#xD;&#xA;We have several sprites that move around the screen, and a bunch of sprites for background tiles.  Zelda-1 like tiling.&#xD;&#xA;&#xD;&#xA;My first idea was to create a quad at the origin for every sprite that exists and `glTranslatef` it to wherever it needs to be.  But several hundred sprites to draw per frame, you only get to call this once for every call to `glDrawArrays()` so its not a good idea to call `glTranslatef()` on each sprite as you draw it.  That's the reason `glVertex3f()` was left out..&#xD;&#xA;&#xD;&#xA;So I'm left with the option of maintaining a master vertex array and every time a sprite moves in the game, pushing the update to move the 4 vertices that represent its quad in the MASTERVERTEXARRAY.  I don't like this but it seems my only option.&#xD;&#xA;&#xD;&#xA;What I'd really like is to be able to somehow create an array of &quot;translation values&quot; to use for every quad that gets drawn..&#xD;&#xA;&#xD;&#xA;    glTranslateArray( ... ) ;&#xD;&#xA;&#xD;&#xA;But alas, no such thing exists." />
  <row Id="10963" PostHistoryTypeId="1" PostId="5517" RevisionGUID="daa7adec-f382-429e-bf28-60b760662666" CreationDate="2010-11-13T17:02:23.767" UserId="998" Text="Spriting engine on mobile platforms, OpenGLES" />
  <row Id="10964" PostHistoryTypeId="3" PostId="5517" RevisionGUID="daa7adec-f382-429e-bf28-60b760662666" CreationDate="2010-11-13T17:02:23.767" UserId="998" Text="&lt;java&gt;&lt;opengl-es&gt;" />
  <row Id="10965" PostHistoryTypeId="2" PostId="5518" RevisionGUID="48172791-b522-488a-b9a6-d39844079942" CreationDate="2010-11-13T17:02:30.843" UserDisplayName="openglNewbie" Text="I making graphics viewer, and I want to use &quot;arcball&quot; to manipulate object. &#xD;&#xA;I using OpenGL + CML ( for math ). My arcball don't want work, it is skewing not rotating :/ And I don't know why, I use formulas from http://www.csi.ucd.ie/staff/hcarr/home/teaching/comp4004/slides/05_arcball.pdf .&#xD;&#xA;&#xD;&#xA;    My code:&#xD;&#xA;    cml::vector3f u,v;&#xD;&#xA;    &#xD;&#xA;    u[0] = 2.0 - prevX/(0.5f * width());&#xD;&#xA;    u[1] = 2.0 - prevY/(0.5f * height());&#xD;&#xA;    u[2] = sqrt(u[0]*u[0] + u[1]*u[1]);&#xD;&#xA;    &#xD;&#xA;    v[0] = 2.0 - currentX/(0.5f * width());&#xD;&#xA;    v[1] = 2.0 - currentY/(0.5f * height());&#xD;&#xA;    v[2] = sqrt(v[0]*v[0] * v[1]*v[1]);&#xD;&#xA;    &#xD;&#xA;    cml::quaternionf qu,qv,q;&#xD;&#xA;    &#xD;&#xA;    qu[0] = 0;&#xD;&#xA;    qu[1] = u[0];&#xD;&#xA;    qu[2] = u[1];&#xD;&#xA;    qu[3] = u[2];&#xD;&#xA;    &#xD;&#xA;    qv[0] = 0;&#xD;&#xA;    qv[1] = v[0];&#xD;&#xA;    qv[2] = v[1];&#xD;&#xA;    qv[3] = v[2];&#xD;&#xA;    &#xD;&#xA;    q = qv * ( qu.inverse());&#xD;&#xA;    &#xD;&#xA;    cml::matrix44f matrix;&#xD;&#xA;    &#xD;&#xA;    matrix.identity();&#xD;&#xA;    &#xD;&#xA;    cml::matrix_rotation_quaternion(matrix,q);&#xD;&#xA;    &#xD;&#xA;    //Drawing&#xD;&#xA;    &#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    qlTranslate(0,0,-zoom);&#xD;&#xA;    qlMultMatrixf(matrix.data());" />
  <row Id="10966" PostHistoryTypeId="1" PostId="5518" RevisionGUID="48172791-b522-488a-b9a6-d39844079942" CreationDate="2010-11-13T17:02:30.843" UserDisplayName="openglNewbie" Text="Problem with arcball" />
  <row Id="10967" PostHistoryTypeId="3" PostId="5518" RevisionGUID="48172791-b522-488a-b9a6-d39844079942" CreationDate="2010-11-13T17:02:30.843" UserDisplayName="openglNewbie" Text="&lt;opengl&gt;&lt;math&gt;" />
  <row Id="10968" PostHistoryTypeId="16" PostId="5516" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-13T18:07:13.427" UserId="51" />
  <row Id="10969" PostHistoryTypeId="16" PostId="5515" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-13T18:07:13.427" UserId="51" />
  <row Id="10970" PostHistoryTypeId="2" PostId="5519" RevisionGUID="414d1cbe-de35-4287-9e37-a008e3017fbc" CreationDate="2010-11-13T18:19:46.830" UserId="2998" Text="I have always found emulators rather fascinating. I would seriously like to create an emulator for an older ganeration console or handheld. It would help me gain a greater appreciation of the hardware and the games which were created for that hardware. However, people are always saying how hard it is and that I should not even try. I would like to know why that is." />
  <row Id="10971" PostHistoryTypeId="1" PostId="5519" RevisionGUID="414d1cbe-de35-4287-9e37-a008e3017fbc" CreationDate="2010-11-13T18:19:46.830" UserId="2998" Text="Why is is so hard to develop a game console emulator?" />
  <row Id="10972" PostHistoryTypeId="3" PostId="5519" RevisionGUID="414d1cbe-de35-4287-9e37-a008e3017fbc" CreationDate="2010-11-13T18:19:46.830" UserId="2998" Text="&lt;c++&gt;&lt;architecture&gt;&lt;hardware&gt;" />
  <row Id="10973" PostHistoryTypeId="2" PostId="5520" RevisionGUID="36f2df87-94c7-4157-9252-aa569a9f7190" CreationDate="2010-11-13T18:34:39.153" UserId="1156" Text="[SO Question][1]&#xD;&#xA;&#xD;&#xA;[This seems to be a popular resource about how they work.][2]&#xD;&#xA;&#xD;&#xA;TL;DR - The architecture is totally different, and this takes a lot of parallel resources to achieve the original architecture.&#xD;&#xA;&#xD;&#xA;&gt; The CPU architecture for game consoles is often somewhat exotic compared with your average desktop machine. Emulation means to perform in software everything that the original hardware did. That is, while the original console may have had dedicated graphics, audio, etc. chips as well as a CPU with a different instruction set, the emulator must perform all the functions of these parallel resources at speed.  &#xD;&#xA;&gt; &#xD;&#xA;&gt; Unless the console's GPU is old, it&#xD;&#xA;&gt; almost certainly must be emulated on&#xD;&#xA;&gt; the GPU of the host machine, as modern&#xD;&#xA;&gt; graphics cards, even cheap ones, have&#xD;&#xA;&gt; many times the throughput (for&#xD;&#xA;&gt; graphics workloads) of even the most&#xD;&#xA;&gt; expensive multicore CPUs. Compounding&#xD;&#xA;&gt; this difficulty is the fact that&#xD;&#xA;&gt; communication between CPU, GPU, any&#xD;&#xA;&gt; other onboard DSPs, and memory was&#xD;&#xA;&gt; probably highly optimized on the&#xD;&#xA;&gt; console to take advantage of the&#xD;&#xA;&gt; specifics of the hardware&#xD;&#xA;&gt; configuration, and therefore these&#xD;&#xA;&gt; resources must be rate-matched as&#xD;&#xA;&gt; well.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Compounding all these difficulties,&#xD;&#xA;&gt; usually little is known about the&#xD;&#xA;&gt; specifics of the console's hardware,&#xD;&#xA;&gt; as this is kept very much under wraps&#xD;&#xA;&gt; by design. Reverse engineering is&#xD;&#xA;&gt; getting less and less feasible for&#xD;&#xA;&gt; hobbyists to do.   &#xD;&#xA;&gt;&#xD;&#xA;&gt; To put things into&#xD;&#xA;&gt;  perspective, an architectural&#xD;&#xA;&gt;  simulator (a program which can run,&#xD;&#xA;&gt;  for example, a PowerPC program on an&#xD;&#xA;&gt;  x86 machine and collect all sorts of&#xD;&#xA;&gt;  statistics about it) might run between&#xD;&#xA;&gt;  1000x and 100000x slower than&#xD;&#xA;&gt;  real-time. An RTL simulation (a&#xD;&#xA;&gt; simulation of all the gates and&#xD;&#xA;&gt;  flip-flops that make up a chip) of a&#xD;&#xA;&gt;  modern CPU can usually only run&#xD;&#xA;&gt;  between 10Hz and a few hundred Hz.&#xD;&#xA;&gt;  Even very optimized emulation is&#xD;&#xA;&gt; likely to be between 10 and 100 times&#xD;&#xA;&gt; slower than native code, thus limiting&#xD;&#xA;&gt; what can be emulated convincingly&#xD;&#xA;&gt; today (particularly given the&#xD;&#xA;&gt; real-time interactivity implied by a&#xD;&#xA;&gt; game console emulator).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/471973/what-makes-building-game-console-emulators-so-hard&#xD;&#xA;  [2]: http://stackoverflow.com/questions/448673/how-do-emulators-work-and-how-are-they-written" />
  <row Id="10974" PostHistoryTypeId="5" PostId="5519" RevisionGUID="1f349b37-4b9c-489a-a468-0369ef387540" CreationDate="2010-11-13T19:25:16.230" UserId="2998" Comment="added 109 characters in body" Text="I have always found emulators rather fascinating. I would seriously like to create an emulator for an older ganeration console or handheld. It would help me gain a greater appreciation of the hardware and the games which were created for that hardware. However, people are always saying how hard it is and that I should not even try. I would like to know why that is.&#xD;&#xA;&#xD;&#xA;Also, I would like some suggestions on a good place to start and where can I find the information I need?" />
  <row Id="10975" PostHistoryTypeId="2" PostId="5521" RevisionGUID="ab0c848d-f7f9-4f11-a5e7-c2c3470c0558" CreationDate="2010-11-13T19:40:47.523" UserId="1697" Text="I'm using box2d and I simply hook up 10 points each with a similar length constraint to the adjacent point.&#xD;&#xA;&#xD;&#xA;When I move 1 point, the others follow just like a rope/chain. Just like one would expect.&#xD;&#xA;&#xD;&#xA;What I would not expect however is that when I fix the leftmost point and then pull the right most, the points distribute themselves very odd. When I simulate it using ascii it is as following:&#xD;&#xA;&#xD;&#xA;OO-O--O---O----O-----O------O-------O--------O&#xD;&#xA;&#xD;&#xA;I would have prefered that one point would 'win' (given the order of point creation or something) and that the rest of the points would never reach the other point (due to their constraints).  Or maybe even that the points would distribute themselves in a better fashion.&#xD;&#xA;&#xD;&#xA;Does anyone have an explanation on why this is and how this might be solved?" />
  <row Id="10976" PostHistoryTypeId="1" PostId="5521" RevisionGUID="ab0c848d-f7f9-4f11-a5e7-c2c3470c0558" CreationDate="2010-11-13T19:40:47.523" UserId="1697" Text="Strangeness when simulating a chain" />
  <row Id="10977" PostHistoryTypeId="3" PostId="5521" RevisionGUID="ab0c848d-f7f9-4f11-a5e7-c2c3470c0558" CreationDate="2010-11-13T19:40:47.523" UserId="1697" Text="&lt;2d&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;rope-physics&gt;" />
  <row Id="10978" PostHistoryTypeId="2" PostId="5522" RevisionGUID="d4cf2979-1685-4de6-a378-1750cd141786" CreationDate="2010-11-13T20:02:06.190" UserId="744" Text="(Just to be clear, when you say &quot;length constraint&quot;, you mean b2DistanceJoint right?)&#xD;&#xA;&#xD;&#xA;Is this along the ground? If so, pulling on the rightmost one is going to have to fight both the length constraint and the friction of all the others on the ground.&#xD;&#xA;&#xD;&#xA;Are you sure your points are all equidistant from their neighbors when you first link them?" />
  <row Id="10979" PostHistoryTypeId="2" PostId="5523" RevisionGUID="cffeff8e-db66-45f5-80db-71bde2737c1e" CreationDate="2010-11-13T21:18:15.630" UserId="721" Text="Java Game Engine:&#xD;&#xA;&#xD;&#xA; - Rokon&#xD;&#xA; - AndEgine&#xD;&#xA;&#xD;&#xA;C++ 3D engine available on Android:&#xD;&#xA;&#xD;&#xA; - Ogre3D (Open Source)&#xD;&#xA; - Irrlicht" />
  <row Id="10980" PostHistoryTypeId="5" PostId="5523" RevisionGUID="ea1ce178-a1f4-45db-9032-18a2e38e2cee" CreationDate="2010-11-13T21:35:43.177" UserId="721" Comment="added 345 characters in body; added 69 characters in body; added 6 characters in body" Text="There is no open source game engine available on Android as Unreal Engine or Unity. But you can use different Open Source Projects.&#xD;&#xA;&#xD;&#xA;Java 2d Game Engine (as cocos 2d on iphone):&#xD;&#xA;&#xD;&#xA; - [Rokon][1]&#xD;&#xA; - [AndEgine][2]&#xD;&#xA;&#xD;&#xA;C++ 3D engine available on Android:&#xD;&#xA;&#xD;&#xA; - [Ogre3D][3]&#xD;&#xA; - [Irrlicht][4]&#xD;&#xA;&#xD;&#xA;Ogre3D and Irrlicht aren't well packaged but you can develop games for iPhone and Android devices. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/rokon/&#xD;&#xA;  [2]: http://www.andengine.org/&#xD;&#xA;  [3]: http://www.ogre3d.org&#xD;&#xA;  [4]: http://irrlicht.sourceforge.net/" />
  <row Id="10981" PostHistoryTypeId="5" PostId="5523" RevisionGUID="0038b19b-ce12-4b28-a7d6-d5733a2805c1" CreationDate="2010-11-13T21:44:23.477" UserId="721" Comment="added 58 characters in body" Text="There is no open source game engine available on Android as Unreal Engine or Unity. But you can use different Open Source Projects. &#xD;&#xA;&#xD;&#xA;Java 2d Game Engine (as cocos 2d on iphone):&#xD;&#xA;&#xD;&#xA; - [Rokon][1] (Drop Block, Flying Aces ...)&#xD;&#xA; - [AndEgine][2]&#xD;&#xA;&#xD;&#xA;C++ 3D engine available on Android:&#xD;&#xA;&#xD;&#xA; - [Ogre3D][3]&#xD;&#xA; - [Irrlicht][4] (Moblox, Air Hockey EM...)&#xD;&#xA;&#xD;&#xA;Ogre3D and Irrlicht aren't well packaged but you can develop games for iPhone and Android devices. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/rokon/&#xD;&#xA;  [2]: http://www.andengine.org/&#xD;&#xA;  [3]: http://www.ogre3d.org&#xD;&#xA;  [4]: http://irrlicht.sourceforge.net/" />
  <row Id="10982" PostHistoryTypeId="2" PostId="5524" RevisionGUID="0481ae1a-5cde-4088-ad99-651b0c224a04" CreationDate="2010-11-13T23:31:35.947" UserId="3295" Text="I started off as a B.S in CS and now I am a B.S. in Mathematics. I do not really have any experience with the resumes or the work world however I would say knowing math is very useful. I would further emphasize the fact that the gaming industry appears to be moving towards networked gaming or massively multiply gaming with trends in free-worlds and dynamic playing. A minor will not give you the depth to model much of that but it will give you the ability to understand and appreciate it. &#xD;&#xA;&#xD;&#xA;Since it will cover calculus it will give you understanding of the mathematical tools necessary for optimizing situations. Since the math will be available to for the methods you wish to employ it will mainly be up to deciphering a way of implementing it both correctly and optimally.&#xD;&#xA;&#xD;&#xA;Almost all games are pushing AI development and implementation into different facets, whether it is NPC or meta-level world and ontology generation and management.  At this point computational power is prohibitive for many of the most powerful tools but with a planned career this does not matter so much. &#xD;&#xA;&#xD;&#xA;The minor will probably require a statistics class and your knowledge of algorithms will most likely be sufficient. I am not sure if any current games include such computationally expensive simulation methods especially on massively multiplayer scales but I can foresee the use of Monte-Carlo methods. &#xD;&#xA;&#xD;&#xA;In any case, perhaps it is merely my bias but I would get an M.S. as well. I imagine that would make you more marketable for a longer time and give you more freedom. Otherwise I imagine you will be just coding, and that seems liable to be outsourced. &#xD;&#xA;&#xD;&#xA;Another option for a minor would be psychology, sociology or economics. The first two I imagine would emphasize your ability to appeal to and understand gamers while the third would give you a grasp of markets (many game developers struggle with generating realistic markets for trade) and present the possibility of the managerial route. I imagine a company could at some point (after showing promise) offer to pay for an MBA.  I imagine would allow you enjoy both the gaming aspects and the freedom whether you are in a company or decide to manage your own studio and produce games, which increasingly is becoming an option due to digital downloads. &#xD;&#xA;&#xD;&#xA;I initially was just going to push math all the way but I imagine the economics minor will give you the most freedom and happiness.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope that helps. " />
  <row Id="10983" PostHistoryTypeId="2" PostId="5525" RevisionGUID="ecde807c-637a-47a3-ae5c-c41f740bcfc5" CreationDate="2010-11-14T01:43:25.370" UserId="3298" Text="# Scheme&#xD;&#xA;&#xD;&#xA;Well, [guile](http://www.gnu.org/software/guile/) specifically.&#xD;&#xA;&#xD;&#xA;With guile you can have your own DSL (Domain Specific Language) just for your game. Once you get used to the parentheses and prefix notation, scheme is heaven to work with.&#xD;&#xA;&#xD;&#xA;If you're going to use guile in a serious game, I would wait a couple of months until the 2.0 release as that will include, IIRC, an Ecmascript interpreter as well as the current schemem one. You can also expect to see large speed improvements." />
  <row Id="10984" PostHistoryTypeId="2" PostId="5526" RevisionGUID="6f318373-5b6f-4a31-bad8-5330b8020b5c" CreationDate="2010-11-14T02:54:13.927" UserId="3300" Text="Developing an MMO is super easy. [It takes no more than four hours][1].&#xD;&#xA;&#xD;&#xA;Developing an MMO that people want to PLAY is a very different matter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.enchantedage.com/pymmo &quot;It takes no more than four hours.&quot;&#xD;&#xA;" />
  <row Id="10985" PostHistoryTypeId="2" PostId="5527" RevisionGUID="9c8595a4-2146-40a6-aa41-f81ba4a326db" CreationDate="2010-11-14T05:42:22.823" UserId="3296" Text="I am designing a simple game and am looking for some help designing different level/ranks. For instance, starting from &quot;Novice&quot; to &quot;Intermediate&quot; to &quot;Master&quot;. Is there are repository somewhere that records these from various games? For instance, from World of Warcraft, Diablo etc. Any suggestions?" />
  <row Id="10986" PostHistoryTypeId="1" PostId="5527" RevisionGUID="9c8595a4-2146-40a6-aa41-f81ba4a326db" CreationDate="2010-11-14T05:42:22.823" UserId="3296" Text="Is there a leveling guide somewhere?" />
  <row Id="10987" PostHistoryTypeId="3" PostId="5527" RevisionGUID="9c8595a4-2146-40a6-aa41-f81ba4a326db" CreationDate="2010-11-14T05:42:22.823" UserId="3296" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;level-design&gt;" />
  <row Id="10988" PostHistoryTypeId="4" PostId="5515" RevisionGUID="5211d567-415b-4705-95b6-e8256c258565" CreationDate="2010-11-14T06:47:41.817" UserId="51" Comment="edited title" Text="Any open source game engines for Android?" />
  <row Id="10991" PostHistoryTypeId="2" PostId="5529" RevisionGUID="1c543d68-f7a2-4b39-91ee-81cf194112fc" CreationDate="2010-11-14T12:15:41.593" UserId="360" Text="For each of the games you've mentioned, there are extensive wikis and sites dedicated to them where you can find info on the rankings, levels and requirements. &#xD;&#xA;&#xD;&#xA;However, levels and rankings are usually tied into the base system used in the game and so when designing your own you may find it more helpful to look at role playing systems as a whole.&#xD;&#xA;&#xD;&#xA;Here is a good resource to start with: [Open Game Systems][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.rpg.net/index.php/Open_Game_Systems" />
  <row Id="10992" PostHistoryTypeId="2" PostId="5530" RevisionGUID="623460d7-39a9-4ba8-a524-94caa86d13b5" CreationDate="2010-11-14T12:43:28.267" UserId="825" Text="I work for Konami as a Flash developer, and got sent some code for a puzzle mini-game from a new, yet-to-be-released Silent Hill game for PS3/Xbox 360.  It was a windows executable, but it was made in Flash, and I saw some GFX (Scaleform) libraries in the source.  I was very surprised by this, as I thought the extent of Flash's reach into console games was simply for UI.  Granted, this was an essentially 2d, UI-centric puzzle minigame, but nonetheless, this was a gameplay useage of Flash/Scaleform in a &quot;next-gen&quot; console title.&#xD;&#xA;&#xD;&#xA;My question is, how prevalent is this?  I really want to get into console programming, and if this is something that appears elsewhere, maybe I can apply my Flash/Actionscript skills to getting a job working on console titles.  Anyone have any thoughts or experiences with this?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="10993" PostHistoryTypeId="1" PostId="5530" RevisionGUID="623460d7-39a9-4ba8-a524-94caa86d13b5" CreationDate="2010-11-14T12:43:28.267" UserId="825" Text="Is Scaleform/Flash used in console games for non-UI, game elements?" />
  <row Id="10994" PostHistoryTypeId="3" PostId="5530" RevisionGUID="623460d7-39a9-4ba8-a524-94caa86d13b5" CreationDate="2010-11-14T12:43:28.267" UserId="825" Text="&lt;flash&gt;&lt;programming&gt;&lt;console&gt;&lt;actionscript&gt;" />
  <row Id="10995" PostHistoryTypeId="2" PostId="5531" RevisionGUID="e9b291eb-3f9d-4fa3-bc01-f6d5f959f15f" CreationDate="2010-11-14T14:42:02.257" UserId="3294" Text="I have a 32x32x32 cube (I say 32 because that's the size of the texture).&#xD;&#xA;&#xD;&#xA;I can make the vertices of this cube go from (0,0,0) to (32,32,32). This mean the camera will be moving += 1 when ever a key on the keyboard is pressed. This also mean that the far clipping area will be pretty big when calling the CreatePerspectiveFieldOfView function.&#xD;&#xA;&#xD;&#xA;Since everyhing is in double, I can also have the vertices go from (0,0,0) to (1,1,1). The camera will be moving += (1/32) and the far clipping area will be much smaller.&#xD;&#xA;&#xD;&#xA;Is there a standard into this?  &#xD;&#xA;I've read that if the far clipping area is too big it can causes problems.  &#xD;&#xA;Since both solution have the same effect, I don't know what is the best one and which one can potentially case a problem in the long run." />
  <row Id="10996" PostHistoryTypeId="1" PostId="5531" RevisionGUID="e9b291eb-3f9d-4fa3-bc01-f6d5f959f15f" CreationDate="2010-11-14T14:42:02.257" UserId="3294" Text="Size of the world and clipping area" />
  <row Id="10997" PostHistoryTypeId="3" PostId="5531" RevisionGUID="e9b291eb-3f9d-4fa3-bc01-f6d5f959f15f" CreationDate="2010-11-14T14:42:02.257" UserId="3294" Text="&lt;xna&gt;" />
  <row Id="10998" PostHistoryTypeId="2" PostId="5532" RevisionGUID="72d29e7d-b0d8-4205-a7d1-74d3ccb1eb0b" CreationDate="2010-11-14T15:02:52.757" UserId="3304" Text="I'm doing line plane intersection, and have come across an un-referenced variable or constant in the [tutorial I'm following][1].&#xD;&#xA;&#xD;&#xA;One of the formulae given is this:&#xD;&#xA;&#xD;&#xA;t = &lt;u&gt;N dot (p2 – p0)&lt;/u&gt;&lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N dot V&#xD;&#xA;&#xD;&#xA;The variable I'm stuck with is `V`. Can someone tell me what `V` is and how I'd go about finding it?&#xD;&#xA;&#xD;&#xA;For more info on that formula, please see the link given in the first para.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;James&#xD;&#xA;  [1]: http://www.thepolygoners.com/tutorials/lineplane/lineplane.html" />
  <row Id="10999" PostHistoryTypeId="1" PostId="5532" RevisionGUID="72d29e7d-b0d8-4205-a7d1-74d3ccb1eb0b" CreationDate="2010-11-14T15:02:52.757" UserId="3304" Text="Line plane intersection:  what is this variable?" />
  <row Id="11000" PostHistoryTypeId="3" PostId="5532" RevisionGUID="72d29e7d-b0d8-4205-a7d1-74d3ccb1eb0b" CreationDate="2010-11-14T15:02:52.757" UserId="3304" Text="&lt;math&gt;" />
  <row Id="11001" PostHistoryTypeId="2" PostId="5533" RevisionGUID="ad8ab946-96a5-41d0-b869-a181f6f62942" CreationDate="2010-11-14T15:10:36.713" UserId="3305" Text="Looks like V = p1 - p0. Since then t = 0 when p2 = p0, and t = 1 when p2 = p1." />
  <row Id="11002" PostHistoryTypeId="2" PostId="5534" RevisionGUID="75611342-fb59-41a7-90e1-4cc143ae5a13" CreationDate="2010-11-14T16:29:15.540" UserId="3302" Text="I prefer to design a situation, model it as accurately as I can, and allow as many standard manipulations as I can, and let problems and solutions emerge intrinsically and appropriately. &#xD;&#xA;&#xD;&#xA;Early examples included Infocom's _Suspended_ and FTL's _Dungeon Master_, though they were a mix of scripted puzzle logic and semi-realistic game systems." />
  <row Id="11003" PostHistoryTypeId="6" PostId="5532" RevisionGUID="62c37ae6-8d38-4bf7-b738-5b2749361a79" CreationDate="2010-11-14T16:35:02.147" UserId="1156" Comment="edited tags" Text="&lt;math&gt;&lt;linear-algebra&gt;" />
  <row Id="11004" PostHistoryTypeId="2" PostId="5535" RevisionGUID="79a1c324-6d37-4344-b0b9-2354c8df2bf3" CreationDate="2010-11-14T16:37:33.533" UserId="3305" Text="Personally, I found AngelScript (see link below) much easier to bind to C++ than Lua when I was choosing a scripting language for my own project. (I actually wrote a small wrapper library for it to make it even easier to use, at the cost of some flexibility.)&#xD;&#xA;&#xD;&#xA;&lt;http://www.angelcode.com/angelscript/&gt;&#xD;&#xA;&#xD;&#xA;That being said, I suspect Lua has a few advantages that make it compelling for commercial games developers:&#xD;&#xA;&#xD;&#xA;(a) It's more mature and widespread than AngelScript&#xD;&#xA;&#xD;&#xA;(b) Its syntax is easier for non-programmers (AngelScript is very C++-like)&#xD;&#xA;&#xD;&#xA;(c) It has a smaller footprint than AngelScript (at least as far as I recall)&#xD;&#xA;&#xD;&#xA;If you're just writing a hobby project, though, I'd say that AngelScript's at least worth a look." />
  <row Id="11005" PostHistoryTypeId="2" PostId="5536" RevisionGUID="35d6efdb-b05c-4973-aa94-65e0417291fa" CreationDate="2010-11-14T17:21:26.617" UserId="3115" Text="I think what makes a good game is the unique idea and design, so no real &quot;rule&quot; should be copied.&#xD;&#xA;&#xD;&#xA;But as @DrDeth writes, there are plenty Wikis and sites dedicated to that. Try to ask more detailed/specific questions in this forum, as we will probarbly be better at solving problems than supplying complete solutions. (hench we all need to to a bit of work ourselfs).&#xD;&#xA;&#xD;&#xA;To give you something usefull or idea to something I have the following suggestion for a very primitive level guide (feel free to copy my idea or build upon it, thats why I write it here):&#xD;&#xA;&#xD;&#xA;**Experience/levels**&#xD;&#xA;&#xD;&#xA;First I would decide an offset-value. Lets call this &quot;offset&quot;. Secondly I would figure out some &quot;double up&quot; kinda value. We could call this &quot;factor&quot;.&#xD;&#xA;&#xD;&#xA;**Here are some sample values to show what I think:**&#xD;&#xA;&#xD;&#xA;* offset = 1000 &#xD;&#xA;* factor  = 1.37&#xD;&#xA;&#xD;&#xA;My algoritme would be: level = (previous level * factor) + offset&#xD;&#xA;&#xD;&#xA;**This is how the table would look from those numbers (Level 0 starts at 0 exp):**&#xD;&#xA;&#xD;&#xA; 1. Level (1000 exp) (Level 0=(0 * 1.37) + offset value which is 1000)&#xD;&#xA; 2. Level (2370 exp) (level 1 * 1.37 + 1000)&#xD;&#xA; 3. Level (4247 exp) (level 2 * 1.37 + 1000)&#xD;&#xA; 4. Level (6818 exp) (level 3 * 1.37 + 1000)&#xD;&#xA; 5. Level (10341 exp) (level 4 * 1.37 + 1000)&#xD;&#xA; 6. Level (15167 exp) (level 5 * 1.37 + 1000)&#xD;&#xA; 7. Level (21779 exp) (level 6 * 1.37 + 1000)&#xD;&#xA; 8. Level (30837 exp) (level 7 * 1.37 + 1000)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thats just a sample with sample values, my idea here is that you can replace both offset and factor and use this with any weapon, skill, ability, scroll, shield or monsters or what ever... very easy to calculate and scale for you.&#xD;&#xA;&#xD;&#xA;And very easy to put into tables for quick lookup.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Do you find this usefull or? please mark or comment any questions." />
  <row Id="11006" PostHistoryTypeId="2" PostId="5537" RevisionGUID="630521f3-4a6e-40e5-af81-4b3e0f1f0c02" CreationDate="2010-11-14T17:49:38.593" UserId="395" Text="The question isn't &quot;Is it used?&quot; (it is, even stuff like menus and whatnot are non-trivial bits of AS code in many games), but &quot;How much?&quot;. Unless you have some UI/UX experience it may be somewhat difficult to find a job as a dedicated Scaleform person. Even if a team needs to make a minigame like that, it might be a week or two of work at the most, no need to have a dedicated person just for that when their normal UI programmer can handle it just fine. Read up on UX topic, maybe take some classes in HCI, then you will probably be in a better position to leverage your skills." />
  <row Id="11007" PostHistoryTypeId="2" PostId="5538" RevisionGUID="8ee52a18-8165-4aa0-8d38-f66ace0f9cda" CreationDate="2010-11-14T18:18:28.347" UserId="2819" Text="What I would like to know is: What are the daily duties of a graduate programmer in the games industry workplace? Is it mostly coding, analysing, designing, or what?&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;P.S. I am in my second year of University at the moment and am working towards specialising in games programming, specifically gameplay, tools or UI programming." />
  <row Id="11008" PostHistoryTypeId="1" PostId="5538" RevisionGUID="8ee52a18-8165-4aa0-8d38-f66ace0f9cda" CreationDate="2010-11-14T18:18:28.347" UserId="2819" Text="What are the typical day-to-day tasks of an entry level games programmer?" />
  <row Id="11009" PostHistoryTypeId="3" PostId="5538" RevisionGUID="8ee52a18-8165-4aa0-8d38-f66ace0f9cda" CreationDate="2010-11-14T18:18:28.347" UserId="2819" Text="&lt;programming&gt;&lt;game-industry&gt;" />
  <row Id="11010" PostHistoryTypeId="2" PostId="5539" RevisionGUID="694b7654-3d20-46de-8b9d-2e61b9a47fdf" CreationDate="2010-11-14T20:13:20.293" UserId="2687" Text="Just curious if anyone has an insight onto the efficacy of self-set goals as opposed to explicit ones in regards to player retention. &#xD;&#xA;&#xD;&#xA;Content requirements aside are there any anecdotal or quantitative results on which method provides a more immersive experience for a player, and thus is more likely to keep them around and playing?" />
  <row Id="11011" PostHistoryTypeId="1" PostId="5539" RevisionGUID="694b7654-3d20-46de-8b9d-2e61b9a47fdf" CreationDate="2010-11-14T20:13:20.293" UserId="2687" Text="Self-set vs explicit goals and their efficacy." />
  <row Id="11012" PostHistoryTypeId="3" PostId="5539" RevisionGUID="694b7654-3d20-46de-8b9d-2e61b9a47fdf" CreationDate="2010-11-14T20:13:20.293" UserId="2687" Text="&lt;game-design&gt;" />
  <row Id="11013" PostHistoryTypeId="2" PostId="5540" RevisionGUID="83418c5c-0085-4aec-900d-4b16d8757847" CreationDate="2010-11-14T20:28:17.697" UserId="744" Text="Based on my experience (in the United States, hired out of college onto a project that had just gotten out of prototyping and was a team of about 50, was then cancelled, then we went on to make two more games over the four years I was there with a total developer base of about 200),&#xD;&#xA;&#xD;&#xA; * You'll probably spend about 50-70% of your time programming. In this time, I'm including the 'fun stuff' like getting to make a really clever feature, as well as the times you're staring at a memory dump for 8 hours straight trying to figure out what crashed. Maybe 25-50% of that is actual sit-down-at-your-keyboard-and-get-in-the-zone long-form programming.&#xD;&#xA; * Another 15-25% in meetings and administrative tasks, like bug triage, meetings about bug triage, scheduling, high-level documentation for other programmers and producers, email, whole project/company status updates, and so on. This depends on how much autonomy you have - if you have no autonomy, then you'll get to spend more time programming, because you'll spend less time setting your own schedule. If you take more control of your schedule, you might get to work on more interesting things, but then you need to spend time doing this stuff.&#xD;&#xA; * Another 15-25% helping designers/artists, attending creative meetings actually about the game, keeping up to date with game design documents, and so on.&#xD;&#xA;&#xD;&#xA;As you go up in pay grade, the time you spend programming is probably going to _go down_. You're going to have to make more administrative decisions, be called upon to help less experienced people on the team, and spend more time doing documentation and code / architecture review. On the plus side, the _quality_ of the programming will probably go up; you'll get to work on more interesting features (and more frustrating bugs).&#xD;&#xA;&#xD;&#xA;Whether the time you spend in helping designers and artists goes up, down, or doesn't really change, depends on the area you want to work in. If you want to work on UI, tools, and gameplay, expect that time to increase to upwards of 50% as you gain more experience. You'll be sitting down with senior designers to plan and demo new tools and see how they use the existing ones. Unfortunately, this time also comes out of your programming schedule." />
  <row Id="11014" PostHistoryTypeId="2" PostId="5541" RevisionGUID="7be7cc3e-2973-4e20-891e-537083c59ffb" CreationDate="2010-11-14T20:55:06.500" UserId="1352" Text="The reason a big clipping area is bad is because the Z-buffer uses floating points between 0 and 1 to determine depth. &#xD;&#xA;&#xD;&#xA;This means that the only real issue here appears when your clipping plane is FAR beyond the walls of the cube. Say half of your clipping plane is outside your cube, that would make the depth buffer resolution on the objects inside the cube half as accurate as it could be.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;" />
  <row Id="11015" PostHistoryTypeId="2" PostId="5542" RevisionGUID="d03f1c21-704b-4cc9-ac91-7b11a80b7370" CreationDate="2010-11-14T21:55:56.867" UserId="3282" Text="I love writing video games for fun, and often do that.&#xD;&#xA;&#xD;&#xA;I noticed, anyway, that most of the times implementing the gameplay itself doesn't take too much time to me (maybe because I already did that plenty times and know what and how to do for most of the things), but when I try to implement off-game stuff I get lost.&#xD;&#xA;&#xD;&#xA;By off-game I mean what is not gameplay: menus, cutscenes between levels, _world map_ to choose levels, saving and loading status, managing replays ... Only tried to write a few of these a few times, but always failed; that's why I never really completed and distributed a game.&#xD;&#xA;&#xD;&#xA;Are these common problems? And where should I start to do this? Where could I find some books/guides about such stuff?" />
  <row Id="11016" PostHistoryTypeId="1" PostId="5542" RevisionGUID="d03f1c21-704b-4cc9-ac91-7b11a80b7370" CreationDate="2010-11-14T21:55:56.867" UserId="3282" Text="Help with off-game tasks" />
  <row Id="11017" PostHistoryTypeId="3" PostId="5542" RevisionGUID="d03f1c21-704b-4cc9-ac91-7b11a80b7370" CreationDate="2010-11-14T21:55:56.867" UserId="3282" Text="&lt;programming&gt;&lt;language-agnostic&gt;&lt;planning&gt;" />
  <row Id="11018" PostHistoryTypeId="2" PostId="5543" RevisionGUID="4757bbb9-4d7f-4a6d-b884-ead78ecdd0c7" CreationDate="2010-11-14T22:33:31.410" UserId="2876" Text="I am trying to render to a `texture2Darray` in OpenGL, with a similar setup as descriped in [this post][1]. My question is, if anyone has gotten this to work on ATI hardware? Or is there still a bug in the driver, preventing multi layered rendering? The bug is also mentioned in the forum post.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=280589" />
  <row Id="11019" PostHistoryTypeId="1" PostId="5543" RevisionGUID="4757bbb9-4d7f-4a6d-b884-ead78ecdd0c7" CreationDate="2010-11-14T22:33:31.410" UserId="2876" Text="ATI driver bug and rendering to a texture 2d array in OpenGL" />
  <row Id="11020" PostHistoryTypeId="3" PostId="5543" RevisionGUID="4757bbb9-4d7f-4a6d-b884-ead78ecdd0c7" CreationDate="2010-11-14T22:33:31.410" UserId="2876" Text="&lt;opengl&gt;&lt;graphics-programming&gt;" />
  <row Id="11021" PostHistoryTypeId="2" PostId="5544" RevisionGUID="a89ecfcb-b924-4f91-af4e-de249d93b0f4" CreationDate="2010-11-14T23:08:34.580" UserId="2776" Text="I am interesting: what modern AAA Game titles on the top of the market do you know where used OpenGL? And what are there engines?&#xD;&#xA;&#xD;&#xA;Thank you!" />
  <row Id="11022" PostHistoryTypeId="1" PostId="5544" RevisionGUID="a89ecfcb-b924-4f91-af4e-de249d93b0f4" CreationDate="2010-11-14T23:08:34.580" UserId="2776" Text="AAA Games and OpenGL?" />
  <row Id="11023" PostHistoryTypeId="3" PostId="5544" RevisionGUID="a89ecfcb-b924-4f91-af4e-de249d93b0f4" CreationDate="2010-11-14T23:08:34.580" UserId="2776" Text="&lt;engine&gt;&lt;opengl&gt;&lt;3d-engines&gt;&lt;game-industry&gt;" />
  <row Id="11024" PostHistoryTypeId="2" PostId="5545" RevisionGUID="b6a7ee03-1fb6-4069-ac05-91b07db954e6" CreationDate="2010-11-14T23:29:03.630" UserId="3282" Text="Any 3D game that runs at least on a platform different from microsoft, nintendo and sony uses OpenGL.&#xD;&#xA;&#xD;&#xA;This includes any game that runs on Linux, Android, Mac Os X, iPhone/iPad, Symbian and probably more.&#xD;&#xA;&#xD;&#xA;AAA games usually have got an engine written ad-hoc for the game (or for a little set of games). The ones I know the better are ID Tech engines (from 2 up to 5) and Unreal Engine (from 1 up to 4)." />
  <row Id="11025" PostHistoryTypeId="2" PostId="5546" RevisionGUID="7a109481-c599-42d8-b930-d06e208327df" CreationDate="2010-11-14T23:55:19.667" UserId="20" Text="I don't know about the exact ratio but I think about 50% (or even more) of all AAA titles run on OpenGL. Just the console games (without X-Box) make up for a *lot* of games.&#xD;&#xA;&#xD;&#xA;Or take Blizzard as an example (Starcraft2, WoW, Diablo3). All of their games run on both PC and Mac and therefore use OpenGL too. AFAIK Blizzard uses custom developed engines for their games." />
  <row Id="11026" PostHistoryTypeId="2" PostId="5547" RevisionGUID="9ea03e6a-dd65-481f-b623-ebb714e93a0e" CreationDate="2010-11-15T01:17:14.897" UserId="3321" Text="I'm seeking an example showing how to create a dll that can be called from unrealscript. If you know how to achieve this or have encountered an example, please post a reply ;)" />
  <row Id="11027" PostHistoryTypeId="1" PostId="5547" RevisionGUID="9ea03e6a-dd65-481f-b623-ebb714e93a0e" CreationDate="2010-11-15T01:17:14.897" UserId="3321" Text="Running native code (dll) with UT/UE1" />
  <row Id="11028" PostHistoryTypeId="3" PostId="5547" RevisionGUID="9ea03e6a-dd65-481f-b623-ebb714e93a0e" CreationDate="2010-11-15T01:17:14.897" UserId="3321" Text="&lt;programming&gt;" />
  <row Id="11029" PostHistoryTypeId="4" PostId="5547" RevisionGUID="9800bd20-f21e-447c-b9d2-2d29436f7533" CreationDate="2010-11-15T01:51:51.953" UserId="3321" Comment="edited title" Text="Running native code (dll) with Unreal Tournament/Unreal Engine 1" />
  <row Id="11030" PostHistoryTypeId="2" PostId="5548" RevisionGUID="411fcf57-fd56-4bf6-9576-5ae2460e43b7" CreationDate="2010-11-15T02:15:43.047" UserId="3325" Text="I just finished a 4-month internship with Blue Castle Games, working on Dead Rising 2.  The project was very late stage when I got there, so most of what I did was bug fixing.  That probably would have been a decent portion of my time anyways ... using my experience with coding to fix bugs instead of my inexperience with game development to design or develop features.&#xD;&#xA; &#xD;&#xA;A lot of what I did was also sort of IT related.  Developing internal tools was a big thing -- some to directly help with game dev, some to automate things that were manually done before.  And of course, bug fixes for other tools, including Microsoft's Games for Windows Live installer.&#xD;&#xA; &#xD;&#xA;Playtesting was another decently large part, and I also was responsible for making some of the builds that got pushed to playtesters.  Bugs in the game world are pretty hard to track down and require a lot of work to figure out the cause.&#xD;&#xA; &#xD;&#xA;I did not specialize in games or graphics, so presumably any job you did would be more related to your expertise than this.  But I hope it gives you an idea." />
  <row Id="11031" PostHistoryTypeId="2" PostId="5549" RevisionGUID="0c1ed7d5-3b3e-490e-9273-731b983b6f71" CreationDate="2010-11-15T02:18:52.173" UserId="2029" Text="I'm not sure I understand. You've implemented gameplay but not menus and levels? Like you've had a sprite jump but you've never created a tiled level or world map and such?&#xD;&#xA;&#xD;&#xA;Try to think about creative solutions to problems. Try not to think, &quot;How do professional game programmers do it? I want to do it exactly like they do.&quot; Try to think, &quot;What are several ways I can do this? What is the best way of the choices I have?&quot;&#xD;&#xA;&#xD;&#xA;For example, for a world map to choose a level, you can blit an overview map image to the screen. Then blit a dot image or some other object which can represent the level. When the player moves the mouse over the dot and clicks it, you enter that level.&#xD;&#xA;&#xD;&#xA;Menu buttons. Just render a text surface or an image of words. When mouse is over the button or the down key is pressed, highlight the button. When enter or left mouse-click is pressed, execute some function.&#xD;&#xA;&#xD;&#xA;And so on. Just try to think about how they COULD be done. Not how they are specifically done by a specific person." />
  <row Id="11032" PostHistoryTypeId="2" PostId="5550" RevisionGUID="6f5324fa-dbe6-49dd-8008-593599161ff5" CreationDate="2010-11-15T02:34:53.180" UserId="2447" Text="Nintendo and Sony provide Opengl like libraries but AAA titles tend to not use it and go for the platform's lower level libraries.  Id tends to use opengl.  Though they have said their system is abstract enough that to switch between the two is trivial.  Valve licensed id's stuff for the original halflife but built their own stuff on DX for Source so either they ported to Opengl or they licensed transgaming's Cider(that is how EA does its duel relases) to tell you the truth I haven't heard either way.  Really there is no way to tell what they use without working there or big articles about it." />
  <row Id="11033" PostHistoryTypeId="5" PostId="5550" RevisionGUID="ddf294aa-974a-41b8-9c01-9096a9ac1ab4" CreationDate="2010-11-15T02:42:56.437" UserId="2447" Comment="edited body" Text="Nintendo and Sony provide Opengl like libraries but AAA titles tend to not use it and go for the platform's lower level libraries.  Id tends to use opengl.  Though they have said their system is abstract enough that to switch between the two is trivial.  Valve licensed id's stuff for the original halflife but built their own stuff on DX for Source so either they ported to Opengl or they licensed transgaming's Cider(that is how EA does its duel relases) to tell you the truth I haven't heard either way.  Really there is no way to tell who uses what without working there or big articles about it." />
  <row Id="11034" PostHistoryTypeId="2" PostId="5551" RevisionGUID="51f8f433-c81e-4ee3-b568-4041d5ee5130" CreationDate="2010-11-15T04:54:23.283" UserId="3326" Text="So I have been working on web application. So invariably what it boils down to is making simple games which were previously based on flash or openGL. Now I know apple was moving away from flash because its proprietary unlike their stance that its got &quot;pathetic performance&quot;! &#xD;&#xA;Not true, try playing a canvas game, I can assure you at any point of time (including when its idle) it will use up a fair bit of processing power just to redraw the UI. Now I do understand that this is my fault because when the game is not active I should not be redrawing the canvas, but honestly its a lot of work and I suppose there should be libraries which should be able to assist me with that! So, how much will it be before I see a decent canvas library which handles these &quot;tiny&quot; issues for me? I can't honestly expect Steve Jobs to be doing anything more for [HTML5][1]!&#xD;&#xA;I someone knows of a good library, I am all ears...! :)&#xD;&#xA;&#xD;&#xA;PS: I use mootools and am presently using Mootools Canvas Library.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.apple.com/html5" />
  <row Id="11035" PostHistoryTypeId="1" PostId="5551" RevisionGUID="51f8f433-c81e-4ee3-b568-4041d5ee5130" CreationDate="2010-11-15T04:54:23.283" UserId="3326" Text="How long till HTML5 canvas becomes a viable game development platform?" />
  <row Id="11036" PostHistoryTypeId="3" PostId="5551" RevisionGUID="51f8f433-c81e-4ee3-b568-4041d5ee5130" CreationDate="2010-11-15T04:54:23.283" UserId="3326" Text="&lt;web&gt;&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="11037" PostHistoryTypeId="2" PostId="5552" RevisionGUID="01c0d8fb-f6a9-4147-8f7b-c8e7576bd77f" CreationDate="2010-11-15T05:05:50.447" UserId="3212" Text="I have a very general question which bothers me but i want to add some details first. Im a core JAVA programmer.I have independently created some small games in Java for fun. Now, the more I'm looking into Professional Game development the more I'm getting confused. This is because, whenever i google about game development stuffs or visit any forums etc. I come across different suggestions.  &#xD;&#xA;&#xD;&#xA;Some will say C++ is good some will say JAVA others will say some other language.Then there are scripting languages like Puthon,Lua,UnrealScript etc.Also it is suggested to have knowledge of say game engines like Unreal,Torque,Blender,Panda etc.also knowledge of OpenGL, AI, Collision Detection is required. I have even created a game using Android SDK.&#xD;&#xA; &#xD;&#xA;What i want to ask is that:  &#xD;&#xA;&#xD;&#xA; - What is the basic skill set that a Professional Game Programmer needs to have? Is it any 1 Programming Language+1 Scripting language+1 Game engine knowledge+OpenGL? (Phew!!)  &#xD;&#xA; - If I want to enter into Game Industry as Gameplay Programmer or AI programmer then can i get into it with my current skills and portfolio(as stated above)?  &#xD;&#xA; - Is learning one programming language is enough for Game Development?  &#xD;&#xA;&#xD;&#xA;Any guideline will be helpfull. &#xD;&#xA;&#xD;&#xA;     " />
  <row Id="11038" PostHistoryTypeId="1" PostId="5552" RevisionGUID="01c0d8fb-f6a9-4147-8f7b-c8e7576bd77f" CreationDate="2010-11-15T05:05:50.447" UserId="3212" Text="What is the basic skill set that a Professional Game Programmer needs to have?" />
  <row Id="11039" PostHistoryTypeId="3" PostId="5552" RevisionGUID="01c0d8fb-f6a9-4147-8f7b-c8e7576bd77f" CreationDate="2010-11-15T05:05:50.447" UserId="3212" Text="&lt;game-industry&gt;&lt;jobs&gt;" />
  <row Id="11040" PostHistoryTypeId="2" PostId="5553" RevisionGUID="0f39bdae-002b-4bea-86f2-a3c8b4c445af" CreationDate="2010-11-15T05:08:42.840" UserId="3326" Text="My final year project is on HTML5 canvas element. I am presently working on an internship for the past two month where I have to port an existing flash game to HMTL5 canvas.&#xD;&#xA;&#xD;&#xA;From what I can tell you about my life here, well its tough. The requirements team have very specific demands. What mouse click is supposed to be doing what, how the effects should apply on the game. No matter how tough it gets for the programmer even for the silliest request, it has to be addressed, and after all the requirements are implemented... The bug reporting start... God is that annoying... It really begins to get on your nerves... An offset of 1px for a click can make your life hell, trust me! It can mean new structuring of your entire positioning and interaction space for that you could accommodate to their whims and fancies...&#xD;&#xA;&#xD;&#xA;But its also fun! :) The sheer joy of writing that one really smart function, interacting with the community of how you could recreate a function that flash does automatically... All of it... Its times like that you don't regret having that job.. Makes it feel like the best job in the world, and to my nephews the coolest in the world...&#xD;&#xA;&#xD;&#xA;So a regular day in my job would be coming over to work implementing a function. Researching and searching for that one function that makes a feature possible... Getting the hell tested out of that code... Fixing that code... Discussing with the community on how that code could be optimized... Then writing what I feel is the best program on earth :P&#xD;&#xA;&#xD;&#xA;At the end of the day, mostly am satisfied with what I have accomplished, sometimes still tensed about where I could have done better and what I could have done different and perfecting that. I just in the beginner phase and so I may not be able to advice you on how it gets in the future but as of now.. I do think I have to coolest job :)" />
  <row Id="11041" PostHistoryTypeId="2" PostId="5554" RevisionGUID="479bfa57-3632-43d8-89f8-70e2c67afad1" CreationDate="2010-11-15T06:58:10.963" UserId="2029" Text="Bullet Point 1:&#xD;&#xA;You should be proficient and competent with at least one programming language. Doing so will help you to pick up other languages more easily. The type of job you're applying to depends on what language you should probably know before hand. Most triple A titles released on PC and console will most likely be developed in C++. Mobile applications and games on the other hand will most likely be using Java (Google Android and other phones) or Objective-C (iPhone). Learning a scripting language won't hurt you. It'll only benefit you. Learning always benefits, and never hurts.You don't need to have a working knowledge of any game engine, but if you're applying to a company that uses that specific engine, it'll probably help you're resume. If you're an expert on the Source engine, but you apply to id software and know nothing about the id tech engines, that's not really super helpful (but beneficial cause learning is always beneficial).&#xD;&#xA;&#xD;&#xA;BP 2:&#xD;&#xA;If you've completed projects from start to finish, and you show that you have, then I think that would help boost you're resume. I'm not sure about a plethora of tech demos though. Lots of people seem to be doing tech demos and they don't have any or few game projects completed. Gameplay programmer tends to be a jr. level position, so yes, depending on your resume you should be able to find a job somewhere.&#xD;&#xA;&#xD;&#xA;BP 3:&#xD;&#xA;I think that knowing one language and being able to use it proficiently and competently is better than knowing 5 languages and barely knowing how to use them.&#xD;&#xA;&#xD;&#xA;Disclaimer: Never worked in industry, these are just my opinions that have been formed after reading several threads and articles about game programming jobs, based on what I thought were the most sensible articles/opinions I've read." />
  <row Id="11042" PostHistoryTypeId="5" PostId="5554" RevisionGUID="d431bce8-a41f-4b39-915f-5d6e6eb39573" CreationDate="2010-11-15T07:18:59.783" UserId="2029" Comment="added 256 characters in body" Text="Bullet Point 1:&#xD;&#xA;You should be proficient and competent with at least one programming language. Doing so will help you to pick up other languages more easily. The type of job you're applying to depends on what language you should probably know before hand. Most triple A titles released on PC and console will most likely be developed in C++. Mobile applications and games on the other hand will most likely be using Java (Google Android and other phones) or Objective-C (iPhone). If you take a look around at job listings for software engineers on developers websites, it usually will mention what language experience you need to have. For example, &quot;Proficient and knowledgeable in C++&quot; or &quot;Experience with C++ for at least two years.&quot; Learning a scripting language won't hurt you. It'll only benefit you. Learning always benefits, and never hurts.You don't need to have a working knowledge of any game engine, but if you're applying to a company that uses that specific engine, it'll probably help you're resume. If you're an expert on the Source engine, but you apply to id software and know nothing about the id tech engines, that's not really super helpful (but beneficial cause learning is always beneficial).&#xD;&#xA;&#xD;&#xA;BP 2:&#xD;&#xA;If you've completed projects from start to finish, and you show that you have, then I think that would help boost you're resume. I'm not sure about a plethora of tech demos though. Lots of people seem to be doing tech demos and they don't have any or few game projects completed. Gameplay programmer tends to be a jr. level position, so yes, depending on your resume you should be able to find a job somewhere.&#xD;&#xA;&#xD;&#xA;BP 3:&#xD;&#xA;I think that knowing one language and being able to use it proficiently and competently is better than knowing 5 languages and barely knowing how to use them.&#xD;&#xA;&#xD;&#xA;Disclaimer: Never worked in industry, these are just my opinions that have been formed after reading several threads and articles about game programming jobs, based on what I thought were the most sensible articles/opinions I've read." />
  <row Id="11043" PostHistoryTypeId="2" PostId="5555" RevisionGUID="b0c8a93a-a278-4255-9bf2-dd8faec7c6cb" CreationDate="2010-11-15T07:27:57.550" UserId="2819" Text="An interesting way to design puzzles is through abstraction - look at objects around your home or elsewhere and think about how they interact with each other, how they can be manipulated and how they could benefit a goal or aim.&#xD;&#xA;&#xD;&#xA;Don't forget to think in three dimensions, as this will help with the design of the puzzle space.&#xD;&#xA;&#xD;&#xA;Puzzles can be about a whole variety of things applicable to simple day-to-day living. Some examples: shape, colour, memory, logic, primitive maths (addition, subtraction, multiplication and division), sound, depth, light, interaction of lifeforms.&#xD;&#xA;&#xD;&#xA;Be sure to tie your puzzles in with the game world and the immersion of the game itself and you will have some thoroughly engaging mind-bogglers." />
  <row Id="11044" PostHistoryTypeId="2" PostId="5556" RevisionGUID="47c2a403-9ad2-4df8-8dd8-8a4a801b3807" CreationDate="2010-11-15T08:16:25.717" UserId="2819" Text="Think of a large open field with a single tree in the middle. The tree comprises the things you said you get lost on, and the bedrock is the actual game world. You've handled the tough bit already, so think about the architecture when designing the links between menus etc as being like a tree's branches, or if you prefer, its roots." />
  <row Id="11045" PostHistoryTypeId="2" PostId="5557" RevisionGUID="1de5aca5-25db-493d-8471-e7fdc80216ea" CreationDate="2010-11-15T08:17:06.667" UserId="3064" Text="For programming social games there are to main skills that are the only ones needed.&#xD;&#xA;&#xD;&#xA;1. Program action script (you can use an elipse environment and a svn), this is used for the front end of the game (the webpage)&#xD;&#xA;&#xD;&#xA;2. Program java (which can also be done on eclipse an use svn), this is used for the server side actions to take from the requests of the webpage.&#xD;&#xA;" />
  <row Id="11046" PostHistoryTypeId="2" PostId="5558" RevisionGUID="2f4221f5-e737-4ac9-a372-d004be32938a" CreationDate="2010-11-15T08:21:15.027" UserId="3334" Text="1) RPG?&#xD;&#xA;2) MMORPG?&#xD;&#xA;&#xD;&#xA;I'm talking more about good content here.&#xD;&#xA;&#xD;&#xA;(Sorry, there is no rpg\people\team tag or something)" />
  <row Id="11047" PostHistoryTypeId="1" PostId="5558" RevisionGUID="2f4221f5-e737-4ac9-a372-d004be32938a" CreationDate="2010-11-15T08:21:15.027" UserId="3334" Text="How many people are needed for making a good (MMO)RPG?" />
  <row Id="11048" PostHistoryTypeId="3" PostId="5558" RevisionGUID="2f4221f5-e737-4ac9-a372-d004be32938a" CreationDate="2010-11-15T08:21:15.027" UserId="3334" Text="&lt;game-design&gt;" />
  <row Id="11049" PostHistoryTypeId="2" PostId="5559" RevisionGUID="328bdeea-8f5a-4b86-bd5e-3b9592d0d326" CreationDate="2010-11-15T08:41:29.787" UserId="2091" Text="Regarding the menu at start, what you need is a variable that tracks &quot;Game State&quot;.  In your main game loop you will then have something like:&#xD;&#xA;&#xD;&#xA;    switch (GameState) {&#xD;&#xA;        case Menu: ...&#xD;&#xA;        case MainGame: ...&#xD;&#xA;        case EndScreen: ...&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This way, the block of code that is actually executed is completely different depending on the &quot;Game State&quot;.  You can then develop the Menu part as if it was a whole application on its own which exits by changing the value of GameState.  The main game code that you already have would only execute in the MainGame case.  And you can even add other states, like &quot;Worldmap&quot;, or &quot;Cutscene&quot;.  This can be used every time you need to manage the input differently or halt the regular update of the game (for example, &quot;Paused&quot;).&#xD;&#xA;&#xD;&#xA;Of course, this &quot;switch&quot; statement might also be needed inside the &quot;keyPressed&quot;, &quot;mouseDown&quot;, or other functions." />
  <row Id="11050" PostHistoryTypeId="2" PostId="5560" RevisionGUID="5ae2f53a-8cdb-4844-914e-fce08e07221e" CreationDate="2010-11-15T08:53:16.997" UserId="2798" Text="According to the [UDN][1], that function was added to Unreal Engine 3 on December 2009's version, and wasn't made available for older builds. Looks like you're out of luck.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://udn.epicgames.com/Three/DLLBind.html" />
  <row Id="11051" PostHistoryTypeId="2" PostId="5561" RevisionGUID="51eb3eb2-8d86-4ea8-9f52-05cdfd620c79" CreationDate="2010-11-15T09:48:28.993" UserId="20" Text="Well, what makes a good RPG/MMORPG?&#xD;&#xA;&#xD;&#xA;Personally I have enjoyed [Torchlight][1] a lot (single player action RPG) and it was created by a rather small team of roughly 26 people.&#xD;&#xA;&#xD;&#xA;If you look at a game like World of Warcraft, the [numbers][2] are entirely different though.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.torchlightgame.com/&#xD;&#xA;  [2]: http://www.thegamereviews.com/article-1515-World-of-Warcraft-by-the-Numbers.html" />
  <row Id="11052" PostHistoryTypeId="2" PostId="5562" RevisionGUID="19d2daf3-9397-4ebc-8c65-868db6cee5c8" CreationDate="2010-11-15T10:20:14.073" UserId="3132" Text="100+ people for our project http://allods.com/ . It was really hard to gather so many high skilled people together in one place." />
  <row Id="11053" PostHistoryTypeId="2" PostId="5563" RevisionGUID="571c1697-baa2-48da-963f-220f228e609a" CreationDate="2010-11-15T10:29:59.970" UserId="3339" Text="All Id Software engines uses OpenGl for graphics rendering since Quake 1.&#xD;&#xA;&#xD;&#xA;Ogre3D can use Direct3D or OpenGl (although is not an engine used in AAA titles AFAIK)" />
  <row Id="11054" PostHistoryTypeId="2" PostId="5564" RevisionGUID="2a4ec39c-226c-4d4b-86c1-ea4bd3637ca9" CreationDate="2010-11-15T10:40:40.060" UserId="3339" Text="The example reasons why a vertex layout is needed:&#xD;&#xA;&#xD;&#xA;&gt; We now have a structure that&#xD;&#xA;&gt; represents our vertex. **That takes care&#xD;&#xA;&gt; of storing vertex information in&#xD;&#xA;&gt; system memory in our application**.&#xD;&#xA;&gt; However, when we feed the GPU the&#xD;&#xA;&gt; vertex buffer containing our vertices,&#xD;&#xA;&gt; we are just feeding it a chunk of&#xD;&#xA;&gt; memory. The **GPU must also know about&#xD;&#xA;&gt; the vertex layout in order to extract&#xD;&#xA;&gt; correct attributes out from the&#xD;&#xA;&gt; buffer.** To accomplish this requires&#xD;&#xA;&gt; the use of an input layout.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Take into account that the vertex shader is just a step in the rendering pipeline, so is the responsibility of the GPU to issue the correct data as parameters in the shader. &#xD;&#xA;Yes, you could just define a &quot;data size&quot; and receive an array with that size in the shader and then process it, but that would require more code in the shader, and also could disallow GPU internal optimizations.&#xD;&#xA;&#xD;&#xA;I haven't work with DX11, but in OpenGl, DX9 and other graphical APIs, you must define some kind of  vertex layout" />
  <row Id="11055" PostHistoryTypeId="2" PostId="5565" RevisionGUID="0362e441-9b8c-4359-af49-1984611a60cf" CreationDate="2010-11-15T10:48:45.330" UserId="2469" Text="Also make sure, if you do pick up a book, that it includes some chapters on the HLSL topic, as there is no more fixex pipeline in DX10+. Many books seem to not cover that subject at all, which is a big mistake IMO.&#xD;&#xA;The msdn is a great HLSL resource." />
  <row Id="11056" PostHistoryTypeId="2" PostId="5566" RevisionGUID="d9fb879f-2e54-42d7-93b7-651544e3f499" CreationDate="2010-11-15T10:54:32.563" UserId="2469" Text="There is another very important skill needed that seems to be a little overlooked. You need to know how to fit in and work with a team of people, going from other game devs, to designers and project managers and stuff. It's not a technical skill, but it's still very important, as you could be the best dev in the house and if you can't get on with people, make large games is going to be a problem!&#xD;&#xA;&#xD;&#xA;Also, as ShrimpCrackers kowing one language well is better than roughly knowing 5 languages, and understanding what goes on under the hood of that one language you are goot at is even better, as for games, you need to know how to get the best performance out of the language.&#xD;&#xA;&#xD;&#xA;Last but not least, knowing a little about hardware, GPU in particular won't hurt!" />
  <row Id="11057" PostHistoryTypeId="6" PostId="5558" RevisionGUID="4a11d81f-d821-480f-bd71-ed2fedbd9a60" CreationDate="2010-11-15T11:03:54.297" UserId="2995" Comment="edited tags" Text="&lt;game-design&gt;&lt;mmo&gt;" />
  <row Id="11058" PostHistoryTypeId="6" PostId="5558" RevisionGUID="873f9580-deaf-40a4-aaa1-a60ba2ebf89d" CreationDate="2010-11-15T11:04:28.040" UserId="2995" Comment="edited tags" Text="&lt;game-design&gt;&lt;mmo&gt;&lt;team&gt;&lt;development&gt;" />
  <row Id="11059" PostHistoryTypeId="2" PostId="5567" RevisionGUID="3e14da05-6e87-4deb-9c35-4751338b88af" CreationDate="2010-11-15T11:08:39.233" UserId="744" Text="Unfortunately Epic seems to have removed most of the documentation for non-UDK versions of the engine from public view.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://web.archive.org/web/20080822135510/http://udn.epicgames.com/Two/NativeFunctions.html&quot;&gt;Archive.org preserved some documentation from how to do it within UE2&lt;/a&gt; (which is probably closer to UE1 than UE3), but I can't turn up anything official for UE1 anywhere.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://wiki.beyondunreal.com/Legacy:Native_Coding&quot;&gt;UnrealWiki has a Legacy Native Coding page&lt;/a&gt;, but many of the links on it are now dead.&#xD;&#xA;&#xD;&#xA;Writing native code in many versions of Unreal, as well as writing Native Classes in UE3, requires a source license." />
  <row Id="11060" PostHistoryTypeId="5" PostId="5547" RevisionGUID="e727f89d-d484-4918-af56-b346bc7fc15f" CreationDate="2010-11-15T11:10:18.593" UserId="744" Comment="deleted 54 characters in body; edited tags; edited title" Text="I'm seeking an example showing how to create a DLL that can be called from UnrealScript in Unreal Engine 1 or Unreal Tournament." />
  <row Id="11061" PostHistoryTypeId="4" PostId="5547" RevisionGUID="e727f89d-d484-4918-af56-b346bc7fc15f" CreationDate="2010-11-15T11:10:18.593" UserId="744" Comment="deleted 54 characters in body; edited tags; edited title" Text="How can I run native code (in a DLL) from UnrealScript in UT/UE1?" />
  <row Id="11062" PostHistoryTypeId="6" PostId="5547" RevisionGUID="e727f89d-d484-4918-af56-b346bc7fc15f" CreationDate="2010-11-15T11:10:18.593" UserId="744" Comment="deleted 54 characters in body; edited tags; edited title" Text="&lt;programming&gt;&lt;unreal&gt;" />
  <row Id="11063" PostHistoryTypeId="6" PostId="5558" RevisionGUID="74fec29f-e511-4fe5-b136-e26be3fc0c59" CreationDate="2010-11-15T11:12:01.307" UserId="744" Comment="edited tags; edited tags; deleted 57 characters in body" Text="&lt;project-management&gt;&lt;mmo&gt;" />
  <row Id="11064" PostHistoryTypeId="5" PostId="5558" RevisionGUID="74fec29f-e511-4fe5-b136-e26be3fc0c59" CreationDate="2010-11-15T11:12:01.307" UserId="744" Comment="edited tags; edited tags; deleted 57 characters in body" Text="1) RPG?&#xD;&#xA;2) MMORPG?&#xD;&#xA;&#xD;&#xA;I'm talking more about good content here." />
  <row Id="11065" PostHistoryTypeId="2" PostId="5568" RevisionGUID="c2699179-7bb7-4cd1-9274-5fcb905111da" CreationDate="2010-11-15T11:22:35.133" UserId="2995" Text="The HTML5 games currently running are about where Flash was 5 years ago, just basic 2D/3D graphics with hardly any interactivity to be considered games (oh yes, you can contradict that by linking me to 10 HTML games, but that doesn't outweight the 10 thousand+ flash games in existence).&#xD;&#xA;&#xD;&#xA;And by the time browsers that support Canvas become a de-facto standard (and I mean 90%+ usage across the world), Flash apps will have upgraded to supporting 3D rendering via DirectX and OpenGL, and dynamic sound generation via byte stream." />
  <row Id="11066" PostHistoryTypeId="2" PostId="5569" RevisionGUID="2f7bad88-160c-41e3-a03f-e7d561ea8031" CreationDate="2010-11-15T11:45:14.657" UserId="3341" Text="Infinite, because IE8 currently supports only HTML &lt; 5, and IE 9 won't be available for Windows &lt; Vista, while many people will be going to wait for Windows 8 until they upgrade." />
  <row Id="11067" PostHistoryTypeId="16" PostId="5545" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-15T11:59:12.070" UserId="51" />
  <row Id="11068" PostHistoryTypeId="16" PostId="5546" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-15T11:59:12.070" UserId="51" />
  <row Id="11069" PostHistoryTypeId="16" PostId="5550" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-15T11:59:12.070" UserId="51" />
  <row Id="11070" PostHistoryTypeId="16" PostId="5563" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-15T11:59:12.070" UserId="51" />
  <row Id="11071" PostHistoryTypeId="16" PostId="5544" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-15T11:59:12.070" UserId="51" />
  <row Id="11072" PostHistoryTypeId="2" PostId="5570" RevisionGUID="239db0f3-656c-4386-a54f-4fc80a71e83a" CreationDate="2010-11-15T12:01:47.137" UserId="3341" Text="Which technologies would you use if you were to write a (MMO)RPG, and why ?&#xD;&#xA;&#xD;&#xA;Would that be Java + AJAX + HTML5 + Linux&#xD;&#xA;&#xD;&#xA;or ASP.NET + MVC + JQuery + Windows&#xD;&#xA;&#xD;&#xA;or PHP + Linux + MySQL&#xD;&#xA;&#xD;&#xA;or ColdFusion + Windows + MySQL&#xD;&#xA;&#xD;&#xA;or ASP.NET + MVC with mono on Linux &#xD;&#xA;&#xD;&#xA;or Perl + Linux + cgi/fastcgi&#xD;&#xA;&#xD;&#xA;or C++ + Linux + lighthttp module &#xD;&#xA;&#xD;&#xA;or Desktop client-server application &#xD;&#xA;&#xD;&#xA;or WPF &#xD;&#xA;&#xD;&#xA;or anything else ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Would you rather use HTML5 or Flash or Silverlight ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would argue towards Linux + mono/ASP.NET-MVC + FireBird + Flash/Silverlight &#xD;&#xA;&#xD;&#xA;The reason: &#xD;&#xA;Linux because it is cheap and customizable, which is a definitive cost advantage if you need to run many servers.&#xD;&#xA;&#xD;&#xA;mono/ASP.NET-MVC because one can easily develop quite complicated things in it quite fast, with a defintive speed advantage over PHP.&#xD;&#xA;&#xD;&#xA;FireBird because it has more capabilities than MySQL and a better license plus it's free and nearly as fast as MySQL, while PostGre would be too slow in comparison to MySQL/Firebird.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would rather dispose of HTML/HTML5, because it's very browser specific, and replace the UI with Flash.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Flash because it is more popular than Silverlight and JavaApplets, although Silverlight would probably be better from a .NET developer's point of view.&#xD;&#xA;&#xD;&#xA;I'm eager to learn whether somebody has (or thinks he has) a better combination" />
  <row Id="11073" PostHistoryTypeId="1" PostId="5570" RevisionGUID="239db0f3-656c-4386-a54f-4fc80a71e83a" CreationDate="2010-11-15T12:01:47.137" UserId="3341" Text="Which tool combination are advisable for a  (MMO)RPG, and which aren't ?" />
  <row Id="11074" PostHistoryTypeId="3" PostId="5570" RevisionGUID="239db0f3-656c-4386-a54f-4fc80a71e83a" CreationDate="2010-11-15T12:01:47.137" UserId="3341" Text="&lt;game-design&gt;&lt;tools&gt;&lt;platform&gt;&lt;development-speed&gt;" />
  <row Id="11075" PostHistoryTypeId="2" PostId="5571" RevisionGUID="62e6d522-7001-471e-8db0-c95d09f186db" CreationDate="2010-11-15T12:18:09.293" UserId="51" Text="This question isn't really answerable since the ultimate answer depends on so many different variables that are specific to your needs.  How many total users are you expecting to support simultaneously, how many users per server are you expecting, how much bandwidth per user do you want, what kind of development environment are your developers familiar with, what kind of response time to certain operations is acceptable to end users, how many different server types are you going to be running. &#xD;&#xA;&#xD;&#xA;And that's just for the server.  What is your client going to be running?  Do you expect a standalone app or do you want it to be a web game?  Do you need 3d graphics?   &#xD;&#xA;&#xD;&#xA;Don't underestimate how much time you can save by throwing money at a problem (in certain situations).  Sometimes paid solutions aren't as powerful and flexible as open source ones. It really depends.  " />
  <row Id="11076" PostHistoryTypeId="2" PostId="5572" RevisionGUID="5c17bf67-21ba-4393-8cbd-be968cd514d0" CreationDate="2010-11-15T12:31:54.617" UserId="51" Text="Other than the high level discussion points that Joe brought up, there are a few other things you should be aware of.&#xD;&#xA;&#xD;&#xA;* You'll typically be using some kind of bug tracking or task tracking tool that your lead will be using to assign you tasks.  Sometimes they're the same (i.e. FogBugz).  Sometimes your bug list will be through a publisher and your task list is on an internal wiki.  You don't just sit down and start doing *whatever*, your tasks are going to be directed.&#xD;&#xA;* Sometimes you'll be asked to estimate your tasks.  This is implicit when using systems like FogBugz.  Part of your responsibilities will/should/can be to break down a higher level feature into parts that you can use to properly estimate how long it would take for the purposes of seeing how on track you are to finishing milestones, etc. &#xD;&#xA;* A lot of studios have moved to more agile/scrumm style methodologies.  Updating burn down charts (i.e. saying you spent X hours on task Y and expect to be done in Z time) is fairly common. Daily standup meetings are probably a little more common.  Either way you'll be providing some visibility as to what you're working on.&#xD;&#xA;* You will be using version/source control.  The bigger the studio, the more likely they are to use Perforce.  You should be aware of the basics of it (checking out files, committing files, being able to resolve your local merge conflicts).  You might also be called upon to understand branching and merging branches.  Some studios work where all developers get their local branch and you can check in as much as you want and merging when your branch.  Other studios (ours) just has a &quot;don't break main&quot; policy, so you have to make sure you update, do a quick test to make sure you didn't break anything, *then* check in.  Some studios don't have that policy and people break shit all the time and it's super annoying and you have to learn how to work around that.&#xD;&#xA;* Code reviews are fairly common.  Sometimes they're code-department-wide.  Our team uses a code buddy approach where it's more one-on-one for reviews on checkins.  Either way you should expect to be asked to provide critical analysis of other peoples' code." />
  <row Id="11077" PostHistoryTypeId="5" PostId="5544" RevisionGUID="9216e8ba-7332-470c-8ce3-2089d0f29ec2" CreationDate="2010-11-15T12:34:11.883" UserId="51" Comment="ENGLISH" Text="What modern AAA games on the top of the market used OpenGL? If applicable, what engine did they use?" />
  <row Id="11078" PostHistoryTypeId="6" PostId="5544" RevisionGUID="9216e8ba-7332-470c-8ce3-2089d0f29ec2" CreationDate="2010-11-15T12:34:11.883" UserId="51" Comment="ENGLISH" Text="&lt;engine&gt;&lt;opengl&gt;&lt;3d-engines&gt;" />
  <row Id="11079" PostHistoryTypeId="6" PostId="5570" RevisionGUID="40b2b1ba-f647-4d27-8abd-3bd0aefb29b8" CreationDate="2010-11-15T12:43:33.073" UserId="744" Comment="edited tags" Text="&lt;tools&gt;&lt;platform&gt;&lt;development-speed&gt;" />
  <row Id="11080" PostHistoryTypeId="6" PostId="5531" RevisionGUID="f41be07d-8005-47b7-a5d7-312d73ecba0b" CreationDate="2010-11-15T13:19:23.700" UserId="51" Comment="edited tags" Text="&lt;xna&gt;&lt;camera&gt;" />
  <row Id="11081" PostHistoryTypeId="2" PostId="5573" RevisionGUID="e870198f-8de3-40a9-8649-6ed745c3a3d4" CreationDate="2010-11-15T13:42:49.787" UserId="659" Text="Are there any simple (or well documented) algorithms for basic CSG operations on 2D polygons?&#xD;&#xA;&#xD;&#xA;I'm looking for a way to 'add' a number of overlapping 2D collision shapes. These may be convex or concave, but will be closed shapes, defined as a set of line segments, with no self-intersections.&#xD;&#xA;&#xD;&#xA;The use of this would be to construct a clean set of collision edges, for use with a 2D physics engine, from a scene consisting of many arbitrarily placed (and frequently overlapping) objects, each with their own collision shape.&#xD;&#xA;&#xD;&#xA;To begin with, I only need to 'add' shapes, but the ability to 'subtract', to create holes, may also be useful." />
  <row Id="11082" PostHistoryTypeId="1" PostId="5573" RevisionGUID="e870198f-8de3-40a9-8649-6ed745c3a3d4" CreationDate="2010-11-15T13:42:49.787" UserId="659" Text="Implementing 2D CSG (for collision shapes)?" />
  <row Id="11083" PostHistoryTypeId="3" PostId="5573" RevisionGUID="e870198f-8de3-40a9-8649-6ed745c3a3d4" CreationDate="2010-11-15T13:42:49.787" UserId="659" Text="&lt;2d&gt;&lt;math&gt;&lt;collision-detection&gt;&lt;geometry&gt;" />
  <row Id="11084" PostHistoryTypeId="2" PostId="5574" RevisionGUID="8ca73e84-7a7c-4b40-8e07-77181870cb5d" CreationDate="2010-11-15T15:00:18.293" UserId="370" Text="I wrote a little proof of concept that used CSG to make scorched earth/worms style game play.  I implemented it with [gluTessellate][1].  I then mapped the tessellated triangles onto Box2D polygons.  I could both add and subtract *dirt* from the simulation as well as make and fill holes.&#xD;&#xA;&#xD;&#xA;The largest problem I found using gluTessallate is that it has no problem returning degenerate triangles.  I had to filter those out before moving the tessellated triangles into the physics engine.&#xD;&#xA;&#xD;&#xA;One of the nice things about gluTessallate is that it is possible determine adjacency from the callback information.  I never took it further but in theory you could use the adjacency and [SCC][2] to accurately detect islanding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glprogramming.com/red/chapter11.html#name1&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Strongly_connected_component" />
  <row Id="11085" PostHistoryTypeId="2" PostId="5575" RevisionGUID="f1cd34ca-9632-4553-a484-0541daecec71" CreationDate="2010-11-15T16:09:34.987" UserId="2992" Text="Experiment. Think about puzzle games you have played that come packaged with a level editor. How would you create a new puzzle using their tool?&#xD;&#xA;&#xD;&#xA;Usually by experimenting you can find interesting interactions between puzzle elements.&#xD;&#xA;&#xD;&#xA;Working backwards is also a very intuitive way to create puzzles of any sort. I would imagine this is the most common technique. When you know the answer it is easy to build complexity on top of it.&#xD;&#xA;&#xD;&#xA;Think of IQ puzzle designers. If I give you a sequence 1,9,25,49,___ and ask you what is next you have to use logic to determine what is going on. Where as from the designers point of view it is just matter of making something up that takes no logic at all:&#xD;&#xA;((n*2)-1)^2&#xD;&#xA;&#xD;&#xA;So, I would suggest building a tool to edit levels / elements / etc in your game. Experiment yourself, and allow other designers to experiment. You will see [interesting patterns emerge][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Conway's_Game_of_Life" />
  <row Id="11086" PostHistoryTypeId="2" PostId="5576" RevisionGUID="97d327ad-92f5-41f2-9b2c-5174e29edd59" CreationDate="2010-11-15T16:24:47.537" UserId="2316" Text="I'll give you two examples of games that I believe use the canvas element.&#xD;&#xA;&#xD;&#xA;[Quake II][1] (webGL, chrome-only)  &#xD;&#xA;[JZNES][2] &#xD;&#xA;&#xD;&#xA;I don't know what exactly you mean, or what you're looking for but this looks to be the next in up and coming technology.  Games developed for &lt;canvas&gt; should run on mobile devices as well as laptops and cross-platform without much to-do.&#xD;&#xA;&#xD;&#xA;Granted, it won't ever be as powerful as dedicated hardware like an alienware machine or console, but it will probably fill the same role as Flash is performing now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.geardiary.com/2010/04/02/the-power-of-html5-webgl-quake-ii-in-a-web-browser/&#xD;&#xA;  [2]: http://benfirshman.com/projects/jsnes/" />
  <row Id="11087" PostHistoryTypeId="2" PostId="5577" RevisionGUID="58f67e7c-94c5-453d-8984-c6cd9d29c069" CreationDate="2010-11-15T17:02:49.580" UserId="659" Text="'A block of floats' wouldn't quite work, as&#xD;&#xA;&#xD;&#xA;1) GPUs generally deal with vectors, usually 4-element vectors - and a vertex declaration defines how the floats are grouped into vectors (3-element position, 2-element UV set, etc)&#xD;&#xA;&#xD;&#xA;2) Non-float data formats can be used, such as a 32-bit RGBA (which gets expanded into a vector of floats). The GPU needs to know about this" />
  <row Id="11088" PostHistoryTypeId="2" PostId="5578" RevisionGUID="2de963bd-0f2d-4e81-83b2-e37a9c3b501b" CreationDate="2010-11-15T17:46:46.713" UserId="424" Text="I think the title of your question could be better stated as &quot;How long until we see solid HTML5 game development frameworks?&quot;.&#xD;&#xA;&#xD;&#xA;The answer is: soon. There are several immature or WIP frameworks that I can think of off the top of my head. My guess is we'll start to see some pretty decent frameworks in the next 6 months or so.&#xD;&#xA;&#xD;&#xA;Some frameworks to keep an eye on:&#xD;&#xA;&#xD;&#xA;* [Impact](http://impactjs.org/)&#xD;&#xA;* [Flax Game Engine](http://flax.ie/category/flax-game-engine/)&#xD;&#xA;&#xD;&#xA;I'm sure there are at least a few other HTML5 game engines in the works. (If anyone knows of more, add a comment.)&#xD;&#xA;&#xD;&#xA;There are some tricky problems with HTML5 game dev at the moment, for sure. It's kind of the wild west right now.&#xD;&#xA;&#xD;&#xA;My co-founder and I have been developing our own HTML5 game engine that solves the kinds of issues you're mentioning (suspend on blur and things of that nature). It's developed for our own games currently, but we may open source it once it matures.&#xD;&#xA;&#xD;&#xA;It's either that or wait until a solid framework emerges, and we're impatient. :)&#xD;&#xA;" />
  <row Id="11089" PostHistoryTypeId="2" PostId="5579" RevisionGUID="861f0619-d96f-4fda-abc4-2a1e6b96d952" CreationDate="2010-11-15T17:54:23.767" UserId="3271" Text="You don't have nearly enough information.&#xD;&#xA;&#xD;&#xA;Is it 2D or 3D? How much character customization? How many creatures? How many textures? How much music/sound? How big is the world?&#xD;&#xA;&#xD;&#xA;I could go on forever with thousands of questions you need to ask yourself before you can even attempt to figure out how many people it will take. Short answer is; anywhere from 1 to 1000 people." />
  <row Id="11091" PostHistoryTypeId="2" PostId="5581" RevisionGUID="b1f32ea5-248b-4cba-9e01-b85350113c8b" CreationDate="2010-11-15T18:18:28.673" UserId="3351" Text="As an adventure game developer (Eternally Us, McCarthy Chronicles) I've found that adventure gamers are generally split into 2 camps. Those who play for puzzles and those who play for interaction and story.&#xD;&#xA;Of course there is some overlap but it might be a good idea to establish your audience before thinking about puzzle design.&#xD;&#xA;&#xD;&#xA;Those who play for story generally prefer 'puzzles', in a broad sense, with a heavy grounding in reality. This include the more modern post-adventure games like Heavy Rain and Dreamfall. The key with games like this is not to break the immersion and to consider your 'puzzles' as 'challenges' instead.&#xD;&#xA;&#xD;&#xA;On the flip side, the old school adventure gamers tend to want hardcore puzzles like they saw in maniac mansion. The best way to design puzzles like this is to start at the solution and work backwards. This allows you to create multi-faceted solutions like those seen in Day of the Tentacle and the other classic Lucas Arts games.&#xD;&#xA;These puzzles start with a concept and build the puzzle around it.&#xD;&#xA;These games are generally easier to design puzzles for because its acceptable for puzzles to get ridiculous and unintuitive because it is, after all, a 'puzzle.&#xD;&#xA;Think of how stupid some of the puzzles with the crystals were in The Dig.&#xD;&#xA;&#xD;&#xA;The biggest advice I can give is to play a lot of adventure games. All puzzles generally fall within 1 of several specific categories with well established tropes. Just observe and imitate, then try to branch your puzzles into something new.&#xD;&#xA; &#xD;&#xA;" />
  <row Id="11092" PostHistoryTypeId="2" PostId="5582" RevisionGUID="62ae6f52-c626-4b9e-b478-c71a835d6d47" CreationDate="2010-11-15T18:41:23.703" UserId="2787" Text="The more I research this topic and talk with professional game developers, the more I think it really comes down to a few things. In no particular order:&#xD;&#xA;&#xD;&#xA; - **Ability to work well together in a team atmosphere.** Building games takes an extraordinary amount of people, just reading the credits in some of the AAA games nowadays takes 10+ minutes, if you can't work well with people and your goal is to work with other people to make a great game then I fear this isn't the right industry. This is one of those soft skills that is usually developed over time from working on projects with other people.&#xD;&#xA; - **Find what you like to do.** This is kind of open ended but find out what you like about game development and what skills you need to accomplish this. I know this is kind of the answer you are looking for, but I could rattle off all the skills you might need to be an engine developer, graphics developer or a gameplay developer, but you can find a lot of that information pretty easily online. Your skills are going to need to tie very closely into what you are interested in. Ex: Don't worry about knowing the in's and out's of OpenGL and DirectX if you are really interested in Server side development and vice versa.&#xD;&#xA; - **Low Level Language** With the above being said though, I agree with the other posters that a low level language is a good idea to learn. I know when I went from C# to C++ I learned a lot about how the magic of C# works, this is knowledge that gives you a good understanding of how to effectively communicate with a computer regardless of language. &#xD;&#xA; - **Understand computer architecture** - By this I don't mean that you must have a degree in CE or EE to really understand every part of a computer architecture, but know the basics of how memory, CPU and GPU work. Regardless of the area of game development you go into it will be beneficial to at least have a grasp of how these work. If you want to jump into Graphics programming or Engine programming then you will need to understand even more in this space." />
  <row Id="11093" PostHistoryTypeId="5" PostId="5582" RevisionGUID="2cb50554-f5c0-4044-a013-c19748e2c334" CreationDate="2010-11-15T18:46:41.563" UserId="2787" Comment="added 19 characters in body" Text="The more I research this topic and talk with professional game developers, the more I think it really comes down to a few things. In no particular order:&#xD;&#xA;&#xD;&#xA; - **Ability to work well together in a team atmosphere.** Building games takes an extraordinary amount of people, just reading the credits in some of the AAA games nowadays takes 10+ minutes, if you can't work well with people and your goal is to work with other people to make a great game then I fear this isn't the right industry. This is one of those soft skills that is usually developed over time from working on projects with other people.&#xD;&#xA; - **Find what you like to do.** This is kind of open ended but find out what you like about game development and what skills you need to accomplish this. I know this is kind of the answer you are looking for, but I could rattle off all the skills you might need to be an engine developer, graphics developer or a gameplay developer, but you can find a lot of that information pretty easily online. Your skills are going to need to tie very closely into what you are interested in. Ex: Don't worry about knowing the in's and out's of OpenGL and DirectX if you are really interested in Server side development and vice versa.&#xD;&#xA; - **Be Proficient in a Low Level Language** With the above being said though, I agree with the other posters that a low level language is a good idea to learn. I know when I went from C# to C++ I learned a lot about how the magic of C# works, this is knowledge that gives you a good understanding of how to effectively communicate with a computer regardless of language. &#xD;&#xA; - **Understand computer architecture** - By this I don't mean that you must have a degree in CE or EE to really understand every part of a computer architecture, but know the basics of how memory, CPU and GPU work. Regardless of the area of game development you go into it will be beneficial to at least have a grasp of how these work. If you want to jump into Graphics programming or Engine programming then you will need to understand even more in this space." />
  <row Id="11094" PostHistoryTypeId="2" PostId="5583" RevisionGUID="93471d0f-7b74-4a61-a84a-db69be5f5371" CreationDate="2010-11-15T19:03:29.513" UserId="1742" Text="Adventure games rely heavily on the same motivations as readers or viewers of books or film. For this reason I'd recommend taking a look at the chapters on the section on the inciting incident and the principle of closing the action-expectation gap in Robert McKee's book Story: http://www.amazon.co.uk/Story-Substance-Structure-Principles-Screenwriting/dp/0413715604&#xD;&#xA;&#xD;&#xA;The basic premise is that there is something (the story that you probably want to tell) that sets up a disparity between the expected outcome of an action of the hero, and the actual outcome of that action. This is the gap that needs to be closed by the hero during his adventure. This applies to Adventure game puzzle design by being the technique by which you reveal the new puzzles to be solved: If you know you need A, then you first need to find A, or find someone that can tell you where A is, and when you know that you might need to know how to get there, or how to get A once you get to it. Each thing you need to do to acquire A could be an action, or another item to find/use on another item to create another item/action/opportunity to find another step towards A. Even when you have A/get to A, the final outcome should be that A was not quite what you wanted, but took you someway towards getting what A originally represented as its outcome.&#xD;&#xA;&#xD;&#xA;Now, i'll give you an example. You are a cook, and you have broken your frying pan. the story is the cook that has to cook food for your slave driving master. To mend the pan, you just need to get a new handle, the helper recommends using the broken broom in the corner, but it needs cutting, where to find a saw to cut it? Outside, maybe by taking the milk from the fridge to swap for a few moments with a saw... pan fixed, you cook, but the original solution of making breakfast has now been made harder as the time it took to fix the pan has caused the fire to go out...&#xD;&#xA;&#xD;&#xA;The expectation of the player should be teased out so they almost always only feel a few clicks away from completing their task, but at the same time allowing the opportunity for a really long list of actions to complete in order to finish the game.&#xD;&#xA;&#xD;&#xA;An important part of any long sequence of actions is that the player should know when they are about to finish the game, make sure it's obvious that they are, otherwise the game will feel like they're being short changed at the end, and there's nothing worse than an experience ending badly." />
  <row Id="11095" PostHistoryTypeId="2" PostId="5584" RevisionGUID="30318821-7bf5-4435-a2b2-dae591f11cc3" CreationDate="2010-11-15T19:13:19.363" UserId="659" Text="The first technology I'd use if I was anywhere near an MMO project would be the technology that went into the pair of trainers on my feet. As I'd be running away from it as fast as I could!&#xD;&#xA;&#xD;&#xA;Seriously, if you don't have the resources, finances, talent, and experience of Blizzard, the chance of success are incredibly low. Even if you tackle all the technical obstacles with some level of competence and create a shippable game.&#xD;&#xA;" />
  <row Id="11096" PostHistoryTypeId="5" PostId="5584" RevisionGUID="e438c799-836b-4b94-a314-b5143af37cce" CreationDate="2010-11-15T19:26:03.277" UserId="659" Comment="added 174 characters in body" Text="The first technology I'd use if I was anywhere near an MMO project would be the technology that went into the pair of trainers on my feet. As I'd be running away from it as fast as I could!&#xD;&#xA;&#xD;&#xA;Seriously, if you don't have the resources, finances, talent, and experience of Blizzard, the chance of success are incredibly low. Even if you tackle all the technical obstacles with some level of competence and create a shippable game.&#xD;&#xA;&#xD;&#xA;The fact that you're asking this question hints at another programmer thinking 'OK, I've made a Breakout clone, I've made a 2D platformer... now it's time to try an MMO'..." />
  <row Id="11097" PostHistoryTypeId="2" PostId="5585" RevisionGUID="0e4fffbd-2cd5-439f-8251-0e62dc32070e" CreationDate="2010-11-15T19:46:40.370" UserId="3304" Text="I'm doing line-triangle intersection. I have found the intersection point (vector) on the plane. All I need to do now is work out whether the point is _inside_ the triangle it collided with (not the plane the tri is on)&#xD;&#xA;&#xD;&#xA;The line is represented by two 3D vectors, the triangle 3 points and the collision point another vector. If it's any help, I've been reading through [this article][1]. I've actually managed to do most of it. I'm just stuck on the last bit which is working out whether the point is inside the triangle.&#xD;&#xA;&#xD;&#xA;I've read stuff about summing the angles of 3 internal triangles, but that's extraordinarily slow - can someone help me out?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;James&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lighthouse3d.com/opengl/maths/index.php?raytriint" />
  <row Id="11098" PostHistoryTypeId="1" PostId="5585" RevisionGUID="0e4fffbd-2cd5-439f-8251-0e62dc32070e" CreationDate="2010-11-15T19:46:40.370" UserId="3304" Text="Line triangle intersection - last bits" />
  <row Id="11099" PostHistoryTypeId="3" PostId="5585" RevisionGUID="0e4fffbd-2cd5-439f-8251-0e62dc32070e" CreationDate="2010-11-15T19:46:40.370" UserId="3304" Text="&lt;vector&gt;&lt;linear-algebra&gt;" />
  <row Id="11100" PostHistoryTypeId="2" PostId="5586" RevisionGUID="fb671bff-8109-4e0d-b18c-255016158777" CreationDate="2010-11-15T19:48:56.140" UserId="3354" Text="I was wondering what do you need to know in C++ before starting to program with DirectX?&#xD;&#xA;&#xD;&#xA;I have only been programming in C++ (more for 2D games using SDL and learning the basics) for just over a year, I was wondering what kind of concepts and methods should someone be knowledgeable with or at least have seen before, before attempting to learn how to use Direct X?" />
  <row Id="11101" PostHistoryTypeId="1" PostId="5586" RevisionGUID="fb671bff-8109-4e0d-b18c-255016158777" CreationDate="2010-11-15T19:48:56.140" UserId="3354" Text="What do you need to know in C++ before starting to program with DirectX" />
  <row Id="11102" PostHistoryTypeId="3" PostId="5586" RevisionGUID="fb671bff-8109-4e0d-b18c-255016158777" CreationDate="2010-11-15T19:48:56.140" UserId="3354" Text="&lt;c++&gt;&lt;3d&gt;&lt;directx&gt;&lt;graphics-programming&gt;" />
  <row Id="11103" PostHistoryTypeId="2" PostId="5587" RevisionGUID="29172286-5eaf-40e0-93ad-6665b2cbde22" CreationDate="2010-11-15T19:52:58.523" UserId="51" Text="http://msdn.microsoft.com/en-us/library/ee416804(v=VS.85).aspx&#xD;&#xA;&#xD;&#xA;I'm assuming if you can follow the tutorials then you know enough.&#xD;&#xA;&#xD;&#xA;Link blatantly stolen from an answer in this question: http://gamedev.stackexchange.com/questions/5490/what-are-the-current-books-for-directx-w-focus-on-3d" />
  <row Id="11104" PostHistoryTypeId="2" PostId="5588" RevisionGUID="227fb8e7-a528-4a41-a232-20b3ae816fe3" CreationDate="2010-11-15T19:55:39.800" UserId="51" Text="You can probably use the same method as the generic point/shape interior algorithm I talk a little bit about here: http://gamedev.stackexchange.com/questions/244/cocos2d-collision-detection-against-a-random-shape/260#260" />
  <row Id="11105" PostHistoryTypeId="2" PostId="5589" RevisionGUID="fb10abd5-703d-4576-8a7a-443a7a6162ac" CreationDate="2010-11-15T20:05:22.350" UserId="2316" Text="You might be able to use this:&#xD;&#xA;`P1, P2, P3` are points on the plane.  `R1 and R2` represent a near and far point on the ray.  `Vector3f` is a fancy vector that I've got from [vmml][1] from [equalizer][2].  I use this when I use [gluUnproject()][3].&#xD;&#xA;&#xD;&#xA;    /*! @param PIP Point-in-Plane */&#xD;&#xA;	bool Channel::testRayThruTriangle( Vector3f P1, Vector3f P2, Vector3f P3, Vector3f R1, Vector3f R2, Vector3f&amp; PIP)&#xD;&#xA;	{  &#xD;&#xA;		Vector3f Normal, IntersectPos;&#xD;&#xA;		&#xD;&#xA;		// Find Triangle Normal&#xD;&#xA;		Normal.cross( P2 - P1, P3 - P1 );&#xD;&#xA;		Normal.normalize(); // not really needed?  Vector3f does this with cross.&#xD;&#xA;		&#xD;&#xA;		// Find distance from LP1 and LP2 to the plane defined by the triangle&#xD;&#xA;		float Dist1 = (R1-P1).dot( Normal );&#xD;&#xA;		float Dist2 = (R2-P1).dot( Normal );&#xD;&#xA;		&#xD;&#xA;		if ( (Dist1 * Dist2) &gt;= 0.0f) { &#xD;&#xA;			//SFLog(@&quot;no cross&quot;); &#xD;&#xA;			return false; &#xD;&#xA;		} // line doesn't cross the triangle.&#xD;&#xA;		&#xD;&#xA;		if ( Dist1 == Dist2) { &#xD;&#xA;			//SFLog(@&quot;parallel&quot;); &#xD;&#xA;			return false; &#xD;&#xA;		} // line and plane are parallel&#xD;&#xA;		&#xD;&#xA;		// Find point on the line that intersects with the plane&#xD;&#xA;		IntersectPos = R1 + (R2-R1) * ( -Dist1/(Dist2-Dist1) );&#xD;&#xA;		&#xD;&#xA;		// Find if the interesection point lies inside the triangle by testing it against all edges&#xD;&#xA;		Vector3f vTest;&#xD;&#xA;		&#xD;&#xA;		vTest = Normal.cross( P2-P1 );&#xD;&#xA;		if ( vTest.dot( IntersectPos-P1) &lt; 0.0f ) { &#xD;&#xA;			//SFLog(@&quot;no intersect P2-P1&quot;); &#xD;&#xA;			return false; &#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		vTest = Normal.cross( P3-P2 );&#xD;&#xA;		if ( vTest.dot( IntersectPos-P2) &lt; 0.0f ) { &#xD;&#xA;			//SFLog(@&quot;no intersect P3-P2&quot;); &#xD;&#xA;			return false; &#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		vTest = Normal.cross( P1-P3 );&#xD;&#xA;		if ( vTest.dot( IntersectPos-P1) &lt; 0.0f ) { &#xD;&#xA;			//SFLog(@&quot;no intersect P1-P3&quot;); &#xD;&#xA;			return false; &#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		NSLog(@&quot;Intersects at ( %f, %f )&quot;, IntersectPos.x(), IntersectPos.y());&#xD;&#xA;&#xD;&#xA;		PIP = IntersectPos;&#xD;&#xA;		&#xD;&#xA;		return true;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://vmml.ifi.uzh.ch/&#xD;&#xA;  [2]: http://www.equalizergraphics.com/&#xD;&#xA;  [3]: http://pyopengl.sourceforge.net/documentation/manual/gluUnProject.3G.html" />
  <row Id="11106" PostHistoryTypeId="2" PostId="5590" RevisionGUID="63b696da-76de-435a-9564-e4aad0994089" CreationDate="2010-11-15T20:07:43.070" UserId="3355" Text="Direct3D itself does not require you to know C++.&#xD;&#xA;You'll need to understand function pointers and structure layouts from C.&#xD;&#xA;&#xD;&#xA;However, to design a good architecture for even a simple game, you'll better be good in C++." />
  <row Id="11107" PostHistoryTypeId="2" PostId="5591" RevisionGUID="dd7e36b2-732a-4c06-b04e-74ecf44d238e" CreationDate="2010-11-15T20:23:52.630" UserId="2316" Text="Levels give players a sense of achievement that comes in a nicely wrapped box (as opposed to level-less game systems).  If you want to include levels in your game design, there are some considerations.&#xD;&#xA;&#xD;&#xA; 1. **Levels are an achievement**  &#xD;&#xA;You should get a fair amount at each level, and every few levels you should be able to unlock new abilities and powers.  [DnD 4E](http://yerth.weebly.com/character-advancement-table.html) (this isn't the real one, but I couldn't find the real one)&#xD;&#xA; 2. **Levels offer a quick gauge of power and difficulty**  &#xD;&#xA;A player with a level 3 character knows he's not going to take down a level 20 monster.  This also helps group quest difficulty and tailor suitable equipment for the character.&#xD;&#xA;&#xD;&#xA;That being said, a guide to making your own table should consider how long a character should take at a given level to progress, and set the XP values of monsters at that level.  Again, [DnD 4e](http://www.wizards.com/dnd/DnD_DMG_XPFinal.asp) has a pretty good example.&#xD;&#xA;&#xD;&#xA;The tables themselves often feel a bit arbitrary once you write them down.  The important thing is that you tailor the appropriate monsters for the character at that level.&#xD;&#xA;" />
  <row Id="11108" PostHistoryTypeId="2" PostId="5592" RevisionGUID="6ba0ea4f-2897-4ea0-b9f9-5af1196f9a5f" CreationDate="2010-11-15T20:31:39.067" UserId="2316" Text="Usually you want a bit of both.   [Dwarf Fortress](http://www.bay12games.com/dwarves/) and [minecraft](http://www.minecraft.net/) are popular for their [emergent gameplay.](http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=emergent+gameplay)  however, [World of Warcraft](http://us.battle.net/en/int?r=wow) is almost 100% explicit drag-you-around-by-the-nose goals.  &#xD;&#xA;&#xD;&#xA;Both are quite popular.&#xD;&#xA;&#xD;&#xA;Explicit Goals can be extremely boring if they're not tied to purpose, or good rewards.&#xD;&#xA;&#xD;&#xA;Emergent Goals can be frustrating if the user isn't given enough tools or background information to formulate their own.&#xD;&#xA;&#xD;&#xA;Games like [Fallout 3][1] and [Mass Effect][2] offer a bit of both.  They give you a completely immersive world, with explicit goals that feel like they are self-set.  The illusion of player control and suspension of disbelief are key to any game that wants to retain players.&#xD;&#xA;&#xD;&#xA;I don't know of a lot of research, [but I did find this.][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fallout.bethsoft.com/&#xD;&#xA;  [2]: http://masseffect.bioware.com/&#xD;&#xA;  [3]: http://www.emergenceingames.com/index.php?p=1_2_Research" />
  <row Id="11109" PostHistoryTypeId="2" PostId="5593" RevisionGUID="166a1deb-c7cc-42b6-8bac-e350e3acc4d1" CreationDate="2010-11-15T20:51:13.797" UserId="2992" Text="Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff.&#xD;&#xA;&#xD;&#xA;Cooldown time: the amount of time (t) it takes before being able to cast that spell again. A spell goes on &quot;cooldown&quot; the moment it begins casting.&#xD;&#xA;&#xD;&#xA;Cast time: the amount of time (t) it takes to use a spell. While the wizard is casting something another spell cannot be cast and it cannot be canceled.&#xD;&#xA;&#xD;&#xA;The question is: **How would you maximize damage given different sets of spells?**&#xD;&#xA;&#xD;&#xA;It is easy to calculate the highest damage per cast time. But what about in situations where it is better to wait then to get &quot;stuck&quot; casting a low damage spell when a much higher one is available? &#xD;&#xA;&#xD;&#xA;For example,&#xD;&#xA;&#xD;&#xA; 1. 100 damage, 3 second cast time, 8 second cool down.&#xD;&#xA;&#xD;&#xA; 2. 30 damage, 3 second cast time, 6 second cool down.&#xD;&#xA;&#xD;&#xA; 3. 20 damage, 4 second cast time, 4 second cool down.&#xD;&#xA;&#xD;&#xA;So, in this case you would cast #1, #3, wait, cast #1" />
  <row Id="11110" PostHistoryTypeId="1" PostId="5593" RevisionGUID="166a1deb-c7cc-42b6-8bac-e350e3acc4d1" CreationDate="2010-11-15T20:51:13.797" UserId="2992" Text="Spell casting - How to optimize damage per second" />
  <row Id="11111" PostHistoryTypeId="3" PostId="5593" RevisionGUID="166a1deb-c7cc-42b6-8bac-e350e3acc4d1" CreationDate="2010-11-15T20:51:13.797" UserId="2992" Text="&lt;algorithm&gt;&lt;optimization&gt;" />
  <row Id="11112" PostHistoryTypeId="5" PostId="5592" RevisionGUID="6d798110-d2c7-4dc4-8f5b-91512a67f0b3" CreationDate="2010-11-15T20:53:10.377" UserId="2316" Comment="added 62 characters in body" Text="Usually you want a bit of both.   [Dwarf Fortress](http://www.bay12games.com/dwarves/) and [minecraft](http://www.minecraft.net/) are popular for their [emergent gameplay.](http://www.google.com/search?sourceid=chrome&amp;ie=UTF-8&amp;q=emergent+gameplay)  however, [World of Warcraft](http://us.battle.net/en/int?r=wow) is almost 100% explicit [drag-you-around-by-the-nose][1] goals.  &#xD;&#xA;&#xD;&#xA;Both are quite popular.&#xD;&#xA;&#xD;&#xA;Explicit Goals can be extremely boring if they're not tied to purpose, or good rewards.&#xD;&#xA;&#xD;&#xA;Emergent Goals can be frustrating if the user isn't given enough tools or background information to formulate their own.&#xD;&#xA;&#xD;&#xA;Games like [Fallout 3][2] and [Mass Effect][3] offer a bit of both.  They give you a completely immersive world, with explicit goals that feel like they are self-set.  The illusion of player control and suspension of disbelief are key to any game that wants to retain players.&#xD;&#xA;&#xD;&#xA;I don't know of a lot of research, [but I did find this.][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hubpages.com/hub/WoW-Newbie-Zone---Quests&#xD;&#xA;  [2]: http://fallout.bethsoft.com/&#xD;&#xA;  [3]: http://masseffect.bioware.com/&#xD;&#xA;  [4]: http://www.emergenceingames.com/index.php?p=1_2_Research" />
  <row Id="11113" PostHistoryTypeId="2" PostId="5594" RevisionGUID="9db5455c-c850-4e88-aaa0-d1a4c0642755" CreationDate="2010-11-15T20:53:15.463" UserId="2287" Text="I will assume you are manipulating the camera, but the explanation applies to objects as well. &#xD;&#xA;&#xD;&#xA;The reason it is not rotating on the sphere properly is because you are not assuming that there is a `fixed yaw axis` (which is usually Y). So what ends up happening that with each frame the new yaw axis skews the next frame's calculation a little bit. Over a few frames the camera goes through an unintended motion, which I believe is what is happening in your case. &#xD;&#xA;&#xD;&#xA;For proper/predictable arcball rotation, such as the one seen in _Autodesk Maya/Max_, you will have to assume that your `up vector` is fixed for the calculation of the `direction` and `right vectors` (in a 3x3 rotation matrix each column represents the 3 `orthonormal vectors`, and is entirely dependant on how you have setup your co-ordinate system. Usually in OpenGL it is Right, Up, Direction) and then calculate a new `up vector` for the camera to work properly. Every frame, you assume your up vector is unchanging and stays fixed at (for example) **[0,1,0]**.&#xD;&#xA;&#xD;&#xA;The above poses a problem when looking straight down or straight up, in which case your assumed Up is now parallel with your Director and will make it impossible for you to calculate the orthonormal vectors properly. That is a special case and you will have to get around it. You can restrict the rotation of the camera beyond that point, or you can skip that particular rotation." />
  <row Id="11114" PostHistoryTypeId="2" PostId="5595" RevisionGUID="945b3e0b-013d-4692-af06-b3b8cb0b7bb3" CreationDate="2010-11-15T20:58:12.413" UserId="2535" Text="You don't need any C++ for DirectX programming, so just use however much or little C++ you're comfortable with." />
  <row Id="11115" PostHistoryTypeId="2" PostId="5596" RevisionGUID="d7627376-393c-4a3b-aa3e-8df497038c64" CreationDate="2010-11-15T21:05:42.307" UserId="3355" Text="3 triangle points: P1, P2, P3.&#xD;&#xA;2 line points L1, L2.&#xD;&#xA;&#xD;&#xA;The intersection points T.&#xD;&#xA;T lies on the line, so there's a real value c so that &#xD;&#xA;T = L1  + c * (L2 - L1)&#xD;&#xA;&#xD;&#xA;Also, T lies on the plane, so there're 2 real values a and b so that&#xD;&#xA;&#xD;&#xA;T = P1 + a * ( P2 - P1 ) + b * ( P3 - P2 )&#xD;&#xA;&#xD;&#xA;Now you've got the system of 3 linear equations with 3 variables:&#xD;&#xA;&#xD;&#xA;L1.x  + c * (L2.x - L1.x) = P1.x + a * ( P2.x - P1.x ) + b * ( P3.x - P2.x )&#xD;&#xA;&#xD;&#xA;L1.y  + c * (L2.y - L1.y) = P1.y + a * ( P2.y - P1.y ) + b * ( P3.y - P2.y )&#xD;&#xA;&#xD;&#xA;L1.z  + c * (L2.z - L1.z) = P1.z + a * ( P2.z - P1.z ) + b * ( P3.z - P2.z )&#xD;&#xA;&#xD;&#xA;You solve the system (e.g. read wikipedia for &quot;Inversion of 3×3 matrices&quot;, if the matrix can't be inverted, the plane and line doesn't intersect, or the line belongs to the plane, or the triangle is 0-area, or L1=L2 ).&#xD;&#xA;&#xD;&#xA;If it has the only solution, you find it, and here's your final check that point is inside the triangle:&#xD;&#xA;bool isInTriangle = a &gt;= 0 &amp;&amp; b &gt;= 0 &amp;&amp; (a+b)&lt;=1;" />
  <row Id="11116" PostHistoryTypeId="2" PostId="5597" RevisionGUID="38ea7d4c-f7f8-4a6b-a5af-f198a34166e1" CreationDate="2010-11-15T21:14:45.050" UserId="2819" Text="You could do a simple &quot;security level&quot; style switch case.&#xD;&#xA;&#xD;&#xA;This is just off the top of my head so beware logic errors beyond my tired state's level of thought, but I hope this can get you started.&#xD;&#xA;&#xD;&#xA;Assuming your time is done in block integers -&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    // after casting spell&#xD;&#xA;    int remainingTime = (coolDown - castTime);&#xD;&#xA;    switch(spellJustCast)&#xD;&#xA;    {&#xD;&#xA;      // assuming the cast method will have some input validation for whether the spell&#xD;&#xA;      // is off cooldown or not, pass the time as a parameter&#xD;&#xA;      case 3 : castSpell1(remainingTime);&#xD;&#xA;               castSpell2(remainingTime);&#xD;&#xA;               break;&#xD;&#xA;      case 1 : castSpell2(remainingTime);&#xD;&#xA;               castSpell3(remainingTime);&#xD;&#xA;               break;&#xD;&#xA;      case 2 : castSpell1(remainingTime);&#xD;&#xA;               castSpell3(remainingTime);&#xD;&#xA;               break;&#xD;&#xA;      default: System.out.println(&quot;Debug!&quot;);&#xD;&#xA;               break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Some of the method calls are unnecessary due to your spell times, but there's always room for updates this way." />
  <row Id="11117" PostHistoryTypeId="2" PostId="5598" RevisionGUID="003e0aa6-32eb-48f0-ab61-5448c5d21a48" CreationDate="2010-11-15T21:14:48.430" UserId="2287" Text="Are you using Havok Content Tools to import your meshes as well or are you importing obj counterparts? How are you connecting them together in your engine? What engine are you using? &#xD;&#xA;&#xD;&#xA;In complex scenes, you will find that many objects in the scene are repeating. If you export through `fbx` for example, it converts all instances into objects. And AFAIK the content tools ignore instances when exporting. If your engine supports mesh instancing (which it should) then this is a big performance loss as now you will be creating several objects (for example a bunch of crates) in your engine as separate mesh objects instead of taking advantage of mesh instancing. This applies to movable and fixed objects.&#xD;&#xA;&#xD;&#xA;One approach is to model all the objects separately, which will be your meshes and create the physics hulls for them. Although the Havok Content Tools does a decent job of creating that hull for you, you are better of making your own as this will give you more control (this is assuming your object is complex and not a simple shape such as a box or a sphere). Now you have a relatively higher poly graphics mesh, with a lower poly convex hull (both are meshes at this point). The hull is the one that is made into a rigid body while the mesh is not (inside Maya/Max). In your engine, you simply attach the two using a wrapper so that the hkpRigidBody now moves the graphical counterpart. &#xD;&#xA;&#xD;&#xA;I am using the Ogre3D graphics engine for example. I use the same technique as above. I can have several instances of the same mesh and it results in a performance boost.&#xD;&#xA;&#xD;&#xA;To visualize the placement of the objects in the scene, I place the actual objects (which are in a separate layer) with dummy locators.The locators are then used to grab the transformations that are applied to the object when I import the object separately and place it in the scene within the engine (the objects on the separate layer are ignored when exporting). &#xD;&#xA;&#xD;&#xA;There are of course several way to go about it, this is only one of them." />
  <row Id="11118" PostHistoryTypeId="5" PostId="5597" RevisionGUID="7ab5dd6f-7183-4eb3-a5c6-9c286db9cbc6" CreationDate="2010-11-15T21:20:10.147" UserId="2819" Comment="added update" Text="You could do a simple &quot;security level&quot; style switch case.&#xD;&#xA;&#xD;&#xA;This is just off the top of my head so beware logic errors beyond my tired state's level of thought, but I hope this can get you started.&#xD;&#xA;&#xD;&#xA;Assuming your time is done in block integers -&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    // after casting spell&#xD;&#xA;    int remainingTime = (coolDown - castTime);&#xD;&#xA;    switch(spellJustCast)&#xD;&#xA;    {&#xD;&#xA;      // assuming the cast method will have some input validation for whether the spell&#xD;&#xA;      // is off cooldown or not, pass the time as a parameter&#xD;&#xA;      case 3 : castSpell1(remainingTime);&#xD;&#xA;               castSpell2(remainingTime);&#xD;&#xA;               break;&#xD;&#xA;      case 1 : castSpell2(remainingTime);&#xD;&#xA;               castSpell3(remainingTime);&#xD;&#xA;               break;&#xD;&#xA;      case 2 : castSpell1(remainingTime);&#xD;&#xA;               castSpell3(remainingTime);&#xD;&#xA;               break;&#xD;&#xA;      default: System.out.println(&quot;Debug!&quot;);&#xD;&#xA;               break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Some of the method calls are unnecessary due to your spell times, but there's always room for updates this way.&#xD;&#xA;&#xD;&#xA;Edit: I just realised, you would need to reset the remaining time after the new spell was cast, probably best to make it a class attribute/field and set it from a call within the castSpell methods." />
  <row Id="11119" PostHistoryTypeId="5" PostId="5593" RevisionGUID="36b3f4a4-2fd6-4b6c-a628-d0c1ad259986" CreationDate="2010-11-15T21:25:17.370" UserId="2992" Comment="simplified example case" Text="Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff.&#xD;&#xA;&#xD;&#xA;Cooldown time: the amount of time (t) it takes before being able to cast that spell again. A spell goes on &quot;cooldown&quot; the moment it begins casting.&#xD;&#xA;&#xD;&#xA;Cast time: the amount of time (t) it takes to use a spell. While the wizard is casting something another spell cannot be cast and it cannot be canceled.&#xD;&#xA;&#xD;&#xA;The question is: **How would you maximize damage given different sets of spells?**&#xD;&#xA;&#xD;&#xA;It is easy to calculate the highest damage per cast time. But what about in situations where it is better to wait then to get &quot;stuck&quot; casting a low damage spell when a much higher one is available? &#xD;&#xA;&#xD;&#xA;For example,&#xD;&#xA;&#xD;&#xA; 1. 100 damage, 3 second cast time, 8 second cool down.&#xD;&#xA;&#xD;&#xA; 2. 20 damage, 4 second cast time, 4 second cool down.&#xD;&#xA;&#xD;&#xA;So, in this case you would cast #1, #2, wait, cast #1, repeat instead of a greedy solution #1, #2, #2, #1. If the health of the target is unknown." />
  <row Id="11120" PostHistoryTypeId="2" PostId="5599" RevisionGUID="0ba30a6e-cd9e-4547-84d2-965f2461615b" CreationDate="2010-11-15T21:26:35.090" UserId="619" Text="http://www.cs.virginia.edu/~gfx/Courses/2003/ImageSynthesis/papers/Acceleration/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf&#xD;&#xA;&#xD;&#xA;This paper provides (apparently) the most computationally efficient means of calculating ray-triangle intersection. Not sure if it directly addresses the question but thought it may be useful here." />
  <row Id="11121" PostHistoryTypeId="2" PostId="5600" RevisionGUID="ba3af5c5-3c24-4822-b733-696bcc356be6" CreationDate="2010-11-15T21:32:40.780" UserId="2819" Text="Comment out any test console output you have. This can drastically reduce framerate, especially if you are outputting between rotation and scaling, as Cody said above." />
  <row Id="11122" PostHistoryTypeId="2" PostId="5601" RevisionGUID="7573985c-191a-44c2-ae25-fed4bb5b9a6a" CreationDate="2010-11-15T21:40:10.247" UserId="2819" Text="A physical property of characters that can identify what type of personality and interaction they have is their head:body ratio. Typically heroes are 9-10 heads tall, regular folk are 7-8 heads tall and childish, cartoony characters are 2-3 heads tall. This is a valuable property to include when designing your characters and may help with figuring out their personal characteristics." />
  <row Id="11123" PostHistoryTypeId="2" PostId="5602" RevisionGUID="618f369a-9163-467e-a8f6-62f89e6cddea" CreationDate="2010-11-15T21:42:21.777" UserId="3355" Text="Is this for level designer, or for the engine?&#xD;&#xA;&#xD;&#xA;For the level designer - you'll need that code to e.g. combine static objects. Research vector graphic APIs for the solution, the task sounds pretty common for SVG, PostScript, WMF, etc.. First try using CombineRgn Win32 API :-)&#xD;&#xA;&#xD;&#xA;For the game engine - I'd suggest you don't do what you want..&#xD;&#xA;You'll spend enormous amount of CPU combining your objects together. You'll spend enormous count of branch mispredictions checking the border conditions, testing whether 2 segments intersect or not, etc.. And, this process must be repeated every frame for the visible portion of your map.&#xD;&#xA;&#xD;&#xA;Just do bounding box checks, then collide individual objects. If your object shapes are too complex - simplify them while exporting data into the engine, and use different shapes for collision and drawing." />
  <row Id="11124" PostHistoryTypeId="2" PostId="5603" RevisionGUID="306570a7-2a47-48ff-89ee-0ac0aa6d8237" CreationDate="2010-11-15T22:05:28.850" UserId="659" Text="You need to think in terms of 'damage per unit of casting time' (DPCT) - for example, a fireball with a 3 second cast and doing 3000 damage would do 1000 DPCT.&#xD;&#xA;&#xD;&#xA;If you had to wait 3 seconds for the cooldown before casting it, that would reduce it to 500 DPCT (3000 damage, divided by 6 seconds total, including the waiting)&#xD;&#xA;&#xD;&#xA;So you just need to determine the damage-per-cast-time of each spell, including any remaining wait for the cooldown. Pick the one with the highest DPCT, Wait if necessary, then cast it. Repeat until the boss is dead :)" />
  <row Id="11125" PostHistoryTypeId="2" PostId="5604" RevisionGUID="e505afdb-1404-4aac-a4f6-afa4e914b572" CreationDate="2010-11-15T22:12:04.520" UserId="659" Text="This is a trivial problem if you are able/willing to link strips with degenerate triangles - as most stripping algorithms do anyway.&#xD;&#xA;&#xD;&#xA;Each Nx1 row of squares is a very simple triangle strip. For each row, you want to start a new strip.&#xD;&#xA;&#xD;&#xA;Simply duplicate the last vertex of strip 1 and the first vertex of strip 2, and that will create a degenerate polygon linking the two strips&#xD;&#xA;&#xD;&#xA;(However, if as your question indicates, the vertices are not shared between the squares - different colours/UVs etc, then you don't want to use strips)" />
  <row Id="11126" PostHistoryTypeId="2" PostId="5605" RevisionGUID="4dd3db8e-1e9f-4187-a5df-faed05c7f9f5" CreationDate="2010-11-15T22:18:26.017" UserId="2819" Text="I did a lot of research into educational games during my first year of university.&#xD;&#xA;&#xD;&#xA;The important qualities:&#xD;&#xA;&#xD;&#xA; - Engage the senses well (especially colour and sound)&#xD;&#xA; - A lot of breaks (a child's attention span is lower than an adult's)&#xD;&#xA; - Characters they can relate to (perhaps including a permanent &quot;guide&quot; on the screen)&#xD;&#xA; - Game world immersion (and control over too much immersion - keep the education on track)&#xD;&#xA;&#xD;&#xA;I was asked to design an RPG that aided children of age 5-6 in their reading exercises. There may be some starting material in it to help you. [&quot;Learn to Read with Tremendous Speed!&quot;][1]&#xD;&#xA;&#xD;&#xA;Remember to keep the &quot;image&quot; of the game as fun as possible in terms of appearance and direction, as this may become lost in the serious business of marketing of the game itself.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nightmarepixel.com/gamesDesign.html" />
  <row Id="11127" PostHistoryTypeId="2" PostId="5606" RevisionGUID="8a9cfb36-55e3-47dc-9a83-7c3a1b15977d" CreationDate="2010-11-15T22:34:05.180" UserId="3357" Text="Using your example, you'd probably want the two spells to be closer in effectiveness, but possibly give you a different advantage. Having a short casting time (or no casting time for that matter) would be very useful, so then it may be worth using even if it does less damage and takes longer to use again.&#xD;&#xA;&#xD;&#xA;You could always impose another element into the equation. Mana/Magic Points can serve this purpose, by allowing the player to determine whether the use of those points is worth the benefit.&#xD;&#xA;&#xD;&#xA;Overall though, as bluescrn said, the DPCT (or DPS as its called in many games that are highly tuned and discussed by players seeking the best mix) is really the main element you will want to have balanced, especially if you have any sort of tech/skill trees that allow different players to progress with different skills, yet with the ability to do similar amounts of damage at their given position in the game." />
  <row Id="11128" PostHistoryTypeId="2" PostId="5607" RevisionGUID="ccc39ed1-2d12-418f-b665-55649d0e1dce" CreationDate="2010-11-15T22:42:42.143" UserId="101" Text="The other answer doesn't give you the whole story, even with the addition of Tetrad's comment. It's of vital importance to take into account the non-linear distribution of the values stored in the Z-buffer. zNear has a much greater impact on artifacts such as Z-fighting than zFar does.&#xD;&#xA;&#xD;&#xA;For a better explanation of why, see this article: http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html" />
  <row Id="11129" PostHistoryTypeId="5" PostId="5523" RevisionGUID="2bddcd4a-3f6b-4ad5-9bc0-02d6d38ba0bf" CreationDate="2010-11-15T23:05:46.390" UserId="721" Comment="added 17 characters in body; added 33 characters in body" Text="There is no open source game engine available on Android equal to commercial Unreal Engine or Unity. But you can use different Open Source Projects for little games or applications. &#xD;&#xA;&#xD;&#xA;Java 2d Game Engine (as cocos 2d on iphone):&#xD;&#xA;&#xD;&#xA; - [Rokon][1] (Drop Block, Flying Aces ...)&#xD;&#xA; - [AndEgine][2]&#xD;&#xA;&#xD;&#xA;C++ 3D engine available on Android:&#xD;&#xA;&#xD;&#xA; - [Ogre3D][3]&#xD;&#xA; - [Irrlicht][4] (Moblox, Air Hockey EM...)&#xD;&#xA;&#xD;&#xA;Ogre3D and Irrlicht aren't well packaged but you can develop games for iPhone and Android devices. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/rokon/&#xD;&#xA;  [2]: http://www.andengine.org/&#xD;&#xA;  [3]: http://www.ogre3d.org&#xD;&#xA;  [4]: http://irrlicht.sourceforge.net/" />
  <row Id="11130" PostHistoryTypeId="5" PostId="5593" RevisionGUID="aa107796-90e1-41a6-8ab8-8854a67710aa" CreationDate="2010-11-15T23:11:27.817" UserId="2992" Comment="expanded on the example, added picture" Text="Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff.&#xD;&#xA;&#xD;&#xA;Cooldown time: the amount of time (t) it takes before being able to cast that spell again. A spell goes on &quot;cooldown&quot; the moment it begins casting.&#xD;&#xA;&#xD;&#xA;Cast time: the amount of time (t) it takes to use a spell. While the wizard is casting something another spell cannot be cast and it cannot be canceled.&#xD;&#xA;&#xD;&#xA;The question is: **How would you maximize damage given different sets of spells?**&#xD;&#xA;&#xD;&#xA;It is easy to calculate the highest damage per cast time. But what about in situations where it is better to wait then to get &quot;stuck&quot; casting a low damage spell when a much higher one is available? &#xD;&#xA;&#xD;&#xA;For example,&#xD;&#xA;&#xD;&#xA; 1. Fireball: 3000 damage, 3 second cast time, 6 second cool down.&#xD;&#xA;&#xD;&#xA; 2. Frostbolt: 20 damage, 4 second cast time, 4 second cool down.&#xD;&#xA;&#xD;&#xA; 3. Fireblast: 3 damage, 3 second cast time, 3 second cool down.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this case your damage per second is higher if you chose to go for the lower DPCT spell (fireblast) instead of the frostbolt. So we must consider consequences of choosing a spell.&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zqBAp.jpg" />
  <row Id="11131" PostHistoryTypeId="2" PostId="5608" RevisionGUID="e9d29264-0652-4496-a182-4a5ddbb5aa22" CreationDate="2010-11-15T23:16:31.743" UserId="395" Text="Well Warhammer Online was made by somewhere between 300 and 400 people depending on who you ask and it is slowly tanking. Kingdom of Loathing has a dev team of about 4 or 5 and is awesome. Are either of those numbers useful? Not in the slightest." />
  <row Id="11132" PostHistoryTypeId="2" PostId="5609" RevisionGUID="901fcb82-2780-4184-a422-0242d597917a" CreationDate="2010-11-15T23:21:31.497" UserId="370" Text="&gt; All AI is search!&#xD;&#xA;&#xD;&#xA;When you get into the guts of AI it's amazing how much of it is really [search][1].&#xD;&#xA;&#xD;&#xA; * **state**: the cooldownedness of all available spells.&#xD;&#xA; * **fitness**: total damage done&#xD;&#xA; * **cost**: total time taken&#xD;&#xA; * **branches**: any known spell.  If spell is still in cooldown just add that value to its cast time.&#xD;&#xA; * **goal**: total health of target.  The goal has to be a finite amount of damage, so in the case of an unknown target, pick the largest possible health.  &#xD;&#xA;Alternatively, the goal could be spend less than 50 seconds and the search would find the maximal damage that could be done in 50 seconds.&#xD;&#xA;&#xD;&#xA;Plug these parameters into a [Uniform Cost Search][2] (UCS) and presto, guaranteed optimal battle plan.  Even better if you can come up with a heuristic Run thing thing in [A*][3], or IDA* and you'll get the same answer much faster.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tree_traversal&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Uniform-cost_search&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/A*_search_algorithm" />
  <row Id="11133" PostHistoryTypeId="6" PostId="5593" RevisionGUID="605f40e0-3681-468f-b73d-0ed5015b5114" CreationDate="2010-11-15T23:25:53.333" UserId="370" Comment="edited tags" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;optimization&gt;" />
  <row Id="11134" PostHistoryTypeId="5" PostId="5593" RevisionGUID="61aaa4d5-84d4-4dec-b4d0-8f5498c05f9e" CreationDate="2010-11-15T23:38:33.357" UserId="2992" Comment="added new image" Text="Imagine we have a wizard that knows a few spells. Each spell has 3 attributes: Damage, cool down time, and a cast time. Pretty standard RPG stuff.&#xD;&#xA;&#xD;&#xA;Cooldown time: the amount of time (t) it takes before being able to cast that spell again. A spell goes on &quot;cooldown&quot; the moment it begins casting.&#xD;&#xA;&#xD;&#xA;Cast time: the amount of time (t) it takes to use a spell. While the wizard is casting something another spell cannot be cast and it cannot be canceled.&#xD;&#xA;&#xD;&#xA;The question is: **How would you maximize damage given different sets of spells?**&#xD;&#xA;&#xD;&#xA;It is easy to calculate the highest damage per cast time. But what about in situations where it is better to wait then to get &quot;stuck&quot; casting a low damage spell when a much higher one is available? &#xD;&#xA;&#xD;&#xA;For example,&#xD;&#xA;&#xD;&#xA; 1. Fireball: 3000 damage, 3 second cast time, 6 second cool down.&#xD;&#xA;&#xD;&#xA; 2. Frostbolt: 20 damage, 4 second cast time, 4 second cool down.&#xD;&#xA;&#xD;&#xA; 3. Fireblast: 3 damage, 3 second cast time, 3 second cool down.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this case your damage per second is higher if you chose to go for the lower DPCT spell (fireblast) instead of the frostbolt. So we must consider consequences of choosing a spell.&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;In the following example are cases of &quot;over casting&quot; and &quot;waiting&quot;.&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zqBAp.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/nLQtw.jpg" />
  <row Id="11135" PostHistoryTypeId="2" PostId="5610" RevisionGUID="acfe8662-ffcc-4f2a-a047-8d42f521db1e" CreationDate="2010-11-16T00:06:43.600" UserId="2100" Text="Are there any free XNA 4.0 post-processing libraries that are easy to hook into projects? I am looking specifically for a glow effect, and I should also mention that I'm using the Reach profile." />
  <row Id="11136" PostHistoryTypeId="1" PostId="5610" RevisionGUID="acfe8662-ffcc-4f2a-a047-8d42f521db1e" CreationDate="2010-11-16T00:06:43.600" UserId="2100" Text="XNA 4.0 Post-Processing Libraries?" />
  <row Id="11137" PostHistoryTypeId="3" PostId="5610" RevisionGUID="acfe8662-ffcc-4f2a-a047-8d42f521db1e" CreationDate="2010-11-16T00:06:43.600" UserId="2100" Text="&lt;open-source&gt;&lt;libraries&gt;&lt;xna-4.0&gt;&lt;graphic-effects&gt;&lt;post-processing&gt;" />
  <row Id="11138" PostHistoryTypeId="5" PostId="5610" RevisionGUID="41f74637-4cce-41c4-899e-6205c9e4f28c" CreationDate="2010-11-16T00:13:07.490" UserId="2100" Comment="clarified requirements" Text="Are there any free XNA 4.0 post-processing libraries that are easy to hook into projects? I am looking specifically for a glow effect (although anything is great), and I should also mention that I'm using the Reach profile." />
  <row Id="11139" PostHistoryTypeId="2" PostId="5611" RevisionGUID="4ba14a63-d899-40f7-8470-e4686bcea55e" CreationDate="2010-11-16T00:13:36.913" UserId="1573" Text="I think it depends on the scale of your MMORPG, and the level of graphical and control fidelity you expect. The smallest &quot;AAA&quot; MMO team I can remember was at EA and about 80 people, but it flopped. On the other hand, Puzzle Pirates succeeded (in its modest way) with about a dozen developers." />
  <row Id="11140" PostHistoryTypeId="5" PostId="5611" RevisionGUID="35a79a28-f221-4531-93e9-dfc5b3433ce4" CreationDate="2010-11-16T00:20:18.360" UserId="1573" Comment="added 122 characters in body" Text="I think it depends on the scale of your MMORPG, and the level of graphical and control fidelity you expect. The smallest &quot;AAA&quot; MMO team I can remember was at EA and about 80 people, but it flopped. On the other hand, Puzzle Pirates succeeded (in its modest way) with about a dozen developers.&#xD;&#xA;&#xD;&#xA;In general I suspect the number of backend engineers you need grows logarithmically with the number of expected users." />
  <row Id="11141" PostHistoryTypeId="2" PostId="5612" RevisionGUID="25bec897-6fc1-4b0e-918b-712be069e073" CreationDate="2010-11-16T00:24:47.853" UserId="3361" Text="Say I have an octree and at a certain level I store VBOs in that octree. I know the dimensions of of the nodes that own the vbo so I can do basic frustum culling.  That works nicely because everything outside of the screen is never rendered.&#xD;&#xA;&#xD;&#xA;However my world is quite big and I currently also draw things behind already drawn octrees.  What would I use to not draw nodes that are occluded by other nodes and how would I go about that?&#xD;&#xA;&#xD;&#xA;I saw some mentions of occlusion culling in the OpenGL superbible but I fail to see how I can utilize that when I don't have a clear distinction between occluders and occludees." />
  <row Id="11142" PostHistoryTypeId="1" PostId="5612" RevisionGUID="25bec897-6fc1-4b0e-918b-712be069e073" CreationDate="2010-11-16T00:24:47.853" UserId="3361" Text="Optimizing Octree Rendering" />
  <row Id="11143" PostHistoryTypeId="3" PostId="5612" RevisionGUID="25bec897-6fc1-4b0e-918b-712be069e073" CreationDate="2010-11-16T00:24:47.853" UserId="3361" Text="&lt;3d&gt;&lt;opengl&gt;&lt;octree&gt;" />
  <row Id="11144" PostHistoryTypeId="2" PostId="5613" RevisionGUID="f12be156-b173-4651-aa40-46f41efb10e0" CreationDate="2010-11-16T02:14:56.327" UserId="458" Text="A lot depends on your career goals. If all you want is &quot;a job making games&quot; before doing the requisite 5.5 years and burning out and leaving, then I guess you just look at entry-level job openings and look for what they want, learn it, and apply. Simple. (But then, if your question really comes down to &quot;what's the minimum effort I need to put in to get a job?&quot; then the answer is &quot;if you put in the minimum effort, you're going to get the minimum job!&quot;)&#xD;&#xA;&#xD;&#xA;But long term, I don't think it's so much about knowing some number of languages, or learning a specific one. The languages change -- ten years ago no one was using Objective-C or XNA or C# or AS3, and ten years from now rest assured that any language you learn today will be obsolete by then anyway.&#xD;&#xA;&#xD;&#xA;So one thing to future-proof yourself is to not just &quot;learn a language&quot; but to learn HOW to learn new languages. Once you've become proficient in 3 languages or so, you'll find that picking up a new one is not so bad. Most of the core components are the same, anyway -- every language has variables, arrays, loops, conditionals, and so on, so it's just about learning the syntax.&#xD;&#xA;&#xD;&#xA;The other half of this is to understand the core concepts of programming and computer science. Understand memory management, pointers, recursion, and so on. If you understand the concepts, you can apply them in pretty much any language.&#xD;&#xA;&#xD;&#xA;If you want to make yourself more marketable, then learn a programming specialty relevant to games, whatever interests you... AI, databases, networking, tools, whatever." />
  <row Id="11145" PostHistoryTypeId="2" PostId="5614" RevisionGUID="a1090015-4c05-4e6a-9cd0-503365c6cb62" CreationDate="2010-11-16T02:21:42.703" UserId="458" Text="I think I can rephrase the question to something answerable: &quot;My specialty is gameplay programming, i.e. implementing the actual game mechanics. But I haven't learned any of the other parts. How can I finish a game project?&quot;&#xD;&#xA;&#xD;&#xA;My answer: it depends, but the good news is there are a LOT of options.&#xD;&#xA;&#xD;&#xA;You can team up with another programmer who knows how to do that stuff.&#xD;&#xA;&#xD;&#xA;You can teach it to yourself, perhaps finding some open-source projects and looking through their code, or just finding some good game programming books, or just experimenting with small systems on your own until you get the hang of it.&#xD;&#xA;&#xD;&#xA;You can download one of the many cheap or free game engines / libraries / frameworks / authoring tools that handles all that stuff for you. If all the back-end stuff is taken care of, then you're free to concentrate on the gameplay programming that you obviously prefer.&#xD;&#xA;&#xD;&#xA;You can design games that don't require a lot of infrastructure. Don't know how to save or load games? Then design a game that doesn't need save/load functionality, such as a retro-style arcade game. Don't know how to do graphics? Challenge yourself to see what you can do with text only. Don't know computer networking? Then I guess you'd better make your game single-player (or multi-player hotseat). For every limitation, there's a design workaround, if you fancy yourself a stronger designer than programmer." />
  <row Id="11146" PostHistoryTypeId="2" PostId="5615" RevisionGUID="b533bbe8-6c2c-4286-9955-a364df58e60a" CreationDate="2010-11-16T02:53:39.023" UserId="849" Text="The ContentManager in XNA 4.0 only has one Unload() method that Unloads all Assets.&#xD;&#xA;&#xD;&#xA;I want to have some &quot;global&quot; Assets that are always loaded, but then I want per-Level Assets which should be Unloaded when the level is changed.&#xD;&#xA;&#xD;&#xA;Should I create a second Instance of the ContentManager as part of the Level.cs Class? Or should I use Game.Content and then call .Dispose on the Assets I load? Or should I create my own ContentManager on top of the ReadAsset function as [outlined here][1]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2007/03/09/contentmanager-readasset.aspx" />
  <row Id="11147" PostHistoryTypeId="1" PostId="5615" RevisionGUID="b533bbe8-6c2c-4286-9955-a364df58e60a" CreationDate="2010-11-16T02:53:39.023" UserId="849" Text="Disposing only certain resources in XNA?" />
  <row Id="11148" PostHistoryTypeId="3" PostId="5615" RevisionGUID="b533bbe8-6c2c-4286-9955-a364df58e60a" CreationDate="2010-11-16T02:53:39.023" UserId="849" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="11149" PostHistoryTypeId="2" PostId="5616" RevisionGUID="4bb66e45-20e8-4408-be56-615c42a5010b" CreationDate="2010-11-16T03:37:14.800" UserId="2287" Text="OpenGL natively does not support occlusion queries but you can use extensions such as [ARB_occlusion_query][1]. The link has a project and a nice `PDF` that explains how to use it. Be careful though, sometimes the occlusion queries end up to be more costly than simply drawing the geometry. This is especially true if you geometry is not very complex. &#xD;&#xA;&#xD;&#xA;If you provide more information regarding your scene (screenshot), a better solution could be provided.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codesampler.com/oglsrc/oglsrc_7.htm" />
  <row Id="11150" PostHistoryTypeId="2" PostId="5617" RevisionGUID="77720fb8-6cb8-4c71-95f3-1a6733a873f8" CreationDate="2010-11-16T04:32:25.110" UserId="3358" Text="Many of the MUDs I've worked on or played have had a basic aggressive/not-aggressive system.  Adding faction-based aggression might add an interesting dimension (i.e. maybe Orcs are indifferent to you unless you've killed &gt;100 of them, making you a famous villain to them).&#xD;&#xA;&#xD;&#xA;Allowing characters to build castles or strongholds and defend them, or to take/defend in-game strongholds or resources could be interesting if done right.  Dark Age of Camelot had an interesting system in that your &quot;side&quot; could get bonuses if they controlled more strongholds than others.&#xD;&#xA;&#xD;&#xA;Automappers are often appreciated by players.  Advanced MUD clients like ZMUD already have them but they don't always work well.  If you have one built into your game engine you could be creative with it.&#xD;&#xA;&#xD;&#xA;A scarcity system could also be interesting -- have prices drop on items that are commonly farmed, while the value of items that are not commonly sought out by players goes up.  This will encourage players not to always camp the same items.&#xD;&#xA;&#xD;&#xA;It's not a new idea, but a &quot;trophy&quot; system where a player gets less experience when they repeatedly kill the same type of creature could encourage people to explore more areas.  Most of the MUDs and RPGs I've worked on have had players settle into a comfortable safe area and not bother exploring if they can level easily in one place.&#xD;&#xA;&#xD;&#xA;Get rid of Midgard but build a good tutorial zone.  Most stock MUD codebases use some version of the &quot;Midgard&quot; zone for players to start in.  Having that zone gives veteran MUD players a sense that you're just &quot;another stock MUD&quot;, but it's also daunting for people to learn a new game, so give players the option of starting in a &quot;newbie&quot; zone full of tutorial info when they create a character.&#xD;&#xA;&#xD;&#xA;If you're doing PvP, it would be nice to have a bounty system:  If players annoy one another, let them put a price on each other's head and the other players can take them out for a reward.&#xD;&#xA;&#xD;&#xA;Keep score of lots of things and rank them.  Every player wants to be the best at something.  Maybe Ralik has killed the most Trolls in the game while Elgarin has cast more fireball spells than anyone else.  Many of the people who play MUDs are drawn to statistics, so being able to present things that they have done in the game in interesting ways will keep them interested.  This has manifested itself in &quot;achievements&quot; in the various online game scoring/tracking systems.&#xD;&#xA;&#xD;&#xA;In the vein of the paragraph above, keep track of the quests, zones, or mobs that a player has finished and let them know how much progress they have made toward conquering the game." />
  <row Id="11151" PostHistoryTypeId="2" PostId="5618" RevisionGUID="5c0c7e88-4cbb-4971-86e0-6c8df8f9424b" CreationDate="2010-11-16T04:50:05.697" UserId="3358" Text="I've experimented a bit with the Ogre (http://www.ogre3d.org) and Irrlicht (http://irrlicht.sourceforget.net) engines, both of which are open source and are trying to fill similar niches.  From what I've seen so far they're both well-written and easy to use.&#xD;&#xA;&#xD;&#xA;I could use an informed compare-and-contrast of the strong and weak points of those two game engines and the engine-specific challenges related to going from start to released product.  I'm interested in anything from asset management to configuration tools to audio/network/videoplayback framework integration to rendering/polygon constraints." />
  <row Id="11152" PostHistoryTypeId="1" PostId="5618" RevisionGUID="5c0c7e88-4cbb-4971-86e0-6c8df8f9424b" CreationDate="2010-11-16T04:50:05.697" UserId="3358" Text="Ogre vs. Irrlicht" />
  <row Id="11153" PostHistoryTypeId="3" PostId="5618" RevisionGUID="5c0c7e88-4cbb-4971-86e0-6c8df8f9424b" CreationDate="2010-11-16T04:50:05.697" UserId="3358" Text="&lt;engine&gt;&lt;ogre&gt;" />
  <row Id="11154" PostHistoryTypeId="5" PostId="5618" RevisionGUID="6eab1d69-e533-459d-b7af-df013b4d9fbf" CreationDate="2010-11-16T04:51:45.883" UserId="51" Comment="deleted 1 characters in body; edited tags" Text="I've experimented a bit with the Ogre (http://www.ogre3d.org) and Irrlicht (http://irrlicht.sourceforge.net) engines, both of which are open source and are trying to fill similar niches.  From what I've seen so far they're both well-written and easy to use.&#xD;&#xA;&#xD;&#xA;I could use an informed compare-and-contrast of the strong and weak points of those two game engines and the engine-specific challenges related to going from start to released product.  I'm interested in anything from asset management to configuration tools to audio/network/videoplayback framework integration to rendering/polygon constraints." />
  <row Id="11155" PostHistoryTypeId="6" PostId="5618" RevisionGUID="6eab1d69-e533-459d-b7af-df013b4d9fbf" CreationDate="2010-11-16T04:51:45.883" UserId="51" Comment="deleted 1 characters in body; edited tags" Text="&lt;engine&gt;&lt;ogre&gt;&lt;irrlicht&gt;" />
  <row Id="11156" PostHistoryTypeId="2" PostId="5619" RevisionGUID="8572bc80-534a-44dc-b2f9-c0b0597f3995" CreationDate="2010-11-16T05:38:32.313" UserId="3358" Text="I've been working with XAudio2. After looking at the samples, example code, and sparse documentation available from Microsoft and the MSDN, I've found that there aren't any easy-to-find resources on creating and using XAPO effects, nor any XAPO effects produced by third parties that I can download and/or buy.&#xD;&#xA;&#xD;&#xA;What it looks like is that if I create an app that uses XAPO effects, I'll have to create them all myself because there's no community of existing applications like there is with technologies like Apple's AU or Steinberg's VST. Is this true, or are there others using XAudio2 and XAPO and I just haven't found them?&#xD;&#xA;&#xD;&#xA;Is there a place to ask programmer-support-related questions about XAudio2 and related technologies (or is this the best destination)? The best I've found so far are the XNA forums, which are game-specific and sparsely populated in the audio area." />
  <row Id="11157" PostHistoryTypeId="1" PostId="5619" RevisionGUID="8572bc80-534a-44dc-b2f9-c0b0597f3995" CreationDate="2010-11-16T05:38:32.313" UserId="3358" Text="Xaudio2 XAPO Effects" />
  <row Id="11158" PostHistoryTypeId="3" PostId="5619" RevisionGUID="8572bc80-534a-44dc-b2f9-c0b0597f3995" CreationDate="2010-11-16T05:38:32.313" UserId="3358" Text="&lt;xna&gt;&lt;audio&gt;" />
  <row Id="11159" PostHistoryTypeId="2" PostId="5620" RevisionGUID="1e77f2d1-61e5-49fb-b323-9b75f887afba" CreationDate="2010-11-16T05:45:27.280" UserId="2781" Text="This is a specialized combinatorial optimization problem. As the number of spells increases, the difficulty in finding the optimal combination/pattern of spells increases significantly. Heuristics similar to those used for the [knapsack problem][1] would be valuable in solving this problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Knapsack_problem" />
  <row Id="11160" PostHistoryTypeId="2" PostId="5621" RevisionGUID="32d8dc83-a0e2-4eed-8791-bc945a4ef463" CreationDate="2010-11-16T05:48:25.217" UserId="288" Text="**Create a second instance of `ContentManager`.**&#xD;&#xA;&#xD;&#xA;You should basically never `Dispose()` of things you load from a ContentManager (using the default implementation), as these instances are shared and reused.&#xD;&#xA;&#xD;&#xA;Creating your own version of ContentManager is kind of orthogonal. Either way you'll be creating a second instance of ContentManager (or a class derived from it). So if the existing implementation suits your purposes - then use it, otherwise override what you want to change.&#xD;&#xA;&#xD;&#xA;Of course, if your game is relatively small - then it won't really matter if you just use the one ContentManager and not bother unloading content between levels." />
  <row Id="11161" PostHistoryTypeId="2" PostId="5622" RevisionGUID="48f86f7d-eecd-4500-a61c-e2fbac1027ea" CreationDate="2010-11-16T06:06:24.867" UserId="2287" Text="Ogre3D and Irrlicht are both rendering engines. As such they will not help you with audio, networking etc. There are other engines for sound and networking such as OpenAL, FMOD, Irrklang, RakNet that you will have to integrate (or use a framework that is already wraps up the engines). &#xD;&#xA;&#xD;&#xA;As for the compare-contrast, this has been asked many many times and instead of repeating them I will refer you to the following links&#xD;&#xA;&#xD;&#xA; 1. http://www.devmaster.net/forums/showthread.php?t=9561#10&#xD;&#xA; 2. http://www.nuclex.org/blog/2-gamedev/24-seven-engines-you-should-know&#xD;&#xA; 3. http://www.blitzbasic.co.nz/Community/posts.php?topic=73978&#xD;&#xA; 4. http://www.ogre3d.org/forums/viewtopic.php?t=33791&#xD;&#xA;&#xD;&#xA;When I started I wasted quite a bit of time asking the same question and reached no conclusion. If engine A has a weak point discussed in one thread, in another, Engine B will have the same weak point. It is all based on opinion.&#xD;&#xA;&#xD;&#xA;However, there are *some* differences that are repeated, such as Irrlicht running faster on older hardware as it does not utilize modern techniques whereas Ogre3D is optimized for the latest hardware. &#xD;&#xA;&#xD;&#xA;I personally chose Ogre3D after spending a few days trying both engines through their shipped examples and trying out various tutorials of both the engines. I chose Ogre3D based on my constraints and personal preference, I highly suggest you do the same instead of relying on conclusions based on other people's opinion." />
  <row Id="11162" PostHistoryTypeId="2" PostId="5623" RevisionGUID="c9eba244-1c12-4917-9534-5be5f534d8df" CreationDate="2010-11-16T06:59:37.487" UserId="20" Text="Both engines are going to provide you with some challenges. Mainly, because learning/using a new engine *is* a challenge.&#xD;&#xA;&#xD;&#xA;I have only used Ogre so far, so I might be biased. Since Ogre is purely a rendering engine, you'll have to look for third party libs to cover audio, video and networking. You won't have problems integrating these things though, since lots of other people have done so also.&#xD;&#xA;&#xD;&#xA;When comparing similar engines like this, I'd pay attention to the following:&#xD;&#xA;&#xD;&#xA; - How good is the documentation?&#xD;&#xA; - Is there an active community where I can ask specific questions?&#xD;&#xA; - Does the coding-style and the philosophy of the engine match my preferences?&#xD;&#xA; - Is the engine open-source or at least easily extendable? If its a commercial product, can I get custom extensions for it (if yes, what are they going to cost?)&#xD;&#xA; - Has the engine/lib been used in commercial products or mature open source projects?&#xD;&#xA; - What's the update interval of the software? How many developers are actively involved in the project?&#xD;&#xA;&#xD;&#xA;You might also consider comparing the metrics on a site like ohloh.net, eg. [Irrlicht on ohloh][1] and [Ogre on ohloh][2]&#xD;&#xA;&#xD;&#xA;Some of the above points might be less or more relevant to the decision you have to make. Then stick to the engine that matches your needs as closely as possible. If both engines are a viable option, throw a coin :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ohloh.net/p/IrrlichtEngine&#xD;&#xA;  [2]: http://www.ohloh.net/p/ogre/" />
  <row Id="11163" PostHistoryTypeId="2" PostId="5624" RevisionGUID="d251d8d6-9117-4194-9e35-afbd60e039fe" CreationDate="2010-11-16T08:00:42.060" UserId="1738" Text="One of the features of the octree is that it allows you to render your octree nodes in front to back order.  Just doing this will help performance a lot since it allows the graphics hardware's EarlyZ implementation to be more effective (you run fewer shaders, do less raster work, etc.)&#xD;&#xA;&#xD;&#xA;The benefit of using occlusion queries to query the visibility of octree nodes is that it can save you from rendering occluded highly complex geometrical objects.  The (opaque) objects in your scene are your occluders, and your octree nodes (and by implication, their contents) are occludees.  As Samaursa said, it is really hard to get this right, so please check out [this paper][1] before trying it (stalls will kill performance if not treated carefully).  Also, make sure that geometric complexity is actually your performance limiter otherwise you will likely be wasting your time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cgg.cvut.cz/members/bittner/publications/isvc2007.pdf" />
  <row Id="11164" PostHistoryTypeId="5" PostId="5609" RevisionGUID="19dadca8-0480-437f-8888-84eaef40feca" CreationDate="2010-11-16T08:11:47.350" UserId="370" Comment="improved grammar" Text="&gt; All AI is search!&#xD;&#xA;&#xD;&#xA;When you get into the guts of AI it's amazing how much of it is really [search][1].&#xD;&#xA;&#xD;&#xA; * **state**: the remaining cooldown of all available spells.&#xD;&#xA; * **fitness**: total damage done&#xD;&#xA; * **cost**: total time taken&#xD;&#xA; * **branches**: any known spell.  If spell is still in cooldown just add that value to its cast time.&#xD;&#xA; * **goal**: total health of target.  The goal has to be a finite amount of damage, so in the case of an unknown target, pick the largest possible health.  &#xD;&#xA;Alternatively, the goal could be spend less than 50 seconds and the search would find the maximal damage that could be done in 50 seconds.&#xD;&#xA;&#xD;&#xA;Plug these parameters into a [Uniform Cost Search][2] (UCS) and presto, guaranteed optimal battle plan.  Even better if you can come up with a heuristic, search with [A*][3], or IDA* and you'll get the same answer much faster.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tree_traversal&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Uniform-cost_search&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/A*_search_algorithm" />
  <row Id="11165" PostHistoryTypeId="2" PostId="5625" RevisionGUID="02ae08fd-e2c8-474b-947b-4f28a42b079c" CreationDate="2010-11-16T09:20:10.930" UserId="2798" Text="If you are using the Reach profile then you can't add custom shaders to your game; you have to rely on BasicEffect, DualTextureEffect, EnvironmentMapEffect and SkinnedEffect.&#xD;&#xA;&#xD;&#xA;To achieve a glow effect, you have to use old fixed pipeline tricks, like drawing the scene in multiple passes with variable blending settings. Read the reply of hippocoder in [this link][1] for an approximation on what you need to do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forum.unity3d.com/threads/65739-Glow-effect" />
  <row Id="11166" PostHistoryTypeId="2" PostId="5626" RevisionGUID="3cb8aa3b-ca4d-4736-9b50-976d6b359572" CreationDate="2010-11-16T10:44:57.060" UserId="2954" Text="I am in the planning phase of a small RGP style game. &#xD;&#xA;&#xD;&#xA;The character will have have a set of attributes, like Strength, agility, .. etc which are represented as integers. The character also will have a set of attacks represented as an attack class.&#xD;&#xA;&#xD;&#xA;On each attack I want it to do damage based on the characters attributes, eg: the attack &quot;sword slash&quot; will do 10 dmg + the value of the characters strength. &#xD;&#xA;&#xD;&#xA;The way I was thinking to do this is to have an abstract attack class, which have an abstract Attack method, and for each attack I create one class and implements the Attack method.&#xD;&#xA;&#xD;&#xA;    public class SwordSlash:Attack&#xD;&#xA;    {&#xD;&#xA;        public void Attack(Character attacker, Character defender)&#xD;&#xA;        {&#xD;&#xA;            defender.DoDamage(10 + attacker.Strength);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I see that this will make it a nightmare to maintain. &#xD;&#xA;&#xD;&#xA;Does anyone have an idea of how I can accomplish this in a nicer way?&#xD;&#xA;&#xD;&#xA;What I think is the main problem, is how to input the correct attribute, based on the attack.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11167" PostHistoryTypeId="1" PostId="5626" RevisionGUID="3cb8aa3b-ca4d-4736-9b50-976d6b359572" CreationDate="2010-11-16T10:44:57.060" UserId="2954" Text="How to design the attack class in an RPG game?" />
  <row Id="11168" PostHistoryTypeId="3" PostId="5626" RevisionGUID="3cb8aa3b-ca4d-4736-9b50-976d6b359572" CreationDate="2010-11-16T10:44:57.060" UserId="2954" Text="&lt;game-design&gt;" />
  <row Id="11169" PostHistoryTypeId="2" PostId="5627" RevisionGUID="782b5456-766a-4a7e-91e1-a8d758111e4d" CreationDate="2010-11-16T10:51:56.770" UserId="2865" Text="We've made our MMORPG game in team of few friends, less than 10 people ( http://www.margonem.pl ): only 2 programmers, few artist and some content creators. &#xD;&#xA;But you need to consider 2 main things: time and cost. With good team, lot of money and time you can beat 10 times bigger teams with no funds. Smaller teams are also easier to maintain." />
  <row Id="11170" PostHistoryTypeId="2" PostId="5628" RevisionGUID="e610922a-55ed-4071-baed-5458d506f3eb" CreationDate="2010-11-16T11:17:20.517" UserId="3318" Text="You should probably go for a data-driven design here.&#xD;&#xA;&#xD;&#xA;Make a generic Attack class which contains the parameters you want to work with - base damage, which stats affects the damage, a set of potential status effects... stuff like that:&#xD;&#xA;&#xD;&#xA;    public enum AttackStat&#xD;&#xA;    {&#xD;&#xA;      Strength,&#xD;&#xA;      Agility,&#xD;&#xA;      Intellect&#xD;&#xA;      // etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public class Attack&#xD;&#xA;    {    &#xD;&#xA;      private int baseDamage;&#xD;&#xA;      private AttackStat stat;&#xD;&#xA;      private double damageMultiplier;&#xD;&#xA;      // ...and so on&#xD;&#xA;    &#xD;&#xA;      public void Attack(Character attacker, Character defender)&#xD;&#xA;      {&#xD;&#xA;        defender.DoDamage(baseDamage + attacker.GetStatValue(stat) * damageMultiplier);&#xD;&#xA;      }    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Put a method on Character to fetch the appropriate value given an AttackStat:&#xD;&#xA;    public int GetStatValue(AttackStat s)&#xD;&#xA;    {&#xD;&#xA;      switch(s)&#xD;&#xA;      {&#xD;&#xA;        case AttackStat.Strength:&#xD;&#xA;          return strength;&#xD;&#xA;        case AttackStat.Agility:&#xD;&#xA;          return agility;&#xD;&#xA;        // etc.&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then, place your attacks in a file, e.g. an XML file, and load the data from there:&#xD;&#xA;&#xD;&#xA;    &lt;Attacks&gt;&#xD;&#xA;      &lt;Attack name=&quot;Sword Slash&quot; damage=&quot;10&quot; stat=&quot;Strength&quot; multiplier=&quot;1&quot; /&gt;&#xD;&#xA;      &lt;!-- More attacks here --&gt;&#xD;&#xA;    &lt;/Attacks&gt;&#xD;&#xA;&#xD;&#xA;You could even extend this to draw values from multiple stats, say, a Fireball where the damage is calculated from both an Intellect and a Fire stat:&#xD;&#xA;&#xD;&#xA;    &lt;Attack name=&quot;Fireball&quot; damage=&quot;20&quot;&gt;&#xD;&#xA;      &lt;StatModifier stat=&quot;Intellect&quot; multiplier=&quot;0.4&quot; /&gt;&#xD;&#xA;      &lt;StatModifier stat=&quot;Fire&quot; multiplier=&quot;0.8&quot; /&gt;&#xD;&#xA;    &lt;/Attack&gt;&#xD;&#xA;&#xD;&#xA;If you don't want to use the same basic damage formula for everything (e.g. calculate magic damage differently from physical damage), create subclasses of Attack for each formula you need and override Attack, and specify which type you want in your XML file.&#xD;&#xA;" />
  <row Id="11171" PostHistoryTypeId="2" PostId="5629" RevisionGUID="e5d9cd0e-05bb-4f86-91a3-5446d0528474" CreationDate="2010-11-16T11:27:20.737" UserId="119" Text="I think Jason D is absolutely right - this is how I would handle it: &#xD;&#xA;&#xD;&#xA;Game has an instance of AssetManager, an object from which you can get any asset by name.  &#xD;&#xA;&#xD;&#xA;In Game:&#xD;&#xA;&#xD;&#xA;    assetManager = new AssetManager();&#xD;&#xA;    screenManager = new ScreenManager();&#xD;&#xA;    screenManager.assetManager = assetManager;&#xD;&#xA;&#xD;&#xA;In ScreenManager:&#xD;&#xA;&#xD;&#xA;    screen = new Screen();&#xD;&#xA;    screen.assetManager = assetManager;&#xD;&#xA;&#xD;&#xA;In Screen:&#xD;&#xA;&#xD;&#xA;    myAsset = assetManager.getBitmp(&quot;lava.png&quot;);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now all screens have access to any assets they need. This is not any more complex or crazy than using globals or Singletons, and you have an option of having 2 instances of Game running in the same application without clashes. I once had to make a game that was made up of 8 mini-games, all sharing the same base classes / framework. I had to refactor all my globals/singletons to use this reference passing style, and I've never looked back. The only things that should be globals are things that can only physically exist once, such as audio, networking, i/o etc." />
  <row Id="11172" PostHistoryTypeId="2" PostId="5630" RevisionGUID="5199e083-8f75-4f15-a6dd-219aea38362f" CreationDate="2010-11-16T12:15:39.940" UserId="189" Text="[RuneScape Classic][1]: two brothers (Paul and Andrew Gower) and a couple years. Very inspiring, if nothing else; of course, nowadays the current RuneScape game is managed by a large staff of which I could not find a number.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://runescape.wikia.com/wiki/RuneScape_Classic" />
  <row Id="11173" PostHistoryTypeId="2" PostId="5631" RevisionGUID="4bcd4ed7-1484-48ca-82ce-e070e3ef4857" CreationDate="2010-11-16T12:26:53.757" UserId="119" Text="I would have a weapon class that has an attack method which you override with the behaviour you want. You can then also handle how the weapon looks in game, in inventory, how much it sells for etc in the same class." />
  <row Id="11174" PostHistoryTypeId="2" PostId="5632" RevisionGUID="3eaf8cad-c7a3-4b07-8422-100e18ec276f" CreationDate="2010-11-16T13:04:33.500" UserId="3212" Text="If i have to create a Battle System for a game which is like Final Fantasy 10 Turn Based battle system or Shadow Hearts Ring Based Battle System and likewise.  &#xD;&#xA;&#xD;&#xA;How should i start with scripting a particular part of the game? Any reference,blogs,sources,code snippets will be helpful.  &#xD;&#xA;&#xD;&#xA;Any scripting language will do as i have to overlook some examples directly of different scripting languages.  &#xD;&#xA;&#xD;&#xA; " />
  <row Id="11175" PostHistoryTypeId="1" PostId="5632" RevisionGUID="3eaf8cad-c7a3-4b07-8422-100e18ec276f" CreationDate="2010-11-16T13:04:33.500" UserId="3212" Text="Game Scripting Example in any scripting language" />
  <row Id="11176" PostHistoryTypeId="3" PostId="5632" RevisionGUID="3eaf8cad-c7a3-4b07-8422-100e18ec276f" CreationDate="2010-11-16T13:04:33.500" UserId="3212" Text="&lt;scripting&gt;" />
  <row Id="11177" PostHistoryTypeId="2" PostId="5633" RevisionGUID="68fc0060-6ceb-4562-9894-c2fa8c540ede" CreationDate="2010-11-16T14:08:29.240" UserId="215" Text="I am working on an RPG type game in Java and I would like to know a few things relating to threading,&#xD;&#xA;&#xD;&#xA;1. Is having many threads at once(say 10) a bad practice?&#xD;&#xA;&#xD;&#xA;2. Is creating a lot of new threads that only exist for a short time bad practice?&#xD;&#xA;&#xD;&#xA;3. What is the best way to implement an action like waiting for a player to move to a location then do a command? Currently I am spawning new threads that repeat until an if is true, but that doesn't feel like the best solution.&#xD;&#xA;&#xD;&#xA;4. Currently I have 2 main threads, one for drawing and one for all other game updating, should I split these up more? If so, where?&#xD;&#xA;&#xD;&#xA;Any help is appreciated." />
  <row Id="11178" PostHistoryTypeId="1" PostId="5633" RevisionGUID="68fc0060-6ceb-4562-9894-c2fa8c540ede" CreationDate="2010-11-16T14:08:29.240" UserId="215" Text="How to properly multi thread an RPG" />
  <row Id="11179" PostHistoryTypeId="3" PostId="5633" RevisionGUID="68fc0060-6ceb-4562-9894-c2fa8c540ede" CreationDate="2010-11-16T14:08:29.240" UserId="215" Text="&lt;best-practices&gt;&lt;java&gt;&lt;multithreading&gt;" />
  <row Id="11180" PostHistoryTypeId="2" PostId="5634" RevisionGUID="2e297bd1-41dd-4c4e-8475-ccf23456f56d" CreationDate="2010-11-16T14:53:18.123" UserDisplayName="SyntaxC4" Text="If you're looking to do game development for the new **Windows Phone 7 Platform** there is a [Free E-book][1] it covers both Silverlight Development (for Applications [but could be used for games]) and the XNA Game Framework.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.microsoft.com/download/5/0/A/50A39509-D015-410F-A8F2-A5511E5A988D/Microsoft_Press_ebook_Programming_Windows_Phone_7_PDF.pdf" />
  <row Id="11181" PostHistoryTypeId="2" PostId="5635" RevisionGUID="d41551d2-fb1b-4de6-9e4b-0b87b17134f6" CreationDate="2010-11-16T14:56:13.490" UserId="3368" Text="I'm having trouble understanding how I would implement a moving platform in the actual map file.  Lets say its a file of character's and maybe the letter 'P' would stand for Platform.  Then, how would the game know which direction it moves, how far it's suppose to move before returning, what size it is, etc...  Am I even suppose to represent it in the map file?  &#xD;&#xA;&#xD;&#xA;I'm coming from the approach of making the game handle the maps as dynamically as possible, where you could basically make a new map file and play it in the game without having to hard code any special information for that map." />
  <row Id="11182" PostHistoryTypeId="1" PostId="5635" RevisionGUID="d41551d2-fb1b-4de6-9e4b-0b87b17134f6" CreationDate="2010-11-16T14:56:13.490" UserId="3368" Text="How is a moving object like a platform represented in a 2d Tilemap" />
  <row Id="11183" PostHistoryTypeId="3" PostId="5635" RevisionGUID="d41551d2-fb1b-4de6-9e4b-0b87b17134f6" CreationDate="2010-11-16T14:56:13.490" UserId="3368" Text="&lt;2d&gt;&lt;tiles&gt;&lt;moving-platforms&gt;" />
  <row Id="11184" PostHistoryTypeId="5" PostId="5633" RevisionGUID="18cae09b-66ae-4714-8fc2-ac10303ef4d8" CreationDate="2010-11-16T15:06:53.090" UserId="215" Comment="deleted 182 characters in body" Text="I am working on an RPG type game in Java and I would like to know a few things relating to threading,&#xD;&#xA;&#xD;&#xA;What is the best way to implement a &quot;wait for this then do this&quot; without hanging the whole thread? Like waiting for a player to move to a location then pick up an item? or to wait one second then attack?&#xD;&#xA;&#xD;&#xA;Currently I am spawning new threads every time I need to wait for something, but that doesn't feel like the best solution.&#xD;&#xA;&#xD;&#xA;Any help is appreciated." />
  <row Id="11185" PostHistoryTypeId="2" PostId="5636" RevisionGUID="95cae3e7-84ba-4f7f-9b84-6366885d60a3" CreationDate="2010-11-16T15:07:42.137" UserId="51" Text="Well obviously you need more than just a single character for your moving platform.  Try just putting a chunk at the end of the file for all your dynamic objects that need more data.  Maybe it's a block of XML or JSON for easy parsing.  Then you just need to say &quot;there's a moving platform at X,Y that looks like Z and moves to Z,W over Q seconds&quot; or whatever data you need." />
  <row Id="11186" PostHistoryTypeId="2" PostId="5637" RevisionGUID="dff1007d-4ffa-44af-8b64-3d6f3ca07c32" CreationDate="2010-11-16T15:14:20.947" UserId="51" Text="Sounds like what you need aren't multiple threads, but coroutines.  &#xD;&#xA;&#xD;&#xA;See this SO question for more information: http://stackoverflow.com/questions/1247894/coroutines-for-game-design" />
  <row Id="11187" PostHistoryTypeId="2" PostId="5638" RevisionGUID="dad86ec6-1432-4dc3-9456-2a66c7ddf91a" CreationDate="2010-11-16T15:23:07.463" UserId="1742" Text="At some point in the thread you've spawned you're checking for the player to &quot;be in a location&quot;. Normally, the check you're doing there isn't blocking in itself, so these conditions are checked by the main logic thread. Checked but not waited on. That's the key, every frame if you like, check for the condition being met, if it is, do the &quot;then&quot; case.&#xD;&#xA;&#xD;&#xA;How you implement the condition checking is up to you, but usually there's an array/list of things to check against (in code or data) and the resultant state change function or functor.&#xD;&#xA;&#xD;&#xA;It sounds like what you're doing is:&#xD;&#xA;&#xD;&#xA;    while( !condition );&#xD;&#xA;    doSomething();&#xD;&#xA;&#xD;&#xA;Whereas what you need to be doing is more like:&#xD;&#xA;&#xD;&#xA;    if( interestedInDoingSomething &amp;&amp; condition )&#xD;&#xA;      doSomething();&#xD;&#xA;&#xD;&#xA;very simple really.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11188" PostHistoryTypeId="2" PostId="5639" RevisionGUID="d89ec2f4-280f-4314-a128-9b388f253bf7" CreationDate="2010-11-16T15:42:52.720" UserDisplayName="capnramses" Text="I have made a wrapper that lets me swap between both.&#xD;&#xA;Ogre:&#xD;&#xA;* runs a bit faster with large numbers of draw calls so I usually use Ogre.&#xD;&#xA;Irrlicht is:&#xD;&#xA;* far, far more portable (less dependencies) so great for multi-platform&#xD;&#xA;* has better debugging tools (menus and things); Ogre basically has no graphical debugging." />
  <row Id="11190" PostHistoryTypeId="5" PostId="5633" RevisionGUID="62cfa4a9-79c1-4795-b7d0-2df33c058a5b" CreationDate="2010-11-16T15:57:35.417" UserId="215" Comment="added 602 characters in body" Text="I am working on an RPG type game in Java and I would like to know a few things relating to threading,&#xD;&#xA;&#xD;&#xA;What is the best way to implement a &quot;wait for this then do this&quot; without hanging the whole thread? Like waiting for a player to move to a location then pick up an item? or to wait one second then attack?&#xD;&#xA;&#xD;&#xA;Currently I am spawning new threads every time I need to wait for something, but that doesn't feel like the best solution.&#xD;&#xA;&#xD;&#xA;Any help is appreciated.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Clarification and an example of how I currently do things.&#xD;&#xA;&#xD;&#xA;User clicks on an item&#xD;&#xA;The function walkToAndPickUp(item) is called which is basically this:&#xD;&#xA;&#xD;&#xA;Make a new thread so we don't freeze the thread handling input while the player moves.  &#xD;&#xA;Tell player to move to the item  &#xD;&#xA;While the player is not at the item(The player moves through an update() function called in a different thread, I don't know how else to do it without freezing threads)  &#xD;&#xA;Repeat until the player is at the item  &#xD;&#xA;If the player is at the item then call delete item from map and add to inventory.&#xD;&#xA;    &#xD;&#xA;    " />
  <row Id="11191" PostHistoryTypeId="2" PostId="5640" RevisionGUID="bcaa250e-1d08-493b-92a7-bc1dc9e28dcb" CreationDate="2010-11-16T16:11:21.833" UserId="3214" Text="Preface: &#xD;&#xA;&#xD;&#xA;I purchased Programming an RTS in DirectX recently, and I know the code uses DirectX 9, but it has fantastic reviews and is apparently one of the best books you can get on beginning DirectX. &#xD;&#xA;&#xD;&#xA;Question:&#xD;&#xA;&#xD;&#xA;To my understanding, DirectX is just a means of displaying graphics to the scene. I will still have to code any games in C++ using game logic code, input, etc. Was I naive in thinking I could read the book with the MSDN tutorial site open for DirectX 10, and convert all of the samples to DirectX 10, or is that gonna be extremely difficult for me to do?&#xD;&#xA;Also, is DirectX 9 still relevant, or would it really behoove me to go about converting to DX 10?&#xD;&#xA;&#xD;&#xA;Thanks! " />
  <row Id="11192" PostHistoryTypeId="1" PostId="5640" RevisionGUID="bcaa250e-1d08-493b-92a7-bc1dc9e28dcb" CreationDate="2010-11-16T16:11:21.833" UserId="3214" Text="Converting DirectX 9 code to DirectX 10" />
  <row Id="11193" PostHistoryTypeId="3" PostId="5640" RevisionGUID="bcaa250e-1d08-493b-92a7-bc1dc9e28dcb" CreationDate="2010-11-16T16:11:21.833" UserId="3214" Text="&lt;programming&gt;&lt;directx10&gt;&lt;directx9&gt;" />
  <row Id="11194" PostHistoryTypeId="2" PostId="5641" RevisionGUID="b3fe6f7b-06f0-43ec-88cb-2acb6e3075e5" CreationDate="2010-11-16T16:17:45.777" UserId="1198" Text="It is important to note that the DirectX API is independent of the DirectX Hardware. That is to say that a DirectX 11 video card can still be accessed through the DirectX 9 API.&#xD;&#xA;&#xD;&#xA;Much legacy code still uses the DirectX 9 API, and as I recall, Direct X is a backwards compatible API, so your code targeting DirectX 9 should run on a machine with DirectX 11 installed.&#xD;&#xA;&#xD;&#xA;To asnwer your specific questions, DirectX is an API to facilitate running high performance graphics and sound on the computer. You will still write your game logic in C/C++, as I recall DirectX has some classes for dealing with user input as well. With respect to API changes between 9, 10, and 11 I do not really know, but I cannot imagine that a good programmer would have difficulty figuring it out, given a well written book and MSDN. I should also mention here, that I don't do much native DirectX programming, so take my words about API changes with a grain of salt." />
  <row Id="11195" PostHistoryTypeId="2" PostId="5642" RevisionGUID="1e8927bf-1f02-4ab9-9576-55b5f6e78849" CreationDate="2010-11-16T16:18:21.387" UserId="1091" Text="While I haven't read the book in question, you're absolutely right (IMHO) that one graphics API can be fairly easily substituted for another without seriously impacting all the other stuff you need to do.&#xD;&#xA;&#xD;&#xA;As to whether DX9 is relevant - there are a lot of XP users around still... really depends on your audience. If it's mostly just for personal consumption, I'd say go with DX10/11.&#xD;&#xA;" />
  <row Id="11196" PostHistoryTypeId="6" PostId="5626" RevisionGUID="a416baa9-89df-4338-a395-9d0926014c54" CreationDate="2010-11-16T16:40:03.507" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;rpg&gt;" />
  <row Id="11197" PostHistoryTypeId="6" PostId="5626" RevisionGUID="49582df3-a097-479c-b130-a813e3c89503" CreationDate="2010-11-16T16:41:54.503" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="11198" PostHistoryTypeId="5" PostId="5638" RevisionGUID="a48a6677-4172-402f-af8d-cc7e90115a72" CreationDate="2010-11-16T16:42:10.873" UserId="1742" Comment="modified to show how to add data driven conditionals" Text="At some point in the thread you've spawned you're checking for the player to &quot;be in a location&quot;. Normally, the check you're doing there isn't blocking in itself, so these conditions are checked by the main logic thread. Checked but not waited on. That's the key, every frame if you like, check for the condition being met, if it is, do the &quot;then&quot; case.&#xD;&#xA;&#xD;&#xA;How you implement the condition checking is up to you, but usually there's an array/list of things to check against (in code or data) and the resultant state change function or functor.&#xD;&#xA;&#xD;&#xA;It sounds like what you're doing is:&#xD;&#xA;&#xD;&#xA;    while( !condition );&#xD;&#xA;    doSomething();&#xD;&#xA;&#xD;&#xA;Whereas what you need to be doing is more like:&#xD;&#xA;&#xD;&#xA;    if( interestedInDoingSomething &amp;&amp; condition )&#xD;&#xA;      doSomething();&#xD;&#xA;&#xD;&#xA;&quot;User clicks on an item The function walkToAndPickUp(item)&quot;&#xD;&#xA;In this case you have a functor called WalkToAndPickup, that is created with the item as an argument, and it ticks until it returns that it's done. Instead of having thread for the fact that you are moving, the object's existence provides the information you need to determine where to walk to and what object to pick up once you get there.&#xD;&#xA;&#xD;&#xA;    functors.insert( new WalkToAndPickup( item ) );&#xD;&#xA;    ...&#xD;&#xA;    while( gameActive )&#xD;&#xA;    {&#xD;&#xA;      for functor in functors&#xD;&#xA;      {&#xD;&#xA;        functor.Update();&#xD;&#xA;        if( functor.Done() )&#xD;&#xA;        {&#xD;&#xA;          functors.remove( functor );&#xD;&#xA;          delete functor;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So what you have here is an impementation that inserts a new functor/task into a container of tasks that are always running. If a task (like walktoitem) finishes, then it gets deleted. What you do inside the functor update is up to you, and will mirror the contents of your threaded system, except you will probably want to either spawn a new functor for each stage of your tasks, or have another internal state for controlling what code to run at what point in the task's sequence of events.&#xD;&#xA;&#xD;&#xA;an example of what you might write in your functor's update:&#xD;&#xA;&#xD;&#xA;    update()&#xD;&#xA;    {&#xD;&#xA;      switch( state )&#xD;&#xA;      {&#xD;&#xA;        case 0: walkto( item ); if( atItem( item) ) state = 1; break;&#xD;&#xA;        case 1: takeitem( item ); if( gotItem( item) ) state = 2; break;&#xD;&#xA;        case 2: setAsFinished(); break;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;also, don't forget you can insert new functors in the functor list from inside an update. That's how you can chain your dependencies.&#xD;&#xA;" />
  <row Id="11199" PostHistoryTypeId="2" PostId="5643" RevisionGUID="5f85bff9-445a-4cc2-9338-8970824578f3" CreationDate="2010-11-16T16:42:14.753" UserId="1859" Text="I think a kind of robust solution would be to go the object oriented way.&#xD;&#xA;&#xD;&#xA;Depending on what kind of achievement you want to support, you need a way to query the current state of your game and/or the history of actions/events the game objects (like the player) have made.&#xD;&#xA;&#xD;&#xA;Let's say you have a base Achievement class such as:&#xD;&#xA;&#xD;&#xA;    class AbstractAchievement&#xD;&#xA;    {&#xD;&#xA;        GameState&amp; gameState;&#xD;&#xA;        virtual bool IsEarned() = 0;&#xD;&#xA;        virtual string GetName() = 0;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;`AbstractAchievement` holds a reference to the state of the game. It's used to query the things that are happening.&#xD;&#xA;&#xD;&#xA;Then you make concrete implementations. Let's use your examples:&#xD;&#xA;&#xD;&#xA;    class MasterSlicerAchievement : public AbstractAchievement&#xD;&#xA;    {&#xD;&#xA;        string GetName() { return &quot;Master Slicer&quot;; }&#xD;&#xA;        bool IsEarned()&#xD;&#xA;        {&#xD;&#xA;            Action lastAction = gameState.GetPlayerActionHistory().GetAction(0);&#xD;&#xA;            Action previousAction = gameState.GetPlayerActionHistory().GetAction(1);&#xD;&#xA;            if (lastAction.GetType() == ActionType::Slice &amp;&amp;&#xD;&#xA;                previousAction.GetType() == ActionType::Slice &amp;&amp;&#xD;&#xA;                lastAction.GetObjectType() == ObjectType::Watermelon &amp;&amp;&#xD;&#xA;                previousAction.GetObjectType() == ObjectType::Strawberry)&#xD;&#xA;                return true;&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    class InvinciblePipeRiderAchievement : public AbstractAchievement&#xD;&#xA;    {&#xD;&#xA;        string GetName() { return &quot;Invincible Pipe Rider&quot;; }&#xD;&#xA;        bool IsEarned()&#xD;&#xA;        {&#xD;&#xA;            if (gameState.GetLocationType(gameState.GetPlayerPosition()) == LocationType::OVER_PIPE &amp;&amp;&#xD;&#xA;                gameState.GetPlayerState() == EntityState::INVINCIBLE)&#xD;&#xA;                return true;&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Then it's up to you to decide when to check using the `IsEarned()` method. You could check at each game update.&#xD;&#xA;&#xD;&#xA;A more efficient way would be, for instance, to have some kind of event manager. And then register events (such as `PlayerHasSlicedSomethingEvent` or `PlayerGotInvicibleEvent` or simply `PlayerStateChanged`) to a method that would take the achievement in parameter. Example:&#xD;&#xA;&#xD;&#xA;    class Game&#xD;&#xA;    {&#xD;&#xA;        void Initialize()&#xD;&#xA;        {&#xD;&#xA;            eventManager.RegisterAchievementCheckByActionType(ActionType::Slice, masterSlicerAchievement);&#xD;&#xA;            // Each time an action of type Slice happens,&#xD;&#xA;            // the CheckAchievement() method is invoked with masterSlicerAchievement as parameter.&#xD;&#xA;            eventManager.RegisterAchievementCheckByPlayerState(EntityState::INVINCIBLE, invinciblePiperAchievement);&#xD;&#xA;            // Each time the player gets the INVINCIBLE state,&#xD;&#xA;            // the CheckAchievement() method is invoked with invinciblePipeRiderAchievement as parameter.&#xD;&#xA;        }&#xD;&#xA;        void CheckAchievement(const AbstractAchievement&amp; achievement)&#xD;&#xA;        {&#xD;&#xA;            if (!HasAchievement(player, achievement) &amp;&amp; achievement.IsEarned())&#xD;&#xA;            {&#xD;&#xA;                AddAchievement(player, achievement);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11200" PostHistoryTypeId="2" PostId="5644" RevisionGUID="a976243d-48cc-48ec-b4ae-b4f85b510728" CreationDate="2010-11-16T17:01:34.397" UserId="1562" Text="To the best of my knowledge, there is no fixed function pipeline in DirectX 10/11. That means the way you interact with the API has changed very dramatically on some levels. &#xD;&#xA;If your book delves into the the ins and outs of vertex and pixel shaders and programmable hardware, then it might not be that big a difference. But if your book is mainly based on utilization of that fixed function pipeline, you're in for a general shift of paradigms when/if you make a transition.&#xD;&#xA;&#xD;&#xA;If you really want to stick to this book, it won't do any harm to just pull all the stuff off using DX9 because learning is never a bad thing. But if you really want to make a transition towards DX10/11 further down the road, be ready to invest quite some time." />
  <row Id="11201" PostHistoryTypeId="2" PostId="5645" RevisionGUID="7d63e49c-c4ef-4edb-a97e-cd4f86ff693d" CreationDate="2010-11-16T17:31:18.707" UserId="2776" Text="World of Warcraft uses [Lua][1] for [scripting][2]. There are a lot of tutorials about Lua:&#xD;&#xA;&#xD;&#xA;http://csl.sublevel3.org/lua/&#xD;&#xA;&#xD;&#xA;http://lua-users.org/wiki/LearningLua&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org/about.html&#xD;&#xA;  [2]: http://www.wowwiki.com/Lua" />
  <row Id="11202" PostHistoryTypeId="2" PostId="5646" RevisionGUID="9a9e2b7c-1896-494b-aa2b-617872c30ac2" CreationDate="2010-11-16T17:38:30.930" UserId="3271" Text="I've been slowly working on a pygame alternative based on V8.&#xD;&#xA;&#xD;&#xA;Although the project is stalled at the moment, the code is still up on [Github][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/qard/jsgame&#xD;&#xA;&#xD;&#xA;Have a look at the bindings files and jsgame.cpp for some examples. Particularly, JSGame::initialize()." />
  <row Id="11203" PostHistoryTypeId="2" PostId="5647" RevisionGUID="8eca2f1a-fe36-4a82-b216-758507e7cad2" CreationDate="2010-11-16T17:45:24.683" UserId="3271" Text="Use [socket.io][1], it's a handy WebSockets abstraction library that provides fallbacks for browsers that don't support it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://socket.io&#xD;&#xA;&#xD;&#xA;Also, if you are going for an online model like that, I would recommend moving game processing to the server. That way you only need to communicate graphical changes and mouse/keyboard input. It also helps quite a bit to prevent cheating." />
  <row Id="11204" PostHistoryTypeId="2" PostId="5648" RevisionGUID="6eb1b2ab-9116-400c-9f2f-a295758d1d7b" CreationDate="2010-11-16T17:51:33.143" UserId="3334" Text="This is an extension of my [previous question][1].&#xD;&#xA;&#xD;&#xA;Recently I had an idea of making an, as I could describe it, agile open-source player-financial-profitable MMORPG, which has an interesting (from my POV) project and development model. &#xD;&#xA;&#xD;&#xA;Agile means that development should be iterative, with world extending every fixed period of time. And maybe even game universe\plot may be based on iterative development.  &#xD;&#xA;&#xD;&#xA;Open-source means that everybody can participate, but, obviously, I wish to establish some kind of core team. I estimate that about 0,01% of players will contribute. And this is where I want to make the number grow to about 0,1%. &#xD;&#xA;&#xD;&#xA;That's third part: player-financial-profitable means that every player that has outgrown some reputation ceiling (level or another kind) could contribute some kind of *thing to the game. I think about *things* as *special items* for now, but they could be transformed into anything on later architecture stage. *Special items* can be obtained without any financial donations, of course, but if one player wish to buy it from another, it should be sold for real money, presented as some special &quot;platinum coins&quot; in the game. Money should be parted between solder and creator of the item. &#xD;&#xA;&#xD;&#xA;But there is one rule — the item, that one creates, must be unique. Under unique I mean unique. It should have unique look, unique animation, and, most importantly, unique ability, that was not presented by any other item so far, not just exterminator sword with +10000 damage. And unique ability should be coded and designed uniquely. That means, that if creator player is not a one-person collaboration between designer and programmer, he should appeal to off-site labour, or to the core team itself. Working places are created and everybody is happy.&#xD;&#xA;&#xD;&#xA;So, that is the model as I see it now (and I invented it yesterday night). The main question is: &#xD;&#xA;&#xD;&#xA;**1) Should I even bother?**&#xD;&#xA;The idea is so ambitious, that could be interpreted as flying in the sky with the help of no wings. And I don't want to spend next ten years of my life (that's the minimum period in which I expect the project to become successful) working on unfortunate from the beginning project.&#xD;&#xA;&#xD;&#xA;I have many other questions, but this text already gone too big, so I'll ask only most important:&#xD;&#xA;&#xD;&#xA;2) Isn't there some similar game project-model already? I've seen [PlaneShift][2], but they definitely aren't what I'm talking about.&#xD;&#xA;&#xD;&#xA;3) Are open-source practices suitable for game development? There are so few good professionals in the field, will they bother to contribute?&#xD;&#xA;&#xD;&#xA;4) On how many people should I count on early development stage? Later? &#xD;&#xA;&#xD;&#xA;5) How to do all this thing without any reasonable budget?&#xD;&#xA;&#xD;&#xA;6) Where do I begin without XP in game development, but with XP in programming per se? &#xD;&#xA;&#xD;&#xA;**Note to moderators**: Please make this community wiki, I don't see my checkbox.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5558/how-many-people-are-needed-for-making-a-good-mmorpg&#xD;&#xA;  [2]: http://www.planeshift.it/" />
  <row Id="11205" PostHistoryTypeId="1" PostId="5648" RevisionGUID="6eb1b2ab-9116-400c-9f2f-a295758d1d7b" CreationDate="2010-11-16T17:51:33.143" UserId="3334" Text="Could this MMORPG project-model work?" />
  <row Id="11206" PostHistoryTypeId="3" PostId="5648" RevisionGUID="6eb1b2ab-9116-400c-9f2f-a295758d1d7b" CreationDate="2010-11-16T17:51:33.143" UserId="3334" Text="&lt;mmo&gt;&lt;open-source&gt;&lt;project-management&gt;&lt;business-model&gt;" />
  <row Id="11207" PostHistoryTypeId="5" PostId="5558" RevisionGUID="2b03c83a-a91e-473b-8478-bb7e94403d7a" CreationDate="2010-11-16T17:52:50.693" UserId="3334" Comment="added 262 characters in body" Text="1) RPG?&#xD;&#xA;2) MMORPG?&#xD;&#xA;&#xD;&#xA;I'm talking more about good content here.&#xD;&#xA;&#xD;&#xA;**Update:** Because it is said here that volume of information is low in my question, and because there was too much to say, I created an [extension question][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5648/could-this-mmorpg-project-model-work" />
  <row Id="11208" PostHistoryTypeId="10" PostId="5558" RevisionGUID="bb88461f-482c-49f1-b854-65bd5417938a" CreationDate="2010-11-16T17:59:46.657" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11209" PostHistoryTypeId="2" PostId="5649" RevisionGUID="34e68d8a-f0c0-44d2-b883-199b89b0ff8a" CreationDate="2010-11-16T18:02:58.850" UserId="3271" Text="Just as everyone else has recommended; keep as much code as possible server-side.&#xD;&#xA;&#xD;&#xA;A method I have used to deal with code copying is a bit odd, but it has worked well so far.&#xD;&#xA;&#xD;&#xA; - Server-side, generate unique id and store it for later.&#xD;&#xA; - Server-side, add unique id in script element during html rendering.&#xD;&#xA; - Client-side, create a WebSocket connection and pass the unique id to the server.&#xD;&#xA; - Server-side, match id against current list.&#xD;&#xA; - If match is not found, close connection.&#xD;&#xA; - If match *is* found, replace message handler with your &quot;proper&quot; one and discard id.&#xD;&#xA; - Stream your secret code to client as JSON, {&quot;func&quot;:&quot;function(){dostuff();}&quot;}&#xD;&#xA; - Client-side, watch for messages, if they contain &quot;func&quot;, eval it.&#xD;&#xA;&#xD;&#xA;Now your secret code is executing client-side and won't show up in view-source or inspectors/consoles. There is still ways to get at the code, but it's quite a bit more difficult." />
  <row Id="11210" PostHistoryTypeId="2" PostId="5650" RevisionGUID="97ce15b4-f51f-44b7-8fe1-663a608dc661" CreationDate="2010-11-16T18:28:09.913" UserId="1593" Text="Seems like none of the stuff you listed: financing, player-participation, &quot;unique&quot; items really get at the issue of whether your project is worth pursuing.  &#xD;&#xA;&#xD;&#xA;Is the game fun?&#xD;&#xA;&#xD;&#xA;If yes, go.  If no, don't.&#xD;&#xA;&#xD;&#xA;All that stuff would be neat.  Really!  But honestly, it's fairly minor details.  Or am I missing something?" />
  <row Id="11211" PostHistoryTypeId="2" PostId="5651" RevisionGUID="c1052d6e-9487-4411-a468-dc95821a51a7" CreationDate="2010-11-16T19:28:51.723" UserId="2910" Text="Right now, I feel I am strong in both Java a C#. (Not much of a leap from one to the other really).&#xD;&#xA;&#xD;&#xA;While I don't expect a game designer/programmer is an attainable goal early on in my career, This is a goal I will reach later on in my career.&#xD;&#xA;&#xD;&#xA;With this in mind, I feel that ignoring C++ and game design tools associated with it are eventually going to hurt me or slow me down in my ability to reach my goal.&#xD;&#xA;&#xD;&#xA;Is this the case? Or can I continue to hone my C# skills using XNA and WPF for personal projects that can elevate me into such a career?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11212" PostHistoryTypeId="1" PostId="5651" RevisionGUID="c1052d6e-9487-4411-a468-dc95821a51a7" CreationDate="2010-11-16T19:28:51.723" UserId="2910" Text="Am I hurting myself by not knowing C++ for game design?" />
  <row Id="11213" PostHistoryTypeId="3" PostId="5651" RevisionGUID="c1052d6e-9487-4411-a468-dc95821a51a7" CreationDate="2010-11-16T19:28:51.723" UserId="2910" Text="&lt;xna&gt;&lt;c++&gt;&lt;c#&gt;&lt;java&gt;&lt;wpf&gt;" />
  <row Id="11214" PostHistoryTypeId="2" PostId="5652" RevisionGUID="03a35ebf-b1c9-4800-a4d2-6a96edccd9a8" CreationDate="2010-11-16T19:40:57.970" UserId="2998" Text="I am trying to put together a website/portfolio and it would be great to see what others have done.&#xD;&#xA;" />
  <row Id="11215" PostHistoryTypeId="1" PostId="5652" RevisionGUID="03a35ebf-b1c9-4800-a4d2-6a96edccd9a8" CreationDate="2010-11-16T19:40:57.970" UserId="2998" Text="Where can I find some &quot;must see&quot; game development portfolios?" />
  <row Id="11216" PostHistoryTypeId="3" PostId="5652" RevisionGUID="03a35ebf-b1c9-4800-a4d2-6a96edccd9a8" CreationDate="2010-11-16T19:40:57.970" UserId="2998" Text="&lt;best-practices&gt;&lt;web&gt;&lt;portfolio&gt;" />
  <row Id="11217" PostHistoryTypeId="2" PostId="5653" RevisionGUID="1249e5b8-f6f6-40ec-92ac-c086cba21331" CreationDate="2010-11-16T19:44:29.663" UserId="51" Text="It isn't entirely clear, but what are your goals?  To be a game designer?  What do you think that position is/does?&#xD;&#xA;&#xD;&#xA;In the basic case, as long as you're not writing actual code, not knowing C++ specifically won't hurt you.  Of course, having a fundamental understanding of programming itself (object oriented design and being able to think in terms of conditionals, etc) *is* going to help you.  What C++ itself does compared to C# or Java probably isn't going to matter when it comes to helping design game rules that are easy to describe with code." />
  <row Id="11218" PostHistoryTypeId="16" PostId="5652" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-16T19:46:33.453" UserId="51" />
  <row Id="11219" PostHistoryTypeId="2" PostId="5654" RevisionGUID="9ba05ca6-ec68-41fa-8cc0-0c19fb7b91a0" CreationDate="2010-11-16T19:52:35.703" UserId="3214" Text="You will probably be fine using the languages you know;&#xD;&#xA;C# with XNA is popular right now since you can develop to XBOX360, Zune, and PC. &#xD;&#xA;Java's popularity is coming back because of Minecraft's indie success with it.&#xD;&#xA;&#xD;&#xA;I was in a similar position as you though, and decided to &quot;start over&quot; so to speak with C++, and 2 weeks ago I purchased &quot;Beginning C++ through Game Programming.&quot;  It is NOT a game programming book, but a C++ beginner book that covers everything you will need to know in C++ when programming games with another API or Library, and substitutes boring projects with more game-related ones. It was a great read.&#xD;&#xA;&#xD;&#xA;Now I am moving on to DirectX and purchased a book titled &quot;Programming an RTS Game in DirectX&quot; by Carl Granberg. It has fantastic reviews. I'm still not sure if I made a bad decision with DirectX over OpenGL, but we'll see.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11220" PostHistoryTypeId="2" PostId="5655" RevisionGUID="b6279fe1-763b-4831-8417-1e53cde86314" CreationDate="2010-11-16T19:53:56.600" UserId="2776" Text="John D. Carmack's [portfolio][1] :D&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/John_D._Carmack" />
  <row Id="11221" PostHistoryTypeId="2" PostId="5656" RevisionGUID="4e00f0a8-682f-4ea2-a112-97f222dae4ad" CreationDate="2010-11-16T20:01:43.730" UserId="744" Text="It really depends on what your goals are. If you want to move into design as quickly as possible and work your way up there to be a director, the technical background you have knowing Java and C# well will be more than enough.&#xD;&#xA;&#xD;&#xA;If your intent is to work your way up to a senior / lead programming position and move over to a director position from there, you'd better learn some kind of unmanaged language. Not necessarily C++ - C, Objective C, or something more fringe like D would be fine. But even working at higher levels of abstraction in C#, it's hard to be a great programmer without understanding pointers and memory management, without being able to read assembly and memory dumps, without being able to understand or even really implement low-level optimizations.&#xD;&#xA;&#xD;&#xA;I should also add - if you're not in the industry now, planning 20 years out is silly. Maybe you'll find out you hate it; maybe you'll find out you don't want to be a director because of all the non-development crap involved, and you'd rather just stay a senior designer or programmer, working under a director but with lots of freedom in a specific domain you enjoy." />
  <row Id="11222" PostHistoryTypeId="2" PostId="5657" RevisionGUID="fb7504c9-05a3-4216-90ff-a740a7a94739" CreationDate="2010-11-16T20:08:36.433" UserId="2345" Text="Here are some interesting ones I found on google:&#xD;&#xA;&#xD;&#xA;http://www.rickpierce.info/&#xD;&#xA;&#xD;&#xA;http://gtproductions.net/&#xD;&#xA;&#xD;&#xA;http://kermdinger.com/?page_id=3&#xD;&#xA;&#xD;&#xA;http://bytegrove.com/?cat=1&#xD;&#xA;&#xD;&#xA;http://jdmunro.net/&#xD;&#xA;&#xD;&#xA;http://www.mutualdestruction.net/&#xD;&#xA;&#xD;&#xA;http://slippyd.com/work/portfolio&#xD;&#xA;" />
  <row Id="11223" PostHistoryTypeId="5" PostId="5609" RevisionGUID="4ef58d48-d59e-43e5-b461-65b79e668fa1" CreationDate="2010-11-16T20:16:20.233" UserId="370" Comment="added 722 characters in body" Text="&gt; All AI is search!&#xD;&#xA;&#xD;&#xA;When you get into the guts of AI it's amazing how much of it is really [search][1].&#xD;&#xA;&#xD;&#xA; * **state**: the remaining cooldown of all available spells.&#xD;&#xA; * **fitness**: total damage done&#xD;&#xA; * **cost**: total time taken&#xD;&#xA; * **branches**: any known spell.  If spell is still in cooldown just add that value to its cast time.&#xD;&#xA; * **goal**: total health of target.  The goal has to be a finite amount of damage, so in the case of an unknown target, pick the largest possible health.  &#xD;&#xA;Alternatively, the goal could be spend less than 50 seconds and the search would find the maximal damage that could be done in 50 seconds.&#xD;&#xA;&#xD;&#xA;Plug these parameters into a [Uniform Cost Search][2] (UCS) and presto, guaranteed optimal battle plan.  Even better if you can come up with a heuristic, search with [A*][3], or IDA* and you'll get the same answer much faster.&#xD;&#xA;&#xD;&#xA;Some more advantages to using UCS is it can find optimal cast order for much more complicated situations than the one you provided with only 3 variables.  Some other aspects that could easily added:&#xD;&#xA;&#xD;&#xA; * damage over time&#xD;&#xA; * refresh spell to reduce cooldown of other spells&#xD;&#xA; * haste spell causing other spells to cast faster.&#xD;&#xA; * damage booster causing other spells to do more damage.&#xD;&#xA;&#xD;&#xA;UCS is not omnipotent.  It cannot model the benefits of protection spells.  For that you'll have to upgrade to alpha-beta search or minimax.  &#xD;&#xA;Also it doesn't handle area-of-affect and group fights very well.  UCS can be tweaked to give reasonable solutions in these situations, it is not guaranteed to find the optimal solution.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tree_traversal&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Uniform-cost_search&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/A*_search_algorithm" />
  <row Id="11224" PostHistoryTypeId="2" PostId="5658" RevisionGUID="625fa571-06d3-4535-a988-6e6b333bf1d3" CreationDate="2010-11-16T20:39:50.283" UserId="3396" Text="Learning more languages will only be to your advantage.  Even if nearly all pro engines use--or should use--scripting and/or extensive tools for designer ease-of-use, you're correct in that it helps greatly to have a project that you have specifically worked on.  Even if your interviewer doesn't pay attention to your projects (which is already unlikely,) working on even one personal project will be a huge learning experience.&#xD;&#xA;&#xD;&#xA;For designers and artists, the portfolio is arguably even more important, since you can't take programming tests or have straightforward tech interviews.  So, I'm not saying that you should freak out and learn everything there is to know about C++.&#xD;&#xA;&#xD;&#xA;Rather, you should be able to show a few games that have good design potential (think small, clear game concepts like Limbo or Portal,) whether you developed them yourself or you made them using Flash.  Use coding as a tool, not as your primary weapon.  Make sure they're easily accessible on your site with gameplay videos, screenshots, and available downloads.&#xD;&#xA;&#xD;&#xA;Above all else, polish everything you make, no matter how small or what kind of project you have.  If programming is about robustness and usability, then designing is about fun (people often forget this) and showing that you can really nail the details." />
  <row Id="11225" PostHistoryTypeId="6" PostId="5648" RevisionGUID="bfe45d4c-43b0-467e-a919-9760c130c4b3" CreationDate="2010-11-16T20:48:04.013" UserId="51" Comment="edited tags" Text="&lt;mmo&gt;&lt;open-source&gt;&lt;project-management&gt;&lt;business-model&gt;" />
  <row Id="11226" PostHistoryTypeId="2" PostId="5659" RevisionGUID="0907a903-b3ee-4541-8b32-4fa0dc9f1981" CreationDate="2010-11-16T20:49:32.277" UserId="982" Text="Hey, I know Flash works using Facebook, and I think I've seen some Java stuff on there too, but does anyone know if the Unity Player can be used in Facebook?" />
  <row Id="11227" PostHistoryTypeId="1" PostId="5659" RevisionGUID="0907a903-b3ee-4541-8b32-4fa0dc9f1981" CreationDate="2010-11-16T20:49:32.277" UserId="982" Text="Unity on Facebook?" />
  <row Id="11228" PostHistoryTypeId="3" PostId="5659" RevisionGUID="0907a903-b3ee-4541-8b32-4fa0dc9f1981" CreationDate="2010-11-16T20:49:32.277" UserId="982" Text="&lt;unity&gt;&lt;facebook&gt;" />
  <row Id="11229" PostHistoryTypeId="6" PostId="546" RevisionGUID="cbc7c0a7-c2bf-415c-bdd3-de490d143aa1" CreationDate="2010-11-16T20:49:47.117" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;multiplayer&gt;&lt;server&gt;&lt;state&gt;" />
  <row Id="11230" PostHistoryTypeId="2" PostId="5660" RevisionGUID="55ecf382-3ebc-4363-9135-bcafe56f2d32" CreationDate="2010-11-16T21:00:54.903" UserId="1930" Text="IMO, yes, you are likely to be hurting yourself. First of all, rightly or wrongly there *is* a perceived hierarchy among programming languages -- and C++ generally has a higher standing than Java or C# (e.g., questions like yours are fairly common -- the reverse is virtually unheard of). If you apply somewhere that uses C# or Java, and you know C++, they're unlikely to question your programming ability. If you apply somewhere that uses C++ and you know C# and Java, there's a *pretty* fair chance, they will question your programming ability, at least to some degree. That's not to say the perception can't be overcome, but you're still putting yourself at a disadvantage.&#xD;&#xA;&#xD;&#xA;Second, at least among the independent game developers I know (admittedly, not very many), there's some basic dislike of C# just because it's from Microsoft. Sun was viewed a lot more positively, but since the Oracle buyout that doesn't seem to be the case anymore at all. Most see &quot;Oracle&quot; and &quot;cool games&quot; as about as close to exact opposites as humanly possible.&#xD;&#xA;&#xD;&#xA;Finally, from a practical viewpoint, games are one of the places where C++ is used most heavily. If you don't know C++ to at least a reasonable degree, it simply restricts your options considerably. " />
  <row Id="11231" PostHistoryTypeId="2" PostId="5661" RevisionGUID="fda71333-a769-4c03-96a9-396d61dc27fb" CreationDate="2010-11-16T21:01:54.173" UserId="14" Text="The Unity Player can be used on facebook. &#xD;&#xA;&#xD;&#xA;One relevant thread on integration: http://forum.unity3d.com/threads/7812-Unity3D-meet-Facebook!&#xD;&#xA;&#xD;&#xA;And One very popular game: http://www.facebook.com/ParadisePaintball" />
  <row Id="11234" PostHistoryTypeId="5" PostId="5602" RevisionGUID="af7a028c-af5e-4b79-bda8-a2d31c419552" CreationDate="2010-11-16T21:03:48.253" UserId="3355" Comment="added 1704 characters in body" Text="Is this for level designer, or for the engine?&#xD;&#xA;&#xD;&#xA;For the level designer - you'll need that code to e.g. combine static objects. Research vector graphic APIs for the solution, the task sounds pretty common for SVG, PostScript, WMF, etc.. First try using CombineRgn Win32 API :-)&#xD;&#xA;&#xD;&#xA;For the game engine - I'd suggest you don't do what you want..&#xD;&#xA;You'll spend enormous amount of CPU combining your objects together. You'll spend enormous count of branch mispredictions checking the border conditions, testing whether 2 segments intersect or not, etc.. And, this process must be repeated every frame for the visible portion of your map.&#xD;&#xA;&#xD;&#xA;Just do bounding box checks, then collide individual objects. If your object shapes are too complex - simplify them while exporting data into the engine, and use different shapes for collision and drawing.&#xD;&#xA;&#xD;&#xA;**Update**: see my C# GDI+ code that does what you want. You can easily write the same in C++: the GraphicsPath class is merely a thin wrapper over the corresponding gdiplus.dll functions.&#xD;&#xA;&#xD;&#xA;	static class GraphicsPathExt&#xD;&#xA;	{&#xD;&#xA;		[DllImport( @&quot;gdiplus.dll&quot; )]&#xD;&#xA;		static extern int GdipWindingModeOutline( HandleRef path, IntPtr matrix, float flatness );&#xD;&#xA;&#xD;&#xA;		static HandleRef getPathHandle( GraphicsPath p )&#xD;&#xA;		{&#xD;&#xA;			return new HandleRef( p, (IntPtr)p.GetType().GetField( &quot;nativePath&quot;, BindingFlags.NonPublic | BindingFlags.Instance ).GetValue( p ) );&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		public static void FlattenPath( this GraphicsPath p )&#xD;&#xA;		{&#xD;&#xA;			HandleRef h = getPathHandle( p );&#xD;&#xA;			int status = GdipWindingModeOutline( h, IntPtr.Zero, 0.25F );&#xD;&#xA;			// TODO: see http://msdn.microsoft.com/en-us/library/ms534175(VS.85).aspx and throw a correct exception.&#xD;&#xA;			if( 0 != status )&#xD;&#xA;				throw new ApplicationException( &quot;GDI+ error &quot; + status.ToString() );&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	class Program&#xD;&#xA;	{&#xD;&#xA;&#xD;&#xA;		static void Main( string[] args )&#xD;&#xA;		{&#xD;&#xA;			PointF[] fig1 = &#xD;&#xA;			{&#xD;&#xA;				new PointF(-50, 0),&#xD;&#xA;				new PointF(0, 50),&#xD;&#xA;				new PointF(50, 0),&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			PointF[] fig2 = &#xD;&#xA;			{&#xD;&#xA;				new PointF(-50, 25),&#xD;&#xA;				new PointF(50, 25),&#xD;&#xA;				new PointF(0, -25),&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			GraphicsPath path1 = new GraphicsPath();&#xD;&#xA;			path1.AddLines( fig1 );&#xD;&#xA;			path1.CloseAllFigures();&#xD;&#xA;&#xD;&#xA;			GraphicsPath path2 = new GraphicsPath();&#xD;&#xA;			path2.AddLines( fig2 );&#xD;&#xA;			path2.CloseAllFigures();&#xD;&#xA;&#xD;&#xA;			GraphicsPath combined = new GraphicsPath();&#xD;&#xA;			combined.AddPath( path1, true );&#xD;&#xA;			combined.AddPath( path2, true );&#xD;&#xA;			combined.FlattenPath();&#xD;&#xA;&#xD;&#xA;			foreach (var p in combined.PathPoints)&#xD;&#xA;			{&#xD;&#xA;				Console.WriteLine( &quot;&lt;{0}, {1}&gt;&quot;, p.X, p.Y );&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;" />
  <row Id="11235" PostHistoryTypeId="2" PostId="5663" RevisionGUID="75e184ab-0a7a-4362-9eb5-3f7a1cbee12e" CreationDate="2010-11-16T21:04:14.790" UserId="2653" Text="I have an idea for an addon for World of Warcraft which would basically be a minigame within the game itself. Eventually, I'd like to have players be able to compete against each other directly. The game would have some RPG-like elements, particularly statistics and abilities, which it would be undesirable for the end users to modify.&#xD;&#xA;&#xD;&#xA;So the fact that this is a client-side script, where everything (logic and data storage) are all in flat text files, means that it's impossible for me to truly secure things. But I'd like to at least make it non-trivial to alter things, e.g. so that you can't just open up a file in notepad and type in 'Strength = 256'.&#xD;&#xA;&#xD;&#xA;I'm looking for any ideas on how I might obfuscate the data, preferably something which is easy to implement as it's not really what I feel like spending my time on, but probably more sophisticated than ROT-13.&#xD;&#xA;&#xD;&#xA;As an example, one idea I had, which I'm not sure if it's feasible (have never made an addon for WoW before) is to serialize the data in base-64." />
  <row Id="11236" PostHistoryTypeId="1" PostId="5663" RevisionGUID="75e184ab-0a7a-4362-9eb5-3f7a1cbee12e" CreationDate="2010-11-16T21:04:14.790" UserId="2653" Text="Obscuring stored info in a flat-text file" />
  <row Id="11237" PostHistoryTypeId="3" PostId="5663" RevisionGUID="75e184ab-0a7a-4362-9eb5-3f7a1cbee12e" CreationDate="2010-11-16T21:04:14.790" UserId="2653" Text="&lt;lua&gt;" />
  <row Id="11238" PostHistoryTypeId="2" PostId="5664" RevisionGUID="5479705b-7424-43d9-a3b4-c498fe64e833" CreationDate="2010-11-16T21:19:59.980" UserId="962" Text="Sorry, no matter what kind of encryption on the client side you do, **if you store sensitive stuff on the client, it will be hacked.**&#xD;&#xA;&#xD;&#xA;The client has to be able to read the data in the &quot;encrypted&quot; file. So you are giving the lock and the key to the client in a competitive game, and telling them not to edit anything inside your encrypted file.&#xD;&#xA;&#xD;&#xA;Your client will be hacked no matter what. The only thing that the encryption will do is slightly increase the time to be hacked.&#xD;&#xA;&#xD;&#xA;**Always assume the client is compromised. If you can't work around that assumption, then you are So-Out-of-Luck.**" />
  <row Id="11239" PostHistoryTypeId="5" PostId="5661" RevisionGUID="9cbf17cb-4240-4574-97d4-1641ae3e0018" CreationDate="2010-11-16T21:26:23.123" UserId="51" Comment="added 166 characters in body" Text="The Unity Player can be used on facebook. &#xD;&#xA;&#xD;&#xA;One relevant thread on integration: http://forum.unity3d.com/threads/7812-Unity3D-meet-Facebook!&#xD;&#xA;&#xD;&#xA;And One very popular game: http://www.facebook.com/ParadisePaintball&#xD;&#xA;&#xD;&#xA;Here's a thread on Unity Answers that also has some more details: http://answers.unity3d.com/questions/82/how-can-i-make-my-unity-application-work-inside-facebook" />
  <row Id="11240" PostHistoryTypeId="2" PostId="5665" RevisionGUID="bde92ab8-1b05-4cd8-a87f-5342a125eb27" CreationDate="2010-11-16T21:27:42.203" UserId="1636" Text="I've looked at a couple other questions about Sprites but most seem to apply to Isometric or RPG related sprites. So I'm wondering if there is a decent place for 2D side scrolling plat-former type sprites?" />
  <row Id="11241" PostHistoryTypeId="1" PostId="5665" RevisionGUID="bde92ab8-1b05-4cd8-a87f-5342a125eb27" CreationDate="2010-11-16T21:27:42.203" UserId="1636" Text="Free to use resources for 2d platformer Sprites" />
  <row Id="11242" PostHistoryTypeId="3" PostId="5665" RevisionGUID="bde92ab8-1b05-4cd8-a87f-5342a125eb27" CreationDate="2010-11-16T21:27:42.203" UserId="1636" Text="&lt;2d&gt;&lt;sprites&gt;&lt;free&gt;&lt;licensing&gt;" />
  <row Id="11243" PostHistoryTypeId="16" PostId="5665" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-16T21:28:42.483" UserId="51" />
  <row Id="11244" PostHistoryTypeId="2" PostId="5666" RevisionGUID="e85dd7e8-f82e-4960-98dc-37718589632d" CreationDate="2010-11-16T21:29:35.850" UserId="51" Text="http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images is probably your best bet for finding resources.  " />
  <row Id="11245" PostHistoryTypeId="6" PostId="5558" RevisionGUID="7546c567-1dbf-498c-ba17-5c1b7d2b9530" CreationDate="2010-11-16T21:54:18.913" UserId="1156" Comment="edited tags" Text="&lt;mmo&gt;&lt;project-management&gt;" />
  <row Id="11246" PostHistoryTypeId="6" PostId="5633" RevisionGUID="a0e46616-5d20-4a30-a4e3-dfecf68b6e89" CreationDate="2010-11-16T21:55:08.053" UserId="1156" Comment="edited tags" Text="&lt;best-practices&gt;&lt;java&gt;&lt;multithreading&gt;&lt;rpg&gt;" />
  <row Id="11247" PostHistoryTypeId="6" PostId="5626" RevisionGUID="e789b4bc-944f-47d7-8369-27d720ed5243" CreationDate="2010-11-16T21:55:18.693" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;rpg&gt;" />
  <row Id="11248" PostHistoryTypeId="6" PostId="4628" RevisionGUID="8170f970-0d6f-479b-9289-630ffe56489a" CreationDate="2010-11-16T21:55:42.360" UserId="1156" Comment="edited tags" Text="&lt;procedural-generation&gt;&lt;worldmap&gt;&lt;infinite&gt;&lt;roguelikes&gt;&lt;rpg&gt;" />
  <row Id="11249" PostHistoryTypeId="2" PostId="5667" RevisionGUID="f380b10d-941d-42a8-be73-47d8706995ab" CreationDate="2010-11-16T22:18:30.857" UserId="47" Text="I'm currently developing a puzzle game for Android that is sort of along the lines of [Alchemy][1].&#xD;&#xA;&#xD;&#xA;I was wondering what makes games like Alchemy or Bejeweled so addicting?  How do I keep players interested in the game to want to play it over and over?  Is it the scores?  Level advancement?  The challenges?  What should I be doing to try and keep a player engaged with a puzzle game since they are often quite repetitive?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.popcap.com/games/free/alchemy" />
  <row Id="11250" PostHistoryTypeId="1" PostId="5667" RevisionGUID="f380b10d-941d-42a8-be73-47d8706995ab" CreationDate="2010-11-16T22:18:30.857" UserId="47" Text="What makes puzzle games addictive?" />
  <row Id="11251" PostHistoryTypeId="3" PostId="5667" RevisionGUID="f380b10d-941d-42a8-be73-47d8706995ab" CreationDate="2010-11-16T22:18:30.857" UserId="47" Text="&lt;puzzle&gt;" />
  <row Id="11252" PostHistoryTypeId="12" PostId="5655" RevisionGUID="6aa2649b-c272-418e-80ab-63073ca0a374" CreationDate="2010-11-16T22:25:16.373" UserId="2776" Text="[{&quot;Id&quot;:2776,&quot;DisplayName&quot;:&quot;Edward83&quot;}]" />
  <row Id="11253" PostHistoryTypeId="13" PostId="5655" RevisionGUID="2f452e99-c938-4639-85dd-278c9e980d24" CreationDate="2010-11-16T22:25:39.087" UserId="2776" Text="[{&quot;Id&quot;:2776,&quot;DisplayName&quot;:&quot;Edward83&quot;}]" />
  <row Id="11254" PostHistoryTypeId="6" PostId="5667" RevisionGUID="bd65eb47-2d4c-4a67-bfec-3b8633eb02a1" CreationDate="2010-11-16T22:26:15.657" UserId="47" Comment="edited tags" Text="&lt;game-design&gt;&lt;puzzle&gt;" />
  <row Id="11256" PostHistoryTypeId="2" PostId="5669" RevisionGUID="b8a1d201-9bf8-471c-a4b8-f05be52faa92" CreationDate="2010-11-16T23:57:07.533" UserId="20" Text="A puzzle game like Bejeweled or Tetris has randomly generated &quot;levels&quot;, usually with a slow progression in difficulty. That alone can make a game interesting. Trying to get as far as possible, getting a &quot;lucky streak&quot; or scoring the most points. &#xD;&#xA;&#xD;&#xA;One thing that's really important is that the gameplay feels right. Controls should be simple and intuitive, graphics and sound should support and enrich the gameplay. Clearing a level or scoring multiple points with one move should look and sound great, so that the player gets some sort of audiovisual reward.&#xD;&#xA;&#xD;&#xA;It's a bit different with puzzle games that have pre-defined levels like physics-puzzles or games like &quot;[Slice it][1]&quot; or &quot;[Trainyard][2]&quot;. The main goal there is to *beat the game*, eg. complete all levels. Additional replay-value can be added by adding better scores for fast or &quot;flawless&quot; solving of the puzzle.&#xD;&#xA;&#xD;&#xA;Another important factor is progression. Either by trying to beat your own scores or scores from other players in a leaderboard. Once you mastered a game and you have the feeling that you can't get better, you'll most likely also lose interest in it.&#xD;&#xA;&#xD;&#xA;The most addictive puzzle-game I've played recently is probably [Puzzle Quest][3]. It combines a Bejeweled-type of game with a fantasy story and RPG elements. Not only the puzzle-solving is addictive, you also want to progress in the story and &quot;level-up&quot; your character... addictiveness overload ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=iFfwl3q40a0&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=xWtIb7NEYgM&#xD;&#xA;  [3]: http://www.puzzle-quest.com/" />
  <row Id="11257" PostHistoryTypeId="2" PostId="5670" RevisionGUID="28defbe5-746f-4f0f-ae93-8baa5829400f" CreationDate="2010-11-17T01:11:46.527" UserId="1232" Text="I don't have specific experience with WoW addons, but if it were me I'd serialize the script to binary, then for each successive byte XOR it by the next element of a linear congruential random number generator. The generator could be seeded by the CRC of some pre-known locations in your script file. If you need to convert back to ascii, you can remap bits[0..3] of each byte to 'A'..'P' character and bits [4..7] to 'K'..'Z'.&#xD;&#xA;NOTE: the pre-known locations would have some other invertible transform applied, and obviously they should not be XOR encrypted (otherwise you can't reconstruct your CRC for decryption). &#xD;&#xA;&#xD;&#xA;Not the best or most unique algorithm in the world, but would serve against opportunistic reverse engineering." />
  <row Id="11258" PostHistoryTypeId="5" PostId="5610" RevisionGUID="3f1ade25-c540-4fdc-89ab-9cd14c59cc52" CreationDate="2010-11-17T01:22:21.020" UserId="2100" Comment="clarified requirements" Text="Are there any free XNA 4.0 post-processing libraries that are easy to hook into projects? I am looking specifically for a glow effect (although anything is great), and I should also mention that I'm using the Reach profile.&#xD;&#xA;&#xD;&#xA;EDIT: I should add that I'm not concerned about the Windows phone, because it can't support custom shaders." />
  <row Id="11259" PostHistoryTypeId="2" PostId="5671" RevisionGUID="60385fe1-4063-44e9-8589-42e60f4fc6fc" CreationDate="2010-11-17T01:27:41.467" UserDisplayName="Austech" Text="I'm using FMOD (with C++ syntax, not C) and I'm having trouble getting the wave data of a whole sound file.&#xD;&#xA;&#xD;&#xA;Channel::GetWave() only gets the wave data of the area on which it is currently playing.&#xD;&#xA;&#xD;&#xA;The documentation says:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Do not use this function to try and display the whole waveform of the sound, as this is more of a 'snapshot' of the current waveform at the time it is called, and could return the same data if it is called very quickly in succession.&#xD;&#xA;    See the DSP API to capture a continual stream of wave data as it plays, or see Sound::lock / Sound::unlock if you want to simply display the waveform of a sound.&#xD;&#xA;&#xD;&#xA;Unfortunately, the Sound::lock and unlock functions are pretty confusing,  at least to me.&#xD;&#xA;&#xD;&#xA;Lock:&#xD;&#xA;&#xD;&#xA;    FMOD_RESULT Sound::lock(&#xD;&#xA;      unsigned int  offset, &#xD;&#xA;      unsigned int  length, &#xD;&#xA;      void **  ptr1, &#xD;&#xA;      void **  ptr2, &#xD;&#xA;      unsigned int *  len1, &#xD;&#xA;      unsigned int *  len2&#xD;&#xA;    );&#xD;&#xA;    offset&#xD;&#xA;    &#xD;&#xA;    Offset in bytes to the position you want to lock in the sample buffer. &#xD;&#xA;    &#xD;&#xA;    length&#xD;&#xA;    &#xD;&#xA;    Number of bytes you want to lock in the sample buffer. &#xD;&#xA;    &#xD;&#xA;    ptr1&#xD;&#xA;    &#xD;&#xA;    Address of a pointer that will point to the first part of the locked data. &#xD;&#xA;    &#xD;&#xA;    ptr2&#xD;&#xA;    &#xD;&#xA;    Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. &#xD;&#xA;    &#xD;&#xA;    len1&#xD;&#xA;    &#xD;&#xA;    Length of data in bytes that was locked for ptr1 &#xD;&#xA;    &#xD;&#xA;    len2&#xD;&#xA;    &#xD;&#xA;    Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer. &#xD;&#xA;&#xD;&#xA;Unlock:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    FMOD_RESULT Sound::unlock(&#xD;&#xA;      void *  ptr1, &#xD;&#xA;      void *  ptr2, &#xD;&#xA;      unsigned int  len1, &#xD;&#xA;      unsigned int  len2&#xD;&#xA;    );&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ptr1&#xD;&#xA;    &#xD;&#xA;    Pointer to the 1st locked portion of sample data, from Sound::lock. &#xD;&#xA;    &#xD;&#xA;    ptr2&#xD;&#xA;    &#xD;&#xA;    Pointer to the 2nd locked portion of sample data, from Sound::lock. &#xD;&#xA;    &#xD;&#xA;    len1&#xD;&#xA;    &#xD;&#xA;    Length of data in bytes that was locked for ptr1 &#xD;&#xA;    &#xD;&#xA;    len2&#xD;&#xA;    &#xD;&#xA;    Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sorry if this question looks sloppy. I'm just trying to give out as much information on the topic that's necessary.&#xD;&#xA;&#xD;&#xA;But as I said, my goal is to by able to get the wave data of the beginning of a song to the end.&#xD;&#xA;&#xD;&#xA;Thanks in advance, and any help or info will be apprectiated.&#xD;&#xA;" />
  <row Id="11260" PostHistoryTypeId="1" PostId="5671" RevisionGUID="60385fe1-4063-44e9-8589-42e60f4fc6fc" CreationDate="2010-11-17T01:27:41.467" UserDisplayName="Austech" Text="FMOD (C++) Wave Data of a whole sound" />
  <row Id="11261" PostHistoryTypeId="3" PostId="5671" RevisionGUID="60385fe1-4063-44e9-8589-42e60f4fc6fc" CreationDate="2010-11-17T01:27:41.467" UserDisplayName="Austech" Text="&lt;libraries&gt;&lt;sound&gt;" />
  <row Id="11262" PostHistoryTypeId="2" PostId="5672" RevisionGUID="3c5e0c14-104f-4c77-b0b4-4bb6074cad11" CreationDate="2010-11-17T01:38:51.713" UserId="3405" Text="Unity has its own &quot;StackExchange&quot;-style website - &lt;a href&quot;answers.unity3d.com&quot;&gt;here&lt;/a&gt; If you have any further questions, you should post them there, where more Unity-Related people will be." />
  <row Id="11263" PostHistoryTypeId="2" PostId="5673" RevisionGUID="8c8110ca-a282-4700-b829-8737d0f5ae72" CreationDate="2010-11-17T01:57:48.843" UserId="154" Text="&gt; &quot;Should I even bother?&quot; + &quot;Where do I begin without XP in game development&quot;&#xD;&#xA;&#xD;&#xA;Sorry, but the simple answer is No&#xD;&#xA;&#xD;&#xA;The long answer is that MMO's are the hardest possible type of game to develop, with open-world titles being the only other thing close to as difficult. They often take teams of several hundred people with a wide range of skills, massive costs in server/back-end investments, and an ludicrously large amount of content. &#xD;&#xA;&#xD;&#xA;The development scene is littered with teams filled with people with over a decade of experience in game development who tried and failed to build an MMO. Realtime Worlds being the most recent, and painfully expensive ($100m down the drain for APB) example.&#xD;&#xA;&#xD;&#xA;There are some exceptions if you set your sights low enough. Text/webpage based MMO's like Urban Dead or the various projects from [Gameforge][1] are in theory, buildable by a single individual or a small group of people. These games are mostly giant databases with a pretty web interface. &#xD;&#xA;&#xD;&#xA;This doesn't even address the inherent security issues of a P2P financial economy paired with open source development which is a recipe for extreme direct financial griefing.&#xD;&#xA;&#xD;&#xA;**Don't be discouraged though**&#xD;&#xA;&#xD;&#xA;If you really want to learn how to make games that's great, and right now is one of the easiest times in the world to both build games and distribute them to people. You've got the indie channel of XBLA, iPhone app stores, Facebook, Flash portals. All of which are fantastic places to start and don't require you to spend either the time, money, or find the people needed to make a big project.&#xD;&#xA;&#xD;&#xA;I encourage you to build games, but start small.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameforge.de/content/view/24/23/lang,en/" />
  <row Id="11264" PostHistoryTypeId="2" PostId="5674" RevisionGUID="39b93c8b-093d-4a00-8fab-b1c7bb49df1b" CreationDate="2010-11-17T03:02:23.840" UserId="953" Text="Although it's a bit short, I'm partial to Sparky's portfolio: http://vacuumflowers.com/" />
  <row Id="11265" PostHistoryTypeId="2" PostId="5675" RevisionGUID="7f915689-a96a-4456-b054-061dc74de070" CreationDate="2010-11-17T04:31:46.200" UserId="3408" Text="So I've looked a bit at Breadth-First and Depth-First search algorithms and I think I've got a pretty good idea of how they work.&#xD;&#xA;&#xD;&#xA;Now I am here : http://www.policyalmanac.org/games/aStarTutorial.htm&#xD;&#xA;&#xD;&#xA;The problem is I don't see how a 2D grid can help with a 3D game. I suppose that wouldn't be a problem if the 3D game didn't have the AI explore multiple levels of a building, but since that is most often what occurs, I am not sure how I would &quot;simplify&quot; my static level geometry and my physics-dynamic changing scene into a structure that can be easily be traversed to determine a path to a goal node.&#xD;&#xA;&#xD;&#xA;Help?" />
  <row Id="11266" PostHistoryTypeId="1" PostId="5675" RevisionGUID="7f915689-a96a-4456-b054-061dc74de070" CreationDate="2010-11-17T04:31:46.200" UserId="3408" Text="How do I wrap my brain around A Star?" />
  <row Id="11267" PostHistoryTypeId="3" PostId="5675" RevisionGUID="7f915689-a96a-4456-b054-061dc74de070" CreationDate="2010-11-17T04:31:46.200" UserId="3408" Text="&lt;path-finding&gt;" />
  <row Id="11268" PostHistoryTypeId="2" PostId="5676" RevisionGUID="2f552ed7-dd38-4bd6-9703-e0e6749435f0" CreationDate="2010-11-17T05:19:32.263" UserDisplayName="Adam R" Text="The first thing I'd do is read &quot;Your Portfolio Repels Jobs&quot; by John Jones. He covers what he looks for in a portfolio, and how to ensure people actually get to the content you want them to see. Check it out here =&gt; [Your Portfolio repels jobs][1]&#xD;&#xA;&#xD;&#xA;Don't scrimp on your design. Do. Not. If web dev isn't your thing, jump on wordpress and get a nice magazine theme. It really makes a difference. Google is your best friend here, and no - you don't have to fork out for premium themes to make an impact :)&#xD;&#xA;&#xD;&#xA;Here's some examples to get you started - Top 14 Free Wordpress themes 2010 - wpbloghost dot net/free-wordpress-magazine-themes&#xD;&#xA;&#xD;&#xA;Rick Pierce's portfolio is what you should aim for. Do not aim lower!&#xD;&#xA;&#xD;&#xA;I'm also a massive fan of Pior Oberson's CV (pioroberson dot com). It was good enough to get him a job at Blizzard, so he's done something right.&#xD;&#xA;&#xD;&#xA;I hope that helps! It certainly helped me get my foot in the door as a 3D artist.&#xD;&#xA;&#xD;&#xA;N.B. Sorry about the spelled-out hyperlinks; new users aren't allowed to post more than one&#xD;&#xA;  [1]: http://www.thejonjones.com/2005/10/07/your-portfolio-repels-jobs/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11269" PostHistoryTypeId="2" PostId="5677" RevisionGUID="48248ade-5b20-43d9-8349-187de3cf9aa5" CreationDate="2010-11-17T05:54:56.677" UserId="2919" Text="Just put all your settings into a structure, and store is as a binary blob (or base64 encoded.) If that's not possible, concatenate all integers and add something inbetween to checksum (i.e. NVVVCC, N is number of bytes that follow, V is the value, C is the checksum.) Use some weird checksumming (xor of all values emitted so far for instance), so people have to pull out a calculator to change the values, after finding them in the super-long digit string. That's usually enough to prevent someone from using notepad to open your file and changing something, but easy enough so your implementation stays simple.&#xD;&#xA;&#xD;&#xA;As you said, the goal is to keep people away from randomly tampering with the data, and adding stuff which is easy to do automatic but cumbersome to do manually usually helps there." />
  <row Id="11270" PostHistoryTypeId="5" PostId="5677" RevisionGUID="61143435-6ddf-4d4c-85ae-1d618535ba20" CreationDate="2010-11-17T06:00:22.080" UserId="2919" Comment="Remove the base64 reference, as the OP mentioned that already" Text="Your first idea is good: Just put all your settings into a structure, and store is as a binary. Another thing you might want to try is to concatenate all integers and add something inbetween to checksum (i.e. NVVVCC, N is number of bytes that follow, V is the value, C is the checksum.) Use some weird checksumming (xor of all values emitted so far for instance), so people have to pull out a calculator to change the values, after finding them in the super-long digit string. That's usually enough to prevent someone from using notepad to open your file and changing something, but easy enough so your implementation stays simple. And you can inspect the values visually, which might be helpful.&#xD;&#xA;&#xD;&#xA;As you said, the goal is to keep people away from randomly tampering with the data, and adding stuff which is easy to do automatic but cumbersome to do manually usually helps there." />
  <row Id="11271" PostHistoryTypeId="2" PostId="5678" RevisionGUID="a4b60301-042d-4989-8288-efbb3ba81126" CreationDate="2010-11-17T06:06:53.603" UserId="1966" Text="I have two RPG battle mechanic ideas that I am working on, before starting writing code (the engine is undecided), how should I plan the details of it? Should I draw and write on paper? or should I write a specification document?&#xD;&#xA;Any example of a game mechanic planning process that others were using?&#xD;&#xA;" />
  <row Id="11272" PostHistoryTypeId="1" PostId="5678" RevisionGUID="a4b60301-042d-4989-8288-efbb3ba81126" CreationDate="2010-11-17T06:06:53.603" UserId="1966" Text="Battle Mechanics Planning" />
  <row Id="11273" PostHistoryTypeId="3" PostId="5678" RevisionGUID="a4b60301-042d-4989-8288-efbb3ba81126" CreationDate="2010-11-17T06:06:53.603" UserId="1966" Text="&lt;game-mechanics&gt;&lt;rpg&gt;" />
  <row Id="11274" PostHistoryTypeId="2" PostId="5679" RevisionGUID="fdef4562-fed6-49f4-b6f4-cf88de7ace07" CreationDate="2010-11-17T06:26:44.107" UserId="3411" Text="It might help if you think of the connections in tiles as literal connections.&#xD;&#xA;&#xD;&#xA;They can be between squares like in a tilebased game, or between polygons or level chunks.&#xD;&#xA;&#xD;&#xA;Astar only cares about a heuristic of movement from one node to the end, and the ability to ask for 'all my neighbors' so you can add them to the open list.&#xD;&#xA;&#xD;&#xA;Try implementing 2d Astar with that in mind, I tend to create my array, and then do a second pass creating links to all the neighboring tiles. The advantage of doing this, is it is only a simple task to change to 8 way movement, and even adding teleporters that Astar respects (add a connection to far away tiles!)&#xD;&#xA;" />
  <row Id="11275" PostHistoryTypeId="5" PostId="5671" RevisionGUID="6555f7cc-2160-4c39-8fe5-994d58185082" CreationDate="2010-11-17T06:43:29.183" UserId="51" Comment="formatting" Text="I'm using FMOD (with C++ syntax, not C) and I'm having trouble getting the wave data of a whole sound file.&#xD;&#xA;&#xD;&#xA;Channel::GetWave() only gets the wave data of the area on which it is currently playing.&#xD;&#xA;&#xD;&#xA;The documentation says:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Do not use this function to try and display the whole waveform of the&#xD;&#xA;&gt; sound, as this is more of a 'snapshot'&#xD;&#xA;&gt; of the current waveform at the time it&#xD;&#xA;&gt; is called, and could return the same&#xD;&#xA;&gt; data if it is called very quickly in&#xD;&#xA;&gt; succession.&#xD;&#xA;&gt; &#xD;&#xA;&gt; See the DSP API to capture a continual stream of wave data as it&#xD;&#xA;&gt; plays, or see Sound::lock /&#xD;&#xA;&gt; Sound::unlock if you want to simply&#xD;&#xA;&gt; display the waveform of a sound.&#xD;&#xA;&#xD;&#xA;Unfortunately, the Sound::lock and unlock functions are pretty confusing,  at least to me.&#xD;&#xA;&#xD;&#xA;Lock:&#xD;&#xA;&#xD;&#xA;    FMOD_RESULT Sound::lock(&#xD;&#xA;      unsigned int  offset, &#xD;&#xA;      unsigned int  length, &#xD;&#xA;      void **  ptr1, &#xD;&#xA;      void **  ptr2, &#xD;&#xA;      unsigned int *  len1, &#xD;&#xA;      unsigned int *  len2&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&gt;    offset&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Offset in bytes to the position you want to lock in the sample buffer.&#xD;&#xA;&gt;      &#xD;&#xA;&gt;    length&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Number of bytes you want to lock in the sample buffer. &#xD;&#xA;&gt;    &#xD;&#xA;&gt;    ptr1&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Address of a pointer that will point to the first part of the locked&#xD;&#xA;&gt; data. &#xD;&#xA;&gt;     &#xD;&#xA;&gt;    ptr2&#xD;&#xA;&gt;     &#xD;&#xA;&gt;    Address of a pointer that will point to the second part of the locked&#xD;&#xA;&gt; data. This will be null if the data&#xD;&#xA;&gt; locked hasn't wrapped at the end of&#xD;&#xA;&gt; the buffer. &#xD;&#xA;&gt;     &#xD;&#xA;&gt;    len1&#xD;&#xA;&gt;     &#xD;&#xA;&gt;    Length of data in bytes that was locked for ptr1 &#xD;&#xA;&gt;    &#xD;&#xA;&gt;    len2&#xD;&#xA;&gt;     &#xD;&#xA;&gt;    Length of data in bytes that was locked for ptr2. This will be 0 if the&#xD;&#xA;&gt; data locked hasn't wrapped at the end&#xD;&#xA;&gt; of the buffer.&#xD;&#xA;&#xD;&#xA;Unlock:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    FMOD_RESULT Sound::unlock(&#xD;&#xA;      void *  ptr1, &#xD;&#xA;      void *  ptr2, &#xD;&#xA;      unsigned int  len1, &#xD;&#xA;      unsigned int  len2&#xD;&#xA;    );&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;&gt;    ptr1&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Pointer to the 1st locked portion of sample data, from Sound::lock. &#xD;&#xA;&gt;    &#xD;&#xA;&gt;    ptr2&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Pointer to the 2nd locked portion of sample data, from Sound::lock. &#xD;&#xA;&gt;    &#xD;&#xA;&gt;    len1&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Length of data in bytes that was locked for ptr1 &#xD;&#xA;&gt;    &#xD;&#xA;&gt;    len2&#xD;&#xA;&gt;    &#xD;&#xA;&gt;    Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sorry if this question looks sloppy. I'm just trying to give out as much information on the topic that's necessary.&#xD;&#xA;&#xD;&#xA;But as I said, my goal is to by able to get the wave data of the beginning of a song to the end.&#xD;&#xA;&#xD;&#xA;Thanks in advance, and any help or info will be apprectiated.&#xD;&#xA;" />
  <row Id="11276" PostHistoryTypeId="2" PostId="5680" RevisionGUID="6df92d3c-b76c-4de0-b305-cd46d1bead62" CreationDate="2010-11-17T06:51:52.110" UserId="51" Text="You should plan... as much as you need to.  What are your goals with the planning?  Usability? Edge case testing? Fun factor?  Who is your audience for these plans?  Is this something you're going to implement yourself later or are you going to be handing this off to someone else?  &#xD;&#xA;&#xD;&#xA;My recommendation is to look at it from the perspective of the user.  What actions can they take at any given point in time.  Maybe draw out some storyboards.  &#xD;&#xA;&#xD;&#xA;If you need to put some more specific thoughts down on paper, sure start doing that.  But you should make your system flexible and data-driven enough that you shouldn't necessarily have to sit down and say &quot;spell X does Y damage&quot; before you start making the system since that would probably be best determined through playtesting." />
  <row Id="11277" PostHistoryTypeId="2" PostId="5681" RevisionGUID="1779d78f-189b-4d0d-a730-156222f444bc" CreationDate="2010-11-17T07:52:11.403" UserId="20" Text="The way I read it, the last four parameters are *output parameters*. So you basically pass in 4 variables of the requested type and after the function has finished, these are populated with the data you need.&#xD;&#xA;&#xD;&#xA;What you do is something along these lines:&#xD;&#xA;&#xD;&#xA;    void  *pointer1;&#xD;&#xA;    void  *pointer2;&#xD;&#xA;    unsigned int length1;&#xD;&#xA;    unsigned int length2;&#xD;&#xA;&#xD;&#xA;    // lock the buffer&#xD;&#xA;    mySound-&gt;lock(0, lengthOfYourSoundInBytes, &amp;pointer1, &amp;pointer2, &amp;length1, &amp;length2);&#xD;&#xA;&#xD;&#xA;    // when we're here, pointer1, pointer2, length1 and length2 will be populated.&#xD;&#xA;    // do something with the sound data found in pointer1.&#xD;&#xA;    // the sound data will have a length stored in length1&#xD;&#xA;    &#xD;&#xA;    // unlock the buffer once you're done&#xD;&#xA;    mySound-&gt;unlock(pointer1, pointer2, length1, length2);&#xD;&#xA;&#xD;&#xA;From my understanding you won't need `pointer2` and `length2` at all.&#xD;&#xA;The only thing you'll have to figure out is the length of your sound data (see `lengthOfYourSoundInBytes` above). Once you locked the buffer, you'll get a pointer to the data and you can do whatever you want with it." />
  <row Id="11278" PostHistoryTypeId="2" PostId="5682" RevisionGUID="7e89cb14-deaa-4b8b-a829-15df8b3bbdad" CreationDate="2010-11-17T08:19:53.450" UserId="20" Text="A*, BFS or DFS all search graphs. It doesn't have to be a graph with equidistant nodes as in a 2D Grid. It could also be a graph like in the following image (from Wikipedia):&#xD;&#xA;&#xD;&#xA;![map of Germany graph][1]&#xD;&#xA;&#xD;&#xA;Now imagine that the nodes of that graph lie in a 3D environment. They would have a position (X,Y,Z) and using that you can also calculate the distance to the neighbor nodes, which in turn can be used for the heuristic function in A* (for speed, simply use the squared length and skip the sqrt). Of course the graph can also be changed dynamically. &#xD;&#xA;&#xD;&#xA;Maybe you'll even have to use several graphs. One that just models connections between rooms (fast calculation of: can I get from here to this other room?) and one fine-grained graph for the actual movement.&#xD;&#xA;There are also 3D &quot;flood-fill&quot; algorithms that can create such a graph for you, given some 3D data. These are rather CPU heavy though and you shouldn't run them during game.&#xD;&#xA;&#xD;&#xA;For dynamic objects, I would probably use [steering behaviors][2] to avoid them (eg. a barrel or a chair in the way). There's usually no need to update the graph for objects like this. &#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/cCRFi.png&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/" />
  <row Id="11279" PostHistoryTypeId="4" PostId="5675" RevisionGUID="23e5cdc4-c0d1-42d4-ab8c-65c9fb88779b" CreationDate="2010-11-17T08:58:20.033" UserId="744" Comment="edited tags; edited title" Text="How do I apply A* to a complex and dynamic 3D environment?" />
  <row Id="11280" PostHistoryTypeId="6" PostId="5675" RevisionGUID="23e5cdc4-c0d1-42d4-ab8c-65c9fb88779b" CreationDate="2010-11-17T08:58:20.033" UserId="744" Comment="edited tags; edited title" Text="&lt;3d&gt;&lt;ai&gt;&lt;path-finding&gt;" />
  <row Id="11281" PostHistoryTypeId="2" PostId="5683" RevisionGUID="6eaf5f89-9212-401b-8168-cbb984c3b232" CreationDate="2010-11-17T09:20:30.087" UserId="3418" Text="I need to move  cliping plane of OpenGL and **begin the cliping from that position**.&#xD;&#xA;The default location of cliping plane is (0,0,0), so if my model is far enough from the center of coordinate system it immediately disappears, as I begin the clipping, cause it apperas in the half clipped by the plane that just moved from (0,0,0) point. So whjat I need is : &#xD;&#xA;&#xD;&#xA;1. Create a cliping plane0&#xD;&#xA;2. Translate it to the point I want (normally near the model surface I want to clip)&#xD;&#xA;3. Begin the cliping from **that** point and **not** from (0,0,0).&#xD;&#xA;&#xD;&#xA;How can I achieve my goal ? &#xD;&#xA;Thank you in advance." />
  <row Id="11282" PostHistoryTypeId="1" PostId="5683" RevisionGUID="6eaf5f89-9212-401b-8168-cbb984c3b232" CreationDate="2010-11-17T09:20:30.087" UserId="3418" Text="OpenGL cliping plane" />
  <row Id="11283" PostHistoryTypeId="3" PostId="5683" RevisionGUID="6eaf5f89-9212-401b-8168-cbb984c3b232" CreationDate="2010-11-17T09:20:30.087" UserId="3418" Text="&lt;opengl&gt;" />
  <row Id="11284" PostHistoryTypeId="5" PostId="5683" RevisionGUID="173eec47-e4b7-4164-9b9d-3c5ce98a7730" CreationDate="2010-11-17T09:26:25.537" UserId="3418" Comment="edited body" Text="I need to move  cliping plane of OpenGL and **begin the cliping from that position**.&#xD;&#xA;The default location of cliping plane is (0,0,0), so if my model is far enough from the center of coordinate system it immediately disappears, as I begin the clipping, cause it apperas in the half clipped by the plane that just moved from (0,0,0) point. So what I need is : &#xD;&#xA;&#xD;&#xA;1. Create a cliping plane0&#xD;&#xA;2. Translate it to the point I want (normally it's near model surface I want to clip)&#xD;&#xA;3. Begin the cliping from **that** point and **not** from (0,0,0).&#xD;&#xA;&#xD;&#xA;How can I achieve my goal ? &#xD;&#xA;Thank you in advance." />
  <row Id="11285" PostHistoryTypeId="2" PostId="5684" RevisionGUID="8f01ab7b-cfa4-492b-8546-81a818a96b7c" CreationDate="2010-11-17T09:44:53.097" UserId="3212" Text="I have developed some small games which are my own creation and each is having different gameplay. Now i want to showcase it using the internet. But I'am a bit worried about &#xD;&#xA;the concept getting copied. How can i protect the Game concepts and the Game developed by me? &#xD;&#xA;&#xD;&#xA;Also if i have to openly display the Game Code to the open source community. How to keep the credit of your own work on the internet?&#xD;&#xA;&#xD;&#xA;Any help,guideline will be helpfull!" />
  <row Id="11286" PostHistoryTypeId="1" PostId="5684" RevisionGUID="8f01ab7b-cfa4-492b-8546-81a818a96b7c" CreationDate="2010-11-17T09:44:53.097" UserId="3212" Text="How to protect a developed game?" />
  <row Id="11287" PostHistoryTypeId="3" PostId="5684" RevisionGUID="8f01ab7b-cfa4-492b-8546-81a818a96b7c" CreationDate="2010-11-17T09:44:53.097" UserId="3212" Text="&lt;web&gt;&lt;open-source&gt;&lt;legal&gt;&lt;indie&gt;" />
  <row Id="11288" PostHistoryTypeId="2" PostId="5685" RevisionGUID="335dd122-4325-4adf-829a-39accd70475a" CreationDate="2010-11-17T09:53:58.983" UserId="1251" Text="I am a 2D Game Programmer.Some programming languages which I am good at are C,Java ,C#. I also know Actionscript 2.0,3.0 and some javascript.&#xD;&#xA;I'm interested in learning 3D Game programming. So far from the research I have accumulated by googling and reading different game development forums and articles. I've noticed that most programmers tend to prefer C++.Also in an [online game programming teaching course][1] I noticed they prefer to teach C++ and Visual C++ as the starting course. The reason I am asking this question since I would like to know the &quot;strength&quot; difference of Visual C++, C# and Java for 3d game programming. &#xD;&#xA;&#xD;&#xA;Also include links to **good** 3d game programming articles for the already 2d game programmer.&#xD;&#xA;&#xD;&#xA;P.S : IMHO , I also find Visual C++ to be cryptic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameinstitute.com" />
  <row Id="11289" PostHistoryTypeId="1" PostId="5685" RevisionGUID="335dd122-4325-4adf-829a-39accd70475a" CreationDate="2010-11-17T09:53:58.983" UserId="1251" Text="Is Visual C++ &quot;still&quot; preferred in game development?" />
  <row Id="11290" PostHistoryTypeId="3" PostId="5685" RevisionGUID="335dd122-4325-4adf-829a-39accd70475a" CreationDate="2010-11-17T09:53:58.983" UserId="1251" Text="&lt;c++&gt;&lt;3d&gt;&lt;game-industry&gt;" />
  <row Id="11291" PostHistoryTypeId="2" PostId="5686" RevisionGUID="07105bad-3bac-4b9a-8e16-8616109b764d" CreationDate="2010-11-17T10:04:13.317" UserId="2188" Text="You just don't.&#xD;&#xA;&#xD;&#xA;1) try to be able to sell it, and if you really put a lot of effort on it, people will have a hard time re-implementing its &quot;concept&quot;.&#xD;&#xA;&#xD;&#xA;2) if you release with a license such as GPL, credits will not be usually a problem. Someone could still steal your code, and if they do you could sue if you knew (but you won't know). The [EFF][1] might help.&#xD;&#xA;&#xD;&#xA;I'm wondering how did you come up with two opposite questions such as these, I guess you're a bit confused. If you release the game open source, and it's any good, derivate games will almost automatically happen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.eff.org/" />
  <row Id="11292" PostHistoryTypeId="2" PostId="5687" RevisionGUID="0d9b655c-955a-4806-8704-b02803a09ace" CreationDate="2010-11-17T10:14:31.920" UserId="2188" Text="This &quot;unique&quot; you're talking about is just plain foolishness.&#xD;&#xA;&#xD;&#xA;Let's say you somehow manage to build this game (you won't, as wkerslake [pointed out][1]).&#xD;&#xA;&#xD;&#xA;1) it doesn't scale. If your player base grows, you'll have to hire more and more artists just to create tons of &quot;unique&quot; arts. Let alone the time the design team will spend creating the stats and name for these objects.&#xD;&#xA;&#xD;&#xA;2) if you do all this work for just a single unique item, *of course* it means that you expect to gain from selling it enough money to repay its cost. Uh, no, you're giving them for free. WTF, lol.&#xD;&#xA;&#xD;&#xA;3) if a player stops playing, the unique items he has are &quot;lost&quot; to the game. And since the game is supposedly played by tons of people, most people won't ever see most items. This smells of pointless to me. You have assets: use them! Don't hide them!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5648/could-this-mmorpg-project-model-work/5673#5673" />
  <row Id="11293" PostHistoryTypeId="5" PostId="5687" RevisionGUID="1578206d-0e98-466a-983f-53c002976d64" CreationDate="2010-11-17T10:23:20.977" UserId="2188" Comment="deleted 3 characters in body" Text="This &quot;unique&quot; you're talking about is just plain foolishness.&#xD;&#xA;&#xD;&#xA;Let's say you somehow manage to build this game (you won't, as wkerslake [pointed out][1]).&#xD;&#xA;&#xD;&#xA;1) it doesn't scale. If your player base grows, you'll have to hire more and more artists just to create tons of &quot;unique&quot; arts. Add up the time the design team will spend creating the stats and name for these objects.&#xD;&#xA;&#xD;&#xA;2) if you do all this work for just a single unique item, *of course* it means that you expect to gain from selling it enough money to repay its cost. Uh, no, you're giving them for free. WTF, lol.&#xD;&#xA;&#xD;&#xA;3) if a player stops playing, the unique items he has are &quot;lost&quot; to the game. And since the game is supposedly played by tons of people, most people won't ever see most items. This smells of pointless to me. You have assets: use them! Don't hide them!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5648/could-this-mmorpg-project-model-work/5673#5673" />
  <row Id="11294" PostHistoryTypeId="2" PostId="5688" RevisionGUID="aff2ac33-82f0-4f33-a7da-3df45ee41e7f" CreationDate="2010-11-17T10:41:41.870" UserId="1091" Text="Yes, C++ is the language used most often (though some people do still use C).&#xD;&#xA;&#xD;&#xA;There are numerous reasons for this. Sheer momentum is one - it's simply the language that has been used for years, a lot of tech already exists and people are comfortable with it, so changing is not going to happen overnight.&#xD;&#xA;&#xD;&#xA;Then there is the issue of control. Game developers are control freaks, and we like to know everything that is going on in our code. C++ gives us that control, C# and Java (to pick on the two alternatives you mention) take control away. In many ways that might be a good thing, but game coders don't like it :)&#xD;&#xA;&#xD;&#xA;Finally there's the simple practical issue that the SDKs for various platforms are very C++ centric. Using another language inevitably involves writing wrappers, cross-compiling down to VMs, and possibly (in the case of some console development) it's not allowed by the platform holder (they really don't like people doing JIT compiling, for a start).&#xD;&#xA;" />
  <row Id="11295" PostHistoryTypeId="2" PostId="5689" RevisionGUID="219de1fc-c414-4dca-b43c-c5d1385469cc" CreationDate="2010-11-17T11:00:25.463" UserId="892" Text="I'm working on a small-ish 2d fixed shoot 'em up for iPhone.&#xD;&#xA;&#xD;&#xA;I have a master Game object that stores lives, score, current level, etc...&#xD;&#xA;&#xD;&#xA;The game will have some other persistent attributes like Music and Sound mute state, difficulty level (easy, medium, hard).&#xD;&#xA;&#xD;&#xA;Should I put those attributes in the Game class or should they be on their own?&#xD;&#xA;&#xD;&#xA;What's the rule of thumb to decide how to partition attributes among classes?" />
  <row Id="11296" PostHistoryTypeId="1" PostId="5689" RevisionGUID="219de1fc-c414-4dca-b43c-c5d1385469cc" CreationDate="2010-11-17T11:00:25.463" UserId="892" Text="Should I store game settings in my game data class?" />
  <row Id="11297" PostHistoryTypeId="3" PostId="5689" RevisionGUID="219de1fc-c414-4dca-b43c-c5d1385469cc" CreationDate="2010-11-17T11:00:25.463" UserId="892" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;iphone&gt;" />
  <row Id="11298" PostHistoryTypeId="2" PostId="5690" RevisionGUID="dc371b7d-8e99-4659-82f4-850d41970305" CreationDate="2010-11-17T11:12:38.890" UserId="2188" Text="You want to read [Aggregate Objects via Components][1] and [Game Object Construction Rabbit Hole][2], from the **Replica Island** blog.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://replicaisland.blogspot.com/2009/09/aggregate-objects-via-components.html&#xD;&#xA;  [2]: http://replicaisland.blogspot.com/2010/11/game-object-construction-rabbit-hole.html" />
  <row Id="11299" PostHistoryTypeId="2" PostId="5691" RevisionGUID="fd214d6d-d0d9-412b-8f54-c79dac439c12" CreationDate="2010-11-17T12:55:47.477" UserId="3212" Text="I dig for some information on the question i asked and got some more info on how to protect the Game Code and Game Assests. &#xD;&#xA;&#xD;&#xA;**Copyright** is the best way to protect the code/art assests.It clearly protects the game code and taking even a portion of the game code and using it in some other context is a copyright violation if it is not your material. However, it is more the code as a whole that is protected and not simply the individual pieces. If one line of code is identical in two separate games, there is unlikely to be a violation. If entire chunks are the same throughout, there could be a possible lawsuit.&#xD;&#xA;&#xD;&#xA;Read more: Video Game Copyright Laws | eHow.com http://www.ehow.com/list_6011584_video-game-copyright-laws.html#ixzz15XlkEYcb&#xD;&#xA;&#xD;&#xA;Also, as i wanted to what exactly can be copyrighted, i got clear idea of what and how to copyright: http://www.copyright.in/register_copyright_deposit.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11300" PostHistoryTypeId="2" PostId="5692" RevisionGUID="1c52b7df-7230-4ada-b8ad-a4efcdced988" CreationDate="2010-11-17T13:24:37.777" UserId="1047" Text="Hey Guys, i want to make a 2d game. I know C++, C#, javascript.&#xD;&#xA;&#xD;&#xA;I want my game to run in a browser so a user doesnt need to run an exe. I want the game to be multiplayer so it needs server communication (and not do it through AJAX or p2p). So what are my options? From what i know unity3d, flash, silverlight and java can run in the browser but can they communicate efficiently to the server? Are there any known problems doing a multiplayer browser 2d game with any of these tech? I hear unity isnt easy/overkill for 2d but i get a language i am familiar with and more power?&#xD;&#xA;" />
  <row Id="11301" PostHistoryTypeId="1" PostId="5692" RevisionGUID="1c52b7df-7230-4ada-b8ad-a4efcdced988" CreationDate="2010-11-17T13:24:37.777" UserId="1047" Text="Client side code in browser with server communication?" />
  <row Id="11302" PostHistoryTypeId="3" PostId="5692" RevisionGUID="1c52b7df-7230-4ada-b8ad-a4efcdced988" CreationDate="2010-11-17T13:24:37.777" UserId="1047" Text="&lt;2d&gt;&lt;multiplayer&gt;&lt;client-server&gt;" />
  <row Id="11303" PostHistoryTypeId="2" PostId="5693" RevisionGUID="02fdeab2-8fd9-481a-a307-8ad6168b8398" CreationDate="2010-11-17T13:49:34.837" UserId="1047" Text="Another thought to my [last question](http://gamedev.stackexchange.com/questions/5692/client-side-code-in-browser-with-server-communication). If i were to do a client/server game with unity3d would i be able to do serverside programming with unity? if not can i use C# .net? if not then is there some sort of package or lib i can use with C++? is the communication just raw sockets?" />
  <row Id="11304" PostHistoryTypeId="1" PostId="5693" RevisionGUID="02fdeab2-8fd9-481a-a307-8ad6168b8398" CreationDate="2010-11-17T13:49:34.837" UserId="1047" Text="Can i do server side programming with unity?" />
  <row Id="11305" PostHistoryTypeId="3" PostId="5693" RevisionGUID="02fdeab2-8fd9-481a-a307-8ad6168b8398" CreationDate="2010-11-17T13:49:34.837" UserId="1047" Text="&lt;unity&gt;&lt;client-server&gt;" />
  <row Id="11306" PostHistoryTypeId="2" PostId="5694" RevisionGUID="c469911a-b74b-4d8f-b465-aff4989d9d35" CreationDate="2010-11-17T13:57:29.770" UserId="469" Text="According  to the law you actually cannot do that.&#xD;&#xA;&#xD;&#xA;You want to protect the game rules, rules are inherently ideas, and ideas cannot be protected, only your text can be copyrighted (code and GDD), the name trademarked, and that is it.&#xD;&#xA;&#xD;&#xA;The patent law says it is illegal to patent ideas, including software and game rules (unfortunately patent offices ignore this, so yes, you CAN try to patent your game, and try to enforce the patent, but it may, or may not work).&#xD;&#xA;&#xD;&#xA;But that is for obvious reasons, if your concept is THAT great, then it is good for humanity to it be copied, it is up to you to get money and credit with it (you can for example create a exceptional game, and everyone will call the genre as &quot;yourgame-clone&quot; or you can name the thing after yourself, like Perlin Noise...).&#xD;&#xA;&#xD;&#xA;Ever tought of what would happen if id Software could prevent anyone else from making FPS, and EA from anyone making RTS? Or the MUD people preventing anyone from making MMO?" />
  <row Id="11307" PostHistoryTypeId="2" PostId="5695" RevisionGUID="35f13c22-f82c-4fd5-a5a8-d1a60d1df22f" CreationDate="2010-11-17T14:01:45.577" UserId="953" Text="Don't worry about your concept getting copied wholesale.  It's much more work implementing a concept than coming up with one, and anyone who can put together a finished product will either have ideas of their own, or will change the game enough that it becomes different.  If your game is awesome, then it'll be really hard to copy it and make a version that's better/more popular, and if it isn't awesome, people are unlikely to copy it.&#xD;&#xA;&#xD;&#xA;Art and engineering are built on the shoulders of giants.  You're surely copying some concepts from games you've played, and people will (if you're lucky) borrow a few things from your game to make their own.  Don't worry about copying at all." />
  <row Id="11309" PostHistoryTypeId="2" PostId="5696" RevisionGUID="b37a991b-8097-4295-874b-54757dec90a1" CreationDate="2010-11-17T14:09:13.823" UserId="1214" Text="Question: Is it possible to access the same leaderboards and achievements with GC from 2 versions of a game (i.e. 2 differents SKUs, one for iPhone/iPod and another for iPad. Where both are actually the same game in terms of game modes and features. For instance to be able to have different pricing)&#xD;&#xA;&#xD;&#xA;Or is this impossible and there is no way around having 2 separate Leaderboards, Achievements. One for each SKU ?&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;  &#xD;&#xA;" />
  <row Id="11310" PostHistoryTypeId="1" PostId="5696" RevisionGUID="b37a991b-8097-4295-874b-54757dec90a1" CreationDate="2010-11-17T14:09:13.823" UserId="1214" Text="Apple Game Center - Sharing Data between 2 SKUs possible or not?" />
  <row Id="11311" PostHistoryTypeId="3" PostId="5696" RevisionGUID="b37a991b-8097-4295-874b-54757dec90a1" CreationDate="2010-11-17T14:09:13.823" UserId="1214" Text="&lt;iphone&gt;&lt;ipad&gt;&lt;game-center&gt;" />
  <row Id="11312" PostHistoryTypeId="2" PostId="5697" RevisionGUID="a4f7d105-1c67-43bb-893c-a2bece01d364" CreationDate="2010-11-17T14:16:46.407" UserId="2815" Text="This is a relative question and I'd say it depends on how you feel would be easier to maintain.  If your game would grow 2, 3 or 10 times its size.  Would it get lost outside the Game object?  Or would it be lost inside the Game object?  You just have to put it where you feel it belong, I don't think there are any rule of thumb here." />
  <row Id="11313" PostHistoryTypeId="5" PostId="5696" RevisionGUID="1e8c6ab3-8153-46a5-bd82-ca9d5346e78d" CreationDate="2010-11-17T14:29:36.550" UserId="1214" Comment="added 61 characters in body" Text="Question: Is it possible to access the same leaderboards and achievements via GC from 2 versions of a game (i.e. 2 different SKUs, one for iPhone/iPod and another for iPad. Where both are actually the same game in terms of game modes and features. For instance to be able to have different pricing)&#xD;&#xA;&#xD;&#xA;Or: is this impossible and there is no other way than having 2 separate Leaderboards, Achievements -or- one universal binary.&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;*edit: typo and added remark about universal binary&#xD;&#xA;" />
  <row Id="11314" PostHistoryTypeId="2" PostId="5698" RevisionGUID="51d91870-f20b-4289-b077-232364a47701" CreationDate="2010-11-17T14:44:00.883" UserId="1477" Text="You can using [this][1]&#xD;&#xA;&#xD;&#xA;[Master server][2] can facilitate connecting to your server.&#xD;&#xA;&#xD;&#xA;Which would be most useful for fps or rts style games where players connect to each other to play a game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/ScriptReference/Network.html&#xD;&#xA;  [2]: http://unity3d.com/support/documentation/Components/net-MasterServer.html" />
  <row Id="11315" PostHistoryTypeId="6" PostId="5157" RevisionGUID="f5ae229b-b669-47d6-b07e-2fa83d219041" CreationDate="2010-11-17T14:50:07.377" UserId="2290" Comment="edited tags" Text="&lt;web&gt;&lt;open-source&gt;" />
  <row Id="11316" PostHistoryTypeId="2" PostId="5699" RevisionGUID="64aeccbd-7509-4818-86fa-42155ba12181" CreationDate="2010-11-17T15:14:36.417" UserId="51" Text="Unity's built-in networking is RakNet.  As far as I know, inside Unity it's only really for peer to peer games (i.e. you can't really run a standalone server).&#xD;&#xA;&#xD;&#xA;Most web games I know of that use Unity and have multiplayer use &lt;a href=&quot;http://exitgames.com/Photon&quot;&gt;Exit Games' Photon&lt;/a&gt;.  Paradise Paintball uses it.  So does Atmosphir.  You write server code in .NET that gets compiled to a DLL and run with their server software.  There's a client DLL you can just drop into Unity along with your own specific code.  &#xD;&#xA;&#xD;&#xA;You can't distribute the server since it's licensed per machine you're running on, but if you just want clients to be able to connect to your servers then it's a proven solution for that." />
  <row Id="11317" PostHistoryTypeId="2" PostId="5700" RevisionGUID="87504b4c-b3e3-458b-863a-86226dad8498" CreationDate="2010-11-17T15:21:00.233" UserId="51" Text="Honestly I'm just guessing here, but I'm pretty sure all the Game Center stuff is per app ID.  So if you have a regular and an HD version that use two different app IDs, you're probably SOL.  You'd more than likely have to make it a universal binary if you want your iPad and iPhone users competing." />
  <row Id="11318" PostHistoryTypeId="2" PostId="5701" RevisionGUID="b2fb43d6-ebf7-4c0f-9546-bcfda6d88904" CreationDate="2010-11-17T15:23:42.297" UserId="51" Text="It's all subjective, but consider the &lt;a href=&quot;http://www.c2.com/cgi/wiki?SingleResponsibilityPrinciple&quot;&gt;Single Responsibility Principle&lt;/a&gt; as a &quot;rule of thumb&quot;.  If you break them up now then you can potentially do things with the separate classes later without worrying about messing it up.  Maybe you'll want the game object to be deleted and recreated every level, and if you split them up you won't have to worry about the design needs of one affecting the other." />
  <row Id="11319" PostHistoryTypeId="5" PostId="5685" RevisionGUID="7b91ce45-9d5c-4b9b-b4a5-8c003a2e02c9" CreationDate="2010-11-17T15:31:51.833" UserId="51" Comment="made question clearer" Text="I am a 2D Game Programmer.Some programming languages which I am good at are C,Java ,C#. I also know Actionscript 2.0,3.0 and some javascript.&#xD;&#xA;I'm interested in learning 3D Game programming. So far from the research I have accumulated by googling and reading different game development forums and articles. I've noticed that most programmers tend to prefer C++.Also in an [online game programming teaching course][1] I noticed they prefer to teach C++ and Visual C++ as the starting course. The reason I am asking this question since I would like to know the &quot;strength&quot; difference of C++, C# and Java for 3d game programming. &#xD;&#xA;&#xD;&#xA;Also include links to **good** 3d game programming articles for the already 2d game programmer.&#xD;&#xA;&#xD;&#xA;P.S : IMHO , I also find C++ to be cryptic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameinstitute.com" />
  <row Id="11320" PostHistoryTypeId="4" PostId="5685" RevisionGUID="7b91ce45-9d5c-4b9b-b4a5-8c003a2e02c9" CreationDate="2010-11-17T15:31:51.833" UserId="51" Comment="made question clearer" Text="Is C++ &quot;still&quot; preferred in game development?" />
  <row Id="11321" PostHistoryTypeId="5" PostId="5683" RevisionGUID="90ba82bf-71ad-4a49-8f48-3c45743e1df3" CreationDate="2010-11-17T15:34:58.557" UserId="51" Comment="deleted 26 characters in body; edited title" Text="I need to move  clipping plane of OpenGL and **begin the clipping from that position**.&#xD;&#xA;The default location of clipping plane is (0,0,0), so if my model is far enough from the center of coordinate system it immediately disappears, as I begin the clipping, cause it appears in the half clipped by the plane that just moved from (0,0,0) point. So what I need is : &#xD;&#xA;&#xD;&#xA;1. Create a clipping plane&#xD;&#xA;2. Translate it to the point I want (normally it's near model surface I want to clip)&#xD;&#xA;3. Begin the clipping from **that** point and **not** from (0,0,0).&#xD;&#xA;&#xD;&#xA;How can I achieve my goal ? &#xD;&#xA;" />
  <row Id="11322" PostHistoryTypeId="4" PostId="5683" RevisionGUID="90ba82bf-71ad-4a49-8f48-3c45743e1df3" CreationDate="2010-11-17T15:34:58.557" UserId="51" Comment="deleted 26 characters in body; edited title" Text="OpenGL clipping plane" />
  <row Id="11323" PostHistoryTypeId="2" PostId="5702" RevisionGUID="6166ab01-5bf5-495b-88b0-a2cdaa86f483" CreationDate="2010-11-17T15:52:36.190" UserId="1636" Text="As of now I've decided to prototype with some of the stuff from [here][1]. Yes I know their rips from commercial games but I don't plan on distribution of any kind with those sprites. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.spriters-resource.com/" />
  <row Id="11324" PostHistoryTypeId="2" PostId="5703" RevisionGUID="3b5182b9-dc5f-4a72-b797-72d155dcf20d" CreationDate="2010-11-17T16:29:46.860" UserId="3361" Text="C++ is still preferred as you can see on pretty much any publication on the topic of game development.  I personally am currently using C for my diving into game development for the simple reason that the C++ code I write abuses templating features, uses RAII extensively, dynamic memory allocation and other things that you just should not do in game code from what I have seen so far.&#xD;&#xA;&#xD;&#xA;Sticking to C forces me to be minimalistic and think about what I'm doing.  It can be harder at times when you have to reimplement something the STL gives you for free, but on the upside I feel I write cleaner code and have a better time debugging that thing." />
  <row Id="11325" PostHistoryTypeId="2" PostId="5704" RevisionGUID="df32b1aa-9f35-4c50-94c2-73f245a12045" CreationDate="2010-11-17T16:33:14.907" UserId="3361" Text="I currently went just with ordering my vbos by distance to the camera.  This seems to help the most.  Unless I fail to understand occlusion queries it slows down my code and gives weird results instead of actually helping.  So unless I see some more performance issues along the way, I stick with what I have." />
  <row Id="11326" PostHistoryTypeId="2" PostId="5705" RevisionGUID="9260b1b9-4cf4-493e-a814-07007db40662" CreationDate="2010-11-17T16:46:35.130" UserId="2777" Text="There is a very interesting thread on the subject here:&#xD;&#xA;http://tech.dir.groups.yahoo.com/group/gameaudiopro/message/15158&#xD;&#xA;&#xD;&#xA;They discuss Sonory, Physical Modeling, Granular Synthesis, Pitch shifting, etc.  Also, they briefly explain the tech in Need For Speed." />
  <row Id="11329" PostHistoryTypeId="2" PostId="5707" RevisionGUID="c1b8864c-ad7d-451f-abbc-3ecbe5368260" CreationDate="2010-11-17T17:01:22.077" UserId="3171" Text="Fonts from [Canada Type][1] have a reasonable license, and I plan on using at least one of theirs in my next iPhone game.&#xD;&#xA;&#xD;&#xA;  [1]: http://new.myfonts.com/foundry/Canada_Type/" />
  <row Id="11330" PostHistoryTypeId="2" PostId="5708" RevisionGUID="c7f6c876-c29a-4de5-8f74-90c1e4ad05a7" CreationDate="2010-11-17T17:40:39.547" UserDisplayName="Candide" Text="Many years ago I did some programming in TurboPascal (on DOS!), but have not programmed since. Since retiring, I have &quot;invented&quot; a few solitaire games that I have given to people who sell solitaire collections. Recently I've invented a game that is different enough from existing solitaires that it does not &quot;fit&quot; into these collection packages. I would have no difficulty writing a simple program to do the job in TP, but that is no longer an option. I purchased BlitzPlus, but would like some help getting started. I hate the idea of reinventing the wheel; ie, learning from scratch how to shuffle decks, assign graphic files to cards in the program, etc, so, ideally, I'd like some basic source code from a very basic (ie, nothing fancy required) solitaire program, but, if necessary, would start from just tutorials on some of the procedures likely to be required. As I said, I've already purchased BlitzPlus, but would be willing to use some other language if that would be better or offer more tutorial assistance. Any help greatly appreciated." />
  <row Id="11331" PostHistoryTypeId="1" PostId="5708" RevisionGUID="c7f6c876-c29a-4de5-8f74-90c1e4ad05a7" CreationDate="2010-11-17T17:40:39.547" UserDisplayName="Candide" Text="Learning to write a solitaire game" />
  <row Id="11332" PostHistoryTypeId="3" PostId="5708" RevisionGUID="c7f6c876-c29a-4de5-8f74-90c1e4ad05a7" CreationDate="2010-11-17T17:40:39.547" UserDisplayName="Candide" Text="&lt;2d&gt;" />
  <row Id="11333" PostHistoryTypeId="6" PostId="5708" RevisionGUID="262d0c8a-4060-4ea8-9ee1-f771c41d86cb" CreationDate="2010-11-17T18:06:02.020" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;tutorials&gt;&lt;source-code&gt;&lt;card-game&gt;" />
  <row Id="11334" PostHistoryTypeId="2" PostId="5709" RevisionGUID="ed2da720-3dfc-4902-b2d3-c019422d02a1" CreationDate="2010-11-17T18:52:36.467" UserId="1562" Text="Even though not exactly an example, this discusses some DOs and DONTs of demo reels and portfolios for programming positions. It also discusses a few examples of existing portfolios and what was good about them and what wasn't.&#xD;&#xA;&#xD;&#xA;http://www.gamecareerguide.com/features/655/how_to_make_a_game_programming_.php" />
  <row Id="11335" PostHistoryTypeId="2" PostId="5710" RevisionGUID="b90e77cd-5482-4101-884a-7cc2d42fe425" CreationDate="2010-11-17T19:07:10.647" UserId="3431" Text="I believe Visual Studio C++ implementation is not that good. It has more syntax quirks than GNU C++ and in some benchmarking I've done using a matrix solver, Visual Studio's C++ was just as fast as C#. The IDE is nice tho, one of the best I've used but maybe [Eclipse](http://www.eclipse.org/callisto/c-dev.php) can do a comparable job.&#xD;&#xA;&#xD;&#xA;One of the best things about C++ is flexibility, you can program either at low level or high level, and it's template engine. Most static languages' _generics_ (like Java, C#, and others) are not capable of doing things C++ templates can." />
  <row Id="11336" PostHistoryTypeId="5" PostId="5710" RevisionGUID="0a595277-bad1-4af1-9236-d08db3ec9e57" CreationDate="2010-11-17T19:17:53.050" UserId="3431" Comment="added 906 characters in body" Text="I believe Visual Studio C++ implementation is not that good. It has more syntax quirks than GNU C++ and in some benchmarking I've done using a matrix solver, Visual Studio's C++ was just as fast as C#. The IDE is nice tho, one of the best I've used but maybe Eclipse with some extensions can do a comparable job.&#xD;&#xA;&#xD;&#xA;One of the best things about C++ is flexibility, you can program either at low level or high level, and it's template engine. Most static languages' _generics_ (like Java, C#, and others) are not capable of doing things C++ templates can.&#xD;&#xA;&#xD;&#xA;Another thing is portability, good C++ code can be cross-compiled to most platforms, specially using GNU C++ which compiles for lot's of different platforms. The drawback of this is that you need to build a specific binary for a specific platform.&#xD;&#xA;&#xD;&#xA;But, for 3D game programming, C++'s strength is speed. There's no default graphics library. For most platforms you could use OpenGL which is pretty good and supported, except in those platforms from Microsoft like the xbox. Anyway, the concepts you'll use either in DirectX or OpenGL are basically the same, so you can learn to use the concepts and apply it in OpenGL and then port your knowledge to the DirectX way of doing things.&#xD;&#xA;&#xD;&#xA;[See this nice OpenGL tutorial from NeHe](http://nehe.gamedev.net/lesson.asp?index=01)&#xD;&#xA;&#xD;&#xA;Still, I don't get why you find C++ cryptic? It's almost the same base syntax as Java or C#. Are pointers your problem? Template syntax?&#xD;&#xA;&#xD;&#xA;God bless" />
  <row Id="11337" PostHistoryTypeId="5" PostId="5710" RevisionGUID="80894b55-c92f-4d62-b8c2-ebedc20ab13b" CreationDate="2010-11-17T19:26:05.210" UserId="3431" Comment="deleted 1 characters in body" Text="I believe Visual Studio C++ implementation is not that good. It has more syntax quirks than GNU C++ and in some benchmarking I've done using a matrix solver, Visual Studio's C++ was just as fast as C#. The IDE is nice tho, one of the best I've used but maybe Eclipse with some extensions can do a comparable job.&#xD;&#xA;&#xD;&#xA;One of the best things about C++ is flexibility, you can program either at low level or high level, and it's template engine. Most static languages' _generics_ (like Java, C#, and others) are not capable of doing things C++ templates can.&#xD;&#xA;&#xD;&#xA;Another thing is portability, good C++ code can be cross-compiled to most platforms, specially using GNU C++ which compiles for lots of different platforms. The drawback of this is that you need to build a specific binary for a specific platform.&#xD;&#xA;&#xD;&#xA;But, for 3D game programming, C++'s strength is speed. There's no default graphics library. For most platforms you could use OpenGL which is pretty good and supported, except in those platforms from Microsoft like the xbox. Anyway, the concepts you'll use either in DirectX or OpenGL are basically the same, so you can learn to use the concepts and apply it in OpenGL and then port your knowledge to the DirectX way of doing things.&#xD;&#xA;&#xD;&#xA;[See this nice OpenGL tutorial from NeHe](http://nehe.gamedev.net/lesson.asp?index=01)&#xD;&#xA;&#xD;&#xA;Still, I don't get why you find C++ cryptic? It's almost the same base syntax as Java or C#. Are pointers your problem? Template syntax?&#xD;&#xA;&#xD;&#xA;God bless" />
  <row Id="11338" PostHistoryTypeId="2" PostId="5711" RevisionGUID="2a53a27e-1d5b-4bf1-86a9-d97f25dd4235" CreationDate="2010-11-17T19:28:23.147" UserDisplayName="Toy Yoda" Text="I've been developing non-mobile apps for linux; mainly stuff like interpreters, compilers, database engines and business apps.&#xD;&#xA;&#xD;&#xA;I've been told that if I wanted to learn how to develop iPhone/iPad applications, I should buy a Mac since Apple has all it's development tools for iPhone/iPad on Mac.&#xD;&#xA;&#xD;&#xA;Now, what about Android phones / tablets?  Are the development tools better on Mac or PC?&#xD;&#xA;&#xD;&#xA;I need to buy a new laptop, and I would like to factor in mobile development in my choice of PC or Mac.  Thanks!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11339" PostHistoryTypeId="1" PostId="5711" RevisionGUID="2a53a27e-1d5b-4bf1-86a9-d97f25dd4235" CreationDate="2010-11-17T19:28:23.147" UserDisplayName="Toy Yoda" Text="Android and iPhone development" />
  <row Id="11340" PostHistoryTypeId="3" PostId="5711" RevisionGUID="2a53a27e-1d5b-4bf1-86a9-d97f25dd4235" CreationDate="2010-11-17T19:28:23.147" UserDisplayName="Toy Yoda" Text="&lt;mobile&gt;" />
  <row Id="11341" PostHistoryTypeId="2" PostId="5712" RevisionGUID="394aa928-bc5d-45c8-8b7c-19f32c49ae84" CreationDate="2010-11-17T19:35:24.747" UserId="14" Text="For android development the development tool is the same, it is the Eclipse IDE, and it is available across all three primary OS choices.&#xD;&#xA;&#xD;&#xA;You can find the relevant information about it here: http://developer.android.com/sdk/index.html&#xD;&#xA;&#xD;&#xA;and you will find eclipse here: http://www.eclipse.org/&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;Personally, I haven't noticed any major operating differences using Eclipse between any of my systems (Linux Laptop, Windows Desktop, Mac Laptop) outside of menus being placed in a few different places on the Mac." />
  <row Id="11342" PostHistoryTypeId="6" PostId="5711" RevisionGUID="4577bbf9-0595-43d6-84cc-2b103845c783" CreationDate="2010-11-17T19:35:41.483" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;&lt;android&gt;&lt;mobile&gt;" />
  <row Id="11343" PostHistoryTypeId="5" PostId="5711" RevisionGUID="4d0266a8-c4af-43bb-a158-17c3836e165e" CreationDate="2010-11-17T20:12:33.543" UserId="51" Comment="deleted 17 characters in body; edited title" Text="I've been developing non-mobile apps for linux; mainly stuff like interpreters, compilers, database engines and business apps.&#xD;&#xA;&#xD;&#xA;I've been told that if I wanted to learn how to develop iPhone/iPad applications, I should buy a Mac since Apple has all it's development tools for iPhone/iPad on Mac.&#xD;&#xA;&#xD;&#xA;Now, what about Android phones / tablets?  Are the development tools better on Mac or PC?&#xD;&#xA;&#xD;&#xA;I need to buy a new laptop, and I would like to factor in mobile development in my choice of PC or Mac.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="11344" PostHistoryTypeId="4" PostId="5711" RevisionGUID="4d0266a8-c4af-43bb-a158-17c3836e165e" CreationDate="2010-11-17T20:12:33.543" UserId="51" Comment="deleted 17 characters in body; edited title" Text="What platform is best for Android and iPhone development?" />
  <row Id="11345" PostHistoryTypeId="5" PostId="5525" RevisionGUID="ea627196-2785-4526-9bce-85160202b677" CreationDate="2010-11-17T20:12:45.653" UserId="3298" Comment="deleted 1 characters in body" Text="# Scheme&#xD;&#xA;&#xD;&#xA;Well, [guile](http://www.gnu.org/software/guile/) specifically.&#xD;&#xA;&#xD;&#xA;With guile you can have your own DSL (Domain Specific Language) just for your game. Once you get used to the parentheses and prefix notation, scheme is heaven to work with.&#xD;&#xA;&#xD;&#xA;If you're going to use guile in a serious game, I would wait a couple of months until the 2.0 release as that will include, IIRC, an Ecmascript interpreter as well as the current scheme one. You can also expect to see large speed improvements." />
  <row Id="11346" PostHistoryTypeId="2" PostId="5713" RevisionGUID="49d64027-f84b-41c8-b703-4a23340eced5" CreationDate="2010-11-17T20:23:00.887" UserId="370" Text="According to US [intellectual property law][1] you have 4 options:&#xD;&#xA;&#xD;&#xA; * [Copyright][2]  &#xD;&#xA;Doesn't apply to ideas only rendered works.  Game mechanics are an idea, no help here.  But your code, artwork, media, and game executable are protected by copyright by default.&#xD;&#xA; * [Trademark][3]  &#xD;&#xA;Doesn't apply to you, unless you trademarked RTS, MMORPG, or FPS or something like that.&#xD;&#xA; * [Tradesecret][4]  &#xD;&#xA;Your game will no longer be a secret the moment you share it.&#xD;&#xA; * [Patent][5]  &#xD;&#xA;You can't patent ideas.  You see this all the time with movie scripts.  A particularly talented writer brings an awesome idea to one of the big producers.  They like the idea but not the price.  They rip off the script's ideas with out copying the script (which is protected by copyright).  This is how come the movie industry seems to run in waves, eg The Prestige and The Illusionist.  &#xD;&#xA;**However**, software patent law is sufficiently fubar'd that you can patent ideas if you *&quot;limit&quot;* you claim to an implementation on particular hardware (eg a computer, any computer).  This is **EVIL**.&#xD;&#xA;&#xD;&#xA;Two examples of evil patents that are being up held and effecting the game industry.&#xD;&#xA;&#xD;&#xA;Direction arrows above cars are patented in racing games.  IE your racing you get knocked off course, the arrow points the way towards the course/goal.  Every game that uses this mechanic needs to pay royalties to EA.&#xD;&#xA;&#xD;&#xA;A ghost racer is time trials.  IE you're trying to beat your best time and you race against a ghost version of the current fastest time.  *Every* game that has this mechanic must pay royalties to Midway games.&#xD;&#xA;&#xD;&#xA;I repeat software patents are sick and evil.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Intellectual_property_law&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Copyright&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Trademark&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Trade_secret&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Patent&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Trademark&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Trade_secret" />
  <row Id="11347" PostHistoryTypeId="2" PostId="5714" RevisionGUID="2e80da9f-0384-4703-ac8f-b1c446c2976a" CreationDate="2010-11-17T20:23:54.880" UserId="47" Text="Think like how Bejeweled 2 does its Blitz mode where it connects to Facebook, pulls your friends names and their top scores for the week.  Are there any libraries, etc. that already help facilitate this process?  I would rather not re-invent the wheel if necessary." />
  <row Id="11348" PostHistoryTypeId="1" PostId="5714" RevisionGUID="2e80da9f-0384-4703-ac8f-b1c446c2976a" CreationDate="2010-11-17T20:23:54.880" UserId="47" Text="Integrating a leader board with FaceBook?" />
  <row Id="11349" PostHistoryTypeId="3" PostId="5714" RevisionGUID="2e80da9f-0384-4703-ac8f-b1c446c2976a" CreationDate="2010-11-17T20:23:54.880" UserId="47" Text="&lt;facebook&gt;&lt;leaderboards&gt;" />
  <row Id="11350" PostHistoryTypeId="5" PostId="5713" RevisionGUID="c3b86934-f6bd-4b5e-9334-2afd2ccf7f71" CreationDate="2010-11-17T20:29:17.543" UserId="370" Comment="Link for ghost racing" Text="According to US [intellectual property law][1] you have 4 options:&#xD;&#xA;&#xD;&#xA; * [Copyright][2]  &#xD;&#xA;Doesn't apply to ideas only rendered works.  Game mechanics are an idea, no help here.  But your code, artwork, media, and game executable are protected by copyright by default.&#xD;&#xA; * [Trademark][3]  &#xD;&#xA;Doesn't apply to you, unless you trademarked RTS, MMORPG, or FPS or something like that.&#xD;&#xA; * [Tradesecret][4]  &#xD;&#xA;Your game will no longer be a secret the moment you share it.&#xD;&#xA; * [Patent][5]  &#xD;&#xA;You can't patent ideas.  You see this all the time with movie scripts.  A particularly talented writer brings an awesome idea to one of the big producers.  They like the idea but not the price.  They rip off the script's ideas with out copying the script (which is protected by copyright).  This is how come the movie industry seems to run in waves, eg The Prestige and The Illusionist.  &#xD;&#xA;**However**, software patent law is sufficiently fubar'd that you can patent ideas if you *&quot;limit&quot;* you claim to an implementation on particular hardware (eg a computer, any computer).  This is **EVIL**.&#xD;&#xA;&#xD;&#xA;Two examples of evil patents that are being up held and effecting the game industry.&#xD;&#xA;&#xD;&#xA;[Direction arrows above cars are patented in racing games][6].  IE you're racing you get knocked off course, the arrow points the way towards the course/goal.  Every game that uses this mechanic needs to pay royalties to Sega of America.&#xD;&#xA;&#xD;&#xA;[A ghost racer is time trials][7].  IE you're trying to beat your best time and you race against a ghost version of the current fastest time.  *Every* game that has this mechanic must pay royalties to Midway games.&#xD;&#xA;&#xD;&#xA;I repeat software patents are sick and evil.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Intellectual_property_law&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Copyright&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Trademark&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Trade_secret&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Patent&#xD;&#xA;  [6]: http://www.carrferrell.com/attorneys-robert-yorio.php&#xD;&#xA;  [7]: http://www.gamasutra.com/view/feature/1489/hard_drivin_hard_bargainin_.php" />
  <row Id="11351" PostHistoryTypeId="5" PostId="5710" RevisionGUID="d91981b7-2721-4bcb-b829-c25761f7f63d" CreationDate="2010-11-17T20:30:16.660" UserId="3431" Comment="added 63 characters in body; added 131 characters in body" Text="I believe Visual Studio C++ implementation is not that good. It has more syntax quirks than GNU C++ and in some benchmarking I've done using a matrix solver, I've I didn't commit any silly mistake, Visual Studio's C++ was just as fast as C# and GNU C++ was faster. The IDE is nice tho, one of the best I've used but maybe Eclipse with some extensions can do a comparable job. Also, I wouldn't specifically use Visual Studio unless I was willing to limit myself to targeting Windows, Windows Mobile or xbox.&#xD;&#xA;&#xD;&#xA;One of the best things about C++ is flexibility, you can program either at low level or high level, and it's template engine. Most static languages' _generics_ (like Java, C#, and others) are not capable of doing things C++ templates can.&#xD;&#xA;&#xD;&#xA;Another thing is portability, good C++ code can be cross-compiled to most platforms, specially using GNU C++ which compiles for lots of different platforms. The drawback of this is that you need to build a specific binary for a specific platform.&#xD;&#xA;&#xD;&#xA;But, for 3D game programming, C++'s strength is speed. There's no default graphics library. For most platforms you could use OpenGL which is pretty good and supported, except in those platforms from Microsoft like the xbox. Anyway, the concepts you'll use either in DirectX or OpenGL are basically the same, so you can learn to use the concepts and apply it in OpenGL and then port your knowledge to the DirectX way of doing things.&#xD;&#xA;&#xD;&#xA;[See this nice OpenGL tutorial from NeHe](http://nehe.gamedev.net/lesson.asp?index=01)&#xD;&#xA;&#xD;&#xA;Still, I don't get why you find C++ cryptic? It's almost the same base syntax as Java or C#. Are pointers your problem? Template syntax?&#xD;&#xA;&#xD;&#xA;God bless" />
  <row Id="11352" PostHistoryTypeId="2" PostId="5715" RevisionGUID="5214a509-5e10-4042-83b3-f6815bfa53c2" CreationDate="2010-11-17T20:49:12.517" UserId="1232" Text="glClipPlane takes 4 coordinates for the plane equation: {Nx, Ny, Nz, d}, where N=[Nx,Ny,Nz] is the normal of the plane, and d is the projected distance of any point on that plane along the normal.&#xD;&#xA;&#xD;&#xA;The definition of a plane is:&#xD;&#xA;&lt;pre&gt;dotProduct(P,N) + d = 0&lt;/pre&gt;&#xD;&#xA;(where P is any point on that plane)&#xD;&#xA;&#xD;&#xA;So, by simple math,  &#xD;&#xA;&lt;pre&gt;&#xD;&#xA;d = -dotProduct(P,N)&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;eg. if you want to place your plane at (0,3,1), you calculate:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;d = -dotProduct([0,3,1], [Nx,Ny,Nz])&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;then it should just be a matter of sending Nx,Ny,Nz,d to glClipPlane.&#xD;&#xA;" />
  <row Id="11354" PostHistoryTypeId="2" PostId="5716" RevisionGUID="1f77cfee-65e1-46f2-8fa0-5fa33c98e520" CreationDate="2010-11-17T22:49:04.610" UserId="2653" Text="An idea I had which is interesting, though way more involved than I'd care to implement, is to use the 'integrity of the crowds'. That is, working under the assumption that most people wouldn't both trying to change things, have each client broadcast all their progress, and when a client logs in it attempts to sync with other clients.&#xD;&#xA;&#xD;&#xA;Obviously just the skeleton of an idea with a whole lot of complicated details that would need to be ironed out, which is why I said it's more involved than I'd care to implement. :)" />
  <row Id="11355" PostHistoryTypeId="5" PostId="5712" RevisionGUID="54528e77-d302-4d27-a1fb-728de6a735d5" CreationDate="2010-11-17T23:04:21.263" UserId="14" Comment="added 134 characters in body" Text="For iPhone / iPad development, you are going to need a Mac. See Tetrad's comment for relevant &quot;Can I use a Hackintosh&quot; discussion.&#xD;&#xA;&#xD;&#xA;For android development the development tool is the same, it is the Eclipse IDE, and it is available across all three primary OS choices.&#xD;&#xA;&#xD;&#xA;You can find the relevant information about it here: http://developer.android.com/sdk/index.html&#xD;&#xA;&#xD;&#xA;and you will find eclipse here: http://www.eclipse.org/&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;Personally, I haven't noticed any major operating differences using Eclipse between any of my systems (Linux Laptop, Windows Desktop, Mac Laptop) outside of menus being placed in a few different places on the Mac." />
  <row Id="11356" PostHistoryTypeId="2" PostId="5717" RevisionGUID="2699ddd9-e8b6-4524-95be-57f83d809b91" CreationDate="2010-11-17T23:46:45.157" UserId="424" Text="You might look into WebSockets, especially if you already know JavaScript. Granted you won't see WebSockets supported in IE until IE9 at least, but most other browsers support them already.&#xD;&#xA;&#xD;&#xA;http://www.websockets.org/aboutwebsocket.html&#xD;&#xA;" />
  <row Id="11357" PostHistoryTypeId="2" PostId="5718" RevisionGUID="67a1fa75-580f-4ef1-8d87-51d84277a33d" CreationDate="2010-11-18T00:04:45.237" UserId="1417" Text="developers are not cheap" />
  <row Id="11358" PostHistoryTypeId="2" PostId="5719" RevisionGUID="bb72a7de-98c9-4c93-8a5e-126956aa6b0d" CreationDate="2010-11-18T00:22:52.530" UserId="3271" Text="If you don't want to worry about people having to install stuff, go with Flash. Otherwise, I'd do Canvas/Javascript with Socket.IO. Canvas works in everything except IE, though excanvas.js adds support to IE7+, albeit a bit slow. Socket.IO works on pretty much anything, so I'd say Canvas is pretty close to matching Flash in ease-of-use, but users *may* need a better browser, depending on game complexity." />
  <row Id="11359" PostHistoryTypeId="2" PostId="5720" RevisionGUID="926aa8a4-431f-466e-bf50-58dd795ae879" CreationDate="2010-11-18T00:35:14.063" UserId="2535" Text="Here's a few links that might help. One is C++ and the other is in Visual Basic, but you may be able to glean something from them and get started. The C++ site is a project assignment from a college and is pretty much just an outline.&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;[Visual Basic][1]&lt;br /&gt;&#xD;&#xA;[C++][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.informit.com/articles/article.aspx?p=130837&#xD;&#xA;  [2]: http://www.cc.gatech.edu/classes/cs3411b_99_winter/P1Final.html" />
  <row Id="11360" PostHistoryTypeId="2" PostId="5721" RevisionGUID="7f1295c0-9714-46a8-990e-092d26f5d2e8" CreationDate="2010-11-18T02:01:05.963" UserId="3405" Text="You may want to post this question at [UnityAnswers][1]. You will get far better responses because it is more unity-centered &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com" />
  <row Id="11361" PostHistoryTypeId="2" PostId="5722" RevisionGUID="9c2dd733-2ee0-4a17-9196-3761c58d9204" CreationDate="2010-11-18T02:14:51.887" UserId="1966" Text="Unity requires you to script, but without all the boilerplates. In a typical OpenGL game, you will need to initialize the matrices and cameras like crazy. In Unity, you create a script to tell the behavior of something, then attach it to an object to make it behave." />
  <row Id="11362" PostHistoryTypeId="2" PostId="5723" RevisionGUID="0880227b-4797-472c-9fd3-50ee3169c988" CreationDate="2010-11-18T03:18:55.757" UserId="3214" Text="I have my Java environment installed alongside Eclipse, and I was successfully able to create and run a new project (simple System.out.println(&quot;Yay I work!&quot;);&#xD;&#xA;&#xD;&#xA;I have the OpenGL SuperBible, and I primarily want to code 3D things (I'll take my time using the book to learn how to draw shapes in 3D space, etc..)&#xD;&#xA;&#xD;&#xA;Can you help me get setup with OpenGL in Java? I dont really need LWJGL, although I WILL make games eventually. I just can't even figure out with all of these terrible (and old) tutorials floating around on the net how to install either JOGL or LWJGL.&#xD;&#xA;&#xD;&#xA;If you can give me a hand with that, I'd appreciate it. I'd like to feel I contributed by having this page show the answer to the question, so that other poor souls googling for this same information can benefit.&#xD;&#xA;&#xD;&#xA;EDIT: Should I be taking a look at this Netbeans JOGL plugin I just found? Maybe that will help me install these damn libraries faster.." />
  <row Id="11363" PostHistoryTypeId="1" PostId="5723" RevisionGUID="0880227b-4797-472c-9fd3-50ee3169c988" CreationDate="2010-11-18T03:18:55.757" UserId="3214" Text="Java and Eclipse setup properly, how do I install JOGL or LWJGL?" />
  <row Id="11364" PostHistoryTypeId="3" PostId="5723" RevisionGUID="0880227b-4797-472c-9fd3-50ee3169c988" CreationDate="2010-11-18T03:18:55.757" UserId="3214" Text="&lt;3d&gt;&lt;java&gt;" />
  <row Id="11365" PostHistoryTypeId="5" PostId="5723" RevisionGUID="148847b0-e480-45d7-9b7c-594097609859" CreationDate="2010-11-18T03:31:25.967" UserId="3214" Comment="added 65 characters in body" Text="I have my Java environment installed alongside Eclipse, and I was successfully able to create and run a new project (simple System.out.println(&quot;Yay I work!&quot;);&#xD;&#xA;&#xD;&#xA;I have the OpenGL SuperBible, and I primarily want to code 3D things (I'll take my time using the book to learn how to draw shapes in 3D space, etc..)&#xD;&#xA;&#xD;&#xA;Can you help me get setup with OpenGL in Java? I dont really need LWJGL, although I WILL make games eventually. I just can't even figure out with all of these terrible (and old) tutorials floating around on the net how to install either JOGL or LWJGL.&#xD;&#xA;&#xD;&#xA;If you can give me a hand with that, I'd appreciate it. I'd like to feel I contributed by having this page show the answer to the question, so that other poor souls googling for this same information can benefit.&#xD;&#xA;&#xD;&#xA;EDIT: Should I be taking a look at this Netbeans JOGL plugin I just found? Maybe that will help me install these damn libraries faster..&#xD;&#xA;&#xD;&#xA;EDIT 2: http://www.leolol.com/tutorials/graphics/lesson01.php" />
  <row Id="11366" PostHistoryTypeId="5" PostId="5723" RevisionGUID="92897642-155b-4bf2-9694-0b8c11e5daae" CreationDate="2010-11-18T03:36:34.343" UserId="3214" Comment="deleted 11 characters in body; deleted 28 characters in body" Text="I have my Java environment installed alongside Eclipse, and I was successfully able to create and run a new project (simple System.out.println(&quot;Yay I work!&quot;);&#xD;&#xA;&#xD;&#xA;I have the OpenGL SuperBible, and I primarily want to code 3D things (I'll take my time using the book to learn how to draw shapes in 3D space, etc..)&#xD;&#xA;&#xD;&#xA;Can you help me get setup with OpenGL in Java? I dont really need LWJGL, although I WILL make games eventually. I just can't even figure out with all of these terrible (and old) tutorials floating around on the net how to install either JOGL or LWJGL.&#xD;&#xA;&#xD;&#xA;If you can give me a hand with that, I'd appreciate it. I'd like to feel I contributed by having this page show the answer to the question, so that other poor souls googling for this same information can benefit.&#xD;&#xA;&#xD;&#xA;EDIT: Found a great site which should help with the setup of JOGL&#xD;&#xA;http://jogamp.org/wiki/index.php/Jogl_Tutorial#Justin.27s_Getting_Started_with_JOGL_2_Tutorials" />
  <row Id="11367" PostHistoryTypeId="2" PostId="5724" RevisionGUID="5e71b979-d670-40fc-a78a-af84d70b1eb5" CreationDate="2010-11-18T04:14:54.350" UserDisplayName="CyanPrime" Text="Okay, so I'm making a platformer, and I wanna know how I can make a arc'd jump easily. Like what Mario does in super Mario Bros 1. Any ideas on a simple way to accomplish this?" />
  <row Id="11368" PostHistoryTypeId="1" PostId="5724" RevisionGUID="5e71b979-d670-40fc-a78a-af84d70b1eb5" CreationDate="2010-11-18T04:14:54.350" UserDisplayName="CyanPrime" Text="Arc'd jumping method?" />
  <row Id="11369" PostHistoryTypeId="3" PostId="5724" RevisionGUID="5e71b979-d670-40fc-a78a-af84d70b1eb5" CreationDate="2010-11-18T04:14:54.350" UserDisplayName="CyanPrime" Text="&lt;2d&gt;&lt;programming&gt;&lt;java&gt;&lt;2d-physics&gt;" />
  <row Id="11370" PostHistoryTypeId="2" PostId="5725" RevisionGUID="a763844e-aefa-4ce8-b4e1-4378bfe27791" CreationDate="2010-11-18T05:02:39.923" UserId="953" Text="ExciteMike has some great examinations of the Super Meat Boy and Super Mario 3 jump physics on his blog: http://meyermike.com/wp/" />
  <row Id="11371" PostHistoryTypeId="2" PostId="5726" RevisionGUID="fbab584d-077f-4078-9d0a-6a4cfd18c16b" CreationDate="2010-11-18T05:07:13.647" UserId="189" Text="Interesting question; having taken Physics classes, I take this sort of thing for granted, when really it is an intriguing idea.&#xD;&#xA;&#xD;&#xA;The key point is that X and Y movements are distinct from each other. An object in motion will sustain its X motion, and its Y motion will be affected by gravity at a rate which you set.&#xD;&#xA;&#xD;&#xA;You should track the sprite's X and Y [velocities][1]. When standing still, the sprite has an X velocity of 0; when moving, it has a constant velocity. When touching the ground, the sprite has a Y velocity of 0. When the jump button is pressed, give the sprite a Y velocity.&#xD;&#xA;&#xD;&#xA;Now every frame, reduce the Y velocity by some amount; this is your gravity magnitude. But if the sprite is touching ground, set the Y velocity to 0 so that the sprite doesn't move into the ground. And then modify the sprite's position by (velocity*time).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If this was not the answer you're looking for, and you actually mean something more complicated by an &quot;arc'd jumping method&quot;, then please elaborate!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/simple/wiki/Velocity" />
  <row Id="11372" PostHistoryTypeId="6" PostId="1861" RevisionGUID="080672c4-b3cc-4941-99d9-99ad2397293f" CreationDate="2010-11-18T08:51:44.393" UserId="744" Comment="edited tags" Text="&lt;java&gt;&lt;ai&gt;&lt;path-finding&gt;" />
  <row Id="11373" PostHistoryTypeId="2" PostId="5727" RevisionGUID="02f9c7c4-2eb4-4da1-af83-c779d8bafff9" CreationDate="2010-11-18T13:03:51.237" UserId="1251" Text="I've never coded a card-game but I feel like encouraging a beginning game programmer. So I just accumulated little bit of resources from the internet.&#xD;&#xA;&#xD;&#xA;[This is a solitaire game in java][1] and since I thought you might not be familiar with concepts like svn i am including [a link][2] to the source code directory which you might find useful.The site above I mentioned uses the Java programming language.I think the only things you might need to do will be &#xD;&#xA;&#xD;&#xA; 1. Modifying the art assets in the above project&#xD;&#xA; 2. Changing the game-play to suit your ai.&#xD;&#xA;&#xD;&#xA;Best Wishes.&#xD;&#xA;&#xD;&#xA;  [1]: http://javasol.sourceforge.net/&#xD;&#xA;  [2]: http://javasol.svn.sourceforge.net/viewvc/javasol/trunk/javasol/src/com/fbergeron/" />
  <row Id="11374" PostHistoryTypeId="2" PostId="5728" RevisionGUID="cd202045-b375-4d28-95b6-e4e4905902f2" CreationDate="2010-11-18T13:13:18.380" UserDisplayName="Andy Lenox" Text="[Dame- Deadly Alien Map Editor.][1] Looks very slick, although I haven't tried it myself yet. It gets high ratings on the flixel boards.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dambots.com/dame-editor/" />
  <row Id="11375" PostHistoryTypeId="2" PostId="5729" RevisionGUID="6cf3114e-6d24-4a98-9332-b2259c29423e" CreationDate="2010-11-18T13:26:18.633" UserId="1251" Text="Possible reference to [this question][1], but I want specific answers pertaining to Side-scrollers.&#xD;&#xA;&#xD;&#xA;IMO, side-scrollers can be classified as&#xD;&#xA;&#xD;&#xA; 1. Player doesn't move, the background graphics move to fake player movement.&#xD;&#xA; 2. Player moves also background moves, but background movement is dependent on the (x,y) movement of the player &gt; I find this more appealing&#xD;&#xA; 3. Player can't move, the background&#xD;&#xA;    moves at a fast speed. Depending&#xD;&#xA;    upon the obstacles coming along with&#xD;&#xA;    the background the player has to&#xD;&#xA;    perform actions like jumping,&#xD;&#xA;    ducking, charging, etc...&#xD;&#xA;&#xD;&#xA;I would like to know what all *other things* can be added to the gameplay so that the above mentioned 3 side-scroller categories can be made more addicting.Please mention the category of the side-scroller in your reply.&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/657/approaching-the-fun-factor-in-game-design" />
  <row Id="11376" PostHistoryTypeId="1" PostId="5729" RevisionGUID="6cf3114e-6d24-4a98-9332-b2259c29423e" CreationDate="2010-11-18T13:26:18.633" UserId="1251" Text="Factors that make a side-scrolling game addicting" />
  <row Id="11377" PostHistoryTypeId="3" PostId="5729" RevisionGUID="6cf3114e-6d24-4a98-9332-b2259c29423e" CreationDate="2010-11-18T13:26:18.633" UserId="1251" Text="&lt;game-design&gt;&lt;side-scroller&gt;&lt;gameplay&gt;" />
  <row Id="11378" PostHistoryTypeId="5" PostId="5726" RevisionGUID="a496c708-d06c-46b2-9a91-324fde7c4c28" CreationDate="2010-11-18T13:33:37.830" UserId="189" Comment="added 155 characters in body" Text="Interesting question; having taken Physics classes, I take this sort of thing for granted, when really it is an intriguing idea.&#xD;&#xA;&#xD;&#xA;The key point is that X and Y movements are distinct from each other. An object in motion will sustain its X motion, and its Y motion will be affected by gravity at a rate which you set.&#xD;&#xA;&#xD;&#xA;You should track the sprite's X and Y [velocities][1]. When standing still, the sprite has an X velocity of 0; when moving, it has a constant velocity. When touching the ground, the sprite has a Y velocity of 0. When the jump button is pressed, give the sprite a Y velocity.&#xD;&#xA;&#xD;&#xA;Now every frame, reduce the Y velocity by some amount; this is your gravity magnitude. But if the sprite is touching ground, set the Y velocity to 0 so that the sprite doesn't move into the ground. And then modify the sprite's position by (velocity*time).&#xD;&#xA;&#xD;&#xA;Here is a decent-looking Physics lesson which demonstrates these separated velocity components: http://www.physicsclassroom.com/class/vectors/u3l2c.cfm&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If this was not the answer you're looking for, and you actually mean something more complicated by an &quot;arc'd jumping method&quot;, then please elaborate!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/simple/wiki/Velocity" />
  <row Id="11379" PostHistoryTypeId="6" PostId="5558" RevisionGUID="03f4ea0d-f0f5-44fc-b180-db799e251e20" CreationDate="2010-11-18T13:48:34.380" UserId="2995" Comment="edited tags" Text="&lt;mmo&gt;&lt;project-management&gt;&lt;team&gt;&lt;development&gt;" />
  <row Id="11380" PostHistoryTypeId="6" PostId="5723" RevisionGUID="2b22df8e-0bf9-4869-9e84-08cde01a1e12" CreationDate="2010-11-18T13:49:15.253" UserId="2995" Comment="edited tags" Text="&lt;3d&gt;&lt;opengl&gt;&lt;java&gt;" />
  <row Id="11381" PostHistoryTypeId="2" PostId="5730" RevisionGUID="27ac6f45-7a0f-4bf1-8148-b8d19a6a38bd" CreationDate="2010-11-18T13:56:25.067" UserId="3443" Text="I'll be old fashioned, I'll be not innovative but you can't do a shoot'em'up without a very well done and rewarding power up system and without epic end level bosses.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11382" PostHistoryTypeId="2" PostId="5731" RevisionGUID="70cc7d03-6aca-4a08-b474-b0534282ead3" CreationDate="2010-11-18T14:31:00.927" UserId="3444" Text="In probably every game a developer has to somehow deal with input, may it be simple keyboard and mouse events, touch events or something as accelerometer input. This input directly of indirectly effects objects in the game. Sometimes the same input can effect diffent objects. Now I've been thinking about how to model this. The way I see it there are two different approaches.&#xD;&#xA;&#xD;&#xA;- Let the game object itself handle it, subscribe to the events and call it's own methods.&#xD;&#xA;This has the advantage of letting the game-objects themselves decide which inputs cause which action. A disadvantage seems to be that the input code gets mangled with the &quot;core&quot; game object code. Also the game objects are unaware of the state of the rest of the game, and should sometimes maybe not act upon input events. This doesn't seem right.&#xD;&#xA;&#xD;&#xA;- Have a general input-controller take care of all the input and make decisions about who gets to handle what event.&#xD;&#xA;This seems to separate concerns better, but tighly couples the input-controller class to the game-objects. It somehow need to know who wants to receive which event and in which state. This doesn't seem right either.&#xD;&#xA;&#xD;&#xA;What strategies are you using to handle this?" />
  <row Id="11383" PostHistoryTypeId="1" PostId="5731" RevisionGUID="70cc7d03-6aca-4a08-b474-b0534282ead3" CreationDate="2010-11-18T14:31:00.927" UserId="3444" Text="Do I, and how, separate the concerns of input and game objects?" />
  <row Id="11384" PostHistoryTypeId="3" PostId="5731" RevisionGUID="70cc7d03-6aca-4a08-b474-b0534282ead3" CreationDate="2010-11-18T14:31:00.927" UserId="3444" Text="&lt;architecture&gt;&lt;input&gt;" />
  <row Id="11385" PostHistoryTypeId="6" PostId="5731" RevisionGUID="78883cff-4cf5-47dd-897e-821ede320fef" CreationDate="2010-11-18T14:46:33.217" UserId="2995" Comment="edited tags" Text="&lt;architecture&gt;&lt;input&gt;&lt;events&gt;" />
  <row Id="11386" PostHistoryTypeId="2" PostId="5732" RevisionGUID="8b19382a-5c6d-4a90-8db0-a61870ee213b" CreationDate="2010-11-18T14:54:42.720" UserId="2995" Text="I recommend seperating input events from game objects so you can quickly change/upgrade input methodoligies without having to edit and debug 10 object classes. Examples being shifting over from keyboard-only controls to mouse+keyboard, or simply reassigning keys.&#xD;&#xA;&#xD;&#xA;Instead of tightly coupling input to the individual game objects, call only one method per unique input signal on the game object, and let it decide the way to execute it.&#xD;&#xA;&#xD;&#xA;Use a singleton input controller to keep track of input state:&#xD;&#xA;&#xD;&#xA;    Up press event   -&gt; dir = up&#xD;&#xA;    Down press event -&gt; dir = down&#xD;&#xA;&#xD;&#xA;Whenever input state changes, evaluate if game objects are ready to be modified:&#xD;&#xA;&#xD;&#xA;    set dir  -&gt;  if gamestate != paused &amp;&amp; battlemode == false&#xD;&#xA;                 -&gt;  character.changeDir(dir);&#xD;&#xA;&#xD;&#xA;Implement general methods on your game objects, that can be called by the input controller, or other game objects, as needed:&#xD;&#xA;&#xD;&#xA;    changeDir (dir)&#xD;&#xA;    setSpeed (walk/run)" />
  <row Id="11387" PostHistoryTypeId="5" PostId="5732" RevisionGUID="64e11412-d43a-48f9-9596-cfb61232e5a8" CreationDate="2010-11-18T15:42:45.797" UserId="744" Comment="Fix two typos and remove a word that doesn't need to be there." Text="I recommend separating input events from game objects so you can quickly change/upgrade input methodologies without having to edit and debug 10 object classes. Examples being shifting over from keyboard-only controls to mouse+keyboard, or simply reassigning keys.&#xD;&#xA;&#xD;&#xA;Instead of tightly coupling input to the individual game objects, call only one method per unique input signal on the game object, and let it decide the way to execute it.&#xD;&#xA;&#xD;&#xA;Use an input controller to keep track of input state:&#xD;&#xA;&#xD;&#xA;    Up press event   -&gt; dir = up&#xD;&#xA;    Down press event -&gt; dir = down&#xD;&#xA;&#xD;&#xA;Whenever input state changes, evaluate if game objects are ready to be modified:&#xD;&#xA;&#xD;&#xA;    set dir  -&gt;  if gamestate != paused &amp;&amp; battlemode == false&#xD;&#xA;                 -&gt;  character.changeDir(dir);&#xD;&#xA;&#xD;&#xA;Implement general methods on your game objects, that can be called by the input controller, or other game objects, as needed:&#xD;&#xA;&#xD;&#xA;    changeDir (dir)&#xD;&#xA;    setSpeed (walk/run)" />
  <row Id="11388" PostHistoryTypeId="6" PostId="5558" RevisionGUID="ba0d84ce-3d28-4687-9cbd-5613a62944ef" CreationDate="2010-11-18T15:46:04.203" UserId="744" Comment="No really, these are bad tags." Text="&lt;mmo&gt;&lt;project-management&gt;" />
  <row Id="11389" PostHistoryTypeId="2" PostId="5733" RevisionGUID="51a50ad4-bfbe-4171-8766-89e9bc5d5e5a" CreationDate="2010-11-18T15:49:49.563" UserId="2447" Text="I recommend the MVC approach.  In MVC the game objects only have to worry about modeling the game system, and provide a high level interface like move_left.  Then have a controller object that worries about mapping input to model calls.  Not only does it allow for easy change of controls, it gives a good interface for AI they are just another controller. " />
  <row Id="11390" PostHistoryTypeId="2" PostId="5734" RevisionGUID="5567b8b5-3b20-4151-a5e2-081b7b07b23c" CreationDate="2010-11-18T16:00:09.363" UserId="3214" Text="Found a great site which should help with the setup of JOGL http://jogamp.org/wiki/index.php/Jogl_Tutorial#Justin.27s_Getting_Started_with_JOGL_2_Tutorials&#xD;&#xA;and here for LWJGL in Eclipse:&#xD;&#xA;http://lwjgl.org/installation.php#eclipse" />
  <row Id="11391" PostHistoryTypeId="5" PostId="5723" RevisionGUID="792875ee-753c-4c60-bc3e-108112237ef8" CreationDate="2010-11-18T16:00:26.930" UserId="3214" Comment="deleted 166 characters in body" Text="I have my Java environment installed alongside Eclipse, and I was successfully able to create and run a new project (simple System.out.println(&quot;Yay I work!&quot;);&#xD;&#xA;&#xD;&#xA;I have the OpenGL SuperBible, and I primarily want to code 3D things (I'll take my time using the book to learn how to draw shapes in 3D space, etc..)&#xD;&#xA;&#xD;&#xA;Can you help me get setup with OpenGL in Java? I dont really need LWJGL, although I WILL make games eventually. I just can't even figure out with all of these terrible (and old) tutorials floating around on the net how to install either JOGL or LWJGL.&#xD;&#xA;&#xD;&#xA;If you can give me a hand with that, I'd appreciate it. I'd like to feel I contributed by having this page show the answer to the question, so that other poor souls googling for this same information can benefit." />
  <row Id="11392" PostHistoryTypeId="2" PostId="5735" RevisionGUID="6a41b862-553e-4db1-af6e-53dfbe88194e" CreationDate="2010-11-18T16:08:03.767" UserId="3446" Text="Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games. I'm picturing things like:&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;CMU's Motion Capture Database[1]&lt;/li&gt;&#xD;&#xA;&lt;li&gt;OpenSteer[2]&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Biped motion simulation (which I can't seem to find the link)&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion&#xD;&#xA;  [2]: http://opensteer.sourceforge.net/" />
  <row Id="11393" PostHistoryTypeId="1" PostId="5735" RevisionGUID="6a41b862-553e-4db1-af6e-53dfbe88194e" CreationDate="2010-11-18T16:08:03.767" UserId="3446" Text="Interesting/Innovative FLOSS tools for indie games" />
  <row Id="11394" PostHistoryTypeId="3" PostId="5735" RevisionGUID="6a41b862-553e-4db1-af6e-53dfbe88194e" CreationDate="2010-11-18T16:08:03.767" UserId="3446" Text="&lt;tools&gt;&lt;open-source&gt;&lt;simulations&gt;" />
  <row Id="11395" PostHistoryTypeId="2" PostId="5736" RevisionGUID="130cdf9e-332d-491c-916a-2b897f7de608" CreationDate="2010-11-18T16:11:20.410" UserId="3115" Text="First of all there are a bunch of tutorials on Google regarding building Pac-man clones in eg. Flash. Some of these explain the idea pretty well. There is also a site telling the story and ruleset of the original Pacman ghosts AI. Will see if I can find that link again someday.&#xD;&#xA;&#xD;&#xA;But regarding your question.&#xD;&#xA;&#xD;&#xA;First of all you need to know your &quot;maximum size&quot; of your levels. In PacMan (from now on &quot;PM&quot; only) the maze is of a certain size, but this wouldnt be too hard to change later though - its only for the principles.&#xD;&#xA;&#xD;&#xA;A 2D maze can be implemented with ARRAY's 2 dimensional arrays are just large strings of data.&#xD;&#xA;&#xD;&#xA;I will try to show it with characters here:&#xD;&#xA;&#xD;&#xA;    XXXXXXXXXX&#xD;&#xA;    X...X....X&#xD;&#xA;    X.X.X.XX.X&#xD;&#xA;    X.X...X..X&#xD;&#xA;    X.X.X.XX.X&#xD;&#xA;    X...X....X&#xD;&#xA;    XXXXXXXXXX&#xD;&#xA;  &#xD;&#xA;Now thats not a pretty reprecentation of the actual PM, but enough for my point. What I can do now is to store these within a simple array/list of strings.&#xD;&#xA;&#xD;&#xA;As you havent told us what programming language you will be using, I will just try to use some &quot;pseudo kinda description&quot; (javascript/actionscript/C# kinda )&#xD;&#xA;&#xD;&#xA;    var maze string[10]; &#xD;&#xA;    &#xD;&#xA;    maze[0] = &quot;XXXXXXXXXX&quot;;&#xD;&#xA;    maze[1] = &quot;X...X....X&quot;;&#xD;&#xA;    maze[2] = &quot;X.X.X.XX.X&quot;;&#xD;&#xA;    maze[3] = &quot;X.X...X..X&quot;;&#xD;&#xA;    maze[4] = &quot;X.X.X.XX.X&quot;;&#xD;&#xA;    maze[5] = &quot;X...X....X&quot;;&#xD;&#xA;    maze[6] = &quot;XXXXXXXXXX&quot;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;From this I can find out where the walls are. I can use this for collision detection, I can use it for pathfinding and I can use it to draw the actual map.&#xD;&#xA;&#xD;&#xA;You just make a function that will return what kinda &quot;tile&quot; is on a certain coordinate.&#xD;&#xA;&#xD;&#xA;    tiletype GetTile(xcoord:int, ycoord:int)&#xD;&#xA;    {&#xD;&#xA;       return substring(maze[ycoord], xcoord,1);    // returns a substring (string, starting at xcoord, length)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You could also make it more &quot;specific&quot; if you want.&#xD;&#xA;&#xD;&#xA;    boolean isWall(xcoord:int, ycoord:int)&#xD;&#xA;    {&#xD;&#xA;       return (substring(maze[ycoord], xcoord,1) == &quot;x&quot;) &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does this make sense?" />
  <row Id="11396" PostHistoryTypeId="16" PostId="5735" RevisionGUID="f0dd5ecb-b856-4eb6-bb87-89a032f67bf1" CreationDate="2010-11-18T16:32:13.677" UserId="51" />
  <row Id="11397" PostHistoryTypeId="5" PostId="1636" RevisionGUID="8577a94e-56ca-4f5a-a2b5-7c53ddcbcc7c" CreationDate="2010-11-18T17:11:42.293" UserId="364" Comment="Added a link to the Larabie collection mentionned." Text="You can find many free and cheap fonts on [MyFonts.com](http://new.myfonts.com/), including the [Larabie Font Collection][1] (many of which are free for commercial use)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://new.myfonts.com/foundry/Larabie/" />
  <row Id="11398" PostHistoryTypeId="5" PostId="5710" RevisionGUID="7e99c487-a35d-4a59-8673-f92d802fe3c7" CreationDate="2010-11-18T17:18:00.560" UserId="3431" Comment="removed claim that VC++ is slower than GCC" Text="I wouldn't specifically use Visual Studio unless I was willing to limit myself to targeting Windows, Windows Mobile or xbox. Visual Studio IDE is nice tho, one of the best I've used but maybe Eclipse with some extensions can do a comparable job.&#xD;&#xA;&#xD;&#xA;One of the best things about C++ is flexibility, you can program either at low level or high level, and it's template engine. Most static languages' _generics_ (like Java, C#, and others) are not capable of doing things C++ templates can.&#xD;&#xA;&#xD;&#xA;Another thing is portability, good C++ code can be cross-compiled to most platforms, specially using GNU C++ which compiles for lots of different platforms. The drawback of this is that you need to build a specific binary for a specific platform.&#xD;&#xA;&#xD;&#xA;But, for 3D game programming, C++'s strength is speed. There's no default graphics library. For most platforms you could use OpenGL which is pretty good and supported, except in those platforms from Microsoft like the xbox. Anyway, the concepts you'll use either in DirectX or OpenGL are basically the same, so you can learn to use the concepts and apply it in OpenGL and then port your knowledge to the DirectX way of doing things.&#xD;&#xA;&#xD;&#xA;[See this nice OpenGL tutorial from NeHe](http://nehe.gamedev.net/lesson.asp?index=01)&#xD;&#xA;&#xD;&#xA;Still, I don't get why you find C++ cryptic? It's almost the same base syntax as Java or C#. Are pointers your problem? Template syntax?&#xD;&#xA;&#xD;&#xA;God bless" />
  <row Id="11399" PostHistoryTypeId="5" PostId="5735" RevisionGUID="2adae29f-ec13-4803-8f1c-8bac52538f6c" CreationDate="2010-11-18T17:35:17.920" UserId="3446" Comment="deleted 42 characters in body" Text="Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games. I'm picturing things like:&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;CMU's Motion Capture Database [&lt;a href=http://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion&gt;1&lt;/a&gt;]&lt;/li&gt;&#xD;&#xA;&lt;li&gt;OpenSteer&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Biped motion simulation (which I can't seem to find the link)&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;" />
  <row Id="11400" PostHistoryTypeId="2" PostId="5737" RevisionGUID="5ed17444-eb74-4e09-b370-e6d3b0acd458" CreationDate="2010-11-18T17:47:31.367" UserId="2063" Text="The surface of Unity3D looks like it's super easy, and nearly everything is pre-build, but none of that is true.&#xD;&#xA;If you ignore to use already existing scripts (which exists for every engine, bad point against Unity) and plugins that you describe as somewhat ultra mighty, what they are definitely not, Unity is just an programming interface with editor.&#xD;&#xA;&#xD;&#xA;You have most of the code by your own. I experienced that in 2 different projects.&#xD;&#xA;" />
  <row Id="11401" PostHistoryTypeId="5" PostId="5735" RevisionGUID="494749d5-51fd-4804-9084-37439834f9f5" CreationDate="2010-11-18T17:48:17.860" UserId="3446" Comment="deleted 4 characters in body" Text="Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games. I'm picturing things like:&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;&lt;a href=http://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion&gt;CMU's Motion Capture Database&lt;/a&gt;&lt;/li&gt;&#xD;&#xA;&lt;li&gt;OpenSteer&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Biped motion simulation (which I can't seem to find the link)&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;" />
  <row Id="11402" PostHistoryTypeId="4" PostId="5735" RevisionGUID="9a2118d9-4d33-41df-98cf-0567221ac053" CreationDate="2010-11-18T17:54:13.550" UserId="962" Comment="Made title more understandable." Text="Interesting/Innovative Open Source tools for indie games" />
  <row Id="11403" PostHistoryTypeId="2" PostId="5738" RevisionGUID="b9408992-527e-44a7-bb1e-7db6a186b27a" CreationDate="2010-11-18T18:04:30.313" UserId="1859" Text="I would suggest to make your game (the *Model*) define a list of possible input events (implemented as enums or objects with a base interface in common). Things such as `MovingRightStarted`, `MovingRightStopped`, `FiredWeapon1`, `Escape`, etc ...&#xD;&#xA;&#xD;&#xA;The game defines a data structure (for instance a `queue`) that your input code (the *Controller*) can fill with input events.&#xD;&#xA;&#xD;&#xA;Then your game can poll the data structure to get the input events.&#xD;&#xA;&#xD;&#xA;This way, you can plug different kind of controllers to feed the model:&#xD;&#xA;&#xD;&#xA; - Keyboard only&#xD;&#xA; - Keyboard + Mouse&#xD;&#xA; - Joystick&#xD;&#xA; - Touchscreen&#xD;&#xA; - Artificial Intelligence&#xD;&#xA;&#xD;&#xA;You just have them to push input events to the model." />
  <row Id="11404" PostHistoryTypeId="5" PostId="5730" RevisionGUID="fc7ac09e-8f35-4ea3-b15d-6d2e623de0f7" CreationDate="2010-11-18T18:05:51.763" UserId="3443" Comment="Precisation" Text="(If you talk about shoot'em'up)&#xD;&#xA;&#xD;&#xA;I'll be old fashioned, I'll be not innovative but you can't do a shoot'em'up without a very well done and rewarding power up system and without epic end level bosses.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11405" PostHistoryTypeId="2" PostId="5739" RevisionGUID="d8269e94-cadb-493f-bd8e-fcafdd60463f" CreationDate="2010-11-18T18:18:25.183" UserId="2091" Text="[Mappy][1] is another one.  There's a plugin for mappy that exports maps in a format that is ready for [flixel][2] (a very well known game engine for Flash)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tilemap.co.uk/mappy.php&#xD;&#xA;  [2]: http://flixel.org/" />
  <row Id="11406" PostHistoryTypeId="2" PostId="5740" RevisionGUID="13dcdf88-ef7d-41e8-9a87-a4d9759ece80" CreationDate="2010-11-18T18:27:41.463" UserId="284" Text="You really need to identify the specific behaviors that you want to prevent.&#xD;&#xA;&#xD;&#xA;For example, if the real problem that you want to prevent is not &quot;people making multiple accounts&quot;, but &quot;individuals being targeted by multiple accounts controlled by the same person&quot;, that's an area where you can use similar traits between potentially clone accounts to **allow the players themselves to police multiplaying**.  In other words, if they detect traits of multiplaying, they can act (somewhere) to check for similarities between the accounts, and if the accounts do have too many similarities, cause a punishment to occur.  Player policing.  The benefit of this is that multi-accounting matters most to other, non-multiplaying individuals, so if they feel wronged, they have a recourse they can try.&#xD;&#xA;&#xD;&#xA;Similarly, as others have mentioned, if it's the gaining of rank by defeating their own dummy accounts, a system like the rep system here on stackexchange helps to turn taking ranking points from yourself into a zero-sum gain." />
  <row Id="11407" PostHistoryTypeId="5" PostId="5740" RevisionGUID="cc6f8b20-5b22-4c7c-8e4b-04b704a989bc" CreationDate="2010-11-18T18:45:18.660" UserId="284" Comment="added 205 characters in body" Text="You really need to identify the specific behaviors that you want to prevent.&#xD;&#xA;&#xD;&#xA;For example, if the real problem that you want to prevent is not &quot;people making multiple accounts&quot;, but &quot;individuals being targeted by multiple accounts controlled by the same person&quot;, that's an area where you can use similar traits between potentially clone accounts to **allow the players themselves to police multiplaying**.  In other words, if they detect traits of multiplaying, they can act (via some interface) to check for similarities between the accounts, and if the accounts do have too many similarities, cause a punishment to occur.  Player policing.  The benefit of this is that multi-accounting **matters the most** to other, non-multiplaying individuals, so if they feel wronged, **they have a recourse** they can try to catch the multiplayer on the spot.&#xD;&#xA;It also allows things that in a flatly viewed account system would be false positives (like ip) to be much more real evidence of multiaccounting.&#xD;&#xA;&#xD;&#xA;Similarly, as others have mentioned, if it's the gaining of rank by defeating their own dummy accounts, a system like the rep system here on stackexchange helps to turn taking ranking points from yourself into a zero-sum gain." />
  <row Id="11408" PostHistoryTypeId="2" PostId="5741" RevisionGUID="523d33fe-889c-4962-9448-953e12514b22" CreationDate="2010-11-18T19:03:07.450" UserId="458" Text="The first (unasked) question is, should you be designing the battle mechanics of an RPG before any code has been written, in the first place? Probably, yes -- but be aware that if you're making an RPG on your own or in a small team, it is not the mechanics or game engine that is the challenging part, but the massive loads of sheer content you have to create in terms of every single level, character, NPC, dialogue tree, weapon, spell, treasure chest... I don't know you or your team, but I run into a lot of students who want to make RPGs because they love to play them, so my first instinct is to make sure you know what you're getting into!&#xD;&#xA;&#xD;&#xA;Second, yes, I'd say that getting the game mechanics down on paper is a good first step. A good second step would be putting them in a state where you can actually test them &quot;by hand&quot; without writing code -- paper prototyping, in other words. Play out your combat system (or a simplified version if needed) as a tabletop game and see if it gives the player interesting decisions to make, and modify the mechanics accordingly until you reach the point where it works well. When the mechanics are fun, work on the balancing part, figuring out the exact formulas and numbers in such a way that the game is neither too easy nor too hard from a pure &quot;stats&quot; perspective. That would be a good time to work on the AI as well, to make sure that the enemies are choosing their moves in a way that dovetails with the stats-based challenge level. You can do all of this without writing a line of code, and it's a lot easier to change your mind and try out new mechanics when you can do it in five seconds with a pencil." />
  <row Id="11409" PostHistoryTypeId="2" PostId="5742" RevisionGUID="b1d0f2d5-a9ba-43d8-8bbf-5d2fc675e9eb" CreationDate="2010-11-18T19:12:38.060" UserDisplayName="Joel" Text="Thanks for your excellent page describing how you solved this problem. I did something somewhat different than you in one detail, as I was deeply memory constrained: I don't build an array, or have to search it for the right 'segment' with a binary search. This is because I always know I am moving from one end of my Bezier curve to another: Therefore, I simply remember the 'current' segment, and if I see that I am going to go out of bounds of that segment to compute my next position, I compute the next (or previous) segment (based on direction of travel.) This works quite well for my application. The only glitch I had to work out was that, in some curves, the size of the segments were so small that my next plot to point was - at rare times - more than one segment ahead of the current one, so instead of just going to the 'next' or 'previous' segment (based on direction), I had to compute segments forward (or back) until I found the one that my next point was 'in'.&#xD;&#xA;&#xD;&#xA;Don't know if this quite makes sense, but this certainly helped me." />
  <row Id="11411" PostHistoryTypeId="5" PostId="5733" RevisionGUID="b75864e5-5329-405a-a2e2-6229fa5c1c6a" CreationDate="2010-11-18T19:39:12.743" UserId="2447" Comment="added 646 characters in body" Text="I recommend the MVC approach.  In MVC the game objects only have to worry about modeling the game system, and provide a high level interface like move_left.  Then have a controller object that worries about mapping input to model calls.  Not only does it allow for easy change of controls, it gives a good interface for AI they are just another controller. &#xD;&#xA;&#xD;&#xA;In your second option I would split up the input-controller in to two parts, one that handles the actual device touch, keyboard, accel, whatever else you can throw at it, have it map them into a generic set of inputs.  Then have a second part that maps generic inputs to game specific inputs.  Say the keyboards up arrow maps to input1 then touching the top of a touch screen also maps to input1 as well now you write a second piece that maps input 1 to jump.  You can now map any IO device as well as stored playback or AI inputs to this generic input system and have a small game specific part that loads what input1 one means to the model." />
  <row Id="11413" PostHistoryTypeId="2" PostId="5744" RevisionGUID="25613470-004c-4fe7-83b1-c6e2164b6909" CreationDate="2010-11-18T19:41:28.397" UserId="3452" Text="i just wanted to ask you guys what do i need in creating a 3d game.&#xD;&#xA;well lets say for a noob i just want to create a ball&#xD;&#xA;then..can be controlled by arrow keys&#xD;&#xA;and finally collision detection&#xD;&#xA;&#xD;&#xA;i am too confused on what tools do i need and where to start. actually i have no idea at all on what programming language i will use xD c++? xD" />
  <row Id="11414" PostHistoryTypeId="1" PostId="5744" RevisionGUID="25613470-004c-4fe7-83b1-c6e2164b6909" CreationDate="2010-11-18T19:41:28.397" UserId="3452" Text="thinking of creating a 3d game" />
  <row Id="11415" PostHistoryTypeId="3" PostId="5744" RevisionGUID="25613470-004c-4fe7-83b1-c6e2164b6909" CreationDate="2010-11-18T19:41:28.397" UserId="3452" Text="&lt;3d&gt;&lt;collision-detection&gt;&lt;tools&gt;&lt;control&gt;" />
  <row Id="11416" PostHistoryTypeId="10" PostId="5744" RevisionGUID="f0f455cf-652b-491f-aac1-bd224040132c" CreationDate="2010-11-18T19:43:01.757" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11417" PostHistoryTypeId="2" PostId="5745" RevisionGUID="c9760080-5eaf-4749-9d65-2e3d5ab109d0" CreationDate="2010-11-18T21:06:50.120" UserDisplayName="Glaeken" Text="I have an array of lights that I need to sample from randomly, but deterministically so that all the lights are sampled. Currently I use random numbers to pick a light, and then put processed lights into another list, but I'm wondering if there is a way to use something like a hammersly or halton sequence to do this instead. A biased solution would be ok." />
  <row Id="11418" PostHistoryTypeId="1" PostId="5745" RevisionGUID="c9760080-5eaf-4749-9d65-2e3d5ab109d0" CreationDate="2010-11-18T21:06:50.120" UserDisplayName="Glaeken" Text="Deterministic random number sequence" />
  <row Id="11419" PostHistoryTypeId="3" PostId="5745" RevisionGUID="c9760080-5eaf-4749-9d65-2e3d5ab109d0" CreationDate="2010-11-18T21:06:50.120" UserDisplayName="Glaeken" Text="&lt;rendering&gt;" />
  <row Id="11420" PostHistoryTypeId="6" PostId="5745" RevisionGUID="2ba451f8-a4c8-4dcd-869b-4ed56e339fea" CreationDate="2010-11-18T21:11:30.193" UserId="1156" Comment="edited tags" Text="&lt;rendering&gt;&lt;random&gt;" />
  <row Id="11421" PostHistoryTypeId="2" PostId="5746" RevisionGUID="47421775-2195-4232-ba0d-2f3f3251fbab" CreationDate="2010-11-18T21:14:55.180" UserId="1156" Text="If I understand this, the sequence:  &#xD;&#xA;1,2,3,4  &#xD;&#xA;could end up as:  &#xD;&#xA;3,2,4,1 or 1,3,2,4 or whatever?&#xD;&#xA;&#xD;&#xA;[Fisher-Yates Shuffle, or the Knuth Shuffle][1] came up on wikipedia. It says linear time, which is good.&#xD;&#xA;&#xD;&#xA;&gt;    1. Write down the numbers from 1 to N.&#xD;&#xA;&gt;    2. Pick a random number k between one and the number of unstruck numbers&#xD;&#xA;&gt; remaining (inclusive).&#xD;&#xA;&gt;    3. Counting from the low end, strike out the kth number not yet&#xD;&#xA;&gt; struck out, and write it down&#xD;&#xA;&gt; elsewhere.&#xD;&#xA;&gt;    4. Repeat from step 2 until all the numbers have been struck out.&#xD;&#xA;&gt;    5. The sequence of numbers written down in step 3 is now a random&#xD;&#xA;&gt; permutation of the original numbers.&#xD;&#xA;&#xD;&#xA;You could use this on the indices of the array, just using 0 to N-1.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle" />
  <row Id="11422" PostHistoryTypeId="2" PostId="5747" RevisionGUID="55cd96ba-fd7f-44f3-81ed-4d0113e0dd22" CreationDate="2010-11-18T22:05:13.750" UserId="2604" Text="I would like to start learning about game development and I would like to do it using Linux. My main experience has been with Java and a bit of C++, but that was for applications and not games. &#xD;&#xA;Now that I want to try with gaming, I'm wondering which IDE/language should I use in Linux, whether I should go with C++ and compiling files manually at the beginning, or maybe continue with Java/Eclipse, also I think I can use Eclipse with C++, I have also started reading about Python... &#xD;&#xA;&#xD;&#xA;I was thinking in starting with the typical &quot;Tetris&quot; just to understand how a game works internally, and I think I can achieve that with all the previous options, but what do you recommend me or how have you started game developming under Linux?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="11423" PostHistoryTypeId="1" PostId="5747" RevisionGUID="55cd96ba-fd7f-44f3-81ed-4d0113e0dd22" CreationDate="2010-11-18T22:05:13.750" UserId="2604" Text="Starting in game development under Linux. Which language / tools?" />
  <row Id="11424" PostHistoryTypeId="3" PostId="5747" RevisionGUID="55cd96ba-fd7f-44f3-81ed-4d0113e0dd22" CreationDate="2010-11-18T22:05:13.750" UserId="2604" Text="&lt;tools&gt;&lt;language-choice&gt;&lt;linux&gt;" />
  <row Id="11425" PostHistoryTypeId="5" PostId="5746" RevisionGUID="869cd7b5-7cec-47c1-9023-90d7ba927f91" CreationDate="2010-11-18T22:30:33.327" UserId="744" Comment="A digital-computer-suitable version of Fisher-Yates; the previous version was quadratic time and linear space, this is linear time and constant space." Text="If I understand this, the sequence:  &#xD;&#xA;1,2,3,4  &#xD;&#xA;could end up as:  &#xD;&#xA;3,2,4,1 or 1,3,2,4 or whatever?&#xD;&#xA;&#xD;&#xA;[Fisher-Yates Shuffle, or the Knuth Shuffle][1] came up on wikipedia. It says linear time, which is good.&#xD;&#xA;&#xD;&#xA;    import random&#xD;&#xA; &#xD;&#xA;    def shuffle(x):&#xD;&#xA;        for i in reversed(range(1, len(x))):&#xD;&#xA;            # pick an element in x[:i+1] with which to exchange x[i]&#xD;&#xA;            j = random.randrange(i+1)&#xD;&#xA;            x[i], x[j] = x[j], x[i]&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle" />
  <row Id="11426" PostHistoryTypeId="2" PostId="5748" RevisionGUID="d1ed3f8d-3d95-4cfa-8fb5-b45186583e84" CreationDate="2010-11-18T23:00:01.080" UserDisplayName="alex" Text="I'm making a game in as3 using flash develop and flash cs5. Everything is object oriented. I was wondering, should I have one &quot;gateway&quot; class that has a property-reference to all instantiations of other classes, and I just pass this gateway class to new objects, so they have access to every class. Like so:&#xD;&#xA;&#xD;&#xA;     var block:Block = new Block(gateway);&#xD;&#xA;&#xD;&#xA;     //In the block class:&#xD;&#xA;     this.gateway.player.setHealth(100);&#xD;&#xA;     //Or:&#xD;&#xA;     this.gateway.input.lock();&#xD;&#xA;&#xD;&#xA;Is this like a singleton pattern or something? Should I do this?" />
  <row Id="11427" PostHistoryTypeId="1" PostId="5748" RevisionGUID="d1ed3f8d-3d95-4cfa-8fb5-b45186583e84" CreationDate="2010-11-18T23:00:01.080" UserDisplayName="alex" Text="Flash As3 Game: Class Question." />
  <row Id="11428" PostHistoryTypeId="3" PostId="5748" RevisionGUID="d1ed3f8d-3d95-4cfa-8fb5-b45186583e84" CreationDate="2010-11-18T23:00:01.080" UserDisplayName="alex" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="11429" PostHistoryTypeId="5" PostId="5735" RevisionGUID="acbc16da-d3e0-43ee-bcf0-355a3203c8d2" CreationDate="2010-11-18T23:31:58.100" UserId="3446" Comment="deleted 162 characters in body; edited tags" Text="Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games.&#xD;&#xA;&#xD;&#xA;**EDIT:** As suggested by The Communist Duck and Joe Wreschnig, I'm putting the examples as answers." />
  <row Id="11430" PostHistoryTypeId="6" PostId="5735" RevisionGUID="acbc16da-d3e0-43ee-bcf0-355a3203c8d2" CreationDate="2010-11-18T23:31:58.100" UserId="3446" Comment="deleted 162 characters in body; edited tags" Text="&lt;tools&gt;&lt;open-source&gt;" />
  <row Id="11431" PostHistoryTypeId="2" PostId="5749" RevisionGUID="c18b78d3-fc60-478e-a6f3-a819c0f68e00" CreationDate="2010-11-18T23:34:13.480" UserId="3446" Text="Examples of tools/projects I found interesting are:&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;[CMU's Motion Capture Database][1]&lt;/li&gt;&#xD;&#xA;&lt;li&gt;[OpenSteer][2]&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Biped motion simulation (which I can't seem to find the link)&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion&#xD;&#xA;  [2]: http://www.google.com.uy/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBgQFjAA&amp;url=http%3A%2F%2Fopensteer.sourceforge.net%2F&amp;ei=z7flTO2lLMO88gaM3vjVDQ&amp;usg=AFQjCNHxQjLl3mtBNnYDTdW50UHGFUh7Ug&amp;sig2=jrzoX3TmUWQpg9c5tjiaww" />
  <row Id="11432" PostHistoryTypeId="2" PostId="5750" RevisionGUID="e4798b54-6d79-448e-8d87-a9bfde787162" CreationDate="2010-11-18T23:58:27.583" UserId="3455" Text="I've got around 10 years behind me of casually creating AS1/2/3 games and have found myself wondering recently what other options are available for web-based games.&#xD;&#xA;&#xD;&#xA;I have recently found haXe and will probably start coding in that, since it is largely based on AS3/ECMAScript, and I am also aware of JavaScript/jQuery etc and HTML5 being suitable for purpose, but what else is there? &#xD;&#xA;&#xD;&#xA;What up and coming languages are being used to develop / are targeted at making web-based games?&#xD;&#xA;" />
  <row Id="11433" PostHistoryTypeId="1" PostId="5750" RevisionGUID="e4798b54-6d79-448e-8d87-a9bfde787162" CreationDate="2010-11-18T23:58:27.583" UserId="3455" Text="What new programming languages are being used to develop web-based games?" />
  <row Id="11434" PostHistoryTypeId="3" PostId="5750" RevisionGUID="e4798b54-6d79-448e-8d87-a9bfde787162" CreationDate="2010-11-18T23:58:27.583" UserId="3455" Text="&lt;web&gt;&lt;languages&gt;" />
  <row Id="11435" PostHistoryTypeId="2" PostId="5751" RevisionGUID="a576f58d-383b-4678-86ae-ecd1586b9a7f" CreationDate="2010-11-19T02:00:05.893" UserId="3422" Text="I am creating a top-view, multiplayer, arcade-ish racing game, and I want to know if you guys think that I am on the right track, or not. It will work basically like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;-There are 3 races, and one demo derby in a round.&#xD;&#xA;&#xD;&#xA;-Each race will be a 15 lap circuit (they are very small tracks, the  tracks will be visible within the entire screen, tracks will  be chosen at random.)&#xD;&#xA;&#xD;&#xA;-The winners will be displayed after each race, in leaderboard style. 1st place- 100pts. 2nd place- 75pts. 3rd place 50 pts. 4th and below- 10pts.&#xD;&#xA;&#xD;&#xA;-After all 3 races, averaged scores will be displayed; the final top 3 scores will then battle to the death in a demo derby &quot;bonus round&quot; type thing. (This will also serve as a tiebreaker, if that is necessary.)&#xD;&#xA;&#xD;&#xA;-The winner of the demo derby will receive 250pts., all others including non-participants get nothing. &#xD;&#xA;&#xD;&#xA;-The person with the highest averaged pts.  at the end of each round wins, and a new round begins.&#xD;&#xA;&#xD;&#xA;-I also plan to include a garage type thing, where you can buy, upgrade, and customize cars.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And that’s about it. Does my basic idea sound correct? Do I have any flaws? Please give me ways I could improve/edit this, thanks!&#xD;&#xA;" />
  <row Id="11436" PostHistoryTypeId="1" PostId="5751" RevisionGUID="a576f58d-383b-4678-86ae-ecd1586b9a7f" CreationDate="2010-11-19T02:00:05.893" UserId="3422" Text="Creating a top-view racing game, do I have the right ideas, any suggestions?" />
  <row Id="11437" PostHistoryTypeId="3" PostId="5751" RevisionGUID="a576f58d-383b-4678-86ae-ecd1586b9a7f" CreationDate="2010-11-19T02:00:05.893" UserId="3422" Text="&lt;game-design&gt;&lt;multiplayer&gt;" />
  <row Id="11438" PostHistoryTypeId="2" PostId="5752" RevisionGUID="216477f6-52a6-4998-b535-afe5113bc582" CreationDate="2010-11-19T02:57:12.497" UserId="422" Text="You're on the right track with [HTML5](http://www.html5rocks.com/). Most of the tech around it is certainly not &quot;new&quot; per se, but [JavaScript games](http://html5games.com/) being considered for real-world game development is. Mozilla recently started an initiative called [Game On 2010](https://gaming.mozillalabs.com/) which is getting a lot of attention, so you can bet that Canvas and JavaScript-based games will be picking up tons of speed in the next few months.&#xD;&#xA;&#xD;&#xA;Another choice for web-based games would be [Unity](http://unity3d.com/). The major downside is that the games require the [Unity browser plugin](http://unity3d.com/webplayer/), and its penetration is very low at the moment. While something like 90%+ of average Internet users have installed flash, Unity is much lower (in the single digits last I read). That said, Unity is very powerful and has been gaining lots of ground with developers this year.&#xD;&#xA;&#xD;&#xA;Most modern browsers can handle almost all of the tech that HTML5 games require. The biggest hit in user base is currently that Canvas isn't supported in current versions of Internet Explorer, but that'll change when [IE9](http://windows.microsoft.com/en-US/internet-explorer/download/ie-9/worldwide) is released. So my suggestion is definitely to beef up on your understanding of JavaScript and Canvas." />
  <row Id="11439" PostHistoryTypeId="2" PostId="5753" RevisionGUID="49b56b06-104d-46ca-9acf-8b66e0843c24" CreationDate="2010-11-19T03:14:33.300" UserId="619" Text=" - The core gameplay is the most important part of the game, making it &quot;fun&quot; should be done as soon as possible. Developing scoring rules should be way down the list of considerations.&#xD;&#xA; - It is almost impossible to tell if the rules &quot;feel right&quot; without actually having experienced them. For instance, 15 laps may be too long or short, and the points for different places may be too unbalanced. Make the game with any set of rules you think might work, test it, get others to try it, and use their feedback to tweak and refine the game rules until they're perfect.&#xD;&#xA; - Also, ideally you should let the player configure the game rules, including setting the number of laps per track and the number of races in a round." />
  <row Id="11440" PostHistoryTypeId="2" PostId="5754" RevisionGUID="482ab1a5-3a99-45a5-af9a-4230c303c48c" CreationDate="2010-11-19T03:43:27.383" UserId="2200" Text="[Recast &amp; Detour](http://code.google.com/p/recastnavigation/) is an awesome open source navigation mesh / path finding library. It's potentially got more appeal to larger titles than indie games, but I could definitely see it being useful to anyone wanting decent multi-agent movement in any 3D game.&#xD;&#xA;&#xD;&#xA;The [developer's (Mikko Mononen) blog](http://digestingduck.blogspot.com/) also has several interesting entries around steering, path finding and navigation in general.&#xD;&#xA;&#xD;&#xA;And it's actively maintained / developed." />
  <row Id="11441" PostHistoryTypeId="2" PostId="5755" RevisionGUID="5210f971-462d-417c-a23c-bfb2debb6e40" CreationDate="2010-11-19T03:46:42.550" UserDisplayName="Herfer" Text="How does the game Doodlejump for iphone generate its stage? Are the platforms randomized in some way? If so, how do they make sure it doesn't generate impossible combinations? &#xD;&#xA;&#xD;&#xA;If it's not randomized, how do they make sure it's different (or varied enough) every time?" />
  <row Id="11442" PostHistoryTypeId="1" PostId="5755" RevisionGUID="5210f971-462d-417c-a23c-bfb2debb6e40" CreationDate="2010-11-19T03:46:42.550" UserDisplayName="Herfer" Text="How does a game like Doodlejump generate its &quot;level&quot;?" />
  <row Id="11443" PostHistoryTypeId="3" PostId="5755" RevisionGUID="5210f971-462d-417c-a23c-bfb2debb6e40" CreationDate="2010-11-19T03:46:42.550" UserDisplayName="Herfer" Text="&lt;level-design&gt;&lt;generated&gt;" />
  <row Id="11444" PostHistoryTypeId="2" PostId="5756" RevisionGUID="aad320de-d529-4f25-a3ca-404c4c5f86db" CreationDate="2010-11-19T03:49:19.620" UserId="953" Text="Most solutions to this problem, including the Singleton pattern, involve the use of static variables.  If you'll only ever have one player, you can just have Player be a singleton class, which means you could access the Player instance through something like Player.currentPlayer.  Many people rage against Singletons, however.  You could also have a ResourceManager or similar class that contains static references to various useful global or pretty-darn-global variables.  In your code, you might as well make &quot;Gateway's&quot; variables statically accessible instead of inflating your code by passing it around everywhere." />
  <row Id="11445" PostHistoryTypeId="5" PostId="5729" RevisionGUID="0c646eae-34f9-41cd-8cfb-32aeb34ed740" CreationDate="2010-11-19T04:57:46.227" UserId="1251" Comment="added 76 characters in body; edited title; edited title" Text="Possible reference to [this question][1], but I want specific answers pertaining to Side-scrollers.&#xD;&#xA;&#xD;&#xA;IMO, side-scrollers can be classified as&#xD;&#xA;&#xD;&#xA; 1. Player doesn't move, the background graphics move to fake player movement.&#xD;&#xA; 2. Player moves also background moves, but background movement is dependent on the (x,y) movement of the player &gt; I find this more appealing&#xD;&#xA; 3. Player can't move, the background&#xD;&#xA;    moves at a fast speed. Depending&#xD;&#xA;    upon the obstacles coming along with&#xD;&#xA;    the background the player has to&#xD;&#xA;    perform actions like jumping,&#xD;&#xA;    ducking, charging, etc...&#xD;&#xA;&#xD;&#xA;I would like to know what all *other things* can be added to the gameplay so that the above mentioned 3 side-scroller categories can be made more addicting.Please mention the category of the side-scroller in your reply.&#xD;&#xA;&#xD;&#xA;**Edit** Modified the question title to reflect what I actually want&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/657/approaching-the-fun-factor-in-game-design&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11446" PostHistoryTypeId="4" PostId="5729" RevisionGUID="0c646eae-34f9-41cd-8cfb-32aeb34ed740" CreationDate="2010-11-19T04:57:46.227" UserId="1251" Comment="added 76 characters in body; edited title; edited title" Text="Different camera movement methods in a 2d- side-scrolling game that makes it fun" />
  <row Id="11447" PostHistoryTypeId="2" PostId="5757" RevisionGUID="a50c32cf-d425-489c-8e61-01b4bcbb98fb" CreationDate="2010-11-19T05:18:12.087" UserId="613" Text="If you want to use C++, I can highly recommend KDevelop4. They've made a lot of improvements that make it a very good IDE. Grab SFML or SDL and get hacking.&#xD;&#xA;&#xD;&#xA;I also highly recommend good old Vim or Emacs for any language.&#xD;&#xA;&#xD;&#xA;But if you want to just kick some code about, you might try Python+PyGame. You can get simple games up and running very quickly, and you don't need a fancy IDE.&#xD;&#xA;&#xD;&#xA;I haven't looked at them, but it looks like Ruby also has [a bunch of frameworks](http://ruby-toolbox.com/categories/game_libraries.html) you can try, if you want to learn Ruby." />
  <row Id="11448" PostHistoryTypeId="2" PostId="5758" RevisionGUID="cca56360-0574-44c2-80e5-31eb862b1575" CreationDate="2010-11-19T05:36:19.580" UserId="666" Text="Well, its generated on the fly, and definitely random.&#xD;&#xA;&#xD;&#xA;To make sure there is imposible jumps you need to tune your game to generate only possible yet interesting situations. It a really hard topic because it is totally different for each game. Luckily you can learn about some games by looking at it and analyzing how you would generate interesting levels.&#xD;&#xA;&#xD;&#xA;One very very very good resource here is an article about [Tuning Canabalt][1] on how the developer decided to make it not only possible but also hard, and interesting.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.semisecretsoftware.com/tuning-canabalt" />
  <row Id="11449" PostHistoryTypeId="2" PostId="5759" RevisionGUID="a277850d-5624-4c51-bf04-e888d3c584e1" CreationDate="2010-11-19T07:07:03.640" UserId="20" Text="This doesn't look like the Singleton pattern. The way I understand it, you're passing an object with references to important game-objects to all of your instances.&#xD;&#xA;&#xD;&#xA;If this would be the Singleton pattern, you would have:&#xD;&#xA;&#xD;&#xA;    AudioManager.getInstance().playSound(XY);&#xD;&#xA;&#xD;&#xA;Whereas in your case you might have:&#xD;&#xA;&#xD;&#xA;    this.gateway.getAudioManager().playSound(XY);&#xD;&#xA;&#xD;&#xA;It looks basically the same, but it really isn't. If you would want to replace `AudioManager` with a new (extended class) like `ExtendedAudioManager`, you would hit a wall using the Singleton pattern. Your gateway approach will handle that just fine though.&#xD;&#xA;&#xD;&#xA;The drawback of your approach is that you'll have to pass around the `gateway` everywhere. &#xD;&#xA;The [service locator pattern][1] (proposed by Joe Wreschnig in [this][2] thread), looks like a good replacement for your &quot;gateway pattern&quot;.&#xD;&#xA;&#xD;&#xA;Sometimes it's better to just run with the simple and straightforward method instead of over-designing things though. Especially when it's a small project or a prototype.&#xD;&#xA;Maybe you could make that `gateway` some sort of a global variable.. eg. `Game.gateway` and run with it.&#xD;&#xA;&#xD;&#xA;  [1]: http://gameprogrammingpatterns.com/service-locator.html&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/5505/alternatives-to-singletons-globals" />
  <row Id="11450" PostHistoryTypeId="2" PostId="5760" RevisionGUID="2e261336-b260-4e23-88b7-a39a38f36dc3" CreationDate="2010-11-19T07:07:38.790" UserId="395" Text="I've seen a number of interactive &quot;things&quot; lately done in [Processing](http://processing.org/). Not sure I would call most of them games, but they are on that spectrum." />
  <row Id="11451" PostHistoryTypeId="2" PostId="5761" RevisionGUID="dcd4c84f-b6d2-4baf-88df-cfa810670fca" CreationDate="2010-11-19T08:19:36.160" UserId="2992" Text="Figured out this algorithm which works well for my purposes. &#xD;&#xA;&#xD;&#xA;People brought up some great points. Giving it ultimate goal parameters would allow normal search algorithms to do their thing. ie. do optimal damage in t seconds, do x damage in optimal time.&#xD;&#xA;&#xD;&#xA;My algorithm simply returns the sequence of spells with the highest DPS. It is a fast algorithm as it cuts down on the size of the set you are traversing, does not require knowledge of other search tree techniques.&#xD;&#xA;&#xD;&#xA;The first step is to identify the spell with the highest damage per cast time.&#xD;&#xA;This spell becomes the &quot;baseline&quot; spell since it will guarantee the highest damage per second. Meaning, you should always cast this spell if the following 2 conditions are met: 1) The baseline spell is available (not on cooldown). 2) You are not currently casting a spell.&#xD;&#xA;&#xD;&#xA;So it then becomes a matter of filling in other spells while the baseline spell is on cooldown. Between (cast time) and (cooldown - cast time). However, some overlapping can occur (rule 2 above is false).&#xD;&#xA;&#xD;&#xA;It then becomes a matter of recursing through all non-baseline spells to find all sequences of spells which do not violate the 2 rules.&#xD;&#xA;&#xD;&#xA;For spells which DO overlap you must penalize them for potential damage the baseline spell could have done (up to its maximum damage).&#xD;&#xA;&#xD;&#xA;Take for example, 2 spells&#xD;&#xA;&#xD;&#xA;1: 300 damage, 3s cast time, 10s cooldown&#xD;&#xA;&#xD;&#xA;2: 290 damage, 3s cast time, 3s cooldown&#xD;&#xA;&#xD;&#xA;The most damage comes from the sequence 1 - 2 - 2 - 2. Which causes an overlap of 2 seconds into a potential #1 cast. However, this is still beneficial since if you dont cast the third spell (ie. 1 - 2 - 2) you will do 880 damage with 1 second to spare. If you cast the extra #2 spell you will do 1170 - 2 second of #1 which is 200. So 970 damage is your relative damage." />
  <row Id="11452" PostHistoryTypeId="2" PostId="5762" RevisionGUID="929a4074-cea0-4273-9300-e4d0e0fb8123" CreationDate="2010-11-19T08:33:21.667" UserId="2954" Text="Have you considered Silverlight?" />
  <row Id="11453" PostHistoryTypeId="2" PostId="5763" RevisionGUID="3cc8f090-6a3f-43cd-b2da-56d31a84a2a3" CreationDate="2010-11-19T09:24:35.977" UserId="2091" Text="Regarding C++, a very cool IDE is [QtCreator][1].  On Linux, chances are that you have Qt already in your system, if you have KDE applications installed, even if running Gnome.&#xD;&#xA;&#xD;&#xA;If you want to try other scripting languages for simple games, I've had a very pleasant experience with [Löve2D][2], a game engine for [Lua][3].  It's very easy to get something fun made in no time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://qt.nokia.com/products&#xD;&#xA;  [2]: http://love2d.org/&#xD;&#xA;  [3]: http://www.lua.org/" />
  <row Id="11454" PostHistoryTypeId="5" PostId="5632" RevisionGUID="45a9e7e7-0245-48f2-98f4-eff335e189c8" CreationDate="2010-11-19T09:43:39.800" UserId="3212" Comment="wanted to have scripting example in UnrealScript" Text="If i have to create a Battle System for a game which is like Final Fantasy 10 Turn Based battle system or Shadow Hearts Ring Based Battle System and likewise.  &#xD;&#xA;&#xD;&#xA;How should i start with scripting a particular part of the game? Any reference,blogs,sources,code snippets will be helpful.  &#xD;&#xA;&#xD;&#xA;Any scripting language will do as i have to overlook some examples directly of different scripting languages.  &#xD;&#xA;&#xD;&#xA;Please try to provide a small example of scripting for some part of game say cutscene,battle,combat system etc. in UnrealScript." />
  <row Id="11455" PostHistoryTypeId="2" PostId="5764" RevisionGUID="80da83a0-b65d-4a43-9aa4-00e2b5cf4579" CreationDate="2010-11-19T10:07:25.627" UserId="1018" Text="While it's true that Apples SDK only support Macs for iphone-development, i know of atleast one alternative that works on Windows. Airplay SDK: http://www.airplaysdk.com/&#xD;&#xA;&#xD;&#xA;It's a cross plattform SDK and that comes with it's own with advantages and disadvantages. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="11456" PostHistoryTypeId="2" PostId="5765" RevisionGUID="fe251e2c-2af8-4c6e-af12-da79e69f1a0d" CreationDate="2010-11-19T10:21:24.833" UserDisplayName="James F." Text="Theoretically if you can use a pseudo-random number generator (such as Perlin-Noise or Marsenne Twister) to share maps via &#xD;&#xA;&#xD;&#xA;seed numbers then you can also create custom maps and reduce them to seeds, solving the issue of not being able to create &#xD;&#xA;&#xD;&#xA;custom maps when using PRNGs. This however is built on a few presumptions. Namely that pseudo-random number generators are &#xD;&#xA;&#xD;&#xA;a reversible process and that ANY data fed backwards into a PRNG will produce a valid seed, let alone a seed at all!" />
  <row Id="11457" PostHistoryTypeId="2" PostId="5766" RevisionGUID="6240a06e-977f-43e7-914f-bfdbad833d7f" CreationDate="2010-11-19T10:34:40.577" UserId="3461" Text="I currently try to rotate a camera (using gluLookAt()) around a point  , i successfully do it for rotating around one global axis.&#xD;&#xA;&#xD;&#xA;But when i want to use more than one axis , I'm stuck . I've searched around and it's seem i need to use something like axis-angle or quaternion (that i don't understand at all for now)&#xD;&#xA;&#xD;&#xA;for rotating my camera i have 3 angles (using accelerometer and geomagnetic values).&#xD;&#xA;&#xD;&#xA;How can i determine the point of view , using three angle and the radius ? knowing the the camera itself is at the point of origin (0,0,0).&#xD;&#xA;&#xD;&#xA;I prefer using gluLookAt() than moving the whole scene if possible." />
  <row Id="11458" PostHistoryTypeId="1" PostId="5766" RevisionGUID="6240a06e-977f-43e7-914f-bfdbad833d7f" CreationDate="2010-11-19T10:34:40.577" UserId="3461" Text="Camera Rotation using angles" />
  <row Id="11459" PostHistoryTypeId="3" PostId="5766" RevisionGUID="6240a06e-977f-43e7-914f-bfdbad833d7f" CreationDate="2010-11-19T10:34:40.577" UserId="3461" Text="&lt;opengl&gt;&lt;camera&gt;&lt;rotation&gt;" />
  <row Id="11460" PostHistoryTypeId="2" PostId="5767" RevisionGUID="7d6f34e7-6873-416a-82ec-655fa598ff72" CreationDate="2010-11-19T10:37:06.647" UserId="744" Text="This is called the &lt;a href=&quot;http://stackoverflow.com/questions/771983/what-is-context-object-design-pattern&quot;&gt;context object design pattern&lt;/a&gt;, and it is better than the singleton pattern.&#xD;&#xA;&#xD;&#xA; * Context objects aid testing, because you can pass mock contexts to functions you want to test. Singletons hinder it, because to mock singletons you need to make them not singletons.&#xD;&#xA; * Context objects makes your &quot;global state&quot; explicit, and therefore easier to reason about. If a function doesn't take a context object, you know it doesn't use any global context state. You have no such guarantee with singletons or global variables.&#xD;&#xA; * Context objects are _very slightly_ slower if you don't use them, because you add another parameter to all your function calls. They can be _faster_ than globals if you do use them, and are nearly always faster than singletons.&#xD;&#xA; * Context objects are easier to implement; usually they live on the heap or stack in a normal way. Singletons have tricky issues involving threading in many languages.&#xD;&#xA;&#xD;&#xA;So no, this is not a singleton, it's way better than a singleton.&#xD;&#xA;&#xD;&#xA;***However,*** you're still passing around a crapload of state - the fact you're keeping it all in a single local variable makes it more explicit, but still creates major &lt;a href=&quot;http://en.wikipedia.org/wiki/Separation_of_concerns&quot;&gt;conflation of concerns&lt;/a&gt;. Keep in mind &lt;a href=&quot;http://c2.com/cgi/wiki?OneResponsibilityRule&quot;&gt;the one responsibility rule&lt;/a&gt;. It makes some sense for there to be a context that owns the player and the current level - they're related - but why does the same context own your keyboard input?&#xD;&#xA;&#xD;&#xA;Consider different levels of contexts, for example:&#xD;&#xA;&#xD;&#xA; * GameplayContext - owns the player, enemies, the level geometry, etc.&#xD;&#xA; * InputContext - owns keyboard and mouse handles, input events, etc.&#xD;&#xA; * GraphicsContext - owns textures, the window handle, etc.&#xD;&#xA; * GlobalContext - owns a GameplayContext, a GraphicsContext, and an InputContext. This is where you want to apply the &lt;a href=&quot;http://gameprogrammingpatterns.com/service-locator.html&quot;&gt;service locator pattern&lt;/a&gt;, to be able to swap out some contexts for others as needed. And maybe, for quick iteration and testing, this should be in a real global variable - just realize that whenever you use it, &lt;a href=&quot;http://www.c2.com/cgi/wiki?TechnicalDebt&quot;&gt;you're building up tech debt&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;These contexts still conflate concerns somewhat - maybe some event handler takes a GameplayContext and really only needs the player - but the responsibilities are clearly laid out. You know that something that takes a GameplayContext won't load a texture; something taking an InputContext can't kill a player." />
  <row Id="11461" PostHistoryTypeId="4" PostId="5748" RevisionGUID="28fe7d5d-eff1-4590-b328-2509e5b8cbf0" CreationDate="2010-11-19T10:39:08.487" UserId="744" Comment="edited tags; edited title" Text="What pattern is this, and should I do it?" />
  <row Id="11462" PostHistoryTypeId="6" PostId="5748" RevisionGUID="28fe7d5d-eff1-4590-b328-2509e5b8cbf0" CreationDate="2010-11-19T10:39:08.487" UserId="744" Comment="edited tags; edited title" Text="&lt;flash&gt;&lt;best-practices&gt;&lt;actionscript-3&gt;&lt;design-patterns&gt;" />
  <row Id="11463" PostHistoryTypeId="5" PostId="5766" RevisionGUID="94a39bc5-399e-4028-8d41-dde7dc3ff7a3" CreationDate="2010-11-19T11:00:26.510" UserId="3461" Comment="added 44 characters in body" Text="I currently try to rotate a camera (using gluLookAt()) around a point  , i successfully do it for rotating around one global axis.&#xD;&#xA;&#xD;&#xA;But when i want to use more than one axis , I'm stuck . I've searched around and it's seem i need to use something like axis-angle or quaternion (that i don't understand at all for now)&#xD;&#xA;&#xD;&#xA;for rotating my camera i have 3 angles (using accelerometer and geomagnetic values).&#xD;&#xA;&#xD;&#xA;How can i determine the point of view , using three angle and the radius ? knowing the the camera itself is at the point of origin (0,0,0).&#xD;&#xA;&#xD;&#xA;I prefer using gluLookAt() than moving the whole scene if possible(event if i know that almost the same thing)." />
  <row Id="11464" PostHistoryTypeId="2" PostId="5768" RevisionGUID="0f952a28-d286-4995-bee4-ad995471e9ba" CreationDate="2010-11-19T11:07:38.743" UserId="678" Text="I would suggest keeping track of the pivot (that is, what the player is looking at in `gluLookAt`) explicitly. If the player looks left, rotate the pivot to the left around his head. If he looks up, move it up. Every frame use `gluLookAt` with the adjusted pivot.&#xD;&#xA;This is a bit wasteful compared to other techniques, but it has the benefit of being easy to visualize. You can even show a primitive at the pivot position to verify it's where you think it is.&#xD;&#xA;&#xD;&#xA;In the long run, it's probably worth investing in learning quaternions. Using multiple angles along fixed axes (called Euler Angles) will end up causing you more trouble than you can imagine, as the rotations will be interdependent. I'm sure you've seen it happen in examples, you look up, then turn around. When turning around you turn around along the current up-axis instead of the vertical, and you end up looking down.&#xD;&#xA;There's also the matter of gimbal lock, but in practice that's not nearly as annoying as the above.&#xD;&#xA;&#xD;&#xA;Here is a decent [tutorial on quaternions][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm" />
  <row Id="11465" PostHistoryTypeId="2" PostId="5769" RevisionGUID="1444fe1d-a7c7-41a1-b854-4889ee399f50" CreationDate="2010-11-19T11:46:57.143" UserId="3326" Text="So I am designing a game like scrabble in which a user has to make words using the letters on the screen. When the there is no possible combination of word that can be made with the letter the game is automatically supposed to tell the user to shuffle. Which changes the present set of alphabets with a new set (odd are very very very low that the new set cannot form a word either.)&#xD;&#xA;&#xD;&#xA;So I now its a simple word game, but I am making this on HTML5 Canvas. It hugely resource consuming. And I need to run this even heavier computation on the client machine of whether a new word is possible from the selection on the screen. Ideally I would run a thread were this an app for the native code, and check after every new word created whether new words are possible with the remaining alphabets. Alas on the web browser I am afraid, it will toast the computer, crash the browser and a lot of other horrible things. So I would like to know is there a way that I could make such a computation feasible with all the other actions I am already running!?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="11466" PostHistoryTypeId="1" PostId="5769" RevisionGUID="1444fe1d-a7c7-41a1-b854-4889ee399f50" CreationDate="2010-11-19T11:46:57.143" UserId="3326" Text="Webworkers HTML5 for game AI?" />
  <row Id="11467" PostHistoryTypeId="3" PostId="5769" RevisionGUID="1444fe1d-a7c7-41a1-b854-4889ee399f50" CreationDate="2010-11-19T11:46:57.143" UserId="3326" Text="&lt;ai&gt;&lt;web&gt;&lt;html5&gt;" />
  <row Id="11468" PostHistoryTypeId="2" PostId="5770" RevisionGUID="057e6af9-35ab-48f8-bb6c-f6c335fe31e2" CreationDate="2010-11-19T12:45:15.200" UserId="3444" Text="I think you should just first start by implementing this without WebWorkers. Then measure and see how much it slows down the browser. If this is as bad as you think it will be, then go for a Webworker. This shouldn't be a very hard refactoring if you structure your code well." />
  <row Id="11469" PostHistoryTypeId="2" PostId="5771" RevisionGUID="25452bd9-1a20-4d44-aa00-62843d1d6346" CreationDate="2010-11-19T13:06:19.870" UserId="119" Text="Box2D seems to be set up in such a way that you cannot work in pixels (i.e. physics scale = 1). It produces very strange results as it hits maximum speed limits at low speeds and looks very strange. It only seems to work well at a physics scale of around 15 or 30. For me, working in pixels is the logical way to handle physics and movement in a game, as you are already using that measurement for lots of other things. I don't want to have postionX/30 all over my code, so what variables do I need to hack in the box2d source in order to make physics scale 1 work as if it was physics scale 30? I'm using the latest version from box2dflash.org." />
  <row Id="11470" PostHistoryTypeId="1" PostId="5771" RevisionGUID="25452bd9-1a20-4d44-aa00-62843d1d6346" CreationDate="2010-11-19T13:06:19.870" UserId="119" Text="What do I need to change in Box2D to work in pixels?" />
  <row Id="11471" PostHistoryTypeId="3" PostId="5771" RevisionGUID="25452bd9-1a20-4d44-aa00-62843d1d6346" CreationDate="2010-11-19T13:06:19.870" UserId="119" Text="&lt;flash&gt;&lt;physics&gt;&lt;box2d&gt;" />
  <row Id="11472" PostHistoryTypeId="2" PostId="5772" RevisionGUID="cce49410-d86f-4a6e-b7da-01acf8a11788" CreationDate="2010-11-19T13:32:09.933" UserId="3446" Text="I would advice against changing it, for a couple of reasons:&#xD;&#xA;&#xD;&#xA;1) It might not be a trivial task; it's been a while since I last used Box2D, but I don't think it has changed much regarding that).&#xD;&#xA;&#xD;&#xA;2) Using pixels can lead to very (I mean, VERY) large numbers, and lead to some computation errors.&#xD;&#xA;&#xD;&#xA;Instead of having posX/30 all over your code, as you said, ¿why not try something like a static method &lt;i&gt;ToPixelUnits&lt;/i&gt; (or whatever), which returns the pixels, so that you can use it when displaying things on the screen?" />
  <row Id="11473" PostHistoryTypeId="2" PostId="5773" RevisionGUID="6261ef00-ed43-4ed8-be3f-b9ed3bfc88db" CreationDate="2010-11-19T15:30:31.613" UserId="3339" Text="If you intend to create games, which is a fair assumption IMO given this website's main theme ;) , there are also multiplatform engines both for android and iphone, like unity3d, although you still need a Mac because Xcode is used in the compilation and code signing.&#xD;&#xA;&#xD;&#xA;So, the easy way to develop in both plattforms is buying a mac, cause the Android SDK, and specially the Android NDK (Native Development Kit) fits an unix-like environment like Mac very well" />
  <row Id="11474" PostHistoryTypeId="2" PostId="5774" RevisionGUID="2e4c4bbc-d629-449a-98e7-87e3e88dd9c5" CreationDate="2010-11-19T15:56:16.350" UserId="3469" Text="If you want to create high-performance real time games, or you want to get into professional game development, then only C or C++ are practical language choices currently.&#xD;&#xA;&#xD;&#xA;This is because&#xD;&#xA;a) They can create fast, efficient code using small amounts of memory (many high level languages do not give you the ability to explicitly control memory allocation, which makes it difficult to optimise cache usage or fit data in the limited memory used by many systems).&#xD;&#xA;b) They are the industry standards that are used by the vast majority of AAA games. Particularly C++, though the languages are reasonably similar (when it comes to the ways they are used in Game Development anyway).&#xD;&#xA;&#xD;&#xA;For a framework, I would advise learning OpenGL. It might be a little bit more complicated than some systems, but it's very powerful and widely used, and your knowledge can scale up from Pong all the way up to Unreal. There are plenty of good tutorials, just google for 'OpenGL tutorial'.&#xD;&#xA;&#xD;&#xA;To make things slightly easier, you can use an OpenGL wrapper framework (I recommend GLFW - http://www.glfw.org/ - though GLUT is also popular).&#xD;&#xA;&#xD;&#xA;As much as possible, try to write the code yourself rather than relying on pre-built frameworks. This will teach you the basics of game update loops, input processing, rendering, etc. That will stand you in great stead for building more detailed projects later." />
  <row Id="11475" PostHistoryTypeId="2" PostId="5775" RevisionGUID="3dd9e0c0-2cd1-478d-9c94-27b6a7a1d9e4" CreationDate="2010-11-19T16:04:03.657" UserId="3469" Text="These two probably go without saying, but:&#xD;&#xA;&#xD;&#xA;- OpenGL (rendering) &#xD;&#xA;- OpenAL (audio)&#xD;&#xA;&#xD;&#xA;are both high-quality industry staples that are open source and cross-platform. Always worth considering." />
  <row Id="11479" PostHistoryTypeId="5" PostId="5772" RevisionGUID="ab1c2dfd-2f09-44a4-8bb7-bc25ab4a62ba" CreationDate="2010-11-19T16:40:06.213" UserId="3446" Comment="deleted 6 characters in body" Text="I would advice against changing it, for a couple of reasons:&#xD;&#xA;&#xD;&#xA;1) It might not be a trivial task; it's been a while since I last used Box2D, but I don't think it has changed much regarding that.&#xD;&#xA;&#xD;&#xA;2) Using pixels can lead to very (I mean, VERY) large numbers, and to some computation errors.&#xD;&#xA;&#xD;&#xA;Instead of having posX/30 all over your code, as you said, ¿why not try something like a static method &lt;i&gt;ToPixelUnits&lt;/i&gt; (or whatever), which returns the pixels, so that you can use it when displaying things on the screen?" />
  <row Id="11480" PostHistoryTypeId="2" PostId="5777" RevisionGUID="623213df-1298-4828-b013-1264283af77d" CreationDate="2010-11-19T16:41:37.387" UserId="51" Text="If you really want to have your options open, just by a Mac.  You could always bootcamp it into Windows if you really need to be on the PC side of things.   That way you get a proper native iPhone dev environment, and a really good Android environment (since, like was already said, it's very Unix-like).  And the option to switch over later if you really need to.&#xD;&#xA;&#xD;&#xA;Of course this costs the most amount of money." />
  <row Id="11481" PostHistoryTypeId="2" PostId="5778" RevisionGUID="eae51be2-8649-43f1-b498-b63e78a20e59" CreationDate="2010-11-19T16:42:25.217" UserId="3469" Text="Networking.&#xD;&#xA;&#xD;&#xA;For starters, a good system for NAT (Network Address Traversal) and routing, to combat any woes with firewalls and proxies. PC gamers should never have to deal with forwarding ports or anything similar.&#xD;&#xA;&#xD;&#xA;Even better: An open-source, distributed multiplayer game network (eg. Battle.net, Xbox Live, PSN...). This would essentially be a protocol that anyone can implement, and anyone can run a server - they just communicate with each other to pass around information about who can be found where. Similar to distributed social networks (eg. Diaspora), this keeps any one party from having control, whilst allowing any indie game to seamlessly integrate into it.&#xD;&#xA;&#xD;&#xA;Imagine if you could just add your friends as 'friends', and then any game you ever played you could just invite them straight away, no ip addresses, no id lookups, you just take them with you. Basically what B.net/XBL/PSN do already, but open and free for all!" />
  <row Id="11482" PostHistoryTypeId="2" PostId="5779" RevisionGUID="57958e9b-e424-49d5-96c0-1b12770785a0" CreationDate="2010-11-19T16:59:31.780" UserId="2287" Text="You can try what Gaston suggested or design a very simple class that takes care of the conversion implicitly** when you pass in the position values from Box2D (the class can also have overloaded operators to make the conversion even simpler). All your 'pixels' can then inherit from this class (or use it directly if they are not doing anything special). This will make your code look less cluttered as compared to function calls and also more scalable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;** by implicit I mean you will have to perform the conversion manually and in such a way that when a function such as `SetPosition()` is called, it performs the conversion which is then transparent to the client who is using the new 'pixel box 2D object'" />
  <row Id="11483" PostHistoryTypeId="2" PostId="5780" RevisionGUID="2b8fa571-d395-4921-9cd9-9e46eda3cf87" CreationDate="2010-11-19T17:05:32.067" UserId="2232" Text="A real MMO platform, ie. one that supplies the middleware, lobby functions, etc, into which you can plug in your engine." />
  <row Id="11485" PostHistoryTypeId="2" PostId="5782" RevisionGUID="4c168d0d-0c7e-4f28-8f10-f8d65220617b" CreationDate="2010-11-19T17:19:44.010" UserId="3449" Text="I think [OpenGL][1] and [OpenAL][2] are extremely obvious, but beyond that...&#xD;&#xA;&#xD;&#xA;API&#xD;&#xA;&#xD;&#xA; - [Bullet][3] 3D Physics engine, used in AAA titles&#xD;&#xA; - [Chipmunk][4] Flexible and Powerful 2D Physics engine in straight C&#xD;&#xA; - [Box2D][5] Another robust and popular 2D physics engine&#xD;&#xA; - [FPMath][6] C++ template based math library, specifically for dealing with Fixed Point arithmetic (requires [Boost][7])&#xD;&#xA; - [OpenSteer][8] Steering Behaviors for Autonomous Characters&#xD;&#xA; - [Xiph][9] home of lots of open source audio and video alternatives like Vorbis and Theora&#xD;&#xA;&#xD;&#xA;Tools&#xD;&#xA;&#xD;&#xA; - [Blender][10] 3D Modeling Tool with a great deal of functionality and support for many different file formats&#xD;&#xA; - [Google Sketchup][11] Probably the easiest to use 3D modeler in existence today&#xD;&#xA; - [Gimp][12] 2D Raster image manipulation, very robust feature set&#xD;&#xA; - [Inkscape][13] 2D Vector image manipulation, based on SVG&#xD;&#xA; - [sfxr][14] Sound effect generator, great if you're in a hurry or don't have an audio specialist&#xD;&#xA; - [FFMpeg][15] record, convert and stream audio and video&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [RakNet][16] cross platform, open source, networking engine for game programmers (RakNet 4 is free for independent Developers that gross $50K or less)&#xD;&#xA; - [Irrlicht][17] open source high performance realtime 3D engine written and usable in C++ and also available for .NET languages.&#xD;&#xA; - [Ogre3D][18] One of the most popular open source game engines, and for good reason&#xD;&#xA;&#xD;&#xA;Mobile Specific (since that's what I'm into at the moment)&#xD;&#xA;&#xD;&#xA; - [PowerVR SDK][19] The reference for doing advanced things with the graphics hardware on iOS devices, includes lots of free tools and example code&#xD;&#xA; - [Oolong][20] game engine that includes much of the above mentioned, optimized for PowerVR on the iphone, maintained by [Wolfgang Engel][21] and [Erwin Coumans][22] of Grand Theft Auto fame&#xD;&#xA; - [Cocos2D][23] free Objective-C based iPhone specific port of the Python original, very easy to use and lots of community support&#xD;&#xA; - [VFPMath][24] Crazy fast math library written mostly with inline assembly to take advantage of the ARM processor&#xD;&#xA; - [AndEngine][25] 2D OpenGL Game Engine for Android&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/&#xD;&#xA;  [2]: http://connect.creativelabs.com/openal/default.aspx&#xD;&#xA;  [3]: http://bulletphysics.org/wordpress/&#xD;&#xA;  [4]: http://code.google.com/p/chipmunk-physics/&#xD;&#xA;  [5]: http://www.box2d.org/&#xD;&#xA;  [6]: http://code.google.com/p/fpmath/&#xD;&#xA;  [7]: http://www.boost.org/&#xD;&#xA;  [8]: http://opensteer.sourceforge.net/&#xD;&#xA;  [9]: http://www.xiph.org/&#xD;&#xA;  [10]: http://www.blender.org/&#xD;&#xA;  [11]: http://sketchup.google.com/&#xD;&#xA;  [12]: http://www.gimp.org/&#xD;&#xA;  [13]: http://inkscape.org/&#xD;&#xA;  [14]: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;  [15]: http://www.ffmpeg.org/&#xD;&#xA;  [16]: http://www.jenkinssoftware.com/&#xD;&#xA;  [17]: http://irrlicht.sourceforge.net/&#xD;&#xA;  [18]: http://www.ogre3d.org/&#xD;&#xA;  [19]: http://www.imgtec.com/powervr/insider/powervr-sdk.asp&#xD;&#xA;  [20]: http://code.google.com/p/oolongengine/&#xD;&#xA;  [21]: http://www.mobygames.com/developer/sheet/view/developerId,158706/&#xD;&#xA;  [22]: http://www.mobygames.com/developer/sheet/view/developerId,182064/&#xD;&#xA;  [23]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [24]: http://code.google.com/p/vfpmathlibrary/&#xD;&#xA;  [25]: http://code.google.com/p/andengine/" />
  <row Id="11486" PostHistoryTypeId="5" PostId="5749" RevisionGUID="b437c6c3-efd6-4865-916e-aee9c7e331f2" CreationDate="2010-11-19T17:40:58.830" UserId="3053" Comment="fix formatting" Text="Examples of tools/projects I found interesting are:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* [CMU's Motion Capture Database][1]&#xD;&#xA;* [OpenSteer][2]&#xD;&#xA;* Biped motion simulation (which I can't seem to find the link)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion&#xD;&#xA;  [2]: http://www.google.com.uy/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBgQFjAA&amp;url=http%3A%2F%2Fopensteer.sourceforge.net%2F&amp;ei=z7flTO2lLMO88gaM3vjVDQ&amp;usg=AFQjCNHxQjLl3mtBNnYDTdW50UHGFUh7Ug&amp;sig2=jrzoX3TmUWQpg9c5tjiaww" />
  <row Id="11488" PostHistoryTypeId="6" PostId="5771" RevisionGUID="798f68d2-cfaa-493b-8dc5-810e07aad623" CreationDate="2010-11-19T18:44:48.790" UserId="962" Comment="edited tags" Text="&lt;flash&gt;&lt;physics&gt;&lt;actionscript-3&gt;&lt;box2d&gt;" />
  <row Id="11489" PostHistoryTypeId="2" PostId="5783" RevisionGUID="25e7ea7c-8f74-42fe-a1d9-713c5fa7d4c4" CreationDate="2010-11-19T18:47:03.267" UserId="154" Text="&gt; -After all 3 races, averaged scores will be displayed; the final top 3 scores will then battle to the death in a demo derby &quot;bonus round&quot; type thing. (This will also serve as a tiebreaker, if that is necessary.)&#xD;&#xA;&#xD;&#xA;This throws up an immediate red flag. You don't want rounds that don't include all players. If you have 8 total players and 5 of them just have to sit there and watch the last round they will quit. &#xD;&#xA;&#xD;&#xA;&gt; The winner of the demo derby will receive 250pts, all others including non-participants get nothing.&#xD;&#xA;&#xD;&#xA;Second red flag. A player who places first in the first 3 races only has 300pts a player who places in 3rd for 3 races has 150pts. What this means is that the first three races are only important for getting into the final. But they are effectively thrown out as the winner of the derby effectively wins the whole round. &#xD;&#xA;&#xD;&#xA;This is doubly troubling since derby and racing are different skill-sets. So your winners will always be the best derby drivers who have just enough racing skill to get into the final round.&#xD;&#xA;" />
  <row Id="11493" PostHistoryTypeId="6" PostId="2938" RevisionGUID="834e12ed-496c-4bf0-bc53-5ea15e944796" CreationDate="2010-11-19T18:53:25.333" UserId="14" Comment="edited tags" Text="&lt;animation&gt;&lt;skeletal&gt;" />
  <row Id="11494" PostHistoryTypeId="2" PostId="5784" RevisionGUID="36e3be07-b641-4f04-ac63-0aaae0d5e705" CreationDate="2010-11-19T18:55:13.013" UserId="458" Text="Red flag: your design is missing a &quot;hook&quot; -- what is it about this game that would make someone want to play it? There are only about a zillion racing games, ranging from hyper-realistic NASCAR to powerup-based kart-racing, 2d to 3d, single to multiplayer. There are racing games for arcade, console, and PC, and probably a bunch for Web and smartphone, too. I'm not seeing anything in your design that hasn't been done before many times; where does this game stand out? What does this game give you that you can't get from dozens of other similar games in the genre? Start there, before figuring out details like point scores and number of laps." />
  <row Id="11495" PostHistoryTypeId="2" PostId="5785" RevisionGUID="f35b22f9-b886-4b1a-ac71-298cf713d043" CreationDate="2010-11-19T19:22:40.647" UserId="3470" Text="Are there any good, modern widget toolkits for Pygame? I've looked at [pgu][1], but it's apparently unmaintained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/pgu/" />
  <row Id="11496" PostHistoryTypeId="1" PostId="5785" RevisionGUID="f35b22f9-b886-4b1a-ac71-298cf713d043" CreationDate="2010-11-19T19:22:40.647" UserId="3470" Text="Pygame widget library" />
  <row Id="11497" PostHistoryTypeId="3" PostId="5785" RevisionGUID="f35b22f9-b886-4b1a-ac71-298cf713d043" CreationDate="2010-11-19T19:22:40.647" UserId="3470" Text="&lt;programming&gt;&lt;graphics-programming&gt;&lt;libraries&gt;&lt;pygame&gt;" />
  <row Id="11498" PostHistoryTypeId="2" PostId="5786" RevisionGUID="f5d3a96e-5273-4f15-a111-be9c74fe8834" CreationDate="2010-11-19T19:38:31.930" UserId="2910" Text="This sounds like a great startup project if you don't have much experience with game programming.&#xD;&#xA;&#xD;&#xA;I wouldn't necessarily think you need a &quot;Hook&quot; unless you plan to really allow the game to take off. However some considerations I would keep in mind.&#xD;&#xA;&#xD;&#xA;You Garage system needs a great deal of emphasis in design and how much customization you allow (the more the better). To me as a gamer, this is what makes games insanely fun.&#xD;&#xA;&#xD;&#xA;wkerslake is absolutely correct, you do not want rounds that do not include everyone. Consider changing this in someway, perhaps you can somehow include those players but controlling hazardous obstacles and power-ups during the race. This might introduce a degree of politics in your game! =)&#xD;&#xA;&#xD;&#xA;Remember, its YOUR game and YOUR design. If its good or bad you still made a great game!" />
  <row Id="11499" PostHistoryTypeId="2" PostId="5787" RevisionGUID="67051a29-a90f-4199-8c9d-10736f9766da" CreationDate="2010-11-19T20:35:02.153" UserId="3214" Text="I am a Python programmer (I know the ins and outs decently well), and I have dabbled with PyGame. I want to make 3D applications and games, and so naturally I've been looking at OpenGL. &#xD;&#xA;&#xD;&#xA;Pyglet uses OpenGL, and the Programming Website and Documentation is up there with the best I've seen as far as Libraries and APIs go. [Pyglet Docs/Programming Guide][1]&#xD;&#xA;&#xD;&#xA;Is there a place on the net where other Pyglet programmers go to share projects and source code, like there is for pygame? [Pygame.org][2]. &#xD;&#xA;&#xD;&#xA;I would love to see how other people are combining game logic and OpenGL graphical code to create a simple game (it really helps the learning process)&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pyglet.org/documentation.html &quot;Pyglet Docs and Guide&quot;&#xD;&#xA;  [2]: http://pygame.org &quot;Pygame&quot;" />
  <row Id="11500" PostHistoryTypeId="1" PostId="5787" RevisionGUID="67051a29-a90f-4199-8c9d-10736f9766da" CreationDate="2010-11-19T20:35:02.153" UserId="3214" Text="3D game in Pyglet" />
  <row Id="11501" PostHistoryTypeId="3" PostId="5787" RevisionGUID="67051a29-a90f-4199-8c9d-10736f9766da" CreationDate="2010-11-19T20:35:02.153" UserId="3214" Text="&lt;3d&gt;&lt;python&gt;" />
  <row Id="11502" PostHistoryTypeId="2" PostId="5788" RevisionGUID="92385ba5-fbe2-435c-88a5-d590ffab6dd7" CreationDate="2010-11-19T21:55:46.097" UserId="3476" Text="I was thinking of developing several rather simple card games in DirectX (3D), but I'm not sure if C# and XNA are powerfull enough for this.&#xD;&#xA;&#xD;&#xA;Perhaps the most appropriate question is: can you choose one or several already available 3D games that you think are the best XNA can achieve?" />
  <row Id="11503" PostHistoryTypeId="1" PostId="5788" RevisionGUID="92385ba5-fbe2-435c-88a5-d590ffab6dd7" CreationDate="2010-11-19T21:55:46.097" UserId="3476" Text="Developing 3D card game. Is C# good enough?" />
  <row Id="11504" PostHistoryTypeId="3" PostId="5788" RevisionGUID="92385ba5-fbe2-435c-88a5-d590ffab6dd7" CreationDate="2010-11-19T21:55:46.097" UserId="3476" Text="&lt;xna&gt;&lt;c#&gt;&lt;directx&gt;" />
  <row Id="11505" PostHistoryTypeId="5" PostId="5735" RevisionGUID="7a1f4979-a336-4ce9-b106-26e45f70e6cf" CreationDate="2010-11-19T22:00:39.080" UserId="3446" Comment="Added clarification about which tools to post" Text="Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big-budget games.&#xD;&#xA;&#xD;&#xA;**EDIT:** As suggested by The Communist Duck and Joe Wreschnig, I'm putting the examples as answers.&#xD;&#xA;&#xD;&#xA;**EDIT 2:** Please do not post tools like PyGame, Inkscape, Gimp, Audacity, Slick2D, Phys2D, Blender (except for interesting plugins) and the like. I know they are great tools/libraries and some would argue &lt;i&gt;essential&lt;/i&gt; to develop good games, but I'm looking for more rare projects. Could be something really specific or niche, like generating realistic trees and plants, or realistic AI for animals." />
  <row Id="11506" PostHistoryTypeId="2" PostId="5789" RevisionGUID="e4b06649-b3ba-4189-8732-1c15006c802c" CreationDate="2010-11-19T22:10:01.593" UserId="51" Text="Yes.&#xD;&#xA;&#xD;&#xA;See also this question: http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" />
  <row Id="11507" PostHistoryTypeId="2" PostId="5790" RevisionGUID="e7a19405-b091-489e-bbf4-3b1f308c31d3" CreationDate="2010-11-19T22:13:05.480" UserId="2345" Text="You're thinking about it all wrong. XNA pretty much is Direct3d for c#. Especially on the PC where there is little overhead on the draw calls compared to the Xbox 360. Further more, any shader code you write will run exactly the same as it would using Direct3d." />
  <row Id="11508" PostHistoryTypeId="5" PostId="5790" RevisionGUID="67d0734f-5c3b-45ec-ac3a-82e2e6841c10" CreationDate="2010-11-19T22:23:14.350" UserId="2345" Comment="added 84 characters in body" Text="You're thinking about it all wrong. XNA pretty much is Direct3d for c#. Especially on the PC where there is little overhead on the draw calls compared to the Xbox 360. Further more, any shader code you write will run exactly the same as it would using Direct3d.&#xD;&#xA;&#xD;&#xA;The question you should be asking is &quot;would I benefit from using c++ over c#?&quot;. " />
  <row Id="11509" PostHistoryTypeId="2" PostId="5791" RevisionGUID="57d5689c-25f2-4d29-b365-81aac91f8e49" CreationDate="2010-11-19T22:25:29.360" UserId="395" Text="People post things made using Pyglet and PyOpenGL to pygame.org. The games list is open to anything in Python, not just the Pygame library." />
  <row Id="11510" PostHistoryTypeId="2" PostId="5792" RevisionGUID="f40bb60b-48d5-4b13-9fd3-02159b965f25" CreationDate="2010-11-19T22:27:35.220" UserId="744" Text="&lt;a href=&quot;http://groups.google.com/group/pyglet-users&quot;&gt;pyglet has a mailing list&lt;/a&gt; but no active web presence (or development at all) right now. In general people working on pyglet code are encouraged to submit to pygame.org, and many also &lt;a href=&quot;http://pyweek.org/&quot;&gt;participate in PyWeek&lt;/a&gt;; there are many completed pyglet games there, although because of the time pressure the code is usually not great, even when the programmers are skilled." />
  <row Id="11511" PostHistoryTypeId="5" PostId="5790" RevisionGUID="666a9b62-caf2-49aa-b8e2-2e068e20b53a" CreationDate="2010-11-19T22:28:55.533" UserId="2345" Comment="added 89 characters in body; added 1 characters in body" Text="You're thinking about it all wrong. XNA pretty much is DirectX 9 for C#. Especially on the PC where there is little overhead on the draw calls compared to the Xbox 360. Further more, any shader code you write will run exactly the same as it would using DirectX 9. Therefore, almost everything that can be done with DirectX 9 can also be done with XNA.&#xD;&#xA;&#xD;&#xA;The question you should be asking is &quot;would I benefit from using c++ over c#?&quot;. " />
  <row Id="11512" PostHistoryTypeId="5" PostId="5787" RevisionGUID="963de211-4883-4746-a253-c7a8af05169c" CreationDate="2010-11-19T22:32:37.877" UserId="744" Comment="Adhere to silly pyglet/Pygame name capitalization standards, prettify links." Text="I am a Python programmer (I know the ins and outs decently well), and I have dabbled with Pygame. I want to make 3D applications and games, and so naturally I've been looking at OpenGL. &#xD;&#xA;&#xD;&#xA;pyglet uses OpenGL, and the &lt;a href=&quot;http://www.pyglet.org/documentation.html&quot;&gt;programming website and documentation&lt;/a&gt; is up there with the best I've seen as far as libraries and APIs go.&#xD;&#xA;&#xD;&#xA;Is there a place on the net where other pyglet programmers go to share projects and source code, &lt;a href=&quot;http://pygame.org&quot;&gt;like there is for Pygame&lt;/a&gt;?&#xD;&#xA;&#xD;&#xA;I would love to see how other people are combining game logic and OpenGL graphical code to create a simple game (it really helps the learning process)." />
  <row Id="11513" PostHistoryTypeId="4" PostId="5787" RevisionGUID="963de211-4883-4746-a253-c7a8af05169c" CreationDate="2010-11-19T22:32:37.877" UserId="744" Comment="Adhere to silly pyglet/Pygame name capitalization standards, prettify links." Text="What resources are available to read and share pyglet code?" />
  <row Id="11514" PostHistoryTypeId="6" PostId="5787" RevisionGUID="963de211-4883-4746-a253-c7a8af05169c" CreationDate="2010-11-19T22:32:37.877" UserId="744" Comment="Adhere to silly pyglet/Pygame name capitalization standards, prettify links." Text="&lt;3d&gt;&lt;opengl&gt;&lt;python&gt;" />
  <row Id="11515" PostHistoryTypeId="2" PostId="5793" RevisionGUID="561d089a-19e9-427a-be98-ab2dfa50e58b" CreationDate="2010-11-19T22:35:26.693" UserId="744" Text="No. Every year someone makes a new Pygame UI library and then abandons it after a few versions, probably once they realize that writing button layouts is easy but writing a complete UI library is real work. &lt;a href=&quot;http://pygame.org/tags/gui&quot;&gt;The `gui` tag on the Pygame site chronicles some of these.&lt;/a&gt;" />
  <row Id="11516" PostHistoryTypeId="5" PostId="5782" RevisionGUID="5bcd5a99-06e1-43b3-aca3-f1cdeaa2e50c" CreationDate="2010-11-19T22:36:00.650" UserId="3449" Comment="added 973 characters in body" Text="I think [OpenGL][1] and [OpenAL][2] are extremely obvious, but beyond that...&#xD;&#xA;&#xD;&#xA;API&#xD;&#xA;&#xD;&#xA; - [Bullet][3] 3D Physics engine, used in AAA titles&#xD;&#xA; - [Chipmunk][4] Flexible and Powerful 2D Physics engine in straight C&#xD;&#xA; - [Box2D][5] Another robust and popular 2D physics engine&#xD;&#xA; - [FPMath][6] C++ template based math library, specifically for dealing with Fixed Point arithmetic (requires [Boost][7])&#xD;&#xA; - [OpenSteer][8] Steering Behaviors for Autonomous Characters&#xD;&#xA; - [Xiph][9] home of lots of open source audio and video alternatives like Vorbis and Theora&#xD;&#xA;&#xD;&#xA;Tools&#xD;&#xA;&#xD;&#xA; - [Blender][10] 3D Modeling Tool with a great deal of functionality and support for many different file formats&#xD;&#xA; - [Google Sketchup][11] Probably the easiest to use 3D modeler in existence today&#xD;&#xA; - [Gimp][12] 2D Raster image manipulation, very robust feature set&#xD;&#xA; - [Inkscape][13] 2D Vector image manipulation, based on SVG&#xD;&#xA; - [sfxr][14] Sound effect generator, great if you're in a hurry or don't have an audio specialist&#xD;&#xA; - [FFMpeg][15] record, convert and stream audio and video&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [RakNet][16] cross platform, open source, networking engine for game programmers (RakNet 4 is free for independent Developers that gross $50K or less)&#xD;&#xA; - [Irrlicht][17] open source high performance realtime 3D engine written and usable in C++ and also available for .NET languages.&#xD;&#xA; - [Ogre3D][18] One of the most popular open source game engines, and for good reason&#xD;&#xA;&#xD;&#xA;Mobile Specific (since that's what I'm into at the moment)&#xD;&#xA;&#xD;&#xA; - [PowerVR SDK][19] The reference for doing advanced things with the graphics hardware on iOS devices, includes lots of free tools and example code&#xD;&#xA; - [Oolong][20] game engine that includes much of the above mentioned, optimized for PowerVR on the iphone, maintained by [Wolfgang Engel][21] and [Erwin Coumans][22] of Grand Theft Auto fame&#xD;&#xA; - [Cocos2D][23] free Objective-C based iPhone specific port of the Python original, very easy to use and lots of community support&#xD;&#xA; - [VFPMath][24] Crazy fast math library written mostly with inline assembly to take advantage of the ARM processor&#xD;&#xA; - [AndEngine][25] 2D OpenGL Game Engine for Android&#xD;&#xA;&#xD;&#xA;More Exotic:&#xD;&#xA;&#xD;&#xA; - [Canonical Multitouch][26] Gesturing system for all multitouch input devices and more&#xD;&#xA; - [1 dollar][27] and [N dollar][28] stroke recognition systems.  Links are for javascript implementations, but they have been ported to many other languages&#xD;&#xA; - [OpenFoam][29] Computational Fluid Dynamics (CFD) library in C++, see also [FireFOAM][30] an extension for modeling fire&#xD;&#xA; - [Moody][31] an n-Model body development framework I found interesting, primary usage would be Celestial Mechanics and Astrodynamics.  Includes a viewer tool for files.&#xD;&#xA; - [ofxMSAFluid][32] Fluid dynamics simulation framework&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/&#xD;&#xA;  [2]: http://connect.creativelabs.com/openal/default.aspx&#xD;&#xA;  [3]: http://bulletphysics.org/wordpress/&#xD;&#xA;  [4]: http://code.google.com/p/chipmunk-physics/&#xD;&#xA;  [5]: http://www.box2d.org/&#xD;&#xA;  [6]: http://code.google.com/p/fpmath/&#xD;&#xA;  [7]: http://www.boost.org/&#xD;&#xA;  [8]: http://opensteer.sourceforge.net/&#xD;&#xA;  [9]: http://www.xiph.org/&#xD;&#xA;  [10]: http://www.blender.org/&#xD;&#xA;  [11]: http://sketchup.google.com/&#xD;&#xA;  [12]: http://www.gimp.org/&#xD;&#xA;  [13]: http://inkscape.org/&#xD;&#xA;  [14]: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;  [15]: http://www.ffmpeg.org/&#xD;&#xA;  [16]: http://www.jenkinssoftware.com/&#xD;&#xA;  [17]: http://irrlicht.sourceforge.net/&#xD;&#xA;  [18]: http://www.ogre3d.org/&#xD;&#xA;  [19]: http://www.imgtec.com/powervr/insider/powervr-sdk.asp&#xD;&#xA;  [20]: http://code.google.com/p/oolongengine/&#xD;&#xA;  [21]: http://www.mobygames.com/developer/sheet/view/developerId,158706/&#xD;&#xA;  [22]: http://www.mobygames.com/developer/sheet/view/developerId,182064/&#xD;&#xA;  [23]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [24]: http://code.google.com/p/vfpmathlibrary/&#xD;&#xA;  [25]: http://code.google.com/p/andengine/&#xD;&#xA;  [26]: https://launchpad.net/canonical-multitouch&#xD;&#xA;  [27]: http://depts.washington.edu/aimgroup/proj/dollar/&#xD;&#xA;  [28]: http://depts.washington.edu/aimgroup/proj/dollar/ndollar.html&#xD;&#xA;  [29]: http://www.openfoam.com/&#xD;&#xA;  [30]: http://code.google.com/p/firefoam-dev/&#xD;&#xA;  [31]: http://moody.politespider.com/index.php&#xD;&#xA;  [32]: http://memo.tv/ofxmsafluid" />
  <row Id="11517" PostHistoryTypeId="5" PostId="5785" RevisionGUID="081a73d0-91f3-4828-84b3-753f82e3aded" CreationDate="2010-11-19T22:37:12.473" UserId="744" Comment="edited body; edited tags; edited title" Text="Are there any good, modern widget toolkits for Pygame? I've looked at [PGU][1], but it's apparently unmaintained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/pgu/" />
  <row Id="11518" PostHistoryTypeId="4" PostId="5785" RevisionGUID="081a73d0-91f3-4828-84b3-753f82e3aded" CreationDate="2010-11-19T22:37:12.473" UserId="744" Comment="edited body; edited tags; edited title" Text="Are there any good UI widget toolkits for Pygame?" />
  <row Id="11519" PostHistoryTypeId="6" PostId="5785" RevisionGUID="081a73d0-91f3-4828-84b3-753f82e3aded" CreationDate="2010-11-19T22:37:12.473" UserId="744" Comment="edited body; edited tags; edited title" Text="&lt;programming&gt;&lt;gui&gt;&lt;libraries&gt;&lt;pygame&gt;" />
  <row Id="11520" PostHistoryTypeId="4" PostId="2938" RevisionGUID="94cb621f-0bc1-4939-a1f5-c9fcf7566f0c" CreationDate="2010-11-19T22:42:51.783" UserId="744" Comment="edited title" Text="How can I integrate IK into a hierarchical editing environment?" />
  <row Id="11521" PostHistoryTypeId="5" PostId="5747" RevisionGUID="b6f4de01-b77e-48e2-bd37-2dbc8f91a4d0" CreationDate="2010-11-19T22:43:39.413" UserId="744" Comment="deleted 13 characters in body; edited title" Text="I would like to start learning about game development and I would like to do it using Linux. My main experience has been with Java and a bit of C++, but that was for applications and not games.&#xD;&#xA;&#xD;&#xA;Now that I want to try with gaming, I'm wondering which IDE/language should I use in Linux, whether I should go with C++ and compiling files manually at the beginning, or maybe continue with Java/Eclipse, also I think I can use Eclipse with C++, I have also started reading about Python... &#xD;&#xA;&#xD;&#xA;I was thinking in starting with the typical &quot;Tetris&quot; just to understand how a game works internally, and I think I can achieve that with all the previous options, but what do you recommend me or how have you started game developming under Linux?" />
  <row Id="11522" PostHistoryTypeId="4" PostId="5747" RevisionGUID="b6f4de01-b77e-48e2-bd37-2dbc8f91a4d0" CreationDate="2010-11-19T22:43:39.413" UserId="744" Comment="deleted 13 characters in body; edited title" Text="What language and tools are good to start with for Linux game development?" />
  <row Id="11523" PostHistoryTypeId="2" PostId="5794" RevisionGUID="ac2811d7-5835-4742-8c0f-1afb0d3e64a3" CreationDate="2010-11-19T23:34:11.403" UserId="3115" Text="I'm currently moving FROM Flash and Actionscript 3.0 to Unity3D Framework. Its a GAME-ENGINE made for GAMES and there is a free &quot;Indie&quot; license where you get 95% of the engine features for free forever.&#xD;&#xA;&#xD;&#xA;You can later on, upgrade your license to PRO (1500$ or something) and then you will be able to use the latest game technologies for bloom-effects, realtime shadows etc.&#xD;&#xA;&#xD;&#xA;With Flash I had to develop everything from scratch and spend a lot of time preventing people from decompiling my sourcecode so they could cheat.&#xD;&#xA;&#xD;&#xA;Dont take me wrong, I like Flash, but it wasnt made for Game-development, eventhough its possible.&#xD;&#xA;&#xD;&#xA;Unity3D has never been made to make &quot;banners&quot; or &quot;movies&quot;, but is a pure crossplatform real-time game engine.&#xD;&#xA;&#xD;&#xA;You can choose from webplayer (small plugin around 2 mb install) that works on both MacOSX and Windows. Or you can choose installer (real Windows EXE or similar MacOS bin)&#xD;&#xA;and if you buy the license, you can also transfer the games/applications to mobile devices, consoles like Xbox, Playstation and Wii.&#xD;&#xA;&#xD;&#xA;So, if you want to make sure that you develop on a gameplatform that also is &quot;allowed&quot; on Steve Jobbs iParanoid system, you should consider switching to Unity3D platform as I currently am.&#xD;&#xA;&#xD;&#xA;[www.unity3D.com][1] for more info.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unity3d.com/?ref=berggreen" />
  <row Id="11524" PostHistoryTypeId="2" PostId="5795" RevisionGUID="f32aa0b9-5588-4681-a811-1d1d22c97ad1" CreationDate="2010-11-20T01:34:02.577" UserId="3480" Text="Lua is what's often used for game scripting, and the big reason for this is that its libraries are small, it has a fairly small memory footprint, and it's pretty simple to integrate with c++.&#xD;&#xA;&#xD;&#xA; Before you begin to script or choose a language or start to integrate support for a language you need to have a good idea of what you want your scripting system to be able to do, and you need to prepare your underlying code to support it. You ought to isolate actions that you want the scripting system to perform so its easy to write wrappers for the scripting system to access this code. If you do this, it will be much easier to set up and effectively use ANY scripting system you want.&#xD;&#xA;&#xD;&#xA;For example, if you are doing a topdown rpg, you probably have a way to walk around on your c++ layer. You want your scripting system to be able to tell your NPC to walk from point A to point B, so it's important that your walking logic is in its own function in c++. This can be a black box to anything outside of it...all your scripting system and the rest of your c++ code needs to know is that this function will cause your player to walk from point a to point b. Your input system calls this function when you use the wasd keys. Your lua script calls it when you call actions.walk(mypointer, pointA, pointB). This seems really obvious, but a lot of people just code by the seat of their pants and don't think about design.&#xD;&#xA;At this point, integrating the walk function becomes a matter of wrapping your c++ function in a glue wrapper and handling parameter passing between the scripting language and c++." />
  <row Id="11525" PostHistoryTypeId="2" PostId="5796" RevisionGUID="ab183d00-2425-433a-a3d6-b9d9f0759bc9" CreationDate="2010-11-20T03:25:54.417" UserId="982" Text="Are there any sites out there that list open source game projects that are looking for people to join?&#xD;&#xA;&#xD;&#xA;Something like http://sourceforge.net/ but more gaming dedicated." />
  <row Id="11526" PostHistoryTypeId="1" PostId="5796" RevisionGUID="ab183d00-2425-433a-a3d6-b9d9f0759bc9" CreationDate="2010-11-20T03:25:54.417" UserId="982" Text="Open Source Game Project Site" />
  <row Id="11527" PostHistoryTypeId="3" PostId="5796" RevisionGUID="ab183d00-2425-433a-a3d6-b9d9f0759bc9" CreationDate="2010-11-20T03:25:54.417" UserId="982" Text="&lt;open-source&gt;" />
  <row Id="11528" PostHistoryTypeId="2" PostId="5797" RevisionGUID="0d5b8705-b0b2-4a1d-9b61-4244088a4d3f" CreationDate="2010-11-20T03:49:41.263" UserId="2355" Text="To enable upgrades or set other special properties for a map you have to use a trigger that is executed at the start of the game.&#xD;&#xA;&#xD;&#xA;In the map editor, `Modules -&gt; Triggers (F8)` opens the trigger editor:&#xD;&#xA;&#xD;&#xA;![Triggers window][1]&#xD;&#xA;&#xD;&#xA;The only default trigger is &quot;Melee Initialization&quot;, which is executed at the start of the game. New actions can be added to this trigger by choosing `New -&gt; New Action (Ctrl-R)` in the right pane's context menu. Searching for &quot;upgrade&quot; brings up the correct action to add:&#xD;&#xA;&#xD;&#xA;![Actions window][2]&#xD;&#xA;&#xD;&#xA;Double-clicking on `Upgrade: (No Value)` then shows a window that lets you choose which upgrade you want to enable for the player.&#xD;&#xA;&#xD;&#xA;The action created this way will be executed at the start of the game and enable the selected upgrade.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/cblqZ.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/bs8jo.png" />
  <row Id="11529" PostHistoryTypeId="10" PostId="5796" RevisionGUID="29d7d70c-64bf-467d-be56-9170fe34bf8b" CreationDate="2010-11-20T08:04:12.257" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11530" PostHistoryTypeId="5" PostId="5796" RevisionGUID="bc31fb9b-bfa4-4470-80af-9b5876505d29" CreationDate="2010-11-20T08:04:12.443" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Open Source game projects](http://gamedev.stackexchange.com/questions/496/open-source-game-projects)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Are there any sites out there that list open source game projects that are looking for people to join?&#xD;&#xA;&#xD;&#xA;Something like http://sourceforge.net/ but more gaming dedicated." />
  <row Id="11531" PostHistoryTypeId="2" PostId="5798" RevisionGUID="3123c9d8-df47-4c71-ad88-3175049eff9f" CreationDate="2010-11-20T11:16:31.467" UserId="3162" Text="Players are not the same: some people are keen to establish their own goals, but others need a lot of hand-holding. And some people may be different at different times: maybe they want a casual game with explicit goals for their commute, but then are willing to put in more thought and effort on a solid weekend session.&#xD;&#xA;&#xD;&#xA;A game with self-set goals tends to have more gameplay in the long run, but be harder to get into in the first place (you need to understand a lot about how the game works before you can start to set appropriate goals) and have a smaller audience. It's also more work for the developer to make a world with enough possibilities and flexibility for players to be creative.&#xD;&#xA;&#xD;&#xA;So it all comes down to, what kind of game are you trying to make? What kind of players are you trying to appeal to? And what's you budget?" />
  <row Id="11532" PostHistoryTypeId="2" PostId="5799" RevisionGUID="e4e3af8b-60f1-4e7c-a931-0dcb007c5e40" CreationDate="2010-11-20T11:19:41.423" UserId="2137" Text="So I've been wondering, what kind of architecture would games like world of warcraft, diablo 2 (which is most probably a different beast than WoW) use?&#xD;&#xA;&#xD;&#xA;As far as I know, RTS games state-syncs every client and server, and the input from the clients get relayed to the server, and all states from all clients will get the same input, because everything is synced.&#xD;&#xA;&#xD;&#xA;And because everything is synced, state changes can be done safely, thus allowing large numbers of entities in the game (e.g zerglings), because the clients only need to know the players' inputs.&#xD;&#xA;&#xD;&#xA;This is all fine and well, but AFAIK diablo 2 allows players to join servers mid-game, which leads me to believe they use a different architecture. I'm stumped on how they do this though, and if elegant solutions exist for such a thing. Does anyone have a better idea?" />
  <row Id="11533" PostHistoryTypeId="1" PostId="5799" RevisionGUID="e4e3af8b-60f1-4e7c-a931-0dcb007c5e40" CreationDate="2010-11-20T11:19:41.423" UserId="2137" Text="Multiplayer architecture in games like Diablo 2" />
  <row Id="11534" PostHistoryTypeId="3" PostId="5799" RevisionGUID="e4e3af8b-60f1-4e7c-a931-0dcb007c5e40" CreationDate="2010-11-20T11:19:41.423" UserId="2137" Text="&lt;architecture&gt;&lt;multiplayer&gt;" />
  <row Id="11535" PostHistoryTypeId="2" PostId="5800" RevisionGUID="b2f0bad1-f4fd-43a1-b71a-63c5aa3db880" CreationDate="2010-11-20T11:56:58.860" UserId="1829" Text="Well I already read a little about sorting algorithms on wikipedia, the subject seems vast, especially when dealing with some cases where some algos are faster than others.&#xD;&#xA;&#xD;&#xA;That might need some quick sum up, but before that, can somebody tell me if there are subjects of game programming where sorting is necessary ? (or optional, for execution time matters).&#xD;&#xA;&#xD;&#xA;Maybe in a depht buffer ?" />
  <row Id="11536" PostHistoryTypeId="1" PostId="5800" RevisionGUID="b2f0bad1-f4fd-43a1-b71a-63c5aa3db880" CreationDate="2010-11-20T11:56:58.860" UserId="1829" Text="Are there important cases when one needs to know how to program sort algorithms in game programming ?" />
  <row Id="11537" PostHistoryTypeId="3" PostId="5800" RevisionGUID="b2f0bad1-f4fd-43a1-b71a-63c5aa3db880" CreationDate="2010-11-20T11:56:58.860" UserId="1829" Text="&lt;programming&gt;&lt;algorithm&gt;&lt;3d-engines&gt;&lt;graphics-programming&gt;" />
  <row Id="11538" PostHistoryTypeId="2" PostId="5801" RevisionGUID="6b62920c-e87e-4240-8665-c589499d129b" CreationDate="2010-11-20T12:07:02.237" UserId="744" Text="Yes, you sort things all the time. &lt;a href=&quot;http://realtimecollisiondetection.net/blog/?p=86&quot;&gt;One common example is graphics calls.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Whether you need to know how to implement every sorting algorithm off the top of your head is another question, but you should at least be able to answer questions like:&#xD;&#xA;&#xD;&#xA; * What sort do I use if I need an in-place sort with minimal stack overhead? (Iterative or tail-recursive quicksort.)&#xD;&#xA; * How can I sort a large list of strings as fast as possible? (Burstsort, radix sort, or quick sort depending on architecture.)&#xD;&#xA; * How do I sort these assets in dependency order? (Topological sort.)&#xD;&#xA; * I just need to sort some unknown data in a reasonable way? (Timsort, quicksort.)&#xD;&#xA;&#xD;&#xA;All of these situations come up in all kinds of software, including games.&#xD;&#xA;&#xD;&#xA;Again, you don't need all of these memorized, but you need to be able to open a book of sorting algorithms, read a brief description of each one, and pick the right one. That means understanding time and space (big-O) requirements, and having an idea of how different sorting algorithms work (merging, selecting, swapping).&#xD;&#xA;&#xD;&#xA;Sorting algorithms also feature prominently in job interviews; usually the questions are not &quot;implement quicksort&quot;, but &quot;here's a description of the kinds of input, what sorting algorithm works well for this?&quot;" />
  <row Id="11539" PostHistoryTypeId="2" PostId="5802" RevisionGUID="3a6bd8d7-8d7d-4e4d-a562-ea805ade5f88" CreationDate="2010-11-20T12:43:02.443" UserId="741" Text="I'm going to say yes, to your question as phrased, but with important caveats.&#xD;&#xA;&#xD;&#xA;Yes, you need to know how to sort things in programming game development. There's lots of sorting goes on, in a wide variety of situations. No, you don't need to know the details of how all (or even many) the various sorting algorithms work, it's almost always sufficient to look it up in a reference (online or book) when you need to.&#xD;&#xA;&#xD;&#xA;What's important is not the how and why of each algorithm, it's a deeper understanding of why some algorithms work better in some situations. It's understanding exactly which situation you have (do I need to sort in-place, can I insert items in the list cheaply). It's knowing the most common and flexible algorithms, not so much the details of how they work, but more the situations where they should not be used.&#xD;&#xA;&#xD;&#xA;And finally, it's knowing when sorting performance is important (when you have many, many items and you need to sort them a lot) and when it's not so important (when you have just a few items, and/or you only need to sort when the list changes). In the latter case, just throw the list through quicksort. If your objects are large, then sort a list of indices to the objects rather than the objects themselves. In the last dozen or so years I've been developing professionally, I can count the number of times I've needed a more tuned or specific sorting algorithm, and it's probably less than 20." />
  <row Id="11540" PostHistoryTypeId="2" PostId="5803" RevisionGUID="a77a93c0-b788-4aa2-9d34-d68d94e91c6b" CreationDate="2010-11-20T12:43:03.140" UserId="3162" Text="There are lots of cases where you might need to sort things, depending on what kind of game programming you are doing:&#xD;&#xA;&#xD;&#xA;* Sort opaque objects by distance from camera before drawing ([reverse painter's algorithm][1])&#xD;&#xA;* Sort transparent triangles by distance from camera before drawing them in reverse order.&#xD;&#xA;* Topological sort of goal dependency graph to work out a sensible order to attempt to achieve goals in (useful in AI, or in giving automated hints).&#xD;&#xA;* Sort objects along some co-ordinate for fast collision testing.&#xD;&#xA;* Sort events by time to work out which one to handle next.&#xD;&#xA;* Sort objects by unique id to get canonical order for comparison or serialization.&#xD;&#xA;* Sort profiling statistics to work out which areas would be most profitable to optimize.&#xD;&#xA;&#xD;&#xA;It's rare that you'll need to implement your own sort algorithm: generally you'll just pick an appropriate function from a library. But studying and writing sorting algorithms is good general practice for writing and analyzing algorithms, and your knowledge will come in handy when it comes to picking a good algorithm from a library, or spotting the (rare) cases where the special features of your problem mean that you could improve on the generic library routine.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Reverse_painter%39s_algorithm" />
  <row Id="11541" PostHistoryTypeId="5" PostId="5798" RevisionGUID="aaa35c49-825d-4992-abd4-abc6a6542765" CreationDate="2010-11-20T13:03:18.707" UserId="3162" Comment="fix typo" Text="Players are not the same: some people are keen to establish their own goals, but others need a lot of hand-holding. And some people may be different at different times: maybe they want a casual game with explicit goals for their commute, but then are willing to put in more thought and effort on a solid weekend session.&#xD;&#xA;&#xD;&#xA;A game with self-set goals tends to have more gameplay in the long run, but be harder to get into in the first place (you need to understand a lot about how the game works before you can start to set appropriate goals) and have a smaller audience. It's also more work for the developer to make a world with enough possibilities and flexibility for players to be creative.&#xD;&#xA;&#xD;&#xA;So it all comes down to, what kind of game are you trying to make? What kind of players are you trying to appeal to? And what's your budget?" />
  <row Id="11543" PostHistoryTypeId="2" PostId="5805" RevisionGUID="64616eec-e3ab-4157-9428-32e4a7c01a29" CreationDate="2010-11-20T13:38:18.657" UserId="3461" Text="I got it !&#xD;&#xA;&#xD;&#xA;i simply used conversion from Spherical Coordinate (rho,phi,theta) to Cartesian coordinate.&#xD;&#xA;&#xD;&#xA;for those who need it , here my function in java:&#xD;&#xA;&#xD;&#xA;    void angleToCartesian(double rho, double phi, double theta) {&#xD;&#xA;		&#xD;&#xA;		coords.x = rho * Math.sin(phi) * Math.cos(theta);&#xD;&#xA;        coords.y = rho * Math.cos(phi);&#xD;&#xA;		coords.z = rho * Math.sin(phi) * Math.sin(theta);&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;the rho is the radius , phi is the zenith angle (so be careful if like me your angle start at azimuth (90° from zenith)) and theta is the longitude angle (starting from +z). the angles are -of course- in radians.&#xD;&#xA;&#xD;&#xA;it's explained here for those who want : http://mathworld.wolfram.com/SphericalCoordinates.html (pay attention to the fact that their xyz axis are not the same)" />
  <row Id="11544" PostHistoryTypeId="2" PostId="5806" RevisionGUID="ca5fd253-6e70-4465-8714-75719b530161" CreationDate="2010-11-20T16:43:00.330" UserId="3485" Text="I really love [this visual &quot;guide&quot;][1] to game mechanics from [Game Seeds][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cache.gawkerassets.com/assets/images/9/2010/05/gameseeds_final_illustrations_01.jpg&#xD;&#xA;  [2]: http://www.gameseeds.net/" />
  <row Id="11545" PostHistoryTypeId="2" PostId="5807" RevisionGUID="b9c8daba-4612-4973-b3fc-a9a57016ef5e" CreationDate="2010-11-20T18:41:52.863" UserId="2100" Text="I am wondering about in-game level design. My current situation revolves around Tiled - I have many different layers with different types of objects in them (for anyone who isn't familiar with Tiled, an object is nothing more than a coordinate with arbitrary properties assigned to it).&#xD;&#xA;&#xD;&#xA;I am currently re-compiling the game every time I make a little change to my map file to see if everything is positioned properly. Is there a way for me to have my game automatically re-load the level if a map file change is detected? Does XNA even allow for this, or does the way the content pipeline work not allow for dynamic content in such a way? Any tips or suggestions are absolutely welcome.&#xD;&#xA;" />
  <row Id="11546" PostHistoryTypeId="1" PostId="5807" RevisionGUID="b9c8daba-4612-4973-b3fc-a9a57016ef5e" CreationDate="2010-11-20T18:41:52.863" UserId="2100" Text="In-Game Level Design with XNA?" />
  <row Id="11547" PostHistoryTypeId="3" PostId="5807" RevisionGUID="b9c8daba-4612-4973-b3fc-a9a57016ef5e" CreationDate="2010-11-20T18:41:52.863" UserId="2100" Text="&lt;xna-4.0&gt;&lt;tiles&gt;" />
  <row Id="11548" PostHistoryTypeId="2" PostId="5808" RevisionGUID="1253e03d-ebba-4b76-b197-b504d44b4d81" CreationDate="2010-11-20T20:10:01.953" UserId="3214" Text="Lua has been really awesome to learn, it's so simple. I really enjoy scripting languages, and I had an equally enjoyable time learning Python.&#xD;&#xA;&#xD;&#xA;The Love engine, http://love2d.org/, is really awesome, but I'm looking for something that can handle 3D as well. Is there anything that accommodates 3D in Lua, or should I shy away and go back to Python for that?" />
  <row Id="11549" PostHistoryTypeId="1" PostId="5808" RevisionGUID="1253e03d-ebba-4b76-b197-b504d44b4d81" CreationDate="2010-11-20T20:10:01.953" UserId="3214" Text="Love2D engine for Lua; What about 3D?" />
  <row Id="11550" PostHistoryTypeId="3" PostId="5808" RevisionGUID="1253e03d-ebba-4b76-b197-b504d44b4d81" CreationDate="2010-11-20T20:10:01.953" UserId="3214" Text="&lt;3d&gt;&lt;lua&gt;" />
  <row Id="11551" PostHistoryTypeId="5" PostId="5808" RevisionGUID="b4bf554e-39c5-4d28-8ade-ab3279ff18e5" CreationDate="2010-11-20T20:20:14.847" UserId="3214" Comment="added 158 characters in body" Text="Lua has been really awesome to learn, it's so simple. I really enjoy scripting languages, and I had an equally enjoyable time learning Python.&#xD;&#xA;&#xD;&#xA;The Love engine, http://love2d.org/, is really awesome, but I'm looking for something that can handle 3D as well. Is there anything that accommodates 3D in Lua? I'm still intrigued by the particle system of LOVE anyway and may just turn my idea into a 2D project with Particle lighting :)&#xD;&#xA;&#xD;&#xA;EDIT: I removed comments about Python - I want this to be a Lua topic. Thanks&#xD;&#xA;" />
  <row Id="11552" PostHistoryTypeId="2" PostId="5809" RevisionGUID="1bf41c5c-45f6-44f5-bf52-589a92358592" CreationDate="2010-11-20T21:25:26.453" UserId="2798" Text="I assume your map files are processed via the Content Pipeline, and then loaded at runtime with Content.Load. You have two options:&#xD;&#xA;&#xD;&#xA; - Save your maps as a XML file, via IntermediateSerializer.Serialize. Then, at runtime, you can read them with IntermediateSerializer.Deserialize to see the changes.&#xD;&#xA; - This is a tougher one: calling MSBuild at runtime to recompile your files into proper XNBs, and reloading them with the ContentManager. [This sample][1] does that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2" />
  <row Id="11553" PostHistoryTypeId="2" PostId="5810" RevisionGUID="5f336537-e9fd-4e76-9d77-85e41fe92c3f" CreationDate="2010-11-20T21:38:18.083" UserId="452" Text="Apparently you need to install AIR in your mobile to use Flash apps, and AIR requires Android 2.2 while my Milestone is a feeble 2.1.update1. &#xD;&#xA;&#xD;&#xA;There is seriously no Flash lite or other alternative?" />
  <row Id="11554" PostHistoryTypeId="1" PostId="5810" RevisionGUID="5f336537-e9fd-4e76-9d77-85e41fe92c3f" CreationDate="2010-11-20T21:38:18.083" UserId="452" Text="Is Flash development for Android below 2.2 feasible?" />
  <row Id="11555" PostHistoryTypeId="3" PostId="5810" RevisionGUID="5f336537-e9fd-4e76-9d77-85e41fe92c3f" CreationDate="2010-11-20T21:38:18.083" UserId="452" Text="&lt;android&gt;" />
  <row Id="11556" PostHistoryTypeId="2" PostId="5811" RevisionGUID="738d3bcc-ec66-4197-8147-ce2d87c5ba4f" CreationDate="2010-11-20T22:08:40.400" UserId="2634" Text="If you've never done game programming before, you should probably start with 2D.  SDL is a pretty straightforward library with nice bindings for C++. You can use whatever editor / IDE you like, but I'm a big fan of code::blocks.  &#xD;&#xA;&#xD;&#xA;There are finally some nice game engines for Java, (Java Monkey Engine) but Java kind of gets in the way sometimes.  I like Java (I've taught it for years) but it always seems kind of clunky to me as a game development environment. &#xD;&#xA;&#xD;&#xA;I'm a huge fan of Python and pyGame.   (PyGame is simply SDL with bindings for Python.) You can build a really nice 2D game quite quickly. Python is quite easy to learn, and it tends to let you focus more on the game programming rather than memory and pointer issues.  It's true that Python code isn't quite as fast as natively compiled C++ code, but it's more than fast enough, and the easier coding and debugging will often make up for the difference. If you find a critical section that Python simply cannot handle, you can write that section in C/C++ and use it as a module.&#xD;&#xA;&#xD;&#xA;I teach a game development class, and I've switched languages several times. I'm very happy with Python as a language to teach game development with.&#xD;&#xA;&#xD;&#xA;Best of luck to you." />
  <row Id="11557" PostHistoryTypeId="2" PostId="5812" RevisionGUID="bebd7be0-dabe-4800-b73d-21da037b803a" CreationDate="2010-11-20T22:15:57.027" UserId="2634" Text="I've added very basic GUI elements to my GameEngine library:&#xD;&#xA;http://aharrisbooks.net/pythonGame/ch10/&#xD;&#xA;(Included in a book on game development in Python)&#xD;&#xA;&#xD;&#xA;I built very simple GUI elements based on the standard sprite: a label, button, multi-line label, and mini-scroll-bar.  &#xD;&#xA;&#xD;&#xA;These tools are quite basic, but they are adequate for many uses.  Of course, the library is completely open-source, so feel free to modify them if you wish.  The one user interface element I didn't add (yet) was a text input widget.  That's because the event model is much more complex for this than the other models, and I was running into a deadline.&#xD;&#xA;&#xD;&#xA;Feel free to play with that (whether you use the book or not) and let me know if you run into any troubles. I'll try to help.&#xD;&#xA;&#xD;&#xA;I've got videos of my course available at &#xD;&#xA;http://synapse.cs.iupui.edu/Mediasite/Catalog/&#xD;&#xA;&#xD;&#xA;Look at the N451 course. That's the one on game development." />
  <row Id="11558" PostHistoryTypeId="2" PostId="5813" RevisionGUID="df06f1a2-6b72-4712-b49e-356b698e84e6" CreationDate="2010-11-20T22:24:10.073" UserId="395" Text="I don't know about D2 specifically, but I would imagine it is similar to most MMOs out there. Our basic method is that when new clients connect they request the entire state of the area around them (for D2 it would likely just be the state of the whole server) and then from that point on the server just sends differential updates. " />
  <row Id="11559" PostHistoryTypeId="5" PostId="5800" RevisionGUID="792d27e6-ac91-4bd1-8b26-384a049574e0" CreationDate="2010-11-20T22:45:26.953" UserId="51" Comment="deleted 1 characters in body" Text="Well I already read a little about sorting algorithms on wikipedia, the subject seems vast, especially when dealing with some cases where some algos are faster than others.&#xD;&#xA;&#xD;&#xA;That might need some quick sum up, but before that, can somebody tell me if there are subjects of game programming where sorting is necessary ? (or optional, for execution time matters).&#xD;&#xA;&#xD;&#xA;Maybe in a depth buffer?" />
  <row Id="11560" PostHistoryTypeId="5" PostId="5797" RevisionGUID="0e47aadf-6513-4c31-b94c-6e5c42e036ea" CreationDate="2010-11-20T23:35:25.563" UserId="2355" Comment="edited body" Text="To enable upgrades or set other special properties for a map you have to use a trigger that is executed at the start of the game.&#xD;&#xA;&#xD;&#xA;In the map editor, `Modules -&gt; Triggers (F6)` opens the trigger editor:&#xD;&#xA;&#xD;&#xA;![Triggers window][1]&#xD;&#xA;&#xD;&#xA;The only default trigger is &quot;Melee Initialization&quot;, which is executed at the start of the game. New actions can be added to this trigger by choosing `New -&gt; New Action (Ctrl-R)` in the right pane's context menu. Searching for &quot;upgrade&quot; brings up the correct action to add:&#xD;&#xA;&#xD;&#xA;![Actions window][2]&#xD;&#xA;&#xD;&#xA;Double-clicking on `Upgrade: (No Value)` then shows a window that lets you choose which upgrade you want to enable for the player.&#xD;&#xA;&#xD;&#xA;The action created this way will be executed at the start of the game and enable the selected upgrade.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/cblqZ.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/bs8jo.png" />
  <row Id="11561" PostHistoryTypeId="2" PostId="5814" RevisionGUID="ae4e735c-45e6-4cc4-ba25-b2601ece4ba8" CreationDate="2010-11-20T23:55:10.980" UserId="3214" Text="Still looking for comments, but I'll answer in regards to LOVE. LOVEs strengths lie in 2D projects, but there are people on the forums submitting experiments related to either 3D drawing or 3D lighting in 2D environments, both of which are cool and worth checking out." />
  <row Id="11562" PostHistoryTypeId="2" PostId="5815" RevisionGUID="ceb0878a-a1de-47af-bff9-f737ebe1ae70" CreationDate="2010-11-21T00:30:02.760" UserId="3115" Text="I personal is &quot;in LÖVE&quot; with Unit3D at the moment.&#xD;&#xA;&#xD;&#xA;The free version gives you 95% of the paid functionality forever and if you later on decides to go &quot;Pro&quot; its only an upgrade of $1500 for full edition with realtime shadows and loads of shader effects too (bloom etc.)&#xD;&#xA;&#xD;&#xA;You will get lights, particle systems, collision, input controls, 3D world, cameras, PHYSICS engine... yes thats right, FOR FREE! Ofcause the paid version does provide you the &quot;extras&quot; but you can easily make great games without the PRO edition.&#xD;&#xA;&#xD;&#xA;The game-engine also works cross platform (PC/MAC installs), webplayer plugin (2 mb) mac/pc and if you also pay further you can compile and run the games on iPhone, Android, Xbox, Playstation, Wii ... but go check it out for yourself&#xD;&#xA;[www.unity3D.com][1]&#xD;&#xA;&#xD;&#xA;I sound like a salesman, but no - I have no connection with Unity3D except that I am currently trying to study and examine how I can build my own games with it as I have tried a lot of frameworks before this, but I must say, its amazingly easy to produce a quick &quot;something&quot; - have no idea how long time it will take me to finish a complete game. But I am on it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unity3D.com/?ref=berggreenDK" />
  <row Id="11563" PostHistoryTypeId="2" PostId="5816" RevisionGUID="b9bb9d39-171a-42de-85e7-2526ae737d78" CreationDate="2010-11-21T01:36:11.587" UserId="178" Text="I consider Linux in itself a pretty neat development environment. Most distributions have everything you need to develop c/c++ apps, just invest some time learning gcc, gdb, vim and a decent build system like Make, CMake or Scons.&#xD;&#xA;&#xD;&#xA;If you are using c/c++ then SDL would be a good starting point, library wise - because you will find a huge amount of tutorials for it.&#xD;&#xA;For python I found pyglet to be an excellent library, although i haven't used it for 2 years. Just keep in mind that deployment of a python app is not &quot;that&quot; easy.." />
  <row Id="11564" PostHistoryTypeId="2" PostId="5817" RevisionGUID="77187b44-f980-4c2c-94f3-34b410a52bc6" CreationDate="2010-11-21T02:17:23.750" UserId="3115" Text="I'll just add a short answer here: HIGHSCORE table..." />
  <row Id="11565" PostHistoryTypeId="2" PostId="5818" RevisionGUID="646ad354-64d1-417e-9ab4-cb440b952333" CreationDate="2010-11-21T02:33:18.323" UserId="1386" Text="Many aspects of Unlimited Details Unlimited Detail Technology seems dubious to me, even the introductory paragraph (because of the usage of the word unlimited):&#xD;&#xA;&#xD;&#xA;&gt; Unlimited Detail is a new technology&#xD;&#xA;&gt; for making realtime 3D graphics. &#xD;&#xA;&gt; Unlimited Detail is different from&#xD;&#xA;&gt; existing 3D graphics systems because&#xD;&#xA;&gt; it can process unlimited point cloud&#xD;&#xA;&gt; data in real time, giving the highest&#xD;&#xA;&gt; level of geometry ever seen.&#xD;&#xA;&#xD;&#xA;The quote above is from the [Unlimited Detail Technology Site][1]&#xD;&#xA;&#xD;&#xA;My question is: **Does this unlimited detail technology *actually* exist?&#xD;&#xA;And if it does, why isn't it currently being used in games?**&#xD;&#xA;&#xD;&#xA;Other references to the Unlimited Detail Technology:&#xD;&#xA;&#xD;&#xA; - [Article on Rock Paper Shotgun][2]&#xD;&#xA; - [A video demonstration on Game&#xD;&#xA;   Trailers.com][3]&#xD;&#xA; - [An interview With&#xD;&#xA;   The Creator (Bruce Dell)][4]&#xD;&#xA; - [Article&#xD;&#xA;   on Download Squad][5]&#xD;&#xA;&#xD;&#xA;  [1]: http://unlimiteddetailtechnology.com/&#xD;&#xA;  [2]: http://www.rockpapershotgun.com/2010/03/10/unlimited-detail-wants-to-kill-3d-cards/&#xD;&#xA;  [3]: http://www.gametrailers.com/user-movie/future-of-game-graphics/341479&#xD;&#xA;  [4]: http://thisismyjoystick.com/interviews/interview-bruce-roberts-dell-unlimited-detail-technology/&#xD;&#xA;  [5]: http://www.downloadsquad.com/2010/03/10/unlimited-detail-claims-to-leave-current-3d-technologies-in-the/" />
  <row Id="11566" PostHistoryTypeId="1" PostId="5818" RevisionGUID="646ad354-64d1-417e-9ab4-cb440b952333" CreationDate="2010-11-21T02:33:18.323" UserId="1386" Text="Is Unlimited Detail real?" />
  <row Id="11567" PostHistoryTypeId="3" PostId="5818" RevisionGUID="646ad354-64d1-417e-9ab4-cb440b952333" CreationDate="2010-11-21T02:33:18.323" UserId="1386" Text="&lt;3d&gt;&lt;3d-engines&gt;&lt;voxels&gt;&lt;point-cloud&gt;" />
  <row Id="11568" PostHistoryTypeId="2" PostId="5819" RevisionGUID="86f34b9f-e18f-42b0-aea7-8514a9e5b79c" CreationDate="2010-11-21T02:33:51.990" UserId="3115" Text="I dont know anything about the network design behind Diablo or the rest you mention, but I would, make a &quot;node based&quot; mapsystem and when people join you only need to sync them with the current node + surrounding nodes (those directly connected) then you can always update those outside viewpoint once you reach the &quot;border&quot;...&#xD;&#xA;&#xD;&#xA;Consider the tiles in a map Like this, I have filled it with the same pattern as A* pathfinding to figure out which tiles are closest to my &quot;X&quot; (starting/current location)&#xD;&#xA;&#xD;&#xA;    ....3.......&#xD;&#xA;    6...2.......&#xD;&#xA;    5...1...567.&#xD;&#xA;    4321X1234.89&#xD;&#xA;    ....1...567.&#xD;&#xA;    ..43234.....&#xD;&#xA;    .65..456789.&#xD;&#xA;&#xD;&#xA;Sorry there might be some &quot;wrong numbers&quot; as I just did them very quick by hand, but the idea is that I would say from my X - update the client initially with up to 10 nodes/distance from my location.&#xD;&#xA;&#xD;&#xA;By using star algoritme logic, I can quick figureout which part of the map I need to provide to the client. Once the client is update, and begins to move, I just keep updating the outer border in the direction the client moves.&#xD;&#xA;&#xD;&#xA;I dont know if this idea/plan makes any sense, but I hope you can use it somehow.&#xD;&#xA;" />
  <row Id="11569" PostHistoryTypeId="2" PostId="5820" RevisionGUID="0e8332e5-4c13-450b-b715-605a3d06cee9" CreationDate="2010-11-21T02:47:32.430" UserId="3115" Text="I am going for [Unity3D][1] as I like the fact that I can develop crossplatform once I buy the license for this game-engine. &#xD;&#xA;&#xD;&#xA;For a start I will do Webbased crossplatform (PC/MAC) applications, but later I might go for the smartphones.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unity3d.com/?ref=berggreenDK&#xD;&#xA;&#xD;&#xA;I've done some stuff with Flash and Actionscript 3.0, but I feel that I have to reinvent too many things for games, Unity3D fx. comes with build in Physiscs, 3D world, camera, lights, texturemapping, shaders, collision, input-controls, sound engine etc. I know it needs to be installed (2 mb plugin) but its very fast to install and the results looks stunning compared to most of the 3D samples I've seen so far with Flash.&#xD;&#xA;" />
  <row Id="11572" PostHistoryTypeId="5" PostId="5272" RevisionGUID="9c274fc3-67a9-4965-8b4b-5b0c6ce7fa80" CreationDate="2010-11-21T04:15:38.047" UserId="284" Comment="added 186 characters in body; added 24 characters in body" Text="So I'm working on expanding the uses of items over at [www.ninjawars.net][1], and I'm not exactly sure how to represent them flexibly in the relational database that we use.&#xD;&#xA;&#xD;&#xA;I may be barking up the wrong tree, so feel free to make suggestions in other directions, but currently I'm thinking that each item should have relational &quot;tags&quot;.&#xD;&#xA;&#xD;&#xA;For example, a Katana is currently a row in the &quot;items&quot; database.  To make it into a weapon, and a holdable thing, I was thinking that I would have a database of &quot;traits&quot;, and a item_traits table that simply linked between them.&#xD;&#xA;&#xD;&#xA;    // Objects and their basic data&#xD;&#xA;&#xD;&#xA;    item_id | item&#xD;&#xA;    1 | Naginata&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // Things that objects can do&#xD;&#xA;&#xD;&#xA;    trait_id | trait&#xD;&#xA;    1 | weapon&#xD;&#xA;    2 | holdable&#xD;&#xA;    &#xD;&#xA;    // How those objects do those things, e.g. powerfully, weakly, while on fire&#xD;&#xA;&#xD;&#xA;    _item_id | _trait_id | item_trait_data&#xD;&#xA;    1 | 1 | damage: 5, damage_type: sharp, whatever, etc&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;I'm not really sure how to model the extra data that results (e.g. the damage that a sword will do, the damage_type, etc).&#xD;&#xA;&#xD;&#xA;I'm also not especially happy that the whole of an item would be stored in more than one place, e.g. in order to create a copy of an item with a different name, like a &quot;short sword&quot;, I would have to copy from multiple tables to create the duplicate item.&#xD;&#xA;&#xD;&#xA;Is there a better way to lay this stuff out that I'm missing?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11573" PostHistoryTypeId="4" PostId="5272" RevisionGUID="1772321b-24a1-488a-a080-dba4249d0630" CreationDate="2010-11-21T04:21:53.863" UserId="284" Comment="edited title" Text="How to model multiple &quot;uses&quot; (e.g. weapon) for usable-inventory/object/items (e.g. katana) within a relational database." />
  <row Id="11574" PostHistoryTypeId="2" PostId="5822" RevisionGUID="3fc16103-24df-4f36-8df4-a77d15d5127e" CreationDate="2010-11-21T04:31:59.317" UserId="458" Text="As a more general answer, even if you never actually write your own sorting algorithm &quot;in the field&quot; (after all, as you've no doubt seen on Wikipedia, your average garden-variety sorting is a problem that's already been solved), sorting is one of the core aspects of computer science that helps in the kind of computational thinking that a programmer needs. Think of it as the &quot;wax on, wax off&quot; that you learn before you realize you can use that skill for karate, too :)" />
  <row Id="11575" PostHistoryTypeId="2" PostId="5823" RevisionGUID="73b5139a-9b86-4723-844c-a7f4991123ea" CreationDate="2010-11-21T04:35:37.253" UserId="182" Text="It has always looked like sparse voxel octrees, to me. If my guess is correct then it's real, but limited. Namely, you can't really do animation with sparse voxel octrees, so this trick is only useful for static geometry." />
  <row Id="11576" PostHistoryTypeId="2" PostId="5824" RevisionGUID="e65aae9e-0362-465d-b1f7-e59f0617df69" CreationDate="2010-11-21T04:38:32.413" UserId="154" Text="&gt; Does this unlimited detail technology actually exist?&#xD;&#xA;&#xD;&#xA;It has for decades, although it's normally called voxels. A few games used voxels back in the 90's, most notably [Commanche][1] and [Outcast][2]. The terrain in both games looked amazing at the time compared to other stuff out there. Looking at the videos the &quot;advances&quot; with his system, seems mainly in handling the sheer number of points. So it's faster voxels but hardly some new unlimited technique.&#xD;&#xA;&#xD;&#xA;&gt; And if it does, why isn't it currently being used in games?&#xD;&#xA;&#xD;&#xA;Like all techniques it has it's strengths and weaknesses. &#xD;&#xA;&#xD;&#xA;You don't see many animations being shown since that's not a strength of voxels. At a brute force level you've got to store the offset positions for every point in the object per frame of animation, which is really ugly from a memory standpoint vs. a skeleton and rigging data in traditional poly rendering. I'm sure there are better solutions, but it's a weakness for voxels.&#xD;&#xA;&#xD;&#xA;There are other issues, shadows can have some creepy artifacts and voxel tend to look a lot uglier when you get to close to them than polys do, although in theory if you've got enough voxels you won't notice.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Comanche_series&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Outcast_(video_game)" />
  <row Id="11577" PostHistoryTypeId="5" PostId="5794" RevisionGUID="4d600e06-d4ee-4782-8b43-c7ff7cb32297" CreationDate="2010-11-21T05:15:30.400" UserId="3115" Comment="added 214 characters in body" Text="**Some people tells me I misunderstood the question, but others tell me that its a nice answer, so I will let it stay, eventhough its not providing an answer for an alternative Flash editor - sorry about that**&#xD;&#xA;&#xD;&#xA;I'm currently moving FROM Flash and Actionscript 3.0 to Unity3D Framework. Its a GAME-ENGINE made for GAMES and there is a free &quot;Indie&quot; license where you get 95% of the engine features for free forever.&#xD;&#xA;&#xD;&#xA;You can later on, upgrade your license to PRO (1500$ or something) and then you will be able to use the latest game technologies for bloom-effects, realtime shadows etc.&#xD;&#xA;&#xD;&#xA;With Flash I had to develop everything from scratch and spend a lot of time preventing people from decompiling my sourcecode so they could cheat.&#xD;&#xA;&#xD;&#xA;Dont take me wrong, I like Flash, but it wasnt made for Game-development, eventhough its possible.&#xD;&#xA;&#xD;&#xA;Unity3D has never been made to make &quot;banners&quot; or &quot;movies&quot;, but is a pure crossplatform real-time game engine.&#xD;&#xA;&#xD;&#xA;You can choose from webplayer (small plugin around 2 mb install) that works on both MacOSX and Windows. Or you can choose installer (real Windows EXE or similar MacOS bin)&#xD;&#xA;and if you buy the license, you can also transfer the games/applications to mobile devices, consoles like Xbox, Playstation and Wii.&#xD;&#xA;&#xD;&#xA;So, if you want to make sure that you develop on a gameplatform that also is &quot;allowed&quot; on Steve Jobbs iParanoid system, you should consider switching to Unity3D platform as I currently am.&#xD;&#xA;&#xD;&#xA;[www.unity3D.com][1] for more info.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unity3d.com/?ref=berggreen" />
  <row Id="11578" PostHistoryTypeId="2" PostId="5825" RevisionGUID="e343a9b0-2996-4248-9e06-1f264570f294" CreationDate="2010-11-21T05:21:20.393" UserId="619" Text="IMO, it's a hoax at best, and a scam at worst.&#xD;&#xA;&#xD;&#xA;Don't believe it until you have got a demo so you can verify the &quot;extraordinary&quot; claims for yourself, or at least until any industry experts vouch for it (John Carmack, Epic Games etc).&#xD;&#xA;&#xD;&#xA;Notice the claim on the site that it's being released in &quot;16 months&quot; from now, since they haven't set a definitive date they can continue claiming it's a future technology even when nothing shows." />
  <row Id="11579" PostHistoryTypeId="2" PostId="5826" RevisionGUID="5de0ca76-8b27-4365-ac34-8f181d1dbf7f" CreationDate="2010-11-21T05:29:04.007" UserId="3115" Text="I think you should make the algoritm work differently.&#xD;&#xA;&#xD;&#xA;Place your &quot;view&quot; in an array (2D tilemap) and then look forward eg. 20 tiles.&#xD;&#xA;The &quot;scroll&quot; is the amount of pixels for 1 tile, so if your scroll becomes negative, just add the size of a tile, and increment offset for &quot;view&quot; with 1. Repeat until scroll pos is postive again.&#xD;&#xA;&#xD;&#xA;Then repeat this pattern each frame.&#xD;&#xA;&#xD;&#xA;Here is my suggested loop in pseudo programming language.&#xD;&#xA;&#xD;&#xA; 1. ScrollPos -= speed;&#xD;&#xA; 2. while (ScrollPos&lt;0) { scrollPos += tilewidth; viewOffset +=1 ; if (viewOffset&gt;has }&#xD;&#xA; 3. &quot;Reposition every active tile inside view&quot; (called updating the frame)&#xD;&#xA;&#xD;&#xA;The ScrollPos is the &quot;fraction&quot; of a tile.&#xD;&#xA;The viewOffset is the current screen/view position in the tilemap (left side of screen)&#xD;&#xA;&#xD;&#xA;Array/tilemap is needed pr. &quot;row&quot; of background. You could do this in multiple levels too, to produce a &quot;parallax&quot; depth - and with 3D this might look even more cool.&#xD;&#xA;&#xD;&#xA;    var back[10] : array;&#xD;&#xA;    back[0] = &quot;.....................X.........X........X...........X............XXXXX&quot;&#xD;&#xA;    back[1] = &quot;....................X.........X........X...........X............XXXXX.&quot;&#xD;&#xA;    back[2] = &quot;...................X.........X........X...........X............XXXXX..&quot;&#xD;&#xA;    back[3] = &quot;..................X.........X........X...........X............XXXXX...&quot;&#xD;&#xA;    back[4] = &quot;.................X.........X........X...........X............XXXXX....&quot;&#xD;&#xA;    back[5] = &quot;.................X.........X........X...........X............XXXXX....&quot;&#xD;&#xA;    back[6] = &quot;..................X.........X........X...........X............XXXXX...&quot;&#xD;&#xA;    back[7] = &quot;...................X.........X........X...........X............XXXXX..&quot;&#xD;&#xA;    back[8] = &quot;....................X.........X........X...........X............XXXXX.&quot;&#xD;&#xA;    back[9] = &quot;.....................X.........X........X...........X............XXXXX&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now start with &quot;offset=0&quot; and perhaps look 15 tiles ahead (depending on screen and game size).&#xD;&#xA;&#xD;&#xA;Everytime you scroll a tile, your viewOffset will give you an extra &quot;cell&quot; this means that the most left set tiles must be destroyed and a new set should be inserted.&#xD;&#xA;&#xD;&#xA;I think I might do it vertically instead of horisontally while displaying the tiles, because the horisontal arrays makes it easy to build a level here, but the vertial array would make it easier to scroll in realtime I think. But you decide.&#xD;&#xA;&#xD;&#xA;Look up how the old &quot;snake game&quot; is build too. There is the idea too, as the head and the end of the snake is a matter of positions in a growing array (same trick with the view here, just a &quot;horisontal snake pr. row&quot;.&#xD;&#xA;&#xD;&#xA;Does it make any sense?" />
  <row Id="11580" PostHistoryTypeId="2" PostId="5827" RevisionGUID="32f02624-6323-4545-972f-d0cbf931eff0" CreationDate="2010-11-21T05:35:36.077" UserId="3115" Text="I was once building a tilebased game on the Amiga 500 with 512x512 tiles but the player could only move 8 tiles, so I generated a &quot;9x9&quot; tiles &quot;wall map&quot; pr. soldier. If I had done this with the original map, I would first of all have had to &quot;clear it up&quot; after each calculation + the amount of memory needed to have both tile data + pathfinding data would make 512x512 become a much begger memory hog.&#xD;&#xA;&#xD;&#xA;So no, keep things as small as possible and seperate so you can tweak them pr. object/class if needed. Another thing to think of might also be that some of your moving objects MIGHT move differently over certain parts of the map. Eg. slow in sand, can/cannot swim, can open doors etc.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11581" PostHistoryTypeId="2" PostId="5828" RevisionGUID="c3fa21b5-b88d-4ad0-9458-0b073369afb6" CreationDate="2010-11-21T08:47:42.067" UserId="2029" Text="I was looking at some sprite sheets at sprite sheet database. I noticed that some of the sprite sheets had several different objects placed together in one file. Some of the sprites, such as movement animations were placed next to each other so that they were of the same height. However, sometimes next to them are larger sprite objects that take up a different amount of space.&#xD;&#xA;&#xD;&#xA;These sprite sheets have no apparent information such as cell width and height. It seems like you would have to clip them through trial and error. Is there some sort of algorithm to figure out how to clip them without external sprite grid information?&#xD;&#xA;&#xD;&#xA;http://sdb.drshnaps.com/display.php?object=7604" />
  <row Id="11582" PostHistoryTypeId="1" PostId="5828" RevisionGUID="c3fa21b5-b88d-4ad0-9458-0b073369afb6" CreationDate="2010-11-21T08:47:42.067" UserId="2029" Text="Clipping Sprite Sheets with Variable Placement" />
  <row Id="11583" PostHistoryTypeId="3" PostId="5828" RevisionGUID="c3fa21b5-b88d-4ad0-9458-0b073369afb6" CreationDate="2010-11-21T08:47:42.067" UserId="2029" Text="&lt;sprites&gt;" />
  <row Id="11584" PostHistoryTypeId="2" PostId="5829" RevisionGUID="201a16ba-4daf-476a-afcf-70c398e512fd" CreationDate="2010-11-21T10:00:50.220" UserId="2787" Text="On our project we have **item_attributes** for the different &quot;extra data&quot; that an item may have. It's laid out something like this:&#xD;&#xA;&#xD;&#xA;    item_id | attribute_id    | attribute_value | order &#xD;&#xA;    1        25 (attackspeed)       50             3    &#xD;&#xA;&#xD;&#xA;Then we have an attributes table that looks like so:&#xD;&#xA;&#xD;&#xA;    id |   name       | description&#xD;&#xA;    1    attackspeed    AttackSpeed:&#xD;&#xA;&#xD;&#xA;Ari Patrick is right though, ultimately relational db's aren't made for this. The downside is that we have some pretty complex procedures to generate new items (done through an external tool - which I highly recommend, Do not try and manually add these, you'll only confuse yourself)&#xD;&#xA;&#xD;&#xA;**The other option** you have is using a scripting language to create the item templates, then you can easily parse those in and use that to create new items. You still of course have to save the item data in the database but at that point you don't need to worry about specifics of creating new items, you can pretty much just copy and old script file, change some information and you're good to go.&#xD;&#xA;&#xD;&#xA;Honestly, if we were to re-do how we create new static items we would probably go for a much simpler approach using scripting item templates." />
  <row Id="11585" PostHistoryTypeId="2" PostId="5830" RevisionGUID="96c745e5-159c-4d48-9533-c164020e9f1e" CreationDate="2010-11-21T10:17:32.177" UserId="3484" Text="I'm looking for tutorials and documentation for JMonkeyEngine, beside the material on the official website. Any clue?" />
  <row Id="11586" PostHistoryTypeId="1" PostId="5830" RevisionGUID="96c745e5-159c-4d48-9533-c164020e9f1e" CreationDate="2010-11-21T10:17:32.177" UserId="3484" Text="Looking for JMonkeyEngine tutorials and documentation" />
  <row Id="11587" PostHistoryTypeId="3" PostId="5830" RevisionGUID="96c745e5-159c-4d48-9533-c164020e9f1e" CreationDate="2010-11-21T10:17:32.177" UserId="3484" Text="&lt;java&gt;&lt;tutorials&gt;" />
  <row Id="11588" PostHistoryTypeId="2" PostId="5831" RevisionGUID="5a1f3902-9bbb-4609-bc46-1dca68fb72e3" CreationDate="2010-11-21T10:22:59.080" UserId="3498" Text="I wrote a lengthy post about producing retro vector graphics using OpenGL from pyglet:&#xD;&#xA;&#xD;&#xA;http://tartley.com/?p=1142&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/5us6F.png" />
  <row Id="11589" PostHistoryTypeId="2" PostId="5832" RevisionGUID="17f8d923-e4bc-4344-b014-8906c955714a" CreationDate="2010-11-21T10:57:52.663" UserId="659" Text="Don't 'spawn and move' individual tiles. That way will only lead to pain.&#xD;&#xA;&#xD;&#xA;Create a big 2-dimensional array of tile types (the 'tilemap') containing your whole level, and display the section that is currently on-screen.&#xD;&#xA;&#xD;&#xA;Just keep track of a 'scroll position' - either the location of the top-left or centre of your screen measured in pixels within the entire tilemap. Then use this to determine which range of tiles to draw, and where they should be on the screen." />
  <row Id="11591" PostHistoryTypeId="2" PostId="5834" RevisionGUID="4081ec24-bb92-48f9-83af-5dfcdb2aba8b" CreationDate="2010-11-21T13:21:58.403" UserId="862" Text="Now you even have a starter kit for XNA for card games:&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/blackjack" />
  <row Id="11592" PostHistoryTypeId="2" PostId="5835" RevisionGUID="0d9ab486-b73c-4db8-be54-20e45f9e60d8" CreationDate="2010-11-21T13:28:18.030" UserId="2239" Text="This is where I find more modern OR mappers to be really useful, like Entity Framework 4 and its (CTP) [code-first feature][1]. You just write the classes and their relationsships in regular code and without even having to decorate them or manually run any tools, EF will generate the backing store in SQL format for you, with required link tables and all... it really unleashes creativity imo ^^&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx" />
  <row Id="11593" PostHistoryTypeId="6" PostId="5787" RevisionGUID="244f546f-4730-4a47-bf3b-e22909b6bce2" CreationDate="2010-11-21T14:40:38.780" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;opengl&gt;&lt;python&gt;&lt;pyglet&gt;" />
  <row Id="11594" PostHistoryTypeId="5" PostId="5719" RevisionGUID="bee76259-9fc8-4fa0-9e48-0debeb7a0243" CreationDate="2010-11-21T16:38:07.710" UserId="3271" Comment="Added links to mentioned libs." Text="If you don't want to worry about people having to install stuff, go with Flash. Otherwise, I'd do Canvas/Javascript with [Socket.IO][1]. Canvas works in everything except IE, though [excanvas.js][2] adds support to IE7+, albeit a bit slow. Socket.IO works on pretty much anything, so I'd say Canvas is pretty close to matching Flash in ease-of-use, but users *may* need a better browser, depending on game complexity.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://socket.io&#xD;&#xA;  [2]: http://excanvas.sourceforge.net/" />
  <row Id="11595" PostHistoryTypeId="2" PostId="5836" RevisionGUID="7963dfbf-7537-4d92-8b3d-94b0f23d7229" CreationDate="2010-11-21T17:14:46.387" UserId="953" Text="This is a bit hacky, and I make no guarantees it's good DB design; my DB classes were a while ago, and they're not coming quickly to mind.  But if items are guaranteed to have, say, fewer than 10 items, you could give each item an attribute1 field, and attribute2 field, and so on up to attribute10.  It would eliminate your need for the many-to-many item-attribute table, at the cost of limiting the number of attributes.&#xD;&#xA;&#xD;&#xA;Looking back on that, I'm pretty sure it's terrible design, but it does mean you can stick with a comfortable relational database and not have to go into uncharted territory.  It's up to you to decide if the trade-off is worth it." />
  <row Id="11596" PostHistoryTypeId="16" PostId="5830" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-21T18:25:21.287" UserId="51" />
  <row Id="11597" PostHistoryTypeId="2" PostId="5837" RevisionGUID="6f07c757-059d-4aba-b8ff-8b168d6ac6c3" CreationDate="2010-11-21T18:32:50.233" UserId="2472" Text="I'm going to mildly disagree with everyone and say that the relational approach is reasonable here. What's interesting here is that items can have multiple roles. The main issue will be that the mapping between this relational layout and an OO layout in the code won't feel “natural”, but I think on the database side multiple roles can be expressed cleanly (without weird encodings or redundancy, just joins).&#xD;&#xA;&#xD;&#xA;The first thing to decide is how much of the data is item specific and how much is shared by all items of a given type. &#xD;&#xA;&#xD;&#xA;Here's what I'd do if *all* data is item specific:&#xD;&#xA;&#xD;&#xA;    // ITEMS table: attributes common to all items&#xD;&#xA;    item_id | name | owner | location | sprite_id | ...&#xD;&#xA;    1 | Light Saber | 14 (Tchalvek) | 381 (Tchalvek house) | 5663 | ...&#xD;&#xA;    &#xD;&#xA;    // WEAPONS table: attributes for items that are weapons&#xD;&#xA;    item_id | damage | damage_type | durability | ...&#xD;&#xA;    1 | 5 | sharp | 13 | ...&#xD;&#xA;&#xD;&#xA;    // LIGHTING table: attributes for items that serve as lights&#xD;&#xA;    item_id | radius | brightness | duration | ...&#xD;&#xA;    1 | 3 meters | 50 | 8 hours | ...&#xD;&#xA;&#xD;&#xA;In this design, every item is in the Items table, along with attributes that all (or most) items have. Each additional role that an item can play is a separate table.&#xD;&#xA;&#xD;&#xA;If you want to use it as a weapon, you'd look it up in the Weapons table. If it's there, then it's usable as a weapon. If it's not there, then it can't be used as a weapon. The existence of the record tells you whether it's a weapon. And if it's there. all its weapon-specific attributes are stored there. Since those attributes are stored directly instead of in some encoded form, you'll be able to perform queries/filters with them. (For example, for your game's metrics page you might want to aggregate players by weapon damage type, and you'd be able to do that with some joins and a group-by damage_type.)&#xD;&#xA;&#xD;&#xA;An item can have multiple roles, and exist in more than one role-specific table (in this example, both weapon and lighting).&#xD;&#xA;&#xD;&#xA;If it's just a boolean like &quot;is this holdable&quot;, I'd put it into the Items table. It may be worth caching &quot;is this a weapon&quot; etc. in there so that you don't have to perform a lookup on the Weapons and other role tables. However, it adds redundancy so you have to be careful to keep it in sync.&#xD;&#xA;&#xD;&#xA;Ari's recommendation of having an additional table *per type* can also be used with this approach if some data won't vary per item.  For example, if the weapon damage doesn't vary per item, but the roles still vary per item, you can factor shared weapon attributes out into a table:&#xD;&#xA;&#xD;&#xA;    // WEAPONS table: attributes for items that are weapons&#xD;&#xA;    item_id | durability | weapon_type&#xD;&#xA;    1 | 13 | light_saber&#xD;&#xA;&#xD;&#xA;    // WEAPONTYPES table: attributes for classes of weapons&#xD;&#xA;    weapon_type_id | damage | damage_type&#xD;&#xA;    light_saber | 5 | energy&#xD;&#xA;&#xD;&#xA;Another approach would be if the roles played by items do not vary by item, but only by item type. In that case you'd put the item_type into the Items table, and can store the properties like &quot;is it a weapon&quot; and &quot;is it holdable&quot; and &quot;is it a light&quot; in an ItemTypes table. In this example I also make item names not vary per item:&#xD;&#xA;&#xD;&#xA;    // ITEMS table: attributes per item&#xD;&#xA;    item_id | item_type | owner | location&#xD;&#xA;    1 | light_saber | 14 (Tchalvek) | 381 (Tchalvek house)&#xD;&#xA;&#xD;&#xA;    // ITEMTYPES table: attributes shared by all items of a type&#xD;&#xA;    item_type | name | sprite_id | is_holdable | is_weapon | is_light&#xD;&#xA;    light_saber | Light Saber | 5663 | true | true | true&#xD;&#xA;    &#xD;&#xA;    // WEAPONTYPES table: attributes for item types that are also weapons&#xD;&#xA;    item_type | damage | damage_type&#xD;&#xA;    light_saber | 5 | energy&#xD;&#xA;&#xD;&#xA;It's likely that itemtypes and weapontypes don't change during the game, so you can just load those tables into memory once, and look up those attributes in a hash table instead of with a database join.&#xD;&#xA;" />
  <row Id="11598" PostHistoryTypeId="2" PostId="5838" RevisionGUID="401ab9d0-2383-40cf-a308-1d756a273570" CreationDate="2010-11-21T18:40:45.127" UserId="3219" Text="Does anybody knows or have any info about the OS of the servers of World of Warcraft?&#xD;&#xA;&#xD;&#xA;I have a &quot;debate&quot; with some friends about the OS behind WoW. They say it could be Win, which is very strange for me." />
  <row Id="11599" PostHistoryTypeId="1" PostId="5838" RevisionGUID="401ab9d0-2383-40cf-a308-1d756a273570" CreationDate="2010-11-21T18:40:45.127" UserId="3219" Text="World of Warcraft servers" />
  <row Id="11600" PostHistoryTypeId="3" PostId="5838" RevisionGUID="401ab9d0-2383-40cf-a308-1d756a273570" CreationDate="2010-11-21T18:40:45.127" UserId="3219" Text="&lt;mmo&gt;&lt;operating-system&gt;" />
  <row Id="11601" PostHistoryTypeId="2" PostId="5839" RevisionGUID="fd0ee0ae-e691-4386-9c6d-9179fdd46aa7" CreationDate="2010-11-21T19:22:37.957" UserId="395" Text="Most MMOs use Windows for servers mostly because of Visual Studio. VS is basically the only development and debugging environment that is worth its salt (cue *nix users saying that gdb is just as powerful as VS). This means that we all are generally developing both the clients and servers on Windows, so it is just easier to also deploy on Windows. There are some out there that will cross-compile the servers for production (clients are clearly always targeting Windows at the very least, even if you have a Mac version) but it ends up being a hard thing to maintain and it makes debugging production systems that much harder. The big exception is web-based games, those are almost always Linux based (and usually running Apache and/or Nginx)." />
  <row Id="11602" PostHistoryTypeId="2" PostId="5840" RevisionGUID="cf60b145-d688-4b5c-9984-6a8620a055f5" CreationDate="2010-11-21T20:35:18.620" UserId="3282" Text="I'd like to open an XNB file on Linux.&#xD;&#xA;&#xD;&#xA;It should be an `XNA Game Studio Express XNA Framework Content Pipeline Binary File`.&#xD;&#xA;&#xD;&#xA;Any tool to open it? (also for windows which I can emulate on wine)" />
  <row Id="11603" PostHistoryTypeId="1" PostId="5840" RevisionGUID="cf60b145-d688-4b5c-9984-6a8620a055f5" CreationDate="2010-11-21T20:35:18.620" UserId="3282" Text=".XNB file reader" />
  <row Id="11604" PostHistoryTypeId="3" PostId="5840" RevisionGUID="cf60b145-d688-4b5c-9984-6a8620a055f5" CreationDate="2010-11-21T20:35:18.620" UserId="3282" Text="&lt;xna&gt;&lt;file&gt;" />
  <row Id="11605" PostHistoryTypeId="2" PostId="5841" RevisionGUID="c12ddfa4-49b9-45ca-9994-fdbcf1d9a6c0" CreationDate="2010-11-21T21:11:47.640" UserId="2798" Text="The [GXView][1] program inside Gametools Suite should do the work, although I haven't tested it myself.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gruaz.net/?page_id=407" />
  <row Id="11606" PostHistoryTypeId="10" PostId="5838" RevisionGUID="8ef97bff-a46a-47e1-ba55-8f60398b9601" CreationDate="2010-11-21T21:24:31.920" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11607" PostHistoryTypeId="2" PostId="5842" RevisionGUID="7d06e083-0b0b-4426-b794-c9b6bcaa078e" CreationDate="2010-11-21T22:47:17.030" UserId="1280" Text="There's [OpenLaszlo][1] which allows you to write applications/games in its' own declarative language and then compile them to Flash (or other targets).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.openlaszlo.org/" />
  <row Id="11608" PostHistoryTypeId="2" PostId="5843" RevisionGUID="00c35521-a93a-481c-9fc4-4784c39f38c4" CreationDate="2010-11-21T22:50:34.880" UserId="3505" Text="You can't rely on web workers for anything practical, they are missing in way too many browsers.&#xD;&#xA;&#xD;&#xA;In any case, this is about finding and implementing an efficient algorithm.&#xD;&#xA;&#xD;&#xA;Here is how I would do it, presuming the rules that new letters must be connected to existing, and that they may only be placed in a single row or column:&#xD;&#xA;&#xD;&#xA;First make an index of words and wordparts. A single JS object containing all words and wordparts as index, and a value to determine if an index is a word or a wordpart. E.g. for the word &quot;old&quot; the object would have to contain `{&quot;old&quot;:2, &quot;o&quot;:1, &quot;l&quot;:1, &quot;d&quot;:1, &quot;ol&quot;:1, &quot;ld&quot;:1}` where the value 2 denotes a legal word, and 1 denotes a part of a legal word that is not a word on it's own.&#xD;&#xA;&#xD;&#xA;    For each open space next to at least one letter&#xD;&#xA;      Try placing each letter on the players hand on the space&#xD;&#xA;        If the placed letter connect to other letters both horizontally and vertically&#xD;&#xA;          Check the value of both formed words in your index&#xD;&#xA;          If both values are 2 you have found a legal move and should stop searching&#xD;&#xA;          If one value is 1 and one is 2 you need to try expanding the value 1 word&#xD;&#xA;            For each letter added any word in the other direction must have value 2&#xD;&#xA;            If the word being expanded reach a state not in the index no further &#xD;&#xA;            expansion will make it legal&#xD;&#xA;            If it reach value 2 you have a legal combination&#xD;&#xA;          Else that letter placement can not be part of a legal combination&#xD;&#xA;        Else&#xD;&#xA;          Check the value of the word formed&#xD;&#xA;          If the value is 2 you have found a legal combination&#xD;&#xA;          If the value is 1 continue like the 1,2 combination" />
  <row Id="11609" PostHistoryTypeId="2" PostId="5844" RevisionGUID="f2aaca5a-aa92-4c98-9815-f2841eab527b" CreationDate="2010-11-21T23:25:28.497" UserId="3506" Text="I'm creating a simple top-scrolling racing game. The concept is quite simple - the player controls the car, which goes on a dynamically generated field with square blocks. Once the car hits a car, the game ends.&#xD;&#xA;&#xD;&#xA;My first implementation was simply to put a few random blocks in each row being generated on the top of the screen, but this does lead to maps where going through is impossible.&#xD;&#xA;&#xD;&#xA;What is the best algorithm for generating such type maps? My platform of choice is XNA and C#, if that's important." />
  <row Id="11610" PostHistoryTypeId="1" PostId="5844" RevisionGUID="f2aaca5a-aa92-4c98-9815-f2841eab527b" CreationDate="2010-11-21T23:25:28.497" UserId="3506" Text="Generating a map in runtime for a simple top-scrolling racing game" />
  <row Id="11611" PostHistoryTypeId="3" PostId="5844" RevisionGUID="f2aaca5a-aa92-4c98-9815-f2841eab527b" CreationDate="2010-11-21T23:25:28.497" UserId="3506" Text="&lt;maps&gt;&lt;side-scroller&gt;" />
  <row Id="11612" PostHistoryTypeId="2" PostId="5845" RevisionGUID="c6d92d3b-2e89-4feb-9019-6312f6b6a57d" CreationDate="2010-11-22T00:27:37.610" UserId="3505" Text="You will have to do some pathfinding. I'd suggest something like this: Choose grace distance, the shorter, the harder the game may be. When you add a new row fist find out in what places the player may be after travelling the grace distance. You can use an [A*](http://en.wikipedia.org/wiki/A%2a_search_algorithm) search algorithm to find the group of points efficiently, then you remove any point that doesn't have a path through the currently generated rows from the group. Now you generate a new row and check that all the points in the group have a path all the way through the new row, if some of them doesn't you will have to regenerate the row.&#xD;&#xA;&#xD;&#xA;I haven't been very specific about the actual pathfinding, I would want to know how the game physics work before going too deep into that, but basically for pathfinding the same coordinate set is to be considered different positions depending on the cars velocity and any other parameter that alter where the car may move." />
  <row Id="11613" PostHistoryTypeId="5" PostId="5837" RevisionGUID="8bd29719-7173-4400-9e4a-578d04a1277a" CreationDate="2010-11-22T03:37:30.960" UserId="2472" Comment="Fixed punctuation: changed period to comma." Text="I'm going to mildly disagree with everyone and say that the relational approach is reasonable here. What's interesting here is that items can have multiple roles. The main issue will be that the mapping between this relational layout and an OO layout in the code won't feel “natural”, but I think on the database side multiple roles can be expressed cleanly (without weird encodings or redundancy, just joins).&#xD;&#xA;&#xD;&#xA;The first thing to decide is how much of the data is item specific and how much is shared by all items of a given type. &#xD;&#xA;&#xD;&#xA;Here's what I'd do if *all* data is item specific:&#xD;&#xA;&#xD;&#xA;    // ITEMS table: attributes common to all items&#xD;&#xA;    item_id | name | owner | location | sprite_id | ...&#xD;&#xA;    1 | Light Saber | 14 (Tchalvek) | 381 (Tchalvek house) | 5663 | ...&#xD;&#xA;    &#xD;&#xA;    // WEAPONS table: attributes for items that are weapons&#xD;&#xA;    item_id | damage | damage_type | durability | ...&#xD;&#xA;    1 | 5 | sharp | 13 | ...&#xD;&#xA;&#xD;&#xA;    // LIGHTING table: attributes for items that serve as lights&#xD;&#xA;    item_id | radius | brightness | duration | ...&#xD;&#xA;    1 | 3 meters | 50 | 8 hours | ...&#xD;&#xA;&#xD;&#xA;In this design, every item is in the Items table, along with attributes that all (or most) items have. Each additional role that an item can play is a separate table.&#xD;&#xA;&#xD;&#xA;If you want to use it as a weapon, you'd look it up in the Weapons table. If it's there, then it's usable as a weapon. If it's not there, then it can't be used as a weapon. The existence of the record tells you whether it's a weapon. And if it's there, all its weapon-specific attributes are stored there. Since those attributes are stored directly instead of in some encoded form, you'll be able to perform queries/filters with them. (For example, for your game's metrics page you might want to aggregate players by weapon damage type, and you'd be able to do that with some joins and a group-by damage_type.)&#xD;&#xA;&#xD;&#xA;An item can have multiple roles, and exist in more than one role-specific table (in this example, both weapon and lighting).&#xD;&#xA;&#xD;&#xA;If it's just a boolean like &quot;is this holdable&quot;, I'd put it into the Items table. It may be worth caching &quot;is this a weapon&quot; etc. in there so that you don't have to perform a lookup on the Weapons and other role tables. However, it adds redundancy so you have to be careful to keep it in sync.&#xD;&#xA;&#xD;&#xA;Ari's recommendation of having an additional table *per type* can also be used with this approach if some data won't vary per item.  For example, if the weapon damage doesn't vary per item, but the roles still vary per item, you can factor shared weapon attributes out into a table:&#xD;&#xA;&#xD;&#xA;    // WEAPONS table: attributes for items that are weapons&#xD;&#xA;    item_id | durability | weapon_type&#xD;&#xA;    1 | 13 | light_saber&#xD;&#xA;&#xD;&#xA;    // WEAPONTYPES table: attributes for classes of weapons&#xD;&#xA;    weapon_type_id | damage | damage_type&#xD;&#xA;    light_saber | 5 | energy&#xD;&#xA;&#xD;&#xA;Another approach would be if the roles played by items do not vary by item, but only by item type. In that case you'd put the item_type into the Items table, and can store the properties like &quot;is it a weapon&quot; and &quot;is it holdable&quot; and &quot;is it a light&quot; in an ItemTypes table. In this example I also make item names not vary per item:&#xD;&#xA;&#xD;&#xA;    // ITEMS table: attributes per item&#xD;&#xA;    item_id | item_type | owner | location&#xD;&#xA;    1 | light_saber | 14 (Tchalvek) | 381 (Tchalvek house)&#xD;&#xA;&#xD;&#xA;    // ITEMTYPES table: attributes shared by all items of a type&#xD;&#xA;    item_type | name | sprite_id | is_holdable | is_weapon | is_light&#xD;&#xA;    light_saber | Light Saber | 5663 | true | true | true&#xD;&#xA;    &#xD;&#xA;    // WEAPONTYPES table: attributes for item types that are also weapons&#xD;&#xA;    item_type | damage | damage_type&#xD;&#xA;    light_saber | 5 | energy&#xD;&#xA;&#xD;&#xA;It's likely that itemtypes and weapontypes don't change during the game, so you can just load those tables into memory once, and look up those attributes in a hash table instead of with a database join.&#xD;&#xA;" />
  <row Id="11614" PostHistoryTypeId="5" PostId="5769" RevisionGUID="1d0d1ab5-4f71-4614-8e85-817eeb20a2e5" CreationDate="2010-11-22T05:17:22.587" UserId="3326" Comment="added 1 characters in body" Text="So I am designing a game like scrabble in which a user has to make words using the letters on the screen. When the there is no possible combination of word that can be made with the letter the game is automatically supposed to tell the user to shuffle. Which changes the present set of alphabets with a new set (odds are very very very low that the new set cannot form a word either.)&#xD;&#xA;&#xD;&#xA;So I now its a simple word game, but I am making this on HTML5 Canvas. It hugely resource consuming. And I need to run this even heavier computation on the client machine of whether a new word is possible from the selection on the screen. Ideally I would run a thread were this an app for the native code, and check after every new word created whether new words are possible with the remaining alphabets. Alas on the web browser I am afraid, it will toast the computer, crash the browser and a lot of other horrible things. So I would like to know is there a way that I could make such a computation feasible with all the other actions I am already running!?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="11615" PostHistoryTypeId="5" PostId="5253" RevisionGUID="352c6e00-ece8-47cb-8edc-ec74cea91f89" CreationDate="2010-11-22T06:09:05.290" UserId="2995" Comment="sunburn pricing" Text="In short, the most **usable** 3D game engines written in fully managed C# code (which allows you to develop for the Windows and Xbox 360) are:&#xD;&#xA;&#xD;&#xA;-  **[Ox Game Engine][1]** - a 3d version of the ButterMilk 2d engine - excellent features, Jiggle physics, reasonable scene editor, shadows. **Free**.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;- **[SunBurn][3]** - AAA rendering with dynamic lighting &amp; shadowing, occulusion, HDR rendering, spectacular, diffuse and bump maps, and includes a 3D Game world editor to edit models, lights, materials. **$150** or more. **Free** version also [available][4].&#xD;&#xA;&#xD;&#xA;![alt text][5]&#xD;&#xA;&#xD;&#xA;I would have mentioned **Torque X** on the top list but the negative response has been so overwhelming that I'm quite convinced it really a mess.&#xD;&#xA;&#xD;&#xA;The other engines are listed here:&#xD;&#xA;&#xD;&#xA;**Open Source**&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;- [TXna Game Engine][6] - Includes lighting, camera controllers&#xD;&#xA;-  [Axiom3d][7] - port of the native Ogre. Multi platform.&#xD;&#xA;-  [QuickStart 3D Game Engine][8] - particles, rain, fog, water, terrain&#xD;&#xA;- [Engine Nine][9] - animation, terrain, sky, post processing screen effects &#xD;&#xA;- The [Ship Game][10] and the [Robot Game][11] starter kits contain enough code to make a decent 3d engine though they are not documented as such. &#xD;&#xA;- [Attolo 3D XNA Engine][12] - Includes particle effects, model loading, terrain, etc.&#xD;&#xA;- [Reactor 3D][13] - development stopped&#xD;&#xA;- [Titanium XNA Game Engine][14] - fog, lighting&#xD;&#xA;- [Tomahawk][15] - Pretty well supported engine.&#xD;&#xA;- [Phoenix][16] - still in development&#xD;&#xA;&#xD;&#xA;2D&#xD;&#xA; &#xD;&#xA;- [Flat Red Ball][17] - 2.5d game engine thats been around since the Managed DirectX days. Very well updated and supported. &#xD;&#xA;- [Jemgine][18] - 2D game engine with level editor, components, visual scripting language&#xD;&#xA;- [Box2D.XNA][19] - A C# port of the Box2D engine&#xD;&#xA;- [DEngine][20] - 2D tile engine with basic editor&#xD;&#xA;&#xD;&#xA;**Commercial game engines**&#xD;&#xA;&#xD;&#xA;- [Kitae][21] - 2D game engine with tile/level editor, collision detection, sprites, fonts, etc.&#xD;&#xA;- [TorqueX][22] - [(not recommended)][23]&#xD;&#xA;  - 2D - TorqueX Game Builder to edit levels from a drag and drop UI. &#xD;&#xA;  - 3D - TorqueX World Builder to build 3D game levels with objects and lighting&#xD;&#xA;- [Visual3d.net][24] - (Windows only)&#xD;&#xA;&#xD;&#xA;**Specialist**&#xD;&#xA;&#xD;&#xA;- [Mercury Particle Engine][25]&#xD;&#xA;- [Dynamic Particle System Framework][26]&#xD;&#xA;- [Simple AI][27] - path finding, path following, behaviours&#xD;&#xA;&#xD;&#xA;**Physics Engines**&#xD;&#xA;&#xD;&#xA;If you require code that will run on Xbox 360 or Zune then you need a 100% managed engine.&#xD;&#xA;&#xD;&#xA;Most of these are free, or are free wrappers around commercial products.&#xD;&#xA;&#xD;&#xA;- [Farseer][28] - 2d only. Source and Silverlight port available &#xD;&#xA;- [JigLibX][29] - Source available, port of C++ [JigLib][30], formerly JiggleX &#xD;&#xA;- [Bullet][31]  &#xD;&#xA;   - [BulletX][32]: By XnaDevRu: Supports Xbox360 as well as windows. Updated recently (dec 21 2007). &#xD;&#xA;   - [XBAP][33]: By Chris Cavanagh, buildt on BulletX above. &#xD;&#xA;- [Newton][34] &#xD;&#xA;- [Oops! 3D Physics Framework][35] &#xD;&#xA;- [Bepu physics][36] - commercial but free for non commercial use &#xD;&#xA;- [Jello Physics][37] - soft body physics. Used in [JelloCar][38] and other fun [Walaber][39] games. &#xD;&#xA;- [Physics2D.Net][40] - see demo video &#xD;&#xA;- [Henge3D Physics Library][41] - Rigid body physics with constraints and joints&#xD;&#xA;- [XnaHavok][42] - C# port of Havok&#xD;&#xA;- [X-Engine][43] - rigid body physics (development stopped)&#xD;&#xA;&#xD;&#xA;If you are only targetting **windows** then you can use any of these:&#xD;&#xA;&#xD;&#xA;- [PhysX][44] &#xD;&#xA;    - [PhysX.NET][45]&#xD;&#xA;    - [Wrapper][46] for MS Robotics Studio but check the license. &#xD;&#xA;- [ODE][47] (Open Dyamics Engine) &#xD;&#xA;    - [XPA][48] (XNA Physics lib): XnaDevRu has a nice wrapper for, but it's majorly outdated and ODE is rumored to be bad/unstable. There's very little information about it, but the API is pretty friendly. Pretty easy to get up and running with simple collisions (even I made it!), but its hard to find what you need when problems occur, and its updated very slowly.&#xD;&#xA;- [Newton Game Dynamics][49]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeplex.com/OxGameEngine&#xD;&#xA;  [2]: http://i.stack.imgur.com/dW9Zi.png&#xD;&#xA;  [3]: http://www.synapsegaming.com/products/sunburn/engine/&#xD;&#xA;  [4]: http://www.synapsegaming.com/products/sunburn/framework/&#xD;&#xA;  [5]: http://i.stack.imgur.com/ta32d.png&#xD;&#xA;  [6]: http://txnagameengine.sourceforge.net/&#xD;&#xA;  [7]: http://axiom3d.net/wiki/index.php/Main_Page&#xD;&#xA;  [8]: http://www.codeplex.com/QuickStartEngine&#xD;&#xA;  [9]: http://nine.codeplex.com/&#xD;&#xA;  [10]: http://creators.xna.com/en-us/starterkit/shipgame&#xD;&#xA;  [11]: http://creators.xna.com/en-us/minigame/robotgame&#xD;&#xA;  [12]: http://attollo3d.codeplex.com/&#xD;&#xA;  [13]: http://www.reactor3d.com/forums/index.php?www&#xD;&#xA;  [14]: http://txnage.codeplex.com/&#xD;&#xA;  [15]: http://www.assembla.com/wiki/show/tomahawkengine&#xD;&#xA;  [16]: http://phoenixxna.codeplex.com/&#xD;&#xA;  [17]: http://www.flatredball.com/frb/&#xD;&#xA;  [18]: http://jemgine.codeplex.com/&#xD;&#xA;  [19]: http://box2dxna.codeplex.com/&#xD;&#xA;  [20]: http://dengine.codeplex.com/&#xD;&#xA;  [21]: http://www.nullcity.com/Default.aspx?section=Kitae&#xD;&#xA;  [22]: http://www.garagegames.com/products/torque/x/&#xD;&#xA;  [23]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products/2950#2950&#xD;&#xA;  [24]: http://www.visual3d.net/&#xD;&#xA;  [25]: http://www.codeplex.com/mpe&#xD;&#xA;  [26]: http://dpsf.danskingdom.com/&#xD;&#xA;  [27]: http://simpleai.codeplex.com/&#xD;&#xA;  [28]: http://www.codeplex.com/FarseerPhysics&#xD;&#xA;  [29]: http://www.codeplex.com/JigLibX&#xD;&#xA;  [30]: http://www.rowlhouse.co.uk/jiglib/index.html&#xD;&#xA;  [31]: http://bulletphysics.com/&#xD;&#xA;  [32]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=Managed%20Bullet%20Physics%20Library&amp;referringTitle=Home&#xD;&#xA;  [33]: http://chriscavanagh.wordpress.com/2007/04/24/xbap-3d-physics-source/&#xD;&#xA;  [34]: http://www.tamedtornado.com/devblog/?p=58&#xD;&#xA;  [35]: http://www.codeplex.com/OopsFramework&#xD;&#xA;  [36]: http://www.bepu-games.com/BEPUphysics/&#xD;&#xA;  [37]: http://walaber.com/index.php?action=showitem&amp;id=16&#xD;&#xA;  [38]: http://walaber.com/index.php?action=showitem&amp;id=17&#xD;&#xA;  [39]: http://walaber.com/&#xD;&#xA;  [40]: http://physics2d.googlepages.com/&#xD;&#xA;  [41]: http://henge3d.codeplex.com/&#xD;&#xA;  [42]: http://sourceforge.net/projects/xnahavok/&#xD;&#xA;  [43]: http://www.codeplex.com/xengine&#xD;&#xA;  [44]: http://www.ageia.com/&#xD;&#xA;  [45]: http://code.google.com/p/physxdotnet/&#xD;&#xA;  [46]: http://msdn2.microsoft.com/en-us/robotics/default.aspx&#xD;&#xA;  [47]: http://ode.org/&#xD;&#xA;  [48]: http://www.codeplex.com/xnadevru/Wiki/View.aspx?title=XNA%20Physics%20API%20%28XPA%29&amp;referringTitle=Home&#xD;&#xA;  [49]: http://www.newtondynamics.com/" />
  <row Id="11616" PostHistoryTypeId="2" PostId="5846" RevisionGUID="dc2d6c33-14c8-4d07-97b7-2662d112d59f" CreationDate="2010-11-22T09:29:24.557" UserId="2029" Text="How was Quicktime video integrated into the MYST series games? I was watching a Making of MYST video and noticed that they used a small green screen and for the sequels like Riven they continued to use a green screen but with a much bigger stage. How is it that they match up the video file and integrate it seamlessly into the game? I'm really curious as to how they did it with Riven, where full body actors actually move around with a greater degree of freedom.&#xD;&#xA;&#xD;&#xA;My guess is that the video recording is an exact duplicate of a pre-rendered scene. When the player enters into a certain area where a movie is supposed to take place, the video is drawn onto the screen and played. After the video ends, the pre-rendered screen is drawn back to the screen that reflects the changes that took place in the video. &#xD;&#xA;&#xD;&#xA;Any other ideas how it might have been done?" />
  <row Id="11617" PostHistoryTypeId="1" PostId="5846" RevisionGUID="dc2d6c33-14c8-4d07-97b7-2662d112d59f" CreationDate="2010-11-22T09:29:24.557" UserId="2029" Text="MYST/RIVEN and Quicktime Video Integration" />
  <row Id="11618" PostHistoryTypeId="3" PostId="5846" RevisionGUID="dc2d6c33-14c8-4d07-97b7-2662d112d59f" CreationDate="2010-11-22T09:29:24.557" UserId="2029" Text="&lt;methodology&gt;" />
  <row Id="11619" PostHistoryTypeId="2" PostId="5847" RevisionGUID="c1b9772d-f0b6-4cf6-999c-8137322d9d80" CreationDate="2010-11-22T10:08:30.233" UserId="653" Text="Just use the last 'top-row' as reference, and generate a valid row from there (for each block, pick one at random, if it's invalid, do it again). Now valid is something you'll have to define, but my guess is 'valid' would be reachable from any of the three neighboring blocks from the reference row." />
  <row Id="11620" PostHistoryTypeId="2" PostId="5848" RevisionGUID="ef7fee95-1f09-4c75-9813-24ee1a48a1a9" CreationDate="2010-11-22T11:26:51.647" UserId="3505" Text="Nevermind gave a good answer, but I wonder, do you even need a database for this? Storing all the data in a plain file and loading it into the program at launch seems like the smartest way of doing this." />
  <row Id="11621" PostHistoryTypeId="5" PostId="5844" RevisionGUID="153699aa-6d57-4022-863e-e5216d87f60f" CreationDate="2010-11-22T12:08:58.070" UserId="3506" Comment="added 150 characters in body" Text="I'm creating a simple top-scrolling racing game. The concept is quite simple - the player controls the car, which goes on a dynamically generated field with square blocks. Once the car hits a car, the game ends.&#xD;&#xA;&#xD;&#xA;My first implementation was simply to put a few random blocks in each row being generated on the top of the screen, but this does lead to maps where going through is impossible.&#xD;&#xA;&#xD;&#xA;What is the best algorithm for generating such type maps? My platform of choice is XNA and C#, if that's important.&#xD;&#xA;&#xD;&#xA;EDIT: Here's an illustration: [(pic)][1]&#xD;&#xA;&#xD;&#xA;In this case, there's no possible way for the player to pass.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/pSlB9.png" />
  <row Id="11622" PostHistoryTypeId="2" PostId="5849" RevisionGUID="2c3067f0-88dd-44d9-8dc0-3f7816fc8d5b" CreationDate="2010-11-22T12:19:11.787" UserId="2798" Text="Almost all sprite sheets ripped from old games that you will find online contain images that have been rebuilt from the original, smaller (usually 8x8 or 16x16 pixels) tiles. Below is an image of a tile editor without the color paletted adjusted to illustrate what i'm saying.&#xD;&#xA;&#xD;&#xA;![Tile editor][1]&#xD;&#xA;&#xD;&#xA;So, to use those graphics in your game, you *should* have the sprite origins and sizes stored in some way, for performance's sake. But, if you *still* want to get the sizes programatically, do something along this pseudocode:&#xD;&#xA;&#xD;&#xA;    var current_line = 0&#xD;&#xA;    var current_column = 0&#xD;&#xA;    &#xD;&#xA;    while (IsEmptyLine(lines[current_line]))&#xD;&#xA;    {&#xD;&#xA;    	current_line++&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    var top_line = current_line&#xD;&#xA;    &#xD;&#xA;    while (!IsEmptyLine(lines[current_line]))&#xD;&#xA;    {&#xD;&#xA;    	current_line++&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    var bottom_line = current_line&#xD;&#xA;    &#xD;&#xA;    while (IsEmptyColumn(columns[current_column]))&#xD;&#xA;    {&#xD;&#xA;    	current_column++&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    var left_column = current_column&#xD;&#xA;    &#xD;&#xA;    while (!IsEmptyColumn(columns[current_column]))&#xD;&#xA;    {&#xD;&#xA;    	current_column++&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    var right_column = current_column&#xD;&#xA;    &#xD;&#xA;    // rectangle(x, y, width, height)&#xD;&#xA;    rectangle bounds = new rectangle(left_column, top_line, right_column - left_column, bottom_line - top_line)&#xD;&#xA;&#xD;&#xA;IsEmptyLine/Column determines if a line or column is entirely made of fully transparent pixels. Also keep in mind that this is a generic code, and won't work for special cases, like non-vertical sprite tiling.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sLKsu.gif" />
  <row Id="11623" PostHistoryTypeId="5" PostId="5845" RevisionGUID="ab619f2c-0ec6-43a8-9ed9-4aeda568af68" CreationDate="2010-11-22T14:21:28.853" UserId="3505" Comment="deleted 12 characters in body" Text="You will have to do some pathfinding. I'd suggest something like this: Choose grace distance, the shorter, the harder the game may be. When you add a new row fist find out in what places the player may be after travelling the grace distance. You can use an [A*](http://en.wikipedia.org/wiki/A%2a_search_algorithm) search algorithm to find the group of points efficiently, then you remove any point that doesn't have a path through the currently generated rows from the group. Now you generate a new row and check that all the points in the group have a path all the way through the new row, if some of them doesn't you will have to regenerate the row.&#xD;&#xA;&#xD;&#xA;The pathfinding is very simple in this case, as the car can only occupy one of 8 different positions per row, so your pathfinding will never have to branch beyond 8 positions. You simply incrementally check what positions the car can reach in the next row, from the positions it may occupy in the previous row." />
  <row Id="11624" PostHistoryTypeId="2" PostId="5850" RevisionGUID="b9b6cb8b-66e5-4842-83c8-86a289a29d72" CreationDate="2010-11-22T15:25:01.303" UserId="1352" Text="Quick idea written during compile-time(curse you c++):&#xD;&#xA;&#xD;&#xA;When placing a block make sure that the top half of the map has three columns next to each other which are free. Do that by summing up the number of black squares in each column. Then iterate through the column sums three at a time. &#xD;&#xA;&#xD;&#xA;First check will sum column 0 1 2. &#xD;&#xA;&#xD;&#xA;If sum equals 0 tag chunk 0 as free.&#xD;&#xA;&#xD;&#xA;Next check will sum 1 2 3.&#xD;&#xA;&#xD;&#xA;If sum equals 0 tag chunk 1 as free&#xD;&#xA;&#xD;&#xA;After that 2 3 4 &#xD;&#xA;&#xD;&#xA;If sum equals 0 tag chunk 2 as free.&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;After placing a wall check that at least one of your previously tagged chunks are empty.&#xD;&#xA;Redo procedure until at least one is left empty.&#xD;&#xA;&#xD;&#xA;This method leaves you with an option for easy and hard mode where easy mode checks entire map for free spaces instead of just top half. Also, by setting an upper limit of wanted empty chunks you can increase the difficulty. Hard diff would mean that one or two chunks are allowed to be free at any time.&#xD;&#xA;&#xD;&#xA;Hope you understand what I mean.&#xD;&#xA;" />
  <row Id="11625" PostHistoryTypeId="5" PostId="5848" RevisionGUID="28f6f002-db97-434b-9790-a388da5441a0" CreationDate="2010-11-22T16:31:33.160" UserId="3505" Comment="added 338 characters in body" Text="Nevermind gave a good answer, but I wonder, do you even need a database for this? Storing all the data in a plain file and loading it into the program at launch seems like the smartest way of doing this.&#xD;&#xA;&#xD;&#xA;Edit:  &#xD;&#xA;Right, in a stateless request driven environment you better keep the data in a database. Write your data in a file and write a piece of code to turn it into a database of the type Nevermind suggested.&#xD;&#xA;&#xD;&#xA;Alternately if the number of objects is not too big declaring the lot literally in a code file may be the fastest method." />
  <row Id="11626" PostHistoryTypeId="2" PostId="5851" RevisionGUID="659e446a-df17-4318-b613-187e97441cb6" CreationDate="2010-11-22T18:08:40.103" UserId="2022" Text="Depending on how many traits you're likely to need you could use a simple bitmask for objects with the different bits corresponding to different traits:&#xD;&#xA;&#xD;&#xA;    000001 = holdable&#xD;&#xA;    000010 = weapon&#xD;&#xA;    000100 = breakable&#xD;&#xA;    001000 = throwable&#xD;&#xA;    010000 = solids container&#xD;&#xA;    100000 = liquids container&#xD;&#xA;&#xD;&#xA;Then you can do simple bit tests to see if an object can be used for a certain function.&#xD;&#xA;&#xD;&#xA;So &quot;glass bottle&quot; might have a value of 101111 meaning it's holdable, can be used as a weapon, it breaks easily, you can throw it and it can contain liquids.&#xD;&#xA;&#xD;&#xA;Any editor you create for items can then have a simple set of check boxes to enable/disable traits on an object." />
  <row Id="11627" PostHistoryTypeId="2" PostId="5852" RevisionGUID="094bd40e-f598-47a8-a78b-7104c12c4c39" CreationDate="2010-11-22T18:27:34.403" UserId="1859" Text="I'm designing a game with random generated dungeons. I'd like to view this as a **complete, undirected graph** in which nodes are rooms and edges are doors or corridors. Then I choose a &quot;side&quot; node as the dungeon entrance, I calculate the distance between this entrance and all other nodes, and decide that one of the farthest nodes is the &quot;goal&quot; of the dungeon (the location of the treasure, boss, princess, etc.).&#xD;&#xA;&#xD;&#xA;I saw 2 ways to generate the final dungeon topography:&#xD;&#xA;&#xD;&#xA; - Generate first a random graph, then try to fill the 2d world with rooms at random locations, respecting the edge connections. I figured this would be sometimes difficult because the room generation could be &quot;locked&quot; trying to fit rooms in impossible places.&#xD;&#xA; - Generate first rooms, placing them randomly where they fit, then map the result to nodes and edges. I decided to try this.&#xD;&#xA;&#xD;&#xA;My idea consists in :&#xD;&#xA;&#xD;&#xA; - First generate a big room that would contain the whole dungeon.&#xD;&#xA; - Put a wall inside the big room, at a random location, dividing the big room into 2 smaller rooms of different area.&#xD;&#xA; - Then I continue to divide each room into 2, until they are too small, or the total number of room reach a maximum (or any other condition). Each new room is a node.&#xD;&#xA; - Once finished, I check each room and find all adjacent other rooms, marking the 2 nodes as connected by an edge.&#xD;&#xA;&#xD;&#xA;That way I ensure that all rooms have a possible location in the 2D world, and are correctly mapped by a connected graph.&#xD;&#xA;&#xD;&#xA;My problem is that there are too many doors and corridors connecting the rooms.&#xD;&#xA;&#xD;&#xA;So I'd like an algorithm that **reduces the number of edges of a complete undirected graph**, but **keeping it complete** (all nodes stay reachable) in the end.&#xD;&#xA;" />
  <row Id="11628" PostHistoryTypeId="1" PostId="5852" RevisionGUID="094bd40e-f598-47a8-a78b-7104c12c4c39" CreationDate="2010-11-22T18:27:34.403" UserId="1859" Text="Reduce the number of edges of a graph, keeping it complete" />
  <row Id="11629" PostHistoryTypeId="3" PostId="5852" RevisionGUID="094bd40e-f598-47a8-a78b-7104c12c4c39" CreationDate="2010-11-22T18:27:34.403" UserId="1859" Text="&lt;algorithm&gt;&lt;procedural-generation&gt;&lt;random&gt;&lt;topography&gt;&lt;graphs&gt;" />
  <row Id="11631" PostHistoryTypeId="5" PostId="5845" RevisionGUID="6edf03a4-3ba6-4e30-91d3-20d6e3f41742" CreationDate="2010-11-22T18:55:47.333" UserId="3505" Comment="added 182 characters in body" Text="You will have to do some pathfinding. I'd suggest something like this: Choose grace distance, the shorter, the harder the game may be. When you add a new row fist find out in what places the player may be after travelling the grace distance. You can use an [A*](http://en.wikipedia.org/wiki/A%2a_search_algorithm) search algorithm to find the group of points efficiently, then you remove any point that doesn't have a path through the currently generated rows from the group. Now you generate a new row and check that all the points in the group have a path all the way through the new row, if some of them doesn't you will have to regenerate the row.&#xD;&#xA;&#xD;&#xA;Edit:  &#xD;&#xA;The pathfinding is very simple in this case, as the car can only occupy one of 8 different positions per row, so your pathfinding will never have to branch beyond 8 positions. You simply incrementally check what positions the car can reach in the next row, from the positions it may occupy in the previous row.&#xD;&#xA;&#xD;&#xA;Edit:  &#xD;&#xA;Strike the A* reference, I better just refer to [Dijkstra](http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm), almost the same but seems easier to understand." />
  <row Id="11632" PostHistoryTypeId="2" PostId="5854" RevisionGUID="04ed3bd9-a813-4b73-b438-47bb4bda27c1" CreationDate="2010-11-22T18:59:48.487" UserId="2798" Text="Use [Prim's Algorithm][1] to obtain the minimum spanning tree for your graph (add randomized weights, or add the higher weights near the entrance, or do an algorithm of your choice) and re-add some doors/edges at random. This way you'll have all the rooms connected and a few extra redundant paths.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Prim's_algorithm" />
  <row Id="11633" PostHistoryTypeId="2" PostId="5855" RevisionGUID="2eb6ee08-c4c2-4a45-86e6-218522b104b9" CreationDate="2010-11-22T19:36:08.453" UserId="2232" Text="This is your typical many-to-many relationship, nothing too esoteric for any capable relational database. You have many traits for any one objects, and any one trait may be used by one or more different object types. Model three relations (tables), with one being an association relation, and you're done. Proper indexing will assure you of speedy data reads.&#xD;&#xA;&#xD;&#xA;Layer an ORM in your code and you should have very few issues going back and forth between DB and middleware. Many ORMs are able to auto-generate the classes themselves too, and so become even more &quot;invisible&quot;. &#xD;&#xA;&#xD;&#xA;As for the NoSQL databases, there's no reason you can't do it with those. It's currently fashionable to cheerlead for that technology in trade rags and blogs, but they come with a slew of its own issues: relatively immature platforms, great for simple infrequently-changed reads (like a one-to-many twits in a profile) but poor for complex dynamic reads or updates, poor supporting toolchain, redundant data and the accompanying integrity issues, etc. However, they offer the appeal of better scalability because they eschew to varying degree transactional capabilities and its overhead, and easier models of distribution/replication. &#xD;&#xA;&#xD;&#xA;The usual hobgoblin of relational databases vs NoSQL databases is performance. Different RDMBSes have different degrees of overhead involved that make them less preferred for scaling to the levels of Facebook or Twitter. However, it is very unlikely you'd face those issues. Even then, simple SSD-based server systems can make the performance debate useless.&#xD;&#xA;&#xD;&#xA;Let's be clear: most NoSQL databases are fundamentally distributed hash tables, and will limit you the same way a hash table in your code would, ie. not all data fits well into that model. The Relational Model is much more powerful for modeling relations between data. (The confounding factor is that most RDBMSes are legacy systems that are poorly tuned for the demands of the popular 0.0001% of the web, namely Facebook et al.)" />
  <row Id="11634" PostHistoryTypeId="2" PostId="5856" RevisionGUID="c4f0d484-292c-434c-a61c-872e14611b2a" CreationDate="2010-11-22T19:59:20.300" UserId="2232" Text="The penetration of all the above technologies are irrelevant. Most systems, esp. the systems of people who play games from casual and up, are decently up to date wuch that they can handle most. The only issue may be if you want to go &quot;multi-platform&quot; or just Windows.&#xD;&#xA;&#xD;&#xA;What you want to look at and worry about is not penetration, but game developer friendliness, which depends on both on any current skills in the project, and the availability of demos/tuts/tools that support the development process on these web platforms." />
  <row Id="11636" PostHistoryTypeId="2" PostId="5857" RevisionGUID="97050aee-6181-4e8e-a8e4-4fc949e6d7ce" CreationDate="2010-11-22T20:31:16.277" UserId="284" Text="Here's what I'm looking at doing:&#xD;&#xA;&#xD;&#xA;Since every &quot;trait&quot; essentially requires changes in the code anyway, so I've decided to just keep the traits (and any default data they require) in the code itself (at least for now).&#xD;&#xA;&#xD;&#xA;E.g. &#xD;&#xA;`$traits = array('holdable'=&gt;1, 'weapon'=&gt;1, 'sword'=&gt;array('min_dam'=&gt;1, 'max_dam'=&gt;500));`&#xD;&#xA;&#xD;&#xA;Then items get a &quot;trait_data&quot; field in the database that will use the `json_encode` format.&#xD;&#xA;&#xD;&#xA;    item_id | item_name | item_identity | traits&#xD;&#xA;    1 | Katana | katana | &quot;{&quot;holdable&quot;:1,&quot;weapon&quot;:1,&quot;sword&quot;:{&quot;min_dam&quot;:1,&quot;max_dam&quot;:1234,&quot;0&quot;:{&quot;damage_type&quot;:&quot;fire&quot;,&quot;min_dam&quot;:5,&quot;max_dam&quot;:50,&quot;type&quot;:&quot;thrown&quot;,&quot;bob&quot;:{},&quot;ids&quot;:[1,2,3,4,5,6,7]}}}&quot;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11637" PostHistoryTypeId="5" PostId="5272" RevisionGUID="0be2b4a3-9d30-4835-9bd4-29d8215ed0dd" CreationDate="2010-11-22T20:34:05.477" UserId="284" Comment="added 153 characters in body; added 88 characters in body" Text="So I'm working on expanding the uses of items over at [www.ninjawars.net][1], and I'm not exactly sure how to represent them flexibly in the relational database that we use.&#xD;&#xA;&#xD;&#xA;I may be barking up the wrong tree, so feel free to make suggestions in other directions, but currently I'm thinking that each item should have relational &quot;tags&quot;.&#xD;&#xA;&#xD;&#xA;For example, a Katana is currently a row in the &quot;items&quot; database.  To make it into a weapon, and a holdable thing, I was thinking that I would have a database of &quot;traits&quot;, and a item_traits table that simply linked between them.&#xD;&#xA;&#xD;&#xA;    // Objects and their basic data&#xD;&#xA;&#xD;&#xA;    item_id | item&#xD;&#xA;    1 | Naginata&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // Things that objects can do&#xD;&#xA;&#xD;&#xA;    trait_id | trait&#xD;&#xA;    1 | weapon&#xD;&#xA;    2 | holdable&#xD;&#xA;    &#xD;&#xA;    // How those objects do those things, e.g. powerfully, weakly, while on fire&#xD;&#xA;&#xD;&#xA;    _item_id | _trait_id | item_trait_data&#xD;&#xA;    1 | 1 | damage: 5, damage_type: sharp, whatever, etc&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;I'm not really sure how to model the extra data that results (e.g. the damage that a sword will do, the damage_type, etc).&#xD;&#xA;&#xD;&#xA;I'm also not especially happy that the whole of an item would be stored in more than one place, e.g. in order to create a copy of an item with a different name, like a &quot;short sword&quot;, I would have to copy from multiple tables to create the duplicate item.&#xD;&#xA;&#xD;&#xA;Is there a better way to lay this stuff out that I'm missing?&#xD;&#xA;&#xD;&#xA;**Edit:** I should just note that I've already got a postgresql database in use on the site, which is why I want to use it for my data storage.&#xD;&#xA;&#xD;&#xA;**Edit:** I've added an answer for the implementation that I'm currently looking at.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ninjawars.net&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11638" PostHistoryTypeId="2" PostId="5858" RevisionGUID="9147d74d-dc8a-4a78-bcec-5855d5352824" CreationDate="2010-11-22T21:02:16.067" UserId="395" Text="I wouldn't know where to find them anymore, but the Miller brothers made a lot of &quot;making of&quot; type stuff for Myst at least, and it is basically as you describe except with a heaping helping of manual effort and tweaking to make it look good." />
  <row Id="11639" PostHistoryTypeId="2" PostId="5859" RevisionGUID="2944d172-7330-4cc9-99d2-4428550ff63c" CreationDate="2010-11-22T21:27:13.223" UserId="3403" Text="I'm thinking about starting a RPG game. I've had some experience with playing RPG games, but before I begin, I want to find out what some good &quot;combat models&quot; are. When I say combat model, I mean how a tried-and-true system of how a player's strength and weapons affects his attack, defense, etc. There are a few points I'd like to hear some more about:&#xD;&#xA;&#xD;&#xA; - How would I create a good attack for a player including weapons and traits?&#xD;&#xA; - What about defense?&#xD;&#xA;&#xD;&#xA;Thanks, Elliot Bonneville" />
  <row Id="11640" PostHistoryTypeId="1" PostId="5859" RevisionGUID="2944d172-7330-4cc9-99d2-4428550ff63c" CreationDate="2010-11-22T21:27:13.223" UserId="3403" Text="What are some tried-and-true combat models?" />
  <row Id="11641" PostHistoryTypeId="3" PostId="5859" RevisionGUID="2944d172-7330-4cc9-99d2-4428550ff63c" CreationDate="2010-11-22T21:27:13.223" UserId="3403" Text="&lt;rpg&gt;" />
  <row Id="11642" PostHistoryTypeId="2" PostId="5860" RevisionGUID="ae8f7bc7-fe89-4c7e-b483-ee5242968884" CreationDate="2010-11-22T21:43:14.217" UserId="3524" Text="Shiva 3D might be what you're looking for.&#xD;&#xA;&#xD;&#xA;[Shiva 3D][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stonetrip.com/" />
  <row Id="11643" PostHistoryTypeId="5" PostId="5859" RevisionGUID="f03fd0cf-7794-46a6-88d7-5d1ed80f0e81" CreationDate="2010-11-22T21:53:24.613" UserId="3403" Comment="added 109 characters in body" Text="I'm thinking about starting a text-based RPG game using Javascript (Similar to a text adventure, but with a much more refined item/fighting system). I've had some experience with playing RPG games, but before I begin, I want to find out what some good &quot;combat models&quot; are. When I say combat model, I mean how a tried-and-true system of how a player's strength and weapons affects his attack, defense, etc. There are a few points I'd like to hear some more about:&#xD;&#xA;&#xD;&#xA; - How would I create a good attack for a player including weapons and traits?&#xD;&#xA; - What about defense?&#xD;&#xA;&#xD;&#xA;Thanks, Elliot Bonneville" />
  <row Id="11644" PostHistoryTypeId="2" PostId="5861" RevisionGUID="b37dbcb4-36dc-4637-8884-fc81f9fd930b" CreationDate="2010-11-22T21:54:37.483" UserId="2232" Text="When you say you've played RPGs, do you mean computer-based ones? &#xD;&#xA;&#xD;&#xA;I ask because there are plenty of pen-and-paper systems that are complete and readable in ways existing games are not. Look into d20-based systems (a.k.a. a rule system from Wizard Of The Coast), GURPS, RoleMaster, etc." />
  <row Id="11645" PostHistoryTypeId="2" PostId="5862" RevisionGUID="9837bca5-ba6f-4708-b08d-4ba5765dbcab" CreationDate="2010-11-22T21:57:01.833" UserDisplayName="JinrohDev" Text="[**Programming Role Playing Games With DirectX**][1]&#xD;&#xA;  [1]: http://www.amazon.com/Programming-Playing-DirectX-Premier-Development/dp/1931841098/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1290462731&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;This is a great book that goes through everything about the basics of DirectX and Role playing games. It includes many examples that can be used for many different games. Some topics include:&#xD;&#xA;&#xD;&#xA; 1. Particles&#xD;&#xA; 2. Octree/Quadtree&#xD;&#xA; 3. Netplay (Client/Server and P2P)&#xD;&#xA; 4. Marketing your game&#xD;&#xA; 5. 1st and 3rd Person Cameras&#xD;&#xA; 6. FFVII Style Pre-rendered Background &#xD;&#xA; 7. Parsing and Displaying .X Models&#xD;&#xA; 8. Scripting&#xD;&#xA; 9. And a lot more." />
  <row Id="11646" PostHistoryTypeId="5" PostId="5857" RevisionGUID="8a17e05a-515e-41eb-9950-31b13d5caea7" CreationDate="2010-11-22T21:58:07.873" UserId="284" Comment="deleted 1 characters in body" Text="Here's what I'm now considering:&#xD;&#xA;&#xD;&#xA;Since every &quot;trait&quot; essentially requires changes in the code anyway, so I've decided to just keep the traits (and any default data they require) in the code itself (at least for now).&#xD;&#xA;&#xD;&#xA;E.g. &#xD;&#xA;`$traits = array('holdable'=&gt;1, 'weapon'=&gt;1, 'sword'=&gt;array('min_dam'=&gt;1, 'max_dam'=&gt;500));`&#xD;&#xA;&#xD;&#xA;Then items get a &quot;trait_data&quot; field in the database that will use the `json_encode` format.&#xD;&#xA;&#xD;&#xA;    item_id | item_name | item_identity | traits&#xD;&#xA;    1 | Katana | katana | &quot;{&quot;holdable&quot;:1,&quot;weapon&quot;:1,&quot;sword&quot;:{&quot;min_dam&quot;:1,&quot;max_dam&quot;:1234,&quot;0&quot;:{&quot;damage_type&quot;:&quot;fire&quot;,&quot;min_dam&quot;:5,&quot;max_dam&quot;:50,&quot;type&quot;:&quot;thrown&quot;,&quot;bob&quot;:{},&quot;ids&quot;:[1,2,3,4,5,6,7]}}}&quot;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11647" PostHistoryTypeId="5" PostId="5202" RevisionGUID="377a1def-be95-43e6-95c0-2b8e2e00f91a" CreationDate="2010-11-22T22:14:44.410" UserId="744" Comment="deleted 4 characters in body" Text="&lt;b&gt;&lt;a href=&quot;http://www.amazon.com/Creating-Interactive-Fiction-Inform-7/dp/1435455061&quot;&gt;Creating Interactive Fiction with Inform 7&lt;/a&gt;&lt;/b&gt;&#xD;&#xA;&#xD;&#xA;Although I'm not nearly a good enough writer (yet?) to do much with &lt;a href=&quot;http://inform7.com/&quot;&gt;Inform 7&lt;/a&gt;, I think the platform is a model for accessibility in programming, and a great environment for game designers with weak programming skills as well as strong programmer/writers.&#xD;&#xA;&#xD;&#xA;Aaron's book is a worked example of a full Inform project, and goes into details on writing styles for interactive fiction as well as the technical details of the Inform language, interpreter, and editor." />
  <row Id="11648" PostHistoryTypeId="5" PostId="5857" RevisionGUID="d8785711-1dbe-46b3-a711-587f118fe5b8" CreationDate="2010-11-22T22:40:44.770" UserId="284" Comment="added 381 characters in body" Text="Here's what I'm now considering:&#xD;&#xA;&#xD;&#xA;Since every &quot;trait&quot; essentially requires changes in the code anyway, so I've decided to just keep the traits (and any default data they require) in the code itself (at least for now).&#xD;&#xA;&#xD;&#xA;E.g. &#xD;&#xA;`$traits = array('holdable'=&gt;1, 'weapon'=&gt;1, 'sword'=&gt;array('min_dam'=&gt;1, 'max_dam'=&gt;500));`&#xD;&#xA;&#xD;&#xA;Then items get a &quot;trait_data&quot; field in the database that will use the `json_encode()` function to get stored in the JSON format.&#xD;&#xA;&#xD;&#xA;    item_id | item_name | item_identity | traits&#xD;&#xA;    1 | Katana | katana | &quot;{&quot;holdable&quot;:1,&quot;weapon&quot;:1,&quot;sword&quot;:{&quot;min_dam&quot;:1,&quot;max_dam&quot;:1234,&quot;0&quot;:{&quot;damage_type&quot;:&quot;fire&quot;,&quot;min_dam&quot;:5,&quot;max_dam&quot;:50,&quot;type&quot;:&quot;thrown&quot;,&quot;bob&quot;:{},&quot;ids&quot;:[1,2,3,4,5,6,7]}}}&quot;&#xD;&#xA;&#xD;&#xA;Plan is that items will inherit all the default stats from their parent traits, and will only have over-ride traits that specify differences from what the traits set as defaults.&#xD;&#xA;&#xD;&#xA;The downside of the traits field is that while I could edit the json part by hand... ...it won't be really easy or safe to do so with data that's in the database." />
  <row Id="11649" PostHistoryTypeId="2" PostId="5863" RevisionGUID="532dc12f-ae67-4e41-8d47-e985851a7657" CreationDate="2010-11-22T22:54:10.247" UserId="469" Text="Spring is a 3D RTS engine that supports Lua, I never used, so I don't know how much it supports.&#xD;&#xA;&#xD;&#xA;There are several other engines out there too.&#xD;&#xA;&#xD;&#xA;The Lua engine I use, Novashell is 2D too, so it don't fit what you want." />
  <row Id="11650" PostHistoryTypeId="2" PostId="5864" RevisionGUID="a0ba29d2-1dc6-4c2d-a02f-b958b20ac7ed" CreationDate="2010-11-22T23:21:55.450" UserId="2781" Text="Some of the dungeon generators on [this list from Inkwell Ideas][1] are open source or provide documentation on their algorithms. Google will also give you plenty by a search for '[programminglanguagename] dungeon generator'. Unfortunately my favorite is not findable by either of those methods, despite being the most well documented I ever encountered, and I cannot remember its name as I lost it to a hard drive crash recently. I will update this answer after I perform recovery on that drive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://inkwellideas.com/?page_id=125" />
  <row Id="11651" PostHistoryTypeId="2" PostId="5865" RevisionGUID="35b64fba-d825-4ed0-baf0-04f9309d0d2f" CreationDate="2010-11-23T00:43:48.897" UserDisplayName="GameBoyyy" Text="I'm developing a simple text battle game and having some issues calculating how much XP should be earned after a battle, theres a few factors that i want to consider:&#xD;&#xA;&#xD;&#xA;1) Players should of course earn good XP if they beat someone of the same level&#xD;&#xA;&#xD;&#xA;2) Players should earn great XP if they beat someone of a higher level&#xD;&#xA;&#xD;&#xA;3) Players should earn poor XP if they defeat someone of a lower level&#xD;&#xA;&#xD;&#xA;4) The above should scale nicely, i.e. if player A is level 10 and battles Player B who's level 9 or 11 the difference shouldn't be huge (they would of course gain more XP for defeating the level 11 character but we wouldn't expect this to be huge), but if he was to battle a level 5 or 15 this difference should be huge.&#xD;&#xA;&#xD;&#xA;Just having trouble calculating something that works well in all scenarios, currently my XP table looks like the below:&#xD;&#xA;&#xD;&#xA;    Current Level	XP Needed 	Increase from Last Level&#xD;&#xA;    1	30	0&#xD;&#xA;    2	65	35&#xD;&#xA;    3	106	41&#xD;&#xA;    4	154	48&#xD;&#xA;    5	210	56&#xD;&#xA;    ...&#xD;&#xA;    10	672	123&#xD;&#xA;&#xD;&#xA;In PHP my code looks like the below to calculate the XP Needed:&#xD;&#xA;&#xD;&#xA;    $offset = 30;&#xD;&#xA;    $multiplier = 1.17;&#xD;&#xA;    $base = $prevXp * $multiplier;&#xD;&#xA;    &#xD;&#xA;    $xp = $base + $offset;&#xD;&#xA;&#xD;&#xA;I've tried a few different things but i haven't been impressed with any of them, I'd like to work with calculating the difference in XP and then using some kind of multiplier but i haven't been impressed with the results.&#xD;&#xA;&#xD;&#xA;Any help / input would be appreciated." />
  <row Id="11652" PostHistoryTypeId="1" PostId="5865" RevisionGUID="35b64fba-d825-4ed0-baf0-04f9309d0d2f" CreationDate="2010-11-23T00:43:48.897" UserDisplayName="GameBoyyy" Text="Calculating Experience Points earned after a battle" />
  <row Id="11653" PostHistoryTypeId="3" PostId="5865" RevisionGUID="35b64fba-d825-4ed0-baf0-04f9309d0d2f" CreationDate="2010-11-23T00:43:48.897" UserDisplayName="GameBoyyy" Text="&lt;game-design&gt;&lt;math&gt;&lt;php&gt;" />
  <row Id="11654" PostHistoryTypeId="2" PostId="5866" RevisionGUID="c5e2c376-3a17-433e-be16-3032d451f339" CreationDate="2010-11-23T01:01:51.383" UserId="619" Text="Just IMHO, the most important thing to get right is the scaling amount of XP required to level up. A friend of mine used a fibonacci variation for his browser Rogue-like, for instance 100XP,100XP,200XP,300XP,500XP,800XP etc etc.&#xD;&#xA;&#xD;&#xA;I have also heard of a mechanic in some games where the level is subtracted from the XP earned by each battle. For instance, if a particular battle earns 50XP, and they are at level 20, then they only receive 30XP. If they were at level 50 or above, they would earn nothing." />
  <row Id="11655" PostHistoryTypeId="2" PostId="5867" RevisionGUID="7c24a204-460d-4128-8672-28302abd65e8" CreationDate="2010-11-23T01:13:42.937" UserId="323" Text="Two suggestions:&#xD;&#xA;&#xD;&#xA;Exponents! Calculate some &quot;base xp reward&quot; for each level. Then the formula for a kill is base_xp_reward * pow(1.1, target_level - player_level). You might want to clamp the gain to a maximum, to somewhat nullify exploits, and you might want to give zero XP below a certain difference, to prevent farming of lowbies.&#xD;&#xA;&#xD;&#xA;(Base XP reward can be a simple exponential progression also, if you like - constant_factor * pow(1.25, level), perhaps. Then you can define the &quot;exp to level&quot; in terms of a multiple of the base XP reward. Might be easier to balance this way.)&#xD;&#xA;&#xD;&#xA;Alternatively, let's make this really simple. Do the same base-XP-reward thing. Then figure out a table by hand for the bonuses you want from various level differentials. Make it ratio-based, so that killing someone one level above you always gives, say, 10% bonus XP over the base reward. And now you don't need to worry about a formula at all - you can just make the numbers do what you want.&#xD;&#xA;&#xD;&#xA;Formulas are overrated, sometimes you just need to jam some numbers in and play it by ear." />
  <row Id="11656" PostHistoryTypeId="2" PostId="5868" RevisionGUID="5dfea183-2caf-4493-b2ef-5bd36522b528" CreationDate="2010-11-23T01:21:57.257" UserId="323" Text="First off, dump the object-oriented inheritance approach and go with a [component-based system][1].&#xD;&#xA;&#xD;&#xA;Once you've done that, the SQL layout suddenly gets far easier. You have one table for each component type with a shared ID number. If you want item #17, you go look up &quot;item ID 17&quot; in every table. Any table that has a key gets its component added on.&#xD;&#xA;&#xD;&#xA;Your Item table contains all the required data for items in general (name, sell price, weight, size, anything else that's shared among all items.) Your Weapon table contains all the appropriate data for weapons, your Potion table contains all the appropriate data for potions, your Armor table contains all the appropriate data for armor. Want a breastplate, that's an entry in Item and an entry in Armor. Want a swordhelm that you can drink, you just put an entry in each table, and bam, you're done.&#xD;&#xA;&#xD;&#xA;Keep in mind that this same pattern isn't particularly item-specific - you can use this for creatures, zones, anything else you may want. It's surprisingly versatile.&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design" />
  <row Id="11657" PostHistoryTypeId="2" PostId="5869" RevisionGUID="6a55ceb5-1e2a-4f52-b433-77c52409e50b" CreationDate="2010-11-23T02:37:56.880" UserId="1553" Text="Does anyone know of a good free voxel editor and/or voxel-to-mesh converter?" />
  <row Id="11658" PostHistoryTypeId="1" PostId="5869" RevisionGUID="6a55ceb5-1e2a-4f52-b433-77c52409e50b" CreationDate="2010-11-23T02:37:56.880" UserId="1553" Text="Free voxel editor?" />
  <row Id="11659" PostHistoryTypeId="3" PostId="5869" RevisionGUID="6a55ceb5-1e2a-4f52-b433-77c52409e50b" CreationDate="2010-11-23T02:37:56.880" UserId="1553" Text="&lt;tools&gt;&lt;models&gt;&lt;voxels&gt;&lt;editors&gt;" />
  <row Id="11660" PostHistoryTypeId="2" PostId="5870" RevisionGUID="35185f82-b34b-4dc1-97ca-3e8f83d87aae" CreationDate="2010-11-23T03:58:46.883" UserId="3531" Text="I know that game architecture can vary greatly, especially with the type of game being built, but I know that there are a lot of similarities too. &#xD;&#xA;&#xD;&#xA;I feel like I am on the cusp of really having a good grasp on game architecture, but I feel like something is missing. Maybe it's something obvious. So, I want to know, is there a resource out there that is the be-all-end-all guide to 2D game programming concepts, patters and architecture?&#xD;&#xA;&#xD;&#xA;**Edit:**  I'm mostly interested in building platformers and shmups and the like. So, if the resources are related to those types of games, even better." />
  <row Id="11661" PostHistoryTypeId="1" PostId="5870" RevisionGUID="35185f82-b34b-4dc1-97ca-3e8f83d87aae" CreationDate="2010-11-23T03:58:46.883" UserId="3531" Text="Where can I learn 2D game architecture" />
  <row Id="11662" PostHistoryTypeId="3" PostId="5870" RevisionGUID="35185f82-b34b-4dc1-97ca-3e8f83d87aae" CreationDate="2010-11-23T03:58:46.883" UserId="3531" Text="&lt;2d&gt;&lt;architecture&gt;&lt;design-patterns&gt;" />
  <row Id="11663" PostHistoryTypeId="2" PostId="5871" RevisionGUID="0864b6b7-6bd1-45b9-ba86-605513308ebf" CreationDate="2010-11-23T05:50:39.623" UserId="2815" Text="I'd say something like &quot;gain xp by the damage delt/recieved&quot;.  So if a level 10 with 100hp fights a level 15 with 200 hp.  It seems unfair but if the level 10 would be able to kill the level 15 he would get twice the xp of what he would get if fighting a level 10 with only 100hp.&#xD;&#xA;&#xD;&#xA;Also this way you don't have to worry about stuff like if two people would fight the same enemy with different equipment.  For example, if a level 8 and a level 10 fight a level 13.  If the level 8 has better equipment/armor then he would get more xp then the level 10 simply becasue he delt more damage to the level 13.&#xD;&#xA;&#xD;&#xA;But the most important thing: Set rules, playtest, set rules, playtest, set rules, plasytest, etc, etc...&#xD;&#xA;&#xD;&#xA;Even the best MMOs from the best developers adjust their xp distribution system as long as the game lives." />
  <row Id="11664" PostHistoryTypeId="2" PostId="5872" RevisionGUID="243fddf6-d80d-4d0f-b8a9-6b1299852490" CreationDate="2010-11-23T06:49:43.450" UserId="919" Text="Try playing SMT Nocturne. It have a fairly balanced combat(if you know your way around the system that is) save for the secret and final boss fights.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11665" PostHistoryTypeId="5" PostId="5852" RevisionGUID="5f750112-a7b1-44e0-98da-b06afbb6f6d9" CreationDate="2010-11-23T08:54:42.110" UserId="1859" Comment="Changed &quot;complete&quot; to &quot;connected&quot;." Text="I'm designing a game with random generated dungeons. I'd like to view this as a **connected, undirected graph** in which nodes are rooms and edges are doors or corridors. Then I choose a &quot;side&quot; node as the dungeon entrance, I calculate the distance between this entrance and all other nodes, and decide that one of the farthest nodes is the &quot;goal&quot; of the dungeon (the location of the treasure, boss, princess, etc.).&#xD;&#xA;&#xD;&#xA;I saw 2 ways to generate the final dungeon topography:&#xD;&#xA;&#xD;&#xA; - Generate first a random graph, then try to fill the 2d world with rooms at random locations, respecting the edge connections. I figured this would be sometimes difficult because the room generation could be &quot;locked&quot; trying to fit rooms in impossible places.&#xD;&#xA; - Generate first rooms, placing them randomly where they fit, then map the result to nodes and edges. I decided to try this.&#xD;&#xA;&#xD;&#xA;My idea consists in :&#xD;&#xA;&#xD;&#xA; - First generate a big room that would contain the whole dungeon.&#xD;&#xA; - Put a wall inside the big room, at a random location, dividing the big room into 2 smaller rooms of different area.&#xD;&#xA; - Then I continue to divide each room into 2, until they are too small, or the total number of room reach a maximum (or any other condition). Each new room is a node.&#xD;&#xA; - Once finished, I check each room and find all adjacent other rooms, marking the 2 nodes as connected by an edge.&#xD;&#xA;&#xD;&#xA;That way I ensure that all rooms have a possible location in the 2D world, and are correctly mapped by a connected graph.&#xD;&#xA;&#xD;&#xA;My problem is that there are too many doors and corridors connecting the rooms.&#xD;&#xA;&#xD;&#xA;So I'd like an algorithm that **reduces the number of edges of a connected undirected graph**, but **keeping it connected** (all nodes stay reachable) in the end.&#xD;&#xA;" />
  <row Id="11666" PostHistoryTypeId="4" PostId="5852" RevisionGUID="5f750112-a7b1-44e0-98da-b06afbb6f6d9" CreationDate="2010-11-23T08:54:42.110" UserId="1859" Comment="Changed &quot;complete&quot; to &quot;connected&quot;." Text="Reduce the number of edges of a graph, keeping it connected" />
  <row Id="11667" PostHistoryTypeId="2" PostId="5873" RevisionGUID="5fcd7654-24c1-4567-8160-08ca3fa24e0d" CreationDate="2010-11-23T10:57:50.240" UserId="916" Text="Check that wiki&#xD;&#xA;http://gpwiki.org/index.php/SDL:Tutorials:Complete_2D_Engine_Overview" />
  <row Id="11672" PostHistoryTypeId="2" PostId="5875" RevisionGUID="ad914a9f-f79c-4b0d-a474-c8b2d6174acd" CreationDate="2010-11-23T14:41:20.673" UserId="3449" Text="The [OnLive][1] service works by &quot;cloud rendering&quot;, which is very different from the traditional model of &quot;on-premise rendering&quot; that we are all familiar with.  How does this work at a technical level, and is there anything special game developers or artists need to do to optimize their game for the platform?  As a developer, I'm a bit skeptical that everything is as magically working as they seem to suggest.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.onlive.com/" />
  <row Id="11673" PostHistoryTypeId="1" PostId="5875" RevisionGUID="ad914a9f-f79c-4b0d-a474-c8b2d6174acd" CreationDate="2010-11-23T14:41:20.673" UserId="3449" Text="How does OnLive work, and is there anything special Game Developers need to do?" />
  <row Id="11674" PostHistoryTypeId="3" PostId="5875" RevisionGUID="ad914a9f-f79c-4b0d-a474-c8b2d6174acd" CreationDate="2010-11-23T14:41:20.673" UserId="3449" Text="&lt;network&gt;&lt;rendering&gt;&lt;client-server&gt;" />
  <row Id="11675" PostHistoryTypeId="16" PostId="458" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11676" PostHistoryTypeId="16" PostId="459" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11677" PostHistoryTypeId="16" PostId="463" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11678" PostHistoryTypeId="16" PostId="466" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11679" PostHistoryTypeId="16" PostId="468" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11680" PostHistoryTypeId="16" PostId="568" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11681" PostHistoryTypeId="16" PostId="669" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11682" PostHistoryTypeId="16" PostId="670" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11683" PostHistoryTypeId="16" PostId="1291" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11684" PostHistoryTypeId="16" PostId="4240" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11685" PostHistoryTypeId="16" PostId="455" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-23T15:17:19.270" UserId="51" />
  <row Id="11686" PostHistoryTypeId="4" PostId="455" RevisionGUID="cac65a60-3954-415c-ae0c-ecf6c3d13845" CreationDate="2010-11-23T15:17:39.940" UserId="51" Comment="edited title" Text="Good resources for learning about game architecture?" />
  <row Id="11687" PostHistoryTypeId="2" PostId="5876" RevisionGUID="cf561489-837a-42c4-b4f2-12450b17a4da" CreationDate="2010-11-23T15:30:58.430" UserId="2063" Text="The released a SDK for independant developers.&#xD;&#xA;&#xD;&#xA;&gt; The OnLive developer community is&#xD;&#xA;&gt; growing rapidly, with many, many&#xD;&#xA;&gt; titles in the works. If you’re an&#xD;&#xA;&gt; Indie developer interested in&#xD;&#xA;&gt; accessing our vibrant, growing&#xD;&#xA;&gt; community, check out our partner page&#xD;&#xA;&gt; or email us at partners@onlive.com to&#xD;&#xA;&gt; request the OnLive SDK.&#xD;&#xA;&#xD;&#xA;Source http://blog.onlive.com/2010/09/15/celebrating-independent-game-developers/&#xD;&#xA;&#xD;&#xA;You &quot;just&quot; have to write a wrapper for your game so OnLive can communicate with your program." />
  <row Id="11688" PostHistoryTypeId="6" PostId="5875" RevisionGUID="339e3a01-3704-4e7f-8f50-c306b9943f3e" CreationDate="2010-11-23T15:40:11.853" UserId="14" Comment="edited tags" Text="&lt;network&gt;&lt;rendering&gt;&lt;client-server&gt;" />
  <row Id="11689" PostHistoryTypeId="2" PostId="5877" RevisionGUID="1696eb7c-eb79-4bf4-8985-e660ee35b521" CreationDate="2010-11-23T15:41:11.117" UserId="744" Text="Just design a game that doesn't suffer when subjected to varying 50-200ms of lag between input and response." />
  <row Id="11690" PostHistoryTypeId="6" PostId="5869" RevisionGUID="8768c986-90b5-4889-9f7e-41c962ef9ac9" CreationDate="2010-11-23T15:44:16.263" UserId="14" Comment="edited tags" Text="&lt;tools&gt;&lt;models&gt;&lt;editors&gt;&lt;voxels&gt;" />
  <row Id="11691" PostHistoryTypeId="2" PostId="5878" RevisionGUID="ed06ab87-520e-4bcd-b287-0946ea778253" CreationDate="2010-11-23T16:11:24.763" UserId="3446" Text="You could try this one http://dmytry.pandromeda.com/voxelworld/, though I think it's not being maintained anymore (still, it's open-source, should you want to mess with the code)." />
  <row Id="11692" PostHistoryTypeId="2" PostId="5879" RevisionGUID="3d7fb97a-e97e-4086-9d50-3c288f037d5d" CreationDate="2010-11-23T16:43:07.403" UserId="3446" Text="You could also try Kruskal's Algorithm" />
  <row Id="11693" PostHistoryTypeId="2" PostId="5880" RevisionGUID="6c95ef19-b94a-4e56-a203-a74cc9c9896f" CreationDate="2010-11-23T17:00:10.957" UserId="1742" Text="Rather than try to generate a field to play in that you need to check to keep valid for play, instead generate a path the vehicle can follow, then randomly add osbtructions to the parts of the map not filled in by the vehicle path generated.&#xD;&#xA;&#xD;&#xA;If you use a low frequency brownian motion for the car path, you can then simply just have a ~1% probability function for selecting whether every cell is occupied.&#xD;&#xA;&#xD;&#xA;This will always lead to a game that can be played, but it can also be tuned to have sparse or dense obstructions patterns." />
  <row Id="11694" PostHistoryTypeId="5" PostId="5880" RevisionGUID="dfc3e8be-43bb-4397-8f16-18496aac714f" CreationDate="2010-11-23T17:48:29.033" UserId="1742" Comment="better, and spelling fixes" Text="Rather than try to generate a field to play in that you need to check to keep valid for play, instead generate a path the vehicle can follow, then randomly add obstructions to the parts of the map not filled in by the vehicle path generated.&#xD;&#xA;&#xD;&#xA;1D Brownian motion: ([http://classes.yale.edu/fractals/randfrac/brownian/Brownian3.html][1])&#xD;&#xA;&#xD;&#xA;If you use low frequency brownian motion for the car path, filling in cells as not-obstructable, you can then simply have a low probability function for selecting whether each non filled cell is occupied/obstructed.&#xD;&#xA;&#xD;&#xA;This will always lead to a game that can be played, but it can also be tuned to have sparse or dense obstructions patterns. You could even have the density function be brownian too ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://classes.yale.edu/fractals/randfrac/brownian/Brownian3.html" />
  <row Id="11695" PostHistoryTypeId="2" PostId="5881" RevisionGUID="c8ad56c1-374e-45f5-9443-bc9df9373ee9" CreationDate="2010-11-23T19:25:41.763" UserId="3051" Text="There's also [Thermite3D][1].  I've looked at it a little but haven't actually used it.  The forum community is very friendly and helpful, however.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.thermite3d.org/joomla/" />
  <row Id="11696" PostHistoryTypeId="5" PostId="5859" RevisionGUID="b7be591b-f8f8-4cb4-858f-df4c5c9d33bf" CreationDate="2010-11-23T20:40:03.623" UserId="3403" Comment="deleted 4 characters in body" Text="I'm thinking about starting a text-based RPG game using Javascript (Similar to a text adventure, but with a much more refined item/fighting system). I've had some experience with playing RPG games, but before I begin, I want to find out what some good &quot;combat models&quot; are. When I say combat model, I mean a tried-and-true system of how a player's strength and weapons affects his attack, defense, etc. There are a few points I'd like to hear some more about:&#xD;&#xA;&#xD;&#xA; - How would I create a good attack for a player including weapons and traits?&#xD;&#xA; - What about defense?&#xD;&#xA;&#xD;&#xA;Thanks, Elliot Bonneville" />
  <row Id="11697" PostHistoryTypeId="2" PostId="5882" RevisionGUID="557f2016-d5bc-4f19-b4c2-9fad3c79e264" CreationDate="2010-11-23T22:57:22.460" UserId="3547" Text="You could also use [Karvonite][1] if you want to get this up and going really fast.&#xD;&#xA;&#xD;&#xA;It's an agile persistence framework. I'm not sure if the new version will work on windows phone 7 or xbox.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite" />
  <row Id="11699" PostHistoryTypeId="2" PostId="5884" RevisionGUID="52f0b7e2-4e2b-4e72-bf88-842d38e23b81" CreationDate="2010-11-24T00:41:42.790" UserId="3549" Text="I strongly urge you to check out Unity 3D. Buy a MacBook and an iPhone Unity license and you'll be happy. " />
  <row Id="11700" PostHistoryTypeId="5" PostId="5882" RevisionGUID="9bde2aad-58ea-4e5d-a469-f27f18bdb5bf" CreationDate="2010-11-24T01:59:33.277" UserId="3547" Comment="added 572 characters in body; added 237 characters in body" Text="You could also use [Karvonite][1] if you want to get this up and going really fast.&#xD;&#xA;&#xD;&#xA;It's an agile persistence framework. I'm not sure if the new version will work on windows phone 7 or xbox.&#xD;&#xA;&#xD;&#xA;You would create a persistence definition with their persistence editor (it's pretty easy, you just import the assembly and check the fields/properties on the classes/structures you want persisted) You initiate an ObjectSpace in code and add/remove/get objects from it. (these objects are persisted) &#xD;&#xA;&#xD;&#xA;If you just create an abstraction so that the tile engine or whatever it is you call it doesn't care exactly how it gets the map, just that it gets the one it asked for. Then you can go back and use the XmlSerializer or the Intermediate one. (whichever you prefer) &#xD;&#xA;&#xD;&#xA;I think there is an example of how to build content at runtime on the XNA creator's club website. It might not be built with the latest framework though. That way you could keep your old code if you already use the content pipeline.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite" />
  <row Id="11701" PostHistoryTypeId="5" PostId="5882" RevisionGUID="ca7990f3-a58b-49c4-80cd-e9173c5dfca2" CreationDate="2010-11-24T02:05:55.977" UserId="3547" Comment="added 118 characters in body" Text="You could also use [Karvonite][1] if you want to get this up and going really fast.&#xD;&#xA;&#xD;&#xA;It's an agile persistence framework. I'm not sure if the new version will work on windows phone 7 or xbox.&#xD;&#xA;&#xD;&#xA;You would create a persistence definition with their persistence editor (it's pretty easy, you just import the assembly and check the fields/properties on the classes/structures you want persisted) You initiate an ObjectSpace in code and add/remove/get objects from it. (these objects are persisted) &#xD;&#xA;&#xD;&#xA;If you just create an abstraction so that the tile engine or whatever it is you call it doesn't care exactly how it gets the map, just that it gets the one it asked for. Then you can go back and use the XmlSerializer or the Intermediate one. (whichever you prefer) &#xD;&#xA;&#xD;&#xA;I think there is an example of how to build content at runtime on the XNA creator's club website. It might not be built with the latest framework though. That way you could keep your old code if you already use the content pipeline. I would've posted a link, but it wouldn't let me because I'm so new. (tinyurl.com/279xtso) That starts with http://&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite" />
  <row Id="11703" PostHistoryTypeId="2" PostId="5885" RevisionGUID="04868fd5-386a-4405-b144-f32ee75e70d0" CreationDate="2010-11-24T04:26:29.000" UserId="3547" Text="I already know C# and am familiar with XNA.&#xD;&#xA;&#xD;&#xA;So it would make sense to develop for the Windows Phone 7, but would it be worth while to learn Java, get familiar with Android, and instead develop for Android devices?&#xD;&#xA;&#xD;&#xA;Android has been around longer so it would probably have a larger user base. Is it really worth it to try to develop for one of the more popular mobile platforms. (Windows Phone 7 has been out for like a month?)&#xD;&#xA;&#xD;&#xA;I haven't tried either one yet though. I'm also going to buy a phone, so this decision would probably influence the phone that I buy. (to develop/test on)" />
  <row Id="11704" PostHistoryTypeId="1" PostId="5885" RevisionGUID="04868fd5-386a-4405-b144-f32ee75e70d0" CreationDate="2010-11-24T04:26:29.000" UserId="3547" Text="Should I go with Android or Try Windows Phone 7?" />
  <row Id="11705" PostHistoryTypeId="3" PostId="5885" RevisionGUID="04868fd5-386a-4405-b144-f32ee75e70d0" CreationDate="2010-11-24T04:26:29.000" UserId="3547" Text="&lt;xna&gt;&lt;c#&gt;&lt;android&gt;&lt;java&gt;&lt;wp7&gt;" />
  <row Id="11706" PostHistoryTypeId="2" PostId="5886" RevisionGUID="c102f57e-4080-45d0-9c7b-c3d5fecd8d1f" CreationDate="2010-11-24T05:14:05.467" UserId="2687" Text="I would say try Windows Phone 7. &#xD;&#xA;&#xD;&#xA;Couple of reasons I say this, first and foremost, if you are already familiar with C# and XNA then you don't need to use your first couple of projects to simply learn the language even before you start learning the platform. This might only be because I personally am rather lazy, but either way I think it's worth considering. &#xD;&#xA;&#xD;&#xA;The bigger reason I would suggest Windows Phone 7 is this, while it's no Apple App Store, the android marketplace still has a whole lot of apps already released onto it, and that is going to make getting yours even noticed, much less popular, very difficult. Since it has been out for such a short time it's very much like getting in at the ground floor, and since you already have at least some of the required experience you can get in early before the marketplace becomes flooded. &#xD;&#xA;&#xD;&#xA;That said, I've found a number of limitations in the API at the moment, there's some parts of the hardware that developers don't have access to for whatever reason, so that is something to take into consideration as well." />
  <row Id="11707" PostHistoryTypeId="2" PostId="5887" RevisionGUID="899cd61e-ad00-4391-b843-d6a311679a2d" CreationDate="2010-11-24T06:16:20.280" UserId="1251" Text="I first saw it in demonstrated in the [world of goo][1]. But now I happened to see [this structure of a gooey player character][2] made in flash.&#xD;&#xA;&#xD;&#xA;Can anybody suggest onto what computer science concept I should use to &#xD;&#xA;&#xD;&#xA; 1. make a goo &#xD;&#xA; 2. make it behave like a goo&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanking You,&#xD;&#xA;&#xD;&#xA;Vish&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/World_of_Goo&#xD;&#xA;  [2]: http://www.physicsgames.net/game/Huje_Adventure.html" />
  <row Id="11708" PostHistoryTypeId="1" PostId="5887" RevisionGUID="899cd61e-ad00-4391-b843-d6a311679a2d" CreationDate="2010-11-24T06:16:20.280" UserId="1251" Text="What geometric object should I use to model a gooey model" />
  <row Id="11709" PostHistoryTypeId="3" PostId="5887" RevisionGUID="899cd61e-ad00-4391-b843-d6a311679a2d" CreationDate="2010-11-24T06:16:20.280" UserId="1251" Text="&lt;game-design&gt;&lt;2d-physics&gt;" />
  <row Id="11710" PostHistoryTypeId="2" PostId="5888" RevisionGUID="d4674b88-26ee-4819-98b6-d74039ec1e63" CreationDate="2010-11-24T06:47:41.943" UserId="395" Text="Those two games don't really have much to do with each other, and World of Goo doesn't actually contain anything that I would call &quot;goo&quot; since all the characters are just points. The closest I can think of to a generic answer to this question is that a &quot;goo&quot; is usually just a high viscosity [fluid](http://en.wikipedia.org/wiki/Fluid_dynamics) and could probably be modeled using a vector space. That wouldn't be particularly fast though, so you could probably cheat and use a triangle mesh with some extra vector data for each vertex." />
  <row Id="11711" PostHistoryTypeId="5" PostId="5887" RevisionGUID="c5dadd25-7b7e-47ab-adfa-1eebfd5145cb" CreationDate="2010-11-24T08:06:55.960" UserId="1251" Comment="Removed unnecessary details; edited title; edited title" Text=" I happened to see [this structure of a gooey player character][1] made in flash.&#xD;&#xA;&#xD;&#xA;Can anybody suggest onto what computer science concept I should use to &#xD;&#xA;&#xD;&#xA; 1. make a goo &#xD;&#xA; 2. make it behave like a goo&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanking You,&#xD;&#xA;&#xD;&#xA;Vish&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.physicsgames.net/game/Huje_Adventure.html" />
  <row Id="11712" PostHistoryTypeId="4" PostId="5887" RevisionGUID="c5dadd25-7b7e-47ab-adfa-1eebfd5145cb" CreationDate="2010-11-24T08:06:55.960" UserId="1251" Comment="Removed unnecessary details; edited title; edited title" Text="How do I model a gooey sprite?" />
  <row Id="11716" PostHistoryTypeId="2" PostId="5890" RevisionGUID="c74c4aab-6875-460f-aa6a-ffa8102dfc5d" CreationDate="2010-11-24T08:48:00.263" UserId="3484" Text="I found this:&#xD;&#xA;&#xD;&#xA;http://www.theprogrammersweblog.com/2008/12/3d-game-programming-in-java-using.html&#xD;&#xA;&#xD;&#xA;Pretty interesting, even if incomplete for the moment." />
  <row Id="11717" PostHistoryTypeId="2" PostId="5891" RevisionGUID="8f06f93b-4742-4638-9152-addd79cd965e" CreationDate="2010-11-24T10:10:15.027" UserId="18" Text="I would say try Android.&#xD;&#xA;&#xD;&#xA;If you are already familiar with C# then it's easy to learn Java. There are some [differences](http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java), but I think you can get comfortable with Java in a few days. On the other hand, XNA and OpenGL ES have different philosophies and you would need to spend time learning OpenGL (although you can get away with using the simpler Canvas class for 2D games). Whether spending time learning a new technology is worth it is a hard question to answer. It takes more time, but the knowledge is applicable beyond just Android as OpenGL (ES) is also available on iPhone and all major desktop operating systems.&#xD;&#xA;&#xD;&#xA;There are relatively few applications available for Windows Phone 7 and you can't tell how viable of a platform it will be yet. On the other hand, Android has a growing market share and a wealth of tutorials and documentation to get you started (including the source code for a full [2D platformer](http://code.google.com/p/replicaisland/)). Android marketplace is not as saturated as Apple's App Store, especially when it comes to good games. You are also not limited to one market, there are alternative market applications, and you can event host your Android apps on your website. While Windows Phone has the full backing of Microsoft and a huge marketing campaign, it's still too early to predict its future performance, especially since they target higher end devices and might not directly compete with Android in certain markets. You can see Android market as a middle ground between the more mature iPhone store and the budding WP7 marketplace.&#xD;&#xA;&#xD;&#xA;Personally, I'm comfortable with working with Android (and all that talk about fragmentation issues is a bit overrated). I don't have any experience with Windows Phone 7, although I know that you can use XNA to program for it. In the end it depends on whether you want to be an early adapter or not. Nothing stops you from making games for both systems; make an Android game now and then port it to WP7 when it gets popular enough. Try the tutorials on the Android developer site, and see how you like it. You can get pretty far with just using the emulator to try things out without needing to buy an actual device." />
  <row Id="11718" PostHistoryTypeId="2" PostId="5892" RevisionGUID="4472ee07-1708-4919-a751-87df013a88fb" CreationDate="2010-11-24T10:22:44.577" UserId="3556" Text="Besides the story itself, a game needs code, graphics and music/sound effect. I can program and I knew a few graphics designers in the web app era. However, I don't know whether to find music and sound freelancers/professionals/partners.&#xD;&#xA;&#xD;&#xA;So how's music/sound typically done? Do you finish a game and hand it to some musicians? Seek help via Facebook? Call the secondary school music teacher? .. Please advise. Thanks!" />
  <row Id="11719" PostHistoryTypeId="1" PostId="5892" RevisionGUID="4472ee07-1708-4919-a751-87df013a88fb" CreationDate="2010-11-24T10:22:44.577" UserId="3556" Text="As an indie game developer, how to have (quality) music/sound done?" />
  <row Id="11720" PostHistoryTypeId="3" PostId="5892" RevisionGUID="4472ee07-1708-4919-a751-87df013a88fb" CreationDate="2010-11-24T10:22:44.577" UserId="3556" Text="&lt;sound&gt;&lt;resources&gt;&lt;music&gt;" />
  <row Id="11721" PostHistoryTypeId="2" PostId="5893" RevisionGUID="ba1da5d5-a903-4f97-9829-bbb30912143e" CreationDate="2010-11-24T10:34:48.840" UserId="3492" Text="I'm developing a Multimedia Software for Kindergarten Kids. It introduce them to animals, Alphabets, Simple Math, Colors and it contain some simple games.&#xD;&#xA;&#xD;&#xA;When Can I found Music suitable for Kids? I do not have enough budget to hire a musician to write a proprietary music for my project.&#xD;&#xA;&#xD;&#xA;I guess some simple but energetic and happy melodies can fit for my game, very well." />
  <row Id="11722" PostHistoryTypeId="1" PostId="5893" RevisionGUID="ba1da5d5-a903-4f97-9829-bbb30912143e" CreationDate="2010-11-24T10:34:48.840" UserId="3492" Text="Music for Kids Game!" />
  <row Id="11723" PostHistoryTypeId="3" PostId="5893" RevisionGUID="ba1da5d5-a903-4f97-9829-bbb30912143e" CreationDate="2010-11-24T10:34:48.840" UserId="3492" Text="&lt;music&gt;" />
  <row Id="11724" PostHistoryTypeId="2" PostId="5894" RevisionGUID="56c38fdf-c890-4c69-92e4-ef60ca1e1d1c" CreationDate="2010-11-24T10:56:11.820" UserId="3492" Text="Flash for Android 2.1 Download:&#xD;&#xA;&#xD;&#xA;&gt; androidapk.net/?p=53&#xD;&#xA;&#xD;&#xA;A Comparison Between FlashLite 4 on Android 2.1 vs Flash 10.1 beta on Android 2.2 can seen here: &#xD;&#xA;&#xD;&#xA;&gt; dailymobile.se/2010/05/23/flash-lite-4-on-android-2-1-vs-flash-10-1-beta-on-android-2-2/&#xD;&#xA;&#xD;&#xA;How to install Flash Player 10.1 on Android 2.1: &#xD;&#xA;&#xD;&#xA;&gt; http://www.addictivetips.com/mobile/how-to-install-flash-10-1-on-android-2-1-eclair-devices/" />
  <row Id="11726" PostHistoryTypeId="2" PostId="5895" RevisionGUID="ed3953db-ea65-4f3e-9faa-db252363403d" CreationDate="2010-11-24T11:22:51.340" UserId="2091" Text="The game you posted looks &quot;heavily inspired&quot; by [Gish][1], a quite famous indie game from some years ago.  You might want to look at the [source code][2] of Gish, which was published after the huge success of the Humble Indie Bundle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chroniclogic.com/gish.htm&#xD;&#xA;  [2]: http://blog.wolfire.com/2010/05/Gish-goes-open-source" />
  <row Id="11727" PostHistoryTypeId="5" PostId="5895" RevisionGUID="7322fb29-0312-4450-96ba-c340043c9f1b" CreationDate="2010-11-24T11:34:05.280" UserId="2091" Comment="added 326 characters in body" Text="The game you posted looks &quot;heavily inspired&quot; by [Gish][1], a quite famous indie game from some years ago.  You might want to look at the [source code][2] of Gish, which was published after the huge success of the Humble Indie Bundle.&#xD;&#xA;&#xD;&#xA;Edit:  I googled this [blog entry][3], it mentions the physics engine at some point and recommends using Box2D instead.  It might be useful to look how the tar ball was modeled in Gish and then try to implement that idea in another, better, physics engine of your choice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chroniclogic.com/gish.htm&#xD;&#xA;  [2]: http://blog.wolfire.com/2010/05/Gish-goes-open-source&#xD;&#xA;  [3]: http://blog.poweredbytoast.com/gish-source" />
  <row Id="11728" PostHistoryTypeId="2" PostId="5896" RevisionGUID="252af24c-b586-4c0e-8b60-436347bcf405" CreationDate="2010-11-24T12:13:19.607" UserId="225" Text="Here you can find Creative Commons music http://www.jamendo.com" />
  <row Id="11729" PostHistoryTypeId="2" PostId="5897" RevisionGUID="0bdbd78d-9dc3-4bd8-9c69-531b8b305eae" CreationDate="2010-11-24T12:23:36.033" UserId="1742" Text="If you look carefully at the game you linked to, you can see that it's just a triangle fan with all the vertices merely ray casting to the collision in the world. This is why sometimes the goo looks a bit thin. Gish seemed to have more volumetric stability, probably through being constructed from a flexible mesh of points.&#xD;&#xA;&#xD;&#xA;To emulate the movement of the linked-to game, all you need to do is sum the forces (highly damped I guess) that are being exerted on the centre of the character by the ray cast collisions that are pretty obviously being used to power the character rendering. The sideways forces are simple as they apply whether on ground or not, and jumping can be managed through making the lower springs more tensile, but, that said, personally I'd actually return to platformer game physics and use some impulse system to directly affect the vertical momentum rather than try to get the physics to behave right for gameplay." />
  <row Id="11730" PostHistoryTypeId="2" PostId="5898" RevisionGUID="343109c5-7989-4492-8520-0794a9e32102" CreationDate="2010-11-24T13:10:26.563" UserId="3559" Text="I'm writing my own RTS game in Delphi. Single-player part is almost done and works well and I'm thinking about adding multi-player to it now. There's going to be a lobby where players should be able to chat and organize games. I tried googling for a convenient way to do it, but couldn't find anything related ..&#xD;&#xA;&#xD;&#xA;My idea looks like follows:&#xD;&#xA;&#xD;&#xA;- Players are identified by Names they choose and their IPs&#xD;&#xA;- There's **main chat** area where all players meet&#xD;&#xA;- There are **rooms**, where players may select game options (map, teams, flag colors, etc..).&#xD;&#xA;- After everything is settled players exchange IPs and multi-player engine starts.&#xD;&#xA;&#xD;&#xA;I want to avoid usage of server-side software. Currently I'm looking into running everything through SQL database where each player commits posts and his state and reads other players posts/states.&#xD;&#xA;&#xD;&#xA;Whats the common practice of organizing in-game chat lobby?" />
  <row Id="11731" PostHistoryTypeId="1" PostId="5898" RevisionGUID="343109c5-7989-4492-8520-0794a9e32102" CreationDate="2010-11-24T13:10:26.563" UserId="3559" Text="How to make a chat lobby in my game?" />
  <row Id="11732" PostHistoryTypeId="3" PostId="5898" RevisionGUID="343109c5-7989-4492-8520-0794a9e32102" CreationDate="2010-11-24T13:10:26.563" UserId="3559" Text="&lt;game-design&gt;&lt;multiplayer&gt;" />
  <row Id="11733" PostHistoryTypeId="2" PostId="5899" RevisionGUID="3d89c886-eacb-4a58-90db-59597d796458" CreationDate="2010-11-24T13:11:37.043" UserId="3560" Text="We were thinking about making chess game as a application.&#xD;&#xA;&#xD;&#xA;we are final year B.tech students and don't have much knowledge about connectivity to the database and C# or java . &#xD;&#xA;&#xD;&#xA;we have roughly 2 months to complete the project.&#xD;&#xA;&#xD;&#xA;is it feasible??&#xD;&#xA;&#xD;&#xA;plz suggest some manuals,guides or tutorials if feasible ..&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11734" PostHistoryTypeId="1" PostId="5899" RevisionGUID="3d89c886-eacb-4a58-90db-59597d796458" CreationDate="2010-11-24T13:11:37.043" UserId="3560" Text="is it feasible to make chess application in 2 months ??" />
  <row Id="11735" PostHistoryTypeId="3" PostId="5899" RevisionGUID="3d89c886-eacb-4a58-90db-59597d796458" CreationDate="2010-11-24T13:11:37.043" UserId="3560" Text="&lt;game-design&gt;" />
  <row Id="11736" PostHistoryTypeId="2" PostId="5900" RevisionGUID="5a924e48-8e20-4b8f-851f-bc4075c2ccdd" CreationDate="2010-11-24T13:13:08.187" UserId="1742" Text="if you have three angles, then the first thing you need to do is figure out what they represent:&#xD;&#xA;&#xD;&#xA;your problem sounds like a conversion from euler angle to matrix, and if that's true, then you need to find out what order your angles are meant to be applied in.&#xD;&#xA;&#xD;&#xA;see [this wikipedia link][1] for details of building the matrix once you have found out what order the axes are in.&#xD;&#xA;&#xD;&#xA;If they're not euler angles, then what are they? Are they axial north bearings?if so, then you've got to generate a lookat from a calibrated north-world transform, and that's not going to give you a single solution, but a set of solutions that lie in the plane of the north axis. Normally you'd take this plane solution and use it to provide an update to a kalman filter, or marry it with accelerometer readings to give the correct downward direction thus prodiving the extra constant required for a single solution or mere pair of solutions.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Rotation_matrix" />
  <row Id="11737" PostHistoryTypeId="2" PostId="5901" RevisionGUID="8e3987c1-f517-44ba-ba46-b7e0a7368349" CreationDate="2010-11-24T13:24:48.813" UserId="1386" Text="Absolutely.&#xD;&#xA;&#xD;&#xA;The main factors of the development time I would say is:&#xD;&#xA;&#xD;&#xA; - How skilled you are as programmers&#xD;&#xA; - How you decide to display the game&#xD;&#xA;   (console, GUI, 3D?)&#xD;&#xA; - How good you are&#xD;&#xA;   at communicating and working together&#xD;&#xA;   as a team&#xD;&#xA; - If you decide to implement&#xD;&#xA;   AI.&#xD;&#xA;&#xD;&#xA;The boards representation in memory will be probably one of the first things you will consider. [This link][1] presents one way to represent the board and may be useful in general. In most cases it is not so important as to the specific board storage mechanism used as it can be abstracted away. &#xD;&#xA;&#xD;&#xA;One way to do AI would be to use the [minimax algorithm][2] to look a few moves ahead. You'll benefit here if you kept your worldstate separate to rendering, input etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chessbin.com/post/Board-Representation.aspx&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Minimax" />
  <row Id="11738" PostHistoryTypeId="2" PostId="5902" RevisionGUID="b3df19c9-6320-4ec3-a56e-5df354be901b" CreationDate="2010-11-24T13:47:23.690" UserId="1352" Text="I will just refer you to an old question addressing this issue:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game" />
  <row Id="11739" PostHistoryTypeId="2" PostId="5903" RevisionGUID="2fffa8bc-d93e-4baf-b0df-de998c2cba1b" CreationDate="2010-11-24T13:50:52.503" UserId="1101" Text="Most languages come with a good general purpose quicksort implementation.&#xD;&#xA;&#xD;&#xA;They don't necessarily come with implementations of stable sorts, sorts that don't compare values directly, sorts that don't suffer when used on pre-sorted data, sorts that work well on disk-based data, sorts that work better if given lots of memory, sorts that work without requiring any extra memory at all, partial sorts that efficiently sort just a subset of the data, partitions that only sort data relative to a pivot threshold, and so on.&#xD;&#xA;&#xD;&#xA;These are all useful from time to time. " />
  <row Id="11740" PostHistoryTypeId="5" PostId="5901" RevisionGUID="77e1b8fa-46bb-42db-80ec-f5f94c0fe7a9" CreationDate="2010-11-24T14:00:54.693" UserId="1386" Comment="Added more description to a bullet point." Text="Absolutely.&#xD;&#xA;&#xD;&#xA;The main factors of the development time I would say is:&#xD;&#xA;&#xD;&#xA; - How skilled you are as programmers - this may be the biggest problem for you if you aren't experienced with your programming language of choice.&#xD;&#xA; - How you decide to display the game&#xD;&#xA;   (console, GUI, 3D?)&#xD;&#xA; - How good you are&#xD;&#xA;   at communicating and working together&#xD;&#xA;   as a team&#xD;&#xA; - If you decide to implement&#xD;&#xA;   AI.&#xD;&#xA;&#xD;&#xA;The boards representation in memory will be probably one of the first things you will consider. [This link][1] presents one way to represent the board and may be useful in general. In most cases it is not so important as to the specific board storage mechanism used as it can be abstracted away. &#xD;&#xA;&#xD;&#xA;One way to do AI would be to use the [minimax algorithm][2] to look a few moves ahead. You'll benefit here if you kept your worldstate separate to rendering, input etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chessbin.com/post/Board-Representation.aspx&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Minimax" />
  <row Id="11741" PostHistoryTypeId="2" PostId="5904" RevisionGUID="e85bd388-1eb2-465f-b7cd-ec358fd94d45" CreationDate="2010-11-24T14:20:06.183" UserId="1923" Text="On the WP7 side is the ability to easily port the game for xbox360 sales on Xbox live Indie Games and possibly pick up some easy extra cash that way. Visual Studio does the heavy lifting for the port job." />
  <row Id="11742" PostHistoryTypeId="5" PostId="5901" RevisionGUID="53f1ee5d-95d7-4021-b96f-47a0960ac4c8" CreationDate="2010-11-24T14:43:08.887" UserId="1386" Comment="added 206 characters in body" Text="Absolutely.&#xD;&#xA;&#xD;&#xA;The main factors of the development time I would say is:&#xD;&#xA;&#xD;&#xA; - How skilled you are as programmers - **Edit: this may be the biggest problem for you if you aren't experienced with your programming language of choice.** I'm stressing this here because I did not realise that you were saying you didn't have much experience in the language you are going to use. If that's the case I'd consider the project high risk.&#xD;&#xA; - How you decide to display the game&#xD;&#xA;   (console, GUI, 3D?)&#xD;&#xA; - How good you are&#xD;&#xA;   at communicating and working together&#xD;&#xA;   as a team&#xD;&#xA; - If you decide to implement&#xD;&#xA;   AI.&#xD;&#xA;&#xD;&#xA;The boards representation in memory will be probably one of the first things you will consider. [This link][1] presents one way to represent the board and may be useful in general. In most cases it is not so important as to the specific board storage mechanism used as it can be abstracted away. &#xD;&#xA;&#xD;&#xA;One way to do AI would be to use the [minimax algorithm][2] to look a few moves ahead. You'll benefit here if you kept your worldstate separate to rendering, input etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chessbin.com/post/Board-Representation.aspx&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Minimax" />
  <row Id="11743" PostHistoryTypeId="6" PostId="5885" RevisionGUID="ca9befc9-cdf9-482c-b2a6-67318e51d432" CreationDate="2010-11-24T14:45:00.817" UserId="51" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;android&gt;&lt;java&gt;&lt;windows-phone-7&gt;" />
  <row Id="11744" PostHistoryTypeId="6" PostId="5384" RevisionGUID="e973c8a2-aee8-4734-b335-6b5129103a82" CreationDate="2010-11-24T14:45:37.633" UserId="51" Comment="edited tags" Text="&lt;xna&gt;&lt;android&gt;&lt;input&gt;&lt;touch&gt;&lt;windows-phone-7&gt;" />
  <row Id="11745" PostHistoryTypeId="2" PostId="5905" RevisionGUID="bc482248-0567-47c8-923b-4699150edefb" CreationDate="2010-11-24T14:52:53.120" UserId="51" Text="I don't see how being an indie developer changes the problem set other than probably having a smaller budget.&#xD;&#xA;&#xD;&#xA;Your list of options probably fall something like this:&#xD;&#xA;&#xD;&#xA;* Have a sound guy on staff to do all custom stuff&#xD;&#xA;* Contract out a sound guy from one of the many sound studios&#xD;&#xA;* Get lucky and &quot;know a guy&quot; (online or in meatspace) who does music who will do it for free&#xD;&#xA;* License existing music (the popular indie game Braid did this with a lot of success): http://gamedev.stackexchange.com/questions/1045/where-is-quality-paid-game-music&#xD;&#xA;* Use free music: http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game&#xD;&#xA;&#xD;&#xA;There are also threads here about where you can find sounds.  Like this one: http://gamedev.stackexchange.com/questions/8/where-can-i-find-free-sounds-for-my-game&#xD;&#xA;&#xD;&#xA;Honestly the &quot;know a guy&quot; is probably the least likely to pan out.  More than likely you'll get better free music that already exists.  It's mostly just going to take time to sort through the gobs of stuff already out there and seeing if it applies to your needs." />
  <row Id="11746" PostHistoryTypeId="16" PostId="5878" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-24T15:01:39.493" UserId="51" />
  <row Id="11747" PostHistoryTypeId="16" PostId="5881" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-24T15:01:39.493" UserId="51" />
  <row Id="11748" PostHistoryTypeId="16" PostId="5869" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-24T15:01:39.493" UserId="51" />
  <row Id="11749" PostHistoryTypeId="10" PostId="5870" RevisionGUID="57d021fa-3433-4dd1-b692-0b49855a7f7c" CreationDate="2010-11-24T15:03:51.550" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11750" PostHistoryTypeId="5" PostId="5870" RevisionGUID="2cfdbce1-b4c6-41ad-9d67-2e008a41c9dc" CreationDate="2010-11-24T15:03:51.660" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Good resources for learning about game architecture?](http://gamedev.stackexchange.com/questions/455/good-resources-for-learning-about-game-architecture)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I know that game architecture can vary greatly, especially with the type of game being built, but I know that there are a lot of similarities too. &#xD;&#xA;&#xD;&#xA;I feel like I am on the cusp of really having a good grasp on game architecture, but I feel like something is missing. Maybe it's something obvious. So, I want to know, is there a resource out there that is the be-all-end-all guide to 2D game programming concepts, patters and architecture?&#xD;&#xA;&#xD;&#xA;**Edit:**  I'm mostly interested in building platformers and shmups and the like. So, if the resources are related to those types of games, even better." />
  <row Id="11751" PostHistoryTypeId="2" PostId="5906" RevisionGUID="874d2adf-0a62-425c-af02-09b19cb96583" CreationDate="2010-11-24T15:22:44.793" UserId="1386" Text="I know quite well how to check for collisions, but I don't know how to handle the collision in a good way.&#xD;&#xA;&#xD;&#xA;Simplified, if two objects collide I use some calculations to change the velocity direction. If I don't move the two objects they will still overlap and if the velocity is not big enough they will still collide after next update. This can cause objects to get stuck in each other.&#xD;&#xA;&#xD;&#xA;But what if I try to move the two objects so they do not overlap. This sounds like a good idea but I have realised that if there is more than two objects this becomes very complicated. What if I move the two objects and one of them collides with other objects so I have to move them too and they may collide with walls etc.&#xD;&#xA;&#xD;&#xA;I have a top down 2D game in mind but I don't think that has much to do with it. How are collisions usually handled?&#xD;&#xA;&#xD;&#xA;*This question is asked on behalf of Wooh*" />
  <row Id="11752" PostHistoryTypeId="1" PostId="5906" RevisionGUID="874d2adf-0a62-425c-af02-09b19cb96583" CreationDate="2010-11-24T15:22:44.793" UserId="1386" Text="Collision Resolution" />
  <row Id="11753" PostHistoryTypeId="3" PostId="5906" RevisionGUID="874d2adf-0a62-425c-af02-09b19cb96583" CreationDate="2010-11-24T15:22:44.793" UserId="1386" Text="&lt;collision&gt;" />
  <row Id="11754" PostHistoryTypeId="2" PostId="5907" RevisionGUID="d8f0a273-ecca-4055-a6d0-10ec76a50f86" CreationDate="2010-11-24T15:51:52.023" UserId="2091" Text="What if you check the collision before the objects move, instead of afterwards?  Or, in other words, you reject the new position if the objects collide, reusing the old one in that case?&#xD;&#xA;&#xD;&#xA;Pseudocode:&#xD;&#xA;&#xD;&#xA;      tmpPosition1 = Obj1.position&#xD;&#xA;      tmpPosition2 = Obj2.position&#xD;&#xA;      updatePosition(Obj1)&#xD;&#xA;      updatePosition(Obj2)&#xD;&#xA;      if collided(Obj1,Obj2) then&#xD;&#xA;          updateVelocities( Obj1, Obj2 )&#xD;&#xA;          Obj1.position = tmpPosition1&#xD;&#xA;          Obj2.position = tmpPosition2&#xD;&#xA;      endif&#xD;&#xA;    &#xD;&#xA;This way the objects will bump with each other when they are *about to collide*, if your update step is small enough the player shouldn't notice anything strange in the representation." />
  <row Id="11755" PostHistoryTypeId="5" PostId="5882" RevisionGUID="258a1749-8ec9-4f60-a467-8c7beb799bb3" CreationDate="2010-11-24T16:02:47.007" UserId="3547" Comment="added 21 characters in body; added 1 characters in body" Text="You could also use [Karvonite][1] if you want to get this up and going really fast.&#xD;&#xA;&#xD;&#xA;It's an agile persistence framework. I'm not sure if the new version will work on windows phone 7 or xbox.&#xD;&#xA;&#xD;&#xA;You would create a persistence definition with their persistence editor (it's pretty easy, you just import the assembly and check the fields/properties on the classes/structures you want persisted) You initiate an ObjectSpace in code and add/remove/get objects from it. (these objects are persisted) &#xD;&#xA;&#xD;&#xA;If you could create an abstraction so that the tile engine or whatever it is you call it doesn't care exactly how it gets the map, just that it gets the one it asked for. Then you can go back and use the XmlSerializer or the Intermediate one. (whichever you prefer) &#xD;&#xA;&#xD;&#xA;I think there is an example of how to build content at runtime on the XNA creator's club website. It might not be built with the latest framework though. That way you could keep your old code if you already use the content pipeline. Here's the link : [Winform Series 2: Content Loading][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2" />
  <row Id="11756" PostHistoryTypeId="5" PostId="5882" RevisionGUID="87d6fc11-b69b-4777-950c-2b4f9b204da2" CreationDate="2010-11-24T16:08:19.920" UserId="3547" Comment="added 143 characters in body" Text="You could also use [Karvonite][1] if you want to get this up and going really fast.&#xD;&#xA;&#xD;&#xA;It's an agile persistence framework. I'm not sure if the new version will work on windows phone 7 or xbox.&#xD;&#xA;&#xD;&#xA;You would create a persistence definition with their persistence editor (it's pretty easy, you just import the assembly and check the fields/properties on the classes/structures you want persisted) You initiate an ObjectSpace in code and add/remove/get objects from it. (these objects are persisted) &#xD;&#xA;&#xD;&#xA;If you could create an abstraction so that the tile engine or whatever it is you call it doesn't care exactly how it gets the map, just that it gets the one it asked for. Then you can go back and use the XmlSerializer or the Intermediate one. (whichever you prefer) All you'd have to do to implement those other serializers is create another implementation of the abstraction (an interface or abstract class).&#xD;&#xA;&#xD;&#xA;I think there is an example of how to build content at runtime on the XNA creator's club website. It might not be built with the latest framework though. That way you could keep your old code if you already use the content pipeline. Here's the link : [Winform Series 2: Content Loading][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2" />
  <row Id="11757" PostHistoryTypeId="2" PostId="5908" RevisionGUID="439e27ca-535f-4f61-938b-df734e138fa7" CreationDate="2010-11-24T16:12:41.987" UserId="678" Text="Unless you are doing this to experiment with collisions, really really recommend using a physics library to handle collisions. It is a very very tricky subject, with lots of potential pitfalls and opportunities for things to go spectacularly wrong. You are much better off outsourcing it to a library and focusing on your game." />
  <row Id="11758" PostHistoryTypeId="2" PostId="5909" RevisionGUID="6fbf27b6-f529-4752-8489-fd6aa1b0c041" CreationDate="2010-11-24T16:28:10.257" UserId="3562" Text="I've been cogitating about developing a logic game similar to &lt;a href=&quot;http://en.wikipedia.org/wiki/Zebra_Puzzle&quot;&gt;Einstein's Puzzle &lt;/a&gt;, which would have different sets of clues for every new game replay.&#xD;&#xA;&#xD;&#xA;What data structures would you use to handle the different entities (pets, colors of houses, nationalities, etc.), deduction rules, etc. to guarantee that the clues you provide  point to a unique solution?&#xD;&#xA;&#xD;&#xA;I'm having a hard time thinking about how to get the deduction rules to play along with the possible clues; any insight would be appreciated." />
  <row Id="11759" PostHistoryTypeId="1" PostId="5909" RevisionGUID="6fbf27b6-f529-4752-8489-fd6aa1b0c041" CreationDate="2010-11-24T16:28:10.257" UserId="3562" Text="Data Structures for Logic Games / Deduction Rules / Sufficient Set of Clues?" />
  <row Id="11760" PostHistoryTypeId="3" PostId="5909" RevisionGUID="6fbf27b6-f529-4752-8489-fd6aa1b0c041" CreationDate="2010-11-24T16:28:10.257" UserId="3562" Text="&lt;logic&gt;&lt;data-structure&gt;&lt;puzzle&gt;" />
  <row Id="11764" PostHistoryTypeId="2" PostId="5911" RevisionGUID="b55abf4a-3964-4298-9db0-a543fb139258" CreationDate="2010-11-24T16:54:32.483" UserId="1156" Text="[There's this on solving it.][1]&#xD;&#xA;&#xD;&#xA;Of course, I think it wouldn't be too difficult to work backwards; that is have a list like this:&#xD;&#xA;&#xD;&#xA; - Fred Red Dog  &#xD;&#xA;   &#xD;&#xA; - Steve Blue Cat  &#xD;&#xA;   &#xD;&#xA; - Bill Purple Whale  &#xD;&#xA;   &#xD;&#xA; - Eric Cyan Dolphin&#xD;&#xA;&#xD;&#xA;Which could be easily generated, and then make up a set of rules from that.&#xD;&#xA;&#xD;&#xA;As for storage, why not a set of each separate thing, so [Fred, Steve, Bill, Eric] and a set of the answer [Fred, Red, Dog]. Then have 'NAME does (not) ACTION OBJECT'.&#xD;&#xA;&#xD;&#xA;When you get down to it, does a unique solution really matter? As long as your game can split them into the lists, and check 'set 1 does not contain Whale'. &#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/318888/solving-who-owns-the-zebra-programmatically" />
  <row Id="11765" PostHistoryTypeId="2" PostId="5912" RevisionGUID="73582361-5578-4b60-a308-4f3c5e605fea" CreationDate="2010-11-24T17:04:37.797" UserId="3564" Text="Many older games do use A*.  The original Starcraft used A*; which led to some problems in dealing with collision.  Starcraft 2's handles collision very well, using a swaming/flocking behavior to maintain fluid control of large groups.  &lt;a href=&quot;http://www.gamedev.net/community/forums/topic.asp?topic_id=563819&quot;&gt;This&lt;/a&gt; gamedev article discusses how this might be being achieve." />
  <row Id="11766" PostHistoryTypeId="2" PostId="5913" RevisionGUID="71d83e43-bd62-4ccb-92e5-72a6c7d0f8c6" CreationDate="2010-11-24T17:18:12.203" UserId="1021" Text="I recently left my full-time job for an independent game development career.  So far things are going well:  I've created two games for the iPhone (one has been in the app store for a month or so and the other has been in review for about a week).  I'm working on a third game now.  Each time the game development life cycle is shorter while the product quality is higher.  However I am not yet making a living from my games.&#xD;&#xA;&#xD;&#xA;My savings can support me for another year.  Here's my general plan: &#xD;&#xA;&#xD;&#xA; 1. make a few more games&#xD;&#xA; 2. in 8-9 months look for a job in the game industry (if my games are not paying the bills yet)&#xD;&#xA;&#xD;&#xA;**How would you proceed in this situation?**&#xD;&#xA;&#xD;&#xA;Perhaps you would look for a game dev job immediately.  Or you would move somewhere with a lower cost of living hence maximizing your time to work independently.  Or something else.&#xD;&#xA;" />
  <row Id="11767" PostHistoryTypeId="1" PostId="5913" RevisionGUID="71d83e43-bd62-4ccb-92e5-72a6c7d0f8c6" CreationDate="2010-11-24T17:18:12.203" UserId="1021" Text="Independent game developer career advice" />
  <row Id="11768" PostHistoryTypeId="3" PostId="5913" RevisionGUID="71d83e43-bd62-4ccb-92e5-72a6c7d0f8c6" CreationDate="2010-11-24T17:18:12.203" UserId="1021" Text="&lt;indie&gt;&lt;career&gt;" />
  <row Id="11770" PostHistoryTypeId="10" PostId="5899" RevisionGUID="91593490-95c3-4e0f-b627-37bc73d6997d" CreationDate="2010-11-24T17:47:25.503" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11771" PostHistoryTypeId="10" PostId="5893" RevisionGUID="d82869c3-57e7-456b-97b8-3594f22b12ad" CreationDate="2010-11-24T17:49:39.980" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11772" PostHistoryTypeId="5" PostId="5893" RevisionGUID="6fd01957-147b-4661-9fd9-c3cb57574bdf" CreationDate="2010-11-24T17:49:40.073" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free music for my game?](http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I'm developing a Multimedia Software for Kindergarten Kids. It introduce them to animals, Alphabets, Simple Math, Colors and it contain some simple games.&#xD;&#xA;&#xD;&#xA;When Can I found Music suitable for Kids? I do not have enough budget to hire a musician to write a proprietary music for my project.&#xD;&#xA;&#xD;&#xA;I guess some simple but energetic and happy melodies can fit for my game, very well." />
  <row Id="11773" PostHistoryTypeId="5" PostId="5893" RevisionGUID="fe2ab014-3543-4d57-b3eb-7d2063434c7e" CreationDate="2010-11-24T17:52:07.730" UserId="51" Comment="added 318 characters in body" Text="&gt; **Possible Duplicates:**  &#xD;&#xA;&gt; [Where can I find free music for my game?](http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game)  &#xD;&#xA;&#xD;&#xA;&gt; [As an indie game developer, how to have (quality) music/sound done?](http://gamedev.stackexchange.com/questions/5892/as-an-indie-game-developer-how-to-have-quality-music-sound-done) &#xD;&#xA;&#xD;&#xA;&gt; [Where is quality paid game music?](http://gamedev.stackexchange.com/questions/1045/where-is-quality-paid-game-music)&#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;I'm developing a Multimedia Software for Kindergarten Kids. It introduce them to animals, Alphabets, Simple Math, Colors and it contain some simple games.&#xD;&#xA;&#xD;&#xA;When Can I found Music suitable for Kids? I do not have enough budget to hire a musician to write a proprietary music for my project.&#xD;&#xA;&#xD;&#xA;I guess some simple but energetic and happy melodies can fit for my game, very well." />
  <row Id="11774" PostHistoryTypeId="2" PostId="5914" RevisionGUID="e8daa56e-d601-4895-8e85-58f7df2f5440" CreationDate="2010-11-24T18:02:38.153" UserId="51" Text="Financial planning is outside the scope of this site, and there isn't really enough information to help you with that side of things.  That question is something you're going to have to answer yourself.&#xD;&#xA;&#xD;&#xA;And on top of that, I would say that in order to really answer that question you would have to provide links to your games so we can look at them and see what you're doing wrong (read: provide constructive criticism).&#xD;&#xA;&#xD;&#xA;If you reword your question to be more game specific, i.e. &quot;my iPhone games aren't generating enough revenue to support myself, how can I fix this&quot;, *then* it becomes a more interesting problem.&#xD;&#xA;&#xD;&#xA;With that question in mind, my suggestion (not knowing what you've done already) would be to specifically target the games you're creating for the &quot;freemium&quot; model.  Specifically, free to play with in-app purchases.  That paradigm seems to get a significantly higher ROI than the traditional up-front purchase way.  You'll probably get more conversions through IAP since free games get easily 100x more downloads than a paid game, even at a .99 price point." />
  <row Id="11775" PostHistoryTypeId="2" PostId="5915" RevisionGUID="1087e926-7a1a-4567-be87-58e72bc5e1fe" CreationDate="2010-11-24T19:48:33.093" UserId="3505" Text="Whenever two objects overlap, check if they are moving towards or away from each other. Do the collision only if they move towards each other.&#xD;&#xA;&#xD;&#xA;It's pretty easy with vector math, simply calculate:&#xD;&#xA;&#xD;&#xA;dot_product(B.position - A.position, A.velocity - B.velocity)&#xD;&#xA;&#xD;&#xA;If the result is positive the objects move towards each other." />
  <row Id="11776" PostHistoryTypeId="8" PostId="5893" RevisionGUID="f2d6746b-1315-4dc1-a28d-e929bc6bbf8f" CreationDate="2010-11-24T20:00:57.830" UserId="3492" Comment="Rollback to [ba1da5d5-a903-4f97-9829-bbb30912143e]" Text="I'm developing a Multimedia Software for Kindergarten Kids. It introduce them to animals, Alphabets, Simple Math, Colors and it contain some simple games.&#xD;&#xA;&#xD;&#xA;When Can I found Music suitable for Kids? I do not have enough budget to hire a musician to write a proprietary music for my project.&#xD;&#xA;&#xD;&#xA;I guess some simple but energetic and happy melodies can fit for my game, very well." />
  <row Id="11777" PostHistoryTypeId="5" PostId="5893" RevisionGUID="ac1825d9-5aa2-4b63-b267-e535279025fa" CreationDate="2010-11-24T20:06:07.543" UserId="3492" Comment="added 214 characters in body" Text="I'm developing a Multimedia Software for Kindergarten Kids. It introduce them to animals, Alphabets, Simple Math, Colors and it contain some simple games.&#xD;&#xA;&#xD;&#xA;Music is very crucial for my project and it is very important to choose the right sort of music for different sections. But unfortunately I know nothing about music. &#xD;&#xA;&#xD;&#xA;Is there a music consultant firm which can help me to choose melodies and rythmes for my project from free music available in internet. My Budget is limited but as this is mandatory and I have no knowledge or taste about music, I think I can afford to pay for this." />
  <row Id="11778" PostHistoryTypeId="11" PostId="5893" RevisionGUID="41de8c32-ec7c-40e1-91a6-d904ba46df97" CreationDate="2010-11-24T20:31:23.257" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11780" PostHistoryTypeId="2" PostId="5917" RevisionGUID="147fff40-faba-47e0-8627-5ad3c34c4126" CreationDate="2010-11-24T23:33:53.230" UserId="3505" Text="As far as I'm aware an SQL database used as you described is server-side software.&#xD;&#xA;&#xD;&#xA;In any case, the database seems like a really bad idea since you will not be able to restrict how it may be altered.&#xD;&#xA;&#xD;&#xA;Common practice is to have a custom program running that relay messages in a meaningful manner. For basic purposes it shouldn't be a big coding job, you can keep everything in memory, though everything is not a lot since you can ditch a message as soon as it has been sent to all receivers." />
  <row Id="11781" PostHistoryTypeId="2" PostId="5918" RevisionGUID="70d2fb54-f9c2-4e5b-94c9-76b13e9ca4ff" CreationDate="2010-11-25T00:01:35.123" UserId="2077" Text="You will most likely have to either (a) create a mapping of the sprite sheet or (b) rearrange the sprites based on your application's mapping convention using some sort of graphical editing application (such as Adobe Photoshop or GIMP); most modern graphical editing applications support adding guidelines and rulers which make both (a) and (b) much easier to do." />
  <row Id="11783" PostHistoryTypeId="2" PostId="5920" RevisionGUID="b96b0ffc-619e-44bd-baf2-cffcfda7c10e" CreationDate="2010-11-25T00:46:54.473" UserDisplayName="Dave" Text="So I read in another thread that:&#xD;&#xA;&#xD;&#xA;&gt; ...the Xbox is a closed system. Forget any direct TCP/IP interaction, you can only communicate with other consoles present in the Xbox Live! network, and you can't do raw HTTP connections.&#xD;&#xA;&#xD;&#xA;This makes me curious as to how an app like Last.fm for Xbox LIVE works.  I would think it would require network communications with Last.fm servers, for user identification and for receiving audio streams.&#xD;&#xA;&#xD;&#xA;Any ideas?  Thanks in advance." />
  <row Id="11784" PostHistoryTypeId="1" PostId="5920" RevisionGUID="b96b0ffc-619e-44bd-baf2-cffcfda7c10e" CreationDate="2010-11-25T00:46:54.473" UserDisplayName="Dave" Text="Xbox 360 Network Communications" />
  <row Id="11785" PostHistoryTypeId="3" PostId="5920" RevisionGUID="b96b0ffc-619e-44bd-baf2-cffcfda7c10e" CreationDate="2010-11-25T00:46:54.473" UserDisplayName="Dave" Text="&lt;network&gt;&lt;xbox&gt;" />
  <row Id="11786" PostHistoryTypeId="2" PostId="5921" RevisionGUID="54d08021-970a-424c-8b66-cb346318fa28" CreationDate="2010-11-25T00:54:30.860" UserId="2077" Text="The Xbox 360 is certainly capable of making connections to any remote host just as your personal computer does, however, as a security measure, it is likely that Microsoft requires you to be an official Xbox licensed developer to do this. In addition to this, official Xbox titles are required to go through stringent validation to ensure a secure system." />
  <row Id="11788" PostHistoryTypeId="2" PostId="5922" RevisionGUID="4cc1c2cc-5a5e-458e-819e-7cf92d2b9098" CreationDate="2010-11-25T01:21:55.840" UserId="395" Text="Either MS or CBS are running an XLSP farm and proxying all the traffic to the Last API. " />
  <row Id="11789" PostHistoryTypeId="2" PostId="5923" RevisionGUID="58e9f404-3bd9-4369-9cb7-d73b835eb5ef" CreationDate="2010-11-25T03:17:44.190" UserId="3573" Text=" - http://www.tribeofnoise.com&#xD;&#xA; - http://tribeofnoise.com/pro/search (search engine to find the music you are looking for)&#xD;&#xA;&#xD;&#xA;I am affiliated with this site. Our goal is to connect musicians with companies (or people) in need of music. Musicians provide some of their music for free, in order to try and sell more of their music later. All the music on our site is free and licensed under a Creative Commons license. " />
  <row Id="11790" PostHistoryTypeId="2" PostId="5924" RevisionGUID="848798ff-57d1-4db0-8426-14681aad3529" CreationDate="2010-11-25T03:41:43.393" UserId="3547" Text="I would definitely check out the [Kongregate Collabs][1]. The licenses are all different (usually free for noncommercial use, but some things there allow commercial use for free), but you can find some pretty good compositions.&#xD;&#xA;&#xD;&#xA;Again, there are a lot of other places already mentioned, like the free sound project.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kongregate.com/collabs" />
  <row Id="11791" PostHistoryTypeId="2" PostId="5925" RevisionGUID="8a37c032-847b-48a8-a9fb-e9eba893899e" CreationDate="2010-11-25T03:56:08.530" UserDisplayName="David" Text="UDK is far ahead of the others.&#xD;&#xA;&#xD;&#xA;- best support and forums&#xD;&#xA;- ready to play out of the box for FPS's&#xD;&#xA;- excellent graphics and physics built in&#xD;&#xA;- fairly easy to learn&#xD;&#xA;- free (kind of)&#xD;&#xA;" />
  <row Id="11792" PostHistoryTypeId="2" PostId="5926" RevisionGUID="7b24f12e-6536-43b6-8ae3-5a8287562ca2" CreationDate="2010-11-25T04:00:51.210" UserId="3547" Text="If your going to have a database somewhere, you minus well have your own custom server application running.&#xD;&#xA;&#xD;&#xA;You could have all of the matches listed in a database and the messages as well, but if you go with your own server application, it'll be far safer in terms if authority. (it's not a fool proof option, but definitely a better one)&#xD;&#xA;&#xD;&#xA;It seems like you only want the server to relay messages and match making. It wouldn't be a huge pain to get something simple up and running. It'll be worth it in the long run when you start having concurrency problems and people messing with your database.&#xD;&#xA;&#xD;&#xA;There really is no point in avoiding server software when your going to have a database somewhere any way. Don't restrict yourself for no good reason." />
  <row Id="11793" PostHistoryTypeId="5" PostId="5892" RevisionGUID="0a7c40bb-349d-411e-b1de-9aae8b2b6732" CreationDate="2010-11-25T04:02:57.353" UserId="3556" Comment="added 1029 characters in body; edited tags" Text="Besides the story itself, a game needs code, graphics and music/sound effect. I can program and I knew a few graphics designers in the web app era. However, I don't know whether to find music and sound freelancers/professionals/partners.&#xD;&#xA;&#xD;&#xA;So how's music/sound typically done? Do you finish a game and hand it to some musicians? Seek help via Facebook? Call the secondary school music teacher? .. Please advise. Thanks!&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;I'd like to rephrase the question a bit to clarify the objective. Let's start with example. Say, there is designer which have finish a great UI concept design, and ask: &quot;how can I find programmers to transform this design into an app?&quot;&#xD;&#xA;&#xD;&#xA;It won't help him much by telling where github is and how much great codes can be learned from... He needs the judgement of what are good code, in addition to how to use the code, and most importantly, the ability to modify/enhance the code to fit his need.&#xD;&#xA;&#xD;&#xA;As a programmer, all I know a game needs some good music. The question is not about where to find music. The question is how to find musician who knows music, the music which fits my game. It's similar to the design is looking for a programmer who can turn Photoshop into .app rather and programming books and code samples.&#xD;&#xA;&#xD;&#xA;Simply put, where did you find your game's musician? ;-) &#xD;&#xA;&#xD;&#xA;p.s. I found my graphics designer on [deviantart.com][1] Where is the deviant *music*.com? XD &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://deviantart.com" />
  <row Id="11794" PostHistoryTypeId="6" PostId="5892" RevisionGUID="0a7c40bb-349d-411e-b1de-9aae8b2b6732" CreationDate="2010-11-25T04:02:57.353" UserId="3556" Comment="added 1029 characters in body; edited tags" Text="&lt;sound&gt;&lt;music&gt;&lt;resources&gt;" />
  <row Id="11796" PostHistoryTypeId="5" PostId="5899" RevisionGUID="bf815eae-6e43-4af8-b583-965ec717062d" CreationDate="2010-11-25T04:13:22.690" UserId="3560" Comment="Reformulated problem .." Text="We are final year B.tech students wanted to just ask that if we work 2 months on making chess application,will it suffice ?&#xD;&#xA;&#xD;&#xA;Wanted to know if it is feasible given -&#xD;&#xA;&#xD;&#xA;       1.Logic implementation is not a problem (will use AI)&#xD;&#xA;       2.We are C++ programmers.&#xD;&#xA;       3.We want to make 2D GUI, didn't selected any language for this purpose and we &#xD;&#xA;         need to learn just that part of the language which will help in making GUI for the application.&#xD;&#xA;       &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11797" PostHistoryTypeId="2" PostId="5928" RevisionGUID="acfbb1e5-ab00-402b-a19e-a73754a7aeac" CreationDate="2010-11-25T05:24:56.293" UserId="2287" Text="The way this is usually solved in physics engines is by applying a penalty force. Moving the rigid body after inter-penetration will not look good if your rigid bodies are moving at higher velocities (you will see momentary jerking motions), although as a first step, you should try that and see if it suits your requirements.&#xD;&#xA;&#xD;&#xA;A `penalty force` is applied like a spring-damper, where the penalty force is increased the more you have inter-penetrated the rigid body and is lessened in subsequent frames. Think of it as springs. When two rigid bodies inter-penetrate, they each encounter an invisible spring which dampens their progression (that is, prevents more inter-penetration) and applies the previously mentioned `penalty force` until the bodies are no longer penetrating.&#xD;&#xA;&#xD;&#xA;It is a broad topic but hopefully the above information will get you started." />
  <row Id="11798" PostHistoryTypeId="2" PostId="5929" RevisionGUID="52f5220f-e6d1-4ef1-8a82-c68881ea6cbe" CreationDate="2010-11-25T05:43:49.547" UserId="3576" Text="You could award badges for achievements. So each time the user finishes a games you could make calculations and let them know if the have been awarded a badge or are close to being awarded (eg: play again to qualify for a new badge!)&#xD;&#xA;&#xD;&#xA;Look at the badges on this site for some ideas. Some badge ideas&#xD;&#xA;&#xD;&#xA; - Beat your own high score for the day (week etc)&#xD;&#xA; - Beat your own high score 5 games in a row&#xD;&#xA; - Played 10 days consecutively&#xD;&#xA; - Highest score for the day (week etc)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11799" PostHistoryTypeId="2" PostId="5930" RevisionGUID="68062470-9707-4f39-a72a-1c9829424b5e" CreationDate="2010-11-25T05:50:16.387" UserId="3576" Text="If you don't trust your own music selection you could crowd source the selection.&#xD;&#xA;&#xD;&#xA;Maybe make a poll and/or post some where. It could be part of your marketing, &quot;vote for your chance to win a free copy of the software&quot;.&#xD;&#xA;" />
  <row Id="11800" PostHistoryTypeId="5" PostId="5930" RevisionGUID="d1fc9e77-079a-4b60-b053-70e89c1b5e3c" CreationDate="2010-11-25T06:02:51.017" UserId="3576" Comment="added 135 characters in body" Text="If you don't trust your own music taste you could crowd source the selection of music. &#xD;&#xA;&#xD;&#xA;Find a few free tracks from some of the sites Nailer suggested, do some filtering of the list through friends. With the short list make a poll and/or post some where. It could be part of your marketing, &quot;vote for your chance to win a free copy of the software&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11801" PostHistoryTypeId="2" PostId="5931" RevisionGUID="7703030a-2b82-4141-8db0-f79928948c19" CreationDate="2010-11-25T08:02:47.623" UserId="1931" Text="I could be misunderstanding, but it looks like you're asking two questions:&#xD;&#xA;1. what are some general ways of dealing with collision resolution &#xD;&#xA;the term you're looking for is 'impulse based simulation', and there are a bunch of papers that can do it better justice than I can. &#xD;&#xA;&#xD;&#xA;In summary you want to euler step your physics simulation in momentum space, which is mass times velocity (don't do things force based, your integrator isn't doing it right anyway).&#xD;&#xA;&#xD;&#xA;For angular response, luckily the greatest and least moments of inertia can always be reduced to two orthogonal axes (in 2D), which means a matrix multiply will work generally, and if you line these up with the X and Y axes, it turns into a 2D vector. &#xD;&#xA;&#xD;&#xA;When you have collision you figure out response based on the linear and angular moments at the point of collision, and a good fudge factor is, if you have interpenetration, to apply some penalty force (as mentioned above) to get the two bodies apart.&#xD;&#xA;&#xD;&#xA;From the point you'll end up adding more and more rules to control aberrant behavior, like capping maximum angular momentum so things don't spin like tops, etc., but this is a good start.&#xD;&#xA;&#xD;&#xA;Keep it simple if you can.&#xD;&#xA;&#xD;&#xA;2. How do you solve multi body collision problems&#xD;&#xA;&#xD;&#xA;The only real way to do this is with a system of linear equations and a lot of solving. The practical way to do it is have a system like the one above, and have the physics just naturally resolve over time.&#xD;&#xA;&#xD;&#xA;Most games that do things like rolling, or standing on moving surfaces, have a hybrid model where your feet are attached to a surface (or wheels to the road) to accomodate for the physics time stepping (which would result in interpenetration-response cycles and wouldn't work).&#xD;&#xA;&#xD;&#xA;Hope this helps. If you need any math examples, let me know." />
  <row Id="11802" PostHistoryTypeId="2" PostId="5932" RevisionGUID="bda76b7e-3267-47e3-87eb-67d8b3f09959" CreationDate="2010-11-25T08:11:51.607" UserId="1734" Text="Is there a visual script editing software tool in any game engine similar to [Visual3d][1] for  creating game behavior logic by non-programmers like designers?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://game-engine.visual3d.net/wiki/visual-script-editor-game-logic-and-behavior-diagrams" />
  <row Id="11803" PostHistoryTypeId="1" PostId="5932" RevisionGUID="bda76b7e-3267-47e3-87eb-67d8b3f09959" CreationDate="2010-11-25T08:11:51.607" UserId="1734" Text="Visual script editing software tool for creating game behavior logic" />
  <row Id="11804" PostHistoryTypeId="3" PostId="5932" RevisionGUID="bda76b7e-3267-47e3-87eb-67d8b3f09959" CreationDate="2010-11-25T08:11:51.607" UserId="1734" Text="&lt;engine&gt;&lt;tools&gt;&lt;scripting&gt;" />
  <row Id="11805" PostHistoryTypeId="2" PostId="5933" RevisionGUID="cf23c58a-64e5-4d3c-9024-ded512335a8e" CreationDate="2010-11-25T09:37:55.043" UserId="3282" Text="I know that this question depends really very much on plenty factors: 2D-Pong and a MMORPG are two totally different worlds; it also depends on creators' experience, on game quality, on the available technologies, on target platform and so on, but well, I guess we can categorize games and study the average (or maybe focus on real-world examples).&#xD;&#xA;&#xD;&#xA;How long, in **man-hour**, does it take on average to create a:&#xD;&#xA;&#xD;&#xA; - AAA MMORPG&#xD;&#xA;&#xD;&#xA; - AAA non-MMO game (like a RTS, an FPS etc, RPG)&#xD;&#xA;&#xD;&#xA; - Indie game&#xD;&#xA;&#xD;&#xA; - Game for mobiles&#xD;&#xA;&#xD;&#xA; - Amateur desktop game&#xD;&#xA;&#xD;&#xA;What phases can we split the game creation process in (story designing, writing the engine, creating art, testing ...) and how long would each of these take (for the above categories)?&#xD;&#xA;&#xD;&#xA;Examples of real games would be apprecciated!" />
  <row Id="11806" PostHistoryTypeId="1" PostId="5933" RevisionGUID="cf23c58a-64e5-4d3c-9024-ded512335a8e" CreationDate="2010-11-25T09:37:55.043" UserId="3282" Text="How long does it take to ceate a game?" />
  <row Id="11807" PostHistoryTypeId="3" PostId="5933" RevisionGUID="cf23c58a-64e5-4d3c-9024-ded512335a8e" CreationDate="2010-11-25T09:37:55.043" UserId="3282" Text="&lt;development-speed&gt;" />
  <row Id="11808" PostHistoryTypeId="2" PostId="5934" RevisionGUID="58a75ec3-5470-4962-a4f5-da5c813dd97e" CreationDate="2010-11-25T09:50:43.110" UserId="364" Text="You'll have to define AAA. For some people it's a budget scale definition, to others it's a team scale definition, to others it's a art-resources quality scale definition.&#xD;&#xA;Anyway, your question is too broad.&#xD;&#xA;&#xD;&#xA;Let's choose indie games. The variety of different games (that are often their own type) is bigger than in the industry  and it's a lot more than most people even can imagine. &#xD;&#xA;&#xD;&#xA;How to answer your question knowing that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyway what you're asking for is more related to the alchemy between those factors : &#xD;&#xA;&#xD;&#xA; - Budget (to use to modify the other factors)&#xD;&#xA; - Target deadline &#xD;&#xA; - Team experience&#xD;&#xA; - Team size&#xD;&#xA; - Features count&#xD;&#xA; - Features complexity&#xD;&#xA; - Platform constraints&#xD;&#xA;&#xD;&#xA;For examples on time taken to make games (published or not) I recommend searching for Post-Mortem articles on http://gamasutra.com - lot of wisdom and feedback there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11809" PostHistoryTypeId="2" PostId="5935" RevisionGUID="6cffebef-27d5-473f-a445-5b22d0b5f027" CreationDate="2010-11-25T10:47:28.010" UserId="3579" Text="I want to make a plugin for FSX in C/C++ but all the examples and documentation forward to the SimConnect Examples for FSX. &#xD;&#xA;&#xD;&#xA;I want to access USB-hardware from the plugin and for this reason I'm looking for a way to write a plugin in C/C++ which does not rely on the SimConnect interface." />
  <row Id="11810" PostHistoryTypeId="1" PostId="5935" RevisionGUID="6cffebef-27d5-473f-a445-5b22d0b5f027" CreationDate="2010-11-25T10:47:28.010" UserId="3579" Text="Where can I find documentation or an example of a C/C++ Plugin for FSX " />
  <row Id="11811" PostHistoryTypeId="3" PostId="5935" RevisionGUID="6cffebef-27d5-473f-a445-5b22d0b5f027" CreationDate="2010-11-25T10:47:28.010" UserId="3579" Text="&lt;simulations&gt;" />
  <row Id="11812" PostHistoryTypeId="2" PostId="5936" RevisionGUID="9b339f23-f64d-43aa-a633-77e4b99341e6" CreationDate="2010-11-25T11:46:55.473" UserId="452" Text="In my general experience, this is what companies will allocate, based on how much profit they expect to make:&#xD;&#xA;&#xD;&#xA;* AAA game - 2 years, 5-10 programmers, 10-20 artists, 3-6 designers&#xD;&#xA;* Regular mmo/fps clone, respectful console game - 1 year, 3-6 programmers, 5-10 artists, 2-3 designers&#xD;&#xA;* Console shovelware/live arcade/home/etc - 6 months, 2-3 programmers, 3-5 artists, 1-2 designers&#xD;&#xA;* Mobile/web shovelware - 3 months, 1 programmer, 2-3 artists, half a designer (part-time)&#xD;&#xA;&#xD;&#xA;Keep in mind these are very ballpark." />
  <row Id="11813" PostHistoryTypeId="2" PostId="5937" RevisionGUID="7df4a13a-e089-49b1-af7e-c438d3121123" CreationDate="2010-11-25T12:12:50.197" UserId="824" Text="You can check out the source for the game I made for PyWeek, &quot;Bouncy 2&quot;. I'm sure there are better/more efficient solutions but it worked quite well for us.&#xD;&#xA;&#xD;&#xA;http://www.pyweek.org/e/Bouncy2/&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=UsUa0LGHxbM" />
  <row Id="11815" PostHistoryTypeId="2" PostId="5938" RevisionGUID="9d1cf157-d136-4205-a2f7-7aac77bd7337" CreationDate="2010-11-25T13:31:22.503" UserId="1742" Text="I've used angel code's bitmap font generator quite a bit and though it's very good, I wondered if there would be a way of using the hinting information to provide a better readable result by using hinting to provide differing thickness based on size/pixel coverage.&#xD;&#xA;&#xD;&#xA;I imagine any solution would have to use the distance field tech presented in the valve paper on smoothing fonts while maintaining or reducing asset size. ([http://www.gamedev.net/community/forums/topic.asp?topic_id=494612][1]) but I haven't found any demos of it being used with hinting information turned on or included in the field gradients in any way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/community/forums/topic.asp?topic_id=494612" />
  <row Id="11816" PostHistoryTypeId="1" PostId="5938" RevisionGUID="9d1cf157-d136-4205-a2f7-7aac77bd7337" CreationDate="2010-11-25T13:31:22.503" UserId="1742" Text="Are there any font rendering libraries for games development that support hinting?" />
  <row Id="11817" PostHistoryTypeId="3" PostId="5938" RevisionGUID="9d1cf157-d136-4205-a2f7-7aac77bd7337" CreationDate="2010-11-25T13:31:22.503" UserId="1742" Text="&lt;rendering&gt;&lt;fonts&gt;&lt;techniques&gt;" />
  <row Id="11818" PostHistoryTypeId="2" PostId="5939" RevisionGUID="9e396c08-66c2-402f-b973-16e838ce6c3a" CreationDate="2010-11-25T13:34:42.280" UserId="1742" Text="I've been happy using bitmap fonts for games so far, but now I find I really need the polygon edge in some form. I saw the freetype engine some time ago, which can provide rastering of truetype fonts from within your engine, but what I think I really want for my current project is some way of converting from truetype to a triangle mesh.&#xD;&#xA;" />
  <row Id="11819" PostHistoryTypeId="1" PostId="5939" RevisionGUID="9e396c08-66c2-402f-b973-16e838ce6c3a" CreationDate="2010-11-25T13:34:42.280" UserId="1742" Text="Font to polygon or triangle mesh" />
  <row Id="11820" PostHistoryTypeId="3" PostId="5939" RevisionGUID="9e396c08-66c2-402f-b973-16e838ce6c3a" CreationDate="2010-11-25T13:34:42.280" UserId="1742" Text="&lt;3d-meshes&gt;&lt;fonts&gt;" />
  <row Id="11821" PostHistoryTypeId="2" PostId="5940" RevisionGUID="80f06963-6dae-4b09-8c86-b10533969cf1" CreationDate="2010-11-25T13:53:54.240" UserId="3461" Text="i don't really know the exact term for that (i thought it was hdr but no...).&#xD;&#xA;&#xD;&#xA;i want to put a texture as a background in opengl-es , and when we rotate the view , the background rotate too (obviously) but when there is translation , the background doesn't change.&#xD;&#xA;&#xD;&#xA;like if i was inside a sphere and the texture are stick to it. &#xD;&#xA;&#xD;&#xA;(and i don't think the sphere idea is the best way to do it).&#xD;&#xA;&#xD;&#xA;I have certainly not explained the problem correctly , I'm sorry for that and thanks a lot if you understand me (even more if you have the answer :p)" />
  <row Id="11822" PostHistoryTypeId="1" PostId="5940" RevisionGUID="80f06963-6dae-4b09-8c86-b10533969cf1" CreationDate="2010-11-25T13:53:54.240" UserId="3461" Text="how to apply a texture to a 3d scene background ?" />
  <row Id="11823" PostHistoryTypeId="3" PostId="5940" RevisionGUID="80f06963-6dae-4b09-8c86-b10533969cf1" CreationDate="2010-11-25T13:53:54.240" UserId="3461" Text="&lt;opengl-es&gt;" />
  <row Id="11824" PostHistoryTypeId="2" PostId="5941" RevisionGUID="5b01917b-1718-4206-a86c-68ad4b22eb07" CreationDate="2010-11-25T14:38:21.317" UserId="3559" Text="I guess you mean some sort of a environment map, skybox, environment sphere, cubemap.&#xD;&#xA;&#xD;&#xA;Simplest way would be to make a big low-poly sphere (or a segment of it, depending on view area restrictions), face its polygons inside and attach to camera position, so wherever your camera is going the sphere will remain around it. And map texture to this sphere." />
  <row Id="11825" PostHistoryTypeId="2" PostId="5942" RevisionGUID="62dbd07a-be26-472a-8209-612b22562189" CreationDate="2010-11-25T14:45:04.563" UserId="1743" Text="Followup to [securing-http-data-from-a-javascript-game-to-server][1].&#xD;&#xA;&#xD;&#xA;I'm working on something similar, in that I have a PHP backend and a JavaScript frontend, which plays around with the HTML5 canvas element for drawing.&#xD;&#xA;&#xD;&#xA;There will be some heavy client-server communication required, as the player will get timely updates from the server with regards to actions that other players are taking.  In turn, the client will update the server with his actions that have been taken.&#xD;&#xA;&#xD;&#xA;My question is what is the best way to secure such data?  Since the client is basically JavaScript, what are some good ways to secure my game data / game states from being tampered with.&#xD;&#xA;&#xD;&#xA;I had a thought (spurred by answers to the previous question), about generating a hash based on the currently active session, storing that in a game state database, and validating it server-side.  However, I would imagine that any data sent back to the server via AJAX can be scrubbed for any key that I send back.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4851/securing-http-data-from-a-javascript-game-to-server" />
  <row Id="11826" PostHistoryTypeId="1" PostId="5942" RevisionGUID="62dbd07a-be26-472a-8209-612b22562189" CreationDate="2010-11-25T14:45:04.563" UserId="1743" Text="Securing JavaScript / PHP game data" />
  <row Id="11827" PostHistoryTypeId="3" PostId="5942" RevisionGUID="62dbd07a-be26-472a-8209-612b22562189" CreationDate="2010-11-25T14:45:04.563" UserId="1743" Text="&lt;javascript&gt;&lt;client-server&gt;&lt;security&gt;&lt;php&gt;" />
  <row Id="11828" PostHistoryTypeId="2" PostId="5943" RevisionGUID="f7f350ef-cb4b-4a3f-ac92-98945390b376" CreationDate="2010-11-25T14:52:39.537" UserId="2188" Text="about knowing other players' data:&#xD;&#xA;&#xD;&#xA;The only *real* way to prevent the client from knowing something, is not telling it to him.&#xD;&#xA;&#xD;&#xA;**\*ANY\*** other kind of doing it will be breakable with a variable amount of effort, depending on how strong your system is.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;about user's own data:&#xD;&#xA;&#xD;&#xA;Anything you need to store, you need to store it on the server: anything that comes from the client are lies.&#xD;&#xA;&#xD;&#xA;When the client does something, the server should immediately check if he can do it, and allow him to do it if he can. Save the result on the server if you need to later know what happened. The client should never be authoritative about pretty much anything other than what he would like to do." />
  <row Id="11829" PostHistoryTypeId="2" PostId="5944" RevisionGUID="95e9c7ba-0c9b-4514-97b8-b9d4b0a7889b" CreationDate="2010-11-25T14:53:56.883" UserId="3015" Text="Don't trust the client.&#xD;&#xA;&#xD;&#xA;It's as simple as that. Any safeguard you can put in place can be broken; and truly safe methods are impossible within the scope of JavaScript.&#xD;&#xA;&#xD;&#xA;The best approach is to only trust the client with drawing what you send it and *retrieving* user input. Giving it anything more is just asking for trouble.&#xD;&#xA;&#xD;&#xA;Any information you send to your client should be considered compromised, and any information you receive from your client should be considered a potential attack." />
  <row Id="11830" PostHistoryTypeId="2" PostId="5945" RevisionGUID="34e3b7e2-ff9f-4249-a413-8cd4ae0aacc1" CreationDate="2010-11-25T14:58:55.223" UserId="744" Text="&lt;a href=&quot;http://homepages.paradise.net.nz/henryj/code/&quot;&gt;I think you want FTGL&lt;/a&gt;, which can convert font outlines to meshes and extruded meshes, among other formats. I don't know if it only generates triangle meshes; you might need to run a triangulation algorithm on the output." />
  <row Id="11831" PostHistoryTypeId="2" PostId="5946" RevisionGUID="def2943d-c280-4c97-84c4-444b94aba4a4" CreationDate="2010-11-25T17:32:53.520" UserId="2771" Text="How can I implement a 2D explosion in a way that it will cause less damage to characters that hide behind crates or other cover? Ideally damage will depend on the strength of the cover (e.g. metal wall will protect better then wooden crate). Ideally damage will decrease with distance as well.&#xD;&#xA;&#xD;&#xA;I am going to use a port of Box2D physics engine - Farseer.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="11832" PostHistoryTypeId="1" PostId="5946" RevisionGUID="def2943d-c280-4c97-84c4-444b94aba4a4" CreationDate="2010-11-25T17:32:53.520" UserId="2771" Text="How to implement 2d explosions that will cause damage taking into account covers and distance?" />
  <row Id="11833" PostHistoryTypeId="3" PostId="5946" RevisionGUID="def2943d-c280-4c97-84c4-444b94aba4a4" CreationDate="2010-11-25T17:32:53.520" UserId="2771" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="11834" PostHistoryTypeId="2" PostId="5947" RevisionGUID="5bba9890-403d-4d05-ae40-7466531631fb" CreationDate="2010-11-25T18:34:37.987" UserId="3294" Text="There can't be any anwser.&#xD;&#xA;&#xD;&#xA;It's a bit like saying how much time it will take to build a house, without knowing what type of house, how big it is, who will live in it, who will built it, in which country you are, ect...&#xD;&#xA;&#xD;&#xA;The best thing you can do is to analyse the project, split it into small component and analyse the time it will take for each component." />
  <row Id="11835" PostHistoryTypeId="2" PostId="5948" RevisionGUID="09a0f89d-ce34-4bdc-a5a6-e656363c7b7d" CreationDate="2010-11-25T19:05:19.737" UserId="3015" Text="One relatively simplistic way of doing this is to draw a ray from the center of the explosion to the center of every entity where `DISTANCE(explosion,entity) &lt; exlosion.max_radius` (pseudo-code).&#xD;&#xA;&#xD;&#xA;For each entity, follow this ray, decreasing base damage as you go. Whenever you hit an object subtract it's cover value from the damage (essentially shortening the ray).&#xD;&#xA;&#xD;&#xA;When the ray hits the entity, whatever damage is left is your explosion damage.&#xD;&#xA;&#xD;&#xA;For this approach, you probably want a pretty high base damage that decreases rapidly with distance (inversely proportional to the square of the distance should do nicely).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Another approach is to draw a sector fully containing the entity; but no wider; and all the way out to `.max_radius`. Subtract from the area of this sector the area covered by any cover between the explosion and the entity, multiplied by its cover value. The remaining area is your blast damage.&#xD;&#xA;&#xD;&#xA;One neat side effect of this is that the closer the entity is to the explosion, the wider the sector gets, and the more damage you take (as you count all of the area of the sector, and just subtract the  area of cover between the entity and explosion.&#xD;&#xA;&#xD;&#xA;It could also be useful to treat cover as entities; and simply subtract damage taken by closer entities from those further out, but that might get gnarly.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;There undoubtedly exists an even more elegant and clever approach, but it probably requires some pretty nasty calculus. It always does.&#xD;&#xA;" />
  <row Id="11836" PostHistoryTypeId="2" PostId="5949" RevisionGUID="fc4c7ee3-46a9-4e40-8a77-746da7bd308c" CreationDate="2010-11-25T19:20:01.530" UserId="229" Text="Daniel Codicek covers this topic in great detail in his book, [Mathematics &amp; Physics for Programmers][1].&#xD;&#xA;&#xD;&#xA;Codicek does two things to achieve natural-looking collision resolution:&#xD;&#xA;&#xD;&#xA; - His collision detection function calculates the exact time two objects will collide.&#xD;&#xA; - He recalculates new velocities at the time of collision, so objects never overlap.&#xD;&#xA;&#xD;&#xA;I uploaded a [demo based on Codicek's collision detection and resolution][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Second-Kodicek/dp/1435457331/ref=dp_ob_title_bk&#xD;&#xA;  [2]: http://coolcases.com/asteroids/" />
  <row Id="11837" PostHistoryTypeId="2" PostId="5950" RevisionGUID="d48f01da-ed95-41f2-b954-57cfd9e56be3" CreationDate="2010-11-25T19:23:16.300" UserId="3455" Text="Damage decreasing with distance should be a simple task. When you create the explosion you should know the coordinates of the centre of the explosion. Since you are working in 2d, it will be just x and y.&#xD;&#xA;&#xD;&#xA;All you need to do is calculate the player(s) distances from the coordinates of the centre of the explosion using Pythagoras' theorem then use that against the max radius to calculate a percentage of the total damage.&#xD;&#xA;&#xD;&#xA;For example, take the coordinates (x1,y1) as the centre point of the expliosion, and  (x2,y2) as the coordinates of the player. We can then calculate the damage taken as follows:&#xD;&#xA;&#xD;&#xA;    Distance from centre = sqrt((x2-x1)² + (y2-y1)²)&#xD;&#xA;    Damage taken = (Distance from centre/Explosion radius) * max damage &#xD;&#xA;&#xD;&#xA;As for things in the way, I'm too tired to think of the answer, but you'd basically be looking for intersections along the line from the centre of the explosion to the player." />
  <row Id="11838" PostHistoryTypeId="5" PostId="5949" RevisionGUID="c4d3c035-b54a-44fc-87ff-f0319d0bc9a3" CreationDate="2010-11-25T19:26:57.253" UserId="229" Comment="added 386 characters in body" Text="Daniel Codicek covers this topic in great detail in his book, [Mathematics &amp; Physics for Programmers][1].&#xD;&#xA;&#xD;&#xA;Codicek does two things to achieve natural-looking collision resolution:&#xD;&#xA;&#xD;&#xA; - His collision detection function calculates the exact time two objects will collide.&#xD;&#xA; - He recalculates new velocities at the time of collision, so objects never overlap.&#xD;&#xA;&#xD;&#xA;I uploaded a [demo based on Codicek's collision detection and resolution][2].&#xD;&#xA;&#xD;&#xA;**update:** Here's a [collision detection &amp; resolution algorithm][3] that is very similar to Codicek's method. With [source code][4]. I still recommend Codicek's book, as his algorithm is implemented slightly differently and much more thoroughly explained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Second-Kodicek/dp/1435457331/ref=dp_ob_title_bk&#xD;&#xA;  [2]: http://coolcases.com/asteroids/&#xD;&#xA;  [3]: http://www.plasmaphysics.org.uk/print/collision2d.htm&#xD;&#xA;  [4]: http://www.plasmaphysics.org.uk/programs/coll2d_cpp.htm" />
  <row Id="11839" PostHistoryTypeId="2" PostId="5951" RevisionGUID="c4ee5129-c5c7-414a-892e-66637d997f71" CreationDate="2010-11-25T19:30:27.537" UserId="3455" Text="I would make the server code validate any information sent by the clients.&#xD;&#xA;&#xD;&#xA;For example, if a player can only move 5 px per turn, then if the server receives a request to move more than that, it should either reject it or move the player the maximum amount in the intended direction.&#xD;&#xA;&#xD;&#xA;Basically, just prevent the client from having full control to do whatever it likes, and limit it to only the actions you want it to perform.&#xD;&#xA;&#xD;&#xA;Having said that, you can never make it 100% secure, if someone hacks the webserver and modifies the server code, that's not your fault (unless you're also responsible for security at the data centre!) So make it clear to the client that you can't be held responsible for all eventualities!" />
  <row Id="11840" PostHistoryTypeId="5" PostId="5938" RevisionGUID="8c113eec-da10-4edc-af6d-de197213e25b" CreationDate="2010-11-25T19:34:06.583" UserId="1742" Comment="added 344 characters in body" Text="I've used angel code's bitmap font generator quite a bit and though it's very good, I wondered if there would be a way of using the hinting information to provide a better readable result by using hinting to provide differing thickness based on size/pixel coverage.&#xD;&#xA;&#xD;&#xA;I imagine any solution would have to use the distance field tech presented in the valve paper on smoothing fonts while maintaining or reducing asset size. ([http://www.gamedev.net/community/forums/topic.asp?topic_id=494612][1]) but I haven't found any demos of it being used with hinting information turned on or included in the field gradients in any way.&#xD;&#xA;&#xD;&#xA;Another way of looking at this is whether there are any font bitmap generators that will output mipmaps that still maintain their readability in the face of pixel size. I think the lower mip levels would try to guarantee fill and space where it is necessary to maintain readability/topology over maintaining style/form (the point of hinting).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/community/forums/topic.asp?topic_id=494612" />
  <row Id="11841" PostHistoryTypeId="10" PostId="5933" RevisionGUID="6135e177-c3fd-49c6-a6fb-899f236257dd" CreationDate="2010-11-25T19:38:42.690" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="11842" PostHistoryTypeId="2" PostId="5952" RevisionGUID="32d5be36-3c10-4340-b712-1dab3ed01eb0" CreationDate="2010-11-25T19:41:08.553" UserId="51" Text="The obvious answer is &lt;a href=&quot;http://udkc.info/index.php?title=Tutorials:Introduction_to_Kismet&quot;&gt;kismet&lt;/a&gt; in Unreal engine." />
  <row Id="11843" PostHistoryTypeId="2" PostId="5953" RevisionGUID="71d66263-4565-4772-9bee-11d900ea6615" CreationDate="2010-11-25T20:03:59.903" UserId="3536" Text="Does anyone have a sample for drawing a subdivided icosahedron in javascript, that they would be able to share?" />
  <row Id="11844" PostHistoryTypeId="1" PostId="5953" RevisionGUID="71d66263-4565-4772-9bee-11d900ea6615" CreationDate="2010-11-25T20:03:59.903" UserId="3536" Text="Does anyone have a sample for drawing a subdivided icosahedron in javascript, that they would be able to share?" />
  <row Id="11845" PostHistoryTypeId="3" PostId="5953" RevisionGUID="71d66263-4565-4772-9bee-11d900ea6615" CreationDate="2010-11-25T20:03:59.903" UserId="3536" Text="&lt;webgl&gt;" />
  <row Id="11846" PostHistoryTypeId="2" PostId="5954" RevisionGUID="09d9e242-7bff-4f2d-90d7-199646577f27" CreationDate="2010-11-25T20:06:27.067" UserId="51" Text="You could probably find some code off of this SO question: http://stackoverflow.com/questions/561093/how-to-generate-a-subdivided-icosahedron and do the conversion to JS yourself." />
  <row Id="11847" PostHistoryTypeId="2" PostId="5955" RevisionGUID="3b189dab-8ce4-4058-8c74-f5ca1af878f4" CreationDate="2010-11-25T21:06:47.093" UserId="744" Text="My only _good_ suggestion is to try making the thresholds in the distance field technique a function of the desired character size or (somewhat equivalently) the ratio between the rendered size and the desired size. (I think this is mathematically equivalent to applying a non-linear filter scale.) That would drastically increase the cost of the fragment shader (though maybe not significantly in a real program), and you'd end up duplicating non-trivial code if you also wanted a fixed-function path.&#xD;&#xA;&#xD;&#xA;Another possibility would be to average the distance field across many font sizes while generating it, which would get you the hinting information &quot;in&quot; the texture. However, usually the distance fields store between 32px and 64px per character. The cases where manual hinting truly benefits is at small (8-16px) font sizes. I don't know how much meaningful information there is to get from averaging something intended for ~8px with something intended for ~256px and storing it in ~32px.&#xD;&#xA;&#xD;&#xA;Any other techniques I can think of require more memory, at which point you're really better off just rendering the fonts in the size you want, and using them as-is." />
  <row Id="11848" PostHistoryTypeId="5" PostId="5955" RevisionGUID="530ecc34-c90d-4297-ab3c-a476c0ff9502" CreationDate="2010-11-25T21:21:45.457" UserId="744" Comment="added 7 characters in body" Text="My only _good_ suggestion is to try making the thresholds in the distance field technique a function of the desired character size or (somewhat equivalently) the ratio between the rendered size and the desired size. (I think this is mathematically equivalent to applying a non-linear filter when scaling.) That would drastically increase the cost of the fragment shader (though maybe not significantly in a real program), and you'd end up duplicating non-trivial code if you also wanted a fixed-function path.&#xD;&#xA;&#xD;&#xA;Another possibility would be to average the distance field across many font sizes while generating it, which would get you the hinting information &quot;in&quot; the texture. However, usually the distance fields store between 32px and 64px per character. The cases where manual hinting truly benefits is at small (8-16px) font sizes. I don't know how much meaningful information there is to get from averaging something intended for ~8px with something intended for ~256px and storing it in ~32px.&#xD;&#xA;&#xD;&#xA;Any other techniques I can think of require more memory, at which point you're really better off just rendering the fonts in the size you want, and using them as-is." />
  <row Id="11849" PostHistoryTypeId="2" PostId="5956" RevisionGUID="72d568ed-4018-4f63-aac5-ac041967fc8d" CreationDate="2010-11-25T22:47:03.183" UserId="1386" Text="I believe it's a common requirement of MMOs that processing for a single shard or realm can be done over several servers to ease the load. I'm curious as to how this can be done whilst maintaining a unified consistent world where all the players, and all the NPCs can interact.&#xD;&#xA;&#xD;&#xA;**My question is how is load balancing achieved in MMOs?**&#xD;&#xA;&#xD;&#xA;Any links, books or general information on how to improve my knowledge on this subject is also appreciated." />
  <row Id="11850" PostHistoryTypeId="1" PostId="5956" RevisionGUID="72d568ed-4018-4f63-aac5-ac041967fc8d" CreationDate="2010-11-25T22:47:03.183" UserId="1386" Text="How is load balancing achieved in MMOs?" />
  <row Id="11851" PostHistoryTypeId="3" PostId="5956" RevisionGUID="72d568ed-4018-4f63-aac5-ac041967fc8d" CreationDate="2010-11-25T22:47:03.183" UserId="1386" Text="&lt;mmo&gt;&lt;synchronization&gt;&lt;scalability&gt;" />
  <row Id="11852" PostHistoryTypeId="5" PostId="5949" RevisionGUID="3b580ace-53a0-4f42-ac11-a7fd180e045a" CreationDate="2010-11-25T23:38:24.603" UserId="229" Comment="edited body" Text="Daniel Codicek covers this topic in great detail in his book, [Mathematics &amp; Physics for Programmers][1].&#xD;&#xA;&#xD;&#xA;Kodicek does two things to achieve natural-looking collision resolution:&#xD;&#xA;&#xD;&#xA; - His collision detection function calculates the exact time two objects will collide.&#xD;&#xA; - He recalculates new velocities at the time of collision, so objects never overlap.&#xD;&#xA;&#xD;&#xA;I uploaded a [demo based on Kodicek's collision detection and resolution][2].&#xD;&#xA;&#xD;&#xA;**update:** Here's a [collision detection &amp; resolution algorithm][3] that is very similar to Kodicek's method. With [source code][4]. I still recommend Kodicek's book, as his algorithm is implemented slightly differently and much more thoroughly explained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Second-Kodicek/dp/1435457331/ref=dp_ob_title_bk&#xD;&#xA;  [2]: http://coolcases.com/asteroids/&#xD;&#xA;  [3]: http://www.plasmaphysics.org.uk/print/collision2d.htm&#xD;&#xA;  [4]: http://www.plasmaphysics.org.uk/programs/coll2d_cpp.htm" />
  <row Id="11853" PostHistoryTypeId="2" PostId="5957" RevisionGUID="c17b9433-735f-42c2-8ac4-0e6f4439f99b" CreationDate="2010-11-25T23:59:55.997" UserId="2287" Text="There are three ways to do this:&#xD;&#xA;&#xD;&#xA; - Sky box&#xD;&#xA; - Sky dome&#xD;&#xA; - Sky plane&#xD;&#xA;&#xD;&#xA;With a `sky box`, you have a giant box that is surrounding your scene. This will make it seem as if you are in a 'box'. With a `sky dome`, you have the same box, but this time the projection of the texture onto the cube is spherical. Problem with this technique is that the projection does not cover the bottom of the cube (which is not a problem in most cases). You can also go with a literal dome, that is, a sphere (which Kromster suggested), although it comes with its own share of problems (pinch points). Then there is the `sky plane` where only one (very large) plane is rendered. The drawback here is that you will see the horizon, so you can only use this technique in closed areas. &#xD;&#xA;&#xD;&#xA;As for keeping the sky where it is when you move etc. Kromster suggestion is correct. You will want to, however, make sure that all your objects are rendered on top of the sky. This is very easy to do, simply render your sky first, then without swapping buffers, render your scene. &#xD;&#xA;&#xD;&#xA;&gt; **NOTE:** All the sky types have their polygon normals inverted. So if you have a box or a sphere mesh, invert the normals otherwise you will not see anything.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11854" PostHistoryTypeId="5" PostId="5949" RevisionGUID="58c9a92d-d6ff-43a0-9359-41dcd292cf14" CreationDate="2010-11-26T00:15:28.500" UserId="229" Comment="edited body" Text="Daniel Kodicek covers this topic in great detail in his book, [Mathematics &amp; Physics for Programmers][1].&#xD;&#xA;&#xD;&#xA;Kodicek does two things to achieve natural-looking collision resolution:&#xD;&#xA;&#xD;&#xA; - His collision detection function calculates the exact time two objects will collide.&#xD;&#xA; - He recalculates new velocities at the time of collision, so objects never overlap.&#xD;&#xA;&#xD;&#xA;I uploaded a [demo based on Kodicek's collision detection and resolution][2].&#xD;&#xA;&#xD;&#xA;**update:** Here's a [collision detection &amp; resolution algorithm][3] that is very similar to Kodicek's method. With [source code][4]. I still recommend Kodicek's book, as his algorithm is implemented slightly differently and much more thoroughly explained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Second-Kodicek/dp/1435457331/ref=dp_ob_title_bk&#xD;&#xA;  [2]: http://coolcases.com/asteroids/&#xD;&#xA;  [3]: http://www.plasmaphysics.org.uk/print/collision2d.htm&#xD;&#xA;  [4]: http://www.plasmaphysics.org.uk/programs/coll2d_cpp.htm" />
  <row Id="11855" PostHistoryTypeId="2" PostId="5958" RevisionGUID="03a714de-2a76-4859-b995-aef7ad9b3961" CreationDate="2010-11-26T01:17:34.260" UserId="3592" Text="It's called http://soundcloud.com" />
  <row Id="11856" PostHistoryTypeId="2" PostId="5959" RevisionGUID="5915c9ce-afb9-4b98-af30-b0eb437f0237" CreationDate="2010-11-26T02:05:12.330" UserId="3128" Text="In opengl how do I render 2d sprites in opengl given that I have a png of the sprite? See images as an example of the effect I'd like to achieve. Also I would like to overlay weapons on the screen like the rifle in the bottom image. Does anyone know how I would achieve the two effects? Any help is greatly achieved.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/6Ak1A.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/8Nd0o.gif" />
  <row Id="11857" PostHistoryTypeId="1" PostId="5959" RevisionGUID="5915c9ce-afb9-4b98-af30-b0eb437f0237" CreationDate="2010-11-26T02:05:12.330" UserId="3128" Text="Rendering 2d sprites into a 3d world?" />
  <row Id="11858" PostHistoryTypeId="3" PostId="5959" RevisionGUID="5915c9ce-afb9-4b98-af30-b0eb437f0237" CreationDate="2010-11-26T02:05:12.330" UserId="3128" Text="&lt;graphics&gt;&lt;opengl&gt;&lt;iphone&gt;&lt;opengl-es&gt;&lt;webgl&gt;" />
  <row Id="11859" PostHistoryTypeId="2" PostId="5960" RevisionGUID="91c3a3ff-0307-47fb-9060-52422b174c38" CreationDate="2010-11-26T02:30:53.243" UserId="2345" Text="What you are looking for is called a billboard or projective sprite. A billboard is basically a quad that always faces the camera. If you don't need it to always face the camera then the code/math will be much simpler.&#xD;&#xA;&#xD;&#xA;You can read more about them here: &#xD;&#xA;&#xD;&#xA;[http://www.flipcode.com/archives/Billboarding-Excerpt_From_iReal-Time_Renderingi_2E.shtml][1]&#xD;&#xA;[http://nehe.gamedev.net/data/articles/article.asp?article=19][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Billboarding-Excerpt_From_iReal-Time_Renderingi_2E.shtml&#xD;&#xA;  [2]: http://nehe.gamedev.net/data/articles/article.asp?article=19" />
  <row Id="11860" PostHistoryTypeId="5" PostId="5960" RevisionGUID="321d7b71-1354-4b08-93c6-e6d376363382" CreationDate="2010-11-26T02:38:52.533" UserId="2345" Comment="added 148 characters in body; added 4 characters in body; added 18 characters in body" Text="What you are looking for is called a billboard or projective sprite. A billboard is basically a quad that always faces the camera. If you don't need it to always face the camera then the code/math will be much simpler.&#xD;&#xA;&#xD;&#xA;You can read more about how to implement them here: &#xD;&#xA;&#xD;&#xA;[http://www.lighthouse3d.com/opengl/billboarding/index.php3?billCyl][1]&#xD;&#xA;&#xD;&#xA;[http://nehe.gamedev.net/data/articles/article.asp?article=19][2] &#xD;&#xA;&#xD;&#xA;[http://www.flipcode.com/archives/Billboarding-Excerpt_From_iReal-Time_Renderingi_2E.shtml][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lighthouse3d.com/opengl/billboarding/index.php3?billCyl&#xD;&#xA;  [2]: http://nehe.gamedev.net/data/articles/article.asp?article=19&#xD;&#xA;  [3]: http://www.flipcode.com/archives/Billboarding-Excerpt_From_iReal-Time_Renderingi_2E.shtml" />
  <row Id="11864" PostHistoryTypeId="2" PostId="5962" RevisionGUID="c7c4d6fa-2b1a-4b45-b4c7-c6824e89014f" CreationDate="2010-11-26T02:44:02.190" UserId="919" Text="Here are the specs so far to give you an idea to the question.&#xD;&#xA;&#xD;&#xA;- should be fully automate-able&#xD;&#xA;- should not inconvenience the player with regards to time&#xD;&#xA;- should allow for a voted wild card system&#xD;&#xA;- should involve skill&#xD;&#xA;- will be done on a limited time frame&#xD;&#xA;&#xD;&#xA;Was thinking of using a ladder like system similar to battle net 2.0 but it would seem to need some tweaking to meet all of the above.&#xD;&#xA;&#xD;&#xA;Any suggestions on what would be an ideal tournament implementation for such requirements? " />
  <row Id="11865" PostHistoryTypeId="1" PostId="5962" RevisionGUID="c7c4d6fa-2b1a-4b45-b4c7-c6824e89014f" CreationDate="2010-11-26T02:44:02.190" UserId="919" Text="What is the best implementation of an automated tournament ? " />
  <row Id="11866" PostHistoryTypeId="3" PostId="5962" RevisionGUID="c7c4d6fa-2b1a-4b45-b4c7-c6824e89014f" CreationDate="2010-11-26T02:44:02.190" UserId="919" Text="&lt;game-design&gt;&lt;tournament&gt;" />
  <row Id="11868" PostHistoryTypeId="2" PostId="5963" RevisionGUID="ada3c68f-2096-405e-8f57-477daa5365bc" CreationDate="2010-11-26T03:46:56.143" UserId="2100" Text="I have a couple of .fx files from a [Shader-Based 2D Shadows][1] example. I want to utilize the same kind of technique with XNA 4.0's Reach profile, which if I understand correctly needs to have HLSL 2.0 shaders. I am not familiar with shaders, so obviously I need to learn HLSL, but what I'm wondering right now is how to tell what shader code is 3.0 and what is 2.0, because I need to port those shaders to 2.0 and utilize them in my project. Can FX Composer be used to know such a thing?&#xD;&#xA;&#xD;&#xA;A sub-question - Is it possible that they would not perform well when ported to 2.0? If I want to utilize a similar effect to what is presented in the link, do I need to bump my project up to the HiDef profile and use HLSL 3.0, or should I be able to get away with 2.0?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/" />
  <row Id="11869" PostHistoryTypeId="1" PostId="5963" RevisionGUID="ada3c68f-2096-405e-8f57-477daa5365bc" CreationDate="2010-11-26T03:46:56.143" UserId="2100" Text="Porting an HLSL 3.0 shader to 2.0?" />
  <row Id="11870" PostHistoryTypeId="3" PostId="5963" RevisionGUID="ada3c68f-2096-405e-8f57-477daa5365bc" CreationDate="2010-11-26T03:46:56.143" UserId="2100" Text="&lt;graphics&gt;&lt;shaders&gt;&lt;xna-4.0&gt;&lt;hlsl&gt;" />
  <row Id="11871" PostHistoryTypeId="2" PostId="5964" RevisionGUID="137fbd47-1266-4c61-9dc4-bec462581947" CreationDate="2010-11-26T04:02:17.283" UserId="395" Text="Generally the world is divided up into a number of smaller regions. Each of these regions is usually an independent server process (WoW's world servers or Eve's Sol nodes) and can run on any of a number of machines. In some games there are explicit doors between maps (Eve, STO, Guild Wars) while others try to mask this more (WAR, Free Realms). Those that opt for the more seamless approach generally will detect when you are nearing the border between two servers and the two process negotiate a handoff. The best place to probably look for a description of this is in how cell towers do handoffs of moving handsets. If the load of a single map (Jita, Ironforge, Earth Space Dock) gets really big, you can sometimes offload individual functions to other servers (AI, certain parts of player management) but this either has to be built-in from the start or would take some serious retrofitting. It is almost always more cost effective to just buy better hardware to dedicate to those few maps." />
  <row Id="11872" PostHistoryTypeId="2" PostId="5965" RevisionGUID="e7cd39aa-2f43-49bb-abcd-5b158b84a509" CreationDate="2010-11-26T06:33:56.687" UserId="3559" Text="I can't comment on previous answers, but I would like to add to Williham Totlands answer.&#xD;&#xA;&#xD;&#xA;You can also take into account entities widths. The wider the object, the more damage it gets. And of course you can cast more rays to a wider objects to be sure if their full width is covered/non-covered by obstacles/walls/etc." />
  <row Id="11873" PostHistoryTypeId="2" PostId="5966" RevisionGUID="e4e64ca6-cae0-42bc-b972-2685e413e64f" CreationDate="2010-11-26T07:02:54.780" UserId="229" Text="Apparently Zynga is very good at generating user compulsion.&#xD;&#xA;&#xD;&#xA;Check out an analysis of their techniques [here][1]. (URL shortener used because stackexchange doesn't handle URL's with apostrophes very well. Goes to http://meidell.dk/archives/2010/11/25/what-i-learned-from-farmville-so-you-don’t-have-to-play-it/)&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/3JqOn" />
  <row Id="11874" PostHistoryTypeId="5" PostId="5966" RevisionGUID="78cc90a9-c7b7-4a23-ac24-5dfbc539f0da" CreationDate="2010-11-26T07:09:05.090" UserId="229" Comment="added 12 characters in body" Text="Apparently Zynga (Farmville) is very good at generating user compulsion.&#xD;&#xA;&#xD;&#xA;Check out an analysis of their techniques [here][1]. (URL shortener used because stackexchange doesn't handle URL's with apostrophes very well. Goes to http://meidell.dk/archives/2010/11/25/what-i-learned-from-farmville-so-you-don’t-have-to-play-it/)&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/3JqOn" />
  <row Id="11875" PostHistoryTypeId="5" PostId="5894" RevisionGUID="ce68b70c-5b57-44e7-ad66-475f814ee342" CreationDate="2010-11-26T07:12:40.703" UserId="3492" Comment="added 22 characters in body" Text="Flash for Android 2.1 Download:&#xD;&#xA;&#xD;&#xA;&gt; http://www.androidapk.net/?p=53&#xD;&#xA;&#xD;&#xA;A Comparison Between FlashLite 4 on Android 2.1 vs Flash 10.1 beta on Android 2.2 can seen here: &#xD;&#xA;&#xD;&#xA;&gt; http://www.dailymobile.se/2010/05/23/flash-lite-4-on-android-2-1-vs-flash-10-1-beta-on-android-2-2/&#xD;&#xA;&#xD;&#xA;How to install Flash Player 10.1 on Android 2.1: &#xD;&#xA;&#xD;&#xA;&gt; http://www.addictivetips.com/mobile/how-to-install-flash-10-1-on-android-2-1-eclair-devices/" />
  <row Id="11876" PostHistoryTypeId="2" PostId="5967" RevisionGUID="588cd94a-0a67-4ce7-8eda-33995c42df84" CreationDate="2010-11-26T07:53:20.827" UserId="450" Text="Try to keep this **as simple as possible** and interfaces well defined and documented. Maintaining and debugging a complex system in production easily turns into hell. So if there is a simple and a complex approach, think twice before you go with the complex one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Defining Services&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;I think the first step is to **identify services and their dependencies**: Static Content, Authentication, Local Chat, Global Chat Channels, Regional Chat Channels, Friend's List, Guilds, Bag/Inventory, Auction House, Global Map, World, ...&#xD;&#xA;&#xD;&#xA;Then for each of this services decided if the **client** may talk to them directly. For example it is pretty easy to let the client talk directly with the servers responsible for Global Chat Channels. The world servers don't have to be involved in chat messages at all. Regional Chat can be implemented in the same way, but the world servers have to tell the chat servers when players change regions. Again, they don't have to care about the messages.&#xD;&#xA;&#xD;&#xA;The third step is to think about **load balancing within a service**. For example global and regional chat channels can be split across multiple servers based on their name. It is probably a good idea to not hard code this split into the client, but provide a lookup service.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;World Servers&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;The most difficult part are usually the **world servers**, so I am starting with a simple approach. It is probably a good idea to let the client talk directly to the server responsible for the region he is in. So on login or region crossing the client has to be told to which server to connect to.&#xD;&#xA;&#xD;&#xA;The simple approach is to split the world into **independent regions**. With independent regions I mean that a player cannot look from one part into another and monsters cannot cross parts. Those regions are different from the regions player see based on the landscape and story of the outside world. Usually most monsters are in dungeons and players tend to accept that they have to walk through a gateway to enter a dungeon. Especially if those dungeons are instantiated on a per player group basis. Other examples on the outside world are different continents and valleys enclosed by high mountains.&#xD;&#xA;&#xD;&#xA;A **continuous world** approach gets complex really quickly, so it makes sense to plan it well: What information does the client need? Which information do the servers have to share? The player will mostly interact only with the objects (including monsters and NPCs) in the same region. You can cheat by placing objects out of click range from the zone border. This means that the client is mostly interested in read only information for neighboring zones. For these cases the zone servers don't have to coordinate anything except for the permission check that the player is close enough to connect to a neighboring zone.&#xD;&#xA;&#xD;&#xA;This leaves only a **very small number of difficult cases** in which objects or actions have to cross a server boarder. Which is a good thing because those cases such as arrows and spells are performance critical. It may be a good idea to split combat into attacking and defending. So the server of a spell-caster will define the attack parameters including the position of the caster. The server of the defender will get the message about the attack and calculate the impact. The server of the attacker does not need to know about the impact; the client will learn about it using his read only connection.&#xD;&#xA;&#xD;&#xA;Depending on how complex your player model is, it may take a couple of seconds to transfer it to another server (Second Life has a huge problem with this). The issue can be mitigated by **preparing the transfer** in advance when the player gets close to a virtual border. So that most of the player data is already cached on the destination server when the actual handover happens.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Summary&#xD;&#xA;-&#xD;&#xA;Divide the problem by defining different services that can be split across servers with little dependences. As next step look at how to do load balance within the critical services. Delegate balancing work to the client by instructing it to connect directly to the relevant servers (obviously the servers have to check permissions). Keep it as simple as possible, document the responsibilities of the various services and servers well, provide the option to enable debug output." />
  <row Id="11877" PostHistoryTypeId="5" PostId="5967" RevisionGUID="71b9e21c-85b3-4cc1-be19-25659eeefc2b" CreationDate="2010-11-26T08:00:21.993" UserId="450" Comment="added 234 characters in body" Text="Try to keep this **as simple as possible** and interfaces well defined and documented. Maintaining and debugging a complex system in production easily turns into hell. So if there is a simple and a complex approach, think twice before you go with the complex one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Defining Services&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;I think the first step is to **identify services and their dependencies**: Static Content, Authentication, Local Chat, Global Chat Channels, Regional Chat Channels, Friend's List, Guilds, Bag/Inventory, Auction House, Global Map, World, ...&#xD;&#xA;&#xD;&#xA;Then for each of these services decided if the **client** may talk to them directly. For example it is pretty easy to let the client talk directly with the servers responsible for Global Chat Channels. The world servers don't have to be involved in chat messages at all. Regional Chat can be implemented in the same way, but the world servers have to tell the chat servers when players change regions. Again, they don't have to care about the messages.&#xD;&#xA;&#xD;&#xA;The third step is to think about **load balancing within a service**. For example global and regional chat channels can be split across multiple servers based on their name. It is probably a good idea to not hard code this split into the client, but provide a lookup service.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;World Servers&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;The most difficult part are usually the **world servers**, so I am starting with a simple approach. It is probably a good idea to let the client talk directly to the server responsible for the region he is in. So on login or region crossing the client has to be told to which server to connect to.&#xD;&#xA;&#xD;&#xA;The simple approach is to split the world into **independent regions**. With independent regions I mean that a player cannot look from one part into another and monsters cannot cross parts. Those regions are different from the regions player see based on the landscape and story of the outside world. Usually most monsters are in dungeons and players tend to accept that they have to walk through a gateway to enter a dungeon. Especially if those dungeons are instantiated on a per player group basis. Other examples on the outside world are different continents and valleys enclosed by high mountains.&#xD;&#xA;&#xD;&#xA;A **continuous world** approach gets complex really quickly, so it makes sense to plan it well: What information does the client need? Which information do the servers have to share? The player will mostly interact only with the objects (including monsters and NPCs) in the same region. You can cheat by placing objects out of click range from the zone border. This means that the client is mostly interested in read only information for neighboring zones. For these cases the zone servers don't have to coordinate anything except for the permission check that the player is close enough to connect to a neighboring zone.&#xD;&#xA;&#xD;&#xA;This leaves only a **very small number of difficult cases** in which objects or actions have to cross a server border. Which is a good thing because those cases such as arrows and spells are performance critical. It may be a good idea to split combat into attacking and defending. So the server of a spell-caster will define the attack parameters including the position of the caster. The server of the defender will get the message about the attack and calculate the impact. The server of the attacker does not need to know about the impact; the client will learn about it using his read only connection.&#xD;&#xA;&#xD;&#xA;Depending on how complex your player model is, it may take a couple of seconds to transfer it to another server (Second Life has a huge problem with this). The issue can be mitigated by **preparing the transfer** in advance when the player gets close to a virtual border. So that most of the player data is already cached on the destination server when the actual handover happens.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Summary&#xD;&#xA;-&#xD;&#xA;Divide the problem by defining different services that can be split across servers with little dependences. As next step look at how to do load balance within the critical services. Delegate balancing work to the client by instructing it to connect directly to the relevant servers (obviously the servers have to check permissions). Keep it as simple as possible, document the responsibilities of the various services and servers well, provide the option to enable debug output.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PS: Some of these techniques can be used to improve reliability. And you should keep that in mind because using many servers implies a much higher risk of things breaking; not only in the software but also at the hardware level." />
  <row Id="11878" PostHistoryTypeId="5" PostId="5938" RevisionGUID="4790451c-c87f-4290-ba93-ba984343965b" CreationDate="2010-11-26T10:58:18.603" UserId="1742" Comment="more description enhancement" Text="I've used angel code's bitmap font generator quite a bit and though it's very good, I wondered if there would be a way of using the hinting information to provide a better readable result by using hinting to provide differing thickness based on size/pixel coverage.&#xD;&#xA;&#xD;&#xA;I imagine any solution would have to use the distance field tech presented in the valve paper on smoothing fonts while maintaining or reducing asset size. ([http://www.gamedev.net/community/forums/topic.asp?topic_id=494612][1]) but I haven't found any demos of it being used with hinting information turned on or included in the field gradients in any way.&#xD;&#xA;&#xD;&#xA;Another way of looking at this is whether there are any font bitmap generators that will output mipmaps that still maintain their readability in the face of pixel size. I think the lower mip levels would try to guarantee fill and space where it is necessary to maintain readability/topology over maintaining style/form (the point of hinting).&#xD;&#xA;&#xD;&#xA;In response to &quot;Is there a reason you can't just render the size you want&quot;, the problem lies in the fact that font rasterisers currently don't render in 3D, and hinting information would be important in different amounts due to the pixel density being different along different axes, even differing in importance along the length of a string due to the size reducing over distance. For example, I only want horizontal hinting in a texture that is viewed from the side, and only really want vertical hinting in a font that is viewed from below or above. This isn't meant to be a renderer that tries to render a perfect outline as accurately as possible, as hinting distorts the reality of the font, instead this is meant to be a rendering solution for quite static scenes, but scenes that have 3D transformed and warped text layout. In this case the legibility is important, more important than the accuracy of representation of the polygon shape.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/community/forums/topic.asp?topic_id=494612" />
  <row Id="11879" PostHistoryTypeId="2" PostId="5968" RevisionGUID="626da98c-7296-469d-a062-9727a20a4b25" CreationDate="2010-11-26T10:58:42.690" UserId="2798" Text="The main differences between SM 2.0 and 3.0 are the instruction/register limits and the presence of vertex texture fetch functions (for accessing texture data from the vertex shader). [Wikipedia][1] has some nice tables with the capabilities of the different shader models.&#xD;&#xA;&#xD;&#xA;The shaders in your link do exactly what you are trying to achieve; some are compiled for SM 2.0 and the main one is for 3.0. You can see it clearly at the end of the FX files:&#xD;&#xA;&#xD;&#xA;    technique Distort&#xD;&#xA;    {&#xD;&#xA;        pass P0&#xD;&#xA;        {          &#xD;&#xA;            VertexShader = compile vs_2_0 FullScreenVS();&#xD;&#xA;            PixelShader  = compile ps_2_0 DistortPS();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    technique DrawShadows&#xD;&#xA;    {&#xD;&#xA;        pass P0&#xD;&#xA;        {          &#xD;&#xA;            VertexShader = compile vs_3_0 FullScreenVS();&#xD;&#xA;            PixelShader  = compile ps_3_0 DrawShadowsPS();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Seeing that the DrawShadows functions are quite lenghty, and knowing that Catalin Zima is an experienced XNA programmer (and MVP too), I'd say that you can't just force the shader &#xD;&#xA;to an inferior SM, probably because it surpasses the instruction limit. So you would need to learn some HLSL and strip the shader of unwanted functionality to cram it into SM 2.0 limits.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/High_Level_Shader_Language" />
  <row Id="11880" PostHistoryTypeId="2" PostId="5969" RevisionGUID="dd419478-9123-4923-a090-5ee27c693414" CreationDate="2010-11-26T12:15:29.053" UserId="3599" Text="You might end up loving these two utilities :&#xD;&#xA;&#xD;&#xA;http://www.bottomap.com/Software/A4B/A4B.html&#xD;&#xA;&#xD;&#xA;http://sysimage.250free.com/" />
  <row Id="11885" PostHistoryTypeId="2" PostId="5971" RevisionGUID="5cc8f39a-5986-451e-a2c6-746ad3016b8e" CreationDate="2010-11-26T21:28:52.880" UserId="3405" Text="There are multiple tutorials on network-based programming:&#xD;&#xA;&#xD;&#xA; - [Unify MMO Tutorial][1] - This uses SmartFoxServer&#xD;&#xA; - [Unity iPhone Multiplayer Tutorial][2] - While this applies to iPhone development, the networking part of it still applies&#xD;&#xA; - [Unity Networking Example][3] - An example project which shows how to use NetworkView's&#xD;&#xA;&#xD;&#xA;Network programming can be done in C#/Boo, not sure about JavaScript.&#xD;&#xA;&#xD;&#xA;Another way to get client/server programming done is with Unity Pro/C++ Plugin&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=MMO_tutorial&#xD;&#xA;  [2]: http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf&#xD;&#xA;  [3]: http://unity3d.com/support/resources/example-projects/networking-example" />
  <row Id="11886" PostHistoryTypeId="2" PostId="5972" RevisionGUID="48531c59-54c2-450b-8701-8b3d416c3b99" CreationDate="2010-11-26T21:46:05.773" UserId="3214" Text="I'm looking between PyGame and Pyglet, Pyglet seems to be somewhat newer and more Pythony, but it's last release according to Wikipedia is January '10. PyGame seems to have more documentation, more recent updates, and more published books/tutorials on the web for learning.&#xD;&#xA;&#xD;&#xA;I downloaded both the Pyglet and PyGame versions of the NeHe OpenGL tutorials (Lessons 1-10) which cover this material:&#xD;&#xA;&#xD;&#xA;lesson01 - Setting up the window&#xD;&#xA;lesson02 - Polygons&#xD;&#xA;lesson03 - Adding color&#xD;&#xA;lesson04 - Rotation&#xD;&#xA;lesson05 - 3D&#xD;&#xA;lesson06 - Textures&#xD;&#xA;lesson07 - Filters, Lighting, input&#xD;&#xA;lesson08 - Blending (transparency)&#xD;&#xA;lesson09 - 2D Sprites in 3D&#xD;&#xA;lesson10 - Moving in a 3D world &#xD;&#xA;&#xD;&#xA;What do you guys think? Is my hunch that I'll be better off working with PyGame somewhat warranted?&#xD;&#xA;" />
  <row Id="11887" PostHistoryTypeId="1" PostId="5972" RevisionGUID="48531c59-54c2-450b-8701-8b3d416c3b99" CreationDate="2010-11-26T21:46:05.773" UserId="3214" Text="Will I have an easier time learning OpenGL in Pygame or Pyglet? (NeHe tutorials downloaded)" />
  <row Id="11888" PostHistoryTypeId="3" PostId="5972" RevisionGUID="48531c59-54c2-450b-8701-8b3d416c3b99" CreationDate="2010-11-26T21:46:05.773" UserId="3214" Text="&lt;3d&gt;&lt;opengl&gt;&lt;python&gt;&lt;pygame&gt;&lt;pyglet&gt;" />
  <row Id="11889" PostHistoryTypeId="2" PostId="5973" RevisionGUID="65f45b3c-cb42-4a80-9160-53fffd989100" CreationDate="2010-11-26T21:58:12.350" UserId="744" Text="Pygame doesn't even have OpenGL bindings; you'd need to use PyOpenGL with it.&#xD;&#xA;&#xD;&#xA;If your goal is to learn OpenGL, my suggestion would be to use PyOpenGL, with Pygame. The API is closer to actual OpenGL. (I'd also recommend _not_ using NeHe and using the SuperBible instead.)&#xD;&#xA;&#xD;&#xA;If your goal is to make a quick game, I'd recommend pyglet. It has all the annoying OpenGL higher-level wrapper stuff written in more Python-friendly ways, e.g. batch for VBOs, groups for render state sorting.&#xD;&#xA;&#xD;&#xA;If your goal is to make a high-quality game, I'd recommend neither. Python and OpenGL really don't go together unless you put lots of layers of C in the middle; ctypes is too slow, function calls are too slow, neither Pygame nor pyglet offers very good interfaces for audio, and neither library is really well-maintained." />
  <row Id="11893" PostHistoryTypeId="2" PostId="5975" RevisionGUID="bcbc5ec2-bd47-4907-8c09-92cbe90fb9ea" CreationDate="2010-11-26T22:21:08.893" UserId="3614" Text="I have never done any sort of game development in my life, the only time i have looked into it is with Cocos 2D for iPhone apps, i saw the effort involved just to get a half decent map game with one png character walking around. Could someone summarise the programming languages and graphic packages someone would use to make a game on the scale of something like Halo or Call of Duty!? I wouldnt even know where to begin...!?" />
  <row Id="11894" PostHistoryTypeId="1" PostId="5975" RevisionGUID="bcbc5ec2-bd47-4907-8c09-92cbe90fb9ea" CreationDate="2010-11-26T22:21:08.893" UserId="3614" Text="Making Halo and Call Of Duty?" />
  <row Id="11895" PostHistoryTypeId="3" PostId="5975" RevisionGUID="bcbc5ec2-bd47-4907-8c09-92cbe90fb9ea" CreationDate="2010-11-26T22:21:08.893" UserId="3614" Text="&lt;3d&gt;&lt;programming&gt;" />
  <row Id="11896" PostHistoryTypeId="2" PostId="5976" RevisionGUID="feee3980-5189-4819-a031-2100288dbf79" CreationDate="2010-11-26T22:48:28.613" UserId="3015" Text="In summary:&#xD;&#xA;&#xD;&#xA;  1. Spend tens, if not hundreds of thousands of dollars buying the rights to use an existing game engine, songs and sounds for a sound track, and art assets.&#xD;&#xA;  2. Spend hundreds, if not thousands of man-hours developing a game using said engine, as well as developing music, sound and art assets not secured in point 1.&#xD;&#xA;  3. ????&#xD;&#xA;  4. Profit&#xD;&#xA;&#xD;&#xA;In detail:&#xD;&#xA;&#xD;&#xA;C++ using OpenGL is a popular choice for cross-platform stuff; C# and DirectX is a popular choice for games targeted specifically for windows or XBox platforms. PS3 and Wii have their own methodologies; I'm not familiar with PS3; but I know Wii is similar to GameCube; which in turn is similar to OpenGL. Most stuff outside of the sphere of &quot;Microsoft Platforms Exclusively&quot; is done in C++." />
  <row Id="11897" PostHistoryTypeId="5" PostId="5976" RevisionGUID="b08778af-b940-4061-8f74-0238e83270c2" CreationDate="2010-11-26T22:56:24.343" UserId="3015" Comment="added 131 characters in body" Text="In summary:&#xD;&#xA;&#xD;&#xA;  1. Spend tens, if not hundreds of thousands of dollars buying the rights to use an existing game engine, songs and sounds for a sound track, and art assets.&#xD;&#xA;  2. Spend hundreds, if not thousands of man-hours developing a game using said engine, as well as developing music, sound and art assets not secured in point 1.&#xD;&#xA;  3. ????&#xD;&#xA;  4. Profit&#xD;&#xA;&#xD;&#xA;In detail:&#xD;&#xA;&#xD;&#xA;C++ using OpenGL is a popular choice for cross-platform stuff; C# and DirectX is a popular choice for games targeted specifically for windows or XBox platforms. PS3 and Wii have their own methodologies; I'm not familiar with PS3; but I know Wii is similar to GameCube; which in turn is similar to OpenGL. Most stuff outside of the sphere of &quot;Microsoft Platforms Exclusively&quot; is done in C++.&#xD;&#xA;&#xD;&#xA;**Edit; to clarify:** What you really need with a project of that scale is a near-unlimited amount of man-hours to throw at it." />
  <row Id="11898" PostHistoryTypeId="2" PostId="5977" RevisionGUID="2ef35f4c-8b9f-470a-ad3b-5825ef306cf4" CreationDate="2010-11-26T23:22:56.273" UserId="2946" Text="For **Call Of Duty**, it uses an OpenGL-engine powered by either C or C++. There are a number of free 3d engines available, but most AAA game companies either create their own or buy one, which is very, *very* expensive. Then you would have to hire coders to make the game unique, and hundreds of artists to make all the graphics. Don't forget about the story, multiplayer level designer, etc. Call Of Duty: Black Ops was produced in two years (with an already functioning engine) with about 250 employees working full time. If you think about it, you better have a lot of skill and a lot of money to make a game like that." />
  <row Id="11899" PostHistoryTypeId="5" PostId="5975" RevisionGUID="6c4410a7-d764-47d1-84ca-145627c705f4" CreationDate="2010-11-26T23:29:33.290" UserId="3614" Comment="added 136 characters in body" Text="I have never done any sort of game development in my life, the only time i have looked into it is with Cocos 2D for iPhone apps, i saw the effort involved just to get a half decent map game with one png character walking around. Could someone summarise the programming languages and graphic packages someone would use to make a game on the scale of something like Halo or Call of Duty!? I wouldnt even know where to begin...!?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Just to clarify i'm not even dreaming of making the next Call of Duty or Halo i was just curious about what goes into it!&#xD;&#xA;" />
  <row Id="11900" PostHistoryTypeId="2" PostId="5978" RevisionGUID="392612b0-c555-41e8-af1d-b5e791b87cbf" CreationDate="2010-11-27T00:28:00.500" UserId="3616" Text="I am trying to create a simple game on android but I am unsure the best way to do the game loop.  Looking at the LunarLander sample the game loop just loops like a variable time step loop (elapsed = now-lastupdate).  I tried using this method to draw a circle that grows in size to a max radius then shrinks to a min radius and repeats.  However, when I run the program the growing stage is very choppy and slow (it takes longer than it should to get to max radius). &#xD;&#xA;&#xD;&#xA;My Code:&#xD;&#xA;&#xD;&#xA;    	public void updateSize(double elapsed) {&#xD;&#xA;			if (mGrowing == true &amp;&amp; mRadius &gt; mMaxRadius) {&#xD;&#xA;				mGrowing = false;&#xD;&#xA;			}&#xD;&#xA;			if (mGrowing == false &amp;&amp; mRadius &lt; mMinRadius) {&#xD;&#xA;				mGrowing = true;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if (mGrowing == true) {&#xD;&#xA;				mRadius += mDRadius * elapsed;&#xD;&#xA;			} else {&#xD;&#xA;				mRadius -= mDRadius * elapsed;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;mDRadius is the number of pixel the radius should change per second and elapsed is the number of seconds that has passed.&#xD;&#xA;&#xD;&#xA;I tried putting in a sleep of 2ms and 5ms in my game loop and I get the same result.&#xD;&#xA;&#xD;&#xA;I converted my loop to a fixed time step (only run physics update if now-lastupdate &gt; TIME_STEP) and the animation was a lot smoother.&#xD;&#xA;&#xD;&#xA;UPDATE: I change the sleep to 15ms and it's a lot smoother.  Every other example I've seen of an android game does not have a sleep in the main loop.  Is this because my sample is just so simple that it takes virtually no time to update and all other examples just have a longer update time or am I missing something?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11901" PostHistoryTypeId="1" PostId="5978" RevisionGUID="392612b0-c555-41e8-af1d-b5e791b87cbf" CreationDate="2010-11-27T00:28:00.500" UserId="3616" Text="Android Basic Game Loop" />
  <row Id="11902" PostHistoryTypeId="3" PostId="5978" RevisionGUID="392612b0-c555-41e8-af1d-b5e791b87cbf" CreationDate="2010-11-27T00:28:00.500" UserId="3616" Text="&lt;android&gt;&lt;gameloop&gt;" />
  <row Id="11903" PostHistoryTypeId="2" PostId="5979" RevisionGUID="3e07880d-97e1-4070-ab5b-24c7607b4fb5" CreationDate="2010-11-27T00:46:03.993" UserDisplayName="thegamedeveloper" Text="My article here may point you in the right direction. http://www.sspohrer.com/blog/getting-started-with-game-development" />
  <row Id="11904" PostHistoryTypeId="2" PostId="5980" RevisionGUID="1cab06f3-059b-4d1f-8b1b-a5482776f8d1" CreationDate="2010-11-27T01:46:09.437" UserId="3616" Text="Ok, I was doing something stupid.  I was using an integer for mRadius instead of a double. When the time steps are very very small as it was in my case, the increment was &lt; 1px so it was behaving strangely because of that.  I changed mRadius to a double so that it would increment properly." />
  <row Id="11905" PostHistoryTypeId="2" PostId="5981" RevisionGUID="50a33e11-b07f-4334-a1cb-2c0d753cd790" CreationDate="2010-11-27T03:25:53.843" UserId="2132" Text="Do I need the cutting edge MacBook Pro or iMac for 2D games development?&#xD;&#xA;&#xD;&#xA;Would a iPod touch (with Wi-Fi support) do instead of a full-fledge iPhone?" />
  <row Id="11906" PostHistoryTypeId="1" PostId="5981" RevisionGUID="50a33e11-b07f-4334-a1cb-2c0d753cd790" CreationDate="2010-11-27T03:25:53.843" UserId="2132" Text="Hardware for iPhone 2d games development" />
  <row Id="11907" PostHistoryTypeId="3" PostId="5981" RevisionGUID="50a33e11-b07f-4334-a1cb-2c0d753cd790" CreationDate="2010-11-27T03:25:53.843" UserId="2132" Text="&lt;iphone&gt;" />
  <row Id="11908" PostHistoryTypeId="2" PostId="5982" RevisionGUID="d61c9618-aa86-4a0a-8f5b-0d246b434a1b" CreationDate="2010-11-27T03:46:26.167" UserId="1386" Text="Pretty much any modern Mac that runs Snow Leopard is enough for 2D games development.&#xD;&#xA;&#xD;&#xA;There's nothing particularly hardware intensive about 2D game development for iOS. The most intensive things you will be doing is compiling your code and running the emulator and debugging tools - my Mac Mini did all of these tasks with ease.&#xD;&#xA;&#xD;&#xA;Using the iPod touch should be sufficient for testing." />
  <row Id="11909" PostHistoryTypeId="5" PostId="5982" RevisionGUID="50095a06-043d-4e18-935c-950f29299f0f" CreationDate="2010-11-27T03:52:14.540" UserId="1386" Comment="improving language" Text="Any modern Mac that runs Snow Leopard is adequate for 2D games development.&#xD;&#xA;&#xD;&#xA;There's nothing particularly hardware intensive about 2D game development for iOS. The most intensive things you will be doing is compiling your code and running the emulator and debugging tools - my Mac Mini did all of these tasks with ease.&#xD;&#xA;&#xD;&#xA;Using the iPod touch should be sufficient for testing." />
  <row Id="11910" PostHistoryTypeId="5" PostId="5982" RevisionGUID="0e8efa3b-c8fc-48a8-8278-a92a17547149" CreationDate="2010-11-27T04:02:50.147" UserId="1386" Comment="added 17 characters in body" Text="Any modern Mac that runs Snow Leopard is adequate for 2D games development.&#xD;&#xA;&#xD;&#xA;There's nothing particularly hardware intensive about 2D game development for iOS. The most intensive things you will be doing is compiling your code and running the emulator and debugging tools - my Mac Mini did all of these tasks with ease.&#xD;&#xA;&#xD;&#xA;The iPod touch is sufficient for testing games destined for the iPhone." />
  <row Id="11911" PostHistoryTypeId="5" PostId="5982" RevisionGUID="664a5234-7a77-44dd-baca-2a39275c854e" CreationDate="2010-11-27T04:09:32.900" UserId="1386" Comment="fixed grammar" Text="Any modern Mac that runs Snow Leopard is adequate for 2D games development.&#xD;&#xA;&#xD;&#xA;There's nothing particularly hardware intensive about 2D game development for iOS. The most intensive things you will be doing is compiling your code and running the emulator and debugging tools - my Mac Mini did all of these tasks with ease.&#xD;&#xA;&#xD;&#xA;The iPod touch is sufficient for testing games destined for the iPhone.&#xD;&#xA;The devices have the same screen resolutions, CPUs and iOS versions.&#xD;&#xA;The latest iPod Touch does have less memory than the latest iPhone (256MB as opposed to 512MB) so this is something you should be aware of." />
  <row Id="11912" PostHistoryTypeId="2" PostId="5983" RevisionGUID="c409ad87-cbd4-487e-bbea-73112592b1fb" CreationDate="2010-11-27T04:31:28.947" UserId="3004" Text="You leave out a ton of important information from your question. Namely, do you have a set number of competitors? Is this a seasonal system or is it a one-time deal? Etc.&#xD;&#xA;&#xD;&#xA;If this is a tournament (i.e. a one-time deal with a known number of competitors), [round robin][1] is theoretically the fairest way to run it. After the round-robin phase, you move into the single or, preferably, double elimination phase.&#xD;&#xA;&#xD;&#xA;Now, since you mention Battle.net, you need to realize that Blizzard uses the Elo system for stuff like WoW arenas (and a similar algorithm for Battle.net SC2 seasonal rankings). Elo is pretty simple, and [Wikipedia gives a great overview][2] of how it works.&#xD;&#xA;&#xD;&#xA;A simpler (and Microsoft thinks better) algorithm is [TrueSkill][3]. Read (a lot) more about it in Jeff Moser's blog by clicking [here][4]. The math may look scary, but it's really not that interesting.&#xD;&#xA;&#xD;&#xA;I'm not really sure what you mean by &quot;voted wild card system&quot;, so I'm afraid I can't address that part of your question, but both Elo and TrueSkill (and to a lesser extent round robin) should meet most, if not all, of your requirements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Round-robin_tournament&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Elo_rating_system&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/TrueSkill&#xD;&#xA;  [4]: http://www.moserware.com/2010/03/computing-your-skill.html" />
  <row Id="11916" PostHistoryTypeId="2" PostId="5985" RevisionGUID="e1ac87d8-8879-4f46-9f6d-53c76646643c" CreationDate="2010-11-27T07:03:09.497" UserId="3536" Text="https://github.com/mrdoob/three.js" />
  <row Id="11917" PostHistoryTypeId="2" PostId="5986" RevisionGUID="1ab85cdb-6164-4341-b9d9-939fcd59b3c8" CreationDate="2010-11-27T08:16:28.090" UserId="3623" Text="Consider doing less games but increasing the quality/fun/challenge of it so it will become successful. You need to bring an amazing concept on the table in order to pierce the market. If you just do a quick spin off of another game, that's not good enough. &#xD;&#xA;&#xD;&#xA;I agree with Tetrad. Put the link of your games so we could help you in a better way. &#xD;&#xA;&#xD;&#xA;Cheers, &#xD;&#xA;&#xD;&#xA;Raistx" />
  <row Id="11918" PostHistoryTypeId="2" PostId="5987" RevisionGUID="14949676-4641-415a-8137-f1aea49f2b49" CreationDate="2010-11-27T08:50:20.880" UserId="3623" Text="Background:&#xD;&#xA;I am documenting since a few months a game design document (GDD)(sci-fi &amp; fantasy MMORPG) all by myself, without any real game design background (I am just a Chartered Accountant). It looks more like a proposal document (did a lot of that in accounting firm). &#xD;&#xA;&#xD;&#xA;The question:&#xD;&#xA;If you would have a series of amazing ideas that would revolutionized MMORPGaming how would you create that company out of thin air? &#xD;&#xA;&#xD;&#xA;You may not be financial expert here but you did a massive amount of games in the past, of various types and platforms. &#xD;&#xA;&#xD;&#xA;E.g. How to get a core team to create a mockup to get a first round of capital venture? I don't know anyone in this industry. And working for free is not something people really likes usually. &#xD;&#xA;&#xD;&#xA;I just have a brain that cannot stop processing awesome stuff since a year and I am documenting it as much as I can. It need to become alive now. Keep in mind that I could roughly need around 200M$ USD in order to do so (maybe even more). I am talking about a massive game that would wipe-out WoW. Yeah, I am insane, I know that. But, I am a man with a goal and nothing usually stop me. :)&#xD;&#xA;&#xD;&#xA;Cheers, &#xD;&#xA;&#xD;&#xA;Raistx&#xD;&#xA;" />
  <row Id="11919" PostHistoryTypeId="1" PostId="5987" RevisionGUID="14949676-4641-415a-8137-f1aea49f2b49" CreationDate="2010-11-27T08:50:20.880" UserId="3623" Text="Method for creating a next gen MMORPG out of thin air?" />
  <row Id="11920" PostHistoryTypeId="3" PostId="5987" RevisionGUID="14949676-4641-415a-8137-f1aea49f2b49" CreationDate="2010-11-27T08:50:20.880" UserId="3623" Text="&lt;game-design&gt;&lt;mmo&gt;&lt;demo&gt;&lt;venture-capitalist&gt;" />
  <row Id="11921" PostHistoryTypeId="2" PostId="5988" RevisionGUID="f43051f2-5ee9-4f5b-ad7b-0ae853d4f041" CreationDate="2010-11-27T08:54:48.973" UserId="3624" Text="I have a little problem with designing editor in xna. I have Content types like&#xD;&#xA;`TilemapContent` and then runtime types like `TilemapData` (that are automaticly converted by content pipeline)&#xD;&#xA;&#xD;&#xA;but in editor, i think i need to work with `TilemapContent` (so that i can save it as such later), but `TilemapContent` contains things like `ExternalReference&lt;Texture2DContent&gt;` instead of `Texture2D`, so there is no way i could render such thing.&#xD;&#xA;&#xD;&#xA;One &quot;solution&quot; that i can think of is every time i make a change to `TilemapContent`, i need to rebuild it and then reload `TilemapData` (and i guess this would be really slow)&#xD;&#xA;&#xD;&#xA;Another solution would be to write third class `TilemapEditorData` and inside it write method that would convert that class to `TilemapContent`. But this would be third class, with almost same data...&#xD;&#xA;&#xD;&#xA;So question is, how is this thing done? Can i have different content type and runtime type and still make an editor?" />
  <row Id="11922" PostHistoryTypeId="1" PostId="5988" RevisionGUID="f43051f2-5ee9-4f5b-ad7b-0ae853d4f041" CreationDate="2010-11-27T08:54:48.973" UserId="3624" Text="XNA editor content" />
  <row Id="11923" PostHistoryTypeId="3" PostId="5988" RevisionGUID="f43051f2-5ee9-4f5b-ad7b-0ae853d4f041" CreationDate="2010-11-27T08:54:48.973" UserId="3624" Text="&lt;xna&gt;" />
  <row Id="11924" PostHistoryTypeId="5" PostId="5988" RevisionGUID="9a28bb15-8adf-4a39-8b0d-ac8655e11920" CreationDate="2010-11-27T09:12:44.497" UserId="3624" Comment="added 103 characters in body" Text="I have a little problem with designing editor in xna. I have Content types like&#xD;&#xA;`TilemapContent` and then runtime types like `TilemapData` (that are automaticly converted by content pipeline)&#xD;&#xA;&#xD;&#xA;but in editor, i think i need to work with `TilemapContent` (so that i can save it as such later), but `TilemapContent` contains things like `ExternalReference&lt;Texture2DContent&gt;` instead of `Texture2D`, so there is no way i could render such thing.&#xD;&#xA;&#xD;&#xA;One &quot;solution&quot; that i can think of is every time i make a change to `TilemapContent`, i need to rebuild it and then reload `TilemapData` (and i guess this would be really slow)&#xD;&#xA;&#xD;&#xA;Another solution would be to write third class `TilemapEditorData` and inside it write method that would convert that class to `TilemapContent`. But this would be third class, with almost same data, and it would require me to write something that would convert things like Texture2DContent to Texture2D.&#xD;&#xA;&#xD;&#xA;So question is, how is this thing done? Can i have different content type and runtime type and still make an editor?" />
  <row Id="11927" PostHistoryTypeId="2" PostId="5990" RevisionGUID="faceccac-333f-4ae4-835c-9d36f88abfe0" CreationDate="2010-11-27T10:17:43.837" UserId="395" Text="I recommend buying a lot of WoW boxes and gluing new names on them, and then hoping people don't ask a lot of questions. You will probably need more then $200M to cover the ensuing legal fees, but it is a place to start." />
  <row Id="11928" PostHistoryTypeId="2" PostId="5991" RevisionGUID="28fec4f6-7b09-45f6-add8-dbc666f0d341" CreationDate="2010-11-27T11:11:47.280" UserId="3568" Text="I think trying to find $200M in venture capital for a new company, with no shipped products and a CEO with no experience in the industry would be... impossible. Unless you come across some Nigerian billionaire widow looking to escape a repressive government.&#xD;&#xA;&#xD;&#xA;I would suggest you start small. Take a couple of your ideas (obviously not the ones that will totally revolutionise the gaming industry, just some of the smaller ones that merely make you better than everyone else) and develop some social-media or iPhone/Android games to take funding from micro-payments. The &quot;classical&quot; MMO (ala Evercrack, WOW) is a massive undertaking over year, with teams of dozens and hundreds - and then a massive amount of competition. You need a ready-made fanbase to enter that market, or some intellectual property sure to draw in hundreds of thousands of subscribers to get *any* funding in the market. You won't have that, so you'll have to start self-funded.&#xD;&#xA;&#xD;&#xA;What is unarguably the most successful MMO out there, World of Warcraft, has somewhere in the region of 14 million active subscribers. Assuming they get $10/mnth from each, and that's a generous assumption when you take into account the multi-period subscriptions, their payment processing costs, and the amount retailers take from game time cards - then that's a cash flow of $140M / year for Blizzard from WoW. Now consider their costs for servers, software developers, legal, publisher agreements, regional distribution, bandwidth and support...&#xD;&#xA;&#xD;&#xA;To think you'll get $200M in venture capital is... frankly ridiculous, sorry. Start small. Build up a fan base. Revolutionise the industry one remarkable, patented game mechanic at a time." />
  <row Id="11929" PostHistoryTypeId="2" PostId="5992" RevisionGUID="cf2259c2-3ae6-4a59-bdbe-92b15bff5c75" CreationDate="2010-11-27T11:50:50.960" UserId="1581" Text="This is an English-language question.&#xD;&#xA;&#xD;&#xA;I'm trying to remember the English name given to a memory model of a map built exclusively for handling collision detection. I think this is specially frequent in tile-based platform games.&#xD;&#xA;&#xD;&#xA;I believe the Spanish term for it is &quot;Mapa de durezas&quot;.&#xD;&#xA;&#xD;&#xA;If you have a supermario tilemap like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        C     +        'P' = Pipe&#xD;&#xA;             +++       '+' = Brick&#xD;&#xA;            +++++      '@' = Ground&#xD;&#xA;       P   +++++++     'C' = Cloud&#xD;&#xA;     @@@@@@@@@@@@@@@@  ' ' = Air&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then the `&lt;ENGLISH EXPRESSION THAT I'M LOOKING FOR&gt;` of that map would be:&#xD;&#xA;&#xD;&#xA;              *       '*' = Solid&#xD;&#xA;             ***      ' ' = Traversable&#xD;&#xA;            *****     &#xD;&#xA;       *   *******&#xD;&#xA;     ****************&#xD;&#xA;&#xD;&#xA;Any clues?" />
  <row Id="11930" PostHistoryTypeId="1" PostId="5992" RevisionGUID="cf2259c2-3ae6-4a59-bdbe-92b15bff5c75" CreationDate="2010-11-27T11:50:50.960" UserId="1581" Text="Name of the model in memory that you use for map collision detection?" />
  <row Id="11931" PostHistoryTypeId="3" PostId="5992" RevisionGUID="cf2259c2-3ae6-4a59-bdbe-92b15bff5c75" CreationDate="2010-11-27T11:50:50.960" UserId="1581" Text="&lt;collision-detection&gt;&lt;maps&gt;&lt;english&gt;" />
  <row Id="11932" PostHistoryTypeId="2" PostId="5993" RevisionGUID="f1888287-7494-47d1-ba8d-373546b0b384" CreationDate="2010-11-27T12:06:46.877" UserId="1217" Text="To answer your question and not question your question and idea: You'll find a great number of interested developers and artists all over the internet. Get one or two friends or acquaintances interested, preferably one coder and one artist. That way you can start prototyping with their help. Be clear what your intentions are and be sure their intentions are on the same path. I've found that a great artist can spark a lot of interest with nice conceptual art. &#xD;&#xA;&#xD;&#xA;**My thoughts**&#xD;&#xA;&#xD;&#xA;I would say that's an awesome start up team. You've got control over business model, financial strategy and do the stuff you're good at. Your coder can start coding the prototype according to his belief and your artist can start drawing, modelling, sculpting etc.&#xD;&#xA;&#xD;&#xA;When you have some assets done and a trailer or teaser, start building interest via a community. Check out www.interstellarmarines.com for an example of an interesting way to do this. Keep in mind that it took them about 4 months to complete the first playable demo (the one where you can shoot stuff, not run around) and they are all very, very experienced. They have a nice fan base already and have actually sold the game even though it's not even near completion. It's not even sure it will be completed either. Right now they are rounding up capital, with all that as a portfolio. From what I hear it's actually still hard to get capital with reasonable conditions for them. &#xD;&#xA;&#xD;&#xA;You do this in whatever way fits you, but I'd look at how others are doing it today. &#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;Don't forget to upvote this answer if you liked it :) (I'm a sucker for rep) " />
  <row Id="11933" PostHistoryTypeId="2" PostId="5994" RevisionGUID="c688f95a-025b-4db6-b8c7-1c69cc2eb998" CreationDate="2010-11-27T12:32:34.190" UserId="1386" Text="The term you are looking for may be &quot;collision map&quot;." />
  <row Id="11934" PostHistoryTypeId="2" PostId="5995" RevisionGUID="436b66bd-097c-450b-916e-bb668e72df4f" CreationDate="2010-11-27T13:04:20.380" UserId="1829" Text="The actual problem with opengl or directx is that it requires you to learn how to use matrices, which are another subject apart from programming.&#xD;&#xA;From what I'm reading, you dislike pointers and don't want C++, then I recommend you to use Panda3D, which has been made to be used with Python.&#xD;&#xA;It's in my opinion the best complete 3d game engine for non-programmers who like to do some gameplay as fast as possible." />
  <row Id="11935" PostHistoryTypeId="5" PostId="5995" RevisionGUID="cad8fd5f-cf23-4e75-b261-1b57db60dbf4" CreationDate="2010-11-27T13:11:07.007" UserId="1829" Comment="added 620 characters in body" Text="The actual problem with opengl or directx is that it requires you to learn how to use matrices, which are another subject apart from programming.&#xD;&#xA;From what I'm reading, you dislike pointers and don't want C++, then I recommend you to use Panda3D, which has been made to be used with Python.&#xD;&#xA;It's in my opinion the best complete 3d game engine for non-programmers who like to do some gameplay as fast as possible.&#xD;&#xA;&#xD;&#xA;Learning opengl primitives can be quite easy, but learning how to make something with it is a whole other problem. Programming is one topic, programming graphics involve to learn how to use another kind of processor with another memory, which will be harder to handle if you don't know how to use basical things like pointers.&#xD;&#xA;&#xD;&#xA;Don't forget that python is a very good programming language because it's more on the side of the programmer, which is not the case of system language like C or C++. I don't even think we can call python a programming language, since it's more a scripting language: it's too high level." />
  <row Id="11936" PostHistoryTypeId="5" PostId="5976" RevisionGUID="15d82b96-df6a-48ca-bd91-3c7e828eb93b" CreationDate="2010-11-27T13:59:31.923" UserId="3015" Comment="added 14 characters in body" Text="In summary:&#xD;&#xA;&#xD;&#xA;  1. Spend tens, if not hundreds of thousands of dollars (if not more) buying the rights to use an existing game engine, songs and sounds for a sound track, and art assets.&#xD;&#xA;  2. Spend hundreds, if not thousands of man-hours developing a game using said engine, as well as developing music, sound and art assets not secured in point 1.&#xD;&#xA;  3. ????&#xD;&#xA;  4. Profit&#xD;&#xA;&#xD;&#xA;In detail:&#xD;&#xA;&#xD;&#xA;C++ using OpenGL is a popular choice for cross-platform stuff; C# and DirectX is a popular choice for games targeted specifically for windows or XBox platforms. PS3 and Wii have their own methodologies; I'm not familiar with PS3; but I know Wii is similar to GameCube; which in turn is similar to OpenGL. Most stuff outside of the sphere of &quot;Microsoft Platforms Exclusively&quot; is done in C++.&#xD;&#xA;&#xD;&#xA;**Edit; to clarify:** What you really need with a project of that scale is a near-unlimited amount of man-hours to throw at it." />
  <row Id="11937" PostHistoryTypeId="2" PostId="5996" RevisionGUID="dd4b3819-0806-4dc9-92b5-445814808048" CreationDate="2010-11-27T14:29:04.643" UserId="3505" Text="I used to envision `The greatest game ever™`, I think a lot of gamers do that. The exercise is pretty simple just ad in all the features (you think) you want in your favourite game, and voila it's there in your mind, ready to be made. The problem is, this does not tackle any of the hardcore stuff, gameplay and balancing are very vague concepts to most people, but they are decisive in making an entertaining game.&#xD;&#xA;&#xD;&#xA;I suppose you have tried starting to play a game with a specific feature which you think is cool, but after a short while discovered that it is not, or at least not something that really makes the game worth playing. The art of game design could a little simplified be boiled down to making that discovery, without playing the game.&#xD;&#xA;&#xD;&#xA;Seeing you list features&#xD;&#xA;&#xD;&#xA;&gt; Every citizen will be able to fight, hunt, work, date, exercise, dance, paint, sculpted, sing, learn, play games, do illicit activities, die and so much more.&#xD;&#xA;&#xD;&#xA;my best prediction for most of it is cool for 5 minutes and then meh. A lot of this stuff may work as gimmicks that get the social activity going, that is if it is well implemented, but it won't do much for the core gameplay." />
  <row Id="11938" PostHistoryTypeId="2" PostId="5997" RevisionGUID="edd6f637-c7f7-4585-86a4-33121876ec43" CreationDate="2010-11-27T14:39:30.400" UserId="1156" Text="I'm developing an RPG/roguelike-style game. Instead of having maps like:&#xD;&#xA;&#xD;&#xA;    .........&#xD;&#xA;    .........&#xD;&#xA;    ....@....&#xD;&#xA;    ...h.....&#xD;&#xA;&#xD;&#xA;Oh look, a dwarf.&#xD;&#xA;&#xD;&#xA;I was having solid background tiles, So sort of a tile based RPG without drawn tiles. I like the idea of having ascii tiles for creatures and things. It saves a lot of artist time. I can change the tiles so I get some kind of symbol slightly more...related? But better than having 4 directions for each separate thing.&#xD;&#xA;&#xD;&#xA;If I did this in white, and had a snow area, you wouldn't be able to see. So make it black. As soon as you reach a dark place, you're again stuck as to where your character is. Is there an algorithm or something that can say 'this is too dark between the tile and the NPC' and change the colour to something seeable, but not going to a bright cyan from a pale pink or whatever?" />
  <row Id="11939" PostHistoryTypeId="1" PostId="5997" RevisionGUID="edd6f637-c7f7-4585-86a4-33121876ec43" CreationDate="2010-11-27T14:39:30.400" UserId="1156" Text="Making a symbol appear on any colour" />
  <row Id="11940" PostHistoryTypeId="3" PostId="5997" RevisionGUID="edd6f637-c7f7-4585-86a4-33121876ec43" CreationDate="2010-11-27T14:39:30.400" UserId="1156" Text="&lt;algorithm&gt;&lt;tiles&gt;&lt;color&gt;" />
  <row Id="11941" PostHistoryTypeId="6" PostId="5978" RevisionGUID="91189017-1955-402c-8b9d-ebabfc8ecf45" CreationDate="2010-11-27T14:41:11.850" UserId="1156" Comment="edited tags" Text="&lt;android&gt;&lt;java&gt;&lt;gameloop&gt;" />
  <row Id="11942" PostHistoryTypeId="4" PostId="5978" RevisionGUID="ae83e8d0-213f-40d2-9a61-f3c2d3b84d79" CreationDate="2010-11-27T14:56:00.950" UserId="744" Comment="edited tags; edited title" Text="Why is this animation jerky?" />
  <row Id="11943" PostHistoryTypeId="6" PostId="5978" RevisionGUID="ae83e8d0-213f-40d2-9a61-f3c2d3b84d79" CreationDate="2010-11-27T14:56:00.950" UserId="744" Comment="edited tags; edited title" Text="&lt;android&gt;&lt;java&gt;" />
  <row Id="11944" PostHistoryTypeId="2" PostId="5998" RevisionGUID="75d6626a-34a0-4c91-b008-b08c8b680be7" CreationDate="2010-11-27T14:57:58.313" UserId="3214" Text="I was reading about OpenGL, and found out the Red Book is a great book for me to read to learn. I then read that even though they have 3.x and 4.x versions, I should still stick to 2.x so I don't create an artificial limit on who can play my game (older computers with older but powerful graphics cards would not be able to run 3.x and 4.x GL software).&#xD;&#xA;&#xD;&#xA;So where do I start? I'm lost. Which book? I have no problem reading the 2.x version of the Red Book, which I believe is this one: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321335732/ref=sr_1_2?ie=UTF8&amp;qid=1290869828&amp;sr=8-2&#xD;&#xA;but I won't know whats deprecated :(&#xD;&#xA;&#xD;&#xA;*cry for help*" />
  <row Id="11945" PostHistoryTypeId="1" PostId="5998" RevisionGUID="75d6626a-34a0-4c91-b008-b08c8b680be7" CreationDate="2010-11-27T14:57:58.313" UserId="3214" Text="Lost on OpenGL versions, which to start?" />
  <row Id="11946" PostHistoryTypeId="3" PostId="5998" RevisionGUID="75d6626a-34a0-4c91-b008-b08c8b680be7" CreationDate="2010-11-27T14:57:58.313" UserId="3214" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="11947" PostHistoryTypeId="2" PostId="5999" RevisionGUID="23743a9f-0075-44a0-b652-1131ea4b8146" CreationDate="2010-11-27T15:04:11.437" UserId="744" Text="Assuming you have one bright and one dark color for each character, you can &lt;a href=&quot;http://en.wikipedia.org/wiki/HSL_and_HSV&quot;&gt;check the difference in luminance, by converting the tile color and the NPC colors to HSL&lt;/a&gt;. Pick the NPC color with the greatest luminance difference from the tile.&#xD;&#xA;&#xD;&#xA;If you don't want to manually assign both colors, you can simply hardcode:&#xD;&#xA;&#xD;&#xA;    if (tile_color.l &gt; 0.5)&#xD;&#xA;        character_color.l = 0.1;&#xD;&#xA;    else&#xD;&#xA;        character_color.l = 0.9;&#xD;&#xA;&#xD;&#xA;And assign HS pairs rather than RGB triplets to each character.&#xD;&#xA;&#xD;&#xA;You could also just provide a lighter outline around dark characters, and a darker outline around light characters, all the time." />
  <row Id="11948" PostHistoryTypeId="2" PostId="6000" RevisionGUID="e25fafc6-d48a-4f6e-9035-2e274b497843" CreationDate="2010-11-27T15:46:18.337" UserId="1859" Text="Check this site from Tom Sloper : http://www.sloperama.com/advice.html. It contains lots of wise advices about the game development business from an industry veteran.&#xD;&#xA;&#xD;&#xA;Don't mind the ugly design of the pages. Review all the articles: many don't apply to your case but several do." />
  <row Id="11949" PostHistoryTypeId="2" PostId="6001" RevisionGUID="f056a0eb-9f58-48d3-8599-882394c0594e" CreationDate="2010-11-27T17:00:10.250" UserId="165" Text="I suspect you won't care for this answer - fantasies are always more fun than reality checks. :) But if you really want to *accomplish* something, as opposed to dreaming:&#xD;&#xA;&#xD;&#xA;  - Forget Venture Capital! And forming a large team, etc.&#xD;&#xA;  - Make something that is *publishable*, quickly, and release it. This may require learning a lot of new skills on your own.&#xD;&#xA;  - Read [Ready, Fire, Aim][1]  by Michael Masterson. His thesis (to cram it into one sentence) is that you should release a semi-marketable product/service as fast as possible - then use market feedback to fine-tune further changes to it, *rather* than spending years planning for perfection.&#xD;&#xA;  - Look at the games in my answer to [Why MMOs are hard][2]. Those games were developed by a single person (or two people), and without a $200M budget.&#xD;&#xA;&#xD;&#xA;Just making and publishing a game, even a simple one, will give you a *much* better idea of the issues involved, and what does or doesn't work in gameplay (and a simple game will *force* you to have good gameplay, you can't cover it up with graphics). You'll be much better prepared for making a *larger* game, or at least know whether it's possible or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Ready-Fire-Aim-Million-Agora/dp/0470182024/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo/630#630" />
  <row Id="11955" PostHistoryTypeId="6" PostId="1458" RevisionGUID="1bcf2b09-f44d-4fde-93be-9a93aeeccd2c" CreationDate="2010-11-27T19:33:52.207" UserId="450" Comment="edited tags" Text="&lt;java&gt;&lt;server&gt;&lt;profiling&gt;&lt;scalability&gt;" />
  <row Id="11956" PostHistoryTypeId="2" PostId="6004" RevisionGUID="cacee00f-fde1-4afe-81b5-ff575603307e" CreationDate="2010-11-27T21:23:41.167" UserId="154" Text="This industry is littered with new companies that tried to make an MMO and failed. Hell even the big established companies like EA have regularly failed to make successful MMOs. &#xD;&#xA;&#xD;&#xA;As a quick list of big closed MMO's include:&#xD;&#xA;&#xD;&#xA; - Tabla Rasa &#xD;&#xA; - Auto Assault&#xD;&#xA; - Asheron's Call 2&#xD;&#xA; - Hellgate: London&#xD;&#xA; - Matrix Online&#xD;&#xA; - Sims Online&#xD;&#xA; - Fury&#xD;&#xA; - Motor City Online&#xD;&#xA; - Earth &amp; Beyond&#xD;&#xA; - Chronicles of Spellborn&#xD;&#xA;&#xD;&#xA;This doesn't count the huge number of cancelled MMO's that died before launch. Any investor who does even the most cursory due diligence isn't going to invest in this space unless you've shown that you've successfully built an MMO before, and even then it's a hard sell. &#xD;&#xA;&#xD;&#xA;All of those games were made with big budgets &amp; experienced teams, and you can bet they all thought they had a really good idea or they wouldn't have spent ~5 years and $40m+ to try and make it happen.&#xD;&#xA;&#xD;&#xA;The reality is that the success of all games and MMO's in particular has far more to do with execution than high concept. When WoW launched it really wasn't that fundamentally different than Everquest, but on an execution level from art direction to mission design it was very well crafted. &#xD;&#xA;&#xD;&#xA;The same can be said for many of the &quot;WoW-killers&quot; that have been attempted in recent years. Most have feature parity with WoW or (WoW minus some Xpacks) but they fail to get of the ground because the execution really isn't there.&#xD;&#xA;&#xD;&#xA;Ultimately I would suggest starting with small games to really make sure making games is what you want to do. However, if you really want to make this game idea you have, re-write the concept for Free-to-Play on Facebook. There is a lot of investment interest, budgets sub-$1m, short dev cycles give a shot at fairly rapid ROI, and lots of teams out there to do contract work.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11957" PostHistoryTypeId="2" PostId="6005" RevisionGUID="0bc72ae9-2179-43f7-b31b-f9a91dcae169" CreationDate="2010-11-27T21:57:12.127" UserId="1528" Text="So, I've read a lot *about* using FSMs to do game state management, things like what and FSM is, and using a stack or set of states for building one. I've gone through all that. But I'm stuck at writing an actual, *well-designed* implementation of an FSM for that purpose. Specifically, how does one cleanly resolve the problem of transitioning between states, (how) should a state be able to use data from other states, and so on. Does anyone have any tips on designing and writing a implementation in C++, or better yet, code examples?" />
  <row Id="11958" PostHistoryTypeId="1" PostId="6005" RevisionGUID="0bc72ae9-2179-43f7-b31b-f9a91dcae169" CreationDate="2010-11-27T21:57:12.127" UserId="1528" Text="Finite state machine in C++" />
  <row Id="11959" PostHistoryTypeId="3" PostId="6005" RevisionGUID="0bc72ae9-2179-43f7-b31b-f9a91dcae169" CreationDate="2010-11-27T21:57:12.127" UserId="1528" Text="&lt;c++&gt;&lt;programming&gt;&lt;state&gt;&lt;gameloop&gt;&lt;design&gt;" />
  <row Id="11961" PostHistoryTypeId="5" PostId="6004" RevisionGUID="a470d7ea-394b-4c0d-b824-7ef7d2cfdbe1" CreationDate="2010-11-27T22:27:49.663" UserId="154" Comment="added 8 characters in body" Text="This industry is littered with new companies that tried to make an MMO and failed. Hell even the big established companies like EA have regularly failed to make successful MMOs. &#xD;&#xA;&#xD;&#xA;As a quick list of big closed MMO's include:&#xD;&#xA;&#xD;&#xA; - APB&#xD;&#xA; - Tabla Rasa &#xD;&#xA; - Auto Assault&#xD;&#xA; - Asheron's Call 2&#xD;&#xA; - Hellgate: London&#xD;&#xA; - Matrix Online&#xD;&#xA; - Sims Online&#xD;&#xA; - Fury&#xD;&#xA; - Motor City Online&#xD;&#xA; - Earth &amp; Beyond&#xD;&#xA; - Chronicles of Spellborn&#xD;&#xA;&#xD;&#xA;This doesn't count the huge number of cancelled MMO's that died before launch. Any investor who does even the most cursory due diligence isn't going to invest in this space unless you've shown that you've successfully built an MMO before, and even then it's a hard sell. &#xD;&#xA;&#xD;&#xA;All of those games were made with big budgets &amp; experienced teams, and you can bet they all thought they had a really good idea or they wouldn't have spent ~5 years and $40m+ to try and make it happen.&#xD;&#xA;&#xD;&#xA;The reality is that the success of all games and MMO's in particular has far more to do with execution than high concept. When WoW launched it really wasn't that fundamentally different than Everquest, but on an execution level from art direction to mission design it was very well crafted. &#xD;&#xA;&#xD;&#xA;The same can be said for many of the &quot;WoW-killers&quot; that have been attempted in recent years. Most have feature parity with WoW or (WoW minus some Xpacks) but they fail to get of the ground because the execution really isn't there.&#xD;&#xA;&#xD;&#xA;Ultimately I would suggest starting with small games to really make sure making games is what you want to do. However, if you really want to make this game idea you have, re-write the concept for Free-to-Play on Facebook. There is a lot of investment interest, budgets sub-$1m, short dev cycles give a shot at fairly rapid ROI, and lots of teams out there to do contract work.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11962" PostHistoryTypeId="2" PostId="6007" RevisionGUID="366d13f2-5cb3-4333-aa13-ec2471fc9d7b" CreationDate="2010-11-27T23:10:52.947" UserId="3547" Text="From my experience, usually the content (xnb files) are compiled from some other intermediate format. (for images its bitmaps or .pngs, or what have you) I'm guessing you have some kind of xml format.&#xD;&#xA;&#xD;&#xA;To get to that xml format, usually you write some kind of serializing code or use a serializer class (like XmlSerializer or IntermediateSerializer or some kind of serializing/persistence framework)&#xD;&#xA;&#xD;&#xA;So you could use your TileData class in your editor, save the map as an xml file and you could run your visual studio build or set up some MSBuild stuff in your editor.&#xD;&#xA;&#xD;&#xA;All in all, I think your looking at this the wrong way and that you shouldn't compile to xnb directly. I'm not an expert, but I think your a tad confused with the workflow, at least from my understanding.&#xD;&#xA;&#xD;&#xA;My Understand in Digest Format : Runtime Type (in editor) -&gt; Save to intermediate format (xml or whatever) -&gt; build later at design time (this is where that Content class comes in)&#xD;&#xA;&#xD;&#xA;This is also a bit easier to debug because xnb files are binary while xml is filled with strings, far easier to look at and understand. Maybe I just didn't understand your question/situation.&#xD;&#xA;&#xD;&#xA;Just in case I'm completely off: You could use the runtime type and when you save it you could instantiate a bunch of the content types to save with?" />
  <row Id="11963" PostHistoryTypeId="5" PostId="5987" RevisionGUID="70f32bcc-4098-4898-9598-7a6cf3a58ae7" CreationDate="2010-11-28T01:04:01.180" UserId="3623" Comment="deleted 212 characters in body" Text="Background:&#xD;&#xA;I am documenting since a few months a game design document (GDD)(sci-fi &amp; fantasy MMORPG) all by myself, without any real game design background (I am just a Chartered Accountant (CA and CISA)). For now, it looks more like a proposal document. &#xD;&#xA;&#xD;&#xA;The question:&#xD;&#xA;If you would have a series of amazing ideas that would revolutionized MMORPGaming how would you create that company out of thin air? Focus on creating the initial core team that would create the mockup that would be present to capital venture companies for major financing. &#xD;&#xA;&#xD;&#xA;You may not be financial expert here but you did a massive amount of games in the past, of various types and platforms. With our different backgrounds we are complementary. &#xD;&#xA;&#xD;&#xA;Cheers, &#xD;&#xA;&#xD;&#xA;Raistx&#xD;&#xA;&#xD;&#xA;P.-S. Edited for a leaner question. Removed elements linked to money as it's not the core question. I know how to get money and convince cap venture CIES, but I need a mockup / high pitch to do so. " />
  <row Id="11964" PostHistoryTypeId="2" PostId="6008" RevisionGUID="ebe5c4aa-8b93-4f94-ba62-508afbb64784" CreationDate="2010-11-28T03:30:59.260" UserId="1047" Text="Hey guys, i wanted to know what libs or example exist for WebSockets in .NET" />
  <row Id="11965" PostHistoryTypeId="1" PostId="6008" RevisionGUID="ebe5c4aa-8b93-4f94-ba62-508afbb64784" CreationDate="2010-11-28T03:30:59.260" UserId="1047" Text="Serverside libs/examples for html5 WebSocket?" />
  <row Id="11966" PostHistoryTypeId="3" PostId="6008" RevisionGUID="ebe5c4aa-8b93-4f94-ba62-508afbb64784" CreationDate="2010-11-28T03:30:59.260" UserId="1047" Text="&lt;html5&gt;&lt;server&gt;&lt;.net&gt;&lt;websocket&gt;" />
  <row Id="11967" PostHistoryTypeId="2" PostId="6009" RevisionGUID="8ee2c491-c62c-4b81-8a45-e31d7e879732" CreationDate="2010-11-28T04:08:40.480" UserId="3637" Text="I'm not sure if this is more of a math.stackexchange.com (or physics??) question, but here it is:&#xD;&#xA;&#xD;&#xA;How can I find out the distance traveled by a Bezier Curve?&#xD;&#xA;For example, the distance traveled by a Linear Bezier Curve is:&#xD;&#xA;&#xD;&#xA;    distance = sqrt(pow(x[1] - x[0], 2) + pow(y[1] - y[0], 2));&#xD;&#xA;&#xD;&#xA;But what of a Quadratic, Cubic, Nth-Degree Bezier Curve?&#xD;&#xA;&#xD;&#xA;My goal is to figure out the &quot;resolution&quot; beforehand, so I don't have to waste time checking if the next point is touching the previous point." />
  <row Id="11968" PostHistoryTypeId="1" PostId="6009" RevisionGUID="8ee2c491-c62c-4b81-8a45-e31d7e879732" CreationDate="2010-11-28T04:08:40.480" UserId="3637" Text="Distance traveled by Bezier Curves" />
  <row Id="11969" PostHistoryTypeId="3" PostId="6009" RevisionGUID="8ee2c491-c62c-4b81-8a45-e31d7e879732" CreationDate="2010-11-28T04:08:40.480" UserId="3637" Text="&lt;graphics&gt;&lt;math&gt;" />
  <row Id="11970" PostHistoryTypeId="2" PostId="6010" RevisionGUID="92c587fb-0d9c-481e-ae37-c3b93e5c4e5b" CreationDate="2010-11-28T05:31:47.993" UserId="2787" Text="I wrote a FSM based off of a chapter in &quot;Massively Multiplayer Game Development&quot; Edited by Thor Alexander. Inside is a chapter labelled &quot;Parallel-State Machines for Believable Characters&quot;. This is written in python, but the concepts are easily translatable into C++. I highly recommend checking this out, even though this is about character states, not game states." />
  <row Id="11971" PostHistoryTypeId="5" PostId="6010" RevisionGUID="954172f6-6c5c-42e6-9277-18818c2264f8" CreationDate="2010-11-28T05:52:09.967" UserId="2787" Comment="added 908 characters in body" Text="I wrote a FSM based off of a chapter in &quot;Massively Multiplayer Game Development&quot; Edited by Thor Alexander. Inside is a chapter labelled &quot;Parallel-State Machines for Believable Characters&quot;. This is written in python, but the concepts are easily translatable into C++. I highly recommend checking this out, even though this is about character states, not game states.&#xD;&#xA;&#xD;&#xA;What I created is here: https://github.com/swganh/mmoserver/tree/develop/src/ZoneServer/&#xD;&#xA;look under StateManager for implementation details, but basically you have different 'base states' that you can use. Then from there you have the specific states that you transition to as a character, so every state is a class. You then check if can transition from one state to another and then on 'enter' you make your switch, you can also easily do things like put in events after moving to a state. I found this worked out really well for the game so far.&#xD;&#xA;&#xD;&#xA;What I have implemented is what the book calls a parallel state machine, which is essential multiple fsm's working together, in this case you can transition into one state, that blocks all other states (ie: CreatureState_Dead). I'm not going to go too much more into detail as I don't think it would really help you, but if you'd like I can elaborate." />
  <row Id="11972" PostHistoryTypeId="2" PostId="6011" RevisionGUID="292790e7-87f8-44a8-bd08-bfc144b5736e" CreationDate="2010-11-28T06:41:10.460" UserId="3116" Text="I have a game I'm working on in which items are &quot;placed&quot; and &quot;selected&quot;.&#xD;&#xA;&#xD;&#xA;In order to do this, I need to determine what triangle in a mesh the cursor is pointing to.  I have no trouble with getting the cursor position or the orientation/position of the camera - the problem is figuring out how they relate.&#xD;&#xA;&#xD;&#xA;I'm guessing that this involves ray-picking, but I have no idea on how to convert a cursor position to a ray that I can test for intersection with a triangle.&#xD;&#xA;&#xD;&#xA;**A little bit of background:**  &#xD;&#xA;Game engine: *Irrlicht*  &#xD;&#xA;Language: *C++*" />
  <row Id="11973" PostHistoryTypeId="1" PostId="6011" RevisionGUID="292790e7-87f8-44a8-bd08-bfc144b5736e" CreationDate="2010-11-28T06:41:10.460" UserId="3116" Text="How to determine what triangle in a mesh the cursor is pointing to?" />
  <row Id="11974" PostHistoryTypeId="3" PostId="6011" RevisionGUID="292790e7-87f8-44a8-bd08-bfc144b5736e" CreationDate="2010-11-28T06:41:10.460" UserId="3116" Text="&lt;camera&gt;&lt;ray-casting&gt;&lt;irrlicht&gt;" />
  <row Id="11975" PostHistoryTypeId="2" PostId="6012" RevisionGUID="e7207ec8-c468-4e8c-bd68-7fe392ebac23" CreationDate="2010-11-28T06:52:21.873" UserId="3116" Text="I found a solution, though not an in-depth explanation - seems like Irrlicht has a built in function for this:&#xD;&#xA;&#xD;&#xA;[irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates](http://irrlicht.sourceforge.net/docu/classirr_1_1scene_1_1_i_scene_collision_manager.html#adb95809ed422e138405f30844740666b)&#xD;&#xA;&#xD;&#xA;This will calculate a ray given a screen coordinate." />
  <row Id="11976" PostHistoryTypeId="2" PostId="6013" RevisionGUID="5991d8bb-a08a-473f-a110-2b0b83990f1d" CreationDate="2010-11-28T09:03:56.523" UserId="1091" Text="To convert a cursor position to a ray, you can back-project the 2D co-ordinates onto two planes parallel to the view plane. Typically you might use the near and far planes. Two points define a ray.&#xD;&#xA;&#xD;&#xA;This is simply a matter of doing the maths used to project a 3D point onto the screen, in reverse.&#xD;&#xA;&#xD;&#xA;Typically from world space you would multiply by a view and projection matrix to get into clip-space, divide by Z to do the actual projection, and then scale the resulting values into pixel-values.&#xD;&#xA;&#xD;&#xA;So in reverse you would scale the screen-coordinates into clip space, multiply by Z (taken from the plane you're interested in), and transform by the inverse of the view-projection matrix to get back into world space.&#xD;&#xA;&#xD;&#xA;However as you've noticed, most engines and libraries can do this for you...&#xD;&#xA;" />
  <row Id="11977" PostHistoryTypeId="2" PostId="6014" RevisionGUID="f66e202c-6d93-4695-a82e-b162bf389ce3" CreationDate="2010-11-28T09:09:06.053" UserId="3015" Text="While this question *is* a better fit for math.stackexchange.com, the short version is that except for trivial and/or degenerate cases; solving for the exact length of an arbitrary bezier curve is non-trivial.&#xD;&#xA;&#xD;&#xA;If you can make do with an approximation, quadratic curves are relatively easy to deal with ([source][1]), cubic curves [less so][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://segfaultlabs.com/docs/quadratic-bezier-curve-length&#xD;&#xA;  [2]: http://steve.hollasch.net/cgindex/curves/cbezarclen.html" />
  <row Id="11978" PostHistoryTypeId="2" PostId="6015" RevisionGUID="b11d7adb-507e-4f4b-b07c-68b4866f777c" CreationDate="2010-11-28T10:50:52.273" UserId="1505" Text="http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1290941052&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;With shaders, it's possible to use OpenGL 2.1 without the fixed function pipeline that is deprecated in versions 3.x and later." />
  <row Id="11979" PostHistoryTypeId="5" PostId="6007" RevisionGUID="56d6b939-a9b8-4dcc-8b47-6026c706910b" CreationDate="2010-11-28T13:37:59.587" UserId="3547" Comment="added 3 characters in body" Text="From my experience, usually the content (xnb files) are compiled from some other intermediate format. (for images its bitmaps or .pngs, or what have you) I'm guessing you have some kind of xml format.&#xD;&#xA;&#xD;&#xA;To get to that xml format, usually you write some kind of serializing code or use a serializer class (like XmlSerializer or IntermediateSerializer or some kind of serializing/persistence framework)&#xD;&#xA;&#xD;&#xA;So you could use your TileData class in your editor, save the map as an xml file and you could run your visual studio build or set up some MSBuild stuff in your editor.&#xD;&#xA;&#xD;&#xA;All in all, I think your looking at this the wrong way and that you shouldn't compile to xnb directly. I'm not an expert, but I think your a tad confused with the workflow, at least from my understanding.&#xD;&#xA;&#xD;&#xA;My Understanding in Digest Format : Runtime Type (in editor) -&gt; Save to intermediate format (xml or whatever) -&gt; build later at design time (this is where that Content class comes in)&#xD;&#xA;&#xD;&#xA;This is also a bit easier to debug because xnb files are binary while xml is filled with strings, far easier to look at and understand. Maybe I just didn't understand your question/situation.&#xD;&#xA;&#xD;&#xA;Just in case I'm completely off: You could use the runtime type and when you save it you could instantiate a bunch of the content types to save with?" />
  <row Id="11980" PostHistoryTypeId="5" PostId="6007" RevisionGUID="1291f3bc-931b-4ccd-8eee-1207d9fdc429" CreationDate="2010-11-28T13:44:43.417" UserId="3547" Comment="added 1001 characters in body; added 9 characters in body; deleted 19 characters in body" Text="From my experience, usually the content (xnb files) are compiled from some other intermediate format. (for images its bitmaps or .pngs, or what have you) I'm guessing you have some kind of xml format.&#xD;&#xA;&#xD;&#xA;To get to that xml format, usually you write some kind of serializing code or use a serializer class (like XmlSerializer or IntermediateSerializer or some kind of serializing/persistence framework)&#xD;&#xA;&#xD;&#xA;So you could use your TileData class in your editor, save the map as an xml file and you could run your visual studio build or set up some MSBuild stuff in your editor.&#xD;&#xA;&#xD;&#xA;All in all, I think your looking at this the wrong way and that you shouldn't compile to xnb directly. I'm not an expert, but I think your a tad confused with the workflow, at least from my understanding.&#xD;&#xA;&#xD;&#xA;My Understanding in Digest Format : Runtime Type (in editor) -&gt; Save to intermediate format (xml or whatever) -&gt; build later at design time (this is where that Content class comes in)&#xD;&#xA;&#xD;&#xA;This is also a bit easier to debug because xnb files are binary while xml is filled with strings, far easier to look at and understand. Maybe I just didn't understand your question/situation.&#xD;&#xA;&#xD;&#xA;Just in case I'm completely off: You could use the runtime type and when you save it you could instantiate a bunch of the content types to save with?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;You need the texture name to edit the texture or something? I see your dilemma now. Probably creating a new class would be the easiest solution instead of trying to do a bunch of funky pairing of the two classes. &#xD;&#xA;&#xD;&#xA;If you used interfaces, you could have a class that implements both the ITextureContent and ITextureData (that might make it easier if you had functions that took an TextureContent or something of that nature). If you didn't use interfaces (understandable for a data type), than maybe creating a new class that just holds both a texture content and texture data (these fields would be protected and there would be public properties that would access shared data between the two members or just one member, in the case of the texture name). You could then define a public property to get one of those members (the TextureContent or TextureData) for code that needs a specific member like a drawing function or something of that nature.&#xD;&#xA;&#xD;&#xA;That could probably work." />
  <row Id="11981" PostHistoryTypeId="2" PostId="6016" RevisionGUID="8751bc7f-eb68-4051-bb62-ebc162359fb6" CreationDate="2010-11-28T14:20:19.097" UserId="3642" Text="As a fairly unknown independent band, what is the best way to get our music into computer games? I'm not so much thinking about licensing issues, but more about what channels are available and how to get noticed by game devs that could be interested in our type of music." />
  <row Id="11982" PostHistoryTypeId="1" PostId="6016" RevisionGUID="8751bc7f-eb68-4051-bb62-ebc162359fb6" CreationDate="2010-11-28T14:20:19.097" UserId="3642" Text="How to get music into games?" />
  <row Id="11983" PostHistoryTypeId="3" PostId="6016" RevisionGUID="8751bc7f-eb68-4051-bb62-ebc162359fb6" CreationDate="2010-11-28T14:20:19.097" UserId="3642" Text="&lt;music&gt;" />
  <row Id="11985" PostHistoryTypeId="4" PostId="6016" RevisionGUID="5a4b803b-65e0-4656-b83c-d496214062e9" CreationDate="2010-11-28T15:14:18.163" UserId="51" Comment="edited title" Text="How to get our music into games?" />
  <row Id="11986" PostHistoryTypeId="2" PostId="6017" RevisionGUID="b095fed1-8b2f-4ddf-bdba-b4e165795aee" CreationDate="2010-11-28T15:16:22.770" UserId="51" Text="You have two options:&#xD;&#xA;&#xD;&#xA;1) The indirect route: Find sites that distribute music and put it there.  See http://gamedev.stackexchange.com/questions/1045/where-is-quality-paid-game-music and http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game&#xD;&#xA;&#xD;&#xA;2) The direct route: Find a project in development and talk to them directly.  See &quot;Finding a project&quot; from here: http://gamedev.stackexchange.com/questions/496/open-source-game-projects" />
  <row Id="11987" PostHistoryTypeId="2" PostId="6018" RevisionGUID="8d317f97-bbe6-4860-8958-818fc2515419" CreationDate="2010-11-28T15:51:38.753" UserId="1101" Text="&gt; Could someone summarise the&#xD;&#xA;&gt; programming languages and graphic&#xD;&#xA;&gt; packages someone would use to make a&#xD;&#xA;&gt; game on the scale of something like&#xD;&#xA;&gt; Halo or Call of Duty!?&#xD;&#xA;&#xD;&#xA;One important thing to remember is that software development is not a production line where you feed stuff into a program or tool and get a game out of the other side. It's a constant construction and modification process where a team of people are continually adding more and more to the software and refining the behaviour until it finally does something close to what they hoped for. It's important to realise this because some people think that they could make these AAA games themselves if only they had the correct program for it - but the programs are only the tools. You still need the team of experienced and knowledgeable craftsmen to work those tools and there's no getting around that.&#xD;&#xA;&#xD;&#xA;But, you asked about the tools. There are very few standard tools, which might be surprising:&#xD;&#xA;&#xD;&#xA; - Microsoft Visual C++, or some other C++ compiler if the platform requires it. Programmers use this to write the game logic. I'm not going to claim that you *need* to use the C++ language to make a AAA game these days, but for the most part, that is what is chosen. Much of that is because the 'knowledgeable craftsmen' I mentioned above have this as their language of choice, but probably more of it is because the AAA development studios have a large body of existing C++ code that they need to reuse to have any chance of making large games in short timescales. &#xD;&#xA; - Adobe Photoshop. This is pretty much the be-all and end-all of 2D graphics. There are other, more creative tools artists may use, but they'll probably still need Photoshop anyway.&#xD;&#xA; - 3DS Max or Maya. These are advanced 3D modelling tools that allow you to construct characters, vehicles, environments, etc. Artists work with this to sculpt the visuals for the game.&#xD;&#xA;&#xD;&#xA;Beyond that, you'll probably have a game engine. This is not necessarily an off-the-shelf piece of software like Unity, Unreal, or the latest Id Tech engine, but basically refers to whatever lump of code you have at your disposal that has been used to previously make a game and which can be re-purposed to make your future game. Often it's a bit of a hybrid, as you might have licensed some 3rd party code for certain features but written much of your own around it. If you haven't done a big game before, this is where you have to make some choices about what external code to bring in, otherwise you'll spend far too much of your time developing technology and not much on the actual game.&#xD;&#xA;&#xD;&#xA;There are various bespoke tools that sometimes come with specific game engines, or which are developed in-house. Level editors, particle effect viewers, archive creation tools, conversation tree designers, etc etc. All depends on what sort of games you make, what engine you're using, and whether you got around to making these tools in the past or whether you just stuck with hand-editing text files...&#xD;&#xA;&#xD;&#xA;If all this sounds sadly vague then unfortunately that is the nature of the beast. There is no magical tool to automatically make AAA games (although UDK and Unity are getting close!) but there is a lot of experience in doing it, and a lot of prior code used for the purpose. Today's massive games are built on the games of 5 years ago. And they were built on the games of 10 years ago. And so on. But the good news is that going from small games to big games is just a series of incremental steps - as you understand the procedures better, the route to the top becomes a lot clearer." />
  <row Id="11988" PostHistoryTypeId="2" PostId="6019" RevisionGUID="c1dfaf0c-f443-436c-a277-f5d3c0386f9b" CreationDate="2010-11-28T16:07:39.690" UserId="1713" Text="For cubic ones a simple way is to split up the curve into N segments and then compute the distances between each segment and sum those up, as Williham said, this in non trivial, but diving is a rather simple approach. &#xD;&#xA;&#xD;&#xA;Also, as soon as you need more than just the length (e.g. get a point at 30% of the curves length), arc-length parameterization will come into play, so you should take a look at that.&#xD;&#xA;&#xD;&#xA;I posted a fairly long answer on one of my own questions about béziers which explains that in simple code:  &#xD;&#xA;http://gamedev.stackexchange.com/questions/5373/moving-ships-between-two-planets-along-a-bezier-missing-some-equations-for-accel/5427#5427&#xD;&#xA;&#xD;&#xA;" />
  <row Id="11989" PostHistoryTypeId="2" PostId="6020" RevisionGUID="183aa3a6-2d50-4fe3-8929-4c227f5a8aaf" CreationDate="2010-11-28T16:32:39.543" UserId="1101" Text="&gt; I believe it's a common requirement of&#xD;&#xA;&gt; MMOs that processing for a single&#xD;&#xA;&gt; shard or realm can be done over&#xD;&#xA;&gt; several servers to ease the load. I'm&#xD;&#xA;&gt; curious as to how this can be done&#xD;&#xA;&gt; whilst maintaining a unified&#xD;&#xA;&gt; consistent world where all the&#xD;&#xA;&gt; players, and all the NPCs can&#xD;&#xA;&gt; interact.&#xD;&#xA;&#xD;&#xA;It's probably not as common as you think; at least, not if you're thinking that one seamless world is managed by several servers simultaneously.&#xD;&#xA;&#xD;&#xA;Not counting totally separate shards, there are 2 directions in which you can split up an online game, which could be considered &quot;horizontal&quot; and &quot;vertical&quot;:&#xD;&#xA; - Divide the game up into many separate geographical areas. All the functionality for any given geographical area is handled by one server and there is no real interaction between them. (Note that there isn't necessarily just 1 zone per server - a server might handle several zones simultaneously, and zones can perhaps be transferred between servers to handle changing load.)&#xD;&#xA; - Divide the game up into several types of service - eg. login/authorisation, gameplay rules and physics, chat+auctions, persistence, etc. Each of these services can be handled by a different server. nhnb's answer has enumerated other potential services that a developer can partition their game into.&#xD;&#xA;&#xD;&#xA;Obviously these approaches are orthogonal and you can combine the two. In fact it's almost mandatory to have a separate database server, very common to push off login/auth onto a separate machine from the gameplay, and increasingly common to farm off chat and other non-critical communications as well, no matter how your game world is divided up.&#xD;&#xA;&#xD;&#xA;But on the whole, when there is geographical partitioning, most games avoid letting you interact across those boundaries, because it's difficult to do well. Instead, they resort to other ways of making it *seem* like you're all still in the same shard and on the same server, when actually you're not. eg. &#xD;&#xA;  - loading screens or other animations that cover up a server change when transitioning between zones, or from one continent to another.&#xD;&#xA;  - separate dungeon or raid instances that are isolated from everybody else. These are like a shard within a shard and can easily be run on a separate server, helping the load balancing.&#xD;&#xA;&#xD;&#xA;I can't speak with authority on WoW but I would guess they're doing almost all of the above: instancing, separate geographical areas that can't interact joined by portals of some sort, separate back end and auth servers. I've heard that WoW realms have something between 1000 and 10000 players online in a given realm at once, which is easily manageable with the above schemes.&#xD;&#xA;&#xD;&#xA;But, let's assume you have a single massive world and that you do need to allow players one one server to interact with players on an adjacent server. This is easy to do in theory - first, servers must cooperate to share details of objects along the borders (so an object on one server may have a proxy representation on another), and then simply change all your logic to message-passing, with messages being routed from a proxy back to the authoritative source where necessary. Messages can be passed between servers or within a server fairly transparently so one approach fits all systems.&#xD;&#xA;&#xD;&#xA;The problem here is that previously simple logic can become very complex when translated to messages - eg. a 2 player trade which can happen safely and atomically when both players are on one server becomes a longer process when messages have to be sent back and forth, reverified on each send, and safeguards put in place to ensure that one player can't exploit the other by changing the trade while a message is travelling. You can't even assume the other player will still exist by the time the message arrives (as they might die, log out, etc), so the code becomes very complex. And this will apply to almost any system where 2 or more entities can interact or cooperate - trade, combat, grouping, auctions, loot-sharing, training, etc.&#xD;&#xA;&#xD;&#xA;These problems aren't insurmountable but for most games they're too difficult to be worth attempting when you can share the load via the other means and keep all your game logic on one server. So almost all current games go down that route instead." />
  <row Id="11990" PostHistoryTypeId="2" PostId="6021" RevisionGUID="a3aa37b7-b79f-4d75-ad06-4c449bc5372f" CreationDate="2010-11-28T18:19:09.457" UserId="1713" Text="Only thing that seems to be there is this:  &#xD;&#xA;http://www.kaazing.com/download.html&#xD;&#xA;&#xD;&#xA;As it seems, you have to pay for a full version.&#xD;&#xA;&#xD;&#xA;If you're not interested in paying, you can either write a server yourself (see the [spec][1]) or you can switch the language, you can find more information on that over a the [SO WebSocket FAQ][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4262543/using-html-5-websockets" />
  <row Id="11991" PostHistoryTypeId="2" PostId="6022" RevisionGUID="5685f905-8cdd-43c6-b4f1-533689d80b6d" CreationDate="2010-11-28T18:22:42.013" UserId="962" Text="This is assuming you are storing the ASCII art as bitmaps instead of text rendering, which is better for performance, flexibility, and can facilitate easy to implement custom tile-sets.&#xD;&#xA;&#xD;&#xA;**Instead of changing the colors depending on the background colors, make all the ASCII art light toned, and have a slight drop shadow effect pre-rendered onto the bitmaps.**&#xD;&#xA;&#xD;&#xA;This will make the characters and items show up nicely on all colors/shades/tones." />
  <row Id="11992" PostHistoryTypeId="2" PostId="6023" RevisionGUID="28a8230e-4cec-46b1-9ac4-bdbcc6dedb80" CreationDate="2010-11-28T19:40:15.810" UserId="1047" Text="This one works which also comes with an example app. I tested it myself using chrome&#xD;&#xA;&#xD;&#xA;http://www.undisciplinedbytes.com/2010/06/html-5-c-web-sockets-server-and-asp-net-client-implementation/" />
  <row Id="11993" PostHistoryTypeId="5" PostId="6022" RevisionGUID="5fc9f5e5-e35c-4bc4-a775-777e6e6a1f50" CreationDate="2010-11-28T19:46:32.800" UserId="962" Comment="Added examples" Text="This is assuming you are storing the ASCII art as bitmaps instead of text rendering, which is better for performance, flexibility, and can facilitate easy to implement custom tile-sets.&#xD;&#xA;&#xD;&#xA;**Instead of changing the colors depending on the background colors, make all the ASCII art light toned, and have a slight drop shadow effect pre-rendered onto the bitmaps.**&#xD;&#xA;&#xD;&#xA;This will make the characters and items show up nicely on all colors/shades/tones.&#xD;&#xA;&#xD;&#xA;*Edit: Here are some examples*&#xD;&#xA;&#xD;&#xA;With a shadow&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Without a shadow&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/XOlMJ.png&#xD;&#xA;&#xD;&#xA;  [2]: http://i.stack.imgur.com/DnAmX.png" />
  <row Id="11995" PostHistoryTypeId="4" PostId="6009" RevisionGUID="db902159-0ae2-4ae3-a623-5a08e6088892" CreationDate="2010-11-28T21:05:21.433" UserId="3637" Comment="edited title" Text="Arc Length of Bezier Curves" />
  <row Id="11996" PostHistoryTypeId="16" PostId="6021" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-28T21:26:24.410" UserId="51" />
  <row Id="11997" PostHistoryTypeId="16" PostId="6023" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-28T21:26:24.410" UserId="51" />
  <row Id="11998" PostHistoryTypeId="16" PostId="6008" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-11-28T21:26:24.410" UserId="51" />
  <row Id="11999" PostHistoryTypeId="2" PostId="6025" RevisionGUID="399ebdcb-17bd-4342-a32f-3bcf7ca0a4d1" CreationDate="2010-11-29T04:49:05.243" UserId="3650" Text="I have used OpenGL 2 for many years, and I have just recently learned the basics of OpenGL 3. Having learned both, I would recommend without a doubt that you learn OpenGL 2 first. And I wouldn't even say &quot;avoid using functions which are deprecated in OpenGL 3&quot;, because *pretty much everything* is deprecated in OpenGL 3. Basically, OpenGL 3 is ridiculously hard for a newbie to learn, so you should first learn OpenGL 2 and then read up on what it takes to get OpenGL 3 working.&#xD;&#xA;&#xD;&#xA;In OpenGL 2, there are two modes of sending mesh data to the GPU -- &quot;immediate mode&quot; (glBegin, glVertex, glEnd) and &quot;retained mode&quot; (vertex buffers and so on). And then there are two ways to have your meshes displayed -- &quot;fixed functionality&quot; (the graphics card will automatically transform your vertices into the correct place on the screen, perform simple lighting calculations, etc) or &quot;custom shaders&quot; (you must write all the transformation and lighting calculations yourself in a language called GLSL).&#xD;&#xA;&#xD;&#xA;So whenever you use OpenGL 2, you must make those two orthogonal choices: immediate vs retained, and fixed functionality vs custom shaders. Immediate is easier than retained, and fixed is easier than shaders. But the immediate mode is awful for performance (as you must send the full mesh data to the GPU every single frame), and the fixed functionality will not work for any effects you might have seen in the last 8 years or so, like bump mapping and phong shading. So both immediate mode and fixed functionality have been removed from OpenGL 3.&#xD;&#xA;&#xD;&#xA;That's why I recommend you learn OpenGL 2 first. Maybe try immediate mode with fixed functionality. Then go up to retained mode (use vertex buffers). Then try writing a custom vertex and fragment shader in GLSL. Only once you have mastered all of that will you be able to even *think* about not using any of the deprecated functions (since in OpenGL 3, you must *always* use retained mode and write your own shaders). Finally, you will be able to switch over to OpenGL 3.&#xD;&#xA;&#xD;&#xA;If you are actually releasing a game, OpenGL 2 is fine and will be supported for many years. But there is still a good reason to be using retained mode (speed) and custom shaders (better lighting and cool effects)." />
  <row Id="12003" PostHistoryTypeId="5" PostId="5988" RevisionGUID="5604be6e-de38-42ec-9b18-57625c754b05" CreationDate="2010-11-29T10:05:01.223" UserId="3624" Comment="added 1335 characters in body; deleted 54 characters in body" Text="I have a little problem with designing editor in xna. I have Content types like&#xD;&#xA;`TilemapContent` and then runtime types like `TilemapData` (that are automaticly converted by content pipeline)&#xD;&#xA;&#xD;&#xA;but in editor, i think i need to work with `TilemapContent` (so that i can save it as such later), but `TilemapContent` contains things like `ExternalReference&lt;Texture2DContent&gt;` instead of `Texture2D`, so there is no way i could render such thing.&#xD;&#xA;&#xD;&#xA;One &quot;solution&quot; that i can think of is every time i make a change to `TilemapContent`, i need to rebuild it and then reload `TilemapData` (and i guess this would be really slow)&#xD;&#xA;&#xD;&#xA;Another solution would be to write third class `TilemapEditorData` and inside it write method that would convert that class to `TilemapContent`. But this would be third class, with almost same data, and it would require me to write something that would convert things like Texture2DContent to Texture2D.&#xD;&#xA;&#xD;&#xA;So question is, how is this thing done? Can i have different content type and runtime type and still make an editor?&#xD;&#xA;&#xD;&#xA;**EDIT**: source&#xD;&#xA;&#xD;&#xA;&gt; ContentPipelineExtension project&#xD;&#xA;&#xD;&#xA;    [ContentSerializerRuntimeType(&quot;Data.TileMapData, Game&quot;)]&#xD;&#xA;    public class TilemapContent&#xD;&#xA;    {&#xD;&#xA;         public int Width { get; set; }&#xD;&#xA;         public int Height { get; set; }&#xD;&#xA;         public ExternalReference&lt;Texture2DContent&gt; Texture { get; set; }&#xD;&#xA;         public int[] Tiles { get; set; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Map.xml&#xD;&#xA;&#xD;&#xA;    &lt;XnaContent&gt;&#xD;&#xA;      &lt;Asset Type=&quot;Content.TilemapContent&quot;&gt;&#xD;&#xA;        &lt;Width&gt;3&lt;/Width&gt;&#xD;&#xA;        &lt;Height&gt;3&lt;/Height&gt;&#xD;&#xA;        &lt;Texture&gt;&#xD;&#xA;          &lt;Reference&gt;#External1&lt;/Reference&gt;&#xD;&#xA;        &lt;/Texture&gt;&#xD;&#xA;        &lt;Tiles&gt;&#xD;&#xA;          0 1 0&#xD;&#xA;          0 0 1&#xD;&#xA;          0 0 0&#xD;&#xA;        &lt;/Tiles&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;      &lt;ExternalReferences&gt;&#xD;&#xA;        &lt;ExternalReference ID=&quot;#External1&quot; TargetType=&quot;Microsoft.Xna.Framework.Content.Pipeline.Graphics.Texture2DContent&quot;&gt;raytileset.jpg&lt;/ExternalReference&gt;&#xD;&#xA;      &lt;/ExternalReferences&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;(i have custom ContentProcessor that will build all external references in xml file)&#xD;&#xA;&#xD;&#xA;&gt; Game project&#xD;&#xA;&#xD;&#xA;       public class TilemapData&#xD;&#xA;        {&#xD;&#xA;            public int Width { get; set; }&#xD;&#xA;            public int Height { get; set; }&#xD;&#xA;    &#xD;&#xA;            public Texture2D Texture;&#xD;&#xA;    &#xD;&#xA;            public int[] Tiles { get; set; }&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12004" PostHistoryTypeId="5" PostId="5988" RevisionGUID="25eb7213-cba8-43f4-91c1-ab0b21a18f65" CreationDate="2010-11-29T10:12:33.890" UserId="3624" Comment="added 110 characters in body" Text="I have a little problem with designing editor in xna. I have Content types like&#xD;&#xA;`TilemapContent` and then runtime types like `TilemapData` (that are automaticly converted by content pipeline)&#xD;&#xA;&#xD;&#xA;but in editor, i think i need to work with `TilemapContent` (so that i can save it as such later), but `TilemapContent` contains things like `ExternalReference&lt;Texture2DContent&gt;` instead of `Texture2D`, so there is no way i could render such thing.&#xD;&#xA;&#xD;&#xA;One &quot;solution&quot; that i can think of is every time i make a change to `TilemapContent`, i need to rebuild it and then reload `TilemapData` (and i guess this would be really slow)&#xD;&#xA;&#xD;&#xA;Another solution would be to write third class `TilemapEditorData` and inside it write method that would convert that class to `TilemapContent`. But this would be third class, with almost same data, and it would require me to write something that would convert things like Texture2DContent to Texture2D.&#xD;&#xA;&#xD;&#xA;So question is, how is this thing done? Can i have different content type and runtime type and still make an editor?&#xD;&#xA;&#xD;&#xA;**EDIT**: source&#xD;&#xA;&#xD;&#xA;&gt; ContentPipelineExtension project&#xD;&#xA;&#xD;&#xA;    [ContentSerializerRuntimeType(&quot;Data.TileMapData, Game&quot;)]&#xD;&#xA;    public class TilemapContent&#xD;&#xA;    {&#xD;&#xA;         public int Width { get; set; }&#xD;&#xA;         public int Height { get; set; }&#xD;&#xA;         public ExternalReference&lt;Texture2DContent&gt; Texture { get; set; } // i need this in editor so i can change tileset texture&#xD;&#xA;         public int[] Tiles { get; set; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Map.xml&#xD;&#xA;&#xD;&#xA;    &lt;XnaContent&gt;&#xD;&#xA;      &lt;Asset Type=&quot;Content.TilemapContent&quot;&gt;&#xD;&#xA;        &lt;Width&gt;3&lt;/Width&gt;&#xD;&#xA;        &lt;Height&gt;3&lt;/Height&gt;&#xD;&#xA;        &lt;Texture&gt;&#xD;&#xA;          &lt;Reference&gt;#External1&lt;/Reference&gt;&#xD;&#xA;        &lt;/Texture&gt;&#xD;&#xA;        &lt;Tiles&gt;&#xD;&#xA;          0 1 0&#xD;&#xA;          0 0 1&#xD;&#xA;          0 0 0&#xD;&#xA;        &lt;/Tiles&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;      &lt;ExternalReferences&gt;&#xD;&#xA;        &lt;ExternalReference ID=&quot;#External1&quot; TargetType=&quot;Microsoft.Xna.Framework.Content.Pipeline.Graphics.Texture2DContent&quot;&gt;raytileset.jpg&lt;/ExternalReference&gt;&#xD;&#xA;      &lt;/ExternalReferences&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;(i have custom ContentProcessor that will build all external references in xml file)&#xD;&#xA;&#xD;&#xA;&gt; Game project&#xD;&#xA;&#xD;&#xA;       public class TilemapData&#xD;&#xA;        {&#xD;&#xA;            public int Width { get; set; }&#xD;&#xA;            public int Height { get; set; }&#xD;&#xA;    &#xD;&#xA;            public Texture2D Texture; // and i need this in editor so i can render tilemap&#xD;&#xA;    &#xD;&#xA;            public int[] Tiles { get; set; }&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12005" PostHistoryTypeId="2" PostId="6027" RevisionGUID="a4eafc99-4ce4-4a54-bd40-23b13d7802da" CreationDate="2010-11-29T10:23:47.787" UserId="364" Text="__If C++ template magic is not a problem for you and you already have Boost installed to work with__:&#xD;&#xA;&#xD;&#xA;Boost now have an efficient ([in speed and size][1]) **[meta-state-machine library][2]** that have the advantage of [letting you set the transition table separately from the states structures][3] : you have a table that describe when to go from wich state to witch other state. You just have to read it to understand what's going on in the state machine. &#xD;&#xA;&#xD;&#xA;The other advantage is that it have been tested by several enterprises even in embedded softwares with high-performance software (see the boost mailing list for details). As the implementation is already there, it might be a good choice if you need a generic state machine implementation that Just Works(tm).&#xD;&#xA;&#xD;&#xA;It also support orthogonal states (parallel states) and other useful UML-based features.&#xD;&#xA;&#xD;&#xA;It also provide several ways to express the transition table, [one being experimental but interesting on the expressivity side][4] (although limited by current compiler performance -- too bad!) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/ch04.html&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/index.html&#xD;&#xA;  [3]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/ch03s02.html&#xD;&#xA;  [4]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/ch03s04.html" />
  <row Id="12006" PostHistoryTypeId="2" PostId="6028" RevisionGUID="9ba510e3-c4bf-4996-a22f-b9f97ebb9093" CreationDate="2010-11-29T10:53:21.797" UserId="3339" Text="Direct Promotion. &#xD;&#xA;&#xD;&#xA;Search for game developers which you'll think your music match in their current or previous products and send a simple email introducing yourself.&#xD;&#xA;I'll even send an email to devs even if your music doesn't fit with previous projects, as you never know what could be building: today is a educational game, tomorrow maybe a Satanic Hack'n' slash Gore game that would make God Of War rate C ;)&#xD;&#xA;" />
  <row Id="12007" PostHistoryTypeId="2" PostId="6029" RevisionGUID="143c36f4-0336-4a7b-be0a-594595a2621d" CreationDate="2010-11-29T12:08:59.073" UserId="2205" Text="I wish to address the low re-usability of game technology (at least provide a theoretical solution).&#xD;&#xA;&#xD;&#xA;I'm considering an approach using a semantic game format, effectively decoupling the story and logic of games from its presentation and art. I can see a few immediate advantages:&#xD;&#xA;&#xD;&#xA; * Completely platform independent games (think SCUMM games)&#xD;&#xA; * Optionally: presentation independent games (cheaper and more flexible)&#xD;&#xA; * Game editors can provide different specialized game construction UI's, but producing the same game format. (think bytecode)&#xD;&#xA; * Game engine technology (voice synthesis, facial synthesis, skeleton animation etc. etc.) can be reused across games as a part of (or extensions to) the semantic game format/language.&#xD;&#xA; * Game art and game technology can be licensed extensions, paid by game distributors, independent of client platforms.&#xD;&#xA;&#xD;&#xA;Apart from the huge resources needed to establish such a game format/language, are there any theoretical limitations that should stop this concept?" />
  <row Id="12008" PostHistoryTypeId="1" PostId="6029" RevisionGUID="143c36f4-0336-4a7b-be0a-594595a2621d" CreationDate="2010-11-29T12:08:59.073" UserId="2205" Text="Is semantic games a good idea?" />
  <row Id="12009" PostHistoryTypeId="3" PostId="6029" RevisionGUID="143c36f4-0336-4a7b-be0a-594595a2621d" CreationDate="2010-11-29T12:08:59.073" UserId="2205" Text="&lt;engine&gt;" />
  <row Id="12010" PostHistoryTypeId="6" PostId="6029" RevisionGUID="28044c7b-d69d-4df5-b3d0-d795279bff16" CreationDate="2010-11-29T12:22:04.067" UserId="2205" Comment="Added more tags: engigne-architecture, architecture, resources and cross-platform" Text="&lt;engine&gt;&lt;architecture&gt;&lt;cross-platform&gt;&lt;resources&gt;" />
  <row Id="12011" PostHistoryTypeId="2" PostId="6030" RevisionGUID="4d5f689e-57d5-476f-8eeb-4f28462cc8fd" CreationDate="2010-11-29T12:24:28.057" UserId="802" Text="As an independent game developer I would tell you that, for us, it is very difficult to find the right music for our games... It should not be difficult for you to find games that match your music style. Just set up a webpage with some examples of your music and promote it in game development forums. If it is good, you will get a lot of responses, I'm sure!" />
  <row Id="12012" PostHistoryTypeId="2" PostId="6031" RevisionGUID="4fea8982-fc62-43f9-83b6-d8a2cc476d04" CreationDate="2010-11-29T12:33:49.220" UserId="3654" Text="Decoupling a game from its hardware is hard, most games dont even trust the operative system it runs on to provide functionality. How is this not like a java openGL application bundeled with some libraries(platform independant)? I think maybe the assumption that there is low re-usability in game development is wrong." />
  <row Id="12013" PostHistoryTypeId="2" PostId="6032" RevisionGUID="4a9e1028-7a91-426d-9e74-1b5847ef0452" CreationDate="2010-11-29T12:52:18.130" UserId="2188" Text="So instead of coding the game using a real programming language, you have to code it into a new very specialised language that as of now nobody knows.&#xD;&#xA;&#xD;&#xA;I can't picture \*anyone\* willing to do that.&#xD;&#xA;&#xD;&#xA;Even if someone for some weird reasons would accept to do that, development will sooner or later crash against something that that language does not implement, or does not implement it well." />
  <row Id="12014" PostHistoryTypeId="2" PostId="6033" RevisionGUID="ebd98067-35aa-4e11-8a1c-c4bd89df1457" CreationDate="2010-11-29T15:01:08.320" UserId="3656" Text="Programming Game AI By Example (http://www.ai-junkie.com/books/toc_pgaibe.html) has an example implementation that's pretty straightforward and just handles the basics. Transitions are handled in a single method call (first Enter(), then Execute() every update, Exit() when transitioning)&gt; I don't know what you'd need besides that. I would implement more complicated transitions as states of their own that are just designed to execute once and move to the next state in sequence.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'll take a stab and assume you're looking at FSMs for AI, if so I recommend you take a look at behavior trees. [AIGameDev][2] has some great articles on it.&#xD;&#xA;&#xD;&#xA;  [2]: http://aigamedev.com/open/articles/decorator/" />
  <row Id="12015" PostHistoryTypeId="2" PostId="6034" RevisionGUID="ec079781-1b35-411d-812d-dd360d6f65de" CreationDate="2010-11-29T15:08:30.340" UserId="3656" Text="This isn't your games as the soundtrack, but [Rock Band Network][1] (currently under maintenance while they change stuff for Rock Band 3 compatibility, but should be back up soon) is simply awesome. You can author everything yourself, and the only cost is an XNA Creators Club account and an Xbox 36 ($300 for the Xbox, $100 for a year of creators club, which you can actually put off on getting until you're ready to test).&#xD;&#xA;&#xD;&#xA;Another alternative is to just go make your own game. Shinobi Ninja just went and made an iPhone game about themselves:&#xD;&#xA;itunes.apple.com/us/app/brooklyn-to-babylon-shinobi/id347930797?mt=8&#xD;&#xA;&#xD;&#xA;They contracted a developer, so there was that cost involved. Make friends with computer science majors. ;)&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.rockband.com/" />
  <row Id="12016" PostHistoryTypeId="2" PostId="6035" RevisionGUID="5b4e56c7-7450-49f2-9dc6-c6e77d4b87de" CreationDate="2010-11-29T15:25:01.117" UserId="3656" Text="http://forums.indiegamer.com/ has a music section.&#xD;&#xA;&#xD;&#xA;Also, look for announcements for G.A.N.G. events, that's where all the audio guys interested in games hang out." />
  <row Id="12017" PostHistoryTypeId="2" PostId="6036" RevisionGUID="3da7ae13-2129-4865-9e1e-eb1a5e6e41dd" CreationDate="2010-11-29T15:29:18.613" UserId="3656" Text="Cross-platform Game Maker???&#xD;&#xA;&#xD;&#xA;It sounds like you're just describing a suite of really well integrated libraries with scaffolding and language binding for some special intuitive language. This applies to Torque2d, DarkBasic, Game Maker, and many other tools. What's different about your idea? Scratch looks like another variant on Carnegie Mellon's Alice or Game Maker." />
  <row Id="12018" PostHistoryTypeId="2" PostId="6037" RevisionGUID="0a8a6cd8-8a3e-4ac5-9ba7-a39efe2f6be3" CreationDate="2010-11-29T15:34:30.033" UserId="51" Text="I can't imagine working in an environment like that and getting the results I want.&#xD;&#xA;&#xD;&#xA;Either you're expressing things on such a high level that everything starts to feel the same (because you're not providing enough detail to be different), or you're going into so much detail that you might as well be working in a more expressive system.&#xD;&#xA;&#xD;&#xA;As Joe said, separating the &quot;model&quot; and the &quot;view&quot; of games isn't that easy.  AI is coupled to animation.  Animation is coupled to gameplay (for example, reload speed of weapons).  Art and design are tied together.  You have a prop in a level and it serves many purposes: correctly fitting in with the style, fitting in with the theme, and being the correct height for cover.  &#xD;&#xA;&#xD;&#xA;Not to mention the fact that graphics are still an arms race.  Separating the game from the hardware might seem like a noble goal but it isn't going to fly in the AAA console world where you want to take as much advantage of the platform as possible.&#xD;&#xA;&#xD;&#xA;Maybe it might work for a tiny subset of games with a known problem set in the hobbyist market.  I could see this working in, say, a DND-style RPG world.  But for games in general, no.&#xD;&#xA;&#xD;&#xA;That's not to say that the existing tools don't need help.  There's lots of work that needs to be done there.  I just don't see that direction really helping the majority of games." />
  <row Id="12020" PostHistoryTypeId="2" PostId="6039" RevisionGUID="8ee2e28e-b4b0-437f-9b70-dfb179245357" CreationDate="2010-11-29T15:53:06.073" UserDisplayName="Donald_W" Text="Well we're using Mac Minis for the iPhone development (kinda old macs, Core 2 Duo 2Ghz, 2GB RAM, integrated graphics) and it's fine. OS: Leopard / Snow Leopard." />
  <row Id="12021" PostHistoryTypeId="2" PostId="6040" RevisionGUID="0d51166a-7705-4fad-8243-622ac7241a5a" CreationDate="2010-11-29T15:59:10.170" UserId="3659" Text="I am making a turn based game with tiles, much like Final Fantasy Tactics.&#xD;&#xA;I am trying to develop an algorithm for mapping out a list of available tiles to walk on. &#xD;&#xA;So for example, I am at (0,0) and I have a range of 2 - ie I can walk to any tiles that within two tiles away from me.&#xD;&#xA;&#xD;&#xA;Things to account for:&#xD;&#xA;&#xD;&#xA;- I have a set number of steps I can take - which was 2 in the example above&#xD;&#xA;- There may be enemies or walls that will block my path&#xD;&#xA;- The tiles are hex-based so I have 6 possible places to move to&#xD;&#xA;&#xD;&#xA;The plan is basically to&#xD;&#xA;&#xD;&#xA;- determine the places I can walk to&#xD;&#xA;- if the tile is available, add it to a list of walkable tiles from this location - so that I can use it in a pathfinding algorithm and so that I don't have check this location again&#xD;&#xA;&#xD;&#xA;Basically I need an algorithm to map possible paths from a location. I thought of the A*,dijkstra, bfs,dfs but I think they require knowing the nodes beforehand. &#xD;&#xA;&#xD;&#xA;Any help would be appreciated, thanks!&#xD;&#xA;&#xD;&#xA;P.S. Path-mapping would be a better tag but I can't make a new one." />
  <row Id="12022" PostHistoryTypeId="1" PostId="6040" RevisionGUID="0d51166a-7705-4fad-8243-622ac7241a5a" CreationDate="2010-11-29T15:59:10.170" UserId="3659" Text="What algorithm to use for path mapping?" />
  <row Id="12023" PostHistoryTypeId="3" PostId="6040" RevisionGUID="0d51166a-7705-4fad-8243-622ac7241a5a" CreationDate="2010-11-29T15:59:10.170" UserId="3659" Text="&lt;tiles&gt;&lt;path-finding&gt;&lt;turn-based-strategy&gt;" />
  <row Id="12024" PostHistoryTypeId="6" PostId="6005" RevisionGUID="4d112d58-b292-4cc5-961a-0e1f60662811" CreationDate="2010-11-29T16:27:04.127" UserId="1477" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;&lt;architecture&gt;&lt;state&gt;&lt;gameloop&gt;" />
  <row Id="12025" PostHistoryTypeId="2" PostId="6041" RevisionGUID="33a32780-e2f2-4f10-9030-37e187ead1d4" CreationDate="2010-11-29T16:28:49.273" UserId="51" Text="&gt; I thought of the A*,dijkstra, bfs,dfs but I think they require knowing the nodes beforehand.&#xD;&#xA;&#xD;&#xA;You can use those just fine.  Your problem set is small enough I'm sure that you don't need to precompute anything. Just run A* every move and you'll have your paths computed given whatever the state of the board is." />
  <row Id="12030" PostHistoryTypeId="2" PostId="6043" RevisionGUID="610ff20b-89f1-49f7-9662-fbcb57404bcb" CreationDate="2010-11-29T17:04:52.320" UserId="1743" Text="I'm struggling with coming up with an elegant solution to generating random events in the game that I'm working on.&#xD;&#xA;&#xD;&#xA;Say there are 4 classes of events that can happen, with varying events in those classes that may occur.&#xD;&#xA;&#xD;&#xA;So something along the lines of &#xD;&#xA;&#xD;&#xA;    main_events = {&quot;common event&quot;, &quot;not so common event&quot;, &quot;somewhat rare event&quot;, &quot;rare event&quot;}&#xD;&#xA;    sub_events[0] = {&quot;common event 1&quot;, &quot;common event 2&quot;,..}&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;I have a somewhat kludgey solution in place that first just has a random number generated between 0 and 100, and if the number falls within a given range then a main event will be triggered.  Then I'll do another random roll to see which sub event occurs.&#xD;&#xA;&#xD;&#xA;Is there a better solution than something along these lines?  Like I mention, it doesn't feel very elegant, and I'd like to make it easily expandable for the addition of future events.&#xD;&#xA;" />
  <row Id="12031" PostHistoryTypeId="1" PostId="6043" RevisionGUID="610ff20b-89f1-49f7-9662-fbcb57404bcb" CreationDate="2010-11-29T17:04:52.320" UserId="1743" Text="Algorithm for determining random events" />
  <row Id="12032" PostHistoryTypeId="3" PostId="6043" RevisionGUID="610ff20b-89f1-49f7-9662-fbcb57404bcb" CreationDate="2010-11-29T17:04:52.320" UserId="1743" Text="&lt;game-design&gt;&lt;algorithm&gt;&lt;random&gt;&lt;events&gt;" />
  <row Id="12033" PostHistoryTypeId="2" PostId="6044" RevisionGUID="8648c421-f2c5-45ff-aa24-9e25447d20f5" CreationDate="2010-11-29T17:19:25.450" UserId="3659" Text="Thanks Tetrad, I found out how to do it.&#xD;&#xA;Basically, for all the tiles in my range, I apply A* from that tile to where I am standing on.  Also assign a very high value to walls/enemies. Then if I can reach my location within 2-moves, then that tile is valid. Then I can add it to my list of nodes.&#xD;&#xA;&#xD;&#xA;Its sort of like applying A* but in the opposite direction" />
  <row Id="12034" PostHistoryTypeId="2" PostId="6045" RevisionGUID="2c37faf2-5736-4260-b1fe-76349f2c2e77" CreationDate="2010-11-29T17:35:28.173" UserId="3318" Text="(This is based on my answer for [a similar question on Stack Overflow](http://stackoverflow.com/questions/3153534/i-need-random-algorithm-with-weighing-options-in-net/3153764).)&#xD;&#xA;&#xD;&#xA;It sounds like you're asking for a more flexible way of specifying weights. For that, you can use a simple weighing algorithm: simply decide how common each event should be and assign it a weight that is appropriate compared to the other weights. For example, if you have events A, B and C, with probabilities 70%, 25% and 5%, you could give them the weights 70, 25 and 5 (or 14, 5, and 1 - the important thing is the relative difference).&#xD;&#xA;&#xD;&#xA;Once you have that, you can use the following algorithm to select an event:&#xD;&#xA;&#xD;&#xA;Given a list L of items (I,W), where I is the item and W is the weight:&#xD;&#xA;&#xD;&#xA; 1. Add all of the weights together. Call this sum S.&#xD;&#xA; 2. Generate a random number between 0 and S (excluding S, but including 0). Call this value R.&#xD;&#xA; 3. Initialize a variable to 0 to keep track of the running total. We'll call this T.&#xD;&#xA; 4. For each item (I,W) in L:&#xD;&#xA;    1. T=T+W&#xD;&#xA;    2. If T &gt; R, return I.&#xD;&#xA;&#xD;&#xA;It's up to you if you want to first select between the different groups of events, or if you want a single table with all of the events (where each &quot;group&quot; has an appropriate sum compared to the others)." />
  <row Id="12035" PostHistoryTypeId="2" PostId="6046" RevisionGUID="80ac76b9-ecc7-456b-80d6-dd6c7855ad57" CreationDate="2010-11-29T17:47:16.790" UserId="3656" Text="Don't use existing music, hire a composer to write a parody song or something stylistically similar. Game soundtracks should be unique. ;)" />
  <row Id="12036" PostHistoryTypeId="2" PostId="6047" RevisionGUID="20117b3c-8fab-4a42-853d-7163a7837a31" CreationDate="2010-11-29T18:00:30.733" UserId="1101" Text="Breadth-first or depth-first search would do this job more efficiently than your answer suggesting that you will use A*. You can search each node with one run of the algorithm instead of one run for each node.&#xD;&#xA;&#xD;&#xA;Pseudocode for a depth-first approach might look like this:&#xD;&#xA;&#xD;&#xA;    reachable_places_list = empty list (or set, or map, or something similar)&#xD;&#xA;    &#xD;&#xA;    function find_all_reachable_nodes(current_node, distance_travelled):&#xD;&#xA;        for each node adjacent to current_node that is reachable:&#xD;&#xA;            add node to reachable_places_list if it's not already there&#xD;&#xA;            if distance_travelled + 1 &lt; 2:&#xD;&#xA;                find_all_reachable_nodes(node, distance_travelled + 1)&#xD;&#xA;    &#xD;&#xA;    find_all_reachable_nodes(player_position, 0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You also don't need to use 'a very high value' to exclude blocked nodes from a graph search (whether A*, DFS, BFS, or whatever) - simply don't add them to the list or queue of nodes to be queried in future.&#xD;&#xA;" />
  <row Id="12037" PostHistoryTypeId="2" PostId="6048" RevisionGUID="f1121250-4d60-43ef-81cf-a9945662804c" CreationDate="2010-11-29T18:12:03.110" UserId="3656" Text="Put SOME sort of continuous background soundtrack in there. It disturbs me when games are completely silent but I haven't told it to mute anything. Always have the option to turn it off of course, but don't just leave it with a sparse range shuffle noises.&#xD;&#xA;&#xD;&#xA;If you're going for the Windows Solitaire feel, then this question is already answered for you: it'd be better to have no sound at all. But then you should ask yourself, why are you remaking Windows Solitaire? This is your game--make it interesting!&#xD;&#xA;&#xD;&#xA;Not that there's anything wrong with remaking Solitaire. But it feels to me like that'd be a stepping stone to bigger games, and if so, start making those!" />
  <row Id="12038" PostHistoryTypeId="5" PostId="6045" RevisionGUID="1436affd-b3d5-4231-98a6-df4f4a8d7761" CreationDate="2010-11-29T18:12:56.500" UserId="3318" Comment="added 22 characters in body" Text="(This is based on my answer for [a similar question on Stack Overflow](http://stackoverflow.com/questions/3153534/i-need-random-algorithm-with-weighing-options-in-net/3153764).)&#xD;&#xA;&#xD;&#xA;It sounds like you're asking for a more flexible way of specifying the probability of each event. For that, you can use a simple weighing algorithm: simply decide how common each event should be and assign it a weight that is appropriate compared to the other weights. For example, if you have events A, B and C, with probabilities 70%, 25% and 5%, you could give them the weights 70, 25 and 5 (or 14, 5, and 1 - the important thing is the relative difference).&#xD;&#xA;&#xD;&#xA;Once you have that, you can use the following algorithm to select an event:&#xD;&#xA;&#xD;&#xA;Given a list L of items (I,W), where I is the item and W is the weight:&#xD;&#xA;&#xD;&#xA; 1. Add all of the weights together. Call this sum S.&#xD;&#xA; 2. Generate a random number between 0 and S (excluding S, but including 0). Call this value R.&#xD;&#xA; 3. Initialize a variable to 0 to keep track of the running total. We'll call this T.&#xD;&#xA; 4. For each item (I,W) in L:&#xD;&#xA;    1. T=T+W&#xD;&#xA;    2. If T &gt; R, return I.&#xD;&#xA;&#xD;&#xA;It's up to you if you want to first select between the different groups of events, or if you want a single table with all of the events (where each &quot;group&quot; has an appropriate sum compared to the others)." />
  <row Id="12039" PostHistoryTypeId="2" PostId="6049" RevisionGUID="a15185dc-dda0-4ab2-b95e-96b264b5ac35" CreationDate="2010-11-29T18:14:19.483" UserId="3656" Text="As a supplement to Martin's answer (can't comment yet, otherwise I would just do that):&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/article/dynamic_audio" />
  <row Id="12040" PostHistoryTypeId="2" PostId="6050" RevisionGUID="37157af8-3464-40e8-bf95-a8044ce7e576" CreationDate="2010-11-29T19:38:42.623" UserId="1829" Text="Being a Gran Turismo fan, I'm wondering what are the algorithms used to compute realistic behavior for friction, aerodynamism, velocity, curves etc.&#xD;&#xA;&#xD;&#xA;Also, are there sophisticated ways to simulate fluid mechanics in flight simulation which are trivial enough for an amateur project ?&#xD;&#xA;&#xD;&#xA;If I wanted to build a flight simulator, neglecting the parameters which have the littlest effect (temperature, pressure, humidity, friction of the air on the wings, gravitational center of the plane, etc), are there some kind of physical formulae or programming models I should know about ?&#xD;&#xA;&#xD;&#xA;Or does physics engine feature such kind of simulation dedicated calculation ?" />
  <row Id="12041" PostHistoryTypeId="1" PostId="6050" RevisionGUID="37157af8-3464-40e8-bf95-a8044ce7e576" CreationDate="2010-11-29T19:38:42.623" UserId="1829" Text="How are physical model programmed in simulation games ?" />
  <row Id="12042" PostHistoryTypeId="3" PostId="6050" RevisionGUID="37157af8-3464-40e8-bf95-a8044ce7e576" CreationDate="2010-11-29T19:38:42.623" UserId="1829" Text="&lt;physics&gt;&lt;simulations&gt;" />
  <row Id="12046" PostHistoryTypeId="2" PostId="6052" RevisionGUID="2167200c-081c-42e5-b285-49154fbe44d0" CreationDate="2010-11-29T20:04:40.180" UserId="2653" Text="Michael's solution is perfect if you want a single table of possible events.&#xD;&#xA;&#xD;&#xA;Let's say you want to build a random insult generator, though. In this case, a series of tables would work best. You'd start with a table that has a list of general patterns. For example,&#xD;&#xA;&#xD;&#xA;    Your [RELATIVE] [RELATION] [ANIMAL]!&#xD;&#xA;    Go [VERB] [NOUN] in your [ORIFICE]!&#xD;&#xA;&#xD;&#xA;Now say the random generator picks the second pattern. You call the verb table, which has entries like:&#xD;&#xA;&#xD;&#xA;    stick&#xD;&#xA;    jam&#xD;&#xA;    shove&#xD;&#xA;&#xD;&#xA;But here's where it gets interesting, your noun table might look like&#xD;&#xA;&#xD;&#xA;    [ANIMAL]&#xD;&#xA;    your [RELATIVE]&#xD;&#xA;    [ADJECTIVE] [NOUN]&#xD;&#xA;&#xD;&#xA;So you see, in this manner you can generate sophisticated and complex results.&#xD;&#xA;&#xD;&#xA;As for actually implementing something like this, here's an example of how you might do it in JavaScript.&#xD;&#xA;&#xD;&#xA;	function Noun() {&#xD;&#xA;		var items = 3;&#xD;&#xA;		var i = Math.floor(Math.random()*items);&#xD;&#xA;		switch (i)&#xD;&#xA;			case 0:&#xD;&#xA;				return Animal();&#xD;&#xA;				break;&#xD;&#xA;			case 1:&#xD;&#xA;				return &quot;your &quot; + Relative();&#xD;&#xA;				break;&#xD;&#xA;			case 2:&#xD;&#xA;				return Adjective() + Noun();&#xD;&#xA;				break;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Obviously this is a crude example (you might generate, for example, &quot;Go shove flaming your mom in your eye socket!&quot;), but it's meant more as an illustration, since I don't think I explained it very well..." />
  <row Id="12050" PostHistoryTypeId="2" PostId="6053" RevisionGUID="aea691e2-f509-4021-ae9c-6918c52bac07" CreationDate="2010-11-29T20:38:57.577" UserId="1156" Text="My game is having a map like that of Minecraft, in the way it's pseudoinfinite and randomly generated. And big. Say the user has explored a 1000x1000 zone (2D here), so that's 1,000,000 tiles.&#xD;&#xA;&#xD;&#xA;Obviously I'm not going to be able to store it all in memory. Nor do I just want to ignore everything out of a 10 tile or whatever radius - both will nothing update (all the NPCs, perhaps reactive tiles) and I would have to work with awkward positions like 1382,12918. &#xD;&#xA;&#xD;&#xA;So if I was to split it down into chunks or zones or whatever of say 64x64 tiles, I would have to store each tile and object's position like:&#xD;&#xA;&#xD;&#xA;&gt; Chunk a,b. Position x, y.&#xD;&#xA;&#xD;&#xA;But what if I wanted dungeons and the like in my map? So a single tile that leads to maybe a 40 floor dungeon, each with an area of 40x40. I can't exactly store those in the same map. &#xD;&#xA;&#xD;&#xA;And there's the memory side; how much could I potentially store in memory at the same time reasonably? I could do tiles by ID quite easily, and have the normal 2D array there. **Or again, is there a more effective solution than having a data file of tile types**? So for a 64x64..that's only going to be 20K or whatever. I'd like as much as possible surrounding to be loaded for the most realistic update. But I don't know what sort of limits I can hit without becoming memory hogging.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12051" PostHistoryTypeId="1" PostId="6053" RevisionGUID="aea691e2-f509-4021-ae9c-6918c52bac07" CreationDate="2010-11-29T20:38:57.577" UserId="1156" Text="'Zoning' up areas on a large tile map, as well as dungeons" />
  <row Id="12052" PostHistoryTypeId="3" PostId="6053" RevisionGUID="aea691e2-f509-4021-ae9c-6918c52bac07" CreationDate="2010-11-29T20:38:57.577" UserId="1156" Text="&lt;tiles&gt;&lt;maps&gt;&lt;memory-efficiency&gt;" />
  <row Id="12053" PostHistoryTypeId="2" PostId="6054" RevisionGUID="1a7470bf-2525-47ee-b0fb-5934700a7194" CreationDate="2010-11-29T21:11:12.103" UserId="744" Text="Why can't you store one million tiles in memory? Even my phone has 256MB RAM; a million empty tiles is going to be what, 4-32MB?" />
  <row Id="12054" PostHistoryTypeId="2" PostId="6055" RevisionGUID="4c6eac7d-846b-47a4-bd42-8658cb35bbde" CreationDate="2010-11-29T21:22:54.607" UserId="51" Text="One of the things that is quickly making the rounds as a easy filtering mechanism is codility.&#xD;&#xA;&#xD;&#xA;http://codility.com/&#xD;&#xA;&#xD;&#xA;It's a service you pay for to give automated timed programming tests.  The bad thing is that there are a fixed number of tests.  The good thing is that the tests are automatically graded by unit tests.  So for culling a large number of people this might be a good approach." />
  <row Id="12055" PostHistoryTypeId="2" PostId="6056" RevisionGUID="181f2859-f1d3-4898-a150-e99c8d1d20a3" CreationDate="2010-11-29T21:23:25.120" UserId="744" Text="Physics has spent hundreds of years coming up with equations to model the real world; any college physics textbook is going to walk you through the basic mathematical solutions to everything you listed - even the stuff you want to ignore.&#xD;&#xA;&#xD;&#xA;Sometimes, for efficiency or simplicity or stability, computer simulations ignore many of the factors. Sometimes they are short-circuited - we simulate gravity with a universal force, not by actually having a mass with the size of the earth; we simulate electricity at the level of current and resistance, not individual electrons in the wires. Sometimes we approximate because the closed-form of the integral is too expensive to compute; in this case, piecewise integration does well, as e.g. &lt;a href=&quot;http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods&quot;&gt;RK integration&lt;/a&gt;, common for Newtonian physics engines, but it'll solve any ordinary differential equation you want to give it.&#xD;&#xA;&#xD;&#xA;Most of what you have named are degenerate cases of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Navier-Stokes_equations&quot;&gt;Navier-Stokes equations&lt;/a&gt;:&#xD;&#xA;&#xD;&#xA;&gt; They may be used to model the weather, ocean currents, water flow in a pipe, air flow around a wing, and motion of stars inside a galaxy. The Navier–Stokes equations in their full and simplified forms help with the design of aircraft and cars, the study of blood flow, the design of power stations, the analysis of pollution, and many other things." />
  <row Id="12056" PostHistoryTypeId="2" PostId="6057" RevisionGUID="e624c384-074b-495c-84cb-7025fc5a36f1" CreationDate="2010-11-29T22:16:47.580" UserId="2787" Text="I am curious as to why most games do not have a mode in which you can easily move your cursor outside the game window to another monitor for example? World of Warcraft maximized window does this really well. Does anyone have any insight on why this would be difficult and/or not worth it for most games to implement?" />
  <row Id="12057" PostHistoryTypeId="1" PostId="6057" RevisionGUID="e624c384-074b-495c-84cb-7025fc5a36f1" CreationDate="2010-11-29T22:16:47.580" UserId="2787" Text="What are the technical reasons that make it difficult for a game to be maximized in windowed mode?" />
  <row Id="12058" PostHistoryTypeId="3" PostId="6057" RevisionGUID="e624c384-074b-495c-84cb-7025fc5a36f1" CreationDate="2010-11-29T22:16:47.580" UserId="2787" Text="&lt;windows&gt;&lt;screen&gt;" />
  <row Id="12059" PostHistoryTypeId="2" PostId="6058" RevisionGUID="9d9b9eb5-f19e-4947-8139-94b1b0ec0bcb" CreationDate="2010-11-29T22:35:43.247" UserId="3271" Text="iPhone development is a bit of a minefield for indie development. Unless you can catch a ride on the hype train, your game is unlikely to get anywhere; there is just too much competition. My advice would be; focus on making a few great games rather than a bunch of decent ones, and talk about your games as much as possible. Send emails to TechCrunch, Engadget, Kotaku...anyone you can think of that might enjoy the game enough to write an article. If you can get your game featured on a major blog you will do well." />
  <row Id="12060" PostHistoryTypeId="2" PostId="6059" RevisionGUID="fd6999ac-1e94-434b-a345-6b55d5bf9549" CreationDate="2010-11-29T22:49:41.237" UserId="744" Text="Developer priorities. It's more work to support than a simple windowed/fullscreen toggle, the latter of which is more or less built into DirectX/OpenGL and most windowing systems.&#xD;&#xA;&#xD;&#xA;There are subtle bugs that you end up finding when you implement it, like on some OSs the mouse pointer position is reported incorrectly, offset by the height of where the title bar would be if it existed. It also requires more in-game interface, since you need the window close and minimize (or at least de-maximize) buttons built into the game's UI.&#xD;&#xA;&#xD;&#xA;Many commodity graphics engines do not support it, because it's only useful for some games. That kind of behavior isn't desired in an FPS, for example.&#xD;&#xA;&#xD;&#xA;None of this is insurmountable, or even &quot;a lot of work&quot;, but it's a measurable amount of developer time to design/implement/test. A simple window/fullscreen toggle in the graphical options is not." />
  <row Id="12062" PostHistoryTypeId="2" PostId="6061" RevisionGUID="ffba2609-5e94-4a9a-981f-a16035cbbc03" CreationDate="2010-11-29T23:48:45.850" UserId="3271" Text="There is many methods of load balancing an MMO server, since there is quite a wide range of data to be processed. I prefer the process bin tree method.&#xD;&#xA;&#xD;&#xA;A global server passes user connections to a process bin that can handle several users at once. the process bins do all the complex processing and only respond to the global server with data that is globally relevant such as global chat and positioning. This method balances much better than region servers, since regions can vary greatly in population, while overall user processing is varied enough that it should naturally balance itself for the most part.&#xD;&#xA;&#xD;&#xA;Just do some basic load balancing via the global server so when a process bin reaches a certain memory/cpu usage, you startup a new process bin server." />
  <row Id="12064" PostHistoryTypeId="2" PostId="6062" RevisionGUID="a4425765-3fa7-4880-8c50-b04d33fcddbb" CreationDate="2010-11-29T23:56:36.873" UserId="3271" Text="It's not so much a technical issue as a gameplay issue. Namely, if you try to click on something at the edge of the screen but move the mouse too far you might click outside the game instead, making the game lose focus or possibly even get covered up by a window that *was* partially behind it. It's particularly troublesome for first-person view games." />
  <row Id="12065" PostHistoryTypeId="2" PostId="6063" RevisionGUID="f4fa4489-7c8f-4fe1-b4c5-f6e3ce90b7a4" CreationDate="2010-11-30T00:44:21.390" UserId="1101" Text="  - Advertise. If your game is good enough, then maybe you just need to let more people know that it exists.&#xD;&#xA;  - Port your games. That increases your potential market with a disproportionately low increase in effort.&#xD;&#xA;  - Cross-sell. Make sure that players of one of your games are aware of your other games and become repeat customers.&#xD;&#xA;  - Change your monetization methods. If you're currently just getting money from purchases, consider moving to a freemium model.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12067" PostHistoryTypeId="2" PostId="6065" RevisionGUID="8d3ec785-1b8b-4c6f-90a7-624525f7c2f3" CreationDate="2010-11-30T06:42:13.037" UserId="2132" Text="I guess this question pertains more to games like MMO and Diablo-like games.&#xD;&#xA;&#xD;&#xA;What are the usual designs for implementing a drop table, where a monster could drop different type of items depending on a percentage? I guess the simplest way there is to have a dictionary of 'percentage weightage' to item types, but this is hard to extend if we wish to introduce new item types (for example, when D2 expansion includes runes and new class items)" />
  <row Id="12068" PostHistoryTypeId="1" PostId="6065" RevisionGUID="8d3ec785-1b8b-4c6f-90a7-624525f7c2f3" CreationDate="2010-11-30T06:42:13.037" UserId="2132" Text="(RPGs) Drop table design" />
  <row Id="12069" PostHistoryTypeId="3" PostId="6065" RevisionGUID="8d3ec785-1b8b-4c6f-90a7-624525f7c2f3" CreationDate="2010-11-30T06:42:13.037" UserId="2132" Text="&lt;game-design&gt;" />
  <row Id="12070" PostHistoryTypeId="2" PostId="6066" RevisionGUID="e1eba04a-2029-400f-8b76-8b886d5aff15" CreationDate="2010-11-30T07:34:37.400" UserId="666" Text="With the boom of mobile and social games reaching more and more people and new technologies like the wii, kinect and geolocation hardware and gadgets appealing to a bigger market than the hardcore gamer, the indie game development has a new challenge: **create simple games.**&#xD;&#xA;&#xD;&#xA;This might seem easier, but I think its really way harder. **Game developers are usually fans** of RPGs, FPSs, massively **complicated games** with complicated goals, mechanics and stories. That is not what the usual casual player is looking for, and getting into the mind of a unknown market is really hard.&#xD;&#xA;&#xD;&#xA;**So, how to design games for the casual, non gamer market?**&#xD;&#xA;&#xD;&#xA;I know its a very broad question, but I would love to know how people **design, playtest and deliver** this sort of games. &#xD;&#xA;&#xD;&#xA;A very big point for me is that somethings while trying this exercise of designing simple games **I get a feeling that it is TOO simple** or even non challenging when it might be complicated and challenging enough for that market." />
  <row Id="12071" PostHistoryTypeId="1" PostId="6066" RevisionGUID="e1eba04a-2029-400f-8b76-8b886d5aff15" CreationDate="2010-11-30T07:34:37.400" UserId="666" Text="Really simple video games, how to design games for the non-gamer market?" />
  <row Id="12072" PostHistoryTypeId="3" PostId="6066" RevisionGUID="e1eba04a-2029-400f-8b76-8b886d5aff15" CreationDate="2010-11-30T07:34:37.400" UserId="666" Text="&lt;game-design&gt;&lt;casual-games&gt;" />
  <row Id="12073" PostHistoryTypeId="2" PostId="6067" RevisionGUID="86bff99b-c9b1-4d76-af34-c64f8aea2a28" CreationDate="2010-11-30T07:37:33.947" UserId="2497" Text="I have just started developing games for iPhone in Cocos2d and am currently working on a Box2D prototype. I know this is not an easy start, but I have experience in the AS3 port of the physics engine. And ... I am stubborn. &#xD;&#xA;&#xD;&#xA;**My question is:**&#xD;&#xA;How do you implement and create your levels in the project. Is there a good parser out there or maybe a nice approach you guys know of? I am looking for a way to create curved slopes and of course circles and rectangles.&#xD;&#xA;&#xD;&#xA;I have read about LevelSVG but it seems to add a lot of functionality that I don't want. I am a Flash game developer and I am used to writing the game logic by myself. Is this product worth the money if all you need is the parser? &#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="12074" PostHistoryTypeId="1" PostId="6067" RevisionGUID="86bff99b-c9b1-4d76-af34-c64f8aea2a28" CreationDate="2010-11-30T07:37:33.947" UserId="2497" Text="How do you create your levels containing curved slopes in Box2d?" />
  <row Id="12075" PostHistoryTypeId="3" PostId="6067" RevisionGUID="86bff99b-c9b1-4d76-af34-c64f8aea2a28" CreationDate="2010-11-30T07:37:33.947" UserId="2497" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;level-design&gt;&lt;cocos2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="12076" PostHistoryTypeId="2" PostId="6068" RevisionGUID="4879f0de-06b9-4c1e-b9f5-eb9efc7530ea" CreationDate="2010-11-30T08:10:42.703" UserId="2132" Text="I would play some of those games, and try to get addicted to them. I guess there's no shame to be addicted to Mafia War, Ravenwood Fair, Plants vs. Zombies and some of those Flash games for a while :P (even though I am too a hardcore gamer).&#xD;&#xA;&#xD;&#xA;Like designing hardcore games, I believe that casual/'non-gamer' games revolve around presenting challenges. However, those games usually focus on one challenge and slowly scale it up, instead of pushing all of it to the gamer. Then you ask &quot;What is the simplest form of this challenge?&quot; and set it as the first level. After that, you think, &quot;How complex can this challenge be?&quot; and do additional levels.&#xD;&#xA;&#xD;&#xA;Second, it is the theme. Most of the time hardcore games deal with themes not accessible by non-gamers, such as fantasy, science-fic, military (which is, however, very accessible to male) and etc. It is possible to take a game, give it another theme, and it appeals to the casual market. There's a game on the iPhone now where you collect candies (or something) and it looks a lot like Sonic. Just a change of theme, and it could be a casual game.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12077" PostHistoryTypeId="2" PostId="6069" RevisionGUID="40f967b3-f8c7-41b0-b325-2c6183f91538" CreationDate="2010-11-30T08:19:57.310" UserId="3198" Text="I find that most non-gamers want a game that is simple to learn, and immediately rewarding.&#xD;&#xA;&#xD;&#xA;For starters, that means that you should be able to explain you game in about 30 seconds, or 1-2 screenshots. If the player can't figure out the core mechanics on the first couple of attempts they'll probably think it's too complicated, **even if it makes it more fun once they *do* figure it**. They want to know how to play right away.&#xD;&#xA;&#xD;&#xA;You mention that developers like RPGs, games that are often very complicated. Some RPGs have levelling systems that are games unto themselves! Just trying to figure out the best way to upgrade your characters is very involved(which can be fun), something casual players won't bother with.&#xD;&#xA;Make your game simple to figure out, **show the player how fun it is before they ever play the game.** It might be fun to develop your character in an RPG, but it's hard to show a player that with a handful of screenshots or in a game review. One the other hand, when you look at a Tetris or Pac-man screenshot, you can probably tell right away what is fun about the game.&#xD;&#xA;&#xD;&#xA;The other thing is immediately rewarding. The game should reward for playing the game well both visually and gameplay-wise. If the player beats a level, they should get something like a powerup or a special bonus level. In addition, there should be cool sound effects and visuals that tell them they succeeded. A simple &quot;High Score&quot; page isn't good enough. In addition, the player should be able to get to the &quot;fun part&quot; very quickly. Again, take a modern RPG, you might have to spend a few minutes setting up your character, choosing a class and creating an avatar before ever getting to the &quot;real&quot; game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One must not underestimate the importance of presentation. If the game *looks* fun, the player will have more fun. A nice graphical theme can go a long way.&#xD;&#xA;&#xD;&#xA;A good example is the iphone game &quot;Flight Control&quot;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;If you haven't played the game before, looking at that screenshot you can probably figure it out. Use your finger to draw a path for the planes to follow. Avoid plane crashes. Very simple, and the graphics clearly and pleasantly show what's going on. Red circles show imminent crashes, to avoid guesswork and make it even simpler to understand.&#xD;&#xA;  [1]: http://i.stack.imgur.com/BJozw.jpg" />
  <row Id="12078" PostHistoryTypeId="2" PostId="6070" RevisionGUID="2c628055-7124-4991-8c6c-b7e32f566f3c" CreationDate="2010-11-30T08:28:13.000" UserId="1581" Text="I'm going to concentrate on the 'casual vs hard-core' aspects of your question.&#xD;&#xA;&#xD;&#xA;There are several schools of thought on how to design games in general. The 'pulsion-based' one models 'fun' around *pulsions*.&#xD;&#xA;&#xD;&#xA;You can think about pulsions like 'mini-goals' that our brains have. When these goals are satisfied, the brain pleasure centers get activated.&#xD;&#xA;&#xD;&#xA;They are not the same for every one, but they tend to be equal per demographic group.&#xD;&#xA;&#xD;&#xA;The 'hard-core' games you mention tend to favor one 2 specific types of pulsion:&#xD;&#xA;&#xD;&#xA; - The *empowering* pulsion, in which you get a system that is gradually better (the player levelling up, getting new weapons, etc)&#xD;&#xA; - The *mastery* pulsion, which creates fun by allowing the player to gradually be better at handling a complex system (statistics, etc)&#xD;&#xA;&#xD;&#xA;The empowering pulsion has a tendency to be stronger on males than females. The mastery pulsion usually appeals more to engineers (hence, also males in general).&#xD;&#xA;&#xD;&#xA;The 'casual' games focus on a different set of pulsions. [Pet society][1], for example, relies on the 'accumulation' pulsion. Altought I get a certain degree of pleasure by accumulating stuff (achievements in games), my girlfriend gets hooked on that pulsion much more than me.&#xD;&#xA;&#xD;&#xA;The Wii games tend to favour the social pulsion - relate with others while gaming.&#xD;&#xA;&#xD;&#xA;You feel that these games are too simple because you are very used to getting your pleasure from the mastery or empowering pulsions, and these games provide very little on that front.&#xD;&#xA;&#xD;&#xA;Another aspect is the 'cute' factor. I would not call it a pulsion, but a necessary design decision. The vast majority of people will like your game if it's 'cute', or will not mind. On the other hand, if you make a game 'serious looking' then a great percentage of people (nearly all casual gamers) will not feel appalled by it. And that's why nearly all casual games tend to play on the 'cute' card.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.petsociety.com/" />
  <row Id="12081" PostHistoryTypeId="5" PostId="6070" RevisionGUID="a7cb154b-1450-4781-8c5f-f1ac0db4cdb5" CreationDate="2010-11-30T10:25:20.683" UserId="1581" Comment="pulsion -&gt; compulsion; added 220 characters in body; added 2 characters in body" Text="I'm going to concentrate on the 'casual vs hard-core' aspects of your question.&#xD;&#xA;&#xD;&#xA;There are several schools of thought on how to design games in general. The 'compulsion-based' one models 'fun' around *compulsions*.&#xD;&#xA;&#xD;&#xA;You can think about compulsions like 'mini-goals' that our brains have. When these goals are satisfied, the brain pleasure centers get activated.&#xD;&#xA;&#xD;&#xA;They are not the same for every one, but they tend to be equal per demographic group.&#xD;&#xA;&#xD;&#xA;The 'hard-core' games you mention tend to favor one 2 specific types of compulsion:&#xD;&#xA;&#xD;&#xA; - The *empowering* compulsion, in which you get a system that is gradually better (the player levelling up, getting new weapons, etc)&#xD;&#xA; - The *mastery* compulsion, which creates fun by allowing the player to gradually be better at handling a complex system (statistics, etc)&#xD;&#xA;&#xD;&#xA;The empowering compulsion has a tendency to be stronger on males than females. The mastery compulsion usually appeals more to engineers (hence, also males in general).&#xD;&#xA;&#xD;&#xA;The 'casual' games focus on a different set of compulsions. [Pet society][1], for example, relies on the 'accumulation' compulsion. Although I get a certain degree of pleasure by accumulating stuff (achievements in games), my girlfriend gets hooked on that pulsion much more than me.&#xD;&#xA;&#xD;&#xA;The Wii games tend to favor the social compulsion - relate with others while gaming.&#xD;&#xA;&#xD;&#xA;You feel that these games are too simple because you are very used to getting your pleasure from the mastery or empowering compulsions, and these games provide very little on that front.&#xD;&#xA;&#xD;&#xA;Another aspect is the 'cute' factor. I would not call it a compulsion, but a necessary design decision. The vast majority of people will like your game if it's 'cute', or will not mind. On the other hand, if you make a game 'serious looking' then a great percentage of people (nearly all casual gamers) will not feel appalled by it. And that's why nearly all casual games tend to play on the 'cute' card.&#xD;&#xA;&#xD;&#xA;EDIT1: pulsions are called &quot;compulsions&quot; in proper English.&#xD;&#xA;&#xD;&#xA;EDIT2: [This article in Gamasutra][2] explains compulsions much better than me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.petsociety.com/&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3495/compulsion_engineers.php" />
  <row Id="12082" PostHistoryTypeId="2" PostId="6072" RevisionGUID="5886e071-d66a-460d-8148-a5c805969f8f" CreationDate="2010-11-30T10:44:08.117" UserId="1868" Text="My simple canvas [game][1] seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen some JS Canvas examples using it.&#xD;&#xA;&#xD;&#xA;When is the use of the double buffering recommended? &#xD;&#xA;Does it make difference only for specific browsers? &#xD;&#xA;Is there a significant performance hit?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hietavirta.net/momentumracer" />
  <row Id="12083" PostHistoryTypeId="1" PostId="6072" RevisionGUID="5886e071-d66a-460d-8148-a5c805969f8f" CreationDate="2010-11-30T10:44:08.117" UserId="1868" Text="Double buffering on HTML5 Canvas game?" />
  <row Id="12084" PostHistoryTypeId="3" PostId="6072" RevisionGUID="5886e071-d66a-460d-8148-a5c805969f8f" CreationDate="2010-11-30T10:44:08.117" UserId="1868" Text="&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;&lt;double-buffering&gt;" />
  <row Id="12085" PostHistoryTypeId="2" PostId="6073" RevisionGUID="c2b82d24-3ba6-4423-bb9b-0a0f561e2e66" CreationDate="2010-11-30T10:44:36.510" UserId="1742" Text="In D&amp;D tabletop gaming there is a concept of loot types. Most monsters will drop from one or more of the tables and these tables would be what you would update in your expansion. The monsters would still drop &quot;65% common, 10% gems, 15% art, 10% tools&quot; but you'd update what was in each of these tables.&#xD;&#xA;&#xD;&#xA;e.g. Gems contains slots with random ranges that return &quot;1 gem(25%)2 gems(50%)5 gems(75%)100 gems&quot;. and when you want to add special rune gems, update the table to &quot;1 gem(25%)2 gems(50%)5 gems(75%)100 gems(95%)1 runegem&quot;. &#xD;&#xA;&#xD;&#xA;But, on the other hand, if you've already got percentage weighting, why not just update all the monster tables in your expansion? Surely tables like this are small payload compared to textures and meshes. Also you don't need to keep the percentages tallying up to 100 either, that's just an assumption you made to start with and you can tally up the real total before generating your random value. If the weightings add to up 120, then just generate a value from 1-120 instead of 1-100." />
  <row Id="12086" PostHistoryTypeId="2" PostId="6074" RevisionGUID="48e3cb4f-2247-47b4-81da-f830927432a1" CreationDate="2010-11-30T10:49:14.460" UserId="1868" Text="Easy to learn, hard to master." />
  <row Id="12087" PostHistoryTypeId="5" PostId="6074" RevisionGUID="53688830-4343-45e3-903c-0103a9c58ccb" CreationDate="2010-11-30T10:54:50.083" UserId="1868" Comment="added 122 characters in body" Text="&quot;Easy to learn, hard to master&quot;&#xD;&#xA;&#xD;&#xA;Useful search phrase, brought back this: http://www.gamasutra.com/view/feature/3977/persuasive_games_familiarity_.php" />
  <row Id="12088" PostHistoryTypeId="2" PostId="6075" RevisionGUID="fcafd317-d8ab-4b66-8349-7c00c3a44757" CreationDate="2010-11-30T11:03:21.053" UserId="450" Text="In Stendhal our loot tables are lists. Each entry contains the name of the item, a min and max quantity and the probability. The internal structure is very similar to what we display on the [creature's webpage][1].&#xD;&#xA;&#xD;&#xA;It is important for us that game designers who have a great knowledge of the world can define such things. That is, without understanding complex logic at the program code level. So we don't have the definitions of creatures and items in the program code but moved them to .xml files such as [elves.xml][2] or [club.xml][3]. We do have a gui editor for them, but most game designers modify the .xml file directly.&#xD;&#xA;&#xD;&#xA;In order to make creatures and items easily extendable, we use a building block system: There is no program class for &quot;elf&quot; or &quot;archer elf&quot;. But there are a number of behavior related classes such as &quot;coward&quot;, &quot;patrol&quot;, &quot;aggressive&quot;, &quot;archer&quot;, &quot;healer&quot;. Designers can define new creatures be selecting those behaviors without writing program code: For example to create an &quot;archer elf&quot; draw an elf sprite with a bow and define it as &quot;offensive&quot;, &quot;archer&quot;. Then define level and similar attributes and add some elvish items to the loot table. &#xD;&#xA;&#xD;&#xA;For items we have a similar approach, but it is currently limited to one behavior: A designer can add a new item and define a behavior such as &quot;ConsumableItem&quot;, &quot;KeyItem&quot; or &quot;AttackItem&quot;, &quot;Spell&quot;, &quot;Scroll&quot; without having to program logic.&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org/creature/elf.html&#xD;&#xA;  [2]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/data/conf/creatures/elf.xml?view=markup&#xD;&#xA;  [3]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/data/conf/items/clubs.xml?view=markup" />
  <row Id="12089" PostHistoryTypeId="2" PostId="6076" RevisionGUID="1e423721-3425-4235-936e-c24c7376f8a7" CreationDate="2010-11-30T12:10:30.020" UserId="744" Text="OpenGL allows you to share the same shader between multiple programs. Aside from saving small amounts of memory and a shader handle, are there any GPU-side performance benefits to doing this?" />
  <row Id="12090" PostHistoryTypeId="1" PostId="6076" RevisionGUID="1e423721-3425-4235-936e-c24c7376f8a7" CreationDate="2010-11-30T12:10:30.020" UserId="744" Text="Is there any performance benefit to sharing shaders between programs?" />
  <row Id="12091" PostHistoryTypeId="3" PostId="6076" RevisionGUID="1e423721-3425-4235-936e-c24c7376f8a7" CreationDate="2010-11-30T12:10:30.020" UserId="744" Text="&lt;opengl&gt;&lt;graphics-programming&gt;&lt;performance&gt;" />
  <row Id="12092" PostHistoryTypeId="2" PostId="6077" RevisionGUID="c2095094-db4f-4932-8ecf-f71d337cdf6e" CreationDate="2010-11-30T14:10:10.437" UserId="668" Text="You could port the Box2D SVG parser implementation from the Box2D forums (you said that you have experience with AS3) .&#xD;&#xA;&#xD;&#xA;http://www.box2d.org/forum/viewtopic.php?f=8&amp;t=3073&#xD;&#xA;&#xD;&#xA;It doesn't look bloated to me." />
  <row Id="12093" PostHistoryTypeId="2" PostId="6078" RevisionGUID="2c2bd028-9086-4680-8166-3f6a31c841ce" CreationDate="2010-11-30T14:19:27.747" UserId="3646" Text="If you really want to look for a job in the games industry, think about what you want to focus on. &#xD;&#xA;&#xD;&#xA;If you code, what aspect of coding? &#xD;&#xA;&#xD;&#xA;AI? Do a nice, AI heavy game&#xD;&#xA;Graphics? Do a game showing off as many different techniques as you can do/know.&#xD;&#xA;&#xD;&#xA;Put all of these in a nice online portfolio as well.&#xD;&#xA;&#xD;&#xA;I would also advise you to learn C++ as well if you don't know it. Seeing as Iphone games use Objective C I'm sure it wont be too much of a problem for yourself.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12094" PostHistoryTypeId="2" PostId="6079" RevisionGUID="35094fb7-4526-4e9e-953b-a042eb30f59c" CreationDate="2010-11-30T14:19:28.040" UserId="1101" Text="On the surface this seems the same as the &quot;weighted random selection&quot; problem.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6043/algorithm-for-determining-random-events&#xD;&#xA;&#xD;&#xA;Allocate relative probabilities to each event, add them up, then pick a random number within that range to decide which event you want.&#xD;&#xA;&#xD;&#xA;Even if you prefer to use percentages - which is the same system, just scaled to 100) - you're overestimating how hard it is to add stuff. If you have 100% and then add 20% in an expansion, just divide all the values by (120/100) and you're back down to a total of 100%." />
  <row Id="12095" PostHistoryTypeId="5" PostId="6063" RevisionGUID="741280c2-4148-4f04-918f-cef52215fbeb" CreationDate="2010-11-30T14:19:58.960" UserId="1101" Comment="Added 'to other platforms' to make the process more clear." Text="  - Advertise. If your game is good enough, then maybe you just need to let more people know that it exists.&#xD;&#xA;  - Port your games to other platforms. That increases your potential market with a disproportionately low increase in effort.&#xD;&#xA;  - Cross-sell. Make sure that players of one of your games are aware of your other games and become repeat customers.&#xD;&#xA;  - Change your monetization methods. If you're currently just getting money from purchases, consider moving to a freemium model.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12096" PostHistoryTypeId="6" PostId="6065" RevisionGUID="45bec4d4-db77-426d-8f81-c088cec71722" CreationDate="2010-11-30T16:41:21.960" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;rpg&gt;" />
  <row Id="12097" PostHistoryTypeId="2" PostId="6080" RevisionGUID="b2157c43-20fe-449c-8768-99a69832406b" CreationDate="2010-11-30T16:47:26.927" UserId="2129" Text="So how would I design a replay system?&#xD;&#xA;&#xD;&#xA;You may know it from certain games like Warcraft 3 or Starcraft where you can watch the game again after it has been played already.&#xD;&#xA;&#xD;&#xA;You end up with a relatively small replay file. So my questions are:&#xD;&#xA;&#xD;&#xA; - How to save the data? (custom format?) (small filesize)&#xD;&#xA; - What shall be saved?&#xD;&#xA; - How to make it generic so it can be used in other games to record a time period (and not a complete match for example)?&#xD;&#xA; - Make it possible to forward and rewind (WC3 couldn't rewind as far as I remember)" />
  <row Id="12098" PostHistoryTypeId="1" PostId="6080" RevisionGUID="b2157c43-20fe-449c-8768-99a69832406b" CreationDate="2010-11-30T16:47:26.927" UserId="2129" Text="How to design a replay system" />
  <row Id="12099" PostHistoryTypeId="3" PostId="6080" RevisionGUID="b2157c43-20fe-449c-8768-99a69832406b" CreationDate="2010-11-30T16:47:26.927" UserId="2129" Text="&lt;design&gt;&lt;data-structure&gt;&lt;file-format&gt;" />
  <row Id="12101" PostHistoryTypeId="2" PostId="6082" RevisionGUID="afc5cca3-f2f0-4f2e-a0b2-75ba469748e9" CreationDate="2010-11-30T16:53:37.933" UserId="744" Text="Save the initial state of your random number generators. Then save, timestamped, each input (mouse, keyboard, network, whatever). If you have a networked game you probably already have this all in place.&#xD;&#xA;&#xD;&#xA;Re-set the RNGs and play back the input. That's it.&#xD;&#xA;&#xD;&#xA;This doesn't solve re-winding, for which there is no general solution, other than playing back from the start as fast as you can. You can improve performance for this by checkpointing the entire game state every X seconds, then you'll only ever need to replay that many, but the entire game state might also be prohibitively expensive to grab.&#xD;&#xA;&#xD;&#xA;The particulars of the file format don't matter, but most engines have a way to serialize commands and state already - for networking, saving, or whatever. Just use that." />
  <row Id="12102" PostHistoryTypeId="2" PostId="6083" RevisionGUID="fd7f443c-66eb-46f2-a3da-c8b3e1a22862" CreationDate="2010-11-30T17:25:34.680" UserId="323" Text="Besides the &quot;make sure the keystrokes are replayable&quot; solution, which can be surprisingly difficult, you could just record the entire game state on every frame. With a little clever compression you can squeeze it down significantly. This is how Braid handles its time-rewinding code and it works pretty well.&#xD;&#xA;&#xD;&#xA;Since you'll need checkpointing anyway for rewinding, you might want to just try implementing it the simple way before complicating things." />
  <row Id="12103" PostHistoryTypeId="6" PostId="6080" RevisionGUID="a223c1f4-ea27-4cf1-8284-522bad430a2e" CreationDate="2010-11-30T17:48:20.970" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;data-structure&gt;&lt;file-format&gt;" />
  <row Id="12104" PostHistoryTypeId="6" PostId="4409" RevisionGUID="245a8d09-c54f-402d-8e64-d97a3af8146c" CreationDate="2010-11-30T17:48:49.130" UserId="51" Comment="edited tags" Text="&lt;gui&gt;&lt;interface&gt;&lt;ui-design&gt;" />
  <row Id="12105" PostHistoryTypeId="6" PostId="3631" RevisionGUID="475e3754-7b33-43f4-ad61-d809f7a6f035" CreationDate="2010-11-30T17:53:42.243" UserId="51" Comment="edited tags" Text="&lt;tools&gt;&lt;assets&gt;&lt;databases&gt;&lt;editors&gt;" />
  <row Id="12106" PostHistoryTypeId="6" PostId="5344" RevisionGUID="278f2679-72a5-4930-9b94-1051793c99b3" CreationDate="2010-11-30T17:54:18.780" UserId="51" Comment="edited tags" Text="&lt;graphics&gt;&lt;graphics-design&gt;" />
  <row Id="12107" PostHistoryTypeId="2" PostId="6084" RevisionGUID="29f54338-1392-48f6-ba05-492fb694cddd" CreationDate="2010-11-30T18:27:58.643" UserId="424" Text="Double buffering a canvas based game will certainly be a performance hit. You'd be drawing an extra amount of pixels equal to your canvas size every frame. In canvas based games drawing to a canvas is the biggest bottleneck in most cases and you want to limit that as much as possible, especially on mobile devices.&#xD;&#xA;&#xD;&#xA;Chrome has GPU acceleration (as of the latest versions) as well as a wicked fast JavaScript engine (V8) that you won't see matched in a mobile environment. Even in Chrome you'll see a slowdown by implementing double buffering.&#xD;&#xA;&#xD;&#xA;Long story short, the benefit of double buffering (dealing with &quot;tearing&quot;) isn't worth the performance hit you'll take most likely.&#xD;&#xA;" />
  <row Id="12108" PostHistoryTypeId="5" PostId="6079" RevisionGUID="349b52fb-6816-4b59-bcdf-4f5bbf2e61e7" CreationDate="2010-11-30T19:22:40.387" UserId="1101" Comment="removed stray parenthesis" Text="On the surface this seems the same as the &quot;weighted random selection&quot; problem.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6043/algorithm-for-determining-random-events&#xD;&#xA;&#xD;&#xA;Allocate relative probabilities to each event, add them up, then pick a random number within that range to decide which event you want.&#xD;&#xA;&#xD;&#xA;Even if you prefer to use percentages - which is the same system, just scaled to 100 - you're overestimating how hard it is to add stuff. If you have 100% and then add 20% in an expansion, just divide all the values by (120/100) and you're back down to a total of 100%." />
  <row Id="12109" PostHistoryTypeId="2" PostId="6085" RevisionGUID="f057a12b-d568-4de3-a5ef-78d20da4207a" CreationDate="2010-11-30T19:23:08.617" UserId="1163" Text="From a game developers point of view, I would say the most important thing in creating an addictive and fun game is to prototype early! And iterate your ideas, tweaking gameplay in the beginning stages of development, not the end. That way, if you find that the game is not fun and addictive, then you could chuck it away, and not worry too much about wasted resource.&#xD;&#xA;&#xD;&#xA;Also user testing and hallway testing is important. Usually the developer is &quot;too close&quot; to the game to make good game-play decisions." />
  <row Id="12110" PostHistoryTypeId="2" PostId="6086" RevisionGUID="aa5a7577-fb7c-4344-90f2-5d3dcf4ecc4e" CreationDate="2010-11-30T20:20:42.643" UserId="1232" Text="This excellent article covers a lot of the issues:&#xD;&#xA;http://www.gamasutra.com/view/feature/2029/developing_your_own_replay_system.php&#xD;&#xA;&#xD;&#xA;A few things that the article mentions and does well:&#xD;&#xA;&#xD;&#xA;* your game has to be deterministic.&#xD;&#xA;* it records the initial state of the game systems on the first frame, and only the player input during gameplay.&#xD;&#xA;* quantize inputs to lower # of bits. Ie. represent floats within various ranges (eg. [0, 1] or [-1 , 1] range within less bits. Quantized inputs have to be obtained during actual game play too.&#xD;&#xA;* use a single bit to determine whether an input stream has new data. Since some streams won't change frequently, this exploits temporal coherence in the inputs.&#xD;&#xA;&#xD;&#xA;One way to further improve the compression ratio for the majority of cases would be to decouple all your input streams and fully run-length encode them independently. This will be a win over the delta encoding technique if you encode your run in 8-bits and the run itself exceeds 8 frames (very likely unless your game is a real button masher). I've used this technique in a racing game to compress 8 minutes of inputs from 2 players while racing around a track down to just a few hundred bytes.&#xD;&#xA;&#xD;&#xA;In terms of making such a system reusable, I've made the replay system deal with generic input streams, but also providing hooks to allow the game specific logic to marshal keyboard/gamepad/mouse input to these streams.&#xD;&#xA;&#xD;&#xA;If you want fast rewinding or random seeks, you can save a checkpoint (your full gamestate) every N frames. N should be chosen to minimize the replay file size and also make sure the time that the player has to wait is reasonable while the state is replayed to the chosen point. One way to get around this is to ensure that random seeks can only be made to these exact checkpoint locations. Rewinding is a matter of setting the game state to the checkpoint immediately before the frame in question, then replaying the inputs until you get to the current frame. However, if N is too large, you could get hitching every few frames. One way to smooth these hitches is to asynchronously pre-cache the frames between the previous 2 checkpoints while you're playing back a cached frame from the current checkpoint region.&#xD;&#xA;" />
  <row Id="12111" PostHistoryTypeId="2" PostId="6087" RevisionGUID="4b12bdcf-f344-4340-9a8d-bf96799ca70e" CreationDate="2010-11-30T20:38:20.273" UserId="1232" Text="I doubt there is a GPU-side performance benefit.&#xD;&#xA;&#xD;&#xA;When you bind a generic shader to a program for example, an efficient implementation should be able to remove unused attributes between that shader and the other shaders in that program and possibly even simplify the shader logic as a result.  Of course, this is no real benefit over a hand-tuned shader combination, but it does help manage the complexity/combinatorics, and possibly reduce the number of compiles the driver has to do.&#xD;&#xA;&#xD;&#xA;However, there may be drawbacks to doing this in terms of hitting inefficient driver-compiler implementations. And there are some out there, check: http://aras-p.info/blog/2010/09/29/glsl-optimizer/ for just some simple things that some implementations can get wrong." />
  <row Id="12112" PostHistoryTypeId="5" PostId="6020" RevisionGUID="133579b1-acbb-449e-8a9a-7b4b70660360" CreationDate="2010-11-30T20:58:36.403" UserId="1101" Comment="Fixed formatting" Text="&gt; I believe it's a common requirement of&#xD;&#xA;&gt; MMOs that processing for a single&#xD;&#xA;&gt; shard or realm can be done over&#xD;&#xA;&gt; several servers to ease the load. I'm&#xD;&#xA;&gt; curious as to how this can be done&#xD;&#xA;&gt; whilst maintaining a unified&#xD;&#xA;&gt; consistent world where all the&#xD;&#xA;&gt; players, and all the NPCs can&#xD;&#xA;&gt; interact.&#xD;&#xA;&#xD;&#xA;It's probably not as common as you think; at least, not if you're thinking that one seamless world is managed by several servers simultaneously.&#xD;&#xA;&#xD;&#xA;Not counting totally separate shards, there are 2 directions in which you can split up an online game, which could be considered &quot;horizontal&quot; and &quot;vertical&quot;:&#xD;&#xA;&#xD;&#xA;  - Divide the game up into many separate geographical areas. All the functionality for any given geographical area is handled by one server and there is no real interaction between them. (Note that there isn't necessarily just 1 zone per server - a server might handle several zones simultaneously, and zones can perhaps be transferred between servers to handle changing load.)&#xD;&#xA;  - Divide the game up into several types of service - eg. login/authorisation, gameplay rules and physics, chat+auctions, persistence, etc. Each of these services can be handled by a different server. nhnb's answer has enumerated other potential services that a developer can partition their game into.&#xD;&#xA;&#xD;&#xA;Obviously these approaches are orthogonal and you can combine the two. In fact it's almost mandatory to have a separate database server, very common to push off login/auth onto a separate machine from the gameplay, and increasingly common to farm off chat and other non-critical communications as well, no matter how your game world is divided up.&#xD;&#xA;&#xD;&#xA;But on the whole, when there is geographical partitioning, most games avoid letting you interact across those boundaries, because it's difficult to do well. Instead, they resort to other ways of making it *seem* like you're all still in the same shard and on the same server, when actually you're not. eg. &#xD;&#xA;  - loading screens or other animations that cover up a server change when transitioning between zones, or from one continent to another.&#xD;&#xA;  - separate dungeon or raid instances that are isolated from everybody else. These are like a shard within a shard and can easily be run on a separate server, helping the load balancing.&#xD;&#xA;&#xD;&#xA;I can't speak with authority on WoW but I would guess they're doing almost all of the above: instancing, separate geographical areas that can't interact joined by portals of some sort, separate back end and auth servers. I've heard that WoW realms have something between 1000 and 10000 players online in a given realm at once, which is easily manageable with the above schemes.&#xD;&#xA;&#xD;&#xA;But, let's assume you have a single massive world and that you do need to allow players one one server to interact with players on an adjacent server. This is easy to do in theory - first, servers must cooperate to share details of objects along the borders (so an object on one server may have a proxy representation on another), and then simply change all your logic to message-passing, with messages being routed from a proxy back to the authoritative source where necessary. Messages can be passed between servers or within a server fairly transparently so one approach fits all systems.&#xD;&#xA;&#xD;&#xA;The problem here is that previously simple logic can become very complex when translated to messages - eg. a 2 player trade which can happen safely and atomically when both players are on one server becomes a longer process when messages have to be sent back and forth, reverified on each send, and safeguards put in place to ensure that one player can't exploit the other by changing the trade while a message is travelling. You can't even assume the other player will still exist by the time the message arrives (as they might die, log out, etc), so the code becomes very complex. And this will apply to almost any system where 2 or more entities can interact or cooperate - trade, combat, grouping, auctions, loot-sharing, training, etc.&#xD;&#xA;&#xD;&#xA;These problems aren't insurmountable but for most games they're too difficult to be worth attempting when you can share the load via the other means and keep all your game logic on one server. So almost all current games go down that route instead." />
  <row Id="12113" PostHistoryTypeId="2" PostId="6088" RevisionGUID="3440706b-ea1b-461b-a434-1971123dd7ac" CreationDate="2010-11-30T21:59:29.513" UserId="1156" Text="One place that is always worth posting is something like the [Gamedev Help Wanted][1] forum. It gets a large amount of interest from artists and programmers.&#xD;&#xA;&#xD;&#xA;As for terms (basing this off mostly common-sense), you would want to purchase the ownership rather than license the art. Just make sure you nail that point with your artist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/community/forums/forum.asp?forum_id=8" />
  <row Id="12114" PostHistoryTypeId="2" PostId="6089" RevisionGUID="cea424be-e5d4-4293-94d0-fb6b776579c7" CreationDate="2010-11-30T22:45:55.080" UserId="160" Text="For a roguelike I was working on, I implemented a pretty flexible data-driven system for generating drops. I've documented it [here](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Data/Data/Drops/about.txt). It's essentially a little DSL for selecting a number of randomly chosen items.&#xD;&#xA;&#xD;&#xA;A simple drop looks like:&#xD;&#xA;&#xD;&#xA;    1-10 copper coin&#xD;&#xA;&#xD;&#xA;It just says to drop a random number of copper coins between 1 and 10. Things get more flexible when you add branches:&#xD;&#xA;&#xD;&#xA;    one of&#xD;&#xA;        turquoise stone (50%)&#xD;&#xA;        onyx stone (25%)&#xD;&#xA;        malachite stone (15%)&#xD;&#xA;        jade stone (10%)&#xD;&#xA;&#xD;&#xA;A &quot;one of&quot; selects one of its child branches based on the given probabilities and then evaluates that. Drops can drop more than one item:&#xD;&#xA;&#xD;&#xA;    any of&#xD;&#xA;        turquoise stone (50%)&#xD;&#xA;        onyx stone (25%)&#xD;&#xA;        malachite stone (15%)&#xD;&#xA;        jade stone (10%)&#xD;&#xA;&#xD;&#xA;This will evaluate *all* subbranches and drop them if a roll against their probability passes. There are also some other branches for selecting an item based on dungeon and player level.&#xD;&#xA;&#xD;&#xA;Because these can get complex, it also allows you to define named macros, essentially functions that expand a branch expression and can be reused in multiple drops.&#xD;&#xA;&#xD;&#xA;An example of [one monster](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Data/Data/Monsters/D%20-%20Ancient%20Dragon.txt)'s drop:&#xD;&#xA;&#xD;&#xA;    :: ancient dragon&#xD;&#xA;        glyph   = D&#xD;&#xA;        groups  = dragon&#xD;&#xA;        drops&#xD;&#xA;            (coins)&#xD;&#xA;            2-3(1:8) one of&#xD;&#xA;                (any-weapon)&#xD;&#xA;                (any-armor)&#xD;&#xA;&#xD;&#xA;Here, `(coins)`, `(any-weapon)`, and `(any-armor)` are all macro calls:&#xD;&#xA;&#xD;&#xA;    (any-armor)&#xD;&#xA;        one of&#xD;&#xA;            (shield)&#xD;&#xA;            (helm)&#xD;&#xA;            (boots)&#xD;&#xA;            (gloves)&#xD;&#xA;            (cloak)&#xD;&#xA;            (robe)&#xD;&#xA;            (soft-armor)&#xD;&#xA;            (hard-armor)&#xD;&#xA;&#xD;&#xA;which in turn calls things like:&#xD;&#xA;&#xD;&#xA;    (cloak)&#xD;&#xA;        one near level&#xD;&#xA;            cloak (10)&#xD;&#xA;            velvet cloak (20)&#xD;&#xA;            fur-lined cloak (50)&#xD;&#xA;&#xD;&#xA;You can nest drop expressions arbitrarily deeply like a real programming language.&#xD;&#xA;&#xD;&#xA;Like all data-driven systems, you can overwhelm yourself by building impenetrably complex drops, but it meets my goals:&#xD;&#xA;&#xD;&#xA;1. Be able to specify what things are dropped completely outside of code.&#xD;&#xA;2. Simple to implement the core system in code.&#xD;&#xA;3. Be able to tune what specific monsters drop so that the player can do goal-oriented exploration. (&quot;I need a necklace. I'll look for dwarves since they tend to drop them.&quot;)&#xD;&#xA;&#xD;&#xA;The C# code that implements this is [here](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Things/Items/Drops/)." />
  <row Id="12115" PostHistoryTypeId="2" PostId="6090" RevisionGUID="91732bc6-4787-4236-8631-3bb770cf6ab0" CreationDate="2010-11-30T23:10:19.930" UserId="3679" Text="This question moved from http://stackoverflow.com/questions/4319183/sketchup-for-modelling-blender-for-lightmaps-rendering-in-xna-reach-profile&#xD;&#xA;&#xD;&#xA;Hello. I'm a programmer looking to add some 3D assets to my game. I have played around with both Blender and Sketchup, and for my limited 3D modelling experience I'm finding I can make far more interesting models/scenes in Sketchup than blender, but I couldn't find any free lightmap baking tools for sketchup, whereas my understanding is that this is available in blender for free.&#xD;&#xA;&#xD;&#xA;So, my question is, how can I setup a workflow whereby I can do most if not all of my work in Sketchup, and only use Blender to create the lightmaps? Is there any way to define light information in Sketchup, but have blender render the light-maps? Otherwise I'm going to have to do all the modeling in sketchup and then add the lights manually in blender every time I make a change to the scene.&#xD;&#xA;&#xD;&#xA;Also, I couldn't find information specifically about blender and the dual texture effect in Xna Reach. Does anyone have information/tutorial/etc.. for getting lightmaps calculated with blender into Xna and rendered using the dual texture effect in xna reach (i.e. on windows phone 7)." />
  <row Id="12116" PostHistoryTypeId="1" PostId="6090" RevisionGUID="91732bc6-4787-4236-8631-3bb770cf6ab0" CreationDate="2010-11-30T23:10:19.930" UserId="3679" Text="Sketchup for modelling, Blender for lightmaps, rendering in Xna Reach profile?" />
  <row Id="12117" PostHistoryTypeId="3" PostId="6090" RevisionGUID="91732bc6-4787-4236-8631-3bb770cf6ab0" CreationDate="2010-11-30T23:10:19.930" UserId="3679" Text="&lt;xna&gt;&lt;blender&gt;&lt;windows-phone-7&gt;" />
  <row Id="12118" PostHistoryTypeId="2" PostId="6091" RevisionGUID="f3cd59e4-b50c-4896-977d-3c17123ca98f" CreationDate="2010-11-30T23:34:16.330" UserId="3680" Text="Is there currently a &quot;standard&quot; for touch controls in shooters on platforms such as iPhone or Android? I've noticed that many of them enable auto-fire by default, or control the character via direct touch on the sprite, but don't know if this is something that is emerging as a standard or not.&#xD;&#xA;&#xD;&#xA;I've also seen virtual joystick and button solutions, but this seems so wonky." />
  <row Id="12119" PostHistoryTypeId="1" PostId="6091" RevisionGUID="f3cd59e4-b50c-4896-977d-3c17123ca98f" CreationDate="2010-11-30T23:34:16.330" UserId="3680" Text="Is there a gold standard for touch controls in shooters?" />
  <row Id="12120" PostHistoryTypeId="3" PostId="6091" RevisionGUID="f3cd59e4-b50c-4896-977d-3c17123ca98f" CreationDate="2010-11-30T23:34:16.330" UserId="3680" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;android&gt;&lt;touch&gt;" />
  <row Id="12121" PostHistoryTypeId="2" PostId="6092" RevisionGUID="deb3c5ab-14c8-45b3-badf-c4c41fc30b19" CreationDate="2010-12-01T00:15:29.443" UserId="51" Text="(I'm assuming you're talking about vertical shooters a la 1942).&#xD;&#xA;&#xD;&#xA;The gold standard seems to be what cave did in do-don-pachi resurrection: http://www.youtube.com/watch?v=lm9cOiydk3w&#xD;&#xA;&#xD;&#xA;Basically all movement is relative and basic firing is automatic.  Special firing (i.e. bombs) is done by a touch button off the side of the screen somewhere (do don pachi had different configurations where you could put it vertically on the left or right or on the bottom from the left or right).  Relative movement means that if you drag left X pixels on the screen, your ship moves left X pixels.  Or maybe X * some constant pixels.&#xD;&#xA;&#xD;&#xA;Some games have some success with sprite-based control, but you have to make sure that the actual sprite is pretty far above where the actual touch control is so you can easily see your ship.  If you do it do don pachi style you kind of get that effect if you start your relative movement on the ship itself, but you get the benefit of being able to touch as far away from the ship as you're comfortable with." />
  <row Id="12122" PostHistoryTypeId="5" PostId="6089" RevisionGUID="ea2b1e71-6ec7-455e-8458-82a12944ab40" CreationDate="2010-12-01T00:26:50.570" UserId="160" Comment="added 80 characters in body" Text="For a roguelike I was working on, I implemented a pretty flexible data-driven system for generating drops. I've documented it [here](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Data/Data/Drops/about.txt). It's essentially a little DSL for selecting a number of randomly chosen items.&#xD;&#xA;&#xD;&#xA;A simple drop looks like:&#xD;&#xA;&#xD;&#xA;    1-10 copper coin&#xD;&#xA;&#xD;&#xA;It just says to drop a random number of copper coins between 1 and 10. Things get more flexible when you add branches:&#xD;&#xA;&#xD;&#xA;    one of&#xD;&#xA;        turquoise stone (50%)&#xD;&#xA;        onyx stone (25%)&#xD;&#xA;        malachite stone (15%)&#xD;&#xA;        jade stone (10%)&#xD;&#xA;&#xD;&#xA;A &quot;one of&quot; selects one of its child branches based on the given probabilities and then evaluates that. Drops can drop more than one item:&#xD;&#xA;&#xD;&#xA;    any of&#xD;&#xA;        turquoise stone (50%)&#xD;&#xA;        onyx stone (25%)&#xD;&#xA;        malachite stone (15%)&#xD;&#xA;        jade stone (10%)&#xD;&#xA;&#xD;&#xA;This will evaluate *all* subbranches and drop them if a roll against their probability passes. There are also some other branches for selecting an item based on dungeon and player level.&#xD;&#xA;&#xD;&#xA;Because these can get complex, it also allows you to define named macros, essentially functions that expand a branch expression and can be reused in multiple drops.&#xD;&#xA;&#xD;&#xA;An example of [one monster](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Data/Data/Monsters/D%20-%20Ancient%20Dragon.txt)'s drop:&#xD;&#xA;&#xD;&#xA;    :: ancient dragon&#xD;&#xA;        glyph   = D&#xD;&#xA;        groups  = dragon&#xD;&#xA;        drops&#xD;&#xA;            (coins)&#xD;&#xA;            2-3(1:8) one of&#xD;&#xA;                (any-weapon)&#xD;&#xA;                (any-armor)&#xD;&#xA;&#xD;&#xA;Here, `(coins)`, `(any-weapon)`, and `(any-armor)` are all macro calls:&#xD;&#xA;&#xD;&#xA;    (any-armor)&#xD;&#xA;        one of&#xD;&#xA;            (shield)&#xD;&#xA;            (helm)&#xD;&#xA;            (boots)&#xD;&#xA;            (gloves)&#xD;&#xA;            (cloak)&#xD;&#xA;            (robe)&#xD;&#xA;            (soft-armor)&#xD;&#xA;            (hard-armor)&#xD;&#xA;&#xD;&#xA;which in turn calls things like:&#xD;&#xA;&#xD;&#xA;    (cloak)&#xD;&#xA;        one near level&#xD;&#xA;            cloak (10)&#xD;&#xA;            velvet cloak (20)&#xD;&#xA;            fur-lined cloak (50)&#xD;&#xA;&#xD;&#xA;You can nest drop expressions arbitrarily deeply like a real programming language. This gives you the composability that a simple table-based approach won't give.&#xD;&#xA;&#xD;&#xA;Like all data-driven systems, you can overwhelm yourself by building impenetrably complex drops, but it meets my goals:&#xD;&#xA;&#xD;&#xA;1. Be able to specify what things are dropped completely outside of code.&#xD;&#xA;2. Simple to implement the core system in code.&#xD;&#xA;3. Be able to tune what specific monsters drop so that the player can do goal-oriented exploration. (&quot;I need a necklace. I'll look for dwarves since they tend to drop them.&quot;)&#xD;&#xA;&#xD;&#xA;The C# code that implements this is [here](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Things/Items/Drops/)." />
  <row Id="12123" PostHistoryTypeId="2" PostId="6093" RevisionGUID="5a6244cc-0399-40c9-b2c1-96fe89f166f0" CreationDate="2010-12-01T02:30:20.463" UserId="1130" Text="I imagine you could possibly bake some shadows/lights with plugin, like [LightUp][1] in Sketchup, but I haven't tried yet.&#xD;&#xA;&#xD;&#xA;Although SketchUp is pretty easy to pickup, it easily makes complicated meshes. Since there are no 'Polygon' tools in Sketchup, there are a lot ways to accidentally add to many additions to the mesh which aren't needed...basically I don't consider Sketchup a good tool for lowpoly/realtime 3D.&#xD;&#xA;&#xD;&#xA;I would suggest getting the hang of Blender if you're planning to do more real time 3D in the future. You've got a lot of tools and you've even got a GameEngine inside Blender so you can preview a mesh in realtime, check for potential problems with RigidBody collisions, etc. &#xD;&#xA;&#xD;&#xA;I found an old, but comprehensive article on creating [lightmaps in Blender][2]. &#xD;&#xA;&#xD;&#xA;I must admit, Blender is a bit intimidating first, but as a developer, it's a lot easier to pickup and makes more sense than others.&#xD;&#xA;&#xD;&#xA;If you still need a minimal/easy to use Editor, try [Wings3D][3]&#xD;&#xA;It's very basic, but powerful. Unfortunately, it wouldn't help with lightmaps...but you could easily export an OBJ or something from Wings3D and render your lightmaps from Blender. It should a lot easier, cleaner than importing a Collada from Sketchup.&#xD;&#xA;&#xD;&#xA;I know that you mentioned Blender and Sketchup, but on Windows, you might also find [**gile[s]**][4] as a good option:&#xD;&#xA;&#xD;&#xA;![giles preview 1][5]&#xD;&#xA;&#xD;&#xA;![giles preview 2][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;  [1]: http://www.light-up.co.uk/&#xD;&#xA;  [2]: http://lightfeather.de/lf/documentation/lightmaptutorial/Blender2Lightfeather.html&#xD;&#xA;  [3]: http://www.wings3d.com/&#xD;&#xA;  [4]: http://www.frecle.net/index.php?show=&amp;section=giles&amp;sub=download&#xD;&#xA;  [5]: http://i.stack.imgur.com/ts8Po.jpg&#xD;&#xA;  [6]: http://www.frecle.net/images/small/giles_screen09.jpg" />
  <row Id="12124" PostHistoryTypeId="2" PostId="6094" RevisionGUID="d9da34ea-9053-4126-9380-97251e3eb10b" CreationDate="2010-12-01T02:50:12.787" UserId="3115" Text="I like being rewarded for my actions. So loads of small bonus items, small upgrades, gold/points something that immidiately gives me pleasure so I want to continue grabbing more and more.&#xD;&#xA;&#xD;&#xA;What I dont like in a game is when the developers finds it too easy and uses TIME as the only thing keeping me from completing a level. That is bad level design. You could use time as a &quot;bonus&quot;, but never as a punishment.&#xD;&#xA;&#xD;&#xA;My approach is to keep the player happy and occupied even in stressed situations. &#xD;&#xA;&#xD;&#xA;So, none or a minimum of &quot;Whoops dead, replay the last 5 minutes to get right back here&quot;... instead, make it attractice to try again, not a punishment.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12125" PostHistoryTypeId="2" PostId="6095" RevisionGUID="2189fcf6-7f5c-4232-8faf-0f56741cf3f4" CreationDate="2010-12-01T03:36:57.273" UserId="3683" Text="eating vs. not eating" />
  <row Id="12127" PostHistoryTypeId="2" PostId="6097" RevisionGUID="1dcd6029-ba57-493a-9fd7-4bfe3ed7c67d" CreationDate="2010-12-01T03:58:34.040" UserId="3268" Text="I've am a developer whose has spent most of my programming life developing web and business applications. I want to try my hand at something more challenging (but stay in the comfort of Visual Studio) ...perhaps XNA.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Want 3D modeling software would be best for someone developing XNA?&lt;/strong&gt; &lt;br&gt;&#xD;&#xA;I have played with 3d MAX and Maya but never really did anything to involved.&lt;br&gt;&#xD;&#xA;&lt;strong&gt;What are the pros and cons between them (in terms of game development)? &lt;br&gt;&#xD;&#xA;Does one win out over the other for game development?&lt;/strong&gt;&lt;br /&gt;&#xD;&#xA;Or is it pretty much just preference?&#xD;&#xA;&#xD;&#xA;I am new to game development and just trying to figure out the best tools to use before I really started. Any advice or other suggections would be greatly appreciated. &#xD;&#xA;" />
  <row Id="12128" PostHistoryTypeId="1" PostId="6097" RevisionGUID="1dcd6029-ba57-493a-9fd7-4bfe3ed7c67d" CreationDate="2010-12-01T03:58:34.040" UserId="3268" Text="Choosing 3D modeling software Maya or 3D max?" />
  <row Id="12129" PostHistoryTypeId="3" PostId="6097" RevisionGUID="1dcd6029-ba57-493a-9fd7-4bfe3ed7c67d" CreationDate="2010-12-01T03:58:34.040" UserId="3268" Text="&lt;xna&gt;&lt;3d&gt;" />
  <row Id="12130" PostHistoryTypeId="2" PostId="6098" RevisionGUID="5d0bd233-5a24-4f41-84a5-6fc8e9cc8962" CreationDate="2010-12-01T04:30:08.940" UserId="2287" Text="This question has been beaten to the ground and then some. You will find many threads online discussing the same things. In the end, they will both give you a format that you will read, whether it be fbx, or obj or something else. The general concensus is that 3Ds Max is used for games, but I have seen/heard both being used in the industry as long as the pipeline supports it. I personally prefer Maya, but that does not mean it is better.&#xD;&#xA;&#xD;&#xA;There are loaders out there for obj, fbx etc. for XNA, which Maya/3DsMax/XSI/Modo/Lightwave/Blender etc. can export to (or you can write your own). What are you comfortable with? Go with that!&#xD;&#xA;&#xD;&#xA;http://www.google.ca/#hl=en&amp;source=hp&amp;biw=1920&amp;bih=979&amp;q=3ds+max+or+Maya+for+games&amp;aq=f&amp;aqi=g3&amp;aql=&amp;oq=&amp;gs_rfai=&amp;fp=ce518d88d48a6dfe&#xD;&#xA;" />
  <row Id="12131" PostHistoryTypeId="2" PostId="6099" RevisionGUID="205c763a-83c9-4f8d-8677-f95bd7313096" CreationDate="2010-12-01T05:33:51.827" UserId="2100" Text="Pick one and stick with it (by trying both out for a simple task) - both are fully capable and will do anything you'd want to do just starting out. Furthermore, as you learn more about general techniques you'll be able to go between modeling software packages with less of a learning curve.&#xD;&#xA;&#xD;&#xA;The most important thing to remember is not to get hung up for too long on what technologies you're using in your quest to start out with game development.&#xD;&#xA;&#xD;&#xA;For the record, I've only used Maya extensively, but I really like it." />
  <row Id="12132" PostHistoryTypeId="2" PostId="6100" RevisionGUID="94a058bb-30bb-4748-8486-494c2bfc0e8d" CreationDate="2010-12-01T06:02:15.587" UserId="2187" Text="As said before, both packages will let you do what needs to be done. Neither is better off the shelf for someone starting out, but you may find one more intuitive than the other. I personally prefer 3DSMax but you may not. They both have a 30 day free trial, so you might as well try both for 30 days and see which one feels better after that.&#xD;&#xA;&#xD;&#xA;I know many game devs have used 3DSMax in the past, but I do believe other packages, including Maya, have started to gain a foot hold in the industry. I must point out that learning how to model and texture is package independent. Its the same concepts, just different buttons.&#xD;&#xA;&#xD;&#xA;One thing to perhaps consider is that both packages have custom scripting languages you can use, but Maya also allows you to use Python for scripting. This may or may not be relevant but if you already know python and you have no other deciding factors, this may be a deciding point. " />
  <row Id="12133" PostHistoryTypeId="2" PostId="6101" RevisionGUID="0872e809-97cd-47c6-a726-d3d8910bb1c6" CreationDate="2010-12-01T06:06:27.003" UserId="154" Text="&gt; What 3D modeling software would be best for someone developing XNA? &#xD;&#xA;&#xD;&#xA;If you are just starting out and want to build some models I might suggest something like Blender. Since it will allow you to freely build some content as you are learning to work with 3D.&#xD;&#xA;&#xD;&#xA;At the end of the day you'll likely be importing the models into your game either through the .fbx or .obj format so you can switch to one of the paid modeling packages once you feel more comfortable.&#xD;&#xA;&#xD;&#xA;&gt; I have played with 3d MAX and Maya but never really did anything to involved.&#xD;&#xA;What are the pros and cons between them (in terms of game development)? &#xD;&#xA;Does one win out over the other for game development?&#xD;&#xA;&#xD;&#xA;Both are used in game development. In general animators tend to prefer Maya, character modelers go either way since these days they are often spending time in zbrush or mudbox, and scenary/architecture modelers tend to prefer Max.&#xD;&#xA;&#xD;&#xA;Both software packages have their quirks but since Autodesk owns them all now (including XSI) so they are mostly at feature parity. Play with the demos of both and figure out which you like the best. &#xD;&#xA;" />
  <row Id="12134" PostHistoryTypeId="5" PostId="6097" RevisionGUID="a2af472e-21f7-4740-b2f3-22d308413529" CreationDate="2010-12-01T06:10:33.630" UserId="51" Comment="added 1 characters in body" Text="I've am a developer whose has spent most of my programming life developing web and business applications. I want to try my hand at something more challenging (but stay in the comfort of Visual Studio) ...perhaps XNA.&#xD;&#xA;&#xD;&#xA;&lt;strong&gt;Want 3D modeling software would be best for someone developing XNA?&lt;/strong&gt; &lt;br&gt;&#xD;&#xA;I have played with 3d MAX and Maya but never really did anything too involved.&lt;br&gt;&#xD;&#xA;&lt;strong&gt;What are the pros and cons between them (in terms of game development)? &lt;br&gt;&#xD;&#xA;Does one win out over the other for game development?&lt;/strong&gt;&lt;br /&gt;&#xD;&#xA;Or is it pretty much just preference?&#xD;&#xA;&#xD;&#xA;I am new to game development and just trying to figure out the best tools to use before I really started. Any advice or other suggections would be greatly appreciated. &#xD;&#xA;" />
  <row Id="12135" PostHistoryTypeId="6" PostId="4465" RevisionGUID="1c3e3f65-5781-4108-930b-d607818d5423" CreationDate="2010-12-01T07:02:33.577" UserId="450" Comment="edited tags" Text="&lt;mmo&gt;&lt;server&gt;&lt;events&gt;&lt;scalability&gt;" />
  <row Id="12136" PostHistoryTypeId="2" PostId="6102" RevisionGUID="df95a508-e54d-4889-a7e9-23b5a38f5655" CreationDate="2010-12-01T07:04:49.793" UserDisplayName="chris-kun" Text="for 3D try shiva" />
  <row Id="12137" PostHistoryTypeId="5" PostId="249" RevisionGUID="d2cd3f81-8e80-4fec-b2d2-4d4f833938a4" CreationDate="2010-12-01T07:05:06.633" UserId="450" Comment="deleted 4 characters in body; edited tags" Text="Based on http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo:&#xD;&#xA;&#xD;&#xA;&gt; Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.&#xD;&#xA;&#xD;&#xA;I know the theory about sockets, servers, clients, protocols, connections and such things.&#xD;&#xA;&#xD;&#xA;Now I wonder how one can learn to write a network game:&#xD;&#xA;&#xD;&#xA;* How to balance load problems?&#xD;&#xA;* How to manage the game state?&#xD;&#xA;* How to keep things synchronized?&#xD;&#xA;* How to protect the communication and client from reverse engineering?&#xD;&#xA;* How to work around latency problems?&#xD;&#xA;* Which things should be computed local and which things on the server?&#xD;&#xA;* ...&#xD;&#xA;&#xD;&#xA;Are there any good books, tutorials, sites, interesting articles or other questions regarding this?&#xD;&#xA;&#xD;&#xA;I'm looking for broad answers, but specific ones are fine too to learn the difference." />
  <row Id="12138" PostHistoryTypeId="6" PostId="249" RevisionGUID="d2cd3f81-8e80-4fec-b2d2-4d4f833938a4" CreationDate="2010-12-01T07:05:06.633" UserId="450" Comment="deleted 4 characters in body; edited tags" Text="&lt;network&gt;&lt;books&gt;&lt;tutorials&gt;&lt;scalability&gt;&lt;articles&gt;" />
  <row Id="12139" PostHistoryTypeId="4" PostId="6091" RevisionGUID="cda4c099-dc0e-4cf4-b1fd-7bc60e1361fb" CreationDate="2010-12-01T08:55:22.660" UserId="744" Comment="edited tags; edited title" Text="Is there a gold standard for touch controls in scrolling shoot-em-ups?" />
  <row Id="12140" PostHistoryTypeId="6" PostId="6091" RevisionGUID="cda4c099-dc0e-4cf4-b1fd-7bc60e1361fb" CreationDate="2010-12-01T08:55:22.660" UserId="744" Comment="edited tags; edited title" Text="&lt;game-design&gt;&lt;mobile&gt;&lt;touch&gt;" />
  <row Id="12141" PostHistoryTypeId="2" PostId="6103" RevisionGUID="f0001c07-b6ec-4f96-a9a0-d7f03e733e97" CreationDate="2010-12-01T09:48:03.867" UserId="3599" Text="My 2c (worked as professional 3d modeler/animator)&#xD;&#xA;&#xD;&#xA;- For getting into the industry, I'd advice Max or Maya. May be best is to master one of those, though have some familiarity with the other, so you can get put up to speed in a company that uses the other with no big issues. 3D is 3D, so you'll be able once gained expertise with one.&#xD;&#xA;&#xD;&#xA;- Blender is getting better and better. In features anda capabilities is yet behind, but if going for small/middle game studio, or video production, local TV studio, freelancing, etc, etc, is a really good thing, but its GUI standards are a bit different from the rest. I am a blender user that worked hard with 3ds Max before.&#xD;&#xA;&#xD;&#xA;- Maya is used by animation companies, but also big console (PS3, etc) studios are using Maya. Not only for its better animation capabilities, but for Mel script and interaction allowed inside the team's pipelines. Those were worked hard through years, rarely they would move to another thing.&#xD;&#xA;&#xD;&#xA;- Max is inmensely used in games production. I prefer it, but I'd say is 50% usage between Maya and Max, probably even more Maya.(Max ruled during some time, in games)&#xD;&#xA;&#xD;&#xA;- Max learning can be a bit easier than Maya or Blender. Probably the hardest to learn is XSI, requires an special mindset, but its workflow seems well thought. And its renderer is great, photon based, and allowing partial viewport, dynamic rendering.(and one of the greatest hair simulations in the market)&#xD;&#xA;&#xD;&#xA;- For rendering, XSI is best, Max and Maya have worse default renderers, but usually one uses plugged in external renderers (commercial or not)  . For prerrendered games is ok tho scanline rendering, often.&#xD;&#xA;&#xD;&#xA;- Advantages of going with one of these (both are great to go) are, apart of being able to do _anything_ is that you could get into the indyustry one day, if unemployed. But will be 3500, 6000 dollars to purchase one.&#xD;&#xA;&#xD;&#xA;- Blender (Wings3D is great as a modeler only, also) is free, on the other side ;) But for now, rarely any studio will pick you if not mastering Max or Maya. &#xD;&#xA;&#xD;&#xA;(there are always more niche like tools, Cinema 4D (largely used in architecture), Lightwave (great modeler, also ok for animating), used in series like Babylon 5)&#xD;&#xA;&#xD;&#xA;(XSI also, but been purchased by Autodesk, too, so, dunno...)" />
  <row Id="12142" PostHistoryTypeId="2" PostId="6104" RevisionGUID="fabb389b-7db0-4201-bbd4-fe75c1d689fb" CreationDate="2010-12-01T09:57:22.763" UserId="3599" Text="Or wings3d for modeling characters and objects, sketchup for scenery/buildings, Blender for anything else , Giles for Lightmaps. (hey, is freeware now)&#xD;&#xA;&#xD;&#xA;Yep, get the hang of Blender.&#xD;&#xA;&#xD;&#xA;Tip: Put a tiny box in Sketchup where a light source should be, then can do shift + s, 'move cursor to selected'(selecting the box),then &quot;move selected to cursor&quot;, selecting previously the light,  with every light in Blender, if you are more comfortable so. If named well or other tricks, you might delete later all boxes in a snap. (maybe putting in a layer)" />
  <row Id="12143" PostHistoryTypeId="5" PostId="6104" RevisionGUID="16d6e4c9-03aa-4524-a2c5-c63c644f3cf8" CreationDate="2010-12-01T10:03:02.040" UserId="3599" Comment="added 22 characters in body" Text="Or wings3d for modeling characters and objects, sketchup for scenery/buildings, Blender for anything else , Giles for Lightmaps. (hey, is freeware now)&#xD;&#xA;&#xD;&#xA;Yep, get the hang of Blender.&#xD;&#xA;&#xD;&#xA;Tip: Put a tiny box in Sketchup where a light source should be, then can do shift + s, 'move cursor to selected'(selecting the box),then &quot;move selected to cursor&quot;, selecting previously the light,  with every light in Blender, if you are more comfortable so. If named well or other tricks, you might delete later all boxes in a snap. (maybe putting in a layer which you dont render)" />
  <row Id="12144" PostHistoryTypeId="2" PostId="6105" RevisionGUID="ba9b7264-8f80-4eca-930e-11f0038c6d57" CreationDate="2010-12-01T11:33:12.240" UserId="744" Text="Let's say I'm a programmer, I know some artists, we've got a game engine and fun prototype done, and we're ready to enter the indie equivalent of &quot;production&quot;.&#xD;&#xA;&#xD;&#xA;But the game is full of &quot;programmer design&quot; (and/or &quot;artist design&quot;). We've got a core design concept, but average level design, average AI patterns, average writing, poor balance here and there.&#xD;&#xA;&#xD;&#xA;Other questions have covered how to help independent developers find programmers and artists. Where can independent artists and programmers find _designers_? People who can refine and extend the design elements of the game until they really stand out." />
  <row Id="12145" PostHistoryTypeId="1" PostId="6105" RevisionGUID="ba9b7264-8f80-4eca-930e-11f0038c6d57" CreationDate="2010-12-01T11:33:12.240" UserId="744" Text="Where to find independent designers?" />
  <row Id="12146" PostHistoryTypeId="3" PostId="6105" RevisionGUID="ba9b7264-8f80-4eca-930e-11f0038c6d57" CreationDate="2010-12-01T11:33:12.240" UserId="744" Text="&lt;game-design&gt;&lt;project-management&gt;&lt;resources&gt;&lt;human-resources&gt;" />
  <row Id="12148" PostHistoryTypeId="4" PostId="6105" RevisionGUID="e77d86bb-2500-497d-89bc-2035ca129083" CreationDate="2010-12-01T12:58:19.080" UserId="744" Comment="I'll word this title well one day..." Text="Where to find designers for independent projects?" />
  <row Id="12149" PostHistoryTypeId="2" PostId="6106" RevisionGUID="bb6ace84-be19-4e3e-b106-ff5e9c2b2140" CreationDate="2010-12-01T13:44:15.050" UserId="1560" Text="In the games like [city story][1] or [we farm][2] how they done scrolling because, &#xD;&#xA;&#xD;&#xA;1. To do scrolling using UIScrollView the EAGLView size has to be bigger. In those games EAGLView size look like more than 1024*1024. But there is [limitation][3] in viewport size in iphone devices(in 3G iphone max is 1024).&#xD;&#xA;&#xD;&#xA;2. I played those games in 3G iphone they are working fine.&#xD;&#xA;&#xD;&#xA;3. Any idea how they implemented scrolling mechanism?&#xD;&#xA;&#xD;&#xA;  [1]: http://itunes.apple.com/in/app/city-story/id385667356?mt=8&#xD;&#xA;  [2]: http://itunes.apple.com/in/app/we-farm-for-ipad/id375394443?mt=8&#xD;&#xA;  [3]: http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html" />
  <row Id="12150" PostHistoryTypeId="1" PostId="6106" RevisionGUID="bb6ace84-be19-4e3e-b106-ff5e9c2b2140" CreationDate="2010-12-01T13:44:15.050" UserId="1560" Text="How to create games with scrolling?" />
  <row Id="12151" PostHistoryTypeId="3" PostId="6106" RevisionGUID="bb6ace84-be19-4e3e-b106-ff5e9c2b2140" CreationDate="2010-12-01T13:44:15.050" UserId="1560" Text="&lt;iphone&gt;&lt;methodology&gt;&lt;logic&gt;" />
  <row Id="12152" PostHistoryTypeId="2" PostId="6107" RevisionGUID="9b8b597e-1e7d-452b-b86e-6776551b9ccb" CreationDate="2010-12-01T13:51:56.450" UserId="3689" Text="Say I like to experiment with multi player game and I do not want to reinvent the wheel and build yet another &#xD;&#xA;Game server , I don’t mind to configure and write wrappers and adapters ( both in c++ and java ) for the server. &#xD;&#xA;What server do farmville are using ? is it java or c based ? &#xD;&#xA;What isometric flash engine do they use ?  what more example can I look into to learn the subject ?   &#xD;&#xA;Thanks &#xD;&#xA;&#xD;&#xA;" />
  <row Id="12153" PostHistoryTypeId="1" PostId="6107" RevisionGUID="9b8b597e-1e7d-452b-b86e-6776551b9ccb" CreationDate="2010-12-01T13:51:56.450" UserId="3689" Text="Which freeware frameworks and tools to chose if I like to build game like farmwill or club penguin " />
  <row Id="12154" PostHistoryTypeId="3" PostId="6107" RevisionGUID="9b8b597e-1e7d-452b-b86e-6776551b9ccb" CreationDate="2010-12-01T13:51:56.450" UserId="3689" Text="&lt;multiplayer&gt;&lt;open-source&gt;&lt;server&gt;" />
  <row Id="12155" PostHistoryTypeId="16" PostId="6105" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-01T14:07:23.507" UserId="51" />
  <row Id="12156" PostHistoryTypeId="16" PostId="6107" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-01T14:17:25.040" UserId="51" />
  <row Id="12157" PostHistoryTypeId="2" PostId="6108" RevisionGUID="efab4e0a-00ff-483a-8aab-955db302d833" CreationDate="2010-12-01T14:20:57.440" UserId="51" Text="Well they don't use something like a UIScrollView, that's for sure.  You would just move the camera over a stationary world or move the world under a stationary camera.  I'm a little rusty on my GL, but I would guess you just push a new translation matrix before all your drawing.&#xD;&#xA;&#xD;&#xA;For the actual dragging part, you would also implement that yourself.  It would probably be something where you check to see if there was a certain amount of cursor/finger movement delta in a given amount of time to see if it's a &quot;drag&quot; or a &quot;click&quot;.  Or maybe you always drag unless the user clicks on a UI element or something like that.  It really depends on the design of how you want that system to work." />
  <row Id="12158" PostHistoryTypeId="5" PostId="6106" RevisionGUID="5f04bd27-3c79-439f-b006-78de2dfea5f3" CreationDate="2010-12-01T14:21:42.103" UserId="51" Comment="deleted 6 characters in body" Text="In games like [city story][1] or [we farm][2] how do they implement scrolling?&#xD;&#xA;&#xD;&#xA;1. To do scrolling using UIScrollView the EAGLView size has to be bigger. In those games EAGLView size look like more than 1024*1024. But there is [limitation][3] in viewport size in iphone devices(in 3G iphone max is 1024).&#xD;&#xA;&#xD;&#xA;2. I played those games in 3G iphone they are working fine.&#xD;&#xA;&#xD;&#xA;3. Any idea how they implemented their scrolling mechanism?&#xD;&#xA;&#xD;&#xA;  [1]: http://itunes.apple.com/in/app/city-story/id385667356?mt=8&#xD;&#xA;  [2]: http://itunes.apple.com/in/app/we-farm-for-ipad/id375394443?mt=8&#xD;&#xA;  [3]: http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html" />
  <row Id="12159" PostHistoryTypeId="2" PostId="6109" RevisionGUID="dec1db0e-828b-49ff-9ffa-a5cbe844add5" CreationDate="2010-12-01T14:31:01.410" UserId="1463" Text="I want to take a vector that is using world coordinates and position it using the orientation of an object.  So, if the direction of the object is the z-axis, and the vector is (0,0,1), then the orientated vector would point in the direction of the object.  I want to vector to remain in the world coordinate system.  All I have for the object is it's up and direction vector.  So, I can build a matrix with those by crossing them to create the third axis.  Multiplying the vector by this matrix transform the vector into the object coordinate system (right?).  But, I want the vector in world coordinate system.  Should I use the matrix to find euler angles and then use those angles to create a rotation matrix?" />
  <row Id="12160" PostHistoryTypeId="1" PostId="6109" RevisionGUID="dec1db0e-828b-49ff-9ffa-a5cbe844add5" CreationDate="2010-12-01T14:31:01.410" UserId="1463" Text="How do you transform a vector to use another objects orientation?" />
  <row Id="12161" PostHistoryTypeId="3" PostId="6109" RevisionGUID="dec1db0e-828b-49ff-9ffa-a5cbe844add5" CreationDate="2010-12-01T14:31:01.410" UserId="1463" Text="&lt;math&gt;&lt;graphics-programming&gt;&lt;vector&gt;" />
  <row Id="12165" PostHistoryTypeId="2" PostId="6111" RevisionGUID="9319633c-de6e-453f-a9c6-46d308fdb703" CreationDate="2010-12-01T14:51:47.997" UserId="1279" Text="Scrolling doesn't necessarily mean loading everything into memory. The usual way to deal with this is to separate your content into _tiles_ which are loaded into memory as needed. Apple has an example at http://developer.apple.com/library/ios/#samplecode/ScrollViewSuite/Introduction/Intro.html for showing big images.&#xD;&#xA;&#xD;&#xA;Games, however, tend to do something else. Even if it is possible to use the previous technique, loading data from disk is slow and may disrupt the game experience for the user. For this reason the area to scroll is usually cut into pieces you can later reuse, giving the feeling that the whole world is bigger than it could really fit into memory.&#xD;&#xA;&#xD;&#xA;You can learn more about tiles with a map editor like [Tiled Map Editor](http://www.mapeditor.org/) and searching the net for tutorials on how to use it/integrate into your game. Games like Diablo are known to use tiled maps which are logically split into bigger tiles that glued together create inmense pseudo-random maps on each different game." />
  <row Id="12166" PostHistoryTypeId="5" PostId="6107" RevisionGUID="8d93af3a-1e73-4bcf-bbbb-29124de6c577" CreationDate="2010-12-01T15:44:00.553" UserId="1156" Comment="Edited grammar and punctuation; deleted 1 characters in body; edited title" Text="Say I like to experiment with multiplayer games and I do not want to reinvent the wheel and build yet another game server. I don’t mind configuring and writing wrappers and adapters (both in c++ and java) for the server.   &#xD;&#xA;What server does Farmville use? Is it Java or C based? &#xD;&#xA;What isometric flash engine do they use?  What other examples can I look into to learn the subject?   &#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12167" PostHistoryTypeId="4" PostId="6107" RevisionGUID="8d93af3a-1e73-4bcf-bbbb-29124de6c577" CreationDate="2010-12-01T15:44:00.553" UserId="1156" Comment="Edited grammar and punctuation; deleted 1 characters in body; edited title" Text="What freeware frameworks and tools to choose if I want  to build a game like Farmville or Club Penguin?" />
  <row Id="12169" PostHistoryTypeId="2" PostId="6112" RevisionGUID="9312a3fc-6417-4ff0-b580-5d4b95fe42d0" CreationDate="2010-12-01T16:10:01.477" UserId="2962" Text="http://forums.indiegamer.com is a great forum for finding help. There's a &quot;Help Wanted&quot; section but they allow only paid offers." />
  <row Id="12170" PostHistoryTypeId="2" PostId="6113" RevisionGUID="fc3dce04-6cb1-45c8-9ee3-911452f0b516" CreationDate="2010-12-01T16:13:26.187" UserId="2188" Text="*@Sean James* is for linear games, fine. I somewhat disagree.&#xD;&#xA;&#xD;&#xA;if your game *is* linear, for god's sake don't pretend it's not. A linear game that fakes being non-linear should burn in hell (hello, Metroid Fusion).&#xD;&#xA;&#xD;&#xA;non-linear is fine and much fun, as long as:&#xD;&#xA;&#xD;&#xA;* there is a good map, where it is crystal clear which areas you have already visited which doors you still have to open, which items you didn't grab for whatever reason and in general which area of the map corresponds to which area of the game&#xD;&#xA;* the player can mark and comment arbitrary map locations&#xD;&#xA;* you try as much as possible to avoid dead ends: if I go back to an earlier section to explore a door I missed, I'll be pissed off if there is a single useless room&#xD;&#xA;* there are nice means of transportation between different areas of the map (i.e. don't do like Aquaria - which is a great game apart from that)&#xD;&#xA;&#xD;&#xA;To sum it up, the ideal is doing like Castlevania, but better." />
  <row Id="12171" PostHistoryTypeId="2" PostId="6114" RevisionGUID="bc5ad4c1-aba4-475c-b487-f4241fdb6bdc" CreationDate="2010-12-01T16:23:30.240" UserId="51" Text="One of your best bets is to look at &lt;a href=&quot;http://www.gotoandplay.it/_articles/multiplayerCentral/&quot;&gt;SmartFoxServer Lite&lt;/a&gt;.  It's free, but better packages cost money.  It's basically a socket server that uses JSON for all its communication and works well with various clients.&#xD;&#xA;&#xD;&#xA;(I haven't used it myself, but heard it recommended in the past.)" />
  <row Id="12172" PostHistoryTypeId="2" PostId="6115" RevisionGUID="e0d8bdf2-ca36-4191-af3d-69cb752d6e46" CreationDate="2010-12-01T17:11:14.750" UserId="1386" Text="Multiplying the vector by the matrix should give you the vectors orientation in world space. If this isn't the case then it could be that you are building the transformation matrix incorrectly." />
  <row Id="12173" PostHistoryTypeId="2" PostId="6116" RevisionGUID="59a99f30-bdb5-4469-befc-ae894f002b00" CreationDate="2010-12-01T17:29:58.680" UserId="2287" Text="In addition to what CiscolPPhone said, make sure that you are crossing properly. `Dir X Up != Up X Dir`. To get the third vector properly, you must first know the handedness of the co-ordinate system. Is it right handed, then it should be `Up X Dir` and for left handed it should be `Dir X Up`." />
  <row Id="12174" PostHistoryTypeId="2" PostId="6117" RevisionGUID="42165b71-6221-4d2a-87d6-f445066f4a6b" CreationDate="2010-12-01T17:30:30.910" UserId="2290" Text="For your database needs, I'd highly recommend looking into [Membase][1].&#xD;&#xA;&#xD;&#xA;&gt; Membase is the primary database for the popular FarmVille and Café World applications at Zynga; and it provides a shared data management platform for NHN, Korea’s largest web application operator with nearly 70 million unique users. - Membase Website&#xD;&#xA;&#xD;&#xA;The engine Zynga uses to build FarmVille is highly custom, but [this website][2] links to various isometric flash engines and frameworks you may want to look in to.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.membase.org/&#xD;&#xA;  [2]: http://www.emanueleferonato.com/2010/02/23/11-flash-isometric-engines-you-can-use-in-your-games/" />
  <row Id="12175" PostHistoryTypeId="2" PostId="6118" RevisionGUID="b5965034-c183-4f9e-a253-f8e67ccea505" CreationDate="2010-12-01T17:38:42.057" UserId="2290" Text="The [ModDB &amp; IndieDB forums][1] have a [Recruiting &amp; Resumes section][2] where you can look for designers, artists, and programmers alike. ModDB and IndieDB have the added benefit of allowing you to create a showcase page for your project, where you can attract fans and potential team members.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.indiedb.com/forum&#xD;&#xA;  [2]: http://www.indiedb.com/forum/board/recruiting-resumes" />
  <row Id="12176" PostHistoryTypeId="2" PostId="6119" RevisionGUID="9ebc1d70-a91b-4a61-8efc-66e584c1f6a5" CreationDate="2010-12-01T17:50:28.087" UserDisplayName="Scott" Text="ModDB and IndieDB also have an [official jobs board][1] which is free to post on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.indiedb.com/jobs" />
  <row Id="12177" PostHistoryTypeId="5" PostId="5105" RevisionGUID="98dd2b83-ef46-4220-ba25-800be966b625" CreationDate="2010-12-01T18:00:50.520" UserId="2870" Comment="edited body" Text="Do you know of any terrain formats for FPS games that use a [triangulated irregular network (TIN)](http://en.wikipedia.org/wiki/Triangulated_irregular_network) instead of a grid for elevation representation? Or at least a game whose development tools accept a TIN as input for terrain elevation?&#xD;&#xA;&#xD;&#xA;The only example I have is the [ASCII Scene Export (ASE)](http://wiki.beyondunreal.com/Legacy:ASE_File_Format) format that can be used as input in the terrain editor for the Unreal engine (UnrealEd). I am mainly looking for formats that support terrain holes (both visually and in collision detection) and allow underground models. I want to avoid having to carve and cover gridded terrain elevation grids to place underground models." />
  <row Id="12178" PostHistoryTypeId="2" PostId="6120" RevisionGUID="bc745078-4939-4055-b296-25720d6d6e0c" CreationDate="2010-12-01T18:07:47.603" UserId="3282" Text="Since I found out [Box2D](http://www.box2d.org/), I'm using it for kind of any game-like application I try to write, from very small prototypes or small programs to test something, to actual projects.&#xD;&#xA;&#xD;&#xA;Thanks to it it's so terribly easy to handle anything from collisions, to the actual physics.&#xD;&#xA;&#xD;&#xA;Sometimes, though, I have some doubts about it: if I only have to handle circles or AABB, and don't need advanced physics tools (joints or stuff like that), I think that a physics engine could add a sort of big, unneeded overhead.&#xD;&#xA;&#xD;&#xA;To reassume my question: would you use Box2D (or other physics engines) in a game where physics is really simple (like Super Mario, let's say)? And, if not, why?" />
  <row Id="12179" PostHistoryTypeId="1" PostId="6120" RevisionGUID="bc745078-4939-4055-b296-25720d6d6e0c" CreationDate="2010-12-01T18:07:47.603" UserId="3282" Text="When should I use a physics engine?" />
  <row Id="12180" PostHistoryTypeId="3" PostId="6120" RevisionGUID="bc745078-4939-4055-b296-25720d6d6e0c" CreationDate="2010-12-01T18:07:47.603" UserId="3282" Text="&lt;physics&gt;" />
  <row Id="12181" PostHistoryTypeId="2" PostId="6121" RevisionGUID="56dd8234-ea94-420d-b202-3edcdd081b42" CreationDate="2010-12-01T18:09:05.773" UserDisplayName="gameDesigner89" Text="I want to ask you about ideas for games, what methods do you know and which you are useing ?&#xD;&#xA;I know for example method, to write a lot of smaller ideas on pieces of paper, and when I have 20-30 then, I try to connect one of them with another, to genereate new idea. For my the most difficult is to extend some idea, do you know some advice for me ?" />
  <row Id="12182" PostHistoryTypeId="1" PostId="6121" RevisionGUID="56dd8234-ea94-420d-b202-3edcdd081b42" CreationDate="2010-12-01T18:09:05.773" UserDisplayName="gameDesigner89" Text="New games ideas produce methods" />
  <row Id="12183" PostHistoryTypeId="3" PostId="6121" RevisionGUID="56dd8234-ea94-420d-b202-3edcdd081b42" CreationDate="2010-12-01T18:09:05.773" UserDisplayName="gameDesigner89" Text="&lt;game-design&gt;" />
  <row Id="12184" PostHistoryTypeId="2" PostId="6122" RevisionGUID="88c10ed5-e841-4c60-b651-81a20aaf2b77" CreationDate="2010-12-01T19:02:46.777" UserId="2301" Text="Something as easy as Super Mario no, as it doesn't really have much physics. (Mario does not affect other object's physics with his jumping)&#xD;&#xA;&#xD;&#xA;if you are using physics in the sense of multiple items (more than one) using physics to affect the outcome of other objects, then I would use an engine." />
  <row Id="12185" PostHistoryTypeId="2" PostId="6123" RevisionGUID="4b521c56-5a6d-4909-b114-a2b9100169a2" CreationDate="2010-12-01T19:16:43.323" UserId="2100" Text="My answer is yes, absolutely use a physics engine like Box2D for simple stuff, because you shouldn't spend unneeded development time implementing some of the features that you quickly get from a physics engine. For instance, define a static body and drop a dynamic body on it, and apply force to your dynamic body for directional input, and you've got a platformer in a few minutes. I don't think that an engine adds enough overhead to make this not worth it." />
  <row Id="12186" PostHistoryTypeId="2" PostId="6124" RevisionGUID="26af01a3-ed74-4893-98a8-9ac1a4f87373" CreationDate="2010-12-01T19:18:55.803" UserId="2091" Text="I take most inspiration from things completely unrelated to games.  It's better to go out and do stuff: travel, watch movies, read novels, do sport, just walk around downtown, etcetera.  The more time I spend in front of my computer, the less creative I become.  Moreover, if I try to take inspiration from games, I can only think of derivative clones of the games I play, it really harms my creativity.&#xD;&#xA;&#xD;&#xA;Also, my best ideas come when I am not trying to think about them.  In the shower, while commuting to work, having a nice walk in the park, or when sleeping.  Always have a notebook and a pen with you, wherever you go, whatever you do.  When you're sitting back in front of the computer the ideas will be gone if you had not written them down.&#xD;&#xA;&#xD;&#xA;You are asking for methods.  My method is this:  Turn off the computer, leave my home, go somewhere and do something interesting.  Then I write a note telling my thoughts to myself.  " />
  <row Id="12187" PostHistoryTypeId="2" PostId="6125" RevisionGUID="eb753e46-85bf-4fd1-ba1f-354b8d872c8c" CreationDate="2010-12-01T19:24:01.277" UserId="2992" Text="If the &quot;physics&quot; in a game is simple there is no need to import a physics engine.&#xD;&#xA;&#xD;&#xA;I use the term physics loosely since there is a difference between modeling physics and&#xD;&#xA;simulating phyiscs. A very important thing to differentiate.&#xD;&#xA;&#xD;&#xA;For example, in Mario Bros. when you run and stop you will slide a bit.&#xD;&#xA;Think about how you might implement that. &#xD;&#xA;&#xD;&#xA;You can model it by defining all of the necessary variables:&#xD;&#xA;eg. mass, gravity, co-efficient of friction, thrust, etc. &#xD;&#xA;and then calculating your new velocity, acceleration, etc.&#xD;&#xA;&#xD;&#xA;but is it worth it? You can simulate the same effect by diminishing the players' speed while they aren't moving...&#xD;&#xA;&#xD;&#xA;Something like:&#xD;&#xA;&#xD;&#xA;    if( pressing movement key ) { &#xD;&#xA;     speed = 5; &#xD;&#xA;    } else { &#xD;&#xA;     if(speed) speed--; // slide!&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;The difference is one is physics the other is not. There are pros and cons to both.&#xD;&#xA;But as a general rule for simple games it is much easier to fake it." />
  <row Id="12188" PostHistoryTypeId="2" PostId="6126" RevisionGUID="6c105318-2d7a-41e8-b917-fea13483922e" CreationDate="2010-12-01T19:45:55.683" UserId="165" Text="There are a number of non-Blizzard sites that show a complete list of available items in World of Warcraft (such as wowhead, etc). I would like to know the best (easiest) way to compile a similar list.&#xD;&#xA;&#xD;&#xA;I believe some sites are based on user-entered input, which I would like to avoid. Looking at the lua API, it seems that there are functions to get a list of items, but it's not clear if I can just download everything (I remember a reference to throttling somewhere, can't find it now). Does anyone have code samples that would do this, or links to source?&#xD;&#xA;&#xD;&#xA;Also, Eve Online has made a database of items available (and I do mean SQL database file for download, not the Armory) - is there anything similar for Wow?&#xD;&#xA;&#xD;&#xA;I'm just looking for the names and stats, not the graphic icons." />
  <row Id="12189" PostHistoryTypeId="1" PostId="6126" RevisionGUID="6c105318-2d7a-41e8-b917-fea13483922e" CreationDate="2010-12-01T19:45:55.683" UserId="165" Text="How to build list of items available in World of Warcraft?" />
  <row Id="12190" PostHistoryTypeId="3" PostId="6126" RevisionGUID="6c105318-2d7a-41e8-b917-fea13483922e" CreationDate="2010-12-01T19:45:55.683" UserId="165" Text="&lt;world-of-warcraft&gt;" />
  <row Id="12191" PostHistoryTypeId="2" PostId="6127" RevisionGUID="24215899-520d-47be-9880-b92aa4b3f406" CreationDate="2010-12-01T19:49:57.013" UserId="953" Text="If the memory, disk space, development effort, or processor time used for Box2D is too much for your purposes, then don't use it.  Otherwise, there's no reason to avoid it if you find it useful.  " />
  <row Id="12192" PostHistoryTypeId="10" PostId="6121" RevisionGUID="c9feb53d-f455-412e-96b1-4854f50f511c" CreationDate="2010-12-01T20:08:01.520" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12193" PostHistoryTypeId="5" PostId="6121" RevisionGUID="2c2821f9-f0bd-4821-b4c2-321df2a6404a" CreationDate="2010-12-01T20:08:01.693" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How do you come up with ideas for new games?](http://gamedev.stackexchange.com/questions/2988/how-do-you-come-up-with-ideas-for-new-games)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hello!&#xD;&#xA;I want to ask you about ideas for games, what methods do you know and which you are useing ?&#xD;&#xA;I know for example method, to write a lot of smaller ideas on pieces of paper, and when I have 20-30 then, I try to connect one of them with another, to genereate new idea. For my the most difficult is to extend some idea, do you know some advice for me ?" />
  <row Id="12194" PostHistoryTypeId="18" PostId="6121" RevisionGUID="0da962cb-1e26-4d18-afbd-e60845ace4f3" CreationDate="2010-12-01T20:09:10.457" UserId="51" Comment="to http://gamedev.stackexchange.com/questions/2988/how-do-you-come-up-with-ideas-for-new-games" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12195" PostHistoryTypeId="18" PostId="6124" RevisionGUID="0da962cb-1e26-4d18-afbd-e60845ace4f3" CreationDate="2010-12-01T20:09:10.457" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/6121/new-games-ideas-produce-methods" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12196" PostHistoryTypeId="18" PostId="2988" RevisionGUID="0da962cb-1e26-4d18-afbd-e60845ace4f3" CreationDate="2010-12-01T20:09:10.457" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/6121/new-games-ideas-produce-methods" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12197" PostHistoryTypeId="14" PostId="6121" RevisionGUID="e67e72f3-cb9b-407f-b731-322947d8b7ec" CreationDate="2010-12-01T20:09:10.693" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12198" PostHistoryTypeId="16" PostId="6124" RevisionGUID="0a8c1b64-f272-471b-8803-c211e9b7c72f" CreationDate="2010-12-01T20:09:48.477" UserId="51" />
  <row Id="12199" PostHistoryTypeId="2" PostId="6128" RevisionGUID="e107a048-4a39-4ffe-ba38-7924b29afe93" CreationDate="2010-12-01T21:03:37.937" UserId="2787" Text="Every object in the game is on the client side, it's just the server side that says what that object can do. All this involves is finding a program that will unpack the proprietary data files: MPQ's and then extract them. Then you'll probably need to figure out a way to parse that data into easy to an easy to use format (XML), then you can create a program to do whatever you want with it.&#xD;&#xA;&#xD;&#xA;[HERE][1] is an article on how to get Character Models from MPQs, I would imagine any item would be very similar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.instructables.com/id/Getting-Character-Models-From-Warcraft-Files/#step1" />
  <row Id="12200" PostHistoryTypeId="2" PostId="6129" RevisionGUID="b8904571-fdd3-466f-b486-ac5c814b9ef1" CreationDate="2010-12-01T22:33:11.947" UserId="1047" Text="What are some popular commercial middleware?&#xD;&#xA;&#xD;&#xA;I know havok and fmod are extremely popular. What are other popular commercial middleware?" />
  <row Id="12201" PostHistoryTypeId="1" PostId="6129" RevisionGUID="b8904571-fdd3-466f-b486-ac5c814b9ef1" CreationDate="2010-12-01T22:33:11.947" UserId="1047" Text="Popular commercial middleware?" />
  <row Id="12202" PostHistoryTypeId="3" PostId="6129" RevisionGUID="b8904571-fdd3-466f-b486-ac5c814b9ef1" CreationDate="2010-12-01T22:33:11.947" UserId="1047" Text="&lt;middleware&gt;&lt;commercial&gt;" />
  <row Id="12203" PostHistoryTypeId="2" PostId="6130" RevisionGUID="b80353e4-a1fd-49fe-939f-6cc188d76006" CreationDate="2010-12-01T23:06:25.257" UserId="2100" Text="There isn't much more to the question. I'm not concerned about overhead, as I'm sure they are both fine for my purposes. Basically, I am familiar with Box2D concepts because of the Farseer Physics Engine, but I want to use Bullet when I make the jump to 3D stuff. Perhaps Bullet has some educational value for me even in the 2D realm?" />
  <row Id="12204" PostHistoryTypeId="1" PostId="6130" RevisionGUID="b80353e4-a1fd-49fe-939f-6cc188d76006" CreationDate="2010-12-01T23:06:25.257" UserId="2100" Text="Is it worth it to use Bullet for 2D physics instead of Box2D for the sake of learning Bullet?" />
  <row Id="12205" PostHistoryTypeId="3" PostId="6130" RevisionGUID="b80353e4-a1fd-49fe-939f-6cc188d76006" CreationDate="2010-12-01T23:06:25.257" UserId="2100" Text="&lt;c++&gt;&lt;physics&gt;&lt;box2d&gt;&lt;bullet-physics&gt;" />
  <row Id="12206" PostHistoryTypeId="16" PostId="6129" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-01T23:17:42.767" UserId="51" />
  <row Id="12207" PostHistoryTypeId="5" PostId="6130" RevisionGUID="76f5661d-3363-4f79-9f63-f63279d4c3d1" CreationDate="2010-12-01T23:21:52.567" UserId="2100" Comment="clarified wording" Text="There isn't much more to the question. I'm not concerned about overhead, as I'm sure they are both fine for my purposes. Basically, I am familiar with Box2D concepts because of the Farseer Physics Engine, but I want to use Bullet when I make the jump to 3D stuff. Perhaps Bullet has some educational value for me even in the 2D realm?&#xD;&#xA;&#xD;&#xA;The generalized version of the question is: should I use a 3D physics engine for a 2D game if I plan to utilize a 3D physics engine in the future? Or is this a waste of time which would not provide educational value?" />
  <row Id="12208" PostHistoryTypeId="2" PostId="6131" RevisionGUID="253f9af4-d200-4e6b-bba1-09b760972bed" CreationDate="2010-12-01T23:27:20.660" UserId="1091" Text="My generally feeling is always that learning to use something in the wrong context is not a valuable exercise.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12209" PostHistoryTypeId="5" PostId="6094" RevisionGUID="8ae187e3-5064-42c8-9b14-137ae98f9c9e" CreationDate="2010-12-01T23:31:06.420" UserId="3115" Comment="added 322 characters in body" Text="**Keep rewarding me**&#xD;&#xA;&#xD;&#xA;I like being rewarded for my actions. So loads of small bonus items, small upgrades, gold/points something that immidiately gives me pleasure so I want to continue grabbing more and more.&#xD;&#xA;&#xD;&#xA;**Dont punish me with time-limits**&#xD;&#xA;&#xD;&#xA;What I dont like in a game is when the developers finds it too easy and uses TIME as the only thing keeping me from completing a level. That is bad level design. You could use time as a &quot;bonus&quot;, but never as a punishment. Sometimes the phone rings, the dinner is ready or even a toilet has to be visited. A pause is not enough here. If I am close to the goal and the level ends just because I was 5 seconds short, there is not much reason for me to try once more for 7 minutes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My approach is to keep the player happy and occupied even in stressed situations. &#xD;&#xA;&#xD;&#xA;So, none or a minimum of &quot;Whoops dead, replay the last 5 minutes to get right back here&quot;... instead, make it attractice to try again, not a punishment.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12210" PostHistoryTypeId="2" PostId="6132" RevisionGUID="05fb1da5-5479-4d66-bd38-012f95492b01" CreationDate="2010-12-01T23:54:48.803" UserId="1198" Text="I am trying to determine the best way to implement the &quot;update&quot; system or engine for a simple XNA game.&#xD;&#xA;&#xD;&#xA;**Description of situation**&#xD;&#xA;--&#xD;&#xA;I have a few classes, lets call them&#xD;&#xA;&#xD;&#xA;1. Player [will be an array/list/collection of 1-4 local players]&#xD;&#xA;2. Enemy [will consist of all enemy characters in the given &quot;zone&quot;]&#xD;&#xA;3. Future [not implemented, may not be implemented for this game, but may be needed in future]&#xD;&#xA;4. Future&#xD;&#xA;&#xD;&#xA;I'm trying to decide what the best way to manage this will be, I'm going back and forth between a couple options.&#xD;&#xA;&#xD;&#xA;**First Approach**&#xD;&#xA;-- &#xD;&#xA;In the `Update()` method of my game, write code like this&#xD;&#xA;&#xD;&#xA;    void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        var ctlInput = GetControllerInput();&#xD;&#xA;        for(int i = 0; i &lt; 4; i++)&#xD;&#xA;        {&#xD;&#xA;            if(Player[i] != null) { Player[i].Update(gameTime, ctlInput); }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        for(int i = 0; i &lt; Enemy.Count; i++)&#xD;&#xA;        {&#xD;&#xA;            Enemy[i].Update(gameTime, Player);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In this version, I would add &quot;FrameStatus&quot; fields to the Player class, which would look like `bool IsShooting` and `Vector2 TargetedLocation` etc. This also means that each class would be responsible for knowing how to update itself in the game world.&#xD;&#xA;&#xD;&#xA;In my eyes, the advantages of this approach are: &#xD;&#xA;&#xD;&#xA;1. No new classes.&#xD;&#xA;2. Classes become self-documenting&#xD;&#xA;3. Easy to extend and add additional properties&#xD;&#xA;&#xD;&#xA;but the disadvantages are:&#xD;&#xA;&#xD;&#xA;1. Order of code in Game.Update is very important&#xD;&#xA;2. Tight coupling of Player and Enemy classes&#xD;&#xA;&#xD;&#xA;**Second Approach**&#xD;&#xA;--&#xD;&#xA;Implement a type of UpdateManager class, which accepts the user input, and it alone updates the Player and Enemy classes. This would relegate the Player and Enemy classes to simply dumb-data classes, and they wouldn't necessarily have any game logic in them at all.&#xD;&#xA;&#xD;&#xA;    void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        var ctlInput = GetcontrollerInput();&#xD;&#xA;        updateManager.Update(gameTime, ctlInput);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The advantages of this approach, in my eyes are&#xD;&#xA;&#xD;&#xA;1. Keeps code away from Game.Update()&#xD;&#xA;2. Doesn't require Player and Enemy classes to know about each other at all&#xD;&#xA;&#xD;&#xA;Disadvantages as I see it:&#xD;&#xA;&#xD;&#xA; - Adds a new class to my game&#xD;&#xA; - The new class, will have a lot of code as time goes on and more types of objects enter the game world &#xD;&#xA;&#xD;&#xA;**Actual Question**&#xD;&#xA;--&#xD;&#xA;Of the pro/cons I've come up with for my two approaches,&#xD;&#xA;&#xD;&#xA; - do you think I've missed any, what are they?&#xD;&#xA; - which makes you lean for or against an approach, why?&#xD;&#xA;&#xD;&#xA;Which approach would you take, and also why would you go that route? Would you elect for a third option? What would that option look like?" />
  <row Id="12211" PostHistoryTypeId="1" PostId="6132" RevisionGUID="05fb1da5-5479-4d66-bd38-012f95492b01" CreationDate="2010-12-01T23:54:48.803" UserId="1198" Text="Designing the Update system (read very basic game engine) for an XNA game" />
  <row Id="12212" PostHistoryTypeId="3" PostId="6132" RevisionGUID="05fb1da5-5479-4d66-bd38-012f95492b01" CreationDate="2010-12-01T23:54:48.803" UserId="1198" Text="&lt;xna&gt;&lt;engine&gt;&lt;gameloop&gt;&lt;architecture&gt;" />
  <row Id="12213" PostHistoryTypeId="2" PostId="6133" RevisionGUID="768fed4d-b553-4666-a22e-6346e26aaa6d" CreationDate="2010-12-02T00:10:46.167" UserId="3115" Text="A scroller is quite simple a &quot;virtual viewport&quot; that pushes new tiles/objects in from direction you are scrolling.&#xD;&#xA;&#xD;&#xA;Simple example to see this, is to build a simple 1 line marquee(textscroller).&#xD;&#xA;&#xD;&#xA;Lets for example purpose say we have a line with 20 characters/letters/chars.&#xD;&#xA;&#xD;&#xA;We place them in an string/array like:&#xD;&#xA;&#xD;&#xA;    String viewport = &quot;....................&quot;;&#xD;&#xA;    String text = &quot;Hello World (how original!)&quot;;&#xD;&#xA;&#xD;&#xA;now if we print this, we will only see the &quot;dots&quot;.&#xD;&#xA;&#xD;&#xA;    Console.WriteLine(viewport);&#xD;&#xA;&#xD;&#xA;Now to scroll it, we need to make the dots go to the left. So we can read the text comming in.&#xD;&#xA;&#xD;&#xA;For this to happend, we remove the first letter from left and adds the next to be shown from the right.&#xD;&#xA;&#xD;&#xA;so we say: &#xD;&#xA;&#xD;&#xA;    viewport = viewport.Substring(2);&#xD;&#xA;&#xD;&#xA;to take the 2nd letter and forward which equals rest of viewports current content.&#xD;&#xA;&#xD;&#xA;Now the viewport is 1 char/letter to narrow, so we need to add the next char from the scroller. Therefore we need a variable for controlling where we are in the scrolltext.&#xD;&#xA;&#xD;&#xA;    // place this outside your scroll loop&#xD;&#xA;    int scrollPos =0;&#xD;&#xA;&#xD;&#xA;Now with this index, we can find the next character.&#xD;&#xA;&#xD;&#xA;    char next = text.substring(scrollPos,1);&#xD;&#xA;&#xD;&#xA;Then add this to the viewport.&#xD;&#xA;   &#xD;&#xA;    viewport += next;&#xD;&#xA;&#xD;&#xA;And increment your position in the scrolltext.&#xD;&#xA;&#xD;&#xA;    scrollPos++;&#xD;&#xA;&#xD;&#xA;Now we have scrolled the contents 1 char left.&#xD;&#xA;&#xD;&#xA;Keep doing this over and over, and it will look like the &quot;Hello World&quot; is scrolling across your viewport.&#xD;&#xA;&#xD;&#xA;Now imagine this trick in all directions. Instead of characters, you use your own &quot;Tiles&quot;. Secondly, to make it go smooth, you also add a &quot;pixel scroll&quot; within your scroller or you just multiple your scrollpos for simplicity. Then when you need to figure out which tile to add next, then just divide your current scrollpos with tile-width, then you know if you need to move the viewport scroll contents in any direction. &#xD;&#xA;&#xD;&#xA;if you need to scroll arrays (with tile/block data) you can do it with simple for-loops.&#xD;&#xA;&#xD;&#xA;**left scroll**&#xD;&#xA;&#xD;&#xA;    for (int pos=0;pos&lt;viewwidth;pos++)&#xD;&#xA;    {&#xD;&#xA;        tilemap[pos] = tilemap[pos+1];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    tilemap[width] = newTile; // from maparray.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Phew**&#xD;&#xA;&#xD;&#xA;That was a long explanation. Do you understand my point here, or do you need further explanation?&#xD;&#xA;" />
  <row Id="12214" PostHistoryTypeId="2" PostId="6134" RevisionGUID="9d888bdc-165b-4f60-bbfd-25caf14478a4" CreationDate="2010-12-02T01:13:42.653" UserId="51" Text="Well there are a couple of assumptions about your first approach that I don't think are entirely accurate.&#xD;&#xA;&#xD;&#xA;1) Enemy and Player being tightly coupled.  &#xD;&#xA;&#xD;&#xA;Why is that, specifically?  Could an event system solve some of the coupling issues?  Could intermediary classes (i.e. your world/level/whatever container class) handle some of the logic?  I mean, sure, if you want your enemies to start behavior X if the player is shooting then the easiest thing to do is just query the player directly, but there are ways around that.  There are lots and lots of articles/papers/books on how to decouple classes, so I won't go into too much detail here.&#xD;&#xA;&#xD;&#xA;That being said, I don't necessarily think coupling is something to be avoided at all costs.  If your *design* is coupled, then having a few coupled classes here and there isn't going to hurt too much.  Doing things like having delegates just to avoid having your class &quot;know about&quot; another class to call a function doesn't really help much except compile times.  &#xD;&#xA;&#xD;&#xA;2) The order of things in Update is very important&#xD;&#xA;&#xD;&#xA;This is a similar assumption as the coupling.  I've worked with games in the past where my code looked a lot like what you had in your first code.  I've also started working with Unity recently where *everything* is a game object, the code you write is all components on those game objects, and the order of updates for everything in the world is non-deterministic.  It's entirely possible to write code where order doesn't matter that much, although to be fair Unity does provide a LateUpdate pool for things that need to happen after everything else.  This is mainly used for things like moving the camera after the player moves to make sure everything doesn't feel jittery, but in the general case I really don't care which update method is called first.&#xD;&#xA;&#xD;&#xA;For both of those assumptions I think you could ask specific questions on &quot;how do I decouple these two classes given this situation&quot; and get some answers.  I can't just give you a blanket &quot;here do this&quot; answer.&#xD;&#xA;&#xD;&#xA;If you remove those assumptions I think you'll find the first option looks a lot more lucrative.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Definitely stay away from option 2 though.  That just feels like a blob class if you try to shove everything in some kind of global &quot;world manager&quot;.  Some data-driven-design people might come to its defense, but object-oriented-design people hate it.  I've personally never done it that way but I can imagine it getting pretty out of hand with any amount of complexity if you go into it without proper structure and delegation of responsibilities in one way or another." />
  <row Id="12216" PostHistoryTypeId="2" PostId="6136" RevisionGUID="292caa6a-22bc-4d8e-81b5-9a8d8fe3865f" CreationDate="2010-12-02T02:17:47.107" UserId="160" Text="I definitely would *not* take the second approach. You can make the first approach a little less tightly coupled by doing this:&#xD;&#xA;&#xD;&#xA;    void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        var ctlInput = GetControllerInput();&#xD;&#xA;        foreach (var updateable in Updateables) {&#xD;&#xA;            updateable.Update(gameTime, ctlInput);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Here, `Updateables` is a collection of objects that implement this:&#xD;&#xA;&#xD;&#xA;    interface IUpdateable&#xD;&#xA;    {&#xD;&#xA;        void Update(GameTime gameTime, ControllerInput ctlInput);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then have `Player` and `Enemy` both implement that interface. This way, your game loop isn't bound to updating certain things in a specific order and isn't coupled directly to your game entity classes." />
  <row Id="12217" PostHistoryTypeId="2" PostId="6137" RevisionGUID="b3881875-1b03-4f33-9fb3-8b22528dfaf5" CreationDate="2010-12-02T03:11:58.787" UserId="1130" Text="I've been playing with Blender and Python, doing basic things like accessing vertices/normals,etc.&#xD;&#xA;&#xD;&#xA;I can get the normal of each face of a mesh. I was wondering, how can I get the rotation of a face based on it's normal ? Can I 'decompose' the normal's rotation into rotation x,y,z ? If so how ?&#xD;&#xA;&#xD;&#xA;I remember 3dsmax had something that allowed you to easily place objects on another object's faces/surface. Haven't seen that in Blender, might be handy. " />
  <row Id="12218" PostHistoryTypeId="1" PostId="6137" RevisionGUID="b3881875-1b03-4f33-9fb3-8b22528dfaf5" CreationDate="2010-12-02T03:11:58.787" UserId="1130" Text="How do I find rotation in 3D based on a vector/normal ?" />
  <row Id="12219" PostHistoryTypeId="3" PostId="6137" RevisionGUID="b3881875-1b03-4f33-9fb3-8b22528dfaf5" CreationDate="2010-12-02T03:11:58.787" UserId="1130" Text="&lt;math&gt;&lt;blender&gt;&lt;vector&gt;&lt;geometry&gt;" />
  <row Id="12220" PostHistoryTypeId="2" PostId="6138" RevisionGUID="5b9263f7-dbd7-43c4-b3b0-3a6cddad8c09" CreationDate="2010-12-02T04:22:08.060" UserId="1463" Text="When constructing an orientation matrix, are the rows of the matrix the axis?" />
  <row Id="12221" PostHistoryTypeId="1" PostId="6138" RevisionGUID="5b9263f7-dbd7-43c4-b3b0-3a6cddad8c09" CreationDate="2010-12-02T04:22:08.060" UserId="1463" Text="When constructing an orientation matrix, are the rows of the matrix the axis?" />
  <row Id="12222" PostHistoryTypeId="3" PostId="6138" RevisionGUID="5b9263f7-dbd7-43c4-b3b0-3a6cddad8c09" CreationDate="2010-12-02T04:22:08.060" UserId="1463" Text="&lt;math&gt;&lt;graphics-programming&gt;&lt;matrix&gt;" />
  <row Id="12223" PostHistoryTypeId="2" PostId="6139" RevisionGUID="18425733-349d-48c4-8ca4-533d12f0f406" CreationDate="2010-12-02T05:51:56.967" UserId="2187" Text="There are a few things to consider here. The first is that a face is not necessarily rotated just because its normal is not aligned with an axis. The second is that you can't obtain Euler angles (x,y,z rotations) from just a normal. You would need to know at least 2 non collinear vectors to do that as you need three perpendicular vectors (a basis in R3) to derive them.&#xD;&#xA;&#xD;&#xA;However, I believe you are asking how to find the angles needed to rotate an axis vector so that it is collinear with the normal. This is possible to do with just a normal, and only requires two rotations. You can pick which two axises to rotate from as it doesn't really matter, but for an example I will use rotation about the +Z axis (pointing up) and the +X axis (pointing right).&#xD;&#xA;&#xD;&#xA;First we have the normal N = (Xn,Yn,Zn). The best way to think about it is to project the vector onto two of the 2D planes made by the basis vectors. In this case it would be the YZ plane and XY plane. In the YZ plane, the X coordinate of the normal essentially disappears and we are left with a 2D trig problem. Similarly in the XY plane, the Z coordinate of the normal disappears. Just solve for the angle between the axis vector you will be rotating and the projected normal vector.&#xD;&#xA;&#xD;&#xA;Be careful of the domains of the inverse trig functions, they do not cover all 360 degrees of rotations uniquely. Also, if the normal is on one of the planes (XY, YZ, XZ) make sure you use that plane in your calculations. Otherwise you will get two angles of 0 which is not useful.&#xD;&#xA;&#xD;&#xA;The second part is done by changing the basis for the new object from the basis of the original object to one that has its origin at the point on the face where you clicked, one of the basis vectors as the normal of that face (or a normalized version if the normal is not of length 1), and two other perpendicular vectors. Note that if you wanted to, you could do the calculations from the first part to determine the angle between the up axis in the original basis and the normal, then rotate all three axises of the original bases by those angles to obtain the basis for the new object.&#xD;&#xA;&#xD;&#xA;This can also be done using matrix math and would avoid the calculation of trig function values.  " />
  <row Id="12224" PostHistoryTypeId="5" PostId="6139" RevisionGUID="9a1d1532-2a6d-4273-b897-e2d1bb52b54e" CreationDate="2010-12-02T05:57:23.483" UserId="2187" Comment="fixed a typo" Text="There are a few things to consider here. The first is that a face is not necessarily rotated just because its normal is not aligned with an axis. The second is that you can't obtain Euler angles (x,y,z rotations) from just a normal. You would need to know at least 2 non collinear vectors to do that as you need three perpendicular vectors (a basis in R3) to derive them.&#xD;&#xA;&#xD;&#xA;However, I believe you are asking how to find the angles needed to rotate an axis vector so that it is collinear with the normal. This is possible to do with just a normal, and only requires two rotations. You can pick which two axises to rotate from as it doesn't really matter, but for an example I will use rotation about the +Z axis (pointing up) and the +X axis (pointing right).&#xD;&#xA;&#xD;&#xA;First we have the normal N = (Xn,Yn,Zn). The best way to think about it is to project the vector onto two of the 2D planes made by the basis vectors. In this case it would be the YZ plane and XY plane. In the YZ plane, the X coordinate of the normal essentially disappears and we are left with a 2D trig problem. Similarly in the XY plane, the Z coordinate of the normal disappears. Just solve for the angle between the axis vector you will be rotating and the projected normal vector.&#xD;&#xA;&#xD;&#xA;Be careful of the domains of the inverse trig functions, they do not cover all 360 degrees of rotations uniquely. Also, if the normal is on one of the planes (XY, YZ, XZ) make sure you use that plane in your calculations. Otherwise you will get two angles of 0 which is not useful.&#xD;&#xA;&#xD;&#xA;The second part is done by changing the basis for the new object from the basis of the original object to one that has its origin at the point on the face where you clicked, one of the basis vectors as the normal of that face (or a normalized version if the normal is not of length 1), and two other perpendicular vectors. Note that if you wanted to, you could do the calculations from the first part to determine the angle between the up axis in the original basis and the normal, then rotate all three axises of the original basis by those angles to obtain the basis for the new object.&#xD;&#xA;&#xD;&#xA;This can also be done using matrix math and would avoid the calculation of trig function values.  " />
  <row Id="12225" PostHistoryTypeId="2" PostId="6140" RevisionGUID="1a471fe5-a1d8-48ad-a24a-065a762efb67" CreationDate="2010-12-02T07:21:47.023" UserId="2497" Text="I have implemented a ratio variable on items/entities/objects. So whenever you need to update the sprite position for an &quot;item&quot; you use the ratio to determine the visual position in pixels. Then you don´t need to convert the units in box2d.&#xD;&#xA;&#xD;&#xA;    private function updateSpritePosition() : void&#xD;&#xA;    {&#xD;&#xA;        _sprite.x = _body.GetPosition().x * _ratio;&#xD;&#xA;        _sprite.y = _body.GetPosition().y * _ratio;&#xD;&#xA;    }" />
  <row Id="12226" PostHistoryTypeId="2" PostId="6141" RevisionGUID="2468a0c8-0eaf-4c9f-ab8b-6ac43f5bff44" CreationDate="2010-12-02T08:15:25.220" UserId="1839" Text="That depends, if it is in row major form then yes, for column major form no.&#xD;&#xA;&#xD;&#xA;Where does this matrix come from?" />
  <row Id="12227" PostHistoryTypeId="2" PostId="6142" RevisionGUID="1b5a4d84-b3de-4fbb-bc11-074a485000a3" CreationDate="2010-12-02T09:29:02.960" UserId="825" Text="Here's a random list I just found online:&#xD;&#xA;http://www.gamemiddleware.org/middleware&#xD;&#xA;&#xD;&#xA;If you're willing to pay $3.95 to access the article, I remember reading a great article featuring reviews on various Middleware, including polling from various industry professionals, in a past issue of Game Developer magazine:&#xD;&#xA;http://www.gdmag.com/archive/aug09.htm&#xD;&#xA;&#xD;&#xA;Off the top of my head I remember Havok being on the top of the list for physics, as well as Bink for video and Scaleform for UI.  Beyond that, I can't remember.&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="12228" PostHistoryTypeId="2" PostId="6143" RevisionGUID="125cf211-9cea-40e0-a369-e64147de352a" CreationDate="2010-12-02T11:06:14.413" UserId="3711" Text="From a mathematical point of view, it depends on in which order you are multiplying the vectors with the matrix.&#xD;&#xA;&#xD;&#xA;* Using a row-vector (`v`) and multiplying it with a matrix (`A`) as `v∙A`, then the rows will act as the axes.&#xD;&#xA;* Using a column-vector (`v`) and multiplying a matrix (`A`) with it as `A∙v`, then the columns will act as the axes." />
  <row Id="12229" PostHistoryTypeId="2" PostId="6144" RevisionGUID="56c85665-680a-4b94-98ab-89ea25ded3c3" CreationDate="2010-12-02T13:06:48.470" UserId="93" Text="Information on items, quests, etc. is all requested from the server on demand. Items have an ID  and that, plus some other parameters for the things like current enchant, are what's transmitted on a chat channel when you link an item using shift-click. &#xD;&#xA;&#xD;&#xA;There is an RPC accessible from LUA that returns a formatted description of the item which is what the UI shows in tooltips. It will also include an ID for the model (model and item ID aren't the same thing because lots of items share a model).&#xD;&#xA;&#xD;&#xA;How do you get the IDs of the items in order to request their details? Well, players get IDs back when they loot, when they query the auction house, when they examine other players and a bunch of other ways. It's important to realise that there is no publically accessible list of all items in the game.&#xD;&#xA;&#xD;&#xA;Websites like Thottbot and Wowhead rely on users running an addin that captures all this information and more and stores it in the file on logout. A Windows/Mac application then uploads that file to Wowhead's servers which de-dupe submissions, sanity-check it, etc. So to start a site from scratch you are going to need to develop a similar 'looter' addin and recruit players to run it and submit their data to you - the more the better.&#xD;&#xA;&#xD;&#xA;There is another technique whereby you write some addin code that just guesses item IDs and requests the details for that item (if it exists). The issue with this is that it's against the WoW terms of use to do it on live realms (they seem to tollerate people doing it on PTRs but I wouldn't try it from my main account).&#xD;&#xA;&#xD;&#xA;To learn how to do this you could look through the client UI's LUA source, which is included in human-readable format in the install directory. A quicker route though would be to download one of the client apps from existing WoW database sites and look at their code since that will be focussed on exactly what you want.&#xD;&#xA;" />
  <row Id="12230" PostHistoryTypeId="5" PostId="6138" RevisionGUID="44d6c6a5-be37-43e7-8cd8-5dc08bfee059" CreationDate="2010-12-02T14:53:35.397" UserId="1463" Comment="formatting" Text="When constructing an orientation matrix, are the rows of the matrix the axis?&#xD;&#xA;&#xD;&#xA;The matrix is row-major and I'm multiplying vectors on the right (Mv).  So, the matrix looks like&#xD;&#xA;&#xD;&#xA;    r0c0 r0c1 r0c2&#xD;&#xA;    r1c0 r1c1 r1c2&#xD;&#xA;    r2c0 r2c1 r2c2&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12231" PostHistoryTypeId="2" PostId="6145" RevisionGUID="e033fd01-7c54-4fec-b8af-6c5ad79c6a14" CreationDate="2010-12-02T15:35:26.327" UserId="3717" Text="Super Mario Bros. is definitely the most famous videogame created yet, selling a scorching 40.23 million copies. http://en.wikipedia.org/wiki/List_of_best-selling_video_games&#xD;&#xA;&#xD;&#xA;What programming language was it written in? Does anyone have some original code reference?" />
  <row Id="12232" PostHistoryTypeId="1" PostId="6145" RevisionGUID="e033fd01-7c54-4fec-b8af-6c5ad79c6a14" CreationDate="2010-12-02T15:35:26.327" UserId="3717" Text="What programming language was Super Mario Bros. written in?" />
  <row Id="12233" PostHistoryTypeId="3" PostId="6145" RevisionGUID="e033fd01-7c54-4fec-b8af-6c5ad79c6a14" CreationDate="2010-12-02T15:35:26.327" UserId="3717" Text="&lt;languages&gt;" />
  <row Id="12234" PostHistoryTypeId="2" PostId="6146" RevisionGUID="9b1439e0-1519-4de0-8b64-80130977e330" CreationDate="2010-12-02T15:37:25.750" UserDisplayName="Nathan Heitman" Text="I understand that in order for a game to have a replay system it must:&#xD;&#xA;&#xD;&#xA; - Have a deterministic engine&lt;br&gt;  &#xD;&#xA; - Record initial state&lt;br&gt;  &#xD;&#xA; - Record player inputs&lt;br&gt;&#xD;&#xA;&#xD;&#xA;The problem is, what if the game is being patched every few weeks, and these patches change significant parts of the game that can not really be abstracted into an attribute/state? Like, what if something (minor) is completely redesigned? Then you can no longer just play back older player inputs which took place when there were different mechanics on the current engine because it will lead to entirely different results. &#xD;&#xA;&#xD;&#xA;Example: Let's say there is a bug in StarCraft that makes marines not take any damage if the damage they receive is greater than their maximum health. Later this is patched, but any replay from the time of the bug would be junk on the patched system. People would be trying to move marines that are dead in the eyes of the game, etc.&#xD;&#xA;&#xD;&#xA;Is this reasonably solvable, given there will always be frequency patches that will make structural gameplay changes/fixes? &#xD;&#xA;" />
  <row Id="12235" PostHistoryTypeId="1" PostId="6146" RevisionGUID="9b1439e0-1519-4de0-8b64-80130977e330" CreationDate="2010-12-02T15:37:25.750" UserDisplayName="Nathan Heitman" Text="How do you design a replay system for a frequently patched game" />
  <row Id="12236" PostHistoryTypeId="3" PostId="6146" RevisionGUID="9b1439e0-1519-4de0-8b64-80130977e330" CreationDate="2010-12-02T15:37:25.750" UserDisplayName="Nathan Heitman" Text="&lt;game-design&gt;" />
  <row Id="12237" PostHistoryTypeId="2" PostId="6147" RevisionGUID="56d3c632-4621-4e02-af07-535ba9ee7641" CreationDate="2010-12-02T16:19:02.113" UserId="93" Text="It's not inconceiveable, especially on a PC, that they just version the gameplay code and bump the version when they make a change that affects the replay system. If replay file is tagged with the version of the gameplay code it was created with and the client still has access to that version that it should work fine." />
  <row Id="12238" PostHistoryTypeId="6" PostId="6146" RevisionGUID="761e2712-db4e-4962-b967-a1dbf4f52ac8" CreationDate="2010-12-02T16:25:55.053" UserId="51" Comment="edited tags" Text="&lt;game-recording&gt;&lt;patching&gt;" />
  <row Id="12239" PostHistoryTypeId="6" PostId="6080" RevisionGUID="70605c9c-4417-4d5b-89e6-4aab52dc1463" CreationDate="2010-12-02T16:26:29.703" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;data-structure&gt;&lt;file-format&gt;&lt;game-recording&gt;" />
  <row Id="12240" PostHistoryTypeId="4" PostId="5402" RevisionGUID="d2114f59-9351-4487-85a6-517e9e612cb2" CreationDate="2010-12-02T16:30:59.620" UserId="744" Comment="edited tags; edited title" Text="How do you design a record/replay system for a frequently changing game?" />
  <row Id="12241" PostHistoryTypeId="6" PostId="5402" RevisionGUID="d2114f59-9351-4487-85a6-517e9e612cb2" CreationDate="2010-12-02T16:30:59.620" UserId="744" Comment="edited tags; edited title" Text="&lt;mmo&gt;&lt;multiplayer&gt;&lt;video&gt;&lt;patching&gt;" />
  <row Id="12242" PostHistoryTypeId="2" PostId="6148" RevisionGUID="98d8f0a4-caa8-4cca-869e-6bb199dd89db" CreationDate="2010-12-02T16:41:11.527" UserId="962" Text="#6502 Assembler#&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a forum page about hacking the ROM. http://forums.selectbutton.net/viewtopic.php?t=26956&amp;sid=1a883209e1ba63877bcd58c007bb63ae&#xD;&#xA;&#xD;&#xA;**It should contain any code references you need as well.**&#xD;&#xA;&#xD;&#xA;A few posts down there is a link to a zip file that contains these items needed to edit/hack the game.&#xD;&#xA;&#xD;&#xA;* ca65 - a **6502 assembly compiler** from http://www.cc65.org/ &#xD;&#xA;* ld65 - a **6502 linker** from http://www.cc65.org/ &#xD;&#xA;* smbdis.asm - a comprehensive Super Mario Bros. disassembly &#xD;&#xA;* smb.chr - Super Mario Bros. graphics (character ROM data) &#xD;&#xA;* smb.hdr - Super Mario Bros. ROM header (iNES header) &#xD;&#xA;* MAKESMB.BAT - a batch file I made that automates the compilation process. &#xD;&#xA;* 6502jsm.doc - a summary of 6502 instructions." />
  <row Id="12244" PostHistoryTypeId="2" PostId="6150" RevisionGUID="bdd95545-1af9-4fcc-bbed-2f6c4f6dfb47" CreationDate="2010-12-02T17:20:00.833" UserId="458" Text="Why not treat them separately?&#xD;&#xA;&#xD;&#xA;You have a 2D game; use the right engine/tools to make that game the best it can be.&#xD;&#xA;&#xD;&#xA;You want to mess around with a 3D engine to learn it; then mess around with it, make some simple 3D games or apps, but keep that separate from the other game you're working on." />
  <row Id="12245" PostHistoryTypeId="6" PostId="5402" RevisionGUID="b8aa9675-6cb6-4a5c-9358-569e13e06c92" CreationDate="2010-12-02T17:20:57.060" UserId="51" Comment="edited tags" Text="&lt;mmo&gt;&lt;multiplayer&gt;&lt;video&gt;&lt;game-recording&gt;&lt;patching&gt;" />
  <row Id="12246" PostHistoryTypeId="2" PostId="6151" RevisionGUID="930497a8-c9ca-47c9-b7fa-c5051e9b4c8a" CreationDate="2010-12-02T19:25:06.097" UserId="316" Text="Just my $0.02, but you should always start with the fundamentals - FUN.  Raph Koster's &quot;A Theory of Fun&quot; is a great read.  Here's a review:&#xD;&#xA;http://www.runawaycreations.com/home/2010/11/21/book-review-a-theory-of-fun-for-game-design.html" />
  <row Id="12247" PostHistoryTypeId="10" PostId="6146" RevisionGUID="c45701f3-59eb-4cd6-b5d6-57dbabea1148" CreationDate="2010-12-02T19:28:17.387" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12248" PostHistoryTypeId="5" PostId="6146" RevisionGUID="ec24ff14-2fc8-4b44-ae2a-1ded470d1777" CreationDate="2010-12-02T19:28:17.557" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How do you design a record/replay system for a frequently changing game?](http://gamedev.stackexchange.com/questions/5402/how-do-you-design-a-record-replay-system-for-a-frequently-changing-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I understand that in order for a game to have a replay system it must:&#xD;&#xA;&#xD;&#xA; - Have a deterministic engine&lt;br&gt;  &#xD;&#xA; - Record initial state&lt;br&gt;  &#xD;&#xA; - Record player inputs&lt;br&gt;&#xD;&#xA;&#xD;&#xA;The problem is, what if the game is being patched every few weeks, and these patches change significant parts of the game that can not really be abstracted into an attribute/state? Like, what if something (minor) is completely redesigned? Then you can no longer just play back older player inputs which took place when there were different mechanics on the current engine because it will lead to entirely different results. &#xD;&#xA;&#xD;&#xA;Example: Let's say there is a bug in StarCraft that makes marines not take any damage if the damage they receive is greater than their maximum health. Later this is patched, but any replay from the time of the bug would be junk on the patched system. People would be trying to move marines that are dead in the eyes of the game, etc.&#xD;&#xA;&#xD;&#xA;Is this reasonably solvable, given there will always be frequency patches that will make structural gameplay changes/fixes? &#xD;&#xA;" />
  <row Id="12249" PostHistoryTypeId="18" PostId="6146" RevisionGUID="1b810564-81d5-41b4-b7bd-364a3156e5e9" CreationDate="2010-12-02T19:28:47.697" UserId="51" Comment="to http://gamedev.stackexchange.com/questions/5402/how-do-you-design-a-record-replay-system-for-a-frequently-changing-game" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12250" PostHistoryTypeId="18" PostId="6147" RevisionGUID="1b810564-81d5-41b4-b7bd-364a3156e5e9" CreationDate="2010-12-02T19:28:47.697" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/6146/how-do-you-design-a-replay-system-for-a-frequently-patched-game" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12251" PostHistoryTypeId="18" PostId="5402" RevisionGUID="1b810564-81d5-41b4-b7bd-364a3156e5e9" CreationDate="2010-12-02T19:28:47.697" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/6146/how-do-you-design-a-replay-system-for-a-frequently-patched-game" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12252" PostHistoryTypeId="14" PostId="6146" RevisionGUID="9876ba9c-1543-4351-9cd7-494242c3311c" CreationDate="2010-12-02T19:28:48.010" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12253" PostHistoryTypeId="2" PostId="6152" RevisionGUID="3bd7cb45-22e1-4b03-a1a4-780ee5e14418" CreationDate="2010-12-02T19:38:25.317" UserId="3214" Text="Is there a way to get the Panda3D's manual and tutorials available for offline viewing? I'm going on a business trip and I will spend a good deal of time at the airports and on long flights. I'd love to get started on Panda3D while in flight. Is there a way to get all that information available for offline, or use some program to download the tutorials and manual webpages?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="12254" PostHistoryTypeId="1" PostId="6152" RevisionGUID="3bd7cb45-22e1-4b03-a1a4-780ee5e14418" CreationDate="2010-12-02T19:38:25.317" UserId="3214" Text="Panda3D documentation, manual, and tutorials for offline viewing?" />
  <row Id="12255" PostHistoryTypeId="3" PostId="6152" RevisionGUID="3bd7cb45-22e1-4b03-a1a4-780ee5e14418" CreationDate="2010-12-02T19:38:25.317" UserId="3214" Text="&lt;python&gt;&lt;manuals&gt;" />
  <row Id="12256" PostHistoryTypeId="2" PostId="6153" RevisionGUID="9e174357-d95f-438b-9138-c9f3074cf049" CreationDate="2010-12-02T19:46:57.327" UserId="2776" Text="Do you know games who already uses HTML5 Canvas in production? Please give their links;)&#xD;&#xA;&#xD;&#xA;Thank you!!!" />
  <row Id="12257" PostHistoryTypeId="1" PostId="6153" RevisionGUID="9e174357-d95f-438b-9138-c9f3074cf049" CreationDate="2010-12-02T19:46:57.327" UserId="2776" Text="HTML5 Canvas production ready?" />
  <row Id="12258" PostHistoryTypeId="3" PostId="6153" RevisionGUID="9e174357-d95f-438b-9138-c9f3074cf049" CreationDate="2010-12-02T19:46:57.327" UserId="2776" Text="&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="12259" PostHistoryTypeId="10" PostId="6153" RevisionGUID="bc8d9bd9-6c70-4c87-8745-42793fcc3205" CreationDate="2010-12-02T19:50:52.023" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12260" PostHistoryTypeId="5" PostId="6153" RevisionGUID="ca945d4f-8c24-4ca9-8a51-b81d74522e78" CreationDate="2010-12-02T19:50:52.147" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Examples of good Javascript/HTML5 based games](http://gamedev.stackexchange.com/questions/372/examples-of-good-javascript-html5-based-games)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hello everyone!!!&#xD;&#xA;&#xD;&#xA;Do you know games who already uses HTML5 Canvas in production? Please give their links;)&#xD;&#xA;&#xD;&#xA;Thank you!!!" />
  <row Id="12261" PostHistoryTypeId="2" PostId="6154" RevisionGUID="48578e3d-8ea0-4230-879d-a0175f5a52cc" CreationDate="2010-12-02T20:02:59.907" UserId="2091" Text="If you go to the Downloads section, under Snapshot Builds, you can find the documentation bundled as a zipfile or as chm, ready for downloading:&#xD;&#xA;&#xD;&#xA; - [Snapshot Builds page][1]&#xD;&#xA; - [Python Doc][2]&#xD;&#xA; - [Cxx Doc][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.panda3d.org/buildbot/&#xD;&#xA;  [2]: http://www.panda3d.org/buildbot/builds/manual-2010.11.29-64-python.zip&#xD;&#xA;  [3]: http://www.panda3d.org/buildbot/builds/manual-2010.11.29-64-cxx.zip" />
  <row Id="12262" PostHistoryTypeId="5" PostId="6089" RevisionGUID="5312cca5-9c92-4269-a8ca-a6301fede261" CreationDate="2010-12-02T21:00:30.560" UserId="160" Comment="added 197 characters in body" Text="For a roguelike I was working on, I implemented a pretty flexible data-driven system for generating drops. I've documented it [here](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Data/Data/Drops/about.txt). It's essentially a little DSL for selecting a number of randomly chosen items.&#xD;&#xA;&#xD;&#xA;A simple drop looks like:&#xD;&#xA;&#xD;&#xA;    1-10 copper coin&#xD;&#xA;&#xD;&#xA;It just says to drop a random number of copper coins between 1 and 10. Things get more flexible when you add branches:&#xD;&#xA;&#xD;&#xA;    one of&#xD;&#xA;        turquoise stone (50%)&#xD;&#xA;        onyx stone (25%)&#xD;&#xA;        malachite stone (15%)&#xD;&#xA;        jade stone (10%)&#xD;&#xA;&#xD;&#xA;A &quot;one of&quot; selects one of its child branches based on the given probabilities and then evaluates that. Drops can drop more than one item:&#xD;&#xA;&#xD;&#xA;    any of&#xD;&#xA;        turquoise stone (50%)&#xD;&#xA;        onyx stone (25%)&#xD;&#xA;        malachite stone (15%)&#xD;&#xA;        jade stone (10%)&#xD;&#xA;&#xD;&#xA;This will evaluate *all* subbranches and drop them if a roll against their probability passes. There are also some other branches for selecting an item based on dungeon and player level.&#xD;&#xA;&#xD;&#xA;Because these can get complex, it also allows you to define named macros, essentially functions that expand a branch expression and can be reused in multiple drops. That way if, for example, all dwarves drop the same kind of loot, you can make a single macro for that and use it across all of those monster types instead of copying and pasting huge drop tables.&#xD;&#xA;&#xD;&#xA;An example of [one monster](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Data/Data/Monsters/D%20-%20Ancient%20Dragon.txt)'s drop:&#xD;&#xA;&#xD;&#xA;    :: ancient dragon&#xD;&#xA;        glyph   = D&#xD;&#xA;        groups  = dragon&#xD;&#xA;        drops&#xD;&#xA;            (coins)&#xD;&#xA;            2-3(1:8) one of&#xD;&#xA;                (any-weapon)&#xD;&#xA;                (any-armor)&#xD;&#xA;&#xD;&#xA;Here, `(coins)`, `(any-weapon)`, and `(any-armor)` are all macro calls:&#xD;&#xA;&#xD;&#xA;    (any-armor)&#xD;&#xA;        one of&#xD;&#xA;            (shield)&#xD;&#xA;            (helm)&#xD;&#xA;            (boots)&#xD;&#xA;            (gloves)&#xD;&#xA;            (cloak)&#xD;&#xA;            (robe)&#xD;&#xA;            (soft-armor)&#xD;&#xA;            (hard-armor)&#xD;&#xA;&#xD;&#xA;which in turn calls things like:&#xD;&#xA;&#xD;&#xA;    (cloak)&#xD;&#xA;        one near level&#xD;&#xA;            cloak (10)&#xD;&#xA;            velvet cloak (20)&#xD;&#xA;            fur-lined cloak (50)&#xD;&#xA;&#xD;&#xA;You can nest drop expressions arbitrarily deeply like a real programming language. This gives you the composability that a simple table-based approach won't give.&#xD;&#xA;&#xD;&#xA;Like all data-driven systems, you can overwhelm yourself by building impenetrably complex drops, but it meets my goals:&#xD;&#xA;&#xD;&#xA;1. Be able to specify what things are dropped completely outside of code.&#xD;&#xA;2. Simple to implement the core system in code.&#xD;&#xA;3. Be able to tune what specific monsters drop so that the player can do goal-oriented exploration. (&quot;I need a necklace. I'll look for dwarves since they tend to drop them.&quot;)&#xD;&#xA;&#xD;&#xA;The C# code that implements this is [here](http://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Things/Items/Drops/)." />
  <row Id="12263" PostHistoryTypeId="2" PostId="6155" RevisionGUID="a730803a-ebc3-42a7-881e-5bc2c7612776" CreationDate="2010-12-02T22:06:20.270" UserId="3725" Text="While a couple of the chapters are grossly outdated (the book was written in 1982), The Art of Computer Game Design has some great ideas and principles.&#xD;&#xA;&#xD;&#xA;http://library.vancouver.wsu.edu/art-computer-game-design" />
  <row Id="12264" PostHistoryTypeId="5" PostId="6072" RevisionGUID="189a5b00-9fe2-42cd-87a4-d4c07276c0de" CreationDate="2010-12-02T22:36:16.903" UserId="1868" Comment="updated url" Text="My simple canvas [game][1] seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen some JS Canvas examples using it.&#xD;&#xA;&#xD;&#xA;When is the use of the double buffering recommended? &#xD;&#xA;Does it make difference only for specific browsers? &#xD;&#xA;Is there a significant performance hit?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.momentumracer.com" />
  <row Id="12265" PostHistoryTypeId="2" PostId="6156" RevisionGUID="d624a015-d0de-4ac0-88e2-4d472a496cd5" CreationDate="2010-12-03T02:05:40.253" UserId="3705" Text="Which MMO's have you created or read about, which have both seen the light of post-beta play (or forever-beta play) AND have had surprisingly small development teams?  And what about surprisingly short development times?  The first question is more interesting to me than the second, but I'm keen on examples of either.&#xD;&#xA;&#xD;&#xA;Examples can come from all avenues of gaming, no genre or platform is preferred." />
  <row Id="12266" PostHistoryTypeId="1" PostId="6156" RevisionGUID="d624a015-d0de-4ac0-88e2-4d472a496cd5" CreationDate="2010-12-03T02:05:40.253" UserId="3705" Text="MMO Minimal Dev Team" />
  <row Id="12267" PostHistoryTypeId="3" PostId="6156" RevisionGUID="d624a015-d0de-4ac0-88e2-4d472a496cd5" CreationDate="2010-12-03T02:05:40.253" UserId="3705" Text="&lt;mmo&gt;&lt;hobby-development&gt;&lt;development-speed&gt;" />
  <row Id="12268" PostHistoryTypeId="2" PostId="6157" RevisionGUID="90799711-9861-4225-8810-e8564ec646bd" CreationDate="2010-12-03T04:12:16.570" UserId="2524" Text="I'm new in cocos2d and game dev. I'm still learning in game dev. My goal is to make one game like [Doodle Grub][1]. But problem is snake body. I wrote like following&#xD;&#xA;&#xD;&#xA;    -(void)update:(ccTime)delta&#xD;&#xA;    {&#xD;&#xA;    	//NSLog(@&quot;%f&quot;,[GameScence sharedGameScence].playerVelocity.y);&#xD;&#xA;    &#xD;&#xA;    	CGPoint tmp=self.position;&#xD;&#xA;    	float tmprotation;&#xD;&#xA;    	self.position=[GameScence sharedGameScence].WormHeadPos;&#xD;&#xA;    &#xD;&#xA;    	[GameScence sharedGameScence].WormHeadPos=tmp;&#xD;&#xA;    	tmprotation=self.rotation;&#xD;&#xA;    &#xD;&#xA;    	[self setRotation:[GameScence sharedGameScence].Headrotation];&#xD;&#xA;    &#xD;&#xA;    	[GameScence sharedGameScence].Headrotation=tmprotation;&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;snake is moving but problem is all of the body segments are same position when snake stop. And all of the body segments is so close and can't see segments like Doodle Grub. Any idea or Any suggestion ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://itunes.apple.com/us/app/doodle-grub/id375749524?mt=8" />
  <row Id="12269" PostHistoryTypeId="1" PostId="6157" RevisionGUID="90799711-9861-4225-8810-e8564ec646bd" CreationDate="2010-12-03T04:12:16.570" UserId="2524" Text="How to make Snake Game ?" />
  <row Id="12270" PostHistoryTypeId="3" PostId="6157" RevisionGUID="90799711-9861-4225-8810-e8564ec646bd" CreationDate="2010-12-03T04:12:16.570" UserId="2524" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="12271" PostHistoryTypeId="4" PostId="6157" RevisionGUID="0b149adf-4125-4fcd-9ad5-b9c24435be98" CreationDate="2010-12-03T04:17:42.587" UserId="2524" Comment="edited title" Text="How to make Snake Body in Snake Game ?" />
  <row Id="12272" PostHistoryTypeId="2" PostId="6158" RevisionGUID="046bd732-48bf-47ca-82ca-53aec50d114f" CreationDate="2010-12-03T04:36:10.523" UserId="395" Text="Star Trek Online was a core team of ~40-50 for two years. Kingdom of Loathing has had a dev team of about 5. Urban Dead is a one-man-show I think. How low do you want to go? STO is a AAA 3D game, so two years is almost unheard of. KoL and UD are both web-based, so I'm not sure what would be considered &quot;surprising&quot; other than hearing a game was developed by a sentient AI or somesuch. How about Minecraft, thats ~1-3 people and has now made millions (but is still technically alpha)?" />
  <row Id="12273" PostHistoryTypeId="2" PostId="6159" RevisionGUID="9e483baf-4b69-471f-a1cc-d32aaa43a422" CreationDate="2010-12-03T06:06:25.077" UserId="1251" Text="The Snake game is one of the most simplest yet addicting games built ever.&#xD;&#xA;I'll show you its implementation idea without code.&#xD;&#xA;&#xD;&#xA;Consider an array containing n elements as in snake[n], where snake[0] is the head of the snake. Each element in the array snake i.e. for every snake[i] there should exist some mechanism to store its x and y coordinates.(I preferred arrays).We also need two variables which holds the x and y coordinates of the snake[0].&#xD;&#xA;When the game loop begins, according to the desired direction, the snake[0] is moved accordingly.So since the snake[0] has moved to a different location what we have to do is &#xD;&#xA;1.) assign into snake[1] the previous value(which we stored temporarily) of snake[0].&#xD;&#xA;2.) Iterate within a loop and change the values of snake[i] to snake[i-1] till snake[i] becomes equal to snake[n].&#xD;&#xA;Feel free to ask me if you have more doubts. But I would recommend you first try these before asking someone a question.&#xD;&#xA;&#xD;&#xA; 1. Google&#xD;&#xA; 1. Read articles&#xD;&#xA; 2. Try try try doing as in trial and&#xD;&#xA;    error&#xD;&#xA; 3. Read forums&#xD;&#xA;&#xD;&#xA;That is all, **Best wishes**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12274" PostHistoryTypeId="2" PostId="6160" RevisionGUID="d1e92763-e110-4242-b09d-53e2cd8833a9" CreationDate="2010-12-03T07:46:24.967" UserId="450" Text="I have not played this myself, and I don't know if there is a restriction on number of players which might be too low for &quot;massive multiplayer&quot;.&#xD;&#xA;&#xD;&#xA;&gt; Minecraft was developed for about a week before its public release on May 17, 2009 on the TIGSource forums, where it gained a considerable level of popularity. It has been continually updated and patched since then&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Minecraft&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12275" PostHistoryTypeId="2" PostId="6161" RevisionGUID="3b42cfd4-23b5-4b87-bbac-5ed9fb7a86d9" CreationDate="2010-12-03T07:58:33.720" UserId="3737" Text="Almost all NES games were hand-written in 6502 assembly, the same as used in the Commodore 64, the Apple ][e, etc. The very few which were written in C had a reputation for being terribly slow because the NES is only 2Mhz and has 2Kb of onboard RAM (with an 8Kb window for the cartridge to patch more in). Careful assembly designed to take full advantage of the NES's peculiar architecture was much more effective.&#xD;&#xA;&#xD;&#xA;Stop and think about that... games like Super Mario Bros 3 and Kirby's Adventure ran on 2Mhz. Compare how rich they are to today's games which swallow gigahertz and hundreds of megabytes of RAM..." />
  <row Id="12276" PostHistoryTypeId="5" PostId="6160" RevisionGUID="048f60ee-ec73-4707-aff7-48f845166e00" CreationDate="2010-12-03T08:08:25.133" UserId="450" Comment="added 1077 characters in body" Text="Minecraft&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;I have not played [this][1] myself, and I don't know if there is a restriction on number of players which might be too low for &quot;massive multiplayer&quot;.&#xD;&#xA;&#xD;&#xA;&gt; Minecraft was developed for about a week before its public release on May 17, 2009 on the TIGSource forums, where it gained a considerable level of popularity. It has been continually updated and patched since then&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Minecraft&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Stendhal&#xD;&#xA;-&#xD;&#xA;[Stendhal][2] is a 2D RPG which has been developed by about 5 people in their spare time. (I am one of them). The first version was released after 3 month spare time by one developer. But it was rather basic back then and more a prove of concept than a playable game. After about 6 month to one year it was fully playable and quite fun. Nowadays it is under heavy development and patches are released regularly.&#xD;&#xA;&#xD;&#xA;You can have a look at our [release history][3]  (click &quot;Read all the news items&quot; at the bottom). It nicely shows how the game was improved from patch to patch since 2005. 5 years may seem like a really huge amount of time, but you have to keep two things in mind: First it is a spare time project. Second it was fun to play after about a year. We spent the last 4 years of adding to an existing game by releasing patches.&#xD;&#xA;&#xD;&#xA;Ohloh has some nice statistics about commits: http://www.ohloh.net/p/stendhal/contributors &#xD;&#xA;&#xD;&#xA;  [1]: http://www.minecraft.net/&#xD;&#xA;  [2]: http://stendhalgame.org/&#xD;&#xA;  [3]: http://arianne.sourceforge.net/" />
  <row Id="12277" PostHistoryTypeId="2" PostId="6162" RevisionGUID="0d519cbe-6ba4-439c-9fd3-51ac32dcc9ca" CreationDate="2010-12-03T10:27:19.287" UserDisplayName="user3743" Text="Gods and Idols was developed by one person (Full disclosure: me) and has been in open beta since early 2008. http://www.GodsAndIdols.com" />
  <row Id="12284" PostHistoryTypeId="2" PostId="6166" RevisionGUID="4c9c9225-3b26-4580-9b53-c2c19a2dda1a" CreationDate="2010-12-03T12:29:01.530" UserId="3505" Text="Perhaps your best bet is to stop considering it a terrain in the usual sense, and rather just treat the ground as any other 3D model. Depending on the style of game you are making you may want to slice it into reasonably sized chunks so that you can load and unload parts dynamically and/or switch between high and low detail versions depending on camera proximity." />
  <row Id="12286" PostHistoryTypeId="2" PostId="6167" RevisionGUID="de9f33c1-0b45-4e23-b959-f0e196a69728" CreationDate="2010-12-03T15:01:00.653" UserId="165" Text="You might have already seen my answer to [Why are MMOs hard?][1], but it has a list of several games that were developed by 1-2 people. The major disagreement some people had with them, is whether some of them *qualify* as MMOs. However, at least *one* of them has over a thousand players (A Tale in the Desert), which certainly qualifies as &quot;massive&quot;. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/90/why-is-so-hard-to-develop-a-mmo/630#630" />
  <row Id="12287" PostHistoryTypeId="2" PostId="6168" RevisionGUID="cd1f9cd7-cb07-4364-8d7c-aeb885537a2a" CreationDate="2010-12-03T15:05:01.037" UserId="3449" Text="Are you talking about something like this?&#xD;&#xA;&#xD;&#xA;http://www.panda3d.org/forums/viewtopic.php?t=2340" />
  <row Id="12288" PostHistoryTypeId="2" PostId="6169" RevisionGUID="5d34fe6d-8220-4c76-8fff-0863f6fda7b4" CreationDate="2010-12-03T16:13:47.640" UserId="2472" Text="I agree with some of the comments that it's unclear what would be considered surprising. There's a huge range of sizes of games that can be considered to be “MMOs”.&#xD;&#xA;&#xD;&#xA;[Realm of the Mad God][1] was developed by 2 people in 30 days for the [TIGSource Assemblee competition][2]. The game was playable &amp; fun, had lots of users, had an active forum, and had an active user-built wiki soon after the end of the 30 day period. They've continued working on it for the past year (new dungeons, monsters, items, classes, gameplay, etc.) and have had occasional help from others with art, music, sound, design. They don't usually release metrics but at one point they mentioned [1200 concurrent players][3] and 37,000 players in one day. It's not “out of beta” yet but I think the core team will remain 2 people. (Full disclosure: I'm one of the “occasional help” set of people; they're using [my maps][4].)&#xD;&#xA;&#xD;&#xA;  [1]: http://realmofthemadgod.com/&#xD;&#xA;  [2]: http://forums.tigsource.com/index.php?topic=9600.0&#xD;&#xA;  [3]: http://forums.wildshadow.com/node/1172&#xD;&#xA;  [4]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/" />
  <row Id="12289" PostHistoryTypeId="2" PostId="6170" RevisionGUID="ce939425-f9ab-42c1-8b61-ef7f36aeb3b4" CreationDate="2010-12-03T16:36:17.497" UserId="2290" Text="The minimal number of people required to make an MMO is one, as demonstrated by [LOVE][1], a released MMO developed entirely by Eskil Steenberg. To see LOVE in action, check out this [youtube video][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.quelsolaar.com/love/index.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=Y-A8xvFKaRA" />
  <row Id="12290" PostHistoryTypeId="5" PostId="6156" RevisionGUID="c01e1c87-dac3-43aa-beab-844f720d5617" CreationDate="2010-12-03T16:40:18.497" UserId="3705" Comment="added 476 characters in body" Text="Which MMO's have you created or read about, which have both seen the light of post-beta play (or forever-beta play) AND have had surprisingly small development teams?  And what about surprisingly short development times?  The first question is more interesting to me than the second, but I'm keen on examples of either.&#xD;&#xA;&#xD;&#xA;Examples can come from all avenues of gaming, no genre or platform is preferred.&#xD;&#xA;&#xD;&#xA;**Addendum**&#xD;&#xA;&#xD;&#xA;Because, while disliked, everybody seems to want to answer, I will reiterate.&#xD;&#xA;&#xD;&#xA;Have you worked on any games with small dev teams?  If so, what are they - I'd like to see what you two to five developers accomplished. Have you read about any surprisingly small teams?  Surprising would mean that you were surprised, if you were not surprised then you were not surprised.  Tautologies should not be necessary to explain the semantics of an English sentence." />
  <row Id="12291" PostHistoryTypeId="5" PostId="6156" RevisionGUID="36e04dad-89ec-47bf-94d7-524cd4af6d43" CreationDate="2010-12-03T16:46:37.990" UserId="3705" Comment="reiterated to be a prick.; added 185 characters in body" Text="Which MMO's have you created or read about, which have both seen the light of post-beta play (or forever-beta play) AND have had surprisingly small development teams?  And what about surprisingly short development times?  The first question is more interesting to me than the second, but I'm keen on examples of either.&#xD;&#xA;&#xD;&#xA;Examples can come from all avenues of gaming, no genre or platform is preferred.&#xD;&#xA;&#xD;&#xA;**Addendum**&#xD;&#xA;&#xD;&#xA;Because, while disliked, everybody seems to want to answer, I will reiterate.&#xD;&#xA;&#xD;&#xA;Have you worked on any MMO games with small dev teams?  If so, what are they - I'd like to see what you two to five developers accomplished. Have you read about any surprisingly small teams?  Surprising would mean that you were surprised, if you were not surprised then you were not surprised.  Tautologies should not be necessary to explain the semantics of an English sentence.&#xD;&#xA;&#xD;&#xA;I am not asking &quot;LoLz I gots a game ideaz, but I iz lazy - can I codez it in one month?&quot;.  I am asking &quot;Which games, out of all the thousands of MMOs, were made with small teams?&quot;&#xD;&#xA;" />
  <row Id="12292" PostHistoryTypeId="2" PostId="6171" RevisionGUID="d5ff7a14-608e-437a-9f0a-a21a076a3bed" CreationDate="2010-12-03T17:35:49.270" UserId="1743" Text="Is anybody aware of any stable-ish (ie out of alpha) isometric drawing engines for JavaScript/HTML5?  I have done some Google searches and found a few, but they were mostly in alpha/invite-only status.&#xD;&#xA;&#xD;&#xA;Is there anything mature enough to be used in a production environment?  Or should I simply roll my own implementation for now and wait for the rest of the world to catch up?" />
  <row Id="12293" PostHistoryTypeId="1" PostId="6171" RevisionGUID="d5ff7a14-608e-437a-9f0a-a21a076a3bed" CreationDate="2010-12-03T17:35:49.270" UserId="1743" Text="Isometric game engine in JavaScript/HTML5" />
  <row Id="12294" PostHistoryTypeId="3" PostId="6171" RevisionGUID="d5ff7a14-608e-437a-9f0a-a21a076a3bed" CreationDate="2010-12-03T17:35:49.270" UserId="1743" Text="&lt;engine&gt;&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="12295" PostHistoryTypeId="2" PostId="6172" RevisionGUID="5c14ebb9-54bb-4498-971e-b8063b9fa57c" CreationDate="2010-12-03T19:05:25.420" UserId="3767" Text="Originally asked on [StackOverflow][1], but it became tumbleweed.&#xD;&#xA;&#xD;&#xA;I'm looking to create a glowing line effect in BlitzMax, something like a Star Wars lightsaber or laserbeam. Doesn't have to be realtime, but just to TImage objects and then maybe saved to PNG for later use in animation. I'm happy to use 3D features, but it will be for use in a 2D game.&#xD;&#xA;&#xD;&#xA;Since it will be on black/space background, my strategy is to draw a series of white blurred lines with color and high transparency, then eventually central lines less blurred and more white. What I want to draw is actually bezier curved lines. Drawing curved lines is easy enough, but I can't use the technique above to create a good laser/neon effect because it comes out looking very segmented. So, I think it may be better to use a blur effect/shader on what does render well, which is a 1-pixel bezier curve.&#xD;&#xA;&#xD;&#xA;The problems I've been having are:&#xD;&#xA;&#xD;&#xA; * Applying a shader to just a certain area of the screen where lines are drawn. If there's a way to do draw lines to a texture and then blur that texture and save the png, that would be great to hear about. There's got to be a way to do this, but I just haven't gotten the right elements working together yet. Any help from someone familiar with this stuff would be greatly appreciated.&#xD;&#xA; * Using just 2D calls could be advantageous, simpler to understand and re-use.&#xD;&#xA; * It would be very nice to know how to save a PNG that preserves the transparency/alpha stuff.&#xD;&#xA;&#xD;&#xA;p.s. I've reviewed [this post][2] (and many many others on the Blitz site), have samples working, and even developed my own 5x5 frag shaders. But, it's 3D and a scene-wide thing that doesn't seem to convert to 2D or just a certain area very well. I'd rather understand how to apply shading to a 2D scene, especially using the specifics of BlitzMax.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4219980/blitzmax-generating-2d-neon-glowing-line-effect-to-png-file&#xD;&#xA;  [2]: http://www.blitzbasic.com/Community/posts.php?topic=85263" />
  <row Id="12296" PostHistoryTypeId="1" PostId="6172" RevisionGUID="5c14ebb9-54bb-4498-971e-b8063b9fa57c" CreationDate="2010-12-03T19:05:25.420" UserId="3767" Text="BlitzMax - generating 2D neon glowing line effect to png file" />
  <row Id="12297" PostHistoryTypeId="3" PostId="6172" RevisionGUID="5c14ebb9-54bb-4498-971e-b8063b9fa57c" CreationDate="2010-12-03T19:05:25.420" UserId="3767" Text="&lt;opengl&gt;&lt;programming&gt;" />
  <row Id="12298" PostHistoryTypeId="2" PostId="6173" RevisionGUID="d0e149e5-45da-483c-bcf3-0b8fc97ef444" CreationDate="2010-12-03T19:22:18.720" UserId="962" Text="Do you need to generate them? It seems like you want to generate them and store them in image files for use in the game.&#xD;&#xA;&#xD;&#xA;**I think it might be easier, faster, and better looking if you created the lasers in some kind of image editing software such as Photoshop, GIMP, or your favorite editor.**&#xD;&#xA;Export the graphics as PNG and use it in your game.&#xD;&#xA;&#xD;&#xA;It will have better performance than some kind of live shader effect and it will be easier to tweak." />
  <row Id="12299" PostHistoryTypeId="2" PostId="6174" RevisionGUID="242ff615-ee6c-477c-9a77-cb1caf9af9ed" CreationDate="2010-12-03T19:30:59.340" UserId="962" Text="As you said, the only ones I have found are either betas or alphas with none seeming to be ready for release.&#xD;&#xA;&#xD;&#xA;**At this point in time it is probably better to roll your own:**&#xD;&#xA;&#xD;&#xA;* Better understanding of the internals.&#xD;&#xA;&#xD;&#xA;* Able to tweak the engine to your needs.&#xD;&#xA;&#xD;&#xA;* Develop the features you need to use&#xD;&#xA;&#xD;&#xA;* Skip features of other engines you don't need, reducing code bloat, and overhead.&#xD;&#xA;&#xD;&#xA;* Bugs and issues will be your own problem, and easier and faster to fix than an unfinished engine." />
  <row Id="12300" PostHistoryTypeId="2" PostId="6175" RevisionGUID="533a1e22-ee8f-4320-8d7f-492713f64c03" CreationDate="2010-12-03T19:35:45.000" UserId="3767" Text="There is a 2D implementation of snake logic for one of the &quot;enemy&quot; entities in [Grid Wars][1], a clone of the great hit Geometry Wars. Source code isn't the greatest readability (imho), but nice that it's available at that link, the game is written in BlitzMax. If you read through it, you'll want to look at the &quot;Type nme6&quot; in the main &quot;gridwars.bmx&quot; file.&#xD;&#xA;&#xD;&#xA;That snake moves randomly, but it will help you see how you iteratively position each segment and move segments to the position of the segment in front of it, using a linked list. The head determines the direction of travel. Even just playing the game and using pause / step (P and O in F7 debug mode), and then watching it can help you see how the drawing mechanics is approached.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/gw4p/downloads/detail?name=GridWars.zip&amp;can=2&amp;q=" />
  <row Id="12301" PostHistoryTypeId="2" PostId="6176" RevisionGUID="6f848dad-3b10-4833-bbf1-228e1826fe95" CreationDate="2010-12-03T19:44:07.117" UserId="154" Text="There are lots of ways to do this without going down the complicated shader route.&#xD;&#xA;&#xD;&#xA;**Version 1 - Fixed size**&#xD;&#xA;&#xD;&#xA;If the glowing objects are always the same size, like a Star Wars style laser gun blast then just bake the glow into the texture. Use PNG for full 8-bit transparency and be done with it.&#xD;&#xA;&#xD;&#xA;**Version 2 - Variable size**&#xD;&#xA;&#xD;&#xA;If the objects change in length, more like Star Trek phasers then you can still do this with a pre-baked texture that just tiles along the length of the laser. You can either have it end harshly, or have a texture cap that you apply to a quad at each end of the variable length beam.&#xD;&#xA;&#xD;&#xA;**Version 3 - Faked lighting**&#xD;&#xA;&#xD;&#xA;If you want the glow to affect the environment then consider making two texture. One that is the  center of the beam that you draw normally so it always appears. The second texture is just the pre-baked glowing elements which you draw as additively transparent. This will make the glow appear to cast light on whatever is underneath it.&#xD;&#xA;&#xD;&#xA;It's a low tech effect and isn't correct lighting, but for something moving fast enough in 2D it looks close enough to correct to fool you if it isn't too large an area." />
  <row Id="12302" PostHistoryTypeId="6" PostId="6172" RevisionGUID="08ef313a-2b82-4b27-a757-3ee2be2c86ab" CreationDate="2010-12-03T19:52:17.457" UserId="962" Comment="edited tags" Text="&lt;opengl&gt;&lt;shaders&gt;" />
  <row Id="12303" PostHistoryTypeId="6" PostId="6171" RevisionGUID="96afab15-2fab-4653-8d6c-96f8cfed0529" CreationDate="2010-12-03T20:32:56.517" UserId="1743" Comment="edited tags" Text="&lt;engine&gt;&lt;javascript&gt;&lt;html5&gt;&lt;isometric&gt;" />
  <row Id="12304" PostHistoryTypeId="2" PostId="6177" RevisionGUID="8939f64c-1cf8-47b5-b892-5950db0a0905" CreationDate="2010-12-03T21:22:44.987" UserId="370" Text="You're going to perform a search.&#xD;&#xA;&#xD;&#xA;* Node/State: Pacman location, Ghost locations, Pellet locations, Total score, Total lives.&#xD;&#xA;* Transition: Pacman moves up, down, left, or right.  If Pacman moves into a wall and does change locations that is totally fine (it might lead to some really interesting stalling strategies).  If Pacman hits a ghost, remove a life and move him and ghosts to the origin.&#xD;&#xA;* Cost: If Pacman moves onto a pellet 1, if he moves onto an empty space 2.  &#xD;&#xA;The cost is a bit tricky, as it's non-obvious.  The cost function I described will encourage Pacman to finish the level.  This preclude a possible strategy and just camping out waiting for bonus fruit to appear.  But I think we want the AI Pacman to finish the maze even if it yields a lower score.&#xD;&#xA;* Goal: maximum score reached.  That means all the pellets, fruit, and power pellets are eaten.&#xD;&#xA;&#xD;&#xA;A* or UCS are great when seeking a goal.  The way I've described the State/Transition/Goal will find a great walk path for Pacman the AI doesn't need to specifically consider avoiding death or seeking fruit.  It will do that on it's own. Since the game is completely deterministic you could &quot;search&quot; from Pacman's starting location and find the optimal walk path to end (all pellets consumed) as a pre-computation and just have AI Pacman walk that path, no on the fly AI.  The major drawback this approach is this could easily get out of hand in the cpu time and memory consumption.&#xD;&#xA;&#xD;&#xA;Instead of dedicating the CPU and memory to performing a complete search you could perform partial search on the fly.&#xD;&#xA;&#xD;&#xA;You can still use UCS/A* but stop searching after inspecting `N` nodes have been inspected and just use the best path found so far.  This approach is nice in that you can tune `N` to find the balance between speed and precision.  &#xD;&#xA;&#xD;&#xA;Another method I'm particularly fond of is Monte-Carlo Tree search.  In this method you let Pacman perform a random walk of `N` moves.  After each random walk you record his initial move and final score.  Perform `M` random walks (or just keep doing them until you're out of time or what ever).  Pick the initial move with the best average of the random walks.&#xD;&#xA;&#xD;&#xA;These partial searches have a serious drawback.  If searching with UCS and Pacman doesn't score at all in the first `N` nodes inspected he'll get stuck and as all moves are equally bad.  &#xD;&#xA;A* wouldn't have this issue as long as the heuristic was careful to move Pacman closer to uneaten pellets.  &#xD;&#xA;MCTS might be able to avoid this issue if random walk is biased to move towards uneaten pellets and random walk never stops before scoring (ie the random walk keeps going if Pacman has 0 score.&#xD;&#xA;" />
  <row Id="12305" PostHistoryTypeId="2" PostId="6178" RevisionGUID="bf2f6cf2-2492-4976-8893-161c9e9cf5d9" CreationDate="2010-12-03T21:27:36.277" UserId="3597" Text="The Aves Engine was a really good engine (so it seemed), and then Zynga (Farmville people) bought it and made it closed source. There's a video of it being presented somewhere, before it was bought." />
  <row Id="12306" PostHistoryTypeId="2" PostId="6179" RevisionGUID="d2518045-ae29-468e-a57f-6a15b5b33697" CreationDate="2010-12-03T21:50:27.750" UserId="3770" Text="I've got a background that is almost entirely based around business applications - Web services, schedulers, desktop and web front-ends to CRM systems, etc...&#xD;&#xA;&#xD;&#xA;Now with almost all of the above projects, the basic principles are the same:&#xD;&#xA;&#xD;&#xA;Some sort of data access layer, business logic layer and a UI.&#xD;&#xA;&#xD;&#xA;Obviously some scenario require something a little unique but in general it's N-Tier all the way.&#xD;&#xA;&#xD;&#xA;I'd like to do some game development as a hobby. I'm not expecting anything impressive as I don't have the resources to dedicate to it, but something to challenge me a bit would be good.&#xD;&#xA;&#xD;&#xA;What lessons (if any) should I be taking from my current experience and what do I need to learn again?&#xD;&#xA;&#xD;&#xA;I'm assuming that as with all my experience, different types of games will have different architectures but are they all based around the same core principles? For the sake of argument, let's say I'm  building a simple [MUD][2] (maybe a top-down UI like the older Zelda games) - This seemed like something that I could have my 3-Tier logic for - A server with the BLL and DAL and a client UI - But I'm not quite sure if this is right - certainly using the Entity Framework doesn't seem appropriate as there's an awful lot of overhead in accessing lots of stuff in the Db and I'd imagine performance will be an issue - eg I'm assuming I wouldn't want to constantly use the Db to store player locations if they're changing 20+ times/second...&#xD;&#xA;&#xD;&#xA;Are there patterns and practices specifically for game scenarios?&#xD;&#xA;&#xD;&#xA;Is it feasible to develop the back-end system before creating a UI (eg plugging a console app in instead to allow me to develop the functionality I'd like before adding the UI). Is this good/bad practice?&#xD;&#xA;&#xD;&#xA;In short, I don't know where to start and would appreciate some advice - especially from those with experience.&#xD;&#xA;&#xD;&#xA;About the only thing that's set in stone is that I'd like a multi-user game with a central server. Game suggestions welcome.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*[This was originally asked on [SO][1] but it was suggested that this would be a better forum. Apologies if this breaks any rules but I don't know how to link across sites. If someone can advise me of the appropriate action, I'll take it. Many thanks]*&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4349936/game-architecture-for-someone-with-a-background-in-lob-apps&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/MUD" />
  <row Id="12307" PostHistoryTypeId="1" PostId="6179" RevisionGUID="d2518045-ae29-468e-a57f-6a15b5b33697" CreationDate="2010-12-03T21:50:27.750" UserId="3770" Text="Game architecture for someone with a background in LOB Apps" />
  <row Id="12308" PostHistoryTypeId="3" PostId="6179" RevisionGUID="d2518045-ae29-468e-a57f-6a15b5b33697" CreationDate="2010-12-03T21:50:27.750" UserId="3770" Text="&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="12309" PostHistoryTypeId="2" PostId="6180" RevisionGUID="60d0efcc-76e9-4f01-9486-8607f72e877a" CreationDate="2010-12-04T01:10:36.303" UserId="51" Text="I don't think there really is a way to answer your questions.  Personally I think it's too broad a topic to really talk about.&#xD;&#xA;&#xD;&#xA;&gt;What lessons (if any) should I be taking from my current experience and what do I need to learn again?&#xD;&#xA;&#xD;&#xA;Well if you can think like a programmer and have learned to problem solve then great.  Maybe you'll have an understanding of what makes a good end-user UI.  Database knowledge might be a good foundation for... something... The rest of it (other than probably the web communication layer) you can throw away.  Real time game programming is almost totally different than application programming.  Maybe there might be a little bit of convergence when you start throwing multiplayer and server communication in the mix, but it's a significantly harder problem than just a local-only game.&#xD;&#xA;&#xD;&#xA;&gt;Are there patterns and practices specifically for game scenarios?&#xD;&#xA;&#xD;&#xA;Yes.  But most of them are subjective.  &#xD;&#xA;&#xD;&#xA;There is a huge gamut of different patterns in making a game.  Some related to 3D graphics (and all its various subgenres like lighting, filtering, shaders, etc. etc. etc.).  Some for features like streaming in level content.  Lots of books on collision paradigms.  There's a battle for OO vs. data-driven design.  Components vs inheritance hierarchies.  People can't even agree on what is the best way to pump updates to entities in a world (fixed rate or passing in per frame deltas, for one part of the argument).  People have different opinions about whether or not generic programming is a good thing.  There's no way to really answer that question as stated (other than &quot;yes&quot;), it's too broad.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;I mean, if you have *specific* questions on how to do certain things, that is what this site is designed for.  For example, maybe you want to know about how to sync up client side movement with a server and have it not be choppy.  Maybe you want to ask if the client should be authoritative on movement or the server should be.  &#xD;&#xA;&#xD;&#xA;My advice to new people starting games is just to *do it*.  Nobody can help you make your decisions.  You can be spinning your wheels forever trying to do research on the &quot;best way&quot; to do things.  But that really isn't important.  What's important is building up experience on your own in order to get to the point where when you need to make a decision you can make an informed decision, and to keep an analytical mind open when you're working on things to see what problems and solutions crop up.  &#xD;&#xA;&#xD;&#xA;For your example, talking about pushing updates to a database.  Just do it.  Then profile it.  If it's slow, think about ways around it.  If it isn't fast enough, start thinking about ways to handle it.  If you need direction, then come to us for help." />
  <row Id="12315" PostHistoryTypeId="2" PostId="6182" RevisionGUID="5919f79a-82e9-49ac-939b-27e50824a4e9" CreationDate="2010-12-04T01:53:30.917" UserId="3505" Text="Let's get the easy stuff sorted first, making and saving an alpha mapped png using BlitzMax:&#xD;&#xA;&#xD;&#xA;    x=64&#xD;&#xA;    y=64&#xD;&#xA;    pxm:TPixmap = CreatePixmap(x,y,PF_BGRA8888)&#xD;&#xA;&#xD;&#xA;    For a=0 To x-1&#xD;&#xA;    For b=0 To y-1&#xD;&#xA;        WritePixel(pxm,a,b,$e0ffffff)&#xD;&#xA;    Next&#xD;&#xA;    Next&#xD;&#xA;    SavePixmapPNG(pxm,&quot;glass.png&quot;,9)&#xD;&#xA;&#xD;&#xA;But you might not need this at all since the best glow effect is achieved using additive transparency. wkerslake gave you the answer you need as his V3, he just did a really poor job at explaining that this is the exact lightsaber look. " />
  <row Id="12322" PostHistoryTypeId="5" PostId="6156" RevisionGUID="02d99cdb-3165-44df-9dc3-ce413573cbb8" CreationDate="2010-12-04T04:12:59.897" UserId="3705" Comment="altered the question to make my intentions clearer; added 18 characters in body" Text="I'd like to see a list of MMOs with small development teams in order to better understand where small teams have found a place for themselves. &#xD;&#xA;&#xD;&#xA;While examples of MMORPGs are of interest, so are games focusing on socializing, trade and commerce, city or empire building, crafting, exploration, strategy and so on.  Any shipping game supporting between, say 800 and 10,000 simultaneous players belongs on this list.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="12323" PostHistoryTypeId="4" PostId="6156" RevisionGUID="02d99cdb-3165-44df-9dc3-ce413573cbb8" CreationDate="2010-12-04T04:12:59.897" UserId="3705" Comment="altered the question to make my intentions clearer; added 18 characters in body" Text="Examples of MMO's with  small dev teams" />
  <row Id="12324" PostHistoryTypeId="16" PostId="6158" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12325" PostHistoryTypeId="16" PostId="6160" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12326" PostHistoryTypeId="16" PostId="6162" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12327" PostHistoryTypeId="16" PostId="6167" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12328" PostHistoryTypeId="16" PostId="6169" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12329" PostHistoryTypeId="16" PostId="6170" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12330" PostHistoryTypeId="16" PostId="6156" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T05:28:53.530" UserId="51" />
  <row Id="12331" PostHistoryTypeId="2" PostId="6185" RevisionGUID="2c989089-4262-4c57-b888-9135b7c0bb4f" CreationDate="2010-12-04T05:58:09.183" UserId="3115" Text="You dont tell us what languages you are used to from your work with websites/CMS/CRM etc. but as being one of these &quot;business people&quot; myself, I also do gameprogramming in my sparetime.&#xD;&#xA;&#xD;&#xA;I've found that Unity3D is a great game-engine, if you know how to write Javscript or C#.&#xD;&#xA;&#xD;&#xA;Have a look at www.unity3D.com for more info. There is a &quot;almost full&quot; edition for free, which you MAY use for publishing games. And you are allowed to charge money for your games, eventhough you use the free edition, as long as your total income in the company using it isnt earning above $100.000 a year.&#xD;&#xA;&#xD;&#xA;Ofcause you might need to team up with some others for 3D objects, sounds, music, leveldesigns, but for a start this is great stuff.&#xD;&#xA;&#xD;&#xA;Check out my latest &quot;test&quot; http://3d.d9.dk/pills/?crm &#xD;&#xA;&#xD;&#xA;Its a PacMan kinda clone, as I've been educating many people for years on how to make PacMan games, but never actually done one myself as I found it too &quot;simple&quot;. Well, dont tell it - show it! :o)&#xD;&#xA;&#xD;&#xA;So my answer is: if you want to develop gams for crossplatform (PC/MAC) and perhaps later on move on to smartphones, then Unity3D is surely one of the better choices.&#xD;&#xA;&#xD;&#xA;IF I want to move my little game onto lets say iPhone, I could buy the small iPhone licens, which is only $400 + I would need an Apple developer license ($99) + some hardware (Mac Mini perhaps) to run the Unity editor on a Mac (as Apple dont allow programs for their iOS to be compiled on nothing but Mac, but thats another storry) + an iPhone or iPod or iPad, depending on what platform you wanted to target.&#xD;&#xA;&#xD;&#xA;The point is, that you can EASILY transfer the game from PC platform to mobile with Unity3D, so thats my goal.&#xD;&#xA;&#xD;&#xA;Ohh and btw. I am also an experienced Flash/Actionscript 3.0 developer, but as Flash currently isnt supported on iOS and I kinda liked this real-3D engine for my semi 2.5D games, I think its great that there even is a free edition to train and get used to it first." />
  <row Id="12332" PostHistoryTypeId="2" PostId="6186" RevisionGUID="43802aba-516e-48da-8766-a5b7af26349d" CreationDate="2010-12-04T06:07:04.513" UserId="1428" Text="I am developing using XNA, a simple 3d tower defense game. I wanted create a 3d terrain. &#xD;&#xA;Here is how I am doing it: &#xD;&#xA;&#xD;&#xA;1. fundamental element is a texture of grass, overlaid on a --&gt; rectangle / cube ...( not sure about this)&#xD;&#xA;&#xD;&#xA;2. These elements are much smaller than the entire game screen. Some equi-spaced elements are filled on the game screen with some randomly generated z values.&#xD;&#xA;&#xD;&#xA;3. others need to interpolate between the z values. &#xD;&#xA;&#xD;&#xA;Now the question is how to : &#xD;&#xA;&#xD;&#xA;Actually implement it. method 1 is to have each element be completely straight, with normal in y direction, and vary z gradually. method 2 is have the rectangle/ cube surface tilt. &#xD;&#xA;If I do method 1 it might look pretty shabby. using method 2, I don't know how to get the surface z value at all the points, on the eventual terrain, which moving enemies will walk on / towers will be placed on.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. &#xD;&#xA;Thnx.&#xD;&#xA;" />
  <row Id="12333" PostHistoryTypeId="1" PostId="6186" RevisionGUID="43802aba-516e-48da-8766-a5b7af26349d" CreationDate="2010-12-04T06:07:04.513" UserId="1428" Text="XNA 3d Terrain using rectangular elements" />
  <row Id="12334" PostHistoryTypeId="3" PostId="6186" RevisionGUID="43802aba-516e-48da-8766-a5b7af26349d" CreationDate="2010-12-04T06:07:04.513" UserId="1428" Text="&lt;xna&gt;&lt;3d&gt;&lt;terrain-rendering&gt;" />
  <row Id="12335" PostHistoryTypeId="2" PostId="6187" RevisionGUID="8233e69e-a5fe-4659-99ac-2c4f958f5fa4" CreationDate="2010-12-04T13:13:45.967" UserId="3783" Text="If that is even what it is called.  What I am trying to do it:&#xD;&#xA;http://asterisq.com/products/constellation/roamer/demo&#xD;&#xA;&#xD;&#xA;Can someone please point me to towards a book or in vaguely the right direction?  I don't even know where to start or what physics/maths to read about?" />
  <row Id="12336" PostHistoryTypeId="1" PostId="6187" RevisionGUID="8233e69e-a5fe-4659-99ac-2c4f958f5fa4" CreationDate="2010-12-04T13:13:45.967" UserId="3783" Text="I'm trying to learn the &quot;digital physics&quot; required to do a floating network of spheres" />
  <row Id="12337" PostHistoryTypeId="3" PostId="6187" RevisionGUID="8233e69e-a5fe-4659-99ac-2c4f958f5fa4" CreationDate="2010-12-04T13:13:45.967" UserId="3783" Text="&lt;math&gt;&lt;2d-physics&gt;" />
  <row Id="12338" PostHistoryTypeId="2" PostId="6188" RevisionGUID="1de3c8b7-27c0-4e8a-926b-c630075e4ac0" CreationDate="2010-12-04T16:47:09.167" UserId="3505" Text="Vector maths is a must, you shouldn't need more than the basic parts for this, but the rest is generally very recommendable for a game programmer, so if you skip the cool stuff for now be sure to get back on the topic sometime. From there you could read about ragdoll physics, though a lot of sources for that may be &quot;heavier&quot; than what you need, so I'll just sketch out how I presume the animation works.&#xD;&#xA;&#xD;&#xA;It runs a set number of updates per second.  &#xD;&#xA;For every update it iterate over all pairs of objects.  &#xD;&#xA;If the objects are too close each of the two objects will be moved a little away the other.  &#xD;&#xA;If they are connected and too far from one another each object will be moved a little closer to the other.  &#xD;&#xA;In both cases, the more the distance is off, the more they should move. Try for instance moving the objects 1/10 of what they are are off the target.  &#xD;&#xA;It's probably best to not move the objects immediately when you do the calculation, but rather for each object sum the movement over an entire update and execute it only after the movement relative to all the other objects has been calculated.&#xD;&#xA;&#xD;&#xA;Note:  &#xD;&#xA;This setup does not use velocity and acceleration as one would with common ragdoll physics, that is on purpose since the goal is to spread the nodes out nicely rather than simulate real physics." />
  <row Id="12339" PostHistoryTypeId="6" PostId="6172" RevisionGUID="b2be27d0-c016-4a93-af29-042171ba5606" CreationDate="2010-12-04T17:09:41.010" UserId="1156" Comment="edited tags" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;blitzmax&gt;" />
  <row Id="12340" PostHistoryTypeId="4" PostId="6156" RevisionGUID="dc47b26b-5808-42aa-9f4e-9e7c24362bfb" CreationDate="2010-12-04T17:10:09.230" UserId="1156" Comment="edited title" Text="Examples of MMOs with  small dev teams" />
  <row Id="12341" PostHistoryTypeId="2" PostId="6189" RevisionGUID="3d2ca4c5-b6fe-4181-a9f6-5fa7f4884d2e" CreationDate="2010-12-04T17:53:45.890" UserId="1156" Text="What resources are available, including both free articles/ebooks and physical books and things, for game developers looking to begin simple AI programming/design?&#xD;&#xA;&#xD;&#xA;*Note: [I know of this question,][1] but that's more asking about where to start on a specific topic; I'm more asking about resources in general.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2194/new-to-creating-ai-where-to-start" />
  <row Id="12342" PostHistoryTypeId="1" PostId="6189" RevisionGUID="3d2ca4c5-b6fe-4181-a9f6-5fa7f4884d2e" CreationDate="2010-12-04T17:53:45.890" UserId="1156" Text="Useful resources for beginning AI" />
  <row Id="12343" PostHistoryTypeId="3" PostId="6189" RevisionGUID="3d2ca4c5-b6fe-4181-a9f6-5fa7f4884d2e" CreationDate="2010-12-04T17:53:45.890" UserId="1156" Text="&lt;ai&gt;&lt;language-agnostic&gt;&lt;books&gt;&lt;tutorials&gt;&lt;resources&gt;" />
  <row Id="12344" PostHistoryTypeId="16" PostId="6189" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-04T18:12:34.033" UserId="51" />
  <row Id="12345" PostHistoryTypeId="2" PostId="6190" RevisionGUID="53218476-f198-4dfe-af7c-83891ca5fcca" CreationDate="2010-12-04T18:18:06.790" UserId="51" Text="http://aigamedev.com/&#xD;&#xA;&#xD;&#xA;Half their content is behind a paywall, and it's practically impossible to find anything specific (like if you're trying to find their articles on behavior trees), but the content is second to none." />
  <row Id="12346" PostHistoryTypeId="2" PostId="6191" RevisionGUID="f5b7b66e-d7fa-4b85-8f43-25fbfbca7a1d" CreationDate="2010-12-04T18:24:16.347" UserId="3787" Text="The question is not hard, I'm writing a game engine for 2D side scrolling games, however I'm thinking to my 2D side scrolling game and I always come up with the problem of &quot;how should I do collision with the ground&quot;.&#xD;&#xA;I think I couldn't handle the collision with ground (ground for me is &quot;where the player walk&quot;, so something heavily used) in a per-pixel way, and I can't even do it with simple shape comparison (because the ground can be tilted), so what's the correct way? I'know what tiles are and i've read about it, but how much should be big each tile to not appear like a stairs?Are there any other approach?&#xD;&#xA;&#xD;&#xA;I watched this game and is very nice how he walks on ground:&#xD;&#xA;http://www.youtube.com/watch?v=DmSAQwbbig8&amp;feature=player_embedded&#xD;&#xA;&#xD;&#xA;If there are &quot;platforms&quot; in mid air, how should I handle them?I can walk over them but I can't pass &quot;inside&quot;. Imagine a platform in mid air, it allows you to walk over it but limit you because you can't jump in the area she fits&#xD;&#xA;&#xD;&#xA;*Sorry for my english, it's not my native language and this topic has a lot of keywords I don't know so I have to use workarounds&#xD;&#xA;Thanks for any answer*" />
  <row Id="12347" PostHistoryTypeId="1" PostId="6191" RevisionGUID="f5b7b66e-d7fa-4b85-8f43-25fbfbca7a1d" CreationDate="2010-12-04T18:24:16.347" UserId="3787" Text="2D Side Scrolling game and &quot;walk over ground&quot; collision detection" />
  <row Id="12348" PostHistoryTypeId="3" PostId="6191" RevisionGUID="f5b7b66e-d7fa-4b85-8f43-25fbfbca7a1d" CreationDate="2010-12-04T18:24:16.347" UserId="3787" Text="&lt;2d&gt;&lt;side-scroller&gt;&lt;collision&gt;" />
  <row Id="12349" PostHistoryTypeId="2" PostId="6192" RevisionGUID="de69bdd8-0dbd-4a4a-88c6-7d6373b484d8" CreationDate="2010-12-04T19:06:50.203" UserId="2910" Text="I'm a really big fan of this book in terms of 'simple',&#xD;&#xA;&#xD;&#xA;[AI for Game Developers][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can find it for about $5.00 on Amazon if you factor in shipping from a 3rd party. It talks about basics and good material for tile based games, which are great starting points for developing.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/images/0596005555/ref=dp_image_0?ie=UTF8&amp;n=283155&amp;s=books" />
  <row Id="12350" PostHistoryTypeId="2" PostId="6193" RevisionGUID="11c978cf-503f-4559-ae48-19288c5830b1" CreationDate="2010-12-04T19:30:41.923" UserId="831" Text="Does anyone have any good resources for creating special effects, aimed a programmers.&#xD;&#xA;I'm not specifically interested in particle effects, but broader things like:&#xD;&#xA;&#xD;&#xA;1. Fullscreen effects, blur, depth of field&#xD;&#xA;2. Explosions, shockwaves&#xD;&#xA;3. Weapons&#xD;&#xA;4. Environment - light &quot;glows&quot; and beams, water, bubbles, dust etc &#xD;&#xA;&#xD;&#xA;I'm interested in these things from a technical perspective rather than an artistic one.&#xD;&#xA;" />
  <row Id="12351" PostHistoryTypeId="1" PostId="6193" RevisionGUID="11c978cf-503f-4559-ae48-19288c5830b1" CreationDate="2010-12-04T19:30:41.923" UserId="831" Text="Effects for Programmers" />
  <row Id="12352" PostHistoryTypeId="3" PostId="6193" RevisionGUID="11c978cf-503f-4559-ae48-19288c5830b1" CreationDate="2010-12-04T19:30:41.923" UserId="831" Text="&lt;programming&gt;&lt;graphics-programming&gt;&lt;graphic-effects&gt;&lt;special-effects&gt;" />
  <row Id="12353" PostHistoryTypeId="2" PostId="6194" RevisionGUID="47512154-5c5a-4246-b6d0-79e7b0479c2e" CreationDate="2010-12-04T20:21:53.780" UserId="51" Text="Typically the way I've handled this in the past is by creating metadata for your level that is nothing more than a series of ordered points to define line segments, and doing player collision vs. line segment collision on them.  For a tile based game you only have to author data for those tiles.  This is better than trying to do pixel tests since it's easy to define how things interact with lines than a series of pixels.&#xD;&#xA;&#xD;&#xA;Then it's a simple matter of defining how you want your collision on your character to be.  Circles are the easiest.  Usually you probably want to do something like a pill shape, though (two circles and a rectangle).&#xD;&#xA;&#xD;&#xA;Basically it's a simplified form of the idea of a collision model that a lot of 3D games use, except it's just lines.&#xD;&#xA;" />
  <row Id="12354" PostHistoryTypeId="2" PostId="6195" RevisionGUID="c6f4f956-edf4-43cc-871f-47c46391149d" CreationDate="2010-12-04T20:44:41.797" UserId="744" Text="Examples for these kind of things is pretty much what &lt;a href=&quot;http://www.amazon.com/GPU-Gems-Programming-Techniques-Real-Time/dp/0321228324/&quot;&gt;the GPU Gems series&lt;/a&gt; covers.&#xD;&#xA;&#xD;&#xA;Books &lt;a href=&quot;http://http.developer.nvidia.com/GPUGems/gpugems_part01.html&quot;&gt;1&lt;/a&gt;, &#xD;&#xA;&lt;a href=&quot;http://http.developer.nvidia.com/GPUGems2/gpugems2_part01.html&quot;&gt;2&lt;/a&gt;, and &lt;a href=&quot;http://http.developer.nvidia.com/GPUGems3/gpugems3_part01.html&quot;&gt;3&lt;/a&gt; are available for free on nVidia's website." />
  <row Id="12355" PostHistoryTypeId="2" PostId="6196" RevisionGUID="5f2d57d4-a62e-4f36-9da2-c49649699bb8" CreationDate="2010-12-04T20:48:54.150" UserId="3505" Text="Your question is a bit broad, it seems to hint that you are not perfectly comfortable with the programming and/or mathematics involved.&#xD;&#xA;&#xD;&#xA;What I describe here is what I after long consideration believe to be easiest for you to understand and implement:&#xD;&#xA;&#xD;&#xA;Your world is split into a series of relatively narrow vertical stripes, something like 20 pixels wide each. For each stripe you define a number of lines stretching from one side of the stripe to the other, these lines should be placed to match the surface of the ground in that given area.&#xD;&#xA;&#xD;&#xA;Imagine your character represented as two vertical line pieces, one stretching from the top of the character and approximately 75% down, the other from the bottom and approximately 75% up, so they overlap on the middle.&#xD;&#xA;&#xD;&#xA;In order to do collision detection you first determine in what stripe the player is located, then you determine the exact vertical position of each line of that stripe at the players exact horizontal location, then you determine if any of the two lines representing the player overlap any of the stripe lines. If only the lower part of the player overlap anything then there is a collision with the ground, and the player needs to be moved up accordingly, if only the upper part of the player overlap something then there is a collision with the roof, and the player needs to be moved down. If both parts collide, or if the moving up or down cause the other part to collide, then there is a horizontal collision and the player must be moved back where he came from.&#xD;&#xA;&#xD;&#xA;It's hard stuff to mess with if you are not a skilled mathematician, but I hope you can use it. I'm afraid it doesn't get a lot easier unless you resort to something block based." />
  <row Id="12356" PostHistoryTypeId="2" PostId="6197" RevisionGUID="4ed84908-c807-4a77-afcd-8b6c6136210c" CreationDate="2010-12-04T22:33:33.520" UserId="659" Text="If you're relatively new to graphics programming, the most important thing for a lot of special effects is to understand alpha blending, and blending modes in general.&#xD;&#xA;&#xD;&#xA;For glows, explosions, and particle effects, additive blending is your best friend.&#xD;&#xA;&#xD;&#xA;Once you understand the effect of adding or multiplying colours, and the ways in which you can use alpha channels, then you are well on your way towards creating some fairly decent special effects.&#xD;&#xA;&#xD;&#xA;Remember that good special effects aren't always the most complex or most physically correct effects. Simple effects can often be very effective if executed well." />
  <row Id="12357" PostHistoryTypeId="2" PostId="6198" RevisionGUID="69fad7bb-7602-4194-98b9-c1741823d1f4" CreationDate="2010-12-05T01:28:07.713" UserId="2332" Text="[Programming Game AI By Example][1] by Mat Buckland is an excellent resource to get started. He starts right from the basics of state machines and moves on to steering behaviours and graph theory for pathfinding. Probably one of the best resources I've found, especially when starting out.&#xD;&#xA;&#xD;&#xA;The [AI Game Wisdom][2] books are also very good, but a lot of the articles are pretty advanced.&#xD;&#xA;&#xD;&#xA;A good link for steering behaviours is this site: http://www.red3d.com/cwr/steer/&#xD;&#xA;&#xD;&#xA;And as has been mentioned, http://aigamedev.com has amazing content, right from the frontlines.&#xD;&#xA;&#xD;&#xA;Amit's Game Programming site is pretty decent at getting an overview (although admittedly, I haven't used it much): http://www-cs-students.stanford.edu/~amitp/gameprog.html#ai&#xD;&#xA;&#xD;&#xA;I'd thoroughly recommended Buckland's book though. Very easy to follow and the source code actually works :)&#xD;&#xA;&#xD;&#xA;Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/gp/product/1556220782/ref=s9_simh_gw_p14_d0_i2?pf_rd_m=A3P5ROKL5A1OLE&amp;pf_rd_s=center-1&amp;pf_rd_r=0P275WQYXRGB5BPNSAQK&amp;pf_rd_t=101&amp;pf_rd_p=219600407&amp;pf_rd_i=468294&#xD;&#xA;  [2]: http://www.aiwisdom.com/" />
  <row Id="12358" PostHistoryTypeId="2" PostId="6199" RevisionGUID="97cc6974-492c-4a77-869c-f838bac9f458" CreationDate="2010-12-05T02:06:06.220" UserId="1552" Text="Several years ago I overhead a technique that gives the user the illusion of a rotating planet by using a 2D texture. Given that the user isn't able to change its position or viewport.&#xD;&#xA;&#xD;&#xA;What's the name of this technique?" />
  <row Id="12359" PostHistoryTypeId="1" PostId="6199" RevisionGUID="97cc6974-492c-4a77-869c-f838bac9f458" CreationDate="2010-12-05T02:06:06.220" UserId="1552" Text="3D Illusion of a 2D Planet Texture" />
  <row Id="12360" PostHistoryTypeId="3" PostId="6199" RevisionGUID="97cc6974-492c-4a77-869c-f838bac9f458" CreationDate="2010-12-05T02:06:06.220" UserId="1552" Text="&lt;2d&gt;&lt;3d&gt;" />
  <row Id="12361" PostHistoryTypeId="2" PostId="6200" RevisionGUID="106a9f9c-fa21-4056-9d4a-bd2b4f253440" CreationDate="2010-12-05T02:23:20.967" UserId="1820" Text="My sixth-grader is very interested in FPS game development but I don't think he has grasped the magnitude of the task ahead. He is a Halo fan and so his current goal is to make a similar game but better. Heh. I am not going to discourage him though.&#xD;&#xA;&#xD;&#xA;I gave him a Steam account and by himself he has discovered garrys mod and installed tortoise svn to add packs (and play them). He has also downloaded and poked around in the UDK and trials of Visual C++ and SoftImage. When I say &quot;by himself&quot; I mean he has asked his online buddies for advice and suggestions, and he has watched countless Youtube &quot;how-to&quot; videos (the classroom of the future).&#xD;&#xA;&#xD;&#xA;Although I am a programmer my expertise does not lie in games. I am having a hard time understanding what garrys mod encompasses. How far can he get with it and what additional tools should I help him to get?" />
  <row Id="12362" PostHistoryTypeId="1" PostId="6200" RevisionGUID="106a9f9c-fa21-4056-9d4a-bd2b4f253440" CreationDate="2010-12-05T02:23:20.967" UserId="1820" Text="How far can you get with garrys mod and no money?" />
  <row Id="12363" PostHistoryTypeId="3" PostId="6200" RevisionGUID="106a9f9c-fa21-4056-9d4a-bd2b4f253440" CreationDate="2010-12-05T02:23:20.967" UserId="1820" Text="&lt;tools&gt;&lt;learning&gt;" />
  <row Id="12364" PostHistoryTypeId="2" PostId="6201" RevisionGUID="5c37c254-350c-4e09-aff9-6c243dee6399" CreationDate="2010-12-05T03:27:45.810" UserId="3100" Text="Mods for Garry's Mod are [written entirely in Lua][1]. If he can get a hang of Lua, and learning Garry's Mod API which is really well documented on that Wiki...I think he could get pretty far. He can use the 3d models, maps, and sounds that come with the game, and just start out buy just scripting different weapons and move to more advanced stuff like game objectives as he get's more comfortable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.garrysmod.com/?title=My_First_Lua_Script" />
  <row Id="12365" PostHistoryTypeId="2" PostId="6202" RevisionGUID="39e2401f-ce09-403f-95f8-6b19dbebf159" CreationDate="2010-12-05T03:51:54.177" UserId="3792" Text="You could try using Actionscript 3.0 (flash) to build 2D card games. Here are a couple of tutorials:&#xD;&#xA;1)http://www.emanueleferonato.com/2007/12/30/guessnext-complete-flash-game-with-highscores/&#xD;&#xA;2)http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=221&#xD;&#xA;3)you could check out: http://www.gotoandplay.it/ (it has a lot of tutorials)&#xD;&#xA;" />
  <row Id="12366" PostHistoryTypeId="2" PostId="6203" RevisionGUID="a18db8be-f0eb-4a40-982f-f6e49bcc10cb" CreationDate="2010-12-05T04:56:42.927" UserId="3794" Text="How to implement soft shadows for omni directional (point) light. We use typical shadow mapping technique. Depth is rendered to texture cube and addresing is pretty simple then. Just using vector from light to fragments world position. It works perfectly. Until you want soft shadows. In our engine we use PCSS technique for spot lights. But for point light there begins troubles. &#xD;&#xA;&#xD;&#xA;How to sample in 3D? &#xD;&#xA;&#xD;&#xA;I developed technique when ortonormal basis is created from  a direction and upvector (0,1,0). And then multiply sampling vector (semothing like this (1.0,i/depthMapSize,j/depthMapSize) with this basis. But this (of course :)) looks pretty bad for vectors near (0,1,0) and (0,-1,0). &#xD;&#xA;&#xD;&#xA;I will appriciate any help on this. " />
  <row Id="12367" PostHistoryTypeId="1" PostId="6203" RevisionGUID="a18db8be-f0eb-4a40-982f-f6e49bcc10cb" CreationDate="2010-12-05T04:56:42.927" UserId="3794" Text="Point Light Soft Shadows" />
  <row Id="12368" PostHistoryTypeId="3" PostId="6203" RevisionGUID="a18db8be-f0eb-4a40-982f-f6e49bcc10cb" CreationDate="2010-12-05T04:56:42.927" UserId="3794" Text="&lt;directx&gt;&lt;shadows&gt;&lt;shadow-mapping&gt;" />
  <row Id="12369" PostHistoryTypeId="5" PostId="6193" RevisionGUID="62166708-fd5e-4a2d-a4bd-5a32e14ade43" CreationDate="2010-12-05T05:12:32.563" UserId="831" Comment="added 640 characters in body; added 8 characters in body" Text="Does anyone have any good resources for creating special effects, aimed at programmers.&#xD;&#xA;I'm not specifically interested in particle effects, but broader things like:&#xD;&#xA;&#xD;&#xA;1. Fullscreen effects, blur, depth of field, damage&#xD;&#xA;2. Explosions, shockwaves&#xD;&#xA;3. Weapons, lasers, projectile&#xD;&#xA;4. Environment - light &quot;glows&quot; and beams, water, bubbles, dust etc &#xD;&#xA;&#xD;&#xA;I'm interested in these things from a technical perspective rather than an artistic one.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;To clarify, I'm not interested in the low level details like &quot;a method for doing depth peeling on SPUs&quot; or &quot;fast particle rendering with vertex textures&quot;, I'm interested in how people have combined various techniques into a recipe to show a special effect for the game. &#xD;&#xA;&#xD;&#xA;For example - when rendering a &quot;space&quot; explosion:&#xD;&#xA;&#xD;&#xA; 1. Draw opaque bright sphere at center.&#xD;&#xA; 2. Draw alpha'd shockwave around a random axis. &#xD;&#xA; 3. Expand sphere and decrease alpha.&#xD;&#xA; 4. Expand shockwave and rotate UVs.&#xD;&#xA; 5. Spawn particles showering randomly from center. &#xD;&#xA; 6. Wobble camera when shockwave reaches viewer position.&#xD;&#xA;" />
  <row Id="12370" PostHistoryTypeId="5" PostId="6200" RevisionGUID="6f8c85ce-5879-4ac5-9c82-1ebaaea12a4c" CreationDate="2010-12-05T05:26:51.357" UserId="1820" Comment="grammar" Text="My sixth-grader is very interested in FPS game development but I don't think he has grasped the magnitude of the task ahead. He is a Halo fan and so his current goal is to make a similar game but better. Heh. I am not going to discourage him though.&#xD;&#xA;&#xD;&#xA;I gave him a Steam account and by himself he has discovered Garry's Mod and installed tortoise svn to add packs (and play them). He has also downloaded and poked around in the UDK and trials of Visual C++ and SoftImage. When I say &quot;by himself&quot; I mean he has asked his online buddies for advice and suggestions, and he has watched countless Youtube &quot;how-to&quot; videos (the classroom of the future).&#xD;&#xA;&#xD;&#xA;Although I am a programmer my expertise does not lie in games. I am having a hard time understanding what Garry's Mod encompasses. How far can he get with it and what additional tools should I help him to get?" />
  <row Id="12371" PostHistoryTypeId="4" PostId="6200" RevisionGUID="6f8c85ce-5879-4ac5-9c82-1ebaaea12a4c" CreationDate="2010-12-05T05:26:51.357" UserId="1820" Comment="grammar" Text="How far can you get with Garry's Mod and no money?" />
  <row Id="12372" PostHistoryTypeId="2" PostId="6204" RevisionGUID="fe784e4e-9194-4f91-9534-8102ff8c7ebf" CreationDate="2010-12-05T05:37:28.040" UserId="470" Text="I highly recommend that you/he check out [Unity3D][1]. It's a fantastic game engine with a visual world editor and some great scripting options. It has a great community and it's totally free to use for indie development.&#xD;&#xA;&#xD;&#xA;Garry's Mod is great if he wants to just learn and play around, especially with FPS stuff, but I'm pretty sure you can't make commercial games with it (although I don't know if that's even your son's goal). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3D.com" />
  <row Id="12373" PostHistoryTypeId="2" PostId="6205" RevisionGUID="2f2b465b-3597-45d5-9bd5-6cedd70c49f1" CreationDate="2010-12-05T05:39:37.350" UserId="825" Text="When I was around your son's age (13 or so), the thing that first got me into game development was a program called Klik n Play.  It was a program that allowed you to make simple 2d games without any coding at all by using a point and click action/reaction Event Editor to &quot;program&quot; it.  It no longer exists, but I believe its descendant, Multimedia Fusion ([http://www.clickteam.com/eng/mmf2.php][1]), is still supported and available, which boasts a similar low barrier to entry, requiring no programming.  The down side to these programs is that the end result might be less than inspiring, as it's pretty much limited to relatively simple 2d games.&#xD;&#xA;&#xD;&#xA;Alternatively, I would also highly recommend Unity ([http://unity3d.com/][2]), which has some great tutorials, and is similar in functionality to UDK but in my opinion much easier.  The pluses are that your son will be able to quickly create some pretty impressive 3d games (and 2d as well), though the minus would be that there is some (relatively little) programming involved.  Again, it's easier than UDK, but with similar results.  The programming options include Javascript, C# and Boo.  As I mentioned, there are some incredible (at least two of which are like 80+ pdfs teaching you how to do a lot of cool stuff) tutorials on their website, which made it a breeze for me personally to learn, although my disclaimer is that I started using Unity having already been programming professionally for several years, which might bias me (easier than UDK though!).&#xD;&#xA;&#xD;&#xA;Unity is free.  Multimedia Fusion is like $100.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.clickteam.com/eng/mmf2.php&#xD;&#xA;  [2]: http://unity3d.com/" />
  <row Id="12374" PostHistoryTypeId="2" PostId="6206" RevisionGUID="1a4e62fa-b482-48bc-9236-632cea070f42" CreationDate="2010-12-05T07:53:52.837" UserId="2925" Text="I am working on an iPad game, and have a few different intro story lines. I would like to get gamer feedback on the intros.&#xD;&#xA;&#xD;&#xA;What websites or techniques have others used to get such feedback?" />
  <row Id="12375" PostHistoryTypeId="1" PostId="6206" RevisionGUID="1a4e62fa-b482-48bc-9236-632cea070f42" CreationDate="2010-12-05T07:53:52.837" UserId="2925" Text="Places to Test Player Interest In Storyline" />
  <row Id="12376" PostHistoryTypeId="3" PostId="6206" RevisionGUID="1a4e62fa-b482-48bc-9236-632cea070f42" CreationDate="2010-12-05T07:53:52.837" UserId="2925" Text="&lt;feedback&gt;" />
  <row Id="12377" PostHistoryTypeId="2" PostId="6207" RevisionGUID="8e133a41-6b73-4823-8f6d-f631ed89ce22" CreationDate="2010-12-05T08:24:23.153" UserId="2289" Text="I'm looking for game engines (particularly 2D) that can run/create games for Windows, Mac, and Linux, and support multitouch inputs and gestures. I'm able to find many that meet the first two criteria, but don't mention anything about the second." />
  <row Id="12378" PostHistoryTypeId="1" PostId="6207" RevisionGUID="8e133a41-6b73-4823-8f6d-f631ed89ce22" CreationDate="2010-12-05T08:24:23.153" UserId="2289" Text="Are there any game engines in C# or Java that are cross-platform and support multitouch input?" />
  <row Id="12379" PostHistoryTypeId="3" PostId="6207" RevisionGUID="8e133a41-6b73-4823-8f6d-f631ed89ce22" CreationDate="2010-12-05T08:24:23.153" UserId="2289" Text="&lt;engine&gt;&lt;c#&gt;&lt;java&gt;&lt;cross-platform&gt;&lt;multitouch&gt;" />
  <row Id="12380" PostHistoryTypeId="2" PostId="6208" RevisionGUID="ea9bf1bf-2cdf-454a-ace0-805abd1ea93e" CreationDate="2010-12-05T08:45:42.427" UserId="3736" Text="well, that is maybe simple animation, using one texture with several frames ?" />
  <row Id="12381" PostHistoryTypeId="6" PostId="3090" RevisionGUID="7f425853-644b-460f-b2a2-ba3a8a4bc6c3" CreationDate="2010-12-05T08:58:18.473" UserId="450" Comment="edited tags" Text="&lt;architecture&gt;&lt;algorithm&gt;&lt;best-practices&gt;&lt;simulations&gt;&lt;scalability&gt;" />
  <row Id="12382" PostHistoryTypeId="2" PostId="6209" RevisionGUID="ac4c6e36-c906-4ae3-823e-fb84b9ab6b71" CreationDate="2010-12-05T10:56:22.807" UserDisplayName="wez" Text="OpenVG is a standard for hardware accelerated vector graphics. It is supported by GPUs targetted for handheld devices, such as Mali / PowerVR / Vivante. Qt and Cairo can use OpenVG as a rendering backed. There are software libraries that implement OpenVG using OpenGL hardware (MonkVG, AmanithVG GLE) or software only (AmanithVG SRE, ShivaVG, AlexVG).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12383" PostHistoryTypeId="2" PostId="6210" RevisionGUID="2ae7c32c-64ec-42af-8e28-31600d6376aa" CreationDate="2010-12-05T11:56:26.417" UserId="741" Text="Well, the seemingly obvious answer would be: because Windows, Mac and Linux are not touch screen platforms, and multi-touch inputs is a concept that only makes any sense on touch screen platforms.&#xD;&#xA;&#xD;&#xA;Why would your engines support an input mechanism that the platform doesn't? In some cases (e.g. iOS from Mac OS) there's a common framework because the platforms have evolved their existing OS to support touch screen devices (I'm not sure if Windows and Windows Mobile have gone the same route), but that's rather a side effect than a design decision I'm sure.&#xD;&#xA;&#xD;&#xA;So I'd be surprised if there were any engines which fit your criteria." />
  <row Id="12384" PostHistoryTypeId="2" PostId="6211" RevisionGUID="bd37dcd2-3dc9-4eb6-820d-46e4332edd13" CreationDate="2010-12-05T12:26:31.610" UserId="741" Text="Your question is unclear as to the restrictions on context you're working in. The vast majority of textures in 3D rendering are 2D. So if you're just showing a 3D sphere with a 2D surface texture mapped around it, this isn't really a problem. If you can't use 3D rendering, then you have to say exactly what you can use.&#xD;&#xA;&#xD;&#xA;The basic issue is that you have to render a flat texture over the surface of a sphere, which you get for free with 3D rendering. As the planet rotates, the visible portions of the planet's surface animate in a non linear way (the equatorial parts of the texture move faster than the poles). So I think either you have to distort the image yourself as you map it over the disc, or you do as VirtualVoid suggested, and simply have multiple images which you change between over time.&#xD;&#xA;&#xD;&#xA;It would be horrible to implement, but if you are able to render the texture, pixel by pixel, then you could basically do the rasterisation calculations for each line of the sphere separately. Let's assume that your surface map texture is flattened out, so that at the equator there are 512px of image. Let's also assume your visible disc is 256 px wide. Now think of each line of the rendered disc as a sliding window on the surface texture. On the equator, the window is 50% of the texture width, and you simply copy each of the 256px onto the equivalent pixel on the disc. The next line down on the disc will be slightly less than 256 px, but because of the distorted surface map, there are still 256px of input surface map data. So you then sub-sample the input surface map data, and render out the resulting pixel. For easy maths, let's assume that 1/3 of the way between the equator and the pole is 128px wide in the output disc. So each of those 128px is going to be the average of 2 neighbouring pixels. When you get down to the pole, you'd be averaging all 256px into only a few output pixels.&#xD;&#xA;&#xD;&#xA;You could also do it the other way, and have the lines in the source texture be of different lengths. So while the line containing the source data has 512px in it, the line 1/3 of the way down has only 256px, and the line at the bottom has only a few pixels. But each line is double the width of the disc at the equivalent y coordinate. That sort of a texture would be absolutely horrible to have to create though. And would probably suffer from horrible aliasing issues.&#xD;&#xA;&#xD;&#xA;In both of those cases your animation is simply then incrementing the start pixel x in the input texture, and wrapping around to the start of the input texture line.&#xD;&#xA;&#xD;&#xA;The more I write about this now, the more I'm convinced that it's a horrible idea, that you'd only implement if you really had absolutely no other choices. And you'd have to be in a very unusual situation to have no other choices.&#xD;&#xA;&#xD;&#xA;I don't believe I've heard of any solutions to this (rather vague) problem as a specific named technique." />
  <row Id="12385" PostHistoryTypeId="2" PostId="6212" RevisionGUID="64d50b2f-9ca0-44a5-a75d-859ece995cb9" CreationDate="2010-12-05T12:46:43.283" UserId="741" Text="While I agree with the sentiment: &quot;don't worry about it unless it's a proven issue&quot;, I do think it's worth thinking about early on: retro-fitting a solution is much more painful. And yes, only updating 'nearby' tiles is they way to go. But storage and addressability of items in your game world efficiently is very important for performance reasons.&#xD;&#xA;&#xD;&#xA;What you're really thinking about here is a sparse data-set: something where the potential indexes are large (or unlimited), but only a small proportion are actually used. The key point is that you do not know exactly which proportion will be used.&#xD;&#xA;&#xD;&#xA;The standard solution to a sparse data-set problem is to separate the index/addressability from the actual data storage. So if the tile object is expensive, then store it in a compact form (e.g. a flat array). But allow it to be indexed through a cheaper object. In its simplest form, this can be a 2D (or 3D) matrix which you can easily index by coordinate, but each item in the matrix is simply an index. You then use that index to look up the actual tile contents in a separate, compact array. If the tile contents do not yet exist, then add them to the end of the array, and store the index in the 3D matrix.&#xD;&#xA;&#xD;&#xA;The solution gets more complex if you wish to support deletion of contents (as it leads to fragmentation of the contents array), and if your tile contents are cheap, then the extra weight of the index (32-bit or 64-bit indices) will probably overwhelm the savings from not storing every single potential tile. It's also an extra lookup, which will hurt your cache performance.&#xD;&#xA;&#xD;&#xA;You can get even more storage efficiency by introducing extra layers of indirection. Let's say you organise your tiles into chunks, and chunks have a granularity of 64x64x64. Given a tile at 125, 1, 132, you know it belongs in chunk (1,0,2). So you have a world, which consists of a compact chunk array, and a matrix of chunk indices (-1 if the chunk doesn't exist). The contents of each chunk (if present) are a 64x64x64 matrix of tile indices (-1 if the tile doesn't exist yet), and a compact array of used tiles. This way, you don't burn a massive amount of tile indices for chunks which are never used. By following this sort of approach, and picking sensible numbers for the chunk granularity, you can scale up your universe massively, and keep your memory usage under control.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can also do sneaky tricks as well, like using the high order bit of your chunk or tile indices to mean something special. So if an entry in the tile matrix has the top bit set, then the lower 31 bits don't mean a tile index, instead they mean a 'warp index' or something similar, and you can look that up in a separately maintained list to find out the coordinates it leads to." />
  <row Id="12386" PostHistoryTypeId="2" PostId="6213" RevisionGUID="948657d7-b512-4f32-80b3-7a9585988927" CreationDate="2010-12-05T12:51:50.393" UserId="3792" Text="I would like to learn game development via game modding. RPG/MMORPG is one of my favorite genres. Could someone recommend me a good and recent ( I would like to play the game as well) game to learn game modding. Something with the likes of Neverwinternights 2." />
  <row Id="12387" PostHistoryTypeId="1" PostId="6213" RevisionGUID="948657d7-b512-4f32-80b3-7a9585988927" CreationDate="2010-12-05T12:51:50.393" UserId="3792" Text="What is the recommended RPG game that can be used to learn game Modding?" />
  <row Id="12388" PostHistoryTypeId="3" PostId="6213" RevisionGUID="948657d7-b512-4f32-80b3-7a9585988927" CreationDate="2010-12-05T12:51:50.393" UserId="3792" Text="&lt;mmo&gt;&lt;level-design&gt;&lt;modification&gt;&lt;rpg&gt;&lt;mods&gt;" />
  <row Id="12389" PostHistoryTypeId="5" PostId="6212" RevisionGUID="5637e384-d66e-4293-8feb-dbe391c25386" CreationDate="2010-12-05T12:55:20.263" UserId="741" Comment="Added note about 16-bit indices" Text="While I agree with the sentiment: &quot;don't worry about it unless it's a proven issue&quot;, I do think it's worth thinking about early on: retro-fitting a solution is much more painful. And yes, only updating 'nearby' tiles is they way to go. But storage and addressability of items in your game world efficiently is very important for performance reasons.&#xD;&#xA;&#xD;&#xA;What you're really thinking about here is a sparse data-set: something where the potential indexes are large (or unlimited), but only a small proportion are actually used. The key point is that you do not know exactly which proportion will be used.&#xD;&#xA;&#xD;&#xA;The standard solution to a sparse data-set problem is to separate the index/addressability from the actual data storage. So if the tile object is expensive, then store it in a compact form (e.g. a flat array). But allow it to be indexed through a cheaper object. In its simplest form, this can be a 2D (or 3D) matrix which you can easily index by coordinate, but each item in the matrix is simply an index. You then use that index to look up the actual tile contents in a separate, compact array. If the tile contents do not yet exist, then add them to the end of the array, and store the index in the 3D matrix.&#xD;&#xA;&#xD;&#xA;The solution gets more complex if you wish to support deletion of contents (as it leads to fragmentation of the contents array), and if your tile contents are cheap, then the extra weight of the index (32-bit or 64-bit indices) will probably overwhelm the savings from not storing every single potential tile. It's also an extra lookup, which will hurt your cache performance.&#xD;&#xA;&#xD;&#xA;You can get even more storage efficiency by introducing extra layers of indirection. Let's say you organise your tiles into chunks, and chunks have a granularity of 64x64x64. Given a tile at 125, 1, 132, you know it belongs in chunk (1,0,2). So you have a world, which consists of a compact chunk array, and a matrix of chunk indices (-1 if the chunk doesn't exist). The contents of each chunk (if present) are a 64x64x64 matrix of tile indices (-1 if the tile doesn't exist yet), and a compact array of used tiles. This way, you don't burn a massive amount of tile indices for chunks which are never used. By following this sort of approach, and picking sensible numbers for the chunk granularity, you can scale up your universe massively, and keep your memory usage under control. Actually, if you make your chunks 32x32x32, you can even make your tile indices 16-bit.&#xD;&#xA;&#xD;&#xA;You can also do sneaky tricks as well, like using the high order bit of your chunk or tile indices to mean something special. So if an entry in the tile matrix has the top bit set, then the lower 31 bits don't mean a tile index, instead they mean a 'warp index' or something similar, and you can look that up in a separately maintained list to find out the coordinates it leads to." />
  <row Id="12390" PostHistoryTypeId="2" PostId="6214" RevisionGUID="4149921e-398b-4c0c-beb4-b03b1cf68179" CreationDate="2010-12-05T12:56:52.527" UserId="1091" Text="Well as a simple hack on your current technique, you could choose between two up-vectors based on whether your view vector is tending towards parallel with one.&#xD;&#xA;&#xD;&#xA;It'd just be an abs, compare, and select in shader terms, so not much overhead - especially considering the sampling and blending...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12391" PostHistoryTypeId="2" PostId="6215" RevisionGUID="5aa8ecb2-b629-45ed-98e4-6dd1c386303e" CreationDate="2010-12-05T13:11:04.690" UserId="2776" Text="World of Warcraft supports [scripting on Lua][1]. Is it what you need?&#xD;&#xA;&#xD;&#xA;Also check [Mods for Games][2];&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wowwiki.com/Lua&#xD;&#xA;  [2]: http://www.moddb.com/mods" />
  <row Id="12392" PostHistoryTypeId="5" PostId="6215" RevisionGUID="4af427d6-5b60-4d0c-b426-2c32438ff165" CreationDate="2010-12-05T13:16:05.513" UserId="2776" Comment="added 69 characters in body" Text="World of Warcraft supports [scripting on Lua][1]. Is it what you need?&#xD;&#xA;&#xD;&#xA;Also check Mods for Games [tutorials][2] and [engines][3];&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wowwiki.com/Lua&#xD;&#xA;  [2]: http://www.moddb.com/tutorials&#xD;&#xA;  [3]: http://www.moddb.com/engines" />
  <row Id="12393" PostHistoryTypeId="2" PostId="6216" RevisionGUID="7b0211a1-e54e-4b70-9ac7-7491ff0394dd" CreationDate="2010-12-05T13:47:22.960" UserId="165" Text="For RPGs, you might look at:&#xD;&#xA;&#xD;&#xA;  - [Elder Scrolls: Oblivion Construction Wiki][1]&#xD;&#xA;  - [Elder Scrolls: Oblivion, Modding Faq][2]  &#xD;&#xA;  - [Mount and Blade Mod Repository][3]&#xD;&#xA;&#xD;&#xA;M&amp;B is more recent than Oblivion, but both are still played (and worth playing).&#xD;&#xA;&#xD;&#xA;  [1]: http://cs.elderscrolls.com/constwiki/index.php/Main_Page&#xD;&#xA;  [2]: http://cs.elderscrolls.com/constwiki/index.php/Oblivion_Mods_FAQ&#xD;&#xA;  [3]: http://www.mbrepository.com/" />
  <row Id="12394" PostHistoryTypeId="2" PostId="6217" RevisionGUID="be26616a-5293-4744-8802-f29210d95c48" CreationDate="2010-12-05T13:51:21.877" UserId="3803" Text="You could try [Unity iOS Pro](http://unity3d.com/) but as MrCranky said what is the point of having multi-touch support for a platform that doesn't support multi-touch (at the time being? " />
  <row Id="12395" PostHistoryTypeId="5" PostId="6216" RevisionGUID="60ce94fb-de23-415e-b645-f05fbd2a3f92" CreationDate="2010-12-05T13:54:19.813" UserId="165" Comment="added 739 characters in body" Text="For RPGs, you might look at:&#xD;&#xA;&#xD;&#xA;  - [Elder Scrolls: Oblivion Construction Wiki][1]&#xD;&#xA;  - [Elder Scrolls: Oblivion, Modding Faq][2]  &#xD;&#xA;  - [Mount and Blade Mod Repository][3]&#xD;&#xA;&#xD;&#xA;M&amp;B is more recent than Oblivion, but both are still played (and worth playing). For MMOs, Edward83's recommendation of Lua is good, however - for World of Warcraft, you would only be using Lua to write add-ons, not full mods.&#xD;&#xA;&#xD;&#xA;To clarify, when you make a mod for a game like Oblivion or Neverwinter Nights, you're actually changing the full game experience - you could make a science-fiction version of Oblivion, for instance. But with Warcraft/Lua, all you would be doing is making changes to the *interface*, not the game itself. You couldn't, say, add a new *item* to Warcraft, or change the skins to be Klingons.&#xD;&#xA;&#xD;&#xA;You can do a lot of cool things in WoW addons (and you can learn programming with Lua), but if you're interested in eventually making a full *game* - it's not quite the same as developing a *mod*.&#xD;&#xA;&#xD;&#xA;  [1]: http://cs.elderscrolls.com/constwiki/index.php/Main_Page&#xD;&#xA;  [2]: http://cs.elderscrolls.com/constwiki/index.php/Oblivion_Mods_FAQ&#xD;&#xA;  [3]: http://www.mbrepository.com/" />
  <row Id="12396" PostHistoryTypeId="2" PostId="6218" RevisionGUID="541de970-b1dd-412c-8f0d-88e2cac4a401" CreationDate="2010-12-05T13:59:44.223" UserId="3805" Text="This sounds like a troll post to me. Post a small statement, get tons of reply.&#xD;&#xA;&#xD;&#xA;Anyway, if you are serious I recommend you checking out the OpenSimulator project at http://www.opensimulator.org/ ... It has everything you need to get started and develop &quot;unlimited sized worlds&quot;. Scalability, physics, programming/modules (.Net), multiple viewers, etc. Best of all, its BSD-licensed and under constant development." />
  <row Id="12397" PostHistoryTypeId="2" PostId="6219" RevisionGUID="3874984f-dc15-495d-9e4c-5a14341bd0ef" CreationDate="2010-12-05T16:04:46.977" UserId="953" Text="In addition to the games Cyclops mentioned, *Fallout 3* and *Fallout: New Vegas* use the Oblivion engine and are highly moddable." />
  <row Id="12398" PostHistoryTypeId="2" PostId="6220" RevisionGUID="9bc5841a-d751-49e7-aabb-50e42a846b9e" CreationDate="2010-12-05T16:31:48.527" UserId="3807" Text="I am looking for some literature about pixel shaders algorithms or how would you call it.  &#xD;&#xA;It's for 2d top down space shooter kind of game.&#xD;&#xA;&#xD;&#xA;I was thinking effects like halos, slow time, trails, fast speed feeling.. &#xD;&#xA;&#xD;&#xA;I'm not looking for a guide how to code in Pixel Bender but for something that will teach me how to move pixels around to get expected effect." />
  <row Id="12399" PostHistoryTypeId="1" PostId="6220" RevisionGUID="9bc5841a-d751-49e7-aabb-50e42a846b9e" CreationDate="2010-12-05T16:31:48.527" UserId="3807" Text="2d Pixel Shader literature, algorithms, etc. for Pixel Bender for flash" />
  <row Id="12400" PostHistoryTypeId="3" PostId="6220" RevisionGUID="9bc5841a-d751-49e7-aabb-50e42a846b9e" CreationDate="2010-12-05T16:31:48.527" UserId="3807" Text="&lt;flash&gt;&lt;shaders&gt;" />
  <row Id="12401" PostHistoryTypeId="2" PostId="6221" RevisionGUID="c5cd2930-f150-4da7-8b03-d0a3570d927f" CreationDate="2010-12-05T20:27:01.893" UserId="3597" Text="Invite only beta. Find about 5-10 main beta testers and give them each 5-10 invites to give to their friends, on the condition that they will give feedback.&#xD;&#xA;&#xD;&#xA;Oh, and _anyone_ can be a beta tester. Your grandma, your next door neighbour kid, anyone you see as a target audience for your game." />
  <row Id="12402" PostHistoryTypeId="2" PostId="6222" RevisionGUID="26fde524-3e30-48c5-b47c-0adc41c5d0f2" CreationDate="2010-12-05T20:32:00.600" UserId="3794" Text="I think that there is nothing better to start your games/computer graphics programming than XNA. That is not engine but just library with tons of useful functions and classes. Also allows you to very easily port your game to xbox. There are limitations if you want to make something big, but thats not your sons case for next few years:). My first game was written in it and it opened me door to greater programming in real directx&amp;opengl.&#xD;&#xA;&#xD;&#xA;I also recommend to not try to make 3D game for the first try. 2D games are much easier. And doesnt need to much math because you can imagine or draw everything to paper. If your son wants to start programming in 3D. I would recommend him to start study linear algebra, thats what you need in 3D everyday.&#xD;&#xA;&#xD;&#xA;Also I wanna encourage him to do it. I was little boy who wanted to make game too. I sticked to that dream and now i am working in movie industry programming renderer for real movies. I can't imagine better job. Computer graphics are so much fun to work with. Same for artists and engineers. " />
  <row Id="12403" PostHistoryTypeId="5" PostId="6222" RevisionGUID="873174bd-5725-4e02-bbfb-c15f5ee4f97b" CreationDate="2010-12-05T21:32:56.397" UserId="3794" Comment="typos correction" Text="I think that there is nothing better to start your games/computer graphics programming than XNA. That is not engine but just library with tons of useful functions and classes. Also allows you to very easily port your game to xbox. There are limitations if you want to make something big, but thats not your sons case for next few years:). My first game was written in it and it opened me door to greater programming in real directx&amp;opengl.&#xD;&#xA;&#xD;&#xA;I also recommend to not try to make 3D game for the first try. 2D games are much easier. And doesnt need too much math because you can imagine or draw everything to paper. If your son wants to start programming in 3D. I would recommend him to start study linear algebra, thats what you need in 3D everyday.&#xD;&#xA;&#xD;&#xA;Also I wanna encourage him to do it. I was little boy who wanted to make game too. I sticked to that dream and now i am working in movie industry programming renderer for real movies. I can't imagine better job. Computer graphics are so much fun to work with. Same for artists and engineers. " />
  <row Id="12404" PostHistoryTypeId="2" PostId="6223" RevisionGUID="7920efdd-b922-415c-b14f-a26ab376a2b4" CreationDate="2010-12-05T21:38:00.493" UserId="3809" Text="Elder Scrolls is a great start, but I found the best RPG engine to get people really started modding is the Neverwinter Nights Aurora engine, simply because they have the largest collection of public tools for modding, and you can really get a feel for what it feels like to work on a game with their tools.&#xD;&#xA;&#xD;&#xA;http://nwn.bioware.com/developers/" />
  <row Id="12405" PostHistoryTypeId="5" PostId="6207" RevisionGUID="08060461-f942-4d7e-960d-b3dcfb01955b" CreationDate="2010-12-05T22:43:17.980" UserId="2289" Comment="added 175 characters in body" Text="I'm looking for game engines (particularly 2D) that can run/create games for Windows, Mac, and Linux, and support multitouch inputs and gestures. I'm able to find many that meet the first two criteria, but don't mention anything about multitouch.&#xD;&#xA;&#xD;&#xA;I know that Qt is an existing non-game framework that supports multitouch and is cross-platform. Unfortunately it doesn't seem to be geared for hardware-accelerated games." />
  <row Id="12406" PostHistoryTypeId="2" PostId="6224" RevisionGUID="fe3ef7f9-b467-4535-a89d-ad5895d6f4c1" CreationDate="2010-12-06T00:25:06.650" UserId="1428" Text="Does anybody know how to do this ? I have been trying to figure this out with no luck..." />
  <row Id="12407" PostHistoryTypeId="1" PostId="6224" RevisionGUID="fe3ef7f9-b467-4535-a89d-ad5895d6f4c1" CreationDate="2010-12-06T00:25:06.650" UserId="1428" Text="using XBOX controller on PC for an XNA game" />
  <row Id="12408" PostHistoryTypeId="3" PostId="6224" RevisionGUID="fe3ef7f9-b467-4535-a89d-ad5895d6f4c1" CreationDate="2010-12-06T00:25:06.650" UserId="1428" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;pc&gt;&lt;controllers&gt;" />
  <row Id="12409" PostHistoryTypeId="2" PostId="6225" RevisionGUID="ab1b7950-81f1-486f-a132-5bca7654a18a" CreationDate="2010-12-06T00:26:54.220" UserId="51" Text="If you can break it down into just text, one of the common things some companies do is send out surveys to a bunch of people asking them to rate it.&#xD;&#xA;&#xD;&#xA;So basically just make a surveymonkey survey (or some online equivalent) and ask the user to rate the intro text on some kind of scale to see what sticks.&#xD;&#xA;&#xD;&#xA;Generally speaking, though, these companies would have systems in place for beta testing lists so they already have a large pool of people they can spam who opted in to getting these kinds of things." />
  <row Id="12410" PostHistoryTypeId="2" PostId="6226" RevisionGUID="71ddea1d-4559-4c11-828e-ed30d0f1b90e" CreationDate="2010-12-06T00:32:22.250" UserId="395" Text="[This](http://msdn.microsoft.com/en-us/library/bb203900.aspx)? I think the GamePad stuff works on Windows last time I tried it." />
  <row Id="12411" PostHistoryTypeId="10" PostId="6186" RevisionGUID="99b52a23-f2e1-4012-a9eb-0988e1b6c20e" CreationDate="2010-12-06T00:42:50.243" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12412" PostHistoryTypeId="5" PostId="6186" RevisionGUID="075b87b1-9f54-4480-97ce-c19e47df335d" CreationDate="2010-12-06T00:42:50.447" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Creating a 3D map for XNA ?](http://gamedev.stackexchange.com/questions/3958/creating-a-3d-map-for-xna)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am developing using XNA, a simple 3d tower defense game. I wanted create a 3d terrain. &#xD;&#xA;Here is how I am doing it: &#xD;&#xA;&#xD;&#xA;1. fundamental element is a texture of grass, overlaid on a --&gt; rectangle / cube ...( not sure about this)&#xD;&#xA;&#xD;&#xA;2. These elements are much smaller than the entire game screen. Some equi-spaced elements are filled on the game screen with some randomly generated z values.&#xD;&#xA;&#xD;&#xA;3. others need to interpolate between the z values. &#xD;&#xA;&#xD;&#xA;Now the question is how to : &#xD;&#xA;&#xD;&#xA;Actually implement it. method 1 is to have each element be completely straight, with normal in y direction, and vary z gradually. method 2 is have the rectangle/ cube surface tilt. &#xD;&#xA;If I do method 1 it might look pretty shabby. using method 2, I don't know how to get the surface z value at all the points, on the eventual terrain, which moving enemies will walk on / towers will be placed on.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. &#xD;&#xA;Thnx.&#xD;&#xA;" />
  <row Id="12414" PostHistoryTypeId="2" PostId="6228" RevisionGUID="f90fa14e-9ad8-4c9d-9b46-830d2fdd0c74" CreationDate="2010-12-06T01:13:48.423" UserId="3142" Text="im going to guess at what you mean, and just throw an idea out there, but it's certaintly not going to be the 'famous' way to do it.&#xD;&#xA;&#xD;&#xA;all in 2D&#xD;&#xA;&#xD;&#xA;take 2 textures. one your land mass, the other your clouds. clouds should have a alpha layer that matches so you can 'see thru them'.&#xD;&#xA;&#xD;&#xA;make the textures tileable, that is they seamless wrap. there are programs that help you make these or tutorials in photoshop you can follow.&#xD;&#xA;&#xD;&#xA;then finally you make a stencil mask that is just a circle, so you are in effect looking thru a round hole at your square textures, thus masking off the corners.&#xD;&#xA;&#xD;&#xA;now you animate the texture matrixes of the land and cloud textures to make them move. make them move in different directions and speeds and it will appear to be rotating. it all depends on how seamless you made your textures.&#xD;&#xA;" />
  <row Id="12415" PostHistoryTypeId="2" PostId="6229" RevisionGUID="89bc39de-6279-4408-ad8f-1fe08b666706" CreationDate="2010-12-06T01:18:06.380" UserId="1320" Text="Dragon Age: Origins includes the toolset for modding.  Recently, Bioware released the [Ultimate Edition][1] with all of the DLC up to this point.  I think this would satisfy your requirements of a good, modern game that can be modded.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://amzn.to/gxGLP9" />
  <row Id="12416" PostHistoryTypeId="2" PostId="6230" RevisionGUID="47680d5f-c6b1-4be9-b5dd-6dd9f251f42a" CreationDate="2010-12-06T01:30:28.977" UserId="2693" Text="It should work pretty easy. I'm using an xbox 360 controller plugged into my windows machine as my main gaming controller, and to make an XNA project use it all I had to do was:&#xD;&#xA;&#xD;&#xA;    GamePadState gamepadState = GamePad.GetState(PlayerIndex.One);&#xD;&#xA;    &#xD;&#xA;    float movement = gamePadState.ThumbSticks.Left.X * MoveStickScale;&#xD;&#xA;    &#xD;&#xA;    if (Math.Abs(movement) &lt; 0.5f)&#xD;&#xA;                    movement = 0.0f;&#xD;&#xA;    if (gamePadState.IsButtonDown(Buttons.DPadLeft)){&#xD;&#xA;                    //do something&#xD;&#xA;    }&#xD;&#xA;    if (gamePadState.IsButtonDown(Buttons.LeftShoulder){&#xD;&#xA;                    //do something else&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and so on.&#xD;&#xA;Have you tried testing that the 360 controller works properly with your machine? Like, with other programs/games? Maybe you've just got a driver problem, but I think windows vista and 7 have the 360 drivers by default. (I'm using XP, had to install them)&#xD;&#xA;&#xD;&#xA;Try looking at these code samples:&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/platformer&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/input_sequence_sample" />
  <row Id="12417" PostHistoryTypeId="2" PostId="6231" RevisionGUID="9985af0a-1d97-4b41-bfb1-27d53214b71a" CreationDate="2010-12-06T01:36:30.567" UserId="2693" Text="Sprites. It sounds like what you're describing is a 2D sprite in a 3D game engine to render cheaply (the Nintendo64 did this all over the place, as did many early 3d engines). &#xD;&#xA;&#xD;&#xA;If you wanted to render a planet rotating, you'd just have to display a 2D sprite that was animated based on a sprite sheet that was a pre-rendered planet rotation. Just like, an animated .GIF for instance. The problem is that it would be pre-rendered, so as you said, this only works if the user isn't allowed to manipulate the view angle. &#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Sprite_(computer_graphics)" />
  <row Id="12418" PostHistoryTypeId="2" PostId="6232" RevisionGUID="b0f50c2b-3127-4ed1-b91c-424a6c37cefa" CreationDate="2010-12-06T01:48:10.467" UserId="2693" Text="Garry's Mod is a mod of the Halflife 2 engine. You can make your own mods of the Halflife 2 engine using the Halflife 2 SDK, or you can try to modify Garry's Mod through scripts. I don't think you're allowed to modify the source code to garry's mod.&#xD;&#xA;&#xD;&#xA;If he wanted to really make his own &quot;halo&quot; type FPS from scratch, then what he'll want to do is work with the source engine, the halflife2 SDK. This is totally free if you own ANY source game (so you probably already have it, since you have garry's mod on steam). This will provide you with a bunch of C++ projects which wrap the source engine and allow you to do really ANYTHING you want with it. Tons and tons of AAA commercial games and indie games with everything from RTS to RPG to FPS are made using the source engine. Its extremely flexible.&#xD;&#xA;&#xD;&#xA;That said, it is going to be EXTREMELY hard for your young son to get involved in. How strong are his programming concepts? He's going to have to be ROCK SOLID on C++ in order to start writing his own game / mod using the source engine.&#xD;&#xA;&#xD;&#xA;So, if that sounds way too daunting for him (For a sixth grader, I can't imagine one kid being able to get anywhere writing their own video game from scratch, realistically. Old games like mario and mortal kombat had small development teams, he could TRY to write a 2D game from scratch like that, but its still going to be HARD. Those games took like 10 programmers with degrees a year to write. He isn't that qualified and there is just one of him. Modern, 3D, AAA games require teams of 20-50 programmers and billions of dollars. Even if you were the greatest programmer in the world, it would take you forever to write a blockbuster game by yourself. Practically impossible for anyone.)&#xD;&#xA;&#xD;&#xA;Then instead maybe try just little mutations rather than a full conversion mod. You could try using the lua scripting that Garry's Mod supports in order to make small changes to the gameplay, maybe add a new item or a new feature. I haven't played around with Garry's Mod's scripting so I can't talk from experience like I can about the source engine.&#xD;&#xA;&#xD;&#xA;You mentioned the UDK, which is pretty cool, but again, thats like taking the source engine and starting from scratch. It takes forever, and its REALLY hard.&#xD;&#xA;&#xD;&#xA;The way I got started when I was first programming (and this was in 9th-10th grade, mind you) I wrote mutations for Unreal Tournament. They have their own language (unrealscript) but its pretty readable and pretty high level (it reads like java more or less) and the cool thing is Epic has always had tons of support for mods and mutations in Unreal Tournament. So, you could start just writing a mutation that makes rockets go faster, or rockets go slower, and then you can hop in Unreal Tournament and play your mutation. That way, you can start small. If you try to code a whole mod from scratch as your first experience, trust me, you'll never get past concept.&#xD;&#xA;&#xD;&#xA;Hope that wasn't too demoralizing. I think its awesome your son is passionate about gaming at such a young age! But kids certainly don't understand how much work goes into building their favorite games, and being able to write your own Halo is a pipedream.&#xD;&#xA;&#xD;&#xA;I'd say start with simpler things. Have him write pong, and then space invaders. Then go to Unreal Tournament and write some mutations, and when he's good with mutations, then you can think about mods.&#xD;&#xA;&#xD;&#xA;And as far as tools, I did my first UnrealTournament mutations in Wordpad! No joke! Its pretty easy, you write it up, you save it, and then you use command line to compile it using the tools that are already provided with UT by Epic Games.&#xD;&#xA;&#xD;&#xA;If you're going to work with the source engine, you'll need visual studio. You can probably get away with visual studio express fine, but you may have to download the windows SDK as well if you get the express version. Other than that, just tons of patience, and good programming fundamentals. :)" />
  <row Id="12419" PostHistoryTypeId="5" PostId="6232" RevisionGUID="3238780f-35fd-4e69-96c3-ac886849a333" CreationDate="2010-12-06T01:53:51.417" UserId="2693" Comment="added 128 characters in body" Text="Garry's Mod is a mod of the Halflife 2 engine. You can make your own mods of the Halflife 2 engine using the Halflife 2 SDK, or you can try to modify Garry's Mod through scripts. I don't think you're allowed to modify the source code to garry's mod.&#xD;&#xA;&#xD;&#xA;If he wanted to really make his own &quot;halo&quot; type FPS from scratch, then what he'll want to do is work with the source engine, the halflife2 SDK. This is totally free if you own ANY source game (so you probably already have it, since you have garry's mod on steam). This will provide you with a bunch of C++ projects which wrap the source engine and allow you to do really ANYTHING you want with it. Tons and tons of AAA commercial games and indie games with everything from RTS to RPG to FPS are made using the source engine. Its extremely flexible.&#xD;&#xA;&#xD;&#xA;That said, it is going to be EXTREMELY hard for your young son to get involved in. How strong are his programming concepts? He's going to have to be ROCK SOLID on C++ in order to start writing his own game / mod using the source engine.&#xD;&#xA;&#xD;&#xA;So, if that sounds way too daunting for him (For a sixth grader, I can't imagine one kid being able to get anywhere writing their own video game from scratch, realistically. Old games like mario and mortal kombat had small development teams, he could TRY to write a 2D game from scratch like that, but its still going to be HARD. Those games took like 10 programmers with degrees a year to write. He isn't that qualified and there is just one of him. Modern, 3D, AAA games require teams of 20-50 programmers and billions of dollars. Even if you were the greatest programmer in the world, it would take you forever to write a blockbuster game by yourself. Practically impossible for anyone.)&#xD;&#xA;&#xD;&#xA;Then instead maybe try just little mutations rather than a full conversion mod. You could try using the lua scripting that Garry's Mod supports in order to make small changes to the gameplay, maybe add a new item or a new feature. I haven't played around with Garry's Mod's scripting so I can't talk from experience like I can about the source engine.&#xD;&#xA;&#xD;&#xA;You mentioned the UDK, which is pretty cool, but again, thats like taking the source engine and starting from scratch. It takes forever, and its REALLY hard.&#xD;&#xA;&#xD;&#xA;The way I got started when I was first programming (and this was in 9th-10th grade, mind you) I wrote mutations for Unreal Tournament. They have their own language (unrealscript) but its pretty readable and pretty high level (it reads like java more or less) and the cool thing is Epic has always had tons of support for mods and mutations in Unreal Tournament. So, you could start just writing a mutation that makes rockets go faster, or rockets go slower, and then you can hop in Unreal Tournament and play your mutation. That way, you can start small. If you try to code a whole mod from scratch as your first experience, trust me, you'll never get past concept.&#xD;&#xA;&#xD;&#xA;Hope that wasn't too demoralizing. I think its awesome your son is passionate about gaming at such a young age! (He installed Tortoise SVN on his own, and he's seriously in the 6th grade? This kid is a future software developer for sure!). But kids certainly don't understand how much work goes into building their favorite games, and being able to write your own Halo is a pipedream.&#xD;&#xA;&#xD;&#xA;I'd say start with simpler things. Have him write pong, and then space invaders. Then go to Unreal Tournament and write some mutations, and when he's good with mutations, then you can think about mods.&#xD;&#xA;&#xD;&#xA;And as far as tools, I did my first UnrealTournament mutations in Wordpad! No joke! Its pretty easy, you write it up, you save it, and then you use command line to compile it using the tools that are already provided with UT by Epic Games.&#xD;&#xA;&#xD;&#xA;If you're going to work with the source engine, you'll need visual studio. You can probably get away with visual studio express fine, but you may have to download the windows SDK as well if you get the express version. Other than that, just tons of patience, and good programming fundamentals. :)" />
  <row Id="12420" PostHistoryTypeId="2" PostId="6233" RevisionGUID="adb1dd2c-6a89-4333-9bff-2454016a421d" CreationDate="2010-12-06T03:22:13.240" UserId="2634" Text="I agree, all of HTML5 is in beta, but lots of people are working on game engines.  I'm doing one myself (which I'll release open-source and describe fully in a book on HTML5 game dev.)  &#xD;&#xA;&#xD;&#xA;So far, I've got a basic sprite object that works much like a MovieClip in ActionScript or a Sprite in PyGame.  It's got all the basic features: speed, direction, vector-projection, multiple images, boundary-checking, transformations, and basic collision detection.&#xD;&#xA;&#xD;&#xA;I'm working on a very simple game object as well. This will encapsulate the canvas element, manage the main animation loop, and provide high-level interface to the event system (such as it is)&#xD;&#xA;&#xD;&#xA;I'm trying to keep it as simple as possible: something like gameEngine in Python:&#xD;&#xA;&#xD;&#xA;http://aharrisbooks.net/pythonGame/&#xD;&#xA;&#xD;&#xA;Even when I get this working, it certainly won't be stable, because the underlying technologies are far too unstable.  The browser support of various HTML5 features literally changes every day, and there is still no meaningful support for most HTML5 features in IE.  Also, performance varies dramatically between browsers, so a game that runs great in chrome may not run at all in Firefox.&#xD;&#xA;&#xD;&#xA;If you're wanting a stable, practical environment, HTML5 isn't it yet.  If you're interested in experimenting with HTML5, it's looking like a very promising alternative.  I'm definitely eager to use it as a teaching environment.  I believe it will be pretty useful in that regard.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="12421" PostHistoryTypeId="2" PostId="6234" RevisionGUID="1f752d50-b84d-407e-8443-eda70cb6daf4" CreationDate="2010-12-06T03:26:00.310" UserId="1400" Text="I've been bashing my head against the concept of a 'camera' for my 3D world for some time now, and I'm not sure I'm doing this right anymore.  Maybe I've been working on this for too long and have confused myself, or I have a fundamental mis-understanding of the topic.  Therefor, I could use a refresher/help on the concept of a 3D camera object and how that is supposed to operate.  I have a camera class with a position, an orientation (quaternion), and a derived transformation matrix.  Currently, my draw loop looks something like this:&#xD;&#xA;&#xD;&#xA;    Start Frame&#xD;&#xA;    Mult current matrix with matrix: Camera.Transform.Inverse&#xD;&#xA;    Save current matrix&#xD;&#xA;    Render all objects&#xD;&#xA;    Restore matrix&#xD;&#xA;    End Frame&#xD;&#xA;&#xD;&#xA;However, this makes the camera's position reflected about the origin (ie, the camera's position vector has negative values but DRAWS as if it had positive values) and modification of position and rotation are consequently negated from their expected values (to get closer to the origin from z=3, I must add...).&#xD;&#xA;&#xD;&#xA;So here is my issue: am I using this correctly?  How is a camera supposed to work?  Say I want to billboard something, how would I use the camera's information to do this?&#xD;&#xA;&#xD;&#xA;Additionally, the clipping plane suddenly cuts out my scene if I rotate too far in any direction and I'm not sure why.  How can I fix/avoid this using camera information?  Any help is much appreciated!" />
  <row Id="12422" PostHistoryTypeId="1" PostId="6234" RevisionGUID="1f752d50-b84d-407e-8443-eda70cb6daf4" CreationDate="2010-12-06T03:26:00.310" UserId="1400" Text="3D camera implementation" />
  <row Id="12423" PostHistoryTypeId="3" PostId="6234" RevisionGUID="1f752d50-b84d-407e-8443-eda70cb6daf4" CreationDate="2010-12-06T03:26:00.310" UserId="1400" Text="&lt;3d&gt;&lt;graphics-programming&gt;&lt;rendering&gt;&lt;camera&gt;" />
  <row Id="12424" PostHistoryTypeId="2" PostId="6235" RevisionGUID="a7a942e2-91f4-4558-92c0-e3d3ccbb83a8" CreationDate="2010-12-06T03:46:04.263" UserId="3794" Text="I see that you doesn't mention projection matrix in your code. Multiplication must go in this order: world * view * projection. Another order could work for special casis but they are not correct.&#xD;&#xA;&#xD;&#xA;Position and orientation is not enough for view matrix. You have to specify UP vector.&#xD;&#xA;&#xD;&#xA;Are you using some framework like Directx/opengl? Both of them contains lookAt function. If not, find specification and implement it by yourself. Here is directx implementation:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb281710(v=VS.85).aspx.&#xD;&#xA;&#xD;&#xA;Also double check if you are using same left handed or right handed coordinate system for all of your matrices. " />
  <row Id="12425" PostHistoryTypeId="5" PostId="6235" RevisionGUID="c87d8bdc-0d6b-459f-a32e-2d0273998da3" CreationDate="2010-12-06T04:01:20.187" UserId="3794" Comment="corrected spelling" Text="I see that you doesn't mention projection matrix in your code. Multiplication must go in this order: world * view * projection. Another order could work for special cases but they are not correct.&#xD;&#xA;&#xD;&#xA;Position and orientation is not enough for view matrix. You have to specify UP vector.&#xD;&#xA;&#xD;&#xA;Are you using some framework like Directx/opengl? Both of them contains lookAt function. If not, find specification and implement it by yourself. Here is directx implementation:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb281710(v=VS.85).aspx.&#xD;&#xA;&#xD;&#xA;Also double check if you are using same left handed or right handed coordinate system for all of your matrices. " />
  <row Id="12426" PostHistoryTypeId="5" PostId="5971" RevisionGUID="72a4378e-db19-480c-8377-f0a2d4f2dcc7" CreationDate="2010-12-06T04:35:42.353" UserId="3405" Comment="added 174 characters in body" Text="There are multiple tutorials on network-based programming:&#xD;&#xA;&#xD;&#xA; - [Unify MMO Tutorial][1] - This uses SmartFoxServer&#xD;&#xA; - [Unity iPhone Multiplayer Tutorial][2] - While this applies to iPhone development, the networking part of it still applies&#xD;&#xA; - [Unity Networking Example][3] - An example project which shows how to use NetworkView's&#xD;&#xA; - [Can I Make a MMORPG in Unity?][4] - UnityAnswers question about making MMO's with Unity&#xD;&#xA;&#xD;&#xA;Network programming can be done in C#/Boo, not sure about JavaScript.&#xD;&#xA;&#xD;&#xA;Another way to get client/server programming done is with Unity Pro/C++ Plugin&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=MMO_tutorial&#xD;&#xA;  [2]: http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf&#xD;&#xA;  [3]: http://unity3d.com/support/resources/example-projects/networking-example&#xD;&#xA;  [4]: http://answers.unity3d.com/questions/3389/can-i-make-a-mmorpg-with-unity" />
  <row Id="12427" PostHistoryTypeId="4" PostId="5693" RevisionGUID="899239eb-26cc-4d24-9529-45dff7154a3c" CreationDate="2010-12-06T05:51:50.507" UserId="51" Comment="edited title" Text="Can I do server side programming with unity?" />
  <row Id="12428" PostHistoryTypeId="2" PostId="6236" RevisionGUID="9ba3bc9d-1acf-45d5-a1e4-c12bf264c0ab" CreationDate="2010-12-06T08:03:19.350" UserId="849" Text="I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about Shaders, so I need a general introduction).&#xD;&#xA;&#xD;&#xA;I saw a lot of books that are a couple of years old, so I don't know if they still apply. I'm targeting XNA 4.0 at the moment (which I believe means HLSL Shaders for Shader Model 4.0), but anything that generally targets DirectX 11 and OpenGL 4 is helpful I guess." />
  <row Id="12429" PostHistoryTypeId="1" PostId="6236" RevisionGUID="9ba3bc9d-1acf-45d5-a1e4-c12bf264c0ab" CreationDate="2010-12-06T08:03:19.350" UserId="849" Text="Modern Shader Book?" />
  <row Id="12430" PostHistoryTypeId="3" PostId="6236" RevisionGUID="9ba3bc9d-1acf-45d5-a1e4-c12bf264c0ab" CreationDate="2010-12-06T08:03:19.350" UserId="849" Text="&lt;opengl&gt;&lt;directx&gt;&lt;shaders&gt;&lt;hlsl&gt;&lt;directx11&gt;" />
  <row Id="12431" PostHistoryTypeId="2" PostId="6237" RevisionGUID="7ffcef16-868b-4b0e-bfa5-3ca7d65a9dc2" CreationDate="2010-12-06T08:51:00.263" UserId="3656" Text="I'm a music composition student also getting a minor-plus-some in computer science. I love writing music and making sound effects and want to write music for games. But, I also realize everyone and their mother wants to do that. With that in mind, and since I'm already equally in love with programming, I'm interested in looking at focusing some aspects of the computer science portion of my education towards audio implementation for games.&#xD;&#xA;&#xD;&#xA;What I've done/am doing:&#xD;&#xA;&#xD;&#xA; - Wrote &quot;MusicManager&quot; classes that are aware of musical timings and a small amount of automated mixing based on game events&#xD;&#xA;&#xD;&#xA; - Reading [Who is Fourier?][1] as I work my way toward understanding Fourier analysis and implementing the FFT&#xD;&#xA;  &#xD;&#xA; - Learning FMOD Designer and using the designer API in a game (of course not taking a class specifically on this, I'm good for learning APIs on my own)&#xD;&#xA;&#xD;&#xA;With that background, I've got a two-part question.&#xD;&#xA;&#xD;&#xA;So aside from the things I list above, and the good ole fundamentals of computer science (data structures and algorithms, discrete math, OO/structured design), what are studios looking for in audio programmers? &#xD;&#xA;&#xD;&#xA;Also, G.A.N.G. and AES lecturers speak as though audio programmers are the next hot thing in games, but do many studios even have or think to hire dedicated audio programmers?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Who-Fourier-Mathematical-Transnational-College/dp/0964350408" />
  <row Id="12432" PostHistoryTypeId="1" PostId="6237" RevisionGUID="7ffcef16-868b-4b0e-bfa5-3ca7d65a9dc2" CreationDate="2010-12-06T08:51:00.263" UserId="3656" Text="What should audio programmers should know?" />
  <row Id="12433" PostHistoryTypeId="3" PostId="6237" RevisionGUID="7ffcef16-868b-4b0e-bfa5-3ca7d65a9dc2" CreationDate="2010-12-06T08:51:00.263" UserId="3656" Text="&lt;programming&gt;&lt;education&gt;&lt;audio&gt;" />
  <row Id="12434" PostHistoryTypeId="2" PostId="6238" RevisionGUID="af84f061-a639-4d95-8b65-8a85d06ce1cc" CreationDate="2010-12-06T09:03:31.933" UserId="1272" Text="These are all still relevant (and free online). CG tutorial (cg is virtually identical to hlsl) would probably be a good starting point. &#xD;&#xA;&#xD;&#xA;The GPU Gems books are sorta like recipe books for random effects, they assume you know what you're doing, but they're great resources once you're more comfortable with things.&#xD;&#xA;&#xD;&#xA;[CG Tutorial][4]&#xD;&#xA;&#xD;&#xA;[GPU Gems 1][1]&#xD;&#xA;&#xD;&#xA;[GPU Gems 2][2]&#xD;&#xA;&#xD;&#xA;[GPU Gems 3][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]:http://http.developer.nvidia.com/GPUGems/gpugems_part01.html&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems2/gpugems2_part01.html&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems3/gpugems3_part01.html&#xD;&#xA;  [4]: http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html" />
  <row Id="12435" PostHistoryTypeId="2" PostId="6239" RevisionGUID="48650425-1b77-413b-b04f-bbaeb983bcac" CreationDate="2010-12-06T09:03:53.883" UserId="3820" Text="Shader Languages doesn't differ so badly, thus it is possible to learn one language and transfer this knwoledge to other languages. Personally I started with Cg. There are really good free resources by Nvidia. &#xD;&#xA;&#xD;&#xA;Just have a look: http://developer.nvidia.com/page/cg_main.html&#xD;&#xA;&#xD;&#xA;After you get rid of the basics you can do some research at specific shaders. It happens that there is no &quot;bloom shader&quot; or &quot;water effect shader&quot;, but there are several different techniques and models you can implement with shaders. &#xD;&#xA;&#xD;&#xA;In my opinions, you don't need a book, if you are just intrested in some cool effects, but if you want to gain some knowledge in the field of computer graphics, i recommend to you the ShaderX oder GPU Gems series. " />
  <row Id="12436" PostHistoryTypeId="5" PostId="6238" RevisionGUID="f17bcf51-e90a-46d0-9a1a-a59da2049786" CreationDate="2010-12-06T09:18:21.233" UserId="1272" Comment="added 421 characters in body" Text="These are all still relevant (and free online). CG tutorial (cg is virtually identical to hlsl) would probably be a good starting point. &#xD;&#xA;&#xD;&#xA;The GPU Gems books are sorta like recipe books for random effects, they assume you know what you're doing, but they're great resources once you're more comfortable with things.&#xD;&#xA;&#xD;&#xA;[CG Tutorial][4]&#xD;&#xA;&#xD;&#xA;[GPU Gems 1][1]&#xD;&#xA;&#xD;&#xA;[GPU Gems 2][2]&#xD;&#xA;&#xD;&#xA;[GPU Gems 3][3]&#xD;&#xA;&#xD;&#xA;EDIT: and yeah, just about any tutorials/books you can find on shaders will still be relevant, a shader written for Shader Model 1 will run with Shader Model 4, and in a lot of cases you'll want to target lower shader models, since many effects don't need the extra stuff offered by the newer models (you can make nice water and bloom effects with SM2.0, and then if dx9 is an option you can target lower end hardware).&#xD;&#xA;&#xD;&#xA;  [1]:http://http.developer.nvidia.com/GPUGems/gpugems_part01.html&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems2/gpugems2_part01.html&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems3/gpugems3_part01.html&#xD;&#xA;  [4]: http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html" />
  <row Id="12437" PostHistoryTypeId="5" PostId="6210" RevisionGUID="1733bca0-11b7-4be7-8266-c0295de174ec" CreationDate="2010-12-06T09:24:37.693" UserId="741" Comment="Revised to acknowledge the fact that desktop OS *are* in fact starting to support multi-touch, even in small ways." Text="Well, the answer would probably be: because Windows, Mac and Linux are not primarily touch screen platforms, and multi-touch inputs is a concept that only makes any sense on touch screen platforms.&#xD;&#xA;&#xD;&#xA;Why would engines support an input mechanism if the platform doesn't? In some cases (e.g. iOS from Mac OS) there's a common framework because the platforms have evolved their existing OS to support touch screen devices (I'm not sure if Windows and Windows Mobile have gone the same route), but that's rather a side effect than a design decision I'm sure.&#xD;&#xA;&#xD;&#xA;As pointed out in the comments, the newest revisions of the desktop OSs are starting to embrace touch screen support, a fact of which I was unaware. But still, additional hardware is needed for everything except tablet PCs. So we are talking a currently miniscule proportion of the market. That's not likely to change either, until new systems start shipping with multi-touch capable input devices as standard. And since engine creators, like everyone else, only prosper by supporting targets with decent user numbers, I'd still be surprised if there were any engines which fit your criteria. I'd imagine though, if it's a popular input mechanism, demand for the hardware will grow, and existing engines will start to integrate multi-touch support. I'd be wary of any implementations that didn't have multi-touch in as a core design concept though, since it does affect the interfaces all across the UI part of an engine." />
  <row Id="12438" PostHistoryTypeId="5" PostId="6210" RevisionGUID="d698c3ea-bdfe-4af4-9077-4b086007f901" CreationDate="2010-12-06T09:29:54.163" UserId="741" Comment="added 137 characters in body" Text="Well, the answer would probably be: because Windows, Mac and Linux are not primarily touch screen platforms, and multi-touch inputs is a concept that only makes any sense on touch screen platforms.&#xD;&#xA;&#xD;&#xA;Why would engines support an input mechanism if the platform doesn't? In some cases (e.g. iOS from Mac OS) there's a common framework because the platforms have evolved their existing OS to support touch screen devices (I'm not sure if Windows and Windows Mobile have gone the same route), but that's rather a side effect than a design decision I'm sure.&#xD;&#xA;&#xD;&#xA;As pointed out in the comments, the newest revisions of the desktop OSs are starting to embrace touch screen support, a fact of which I was unaware. But still, additional hardware is needed for everything except tablet PCs. And while Wacom input tablets are nice, they are really no substitute for touch input on the same device as the display is rendering.&#xD;&#xA;&#xD;&#xA;So we are talking a currently miniscule proportion of the market. That's not likely to change either, until new systems start shipping with multi-touch capable input devices as standard. And since engine creators, like everyone else, only prosper by supporting targets with decent user numbers, I'd still be surprised if there were any engines which fit your criteria. I'd imagine though, if it's a popular input mechanism, demand for the hardware will grow, and existing engines will start to integrate multi-touch support. I'd be wary of any implementations that didn't have multi-touch in as a core design concept though, since it does affect the interfaces all across the UI part of an engine." />
  <row Id="12439" PostHistoryTypeId="5" PostId="6232" RevisionGUID="85ec9b8b-2cd9-4b5c-8e07-dbfc61dc7612" CreationDate="2010-12-06T10:34:23.287" UserId="2693" Comment="added 36 characters in body; edited body" Text="Garry's Mod is a mod of the Halflife 2 engine. You can make your own mods of the Halflife 2 engine using the Halflife 2 SDK, or you can try to modify Garry's Mod through scripts. I don't think you're allowed to modify the source code to garry's mod.&#xD;&#xA;&#xD;&#xA;If he wanted to really make his own &quot;halo&quot; type FPS from scratch, then what he'll want to do is work with the source engine, the halflife2 SDK. This is totally free if you own ANY source game (so you probably already have it, since you have garry's mod on steam). This will provide you with a bunch of C++ projects which wrap the source engine and allow you to do really ANYTHING you want with it. Tons and tons of AAA commercial games and indie games with everything from RTS to RPG to FPS are made using the source engine. Its extremely flexible.&#xD;&#xA;&#xD;&#xA;That said, it is going to be EXTREMELY hard for your young son to get involved in. How strong are his programming concepts? He's going to have to be ROCK SOLID on C++ in order to start writing his own game / mod using the source engine.&#xD;&#xA;&#xD;&#xA;So, if that sounds way too daunting for him (For a sixth grader, I can't imagine one kid being able to get anywhere writing their own video game from scratch, realistically. Old games like mario and mortal kombat had small development teams, he could TRY to write a 2D game from scratch like that, but its still going to be HARD. Those games took like 10 programmers with degrees a year to write. He isn't that qualified and there is just one of him. Modern, 3D, AAA games require teams of 20-50 programmers and billions of dollars. EDIT: okay, millions, I exaggerate. Even if you were the greatest programmer in the world, it would take you forever to write a blockbuster game by yourself. Practically impossible for anyone.)&#xD;&#xA;&#xD;&#xA;Then instead maybe try just little mutations rather than a full conversion mod. You could try using the lua scripting that Garry's Mod supports in order to make small changes to the gameplay, maybe add a new item or a new feature. I haven't played around with Garry's Mod's scripting so I can't talk from experience like I can about the source engine.&#xD;&#xA;&#xD;&#xA;You mentioned the UDK, which is pretty cool, but again, thats like taking the source engine and starting from scratch. It takes forever, and its REALLY hard.&#xD;&#xA;&#xD;&#xA;The way I got started when I was first programming (and this was in 9th-10th grade, mind you) I wrote mutations for Unreal Tournament. They have their own language (unrealscript) but its pretty readable and pretty high level (it reads like java more or less) and the cool thing is Epic has always had tons of support for mods and mutations in Unreal Tournament. So, you could start just writing a mutation that makes rockets go faster, or rockets go slower, and then you can hop in Unreal Tournament and play your mutation. That way, you can start small. If you try to code a whole mod from scratch as your first experience, trust me, you'll never get past concept.&#xD;&#xA;&#xD;&#xA;Hope that wasn't too demoralizing. I think its awesome your son is passionate about gaming at such a young age! (He installed Tortoise SVN on his own, and he's seriously in the 6th grade? This kid is a future software developer for sure!). But kids certainly don't understand how much work goes into building their favorite games, and being able to write your own Halo is a pipedream.&#xD;&#xA;&#xD;&#xA;I'd say start with simpler things. Have him write pong, and then space invaders. Then go to Unreal Tournament and write some mutations, and when he's good with mutations, then you can think about mods.&#xD;&#xA;&#xD;&#xA;And as far as tools, I did my first UnrealTournament mutations in Wordpad! No joke! Its pretty easy, you write it up, you save it, and then you use command line to compile it using the tools that are already provided with UT by Epic Games.&#xD;&#xA;&#xD;&#xA;If you're going to work with the source engine, you'll need visual studio. You can probably get away with visual studio express fine, but you may have to download the windows SDK as well if you get the express version. Other than that, just tons of patience, and good programming fundamentals. :)" />
  <row Id="12440" PostHistoryTypeId="2" PostId="6240" RevisionGUID="50db48a6-ec8f-45f0-9c6a-a27aa04ef87b" CreationDate="2010-12-06T11:43:45.337" UserId="3823" Text="I have a 3D object as an imported asset in Unity which i want to make updates to in Maya.&#xD;&#xA;The asset get's updated automatically in Unity when i save the object in Maya - but not in the project hierarchy where i have placed it in the scene.&#xD;&#xA;&#xD;&#xA;Is there a way to keep the object with it's mesh collider when the model is updated without having to re-create it in the hierarchy for every iteration?" />
  <row Id="12441" PostHistoryTypeId="1" PostId="6240" RevisionGUID="50db48a6-ec8f-45f0-9c6a-a27aa04ef87b" CreationDate="2010-12-06T11:43:45.337" UserId="3823" Text="Is there a way to keep the mesh collider when updating objects in Unity?" />
  <row Id="12442" PostHistoryTypeId="3" PostId="6240" RevisionGUID="50db48a6-ec8f-45f0-9c6a-a27aa04ef87b" CreationDate="2010-12-06T11:43:45.337" UserId="3823" Text="&lt;3d&gt;&lt;unity&gt;" />
  <row Id="12443" PostHistoryTypeId="2" PostId="6241" RevisionGUID="58592690-476b-4b8f-bf47-adf3fde2833e" CreationDate="2010-12-06T12:06:56.813" UserId="3823" Text="When i import an object from Maya with a defined UV-map i have to manually import the texture (image) and assign it to the material.&#xD;&#xA;&#xD;&#xA;Is there a way to keep the materials texture reference from Maya when importing into Unity?" />
  <row Id="12444" PostHistoryTypeId="1" PostId="6241" RevisionGUID="58592690-476b-4b8f-bf47-adf3fde2833e" CreationDate="2010-12-06T12:06:56.813" UserId="3823" Text="Is it possible to import UV-maps in Unity3D without manually importing the associated texture?" />
  <row Id="12445" PostHistoryTypeId="3" PostId="6241" RevisionGUID="58592690-476b-4b8f-bf47-adf3fde2833e" CreationDate="2010-12-06T12:06:56.813" UserId="3823" Text="&lt;unity&gt;&lt;textures&gt;" />
  <row Id="12446" PostHistoryTypeId="2" PostId="6242" RevisionGUID="c67850c0-b291-4207-b21f-cf3e4d676024" CreationDate="2010-12-06T13:12:44.900" UserId="2080" Text="If you want to go for the basics with examples, then I guess this is where I would start:&#xD;&#xA;&#xD;&#xA; - [Texturing and Modeling: A Procedural Approach][1]&#xD;&#xA;&#xD;&#xA;Also there is a ton of other books considering shaders (with examples):&#xD;&#xA;&#xD;&#xA; - [Graphics Shaders: Theory and Practice][2]&#xD;&#xA; - [Shaders for Game Programmers and Artists][3]&#xD;&#xA; - [Programming Vertex &amp; Pixel Shaders][4]&#xD;&#xA; - ShaderX series&#xD;&#xA; - GPU Gems series&#xD;&#xA;&#xD;&#xA;You could also take a look at: [http://gamedev.stackexchange.com/questions/6236/modern-shader-book][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Texturing-Modeling-Third-Procedural-Approach/dp/1558608486/&#xD;&#xA;  [2]: http://www.amazon.com/Graphics-Shaders-Practice-Mike-Bailey/dp/1568813341/&#xD;&#xA;  [3]: http://www.amazon.com/Shaders-Programmers-Artists-Premier-Development/dp/1592000924/&#xD;&#xA;  [4]: http://www.amazon.com/Programming-Vertex-Pixel-Shaders/dp/1584503491/&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/6236/modern-shader-book" />
  <row Id="12447" PostHistoryTypeId="2" PostId="6243" RevisionGUID="d5a36c45-bf64-4af0-b9c1-93b8d8664ca9" CreationDate="2010-12-06T14:53:04.933" UserId="3476" Text="The team I worked in developed quite a few games in the past using Delphi and DirectX wrapper called Asphyre. They were all 2D games developed for payslot machines. We even combined Delphi and Flash through ActiveX, which turned up very satisfying.&#xD;&#xA;&#xD;&#xA;[Asphyre][1] is one of the best (if not the only) DirectX wrapper for Delphi. We used a lot of particles and stuff there, so those were rather eye-pleasing games. Asphyre features 3D technologies too, but we never went beyond 2D cause we didn't need to.&#xD;&#xA;&#xD;&#xA;In my opinion, however, Delphi is just way too old and it appears that C# provides the best alternative for it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.afterwarp.net/forum/index.php &quot;Asphyre&quot;" />
  <row Id="12448" PostHistoryTypeId="2" PostId="6244" RevisionGUID="091981be-b7d6-418b-86d9-8d0099c6a83b" CreationDate="2010-12-06T15:28:10.220" UserId="1923" Text="Are you clear on the inversing process? From a math standpoint, i mean.&#xD;&#xA;&#xD;&#xA;If you were to manipulate a world space Matrix to represent the camera orientation and position, the matrix you send to the effect is the inverse of that. *An inverted a matrix is not simply the result of negation of its components*. There is more to it mathematically, even more than transposing. It seems like you probably already know this, and you may be using a framework method for inversing, but just making sure.&#xD;&#xA;&#xD;&#xA;Typically, I store and manipulate a world space quat &amp; position, which I visualize as a real world movie camera, bundle them into a world space Matrix, then invert that matrix *properly* and send the result off to the effect.&#xD;&#xA;&#xD;&#xA;I use the world space version's component vectors for any needed local space transformations. Typically these values are different than simply negated inverted version's values." />
  <row Id="12449" PostHistoryTypeId="16" PostId="6238" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-06T15:31:14.780" UserId="51" />
  <row Id="12450" PostHistoryTypeId="16" PostId="6239" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-06T15:31:14.780" UserId="51" />
  <row Id="12451" PostHistoryTypeId="16" PostId="6236" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-06T15:31:14.780" UserId="51" />
  <row Id="12452" PostHistoryTypeId="5" PostId="6239" RevisionGUID="f5125bab-5a33-4cad-98aa-4935d7ddd9bd" CreationDate="2010-12-06T15:31:43.500" UserId="51" Comment="edited body" Text="Shader Languages doesn't differ so badly, thus it is possible to learn one language and transfer this knowledge to other languages. Personally I started with Cg. There are really good free resources by Nvidia. &#xD;&#xA;&#xD;&#xA;Just have a look: http://developer.nvidia.com/page/cg_main.html&#xD;&#xA;&#xD;&#xA;After you get rid of the basics you can do some research at specific shaders. It happens that there is no &quot;bloom shader&quot; or &quot;water effect shader&quot;, but there are several different techniques and models you can implement with shaders. &#xD;&#xA;&#xD;&#xA;In my opinions, you don't need a book, if you are just intrested in some cool effects, but if you want to gain some knowledge in the field of computer graphics, I recommend to you the ShaderX oder GPU Gems series. " />
  <row Id="12456" PostHistoryTypeId="2" PostId="6245" RevisionGUID="1c2dd34b-5cd7-4d81-af11-af8a9210fbbf" CreationDate="2010-12-06T15:35:39.020" UserId="51" Text="I'm not 100% sure on what you're asking, but here are two suggestions anyway:&#xD;&#xA;&#xD;&#xA;1) Have you made a prefab of this object in the scene?  Hopefully if you update the model, the prefab gets updated, so the object in the scene gets updated.&#xD;&#xA;&#xD;&#xA;2) If that isn't what you want, you could try writing an editor script do do things for you.  Look here: http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.OnPostprocessModel.html" />
  <row Id="12457" PostHistoryTypeId="5" PostId="6203" RevisionGUID="7b65f8a2-e7a7-45f5-9ef8-5f15e5bd2489" CreationDate="2010-12-06T15:35:51.593" UserId="14" Comment="deleted 9 characters in body" Text="How to implement soft shadows for omni directional (point) light. We use typical shadow mapping technique. Depth is rendered to texture cube and addresing is pretty simple then. Just using vector from light to fragments world position. It works perfectly. Until you want soft shadows. In our engine we use PCSS technique for spot lights. But for point light there begins troubles. &#xD;&#xA;&#xD;&#xA;How to sample in 3D? &#xD;&#xA;&#xD;&#xA;I developed technique when ortonormal basis is created from  a direction and upvector (0,1,0). And then multiply sampling vector (semothing like this (1.0,i/depthMapSize,j/depthMapSize) with this basis. But this (of course :)) looks pretty bad for vectors near (0,1,0) and (0,-1,0). &#xD;&#xA;&#xD;&#xA;I will appreciate any help on this. " />
  <row Id="12458" PostHistoryTypeId="2" PostId="6246" RevisionGUID="3ef4f7d1-ab5d-434c-b955-76e7d7e7e353" CreationDate="2010-12-06T15:37:43.713" UserId="51" Text="I think if the textures its looking for are in a folder called /Textures/ somewhere in the asset view, and named the same as whatever you're calling it in Maya, it'll &quot;just work&quot;.&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/documentation/Components/class-Mesh.html" />
  <row Id="12459" PostHistoryTypeId="19" PostId="90" RevisionGUID="d2f6bcd0-5708-4cf4-9031-77c66091eb80" CreationDate="2010-12-06T15:38:27.550" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="12460" PostHistoryTypeId="4" PostId="90" RevisionGUID="1611752b-03a2-4698-aca1-18f3cd9fad14" CreationDate="2010-12-06T15:40:15.303" UserId="51" Comment="edited title" Text="Why is it so hard to develop a MMO?" />
  <row Id="12461" PostHistoryTypeId="2" PostId="6247" RevisionGUID="26c07414-8b5d-46be-aa2e-2b9467219521" CreationDate="2010-12-06T16:16:02.247" UserId="1101" Text="&gt; G.A.N.G. and AES lecturers speak as though audio programmers are the next hot thing in games&#xD;&#xA;&#xD;&#xA;I had to Google for those terms - you might want to edit your question to be clearer about what those names mean, because I doubt most will have heard of them. Needless to say, they are bound to be a bit biased regarding their own relevance.&#xD;&#xA;&#xD;&#xA;&gt; do many studios even have or think to hire dedicated audio programmers?&#xD;&#xA;&#xD;&#xA;No.&#xD;&#xA;&#xD;&#xA;Some do. Most probably don't. &#xD;&#xA;&#xD;&#xA;As far as I can tell, most people are using a typical audio library, often with a thin wrapper around it, and getting their resident sound/music guy to create sounds for the game via Wwise, FMod Designer, or similar, and that's about it.&#xD;&#xA;&#xD;&#xA;A small but growing number of games have had complex or novel audio requirements of late, eg. since the Guitar Hero thing took off. But despite good sales of those products, it's still just a drop in the ocean in terms of the quantity of games that require such features and the number of developers attempting them." />
  <row Id="12462" PostHistoryTypeId="2" PostId="6248" RevisionGUID="fda2a048-3392-475b-9bd5-5ac19c345c5d" CreationDate="2010-12-06T17:21:40.400" UserDisplayName="Irbis" Text="i wonder why no one said anything about FREEWARE AND OPEN-SOURCE&#xD;&#xA;Constructor game engine. its mostly also drag-and-drop, has a solid suppport and is easy to learn  and use. you dont need to know any programing knowledge beside plain variables and conditions. ty it out&#xD;&#xA;http://www.scirra.com" />
  <row Id="12463" PostHistoryTypeId="2" PostId="6249" RevisionGUID="7f8e4000-b7cc-445c-9898-36251ccd217b" CreationDate="2010-12-06T17:44:08.190" UserId="3830" Text="Henrik I believe I know what you are talking about.  What you want is something that looks like a 3d planet that is rotating - meaning that the planet's surface appears to be moving (orbiting), but it is being rendered with just 2D textures.  I believe for reference this is how the planets were done in the original Star Trek show.&#xD;&#xA;&#xD;&#xA;I put together a quick little animated gif of what the effect would look like.  Clearly it could be animated a lot smoother - I shifted the planet surface by 4 pixels each frame.  It's also not set to wrap the image so there's a glitch at the end of the loop.&#xD;&#xA;&#xD;&#xA;Unfortunately I don't have enough rep points to post the images for my instructions below, so I've had to put in image links to my own site.&#xD;&#xA;&#xD;&#xA;First, here is what the 2D rotating planet effect looks like...&#xD;&#xA;&#xD;&#xA;[LINK TO ORBITING PLANET EFFECT GIF][1]&#xD;&#xA;&#xD;&#xA;I did do this all in Photoshop, but the concept should work in a 2D rendering environment that lets you do alpha transparencies, etc.  Here are a series of screenshots showing the process...&#xD;&#xA;&#xD;&#xA; 1. Create a blank star background, and cut a round hole in it.  &lt;code&gt;http://www.perludus.com/_shot1.png&lt;/code&gt;&#xD;&#xA;&#xD;&#xA; 2. Find a grayscale shaded sphere for your planet, like this one&#xD;&#xA;&lt;code&gt;http://www.perludus.com/graysphere.jpg&#xD;&#xA;&#xD;&#xA; 3. Here is our stars with hole and the shaded sphere on top, semi transparent&#xD;&#xA;&lt;code&gt;http://www.perludus.com/_shot2.png&#xD;&#xA;&#xD;&#xA; 4. Make a blue circle the size of the hole, and give it an outer blue glow.  Also set it to be semi-transparent.  Here's what it looks like with the shaded sphere&#xD;&#xA;&lt;code&gt;http://www.perludus.com/_shot3.png&#xD;&#xA;&#xD;&#xA; 5. Now find a planet surface texture.  I found this one just googling &quot;planet surface texture&quot;&#xD;&#xA;&lt;code&gt;http://www.perludus.com/_shot4.png&#xD;&#xA;&#xD;&#xA; 6. Place the planet texture UNDER the star image with the semi-transparent hole in it to get this look&#xD;&#xA;&lt;code&gt;http://www.perludus.com/_shot5.png&#xD;&#xA;&#xD;&#xA;To animate your planet's surface, just move the underlying planet surface texture.  You'll have to get clever about shifting the texture when it reaches the edge to get a seamless and endless rotation.&#xD;&#xA;&#xD;&#xA;Hope this helps and is the effect you were looking for!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://perludus.com/orbit.gif" />
  <row Id="12464" PostHistoryTypeId="5" PostId="6245" RevisionGUID="56db85df-0e11-4a2f-88b4-68510116455a" CreationDate="2010-12-06T17:49:41.130" UserId="51" Comment="edited body" Text="I'm not 100% sure on what you're asking, but here are two suggestions anyway:&#xD;&#xA;&#xD;&#xA;1) Have you made a prefab of this object in the scene?  Hopefully if you update the model, the prefab gets updated, so the object in the scene gets updated.&#xD;&#xA;&#xD;&#xA;2) If that isn't what you want, you could try writing an editor script to do things for you.  Look here: http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.OnPostprocessModel.html" />
  <row Id="12465" PostHistoryTypeId="2" PostId="6250" RevisionGUID="faf7ac9e-56a8-4717-ab0e-846c9eeca59e" CreationDate="2010-12-06T17:51:12.057" UserId="3830" Text="*OK I think I have the rep now.  Contents of previous post with images embedded.  Is this the rotating planet effect you're looking for?  Its simply a scrolling 2D image viewed through a semi-transparent &quot;hole&quot; in the star field.*&#xD;&#xA;&#xD;&#xA;I put together a quick little animated gif of what the effect would look like.  Clearly it could be animated a lot smoother - I shifted the planet surface by 4 pixels each frame.  It's also not set to wrap the image so there's a glitch at the end of the loop.&#xD;&#xA;&#xD;&#xA;![planet][1]&#xD;&#xA;&#xD;&#xA;I did do this all in Photoshop, but the concept should work in a 2D rendering environment that lets you do alpha transparencies, etc.  Here are a series of screenshots showing the process...&#xD;&#xA;&#xD;&#xA; 1. Create a blank star background, and cut a round hole in it.  &#xD;&#xA;![alt text][2]&#xD;&#xA; 2. Find a grayscale shaded sphere for your planet, like this one &#xD;&#xA;![alt text][3]&#xD;&#xA; 3. Here is our stars with hole and the shaded sphere on top, semi transparent &#xD;&#xA;![alt text][4]&#xD;&#xA; 4. Make a blue circle the size of the hole, and give it an outer blue glow.  Also set it to be semi-transparent.  Here's what it looks like with the shaded sphere &#xD;&#xA;![alt text][5]&#xD;&#xA; 5. Now find a planet surface texture.  I found this one just googling &quot;planet surface texture&quot; &#xD;&#xA;![alt text][6]&#xD;&#xA; 6. Place the planet texture UNDER the star image with the semi-transparent hole in it to get this look &#xD;&#xA;![alt text][7]&#xD;&#xA;&#xD;&#xA;To animate your planet's surface, just move the underlying planet surface texture.  You'll have to get clever about shifting the texture when it reaches the edge to get a seamless and endless rotation.&#xD;&#xA;&#xD;&#xA;Hope this helps and is the effect you were looking for!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perludus.com/orbit.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/MFCA8.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/FLqtI.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/9mP0v.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/wGwwx.png&#xD;&#xA;  [6]: http://i.stack.imgur.com/bLJxQ.png&#xD;&#xA;  [7]: http://i.stack.imgur.com/BwrJx.png" />
  <row Id="12466" PostHistoryTypeId="2" PostId="6251" RevisionGUID="dd7a39e0-412f-467a-b8a4-aa5635703cc8" CreationDate="2010-12-06T18:01:52.327" UserId="3214" Text="&gt;  I love writing music and making sound effects and want to write music for games. But, I also realize everyone and their mother wants to do that.&#xD;&#xA;&#xD;&#xA;Since when? Audio in games has never really been the focal point of the industry, and that is not changing. There are companies that want wonderful soundtracks and some good sound effects (naturally), but they use audio libraries and hire people to make that content in a 3rd party context.&#xD;&#xA;&#xD;&#xA;Audio programmers are not really hired by the game company." />
  <row Id="12467" PostHistoryTypeId="5" PostId="6250" RevisionGUID="eaafdd9e-7854-40c3-911e-0e94a944eb84" CreationDate="2010-12-06T18:02:33.017" UserId="3830" Comment="Edited for layout to improve readability - line breaks before pictures in numbered list." Text="*OK I think I have the rep now.  Contents of previous post with images embedded.  Is this the rotating planet effect you're looking for?  Its simply a scrolling 2D image viewed through a semi-transparent &quot;hole&quot; in the star field.*&#xD;&#xA;&#xD;&#xA;I put together a quick little animated gif of what the effect would look like.  Clearly it could be animated a lot smoother - I shifted the planet surface by 4 pixels each frame.  It's also not set to wrap the image so there's a glitch at the end of the loop.&#xD;&#xA;&#xD;&#xA;![planet][1]&#xD;&#xA;&#xD;&#xA;I did do this all in Photoshop, but the concept should work in a 2D rendering environment that lets you do alpha transparencies, etc.  Here are a series of screenshots showing the process...&#xD;&#xA;&#xD;&#xA; 1. Create a blank star background, and cut a round hole in it.  &#xD;&#xA;![alt text][2]&#xD;&#xA; 2. Find a grayscale shaded sphere for your planet, like this one  &#xD;&#xA;![alt text][3]&#xD;&#xA; 3. Here is our stars with hole and the shaded sphere on top, semi transparent  &#xD;&#xA;![alt text][4]&#xD;&#xA; 4. Make a blue circle the size of the hole, and give it an outer blue glow.  Also set it to be semi-transparent.  Here's what it looks like with the shaded sphere  &#xD;&#xA;![alt text][5]&#xD;&#xA; 5. Now find a planet surface texture.  I found this one just googling &quot;planet surface texture&quot;  &#xD;&#xA;![alt text][6]&#xD;&#xA; 6. Place the planet texture UNDER the star image with the semi-transparent hole in it to get this look  &#xD;&#xA;![alt text][7]&#xD;&#xA;&#xD;&#xA;To animate your planet's surface, just move the underlying planet surface texture.  You'll have to get clever about shifting the texture when it reaches the edge to get a seamless and endless rotation.&#xD;&#xA;&#xD;&#xA;Hope this helps and is the effect you were looking for!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.perludus.com/orbit.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/MFCA8.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/FLqtI.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/9mP0v.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/wGwwx.png&#xD;&#xA;  [6]: http://i.stack.imgur.com/bLJxQ.png&#xD;&#xA;  [7]: http://i.stack.imgur.com/BwrJx.png" />
  <row Id="12468" PostHistoryTypeId="2" PostId="6252" RevisionGUID="7d61ae90-88e1-4674-94c8-3e8205680220" CreationDate="2010-12-06T18:13:34.823" UserId="1198" Text="Unless I misunderstand your question, I would expect what you describe to be desired behavior. It seems to me, like you are streaming the mapping data as the user pans around the map. As soon as it's off the screen, I would unload those resources and then load up resources for the newly visible sections.&#xD;&#xA;&#xD;&#xA;If you don't unload resources as the user pans around, eventually, the user will have the entire map loaded into memory, and this would defeat the purpos of streaming data to the user in the first place.&#xD;&#xA;&#xD;&#xA;If the actual streaming of the map is what's got you stumped, I think your first approach is best. Put the map into sections (usually called Tiles) as the user pans around, determine which tiles should be loaded and unloaded, then render all of the loaded tiles." />
  <row Id="12469" PostHistoryTypeId="5" PostId="6237" RevisionGUID="df242c49-0035-4534-b807-a33c12278966" CreationDate="2010-12-06T18:23:58.437" UserId="3656" Comment="added 90 characters in body" Text="I'm a music composition student also getting a minor-plus-some in computer science. I love writing music and making sound effects and want to write music for games. But, I also realize everyone and their mother wants to do that. With that in mind, and since I'm already equally in love with programming, I'm interested in looking at focusing some aspects of the computer science portion of my education towards audio implementation for games.&#xD;&#xA;&#xD;&#xA;What I've done/am doing:&#xD;&#xA;&#xD;&#xA; - Wrote &quot;MusicManager&quot; classes that are aware of musical timings and a small amount of automated mixing based on game events&#xD;&#xA;&#xD;&#xA; - Reading [Who is Fourier?][1] as I work my way toward understanding Fourier analysis and implementing the FFT&#xD;&#xA;  &#xD;&#xA; - Learning FMOD Designer and using the designer API in a game (of course not taking a class specifically on this, I'm good for learning APIs on my own)&#xD;&#xA;&#xD;&#xA;With that background, I've got a two-part question.&#xD;&#xA;&#xD;&#xA;So aside from the things I list above, and the good ole fundamentals of computer science (data structures and algorithms, discrete math, OO/structured design), what are studios looking for in audio programmers? &#xD;&#xA;&#xD;&#xA;Also, [G.A.N.G.][2] and [Audio Engineering Society][3] lecturers speak as though audio programmers are the next hot thing in games, but do many studios even have or think to hire dedicated audio programmers?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Who-Fourier-Mathematical-Transnational-College/dp/0964350408&#xD;&#xA;  [2]: http://audiogang.org/&#xD;&#xA;  [3]: http://www.aes.org/" />
  <row Id="12470" PostHistoryTypeId="2" PostId="6253" RevisionGUID="4e3f0d2f-69db-41b2-83fd-9995f5b78855" CreationDate="2010-12-06T18:48:49.907" UserId="3505" Text="A 1 GHz Pentium III with 512 MB ram and a GeForce FX 5200. If the game runs reasonably on this platform then it should run smoothly on almost every PC in the wild.&#xD;&#xA;&#xD;&#xA;It's easy to add in optional graphical effects, high resolution textures and so on that users with better computers can enable, it's not so easy to get a game already designed for high end PCs running reasonably on lesser hardware." />
  <row Id="12471" PostHistoryTypeId="2" PostId="6254" RevisionGUID="549fe57e-c501-4e88-82f5-4ba0aa26b408" CreationDate="2010-12-06T18:53:57.897" UserId="1156" Text="As far as Garry's Mod goes, I'd probably place it on a level similar to that of Game Maker for use. You can do Lua scripting, and I have played some very nice mods with it (my favourite was called Trouble In Terrorist Town, which played like Call of Duty mixed with Murder In The Dark).  &#xD;&#xA;&#xD;&#xA;However, it did remind me of the time I played with Unity 3D. To get further, I would probably say Unity3D like Matt Rix has, just because of the resemblance to GMod that it has - most of the action is in the WYSIWYG window, but because the scripting plays a larger part, the customizability is greater too." />
  <row Id="12472" PostHistoryTypeId="6" PostId="2508" RevisionGUID="a8ce5835-acb4-4728-918f-6e442b8b18a8" CreationDate="2010-12-06T18:56:42.997" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;platform&gt;" />
  <row Id="12473" PostHistoryTypeId="5" PostId="2508" RevisionGUID="74dcc15d-fbc1-485e-92cd-dfcca4d81302" CreationDate="2010-12-06T19:36:03.323" UserId="51" Comment="added 2 characters in body; edited title" Text="The question came randomly and I think it will really help to know from everyone's experience.&#xD;&#xA;&#xD;&#xA;It all started from this article on gamedev.net http://www.gamedev.net/reference/programming/features/x64ErrCol/&#xD;&#xA;and then I saw a couple of more tweets embracing the 64-bit architectures.&#xD;&#xA;&#xD;&#xA;So to you what is today's target platform and what important advantages does it have?" />
  <row Id="12474" PostHistoryTypeId="4" PostId="2508" RevisionGUID="74dcc15d-fbc1-485e-92cd-dfcca4d81302" CreationDate="2010-12-06T19:36:03.323" UserId="51" Comment="added 2 characters in body; edited title" Text="What is today's target platform?" />
  <row Id="12475" PostHistoryTypeId="4" PostId="6237" RevisionGUID="eae6da34-ba1d-4458-872f-31eb9346148a" CreationDate="2010-12-06T19:39:33.520" UserId="51" Comment="edited title" Text="What should audio programmers know?" />
  <row Id="12476" PostHistoryTypeId="2" PostId="6255" RevisionGUID="8ccd272a-1018-479e-afbd-48a2ac7206d8" CreationDate="2010-12-06T19:53:48.817" UserId="3830" Text="It doesn't necessarily deal with floating platforms and jumping, but consider the idea of walkable areas as opposed to walkable surfaces.  For example here's a forest with a sloping path.  You only want the player walking on the light dirt path.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Now have an invisible bound area that defines the places the player can walk.  Here's what it might look like overlaid on the forest path.  It would be rendered in the actual game of course.&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;Then you put your player in the picture, and only allow their origin point (probably base of their feet) to be inside the walk zone.  &#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;This would work pretty well if you let the player click on any spot, and if it was in the walk zone they would walk to that spot.&#xD;&#xA;&#xD;&#xA;Game Maker allows you to do something like this.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/CZ6rM.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/N5941.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/D04EF.jpg" />
  <row Id="12477" PostHistoryTypeId="5" PostId="6255" RevisionGUID="789f7393-e771-4855-91da-0df85efd4de8" CreationDate="2010-12-06T20:10:41.927" UserId="3830" Comment="typo" Text="It doesn't necessarily deal with floating platforms and jumping, but consider the idea of walkable areas as opposed to walkable surfaces.  For example here's a forest with a sloping path.  You only want the player walking on the light dirt path.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Now have an invisible bound area that defines the places the player can walk.  Here's what it might look like overlaid on the forest path.  It would NOT be rendered in the actual game of course.&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;Then you put your player in the picture, and only allow their origin point (probably base of their feet) to be inside the walk zone.  &#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;This would work pretty well if you let the player click on any spot, and if it was in the walk zone they would walk to that spot.&#xD;&#xA;&#xD;&#xA;Game Maker allows you to do something like this.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/CZ6rM.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/N5941.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/D04EF.jpg" />
  <row Id="12478" PostHistoryTypeId="2" PostId="6256" RevisionGUID="a04aa1dd-d56a-4d12-8b12-c968d7af8b48" CreationDate="2010-12-06T21:53:21.970" UserId="3843" Text="I'm looking for some other open source games out there that I can port (easily or not) to Android.  I know that it's possible to port Wolfenstein and Doom and was wondering if there are any others out there.  I was thinking of Civilization (I remember a linux port some time back) and a few others.  It can be in C/C++ or Java.  Thanks in advance." />
  <row Id="12479" PostHistoryTypeId="1" PostId="6256" RevisionGUID="a04aa1dd-d56a-4d12-8b12-c968d7af8b48" CreationDate="2010-12-06T21:53:21.970" UserId="3843" Text="Any Open Source Games That Can Be Ported to Android?" />
  <row Id="12480" PostHistoryTypeId="3" PostId="6256" RevisionGUID="a04aa1dd-d56a-4d12-8b12-c968d7af8b48" CreationDate="2010-12-06T21:53:21.970" UserId="3843" Text="&lt;c++&gt;&lt;android&gt;&lt;open-source&gt;" />
  <row Id="12481" PostHistoryTypeId="2" PostId="6257" RevisionGUID="93c3292e-c460-4ca0-bfa4-7a3970cc5760" CreationDate="2010-12-06T22:15:42.150" UserDisplayName="Nils Roeder" Text="Personally I believe HTML5 to be downwards stable, i.e. what's there won't go again. Obviously no ones knows how all the unresolved issues will turn out in the end and yes, there might be features in the future that one should wait for, but it's already &quot;good enough&quot;. That's why i guess a lot of people are working on their own html5 game engine or towards that. At least I am :-)&#xD;&#xA;&#xD;&#xA;It does not have an isometric builder yet, but well, it does not stop you either.&#xD;&#xA;Tutorials will be added soonish, but mainly I am posting this cause I also listed all the other engines I found so far - here at the bottom&#xD;&#xA;http://blog.weeblog.net/?p=29" />
  <row Id="12482" PostHistoryTypeId="2" PostId="6258" RevisionGUID="7928243d-fc61-45c8-9330-8457bc0dfce7" CreationDate="2010-12-06T22:47:49.043" UserId="51" Text="Your best bet is probably &lt;a href=&quot;http://cubeengine.com/cube.php4&quot;&gt;cube&lt;/a&gt;.  It uses the zlib license.  It's been ported to pretty small platforms so running on an android device isn't out of the question." />
  <row Id="12483" PostHistoryTypeId="5" PostId="6191" RevisionGUID="a1839a99-916e-4df8-b4f8-cf149b06a4e9" CreationDate="2010-12-07T00:39:44.610" UserId="3787" Comment="Additional information and suggestion" Text="The question is not hard, I'm writing a game engine for 2D side scrolling games, however I'm thinking to my 2D side scrolling game and I always come up with the problem of &quot;how should I do collision with the ground&quot;.&#xD;&#xA;I think I couldn't handle the collision with ground (ground for me is &quot;where the player walk&quot;, so something heavily used) in a per-pixel way, and I can't even do it with simple shape comparison (because the ground can be tilted), so what's the correct way? I'know what tiles are and i've read about it, but how much should be big each tile to not appear like a stairs?Are there any other approach?&#xD;&#xA;&#xD;&#xA;I watched this game and is very nice how he walks on ground:&#xD;&#xA;http://www.youtube.com/watch?v=DmSAQwbbig8&amp;feature=player_embedded&#xD;&#xA;&#xD;&#xA;If there are &quot;platforms&quot; in mid air, how should I handle them?I can walk over them but I can't pass &quot;inside&quot;. Imagine a platform in mid air, it allows you to walk over it but limit you because you can't jump in the area she fits&#xD;&#xA;&#xD;&#xA;*Sorry for my english, it's not my native language and this topic has a lot of keywords I don't know so I have to use workarounds&#xD;&#xA;Thanks for any answer*&#xD;&#xA;&#xD;&#xA;**Additional informations and suggestions:**&#xD;&#xA;I'm doing a game course in this period and I asked them how to do this, they suggested me this approach (a QuadTree):&#xD;&#xA;-All map is divided into &quot;big nodes&quot;&#xD;&#xA;-Each bigger node has sub nodes, to find where the player is&#xD;&#xA;-You can find player's node with a ray on player position&#xD;&#xA;-When you find the node where the player is, you can do collision check through all pixels (which can be 100-200px nothing more)&#xD;&#xA;&#xD;&#xA;Here is an example, however i didn't show very well the bigger nodes because i'm not very good with photoshop :P&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;How is this approach?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/CUdRP.png" />
  <row Id="12484" PostHistoryTypeId="2" PostId="6259" RevisionGUID="b9af8b65-a7c1-4a0b-9956-1de8732bdbeb" CreationDate="2010-12-07T06:38:06.023" UserId="3326" Text="So I recently developed this game which I would like to launch into Facebook but am having a hard time figuring out how on earth do I get the basics right. Like extracting user data i.e friends playing the game. Compile a global leader board and such. Also I was wondering if I want to keep a live update on who has got the highest score on the leader board, how do I go about doing that!?&#xD;&#xA;&#xD;&#xA;Any suggestions and links to material explaining Facebook application integration for dummies will be a great help! Thanks..." />
  <row Id="12485" PostHistoryTypeId="1" PostId="6259" RevisionGUID="b9af8b65-a7c1-4a0b-9956-1de8732bdbeb" CreationDate="2010-12-07T06:38:06.023" UserId="3326" Text="Integration my application with Facebook." />
  <row Id="12486" PostHistoryTypeId="3" PostId="6259" RevisionGUID="b9af8b65-a7c1-4a0b-9956-1de8732bdbeb" CreationDate="2010-12-07T06:38:06.023" UserId="3326" Text="&lt;facebook&gt;&lt;leaderboards&gt;" />
  <row Id="12487" PostHistoryTypeId="2" PostId="6260" RevisionGUID="ee1f386e-a987-41d0-b30d-fb19682adf4c" CreationDate="2010-12-07T08:41:03.013" UserId="20" Text="I guess you probably know about the [Facebook API Documentation][1]. Other than that you can find various snippets and examples via Google but a lot of them still target the old Facebook API. Personally I found the API-Docs and the code-examples to be sufficient to get started, but this might vary depending on the programming-language you're going to use.&#xD;&#xA;&#xD;&#xA;Typically you would create a server application that provides the leaderboard and live-updates to your client apps. The server-app uses the Facebook API to get user data from Facebook.&#xD;&#xA;&#xD;&#xA;To get user data (like friends etc.) the user needs to grant your application permission to that data. You can find more information about authentication here: http://developers.facebook.com/docs/authentication/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developers.facebook.com/docs/" />
  <row Id="12488" PostHistoryTypeId="5" PostId="6260" RevisionGUID="aec982a9-3b7a-4a5b-a35c-6edc2807d27b" CreationDate="2010-12-07T08:47:46.880" UserId="20" Comment="added some links with further information" Text="I guess you probably know about the [Facebook API Documentation][1]. Other than that you can find various snippets and examples via Google but a lot of them still target the old Facebook API. Personally I found the API-Docs and the code-examples to be sufficient to get started, but this might vary depending on the programming-language you're going to use.&#xD;&#xA;&#xD;&#xA;Typically you would create a server application that provides the leaderboard and live-updates to your client apps. The server-app uses the Facebook API to get user data from Facebook.&#xD;&#xA;&#xD;&#xA;To get user data (like friends etc.) the user needs to grant your application permission to that data. You can find more information about authentication here: http://developers.facebook.com/docs/authentication/&#xD;&#xA;&#xD;&#xA;**Update:** These links might also help you getting started. They target the iPhone, but should give you an overview nevertheless: [Using the FB Graph API][2], [Getting the users profile][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developers.facebook.com/docs/&#xD;&#xA;  [2]:  http://www.raywenderlich.com/1488/how-to-use-facebooks-new-graph-api-from-your-iphone-app&#xD;&#xA;  [3]: http://www.raywenderlich.com/1578/how-to-get-a-user-profile-with-facebooks-new-graph-api-from-your-iphone-app" />
  <row Id="12489" PostHistoryTypeId="2" PostId="6261" RevisionGUID="94636cfc-46d2-4b11-8854-df19b633fef1" CreationDate="2010-12-07T09:29:08.657" UserId="3326" Text="Try basic canvas libraries if you are looking to develop just 2D games. I actually learn't to use 2D canvas by building a game on it right about the time this question was posted :) Now I am graduating to webGL." />
  <row Id="12490" PostHistoryTypeId="2" PostId="6262" RevisionGUID="3d54115a-54c6-4c03-b918-29e4da66ad1f" CreationDate="2010-12-07T09:37:46.347" UserId="3817" Text="I am programming a strategic game using Flash. The game works very similar to the famous game &quot;Travian&quot;. &#xD;&#xA;&#xD;&#xA;My problem is as fallow. I am trying to make the calculation of the troops lost as a result of fight between to armies. The two armies have different types of units. Some of them are stronger against some other units and weaker against other types. &#xD;&#xA;&#xD;&#xA;How can I put that effect of this differences in the equation of the fight?&#xD;&#xA;&#xD;&#xA;It seems to be easy if they only have att and def points only, but when its come to the units type dependency, I am lost. " />
  <row Id="12491" PostHistoryTypeId="1" PostId="6262" RevisionGUID="3d54115a-54c6-4c03-b918-29e4da66ad1f" CreationDate="2010-12-07T09:37:46.347" UserId="3817" Text="Tow armies fight " />
  <row Id="12492" PostHistoryTypeId="3" PostId="6262" RevisionGUID="3d54115a-54c6-4c03-b918-29e4da66ad1f" CreationDate="2010-12-07T09:37:46.347" UserId="3817" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;math&gt;&lt;multiplayer&gt;" />
  <row Id="12493" PostHistoryTypeId="2" PostId="6263" RevisionGUID="0cac7a27-2561-4a71-bed5-389f0e933b80" CreationDate="2010-12-07T10:00:43.460" UserId="2091" Text="Not exactly intended for games, but [Processing][1] is quite popular for 2D canvas graphics, it might be interesting to check.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://processing.org/" />
  <row Id="12494" PostHistoryTypeId="2" PostId="6264" RevisionGUID="be756adc-95d8-4e66-a3fe-e7dac9ad73fd" CreationDate="2010-12-07T11:17:01.457" UserId="2050" Text="I tend to say ' if you can't find an explicit solution, seek an implicit one'.&#xD;&#xA;You could simulate the battle internally until one army is wiped out or retreats(depending on your game's possible outcomes).&#xD;&#xA;&#xD;&#xA;I'd use something like this: &#xD;&#xA;&#xD;&#xA;For each iteration of the battle, all units are opportunistic, so they try to do the most damage they can. Each unit selects an enemy unit it is going to attack this round, based on the known advantages/ disadvantages.&#xD;&#xA;&#xD;&#xA;Then, all subfights are performed. An example:&#xD;&#xA;&#xD;&#xA;Let spearmen be effective against cavalary, cavalaray effective against archers and archers effective against spearman.&#xD;&#xA;&#xD;&#xA;In a fight between two armies consisting both of al types of these basic units, all spearman would attack cavalery, all cavalery units would attack archers and all archers would attack spearmen. If for example one side had no archers, the other sides cavalery would select the next best type of target (being the enemy cavalery units)&#xD;&#xA;&#xD;&#xA;Each unit-attacks-unit event is resolved seperatly, with the losing unit being damaged or marked as destroyed.&#xD;&#xA;&#xD;&#xA;After all the individual fights have been resolved, remove all units which have been critically damged or destroyed.&#xD;&#xA;&#xD;&#xA;The next iteration starts using the now reduced armies. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12495" PostHistoryTypeId="2" PostId="6265" RevisionGUID="a401599a-aea6-45c9-9983-6b5ce42d0660" CreationDate="2010-12-07T12:40:20.730" UserId="1868" Text="This page has some basic functionality explained with PHP server side. Most likely you want to rewrite those PHP scripts as they seem to be open for SQL-injections.&#xD;&#xA;&#xD;&#xA;http://ideveloper.kodingen.com/2010/facebook-friends-leaderboard/" />
  <row Id="12496" PostHistoryTypeId="2" PostId="6266" RevisionGUID="e064b912-d206-4a15-97ae-17824e33eb7d" CreationDate="2010-12-07T13:24:30.570" UserId="364" Text="Most strategy games have fixed units and possible behaviours.&#xD;&#xA;&#xD;&#xA;However, think of a game like Magic The Gathering : each card is a set of rules.&#xD;&#xA;Regularly, new sets of card types are created.&#xD;&#xA;&#xD;&#xA;I remember that the firsts editions of the game have been said to be prohibited in official tournaments because the cards were often too powerful.&#xD;&#xA;Later extensions of the game provided more subtile effects/rules in cards and they managed to balance the game apparently effectively, even if there is thousands of different cards possible.&#xD;&#xA;&#xD;&#xA;I'm working on a strategy game that is a bit in the same position : every units are provided by extensions and the game is thought to be extended for some years, at least. The effects variety of the units are very large even with some basic design limitations set to be sure it's manageable.&#xD;&#xA;&#xD;&#xA;Each player choose a set of units to play with (defining their global strategy) before playing (like chooseing a themed deck of Magic cards).&#xD;&#xA;As it's a strategy game (you can think of Magic as a strategy game too in some POV), it's essentially skirmish based so the game have to be fair, even if the players don't choose the same units before starting to play.&#xD;&#xA;&#xD;&#xA;**So, how do you proceed to balance this type of non-symetric (strategy) game when you know it will always be extended?**&#xD;&#xA;&#xD;&#xA;For the moment, I'm trying to apply those rules but I'm not sure it's right because I don't have enough design experience to know :&#xD;&#xA;&#xD;&#xA; - each unit would provide one unique effect;&#xD;&#xA; - each unit should have an opposite unit that have an opposite effect that would cancel each others;&#xD;&#xA; - some limitations based on the gameplay;&#xD;&#xA; - try to get a lot of beta tests before each extension release?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Looks like I'm in the most complex case?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12497" PostHistoryTypeId="1" PostId="6266" RevisionGUID="e064b912-d206-4a15-97ae-17824e33eb7d" CreationDate="2010-12-07T13:24:30.570" UserId="364" Text="How to balance a non-symetric &quot;extension&quot; based game?" />
  <row Id="12498" PostHistoryTypeId="3" PostId="6266" RevisionGUID="e064b912-d206-4a15-97ae-17824e33eb7d" CreationDate="2010-12-07T13:24:30.570" UserId="364" Text="&lt;balance&gt;&lt;extension&gt;&lt;strategy&gt;" />
  <row Id="12499" PostHistoryTypeId="2" PostId="6267" RevisionGUID="36854dd5-6b65-4bac-bc36-27109891f709" CreationDate="2010-12-07T13:57:47.437" UserId="3853" Text="I am searching for a tool that will help in writing a game script. By &quot;script&quot; I mean the text core of a storyboard - without the drawing drafts, which may or may not be there (yet).&#xD;&#xA;&#xD;&#xA;What I'm thinking of will let write a piece of text of the script, define a simplified workflow from that step, and then define the text of next steps, and so on.&#xD;&#xA;&#xD;&#xA;Searching online, I found Inform [http://inform7.com/][1] (&quot;A Design System for Interactive Fiction Based on Natural Language&quot;) which in theory is exactly what I am searching for, but trying to use it it has this model of a space (a dungeon, a library) where you are picking up objects and exploring them. In my case I am designing more a Sims like game, the flow is entirely different.&#xD;&#xA;&#xD;&#xA;Considering non specific software, mind mapping tools miss the linearity of the process. What I am writing is a directed graph - simply a work-flow, but the way I want to design it is more text based than work-flow based.&#xD;&#xA;&#xD;&#xA;SO what I'm doing now is using a text editor, which I'll transform directly in code. &#xD;&#xA;&#xD;&#xA;Any suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://inform7.com/" />
  <row Id="12500" PostHistoryTypeId="1" PostId="6267" RevisionGUID="36854dd5-6b65-4bac-bc36-27109891f709" CreationDate="2010-12-07T13:57:47.437" UserId="3853" Text="Tools for game script / storyboard" />
  <row Id="12501" PostHistoryTypeId="3" PostId="6267" RevisionGUID="36854dd5-6b65-4bac-bc36-27109891f709" CreationDate="2010-12-07T13:57:47.437" UserId="3853" Text="&lt;tools&gt;" />
  <row Id="12502" PostHistoryTypeId="2" PostId="6268" RevisionGUID="082fc332-307e-4d08-8b83-03bcb66cf690" CreationDate="2010-12-07T14:28:10.940" UserId="3854" Text="Greetings&#xD;&#xA;&#xD;&#xA;I'm in the process of making a Scoreboard for a game (Starcraft II). This scoreboard is being made as a WPF Application with a C# code-behind. I already have a version which works for 90% in WinForms but I lacked the support to easily make it look a lot nicer which are available in WPF.&#xD;&#xA;&#xD;&#xA;The point of this application will be to form a kind of overlay on top of a running game. &#xD;&#xA;In this overlay people can see the Score, Map, Players, Colors, etc. Basically all the info they need.&#xD;&#xA;&#xD;&#xA;Since the main look of the app in WPF is based on an image with a transparent background I have set most Background values to Transparent. However when I do this the entire application does not get registered by streaming software. For example it just shows my Desktop or the game I'm playing but not my application even though it IS there. I can see it with my own eyes but the audience on the stream cannot.&#xD;&#xA;&#xD;&#xA;Does anyone have any experience with this matter because it's really doing my head in. My entire application will be useless if it is not visible on streams. If I have to put the background on a color rather than transparent the UI will be completely demolished as well in terms of looks.&#xD;&#xA;&#xD;&#xA;I'm basically trying to make a game-overlay in C# &amp; WPF which is able to update with little hassle for the viewer. I have little to no knowledge regarding C++ and DirectX so I would not know where to start in that regard. This project currently holds 1 Developer and 1 Graphic Designer so it isn't a big scaled project, it will also be distributed for free once/if it gets finished. Any tips are welcome!&#xD;&#xA;&#xD;&#xA;Thank you for your time reading and your possible insights." />
  <row Id="12503" PostHistoryTypeId="1" PostId="6268" RevisionGUID="082fc332-307e-4d08-8b83-03bcb66cf690" CreationDate="2010-12-07T14:28:10.940" UserId="3854" Text="WPF &amp; C# - Game Overlay + Streaming" />
  <row Id="12504" PostHistoryTypeId="3" PostId="6268" RevisionGUID="082fc332-307e-4d08-8b83-03bcb66cf690" CreationDate="2010-12-07T14:28:10.940" UserId="3854" Text="&lt;c#&gt;&lt;pc&gt;&lt;wpf&gt;" />
  <row Id="12505" PostHistoryTypeId="16" PostId="2912" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-07T15:09:06.170" UserId="51" />
  <row Id="12506" PostHistoryTypeId="16" PostId="2915" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-07T15:09:06.170" UserId="51" />
  <row Id="12507" PostHistoryTypeId="16" PostId="3602" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-07T15:09:06.170" UserId="51" />
  <row Id="12508" PostHistoryTypeId="16" PostId="6261" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-07T15:09:06.170" UserId="51" />
  <row Id="12509" PostHistoryTypeId="16" PostId="6263" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-07T15:09:06.170" UserId="51" />
  <row Id="12510" PostHistoryTypeId="16" PostId="2911" RevisionGUID="00000000-0000-0000-0000-000000000000" CreationDate="2010-12-07T15:09:06.170" UserId="51" />
  <row Id="12511" PostHistoryTypeId="5" PostId="6266" RevisionGUID="d0f2e00b-8726-4408-808e-b4de9fd5c6ff" CreationDate="2010-12-07T15:10:50.163" UserId="51" Comment="edited body; edited title" Text="Most strategy games have fixed units and possible behaviours.&#xD;&#xA;&#xD;&#xA;However, think of a game like Magic The Gathering : each card is a set of rules.&#xD;&#xA;Regularly, new sets of card types are created.&#xD;&#xA;&#xD;&#xA;I remember that the firsts editions of the game have been said to be prohibited in official tournaments because the cards were often too powerful.&#xD;&#xA;Later extensions of the game provided more subtle effects/rules in cards and they managed to balance the game apparently effectively, even if there is thousands of different cards possible.&#xD;&#xA;&#xD;&#xA;I'm working on a strategy game that is a bit in the same position : every units are provided by extensions and the game is thought to be extended for some years, at least. The effects variety of the units are very large even with some basic design limitations set to be sure it's manageable.&#xD;&#xA;&#xD;&#xA;Each player choose a set of units to play with (defining their global strategy) before playing (like chooseing a themed deck of Magic cards).&#xD;&#xA;As it's a strategy game (you can think of Magic as a strategy game too in some POV), it's essentially skirmish based so the game have to be fair, even if the players don't choose the same units before starting to play.&#xD;&#xA;&#xD;&#xA;**So, how do you proceed to balance this type of non-symmetric (strategy) game when you know it will always be extended?**&#xD;&#xA;&#xD;&#xA;For the moment, I'm trying to apply those rules but I'm not sure it's right because I don't have enough design experience to know :&#xD;&#xA;&#xD;&#xA; - each unit would provide one unique effect;&#xD;&#xA; - each unit should have an opposite unit that have an opposite effect that would cancel each others;&#xD;&#xA; - some limitations based on the gameplay;&#xD;&#xA; - try to get a lot of beta tests before each extension release?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Looks like I'm in the most complex case?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12512" PostHistoryTypeId="4" PostId="6266" RevisionGUID="d0f2e00b-8726-4408-808e-b4de9fd5c6ff" CreationDate="2010-12-07T15:10:50.163" UserId="51" Comment="edited body; edited title" Text="How to balance a non-symmetric &quot;extension&quot; based game?" />
  <row Id="12513" PostHistoryTypeId="2" PostId="6269" RevisionGUID="7e00701f-4200-4599-a866-9a9c4dbcc28a" CreationDate="2010-12-07T15:17:27.550" UserId="51" Text="I'd throw away the first two of your bullet points.  It might be a good idea to get some units designed, but isn't going to really help you for balancing.&#xD;&#xA;&#xD;&#xA;Really what you're going to have to do is just play the game a lot and keep a analytical mind (or set of minds) looking at the problem at all times.  Design is a very soft art, there is no iterative way of saying whether or not a game is balanced.&#xD;&#xA;&#xD;&#xA;On the other hand, these are the kinds of things genetic algorithms are pretty good at weeding out.  It won't replace having a large beta test and human feedback, but it might catch some edge cases you won't normally think of.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Speaking of Magic, here are som other things it does to help its balancing&#xD;&#xA;&#xD;&#xA;* Cost based balancing.  You may get some cards, but playing them or using their abilities requires a tweakable amount of mana&#xD;&#xA;* The luck of the draw.  You don't start with your perfect set of 7 cards, and you can have at max 4 of the same card in your deck (sometimes less depending on the card).  Keeps people honest.&#xD;&#xA;* General purpose counters.  Even if you can't fight a unit or ability directly, you might be able to use your finite resources to prevent something from happening against you in the first place.&#xD;&#xA;* Constantly updating ruleset.  You might want to go ahead and implement some kind of extensible rule system to ban or limit certain units&#xD;&#xA;" />
  <row Id="12514" PostHistoryTypeId="5" PostId="6262" RevisionGUID="4b5dc587-e51c-4e13-9a18-676c6f6fcf99" CreationDate="2010-12-07T15:18:48.173" UserId="51" Comment="deleted 3 characters in body; edited title" Text="I am programming a strategic game using Flash. The game works very similar to the famous game &quot;Travian&quot;. &#xD;&#xA;&#xD;&#xA;My problem is as follows: I am trying to make the calculation of the troops lost as a result of a fight between two armies. The two armies have different types of units. Some of them are stronger against some other units and weaker against other types. &#xD;&#xA;&#xD;&#xA;How can I put that effect of this differences in the equation of the fight?&#xD;&#xA;&#xD;&#xA;It seems to be easy if they only have att and def points only, but when it comse to the units type dependency, I am lost. " />
  <row Id="12515" PostHistoryTypeId="4" PostId="6262" RevisionGUID="4b5dc587-e51c-4e13-9a18-676c6f6fcf99" CreationDate="2010-12-07T15:18:48.173" UserId="51" Comment="deleted 3 characters in body; edited title" Text="Calculating the output of two armies fighting" />
  <row Id="12516" PostHistoryTypeId="2" PostId="6270" RevisionGUID="4a980754-cf1e-4d8d-a085-5e88a9e2a09c" CreationDate="2010-12-07T16:04:04.843" UserId="2472" Text="For Solar Realms Elite I was inspired by [Lancaster's Equations for modeling warfare][1]. I had several simultaneous fights in each round of battle.&#xD;&#xA;&#xD;&#xA;In the first fight, everyone attacked soldiers. In SRE soldiers are best against soldiers (it's not rock paper scissors, but infantry, air attack, and deep space). I set up an attack and defense power where soldiers had the best attack:&#xD;&#xA;&#xD;&#xA;    attack_strength = 3*soldiers + 1*fighters + 2*cruisers&#xD;&#xA;    defense_strength = 10*soldiers&#xD;&#xA;&#xD;&#xA;In the second fight, everyone attacked the defense stations. In SRE fighters (air) are best against defense stations (e.g. anti-aircraft):&#xD;&#xA;&#xD;&#xA;    attack_strength = 1*soldiers + 4*fighters + 2*cruisers&#xD;&#xA;    defense_strength = 25*defense_stations&#xD;&#xA;&#xD;&#xA;In the third fight, everyone attacked the heavy cruisers. In SRE heavy cruisers are in space and are best against other heavy cruisers:&#xD;&#xA;&#xD;&#xA;    attack_strength = 1*soldiers + 1*fighters + 10*cruisers&#xD;&#xA;    defense_strength = 15*cruisers&#xD;&#xA;&#xD;&#xA;(I don't remember what constants I used; those are just examples.) In each round of battle the attackers would lose some fraction of the defense strength and the defenders would lose some fraction of the attack strength. I believe this corresponds to Lancaster's Square Law (equations [here][2]). I had added randomness but I don't remember exactly where. After each round of battle the armies would be smaller. I put a maximum limit on the number of rounds; after that, the losing side would retreat.&#xD;&#xA;&#xD;&#xA;It wasn't realistic to have the infantry on the ground firing way into deep space, but it worked better for gameplay reasons to have all units be able to fight all other units (at reduced effectiveness).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Lanchester%27s_laws&#xD;&#xA;  [2]: http://www.rand.org/pubs/monograph_reports/MR638/app.html" />
  <row Id="12517" PostHistoryTypeId="5" PostId="6270" RevisionGUID="3cdf2975-7af8-4324-8345-5d364964edf3" CreationDate="2010-12-07T16:35:26.033" UserId="1101" Comment="Just changed 'Lancaster' to 'Lanchester'" Text="For Solar Realms Elite I was inspired by [Lanchester's Equations for modeling warfare][1]. I had several simultaneous fights in each round of battle.&#xD;&#xA;&#xD;&#xA;In the first fight, everyone attacked soldiers. In SRE soldiers are best against soldiers (it's not rock paper scissors, but infantry, air attack, and deep space). I set up an attack and defense power where soldiers had the best attack:&#xD;&#xA;&#xD;&#xA;    attack_strength = 3*soldiers + 1*fighters + 2*cruisers&#xD;&#xA;    defense_strength = 10*soldiers&#xD;&#xA;&#xD;&#xA;In the second fight, everyone attacked the defense stations. In SRE fighters (air) are best against defense stations (e.g. anti-aircraft):&#xD;&#xA;&#xD;&#xA;    attack_strength = 1*soldiers + 4*fighters + 2*cruisers&#xD;&#xA;    defense_strength = 25*defense_stations&#xD;&#xA;&#xD;&#xA;In the third fight, everyone attacked the heavy cruisers. In SRE heavy cruisers are in space and are best against other heavy cruisers:&#xD;&#xA;&#xD;&#xA;    attack_strength = 1*soldiers + 1*fighters + 10*cruisers&#xD;&#xA;    defense_strength = 15*cruisers&#xD;&#xA;&#xD;&#xA;(I don't remember what constants I used; those are just examples.) In each round of battle the attackers would lose some fraction of the defense strength and the defenders would lose some fraction of the attack strength. I believe this corresponds to Lancaster's Square Law (equations [here][2]). I had added randomness but I don't remember exactly where. After each round of battle the armies would be smaller. I put a maximum limit on the number of rounds; after that, the losing side would retreat.&#xD;&#xA;&#xD;&#xA;It wasn't realistic to have the infantry on the ground firing way into deep space, but it worked better for gameplay reasons to have all units be able to fight all other units (at reduced effectiveness).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Lanchester%27s_laws&#xD;&#xA;  [2]: http://www.rand.org/pubs/monograph_reports/MR638/app.html" />
  <row Id="12518" PostHistoryTypeId="2" PostId="6271" RevisionGUID="aee8c47a-2657-4230-9e06-5c796b39aa5e" CreationDate="2010-12-07T16:47:28.813" UserId="1156" Text="I googled 'directed graph software', but most of them seemed to work from C++ or Java, and not exactly what you wanted, which I'm taking is a script/storyboard tool for a non-programmer. &#xD;&#xA;&#xD;&#xA;[Graphiz][1] seems like it would work well with what you want:&#xD;&#xA;&#xD;&#xA;&gt; The Graphviz layout programs take descriptions of graphs in a simple text language, and make diagrams in several useful formats such as images and SVG for web pages, Postscript for inclusion in PDF or other documents; or display in an interactive graph browser. (Graphviz also supports GXL, an XML dialect.)&#xD;&#xA;&#xD;&#xA;You could still write your scripts into text files (use the nicest processor you can find, Notepad++ maybe?) and then export them into a format you and any future co-workers would be able to digest and scan easily.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.graphviz.org/" />
  <row Id="12519" PostHistoryTypeId="6" PostId="6267" RevisionGUID="a9a7823f-67cd-4306-8326-37f7fcca9cad" CreationDate="2010-12-07T16:47:43.917" UserId="1156" Comment="edited tags" Text="&lt;tools&gt;&lt;storyboard&gt;" />
  <row Id="12520" PostHistoryTypeId="2" PostId="6272" RevisionGUID="32498775-e62c-4dae-8bd9-ec1c7adb6bef" CreationDate="2010-12-07T16:49:10.420" UserId="1101" Text="In addition to supporting Amit's suggestion of looking at the Lanchester equations, I just want to add that this is a game design decision, not an empirical fact that we can give you. If you want to take unit type into account, you have to decide what that means. This means choosing an equation that includes all the factors that you want your gameplay to include. If you want infantry to be better than cavalry, then you have to decide what that should mean - eg. how many cavalry do you need to equal 100 infantry? And does it matter who attacks who? You seem to be implying that simply giving infantry and cavalry different attack and defence values isn't good enough - why is that? What else are you trying to represent that can't be captured just by those values?&#xD;&#xA;&#xD;&#xA;You have to decide which factors you want to model in your game, as they affect the way the players will approach it. These might include unit size/quantity, unit type, unit experience (eg. veteran status), terrain and environmental effects, differences between attacking and defending if any, whether to model damage and attrition or not, whether to model the passage of time during the combat, the ability to withdraw or flee (possibly including modelling of morale), how much randomness you want in the equation, and so on.&#xD;&#xA;&#xD;&#xA;Once you know all this, there are several basic mathematical approaches you can take. You could do a round by round &quot;chance to hit&quot; system like many RPGs have, eg. the d20 combat system. You could do a one-round &quot;attack vs defence&quot; weighted coin toss system like the original Civilisation game does. You could have each side generate a score by adding attributes to a random number and whoever gets the highest value wins. And you can permute these systems to work on a round-by-round basis, or to deduct hit points or morale points, or whatever. Any system can work, but you have to balance it the way you want it to play. As ultimately the choice of how to model the combat is a key part of the game design, and is not something other people can just give to you. " />
  <row Id="12521" PostHistoryTypeId="2" PostId="6273" RevisionGUID="0a865742-59f1-4340-a052-4509e2c3a5c5" CreationDate="2010-12-07T17:20:20.270" UserId="1101" Text="Actually, M:tG has gone through ups and downs where some expansions were overpowered and some were underpowered. For example, most of the expansions around 3rd and 4th edition were fine but the Tempest expansion made a lot of earlier cards redundant. Maybe they're more careful now but they were still making significant balance 'mistakes' (or deliberate changes to encourage card purchases, if you're cynical) quite some way into the cycle.&#xD;&#xA;&#xD;&#xA;The key thing here is to watch for obsolescence. If 2 objects have the same effect but one costs less than the other, the more expensive one is 'dominated' in game theory terms and thus worthless. To prevent domination of one object or strategy over another, each needs to have a situation where it is worthwhile. For example, one unit might be stronger than a second at the same price, but maybe the second has an extra ability, or more subtly, maybe the second can be used in conjunction with a third in a way that the first cannot.&#xD;&#xA;&#xD;&#xA;Often people suggest some sort of 'rock/paper/scissors' approach here, but beware - although this does mean that no strategy dominates the others, it also means that no strategy has any particularly interesting features either. M:tG improved on RPS by having qualitatively different approaches for each of the 5 colours instead of the typical circular relationship of X beats Y, Y beats Z, Z beats X, etc.&#xD;&#xA;&#xD;&#xA;So it's usually easy to ensure that none of your objects are completely dominated and worthless. But it doesn't necessarily mean that they are going to be judged as 'balanced', especially if the situations where they shine are quite limited. To do this, you probably need to ensure that you understand each of these potential situations. In M:tG, at least back when I played, you had a few standard types of strategy: direct damage, lots of small creatures/speed, a few large creatures, control/countermagic, etc. If you have a list of strategies like this, it is possible to see how each of your game objects might fit into one or more of them. eg. A medium-sized creature of average cost is not interesting for the two creature-based strategies above, but if it happened to use the same resources as the direct damage or countermagic approaches did, it would help round out that strategy.&#xD;&#xA;&#xD;&#xA;Testing is a good idea. But player-driven beta tests should be your last resort of testing, not your main method. Firstly, you should be numerically analysing your game objects. You control the rules, so you can know exactly how many resources are available and therefore how quickly attacks can be launched, etc. You can work out maximum bounds and averages for these, compare them between strategies, and adjust objects to reduce massive disparities.&#xD;&#xA;&#xD;&#xA;Secondly, from a very early stage you should have AI systems that are able to play many games against each other at a rapid speed and learn from their mistakes. You can start them with strategies the designers devised, or have them pick random ones, and evolve between them by seeing what works and what doesn't. Leave them grinding overnight, gather the statistics, and see what they're telling you. You'll probably find they converge on one or two strategies that always win, which gives you something to adjust." />
  <row Id="12522" PostHistoryTypeId="2" PostId="6274" RevisionGUID="2f66b082-c99a-4278-ba8a-d997f67866e6" CreationDate="2010-12-07T17:46:03.957" UserId="3857" Text="I need to display, rotate, and zoom a 3D model in OpenGL ES (iPhone/iPad).  The 3D graphic artists are using Maya (on OS/X).  What export format should I be looking at to use their 3D models in the app?&#xD;&#xA;&#xD;&#xA;Also, a number of Maya plug-ins don't work on the Mac (apparently it doesn't handle plug-ins the same way as Windows and Linux), so I may need an external tool to handle the conversion.&#xD;&#xA;&#xD;&#xA;I'm still learning my way around the 3D dev-world, so any advice is appreciated.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="12523" PostHistoryTypeId="1" PostId="6274" RevisionGUID="2f66b082-c99a-4278-ba8a-d997f67866e6" CreationDate="2010-12-07T17:46:03.957" UserId="3857" Text="Maya 3D model to iOS OpenGL ES" />
  <row Id="12524" PostHistoryTypeId="3" PostId="6274" RevisionGUID="2f66b082-c99a-4278-ba8a-d997f67866e6" CreationDate="2010-12-07T17:46:03.957" UserId="3857" Text="&lt;3d&gt;&lt;opengl-es&gt;&lt;ipad&gt;" />
  <row Id="12525" PostHistoryTypeId="2" PostId="6275" RevisionGUID="830ec8df-9e4b-4363-bf43-d6f46d5c2179" CreationDate="2010-12-07T17:55:28.450" UserId="962" Text="It seems like you:&#xD;&#xA;&#xD;&#xA;&gt; You can pick a format you want to&#xD;&#xA;&gt; support then write a loader for the&#xD;&#xA;&gt; model.&#xD;&#xA;&#xD;&#xA;I found a forum page where someone wrote an .obj loader.&#xD;&#xA;&#xD;&#xA;http://www.iphonedevsdk.com/forum/iphone-sdk-game-development/4696-working-maya-models-iphone.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12526" PostHistoryTypeId="2" PostId="6276" RevisionGUID="ed095324-9e1c-4bd6-9d94-cc7ad5a646b5" CreationDate="2010-12-07T19:36:50.627" UserId="962" Text="I know there is Unity, and XNA that both use C#, but I am don't know what else I could use.&#xD;&#xA;&#xD;&#xA;The reason I say C# is that the syntax and style is similar to AS3, which I am familiar with, and I want to choose the correct framework to start learning with.&#xD;&#xA;&#xD;&#xA;**What should I use to be able to do the most possible bit-blit(direct pixel copy) objects per frame.**" />
  <row Id="12527" PostHistoryTypeId="1" PostId="6276" RevisionGUID="ed095324-9e1c-4bd6-9d94-cc7ad5a646b5" CreationDate="2010-12-07T19:36:50.627" UserId="962" Text="Fastest bit-blit in C# ?" />
  <row Id="12528" PostHistoryTypeId="3" PostId="6276" RevisionGUID="ed095324-9e1c-4bd6-9d94-cc7ad5a646b5" CreationDate="2010-12-07T19:36:50.627" UserId="962" Text="&lt;c#&gt;&lt;actionscript-3&gt;&lt;bit-blit&gt;" />
  <row Id="12529" PostHistoryTypeId="2" PostId="6277" RevisionGUID="e381b981-e0c4-488e-88a5-87790bd38315" CreationDate="2010-12-07T19:58:04.237" UserId="1156" Text="One thing to know about OpenGL is that it doesn't have native model loaders. That is, there is no glLoadModel() function or similar. Instead, you must either use an existing loader that converts the coords into something OpenGL can read. It doesn't really matter what you use as a format, but .obj is probably the simplest and most popular to go with.&#xD;&#xA;&#xD;&#xA;[The wavefront .obj loader][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://iphonedevelopment.blogspot.com/2009/03/wavefront-obj-loader-open-sourced-to.html&#xD;&#xA;  [2]: http://stackoverflow.com/questions/413919/want-to-display-a-3d-model-on-the-iphone-how-to-get-started" />
  <row Id="12530" PostHistoryTypeId="2" PostId="6278" RevisionGUID="a54be495-b95c-4495-9d81-21aaaf9ec578" CreationDate="2010-12-07T20:23:17.760" UserId="141" Text="This is just my opinion, but performance-wise, it shouldn't matter. Pick the framework most comfortable to you. It will save you a lot of pain in the long run. Not only that, but any decent framework should be performant enough for your needs. If you try one framework and it can't reach 60 fps, then either your code is terrible, or the framework is. If it's you (more likely) then no framework will fix it for you. If it's the framework, then it's junk and shouldn't have been on your list anyway.&#xD;&#xA;&#xD;&#xA;If you actually are in a situation where performance is critical, for example you are doing far more operations than normal, then you probably shouldn't be looking at C# as a language anyway (unless you've already mastered the garbage collector.)" />
  <row Id="12531" PostHistoryTypeId="5" PostId="6276" RevisionGUID="384039a3-6be3-43a2-87f6-e868823fa48b" CreationDate="2010-12-07T20:38:14.450" UserId="962" Comment="added more detail" Text="I know there is Unity, and XNA that both use C#, but I am don't know what else I could use.&#xD;&#xA;&#xD;&#xA;The reason I say C# is that the syntax and style is similar to AS3, which I am familiar with, and I want to choose the correct framework to start learning with.&#xD;&#xA;&#xD;&#xA;**What should I use to be able to do the most possible bit-blit(direct pixel copy) objects per frame.**&#xD;&#xA;&#xD;&#xA;*EDIT: I should not need to add this, but I am looking for the most possible amount of objects per frame because I am making a few Bullet-Hell SHMUPS. I need thousands and thousands of bullets, particles, and hundreds of enemies on the screen at once. I am looking for a solution to do as many bit-blit operations per frame, I am not looking for a general purpose engine.*" />
  <row Id="12532" PostHistoryTypeId="2" PostId="6279" RevisionGUID="c2a3b412-3008-4fa4-bf50-267986bf3457" CreationDate="2010-12-07T21:18:02.420" UserId="3861" Text="I'm currently learning OpenGL and haven't been able to find an answer to this question.&#xD;&#xA;&#xD;&#xA;After the projection matrix is applied to the view space, the view space is &quot;normalized&quot; so that all the points lie within the range [-1, 1]. This is generally referred to as the &quot;canonical view volume&quot; or &quot;normalized device coordinates&quot;. &#xD;&#xA;&#xD;&#xA;While I've found plenty of resources telling me about how this happens, I haven't seen anything about _why_ it happens.&#xD;&#xA;&#xD;&#xA;What is the purpose of this step?" />
  <row Id="12533" PostHistoryTypeId="1" PostId="6279" RevisionGUID="c2a3b412-3008-4fa4-bf50-267986bf3457" CreationDate="2010-12-07T21:18:02.420" UserId="3861" Text="What is the purpose of the canonical view volume?" />
  <row Id="12534" PostHistoryTypeId="3" PostId="6279" RevisionGUID="c2a3b412-3008-4fa4-bf50-267986bf3457" CreationDate="2010-12-07T21:18:02.420" UserId="3861" Text="&lt;opengl&gt;&lt;math&gt;" />
  <row Id="12535" PostHistoryTypeId="5" PostId="6276" RevisionGUID="b97fea50-f1db-4b6d-bb41-66b7d4043825" CreationDate="2010-12-07T21:28:42.983" UserId="962" Comment="added 145 characters in body" Text="I know there is Unity, and XNA that both use C#, but I am don't know what else I could use.&#xD;&#xA;&#xD;&#xA;The reason I say C# is that the syntax and style is similar to AS3, which I am familiar with, and I want to choose the correct framework to start learning with.&#xD;&#xA;&#xD;&#xA;**What should I use to be able to do the most possible bit-blit(direct pixel copy) objects per frame.**&#xD;&#xA;&#xD;&#xA;*EDIT: I should not need to add this, but I am looking for the most possible amount of objects per frame because I am making a few Bullet-Hell SHMUPS. I need thousands and thousands of bullets, particles, and hundreds of enemies on the screen at once. I am looking for a solution to do as many bit-blit operations per frame, I am not looking for a general purpose engine.*&#xD;&#xA;&#xD;&#xA;EDIT2: I want bit-blitting because I do not want to exclude people who have lower end video cards but a fast processor from playing my games." />
  <row Id="12536" PostHistoryTypeId="2" PostId="6280" RevisionGUID="f21cdffd-dab4-4088-a746-06964c31b7af" CreationDate="2010-12-07T21:41:34.453" UserId="744" Text="&lt;a href=&quot;http://en.wikipedia.org/wiki/Quake_2&quot;&gt;Quake 2&lt;/a&gt; is recognized as one of the first games to really ask gamers for hardware accelerated video cards. It came out in 1997. A process from that time would be a Pentium 2, 233-300 MHz or so. If you're targeting video cards that old, you're targeting CPUs at least that old. I'm not even sure anyone bothered to make an AGP card that doesn't support OpenGL 1.&#xD;&#xA;&#xD;&#xA;No one has fast CPUs and &quot;slow&quot;, in the sense you mean, GPUs. Generally speaking, since 1997, you can rely on people to have fast enough GPUs to run nearly anything 2D, especially if you state-sort cleverly. You cannot rely on them to have a fast clock or enough cache or shallow pipelines, which are what make CPUs fast enough to support languages like C# today. You're more likely to find an early NetBurst chipset with a useless amount of cache and only 512MB RAM than an unaccelerated GPU in the wild.&#xD;&#xA;&#xD;&#xA;Some modern GPUs are slow, relatively, like the integrated Intel chipsets. Some are feature poor, like the integrated Intel chipsets. Those still have an OpenGL 1 fixed function pipeline, and it's still orders of magnitude faster than building up a scene pixel by pixel on the CPU in RAM _in C_.&#xD;&#xA;&#xD;&#xA;Trying to blit with a managed language, on modern computers, is insanity." />
  <row Id="12537" PostHistoryTypeId="2" PostId="6281" RevisionGUID="a2f6f7f4-97a8-41ac-a30d-881b4c1e66d4" CreationDate="2010-12-07T21:46:58.823" UserId="3863" Text="Why do some apps, like Angry Birds, dominate the market while other cool/fun/addicting apps are never heard of?&#xD;&#xA;&#xD;&#xA;I'm trying to figure out the best marketing strategy, or best way to sell an app to mass market.&#xD;&#xA;&#xD;&#xA;Does anybody have any ideas or things they noticed about the marketing of major blockbuster apps, like Angry Birds, why they get so popular and stay at the top of charts.&#xD;&#xA;&#xD;&#xA;Thanks for any ideas, comments ..." />
  <row Id="12538" PostHistoryTypeId="1" PostId="6281" RevisionGUID="a2f6f7f4-97a8-41ac-a30d-881b4c1e66d4" CreationDate="2010-12-07T21:46:58.823" UserId="3863" Text="Marketing: Angry Birds - How it's done" />
  <row Id="12539" PostHistoryTypeId="3" PostId="6281" RevisionGUID="a2f6f7f4-97a8-41ac-a30d-881b4c1e66d4" CreationDate="2010-12-07T21:46:58.823" UserId="3863" Text="&lt;iphone&gt;&lt;marketing&gt;&lt;game-industry&gt;" />
  <row Id="12540" PostHistoryTypeId="2" PostId="6282" RevisionGUID="4c81f4b6-4c58-4ae8-b4d7-5b0beef2ec0d" CreationDate="2010-12-07T22:07:31.593" UserId="3794" Text="I'm quite sure that this is not framework problem and you can choose any of them. But what matter is hw accelaration. And there is no reason for ignoring it. Even the cheapest gpu has built in support for blending. Cpu solution will be very slow and cannot be compared with gpu (even the slowest one)" />
  <row Id="12541" PostHistoryTypeId="6" PostId="6281" RevisionGUID="b9ff8cf9-2ffe-4f3e-97c2-6086419debdc" CreationDate="2010-12-07T22:13:59.760" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;marketing&gt;" />
  <row Id="12544" PostHistoryTypeId="2" PostId="6284" RevisionGUID="97c6f090-34f7-4496-8187-15fa0b0bb93e" CreationDate="2010-12-07T22:53:35.717" UserId="3794" Text="The most important is that it converts yours points(vertices) from 3D world space to 2D screen space. &#xD;&#xA;&#xD;&#xA;That means that x and y positions are position on the screen (between [-1, 1]) and z is the depth. It is used for depth-buffer and identifies how far is vertex (or fragment) from yours cameras near plane. " />
  <row Id="12545" PostHistoryTypeId="2" PostId="6285" RevisionGUID="ef421716-56ee-4cfc-b2ed-86d6a83c835d" CreationDate="2010-12-07T23:00:33.660" UserId="2187" Text="I believe this is because OpenGL can't make assumptions about how the image is to be displayed (aspect ratio or resolution, hardware details, etc). It renders and image into an intermediate form which the operating system or driver or whatever scales to the correct resolution/size.&#xD;&#xA;" />
  <row Id="12546" PostHistoryTypeId="5" PostId="6284" RevisionGUID="eddfaac3-350e-4852-9c27-06f212f8f038" CreationDate="2010-12-07T23:01:56.847" UserId="3794" Comment="Adding informations" Text="The most important is that it converts yours points(vertices) from 3D world space to 2D screen space. &#xD;&#xA;&#xD;&#xA;That means that x and y positions are position on the screen (between [-1, 1]) and z is the depth. It is used for depth-buffer and identifies how far is vertex (or fragment) from yours cameras near plane. &#xD;&#xA;&#xD;&#xA;Projection means that vertices which are more near from near plane are more far from middle of the screen. And this is based on yours field of view - you are entering it in some createProjectionMatrix function, or camera frustum. Also keeps pixel aspect ratio, so pixel can be sqaure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12547" PostHistoryTypeId="5" PostId="6284" RevisionGUID="e34b7be7-422a-4044-9ce1-798a114971fa" CreationDate="2010-12-07T23:16:22.333" UserId="3794" Comment="Adding informations" Text="The most important is that it converts yours points(vertices) from 3D world space to 2D screen space. &#xD;&#xA;&#xD;&#xA;That means that x and y positions are position on the screen (between [-1, 1]) and z is the depth. It is used for depth-buffer and identifies how far is vertex (or fragment) from yours cameras near plane. &#xD;&#xA;&#xD;&#xA;Projection means that vertices which are more near from near plane are more far from middle of the screen -&gt; triangle more near to camera seems bigger that one that is far. And this is based on yours field of view - you are entering it in some createProjectionMatrix function, or camera frustum. Also keeps pixel aspect ratio, so pixel can be sqaure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12548" PostHistoryTypeId="5" PostId="6284" RevisionGUID="90c5e115-4563-4a01-85e0-00cfc970a1d8" CreationDate="2010-12-07T23:33:51.737" UserId="3794" Comment="corrected spelling" Text="The most important is that it converts yours points(vertices) from 3D world space to 2D screen space. &#xD;&#xA;&#xD;&#xA;That means that after vertex is multiplied with this matrix X and Y coords are position on the screen (between [-1, 1]) and Z is the depth. Z is used for depth-buffer and identifies how far is vertex (or fragment) from your cameras near plane. &#xD;&#xA;&#xD;&#xA;Projection means that vertices which are more near from near plane are more far from middle of the screen -&gt; triangle more near to camera appears to be bigger that one that is far. And this is based on yours field of view - you are entering it in some createProjectionMatrix function, or camera frustum. Also keeps pixel aspect ratio, so pixel can be sqaure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12549" PostHistoryTypeId="5" PostId="6284" RevisionGUID="58416b5c-7594-4915-b4db-b47b7eaaf89d" CreationDate="2010-12-08T00:00:38.147" UserId="3794" Comment="formating, adding informations" Text="The most important is that it converts yours points(vertices) from 3D world space to 2D screen space. &#xD;&#xA;&#xD;&#xA;That means that after vertex is multiplied with this matrix X and Y coords are position on the screen (between [-1, 1]) and Z is the depth. Z is used for depth-buffer and identifies how far is vertex (or fragment) from your cameras near plane. &#xD;&#xA;&#xD;&#xA;Projection means that vertices which are more near from near plane are more far from middle of the screen -&gt; triangle more near to camera appears to be bigger that one that is far. And this is based on yours field of view - you are entering it in some createProjectionMatrix function, or camera frustum. Also keeps pixel aspect ratio, so pixel can be sqaure.&#xD;&#xA;&#xD;&#xA;**Simple answer:**  &#xD;&#xA;It is good to:&#xD;&#xA;&#xD;&#xA; - make objects which are near to you look bigger than objects that are far from you.&#xD;&#xA; - keep pixel aspect ratio - Everybody likes square pixel right? :)" />
  <row Id="12550" PostHistoryTypeId="2" PostId="6286" RevisionGUID="998f17d0-b83b-4811-9889-a74b83d6a460" CreationDate="2010-12-08T00:24:16.170" UserId="3830" Text="Here are two articles on the idea of small MMOs that I absolutely love.  Both offer great examples and great advice...&#xD;&#xA;&#xD;&#xA;First is [Boutique MMOs][1] on The Escapist.  &#xD;&#xA;&#xD;&#xA;The second one is [A Game Business Model:  Learning from Touring Bands][2] on DanC's Lost Garden blog.&#xD;&#xA;&#xD;&#xA;Definitely read those articles.  Both are fantastic reads for this topic.&#xD;&#xA;&#xD;&#xA;Another thing to do that will help you better understand this realm of &quot;successful MMOs nobody's heard of created by small teams&quot; is go play them.  Try them out and see what it is about them that makes them work.  And with the developers eye, look at them and think about what it took the developer to create them.&#xD;&#xA;&#xD;&#xA;Both in relation to the two articles I linked to and the comment about testing, lot of it comes down to what you define as an MMO, and what you define as success.   If one has the &quot;MMO means WoW&quot; mindset, then you'll never be able to wrap your head around the idea of A Tail In The Desert as being an MMO, or a MUD for that matter. &#xD;&#xA;&#xD;&#xA;In terms of how you define an MMO, if you as a developer have to create all the content for your users (write quests, storylines, other unique content), then it's going to take a lot of work.  But if you let the user define the game (think MineCraft and sandbox style), then it's a lot different.&#xD;&#xA;&#xD;&#xA;And success is (I think) looking at how much money are you making, how much it cost to make the game, and how many developers you have.  If you have 2 developers with little upfront cost, then having $20k a month come in is not bad.  If you have 100 developers and it cost you $50m to develop the game, it's another story.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/articles/view/issues/issue_75/431-Boutique-MMOGs&#xD;&#xA;  [2]: http://www.lostgarden.com/2005/10/game-business-model-learning-from.html" />
  <row Id="12551" PostHistoryTypeId="5" PostId="6286" RevisionGUID="ac9d66fc-8eeb-401b-ad3d-8b97acdf6224" CreationDate="2010-12-08T00:36:45.447" UserId="3830" Comment="Added NetDevil &quot;Small Teams Big Dreams&quot; presentation" Text="Here are two articles and a presentation on the idea of small MMOs that I absolutely love.  Both offer great examples and great advice...&#xD;&#xA;&#xD;&#xA;First is [Boutique MMOs][1] on The Escapist.  &#xD;&#xA;&#xD;&#xA;The second one is [A Game Business Model:  Learning from Touring Bands][2] on DanC's Lost Garden blog.&#xD;&#xA;&#xD;&#xA;Third is a presentation by NetDevil at GDC 2008 [Small Teams Big Dreams][3].  It was a great talk and I found myself nodding my head a lot when I was there.&#xD;&#xA;&#xD;&#xA;Definitely read those articles.  Both are fantastic reads for this topic.&#xD;&#xA;&#xD;&#xA;Another thing to do that will help you better understand this realm of &quot;successful MMOs nobody's heard of created by small teams&quot; is go play them.  Try them out and see what it is about them that makes them work.  And with the developers eye, look at them and think about what it took the developer to create them.&#xD;&#xA;&#xD;&#xA;Both in relation to the two articles I linked to and the comment about testing, lot of it comes down to what you define as an MMO, and what you define as success.   If one has the &quot;MMO means WoW&quot; mindset, then you'll never be able to wrap your head around the idea of A Tail In The Desert as being an MMO, or a MUD for that matter. &#xD;&#xA;&#xD;&#xA;In terms of how you define an MMO, if you as a developer have to create all the content for your users (write quests, storylines, other unique content), then it's going to take a lot of work.  But if you let the user define the game (think MineCraft and sandbox style), then it's a lot different.&#xD;&#xA;&#xD;&#xA;And success is (I think) looking at how much money are you making, how much it cost to make the game, and how many developers you have.  If you have 2 developers with little upfront cost, then having $20k a month come in is not bad.  If you have 100 developers and it cost you $50m to develop the game, it's another story.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/articles/view/issues/issue_75/431-Boutique-MMOGs&#xD;&#xA;  [2]: http://www.lostgarden.com/2005/10/game-business-model-learning-from.html&#xD;&#xA;  [3]: http://www.gdcvault.com/play/288/Small-Team-Big-Dreams-How" />
  <row Id="12552" PostHistoryTypeId="2" PostId="6287" RevisionGUID="4337f9e7-554c-46d4-8d8b-a52b170ebb35" CreationDate="2010-12-08T00:55:38.903" UserId="3866" Text="I started C# programming in order to develop games with XNA later (I always wanted to create some awesome 3D-based RPG or at least a functional one). I read a good book for C# which is gamedev-oriented (even better). Since I already knew other languages I could quickly learn C# features and syntax code. Then I stepped over XNA...&#xD;&#xA;&#xD;&#xA;Since the book I was reading was a bit old, I put it aside and started to find game dev tutorials about XNA over the internet. I could accomplish and understand most of them using 2D graphics. I created animated sprites, made my characters move in any direction, scrolled my background together with my character's movement and so on. Everything was done with &quot;raw&quot; XNA.&#xD;&#xA;&#xD;&#xA;I found some of those things hard to understand, also I found that some thing could already be built-in the framework, then I found out game engines which I could clearly understand at least the simple line codes such as [FlatRedBall][1], [Axiom][2] and [Quick Start Engine][3].&#xD;&#xA;&#xD;&#xA;I already knew of the famous ones like OGRE, Unreal and Unity. At the same time I was tempted to throw it all away and start learning some famous game engine programming, I wanted to stay with XNA which took me time to learn and I wouldn't like to waste it.&#xD;&#xA;&#xD;&#xA;This time, I leave it for the experienced ones. Can I go through some game engine and use what it has to offer even if I'm starting with game development? Some people could think that is good to get used with the boring routines of a naked framework. And if so, what would be the recommended one to start off? I heard that it varies from market to market. We can consider that I want a RPG specific engine, maybe.&#xD;&#xA;&#xD;&#xA;Am I messing everything up and should forget all that I said? Sorry about the ignorance, I'm just a beginner&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/frb/blog/&#xD;&#xA;  [2]: http://axiom3d.net&#xD;&#xA;  [3]: http://quickstartengine.codeplex.com/" />
  <row Id="12553" PostHistoryTypeId="1" PostId="6287" RevisionGUID="4337f9e7-554c-46d4-8d8b-a52b170ebb35" CreationDate="2010-12-08T00:55:38.903" UserId="3866" Text="Is it clever to use some engine to start game developing?" />
  <row Id="12554" PostHistoryTypeId="3" PostId="6287" RevisionGUID="4337f9e7-554c-46d4-8d8b-a52b170ebb35" CreationDate="2010-12-08T00:55:38.903" UserId="3866" Text="&lt;xna&gt;&lt;3d&gt;&lt;engine&gt;&lt;c#&gt;" />
  <row Id="12555" PostHistoryTypeId="2" PostId="6288" RevisionGUID="3d04f2d4-9662-451d-aa1f-85525df85d4e" CreationDate="2010-12-08T01:20:33.757" UserId="3794" Text="It depends on what do you want to learn. If you want to &quot;just create game&quot; you can be good with engine. I personally do not recommend this.&#xD;&#xA;&#xD;&#xA;If you wanna to really understand how computer graphics works you must go deeper and learn all the stuff. From refreshing linear algebra (at least matrices, vectors and linear spaces) to understand how graphics pipeline works. XNA is the best framework to start with. My first game was in it (i mean real game, first 3D app was battle tanks in opengl - but who cares). If you wanna to start 3D programming, do not have so ambitious plans, you cannot do RPG now. You should try to make some game where you are flying in space full of cubes and trying to shoot the red ones, to learn basics. It will propably take you more time than you should say now :). But it will learn you lots. &#xD;&#xA;&#xD;&#xA;And go for it! 3D graphics programming is just the best thing which you can do for living. It is hard,fun and creative in one package." />
  <row Id="12556" PostHistoryTypeId="2" PostId="6289" RevisionGUID="a72bedb9-c060-4c18-a741-f8e3fb1bb639" CreationDate="2010-12-08T01:27:46.950" UserId="154" Text="There is nothing wrong with using an existing engine, it all comes down to your goals.&#xD;&#xA;&#xD;&#xA;If you are most interested in just building some games or game design, the faster you get to the gameplay code the better. Something like Unity is great here, as you can use your C# knowledge and start attaching scripts to objects and have something running immediately. &#xD;&#xA;&#xD;&#xA;If you want to become a game programmer, then you need to understand things at a lower level. A framework like XNA is a good starting place. You can rely on the framework to get things up and running and then start replacing parts of the framework with your own code as you learn how to build each component of your game. &#xD;&#xA; " />
  <row Id="12557" PostHistoryTypeId="2" PostId="6290" RevisionGUID="610ea42f-8378-400b-9d66-ec9168d7e696" CreationDate="2010-12-08T01:39:31.633" UserId="154" Text="Angry Birds matches the iPhone market very well. &#xD;&#xA;&#xD;&#xA; - Short gameplay sessions match the phones usage patterns&#xD;&#xA; - High art production values&#xD;&#xA; - Setting/Characters that are appealing to both sexes&#xD;&#xA; - Very simple mechanics that offer mastery potential in time&#xD;&#xA;&#xD;&#xA;This make it a game well suited to the platform and it can appeal to the full range of iPhone users. This is important as a lot of sales on the phone from from word-of-mouth recommendations.&#xD;&#xA;&#xD;&#xA;Additionally they have followed a very smart plan of regular updates and additions which get people talking about the game again and keeping it in the top of the charts. On iPhone it is absolutely crucial to get your game in the top 25. This is because of the way visibility works within iTunes and on the phone. Particularly with casual users you don't want them to have to search for your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12558" PostHistoryTypeId="2" PostId="6291" RevisionGUID="5447e724-17cb-4d09-be02-9288ad3455ca" CreationDate="2010-12-08T04:23:37.137" UserId="160" Text="It's going to be hard to balance things when the set of things you're balancing is open-ended. That's kind of the nature of the thing, and why we call it &quot;balance&quot;. Adding one new unit can have a dramatic affect on other ones.&#xD;&#xA;&#xD;&#xA;If your game is already multiplayer and socially-oriented, one possible solution is to crowd-source it: let players rate the relative strengths of different units, and then aggregate that to give each unit its score. Then, when building their troops, set a cap for total unit strength of all troops.&#xD;&#xA;&#xD;&#xA;Or you could otherwise leave it up to the players to have control over this by letting them define game requirements that allow or disallow certain units.&#xD;&#xA;&#xD;&#xA;You can't shirk all of the work onto the players. No one will bother to spend the time ranking things if the game is so unbalanced that it isn't fun to play. But you may be able to give them the ability to fine-tune." />
  <row Id="12559" PostHistoryTypeId="2" PostId="6292" RevisionGUID="459046f7-c104-4171-bfbc-aebd91ed09b7" CreationDate="2010-12-08T04:38:54.600" UserId="160" Text="What you're looking at is called a [force-directed graph](http://en.wikipedia.org/wiki/Force-based_algorithms_%28graph_drawing%29). Google for that and you should find some helpful documentation. The math is surprisingly straightforward." />
  <row Id="12560" PostHistoryTypeId="2" PostId="6293" RevisionGUID="a175fc9a-5246-44da-ba97-cccf18c6b0a1" CreationDate="2010-12-08T04:41:47.267" UserId="160" Text="My [answer](http://gamedev.stackexchange.com/questions/6065/rpgs-drop-table-design/6089#6089) to a question on generating random drops may very well work for this too." />
  <row Id="12561" PostHistoryTypeId="2" PostId="6294" RevisionGUID="ab6aee24-082b-4e44-b560-f6174be80b40" CreationDate="2010-12-08T05:44:28.160" UserId="3656" Text="SDL is a popular software renderer, and has a [C#/.NET binding][1]:  But like Joe and others have said, worrying about super fast rendering is silly if you want to use C#/Mono/.NET. You'll already get a lot of performance out of using something other than Flash.&#xD;&#xA;&#xD;&#xA;On my modest laptop I loaded up 25,000 animating sprites and still ran at 60fps. Add in background rendering, game logic and physics, and input, and maybe it could only handle 15,000. The trick to getting XNA to run fast is discouraging the garbage collector from running. Avoid heap allocations in your update loop(use structs), don't release references until the main gameplay sequence has a break, and watch your iterators.&#xD;&#xA;&#xD;&#xA;If you want to be *really* fast, go use C++ with [SFML][2]. But again, make sure you're actually going to have issues with performance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cs-sdl.sourceforge.net/&#xD;&#xA;  [2]: http://www.sfml-dev.org/" />
  <row Id="12562" PostHistoryTypeId="5" PostId="6270" RevisionGUID="b6fca375-401c-48d1-93bf-b8174aa8525f" CreationDate="2010-12-08T06:00:11.783" UserId="2472" Comment="Fixed name &quot;Lancaster&quot; -&gt; &quot;Lanchester&quot; — thanks Kylotan" Text="For Solar Realms Elite I was inspired by [Lanchester's Equations for modeling warfare][1]. I had several simultaneous fights in each round of battle.&#xD;&#xA;&#xD;&#xA;In the first fight, everyone attacked soldiers. In SRE soldiers are best against soldiers (it's not rock paper scissors, but infantry, air attack, and deep space). I set up an attack and defense power where soldiers had the best attack:&#xD;&#xA;&#xD;&#xA;    attack_strength = 3*soldiers + 1*fighters + 2*cruisers&#xD;&#xA;    defense_strength = 10*soldiers&#xD;&#xA;&#xD;&#xA;In the second fight, everyone attacked the defense stations. In SRE fighters (air) are best against defense stations (e.g. anti-aircraft):&#xD;&#xA;&#xD;&#xA;    attack_strength = 1*soldiers + 4*fighters + 2*cruisers&#xD;&#xA;    defense_strength = 25*defense_stations&#xD;&#xA;&#xD;&#xA;In the third fight, everyone attacked the heavy cruisers. In SRE heavy cruisers are in space and are best against other heavy cruisers:&#xD;&#xA;&#xD;&#xA;    attack_strength = 1*soldiers + 1*fighters + 10*cruisers&#xD;&#xA;    defense_strength = 15*cruisers&#xD;&#xA;&#xD;&#xA;(I don't remember what constants I used; those are just examples.) In each round of battle the attackers would lose some fraction of the defense strength and the defenders would lose some fraction of the attack strength. I believe this corresponds to Lanchester's Square Law (equations [here][2]). I had added randomness but I don't remember exactly where. After each round of battle the armies would be smaller. I put a maximum limit on the number of rounds; after that, the losing side would retreat.&#xD;&#xA;&#xD;&#xA;It wasn't realistic to have the infantry on the ground firing way into deep space, but it worked better for gameplay reasons to have all units be able to fight all other units (at reduced effectiveness).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Lanchester%27s_laws&#xD;&#xA;  [2]: http://www.rand.org/pubs/monograph_reports/MR638/app.html" />
  <row Id="12563" PostHistoryTypeId="2" PostId="6295" RevisionGUID="24dab562-bd9b-4217-849d-18b656cc832f" CreationDate="2010-12-08T09:15:12.177" UserId="3868" Text="If by generate a lot of code for you , you would include pre-built functions that you can use to make your life easy regarding collision detection and rotation calculations (Library) then yes, it takes a lot of coding out of the picture and gives you optimized versions at hand and ready to go. Mostly functions that you will need specifically for Game Development in all builds.&#xD;&#xA;&#xD;&#xA;It may sound redundant to say this , but in my experience , when Unity3D isn't busy crashing or building it's making my life easy by letting me change whatever I want and leave the Quaternion based math to the people that have a master degree in mathematics and still trust me enough to le me change whatever I want. &#xD;&#xA;&#xD;&#xA;It will write nothing for you, rather help you out in the way it thinks is best and let you write whatever you want.&#xD;&#xA;&#xD;&#xA;In one word, Flexible" />
  <row Id="12564" PostHistoryTypeId="2" PostId="6296" RevisionGUID="27c53b19-3953-4151-bab9-33d197aa0cbe" CreationDate="2010-12-08T09:18:52.050" UserId="3326" Text="Well I agreement with the above I think other strategies which matter are visibility of your app... Like you need to set up a social networking account that can keep tabs on bugs being reported and updated real time... Helps a lot if people who get the app feel like they are being listened to and also helps with your word of mouth spreading..." />
  <row Id="12565" PostHistoryTypeId="5" PostId="6280" RevisionGUID="a7d080b5-d7f6-476b-92c2-00718004aca3" CreationDate="2010-12-08T10:02:21.770" UserId="744" Comment="added 2 characters in body" Text="&lt;a href=&quot;http://en.wikipedia.org/wiki/Quake_2&quot;&gt;Quake 2&lt;/a&gt; is recognized as one of the first games to really ask gamers for hardware accelerated video cards. It came out in 1997. A processor from that time would be a Pentium 2, 233-300 MHz or so. If you're targeting video cards that old, you're targeting CPUs at least that old. I'm not even sure anyone bothered to make an AGP card that doesn't support OpenGL 1.&#xD;&#xA;&#xD;&#xA;No one has fast CPUs and &quot;slow&quot;, in the sense you mean, GPUs. Generally speaking, since 1997, you can rely on people to have fast enough GPUs to run nearly anything 2D, especially if you state-sort cleverly. You cannot rely on them to have a fast clock or enough cache or shallow pipelines, which are what make CPUs fast enough to support languages like C# today. You're more likely to find an early NetBurst chipset with a useless amount of cache and only 512MB RAM than an unaccelerated GPU in the wild.&#xD;&#xA;&#xD;&#xA;Some modern GPUs are slow, relatively, like the integrated Intel chipsets. Some are feature poor, like the integrated Intel chipsets. Those still have an OpenGL 1 fixed function pipeline, and it's still orders of magnitude faster than building up a scene pixel by pixel on the CPU in RAM _in C_.&#xD;&#xA;&#xD;&#xA;Trying to blit with a managed language, on modern computers, is insanity." />
  <row Id="12566" PostHistoryTypeId="2" PostId="6297" RevisionGUID="f735f29f-e22c-40ac-95db-6a4ab0bb4135" CreationDate="2010-12-08T11:23:20.960" UserId="1386" Text="To reduce the amount of `if` statements you have you need to make your solution *data-driven* instead of manually adding logic for each UI component that needs to interact.&#xD;&#xA;&#xD;&#xA;You could do this by storing your buttons data (such as each buttons bounding box and state) in an array of structs or a NSArray (or [NSMutableArray][1]) of classes. Then when you receive a touch you just need to iterate over the list of your structs to see if any touches are inside the bounding box, if it is then update that objects texture.&#xD;&#xA;&#xD;&#xA;To keep track of touches across their lifetime I use a [NSMutableDictionary][2] with the touches pointer as its key and a custom class as its value. This allows me to store information per touch (such as if I've already handled it) and react to touches that are held and not moving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html&#xD;&#xA;  [2]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html" />
  <row Id="12567" PostHistoryTypeId="5" PostId="6297" RevisionGUID="dd638d64-cb29-41d5-a1e7-8957074120d2" CreationDate="2010-12-08T11:28:47.507" UserId="1386" Comment="deleted 16 characters in body" Text="To reduce the amount of `if` statements you have you need to make your solution *data-driven* instead of manually adding logic for each UI component that needs to interact.&#xD;&#xA;&#xD;&#xA;You could do this by storing your buttons data (such as each buttons bounding box and state) in an array of structs or a NSArray (or [NSMutableArray][1]) of classes. Then when you receive a touch you just need to iterate over the list to see if any touches are inside the bounding box, if it is then update that objects texture.&#xD;&#xA;&#xD;&#xA;To keep track of touches across their lifetime I use a [NSMutableDictionary][2] with the touches pointer as its key and a custom class as its value. This allows me to store information per touch (such as if I've already handled it) and react to touches that are held and not moving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html&#xD;&#xA;  [2]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html" />
  <row Id="12568" PostHistoryTypeId="5" PostId="6297" RevisionGUID="45c4f7e3-c4b2-45de-a97e-073129f43d88" CreationDate="2010-12-08T11:34:34.210" UserId="1386" Comment="added 7 characters in body" Text="To reduce the amount of `if` statements you have you need to make your solution *data-driven* instead of manually adding logic for each UI component that needs to interact.&#xD;&#xA;&#xD;&#xA;You could do this by storing your buttons data (such as each buttons bounding box and state) in an array of structs or a NSArray (or [NSMutableArray][1]) of classes. Then when you receive a touch you just need to iterate over the list to see if any touches are inside the bounding box, if it is then update that objects texture.&#xD;&#xA;&#xD;&#xA;To keep track of touches across their lifetime I use a single [NSMutableDictionary][2] with the touches pointer as its key and a custom class as its value. This allows me to store information per touch (such as if I've already handled it) and react to touches that are held and not moving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html&#xD;&#xA;  [2]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html" />
  <row Id="12569" PostHistoryTypeId="2" PostId="6298" RevisionGUID="079605f8-0c3f-4998-95f0-ca43e0376645" CreationDate="2010-12-08T12:15:36.893" UserId="1091" Text="I note an answer has already been accepted, but it's generally useful for clipping to have the view frustum transformed into a unit cube.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12570" PostHistoryTypeId="2" PostId="6299" RevisionGUID="dfb8b33a-fff6-46c7-80e6-e8eef304a544" CreationDate="2010-12-08T13:17:38.517" UserId="2771" Text="Having read this [*rumour*][1] I think that investor with money and media/business contacts  may help somewhat.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/fEgzB" />
  <row Id="12571" PostHistoryTypeId="2" PostId="6300" RevisionGUID="7edd4445-79b1-4299-8efa-d2adc8ba13ef" CreationDate="2010-12-08T13:46:55.213" UserId="3871" Text="I have been struggling with this problem for a few days. &#xD;&#xA;&#xD;&#xA;My iPad app is designed to be a portrait game. To satisfy Apple's expection, I also support landscape mode. When it goes into landscape mode, the game goes into a letterbox format with back borders on the sides. &#xD;&#xA;&#xD;&#xA;My problem is I am creating the UIWindow and UIView programmatically. For some unkown reason, the touch controls are &quot;locked&quot; in to think I'm always in landscape mode. And even though visually in portrait mode everything looks correct, the top and bottom of the screen does not respond to touch.&#xD;&#xA;&#xD;&#xA;To summarize how I am setting this up, let me provide the skeletal framework of what I'm doing:&#xD;&#xA;&#xD;&#xA;in main.cpp:&#xD;&#xA;&#xD;&#xA;    int retVal = UIApplicationMain(argc, argv, nil, @&quot;derbyPoker_ipadAppDelegate&quot;);&#xD;&#xA;&#xD;&#xA;In the delegate, I am doing this:&#xD;&#xA;&#xD;&#xA;        - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    &#xD;&#xA;     CGRect screenBounds = [[UIScreen mainScreen] bounds];&#xD;&#xA;     CGFloat scale = [[ UIScreen mainScreen] scale ];&#xD;&#xA;     &#xD;&#xA;     m_device_width = screenBounds.size.width;&#xD;&#xA;     m_device_height = screenBounds.size.height;&#xD;&#xA;     m_device_scale = scale;        // Everything is built assuming 640x960&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;     window = [[ UIWindow alloc ] initWithFrame:[[UIScreen mainScreen] bounds]];&#xD;&#xA;     viewController = [ glView new ];&#xD;&#xA;     [self doStateChange:[blitz class]];&#xD;&#xA;    &#xD;&#xA;     return YES;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The last bit of code sets up the UIView...&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;          - (void) doStateChange: (Class) state{  &#xD;&#xA;     viewController.view = [[state alloc] initWithFrame:CGRectMake(0, 0, m_device_width, m_device_height) andManager:self];&#xD;&#xA;     viewController.view.contentMode = UIViewContentModeScaleAspectFit;&#xD;&#xA;     viewController.view.autoresizesSubviews = YES;&#xD;&#xA;     [window addSubview:viewController.view];&#xD;&#xA;        [window makeKeyAndVisible];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem seems to related to the line viewController.view.contentMode = UIViewContentModeScaleAspectFit;&#xD;&#xA;&#xD;&#xA;If I remove that line, touch works correctly in portrait mode. But the negative is when I'm landscape mode, the game stretches incorrectly. So That's not a option. &#xD;&#xA;&#xD;&#xA;The frustrating thing is, when I originally had this set up with a NIB file, it worked fine. I have read through the docs about UIWindow, UIViewController and UIView and have tried about everything to no avail. &#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12572" PostHistoryTypeId="1" PostId="6300" RevisionGUID="7edd4445-79b1-4299-8efa-d2adc8ba13ef" CreationDate="2010-12-08T13:46:55.213" UserId="3871" Text="problems programmatically creating UIView on iPad App" />
  <row Id="12573" PostHistoryTypeId="3" PostId="6300" RevisionGUID="7edd4445-79b1-4299-8efa-d2adc8ba13ef" CreationDate="2010-12-08T13:46:55.213" UserId="3871" Text="&lt;ipad&gt;" />
  <row Id="12574" PostHistoryTypeId="12" PostId="6268" RevisionGUID="c8b1b9e8-8c8f-42f3-bb23-c8a81d3b8391" CreationDate="2010-12-08T14:26:22.630" UserId="3854" Text="[{&quot;Id&quot;:3854,&quot;DisplayName&quot;:&quot;Niels Willems&quot;}]" />
  <row Id="12575" PostHistoryTypeId="13" PostId="6268" RevisionGUID="fd0ad190-c8ee-4c83-9bf8-1ccae5625407" CreationDate="2010-12-08T14:26:25.937" UserId="3854" Text="[{&quot;Id&quot;:3854,&quot;DisplayName&quot;:&quot;Niels Willems&quot;}]" />
  <row Id="12576" PostHistoryTypeId="5" PostId="6213" RevisionGUID="c3b23b88-0403-4581-b49d-e038167db817" CreationDate="2010-12-08T14:28:18.277" UserId="3792" Comment="Answered" Text="I would like to learn game development via game modding. RPG/MMORPG is one of my favorite genres. Could someone recommend me a good and recent ( I would like to play the game as well) game to learn game modding. Something with the likes of Neverwinternights 2.&#xD;&#xA;&#xD;&#xA;Thank you very much for the responses. Appreciate it." />
  <row Id="12577" PostHistoryTypeId="4" PostId="6213" RevisionGUID="c3b23b88-0403-4581-b49d-e038167db817" CreationDate="2010-12-08T14:28:18.277" UserId="3792" Comment="Answered" Text="Recommended RPG game that can be used to learn game Modding?" />
  <row Id="12578" PostHistoryTypeId="2" PostId="6301" RevisionGUID="d70974c9-d113-4b25-9f86-2a937302584a" CreationDate="2010-12-08T14:45:50.437" UserId="3873" Text="If 30 people is small enough, [Darkfall Online][1] has necessitated 7 years of development for a non instanced MMOFPS which is able to have more than 5k people online at the same time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.darkfallonline.com/" />
  <row Id="12579" PostHistoryTypeId="2" PostId="6302" RevisionGUID="c6864045-a826-4846-857f-96240ce9b609" CreationDate="2010-12-08T15:10:09.270" UserId="3874" Text="I'm making a GUI API (in C++) for games which uses Allegro 5 as a backend. I looked at how GuiChan works and noticed that they intend for the user to override the paint event and do all the drawing yourself.&#xD;&#xA;&#xD;&#xA;Since I felt that in general, there's a decent standard to how widgets behave, I have a static theme class in each widget class (static ButtonTheme buttonTheme; etc) and the parameters set in that theme are used to construct that widget (from there, the parameters can be changed individually for specific widgets). These sorts of things are: padding, font color, border color, is drawing border, back color, size, min / max size etc).&#xD;&#xA;&#xD;&#xA;Where I also differ from GuiChan is in the fact that instead of default drawing being rectangles, the widgets have bitmap pointers and if they are NULL, it draws rectangles like GuiChan, if not, they are drawn with bitmaps: ex: button has default, hover, clicked. And if hover is not provided, the switch case will just use default for hover. Each theme has corresponding bitmaps. I also have bitmaps for focused and disabled.&#xD;&#xA;&#xD;&#xA;The user can always choose to override the paint event and do it from scratch.&#xD;&#xA;&#xD;&#xA;Is this a good idea or a terrible one to use themes and theming? Should I stay generic like GuiChan?&#xD;&#xA;&#xD;&#xA;As game developers , which would you prefer, (no themes, partial themes, partial themes + bitmaps)?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="12580" PostHistoryTypeId="1" PostId="6302" RevisionGUID="c6864045-a826-4846-857f-96240ce9b609" CreationDate="2010-12-08T15:10:09.270" UserId="3874" Text="Should Game Gui APIs use themes?" />
  <row Id="12581" PostHistoryTypeId="3" PostId="6302" RevisionGUID="c6864045-a826-4846-857f-96240ce9b609" CreationDate="2010-12-08T15:10:09.270" UserId="3874" Text="&lt;game-design&gt;&lt;c++&gt;&lt;gui&gt;" />
  <row Id="12582" PostHistoryTypeId="2" PostId="6303" RevisionGUID="18920acf-0020-4f46-80b5-c30361cc7a2d" CreationDate="2010-12-08T15:26:16.860" UserId="20" Text="As others suggested, the `obj` format might be a way to go. It doesn't support bones or animations though.&#xD;&#xA;&#xD;&#xA;Another option is [COLLADA][1]. Since this is an XML file you should be able to parse and extract information from it easily. Here's a [blog post][2] that sheds some light on this.&#xD;&#xA;&#xD;&#xA;Writing a good/robust parser for COLLADA won't be easy though. My biggest gripe with COLLADA is, that the generated files from different applications (eg. a COLLADA file exported with Blender and one exported with Maya) can be quite different.&#xD;&#xA;&#xD;&#xA;Depending on how many features you need, it could also be advisable to compile a parser like [COLLADA DOM][3] for iOS (maybe it has been done already).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://collada.org&#xD;&#xA;  [2]: http://www.everita.com/lightwave-collada-and-opengles-on-the-iphone&#xD;&#xA;  [3]: http://sourceforge.net/projects/collada-dom/" />
  <row Id="12583" PostHistoryTypeId="5" PostId="6170" RevisionGUID="4160dff0-e0cf-4226-b0c8-104802f9919f" CreationDate="2010-12-08T15:47:39.510" UserId="2290" Comment="edited body" Text="The minimum number of people required to make an MMO is one, as demonstrated by [LOVE][1], a released MMO developed entirely by Eskil Steenberg. To see LOVE in action, check out this [youtube video][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.quelsolaar.com/love/index.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=Y-A8xvFKaRA" />
  <row Id="12588" PostHistoryTypeId="2" PostId="6305" RevisionGUID="b109ade8-e0a5-45cf-9ab4-8bfaba5f99cd" CreationDate="2010-12-08T16:06:19.413" UserId="3872" Text="I need insect-like agents that have fallen/rolled on their back/side to naturally re-orient themselves.  The agents are modeled as simple cuboids in the physics engine (Bullet) to approximate an ant-like shape.&#xD;&#xA;&#xD;&#xA;At the moment I correct the orientation by instantly altering it when the dot product of surface 'up' and agent 'up' is less than some number (e.g. -0.5).  Thus the agents can fall over only so much before they are insta-righted in the blink of an eye.&#xD;&#xA;&#xD;&#xA;Obviously this looks nasty. Plus in the border cases, where the dot product isn't quite low enough, they can still fall over and don't get self-righted.&#xD;&#xA;&#xD;&#xA;So, I need a way to have the critters automatically roll back onto their feet. How can I do this? The way I see it there are two problems:&#xD;&#xA;&#xD;&#xA;1) How to determine the best rotation axis (e.g. better to roll on their back than head-to-tail)?&#xD;&#xA;&#xD;&#xA;2) How to work out the magnitude of torque required to overcome the physics engine, whilst not being too much that has them flipping end over end?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Full disclosure: I originally posted this question on gamedev.net, to no response.  I also posted in StackOverflow, but deleted the post when this stackexchange was recommended instead]&#xD;&#xA;" />
  <row Id="12589" PostHistoryTypeId="1" PostId="6305" RevisionGUID="b109ade8-e0a5-45cf-9ab4-8bfaba5f99cd" CreationDate="2010-12-08T16:06:19.413" UserId="3872" Text="Self-righting agents that have fallen over" />
  <row Id="12590" PostHistoryTypeId="3" PostId="6305" RevisionGUID="b109ade8-e0a5-45cf-9ab4-8bfaba5f99cd" CreationDate="2010-12-08T16:06:19.413" UserId="3872" Text="&lt;c++&gt;&lt;3d&gt;&lt;math&gt;&lt;physics&gt;&lt;character&gt;" />
  <row Id="12592" PostHistoryTypeId="2" PostId="6307" RevisionGUID="6e6c64ab-fe19-4073-968a-fbb90da3a98e" CreationDate="2010-12-08T16:53:49.283" UserId="1829" Text="The analogy with flash is quite right, but I don't really understand your analogy with puppets.&#xD;&#xA;&#xD;&#xA;The good things about unity are:&#xD;&#xA;&#xD;&#xA; - cross-platform: That's a very big plus, I would say the bigger reason.&#xD;&#xA; - High-quality engine and implementation, I mean using Unity gameobjects etc.&#xD;&#xA; - Very easy to make a simple game from scratch, so that's a plus for making prototypes.&#xD;&#xA;&#xD;&#xA;The bad things:&#xD;&#xA;&#xD;&#xA; - Can't link with C++ or C, so your project might only work on Unity. With C# one might argues that it will work on XNA, but C++ would have been nice. With this remark I mean that it is not a tool that veteran professionals or autodidacts would use, since you don't have a total control on your application, but this doesn't mean there are thing you can't do with Unity. On the other hand, a team with a great idea and talented artists can do awesome stuff without needing experienced programmers.&#xD;&#xA; - It's quite new, so obviously no-one knows where this tool will lead.&#xD;&#xA;&#xD;&#xA;The thing I don't like with Unity is that it feels like all the hard work is done, so programmers are much less valuable.&#xD;&#xA;On the other hand it's great for quickly teaching people how to build things fast.&#xD;&#xA;&#xD;&#xA;So to conclude: Unity (or tool like Unity) is more for artists who can't reach out to great programmers, but can still know to do a little game scripting. OF COURSE you can make a full featured game, add realistic IA, doing a mmo net-code and what not, but big companies would not use Unity.&#xD;&#xA;&#xD;&#xA;Programming models allows one to propose a solution that suits 3/4 of development tools so that it fits to those &quot;independents&quot; game makers. It values one particular tool and it also values artists, but not programmers (except the ones from the unity team, of course).&#xD;&#xA;&#xD;&#xA;Unity is a good shortcut for non-programmers, but they have to understand that video games come from lines of code, and that you can't do everything just with an awesome tool. At some point it requires to know something about low-level programming.&#xD;&#xA;&#xD;&#xA;Having a personal project in mind, I would not use Unity, because I don't like C# or Boo (Panda is good with python, so why bother with a commercial software ?), and because if I show my project and it's done with unity, it will be much less impressive." />
  <row Id="12593" PostHistoryTypeId="2" PostId="6308" RevisionGUID="2fc4632f-a09e-4857-a903-4921e17a24a3" CreationDate="2010-12-08T16:58:25.350" UserId="3830" Text="My feeling is it would be easier to fake it than do it with full physics.  If your bugs can be animated, give them an animation of leaping up in the air, rotating, then landing.&#xD;&#xA;&#xD;&#xA;You know that sooner or later any physics based method is going to be (heh) buggy.  Bug on a slope, object in its way, etc." />
  <row Id="12595" PostHistoryTypeId="2" PostId="6310" RevisionGUID="447b9bc6-4e9a-4450-b981-f99e823c8c52" CreationDate="2010-12-08T18:21:49.570" UserId="1829" Text="First, MMORPGs or any online game does not use HTTP or &quot;web frameworks&quot; in the first place.&#xD;&#xA;&#xD;&#xA;A server is programmed just like the game itself, in C++, and communication is achieved by using sockets to transmit packet over the network.&#xD;&#xA;&#xD;&#xA;Servers often run another OS, and include only game code, so a lot of player can play on a single server smoothly.&#xD;&#xA;&#xD;&#xA;I don't know how blizzard manages their servers, I don't know if they use clusters or not.&#xD;&#xA;&#xD;&#xA;Of course when I say &quot;sockets&quot; and &quot;C++&quot;, I'm talking about the real time game, not other services the game might offer, like the armory with WoW for example. They might just use a database which can be read from multiple services, like the forum, the armory, the game, the account administration etc, but my thought is that they have dependent databases, which seeks for new entries etc, so everything can sync up nicely.&#xD;&#xA;&#xD;&#xA;I think the guy in charge of the network part of WoW might be a real badass." />
  <row Id="12597" PostHistoryTypeId="2" PostId="6312" RevisionGUID="19673367-3c62-43ec-bdfb-654b84b60b7b" CreationDate="2010-12-08T18:22:26.733" UserId="962" Text="You should do some kind of rotation impulse.&#xD;&#xA;&#xD;&#xA;Probably sideways is the easiest to flip over, so have it either flip over to the right or left, but choose randomly each time.&#xD;&#xA;&#xD;&#xA;As for figuring out how much power is needed for the impulse, just test it out. Start it low and keep bumping it till it works correctly. Then figure out the min and max power to flip over correctly. Randomly select one of those when you need to flip.&#xD;&#xA;&#xD;&#xA;To make it a bit more realistic, set a small timer between when the object knows its upside down, wait, and when when its time to flip, check if it is still upside down, if so, then flip." />
  <row Id="12598" PostHistoryTypeId="2" PostId="6313" RevisionGUID="39d68bcd-48c0-4183-bcec-1c012e6423f8" CreationDate="2010-12-08T18:23:14.217" UserId="458" Text="Normally the term is &quot;expansion&quot; not &quot;extension&quot;, FYI.&#xD;&#xA;&#xD;&#xA;Best way to do this is to understand the cost curve for your game. If you know that all of the cards (or units, or whatever) in your game have the same cost/benefit ratio, and that it is balanced, then you can theoretically come up with as many other things as you want, and as long as they fall along the same cost curve they will (theoretically) be balanced with what has come before. This isn't how Magic does it, but most other CCGs I've worked on have done something like that. As a bonus, knowing the curve significantly reduces the required time it takes to playtest for balance in future sets, so it saves you development time/money.&#xD;&#xA;&#xD;&#xA;Here's the down side: it's really hard to know the cost curve up front. Usually this is something best discovered after the release of the base set and maybe another set or two after that... at which point, you've already got a bunch of (unintentionally) unbalanced stuff. With computer games you can always release a patch that balances the old stuff later, provided you can handle the fallout from the player community (they tend to get uppity over any change to their beloved game, even if it's a positive change, unless they are carefully managed).&#xD;&#xA;&#xD;&#xA;Of course, this won't get you ALL of the way there. Sometimes you make cards or other effects that are just so far out there that they can't really be directly compared or balanced with anything else, so you just have to go by feel with your instincts. But if there's only a few of those, you can spend the bulk of your time working on balancing those by hand, and leave the rest to the automated math.&#xD;&#xA;&#xD;&#xA;There is one other problem you will run into eventually which is not balance related, and I think this (and not balance) is the main reason why Magic started using &quot;Type 2&quot; and other limited formats: eventually the card pool just gets too large to manage. Sure, players who have been there from the beginning who are incrementally adding one set at a time to their knowledge of the game, they can manage indefinitely... but for NEW players, coming into a new game and suddenly realizing you need to memorize a thousand cards is a massive barrier to entry, and you'll find that without some kind of restricted card pool to draw from, your game is effectively closed to new players entirely. So have a plan in advance for how you're going to handle that, irrespective of balance issues.&#xD;&#xA;&#xD;&#xA;If you're interested in cost curve balance, I've written up a tutorial here:&#xD;&#xA;http://gamebalanceconcepts.wordpress.com/2010/07/21/level-3-transitive-mechanics-and-cost-curves/&#xD;&#xA;(The rest of that blog is devoted to other topics on game balance that you might find interesting as well, but this particular post is directly relevant to CCGs.)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12599" PostHistoryTypeId="2" PostId="6314" RevisionGUID="f9117553-2db8-478f-acbb-35cb47fdbc64" CreationDate="2010-12-08T18:55:10.843" UserId="1021" Text="I've been developing casual iPhone/iPod Touch games touch for about two years.  I'd like to port some games to the Android platform.  Since I'm stuck w/ a two year iPhone contract I don't want to get an Android phone that requires a service plan.  **What is the best phone to get for development in this situation?**" />
  <row Id="12600" PostHistoryTypeId="1" PostId="6314" RevisionGUID="f9117553-2db8-478f-acbb-35cb47fdbc64" CreationDate="2010-12-08T18:55:10.843" UserId="1021" Text="Phone for Android game development" />
  <row Id="12601" PostHistoryTypeId="3" PostId="6314" RevisionGUID="f9117553-2db8-478f-acbb-35cb47fdbc64" CreationDate="2010-12-08T18:55:10.843" UserId="1021" Text="&lt;iphone&gt;&lt;android&gt;&lt;porting&gt;&lt;casual-games&gt;" />
  <row Id="12602" PostHistoryTypeId="2" PostId="6315" RevisionGUID="bb94c1ab-8690-44fe-9797-6200980c3ed2" CreationDate="2010-12-08T19:03:52.873" UserId="51" Text="I think you can buy most motorola phones without a contract.  If you did want to use them they would only work on Verizon.  Like you can probably buy the &lt;a href=&quot;http://www.store.motorola.com/DROID-2-Global-by-Motorola/dp/B004DJH7KA?ie=UTF8&amp;id=DROID%202%20Global%20by%20Motorola&amp;field_availability=-1&amp;field_launch-date=-1y&amp;field_browse=2408494011&amp;searchSize=12&amp;searchPage=1&amp;searchNodeID=2408494011&amp;refinementHistory=brandtextbin,subjectbin,color_map,price,size_name&amp;searchRank=salesrank&quot;&gt;Droid 2&lt;/a&gt; by itself." />
  <row Id="12603" PostHistoryTypeId="6" PostId="6314" RevisionGUID="669cb70f-3ae1-4b52-a1bf-303092981118" CreationDate="2010-12-08T19:50:56.153" UserId="51" Comment="edited tags" Text="&lt;android&gt;&lt;hardware&gt;&lt;porting&gt;" />
  <row Id="12605" PostHistoryTypeId="2" PostId="6316" RevisionGUID="dd85ef85-a94f-48c3-bab5-7deae03a9419" CreationDate="2010-12-08T20:26:24.573" UserId="1598" Text="The Moto Droid seems to be a decent benchmark to go by, as most android phones coming out now either match or exceed its specs, and the Droid is one of the more popular android phones out there currently.  You can find unlocked Droids on ebay for ~$100.  One of the nice things about android is you can develop and test on any android phone, so if you know anyone with an android phone (when you want to test on different handsets), you can just connect, deploy, and test." />
  <row Id="12607" PostHistoryTypeId="2" PostId="6318" RevisionGUID="71b81fe4-6969-4b05-83e8-75ac4fc952d3" CreationDate="2010-12-08T20:48:43.837" UserId="721" Text="To develop on Android, you need many devices. But if you need one, buy a Nexus, because you will have quickly GingerBread (Android 2.3). And you must know that Debug on NDK with Android is bugged. You can't debug easily multi-thread programs (OpenGL). There is a fix in NDK r5 and Gingerbread.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12608" PostHistoryTypeId="5" PostId="6318" RevisionGUID="d4d75cb5-ac5d-488b-9872-7a2b95992900" CreationDate="2010-12-08T20:57:17.647" UserId="721" Comment="added 577 characters in body; added 1 characters in body; added 84 characters in body; added 56 characters in body" Text="To develop on Android, you need many devices. But if you need one, buy a Nexus, because you will have quickly GingerBread (Android 2.3). And you must know that Debug on NDK with Android is bugged. You can't debug easily multi-thread programs (OpenGL). There is a fix in NDK r5 and Gingerbread.&#xD;&#xA;&#xD;&#xA;My devices:&#xD;&#xA;&#xD;&#xA; - Nexus One or Droid: same GPU performance. I aim framerate &gt; 25fps on these devices&#xD;&#xA; - Nexus S or Samsung GS (Captivate...): very fast OpenGL GPU (three times better as N1)&#xD;&#xA; - Spica, Moment, Naos &amp; Taos: OpenGL are so bugged... to be compatible with these devices you should verify each OpenGL command;&#xD;&#xA; - HTC G1, HTC Magic or HTC Hero: if you plan to develop OpenGL ES 1.x, verify on these devices&#xD;&#xA; - Galaxy Tab or A101IT archos (tablet resolution 1024*600)&#xD;&#xA; - Wildfire (small resolutions)&#xD;&#xA;&#xD;&#xA;I'm plan to buy a Tegra2 tablet or phone quickly too.&#xD;&#xA; &#xD;&#xA;I'm one of developper of Moblox (a featured Android game) and i needed all these phones. If you don't use OpenGL, you can have only one Phone.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12609" PostHistoryTypeId="5" PostId="6318" RevisionGUID="e0e82ab5-f699-4c8c-a1cd-4308f794c246" CreationDate="2010-12-08T21:02:33.570" UserId="721" Comment="added 299 characters in body; added 2 characters in body" Text="To develop on Android, you need many devices. But if you need one, buy a Nexus, because you will have quickly GingerBread (Android 2.3). And you must know that Debug on NDK with Android is bugged. You can't debug easily multi-thread programs (OpenGL). There is a fix in NDK r5 and Gingerbread.&#xD;&#xA;&#xD;&#xA;My devices:&#xD;&#xA;&#xD;&#xA; - Nexus One or Droid: same GPU performance. I aim framerate &gt; 25fps on these devices&#xD;&#xA; - Nexus S or Samsung GS (Captivate...): very fast OpenGL GPU (three times better as N1)&#xD;&#xA; - Spica, Moment, Naos &amp; Taos: OpenGL are so bugged... to be compatible with these devices you should verify each OpenGL command;&#xD;&#xA; - HTC G1, HTC Magic or HTC Hero: if you plan to develop OpenGL ES 1.x, verify on these devices&#xD;&#xA; - Galaxy Tab or A101IT archos (tablet resolution 1024*600)&#xD;&#xA; - Wildfire (small resolutions)&#xD;&#xA;&#xD;&#xA;I'm plan to buy a Tegra2 tablet or phone quickly too.&#xD;&#xA; &#xD;&#xA;I'm one of developper of Moblox (a featured Android game) and i needed all these phones. If you don't use OpenGL, you can have only one Phone.&#xD;&#xA;&#xD;&#xA;Ps: i made a collections of OGL 2.0 extensions on this [page][1]&#xD;&#xA;&#xD;&#xA;ps2: my gpubench can give hints about GPU on Android ([results][2])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices/4380884#4380884&#xD;&#xA;  [2]: http://gpubench.appspot.com/top/by-phone/version-1" />
  <row Id="12610" PostHistoryTypeId="5" PostId="6302" RevisionGUID="c2e511bd-96de-4760-b904-5ed4252b0e25" CreationDate="2010-12-08T21:36:34.550" UserId="3874" Comment="added 1 characters in body; edited title" Text="I'm making a GUI API (in C++) for games which uses Allegro 5 as a backend. I looked at how GuiChan works and noticed that they intend for the user to override the paint event and do all the drawing yourself. &#xD;&#xA;&#xD;&#xA;Since I felt that in general, there's a decent standard to how widgets behave, I have a static theme class in each widget class (static ButtonTheme buttonTheme; etc) and the parameters set in that theme are used to construct that widget (from there, the parameters can be changed individually for specific widgets). These sorts of things are: padding, font color, border color, is drawing border, back color, size, min / max size etc).&#xD;&#xA;&#xD;&#xA;Where I also differ from GuiChan is in the fact that instead of default drawing being rectangles, the widgets have bitmap pointers and if they are NULL, it draws rectangles like GuiChan, if not, they are drawn with bitmaps: ex: button has default, hover, clicked. And if hover is not provided, the switch case will just use default for hover. Each theme has corresponding bitmaps. I also have bitmaps for focused and disabled.&#xD;&#xA;&#xD;&#xA;The user can always choose to override the paint event and do it from scratch.&#xD;&#xA;&#xD;&#xA;Is this a good idea or a terrible one to use themes and theming? Should I stay generic like GuiChan?&#xD;&#xA;&#xD;&#xA;As game developers , which would you prefer, (no themes, partial themes, partial themes + bitmaps)?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="12611" PostHistoryTypeId="4" PostId="6302" RevisionGUID="c2e511bd-96de-4760-b904-5ed4252b0e25" CreationDate="2010-12-08T21:36:34.550" UserId="3874" Comment="added 1 characters in body; edited title" Text="Opinion on this?" />
  <row Id="12612" PostHistoryTypeId="8" PostId="6302" RevisionGUID="b081ac0d-cdb5-4b2e-aa81-92fbb16e0af1" CreationDate="2010-12-08T21:42:14.860" UserId="51" Comment="Rollback to [c6864045-a826-4846-857f-96240ce9b609]" Text="I'm making a GUI API (in C++) for games which uses Allegro 5 as a backend. I looked at how GuiChan works and noticed that they intend for the user to override the paint event and do all the drawing yourself.&#xD;&#xA;&#xD;&#xA;Since I felt that in general, there's a decent standard to how widgets behave, I have a static theme class in each widget class (static ButtonTheme buttonTheme; etc) and the parameters set in that theme are used to construct that widget (from there, the parameters can be changed individually for specific widgets). These sorts of things are: padding, font color, border color, is drawing border, back color, size, min / max size etc).&#xD;&#xA;&#xD;&#xA;Where I also differ from GuiChan is in the fact that instead of default drawing being rectangles, the widgets have bitmap pointers and if they are NULL, it draws rectangles like GuiChan, if not, they are drawn with bitmaps: ex: button has default, hover, clicked. And if hover is not provided, the switch case will just use default for hover. Each theme has corresponding bitmaps. I also have bitmaps for focused and disabled.&#xD;&#xA;&#xD;&#xA;The user can always choose to override the paint event and do it from scratch.&#xD;&#xA;&#xD;&#xA;Is this a good idea or a terrible one to use themes and theming? Should I stay generic like GuiChan?&#xD;&#xA;&#xD;&#xA;As game developers , which would you prefer, (no themes, partial themes, partial themes + bitmaps)?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="12613" PostHistoryTypeId="7" PostId="6302" RevisionGUID="b081ac0d-cdb5-4b2e-aa81-92fbb16e0af1" CreationDate="2010-12-08T21:42:14.860" UserId="51" Comment="Rollback to [c6864045-a826-4846-857f-96240ce9b609]" Text="Should Game Gui APIs use themes?" />
  <row Id="12614" PostHistoryTypeId="5" PostId="6284" RevisionGUID="22d33894-f0bd-4b68-9371-956cb1f6c83d" CreationDate="2010-12-08T22:46:59.107" UserId="3794" Comment="making anwer more complex" Text="The most important is that it converts yours points(vertices) from 3D world space to 2D screen space. &#xD;&#xA;&#xD;&#xA;That means that after vertex is multiplied with this matrix X and Y coords are position on the screen (between [-1, 1]) and Z is the depth. Z is used for depth-buffer and identifies how far is vertex (or fragment) from your cameras near plane. &#xD;&#xA;&#xD;&#xA;Projection means that vertices which are more near from near plane are more far from middle of the screen -&gt; triangle more near to camera appears to be bigger that one that is far. And this is based on yours field of view - you are entering it in some createProjectionMatrix function or createFrustum. It works that it shears and scales yours camera frustum and vertices in it into unit cube. Values that are greater than 1 and smaller than -1 are not displayed.&#xD;&#xA;&#xD;&#xA;Also keeps pixel aspect ratio, so pixel can be sqaure. That is simple. It just shears camera frustum like this: more wider screen -&gt; more vertical shear and vice versa.&#xD;&#xA;&#xD;&#xA;**Simple answer:**  &#xD;&#xA;It defines yours camera frustum and is good to:&#xD;&#xA;&#xD;&#xA; - make objects which are near to you look bigger than objects that are far from you.&#xD;&#xA; - keep pixel aspect ratio - Everybody likes square pixel right? :)" />
  <row Id="12615" PostHistoryTypeId="5" PostId="6318" RevisionGUID="b5516e60-2ace-4177-9386-868ca515fbac" CreationDate="2010-12-08T22:51:03.080" UserId="721" Comment="added 61 characters in body" Text="To develop on Android, you need many devices. But if you need one, buy a Nexus (S or One), because it is an official Google Phone. You will have quickly GingerBread (Android 2.3). And you must know that Debug on NDK with Android is bugged. You can't debug easily multi-thread programs (OpenGL). There is a fix in NDK r5 but its needs a Gingerbread phone.&#xD;&#xA;&#xD;&#xA;My devices:&#xD;&#xA;&#xD;&#xA; - Nexus One or Droid: same GPU performance. I aim framerate &gt; 25fps on these devices&#xD;&#xA; - Nexus S or Samsung GS (Captivate...): very fast OpenGL GPU (three times better as N1)&#xD;&#xA; - Spica, Moment, Naos &amp; Taos: OpenGL are so bugged... to be compatible with these devices you should verify each OpenGL command;&#xD;&#xA; - HTC G1, HTC Magic or HTC Hero: if you plan to develop OpenGL ES 1.x, verify on these devices&#xD;&#xA; - Galaxy Tab or A101IT archos (tablet resolution 1024*600)&#xD;&#xA; - Wildfire (small resolutions)&#xD;&#xA;&#xD;&#xA;I'm plan to buy a Tegra2 tablet or phone quickly too.&#xD;&#xA; &#xD;&#xA;I'm one of developper of Moblox (a featured Android game) and i needed all these phones. If you don't use OpenGL, you can have only one Phone.&#xD;&#xA;&#xD;&#xA;Ps: i made a collections of OGL 2.0 extensions on this [page][1]&#xD;&#xA;&#xD;&#xA;ps2: my gpubench can give hints about GPU on Android ([results][2])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices/4380884#4380884&#xD;&#xA;  [2]: http://gpubench.appspot.com/top/by-phone/version-1" />
  <row Id="12616" PostHistoryTypeId="2" PostId="6319" RevisionGUID="2c4d79d7-1104-4110-a0ed-a62651d97a6b" CreationDate="2010-12-08T23:32:38.287" UserId="3868" Text="I have been using Monodevelop and VS2010 for Unity game development for several months now. MD seems to let me have breakpoints and some minor control but it's all silver lining only, you can only do a play or an edit when you run normally outside mono debug run call. &#xD;&#xA;&#xD;&#xA;VS2010 just refuses to synch at all, I couldn't figure out yet how to get the same execution, I'm guessing it's not supported.&#xD;&#xA;&#xD;&#xA;Monodevelop needs some getting used to, both for JS and C# I reckon. Going from C++ to JS you probably must be wondering if you are coding or doodling with a crayon by now.&#xD;&#xA;&#xD;&#xA;Just do yourself a big favor and go to the preferences for keybindings and change it all to the ones you are used to. Hitting CTRL-SHIFT-HOME for a backwards indent on a keyboard requiring FN left arrow is a whopping 4 key combo. Even mortal combat was easier to learn than that.&#xD;&#xA;&#xD;&#xA;In short: VS2010, possible but no feedback or breakpoints, Monodevelop, takes some getting used to but it 500 times better than unitron/uniscite , that's just plain notepad--" />
  <row Id="12619" PostHistoryTypeId="5" PostId="3536" RevisionGUID="f3a0febd-d850-4b02-b89a-26180c647787" CreationDate="2010-12-09T00:10:17.380" UserId="51" Comment="edited body" Text="You should probably stick with MonoDevelop.  It's not as polished as visual studio but is the only debugger you're going to be able to use with Unity 3. &#xD;&#xA;&#xD;&#xA;Personally I use Visual Studio Professional when I'm on Windows, and all of our projects stick to C# exclusively.  It's a great IDE and the C# integration (read: autocomplete) is pretty good." />
  <row Id="12620" PostHistoryTypeId="2" PostId="6322" RevisionGUID="61175e68-bd42-4750-bb91-d70b95304a75" CreationDate="2010-12-09T02:04:27.940" UserId="1292" Text="Hey guys, im working on a final class project for a graphics class, and me and a teammate are making a simple 3d tower defense game. &#xD;&#xA;&#xD;&#xA;We're currently planning on using 3ds models and drawing them with OpenGL.However, niether of us have a lot of practice/experience with loading/drawing models.&#xD;&#xA;&#xD;&#xA;What is the **fastest and/or easiest** (not neccesarily the best or most feature-implemented) way to load a 3ds model and draw it with a OpenGL/glut setup?" />
  <row Id="12621" PostHistoryTypeId="1" PostId="6322" RevisionGUID="61175e68-bd42-4750-bb91-d70b95304a75" CreationDate="2010-12-09T02:04:27.940" UserId="1292" Text="OpenGL and 3ds model loading: Path of least resistance?" />
  <row Id="12622" PostHistoryTypeId="3" PostId="6322" RevisionGUID="61175e68-bd42-4750-bb91-d70b95304a75" CreationDate="2010-12-09T02:04:27.940" UserId="1292" Text="&lt;opengl&gt;&lt;models&gt;&lt;loading&gt;" />
  <row Id="12623" PostHistoryTypeId="2" PostId="6323" RevisionGUID="9a29b545-7bc4-4f33-917d-d16fee104353" CreationDate="2010-12-09T02:49:45.247" UserId="721" Text="I'm working on iPhone and Android but OpenGL ES is the same. So on mobile Platform (and Destop too), you must use DrawCalls carefully. I try to use &lt; 50 to render a scene. &#xD;&#xA;&#xD;&#xA;For my sprite engine on OpenGL ES 1.x, i use an unique coordinates system for the rendering function. So for each sprite and at each frame, i compute its positions in this coordinates system. That's a lot of operations for CPU but i can use one glDrawElement for all sprites using the same texture.&#xD;&#xA;&#xD;&#xA;I have two categories of sprite:&#xD;&#xA;&#xD;&#xA; * Transparent sprites: i use a qsort &#xD;&#xA; * Solid sprites: no sort just ZBuffer&#xD;&#xA;&#xD;&#xA;With good texture atlases, i use 10 drawcalls (glDrawElement) for my 500 sprites and have a good framerate.&#xD;&#xA;&#xD;&#xA;Ps: for OpenGL ES 2.x, i use the gpu to do translation in the Vertex shader. " />
  <row Id="12624" PostHistoryTypeId="2" PostId="6324" RevisionGUID="d5886f0a-8fac-448d-9e4e-787bbee82954" CreationDate="2010-12-09T03:51:50.093" UserId="2287" Text="The easiest way will be load obj files, like so(files you are interested in -&gt; `glm.h/cpp`):&#xD;&#xA;&#xD;&#xA;http://www.xmission.com/~nate/smooth.html&#xD;&#xA;&#xD;&#xA;It comes with examples.&#xD;&#xA;&#xD;&#xA;I personally feel, that if you are learning, you should make one yourself. Not as feature filled as above, but a simple obj loader that reads vertices/normals/texture co-ords and perhaps the material as well. &#xD;&#xA;&#xD;&#xA;It will take you a few hours at most to figure this out (speaking from experience - when I didn't have experience :). This will make you understand the guts of all loaders and their possible limitations. You can then switch to more feature filled loaders while at the same time knowing what is going on behind the scenes so that it does not seem like `magic` anymore." />
  <row Id="12626" PostHistoryTypeId="2" PostId="6325" RevisionGUID="c7bf9956-a295-4940-a177-ccbc4d034d28" CreationDate="2010-12-09T04:53:36.087" UserId="3830" Text="I'd definitely let developers do themes and override things if it doesn't add excessive burden to the average developer, nor decrease your chances of releasing.  &#xD;&#xA;&#xD;&#xA;Assume that most of your user base will just use the stock methods at first, but the rest will love the fact they can do it different.  Or once they've got it working with the stock methods, they'll customize later." />
  <row Id="12627" PostHistoryTypeId="2" PostId="6326" RevisionGUID="42e28e08-4561-4c40-8fdf-d3761187f800" CreationDate="2010-12-09T08:50:56.487" UserId="3820" Text="I have good experience with AssImp. Have a look: http://assimp.sourceforge.net/&#xD;&#xA;It's well documented." />
  <row Id="12628" PostHistoryTypeId="2" PostId="6327" RevisionGUID="f8e634ab-7019-47ea-a259-09c33f9df07c" CreationDate="2010-12-09T09:42:07.617" UserId="1700" Text="Check out &quot;DominationBeam&quot; under actors. I think this is an ability that a campaign character could use that had a beam going from her to the target. You'll need to have events creating the actor when the effect of the ability starts and destroying the actor when the effect ends. Don't use the ability's start/end in the events, just the effect that is triggered by the ability.&#xD;&#xA;&#xD;&#xA;The Host Impact fields are the ones where you will probably want it to use the scope &quot;Scope Target&quot; and the subject as &quot;_Unit&quot;. Same with the Host Launch, except the scope is the caster. In the impact/launch attachment fields you'll need to put what points the beams should attach to." />
  <row Id="12629" PostHistoryTypeId="2" PostId="6328" RevisionGUID="a70c1648-b908-4b60-ad07-3e12d38e327f" CreationDate="2010-12-09T11:06:21.867" UserId="3885" Text="Android Market doesn’t allow developers from my country to sell app. From what I understand the only chance to make some profit is to place ads in my application.&#xD;&#xA;&#xD;&#xA;Does ads make a decent profit or is there some other way to earn money are there any other payments system available for Android to bypass Google’s limitations?&#xD;&#xA;" />
  <row Id="12630" PostHistoryTypeId="1" PostId="6328" RevisionGUID="a70c1648-b908-4b60-ad07-3e12d38e327f" CreationDate="2010-12-09T11:06:21.867" UserId="3885" Text="How to sell Android game if selling through Market is not available in your country" />
  <row Id="12631" PostHistoryTypeId="3" PostId="6328" RevisionGUID="a70c1648-b908-4b60-ad07-3e12d38e327f" CreationDate="2010-12-09T11:06:21.867" UserId="3885" Text="&lt;android&gt;" />
  <row Id="12633" PostHistoryTypeId="2" PostId="6329" RevisionGUID="4f6530e9-ff8e-4a38-a780-23379baa7802" CreationDate="2010-12-09T11:29:28.207" UserId="3326" Text="Actually I came across a device that was custom built for just developing android games on it. Been a while since I have worked with android.. Here is the [link][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.idasystems.net/odroid" />
  <row Id="12635" PostHistoryTypeId="2" PostId="6330" RevisionGUID="19594eab-fb18-4c45-b960-724ad2dd9c26" CreationDate="2010-12-09T12:56:00.893" UserId="3887" Text="Finish stuff.  Even if you end up hating the thing, finish what you intended to.  Nothing is ever going to be perfect so be realistic and take incremental steps in your game career.  &#xD;&#xA;&#xD;&#xA;To know that you've finished something is positive feedback for yourself, so you won't end with self-nagging thoughts about never finishing anything.&#xD;&#xA;&#xD;&#xA;There's a lot of work in actually finishing the programming of a game, much of which isn't as exciting as the initial work on a game.  &#xD;&#xA;&#xD;&#xA;By finishing something, you increase your portfolio and you end up with valuable lessons learned along the way.&#xD;&#xA;&#xD;&#xA;There were lots of people about when I did games (back in the 80's) that never finished anything - most of the time this happened when the least exciting bits of the game needed doing - at which point they moved onto a new idea.  Essentially, they were just demo writers instead of game producers (not that there's anything wrong with that, just sayin')." />
  <row Id="12636" PostHistoryTypeId="2" PostId="6331" RevisionGUID="a0ead2f5-e867-44c8-b553-6a33c3126c77" CreationDate="2010-12-09T13:15:44.880" UserId="1352" Text="You can use PayPal in some of the following ways:&#xD;&#xA;&#xD;&#xA;* Generate a unique download url for your app that works for a limited time.&#xD;&#xA;* Generate an unlock key that unlocks your free version. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[According to this article PayPal can already facilitate in-app purchases in some countries. ][1] When this will become available outside of the mentioned I don't know.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.androidtapp.com/you-will-be-able-to-buy-android-apps-with-paypal/" />
  <row Id="12637" PostHistoryTypeId="2" PostId="6332" RevisionGUID="4d3291fc-2d35-4d50-a52b-e1342f971afc" CreationDate="2010-12-09T13:58:24.723" UserId="1101" Text="It doesn't seem to make much difference to me - the developer is going to need to be able to customise what gets drawn either way, so whether those customisations are grouped into a theme or not makes little difference. If you're talking about supplying your own themes then that's great but any developer who wants to release the game with the GUI visible is likely to replace your theme anyway." />
  <row Id="12638" PostHistoryTypeId="2" PostId="6333" RevisionGUID="4acc8946-57d8-4524-898c-4844d78d48e4" CreationDate="2010-12-09T14:06:20.173" UserId="1829" Text="Well the first thing I would say from transiting from hobbyist to indie game developer also means to are a different kind of developer now.&#xD;&#xA;&#xD;&#xA;Before you were making games for demonstration or because you just want to play it, or try a new idea.&#xD;&#xA;&#xD;&#xA;If you are a professional, which indies are (indie doesn't mean you are just only free from any editor telling you what to do), you are not doing the game for you anymore, you want it to please to people so they could buy it, and that means your game has to have quality content.&#xD;&#xA;&#xD;&#xA;Being independent is quite risky, you try to have the advantages of a having an editor to support you, but staying free of doing what you wish, and you can't totally have both.&#xD;&#xA;&#xD;&#xA;I think the most important is believing in your project, its ideas etc, meaning being ambitious, but knowing how it scales to your workload.&#xD;&#xA;&#xD;&#xA;Do milestones ! Most project use alpha-beta-gold, but it's better to slice it more, for example with 5 different milestone, so you can implement features homogeneously, starting with core features which you feel are important and will make your game look like a game, and adding features one by one, so you won't work on several features at the same time.&#xD;&#xA;&#xD;&#xA;Chrome is at its 8th version already, while firefox has not released 4 and IE is there since what, 15 years ? but only at its 8 version.&#xD;&#xA;&#xD;&#xA;Don't forget that independent games are very important right now, so think well about the features, since they are the only games that can be really different than blockbusters games which will always sell but be much less innovative." />
  <row Id="12639" PostHistoryTypeId="2" PostId="6334" RevisionGUID="2c65f224-8477-4f1f-b935-f12e6d7cb502" CreationDate="2010-12-09T15:38:44.150" UserId="457" Text="I want to draw a terrain for a 2d game, and this terrain is defined by some rotated rectangles and circles, I want to draw my terrain as if it was a repeating texture clipped by those forms. I already modified the cocos2d draw primitives methods to draw them using a triangle fan, but I'm not sure how to apply a texture on them." />
  <row Id="12640" PostHistoryTypeId="1" PostId="6334" RevisionGUID="2c65f224-8477-4f1f-b935-f12e6d7cb502" CreationDate="2010-12-09T15:38:44.150" UserId="457" Text="Drawing polygons with a repeating texture on iOS" />
  <row Id="12641" PostHistoryTypeId="3" PostId="6334" RevisionGUID="2c65f224-8477-4f1f-b935-f12e6d7cb502" CreationDate="2010-12-09T15:38:44.150" UserId="457" Text="&lt;opengl-es&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="12642" PostHistoryTypeId="2" PostId="6335" RevisionGUID="a03090d0-1877-43e5-acbe-4525c7322f38" CreationDate="2010-12-09T15:47:37.360" UserId="47" Text="With Angry Bird Seasons, they have a really good ploy to keep you playing the game.  They are only releasing one level every day.  This keeps users coming back every day to play the next level.  For the Android market, this is a fantastic idea because that means people are going to be coming back every day to see your ads." />
  <row Id="12643" PostHistoryTypeId="2" PostId="6336" RevisionGUID="5be30a5f-caad-4ff5-a1d5-101f22c4fb08" CreationDate="2010-12-09T17:14:47.537" UserDisplayName="czy" Text="what about HTC Desire?   I search a lot about android phone, Moto XT720 has a good price, but it's ROM is too old, even haven't Android 2.2. Buy a Android phone is very confused me..." />
  <row Id="12644" PostHistoryTypeId="2" PostId="6337" RevisionGUID="f2f8d98a-dd54-420f-93bb-3c30612e8441" CreationDate="2010-12-09T18:15:30.440" UserId="3894" Text="I'm beta-testing a game that is currently a simple version of Solar Realms ([Star Empire Elite](http://starempireelite.com)), and I started by using something similar to Amit's equations (above).  In particular, I liked the idea of having three phases to the battle, where you had to win two of the three.  But I also wanted to introduce an element of randomness into the battle, and for that I was influenced by some tabletop games.&#xD;&#xA;&#xD;&#xA;Processing is a concern if the game is to scale, so I didn't want to follow the method suggested by sum1stolemyname above, although if your game is using the client to process the results, as opposed to a server, this seems to be a good approach.&#xD;&#xA;&#xD;&#xA;I decided to break the battle into two phases (analogous to the three in Amit's model): air and ground.  I calculate the attack and defend strength, and adjust the attack strength down by a fraction (to give the defender the advantage).  At that point, if the attack strength and the defend strength are equal, the attack has a 50% chance of victory.  From there, I adjust the percentage chance of victory up or down based on how much more (or less) strength the attacker has compared to the defender.  Here are some simplified equations for air:&#xD;&#xA;&#xD;&#xA;    air_attack_strength = 1 * soldiers + 10 * fighters&#xD;&#xA;    air_defence_strength = 2 * soldiers + 25 * stations&#xD;&#xA;&#xD;&#xA;    differential = (air_attack_strength - air_defence_strength) * constant&#xD;&#xA;&#xD;&#xA;    chance_of_victory = 50 - differential&#xD;&#xA;&#xD;&#xA;I specify that the chance_of_victory can never be larger than 80 or less than 5.  From there, I just generate a random number out of 100, and then carry forward that result to the land battle.&#xD;&#xA;&#xD;&#xA;One thing I have not solved to my satisfaction is the casualty rates.  But I'm thinking that a good way to figure this out would be to compare the chance_of_victory to the random number generated, and use that to take a fraction of the attacking-defending forces as casualties.&#xD;&#xA;" />
  <row Id="12645" PostHistoryTypeId="2" PostId="6338" RevisionGUID="4c33c725-b3fb-4ec3-8573-3b11f861ede1" CreationDate="2010-12-09T18:40:26.383" UserId="3787" Text="I'm thinking about using Farseer inside my game (I'm not good in physics), which isn't a bad idea. However something happened while I was thinking about that, I found this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2010/09/article-xna-farseer-platform-physics-tutorial/&#xD;&#xA;&#xD;&#xA;which talks about how to use Farseer, expecially the first part shows how to create a good collision method with a **static object** (like ground!!!), which, partially answer to my old question:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6191/2d-side-scrolling-game-and-walk-over-ground-collision-detection&#xD;&#xA;&#xD;&#xA;So, is a good idea to use a physics engine to create a &quot;walkable&quot; terrain in a game? (obviusly I will use it for jumps and other things too)&#xD;&#xA;Is it a bit exaggerated, I mean, does it creates performance issues if I use it for something like ground collision which happens **all time** (except when jumping) in a game?&#xD;&#xA;&#xD;&#xA;If it's ok I've solved 2 questions with 1!&#xD;&#xA;&#xD;&#xA;Thanks for suggestions." />
  <row Id="12646" PostHistoryTypeId="1" PostId="6338" RevisionGUID="4c33c725-b3fb-4ec3-8573-3b11f861ede1" CreationDate="2010-12-09T18:40:26.383" UserId="3787" Text="Farseer and 2D Action sidescroller game" />
  <row Id="12647" PostHistoryTypeId="3" PostId="6338" RevisionGUID="4c33c725-b3fb-4ec3-8573-3b11f861ede1" CreationDate="2010-12-09T18:40:26.383" UserId="3787" Text="&lt;xna&gt;&lt;2d&gt;&lt;physics&gt;&lt;collision-detection&gt;&lt;side-scroller&gt;" />
  <row Id="12648" PostHistoryTypeId="2" PostId="6339" RevisionGUID="05ca1050-ee18-4d0e-88cd-f0f105560e5a" CreationDate="2010-12-09T20:18:27.183" UserId="962" Text="**No it will not create performance issues as long as the quantity of checks per frame are not too much for the engine to handle.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For a physics engine on a modern computer I don't think there would be any problems with anything less than 1000 collision tests s a frame, depending on your physics engine you can have many more tests per frame." />
  <row Id="12649" PostHistoryTypeId="5" PostId="6339" RevisionGUID="25acb5a4-9714-40d6-bbcb-7daa3251650e" CreationDate="2010-12-09T20:33:21.487" UserId="962" Comment="deleted 2 characters in body" Text="**No it will not create performance issues as long as the quantity of checks per frame are not too much for the engine to handle.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For a physics engine on a modern computer I don't think there would be any problems with anything less than 1000 collision tests a frame, depending on your physics engine you can have many more tests per frame." />
  <row Id="12650" PostHistoryTypeId="2" PostId="6340" RevisionGUID="f77bcdfa-af18-4477-aed9-9408cae15408" CreationDate="2010-12-09T20:42:45.373" UserId="3787" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;Vector2 Position&#xD;&#xA;float Rotation ?&#xD;&#xA;Vector2 Pivot ?&#xD;&#xA;Rectangle TextureRectangle&#xD;&#xA;Texture2D Texture&#xD;&#xA;Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12651" PostHistoryTypeId="1" PostId="6340" RevisionGUID="f77bcdfa-af18-4477-aed9-9408cae15408" CreationDate="2010-12-09T20:42:45.373" UserId="3787" Text="XNA Required information to represent 2D Sprite graphically" />
  <row Id="12652" PostHistoryTypeId="3" PostId="6340" RevisionGUID="f77bcdfa-af18-4477-aed9-9408cae15408" CreationDate="2010-12-09T20:42:45.373" UserId="3787" Text="&lt;xna&gt;&lt;2d&gt;&lt;graphics&gt;&lt;sprites&gt;&lt;data&gt;" />
  <row Id="12653" PostHistoryTypeId="5" PostId="6340" RevisionGUID="c5b54177-1b88-49fe-b7f9-6d1f66aa1930" CreationDate="2010-12-09T21:03:41.207" UserId="3787" Comment="codebox added" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation ?&#xD;&#xA;    Vector2 Pivot ?&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12654" PostHistoryTypeId="2" PostId="6341" RevisionGUID="628372a3-7aef-4b41-a45c-6e348f17af25" CreationDate="2010-12-09T21:06:47.527" UserId="962" Text="If you want to use that method of multi-threading, for each object in the game you ideally just want to the information that it needs to render.&#xD;&#xA;&#xD;&#xA;* Location&#xD;&#xA;* Rotation&#xD;&#xA;* Scale&#xD;&#xA;* Reference of image to draw for Sprite&#xD;&#xA;* Draw order&#xD;&#xA;* Anything the draw thread needs to know to draw.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**You do not want to be copying the actual graphics back and forth, just references to data, and any small data that is unique to each one.**" />
  <row Id="12655" PostHistoryTypeId="2" PostId="6342" RevisionGUID="afdce094-20ea-4a0f-99dd-2e72d30258a4" CreationDate="2010-12-09T21:47:18.070" UserId="18" Text="I suggest you get at least two phones. An older model like HTC G1, HTC Magic or Samsung Spica (or generally something with the lowest specs you want to support), and a newer model like Nexus or HTC Desire. Ideally you would like to test your game on as many phones as you can get (See [Ellis](http://gamedev.stackexchange.com/questions/6314/phone-for-android-game-development/6318#6318) answer) but not everyone could afford that many phones. This setup gives you basic coverage which can be improved by testing on friends phones for example. If you're game isn't too complex and you got a good development computer you can get even away with using the emulator in early stages of development." />
  <row Id="12656" PostHistoryTypeId="2" PostId="6343" RevisionGUID="79dd261a-40c1-4e67-a7d8-19a231337c12" CreationDate="2010-12-09T21:50:05.103" UserId="3794" Text="My question is why do you wanna to do that? :)&#xD;&#xA;&#xD;&#xA;Seperate draw and update into two threads is really important for games performance. But XNA does helps you in this. There are&#xD;&#xA;    &#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;&#xD;&#xA;callbacks. And XNA calls them properly. As you are making some 2D game i'm pretty sure that you dont need multithreading performance benefit. But if you wanna to try multithreading... ok.&#xD;&#xA;&#xD;&#xA;To your question. Data that you want to share between threads seems to be right. But maybe imageOrigin==pivot. And also you are propably not going to change textures every frame, they may be saved in both threads and changed only when needed.&#xD;&#xA;" />
  <row Id="12657" PostHistoryTypeId="2" PostId="6344" RevisionGUID="b9f4fec0-2423-410f-9a3c-3f4e1da5c9b6" CreationDate="2010-12-09T22:32:36.167" UserId="3547" Text="I think notabene is write in that the Pivot does equal ImageOrigin. The XNA draw call takes an origin that is the pivot for rotation and the image origin, they are one in the same.&#xD;&#xA;&#xD;&#xA;Anyway, I would suggest adding a Color field for tinting and make sure that you allow the TextureRectangle to have some null value. (I think adding a &quot;?&quot; at the end of Rectangle would do the trick, but might cause boxing due to Nullable&lt;Rectangle&gt;???) Probably set the TextureRectangle to new Rectangle(-1, -1, -1, -1) as a way to communicate that it's a null source rectangle.&#xD;&#xA;&#xD;&#xA;Also, you should consider doing some benchmarking if your not completely sure if you need to do this, don't optimize needlessly. You could throw in a SpriteEffects enum field in there, but I doubt you'll need it." />
  <row Id="12658" PostHistoryTypeId="2" PostId="6345" RevisionGUID="cb01a145-f9d7-43d0-88e5-50097b4d6dcc" CreationDate="2010-12-09T22:40:01.480" UserId="2469" Text="I'm making a 4 player co-op r-type game, and I'm about to implement the collision detection code. I've read a lot of articles and stuff about how to handle collision detection, but I'm having a hard time figuring out what to go with.&#xD;&#xA;It seems the quad tree is the most common way to go, but in some resources they mention the grid based solution. For having used a grid for detections in a previous game, I'm comfortable with that, but is it actually better than a quad tree ?&#xD;&#xA;I'm not sure which offers best performance, and I've also ran a little benchmark, there is not much difference between both solutions.&#xD;&#xA;&#xD;&#xA;Is one better than the other ? or more elegant ? I'm really not sure which one I should use.&#xD;&#xA;&#xD;&#xA;Any advice is welcome.&#xD;&#xA;Thanks." />
  <row Id="12659" PostHistoryTypeId="1" PostId="6345" RevisionGUID="cb01a145-f9d7-43d0-88e5-50097b4d6dcc" CreationDate="2010-12-09T22:40:01.480" UserId="2469" Text="Quad tree vs Grid based collision detection" />
  <row Id="12660" PostHistoryTypeId="3" PostId="6345" RevisionGUID="cb01a145-f9d7-43d0-88e5-50097b4d6dcc" CreationDate="2010-12-09T22:40:01.480" UserId="2469" Text="&lt;c++&gt;&lt;algorithm&gt;&lt;collision-detection&gt;&lt;2d-physics&gt;" />
  <row Id="12661" PostHistoryTypeId="5" PostId="6343" RevisionGUID="3a3034d2-dc2f-4c3b-82fe-672537c5576e" CreationDate="2010-12-09T22:41:24.710" UserId="3794" Comment="typos correction" Text="My question is why do you wanna to do that? :)&#xD;&#xA;&#xD;&#xA;Separate draw and update into two threads is really important for games performance. But XNA does helps you in this. There are&#xD;&#xA;    &#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;&#xD;&#xA;callbacks. And XNA calls them properly. As you are making some 2D game i'm pretty sure that you dont need multithreading performance benefit. But if you wanna to try multithreading... ok.&#xD;&#xA;&#xD;&#xA;To your question. Data that you want to share between threads seems to be right. But maybe imageOrigin==pivot. And also you are propably not going to change textures every frame, they may be saved in both threads and changed only when needed.&#xD;&#xA;" />
  <row Id="12662" PostHistoryTypeId="5" PostId="6340" RevisionGUID="db4fe86c-c880-47b8-a3fe-5d3549f7f0f4" CreationDate="2010-12-09T22:48:48.353" UserId="3787" Comment="added 154 characters in body; added 6 characters in body; added 2 characters in body; added 164 characters in body" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation ?&#xD;&#xA;    Vector2 Pivot ?&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;**UPDATE 1:**&#xD;&#xA;&#xD;&#xA;Newer values at the moment:&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;&#xD;&#xA;I re-read the tutorial, what I was doing wrong is not that I need to pass all those values, I need to pass only **changed** values as messages." />
  <row Id="12663" PostHistoryTypeId="6" PostId="6262" RevisionGUID="0d46c174-7a11-42ea-955d-6fa5f7603831" CreationDate="2010-12-09T22:51:15.643" UserId="2188" Comment="edited tags" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;math&gt;" />
  <row Id="12664" PostHistoryTypeId="2" PostId="6346" RevisionGUID="cbdb91b0-74bf-40e0-a9d3-0161f255269e" CreationDate="2010-12-09T23:16:46.210" UserId="1716" Text="Very difficult to make out what it is you are asking from this question.&#xD;&#xA;&#xD;&#xA;1) The one thing you might allude to would be the UV clamp mode on a mesh. You bind the texture, render the mesh (of course, depending on ES2.0 shaders or fixed function ES1.1), and make sure the clamp mode is set to wrap.&#xD;&#xA;&#xD;&#xA;Also, for more thorough information, read this page :&#xD;&#xA;http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html" />
  <row Id="12665" PostHistoryTypeId="2" PostId="6347" RevisionGUID="3c7c1433-7f47-43f2-8ad3-e4c7942f7480" CreationDate="2010-12-09T23:19:10.310" UserId="3900" Text="The right answer depends a little bit on the actual game you're designing, and choosing one over the other is really going to require implementing both and doing profiling to find out which one is more time or space efficient on your specific game.  &#xD;&#xA;&#xD;&#xA;Grid detection seems to only apply to detecting collisions between moving objects and a static background.  The biggest advantage to this is that the static background is represented as a contiguous memory array, and each collision lookup is O(1) with good locality if you need to do multiple reads (because entities cover more than one cell in the grid).  The disadvantage, if the static background is large, is that the grid can be rather wasteful of space.  &#xD;&#xA;&#xD;&#xA;If instead you represent the static background as quadtree, then the cost of individual lookups goes up, but because large blocks of the background take up a small amount of space, the memory requirements go down, and so more of the background can sit in the cache.  even if it takes 10 times as many reads to do a lookup in such a structure, if it's all in the cache, it'll still be 10 times faster than a single lookup with a cache miss.  &#xD;&#xA;&#xD;&#xA;If I were faced with the choice?  I'd go with the grid implementation, because it's stupid simple to do, better spend my time on other, more interesting problems.  If I notice that my game is running a little slow, I'll do some profiling and see what could use some help.  If it looks like the game is spending a lot of time doing collision detection, I'd try another implementation, like a quadtree (after exhausting all easy fixes first), and find out if that helped." />
  <row Id="12667" PostHistoryTypeId="2" PostId="6349" RevisionGUID="96caa9da-8fb7-4a63-86fd-19837c538e94" CreationDate="2010-12-09T23:28:38.257" UserId="1716" Text="The developer of TrainYard, a game that was second highest on the app store recently posted in depth information on pricing, marketing and strategy that he noticed while competing with angry birds.&#xD;&#xA;&#xD;&#xA;Read more here :&#xD;&#xA;http://struct.ca/" />
  <row Id="12668" PostHistoryTypeId="2" PostId="6350" RevisionGUID="1dc86e97-1ab3-42f9-afb7-59faca46f2ea" CreationDate="2010-12-09T23:44:12.213" UserId="3854" Text="Greetings&#xD;&#xA;&#xD;&#xA;I've recently created some interest in Overlays for games. Examples can be Steam/Xfire which use these overlays ingame so the user can access their programs while being in a game. I love this idea and I'm wondering how steep the learning curve would be to eventually create such an overlay (not exactly as advanced as the ones mentioned above).&#xD;&#xA;&#xD;&#xA;I'm currently programming mainly in C#, I have no experience with C++ whatsoever nor DirectX. During my education most focus was placed on C# and Java. As I much prefer C# over Java. My skill set for C# isn't bad. As I recently graduated I wouldn't call myself a C# wizard however.&#xD;&#xA;&#xD;&#xA;&lt;br/&gt;&lt;br/&gt;&#xD;&#xA;The main questions I have are:&#xD;&#xA;&#xD;&#xA;Where do I start with my goal to create overlays for games?&lt;br/&gt;&#xD;&#xA;Does anyone here have any experience with it?&lt;br/&gt;&#xD;&#xA;How steep would the learning curve be?&lt;br/&gt;&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;Thank you for your time reading my question!" />
  <row Id="12669" PostHistoryTypeId="1" PostId="6350" RevisionGUID="1dc86e97-1ab3-42f9-afb7-59faca46f2ea" CreationDate="2010-12-09T23:44:12.213" UserId="3854" Text="DirectX Overlay - C# - Learning Curve" />
  <row Id="12670" PostHistoryTypeId="3" PostId="6350" RevisionGUID="1dc86e97-1ab3-42f9-afb7-59faca46f2ea" CreationDate="2010-12-09T23:44:12.213" UserId="3854" Text="&lt;c++&gt;&lt;c#&gt;&lt;directx&gt;" />
  <row Id="12671" PostHistoryTypeId="5" PostId="6340" RevisionGUID="cfe43d73-565f-4e91-a1b5-4f062ecbbe16" CreationDate="2010-12-09T23:54:12.133" UserId="3787" Comment="added 60 characters in body; added 5 characters in body" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation ?&#xD;&#xA;    Vector2 Pivot ?&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;**UPDATE 1:**&#xD;&#xA;&#xD;&#xA;Newer values at the moment:&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    byte Facing (can be left or right, I'll do it with an enum)&#xD;&#xA;&#xD;&#xA;I re-read the tutorial, what I was doing wrong is not that I need to pass all those values, I need to pass only **changed** values as messages." />
  <row Id="12672" PostHistoryTypeId="2" PostId="6351" RevisionGUID="04274d96-4173-4988-a78d-be7575694130" CreationDate="2010-12-10T01:11:38.210" UserDisplayName="proog91" Text="Where I can start learning about simulating rigid bodys 2d and 3d ?" />
  <row Id="12673" PostHistoryTypeId="1" PostId="6351" RevisionGUID="04274d96-4173-4988-a78d-be7575694130" CreationDate="2010-12-10T01:11:38.210" UserDisplayName="proog91" Text="Resources to learn programming rigid body simulation" />
  <row Id="12674" PostHistoryTypeId="3" PostId="6351" RevisionGUID="04274d96-4173-4988-a78d-be7575694130" CreationDate="2010-12-10T01:11:38.210" UserDisplayName="proog91" Text="&lt;physics&gt;" />
  <row Id="12675" PostHistoryTypeId="5" PostId="6347" RevisionGUID="e78d4e6b-8fa8-46d6-801a-72cbe0b67f32" CreationDate="2010-12-10T01:13:16.133" UserId="3900" Comment="added 2264 characters in body" Text="The right answer depends a little bit on the actual game you're designing, and choosing one over the other is really going to require implementing both and doing profiling to find out which one is more time or space efficient on your specific game.  &#xD;&#xA;&#xD;&#xA;Grid detection seems to only apply to detecting collisions between moving objects and a static background.  The biggest advantage to this is that the static background is represented as a contiguous memory array, and each collision lookup is O(1) with good locality if you need to do multiple reads (because entities cover more than one cell in the grid).  The disadvantage, if the static background is large, is that the grid can be rather wasteful of space.  &#xD;&#xA;&#xD;&#xA;If instead you represent the static background as quadtree, then the cost of individual lookups goes up, but because large blocks of the background take up a small amount of space, the memory requirements go down, and so more of the background can sit in the cache.  even if it takes 10 times as many reads to do a lookup in such a structure, if it's all in the cache, it'll still be 10 times faster than a single lookup with a cache miss.  &#xD;&#xA;&#xD;&#xA;If I were faced with the choice?  I'd go with the grid implementation, because it's stupid simple to do, better spend my time on other, more interesting problems.  If I notice that my game is running a little slow, I'll do some profiling and see what could use some help.  If it looks like the game is spending a lot of time doing collision detection, I'd try another implementation, like a quadtree (after exhausting all easy fixes first), and find out if that helped.&#xD;&#xA;&#xD;&#xA;**Edit:** I haven't got a clue how grid collision detection relates to detecting collisions of multiple, mobile entities, but instead, i'll answer how a spatial index (Quadtree) improves detection performance over the iterative solution. The naive (and typically perfectly fine) solution looks sort of like this: &#xD;&#xA;&#xD;&#xA;    foreach actor in actorList:&#xD;&#xA;        foreach target in actorList:&#xD;&#xA;            if (actor != target) and actor.boundingbox intersects target.boundingbox:&#xD;&#xA;                actor.doCollision(target)&#xD;&#xA;&#xD;&#xA;This obviously has performance around O(n^2), with n the number of actors that are currently alive in the game, including bullets and spaceships and aliens.  It can also include small static obstacles.  &#xD;&#xA;&#xD;&#xA;This works fantastically well so long as the number of such items is reasonably small, but starts to look a little poor when there's more than a few hundred objects to check against.  10 objects results in just 100 collision checks, 100 results in 10,000 checks.  1000 results in one million checks.  &#xD;&#xA;&#xD;&#xA;A spatial index (like quadtrees) can efficiently enumerate the items it collects according to geometric relationships.  this would change the collision algorithm to something like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    foreach actor in actorList:&#xD;&#xA;        foreach target in actorIndex.neighbors(actor.boundingbox):&#xD;&#xA;           if (actor != target) and actor.boundingbox intersects target.boundingbox:&#xD;&#xA;                actor.doCollision(target)&#xD;&#xA;&#xD;&#xA;The efficiency of this (assuming a uniform distribution of entities): is usually O(n^1.5 log(n)), since the index takes about log(n) comparisons to traverse, there will be about sqrt(n) neighbors to compare, and there are n actors to check.  Realistically, though, the number of neighbors is always quite limited, since if a collision does occur, most of the time one of the objects is deleted, or moved away from the collision.  thus you get just O(n log(n)).  For 10 entities, you do (about) 10 comparisons, for 100, you do 200, for 1000 you do 3000.  &#xD;&#xA;&#xD;&#xA;A really clever index can even combine the neighbor search with the bulk iteration, and perform a callback on each intersecting entity.  This will give a performance of about O(n), since the index is being scanned once rather than queried n times." />
  <row Id="12676" PostHistoryTypeId="2" PostId="6352" RevisionGUID="357a9743-ee41-4a54-b9bd-49a2de0e04f0" CreationDate="2010-12-10T03:43:23.250" UserId="3905" Text="The Steam API, called Steamworks, is only exposed through C++. Although Steam accepts games written in C# with XNA you will have to write the code that calls the overlay functions in C++. Since all you need to have is a simple function call, the part of your code in C++ can made very small.&#xD;&#xA;From [steampowered.com][1]:&#xD;&#xA;&gt; If you want your game to activate a&#xD;&#xA;&gt; dialog in the Steam overlay, use the&#xD;&#xA;&gt; function&#xD;&#xA;&gt; SteamFriends()-&gt;ActivateGameOverlay().&#xD;&#xA;&gt; It takes the name of the dialog to&#xD;&#xA;&gt; open, or just activates the overlay if&#xD;&#xA;&gt; nothing specified. See ISteamFriends.h&#xD;&#xA;&gt; for more details.&#xD;&#xA;&#xD;&#xA;As for the case of an application such as Xfire, it involves swapping the Direct3D/OpenGL dynamic library the game is using for one that wraps the real one. In the wrapper dll, after the game has been given a chance to draw but before the buffer is swapped, it passes Xfire the rendering context for it to draw the overlays.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="12677" PostHistoryTypeId="2" PostId="6353" RevisionGUID="d466cffe-b022-4167-8398-d9765f5677e7" CreationDate="2010-12-10T03:46:17.617" UserDisplayName="Zorku" Text="With the dymaxion max you've got hexagons laid out in triangles on a flat surface but because the map isn't really flat they are pentagons. If you want to allow the player to keep their orientation when they walk over certain portions you'll need to separate the location maps from how they are actually stored. For things like buildings you could store a little map of rectangle vectors and then just do a harsh job of drawing them at whatever orientation you needed.&#xD;&#xA;&#xD;&#xA;You wouldn't need to always make the interior look like there had been a recent Earthquake because I think the average player shouldn't even bat their eyes about entering a door to the north east but entering into a screen with the front door oriented due south and the whole building on a regular grid. &#xD;&#xA;&#xD;&#xA;Though if you are going to just store buildings and important sites like that then you've done all the work for a soccerball pattern anyway. The end result is that you're storing the world as some non-square pattern and then forcing it into such a grid wherever the player is at.&#xD;&#xA;&#xD;&#xA;There's another alternative though- if you don't give them all that precise an indication of the sphere, like if you just gave them a low precision compass to tell them which of the four orthogonal directions was closest to North, then you could get away with just doing 90 degree rotations for whatever location the player went to. Given the assumed graphics level it isn't as if you have to worry about a tall building obscuring some doorway. So long as they knew if they were near the poles or not they shouldn't get too upset about the compass changing on them, unless the NPCs around there told them to go North East or they try to actually go to specific latitude and longitude coordinates." />
  <row Id="12680" PostHistoryTypeId="2" PostId="6356" RevisionGUID="6501b0f0-43b6-4ca5-8bd2-9e0262a88ac1" CreationDate="2010-12-10T04:59:14.917" UserId="154" Text="Responding to Update #1&#xD;&#xA;&#xD;&#xA;**Pivot**&#xD;&#xA;&#xD;&#xA;Are you planning on rotating the sprites around some point other than their center? If not then this seems like a duplicate of position.&#xD;&#xA;&#xD;&#xA;**Facing**&#xD;&#xA;&#xD;&#xA;Not sure what this is for although with your enum of Left/Right I'm assuming it's for backface culling? If you are just drawing a quad at a 2D point in space then you don't need to worry about which side you are on.&#xD;&#xA;&#xD;&#xA;**Draw Order**&#xD;&#xA;&#xD;&#xA;Your update 1 is still missing a draw order index, which AttackingHobo also mentioned. You'll want that to force some sprites to the top as well as keep them consistent when crossing over one another." />
  <row Id="12681" PostHistoryTypeId="5" PostId="6296" RevisionGUID="7ae9acf5-a336-4709-94e8-3235d50b3a35" CreationDate="2010-12-10T05:03:25.870" UserId="3326" Comment="edited body" Text="Well I agreement with wkerslake I think other strategies which matter are visibility of your app... Like you need to set up a social networking account that can keep tabs on bugs being reported and updated real time... Helps a lot if people who get the app feel like they are being listened to and also helps with your word of mouth spreading..." />
  <row Id="12682" PostHistoryTypeId="2" PostId="6357" RevisionGUID="7d37f996-8833-49a9-9067-38bc0971b7dd" CreationDate="2010-12-10T05:11:47.333" UserId="3830" Text="You're asking a question that people who make maps have been asking for a *long* time :)&#xD;&#xA;&#xD;&#xA;Most definitely go read up on [Map Projectsions][1] to get some insights and ideas that might help.  The challenge of representing the surface of a sphere on/with a flat 2D plane has been something people have been thinking about for a long long time.&#xD;&#xA;&#xD;&#xA;Short answer is, no you can't do it.  That's why when you look at maps of the world, some parts are distorted and some parts aren't.  Usually it's the poles because most maps are about non-polar areas.&#xD;&#xA;&#xD;&#xA;As other answers have said, the answer is to either use a different shape (hexes or triangles for example), or dynamically generate your map on the fly for the user's current viewpoint.&#xD;&#xA;&#xD;&#xA;Square tiles are pretty easy to manage no question, but I don't think creating a tiling hex map is that hard.  &#xD;&#xA;&#xD;&#xA;Here is an older article from GameDev.net you might find useful.  It's about doing isometric and hexagonal tiles on a grid.&#xD;&#xA;&#xD;&#xA;http://www.gamedev.net/reference/articles/article747.asp&#xD;&#xA;&#xD;&#xA;Googling &quot;tiling hex map&quot; will give you a lot of hits, some useful some not.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Map_projection" />
  <row Id="12683" PostHistoryTypeId="2" PostId="6358" RevisionGUID="0f3943b7-f7a4-4ebf-9287-2c2791e9c5a4" CreationDate="2010-12-10T06:17:45.773" UserId="1482" Text="There are a handful of games built with MonoTouch, we just started tracking apps built with it recently, you can see them here:&#xD;&#xA;&#xD;&#xA;http://monotouch.net/Apps&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12684" PostHistoryTypeId="2" PostId="6359" RevisionGUID="c790a601-c2b9-4509-89c2-95e828df05e8" CreationDate="2010-12-10T07:34:46.333" UserId="3276" Text="How do I create unique game Ids which are user friendly.&#xD;&#xA;&#xD;&#xA;so that one user can easily give that game Id to someone else for joining the game.&#xD;&#xA;&#xD;&#xA;I am creating game in Silverlight with C#." />
  <row Id="12685" PostHistoryTypeId="1" PostId="6359" RevisionGUID="c790a601-c2b9-4509-89c2-95e828df05e8" CreationDate="2010-12-10T07:34:46.333" UserId="3276" Text="How do I create unique game Ids which are user friendly" />
  <row Id="12686" PostHistoryTypeId="3" PostId="6359" RevisionGUID="c790a601-c2b9-4509-89c2-95e828df05e8" CreationDate="2010-12-10T07:34:46.333" UserId="3276" Text="&lt;c#&gt;&lt;silverlight&gt;" />
  <row Id="12687" PostHistoryTypeId="2" PostId="6360" RevisionGUID="5cd3fd20-b326-4920-a065-4cfdcd508adc" CreationDate="2010-12-10T07:36:01.600" UserId="2910" Text="I'm undecided if I want to implement this feature in my game at the time or not. I don't want the project to get to far out of control so I'm focusing on core mechanics first.&#xD;&#xA;&#xD;&#xA;Is this a feature that is easy to implement later assuming I data drive everything and store everything?" />
  <row Id="12688" PostHistoryTypeId="1" PostId="6360" RevisionGUID="5cd3fd20-b326-4920-a065-4cfdcd508adc" CreationDate="2010-12-10T07:36:01.600" UserId="2910" Text="Can Achievement systems  be implemented later in development?" />
  <row Id="12689" PostHistoryTypeId="3" PostId="6360" RevisionGUID="5cd3fd20-b326-4920-a065-4cfdcd508adc" CreationDate="2010-12-10T07:36:01.600" UserId="2910" Text="&lt;game-design&gt;" />
  <row Id="12690" PostHistoryTypeId="2" PostId="6361" RevisionGUID="aaab4f13-c8d1-42d6-aea4-633d1bc155f4" CreationDate="2010-12-10T07:45:13.540" UserId="51" Text="Are you asking from the perspective of technicalities of implementing or the ramifications of the design?  Either way, the answer to your question is &quot;yes&quot;.  &#xD;&#xA;&#xD;&#xA;From the technical side of things, generally speaking you just find the hooks in your code that are responding to your achievement events and put in your stat tracking code there.  You might have to add some new things if you're tracking things that aren't exactly discrete events that area already happening in the game (for example: X amount of hours played).&#xD;&#xA;&#xD;&#xA;From the design side of things, well, adding achievements are extrinsic motivators and don't really play too much into the core gameplay loop, except for people who want to seek them out.  So they're pretty safe regardless." />
  <row Id="12691" PostHistoryTypeId="2" PostId="6362" RevisionGUID="d659231b-7303-464e-b620-42ececfc8cb9" CreationDate="2010-12-10T07:50:17.437" UserId="51" Text="If you have an authoritative source, that problem is easy (which I'm assuming if the user is putting in an ID to connect to a game then that is getting redirected using some central server).  Just use an algorithm like http://www.safepasswd.com/ does to make UIDs which are basically dictionary words + small numbers.  If the number of servers is relatively small you could even do a naive algorithm that just picks something random until it isn't currently in use.&#xD;&#xA;&#xD;&#xA;If you want your clients to be the source of the UIDs, you're going to have to throw away the user friendly portion of those IDs.  But it's easier to do on the coding side since you'd just be using System.Guid.NewGuid().ToString().  That is for all intents and purposes guaranteed to be unique 100% of the time.  &lt;a href=&quot;http://stackoverflow.com/questions/39771/is-a-guid-unique-100-of-the-time&quot;&gt;source&lt;/a&gt;" />
  <row Id="12692" PostHistoryTypeId="5" PostId="6362" RevisionGUID="b0edf667-fb33-4257-90f5-8b925424f9c7" CreationDate="2010-12-10T07:57:03.827" UserId="51" Comment="added 94 characters in body" Text="If you have an authoritative source, that problem is easy (which I'm assuming if the user is putting in an ID to connect to a game then that is getting redirected using some central server).  Just use an algorithm like http://www.safepasswd.com/ does to make UIDs which are basically dictionary words + small numbers.  If the number of servers is relatively small you could even do a naive algorithm that just picks something random until it isn't currently in use.&#xD;&#xA;&#xD;&#xA;If you want your clients to be the source of the UIDs, you're going to have to throw away the user friendly portion of those IDs.  But it's easier to do on the coding side since you'd just be using System.Guid.NewGuid().ToString().  That is for all intents and purposes guaranteed to be unique 100% of the time.  &lt;a href=&quot;http://stackoverflow.com/questions/39771/is-a-guid-unique-100-of-the-time&quot;&gt;source&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Then again, GUIDs are a little overkill. It would be easier to remember IPs or usernames b" />
  <row Id="12693" PostHistoryTypeId="2" PostId="6363" RevisionGUID="211411ef-4f4f-44a2-9b0f-40de37a69461" CreationDate="2010-12-10T08:23:09.923" UserId="1716" Text="This seems like a logical answer :) &#xD;&#xA;&#xD;&#xA;1) Read theory on the subject. Understand the higher level concepts first. Check the www.gamedev.net article sections they have plenty, as well as google books. Also, this link has some nice references : http://chrishecker.com/Physics_References&#xD;&#xA;&#xD;&#xA;2) Read existing libraries.&#xD;&#xA;2D - Box2D for 2D physics is a really good reference of rigid body simulation in 2d. http://box2d.org/&#xD;&#xA;2D/3D - http://bulletphysics.org/wordpress/&#xD;&#xA;&#xD;&#xA;3) Implement. This taught me so much about understanding other engines. Start with the simplest of maths, implement it. Even the simplest implementation will boost your understanding of the systems involved." />
  <row Id="12694" PostHistoryTypeId="2" PostId="6364" RevisionGUID="8567b352-2db1-4a18-b187-c7fa715a7488" CreationDate="2010-12-10T08:23:44.057" UserId="2077" Text="One approach would be to use a dictionary, and select words based on a numbering scheme. Perhaps use a unique 32-bit integer to identify each user and for each of 16-bit words, index two disjoint dictionaries (arrays of words). This way, you can represent their id using actual words and it would be unique.&#xD;&#xA;&#xD;&#xA;Another approach would be to implement something similar to what Steam uses: allow users to login with an id they chose themselves, and later let them specify any display id they want. For instance, their login id could be their email and their display name could be their first name. In this way the user can share their unique identifier but also be identified by a name of their choosing." />
  <row Id="12695" PostHistoryTypeId="2" PostId="6365" RevisionGUID="7cc5b0fb-ef1f-4656-a74f-f8f115d17b86" CreationDate="2010-12-10T08:24:40.170" UserId="3276" Text="I was having a discussion with my developer mate on following game design. &#xD;&#xA;&#xD;&#xA;I have a collection of `Move` in the `Game` class. my developer mate is asking me to remove the collection and only have the current move information there.&#xD;&#xA;&#xD;&#xA;what is your suggestions?&#xD;&#xA;&#xD;&#xA;    public class Game&#xD;&#xA;    {&#xD;&#xA;        public String Id { get; set; }&#xD;&#xA;        public String CreatorId { get; set; }&#xD;&#xA;&#xD;&#xA;        public List&lt;Player&gt; Players { get; set; }&#xD;&#xA;        public List&lt;Move&gt; Moves { get; set; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public class Player&#xD;&#xA;    {&#xD;&#xA;        public String Id { get; set; }&#xD;&#xA;        public String Name { get; set; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public class Move&#xD;&#xA;    {&#xD;&#xA;        public String Id { get; set; }&#xD;&#xA;        public String PlayerId { get; set; }&#xD;&#xA;        public String PlayerName { get; set; }&#xD;&#xA;        public String NextMoveId { get; set; }&#xD;&#xA;        public String NextPlayerId { get; set; }&#xD;&#xA;        public String Position { get; set; }&#xD;&#xA;    }" />
  <row Id="12696" PostHistoryTypeId="1" PostId="6365" RevisionGUID="7cc5b0fb-ef1f-4656-a74f-f8f115d17b86" CreationDate="2010-12-10T08:24:40.170" UserId="3276" Text="game design improvement" />
  <row Id="12697" PostHistoryTypeId="3" PostId="6365" RevisionGUID="7cc5b0fb-ef1f-4656-a74f-f8f115d17b86" CreationDate="2010-12-10T08:24:40.170" UserId="3276" Text="&lt;game-design&gt;&lt;c#&gt;" />
  <row Id="12698" PostHistoryTypeId="2" PostId="6366" RevisionGUID="3ffdaeb9-9a82-4b97-a538-a7b47276d81c" CreationDate="2010-12-10T08:47:01.223" UserId="1494" Text="You need the &quot;XBox Controller For Windows&quot;. As far as I know the controller itself is the same, however, you get an adapter that can be used with any XBox controller device. Either that, or the device just ships with the driver CD.&#xD;&#xA;&#xD;&#xA;I would go with [Zaphod42][1]'s advice (just plug the thing in if it's a standard USB device); and if that doesn't work [order one online][2].&#xD;&#xA;&#xD;&#xA;Not 100% sure because I don't own an XBox.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6224/using-xbox-controller-on-pc-for-an-xna-game/6230#6230&#xD;&#xA;  [2]: http://www.microsoft.com/hardware/gaming/productdetails.aspx?pid=091" />
  <row Id="12699" PostHistoryTypeId="2" PostId="6367" RevisionGUID="d53e8832-3a33-4bb9-9f2f-9f185b08dddd" CreationDate="2010-12-10T08:47:56.770" UserId="1716" Text="			package TestBed{&#xD;&#xA;				&#xD;&#xA;				//Do your imports	&#xD;&#xA;				&#xD;&#xA;				public class TestEmptyTest extends Test{&#xD;&#xA;					&#xD;&#xA;					public function TestEmptyTest(){&#xD;&#xA;						//Initialise your objects here&#xD;&#xA;					}&#xD;&#xA;					&#xD;&#xA;					override public function Update():void {&#xD;&#xA;						&#xD;&#xA;						//This is called for you by the Test class&#xD;&#xA;						//But you call this manually, to keep it syncing&#xD;&#xA;						super.Update();&#xD;&#xA;					}&#xD;&#xA;&#xD;&#xA;				} //TestEmptyTest&#xD;&#xA;				&#xD;&#xA;			} //TestBed&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, this is JUST the basic test class. If you throw this into the source path of your project, you should have a fully functional testbed test ready to use. If you want to see WHERE the test is added to the testbed itself, see the Main.as file in the root of the examples folder. This powers the TestBed application. More Notably, Look for the following on line 97 : &#xD;&#xA;&#xD;&#xA;			var tests:Array = [&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can add your test by class name (TestEmptyTest), and it will show up in their list.&#xD;&#xA;&#xD;&#xA;What makes it work?  &#xD;&#xA;&#xD;&#xA;1) Make sure you have the class path able to see the testbed folder&#xD;&#xA;&#xD;&#xA;2) import TestBed.*; will bring the class into the Main.as already&#xD;&#xA;&#xD;&#xA;3) creating a new instance of your class. Their framework does this for you, as long as you add it to their array.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; More importantly, you gave almost no&#xD;&#xA;&gt; information. Some things you might&#xD;&#xA;&gt; want to include :&#xD;&#xA;&gt; &#xD;&#xA;&gt; Version of Flex/Flash (And IDE)&#xD;&#xA;&gt; &#xD;&#xA;&gt; Version of box2dflash&#xD;&#xA;&gt; &#xD;&#xA;&gt; Code snippet of what it is that isn't&#xD;&#xA;&gt; working.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12700" PostHistoryTypeId="5" PostId="6364" RevisionGUID="f9b2667a-369e-4107-9323-20e91dbf4368" CreationDate="2010-12-10T08:52:55.703" UserId="2077" Comment="added 3 characters in body" Text="One approach would be to use a dictionary, and select words based on a numbering scheme. Perhaps use a unique 32-bit integer to identify each user and for each of the 16-bit words, index a dictionary (array of words). This way, you can represent their id using actual words and each identifier would be unique.&#xD;&#xA;&#xD;&#xA;Another approach would be to implement something similar to what Steam uses: allow users to login with an id they chose themselves, and later let them specify any display id they want. For instance, their login id could be their email and their display name could be their first name. In this way the user can share their unique identifier but also be identified by a name of their choosing." />
  <row Id="12701" PostHistoryTypeId="2" PostId="6368" RevisionGUID="16622aa3-a6e6-4cb2-b0c8-c8db76c4a724" CreationDate="2010-12-10T09:06:56.857" UserId="3820" Text="I would say this question isn't related to game design but to software design or software architecture. Anyway, back to topic:&#xD;&#xA;&#xD;&#xA;You question is really short and I can't tell what the classes are for but I will do a educated guess. I think `Game` is your global game context, which contains information several other objects are sharing. &#xD;&#xA;&#xD;&#xA;The main question you should answer is: Does any other object need a list of `Move` or just the current one. &#xD;&#xA;&#xD;&#xA;Sorry for the general answer but I can do bettw with more information." />
  <row Id="12702" PostHistoryTypeId="2" PostId="6369" RevisionGUID="10d95b83-2bd6-42b2-bf71-a703f4b88d48" CreationDate="2010-12-10T09:14:13.940" UserId="1494" Text="One way of tackling this is along the lines of a game called &quot;Heroes of Newerth.&quot; (which changes every +/- 2 weeks) From what I can tell they:&#xD;&#xA;&#xD;&#xA; 1. Use diff patching for the game and replays.&#xD;&#xA; 2. All replays are stored on the cloud. They eventually expire.&#xD;&#xA; 3. If the user wants to watch an old downloaded replay they need to use the &quot;Compatize&quot; button first.&#xD;&#xA; 4. It looks like this either remote diffs to the latest version; or in the event that the replay is no longer stored, uploads it and then does the remote diff.&#xD;&#xA;&#xD;&#xA;Because I don't work at S2 I clearly can't say that is definitely how it works. However, I have noticed a marked download size trend associated with the age of the replay. &#xD;&#xA;&#xD;&#xA;Either that, or they add entity patches to the replay (e.g. spell X has Y effect instead of Z effect). If packet-related information is also stored in the entity configuration this entity hot-patching would allow you to understand older packets as well.&#xD;&#xA;&#xD;&#xA;I definitely wouldn't store historical behaviour on the client because that can get enormous very quickly. Especially when the client is updating from e.g. 10.1.0 to 10.2.0 (as they need to download every patch between the two versions, instead of the final patch).&#xD;&#xA;&#xD;&#xA;Google Protobuf is a good idea as a serialization layer because it supports stuff like this by design." />
  <row Id="12703" PostHistoryTypeId="2" PostId="6370" RevisionGUID="d5e25604-7c3d-4027-a8ba-a2c758038520" CreationDate="2010-12-10T09:46:13.460" UserId="3016" Text="Provided that your game engine is designed well and uses some kind of observable event system (where events are generated and listened for by interested parties), it should be quite easy to &quot;plug-in&quot; an achievement system at a later point (by adding appropriate listeners).  This kind of design is very flexible." />
  <row Id="12706" PostHistoryTypeId="2" PostId="6372" RevisionGUID="2d672a4d-40a6-400f-8475-5c0af8d80d58" CreationDate="2010-12-10T11:35:53.550" UserId="3918" Text="Another great resource on the topic are David Baraff's papers. Here is one of them including source code:&#xD;&#xA;&#xD;&#xA;&quot;An Introduction to Physically Based Modeling&quot;&#xD;&#xA;&#xD;&#xA;http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf" />
  <row Id="12707" PostHistoryTypeId="2" PostId="6373" RevisionGUID="f3386252-7857-4f01-883f-3d48376ca2fe" CreationDate="2010-12-10T11:55:37.897" UserDisplayName="Muhammad" Text="I wan tto give delay in java without using thread. I need to load images one by one with approx half second delay. Is there any way to do this other than thread because if I am using thread my whole game is going into the sleep mode." />
  <row Id="12708" PostHistoryTypeId="1" PostId="6373" RevisionGUID="f3386252-7857-4f01-883f-3d48376ca2fe" CreationDate="2010-12-10T11:55:37.897" UserDisplayName="Muhammad" Text="How to give delay in java" />
  <row Id="12709" PostHistoryTypeId="3" PostId="6373" RevisionGUID="f3386252-7857-4f01-883f-3d48376ca2fe" CreationDate="2010-12-10T11:55:37.897" UserDisplayName="Muhammad" Text="&lt;java&gt;" />
  <row Id="12710" PostHistoryTypeId="2" PostId="6374" RevisionGUID="0a22913c-e31c-48d2-a935-f7abab42a88c" CreationDate="2010-12-10T12:17:50.617" UserId="1923" Text="A source that really helped me was using managed language code libraries. You then have the ability, through reflector, to see the code behind the methods that an engine uses. Much of this 'code behind' isn't available for view online. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The book that had the best influence on my understanding of the subject was this one:&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Game-Physics-Interactive-3d-Technology/dp/1558607404/ref=sr_1_5?s=books&amp;ie=UTF8&amp;qid=1291983195&amp;sr=1-5&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you are going to buy books, consider this well respected one too(it's related to physics):&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/ref=pd_sim_b_1" />
  <row Id="12711" PostHistoryTypeId="2" PostId="6375" RevisionGUID="8d477326-eca2-4744-be78-4b51d74f7a97" CreationDate="2010-12-10T12:25:54.190" UserId="3794" Text="Correct solution is to use another thread for loading images. And the waiting aprox half second is not good. Yours image loading funtion should have some callback to say loading thread that image is loaded." />
  <row Id="12712" PostHistoryTypeId="2" PostId="6376" RevisionGUID="fb2c88b3-faac-4d16-9130-65d386648caa" CreationDate="2010-12-10T12:30:24.013" UserId="741" Text="FuzzYspo0N's answer in the comments is a very good one. Basically this problem boils down to making game IDs unique enough to avoid collisions, without making them arbitrarily complex. Standard 128-bit GUIDs get their uniqueness by using local information (like your MAC and other factors) to make the likelihood of a collision between machines very small, then add a random and time based factor to make the likelihood of a collision within that machine very small.&#xD;&#xA;&#xD;&#xA;You can follow the same strategy to generate your own IDs. Start with something memorable to the user but relatively unique (if the user has a global username that's a good start, or the machine name/IP), and add other factors until you've generated something unique. By picking something local like machine name, you restrict the set of potential collisions enough that you can start to query if there are any. For example, once you've restricted it to just that user, or just that machine, you know exactly where you need to go to check whether or not that UID is already in use.&#xD;&#xA;&#xD;&#xA;For example if I know my username is unique system wide, then MrCranky:1 is a valid UID. If I can check whether MrCranky:1 is already in use (by some other method), then I can just keep trying numbers until I find a unique one.&#xD;&#xA;&#xD;&#xA;By using some other factor (like randomness or time), I can increase the likelihood that I pick an unused ID first time. E.g. If you know you can't feasibly create more than one session a second, then using MrCranky:122730 (the current time, to the second) will get me a unique ID that's relatively memorable to the user.&#xD;&#xA;&#xD;&#xA;As long as you have some piece of relatively unique information (doesn't have to be perfect, just mostly unique), you can use that as a starting block, and that means the truly unique portion (an integer code of some kind) can be much much shorter, and thus the UID is more memorable." />
  <row Id="12713" PostHistoryTypeId="5" PostId="6340" RevisionGUID="09e8f40b-4f02-4a87-86ba-7b07bbdca21c" CreationDate="2010-12-10T13:20:44.413" UserId="3787" Comment="added 380 characters in body; added 17 characters in body; added 2 characters in body; deleted 65 characters in body" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation ?&#xD;&#xA;    Vector2 Pivot ?&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;**UPDATE 1:**&#xD;&#xA;&#xD;&#xA;Newer values at the moment:&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    byte Facing (can be left or right, I'll do it with an enum)&#xD;&#xA;&#xD;&#xA;I re-read the tutorial, what I was doing wrong is not that I need to pass all those values, I need to pass only **changed** values as messages.&#xD;&#xA;&#xD;&#xA;**UPDATE 2:**&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    byte Facing //(can be left or right, I'll do it with an enum) ? (still not sure!)&#xD;&#xA;    uint DrawOrder&#xD;&#xA;    float Scale&#xD;&#xA;    bool Visible ?&#xD;&#xA;&#xD;&#xA;Mhhh, should Visibile be included?" />
  <row Id="12714" PostHistoryTypeId="5" PostId="6375" RevisionGUID="26f4f58a-4b90-4372-aa4e-3c5b9c2a04d5" CreationDate="2010-12-10T14:06:23.287" UserId="3794" Comment="corrected spelling" Text="Correct solution should be to use another thread for loading images. And the waiting aprox half second is not good. Yours image loading funtion should have some callback to say loading thread that image is loaded." />
  <row Id="12715" PostHistoryTypeId="2" PostId="6377" RevisionGUID="36d7e50b-7694-4da9-85ca-e48d095961c4" CreationDate="2010-12-10T14:13:12.183" UserId="3232" Text="It is easy to load 3ds files using: http://code.google.com/p/lib3ds/&#xD;&#xA;&#xD;&#xA;It also comes with a OpenGL sample.&#xD;&#xA;&#xD;&#xA;But I think it is better to use another format, 3ds materials name limitation are a real pain." />
  <row Id="12716" PostHistoryTypeId="2" PostId="6378" RevisionGUID="9db10a46-86bf-4b80-a85b-44112055d648" CreationDate="2010-12-10T15:22:01.547" UserId="1598" Text="An example that came to mind for the situation you described is how Rovio initially launched Angry Birds on android.  Angry Birds for android started by being available only on http://www.getjar.com/ with ad support in game.  Eventually they moved into the android market, as well, but the game was free either way in this case, so revenue would be coming through ads on the android side of things." />
  <row Id="12717" PostHistoryTypeId="2" PostId="6379" RevisionGUID="64cdbcee-7827-43cc-890b-9670677ae3a5" CreationDate="2010-12-10T15:28:38.860" UserId="1598" Text="It looks like [Celtx][1] might be lean more towards what you are looking for.  Free media preproduction suite that focuses on script writing, storyboarding, etc...  I used it for one of my game script writing classes a while back and was pretty happy with the workflow and results.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://www.celtx.com/index.html" />
  <row Id="12718" PostHistoryTypeId="2" PostId="6380" RevisionGUID="dee6108a-d6e2-44d3-8e73-ecea108dd837" CreationDate="2010-12-10T15:51:57.280" UserId="1598" Text="Between the two, I feel that 3ds Max is easier to learn, as the workspaces, panels, and shelves in Maya may be very confusing if you are just starting out with 3D modeling.  The important thing is that you need to learn 3D modeling, not how to us program X.  The disciplines that go with modeling are transferable between any modeling package, so if you feel it it is necessary or are curious of different workflows, it will be easy to get up and running a lot quicker.  In addition to the 30 day trials Autodesk offers for their programs, the offer free 3-year licenses to students at [Autodesk Education][2] .&#xD;&#xA;&#xD;&#xA;If you decide to go the Maya route, I recommend checking out [Digital Tutors][1] as they have lessons that deal specifically with using Maya and XNA together (they also have tons of other great tutorials on getting you up and running, with game modeling specific lessons, in whatever 3D package you decide on).&#xD;&#xA;&#xD;&#xA;[1]:http://www.digitaltutors.com&#xD;&#xA;[2]:http://students.autodesk.com/" />
  <row Id="12719" PostHistoryTypeId="2" PostId="6381" RevisionGUID="cf00d905-86b8-4bcf-a019-df90abee93b2" CreationDate="2010-12-10T16:15:04.340" UserId="3461" Text="i try to make a textured object then draw other without (only colored).&#xD;&#xA;&#xD;&#xA;i had tried to play with glEnable/Disable(GL10.GL_TEXTURE_2D) , 		gl.glEnable/DisableClientState(GL10.GL_COLOR_ARRAY/GL10.GL_TEXTURE_COORD_ARRAY);&#xD;&#xA;&#xD;&#xA;But i never get the result i expect.&#xD;&#xA;&#xD;&#xA;(first colored + textured then others textured and colored too)&#xD;&#xA;(first colored and not textured then other colored and not textured)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i don't know if this is because i don't disable some things at the good place or if i missing something.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12720" PostHistoryTypeId="1" PostId="6381" RevisionGUID="cf00d905-86b8-4bcf-a019-df90abee93b2" CreationDate="2010-12-10T16:15:04.340" UserId="3461" Text="how disable texture after drawing an object ?" />
  <row Id="12721" PostHistoryTypeId="3" PostId="6381" RevisionGUID="cf00d905-86b8-4bcf-a019-df90abee93b2" CreationDate="2010-12-10T16:15:04.340" UserId="3461" Text="&lt;textures&gt;&lt;opengl-es&gt;" />
  <row Id="12722" PostHistoryTypeId="2" PostId="6382" RevisionGUID="7d155ffc-a5cd-4d44-8d89-88800454b098" CreationDate="2010-12-10T16:27:57.500" UserId="3923" Text="I'm trying to create a hexagon world map for my PHP browser based strategy game. I've created a table in my database with the following data per row: id, type, x, y and occupied. Where type is the kind of tiles, which are defined in numbers. For example, 1 is grass. The map itself is 25 x 25.&#xD;&#xA;&#xD;&#xA;I want to draw the map from the database with clickable tiles and the possibilty to navigate through the map with arrows. I don't really have a clue on how to start with this and any help would be appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance,&#xD;&#xA;&#xD;&#xA;Fabian" />
  <row Id="12723" PostHistoryTypeId="1" PostId="6382" RevisionGUID="7d155ffc-a5cd-4d44-8d89-88800454b098" CreationDate="2010-12-10T16:27:57.500" UserId="3923" Text="How to create a hexagon world map in PHP from a database for a browser based strategy game" />
  <row Id="12724" PostHistoryTypeId="3" PostId="6382" RevisionGUID="7d155ffc-a5cd-4d44-8d89-88800454b098" CreationDate="2010-12-10T16:27:57.500" UserId="3923" Text="&lt;php&gt;" />
  <row Id="12725" PostHistoryTypeId="6" PostId="6382" RevisionGUID="5069fdf7-ea42-46bf-9884-f19b25870669" CreationDate="2010-12-10T16:39:19.413" UserId="1156" Comment="edited tags" Text="&lt;web&gt;&lt;tiles&gt;&lt;php&gt;&lt;strategy&gt;" />
  <row Id="12726" PostHistoryTypeId="2" PostId="6383" RevisionGUID="0abf6e95-4f92-4282-b4e3-2fefed67acb3" CreationDate="2010-12-10T16:46:47.060" UserId="1598" Text="My thoughts are that as the data is read in from the database, each tile will be created as a square image with a hexagonal image map in whatever position specified by your (x,y) point. Which means you'll have to create your tile images as hexagons with a surrounding empty alpha channel, so that you can overlap your tiles a little bit to make them appear to fit together.  You may want to look into jQuery to help polish up the graphics and UI side of things (animation, quicker and easier ajax, easy event handling, etc..)." />
  <row Id="12727" PostHistoryTypeId="2" PostId="6384" RevisionGUID="ea6225d9-11bc-4b75-8af0-bdb570519e7f" CreationDate="2010-12-10T16:49:58.043" UserId="1156" Text="I'm afraid I don't speak PHP, so I can't do code examples. However, here is a nice list of resources that may help you. :)&#xD;&#xA;&#xD;&#xA;[Here is a nice list][1] of isometric/hexagonal grid articles on Gamedev; ranging from [how to deal with hexagonal coords][2] to [caching tiles][3]. (Of course, some of the stuff won't be relevant since it's mostly...what's the word? on a PC not a web browser.)  &#xD;&#xA;&#xD;&#xA;As for the graphical display, simply add transparency to a square image of a hexagonal tile.  &#xD;&#xA;&#xD;&#xA;'Clickable' would be something like:&#xD;&#xA;&#xD;&#xA;    if mouse button down on app:  &#xD;&#xA;    take screen coordinates of mouse  &#xD;&#xA;    Compare to screen coordinates of tiles&#xD;&#xA;&#xD;&#xA;I have no idea of how much in the way of user events and database-hooking-up-to PHP has, so you might have to look into other languages and frameworks for that.&#xD;&#xA;&#xD;&#xA;I wish you luck. :)&#xD;&#xA;  [1]: http://www.gamedev.net/reference/list.asp?categoryid=44&#xD;&#xA;  [2]: http://www.gamedev.net/reference/articles/article1800.asp&#xD;&#xA;  [3]: http://www.gamedev.net/reference/articles/article847.asp" />
  <row Id="12728" PostHistoryTypeId="2" PostId="6385" RevisionGUID="69fb261a-7758-467d-a980-de524246b0e5" CreationDate="2010-12-10T17:19:32.500" UserId="241" Text="You should write a small javascript tile layout engine that maps the database tile coordinates into a view on the web page, because this lets you outsource the cpu processing time to the players computer. It's not hard to do and you can do it in few pages of code.&#xD;&#xA;&#xD;&#xA;So essentially you'll be writing a thin layer of PHP of which only purpose is to deliver coordinate data to the client from your database, preferably on response to AJAX call from your web page. You would likely be using a JSON data format for easy parsing, and then the map generating and displaying part would be written in javascript, and executed on client using a library like jQuery as suggested by numo16. This part is relatively easy to do and same concepts apply as in real game applications so communist ducks list of articles will explain you the hex displaying part. &#xD;&#xA;&#xD;&#xA;For the displaying of map graphics on the players screen i would recommend that you use the [CSS Sprites][1] technique that lets you store all of your map tiles in a single file. For positioning you would use absolute coordinates for the tiles within a relatively positioned container div, perhaps combined with a overflow clipping to trim the map edges to be square instead of the jagged line hex tiles make. Combined with jQuery events you can make your map clickable and nice looking. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.alistapart.com/articles/sprites &quot;CSS Sprites&quot;" />
  <row Id="12729" PostHistoryTypeId="5" PostId="6385" RevisionGUID="e0a5ef9f-c400-4092-965d-8142156f7108" CreationDate="2010-12-10T17:26:28.527" UserId="241" Comment="improved formatting" Text="You should write a small javascript tile layout engine that maps the database tile coordinates into a view on the web page, because this lets you outsource the cpu processing time to the players computer. It's not hard to do and you can do it in few pages of code.&#xD;&#xA;&#xD;&#xA;So essentially you'll be writing a thin layer of PHP of which only purpose is to deliver coordinate data to the client from your database, preferably on response to AJAX call from your web page. You would likely be using a JSON data format for easy parsing, and then the map generating and displaying part would be written in javascript, and executed on client using a library like jQuery as suggested by numo16. This part is relatively easy to do and same concepts apply as in real game applications so communist ducks list of articles will explain you the hex displaying part. &#xD;&#xA;&#xD;&#xA;For the displaying of map graphics on the players screen I would recommend that you use the [CSS Sprites][1] technique that lets you store all of your map tiles in a single file. For positioning you would use absolute coordinates for the tile image wrapped in a div, which again are in a relatively positioned container div. &#xD;&#xA;&#xD;&#xA;If you apply jQuery click events to these image wrapping divs you can make the map clickable easily without having to manually track mouse positions as suggested. Style the container div with a overflow clipping to trim the map edges to be square instead of the jagged line hex tiles to make the map nice looking. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.alistapart.com/articles/sprites &quot;CSS Sprites&quot;" />
  <row Id="12730" PostHistoryTypeId="2" PostId="6386" RevisionGUID="9cd68854-bd61-4e22-8b62-cf2db6e9b614" CreationDate="2010-12-10T17:47:05.880" UserId="2132" Text="Say for a game with irregular hotspots (say Risk, or a strategy game like Paradox's Hearts of Iron or Crusader Kings), how do you&#xD;&#xA;&#xD;&#xA;1. Define a non-rectangular hotspot of irregular shape (much like a territory on a map?), in code?&#xD;&#xA;&#xD;&#xA;2. What tool can you use to trace out the hotspot and import into your game?&#xD;&#xA;&#xD;&#xA;3. What is the algorithm for detecting if someone has clicked within such a hotspot?" />
  <row Id="12731" PostHistoryTypeId="1" PostId="6386" RevisionGUID="9cd68854-bd61-4e22-8b62-cf2db6e9b614" CreationDate="2010-12-10T17:47:05.880" UserId="2132" Text="Creating  non-rectangular hotspots and detecting clicks" />
  <row Id="12732" PostHistoryTypeId="3" PostId="6386" RevisionGUID="9cd68854-bd61-4e22-8b62-cf2db6e9b614" CreationDate="2010-12-10T17:47:05.880" UserId="2132" Text="&lt;algorithm&gt;&lt;gui&gt;" />
  <row Id="12733" PostHistoryTypeId="2" PostId="6387" RevisionGUID="ce3a3cf0-67a1-4c67-85cd-e16806702109" CreationDate="2010-12-10T17:49:56.907" UserId="51" Text="You can define an arbitrary shape as just a series of points that are turned into line segments.&#xD;&#xA;&#xD;&#xA;The collision test for &quot;am I inside this arbitrary shape&quot; is given by my answer here: http://gamedev.stackexchange.com/questions/244/cocos2d-collision-detection-against-a-random-shape/260#260" />
  <row Id="12734" PostHistoryTypeId="2" PostId="6388" RevisionGUID="4bd8b7c0-9359-4bd1-9c8e-9b13bbc7ef46" CreationDate="2010-12-10T17:55:51.670" UserId="3830" Text="You'll need to define the hotspots as a series of polygons that overlay your image.  Then, when a user clicks on the map, go through the list of polygons (clickable hotspots) and see which (if any) the click point is inside of.&#xD;&#xA;&#xD;&#xA;Also, you might look into how imagemaps in HTML are done.  Not that you will be working with HTML, but basically they are essentially what you want to implement.  They allow for defining hotspots as rectangles, circles, and polygons (which is what you want).&#xD;&#xA;&#xD;&#xA;Here's a webpage describing HTML image maps that might give you some ideas:  http://www.javascriptkit.com/howto/imagemap.shtml&#xD;&#xA;&#xD;&#xA;Here's a Wikipedia article on algorithms to tell if a point is in a polygon:  http://en.wikipedia.org/wiki/Point_in_polygon" />
  <row Id="12735" PostHistoryTypeId="2" PostId="6389" RevisionGUID="9f1a3691-6150-445c-b0e1-c77f35774d7f" CreationDate="2010-12-10T18:56:39.320" UserId="3455" Text="You could also use the players email address as a unique identifier, I'm sure they can remember that :)" />
  <row Id="12736" PostHistoryTypeId="2" PostId="6390" RevisionGUID="9cc93dae-da21-484f-b047-0ce0cbd3669f" CreationDate="2010-12-10T19:39:15.153" UserDisplayName="Tim Speed" Text="The two angles from the polar coordinate system are defined as hRotation and vRotation&#xD;&#xA;&#xD;&#xA;This is how they are converted from polar to cartesian:&#xD;&#xA;&#xD;&#xA;        // Get the distance between the object and the camera&#xD;&#xA;        float distance = cam.getLocation().distance(RotationTarget);&#xD;&#xA;&#xD;&#xA;        Vector3f pos = new Vector3f(distance * FastMath.sin(vRotation) * FastMath.cos(hRotation),&#xD;&#xA;                                    distance * FastMath.cos(vRotation),&#xD;&#xA;                                    distance * FastMath.sin(vRotation) * FastMath.sin(hRotation));&#xD;&#xA;&#xD;&#xA;        // Add in the objects position to make the new relative position of the camera&#xD;&#xA;        pos = pos.add(RotationTarget);&#xD;&#xA;        cam.setLocation(pos);&#xD;&#xA;&#xD;&#xA;Now the problem is when I try to get hRotation and vRotation from cartesian coordinates for the to initialize hRotation and vRotation, rather than setting them to an arbitrary value and having the camera jump each time. The camera is generally free roaming &quot;a fly cam&quot; but when an object is selected, the user can hold shift to rotate the camera around the object. So I need to base hRotation and vRotation off of the coordinates of camera and object, here is my code so far, but the issue is that the Camera will mirror its rotation rather than allowing me to fully rotate. For instance I can rotate to the left but it snaps to opposite angle from the right. I know I probably need to invert the angle when something is less than something, but I can't figure out what it is...&#xD;&#xA;&#xD;&#xA;        float distance = cam.getLocation().distance(RotationTarget);&#xD;&#xA;        &#xD;&#xA;        Vector3f diff = cam.getLocation().subtract(RotationTarget);&#xD;&#xA;&#xD;&#xA;        vRotation = FastMath.acos(diff.y / distance);&#xD;&#xA;        hRotation = FastMath.asin(diff.z / FastMath.sqrt((diff.x * diff.x) + (diff.z * diff.z)));&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;-Tim" />
  <row Id="12737" PostHistoryTypeId="1" PostId="6390" RevisionGUID="9cc93dae-da21-484f-b047-0ce0cbd3669f" CreationDate="2010-12-10T19:39:15.153" UserDisplayName="Tim Speed" Text="Can't figure get the conversion from cartesian to spherical(&quot;polar&quot;) correctly for my orbiting camera" />
  <row Id="12738" PostHistoryTypeId="3" PostId="6390" RevisionGUID="9cc93dae-da21-484f-b047-0ce0cbd3669f" CreationDate="2010-12-10T19:39:15.153" UserDisplayName="Tim Speed" Text="&lt;game-mechanics&gt;&lt;camera&gt;&lt;rotation&gt;" />
  <row Id="12739" PostHistoryTypeId="2" PostId="6391" RevisionGUID="2b5b1d8b-3b55-4088-88c9-eb0d51ffb097" CreationDate="2010-12-10T20:15:35.827" UserId="2187" Text="By using acos you are limiting vRotation to the range [0,pi], and by using asin you are limiting hRotation to the range [-pi/2, pi/2]. In other words, you are only able to get half the period of the trig functions in each case. To fix this you need to check some cases (CAST rule). " />
  <row Id="12740" PostHistoryTypeId="2" PostId="6392" RevisionGUID="8dfe58e5-ac69-47ce-882f-14d32982bdc1" CreationDate="2010-12-10T20:58:42.687" UserId="1232" Text="Besides the vector/polygon approach, another way to do this is to use a bitmap.&#xD;&#xA;&#xD;&#xA;If each &quot;color&quot; in the bitmap represents a territory (France, Belgium etc.), then it's simply a matter of figuring out which pixel in the bitmap was clicked, looking up the color and determining if that color represents the territory of interest. You can even represent overlapping territories with specific colors, or treat your colors as a bitmask of territories.&#xD;&#xA;&#xD;&#xA;In terms of tools, have your artists/content producer author the bitmap in any pixel editing tool. For example if you use Photoshop or the Gimp, you could represent different territories (France, Belgium etc.) as either named layers or as 1 layer but distinguishing the territories based on colors. You would then write a tool to convert the image/layers into a format that is suitable for game-internal purposes.&#xD;&#xA;&#xD;&#xA;The game internal format would very likely be per-row run-length compressed (see: http://en.wikipedia.org/wiki/Run-length_encoding). You should be able to achieve very good compression ratios this way, as adjacent pixels on rows will very often belong to the same territory. The algorithm then becomes, for the current y coordinate of the mouse, traverse that row and figure out which run it belongs to, and therefore which corresponding territory." />
  <row Id="12741" PostHistoryTypeId="2" PostId="6393" RevisionGUID="7213c802-7c9a-4e59-a463-202946352b3e" CreationDate="2010-12-10T21:50:42.353" UserId="721" Text="You can use [YAAM][1], an alternative market, with Paypal paiement. Like the market, there is an application which manages update.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://yaam.mobi" />
  <row Id="12742" PostHistoryTypeId="5" PostId="6393" RevisionGUID="38fe46bc-a991-430f-baf1-daf591d996bc" CreationDate="2010-12-10T21:56:50.803" UserId="721" Comment="added 131 characters in body" Text="You can use [YAAM][1], an alternative market, with Paypal paiement. Like the market, there is an application which manages update. For Moblox(our game) customers, it is very easy.&#xD;&#xA;&#xD;&#xA;YAAM is an open source product, so you can developp your own Market if you want.&#xD;&#xA;&#xD;&#xA;  [1]: http://yaam.mobi" />
  <row Id="12743" PostHistoryTypeId="2" PostId="6394" RevisionGUID="f6ac060f-6480-4fa4-9a31-8e41c917a035" CreationDate="2010-12-10T21:57:34.833" UserId="1232" Text="glDisable(GL_TEXTURE_2D) should do it, unless you have other texture targets enabled (eg. GL_TEXTURE_1D, GL_TEXTURE_3D or GL_TEXTURE_CUBE_MAP)&#xD;&#xA;&#xD;&#xA;As a debugging mechanism, try use glPushAttrib(GL_ALL_ATTRIB_BITS) before setting up any state for your textured rendering, then use glPopAttrib() afterwards. Move the push and pop down/up until you find out what state is causing your subsequent objects to be textured incorrectly, and then fix it and remove the push/pops.&#xD;&#xA;&#xD;&#xA;Failing that, use gDEBugger, an OpenGL debugger to try narrow down your problem. This debugger was recently made free! (see: http://www.gremedy.com/purchase.php)" />
  <row Id="12744" PostHistoryTypeId="2" PostId="6395" RevisionGUID="160e77e8-1b52-46ae-b12d-c1cb04b77b48" CreationDate="2010-12-10T22:50:02.887" UserDisplayName="Tim Speed" Text="Thanks for the help! I finally got it to work the way I wanted. Here is the code:&#xD;&#xA;&#xD;&#xA;        float distance = cam.getLocation().distance(RotationTarget);&#xD;&#xA;        Vector3f diff = cam.getLocation().subtract(RotationTarget);&#xD;&#xA;&#xD;&#xA;        vRotation = FastMath.acos(diff.y / distance);&#xD;&#xA;        hRotation = FastMath.acos(diff.x / FastMath.sqrt((diff.x * diff.x) + (diff.z * diff.z)));&#xD;&#xA;        if (diff.z &lt; 0)&#xD;&#xA;            hRotation = -hRotation;" />
  <row Id="12745" PostHistoryTypeId="2" PostId="6396" RevisionGUID="23c01392-b47c-4b01-8c27-12957a7235d3" CreationDate="2010-12-10T23:15:01.303" UserId="3787" Text="Are there any performance issue related with lots of &quot;new&quot; calls and things like that?&#xD;&#xA;Did anyone test it?&#xD;&#xA;Something to take care of?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="12746" PostHistoryTypeId="1" PostId="6396" RevisionGUID="23c01392-b47c-4b01-8c27-12957a7235d3" CreationDate="2010-12-10T23:15:01.303" UserId="3787" Text="Farseer: what are its performance on xbox360?" />
  <row Id="12747" PostHistoryTypeId="3" PostId="6396" RevisionGUID="23c01392-b47c-4b01-8c27-12957a7235d3" CreationDate="2010-12-10T23:15:01.303" UserId="3787" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;performance&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="12748" PostHistoryTypeId="2" PostId="6397" RevisionGUID="b2a0f672-4ba4-456d-b951-c2e1f446e4c8" CreationDate="2010-12-10T23:38:22.563" UserId="450" Text="you said that you don't want to use &quot;thread&quot; because your whole game sleeps. I think you are referring to Thread.sleep(). This is just one static method in the Thread class. The main purpose of the Thread class is to allow parallel execution. So the idea is to execute the image loading code in parallel to your normal processing.&#xD;&#xA;&#xD;&#xA;    Thread imageLoadingThread = new Thread(new Runnable() {&#xD;&#xA;        public void run() {&#xD;&#xA;            // loop to load image&#xD;&#xA;                // load image&#xD;&#xA;                try {&#xD;&#xA;                    Thread.sleep(500);&#xD;&#xA;                } catch (InterruptedException e) {&#xD;&#xA;                    e.printStackTrace();&#xD;&#xA;                }&#xD;&#xA;            // end loop&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;    imageLoadingThread.start();&#xD;&#xA;&#xD;&#xA;The Thread.sleep(500) call will now only put the new image loading thead to sleep while the rest of the game continues to be executed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: I assumed that you need the delay in order to keep load on the server low. If the delay is needed in order to wait until the image is loaded completely on the client side, a different approach would be better." />
  <row Id="12749" PostHistoryTypeId="2" PostId="6398" RevisionGUID="5dcf26ec-32dd-4ee6-828d-db2fbf7b48dc" CreationDate="2010-12-11T00:32:27.393" UserId="288" Text="I made a [platformer][1] using Farseer 2. I had no performance issues except for garbage collection, as you mention. There were perhaps three places were I had to fix garbage collection issues, because it was allocating memory during running. These were easy to find by using the [CLR Profiler][2] on Windows.&#xD;&#xA;&#xD;&#xA;My impression is that Farseer is one of the better-tuned physics engines for Xbox 360 performance.&#xD;&#xA;&#xD;&#xA;Farseer 3 is a different code base entirely. But I imagine that the performance story is similar or better.&#xD;&#xA;&#xD;&#xA;So my advice is - get the source version and build it with your application. Then test your application with the CLR Profiler. That way you'll find any allocation issues in your own code, and perhaps in Farseer if they exist, and be able to fix them. Basically you want to never see an allocation while your game is playing.&#xD;&#xA;&#xD;&#xA;(The [other method][3] for keeping garbage collection fast - by keeping your object tree simple - isn't really feasible for non-trivial physics scenes.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://andrewrussell.net/dark/&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&#xD;&#xA;  [3]: http://blogs.msdn.com/b/shawnhar/archive/2007/07/02/twin-paths-to-garbage-collector-nirvana.aspx" />
  <row Id="12750" PostHistoryTypeId="2" PostId="6399" RevisionGUID="69cb894d-66b8-4c33-b177-d85526618253" CreationDate="2010-12-11T01:00:47.733" UserId="3929" Text="If you don't want to wait for XNA support, there's a lot of work being done on several fronts with support for a number of languages (C++, C#, Java, JavaScript, ...) under Windows, Mac and Linux.&#xD;&#xA;&#xD;&#xA;(sorry I can't post more than 1 link so you'll have to Google the sites in bold)&#xD;&#xA;&#xD;&#xA;I usually follow **Freenect** for 0-day Kinect updates and crazy hacks. Otherwise keep an eye on the Open Source **OpenKinect** project, who have also released code you can get started with. Another important starting spot is the **Code Laboratories SDK for Kinect** otherwise known as **CL NUI** which also includes samples in (at least) C#. We just picked up a Kinect a few hours ago and got immediately started using [this C# project][1].&#xD;&#xA;&#xD;&#xA;**NOTE**: Some projects require the CL NUI driver (such as the last link) and some require libusb-win32 or an equivalent USB driver which has support for the Kinect.&#xD;&#xA;&#xD;&#xA;  [1]: http://get.essexconsolerepairs.co.uk/kinecttouch/" />
  <row Id="12751" PostHistoryTypeId="2" PostId="6400" RevisionGUID="e876e507-a1d0-4f16-ba2a-803277d4d76c" CreationDate="2010-12-11T02:10:19.317" UserId="825" Text="After some research online, I am unable to find any concrete references for how to go about implementing Facebook functionality from either Xbox 360 or PS3 games.  There is apparently some degree of integration, but how does one go about hooking into Facebook's API from within a console title?&#xD;&#xA;&#xD;&#xA;Is there any How To documentation online?  Or alternatively, is anyone aware of a developer that specializes in incorporating this type of functionality in an existing codebase?&#xD;&#xA;&#xD;&#xA;Thanks for your help!" />
  <row Id="12752" PostHistoryTypeId="1" PostId="6400" RevisionGUID="e876e507-a1d0-4f16-ba2a-803277d4d76c" CreationDate="2010-12-11T02:10:19.317" UserId="825" Text="How to integrate PS3 &amp; Xbox 360 games to Facebook?" />
  <row Id="12753" PostHistoryTypeId="3" PostId="6400" RevisionGUID="e876e507-a1d0-4f16-ba2a-803277d4d76c" CreationDate="2010-12-11T02:10:19.317" UserId="825" Text="&lt;xbox360&gt;&lt;facebook&gt;&lt;playstation3&gt;&lt;api&gt;" />
  <row Id="12754" PostHistoryTypeId="2" PostId="6401" RevisionGUID="6c4d7326-891b-49ae-9965-a82685c4021f" CreationDate="2010-12-11T02:28:17.360" UserId="825" Text="I'm wondering if there are existing forums, or sites similar to this one, that are targeted specifically to PS3 developers, or possibly, targeted specifically towards Xbox 360 developers?  Is all of this information proprietary, and therefore &quot;secret,&quot; or do communities of developers for these platforms exist?&#xD;&#xA;&#xD;&#xA;Thanks as always!" />
  <row Id="12755" PostHistoryTypeId="1" PostId="6401" RevisionGUID="6c4d7326-891b-49ae-9965-a82685c4021f" CreationDate="2010-12-11T02:28:17.360" UserId="825" Text="Are there existing forums/QA sites specific to PS3 or Xbox360 development?" />
  <row Id="12756" PostHistoryTypeId="3" PostId="6401" RevisionGUID="6c4d7326-891b-49ae-9965-a82685c4021f" CreationDate="2010-12-11T02:28:17.360" UserId="825" Text="&lt;xbox360&gt;&lt;playstation3&gt;" />
  <row Id="12757" PostHistoryTypeId="2" PostId="6402" RevisionGUID="e45bb191-14ed-481c-9f27-d3fedb3aa021" CreationDate="2010-12-11T02:36:57.433" UserId="2111" Text="I've been trying to make my character unable to go up steep hills, but I just can't manage to make it work. I'm using a simple height map which stores the height for every (x, z) point within the map.&#xD;&#xA;I've tried to do this(using C# and XNA):&#xD;&#xA;&#xD;&#xA;    float height1 = TerrainHeightAt(cam.Position);&#xD;&#xA;    float height2 = TerrainHeightAt(cam.Position + cam.GetVelocity());&#xD;&#xA;    //If the difference between the two is bigger than a certain constant, don't move.&#xD;&#xA;&#xD;&#xA;Basically I find the current height and the future height of the camera. Then, I check if the character is attempting to go up a too steep hill, and if so, I prevent the character from moving. This is not working and I can't see why it isn't.&#xD;&#xA;&#xD;&#xA;So my question is:&#xD;&#xA;**What am I doing wrong?** I would appreciate any link(specially using XNA, but general articles would be great too) showing how to achieve this.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="12758" PostHistoryTypeId="1" PostId="6402" RevisionGUID="e45bb191-14ed-481c-9f27-d3fedb3aa021" CreationDate="2010-12-11T02:36:57.433" UserId="2111" Text="How to prevent a character from going up a steep hill with a height map?" />
  <row Id="12759" PostHistoryTypeId="3" PostId="6402" RevisionGUID="e45bb191-14ed-481c-9f27-d3fedb3aa021" CreationDate="2010-12-11T02:36:57.433" UserId="2111" Text="&lt;xna&gt;&lt;c#&gt;&lt;maps&gt;" />
  <row Id="12760" PostHistoryTypeId="2" PostId="6403" RevisionGUID="0e6ffd20-e815-4167-8f97-195e4df863da" CreationDate="2010-12-11T02:42:35.197" UserId="998" Text="Over the past 5 or so years, Microsoft has released APIs / that is intended to replace older APIs:&#xD;&#xA;&#xD;&#xA;  * (2006) Direct3D10&#xD;&#xA;  * (2009) Direct3D11&#xD;&#xA;&#xD;&#xA;  * (2008) XAudio2 / _deprecates DirectSound_&#xD;&#xA;  * (2006) Windows Media Foundation / _replaces DirectShow_&#xD;&#xA;&#xD;&#xA;But &lt;a href=&quot;http://tech.slashdot.org/story/10/10/03/1240252/66-of-All-Windows-Users-Still-Use-Windows-XP?from=rss&quot;&gt;66% of Windows users are still on Windows XP&lt;/a&gt; as of Oct 2010.&#xD;&#xA;&#xD;&#xA;Win XP doesn't and won't have:&#xD;&#xA;&#xD;&#xA;  * Windows Media Foundation&#xD;&#xA;  * Direct2D&#xD;&#xA;  * DirectWrite&#xD;&#xA;  * D3D10&#xD;&#xA;  * D3D11&#xD;&#xA;&#xD;&#xA;There's a lot of cool stuff in these API's!  My question is __is there any point, as a game dev, in migrating to the newer technology while you still have to support the old technology and provide a similar gaming experience?__&#xD;&#xA;&#xD;&#xA;Microsofts refusal to support D3D 11 on XP means there are some cool shader FX that are only supported on Windows 7 machines, such as &lt;a href=&quot;http://knol.google.com/k/hlsl-shaders#&quot;&gt;geometry shaders&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://knol.google.com/k/-/-/2lijysgth48w1/8oyyfu/image2.png&quot; /&gt;&#xD;&#xA;&#xD;&#xA;But its generally not that acceptable to say something like &quot;Hey those cool geometry shader FX only show up __if you're running Windows 7!__&quot;  Suddenly you as a game developer are part of the angry microsoft upgrade push.&#xD;&#xA;&#xD;&#xA;&lt;blockquote&gt;&#xD;&#xA;UPGRADE YOUR SYSTEM SO YOU CAN PLAY THE GAME!&lt;br /&gt;&#xD;&#xA;&#xD;&#xA;love,&lt;br /&gt;&#xD;&#xA;Microsoft&#xD;&#xA;&lt;/blockquote&gt;&#xD;&#xA;&#xD;&#xA;My point is, if I write code for D3D11, and then I'm going to have to double-up and dupe the rendering code on D3D9 and work extra hard to manually reproduce the stuff that APIs like DirectWrite do for me so easily, __why should I bother learning D3D11 at all__?&#xD;&#xA;" />
  <row Id="12761" PostHistoryTypeId="1" PostId="6403" RevisionGUID="0e6ffd20-e815-4167-8f97-195e4df863da" CreationDate="2010-12-11T02:42:35.197" UserId="998" Text="Microsoft and media - using the new stuff" />
  <row Id="12762" PostHistoryTypeId="3" PostId="6403" RevisionGUID="0e6ffd20-e815-4167-8f97-195e4df863da" CreationDate="2010-12-11T02:42:35.197" UserId="998" Text="&lt;directx&gt;" />
  <row Id="12763" PostHistoryTypeId="2" PostId="6404" RevisionGUID="10b1753b-6164-4615-be07-225a3f5d68d6" CreationDate="2010-12-11T03:29:29.527" UserId="962" Text="That 66% percent of users on XP are not 60% of gamers who can run an intensive game. For that I would look more toward the [Steam Hardware Survey.][1] As of November 2010, almost 60% of Steam Gamers have a DX10 system.&#xD;&#xA;&#xD;&#xA;From what I understand DX11 is really similar DX10, but has some new features. It seems like you could write a 9 and 10 version and if you really want to use some extra features to enable eye-candy you could also port the 10 version pretty easily and support the new features.&#xD;&#xA;&#xD;&#xA;**And to answer why you should learn it, I think you should learn it if you want the features it provides, if you don't want or need them, don't learn it.**&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/hwsurvey/" />
  <row Id="12764" PostHistoryTypeId="2" PostId="6405" RevisionGUID="802294f5-0493-4620-84fb-5ff65d46287a" CreationDate="2010-12-11T03:37:14.543" UserId="395" Text="PS3 DevNet has forums I think, but I've never used them. MS provides developer support via email, but no list/forum that I've seen. In both cases you need to have a contract with them and be under NDA yada yada. If you are doing XNA/CC for the Xbox there are plenty of forums for that at least. There are some forums out there that have more than their fair share of professional devs, but thats all unofficial." />
  <row Id="12765" PostHistoryTypeId="2" PostId="6406" RevisionGUID="e5ea1de4-d2a3-498d-b8e8-7ec464c8a730" CreationDate="2010-12-11T06:07:37.170" UserId="2692" Text=" [Irrlicht Tutorials][1] This link explains the triangle selection and ray casting, just need to convert screen to the world coords.&#xD;&#xA;&#xD;&#xA;    scene::ITriangleSelector* selector = 0;&#xD;&#xA;    scene::IAnimatedMeshSceneNode* node = 0;&#xD;&#xA;&#xD;&#xA;        // Add an MD2 node, which uses vertex-based animation.&#xD;&#xA;        node = smgr-&gt;addAnimatedMeshSceneNode(smgr-&gt;getMesh(&quot;../../media/faerie.md2&quot;),&#xD;&#xA;                                                0, IDFlag_IsPickable | IDFlag_IsHighlightable); &#xD;&#xA;        node-&gt;setPosition(core::vector3df(-70,-15,-120)); // Put its feet on the floor.&#xD;&#xA;        node-&gt;setScale(core::vector3df(2, 2, 2)); // Make it appear realistically scaled&#xD;&#xA;        node-&gt;setMD2Animation(scene::EMAT_POINT);&#xD;&#xA;        node-&gt;setAnimationSpeed(20.f);&#xD;&#xA;        video::SMaterial material;&#xD;&#xA;        material.setTexture(0, driver-&gt;getTexture(&quot;../../media/faerie2.bmp&quot;));&#xD;&#xA;        material.Lighting = true;&#xD;&#xA;        material.NormalizeNormals = true;&#xD;&#xA;        node-&gt;getMaterial(0) = material;&#xD;&#xA;&#xD;&#xA;        // Now create a triangle selector for it.  The selector will know that it&#xD;&#xA;        // is associated with an animated node, and will update itself as necessary.&#xD;&#xA;        selector = smgr-&gt;createTriangleSelector(node);&#xD;&#xA;        node-&gt;setTriangleSelector(selector);&#xD;&#xA;        selector-&gt;drop();&#xD;&#xA;        scene::ISceneCollisionManager* collMan = smgr-&gt;getSceneCollisionManager();&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the main loop&#xD;&#xA;&#xD;&#xA;    while(device-&gt;run())&#xD;&#xA;        if (device-&gt;isWindowActive())&#xD;&#xA;        {&#xD;&#xA;                driver-&gt;beginScene(true, true, 0);&#xD;&#xA;                smgr-&gt;drawAll();&#xD;&#xA;                scene::ISceneNode * selectedSceneNode =&#xD;&#xA;                        collMan-&gt;getSceneNodeAndCollisionPointFromRay(&#xD;&#xA;                                        ray,&#xD;&#xA;                                        intersection, // This will be the position of the collision&#xD;&#xA;                                        hitTriangle, // This will be the triangle hit in the collision&#xD;&#xA;                                        IDFlag_IsPickable, // This ensures that only nodes that we have&#xD;&#xA;                                                        // set up to be pickable are considered&#xD;&#xA;                                        0); // Check the entire scene (this is actually the implicit default)&#xD;&#xA;&#xD;&#xA;                // If the ray hit anything draw the triangle that was hit.&#xD;&#xA;                if(selectedSceneNode)&#xD;&#xA;                {&#xD;&#xA;                        driver-&gt;setTransform(video::ETS_WORLD, core::matrix4());&#xD;&#xA;                        driver-&gt;setMaterial(material);&#xD;&#xA;                        driver-&gt;draw3DTriangle(hitTriangle, video::SColor(0,255,0,0));&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                // We're all done drawing, so end the scene.&#xD;&#xA;                driver-&gt;endScene();&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net/docu/example007.html" />
  <row Id="12766" PostHistoryTypeId="2" PostId="6407" RevisionGUID="f166f203-7209-42a0-b301-5535ae9f3055" CreationDate="2010-12-11T06:27:49.467" UserId="2692" Text="check the diffrence between the two heights to give you something of a steepness mesure.&#xD;&#xA;    &#xD;&#xA;    if(height1 &lt; height2) {&#xD;&#xA;        // Its uphill&#xD;&#xA;        float diffrence = height2 - height1;&#xD;&#xA;        if(diffrence &gt; somepredefinedmax)&#xD;&#xA;             StopMove();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12767" PostHistoryTypeId="5" PostId="6340" RevisionGUID="0d4ecf79-af77-4b6c-bdd5-be881cf9ead6" CreationDate="2010-12-11T06:30:28.133" UserId="3787" Comment="Changed Scale type; deleted 2 characters in body" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation ?&#xD;&#xA;    Vector2 Pivot ?&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;**UPDATE 1:**&#xD;&#xA;&#xD;&#xA;Newer values at the moment:&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    byte Facing (can be left or right, I'll do it with an enum)&#xD;&#xA;&#xD;&#xA;I re-read the tutorial, what I was doing wrong is not that I need to pass all those values, I need to pass only **changed** values as messages.&#xD;&#xA;&#xD;&#xA;**UPDATE 2:**&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    byte Flip //(can be left or right, I'll do it with an enum) ? (still not sure!)&#xD;&#xA;    uint DrawOrder&#xD;&#xA;    Vector2 Scale&#xD;&#xA;    bool Visible ?&#xD;&#xA;&#xD;&#xA;Mhhh, should Visibile be included?" />
  <row Id="12768" PostHistoryTypeId="6" PostId="6381" RevisionGUID="0b42f056-ec94-476f-96be-dbf389abf255" CreationDate="2010-12-11T08:35:18.737" UserId="3461" Comment="edited tags" Text="&lt;android&gt;&lt;java&gt;&lt;textures&gt;&lt;opengl-es&gt;" />
  <row Id="12769" PostHistoryTypeId="2" PostId="6408" RevisionGUID="039b4da7-6d96-4a50-a51e-c11cd12c0004" CreationDate="2010-12-11T08:45:35.583" UserId="51" Text="Well if you can calculate the normal of the terrain at your desired future point, you can see if the angle of that is less than some value, and if is then allow the player to move along that." />
  <row Id="12770" PostHistoryTypeId="2" PostId="6409" RevisionGUID="ff79c7e3-c641-4c1b-a67b-d072e352f22d" CreationDate="2010-12-11T08:48:05.900" UserId="2612" Text="I'm trying to come up with ideas for games to develop - as per the advice on [this question][1] I've started jotting down and brainstorming my ideas as I get them, and it has worked relatively well - I now have a growing collection of ideas that I think are relatively original.&#xD;&#xA;&#xD;&#xA;The trouble is that I'm a solo hobbyist developer so my time is limited (and I have short attention span!)  I've decided to set myself a limit of 1 working week (i.e. 35-40 hours) to develop / prototype my game, but all of the ideas that really spark my imagination are **far** too complex to be achievable in that sort of time (e.g. RTS or RPG style gameplay), and none of my simpler ideas really strike me as being that good (and whenever I get a flash of inspiration I invariably end up making things more complicated!)&#xD;&#xA;&#xD;&#xA;Am I being too picky - should I just take one of my simpler ideas and have a go?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2988/how-do-you-come-up-with-ideas-for-new-games" />
  <row Id="12771" PostHistoryTypeId="1" PostId="6409" RevisionGUID="ff79c7e3-c641-4c1b-a67b-d072e352f22d" CreationDate="2010-12-11T08:48:05.900" UserId="2612" Text="Coming up with manageable game ideas as a hobbyist game developer" />
  <row Id="12772" PostHistoryTypeId="3" PostId="6409" RevisionGUID="ff79c7e3-c641-4c1b-a67b-d072e352f22d" CreationDate="2010-12-11T08:48:05.900" UserId="2612" Text="&lt;game-design&gt;&lt;hobby-development&gt;&lt;time-management&gt;" />
  <row Id="12773" PostHistoryTypeId="2" PostId="6410" RevisionGUID="6eedf4dc-bce4-4c57-9d08-402e160665ed" CreationDate="2010-12-11T08:50:09.493" UserId="51" Text="Well it isn't just the percentage of users at the point in time you are starting to make the game that you care about.  It's the percentage of users when your game is scheduled to ship (which for a lot of games can be several years down the line).  Specifically in this case, Windows 7 has significantly less of a bad rap than Vista has in the gaming circles.  Whenever those XP users upgrade their machine next they'll probably install 7 on it.&#xD;&#xA;&#xD;&#xA;Plus you can be pretty sure that the techniques in DX11 are probably going to be part of the platform for whatever Microsoft's next console will be, so there's that." />
  <row Id="12774" PostHistoryTypeId="5" PostId="6340" RevisionGUID="4f28780a-52cf-43a4-aefa-7134593ee7d4" CreationDate="2010-12-11T10:54:05.207" UserId="3787" Comment="deleted 70 characters in body" Text="I was thinking about dividing my game engine into 2 threads: render thread and update thread (I can't come up on how to divide update thread from physic thread at the moment).&#xD;&#xA;&#xD;&#xA;That said, I have to duplicate all Sprite informations, what do I really need to represents a 2D Sprite graphically?&#xD;&#xA;&#xD;&#xA;Here are my ideas (I'll mark with **?** things that I'm not sure):&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation ?&#xD;&#xA;    Vector2 Pivot ?&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Vector2 ImageOrigin ? (is it tracked somewhere else?)&#xD;&#xA;&#xD;&#xA;If you have any suggestion about using different types for datas, it's appreciated&#xD;&#xA;&#xD;&#xA;Last part of the question: isn't this a lot of data to copy in a buffer?what should I really copy in the buffer?I'm following this tutorial:&#xD;&#xA;&#xD;&#xA;http://www.sgtconker.com/2009/11/article-multi-threading-your-xna/3/&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;**UPDATE 1:**&#xD;&#xA;&#xD;&#xA;Newer values at the moment:&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    byte Facing (can be left or right, I'll do it with an enum)&#xD;&#xA;&#xD;&#xA;I re-read the tutorial, what I was doing wrong is not that I need to pass all those values, I need to pass only **changed** values as messages.&#xD;&#xA;&#xD;&#xA;**UPDATE 2:**&#xD;&#xA;&#xD;&#xA;    Vector2 Position&#xD;&#xA;    float Rotation&#xD;&#xA;    Vector2 Pivot&#xD;&#xA;    Rectangle TextureRectangle&#xD;&#xA;    Texture2D Texture&#xD;&#xA;    Color Color&#xD;&#xA;    bool Flip&#xD;&#xA;    uint DrawOrder&#xD;&#xA;    Vector2 Scale&#xD;&#xA;    bool Visible ?&#xD;&#xA;&#xD;&#xA;Mhhh, should Visibile be included?" />
  <row Id="12775" PostHistoryTypeId="2" PostId="6411" RevisionGUID="f0ee61b6-28ea-43ab-815f-9bfa3ea254f3" CreationDate="2010-12-11T11:36:15.357" UserId="2091" Text="You need training.  Consider entering a Game Jam.  It's a friendly competition where you have to create a game in a very limited time frame, usually 48h.  Quite often, a theme is given at the beginning of the jam.  The prize is your own finished game.&#xD;&#xA;&#xD;&#xA;Such a tight deadline is an excellent exercise on &quot;thinking small&quot;.  You learn what are your strenghts and limitations, when it comes to creating a game that quickly; you learn what kinds of elements you have to cut off of your designs; you see where do you spend too much time in development and where do you need to polish more, etc.&#xD;&#xA;&#xD;&#xA;Right now some possibilities are:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; - [The Reddit game jam][1], which is taking place right now and ends tomorrow, so it might be a bit late.&#xD;&#xA; - [Ludum Dare][2], the coming weekend.  One of the most famous.&#xD;&#xA; - [Experimental Gameplay][3].  Once a month, you have 7 days to create an &quot;experimental&quot; game.&#xD;&#xA; - [Klik of the month][4].  Restricted to games made in Klik'n'Play only, and the competition is only 2h long.&#xD;&#xA; - [Game Prototyping Challenge][5].  Honestly I don't know much about this one, but it's starting on Monday the 13th and lasts till the 20th.&#xD;&#xA; - [Global Game Jam][6], at the end of January.  This one is massive, takes place in many cities around the world simultaneously.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.reddit.com/r/RedditGameJam&#xD;&#xA;  [2]: http://www.ludumdare.com/compo/&#xD;&#xA;  [3]: http://experimentalgameplay.com/&#xD;&#xA;  [4]: http://www.glorioustrainwrecks.com/node/44&#xD;&#xA;  [5]: http://gameprototypechallenge.com/&#xD;&#xA;  [6]: http://globalgamejam.org/" />
  <row Id="12776" PostHistoryTypeId="5" PostId="6411" RevisionGUID="2b598dce-42b5-4b3c-892d-26e998a73ea1" CreationDate="2010-12-11T11:46:18.530" UserId="2091" Comment="deleted 156 characters in body" Text="You need training.  Consider entering a Game Jam.  It's a friendly competition where you have to create a game in a very limited time frame, usually 48h.  Quite often, a theme is given at the beginning of the jam.  The prize is your own finished game.&#xD;&#xA;&#xD;&#xA;Such a tight deadline is an excellent exercise on &quot;thinking small&quot;.  You learn what are your strenghts and limitations, when it comes to creating a game that quickly; you learn what kinds of elements you have to cut off of your designs; you see where do you spend too much time in development and where do you need to polish more, etc.&#xD;&#xA;&#xD;&#xA;Right now some possibilities are:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; - [Ludum Dare][2], the coming weekend.  One of the most famous.&#xD;&#xA; - [Experimental Gameplay][3].  Once a month, you have 7 days to create an &quot;experimental&quot; game.&#xD;&#xA; - [Klik of the month][4].  Restricted to games made in Klik'n'Play only, and the competition is only 2h long.&#xD;&#xA; - [Game Prototyping Challenge][5].  Honestly I don't know much about this one, but it's starting on Monday the 13th and lasts till the 20th.&#xD;&#xA; - [Global Game Jam][6], at the end of January.  This one is massive, takes place in many cities around the world simultaneously.&#xD;&#xA;&#xD;&#xA;  [2]: http://www.ludumdare.com/compo/&#xD;&#xA;  [3]: http://experimentalgameplay.com/&#xD;&#xA;  [4]: http://www.glorioustrainwrecks.com/node/44&#xD;&#xA;  [5]: http://gameprototypechallenge.com/&#xD;&#xA;  [6]: http://globalgamejam.org/" />
  <row Id="12777" PostHistoryTypeId="2" PostId="6412" RevisionGUID="f3df51f7-82ea-4eb2-8e1b-eb0bef55fc9b" CreationDate="2010-12-11T13:06:34.010" UserId="1829" Text="I have read some optimisation guide for C++, and it seems it requires more knowledge to have a fast C++ code, than using C++ without the high level features of C++ (classes, templates, inheritance, etc.).&#xD;&#xA;&#xD;&#xA;C++ is a powerful language, and will be the one used in game programming for a long time, and is still fast because it is a C subset, but as John Carmack said, it has to be used correctly: when dealing with programmers who can't guess alone how to make fast C++ code, isn't it a good idea to force them not to use high level features which can me more delicate to optimise ?&#xD;&#xA;&#xD;&#xA;I know compilers do a very good job at optimizing the code they are being given, but they can't change it, or do they compilers that feature some sort of warnings that encourages a good use of OOP, or can compilers automatically optimize OOP code even if it is a slow one ?" />
  <row Id="12778" PostHistoryTypeId="1" PostId="6412" RevisionGUID="f3df51f7-82ea-4eb2-8e1b-eb0bef55fc9b" CreationDate="2010-12-11T13:06:34.010" UserId="1829" Text="Was C++ designed for speed, and isn't better to not use high level features when teaming with inexperienced programmers ?" />
  <row Id="12779" PostHistoryTypeId="3" PostId="6412" RevisionGUID="f3df51f7-82ea-4eb2-8e1b-eb0bef55fc9b" CreationDate="2010-12-11T13:06:34.010" UserId="1829" Text="&lt;c++&gt;&lt;optimization&gt;&lt;compile&gt;&lt;compilation&gt;" />
  <row Id="12780" PostHistoryTypeId="2" PostId="6413" RevisionGUID="14f94101-f99d-411d-80b0-fc853a29a0b9" CreationDate="2010-12-11T13:10:32.883" UserId="744" Text="glBindTexture(GL_TEXTURE_2D, 0) switches to the default texture; unless you've changed the default, that should do what you want." />
  <row Id="12781" PostHistoryTypeId="2" PostId="6414" RevisionGUID="8984947c-0e29-47d2-abf6-ba252e01c703" CreationDate="2010-12-11T13:35:39.480" UserId="741" Text="Okay:&#xD;&#xA;&#xD;&#xA; 1. C++ is a C superset, not a C subset&#xD;&#xA; 2. If you're teaming with inexperienced programmers that don't understand inheritance, then it doesn't really matter what language you choose, they're still going to have problems.&#xD;&#xA; 3. Compilers can do an amazing job with optimisation. Chances are, apart from a few edge cases, you'll have a hard job writing faster assembly language versions of your functions. And even if you do, it'll take you far longer than writing it in C/C++. Trust that the compiler writers know what they are doing, and worry more about whether or not your team knows what it is doing.&#xD;&#xA;&#xD;&#xA;I feel that you are mistaking use of the extended feature set of C++ (inheritance, classes, templates) with a) writing slow code, and b) writing hard to understand code.&#xD;&#xA;&#xD;&#xA;You can write hard to understand and slow code in C as well. You can write it in any language. Your choice of language does not automatically lead to good or bad code. C++ simply gives you more language features that might cause problems (i.e. enough rope to hang yourself with). It is a mistake to think that if you simply avoid using the features that make C++ different from C, that you will not encounter those problems.&#xD;&#xA;&#xD;&#xA;All that said, there are complex structures (multiple inheritance, complicated template code, and various other anti-patterns) which you absolutely should avoid using unless everyone on your team understands them. While they are possible, they are certainly not advised, both for performance and maintainability reasons. But you can write some incredibly clean, structured, and above all fast code using C++'s features, even when you are a programmer of only medium skill. The language is not what causes the problem.&#xD;&#xA;&#xD;&#xA;With any language, you should be aware of the consequences of using particular language features, both in terms of performance, and in terms of maintainability and readability." />
  <row Id="12782" PostHistoryTypeId="2" PostId="6415" RevisionGUID="43621722-38de-49f6-a806-4a610d7cd722" CreationDate="2010-12-11T13:47:59.123" UserId="741" Text="This is a business decision rather than a technical one. You have to look at the set of potential customers you are excluding by insisting on DX10/11 (as mentioned elsewhere, maybe 57% of Unity users), and compare it against the extra sales you expect by using tech only available in DX10/11.&#xD;&#xA;&#xD;&#xA;If your game is not graphically pushing boundaries, you're probably better off making it look as good as it can on with DX9 tech, where you can maximise your potential sales. If it's supposed to be cutting edge, then limiting it to DX9 tech might make it look dated.&#xD;&#xA;&#xD;&#xA;The number of potential sales lost by excluding XP customers will pretty much only go down from here. How fast it will drop is not clear, but as has been mentioned, the W7 platform is much more attractive than Vista, so you can probably expect a much more rapid uptake now than while Vista was the current OS. But certainly this will become less and less relevant as a specific issue." />
  <row Id="12783" PostHistoryTypeId="2" PostId="6416" RevisionGUID="52cc235c-d760-43d0-a7c4-ea01129bdbe8" CreationDate="2010-12-11T13:51:03.280" UserId="3361" Text="I am using a simplex 2D noise to generate my worlds so far.  This however was never the plan and has the downside that I basically can only generate a heightmap.  Instead I want to aim for floating islands scattered in the sky, but I fail to see how I can utilize 3D noise properly for this.&#xD;&#xA;&#xD;&#xA;Based on a simplex 3D noise function I am currently generating noise like this:&#xD;&#xA;&#xD;&#xA;    float&#xD;&#xA;    sc_perlin_noise3_ex(const sc_perlin_t *perlin, float x, float y,&#xD;&#xA;                        float z, int octaves, float persistence,&#xD;&#xA;                        float base_frequency, float base_amp,&#xD;&#xA;                        float lacunarity)&#xD;&#xA;    {&#xD;&#xA;        int i;&#xD;&#xA;        float freq = base_frequency;&#xD;&#xA;        float amp = base_amp;&#xD;&#xA;        float max = 1.0f;&#xD;&#xA;        float total = 1.0f;&#xD;&#xA;    &#xD;&#xA;        for (i = 0; i &lt; octaves; i++) {&#xD;&#xA;            total += sc_perlin_noise3(perlin, x * freq, y * freq, z * freq) * amp;&#xD;&#xA;            max += amp;&#xD;&#xA;            freq *= lacunarity;&#xD;&#xA;            amp *= persistence;&#xD;&#xA;        }&#xD;&#xA;        return total / max;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Problems start there: first of all I think I got octaves wrong, at least the outcome is very unpredictable.  Persistence would be a value smaller 1 that removes the effect of the higher octaves.&#xD;&#xA;&#xD;&#xA;Secondly however I have a general problem understanding how 3D noise works.  From my understanding a value &lt; -1 could mean air, a value &gt; 1 would be solid and 0 is the thin line between them (the surface).  First of all however I get a lot more values below zero than above zero, so I had to flip those two around.  That seems odd, do I have the math wrong?&#xD;&#xA;&#xD;&#xA;The actual problem however is that I cannot locate &quot;islands&quot; properly.  Say I have a container of 256^3 in size and I want to have one large island in there with maybe up to three smaller islands in there I have to ensure that:&#xD;&#xA;&#xD;&#xA;1. no island is cut off at the edges&#xD;&#xA;2. that I only get two even sized islands in my block&#xD;&#xA;3. I have some better control of the actual appearance of my island.  For instance it would be nice if it had an actual flat-ish surface where I can put a heighmap on top of that for mountains etc.&#xD;&#xA;&#xD;&#xA;Based on that I have the feeling I am on the completely wrong track here.  Can anyone give me some pointers on where to head now?&#xD;&#xA;&#xD;&#xA;Generally speaking I would like to have something that looks like this: [floating island][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.polargfx.com/wp-content/uploads/2009/06/floating_island-copy.jpg" />
  <row Id="12784" PostHistoryTypeId="1" PostId="6416" RevisionGUID="52cc235c-d760-43d0-a7c4-ea01129bdbe8" CreationDate="2010-12-11T13:51:03.280" UserId="3361" Text="Working with 3D Noise" />
  <row Id="12785" PostHistoryTypeId="3" PostId="6416" RevisionGUID="52cc235c-d760-43d0-a7c4-ea01129bdbe8" CreationDate="2010-12-11T13:51:03.280" UserId="3361" Text="&lt;procedural-generation&gt;" />
  <row Id="12786" PostHistoryTypeId="2" PostId="6417" RevisionGUID="c2858136-cad5-4804-a5a1-8cbae360b4e5" CreationDate="2010-12-11T13:59:08.270" UserId="741" Text="All 3 platform holders provide forums / newsgroups which are strictly for registered (licensed) developers only. In general they provide a second tier of support for developers, allowing folks to share problems and solutions in a shared forum with the developer support teams also read. It is a specific part of the licence agreement that the development SDKs and any information about them is not shared outwith the developer or those secure shared forums/newsgroups.&#xD;&#xA;&#xD;&#xA;Microsoft / XNA development is the only one of the 3 console platforms that allows non licensed developers to develop for their hardware. Any development on Sony or Nintendo hardware is home-brew only and not sanctioned (since it involves hacking the hardware); although that's not to say there aren't plenty of forums out there for both." />
  <row Id="12788" PostHistoryTypeId="5" PostId="6417" RevisionGUID="8789dc7f-d3fe-432f-9ee3-cf19f8618d9d" CreationDate="2010-12-11T14:07:03.267" UserId="741" Comment="deleted 79 characters in body" Text="All 3 platform holders provide forums / newsgroups which are strictly for registered (licensed) developers only. In general they provide a second tier of support for developers, allowing folks to share problems and solutions in a shared forum with the developer support teams also read. It is a specific part of the licence agreement that the development SDKs and any information about them is not shared outwith the developer or those secure shared forums/newsgroups.&#xD;&#xA;&#xD;&#xA;XNA on X360 development and PS3 Linux are allowed by Microsoft and Sony. Anything else (Wii, PSP, etc.) is home-brew only and not sanctioned (since it involves hacking the hardware); although that's not to say there aren't plenty of forums out there for that." />
  <row Id="12789" PostHistoryTypeId="5" PostId="6346" RevisionGUID="fe7f44ec-6869-4f0d-8e27-3cfac5a799aa" CreationDate="2010-12-11T14:07:24.323" UserId="744" Comment="Terminology nitpick." Text="Very difficult to make out what it is you are asking from this question.&#xD;&#xA;&#xD;&#xA;1) The one thing you might allude to would be the UV wrap mode on a mesh. You bind the texture, render the mesh (of course, depending on ES2.0 shaders or fixed function ES1.1), and make sure the wrap mode is set to repeat, not clamp.&#xD;&#xA;&#xD;&#xA;Also, for more thorough information, read this page :&#xD;&#xA;http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html" />
  <row Id="12793" PostHistoryTypeId="2" PostId="6420" RevisionGUID="e7070806-aaa9-4bfa-b534-daadc3cd0943" CreationDate="2010-12-11T14:28:13.187" UserId="1101" Text="&gt; is there any point, as a game dev, in migrating to the newer technology while you still **have** to support the old technology and provide a similar gaming experience?&#xD;&#xA;&#xD;&#xA;Emphasis mine: if you *have* to, then no. If you don't *have* to, then yes.&#xD;&#xA;&#xD;&#xA;It's always a choice. Weigh up what you want to make against the number of people you want to be able to experience it.&#xD;&#xA;&#xD;&#xA;Personally I'm on Windows XP, and won't be upgrading for a year or two, as XP does what I need. You talk about cool shader fx; I absolutely do not care about cool shader fx. A developer whose main concern is which shaders they can use is not one whose game I am going to buy, as they sound more interested in technology than gameplay.&#xD;&#xA;&#xD;&#xA;But if that's the sort of software you want to make, that's entirely your decision - people like me are not in your target market, and you don't need to care about what I think. Most of the people in your target market are indeed going to be upgrading early and often. So you can aim at them. Just don't complain when you don't reach the mass-market - because you weren't making a game for them in the first place." />
  <row Id="12794" PostHistoryTypeId="2" PostId="6421" RevisionGUID="27ae08de-d656-429a-bd35-a1fea4efe300" CreationDate="2010-12-11T14:30:52.800" UserId="3505" Text="Sounds like you are in over your head. You would probably want to split the two tasks of generating and positioning islands. Try first generating a bunch of islands, and then placing them randomly, if an island is placed so that it collides with an already placed island (or is just too close) reposition it, check again etc." />
  <row Id="12795" PostHistoryTypeId="2" PostId="6422" RevisionGUID="ac2517dd-d3ca-42a7-875f-89b111d6b2c6" CreationDate="2010-12-11T14:47:15.963" UserId="998" Text="A floating island?  You don't really need 3D noise for that, just get two layers of 2D noise, then overlay them.  One layer is the &quot;ground&quot; layer, then the next layer is the &quot;floating islands&quot; layer, and you could even go for a 3rd layer that you consider the &quot;clouds&quot; layer.  There really should be no correlation between the ground layer and the &quot;floating islands&quot; layer.&#xD;&#xA;&#xD;&#xA;3D perlin noise is basically for animations.  Say you had a pool of molten lava that you generated with 2D perlin noise, and you want it to appear flowing.  Well you'd use 3D perlin noise for that, and create an animation by selecting &quot;sheets&quot; from the cube of 3D perlin noise.  The beauty of it is the noise would appear continuous throughout the animation, because the Perlin noise would be smooth in the 3 dimensions.&#xD;&#xA;&#xD;&#xA;But for what you're doing you don't really need 3D perlin noise, just 2 layers of 2D noise will do.&#xD;&#xA;" />
  <row Id="12796" PostHistoryTypeId="2" PostId="6423" RevisionGUID="c594b7ba-ac4f-4da6-95aa-407329a29c62" CreationDate="2010-12-11T17:06:44.547" UserId="51" Text="&gt;isn't it a good idea to force them not to use high level features which can me more delicate to optimise ?&#xD;&#xA;&#xD;&#xA;Let me preface this entire answer with the fact that this is *my* personal philosophy on coding practices and how I run my teams, and that there are different people with different priorities.&#xD;&#xA;&#xD;&#xA;My answer to this is absolutely not, but that's because speed of code execution isn't as important as *shipping the game*.&#xD;&#xA;&#xD;&#xA;The reason those higher level features exist is so that you can write code a little more abstractly.  And by doing that you can theoretically get more done in less time (or fewer lines of code).   Usually there is a speed tradeoff.  For example, virtual functions and RTTI have a speed hit.  Is it worth the speed hit?  In my eyes, the answer is yes.&#xD;&#xA;&#xD;&#xA;Anyway, for all the computationally heavy stuff (i.e. pathfinding), it's more about the algorithm anyway.&#xD;&#xA;&#xD;&#xA;If you have sections of code that are speed critical (not all code is speed critical), then maybe you want to take one of your more advanced guys and optimize that carefully.  Each individual particle structure probably shouldn't have a vtable, for example.  But part of being a good technical director is realizing where those heavy bottlenecks are and paying special attention to them.  &#xD;&#xA;&#xD;&#xA;Besides, in my experience, your real performance gains come from things like how your code manages the GPU.  Draw calls, occlusion, that kind of thing.&#xD;&#xA;&#xD;&#xA;Specifically speaking of your Carmack reference, read the section on &quot;code lineage&quot; from  &lt;a href=&quot;http://bethblog.com/index.php/2010/10/29/john-carmack-discusses-rage-on-iphoneipadipod-touch/&quot;&gt;this article&lt;/a&gt; (it's at the bottom).  The Doom Resurrection code base I worked on went heavy on boost/stl/delgates/etc, the levels themselves used LUA as a scripting language, and there were a bunch of things that were not ideal at all in terms of performance.  I'm not going to say the code was perfect at all.  Even with my lax feeling about code performance there were things I didn't like.  But we shipped the game quickly with a few number of people.  And you can read Carmack's own impressions on it there." />
  <row Id="12797" PostHistoryTypeId="5" PostId="6412" RevisionGUID="b50f03a4-72e2-45c6-a90c-432432e5294e" CreationDate="2010-12-11T17:40:21.600" UserId="1829" Comment="added 303 characters in body" Text="I have read some optimisation guide for C++, and it seems it requires more knowledge to have a fast C++ code, than using C++ without the high level features of C++ (classes, templates, inheritance, etc.).&#xD;&#xA;&#xD;&#xA;C++ is a powerful language, and will be the one used in game programming for a long time, and is still fast because it is a C subset, but as John Carmack said, it has to be used correctly: when dealing with programmers who can't guess alone how to make fast C++ code, isn't it a good idea to force them not to use high level features which can me more delicate to optimise ?&#xD;&#xA;&#xD;&#xA;I know compilers do a very good job at optimizing the code they are being given, but they can't change it, or do they compilers that feature some sort of warnings that encourages a good use of OOP, or can compilers automatically optimize OOP code even if it is a slow one ?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I'm not bashing C++ high level features bere, I'm just talking about some of the very high level stuff like multiple inheritance and abstract classes.&#xD;&#xA;Classes are awesome when just compared to struct's, but multiple inheritance is not that much a universal solution to all software problems." />
  <row Id="12798" PostHistoryTypeId="5" PostId="5672" RevisionGUID="08d3a9f9-e72b-445b-a777-35a825b8347d" CreationDate="2010-12-11T17:45:20.240" UserId="3405" Comment="added 19 characters in body; added 63 characters in body" Text="Unity has its own &quot;StackExchange&quot;-style website - [here][1] If you have any further questions, you should post them there, where more Unity-Related people will be.&#xD;&#xA;&#xD;&#xA;&lt;b&gt;Edit: &lt;/b&gt;The link appeared to not be working anymore. Fixed it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com" />
  <row Id="12799" PostHistoryTypeId="2" PostId="6424" RevisionGUID="1ccb5f22-09d6-4762-977e-0e405b38d484" CreationDate="2010-12-11T17:53:04.370" UserId="3405" Text="i converted the psuedo-code into C#:&#xD;&#xA;&#xD;&#xA;    void Update() &#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;       directionModifier = Input.GetAxis(&quot;Horizontal&quot;);&#xD;&#xA;      &#xD;&#xA;    &#xD;&#xA;       shipRotationAngle += ( shipRotationSpeed * directionModifier ) * Time.deltaTime;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       thrustModifier = Input.GetAxis(&quot;Vertical&quot;);&#xD;&#xA;    &#xD;&#xA;       accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) ) * Time.deltaTime&#xD;&#xA;    &#xD;&#xA;       directionVector = new Vector2( Math.Cos(shipRotationAngle ), Math.Sin(shipRotationAngle) )&#xD;&#xA;       accelerationVector = new Vector2( directionVector.x * accelerationModifier, directionVector.y * accelerationModifier )&#xD;&#xA;    &#xD;&#xA;       // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;       frictionVector = -directionVector * shipFriction&#xD;&#xA;    &#xD;&#xA;       shipSpeedVector += accelerationVector&#xD;&#xA;    &#xD;&#xA;       // APPLY friction vector to shipSpeedVector&#xD;&#xA;       // Make sure that friction vector doesn't speed to go in the opposite of the &#xD;&#xA;       // original direction. Otherwise your ship will go backwards instead of stop.&#xD;&#xA;    &#xD;&#xA;       //IMPORTANT: (I'm too lazy to add code here) Cap speedvector to a maximum speed.&#xD;&#xA;       //Remember to cap total speed, not just X and Y components of the speedVector &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       shipPositionVector += shipSpeedVector&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If there is something wrong with this, please leave a comment.&#xD;&#xA;&#xD;&#xA;Thanks to Nailer for providing psuedo-code" />
  <row Id="12800" PostHistoryTypeId="2" PostId="6425" RevisionGUID="10e215d0-0d45-4a0d-936e-1f494df71ad8" CreationDate="2010-12-11T18:45:16.430" UserId="825" Text="I've been doing a lot of reading and listening to pod casts recently, and a lot of successful developers stress making a bunch of games as one of the best paths towards success as a game developer/designer.  I've repeatedly heard comments along the lines of &quot;Don't try to make your dream game initially, just make ANYTHING.&quot;&#xD;&#xA;&#xD;&#xA;I had recently been having some of the same issues you mentioned, but I decided to try using my hour lunch break at work to create a simple game each day.  Admittedly, an hour is obviously not long, but if you are sufficiently experienced in some type of game tool (Flash for me, or Unity), it should be possible to make something during this time period.  I've done it five times now, and the crazy thing is that I have five new game ideas done.&#xD;&#xA;&#xD;&#xA;They have horrible graphics, are buggy, and often not incredibly fun to play, but the cool thing is that I have an idea now of the possible success of five new game mechanics, and I've lost less than 5 hours.  One of the five seems like it could actually be a fun game, so I might spend more time to actually make it into something.&#xD;&#xA;&#xD;&#xA;Yesterday, I happened to have found a link to a guy who made one mini-game or interactive program each day for 219 days! (see [http://interactionartist.com/index.php?page=allgad][1])  Imagine having 219 ideas and prototypes in less than a years time.  Sure, a lot of them will be junk (many of his are less than stellar), but incredibly, many of them will quite possibly be fun and interesting ideas.  &#xD;&#xA;&#xD;&#xA;Creating something within a super-constrained time frame forces you to focus on the core mechanic of the game, the idea that makes it special.  Sure, to have a commercially successful game you need polish and high production value, but &quot;you can put makeup on a pig, but it doesn't change the fact that it's a pig&quot; lol.  How much better to spend a tiny amount of time on each concept, then you can focus on polishing the ideas that seem to actually have merit.&#xD;&#xA;&#xD;&#xA;Doing so will increase your confidence (&quot;Wow, I have X ideas functional in only Y hours?&quot;), increase your portfolio, and increase your skill as a designer.  Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://interactionartist.com/index.php?page=allgad" />
  <row Id="12805" PostHistoryTypeId="2" PostId="6427" RevisionGUID="c013de76-7c4d-40b7-a047-1a59695a135c" CreationDate="2010-12-11T19:13:51.637" UserId="2998" Text="About a month or two ago one of my friends participaded in a game development competition. The theme was &quot;infinity&quot;. I think he had either a week or a month to finish the game. The problem is I cannot for the life of me find or remeber the name of the site. (Its not Ludum Dare)&#xD;&#xA;&#xD;&#xA;I am hoping someone here might know what I am talking about. " />
  <row Id="12806" PostHistoryTypeId="1" PostId="6427" RevisionGUID="c013de76-7c4d-40b7-a047-1a59695a135c" CreationDate="2010-12-11T19:13:51.637" UserId="2998" Text="Trying to find a game development competition" />
  <row Id="12807" PostHistoryTypeId="3" PostId="6427" RevisionGUID="c013de76-7c4d-40b7-a047-1a59695a135c" CreationDate="2010-12-11T19:13:51.637" UserId="2998" Text="&lt;competition&gt;" />
  <row Id="12810" PostHistoryTypeId="2" PostId="6430" RevisionGUID="0958a46c-90da-4ea8-acee-636aff924ea6" CreationDate="2010-12-11T20:04:17.597" UserId="2345" Text="This? http://experimentalgameplay.com/blog/2010/09/neverending-in-september/" />
  <row Id="12812" PostHistoryTypeId="5" PostId="6204" RevisionGUID="4d5a7b77-a81e-49a7-aaa0-6d919e3bca1c" CreationDate="2010-12-11T21:23:30.413" UserId="470" Comment="edited body" Text="I highly recommend that you/he check out [Unity3D][1]. It's a fantastic game engine with a visual world editor and some solid scripting options. It has a great community and it's totally free to use for indie development.&#xD;&#xA;&#xD;&#xA;Garry's Mod is great if he wants to just learn and play around, especially with FPS stuff, but I'm pretty sure you can't make commercial games with it (although I don't know if that's even your son's goal). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3D.com" />
  <row Id="12814" PostHistoryTypeId="2" PostId="6433" RevisionGUID="fa5b25c0-7033-42df-a2b7-09317b82ed9a" CreationDate="2010-12-11T22:51:56.083" UserId="422" Text="So we recently launched a shoot 'em up arcade-type game (think [Smash TV](http://en.wikipedia.org/wiki/Smash_TV) or [I Made a Game with Zombies in It!](http://en.wikipedia.org/wiki/I_Made_a_Game_with_Zombies_in_It!)). You can move in one direction and fire in another, so the ideal control scheme is probably two analog joysticks (like the Xbox 360 has). We support WASD to move and arrow keys to fire. The best way to control though is to move with WASD and aim with the mouse.&#xD;&#xA;&#xD;&#xA;We're getting a lot of people [asking for mobile versions](http://twitter.com/#!/Wesley_Bao/status/13664193764917248) of the game (mostly for iPad and Android) and the problem is we just can't come up with a good way to translate the controls over to a touch device.&#xD;&#xA;&#xD;&#xA;Interestingly, someone actually [hacked an early version of our game a while back to work on Android](http://www.borismus.com/mobile-html-games/) by overlaying D-pads, and sure enough, it was almost impossible to control. The game gets really difficult later on and the thought of releasing a game with a crappy control scheme that nobody could possibly ever use to beat the game does not sit well with me.&#xD;&#xA;&#xD;&#xA;So I was wondering if anyone has any previous experience or suggestions on how to approach this problem? Overlaying two D-pads on the screen is clearly not the way to go and we're kind of at a loss for other ideas.&#xD;&#xA;&#xD;&#xA;Any ideas welcome! Thanks for your help." />
  <row Id="12815" PostHistoryTypeId="1" PostId="6433" RevisionGUID="fa5b25c0-7033-42df-a2b7-09317b82ed9a" CreationDate="2010-12-11T22:51:56.083" UserId="422" Text="Optimal touch controls for an arcade-style shoot 'em up?" />
  <row Id="12816" PostHistoryTypeId="3" PostId="6433" RevisionGUID="fa5b25c0-7033-42df-a2b7-09317b82ed9a" CreationDate="2010-12-11T22:51:56.083" UserId="422" Text="&lt;game-design&gt;" />
  <row Id="12817" PostHistoryTypeId="2" PostId="6434" RevisionGUID="b490d085-6e01-45b7-a874-8ee3aac0fd72" CreationDate="2010-12-11T23:01:54.953" UserId="962" Text="For android it might be really hard to implement that control scheme as a lot of devices are not multi-touch.&#xD;&#xA;&#xD;&#xA;**For the Ipad/iphone, you could have virtual thumb-sticks on each side of the screen reset their position when the users thumbs/fingers are placed down.**" />
  <row Id="12819" PostHistoryTypeId="4" PostId="6433" RevisionGUID="b9a49018-5a5c-48f2-be3c-55ac51d6d890" CreationDate="2010-12-12T00:56:28.363" UserId="744" Comment="Clarify twin-stick and not scrolling or other kind of shooter." Text="Optimal touch controls for an twin-stick shoot 'em up?" />
  <row Id="12820" PostHistoryTypeId="2" PostId="6436" RevisionGUID="dee5477c-8bff-45b7-8660-028dbef6b6d3" CreationDate="2010-12-12T01:03:11.883" UserId="154" Text="The problem with height difference is that it's dependent on forward velocity. So as long as a the player slows down enough they could climb almost anything.&#xD;&#xA;&#xD;&#xA; - If you have a 45&amp;deg; slope and you move forward 1 unit/update you'll travel up 1 unit/update.&#xD;&#xA; - If you have a 80&amp;deg; slope and you move forward .17 unit/update you'll travel up 1 unit/update&#xD;&#xA;&#xD;&#xA;As Tetrad said, you need the normal of the ground under the player and compare that to the direction they are trying to move. If the angle difference is over a certain threshold don't allow the movement." />
  <row Id="12821" PostHistoryTypeId="2" PostId="6437" RevisionGUID="33b675e7-124a-47d7-a61a-23cbda5dd2ca" CreationDate="2010-12-12T01:19:14.073" UserDisplayName="meme" Text="Here is another site where you can find [free sprites][1] for your games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hasgraphics.com/free-sprites/" />
  <row Id="12822" PostHistoryTypeId="2" PostId="6438" RevisionGUID="e02291f2-25b0-400c-a9cd-693e52783012" CreationDate="2010-12-12T01:22:31.180" UserId="154" Text="Even the biggest games are made up of a series of smaller systems.  &#xD;&#xA;&#xD;&#xA;If you are really excited about a big concept, split your big game idea up into all it's different component system. If you can't finish a system in a week, split it further. Then make small prototype games of each one of these components. &#xD;&#xA;&#xD;&#xA;Don't worry about hooking them in together, just build each one as quickly as possible to see if the idea is viable. " />
  <row Id="12823" PostHistoryTypeId="2" PostId="6439" RevisionGUID="2590faa9-b39a-4485-afcc-ff864da9460e" CreationDate="2010-12-12T01:24:06.033" UserDisplayName="meme" Text="You can try the [free sprites][1] from hasgraphics. They can be used in commercial and non-commercial projects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hasgraphics.com/free-sprites/" />
  <row Id="12824" PostHistoryTypeId="2" PostId="6440" RevisionGUID="69179d5c-eedc-4915-a6d2-c3b4712fb06b" CreationDate="2010-12-12T02:47:03.723" UserDisplayName="xnaNewbie89" Text="I have small problem with converting bitmap to Texture2D, when I converting, result image have switech red channel with blue :/ I don't know why, beacouse pixel formats are sets the same. If someone can help me I will be very happy :)&#xD;&#xA;&#xD;&#xA;          System.Drawing.Image image = &#xD;&#xA;                System.Drawing.Bitmap.FromFile(ImageFileLoader.filename);&#xD;&#xA;            System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(image);&#xD;&#xA;            Texture2D mapTexture = new Texture2D(Screen.Game.GraphicsDevice, bitmap.Width, bitmap.Height,false,SurfaceFormat.Color);&#xD;&#xA;            &#xD;&#xA;            System.Drawing.Imaging.BitmapData data = &#xD;&#xA;                bitmap.LockBits(new System.Drawing.Rectangle(&#xD;&#xA;                0, 0, bitmap.Width, bitmap.Height), &#xD;&#xA;                System.Drawing.Imaging.ImageLockMode.ReadOnly,System.Drawing.Imaging.PixelFormat.Format32bppArgb);&#xD;&#xA;            &#xD;&#xA;            byte[] bytes = new byte[data.Height * data.Width*4];&#xD;&#xA;            &#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            System.Runtime.InteropServices.Marshal.Copy(data.Scan0, bytes, 0, bytes.Length);&#xD;&#xA;            &#xD;&#xA;            mapTexture.SetData&lt;byte&gt;(bytes, 0, data.Height * data.Width * 4);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            bitmap.UnlockBits(data);&#xD;&#xA;            bitmap.Dispose();&#xD;&#xA;            image.Dispose();" />
  <row Id="12825" PostHistoryTypeId="1" PostId="6440" RevisionGUID="69179d5c-eedc-4915-a6d2-c3b4712fb06b" CreationDate="2010-12-12T02:47:03.723" UserDisplayName="xnaNewbie89" Text="Bitmap to Texture2D problem with colors" />
  <row Id="12826" PostHistoryTypeId="3" PostId="6440" RevisionGUID="69179d5c-eedc-4915-a6d2-c3b4712fb06b" CreationDate="2010-12-12T02:47:03.723" UserDisplayName="xnaNewbie89" Text="&lt;xna&gt;&lt;c#&gt;&lt;windows&gt;" />
  <row Id="12827" PostHistoryTypeId="2" PostId="6441" RevisionGUID="c9542e4f-a182-4656-b08b-726ce7ee07ae" CreationDate="2010-12-12T03:12:38.097" UserId="2910" Text="Firstly, I think you are being to hard on yourself. You need to start of with a project that certainly interests you but you should be keeping it small.&#xD;&#xA;&#xD;&#xA;The reason I think you should keep it small to begin with is so you do not become unmotivated.&#xD;&#xA;&#xD;&#xA;Games evolve as they are created, I think you should challenge yourself with a simplistic project and allow yourself to build it into something more over time. Don't put yourself on a time-table, this will hinder your project. It's done when its done. Which is essentially never!&#xD;&#xA;&#xD;&#xA;It's OK not to have the coolest new idea for a game, a lot of ideas are used and reused. Blizzard hasn't made an original game in years, but they still make the best games.&#xD;&#xA;&#xD;&#xA;One last thing on creativity. You need to be creative with what you have, not with what you don't have. We don't have experience, we don't have massive art teams, and we don't have the a large diverse team of people." />
  <row Id="12828" PostHistoryTypeId="2" PostId="6442" RevisionGUID="c59251fe-83a6-48b7-abf2-58dbbd492a92" CreationDate="2010-12-12T03:22:49.100" UserId="288" Text="What you are seeing is not unusual. Image data is often stored as either BGR or RGB. (Plus there's ARGB vs RGBA and also premultiplication to take into consideration.)&#xD;&#xA;&#xD;&#xA;XNA's `SurfaceFormat.Color` is ARGB.&#xD;&#xA;&#xD;&#xA;For XNA 4 you generally want premultiplied alpha (this has more to do with what blend settings you use or need to use). If your image is entirely opaque it won't matter.&#xD;&#xA;&#xD;&#xA;I'm pretty sure that the problem in your code arises from your use of `LockBits`. While `LockBits` gives you an opportunity to select a pixel format, it ***doesn't actually perform any conversion***. So you've basically told it that a ABGR image is ARGB - you've lied to it! (I believe ABGR is a common format for Windows bitmaps.)&#xD;&#xA;&#xD;&#xA;The solution is, of course, to swap the Red and Blue bytes in your temporary buffer before you set them on the XNA texture." />
  <row Id="12829" PostHistoryTypeId="4" PostId="6433" RevisionGUID="32739ae6-956d-4f15-b507-7969447bd411" CreationDate="2010-12-12T08:11:52.567" UserId="422" Comment="typo!" Text="Optimal touch controls for a twin-stick shoot 'em up?" />
  <row Id="12830" PostHistoryTypeId="2" PostId="6443" RevisionGUID="46375d20-2d3f-4bb9-9317-2b05632da24f" CreationDate="2010-12-12T09:28:35.217" UserId="3955" Text="I was wondering how this works.&#xD;&#xA;&#xD;&#xA;Do you load the **complete** map when the game starts up, or do you load parts of the map at runtime?&#xD;&#xA;&#xD;&#xA;And how would you save the maps? Would it be in XML or some binary format?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="12831" PostHistoryTypeId="1" PostId="6443" RevisionGUID="46375d20-2d3f-4bb9-9317-2b05632da24f" CreationDate="2010-12-12T09:28:35.217" UserId="3955" Text="2D Top down view maps" />
  <row Id="12832" PostHistoryTypeId="3" PostId="6443" RevisionGUID="46375d20-2d3f-4bb9-9317-2b05632da24f" CreationDate="2010-12-12T09:28:35.217" UserId="3955" Text="&lt;2d&gt;&lt;sprites&gt;&lt;maps&gt;" />
  <row Id="12833" PostHistoryTypeId="2" PostId="6444" RevisionGUID="d17862fe-b8d9-4a2a-81f8-eb108bb94f10" CreationDate="2010-12-12T09:32:48.277" UserId="2910" Text="There is no one answer to these questions. These are all inherently up to you. &#xD;&#xA;&#xD;&#xA;You could save maps anyway you like and display/render them at any time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12834" PostHistoryTypeId="2" PostId="6445" RevisionGUID="3a40456b-f885-4927-9c69-c8115bcf2b7e" CreationDate="2010-12-12T12:27:08.167" UserId="3957" Text="I want to code a board game that name is Okey and mostly popular in Turkey. http://en.wikipedia.org/wiki/Okey&#xD;&#xA;&#xD;&#xA;But i have got some problems about AI.&#xD;&#xA;&#xD;&#xA;Firslty let me explain the game..&#xD;&#xA;&#xD;&#xA;The game is played by 4 players.&#xD;&#xA;&#xD;&#xA;In this game there are 106 tiles, 2 of them are fake joker. Other 104 tiles are divided 4 colours generally green, black, blue and red. All colours have two sets of tiles. A set ise contains 13 tiles that numbered sequentially 1 to 13.&#xD;&#xA;&#xD;&#xA;Each player start 14 tiles (one is start 15 and starts first) and throws one of the most unwanted tile the next player. Next player can get this tile or can get another tile from stack in the middle of table. The game played in anti-clockwise..&#xD;&#xA;&#xD;&#xA;The aim of this game is find the valid sequence of 14 tiles as soon as possible. Player can align tiles by sequential numbers in the same colour until 13. For examle Green 1, Green 2, Green 3. There is an exception here, 1 can be follow to 13. For example Red 12, Red 13 and Red 1 is a valid set. But Red 13, Red 1 and Red 2 is not valid.&#xD;&#xA;&#xD;&#xA;Or player can align tiles by colors in the same number. For examle Green 1, Black 1, Red 1, Blue 1.&#xD;&#xA;&#xD;&#xA;Each set need to be 3 or more tiles to be valid and each of this set named as &quot;Per&quot;. Less then 3 tiles is not valid for the finish. A valid finish set can be like this. G: Green, B:Blue, R:Red, BL: Black G1|G2|G3 B2|R2|BL2 R9|R10|R11|R12 BL13|R13|G13&#xD;&#xA;&#xD;&#xA;Last thing, when starting game a tile selected to determine joker (okey). For example if you select Blue 3; Blue 4 will be joker (okey) and player can use this tile instead of any tile that player needs to win or complete a set (per).&#xD;&#xA;&#xD;&#xA;Of course these rules are general rules and summarized to explain question. If you can read English you can check this link for more information http://tr.wikipedia.org/wiki/Okey or translated page by Google Translate http://translate.google.com/translate?js=n&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=2&amp;eotf=1&amp;sl=tr&amp;tl=en&amp;u=http://tr.wikipedia.org/wiki/Okey&#xD;&#xA;&#xD;&#xA;So which AI algorithm that i can used? I searched for minimax theory and alpha beta pruning. But these theories are generally about 2 players game like chess or tic-tac-toe.&#xD;&#xA;&#xD;&#xA;Original Question is at stackoverflow: http://stackoverflow.com/questions/4419628/creating-a-board-game-ai" />
  <row Id="12835" PostHistoryTypeId="1" PostId="6445" RevisionGUID="3a40456b-f885-4927-9c69-c8115bcf2b7e" CreationDate="2010-12-12T12:27:08.167" UserId="3957" Text="Creating A Board Game AI" />
  <row Id="12836" PostHistoryTypeId="3" PostId="6445" RevisionGUID="3a40456b-f885-4927-9c69-c8115bcf2b7e" CreationDate="2010-12-12T12:27:08.167" UserId="3957" Text="&lt;c#&gt;&lt;algorithm&gt;&lt;multiplayer&gt;" />
  <row Id="12837" PostHistoryTypeId="2" PostId="6446" RevisionGUID="a3895e20-ebbe-4eba-b4e3-89e289ce3b89" CreationDate="2010-12-12T13:55:26.530" UserId="3505" Text="How much to load depends at least on how big the map is, if the data can reasonably fit in memory then there is really no reason to bother with progressive loading.&#xD;&#xA;&#xD;&#xA;The most notable thing XML does is take up a lot of extra storage/memory/network space/traffic. If you think using XML is fun, be sure to do so only for relatively small amounts of data.&#xD;&#xA;&#xD;&#xA;When you design a data format you should have in mind how you want to edit this data. You could use a simple text editor to write your data as a plain text file, you could use these files directly or you could convert them to a binary format to save space. You could use an image editor to make your levels as bitmaps, again, you might want to convert to a smaller file.&#xD;&#xA;&#xD;&#xA;Or you could make your own editor, in which case there is little reason for not using a compact binary format." />
  <row Id="12838" PostHistoryTypeId="6" PostId="6443" RevisionGUID="13581c4c-0336-4210-9d6c-0fba1ede178e" CreationDate="2010-12-12T15:49:17.587" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;tiles&gt;&lt;sprites&gt;&lt;maps&gt;" />
  <row Id="12839" PostHistoryTypeId="2" PostId="6447" RevisionGUID="fbdea6b3-e0ed-4d04-927c-027bc113798f" CreationDate="2010-12-12T17:29:05.137" UserId="2472" Text="I agree with eBusiness. It depends on the size and how you want to edit it.&#xD;&#xA;&#xD;&#xA;**Estimate the byte size of your map** in a reasonably compact representation. Also decide which parts of the map can change as the game plays. Those parts that don't change can be loaded and don't have to be saved. If the estimated size is small, just store everything in memory. It's not worth the extra complexity of loading parts of the map and tracking what you've loaded or not, unless the data is so large that it's necessary.&#xD;&#xA;&#xD;&#xA;For example if you were writing **Civilization II**, your map size might be 100x100 tiles.&#xD;&#xA;&#xD;&#xA; 1. Each tile is one of 12 types, so you can store that in 4 bits.  That means the main map is 100 x 100 x 0.5 bytes = 5,000 bytes to store the tile types. The main map never changes.&#xD;&#xA; 1. You can also improve map tiles with roads, irrigation, etc., and there are up to 7 improvements. That means 2^7 different values, taking 7 bits, but we'd probably just use 1 byte for it. That give us 100 x 100 x 1 byte = 10,000 bytes to store the improvements.&#xD;&#xA; 1. The fog of war tells us which map tiles you've seen, so you need 1 bit per player. If you limit to 8 players, that's another byte per map tile, or 10,000 bytes for the fog of war. &#xD;&#xA; 1. Finally, there are all the cities and units. You might estimate that each player has up to 20 cities and 100 units, and each of these might require 100 bytes of data (wild guess), so that's 12,000 bytes (much more if you're using XML).&#xD;&#xA;&#xD;&#xA;That's under 30k for a compact binary representation the Civ II map + objects, so you can store all of it in memory, even if you use a verbose format that's much larger. I got the above numbers from someone reverse engineering the &lt;a href=&quot;http://www.civgaming.net/mercator/reference/mapstruct.html&quot;&gt;Civ II map structure&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;**Daggerfall**, considered by some to have a ridiculously large map, &lt;a href=&quot;http://www.uesp.net/wiki/Daggerfall:WOODS.WLD_format&quot;&gt;appears to be 5000x2500&lt;/a&gt; and around 25 megabytes, but it also has a large number of NPCs (750,000 is what I've read but that seems very high). On today's desktop/laptop machines this too could fit into memory, but on mobile devices or browsers that might be a bit too big. There's a &lt;a href=&quot;http://www.uesp.net/wiki/Daggerfall:Hacking_Guide&quot;&gt;wiki describing the Daggerfall map format&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;You can reduce the size by identifying and **factoring out redundancy**. For example, instead of storing 100,000 identical trees or swords each in an XML format, store one tree and one sword and 100,000 references to them. In the binary formats that reference might be only 1 or 2 bytes, and in a more verbose format the reference can still be reasonably small.&#xD;&#xA;&#xD;&#xA;**Do the simplest thing** that works for your game. If the map is small, it doesn't matter if you use a compact or verbose format. If the compact format would fit into memory but the verbose format would not, you have to decide whether the extra work of the binary format is more or less than the extra work of loading portions of the map. That'll depend on the game. In a Civ-like game where you need all the data to simulate turns, the binary format is probably a better choice. In a Daggerfall-like game where you don't need to load areas except what's near the player, loading portions of the map is probably a better choice. If the map is *so* big that even the compact format won't fit in memory, then first ask yourself if it's really worth all the extra work to deal with it, and if so, design a binary format that you can load portions of.&#xD;&#xA;&#xD;&#xA;For my current (hobby) project, the maps and all the objects on them fit into 50 MB, so keeping it all in memory would be fine. However, I want it to run in the browser, and 50 MB is more than I want to transfer over the network, so I'm keeping them all in memory on the server and then loading only parts of the world in the client.  My map tiles are 1 byte per tile, 2048x2048 tiles (4 MB). The objects (trees, chairs, orcs, etc.) are JSON-encoded for simplicity.  In the client I only load the map areas (including their objects) that are near the player.&#xD;&#xA;" />
  <row Id="12840" PostHistoryTypeId="5" PostId="6400" RevisionGUID="ff158cda-f597-4234-b559-a6c793ea1ab3" CreationDate="2010-12-12T18:56:21.583" UserId="825" Comment="Modified question to focus on an answer that doesn't violate NDAs." Text="After some research online, I am unable to find any concrete references for how to go about implementing Facebook functionality from either Xbox 360 or PS3 games.  There is apparently some degree of integration, but how does one go about hooking into Facebook's API from within a console title?&#xD;&#xA;&#xD;&#xA;Is there any How To documentation online?  Or alternatively, is anyone aware of a developer that specializes in incorporating this type of functionality in an existing codebase?&#xD;&#xA;&#xD;&#xA;Thanks for your help!&#xD;&#xA;&#xD;&#xA;**EDIT:&#xD;&#xA;For an answer unaffected by NDA, does anyone know of a company that specializes in integrating PS3 or Xbox games with Facebook?**" />
  <row Id="12841" PostHistoryTypeId="2" PostId="6448" RevisionGUID="419db8b9-6f8f-4cbb-af7c-41f9d69bedf3" CreationDate="2010-12-12T19:01:46.867" UserId="154" Text="Virtual dual-sticks are just rough on a touch screen.&#xD;&#xA;&#xD;&#xA;**Option #1: Movement Stick + Touch to shoot**&#xD;&#xA;&#xD;&#xA;Put one virtual stick on screen to control the player. The other finger touches on the screen where you want to shoot. This still gives you one virtual stick to deal with, but moving is often less critical than aiming in this style of game so at least the aim is very precise.&#xD;&#xA;&#xD;&#xA;**Option #2: Drag movement + Touch to shoot**&#xD;&#xA;&#xD;&#xA;Shoot functions the same as above, just movement is changed.&#xD;&#xA;&#xD;&#xA;A finger pressed on the player's avatar and then dragged to a new location sets a waypoint for movement. Players move through the level setting a series of waypoints, setting a new point instantly transitions the player movement. This gets rid of virtual sticks entirely, but depending on your game it might not offer enough fidelity in player control." />
  <row Id="12842" PostHistoryTypeId="6" PostId="6433" RevisionGUID="9d02fcc4-2652-47d5-9f51-2da93a9e8256" CreationDate="2010-12-12T19:07:03.360" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;controls&gt;" />
  <row Id="12843" PostHistoryTypeId="5" PostId="6291" RevisionGUID="ec1a3e69-c391-4486-84ec-bf8a7eb55374" CreationDate="2010-12-12T19:24:33.960" UserId="160" Comment="edited body" Text="It's going to be hard to balance things when the set of things you're balancing is open-ended. That's kind of the nature of the thing, and why we call it &quot;balance&quot;. Adding one new unit can have a dramatic effect on other ones.&#xD;&#xA;&#xD;&#xA;If your game is already multiplayer and socially-oriented, one possible solution is to crowd-source it: let players rate the relative strengths of different units, and then aggregate that to give each unit its score. Then, when building their troops, set a cap for total unit strength of all troops.&#xD;&#xA;&#xD;&#xA;Or you could otherwise leave it up to the players to have control over this by letting them define game requirements that allow or disallow certain units.&#xD;&#xA;&#xD;&#xA;You can't shirk all of the work onto the players. No one will bother to spend the time ranking things if the game is so unbalanced that it isn't fun to play. But you may be able to give them the ability to fine-tune." />
  <row Id="12844" PostHistoryTypeId="2" PostId="6449" RevisionGUID="dcd18bf4-12ba-4473-81e7-c24a422ec349" CreationDate="2010-12-12T22:30:51.310" UserId="395" Text="You cannot do it directly. We moved it so all the API interaction was done server-side so it was post-gateway. Made screenshots a real pain actually. You could have some limited interaction if your Facebook app just watched for changes in their Live profile, not sure if you can get stuff like the rich presence data that way though." />
  <row Id="12845" PostHistoryTypeId="2" PostId="6450" RevisionGUID="413d678d-8cca-418c-9e39-d7eff373897b" CreationDate="2010-12-12T22:32:20.220" UserId="3830" Text="I wasn't quite sure how to put this all into writing, but found it was easier to just write the code for an example.&#xD;&#xA;&#xD;&#xA;I've put together a full example of a dynamically generated hexmap generated with PHP that also uses Javascript to handle map clicks.&#xD;&#xA;&#xD;&#xA;[Hex Map Demo][1]&#xD;&#xA;&#xD;&#xA;Click on any hex to highlight it.  The click coordinates may not be 100% accurate around the fine edges, hard to say.  I used bits of source code from several locations &#xD;&#xA;&#xD;&#xA;Here is a screenshot of the example...&#xD;&#xA;&#xD;&#xA;![Hex Map Demo Screenshot][3]&#xD;&#xA;&#xD;&#xA;Right now it's generating a 10x10 map, but you can change the map size in the PHP to be any size you want.  I'm also using a set of tiles from the game Wesnoth for the example.  They are 72x72 pixels in height, but the source also lets you set the size of your hex tiles.&#xD;&#xA;&#xD;&#xA;The hexes are represented by PNG images with &quot;outside the hex&quot; areas set as transparent.  To position each hex, I am using CSS to set each tile's absolute position, calculated by the hex grid coordinate.  The map is enclosed in a single DIV, which should make it easier for you to modify the example.&#xD;&#xA;&#xD;&#xA;Here is the full page code...&#xD;&#xA;&#xD;&#xA;    &lt;?php&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    // :: HEX.PHP&#xD;&#xA;    // ::&#xD;&#xA;    // :: Author:  &#xD;&#xA;    // ::    Tim Holt, tim.m.holt@gmail.com&#xD;&#xA;    // :: Description:  &#xD;&#xA;    // ::    Generates a random hex map from a set of terrain types, then&#xD;&#xA;    // ::    outputs HTML to display the map.  Also outputs Javascript&#xD;&#xA;    // ::    to handle mouse clicks on the map.  When a mouse click is&#xD;&#xA;    // ::    detected, the hex cell clicked is determined, and then the&#xD;&#xA;    // ::    cell is highlighted.&#xD;&#xA;    // :: Usage Restrictions:  &#xD;&#xA;    // ::    Available for any use.&#xD;&#xA;    // :: Notes:&#xD;&#xA;    // ::    Some content (where noted) copied and/or derived from other &#xD;&#xA;    // ::    sources.&#xD;&#xA;    // ::    Images used in this example are from the game Wesnoth.&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    &#xD;&#xA;    // --- Turn up error reporting in PHP&#xD;&#xA;    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);&#xD;&#xA;    &#xD;&#xA;    // --- Define some constants&#xD;&#xA;    $MAP_WIDTH = 10;&#xD;&#xA;    $MAP_HEIGHT = 10;&#xD;&#xA;    $HEX_HEIGHT = 72;&#xD;&#xA;    $HEX_SIDE = $HEX_HEIGHT / 2;&#xD;&#xA;    ?&gt;&#xD;&#xA;    &lt;html&gt;&#xD;&#xA;        &lt;head&gt;&#xD;&#xA;            &lt;title&gt;Hex Map Demo&lt;/title&gt;&#xD;&#xA;            &lt;!-- Stylesheet to define map boundary area and hex style --&gt;&#xD;&#xA;            &lt;style type=&quot;text/css&quot;&gt;&#xD;&#xA;            body {&#xD;&#xA;                /* &#xD;&#xA;                margin: 0;&#xD;&#xA;                padding: 0;&#xD;&#xA;                */&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hexmap {&#xD;&#xA;                width: &lt;?php echo $MAP_WIDTH * $HEX_SIDE * 1.5 + $HEX_SIDE/2; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $MAP_HEIGHT * $HEX_HEIGHT + $HEX_SIDE; ?&gt;px;&#xD;&#xA;                position: relative;&#xD;&#xA;                background: #000;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex-key-element {&#xD;&#xA;                width: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                border: 1px solid #fff;&#xD;&#xA;                float: left;&#xD;&#xA;                text-align: center;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex {&#xD;&#xA;                position: absolute;&#xD;&#xA;            }&#xD;&#xA;            &lt;/style&gt;&#xD;&#xA;        &lt;/head&gt;&#xD;&#xA;        &lt;body&gt;&#xD;&#xA;        &lt;script&gt;&#xD;&#xA;    function handle_map_click() {&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- This function gets a mouse click on the map, converts the click to&#xD;&#xA;        // --- hex map coordinates, then moves the highlight image to be over the&#xD;&#xA;        // --- clicked on hex.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine coordinate of map div as we want the click coordinate as&#xD;&#xA;        // --- we want the mouse click relative to this div.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var map = document.getElementById('hexmap');&#xD;&#xA;        var map_left = map_top = 0;&#xD;&#xA;        var obj = map;&#xD;&#xA;        if (obj.offsetParent) {&#xD;&#xA;            do {&#xD;&#xA;                map_left += obj.offsetLeft;&#xD;&#xA;                map_top += obj.offsetTop;&#xD;&#xA;            } while (obj = obj.offsetParent);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine click location on the page&#xD;&#xA;        // --- Code is from http://www.quirksmode.org/js/events_properties.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var click_x = 0;&#xD;&#xA;        var click_y = 0;&#xD;&#xA;        if (!e) var e = window.event;&#xD;&#xA;        if (e.pageX || e.pageY) {&#xD;&#xA;            click_x = e.pageX;&#xD;&#xA;            click_y = e.pageY;&#xD;&#xA;        } else if (e.clientX || e.clientY)     {&#xD;&#xA;            click_x = e.clientX + document.body.scrollLeft&#xD;&#xA;                + document.documentElement.scrollLeft;&#xD;&#xA;            click_y = e.clientY + document.body.scrollTop&#xD;&#xA;                + document.documentElement.scrollTop;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // --- Offset the map's location on the page so we get a click coordinate&#xD;&#xA;        // --- where [0,0] is the upper left corner of the map.&#xD;&#xA;        click_x -= map_left;&#xD;&#xA;        click_y -= map_top;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Convert mouse click to hex grid coordinate&#xD;&#xA;        // --- Code is from http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var hex_height = &lt;?php echo $HEX_HEIGHT; ?&gt;;&#xD;&#xA;        x = (click_x - (hex_height/2)) / (hex_height * 0.75);&#xD;&#xA;        y = (click_y - (hex_height/2)) / hex_height;&#xD;&#xA;        z = -0.5 * x - y;&#xD;&#xA;        y = -0.5 * x + y;&#xD;&#xA;    &#xD;&#xA;        ix = Math.floor(x+0.5);&#xD;&#xA;        iy = Math.floor(y+0.5);&#xD;&#xA;        iz = Math.floor(z+0.5);&#xD;&#xA;        s = ix + iy + iz;&#xD;&#xA;        if (s) {&#xD;&#xA;            abs_dx = Math.abs(ix-x);&#xD;&#xA;            abs_dy = Math.abs(iy-y);&#xD;&#xA;            abs_dz = Math.abs(iz-z);&#xD;&#xA;            if (abs_dx &gt;= abs_dy &amp;&amp; abs_dx &gt;= abs_dz) {&#xD;&#xA;                ix -= s;&#xD;&#xA;            } else if (abs_dy &gt;= abs_dx &amp;&amp; abs_dy &gt;= abs_dz) {&#xD;&#xA;                iy -= s;&#xD;&#xA;            } else {&#xD;&#xA;                iz -= s;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- map_x and map_y are the map coordinates of the click&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        map_x = ix;&#xD;&#xA;        map_y = (iy - iz + (1 - ix %2 ) ) / 2 - 0.5;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Calculate coordinates of this hex.  We will use this&#xD;&#xA;        // --- to place the highlight image.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        tx = map_x * &lt;?php echo $HEX_SIDE ?&gt; * 1.5;&#xD;&#xA;        ty = map_y * &lt;?php echo $HEX_HEIGHT ?&gt; + (map_x % 2) * (&lt;?php echo $HEX_HEIGHT ?&gt; / 2);&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Get the highlight image by ID&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var highlight = document.getElementById('highlight');&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Set position to be over the clicked on hex&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        highlight.style.left = tx + 'px';&#xD;&#xA;        highlight.style.top = ty + 'px';&#xD;&#xA;    }&#xD;&#xA;    &lt;/script&gt;&#xD;&#xA;    &lt;?php&#xD;&#xA;    &#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;    // --- This is a list of possible terrain types and the&#xD;&#xA;    // --- image to use to render the hex.&#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;        $terrain_images = array(&quot;grass&quot;    =&gt; &quot;grass-r1.png&quot;,&#xD;&#xA;                                &quot;dirt&quot;     =&gt; &quot;dirt.png&quot;,&#xD;&#xA;                                &quot;water&quot;    =&gt; &quot;coast.png&quot;,&#xD;&#xA;                                &quot;path&quot;     =&gt; &quot;stone-path.png&quot;,&#xD;&#xA;                                &quot;swamp&quot;    =&gt; &quot;water-tile.png&quot;,&#xD;&#xA;                                &quot;desert&quot;   =&gt; &quot;desert.png&quot;,&#xD;&#xA;                                &quot;oasis&quot;    =&gt; &quot;desert-oasis-tile.png&quot;,&#xD;&#xA;                                &quot;forest&quot;   =&gt; &quot;forested-mixed-summer-hills-tile.png&quot;,&#xD;&#xA;                                &quot;hills&quot;    =&gt; &quot;hills-variation3.png&quot;,&#xD;&#xA;                                &quot;mountain&quot; =&gt; &quot;mountain-tile.png&quot;);&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function generate_map_data() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Fill the $map array with values identifying the terrain&#xD;&#xA;            // --- type in each hex.  This example simply randomizes the&#xD;&#xA;            // --- contents of each hex.  Your code could actually load the&#xD;&#xA;            // --- values from a file or from a database.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Randomly choose a terrain type from the terrain&#xD;&#xA;                    // --- images array and assign to this coordinate.&#xD;&#xA;                    $map[$x][$y] = array_rand($terrain_images);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function render_map_to_html() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- This function renders the map to HTML.  It uses the $map&#xD;&#xA;            // --- array to determine what is in each hex, and the &#xD;&#xA;            // --- $terrain_images array to determine what type of image to&#xD;&#xA;            // --- draw in each cell.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $HEX_HEIGHT, $HEX_SIDE;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;    &#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Draw each hex in the map&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Terrain type in this hex&#xD;&#xA;                    $terrain = $map[$x][$y];&#xD;&#xA;    &#xD;&#xA;                    // --- Image to draw&#xD;&#xA;                    $img = $terrain_images[$terrain];&#xD;&#xA;    &#xD;&#xA;                    // --- Coordinates to place hex on the screen&#xD;&#xA;                    $tx = $x * $HEX_SIDE * 1.5;&#xD;&#xA;                    $ty = $y * $HEX_HEIGHT + ($x % 2) * $HEX_HEIGHT / 2;&#xD;&#xA;    &#xD;&#xA;                    // --- Style values to position hex image in the right location&#xD;&#xA;                    $style = sprintf(&quot;left:%dpx;top:%dpx&quot;, $tx, $ty);&#xD;&#xA;    &#xD;&#xA;                    // --- Output the image tag for this hex&#xD;&#xA;                    print &quot;&lt;img src='$img' alt='$terrain' class='hex' style='zindex:99;$style'&gt;\n&quot;;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        // --- Generate the map data&#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        generate_map_data();&#xD;&#xA;        ?&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;h1&gt;Hex Map Example&lt;/h1&gt;&#xD;&#xA;    	&lt;a href='index.phps'&gt;View page source&lt;/a&gt;&lt;br/&gt;&#xD;&#xA;    	&lt;a href='hexmap.zip'&gt;Download source and all images&lt;/a&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!-- Render the hex map inside of a div block --&gt;&#xD;&#xA;        &lt;div id='hexmap' class='hexmap' onclick='handle_map_click();'&gt;&#xD;&#xA;            &lt;?php render_map_to_html(); ?&gt;&#xD;&#xA;            &lt;img id='highlight' class='hex' src='hex-highlight.png' style='zindex:100;'&gt;&#xD;&#xA;        &lt;/div&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!--- output a list of all terrain types --&gt;&#xD;&#xA;        &lt;br/&gt;&#xD;&#xA;        &lt;?php &#xD;&#xA;            reset ($terrain_images);&#xD;&#xA;            while (list($type, $img) = each($terrain_images)) {&#xD;&#xA;                print &quot;&lt;div class='hex-key-element'&gt;&lt;img src='$img' alt='$type'&gt;&lt;br/&gt;$type&lt;/div&gt;&quot;;&#xD;&#xA;            }&#xD;&#xA;        ?&gt;&#xD;&#xA;        &lt;/body&gt;&#xD;&#xA;    &lt;/html&gt;&#xD;&#xA;&#xD;&#xA;Here's a link to download the full source (PHP + images)...&#xD;&#xA;&#xD;&#xA;[hex map demo source][2]&#xD;&#xA;&#xD;&#xA;Definitely could use some improvements.  I noticed in a previous comment you said you were familiar with jQuery, which is good.  I didn't use it here to keep things simple, but it would be pretty useful to use.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://perludus.com/examples/hexmap/&#xD;&#xA;  [2]: http://perludus.com/examples/hexmap/hexmap.zip&#xD;&#xA;  [3]: http://i.stack.imgur.com/GygK7.png&#xD;&#xA;" />
  <row Id="12846" PostHistoryTypeId="5" PostId="6450" RevisionGUID="69b28db9-fa61-4e88-b762-fd0c489d8fb0" CreationDate="2010-12-12T22:37:20.857" UserId="3830" Comment="Edited for clarity. " Text="I wasn't quite sure how to put this all into writing, but found it was easier to just write the code for a full live example.  The page (link and source below) dynamically generates a hexmap with PHP and uses Javascript to handle map clicks.  Clicking on a hex highlights the hex.&#xD;&#xA;&#xD;&#xA;The map is randomly generated, but you should be able to use your own code instead to populate the map.  It is represented by a simple 2d array, with each array element holding the type of terrain present in that hex.&#xD;&#xA;&#xD;&#xA;[Click me to try the Hex Map Example][1]&#xD;&#xA;&#xD;&#xA;To use, click on any hex to highlight it. &#xD;&#xA;&#xD;&#xA;Right now it's generating a 10x10 map, but you can change the map size in the PHP to be any size you want.  I'm also using a set of tiles from the game Wesnoth for the example.  They are 72x72 pixels in height, but the source also lets you set the size of your hex tiles.&#xD;&#xA;&#xD;&#xA;The hexes are represented by PNG images with &quot;outside the hex&quot; areas set as transparent.  To position each hex, I am using CSS to set each tile's absolute position, calculated by the hex grid coordinate.  The map is enclosed in a single DIV, which should make it easier for you to modify the example.&#xD;&#xA;&#xD;&#xA;Here is the full page code.  You can also download the [demo source][2] (including all hex images).&#xD;&#xA;&#xD;&#xA;    &lt;?php&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    // :: HEX.PHP&#xD;&#xA;    // ::&#xD;&#xA;    // :: Author:  &#xD;&#xA;    // ::    Tim Holt, tim.m.holt@gmail.com&#xD;&#xA;    // :: Description:  &#xD;&#xA;    // ::    Generates a random hex map from a set of terrain types, then&#xD;&#xA;    // ::    outputs HTML to display the map.  Also outputs Javascript&#xD;&#xA;    // ::    to handle mouse clicks on the map.  When a mouse click is&#xD;&#xA;    // ::    detected, the hex cell clicked is determined, and then the&#xD;&#xA;    // ::    cell is highlighted.&#xD;&#xA;    // :: Usage Restrictions:  &#xD;&#xA;    // ::    Available for any use.&#xD;&#xA;    // :: Notes:&#xD;&#xA;    // ::    Some content (where noted) copied and/or derived from other &#xD;&#xA;    // ::    sources.&#xD;&#xA;    // ::    Images used in this example are from the game Wesnoth.&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    &#xD;&#xA;    // --- Turn up error reporting in PHP&#xD;&#xA;    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);&#xD;&#xA;    &#xD;&#xA;    // --- Define some constants&#xD;&#xA;    $MAP_WIDTH = 10;&#xD;&#xA;    $MAP_HEIGHT = 10;&#xD;&#xA;    $HEX_HEIGHT = 72;&#xD;&#xA;    $HEX_SIDE = $HEX_HEIGHT / 2;&#xD;&#xA;    ?&gt;&#xD;&#xA;    &lt;html&gt;&#xD;&#xA;        &lt;head&gt;&#xD;&#xA;            &lt;title&gt;Hex Map Demo&lt;/title&gt;&#xD;&#xA;            &lt;!-- Stylesheet to define map boundary area and hex style --&gt;&#xD;&#xA;            &lt;style type=&quot;text/css&quot;&gt;&#xD;&#xA;            body {&#xD;&#xA;                /* &#xD;&#xA;                margin: 0;&#xD;&#xA;                padding: 0;&#xD;&#xA;                */&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hexmap {&#xD;&#xA;                width: &lt;?php echo $MAP_WIDTH * $HEX_SIDE * 1.5 + $HEX_SIDE/2; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $MAP_HEIGHT * $HEX_HEIGHT + $HEX_SIDE; ?&gt;px;&#xD;&#xA;                position: relative;&#xD;&#xA;                background: #000;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex-key-element {&#xD;&#xA;                width: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                border: 1px solid #fff;&#xD;&#xA;                float: left;&#xD;&#xA;                text-align: center;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex {&#xD;&#xA;                position: absolute;&#xD;&#xA;            }&#xD;&#xA;            &lt;/style&gt;&#xD;&#xA;        &lt;/head&gt;&#xD;&#xA;        &lt;body&gt;&#xD;&#xA;        &lt;script&gt;&#xD;&#xA;    function handle_map_click() {&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- This function gets a mouse click on the map, converts the click to&#xD;&#xA;        // --- hex map coordinates, then moves the highlight image to be over the&#xD;&#xA;        // --- clicked on hex.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine coordinate of map div as we want the click coordinate as&#xD;&#xA;        // --- we want the mouse click relative to this div.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var map = document.getElementById('hexmap');&#xD;&#xA;        var map_left = map_top = 0;&#xD;&#xA;        var obj = map;&#xD;&#xA;        if (obj.offsetParent) {&#xD;&#xA;            do {&#xD;&#xA;                map_left += obj.offsetLeft;&#xD;&#xA;                map_top += obj.offsetTop;&#xD;&#xA;            } while (obj = obj.offsetParent);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine click location on the page&#xD;&#xA;        // --- Code is from http://www.quirksmode.org/js/events_properties.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var click_x = 0;&#xD;&#xA;        var click_y = 0;&#xD;&#xA;        if (!e) var e = window.event;&#xD;&#xA;        if (e.pageX || e.pageY) {&#xD;&#xA;            click_x = e.pageX;&#xD;&#xA;            click_y = e.pageY;&#xD;&#xA;        } else if (e.clientX || e.clientY)     {&#xD;&#xA;            click_x = e.clientX + document.body.scrollLeft&#xD;&#xA;                + document.documentElement.scrollLeft;&#xD;&#xA;            click_y = e.clientY + document.body.scrollTop&#xD;&#xA;                + document.documentElement.scrollTop;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // --- Offset the map's location on the page so we get a click coordinate&#xD;&#xA;        // --- where [0,0] is the upper left corner of the map.&#xD;&#xA;        click_x -= map_left;&#xD;&#xA;        click_y -= map_top;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Convert mouse click to hex grid coordinate&#xD;&#xA;        // --- Code is from http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var hex_height = &lt;?php echo $HEX_HEIGHT; ?&gt;;&#xD;&#xA;        x = (click_x - (hex_height/2)) / (hex_height * 0.75);&#xD;&#xA;        y = (click_y - (hex_height/2)) / hex_height;&#xD;&#xA;        z = -0.5 * x - y;&#xD;&#xA;        y = -0.5 * x + y;&#xD;&#xA;    &#xD;&#xA;        ix = Math.floor(x+0.5);&#xD;&#xA;        iy = Math.floor(y+0.5);&#xD;&#xA;        iz = Math.floor(z+0.5);&#xD;&#xA;        s = ix + iy + iz;&#xD;&#xA;        if (s) {&#xD;&#xA;            abs_dx = Math.abs(ix-x);&#xD;&#xA;            abs_dy = Math.abs(iy-y);&#xD;&#xA;            abs_dz = Math.abs(iz-z);&#xD;&#xA;            if (abs_dx &gt;= abs_dy &amp;&amp; abs_dx &gt;= abs_dz) {&#xD;&#xA;                ix -= s;&#xD;&#xA;            } else if (abs_dy &gt;= abs_dx &amp;&amp; abs_dy &gt;= abs_dz) {&#xD;&#xA;                iy -= s;&#xD;&#xA;            } else {&#xD;&#xA;                iz -= s;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- map_x and map_y are the map coordinates of the click&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        map_x = ix;&#xD;&#xA;        map_y = (iy - iz + (1 - ix %2 ) ) / 2 - 0.5;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Calculate coordinates of this hex.  We will use this&#xD;&#xA;        // --- to place the highlight image.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        tx = map_x * &lt;?php echo $HEX_SIDE ?&gt; * 1.5;&#xD;&#xA;        ty = map_y * &lt;?php echo $HEX_HEIGHT ?&gt; + (map_x % 2) * (&lt;?php echo $HEX_HEIGHT ?&gt; / 2);&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Get the highlight image by ID&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var highlight = document.getElementById('highlight');&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Set position to be over the clicked on hex&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        highlight.style.left = tx + 'px';&#xD;&#xA;        highlight.style.top = ty + 'px';&#xD;&#xA;    }&#xD;&#xA;    &lt;/script&gt;&#xD;&#xA;    &lt;?php&#xD;&#xA;    &#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;    // --- This is a list of possible terrain types and the&#xD;&#xA;    // --- image to use to render the hex.&#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;        $terrain_images = array(&quot;grass&quot;    =&gt; &quot;grass-r1.png&quot;,&#xD;&#xA;                                &quot;dirt&quot;     =&gt; &quot;dirt.png&quot;,&#xD;&#xA;                                &quot;water&quot;    =&gt; &quot;coast.png&quot;,&#xD;&#xA;                                &quot;path&quot;     =&gt; &quot;stone-path.png&quot;,&#xD;&#xA;                                &quot;swamp&quot;    =&gt; &quot;water-tile.png&quot;,&#xD;&#xA;                                &quot;desert&quot;   =&gt; &quot;desert.png&quot;,&#xD;&#xA;                                &quot;oasis&quot;    =&gt; &quot;desert-oasis-tile.png&quot;,&#xD;&#xA;                                &quot;forest&quot;   =&gt; &quot;forested-mixed-summer-hills-tile.png&quot;,&#xD;&#xA;                                &quot;hills&quot;    =&gt; &quot;hills-variation3.png&quot;,&#xD;&#xA;                                &quot;mountain&quot; =&gt; &quot;mountain-tile.png&quot;);&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function generate_map_data() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Fill the $map array with values identifying the terrain&#xD;&#xA;            // --- type in each hex.  This example simply randomizes the&#xD;&#xA;            // --- contents of each hex.  Your code could actually load the&#xD;&#xA;            // --- values from a file or from a database.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Randomly choose a terrain type from the terrain&#xD;&#xA;                    // --- images array and assign to this coordinate.&#xD;&#xA;                    $map[$x][$y] = array_rand($terrain_images);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function render_map_to_html() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- This function renders the map to HTML.  It uses the $map&#xD;&#xA;            // --- array to determine what is in each hex, and the &#xD;&#xA;            // --- $terrain_images array to determine what type of image to&#xD;&#xA;            // --- draw in each cell.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $HEX_HEIGHT, $HEX_SIDE;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;    &#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Draw each hex in the map&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Terrain type in this hex&#xD;&#xA;                    $terrain = $map[$x][$y];&#xD;&#xA;    &#xD;&#xA;                    // --- Image to draw&#xD;&#xA;                    $img = $terrain_images[$terrain];&#xD;&#xA;    &#xD;&#xA;                    // --- Coordinates to place hex on the screen&#xD;&#xA;                    $tx = $x * $HEX_SIDE * 1.5;&#xD;&#xA;                    $ty = $y * $HEX_HEIGHT + ($x % 2) * $HEX_HEIGHT / 2;&#xD;&#xA;    &#xD;&#xA;                    // --- Style values to position hex image in the right location&#xD;&#xA;                    $style = sprintf(&quot;left:%dpx;top:%dpx&quot;, $tx, $ty);&#xD;&#xA;    &#xD;&#xA;                    // --- Output the image tag for this hex&#xD;&#xA;                    print &quot;&lt;img src='$img' alt='$terrain' class='hex' style='zindex:99;$style'&gt;\n&quot;;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        // --- Generate the map data&#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        generate_map_data();&#xD;&#xA;        ?&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;h1&gt;Hex Map Example&lt;/h1&gt;&#xD;&#xA;    	&lt;a href='index.phps'&gt;View page source&lt;/a&gt;&lt;br/&gt;&#xD;&#xA;    	&lt;a href='hexmap.zip'&gt;Download source and all images&lt;/a&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!-- Render the hex map inside of a div block --&gt;&#xD;&#xA;        &lt;div id='hexmap' class='hexmap' onclick='handle_map_click();'&gt;&#xD;&#xA;            &lt;?php render_map_to_html(); ?&gt;&#xD;&#xA;            &lt;img id='highlight' class='hex' src='hex-highlight.png' style='zindex:100;'&gt;&#xD;&#xA;        &lt;/div&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!--- output a list of all terrain types --&gt;&#xD;&#xA;        &lt;br/&gt;&#xD;&#xA;        &lt;?php &#xD;&#xA;            reset ($terrain_images);&#xD;&#xA;            while (list($type, $img) = each($terrain_images)) {&#xD;&#xA;                print &quot;&lt;div class='hex-key-element'&gt;&lt;img src='$img' alt='$type'&gt;&lt;br/&gt;$type&lt;/div&gt;&quot;;&#xD;&#xA;            }&#xD;&#xA;        ?&gt;&#xD;&#xA;        &lt;/body&gt;&#xD;&#xA;    &lt;/html&gt;&#xD;&#xA;&#xD;&#xA;Here is a screenshot of the example...&#xD;&#xA;&#xD;&#xA;![Hex Map Example Screenshot][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Definitely could use some improvements.  I noticed in a previous comment you said you were familiar with jQuery, which is good.  I didn't use it here to keep things simple, but it would be pretty useful to use.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://perludus.com/examples/hexmap/&#xD;&#xA;  [2]: http://perludus.com/examples/hexmap/hexmap.zip&#xD;&#xA;  [3]: http://i.stack.imgur.com/GygK7.png&#xD;&#xA;" />
  <row Id="12847" PostHistoryTypeId="5" PostId="6450" RevisionGUID="b1e208b0-0765-4c18-a13c-52472779630f" CreationDate="2010-12-12T22:56:08.600" UserId="3830" Comment="added 429 characters in body" Text="*Edit:   just added ability to scale hexes to the PHP source code.  Tiny 1/2 sized ones or 2x jumbo, it's all up to you :)*&#xD;&#xA;&#xD;&#xA;I wasn't quite sure how to put this all into writing, but found it was easier to just write the code for a full live example.  The page (link and source below) dynamically generates a hexmap with PHP and uses Javascript to handle map clicks.  Clicking on a hex highlights the hex.&#xD;&#xA;&#xD;&#xA;The map is randomly generated, but you should be able to use your own code instead to populate the map.  It is represented by a simple 2d array, with each array element holding the type of terrain present in that hex.&#xD;&#xA;&#xD;&#xA;[Click me to try the Hex Map Example][1]&#xD;&#xA;&#xD;&#xA;To use, click on any hex to highlight it. &#xD;&#xA;&#xD;&#xA;Right now it's generating a 10x10 map, but you can change the map size in the PHP to be any size you want.  I'm also using a set of tiles from the game Wesnoth for the example.  They are 72x72 pixels in height, but the source also lets you set the size of your hex tiles.&#xD;&#xA;&#xD;&#xA;The hexes are represented by PNG images with &quot;outside the hex&quot; areas set as transparent.  To position each hex, I am using CSS to set each tile's absolute position, calculated by the hex grid coordinate.  The map is enclosed in a single DIV, which should make it easier for you to modify the example.&#xD;&#xA;&#xD;&#xA;Here is the full page code.  You can also download the [demo source][2] (including all hex images).&#xD;&#xA;&#xD;&#xA;    &lt;?php&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    // :: HEX.PHP&#xD;&#xA;    // ::&#xD;&#xA;    // :: Author:  &#xD;&#xA;    // ::    Tim Holt, tim.m.holt@gmail.com&#xD;&#xA;    // :: Description:  &#xD;&#xA;    // ::    Generates a random hex map from a set of terrain types, then&#xD;&#xA;    // ::    outputs HTML to display the map.  Also outputs Javascript&#xD;&#xA;    // ::    to handle mouse clicks on the map.  When a mouse click is&#xD;&#xA;    // ::    detected, the hex cell clicked is determined, and then the&#xD;&#xA;    // ::    cell is highlighted.&#xD;&#xA;    // :: Usage Restrictions:  &#xD;&#xA;    // ::    Available for any use.&#xD;&#xA;    // :: Notes:&#xD;&#xA;    // ::    Some content (where noted) copied and/or derived from other &#xD;&#xA;    // ::    sources.&#xD;&#xA;    // ::    Images used in this example are from the game Wesnoth.&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    &#xD;&#xA;    // --- Turn up error reporting in PHP&#xD;&#xA;    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);&#xD;&#xA;    &#xD;&#xA;    // --- Define some constants&#xD;&#xA;    $MAP_WIDTH = 10;&#xD;&#xA;    $MAP_HEIGHT = 10;&#xD;&#xA;    $HEX_HEIGHT = 72;&#xD;&#xA;    &#xD;&#xA;    // --- Use this to scale the hexes smaller or larger than the actual graphics&#xD;&#xA;    $HEX_SCALED_HEIGHT = $HEX_HEIGHT * 1.0;&#xD;&#xA;    $HEX_SIDE = $HEX_SCALED_HEIGHT / 2;&#xD;&#xA;    ?&gt;&#xD;&#xA;    &lt;html&gt;&#xD;&#xA;        &lt;head&gt;&#xD;&#xA;            &lt;title&gt;Hex Map Demo&lt;/title&gt;&#xD;&#xA;            &lt;!-- Stylesheet to define map boundary area and hex style --&gt;&#xD;&#xA;            &lt;style type=&quot;text/css&quot;&gt;&#xD;&#xA;            body {&#xD;&#xA;                /* &#xD;&#xA;                margin: 0;&#xD;&#xA;                padding: 0;&#xD;&#xA;                */&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hexmap {&#xD;&#xA;                width: &lt;?php echo $MAP_WIDTH * $HEX_SIDE * 1.5 + $HEX_SIDE/2; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $MAP_HEIGHT * $HEX_SCALED_HEIGHT + $HEX_SIDE; ?&gt;px;&#xD;&#xA;                position: relative;&#xD;&#xA;                background: #000;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex-key-element {&#xD;&#xA;                width: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                border: 1px solid #fff;&#xD;&#xA;                float: left;&#xD;&#xA;                text-align: center;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex {&#xD;&#xA;                position: absolute;&#xD;&#xA;    			width: &lt;?php echo $HEX_SCALED_HEIGHT ?&gt;;&#xD;&#xA;    			height: &lt;?php echo $HEX_SCALED_HEIGHT ?&gt;;&#xD;&#xA;            }&#xD;&#xA;            &lt;/style&gt;&#xD;&#xA;        &lt;/head&gt;&#xD;&#xA;        &lt;body&gt;&#xD;&#xA;        &lt;script&gt;&#xD;&#xA;    function handle_map_click() {&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- This function gets a mouse click on the map, converts the click to&#xD;&#xA;        // --- hex map coordinates, then moves the highlight image to be over the&#xD;&#xA;        // --- clicked on hex.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine coordinate of map div as we want the click coordinate as&#xD;&#xA;        // --- we want the mouse click relative to this div.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var map = document.getElementById('hexmap');&#xD;&#xA;        var map_left = map_top = 0;&#xD;&#xA;        var obj = map;&#xD;&#xA;        if (obj.offsetParent) {&#xD;&#xA;            do {&#xD;&#xA;                map_left += obj.offsetLeft;&#xD;&#xA;                map_top += obj.offsetTop;&#xD;&#xA;            } while (obj = obj.offsetParent);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine click location on the page&#xD;&#xA;        // --- Code is from http://www.quirksmode.org/js/events_properties.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var click_x = 0;&#xD;&#xA;        var click_y = 0;&#xD;&#xA;        if (!e) var e = window.event;&#xD;&#xA;        if (e.pageX || e.pageY) {&#xD;&#xA;            click_x = e.pageX;&#xD;&#xA;            click_y = e.pageY;&#xD;&#xA;        } else if (e.clientX || e.clientY)     {&#xD;&#xA;            click_x = e.clientX + document.body.scrollLeft&#xD;&#xA;                + document.documentElement.scrollLeft;&#xD;&#xA;            click_y = e.clientY + document.body.scrollTop&#xD;&#xA;                + document.documentElement.scrollTop;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // --- Offset the map's location on the page so we get a click coordinate&#xD;&#xA;        // --- where [0,0] is the upper left corner of the map.&#xD;&#xA;        click_x -= map_left;&#xD;&#xA;        click_y -= map_top;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Convert mouse click to hex grid coordinate&#xD;&#xA;        // --- Code is from http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var hex_height = &lt;?php echo $HEX_SCALED_HEIGHT; ?&gt;;&#xD;&#xA;        x = (click_x - (hex_height/2)) / (hex_height * 0.75);&#xD;&#xA;        y = (click_y - (hex_height/2)) / hex_height;&#xD;&#xA;        z = -0.5 * x - y;&#xD;&#xA;        y = -0.5 * x + y;&#xD;&#xA;    &#xD;&#xA;        ix = Math.floor(x+0.5);&#xD;&#xA;        iy = Math.floor(y+0.5);&#xD;&#xA;        iz = Math.floor(z+0.5);&#xD;&#xA;        s = ix + iy + iz;&#xD;&#xA;        if (s) {&#xD;&#xA;            abs_dx = Math.abs(ix-x);&#xD;&#xA;            abs_dy = Math.abs(iy-y);&#xD;&#xA;            abs_dz = Math.abs(iz-z);&#xD;&#xA;            if (abs_dx &gt;= abs_dy &amp;&amp; abs_dx &gt;= abs_dz) {&#xD;&#xA;                ix -= s;&#xD;&#xA;            } else if (abs_dy &gt;= abs_dx &amp;&amp; abs_dy &gt;= abs_dz) {&#xD;&#xA;                iy -= s;&#xD;&#xA;            } else {&#xD;&#xA;                iz -= s;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- map_x and map_y are the map coordinates of the click&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        map_x = ix;&#xD;&#xA;        map_y = (iy - iz + (1 - ix %2 ) ) / 2 - 0.5;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Calculate coordinates of this hex.  We will use this&#xD;&#xA;        // --- to place the highlight image.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        tx = map_x * &lt;?php echo $HEX_SIDE ?&gt; * 1.5;&#xD;&#xA;        ty = map_y * &lt;?php echo $HEX_SCALED_HEIGHT ?&gt; + (map_x % 2) * (&lt;?php echo $HEX_SCALED_HEIGHT ?&gt; / 2);&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Get the highlight image by ID&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var highlight = document.getElementById('highlight');&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Set position to be over the clicked on hex&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        highlight.style.left = tx + 'px';&#xD;&#xA;        highlight.style.top = ty + 'px';&#xD;&#xA;    }&#xD;&#xA;    &lt;/script&gt;&#xD;&#xA;    &lt;?php&#xD;&#xA;    &#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;    // --- This is a list of possible terrain types and the&#xD;&#xA;    // --- image to use to render the hex.&#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;        $terrain_images = array(&quot;grass&quot;    =&gt; &quot;grass-r1.png&quot;,&#xD;&#xA;                                &quot;dirt&quot;     =&gt; &quot;dirt.png&quot;,&#xD;&#xA;                                &quot;water&quot;    =&gt; &quot;coast.png&quot;,&#xD;&#xA;                                &quot;path&quot;     =&gt; &quot;stone-path.png&quot;,&#xD;&#xA;                                &quot;swamp&quot;    =&gt; &quot;water-tile.png&quot;,&#xD;&#xA;                                &quot;desert&quot;   =&gt; &quot;desert.png&quot;,&#xD;&#xA;                                &quot;oasis&quot;    =&gt; &quot;desert-oasis-tile.png&quot;,&#xD;&#xA;                                &quot;forest&quot;   =&gt; &quot;forested-mixed-summer-hills-tile.png&quot;,&#xD;&#xA;                                &quot;hills&quot;    =&gt; &quot;hills-variation3.png&quot;,&#xD;&#xA;                                &quot;mountain&quot; =&gt; &quot;mountain-tile.png&quot;);&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function generate_map_data() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Fill the $map array with values identifying the terrain&#xD;&#xA;            // --- type in each hex.  This example simply randomizes the&#xD;&#xA;            // --- contents of each hex.  Your code could actually load the&#xD;&#xA;            // --- values from a file or from a database.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Randomly choose a terrain type from the terrain&#xD;&#xA;                    // --- images array and assign to this coordinate.&#xD;&#xA;                    $map[$x][$y] = array_rand($terrain_images);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function render_map_to_html() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- This function renders the map to HTML.  It uses the $map&#xD;&#xA;            // --- array to determine what is in each hex, and the &#xD;&#xA;            // --- $terrain_images array to determine what type of image to&#xD;&#xA;            // --- draw in each cell.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $HEX_HEIGHT, $HEX_SCALED_HEIGHT, $HEX_SIDE;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;    &#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Draw each hex in the map&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Terrain type in this hex&#xD;&#xA;                    $terrain = $map[$x][$y];&#xD;&#xA;    &#xD;&#xA;                    // --- Image to draw&#xD;&#xA;                    $img = $terrain_images[$terrain];&#xD;&#xA;    &#xD;&#xA;                    // --- Coordinates to place hex on the screen&#xD;&#xA;                    $tx = $x * $HEX_SIDE * 1.5;&#xD;&#xA;                    $ty = $y * $HEX_SCALED_HEIGHT + ($x % 2) * $HEX_SCALED_HEIGHT / 2;&#xD;&#xA;    &#xD;&#xA;                    // --- Style values to position hex image in the right location&#xD;&#xA;                    $style = sprintf(&quot;left:%dpx;top:%dpx&quot;, $tx, $ty);&#xD;&#xA;    &#xD;&#xA;                    // --- Output the image tag for this hex&#xD;&#xA;                    print &quot;&lt;img src='$img' alt='$terrain' class='hex' style='zindex:99;$style'&gt;\n&quot;;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        // --- Generate the map data&#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        generate_map_data();&#xD;&#xA;        ?&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;h1&gt;Hex Map Example&lt;/h1&gt;&#xD;&#xA;    	&lt;a href='index.phps'&gt;View page source&lt;/a&gt;&lt;br/&gt;&#xD;&#xA;    	&lt;a href='hexmap.zip'&gt;Download source and all images&lt;/a&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!-- Render the hex map inside of a div block --&gt;&#xD;&#xA;        &lt;div id='hexmap' class='hexmap' onclick='handle_map_click();'&gt;&#xD;&#xA;            &lt;?php render_map_to_html(); ?&gt;&#xD;&#xA;            &lt;img id='highlight' class='hex' src='hex-highlight.png' style='zindex:100;'&gt;&#xD;&#xA;        &lt;/div&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!--- output a list of all terrain types --&gt;&#xD;&#xA;        &lt;br/&gt;&#xD;&#xA;        &lt;?php &#xD;&#xA;            reset ($terrain_images);&#xD;&#xA;            while (list($type, $img) = each($terrain_images)) {&#xD;&#xA;                print &quot;&lt;div class='hex-key-element'&gt;&lt;img src='$img' alt='$type'&gt;&lt;br/&gt;$type&lt;/div&gt;&quot;;&#xD;&#xA;            }&#xD;&#xA;        ?&gt;&#xD;&#xA;        &lt;/body&gt;&#xD;&#xA;    &lt;/html&gt;&#xD;&#xA;&#xD;&#xA;Here is a screenshot of the example...&#xD;&#xA;&#xD;&#xA;![Hex Map Example Screenshot][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Definitely could use some improvements.  I noticed in a previous comment you said you were familiar with jQuery, which is good.  I didn't use it here to keep things simple, but it would be pretty useful to use.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://perludus.com/examples/hexmap/&#xD;&#xA;  [2]: http://perludus.com/examples/hexmap/hexmap.zip&#xD;&#xA;  [3]: http://i.stack.imgur.com/GygK7.png&#xD;&#xA;" />
  <row Id="12848" PostHistoryTypeId="2" PostId="6451" RevisionGUID="d70ef5eb-1a7a-4068-b256-d8f583a0a9c1" CreationDate="2010-12-12T23:04:59.030" UserId="1868" Text="I have been working on [my hobby project][1] now for around 2-3 months. That means evening or two every now and then plus weekends occasionally. The project is maybe 2/3 done for a proper first release. It is maybe too early to call it success but here are the things that have kept me going so far:&#xD;&#xA;&#xD;&#xA;- I had a pretty clear idea what is the game going to be about. Pretty simple but offers many extension points for version 2 and 3.&#xD;&#xA;- I have been blogging and tweeting about.&#xD;&#xA;- I picked an area that interest me (JS + HTML5 Canvas + FB integration) and is different enough from my day job (CMS, J2EE, GWT/GXT)&#xD;&#xA;- The selected technology allows easy and quick tweaks, no compiling etc.&#xD;&#xA;- Everything is done just because it is fun. The game might work as reference one day but that is not the reason for working with it.&#xD;&#xA;- I have been kind with my friends, not asking feedback after each change.&#xD;&#xA;- My gf understands me :-)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.momentumracer.com" />
  <row Id="12849" PostHistoryTypeId="2" PostId="6452" RevisionGUID="0ab16fe8-7bf8-4165-b7b6-29a887ace5ee" CreationDate="2010-12-13T01:52:52.037" UserId="3446" Text="I've realized that though I like playing videogames, I find it much more entertaining to actually _make_ them. This makes me wonder, if I'm planning to develop an [X]* game, ¿do I need to be an avid [X] gamer? ¿How can I develop interesting mechanics if I play that genre sparingly?&#xD;&#xA;&#xD;&#xA;In order to get empirical answers, I'm more interested in listening to the opinion of those who have worked/are working in the game industry ¿are you and your co-workers avid gameplayers or &quot;casual&quot; gamers? ¿What about the Schafers, Carmacks, McGees and Gilberts of the industry (should anyone know any of them :) )?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*being [X] any game genre: Platformer, RPG, RTS, FPS, etc.&#xD;&#xA;&#xD;&#xA;PS: I'm trying to make this question as subjective-less as possible, so feel free to point any improvements." />
  <row Id="12850" PostHistoryTypeId="1" PostId="6452" RevisionGUID="0ab16fe8-7bf8-4165-b7b6-29a887ace5ee" CreationDate="2010-12-13T01:52:52.037" UserId="3446" Text="Developing interesting game mechanics when not an avid gamer" />
  <row Id="12851" PostHistoryTypeId="3" PostId="6452" RevisionGUID="0ab16fe8-7bf8-4165-b7b6-29a887ace5ee" CreationDate="2010-12-13T01:52:52.037" UserId="3446" Text="&lt;game-mechanics&gt;&lt;game-industry&gt;" />
  <row Id="12852" PostHistoryTypeId="2" PostId="6453" RevisionGUID="d0804b4e-5054-40b6-929c-d9328a2dce8b" CreationDate="2010-12-13T03:21:00.300" UserDisplayName="Zorku" Text="If you're piling so much stuff on your plate that you can't finish a game just bite the bullet and cut the thing into smaller chunks. If you keep the game short it really doesn't need so much stuff and if you're doing anything object oriented and you write your programs well you'll have this big library of your own code that you can copy from later if you really want something with a much more complicated structure.&#xD;&#xA;&#xD;&#xA;But really that's just if the whole experience thing isn't enough to motivate you on its own." />
  <row Id="12853" PostHistoryTypeId="2" PostId="6454" RevisionGUID="3838d2e2-a5e6-453d-8c76-7e5bb04f42dc" CreationDate="2010-12-13T03:31:20.443" UserDisplayName="Zorku" Text="Look at some of the early playstation era games, like Final Fantasy 7. Given the low resolution it is often easy to pick out the parts, or at least a good portion of them. &#xD;&#xA;&#xD;&#xA;Even given your edit though this is still a very artist based question, probably more so than before. For this reason there is not a particular formula for an explosion or whatnot. 10 different animators would easily create 10 different explosions when given the same precise request." />
  <row Id="12854" PostHistoryTypeId="2" PostId="6455" RevisionGUID="d84e9d04-7c65-47ed-92fe-da7feac19710" CreationDate="2010-12-13T03:54:37.683" UserId="3119" Text="In some games, there´s an special &quot;behind the scenes&quot; documentary where the interviewees talk about their gaming habits. &#xD;&#xA;&#xD;&#xA;Lately, I´ve watched those from God of War, Heavy Rain and Uncharted 2.&#xD;&#xA;&#xD;&#xA;Personal opinion: You don´t have to be a hardcore gamer but at least try to play those games similar to the one you want to make.&#xD;&#xA;" />
  <row Id="12855" PostHistoryTypeId="2" PostId="6456" RevisionGUID="de5285c5-f3f9-4e28-82c7-b845d1f6c9d4" CreationDate="2010-12-13T04:20:37.837" UserId="1966" Text="What types of game should I start making to get started with Unity 3D? Any ideas?&#xD;&#xA;&#xD;&#xA;Remember: it should be small, and not art-intensive.&#xD;&#xA;" />
  <row Id="12856" PostHistoryTypeId="1" PostId="6456" RevisionGUID="de5285c5-f3f9-4e28-82c7-b845d1f6c9d4" CreationDate="2010-12-13T04:20:37.837" UserId="1966" Text="A good Unity project to get started" />
  <row Id="12857" PostHistoryTypeId="3" PostId="6456" RevisionGUID="de5285c5-f3f9-4e28-82c7-b845d1f6c9d4" CreationDate="2010-12-13T04:20:37.837" UserId="1966" Text="&lt;unity&gt;" />
  <row Id="12858" PostHistoryTypeId="2" PostId="6457" RevisionGUID="72a1b865-f49e-471b-afc8-895630b56164" CreationDate="2010-12-13T04:31:08.613" UserId="3830" Text="Take one of the existing Unity example projects and modify it.  This gives you a good solid base to work from.  " />
  <row Id="12859" PostHistoryTypeId="2" PostId="6458" RevisionGUID="8b48cf41-ccdf-4fa5-b439-afaa7f85360f" CreationDate="2010-12-13T04:38:12.383" UserId="3830" Text="You ought to play the type of game you are developing at least some so that you understand how the game type works.&#xD;&#xA;&#xD;&#xA;One advantage of not playing too much is that your mind doesn't get filled with the ideas of other people.  Give yourself a chance to think of things that are new and different.&#xD;&#xA;&#xD;&#xA;One great way to at least get an introduction to new games is to play free demos.  A few years back I went on a kick of playing all the 10 day free trials of MMOs I could find.  " />
  <row Id="12860" PostHistoryTypeId="5" PostId="6452" RevisionGUID="8caa4d59-b514-45bf-83fb-745a9bad1cba" CreationDate="2010-12-13T06:27:30.130" UserId="51" Comment="deleted 1 characters in body" Text="I've realized that though I like playing videogames, I find it much more entertaining to actually _make_ them. This makes me wonder, if I'm planning to develop an [X]* game, do I need to be an avid [X] gamer? How can I develop interesting mechanics if I play that genre sparingly?&#xD;&#xA;&#xD;&#xA;In order to get empirical answers, I'm more interested in listening to the opinion of those who have worked/are working in the game industry.  Are you and your co-workers avid gameplayers or &quot;casual&quot; gamers?  What about the Schafers, Carmacks, McGees and Gilberts of the industry (should anyone know any of them :) )?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*being [X] any game genre: Platformer, RPG, RTS, FPS, etc.&#xD;&#xA;&#xD;&#xA;PS: I'm trying to make this question as subjective-less as possible, so feel free to point any improvements." />
  <row Id="12861" PostHistoryTypeId="2" PostId="6459" RevisionGUID="57eb083d-9c31-40cb-8ae2-563d956c1b87" CreationDate="2010-12-13T06:34:45.537" UserId="51" Text="It's important to do your research.&#xD;&#xA;&#xD;&#xA;Playing other peoples' games is a great way to get some case studies.  See how their controls compare to yours.  See what features you have that they don't, and vice versa.  You can also pull from these games to see what gamers *expect* who play that genre of games.  This is particularly important to controls. &#xD;&#xA;&#xD;&#xA;That being said once you get the core feeling down, the rest of it is usually just details that can be skipped over.  You don't need to know the storyline, settings, or particular puzzles that other games in the same genre employ to make your own game.  But if you're making a platformer, you'd better know that your movement and jumping is as good as the other games.  If you're making a console FPS you should play games that get aiming down properly.  Modern RTS games all have a &quot;select idle resource gatherers&quot; key binding, which unless you're making a game without resource gathering you should also include because the players expect it.&#xD;&#xA;&#xD;&#xA;So no, you don't have to play games religiously in order to make good games.  You do have to have an analytical, player-focused mindset, and most players do play other games and have certain expectations.  Not fulfilling those expectations can lead to disappointments." />
  <row Id="12862" PostHistoryTypeId="5" PostId="6450" RevisionGUID="63128c3a-a7b8-4a67-b31c-58cbb2877e57" CreationDate="2010-12-13T06:43:31.340" UserId="3830" Comment="Fixed error in javascript that caused error on firefox" Text="*Edit:  Fixed error in javascript that caused error on firefox *&#xD;&#xA;*Edit:   just added ability to scale hexes to the PHP source code.  Tiny 1/2 sized ones or 2x jumbo, it's all up to you :)*&#xD;&#xA;&#xD;&#xA;I wasn't quite sure how to put this all into writing, but found it was easier to just write the code for a full live example.  The page (link and source below) dynamically generates a hexmap with PHP and uses Javascript to handle map clicks.  Clicking on a hex highlights the hex.&#xD;&#xA;&#xD;&#xA;The map is randomly generated, but you should be able to use your own code instead to populate the map.  It is represented by a simple 2d array, with each array element holding the type of terrain present in that hex.&#xD;&#xA;&#xD;&#xA;[Click me to try the Hex Map Example][1]&#xD;&#xA;&#xD;&#xA;To use, click on any hex to highlight it. &#xD;&#xA;&#xD;&#xA;Right now it's generating a 10x10 map, but you can change the map size in the PHP to be any size you want.  I'm also using a set of tiles from the game Wesnoth for the example.  They are 72x72 pixels in height, but the source also lets you set the size of your hex tiles.&#xD;&#xA;&#xD;&#xA;The hexes are represented by PNG images with &quot;outside the hex&quot; areas set as transparent.  To position each hex, I am using CSS to set each tile's absolute position, calculated by the hex grid coordinate.  The map is enclosed in a single DIV, which should make it easier for you to modify the example.&#xD;&#xA;&#xD;&#xA;Here is the full page code.  You can also download the [demo source][2] (including all hex images).&#xD;&#xA;&#xD;&#xA;    &lt;?php&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    // :: HEX.PHP&#xD;&#xA;    // ::&#xD;&#xA;    // :: Author:  &#xD;&#xA;    // ::    Tim Holt, tim.m.holt@gmail.com&#xD;&#xA;    // :: Description:  &#xD;&#xA;    // ::    Generates a random hex map from a set of terrain types, then&#xD;&#xA;    // ::    outputs HTML to display the map.  Also outputs Javascript&#xD;&#xA;    // ::    to handle mouse clicks on the map.  When a mouse click is&#xD;&#xA;    // ::    detected, the hex cell clicked is determined, and then the&#xD;&#xA;    // ::    cell is highlighted.&#xD;&#xA;    // :: Usage Restrictions:  &#xD;&#xA;    // ::    Available for any use.&#xD;&#xA;    // :: Notes:&#xD;&#xA;    // ::    Some content (where noted) copied and/or derived from other &#xD;&#xA;    // ::    sources.&#xD;&#xA;    // ::    Images used in this example are from the game Wesnoth.&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    &#xD;&#xA;    // --- Turn up error reporting in PHP&#xD;&#xA;    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);&#xD;&#xA;    &#xD;&#xA;    // --- Define some constants&#xD;&#xA;    $MAP_WIDTH = 10;&#xD;&#xA;    $MAP_HEIGHT = 10;&#xD;&#xA;    $HEX_HEIGHT = 72;&#xD;&#xA;    &#xD;&#xA;    // --- Use this to scale the hexes smaller or larger than the actual graphics&#xD;&#xA;    $HEX_SCALED_HEIGHT = $HEX_HEIGHT * 1.0;&#xD;&#xA;    $HEX_SIDE = $HEX_SCALED_HEIGHT / 2;&#xD;&#xA;    ?&gt;&#xD;&#xA;    &lt;html&gt;&#xD;&#xA;        &lt;head&gt;&#xD;&#xA;            &lt;title&gt;Hex Map Demo&lt;/title&gt;&#xD;&#xA;            &lt;!-- Stylesheet to define map boundary area and hex style --&gt;&#xD;&#xA;            &lt;style type=&quot;text/css&quot;&gt;&#xD;&#xA;            body {&#xD;&#xA;                /* &#xD;&#xA;                margin: 0;&#xD;&#xA;                padding: 0;&#xD;&#xA;                */&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hexmap {&#xD;&#xA;                width: &lt;?php echo $MAP_WIDTH * $HEX_SIDE * 1.5 + $HEX_SIDE/2; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $MAP_HEIGHT * $HEX_SCALED_HEIGHT + $HEX_SIDE; ?&gt;px;&#xD;&#xA;                position: relative;&#xD;&#xA;                background: #000;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex-key-element {&#xD;&#xA;                width: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                border: 1px solid #fff;&#xD;&#xA;                float: left;&#xD;&#xA;                text-align: center;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex {&#xD;&#xA;                position: absolute;&#xD;&#xA;                width: &lt;?php echo $HEX_SCALED_HEIGHT ?&gt;;&#xD;&#xA;                height: &lt;?php echo $HEX_SCALED_HEIGHT ?&gt;;&#xD;&#xA;            }&#xD;&#xA;            &lt;/style&gt;&#xD;&#xA;        &lt;/head&gt;&#xD;&#xA;        &lt;body&gt;&#xD;&#xA;        &lt;script&gt;&#xD;&#xA;    &#xD;&#xA;    function handle_map_click(event) {&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- This function gets a mouse click on the map, converts the click to&#xD;&#xA;        // --- hex map coordinates, then moves the highlight image to be over the&#xD;&#xA;        // --- clicked on hex.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine coordinate of map div as we want the click coordinate as&#xD;&#xA;        // --- we want the mouse click relative to this div.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var map = document.getElementById('hexmap');&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Code from http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        click_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById(&quot;hexmap&quot;).offsetLeft;&#xD;&#xA;        click_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById(&quot;hexmap&quot;).offsetTop;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Convert mouse click to hex grid coordinate&#xD;&#xA;        // --- Code is from http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var hex_height = &lt;?php echo $HEX_SCALED_HEIGHT; ?&gt;;&#xD;&#xA;        x = (click_x - (hex_height/2)) / (hex_height * 0.75);&#xD;&#xA;        y = (click_y - (hex_height/2)) / hex_height;&#xD;&#xA;        z = -0.5 * x - y;&#xD;&#xA;        y = -0.5 * x + y;&#xD;&#xA;    &#xD;&#xA;        ix = Math.floor(x+0.5);&#xD;&#xA;        iy = Math.floor(y+0.5);&#xD;&#xA;        iz = Math.floor(z+0.5);&#xD;&#xA;        s = ix + iy + iz;&#xD;&#xA;        if (s) {&#xD;&#xA;            abs_dx = Math.abs(ix-x);&#xD;&#xA;            abs_dy = Math.abs(iy-y);&#xD;&#xA;            abs_dz = Math.abs(iz-z);&#xD;&#xA;            if (abs_dx &gt;= abs_dy &amp;&amp; abs_dx &gt;= abs_dz) {&#xD;&#xA;                ix -= s;&#xD;&#xA;            } else if (abs_dy &gt;= abs_dx &amp;&amp; abs_dy &gt;= abs_dz) {&#xD;&#xA;                iy -= s;&#xD;&#xA;            } else {&#xD;&#xA;                iz -= s;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- map_x and map_y are the map coordinates of the click&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        map_x = ix;&#xD;&#xA;        map_y = (iy - iz + (1 - ix %2 ) ) / 2 - 0.5;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Calculate coordinates of this hex.  We will use this&#xD;&#xA;        // --- to place the highlight image.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        tx = map_x * &lt;?php echo $HEX_SIDE ?&gt; * 1.5;&#xD;&#xA;        ty = map_y * &lt;?php echo $HEX_SCALED_HEIGHT ?&gt; + (map_x % 2) * (&lt;?php echo $HEX_SCALED_HEIGHT ?&gt; / 2);&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Get the highlight image by ID&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var highlight = document.getElementById('highlight');&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Set position to be over the clicked on hex&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        highlight.style.left = tx + 'px';&#xD;&#xA;        highlight.style.top = ty + 'px';&#xD;&#xA;    }&#xD;&#xA;    &lt;/script&gt;&#xD;&#xA;    &lt;?php&#xD;&#xA;    &#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;    // --- This is a list of possible terrain types and the&#xD;&#xA;    // --- image to use to render the hex.&#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;        $terrain_images = array(&quot;grass&quot;    =&gt; &quot;grass-r1.png&quot;,&#xD;&#xA;                                &quot;dirt&quot;     =&gt; &quot;dirt.png&quot;,&#xD;&#xA;                                &quot;water&quot;    =&gt; &quot;coast.png&quot;,&#xD;&#xA;                                &quot;path&quot;     =&gt; &quot;stone-path.png&quot;,&#xD;&#xA;                                &quot;swamp&quot;    =&gt; &quot;water-tile.png&quot;,&#xD;&#xA;                                &quot;desert&quot;   =&gt; &quot;desert.png&quot;,&#xD;&#xA;                                &quot;oasis&quot;    =&gt; &quot;desert-oasis-tile.png&quot;,&#xD;&#xA;                                &quot;forest&quot;   =&gt; &quot;forested-mixed-summer-hills-tile.png&quot;,&#xD;&#xA;                                &quot;hills&quot;    =&gt; &quot;hills-variation3.png&quot;,&#xD;&#xA;                                &quot;mountain&quot; =&gt; &quot;mountain-tile.png&quot;);&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function generate_map_data() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Fill the $map array with values identifying the terrain&#xD;&#xA;            // --- type in each hex.  This example simply randomizes the&#xD;&#xA;            // --- contents of each hex.  Your code could actually load the&#xD;&#xA;            // --- values from a file or from a database.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Randomly choose a terrain type from the terrain&#xD;&#xA;                    // --- images array and assign to this coordinate.&#xD;&#xA;                    $map[$x][$y] = array_rand($terrain_images);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function render_map_to_html() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- This function renders the map to HTML.  It uses the $map&#xD;&#xA;            // --- array to determine what is in each hex, and the &#xD;&#xA;            // --- $terrain_images array to determine what type of image to&#xD;&#xA;            // --- draw in each cell.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $HEX_HEIGHT, $HEX_SCALED_HEIGHT, $HEX_SIDE;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;    &#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Draw each hex in the map&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Terrain type in this hex&#xD;&#xA;                    $terrain = $map[$x][$y];&#xD;&#xA;    &#xD;&#xA;                    // --- Image to draw&#xD;&#xA;                    $img = $terrain_images[$terrain];&#xD;&#xA;    &#xD;&#xA;                    // --- Coordinates to place hex on the screen&#xD;&#xA;                    $tx = $x * $HEX_SIDE * 1.5;&#xD;&#xA;                    $ty = $y * $HEX_SCALED_HEIGHT + ($x % 2) * $HEX_SCALED_HEIGHT / 2;&#xD;&#xA;    &#xD;&#xA;                    // --- Style values to position hex image in the right location&#xD;&#xA;                    $style = sprintf(&quot;left:%dpx;top:%dpx&quot;, $tx, $ty);&#xD;&#xA;    &#xD;&#xA;                    // --- Output the image tag for this hex&#xD;&#xA;                    print &quot;&lt;img src='$img' alt='$terrain' class='hex' style='zindex:99;$style'&gt;\n&quot;;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        // --- Generate the map data&#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        generate_map_data();&#xD;&#xA;        ?&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;h1&gt;Hex Map Example&lt;/h1&gt;&#xD;&#xA;        &lt;a href='index.phps'&gt;View page source&lt;/a&gt;&lt;br/&gt;&#xD;&#xA;        &lt;a href='hexmap.zip'&gt;Download source and all images&lt;/a&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!-- Render the hex map inside of a div block --&gt;&#xD;&#xA;        &lt;div id='hexmap' class='hexmap' onclick='handle_map_click(event);'&gt;&#xD;&#xA;            &lt;?php render_map_to_html(); ?&gt;&#xD;&#xA;            &lt;img id='highlight' class='hex' src='hex-highlight.png' style='zindex:100;'&gt;&#xD;&#xA;        &lt;/div&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!--- output a list of all terrain types --&gt;&#xD;&#xA;        &lt;br/&gt;&#xD;&#xA;        &lt;?php &#xD;&#xA;            reset ($terrain_images);&#xD;&#xA;            while (list($type, $img) = each($terrain_images)) {&#xD;&#xA;                print &quot;&lt;div class='hex-key-element'&gt;&lt;img src='$img' alt='$type'&gt;&lt;br/&gt;$type&lt;/div&gt;&quot;;&#xD;&#xA;            }&#xD;&#xA;        ?&gt;&#xD;&#xA;        &lt;/body&gt;&#xD;&#xA;    &lt;/html&gt;&#xD;&#xA;&#xD;&#xA;Here is a screenshot of the example...&#xD;&#xA;&#xD;&#xA;![Hex Map Example Screenshot][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Definitely could use some improvements.  I noticed in a previous comment you said you were familiar with jQuery, which is good.  I didn't use it here to keep things simple, but it would be pretty useful to use.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://perludus.com/examples/hexmap/&#xD;&#xA;  [2]: http://perludus.com/examples/hexmap/hexmap.zip&#xD;&#xA;  [3]: http://i.stack.imgur.com/GygK7.png&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12863" PostHistoryTypeId="2" PostId="6460" RevisionGUID="3b836e38-28aa-47fe-99a9-7c6052d8e543" CreationDate="2010-12-13T07:02:15.937" UserId="3905" Text="A better question might be: why are there no new books on Java game programming? Java got pushed out of the in-browser experience by Flash and was never able to steal away C++ game developers in a big way. Nevertheless, Minecraft is completely fun. Both those books convey design principles that are applicable to any language or environment and the hand holding is not overbearing. Reading them will not instill any bad habits in you, so I say go for it." />
  <row Id="12867" PostHistoryTypeId="2" PostId="6462" RevisionGUID="736da1af-0010-4f4b-bc7a-f98a47713ba6" CreationDate="2010-12-13T09:29:27.673" UserId="323" Text="I'm a big fan of many things moving simultaneously at slightly different rates.&#xD;&#xA;&#xD;&#xA;Take a look at (shameless plug) [KØЯ.][1], a vertical shooter I wrote a bit back. I'm quite proud of the explosions. They're a bunch of simple arcs (literally, I drew a circle in Gimp, then deleted an offset circle out of it, then saved it as a .png) rotating about all three axes at a random speed, expanding at various speeds, slowing down at different speeds, and fading out at different speeds. All of that is random. I just tweaked the randomness a bit until it looked good and went from there.&#xD;&#xA;&#xD;&#xA;One thing I've started to realize is that subtle intentional breaking of the laws of physics looks awesome. I imagine we've all seen anime with people leaping off walls or falling ten stories and landing in an instant. We know that stuff isn't possible, so our brains interpret it as &quot;omg this person is so awesome they can defy physics.&quot;&#xD;&#xA;&#xD;&#xA;The explosion effects are the same way. You can't have an expanding sphere of explosion with some parts accelerating and some parts decelerating. That's crazy talk! That can't happen! And yet, that's exactly what I do, so, bam! It looks awesome.&#xD;&#xA;&#xD;&#xA;You can also - as you can see in KØЯ. - get a lot of mileage out of &quot;stylistic design&quot; (read as &quot;the programmer sucks at art so he makes monsters that consist of a bunch of colored boxes&quot;) and fancy linework and bloom, as long as it's all consistent and looks like the designer was clever instead of just incompetent.&#xD;&#xA;&#xD;&#xA;Fundamentally, though, look at other games or movies and see what they did. Go play Gratuitous Space Battles for a few hours. Or look at GSB's source material - space combat movies, Star Trek and Star Wars, and go from there. Play games with awesome effects, watch movies with awesome effects, watch anime with awesome effects. Analyze it from there and figure out how to fake the behavior you want.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mandible.net/2010/05/21/k0r/" />
  <row Id="12868" PostHistoryTypeId="2" PostId="6463" RevisionGUID="66c2a2c9-0368-4aea-8712-d9e503c9d7b3" CreationDate="2010-12-13T10:38:04.373" UserDisplayName="user3922" Text="I found a blog on one of Microsofts sites to be quite useful http://blogs.microsoft.co.il/blogs/pavely/&#xD;&#xA;&#xD;&#xA;Helped me start developing a 2D game." />
  <row Id="12869" PostHistoryTypeId="2" PostId="6464" RevisionGUID="6eae2f66-036e-41c9-8562-561242ac2700" CreationDate="2010-12-13T10:55:14.030" UserId="3971" Text="I think it would be fun to make a game for pc that has an online community like Warcraft III (the RTS, not the MMORPG), aka there's lobbies and chat rooms and users can host games to play with eachother. And there's no seriousness, just fun mini games that last on average 30-60 minutes, more or less depending on the game.&#xD;&#xA;&#xD;&#xA;I searched google but it's really hard to find anything. Is there anything similar to this idea that's already out there? Or is this a first?&#xD;&#xA;&#xD;&#xA;Also, in making this, any recommendations, flaming, or random comments? (yes I know it is hard to make an online game and such, especially since I have no experience with networking. I do have 2-3 years of programming experience, however).&#xD;&#xA;&#xD;&#xA;**Some more info on what I want to create.**&#xD;&#xA;&#xD;&#xA;I want it to be easy for users to create games and play with friends. All of us game creators have ideas, and we probably draw them out on paper (graph paper for me). Wouldn't it be amazing if it was a matter of a couple hours to transfer that idea to a fully working game, even if it is in 3d?" />
  <row Id="12870" PostHistoryTypeId="1" PostId="6464" RevisionGUID="6eae2f66-036e-41c9-8562-561242ac2700" CreationDate="2010-12-13T10:55:14.030" UserId="3971" Text="Mini Game Platform for PC - similar to Warcraft III Custom Games" />
  <row Id="12871" PostHistoryTypeId="3" PostId="6464" RevisionGUID="6eae2f66-036e-41c9-8562-561242ac2700" CreationDate="2010-12-13T10:55:14.030" UserId="3971" Text="&lt;game-design&gt;&lt;game-industry&gt;&lt;game-center&gt;&lt;online&gt;" />
  <row Id="12872" PostHistoryTypeId="2" PostId="6465" RevisionGUID="8c2998cf-a133-402f-86ff-b8a0daab0cbe" CreationDate="2010-12-13T12:49:07.117" UserId="305" Text="If you just want to kludge a couple of quick game ideas together for online play, have you already looked at Starcraft 2's Galaxy Editor? It's the first thing that came to mind, since you already seem familiar with Warcraft III Custom Games. You can whip up a basic Starcraft 2 Melee map together in a few minutes, and that's a great way to learn the tool and have fun with friends at the same time. Then drill down into Blizzard's scripting tools and create custom games. It'll still all look like Starcraft, but you can at least try out new game ideas fairly quickly. &#xD;&#xA;&#xD;&#xA;If you're not specifically interested in multiplayer and just want to use chat rooms for socializing, I'd suggest looking at Kongregate's API. You'll get pretty robust chat and community functionality for very little code, and you can focus your programming experience on making small Actionscript games." />
  <row Id="12873" PostHistoryTypeId="2" PostId="6466" RevisionGUID="fb3ff3bc-7c55-4a39-b11f-4e44293b3e9d" CreationDate="2010-12-13T12:50:59.997" UserId="3962" Text="I am an experienced app developer (c#) however I am just looking at starting 2d game development. &#xD;&#xA;&#xD;&#xA;I have read some articles and understand the concept of the gaming loop controlling the application flow. However there seems few articles explaining general concepts for an existing developer. From these I assuming that each on screen item becomes it's own object and handles it's own location, drawing, collision detection etc. (though correct me if I am wrong) &#xD;&#xA;&#xD;&#xA;My question is how to control the list of items on the screen? Are these stored in a simple collection and then removed as they fall out of play and is this collection held by the game engine or individual components? An example would be bullets from a gun?" />
  <row Id="12874" PostHistoryTypeId="1" PostId="6466" RevisionGUID="fb3ff3bc-7c55-4a39-b11f-4e44293b3e9d" CreationDate="2010-12-13T12:50:59.997" UserId="3962" Text="How to control the list of items on the screen?" />
  <row Id="12875" PostHistoryTypeId="3" PostId="6466" RevisionGUID="fb3ff3bc-7c55-4a39-b11f-4e44293b3e9d" CreationDate="2010-12-13T12:50:59.997" UserId="3962" Text="&lt;game-design&gt;&lt;learning&gt;" />
  <row Id="12876" PostHistoryTypeId="2" PostId="6467" RevisionGUID="1d9bde50-fc99-41bb-8f98-4550d3ce4ccc" CreationDate="2010-12-13T13:49:58.077" UserId="751" Text="are there any known libs / frameworks / systems allowing to prototype a game based on a defined &quot;model&quot; of the game mechanics?&#xD;&#xA;&#xD;&#xA;Think all those match 3 games, i'm looking for &quot;something&quot; allowing to try out new rule sets in rapid prototypes where dealing with the grafix/updating the screen based on the state and input/output is only secondary and having something running and interactive is most important to validate an idea...&#xD;&#xA;&#xD;&#xA;Do such tools exist? What would be your take on this when asked to skip as much coding as possible? &#xD;&#xA;&#xD;&#xA;Thanks for all the creative input." />
  <row Id="12877" PostHistoryTypeId="1" PostId="6467" RevisionGUID="1d9bde50-fc99-41bb-8f98-4550d3ce4ccc" CreationDate="2010-12-13T13:49:58.077" UserId="751" Text="&quot;Model Driven&quot; Game Prototyping" />
  <row Id="12878" PostHistoryTypeId="3" PostId="6467" RevisionGUID="1d9bde50-fc99-41bb-8f98-4550d3ce4ccc" CreationDate="2010-12-13T13:49:58.077" UserId="751" Text="&lt;libraries&gt;&lt;framework&gt;&lt;prototyping&gt;" />
  <row Id="12879" PostHistoryTypeId="2" PostId="6468" RevisionGUID="77251150-2b49-4908-aecb-cd4875dd729d" CreationDate="2010-12-13T14:29:58.040" UserId="3974" Text="The problems with an MMO can be broken down into 4 major groups. All of which can be solved. Or at least reduced somewhat. However, you'll have to sacrifice your personal vision of the game to do it, in most cases.&#xD;&#xA;&#xD;&#xA;**Content**&#xD;&#xA;&#xD;&#xA;There are many ways to solve the Content problem. The obvious one is collecting a ton of talented people and paying them to make the content. However, this isn't the only way. It can be done on the cheap/slow through various channels. The most elegant is the user-generated model. Some examples of user-generated content in MMOs are the recent lego universe MMO (however in very limited scope) and, of course, second life.&#xD;&#xA;&#xD;&#xA;But you can take this much further. Kingdom of loathing is a find example of a system that would lend itself well to user-generated content. (they chose not to do that) Enemies consist of a static hand-drawn image, and various stats and attacks that come from a pool of possible attacks. Each of these elements could be user generated. Finding unique ways to get the users to make your weapons, armor, spells, enemies, cities, countryside, attacks, and even quests and NPCs is a perfectly viable way to source your content. You simply need to bear in mind that this content will never be particularly on-point with a story. It will be what the users want it to be.&#xD;&#xA;&#xD;&#xA;For 3D? Look towards games like Spore.&#xD;&#xA;&#xD;&#xA;**Billing**&#xD;&#xA;&#xD;&#xA;Yes, billing can be a terribly expensive proposition. However, there are ways to make this easier. Such as paypal. Yes, you'll be asking your users to all have paypal to play, but it certainly doesn't have to stay as paypal only if the game takes off.&#xD;&#xA;&#xD;&#xA;**Programming**&#xD;&#xA;&#xD;&#xA;The trick with any MMO is to build systems that accept any data. Don't program spells. Program a universal spell system that accepts data from a database or file to create spells. Don't program quests, program the tools you use to make quests.&#xD;&#xA;&#xD;&#xA;Start very simple. Get the core mechanics in place. Consider using an already existing platform. But go about it smartly.&#xD;&#xA;&#xD;&#xA;Maybe open source?&#xD;&#xA;&#xD;&#xA;**Hosting**&#xD;&#xA;&#xD;&#xA;No matter what, this will cost you. But it doesn't have to start costing you right away. If you are willing to languish in obscurity for a few years, you can slowly build a passionate following and use the money you do make to upgrade. Keep the game simple. Don't ask too much from your hardware. And push off as much as you can to the users.&#xD;&#xA;&#xD;&#xA;Pioneer something in bit-torrent and validate through multiple peers responding. You might be able to eliminate the server entirely. Or at least relegate it only doing very important things. However, I don't know of anyone out there doing this." />
  <row Id="12880" PostHistoryTypeId="2" PostId="6469" RevisionGUID="436959c8-b1ba-478a-8226-007f494f33ca" CreationDate="2010-12-13T15:13:05.183" UserId="3659" Text="I've just started working on a 2-d game myself on android. I have a map and some menu/windows on the screen. I draw the map first, and for the menus, I have something like this in the main drawing loop:&#xD;&#xA;&#xD;&#xA;    drawMap(canvas);    &#xD;&#xA;    if(menuActive) drawMenu(canvas);&#xD;&#xA;&#xD;&#xA;The drawMenu will take care of drawing the menu at the correct place. However, to check whether the user clicked on the menu, I have something like this where I read in inputs:&#xD;&#xA;&#xD;&#xA;    if(menuActive) handle_menuAction(event);&#xD;&#xA;&#xD;&#xA;Here I check whether the user clicked the menu location. The handle_menuAction can do something like return true if the user hit the menu, or return false if they didn't. &#xD;&#xA;&#xD;&#xA;If I wanted to turn off the menu, I just set menuActive = false and none of the drawMenu() or handle_menuAction() will be activated and I don't have to worry about it anymore.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;" />
  <row Id="12881" PostHistoryTypeId="2" PostId="6470" RevisionGUID="331df59b-df33-4b53-a07f-62e3c6aa6420" CreationDate="2010-12-13T15:22:02.240" UserId="51" Text="&gt;Are these stored in a simple collection and then removed as they fall out of play and is this collection held by the game engine or individual components?&#xD;&#xA;&#xD;&#xA;There are a lot of ways of handling it, but sure, that's one way.&#xD;&#xA;&#xD;&#xA;What some games do is have a giant list of all Entities in the world (which implies that there's some World class, or equivalent, managing all this stuff), where everything in the game is an Entity.&#xD;&#xA;&#xD;&#xA;Your update loop might look something like this:&#xD;&#xA;&#xD;&#xA;    update all entities&#xD;&#xA;    remove entities that are marked for removal&#xD;&#xA;    draw all entities&#xD;&#xA;&#xD;&#xA;Some other games do sublists for different types of entities.  Like there's a list of projectiles in the world whose loop is treated like the above.  This way you don't necessarily have to have everything in the world have a singular base class." />
  <row Id="12882" PostHistoryTypeId="2" PostId="6471" RevisionGUID="26f1543c-bc28-4175-96db-2126afd49666" CreationDate="2010-12-13T16:49:59.123" UserId="458" Text="This is a very common problem, and there are a few exercises to get around it that I ask of my students. &#xD;&#xA;&#xD;&#xA;Try this thought exercise: take one of your designs that's too big, and ask what you would do if you had to cut 90% of the features.&#xD;&#xA;&#xD;&#xA;Here's another idea: change your design so that the game could be played to completion in 5 to 15 minutes. Can you use clever design to restrict the scope of the game so that the play time is incredibly short -- a competitor of Minesweeper more than Final Fantasy?&#xD;&#xA;&#xD;&#xA;Identify the &quot;core&quot; of the game -- what's the one thing the player does over and over that's fun, that really drives the gameplay (or alternately, the one unique mechanic that makes your game stand out from the genre)? Implement that only, consider everything else as fluff.&#xD;&#xA;&#xD;&#xA;You can approach this two ways, either as a serious attempt to reduce a genre to its essentials, or as a parody of the genre that lampoons the inherent banality of the core mechanics." />
  <row Id="12883" PostHistoryTypeId="5" PostId="6467" RevisionGUID="aaf27e57-2e57-4a04-8ebf-d8ade78fdc7d" CreationDate="2010-12-13T16:50:32.287" UserId="751" Comment="added 265 characters in body" Text="are there any known libs / frameworks / systems allowing to prototype a game based on a defined &quot;model&quot; of the game mechanics?&#xD;&#xA;&#xD;&#xA;Think all those match 3 games, i'm looking for &quot;something&quot; allowing to try out new rule sets in rapid prototypes where dealing with the grafix/updating the screen based on the state and input/output is only secondary and having something running and interactive is most important to validate an idea...&#xD;&#xA;&#xD;&#xA;Do such tools exist? What would be your take on this when asked to skip as much coding as possible? &#xD;&#xA;&#xD;&#xA;To clarify: nope I am NOT looking for any magic. What I am looking for are tools allowing to concentrate more on the &quot;logic&quot; of a game (atleast for simple games ala match 3) and not having to code all the screen/input/ui stuff, thus the &quot;model driven&quot; naming...&#xD;&#xA;&#xD;&#xA;Thanks for all the creative input." />
  <row Id="12884" PostHistoryTypeId="2" PostId="6472" RevisionGUID="53cfa567-250d-489a-90ad-9ce6d01aad2e" CreationDate="2010-12-13T17:33:58.803" UserId="3978" Text="Your window gets rendered using the HW acceleration of the video card to get transparency effects, and bypasses standard Windows GDI stack, which is captured by most streaming utilities.&#xD;&#xA;&#xD;&#xA;Basically, you can&#xD;&#xA;a) hook DirectX's drawing functions and draw your overlay on top of the game (like Fraps does, for displaying FPS counter. AFAIK Steam overlay works the same way), though it can cause problems with anti-cheating tools&#xD;&#xA;&#xD;&#xA;or b) advice your users to use streaming apps that CAN capture layered windows (as there are a number of screenshot tools that can, I assume there are streaming apps, too, though i havent used them personally)&#xD;&#xA;&#xD;&#xA;or c) make important parts of your application square and not transparent.&#xD;&#xA;&#xD;&#xA;or d) contact Blizzard to see if they have SDK for interacting with the game (Little chance, but you could probably at least get some advices)" />
  <row Id="12885" PostHistoryTypeId="2" PostId="6473" RevisionGUID="3c30ee3f-2a4f-41df-af72-0cdd65549b0b" CreationDate="2010-12-13T17:39:05.247" UserId="3978" Text="1. Lua interpreter is unmanaged, AFAIK, so you can't get it to work on Xbox with XNA&#xD;&#xA;&#xD;&#xA;2. You can use **Javascript** interpreter called Jint which does not rely on DLR and **works on Xbox** ( http://jint.codeplex.com/ )" />
  <row Id="12886" PostHistoryTypeId="2" PostId="6474" RevisionGUID="b23ed05a-c169-45da-baf3-30121c0bcfaa" CreationDate="2010-12-13T17:43:12.560" UserId="3830" Text="Short answer is, I don't think that kind of thing exists.&#xD;&#xA;&#xD;&#xA;Long answer is, you're on the right track thinking in terms of abstracting out the game rules from the game display.  For some ideas, you should even be able to create a text based game, where instead of doing fancy graphics renders, the game simply uses text to describe what is going on.  That kind of approach lets you concentrate on the game rules.  Once you like the game rules, you can decide what to do about the display." />
  <row Id="12888" PostHistoryTypeId="6" PostId="6466" RevisionGUID="ca7de7dc-4418-4500-9a92-aefe626e746d" CreationDate="2010-12-13T18:33:08.633" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="12889" PostHistoryTypeId="2" PostId="6476" RevisionGUID="7e6be82a-df4a-412b-ba76-1590f4e71226" CreationDate="2010-12-13T18:36:50.377" UserId="1156" Text="I was having issues with this same thing, one good source to look at is the [Octane 2D/3D Engine.][1] I like the way it solves this exact problem; simply.&#xD;&#xA;&#xD;&#xA;There are many ways to do it, but the general rule of thumb (for most things actually) is keep it as simple as you need it. You may need to up-grade it later, probably not.&#xD;&#xA;&#xD;&#xA;A simple deque or list of entities is going to be the easiest. Then you simply need to iterate the list each game loop, updating all the entities (unless some ISDEAD flag has been set on them).&#xD;&#xA;&#xD;&#xA;And your 'on screen item' is best described as a game object or game entity. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/octane-engine/" />
  <row Id="12890" PostHistoryTypeId="6" PostId="4459" RevisionGUID="e0071c00-0957-4572-8983-71bef2122725" CreationDate="2010-12-13T18:45:26.543" UserId="1156" Comment="edited tags" Text="&lt;framework&gt;&lt;python&gt;&lt;language-choice&gt;&lt;pygame&gt;" />
  <row Id="12891" PostHistoryTypeId="5" PostId="6450" RevisionGUID="c7c92077-28b0-4ca3-8ac5-d1014a94a7ae" CreationDate="2010-12-13T18:59:56.610" UserId="3830" Comment="ARG one more edit to fix javascript click handler coordinates  - tested in Firefox, Chrome and Safari but  NOT IN IE" Text="*Edit:  Fixed error in javascript that caused error on firefox *&#xD;&#xA;&#xD;&#xA;*Edit:   just added ability to scale hexes to the PHP source code.  Tiny 1/2 sized ones or 2x jumbo, it's all up to you :)*&#xD;&#xA;&#xD;&#xA;I wasn't quite sure how to put this all into writing, but found it was easier to just write the code for a full live example.  The page (link and source below) dynamically generates a hexmap with PHP and uses Javascript to handle map clicks.  Clicking on a hex highlights the hex.&#xD;&#xA;&#xD;&#xA;The map is randomly generated, but you should be able to use your own code instead to populate the map.  It is represented by a simple 2d array, with each array element holding the type of terrain present in that hex.&#xD;&#xA;&#xD;&#xA;[Click me to try the Hex Map Example][1]&#xD;&#xA;&#xD;&#xA;To use, click on any hex to highlight it. &#xD;&#xA;&#xD;&#xA;Right now it's generating a 10x10 map, but you can change the map size in the PHP to be any size you want.  I'm also using a set of tiles from the game Wesnoth for the example.  They are 72x72 pixels in height, but the source also lets you set the size of your hex tiles.&#xD;&#xA;&#xD;&#xA;The hexes are represented by PNG images with &quot;outside the hex&quot; areas set as transparent.  To position each hex, I am using CSS to set each tile's absolute position, calculated by the hex grid coordinate.  The map is enclosed in a single DIV, which should make it easier for you to modify the example.&#xD;&#xA;&#xD;&#xA;Here is the full page code.  You can also download the [demo source][2] (including all hex images).&#xD;&#xA;&#xD;&#xA;    &lt;?php&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    // :: HEX.PHP&#xD;&#xA;    // ::&#xD;&#xA;    // :: Author:  &#xD;&#xA;    // ::    Tim Holt, tim.m.holt@gmail.com&#xD;&#xA;    // :: Description:  &#xD;&#xA;    // ::    Generates a random hex map from a set of terrain types, then&#xD;&#xA;    // ::    outputs HTML to display the map.  Also outputs Javascript&#xD;&#xA;    // ::    to handle mouse clicks on the map.  When a mouse click is&#xD;&#xA;    // ::    detected, the hex cell clicked is determined, and then the&#xD;&#xA;    // ::    cell is highlighted.&#xD;&#xA;    // :: Usage Restrictions:  &#xD;&#xA;    // ::    Available for any use.&#xD;&#xA;    // :: Notes:&#xD;&#xA;    // ::    Some content (where noted) copied and/or derived from other &#xD;&#xA;    // ::    sources.&#xD;&#xA;    // ::    Images used in this example are from the game Wesnoth.&#xD;&#xA;    // ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&#xD;&#xA;    &#xD;&#xA;    // --- Turn up error reporting in PHP&#xD;&#xA;    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);&#xD;&#xA;    &#xD;&#xA;    // --- Define some constants&#xD;&#xA;    $MAP_WIDTH = 10;&#xD;&#xA;    $MAP_HEIGHT = 10;&#xD;&#xA;    $HEX_HEIGHT = 72;&#xD;&#xA;    &#xD;&#xA;    // --- Use this to scale the hexes smaller or larger than the actual graphics&#xD;&#xA;    $HEX_SCALED_HEIGHT = $HEX_HEIGHT * 1.0;&#xD;&#xA;    $HEX_SIDE = $HEX_SCALED_HEIGHT / 2;&#xD;&#xA;    ?&gt;&#xD;&#xA;    &lt;html&gt;&#xD;&#xA;        &lt;head&gt;&#xD;&#xA;            &lt;title&gt;Hex Map Demo&lt;/title&gt;&#xD;&#xA;            &lt;!-- Stylesheet to define map boundary area and hex style --&gt;&#xD;&#xA;            &lt;style type=&quot;text/css&quot;&gt;&#xD;&#xA;            body {&#xD;&#xA;                /* &#xD;&#xA;                margin: 0;&#xD;&#xA;                padding: 0;&#xD;&#xA;                */&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hexmap {&#xD;&#xA;                width: &lt;?php echo $MAP_WIDTH * $HEX_SIDE * 1.5 + $HEX_SIDE/2; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $MAP_HEIGHT * $HEX_SCALED_HEIGHT + $HEX_SIDE; ?&gt;px;&#xD;&#xA;                position: relative;&#xD;&#xA;                background: #000;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex-key-element {&#xD;&#xA;                width: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                height: &lt;?php echo $HEX_HEIGHT * 1.5; ?&gt;px;&#xD;&#xA;                border: 1px solid #fff;&#xD;&#xA;                float: left;&#xD;&#xA;                text-align: center;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            .hex {&#xD;&#xA;                position: absolute;&#xD;&#xA;                width: &lt;?php echo $HEX_SCALED_HEIGHT ?&gt;;&#xD;&#xA;                height: &lt;?php echo $HEX_SCALED_HEIGHT ?&gt;;&#xD;&#xA;            }&#xD;&#xA;            &lt;/style&gt;&#xD;&#xA;        &lt;/head&gt;&#xD;&#xA;        &lt;body&gt;&#xD;&#xA;        &lt;script&gt;&#xD;&#xA;    &#xD;&#xA;    function handle_map_click(event) {&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- This function gets a mouse click on the map, converts the click to&#xD;&#xA;        // --- hex map coordinates, then moves the highlight image to be over the&#xD;&#xA;        // --- clicked on hex.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Determine coordinate of map div as we want the click coordinate as&#xD;&#xA;        // --- we want the mouse click relative to this div.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Code based on http://www.quirksmode.org/js/events_properties.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;    	var posx = 0;&#xD;&#xA;    	var posy = 0;&#xD;&#xA;    	if (event.pageX || event.pageY) {&#xD;&#xA;    		posx = event.pageX;&#xD;&#xA;    		posy = event.pageY;&#xD;&#xA;    	} else if (event.clientX || e.clientY) {&#xD;&#xA;    		posx = event.clientX + document.body.scrollLeft&#xD;&#xA;    			+ document.documentElement.scrollLeft;&#xD;&#xA;    		posy = event.clientY + document.body.scrollTop&#xD;&#xA;    			+ document.documentElement.scrollTop;&#xD;&#xA;    	}&#xD;&#xA;    	// --- Apply offset for the map div&#xD;&#xA;        var map = document.getElementById('hexmap');&#xD;&#xA;    	posx = posx - map.offsetLeft;&#xD;&#xA;    	posy = posy - map.offsetTop;&#xD;&#xA;    	//console.log (&quot;posx = &quot; + posx + &quot;, posy = &quot; + posy);&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Convert mouse click to hex grid coordinate&#xD;&#xA;        // --- Code is from http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var hex_height = &lt;?php echo $HEX_SCALED_HEIGHT; ?&gt;;&#xD;&#xA;        x = (posx - (hex_height/2)) / (hex_height * 0.75);&#xD;&#xA;        y = (posy - (hex_height/2)) / hex_height;&#xD;&#xA;        z = -0.5 * x - y;&#xD;&#xA;        y = -0.5 * x + y;&#xD;&#xA;    &#xD;&#xA;        ix = Math.floor(x+0.5);&#xD;&#xA;        iy = Math.floor(y+0.5);&#xD;&#xA;        iz = Math.floor(z+0.5);&#xD;&#xA;        s = ix + iy + iz;&#xD;&#xA;        if (s) {&#xD;&#xA;            abs_dx = Math.abs(ix-x);&#xD;&#xA;            abs_dy = Math.abs(iy-y);&#xD;&#xA;            abs_dz = Math.abs(iz-z);&#xD;&#xA;            if (abs_dx &gt;= abs_dy &amp;&amp; abs_dx &gt;= abs_dz) {&#xD;&#xA;                ix -= s;&#xD;&#xA;            } else if (abs_dy &gt;= abs_dx &amp;&amp; abs_dy &gt;= abs_dz) {&#xD;&#xA;                iy -= s;&#xD;&#xA;            } else {&#xD;&#xA;                iz -= s;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- map_x and map_y are the map coordinates of the click&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        map_x = ix;&#xD;&#xA;        map_y = (iy - iz + (1 - ix %2 ) ) / 2 - 0.5;&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Calculate coordinates of this hex.  We will use this&#xD;&#xA;        // --- to place the highlight image.&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        tx = map_x * &lt;?php echo $HEX_SIDE ?&gt; * 1.5;&#xD;&#xA;        ty = map_y * &lt;?php echo $HEX_SCALED_HEIGHT ?&gt; + (map_x % 2) * (&lt;?php echo $HEX_SCALED_HEIGHT ?&gt; / 2);&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Get the highlight image by ID&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        var highlight = document.getElementById('highlight');&#xD;&#xA;    &#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        // --- Set position to be over the clicked on hex&#xD;&#xA;        // ----------------------------------------------------------------------&#xD;&#xA;        highlight.style.left = tx + 'px';&#xD;&#xA;        highlight.style.top = ty + 'px';&#xD;&#xA;    }&#xD;&#xA;    &lt;/script&gt;&#xD;&#xA;    &lt;?php&#xD;&#xA;    &#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;    // --- This is a list of possible terrain types and the&#xD;&#xA;    // --- image to use to render the hex.&#xD;&#xA;    // ----------------------------------------------------------------------&#xD;&#xA;        $terrain_images = array(&quot;grass&quot;    =&gt; &quot;grass-r1.png&quot;,&#xD;&#xA;                                &quot;dirt&quot;     =&gt; &quot;dirt.png&quot;,&#xD;&#xA;                                &quot;water&quot;    =&gt; &quot;coast.png&quot;,&#xD;&#xA;                                &quot;path&quot;     =&gt; &quot;stone-path.png&quot;,&#xD;&#xA;                                &quot;swamp&quot;    =&gt; &quot;water-tile.png&quot;,&#xD;&#xA;                                &quot;desert&quot;   =&gt; &quot;desert.png&quot;,&#xD;&#xA;                                &quot;oasis&quot;    =&gt; &quot;desert-oasis-tile.png&quot;,&#xD;&#xA;                                &quot;forest&quot;   =&gt; &quot;forested-mixed-summer-hills-tile.png&quot;,&#xD;&#xA;                                &quot;hills&quot;    =&gt; &quot;hills-variation3.png&quot;,&#xD;&#xA;                                &quot;mountain&quot; =&gt; &quot;mountain-tile.png&quot;);&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function generate_map_data() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Fill the $map array with values identifying the terrain&#xD;&#xA;            // --- type in each hex.  This example simply randomizes the&#xD;&#xA;            // --- contents of each hex.  Your code could actually load the&#xD;&#xA;            // --- values from a file or from a database.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Randomly choose a terrain type from the terrain&#xD;&#xA;                    // --- images array and assign to this coordinate.&#xD;&#xA;                    $map[$x][$y] = array_rand($terrain_images);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // ==================================================================&#xD;&#xA;    &#xD;&#xA;        function render_map_to_html() {&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- This function renders the map to HTML.  It uses the $map&#xD;&#xA;            // --- array to determine what is in each hex, and the &#xD;&#xA;            // --- $terrain_images array to determine what type of image to&#xD;&#xA;            // --- draw in each cell.&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            global $MAP_WIDTH, $MAP_HEIGHT;&#xD;&#xA;            global $HEX_HEIGHT, $HEX_SCALED_HEIGHT, $HEX_SIDE;&#xD;&#xA;            global $map, $terrain_images;&#xD;&#xA;    &#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            // --- Draw each hex in the map&#xD;&#xA;            // -------------------------------------------------------------&#xD;&#xA;            for ($x=0; $x&lt;$MAP_WIDTH; $x++) {&#xD;&#xA;                for ($y=0; $y&lt;$MAP_HEIGHT; $y++) {&#xD;&#xA;                    // --- Terrain type in this hex&#xD;&#xA;                    $terrain = $map[$x][$y];&#xD;&#xA;    &#xD;&#xA;                    // --- Image to draw&#xD;&#xA;                    $img = $terrain_images[$terrain];&#xD;&#xA;    &#xD;&#xA;                    // --- Coordinates to place hex on the screen&#xD;&#xA;                    $tx = $x * $HEX_SIDE * 1.5;&#xD;&#xA;                    $ty = $y * $HEX_SCALED_HEIGHT + ($x % 2) * $HEX_SCALED_HEIGHT / 2;&#xD;&#xA;    &#xD;&#xA;                    // --- Style values to position hex image in the right location&#xD;&#xA;                    $style = sprintf(&quot;left:%dpx;top:%dpx&quot;, $tx, $ty);&#xD;&#xA;    &#xD;&#xA;                    // --- Output the image tag for this hex&#xD;&#xA;                    print &quot;&lt;img src='$img' alt='$terrain' class='hex' style='zindex:99;$style'&gt;\n&quot;;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        // --- Generate the map data&#xD;&#xA;        // -----------------------------------------------------------------&#xD;&#xA;        generate_map_data();&#xD;&#xA;        ?&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;h1&gt;Hex Map Example&lt;/h1&gt;&#xD;&#xA;        &lt;a href='index.phps'&gt;View page source&lt;/a&gt;&lt;br/&gt;&#xD;&#xA;        &lt;a href='hexmap.zip'&gt;Download source and all images&lt;/a&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!-- Render the hex map inside of a div block --&gt;&#xD;&#xA;        &lt;div id='hexmap' class='hexmap' onclick='handle_map_click(event);'&gt;&#xD;&#xA;            &lt;?php render_map_to_html(); ?&gt;&#xD;&#xA;            &lt;img id='highlight' class='hex' src='hex-highlight.png' style='zindex:100;'&gt;&#xD;&#xA;        &lt;/div&gt;&#xD;&#xA;    &#xD;&#xA;        &lt;!--- output a list of all terrain types --&gt;&#xD;&#xA;        &lt;br/&gt;&#xD;&#xA;        &lt;?php &#xD;&#xA;            reset ($terrain_images);&#xD;&#xA;            while (list($type, $img) = each($terrain_images)) {&#xD;&#xA;                print &quot;&lt;div class='hex-key-element'&gt;&lt;img src='$img' alt='$type'&gt;&lt;br/&gt;$type&lt;/div&gt;&quot;;&#xD;&#xA;            }&#xD;&#xA;        ?&gt;&#xD;&#xA;        &lt;/body&gt;&#xD;&#xA;    &lt;/html&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a screenshot of the example...&#xD;&#xA;&#xD;&#xA;![Hex Map Example Screenshot][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Definitely could use some improvements.  I noticed in a previous comment you said you were familiar with jQuery, which is good.  I didn't use it here to keep things simple, but it would be pretty useful to use.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://perludus.com/examples/hexmap/&#xD;&#xA;  [2]: http://perludus.com/examples/hexmap/hexmap.zip&#xD;&#xA;  [3]: http://i.stack.imgur.com/GygK7.png&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12892" PostHistoryTypeId="2" PostId="6477" RevisionGUID="659d16cd-9814-40fd-add7-4a53d08a7d19" CreationDate="2010-12-13T19:10:36.380" UserId="539" Text="This is probably not the answer you're looking for, but I would recommend trying something like Paper Prototyping to test out these types of rules. For a match-3 it shouldn't be too difficult to craft the different game elements from paper and play things out by hand." />
  <row Id="12893" PostHistoryTypeId="2" PostId="6478" RevisionGUID="13e8a2e0-209a-4e28-968d-63ffacebab8e" CreationDate="2010-12-13T19:12:29.590" UserId="539" Text="Curious if any of you have gone through the process? How did you kick it off? Is there anything in particular that we should be aware of when trying to make a Live game?" />
  <row Id="12894" PostHistoryTypeId="1" PostId="6478" RevisionGUID="13e8a2e0-209a-4e28-968d-63ffacebab8e" CreationDate="2010-12-13T19:12:29.590" UserId="539" Text="How do you become a Xbox Live game on Windows Phone?" />
  <row Id="12895" PostHistoryTypeId="3" PostId="6478" RevisionGUID="13e8a2e0-209a-4e28-968d-63ffacebab8e" CreationDate="2010-12-13T19:12:29.590" UserId="539" Text="&lt;windows&gt;&lt;xbox&gt;&lt;live&gt;&lt;phone&gt;" />
  <row Id="12896" PostHistoryTypeId="4" PostId="6478" RevisionGUID="233cd763-a657-4b8e-aeef-642df03c4325" CreationDate="2010-12-13T19:30:29.887" UserId="539" Comment="edited title" Text="How do you publish a Xbox Live game on Windows Phone?" />
  <row Id="12897" PostHistoryTypeId="6" PostId="6466" RevisionGUID="b786e06d-c711-4a9c-823c-bf619aaedd26" CreationDate="2010-12-13T19:48:10.257" UserId="3962" Comment="edited tags" Text="&lt;game-design&gt;&lt;2d&gt;&lt;architecture&gt;&lt;best-practices&gt;" />
  <row Id="12898" PostHistoryTypeId="6" PostId="6478" RevisionGUID="9b9dbe71-fc58-4700-879a-f89251d30385" CreationDate="2010-12-13T21:24:26.607" UserId="539" Comment="edited tags" Text="&lt;untagged&gt;" />
  <row Id="12899" PostHistoryTypeId="2" PostId="6479" RevisionGUID="99cb43f8-a03a-4b90-8d02-109a47ee4cf3" CreationDate="2010-12-13T22:27:01.437" UserId="3982" Text="Whenever I try and run a game made in XNA 4.0 on a machine other than one used for development, it just won't run. I've followed the instructions [here](http://forums.create.msdn.com/forums/t/1988.aspx) to ensure that all the dependencies are present.&#xD;&#xA;&#xD;&#xA;To be clear I've done the following:&#xD;&#xA;&#xD;&#xA; 1. Downloaded and installed the [Microsoft .NET Framework 4 Client Profile](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=E5AD0459-CBCC-4B4F-97B6-FB17111CF544&amp;displaylang=en).&#xD;&#xA; &#xD;&#xA; 2. Downloaded and installed the [Microsoft XNA Framework Redistributable 4.0](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a88c6dec-aeae-42cd-a108-d35c013c3b97&amp;displaylang=en).&#xD;&#xA; 3. Made sure I am not using anything contained within `GamerServices` and `XNA.Net.*`, my references are as follows:&#xD;&#xA;&#xD;&#xA;&gt; Microsoft.Xna.Framework  &#xD;&#xA;&gt; Microsoft.Xna.Framework.Avatar  &#xD;&#xA;&gt; Microsoft.Xna.Framework.Game  &#xD;&#xA;&gt; Microsoft.Xna.Framework.Graphics  &#xD;&#xA;&gt; Microsoft.Xna.Framework.Storage  &#xD;&#xA;&gt; Microsoft.Xna.Framework.Video  &#xD;&#xA;&gt; Microsoft.Xna.Framework.Xact   &#xD;&#xA;&gt; mscorlib  &#xD;&#xA;&gt; System System.Core  &#xD;&#xA;&gt; System.Windows.Forms   &#xD;&#xA;&gt; System.Xml  &#xD;&#xA;&gt; System.Xml.Linq&#xD;&#xA;&#xD;&#xA;I also followed the advice [here](http://forums.create.msdn.com/forums/t/10676.aspx) to ensure the problem was not within the code itself.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I've tried the follow methods to get it to run (on both Vista and 7):&#xD;&#xA;&#xD;&#xA; - Use the built in publishing functionality. This results in an error saying that `Microsoft.Xna.Input.Touch` needs to be present in the GAC. I've tried adding `Microsoft.Xna.Input.Touch` to the references, and this does not fix the issue.&#xD;&#xA; - Copy the XNA dll files locally. This results in an error message stating that `Microsoft.Xna.Game.dll or one of its dependencies could not be located`.&#xD;&#xA; - Copy over everything contained in `Release`. This results in an `Application X stopped working...` or `APPCRASH` error message the second it starts. My code is never reached.&#xD;&#xA;&#xD;&#xA;Is there any way to get this to work? I've been trying to get this to work with the deadline looming, and it's been a source of unneeded stress." />
  <row Id="12900" PostHistoryTypeId="1" PostId="6479" RevisionGUID="99cb43f8-a03a-4b90-8d02-109a47ee4cf3" CreationDate="2010-12-13T22:27:01.437" UserId="3982" Text="How do I get an XNA 4.0 game to run on other machines?" />
  <row Id="12901" PostHistoryTypeId="3" PostId="6479" RevisionGUID="99cb43f8-a03a-4b90-8d02-109a47ee4cf3" CreationDate="2010-12-13T22:27:01.437" UserId="3982" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="12902" PostHistoryTypeId="2" PostId="6480" RevisionGUID="210892e5-1d16-440c-8031-ac02ca2fad69" CreationDate="2010-12-13T23:19:59.327" UserId="3547" Text="The best solution I could give you is to just script in C#. You can compile them at runtime when you target windows and compile them before hand for the xbox. (as a dll)&#xD;&#xA;&#xD;&#xA;That would be the easiest solution. You could also do it in VB.NET or any .NET language. (not sure about the scripting ones though) Basically, I'm saying to have your scripts in their own dll. You can have them compile at runtime on Windows. (do you really want them to do this on the xbox 360?, you can't update your games on there, at least I don't think so)&#xD;&#xA;&#xD;&#xA;I can understand your frustration, I wanted to use Lua as well. &#xD;&#xA;&#xD;&#xA;To sum it up:&#xD;&#xA;1) Have it built at runtime on Windows&#xD;&#xA;2) Build it before hand for the Xbox 360&#xD;&#xA;&#xD;&#xA;That's what I recommend." />
  <row Id="12903" PostHistoryTypeId="5" PostId="4219" RevisionGUID="75772e27-a57c-4b67-8481-423b1c208ec8" CreationDate="2010-12-14T00:29:57.000" UserId="1217" Comment="added 141 characters in body" Text="As the title suggests I'm developing a top down space game. &#xD;&#xA;&#xD;&#xA;I'm not looking to use newtonian physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that of FlatSpace 2 (awesome game). I can't figure out how to achieve this feeling with keyboard controls as opposed to mouse controls though. Any suggestions? &#xD;&#xA;&#xD;&#xA;I'm using Unity3d and C# or javaScript (unityScript or whatever is the correct term) works fine if you want to drop some code examples. &#xD;&#xA;&#xD;&#xA;Edit: Of course I should describe FlatSpace 2's control scheme, sorry. You hold the mouse button down and move the mouse in the direction you want the ship to move in. But it's not the controls I don't know how to do but rather the feeling of a mix of driving a car and flying an aircraft. It's really well made. Youtube link: [FlatSpace2 on iPhone][1] &#xD;&#xA;&#xD;&#xA;I'm not developing an iPhone game but the video shows the principle of the movement style.    &#xD;&#xA;[1]: http://www.youtube.com/watch?v=3dmSk-2sCpo&amp;feature=related&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;  &#xD;&#xA;**Edit 2**&#xD;&#xA;As there seems to be a slight interest, I'll post the version of the code I've used to continue. It works good enough. Sometimes good enough is sufficient!&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;using UnityEngine;&#xD;&#xA;using System.Collections;&#xD;&#xA;&#xD;&#xA;public class ShipMovement : MonoBehaviour &#xD;&#xA;{&#xD;&#xA;    public float directionModifier;&#xD;&#xA;    float shipRotationAngle;&#xD;&#xA;    public float shipRotationSpeed = 0;&#xD;&#xA;    public double thrustModifier;&#xD;&#xA;    public double accelerationModifier;&#xD;&#xA;    public double shipBaseAcceleration = 0;&#xD;&#xA;    public Vector2 directionVector;&#xD;&#xA;    public Vector2 accelerationVector = new Vector2(0,0);&#xD;&#xA;    public Vector2 frictionVector = new Vector2(0,0);&#xD;&#xA;    public int shipFriction = 0;&#xD;&#xA;    public Vector2 shipSpeedVector;&#xD;&#xA;    public Vector2 shipPositionVector;&#xD;&#xA;    public Vector2 speedCap = new Vector2(0,0);&#xD;&#xA;	&#xD;&#xA;void Update() &#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;   directionModifier = -Input.GetAxis(&quot;Horizontal&quot;);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   shipRotationAngle += ( shipRotationSpeed * directionModifier ) * Time.deltaTime;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   thrustModifier = Input.GetAxis(&quot;Vertical&quot;);&#xD;&#xA;&#xD;&#xA;   accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) ) * Time.deltaTime;&#xD;&#xA;&#xD;&#xA;   directionVector = new Vector2( Mathf.Cos(shipRotationAngle ), Mathf.Sin(shipRotationAngle) );&#xD;&#xA;   //accelerationVector = Vector2(directionVector.x * System.Convert.ToDouble(accelerationModifier), directionVector.y * System.Convert.ToDouble(accelerationModifier));&#xD;&#xA;   accelerationVector.x = directionVector.x * (float)accelerationModifier;&#xD;&#xA;	accelerationVector.y = directionVector.y * (float)accelerationModifier;&#xD;&#xA;   // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;&#xD;&#xA;	shipSpeedVector.x *= 0.9f; //Use a variable here&#xD;&#xA;	shipSpeedVector.y *= 0.9f; //&lt;-- as well&#xD;&#xA;   shipSpeedVector += accelerationVector;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;   shipPositionVector += shipSpeedVector;&#xD;&#xA;   &#xD;&#xA;   gameObject.transform.position = new Vector3(shipPositionVector.x, 0, shipPositionVector.y);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;" />
  <row Id="12904" PostHistoryTypeId="2" PostId="6481" RevisionGUID="5b49c438-f6e9-46ec-b529-160f06a4d445" CreationDate="2010-12-14T00:38:57.423" UserId="2289" Text="I've started some experimentation in Java and LWJGL (via Slick), and it seems very solid. However, I have some legacy code that requires a HWND integer as a parameter. I'm not sure how I'd be able to get this, or if LWJGL would be able to report this for me. Any help?" />
  <row Id="12905" PostHistoryTypeId="1" PostId="6481" RevisionGUID="5b49c438-f6e9-46ec-b529-160f06a4d445" CreationDate="2010-12-14T00:38:57.423" UserId="2289" Text="Is there any way to get the HWND from a window in LWJGL?" />
  <row Id="12906" PostHistoryTypeId="3" PostId="6481" RevisionGUID="5b49c438-f6e9-46ec-b529-160f06a4d445" CreationDate="2010-12-14T00:38:57.423" UserId="2289" Text="&lt;java&gt;&lt;lwjgl&gt;&lt;slick&gt;" />
  <row Id="12907" PostHistoryTypeId="2" PostId="6482" RevisionGUID="a71704b3-e19e-4acc-8a56-985f1942bdae" CreationDate="2010-12-14T00:41:50.477" UserId="178" Text="SDL is made with c and is perhaps the most popular game programming library. Also I think I did read somewhere that pyGame is based on it.&#xD;&#xA;&#xD;&#xA;[http://www.libsdl.org/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/" />
  <row Id="12908" PostHistoryTypeId="2" PostId="6483" RevisionGUID="9057fd88-bef4-46e8-82f2-e5019cb58773" CreationDate="2010-12-14T00:57:23.460" UserId="154" Text="**Why playing is important...**&#xD;&#xA;If you were designing the interior seating and controls of a car would you start by never sitting in one or driving? You might be able to eventually design that interior, but you would been reinventing wheels all over the place and you would likely build an interface that would alienate users who were used to the steering wheel + 2 or 3 pedal conventions.&#xD;&#xA;&#xD;&#xA;**Understanding genre conventions**:&#xD;&#xA;You should always take a look at the top games in whatever genre you plan on making. Your players are going to attempt to interact with your game based on expectations of having played those other titles. That doesn't mean that you can't deviate from the established conventions of a genre, but when you do deviate it should only be for something your title is focusing on. &#xD;&#xA;&#xD;&#xA;**See how things go wrong:**&#xD;&#xA;I would also suggest playing a few of the lowest rated games in your target genre. Learning from good games is often hard as it can be difficult to nail down precisely what makes a system work since it can be effected by multiple elements. On the other hand with bad games, it is often incredibly easy to get a feel for what doesn't work. This lets you avoid making those same mistakes in your game.&#xD;&#xA;&#xD;&#xA;**Do designers play?** Yes, all the time, and not just video games. Boardgames, card games, miniature games, physical sports. Playing a wider variety of titles is a great way to pick up on little mechanics or rule combinations that you can add to your toolbox for future titles. However, there is a big difference between playing a massive number of games, and playing a massive amount of one game. Spending massive numbers of hours in WoW or Call of Duty or whatever your interest might be is fun, but not directly helpful to designing. You only need to spend enough time with a game to see it's range of content and then move on. By all means keep playing for enjoyment, but at that point it's no longer research.&#xD;&#xA;" />
  <row Id="12909" PostHistoryTypeId="2" PostId="6484" RevisionGUID="c86a956f-ae95-48f8-917e-bb35ac73d598" CreationDate="2010-12-14T01:04:11.977" UserId="3325" Text="An hWnd is a Windows API window handle.  Here's an example that shows how to get it for an AWT component and does some other stuff (from [here][1]):&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    JNIEXPORT jlong JNICALL Java_test_Transparency_getWindowHandle&#xD;&#xA;      (JNIEnv * env, jclass cls, jobject component)&#xD;&#xA;    {&#xD;&#xA;       JAWT awt;&#xD;&#xA;       JAWT_DrawingSurface* ds;&#xD;&#xA;       JAWT_DrawingSurfaceInfo* dsi;&#xD;&#xA;       JAWT_Win32DrawingSurfaceInfo* dsi_win;&#xD;&#xA;       jint dsLock;&#xD;&#xA;       jboolean result = JNI_FALSE;&#xD;&#xA;&#xD;&#xA;       // Get the AWT&#xD;&#xA;       awt.version = JAWT_VERSION_1_4;&#xD;&#xA;       result = JAWT_GetAWT(env, &amp;awt);&#xD;&#xA;&#xD;&#xA;       if ( result == JNI_FALSE )&#xD;&#xA;       {&#xD;&#xA;          printf( &quot;%s:%i -  JAWT_GetAWT() failed.\n&quot;, __FILE__, __LINE__ );&#xD;&#xA;          return 0;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       // Get the drawing surface&#xD;&#xA;       ds = awt.GetDrawingSurface(env, component);&#xD;&#xA;&#xD;&#xA;       if ( ds == NULL )&#xD;&#xA;       {&#xD;&#xA;          printf( &quot;%s:%i -  GetDrawingSurface() failed.\n&quot;, __FILE__, __LINE__ );&#xD;&#xA;          return 0;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       dsLock = ds-&gt;Lock(ds);&#xD;&#xA;&#xD;&#xA;       // Get the drawing surface info&#xD;&#xA;       dsi = ds-&gt;GetDrawingSurfaceInfo(ds);&#xD;&#xA;&#xD;&#xA;       // Get the platform-specific drawing info&#xD;&#xA;       dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi-&gt;platformInfo;&#xD;&#xA;&#xD;&#xA;       HWND handle = dsi_win-&gt;hwnd;&#xD;&#xA;&#xD;&#xA;       ds-&gt;FreeDrawingSurfaceInfo(dsi);&#xD;&#xA;       ds-&gt;Unlock(ds);&#xD;&#xA;       awt.FreeDrawingSurface(ds);&#xD;&#xA;&#xD;&#xA;       return (jlong)handle;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/265602/swing-transparency-using-jni" />
  <row Id="12910" PostHistoryTypeId="2" PostId="6485" RevisionGUID="329eca26-f0dd-44f7-8096-3364a65061bc" CreationDate="2010-12-14T01:36:52.257" UserId="154" Text="If you swap tiles for cards the description of the game sounds incredibly similar to the card game Gin Rummy. You may be able to find some direct AI resources by searching against that.&#xD;&#xA;&#xD;&#xA;One option for AI that is agnostic to the number of players and can be used to create different AI personalities:&#xD;&#xA;&#xD;&#xA;1. Play the board game, ideally with some friends, although you can play all the hands yourself, but with a computer handy and Excel open.&#xD;&#xA;2. Talk out load what your thought process is. There will be a number of discrete points that you consider when making a decision. Things like &quot;does the unwanted tile give me a playable set&quot;, or &quot;get me a step close to a set&quot;, or &quot;add to an existing playable set&quot;.&#xD;&#xA;3. Then once you have the list of all the items you consider when making a decision of what tile to pick up and what tile to discard start to create number weights for them based on what is most important to you.&#xD;&#xA; 1. Example: It might be three times as important for you to get the 3rd tile in a sequence as it is to get the 4th tile in an existing sequence.&#xD;&#xA;4. Once you have all these weights for all the things you look at when making a decision you can use Excel to calculate a score for each action. So you have a worksheet where each row represents an action choice and each column represents a deciding factor. If that factor is true for that action you multiply it times the weight, if that factor is false you score it zero. Then you add up all the scores and the one with the highest value is what the AI will choose to do.&#xD;&#xA;5. Play the game with Excel open. Each turn see if the score outcome matches the outcome you would choose. If it doesn't adjust the weights based on your thinking until it does. After several games the AI should play the game the same way you do. If you've been playing consistently with a group of friends who all have different weights then you'll have AI's with various personalities.&#xD;&#xA;&#xD;&#xA;You can then control difficulty by not always selecting the highest rated option. Since the lower the score the worse the decision.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12911" PostHistoryTypeId="5" PostId="6438" RevisionGUID="01f2918a-5bd5-43db-9414-70e73781f367" CreationDate="2010-12-14T01:44:43.077" UserId="154" Comment="deleted 1 characters in body" Text="Even the biggest games are made up of a series of smaller systems.  &#xD;&#xA;&#xD;&#xA;If you are really excited about a big concept, split your big game idea up into all its different component system. If you can't finish a system in a week, split it further. Then make small prototype games of each one of these components. &#xD;&#xA;&#xD;&#xA;Don't worry about hooking them in together, just build each one as quickly as possible to see if the idea is viable. " />
  <row Id="12912" PostHistoryTypeId="5" PostId="4219" RevisionGUID="b5f58e3c-4fe9-48d3-9526-76619612291a" CreationDate="2010-12-14T02:20:48.537" UserId="51" Comment="added 197 characters in body" Text="As the title suggests I'm developing a top down space game. &#xD;&#xA;&#xD;&#xA;I'm not looking to use newtonian physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that of FlatSpace 2 (awesome game). I can't figure out how to achieve this feeling with keyboard controls as opposed to mouse controls though. Any suggestions? &#xD;&#xA;&#xD;&#xA;I'm using Unity3d and C# or javaScript (unityScript or whatever is the correct term) works fine if you want to drop some code examples. &#xD;&#xA;&#xD;&#xA;Edit: Of course I should describe FlatSpace 2's control scheme, sorry. You hold the mouse button down and move the mouse in the direction you want the ship to move in. But it's not the controls I don't know how to do but rather the feeling of a mix of driving a car and flying an aircraft. It's really well made. Youtube link: [FlatSpace2 on iPhone][1] &#xD;&#xA;&#xD;&#xA;I'm not developing an iPhone game but the video shows the principle of the movement style.    &#xD;&#xA;[1]: http://www.youtube.com/watch?v=3dmSk-2sCpo&amp;feature=related&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;  &#xD;&#xA;**Edit 2**&#xD;&#xA;As there seems to be a slight interest, I'll post the version of the code I've used to continue. It works good enough. Sometimes good enough is sufficient!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using UnityEngine;&#xD;&#xA;    using System.Collections;&#xD;&#xA;    &#xD;&#xA;    public class ShipMovement : MonoBehaviour &#xD;&#xA;    {&#xD;&#xA;        public float directionModifier;&#xD;&#xA;        float shipRotationAngle;&#xD;&#xA;        public float shipRotationSpeed = 0;&#xD;&#xA;        public double thrustModifier;&#xD;&#xA;        public double accelerationModifier;&#xD;&#xA;        public double shipBaseAcceleration = 0;&#xD;&#xA;        public Vector2 directionVector;&#xD;&#xA;        public Vector2 accelerationVector = new Vector2(0,0);&#xD;&#xA;        public Vector2 frictionVector = new Vector2(0,0);&#xD;&#xA;        public int shipFriction = 0;&#xD;&#xA;        public Vector2 shipSpeedVector;&#xD;&#xA;        public Vector2 shipPositionVector;&#xD;&#xA;        public Vector2 speedCap = new Vector2(0,0);&#xD;&#xA;    	&#xD;&#xA;        void Update() &#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;       directionModifier = -Input.GetAxis(&quot;Horizontal&quot;);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       shipRotationAngle += ( shipRotationSpeed * directionModifier ) * Time.deltaTime;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       thrustModifier = Input.GetAxis(&quot;Vertical&quot;);&#xD;&#xA;    &#xD;&#xA;       accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) ) * Time.deltaTime;&#xD;&#xA;    &#xD;&#xA;       directionVector = new Vector2( Mathf.Cos(shipRotationAngle ), Mathf.Sin(shipRotationAngle) );&#xD;&#xA;       //accelerationVector = Vector2(directionVector.x * System.Convert.ToDouble(accelerationModifier), directionVector.y * System.Convert.ToDouble(accelerationModifier));&#xD;&#xA;       accelerationVector.x = directionVector.x * (float)accelerationModifier;&#xD;&#xA;    	accelerationVector.y = directionVector.y * (float)accelerationModifier;&#xD;&#xA;       // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;    &#xD;&#xA;    	shipSpeedVector.x *= 0.9f; //Use a variable here&#xD;&#xA;    	shipSpeedVector.y *= 0.9f; //&lt;-- as well&#xD;&#xA;       shipSpeedVector += accelerationVector;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;       shipPositionVector += shipSpeedVector;&#xD;&#xA;       &#xD;&#xA;       gameObject.transform.position = new Vector3(shipPositionVector.x, 0, shipPositionVector.y);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12913" PostHistoryTypeId="2" PostId="6486" RevisionGUID="57c2ab54-0180-4eae-b219-0052a6f9f875" CreationDate="2010-12-14T05:08:55.880" UserId="284" Text="If you have a brainstorm list of ideas you're part of the way there.&#xA;Pick your favorite 2 or three and break down what you liked most about them. &#xA;&#xA; E.g. RTS: liked building the buildings &#xA;-&gt; make a game centered around only building buildings.&#xA;&#xA;dungeon-crawlingRPG: liked the combat with monsters.  &#xA;-&gt; make only the combat part. no character choice, no stat or equipment choice, just the killing.&#xA;&#xA;Oh, and don't do it alone, get at least one other person in on it who can keep you sane.  If at wost you can't get a developer, at least get someone you can bounce your ideas off of and who can play whatever simple prototype you make and who you can watch try to play it, or talk to while they play it.&#xA;&#xA;Luckily, fun doesn't -require- complexity, and often you can add complexity later around a simple core for more variety when you find a promising core.." />
  <row Id="12914" PostHistoryTypeId="5" PostId="6486" RevisionGUID="07de8880-64f0-442e-8e80-41cd13305d31" CreationDate="2010-12-14T05:26:21.927" UserId="284" Comment="added 625 characters in body" Text="If you have a brainstorm list of ideas you're part of the way there.&#xA;Pick your favorite 2 or three and break down what you liked most about them. &#xA;&#xA; E.g. RTS: liked building the buildings &#xA;-&gt; make a game centered around only building buildings.&#xA;&#xA;dungeon-crawlingRPG: liked the combat with monsters.  &#xA;-&gt; make only the combat part. no character choice, no stat or equipment choice, just the killing.&#xA;&#xA;Oh, and don't do it alone, get at least one other person in on it who can keep you sane.  If at worst you can't get a developer, at least get someone you can bounce your ideas off of and who can play whatever simple prototype you make and who you can watch try to play it, or talk to while they play it.&#xA;The second you have anything manipulatable (not balanced, not playable, just does something), get someone other than yourself to start manipulating it.  Set yourself a hard core definition of &quot;working&quot; and a hard deadline of &quot;prototyping&quot; hours and pause when you reach them.  Set the gamelet down for a bit, like two days, and when you come back to it, re-examine whether you want to continue it or prototype something new.  (I advise that because despite being continually full of ideas, I got myself embroiled in developing a live, legacy game, and 7 years later I'm still trying to get it to a &quot;fun to play&quot; state.)&#xA;&#xA;Luckily, fun doesn't -require- complexity, and often you can add complexity later around a simple core for more options when you find a promising prototype." />
  <row Id="12915" PostHistoryTypeId="5" PostId="6486" RevisionGUID="0ad25123-dc15-433b-badc-f6c2929537e6" CreationDate="2010-12-14T05:32:09.160" UserId="284" Comment="added 60 characters in body" Text="If you have a brainstorm list of ideas you're part of the way there.&#xA;Pick your favorite 2 or three and break down what you liked most about them. &#xA;&#xA; E.g. RTS: liked building the buildings &#xA;-&gt; make a game centered around only building buildings.&#xA;&#xA;dungeon-crawlingRPG: liked the combat with monsters.  &#xA;-&gt; make only the combat part. no character choice, no stat or equipment choice, just the killing.&#xA;&#xA;Oh, and don't do it alone, get at least one other person in on it who can keep you sane.  If at worst you can't get a developer, at least get someone you can bounce your ideas off of and who can play whatever simple prototype you make and who you can watch try to play it, or talk to while they play it.&#xA;The second you have anything manipulatable (not balanced, not playable, just does something), get someone other than yourself to start manipulating it.  &#xA;&#xA;Set yourself a hard definition of &quot;a working prototype&quot; and a hard deadline of &quot;max prototyping hours&quot; and pause once you reach them.  Set the gamelet down for a bit, like two days, and when you come back to it, re-examine whether you can make it fun and want to add another prototyping goal to it or prototype something new.  &#xA;&#xA;(I advise this because despite being continually full of ideas, I got myself embroiled in developing a single live, legacy game, and 7 years later I'm still trying to get it to a &quot;fun to play&quot; state.)&#xA;&#xA;Luckily, fun doesn't -require- complexity, and often you can add complexity later around a simple core for more options when you find a promising base." />
  <row Id="12917" PostHistoryTypeId="2" PostId="6487" RevisionGUID="7cc7d19a-4c40-477c-b487-2151058d7ddc" CreationDate="2010-12-14T05:35:06.973" UserId="3990" Text="A clue may lie in the fact that there shouldn't be any Xna.Input.Touch reference in a windows project - XNA 4.0 only supports touch on WP7. Are you sure you have XNA 4.0 installed and not the *beta*, which did support Xna.Input.Touch on windows?" />
  <row Id="12918" PostHistoryTypeId="2" PostId="6488" RevisionGUID="7feef30c-e859-4581-ac3a-1f9e33d0b8ca" CreationDate="2010-12-14T05:37:07.117" UserId="2702" Text="I've made games in BASIC when I was a child, and I was curious about how the graphics were done in the 1988 version of Dangerous Dave made in C++; especially because they didn't have any worthwhile graphics packages those days.&#xD;&#xA;Remember how when Dave reached the edge of the screen, the entire screen graphic used to move leftward in a sweeping motion? I remember reading that Romero had used a special technique to do that.&#xD;&#xA;I've been wanting to create something like Dave, and was wondering &#xD;&#xA;&#xD;&#xA; 1. what graphics package/method they&#xD;&#xA;    used for Dave?&#xD;&#xA; 2. and how to make the entire screen&#xD;&#xA;    graphic move like they did?" />
  <row Id="12919" PostHistoryTypeId="1" PostId="6488" RevisionGUID="7feef30c-e859-4581-ac3a-1f9e33d0b8ca" CreationDate="2010-12-14T05:37:07.117" UserId="2702" Text="How did they make the screen move in Dangerous Dave?" />
  <row Id="12920" PostHistoryTypeId="3" PostId="6488" RevisionGUID="7feef30c-e859-4581-ac3a-1f9e33d0b8ca" CreationDate="2010-12-14T05:37:07.117" UserId="2702" Text="&lt;graphics&gt;" />
  <row Id="12921" PostHistoryTypeId="2" PostId="6489" RevisionGUID="5946128e-35b6-492f-9ab2-4827a7049755" CreationDate="2010-12-14T06:23:30.397" UserId="284" Text="I'm trying to create a travellable map.  I want to model able-to-be-occupied nodes/tiles/locations and allowed paths between them to create a multi-layered grid, in a browser-based game ( http://ninjawars.net , for a sense of it).  &#xA;&#xA;For example your character will be in a node &quot;a field&quot;, and could then move north into &quot;the first floor of a shack&quot;, or south or east or west.   After moving north, movement choices would then be: south back to the field, or up to the second floor of the shack.&#xA;&#xA;Basically, a grid maze with the minor complexity of the up and down option.&#xA;What are appropriate methods for modeling both the inhabitable nodes and the paths between them?  X,y,z, euclidean coordinates and relational lists of available paths from individual nodes?&#xA;&#xA;And are there better alternatives to grids that could still allow fun visual representation?" />
  <row Id="12922" PostHistoryTypeId="1" PostId="6489" RevisionGUID="5946128e-35b6-492f-9ab2-4827a7049755" CreationDate="2010-12-14T06:23:30.397" UserId="284" Text="Techniques for mapping &quot;nodes&quot; in a grid plus a third z dimension." />
  <row Id="12923" PostHistoryTypeId="3" PostId="6489" RevisionGUID="5946128e-35b6-492f-9ab2-4827a7049755" CreationDate="2010-12-14T06:23:30.397" UserId="284" Text="&lt;maps&gt;&lt;world-design&gt;&lt;browser-based-games&gt;" />
  <row Id="12924" PostHistoryTypeId="5" PostId="6489" RevisionGUID="e09219c5-affe-488b-8656-489e1327d135" CreationDate="2010-12-14T06:29:39.803" UserId="284" Comment="added 77 characters in body; edited title" Text="I'm trying to create a travellable map/world.  I want to model able-to-be-occupied nodes/tiles/locations and allowed paths between them to create a space infinitely able to be built upon in all directions (not just flatland), in a browser-based game ( http://ninjawars.net , for a sense of it).  &#xA;&#xA;For example your character will be in a node &quot;a field&quot;, and could then move north into &quot;the first floor of a shack&quot;, or south or east or west.   After moving north, movement choices would then be: south back to the field, or up to the second floor of the shack.&#xA;&#xA;Basically, a grid maze with the minor complexity of the up and down option.&#xA;&#xA;What are useful methods for modeling both the inhabitable nodes and the paths between them?  X,y,z euclidean coordinates and relational lists of available connections from individual nodes?&#xA;&#xA;Or are there alternatives to grids that could still allow fun visual representation of movement options?" />
  <row Id="12925" PostHistoryTypeId="2" PostId="6490" RevisionGUID="4eb0243e-2492-4f77-9001-547162926187" CreationDate="2010-12-14T06:29:59.920" UserId="3991" Text="If you know C, I'd recommend Allegro, game programming library. That's what I used when I was getting into game dev, and it served me well back then. It has similar capabilities to SDL, but for me it was always simpler, and more straightforward. They even say on the website that there are bindings for C#, but I have no idea how those work.&#xD;&#xA;&#xD;&#xA;http://www.talula.demon.co.uk/allegro/&#xD;&#xA;&#xD;&#xA;Also, I find it very weird, that you say you know C++ but can't learn Python. Python is way simpler and easier to use than C++." />
  <row Id="12926" PostHistoryTypeId="4" PostId="6489" RevisionGUID="e09219c5-affe-488b-8656-489e1327d135" CreationDate="2010-12-14T06:29:39.803" UserId="284" Comment="added 77 characters in body; edited title" Text="Techniques for mapping &quot;nodes&quot; and paths between nodes in a world space that extends in three dimensions." />
  <row Id="12927" PostHistoryTypeId="2" PostId="6491" RevisionGUID="2ce9251b-6b20-4f6a-877f-784820b5b7a5" CreationDate="2010-12-14T07:09:57.600" UserId="3830" Text="If your map is not extremely dense, you would be best off defining it with a list of nodes rather than an actual array or grid.  Create a list of nodes, where each node has a set of links to what node you will go to if you travel N, S, E, W, U or D.  This is how MUDs typically work I believe.  Also text-based adventure games.&#xD;&#xA;&#xD;&#xA;Here is a bit of pseudo code to define a field node, and a shack and the shack's second floor...&#xD;&#xA;&#xD;&#xA;    // --- Define field node&#xD;&#xA;    node[1].name = &quot;field&quot;;&#xD;&#xA;    node[1].description = &quot;You are standing in a farmers field.&quot;;&#xD;&#xA;    node[1].up_to = 0;&#xD;&#xA;    node[1].down_to = 0;&#xD;&#xA;    node[1].north_to = 2;&#xD;&#xA;    node[1].south_to = 0;&#xD;&#xA;    node[1].west_to = 0;&#xD;&#xA;    node[1].east_to = 0;&#xD;&#xA;    &#xD;&#xA;    // --- Define shack first floor node&#xD;&#xA;    node[2].name = &quot;shack&quot;;&#xD;&#xA;    node[2].description = &quot;You are on the first floor of a shack.&quot;;&#xD;&#xA;    node[2].up_to = 3;&#xD;&#xA;    node[2].down_to = 0;&#xD;&#xA;    node[2].north_to = 0;&#xD;&#xA;    node[2].south_to = 1;&#xD;&#xA;    node[2].west_to = 0;&#xD;&#xA;    node[2].east_to = 0;&#xD;&#xA;    &#xD;&#xA;    // --- Define shack second floor node&#xD;&#xA;    node[3].name = &quot;second floor&quot;;&#xD;&#xA;    node[3].description = &quot;You are on the third floor of a shack.&quot;;&#xD;&#xA;    node[3].up_to = 0;&#xD;&#xA;    node[3].down_to = 2;&#xD;&#xA;    node[3].north_to = 0;&#xD;&#xA;    node[3].south_to = 0;&#xD;&#xA;    node[3].west_to = 0;&#xD;&#xA;    node[3].east_to = 0;&#xD;&#xA;&#xD;&#xA;The &quot;_to&quot; values represent the ID of the node you'll go to if you travel in that direction.  If the &quot;_to&quot; value is zero, that means there is no path that direction.  With this kind of system, you can see how the player can go north and be on the first floor of the shack.  And from the first floor they can go south back to the field, or up to the second floor.&#xD;&#xA;&#xD;&#xA;When you program a system like this, it is very easy to use the path information to dynamically give the player information on where they are.  For example suppose that the current node they are in is set in the variable &quot;current_node&quot;.  You can then check each of the 6 directions and print out possible travel information to the player like this...&#xD;&#xA;&#xD;&#xA;    north_to = node[current_node].north_to;&#xD;&#xA;    if (north_to != 0) {&#xD;&#xA;       print &quot;A path leads north to &quot; + node[north_to].name;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    south_to = node[current_node].south_to;&#xD;&#xA;    if (south_to != 0) {&#xD;&#xA;       print &quot;A path leads south to &quot; + node[south_to].name;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    east_to = node[current_node].east_to;&#xD;&#xA;    if (east_to != 0) {&#xD;&#xA;       print &quot;A path leads east to &quot; + node[east_to].name;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    west_to = node[current_node].west_to;&#xD;&#xA;    if (west_to != 0) {&#xD;&#xA;       print &quot;A path leads west to &quot; + node[west_to].name;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    up_to = node[current_node].up_to;&#xD;&#xA;    if (up_to != 0) {&#xD;&#xA;       print &quot;A path leads up to &quot; + node[up_to].name;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    down_to = node[current_node].down_to;&#xD;&#xA;    if (down_to != 0) {&#xD;&#xA;       print &quot;A path leads down to &quot; + node[down_to].name;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;One thing a system like this lets you do is concentrate detail where you need it, and avoid it where you don't need it.  You could let the player cross a mountain pass and enter a shrine in only a few steps, with a set of nodes linked like this...&#xD;&#xA;&#xD;&#xA;WEST SIDE OF MOUNTAINS &lt;--&gt; MOUNTAIN PASS &lt;--&gt; EAST SIDE OF MOUNTAINS &lt;--&gt; SHRINE&#xD;&#xA;&#xD;&#xA;If you tried to to that on a map of evenly sized tiles, it would take a large number of tiles to simulate the distance across the mountain pass.&#xD;&#xA;&#xD;&#xA;Another advantage of a map like this is that it's very expandable.  Suppose I want to put a basement in the shack in the pseudo code example above.  I just need to add a new node for the basement, and change the &quot;down_to&quot; link on the shack's first floor to point to the basement. &#xD;&#xA;&#xD;&#xA;If you'd really like to have some graphics with the game, you could associate a picture with each node, and the picture is shown to the player when they visit that node.  These nodes could even be places where players click, walk around, explore, etc.  This is about how Club Penguin manages rooms, and also many click adventure games like &quot;Ben There, Dan That&quot;.&#xD;&#xA;&#xD;&#xA;Of course this approach does not work with a tiled map or one where you want to let the player go any place they'd like to go. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="12928" PostHistoryTypeId="2" PostId="6492" RevisionGUID="92d9f246-a72a-4c5f-9779-3dd3c1b947b2" CreationDate="2010-12-14T07:21:57.297" UserId="2077" Text="Depending on how you decide to implement this, you could (1) simply build a graph of visitable nodes using pointers or references or (2) if your language supports it, you could use &lt;a href=&quot;http://en.wikipedia.org/wiki/Tail_call&quot;&gt;proper tail calls&lt;/a&gt;; &lt;a href=&quot;http://www.lua.org/pil/6.3.html&quot;&gt;Programming in Lua&lt;/a&gt; has a good example of this directly related to game development." />
  <row Id="12929" PostHistoryTypeId="2" PostId="6493" RevisionGUID="f87353ba-e75f-4a8a-b007-b84f47b98e18" CreationDate="2010-12-14T07:25:18.700" UserId="3830" Text="It's hard to judge exactly how this was done, but consider that this game was written for a very specific hardware specification - DOS with a EGA video card (640x480 pixels).  The code probably is doing some pretty low level manipulations of video memory to make the scroll happen smoothly. &#xD;&#xA;&#xD;&#xA;Here is a website that talks about programming DOS graphics that might give you a sense of what it would be like...&#xD;&#xA;&#xD;&#xA;http://www.phatcode.net/res/224/files/html/index.html&#xD;&#xA;" />
  <row Id="12930" PostHistoryTypeId="2" PostId="6494" RevisionGUID="ec891c0f-cd63-4761-8885-4249a07292b6" CreationDate="2010-12-14T07:37:09.833" UserId="3830" Text="If you are having the client calculate the score, there is no way to validate it beyond (as pointed out) having the server replay the game to confirm it gets the same score.&#xD;&#xA;&#xD;&#xA;There are though types of games you can design that don't work based on just a numeric score.  A server side script can generate a random addition math problem for example, and when the user submits the answer it can compare their answer with the correct one and score it server side.&#xD;&#xA;&#xD;&#xA;But if your game is a complex one (like the space invaders example), there's not much you can do about it beyond either a) trusting the client, or b) letting the server manage the game." />
  <row Id="12931" PostHistoryTypeId="5" PostId="6493" RevisionGUID="bf9c6dbf-a687-4ea2-8b34-6ca618476580" CreationDate="2010-12-14T08:12:03.513" UserId="3830" Comment="added 187 characters in body" Text="Edit:  Here is a link to an article from Dr. Dobbs that discusses sideways scrolling.  It may be the method used for this effect.  &#xD;&#xA;&#xD;&#xA;http://www.drdobbs.com/184408045&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;It's hard to judge exactly how this was done, but consider that this game was written for a very specific hardware specification - DOS with a EGA video card (640x480 pixels).  The code probably is doing some pretty low level manipulations of video memory to make the scroll happen smoothly. &#xD;&#xA;&#xD;&#xA;Here is a website that talks about programming DOS graphics that might give you a sense of what it would be like...&#xD;&#xA;&#xD;&#xA;http://www.phatcode.net/res/224/files/html/index.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12932" PostHistoryTypeId="2" PostId="6495" RevisionGUID="d7c25975-7755-413f-b3cb-c7db25c3b0b8" CreationDate="2010-12-14T08:33:45.577" UserId="2631" Text="Ah I remember these techniques from my DOS days.&#xD;&#xA;Moving the video RAM around with blitting to perform scrolling would have resulted in jerky scrolling.&#xD;&#xA;EGA introduced the the vertical and horizontal pixel panning registers which could be used to set the screen origin (where in video memory the video card started displaying data from). Because there is no memory copying going on this is almost instant and can be used for very smooth and fast pixel by pixel scrolling on EGA and VGA if you have direct access to the hardware registers.&#xD;&#xA;Most scrollers in DOS would have used this, and this part of the code would probably have been written in assembly language to directly access the hardware registers.&#xD;&#xA;These methods aren't really valid anymore though.&#xD;&#xA;To achieve a similar effect now, I think on modern graphics hardware you could probably do it fast enough just redrawing the entire screen each frame.&#xD;&#xA;The other method I can think of is using OpenGL or DirectX and rendering a texture to a quad twice the width of the screen and moving that.&#xD;&#xA;Somehow it doesn't seem as fun as manipulating hardware registers though :)" />
  <row Id="12933" PostHistoryTypeId="2" PostId="6496" RevisionGUID="7b718262-7b1e-4241-b2c7-a52876ec709a" CreationDate="2010-12-14T08:51:43.887" UserId="2958" Text="**Metagun** (game developed by Markus aka Notch aka MineCraft guy) has the same scrolling feel you're looking for.&#xD;&#xA;&#xD;&#xA;The game is Open-Source and written in Java.&#xD;&#xA;&#xD;&#xA; - Game:&#xD;&#xA;   http://www.mojang.com/compo/metagun/&#xD;&#xA; - Source:&#xD;&#xA;   http://www.mojang.com/compo/metagun/metagun-source.zip&#xD;&#xA;&#xD;&#xA;Hope you'll learn from looking at the code." />
  <row Id="12934" PostHistoryTypeId="2" PostId="6497" RevisionGUID="0056559e-fc4b-42e5-a898-d655a600f3fe" CreationDate="2010-12-14T09:08:46.227" UserId="1581" Text="You can do it the Warcraft way: Use Javascript only for sending movement commands to the server, and let the server handle logic.&#xD;&#xA;&#xD;&#xA;This still leaves you open to robots (javascript programs that move things faster an more precisely than humanly possible) but that's a big step compared to leaving the door open to the /game_finished.php trick." />
  <row Id="12935" PostHistoryTypeId="2" PostId="6498" RevisionGUID="176e67d0-dbec-4e3f-a044-1bd00f3f29d7" CreationDate="2010-12-14T11:17:16.793" UserId="364" Text="Lets assume I start a new PC/Mac game today that will take something like one year to be released publicly and that is a lot about graphic details (not realistics, just graphically &quot;rich&quot;).&#xD;&#xA;&#xD;&#xA;The higher screen resolution the better but I build the game in a way that adapt to the screen (3D, screen space relative ui, etc). However I still need to have a minimal resolution to be sure my UI and texts are still clear in low resolutions.&#xD;&#xA;&#xD;&#xA;**For the moment I'm assuming that 1024x768 is the really lower resolution any such game could ask for. But as time is going on fast I'm thinking maybe I'm wrong and a game with visual details should target higher resolutions as minimum resolution, if started today?**&#xD;&#xA;&#xD;&#xA;Assuming Steam users would be the target audience, I looked at the Steam Hardware Survey to get an idea but it don't talk about the resolutions of games being played, only about desktop resolution. I'm assuming that most players will play most games with lower resolution than their desktop resolution...?" />
  <row Id="12936" PostHistoryTypeId="1" PostId="6498" RevisionGUID="176e67d0-dbec-4e3f-a044-1bd00f3f29d7" CreationDate="2010-12-14T11:17:16.793" UserId="364" Text="Minimum target resolution for a PC Game?" />
  <row Id="12937" PostHistoryTypeId="3" PostId="6498" RevisionGUID="176e67d0-dbec-4e3f-a044-1bd00f3f29d7" CreationDate="2010-12-14T11:17:16.793" UserId="364" Text="&lt;graphics&gt;&lt;resolution&gt;&lt;screen&gt;" />
  <row Id="12938" PostHistoryTypeId="2" PostId="6499" RevisionGUID="28e3c553-c6d9-4caa-ad6a-6018f75b99ed" CreationDate="2010-12-14T11:29:48.800" UserId="1352" Text="Each node could have a 3d index and 8bit flag where you use 6 of those bits to determine if a direction is walkable or not.&#xD;&#xA;&#xD;&#xA;    Example node:&#xD;&#xA;&#xD;&#xA;    XYZ(choose data-type depending on your map size requirements)&#xD;&#xA;    128,129,523&#xD;&#xA;&#xD;&#xA;    UDEWNS(up,down,east,west,north,south)&#xD;&#xA;    100001&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Would mean you can walk up and south from zone 128,129,523.&#xD;&#xA;&#xD;&#xA;When you walk one of the directions increment/decrement the appropriate dimension.&#xD;&#xA;Walking up from the example zone would bring you to 128,129,524&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="12939" PostHistoryTypeId="2" PostId="6500" RevisionGUID="819e4f98-1e69-4de8-adf8-82613f2dc190" CreationDate="2010-12-14T11:36:49.943" UserId="744" Text="1024x768 (or less) is still the minimum resolution you should be targeting. Plenty of laptops sold between ~2006 and now have fully capable video cards, but are stuck to the same resolution they were sold at.&#xD;&#xA;&#xD;&#xA;Depending on the game, it may be even less - netbooks commonly sold with a 1024x600 resolution during the same period, so a casual or web-based game may want to target that as well. People using TVs as monitors may have a display of 1280x720, and that's the resolution most console games will target. Phone platforms are just now breaking into VGA and higher resolutions.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.w3schools.com/browsers/browsers_display.asp&quot;&gt;W3 Schools has a year-by-year breakdown of resolutions for people browsing their website.&lt;/a&gt; 1024x768 still made up 20% of the visitors in January 2010." />
  <row Id="12940" PostHistoryTypeId="2" PostId="6501" RevisionGUID="ee28e135-c9bb-4d36-9481-0c5fd76f8e84" CreationDate="2010-12-14T11:37:20.997" UserId="2091" Text="I'd say 800x600.  Some netbooks have only 600 pixels tall screens (usually 1024x600), and among laptops widescreen configurations where the vertical height is absurdly limited are more and more common.&#xD;&#xA;" />
  <row Id="12941" PostHistoryTypeId="2" PostId="6502" RevisionGUID="4243fbd2-0e5a-4f35-9b9a-76ceb96b46a0" CreationDate="2010-12-14T12:07:02.267" UserId="2711" Text="I'm looking for some references about water simulation, and how to model it's interaction with bodies (like boats, ships, submarines).&#xD;&#xA;&#xD;&#xA;I've found a lot of references on the visual aspects of water (waves, reflection, etc), but very little about how to deal with the way it should interact with bodies. My experience with game development is very limited, and I'm really stuck here.&#xD;&#xA;&#xD;&#xA;Bascally I would like to be able to make the position of a ship variates according to the waves. How can I do this?&#xD;&#xA;&#xD;&#xA;I'm using Panda3D, but hope to hear about techniques and implementations used in any available technology.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="12942" PostHistoryTypeId="1" PostId="6502" RevisionGUID="4243fbd2-0e5a-4f35-9b9a-76ceb96b46a0" CreationDate="2010-12-14T12:07:02.267" UserId="2711" Text="Water/Ocean simulation and physics" />
  <row Id="12943" PostHistoryTypeId="3" PostId="6502" RevisionGUID="4243fbd2-0e5a-4f35-9b9a-76ceb96b46a0" CreationDate="2010-12-14T12:07:02.267" UserId="2711" Text="&lt;physics&gt;" />
  <row Id="12944" PostHistoryTypeId="2" PostId="6503" RevisionGUID="7e8e9bb3-c9eb-4781-bcca-340a53ad6dbb" CreationDate="2010-12-14T12:28:20.020" UserDisplayName="windson" Text="I would suggest to start with something as simple as a board game or card game. Doing something like that can give you a real taste for game mechanics. Writing software comes later. Remember, games are about fun, not snazzy graphics." />
  <row Id="12945" PostHistoryTypeId="5" PostId="6498" RevisionGUID="59b8be76-5af6-4011-93a8-d8226902a209" CreationDate="2010-12-14T13:38:16.100" UserId="364" Comment="added 29 characters in body; edited title; edited tags" Text="Lets assume I start a new **PC/Mac _desktop_** (not netbook) game today that will take something like one year to be released publicly and that is a lot about graphic details (not realistics, just graphically &quot;rich&quot;). &#xD;&#xA;&#xD;&#xA;The higher screen resolution the better but I build the game in a way that adapt to the screen (3D, screen space relative ui, etc). However I still need to have a minimal resolution to be sure my UI and texts are still clear in low resolutions.&#xD;&#xA;&#xD;&#xA;**For the moment I'm assuming that 1024x768 is the really lower resolution any such game could ask for. But as time is going on fast I'm thinking maybe I'm wrong and a game with visual details should target higher resolutions as minimum resolution, if started today?**&#xD;&#xA;&#xD;&#xA;Assuming Steam users would be the target audience, I looked at the Steam Hardware Survey to get an idea but it don't talk about the resolutions of games being played, only about desktop resolution. I'm assuming that most players will play most games with lower resolution than their desktop resolution...?" />
  <row Id="12946" PostHistoryTypeId="4" PostId="6498" RevisionGUID="59b8be76-5af6-4011-93a8-d8226902a209" CreationDate="2010-12-14T13:38:16.100" UserId="364" Comment="added 29 characters in body; edited title; edited tags" Text="Minimum target resolution for a desktop PC/Mac Game?" />
  <row Id="12947" PostHistoryTypeId="6" PostId="6498" RevisionGUID="59b8be76-5af6-4011-93a8-d8226902a209" CreationDate="2010-12-14T13:38:16.100" UserId="364" Comment="added 29 characters in body; edited title; edited tags" Text="&lt;graphics&gt;&lt;pc&gt;&lt;resolution&gt;&lt;screen&gt;&lt;macos&gt;" />
  <row Id="12948" PostHistoryTypeId="2" PostId="6504" RevisionGUID="1157b31d-7887-4660-9762-8d07b219fab3" CreationDate="2010-12-14T13:45:17.677" UserId="1292" Text="Hey all, i'm currently using Lib3ds to load models into my C++/OpenGL project. So far, i've been follow the model loading tutorial found *[here][1]*. &#xD;&#xA;&#xD;&#xA;The tutorial gives a good example of how to draw the vertices and normals using VBO's, but so far i've been lost as how to do the same thing with materials. &#xD;&#xA;&#xD;&#xA;Could i get an explanation/example of how to both **load** and **draw** materials of my meshes using Lib3ds and OpenGL?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.donkerdump.nl/node/207" />
  <row Id="12949" PostHistoryTypeId="1" PostId="6504" RevisionGUID="1157b31d-7887-4660-9762-8d07b219fab3" CreationDate="2010-12-14T13:45:17.677" UserId="1292" Text="Loading and drawing materials using Lib3ds" />
  <row Id="12950" PostHistoryTypeId="3" PostId="6504" RevisionGUID="1157b31d-7887-4660-9762-8d07b219fab3" CreationDate="2010-12-14T13:45:17.677" UserId="1292" Text="&lt;opengl&gt;&lt;3d-meshes&gt;" />
  <row Id="12951" PostHistoryTypeId="2" PostId="6505" RevisionGUID="c5501f23-42f6-4982-8c39-3579d832e75d" CreationDate="2010-12-14T13:53:57.053" UserId="3361" Text="I went with 3D noise again because it produces much nicer things than I could accomplish with 2D noise.  I'm currently using a falloff factor for the general form of my island but unfortunately it still sometimes happens that the island will just be too small.&#xD;&#xA;&#xD;&#xA;Generally though it works:&#xD;&#xA;&#xD;&#xA;    static int&#xD;&#xA;    block_is_solid(const sc_worldgen_t *worldgen, float x, float y, float z)&#xD;&#xA;    {&#xD;&#xA;        float noise, density, center_falloff, plateau_falloff;&#xD;&#xA;        &#xD;&#xA;        /* caves */&#xD;&#xA;        if (powf(sc_perlin_noise3_ex(worldgen-&gt;perlin, x * 5.0f, y * 5.0f,&#xD;&#xA;                                     z * 5.0f, 3), 3.0f) &lt; -0.5f)&#xD;&#xA;            return 0;&#xD;&#xA;    &#xD;&#xA;        /* falloff from the top */&#xD;&#xA;        if (y &gt; 0.9f)&#xD;&#xA;            return SC_BLOCK_AIR;&#xD;&#xA;        else if (y &gt; 0.8f)&#xD;&#xA;            plateau_falloff = 1.0f - (y - 0.8f) * 10.0f;&#xD;&#xA;        else&#xD;&#xA;            plateau_falloff = 1.0f;&#xD;&#xA;    &#xD;&#xA;        /* falloff from center */&#xD;&#xA;        center_falloff = 0.1f / (&#xD;&#xA;            powf((x - 0.5f) * 1.5f, 2.0f) +&#xD;&#xA;            powf((y - 1.0f) * 0.8f, 2.0f) +&#xD;&#xA;            powf((z - 0.5f) * 1.5f, 2.0f)&#xD;&#xA;        );&#xD;&#xA;    &#xD;&#xA;        /* noise combined density */&#xD;&#xA;        noise = sc_perlin_noise3_ex(worldgen-&gt;perlin, x, y * 0.5, z, 7);&#xD;&#xA;        density = noise * center_falloff * plateau_falloff;&#xD;&#xA;        return density &gt; 0.2f ? SC_BLOCK_STONE : SC_BLOCK_AIR;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Technique from [pyalot][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://twitter.com/pyalot" />
  <row Id="12952" PostHistoryTypeId="2" PostId="6506" RevisionGUID="3b2c1928-f23c-4028-923d-7cb7858523ec" CreationDate="2010-12-14T14:14:07.473" UserId="3830" Text="Basically you're looking at modeling 5 things for a ship:  pitch, yaw, roll, heave, sway and surge.&#xD;&#xA; &#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Pitch, yaw and roll are rotations the ship can make, while heave, sway and surge are movements induced by the waves.&#xD;&#xA;&#xD;&#xA;Essentially, imagine a boat on the water like a car driving over ground.  If the car drives over rolling hills (like a ship going over waves) it is going to tilt and angle as it goes up and down the hills.  This is the pitch, yaw and roll.  If the hills (waves) are big, the car (ship) will drive up and down, pitching, yawing and rolling as it goes.  If the hills (waves) are really small (smaller than the car/ship), then the car (ship) is just going to drive over them and not pitch, yaw or roll much.&#xD;&#xA;&#xD;&#xA;The size of a ship makes a difference.  A big ship can just plow through smaller waves, whereas a small ship will move up and down the waves.  Taking our car example, imagine someone riding a bicycle (small ship) over a set of small hills (waves).  They will roll up and down as they go.  Then someone drives a big truck (ship) over them.  The truck is bigger than the hills, so doesn't really pitch up and down as it goes over them.&#xD;&#xA;&#xD;&#xA;A ship however is part way into the water, so it's movements are going to be dampened somewhat.  Imagine a car with really soft spongey tires. When it drives over tiny hills, the spongey tires just smooth it out.  A ship's movements are also dampened, so little waves won't make it bounce up and down like a car on a rocky road.  A submarine is sort of the ultimate dampened ship, as when submerged it is pretty much immune to the surface waves.  But if it's on the surface it's going to be moved by the waves.&#xD;&#xA;&#xD;&#xA;A ship will also slide on waves.  A ship going down the face of a wave will surge forward for example.  So to extend our car example, make it a car with big spongey wheels driving on a somewhat slippery surface. &#xD;&#xA;&#xD;&#xA;Here are three articles that cover the science behind this, which might give you some insights.  Though heavy on the math and science, they could give you an idea of what the &#xD;&#xA;&#xD;&#xA;Article 1: [Modeling of Ship Roll Dynamics and Its Coupling with Heave and Pitch][2]&#xD;&#xA;&#xD;&#xA;Article 2:  [Modelling and Simulation of Marine Surface Vessel Dynamics][3]&#xD;&#xA;&#xD;&#xA;Article 3:  [Modelling and Simulation of Marine Surface Vessel Dynamics][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/odMH9.gif&#xD;&#xA;  [2]: http://www.hindawi.com/journals/mpe/2010/934714.html&#xD;&#xA;  [3]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M1_intro.pdf&#xD;&#xA;  [4]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M10_HydroSW.pdf" />
  <row Id="12953" PostHistoryTypeId="2" PostId="6507" RevisionGUID="af1e62d0-7512-4bef-ac03-3e47fe113d9f" CreationDate="2010-12-14T14:14:12.403" UserId="3361" Text="Minecraft is a game that is largely based on a heightmap and uses that heigtmap information to flood the world with light.  From my understanding the highest point in the heightmap is the end of the sunlight influenced area.  Everything above that is lit by sunlight, everything below that just is influenced by light nearby in a radius of 8 blocks.&#xD;&#xA;&#xD;&#xA;Thus if you have a floating island on the top of your world everything below that will be seen essentially as a cave.  When two lights influence the same point the brighter light wins (unsure about that).&#xD;&#xA;&#xD;&#xA;Either way there are a couple of problems with minecrafts lighting model: first of all, if your world does not have a heightmap it becomes trickier to figure out what exactly is supposed to emit sunlight and what not.  A simple way would be to assume that the world is (in my case) a floating rock and then traverse each axis from both directions and figure out where the rock starts and ends.  But this does not fully eliminate the problem as dents in the rock are not supposed to be in darkness.&#xD;&#xA;&#xD;&#xA;Minecraft itself will cache the light information in its chunks together with the information about the material of a block.  Thus only if the world is modified the lighting has to update.  Unfortunately that process is still pretty slow on updates and on quick light changes one can see the lighting lag behind.  That's especially true if a lot of blocks change (TNT, sunset etc.) and you're not running the fastest computer (Or Java on Mac).&#xD;&#xA;&#xD;&#xA;From my still limited understanding of 3D graphics lighting a world like minecraft shouldn't be the biggest issue.  How would you tackle the problem?&#xD;&#xA;&#xD;&#xA;I think the basic requirements for lighting in a voxel world would be&#xD;&#xA;&#xD;&#xA;1. update fast enough that it could happen in a single frame.  One might be able to do the lighting in the graphics device and download the changed light information to the main RAM.&#xD;&#xA;2. light information must be quickly available for the main game logic so not entirely based on the graphics device: reasoning: light affects the growth of grass, spawning of monsters etc.&#xD;&#xA;3. light updates would have to be local to a chunk or have some other limit so that one does not have to relight the whole world which might be very large in size.&#xD;&#xA;&#xD;&#xA;The main idea would be to make the light updates fast, not necessarily more beautiful. For general light rendering performance improvements one could easily add SSAO on top of that which should result in much nicer worlds." />
  <row Id="12954" PostHistoryTypeId="1" PostId="6507" RevisionGUID="af1e62d0-7512-4bef-ac03-3e47fe113d9f" CreationDate="2010-12-14T14:14:12.403" UserId="3361" Text="Lighting in a Minecraftian World" />
  <row Id="12955" PostHistoryTypeId="3" PostId="6507" RevisionGUID="af1e62d0-7512-4bef-ac03-3e47fe113d9f" CreationDate="2010-12-14T14:14:12.403" UserId="3361" Text="&lt;opengl&gt;&lt;maps&gt;&lt;lighting&gt;" />
  <row Id="12956" PostHistoryTypeId="2" PostId="6508" RevisionGUID="0de91ea3-ff65-427c-a3a6-5353cf07fa90" CreationDate="2010-12-14T14:20:11.587" UserId="4001" Text="I've got a best/common practice question about cross platform development. We're developing a Unity game and we've got a custom data format (a modified jpeg) that a C# tool we developed pumps out and gets loaded into unity using a dll. We use some nice gdi+ tricks on Windows with this file format, however when we move this to the Mac, we're running into issues that we think is the mono implementation of gdi+ is missing something. &#xD;&#xA;&#xD;&#xA;That aside we're not sure what the best practice moving forward is. Should we develop a new file format that works cross platform and is loaded the same on both systems, or should we use a platform specific data format that allows for the use of the C# tricks on Windows and maybe a different trick on Mac? " />
  <row Id="12957" PostHistoryTypeId="1" PostId="6508" RevisionGUID="0de91ea3-ff65-427c-a3a6-5353cf07fa90" CreationDate="2010-12-14T14:20:11.587" UserId="4001" Text="Cross platform data format" />
  <row Id="12958" PostHistoryTypeId="3" PostId="6508" RevisionGUID="0de91ea3-ff65-427c-a3a6-5353cf07fa90" CreationDate="2010-12-14T14:20:11.587" UserId="4001" Text="&lt;cross-platform&gt;" />
  <row Id="12959" PostHistoryTypeId="5" PostId="6506" RevisionGUID="f6bab69b-11d9-4a97-a263-4d08cbdb3500" CreationDate="2010-12-14T14:35:40.520" UserId="3830" Comment="There are 6 motions!" Text="Basically you're looking at modeling 6 things for a ship:  pitch, yaw, roll, heave, sway and surge.&#xD;&#xA; &#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Pitch, yaw and roll are rotations the ship can make, while heave, sway and surge are movements induced by the waves.&#xD;&#xA;&#xD;&#xA;Essentially, imagine a boat on the water like a car driving over ground.  If the car drives over rolling hills (like a ship going over waves) it is going to tilt and angle as it goes up and down the hills.  This is the pitch, yaw and roll.  If the hills (waves) are big, the car (ship) will drive up and down, pitching, yawing and rolling as it goes.  If the hills (waves) are really small (smaller than the car/ship), then the car (ship) is just going to drive over them and not pitch, yaw or roll much.&#xD;&#xA;&#xD;&#xA;The size of a ship makes a difference.  A big ship can just plow through smaller waves, whereas a small ship will move up and down the waves.  Taking our car example, imagine someone riding a bicycle (small ship) over a set of small hills (waves).  They will roll up and down as they go.  Then someone drives a big truck (ship) over them.  The truck is bigger than the hills, so doesn't really pitch up and down as it goes over them.&#xD;&#xA;&#xD;&#xA;A ship however is part way into the water, so it's movements are going to be dampened somewhat.  Imagine a car with really soft spongey tires. When it drives over tiny hills, the spongey tires just smooth it out.  A ship's movements are also dampened, so little waves won't make it bounce up and down like a car on a rocky road.  A submarine is sort of the ultimate dampened ship, as when submerged it is pretty much immune to the surface waves.  But if it's on the surface it's going to be moved by the waves.&#xD;&#xA;&#xD;&#xA;A ship will also slide on waves.  A ship going down the face of a wave will surge forward for example.  So to extend our car example, make it a car with big spongey wheels driving on a somewhat slippery surface. &#xD;&#xA;&#xD;&#xA;Here are three articles that cover the science behind this, which might give you some insights.  Though heavy on the math and science, they could give you an idea of what the &#xD;&#xA;&#xD;&#xA;Article 1: [Modeling of Ship Roll Dynamics and Its Coupling with Heave and Pitch][2]&#xD;&#xA;&#xD;&#xA;Article 2:  [Modelling and Simulation of Marine Surface Vessel Dynamics][3]&#xD;&#xA;&#xD;&#xA;Article 3:  [Modelling and Simulation of Marine Surface Vessel Dynamics][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/odMH9.gif&#xD;&#xA;  [2]: http://www.hindawi.com/journals/mpe/2010/934714.html&#xD;&#xA;  [3]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M1_intro.pdf&#xD;&#xA;  [4]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M10_HydroSW.pdf" />
  <row Id="12960" PostHistoryTypeId="2" PostId="6509" RevisionGUID="edfb8dd6-2a04-445f-b785-f6341607d895" CreationDate="2010-12-14T14:50:41.167" UserId="3505" Text="Best practise is definitely to define your data format independent from any tools you use to read or write it, so if best practice is your criterion you should probably design a new format. But practically, if you can reasonably hack a way to get the format working on Mono that may be an okay solution.&#xD;&#xA;&#xD;&#xA;Different formats for different platforms? I really wouldn't want to go there, that's bona fide technical debt." />
  <row Id="12961" PostHistoryTypeId="5" PostId="6509" RevisionGUID="439051ab-8629-4a97-a80b-82f7b3aa2126" CreationDate="2010-12-14T14:57:54.207" UserId="3505" Comment="added 230 characters in body" Text="Best practise is definitely to define your data format independent from any tools you use to read or write it, so if best practice is your criterion you should probably design a new format. But practically, if you can reasonably hack a way to get the format working on Mono that may be an okay solution.&#xD;&#xA;&#xD;&#xA;Different formats for different platforms? I really wouldn't want to go there, that's bona fide technical debt.&#xD;&#xA;&#xD;&#xA;Edit:  &#xD;&#xA;I'd suggest that you simply store multiple files in a container format, if you got tools available for handling it you could use a zip file, otherwise a simple custom format with length prefixed blocks may be optimal." />
  <row Id="12962" PostHistoryTypeId="5" PostId="6506" RevisionGUID="3f5055cd-79b6-48c2-9af6-f37381d36104" CreationDate="2010-12-14T15:27:59.840" UserId="3830" Comment="added 113 characters in body" Text="Basically you're looking at modeling 6 things for a ship:  pitch, yaw, roll, heave, sway and surge.&#xD;&#xA; &#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Pitch, yaw and roll are rotations the ship can make, while heave, sway and surge are movements induced by the waves.&#xD;&#xA;&#xD;&#xA;Essentially, imagine a boat on the water like a car driving over ground.  If the car drives over rolling hills (like a ship going over waves) it is going to tilt and angle as it goes up and down the hills.  This is the pitch, yaw and roll.  If the hills (waves) are big, the car (ship) will drive up and down, pitching, yawing and rolling as it goes.  If the hills (waves) are really small (smaller than the car/ship), then the car (ship) is just going to drive over them and not pitch, yaw or roll much.&#xD;&#xA;&#xD;&#xA;The size of a ship makes a difference.  A big ship can just plow through smaller waves, whereas a small ship will move up and down the waves.  Taking our car example, imagine someone riding a bicycle (small ship) over a set of small hills (waves).  They will roll up and down as they go.  Then someone drives a big truck (ship) over them.  The truck is bigger than the hills, so doesn't really pitch up and down as it goes over them.&#xD;&#xA;&#xD;&#xA;A ship however is part way into the water, so it's movements are going to be dampened somewhat.  Imagine a car with really soft spongey tires. When it drives over tiny hills, the spongey tires just smooth it out.  A ship's movements are also dampened, so little waves won't make it bounce up and down like a car on a rocky road.  A submarine is sort of the ultimate dampened ship, as when submerged it is pretty much immune to the surface waves.  But if it's on the surface it's going to be moved by the waves.&#xD;&#xA;&#xD;&#xA;A ship will also slide on waves.  A ship going down the face of a wave will surge forward for example.  So to extend our car example, make it a car with big spongey wheels driving on a somewhat slippery surface. Unless the car runs it's engine to compensate, it's going to slide down the side of a hill.&#xD;&#xA;&#xD;&#xA;Here are three articles that cover the science behind this, which might give you some insights.  Though heavy on the math and science, they could give you an idea of what the different factors are.&#xD;&#xA;&#xD;&#xA;Article 1: [Modeling of Ship Roll Dynamics and Its Coupling with Heave and Pitch][2]&#xD;&#xA;&#xD;&#xA;Article 2:  [Modelling and Simulation of Marine Surface Vessel Dynamics][3]&#xD;&#xA;&#xD;&#xA;Article 3:  [Modelling and Simulation of Marine Surface Vessel Dynamics][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/odMH9.gif&#xD;&#xA;  [2]: http://www.hindawi.com/journals/mpe/2010/934714.html&#xD;&#xA;  [3]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M1_intro.pdf&#xD;&#xA;  [4]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M10_HydroSW.pdf" />
  <row Id="12963" PostHistoryTypeId="2" PostId="6510" RevisionGUID="8ab8df64-80a7-4651-9bda-b2a60bbbcd46" CreationDate="2010-12-14T15:56:08.063" UserId="4004" Text="I faced the same question a few years ago and chose to do games development. I think there is a lot of confusion here on what a games development degree involves. For my course and most games courses the title is similar to &quot;Computing with games development&quot; which as the name suggests means you major in computer science and minor in games development. In my course this meant that 1 to two(max) modules a semester for games development. I did exactly the same degree as my friends in the &quot;Computing with software development&quot; and &quot;Computer Science&quot; courses with the exception of those one or two modules (usually is was only one games module).&#xD;&#xA;&#xD;&#xA;When we did our FYP's or other major projects I *had* to do a project relating to games development but the software development class could do anything software related including a games project and the computer science class could do ANYTHING computer related. So even if you choose to do CS it doesn't mean you can't continue to learn games development using what you know from CS.&#xD;&#xA;&#xD;&#xA;The reason the courses are designed like this is to give everyone regardless of course a good general degree in computing. I have met people in courses absolutely specific to games design and their employment opportunities are significantly reduced because of this. &#xD;&#xA;&#xD;&#xA;From my experience, because I didn't do a games intensive degree I wasn't ready to go straight from graduation to a games development job but I have been able to get a job as a software engineer, if I want to get into the games development industry I just need to get working on some side projects to build up a portfolio (honestly though, I would wager that with a bit of luck I could bag an entry level job at a games company). The experience of working at a software development company will help me get that first games job and in the mean time I'm learning a lot about general software development.&#xD;&#xA;&#xD;&#xA;My advice, if you choose to do a games course, make sure it isn't absolutely specific to games development, courses that will enable you to work in an industry other than just games will be much more beneficial." />
  <row Id="12964" PostHistoryTypeId="5" PostId="6510" RevisionGUID="18f2b3c1-d799-4f94-8455-f3cf64c010db" CreationDate="2010-12-14T16:04:52.410" UserId="4004" Comment="deleted 5 characters in body" Text="I faced the same question a few years ago and chose to do games development. I think there is a lot of confusion here on what a games development degree involves. For my course and most games courses the title is similar to &quot;Computing with games development&quot; which as the name suggests means you major in computer science and minor in games development. In my course this meant 1 to two(max) modules a semester for games development. I did exactly the same degree as my friends in the &quot;Computing with software development&quot; and &quot;Computer Science&quot; courses with the exception of those one or two modules (usually is was only one games module).&#xD;&#xA;&#xD;&#xA;When we did our FYP's or other major projects I *had* to do a project relating to games development but the software development class could do anything software related including a games project and the computer science class could do ANYTHING computer related. So even if you choose to do CS it doesn't mean you can't continue to learn games development using what you know from CS.&#xD;&#xA;&#xD;&#xA;The reason the courses are designed like this is to give everyone regardless of course a good general degree in computing. I have met people in courses absolutely specific to games design and their employment opportunities are significantly reduced because of this. &#xD;&#xA;&#xD;&#xA;From my experience, because I didn't do a games intensive degree I wasn't ready to go straight from graduation to a games development job but I have been able to get a job as a software engineer, if I want to get into the games development industry I just need to get working on some side projects to build up a portfolio (honestly though, I would wager that with a bit of luck I could bag an entry level job at a games company). The experience of working at a software development company will help me get that first games job and in the mean time I'm learning a lot about general software development.&#xD;&#xA;&#xD;&#xA;My advice, if you choose to do a games course, make sure it isn't absolutely specific to games development, courses that will enable you to work in an industry other than just games will be much more beneficial." />
  <row Id="12965" PostHistoryTypeId="2" PostId="6511" RevisionGUID="78278717-a395-42b0-be55-ef8ba41fc2bd" CreationDate="2010-12-14T16:09:53.190" UserId="1638" Text="Creating sprites or models is time consuming, adding animations just increases the time exponentially. Do what you can to create your game without any of the cool animations or fancy graphics. A cube or circle are awesome placeholders.&#xD;&#xA;&#xD;&#xA;Unity3d now has a store you can download lots of amazing free or cheap prototyping scripts/models/animations ($15 gets you a great prototype graphics set, and I've had a lot of fun with a free explosions kit)." />
  <row Id="12966" PostHistoryTypeId="2" PostId="6512" RevisionGUID="d253b820-bdc9-4eaa-839a-30a7c104fb16" CreationDate="2010-12-14T16:19:54.683" UserId="1143" Text="I can think of two ways this has been done:&#xD;&#xA;&#xD;&#xA;1. Brute force: just draw the scene&#xD;&#xA;2. Mode-X and panning registers. Draw the bit to be scrolled into view and adjust the panning registers to scroll the scene. You would need to redraw the top display area each frame, but that is less work to do than drawing the main play area. You wouldn't need to redraw the bottom area as there was a register in the hardware that would cause the video DACs to read from address 0 at a given scan line (so the bottom area would be at address 0 in video ram and the top would start after the bottom area)&lt;sup&gt;*&lt;/sup&gt;.&#xD;&#xA;&#xD;&#xA;I'd probably go with 1) as there's not much graphically going on, there may be some self-generated code to blit and clip images at the edges. One possible technique that a collegue of mine was working on back then was self-writing sprites, that is, the sprite data wasn't data, it was code. This meant there were no transparency checks and the data read of the blit was effectively free (this was on a 386 where each instruction was read and then decoded so instead of read code-&gt;read data-&gt;write data it was just read code-&gt;write data). It worked amazingly well - we got lots of huge sprites on multiple parallax layers running at 25fps+.&#xD;&#xA;&#xD;&#xA;But we are talking about Romero here and there's probably a bit of exageration going on about the techniques.&#xD;&#xA;&#xD;&#xA;* I did actually do this in my first major DOS game, and there's a bug in some hardware whereby the address reset happened a scanline too soon so you'd have a half-height pixel between the two sections." />
  <row Id="12967" PostHistoryTypeId="5" PostId="6501" RevisionGUID="8ab4e530-669f-407b-87df-d4ce604e82ed" CreationDate="2010-12-14T16:22:30.967" UserId="2091" Comment="added 133 characters in body" Text="I'd say 800x600.  Some netbooks have only 600 pixels tall screens (usually 1024x600), and among laptops widescreen configurations where the vertical height is absurdly limited are more and more common.&#xD;&#xA;&#xD;&#xA;Update: oh, I see that you added the &quot;only for desktops&quot; requirement.  Then my answer doesn't apply any more for this special case." />
  <row Id="12968" PostHistoryTypeId="5" PostId="6506" RevisionGUID="03296b54-13f7-4415-8563-6280a62cb900" CreationDate="2010-12-14T16:30:54.240" UserId="3830" Comment="added 70 characters in body" Text="Basically you're looking at modeling 6 things for a ship:  pitch, yaw, roll, heave, sway and surge.&#xD;&#xA; &#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Pitch, yaw and roll are rotations the ship can make as it goes up and down the slope of the waves, while heave, sway and surge are movements induced by the waves pushing the ship around.&#xD;&#xA;&#xD;&#xA;Essentially, imagine a boat on the water like a car driving over ground.  If the car drives over rolling hills (like a ship going over waves) it is going to tilt and angle as it goes up and down the hills.  This is the pitch, yaw and roll.  If the hills (waves) are big, the car (ship) will drive up and down, pitching, yawing and rolling as it goes.  If the hills (waves) are really small (smaller than the car/ship), then the car (ship) is just going to drive over them and not pitch, yaw or roll much.&#xD;&#xA;&#xD;&#xA;The size of a ship makes a difference.  A big ship can just plow through smaller waves, whereas a small ship will move up and down the waves.  Taking our car example, imagine someone riding a bicycle (small ship) over a set of small hills (waves).  They will roll up and down as they go.  Then someone drives a big truck (ship) over them.  The truck is bigger than the hills, so doesn't really pitch up and down as it goes over them.&#xD;&#xA;&#xD;&#xA;A ship however is part way into the water, so it's movements are going to be dampened somewhat.  Imagine a car with really soft spongey tires. When it drives over tiny hills, the spongey tires just smooth it out.  A ship's movements are also dampened, so little waves won't make it bounce up and down like a car on a rocky road.  A submarine is sort of the ultimate dampened ship, as when submerged it is pretty much immune to the surface waves.  But if it's on the surface it's going to be moved by the waves.&#xD;&#xA;&#xD;&#xA;A ship will also slide on waves.  A ship going down the face of a wave will surge forward for example.  So to extend our car example, make it a car with big spongey wheels driving on a somewhat slippery surface. Unless the car runs it's engine to compensate, it's going to slide down the side of a hill.&#xD;&#xA;&#xD;&#xA;Here are three articles that cover the science behind this, which might give you some insights.  Though heavy on the math and science, they could give you an idea of what the different factors are.&#xD;&#xA;&#xD;&#xA;Article 1: [Modeling of Ship Roll Dynamics and Its Coupling with Heave and Pitch][2]&#xD;&#xA;&#xD;&#xA;Article 2:  [Modelling and Simulation of Marine Surface Vessel Dynamics][3]&#xD;&#xA;&#xD;&#xA;Article 3:  [Modelling and Simulation of Marine Surface Vessel Dynamics][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/odMH9.gif&#xD;&#xA;  [2]: http://www.hindawi.com/journals/mpe/2010/934714.html&#xD;&#xA;  [3]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M1_intro.pdf&#xD;&#xA;  [4]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M10_HydroSW.pdf" />
  <row Id="12971" PostHistoryTypeId="5" PostId="6506" RevisionGUID="604a83ce-118e-401b-a1d7-e152ecc757ac" CreationDate="2010-12-14T17:31:32.417" UserId="3830" Comment="Reformatted, new text, new picture, headings." Text="Basically you're looking at modeling 6 things for a ship:  pitch, yaw, roll, heave, sway and surge.&#xD;&#xA; &#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Pitch, yaw and roll are rotations the ship can make as it twists and turns going up and down the slope of the waves.  Heave, sway and surge are movements induced by the waves pushing the ship around and/or the ship sliding down the face of a wave.&#xD;&#xA;&#xD;&#xA;**&quot;Like a Car Driving on Hills...&quot;**&#xD;&#xA;&#xD;&#xA;Imagine a boat on the water like a car driving over hilly ground.  If the car drives over rolling hills (like a ship going over waves) it is going to tilt and angle as it goes up and down the hills.  This is the pitch, yaw and roll.  If the hills (waves) are big, the car (ship) will drive up and down, pitching, yawing and rolling as it goes.  If the hills (waves) are really small (smaller than the car/ship), then the car (ship) is just going to drive over them and not pitch, yaw or roll much.&#xD;&#xA;&#xD;&#xA;A big ship can just plow through smaller waves, whereas a small ship will move up and down the waves.  Taking our car example, imagine someone riding a bicycle (small ship) over a set of small hills (waves).  They will roll up and down as they go.  Then someone drives a big truck (ship) over them.  The truck is bigger than the hills, so doesn't really pitch up and down as it goes over them.&#xD;&#xA;&#xD;&#xA;Unlike the car though, a ship is part way into the water, so it's movements are going to be dampened somewhat.  Imagine a car with really soft spongey tires. When it drives over tiny hills, the spongey tires just smooth it out.  A ship's movements are also dampened, so little waves won't make it bounce up and down like a car on a rocky road.  A submarine is sort of the ultimate dampened ship, as when submerged it is pretty much immune to the surface waves.  But if it's on the surface it's going to be moved by the waves.&#xD;&#xA;&#xD;&#xA;A ship will also slide on waves.  A ship going down the face of a wave will surge forward for example.  So to extend our car example, make it a car with big spongey wheels driving on a somewhat slippery surface. Unless the car is running the engine to compensate for the slip, it's going to slide down the side of a hill.  Even if it is running the engine, there is going to be some slip.&#xD;&#xA;&#xD;&#xA;The one place where the car and hill analogy has problems is the fact that the waves change shape over time.  A stationary ship will bob up and down as the waves go up and down.  &#xD;&#xA;&#xD;&#xA;**Waves Moving the Ship**&#xD;&#xA;&#xD;&#xA;If there is no wind blowing on the ship to move it along, and the waves are a perfect sine wave shape, then the ship basically won't move anywhere as it bobs in the waves.  It slides one way as it goes up the face of a wave, then slides back the other way as it goes down the back face of a wave.  &#xD;&#xA;&#xD;&#xA;However if the waves are NOT symetrical (like the picture below), then the waves are going to move the ship.  Because one side of the wave is steep, the ship is going to slide quickly down that face as well as be pushed by the face of the wave.  The gentle back slope of the wave however won't have much motion.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;This isn't the most perfect model of wave motion and shape affecting a ship's motion, but it will probably do for a rough simulation.&#xD;&#xA;&#xD;&#xA;**Wind Effects**&#xD;&#xA;&#xD;&#xA;Wind is also going to push your ship around in ways independent of the wave motion or ship motion.  The direction and force of the wind can be different than the direction and force of the waves.  &#xD;&#xA;&#xD;&#xA;**Capsizing**&#xD;&#xA;&#xD;&#xA;If the pitch, yaw and/or roll exceed some value, your ship is going to tip over.&#xD;&#xA;&#xD;&#xA;**Buoyancy**&#xD;&#xA;&#xD;&#xA;Buoyancy is how well your ship floats.  Very buoyant ships float up high in the water, and ones that aren't buoyant sink.  Neutrally buoyant ships (submarines) can basically &quot;hover&quot; at any point underwater, neither sinking nor rising.  If you want to simulate a ship sinking, make it become negatively buoyant and it will begin to sink.&#xD;&#xA;&#xD;&#xA;Buoyancy also affects dampening of the ship's motion.  A ship that is extremely buoyant will bob around on the water surface and be strongly affected by waves.  A ship that is less buoyant will be partially submerged and not be affected as much.  Think of the difference between a pingpong ball floating on the surface versus an apple, which floats but is partially underwater.  The pingpong ball bobs up and down with every wave motion.  The apple on the other hand doesn't respond to every wave detail.&#xD;&#xA;&#xD;&#xA;**Getting Sea Sick**&#xD;&#xA;&#xD;&#xA;A ship that is traveling parallel to the direction of wave motion is &quot;in the trough&quot;, and will produce the most nauseating effects at least in my experience :)  If you are traveling in the direction the waves are going, you can have a very smooth ride - like having the wind at your back.  If you are traveling in the opposite direction as the waves, you will have a pretty harsh ride as you are hitting each wave &quot;hill&quot; as it comes at you.  Makes for a pretty exciting ride though!&#xD;&#xA;&#xD;&#xA;**Further Reading**&#xD;&#xA;&#xD;&#xA;Here are three articles that cover the science behind this, which might give you some insights.  Though heavy on the math and science, they could give you an idea of what the different factors are.&#xD;&#xA;&#xD;&#xA;Article 1: [Modeling of Ship Roll Dynamics and Its Coupling with Heave and Pitch][3]&#xD;&#xA;&#xD;&#xA;Article 2:  [Modelling and Simulation of Marine Surface Vessel Dynamics][4]&#xD;&#xA;&#xD;&#xA;Article 3:  [Modelling and Simulation of Marine Surface Vessel Dynamics][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/odMH9.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Bz2oU.jpg&#xD;&#xA;  [3]: http://www.hindawi.com/journals/mpe/2010/934714.html&#xD;&#xA;  [4]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M1_intro.pdf&#xD;&#xA;  [5]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M10_HydroSW.pdf" />
  <row Id="12972" PostHistoryTypeId="2" PostId="6513" RevisionGUID="700b0fa3-ad24-4d43-970e-3101f4b9fac7" CreationDate="2010-12-14T17:34:22.040" UserId="20" Text="As the trend has been going towards 16:9 aspect-ratio, I'll probably target 1280x720 as minimum screen-size. Within a years timeframe, 800x600 should definitely be a thing of the past." />
  <row Id="12973" PostHistoryTypeId="2" PostId="6514" RevisionGUID="08d5e752-d1c9-4f67-b0c4-bbc1e93a47dd" CreationDate="2010-12-14T17:34:22.413" UserId="2998" Text="I have noticed that BoundingFrustum.Intersects() is a rather slow check in XNA. I am doing only 256 checks per frame and it eats up arround 50-60% of availible time when running at 60fps. This is kind of crazy. I would like to know if anyone else has experienced these types of performance problems with the BoundingFrustum class in XNA? Does anyone suggest I make my own boundingfrustum class/struct?  &#xD;&#xA;&#xD;&#xA;(One pitfall, when using the BoundingFrustum class, is declaring a new instance of it every frame... for some reason it is a class and not a struct. I am not doing this.)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="12974" PostHistoryTypeId="1" PostId="6514" RevisionGUID="08d5e752-d1c9-4f67-b0c4-bbc1e93a47dd" CreationDate="2010-12-14T17:34:22.413" UserId="2998" Text="BoundingFrustum Performance Issues" />
  <row Id="12975" PostHistoryTypeId="3" PostId="6514" RevisionGUID="08d5e752-d1c9-4f67-b0c4-bbc1e93a47dd" CreationDate="2010-12-14T17:34:22.413" UserId="2998" Text="&lt;xna&gt;&lt;collision-detection&gt;&lt;scene-graph&gt;&lt;culling&gt;" />
  <row Id="12976" PostHistoryTypeId="5" PostId="6506" RevisionGUID="1767985a-c925-482c-a88f-fe63c30ee6de" CreationDate="2010-12-14T17:37:30.760" UserId="3830" Comment="Added gratuitous picture of author on ship; added 108 characters in body" Text="Basically you're looking at modeling 6 things for a ship:  pitch, yaw, roll, heave, sway and surge.&#xD;&#xA; &#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Pitch, yaw and roll are rotations the ship can make as it twists and turns going up and down the slope of the waves.  Heave, sway and surge are movements induced by the waves pushing the ship around and/or the ship sliding down the face of a wave.&#xD;&#xA;&#xD;&#xA;**&quot;Like a Car Driving on Hills...&quot;**&#xD;&#xA;&#xD;&#xA;Imagine a boat on the water like a car driving over hilly ground.  If the car drives over rolling hills (like a ship going over waves) it is going to tilt and angle as it goes up and down the hills.  This is the pitch, yaw and roll.  If the hills (waves) are big, the car (ship) will drive up and down, pitching, yawing and rolling as it goes.  If the hills (waves) are really small (smaller than the car/ship), then the car (ship) is just going to drive over them and not pitch, yaw or roll much.&#xD;&#xA;&#xD;&#xA;A big ship can just plow through smaller waves, whereas a small ship will move up and down the waves.  Taking our car example, imagine someone riding a bicycle (small ship) over a set of small hills (waves).  They will roll up and down as they go.  Then someone drives a big truck (ship) over them.  The truck is bigger than the hills, so doesn't really pitch up and down as it goes over them.&#xD;&#xA;&#xD;&#xA;Unlike the car though, a ship is part way into the water, so it's movements are going to be dampened somewhat.  Imagine a car with really soft spongey tires. When it drives over tiny hills, the spongey tires just smooth it out.  A ship's movements are also dampened, so little waves won't make it bounce up and down like a car on a rocky road.  A submarine is sort of the ultimate dampened ship, as when submerged it is pretty much immune to the surface waves.  But if it's on the surface it's going to be moved by the waves.&#xD;&#xA;&#xD;&#xA;A ship will also slide on waves.  A ship going down the face of a wave will surge forward for example.  So to extend our car example, make it a car with big spongey wheels driving on a somewhat slippery surface. Unless the car is running the engine to compensate for the slip, it's going to slide down the side of a hill.  Even if it is running the engine, there is going to be some slip.&#xD;&#xA;&#xD;&#xA;The one place where the car and hill analogy has problems is the fact that the waves change shape over time.  A stationary ship will bob up and down as the waves go up and down.  &#xD;&#xA;&#xD;&#xA;**Waves Moving the Ship**&#xD;&#xA;&#xD;&#xA;If there is no wind blowing on the ship to move it along, and the waves are a perfect sine wave shape, then the ship basically won't move anywhere as it bobs in the waves.  It slides one way as it goes up the face of a wave, then slides back the other way as it goes down the back face of a wave.  &#xD;&#xA;&#xD;&#xA;However if the waves are NOT symetrical (like the picture below), then the waves are going to move the ship.  Because one side of the wave is steep, the ship is going to slide quickly down that face as well as be pushed by the face of the wave.  The gentle back slope of the wave however won't have much motion.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;This isn't the most perfect model of wave motion and shape affecting a ship's motion, but it will probably do for a rough simulation.&#xD;&#xA;&#xD;&#xA;**Wind Effects**&#xD;&#xA;&#xD;&#xA;Wind is also going to push your ship around in ways independent of the wave motion or ship motion.  The direction and force of the wind can be different than the direction and force of the waves.  &#xD;&#xA;&#xD;&#xA;**Buoyancy**&#xD;&#xA;&#xD;&#xA;Buoyancy is how well your ship floats.  Very buoyant ships float up high in the water, and ones that aren't buoyant sink.  Neutrally buoyant ships (submarines) can basically &quot;hover&quot; at any point underwater, neither sinking nor rising.  If you want to simulate a ship sinking, make it become negatively buoyant and it will begin to sink.&#xD;&#xA;&#xD;&#xA;Buoyancy also affects dampening of the ship's motion.  A ship that is extremely buoyant will bob around on the water surface and be strongly affected by waves.  A ship that is less buoyant will be partially submerged and not be affected as much.  Think of the difference between a pingpong ball floating on the surface versus an apple, which floats but is partially underwater.  The pingpong ball bobs up and down with every wave motion.  The apple on the other hand doesn't respond to every wave detail.&#xD;&#xA;&#xD;&#xA;**Capsizing**&#xD;&#xA;&#xD;&#xA;If the pitch, yaw and/or roll exceed some value, your ship is going to tip over.  When it tips over, it might fill with water, reducing the buoyancy, thus making it not float any more.&#xD;&#xA;&#xD;&#xA;**Getting Sea Sick :o~**&#xD;&#xA;&#xD;&#xA;A ship that is traveling parallel to the direction of wave motion is &quot;in the trough&quot;, and will produce the most nauseating effects at least in my experience :)  If you are traveling in the direction the waves are going, you can have a very smooth ride - like having the wind at your back.  If you are traveling in the opposite direction as the waves, you will have a pretty harsh ride as you are hitting each wave &quot;hill&quot; as it comes at you.  Makes for a pretty exciting ride though!&#xD;&#xA;&#xD;&#xA;**Further Reading**&#xD;&#xA;&#xD;&#xA;Here are three articles that cover the science behind this, which might give you some insights.  Though heavy on the math and science, they could give you an idea of what the different factors are.&#xD;&#xA;&#xD;&#xA;Article 1: [Modeling of Ship Roll Dynamics and Its Coupling with Heave and Pitch][3]&#xD;&#xA;&#xD;&#xA;Article 2:  [Modelling and Simulation of Marine Surface Vessel Dynamics][4]&#xD;&#xA;&#xD;&#xA;Article 3:  [Modelling and Simulation of Marine Surface Vessel Dynamics][5]&#xD;&#xA;&#xD;&#xA;**The Author Doing Field Research**&#xD;&#xA;&#xD;&#xA;Here's me about 15 years ago when I worked on research ships :)&#xD;&#xA;&#xD;&#xA;![alt text][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/odMH9.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Bz2oU.jpg&#xD;&#xA;  [3]: http://www.hindawi.com/journals/mpe/2010/934714.html&#xD;&#xA;  [4]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M1_intro.pdf&#xD;&#xA;  [5]: http://www.marinecontrol.org/pdf/Tutorial/CAMS_M10_HydroSW.pdf&#xD;&#xA;  [6]: http://i.stack.imgur.com/39x5A.jpg" />
  <row Id="12977" PostHistoryTypeId="2" PostId="6515" RevisionGUID="1a8f5048-9be2-4f84-a87e-6042c1a6ad3d" CreationDate="2010-12-14T17:54:48.127" UserId="3112" Text="How can I generate somewhat realistic sound effects for collisions in a physics engine that simulates lots of objects?&#xD;&#xA;&#xD;&#xA;E.g. take &gt;10 marbles that are bouncing off walls and off each other.&#xD;&#xA;&#xD;&#xA;If I generate a sound for each collision I would quickly overload the system (Windows Phone 7).&#xD;&#xA;&#xD;&#xA;Is there an algorithm that lets me combine multiple collisions to create fewer sound effect instances?&#xD;&#xA;" />
  <row Id="12978" PostHistoryTypeId="1" PostId="6515" RevisionGUID="1a8f5048-9be2-4f84-a87e-6042c1a6ad3d" CreationDate="2010-12-14T17:54:48.127" UserId="3112" Text="Handling sound effects for Multiple Collisions" />
  <row Id="12979" PostHistoryTypeId="3" PostId="6515" RevisionGUID="1a8f5048-9be2-4f84-a87e-6042c1a6ad3d" CreationDate="2010-12-14T17:54:48.127" UserId="3112" Text="&lt;performance&gt;&lt;sound&gt;&lt;xna-4.0&gt;&lt;windows-phone-7&gt;" />
  <row Id="12980" PostHistoryTypeId="2" PostId="6516" RevisionGUID="bf8a67d8-2c48-44b8-a983-0dfebc9e2870" CreationDate="2010-12-14T18:06:24.417" UserId="51" Text="Usually what you do in this case is let the sound system handle it.&#xD;&#xA;&#xD;&#xA;So somewhere there's a collision happening.  And where that collision happens you call a &quot;play bounce sound&quot; function.&#xD;&#xA;&#xD;&#xA;In pseudocode just change your sound class to do something like this&#xD;&#xA;&#xD;&#xA;    void Update()&#xD;&#xA;    {&#xD;&#xA;        timeSinceLastBounceSound += Time.deltaTime;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void PlayBounceSound()&#xD;&#xA;    {&#xD;&#xA;        if( timeSinceLastBounceSound &lt; someThreshold )&#xD;&#xA;            return;&#xD;&#xA;        &#xD;&#xA;        // do whatever you do to play the sound&#xD;&#xA;    }" />
  <row Id="12981" PostHistoryTypeId="2" PostId="6517" RevisionGUID="630cb11f-79c4-41b5-8ca5-bb22a6aa1204" CreationDate="2010-12-14T18:51:25.567" UserId="3995" Text="Trying to get this right in openGL:&#xD;&#xA;&#xD;&#xA;1) glRotate( cameraRotation )&#xD;&#xA;&#xD;&#xA;2) glTranslate( -cameraPosition )&#xD;&#xA;&#xD;&#xA;3) glRotate( objectRotation )&#xD;&#xA;&#xD;&#xA;4) glTranslate( objectPosition )&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;is that right?" />
  <row Id="12982" PostHistoryTypeId="1" PostId="6517" RevisionGUID="630cb11f-79c4-41b5-8ca5-bb22a6aa1204" CreationDate="2010-12-14T18:51:25.567" UserId="3995" Text="Correct order of rotation and translation" />
  <row Id="12983" PostHistoryTypeId="3" PostId="6517" RevisionGUID="630cb11f-79c4-41b5-8ca5-bb22a6aa1204" CreationDate="2010-12-14T18:51:25.567" UserId="3995" Text="&lt;3d&gt;&lt;opengl&gt;&lt;c&gt;" />
  <row Id="12984" PostHistoryTypeId="2" PostId="6518" RevisionGUID="6f1c285b-f3b4-4d9d-a804-c0d6d2b9b71b" CreationDate="2010-12-14T19:03:43.843" UserId="3971" Text="I'm in my last year of high school, and I've been looking at colleges. I'm taking a C++ class at a local community college and I don't feel that it's worth it. I could have learned everything in that class in a week.&#xD;&#xA;&#xD;&#xA;This had me thinking, would a CS degree even be worth it? How much can it teach me if I can learn everything on my own? Even if I do need to learn more advanced subjects, many colleges put their material online AND I can buy a book. Will companies hire me if I don't have a CS degree? If I have a portfolio will I stand a chance? What kind of things are needed in the portfolio?&#xD;&#xA;&#xD;&#xA;I want to live doing what I love - programming. So I will do it. I'm just not sure that a CS degree will do anything to me. In addition, if there is a benefit to getting a CS degree, what places are the best?" />
  <row Id="12985" PostHistoryTypeId="1" PostId="6518" RevisionGUID="6f1c285b-f3b4-4d9d-a804-c0d6d2b9b71b" CreationDate="2010-12-14T19:03:43.843" UserId="3971" Text="Making a Living Developing Games" />
  <row Id="12986" PostHistoryTypeId="3" PostId="6518" RevisionGUID="6f1c285b-f3b4-4d9d-a804-c0d6d2b9b71b" CreationDate="2010-12-14T19:03:43.843" UserId="3971" Text="&lt;education&gt;&lt;jobs&gt;&lt;computer-science&gt;" />
  <row Id="12987" PostHistoryTypeId="2" PostId="6519" RevisionGUID="fff36da5-30dd-48aa-a99b-39b011dc7adc" CreationDate="2010-12-14T19:20:28.917" UserId="2332" Text="It would help if this had some proper context to it. But the general rule of thumb as far as I am aware is this:&#xD;&#xA;&#xD;&#xA; - Scale &#xD;&#xA; - Rotate&#xD;&#xA; - Translate" />
  <row Id="12988" PostHistoryTypeId="2" PostId="6520" RevisionGUID="a26da839-3e49-417e-96ca-9e4a7d4f257a" CreationDate="2010-12-14T19:22:12.280" UserId="3051" Text="I'll answer it in a game-development context since your title seems to indicate that's where you're going with the question.&#xD;&#xA;Would a CS degree be useful for game development programming?  Yes.  I don't know how much you can teach yourself but if you could teach yourself that well, you'd already know and wouldn't be asking here.&#xD;&#xA;&#xD;&#xA;I'm working on a masters degree in computing and video game development (where I work directly with professionals who work in game development) and the experience I got with the traditional CS undergrad classes has been invaluable.&#xD;&#xA;&#xD;&#xA;I have a friend who has gotten a number of programming jobs without a college degree but he's the type of person who creates compilers and interpreters for computer languages he creates for fun.  Unless you're that hardcore, you'll almost certainly need a degree." />
  <row Id="12989" PostHistoryTypeId="5" PostId="6517" RevisionGUID="e619c329-ca68-4781-ab0d-9680f9285afc" CreationDate="2010-12-14T19:25:40.077" UserId="3995" Comment="added 18 characters in body" Text="Trying to get this right in openGL:&#xD;&#xA;&#xD;&#xA;1) glRotate( cameraRotation )&#xD;&#xA;&#xD;&#xA;2) glTranslate( -cameraPosition )&#xD;&#xA;&#xD;&#xA;3) glRotate( objectRotation )&#xD;&#xA;&#xD;&#xA;4) glTranslate( objectPosition )&#xD;&#xA;&#xD;&#xA;5) Draw Object&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;is that right?" />
  <row Id="12990" PostHistoryTypeId="2" PostId="6521" RevisionGUID="d67b79fb-bbef-4d12-9318-8eb2a8cbbd0f" CreationDate="2010-12-14T19:43:52.080" UserId="51" Text="I'm going to point you to my answer on the game dev degree vs. computer science degree question: http://gamedev.stackexchange.com/questions/1611/game-development-degree-vs-computer-science-degree/1612#1612&#xD;&#xA;&#xD;&#xA;A CS degree is more than just learning how to program.  And working with a team making games is a lot more than just programming.  " />
  <row Id="12991" PostHistoryTypeId="2" PostId="6522" RevisionGUID="c78ab069-c780-4064-af8d-260dabc5d805" CreationDate="2010-12-14T20:27:25.457" UserId="4009" Text="I've just realeased my first game developed for the iPhone using AS3 and the iPhone Packager http://itunes.apple.com/us/app/snapshot-paintball/id407362440?mt=8&amp;uo=4 &#xD;&#xA;&#xD;&#xA;I want to take the game to the next level but I am not using the native iPhone SDK so I need some other ideas, I am fresh to iPhone development and it's hard to find good resources, any AS3 developers out there willing to share some links? Highscore frameworks and best practices, connecting to Facebook, ui classes/gestures. Thanks." />
  <row Id="12992" PostHistoryTypeId="1" PostId="6522" RevisionGUID="c78ab069-c780-4064-af8d-260dabc5d805" CreationDate="2010-12-14T20:27:25.457" UserId="4009" Text="iPhone development using AS3 (Resources)" />
  <row Id="12993" PostHistoryTypeId="3" PostId="6522" RevisionGUID="c78ab069-c780-4064-af8d-260dabc5d805" CreationDate="2010-12-14T20:27:25.457" UserId="4009" Text="&lt;iphone&gt;&lt;actionscript-3&gt;" />
  <row Id="12994" PostHistoryTypeId="2" PostId="6523" RevisionGUID="d9dd1b23-ffa1-4bba-b120-0fe40cb2a3a6" CreationDate="2010-12-14T20:31:39.337" UserId="3830" Text="You could create a new sound that is a sort of &quot;many marbles hitting at once&quot; sound, then play it if there are more than 10 active collisions at once.  Play any individual collision under 10, and then the &quot;many marbles&quot; sound if there are more than 10.  &#xD;&#xA;&#xD;&#xA;Think of it like simulating a crowd applauding.  At some point it just sounds like a crowd applauding, not a collection of individual claps." />
  <row Id="12995" PostHistoryTypeId="2" PostId="6524" RevisionGUID="a003fe9e-686c-406e-9105-3aeea316a537" CreationDate="2010-12-14T21:36:36.637" UserId="450" Text="I am looking for a lightweight javascript library that allows the server to push update information to the client reliably and regularly. We use a fixed turn time of 300ms and often there are only about 20 bytes of changes. So doing polling using XMLHttpRequest would imply a huge overhead (3-way tcp handshake, http request headers, http response header).&#xD;&#xA;&#xD;&#xA;There area number of alternatives, but they have limited browser support:&#xD;&#xA;&#xD;&#xA; - streaming &amp;lt;script&amp;gt;-tags in another frame (does this work on IE?)&#xD;&#xA; - MIME multipart/x-mixed-replace responses (Firefox, Safari, Opera only?)&#xD;&#xA; - [WebSockets][1] (removed from recent beta version of Firefox and announced to be removed from Opera 11 because of [security issues][2])&#xD;&#xA; - [Server-sent events][3] (only Opera?)&#xD;&#xA; - Java / Flash relays (requires the users to have those plugins installed)&#xD;&#xA; - Polling using XMLHttpRequest (huge overhead)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is there a website which has *recent* information on which technology works in which browser?  Are there javascript libraries which provide a common cross browser interface that hides the messy details? (Yes, i know that it still requires me to write multiple server sides, but that is rather easy. And more important it is easy to write automatic tests for the server sides).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03&#xD;&#xA;  [2]: http://www.heise.de/security/meldung/WebSockets-in-Firefox-4-wegen-Luecke-im-Protokolldesign-deaktiviert-Update-1150157.html&#xD;&#xA;  [3]: http://dev.w3.org/html5/eventsource/" />
  <row Id="12996" PostHistoryTypeId="1" PostId="6524" RevisionGUID="a003fe9e-686c-406e-9105-3aeea316a537" CreationDate="2010-12-14T21:36:36.637" UserId="450" Text="Lightwight cross browser library for server side push?" />
  <row Id="12997" PostHistoryTypeId="3" PostId="6524" RevisionGUID="a003fe9e-686c-406e-9105-3aeea316a537" CreationDate="2010-12-14T21:36:36.637" UserId="450" Text="&lt;network&gt;&lt;html5&gt;&lt;server-push&gt;" />
  <row Id="12998" PostHistoryTypeId="2" PostId="6525" RevisionGUID="9cbf4769-b5f0-4f9b-9fd2-dc574961aa52" CreationDate="2010-12-14T21:49:21.403" UserId="4010" Text="Can you use the XNA framework to write games for XBox Live Arcade that require Rock Band or Guitar Hero instruments?" />
  <row Id="12999" PostHistoryTypeId="1" PostId="6525" RevisionGUID="9cbf4769-b5f0-4f9b-9fd2-dc574961aa52" CreationDate="2010-12-14T21:49:21.403" UserId="4010" Text="Can you write games for Rock Band or Guitar Hero controllers in XNA?" />
  <row Id="13000" PostHistoryTypeId="3" PostId="6525" RevisionGUID="9cbf4769-b5f0-4f9b-9fd2-dc574961aa52" CreationDate="2010-12-14T21:49:21.403" UserId="4010" Text="&lt;xna&gt;&lt;xbox360&gt;" />
  <row Id="13001" PostHistoryTypeId="2" PostId="6526" RevisionGUID="42fc3323-d23a-49d3-863f-f52d1f353753" CreationDate="2010-12-14T22:01:35.403" UserId="4011" Text="You should look at socket.io&#xD;&#xA;&#xD;&#xA;http://socket.io/&#xD;&#xA;&#xD;&#xA;It combines almost all the technologies you describe in a consistent API" />
  <row Id="13002" PostHistoryTypeId="2" PostId="6527" RevisionGUID="5c9199f5-39f5-4e7a-86d9-ee6c7364e792" CreationDate="2010-12-14T22:03:49.957" UserId="154" Text="Steam details: http://store.steampowered.com/hwsurvey&#xD;&#xA;&#xD;&#xA;    Resolution   %Users&#xD;&#xA;    1024 x 768   7.47%&#xD;&#xA;    1152 x 864   1.41%&#xD;&#xA;    1280 x 720   0.72%&#xD;&#xA;    1280 x 768   0.72%&#xD;&#xA;    1280 x 800   5.88%&#xD;&#xA;    1280 x 960   1.21%&#xD;&#xA;    1280 x 1024  15.13%&#xD;&#xA;    1360 x 768   1.34%&#xD;&#xA;    1366 x 768   6.27%&#xD;&#xA;    1440 x 900   10.14%&#xD;&#xA;    1600 x 900   3.63%&#xD;&#xA;    1600 x 1200  0.94%&#xD;&#xA;    1680 x 1050  18.46%&#xD;&#xA;    1920 x 1080  15.72%&#xD;&#xA;    1920 x 1200  6.71%&#xD;&#xA;    Other        4.26% " />
  <row Id="13003" PostHistoryTypeId="2" PostId="6528" RevisionGUID="94c35f86-e6ed-444c-909b-fdd48f25d0cf" CreationDate="2010-12-14T22:11:53.133" UserId="4012" Text="Anyone have any idea how the scaling is accomplished in angry birds?  I want to make sure my images/background always scale to match the screensize and this game seems to have a similar effect.  I have been playing with the manifest settings lot on setting preferred screen sizes but I have yet to duplicate exactly what I want.&#xD;&#xA;&#xD;&#xA;Are there any effective ways to make sure your game will always display X Y space, scaling down as needed depending on the pixel size?&#xD;&#xA;&#xD;&#xA;I want to make sure everything is always displayed on the screen for all devices and not cut things off on small devices or add black space on large devices.&#xD;&#xA;&#xD;&#xA;I am calculating my drawing space by getting the size of the view and using this as bounds for my sprites but it doesn't seem to be working too well." />
  <row Id="13004" PostHistoryTypeId="1" PostId="6528" RevisionGUID="94c35f86-e6ed-444c-909b-fdd48f25d0cf" CreationDate="2010-12-14T22:11:53.133" UserId="4012" Text="Android: Angry Birds Scaling" />
  <row Id="13005" PostHistoryTypeId="3" PostId="6528" RevisionGUID="94c35f86-e6ed-444c-909b-fdd48f25d0cf" CreationDate="2010-12-14T22:11:53.133" UserId="4012" Text="&lt;android&gt;&lt;resolution&gt;" />
  <row Id="13006" PostHistoryTypeId="2" PostId="6529" RevisionGUID="1eeb4706-8187-47f4-9987-f3defbde496a" CreationDate="2010-12-14T22:17:10.237" UserId="982" Text="According to this site ([http://blogs.msdn.com/b/dawate/archive/2008/02/05/building-a-3d-game-in-xna-from-scratch-free-video-tutorial-series-now-available.aspx][1]), the Guitar Hero buttons map directly to the standard control on an Xbox 360 controller. Here's what it says (has a video and everything):&#xD;&#xA;&#xD;&#xA;    10. Determining What's What On The Guitar Controller&#xD;&#xA;    The controller for Guitar Hero games maps directly to controls on a standard Xbox 360 controller, but It's not immediately obvious what exactly the whammy bar, strum bar, and orange button do. Rather than go hunt for documentation, we can find out by experimentation in less than 5 minutes.  &#xD;&#xA;    Download WMV (4:45, 14.5 MB) &#xD;&#xA;&#xD;&#xA;I haven't watched it, but I have seen other games that used a Guitar Hero controller in XNA. Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/dawate/archive/2008/02/05/building-a-3d-game-in-xna-from-scratch-free-video-tutorial-series-now-available.aspx" />
  <row Id="13007" PostHistoryTypeId="2" PostId="6530" RevisionGUID="503286e2-44b2-4196-8094-75018b67fd55" CreationDate="2010-12-14T22:19:13.233" UserId="154" Text="The short answer is yes-ish. The controllers for the most part just send standard button inputs which is why they can be used in the dashboard. More recent stuff like the Pro Guitar for Rockband3 probably aren't accessible with XNA, but the standard controllers sure.&#xD;&#xA;&#xD;&#xA;You should be able to use [this older utility][1] to see what maps to what on the controller&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/utility/input_reporter" />
  <row Id="13008" PostHistoryTypeId="5" PostId="6529" RevisionGUID="a0c84953-5bfa-4808-bee5-6abf698b165e" CreationDate="2010-12-14T22:28:19.113" UserId="982" Comment="fixing me quotes" Text="According to this site ([http://blogs.msdn.com/b/dawate/archive/2008/02/05/building-a-3d-game-in-xna-from-scratch-free-video-tutorial-series-now-available.aspx][1]), the Guitar Hero buttons map directly to the standard control on an Xbox 360 controller. Here's what it says (has a video and everything):&#xD;&#xA;&#xD;&#xA;&gt;  10). Determining What's What On The Guitar Controller&#xD;&#xA;&gt; The controller for Guitar Hero games maps directly to controls on a&#xD;&#xA;&gt; standard Xbox 360 controller, but It's&#xD;&#xA;&gt; not immediately obvious what exactly&#xD;&#xA;&gt; the whammy bar, strum bar, and orange&#xD;&#xA;&gt; button do. Rather than go hunt for&#xD;&#xA;&gt; documentation, we can find out by&#xD;&#xA;&gt; experimentation in less than 5&#xD;&#xA;&gt; minutes.  &#xD;&#xA;&gt; Download WMV (4:45, 14.5 MB)&#xD;&#xA;&#xD;&#xA;I haven't watched it, but I have seen other games that used a Guitar Hero controller in XNA. Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/dawate/archive/2008/02/05/building-a-3d-game-in-xna-from-scratch-free-video-tutorial-series-now-available.aspx" />
  <row Id="13009" PostHistoryTypeId="2" PostId="6531" RevisionGUID="0a9802e1-337e-49d2-a08c-7969d5d0796b" CreationDate="2010-12-14T22:37:31.750" UserId="3325" Text="1. Use [vector graphics][1].  Vectors are not defined by points in space (i.e. individual pixels), they are defined by mathematical relationships, and easily adapt to smaller or larger views.&#xD;&#xA; &#xD;&#xA;2. It's impossible to display the exact same image on a 4:3 ratio screen and a 16:9 ratio screen, for example, without compressing or stretching the image.  Thus you will have to cut off things on 4:3 devices that would be displayed on widescreen 16:9 devices.  This is not a bad thing in a game like Angry Birds where the user can pan to see what's missing.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Vector_graphics" />
  <row Id="13010" PostHistoryTypeId="2" PostId="6532" RevisionGUID="84f37d2f-89f0-4a9e-8925-ed688b1cf968" CreationDate="2010-12-14T22:38:02.017" UserId="3830" Text="Check out the Mochi Media [Scores API][1] as a general purpose leaderboard system.  If you could get the list of friend IDs from Facebook you might be able to leverage it to create one.&#xD;&#xA;&#xD;&#xA;**DIY**&#xD;&#xA;&#xD;&#xA;You probably already know how to do this yourself, but if you wanted to implement it, you could do something like this...&#xD;&#xA;&#xD;&#xA;First, create a database of scores, where each row has player's Facebook ID, score and date/time of score.  Every time someone plays your game, record the score along with their Facebook ID and the current date/time. &#xD;&#xA;&#xD;&#xA;To generate a friends scores leaderboard for someone, query Facebook for a list of the person's friends, specifically their IDs.  Then query your scores database for entries matching the given IDs.  Generate the leaderboard you want.&#xD;&#xA;&#xD;&#xA;  [1]: https://en.mochimedia.com/support/dev_docs#MochiScores" />
  <row Id="13011" PostHistoryTypeId="2" PostId="6533" RevisionGUID="0b4824d4-9352-44d6-80f5-ea4ffdd15143" CreationDate="2010-12-14T22:41:38.520" UserId="4013" Text="I am thinking about a new game idea for the iPhone and presumably all the levels would have to be made programatically. So Im wondering what the best method to approach it?&#xD;&#xA;&#xD;&#xA;Say I have a game with a standard typical 2d, top down maze. Thise maze is simply made up of walls, multiple rectangles on screen, making paths.&#xD;&#xA;&#xD;&#xA;Do I have to manually work out the position of every rectangle and put it in with an x and y position or is there a better way? I see this taking, forever, there must be certain ways developers approach these situations to get by them efficiently and quickly surely?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="13012" PostHistoryTypeId="1" PostId="6533" RevisionGUID="0b4824d4-9352-44d6-80f5-ea4ffdd15143" CreationDate="2010-12-14T22:41:38.520" UserId="4013" Text="Creating Level iPhone" />
  <row Id="13013" PostHistoryTypeId="3" PostId="6533" RevisionGUID="0b4824d4-9352-44d6-80f5-ea4ffdd15143" CreationDate="2010-12-14T22:41:38.520" UserId="4013" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;design-patterns&gt;&lt;level-design&gt;" />
  <row Id="13014" PostHistoryTypeId="2" PostId="6534" RevisionGUID="18d57ac5-79a6-499d-8047-bf8fb2a501fb" CreationDate="2010-12-15T00:31:24.337" UserId="3505" Text="For such a job I figure you'll get away with drawing the maze using a paint program and have a piece of code turning the image into a what data you need. Of course, if you just need a maze you could just write a maze generator, with the added benefit of being able to make random mazes on the fly. There is some interesting talk on the subject here: http://gamedev.stackexchange.com/questions/5852/reduce-the-number-of-edges-of-a-graph-keeping-it-connected/" />
  <row Id="13015" PostHistoryTypeId="5" PostId="6424" RevisionGUID="7729764a-670d-4271-8ad6-5c931483d48e" CreationDate="2010-12-15T00:40:22.257" UserId="3405" Comment="added 6 characters in body" Text="i converted the psuedo-code into C#:&#xD;&#xA;&#xD;&#xA;    void Update() &#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;       directionModifier = Input.GetAxis(&quot;Horizontal&quot;);&#xD;&#xA;      &#xD;&#xA;    &#xD;&#xA;       shipRotationAngle += ( shipRotationSpeed * directionModifier ) * Time.deltaTime;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       thrustModifier = Input.GetAxis(&quot;Vertical&quot;);&#xD;&#xA;    &#xD;&#xA;       accelerationModifier = ( ( shipBaseAcceleration * thrustModifier ) ) * Time.deltaTime;&#xD;&#xA;    &#xD;&#xA;       directionVector = new Vector2( Math.Cos(shipRotationAngle ), Math.Sin(shipRotationAngle) );&#xD;&#xA;       accelerationVector = new Vector2( directionVector.x * accelerationModifier, directionVector.y * accelerationModifier );&#xD;&#xA;    &#xD;&#xA;       // Set friction based on how &quot;floaty&quot; controls you want&#xD;&#xA;       frictionVector = -directionVector * shipFriction;&#xD;&#xA;    &#xD;&#xA;       shipSpeedVector += accelerationVector;&#xD;&#xA;    &#xD;&#xA;       // APPLY friction vector to shipSpeedVector&#xD;&#xA;       // Make sure that friction vector doesn't speed to go in the opposite of the &#xD;&#xA;       // original direction. Otherwise your ship will go backwards instead of stop.&#xD;&#xA;    &#xD;&#xA;       //IMPORTANT: (I'm too lazy to add code here) Cap speedvector to a maximum speed.&#xD;&#xA;       //Remember to cap total speed, not just X and Y components of the speedVector &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       shipPositionVector += shipSpeedVector;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If there is something wrong with this, please leave a comment.&#xD;&#xA;&#xD;&#xA;Thanks to Nailer for providing psuedo-code" />
  <row Id="13016" PostHistoryTypeId="2" PostId="6535" RevisionGUID="f33ad90e-1225-48fc-8c76-5103bdaee5a8" CreationDate="2010-12-15T01:24:26.113" UserDisplayName="the hog" Text="Can you not use GPU Render to Texture &amp; double-buffer your results so you always have computed lighting information available to read-back each frame?&#xD;&#xA;&#xD;&#xA;How you'd organise this data for lighting is entirely up to you but I don't see why this shouldn't be the first option for investigation if all you're looking to do is improve the speed of your lighting algorithm..?" />
  <row Id="13017" PostHistoryTypeId="6" PostId="6533" RevisionGUID="965c5bda-512a-42e1-a573-3f1dd00aad20" CreationDate="2010-12-15T02:19:21.540" UserId="3830" Comment="edited tags" Text="&lt;game-design&gt;&lt;design-patterns&gt;&lt;level-design&gt;" />
  <row Id="13018" PostHistoryTypeId="2" PostId="6536" RevisionGUID="412a6999-9d8e-4eba-97d3-a3385e9c14e7" CreationDate="2010-12-15T02:36:43.490" UserId="3501" Text="I'm developing a 2d game that requires sprite based animations. I was thinking about which is the most convenient way to manage many of these sprites all together with timings.&#xD;&#xA;&#xD;&#xA;I alredy know how they should be managed by principle but I was looking for a possibly object-oriented way to manage them all. The easy part is that I shouldn't care about which specific sprite of an animation is shown related to a position or movement of the object itself, they're just static (as far as I can tell).&#xD;&#xA;&#xD;&#xA;I'm using Java + Processing to handle the drawings..&#xD;&#xA;&#xD;&#xA;any suggestion?&#xD;&#xA;&#xD;&#xA;thanks" />
  <row Id="13019" PostHistoryTypeId="1" PostId="6536" RevisionGUID="412a6999-9d8e-4eba-97d3-a3385e9c14e7" CreationDate="2010-12-15T02:36:43.490" UserId="3501" Text="Managing animations" />
  <row Id="13020" PostHistoryTypeId="3" PostId="6536" RevisionGUID="412a6999-9d8e-4eba-97d3-a3385e9c14e7" CreationDate="2010-12-15T02:36:43.490" UserId="3501" Text="&lt;2d&gt;&lt;java&gt;&lt;animation&gt;&lt;sprites&gt;" />
  <row Id="13021" PostHistoryTypeId="2" PostId="6537" RevisionGUID="1fae6277-773c-4d3a-a6e7-3851f1e4069f" CreationDate="2010-12-15T03:19:03.693" UserId="3505" Text="For each animation set a period as a number of frames, and make a mapping from the frames of that period to their respective images.&#xD;&#xA;&#xD;&#xA;Your render function should have a counter associated, for each frame rendered increment the counter, and for each animation choose the frame to draw as counter modulus period." />
  <row Id="13022" PostHistoryTypeId="2" PostId="6538" RevisionGUID="9e7b7c48-bcc6-4535-9df0-d67447e47817" CreationDate="2010-12-15T04:30:13.503" UserId="1954" Text="The XNA documentation includes an article that lists how various alternate 360 controllers map to the gamepad buttons and triggers: [Using Alternative Input Devices (Xbox 360)](http://msdn.microsoft.com/en-us/library/dd254801.aspx).&#xD;&#xA;&#xD;&#xA;Also, despite the article title, the information applies to PC as well, since those alternate controllers will still appear as the gamepad under XInput on Windows (and therefore to XNA)." />
  <row Id="13023" PostHistoryTypeId="2" PostId="6539" RevisionGUID="2a030251-a4a8-4b4f-8bb5-ab8c2835834a" CreationDate="2010-12-15T04:43:02.457" UserId="3656" Text="When I write 2d games, I tend to set it up like this:&#xD;&#xA;&#xD;&#xA;    class Sprite:&#xD;&#xA;        has a Vector2 for position&#xD;&#xA;        has a Collection (Array or Hashmap) of Viewers/Renderers (each could be a static image or an Animation that encapsulates spritesheet functionality)&#xD;&#xA;        has a reference to the current Viewer/Renderer to update and draw&#xD;&#xA;        has a State management system&#xD;&#xA;        has whatever other properties you need (possibly bools for horizontal and vertical flipping)&#xD;&#xA;&#xD;&#xA;The state management system can be a FSM pattern, or a simple enum and switch statement. Its purpose is to point the current Viewer/Renderer reference to the appropriate one from the collection based on the sprite's state&#xD;&#xA;&#xD;&#xA;I'm not familiar with Processing, so I can't much on the details of the Viewer/Renderer interface/abstract class and the static image vs sprite sheet implementations.&#xD;&#xA;&#xD;&#xA;Check out [Brandon Furtwangler's blog][1], it's C# and XNA, but he shows off his really solid architecture for managing sprites. His animation system is also really cool, and although it uses lambdas, you may be able to achieve similar effects with anonymous methods in Java with only slightly more verbosity.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/brandf/archive/2010/02/18/using-retained-sprites-zoomengine-graphics-and-zoomengine-animation-part-3.aspx" />
  <row Id="13024" PostHistoryTypeId="5" PostId="6536" RevisionGUID="728cebcf-c3b6-40d0-8e2b-6b50c0dc86c3" CreationDate="2010-12-15T05:19:54.990" UserId="51" Comment="deleted 16 characters in body" Text="I'm developing a 2d game that requires sprite based animations. I was thinking about which is the most convenient way to manage many of these sprites all together with timings.&#xD;&#xA;&#xD;&#xA;I already know how they should be managed by principle but I was looking for a possibly object-oriented way to manage them all. The easy part is that I shouldn't care about which specific sprite of an animation is shown related to a position or movement of the object itself, they're just static (as far as I can tell).&#xD;&#xA;&#xD;&#xA;I'm using Java + Processing to handle the drawing.&#xD;&#xA;&#xD;&#xA;Any suggestions?&#xD;&#xA;" />
  <row Id="13025" PostHistoryTypeId="2" PostId="6540" RevisionGUID="88fa16cb-1e4c-4a0e-a061-f5ea02b1c529" CreationDate="2010-12-15T08:28:30.437" UserId="1113" Text="Are you saying you want to *generate* the levels, or do you want to create them &quot;by hand&quot; in code (world.addRectangle(10,10,100,20)etc)? If you want to generate the levels procedurally, look inte [algorithms for maze construction][1] and adapt them to your needs.&#xD;&#xA;&#xD;&#xA;If you want to construct the levels yourself, you can place the data in a separate file and parse it. Can be as simple as rectangles in a csv file, or xml. (Or svg, in which case it would be a small step to creating the levels in a program like Inkscape. But then you'd need to use or write an svg parser.)&#xD;&#xA;&#xD;&#xA;Some languages (Lua for example) make it really simple to read data from files and turn them into data structures. Since you're writing a game for the iPhone, you can play with creating your levels using a plist. You can read them into a data object with one method invocation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Maze_generation_algorithm" />
  <row Id="13027" PostHistoryTypeId="2" PostId="6542" RevisionGUID="24ddc404-71fb-4966-a33f-cc2fb5fa3878" CreationDate="2010-12-15T10:28:50.670" UserId="1742" Text="Because a camera is usually the inverse (because the position and rotation of the camera are applied inverse to the scene to bring the scene into the camera's space) the order of the transforms is a little odd.&#xD;&#xA;&#xD;&#xA;it's more like:&#xD;&#xA;&#xD;&#xA;    glRotate( objectR ),&#xD;&#xA;    glTranslate( objectP ),&#xD;&#xA;    glTranslate( -cameraP );&#xD;&#xA;    glRotate( -cameraR );&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13028" PostHistoryTypeId="2" PostId="6543" RevisionGUID="0714d96d-a1c8-42ca-92f5-a30be04490da" CreationDate="2010-12-15T11:39:11.130" UserId="1091" Text="You're right about having the camera applied first and then the object transform, because this allows the usage of pushing and popping matrix states between objects.&#xD;&#xA;&#xD;&#xA;Aside from that there is no &quot;correct&quot; order, other than a basic assumption that the transforms will be applied in the reverse order to which you call the matrix functions.&#xD;&#xA;&#xD;&#xA;So if for example you do:&#xD;&#xA;&#xD;&#xA;    glRotate(Camera_Rotation)&#xD;&#xA;    glTranslate(Camera_Position)&#xD;&#xA;    (optional push)&#xD;&#xA;    glTranslate(Object_Position)&#xD;&#xA;    glRotate(Object_Rotation)&#xD;&#xA;    glScale(Object_Scale)&#xD;&#xA;&#xD;&#xA;The result will be that the object's vertices will first be scaled (along the local XYZ axes), then rotated (around the local origin), and then translated into &quot;world&quot; space. Then the world-space co-ordinates will be translated such that the camera is at the origin, and finally everything will be rotated around to the correct view direction. This is probably what you want for a basic scene.&#xD;&#xA;&#xD;&#xA;As Richard Fabian says, you generally want to consider the camera transforms as an inverse, though you might equally replace the camera transforms with a lookAt() function or similar, to directly construct an appropriate view matrix.&#xD;&#xA;&#xD;&#xA;If you push the matrix stack after setting up the camera, you can pop/push for each object without having to set the camera up again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13029" PostHistoryTypeId="2" PostId="6544" RevisionGUID="ec5bd26c-fb0c-4af7-b984-a5b60957ad92" CreationDate="2010-12-15T14:29:16.530" UserId="3556" Text="Are there any good references/books to recommend about how to build a turn-base game server? It's something like a chess server for pairing chess players and keep game states. In the past, for example the IGS (for go, weiqi) is a socket based implementation. What are the available contemporary technologies to learn from? Thanks!" />
  <row Id="13030" PostHistoryTypeId="1" PostId="6544" RevisionGUID="ec5bd26c-fb0c-4af7-b984-a5b60957ad92" CreationDate="2010-12-15T14:29:16.530" UserId="3556" Text="Turn-based board game server references?" />
  <row Id="13031" PostHistoryTypeId="3" PostId="6544" RevisionGUID="ec5bd26c-fb0c-4af7-b984-a5b60957ad92" CreationDate="2010-12-15T14:29:16.530" UserId="3556" Text="&lt;game-design&gt;&lt;network&gt;&lt;server&gt;" />
  <row Id="13032" PostHistoryTypeId="2" PostId="6545" RevisionGUID="1567faea-30a4-497c-8e71-e71b4d5d53ec" CreationDate="2010-12-15T15:06:02.317" UserId="2943" Text="I'm creating a first person boxing game in Opengl as a school project and I want textures and models to apply to it. A look like Wii Sport's Boxing is what I'm aiming for. " />
  <row Id="13033" PostHistoryTypeId="1" PostId="6545" RevisionGUID="1567faea-30a4-497c-8e71-e71b4d5d53ec" CreationDate="2010-12-15T15:06:02.317" UserId="2943" Text="Where can I find free md2 models and .obj objects for a boxing game?" />
  <row Id="13034" PostHistoryTypeId="3" PostId="6545" RevisionGUID="1567faea-30a4-497c-8e71-e71b4d5d53ec" CreationDate="2010-12-15T15:06:02.317" UserId="2943" Text="&lt;models&gt;" />
  <row Id="13035" PostHistoryTypeId="5" PostId="6545" RevisionGUID="c8a14ee1-5a39-4e7c-b14b-7affb8482488" CreationDate="2010-12-15T15:16:04.510" UserId="2943" Comment="added 132 characters in body" Text="I'm creating a first person boxing game in Opengl as a school project and I want textures and models to apply to it. A look like Wii Sport's Boxing is what I'm aiming for. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something like [this][1] (but, you know, **free**) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com/3d-models/boxing-arena-3d-c4d/413889" />
  <row Id="13036" PostHistoryTypeId="2" PostId="6546" RevisionGUID="9b30dac6-ed7f-431f-bc5c-b2bc3c5afbc1" CreationDate="2010-12-15T16:11:22.630" UserId="1156" Text="I'm confused as to your use of 'programatically'. Do you mean procedurally, that is generate-as-you-go, or in the code, hardcoded? I'm pretty sure you don't need that in iPhone games - how would they have the images?  &#xD;&#xA;&#xD;&#xA;So instead of having to hardcode the coordinates, you want to save the effort and use an editor. [A question on 2D level editors.][1]&#xD;&#xA;&#xD;&#xA;I would use a level editor, or just put it in a data file. Literally something like:  &#xD;&#xA;&#xD;&#xA;    01001110  &#xD;&#xA;    01101010&#xD;&#xA;    00001001&#xD;&#xA;&#xD;&#xA;It would be quicker than the rectangles definitely, but not as good as a level editor - which would be simple to make or use an existing one, and would generate similar output.&#xD;&#xA;&#xD;&#xA;What I'm suggesting is to stop thinking about rectangles and start thinking about **walkable** and **unwalkable** tiles. Your walls would obviously be unwalkable, and the floor walkable. You would have a graphic (or just a black square drawn) where a wall is, and you would use those tile coordinates as the collision boundary. Lots of tiles = a wall.&#xD;&#xA;&#xD;&#xA;Even if you do mean procedurally - which is not a limitation of the iPhone platform - the above would still work, just without the files. Google anything about maze generation or roguelike maps.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3107/2d-level-design-editing-saving-questions" />
  <row Id="13037" PostHistoryTypeId="2" PostId="6547" RevisionGUID="5bd6a81b-91f3-45db-89e7-8c263f79de62" CreationDate="2010-12-15T16:41:44.983" UserId="950" Text="From the top of my mind, I see 2 ways to do it :&#xD;&#xA;&#xD;&#xA; - classic mesh. (but that's likely to be a lot of tris for little screenspace)&#xD;&#xA; - bilboards (but the placements of the billboards may be tricky. still looks like the best solution)&#xD;&#xA; - a box with a shader (the parametric shape would be in the shader, seems tricky).&#xD;&#xA;&#xD;&#xA;Any idea ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;refs : &#xD;&#xA;http://media.teamxbox.com/games/ss/1482/1209452129.jpg&#xD;&#xA;&#xD;&#xA;http://www.pcgameshardware.com/aid,667621/Imagegallery/GTA_4_New_screenshots_of_the_PC_version_-_available_via_Steam_on_December_03/&amp;menu=browser&amp;image_id=879671&amp;article_id=667621&amp;page=1&amp;show=original" />
  <row Id="13038" PostHistoryTypeId="1" PostId="6547" RevisionGUID="5bd6a81b-91f3-45db-89e7-8c263f79de62" CreationDate="2010-12-15T16:41:44.983" UserId="950" Text="What is the best way to render eletric wires (like in gta 4) ?" />
  <row Id="13039" PostHistoryTypeId="3" PostId="6547" RevisionGUID="5bd6a81b-91f3-45db-89e7-8c263f79de62" CreationDate="2010-12-15T16:41:44.983" UserId="950" Text="&lt;rendering&gt;&lt;shaders&gt;&lt;3d-meshes&gt;" />
  <row Id="13040" PostHistoryTypeId="2" PostId="6548" RevisionGUID="e176ff87-5ed7-449d-b614-40c5acdcae89" CreationDate="2010-12-15T16:53:35.010" UserId="2853" Text="In a 3D SDL application I inherited (I have little 3D or SDL experience), I have a 'screenshot' routine that either saves a full-size image or a scaled image, depending on the context (differing key-press).  To save a full-size (i.e. graphics-mode-sized) screenshot I'm using:&#xD;&#xA;&#xD;&#xA;    SDL_SaveBMP(SDL_GetVideoSurface(), SDL_RWFromFile(filename.c_str(), &quot;wb&quot;), 1);&#xD;&#xA;&#xD;&#xA;This works exactly as-intended, and saves an 8-bit bitmap (the display mode is *always* 8-bit, for another reason entirely) as expected.&#xD;&#xA;&#xD;&#xA;However, in order to resize the image, I'm making use of a library that came heavily recommended in several places when searching for a suitable surface-/image-resizing library for SDL: [SDL_Resize][1].&#xD;&#xA;&#xD;&#xA;I'm implementing this as such:&#xD;&#xA;&#xD;&#xA;    SDL_Surface *toResize = SDL_GetVideoSurface();&#xD;&#xA;    SDL_Surface *resized = SDL_Resize(toResize, (int)w, (int)h);&#xD;&#xA;    &#xD;&#xA;    SDL_SaveBMP(resized, SDL_RWFromFile(filename.c_str(), &quot;wb&quot;), 1);&#xD;&#xA;    SDL_FreeSurface(resized);&#xD;&#xA;&#xD;&#xA;This works *mostly* as intended.  It saves a resized, 8-bit bitmap, seemingly with the correct palette.  However, the colours in parts of the image are incorrect, e.g.&#xD;&#xA;&#xD;&#xA;![IMAGE][2]&#xD;&#xA;&#xD;&#xA;Now, I don't need the output images to be 8-bit, I'd be perfectly happy with a 24-bit or 32-bit bitmap, if I could solve this problem; but I can't find out the answer to either of these questions:&#xD;&#xA;&#xD;&#xA; - **How do I convert an SDL surface to a different bit-depth?**&#xD;&#xA; - **How do I ensure that the output image displays the colours correctly after resize?**&#xD;&#xA;&#xD;&#xA;I'm anticipating that I may have to settle for a higher-bit-depth bitmap, and that's fine... but a few pointers in the right direction would be fantastic.&#xD;&#xA;&#xD;&#xA;Many thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://sourceforge.net/projects/sdlresize/&#xD;&#xA;  [2]: http://i.stack.imgur.com/GIXER.jpg" />
  <row Id="13041" PostHistoryTypeId="1" PostId="6548" RevisionGUID="e176ff87-5ed7-449d-b614-40c5acdcae89" CreationDate="2010-12-15T16:53:35.010" UserId="2853" Text="Colour Problems When Using SDL_Resize()" />
  <row Id="13042" PostHistoryTypeId="3" PostId="6548" RevisionGUID="e176ff87-5ed7-449d-b614-40c5acdcae89" CreationDate="2010-12-15T16:53:35.010" UserId="2853" Text="&lt;image&gt;&lt;sdl&gt;" />
  <row Id="13043" PostHistoryTypeId="2" PostId="6549" RevisionGUID="2a61782b-96f8-4563-86ea-4f4b2fd5f38d" CreationDate="2010-12-15T17:09:03.917" UserId="323" Text="I'd consider doing it as two flat lines, set at ninety degree angles, such that the cross-section of the wire was literally a cross. If you wanted to be a little cleverer, you'd do the billboard thing, such that you had one flat line always directly facing the player.&#xD;&#xA;&#xD;&#xA;Meshes and shaders seem overkill.&#xD;&#xA;&#xD;&#xA;(Well, okay, the billboard thing might use a vertex shader. But seriously, just do two flat lines unless that's actually causing problems.)" />
  <row Id="13044" PostHistoryTypeId="5" PostId="6547" RevisionGUID="96c3f286-6c8b-4a73-90e6-abbf1f96fd73" CreationDate="2010-12-15T17:18:19.657" UserId="154" Comment="cleaned up links" Text="From the top of my mind, I see 2 ways to do it :&#xD;&#xA;&#xD;&#xA; - classic mesh. (but that's likely to be a lot of tris for little screenspace)&#xD;&#xA; - bilboards (but the placements of the billboards may be tricky. still looks like the best solution)&#xD;&#xA; - a box with a shader (the parametric shape would be in the shader, seems tricky).&#xD;&#xA;&#xD;&#xA;Any idea ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;refs : &#xD;&#xA;[Screenshot1][1]&#xD;&#xA;[Screenshot2][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]:  http://media.teamxbox.com/games/ss/1482/1209452129.jpg&#xD;&#xA;  [2]: http://www.pcgameshardware.com/aid,667621/Imagegallery/GTA_4_New_screenshots_of_the_PC_version_-_available_via_Steam_on_December_03/&amp;menu=browser&amp;image_id=879671&amp;article_id=667621&amp;page=1&amp;show=original" />
  <row Id="13045" PostHistoryTypeId="2" PostId="6550" RevisionGUID="6f038e26-c074-4149-a449-180769b94e35" CreationDate="2010-12-15T17:30:30.223" UserId="3830" Text="The problem with free is, as the saying goes, you often get what you paid for :)&#xD;&#xA;&#xD;&#xA;A good place to find 3D models (from good the good to the unbelievably ugly) is the [Google 3D Warehouse][1].  It's a huge collection of free models that can be loaded with Google's Sketchup program plus be loaded in to Google Earth if geo-referenced.  &#xD;&#xA;&#xD;&#xA;From the site, here is a model of a boxing ring that can be downloaded in Collada format as well as for Google Sketchup.  You ought to be able to find a way to convert Collada to OBJ.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;http://sketchup.google.com/3dwarehouse/details?mid=1579926f4237c91137494d2d6fb60eef&amp;prevstart=0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sketchup.google.com/3dwarehouse/&#xD;&#xA;  [2]: http://i.stack.imgur.com/YbGnG.jpg" />
  <row Id="13046" PostHistoryTypeId="2" PostId="6551" RevisionGUID="da8c7c68-34be-4345-bfca-c3b352fe542f" CreationDate="2010-12-15T17:42:52.850" UserId="2933" Text="If I have a Vector, say (1,1), how can I rotate it around the origin (0,0)?&#xD;&#xA;&#xD;&#xA;I'm working in XNA if that helps.&#xD;&#xA;" />
  <row Id="13047" PostHistoryTypeId="1" PostId="6551" RevisionGUID="da8c7c68-34be-4345-bfca-c3b352fe542f" CreationDate="2010-12-15T17:42:52.850" UserId="2933" Text="Rotate vector by matrix?" />
  <row Id="13048" PostHistoryTypeId="3" PostId="6551" RevisionGUID="da8c7c68-34be-4345-bfca-c3b352fe542f" CreationDate="2010-12-15T17:42:52.850" UserId="2933" Text="&lt;xna&gt;&lt;graphics&gt;&lt;math&gt;&lt;vector&gt;&lt;windows-phone-7&gt;" />
  <row Id="13049" PostHistoryTypeId="2" PostId="6552" RevisionGUID="0fdac2c3-f589-4d1f-aa89-0bb793b4aa8c" CreationDate="2010-12-15T17:56:48.503" UserId="2345" Text="It seemed a little strange to me so I made a little app to test how much time it took. It appears that the time the intersects method takes varies by where the axis aligned bounding boxes are positioned. This makes sense because more checks are needed in some cases to verify that an intersection is not occurring. &#xD;&#xA;&#xD;&#xA;I imagine you are running this code on the Xbox 360 since you have a large performance impact. Using Reflector it is easy to see that the method was not coded with speed in mind. The function is riddled with floating point operations and function calls. The compact .Net framework does not inline any function calls and combined with the horrible floating point performance I can see why so much time is used up by the intersects function.&#xD;&#xA;&#xD;&#xA;I did some research and came across this article: http://zach.in.tu-clausthal.de/teaching/cg_literatur/lighthouse3d_view_frustum_culling/index.html&#xD;&#xA;&#xD;&#xA;There are various faster methods for frustum culling you could implement to speed things up. Here is a reasonably accurate intersects implementation that reduced load from 30% to 4% for me. &#xD;&#xA;*(note: it does give a few false positives, see the &quot;Geometric Approach - Testing Boxes&quot; section of the article above)*&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;    public static class FrustumHelper&#xD;&#xA;    {&#xD;&#xA;            public static Vector3 GetNegativeVertex(this BoundingBox aabb, &#xD;&#xA;                                                    ref Vector3 normal)&#xD;&#xA;            {&#xD;&#xA;                Vector3 p = aabb.Max;&#xD;&#xA;                if (normal.X &gt;= 0)&#xD;&#xA;                    p.X = aabb.Min.X;&#xD;&#xA;                if (normal.Y &gt;= 0)&#xD;&#xA;                    p.Y = aabb.Min.Y;&#xD;&#xA;                if (normal.Z &gt;= 0)&#xD;&#xA;                    p.Z = aabb.Min.Z;&#xD;&#xA;    &#xD;&#xA;                return p;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public static void FastIntersects(this BoundingFrustum boundingfrustum, &#xD;&#xA;                                              ref BoundingBox aabb, &#xD;&#xA;                                              out bool intersects)&#xD;&#xA;            {&#xD;&#xA;                intersects = false;&#xD;&#xA;    &#xD;&#xA;                Plane plane; Vector3 normal, p;&#xD;&#xA;                &#xD;&#xA;                plane = boundingfrustum.Bottom;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X; &#xD;&#xA;                normal.Y = -normal.Y; &#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Far;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Left;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Near;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Right;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Top;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                intersects = true;&#xD;&#xA;            }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; " />
  <row Id="13050" PostHistoryTypeId="2" PostId="6553" RevisionGUID="49444a0f-7434-4c00-b05c-4d2fc0ea1e8e" CreationDate="2010-12-15T18:29:43.623" UserId="3501" Text="Just multiply the vector by a rotation matrix:&#xD;&#xA;&#xD;&#xA;    | fx |     | cos a    -sin a | | sx |&#xD;&#xA;    | fy |  =  | sin a    -cos a | | sy |&#xD;&#xA;&#xD;&#xA;where `fx` and `fy` are final coordinates of the object after the rotation and `sx`, `sy` are starting one. Obviously `a` is the angle involved." />
  <row Id="13051" PostHistoryTypeId="5" PostId="6552" RevisionGUID="ee0cb4ce-da5d-4973-88c1-49266acf20a1" CreationDate="2010-12-15T18:33:34.383" UserId="2345" Comment="deleted 4 characters in body" Text="It seemed a little strange to me so I made a little app to test how much time it took. It appears that the time the intersects method takes varies by where the axis aligned bounding boxes are positioned. This makes sense because more checks are needed in some cases to verify that an intersection is not occurring. &#xD;&#xA;&#xD;&#xA;I imagine you are running this code on the Xbox 360 since you have a large performance impact. Using Reflector it is easy to see that the method was not coded with speed in mind. The function is riddled with floating point operations and function calls. The compact .Net framework does not inline any function calls and combined with the horrible floating point performance I can see why so much time is used up by the intersects function.&#xD;&#xA;&#xD;&#xA;I did some research and came across this article: http://zach.in.tu-clausthal.de/teaching/cg_literatur/lighthouse3d_view_frustum_culling/index.html&#xD;&#xA;&#xD;&#xA;There are various faster methods for frustum culling you could implement to speed things up. Here is a reasonably accurate intersects implementation which is about 7 to 10 times faster. &#xD;&#xA;*(note: it does give a few false positives, see the &quot;Geometric Approach - Testing Boxes&quot; section of the article above)*&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;    public static class FrustumHelper&#xD;&#xA;    {&#xD;&#xA;            public static Vector3 GetNegativeVertex(this BoundingBox aabb, &#xD;&#xA;                                                    ref Vector3 normal)&#xD;&#xA;            {&#xD;&#xA;                Vector3 p = aabb.Max;&#xD;&#xA;                if (normal.X &gt;= 0)&#xD;&#xA;                    p.X = aabb.Min.X;&#xD;&#xA;                if (normal.Y &gt;= 0)&#xD;&#xA;                    p.Y = aabb.Min.Y;&#xD;&#xA;                if (normal.Z &gt;= 0)&#xD;&#xA;                    p.Z = aabb.Min.Z;&#xD;&#xA;    &#xD;&#xA;                return p;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public static void FastIntersects(this BoundingFrustum boundingfrustum, &#xD;&#xA;                                              ref BoundingBox aabb, &#xD;&#xA;                                              out bool intersects)&#xD;&#xA;            {&#xD;&#xA;                intersects = false;&#xD;&#xA;    &#xD;&#xA;                Plane plane; Vector3 normal, p;&#xD;&#xA;                &#xD;&#xA;                plane = boundingfrustum.Bottom;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X; &#xD;&#xA;                normal.Y = -normal.Y; &#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Far;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Left;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Near;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Right;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                plane = boundingfrustum.Top;&#xD;&#xA;                normal = plane.Normal;&#xD;&#xA;                normal.X = -normal.X;&#xD;&#xA;                normal.Y = -normal.Y;&#xD;&#xA;                normal.Z = -normal.Z;&#xD;&#xA;                p = aabb.GetPositiveVertex(ref normal);&#xD;&#xA;                if (-plane.D + normal.X * p.X + normal.Y * p.Y + normal.Z * p.Z &lt; 0)&#xD;&#xA;                    return;&#xD;&#xA;    &#xD;&#xA;                intersects = true;&#xD;&#xA;            }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; " />
  <row Id="13052" PostHistoryTypeId="5" PostId="6550" RevisionGUID="845e3a67-ba46-4997-87cd-231314512e3b" CreationDate="2010-12-15T19:05:20.863" UserId="3830" Comment="deleted 5 characters in body" Text="The problem with free is, as the saying goes, you often get what you paid for :)&#xD;&#xA;&#xD;&#xA;A good place to find 3D models (from the good to the unbelievably ugly) is the [Google 3D Warehouse][1].  It's a huge collection of free models that can be loaded with Google's Sketchup program plus be loaded in to Google Earth if geo-referenced.  &#xD;&#xA;&#xD;&#xA;From the site, here is a model of a boxing ring that can be downloaded in Collada format as well as for Google Sketchup.  You ought to be able to find a way to convert Collada to OBJ.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;http://sketchup.google.com/3dwarehouse/details?mid=1579926f4237c91137494d2d6fb60eef&amp;prevstart=0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sketchup.google.com/3dwarehouse/&#xD;&#xA;  [2]: http://i.stack.imgur.com/YbGnG.jpg" />
  <row Id="13053" PostHistoryTypeId="2" PostId="6554" RevisionGUID="8103a496-5ff7-42ed-a683-f55a522206d8" CreationDate="2010-12-15T19:11:48.037" UserId="744" Text="To &quot;convert&quot; an SDL surface to another bit-depth, use &lt;a href=&quot;http://sdl.beuc.net/sdl.wiki/SDL_ConvertSurface&quot;&gt;SDL_ConvertSurface&lt;/a&gt;. This function is slightly mis-named, as it actually makes a new surface rather than converting the surface in-place (which isn't really possible).&#xD;&#xA;&#xD;&#xA;I don't know how SDL_Resize works, but the problems you are seeing can be caused by it using a 24/32 bit buffer internally when rescaling and performing bilinear filtering. This results in colors in the scaled image which are not present in the original, which must then be mapping back to the palette, apparently poorly.&#xD;&#xA;&#xD;&#xA;It also looks bad enough that SDL_Resize may also only support one palette, forcing your image into that color space before working with it. But even if it kept the original palette, the accuracy would be questionable." />
  <row Id="13054" PostHistoryTypeId="2" PostId="6555" RevisionGUID="cc03993c-65eb-4b70-aa7e-38c4438408df" CreationDate="2010-12-15T20:03:52.370" UserId="3232" Text="Explanation: every mesh face has a material, basically you need to load each material and during rendering:&#xD;&#xA;&#xD;&#xA;    for each mesh do&#xD;&#xA;       for each face do&#xD;&#xA;          setup face material&#xD;&#xA;          draw face&#xD;&#xA;       end&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;But this will be inefficient and the ideal would be to group faces by material. You can after load process the mesh and group the faces with the same material, then you can draw each face batch at once for each material." />
  <row Id="13055" PostHistoryTypeId="2" PostId="6556" RevisionGUID="a9dab613-14bd-432c-955c-7a1b0598af29" CreationDate="2010-12-15T20:59:19.517" UserId="493" Text="Since you are using XNA, there is an easy way to do the above, which can be found in this following [thread][1]. In shows how to perform the transformation in 3D or 2D. For 2D, it is as simple as:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    point = Vector2.Transform(point, Matrix.CreateRotationZ(AngleToRotate);&#xD;&#xA;    point += originPoint;&#xD;&#xA;&#xD;&#xA;Note that AngleToRotate is in radians. If you want to use Degrees you can can take advantage of&#xD;&#xA;&#xD;&#xA;    MathHelper.ToRadians(float degree)&#xD;&#xA;&#xD;&#xA;which is a static method.&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.create.msdn.com/forums/p/12188/64415.aspx" />
  <row Id="13056" PostHistoryTypeId="2" PostId="6557" RevisionGUID="181736a9-6516-4360-8a86-c5753f41a062" CreationDate="2010-12-15T21:10:13.910" UserId="2734" Text="Do you think it is techniclly possible to write a fully-fledged 3D MMO client with Browser JavaScript - WebGL for graphics, and WebSocket for Networking?&#xD;&#xA;&#xD;&#xA; - Do you think future MMOs (and games generally) will wrriten with WebGL?&#xD;&#xA; - Does today's JavaScript performance allow this?&#xD;&#xA; - Let's say your development team was you as a developer, and another model creator (artist). Would you use a library like [SceneJS][1] for the game, or write straight WebGL? If you would use a library, but not SceneJS, please specify which.  &#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: http://scenejs.org/" />
  <row Id="13057" PostHistoryTypeId="1" PostId="6557" RevisionGUID="181736a9-6516-4360-8a86-c5753f41a062" CreationDate="2010-12-15T21:10:13.910" UserId="2734" Text="Browser-based MMOs (WebGL, WebSocket)" />
  <row Id="13058" PostHistoryTypeId="3" PostId="6557" RevisionGUID="181736a9-6516-4360-8a86-c5753f41a062" CreationDate="2010-12-15T21:10:13.910" UserId="2734" Text="&lt;mmo&gt;&lt;webgl&gt;&lt;websocket&gt;" />
  <row Id="13059" PostHistoryTypeId="2" PostId="6558" RevisionGUID="7af2e63c-19be-48fb-b0d6-aefdb9d92830" CreationDate="2010-12-15T21:37:13.490" UserId="3830" Text="Yes it is all possible, but don't bother trying to do all of that.  Better to just use something quite capable and browser-friendly like [Unity][1]!&#xD;&#xA;&#xD;&#xA;Also consider that if you write a game in JavaScript, you are going to have to expose the client code to the end users - meaning your game will be very prone to cheats if you don't watch out.&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="13060" PostHistoryTypeId="5" PostId="6542" RevisionGUID="b7666aa1-7c75-43ca-845e-a1ab0c890571" CreationDate="2010-12-15T22:10:35.253" UserId="1742" Comment="fix to solution, fuller explanation of where to go next" Text="Because a camera is usually the inverse (because the position and rotation of the camera are applied inverse to the scene to bring the scene into the camera's space) the order of the transforms is a little odd.&#xD;&#xA;&#xD;&#xA;it's more like:&#xD;&#xA;&#xD;&#xA;    // fixed&#xD;&#xA;    glRotate( -cameraR );&#xD;&#xA;    glTranslate( -cameraP );&#xD;&#xA;    glTranslate( objectP ),&#xD;&#xA;    glRotate( objectR ),&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: Doh, Jason is right. I'm going to blame it on not doing OpenGl in a while ;)&#xD;&#xA;OpenGl does indeed apply your transforms in reverse order so my original post was the opposite of correct ;)&#xD;&#xA;Another thing to consider is, not many people I know actually use these gl functions. Most people use a full math library once they've got started, mostly because without that you're going to be quite stuck when it comes to more advanced animations and camera paths. Also, as Jason mentions, a look-at matrix is a fundamentally more accurate description of a camera transform, so you should probably look into using matrices rather than these base functions." />
  <row Id="13061" PostHistoryTypeId="2" PostId="6559" RevisionGUID="7143fae6-ac44-4cc2-9aa6-8b0d822aba1a" CreationDate="2010-12-15T22:37:26.873" UserId="2447" Text="The closest thing you are going to find to something like that is going to be one of the off the shelf game engines.  Game Salad is good for those I don't want to code it situations.  There are low coding options like game maker. From there something like unity UDK or Panda3d are going to be your best bet, but they require a good bit of work to get to the point you are talking about." />
  <row Id="13062" PostHistoryTypeId="2" PostId="6560" RevisionGUID="d400e266-ebd0-49a0-834a-e0ddaa7fd7f2" CreationDate="2010-12-15T23:56:03.763" UserId="4032" Text="I'm currently a software architect using the Microsoft stack of enterprise app development tools (.NET, C#, SQL Server, etc.). I've been thinking about transitioning over to game dev.&#xD;&#xA;&#xD;&#xA; - What paradigms exist in gaming that&#xD;&#xA;   don't in enterprise development that&#xD;&#xA; - I'd need to learn? I'm deeply versed&#xD;&#xA;   in DB design, design patterns, theory&#xD;&#xA;   etc. Will this help me?&#xD;&#xA; - Overall, will&#xD;&#xA;   it be like I'm starting over from&#xD;&#xA;   scratch in changing careers?" />
  <row Id="13063" PostHistoryTypeId="1" PostId="6560" RevisionGUID="d400e266-ebd0-49a0-834a-e0ddaa7fd7f2" CreationDate="2010-12-15T23:56:03.763" UserId="4032" Text="What are ways I can transition from enterprise application development into gaming development?" />
  <row Id="13064" PostHistoryTypeId="3" PostId="6560" RevisionGUID="d400e266-ebd0-49a0-834a-e0ddaa7fd7f2" CreationDate="2010-12-15T23:56:03.763" UserId="4032" Text="&lt;.net&gt;&lt;career&gt;" />
  <row Id="13065" PostHistoryTypeId="2" PostId="6561" RevisionGUID="02a48394-81a0-452f-b0ff-138a7f87ca7b" CreationDate="2010-12-16T01:23:07.610" UserId="3830" Text="Irrespective of your background, you need to bring something good to the table when looking for a job.  Maybe you're a wizard at server load balancing and optimizing database queries for example, which would be pretty valuable for an MMO development project.  Or maybe you're really good at project management or user interface design.&#xD;&#xA;&#xD;&#xA;Overall though, it's pretty amazing what backgrounds people come from in the game industry. If you want to see what I mean, go to http://valvesoftware.com/company/people.html and read the backgrounds some of the people at Valve have.&#xD;&#xA;&#xD;&#xA;I'd personally start out by keeping the day job and making a few indie games on the side.  It would be a great learning experience, plus it gives you a way to develop a portfolio.  You might also look into modding a popular game like Half-Life 2.  Being able to demonstrate a well made mod or game gives you credibility and shows you can do something.   It's also getting you doing development that is essentially identical to that at a game company, minus the resources, larger team, etc." />
  <row Id="13066" PostHistoryTypeId="2" PostId="6562" RevisionGUID="052be06f-a15d-4fe2-8813-a2d594f77559" CreationDate="2010-12-16T02:01:12.127" UserId="2332" Text="I like to to use [TurboSquid][1] for my models. They've got a lot of variety of free models, in a lot of different formats (md2 and obj included). The free ones are probably not the best ones to look at, but until you find yourself an artist, they're pretty good :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com" />
  <row Id="13067" PostHistoryTypeId="2" PostId="6563" RevisionGUID="2d67dfaf-9ade-4ff4-8ed4-1d1f50b0bebb" CreationDate="2010-12-16T02:21:49.247" UserId="2332" Text="If you want a scalable solution use a graph data structure ([Wikipedia Link][1])&#xD;&#xA;&#xD;&#xA;With a graph you can associate each region with a node on the graph. Each node contains the neighbours of that node in the graph (the nodes that are connected to it).&#xD;&#xA;&#xD;&#xA;You also have a lot of increased flexibility with a graph, for example:&#xD;&#xA;&#xD;&#xA;1. A region had a north, west and east exit (no south) - You wouldn't have to worry about setting the south exit to NULL or whatever, you just wouldn't add that node to the neighbours list&#xD;&#xA;&#xD;&#xA;2. Say you wanted to go from a town to a dungeon, but you couldn't go back the same way because for some reason the exit was closed off by demons, this is where Directional Graphs come in. You could have a neighbour called Dungeon in Town's neighbours list, but don't add a Town neighbour to the Dungeon node (meaning that you can go from Town-&gt;Dungeon, but Dungeon-&gt;Town is impossible)&#xD;&#xA;&#xD;&#xA;3. If you wanted a fancy effect of hopping from region to region, you could easily implement some pathfinding like A* to figure out the shortest path for you.&#xD;&#xA;&#xD;&#xA;You *could* go with a connectivity matrix, but as you say you wanted something in 3-dimensions, so this would essentially be a 3-dimensional array which would get VERY big VERY fast.&#xD;&#xA;&#xD;&#xA;If you want a solution that you can easily add nodes to (for example, when expanding on your game) then I'd definitely recommend using a graph.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graph_%28data_structure%29" />
  <row Id="13068" PostHistoryTypeId="2" PostId="6564" RevisionGUID="af37afa6-2b76-4a39-b64b-f4280af6f08d" CreationDate="2010-12-16T03:05:06.587" UserId="51" Text="This seems like a pretty close dupe to this question, so my answer would be almost identical:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6179/game-architecture-for-someone-with-a-background-in-lob-apps/6180#6180" />
  <row Id="13070" PostHistoryTypeId="2" PostId="6566" RevisionGUID="197fc514-23b8-4287-a048-bbbb001e69f6" CreationDate="2010-12-16T09:28:40.293" UserId="3792" Text="I am creating a board game using Actionscript 3.0. I've finished it to the point of the game playable with (computer players making random decision). I'm now working to create an AI framework/module ( Designing and creating classes that will be used to drive the AI). Is there a commonly/popular approach on creating an AI framework)? I've searhed around abit and could only find algorithms and sample codes. What I'm not looking for game/code specifics but more to thinking process in designing and modeling the AI." />
  <row Id="13071" PostHistoryTypeId="1" PostId="6566" RevisionGUID="197fc514-23b8-4287-a048-bbbb001e69f6" CreationDate="2010-12-16T09:28:40.293" UserId="3792" Text="Is there an approach in creating an AI Framework ?" />
  <row Id="13072" PostHistoryTypeId="3" PostId="6566" RevisionGUID="197fc514-23b8-4287-a048-bbbb001e69f6" CreationDate="2010-12-16T09:28:40.293" UserId="3792" Text="&lt;programming&gt;&lt;ai&gt;&lt;actionscript-3&gt;&lt;game-mechanics&gt;&lt;procedural-generation&gt;" />
  <row Id="13073" PostHistoryTypeId="2" PostId="6567" RevisionGUID="87926a4d-29d7-4d6e-bf5a-f8d3804b148c" CreationDate="2010-12-16T10:34:26.080" UserId="950" Text="Unity is good. See also Shiva and the Prime Engine." />
  <row Id="13074" PostHistoryTypeId="2" PostId="6568" RevisionGUID="df64e778-e7f1-48a7-a782-c68be5e24893" CreationDate="2010-12-16T10:50:37.603" UserId="2933" Text="I'm shooting out a projectile and I want another projectile to closely follow it. I can't simply shoot out the second projectile at a slightly lesser time because the first projectile is liable to change trajectory.&#xD;&#xA;&#xD;&#xA;All I want is the second projectile to be closely following the first one.&#xD;&#xA;&#xD;&#xA;My first idea was to plot the points every frame following the first projectile however as the speed of the first projectile increases the following projectile lags behind." />
  <row Id="13075" PostHistoryTypeId="1" PostId="6568" RevisionGUID="df64e778-e7f1-48a7-a782-c68be5e24893" CreationDate="2010-12-16T10:50:37.603" UserId="2933" Text="Following along over a trajectory" />
  <row Id="13076" PostHistoryTypeId="3" PostId="6568" RevisionGUID="df64e778-e7f1-48a7-a782-c68be5e24893" CreationDate="2010-12-16T10:50:37.603" UserId="2933" Text="&lt;math&gt;&lt;physics&gt;" />
  <row Id="13078" PostHistoryTypeId="2" PostId="6569" RevisionGUID="0bbb0cc8-f3b1-41ac-9ea7-4375a7a655dc" CreationDate="2010-12-16T11:24:54.367" UserId="3501" Text="What you are looking for is a sort of velocity match between the two objects. You can obtain it by checking the target (first projectile) velocity and modifying the second one according to this.&#xD;&#xA;&#xD;&#xA;The pseudo code is something like:&#xD;&#xA;&#xD;&#xA;variables: `target_velocity`, `this_velocity`, `time_to_match` and `max_acceleration`. First and second values are the current velocities of projectiles and other twos are used to tweak the behavior of the chase. Of course you should use vectors (but I suppose you do, since it's the only way to manage these things).&#xD;&#xA;&#xD;&#xA;Then at every update:&#xD;&#xA;&#xD;&#xA;     result_acceleration = target_velocity - this_velocity;&#xD;&#xA;     result_acceleration /= time_to_match;&#xD;&#xA;     if (result_acceleration.magnitude() &gt; max_acceleration)&#xD;&#xA;     {&#xD;&#xA;       result_acceleration.normalize();&#xD;&#xA;       result_acceleration *= max_acceleration;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Then the `result_acceleration` value is applied as usually within a physics engine to current `this_velocity` of following projectile. In your case the `time_to_match` variable should be enough small to keep the two objects tights (eg. 0.05-0.1)." />
  <row Id="13079" PostHistoryTypeId="2" PostId="6570" RevisionGUID="542a0615-3c72-4596-998d-8352776e52f6" CreationDate="2010-12-16T11:34:21.140" UserId="3501" Text="The AI broadly depends of what is it supposed to do. What I mean is that so many kinds of AI exist that it is impossible to just cover them all.&#xD;&#xA;&#xD;&#xA;For your specific purpose of a board game (or at least, a [perfect information][1] game) you usually use [minmax][2] trees and all the possible optimizations starting from there. (eg [AB-pruning][3]).&#xD;&#xA;&#xD;&#xA;These algorithm can easily be developed as a framework since what you really need are basically 2 functions:&#xD;&#xA;&#xD;&#xA;- a function `(game state, player) -&gt; game state list`, which computes all the possible moves from a specific state of the game for a player&#xD;&#xA;- a function `(game state, player) -&gt; float` which is the kernel of the algorithm. This function is used to evaluate how good is a state for a specific player. This is the heuristic involved, and it is what you will tweak of the whole algorithm to make your AI more cleaver.&#xD;&#xA;&#xD;&#xA;One you build the main algorithm (which goes recursively over a tree) you could easily adapt it to whatever board game you like by modifying just the two functions described above.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Perfect_information&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Minimax&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Alpha-beta_pruning" />
  <row Id="13080" PostHistoryTypeId="2" PostId="6571" RevisionGUID="b10c1afc-d7fb-4e4e-8ffe-cd5173d71df2" CreationDate="2010-12-16T11:57:59.623" UserId="1386" Text="[Googles App Inventor][1] is a WYSIWYG application development environment for Android.&#xD;&#xA;It allows you to control logic of your program using jigsaw type pieces.&#xD;&#xA;&#xD;&#xA; - Is it possible to develop games using&#xD;&#xA;   this technology? &#xD;&#xA; - Are there any obvious potential pitfalls?&#xD;&#xA;&#xD;&#xA;A screenshot showing how behaviour can be controlled using the blocks editor:&#xD;&#xA;![App Inventors blocks editor][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://appinventor.googlelabs.com/&#xD;&#xA;  [2]: http://i.stack.imgur.com/A6viv.png" />
  <row Id="13081" PostHistoryTypeId="1" PostId="6571" RevisionGUID="b10c1afc-d7fb-4e4e-8ffe-cd5173d71df2" CreationDate="2010-12-16T11:57:59.623" UserId="1386" Text="Is it possible to develop games using Googles App Inventor?" />
  <row Id="13082" PostHistoryTypeId="3" PostId="6571" RevisionGUID="b10c1afc-d7fb-4e4e-8ffe-cd5173d71df2" CreationDate="2010-12-16T11:57:59.623" UserId="1386" Text="&lt;android&gt;&lt;wysiwyg&gt;" />
  <row Id="13083" PostHistoryTypeId="5" PostId="6571" RevisionGUID="96960716-7495-43e5-abce-bc399f817e4f" CreationDate="2010-12-16T12:14:53.760" UserId="1386" Comment="added 128 characters in body" Text="[Googles App Inventor][1] is a WYSIWYG application development environment for Android.&#xD;&#xA;It allows you to control logic of your program using jigsaw type pieces.&#xD;&#xA;&#xD;&#xA; - Is it possible to develop games using&#xD;&#xA;   this technology? &#xD;&#xA; - Are there any obvious potential pitfalls?&#xD;&#xA; - What are the limitations of using this technology as compared to programmatic development for Android (such as using Java)?&#xD;&#xA;&#xD;&#xA;A screenshot showing how behaviour can be controlled using the blocks editor:&#xD;&#xA;![App Inventors blocks editor][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://appinventor.googlelabs.com/&#xD;&#xA;  [2]: http://i.stack.imgur.com/A6viv.png" />
  <row Id="13084" PostHistoryTypeId="2" PostId="6572" RevisionGUID="b25e9237-46c6-4892-b72d-85addf439180" CreationDate="2010-12-16T12:52:24.160" UserId="1923" Text="If the first projectile has a position and a velocity vector, then you can set the 2nd one's position like this:&#xD;&#xA;&#xD;&#xA;bullet2_position = bullet1_position - (normalized_bullet1_velocity * trailing_distance);&#xD;&#xA;&#xD;&#xA;You can still apply all the physics you want to the 1st projectile, you just don't need to repeat it all for the 2nd." />
  <row Id="13085" PostHistoryTypeId="2" PostId="6573" RevisionGUID="de6da2ec-4fcd-4f37-b519-9bf0c62b8e90" CreationDate="2010-12-16T14:56:25.600" UserId="4013" Text="I have made games with cocos2d for the iphone however I am looking to move on from that, is there a good direction you could suggest? If not I was planning on using what the SDK gives me, and so for example to make a sprite, say the player on screen, rather than a CCSprite, what would be best to use? What do I need to go and learn?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="13086" PostHistoryTypeId="1" PostId="6573" RevisionGUID="de6da2ec-4fcd-4f37-b519-9bf0c62b8e90" CreationDate="2010-12-16T14:56:25.600" UserId="4013" Text="iPhone Game - Sprites" />
  <row Id="13087" PostHistoryTypeId="3" PostId="6573" RevisionGUID="de6da2ec-4fcd-4f37-b519-9bf0c62b8e90" CreationDate="2010-12-16T14:56:25.600" UserId="4013" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;sprites&gt;" />
  <row Id="13088" PostHistoryTypeId="2" PostId="6574" RevisionGUID="b76e08b0-2d6a-4a99-a329-50c87ebb401b" CreationDate="2010-12-16T15:03:31.150" UserId="3505" Text="It's most definitely possible, and I'd wager that someone has already done it. The biggest question I can think of is how to manage a big project, I guess that is also quite possible, but you might need some adjustment of your usual methods to make it work smoothly.&#xD;&#xA;&#xD;&#xA;In any case, I say go for it, the best way to find out what the tool can do is to try it out." />
  <row Id="13089" PostHistoryTypeId="2" PostId="6575" RevisionGUID="5280110d-a3c0-4853-a367-dbbbb0362d99" CreationDate="2010-12-16T16:06:19.003" UserId="3806" Text="cocos2d is using OpenGL ES as its rendering engine, so if you wish to move on, OpenGL ES is the next step." />
  <row Id="13090" PostHistoryTypeId="2" PostId="6576" RevisionGUID="94a60e59-d857-4630-bd2c-4989ea28495c" CreationDate="2010-12-16T16:13:42.760" UserId="2447" Text="Possible - Sure why not.&#xD;&#xA;&#xD;&#xA;Pitfalls -  Depending on the blocks provided you may not be able to everything you want. I haven't investigated theirs but other WYSIWYG program builders I have seen put out very poorly performing apps. &#xD;&#xA;&#xD;&#xA;Limitations - Limited in what you will be able to create. (I doubt they put a high performance 3d engine in there.)  If you aren't capable of building what you want from their pieces then you are out of luck.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13091" PostHistoryTypeId="2" PostId="6577" RevisionGUID="c1504a3f-a9c4-4642-bef0-3c1ff2c8b91d" CreationDate="2010-12-16T16:24:56.430" UserId="1330" Text="Unreal Development Kit for iOS was recently released. The system requirements note that Windows is needed. Does this mean that iOS game development is possible on a PC now? &#xD;&#xA;&#xD;&#xA;I am confused since I thought iOS development required an OSX machine.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="13092" PostHistoryTypeId="1" PostId="6577" RevisionGUID="c1504a3f-a9c4-4642-bef0-3c1ff2c8b91d" CreationDate="2010-12-16T16:24:56.430" UserId="1330" Text="UDK iOS: System Requirements confusion." />
  <row Id="13093" PostHistoryTypeId="3" PostId="6577" RevisionGUID="c1504a3f-a9c4-4642-bef0-3c1ff2c8b91d" CreationDate="2010-12-16T16:24:56.430" UserId="1330" Text="&lt;unreal&gt;" />
  <row Id="13094" PostHistoryTypeId="6" PostId="6577" RevisionGUID="26007ec6-b578-47fb-94e8-71e8a76fa88e" CreationDate="2010-12-16T16:50:13.903" UserId="1156" Comment="edited tags" Text="&lt;iphone&gt;&lt;unreal&gt;" />
  <row Id="13095" PostHistoryTypeId="2" PostId="6578" RevisionGUID="c79d8d76-dbb4-44e8-8e81-a7c536fd9b12" CreationDate="2010-12-16T16:54:31.080" UserId="395" Text="[Behavior trees](http://aigamedev.com/open/articles/bt-overview/) have been growing in popularity lately as a way to partially decouple game logic from AI flow. You will probably want to find a library that implements the basic elements though, it is annoying to write from scratch." />
  <row Id="13096" PostHistoryTypeId="2" PostId="6579" RevisionGUID="976da802-271f-410c-82e4-a10c03815beb" CreationDate="2010-12-16T17:05:58.190" UserId="3830" Text="You need Windows to run the Unreal Editor to create content.  Build the game on Windows, export to iOS." />
  <row Id="13097" PostHistoryTypeId="2" PostId="6580" RevisionGUID="a709355c-1000-43d9-8f96-4e2c9a78174c" CreationDate="2010-12-16T17:09:57.940" UserId="493" Text="As Tim Holt mentioned you will need a PC to run the Unreal Editor to create your content. It also allows you to test your game in an emulator or transfer the content to your iPhone. BUT, to submit your application you will need a Mac.&#xD;&#xA;&#xD;&#xA;The following [documentation][1] page explains all this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://udn.epicgames.com/Three/GettingStartediOSDevelopment.html" />
  <row Id="13098" PostHistoryTypeId="6" PostId="6533" RevisionGUID="b8e1ff21-a7df-454e-8b86-e4a20f698dd4" CreationDate="2010-12-16T17:14:18.810" UserId="2091" Comment="edited tags" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;design-patterns&gt;&lt;level-design&gt;" />
  <row Id="13099" PostHistoryTypeId="2" PostId="6581" RevisionGUID="50b68c16-f735-44b7-a705-17d62abd3904" CreationDate="2010-12-16T17:17:38.613" UserId="1101" Text="I don't think there's a generic approach because AI is not so much a component or a system as a broad classification of algorithms, many of which do entirely different things. There is no standard interface that could be applied to them all, nor a standard representation that could be used across them.&#xD;&#xA;&#xD;&#xA;You need to decide exactly which parts of your program require an AI approach (eg. picking a move to make), then select an algorithm that facilitates that (eg. minimax)." />
  <row Id="13100" PostHistoryTypeId="5" PostId="6580" RevisionGUID="18602373-fd82-4ddf-8c35-71d9cd6fdbf8" CreationDate="2010-12-16T17:21:13.953" UserId="493" Comment="added 443 characters in body" Text="As Tim Holt mentioned you will need a PC to run the Unreal Editor to create your content. It also allows you to test your game in an emulator or transfer the content to your iPhone. BUT, to submit your application you will need a Mac.&#xD;&#xA;&#xD;&#xA;The following [documentation][1] page explains all this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also don't forget that you will need to be a registered iOS developer - meaning pay the $99/year to be able to even test application on your iPhone. This process for Provisioning is explained in the following two documentation pages:&#xD;&#xA;&#xD;&#xA;- [iOS Provisioning Overview][2] &#xD;&#xA;- [iOS Provisioning Setup][3] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://udn.epicgames.com/Three/GettingStartediOSDevelopment.html&#xD;&#xA;  [2]: http://udn.epicgames.com/Three/AppleiOSProvisioning.html&#xD;&#xA;  [3]: http://udn.epicgames.com/Three/AppleiOSProvisioningSetup.html" />
  <row Id="13101" PostHistoryTypeId="2" PostId="6582" RevisionGUID="87a7ef3a-a832-4dbf-b3fa-9d41abd2dc47" CreationDate="2010-12-16T17:24:45.597" UserId="1101" Text="I don't think many future MMOs will be written with any client-side browser technology since most MMO developers will want to use the same language across the client and the server, and most game developers are fluent in non-web languages like C++. There's far too much client-code involved to make it very practical in Javascript anyway, except for quite trivial simulations. There are also other limitations imposed by running in the browser which are unsavoury for a typical game developer.&#xD;&#xA;&#xD;&#xA;I'm sure there will be *some* games like this, however. They're just not going to take over from WoW or similar games for quite a while. They will probably be made more by web developers getting into games rather than games developers getting into the web." />
  <row Id="13102" PostHistoryTypeId="5" PostId="6399" RevisionGUID="46b586a1-30e6-4e81-af0f-3732e1fe582b" CreationDate="2010-12-16T18:02:01.270" UserId="3929" Comment="added more examples" Text="If you don't want to wait for XNA support, there's a lot of work being done on several fronts with support for a number of languages (C++, C#, Java, JavaScript, ...) under Windows, Mac and Linux.&#xD;&#xA;&#xD;&#xA;For the freshest 0-day Kinect hacks, read [KinectHacks][1] and [FreeNect][2]&#xD;&#xA;&#xD;&#xA;If you want to get started writing code, have a look at these:&#xD;&#xA;&#xD;&#xA;- [Code Laboratories][3] released **CL NUI Platform drivers** for the Kinect, which also includes samples in several languages including C#. The latest 1.0.0.1210 seems to not work ATM, so maybe stick to the older version (1.0.0.1121).&#xD;&#xA;&#xD;&#xA;- I got started in minutes using the [KinectTouch C# project][6] together with CL NUI drivers.&#xD;&#xA;&#xD;&#xA;- For motion detection, check out the **haar detection** function inside **OpenCV** or the cross-platform .Net wrapper [Emgu CV][7]. Included are about 20 detection algorithms (XML files) for detecting e.g. hands, eyes, upper-torso, etc. A tool is also included to make your own. Google _haar detect_ for more info.&#xD;&#xA;&#xD;&#xA;- The [OpenKinect][4] project is in charge of **libfreenect** and has sample source code to get you started. AFAIK you will have to use [libusb-win32][5] to interface to the Kinect (which I was too lazy to get working in C#).&#xD;&#xA;&#xD;&#xA;- [OpenNI][8] just released an updated driver with Kinect support including sample source code for **skeleton tracking** using their **PrimeSense PSDK**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.KinectHacks.net&#xD;&#xA;  [2]: http://www.freenect.com&#xD;&#xA;  [3]: http://codelaboratories.com/&#xD;&#xA;  [4]: http://openkinect.org/wiki/Main_Page&#xD;&#xA;  [5]: https://sourceforge.net/apps/trac/libusb-win32/wiki&#xD;&#xA;  [6]: http://get.essexconsolerepairs.co.uk/kinecttouch/&#xD;&#xA;  [7]: http://www.emgu.com/wiki/index.php/Main_Page&#xD;&#xA;  [8]: http://openni.org/" />
  <row Id="13103" PostHistoryTypeId="2" PostId="6583" RevisionGUID="14dbff85-fdfb-49c3-ab0d-d025ca9e4abc" CreationDate="2010-12-16T18:06:26.613" UserId="3769" Text="So generally I want to have api like `pixels.addPixel3D(new Pixel3D(0xFF0000, 100, 100,100));` (color, position) where pixels is some abstraction on 3d sceen objet. It would have grate use in deep space/stars modeling... or modeling something like&#xD;&#xA;&#xD;&#xA; ![alt text][1] &#xD;&#xA;&#xD;&#xA;How to do such thing in unity?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ruySe.png" />
  <row Id="13104" PostHistoryTypeId="1" PostId="6583" RevisionGUID="14dbff85-fdfb-49c3-ab0d-d025ca9e4abc" CreationDate="2010-12-16T18:06:26.613" UserId="3769" Text="How to do pixel  per pixel modeling in unity3d?" />
  <row Id="13105" PostHistoryTypeId="3" PostId="6583" RevisionGUID="14dbff85-fdfb-49c3-ab0d-d025ca9e4abc" CreationDate="2010-12-16T18:06:26.613" UserId="3769" Text="&lt;c#&gt;&lt;unity&gt;" />
  <row Id="13106" PostHistoryTypeId="2" PostId="6584" RevisionGUID="922b9ee4-9fe8-45f1-99ec-aca7ab201e0b" CreationDate="2010-12-16T18:10:35.337" UserId="744" Text="    positions = [leader.position]&#xD;&#xA;    each frame:&#xD;&#xA;         leader.update()&#xD;&#xA;         positions.append(leader.position)&#xD;&#xA;&#xD;&#xA;         # Loop backwards through the logged positions to find the one&#xD;&#xA;         # the desired distance away.&#xD;&#xA;         d = 0&#xD;&#xA;         i = len(positions) - 1&#xD;&#xA;         while i &gt; 0 and d &lt; follow_distance:&#xD;&#xA;             d += distance(positions[i - 1], positions[i])&#xD;&#xA;             i -= 1&#xD;&#xA;&#xD;&#xA;         # Make sure we have enough total distance to start following.&#xD;&#xA;         if d &gt;= follow_distance:&#xD;&#xA;             # In the loop we probably overshot backwards, interpolate&#xD;&#xA;             # forward to the right position.&#xD;&#xA;             p = (d - follow_distance) / distance(positions[i], positions[i + 1])&#xD;&#xA;             follower.position = positions[i] * (1 - p) + positions[i + 1] * p&#xD;&#xA;&#xD;&#xA;             # Clear out unneeded positions.&#xD;&#xA;             del(positions[0:i])&#xD;&#xA;&#xD;&#xA;A trivial optimization would be using a deque instead of a list (I don't know if Flash has deques).&#xD;&#xA;&#xD;&#xA;The second projectile is going to act really weird though. Like, if it's following a parabola, it's going to slow and come to a stop in mid-air, then continue upwards very slowly, then fall very fast. Is that really what you want?" />
  <row Id="13107" PostHistoryTypeId="6" PostId="6583" RevisionGUID="fd2ff906-e697-41bd-8907-5834ad03912e" CreationDate="2010-12-16T18:11:55.960" UserId="3830" Comment="edited tags" Text="&lt;unity&gt;" />
  <row Id="13108" PostHistoryTypeId="9" PostId="6583" RevisionGUID="d6e89b35-24f5-43f9-bb67-ec3b0ff71e26" CreationDate="2010-12-16T18:12:10.103" UserId="3769" Comment="Rollback to [14dbff85-fdfb-49c3-ab0d-d025ca9e4abc]" Text="&lt;c#&gt;&lt;unity&gt;" />
  <row Id="13109" PostHistoryTypeId="6" PostId="6583" RevisionGUID="9c193b56-255f-4d0f-bda5-8073e285959a" CreationDate="2010-12-16T18:17:34.460" UserId="3830" Comment="edited tags" Text="&lt;unity&gt;" />
  <row Id="13110" PostHistoryTypeId="2" PostId="6585" RevisionGUID="a7f08054-e852-4f78-bd3f-0d4c45dbe608" CreationDate="2010-12-16T18:20:27.420" UserId="3830" Text="Unless you really want to render out little cubes for each pixel, you'd probably want to do this with sprites.  &#xD;&#xA;" />
  <row Id="13111" PostHistoryTypeId="2" PostId="6586" RevisionGUID="9c778de0-6d4d-4c63-82e8-c2cc75c53af7" CreationDate="2010-12-16T18:32:27.753" UserId="539" Text="I'm curious what people are using to develop games for the Windows Phone (or XNA in general). I have come across a few engines but for the most part they don't seem to be actively maintained. If you are using an engine which you think does the job well please recommend it below." />
  <row Id="13112" PostHistoryTypeId="1" PostId="6586" RevisionGUID="9c778de0-6d4d-4c63-82e8-c2cc75c53af7" CreationDate="2010-12-16T18:32:27.753" UserId="539" Text="Can you recommend a 2D game engine compatible with Windows Phone?" />
  <row Id="13113" PostHistoryTypeId="3" PostId="6586" RevisionGUID="9c778de0-6d4d-4c63-82e8-c2cc75c53af7" CreationDate="2010-12-16T18:32:27.753" UserId="539" Text="&lt;xna&gt;&lt;engine&gt;&lt;windows-phone-7&gt;" />
  <row Id="13114" PostHistoryTypeId="2" PostId="6587" RevisionGUID="c0ca79ec-1e93-4e87-b3db-25a8ef18a1d2" CreationDate="2010-12-16T18:59:31.493" UserId="2773" Text="I've asked [similar question][1] on App Hub.&#xD;&#xA;&#xD;&#xA;The answer was that there is only limited number of possible solutions, like Helium (helium.codeplex.com/) or Farseer Physics Engine ( farseerphysics.codeplex.com/)&#xD;&#xA;But, yes, they are not advanced enough yet.&#xD;&#xA;&#xD;&#xA;Torque engine (torquepowered.com/) is coming somewhere in the future.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.create.msdn.com/forums/t/62278.aspx" />
  <row Id="13115" PostHistoryTypeId="2" PostId="6588" RevisionGUID="6655af7c-1684-40a3-83eb-89cbc7b5a81b" CreationDate="2010-12-16T19:29:16.640" UserId="1638" Text="You could use C# or javascript to generate the desired image as a heightmap, then place those on a bunch of planes. You could also look at the heightmap generator in the procedural generation demo, Unity has in there projects, for how to place the &quot;Pixels&quot;/planes at the desired height or distance from the camera. &#xD;&#xA;&#xD;&#xA;This isn't any different than Tim's answer really, it just uses planes instead of cubes. Either way you will most likely have an object/instance for each &quot;pixel&quot; anyway. &#xD;&#xA;&#xD;&#xA;Also If you are going for the look above you will probably need to have a sprite manager that converts the jpeg into the associated grouping of cubes/planes, that way you don't have to do anything special for the assets." />
  <row Id="13116" PostHistoryTypeId="5" PostId="6583" RevisionGUID="8e5531f0-d41f-485f-9ace-54a6570b1cc2" CreationDate="2010-12-16T21:05:11.173" UserId="3769" Comment="added 194 characters in body" Text="So generally I want to have api like `pixels.addPixel3D(new Pixel3D(0xFF0000, 100, 100,100));` (color, position) where pixels is some abstraction on 3d sceen objet.So to say point cloud. It would have grate use in deep space/stars modeling... I want to set each pixel by hand (having no image base or any automatic thing)... So point is modeling something like&#xD;&#xA;&#xD;&#xA; ![alt text][1] &#xD;&#xA;&#xD;&#xA;Or look at alive flash analog [here][2]&#xD;&#xA;&#xD;&#xA;How to do such thing in unity?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ruySe.png&#xD;&#xA;  [2]: http://lab.zupko.info/pixels/" />
  <row Id="13117" PostHistoryTypeId="2" PostId="6589" RevisionGUID="7cade7df-0bc7-4ff6-b025-6cb7a8fc7faf" CreationDate="2010-12-16T21:12:26.893" UserId="2287" Text="As Joe pointed out, unity is not the right tool for this. I would suggest something as simple as glut if you do not require other features that unity offers. What you want to do is render all the desired pixels as particles off-screen, that is, on the GPU - http://http.developer.nvidia.com/GPUGems3/gpugems3_ch23.html&#xD;&#xA;&#xD;&#xA;Your particles will most likely be in a 3D grid. A large 3D grid is a problem (for example 256*256*256) as there are too many grid cells that you have to process, in which case you would want to design your own spatial graph, for example an Octree, to process only the cells that contain particles. For simpler patterns and not too many particles, you can get away with sequential grids." />
  <row Id="13118" PostHistoryTypeId="2" PostId="6590" RevisionGUID="7ec83d85-0859-405e-9e98-36f24b364645" CreationDate="2010-12-16T22:50:39.957" UserId="4048" Text="I am using a plugin DLL that I created in Visual C++ Express 2010 on windows 7 64 bit Ultimate Edition. The DLL functions properly on the machine that it was originally created on.&#xD;&#xA;&#xD;&#xA;The problem is that the DLL is not functioning in the Unity3d Editor on another machine and giving an error that basically states that the DLL is missing some of its dependencies. The target machine is running Windows 7 Home 64 bit (if this is relevant)&#xD;&#xA;&#xD;&#xA;Results from the error log of Dependency Walker:&#xD;&#xA;&#xD;&#xA;Error: The Side-by-Side configuration information for &quot;c:\users\dewayne\desktop\shared\vrpnplugin\unityplugin\build\release\OPTITRACKPLUGIN.DLL&quot; contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001). Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Error: Modules with different CPU types were found. Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.&#xD;&#xA;&#xD;&#xA;The Visual C++ Express 2010 project and solution file can be found here: https://docs.google.com/leaf?id=0B1F4pP7mRSiYMGU2YTJiNTUtOWJiMS00YTYzLThhYWQtMzNiOWJhZDU5M2M0&amp;hl=en&amp;authkey=CJSXhqgH The zip is 79MB and also contains its dependencies.&#xD;&#xA;&#xD;&#xA;The DLL in question is OptiTrackPlugin.dll&#xD;&#xA;" />
  <row Id="13119" PostHistoryTypeId="1" PostId="6590" RevisionGUID="7ec83d85-0859-405e-9e98-36f24b364645" CreationDate="2010-12-16T22:50:39.957" UserId="4048" Text="Unity Plugin DLLNotFoundException" />
  <row Id="13120" PostHistoryTypeId="3" PostId="6590" RevisionGUID="7ec83d85-0859-405e-9e98-36f24b364645" CreationDate="2010-12-16T22:50:39.957" UserId="4048" Text="&lt;c++&gt;&lt;unity&gt;" />
  <row Id="13121" PostHistoryTypeId="2" PostId="6591" RevisionGUID="9e00b286-fe00-408e-8470-e880aef2c7b3" CreationDate="2010-12-16T23:08:25.487" UserId="4049" Text="Infinity blade ask for 3GS or better devices, because I'm being told that uses openGL ES 2.&#xD;&#xA;&#xD;&#xA;Every game made with IOS version of the UDK will only work with 3GS devices and up ?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="13122" PostHistoryTypeId="1" PostId="6591" RevisionGUID="9e00b286-fe00-408e-8470-e880aef2c7b3" CreationDate="2010-12-16T23:08:25.487" UserId="4049" Text="UDK IOS compatibility confussion" />
  <row Id="13123" PostHistoryTypeId="3" PostId="6591" RevisionGUID="9e00b286-fe00-408e-8470-e880aef2c7b3" CreationDate="2010-12-16T23:08:25.487" UserId="4049" Text="&lt;iphone&gt;&lt;udk&gt;" />
  <row Id="13124" PostHistoryTypeId="2" PostId="6592" RevisionGUID="01f5058b-0a66-4629-a1ed-ac1bd49b93ba" CreationDate="2010-12-16T23:30:06.770" UserId="51" Text="You need a device that supports OGLES2, so yes." />
  <row Id="13125" PostHistoryTypeId="5" PostId="6558" RevisionGUID="a6b467b3-75f7-41f2-8910-59d043a3e996" CreationDate="2010-12-17T00:08:54.757" UserId="3830" Comment="deleted 122 characters in body" Text="Technically possible?  Yes.&#xD;&#xA;&#xD;&#xA;Future MMOs written in WebGL?  No.&#xD;&#xA;&#xD;&#xA;Today's JavaScript performance allow this?  No.&#xD;&#xA;&#xD;&#xA;Would you use a library like SceneJS [...] or write straight WebGL?  Neither.  I would use a third party application such as Unity." />
  <row Id="13126" PostHistoryTypeId="2" PostId="6593" RevisionGUID="2ffd2397-0875-4d43-b906-2fef3d5c0172" CreationDate="2010-12-17T01:00:54.297" UserDisplayName="Vaishakh" Text="Of course it is possible to develop basic games like the one given in the tutorial. http://appinventor.googlelabs.com/learn/tutorials/molemash/molemash.html&#xD;&#xA;&#xD;&#xA;High end graphical games are difficult to create using this app since it requires advanced programming knowledge." />
  <row Id="13127" PostHistoryTypeId="2" PostId="6594" RevisionGUID="81575f1f-25cd-4dd9-8985-768c14e9312c" CreationDate="2010-12-17T02:14:40.007" UserId="541" Text="I'm a total noob with regard to game programming (though not a noob to programming) and I'm using pygame + opengl to do some experiments with a little game I've been thinking of.&#xD;&#xA;&#xD;&#xA;I've been trying to import OBJ files into my pygame OpenGL &quot;game&quot;, but there's apparently different formats of OBJ files, and writing a loader is a fairly nontrivial process. At least from my experience, which is not too large.&#xD;&#xA;&#xD;&#xA;So I guess my question is: What do people generally use in the industry to read 3d model files? What about animation? Is there a place I can look into to understand?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Marcelo." />
  <row Id="13128" PostHistoryTypeId="1" PostId="6594" RevisionGUID="81575f1f-25cd-4dd9-8985-768c14e9312c" CreationDate="2010-12-17T02:14:40.007" UserId="541" Text="What are the usual tools for importing models and animations?" />
  <row Id="13129" PostHistoryTypeId="3" PostId="6594" RevisionGUID="81575f1f-25cd-4dd9-8985-768c14e9312c" CreationDate="2010-12-17T02:14:40.007" UserId="541" Text="&lt;3d&gt;&lt;best-practices&gt;&lt;models&gt;" />
  <row Id="13130" PostHistoryTypeId="2" PostId="6595" RevisionGUID="df3e7156-e17d-407c-b58b-5404b23c6926" CreationDate="2010-12-17T02:33:35.263" UserId="2187" Text="Writing a loader for OBJ models shouldn't be too hard. Its one of the simpler model formats out there. You only have to use what you need and if you are making your own models you can tailor what is exported to only what you need. &#xD;&#xA;&#xD;&#xA;I believe there is only one OBJ format, but each file can have parts omitted depending on what the model requires. One model might not use texture coordinates, so they would be missing in the file for example.&#xD;&#xA;&#xD;&#xA;Basically your loader would look something like this:&#xD;&#xA;&#xD;&#xA;    for all lines in file&#xD;&#xA;     Read next non empty line&#xD;&#xA;      Get first token&#xD;&#xA;       if token is #, skip line&#xD;&#xA;       else if token is v, make a vertex&#xD;&#xA;       else if token is vn, make a normal&#xD;&#xA;       else if token is vt, make a texture vertex&#xD;&#xA;       else if token is f, make a face&#xD;&#xA;&#xD;&#xA;You would store a list of vertices, normals, texture vertices, and faces. Each face would store indices into the other lists.&#xD;&#xA;&#xD;&#xA;Most simple models would not have more than that, even though the OBJ format can handle curves and other non polygonal data. I would bet you don't want to handle any thing else either.&#xD;&#xA;&#xD;&#xA;http://www.royriggs.com/obj.html is a good page to look at specifically for OBJ files." />
  <row Id="13131" PostHistoryTypeId="5" PostId="6595" RevisionGUID="48c4bdd9-fcc3-4bb9-8fd5-8a00e8223d04" CreationDate="2010-12-17T02:41:29.657" UserId="2187" Comment="added 316 characters in body" Text="Writing a loader for OBJ models shouldn't be too hard. Its one of the simpler model formats out there. You only have to use what you need and if you are making your own models you can tailor what is exported to only what you need. &#xD;&#xA;&#xD;&#xA;I believe there is only one OBJ format, but each file can have parts omitted depending on what the model requires. One model might not use texture coordinates, so they would be missing in the file for example.&#xD;&#xA;&#xD;&#xA;Basically your loader would look something like this:&#xD;&#xA;&#xD;&#xA;    for all lines in file&#xD;&#xA;     Read next non empty line&#xD;&#xA;      Get first token&#xD;&#xA;       if token is #, skip line&#xD;&#xA;       else if token is v, make a vertex&#xD;&#xA;       else if token is vn, make a normal&#xD;&#xA;       else if token is vt, make a texture vertex&#xD;&#xA;       else if token is f, make a face&#xD;&#xA;&#xD;&#xA;You would store a list of vertices, normals, texture vertices, and faces. Each face would store indices into the other lists.&#xD;&#xA;&#xD;&#xA;Most simple models would not have more than that, even though the OBJ format can handle curves and other non polygonal data. I would bet you don't want to handle any thing else either.&#xD;&#xA;&#xD;&#xA;http://www.royriggs.com/obj.html is a good page to look at specifically for OBJ files.&#xD;&#xA;&#xD;&#xA;What model format is used in a project depends on the engine used. For example, if you use Unreal, they have a model converter that converts model files from a 3d modeler into the unreal format. If you use a custom engine, you would probably have written your own model format, or at least your own model reader." />
  <row Id="13132" PostHistoryTypeId="2" PostId="6596" RevisionGUID="5277de98-5e47-4a6f-a2d6-abef10c98c20" CreationDate="2010-12-17T03:10:33.420" UserId="3990" Text="You might try [Jemgine][1], it doesn't technically run on WP7 but only because of a few simple shaders that could be replaced with BasicEffect.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jemgine.codeplex.com/" />
  <row Id="13133" PostHistoryTypeId="5" PostId="6558" RevisionGUID="f9e2f973-a79a-4609-86e9-e0c87b149f85" CreationDate="2010-12-17T03:50:00.513" UserId="3830" Comment="added 177 characters in body" Text="Technically possible?  Yes.  But why bother when web solutions like Unity are available?&#xD;&#xA;&#xD;&#xA;Future MMOs written in WebGL?  No. Ok maybe but there are web based plugins like Unity that do fine right now. &#xD;&#xA;&#xD;&#xA;Today's JavaScript performance allow this?  No.  Ok yes if you keep your game simple. &#xD;&#xA;&#xD;&#xA;Would you use a library like SceneJS [...] or write straight WebGL?  Neither.  I would use a third party application such as Unity." />
  <row Id="13135" PostHistoryTypeId="2" PostId="6597" RevisionGUID="d5ea9cad-663f-4aaf-84a9-b4770b9333e9" CreationDate="2010-12-17T05:29:59.387" UserId="3175" Text="I'm new to XNA (ver 4) and I'm obviously doing something wrong but I don't know what.&#xD;&#xA;&#xD;&#xA;So far I have managed to model my scene (quite simple, just a bunch of squares which are calculated--there are no models involved) correctly except for a big problem with the light.  I'm using a BasicEffect to render things, as I lower the transparency level the scene also gets darker until it goes totally black when the transparency is zero.  There's nothing black in the scene other than the background fill color (which doesn't show anywhere, anyway.)&#xD;&#xA;&#xD;&#xA;Setting various depths of the zbuffer when clearing the screen has no effect on the result.&#xD;&#xA;&#xD;&#xA;Each vertex has a color value that is being calculated and appears to be being displayed properly, I haven't tried to do anything with textures yet.  All the polygons should be completely opaque." />
  <row Id="13136" PostHistoryTypeId="1" PostId="6597" RevisionGUID="d5ea9cad-663f-4aaf-84a9-b4770b9333e9" CreationDate="2010-12-17T05:29:59.387" UserId="3175" Text="Getting a black scene with XNA, what am I doing wrong??" />
  <row Id="13137" PostHistoryTypeId="3" PostId="6597" RevisionGUID="d5ea9cad-663f-4aaf-84a9-b4770b9333e9" CreationDate="2010-12-17T05:29:59.387" UserId="3175" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;lighting&gt;" />
  <row Id="13138" PostHistoryTypeId="2" PostId="6598" RevisionGUID="9c8f4ce3-df5a-4c53-982c-7deea5cc1bd9" CreationDate="2010-12-17T08:19:35.957" UserId="860" Text="UDK for iOS requires OpenGL ES 2.0, which is not available on the PowerVR MBX GPU featured on the devices prior to the iPhone 3GS. In other words, valid targets for the iOS UDK are:&#xD;&#xA;&#xD;&#xA; - iPhone 3GS&#xD;&#xA; - iPhone 4&#xD;&#xA; - iPod Touch 3rd gen&#xD;&#xA; - iPod Touch 4th gen&#xD;&#xA; - iPad" />
  <row Id="13139" PostHistoryTypeId="2" PostId="6599" RevisionGUID="0de2c2f9-c982-4eae-bc6a-d0839baed387" CreationDate="2010-12-17T08:23:54.363" UserId="860" Text="There's a [huge collection of Quake 2 (.md2) models][1] over at Planet Quake&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://planetquake.gamespy.com/View.php?view=Quake2.List&amp;game=5&amp;category_select_id=3" />
  <row Id="13140" PostHistoryTypeId="2" PostId="6600" RevisionGUID="19d0d566-9acc-4ecc-94ef-1992a84d660f" CreationDate="2010-12-17T08:24:16.297" UserId="3326" Text="So I have a web application game that runs completely on the client side and just returns the score back to the server to list the highest scorer. Now I have noticed that I can easily manipulate the scores via accessing the variables from the console and injecting my own value! This SUCKS! I am a total noob in this kinda development and have absolutely no clue how I can stop this apart from obfuscating the code and praying to god that the hacker doesn't figure out which variable is he supposed to use! Now I was hoping there are better ways to stop the hacker to gain access of my variables. Could someone help me out with this issue!?" />
  <row Id="13141" PostHistoryTypeId="1" PostId="6600" RevisionGUID="19d0d566-9acc-4ecc-94ef-1992a84d660f" CreationDate="2010-12-17T08:24:16.297" UserId="3326" Text="Javascript injection problems to beat my game! HELP" />
  <row Id="13142" PostHistoryTypeId="3" PostId="6600" RevisionGUID="19d0d566-9acc-4ecc-94ef-1992a84d660f" CreationDate="2010-12-17T08:24:16.297" UserId="3326" Text="&lt;game-design&gt;&lt;javascript&gt;&lt;console&gt;" />
  <row Id="13143" PostHistoryTypeId="2" PostId="6601" RevisionGUID="64d1b96d-93ba-43bb-a373-60b7a1d72651" CreationDate="2010-12-17T08:27:18.680" UserId="860" Text="To answer the original question, Angry birds uses regular raster graphics (not vectors). Just unpack the .apk (it's a zip file) and have a look at the textures yourself.&#xD;&#xA;&#xD;&#xA;Angry Birds only happens to prevent you from setting a zoom factor over 1.x, thus avoiding upscaling(magnification) of the textures. It probably also uses OpenGL mip-mapping to avoid downscaling(minification) artifacts." />
  <row Id="13144" PostHistoryTypeId="2" PostId="6602" RevisionGUID="7d665896-37ef-43c7-bb5a-28c135665c61" CreationDate="2010-12-17T09:17:48.527" UserId="3656" Text="Google for &quot;javascript obfuscation&quot;. This will muddy your code up for when you deploy it. It will change your identifiers to more cryptic things so people will not be able to deduce what the score variable is called unless they monitor all the variables while running the game. Javascript's at a disadvantage since the code is directly readable by the user. Technically people can decompile Flash and read the bytecodes, but that's more work in general.&#xD;&#xA;&#xD;&#xA;The real problem lies in when you submit the score to the server. Assume the client side can not be trusted at all regardless of the technology you used to create the game. Eventually data needs to come out of the game in the form of an HTTP request that can be easily viewed and modified. Look at [this StackOverflow question][1]. When people submit scores, you need to be smart about accepting and validating them.&#xD;&#xA;&#xD;&#xA;Don't worry about this stuff until your game is robust and popular enough to warrant the concern. You'll need to analyze the relationships between player and game events and theoretically possible scores in order to make an effective anti-cheat system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/73947/what-is-the-best-way-to-stop-people-hacking-the-php-based-highscore-table-of-a-f" />
  <row Id="13145" PostHistoryTypeId="2" PostId="6603" RevisionGUID="67aedc74-7f57-4cb3-8c54-b5b6f5aff88a" CreationDate="2010-12-17T09:34:36.090" UserId="20" Text="There are already several Browser based MMOs out there. They usually don't use 3D graphics though.&#xD;&#xA;&#xD;&#xA;I'm a bit sceptic when it comes to WebGL. The current crop of browsers don't support WebGL in their normal release builds. You'll have to get special builds or mess with config files, which is more complicated to the average user than downloading a plugin.&#xD;&#xA;&#xD;&#xA;Speaking of plugins: Several people mentioned Unity, but don't forget Flash. An upcoming release of the Flash player (code-name [molehill][1]) will have GPU-accelerated 3D. My guess is, that flash will provide hardware accelerated 3D graphics in the browser before WebGL takes off.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://labs.adobe.com/technologies/flash/molehill/" />
  <row Id="13146" PostHistoryTypeId="2" PostId="6604" RevisionGUID="df687140-6fdf-41db-a903-090ae0656897" CreationDate="2010-12-17T10:14:59.297" UserDisplayName="Antony" Text="I have a problem.&#xD;&#xA;I am creating a line using CCRenderTexture in touches moved (which is shown in the following code), and created a body.&#xD;&#xA;when another body hits this body, the line is not moving but actually the body(the body of the line) is moving.&#xD;&#xA;what i want is the line should move along with this body.&#xD;&#xA;Please anyone help me to solve this problem.&#xD;&#xA;Thanks in advance.&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;- (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;	UITouch *touch = [touches anyObject];&#xD;&#xA;	CGPoint start = [touch locationInView: [touch view]];&#xD;&#xA;	start = [[CCDirector sharedDirector] convertToGL: start];&#xD;&#xA;	CGPoint end = [touch previousLocationInView:[touch view]];&#xD;&#xA;	end = [[CCDirector sharedDirector] convertToGL:end];&#xD;&#xA;&#xD;&#xA;	// begin drawing to the render texture&#xD;&#xA;	[target begin]; // CCRenderTexture (declared in .h)&#xD;&#xA;	b2BodyDef drawingBodyDef;&#xD;&#xA;&#xD;&#xA;	drawingBodyDef.userData = brush;//CCSprite&#xD;&#xA;&#xD;&#xA;	// Call the body factory which allocates memory for the ground body&#xD;&#xA;	// from a pool and creates the ground box shape (also from a pool).&#xD;&#xA;	// The body is also added to the world.&#xD;&#xA;&#xD;&#xA;	drawingBody = _world-&gt;CreateBody(&amp;drawingBodyDef);//b2Body&#xD;&#xA;	b2FixtureDef drawingboxShapeDef;&#xD;&#xA;	b2PolygonShape drawingBox;&#xD;&#xA;&#xD;&#xA;	float distance = ccpDistance(start, end);&#xD;&#xA;	if (distance &gt; 1)&#xD;&#xA;	{&#xD;&#xA;		fallingFlag=TRUE;&#xD;&#xA;		int d = (int)distance;&#xD;&#xA;		for (int i = 0; i &lt; d; i++)&#xD;&#xA;		{&#xD;&#xA;			float difx = end.x - start.x;&#xD;&#xA;			float dify = end.y - start.y;&#xD;&#xA;			float delta = (float)i / distance;&#xD;&#xA;			[brush setPosition:ccp(start.x + (difx * delta), start.y + (dify * delta))];&#xD;&#xA;			//brush.tag=2;&#xD;&#xA;			brush.opacity =200;&#xD;&#xA;			drawingBodyDef.position.Set(brush.position.x/PTM_RATIO, brush.position.y/PTM_RATIO);&#xD;&#xA;			// Call visit to draw the brush, don't call draw..&#xD;&#xA;			[brush visit]; //CCSprite&#xD;&#xA;			drawingboxShapeDef.density = 100.0;&#xD;&#xA;			drawingboxShapeDef.friction = 0.0;&#xD;&#xA;			drawingboxShapeDef.restitution = 0.0f;&#xD;&#xA;&#xD;&#xA;			drawingboxShapeDef.shape = &amp;drawingBox;&#xD;&#xA;&#xD;&#xA;			//drawingBox.SetAsEdge(b2Vec2((start.x + (difx * delta)-brush.contentSize.width/2)/PTM_RATIO ,( start.y + (dify * delta)-brush.contentSize.height/2 )/PTM_RATIO), b2Vec2((start.x + (difx * delta)+brush.contentSize.width/2)/PTM_RATIO ,( start.y + (dify * delta)+brush.contentSize.height/2 )/PTM_RATIO));&#xD;&#xA;			drawingBox.SetAsEdge(b2Vec2((start.x + (difx * delta)-brush.contentSize.width/2)/PTM_RATIO ,brush.position.y/PTM_RATIO), b2Vec2((start.x + (difx * delta)+brush.contentSize.width/2)/PTM_RATIO ,brush.position.y/PTM_RATIO));&#xD;&#xA;&#xD;&#xA;			drawingBody-&gt;CreateFixture(&amp;drawingboxShapeDef);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;			[target end];&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;" />
  <row Id="13147" PostHistoryTypeId="1" PostId="6604" RevisionGUID="df687140-6fdf-41db-a903-090ae0656897" CreationDate="2010-12-17T10:14:59.297" UserDisplayName="Antony" Text="problem with CCRenderTexture ?" />
  <row Id="13148" PostHistoryTypeId="3" PostId="6604" RevisionGUID="df687140-6fdf-41db-a903-090ae0656897" CreationDate="2010-12-17T10:14:59.297" UserDisplayName="Antony" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="13149" PostHistoryTypeId="2" PostId="6605" RevisionGUID="7bae79d8-dfb7-4ed6-9263-d146da5d121a" CreationDate="2010-12-17T10:53:17.130" UserId="721" Text="On Android platform, there are:&#xD;&#xA;&#xD;&#xA; - 320 * 240 (1.33)&#xD;&#xA; - 400 * 240 (1.66)&#xD;&#xA; - 480 * 320 (1.5)&#xD;&#xA; - 800 * 480 (1.66)&#xD;&#xA; - 854 * 480 (1.77)&#xD;&#xA; - 1024 * 600 (1.71)&#xD;&#xA;&#xD;&#xA;So, when you design your game in 2D, you must think about it. You have two technical solutions:&#xD;&#xA;&#xD;&#xA; - choice a ratio (1.66 is the most widespread) and use black bands (like movies)&#xD;&#xA; - Select a bounding box in which you cannot zoom out and another one for the zoom-in.&#xD;&#xA;&#xD;&#xA;I use this method for Moblox and paint levels with these boxes. For best rendering on most phones, my bounding boxes have 1.66 ratio. With ratio 1.33 or 1.77 phones, there are background elements not visible but i have designed my Level with centered actions. So players don't care.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13150" PostHistoryTypeId="5" PostId="6591" RevisionGUID="2d40f0ec-8a27-43c2-bec1-4a8372526916" CreationDate="2010-12-17T12:01:19.757" UserId="744" Comment="Improve title and grammar, remove greeting and signature." Text="Infinity Blade asks for 3GS or better devices, which I'm told is because it uses OpenGL ES 2.&#xD;&#xA;&#xD;&#xA;Will every game made with the iOS version of the UDK only work with 3GS devices and up?&#xD;&#xA;" />
  <row Id="13151" PostHistoryTypeId="4" PostId="6591" RevisionGUID="2d40f0ec-8a27-43c2-bec1-4a8372526916" CreationDate="2010-12-17T12:01:19.757" UserId="744" Comment="Improve title and grammar, remove greeting and signature." Text="What are the minimum requirements for UDK on iOS?" />
  <row Id="13152" PostHistoryTypeId="6" PostId="6591" RevisionGUID="2d40f0ec-8a27-43c2-bec1-4a8372526916" CreationDate="2010-12-17T12:01:19.757" UserId="744" Comment="Improve title and grammar, remove greeting and signature." Text="&lt;iphone&gt;&lt;hardware&gt;&lt;udk&gt;" />
  <row Id="13153" PostHistoryTypeId="5" PostId="6571" RevisionGUID="cf3c7b63-49a5-4b67-9024-1b1136ff20af" CreationDate="2010-12-17T12:05:45.573" UserId="744" Comment="added 1 characters in body; edited tags; edited title" Text="[Google's App Inventor][1] is a WYSIWYG application development environment for Android.&#xD;&#xA;It allows you to control logic of your program using jigsaw type pieces.&#xD;&#xA;&#xD;&#xA; - Is it possible to develop games using&#xD;&#xA;   this technology? &#xD;&#xA; - Are there any obvious potential pitfalls?&#xD;&#xA; - What are the limitations of using this technology as compared to programmatic development for Android (such as using Java)?&#xD;&#xA;&#xD;&#xA;A screenshot showing how behaviour can be controlled using the blocks editor:&#xD;&#xA;![App Inventors blocks editor][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://appinventor.googlelabs.com/&#xD;&#xA;  [2]: http://i.stack.imgur.com/A6viv.png" />
  <row Id="13154" PostHistoryTypeId="4" PostId="6571" RevisionGUID="cf3c7b63-49a5-4b67-9024-1b1136ff20af" CreationDate="2010-12-17T12:05:45.573" UserId="744" Comment="added 1 characters in body; edited tags; edited title" Text="Is it possible to develop games using Google's App Inventor?" />
  <row Id="13155" PostHistoryTypeId="6" PostId="6571" RevisionGUID="cf3c7b63-49a5-4b67-9024-1b1136ff20af" CreationDate="2010-12-17T12:05:45.573" UserId="744" Comment="added 1 characters in body; edited tags; edited title" Text="&lt;android&gt;&lt;tools&gt;" />
  <row Id="13156" PostHistoryTypeId="2" PostId="6606" RevisionGUID="7ddd8178-32a5-4925-a649-7bd847317804" CreationDate="2010-12-17T13:24:46.160" UserId="3644" Text="Don't use glGet* when you can access local variables, e.g.:&#xD;&#xA;&#xD;&#xA; - Don't query textures size from OpenGL, store them on loading in variables&#xD;&#xA; - Don't query line widths / points sizes from OpenGL when you can store the changes in your application&#xD;&#xA;&#xD;&#xA;These calls are really slow&#xD;&#xA;&#xD;&#xA;Move unused stuff outside of glBegin - glEnd clause (be it glColor or glNormal or anything else) if it does not changes inside. OpenGL is a state machine, it uses the last value." />
  <row Id="13157" PostHistoryTypeId="2" PostId="6607" RevisionGUID="4f5b8ca1-ef17-4c3a-9418-63d3df5a7fd4" CreationDate="2010-12-17T13:56:18.397" UserId="1743" Text="I am getting the following error ONLY when running my game in Firefox (3.6)&#xD;&#xA;&#xD;&#xA;&gt; Component returned failure code:&#xD;&#xA;&gt; 0x80040111 (NS_ERROR_NOT_AVAILABLE)&#xD;&#xA;&gt; [nsIDOMCanvasRenderingContext2D.drawImage]&#xD;&#xA;&#xD;&#xA;The issue does not occur in the other major browsers, and my game runs completely fine after I click 'OK.'&#xD;&#xA;&#xD;&#xA;Here are a few snippets of code where I have localized the issue to.  Has anybody seen this issue before?  According to Google it has something to do with drawing the image before it is loaded, but from my understanding I am loading it properly before using it!.&#xD;&#xA;&#xD;&#xA;**player class**&#xD;&#xA;&#xD;&#xA;    var player = new (function(){&#xD;&#xA;      var that = this;&#xD;&#xA;      that.image = new Image();&#xD;&#xA;      that.image.src = &quot;res/enemy1_sprites.png&quot;;&#xD;&#xA;      that.width = 16;&#xD;&#xA;      that.height = 16;&#xD;&#xA;      that.frames = 2;&#xD;&#xA;      that.actualFrame = 0;&#xD;&#xA;      that.spriteXoffset = 0;&#xD;&#xA;      that.spriteYoffset = 0;&#xD;&#xA;      that.moved = false;&#xD;&#xA;      that.boundary = false;&#xD;&#xA;      that.num_balls = 5;&#xD;&#xA;      that.rootX = 350;&#xD;&#xA;      that.rootY = 250;&#xD;&#xA;      that.ballX = [that.rootX,0,0,0,0];&#xD;&#xA;      that.ballY = [that.rootY,that.rootY,that.rootY,that.rootY,that.rootY];&#xD;&#xA;    &#xD;&#xA;      that.directions = {&quot;up&quot;:0, &quot;right&quot;:1, &quot;down&quot;:2, &quot;left&quot;:3};&#xD;&#xA;      that.dirs  = [that.directions.right,that.directions.right,that.directions.right,that.directions.right,that.directions.right];&#xD;&#xA;    &#xD;&#xA;      for (i = 1; i &lt; that.num_balls; i++)&#xD;&#xA;        that.ballX[i] = that.rootX - (i * that.width);&#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;    ...&#xD;&#xA;    &#xD;&#xA;    that.draw = function(){&#xD;&#xA;        try {&#xD;&#xA;          for (var i = that.num_balls-1; i &gt;= 0; i--)&#xD;&#xA;          {&#xD;&#xA;            // update animation&#xD;&#xA;            switch (that.dirs[i])&#xD;&#xA;            {&#xD;&#xA;              case that.directions.left:&#xD;&#xA;                that.moveLeft();&#xD;&#xA;              break;&#xD;&#xA;              case that.directions.right:&#xD;&#xA;                that.moveRight();&#xD;&#xA;              break;&#xD;&#xA;              case that.directions.up:&#xD;&#xA;                that.moveUp();&#xD;&#xA;              break;&#xD;&#xA;              case that.directions.down:&#xD;&#xA;                that.moveDown();&#xD;&#xA;              break;&#xD;&#xA;            }&#xD;&#xA;            ctx.drawImage(that.image, that.spriteXoffset, that.spriteYoffset, that.width, that.height, that.ballX[i], that.ballY[i], that.width, that.height);&#xD;&#xA;          }&#xD;&#xA;        } &#xD;&#xA;        catch (e) {&#xD;&#xA;          alert(e.message);&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        if (that.moved)&#xD;&#xA;        {&#xD;&#xA;          if (that.spriteYoffset &gt; 0)&#xD;&#xA;            that.spriteYoffset = 0;&#xD;&#xA;          else&#xD;&#xA;            that.spriteYoffset += 16;&#xD;&#xA;          that.moved = false;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    })();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**game loop**&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     var GameLoop = function(){&#xD;&#xA;        ..&#xD;&#xA;        ..&#xD;&#xA;         player.move();&#xD;&#xA;         player.draw();&#xD;&#xA;        ..&#xD;&#xA;        ..&#xD;&#xA;          if (state)&#xD;&#xA;            gLoop = setTimeout(GameLoop, GAME_SPEED);&#xD;&#xA;        }" />
  <row Id="13158" PostHistoryTypeId="1" PostId="6607" RevisionGUID="4f5b8ca1-ef17-4c3a-9418-63d3df5a7fd4" CreationDate="2010-12-17T13:56:18.397" UserId="1743" Text="HTML Canvas drawing - Firefox error" />
  <row Id="13159" PostHistoryTypeId="3" PostId="6607" RevisionGUID="4f5b8ca1-ef17-4c3a-9418-63d3df5a7fd4" CreationDate="2010-12-17T13:56:18.397" UserId="1743" Text="&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;&lt;browser-based-games&gt;" />
  <row Id="13160" PostHistoryTypeId="2" PostId="6608" RevisionGUID="a14279b5-e5c4-45b6-ad90-4a2ed3816743" CreationDate="2010-12-17T14:13:32.843" UserId="4056" Text="I want to start development of Games. Please suggest me which one is easier to and preferable in respect to designing, developmnet and learning&#xD;&#xA;&#xD;&#xA;1. Flex,&#xD;&#xA;2. Silverligh [any version],&#xD;&#xA;3. HTML,&#xD;&#xA;4. Asp.net,&#xD;&#xA;5. PHP&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13161" PostHistoryTypeId="1" PostId="6608" RevisionGUID="a14279b5-e5c4-45b6-ad90-4a2ed3816743" CreationDate="2010-12-17T14:13:32.843" UserId="4056" Text="Which one woul be preferred as a game development language/tool?" />
  <row Id="13162" PostHistoryTypeId="3" PostId="6608" RevisionGUID="a14279b5-e5c4-45b6-ad90-4a2ed3816743" CreationDate="2010-12-17T14:13:32.843" UserId="4056" Text="&lt;game-design&gt;" />
  <row Id="13163" PostHistoryTypeId="6" PostId="6608" RevisionGUID="83a6ab4a-adcc-4505-bc15-01f79d3c9b17" CreationDate="2010-12-17T14:26:14.007" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;language-choice&gt;" />
  <row Id="13164" PostHistoryTypeId="2" PostId="6609" RevisionGUID="e534f29f-3952-47f4-849f-130911af5551" CreationDate="2010-12-17T14:36:18.537" UserId="1156" Text="This is an all too common question. Short answer? A language is a tool to an end, so it doesn't really matter what you pick. As for designing, language choice isn't an issue. &#xD;&#xA;&#xD;&#xA;I've never tried Flex or ASP.NET, so I can't comment on those. But what kind of games are you meaning to make? All you've listed is web development.&#xD;&#xA;&#xD;&#xA;Silverlight is ok, as far as I've heard (sort of Microsoft's Flash). 3D might be something of an issue, though.  &#xD;&#xA;I've heard things about the &lt; canvas &gt; tag in HTML5, but other than that: You can't, and I'm not counting things like the 'Choose left or right' as a game.&#xD;&#xA;PHP is used for browser based games like Tribal Wars or those clicky ones. You can't make an actual real-time game with PHP.&#xD;&#xA;&#xD;&#xA;If we expand it to not just web development, some other options are C/C++, C#, and Python.&#xD;&#xA;&#xD;&#xA;C/C++ (I'm grouping them because they're similar) are probably the most widely used for game development. There's plenty of 3rd party support for it, it's fast, and flexible. However, it is very difficult for a beginner to pick up. Assuming you haven't got past programming experience, I wouldn't recommend. Otherwise, if you want full control, it's good.&#xD;&#xA;&#xD;&#xA;C# and .Net/Mono are good for starting choices. The language is easy enough to pick up, XNA is a great framework, you have plenty of development options (Xbox, PC, W7 Phone). The downside is that it's harder to run on a non-Windows machine.&#xD;&#xA;&#xD;&#xA;I currently love Python, so this is probably a little biased. It's very easy to learn and pick up, and doesn't need much code at all to make games with, compared to C++. However, it does lack in the low-level side of things and speed. So it's more widely used with a C-engine and Python scripting.&#xD;&#xA;&#xD;&#xA;There's also Unity3D. It's a game engine/environment, with great scripting in JS and C#. It can do mobile platforms, desktop platforms, and web editing.&#xD;&#xA;&#xD;&#xA;But if I had to choose from your 5, I would have to go for HTML/PHP if you wanted a static type game, or Flex or Silverlight (what about Flash?) if you wanted a real time.&#xD;&#xA;" />
  <row Id="13165" PostHistoryTypeId="6" PostId="5671" RevisionGUID="74731521-5848-4590-9a29-ef0df9a00075" CreationDate="2010-12-17T14:37:55.880" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;libraries&gt;&lt;sound&gt;&lt;fmod&gt;" />
  <row Id="13166" PostHistoryTypeId="2" PostId="6610" RevisionGUID="b1cbf4a4-1d80-4b08-9d65-26cb326534ba" CreationDate="2010-12-17T15:01:16.823" UserId="2091" Text="  The javascript is loaded and starts executing before you load the image, as you pointed out.&#xD;&#xA;When you do:&#xD;&#xA;&#xD;&#xA;    that.image = new Image();&#xD;&#xA;    that.image.src = &quot;res/enemy1_sprites.png&quot;;&#xD;&#xA;&#xD;&#xA;  You are starting to load it, but then the javascript continues executing and reaches your line &#xD;&#xA;&#xD;&#xA;    ctx.drawImage(that.image, that.spriteXoffset, that.spriteYoffset, that.width, that.height, that.ballX[i], that.ballY[i], that.width, that.height);&#xD;&#xA;&#xD;&#xA;... without knowing if the image is loaded or not.  You need to check for that.  The question is where to wait for the image to be loaded.  An easy option is to modify your draw() function, so that the line I just quoted above this paragraph becomes:&#xD;&#xA;&#xD;&#xA;    if (that.image.complete)&#xD;&#xA;        ctx.drawImage(that.image, ...)&#xD;&#xA;&#xD;&#xA;  But in this case you will be updating the whole game before being able to show it.  It would be better to make the game wait for the image to be loaded.   Then the game loop becomes something like:&#xD;&#xA;   &#xD;&#xA;    ..&#xD;&#xA;    if (player.image.complete) {&#xD;&#xA;        player.move();&#xD;&#xA;        player.draw();&#xD;&#xA;    }&#xD;&#xA;    ..&#xD;&#xA;&#xD;&#xA;  If you have more than one image in your game (and not just the player one), you should wait for all of them to be loaded before launching the GameLoop function.  This way you don't have to introduce extra checks within your game code.  You can do that by launching a function with a timeout that periodically checks if all of them are loaded.  When the condition is met, then you can launch GameLoop.  But that is just an idea, there might be better ways.&#xD;&#xA;" />
  <row Id="13168" PostHistoryTypeId="2" PostId="6611" RevisionGUID="81dcdbfc-fb30-486e-8c5f-f5dc176ec2b0" CreationDate="2010-12-17T16:41:09.303" UserId="1829" Text="I find that a dead creature falling realistically is boring.&#xD;&#xA;&#xD;&#xA;I wonder, has any game implemented an animation system where the model moves depending of the muscle forces and the velocity of the limbs, but calculated ingame ?&#xD;&#xA;&#xD;&#xA;It is much faster to have determinate animation data which is loaded and is just read sequentially, but it looks much &quot;static&quot;.&#xD;&#xA;&#xD;&#xA;Since I hear a lot about procedural generated data, one could generate a body with its own animation depending of the weight of the bones.&#xD;&#xA;&#xD;&#xA;I'm not talking about a real-life robot simulation where the bone is standing, auto-adjusting some angles to keep balance, but something more intermediate and more pre-calculated.&#xD;&#xA;&#xD;&#xA;The forces vary slightly between steps (some random on a float so vary plus or minus 10%), so the trajectory of the limbsvary between steps.&#xD;&#xA;&#xD;&#xA;It would require a lot of adjustement and preconfiguration, but it would look much less deterministic." />
  <row Id="13169" PostHistoryTypeId="1" PostId="6611" RevisionGUID="81dcdbfc-fb30-486e-8c5f-f5dc176ec2b0" CreationDate="2010-12-17T16:41:09.303" UserId="1829" Text="Ragdoll on alive creatures: has somebody already implemented it ?" />
  <row Id="13170" PostHistoryTypeId="3" PostId="6611" RevisionGUID="81dcdbfc-fb30-486e-8c5f-f5dc176ec2b0" CreationDate="2010-12-17T16:41:09.303" UserId="1829" Text="&lt;physics&gt;&lt;procedural-generation&gt;" />
  <row Id="13171" PostHistoryTypeId="2" PostId="6612" RevisionGUID="c4d0c326-e021-492e-b947-7dd96b74d5b5" CreationDate="2010-12-17T16:48:40.363" UserId="853" Text=" I'm new to game development and am curious to know if you can add your own cg effects? Like if I wanted to add fog to my game and UDK didn't support that, is that possible? &#xD;&#xA;&#xD;&#xA; What kind of coding does one do, in a engine like UDK?" />
  <row Id="13172" PostHistoryTypeId="1" PostId="6612" RevisionGUID="c4d0c326-e021-492e-b947-7dd96b74d5b5" CreationDate="2010-12-17T16:48:40.363" UserId="853" Text="UDK, can you add your own effects? " />
  <row Id="13173" PostHistoryTypeId="3" PostId="6612" RevisionGUID="c4d0c326-e021-492e-b947-7dd96b74d5b5" CreationDate="2010-12-17T16:48:40.363" UserId="853" Text="&lt;udk&gt;" />
  <row Id="13174" PostHistoryTypeId="2" PostId="6613" RevisionGUID="7023ed88-dd25-4566-a6c2-6a2d09064907" CreationDate="2010-12-17T16:50:30.423" UserId="3505" Text="At lest some of the Unreal games use ragdoll figures, but they are only visual, the game mechanics rely on simple physics." />
  <row Id="13175" PostHistoryTypeId="2" PostId="6614" RevisionGUID="89d040bb-e69b-4651-b2fd-dee26931b817" CreationDate="2010-12-17T16:56:04.657" UserId="744" Text="&lt;a href=&quot;http://naturalmotion.com/euphoria&quot;&gt;NaturalMotion's Euphoria engine&lt;/a&gt; simulates a &quot;motor nervous system&quot; to do procedural animations. It's been used in a couple games, notably GTA4 when pedestrians are hit by cars.&#xD;&#xA;&#xD;&#xA;It's still considerably more expensive than static animations, and you'll rarely see more than a few models animated at a time with such a system." />
  <row Id="13176" PostHistoryTypeId="5" PostId="6609" RevisionGUID="41e93829-f2b0-43a5-bd14-73ef1ef6ad27" CreationDate="2010-12-17T16:56:48.307" UserId="1156" Comment="added 50 characters in body" Text="This is an all too common question. Short answer? A language is a tool to an end, so it doesn't really matter what you pick. As for designing, language choice isn't an issue. &#xD;&#xA;&#xD;&#xA;I've never tried Flex or ASP.NET, so I can't comment on those. But what kind of games are you meaning to make? All you've listed is web development.&#xD;&#xA;&#xD;&#xA;Silverlight is ok, as far as I've heard (sort of Microsoft's Flash). 3D might be something of an issue, though.  &#xD;&#xA;I've heard things about the &lt; canvas &gt; tag in HTML5, but other than that: You can't, and I'm not counting things like the 'Choose left or right' as a game. EDIT: See eBusiness's comment; I forgot about JS.&#xD;&#xA;PHP is used for browser based games like Tribal Wars or those clicky ones. You can't make an actual real-time game with PHP.&#xD;&#xA;&#xD;&#xA;If we expand it to not just web development, some other options are C/C++, C#, and Python.&#xD;&#xA;&#xD;&#xA;C/C++ (I'm grouping them because they're similar) are probably the most widely used for game development. There's plenty of 3rd party support for it, it's fast, and flexible. However, it is very difficult for a beginner to pick up. Assuming you haven't got past programming experience, I wouldn't recommend. Otherwise, if you want full control, it's good.&#xD;&#xA;&#xD;&#xA;C# and .Net/Mono are good for starting choices. The language is easy enough to pick up, XNA is a great framework, you have plenty of development options (Xbox, PC, W7 Phone). The downside is that it's harder to run on a non-Windows machine.&#xD;&#xA;&#xD;&#xA;I currently love Python, so this is probably a little biased. It's very easy to learn and pick up, and doesn't need much code at all to make games with, compared to C++. However, it does lack in the low-level side of things and speed. So it's more widely used with a C-engine and Python scripting.&#xD;&#xA;&#xD;&#xA;There's also Unity3D. It's a game engine/environment, with great scripting in JS and C#. It can do mobile platforms, desktop platforms, and web editing.&#xD;&#xA;&#xD;&#xA;But if I had to choose from your 5, I would have to go for HTML/PHP if you wanted a static type game, or Flex or Silverlight (what about Flash?) if you wanted a real time.&#xD;&#xA;" />
  <row Id="13177" PostHistoryTypeId="2" PostId="6615" RevisionGUID="de204f66-55c9-49e9-b35a-2307c1cfa30d" CreationDate="2010-12-17T16:58:37.580" UserId="3830" Text="To see this done in an extreme way, check out the game &quot;QWOP&quot;, where the player is 100% ragdoll and you use key commands to move the legs.  &#xD;&#xA;&#xD;&#xA;http://www.foddy.net/Athletics.html" />
  <row Id="13178" PostHistoryTypeId="2" PostId="6616" RevisionGUID="e900f880-823b-490f-9f15-2b8ccb1eaefd" CreationDate="2010-12-17T16:58:53.897" UserId="4058" Text="Your first idea was good. All you have to do, is take into account the distance between the points the first bullet traveled on each frame, and make sure the second one travels the same distance each frame, meaning that it might &quot;skip&quot; some of the points plotted by the first projectile, or plot some points of its own to match the speed of the first projectile." />
  <row Id="13179" PostHistoryTypeId="5" PostId="6597" RevisionGUID="550ce64d-df10-4ae0-8881-8f1ca1295a97" CreationDate="2010-12-17T17:11:19.610" UserId="3175" Comment="added 2959 characters in body" Text="I'm new to XNA (ver 4) and I'm obviously doing something wrong but I don't know what.&#xD;&#xA;&#xD;&#xA;So far I have managed to model my scene (quite simple, just a bunch of squares which are calculated--there are no models involved) correctly except for a big problem with the light.  I'm using a BasicEffect to render things, as I lower the transparency level the scene also gets darker until it goes totally black when the transparency is zero.  There's nothing black in the scene other than the background fill color (which doesn't show anywhere, anyway.)&#xD;&#xA;&#xD;&#xA;Setting various depths of the zbuffer when clearing the screen has no effect on the result.&#xD;&#xA;&#xD;&#xA;Each vertex has a color value that is being calculated and appears to be being displayed properly, I haven't tried to do anything with textures yet.  All the polygons should be completely opaque.&#xD;&#xA;&#xD;&#xA;Edit:  I didn't add the code before because I think this is some misunderstanding of how things work rather than a simple bug.  This code generates all the triangles where they are supposed to be, the only problem is lighting.&#xD;&#xA;&#xD;&#xA;    		private void PushBox(int x, int y, int z, int Distance)&#xD;&#xA;		{&#xD;&#xA;			if (World.MapData[x, y, z].Contents.Impassible()) return;&#xD;&#xA;			if (World.MapData[x, y, z].Scanned) return;&#xD;&#xA;			if (Distance &gt;= MaxDistance) return;&#xD;&#xA;			World.MapData[x, y, z].Scanned = true;&#xD;&#xA;			// Left&#xD;&#xA;			if (World.MapData[x + 1, y, z].Contents.Impassible())&#xD;&#xA;				Walls.Square(Vertex(x + 1, y, z, WallColor), Vertex(x + 1, y + 1, z, WallColor), Vertex(x + 1, y + 1, z + 1, WallColor), Vertex(x + 1, y, z + 1, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x + 1, y, z, Distance + 1);&#xD;&#xA;			// Right&#xD;&#xA;			if (World.MapData[x - 1, y, z].Contents.Impassible())&#xD;&#xA;				Walls.Square(Vertex(x, y, z, WallColor), Vertex(x, y, z + 1, WallColor), Vertex(x, y + 1, z + 1, WallColor), Vertex(x, y + 1, z, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x - 1, y, z, Distance + 1);&#xD;&#xA;			// Behind&#xD;&#xA;			if (World.MapData[x, y - 1, z].Contents.Impassible())&#xD;&#xA;				//Distance = Distance;&#xD;&#xA;				Walls.Square(Vertex(x, y, z, WallColor), Vertex(x, y, z + 1, WallColor), Vertex(x + 1, y, z + 1, WallColor), Vertex(x + 1, y, z, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y - 1, z, Distance + 1);&#xD;&#xA;			// Front&#xD;&#xA;			if (World.MapData[x, y + 1, z].Contents.Impassible())&#xD;&#xA;				Walls.Square(Vertex(x, y + 1, z, WallColor), Vertex(x, y + 1, z + 1, WallColor), Vertex(x + 1, y + 1, z + 1, WallColor), Vertex(x + 1, y + 1, z, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y + 1, z, Distance + 1);&#xD;&#xA;			if (World.MapData[x, y, z - 1].Contents.Impassible())&#xD;&#xA;				Ceiling.Square(Vertex(x, y, z, CeilingColor), Vertex(x, y + 1, z, CeilingColor), Vertex(x + 1, y + 1, z, CeilingColor), Vertex(x + 1, y, z, CeilingColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y, z - 1, Distance + 1);&#xD;&#xA;			if (World.MapData[x, y, z + 1].Contents.Impassible())&#xD;&#xA;				Floor.Square(Vertex(x, y, z + 1, FloorColor), Vertex(x + 1, y, z + 1, FloorColor), Vertex(x + 1, y + 1, z + 1, FloorColor), Vertex(x, y + 1, z + 1, FloorColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y, z + 1, Distance + 1);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		private VertexPositionColor Vertex(int x, int y, int z, Color Base)&#xD;&#xA;		{&#xD;&#xA;			float Distance = Math.Abs(State.xLocation - x) + Math.Abs(State.yLocation - y) + Math.Abs(State.zLocation - z);&#xD;&#xA;			float Scale = Math.Max((MaxDistance - Distance) / MaxDistance, 0);&#xD;&#xA;			Color ThisColor = Color.Multiply(Base, Scale);&#xD;&#xA;			//ThisColor = Color.White;&#xD;&#xA;			return new VertexPositionColor(new Vector3(x, y, z), ThisColor);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;and the main draw routine:&#xD;&#xA;&#xD;&#xA;    		protected override void Draw(GameTime gameTime)&#xD;&#xA;		{&#xD;&#xA;			GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, MaxDepth, 0);&#xD;&#xA;&#xD;&#xA;			// TODO: Add your drawing code here&#xD;&#xA;&#xD;&#xA;			spriteBatch.Begin();&#xD;&#xA;			DrawStatusMessages();&#xD;&#xA;			DrawDungeon();&#xD;&#xA;			spriteBatch.End();&#xD;&#xA;			base.Draw(gameTime);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13180" PostHistoryTypeId="2" PostId="6617" RevisionGUID="dc45f8dd-4d78-4bf2-9f87-283a76f15c67" CreationDate="2010-12-17T17:51:45.760" UserId="3020" Text="Another situation where the scrips are useful is when we want our engine to be extensible by plugins/addons. These extensions are created in many cases by non-professional people (like advanced gamers and enthusiasts). Scripts are safer and easier for this purpose. By using scripts, they don't need to use compilers, and don't need to be aware of pointers...&#xD;&#xA;&#xD;&#xA;A great example of this is the game World of Warcraft. It has thousands of addons created by the comunity. These addons are writen using LUA + XML." />
  <row Id="13181" PostHistoryTypeId="5" PostId="6617" RevisionGUID="5ec4cf44-bb1c-4d4e-8167-2ebb308558c7" CreationDate="2010-12-17T17:57:04.650" UserId="3020" Comment="added 1 characters in body; added 1 characters in body" Text="Another situation where the scrips are useful is when we want our engine to be extensible by plugins/addons. These extensions are created in many cases by non-professional people (like advanced gamers and enthusiasts). Scripts are safer and easier for this purpose. By using scripts, they don't need to use compilers, and don't need to be aware of pointers...&#xD;&#xA;&#xD;&#xA;A great example of this is the game World of Warcraft. It has thousands of addons created by the community. These addons are written using LUA + XML." />
  <row Id="13182" PostHistoryTypeId="5" PostId="2913" RevisionGUID="6c9cfc12-f2d8-4720-a179-74610916cb73" CreationDate="2010-12-17T17:58:59.693" UserId="744" Comment="Fix grammar and add some tags." Text="In my current project, Lua scripts are called by the C++ functions on the server side.&#xD;&#xA;After that, the scripts again call the C++ functions still in that solution.&#xD;&#xA;Why should we do such things and not call the C++ function directly?&#xD;&#xA;What are the situations in which scripts are needed?" />
  <row Id="13183" PostHistoryTypeId="4" PostId="2913" RevisionGUID="6c9cfc12-f2d8-4720-a179-74610916cb73" CreationDate="2010-12-17T17:58:59.693" UserId="744" Comment="Fix grammar and add some tags." Text="Why do we use scripts in development? " />
  <row Id="13184" PostHistoryTypeId="6" PostId="2913" RevisionGUID="6c9cfc12-f2d8-4720-a179-74610916cb73" CreationDate="2010-12-17T17:58:59.693" UserId="744" Comment="Fix grammar and add some tags." Text="&lt;scripting&gt;&lt;language-choice&gt;&lt;languages&gt;" />
  <row Id="13185" PostHistoryTypeId="5" PostId="6617" RevisionGUID="ee34d27a-3acc-4197-8a22-16c3c21b048e" CreationDate="2010-12-17T18:03:29.420" UserId="3020" Comment="deleted 5 characters in body" Text="One scenario where the scrips are useful is when we want our engine to be extensible by plugins/addons. These extensions are created in many cases by non-professional people (like advanced gamers and enthusiasts). Scripts are safer and easier for this purpose. By using scripts, they don't need to use compilers, and don't need to be aware of pointers...&#xD;&#xA;&#xD;&#xA;A great example of this is the game World of Warcraft. It has thousands of addons created by the community. These addons are written using LUA + XML." />
  <row Id="13186" PostHistoryTypeId="2" PostId="6618" RevisionGUID="2338cd66-4227-45c2-b0fe-9c91d5a5637c" CreationDate="2010-12-17T18:07:09.670" UserId="982" Text="I know there's a breakdown of Sonic the Hedgehog physics found [here][1], and I was wondering, does there exist a breakdown of any of the Mario games? Something similar to this but for Mario is what I'm interested in!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://info.sonicretro.org/Sonic_Physics_Guide" />
  <row Id="13187" PostHistoryTypeId="1" PostId="6618" RevisionGUID="2338cd66-4227-45c2-b0fe-9c91d5a5637c" CreationDate="2010-12-17T18:07:09.670" UserId="982" Text="Analysis of Mario game Physics" />
  <row Id="13188" PostHistoryTypeId="3" PostId="6618" RevisionGUID="2338cd66-4227-45c2-b0fe-9c91d5a5637c" CreationDate="2010-12-17T18:07:09.670" UserId="982" Text="&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="13189" PostHistoryTypeId="5" PostId="6618" RevisionGUID="e0b1642e-2da7-485e-a2cc-0811407e9eef" CreationDate="2010-12-17T18:39:37.273" UserId="14" Comment="deleted 13 characters in body" Text="I know there's a breakdown of Sonic the Hedgehog physics found [here][1], and I was wondering, does there exist a breakdown of any of the Mario games? Something similar to this but for Mario is what I'm interested in!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://info.sonicretro.org/Sonic_Physics_Guide" />
  <row Id="13190" PostHistoryTypeId="2" PostId="6619" RevisionGUID="cf9ad674-0fbd-4bd1-9cc4-b0d0eed20810" CreationDate="2010-12-17T18:51:18.227" UserId="3505" Text="I'd advise that you start out making some small 2D games, it takes a lot of time and skill to get 3D stuff looking good, and as a beginner you are better off waiting with those worries.&#xD;&#xA;&#xD;&#xA;To answer your question, yes you can add your own effects in UDK, primarily using shaders. But I'd guess it ships with a bunch of effects, a fog effect would probably be very easy to include in a game, whereas some other shader effects would require some specific instructions in order to only apply where they should.&#xD;&#xA;&#xD;&#xA;UDK has some C branch language included, I guess it's not very different from common programming languages, there is also some visual code editor, but I guess the former is preferable." />
  <row Id="13191" PostHistoryTypeId="2" PostId="6620" RevisionGUID="4a1897eb-601e-43d7-8a63-a0535ed64375" CreationDate="2010-12-17T19:07:42.447" UserId="4062" Text="I don't know about a breakdown of the physics, but there are commented disassemblies of the original Super Mario Bros and Super Mario World floating around the internet. Romhacking.net, nesdev.parodius.com, acmlm.kafuka.org, smwcentral.net and their respective forums would probably be the best places to get that kind of information." />
  <row Id="13192" PostHistoryTypeId="5" PostId="6620" RevisionGUID="ad8eb881-7703-47db-b5da-07d4bb841b6e" CreationDate="2010-12-17T19:24:29.183" UserId="4062" Comment="Added Links" Text="I don't know about a breakdown of the physics, but there are commented disassemblies of the original Super Mario Bros and Super Mario World floating around the internet. [Romhacking.net][1], [nesdev.parodius.com][2], [Acmlm Board2][3], [SMWCentral][4] and their respective forums would probably be the best places to get that kind of information.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.romhacking.net&#xD;&#xA;  [2]: http://nesdev.parodius.com&#xD;&#xA;  [3]: http://acmlm.kafuka.org&#xD;&#xA;  [4]: http://www.smwcentral.net" />
  <row Id="13193" PostHistoryTypeId="2" PostId="6621" RevisionGUID="ecf42662-9377-45bc-afef-73f2746db1c7" CreationDate="2010-12-17T19:44:47.847" UserId="14" Text="What you ask is possible. There are a variety of nice tutorials on the [UDN][1] and on the [UDK forum][2] that shows you how to do exactly what you ask.&#xD;&#xA;&#xD;&#xA;UDK, Like Unreal Engine uses the [UnrealScript][3] scripting language. Inspired by C++ and Java it's fairly easy to come to grips with. You don't have access to source code using the UDK.&#xD;&#xA;&#xD;&#xA;Also, there is a visual scripting language called [Kismet][4] And it is usually how people accomplish what you may be looking to do from your question.&#xD;&#xA;&#xD;&#xA;I also recommend [Raven67854's Tutorial Series on Youtube][5]. It's an excellent primer for getting started.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://udn.epicgames.com/&#xD;&#xA;  [2]: http://forums.epicgames.com/forumdisplay.php?f=371&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/UnrealScript&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Kismet_(gameplay_scripting)#Kismet&#xD;&#xA;  [5]: http://www.youtube.com/user/raven67854#grid/user/0C836EF4FD8D91B8" />
  <row Id="13194" PostHistoryTypeId="2" PostId="6622" RevisionGUID="f257586b-cf29-426f-a40f-7bae04a987ee" CreationDate="2010-12-17T21:00:20.177" UserId="1278" Text="I'd like to draw very large (~500 px) graphics of planets slowly rotating. These graphics are meant to impress. What's the best way of doing this? I don't have experience with any particular 3D engine, and I'm not even sure what platform this game would run on,  so:&#xD;&#xA;&#xD;&#xA;* I could pre-render each frame, but at 500px and a rotation period of 10 seconds, that's a ludicrous amount of data per planet.&#xD;&#xA;* I could use a 3D engine and map the planet's texture onto a mesh approaching a sphere, but at 500px, I fear the polygon count would have to be huge to make it look good.&#xD;&#xA;* I could write a kind of custom 3D engine that does nothing but efficiently render a textured sphere, by converting the x/y coordinate of each view pixel into the coordinate space of the sphere's texture - but this is involved, and couldn't benefit from graphics acceleration.&#xD;&#xA;* Something else I haven't thought of?&#xD;&#xA;&#xD;&#xA;Here's an example animated GIF of what I mean. (At 100x100 px and 60 frames, it's already pretty huge, sorry.) Imagine this much, much bigger, rotating much slower, and animated more smoothly:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;But if this were 500x500 px and 10 x 25 = 250 frames, we'd be talking about hundreds of MB of data, so this straightforward approach doesn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Gk3JT.gif" />
  <row Id="13195" PostHistoryTypeId="1" PostId="6622" RevisionGUID="f257586b-cf29-426f-a40f-7bae04a987ee" CreationDate="2010-12-17T21:00:20.177" UserId="1278" Text="Drawing very large slowly rotating planets" />
  <row Id="13196" PostHistoryTypeId="3" PostId="6622" RevisionGUID="f257586b-cf29-426f-a40f-7bae04a987ee" CreationDate="2010-12-17T21:00:20.177" UserId="1278" Text="&lt;2d&gt;&lt;3d&gt;&lt;graphics&gt;&lt;graphics-programming&gt;" />
  <row Id="13200" PostHistoryTypeId="2" PostId="6624" RevisionGUID="bbde1b9f-b246-4368-80d3-3471a96f7307" CreationDate="2010-12-17T21:04:21.860" UserId="2692" Text="I might be missing something simple here. But shouldn't this be exactly what should happen?&#xD;&#xA;&#xD;&#xA;For instance. &#xD;&#xA;&#xD;&#xA; if i have a black piece of paper, and apply a completely transparent piece of paper on top of it. All I'm going to do is see through the transparency to the black?&#xD;&#xA;&#xD;&#xA; Have you tried just rendering any old texture in the background first, and seeing if the screen turns to whatever colour the background texture is when turned transparent?" />
  <row Id="13204" PostHistoryTypeId="2" PostId="6626" RevisionGUID="e9a82630-d8f5-44cc-b467-9afdda2d5ee0" CreationDate="2010-12-17T21:22:35.277" UserId="744" Text="The number of polygons to render a &quot;good looking&quot; 500x500px sphere with a single draw call is trivial for GPUs to handle on most platforms, especially if there isn't much else in the scene. &lt;a href=&quot;http://www.opengl.org/wiki/Texturing_a_Sphere&quot;&gt;There's also some notes about texturing spheres to avoid texel distortion; make sure to use a cube map.&lt;/a&gt;" />
  <row Id="13205" PostHistoryTypeId="2" PostId="6627" RevisionGUID="1c74d29f-2b7c-4d07-8948-473dc465bae4" CreationDate="2010-12-17T21:46:49.627" UserId="2943" Text="I would rather NOT use glaux.h, but I need to make it run some code from gametutorials.com. How can I find it and install it? I've followed the instructions of a couple of google results, but I'm still getting: &#xD;&#xA;&#xD;&#xA;    &gt;LINK : fatal error LNK1104: cannot open file 'glaux.lib' " />
  <row Id="13206" PostHistoryTypeId="1" PostId="6627" RevisionGUID="1c74d29f-2b7c-4d07-8948-473dc465bae4" CreationDate="2010-12-17T21:46:49.627" UserId="2943" Text="How can I get and install glaux.h in Visual Studio 2008?" />
  <row Id="13207" PostHistoryTypeId="3" PostId="6627" RevisionGUID="1c74d29f-2b7c-4d07-8948-473dc465bae4" CreationDate="2010-12-17T21:46:49.627" UserId="2943" Text="&lt;opengl&gt;" />
  <row Id="13208" PostHistoryTypeId="5" PostId="5548" RevisionGUID="e653f20b-9cc7-4c17-9a46-e05b32b2c6b2" CreationDate="2010-12-17T22:13:06.663" UserId="3325" Comment="deleted 17 characters in body" Text="I just finished a 4-month internship at working on a very large game.  The project was very late stage when I got there, so most of what I did was bug fixing.  That probably would have been a decent portion of my time anyways ... using my experience with coding to fix bugs instead of my inexperience with game development to design or develop features.&#xD;&#xA; &#xD;&#xA;A lot of what I did was also sort of IT related.  Developing internal tools was a big thing -- some to directly help with game dev, some to automate things that were manually done before.  And of course, bug fixes for other tools, including Microsoft's Games for Windows Live installer.&#xD;&#xA; &#xD;&#xA;Playtesting was another decently large part, and I also was responsible for making some of the builds that got pushed to playtesters.  Bugs in the game world are pretty hard to track down and require a lot of work to figure out the cause.&#xD;&#xA; &#xD;&#xA;I did not specialize in games or graphics, so presumably any job you did would be more related to your expertise than this.  But I hope it gives you an idea." />
  <row Id="13209" PostHistoryTypeId="8" PostId="5548" RevisionGUID="b57abb87-0ae8-4f40-99df-514875300782" CreationDate="2010-12-17T22:13:24.153" UserId="3325" Comment="Rollback to [411fcf57-fd56-4bf6-9576-5ae2460e43b7]" Text="I just finished a 4-month internship with Blue Castle Games, working on Dead Rising 2.  The project was very late stage when I got there, so most of what I did was bug fixing.  That probably would have been a decent portion of my time anyways ... using my experience with coding to fix bugs instead of my inexperience with game development to design or develop features.&#xD;&#xA; &#xD;&#xA;A lot of what I did was also sort of IT related.  Developing internal tools was a big thing -- some to directly help with game dev, some to automate things that were manually done before.  And of course, bug fixes for other tools, including Microsoft's Games for Windows Live installer.&#xD;&#xA; &#xD;&#xA;Playtesting was another decently large part, and I also was responsible for making some of the builds that got pushed to playtesters.  Bugs in the game world are pretty hard to track down and require a lot of work to figure out the cause.&#xD;&#xA; &#xD;&#xA;I did not specialize in games or graphics, so presumably any job you did would be more related to your expertise than this.  But I hope it gives you an idea." />
  <row Id="13210" PostHistoryTypeId="8" PostId="5548" RevisionGUID="a2bdf2fa-e035-482f-8e9d-67e107e1ad88" CreationDate="2010-12-17T22:13:28.957" UserId="3325" Comment="Rollback to [e653f20b-9cc7-4c17-9a46-e05b32b2c6b2]" Text="I just finished a 4-month internship at working on a very large game.  The project was very late stage when I got there, so most of what I did was bug fixing.  That probably would have been a decent portion of my time anyways ... using my experience with coding to fix bugs instead of my inexperience with game development to design or develop features.&#xD;&#xA; &#xD;&#xA;A lot of what I did was also sort of IT related.  Developing internal tools was a big thing -- some to directly help with game dev, some to automate things that were manually done before.  And of course, bug fixes for other tools, including Microsoft's Games for Windows Live installer.&#xD;&#xA; &#xD;&#xA;Playtesting was another decently large part, and I also was responsible for making some of the builds that got pushed to playtesters.  Bugs in the game world are pretty hard to track down and require a lot of work to figure out the cause.&#xD;&#xA; &#xD;&#xA;I did not specialize in games or graphics, so presumably any job you did would be more related to your expertise than this.  But I hope it gives you an idea." />
  <row Id="13211" PostHistoryTypeId="10" PostId="6627" RevisionGUID="0a3b1294-6b0f-4509-b9dc-96139e8f16ec" CreationDate="2010-12-17T22:19:01.693" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="13212" PostHistoryTypeId="2" PostId="6628" RevisionGUID="306a172e-5f74-4a65-868e-a32193d555fd" CreationDate="2010-12-17T22:39:48.600" UserId="3830" Text="If you are doing this in a 2D setting, see this previous question...&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6199/3d-illusion-of-a-2d-planet-texture/6250#6250&#xD;&#xA;&#xD;&#xA;The same concept would work fine with a large image and by dynamically moving the terrain texture on a layer beneath the &quot;hole&quot; in space.&#xD;&#xA;&#xD;&#xA;Read the above link to know what I mean by this." />
  <row Id="13213" PostHistoryTypeId="5" PostId="6597" RevisionGUID="9842c456-b942-4756-b0aa-66ec910bd812" CreationDate="2010-12-17T22:54:46.193" UserId="3175" Comment="added 446 characters in body" Text="I'm new to XNA (ver 4) and I'm obviously doing something wrong but I don't know what.&#xD;&#xA;&#xD;&#xA;So far I have managed to model my scene (quite simple, just a bunch of squares which are calculated--there are no models involved) correctly except for a big problem with the light.  I'm using a BasicEffect to render things, as I lower the transparency level the scene also gets darker until it goes totally black when the transparency is zero.  There's nothing black in the scene other than the background fill color (which doesn't show anywhere, anyway.)&#xD;&#xA;&#xD;&#xA;Setting various depths of the zbuffer when clearing the screen has no effect on the result.&#xD;&#xA;&#xD;&#xA;Each vertex has a color value that is being calculated and appears to be being displayed properly, I haven't tried to do anything with textures yet.  All the polygons should be completely opaque.&#xD;&#xA;&#xD;&#xA;Edit again:&#xD;&#xA;Fusspawn solved half my problem--my understanding of alpha was backwards.  That still doesn't explain why I can see through things even when alpha is at 1.0, though.&#xD;&#xA;&#xD;&#xA;Edit:  I didn't add the code before because I think this is some misunderstanding of how things work rather than a simple bug.  This code generates all the triangles where they are supposed to be, the only problem is lighting.&#xD;&#xA;&#xD;&#xA;(Note:  I've replaced the recursive hunt with a breadth-first one to get the cutoff distance right.  No change to the vision problem.)&#xD;&#xA;&#xD;&#xA;    		private void PushBox(int x, int y, int z, int Distance)&#xD;&#xA;		{&#xD;&#xA;			if (World.MapData[x, y, z].Contents.Impassible()) return;&#xD;&#xA;			if (World.MapData[x, y, z].Scanned) return;&#xD;&#xA;			if (Distance &gt;= MaxDistance) return;&#xD;&#xA;			World.MapData[x, y, z].Scanned = true;&#xD;&#xA;			// Left&#xD;&#xA;			if (World.MapData[x + 1, y, z].Contents.Impassible())&#xD;&#xA;				Walls.Square(Vertex(x + 1, y, z, WallColor), Vertex(x + 1, y + 1, z, WallColor), Vertex(x + 1, y + 1, z + 1, WallColor), Vertex(x + 1, y, z + 1, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x + 1, y, z, Distance + 1);&#xD;&#xA;			// Right&#xD;&#xA;			if (World.MapData[x - 1, y, z].Contents.Impassible())&#xD;&#xA;				Walls.Square(Vertex(x, y, z, WallColor), Vertex(x, y, z + 1, WallColor), Vertex(x, y + 1, z + 1, WallColor), Vertex(x, y + 1, z, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x - 1, y, z, Distance + 1);&#xD;&#xA;			// Behind&#xD;&#xA;			if (World.MapData[x, y - 1, z].Contents.Impassible())&#xD;&#xA;				//Distance = Distance;&#xD;&#xA;    This square is generated wrong (no such square was visible so I didn't catch it), it's now fixed.  It isn't the problem.&#xD;&#xA;				Walls.Square(Vertex(x, y, z, WallColor), Vertex(x, y, z + 1, WallColor), Vertex(x + 1, y, z + 1, WallColor), Vertex(x + 1, y, z, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y - 1, z, Distance + 1);&#xD;&#xA;			// Front&#xD;&#xA;			if (World.MapData[x, y + 1, z].Contents.Impassible())&#xD;&#xA;				Walls.Square(Vertex(x, y + 1, z, WallColor), Vertex(x, y + 1, z + 1, WallColor), Vertex(x + 1, y + 1, z + 1, WallColor), Vertex(x + 1, y + 1, z, WallColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y + 1, z, Distance + 1);&#xD;&#xA;			if (World.MapData[x, y, z - 1].Contents.Impassible())&#xD;&#xA;				Ceiling.Square(Vertex(x, y, z, CeilingColor), Vertex(x, y + 1, z, CeilingColor), Vertex(x + 1, y + 1, z, CeilingColor), Vertex(x + 1, y, z, CeilingColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y, z - 1, Distance + 1);&#xD;&#xA;			if (World.MapData[x, y, z + 1].Contents.Impassible())&#xD;&#xA;				Floor.Square(Vertex(x, y, z + 1, FloorColor), Vertex(x + 1, y, z + 1, FloorColor), Vertex(x + 1, y + 1, z + 1, FloorColor), Vertex(x, y + 1, z + 1, FloorColor));&#xD;&#xA;			else&#xD;&#xA;				PushBox(x, y, z + 1, Distance + 1);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		private VertexPositionColor Vertex(int x, int y, int z, Color Base)&#xD;&#xA;		{&#xD;&#xA;			float Distance = Math.Abs(State.xLocation - x) + Math.Abs(State.yLocation - y) + Math.Abs(State.zLocation - z);&#xD;&#xA;			float Scale = Math.Max((MaxDistance - Distance) / MaxDistance, 0);&#xD;&#xA;			Color ThisColor = Color.Multiply(Base, Scale);&#xD;&#xA;			//ThisColor = Color.White;&#xD;&#xA;			return new VertexPositionColor(new Vector3(x, y, z), ThisColor);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;and the main draw routine:&#xD;&#xA;&#xD;&#xA;    		protected override void Draw(GameTime gameTime)&#xD;&#xA;		{&#xD;&#xA;			GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, MaxDepth, 0);&#xD;&#xA;&#xD;&#xA;			// TODO: Add your drawing code here&#xD;&#xA;&#xD;&#xA;			spriteBatch.Begin();&#xD;&#xA;			DrawStatusMessages();&#xD;&#xA;			DrawDungeon();&#xD;&#xA;			spriteBatch.End();&#xD;&#xA;			base.Draw(gameTime);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13214" PostHistoryTypeId="2" PostId="6629" RevisionGUID="c5c459f8-9948-4874-8bdd-6114873777ab" CreationDate="2010-12-17T23:37:47.947" UserId="101" Text="If I understand correctly, and you're asking specifically about adding your own Cg/HLSL, the short answer is, no, you cannot write your own shader code. I've been down that path, and eventually had an Epic employee tell me that everything I wanted to do is impossible in UDK.&#xD;&#xA;&#xD;&#xA;Question here: http://gamedev.stackexchange.com/questions/3045&#xD;&#xA;&#xD;&#xA;Epic forum thread: http://forums.epicgames.com/showthread.php?t=741801" />
  <row Id="13215" PostHistoryTypeId="2" PostId="6630" RevisionGUID="7643237a-e13e-472a-a5a3-e6949da5c80d" CreationDate="2010-12-18T00:36:55.857" UserId="4062" Text="**Make user stories for the type of play styles the game is supposed to appeal to**&#xD;&#xA;&#xD;&#xA;If the focus is on exploration, try to avoid penalizing the player for it, both in terms of deaths that send the player back, as well as in time spent backtracking.&#xD;&#xA;&#xD;&#xA;If the game is to appeal to players who like speed runs, consider different ways that the player can optimize their path - have some weapons kill enemies faster than others (Megaman), have some paths with fewer obstacles or further away from bottomless pits (Sonic 3&amp;K).&#xD;&#xA;&#xD;&#xA;If the game is intended to appeal toward players who try to make perfect runs, make sure that &quot;game over&quot; isn't a significant penalty (Ikaruga, Megaman). Also, keep in mind that difficulty is combinatorial: If an obstacle has a 10% chance of being beaten on a given try, 3 of those obstacles in a row gives a chance of 0.1% - sure, players get better with practice, but they make mistakes, too, so make sure to add checkpoints in between, or lower levels for the player to fall onto.&#xD;&#xA;&#xD;&#xA;If narrative is a significant part of the game, keep the pace slow to ensure the player becomes attached to the scenery. Vary scenery intentionally - not just to keep the player engaged with the narrative, but as a visual cue for change in game mechanics (ice, water) or difficulty. [ColourLovers][1] is your friend.&#xD;&#xA;&#xD;&#xA;Consider whether randomly generated levels would benefit or detract from your design:&#xD;&#xA;&#xD;&#xA; - Can be a plus for multiplayer arenas, tactical RPGs, RTS, arcade shooters, and casual games&#xD;&#xA; - Usually a minus for games with a focus on speed/perfect runs or heavy narrative, where the player has a strong relationship with the level design.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.colourlovers.com/" />
  <row Id="13216" PostHistoryTypeId="2" PostId="6631" RevisionGUID="a59510d6-d191-4a5c-8d70-9b47f17cf75c" CreationDate="2010-12-18T00:45:37.540" UserId="2943" Text="I'm looking at a tutorial in which both the terms camera moving and &quot;strafing&quot; are used. I looked onto dictionary.com and found:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;**strafe**&#xD;&#xA;&gt; verb (used with object)&#xD;&#xA;&gt; 1. to attack (ground troops or installations) by airplanes with&#xD;&#xA;&gt; machine-gun fire.&#xD;&#xA;&gt; 2. Slang . to reprimand viciously. –noun&#xD;&#xA;&gt; 3. a strafing attack.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;WTF???&#xD;&#xA;&#xD;&#xA;I'm not a native english speaker. " />
  <row Id="13217" PostHistoryTypeId="1" PostId="6631" RevisionGUID="a59510d6-d191-4a5c-8d70-9b47f17cf75c" CreationDate="2010-12-18T00:45:37.540" UserId="2943" Text="What does it mean to &quot;strafe&quot; the camera? " />
  <row Id="13218" PostHistoryTypeId="3" PostId="6631" RevisionGUID="a59510d6-d191-4a5c-8d70-9b47f17cf75c" CreationDate="2010-12-18T00:45:37.540" UserId="2943" Text="&lt;camera&gt;" />
  <row Id="13219" PostHistoryTypeId="2" PostId="6632" RevisionGUID="30a90c57-38d1-4e4d-8ae2-0e3123aefb94" CreationDate="2010-12-18T00:58:33.040" UserId="395" Text="Strafing is generally moving directly left or right, instead of rotating the camera." />
  <row Id="13220" PostHistoryTypeId="2" PostId="6633" RevisionGUID="12e9aab8-aa43-4959-9b3d-f802fc10a18c" CreationDate="2010-12-18T01:25:04.703" UserId="288" Text="It's a gaming term, so here are the relevant definitions: [Wikipedia][2], [Urban Dictionary][1]&#xD;&#xA;&#xD;&#xA;Basically it means translating/moving the camera (or player) left and right, where left and right are defined by the camera's current orientation.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.urbandictionary.com/define.php?term=strafe&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Strafing_(gaming)" />
  <row Id="13221" PostHistoryTypeId="2" PostId="6634" RevisionGUID="81c6792c-5c2e-4d3b-8fab-5a7a83f516a4" CreationDate="2010-12-18T02:03:04.547" UserId="3175" Text="A newbie to XNA here.  This is a followup to my previous [question][1] that showed me part of what I was doing wrong but I'm still not getting what I want.  I'm setting up a BasicEffect thus:&#xD;&#xA;&#xD;&#xA;    Effect = new BasicEffect(GraphicsDevice);&#xD;&#xA;    Effect.VertexColorEnabled = true;&#xD;&#xA;    Effect.Alpha = 1.0f;&#xD;&#xA;    Effect.GraphicsDevice.DepthStencilState = DepthStencilState.Default;&#xD;&#xA;    Effect.GraphicsDevice.BlendState = BlendState.Opaque;&#xD;&#xA;&#xD;&#xA;and the draw loop:&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, MaxDepth, 0);&#xD;&#xA;&#xD;&#xA;All polygons are being rendered where and how I wish except they should be fully opaque and they aren't.  The actual image looks more like the various colors are being combined in a fashion I'm not sure about.  (A fairly light red over nearly white is yielding something slightly whiter.  {It might be getting some red tint but I would be unlikely to see this if it were.}  The same red over another somewhat darker red is yielding a brighter red {thus ruling out a simple take the max} and I'm not sure what's happening with the same red over a darker green {again, my eyes are the probable culprit.})&#xD;&#xA;&#xD;&#xA;At another point I have no problem at all making out near white polygons that are behind two red polygons.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6597/getting-a-black-scene-with-xna-what-am-i-doing-wrong" />
  <row Id="13222" PostHistoryTypeId="1" PostId="6634" RevisionGUID="81c6792c-5c2e-4d3b-8fab-5a7a83f516a4" CreationDate="2010-12-18T02:03:04.547" UserId="3175" Text="Why are my polygons not opaque?" />
  <row Id="13223" PostHistoryTypeId="3" PostId="6634" RevisionGUID="81c6792c-5c2e-4d3b-8fab-5a7a83f516a4" CreationDate="2010-12-18T02:03:04.547" UserId="3175" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="13227" PostHistoryTypeId="2" PostId="6636" RevisionGUID="89e9d349-9b16-46ca-888f-abcaf13c6454" CreationDate="2010-12-18T02:45:31.947" UserId="2943" Text="Is there any opensource chess engine that I can use to practice my OpenGL skillset? I think it would be a neat exercise. " />
  <row Id="13228" PostHistoryTypeId="1" PostId="6636" RevisionGUID="89e9d349-9b16-46ca-888f-abcaf13c6454" CreationDate="2010-12-18T02:45:31.947" UserId="2943" Text="Chess engine on which to apply a custom-made OpenGL skin" />
  <row Id="13229" PostHistoryTypeId="3" PostId="6636" RevisionGUID="89e9d349-9b16-46ca-888f-abcaf13c6454" CreationDate="2010-12-18T02:45:31.947" UserId="2943" Text="&lt;engine&gt;&lt;opengl&gt;&lt;ai&gt;" />
  <row Id="13230" PostHistoryTypeId="2" PostId="6637" RevisionGUID="604a3ebb-fb7d-4c7a-a4b8-f113e9aed9ab" CreationDate="2010-12-18T03:13:20.670" UserId="3446" Text="You could take a look at [GNU Chess][1] . I'm not 100% sure, but I think there was a Python project that used GNU Chess as the AI &quot;engine&quot;, so you can probably extend it to and make a 3D frontend.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gnu.org/software/chess/" />
  <row Id="13231" PostHistoryTypeId="2" PostId="6638" RevisionGUID="614b8bdc-dd67-4d5c-8d49-cd60d4099d33" CreationDate="2010-12-18T03:39:27.537" UserId="2943" Text="I want to implement cel shading into my opengl game. I have only found a nehe tutorial that uses glaux (old as hell). I'm looking into it, but I wanna avoid the pain of learning how to translate those old glaux functions/variables. Is there any cel shading tutorial out there that uses glut/sdl? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=37" />
  <row Id="13232" PostHistoryTypeId="1" PostId="6638" RevisionGUID="614b8bdc-dd67-4d5c-8d49-cd60d4099d33" CreationDate="2010-12-18T03:39:27.537" UserId="2943" Text="Is there any opengl cel shading tutorial out there (without GLAUX)? " />
  <row Id="13233" PostHistoryTypeId="3" PostId="6638" RevisionGUID="614b8bdc-dd67-4d5c-8d49-cd60d4099d33" CreationDate="2010-12-18T03:39:27.537" UserId="2943" Text="&lt;opengl&gt;" />
  <row Id="13234" PostHistoryTypeId="2" PostId="6639" RevisionGUID="cb22d7fd-7559-470a-87db-4bd593f3563a" CreationDate="2010-12-18T05:59:44.303" UserId="3963" Text="4X games (That is, Xpand, Xplore, Xploit and Xterminate) like Civilization, Sins of a Solar Empire, and other top Strategy games, all seem to have the same addictive hook. I'd like to know what elements these developers incorporate into their games to make them:&#xD;&#xA;&#xD;&#xA; - Well paced (You can't beat the game in 5 minutes, but it wont take a week)&#xD;&#xA; - Replayable (The first game isn't your last)&#xD;&#xA; - Competetive (The AI doesn't play like a 3 year old)&#xD;&#xA; - Not repetetive (Such as using the same strategy over and over, or spamming units)&#xD;&#xA; - Economical (Not having 7 trillion metal and coins after 10 minutes of play)&#xD;&#xA; - Not to much micro-managing&#xD;&#xA; - Exciting (Necessary?) combat&#xD;&#xA; - You stil need to use *strategy*&#xD;&#xA; - Intuitive interfaces (Civilization 5 is a good example)&#xD;&#xA; - And any other important parts to the Strategy/4X genre&#xD;&#xA;&#xD;&#xA;Some of these seem pretty simple, but others look like balancing acts, and I'd like to have some opinions on how to make a game that isn't **fun to play**. I'd be grateful if anyone could answer tell me how you or another game\developer has managed to successfully balance them together. &#xD;&#xA;" />
  <row Id="13235" PostHistoryTypeId="1" PostId="6639" RevisionGUID="cb22d7fd-7559-470a-87db-4bd593f3563a" CreationDate="2010-12-18T05:59:44.303" UserId="3963" Text="Successful Elements to a 4X Game " />
  <row Id="13236" PostHistoryTypeId="3" PostId="6639" RevisionGUID="cb22d7fd-7559-470a-87db-4bd593f3563a" CreationDate="2010-12-18T05:59:44.303" UserId="3963" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;strategy&gt;" />
  <row Id="13237" PostHistoryTypeId="2" PostId="6640" RevisionGUID="8ea7f5b5-916f-4981-b43d-bdb2373ca0c4" CreationDate="2010-12-18T06:58:12.060" UserId="154" Text="Strafe is more of a character term than a camera term, although in games I've seen people use it for cameras since they are often directly linked to character movement. &#xD;&#xA;&#xD;&#xA;Typically when talking about a camera the movements are. &#xD;&#xA;&#xD;&#xA; - Tilt (rotation on fixed position camera to look up/down)&#xD;&#xA; - Pan (rotation on fixed position camera to look left/right)&#xD;&#xA; - Dolly In/Out (physically moving the camera towards or away from the subject)&#xD;&#xA; - Zoom In/Out (changing the focal length of a fixed position camera to make the subject appear larger) &#xD;&#xA; - Truck Left/Right* (physically moving the camera left/right as defined by current orientation, this is what is matched to &quot;Strafe&quot; for characters)&#xD;&#xA; - Pedestal Up/Down (physically move the camera up/down)&#xD;&#xA; - Arc Left/Right (physically orbit the camera around some central object involving a combination of Panning and Trucking)&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;*Truck is regularly used in TV, but sometimes Dolly is used for both forward/back and left/right movements." />
  <row Id="13238" PostHistoryTypeId="2" PostId="6641" RevisionGUID="3e8a2565-836a-4c20-82e8-143462a55c23" CreationDate="2010-12-18T10:03:31.923" UserId="1156" Text="[Here's][1] an article explaining all the processes behind it, but not actually giving code.&#xD;&#xA;&#xD;&#xA;Or there's the fact you also asked this on SO too, which is wasting everybody's time.&#xD;&#xA;&#xD;&#xA;&gt; Try the [Linux/GLUT][2] or [Linux/SDL][3]&#xD;&#xA;&gt; versions. No glaux.h needed.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The Visual C++ version doesn't seem to&#xD;&#xA;&gt; actually use anything from glaux.h, it&#xD;&#xA;&gt; just #incudes it.&#xD;&#xA;&#xD;&#xA;Above quote from [genpfault][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/articles/article1438.asp&#xD;&#xA;  [2]: http://nehe.gamedev.net/data/lessons/linux/lesson37.tar.gz&#xD;&#xA;  [3]: http://nehe.gamedev.net/data/lessons/linuxsdl/lesson37.tar.gz&#xD;&#xA;  [4]: http://stackoverflow.com/users/44729/genpfault" />
  <row Id="13239" PostHistoryTypeId="2" PostId="6642" RevisionGUID="f6849abe-fcd2-4db7-8300-2aad0c80bbab" CreationDate="2010-12-18T11:17:20.553" UserId="721" Text="You should search Toon Shading too.&#xD;&#xA;&#xD;&#xA;For english readers, [a short tutorial.][1]&#xD;&#xA;&#xD;&#xA;For french readers, there is [a great tutorial][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cse.unr.edu/~mahsman/courses/cs791a/&#xD;&#xA;  [2]: http://raptor.developpez.com/tutorial/rendering/celshading/ " />
  <row Id="13240" PostHistoryTypeId="2" PostId="6643" RevisionGUID="5d1b7936-09ef-4042-be05-112efd12d524" CreationDate="2010-12-18T13:52:22.907" UserId="1829" Text="Everybody heard about the release of the Quake3 source code.&#xD;&#xA;&#xD;&#xA;But since it's plain C but uses OOP a little, isn't it too complex to decipher or to use for large projects such as a 3rd person shooter/hack&amp;slash with smooth camera movements ?&#xD;&#xA;&#xD;&#xA;Would it be a good idea to use it instead of Ogre, I want to be sure it's really harder to use since it's only an engine dedicated to FPS.&#xD;&#xA;&#xD;&#xA;Ogre seems to be a standard OSS, especially when thinking about OOP, but since I'm not looking for complex effects and since the rendering quality of quake3 seems to be good enough to me, I wanted to ask what did the release of the quake3 engine changed for open source developpers (except the infamous invsqrt method).&#xD;&#xA;&#xD;&#xA;I heard Carmack released it for students or people alike, but C++ is here: is quake3's code obsolete compared to Ogre's when it comes to learning ?" />
  <row Id="13241" PostHistoryTypeId="1" PostId="6643" RevisionGUID="5d1b7936-09ef-4042-be05-112efd12d524" CreationDate="2010-12-18T13:52:22.907" UserId="1829" Text="Is quake3/ioquake's OOP good to do a large game ?" />
  <row Id="13242" PostHistoryTypeId="3" PostId="6643" RevisionGUID="5d1b7936-09ef-4042-be05-112efd12d524" CreationDate="2010-12-18T13:52:22.907" UserId="1829" Text="&lt;c++&gt;&lt;3d-engines&gt;&lt;c&gt;" />
  <row Id="13243" PostHistoryTypeId="2" PostId="6644" RevisionGUID="0c86d9a9-ab5b-436d-86b5-debcecb0d74b" CreationDate="2010-12-18T15:13:38.877" UserId="2239" Text="[FlatRedBall][1] is an actively maintained XNA-based (MDX version still exists but isn't maintained I think) 2.5D engine that supports Windows Phone 7 as well as XNA PC and XNA Xbox 360 (and it's also simple to integrate with Farseer).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/frb/blog/" />
  <row Id="13244" PostHistoryTypeId="5" PostId="6634" RevisionGUID="cbc672ab-1550-4e9b-951d-aa13c58a4a8b" CreationDate="2010-12-18T15:39:04.207" UserId="3175" Comment="Replaced the description with a screenshot" Text="A newbie to XNA here.  This is a followup to my previous [question][1] that showed me part of what I was doing wrong but I'm still not getting what I want.  I'm setting up a BasicEffect thus:&#xD;&#xA;&#xD;&#xA;    Effect = new BasicEffect(GraphicsDevice);&#xD;&#xA;    Effect.VertexColorEnabled = true;&#xD;&#xA;    Effect.Alpha = 1.0f;&#xD;&#xA;    Effect.GraphicsDevice.DepthStencilState = DepthStencilState.Default;&#xD;&#xA;    Effect.GraphicsDevice.BlendState = BlendState.Opaque;&#xD;&#xA;&#xD;&#xA;and the draw loop:&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, MaxDepth, 0);&#xD;&#xA;&#xD;&#xA;All polygons are being rendered where and how I wish except they should be fully opaque and they aren't.  The actual image looks more like the various colors are being combined in a fashion I'm not sure about:&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6597/getting-a-black-scene-with-xna-what-am-i-doing-wrong&#xD;&#xA;  [2]: http://i.stack.imgur.com/BpmVu.jpg" />
  <row Id="13245" PostHistoryTypeId="2" PostId="6645" RevisionGUID="6b00a01a-65f0-46e7-8901-d908f555a55a" CreationDate="2010-12-18T16:14:01.587" UserId="3874" Text="&#xD;&#xA;I want to make a 2D game that is basically a physics driven sandbox / activity game. There is something I really do not understand though. From research, it seems like updates from the server should only be about every 100ms. I can see how this works for a player since they can just concurrently simulate physics and do lag compensation through interpolation.&#xD;&#xA;&#xD;&#xA;What I do not understand is how this works for updates from other players. If clients only get notified of player positions every 100ms, I do not see how that works because a lot can happen in 100ms. The player could have changed direction twice or so in that time. I was wondering if anyone would have some insight on this issue.&#xD;&#xA;&#xD;&#xA;Basically how does this work for shooting and stuff like that?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="13246" PostHistoryTypeId="1" PostId="6645" RevisionGUID="6b00a01a-65f0-46e7-8901-d908f555a55a" CreationDate="2010-12-18T16:14:01.587" UserId="3874" Text="Lag compensation with networked 2D games" />
  <row Id="13247" PostHistoryTypeId="3" PostId="6645" RevisionGUID="6b00a01a-65f0-46e7-8901-d908f555a55a" CreationDate="2010-12-18T16:14:01.587" UserId="3874" Text="&lt;game-design&gt;&lt;c++&gt;&lt;network&gt;" />
  <row Id="13248" PostHistoryTypeId="2" PostId="6646" RevisionGUID="bc93ce07-41aa-4b72-949e-d5b0579d9120" CreationDate="2010-12-18T16:16:44.243" UserId="2798" Text="You must set the DepthStencilState and BlendState before drawing the object, and not when creating your Effect, just like this:&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, MaxDepth, 0);&#xD;&#xA;    GraphicsDevice.DepthStencilState = DepthStencilState.Default;&#xD;&#xA;    GraphicsDevice.BlendState = BlendState.Opaque;&#xD;&#xA;    &#xD;&#xA;    DrawYourThings();" />
  <row Id="13249" PostHistoryTypeId="2" PostId="6647" RevisionGUID="f6a3ba5c-7ad8-455f-8e94-c419fd6a4dc5" CreationDate="2010-12-18T17:45:33.417" UserId="4065" Text="In the end its all about making do with the available network resources. Ideally we would live in a world with zero latency and everything can be perfectly synchronized. Realistically, you update the clients every 100, 200, 300 ms and in the client there needs to be logic in place to make what has happened look smooth. The &quot;smoothness&quot; is very important, in the end the game just needs to feel smooth even if at the back end there is some chaotic synchronization happening between client and server.&#xD;&#xA;&#xD;&#xA;A good post and better answer can be found:&#xD;&#xA;&#xD;&#xA;[How to write a network game?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/249/how-to-write-a-network-game" />
  <row Id="13250" PostHistoryTypeId="5" PostId="6639" RevisionGUID="90ccd6f3-5f64-4fdd-9272-6ca40c6b0c29" CreationDate="2010-12-18T17:57:48.677" UserId="3963" Comment="deleted 3 characters in body" Text="4X games (That is, Xpand, Xplore, Xploit and Xterminate) like Civilization, Sins of a Solar Empire, and other top Strategy games, all seem to have the same addictive hook. I'd like to know what elements these developers incorporate into their games to make them:&#xD;&#xA;&#xD;&#xA; - Well paced (You can't beat the game in 5 minutes, but it wont take a week)&#xD;&#xA; - Replayable (The first game isn't your last)&#xD;&#xA; - Competetive (The AI doesn't play like a 3 year old)&#xD;&#xA; - Not repetetive (Such as using the same strategy over and over, or spamming units)&#xD;&#xA; - Economical (Not having 7 trillion metal and coins after 10 minutes of play)&#xD;&#xA; - Not to much micro-managing&#xD;&#xA; - Exciting (Necessary?) combat&#xD;&#xA; - You stil need to use *strategy*&#xD;&#xA; - Intuitive interfaces (Civilization 5 is a good example)&#xD;&#xA; - And any other important parts to the Strategy/4X genre&#xD;&#xA;&#xD;&#xA;Some of these seem pretty simple, but others look like balancing acts, and I'd like to have some opinions on how to make a game that is **fun to play**. I'd be grateful if anyone could answer tell me how you or another game\developer has managed to successfully balance them together. &#xD;&#xA;" />
  <row Id="13252" PostHistoryTypeId="2" PostId="6648" RevisionGUID="f9a3ce79-9353-46c1-a0f9-dadbab072c61" CreationDate="2010-12-18T20:18:35.717" UserId="4077" Text="World of Warcraft is off the table, because of the &quot;WOW Glider Lawsuit&quot; of 2008. Also see: Where is Blizzards official World of Warcraft API? Eve Online has an API&#xD;&#xA;&#xD;&#xA;But, what is the MOST popular (in terms of usership) MMO Game that does allow programmers to develop out-of-game things (like an Android app)." />
  <row Id="13253" PostHistoryTypeId="1" PostId="6648" RevisionGUID="f9a3ce79-9353-46c1-a0f9-dadbab072c61" CreationDate="2010-12-18T20:18:35.717" UserId="4077" Text="what is the most popular mmorpg game that has an out-of-game api?" />
  <row Id="13254" PostHistoryTypeId="3" PostId="6648" RevisionGUID="f9a3ce79-9353-46c1-a0f9-dadbab072c61" CreationDate="2010-12-18T20:18:35.717" UserId="4077" Text="&lt;iphone&gt;&lt;android&gt;&lt;mmo&gt;&lt;mobile&gt;&lt;api&gt;" />
  <row Id="13255" PostHistoryTypeId="2" PostId="6649" RevisionGUID="79c22aa9-3aa0-4daa-b27c-4d73c984563c" CreationDate="2010-12-18T21:32:42.597" UserId="450" Text="WoW does have an external API with the [Armory][1]. It is read only through. Unless you access the pages with a bad browsers, it returns a clear xml structure. According to various blue forums posts, automatic querying of those pages is okay, unless too many requests are sent.&#xD;&#xA;&#xD;&#xA;The Glider Lawsuit was about a bot that linked to the original game client in memory. It is pretty obvious that bots are bad for business because a) players spent less time paying while leveling up and b) other players get frustrated and may leave.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cn.wowarmory.com/index.xml" />
  <row Id="13256" PostHistoryTypeId="2" PostId="6650" RevisionGUID="7d636689-6c37-459b-890c-e0f369e40735" CreationDate="2010-12-18T21:37:42.093" UserId="1101" Text="It's not unreasonable to do full prediction on your own character for responsiveness and to have other characters lag behind by 100ms for consistency. If this looks bad then consider having your own character lag slightly to keep them in sync. Either way you're still going to need correction mechanisms to smooth out incorrect predictions in the event of lag spikes, and that system will deal with situations like the one you describe. It doesn't matter whether the latency is 100ms or 1ms - your client is always 'late' in some sense and therefore always has to act like it is dealing with old data and apply cosmetic effects such as interpolation to make it look reasonable." />
  <row Id="13257" PostHistoryTypeId="2" PostId="6651" RevisionGUID="89095be1-1c1a-4944-bbb3-8661ca74311b" CreationDate="2010-12-18T23:08:14.357" UserId="2781" Text="Everquest had an instant messaging protocol that allowed communication with in-game players from outside the game. I am unsure if the protocol was well documented or supported by any third party clients." />
  <row Id="13258" PostHistoryTypeId="2" PostId="6652" RevisionGUID="58c0a8d1-fb65-4d96-8c80-ee2dbb7ebe75" CreationDate="2010-12-18T23:48:01.237" UserDisplayName="youngdood" Text="The problem isn't really the latency. It can be compensated and predicted quite well to hide any problems caused it. Packet loss isn't a problem either - the networking system should be written to be robust and tolerable for packet loss. However, the problem is the lag spikes and unpredictable latency. Packets arriving out of sync, some of them being dropped only because of latency swings, inability to predict and interpolate because of latency swings etc. " />
  <row Id="13259" PostHistoryTypeId="2" PostId="6653" RevisionGUID="8ab0ed9d-6566-41c6-b3fd-c71648cd990b" CreationDate="2010-12-18T23:54:36.007" UserId="3830" Text="Creating a multiplayer physics game is fraught with peril.  Except for certain types of situations, creating physics based multiplayer games is probably not a good idea. &#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;**An example to show how things get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a smooth physics game with multiple players when any kind of latency exists.  Of course you CAN make a game, but it will not run smoothly and give a good game experience if multiple players are trying to interact with shared objects.&#xD;&#xA;&#xD;&#xA;**Things You Can Do**&#xD;&#xA;&#xD;&#xA; 1. Only do physics on a LAN so the latency is extremely low.&#xD;&#xA; 2. Run your game in slow motion.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA; 3. Allow players setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA; 4. Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA; 5. You can also just let things get out of sync and have the server reset the scene now and then.  Make that be part of your game via some story about being in a glitchy universe with broken physics laws or something :)" />
  <row Id="13260" PostHistoryTypeId="5" PostId="6653" RevisionGUID="5d599c95-30da-42ee-b0c2-d3fd47dd4a90" CreationDate="2010-12-19T00:10:56.887" UserId="3830" Comment="Added info on shooting games and how they work." Text="Creating a multiplayer physics game is fraught with peril.  Except for certain types of situations, creating physics based multiplayer games is probably not a good idea. &#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;**An example to show how things get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a smooth physics game with multiple players when any kind of latency exists.  Of course you CAN make a game, but it will not run smoothly and give a good game experience if multiple players are trying to interact with shared objects.&#xD;&#xA;&#xD;&#xA;**Things you can do to make a physics game multiplayer and not suck**&#xD;&#xA;&#xD;&#xA; 1. Only do physics on a LAN so the latency is extremely low.&#xD;&#xA; 2. Run your game in slow motion.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA; 3. Allow players setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA; 4. Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA; 5. You can also just let things get out of sync and have the server reset the scene now and then.  Make that be part of your game via some story about being in a glitchy universe with broken physics laws or something :)&#xD;&#xA;&#xD;&#xA;**Appendix:  How shooting games deal with it**&#xD;&#xA;&#xD;&#xA;Shooting games work by doing client side effects so players see things quickly, but then the server makes the final call on what has happened.&#xD;&#xA;&#xD;&#xA;Imagine a scenario where player A shoots player B.  Your typical shooter game will do something like this...&#xD;&#xA;&#xD;&#xA; 1. A will locally calculate if they hit B, and if it looks like there is a hit, it plays a &quot;hit&quot; effect like a blood puff.  This is done client side so that the player immediately sees a reaction to their action.  If you don't do this, the game feels laggy.&#xD;&#xA; 2. A also sends a message to the server saying, &quot;I shot along this vector&quot;&#xD;&#xA; 3. When the server gets the message, it looks at where IT thinks the players are, and decides if A's shot vector hits B.&#xD;&#xA; 4. If the server decides A hit B, it decides B is hit, and sends a message to BOTH clients saying what happened.&#xD;&#xA; 5. If the server decides A did NOT hit B, B is fine, and A &quot;misses&quot;.  It may look to A like they hit (&quot;I saw the blood puff!&quot;) but it's the servers call that they missed.&#xD;&#xA;&#xD;&#xA;So how could A miss B when it looked like they hit them?  Because B may have moved, but A hasn't seen it yet because the server hasn't sent a, &quot;B moved to here&quot; message yet to the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13261" PostHistoryTypeId="6" PostId="6645" RevisionGUID="f8dad75e-ce0a-4c7f-b8c5-ec5b4228ac04" CreationDate="2010-12-19T00:19:28.613" UserId="3830" Comment="edited tags" Text="&lt;game-design&gt;&lt;physics&gt;&lt;network&gt;" />
  <row Id="13262" PostHistoryTypeId="5" PostId="6653" RevisionGUID="bac7cdde-3ff4-4a8c-a570-3e99ef2dfa4a" CreationDate="2010-12-19T00:20:45.227" UserId="3830" Comment="added 49 characters in body" Text="Creating a multiplayer physics game is fraught with peril.  Except for certain types of situations, creating physics based multiplayer games is probably not a good idea. &#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;**An example to show how things get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a smooth physics game with multiple players when any kind of latency exists.  Of course you CAN make a game, but it will not run smoothly and give a good game experience if multiple players are trying to interact with shared objects.&#xD;&#xA;&#xD;&#xA;**Things you can do to make a physics game multiplayer and not suck**&#xD;&#xA;&#xD;&#xA; 1. Only do physics on a LAN so the latency is extremely low.&#xD;&#xA; 2. Run your game in slow motion.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA; 3. Allow players setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA; 4. Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA; 5. You can also just let things get out of sync and have the server reset the scene now and then.  Make that be part of your game via some story about being in a glitchy universe with broken physics laws or something :)&#xD;&#xA;&#xD;&#xA;**Appendix:  How shooting games deal with it**&#xD;&#xA;&#xD;&#xA;Shooting games deal with it by not doing overly complex physics.  They do use client side effects so players see things quickly, but then the server makes the final call on what has happened.&#xD;&#xA;&#xD;&#xA;Imagine a scenario where player A shoots player B.  Your typical shooter game will do something like this...&#xD;&#xA;&#xD;&#xA; 1. A will locally calculate if they hit B, and if it looks like there is a hit, it plays a &quot;hit&quot; effect like a blood puff.  This is done client side so that the player immediately sees a reaction to their action.  If you don't do this, the game feels laggy.&#xD;&#xA; 2. A also sends a message to the server saying, &quot;I shot along this vector&quot;&#xD;&#xA; 3. When the server gets the message, it looks at where IT thinks the players are, and decides if A's shot vector hits B.&#xD;&#xA; 4. If the server decides A hit B, it decides B is hit, and sends a message to BOTH clients saying what happened.&#xD;&#xA; 5. If the server decides A did NOT hit B, B is fine, and A &quot;misses&quot;.  It may look to A like they hit (&quot;I saw the blood puff!&quot;) but it's the servers call that they missed.&#xD;&#xA;&#xD;&#xA;So how could A miss B when it looked like they hit them?  Because B may have moved, but A hasn't seen it yet because the server hasn't sent a, &quot;B moved to here&quot; message yet to the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13263" PostHistoryTypeId="5" PostId="6653" RevisionGUID="f602f2a4-d88a-4809-b117-76465fc97d31" CreationDate="2010-12-19T00:29:02.040" UserId="3830" Comment="deleted 33 characters in body" Text="Creating a multiplayer physics game is fraught with peril.  It is impossible to create a &quot;perfect&quot; online multiplayer physics experience.&#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;**An example to show how things get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a smooth physics game with multiple players when any kind of latency exists.  Of course you CAN make a game, but it will not run smoothly and give a good game experience if multiple players are trying to interact with shared objects.&#xD;&#xA;&#xD;&#xA;**Things you can do to make a physics game multiplayer and not suck**&#xD;&#xA;&#xD;&#xA; 1. Only do physics on a LAN so the latency is extremely low.&#xD;&#xA; 2. Run your game in slow motion.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA; 3. Allow players setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA; 4. Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA; 5. You can also just let things get out of sync and have the server reset the scene now and then.  Make that be part of your game via some story about being in a glitchy universe with broken physics laws or something :)&#xD;&#xA;&#xD;&#xA;**Appendix:  How shooting games deal with it**&#xD;&#xA;&#xD;&#xA;Shooting games deal with it by not doing overly complex physics.  They do use client side effects so players see things quickly, but then the server makes the final call on what has happened.&#xD;&#xA;&#xD;&#xA;Imagine a scenario where player A shoots player B.  Your typical shooter game will do something like this...&#xD;&#xA;&#xD;&#xA; 1. A will locally calculate if they hit B, and if it looks like there is a hit, it plays a &quot;hit&quot; effect like a blood puff.  This is done client side so that the player immediately sees a reaction to their action.  If you don't do this, the game feels laggy.&#xD;&#xA; 2. A also sends a message to the server saying, &quot;I shot along this vector&quot;&#xD;&#xA; 3. When the server gets the message, it looks at where IT thinks the players are, and decides if A's shot vector hits B.&#xD;&#xA; 4. If the server decides A hit B, it decides B is hit, and sends a message to BOTH clients saying what happened.&#xD;&#xA; 5. If the server decides A did NOT hit B, B is fine, and A &quot;misses&quot;.  It may look to A like they hit (&quot;I saw the blood puff!&quot;) but it's the servers call that they missed.&#xD;&#xA;&#xD;&#xA;So how could A miss B when it looked like they hit them?  Because B may have moved, but A hasn't seen it yet because the server hasn't sent a, &quot;B moved to here&quot; message yet to the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13267" PostHistoryTypeId="5" PostId="6653" RevisionGUID="ed0a2636-07e2-4af9-8e90-0590b2d1ad3f" CreationDate="2010-12-19T00:51:52.217" UserId="3830" Comment="Less &quot;you can't do this&quot; and more &quot;this is really hard to do if conditions aren't good&quot;" Text="Creating a multiplayer physics game is fraught with peril.  It is impossible to create a &quot;perfect&quot; online multiplayer physics experience.&#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;It is up to you as a developer to decide if you can keep the different factors under control, and to understand that the player's experience will degrade if the latency becomes too high.  If you can live with that (and your players can), then go for it.&#xD;&#xA;&#xD;&#xA;**An example to show how things can get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a *perfect* physics game with multiple players when any kind of latency exists.  You can make a pretty good game, but you always will have the risk of excessive latency creating a bad experience for some players.&#xD;&#xA;&#xD;&#xA;**Things you can do to make a physics game multiplayer and not suck**&#xD;&#xA;&#xD;&#xA; 1. Only do physics on a LAN so the latency is extremely low.&#xD;&#xA; 2. Run your game in slow motion.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA; 3. Allow players setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA; 4. Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA; 5. You can also just let things get out of sync and have the server reset the scene now and then.  Make that be part of your game via some story about being in a glitchy universe with broken physics laws or something :)&#xD;&#xA;&#xD;&#xA;**Appendix:  How shooting games deal with it**&#xD;&#xA;&#xD;&#xA;Shooting games deal with it by not doing overly complex physics.  They do use client side effects so players see things quickly, but then the server makes the final call on what has happened.&#xD;&#xA;&#xD;&#xA;Imagine a scenario where player A shoots player B.  Your typical shooter game will do something like this...&#xD;&#xA;&#xD;&#xA; 1. A will locally calculate if they hit B, and if it looks like there is a hit, it plays a &quot;hit&quot; effect like a blood puff.  This is done client side so that the player immediately sees a reaction to their action.  If you don't do this, the game feels laggy.&#xD;&#xA; 2. A also sends a message to the server saying, &quot;I shot along this vector&quot;&#xD;&#xA; 3. When the server gets the message, it looks at where IT thinks the players are, and decides if A's shot vector hits B.&#xD;&#xA; 4. If the server decides A hit B, it decides B is hit, and sends a message to BOTH clients saying what happened.&#xD;&#xA; 5. If the server decides A did NOT hit B, B is fine, and A &quot;misses&quot;.  It may look to A like they hit (&quot;I saw the blood puff!&quot;) but it's the servers call that they missed.&#xD;&#xA;&#xD;&#xA;So how could A miss B when it looked like they hit them?  Because B may have moved, but A hasn't seen it yet because the server hasn't sent a, &quot;B moved to here&quot; message yet to the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13268" PostHistoryTypeId="2" PostId="6655" RevisionGUID="823ae67c-5f84-409d-9d4c-abeb438bc508" CreationDate="2010-12-19T01:03:10.673" UserId="4082" Text="I've written a series of articles about the topic here: http://www.gabrielgambetta.com/?p=11 &#xD;&#xA;&#xD;&#xA;The first three articles deal with an introduction to the topic, client side prediction, server reconciliation, and entity interpolation. The 4th article (coming soon) will deal with &quot;shooting stuff&quot; :)" />
  <row Id="13269" PostHistoryTypeId="5" PostId="6655" RevisionGUID="52bc7725-51db-4f55-9a61-b4207edd041f" CreationDate="2010-12-19T01:09:34.597" UserId="4082" Comment="added 55 characters in body" Text="I've written a series of articles about the topic here: http://www.gabrielgambetta.com/?p=11 &#xD;&#xA;&#xD;&#xA;The first three articles deal with an introduction to the topic, client side prediction, server reconciliation, and entity interpolation (this is the part that answers your specific question). The 4th article (coming soon) will deal with &quot;shooting stuff&quot; :)" />
  <row Id="13270" PostHistoryTypeId="2" PostId="6656" RevisionGUID="5620cba0-2dcb-479d-81b4-2137057c88de" CreationDate="2010-12-19T01:19:00.623" UserId="4082" Text="For this kind of thing we use an image used as a mask, with transparent/opaque or black/white pixels. The masks aren't drawn, but are conceptually &quot;placed&quot; over the map region they cover.&#xD;&#xA;&#xD;&#xA;When you get a click, first check the bounding box of the image. If it's outside, the player didn't click the region. If it's inside, check the pixel. If it's transparent/black, the player didn't click the region. Otherwise, he did.&#xD;&#xA;&#xD;&#xA;If memory usage is a serious concern, you can use half-sized images and apply the appropriate screen to image coordinate conversion. You won't get pixel-perfect detection but you probably don't need it in this case.&#xD;&#xA;&#xD;&#xA;Also, if you go transparent/opaque, either save the masks as PNG (or any other lossless compression scheme) or use a high threshold (alpha &gt; 128 instead of alpha &gt; 0). Otherwise, JPEG artifacts may cause some of the transparent pixels to appear not so transparent (say alpha = 1 or 2 instead of alpha = 0)" />
  <row Id="13272" PostHistoryTypeId="5" PostId="6655" RevisionGUID="d0359301-4401-44ba-8c00-1d6dcd4d24b3" CreationDate="2010-12-19T01:30:04.323" UserId="4082" Comment="added 175 characters in body" Text="I've written a series of articles about the topic here: http://www.gabrielgambetta.com/?p=11 &#xD;&#xA;&#xD;&#xA;The first three articles deal with an introduction to the topic, client side prediction, server reconciliation, and entity interpolation (this is the part that answers your specific question). The 4th article (coming soon) will deal with &quot;shooting stuff&quot; :)&#xD;&#xA;&#xD;&#xA;Tim Holt's answer is pretty much it. My articles have a couple of diagrams that may help you understand what's going on, but Tim and I are basically saying the same thing." />
  <row Id="13273" PostHistoryTypeId="5" PostId="6653" RevisionGUID="e3935663-86d4-44d1-b6ec-ad5826b8d275" CreationDate="2010-12-19T01:33:04.320" UserId="3830" Comment="More info on how to make it better" Text="Creating a multiplayer physics game can be fraught with peril.  It is impossible to create a &quot;perfect&quot; online multiplayer physics experience.  There are things you can do to make it better, but there is no way to make perfect physics assuming any latency.  &#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;It is up to you as a developer to decide if you can keep the different factors under control, and to understand that the player's experience will degrade if the latency becomes too high.  If you can live with that (and your players can), then go for it.  See towards the end of this post for some notes about how you can keep things running smoother.  &#xD;&#xA;&#xD;&#xA;**An example to show how things can get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a *perfect* physics game with multiple players when any kind of latency exists.  You can make a pretty good game, but you always will have the risk of excessive latency creating a bad experience for some players.  However there are things you can do to keep your game experience a good one.&#xD;&#xA;&#xD;&#xA;**Things you can do to make a multiplayer game run well**&#xD;&#xA;&#xD;&#xA;Use simple collision volumes.  Don't bother modeling every detail of a shape with physics when a simple cube shape will do.  A spikey ball doesn't have to be modeled as a spikey ball for physics.  Instead just model it as a sphere.&#xD;&#xA;&#xD;&#xA;Make small inconsequential objects client-only items.  An example might be bits of broken glass from a broken window.  You can let each client simulate it on their own, and it won't really matter if they are different.&#xD;&#xA;&#xD;&#xA;Only make objects physics objects if they need to be physics objects to keep the number of active physics objects low.&#xD;&#xA;&#xD;&#xA;Run your game in slow motion when doing multiplayer physics.  Think &quot;bullet time&quot; maybe.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA;&#xD;&#xA;Allow players to setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA;&#xD;&#xA;Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA;&#xD;&#xA;If you can't beat 'em, join 'em and make physics lag be part of your game. Imagine a story about being in a glitchy universe with broken physics laws or something :)&#xD;&#xA;&#xD;&#xA;**Appendix:  How shooting games deal with it**&#xD;&#xA;&#xD;&#xA;Shooting games deal with it by not doing overly complex physics.  They do use client side effects so players see things quickly, but then the server makes the final call on what has happened.&#xD;&#xA;&#xD;&#xA;Imagine a scenario where player A shoots player B.  Your typical shooter game will do something like this...&#xD;&#xA;&#xD;&#xA; 1. A will locally calculate if they hit B, and if it looks like there is a hit, it plays a &quot;hit&quot; effect like a blood puff.  This is done client side so that the player immediately sees a reaction to their action.  If you don't do this, the game feels laggy.&#xD;&#xA; 2. A also sends a message to the server saying, &quot;I shot along this vector&quot;&#xD;&#xA; 3. When the server gets the message, it looks at where IT thinks the players are, and decides if A's shot vector hits B.&#xD;&#xA; 4. If the server decides A hit B, it decides B is hit, and sends a message to BOTH clients saying what happened.&#xD;&#xA; 5. If the server decides A did NOT hit B, B is fine, and A &quot;misses&quot;.  It may look to A like they hit (&quot;I saw the blood puff!&quot;) but it's the servers call that they missed.&#xD;&#xA;&#xD;&#xA;So how could A miss B when it looked like they hit them?  Because B may have moved, but A hasn't seen it yet because the server hasn't sent a, &quot;B moved to here&quot; message yet to the client.&#xD;&#xA;&#xD;&#xA;Valve has a good writeup on their site about this.  See http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13275" PostHistoryTypeId="5" PostId="6653" RevisionGUID="b7cd09fd-dead-45e1-a7e7-a59ab3d452a2" CreationDate="2010-12-19T03:09:58.570" UserId="3830" Comment="added 289 characters in body" Text="Summary for those that don't like long answers...&#xD;&#xA;&#xD;&#xA;It can be done but it's impossible to do perfect multiplayer physics if there is any latency.  Why latency impacts physics is explained, and then tips for reducing the impact of latency on your physics simulation are offered.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Creating a multiplayer physics game can be fraught with peril.  It is impossible to create a &quot;perfect&quot; online multiplayer physics experience.  There are things you can do to make it better, but there is no way to make perfect physics assuming any latency.  &#xD;&#xA;&#xD;&#xA;The problem is, physics has to be fast and responsive to be realistic, but at the same time has to be calculated based on the combined actions of ALL factors -- meaning the combined actions of all players.  And if there is latency, this can't be done in real time.&#xD;&#xA;&#xD;&#xA;It is up to you as a developer to decide if you can keep the different factors under control, and to understand that the player's experience will degrade if the latency becomes too high.  If you can live with that (and your players can), then go for it.  See towards the end of this post for some notes about how you can keep things running smoother.  &#xD;&#xA;&#xD;&#xA;**An example to show how things can get messed up**&#xD;&#xA;&#xD;&#xA;Imagine a game where two players (clients) are connected to a server.  It takes 100 milliseconds (1/10th second) for a message to go across the internet from client to server.  When a player does something, a message is sent to the server saying what they did.  The server then broadcasts the message out to the other players so they all know what the acting player did.&#xD;&#xA;&#xD;&#xA;Now create a scenario where two players have a crate on the ground which is a physics object.  Player A hits it on one side, sending it moving in some direction.  However at the same time, player B hits it on another side, sending it another direction.&#xD;&#xA;&#xD;&#xA;Let's look at different ways to handle this and what the results would be...&#xD;&#xA;&#xD;&#xA;**What if physics is calculated just on the server?**&#xD;&#xA;&#xD;&#xA;Suppose we have the physics calculated only on the server.  Player A sends &quot;I hit crate this way&quot; message to server, 1/10th second later server gets message.  Player B sends their &quot;I hit crate this other way&quot; message.  The server calculates physics change from the combination of the two actions, and sends message back to both players saying, &quot;OK it moves like this.&quot;  Perfect physics is performed, based on the actions of both players combined.&#xD;&#xA;&#xD;&#xA;But the problem is, it will be 2/10th of a second before either player sees the crate react.  The messages from both players take 1/10th of a second to reach the server, then another 1/10th of a second for the servers calculation results to be sent for both players.&#xD;&#xA;&#xD;&#xA;Bottom line, laggy gameplay.&#xD;&#xA;&#xD;&#xA;**What if physics is just calculated on the client?**&#xD;&#xA;&#xD;&#xA;Suppose we have physics calculated on just the client. Let's look at it from Player A's point of view.  Player A hits crate and it immediately starts going their direction.  A message is also sent to the server saying what Player A did. &#xD;&#xA;&#xD;&#xA;At the same time though, B has done their hit and seen the crate going in *their* direction and sent a message to the server about what they did.&#xD;&#xA;&#xD;&#xA;2/10th of a second later, a message arrives from the server to the clients.  A is told what B did, and B is told what A did.  The problem is, both clients say, &quot;Well player X may have done that hit at this spot, but there is no longer a crate at that location, so their hit did nothing.&quot;&#xD;&#xA;&#xD;&#xA;Bottom line is, two games out of sync and players not having a shared experience.  What's the point of multiplayer if they both see different things?&#xD;&#xA;&#xD;&#xA;**What if physics is calculated on both client and server?**&#xD;&#xA;&#xD;&#xA;In this case, physics is calculated on the client so players see an immediate no-lag reaction, but it's also calculated on the server so it is &quot;correct&quot; for all players.&#xD;&#xA;&#xD;&#xA;Both players hit the crate their respective directions and each sees the crate move based on their hit only.  But then 2/10th of a second later, the server comes back and says, &quot;Well actually, you are both wrong.  The crate went this way.&quot;   Suddenly both players see the crate drastically change directions and glitch to a new location.&#xD;&#xA;&#xD;&#xA;Bottom line is, a glitchy game.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;&#xD;&#xA;Basically there is no way to make a *perfect* physics game with multiple players when any kind of latency exists.  You can make a pretty good game, but you always will have the risk of excessive latency creating a bad experience for some players.  However there are things you can do to keep your game experience a good one.&#xD;&#xA;&#xD;&#xA;**Things you can do to make a multiplayer game run well**&#xD;&#xA;&#xD;&#xA;Use simple collision volumes.  Don't bother modeling every detail of a shape with physics when a simple cube shape will do.  A spikey ball doesn't have to be modeled as a spikey ball for physics.  Instead just model it as a sphere.&#xD;&#xA;&#xD;&#xA;Make small inconsequential objects client-only items.  An example might be bits of broken glass from a broken window.  You can let each client simulate it on their own, and it won't really matter if they are different.&#xD;&#xA;&#xD;&#xA;Only make objects physics objects if they need to be physics objects to keep the number of active physics objects low.&#xD;&#xA;&#xD;&#xA;Run your game in slow motion when doing multiplayer physics.  Think &quot;bullet time&quot; maybe.  Slow motion games compensate for latency and allow multiple players to interact with physics together.&#xD;&#xA;&#xD;&#xA;Allow players to setup a situation of some kind together, and then on some cue, the physics is simulated for both players and both watch the result of their combined actions.  Players may not interfere with the sequence until it is completed.&#xD;&#xA;&#xD;&#xA;Separate players phsyics so they can't interfere with each other.  This would be great for a game like bowling or pool, where only one player at a time has control, or each player has their own &quot;sandbox&quot; (like a bowling lane).&#xD;&#xA;&#xD;&#xA;If you can't beat 'em, join 'em and make physics lag be part of your game. Imagine a story about being in a glitchy universe with broken physics laws or something :)&#xD;&#xA;&#xD;&#xA;**Appendix:  How shooting games deal with it**&#xD;&#xA;&#xD;&#xA;Shooting games deal with it by not doing overly complex physics.  They do use client side effects so players see things quickly, but then the server makes the final call on what has happened.&#xD;&#xA;&#xD;&#xA;Imagine a scenario where player A shoots player B.  Your typical shooter game will do something like this...&#xD;&#xA;&#xD;&#xA; 1. A will locally calculate if they hit B, and if it looks like there is a hit, it plays a &quot;hit&quot; effect like a blood puff.  This is done client side so that the player immediately sees a reaction to their action.  If you don't do this, the game feels laggy.&#xD;&#xA; 2. A also sends a message to the server saying, &quot;I shot along this vector&quot;&#xD;&#xA; 3. When the server gets the message, it looks at where IT thinks the players are, and decides if A's shot vector hits B.&#xD;&#xA; 4. If the server decides A hit B, it decides B is hit, and sends a message to BOTH clients saying what happened.&#xD;&#xA; 5. If the server decides A did NOT hit B, B is fine, and A &quot;misses&quot;.  It may look to A like they hit (&quot;I saw the blood puff!&quot;) but it's the servers call that they missed.&#xD;&#xA;&#xD;&#xA;So how could A miss B when it looked like they hit them?  Because B may have moved, but A hasn't seen it yet because the server hasn't sent a, &quot;B moved to here&quot; message yet to the client.&#xD;&#xA;&#xD;&#xA;Valve has a good writeup on their site about this.  See http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13276" PostHistoryTypeId="5" PostId="6620" RevisionGUID="79e42e15-a2f3-45ca-bb56-5ccac8230485" CreationDate="2010-12-19T03:55:07.500" UserId="4062" Comment="added 33 characters in body" Text="I don't know about a breakdown of the physics, but there are commented disassemblies floating around the internet. [Romhacking.net][1], [nesdev.parodius.com][2], [Acmlm Board2][3], [SMWCentral][4] and their respective forums would probably be the best places to get that kind of information. The document sections of those sites have enough information to compile your own guide.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.romhacking.net&#xD;&#xA;  [2]: http://nesdev.parodius.com&#xD;&#xA;  [3]: http://acmlm.kafuka.org&#xD;&#xA;  [4]: http://www.smwcentral.net" />
  <row Id="13277" PostHistoryTypeId="2" PostId="6657" RevisionGUID="c38efd3b-1055-4fe1-9dc7-650b35aa65b6" CreationDate="2010-12-19T05:36:49.443" UserId="567" Text="What is the process of creating a geo data to assist on NPCs movements and the such on a 3D world to avoiding having them from going underground, etc ?&#xD;&#xA;&#xD;&#xA;I would also appreciate very much any good examples, documents and such related for reading...&#xD;&#xA;&#xD;&#xA;**SIDE QUESTION:** &#xD;&#xA;Are the specific modeling programs that can create the world and the geo map to be used ? If so, could you List any names/links.&#xD;&#xA;&#xD;&#xA;I am searching on google but havent found any good material on this yet." />
  <row Id="13278" PostHistoryTypeId="1" PostId="6657" RevisionGUID="c38efd3b-1055-4fe1-9dc7-650b35aa65b6" CreationDate="2010-12-19T05:36:49.443" UserId="567" Text="A-Z Creating a geodata to assist NPCs on a 3D world ?" />
  <row Id="13279" PostHistoryTypeId="3" PostId="6657" RevisionGUID="c38efd3b-1055-4fe1-9dc7-650b35aa65b6" CreationDate="2010-12-19T05:36:49.443" UserId="567" Text="&lt;game-mechanics&gt;&lt;geometry&gt;" />
  <row Id="13280" PostHistoryTypeId="2" PostId="6658" RevisionGUID="71a58173-ffdf-4762-9643-ae71e2d7ccff" CreationDate="2010-12-19T05:37:40.327" UserId="3830" Text="I am looking for a library or framework for creating software versions [Roll and Move][1] board games -- games where the basic play centers around players rolling a dice and advancing a pawn along a path. &#xD;&#xA;&#xD;&#xA;I'm not interested as much in graphics, rendering methods, and so forth.  I'm more interested in a system for defining these kinds of games, their rules, and managing game states.  Ideally I'd like to see something like an XML file I could create that defines the game, and an interpreter that could load it up and run the given game. &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Category:Roll-and-move_board_games" />
  <row Id="13281" PostHistoryTypeId="1" PostId="6658" RevisionGUID="71a58173-ffdf-4762-9643-ae71e2d7ccff" CreationDate="2010-12-19T05:37:40.327" UserId="3830" Text="Are there existing software frameworks for traditional &quot;Roll dice and move pawn&quot; boardgames? " />
  <row Id="13282" PostHistoryTypeId="3" PostId="6658" RevisionGUID="71a58173-ffdf-4762-9643-ae71e2d7ccff" CreationDate="2010-12-19T05:37:40.327" UserId="3830" Text="&lt;architecture&gt;&lt;libraries&gt;" />
  <row Id="13283" PostHistoryTypeId="2" PostId="6659" RevisionGUID="6e4d64eb-948d-4803-9e69-9d1329ff822f" CreationDate="2010-12-19T05:47:15.250" UserId="3830" Text="It's pretty simplistic and designed for beginner gameplay, but you might check out the combat system used by the old D&amp;D era pencil &amp; paper game [Tunnels and Trolls][1].&#xD;&#xA;&#xD;&#xA;Basically, you and your opponent get a certain number of 6 sided dice.  For you how many dice you get is based on your weapon.  Bigger weapons get more dice, so a great sword user rolls 6 dice and adds them up, but a quarterstaff user gets just 2.  Monsters also get dice based on their level.&#xD;&#xA;&#xD;&#xA;In addition to your weapon dice, you get modifiers (additions to the dice roll) based on your attributes.  Monsters also get modifiers based on their level.&#xD;&#xA;&#xD;&#xA;To quote from the rules...&#xD;&#xA;&#xD;&#xA;&gt; After you get your hit point total, and your foe's hit point total, compare the two numbers. The side that had the higher number hurt the side that had the lower number. The difference between the two numbers indicates how badly the loser was hurt.&#xD;&#xA;&#xD;&#xA;If you have armor, it just automatically blocks damage below a certain amount.  Leather armor takes 6 hits for example, so if you get hit for 7 points of damage, the result is 7 - 6 or 1 point of actual damage.&#xD;&#xA;&#xD;&#xA;Overall it is meant to be a very simple game that can be picked up very quickly and played by your average group that can scrounge up a bunch of 6 sided dice.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freedungeons.com/rules/" />
  <row Id="13284" PostHistoryTypeId="2" PostId="6660" RevisionGUID="cd4c51bd-1f0d-4460-abfb-2bb455e5674e" CreationDate="2010-12-19T05:50:13.660" UserId="962" Text="The closest thing I can find is something called [VASSAL.][1] It doesn't seem to be as easy as setting up XML files for the game to work properly, but if you want a board game framework that supports multi-player, there you go.&#xD;&#xA;&#xD;&#xA;Now your question is pretty interesting. Although to meet your specifications exactly, you might have to **Roll** your own. And I don't know if XML will be the correct tool for the job. For defining complex rules, either the interpreter will have to be overly complex and specific to work with all the variations of rules you could do in a board game, or you would have to define the rules in some kind of scripting language.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vassalengine.org/" />
  <row Id="13285" PostHistoryTypeId="2" PostId="6661" RevisionGUID="4b9ba646-3120-4f7b-b357-272b7f68128a" CreationDate="2010-12-19T06:46:26.707" UserId="4086" Text="I was told by Claude Comair (Founder of Digipen sponsored by Nintendo ) that basically the senior programmer and senior game designer sat down and adjusted magic numbers until the game designer was happy." />
  <row Id="13286" PostHistoryTypeId="2" PostId="6662" RevisionGUID="01910024-f083-4265-bb44-539e41074e7d" CreationDate="2010-12-19T11:07:04.320" UserId="3822" Text="Gamasutra did a feature on the physics of Super Mario Galaxy some years back ... probably not what you're after if you're more interested in the 2d versions. &#xD;&#xA;Link here: http://www.gamasutra.com/view/feature/3593/games_demystified_super_mario_.php&#xD;&#xA;" />
  <row Id="13287" PostHistoryTypeId="2" PostId="6663" RevisionGUID="92b16cc7-d1a4-4f6f-8a15-8833441cf9aa" CreationDate="2010-12-19T11:14:44.953" UserId="3822" Text="Real-time Rendering folks seem to have a bit of a love affair with Minecraft. There was a comment something about how they've not figured out the lighting yet.. but you might want to stay tuned for further developments / links. &#xD;&#xA;&#xD;&#xA;http://www.realtimerendering.com/blog/?s=minecraft&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13288" PostHistoryTypeId="2" PostId="6664" RevisionGUID="03e3810a-36f9-4606-9cd3-300743af703b" CreationDate="2010-12-19T11:22:43.390" UserId="2239" Text="If you compressed the resulting animation with a modern video codec, it wouldn't be particularly big at all and nowhere near &quot;several hundred MB of data&quot; nor ludicrous...&#xD;&#xA;&#xD;&#xA;But as already stated, it all depends on what your target platform is and as everyone else said; just rendering a smooth 3D sphere would actually involve an insignificant amount of polygons and very little data storage (the texture being all there is and even at really high resolutions, standard jpeg compression would bring it down to nothing).&#xD;&#xA;&#xD;&#xA;It all also depends a bit on how picky you are - if you're after the quarter-pixel-scrolling-look and texture details on par with state-of-the-art demos and not just contemporary games with all their interpolation and aliasing issues even at 8x FSAA - then it could get almost endlessly involved to achieve (and require a bit of artistic trickery as well) ^^" />
  <row Id="13290" PostHistoryTypeId="2" PostId="6666" RevisionGUID="740e41bb-7037-4bb3-9591-0803905cd5a1" CreationDate="2010-12-19T16:04:10.567" UserId="2447" Text="When doing the net code for a video game what sort of latency targets and packet loss rates do you design around?&#xD;&#xA;&#xD;&#xA;  To be more specific I have my net code working local network only at the moment.  I plan on using WANEM to simulate packet loss and latency but I am not sure what I should use for max and average values." />
  <row Id="13291" PostHistoryTypeId="1" PostId="6666" RevisionGUID="740e41bb-7037-4bb3-9591-0803905cd5a1" CreationDate="2010-12-19T16:04:10.567" UserId="2447" Text="Net code: What are your expected and max latency and packet loss targets?" />
  <row Id="13292" PostHistoryTypeId="3" PostId="6666" RevisionGUID="740e41bb-7037-4bb3-9591-0803905cd5a1" CreationDate="2010-12-19T16:04:10.567" UserId="2447" Text="&lt;network&gt;&lt;design&gt;" />
  <row Id="13293" PostHistoryTypeId="2" PostId="6667" RevisionGUID="be2674da-3205-4eac-9883-8d406df11b84" CreationDate="2010-12-19T17:49:17.020" UserId="4092" Text="If one were to code a game for most versions of Windows, which API should be used?&#xD;&#xA;&#xD;&#xA;I know DirectDraw works from NT4 and up (although DirectDraw is emulated on NT4 with GDI). However, I am told DirectDraw is deprecated in newer versions of Windows?&#xD;&#xA;&#xD;&#xA;I could revert to just GDI, but then it is hard to completely eliminate flicker, since there is no double buffering with flipping between buffers.&#xD;&#xA;&#xD;&#xA;Should I go for Direct3D or DirectDraw? Or is there some way of completely eliminating flicker in GDI?&#xD;&#xA;&#xD;&#xA;If Direct3D is the answer, which version of it is supported on most platforms?&#xD;&#xA;" />
  <row Id="13294" PostHistoryTypeId="1" PostId="6667" RevisionGUID="be2674da-3205-4eac-9883-8d406df11b84" CreationDate="2010-12-19T17:49:17.020" UserId="4092" Text="Best API coverage for 2D game?" />
  <row Id="13295" PostHistoryTypeId="3" PostId="6667" RevisionGUID="be2674da-3205-4eac-9883-8d406df11b84" CreationDate="2010-12-19T17:49:17.020" UserId="4092" Text="&lt;directx&gt;&lt;windows&gt;" />
  <row Id="13296" PostHistoryTypeId="5" PostId="6667" RevisionGUID="2f8b3b2b-6811-4163-9846-baeffff7125c" CreationDate="2010-12-19T18:13:36.307" UserId="4092" Comment="added 44 characters in body; edited tags" Text="If one were to code a game for most versions of Windows, which API should be used?&#xD;&#xA;&#xD;&#xA;I know DirectDraw works from NT4 and up (although DirectDraw is emulated on NT4 with GDI). However, I am told DirectDraw is deprecated in newer versions of Windows?&#xD;&#xA;&#xD;&#xA;I could revert to just GDI, but then it is hard to completely eliminate flicker, since there is no double buffering with flipping between buffers.&#xD;&#xA;&#xD;&#xA;Should I go for Direct3D or DirectDraw? Or is there some way of completely eliminating flicker in GDI or some other Windows API I am not aware of?&#xD;&#xA;&#xD;&#xA;If Direct3D is the answer, which version of it is supported on most platforms?&#xD;&#xA;" />
  <row Id="13297" PostHistoryTypeId="6" PostId="6667" RevisionGUID="2f8b3b2b-6811-4163-9846-baeffff7125c" CreationDate="2010-12-19T18:13:36.307" UserId="4092" Comment="added 44 characters in body; edited tags" Text="&lt;directx&gt;&lt;windows&gt;&lt;api&gt;" />
  <row Id="13298" PostHistoryTypeId="2" PostId="6668" RevisionGUID="040a554f-45a7-4d33-a7ab-49698d564fa6" CreationDate="2010-12-19T19:15:25.703" UserId="2345" Text="Lighting in Minecraft is calculated asynchronously and is baked into the geometry. It is not done in realtime.&#xD;&#xA;&#xD;&#xA;Each voxel stores the lighting for that voxel, probably as a single byte (or 2, notch uses a layered approach to make day and night cycles possible). There are only 16 levels of light. To light the world, Minecraft does 2 passes. One for the sunlight, and another to propagate or flood the light into caves and such. The lighting is localized because any light source can only propagate its light at most 16 blocks away. Water and lava works in almost the same way.&#xD;&#xA;&#xD;&#xA;More info is available on his blog: http://notch.tumblr.com/post/434902871/per-request-this-is-how-the-new-lighting-will-work" />
  <row Id="13299" PostHistoryTypeId="2" PostId="6669" RevisionGUID="ecd4bc5b-3505-48a5-b7f5-a798166c028f" CreationDate="2010-12-19T19:55:42.213" UserId="154" Text="For something like this I'd just Excel. The problem with a general solution is that rules are one of the most unique elements in a game so creating a framework that let you plug in rules is kind of hard.&#xD;&#xA;&#xD;&#xA;Most of them break down to basic math and boolean state changes which Excel handles well.&#xD;&#xA;&#xD;&#xA;So do what you can with standard cell math, and then when needed throw in a little VBasic to make buttons for rolling dice and so on." />
  <row Id="13304" PostHistoryTypeId="6" PostId="6666" RevisionGUID="8471eb9c-fc00-40b2-9799-ea5be799153c" CreationDate="2010-12-19T22:14:40.183" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;network&gt;" />
  <row Id="13305" PostHistoryTypeId="2" PostId="6672" RevisionGUID="d8d4847e-3b8b-4a1b-8743-58f38387f168" CreationDate="2010-12-19T23:56:54.690" UserId="395" Text="Packet loss is hard to guess, but internet latency you should probably plan for up to ~750ms, though the vast majority will be under 500ms. The biggest outliers are Australia&lt;-&gt;US pings and satellite internet. Depending on your target market maybe you can ignore those. If you are doing stuff for mobile devices it can be even more unpredictable. As a random guess for packet less I would say to plan for somewhere around 1-5% at the most, generally we see much less than that (~0.1% at the worst of times) and usually that is only on UK&lt;-&gt;US links at peak hours (UK peak that is). The packet loss itself isn't a problem, but throw the transatlantic latency into the mix with TCP retransmission and you get a very jittery connection and can have trouble managing network buffers (this was for file transfers, for lower data rates I doubt this would be a problem)." />
  <row Id="13306" PostHistoryTypeId="2" PostId="6673" RevisionGUID="28adad77-e66f-46eb-a341-97bd2e178b36" CreationDate="2010-12-20T01:38:11.553" UserId="3325" Text="I personally would not bother targeting anything below Windows XP.  Writing something that works on XP/Vista/7 will get 99% of people on Windows and allow you to use modern technologies.&#xD;&#xA; &#xD;&#xA;Direct3D is definitely an option, and so is DirectX.  Another option is OpenGL.&#xD;&#xA; &#xD;&#xA;I would personally recommend DirectX 9.  There are a lot of great resources and tools that will allow you to pick it up quickly and build a good game with it.  As I understand it, D3D and OpenGL are pretty ugly." />
  <row Id="13307" PostHistoryTypeId="5" PostId="6657" RevisionGUID="2898c241-6f95-427e-8747-e5deabeb45d3" CreationDate="2010-12-20T01:54:53.547" UserId="567" Comment="added 112 characters in body" Text="What is the process of creating a geo data to assist on NPCs movements and the such on a 3D world to avoiding having them from going underground, etc ?&#xD;&#xA;&#xD;&#xA;I would also appreciate very much any good examples, documents and such related for reading...&#xD;&#xA;&#xD;&#xA;**SIDE QUESTION:** &#xD;&#xA;Are the specific modeling programs that can create the world and the geo map to be used ? If so, could you List any names/links.&#xD;&#xA;&#xD;&#xA;I am searching on google but havent found any good material on this yet.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;The map I made have caves, water place with deep water, up and down terrains heights, mountains, etc." />
  <row Id="13308" PostHistoryTypeId="2" PostId="6674" RevisionGUID="10abe95a-c3fb-4a66-aeec-f46e25dd3681" CreationDate="2010-12-20T02:00:12.870" UserDisplayName="Rodrigo" Text="Lately all of my work have been on those two languages and I'm in love with them. There are many libraries for game development on python but the problem I see is that many of those frameworks don't cover the &quot;distribution&quot; aspect of game creation. I'd like to code my game on python (and any other pure python extra libraries I need) and be able to distribute an executable for the main PC platforms (Windows, Mac and Linux).&#xD;&#xA;&#xD;&#xA;Any options out there or what are the best combinations for this? (maybe pyglet + cx_freeze)" />
  <row Id="13309" PostHistoryTypeId="1" PostId="6674" RevisionGUID="10abe95a-c3fb-4a66-aeec-f46e25dd3681" CreationDate="2010-12-20T02:00:12.870" UserDisplayName="Rodrigo" Text="From code to executable, Options for game development on python or ruby?" />
  <row Id="13310" PostHistoryTypeId="3" PostId="6674" RevisionGUID="10abe95a-c3fb-4a66-aeec-f46e25dd3681" CreationDate="2010-12-20T02:00:12.870" UserDisplayName="Rodrigo" Text="&lt;python&gt;&lt;pyglet&gt;" />
  <row Id="13311" PostHistoryTypeId="2" PostId="6675" RevisionGUID="ccb0c3c0-f78b-4b4a-9a24-073fe6270c58" CreationDate="2010-12-20T02:27:56.240" UserId="395" Text="py2exe + NSIS works well enough, though it can take some voodoo to figure out the right py2exe config usually (but you only have to do that once). You can also look at setuptools' entry-point-based script generation and the pkg_resources API for working with data files." />
  <row Id="13312" PostHistoryTypeId="2" PostId="6676" RevisionGUID="74c2dee6-e2a5-4f97-88b2-51cc5a67322d" CreationDate="2010-12-20T08:31:20.437" UserId="51" Text="Check out recast: http://code.google.com/p/recastnavigation/&#xD;&#xA;&#xD;&#xA;It has a lot of good starting points. You'd have to extend it for how you want things like water to be treated, but it's probably the closest thing to a free out of the box solution out there that I know of. " />
  <row Id="13313" PostHistoryTypeId="2" PostId="6677" RevisionGUID="c07f5ea9-7030-41fb-8145-0fef99d3af58" CreationDate="2010-12-20T09:46:16.510" UserId="2091" Text="Some Options for Python:&#xD;&#xA;&#xD;&#xA; - Multiplatform (Win/Linux/Mac): [PyInstaller][1]&#xD;&#xA; - Multiplatform (Win/Linux/Max): [cx-freeze][4]&#xD;&#xA; - Windows: [py2exe][2]&#xD;&#xA; - Mac: [py2app][3]&#xD;&#xA;&#xD;&#xA;  The bad news is that, as far as I can tell, you can't create binaries for a platform from another platform.  The reason seems to be dependencies on platform-specific libraries.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pyinstaller.org/&#xD;&#xA;  [2]: http://sourceforge.net/projects/py2exe/&#xD;&#xA;  [3]: https://bitbucket.org/ronaldoussoren/py2app&#xD;&#xA;  [4]: http://cx-freeze.sourceforge.net/&#xD;&#xA;  [5]: http://packages.ubuntu.com/lucid/cx-freeze" />
  <row Id="13314" PostHistoryTypeId="2" PostId="6678" RevisionGUID="12f713d9-e9c0-4168-87a6-2afd330299db" CreationDate="2010-12-20T14:07:41.050" UserId="3037" Text="While developing a small game using tile-mapping method a question came to my mind: &#xD;&#xA;&#xD;&#xA;- What size(in pixels) would you recommend using for creating the tiles of a tile-mapped game(ie: RPG)?&#xD;&#xA;- Would you have any examples of games using different scales of tile sizes?&#xD;&#xA;- And what is your best memory of a tile-mapped game that could illustrate one of the preceding questions?&#xD;&#xA;&#xD;&#xA;This question may seem a bit simplistic, but I noticed that many Indies game developer were using inappropriate scales scenery.&#xD;&#xA;&#xD;&#xA;Thank you, Ephismen." />
  <row Id="13315" PostHistoryTypeId="1" PostId="6678" RevisionGUID="12f713d9-e9c0-4168-87a6-2afd330299db" CreationDate="2010-12-20T14:07:41.050" UserId="3037" Text="Tile sizes in 2D games." />
  <row Id="13316" PostHistoryTypeId="3" PostId="6678" RevisionGUID="12f713d9-e9c0-4168-87a6-2afd330299db" CreationDate="2010-12-20T14:07:41.050" UserId="3037" Text="&lt;2d&gt;&lt;tiles&gt;" />
  <row Id="13317" PostHistoryTypeId="5" PostId="6677" RevisionGUID="b6b0610d-e244-4fa2-aa84-c8bbe42c4e63" CreationDate="2010-12-20T14:37:24.637" UserId="2091" Comment="added 158 characters in body; edited body" Text="  Some Options for Python:&#xD;&#xA;&#xD;&#xA; - Multiplatform (Win/Linux/Mac): [PyInstaller][1]&#xD;&#xA; - Multiplatform (Win/Linux/Max): [cx-freeze][2]&#xD;&#xA; - Windows: [py2exe][3]&#xD;&#xA; - Mac: [py2app][4]&#xD;&#xA;&#xD;&#xA;  The bad news is that, as far as I can tell, you can't create binaries for a platform from another platform.  The reason seems to be dependencies on platform-specific libraries.&#xD;&#xA;&#xD;&#xA;  **Edit**: By the way, you might be interested in looking at this [comparison table][5].  The guy was using pyglet too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pyinstaller.org/&#xD;&#xA;  [2]: http://cx-freeze.sourceforge.net/&#xD;&#xA;  [3]: http://sourceforge.net/projects/py2exe/&#xD;&#xA;  [4]: https://bitbucket.org/ronaldoussoren/py2app&#xD;&#xA;  [5]: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&amp;output=html" />
  <row Id="13318" PostHistoryTypeId="2" PostId="6679" RevisionGUID="bab2b9c4-1390-4699-b52b-4680511444ae" CreationDate="2010-12-20T16:19:17.617" UserId="3830" Text="You can calculate the tile size based on the screen resolution and the number of tiles that need to be visible. If you were putting up a chess board (8x8 tiles) on a 768 pixel tall screen, your tiles can't be more than 768/8 or 96 pixels. &#xD;&#xA;&#xD;&#xA;So decide how many tiles a player should see at once, decide on the screen resolution, and calculate from there. &#xD;&#xA;&#xD;&#xA;That said, I like 64x64 ;^)" />
  <row Id="13319" PostHistoryTypeId="5" PostId="6678" RevisionGUID="a5b1d14d-2887-43ea-85f8-5292eae08eca" CreationDate="2010-12-20T16:41:47.720" UserId="3037" Comment="added 339 characters in body" Text="While developing a small game using tile-mapping method a question came to my mind: &#xD;&#xA;&#xD;&#xA;**[EDIT]**&#xD;&#xA;&#xD;&#xA;I would develop the game on Windows but wouldn't exclude adapting it to another platform.&#xD;&#xA;&#xD;&#xA;What size(in pixels) would you recommend using for creating the tiles of a tile-mapped game(ie: RPG) with the following requirements?&#xD;&#xA;&#xD;&#xA;- Have an acceptable level of detail without having too many tiles.&#xD;&#xA;- Having a decent map size. &#xD;&#xA;- Allow adaptation of the game on a handheld(ie: PSP), smartphone or a computer without too much loss of detail or slowdowns.&#xD;&#xA;- Allow more or less important zoom-in / zoom-out.&#xD;&#xA;- Have a resolution of tile that permits either pixel-perfect collision or block-collision.&#xD;&#xA;&#xD;&#xA;**[/EDIT]**&#xD;&#xA;&#xD;&#xA;This question may seem a bit simplistic, but I noticed that many Indies game developer were using inappropriate scales scenery.&#xD;&#xA;&#xD;&#xA;Thank you, Ephismen." />
  <row Id="13320" PostHistoryTypeId="5" PostId="6678" RevisionGUID="2c9c7ac1-4b5a-43d7-9195-05e370f7047e" CreationDate="2010-12-20T16:46:58.573" UserId="3037" Comment="added 246 characters in body" Text="While developing a small game using tile-mapping method a question came to my mind: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would develop the game on Windows but wouldn't exclude adapting it to another platform.&#xD;&#xA;&#xD;&#xA;What size(in pixels) would you recommend using for creating the tiles of a tile-mapped game(ie: RPG) with the following requirements?&#xD;&#xA;&#xD;&#xA;- Have an acceptable level of detail without having too many tiles.&#xD;&#xA;- Having a decent map size. &#xD;&#xA;- Allow adaptation of the game on a handheld(ie: PSP), smartphone or a computer without too much loss of detail or slowdowns.&#xD;&#xA;- Allow more or less important zoom-in / zoom-out.&#xD;&#xA;- Have a resolution of tile that permits either pixel-perfect collision or block-collision.&#xD;&#xA;&#xD;&#xA;Anything from a good explanation to a game example is useful as long as it can fit the requirements.&#xD;&#xA;&#xD;&#xA;This question may seem a bit simplistic, but I noticed that many Indies game developer were using inappropriate scales scenery.&#xD;&#xA;&#xD;&#xA;*Also sorry for the poor syntax and the lack of vocabulary of my question, being a non-native English speaker doesn't help when talking about computers programming.*&#xD;&#xA;&#xD;&#xA;Thank you, Ephismen." />
  <row Id="13321" PostHistoryTypeId="5" PostId="6679" RevisionGUID="d9d1b535-8fbe-4a6d-83d9-da7560fd0d91" CreationDate="2010-12-20T17:34:21.853" UserId="3830" Comment="added 43 characters in body" Text="You can calculate the tile size based on the screen resolution and the number of tiles that need to be visible. If you were putting up a chess board (8x8 tiles) on a 768 pixel tall screen, your tiles can't be more than 768/8 or 96 pixels, otherwise they won't all fit on the screen.&#xD;&#xA;&#xD;&#xA;So decide how many tiles a player should see at once, decide on the screen resolution, and calculate from there. &#xD;&#xA;&#xD;&#xA;That said, I like 64x64 ;^)" />
  <row Id="13322" PostHistoryTypeId="4" PostId="6674" RevisionGUID="6b83f7bb-0ef5-465a-adc5-a21417688f03" CreationDate="2010-12-20T18:13:42.803" UserId="744" Comment="edited title; added 13 characters in body; edited title" Text="How can I distribute a native executable for a Python program?" />
  <row Id="13323" PostHistoryTypeId="5" PostId="6674" RevisionGUID="6b83f7bb-0ef5-465a-adc5-a21417688f03" CreationDate="2010-12-20T18:13:42.803" UserId="744" Comment="edited title; added 13 characters in body; edited title" Text="Lately all of my work has been in Python (and Ruby), and I'm in love with those two languages. There are many libraries for game development on Python but the problem I see is that many of those frameworks don't cover the &quot;distribution&quot; aspect of game creation. I'd like to code my game on Python (and any other pure Python extra libraries I need) and be able to distribute an executable for the main PC platforms (Windows, Mac and Linux).&#xD;&#xA;&#xD;&#xA;Any options out there or what are the best combinations for this? (maybe pyglet + cx_freeze)" />
  <row Id="13324" PostHistoryTypeId="5" PostId="6657" RevisionGUID="bf2f331e-9755-472a-a0db-3d1cf4bfd290" CreationDate="2010-12-20T18:18:24.610" UserId="744" Comment="Flow and formating clean up, better tags." Text="What is the process of creating geometry data to assist on NPCs movements and such on a 3D world to avoiding having them from going through the ground, etc? Are there specific modelling programs that can create the world and the collision geometry to be used?&#xD;&#xA;&#xD;&#xA;The map I made has caves, lakes with deep water, varying terrains heights, mountains, etc." />
  <row Id="13325" PostHistoryTypeId="4" PostId="6657" RevisionGUID="bf2f331e-9755-472a-a0db-3d1cf4bfd290" CreationDate="2010-12-20T18:18:24.610" UserId="744" Comment="Flow and formating clean up, better tags." Text="What tools are available for creating 3D collision and pathfinding data?" />
  <row Id="13326" PostHistoryTypeId="6" PostId="6657" RevisionGUID="bf2f331e-9755-472a-a0db-3d1cf4bfd290" CreationDate="2010-12-20T18:18:24.610" UserId="744" Comment="Flow and formating clean up, better tags." Text="&lt;tools&gt;&lt;ai&gt;&lt;path-finding&gt;&lt;level-design&gt;" />
  <row Id="13327" PostHistoryTypeId="2" PostId="6680" RevisionGUID="86c31263-c886-47dd-8b40-ff270a3b85e0" CreationDate="2010-12-20T18:50:27.420" UserId="1119" Text="I kind of agree with coderanger. For all those specific examples you gave him, microsoft provides samples on their site. Full working state management, collision detection, animation. I know you want something put together but since you haven't received an  answer you like, you could always take the game state project http://create.msdn.com/en-US/education/catalog/sample/game_state_management and pull some of the other samples together. All the code works fine. Again if someone provides you with an answer you like then ignore but it really won't take long to do what I am suggesting." />
  <row Id="13328" PostHistoryTypeId="2" PostId="6681" RevisionGUID="e8d1a4e1-f438-4d7a-aa10-722181c50f3c" CreationDate="2010-12-20T19:20:22.037" UserId="2773" Text="Is there any early adopters of Sun Burn engine here?&#xD;&#xA;&#xD;&#xA;I am wondering is anyone tried to develop a game with Sun Burn game engine for **Windows Phone 7** platform.&#xD;&#xA;&#xD;&#xA;How good is documentation, examples, etc?&#xD;&#xA;Is it easy in use and implementation?&#xD;&#xA;&#xD;&#xA;Any feedback would be greatly welcome." />
  <row Id="13329" PostHistoryTypeId="1" PostId="6681" RevisionGUID="e8d1a4e1-f438-4d7a-aa10-722181c50f3c" CreationDate="2010-12-20T19:20:22.037" UserId="2773" Text="Is it easy to use Sun Burn engine for WP7 game development?" />
  <row Id="13330" PostHistoryTypeId="3" PostId="6681" RevisionGUID="e8d1a4e1-f438-4d7a-aa10-722181c50f3c" CreationDate="2010-12-20T19:20:22.037" UserId="2773" Text="&lt;windows-phone-7&gt;" />
  <row Id="13331" PostHistoryTypeId="10" PostId="6681" RevisionGUID="00f0263e-e06b-4245-b0fb-6db30e47a1ee" CreationDate="2010-12-20T22:04:22.423" UserId="-1" CloseReasonId="3" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="13332" PostHistoryTypeId="11" PostId="6681" RevisionGUID="4daf917b-13a6-4c53-b790-625aae8227bf" CreationDate="2010-12-20T22:06:14.357" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="13333" PostHistoryTypeId="5" PostId="6681" RevisionGUID="66f9030b-6866-4bb8-b2d1-70a0e41cecdf" CreationDate="2010-12-20T22:12:22.087" UserId="14" Comment="deleted 53 characters in body; edited tags" Text="I was wondering if anyone has tried to develop a game using the SunBurn game engine for the **Windows Phone 7** platform.&#xD;&#xA;&#xD;&#xA;How good is documentation, examples, etc?&#xD;&#xA;Is it easy in use and implementation?&#xD;&#xA;&#xD;&#xA;Any feedback would be greatly welcome." />
  <row Id="13334" PostHistoryTypeId="6" PostId="6681" RevisionGUID="66f9030b-6866-4bb8-b2d1-70a0e41cecdf" CreationDate="2010-12-20T22:12:22.087" UserId="14" Comment="deleted 53 characters in body; edited tags" Text="&lt;windows-phone-7&gt;&lt;sunburn&gt;" />
  <row Id="13335" PostHistoryTypeId="2" PostId="6682" RevisionGUID="221e61a6-fcc4-4006-8890-0571f7d914c4" CreationDate="2010-12-20T23:29:21.950" UserId="4113" Text="Another way to implement scrolling for a 2d game is to manipulate your projection matrix to reflect where the screen/camera is located in the game world. &#xD;&#xA;&#xD;&#xA;What I did was implement a 2d camera class that had its position and the width/height of the viewable area.. Then before you draw the game world you set up the ortho projection matrix.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;    float left = camera-&gt;X - (camera-&gt;Width / 2.0f);&#xD;&#xA;    float bottom = camera-&gt;Y - (camera-&gt;Height / 2.0f);&#xD;&#xA;    float right = left + camera-&gt;Width;&#xD;&#xA;    float top = bottom + camera-&gt;Height;&#xD;&#xA;    &#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    &#xD;&#xA;    glOrthof(left, right, bottom, top, -50.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope this helps. Oh, and you would reset the projection matrix to something else if you wanted to draw UI elements afterwards etc.&#xD;&#xA;&#xD;&#xA;Of course, all of this applies only if your writing your game in openGL. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13336" PostHistoryTypeId="2" PostId="6683" RevisionGUID="96668895-f6ad-43f6-b1f7-6f511e06f88d" CreationDate="2010-12-21T00:00:18.020" UserId="1684" Text="I'm in a bit of crunch time and I find myself spending way too much time tinkering with an algo, so I would like some help.&#xD;&#xA;&#xD;&#xA;In the game I am working on, there are some old-style, pixelated minigames. One of the minigame is a spaceship in a cavern. The caverns curves and narrows down over time until the ship crashes in a wall. I want them to be generated at random during runtime.&#xD;&#xA;&#xD;&#xA;I'm having a problem creating the walls of the cavern and narrowing them while keeping a smooth curve on them. &#xD;&#xA;&#xD;&#xA;For the narrowing, I keep track of it with a variable that decreases over time, but how about the curving and how to keep it natural? I've though of a keeping a target point that goes up and down randomly and have the wall try to reach for it, therefore smoothing the randomized number but it is not working great.&#xD;&#xA;&#xD;&#xA;Any ideas/algo?" />
  <row Id="13337" PostHistoryTypeId="1" PostId="6683" RevisionGUID="96668895-f6ad-43f6-b1f7-6f511e06f88d" CreationDate="2010-12-21T00:00:18.020" UserId="1684" Text="Algo for narrowing cavern" />
  <row Id="13338" PostHistoryTypeId="3" PostId="6683" RevisionGUID="96668895-f6ad-43f6-b1f7-6f511e06f88d" CreationDate="2010-12-21T00:00:18.020" UserId="1684" Text="&lt;algorithm&gt;&lt;procedural-generation&gt;" />
  <row Id="13339" PostHistoryTypeId="2" PostId="6684" RevisionGUID="a1b38515-50f4-4322-9903-d7460e00dbde" CreationDate="2010-12-21T00:42:06.540" UserId="4051" Text="I'm looking to do some homebrew development for either the Wii, Xbox360 or PS3. I'll be developing from a Linux system. The programming language doesn't matter.&#xD;&#xA;&#xD;&#xA; - Wii - [devkitPPC and libogc][devkitpro] look fairly easy and complete&#xD;&#xA; - Xbox360 - [Mono.XNA][] looks interesting but not very feature complete&#xD;&#xA; - PS3 - [psl1ght] seems interesting but I haven't been able to find out much&#xD;&#xA;&#xD;&#xA;How homebrew friendly are each of these consoles? Is someone able to give a comparison of each of these scenes?&#xD;&#xA;&#xD;&#xA;[Mono.XNA]: http://www.monoxna.org/&#xD;&#xA;[devkitpro]: http://devkitpro.org/&#xD;&#xA;[psl1ght]: http://psl1ght.com/" />
  <row Id="13340" PostHistoryTypeId="1" PostId="6684" RevisionGUID="a1b38515-50f4-4322-9903-d7460e00dbde" CreationDate="2010-12-21T00:42:06.540" UserId="4051" Text="Homebrew development for 7th gen home consoles" />
  <row Id="13341" PostHistoryTypeId="3" PostId="6684" RevisionGUID="a1b38515-50f4-4322-9903-d7460e00dbde" CreationDate="2010-12-21T00:42:06.540" UserId="4051" Text="&lt;xbox360&gt;&lt;playstation3&gt;&lt;homebrew&gt;&lt;wii&gt;" />
  <row Id="13342" PostHistoryTypeId="2" PostId="6685" RevisionGUID="f12920dc-816e-4b38-bb13-751d7479d6ec" CreationDate="2010-12-21T00:56:54.857" UserDisplayName="Simon Grey" Text="I am currently tackling real-time multiplayer physics updates for a game engine I am writing. My question is how best to use Box2D for networked physics. If I run the simulation on the server, should I send position, velocity etc to every client on every tick? Should I send it every few ticks? Maybe there is another way that I am missing?&#xD;&#xA;&#xD;&#xA;How has this problem been solved using Box2D before? Anyone with some ideas would be greatly appreciated!" />
  <row Id="13343" PostHistoryTypeId="1" PostId="6685" RevisionGUID="f12920dc-816e-4b38-bb13-751d7479d6ec" CreationDate="2010-12-21T00:56:54.857" UserDisplayName="Simon Grey" Text="Best strategy (tried and tested) for using Box2D in a real-time multiplayer game?" />
  <row Id="13344" PostHistoryTypeId="3" PostId="6685" RevisionGUID="f12920dc-816e-4b38-bb13-751d7479d6ec" CreationDate="2010-12-21T00:56:54.857" UserDisplayName="Simon Grey" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;box2d&gt;&lt;game-mechanics&gt;" />
  <row Id="13345" PostHistoryTypeId="2" PostId="6686" RevisionGUID="1829268e-c974-4b83-9447-e99c246596b9" CreationDate="2010-12-21T01:17:27.917" UserId="3830" Text="You might see this question which deals with the same challenge...&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6645/lag-compensation-with-networked-2d-games&#xD;&#xA;&#xD;&#xA;Though not specifically about 2D physics, the same issues apply." />
  <row Id="13346" PostHistoryTypeId="5" PostId="6679" RevisionGUID="53609a90-0096-4ef4-9848-ccb2bd5ebbd7" CreationDate="2010-12-21T01:25:09.643" UserId="3830" Comment="added 79 characters in body" Text="You can calculate the tile size based on the screen resolution and the number of tiles that need to be visible. If you were putting up a chess board (8x8 tiles) on a 768 pixel tall screen, your tiles can't be more than 768/8 or 96 pixels, otherwise they won't all fit on the screen.  How many tiles need to be visible is of course dependent on your game design.&#xD;&#xA;&#xD;&#xA;So decide how many tiles a player should see at once, decide on the screen resolution, and calculate from there. &#xD;&#xA;&#xD;&#xA;That said, I like 64x64 ;^)" />
  <row Id="13347" PostHistoryTypeId="2" PostId="6687" RevisionGUID="1704edb7-ca10-4558-b2cb-30108d4f1b6d" CreationDate="2010-12-21T03:47:39.827" UserId="2692" Text="Mono XNA will not run on the xbox, Its designed to allow windows XNA applications to run under mono/open gl rather than the .net runtime/direct x. Also, &#xD;&#xA;&#xD;&#xA;Good luck running homebrew code that doesnt involve paying microsoft for an xna creators club membership on the xbox, Ive no idea about the other platforms as ive never looked into it. " />
  <row Id="13348" PostHistoryTypeId="2" PostId="6688" RevisionGUID="98bf4079-22a8-4289-96f2-5cbcfef5cd18" CreationDate="2010-12-21T05:20:38.797" UserId="2116" Text="You could use one-dimensional Perlin noise to generate the floor and ceiling, and weight the values so they get closer together towards the right side of the level." />
  <row Id="13349" PostHistoryTypeId="2" PostId="6689" RevisionGUID="508167ad-ca37-4b97-ac56-1b077bf2bd85" CreationDate="2010-12-21T09:25:45.213" UserId="653" Text="You're on the right track, add noise (perlin or otherwise..) to the floor and ceiling to make it look 'natural' and jagged. Then you could use 1D [Brownian motion](http://en.wikipedia.org/wiki/Brownian_motion), as you suggested actually, as a target point, and draw the opening around that point.&#xD;&#xA;&#xD;&#xA;Generate the level one slice at a time, and simply move that slice toward the player. If it goes up and down too fast (the target value, that is), you can try and smooth it using a sliding window, the simplest being simply averaging with the previous target value like so&#xD;&#xA;&#xD;&#xA;    window = 0.2;&#xD;&#xA;    targetY = next_brownian_value() * window + targetY * (1 - window);&#xD;&#xA;&#xD;&#xA;Which will create an exponential sliding window (in this case, the targetY will be one fifth the new random value, 4/25ths of the previous random value, 16/125ths of the one before that, etc). Try playing with the window size and see what happens, lower value gives more smoothing (higher influence of previous values).&#xD;&#xA;&#xD;&#xA;Note that the `next_brownian_value` should not be influenced by the targetY, it should go on its usual drunken walk." />
  <row Id="13350" PostHistoryTypeId="2" PostId="6690" RevisionGUID="05202731-c73e-4ce2-bcac-f7c1832fd50b" CreationDate="2010-12-21T10:50:54.417" UserDisplayName="havok" Text="Sounds like it could be depth testing. Try this:&#xD;&#xA;&#xD;&#xA;    DepthStencilState depthStencilState = new DepthStencilState();&#xD;&#xA;    depthStencilState.DepthBufferEnable = true;&#xD;&#xA;&#xD;&#xA;    device.DepthStencilState = depthStencilState;&#xD;&#xA;&#xD;&#xA;I'm no expert but when the depth buffer isn't enabled then faces at the back can show through to the front. Try this code out and see if it works, if it does then just google 'xna 4 depth testing' or similar and read up on it." />
  <row Id="13351" PostHistoryTypeId="2" PostId="6691" RevisionGUID="4e19d02c-9807-49e9-82c7-0d1ed21c7b84" CreationDate="2010-12-21T11:49:29.720" UserId="4092" Text="In OpenGL, is there a way to ensure I get exactly, *no more nor less*, **60** (or whatever rate my monitor is set for) frames per second?&#xD;&#xA;&#xD;&#xA;Of course given that the new frame can be calculated in less than 1/60 second.&#xD;&#xA;" />
  <row Id="13352" PostHistoryTypeId="1" PostId="6691" RevisionGUID="4e19d02c-9807-49e9-82c7-0d1ed21c7b84" CreationDate="2010-12-21T11:49:29.720" UserId="4092" Text="Can you sync screen update on vertical retrace with OpenGL?" />
  <row Id="13353" PostHistoryTypeId="3" PostId="6691" RevisionGUID="4e19d02c-9807-49e9-82c7-0d1ed21c7b84" CreationDate="2010-12-21T11:49:29.720" UserId="4092" Text="&lt;opengl&gt;&lt;first-person-shooter&gt;" />
  <row Id="13354" PostHistoryTypeId="2" PostId="6692" RevisionGUID="8c877084-97f0-414d-a5e4-42fe91850ff5" CreationDate="2010-12-21T11:52:12.260" UserId="653" Text="I think you need to go platform specific for this, SDL's SDL_GL_SwapBuffers (i think it's called) will wait for retrace before swapping. If you specify your platform, there might be more we can help you with.&#xD;&#xA;&#xD;&#xA;HTH.&#xD;&#xA;&#xD;&#xA;A quick google turned up this: http://osdl.sourceforge.net/main/documentation/rendering/SDL-openGL.html, search the page for 'retrace' and you'll see it." />
  <row Id="13355" PostHistoryTypeId="6" PostId="6691" RevisionGUID="36f3e48a-9fc6-4082-ad6c-463d0b981922" CreationDate="2010-12-21T12:25:19.880" UserId="744" Comment="edited tags" Text="&lt;opengl&gt;&lt;graphics-programming&gt;" />
  <row Id="13356" PostHistoryTypeId="2" PostId="6693" RevisionGUID="fb23c86f-8190-4b63-9c6d-b1ab24fdefef" CreationDate="2010-12-21T13:24:42.660" UserId="4116" Text="I'm currently try to make a business plan and was just wondering, how you guys decide the budget for outsourcing tasks. Is there a kind of a reference point? Or does the client decide this mostly by himself, what he want for his work?&#xD;&#xA;I speaking specially about tasks like:&#xD;&#xA;&#xD;&#xA; - translation (en-&gt;xxx)&#xD;&#xA; - character artwork&#xD;&#xA; - tiles/background artwork&#xD;&#xA; - sprites&#xD;&#xA; - music (BGM/SE)&#xD;&#xA; - voice synchronization&#xD;&#xA;&#xD;&#xA;Naturally it depends __really__ a lot about content size and requirements - but have any here a generally idea about the neccessary budget for tasks like this?&#xD;&#xA;Any link or ressource to this topic would be highly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you guys," />
  <row Id="13357" PostHistoryTypeId="1" PostId="6693" RevisionGUID="fb23c86f-8190-4b63-9c6d-b1ab24fdefef" CreationDate="2010-12-21T13:24:42.660" UserId="4116" Text="How to decide the budget as independent game developer?" />
  <row Id="13358" PostHistoryTypeId="3" PostId="6693" RevisionGUID="fb23c86f-8190-4b63-9c6d-b1ab24fdefef" CreationDate="2010-12-21T13:24:42.660" UserId="4116" Text="&lt;outsourcing&gt;" />
  <row Id="13359" PostHistoryTypeId="2" PostId="6694" RevisionGUID="b209e284-8e84-4734-9369-1ea232f64350" CreationDate="2010-12-21T13:33:09.940" UserId="2050" Text="Synchronizing with the vertical retrace is not only platform dependent, but vendor-dependent and therfore not covered by the OpenGL-Specification.&#xD;&#xA;&#xD;&#xA;Additional information can be found here:&#xD;&#xA;http://stackoverflow.com/questions/589064/how-to-enable-vertical-sync-in-opengl" />
  <row Id="13360" PostHistoryTypeId="6" PostId="6693" RevisionGUID="c520ce1b-01ba-454e-a370-1c63f584cd05" CreationDate="2010-12-21T13:57:45.333" UserId="1156" Comment="edited tags" Text="&lt;indie&gt;&lt;outsourcing&gt;" />
  <row Id="13361" PostHistoryTypeId="2" PostId="6695" RevisionGUID="1daeeb28-247e-4e4f-9b11-88e25d2af358" CreationDate="2010-12-21T13:59:29.060" UserId="4129" Text="The open source game [Glest][1] has models that feel detached from the ground that they sit on because of the hard edges.  In real life, grass is not flat!&#xD;&#xA;&#xD;&#xA;What are the options and recommendations for breaking up the hard edges where the meshes of the models meet the terrain?  How do other games do it?  What are the options on a sliding scale of rendering performance and widespread GPU support?&#xD;&#xA;&#xD;&#xA;![A screenshot from glest][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glest.org&#xD;&#xA;  [2]: http://i.stack.imgur.com/QRT8c.jpg" />
  <row Id="13362" PostHistoryTypeId="1" PostId="6695" RevisionGUID="1daeeb28-247e-4e4f-9b11-88e25d2af358" CreationDate="2010-12-21T13:59:29.060" UserId="4129" Text="game models that stand in grass" />
  <row Id="13363" PostHistoryTypeId="3" PostId="6695" RevisionGUID="1daeeb28-247e-4e4f-9b11-88e25d2af358" CreationDate="2010-12-21T13:59:29.060" UserId="4129" Text="&lt;opengl&gt;" />
  <row Id="13364" PostHistoryTypeId="2" PostId="6696" RevisionGUID="b6205f6d-276c-4537-8076-0523f50edeae" CreationDate="2010-12-21T14:23:21.703" UserId="2808" Text="I think it depends on how much money you have available. A simple 'indie' scenario:&#xD;&#xA;&#xD;&#xA;Let's say you have a 10k budget for your game, and you plan to work on it for two months. Take out 4k to live on (you'll need to eat, really). That leaves your 6k. &#xD;&#xA;&#xD;&#xA;You'll want some 'slack' in your budget for unforseen stuff, reserve 1k: 5k remaining.&#xD;&#xA;&#xD;&#xA;What other things do you need to pay out of your budget? &#xD;&#xA;&#xD;&#xA;Hosting? 0.5K Ads/PR? 1k, etc. &#xD;&#xA;&#xD;&#xA;That leaves you with 3.5k to distribute around the items you named. Distribute them according to 'workload'. E.g. making one animated model takes approx. 15 times more work/time/money than creating a 2d tiles/sprite.&#xD;&#xA;&#xD;&#xA;Edit: setting your budget is setting a limitation. This will force you to find creative solutions to stay within your budget. (I mean, you're not Blizzard, are you?)" />
  <row Id="13369" PostHistoryTypeId="2" PostId="6699" RevisionGUID="1cff211b-3ca6-42a0-8991-dd76e58e5a97" CreationDate="2010-12-21T15:14:24.330" UserId="2301" Text="Or you could always make a small team (if you find some new grads, or people just wanting to use their skills) you can divide the profits up in a fair way.  50% for programmer, 30% for artist, 20% for audio. But this depends on the content of the game.  &#xD;&#xA;Then your budget would mainly be for tools, hosting/blogging, advertising, snacks (the better the snack, the better the game)" />
  <row Id="13370" PostHistoryTypeId="2" PostId="6700" RevisionGUID="477f1d0a-cd52-4e91-8efd-7d37dfba05d1" CreationDate="2010-12-21T15:23:31.467" UserId="4132" Text="We have spent several months planning, testing and developing a new game. We have been trialing a host of Platforms (Java Applet, Desktop Via XNA, Flash etc) and Silverlight was pretty much our prefered choice.&#xD;&#xA;&#xD;&#xA;However, the more we get into the game the more problems we face, mainly down to the communication with a server. HTTP Polling is slow and in-efficent yet the socket functionality that is now available in SL4 is only really useful for a Intranet enviroment - Unless we are missing something.&#xD;&#xA;&#xD;&#xA;Anyone have any opinions or experiance with this and the future of SL for Online Browser based games.&#xD;&#xA;" />
  <row Id="13371" PostHistoryTypeId="1" PostId="6700" RevisionGUID="477f1d0a-cd52-4e91-8efd-7d37dfba05d1" CreationDate="2010-12-21T15:23:31.467" UserId="4132" Text="Has Silverlight got a future in the online Game world? " />
  <row Id="13372" PostHistoryTypeId="3" PostId="6700" RevisionGUID="477f1d0a-cd52-4e91-8efd-7d37dfba05d1" CreationDate="2010-12-21T15:23:31.467" UserId="4132" Text="&lt;game-design&gt;&lt;html5&gt;&lt;silverlight&gt;" />
  <row Id="13373" PostHistoryTypeId="2" PostId="6701" RevisionGUID="01e9813d-4bb5-4222-aded-e2dbdb5e781b" CreationDate="2010-12-21T15:36:35.247" UserId="953" Text="You can render grass.  There are a couple of widespread techniques for this that I've seen; one uses lots of little billboards, placed in a clever fashion.  The other works more like a static particle system, where each blade or bunch of grass is a particle.  They end up generating much the same geometry, if I recall correctly." />
  <row Id="13374" PostHistoryTypeId="2" PostId="6702" RevisionGUID="74ef4926-7658-43c2-ae29-8a6c3cf95717" CreationDate="2010-12-21T15:50:27.033" UserId="3794" Text="What you want is called VSYNC. And for your question:&#xD;&#xA;&#xD;&#xA;&gt;  no more nor less, 60&#xD;&#xA;&#xD;&#xA;This is imposible, if you are talking about no less. It is depended on how much your app cuts gpu's performance. &#xD;&#xA;&#xD;&#xA;No more is not that easy in OpenGL (compared to directx). Opengl doesnt support vsync in its basics, but the extension for VSYNC exists. Problem is that works only on windows. &#xD;&#xA;&#xD;&#xA;Best resource for start studying is stack overflow and this QA:&#xD;&#xA;http://stackoverflow.com/questions/589064/how-to-enable-vertical-sync-in-opengl" />
  <row Id="13375" PostHistoryTypeId="2" PostId="6703" RevisionGUID="f744b49f-7086-4c46-8e9f-5d5cfc6d1457" CreationDate="2010-12-21T15:56:35.543" UserId="2865" Text="Future of online browser games is HTML5 in my opinion. It offers most what is needed for simple browser games. Low latency is needed in big standalone games, so that is not our case. Of course if you need it, you can always make with flash or silverlight plugin only for communication." />
  <row Id="13376" PostHistoryTypeId="2" PostId="6704" RevisionGUID="57e659b4-04ef-477d-9bcf-572f77868f00" CreationDate="2010-12-21T16:14:46.503" UserId="1829" Text="I remember the Playstation having 2MB ram and 1MB graphic memory.&#xD;&#xA;&#xD;&#xA;The Playstation 3 now has only 256MB ram and 256MB graphic memory, and I'm sure that the day the console was released, even laptop's &quot;standard&quot; capacity was at least 1GB.&#xD;&#xA;&#xD;&#xA;So why do they put so little memory in their machines, while developers would benefit a lot by having more ? Or is the memory that much faster than desktops and thus more expensive ? Or is it not that much worth it for developers ? What are the Sony/XBox/Nintendo engineers thinking that seems to be the same reason ?" />
  <row Id="13377" PostHistoryTypeId="1" PostId="6704" RevisionGUID="57e659b4-04ef-477d-9bcf-572f77868f00" CreationDate="2010-12-21T16:14:46.503" UserId="1829" Text="Why do consoles have so little memory compared to classic computers ?" />
  <row Id="13378" PostHistoryTypeId="3" PostId="6704" RevisionGUID="57e659b4-04ef-477d-9bcf-572f77868f00" CreationDate="2010-12-21T16:14:46.503" UserId="1829" Text="&lt;console&gt;" />
  <row Id="13379" PostHistoryTypeId="2" PostId="6705" RevisionGUID="82d43c8c-16b1-49b6-9ea0-9a38806a8d53" CreationDate="2010-12-21T16:28:20.460" UserId="962" Text="The memory in the 360 and the ps3 is very fast, and expensive.&#xD;&#xA;&#xD;&#xA;**If the amount of memory was higher on console launch, they either would have to raise the price or take an even larger loss per console sold.**" />
  <row Id="13380" PostHistoryTypeId="2" PostId="6706" RevisionGUID="0b8a84e3-2630-4080-a29c-3b745c4ddd47" CreationDate="2010-12-21T16:36:24.010" UserId="1198" Text="As @AttackingHobo said, the memory is very fast and expensive. Also, you must take into account that these consoles launched years ago, when memory and hardware prices were higher. &#xD;&#xA;&#xD;&#xA;Another factor that goes into making consoles very performant on what appears to be very limited resources, is that since every console is identical, we as developers can take advantage of platform specific optimizations. On a PC you can't do that as much, and thus you are required to have a beefer PC so it can brute-force its way through a similar unoptimized task.&#xD;&#xA;&#xD;&#xA;That isn't to say there is no optimization in PC games, but it is in different areas than consoles, and in general due to the wide range of supported hardware, it is less effective." />
  <row Id="13381" PostHistoryTypeId="5" PostId="6691" RevisionGUID="3deedcf1-f2df-41ca-bdba-339e28065167" CreationDate="2010-12-21T16:37:52.747" UserId="4092" Comment="Added Windows" Text="In OpenGL, is there a way to ensure I get exactly, *no more nor less*, **60** (or whatever rate my monitor is set for) frames per second?&#xD;&#xA;&#xD;&#xA;Of course given that the new frame can be calculated in less than 1/60 second.&#xD;&#xA;I was thinking Windows more than Linux or Mac OSX, even though it is interesting to keep an eye on portability." />
  <row Id="13382" PostHistoryTypeId="2" PostId="6707" RevisionGUID="2a68d594-eb80-4f31-849e-78dffb890dac" CreationDate="2010-12-21T16:53:08.677" UserId="4132" Text="Size isnt everything ;)&#xD;&#xA;&#xD;&#xA;No seriously it isnt, memory speed is a key performance realted stat that alot of people overlook. 256meg of Fast memory is preferable over larger space slower spead memory.&#xD;&#xA;&#xD;&#xA;Cost is also an issue, I believe both XBox 360 and Playstation 3 were/are sold at a loss " />
  <row Id="13383" PostHistoryTypeId="2" PostId="6708" RevisionGUID="168eebe9-1159-41e5-b485-9af6c7602a42" CreationDate="2010-12-21T16:57:06.967" UserId="3505" Text="Obviously they want them to be cheap to make. As for the PS3 specifically, memory prices were very high at it's release, but they dropped soon after.&#xD;&#xA;&#xD;&#xA;There ain't a big clunky operating system running alongside games, so unlike Windows developers can actually utilize all the memory, you easily have more &quot;room&quot; on a PS3 than on an XP machine with 512 MB of system memory. Knowing the exact hardware specifications means that it is easier to go to the limit.&#xD;&#xA;&#xD;&#xA;Most memory eating PC games can to some extend be attributed to lazy programmers, there really ain't a lot one can do with more memory, except not care as much about filling it up.&#xD;&#xA;&#xD;&#xA;While the console memory is generally fast I doubt that it is a lot more expensive, it is to a great extent the development of the technology that cost, the production itself is probably not a lot more expensive. So when Sony and Microsoft make or purchase a big pile of fast memory it doesn't get a lot more expensive than slower memory would have been.&#xD;&#xA;&#xD;&#xA;It all comes down to the added consumer value being deemed too small to justify the extra price." />
  <row Id="13384" PostHistoryTypeId="5" PostId="6689" RevisionGUID="dd351ed1-5822-4487-a112-9d2eb95c5bec" CreationDate="2010-12-21T17:11:31.567" UserId="653" Comment="added 383 characters in body" Text="You're on the right track, add noise (perlin or otherwise..) to the floor and ceiling to make it look 'natural' and jagged. Then you could use 1D [Brownian motion](http://en.wikipedia.org/wiki/Brownian_motion), as you suggested actually, as a target point, and draw the opening around that point.&#xD;&#xA;&#xD;&#xA;Generate the level one slice at a time, and simply move that slice toward the player. If it goes up and down too fast (the target value, that is), you can try and smooth it using a sliding window, the simplest being simply averaging with the previous target value like so&#xD;&#xA;&#xD;&#xA;    window = 0.8;&#xD;&#xA;    targetY = next_brownian_value() * (1-window) + targetY * window;&#xD;&#xA;&#xD;&#xA;Which will create an exponential sliding window (in this case, the targetY will be one fifth the new random value, 4/25ths of the previous random value, 16/125ths of the one before that, etc). Try playing with the window size and see what happens, higher value gives more smoothing (higher influence of previous values).&#xD;&#xA;&#xD;&#xA;Note that the `next_brownian_value` should not be influenced by the targetY, it should go on its usual drunken walk.&#xD;&#xA;&#xD;&#xA;&lt;b&gt;EDIT&lt;/b&gt;  &#xD;&#xA;Naming the weighting factor 'window' was a slight misnomer, as a larger window should have a more smoothing effect. I've reversed the meaning above to make it more intuitive. It's still not really a window 'size' in a theoretical sense (which is usually defined to where the contribution is 1/e for exponential stuff..), but it least it's the right way around now.." />
  <row Id="13385" PostHistoryTypeId="2" PostId="6709" RevisionGUID="dac9250e-6e2a-4cfe-bdfd-0ff40f9c11ca" CreationDate="2010-12-21T17:28:03.713" UserId="3794" Text="I think that the problem of objects which look like flying is realy not about hard edges but it is problem of **&quot;absence of shadows&quot;**.&#xD;&#xA;&#xD;&#xA;For shadows google for &quot;shadow mapping&quot; or &quot;shadow volumes&quot;. &#xD;&#xA;&#xD;&#xA;If you really want to get rid of hard edges. Use alpha transparency for vertices near ground (it could be easy). But then you have to sort objects which you are rendering in distance from camera's viewport." />
  <row Id="13386" PostHistoryTypeId="5" PostId="6709" RevisionGUID="b33964de-e914-4877-b690-3a31e3a566fd" CreationDate="2010-12-21T17:37:59.410" UserId="3794" Comment="fixing little misstake" Text="I think that the problem of objects which look like flying is realy not about hard edges but it is problem of **&quot;absence of shadows&quot;**.&#xD;&#xA;&#xD;&#xA;For shadows google for &quot;shadow mapping&quot; or &quot;shadow volumes&quot;. &#xD;&#xA;&#xD;&#xA;If you really want to get rid of hard edges. Use alpha transparency for vertices near ground (it could be easy). But then you have to sort objects which you are rendering in distance from camera." />
  <row Id="13387" PostHistoryTypeId="2" PostId="6710" RevisionGUID="16b0c317-5e92-4698-861d-4391fa5ff2b8" CreationDate="2010-12-21T17:41:25.773" UserId="2734" Text="I don't think Silverlight has *any* future on the web - Microsoft supports HTML5 and trying to get Silverlight into the Mobile platform." />
  <row Id="13388" PostHistoryTypeId="5" PostId="6709" RevisionGUID="62d3ea3d-924c-4ba0-916e-9b3c66e25fca" CreationDate="2010-12-21T17:47:21.497" UserId="3794" Comment="add" Text="I think that the problem of objects which look like flying is realy not about hard edges but it is problem of **&quot;absence of shadows&quot;**.&#xD;&#xA;&#xD;&#xA;For shadows google for &quot;shadow mapping&quot; or &quot;shadow volumes&quot;.&#xD;&#xA;&#xD;&#xA;If you really dont want hard edges. Use alpha transparency for vertices near ground (it could be easy). But then you have to sort objects which you are rendering in distance from camera. But it will not produce anything nice i think. In fact i'm pretty sure that there is no way how to get rid of hard edges in computer grapgics. " />
  <row Id="13389" PostHistoryTypeId="2" PostId="6711" RevisionGUID="036a1202-d70b-4a99-8084-1cb05d00e249" CreationDate="2010-12-21T17:54:32.870" UserId="4129" Text="My models are stored as a set of meshes, each with a vertex list and normal list per frame, and indices for a triangle strip which is shared for all frames.  Each frame I interpolate between two adjacent frames and then use `glDrawArrays`.&#xD;&#xA;&#xD;&#xA;How can I move this into a GLSL vertex shader?  Can a shader interpolate between two sets of vertices, and how can I store those vertices on the GPU?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13390" PostHistoryTypeId="1" PostId="6711" RevisionGUID="036a1202-d70b-4a99-8084-1cb05d00e249" CreationDate="2010-12-21T17:54:32.870" UserId="4129" Text="interpolating frames in a vertex shader" />
  <row Id="13391" PostHistoryTypeId="3" PostId="6711" RevisionGUID="036a1202-d70b-4a99-8084-1cb05d00e249" CreationDate="2010-12-21T17:54:32.870" UserId="4129" Text="&lt;opengl&gt;&lt;glsl&gt;" />
  <row Id="13392" PostHistoryTypeId="5" PostId="6711" RevisionGUID="d8246cb5-245f-4859-9cc2-8c1e64c42c76" CreationDate="2010-12-21T18:03:16.090" UserId="4129" Comment="added 39 characters in body" Text="My models are stored as a set of meshes, each with a vertex list and normal list per key-frame, and indices for GL_TRIANGLES which is shared for all frames.  Each frame I `lerp` between two adjacent key-frames to generate the vertices for that frame on the CPU and then draw it.&#xD;&#xA;&#xD;&#xA;How can I move this into a GLSL vertex shader?  Can a shader interpolate between two sets of vertices, and how can I store those vertices on the GPU?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13393" PostHistoryTypeId="2" PostId="6712" RevisionGUID="7bce220c-47c5-465c-8d9c-dbb8bdfaa6f4" CreationDate="2010-12-21T18:33:41.167" UserId="974" Text="The NES classic Mega Man series uses a very specific scrolling technique that I'm having a hard time wrapping my head around implementing. Essentially, the level is divided into &quot;screens&quot; which are all the same size. Some of the screens *smoothly scroll* in to one another, creating the illusion of a wider fields of play. Some of the screens *stop the camera from scrolling* until the player has reached the edge of the screen, at which time a transition occurs and the next screen is shown. It is also possible for a single screen to have more than one transition, for example it has a ladder that goes up to one screen, but you could also walk forward to another screen.&#xD;&#xA;&#xD;&#xA;How can these screen transitions be modeled?&#xD;&#xA;&#xD;&#xA;![Mega Man screen transition diagram][1]&#xD;&#xA;&#xD;&#xA;* Screen 0 is the starting screen, where the player starts.&#xD;&#xA;* Screen 0-3 is horizontally smooth-scrolling and appears to the player as one continuous field of play.&#xD;&#xA;* Since there is a transition between Screen 3 and it's neighboring screens 4 and 5, the camera will not advance passed the right or top edges of Screen 3 unless the player moves to that respective edge and &quot;pushes&quot; through to the next screen.&#xD;&#xA;* Once the player moves to either of the transition edges, user input is momentarily disabled and the camera transitions into the new area, after which user input is restored.&#xD;&#xA;&#xD;&#xA;* The blue screen (Screen 5) disabled horizontal scrolling so that only vertical transitions are possible.&#xD;&#xA;* The green screen (Screen 6) has a vertical transition back to Screen 5 but also allows horizontal smooth-scrolling into Screen 7.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/b6EF8.png" />
  <row Id="13394" PostHistoryTypeId="1" PostId="6712" RevisionGUID="7bce220c-47c5-465c-8d9c-dbb8bdfaa6f4" CreationDate="2010-12-21T18:33:41.167" UserId="974" Text="Mega Man-style screen scrolling design" />
  <row Id="13395" PostHistoryTypeId="3" PostId="6712" RevisionGUID="7bce220c-47c5-465c-8d9c-dbb8bdfaa6f4" CreationDate="2010-12-21T18:33:41.167" UserId="974" Text="&lt;2d&gt;&lt;platform&gt;&lt;retro&gt;&lt;megaman&gt;" />
  <row Id="13396" PostHistoryTypeId="6" PostId="6700" RevisionGUID="49313610-f1cc-49e9-b464-3ce3692373e1" CreationDate="2010-12-21T19:02:17.917" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;silverlight&gt;" />
  <row Id="13397" PostHistoryTypeId="6" PostId="6712" RevisionGUID="a9c560c5-4aa9-45d0-a610-dd95904182ba" CreationDate="2010-12-21T19:04:54.530" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;platform&gt;&lt;retro&gt;" />
  <row Id="13398" PostHistoryTypeId="6" PostId="6712" RevisionGUID="c0512bf3-3c0d-4935-af65-8b8493fc1874" CreationDate="2010-12-21T19:05:20.663" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;camera&gt;&lt;platform&gt;" />
  <row Id="13399" PostHistoryTypeId="2" PostId="6713" RevisionGUID="adcabc22-d056-48ef-a4da-73f32abd0ae7" CreationDate="2010-12-21T19:23:08.413" UserId="3081" Text="It sounds like what you need is the concept of *rooms* as opposed to *screens*.  Screens 1-3 would be one room, e.g.  Your rooms could then be of any size and shape, or even restricted to the size of multiples of a *screen*.&#xD;&#xA;&#xD;&#xA;Your camera would follow the player through a given room, up until the player gets too close to the border (half a screen width).  When the player moves across the border, and into another room, you perform the transition visualization.&#xD;&#xA;&#xD;&#xA;Each room would have a set of access points, which are mapped to access points of another room--creating the transition points." />
  <row Id="13400" PostHistoryTypeId="6" PostId="2970" RevisionGUID="2247b0ff-258e-46b0-b297-07993191eb53" CreationDate="2010-12-21T19:37:55.210" UserId="284" Comment="edited tags" Text="&lt;design-patterns&gt;&lt;old-school&gt;&lt;mud&gt;" />
  <row Id="13401" PostHistoryTypeId="2" PostId="6714" RevisionGUID="356854e9-e1e3-401f-9249-1fc6a75f6d4c" CreationDate="2010-12-21T20:01:37.397" UserId="284" Text="I haven't been able to find a lot of the old, open source mud source codes.  I find the way they did things very applicable to text-based/browser based games, and I'd love to be able to skim through parts of 'em for inspiration.&#xD;&#xA;&#xD;&#xA;For instance, we have this huge list of muds and the relationships between them, but little by way of access to source code.&#xD;&#xA;http://en.wikipedia.org/wiki/MUD_trees&#xD;&#xA;&#xD;&#xA;Often (I'm looking at you, dikumud, http://www.dikumud.com/links.aspx ) the sites of the mud itself doesn't even have a working link to the source.&#xD;&#xA;&#xD;&#xA;https://github.com/alexmchale/merc-mud has a copy of merc that I found, which certainly contains other works within it's history, but the pickings seems sparse.&#xD;&#xA;&#xD;&#xA;Does anyone have better resources for gaining access to MUD source code than these?" />
  <row Id="13402" PostHistoryTypeId="1" PostId="6714" RevisionGUID="356854e9-e1e3-401f-9249-1fc6a75f6d4c" CreationDate="2010-12-21T20:01:37.397" UserId="284" Text="MUD source code" />
  <row Id="13403" PostHistoryTypeId="3" PostId="6714" RevisionGUID="356854e9-e1e3-401f-9249-1fc6a75f6d4c" CreationDate="2010-12-21T20:01:37.397" UserId="284" Text="&lt;open-source&gt;&lt;source-code&gt;&lt;old-school&gt;&lt;mud&gt;" />
  <row Id="13404" PostHistoryTypeId="2" PostId="6715" RevisionGUID="33375ac2-bd68-4df8-a926-7ec8f3d5aa90" CreationDate="2010-12-21T20:18:41.373" UserId="3794" Text="This could be easy. You can send another informations then X,Y,Z position with your vertex. If you are not using one of color, normal or texture coord, you can use them for adding there your second vertex list XYZ. It is very common to use texture coords etc. to something different than what its name says. (dont forget to comment it to dont get confused another programmers...)&#xD;&#xA;&#xD;&#xA;On vertex shader you can use mix function. It does linear interpolation between two values (or vectors) based on third value between 0-1. `mix(vec1,vec2,mixValue)`.&#xD;&#xA;&#xD;&#xA;If you dont have any free space in your vertex desc, use mutlitexturing coords. And if you dont have this either - or you dont want to use this. Make your second vertex list array of floats, send it to the gpu and use `gl_InstanceID` for addresing in this array. It is vertex id... or index if you want. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13405" PostHistoryTypeId="2" PostId="6716" RevisionGUID="f2da56b3-ab59-4131-bf9f-dbbaa1eb919c" CreationDate="2010-12-21T20:42:07.140" UserId="962" Text="#http://www.andreasen.org/newmud/#&#xD;&#xA;&#xD;&#xA;**Looks like a good resource, with a list of over 30 different open source MUDs.** &#xD;&#xA;&#xD;&#xA;Just for reference I found this by searching Open Source MUD on google." />
  <row Id="13406" PostHistoryTypeId="2" PostId="6717" RevisionGUID="54aedac3-c2b5-45f9-8efa-554d6de12fc5" CreationDate="2010-12-21T21:33:07.520" UserId="721" Text="In the vertex shader, you can use Texture too. This is the &quot;VTF&quot; tricks. This is used in GPU Particle engine.&#xD;&#xA;&#xD;&#xA;Look this document: [Nvidia VTF Introduction][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/using_vertex_textures.html" />
  <row Id="13410" PostHistoryTypeId="6" PostId="6445" RevisionGUID="178f3697-15d4-498d-97fe-2c85ea85ac75" CreationDate="2010-12-22T00:25:29.787" UserId="891" Comment="edited tags" Text="&lt;c#&gt;&lt;algorithm&gt;&lt;ai&gt;&lt;multiplayer&gt;" />
  <row Id="13411" PostHistoryTypeId="6" PostId="3073" RevisionGUID="d133c77e-eb17-4b38-9bf1-8ba4ec25e72a" CreationDate="2010-12-22T00:25:56.997" UserId="891" Comment="edited tags" Text="&lt;engine&gt;&lt;ai&gt;" />
  <row Id="13412" PostHistoryTypeId="2" PostId="6719" RevisionGUID="66c37171-153f-4e30-b128-e0346e594371" CreationDate="2010-12-22T01:51:47.073" UserId="2781" Text="The concept of larger smooth scrolling areas being made up of screen-sized chunks is an artifact of severe resource limitations on classic consoles, where performance gains could be had by keeping data in chunks of specific sizes (such as one memory page). There is very little reason to use such a system in a modern game." />
  <row Id="13414" PostHistoryTypeId="2" PostId="6721" RevisionGUID="99f3114c-8706-45f1-a730-41095264c3c2" CreationDate="2010-12-22T03:12:53.930" UserId="4151" Text="What steps would be involved in constructing a destructible 2D landscape, like in Worms? Ideally, What are some ways that this process could be made efficient as possible?" />
  <row Id="13415" PostHistoryTypeId="1" PostId="6721" RevisionGUID="99f3114c-8706-45f1-a730-41095264c3c2" CreationDate="2010-12-22T03:12:53.930" UserId="4151" Text="Implementing a 2D destructible landscape (like Worms)" />
  <row Id="13416" PostHistoryTypeId="3" PostId="6721" RevisionGUID="99f3114c-8706-45f1-a730-41095264c3c2" CreationDate="2010-12-22T03:12:53.930" UserId="4151" Text="&lt;2d&gt;" />
  <row Id="13417" PostHistoryTypeId="2" PostId="6722" RevisionGUID="31ef3561-4b37-4d47-9e34-dc5e88474f62" CreationDate="2010-12-22T04:26:31.647" UserId="3407" Text="One possibility off the top of my head:  &#xD;&#xA;&#xD;&#xA;Use a vector graphics path representation for storing the outline of the destructible &quot;land&quot;. When a destruction event occurs (e.g., a grenade goes off), the blast area, represented as a circle, would be removed from the the land path via a boolean subtraction operation. The resulting path represents the new &quot;land&quot; for ground collision detection, and also possibly a mask for drawing the land." />
  <row Id="13418" PostHistoryTypeId="2" PostId="6723" RevisionGUID="b7f002de-2acf-4712-8f13-f53c77905167" CreationDate="2010-12-22T07:10:53.827" UserId="20" Text="I don't know how the landscape in worms was implemented exactly, but I'm pretty sure they used a bitmap for the landscape (at least in the older games of the series).&#xD;&#xA;&#xD;&#xA;A very basic approach would be a bitmap image (B/W) where black pixels represent *air* and white pixels represent *ground*. Destruction of the landscape can be done easily using pixel operations. So if a rocket hits the ground, paint a black circle with `radius = blastRadius` at the point of impact.&#xD;&#xA;&#xD;&#xA;You can then render your world (or just a portion of it) using that bitmap. For better performance I suggest you implement it in a way, that you can update/render just a portion of the &quot;world&quot;. Eg. if some parts of the landscape are destroyed by a rocket, just re-render the affected areas, not the whole world.&#xD;&#xA;&#xD;&#xA;Instead of a B/W image as your &quot;collision-map&quot;, you could also use a 24bit image where you use two channels to store the surface-normal (x,y) per pixel and one channel to store the actual &quot;collision-map&quot;. Having the surface-normal at hand will greatly help you to calculate bouncing grenades, or to determine if a character can move in a given direction." />
  <row Id="13419" PostHistoryTypeId="2" PostId="6724" RevisionGUID="74d0d327-b12e-44a7-a3d2-8a74cc6a9951" CreationDate="2010-12-22T08:27:40.793" UserId="2302" Text="We're working on an iOS game that we plan on having several content updates for.&#xD;&#xA;&#xD;&#xA;It's a story type game with lots of little flags when things have been accomplished and such.  There is also an inventory system.&#xD;&#xA;&#xD;&#xA;I'm looking for ideas on how to best design a game state save data system that will be resilient to a lot of updates and changes to the game." />
  <row Id="13420" PostHistoryTypeId="1" PostId="6724" RevisionGUID="74d0d327-b12e-44a7-a3d2-8a74cc6a9951" CreationDate="2010-12-22T08:27:40.793" UserId="2302" Text="Architecture for Versioned Save Data" />
  <row Id="13421" PostHistoryTypeId="3" PostId="6724" RevisionGUID="74d0d327-b12e-44a7-a3d2-8a74cc6a9951" CreationDate="2010-12-22T08:27:40.793" UserId="2302" Text="&lt;architecture&gt;&lt;data&gt;" />
  <row Id="13422" PostHistoryTypeId="2" PostId="6725" RevisionGUID="f6b0aef7-2934-4ae9-b821-d5f48945c30f" CreationDate="2010-12-22T09:47:47.480" UserId="1272" Text="I haven't personally used it. but I've heard good things about [Google Protocol Buffers][1]. And it looks like there is an [Obj-C port][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/apis/protocolbuffers/&#xD;&#xA;  [2]: http://code.google.com/p/metasyntactic/wiki/ProtocolBuffers" />
  <row Id="13424" PostHistoryTypeId="2" PostId="6726" RevisionGUID="359ca52e-ec9b-4700-9d57-5b94bbb70f67" CreationDate="2010-12-22T11:53:43.200" UserId="4156" Text="You can find every information about [how to give money to facebook][1], but when it comes to take it back…&#xD;&#xA;&#xD;&#xA;If I give credits to a user, can he get it back in dollars? &#xD;&#xA;&#xD;&#xA;If a user gives me credits, can I turn it into dollars?&#xD;&#xA;&#xD;&#xA;If so, how much does it cost?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.facebook.com/credits/" />
  <row Id="13425" PostHistoryTypeId="1" PostId="6726" RevisionGUID="359ca52e-ec9b-4700-9d57-5b94bbb70f67" CreationDate="2010-12-22T11:53:43.200" UserId="4156" Text="Can a user / a game developer get their credit back in dollars? If yes, at what cost?" />
  <row Id="13426" PostHistoryTypeId="3" PostId="6726" RevisionGUID="359ca52e-ec9b-4700-9d57-5b94bbb70f67" CreationDate="2010-12-22T11:53:43.200" UserId="4156" Text="&lt;facebook&gt;" />
  <row Id="13427" PostHistoryTypeId="2" PostId="6727" RevisionGUID="015971b3-8a9a-45b7-948f-5cd43906eb65" CreationDate="2010-12-22T12:13:35.753" UserId="2158" Text="Since you are looking at the sphere with a constant camera, you can do high quality rendering extremely fast with a simple precalculated lookup-table.&#xD;&#xA;&#xD;&#xA;As the precalculate step, with any method you like (usually with polygons or raytracing) you render a texture mapped sphere to an offsceen buffer, but instead of calculating the colors based on the texture, you only store the texture u/v-coordinates.&#xD;&#xA;&#xD;&#xA;Then when rendering the actual planet you render a simple square and for each pixel you fetch the actual u/v-coordinates from the lookup-table and the pixel colors from the planet texture using those u/v-coordinates. To rotate the sphere you just offset the u-coordinate with the rotation angle.&#xD;&#xA;&#xD;&#xA;This technique was very popular in the demoscene for example with texture mapped tunnel effects, but unfortunately I couldn't find any good tutorials about it." />
  <row Id="13429" PostHistoryTypeId="2" PostId="6729" RevisionGUID="0320e123-93c1-412d-a392-c6731404ccb3" CreationDate="2010-12-22T13:29:55.103" UserId="4035" Text="Having never written something similar, grain of salt etc. However, writing for changing systems is what all agile programming should be about - so hopefully I'm not totally useless ;)&#xD;&#xA;&#xD;&#xA;I think you'll want to take a full-team meeting and discuss what is known/likely to change over time? Where are your points of variation? This will give you focus on the right bits. E.g. if backgrounds will never change, don't worry about having a smart solution for that. Then adjust the solutions after _how_ you see variation occuring.&#xD;&#xA;&#xD;&#xA;Other than that, probably saving only as small and relevant a portion of information as possible will be the most resilient. If you save the state of every flag, you might shoot yourself in the foot when the number changes, where saving only set flags would allow new flags and removing obscure flags more easily. Either way I think just putting in safe-guards and checks early and _methodically_ is a must (and possibly enough of a solution, depending on what you're doing)." />
  <row Id="13430" PostHistoryTypeId="2" PostId="6730" RevisionGUID="6e348291-a284-4d1d-9067-a8b2d5756435" CreationDate="2010-12-22T13:44:21.793" UserId="1179" Text="Let us consider the case: there is an overall bounding rectangle (call this **Rb**) which contains a number of rectangles within it (call this set **SRo**). Now I would like to randomly position a new rectangle with known bounds (call this **Rn**) within the bounds of **Rb** without intersecting any of the rectangles in the set **SRo**&#xD;&#xA;&#xD;&#xA;My current approach is rather brute force:&#xD;&#xA;&#xD;&#xA; 1. Generate random x-y coordinates for new rectangle&#xD;&#xA; 2. Check Rb contains Rn if it is placed at intended coordinates&#xD;&#xA; 3. Check Rn does not intersect any of rectangles inside set SRo&#xD;&#xA;&#xD;&#xA;Anyone got any better idea?" />
  <row Id="13431" PostHistoryTypeId="1" PostId="6730" RevisionGUID="6e348291-a284-4d1d-9067-a8b2d5756435" CreationDate="2010-12-22T13:44:21.793" UserId="1179" Text="How to randomly place rectangle inside a larger bounding rectangle without intersecting other rectangles inside" />
  <row Id="13432" PostHistoryTypeId="3" PostId="6730" RevisionGUID="6e348291-a284-4d1d-9067-a8b2d5756435" CreationDate="2010-12-22T13:44:21.793" UserId="1179" Text="&lt;2d&gt;&lt;math&gt;" />
  <row Id="13434" PostHistoryTypeId="2" PostId="6731" RevisionGUID="58889c69-1c04-4bad-9287-74c26d1b40c7" CreationDate="2010-12-22T14:01:43.880" UserId="14" Text="&gt; When you redeem Credits with us we will redeem them at the rate of $0.10 per Credit, less a service fee of $0.03 per credit redeemed. If we change the service fee or redemption rate, the redemption rate and service fee in effect at the time you accepted a Credit as consideration will apply to that Credit. We will give you 30 days notice on the Facebook Developer Wiki of changes to the redemption rate or service fee.&#xD;&#xA;&#xD;&#xA;I do not believe that an end-user is able to redeem credits. If they were, then Facebook Games might constitute gambling and that would cause problems.&#xD;&#xA;&#xD;&#xA;You can find the entire [Facebook Credits Policy here.][1] If you are interested in applying for the credits beta program, [click here.][2] http://developers.facebook.com/credits&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developers.facebook.com/policy/credits&#xD;&#xA;  [2]: http://developers.facebook.com/credits" />
  <row Id="13435" PostHistoryTypeId="2" PostId="6732" RevisionGUID="573393c5-93b8-4318-8c3b-4e60b3b5ab02" CreationDate="2010-12-22T14:43:17.843" UserId="3505" Text="Sounds like a fair implementation, there is no simple trick for avoiding doing a fair amount of checking. If you have got a performance problem then show us your code, otherwise just stick with it." />
  <row Id="13436" PostHistoryTypeId="2" PostId="6733" RevisionGUID="9d02f5e9-8d7c-4b47-9c52-edc58f67d8ee" CreationDate="2010-12-22T14:43:50.590" UserId="1365" Text="In addition to what others have pointed out here, I'd like to say that the consoles have very little overhead when it comes to memory (XBox 360 only reserves ~32 MB of RAM for system use, the rest of the 512 MB is for the game). Once you figure out what is already used by the OS and background apps on the majority of consumer PCs, you will realize there isn't too much spare RAM available.&#xD;&#xA;&#xD;&#xA;Luckily modern OS's have paging systems for their RAM so we generally don't need to worry about memory usage, but even on a PC game it would be a good idea to stick to a limit of 256 to 512 MB of memory so you don't start thrashing the paged memory and ruin game performance." />
  <row Id="13437" PostHistoryTypeId="2" PostId="6734" RevisionGUID="e613760c-9bbf-47d7-931e-32d55dd966ec" CreationDate="2010-12-22T15:22:41.897" UserId="605" Text="Given a situation where I have a pool of `X` many people of different score (rank) `S` with game size `N`. How can I create groups of `N` size where `∑ STD( S )` is minimized? Also there is a requirement any person can only be in the pool for `T` time." />
  <row Id="13438" PostHistoryTypeId="1" PostId="6734" RevisionGUID="e613760c-9bbf-47d7-931e-32d55dd966ec" CreationDate="2010-12-22T15:22:41.897" UserId="605" Text="Match Making Groups of Players" />
  <row Id="13439" PostHistoryTypeId="3" PostId="6734" RevisionGUID="e613760c-9bbf-47d7-931e-32d55dd966ec" CreationDate="2010-12-22T15:22:41.897" UserId="605" Text="&lt;ranking&gt;&lt;matchmaking&gt;" />
  <row Id="13440" PostHistoryTypeId="2" PostId="6735" RevisionGUID="3d200811-0a01-4adf-b7fa-78ccb088f7bd" CreationDate="2010-12-22T15:35:22.063" UserId="3081" Text="This sounds similar to a collision-detection problem.  Look at &quot;spacial partitioning&quot; to sub-divide **Rb**, and find the set of open spaces in which **Rn** would fit.  Randomly select one of those spaces, and place **Rn** randomly within it." />
  <row Id="13441" PostHistoryTypeId="2" PostId="6736" RevisionGUID="1fc35954-2020-4e84-be41-a23018337f39" CreationDate="2010-12-22T15:37:36.257" UserId="20" Text="If don't run that algorithm too often (eg. just at startup-time) and there aren't thousands of rectangles, I'd probably just stick with the brute-force approach. &#xD;&#xA;&#xD;&#xA;You could already eliminate a lot of unnecessary trial/error attempts, by combining step 1 and 2 into one step. To do this, just make sure you generate random `x` and `y` coordinates that are guaranteed to be inside **Rb**.&#xD;&#xA;&#xD;&#xA;Example for in pseudo-code, assumes that random() returns a value from 0-1 and that y-axis points down (screen-space).&#xD;&#xA;&#xD;&#xA;    y = Rb.minY + (random() * (Rb.height - Rn.height))&#xD;&#xA;    x = Rb.minX + (random() * (Rb.width - Rn.width))&#xD;&#xA;&#xD;&#xA;Then check the rectangle position against all the already placed rectangles. If it intersects another rectangle, restart at *step 1*.&#xD;&#xA;&#xD;&#xA;Depending on the generated random-values, this approach could need a lot of tries to be successful though. An optimization would be to divide your containing rectangle (Rb) into sections and increase a counter for each section that intersects a placed rectangle. Then pick random coordinates from sections with a low &quot;rectangle-count&quot; in *step 1*. &#xD;&#xA;&#xD;&#xA;If you try to place a lot of rectangles into **Rb** (so that a big part of the area of **Rb** is covered), the brute-force approach is a very bad choice, since there's a very high probability that it will fail (endless loop).&#xD;&#xA;&#xD;&#xA;Maybe also have a look at [this answer over at stackoverflow][1] for another approach.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4373741/how-can-i-randomly-place-several-non-colliding-rects" />
  <row Id="13442" PostHistoryTypeId="5" PostId="6712" RevisionGUID="d40dfabc-5071-4224-8832-643bbbad1cdf" CreationDate="2010-12-22T16:00:54.250" UserId="974" Comment="Added diagram of &quot;rooms&quot; concept with transition regions" Text="The NES classic Mega Man series uses a very specific scrolling technique that I'm having a hard time wrapping my head around implementing. Essentially, the level is divided into &quot;screens&quot; which are all the same size. Some of the screens *smoothly scroll* in to one another, creating the illusion of a wider fields of play. Some of the screens *stop the camera from scrolling* until the player has reached the edge of the screen, at which time a transition occurs and the next screen is shown. It is also possible for a single screen to have more than one transition, for example it has a ladder that goes up to one screen, but you could also walk forward to another screen.&#xD;&#xA;&#xD;&#xA;How can these screen transitions be modeled?&#xD;&#xA;&#xD;&#xA;![Mega Man screen transition diagram][1]&#xD;&#xA;&#xD;&#xA;* Screen 0 is the starting screen, where the player starts.&#xD;&#xA;* Screen 0-3 is horizontally smooth-scrolling and appears to the player as one continuous field of play.&#xD;&#xA;* Since there is a transition between Screen 3 and it's neighboring screens 4 and 5, the camera will not advance passed the right or top edges of Screen 3 unless the player moves to that respective edge and &quot;pushes&quot; through to the next screen.&#xD;&#xA;* Once the player moves to either of the transition edges, user input is momentarily disabled and the camera transitions into the new area, after which user input is restored.&#xD;&#xA;&#xD;&#xA;* The blue screen (Screen 5) disabled horizontal scrolling so that only vertical transitions are possible.&#xD;&#xA;* The green screen (Screen 6) has a vertical transition back to Screen 5 but also allows horizontal smooth-scrolling into Screen 7.&#xD;&#xA;&#xD;&#xA;**Edit**: Implementing the transitions in terms of rooms lead me to this:&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;The small notches with an arrow are the regions in which a transition can occur. Each region has a &quot;direction&quot; and lies *just* outside of the room's visible area. As soon as the player hits a region, a transition will be started.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/b6EF8.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/yO7jT.png" />
  <row Id="13443" PostHistoryTypeId="6" PostId="6734" RevisionGUID="ed46c2d5-cc03-4d0f-b666-0856ca9056aa" CreationDate="2010-12-22T16:05:32.633" UserId="605" Comment="edited tags" Text="&lt;ranking&gt;&lt;tournament&gt;&lt;matchmaking&gt;" />
  <row Id="13445" PostHistoryTypeId="2" PostId="6738" RevisionGUID="993228ee-dde5-4e2c-a83a-f25ce1b0ca67" CreationDate="2010-12-22T16:43:07.610" UserId="2998" Text="I am curious about whether to develop an xna game for the windows phone 7. It would be nice to know how the games are doing on that platform sales wise.&#xD;&#xA;&#xD;&#xA;Something like this would be very helpful:&#xD;&#xA;http://www.xboxist.com/xbox-360/games/xna-community-games-is-a-failed-experiment-010122.php&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13446" PostHistoryTypeId="1" PostId="6738" RevisionGUID="993228ee-dde5-4e2c-a83a-f25ce1b0ca67" CreationDate="2010-12-22T16:43:07.610" UserId="2998" Text="Does anyone know where I can find wp7 indie game sales data?" />
  <row Id="13447" PostHistoryTypeId="3" PostId="6738" RevisionGUID="993228ee-dde5-4e2c-a83a-f25ce1b0ca67" CreationDate="2010-12-22T16:43:07.610" UserId="2998" Text="&lt;xna&gt;&lt;windows-phone-7&gt;" />
  <row Id="13448" PostHistoryTypeId="2" PostId="6739" RevisionGUID="f6503236-bc7f-4540-8cb3-68ed111a3e9c" CreationDate="2010-12-22T17:19:13.553" UserId="2501" Text="I would like to ask for game engine recommendations for turn based wargame development. I would like my engine to support; &#xD;&#xA;&#xD;&#xA; - hex maps &#xD;&#xA; - agents on hex &#xD;&#xA; - rule based ai for the agents &#xD;&#xA; - terrain on hex&#xD;&#xA; - cultural features on hex &#xD;&#xA; - los analysis &#xD;&#xA; - abstract agent templetes" />
  <row Id="13449" PostHistoryTypeId="1" PostId="6739" RevisionGUID="f6503236-bc7f-4540-8cb3-68ed111a3e9c" CreationDate="2010-12-22T17:19:13.553" UserId="2501" Text="Game engine for turn based wargame" />
  <row Id="13450" PostHistoryTypeId="3" PostId="6739" RevisionGUID="f6503236-bc7f-4540-8cb3-68ed111a3e9c" CreationDate="2010-12-22T17:19:13.553" UserId="2501" Text="&lt;engine&gt;" />
  <row Id="13451" PostHistoryTypeId="2" PostId="6740" RevisionGUID="d7497563-f969-4436-8e97-7907a987ea49" CreationDate="2010-12-22T17:50:26.133" UserId="3830" Text="Check out [Vassal][1] - it may do the trick for you.  @AttackingHobo pointed it out to me a while back in a previous question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vassalengine.org/ " />
  <row Id="13452" PostHistoryTypeId="2" PostId="6741" RevisionGUID="cce955ac-0604-496e-a25f-76d2dfe9eabc" CreationDate="2010-12-22T18:16:32.250" UserId="2301" Text="Would they even have that info out yet? If its anything like indie games, they release it quarterly, and its only been a month or so.. &#xD;&#xA;(that quoted site is pretty old)" />
  <row Id="13454" PostHistoryTypeId="2" PostId="6742" RevisionGUID="16fa1fa4-2fae-453e-b3f8-858b80465379" CreationDate="2010-12-22T18:56:24.557" UserId="2345" Text="This shows some small and grim numbers: http://blogs.techrepublic.com.com/smartphones/?p=2005&#xD;&#xA;&#xD;&#xA;&gt; **Conclusion** &#xD;&#xA;&#xD;&#xA;&gt; My advice still stands for the time being: do not develop&#xD;&#xA;&gt; applications for Windows Phone 7 with&#xD;&#xA;&gt; the expectation that you will make big&#xD;&#xA;&gt; bucks." />
  <row Id="13455" PostHistoryTypeId="2" PostId="6743" RevisionGUID="eab72af1-3b63-41c3-8825-da08f947098e" CreationDate="2010-12-22T18:56:43.043" UserId="3830" Text="I downloaded and ran the game from http://www.glest.org, and the &quot;feet not on the ground&quot; issue comes from lack of shadows and other visual cues that help you get the perspective right.&#xD;&#xA;&#xD;&#xA;In the screenshot you posted, shadows seem to be turned off.  Turn them on to get a better effect.  Even when using the shadows Glest provides, the shadows are pretty weak.  But turning them on does help reduce the floating characters effect.&#xD;&#xA;&#xD;&#xA;Take a look at the screenshot below I took from Glest.  The models fail to visually blend into their terrain because the textures don't visually blend between object and ground, nor are there any shadows.&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;Now take a look at this picture.  This is the same scene, but I did a quick photoshop job to add shadows and a few other changes by hand.  The characters and some objects (I didn't do everything) have a dark shadow blob under them.  The shadows aren't even real shadows (shaped like the object), but simply darker &quot;blobs&quot; at the object's base.  They are also overly dark, but on purpose.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;In addition to the shadow blobs, I darkened the bases of the objects (base of rocks, base of buildings, character feet) so that they better blend into the shadow &quot;blob&quot; under their feet.&#xD;&#xA;&#xD;&#xA;So my advice is to add stronger shadows under objects, even if with blobs to fake a shadow.  And also darken the textures of objects where they contact the ground.  These are things a nice high end engine could take care of for you with the lighting model, but there are ways to still get the effect.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2KeLJ.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/x0k1E.jpg" />
  <row Id="13456" PostHistoryTypeId="2" PostId="6744" RevisionGUID="6372ad26-cf93-44fb-8e83-cb8b28d28ee3" CreationDate="2010-12-22T18:59:42.700" UserId="2943" Text="I've been adapting a tutorial on .obj file loading on the windows system to glut.&#xD;&#xA;&#xD;&#xA;The thing's not drawing a thing except the &quot;Foot.obj&quot; file that the tutorial included and I'm going kinda nuts trying to figure out where's the fault. I'd appreciate [a look into the code][1].&#xD;&#xA;&#xD;&#xA;To try loading a different .obj just change the line &#xD;&#xA;&#xD;&#xA;    #define FILE_NAME_1 &quot;Foot.obj&quot;&#xD;&#xA;&#xD;&#xA;in `Main.cpp`. I included the .obj files I've been trying to load into the VS project.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.filedropper.com/ripobj_2" />
  <row Id="13457" PostHistoryTypeId="1" PostId="6744" RevisionGUID="6372ad26-cf93-44fb-8e83-cb8b28d28ee3" CreationDate="2010-12-22T18:59:42.700" UserId="2943" Text="Why is this .obj loader not drawing anything but the included .obj? " />
  <row Id="13458" PostHistoryTypeId="3" PostId="6744" RevisionGUID="6372ad26-cf93-44fb-8e83-cb8b28d28ee3" CreationDate="2010-12-22T18:59:42.700" UserId="2943" Text="&lt;opengl&gt;&lt;models&gt;" />
  <row Id="13459" PostHistoryTypeId="2" PostId="6745" RevisionGUID="83e1aed4-550f-4a1d-ae9b-b62ff7e56538" CreationDate="2010-12-22T19:05:08.957" UserDisplayName="codekinger" Text="You can contact the Overwolf Guys, they might help you with that.&#xD;&#xA;Contact team@Overwolf.com.&#xD;&#xA;&#xD;&#xA;They do the same in WPF etc." />
  <row Id="13460" PostHistoryTypeId="2" PostId="6746" RevisionGUID="de88cca4-e968-4418-8f74-a87c9f54704f" CreationDate="2010-12-22T19:06:58.047" UserId="1198" Text="Provided that X and N are of sufficiently small size, the following may work well for you:    &#xD;&#xA;	&#xD;&#xA;	int smallest[] = new int[N]&#xD;&#xA;	int groupMembers[] = new int[N];&#xD;&#xA;	for(int i = 0; i &lt; N; i++) { smallest[i] = players[0].Rank; }&#xD;&#xA;    for(int i = 0; i &lt; players.Length; i++) {&#xD;&#xA;		for(int j = 0; j &lt; N; j++) {&#xD;&#xA;			if(smallest[j] &gt; players[i].Rank) { &#xD;&#xA;				// store player index and rank&#xD;&#xA;				groupMembers[j] = i; &#xD;&#xA;				smallest[j] = players[i].Rank; &#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At the end of this code, you should have groupMembers filled with the index of players with the smallest rank.&#xD;&#xA;&#xD;&#xA;If your values for X and N are very large, it would probably make the most sence to keep the player list sorted by `Rank` such that you could always take the bottom `N` elements to create a group. This will front-load your computation time (keeping the list sorted every time you add a new item), in contrast with the above algorithm which would require execution every time a new group is to be created." />
  <row Id="13461" PostHistoryTypeId="5" PostId="6736" RevisionGUID="544255cd-63ba-4f1d-a109-4224a9736f09" CreationDate="2010-12-22T19:10:40.930" UserId="20" Comment="spelling" Text="If don't run that algorithm too often (eg. just at startup-time) and there aren't thousands of rectangles, I'd probably just stick with the brute-force approach. &#xD;&#xA;&#xD;&#xA;You could already eliminate a lot of unnecessary trial/error attempts, by combining step 1 and 2 into one step. To do this, just make sure you generate random `x` and `y` coordinates that are guaranteed to be inside **Rb**.&#xD;&#xA;&#xD;&#xA;Example in pseudo-code, assumes that random() returns a value from 0-1 and that y-axis points down (screen-space).&#xD;&#xA;&#xD;&#xA;    y = Rb.minY + (random() * (Rb.height - Rn.height))&#xD;&#xA;    x = Rb.minX + (random() * (Rb.width - Rn.width))&#xD;&#xA;&#xD;&#xA;Then check the rectangle position against all the already placed rectangles. If it intersects another rectangle, restart at *step 1*.&#xD;&#xA;&#xD;&#xA;Depending on the generated random-values, this approach could need a lot of tries to be successful though. An optimization would be to divide your containing rectangle (Rb) into sections and increase a counter for each section that intersects a placed rectangle. Then pick random coordinates from sections with a low &quot;rectangle-count&quot; in *step 1*. &#xD;&#xA;&#xD;&#xA;If you try to place a lot of rectangles into **Rb** (so that a big part of the area of **Rb** is covered), the brute-force approach is a very bad choice, since there's a very high probability that it will fail (endless loop).&#xD;&#xA;&#xD;&#xA;Maybe also have a look at [this answer over at stackoverflow][1] for another approach.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4373741/how-can-i-randomly-place-several-non-colliding-rects" />
  <row Id="13462" PostHistoryTypeId="2" PostId="6747" RevisionGUID="08f0c9c2-91ca-45a5-925a-450d597de966" CreationDate="2010-12-22T19:49:57.250" UserId="4168" Text="The SunBurn Game Engine has a free version called the SunBurn Framework:&#xD;&#xA;&#xD;&#xA;http://www.synapsegaming.com/products/sunburn/framework/&#xD;&#xA;&#xD;&#xA;It doesn't include the editor or deferred rendering, but it uses the same api and design as the game engine.&#xD;&#xA;&#xD;&#xA;Also SunBurn uses the exact same code and assets for Windows, Xbox, and Windows Phone 7, so it's just as easy to develop on all three platforms.&#xD;&#xA;&#xD;&#xA;-JohnK (SunBurn team member)" />
  <row Id="13463" PostHistoryTypeId="2" PostId="6748" RevisionGUID="d9ba8b45-8250-40d4-bf31-fd3622e2016d" CreationDate="2010-12-22T20:18:56.243" UserId="458" Text="Depending on the layout of rectangles already inside, if you find that brute-force is taking too many iterations (i.e. that there are too few valid spaces to put a new rectangle after some point in time), an alternative might be to iterate through the entire bounding box, making a list of all valid positions where the new smaller box can go. Then, choose a random element from that list. Worst-case O(x*y) time, which is at least better than the random worst-case O(infinity)." />
  <row Id="13464" PostHistoryTypeId="5" PostId="6744" RevisionGUID="eaf9dfb9-c0f6-4c18-995d-98b0e76d0406" CreationDate="2010-12-22T20:31:15.993" UserId="2943" Comment="added 75 characters in body" Text="I've been adapting a tutorial on .obj file loading on the windows system to glut.&#xD;&#xA;&#xD;&#xA;The thing's not drawing a thing except the &quot;Foot.obj&quot; file that the tutorial included and I'm going kinda nuts trying to figure out where's the fault. I'd appreciate [a look into the code][1].&#xD;&#xA;&#xD;&#xA;To try loading a different .obj just change the line &#xD;&#xA;&#xD;&#xA;    #define FILE_NAME_1 &quot;Foot.obj&quot;&#xD;&#xA;&#xD;&#xA;in `Main.cpp`. I included the .obj files I've been trying to load into the VS project.&#xD;&#xA;&#xD;&#xA;edit: [codepad link to Main.cpp][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.filedropper.com/ripobj_2&#xD;&#xA;  [2]: http://codepad.org/uXKt9de1" />
  <row Id="13465" PostHistoryTypeId="2" PostId="6749" RevisionGUID="c4f11ff0-fa1d-48a9-87fa-239b35c73fc8" CreationDate="2010-12-22T20:40:19.000" UserId="458" Text="&gt;Well paced (You can't beat the game in 5 minutes, but it wont take a week)&#xD;&#xA;&#xD;&#xA;Not driven by a single game element, so much as the overall scope of the game. Arrived at mainly through playtesting, I think.&#xD;&#xA;&#xD;&#xA;&gt;Replayable (The first game isn't your last)&#xD;&#xA;&#xD;&#xA;Mostly done through randomized starting positions and a variety of opponents that each have their own strategies / special abilities.&#xD;&#xA;&#xD;&#xA;&gt;Competetive (The AI doesn't play like a 3 year old)&#xD;&#xA;&#xD;&#xA;Most 4X games I've seen do not actually achieve this. AI in a 4X game is a really hard problem; the solution for many games is to keep it as a &quot;dumb&quot; AI but give it numerical boosts (faster production/growth curve). My understanding is that AI is usually developed through trial-and-error and playtesting; start with a fairly simple AI, play until you see it do something really stupid, then figure out how to make it so it doesn't do that stupid thing anymore... and repeat. Not particularly interesting or glorious but it works.&#xD;&#xA;&#xD;&#xA;&gt;Not repetetive (Such as using the same strategy over and over, or spamming units)&#xD;&#xA;&#xD;&#xA;Same as &quot;replayable&quot;.&#xD;&#xA;&#xD;&#xA;&gt;Economical (Not having 7 trillion metal and coins after 10 minutes of play)&#xD;&#xA;&#xD;&#xA;Same as &quot;well paced&quot;.&#xD;&#xA;&#xD;&#xA;&gt;Not to much micro-managing&#xD;&#xA;&#xD;&#xA;Also arrived at through playtesting. Earlier 4X games actually did have quite a bit of micro-managing, and in fact it could be argued that for SOME players who enjoy that level of control, this is desirable. To cut down on this, it's generally a matter of simplifying the mechanics and automating certain processes. (Note that simply giving the player an option of full hands-on or automating is not optimal; if the automation is just as good as micro-managing then there's no point to letting the player take control, but if it's significantly worse then you punish players for NOT micro-managing.)&#xD;&#xA;&#xD;&#xA;&gt;Exciting (Necessary?) combat&#xD;&#xA;&#xD;&#xA;Unsure what this means. Most 4X games that I've seen (such as the Civilization series) automate combat almost entirely; you choose one unit or stack to move onto an opposing stack, a winner is determined behind the scenes, results are displayed. Entering a tactical or real-time combat map isn't something I've seen before in 4X, as it would likely ruin the pacing by making the overall game take too long.&#xD;&#xA;&#xD;&#xA;&gt;You stil need to use strategy&#xD;&#xA;&#xD;&#xA;As opposed to what, following a single easy-to-find overly-powerful algorithm? Playtesting for game balance to prevent a single unit or tech or strategy or whatever from being overwhelmingly better than the others. Also, some &quot;broken&quot; strategies are really just exploiting weak AI, so the solution to that is to iterate on the AI a bit.&#xD;&#xA;&#xD;&#xA;&gt;Intuitive interfaces (Civilization 5 is a good example)&#xD;&#xA;&#xD;&#xA;UI is a huge topic in general, but core principles of the field apply to 4X games just as they apply to anything else. Since you're talking about a niche genre to begin with, expect your players to be familiar with the major other games in the genre, and start with those games as the basis for your own UI. Obviously this depends on platform, too... 4X for PC is going to have a radically different interface than a similar game on console.&#xD;&#xA;&#xD;&#xA;&gt;And any other important parts to the Strategy/4X genre&#xD;&#xA;&#xD;&#xA;IMHO, decent multiplayer is still an unsolved problem in the genre, due to the tendency for players to micromanage on their turn, thus making the game take forever. (An exception would be games such as the Advance Wars series, that are so insanely simplified and constrained that they can be played multiplayer in a reasonable period of time.)" />
  <row Id="13466" PostHistoryTypeId="2" PostId="6750" RevisionGUID="3592f800-6cee-4ac4-9ce5-9d958d75c1f0" CreationDate="2010-12-22T20:42:35.550" UserId="2501" Text="What is the easiest (not most efficient or fastest) algorithm to find the closest points between two triangular meshes? What are the easiest early out algorithms in the broad phase? What kind of broad phase algorithm would you recommend if I only have 2 (large and complex) objects? Lastly, what is the again easiest way to compute the closest point between two triangles?  " />
  <row Id="13467" PostHistoryTypeId="1" PostId="6750" RevisionGUID="3592f800-6cee-4ac4-9ce5-9d958d75c1f0" CreationDate="2010-12-22T20:42:35.550" UserId="2501" Text="Easiest way to compute closest point between two triangular meshes" />
  <row Id="13468" PostHistoryTypeId="3" PostId="6750" RevisionGUID="3592f800-6cee-4ac4-9ce5-9d958d75c1f0" CreationDate="2010-12-22T20:42:35.550" UserId="2501" Text="&lt;collision-detection&gt;" />
  <row Id="13469" PostHistoryTypeId="2" PostId="6751" RevisionGUID="a010b5f4-3b8b-4493-b9f3-4556db84d8db" CreationDate="2010-12-22T20:47:01.843" UserId="653" Text="This is a really broad topic, and I suppose the answer would be 'it depends'. I can recommend the book '[real time collision detection](http://realtimecollisiondetection.net/)'. There are a lot of options, and they all have tradeoffs.&#xD;&#xA;&#xD;&#xA;My guess for easiest early out would be using a grid, then again, it's not very effective if you only have two large objects, in which case bounding volumes are a good choice.&#xD;&#xA;&#xD;&#xA;Only having two objects is kind of weird though, could you give us a scenario? (as it is, it smells a bit like a homework question)" />
  <row Id="13470" PostHistoryTypeId="2" PostId="6752" RevisionGUID="79ac3137-a478-4cf5-9387-ecef84593574" CreationDate="2010-12-22T23:17:27.667" UserId="3505" Text="The following answer assume a fairly good grasp of geometry.&#xD;&#xA;&#xD;&#xA;The shortest distance between two triangles fall into one of four cases:&#xD;&#xA;&#xD;&#xA;It is between two corners, calculate all the corner to corner distances.&#xD;&#xA;&#xD;&#xA;It is between a corner and an edge, calculate all the corner to line distances, remember to assert that the point on the line you find is actually part of the edge, if not then the number must be discarded.&#xD;&#xA;&#xD;&#xA;It is between two edges, calculate line to line to distances, again assert that the points on the lines are on the edges.&#xD;&#xA;&#xD;&#xA;It is between a corner and a centre area, calculate the corner to plane distances, assert that the point on the plane found is within the area of the triangle." />
  <row Id="13471" PostHistoryTypeId="2" PostId="6753" RevisionGUID="2efbe9ea-64d5-4d78-898d-ee4ca9197429" CreationDate="2010-12-23T00:26:34.030" UserId="2798" Text="There's a thread in the AppHub forums where people shares their trial/paid data: http://forums.create.msdn.com/forums/p/69061/421667.aspx" />
  <row Id="13472" PostHistoryTypeId="5" PostId="6753" RevisionGUID="f5243514-7543-4d92-af2d-68e785730834" CreationDate="2010-12-23T00:31:50.783" UserId="2798" Comment="added 169 characters in body" Text="There's a thread in the AppHub forums where people shares their trial/paid data: http://forums.create.msdn.com/forums/p/69061/421667.aspx&#xD;&#xA;&#xD;&#xA;And yes, sales don't look very good for now... not even trials/free apps. It looks like as if not much people is paying attention to the existing apps in the market." />
  <row Id="13473" PostHistoryTypeId="5" PostId="6734" RevisionGUID="7971ffcb-4351-4308-aad8-ca0b51a1ff29" CreationDate="2010-12-23T00:59:23.110" UserId="605" Comment="added 8 characters in body; deleted 41 characters in body; added 67 characters in body" Text="Given a situation where I have a pool of `X` people of different scores (ranks) `S` with game size `N`. How do I partition the pool into `N` sized games where the standard deviation of ranks for each games is minimized?&#xD;&#xA;&#xD;&#xA;(quality of the game is inversely proportional to STD of ranks)" />
  <row Id="13474" PostHistoryTypeId="5" PostId="6693" RevisionGUID="df33a1c7-90d4-401e-bb59-cead789bb6be" CreationDate="2010-12-23T01:16:46.870" UserId="4116" Comment="Added more detailed explanation" Text="I'm currently try to make a business plan and was just wondering, how you guys decide the budget for outsourcing tasks. Is there a kind of a reference point? Or does the client decide this mostly by himself, what he want for his work?&#xD;&#xA;I speaking specially about tasks like:&#xD;&#xA;&#xD;&#xA; - translation (en-&gt;xxx)&#xD;&#xA; - character artwork&#xD;&#xA; - tiles/background artwork&#xD;&#xA; - sprites&#xD;&#xA; - music (BGM/SE)&#xD;&#xA; - voice synchronization&#xD;&#xA;&#xD;&#xA;Naturally it depends __really__ a lot about content size and requirements - but have any here a generally idea about the neccessary budget for tasks like this?&#xD;&#xA;Any link or ressource to this topic would be highly appreciated.&#xD;&#xA;Thank you guys,&#xD;&#xA;&#xD;&#xA;Edit: Already thank you, for the great answers!&#xD;&#xA;Specially I mean also things like: How do you compromise with graphics artists and what kind of &quot;contract&quot; do you use. In which frame I can imagine the payment for i.e. a drawn character artwork or a standard sprite sheet with a few animations? Any experiences? I haven't really an idea, what to offer an artist for such tasks..." />
  <row Id="13475" PostHistoryTypeId="2" PostId="6754" RevisionGUID="c5fa86c8-c873-4551-afd9-f40030738e9b" CreationDate="2010-12-23T01:32:45.657" UserId="1716" Text="You should use existing options that someone else has already fought. &#xD;&#xA;&#xD;&#xA;1) http://assimp.sourceforge.net/ &#xD;&#xA;Open Asset Import Library supports a huge amount of formats. &#xD;&#xA;&#xD;&#xA;2) http://openctm.sourceforge.net/ &#xD;&#xA;A very nice LZMA based mesh compression system with SDK's.&#xD;&#xA;&#xD;&#xA;Also, &#xD;&#xA;&quot;industry&quot; usually use what they have in their toolset. Collada is common, FBX is common, Proprietary formats even more so. Some studios use .MAX directly, maya scenes directly. Alot of studios also go for transport formats (see opaque data, and such) where the animation software is extended via tools and plugins to feature the game ready tools, instead of working backwards from a mesh format. &#xD;&#xA;&#xD;&#xA;For example, Naughty Dog use Maya exclusively as their main 3d content tool See this link : http://usa.autodesk.com/adsk/servlet/item?linkID=10225710&amp;id=7670571&amp;siteID=123112&#xD;&#xA;" />
  <row Id="13476" PostHistoryTypeId="16" PostId="6754" RevisionGUID="c5fa86c8-c873-4551-afd9-f40030738e9b" CreationDate="2010-12-23T01:33:56.653" UserId="1716" />
  <row Id="13477" PostHistoryTypeId="2" PostId="6755" RevisionGUID="2fbf97b2-cda6-4178-8ebf-4b34dd09b951" CreationDate="2010-12-23T03:21:25.063" UserId="1516" Text="Whats the difference between node-based pathfinding algorithm and the A* among others?&#xD;&#xA;&#xD;&#xA;A friend just told me about node-based, but I cannot find much tutorial or information on it." />
  <row Id="13478" PostHistoryTypeId="1" PostId="6755" RevisionGUID="2fbf97b2-cda6-4178-8ebf-4b34dd09b951" CreationDate="2010-12-23T03:21:25.063" UserId="1516" Text="Node-Based pathfinding vs A* and others" />
  <row Id="13479" PostHistoryTypeId="3" PostId="6755" RevisionGUID="2fbf97b2-cda6-4178-8ebf-4b34dd09b951" CreationDate="2010-12-23T03:21:25.063" UserId="1516" Text="&lt;path-finding&gt;" />
  <row Id="13480" PostHistoryTypeId="2" PostId="6756" RevisionGUID="9c424ac9-e1d8-4a62-9e00-7b6ed20e6db6" CreationDate="2010-12-23T03:47:58.923" UserId="953" Text="My AI is rusty, but it sounds like your friend is describing a common approach to defining the environment for the pathfinding: explicitly or algorithmically define a set of discrete nodes that agents can travel between in a network.  Once you've got that node graph, you can run any algorithm you want on it, including A*.  &#xD;&#xA;&#xD;&#xA;A* can be run on a grid (which is really just a very regularly-spaced set of nodes) or a terrain mesh, too.  Making a node graph is just a way to simplify a complex pathfinding situation by defining possible paths through an area.&#xD;&#xA;&#xD;&#xA;Of course, there may be a definition of &quot;node-based pathfinding&quot; with which I am unfamiliar." />
  <row Id="13481" PostHistoryTypeId="2" PostId="6757" RevisionGUID="3aeab6ac-5946-4ad5-9be7-ac88a5497b67" CreationDate="2010-12-23T07:00:58.573" UserId="160" Text="Recursive subdivision is one simple and guaranteed finite-time solution, though it tends to look a little... non-uniform. The end result is reminiscent a bit of a mondrian painting and doesn't look exactly like random scattered rectangles. If that's still good enough for you, the algorithm is:&#xD;&#xA;&#xD;&#xA;    makeRects(x, y, width, height)&#xD;&#xA;        if shouldSubdivide(width * height) then&#xD;&#xA;            // pick which way to split it, tend towards making&#xD;&#xA;            // the resulting pieces closer to square&#xD;&#xA;            if random(width + height) &lt; width then&#xD;&#xA;                // split vertically&#xD;&#xA;                var split = random(width)&#xD;&#xA;                makeRects(x, y, split, height)&#xD;&#xA;                makeRects(x + split, y, width - split, height)&#xD;&#xA;            else&#xD;&#xA;                // split horizontally&#xD;&#xA;                var split = random(height)&#xD;&#xA;                makeRects(x, y, width, split)&#xD;&#xA;                makeRects(x, y + split, width, height - split)&#xD;&#xA;            end&#xD;&#xA;        else&#xD;&#xA;            // not splitting the box, so just draw a rectangle inside it&#xD;&#xA;            randomRect(x, y, width, height)&#xD;&#xA;        end&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;    // randomly inset the rect within the given bounds&#xD;&#xA;    randomRect(x, y, width, height)&#xD;&#xA;        var insetWidth = random(width)&#xD;&#xA;        var insetHeight = random(height)&#xD;&#xA;        var insetX = random(width - insetWidth)&#xD;&#xA;        var insetY = random(height - insetHeight)&#xD;&#xA;        placeRect(x, y, width, height)&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;    // determine if a rect of the given area should be&#xD;&#xA;    // subdivided, or if its small enough that we should&#xD;&#xA;    // stop here&#xD;&#xA;    shouldSubdivide(area)&#xD;&#xA;        // return true or false. the smaller the area, the more&#xD;&#xA;        // likely to be false. tune to taste...&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;    random(max)&#xD;&#xA;        // generate random value between 0 and max...&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;    placeRect(x, y, width, height)&#xD;&#xA;        // do whatever you want here to place the rect...&#xD;&#xA;    end" />
  <row Id="13482" PostHistoryTypeId="2" PostId="6758" RevisionGUID="2b1a4009-179b-44e7-a708-43cfca17d2ab" CreationDate="2010-12-23T07:07:41.453" UserId="160" Text="I worked with an engineer who spent an entire year implementing ragdoll support in a AAA game for when a living character gets knocked down. After all of that, they ended up cutting it completely. It was the right decision: it looked horrendously artificial and shattered your suspension of disbelief.&#xD;&#xA;&#xD;&#xA;It's hard to underestimate how fantastically sharp our brains our at discerning realistic human behavior and when an animated model steps just outside of that, it's in serious [uncanny valley](http://en.wikipedia.org/wiki/Uncanny_valley) territory. Remember the horror show that was Polar Express?" />
  <row Id="13483" PostHistoryTypeId="2" PostId="6759" RevisionGUID="425e9da8-8788-44a8-851f-7f1f4ed15204" CreationDate="2010-12-23T08:50:16.483" UserId="3599" Text="Reading your comment,Malvin, was better to post this as a new answer:&#xD;&#xA;&#xD;&#xA;Malvin, OBJ is quite used for static models. But for character animations, you need to be able to transport bones information, and vertex weights (the value with which each vertex is influenced by several bones, or only one, or none). Also constraints info, in some cases. That all would be the &quot;rigging&quot; info, basically. Then there's animation info needed, like keyframes (frames where some change happens), interpolation type between them, etc, etc. All these is not supported by OBJ. A good, lightweight and practical format for this is *.md5 , but is probably more recommended Collada, which is becoming a very adopted standard and that can port everything, from statics, scenery, to character animation. It is supported by the big ones: Maya, Max, XSI. Blender is supporting it but not yet fully. The collada issue is that is complex to make yourself a loader, as is a very complete format, and for this reason, several packages don't have a fully functional exporter for this. Still, might be the way to go.&#xD;&#xA;&#xD;&#xA;You can of course dump OBJ frames from an animation package, and the interpolate in the engine, as exporting one obj per frame would be too much heavy and costs memory. Maybe one every 2 or 4 frames... &#xD;&#xA;&#xD;&#xA;You can also use FBX for character animations, but my advice would be using collada instead of it.&#xD;&#xA;&#xD;&#xA;First of all, check if your artists are going to be able to export in whatever the format, from their package. Otherwise is a hard to solve problem. Indeed, make complete tests of features ported and and confirm is working in your engine.&#xD;&#xA;&#xD;&#xA;About what people is doing, in my experience, all of this... Butr in game companies, often just they do a converter from whatever format to a custom native, binary format for their engine. Optimized and faster in load, etc.&#xD;&#xA;&#xD;&#xA;I have done prorotypes or even games just using OBJ or ASE and md5 for animations..Depends on artists workflows, toolset, etc. &#xD;&#xA;" />
  <row Id="13484" PostHistoryTypeId="2" PostId="6760" RevisionGUID="4f233214-ec95-4f96-9a38-f4b83659129f" CreationDate="2010-12-23T09:00:09.173" UserId="4179" Text="I don't think there is a particular book about this, since the topic is kinda trivial.&#xD;&#xA;&#xD;&#xA;Just imagine a mail-server where players can sent their actions via mail. The server has all the actions performed so far (as mails), which means you have the game state. If you want to reload the gamestate, just execute all the actions inside the mails chronologically. The only thing you have to do is to make sure whose turn it is ... but thats easy too (e.g. turn numbers). No need for contemporary technologies ... a modified mail server/client solution will do.  &#xD;&#xA;&#xD;&#xA;Pairing ppl can be done via elo ... but i guess u knew that " />
  <row Id="13485" PostHistoryTypeId="2" PostId="6761" RevisionGUID="dfb5ccf7-b420-4558-b18e-5983a7809b4f" CreationDate="2010-12-23T09:04:41.887" UserId="4484" Text="Dijkstra's algorithm gives the correct answer on any grid of nodes, and exaustively finds the best route. If you have a small number of pre-populated nodes on your map (e.g. you placed them in your editor) then there are probably sufficiently few that it works fine.&#xD;&#xA;&#xD;&#xA;On the other hand A* uses a &quot;distance function&quot; (typically manhattan distance or something) to optimise Dijkstra's algorithm for the special case where you have a very large number of evenly spaced nodes, e.g. a grid - which is the normal case.&#xD;&#xA;&#xD;&#xA;The A* algorithm can find the best route in a grid with some caveats regarding weights. For example, if you place a few teleporters on an otherwise grid-like map, A* can no longer work, as its &quot;Distance funcion&quot; doesn't give the right result, taking into account the teleporters.&#xD;&#xA;&#xD;&#xA;But Dijkstra isn't efficient** on a big open grid either, because the number of nodes you have to consider gets big quickly. Dijkstra's algorithm is like a flood-fill - it always touches all reachable nodes. A* does not.&#xD;&#xA;&#xD;&#xA;I'm not sure if this answers your question but I hope it helps.&#xD;&#xA;&#xD;&#xA;** For a given defintions of &quot;efficient&quot; and &quot;big&quot;. " />
  <row Id="13486" PostHistoryTypeId="2" PostId="6762" RevisionGUID="69986bf7-dd3d-4aa9-8b82-e008d78fc9be" CreationDate="2010-12-23T09:05:04.443" UserId="4179" Text="No, afaik its not. Ppl have tried this without success. " />
  <row Id="13487" PostHistoryTypeId="5" PostId="6759" RevisionGUID="422f9dd2-cc1f-44fe-ac43-71a0ab9e4c34" CreationDate="2010-12-23T09:31:30.753" UserId="3599" Comment="added 2 characters in body; deleted 1 characters in body; added 82 characters in body" Text="Reading your comment,Malvin, was better to post this as a new answer:&#xD;&#xA;&#xD;&#xA;Malvin, OBJ is quite used for static models. But for character animations, you need to be able to transport bones information, and vertex weights (the value with which each vertex is influenced by several bones, or only one, or none). Also constraints info, in some cases. That all would be the &quot;rigging&quot; info, basically. Then there's animation info needed, like keyframes (frames where some change happens), interpolation type between them, etc, etc. All these is not supported by OBJ. A good, lightweight and practical format for this is *.md5 , but is probably more recommended Collada, which is becoming a very adopted standard and that can port everything, from statics, scenery, to character animation. It is supported by the big ones: Maya, Max, XSI. Blender is supporting it but not yet fully. The collada issue is that is complex to make yourself a loader, as is a very complete format, and for this reason, several packages don't have a fully functional exporter for this. Still, might be the way to go.&#xD;&#xA;&#xD;&#xA;You can of course dump OBJ frames from an animation package, and then interpolate in the engine, as exporting one obj per frame would be too much heavy and costs memory. Maybe one every 2 or 4 frames... &#xD;&#xA;&#xD;&#xA;You can also use FBX for character animations, but my advice would be using collada instead of it.&#xD;&#xA;&#xD;&#xA;First of all, check if your artists are going to be able to export in whatever the format, from their package. Otherwise is a hard to solve problem. Indeed, make complete tests of features ported and and confirm is working in your engine.&#xD;&#xA;&#xD;&#xA;About what people is doing, in my experience, all of this... But in game companies, often just they do a converter from whatever format to a custom, native, binary format for their engine. Optimized and faster to load, etc.&#xD;&#xA;&#xD;&#xA;I have done prototypes or even games just using OBJ or ASE and md5 for animations..Depends on artists workflows, toolset, etc. &#xD;&#xA;&#xD;&#xA;Edit: Sorry, seems Fuzzy had already answered several matters. Agreeing there.&#xD;&#xA;" />
  <row Id="13488" PostHistoryTypeId="6" PostId="6594" RevisionGUID="bbad7694-55cf-434a-b874-a9248544f7a1" CreationDate="2010-12-23T10:36:27.253" UserId="2798" Comment="edited tags" Text="&lt;3d&gt;&lt;models&gt;&lt;pygame&gt;" />
  <row Id="13489" PostHistoryTypeId="2" PostId="6763" RevisionGUID="35a2d21f-529c-4e7d-92e3-50ea942db4a4" CreationDate="2010-12-23T10:38:33.867" UserId="3188" Text="If I wanted to fill my game screen with individually coloured pixels, how would I do this?&#xD;&#xA;&#xD;&#xA;For example, if I wanted to write a '[game of life][1]'-type game where each pixel was a cell, how would I achieve this using XNA?&#xD;&#xA;&#xD;&#xA;I've tried just calling `SetData()` on a `Texture2D` object using a screen-sized array of `Color` values, but it complains with:&#xD;&#xA;&#xD;&#xA;    You may not call SetData on a resource while&#xD;&#xA;    it is actively set on the GraphicsDevice.&#xD;&#xA;    Unset it from the device before calling SetData.&#xD;&#xA;&#xD;&#xA;How do I do as it asks? Or better still... is there an alternative, better, efficient way to fill a screen with arbitrary pixels?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Conway's_Game_of_Life" />
  <row Id="13490" PostHistoryTypeId="1" PostId="6763" RevisionGUID="35a2d21f-529c-4e7d-92e3-50ea942db4a4" CreationDate="2010-12-23T10:38:33.867" UserId="3188" Text="How do I plot individual pixels using the XNA APIs?" />
  <row Id="13491" PostHistoryTypeId="3" PostId="6763" RevisionGUID="35a2d21f-529c-4e7d-92e3-50ea942db4a4" CreationDate="2010-12-23T10:38:33.867" UserId="3188" Text="&lt;xna&gt;&lt;graphics&gt;&lt;directx&gt;" />
  <row Id="13492" PostHistoryTypeId="2" PostId="6764" RevisionGUID="98adf6c7-893d-4306-b049-4c0c87374910" CreationDate="2010-12-23T11:04:39.747" UserId="4180" Text="If you're going to be plotting lots of pixels I recommend using a shader instead.. but I found this on stackoverflow: http://stackoverflow.com/questions/2569996/how-can-i-use-a-shader-in-xna-to-color-single-pixels" />
  <row Id="13493" PostHistoryTypeId="2" PostId="6765" RevisionGUID="5e94e7f3-aca6-49b4-a24c-137c6ee62b97" CreationDate="2010-12-23T11:12:04.137" UserId="744" Text="This is probably not mathematically optimal (optimality in this case reeks of NP to me, but I'm not certain), but assuming N is fixed and a unimodal, approximately normal S distribution  you should be able to get something close to optimal just sorting by rank and slicing a group off every N players starting near the mode." />
  <row Id="13494" PostHistoryTypeId="2" PostId="6766" RevisionGUID="ede4af9f-65e6-4c9d-8ea0-ee6083dd1425" CreationDate="2010-12-23T11:20:51.627" UserId="4181" Text="From the HW point of view, you need to take lithium battery, and connect it to power in this module through a diode. This diode will protect the battery while AC power is on, and will provice power to retain state in standby. If you are lucky it would be that simple.&#xD;&#xA;&#xD;&#xA;Be careful with - and +  as wrong polarity might explode the battery." />
  <row Id="13495" PostHistoryTypeId="2" PostId="6767" RevisionGUID="c9799bad-5a95-4816-8586-28b5f54584db" CreationDate="2010-12-23T11:47:48.650" UserId="3282" Text="So far I've always used a time granularity of 1 msec (that's it, 1 microsecond is the atomic time unit).&#xD;&#xA;&#xD;&#xA;I'm wondering if this is **always** fine, or if for some cases (some specific games, game components or platforms) it would be suggested to have a more accurate time unit (on the order of nanoseconds or, I don't know, hundreds of microseconds)." />
  <row Id="13496" PostHistoryTypeId="1" PostId="6767" RevisionGUID="c9799bad-5a95-4816-8586-28b5f54584db" CreationDate="2010-12-23T11:47:48.650" UserId="3282" Text="Time granularity for games" />
  <row Id="13497" PostHistoryTypeId="3" PostId="6767" RevisionGUID="c9799bad-5a95-4816-8586-28b5f54584db" CreationDate="2010-12-23T11:47:48.650" UserId="3282" Text="&lt;time-management&gt;" />
  <row Id="13498" PostHistoryTypeId="5" PostId="6767" RevisionGUID="a0e6bb3f-07ea-4437-9b5e-3442b828a6a9" CreationDate="2010-12-23T11:59:17.043" UserId="3282" Comment="added 1 characters in body" Text="So far I've always used a time granularity of 1 msec (that's it, 1 millisecond is the atomic time unit).&#xD;&#xA;&#xD;&#xA;I'm wondering if this is **always** fine, or if for some cases (some specific games, game components or platforms) it would be suggested to have a more accurate time unit (on the order of microseconds or, I don't know, hundreds of microseconds)." />
  <row Id="13501" PostHistoryTypeId="2" PostId="6769" RevisionGUID="6aafdc16-e4ac-4e32-9d72-fcd986434710" CreationDate="2010-12-23T12:45:20.170" UserId="744" Text="There's really two different questions here.&#xD;&#xA;&#xD;&#xA;First is, _how accurately can I measure the time?_ and the answer is incredibly accurately.&#xD;&#xA;&#xD;&#xA;All modern CPUs (like, ~2000 onwards) come with high-resolution timers. On Windows, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms644904%28v=vs.85%29.aspx&quot;&gt;QueryPerformanceCounter&lt;/a&gt; is used to read these; on Linux and other POSIX systems, &lt;a href=&quot;http://linux.die.net/man/3/clock_gettime&quot;&gt;clock_gettime&lt;/a&gt;; on Mac OS X you can use mach_absolute_time &lt;a href=&quot;http://le-depotoir.googlecode.com/svn/trunk/misc/clock_gettime_stub.c&quot;&gt;or this wrapper that provides a basic POSIX-like clock_gettime wrapper around mach_absolute time&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;These timers provide counters measured in nanoseconds, and the practical resolution is usually measured in microseconds. These clocks are also _monotonic_, meaning they should not go backwards, even if the user adjusts their clock or you're on a multicore CPU system, although there have been buggy BIOSs that caused this for some chips.&#xD;&#xA;&#xD;&#xA;The second question is _how quickly can I respond to events?_ and the answer here is much more depressing.&#xD;&#xA;&#xD;&#xA;PC operating systems use &lt;a href=&quot;http://en.wikipedia.org/wiki/Preemptive_multitasking&quot;&gt;preemptive multitasking&lt;/a&gt;, which means how much time your program gets is completely under the purview of the OS. When you `sleep(10ms)`, that's a suggestion to the OS. It's rarely perfect, but usually it'll do its best, and you'll wake up sometime within the next 9.9 to 10.1 milliseconds. Sometimes though, it might be 15. Sometimes, if the system is under heavy load, it might be 10000. If an interrupt or signal occurs, it might be 1ms. &lt;a href=&quot;http://gafferongames.com/game-physics/fix-your-timestep/&quot;&gt;This is why we have to jump through hoops to get truly stable timesteps in games.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;But just _knowing_ the time within 1ms precision? No problem." />
  <row Id="13502" PostHistoryTypeId="5" PostId="6769" RevisionGUID="2e1cc2dd-d8fd-48b6-b24e-792ed126dd6b" CreationDate="2010-12-23T12:52:29.503" UserId="744" Comment="added 136 characters in body" Text="There's really two different questions here.&#xD;&#xA;&#xD;&#xA;First is, _how accurately can I measure the time?_ and the answer is incredibly accurately.&#xD;&#xA;&#xD;&#xA;All modern CPUs (like, ~2000 onwards) come with high-resolution timers. On Windows, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms644904%28v=vs.85%29.aspx&quot;&gt;QueryPerformanceCounter&lt;/a&gt; is used to read these; on Linux and other POSIX systems, &lt;a href=&quot;http://linux.die.net/man/3/clock_gettime&quot;&gt;clock_gettime&lt;/a&gt;; on Mac OS X you can use mach_absolute_time &lt;a href=&quot;http://le-depotoir.googlecode.com/svn/trunk/misc/clock_gettime_stub.c&quot;&gt;or this wrapper that provides a basic POSIX-like clock_gettime wrapper around mach_absolute time&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;These timers provide counters measured in nanoseconds, and the practical resolution is usually measured in microseconds. These clocks are also _monotonic_, meaning they should not go backwards, even if the user adjusts their clock or you're on a multicore CPU system, although there have been buggy BIOSs that caused this for some chips.&#xD;&#xA;&#xD;&#xA;The second question is _how quickly can I respond to events?_ and the answer here is much more depressing.&#xD;&#xA;&#xD;&#xA;PC operating systems use &lt;a href=&quot;http://en.wikipedia.org/wiki/Preemptive_multitasking&quot;&gt;preemptive multitasking&lt;/a&gt;, which means how much time your program gets is completely under the purview of the OS. When you `sleep(10ms)`, that's a suggestion to the OS. It's rarely perfect, but usually it'll do its best, and you'll wake up sometime within the next 9.9 to 10.1 milliseconds. Sometimes though, it might be 15. Sometimes, if the system is under heavy load, it might be 10000. If an interrupt or signal occurs, it might be 1ms. &lt;a href=&quot;http://gafferongames.com/game-physics/fix-your-timestep/&quot;&gt;This is why we have to jump through hoops to get truly stable timesteps in games.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Just _knowing_ the time within 1ms precision? No problem. But relying on game logic that requires more precision than 1ms? That's a tricky business, and probably not appropriate for anything today." />
  <row Id="13503" PostHistoryTypeId="10" PostId="2922" RevisionGUID="e1b6b3eb-a88d-44ee-bf0a-808d9cdddd3d" CreationDate="2010-12-23T13:48:56.453" UserId="14" CloseReasonId="2" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="13504" PostHistoryTypeId="2" PostId="6770" RevisionGUID="3d1bd331-8a7b-4a0d-89c5-cdecf6644fae" CreationDate="2010-12-23T14:12:56.067" UserId="998" Text="It depends.&#xD;&#xA;&#xD;&#xA;As far as I'm concerned a game has a time unit of 16.66667ms (1/60 seconds).&#xD;&#xA;&#xD;&#xA;Other than synchronizing framerate with the display, I don't need a concept of real-time except how much to idle at the end of a frame before rendering the next one.&#xD;&#xA;&#xD;&#xA;I use a high performance counter there though (_and microseconds!_), because if there only is 1.45 ms left in the frame before the next one should be rendered, I don't want it to wait 2ms!" />
  <row Id="13505" PostHistoryTypeId="5" PostId="6765" RevisionGUID="80d6dd80-3590-4d4c-85b5-179ae9bb3674" CreationDate="2010-12-23T15:29:08.153" UserId="744" Comment="I don't know why I thought the starting position was important this morning, but now I don't think it is." Text="This is probably not mathematically optimal (optimality in this case reeks of NP to me, but I'm not certain), but assuming N is fixed and a unimodal, approximately normal S distribution  you should be able to get something close to optimal just sorting by rank and slicing a group off every N players." />
  <row Id="13506" PostHistoryTypeId="5" PostId="6746" RevisionGUID="589764aa-8ffa-4665-a6f2-d94ba065008b" CreationDate="2010-12-23T16:15:09.150" UserId="1198" Comment="removed buggy/wrong code" Text="If your values for X and N are very large, it would probably make the most sence to keep the player list sorted by `Rank` such that you could always take the bottom `N` elements to create a group. This will front-load your computation time (keeping the list sorted every time you add a new item), in contrast with the above algorithm which would require execution every time a new group is to be created." />
  <row Id="13507" PostHistoryTypeId="2" PostId="6771" RevisionGUID="59dfbdea-54f2-4f86-b4da-db48d96dfd20" CreationDate="2010-12-23T17:26:20.150" UserId="1516" Text="I'm not sure if this is even  path-finding. All I have is a 3D map that has hills, etc. I'd like the enemy to flock an object, but also walk around other objects. These blocking objects may be added after the path is calculated, which would cause a re-calculation of the path.&#xD;&#xA;&#xD;&#xA;What algorithm am I looking at here?" />
  <row Id="13508" PostHistoryTypeId="1" PostId="6771" RevisionGUID="59dfbdea-54f2-4f86-b4da-db48d96dfd20" CreationDate="2010-12-23T17:26:20.150" UserId="1516" Text="How to handle pathfinding on a non-grid/non-node terrain map" />
  <row Id="13509" PostHistoryTypeId="3" PostId="6771" RevisionGUID="59dfbdea-54f2-4f86-b4da-db48d96dfd20" CreationDate="2010-12-23T17:26:20.150" UserId="1516" Text="&lt;path-finding&gt;" />
  <row Id="13510" PostHistoryTypeId="2" PostId="6772" RevisionGUID="6226713a-091d-494a-81fd-34c9b128922b" CreationDate="2010-12-23T17:39:48.017" UserId="154" Text="I'd start by looking at the file you are trying to load. My experience with different exporters of .obj files is that they can play a little loose with the formats structure/order. Make sure the data looks the same between the two.&#xD;&#xA;&#xD;&#xA;If you are loading the non-foot files, but just failing to render then another thing to check is if the foot model is entirely triangulated, and if the other models you are loading have faces defined by more than 3 verts. " />
  <row Id="13511" PostHistoryTypeId="2" PostId="6773" RevisionGUID="9e84d664-2eff-4ac4-a94a-af46546e00af" CreationDate="2010-12-23T17:42:15.367" UserId="395" Text="For drawing lines and such I've just used a 1x1 white texture and scaled/rotated it. Not sure if that will be any faster, but it is an option&#xD;&#xA;&#xD;&#xA;    pixel = new Texture2D(graphicsDevice, 1, 1);&#xD;&#xA;    pixel.SetData&lt;Color&gt;(new Color[1] { Color.White });" />
  <row Id="13512" PostHistoryTypeId="2" PostId="6774" RevisionGUID="b1f1bd3e-6c72-4dea-863b-fea497ec35bf" CreationDate="2010-12-23T17:49:31.477" UserDisplayName="000" Text="Consider navigation meshes. There is a good overview article here:&#xD;&#xA;&#xD;&#xA;http://www.ai-blog.net/archives/000152.html" />
  <row Id="13513" PostHistoryTypeId="2" PostId="6775" RevisionGUID="e8e40778-e91c-4e3c-91a0-747fe0f9c5d8" CreationDate="2010-12-23T18:33:58.110" UserId="4484" Text="You can use a variation on A* pathfinding using an &quot;influence map&quot; technique to vary node-node weights based on whether they go near to bad things or good things (but be careful because A* breaks if your heuristic ever over-estimates). So your heuristic needs to be based on &quot;best case&quot; i.e. the cheapest it can possibly be. In practice it works ok if your heuristic is stupid and you don't have negative-weight edges between adjacent nodes, or any edges between non-adjacent nodes (think teleporters etc).&#xD;&#xA;&#xD;&#xA;So for example, if you want your AI characters to avoid climbing hills (because it is more expensive), you make edges which climb hills more expensive.&#xD;&#xA;&#xD;&#xA;Or if you have some undesirable entity on the map (say an enemy watch tower or something) then you can make paths which go close to that proportionately more expensive, and have the algorithm automatically find routes which go around it.&#xD;&#xA;&#xD;&#xA;Then the only problem is, what happens if conditions change while you're going there. Clearly you could take the &quot;lazy&quot; approach, and just have entities periodically recalculate their paths (although you can get into a loop where Bob tries path A for a while, then it looks a bit bad, and then changes to B, then that looks bad, so he goes back for path A).&#xD;&#xA;&#xD;&#xA;Or you could have some threshold, where if the perceived &quot;cost&quot; of a path exceeds estimates by more than a certain amount, you recalculate. Or simply, if your entity hits an unexpected obstacle, he recalcs the path.&#xD;&#xA;&#xD;&#xA;But in any case, what you really want to avoid is getting into a situation where large numbers of entities recalculate their paths every tick, which typically leads to a performance disaster.&#xD;&#xA;&#xD;&#xA;So perhaps you need to put a minimum time limit on re-calculating a path, so that your entities won't keep repathing all the time.&#xD;&#xA;&#xD;&#xA;Anyway, it's a tricky problem, good luck with it, I hope this helps." />
  <row Id="13514" PostHistoryTypeId="5" PostId="6775" RevisionGUID="57336399-b2e6-406c-8b31-6d79a5d521a6" CreationDate="2010-12-23T18:39:22.097" UserId="4484" Comment="try to answer the question" Text="You can use a variation on A* pathfinding using an &quot;influence map&quot; technique to vary node-node weights based on whether they go near to bad things or good things (but be careful because A* breaks if your heuristic ever over-estimates). So your heuristic needs to be based on &quot;best case&quot; i.e. the cheapest it can possibly be. In practice it works ok if your heuristic is stupid and you don't have negative-weight edges between adjacent nodes, or any edges between non-adjacent nodes (think teleporters etc).&#xD;&#xA;&#xD;&#xA;So for example, if you want your AI characters to avoid climbing hills (because it is more expensive), you make edges which climb hills more expensive.&#xD;&#xA;&#xD;&#xA;Or if you have some undesirable entity on the map (say an enemy watch tower or something) then you can make paths which go close to that proportionately more expensive, and have the algorithm automatically find routes which go around it.&#xD;&#xA;&#xD;&#xA;Then the only problem is, what happens if conditions change while you're going there. Clearly you could take the &quot;lazy&quot; approach, and just have entities periodically recalculate their paths (although you can get into a loop where Bob tries path A for a while, then it looks a bit bad, and then changes to B, then that looks bad, so he goes back for path A).&#xD;&#xA;&#xD;&#xA;Or you could have some threshold, where if the perceived &quot;cost&quot; of a path exceeds estimates by more than a certain amount, you recalculate. Or simply, if your entity hits an unexpected obstacle, he recalcs the path.&#xD;&#xA;&#xD;&#xA;But in any case, what you really want to avoid is getting into a situation where large numbers of entities recalculate their paths every tick, which typically leads to a performance disaster.&#xD;&#xA;&#xD;&#xA;So perhaps you need to put a minimum time limit on re-calculating a path, so that your entities won't keep repathing all the time.&#xD;&#xA;&#xD;&#xA;Anyway, it's a tricky problem, good luck with it, I hope this helps.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;EDIT: I am now going to try to answer your question.&#xD;&#xA;&#xD;&#xA;Your map has no &quot;grid&quot; - but it doesn't matter, you can simply overlay an imaginary one on top of it. Provided you can query the height of a particular spot on the map, and its passability, if your grid has a high enough resolution, you can get a useful path out of it.&#xD;&#xA;&#xD;&#xA;You need to be careful about &quot;passability&quot;. If you make the grid too low resolution, then you can have a choke point which falls badly on the grid, and an entity of radius R won't notice that he can get through a gap of &gt; 2R , because the way the grid falls on it, it looks like a completely blocked path." />
  <row Id="13515" PostHistoryTypeId="2" PostId="6776" RevisionGUID="27331f28-8fc0-42a8-ba8f-42f57db8e91f" CreationDate="2010-12-23T19:16:44.957" UserId="4191" Text="http://mudbytes.net/ was established for exactly the purpose you're looking for." />
  <row Id="13516" PostHistoryTypeId="2" PostId="6777" RevisionGUID="82819c3d-a084-4823-8d5e-eb2bcc7d6558" CreationDate="2010-12-23T21:18:52.837" UserId="1929" Text="What's a good architecture for Flash games? I've read that MVC is great, with symbols just used purely for views (set states, use the class to manage which state/frame to show).&#xD;&#xA;&#xD;&#xA;I would presumably then stick all my code in one or more .AS files, use object-oriented programming, try to unit test whatever I can, and make my art and symbols purely view-state stuff with no code.&#xD;&#xA;&#xD;&#xA;Has anyone tried this? On anything other than a small game? How do these big flash RPGs and MMORPGs architect their games?" />
  <row Id="13517" PostHistoryTypeId="1" PostId="6777" RevisionGUID="82819c3d-a084-4823-8d5e-eb2bcc7d6558" CreationDate="2010-12-23T21:18:52.837" UserId="1929" Text="Robust Architecture for Flash Games?" />
  <row Id="13518" PostHistoryTypeId="3" PostId="6777" RevisionGUID="82819c3d-a084-4823-8d5e-eb2bcc7d6558" CreationDate="2010-12-23T21:18:52.837" UserId="1929" Text="&lt;architecture&gt;&lt;flash&gt;" />
  <row Id="13519" PostHistoryTypeId="2" PostId="6779" RevisionGUID="8e762800-faa4-4b2c-9d04-ba2816b36342" CreationDate="2010-12-23T20:03:16.450" UserDisplayName="Jackson Pope" Text="Normals for flat faces (like the side of a cube) are at right angles to the triangles themselves. To work out what these should be you can either calculate them using the cross product like you are (though you will want to take the cross product of (vert[1] - vert[0]) X (vert[2] - vert[0]) - so you're using vectors on the plane not vertices in the plane). Moving to this vert[a] - vert[b] form should fix the weirdness you're experiencing.&#xD;&#xA;&#xD;&#xA;However to make things a bit simpler in this case you can just set the normals manually. For this face of the cube the vertices all lie in the plane where Z = 0 (since startPosition.Z = 0 and all faces use startPosition.Z for their Z coordinate), so the normal = (0,0,1)." />
  <row Id="13520" PostHistoryTypeId="2" PostId="6778" RevisionGUID="2fdfcdf6-e46b-4567-9eab-a7704485b1fa" CreationDate="2010-12-23T17:47:08.030" UserDisplayName="Wade" Text="I have been working on some simple XNA proof of concept for a game idea I have as well as just to further my learning in XNA. However, i seem to be stuck on these dreaded normals, and using the BasicEffect with default lighting i can't seem to tell if my normals are being calculated correctly, hence the question.&#xD;&#xA;&#xD;&#xA;I'm mainly drawing cubes at the moment, I'm using a triangle list and a VertexBuffer to get the job done. The north face of my cube has two polygons and 6 vectors:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;Vector3 startPosition = new Vector3(0,0,0);&#xD;&#xA;corners[0] = startPosition; // This is the start position. Block size is 5.&#xD;&#xA;            corners[1] = new Vector3(startPosition.X, startPosition.Y + BLOCK_SIZE, startPosition.Z);&#xD;&#xA;            corners[2] = new Vector3(startPosition.X + BLOCK_SIZE, startPosition.Y, startPosition.Z);&#xD;&#xA;            corners[3] = new Vector3(startPosition.X + BLOCK_SIZE, startPosition.Y + BLOCK_SIZE, startPosition.Z);&#xD;&#xA;&#xD;&#xA;            verts[0] = new VertexPositionNormalTexture(corners[0], normals[0], textCoordBR);&#xD;&#xA;            verts[1] = new VertexPositionNormalTexture(corners[1], normals[0], textCoordTR);&#xD;&#xA;            verts[2] = new VertexPositionNormalTexture(corners[2], normals[0], textCoordBL);&#xD;&#xA;            verts[3] = new VertexPositionNormalTexture(corners[3], normals[0], textCoordTL);&#xD;&#xA;            verts[4] = new VertexPositionNormalTexture(corners[2], normals[0], textCoordBL);&#xD;&#xA;            verts[5] = new VertexPositionNormalTexture(corners[1], normals[0], textCoordTR);&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Using those coordinates I want to generate the normal for the north face, I have no clue how to get the average of all those vectors and create a normal for the two polygons that it makes.&#xD;&#xA;&#xD;&#xA;Here is what i tried:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;            normals[0] = Vector3.Cross(corners[1], corners[2]);&#xD;&#xA;            normals[0].Normalize();&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;It seems like its correct, but then using the same thing for other sides of the cube the lighting effect seems weird, and not cohesive with where i *think* the light source is coming from, not really sure with the BasicEffect.&#xD;&#xA;&#xD;&#xA;Am I doing this right? Can anyone explain in lay mans terms how normals are calculated. Any help is much appreciated.&#xD;&#xA;&#xD;&#xA;Note: I tried going through Riemers and such to figure it out with no luck, it seems no one really goes over the math well enough. Thanks!&#xD;&#xA;" />
  <row Id="13521" PostHistoryTypeId="1" PostId="6778" RevisionGUID="2fdfcdf6-e46b-4567-9eab-a7704485b1fa" CreationDate="2010-12-23T17:47:08.030" UserDisplayName="Wade" Text="C# XNA Normals Question" />
  <row Id="13522" PostHistoryTypeId="3" PostId="6778" RevisionGUID="2fdfcdf6-e46b-4567-9eab-a7704485b1fa" CreationDate="2010-12-23T17:47:08.030" UserDisplayName="Wade" Text="&lt;c#&gt;&lt;game-development&gt;&lt;xna&gt;&lt;xbox360&gt;&lt;normals&gt;" />
  <row Id="13523" PostHistoryTypeId="17" PostId="6778" RevisionGUID="c89fe5c6-9850-46cd-9ebc-936562f9768a" CreationDate="2010-12-23T21:34:12.277" UserId="-1" Comment="from http://stackoverflow.com/questions/4521171/c-xna-normals-question" Text="" />
  <row Id="13524" PostHistoryTypeId="2" PostId="6780" RevisionGUID="048baf0d-cbb7-455b-97a1-20023bce8be3" CreationDate="2010-12-23T23:26:44.143" UserId="3656" Text="Look at the source code for Flixel and FlashPunk. They work similarly to XNA in that they have a main Game class which contains the setup code and maintains a state machine which will run the Update(); Render(); loop on a GameState object.&#xD;&#xA;&#xD;&#xA;Your different &quot;screens&quot; (ie: Menu, Gameplay, post-gameplay high score screen, etc.) will inherit from GameState, and each has their own Update, Render loop, as well as containers of game entities such as sprites and sounds.&#xD;&#xA;&#xD;&#xA;Flixel's method for changing states is really just a method called ChangeState() which takes the state class and creates an instance of it to use.&#xD;&#xA;&#xD;&#xA;Here's a good [XNA article][1] that can provide a good overview of state management.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="13525" PostHistoryTypeId="2" PostId="6781" RevisionGUID="33ad4b16-adf7-4a3a-9f1c-254a8f96a867" CreationDate="2010-12-23T23:39:53.323" UserId="1829" Text="I have to build a 2D version of this game:&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Carcassonne_(board_game)&#xD;&#xA;&#xD;&#xA;counting scores for Towns and Roads seems easy enough (but I'm not sure), but for Lands I feel I don't have a clue.&#xD;&#xA;&#xD;&#xA;I'm guessing I can define 3 &quot;plugs&quot; for each side, 12 for each tile, and then using pairs to create links between them inside a tile...&#xD;&#xA;&#xD;&#xA;I remembered seeing that there is some book about graphes with boost, but I'm sure I don't need that..." />
  <row Id="13526" PostHistoryTypeId="1" PostId="6781" RevisionGUID="33ad4b16-adf7-4a3a-9f1c-254a8f96a867" CreationDate="2010-12-23T23:39:53.323" UserId="1829" Text="Counting point for a recursive domino-like game: Carcassone" />
  <row Id="13527" PostHistoryTypeId="3" PostId="6781" RevisionGUID="33ad4b16-adf7-4a3a-9f1c-254a8f96a867" CreationDate="2010-12-23T23:39:53.323" UserId="1829" Text="&lt;tiles&gt;&lt;game-mechanics&gt;" />
  <row Id="13528" PostHistoryTypeId="2" PostId="6782" RevisionGUID="e116e74d-17cc-4235-a437-ba136b917dbd" CreationDate="2010-12-23T23:41:00.873" UserId="20" Text="Although MVC is a pattern that is widely used, I think it's not really appropriate for games. When developing games you'll also deal with sound, physics, networking etc. where do they belong to? Model, View or Controller?&#xD;&#xA;&#xD;&#xA;You'll find that model and controller (sometimes even the view) are most often better combined in one class and/or that there are other patterns that are better suited for game development than MVC, for example the [component pattern][1].&#xD;&#xA;&#xD;&#xA;As a flash developer, I encourage you to separate your code from your assets though. If you're using an IDE like Flash Builder, there's no way around that anyways.&#xD;&#xA;&#xD;&#xA;Also try to separate things that represent different layers of &quot;information/logic&quot;, like *sound*, *rendering*, *ai* etc. to make these components reusable. You can leverage the flash event-system or use a [signal-slot implementation][2] to loosely couple these objects. Eg. The player class (or maybe even the *collision-handler*) dispatches a signal whenever the player collects a coin. By connecting the &quot;collect-coin-signal&quot; to the *sound-class*, the appropriate sound can be played without explicitly calling any sound-related code inside the player class. Of course this signal/event could also be connected to the *keep-track-of-score-class* etc.&#xD;&#xA;This architecture allows you to easily attach more components later on and/or swap them with different ones without rewriting huge portions of your existing code.&#xD;&#xA;&#xD;&#xA;I think that most of the patterns commonly used for game development also apply when developing games in ActionScript. So just go ahead and look for some good game-development patterns and make use of them in your next Flash project.&#xD;&#xA;&#xD;&#xA;Btw. I have never used Unit-Tests for a game, but maybe that's just me :)&#xD;&#xA;&#xD;&#xA;  [1]: http://gameprogrammingpatterns.com/component.html&#xD;&#xA;  [2]: https://github.com/robertpenner/as3-signals" />
  <row Id="13529" PostHistoryTypeId="2" PostId="6783" RevisionGUID="76641b1f-9867-477f-8b65-612429492b85" CreationDate="2010-12-24T00:17:08.657" UserId="20" Text="Lands are only being counted at the end of the game, so you'll only have to do this once per game-session.&#xD;&#xA;&#xD;&#xA;Since you'll know all completed cities beforehand (to calculate points for the cities), I'll probably do the following:&#xD;&#xA;&#xD;&#xA; - Remove one &quot;follower&quot; from the list of followers (**list A**) that were placed on &quot;land&quot;. Add the follower to **list B**.&#xD;&#xA; - Start a flood-fill at the followers position.&#xD;&#xA; - If your fill hits a city (which wasn't added before), add it to a list of adjacent cities.&#xD;&#xA; - If your fill hits another follower, remove it from **list A** and add it to **list B**&#xD;&#xA; - Separating road-pieces, rivers or missing pieces will obviously stop the flood fill.&#xD;&#xA;&#xD;&#xA;After your flood-fill completes, count the number of followers from **list B** for each player. Depending on what ruleset (second edition, third edition) you'll have to implement, you can now split up points for all players that placed their followers in the land in question.&#xD;&#xA;&#xD;&#xA;Now repeat this procedure, as long as **list A** still contains any followers.&#xD;&#xA;&#xD;&#xA;I might be mistaken, but I guess one *plug* (or node) per corner should be sufficient to model the different possible connections." />
  <row Id="13530" PostHistoryTypeId="2" PostId="6784" RevisionGUID="811b6f42-f784-463d-b332-22d9337a33f9" CreationDate="2010-12-24T00:50:43.277" UserId="1330" Text="I have a copy of Visual Studio 2008 Pro. The Windows Phone Developments tools which include XNA 4 continuously fail to install on my machine. I am wondering if it was due to having 2008 vs 2010. Any ideas?" />
  <row Id="13531" PostHistoryTypeId="1" PostId="6784" RevisionGUID="811b6f42-f784-463d-b332-22d9337a33f9" CreationDate="2010-12-24T00:50:43.277" UserId="1330" Text="Does XNA 4.0 for Windows Phone 7 require Visual Studio 2010?" />
  <row Id="13532" PostHistoryTypeId="3" PostId="6784" RevisionGUID="811b6f42-f784-463d-b332-22d9337a33f9" CreationDate="2010-12-24T00:50:43.277" UserId="1330" Text="&lt;xna&gt;&lt;windows-phone-7&gt;" />
  <row Id="13533" PostHistoryTypeId="2" PostId="6785" RevisionGUID="b28f981e-89d7-49dd-b47c-4105a42ce7b5" CreationDate="2010-12-24T01:37:32.060" UserId="93" Text="Yes you need VS2010. If you don't have the full VS2010 the installer will download VS2010 Express Edition. Obviously that's a bummer if you've got stuff in VS2008 Pro that you like, but hey, that's Microsoft for you." />
  <row Id="13534" PostHistoryTypeId="2" PostId="6786" RevisionGUID="ac4f0e96-4bdf-4794-a163-0c7e1992a1fc" CreationDate="2010-12-24T06:05:47.063" UserId="1516" Text="Anyone aware of any sample source code that contain Navigational Meshes?&#xD;&#xA;&#xD;&#xA;Preferably C# but C++ is ok." />
  <row Id="13535" PostHistoryTypeId="1" PostId="6786" RevisionGUID="ac4f0e96-4bdf-4794-a163-0c7e1992a1fc" CreationDate="2010-12-24T06:05:47.063" UserId="1516" Text="Sample Projects/Source for Navigational Meshes" />
  <row Id="13536" PostHistoryTypeId="3" PostId="6786" RevisionGUID="ac4f0e96-4bdf-4794-a163-0c7e1992a1fc" CreationDate="2010-12-24T06:05:47.063" UserId="1516" Text="&lt;path-finding&gt;" />
  <row Id="13537" PostHistoryTypeId="5" PostId="6786" RevisionGUID="78bfa610-adcc-4678-9b01-e24404740ec3" CreationDate="2010-12-24T07:39:15.390" UserId="1516" Comment="added 153 characters in body" Text="Anyone aware of any sample source code that contain Navigational Meshes?&#xD;&#xA;&#xD;&#xA;I'm aware of [recast navigation][1] (which is a little bit too complicated). - Written in C++.&#xD;&#xA;&#xD;&#xA;Preferably C# but C++ is ok.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/recastnavigation/" />
  <row Id="13538" PostHistoryTypeId="2" PostId="6787" RevisionGUID="51dc304b-962e-46af-a12b-d842b2940eb1" CreationDate="2010-12-24T08:24:15.373" UserId="4200" Text="Yes, you need the application from this website to be able to develop for Windows Phone 7&#xD;&#xA;&#xD;&#xA;http://www.microsoft.com/visualstudio/en-us/products/2010-editions/windows-phone-developer-tools" />
  <row Id="13543" PostHistoryTypeId="2" PostId="6790" RevisionGUID="10b163c0-a915-403b-a9b2-91d94ce6f13e" CreationDate="2010-12-24T10:52:09.053" UserId="741" Text="In the absence of further clarification on what the restrictions are, I'm going to assume two meshes that are basically polygon soup (a set of triangles, possibly unconnected).&#xD;&#xA;&#xD;&#xA;You're basically doing n*m triangle to triangle collisions (where n is the number of triangles in object A, m the number in object B). The easiest way is to simply do a brute force closest-point-between-two-triangles for every pairing of triangles. So check triangle 0 in object A against triangle 0 in B, then 1 in B, 2, etc.&#xD;&#xA;&#xD;&#xA;Triangle to triangle checks are pretty straightforward, if you have the RTC book mentioned you probably have a better algorithm already. But basically you only have two cases - one where the two triangles are parallel (in which case any point on the triangle is equally close to the other triangle), or one point is closer to the other triangle. The second case is just a closest-point-on-triangle-to-point, for which you project the point onto the plane of the triangle (i.e. find the closest point to your target on the plane which contains the triangle), and then constrain it to be within the triangle. If the projected point is within the triangle, then you have your closest point, otherwise you now have 3 closest-point-on-line-to-point problems, which you can solve with dot products (and pick the smallest of the three solutions).&#xD;&#xA;&#xD;&#xA;In terms of optimisations / early outs, you need to find a cheaper way of testing two triangles for rough closeness, so that you can discard all but the few potential options. I think you could probably get a lot from AABB checking. E.g.:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; - for each triangle calculate the AABB&#xD;&#xA; - for each triangle pairing (n * m), calculate the distance between the two closest parts of the AABB, and the two furthest parts (separating axis makes this fairly cheap).&#xD;&#xA; - Now you know that for those two triangles, the closest point is somewhere in between those two distances.&#xD;&#xA; - Find the pairing with the smallest minimum distance ([min], [max]). From that pairing you know that you have a closest point which is at most [max] distance away, and so you can eliminate all other pairings which have a minimum distance further away than [max], because even at its best, the pairing is worse than the one you already have." />
  <row Id="13544" PostHistoryTypeId="2" PostId="6791" RevisionGUID="66253db1-8e7f-4315-b096-38f2e9374717" CreationDate="2010-12-24T13:22:58.760" UserId="1923" Text="&gt;             normals[0] = Vector3.Cross(corners[1], corners[2]);&#xD;&#xA;&gt;             normals[0].Normalize();&#xD;&#xA;&#xD;&#xA;There is a subtle problem here,  the two corner vectors that you are crossing are vectors that go from the origin to the corners. What you want to cross are two edges of the face (vectors that go from one corner to another corner). try:&#xD;&#xA;&#xD;&#xA;    Vector3 edge1 = corners[1] - corners[0];&#xD;&#xA;    Vector3 edge2 = corners[2] - corners[0];&#xD;&#xA;    normals[0] = Vector3.Cross(edge1, edge2);&#xD;&#xA;    normals[0].Normalize();&#xD;&#xA;&#xD;&#xA;I assumed that corners 0, 1, 2 are all associated with the same face. &#xD;&#xA;&#xD;&#xA;This may produce a normal that points in the wrong direction depending on how the corners wind. If you think the normal is pointing inward to the cube  instead of outward, simply switch places of the edges in the cross function." />
  <row Id="13546" PostHistoryTypeId="2" PostId="6792" RevisionGUID="07e4ae4a-088a-4223-ad2b-7662ffe26341" CreationDate="2010-12-24T13:52:18.980" UserId="4082" Text="A* *is* node-based. In fact, the only difference between A* and depth-first, breadth-first, uniform cost and every other graph search algorithm is how they determine the next node to visit. Using a stack, queue, priority queue based on cost from start, and a priority queue based on cost from start plus estimated cost to goal yields DFS, BFS, uniform cost and A* respectively.&#xD;&#xA;&#xD;&#xA;Graph search algorithms, especially A*, sound all mysterious until you grok what I said above - then they all become obvious. I plan to write a set of articles for my blog exploring this topic in depth." />
  <row Id="13548" PostHistoryTypeId="2" PostId="6793" RevisionGUID="0cea0bf5-a739-4691-8d4b-b1d27eb924e4" CreationDate="2010-12-24T16:14:46.120" UserId="4204" Text="I have come across the Game State Managemnet tutorial at http://create.msdn.com/en-US/education/catalog/sample/game_state_management because I thought this would be a good place to start a game off. &#xD;&#xA;&#xD;&#xA;I have added a new screen, but I am still a bit lost on how everything works.  When I make my game, do I only need one more additional screen? just for gameplay? or should I have a different screen for each level?" />
  <row Id="13549" PostHistoryTypeId="1" PostId="6793" RevisionGUID="0cea0bf5-a739-4691-8d4b-b1d27eb924e4" CreationDate="2010-12-24T16:14:46.120" UserId="4204" Text="Making sense of the Game State manager tutorial?" />
  <row Id="13550" PostHistoryTypeId="3" PostId="6793" RevisionGUID="0cea0bf5-a739-4691-8d4b-b1d27eb924e4" CreationDate="2010-12-24T16:14:46.120" UserId="4204" Text="&lt;xna&gt;&lt;c#&gt;&lt;screen&gt;" />
  <row Id="13551" PostHistoryTypeId="2" PostId="6794" RevisionGUID="aff872cd-43de-45b7-8f6f-b0b2632631e0" CreationDate="2010-12-24T16:24:32.247" UserId="4204" Text="If you want OO follow Ogre. Quake is more built for itself, messy, and seems like that had a tight deadline and didn't care about structure." />
  <row Id="13553" PostHistoryTypeId="2" PostId="6795" RevisionGUID="cab71e9a-373e-4beb-9fff-7929bb622ac1" CreationDate="2010-12-24T16:37:20.477" UserId="2301" Text="Just in case you missed it, there is a document (think its a html page) that outlines what it all does. Though you probably have already read this, and just need a brief overview." />
  <row Id="13554" PostHistoryTypeId="2" PostId="6796" RevisionGUID="58d57070-ca9a-4b4f-8f05-1bd1652b755c" CreationDate="2010-12-24T17:24:16.337" UserId="4205" Text="I'm a CS student, having plenty enough knowledge in programming, and general algorithms. What is your suggestion in game developing? How to start?&#xD;&#xA;&#xD;&#xA;Thanks a lot! " />
  <row Id="13555" PostHistoryTypeId="1" PostId="6796" RevisionGUID="58d57070-ca9a-4b4f-8f05-1bd1652b755c" CreationDate="2010-12-24T17:24:16.337" UserId="4205" Text="New to Game Development, need advice." />
  <row Id="13556" PostHistoryTypeId="3" PostId="6796" RevisionGUID="58d57070-ca9a-4b4f-8f05-1bd1652b755c" CreationDate="2010-12-24T17:24:16.337" UserId="4205" Text="&lt;game-design&gt;&lt;graphics&gt;&lt;algorithm&gt;&lt;game-mechanics&gt;&lt;game-development&gt;" />
  <row Id="13557" PostHistoryTypeId="2" PostId="6797" RevisionGUID="3dcc7e4b-9482-4c0e-8e5a-1f06ef94de17" CreationDate="2010-12-24T17:45:14.700" UserId="1581" Text="I'd suggest starting with something small, probably 2d.&#xD;&#xA;&#xD;&#xA;Also, I'd recommend using an already made engine or framework. Starting from scratch with OpenGL or DirectX is possible, but it will be daunting.&#xD;&#xA;&#xD;&#xA;Also, make sure the engine you choose has a nice community behind it, so you can ask questions.&#xD;&#xA;&#xD;&#xA;In summary, try [LÖVE][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org" />
  <row Id="13558" PostHistoryTypeId="2" PostId="6798" RevisionGUID="72ba7396-70ac-43f6-8a16-0e4d008e06e5" CreationDate="2010-12-24T17:48:45.477" UserId="1156" Text="Well, (if you don't already know one) the first step is probably learning a graphics API like [SDL][1] (C/C++), [Pygame][2] which is basically the Python binding of SDL (Python), or [XNA][3] (C#/.NET).&#xD;&#xA;&#xD;&#xA;Probably the most important point is **start simple**. Don't try making a huge 3D MMORPG, like a lot of beginners do. &#xD;&#xA;&#xD;&#xA;[Here's][4] a nice list of small, simple games to start with. The general idea is to get a feel of how to develop games specifically, rather than programming generally.&#xD;&#xA;&#xD;&#xA;[Here's][5] a good list of resources which are worth checking on.&#xD;&#xA;&#xD;&#xA;After that, work your way up from 2D to 3D. You'll need to learn OpenGL or DirectX, or one of the many engines and wrappers for different languages.&#xD;&#xA;&#xD;&#xA;After that, run wild. As long as you know what you're doing, and it doesn't feel like you're diving in the deep end, you should be fine.&#xD;&#xA;&#xD;&#xA;Good luck! :)&#xD;&#xA;&#xD;&#xA;PS: ['Make Games Not Engines'.][6] this ScientificNinja article is probably one of the most important things to read. (I frequent GD.Net) The amount of people I see, very often hardly being able to program, talking about having to make 'a general engine to do everything' is huge. They rarely get anywhere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.pygame.org/news.html&#xD;&#xA;  [3]: http://blogs.msdn.com/b/xna/&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games&#xD;&#xA;  [6]: http://scientificninja.com/blog/write-games-not-engines" />
  <row Id="13559" PostHistoryTypeId="2" PostId="6799" RevisionGUID="de049fb6-8c39-4987-b334-d20a0ec719e0" CreationDate="2010-12-24T18:00:38.190" UserId="1581" Text="It depends on your target display size.&#xD;&#xA;&#xD;&#xA;On one end of the scale there's the &quot;have everything on a single 3000x3000 framebuffer&quot; approach. This is probably the fastest method (one single render call) but a framebuffer that big can cause problems.&#xD;&#xA;&#xD;&#xA;On the other end of the scale there's the &quot;draw every single tile individually&quot; approach. This is memory-conservative, but requires a lot of render calls.&#xD;&#xA;&#xD;&#xA;To me, the sweet spot is bundling the tiles on chunks that take rougthly half the size of the screen. The number of render calls is at worse 9, and the hardware should cope well with a texture size that is half the screen.&#xD;&#xA;&#xD;&#xA;This way, for a PC screen with 1024x768 pixels, you will probably be ok with 512x512 textures, while for a mobile device with a 300x256 pixels, 256x128 should be ok." />
  <row Id="13560" PostHistoryTypeId="6" PostId="6796" RevisionGUID="7cd2b2d2-8208-4163-a06e-4ecde93c07b0" CreationDate="2010-12-24T18:21:15.980" UserId="1156" Comment="edited tags" Text="&lt;graphics&gt;&lt;programming&gt;&lt;game-development&gt;" />
  <row Id="13561" PostHistoryTypeId="6" PostId="6796" RevisionGUID="7238c8f2-2604-4edb-8491-1e95eb748522" CreationDate="2010-12-24T21:19:17.873" UserId="744" Comment="edited tags" Text="&lt;programming&gt;" />
  <row Id="13562" PostHistoryTypeId="6" PostId="6778" RevisionGUID="c72c573e-1c2c-4c52-ae29-304d674680b4" CreationDate="2010-12-24T21:20:04.893" UserId="744" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;xbox360&gt;&lt;normals&gt;" />
  <row Id="13563" PostHistoryTypeId="2" PostId="6800" RevisionGUID="174d6813-349a-41c1-acc6-41fb360353a3" CreationDate="2010-12-24T21:20:10.450" UserId="2910" Text="I'm actually trying to do something fairly simple.&#xD;&#xA;&#xD;&#xA;I cannot get multiple key presses to work in XNA. I've tried the following pieces of code.&#xD;&#xA;&#xD;&#xA;    else if (keyboardState.IsKeyDown(Keys.Down) &amp;&amp; (keyboardState.IsKeyDown(Keys.Left)))&#xD;&#xA;    {&#xD;&#xA;          //Move Character South-West&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I tried.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    else if (keyboardState.IsKeyDown(Keys.Down))&#xD;&#xA;                {&#xD;&#xA;                    if (keyboardState.IsKeyDown(Keys.Left))&#xD;&#xA;                    {&#xD;&#xA;                          //Move Character South-West&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;Neither worked for me. Single presses work just fine. Any thoughts?" />
  <row Id="13564" PostHistoryTypeId="1" PostId="6800" RevisionGUID="174d6813-349a-41c1-acc6-41fb360353a3" CreationDate="2010-12-24T21:20:10.450" UserId="2910" Text="Multiple Key Presses in XNA?" />
  <row Id="13565" PostHistoryTypeId="3" PostId="6800" RevisionGUID="174d6813-349a-41c1-acc6-41fb360353a3" CreationDate="2010-12-24T21:20:10.450" UserId="2910" Text="&lt;xna&gt;&lt;events&gt;&lt;keyboard&gt;&lt;objects&gt;&lt;movement&gt;" />
  <row Id="13566" PostHistoryTypeId="5" PostId="6798" RevisionGUID="d5917c7c-7546-465a-aaf8-2b553e4ef83a" CreationDate="2010-12-24T21:38:06.667" UserId="1156" Comment="added 333 characters in body" Text="Well, (if you don't already know one) the first step is probably learning a graphics API like [SDL][1] (C/C++), [Pygame][2] which is basically the Python binding of SDL (Python), or [XNA][3] (C#/.NET).&#xD;&#xA;&#xD;&#xA;Probably the most important point is **start simple**. Don't try making a huge 3D MMORPG, like a lot of beginners do. &#xD;&#xA;&#xD;&#xA;[Here's][4] a nice list of small, simple games to start with. The general idea is to get a feel of how to develop games specifically, rather than programming generally.&#xD;&#xA;&#xD;&#xA;[Here's][5] a good list of resources which are worth checking on.&#xD;&#xA;&#xD;&#xA;After that, work your way up from 2D to 3D. You'll need to learn OpenGL or DirectX, or one of the many engines and wrappers for different languages.&#xD;&#xA;&#xD;&#xA;After that, run wild. As long as you know what you're doing, and it doesn't feel like you're diving in the deep end, you should be fine.&#xD;&#xA;&#xD;&#xA;Good luck! :)&#xD;&#xA;&#xD;&#xA;PS: ['Make Games Not Engines'.][6] this ScientificNinja article is probably one of the most important things to read. (I frequent GD.Net) The amount of people I see, very often hardly being able to program, talking about having to make 'a general engine to do everything' is huge. They rarely get anywhere.&#xD;&#xA;&#xD;&#xA;EDIT: Another thing I forgot to mention, though is probably one of the most important things: **Take your game through to the end, that is finish it**. I for one have many half done game projects lying about, and as such you sort of forget about it and have little to say 'I achieved this' to other people and to motivate yourself.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.pygame.org/news.html&#xD;&#xA;  [3]: http://blogs.msdn.com/b/xna/&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games&#xD;&#xA;  [6]: http://scientificninja.com/blog/write-games-not-engines" />
  <row Id="13567" PostHistoryTypeId="6" PostId="5158" RevisionGUID="74ae2165-04de-4012-8a3a-677b24e5fc3b" CreationDate="2010-12-24T21:39:07.633" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;tiles&gt;" />
  <row Id="13568" PostHistoryTypeId="10" PostId="6796" RevisionGUID="db5321b9-32a1-456f-9b1a-88c039942b50" CreationDate="2010-12-24T22:02:05.577" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="13569" PostHistoryTypeId="5" PostId="6796" RevisionGUID="62e3af16-6ffe-4da5-97e7-0ffbfd5e2803" CreationDate="2010-12-24T22:02:05.780" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are some good resources for getting a beginner started in developing games?](http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I'm a CS student, having plenty enough knowledge in programming, and general algorithms. What is your suggestion in game developing? How to start?&#xD;&#xA;&#xD;&#xA;Thanks a lot! " />
  <row Id="13570" PostHistoryTypeId="5" PostId="252" RevisionGUID="3cd995ed-8e70-45af-921b-a3527c7e105d" CreationDate="2010-12-24T22:10:29.310" UserId="982" Comment="it really annoys me to see dollar signs placed  in the wrong spot" Text="**Adobe CS5 Master Collection**&#xD;&#xA;&#xD;&#xA;https://store1.adobe.com/cfusion/store/html/index.cfm?event=displayProduct&amp;categoryOID=4244037&amp;store=OLS-US&#xD;&#xA;&#xD;&#xA;Design, textures, video, audio.&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;$2599&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Comprehensive package that has Photoshop and Illustrator for both vector and raster imagery/design work. After effects for video post production. Premiere for video editing. Soundbooth for audio. Media Encoder for encoding videos, etc... Some of apps might not be best in their domain (You could buy SoundForge from sony instead of soundbooth, or Avid instead of Premiere), but it is very well rounded for that price. " />
  <row Id="13571" PostHistoryTypeId="2" PostId="6801" RevisionGUID="2d5bf020-7fa0-4909-9a92-8b2619b9b8eb" CreationDate="2010-12-24T22:10:37.240" UserId="2798" Text="Your else if statements could be interfering with the program flow. Try restructuring your code, or setting bit flags for each key pressed. Or perhaps your keyboard doesn't support some keys simultaneosly pressed (happens to my old laptop)." />
  <row Id="13572" PostHistoryTypeId="5" PostId="201" RevisionGUID="690945b4-06cf-495d-81a3-b4d9a0cdc078" CreationDate="2010-12-24T22:11:10.103" UserId="982" Comment="edited body" Text="**Autodesk Maya**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897&#xD;&#xA;&#xD;&#xA;3D and to an extent 2D (via paint)&#xD;&#xA;&#xD;&#xA;Win, OSX, Linux&#xD;&#xA;&#xD;&#xA;$4090&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package that has almost everything in it. " />
  <row Id="13573" PostHistoryTypeId="5" PostId="251" RevisionGUID="564e98ef-c215-46e6-9f9c-f7f5c271f51e" CreationDate="2010-12-24T22:11:47.467" UserId="982" Comment="edited body" Text="**Autodesk Mudbox**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13565063&#xD;&#xA;&#xD;&#xA;3D texturing and Surface detailing&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;$745&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Detailing which can be exported as normal maps. Also great for texturing." />
  <row Id="13574" PostHistoryTypeId="5" PostId="259" RevisionGUID="568c5396-cd62-4468-9405-edafc55656ed" CreationDate="2010-12-24T22:12:05.220" UserId="982" Comment="edited body" Text="**Luxology Modo**&#xD;&#xA;&#xD;&#xA;http://www.luxology.com/store/modo/&#xD;&#xA;&#xD;&#xA;3D modeling / painting&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;$995&#xD;&#xA;&#xD;&#xA;Commercial, has a trial&#xD;&#xA;&#xD;&#xA;3D modeling application. Strong modeling tools.&#xD;&#xA;" />
  <row Id="13575" PostHistoryTypeId="5" PostId="258" RevisionGUID="94db32d5-a1cd-480a-ba0f-d28af98e19f0" CreationDate="2010-12-24T22:12:33.707" UserId="982" Comment="edited body" Text="**Maxon Cinema4D**&#xD;&#xA;&#xD;&#xA;http://www.maxon.net/&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;$995 for core $2495 for XL and $3695 for studio bundle.&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Bodypaint3D included in more expensive packages was considered best 3D paint package for quite some time." />
  <row Id="13576" PostHistoryTypeId="5" PostId="254" RevisionGUID="e96777b4-a550-4ea1-b391-93a359bb6cb2" CreationDate="2010-12-24T22:13:12.617" UserId="982" Comment="edited body" Text="**Autodesk 3dsmax**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13567410&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win&#xD;&#xA;&#xD;&#xA;$3495&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Strength lies in numerous 3rd party plugins and strong game development presence." />
  <row Id="13577" PostHistoryTypeId="5" PostId="257" RevisionGUID="4e3d6111-b562-438f-9531-73bb5f3218e3" CreationDate="2010-12-24T22:14:32.660" UserId="982" Comment="edited body" Text="**Autodesk Softimage**&#xD;&#xA;&#xD;&#xA;http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13571168&#xD;&#xA;&#xD;&#xA;3D&#xD;&#xA;&#xD;&#xA;Win, Linux&#xD;&#xA;&#xD;&#xA;$2995&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Versatile 3D package. Grandaddy of animation (IK was first developed for SI|3D). Very versatile and powerful package that has strong game dev tools support." />
  <row Id="13578" PostHistoryTypeId="5" PostId="315" RevisionGUID="8c3112e7-bbc1-4e9a-af10-a353342c4809" CreationDate="2010-12-24T22:15:17.763" UserId="982" Comment="edited body" Text="Toon Boom Animate&#xD;&#xA;&#xD;&#xA;http://www.toonboom.com/main/&#xD;&#xA;&#xD;&#xA;2D Animation&#xD;&#xA;&#xD;&#xA;Win, OSX&#xD;&#xA;&#xD;&#xA;$700 (frequent actions which bring price to $499)&#xD;&#xA;&#xD;&#xA;Commercial, has a free trial&#xD;&#xA;&#xD;&#xA;Great (and i mean great!) 2D animation package." />
  <row Id="13579" PostHistoryTypeId="2" PostId="6802" RevisionGUID="e9632057-a333-4d81-a8e1-603ef5804e7b" CreationDate="2010-12-24T22:28:30.767" UserId="1516" Text="I'm going to start a library in C# for Navigational Meshes. I would like to use it in both WPF/Winforms and in XNA. Can I create a windows class library and still use it in XNA?" />
  <row Id="13580" PostHistoryTypeId="1" PostId="6802" RevisionGUID="e9632057-a333-4d81-a8e1-603ef5804e7b" CreationDate="2010-12-24T22:28:30.767" UserId="1516" Text="Windows Class Library vs XNA Class Library" />
  <row Id="13581" PostHistoryTypeId="3" PostId="6802" RevisionGUID="e9632057-a333-4d81-a8e1-603ef5804e7b" CreationDate="2010-12-24T22:28:30.767" UserId="1516" Text="&lt;xna&gt;&lt;windows&gt;" />
  <row Id="13582" PostHistoryTypeId="2" PostId="6803" RevisionGUID="3948e1fe-708d-4f2c-8140-939bf22bded2" CreationDate="2010-12-24T23:21:17.293" UserId="1829" Text="Okay, you asked: learn everything you can about:&#xD;&#xA;&#xD;&#xA; - 3D/4D matrices: rotation matrices, projection matrices, matrix inversion, matrix product...&#xD;&#xA;&#xD;&#xA; - trigonometry and geometry: trigonometric circle, arc-functions, common properties of a circle, a square, a triangle etc.&#xD;&#xA;&#xD;&#xA; - &quot;Advanced OOP&quot; in C++: virtual function and pure virtual function behaviors, and the classic STL containers: list, vector, but especially map.&#xD;&#xA;&#xD;&#xA; - Design patterns: you can begin with the composite pattern, the factory pattern, observer pattern, prototype pattern, and of course the singleton pattern (which is more a language feature than a true DP).&#xD;&#xA;&#xD;&#xA; - Optimization matters: how why when use references/pointers, the reason multiple inheritance can slow down, and other complicated stuff like where and how you should declare and use variables and your data.&#xD;&#xA;&#xD;&#xA;Finally, do some little game on your won, you might have to do a classic game like tetris or pacman, but eitherway it will be hard to find a better idea of game." />
  <row Id="13583" PostHistoryTypeId="2" PostId="6804" RevisionGUID="ed79ff8f-56ba-4aae-870d-2733630f348b" CreationDate="2010-12-25T00:16:26.160" UserId="2239" Text="In short, yes. They're both just class libraries, the different templates just helps adding some default references.&#xD;&#xA;&#xD;&#xA;Also see [this Stackoverflow question][1] and follow the advice in creating both types and running the resulting project files through your favorite diff tool for the details ^^&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3256442" />
  <row Id="13584" PostHistoryTypeId="2" PostId="6805" RevisionGUID="8bf0da1d-4130-4cee-9f66-06a3706aac97" CreationDate="2010-12-25T01:55:04.787" UserId="2332" Text="Use GetPressedKeys() to get all of the currently pressed keys and iterate through them doing what you want.&#xD;&#xA;&#xD;&#xA;If you're moving the player or something, create an initial Vector3 at the beginning and add modifier values to it and add it to the player position after the input checking has completed.&#xD;&#xA;&#xD;&#xA;Something like this:&#xD;&#xA;&#xD;&#xA;    Vector3 positionToAdd = Vector3.Zero;&#xD;&#xA;    Keys[] currentPressedKeys = currentKeyboardState.GetPressedKeys();&#xD;&#xA;    foreach( Keys key in currentPressedKeys )&#xD;&#xA;    {&#xD;&#xA;        if( key == Keys.W )&#xD;&#xA;            positionToAdd += Vector3( 0.0f, 1.0f, 0.0f );&#xD;&#xA;    &#xD;&#xA;        if( key == Keys.S )&#xD;&#xA;            positionToAdd += Vector3( 0.0f, -1.0f, 0.0f );&#xD;&#xA;    &#xD;&#xA;        if( key == Keys.A )&#xD;&#xA;            positionToAdd += Vector3( -1.0f, 0.0f, 0.0f );&#xD;&#xA;    &#xD;&#xA;        if( key == Keys.D )&#xD;&#xA;            positionToAdd += Vector3( 1.0f, 0.0f, 0.0f );&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    player.Position += positionToAdd;&#xD;&#xA;&#xD;&#xA;Personally, I don't do this, I just use if statements WITHOUT the else to make sure program flow isn't being disrupted unintentionally.&#xD;&#xA;&#xD;&#xA;Ray" />
  <row Id="13585" PostHistoryTypeId="2" PostId="6806" RevisionGUID="4d4e6595-e87f-4db6-aea0-2404fa84c87a" CreationDate="2010-12-25T08:49:41.370" UserId="288" Text="The code in your question is fine. The problem must be in the code above it, perhaps you are doing something like this:&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;    if (ks.IsKeyDown(Keys.Down)) { /* ... */ }&#xD;&#xA;    else if (ks.IsKeyDown(Keys.Down) &amp;&amp; (ks.IsKeyDown(Keys.Left))) { /* ... */ }&#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;In which case the first condition will trigger and the second will not (due to `else`).&#xD;&#xA;&#xD;&#xA;Here is how to do 2D input using the keyboard:&#xD;&#xA;&#xD;&#xA;    Vector2 direction = Vector2.Zero;&#xD;&#xA;    if(ks.IsKeyDown(Keys.Up)) direction += new Vector2(0, 1);&#xD;&#xA;    if(ks.IsKeyDown(Keys.Down)) direction += new Vector2(0, -1);&#xD;&#xA;    if(ks.IsKeyDown(Keys.Left)) direction += new Vector2(-1, 0);&#xD;&#xA;    if(ks.IsKeyDown(Keys.Right)) direction += new Vector2(1, 0);&#xD;&#xA;&#xD;&#xA;    // Optional: make sure direction is always of unit length (prevents straferunning)&#xD;&#xA;    if(direction.LengthSquared() &gt; 1f) direction.Normalize();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Personally I'd *avoid* using `GetPressedKeys()`, because it allocates memory every time you call it. Probably not enough to be a performance issues on Windows, but it will be if you ever port to Xbox 360. It exists to support &quot;press any key&quot; scenarios only." />
  <row Id="13586" PostHistoryTypeId="2" PostId="6807" RevisionGUID="77e72f09-9281-46f0-9eef-d42d64cfccc9" CreationDate="2010-12-25T13:15:23.850" UserDisplayName="gizmon15" Text="I want to upload my game to kongregate and other sites, but on kongregate I want to invoke one function and other sites I want run another function. How to check in as3 where ( I want to get host like: www.kongregate.com or www.games.com etc) my game is ? Or mayby you know other, better way to make this ?" />
  <row Id="13587" PostHistoryTypeId="1" PostId="6807" RevisionGUID="77e72f09-9281-46f0-9eef-d42d64cfccc9" CreationDate="2010-12-25T13:15:23.850" UserDisplayName="gizmon15" Text="Where is my game?" />
  <row Id="13588" PostHistoryTypeId="3" PostId="6807" RevisionGUID="77e72f09-9281-46f0-9eef-d42d64cfccc9" CreationDate="2010-12-25T13:15:23.850" UserDisplayName="gizmon15" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="13589" PostHistoryTypeId="5" PostId="6807" RevisionGUID="e1e8d017-c16f-46ef-b520-22e881e176ad" CreationDate="2010-12-25T13:21:32.607" UserId="744" Comment="deleted 11 characters in body; edited title" Text="I want to upload my game to Kongregate and other sites, but on Kongregate I want to invoke one function and other sites I want run another function. How to check in AS3 where (I want to get host like: www.kongregate.com or www.games.com etc) my game is? Or maybe you know other, better way to make this?" />
  <row Id="13590" PostHistoryTypeId="4" PostId="6807" RevisionGUID="e1e8d017-c16f-46ef-b520-22e881e176ad" CreationDate="2010-12-25T13:21:32.607" UserId="744" Comment="deleted 11 characters in body; edited title" Text="How can I find out what URL my game is executing from in Flash?" />
  <row Id="13591" PostHistoryTypeId="2" PostId="6808" RevisionGUID="0531bbfe-24f9-485b-b433-efd9c22981b7" CreationDate="2010-12-25T14:32:05.370" UserId="73" Text="Long ago I found a website with a huge list of different gameplays; around 250 or so. I wanted to go back but right now I cannot find it (I've already spent some time on Google, believe me).&#xD;&#xA;&#xD;&#xA;The site had a little picture with a brief explanation, that's all I remember.&#xD;&#xA;&#xD;&#xA;I'd appreciate if anyone who rememebers the web site publish the link.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="13592" PostHistoryTypeId="1" PostId="6808" RevisionGUID="0531bbfe-24f9-485b-b433-efd9c22981b7" CreationDate="2010-12-25T14:32:05.370" UserId="73" Text="Where can I find a list of gameplays?" />
  <row Id="13593" PostHistoryTypeId="3" PostId="6808" RevisionGUID="0531bbfe-24f9-485b-b433-efd9c22981b7" CreationDate="2010-12-25T14:32:05.370" UserId="73" Text="&lt;game-mechanics&gt;&lt;gameplay&gt;" />
  <row Id="13594" PostHistoryTypeId="2" PostId="6809" RevisionGUID="90fe31f4-ce38-41e8-b28a-81dbdd273e04" CreationDate="2010-12-25T14:41:01.213" UserId="3991" Text="URL is: http://www.squidi.net/three/" />
  <row Id="13595" PostHistoryTypeId="2" PostId="6810" RevisionGUID="b2d36285-e397-499b-bddf-26bb136473ae" CreationDate="2010-12-25T16:16:39.120" UserId="962" Text="I found a post on how to site-lock flash movies/games [here][1]. It is the fourth post down. You can modify it slightly to make it do something or set any variables you need changed. &#xD;&#xA;&#xD;&#xA;Here is the code from the post.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //Assuming you have a movieclip or sprite named myMovieClip (you can use any movieclip or sprite)&#xD;&#xA;    var URLofSWF:String = myMovieClip.loaderInfo.loaderURL;&#xD;&#xA;&#xD;&#xA;    //You will do some string methods to get domain name etc etc, it's up to you&#xD;&#xA;    var domain_parts:Array = _url.split(&quot;://&quot;);&#xD;&#xA;    var domain_parts_2:Array = domain_parts[1].split(&quot;/&quot;);&#xD;&#xA;    var domainOfURL:String = real_domain[0];&#xD;&#xA;&#xD;&#xA;     //Then you compare the URL to any URL you wish to allow or disallow&#xD;&#xA;    if(URLofSWF == &quot;http://www.google.com/mySwf.swf&quot;){ // strict swf url checking&#xD;&#xA;    proceed();&#xD;&#xA;    }else{&#xD;&#xA;    stopEverything(); // Or inject some funny code to the stealer :P&#xD;&#xA;    }&#xD;&#xA;    // or &#xD;&#xA;    if(domainOfURL == &quot;www.mysite.com&quot;){ // domain checking only&#xD;&#xA;        proceed();&#xD;&#xA;    }else{&#xD;&#xA;        stopEverything(); // Or inject some funny code to the stealer :P&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://www.actionscript.org/forums/showthread.php3?t=170251" />
  <row Id="13596" PostHistoryTypeId="2" PostId="6811" RevisionGUID="a803fb2d-5e53-4fed-81c4-111c5b08a20d" CreationDate="2010-12-25T16:18:37.113" UserId="1829" Text="Besides programming, modeling an environment takes a great deal of time.&#xD;&#xA;&#xD;&#xA;I don't know about the work time involved, for example, in a WoW dungeon level, or other beautiful city-like, future environment, jungles, fantasy, etc, but this kind of work is made from scratch by artists.&#xD;&#xA;&#xD;&#xA;What are the techniques involved in the TorchLight level randomizer, and does other titles have similarities with this ? Is there a family name for such techniques ?" />
  <row Id="13597" PostHistoryTypeId="1" PostId="6811" RevisionGUID="a803fb2d-5e53-4fed-81c4-111c5b08a20d" CreationDate="2010-12-25T16:18:37.113" UserId="1829" Text="Procedural terrains in 3D: what has been done ? Are there common algo and/or theories about it ?" />
  <row Id="13598" PostHistoryTypeId="3" PostId="6811" RevisionGUID="a803fb2d-5e53-4fed-81c4-111c5b08a20d" CreationDate="2010-12-25T16:18:37.113" UserId="1829" Text="&lt;procedural-generation&gt;&lt;level-design&gt;&lt;ogre&gt;&lt;random&gt;" />
  <row Id="13599" PostHistoryTypeId="2" PostId="6812" RevisionGUID="1e1e524d-5502-4c1c-b978-b2334fcba147" CreationDate="2010-12-25T20:34:04.063" UserId="493" Text="Since it is most likely that the logic of your game will not change from level to level, rather it is the content that changes - map, characters, enemies - it doesn't make sense to create a new screen for each and every level. &#xD;&#xA;&#xD;&#xA;Each new level screen will be almost identical to the previous ones except for maybe a few properties, fields, and the Initialization and LoadContent methods. Most of the fields, properties, and methods - such as Draw and Update - will not change. &#xD;&#xA;&#xD;&#xA;Thus, it makes more sense to have one GameplayScreen and create something like Level and LevelManager classes to handle the switching from one level to another. If you want something even simpler, you can just have a method on the GameplayScreen that switches levels and handles the transition while switching.&#xD;&#xA;&#xD;&#xA;My recommendation would be to go through the rest of the tutorials on the [App Hub][1] site or at least go through some of the labs or kits that actually document the creation of a full games using the Game State Manager. Labs are tutorials that take you through the creation process while kits are full games with lots of comments in the source that you can use as a building block for your own games.&#xD;&#xA;&#xD;&#xA;The [Role-Playing Game Starter Kit][2] uses the Game State Manager and shows one possible level management solution. They create a master Session class that handles the game play and the switching of levels - or in their case switching Maps. Also, this kit uses a number of screens like ChestScreen, DialogueScreen, etc., which will give you a better understanding of what Screens are used for.&#xD;&#xA;&#xD;&#xA;Also the [Platformer Starter Kit][3] is another game that shows how to work with levels, but doesn't use the Game State Manager. But, it wouldn't be hard to integrate their mechanism into a game that uses the Game State Manager.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-us/education/roadmap&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/roleplaying_game&#xD;&#xA;  [3]: http://create.msdn.com/education/catalog/sample/platformer" />
  <row Id="13600" PostHistoryTypeId="2" PostId="6813" RevisionGUID="25c0ab89-4aa7-424f-8b3d-19f296a6feba" CreationDate="2010-12-25T20:47:14.880" UserId="4217" Text="I'm brazilian and I want to learn how to develop a game in some college or something like that, but I don't know any place here to learn it. Here is not that good either to develop games, as we don't have many companies to do that.&#xD;&#xA;&#xD;&#xA;So, I was thinking about working in some place else, while I study it. What I really want to know is, a good place to learn, and a country that developers are well payed to be able to pay my course and still have money to do something else.&#xD;&#xA;&#xD;&#xA;I'm a Java programmer, still learning a lot, but I want to do it later. A few years from now." />
  <row Id="13601" PostHistoryTypeId="1" PostId="6813" RevisionGUID="25c0ab89-4aa7-424f-8b3d-19f296a6feba" CreationDate="2010-12-25T20:47:14.880" UserId="4217" Text="Where is a good place to learn how to develop games?" />
  <row Id="13602" PostHistoryTypeId="3" PostId="6813" RevisionGUID="25c0ab89-4aa7-424f-8b3d-19f296a6feba" CreationDate="2010-12-25T20:47:14.880" UserId="4217" Text="&lt;java&gt;&lt;game-mechanics&gt;&lt;career&gt;" />
  <row Id="13606" PostHistoryTypeId="2" PostId="6815" RevisionGUID="1d73356d-5bcd-4c63-8ec3-de6e2ec94ff5" CreationDate="2010-12-26T00:06:16.160" UserId="1581" Text="[Roguelikes][1] have been doing this kind of thing since they were invented, and they are the &quot;seed&quot; Torchlight (and Diablo) got their ideas from.&#xD;&#xA;&#xD;&#xA;I don't know about Torchlight's specifically, but in general, what you are looking for is called &quot;Procedural Level Generation&quot;.&#xD;&#xA;&#xD;&#xA;[Fuel][2] procedurally generates a zone so bast that it would not fit on the DVD the game comes in. I particularly enjoyed reading [Shamus Young's series on it][3].&#xD;&#xA;&#xD;&#xA;Another interesting example of procedurally generated content is Introversion's not-yet-release game, called [Subversion][4]. Have a look at [Part 12][5] on that page; it's specially juicy.&#xD;&#xA;&#xD;&#xA;Speaking about procedurally generated cities, there's also some middleware around - check out [http://www.procedural.com/][6].&#xD;&#xA;&#xD;&#xA;For more games/middleware, check out the [Procedural Generation Wikipedia page][7] and the [Procedural Generation Wiki][8].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Roguelike&#xD;&#xA;  [2]: http://www.codemasters.com/games/?gameid=2855&amp;format=&#xD;&#xA;  [3]: http://www.shamusyoung.com/twentysidedtale/?p=5134&#xD;&#xA;  [4]: http://www.introversion.co.uk/subversion/&#xD;&#xA;  [5]: http://forums.introversion.co.uk/introversion/viewtopic.php?t=1837&#xD;&#xA;  [6]: http://www.procedural.com/&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Procedural_generation&#xD;&#xA;  [8]: http://pcg.wikidot.com/" />
  <row Id="13608" PostHistoryTypeId="2" PostId="6816" RevisionGUID="4763d689-2fbd-4cfb-ae96-847ff6f2585e" CreationDate="2010-12-26T00:55:07.713" UserId="962" Text="#The Internet#&#xD;&#xA;&#xD;&#xA;Specifically:&#xD;&#xA;&#xD;&#xA;This site as well as the other stackexchange sites for general programming knowledge.&#xD;&#xA;&#xD;&#xA;gamedev.net&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13609" PostHistoryTypeId="2" PostId="6817" RevisionGUID="69e66ee7-0b2b-4f30-8ff7-b08ed7d9d186" CreationDate="2010-12-26T00:59:27.217" UserId="2332" Text="I haven't really used Navigation Meshes extensively yet, but from your reply, since you're only looking at how to generate the nodes and traverse it, I would do it the following way.&#xD;&#xA;&#xD;&#xA;Firstly, to generate the nodes in the navigation graph, I'd iterate through all the quads in the mesh and add them to a graph appropriately.&#xD;&#xA;&#xD;&#xA;E.g.&#xD;&#xA;&#xD;&#xA;    foreach quad in mesh&#xD;&#xA;    {&#xD;&#xA;       add quad to graph&#xD;&#xA;       if quad has neighbouring quads&#xD;&#xA;          add neighbouring quads to the neighbour list of the added quad &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That's a fairly simple brute-force method, but there's probably better methods out there.&#xD;&#xA;&#xD;&#xA;To traverse the created graph simply make use of A* ([A* Algorithm][1]). This will give you a higher level path (a path from quad-to-quad). &#xD;&#xA;&#xD;&#xA;Then to pathfind within each quad you can use a simple steering behaviours towards the next quad or even A* again to find the shortest-path (if you've got obstacles in the way).&#xD;&#xA;&#xD;&#xA;Not sure if that's been explained very well, but it's a very high level look at it.&#xD;&#xA;&#xD;&#xA;Hope it helps.&#xD;&#xA;&#xD;&#xA;Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A_star" />
  <row Id="13610" PostHistoryTypeId="2" PostId="6818" RevisionGUID="be14d8d2-3591-464c-9a15-81016128b438" CreationDate="2010-12-26T01:11:22.187" UserId="2332" Text="Personally, I think this site is best for specific game programming questions that you have. Since learning game development is quite a broad subject, there are plenty of varying opinions on it.&#xD;&#xA;&#xD;&#xA;Firstly, I would start very small. If you know Java, then use it. Don't worry about people saying you need to use C++, there's plenty of time that later. If you're comfortable with AWT or Swing, use it, rather than looking up OpenGL libraries.&#xD;&#xA;&#xD;&#xA;Start by making a simple word game (E.g. Hangman, Word Jumbles, etc). This will give you experience on the fundamentals of game play. Then a tic-tac-toe game, this will introduce you to very basic graphics.&#xD;&#xA;&#xD;&#xA;You can extend on tic-tac-toe to have a computer opponent, which would introduce you to very basic AI (even if the computer just places its piece on random squares)&#xD;&#xA;&#xD;&#xA;Once you've made very some simple games like that, move on to 2D graphics. I'm sure you can find OpenGL wrappers for Java and use that. You could make Pong or (slightly harder) Tetris.&#xD;&#xA;&#xD;&#xA;You could also use C# and XNA for this. C# is very similar to Java and XNA is a fairly all-inclusive API for making both 2D and 3D games.&#xD;&#xA;&#xD;&#xA;Get some books on what you're interested in (Game Coding Complete is a good book that introduces all of the fundamentals you need to make games. Amazon Link: [Game Coding Complete][1]).&#xD;&#xA;&#xD;&#xA;After you're comfortable with 2D, start making simple basic 3D games. It doesn't have to be the next big shooter, or an MMORPG, it could potentially be 3D versions of the 2D games you've already made.&#xD;&#xA;&#xD;&#xA;***DON'T*** get caught up in all this talk of game engines and C++ and don't try and get ahead of yourself. When you're too ambitious when starting out, you end up getting stuck on a problem, get frustrated and give up on it.&#xD;&#xA;&#xD;&#xA;The only way to learn and progress is to keep making games. You can use bits of reusable code in your later projects, but focus on making a playable game before you start refactoring code and optimizing.&#xD;&#xA;&#xD;&#xA;Of course when you do get stuck, you've got sites like this to help and places like [www.gamedev.net][2].&#xD;&#xA;&#xD;&#xA;Woah, that turned out to be a long answer, but I really hope it helps.&#xD;&#xA;&#xD;&#xA;Good luck :)&#xD;&#xA;&#xD;&#xA;Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1293325598&amp;sr=8-1&#xD;&#xA;  [2]: http://www.gamedev.net" />
  <row Id="13611" PostHistoryTypeId="2" PostId="6819" RevisionGUID="6dfc426d-90d4-4edf-b323-ea53ada9a51b" CreationDate="2010-12-26T03:20:23.797" UserId="2696" Text="Take a look at [3D Buzz][1]. When I was just starting out with game development I picked up a copy of their C++ tutorials and learned a lot! Especially their section on OpenGL.&#xD;&#xA;&#xD;&#xA;These days however they have many more training videos available such as XNA and various others. They have a few free videos that I encourage you to check out.&#xD;&#xA;&#xD;&#xA;If you want to continue using JAVA I suggest you take a look at [Slick 2D][2]. I also used this a while back and found it to be really good for developing great 2D games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.3dbuzz.com/vbforum/sv_home.php&#xD;&#xA;  [2]: http://slick.cokeandcode.com/" />
  <row Id="13612" PostHistoryTypeId="2" PostId="6820" RevisionGUID="b1658d52-9fa9-4737-a278-97454c1e7ee4" CreationDate="2010-12-26T06:57:00.473" UserId="4224" Text="I have a sprite that I'm trying to scale up in XNA, but XNA is applying some sort of texture filtering that smooths it and makes it look ugly. I'd like it to just do pixel doubling instead of interpolation. How would I accomplish that?" />
  <row Id="13613" PostHistoryTypeId="1" PostId="6820" RevisionGUID="b1658d52-9fa9-4737-a278-97454c1e7ee4" CreationDate="2010-12-26T06:57:00.473" UserId="4224" Text="How do I disable texture filtering for sprite scaling in XNA 4.0?" />
  <row Id="13614" PostHistoryTypeId="3" PostId="6820" RevisionGUID="b1658d52-9fa9-4737-a278-97454c1e7ee4" CreationDate="2010-12-26T06:57:00.473" UserId="4224" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="13615" PostHistoryTypeId="2" PostId="6821" RevisionGUID="55e93b09-e00e-4ea7-beda-e2f89a00a918" CreationDate="2010-12-26T07:09:42.437" UserId="3198" Text="For starters, you'll want to learn to program in general. Once you know how to write code, you can work on applying ti to games specifically. I would recommend learning C++, some think it's harder to learn than others, but I personally didn't find it too daunting and it is something you will need to be proficient in eventually.&#xD;&#xA;&#xD;&#xA;Personally I learned with this book: [Sams Teach Yourself C++ in 24 Hours][1]. it's in 24 chapters, and you can get through it in a week or two and have a good foundational knowledge of C++.&#xD;&#xA;&#xD;&#xA;Next, I would try to make a game. A small game. Make Pong, Tetris, Tic Tac Toe or something similar. Focus on making a complete game. Try to figure out everything that the game will need, graphics sound, pause menu, controls, etc, and do everything. I wouldn't completely re-invent the wheel, try using an open source library, I think [SDL][2] is great. &#xD;&#xA;A good SDL tutorial can be found [here][3]&#xD;&#xA;&#xD;&#xA;Don't get too ambitious, make something small and simple, and focus on finishing it. Here's the thing, **you will probably do *a lot* of things wrong, that's OK.** Don't worry about getting every little thing right or making it seem professional or polished, just finish it.&#xD;&#xA;&#xD;&#xA;I really think that the best way to learn is to try it yourself and learn from your mistakes (this is why you should make a mall game first). Once you finish you'll have a learned a lot and will have a whole lot of ideas on what to do better next time, so, make another simple game.&#xD;&#xA;&#xD;&#xA;Do that, and you'll start to get a grasp of what it takes and you can go on from there.&#xD;&#xA;&#xD;&#xA;Here's some good resources on the subject:&#xD;&#xA;[Sloperama][4] - good, sound advice, geared more towards the business and design end but stil very helpful.&#xD;&#xA;[gamedev.net][5] - helpful communities, lots of resources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Sams-Teach-Yourself-Hours-Starter/dp/0672326817&#xD;&#xA;  [2]: http://www.libsdl.org/ &quot;SDL&quot;&#xD;&#xA;  [3]: http://www.lazyfoo.net/SDL_tutorials/ &quot;here&quot;&#xD;&#xA;  [4]: http://www.sloperama.com/advice.html &quot;Solid advice, some of it is geared towards the business side, but it's all good.&quot;&#xD;&#xA;  [5]: http://gamedev.net" />
  <row Id="13616" PostHistoryTypeId="2" PostId="6822" RevisionGUID="50e8fa83-4f61-4952-827f-ad9a29a7c9bc" CreationDate="2010-12-26T08:26:46.823" UserId="288" Text="You need to set the sampler state. The default for SpriteBatch is `SamplerState.LinearClamp` (ie: linear interpolation - the smooth/blurry one).&#xD;&#xA;&#xD;&#xA;Choose one of the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritebatch.begin.aspx&quot;&gt;`SpriteBatch.Begin`&lt;/a&gt; calls that takes a `SamplerState` and pass in `SamplerState.PointClamp` (selects the pixel at that precice &quot;point&quot;)." />
  <row Id="13617" PostHistoryTypeId="2" PostId="6823" RevisionGUID="45b56dbd-f70a-40be-98b5-40096be5d688" CreationDate="2010-12-26T11:13:37.633" UserId="493" Text="I don't want to be a downer, but I think that before you have learned game development and built up a portfolio, it doesn't really make much sense trying to think about what country has good game companies, because they will most likely not even look at you without proof of experience.&#xD;&#xA;&#xD;&#xA;As for countries to learn game development, the United States, Canada and Europe have universities or art institutes that provide programs focusing on game development; I don't know any off the top of my head, but you can do a search for them.&#xD;&#xA;&#xD;&#xA;I don't know if you have thought about it, but I wanted to make sure that you are aware that just moving to another country is not that easy. For someone that has had the privilege of studying and working in the U.S. for around 9 years before moving back to my country - Bahrain - there are a few points I wanted you to be aware of:&#xD;&#xA;&#xD;&#xA;1. You need to figure out the Visa situation. You need to figure out what Visa you need to accomplish your objectives and whether you are eligible for it. Work Visa's are hard to come by and might have limitations on attending a college on the side. Also, a Student Visa will NOT allow you to work anywhere except for on campus, which means you will not be making much money; there are some exceptions of course, but are hard to come by. This also means that you can't legally do any freelance work online or off while in a different country. This is based on a U.S. Visa, but I believe that most countries might have similar standards, but you should study up on this.&#xD;&#xA;2. Not all companies will be happy to pay for all the Visa paperwork if they know you are intending to switch careers later. I am pointing this out, because you will most likely not get a job in the game industry right off the bat and will have to work somewhere else while you build up your portfolio to get into a game company.&#xD;&#xA;&#xD;&#xA;Thus, my recommendation would be to start building up your portfolio. If you still want to learn from an educational institution though, I would recommend in no particular order:&#xD;&#xA;&#xD;&#xA;1. Searching for Universities or Art institutes in the U.S, Canada, and Europe&#xD;&#xA;2. Start looking for jobs in those countries and see if you can find anything that suits your experience level. I am assuming that you are looking for mid-level positions, because many companies will not pay for a Visa for entry-level positions.&#xD;&#xA;3. Again, build up your portfolio and practice, practice, and practice. The great thing about development is that you can do this on your own from anywhere in the world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I wish you the best of luck." />
  <row Id="13618" PostHistoryTypeId="2" PostId="6824" RevisionGUID="b9a58c54-af9e-4087-b418-432e666c6a97" CreationDate="2010-12-26T14:31:38.617" UserId="4227" Text="[Minecraft][1] uses 2D Perlin noise to generate outdoor terrain. It can have practically infinite levels (you'd die of old age before you got to the edge) that are generated as players explore. It (probably) also uses 3D Perlin noise to generate underground caves.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://minecraft.net/" />
  <row Id="13619" PostHistoryTypeId="2" PostId="6825" RevisionGUID="c13e9034-a079-4a80-baad-a91099e95301" CreationDate="2010-12-26T15:58:46.753" UserId="4149" Text="I'm new to Game programmming and SDL, and I have been following [Lazyfoo's SDL tutorials][1]. My question is related to time based motion and frame rate based motion, basically which is *better* or *appropriate* depending on situations?. Could you give me an example where each of these methods are used?.&#xD;&#xA;&#xD;&#xA;Another question I have is that, in lazyfoo's two Motion tutorials ([FPS based][2] and [time based][3]) The time based method showed a much smoother animation while the Frame rate based one was a little hiccupy, meaning you could clearly see the gap between the previous location of the dot and its current position when you compare the two programs.&#xD;&#xA;&#xD;&#xA;As beginner which method should I stick to?(all I want is smooth animations). &#xD;&#xA;&#xD;&#xA;  [1]: http://www.lazyfoo.net/SDL_tutorials&#xD;&#xA;  [2]: http://www.lazyfoo.net/SDL_tutorials/lesson16/index.php&#xD;&#xA;  [3]: http://www.lazyfoo.net/SDL_tutorials/lesson32/index.php" />
  <row Id="13620" PostHistoryTypeId="1" PostId="6825" RevisionGUID="c13e9034-a079-4a80-baad-a91099e95301" CreationDate="2010-12-26T15:58:46.753" UserId="4149" Text="Time based movement Vs Frame rate  based movement?" />
  <row Id="13621" PostHistoryTypeId="3" PostId="6825" RevisionGUID="c13e9034-a079-4a80-baad-a91099e95301" CreationDate="2010-12-26T15:58:46.753" UserId="4149" Text="&lt;game-design&gt;&lt;c++&gt;&lt;motion-control&gt;&lt;sdl&gt;" />
  <row Id="13622" PostHistoryTypeId="2" PostId="6826" RevisionGUID="cce99a2e-7769-4205-9222-81845612b74c" CreationDate="2010-12-26T18:03:33.223" UserId="747" Text="Bygfoot is a soccer management game &#xD;&#xA;&#xD;&#xA;http://bygfoot.sourceforge.net/new/about/ &#xD;&#xA;&#xD;&#xA;(does not seem to be very actively developped, though ..)" />
  <row Id="13623" PostHistoryTypeId="2" PostId="6827" RevisionGUID="04208d30-4af6-4154-b29e-b0b3c62855d0" CreationDate="2010-12-26T18:21:28.187" UserId="323" Text="What's being shown as &quot;FPS based&quot; there is . . . well, basically, it's awful. It's pinning the game's speed to the performance of one particular computer. If you upgrade to a nice fast computer, your game will suddenly run in turbo speed, if you downgrade to a slower computer you'll be grinding around in slo-mo.&#xD;&#xA;&#xD;&#xA;The real choice is fixed time step vs. variable time step, and at that point I will defer to [this excellent post][1] which goes into great depth.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="13624" PostHistoryTypeId="2" PostId="6828" RevisionGUID="fa2dd32e-d5ac-42b0-8d00-7d9662f07e81" CreationDate="2010-12-26T21:41:33.763" UserDisplayName="user4233" Text="Well since you're in Brazil I heard there are some good gamedev schools in Argentina&#xD;&#xA;&#xD;&#xA;You could go there, just like some americans go to Canada." />
  <row Id="13625" PostHistoryTypeId="2" PostId="6829" RevisionGUID="089f4e16-a306-400c-8e04-c29745affe18" CreationDate="2010-12-26T22:32:44.570" UserId="4234" Text="I'm new to Farseer and have a simple question. The demos I went through didn't seem to demonstrate what I want. I would like to apply an impulse (not force) to an object at a specific position on that object. How would I go about doing this in code? (I've created the objects already). I'll be using XNA and SL, but I guess the code for this method would be the same. thanks" />
  <row Id="13626" PostHistoryTypeId="1" PostId="6829" RevisionGUID="089f4e16-a306-400c-8e04-c29745affe18" CreationDate="2010-12-26T22:32:44.570" UserId="4234" Text="Farseer - Apply Impulse" />
  <row Id="13627" PostHistoryTypeId="3" PostId="6829" RevisionGUID="089f4e16-a306-400c-8e04-c29745affe18" CreationDate="2010-12-26T22:32:44.570" UserId="4234" Text="&lt;xna&gt;&lt;c#&gt;&lt;physics&gt;&lt;silverlight&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="13628" PostHistoryTypeId="2" PostId="6830" RevisionGUID="02fb9d97-33c9-4300-be49-8ac16d5fa857" CreationDate="2010-12-27T02:12:45.437" UserId="4217" Text="I followed some advices to learn Slick2D and when I started doing the &quot;SimpleGame&quot; I got my first error. Does anyone have any idea of what is it and how to fix?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:Slick Build #274&#xD;&#xA;    Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:LWJGL Version: 2.0b1&#xD;&#xA;    Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:OriginalDisplayMode: 1024 x 768 x 16 @60Hz&#xD;&#xA;    Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:TargetDisplayMode: 800 x 600 x 0 @0Hz&#xD;&#xA;    Sun Dec 26 23:09:12 GMT-03:00 2010 ERROR:Could not find a valid pixel format&#xD;&#xA;    org.lwjgl.LWJGLException: Could not find a valid pixel format&#xD;&#xA;     at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)&#xD;&#xA;     at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)&#xD;&#xA;     at org.lwjgl.opengl.WindowsDisplayPeerInfo.initDC(WindowsDisplayPeerInfo.java:54)&#xD;&#xA;     at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:158)&#xD;&#xA;     at org.lwjgl.opengl.Display.createWindow(Display.java:299)&#xD;&#xA;     at org.lwjgl.opengl.Display.create(Display.java:848)&#xD;&#xA;     at org.lwjgl.opengl.Display.create(Display.java:800)&#xD;&#xA;     at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299)&#xD;&#xA;     at org.newdawn.slick.AppGameContainer.access$000(AppGameContainer.java:34)&#xD;&#xA;     at org.newdawn.slick.AppGameContainer$2.run(AppGameContainer.java:364)&#xD;&#xA;     at java.security.AccessController.doPrivileged(Native Method)&#xD;&#xA;     at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:345)&#xD;&#xA;     at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)&#xD;&#xA;     at SimpleGame.main(SimpleGame.java:38)&#xD;&#xA;    Exception in thread &quot;main&quot; org.newdawn.slick.SlickException: Failed to initialise the LWJGL display&#xD;&#xA;     at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375)&#xD;&#xA;     at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)&#xD;&#xA;     at SimpleGame.main(SimpleGame.java:38)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13629" PostHistoryTypeId="1" PostId="6830" RevisionGUID="02fb9d97-33c9-4300-be49-8ac16d5fa857" CreationDate="2010-12-27T02:12:45.437" UserId="4217" Text="Slick 2D first trial error" />
  <row Id="13630" PostHistoryTypeId="3" PostId="6830" RevisionGUID="02fb9d97-33c9-4300-be49-8ac16d5fa857" CreationDate="2010-12-27T02:12:45.437" UserId="4217" Text="&lt;java&gt;&lt;slick&gt;" />
  <row Id="13631" PostHistoryTypeId="2" PostId="6831" RevisionGUID="507b023f-bb7a-4404-8e07-2bbda862cda4" CreationDate="2010-12-27T03:06:18.693" UserId="2332" Text="I haven't used it, but a quick google search turned up [this thread][1].&#xD;&#xA;&#xD;&#xA;It makes sense since all physics engines, in my experience, give you the ability to apply impulses and/or forces. So look for the ApplyLinearImpulse/ApplyAngularImpulse functions. They enable you to specify points where you apply the impulse.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com/Thread/View.aspx?ThreadId=239605" />
  <row Id="13636" PostHistoryTypeId="2" PostId="6833" RevisionGUID="b4ab0dff-4100-4814-a59c-42755d2f4a55" CreationDate="2010-12-27T08:18:59.357" UserId="3723" Text="IANAL, but the hinting patents have recently [expired][1]. A TrueType implementation, such as [FreeType][2] should be usable with hinting enabled.&#xD;&#xA;&#xD;&#xA;My group has built our own TrueType rasterizer, although I know several teams that are satisfied with the degraded quality found in the distance field technique (largely because they're using simple sans-serif fonts in simple situations such as subtitles and decals).&#xD;&#xA;&#xD;&#xA;All that said, most fonts have crummy auto-generated hints in them. Stick to the major type houses or you'll just be looking at the output of [FontLab][3].&#xD;&#xA;&#xD;&#xA;Although we knew the hinting patents were expiring, we did not implement a bytecode interpreter because we felt that the small sizes where hints are most designed to help shouldn't be used on game consoles, which is what we target.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freetype.org/patents.html&#xD;&#xA;  [2]: http://www.freetype.org&#xD;&#xA;  [3]: http://www.fontlab.com/" />
  <row Id="13637" PostHistoryTypeId="2" PostId="6834" RevisionGUID="a8ea18ab-85c6-465d-805f-99de1f1b7852" CreationDate="2010-12-27T08:25:58.463" UserId="3723" Text="I can only address the PS3.&#xD;&#xA;&#xD;&#xA;The ps3chain and ps3toolchain distros referenced by ps3l1ght are unsuitable for use with Game OS; they do not implement the correct ABI and you will eventually crash as a result.&#xD;&#xA;&#xD;&#xA;AFAIK, there are no working compilers available for PS3 that aren't simply stolen copies of the official SDK." />
  <row Id="13638" PostHistoryTypeId="2" PostId="6835" RevisionGUID="64b4aab5-20a7-4d45-b8a4-b141027688e3" CreationDate="2010-12-27T09:35:02.483" UserId="2933" Text="I'm trying to figure out a way to determine the force two objects collide in.&#xD;&#xA;&#xD;&#xA;I have two vectors defining their linear velocity at the time of impact, their mass and their angular velocity. Keep in mind this is all for a 2D physics engine.&#xD;&#xA;&#xD;&#xA;I don't think it's as simple as adding up these values and figuring out if it's large enogh it makes a large impact since that doesn't take into account if the two objects are travelling in the same direction (as an example).&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="13639" PostHistoryTypeId="1" PostId="6835" RevisionGUID="64b4aab5-20a7-4d45-b8a4-b141027688e3" CreationDate="2010-12-27T09:35:02.483" UserId="2933" Text="Calculating the force of an impact?" />
  <row Id="13640" PostHistoryTypeId="3" PostId="6835" RevisionGUID="64b4aab5-20a7-4d45-b8a4-b141027688e3" CreationDate="2010-12-27T09:35:02.483" UserId="2933" Text="&lt;physics&gt;" />
  <row Id="13641" PostHistoryTypeId="2" PostId="6836" RevisionGUID="d1637f45-21ef-4aac-acc8-a2cf1aa9aa34" CreationDate="2010-12-27T09:44:24.807" UserId="653" Text="High school physics should do the trick here, preserve total energy (unless you want energy to dissipate into friction, heat and deformation) and preserve total momentum, which will give you the result of the impact. Adding rotation to the equation makes it a bit more tricky (although not so much in 2D), preserving angular momentum as well, do you want to go there?&#xD;&#xA;&#xD;&#xA;Actually getting the force which is applied, you need to look at the characteristics of the impact, the most simple assumption is that the force is constant during the impact, in which case, the force is the change in momentum (known as the impulse) divided by the duration of the impact.&#xD;&#xA;&#xD;&#xA;Do you really want to know the applied force (useful for damage models, but rarely for simple physics), or are you just looking to determine final velocities?&#xD;&#xA;" />
  <row Id="13642" PostHistoryTypeId="2" PostId="6837" RevisionGUID="3d8c232b-bc73-425e-a284-955124bd3dc8" CreationDate="2010-12-27T09:50:59.717" UserId="1829" Text="I'm in a private game programming school where there also are 3D art classes; sadly, there seems to be a lot more students in those latter classes, something like 50% or 100% more.&#xD;&#xA;&#xD;&#xA;So I was wondering: in the real video game industry, which of the artist/modeler or the programmer is more likely to be wanted in a company, so who will be paid more ?&#xD;&#xA;&#xD;&#xA;I'm sure there are artists which are obviously paid better than other programmers and I'm sure there are other sorts of jobs in the game industry (sound, management, testers), but I wanted to know if there is a general tendency for one or the other. And sometime I wonder even if an artist can happen to write scripts..." />
  <row Id="13643" PostHistoryTypeId="1" PostId="6837" RevisionGUID="3d8c232b-bc73-425e-a284-955124bd3dc8" CreationDate="2010-12-27T09:50:59.717" UserId="1829" Text="Between a programmer and a artist/modeler, is there a better paid employee in general ?" />
  <row Id="13644" PostHistoryTypeId="3" PostId="6837" RevisionGUID="3d8c232b-bc73-425e-a284-955124bd3dc8" CreationDate="2010-12-27T09:50:59.717" UserId="1829" Text="&lt;game-industry&gt;&lt;jobs&gt;&lt;job-hierarchy&gt;&lt;economy&gt;" />
  <row Id="13645" PostHistoryTypeId="2" PostId="6838" RevisionGUID="ba55848e-b52d-4b20-b1a2-d92b338499f7" CreationDate="2010-12-27T10:00:48.580" UserId="741" Text="In general, programming is the higher paid of the two disciplines - starting wages for artists are almost always below those of coders. This is pretty much because the training required for coding is far more extensive. You can be a working artist with some natural talent and training/experience in how to use the modelling/painting software. But you can't be a working programmer without years of experience learning and doing coding - even the basic starting level of programming needed for games is very high." />
  <row Id="13646" PostHistoryTypeId="2" PostId="6839" RevisionGUID="2c4c4739-13cc-4bc0-96f3-663ad3d29f24" CreationDate="2010-12-27T10:04:02.473" UserId="1829" Text="http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html&#xD;&#xA;&#xD;&#xA;I don't want to be dramatic and all by telling you C++ is the standard in game industry etc and that you will have to learn it one day or another.&#xD;&#xA;&#xD;&#xA;Anyhow, I can't refrain myself from advising you to try pygame. If you want to go and learn C++, SFML is also quite awesome (SDL also is, but is old).&#xD;&#xA;&#xD;&#xA;When you are ready, try irrlicht and/or Ogre.&#xD;&#xA;&#xD;&#xA;You can also try to get efficient with unity 2.6, since it's just javascript and C# and boo (a pythonic language), as it will maybe be supported by google and become a standard 3D game quick developement." />
  <row Id="13647" PostHistoryTypeId="2" PostId="6840" RevisionGUID="efd2c14e-aaee-41fc-b140-a748e5c3fd17" CreationDate="2010-12-27T10:13:18.770" UserId="3644" Text="I'm developing an RTS game and I would like to add sounds to it. My choice has landed on OpenAL. I have plenty of units which from time to time make sounds: fSound.Play(sfx_shoot, location). Sounds often repeat, e.g. when squad of archers shoots arrows, but they are not synced with each other.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;&#xD;&#xA;- What is the common design pattern to play multiple sounds in OpenAL, when some of them are duplicate?&#xD;&#xA;- What are the hardware limitations on sounds count and tricks to overcome them?" />
  <row Id="13648" PostHistoryTypeId="1" PostId="6840" RevisionGUID="efd2c14e-aaee-41fc-b140-a748e5c3fd17" CreationDate="2010-12-27T10:13:18.770" UserId="3644" Text="How to play many sounds at once in OpenAL" />
  <row Id="13649" PostHistoryTypeId="3" PostId="6840" RevisionGUID="efd2c14e-aaee-41fc-b140-a748e5c3fd17" CreationDate="2010-12-27T10:13:18.770" UserId="3644" Text="&lt;design-patterns&gt;&lt;openal&gt;" />
  <row Id="13650" PostHistoryTypeId="2" PostId="6841" RevisionGUID="df404012-84b8-4b2d-bec8-1b7ce508062b" CreationDate="2010-12-27T10:16:36.610" UserId="3599" Text="It's true, programmers tend to be better paid. (I'm a game artist that worked for 4 game companies) .But I highly disagree with above poster. We're talking about a professional programmer and so, also about a professional artist. Ok, then just drawing well requires a ton of years. I mean, just draw correctly with good anatomy and proportions, solid perspective, good control of lighting, composition, etc. This requires a career, usually(and many extra years on your own, and even so, many don't reach the level). Be it Fine Arts, or what is being done in USA and Canada, special institutes to prepare ppl to do concept art and have the needed base for modeling characters of the high realism you see in any high end game. (millions of polygon detail is not all, that all is hyper realistic, does not come free)&#xD;&#xA;&#xD;&#xA;Let alone the fact that that &quot;modelling software&quot; training is huge in years. Master Uv Mapping, high end modeling, texturing, GUI work, pixel art, etc,etc. (I'm proficient in all this) Animation in its own is a very hard career, and I can tell how few _good_ animators are out there, that can animate really well, at the needed quality.&#xD;&#xA;&#xD;&#xA;But it always keeps floating this wrong concept saying that salaries are ok so because programing (extremely hard, too) is harder. I have known of the years and preparation needed of way too many staff mates, and man, compared with my close to 30 years of real preparation, is at least, on pair...&#xD;&#xA;&#xD;&#xA;IMHO is just a market reason, a matter of how many are out there, and certain historical reasons.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13651" PostHistoryTypeId="5" PostId="6790" RevisionGUID="2258b933-f984-491f-88de-ebf178cfe2a7" CreationDate="2010-12-27T10:19:01.430" UserId="741" Comment="Refined the triangle-triangle description, and included the missing case (edge on A is closest to line on B); edited body" Text="In the absence of further clarification on what the restrictions are, I'm going to assume two meshes that are basically polygon soup (a set of triangles, possibly unconnected).&#xD;&#xA;&#xD;&#xA;You're basically doing n*m triangle to triangle collisions (where n is the number of triangles in object A, m the number in object B). The easiest way is to simply do a brute force closest-point-between-two-triangles for every pairing of triangles. So check triangle 0 in object A against triangle 0 in B, then 1 in B, 2, etc.&#xD;&#xA;&#xD;&#xA;Triangle to triangle checks are pretty straightforward, if you have the RTC book mentioned you probably have a better algorithm already. But basically you only have three cases&#xD;&#xA;&#xD;&#xA; 1. the two triangles are parallel (in which case any point on the triangle is equally close to the other triangle)&#xD;&#xA; 2. an edge on one triangle is parallel to a line which crosses the triangle. So you can find two lines of equal length, one contained in the first triangle, one in the second. As those lines are parallel to each other, every point along those lines is equally close to the equivalent point on the other triangle.&#xD;&#xA; 3. a single vertex of one triangle is closest to some point on the plane inside the other triangle.&#xD;&#xA;&#xD;&#xA;The 3rd case is just a closest-point-on-triangle-to-point, for which you project the point onto the plane of the triangle (i.e. find the closest point to your target on the plane which contains the triangle), and then constrain it to be within the triangle. If the projected point is within the triangle, then you have your closest point, otherwise you now have 3 closest-point-on-line-to-point problems, which you can solve with dot products (and pick the smallest of the three solutions).&#xD;&#xA;&#xD;&#xA;Again you can brute force the triangle-triangle check, by iterating every vertex in triangle X and doing a closest-point-to-triangle check against triangle Y; then iterating every vertex in Y and doing a closest-point-to-triangle check against X. Now for each vertex you have a distance to the other triangle. If you have one vertex which is strictly closer than all the others, you're in case 3, and you're done. If you have two vertices *on the same triangle* equally close to the other triangle, you're in case two. If all three verts of one triangle are equally close to the other, you're in case 1.&#xD;&#xA;&#xD;&#xA;In terms of optimisations / early outs, you need to find a cheaper way of testing two triangles for rough closeness, so that you can discard all but the few potential options. I think you could probably get a lot from AABB checking. E.g.:&#xD;&#xA;&#xD;&#xA; - for each triangle calculate the AABB&#xD;&#xA; - for each triangle pairing (n * m), calculate the distance between the two closest parts of the AABB, and the two furthest parts (separating axis makes this fairly cheap).&#xD;&#xA; - Now you know that for those two triangles, the closest point is somewhere in between those two distances.&#xD;&#xA; - Find the pairing with the smallest minimum distance ([min], [max]). From that pairing you know that you have a closest point which is at most [max] distance away, and so you can eliminate all other pairings which have a minimum distance further away than [max], because even at its best, the pairing is worse than the one you already have." />
  <row Id="13652" PostHistoryTypeId="5" PostId="6841" RevisionGUID="691eb372-f7ac-4ba4-976f-a1c2849ff8a0" CreationDate="2010-12-27T10:40:42.120" UserId="3599" Comment="added 107 characters in body" Text="It's true, programmers tend to be better paid. (I'm a game artist that worked for 4 game companies) .But I highly disagree with above poster. We're talking about a professional programmer and so, also about a professional artist. Ok, then just drawing well requires a ton of years. I mean, just draw correctly with good anatomy and proportions, solid perspective, good control of lighting, composition, etc. This requires a career, usually(and many extra years on your own, and even so, many don't reach the level). Be it Fine Arts, or what is being done in USA and Canada, special institutes to prepare ppl to do concept art and have the needed base for modeling characters of the high realism you see in any high end game. (millions of polygons for detail is not all, there's needed a lot of knowledge and techniques behind, that all is hyper realistic, does not come free, and only a few artists get it right)&#xD;&#xA;&#xD;&#xA;Let alone the fact that the &quot;modelling software&quot; training is huge in years. Master Uv Mapping, high end modeling, texturing, shaders, GUI work, pixel art, etc,etc. (I'm proficient in all this) Animation in its own is a very hard career, and I can tell how few _good_ animators are out there, that can animate really well, at the needed quality.&#xD;&#xA;&#xD;&#xA;But it always keeps floating this wrong concept saying that salaries are ok so because programing (extremely hard, too) is harder. I have known of the years and preparation needed of way too many staff mates, and man, compared with my close to 30 years of real preparation, is at least, on pair...&#xD;&#xA;&#xD;&#xA;IMHO is just a market reason, a matter of how many are out there, and certain historical reasons.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13653" PostHistoryTypeId="2" PostId="6842" RevisionGUID="cf1516af-2782-4ba0-87ad-f2966047673c" CreationDate="2010-12-27T10:52:09.290" UserId="2239" Text="Generally a lot more people wants to be graphics artists, so there's a whole lot more competition and the wages (around here) are way below programmer wages, likely for that reason.&#xD;&#xA;&#xD;&#xA;Not that any of the two would be more demanding or would take longer to master than the other though, it's just a matter of high/low demand and many graphics artists are so dedicated to their calling that they will enter the industry at very low wages. Programmers (again here) get to cherry pick employers because there aren't enough (regardless of their skill level).&#xD;&#xA;&#xD;&#xA;If you're a content creator or animator, scripting will be a natural part of your toolset. Just about any work done with computers require scripting at some level, salary men use VBA in Excel and so on ;)" />
  <row Id="13654" PostHistoryTypeId="5" PostId="6838" RevisionGUID="72dd8f9c-d276-467f-aea5-fa03472567da" CreationDate="2010-12-27T10:53:56.970" UserId="741" Comment="Removed flimsily justified reasons" Text="In general, programming is the higher paid of the two disciplines - starting wages for artists are almost always below those of coders. " />
  <row Id="13655" PostHistoryTypeId="5" PostId="6841" RevisionGUID="c2c5802a-d58c-4ed0-9b70-b32c07a87148" CreationDate="2010-12-27T10:55:43.660" UserId="3599" Comment="added 568 characters in body; added 33 characters in body; deleted 1 characters in body" Text="It's true, programmers tend to be better paid. (I'm a game artist that worked for 4 game companies) .But I highly disagree with above poster. We're talking about a professional programmer and so, also about a professional artist. Ok, then just drawing well requires a ton of years. I mean, just draw correctly with good anatomy and proportions, solid perspective, good control of lighting, composition, etc. This requires a career, usually(and many extra years on your own, and even so, many don't reach the level). Be it Fine Arts, or what is being done in USA and Canada, special institutes to prepare ppl to do concept art and have the needed base for modeling characters of the high realism you see in any high end game. (millions of polygons for detail is not all, there's needed a lot of knowledge and techniques behind, that all is hyper realistic, does not come free, and only a few artists get it right)&#xD;&#xA;&#xD;&#xA;Let alone the fact that the &quot;modelling software&quot; training is huge in years. Master Uv Mapping, high end modeling, texturing, shaders, GUI work, pixel art, etc,etc. (I'm proficient in all this) Animation in its own is a very hard career, and I can tell how few _good_ animators are out there, that can animate really well, at the needed quality.&#xD;&#xA;&#xD;&#xA;But it always keeps floating this wrong concept saying that salaries are ok so because programing (extremely hard, too) is harder. I have known of the years and preparation needed of way too many staff mates, and man, compared with my close to 30 years of real preparation, is at least, on pair...&#xD;&#xA;&#xD;&#xA;IMHO is just a market reason, a matter of how many are out there, and certain historical reasons.&#xD;&#xA;&#xD;&#xA;Edit: And btw, you mention musicians, they are even paid worse than artists. And again, is not a matter of they had _less_ preparation. Again, is market reasons, number of ppl into it, etc. And to your question: &quot;And sometime I wonder even if an artist can happen to write scripts...&quot;  I am a game artist, today a corporate designer, and yep, I have code scripts, VB, html/css, some action script, some python... A practical advice would be: become a programmer, as the market needs more them, as there might be fewer programmers into games (and yes, an incredible amount of knowledge is required).&#xD;&#xA;" />
  <row Id="13656" PostHistoryTypeId="5" PostId="6841" RevisionGUID="0869fa72-b792-4414-a263-ec4a0aa79b0d" CreationDate="2010-12-27T11:01:04.357" UserId="3599" Comment="added 1 characters in body" Text="It's true, programmers tend to be better paid. (I'm a game artist that worked for 4 game companies) .But I highly disagree with above poster. We're talking about a professional programmer and so, also about a professional artist. Ok, then just drawing well requires a ton of years. I mean, just draw correctly with good anatomy and proportions, solid perspective, good control of lighting, composition, etc. This requires a career, usually(and many extra years on your own, and even so, many don't reach the level). Be it Fine Arts, or what is being done in USA and Canada, special institutes to prepare ppl to do concept art and have the needed base for modeling characters of the high realism you see in any high end game. (millions of polygons for detail is not all, there's needed a lot of knowledge and techniques behind, that all is hyper realistic, does not come free, and only a few artists get it right)&#xD;&#xA;&#xD;&#xA;Let alone the fact that the &quot;modelling software&quot; training is huge in years. Master Uv Mapping, high end modeling, texturing, shaders, GUI work, pixel art, etc,etc. (I'm proficient in all this) Animation in its own is a very hard career, and I can tell how few _good_ animators are out there, that can animate really well, at the needed quality.&#xD;&#xA;&#xD;&#xA;But it always keeps floating this wrong concept saying that salaries are ok so because programing (extremely hard, too) is harder. I have known of the years and preparation needed of way too many staff mates, and man, compared with my close to 30 years of real preparation, is at least, on pair...&#xD;&#xA;&#xD;&#xA;IMHO is just a market reason, a matter of how many are out there, and certain historical reasons.&#xD;&#xA;&#xD;&#xA;Edit: And btw, you mention musicians, they are even paid worse than artists. And again, is not a matter of they had _less_ preparation. Again, is market reasons, number of ppl into it, etc. And to your question: &quot;And sometime I wonder even if an artist can happen to write scripts...&quot;  I am a game artist, today a corporate designer, and yep, I have coded scripts, VB, html/css, some action script, some python... A practical advice would be: become a programmer, as the market needs more them, as there might be fewer programmers into games (and yes, an incredible amount of knowledge is required).&#xD;&#xA;" />
  <row Id="13657" PostHistoryTypeId="4" PostId="6837" RevisionGUID="3ef54f06-b3a5-4599-b2f6-955482c9ecb9" CreationDate="2010-12-27T11:04:58.737" UserId="744" Comment="edited title; edited tags" Text="In general, are programmers or artists paid better?" />
  <row Id="13658" PostHistoryTypeId="6" PostId="6837" RevisionGUID="3ef54f06-b3a5-4599-b2f6-955482c9ecb9" CreationDate="2010-12-27T11:04:58.737" UserId="744" Comment="edited title; edited tags" Text="&lt;game-industry&gt;&lt;hiring&gt;&lt;human-resources&gt;" />
  <row Id="13659" PostHistoryTypeId="2" PostId="6843" RevisionGUID="46d183f6-4480-451d-a2ba-b52e418d3119" CreationDate="2010-12-27T11:14:35.057" UserId="744" Text="Every year, Game Developer Magazine puts together a report of average salaries and other metrics concerning game development budgets, remuneration, and hiring.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://gamedeveloperresearch.com/2010-salary-survey.htm&quot;&gt;You can buy the full 2005-2010 report&lt;/a&gt;, although it is quite expensive, since it's targeted at research institutions. A cheaper option would be to &lt;a href=&quot;https://store.cmpgame.com/product/5624/Game-Developer-April-2010-Issue---Digital-Edition&amp;skin=gdmag&quot;&gt;buy the summary in the April 2010 magazine&lt;/a&gt; for $4, or &lt;a href=&quot;http://www.gamasutra.com/view/news/27938/2009_Game_Developer_Salary_Survey_Sees_US_Average_Dip_4_Percent.php&quot;&gt;the summarized summary on Gamasutra's website&lt;/a&gt;, for $0. (However, to compare entry-level versus mean, you'll need to get at least the $4 version.)&#xD;&#xA;&#xD;&#xA;&gt; - Programming: Programmers are among the highest paid talent in the mainstream game industry, with an average annual salary of $80,320. Experience pays in this technical role, particularly when jobs are more rare--programmers with more than six years of experience earned an incredible 36% more than the average annual salary in 2009.&#xD;&#xA;&#xD;&#xA;&gt; - Art &amp; Animation: Unlike those in most disciplines, artists saw a slight average salary increase this year to $71,071, up a modest 2% as more artists reported pay increases than those in any other creative field." />
  <row Id="13661" PostHistoryTypeId="2" PostId="6844" RevisionGUID="9f90e8f4-b637-430d-abbc-628c3286fdb0" CreationDate="2010-12-27T12:54:59.573" UserId="1386" Text="For every sound you'll have a buffer. Multiple sources can reference the same buffer.&#xD;&#xA;&#xD;&#xA;So for example you'd have a buffer that was loaded from 'archerShot.wav' and all the archers can reference this.&#xD;&#xA;&#xD;&#xA;In terms of design patterns there's a variety of solutions.&#xD;&#xA;One is the [Publisher/subscriber pattern (wikipedia)][1]. The individual game objects can contain a sound enumeration variable (that can represent a variety of sounds) which would be picked up by the sound system and played after every frame. The advantage of doing it this way is that the sound system is not coupled to the entities - just like how you can separate the rendering of an entity from its logic.&#xD;&#xA;&#xD;&#xA;[This link][2] may be of use (a thread on gamedev.net forums).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Publish/subscribe&#xD;&#xA;  [2]: http://www.gamedev.net/community/forums/topic.asp?topic_id=586136" />
  <row Id="13662" PostHistoryTypeId="5" PostId="6844" RevisionGUID="092b2e65-da95-4852-b618-75d678d66e86" CreationDate="2010-12-27T13:07:07.990" UserId="1386" Comment="Added details on hardware limitations." Text="For every sound you'll have a buffer. Multiple sources can reference the same buffer.&#xD;&#xA;&#xD;&#xA;So for example you'd have a buffer that was loaded from 'archerShot.wav' and all the archers can reference this.&#xD;&#xA;&#xD;&#xA;In terms of design patterns there's a variety of solutions.&#xD;&#xA;One is the [Publisher/subscriber pattern (wikipedia)][1]. The individual game objects can contain a sound enumeration variable (that can represent a variety of sounds) which would be picked up by the sound system and played after every frame. The advantage of doing it this way is that the sound system is not coupled to the entities - just like how you can separate the rendering of an entity from its logic.&#xD;&#xA;&#xD;&#xA;[This link][2] may be of use (a thread on gamedev.net forums).&#xD;&#xA;&#xD;&#xA;Hardware Limitations:&#xD;&#xA;This is very dependant on your target hardware and I don't think there is a general answer. The iPad and iPhone can only play one compressed buffer at a time. If you allow the users to play their music on the device this means you can't rely on being able to play any compressed sound buffers.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Publish/subscribe&#xD;&#xA;  [2]: http://www.gamedev.net/community/forums/topic.asp?topic_id=586136" />
  <row Id="13666" PostHistoryTypeId="2" PostId="6846" RevisionGUID="2ef8f9c9-7630-48b4-a3dc-3604316532d5" CreationDate="2010-12-27T14:32:26.983" UserId="744" Text="I am totally unfamiliar with Slick2D, but it looks like you're requesting a 800x600 fullscreen resolution when your monitor / video card only supports 1024x768." />
  <row Id="13667" PostHistoryTypeId="2" PostId="6847" RevisionGUID="cca138ac-eff7-4c65-aa17-4c5b167eed37" CreationDate="2010-12-27T16:00:35.427" UserId="493" Text="Did a quick Bing search and got the following [forum post][1] and [another one][2]. Note that the problem is `Failed to initialise the LWJGL display` and according to both forums this could be fixed by adding the following line: &#xD;&#xA;&#xD;&#xA;    -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true&#xD;&#xA;&#xD;&#xA;to the `VM Arguments` of your IDE. I am not a Java developer, so I am not sure if this is the best way to do this.&#xD;&#xA;&#xD;&#xA;  [1]: http://lwjgl.org/forum/index.php/topic,2888.0.html&#xD;&#xA;  [2]: http://slick.javaunlimited.net/viewtopic.php?t=1674" />
  <row Id="13670" PostHistoryTypeId="2" PostId="6849" RevisionGUID="df1e6260-2528-4ceb-bbb7-a20ef04dcbcf" CreationDate="2010-12-27T18:59:35.917" UserDisplayName="en1gmatic325" Text="You will want to open your worldbuilder save file, which by default is in  YourInstallDirectory\Sid Meiers Civilization IV\PublicMaps\ &#xD;&#xA;&#xD;&#xA;Open it with notepad or a similar program. You will probably want to set it to &#xD;&#xA;&#xD;&#xA;Era=ERA_RENAISSANCE&#xD;&#xA;&#xD;&#xA;For Calendar=: &quot;The Calendar setting is used to determine the length in time of &#xD;&#xA;each turn in the scenario.  By default the calendar is set to default which &#xD;&#xA;means the scenario will use the same turn length time as the normal game. &#xD;&#xA;Valid options include CALENDAR_YEARS (each turn is one year), &#xD;&#xA;CALENDAR_SEASONS (each turn is one season: Winter, Spring, &#xD;&#xA;Summer, Autumn), CALENDAR_MONTHS (each turn is one month) &#xD;&#xA;and CALENDAR_WEEKS (each turn is one week, with four weeks to the &#xD;&#xA;month).&quot;&#xD;&#xA;&#xD;&#xA;More information can be found here:&#xD;&#xA;http://forums.civfanatics.com/showthread.php?t=132800&#xD;&#xA;" />
  <row Id="13671" PostHistoryTypeId="2" PostId="6848" RevisionGUID="28d31556-165a-4338-942b-941953b543e9" CreationDate="2010-12-27T09:45:52.140" UserId="4247" Text="In Civilization 4 (Beyond the Sword) I started making a scenario that focuses on the colonization of North America. For added realism, I set the `StartYear=1780`.  &#xD;&#xA;Everytime I run the scenario, the time runs up far too quickly–probably because I set `Era=ERA_ANCIENT` and `GameTurn=0`–so that after just twenty turns the clock nears present day.&#xD;&#xA;&#xD;&#xA;I'm not really sure how to go fix this, other than by playing an actual marathon game from the start up to the year 1780 and copy over the values.  &#xD;&#xA;&#xD;&#xA;Is there any way to calculate/know the right values for my scenario?" />
  <row Id="13672" PostHistoryTypeId="1" PostId="6848" RevisionGUID="28d31556-165a-4338-942b-941953b543e9" CreationDate="2010-12-27T09:45:52.140" UserId="4247" Text="Civilization 4: time in own scenario runs up too quickly." />
  <row Id="13673" PostHistoryTypeId="3" PostId="6848" RevisionGUID="28d31556-165a-4338-942b-941953b543e9" CreationDate="2010-12-27T09:45:52.140" UserId="4247" Text="&lt;untagged&gt;" />
  <row Id="13674" PostHistoryTypeId="17" PostId="6848" RevisionGUID="c6ec6dfc-8619-4ee4-9c9e-cf64a79ecd0b" CreationDate="2010-12-27T19:12:57.783" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/13417/civilization-4-time-in-own-scenario-runs-up-too-quickly" Text="" />
  <row Id="13675" PostHistoryTypeId="2" PostId="6850" RevisionGUID="05365848-6303-4643-b6b2-4775d16c1699" CreationDate="2010-12-27T19:56:01.400" UserId="4248" Text="In Age of Mythology and some other strategy games, when you select multiple units and order them to move to some place, they make a &quot;group&quot; when they reach the desired location:&#xD;&#xA;&#xD;&#xA;![Group][1]&#xD;&#xA;&#xD;&#xA;I have a Vector with several sprites, which are the selected units, the variables `tarX` and `tarY` are the target x and y. I just want an example, so you can just set the x and y position and I can adapt it to my code. Also, I would like to ask that the algorithm calls &quot;isWalkable&quot; for the x and y position, to determine if it's a valid position for each unit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/aIbzU.jpg" />
  <row Id="13676" PostHistoryTypeId="1" PostId="6850" RevisionGUID="05365848-6303-4643-b6b2-4775d16c1699" CreationDate="2010-12-27T19:56:01.400" UserId="4248" Text="Algorithm to make groups of units" />
  <row Id="13677" PostHistoryTypeId="3" PostId="6850" RevisionGUID="05365848-6303-4643-b6b2-4775d16c1699" CreationDate="2010-12-27T19:56:01.400" UserId="4248" Text="&lt;actionscript-3&gt;" />
  <row Id="13678" PostHistoryTypeId="6" PostId="6850" RevisionGUID="32700947-fdc4-4c3c-ab82-1ac8a709e244" CreationDate="2010-12-27T20:25:43.157" UserId="1156" Comment="edited tags" Text="&lt;algorithm&gt;&lt;actionscript-3&gt;" />
  <row Id="13679" PostHistoryTypeId="6" PostId="6850" RevisionGUID="1f76032e-c43e-4f66-ac13-c70c9e597a02" CreationDate="2010-12-27T20:34:09.883" UserId="962" Comment="edited tags" Text="&lt;algorithm&gt;&lt;actionscript-3&gt;&lt;strategy&gt;" />
  <row Id="13680" PostHistoryTypeId="2" PostId="6851" RevisionGUID="41e00b6b-f6be-4d17-a275-aad463e50515" CreationDate="2010-12-27T20:51:13.607" UserId="2332" Text="What you're looking for is basically coordinated movement. The units pathfind to their destination and when they reach it, they form a &quot;formation&quot;.&#xD;&#xA;&#xD;&#xA;This is a topic decently covered in the AI Game Programming Wisdom ([Book 1][1], [Book 2][2], [Book 3][3] and [Book 4][4]) books. But, I'll refer you to the following articles:&#xD;&#xA;&#xD;&#xA;[Coordinated Movement][5] - A link explaining the fundamental principles of coordinated unit movement in RTS games&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;[Implementing Coordinated Movement][6] - An article continuing from the first, that talks about how to implement this type of movement in a game.&#xD;&#xA;&#xD;&#xA;It's written in C++ but it shouldn't be too difficult to port to any other language, as the underlying principles remain the same.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/AI-Game-Programming-Wisdom-CD/dp/1584500778/ref=sr_1_1?ie=UTF8&amp;qid=1293482927&amp;sr=8-1&#xD;&#xA;  [2]:http://www.amazon.co.uk/AI-Game-Programming-Wisdom-CD/dp/1584502894/ref=sr_1_3?ie=UTF8&amp;qid=1293482927&amp;sr=8-3&#xD;&#xA;  [3]: http://www.amazon.co.uk/AI-Game-Programming-Wisdom-CD/dp/1584504579/ref=sr_1_4?ie=UTF8&amp;qid=1293482927&amp;sr=8-4&#xD;&#xA;  [4]: http://www.amazon.co.uk/AI-Game-Programming-Wisdom-CD/dp/1584505230/ref=sr_1_2?ie=UTF8&amp;qid=1293482927&amp;sr=8-2&#xD;&#xA;  [5]: http://www.gamasutra.com/view/feature/3313/coordinated_unit_movement.php&#xD;&#xA;  [6]: http://www.gamasutra.com/view/feature/3314/implementing_coordinated_movement.php" />
  <row Id="13681" PostHistoryTypeId="2" PostId="6852" RevisionGUID="81b86aa8-80a9-46a4-8b0e-89ce93321b61" CreationDate="2010-12-27T21:03:42.697" UserDisplayName="flashCoder" Text="I have question for all flash game developers:&#xD;&#xA;Do you know how can I use mochi leader boards with flashdevelop ? I paste code from that generate, but instead of see leaderboard, I see nothing, only in status bar information about reveicing data from gameplay.mochimedia.com ." />
  <row Id="13682" PostHistoryTypeId="1" PostId="6852" RevisionGUID="81b86aa8-80a9-46a4-8b0e-89ce93321b61" CreationDate="2010-12-27T21:03:42.697" UserDisplayName="flashCoder" Text="Mochi leaderboards with flashdevelop" />
  <row Id="13683" PostHistoryTypeId="3" PostId="6852" RevisionGUID="81b86aa8-80a9-46a4-8b0e-89ce93321b61" CreationDate="2010-12-27T21:03:42.697" UserDisplayName="flashCoder" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;flash-develop&gt;&lt;flashdevelop&gt;" />
  <row Id="13684" PostHistoryTypeId="2" PostId="6853" RevisionGUID="6474c830-94fa-4413-b11c-d0d6070d7ad2" CreationDate="2010-12-27T21:21:49.873" UserId="2469" Text="I'm trying to render a smooth terrain with Direct3D. I've got a 50*50 grid with all y values = 0, and a set of 3D points that indicate the location on the grid and depth or height of the &quot;valley&quot; or &quot;hill&quot;.&#xD;&#xA;I need to make the y values of the grid vertices higher or lower depending on how close they are to each 3D point. Thus, in the end I should have a smooth terrain renderer.&#xD;&#xA;&#xD;&#xA;I'm not sure at all what way I can do this. I've tried changing the height of the vertices based on the distance to each point just using this basic formula:&#xD;&#xA;&#xD;&#xA;    dist = a² + b² + c²&#xD;&#xA;where a, b and c are the x, y, and z distance from a vertex to a 3D point.&#xD;&#xA;The result I get with this is not smooth at all.&#xD;&#xA;&#xD;&#xA;I'm thinking there is probably a better way.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="13685" PostHistoryTypeId="1" PostId="6853" RevisionGUID="6474c830-94fa-4413-b11c-d0d6070d7ad2" CreationDate="2010-12-27T21:21:49.873" UserId="2469" Text="Smooth terrain rendering" />
  <row Id="13686" PostHistoryTypeId="3" PostId="6853" RevisionGUID="6474c830-94fa-4413-b11c-d0d6070d7ad2" CreationDate="2010-12-27T21:21:49.873" UserId="2469" Text="&lt;c++&gt;&lt;directx&gt;&lt;terrain-rendering&gt;" />
  <row Id="13687" PostHistoryTypeId="6" PostId="6852" RevisionGUID="64ee2af9-b6ff-4b6e-8c2f-fcc4c585cbaa" CreationDate="2010-12-27T21:25:22.920" UserId="1156" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;flashdevelop&gt;" />
  <row Id="13688" PostHistoryTypeId="5" PostId="6853" RevisionGUID="f3056102-1f28-41b2-8774-4adf51029ee4" CreationDate="2010-12-27T21:30:05.207" UserId="14" Comment="Salutations aren't necessary here." Text="I'm trying to render a smooth terrain with Direct3D. I've got a 50*50 grid with all y values = 0, and a set of 3D points that indicate the location on the grid and depth or height of the &quot;valley&quot; or &quot;hill&quot;.&#xD;&#xA;I need to make the y values of the grid vertices higher or lower depending on how close they are to each 3D point. Thus, in the end I should have a smooth terrain renderer.&#xD;&#xA;&#xD;&#xA;I'm not sure at all what way I can do this. I've tried changing the height of the vertices based on the distance to each point just using this basic formula:&#xD;&#xA;&#xD;&#xA;    dist = a² + b² + c²&#xD;&#xA;where a, b and c are the x, y, and z distance from a vertex to a 3D point.&#xD;&#xA;The result I get with this is not smooth at all.&#xD;&#xA;&#xD;&#xA;I'm thinking there is probably a better way." />
  <row Id="13689" PostHistoryTypeId="2" PostId="6854" RevisionGUID="f8281998-4b20-4448-9987-6611a43798e5" CreationDate="2010-12-27T23:34:47.293" UserId="154" Text="Is there something special about these 3D points because it sounds like you are just trying to render a heightmap. Doing a bunch of distance calculations to an arbitrary number of 3D points is not the best way of doing that.&#xD;&#xA;&#xD;&#xA;Here is a simple [DX9 tutorial][1] on rendering a heightmap.&#xD;&#xA;&#xD;&#xA;The basic concept is that you have a 2D image that represents displacement. So the pixel (X,Y) location corresponds to a vertex (X,Z) and the color of the pixel represents a height value (Y) for the vertex.&#xD;&#xA;&#xD;&#xA;The nice part about using an image is that it's very intuitive for the developer to visually create and or modify the terrain. &#xD;&#xA;&#xD;&#xA;[1]: http://www.chadvernon.com/blog/resources/directx9/terrain-generation-with-a-heightmap/" />
  <row Id="13690" PostHistoryTypeId="5" PostId="6853" RevisionGUID="2a7df6c2-ab0a-49c4-b2b6-7fd9e92f0cd3" CreationDate="2010-12-27T23:42:49.780" UserId="2469" Comment="added 103 characters in body" Text="I'm trying to render a smooth terrain with Direct3D. I've got a 50*50 grid with all y values = 0, and a set of 3D points that indicate the location on the grid and depth or height of the &quot;valley&quot; or &quot;hill&quot;.&#xD;&#xA;I need to make the y values of the grid vertices higher or lower depending on how close they are to each 3D point. Thus, in the end I should have a smooth terrain renderer.&#xD;&#xA;&#xD;&#xA;I'm not sure at all what way I can do this. I've tried changing the height of the vertices based on the distance to each point just using this basic formula:&#xD;&#xA;&#xD;&#xA;    dist = a² + b² + c²&#xD;&#xA;where a, b and c are the x, y, and z distance from a vertex to a 3D point.&#xD;&#xA;The result I get with this is not smooth at all.&#xD;&#xA;&#xD;&#xA;I'm thinking there is probably a better way.&#xD;&#xA;&#xD;&#xA;Here is a screenshot of what I've got for the moment:&#xD;&#xA;https://dl.dropbox.com/u/2562049/terrain.jpg" />
  <row Id="13691" PostHistoryTypeId="2" PostId="6855" RevisionGUID="a4d1aa18-deb8-4c8b-8180-26d313cae7bc" CreationDate="2010-12-28T00:39:17.523" UserId="849" Text="I'm wondering how to achieve a neon-light type effect. For example, in [Pac-Man Chamipnship Edition][1]:&#xD;&#xA;&#xD;&#xA;![PacMan CE][2]&#xD;&#xA;&#xD;&#xA;Or in [Geometry Wars][3]:&#xD;&#xA;&#xD;&#xA;![Geometry Wars][4]&#xD;&#xA;&#xD;&#xA;Is that a Bloom Effect? Or what techniques would I have to look for?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=fUHZj-PGjk4&#xD;&#xA;  [2]: http://i.stack.imgur.com/Jn39S.jpg&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=pv-sJxv5uMs&amp;hd=1&#xD;&#xA;  [4]: http://i.stack.imgur.com/chmEr.jpg" />
  <row Id="13692" PostHistoryTypeId="1" PostId="6855" RevisionGUID="a4d1aa18-deb8-4c8b-8180-26d313cae7bc" CreationDate="2010-12-28T00:39:17.523" UserId="849" Text="How to achieve a Neon-Light effect?" />
  <row Id="13693" PostHistoryTypeId="3" PostId="6855" RevisionGUID="a4d1aa18-deb8-4c8b-8180-26d313cae7bc" CreationDate="2010-12-28T00:39:17.523" UserId="849" Text="&lt;3d&gt;&lt;graphic-effects&gt;&lt;special-effects&gt;&lt;bloom&gt;" />
  <row Id="13694" PostHistoryTypeId="2" PostId="6856" RevisionGUID="4b4bf44c-d24c-47b4-b921-f8788458dcf9" CreationDate="2010-12-28T00:51:30.840" UserId="2332" Text="Here you go :)&#xD;&#xA;&#xD;&#xA;[GPU Gems - Glow Effect][1]&#xD;&#xA;&#xD;&#xA;With that many entities with a glowing effect on the screen (especially in Geometry Wars), it's more often than not a shader effect that's similar to the shader described in that paper.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems/gpugems_ch21.html" />
  <row Id="13695" PostHistoryTypeId="2" PostId="6857" RevisionGUID="9f54f3f3-24d5-4e86-b254-de1ceb231875" CreationDate="2010-12-28T01:04:07.577" UserId="4210" Text="Are cyclic dependencies a common thing in games dev? I ask as I keep getting into situation where I'm using and have been told more than once that they should be avoided.&#xD;&#xA;&#xD;&#xA;I am wondering if this is just a what people say as a general rule of thumb in the software development business. and that the nature of game programming produces such dependencies." />
  <row Id="13696" PostHistoryTypeId="1" PostId="6857" RevisionGUID="9f54f3f3-24d5-4e86-b254-de1ceb231875" CreationDate="2010-12-28T01:04:07.577" UserId="4210" Text="Cyclic Dependencies. " />
  <row Id="13697" PostHistoryTypeId="3" PostId="6857" RevisionGUID="9f54f3f3-24d5-4e86-b254-de1ceb231875" CreationDate="2010-12-28T01:04:07.577" UserId="4210" Text="&lt;game-design&gt;&lt;c++&gt;&lt;programming&gt;" />
  <row Id="13698" PostHistoryTypeId="2" PostId="6858" RevisionGUID="b61b8ef1-4122-49b2-8366-c6d689091619" CreationDate="2010-12-28T01:11:11.797" UserId="2332" Text="If you're looking to create smooth rolling hills you can use the box-filtering method. Be warned though, if you want sharp cliff edges, the method will just smooth those out. &#xD;&#xA;&#xD;&#xA;Here's the link to it on GameDev.net: [Box Filtering for Smooth Rolling Hills][1]&#xD;&#xA;&#xD;&#xA;The code assumes you're using a heightmap, but from your solution an easy change to make is just to iterate through the list of 3D points (mapping those 3D points to the appropriate vertex, as you are doing now).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/articles/article2164.asp" />
  <row Id="13699" PostHistoryTypeId="5" PostId="6857" RevisionGUID="8ff3867a-5ecd-4d28-b2af-801e6d9232c0" CreationDate="2010-12-28T01:21:43.403" UserId="4210" Comment="added 125 characters in body; added 89 characters in body; added 32 characters in body; added 43 characters in body" Text="Are cyclic dependencies a common thing in games dev? I ask as I keep getting into situation where I'm using and have been told more than once that they should be avoided.&#xD;&#xA;&#xD;&#xA;I am wondering if this is just a what people say as a general rule of thumb in the software development business. and that the nature of game programming produces such dependencies.&#xD;&#xA;&#xD;&#xA;    // Foo&#xD;&#xA;    #include &lt;Bar.hpp&gt;&#xD;&#xA;    class Foo {&#xD;&#xA;        bar&amp; m_bar;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;    // Bar&#xD;&#xA;    class Foo;&#xD;&#xA;    class Bar {&#xD;&#xA;        Foo* m_foo;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;I do this alot in Ruby, but dynamic languages are more forgiving in this instance, where as static ones, not so much." />
  <row Id="13700" PostHistoryTypeId="5" PostId="6854" RevisionGUID="74409ec0-f168-4ed1-b1c2-595a9e7c2d4f" CreationDate="2010-12-28T01:33:41.323" UserId="154" Comment="added 691 characters in body" Text="Is there something special about these 3D points because it sounds like you are just trying to render a heightmap. Doing a bunch of distance calculations to an arbitrary number of 3D points is not the best way of doing that.&#xD;&#xA;&#xD;&#xA;Here is a simple [DX9 tutorial][1] on rendering a heightmap.&#xD;&#xA;&#xD;&#xA;The basic concept is that you have a 2D image that represents displacement. So the pixel (X,Y) location corresponds to a vertex (X,Z) and the color of the pixel represents a height value (Y) for the vertex.&#xD;&#xA;&#xD;&#xA;The nice part about using an image is that it's very intuitive for the developer to visually create and or modify the terrain. &#xD;&#xA;&#xD;&#xA;EDIT: Looked at the screenshot. It seems to be working to me, I assume you aren't happy with the falloff of the effect? Smooth at the ground level and then a spike at your 3D point.&#xD;&#xA;&#xD;&#xA;If you took any of your mountains/valleys and imagined them in 2D and cut them in half you'd see a curve that looks like the one on the left and I'm guessing you want one that looks like the curve on the right.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;Instead of looking for the 3D distance to your 3D point I suggest look at the 2D distance ignoring the height. Then for every vertex within some predetermined falloff, apply the height to your vertices based on a ease in/out curve.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chadvernon.com/blog/resources/directx9/terrain-generation-with-a-heightmap/&#xD;&#xA;  [2]: http://i.stack.imgur.com/w7RYv.jpg" />
  <row Id="13701" PostHistoryTypeId="2" PostId="6859" RevisionGUID="7ba57324-5b2c-4f41-9272-535d6666d075" CreationDate="2010-12-28T01:43:52.160" UserId="4210" Text="There are two ways of achieving this;&#xD;&#xA;&#xD;&#xA;The top one (at a guess) just uses semi-transparent images.&#xD;&#xA;&#xD;&#xA;The bottom one more complicated (again a guess) plays with [buffers][1] to create the glow (bloom) effect.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://prideout.net/archive/bloom/" />
  <row Id="13702" PostHistoryTypeId="2" PostId="6860" RevisionGUID="d758e66c-35b3-4e7f-8940-3c876fe4f828" CreationDate="2010-12-28T01:57:59.273" UserId="4256" Text="&quot;Super Meat Boy&quot; is a difficult platformer that recently came out for PC, requiring exceptional control and pixel-perfect jumping. The physics code in the game is dependent on the framerate, which is locked to 60fps; this means that if your computer can't run the game at full speed, the physics will go insane, causing (among other things) your character to run slower and fall through the ground. Furthermore, if vsync is off, the game runs extremely fast.&#xD;&#xA;&#xD;&#xA;Could those experienced with 2D game programming help explain why the game was coded this way? Wouldn't a physics loop running at a constant rate be a better solution? (Actually, I think a physics loop is used for parts of the game, since some of the entities continue to move normally regardless of the framerate. Your character, on the other hand, runs exactly [fps/60] as fast.)&#xD;&#xA;&#xD;&#xA;What bothers me about this implementation is the loss of abstraction between the game engine and the graphics rendering, which depends on system-specific things like the monitor, graphics card, and CPU. If, for whatever reason, your computer can't handle vsync, or can't run the game at exactly 60fps, it'll break spectacularly. Why should the rendering step in any way influence the physics calculations? (Most games nowadays would either slow down the game or skip frames.) On the other hand, I understand that old-school platformers on the NES and SNES depended on a fixed framerate for much of their control and physics. Why is this, and would it be possible to create a patformer in that vein without having the framerate dependency? Is there necessarily a loss of precision if you separate the graphics rendering from the rest of the engine?&#xD;&#xA;&#xD;&#xA;Thank you, and sorry if the question was confusing." />
  <row Id="13703" PostHistoryTypeId="1" PostId="6860" RevisionGUID="d758e66c-35b3-4e7f-8940-3c876fe4f828" CreationDate="2010-12-28T01:57:59.273" UserId="4256" Text="2D platformers: why make the physics dependent on the framerate?" />
  <row Id="13704" PostHistoryTypeId="3" PostId="6860" RevisionGUID="d758e66c-35b3-4e7f-8940-3c876fe4f828" CreationDate="2010-12-28T01:57:59.273" UserId="4256" Text="&lt;graphics&gt;&lt;2d-physics&gt;" />
  <row Id="13705" PostHistoryTypeId="2" PostId="6861" RevisionGUID="e762a588-55f2-41ce-8cdc-5ba9523864c8" CreationDate="2010-12-28T02:14:12.427" UserId="51" Text="&gt; Why?&#xD;&#xA;&#xD;&#xA;Handful of reasons, take your pick: They didn't know any better.  .It's quicker and easier to implement.    They were focused more on the gameplay and less on the edge cases that might not crop up in most cases. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You did a pretty good job of explaining why not.  I'm sure you've noticed there's lots of topics that &lt;a href=&quot;http://gamedev.stackexchange.com/search?q=fix+your+timestep&quot;&gt;cover the subject&lt;/a&gt;.  I'm not sure you'll find a satisfactory answer beyond the ones I listed." />
  <row Id="13706" PostHistoryTypeId="2" PostId="6862" RevisionGUID="f1766734-7ee3-46f2-b1d4-2fb481ebbc39" CreationDate="2010-12-28T02:14:30.360" UserId="919" Text="I'm not really sure if it's a good value add seeing as it would entail asset generation. &#xD;&#xA;&#xD;&#xA;The only value I see in it would be for variance but even that would wear thin really quickly." />
  <row Id="13707" PostHistoryTypeId="1" PostId="6862" RevisionGUID="f1766734-7ee3-46f2-b1d4-2fb481ebbc39" CreationDate="2010-12-28T02:14:30.360" UserId="919" Text="Are there benefits to stage selections where only the appearance changes (i.e. Street fighter, King of fighters etc.)?" />
  <row Id="13708" PostHistoryTypeId="3" PostId="6862" RevisionGUID="f1766734-7ee3-46f2-b1d4-2fb481ebbc39" CreationDate="2010-12-28T02:14:30.360" UserId="919" Text="&lt;game-design&gt;" />
  <row Id="13709" PostHistoryTypeId="2" PostId="6863" RevisionGUID="02b717ac-93f8-4c98-977b-48aa58d3d8cd" CreationDate="2010-12-28T02:32:35.330" UserId="4210" Text="I don't think its to much to ask for 2D PC games to play at 60fps anymore. Even most 2D games are hardware accelerated now so personally I wouldn't worry about the fps requirement.&#xD;&#xA;&#xD;&#xA;The real question is why wouldn't you use a pixel based, games are full of cheats and shortcuts.&#xD;&#xA;&#xD;&#xA;If you are making a physics based game (bird throwing perhaps?) the answer is obvious, but a super mario clone? time based movement might be a bit much. " />
  <row Id="13710" PostHistoryTypeId="2" PostId="6864" RevisionGUID="9eee6144-2710-4f04-86bd-664a2dfba157" CreationDate="2010-12-28T02:45:13.707" UserId="4210" Text="Playing against the same background repeatedly would get boring quick. Also in single player the stage selection generally meant who you fought against.&#xD;&#xA;&#xD;&#xA;I remember always wanting to play on the air force base level in street fighter 2, and a friend always wanted to play Ryu's level, so there is some preference.&#xD;&#xA;&#xD;&#xA;So yes it is entirely cosmetic, as with so much in games the visual element provides a great deal. However fighting games don't have much in the way of assets anyway, so variation in backgrounds isn't so much to ask. " />
  <row Id="13711" PostHistoryTypeId="2" PostId="6865" RevisionGUID="72ce604f-6d30-442c-896a-b59e18bab76b" CreationDate="2010-12-28T04:05:13.440" UserId="373" Text="The obvious solution is to have 2 loops running in parallel - the rendering every 1/60 of a second and the game loop every 1/60 of a second.&#xD;&#xA;&#xD;&#xA;But with my experience in Flash (AS3, which I'm pretty sure Super Meat Boy was created in), the scheduler is terrible. The scheduler simply delays the execution of a function until the start of the a frame that's close to the scheduled time. So the closest way you can get to decoupling the rendering and game logic loops is to have all movements be time based (and run each frame based on how much time elapsed since the last frame). That can introduce some more complicated mathematics (like having gravity be applied continuously, rather than adding to the velocity of an object at set intervals). Because the game could lag for a second and then your player would be moving 200 pixels in one step, collision detection and response can become even more complicated. If the programmer was doing frame based collision detection (checking for a collision each timestep), they would have to switch to time based collision detection too. And if they wanted it to feel natural, they would have to use the gravity method described above, which causes object movement to be a higher order of magnitude expression, which makes determining the time of intersection between 2 objects even more difficult.&#xD;&#xA;&#xD;&#xA;In summary, I think it all stems from the language not having a good scheduler." />
  <row Id="13712" PostHistoryTypeId="2" PostId="6866" RevisionGUID="a82137ab-d482-4a3f-9730-a9f2e87c92b7" CreationDate="2010-12-28T04:18:26.867" UserId="4210" Text="&gt; What are the techniques involved in&#xD;&#xA;&gt; the TorchLight level randomizer.&#xD;&#xA;&#xD;&#xA;They will just be random numbers that get put into there level algorithms.&#xD;&#xA;&#xD;&#xA;&gt; and does other titles have&#xD;&#xA;&gt; similarities with this ?&#xD;&#xA;&#xD;&#xA;[Wikipedia][1].&#xD;&#xA;&#xD;&#xA;Although debatable Left 4 Dead used similar techniques in there AI Director.&#xD;&#xA;&#xD;&#xA;&gt; Is there a family name for such&#xD;&#xA;&gt; techniques ?&#xD;&#xA;&#xD;&#xA;Fractals, Recursions, L-systems and plain old algorithms. Each combined with random numbers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Procedural_generation#Games_with_procedural_levels" />
  <row Id="13713" PostHistoryTypeId="5" PostId="6865" RevisionGUID="865e7fe4-ceb8-4e1e-98e6-a83da055f8fd" CreationDate="2010-12-28T04:34:05.833" UserId="373" Comment="added 23 characters in body" Text="The obvious solution is to have 2 loops running in parallel - the rendering every 1/60 of a second and the game loop every 1/60 of a second.&#xD;&#xA;&#xD;&#xA;But with my experience in Flash (AS3, which I'm pretty sure Super Meat Boy was created in), the scheduler isn't always very accurate. The accuracy also depends highly on the environment. In the stand alone flash player, it might have sub-millisecond resolution. But when run in some web browsers, it's accuracy becomes that of the frame rate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So the closest way you can get to decoupling the rendering and game logic loops is to have all movements be time based (and run each frame based on how much time elapsed since the last frame). That can introduce some more complicated mathematics (like having gravity be applied continuously, rather than adding to the velocity of an object at set intervals). Because the game could lag for a second and then your player would be moving 200 pixels in one step, collision detection and response can become even more complicated. If the programmer was doing frame based collision detection (checking for a collision each timestep), they would have to switch to time based collision detection too. And if they wanted it to feel natural, they would have to use the gravity method described above, which causes object movement to be a higher order of magnitude expression, which makes determining the time of intersection between 2 objects even more difficult." />
  <row Id="13714" PostHistoryTypeId="2" PostId="6867" RevisionGUID="025ed86e-0d2b-4aff-8c00-741a3af6122f" CreationDate="2010-12-28T04:47:32.617" UserId="4210" Text="As bummzack said Bitmaps. Although you could use 1 bit transparencies or if you dont have that support use a horrible pink color that you wont use in your game.&#xD;&#xA;&#xD;&#xA;The point of impact can be calculated just be checking the pixel color. and when an impact happens change the color (or delete it) of the bitmap.&#xD;&#xA;&#xD;&#xA;As for the blast radius my first stop would be [Bresenham's circle algorithm][1], very fast and efficient. Although I'd do a rought delete first with something like a square and put the circle round it to get the edges.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Midpoint_circle_algorithm " />
  <row Id="13715" PostHistoryTypeId="2" PostId="6868" RevisionGUID="1570cc71-269e-4c04-ad10-b35e17b43717" CreationDate="2010-12-28T07:28:33.470" UserId="3998" Text="All the answers above talk about implementing the simplest case, as in worms. That is, when area of impact is destroyed and everything else is untouched. Did you consider, that your landscape may eventually be split in two? Say, there's a mountain, and players cut the bottom of it with a rocket launcher. Now, shouldn't the mountain fall? Also, it would be natural for a landscape to be a little bit elastic. At the times of Worms (at least as I remember them, I didn't play Worms for, like, many years) computers weren't just strong enough to do it right. But they are now.&#xD;&#xA;&#xD;&#xA;Of course, it totally depends on ambitions of your project. But if you want it to be really awesome, maybe you should try [Box2D][1] as a physics engine. There's a lot you can do with it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/" />
  <row Id="13716" PostHistoryTypeId="2" PostId="6869" RevisionGUID="b507ef38-b1fa-468d-bfbb-7630c4f3af7f" CreationDate="2010-12-28T08:47:48.277" UserId="3630" Text="I wonder how do they implement the bone animation in the flash game http://www.foddy.net/athletics.swf Do you know any study materials which I can start to learn 2D bone system from? I just implemented a avatar system by compose multiple bitmaps in each frame(similar with maple story), but some gays tell me that, a bone system can save more art resources, so I want to learn some thing about that." />
  <row Id="13717" PostHistoryTypeId="1" PostId="6869" RevisionGUID="b507ef38-b1fa-468d-bfbb-7630c4f3af7f" CreationDate="2010-12-28T08:47:48.277" UserId="3630" Text="Who know how to implement the 2D bone animation showed in the game?" />
  <row Id="13718" PostHistoryTypeId="3" PostId="6869" RevisionGUID="b507ef38-b1fa-468d-bfbb-7630c4f3af7f" CreationDate="2010-12-28T08:47:48.277" UserId="3630" Text="&lt;2d-physics&gt;&lt;skeletal&gt;" />
  <row Id="13719" PostHistoryTypeId="2" PostId="6870" RevisionGUID="d61c0db5-f8f6-40dd-86d8-d7f3a2ebad52" CreationDate="2010-12-28T09:10:47.297" UserId="20" Text="I'm pretty sure the bones/joints in QWOP (the game you're referring to) are modeled using the [Flash Port of Box2D][1]. By pressing the buttons you apply forces to these joints and make the character move *eventually*.&#xD;&#xA;&#xD;&#xA;On the Box2D page you'll also find ragdoll examples that might serve as a starting-point for your characters. You should be aware that creating animations using such a setup (eg. using a physics-engine and apply forces to joints) can be *very* complicated and might not yield the desired results.&#xD;&#xA;&#xD;&#xA;If you just need a &quot;skinnable&quot; avatar, it would probably be simpler to use pre-animated characters. You can use the [bones-system of Flash][2] for this and replace the different MovieClips (eg. upper leg, lower leg etc.) at runtime to get some sort of skinning.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2dflash.org/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=mrcX2N63msM" />
  <row Id="13720" PostHistoryTypeId="5" PostId="6870" RevisionGUID="bf638608-b3a8-4f51-855a-3ae7da16d859" CreationDate="2010-12-28T09:20:39.273" UserId="20" Comment="replaced link" Text="I'm pretty sure the bones/joints in QWOP (the game you're referring to) are modeled using the [Flash Port of Box2D][1]. By pressing the buttons you apply forces to these joints and make the character move *eventually*.&#xD;&#xA;&#xD;&#xA;On the Box2D page you'll also find ragdoll examples that might serve as a starting-point for your characters. You should be aware that creating animations using such a setup (eg. using a physics-engine and apply forces to joints) can be *very* complicated and might not yield the desired results.&#xD;&#xA;&#xD;&#xA;If you just need a &quot;skinnable&quot; avatar, it would probably be simpler to use pre-animated characters. You can use the [bones-system of Flash][2] for this and replace the different MovieClips (eg. upper leg, lower leg etc.) at runtime to get some sort of skinning.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2dflash.org/&#xD;&#xA;  [2]: http://www.adobe.com/designcenter/flash/articles/lrvid4058_fl.html" />
  <row Id="13721" PostHistoryTypeId="5" PostId="6870" RevisionGUID="7130ce95-f5f3-4c1d-a3dd-2951c3292b15" CreationDate="2010-12-28T09:48:54.377" UserId="20" Comment="added 402 characters in body" Text="I'm pretty sure the bones/joints in QWOP (the game you're referring to) are modeled using the [Flash Port of Box2D][1]. By pressing the buttons you apply forces to these joints and make the character move *eventually*.&#xD;&#xA;&#xD;&#xA;On the Box2D page you'll also find ragdoll examples that might serve as a starting-point for your characters. You should be aware that creating animations using such a setup (eg. using a physics-engine and apply forces to joints) can be *very* complicated and might not yield the desired results.&#xD;&#xA;&#xD;&#xA;If you just need a &quot;skinnable&quot; avatar, it would probably be simpler to use pre-animated characters. You can use the [bones-system of Flash][2] for this and replace the different MovieClips (eg. upper leg, lower leg etc.) at runtime to get some sort of skinning.&#xD;&#xA;&#xD;&#xA;**Update:** I created a [very basic example][3] how you could easily change the appearance of an animated character (click to change skin, sorry for crappy art). Source file is [here][4]. Different skins are on different frames. You could most likely extend this concept to dynamically load new skins though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2dflash.org/&#xD;&#xA;  [2]: http://www.adobe.com/designcenter/flash/articles/lrvid4058_fl.html&#xD;&#xA;  [3]: http://www.swfcabin.com/open/1293526425&#xD;&#xA;  [4]: http://www.filedropper.com/iktest" />
  <row Id="13722" PostHistoryTypeId="2" PostId="6871" RevisionGUID="62ca253d-25d0-4301-9a34-f1cdf5996767" CreationDate="2010-12-28T11:03:14.843" UserId="741" Text="Since you're using indirect addressing (pointers or references), and you don't need to know the contents of the other object at declaration time (only at implementation time) this will work just fine in most languages. Obviously it falls apart when you have one object containing another (because to know the size of the containing object, you have to know the full details of the contained object).&#xD;&#xA;&#xD;&#xA;All of that is just semantics though, the fact that you can do such a thing is not a reason why you should. The problem that you'll face is that you are essentially tightly binding those two classes together. You can't have a Foo without a Bar, nor a Bar without a Foo. So you can't re-use Foo elsewhere without also dragging Bar along as well, and that may just not be appropriate. So if the only reason Foo needs to know about Bar is for one little thing, that might even be optional, that's a massive pain.&#xD;&#xA;&#xD;&#xA;For example, if you have a character instance which knows about an navigation state structure to run its navigation logic, but in turn, the navigation state needs a back pointer to the character instance so it can get, say, its position. The navigation logic might also be applicable to vehicles, but you can't use it, because navigation is assuming that it's hooked to a character.&#xD;&#xA;&#xD;&#xA;A much better approach to this is to understand what the back-pointers are being used for, and define an interface which can be used instead. Instead of having a Character* pointer, the navigation state has an IPositionable pointer (and Character implements IPositionable somehow). Now the navigation logic doesn't care how it is used, and can be re-used for characters, vehicles, anything. Better yet, the navigation logic could be split out into its own library / module, because it now has no awareness of anything above its own level - it's nice and self-contained.&#xD;&#xA;&#xD;&#xA;Game development is not special in this regard. If you are producing many such tight circular dependencies like this, it is because your structures are poorly designed. This is a normal software engineering problem, and all of the same guidances apply." />
  <row Id="13723" PostHistoryTypeId="2" PostId="6872" RevisionGUID="c94ef254-d3f8-4a7f-a6c7-0a28b6e503fb" CreationDate="2010-12-28T12:21:29.903" UserId="3818" Text="I'd like to make a simple 2d car crashing game, where the player would drive his car into moving traffic and try to cause as much damage as possible in each level (some Burnout games had a mode like this).&#xD;&#xA;&#xD;&#xA;The physics part of the game is the most important, I can worry about graphics later. Would engine like emini or box2d work for this kind of game? Would Android devices have enough power to handle this? For example if there were about 20 cars colliding, along with some buildings, it would be nice if I could get 20 fps." />
  <row Id="13724" PostHistoryTypeId="1" PostId="6872" RevisionGUID="c94ef254-d3f8-4a7f-a6c7-0a28b6e503fb" CreationDate="2010-12-28T12:21:29.903" UserId="3818" Text="car crash android game" />
  <row Id="13725" PostHistoryTypeId="3" PostId="6872" RevisionGUID="c94ef254-d3f8-4a7f-a6c7-0a28b6e503fb" CreationDate="2010-12-28T12:21:29.903" UserId="3818" Text="&lt;physics&gt;&lt;android&gt;" />
  <row Id="13726" PostHistoryTypeId="2" PostId="6873" RevisionGUID="6702331e-b57d-4f70-bc12-9e1e75ffe711" CreationDate="2010-12-28T12:36:09.173" UserId="659" Text="SMB was originally a console game where it's safe to assume that it's able to run at 60fps on all Xbox360s (well, maybe 50 for some PAL players). Assuming a fixed timestep simplifies the code a fair bit. &#xD;&#xA;&#xD;&#xA;Whilst it's easy to scale a lot of things by a variable timestep - 'pos += velocity * timestep', it gets quite tricky to do it correctly when you're dealing with accelerations, and rates of change of acceleration, and so on.&#xD;&#xA;&#xD;&#xA;Decoupling gameplay and rendering is a nice solution *in theory*, but implementing it well (with good interpolation) is quite tricky, and things can easily get messy. It's fairly uncommon for this technique to be used in real games (although some big games do do it, particularly RTS games, but more for network game synchronization).&#xD;&#xA;&#xD;&#xA;When also designing for a fixed screen resolution as well as a fixed framerate, there's one other thing you can do to make the scrolling extra smooth. You can ensure that the game scrolls at a whole number of pixels-per-frame - avoiding any 'subpixel wobble' you may get by scrolling a fractional number of pixels per frame. " />
  <row Id="13727" PostHistoryTypeId="2" PostId="6874" RevisionGUID="b214844f-35af-4b61-9abd-e69b91e917f7" CreationDate="2010-12-28T12:39:55.730" UserId="4264" Text="I've been looking for a book on actionscript3 development, but while there's tons of books out there, nobody seems to want to recommend any specific one.&#xD;&#xA;&#xD;&#xA;One book I've been pointed towards is the cookbook by o'reilly, but it, like most books out there, seems to be based on the assumption that I'm using flexbuilder or flash. Instead, I'm &quot;just&quot; using flashdevelop, or the free SDK directly.&#xD;&#xA;&#xD;&#xA;I've also been told to just go with the api reference and live with it. I could do that, I suppose, but I'd rather have a book that gives me the big picture. Kind of like with cocoa, there's the hillegrass' book, or the red book of OpenGL.&#xD;&#xA;&#xD;&#xA;So, what would be **the** actionscript3 book out there?" />
  <row Id="13728" PostHistoryTypeId="1" PostId="6874" RevisionGUID="b214844f-35af-4b61-9abd-e69b91e917f7" CreationDate="2010-12-28T12:39:55.730" UserId="4264" Text="Looking for a good actionscript 3 book" />
  <row Id="13729" PostHistoryTypeId="3" PostId="6874" RevisionGUID="b214844f-35af-4b61-9abd-e69b91e917f7" CreationDate="2010-12-28T12:39:55.730" UserId="4264" Text="&lt;actionscript-3&gt;&lt;books&gt;&lt;flashdevelop&gt;" />
  <row Id="13730" PostHistoryTypeId="5" PostId="6869" RevisionGUID="e554135c-3fb7-41c9-8814-8ce20fa24dd1" CreationDate="2010-12-28T12:47:00.710" UserId="3630" Comment="edited body" Text="I wonder how do they implement the bone animation in the flash game http://www.foddy.net/athletics.swf Do you know any study materials which I can start to learn 2D bone system from? I just implemented a avatar system by compose multiple bitmaps in each frame(similar with maple story), but some guys tell me that, a bone system can save more art resources, so I want to learn some thing about that." />
  <row Id="13731" PostHistoryTypeId="2" PostId="6875" RevisionGUID="5bd731f2-6de9-410c-8a2e-e8f490529f57" CreationDate="2010-12-28T13:04:04.503" UserId="4264" Text="Curious. The extension in question seems to be gl_ext_texture_array.&#xD;&#xA;&#xD;&#xA;According to the OpenGL extensions viewer 3.34 database, that should be supported by a wide variety of ATI hardware, and even one S3 chip too. The only discussion about it that I could find was http://forums.amd.com/devforum/messageview.cfm?catid=392&amp;threadid=120024&amp;enterthread=y where nobody answered the question, but there seem to be some issues. Judging from that thread, the issue seems to be related to clamping; you may want to try with the wrap mode instead.&#xD;&#xA;" />
  <row Id="13732" PostHistoryTypeId="2" PostId="6876" RevisionGUID="3ccb4098-b3d9-4276-bcf7-e10abc5514c9" CreationDate="2010-12-28T13:07:52.953" UserId="3853" Text="Sorry for the late and self-answer, but I found a tool that fits perfectly the original description (in particular: &quot;What I'm thinking of will let write a piece of text of the script, define a simplified workflow from that step, and then define the text of next steps, and so on.&quot; and being not just focused on exploration) as it is centered mainly on dialogue between characters (also allows exploration): its called Chat Mapper. &#xD;&#xA;&#xD;&#xA;Unfortunately it runs only on windows systems, but is not too hard to use and quite complete:&#xD;&#xA;&#xD;&#xA;[http://www.chat-mapper.com/][1]&#xD;&#xA;&#xD;&#xA;The installer is a bit bugged, if after installation it doesn't start, check out the [forum][2], you may need to update a DLL.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chat-mapper.com/&#xD;&#xA;  [2]: http://www.urbanbrainstudios.com/forums/" />
  <row Id="13733" PostHistoryTypeId="4" PostId="2491" RevisionGUID="456d0ad1-de87-40de-874a-0aad3c4a8281" CreationDate="2010-12-28T14:13:28.417" UserId="192" Comment="fixed title" Text="What's a good data structure solution for a scene manager in XNA?" />
  <row Id="13734" PostHistoryTypeId="6" PostId="2491" RevisionGUID="456d0ad1-de87-40de-874a-0aad3c4a8281" CreationDate="2010-12-28T14:13:28.417" UserId="192" Comment="fixed title" Text="&lt;graphics-programming&gt;&lt;3d-engines&gt;&lt;performance&gt;" />
  <row Id="13735" PostHistoryTypeId="2" PostId="6877" RevisionGUID="2cdf669a-bfed-4042-86b1-d8847c9fc405" CreationDate="2010-12-28T14:28:23.393" UserId="1581" Text="Not only fighting games do this. It's a technique used in most games &amp; genres. To name a few: Mario, Sonic, Zelda, Contra, R-type, Ghost-n-goblins, Out-run, Starcraft 2.&#xD;&#xA;&#xD;&#xA;All those have several &quot;tilesets&quot; and &quot;backgrounds&quot;.&#xD;&#xA;&#xD;&#xA;The first reason, as PhilCK has mentioned, is that players get bored really when they get presented with the same art again and again.&#xD;&#xA;&#xD;&#xA;The other reason is that art (even on non-interactive elements, such as backgrounds) adds another layer of meaning to the levels it is used in. &#xD;&#xA;&#xD;&#xA;Take [Super Mario's Ghost House][1], for example. The shadowy black tiles &amp; closed windows in the background (and that music!) really do transmit something completely different from the ones in [Yoshi's Island][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=AsBYd90lvZI&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=gkaokGmhkGg" />
  <row Id="13736" PostHistoryTypeId="2" PostId="6878" RevisionGUID="b73f1931-c3d6-45e4-80a7-2efcc9ae35c2" CreationDate="2010-12-28T14:32:11.493" UserId="4129" Text="How can you 'tile' a 3D globe if your existing artwork and maps are simple 2D grids?&#xD;&#xA;&#xD;&#xA;Are there approaches that can re-use much of the artwork and such?" />
  <row Id="13737" PostHistoryTypeId="1" PostId="6878" RevisionGUID="b73f1931-c3d6-45e4-80a7-2efcc9ae35c2" CreationDate="2010-12-28T14:32:11.493" UserId="4129" Text="RTS on a 3D map e.g. a globe" />
  <row Id="13738" PostHistoryTypeId="3" PostId="6878" RevisionGUID="b73f1931-c3d6-45e4-80a7-2efcc9ae35c2" CreationDate="2010-12-28T14:32:11.493" UserId="4129" Text="&lt;3d&gt;&lt;maps&gt;" />
  <row Id="13739" PostHistoryTypeId="2" PostId="6879" RevisionGUID="cf69648d-29ff-4494-86cf-5dfbabbdc14b" CreationDate="2010-12-28T16:36:52.080" UserId="4210" Text="I assume this is a top down game.&#xD;&#xA;&#xD;&#xA;I've not tried Emini, but box2D (or chipmunk) isn't really suited to this as they are generally geared to side on views. There is an [article][1] on [GameDev][2] that might be of some use.&#xD;&#xA;&#xD;&#xA;I have seen some examples of faking it with box2D but the hacks they used meant things like skidding where out the question.&#xD;&#xA;&#xD;&#xA;I think Android devices should be able to handle it, it all depends on your implementation and graphics, sounds etc. however Android is becoming [fragmented][3] a little and it could be a problem on some devices.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamedev.net/reference/programming/features/2dcarphys/&#xD;&#xA;[2]:http://www.gamedev.net&#xD;&#xA;[3]:http://www.appleinsider.com/articles/10/11/19/angry_birds_maker_apologizes_for_android_fragmentation_issues.html" />
  <row Id="13742" PostHistoryTypeId="2" PostId="6882" RevisionGUID="393dc038-55ed-4708-a6fd-9f1ede24a936" CreationDate="2010-12-28T17:26:58.757" UserId="4268" Text="We all can give your our opinions, but in the end, the choice is up to you, i like better Java, and really hate Windows (i'm a Linux guy, didn't notice :) ).&#xD;&#xA;&#xD;&#xA;You should just try, the tool that feets better for you, and have more confidence with" />
  <row Id="13743" PostHistoryTypeId="16" PostId="6874" RevisionGUID="e25a8df7-127b-4efc-8aaa-5bb076923f92" CreationDate="2010-12-28T17:31:33.823" UserId="51" />
  <row Id="13744" PostHistoryTypeId="5" PostId="6865" RevisionGUID="c7e36acd-fb86-4621-a341-8dccbaff4cc6" CreationDate="2010-12-28T17:58:35.653" UserId="373" Comment="slightly better wording" Text="The obvious solution is to have 2 loops running in parallel - the rendering every 1/60 of a second and the game loop every 1/60 of a second.&#xD;&#xA;&#xD;&#xA;But with my experience in Flash (AS3, which I'm pretty sure Super Meat Boy was created in), the scheduler isn't always very accurate. The accuracy also depends highly on the environment. In the stand alone flash player, it might have sub-millisecond resolution. But when run in some web browsers, it's accuracy becomes that of the frame rate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So the closest way you can get to decoupling the rendering and game logic loops is to have all movements be time based (and run each frame based on how much time elapsed since the last frame). That can introduce some more complicated mathematics (like having gravity be applied continuously, rather than adding to the velocity of an object at set intervals). Because the game could lag for a second and then your player would be moving 200 pixels in one step, collision detection and response can become even more complicated. If the programmer was doing frame based collision detection (checking for a collision each timestep), they would have to switch to time based collision detection too. And if they wanted it to feel natural, they would have to use the gravity method described above, which causes object movement be a curve (as opposed to a line), which makes determining the time of intersection between 2 objects even more difficult." />
  <row Id="13745" PostHistoryTypeId="2" PostId="6883" RevisionGUID="8dd7bdb0-428d-4032-83a1-5945f29adaf1" CreationDate="2010-12-28T18:15:40.227" UserId="3128" Text="How do you guys handle shading in a 3d game? I have a directional light source that shades one side of a tree made of cubes. The remaining 3 sides all get ambient shading only. So the 3d effect is lost when looking at two ambient shaded sides. Am I missing something? Should I be shading the side furthest from the light source even darker? I tried looking at Fallout 3 and it kinda looks like this is what they do however Minecraft appears to shade a grass mound with two opposite sides light and the remaining two opposite sides dark kinda giving the effect that there are two directional lights for the two light shaded sides and ambient light for the dark shaded sides." />
  <row Id="13746" PostHistoryTypeId="1" PostId="6883" RevisionGUID="8dd7bdb0-428d-4032-83a1-5945f29adaf1" CreationDate="2010-12-28T18:15:40.227" UserId="3128" Text="I need help with 3d shading/lighting." />
  <row Id="13747" PostHistoryTypeId="3" PostId="6883" RevisionGUID="8dd7bdb0-428d-4032-83a1-5945f29adaf1" CreationDate="2010-12-28T18:15:40.227" UserId="3128" Text="&lt;3d&gt;&lt;opengl&gt;&lt;shaders&gt;&lt;lighting&gt;" />
  <row Id="13749" PostHistoryTypeId="2" PostId="6885" RevisionGUID="e5ddd441-92f1-421b-84ee-f19581603f49" CreationDate="2010-12-28T19:35:01.770" UserId="1923" Text="Many effects use a standard lighting rig which uses 3 lights similar to how a movie company  would film a movie.&#xD;&#xA;&#xD;&#xA;Here is a wiki link: http://en.wikipedia.org/wiki/Three-point_lighting&#xD;&#xA;&#xD;&#xA;here is an XNA specific blog about it (concepts can be applied to OpenGL too):&#xD;&#xA;http://blogs.msdn.com/b/shawnhar/archive/2007/04/09/the-standard-lighting-rig.aspx" />
  <row Id="13750" PostHistoryTypeId="2" PostId="6886" RevisionGUID="33bcf8f3-0289-449c-86aa-eea80c0e1782" CreationDate="2010-12-28T19:41:56.840" UserId="1217" Text="I'm using Unity3d to develop an RTS/TD hybrid prototype game. What is the best approach to have &quot;awareness&quot; between units and their enemies? Is it sane to have every unit check the distance to every enemy and engage if within range? &#xD;&#xA;&#xD;&#xA;The approach I'm going for right now is to have a trigger sphere on every unit. If an enemy enters the trigger, the unit becomes aware of the enemy and starts distance checking. I'm imagining that this would save some unnecessary checks? What's the best practice here (if there's such a thing)?&#xD;&#xA;&#xD;&#xA;Thanks for reading." />
  <row Id="13751" PostHistoryTypeId="1" PostId="6886" RevisionGUID="33bcf8f3-0289-449c-86aa-eea80c0e1782" CreationDate="2010-12-28T19:41:56.840" UserId="1217" Text="Best approach for unit enemy &quot;awareness&quot; in RTS?" />
  <row Id="13752" PostHistoryTypeId="3" PostId="6886" RevisionGUID="33bcf8f3-0289-449c-86aa-eea80c0e1782" CreationDate="2010-12-28T19:41:56.840" UserId="1217" Text="&lt;ai&gt;&lt;unity&gt;&lt;rts&gt;" />
  <row Id="13753" PostHistoryTypeId="2" PostId="6887" RevisionGUID="f88ce688-4d3e-41d8-883d-b71c1e855b06" CreationDate="2010-12-28T19:47:12.747" UserId="1510" Text="i have a simple triangle mesh which i want to explode.&#xD;&#xA;so i am looking for an algorithm that makes every triangle to move outwards from the centerpoint. &#xD;&#xA;is there already something premade like this?&#xD;&#xA;&#xD;&#xA;thanks!" />
  <row Id="13754" PostHistoryTypeId="1" PostId="6887" RevisionGUID="f88ce688-4d3e-41d8-883d-b71c1e855b06" CreationDate="2010-12-28T19:47:12.747" UserId="1510" Text="algorithm to &quot;explode&quot; mesh" />
  <row Id="13755" PostHistoryTypeId="3" PostId="6887" RevisionGUID="f88ce688-4d3e-41d8-883d-b71c1e855b06" CreationDate="2010-12-28T19:47:12.747" UserId="1510" Text="&lt;3d&gt;&lt;3d-meshes&gt;" />
  <row Id="13756" PostHistoryTypeId="2" PostId="6888" RevisionGUID="72e39c58-245c-4ba3-86b7-c3ad2990e679" CreationDate="2010-12-28T19:55:32.617" UserId="4270" Text="For the first time in my game, I'm stuck with a real design dilemma.  I guess that's a good thing ;)  I'm building a word puzzle game that has five levels, each with 30 puzzles.  Currently, the user has to solve one puzzle at a time before moving to the next.  However, I'm finding the user occasionally gets stuck on a puzzle, at which point they can no longer play until they solve it.  This is obviously bad because many people will just quit playing the game and delete the app since they get frustrated and can't play any other puzzles until the current puzzle is solved.&#xD;&#xA;&#xD;&#xA;The only elegant solution I can find to helping the player get unstuck is changing the design of the game to allow the users to pick any puzzle to play at any time.  This way, if they get stuck, they can come back to it later and at least they have other puzzles to play in the meantime.  It's my opinion, however, that this new flow design doesn't make the game as fun as the original flow design where  the player has to complete a puzzle before moving to the next.  To me, it's like anything else, when you only have one of something, it's more enjoyable, but when you have 30 of something, it's far less enjoyable.  In fact, when I present the user with 30 puzzles to choose from that they need to solve before unlocking the next level, it almost seems as tho I'm making them feel like it's work they have to do.  I even had a tester voluntarily tell me that being forced to complete a puzzle before moving to the next is more motivating.&#xD;&#xA;&#xD;&#xA;My questions are...&#xD;&#xA;&#xD;&#xA; 1. Do you agree/disagree?&#xD;&#xA; 2. Do you have any suggestions for how I can help the player get unstuck?&#xD;&#xA;&#xD;&#xA;Thanks so much in advance for your thoughts!&#xD;&#xA;&#xD;&#xA;EDIT: I should mention that I've already considered a few other solutions to helping the user get unstuck, but none of them seem like good ideas.  They are...&#xD;&#xA;&#xD;&#xA; 1. Add more hints: Currently, the user gets two hints per puzzle.  If I increase the hint count, it only makes the game more easy and still leaves the possibility of the user getting stuck.  &#xD;&#xA; 2. Add a &quot;Show Solution&quot; button: This seems like a bad idea because it's my opinion this takes the fun out of the game for many people who would probably otherwise solve the puzzle if they didn't have the quick option to see the solution.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13757" PostHistoryTypeId="1" PostId="6888" RevisionGUID="72e39c58-245c-4ba3-86b7-c3ad2990e679" CreationDate="2010-12-28T19:55:32.617" UserId="4270" Text="Does it make the game more fun when the user is forced to progress thru the levels sequentially rather than letting them pick and play?" />
  <row Id="13758" PostHistoryTypeId="3" PostId="6888" RevisionGUID="72e39c58-245c-4ba3-86b7-c3ad2990e679" CreationDate="2010-12-28T19:55:32.617" UserId="4270" Text="&lt;game-design&gt;&lt;puzzle&gt;" />
  <row Id="13759" PostHistoryTypeId="5" PostId="6888" RevisionGUID="f637e4e7-16f6-4e57-a984-e25fef12cd6c" CreationDate="2010-12-28T20:00:34.703" UserId="4270" Comment="deleted 85 characters in body; deleted 30 characters in body" Text="For the first time in my game, I'm stuck with a real design dilemma.  I guess that's a good thing ;)  I'm building a word puzzle game that has five levels, each with 30 puzzles.  Currently, the user has to solve one puzzle at a time before moving to the next.  However, I'm finding the user occasionally gets stuck on a puzzle, at which point they can no longer play until they solve it.  This is obviously bad because many people will probably just quit playing the game and delete the app.&#xD;&#xA;&#xD;&#xA;The only elegant solution I can find to helping the player get unstuck is changing the design of the game to allow the users to pick any puzzle to play at any time.  This way, if they get stuck, they can come back to it later and at least they have other puzzles to play in the meantime.  It's my opinion, however, that this new flow design doesn't make the game as fun as the original flow design where  the player has to complete a puzzle before moving to the next.  To me, it's like anything else, when you only have one of something, it's more enjoyable, but when you have 30 of something, it's far less enjoyable.  In fact, when I present the user with 30 puzzles to choose from, I'm concerned I might be making them feel like it's a lot of work they have to do and that's bad.  I even had a tester voluntarily tell me that being forced to complete a puzzle before moving to the next is actually motivating.&#xD;&#xA;&#xD;&#xA;My questions are...&#xD;&#xA;&#xD;&#xA; 1. Do you agree/disagree?&#xD;&#xA; 2. Do you have any suggestions for how I can help the player get unstuck?&#xD;&#xA;&#xD;&#xA;Thanks so much in advance for your thoughts!&#xD;&#xA;&#xD;&#xA;EDIT: I should mention that I've already considered a few other solutions to helping the user get unstuck, but none of them seem like good ideas.  They are...&#xD;&#xA;&#xD;&#xA; 1. Add more hints: Currently, the user gets two hints per puzzle.  If I increase the hint count, it only makes the game more easy and still leaves the possibility of the user getting stuck.  &#xD;&#xA; 2. Add a &quot;Show Solution&quot; button: This seems like a bad idea because it's my opinion this takes the fun out of the game for many people who would probably otherwise solve the puzzle if they didn't have the quick option to see the solution.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13764" PostHistoryTypeId="2" PostId="6890" RevisionGUID="755ba278-c599-45fc-a2bd-0f43a0bbd3d3" CreationDate="2010-12-28T20:21:25.903" UserId="14" Text="I have two suggestions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first is to **limit the amount of direct skips they get**, and allow them to regain used skips if they go back and complete a puzzle they skipped previously.&#xD;&#xA;&#xD;&#xA;This will ensure that the user remains motivated. They no-longer have unlimited potential for an easy ride, and it will add another motivating factor. Not using their skips because there is 'potentially' a far harder puzzle down the line. Also, as puzzles tend to effect the way that people approach a general set of problems they may get inspiration for a puzzle they play down the line. The act of returning and finishing a puzzle that had once defeated them will equal an immense amount of gratification (Consider finally one-upping someone who was better than you in ever class)&#xD;&#xA;&#xD;&#xA;The second suggestion is to **give them an unlimited hints**, from the early casual hints to helping them step by step. There are any number of factors you could use to give out hints to players, time, failed attempts but casually release more information that would make solving the particular puzzle easier for them. For you, this may seem as juvenile hand holding, but thanks to  [Hindsight Bias][1] your players won't see it that way. Mentally they will say, &quot;Oh it's that simple, I would have figured that out&quot; and continue without feeling slighted in the slightest. (Or alternatively, they will go *&quot;No one would have thought of that, I'm happy I cheated&quot;* or *&quot;I was over-thinking the puzzle, I'm to smart to have ever guessed that&quot;* and actually feel pleased) &#xD;&#xA;&#xD;&#xA;The trick with that one, is to do it casually and without interrupting play. A simple visual tick could be the lowest hint levels, a sort of inconspicuous action to draw their eyes to something else (sparkles around something they should click, a change to a happier 'successful' tone when they are completing a proper chain of actions or touching the correct area)&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hindsight_bias" />
  <row Id="13765" PostHistoryTypeId="2" PostId="6891" RevisionGUID="2d2de8e0-12bf-48bb-b942-2d72ac135a28" CreationDate="2010-12-28T20:36:32.523" UserId="154" Text="Lots of solutions:&#xD;&#xA;&#xD;&#xA;**Limited Skips**&#xD;&#xA;&#xD;&#xA;Players can skip up to X times, and clearing a previous level gets the skip back&#xD;&#xA;&#xD;&#xA;**Skip after repeated failure**&#xD;&#xA;&#xD;&#xA;If your puzzle can be failed then after a certain number of failures instead of just a retry button there is a skip button as well.&#xD;&#xA;&#xD;&#xA;**Multiple Levels of Success**&#xD;&#xA;&#xD;&#xA;For example, beating a level rewards 1, 2, or 3 stars. Then levels unlock based on stars not order. So if you are having trouble with one level you can go back and do a better job on previous ones.&#xD;&#xA;&#xD;&#xA;**Micro-transaction Skips**&#xD;&#xA;&#xD;&#xA;Depends on your platform, but you can charge for level skipping. " />
  <row Id="13766" PostHistoryTypeId="2" PostId="6892" RevisionGUID="d23c5cd7-0847-4ca6-90cd-a532de78871e" CreationDate="2010-12-28T20:49:56.053" UserId="3794" Text="Our game &quot;Save Us!&quot; used that. It is pretty fun to have rts on planet and control it. [Save us gameplay][1] (but the game is not fun at all :-))&#xD;&#xA;&#xD;&#xA;Save Us! Uses regular 2D heightmap which is transformed to a sphere. It is easy to do, but has problem on sphere's poles. We just have there ocean. Not really nice solution, but works. Problem of non rectangular tiles is not big. It looks quite ok. For determining which tile is clicked we use color picking. &#xD;&#xA;&#xD;&#xA;This is old project and the solution is not the best, but it is very very easy and quite good looking. &#xD;&#xA;&#xD;&#xA;Much better solution should be usage of **icosphere**. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=_GuvrorF60Q" />
  <row Id="13767" PostHistoryTypeId="2" PostId="6893" RevisionGUID="6ef7fafa-22d3-46e0-bd14-1912b222347c" CreationDate="2010-12-28T20:53:08.187" UserId="154" Text="Here are a couple of articles from Spore&#xD;&#xA;&#xD;&#xA;Creating Spherical Worlds&#xD;&#xA;&#xD;&#xA; - [Abstract][1]&#xD;&#xA; - [Slides][2]&#xD;&#xA; - And [YouTube Clip][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~ajw/s2007/0251-SphericalWorlds.pdf&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~ajw/s2007/0251-SphericalWorlds-slides.pdf&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=oLwkEwHJpW4" />
  <row Id="13768" PostHistoryTypeId="2" PostId="6894" RevisionGUID="bf03c2df-7e9f-443c-b789-d762db237968" CreationDate="2010-12-28T21:46:13.493" UserId="953" Text="This is a complex topic, and I'm barely qualified to talk about it, but I'll give it a shot.  Many games use a pre-baked light map that takes into account light bouncing off of multiple surfaces, then combine that with dynamic lighting to produce a fast, realistic, and good-looking environment.  There are probably modern games that do light bouncing in real-time.&#xD;&#xA;&#xD;&#xA;Something to keep in mind is that light attenuates with distance; if your lamp is at an angle to a surface, the closer edge will be brighter than the farther edge.  Things tend to look very fake if a lamp is shining on them straight-on rather than at an angle.&#xD;&#xA;&#xD;&#xA;Minecraft's lighting is special, because it uses a weird system where light is treated almost like heat diffusing through the world: http://www.minecraftwiki.net/wiki/Light It's not easily extended to a general-purpose solution.&#xD;&#xA;&#xD;&#xA;The most cool-looking effect I've seen used is called ambient occlusion.  It's expensive, and is usually only used in a pre-baked solution, but it takes into account how corners of the room are darker because the walls occlude the ambient light; the middle of the wall has a hemisphere's worth of light hitting it, while the corner where three surfaces meet has only a hemidemisemisphere's (1/8 sphere's) worth of light. https://secure.wikimedia.org/wikipedia/en/wiki/Ambient_occlusion&#xD;&#xA;&#xD;&#xA;There's tons and tons of writing out there on lighting systems; searching around will probably serve you well." />
  <row Id="13769" PostHistoryTypeId="2" PostId="6895" RevisionGUID="90566160-a1a6-4edd-b910-bc1e6b6a6724" CreationDate="2010-12-28T22:00:46.553" UserId="953" Text="One option that I've seen work well is to give the player, say, three available levels in the post-tutorial period, and then unlock an additional level when one is beaten.  Thus, the player can initially do Level 1, 2, or 3; beating any one of these unlocks 4, and so on.  &#xD;&#xA;&#xD;&#xA;At any one time, the player has three different levels available.  If she gets stuck on Level 2, she can do other levels all the way to the end of the game, but never has too many options to pick from.&#xD;&#xA;&#xD;&#xA;Of course, if the player becomes stuck on three levels over the course of the game, say 2, 6, and 13, she must beat one of them to unlock a new level.  Still, this gives more leeway than the beat-each-level method." />
  <row Id="13770" PostHistoryTypeId="2" PostId="6896" RevisionGUID="3a43e42e-5554-4090-b90a-bc86e117814c" CreationDate="2010-12-28T22:56:19.157" UserId="659" Text="You may not even need a full-screen bloom/glow effect (remember that this sort of effect is quite GPU-intensive, particularly if you're making a 2D game and want to avoid high system requirements)&#xD;&#xA;&#xD;&#xA;First, try just rendering your sprites with additive blending - with a blending equation such as:&#xD;&#xA;&#xD;&#xA;(SRC_COLOUR * SRC_ALPHA) + (DST_COLOUR * ONE)&#xD;&#xA;&#xD;&#xA;Then bake the glows into your sprites (or render them as additional additive sprites - to create a 'glow sprite', just blur your original sprite using a gaussian blur filter in whatever paint package you use)&#xD;&#xA;&#xD;&#xA;Of course, this approach has some limitations - the adding-up of overlapping sprites may be undesirable, and would be avoided by using a full-screen bloom/glow effect" />
  <row Id="13772" PostHistoryTypeId="2" PostId="6897" RevisionGUID="61051bff-efe4-452a-81fa-d377e32bae92" CreationDate="2010-12-28T23:10:00.763" UserId="3637" Text="![Gimme the money!][1]&#xD;&#xA;&#xD;&#xA;The player should be given &quot;money&quot; for each puzzle they solve. The amount of money earned depends on tThe player should be given &quot;money&quot; for each puzzle they solve. The amount of money earned depends on the difficulty, and time taken.&#xD;&#xA;&#xD;&#xA;    money_earned = max - time_taken / difficulty;&#xD;&#xA;&#xD;&#xA;With this money, they can buy the solution to puzzles:&#xD;&#xA;&#xD;&#xA;    #define TIME_TAKE 60 // (seconds) The averagr time it should take to solve a puzzle on level 1 difficulty; multiply by difficulty level to get time taken on that difficulty&#xD;&#xA;    cost_of_puzzle = TIME_TAKE * (*puzzle).difficulty;&#xD;&#xA;    if(buy)&#xD;&#xA;        money_earned -= cost_of_puzzle;&#xD;&#xA;&#xD;&#xA;If they have the solution to a puzzle, give them the option to skip it.&#xD;&#xA;&#xD;&#xA;This method has a few benefits:&#xD;&#xA;&#xD;&#xA;- If the player is good, they can skip some of the easy levels - the faster they are, the more money they earn&#xD;&#xA;- You can force the player to go in order&#xD;&#xA;- Money makes everything all right!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/VKGw7.gif" />
  <row Id="13773" PostHistoryTypeId="2" PostId="6898" RevisionGUID="d7d516b4-5766-4595-af95-aedde0420646" CreationDate="2010-12-28T23:14:17.030" UserId="4274" Text="This is a more conceptual, thinking-out-loud question than a technical one. I have a 3D heightmapped terrain as part of a multiplayer RTS that I would like to terraform over a network. The terraforming will be done by units within the gameworld; the player will paint a &quot;target heightmap&quot; that they'd like the current terrain to resemble and units will deform towards that on their own (a la Perimeter).&#xD;&#xA;&#xD;&#xA;Given my terrain is 257x257 vertices, the naive approach of sending heights when they change will flood the bandwidth very quickly - updating a quarter of the terrain every second will hit ~66kB/s. This is clearly way too much.&#xD;&#xA;&#xD;&#xA;My next thought was to move to a brush-based system, where you send e.g. the centre of a circle, its radius, and some function defining the influence of the brush from the centre going outwards. But even with reliable UDP the &quot;start&quot; and &quot;stop&quot; messages could still be delayed. I guess I could compare timestamps and compensate for this, although it'd likely mean that clients would deform verts too much on their local simulations and then have to smooth them back to the correct heights. I could also send absolute vert heights in the &quot;start&quot; and &quot;stop&quot; messages to guarantee correct data on the clients.&#xD;&#xA;&#xD;&#xA;Alternatively I could treat brushes in a similar way to units, and do the standard position + velocity + client-side prediction jazz on them, with the added stipulation that they deform terrain within a certain radius around them. The server could then intermittently do a pass and send (a subset of) recently updated verts to clients as and when there's bandwidth to spare.&#xD;&#xA;&#xD;&#xA;Any other suggestions, or indications that I'm on the right (or wrong!) track with any of these ideas would be greatly appreciated." />
  <row Id="13774" PostHistoryTypeId="1" PostId="6898" RevisionGUID="d7d516b4-5766-4595-af95-aedde0420646" CreationDate="2010-12-28T23:14:17.030" UserId="4274" Text="Sending changes to a terrain heightmap over UDP" />
  <row Id="13775" PostHistoryTypeId="3" PostId="6898" RevisionGUID="d7d516b4-5766-4595-af95-aedde0420646" CreationDate="2010-12-28T23:14:17.030" UserId="4274" Text="&lt;network&gt;" />
  <row Id="13776" PostHistoryTypeId="2" PostId="6899" RevisionGUID="a1e46fb2-5739-44f7-9b32-82bc23090ce1" CreationDate="2010-12-28T23:49:43.537" UserId="4275" Text="Look into bounding volume hierarchies (BVH). They're most commonly used in collision detection to reduce the number of checks needed when calculating collisions or in rendering to perform frustum culling on objects. Since you're already using spheres, I'd suggest a [sphere-tree][1] though other volumes such as AABBs may be more efficient. I'm not sure what sort of support Unity has for such things as I've never used it, but there is probably something for this already within the collision detection or rendering parts of the engine.&#xD;&#xA;&#xD;&#xA;Basically, you would want to group enemies that are near each other together into multiple parent spheres. When a unit is moved, you would check it's trigger sphere against the parent sphere instead of checking each enemy. If the trigger sphere intersects with the parent sphere, you would check each enemy within. If it doesn't, you can discard all of the enemies that are within it. You would want to set up multiple levels of spheres based on a maximum sphere size or enemy count for each sphere and perform the check based off of a top-level sphere. Then it's just a matter of walking down the tree in order to check each enemy without needing to perform the distance check for each one.&#xD;&#xA;&#xD;&#xA;Steps required each frame:&#xD;&#xA;&#xD;&#xA; 1. Move enemies&#xD;&#xA; 2. Rebuild/update the BVH for new enemy positions&#xD;&#xA; 3. Move units and check against sphere-tree.&#xD;&#xA;&#xD;&#xA;This can reduce the checks needed when there are lots of enemies but the overhead of updating and storing the tree may not be worth it when there aren't that many. I'm not familiar with Supreme Commander to know what you're after, so I'm just assuming 'hundreds'. You'll need to profile in different situations to find out whether the overhead will be worth it to you.&#xD;&#xA;&#xD;&#xA;  [1]: http://isg.cs.tcd.ie/spheretree/" />
  <row Id="13777" PostHistoryTypeId="2" PostId="6900" RevisionGUID="1eb30046-e815-4bac-839f-e428c8236f69" CreationDate="2010-12-29T00:10:04.063" UserId="2469" Text="Regarding the data you are sending, you could &quot;pack&quot; data together since all you need to &#xD;&#xA;send is the new height and the index of the vertex in the buffer, you could pack both of these in an int or a long depending on the max/min values of the vertex positions.&#xD;&#xA;Still, that won't solve the problem, since, even if you are sending less data, you are still sending data that may not get to the client side, so would need a way to reliably send the data over but without killing the bandwidth.&#xD;&#xA;IMHO using client side prediction with you &quot;brush-based system, is a good idea, that way you can send less data, less often." />
  <row Id="13778" PostHistoryTypeId="2" PostId="6901" RevisionGUID="9952ca5e-3da1-4fbf-afab-701b29daf9eb" CreationDate="2010-12-29T00:14:15.960" UserId="4275" Text="Look into [particle physics][1]. Each vertex would be set up as one particle per triangle it is a part of and each would be pushed away from the explosion point using whatever force you want. To keep the triangles from warping as the particles move, add stick constraints for each edge (they're described in the article linked above). When the constraints are resolved, it will modify the particle movement and cause the triangles to move independently, flipping and rotating as they go.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml&#xD;&#xA;" />
  <row Id="13779" PostHistoryTypeId="2" PostId="6902" RevisionGUID="5f115834-87a6-4f95-bcdf-4913f9650fe3" CreationDate="2010-12-29T00:18:08.677" UserId="2469" Text="You may want to check this out:&#xD;&#xA;http://www.cgafaq.info/wiki/Half_edge_general&#xD;&#xA;http://en.nicoptere.net/?p=960" />
  <row Id="13781" PostHistoryTypeId="2" PostId="6904" RevisionGUID="f26f5c7e-05e0-4b5e-a4b7-7beef9c9f28b" CreationDate="2010-12-29T04:22:20.517" UserId="4281" Text="wkerslake has some good answers - multiple levels of success has been used to great effect in games like Cut the Rope and Angry Birds, among many others. &#xD;&#xA;&#xD;&#xA;But I'm surprised not to see any answers recommending the solution used by Guitar Hero, Super Meat Boy, and many other games, which I'll call &quot;gating.&quot;&#xD;&#xA;&#xD;&#xA;Divide your levels up into chunks, say &quot;Easy, Medium, Hard, Expert&quot; chunks; each chunk might contain, say, 7 levels. The player starts with only access to the Easy chunk, but once they beat, say, 5 of the 7 Easy levels, the Medium chunk becomes available. Once they beat 5 of the 7 Medium levels, the Hard chunk becomes available; etc.&#xD;&#xA;&#xD;&#xA;A variation is to make it so that beating 5 of the 7 available levels opens up a &quot;boss&quot; level, which must be played, after which the Medium chunk appears. This ensures that the &quot;boss&quot; levels must always be played in any possible progression through your game.&#xD;&#xA;&#xD;&#xA;This allows players to quit certain levels they get stuck on and either return to them later, or not return to them at all. Meanwhile players who wish to do so can still play through every single level sequentially (and should probably be given a peripheral award such as an achievement for doing so). This also preserves a progression in your game - they can't immediately skip to the last level if they want. And the &quot;boss&quot; system ensures that if you have a level which teaches a skill which is absolutely required for the player to learn before moving on, that the player will always have to play that level (though if that one level turns out to be the one your players get stuck on, then you're right back to the problem you started with).&#xD;&#xA;&#xD;&#xA;Another solution is the one used by Braid, which allowed the player to simply go right on past the puzzles without solving them. They could instantly return to them later after beating them, and there was still &quot;gating&quot; in that they couldn't open up new areas until the puzzles were actually paused. But think about having the ability to simply &quot;move on&quot; to the next puzzle and return to it later - often players will return to a puzzle refreshed, and with new skills acquired from the other puzzles they solved, and will be able to defeat that puzzle they were stuck on quickly." />
  <row Id="13782" PostHistoryTypeId="2" PostId="6905" RevisionGUID="ff1453ea-756b-4690-b034-3cc3d41fd248" CreationDate="2010-12-29T04:24:13.420" UserId="3119" Text="I´m developing a game for Windows Phone 7, but I have an Android device and I´ll give you my point of view.&#xD;&#xA;&#xD;&#xA;If you know C# and XNA, go for Windows Phone, you can jump straight to the game instead of learning the basics again. The marketplace is great for costumers to find stuff and buy. On the other hand you must pass a certification process first, and if you are new to gamedev in general you probably will get frustrated if your game does not pass the cert.&#xD;&#xA;&#xD;&#xA;Now, on android, you can upload your game as is. The bad thing, is you must learn android´s architecture (not that difficult) plus some other concepts needed to develop a game. IMHO the marketplace is not as good as WP7´s.&#xD;&#xA;&#xD;&#xA;Now, my final answer: if you can buy or borrow a WP7 device, make your game for WP7. If you can have an android, make your game for Android. Testing a game on the emulator will work for the first part of your project, but eventually you´ll need a device to test on.&#xD;&#xA;&#xD;&#xA;Microsoft Mexico(where I live) lends devices for short periods of time, but is really hard to go to their offices to get the device. As soon as I finish my game, I´ll port it to android.&#xD;&#xA;&#xD;&#xA;Hope the advice helps." />
  <row Id="13783" PostHistoryTypeId="2" PostId="6906" RevisionGUID="56659fbd-2e6d-4aea-8feb-6042e9f5c4a2" CreationDate="2010-12-29T06:02:32.200" UserId="263" Text="![ActionScript 3.0 Animation][1]&#xD;&#xA;&#xD;&#xA;**Foundation ActionScript 3.0 Animation: Making Things Move!** is an excellent book covering ActionScript 3.0 from a programmer's perspective focusing on game or animation programming. Lots of practical examples in topics like velocity, acceleration, friction, easing, collision detection, rotation, basic physics, particles, and forward/inverse kinematics. I'd highly recommend it.&#xD;&#xA;&#xD;&#xA;[ActionScript 3.0 Animation on Amazon][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/VtDbu.jpg&#xD;&#xA;  [2]: http://www.amazon.com/Foundation-Actionscript-3-0-Animation-Making/dp/1590597915/ref=sr_1_1?ie=UTF8&amp;qid=1293602170&amp;sr=8-1" />
  <row Id="13784" PostHistoryTypeId="5" PostId="6890" RevisionGUID="df6cac2c-88f6-4acc-88c2-2415fe11f04f" CreationDate="2010-12-29T06:45:50.680" UserId="14" Comment="added 335 characters in body" Text="I have two suggestions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first is to **limit the amount of direct skips they get**, and allow them to regain used skips if they go back and complete a puzzle they skipped previously.&#xD;&#xA;&#xD;&#xA;This will ensure that the user remains motivated. They no-longer have unlimited potential for an easy ride, and it will add another motivating factor. Not using their skips because there is 'potentially' a far harder puzzle down the line. Also, as puzzles tend to effect the way that people approach a general set of problems they may get inspiration for a puzzle they play down the line. The act of returning and finishing a puzzle that had once defeated them will equal an immense amount of gratification (Consider finally one-upping someone who was better than you in ever class). For example of this, see World of Goo, although I don't know if they return skips.&#xD;&#xA;&#xD;&#xA;The second suggestion is to **give them an unlimited hints**, from the early casual hints to helping them step by step. There are any number of factors you could use to give out hints to players, time, failed attempts but casually release more information that would make solving the particular puzzle easier for them. For you, this may seem as juvenile hand holding, but thanks to  [Hindsight Bias][1] your players won't see it that way. Mentally they will say, &quot;Oh it's that simple, I would have figured that out&quot; and continue without feeling slighted in the slightest. (Or alternatively, they will go *&quot;No one would have thought of that, I'm happy I cheated&quot;* or *&quot;I was over-thinking the puzzle, I'm to smart to have ever guessed that&quot;* and actually feel pleased). For an example of this (in a form) see the monkey island 1/2 remakes. You can hold down a button to get a hint, and repeatedly clicking things (in general) in monkey island games (and many other adventure games) makes the character give subtle hints.&#xD;&#xA;&#xD;&#xA;The trick with that one, is to do it casually and without interrupting play. A simple visual tick could be the lowest hint levels, a sort of inconspicuous action to draw their eyes to something else (sparkles around something they should click, a change to a happier 'successful' tone when they are completing a proper chain of actions or touching the correct area)&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hindsight_bias" />
  <row Id="13787" PostHistoryTypeId="2" PostId="6907" RevisionGUID="d32e41ed-137c-4043-9993-1e7b8c548879" CreationDate="2010-12-29T07:11:32.113" UserId="4261" Text="I'm trying to work with 2D graphics using Direct3D 9, but am not sure where to start. Right now I'm using a texture as the &quot;draw buffer&quot;, and drawing that texture to screen. For the simplest things, it works. But I can't see a way to e.g. draw lines, arcs, and the like onto the texture. How should I go about doing this?" />
  <row Id="13788" PostHistoryTypeId="1" PostId="6907" RevisionGUID="d32e41ed-137c-4043-9993-1e7b8c548879" CreationDate="2010-12-29T07:11:32.113" UserId="4261" Text="2D graphics with Direct3D" />
  <row Id="13789" PostHistoryTypeId="3" PostId="6907" RevisionGUID="d32e41ed-137c-4043-9993-1e7b8c548879" CreationDate="2010-12-29T07:11:32.113" UserId="4261" Text="&lt;2d&gt;&lt;directx&gt;&lt;directx9&gt;" />
  <row Id="13793" PostHistoryTypeId="2" PostId="6909" RevisionGUID="63843380-6f43-473d-bc33-efc90a52add1" CreationDate="2010-12-29T10:16:44.503" UserId="4286" Text="I am surprised that nobody mentioned libgdx.&#xD;&#xA;http://code.google.com/p/libgdx/&#xD;&#xA;" />
  <row Id="13794" PostHistoryTypeId="2" PostId="6910" RevisionGUID="1a235aa7-24be-489b-b264-843b9f37b7c5" CreationDate="2010-12-29T11:06:45.440" UserDisplayName="Mike" Text="we accept unity games and host them for free on [www.tinyutopia.com][1]. You can find submission information on our main page.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tinyutopia.com" />
  <row Id="13795" PostHistoryTypeId="2" PostId="6911" RevisionGUID="8be553d5-e827-4a38-9664-4249e6a7e632" CreationDate="2010-12-29T11:10:40.507" UserId="849" Text="Trying to understand some basic 3D concepts, at the moment I'm trying to figure out how textures actually work. I know that UV and UVW mapping are techniques that map 2D Textures to 3D Objects - Wikipedia told me as much. I googled for explanations but only found tutorials that assumed that I already know what it is.&#xD;&#xA;&#xD;&#xA;From my understanding, each 3D Model is made out of Points, and several points create a face? Does each point or face have a secondary coordinate that maps to a x/y position in the 2D Texture? Or how does unwrapping manipulate the model?&#xD;&#xA;&#xD;&#xA;Also, what does the W in UVW really do, what does it offer over UV? As I understand it, W maps to the Z coordinate, but in what situation would I have different textures for the same X/Y and different Z, wouldn't the Z part be invisible? Or am I completely misunderstanding this?" />
  <row Id="13796" PostHistoryTypeId="1" PostId="6911" RevisionGUID="8be553d5-e827-4a38-9664-4249e6a7e632" CreationDate="2010-12-29T11:10:40.507" UserId="849" Text="What exactly is UV and UVW Mapping?" />
  <row Id="13797" PostHistoryTypeId="3" PostId="6911" RevisionGUID="8be553d5-e827-4a38-9664-4249e6a7e632" CreationDate="2010-12-29T11:10:40.507" UserId="849" Text="&lt;3d&gt;&lt;textures&gt;&lt;uvw-mapping&gt;&lt;basics&gt;" />
  <row Id="13798" PostHistoryTypeId="2" PostId="6912" RevisionGUID="362cf959-0650-4bb7-9ac9-3ca3c185af65" CreationDate="2010-12-29T11:12:47.613" UserDisplayName="Vikarti Anatra" Text="EVE Online's Web API is read-only.&#xD;&#xA;It's only to monitor character skils/inventory assets/assets and states of various in-game structures,etc&#xD;&#xA;There are ways to get actual control of EVE(control your ship,actually manage said in-game structures,etc) but they  are against EULA and basically works like WoW Glider" />
  <row Id="13799" PostHistoryTypeId="2" PostId="6913" RevisionGUID="16c0b770-8761-4e3f-b207-0d246e181b0f" CreationDate="2010-12-29T11:23:25.370" UserId="4264" Text="Consider a triangle.&#xD;&#xA;&#xD;&#xA;Each corner has a UV coordinate. You interpolate between these to get a set of UV coordinates for each pixel. (There's also perspective in play here but let's ignore that for the moment).&#xD;&#xA;&#xD;&#xA;Then, you fetch a texel from the texture from the coordinates U and V. Which is to say, a pixel from the texture coordinate x,y - same thing, slightly different terminology since we're talking about textures.&#xD;&#xA;&#xD;&#xA;If your texture is a truly 3-dimensional one, you'll also need a third coordinate, W.&#xD;&#xA;&#xD;&#xA;One way to visualize this is to think of a block of wood. If you chop it somehow, you'll see that each plane inside the block contains a 2d texture of sorts.&#xD;&#xA;&#xD;&#xA;3d textures are so rare that you can forget about them for the time being." />
  <row Id="13800" PostHistoryTypeId="2" PostId="6914" RevisionGUID="82a6b3c3-adc4-4326-82c9-e4bad3346b66" CreationDate="2010-12-29T11:56:40.027" UserId="4275" Text="Your understanding is close. Each 3D model is made out of vertexes. Each vertex usually defines the location of a point in space, a normal (used in lighting calculations) and 1 or more texture coordinates. These are generally designated as *u* for the horizontal part of the texture and *v* for the vertical.&#xD;&#xA;&#xD;&#xA;When an object is textured, these coordinates are used to look up which texel or pixel to plot from the texture. I find it easiest to think of them as percentages or ratios between the left edge of texture (*u* = 0) and the right edge of the texture (*u* = 1.0) and from the top of the texture (*v* = 0) and the bottom of it (*v* = 1.0). They are interpolated between the vertexes and looked up for each on-screen pixel that is rendered. They can be larger or smaller than these ranges and the render state that is set when the object is rendered specifies what happens. The options for this are CLAMP and REPEAT. Clamping limits the coordinate to either 0 or 1, causing the texture to smear where it is outside of the range. Repeat causes the texture to repeat when it is outside the range; it is effectively the same as grabbing just the decimal portion of the coordinate and using that in its place.&#xD;&#xA;&#xD;&#xA;Before the texture coordinates are applied onto an object, they are multiplied by a texture matrix to apply some transformation to them (such as scaling, translation or rotation). This effect is sometimes animated in games to make it appear as though something is moving across an object without having to move the object itself... the texture is simply scrolling across it. When the texture matrix is multiplied by the texture coordinates, it produces 2 values that are used to look up the texel to plot (lets call them *s* and *t*). These are generated automatically from *u* and *v* even when the texture matrix is not set; it is the equivalent of multiplying *u* and *v* by an identity matrix. &#xD;&#xA;&#xD;&#xA;This is where the *w* coordinate comes in, though it isn't used that often. It is an extra parameter to multiply the texture matrix against and is usually used when you want to take perspective into account (such as in [Shadow Mapping][1]). It works the same as when you transform a location in object-space to screen-space via a world-view-projection matrix. By multiplying the UVW with a projection transform, you end up with 2 coordinates, the *s* and *t* which are then mapped onto a 2D texture.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Shadow_mapping" />
  <row Id="13801" PostHistoryTypeId="2" PostId="6915" RevisionGUID="afbbac15-3765-4543-9eea-7f9175d8f269" CreationDate="2010-12-29T12:47:46.190" UserId="1502" Text="**The GDI approach:**&#xD;&#xA;&#xD;&#xA;- Create a bitmap and a device context&#xD;&#xA;- Render your 3d graphics into the bitmap using GDI&#xD;&#xA;- StretchBlit the bitmap onto the texture&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The Pixel approach:**&#xD;&#xA;&#xD;&#xA;- Lock the texture and fill the pixels using e.g. Bresenham's algorithm.&#xD;&#xA;&#xD;&#xA;**The Render approach:**&#xD;&#xA;&#xD;&#xA;- Use DrawPrimitiveUP with D3DPT_LINELIST or D3DPT_LINESTRIP for drawing lines. &#xD;&#xA;&#xD;&#xA;- Arcs, circles and other curved shapes can be composited from lines.&#xD;&#xA;&#xD;&#xA;- For filled shapes generate meshes using D3DXCreateShpere/Box/Torus etc. and render those using orthographic projection. You'd use a sphere mesh to render filled circles, a box mesh for filled rectangles and a torus would allow for curved shape outlines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13804" PostHistoryTypeId="6" PostId="6911" RevisionGUID="ac03dcf1-1002-46a0-800b-9c2d1c798967" CreationDate="2010-12-29T14:09:14.463" UserId="14" Comment="edited tags" Text="&lt;3d&gt;&lt;textures&gt;&lt;uvw-mapping&gt;" />
  <row Id="13805" PostHistoryTypeId="2" PostId="6916" RevisionGUID="6bd80683-80ea-4eca-a4ee-970f8bbf54a9" CreationDate="2010-12-29T14:28:57.997" UserId="3536" Text="I allow the user to look around the scene by holding down the left mouse button and moving the mouse. The problem that I have is I can be facing one direction, I move the mouse up and the view tilts up, I move down and the view titles down. If I spin around 180 my left and right still works fine, but when I move the mouse up the view tilts down, and when I move the mouse down the view titles up.&#xD;&#xA;&#xD;&#xA;This is the code I am using, can anyone see what the problem with the logic is?&#xD;&#xA;&#xD;&#xA;      var viewDir = g_math.subVector(target, g_eye);  &#xD;&#xA;      var rotatedViewDir = [];  &#xD;&#xA;      rotatedViewDir[0] = (Math.cos(g_mouseXDelta * g_rotationDelta) * viewDir[0]) - (Math.sin(g_mouseXDelta * g_rotationDelta) * viewDir[2]);  &#xD;&#xA;      rotatedViewDir[1] = viewDir[1];  &#xD;&#xA;      rotatedViewDir[2] = (Math.cos(g_mouseXDelta * g_rotationDelta) * viewDir[2]) + (Math.sin(g_mouseXDelta * g_rotationDelta) * viewDir[0]);  &#xD;&#xA;      viewDir = rotatedViewDir;  &#xD;&#xA;      rotatedViewDir[0] = viewDir[0];  &#xD;&#xA;      rotatedViewDir[1] = (Math.cos(g_mouseYDelta * g_rotationDelta * -1) * viewDir[1]) - (Math.sin(g_mouseYDelta * g_rotationDelta * -1) * viewDir[2]);  &#xD;&#xA;      rotatedViewDir[2] = (Math.cos(g_mouseYDelta * g_rotationDelta * -1) * viewDir[2]) + (Math.sin(g_mouseYDelta * g_rotationDelta * -1) * viewDir[1]);  &#xD;&#xA;      g_lookingDir = rotatedViewDir;  &#xD;&#xA;      var newtarget = g_math.addVector(rotatedViewDir, g_eye);" />
  <row Id="13806" PostHistoryTypeId="1" PostId="6916" RevisionGUID="6bd80683-80ea-4eca-a4ee-970f8bbf54a9" CreationDate="2010-12-29T14:28:57.997" UserId="3536" Text="3D Camera Problem" />
  <row Id="13807" PostHistoryTypeId="3" PostId="6916" RevisionGUID="6bd80683-80ea-4eca-a4ee-970f8bbf54a9" CreationDate="2010-12-29T14:28:57.997" UserId="3536" Text="&lt;3d&gt;&lt;camera&gt;" />
  <row Id="13811" PostHistoryTypeId="2" PostId="6918" RevisionGUID="fd30c114-17b9-459a-995d-f1fbf8471e95" CreationDate="2010-12-29T15:03:56.730" UserId="2332" Text="Use Sprites in Direct3D 9. Very simple way of creating 2D objects in a 3D space.&#xD;&#xA;&#xD;&#xA;There's a tutorial here: [Sprite Tutorial][1]&#xD;&#xA;&#xD;&#xA;I've used sprites to create a 2D HUD in my 3D games and they turn out pretty well.&#xD;&#xA;&#xD;&#xA;To draw lines, just use the D3DPT_LINELIST or D3DPT_LINESTRIP primitives with DrawPrimitive().&#xD;&#xA;&#xD;&#xA;Drawing Arcs might be a little bit more difficult. You could look into drawing Bezier curves for that: [Bezier Curves][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.toymaker.info/Games/html/sprites.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/B%C3%A9zier_curve" />
  <row Id="13814" PostHistoryTypeId="2" PostId="6919" RevisionGUID="bef3e541-dab8-419a-8757-62117b0c5746" CreationDate="2010-12-29T17:06:35.470" UserId="4484" Text="I don't know why you think you should use UDP. A RTS or similar can benefit from running the simulation consistently on all nodes, which means that the ordering of messages is vital to avoid going out of sync. This means that you need to essentially do everything that TCP does anyway, so using UDP is not necessary.&#xD;&#xA;&#xD;&#xA;So you'd typically have the stream being a sequence of commands. Or rather, a stream of &quot;tick&quot; messages each containing a command-list. The command-list would be executed, in sequence, by each node playing the game (and the server). Provided the simulation is deterministic, nobody would be out of sync.&#xD;&#xA;&#xD;&#xA;You can certainly extend that to a height map modification. So for example, you have a type of unit which has a command called &quot;do some terraforming&quot;, in which they modify the map in a specific way, over the subsequent ticks. No data need be transferred *at all* except for the initial command, as the consistent simulations on each node will take care of terraforming their own height maps in a completely consistent way.&#xD;&#xA;&#xD;&#xA;Note that to do this kind of approach, the player's actions (clicking widgets in the UI which have some effect, or commanding individual units / groups of units) need to be sent to the server, NOT EXECUTED LOCALLY. The server will then receive them at some point, and insert them into the tick-stream at an appropriate point, at which point they then take effect.&#xD;&#xA;&#xD;&#xA;But as RTS are basically not very time critical, this won't matter in the slightest. The player will hardly notice any lag.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This is possibly not the only strategy for running a simulation game, but it is one which has been used by several games and works pretty well (if your code is bug-free).&#xD;&#xA;&#xD;&#xA;In summary:&#xD;&#xA;&#xD;&#xA;* Each client starts with a consistent world view, which they download from the server as a bulk download when they connect or at the start of the game&#xD;&#xA;* Simulation happens in a series of ticks, which are fixed-timestep and completely deterministic (&quot;random&quot; events need to be pseudorandom seeded in a consistent way on all clients)&#xD;&#xA;* The client only ever sends commands which change behaviour or carry out actions to the server; it does not execute them locally.&#xD;&#xA;* The server sends a sequence of commands per tick to each client, in the order it expects to execute them, and also executes them locally.&#xD;&#xA;&#xD;&#xA;You can use TCP for this, because it's extremely dependent on the reliable, in-order delivery of messages, which is what TCP works well at.&#xD;&#xA;&#xD;&#xA;This system sends very little data over the network, because the amount of data generated by a player is essentially limited by how much they can click the mouse (or whatever), NOT how many tanks, troops etc, they have.&#xD;&#xA;&#xD;&#xA;No messages change hands to indicate that a unit who was already doing something, is continuing. Or indeed, anything which happens autonomously. Entire battles can take place without a single message (except &quot;tick&quot; timestamps) changing hands (assuming all the players are happy to sit back and watch)." />
  <row Id="13815" PostHistoryTypeId="2" PostId="6920" RevisionGUID="8071b115-ed7b-45ef-876b-9d93232d2bef" CreationDate="2010-12-29T17:35:23.270" UserId="4193" Text="I have been banging my head against the wall trying to get a sky sphere to work appropriately in XNA 4.0. I have the sphere loading correctly, and even textured, but i would like something a little more dynamic that can support a day/night cycle.&#xD;&#xA;&#xD;&#xA;My issue is that, while i know a good amount of C# and XNA, i know next to nothing about HLSL. (I could make an ambient light shader if my life depended on it...) I also have not been able to find a tutorial on how to build a sky sphere like this. Of course i don't expect to be able to make an amazing one right off the bat, i would like to start small, with a dynamic coloring sky i'll work out the clouds and sun later.&#xD;&#xA;&#xD;&#xA;My first question:&#xD;&#xA;Does anyone know of any good tutorial sites that could help me get a decent grasp around HLSL?&#xD;&#xA;&#xD;&#xA;Second:&#xD;&#xA;Does anyone have a good example of or know where to find one of a gradient sky using XNA and C#?" />
  <row Id="13816" PostHistoryTypeId="1" PostId="6920" RevisionGUID="8071b115-ed7b-45ef-876b-9d93232d2bef" CreationDate="2010-12-29T17:35:23.270" UserId="4193" Text="C# XNA - Sky Sphere Question" />
  <row Id="13817" PostHistoryTypeId="3" PostId="6920" RevisionGUID="8071b115-ed7b-45ef-876b-9d93232d2bef" CreationDate="2010-12-29T17:35:23.270" UserId="4193" Text="&lt;game-design&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="13818" PostHistoryTypeId="2" PostId="6921" RevisionGUID="8a73db43-a602-42cf-a14d-bf24ef3b13f4" CreationDate="2010-12-29T18:53:14.007" UserId="4294" Text="Having to progress through levels is probably more fun for a puzzle game. That said, you have 5 level-sets, so you could force sequential progression on those 5, while allowing the player to go through the sub-levels (of the current set) in any order.&#xD;&#xA;&#xD;&#xA;Too many hints and cheats allow the player to bypass the challenge. It will make the game less fun. Give the player credit - s/he will rise to the level of the game (within reason... you can't require them to understand quantum physics to win). Make it too easy, and they will lose motivation.&#xD;&#xA;&#xD;&#xA;I would try to make sure that **by the time they might get stuck**, they have enough **invested** in the game that they don't want to quit. So ramp up the difficulty gradually in those first 30 levels. Provide *enough* challenge, but make it unlikely to get stuck in the early stages. That way, the player starts having to really think on level 25 or 35 or 45, and by that time they have (we hope) formed goals and attachments within the game. Since they've already spent x hours mastering the gameplay, and assuming those hours were fun and rewarding, they won't want to waste that investment by quitting and uninstalling ;)" />
  <row Id="13819" PostHistoryTypeId="5" PostId="6921" RevisionGUID="191ec52b-1a08-40f5-b3bf-5a28c824c245" CreationDate="2010-12-29T18:58:54.067" UserId="4294" Comment="added 95 characters in body" Text="Having to progress through levels is probably more fun for a puzzle game. That said, you have 5 level-sets, so you could force sequential progression on those 5, while allowing the player to go through the sub-levels (of the current set) in any order.&#xD;&#xA;&#xD;&#xA;Too many hints and cheats allow the player to bypass the challenge. Games are about challenge, so letting players out of the challenge can be harmful if overdone. It will make the game less fun. Give the player credit - s/he will rise to the level of the game (within reason... you can't require them to understand quantum physics to win). Make it too easy, and they will lose motivation.&#xD;&#xA;&#xD;&#xA;I would try to make sure that **by the time they might get stuck**, they have enough **invested** in the game that they don't want to quit. So ramp up the difficulty gradually in those first 30 levels. Provide *enough* challenge, but make it unlikely to get stuck in the early stages. That way, the player starts having to really think on level 25 or 35 or 45, and by that time they have (we hope) formed goals and attachments within the game. Since they've already spent x hours mastering the gameplay, and assuming those hours were fun and rewarding, they won't want to waste that investment by quitting and uninstalling ;)" />
  <row Id="13820" PostHistoryTypeId="2" PostId="6922" RevisionGUID="fe177058-2d65-4b92-a778-e5d81d14938e" CreationDate="2010-12-29T19:09:47.977" UserId="4296" Text="I've built something like what you're looking for.  I used this site mostly as a reference for the map build process.&#xD;&#xA;[BUGS Geodesic Map][1]&#xD;&#xA;&#xD;&#xA;The basic steps:&#xD;&#xA;&#xD;&#xA; - Create an icosahedron.  Each 'cell' will be one of the vertices on the mesh.  Subdivide to desired resolution.&#xD;&#xA; - Treat each icosahedron vertex as the cell center - the geogrid's cell vertices are the midpoints of each icosahedron triangle face.&#xD;&#xA; - Using the indices of the icosahedron mesh, you can lookup cell neighbors and built up their correct order - this will let you build the cell faces correctly.&#xD;&#xA; - You will have 12 pentagons and the rest will be hexagons - there's no way around this.&#xD;&#xA; - Some people I've seen like to try and convert down to a 2d grid (examples of the process on the BUGS site), and it's possible.  I never did this because it's hard and can be worked around.&#xD;&#xA;&#xD;&#xA;In mine, the whole grid is one giant mesh, not repeated cell models (http://blog.chronoclast.com/search/label/OTD).  For lower mesh resolutions this runs okay.  If you're looking at tens of thousands of cells, you'll want to explore more dynamic mesh building - mine is all pre-built.  Cells are textured off a page-map (2/9/16... textures per image) and can blend uv's (that was hard, took forever, still kind of meh).&#xD;&#xA;&#xD;&#xA;  [1]: http://kiwi.atmos.colostate.edu/BUGS/geodesic/" />
  <row Id="13821" PostHistoryTypeId="5" PostId="1821" RevisionGUID="6ba43278-db1e-4b5f-bdf0-7b80495df051" CreationDate="2010-12-29T23:09:04.027" UserId="721" Comment="added 345 characters in body" Text="I port Irrlicht on Android and use it for 2D games. It is not the best solution but i have strong performances. I tried many Java Frameworks but the Garbage Collector can lag your games during 0.2s on G1 phone... So the framework should do allocation very carefully.&#xD;&#xA;&#xD;&#xA;My opinions on these frameworks:&#xD;&#xA;&#xD;&#xA; - unity3D: very good but commercial (available on Android, iOS, Web, Windows, OS X)&#xD;&#xA; - Unreal Engine3D: the best engine but not for beginers.&#xD;&#xA; - AndEngine: good performance. For documentation, look examples and read source code&#xD;&#xA; - cocos2d for Android: Garbage Collector problem&#xD;&#xA; - SDL is not a good Idea because designed for framebuffer access. But with Froyo, we can use a native API for Bitmap&#xD;&#xA; - rokon: good performance and designed for mobile but project seems dead.&#xD;&#xA;&#xD;&#xA;Physics Engine:&#xD;&#xA;&#xD;&#xA; - box2d: fast and easy&#xD;&#xA; - jbox2d is so slow on Java that i made a JNI wrapper with SWIG to use native box2d (AndEngine does the same)&#xD;&#xA; - chipmunk: fast but i prefer box2d&#xD;&#xA;&#xD;&#xA;Warning, with Froyo and JIT, Java libraries perform much better. But the Garbage Collector problems are always valid. With Gingerbread, the garbage collector is&#xD;&#xA;continous so no problem." />
  <row Id="13822" PostHistoryTypeId="5" PostId="1821" RevisionGUID="a76ced7b-5225-4e09-9d69-581f12a4b31a" CreationDate="2010-12-29T23:20:34.667" UserId="721" Comment="added 281 characters in body; added 81 characters in body; added 2 characters in body" Text="I port Irrlicht on Android and use it for 2D games. It is not the best solution but i have strong performances. I tried many Java Frameworks but the Garbage Collector can lag your games during 0.2s on G1 phone... So the framework should do allocation very carefully.&#xD;&#xA;&#xD;&#xA;Commercial C++ frameworks:&#xD;&#xA;&#xD;&#xA; - unity3D: very good (available on Android, iOS, Web, Windows, OS X) [Game: Rocket Bunnies]&#xD;&#xA; - Unreal Engine3D (commercial): the best engine but not for beginners [Game: Dungeon Defenders]&#xD;&#xA;&#xD;&#xA;Open Source C++ frameworks:&#xD;&#xA;&#xD;&#xA; - Ogre3D: the best open source 3d engine but it is a large framework&#xD;&#xA; - Irrlicht: good performance, light framework [Game: Moblox]&#xD;&#xA;&#xD;&#xA;Java Open Source Frameworks:&#xD;&#xA;&#xD;&#xA; - AndEngine (Open Source): good performance. For documentation, look examples and read source code; but it is the Free library to begin a game project [Game: Drop Block]&#xD;&#xA; - cocos2d for Android: Garbage Collector problem&#xD;&#xA; - SDL is not a good idea because it is designed for framebuffer access.&#xD;&#xA; - rokon: good performance and designed for mobile but project seems dead.&#xD;&#xA;&#xD;&#xA;Physics Engine:&#xD;&#xA;&#xD;&#xA; - box2d (OpenSource): fast and easy&#xD;&#xA; - jbox2d (OpenSource): so slow on Java that i made a JNI wrapper with SWIG to use native box2d (AndEngine does the same)&#xD;&#xA; - chipmunk (OpenSource): fast but i prefer box2d&#xD;&#xA; - bullet (OpenSource): excellent 3D engine&#xD;&#xA;&#xD;&#xA;Warning, with Froyo and JIT, Java libraries perform much better. But the Garbage Collector problems are always valid. With Gingerbread, the garbage collector is&#xD;&#xA;continous so no problem." />
  <row Id="13823" PostHistoryTypeId="5" PostId="1160" RevisionGUID="1a5e2091-e2a3-4dba-9b94-3d2e1e48aa58" CreationDate="2010-12-29T23:34:40.547" UserId="721" Comment="added 7 characters in body" Text="There is two OpenGL ES versions available on Android:&#xD;&#xA;&#xD;&#xA; - OpenGL ES 1.x (1.0 or 1.1): a subset of OpenGL 1.5 without immediate commands&#xD;&#xA;    - no glBegin/glEnd&#xD;&#xA;    - no Quad or Polygon support&#xD;&#xA; - OpenGL ES 2.0: a subset of OpenGL 3.X without fixed pipeline&#xD;&#xA;    - vertex shaders&#xD;&#xA;    - fragment shaders&#xD;&#xA;    - geometry shaders are not available&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Warning, OpenGL ES 2.0 is not compatible with OpenGL ES 1.X!&#xD;&#xA;&#xD;&#xA;Almost all Android phones have OpenGL 1.X GPU and most have 2.0.&#xD;&#xA;OpenGL ES 2.0 is only available with Android 2.x or newer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="13824" PostHistoryTypeId="16" PostId="115" RevisionGUID="5298e5dd-3542-4161-a232-f1f5d29ae489" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13825" PostHistoryTypeId="16" PostId="156" RevisionGUID="90e50907-dfbf-4581-a64c-c52102c89b03" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13826" PostHistoryTypeId="16" PostId="167" RevisionGUID="328eed6c-42ac-4c44-bfd9-d7254b7628c1" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13827" PostHistoryTypeId="16" PostId="253" RevisionGUID="fc88e8a2-8229-4666-a1fb-e4ace42bd69a" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13828" PostHistoryTypeId="16" PostId="916" RevisionGUID="2fe10747-c9d7-4c9f-a4f9-d5f0164f4415" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13829" PostHistoryTypeId="16" PostId="1797" RevisionGUID="cfbfc1f8-8867-4883-b69f-5eb8a80284f5" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13830" PostHistoryTypeId="16" PostId="1803" RevisionGUID="a746e82a-1aba-4954-bf9d-abc3da00ba08" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13831" PostHistoryTypeId="16" PostId="1819" RevisionGUID="28885306-b6b3-4690-9c16-a6ec822d6bfe" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13832" PostHistoryTypeId="16" PostId="1821" RevisionGUID="98d83b9f-70dc-4047-a866-b4de89685fe9" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13833" PostHistoryTypeId="16" PostId="1851" RevisionGUID="434f9e3e-46de-4ac4-b884-6d84b3e22875" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13834" PostHistoryTypeId="16" PostId="6909" RevisionGUID="b4b2d8ac-ffbc-4961-8f59-96a7b6451ea8" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13835" PostHistoryTypeId="16" PostId="89" RevisionGUID="4f8553a6-bad2-4d9b-9d85-973a576cbdb2" CreationDate="2010-12-30T00:58:46.003" UserId="51" />
  <row Id="13842" PostHistoryTypeId="5" PostId="6879" RevisionGUID="ec834a1c-b4a8-4c55-aef0-ab09e6906e25" CreationDate="2010-12-30T05:22:08.137" UserId="4210" Comment="Edit; added 1 characters in body" Text="I assume this is a top down game.&#xD;&#xA;&#xD;&#xA;I've not tried Emini, but Box2D (or Chipmunk) isn't really suited to this as they are generally geared to side on views. There is an [article][1] on [GameDev][2] that might be of some use.&#xD;&#xA;&#xD;&#xA;I have seen some examples of faking it with box2D but the hacks they used meant things like skidding where out the question.&#xD;&#xA;&#xD;&#xA;I think Android devices should be able to handle it, it all depends on your implementation and graphics, sounds etc. however Android is becoming [fragmented][3] a little and it could be a problem on some devices.&#xD;&#xA;&#xD;&#xA;**EDIT:** As pointed out by bummzack, [b2FrictionJoint][4] exists for top down, I did a quick search and couldn't find anything else about Box2D and top down.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamedev.net/reference/programming/features/2dcarphys/&#xD;&#xA;[2]:http://www.gamedev.net&#xD;&#xA;[3]:http://www.appleinsider.com/articles/10/11/19/angry_birds_maker_apologizes_for_android_fragmentation_issues.html&#xD;&#xA;[4]:http://www.box2dflash.org/docs/2.1a/reference/Box2D/Dynamics/Joints/b2FrictionJoint.html" />
  <row Id="13843" PostHistoryTypeId="2" PostId="6927" RevisionGUID="47a13698-614d-4a68-ba61-8850995901e6" CreationDate="2010-12-30T05:34:38.407" UserId="503" Text="[Gamasutra's Expert Blogs][1]&#xD;&#xA;&#xD;&#xA;A combined feed with contributions from Gamasutra's experts. Each post is a unique story/perspective on an aspect of game development and business from various people in the industry.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/blogs/expert/" />
  <row Id="13844" PostHistoryTypeId="6" PostId="6920" RevisionGUID="98037c77-0850-4da3-a370-a9f2a63eef70" CreationDate="2010-12-30T05:36:01.097" UserId="288" Comment="edited tags" Text="&lt;c#&gt;&lt;xna-4.0&gt;&lt;hlsl&gt;&lt;sky&gt;" />
  <row Id="13845" PostHistoryTypeId="2" PostId="6928" RevisionGUID="fac8ea7c-a49b-4d88-815e-be694da5a334" CreationDate="2010-12-30T05:40:38.400" UserId="503" Text="[Gamer/Law][1]&#xD;&#xA;&#xD;&#xA;Posts articles about the legal side of games -- perhaps more about games than game dev, but probably interesting to some (aspiring) game developers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamerlaw.co.uk/http://www.tigsource.com/" />
  <row Id="13846" PostHistoryTypeId="2" PostId="6929" RevisionGUID="513bf19d-46c1-4373-92f5-beb4e9bb1ffe" CreationDate="2010-12-30T05:44:53.077" UserId="503" Text="[TIGSource][1] &#xD;&#xA;&#xD;&#xA;This is a prominent indie game dev community, with its own interesting RSS feed!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tigsource.com/" />
  <row Id="13847" PostHistoryTypeId="2" PostId="6930" RevisionGUID="8c8168f3-3897-4b9e-8de4-71f24a627d74" CreationDate="2010-12-30T05:49:01.420" UserId="503" Text="[Game career guide][1] has a free publication stating average salaries in different divisions of game dev companies. It confirms what's been said: programmers are paid more in general.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamecareerguide.com/news/29315/game_developer_debuts_free_2010_.php?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+GameCareerGuideNews+(Game+Career+Guide+News)&amp;utm_content=Google+Reader" />
  <row Id="13853" PostHistoryTypeId="2" PostId="6935" RevisionGUID="2ea104ca-b027-4d8b-9aa0-5bd00ddacda6" CreationDate="2010-12-30T11:59:15.787" UserId="4104" Text="I have created a rag doll using dynamic bodies (rectangles) and simple revolute joints (with lower and upper angles). When my rag doll hits the ground (which is a static body) the bodies seem to fidget and the joints separate.&#xD;&#xA;&#xD;&#xA;It looks like the bodies are sticking to the ground, and the momentum of the rag doll pulls the joint apart (see screenshot below).&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;I'm not sure if it's related, but I'm using the Badlogic GDX Java wrapper for Box2D. Here's some snippets of what I think is the most relevant code:&#xD;&#xA;&#xD;&#xA;	private RevoluteJoint joinBodyParts(&#xD;&#xA;		Body a, Body b, Vector2 anchor, &#xD;&#xA;		float lowerAngle, float upperAngle) {&#xD;&#xA;&#xD;&#xA;		RevoluteJointDef jointDef = new RevoluteJointDef();&#xD;&#xA;		&#xD;&#xA;		jointDef.initialize(a, b, a.getWorldPoint(anchor));&#xD;&#xA;		&#xD;&#xA;		jointDef.enableLimit = true;&#xD;&#xA;		jointDef.lowerAngle = lowerAngle;&#xD;&#xA;		jointDef.upperAngle = upperAngle;&#xD;&#xA;		&#xD;&#xA;		return (RevoluteJoint)world.createJoint(jointDef);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	private Body createRectangleBodyPart(&#xD;&#xA;		float x, float y, float width, float height) {&#xD;&#xA;		&#xD;&#xA;		PolygonShape shape = new PolygonShape();&#xD;&#xA;		shape.setAsBox(width, height);&#xD;&#xA;		&#xD;&#xA;		BodyDef bodyDef = new BodyDef();&#xD;&#xA;		bodyDef.type = BodyType.DynamicBody;&#xD;&#xA;		bodyDef.position.y = y;&#xD;&#xA;		bodyDef.position.x = x;&#xD;&#xA;		&#xD;&#xA;		Body body = world.createBody(bodyDef);&#xD;&#xA;		&#xD;&#xA;		FixtureDef fixtureDef = new FixtureDef();&#xD;&#xA;		fixtureDef.shape = shape;&#xD;&#xA;		fixtureDef.density = 10;&#xD;&#xA;		&#xD;&#xA;		fixtureDef.filter.groupIndex = -1;&#xD;&#xA;		fixtureDef.filter.categoryBits = FILTER_BOY;&#xD;&#xA;		fixtureDef.filter.maskBits = FILTER_STUFF | FILTER_WALL;&#xD;&#xA;		&#xD;&#xA;		body.createFixture(fixtureDef);&#xD;&#xA;		shape.dispose();&#xD;&#xA;		&#xD;&#xA;		return body;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;I've skipped the method for creating the head, as it's pretty much the same as the rectangle method (just using a cricle shape).&#xD;&#xA;&#xD;&#xA;Those methods are used like so:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		torso = createRectangleBodyPart(x, y + 5, 0.25f, 1.5f);&#xD;&#xA;		Body head = createRoundBodyPart(x, y + 7.4f, 1);&#xD;&#xA;		&#xD;&#xA;		Body leftLegTop = createRectangleBodyPart(x, y + 2.7f, 0.25f, 1);&#xD;&#xA;		Body rightLegTop = createRectangleBodyPart(x, y + 2.7f, 0.25f, 1);&#xD;&#xA;		Body leftLegBottom = createRectangleBodyPart(x, y + 1, 0.25f, 1);&#xD;&#xA;		Body rightLegBottom = createRectangleBodyPart(x, y + 1, 0.25f, 1);&#xD;&#xA;		&#xD;&#xA;		Body leftArm = createRectangleBodyPart(x, y + 5, 0.25f, 1.2f);&#xD;&#xA;		Body rightArm = createRectangleBodyPart(x, y + 5, 0.25f, 1.2f);&#xD;&#xA;		&#xD;&#xA;		joinBodyParts(torso, head, new Vector2(0, 1.6f), headAngle);&#xD;&#xA;		&#xD;&#xA;		leftLegTopJoint = joinBodyParts(torso, leftLegTop, new Vector2(0, -1.2f), 0.1f, legAngle);&#xD;&#xA;		rightLegTopJoint = joinBodyParts(torso, rightLegTop, new Vector2(0, -1.2f), 0.1f, legAngle);&#xD;&#xA;		leftLegBottomJoint = joinBodyParts(leftLegTop, leftLegBottom, new Vector2(0, -1), -legAngle * 1.5f, 0);&#xD;&#xA;		rightLegBottomJoint = joinBodyParts(rightLegTop, rightLegBottom, new Vector2(0, -1), -legAngle * 1.5f, 0);&#xD;&#xA;		&#xD;&#xA;		leftArmJoint = joinBodyParts(torso, leftArm, new Vector2(0, 1), -armAngle * 0.7f, armAngle);&#xD;&#xA;		rightArmJoint = joinBodyParts(torso, rightArm, new Vector2(0, 1), -armAngle * 0.7f, armAngle);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/aclzK.png" />
  <row Id="13854" PostHistoryTypeId="1" PostId="6935" RevisionGUID="2ea104ca-b027-4d8b-9aa0-5bd00ddacda6" CreationDate="2010-12-30T11:59:15.787" UserId="4104" Text="What causes Box2D revolute joints to separate?" />
  <row Id="13855" PostHistoryTypeId="3" PostId="6935" RevisionGUID="2ea104ca-b027-4d8b-9aa0-5bd00ddacda6" CreationDate="2010-12-30T11:59:15.787" UserId="4104" Text="&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="13860" PostHistoryTypeId="2" PostId="6938" RevisionGUID="232c9cee-8d87-4d28-9272-4a52ed56ee72" CreationDate="2010-12-30T12:50:44.607" UserId="744" Text="Box2D uses an &lt;a href=&quot;http://en.wikipedia.org/wiki/Iterative_algorithm&quot;&gt;iterative&lt;/a&gt;, rather than &lt;a href=&quot;http://en.wikipedia.org/wiki/Closed-form_expression&quot;&gt;closed form&lt;/a&gt; solver. This means _all_ constraints are somewhat soft. Box2D will try very hard to do what you say, but inaccuracies do occur.&#xD;&#xA;&#xD;&#xA;To minimize this, there are several things you can do, in order of importance:&#xD;&#xA;&#xD;&#xA; * Use fixed-size timesteps (the first argument to `Step`). This makes the solver more stable - your inaccuracies are more likely to cancel each other out, or at least behave the same each time.&#xD;&#xA; * Use a smaller timestep (1/60 or 1/120 instead of 1/30). Smaller timesteps mean smaller inaccuracies.&#xD;&#xA; * Use more solver iterations (the 2nd/3rd argument to `Step`). You should try to get at least 10 of each. More solver iterations means more chances each timestep to find stability and correctly satisfy constraints - roughly, less chance of inaccuracy. However, a smaller, stabler timestep is better than more iterations. Given sufficiently complicated constraints, you might never solve them 100% correctly, so try reducing the timestep before increasing the iterations.&#xD;&#xA; * Use less dense shapes. Density 10 is pretty heavy. Try standardizing on something smaller - like 1 - as your default density." />
  <row Id="13861" PostHistoryTypeId="6" PostId="6648" RevisionGUID="4b2cf07e-ff48-48e0-8687-55c707026d5e" CreationDate="2010-12-30T13:08:33.807" UserId="744" Comment="edited tags" Text="&lt;programming&gt;&lt;mmo&gt;&lt;api&gt;" />
  <row Id="13864" PostHistoryTypeId="5" PostId="6928" RevisionGUID="225197d0-91f5-4dee-bc6c-ab6993cfbdd0" CreationDate="2010-12-30T14:59:12.920" UserId="14" Comment="deleted 25 characters in body" Text="[Gamer/Law][1]&#xD;&#xA;&#xD;&#xA;Posts articles about the legal side of games -- perhaps more about games than game dev, but probably interesting to some (aspiring) game developers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamerlaw.co.uk/" />
  <row Id="13865" PostHistoryTypeId="6" PostId="3223" RevisionGUID="fa562d0a-859b-438e-9c6a-daa10eb11ad4" CreationDate="2010-12-30T15:03:53.007" UserId="14" Comment="edited tags" Text="&lt;game-design&gt;&lt;resources&gt;&lt;blog&gt;" />
  <row Id="13866" PostHistoryTypeId="2" PostId="6939" RevisionGUID="6ce5763d-de21-4a44-a245-e27558e66437" CreationDate="2010-12-30T15:34:40.393" UserId="141" Text="So, as the title says, I want to be able to play NSF files using FMOD, because my project already uses FMOD and I'd rather not replace it. This will involve figuring out how existing players and emulators work and porting it. I haven't yet found an existing player that uses FMOD.&#xD;&#xA;&#xD;&#xA;My starting point is the MyNes source from http://sourceforge.net/projects/mynes/. There are two big steps between here and what I'm looking for.&#xD;&#xA;&#xD;&#xA;1. MyNes plays from a ROM, not NSF. So, I have to rip out the APU and get it to play NSF files.&#xD;&#xA;2. The MyNes APU uses SlimDX, so I have to convert that to FMOD.NET.&#xD;&#xA;&#xD;&#xA;I am really stuck about how to go about either of these, because I'm not that familiar with audio formats and it's hard finding resources online. So here are a few questions:&#xD;&#xA;&#xD;&#xA;1. From what I can tell from the NSF spec at http://kevtris.org/nes/nsfspec.txt, it's just contains the relevant memory section of the ROM, plus the header. If anyone can verify or correct this that would be great.&#xD;&#xA;2. The emulator APU uses data from the rest of the emulator to play, including things like cycle counts. I'm not sure what replaces this in a standalone player. Can't I just load all the music data at once into a stream and play it?&#xD;&#xA;3. Joining #1 and #2, does the header data from the NSF substitute for some of the ROM data in the emulator code?&#xD;&#xA;4. Using FMOD, will I be following the usercreatedsound example for loading a stream? And does this format count as PCM? Specifically MyNes says PCM8. Any tips on loading / playing the stream in FMOD are appreciated.&#xD;&#xA;&#xD;&#xA;As an aside, I don't really understand the loading / playing sections of the spec I linked at all. It seems to apply to 6502 systems / emulators only and not to my situation.&#xD;&#xA;&#xD;&#xA;I know it's a long shot for anyone here to have enough experience in this area to help, but anything you can provide is definitely appreciated. A link to an existing .NET library that does this would be even better, but I don't believe one exists." />
  <row Id="13867" PostHistoryTypeId="1" PostId="6939" RevisionGUID="6ce5763d-de21-4a44-a245-e27558e66437" CreationDate="2010-12-30T15:34:40.393" UserId="141" Text="Playing NSF music in FMOD.net" />
  <row Id="13868" PostHistoryTypeId="3" PostId="6939" RevisionGUID="6ce5763d-de21-4a44-a245-e27558e66437" CreationDate="2010-12-30T15:34:40.393" UserId="141" Text="&lt;c#&gt;&lt;audio&gt;&lt;fmod&gt;" />
  <row Id="13869" PostHistoryTypeId="2" PostId="6940" RevisionGUID="867441dd-6fdc-4423-9e8c-26778e90f316" CreationDate="2010-12-30T15:37:33.803" UserId="3536" Text="I am not sure if I should post this link, but I feel this falls into game development just as much as it does math. I have a ray cast's far and near values and I am trying to calculate the end point of the ray so that I can either draw a line to show the ray, or render an object at the end of 3d mouse position.&#xD;&#xA;&#xD;&#xA;Here is my post on the stack overflow math site, if there is a problem with me doing this just close the thread. Thank you.&#xD;&#xA;http://math.stackexchange.com/questions/15918/help-with-matrix-mathematica" />
  <row Id="13870" PostHistoryTypeId="1" PostId="6940" RevisionGUID="867441dd-6fdc-4423-9e8c-26778e90f316" CreationDate="2010-12-30T15:37:33.803" UserId="3536" Text="3D Ray Casting / Picking" />
  <row Id="13871" PostHistoryTypeId="3" PostId="6940" RevisionGUID="867441dd-6fdc-4423-9e8c-26778e90f316" CreationDate="2010-12-30T15:37:33.803" UserId="3536" Text="&lt;3d&gt;&lt;camera&gt;&lt;ray-casting&gt;" />
  <row Id="13872" PostHistoryTypeId="2" PostId="6941" RevisionGUID="711b9372-a2fa-48f8-aff8-d65b124dab69" CreationDate="2010-12-30T15:57:35.060" UserId="4296" Text="[Indiegamepod][1]&#xD;&#xA;&#xD;&#xA;Interviews with various indie developers as well as some guest columns musing on random game topics.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.indiegamepod.com/" />
  <row Id="13873" PostHistoryTypeId="2" PostId="6942" RevisionGUID="98e22804-bc69-44fc-8845-dbea8081c823" CreationDate="2010-12-30T16:18:13.193" UserId="1156" Text="If you take any turn based RPG game there will be large periods of time when nothing is happening because the game is looping over 'wait_for_player_input'. Naturally it seems sensible to use this time to update things.&#xD;&#xA;&#xD;&#xA;However, this immediately seems to suggest that it would need to be threaded. Is this sort of design possible in a single thread?&#xD;&#xA;&#xD;&#xA;    loop:  &#xD;&#xA;    if not check_something_pressed:  &#xD;&#xA;        update_a_very_small_amount  &#xD;&#xA;    else  &#xD;&#xA;      keep going&#xD;&#xA;&#xD;&#xA;But if we says 'a_very_small_amount' is only updating a single object each loop, it's going to be very slow at updating. &#xD;&#xA;&#xD;&#xA;How would you go about this, preferably in a single thread?&#xD;&#xA;&#xD;&#xA;EDIT: I've tagged this language-agnostic as that seems the sensible thing, though anything more specific to Python would be great. ;-)" />
  <row Id="13874" PostHistoryTypeId="1" PostId="6942" RevisionGUID="98e22804-bc69-44fc-8845-dbea8081c823" CreationDate="2010-12-30T16:18:13.193" UserId="1156" Text="Using idle time in turn-based (RPG)  games for updating" />
  <row Id="13875" PostHistoryTypeId="3" PostId="6942" RevisionGUID="98e22804-bc69-44fc-8845-dbea8081c823" CreationDate="2010-12-30T16:18:13.193" UserId="1156" Text="&lt;architecture&gt;&lt;language-agnostic&gt;&lt;rpg&gt;&lt;gameloop&gt;&lt;turn-based&gt;" />
  <row Id="13876" PostHistoryTypeId="2" PostId="6943" RevisionGUID="d253682b-1841-42fd-8f4e-badb68799055" CreationDate="2010-12-30T16:34:40.190" UserDisplayName="roger15" Text="I want to ask you about some resources to learn simulating soft bodies, do you know some good knowladge sources ?&#xD;&#xA;I asking beacouse I want to make car crash simulator, I make something but it didn't work good :/" />
  <row Id="13877" PostHistoryTypeId="1" PostId="6943" RevisionGUID="d253682b-1841-42fd-8f4e-badb68799055" CreationDate="2010-12-30T16:34:40.190" UserDisplayName="roger15" Text="Soft body, where to start learning?" />
  <row Id="13878" PostHistoryTypeId="3" PostId="6943" RevisionGUID="d253682b-1841-42fd-8f4e-badb68799055" CreationDate="2010-12-30T16:34:40.190" UserDisplayName="roger15" Text="&lt;physics&gt;" />
  <row Id="13880" PostHistoryTypeId="2" PostId="6945" RevisionGUID="12da177b-fbb5-47a7-9da7-ed316bf4ff9e" CreationDate="2010-12-30T16:41:12.090" UserId="3794" Text="I think that you don't know 3D position of the clicked point, because otherwise it would be easy :). &#xD;&#xA;&#xD;&#xA;So if you know 3D position of the clicked point in origin basis then you can calculate far and near points like this: &#xD;&#xA;&#xD;&#xA;    nearPoint3D = cameraposition3D&#xD;&#xA;    farPoint3D = cameraposition3D + (normalize(clickedPoint3D - cameraposition3D) * zFar)&#xD;&#xA;&#xD;&#xA;The problematic part is `clickedPoint3D`. You can compute it nicely with help of view and projection matrices. As you are using opengl i suppose that you have them. view * projection matrix converts 3D points to the 2D screen space. You can use inverted viewprojection matrix and get matrix which converts 2D points to the 3D space. &#xD;&#xA;&#xD;&#xA;    pseudo code and some openGl:&#xD;&#xA;    &#xD;&#xA;    //define matrices&#xD;&#xA;    Matrix4x4 g_CameraViewMatrix;&#xD;&#xA;    Matrix4x4 g_CameraProjectionMatrix;&#xD;&#xA;    &#xD;&#xA;    //read projection matrix&#xD;&#xA;    glMatrixMode(GL_PROJECTION);    &#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPerspective(...); //your perspective function&#xD;&#xA;    glGetFloatv(GL_PROJECTION_MATRIX, &amp;g_CameraProjectionMatrix.m[0]); //returns matrix as float array&#xD;&#xA;    &#xD;&#xA;    //read view matrix&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    glLookAt(...); //you lookat function or whatever - NO translation,rotations or anything else for getting camera matrix!&#xD;&#xA;    glGetFloatv(GL_MODELVIEW_MATRIX, &amp;g_CameraViewMatrix.m[0]);  &#xD;&#xA;    &#xD;&#xA;    //compute 3D position of clicked point&#xD;&#xA;    Matrix4x4 viewProjInv = (g_LightViewMatrix * g_CameraViewMatrix).getInverse();&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,1.0f,1.0f); // Z have to be between 0 - 1 and W have to be 1&#xD;&#xA;    vector4D clickedPointIn3DOrigin = viewProjInv * clickedPointOnSreen; &#xD;&#xA;    vector3D clickedPoint3D = clickedPointIn3DOrigin.xyz; &#xD;&#xA;&#xD;&#xA;Note that you can use this to compute 3D points of zNear and zFar really easily:&#xD;&#xA;&#xD;&#xA;`vector4D clickedPointOnSreen = (x_screen,y_screen,1.0f,1.0f); ` will produce 3D position of zFar and `vector4D clickedPointOnSreen = (x_screen,y_screen,0.0f,1.0f); ` will produce 3D position of zNear. &#xD;&#xA;&#xD;&#xA;**Isn't that algebra wonderful? :)**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To learn something about projection matrix you can read this [what-is-the-purpose-of-the-canonical-view-volume][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6279/what-is-the-purpose-of-the-canonical-view-volume" />
  <row Id="13881" PostHistoryTypeId="5" PostId="6945" RevisionGUID="d1f3802b-b3f3-4747-94ea-1db1c8b6a093" CreationDate="2010-12-30T16:55:09.060" UserId="3794" Comment="improved formating" Text="I think that you don't know 3D position of the clicked point, because otherwise it would be easy :). &#xD;&#xA;&#xD;&#xA;So if you know 3D position of the clicked point in origin basis then you can calculate far and near points like this: &#xD;&#xA;&#xD;&#xA;    nearPoint3D = cameraposition3D&#xD;&#xA;    farPoint3D = cameraposition3D + (normalize(clickedPoint3D - cameraposition3D) * zFar)&#xD;&#xA;&#xD;&#xA;The problematic part is `clickedPoint3D`. You can compute it nicely with help of view and projection matrices. As you are using opengl i suppose that you have them. view * projection matrix converts 3D points to the 2D screen space. You can use inverted viewprojection matrix and get matrix which converts 2D points to the 3D space. &#xD;&#xA;&#xD;&#xA;    pseudo code and some openGl:&#xD;&#xA;    &#xD;&#xA;    //define matrices&#xD;&#xA;    Matrix4x4 g_CameraViewMatrix;&#xD;&#xA;    Matrix4x4 g_CameraProjectionMatrix;&#xD;&#xA;    &#xD;&#xA;    //read projection matrix&#xD;&#xA;    glMatrixMode(GL_PROJECTION);    &#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPerspective(...); //your perspective function&#xD;&#xA;    glGetFloatv(GL_PROJECTION_MATRIX, &amp;g_CameraProjectionMatrix.m[0]); //returns matrix as float array&#xD;&#xA;    &#xD;&#xA;    //read view matrix&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    glLookAt(...); //you lookat function or whatever - NO translation,rotations or anything else for getting camera matrix!&#xD;&#xA;    glGetFloatv(GL_MODELVIEW_MATRIX, &amp;g_CameraViewMatrix.m[0]);  &#xD;&#xA;    &#xD;&#xA;    //compute 3D position of clicked point&#xD;&#xA;    Matrix4x4 viewProjInv = (g_LightViewMatrix * g_CameraViewMatrix).getInverse();&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,1.0f,1.0f); // Z have to be between 0 - 1 and W have to be 1&#xD;&#xA;    vector4D clickedPointIn3DOrigin = viewProjInv * clickedPointOnSreen; &#xD;&#xA;    vector3D clickedPoint3D = clickedPointIn3DOrigin.xyz; &#xD;&#xA;&#xD;&#xA;Note that you can use this to compute 3D points of zNear and zFar really easily:&#xD;&#xA;&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,1.0f,1.0f); // will produce 3D position of zFar&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,0.0f,1.0f); // will produce 3D position of zNear. &#xD;&#xA;&#xD;&#xA;**Isn't that algebra wonderful? :)**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To learn something about projection matrix you can read this [what-is-the-purpose-of-the-canonical-view-volume][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6279/what-is-the-purpose-of-the-canonical-view-volume" />
  <row Id="13882" PostHistoryTypeId="2" PostId="6946" RevisionGUID="9a97a502-9823-4312-a266-e136f95b2663" CreationDate="2010-12-30T17:37:46.100" UserId="51" Text="Are you trying to play arbitrary files or are you making a game and your source music is in a NSF file?  If it's the latter (for example a lot of shipped emulated games do this) then it would probably be easiest to just save out the wave from your sound file using some other software (like winamp) and play that. " />
  <row Id="13883" PostHistoryTypeId="5" PostId="6945" RevisionGUID="ee16a9b2-13c4-4f35-ae34-8689059f700e" CreationDate="2010-12-30T17:50:31.317" UserId="3794" Comment="added one word to make answer more clear" Text="I think that you don't know 3D position of the clicked point, because otherwise it would be easy :). &#xD;&#xA;&#xD;&#xA;So if you know 3D position of the clicked point in origin basis then you can calculate far and near points like this: &#xD;&#xA;&#xD;&#xA;    nearPoint3D = cameraposition3D&#xD;&#xA;    farPoint3D = cameraposition3D + (normalize(clickedPoint3D - cameraposition3D) * zFar)&#xD;&#xA;&#xD;&#xA;The problematic part is `clickedPoint3D`. You can compute it nicely with help of view and projection matrices. As you are using opengl i suppose that you have them. view * projection matrix converts 3D points to the 2D screen space. You can use inverted viewprojection matrix and get matrix which converts 2D screen points to the 3D space. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pseudo code and some openGl:&#xD;&#xA;    &#xD;&#xA;    //define matrices&#xD;&#xA;    Matrix4x4 g_CameraViewMatrix;&#xD;&#xA;    Matrix4x4 g_CameraProjectionMatrix;&#xD;&#xA;    &#xD;&#xA;    //read projection matrix&#xD;&#xA;    glMatrixMode(GL_PROJECTION);    &#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPerspective(...); //your perspective function&#xD;&#xA;    glGetFloatv(GL_PROJECTION_MATRIX, &amp;g_CameraProjectionMatrix.m[0]); //returns matrix as float array&#xD;&#xA;    &#xD;&#xA;    //read view matrix&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    glLookAt(...); //you lookat function or whatever - NO translation,rotations or anything else for getting camera matrix!&#xD;&#xA;    glGetFloatv(GL_MODELVIEW_MATRIX, &amp;g_CameraViewMatrix.m[0]);  &#xD;&#xA;    &#xD;&#xA;    //compute 3D position of clicked point&#xD;&#xA;    Matrix4x4 viewProjInv = (g_LightViewMatrix * g_CameraViewMatrix).getInverse();&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,1.0f,1.0f); // Z have to be between 0 - 1 and W have to be 1&#xD;&#xA;    vector4D clickedPointIn3DOrigin = viewProjInv * clickedPointOnSreen; &#xD;&#xA;    vector3D clickedPoint3D = clickedPointIn3DOrigin.xyz; &#xD;&#xA;&#xD;&#xA;Note that you can use this to compute 3D points of zNear and zFar really easily:&#xD;&#xA;&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,1.0f,1.0f); // will produce 3D position of zFar&#xD;&#xA;    vector4D clickedPointOnSreen = (x_screen,y_screen,0.0f,1.0f); // will produce 3D position of zNear. &#xD;&#xA;&#xD;&#xA;**Isn't that algebra wonderful? :)**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To learn something about projection matrix you can read this [what-is-the-purpose-of-the-canonical-view-volume][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6279/what-is-the-purpose-of-the-canonical-view-volume" />
  <row Id="13884" PostHistoryTypeId="2" PostId="6947" RevisionGUID="32a8e16d-3515-4bf1-afd9-ef49d255d88c" CreationDate="2010-12-30T17:51:45.963" UserId="4275" Text="**[DESIGNER NOTES][1]** &#xD;&#xA;&#xD;&#xA;It's written by Soren Johnson who was the lead designer on Civ 4 and involved in the design of Spore. It includes his columns from Game Developer Magazine and is the best game design specific blog that I know of.&#xD;&#xA;&#xD;&#xA;Some examples:&#xD;&#xA;&#xD;&#xA; - [Challenging Design][2]&#xD;&#xA; - [Playing the Odds][3]&#xD;&#xA; - [Sid's Rules][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designer-notes.com/&#xD;&#xA;  [2]: http://www.designer-notes.com/?p=179&#xD;&#xA;  [3]: http://www.designer-notes.com/?p=171&#xD;&#xA;  [4]: http://www.designer-notes.com/?p=119" />
  <row Id="13885" PostHistoryTypeId="2" PostId="6948" RevisionGUID="08ebe2fe-fbb5-4595-8237-a4682270b0a5" CreationDate="2010-12-30T17:59:52.457" UserId="2029" Text="[In the Games of Madness][1]&#xD;&#xA;&#xD;&#xA;The blog of Frictional Games. Creators of Penumbra and Amnesia: the Dark Descent.&#xD;&#xA;&#xD;&#xA;  [1]: http://frictionalgames.blogspot.com/" />
  <row Id="13886" PostHistoryTypeId="2" PostId="6949" RevisionGUID="c7f4e45f-12a6-4d57-937c-7df7d8c45a06" CreationDate="2010-12-30T18:35:59.340" UserId="4275" Text="Yes, its possible to do in a single thread. Generally speaking though, you'll want to be updating the objects every frame and not just when there are spare cycles. Your animations and movement will be disconnected from the frame rate and look rather choppy if you don't. If you're talking more about AI updates or something else that does not need to be real-time, I would put a timer on it. You should know what your target frame rate is and the idle time will be whatever is remaining after everything else has been completed.&#xD;&#xA;&#xD;&#xA;Let's say you're targeting 60 FPS for your game. That leaves you with 16.667 ms to perform all of the work you need to do each frame. At the beginning of the game, get the current time using the highest resolution timer available, add 16.667 ms to it and store it somewhere. I think the function in python is time() though it has been a while since I worked in the language. After your processing is complete, enter a loop that checks the current time against the time you've recorded. If the current time is less than the frame end time, update_a_very_small_amount. I wouldn't worry much about the processing going past the end of the frame since your small update should be quick to process. It would only be a slight delay to the start of the next frame and you appear to have enough idle time to handle it. &#xD;&#xA;&#xD;&#xA;After the frame has finished processing, add 16.667 ms to the time that was stored for the end of the last frame to find out where the end of the next frame should be. If you use the current time + 16.667 ms and the processing goes over, the end of the next frame will be pushed out by however much time the last frame ran over." />
  <row Id="13887" PostHistoryTypeId="2" PostId="6950" RevisionGUID="d657ab84-73ea-47ef-ad24-acada46e6494" CreationDate="2010-12-30T18:43:16.167" UserDisplayName="D T" Text="Have you thought about going retro?  Older games will obviously not have the bells and whistles you would expect, but the plus is that they have a much smaller code base.  Try structured steps too, If you wanted to make a game like Asteroids, step one might be set up the basic enviornment with a spaceship that can move and fire in any direction. Step two, add rocks that you can destroy. For the next step, vary the size of the rocks, or add missiles to your ship's arsenal.  The trick is, build a base app, expand on the idea, structure your versions so you can reuse the greatest amount of code possible for other projects.  Create your own personal code and resource library (if your not interested in creating your own models/sounds search out sites like thegamecreators.com, otherwise blender.org is a good place to look.  Blender is a (FREE)3D animation studio that is heavily supported and close to AAA quality. It has a built in game engine you can use to prototype ideas.).  The the more assets you have in your code library the less you have to build from scratch later(you also lessen the chance of reinventing the wheel!). " />
  <row Id="13888" PostHistoryTypeId="5" PostId="6942" RevisionGUID="98fee989-dcb8-4180-a64e-4e6a35cc6281" CreationDate="2010-12-30T19:02:59.713" UserId="1156" Comment="added 224 characters in body" Text="If you take any turn based RPG game there will be large periods of time when nothing is happening because the game is looping over 'wait_for_player_input'. Naturally it seems sensible to use this time to update things.&#xD;&#xA;&#xD;&#xA;However, this immediately seems to suggest that it would need to be threaded. Is this sort of design possible in a single thread?&#xD;&#xA;&#xD;&#xA;    loop:  &#xD;&#xA;    if not check_something_pressed:  &#xD;&#xA;        update_a_very_small_amount  &#xD;&#xA;    else  &#xD;&#xA;      keep going&#xD;&#xA;&#xD;&#xA;But if we says 'a_very_small_amount' is only updating a single object each loop, it's going to be very slow at updating. &#xD;&#xA;&#xD;&#xA;How would you go about this, preferably in a single thread?&#xD;&#xA;&#xD;&#xA;EDIT: I've tagged this language-agnostic as that seems the sensible thing, though anything more specific to Python would be great. ;-)&#xD;&#xA;&#xD;&#xA;Second edit: This game is not planning on having any animated components; that is, I'm currently running it as a wait-for-player-input then update everything and draw. So rather than X FPS it depends on the user's speed." />
  <row Id="13890" PostHistoryTypeId="5" PostId="6949" RevisionGUID="4c7041b3-3fe0-454d-97b1-b51deb204d87" CreationDate="2010-12-30T19:38:20.090" UserId="4275" Comment="added 636 characters in body; added 12 characters in body" Text="Yes, its possible to do in a single thread. Generally speaking though, you'll want to be updating the objects every frame and not just when there are spare cycles. Your animations and movement will be disconnected from the frame rate and look rather choppy if you don't. If you're talking more about AI updates or something else that does not need to be real-time, I would put a timer on it. You should know what your target frame rate is and the idle time will be whatever is remaining after everything else has been completed.&#xD;&#xA;&#xD;&#xA;Let's say you're targeting 60 FPS for your game. That leaves you with 16.667 ms to perform all of the work you need to do each frame. At the beginning of the game, get the current time using the highest resolution timer available, add 16.667 ms to it and store it somewhere. I think the function in python is time() though it has been a while since I worked in the language. After your processing is complete, enter a loop that checks the current time against the time you've recorded. If the current time is less than the frame end time, update_a_very_small_amount. I wouldn't worry much about the processing going past the end of the frame since your small update should be quick to process. It would only be a slight delay to the start of the next frame and you appear to have enough idle time to handle it. &#xD;&#xA;&#xD;&#xA;After the frame has finished processing, add 16.667 ms to the time that was stored for the end of the last frame to find out where the end of the next frame should be. If you use the current time + 16.667 ms and the processing goes over, the end of the next frame will be pushed out by however much time the last frame ran over.&#xD;&#xA;&#xD;&#xA;**Re: Second Edit**&#xD;&#xA;&#xD;&#xA;To clarify, I use the term frame-rate here to indicate one iteration through the main loop. If it's based off of the user's input speed, I imagine that your goal is to simply make the game feel responsive. Otherwise you could just check for input and update everything each time through the loop even if it takes 10 seconds to do so. To make it feel responsive though, you'll probably want to check for input around 20 times per second which gives an effective frame rate of 20 FPS, even if you're not actually drawing these frames. This would give you 50 ms to update things before you need to check for input again.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13891" PostHistoryTypeId="2" PostId="6952" RevisionGUID="d8ac0475-b3fa-4420-b07c-37dd13d53298" CreationDate="2010-12-30T20:17:10.360" UserId="4295" Text="I have been trying to build a 2D skeletal animation system for a while, and I believe that I'm fairly close to finishing. Currently, I have the following data structures:&#xD;&#xA;&#xD;&#xA;    struct Bone {&#xD;&#xA;        Bone *parent;&#xD;&#xA;        int child_count;&#xD;&#xA;        Bone **children;&#xD;&#xA;        double x, y;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct Vertex {&#xD;&#xA;        double x, y;&#xD;&#xA;        int bone_count;&#xD;&#xA;        Bone **bones;&#xD;&#xA;        double *weights;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct Mesh {&#xD;&#xA;        int vertex_count;&#xD;&#xA;        Vertex **vertices;&#xD;&#xA;        Vertex **tex_coords;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`Bone-&gt;x` and `Bone-&gt;y` are the coordinates of the end point of the Bone. The starting point is given by `(bone-&gt;parent-&gt;x, bone-&gt;parent-&gt;y)` or `(0, 0)`. Each entity in the game has a `Mesh`, and `Mesh-&gt;vertices` is used as the bounding area for the entity. `Mesh-&gt;tex_coords` are texture coordinates. In the entity's update function, the position of the `Bone` is used to change the coordinates of the `Vertices` that are bound to it. Currently what I have is:&#xD;&#xA;&#xD;&#xA;    void Mesh_update(Mesh *mesh) {&#xD;&#xA;        int i, j;&#xD;&#xA;        double sx, sy;&#xD;&#xA;        &#xD;&#xA;        for (i = 0; i &lt; vertex_count; i++) {&#xD;&#xA;            if (mesh-&gt;vertices[i]-&gt;bone_count == 0) {&#xD;&#xA;                continue;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            sx, sy = 0;&#xD;&#xA;            for (j = 0; j &lt; mesh-&gt;vertices[i]-&gt;bone_count; j++) {&#xD;&#xA;                sx += (/* ??? */) * mesh-&gt;vertices[i]-&gt;weights[j];&#xD;&#xA;                sy += (/* ??? */) * mesh-&gt;vertices[i]-&gt;weights[j];&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            mesh-&gt;vertices[i]-&gt;x = sx;&#xD;&#xA;            mesh-&gt;vertices[i]-&gt;y = sy;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I think I have everything I need, I just don't know how to apply the transformations to the final mesh coordinates. What tranformations do I need here? Or is my approach just completely wrong?" />
  <row Id="13892" PostHistoryTypeId="1" PostId="6952" RevisionGUID="d8ac0475-b3fa-4420-b07c-37dd13d53298" CreationDate="2010-12-30T20:17:10.360" UserId="4295" Text="2D Skeletal Animation Transformations" />
  <row Id="13893" PostHistoryTypeId="3" PostId="6952" RevisionGUID="d8ac0475-b3fa-4420-b07c-37dd13d53298" CreationDate="2010-12-30T20:17:10.360" UserId="4295" Text="&lt;2d&gt;&lt;skeletal&gt;&lt;matrix&gt;" />
  <row Id="13895" PostHistoryTypeId="5" PostId="6902" RevisionGUID="a850038e-b90f-463e-b5fd-dc3f053be8d0" CreationDate="2010-12-30T21:10:00.270" UserId="2469" Comment="added 4 characters in body" Text="You may want to check this out:&#xD;&#xA;&#xD;&#xA;http://www.cgafaq.info/wiki/Half_edge_general&#xD;&#xA;&#xD;&#xA;http://en.nicoptere.net/?p=960" />
  <row Id="13896" PostHistoryTypeId="5" PostId="6943" RevisionGUID="79d2d697-33b3-4144-b7df-13d1bf5c7506" CreationDate="2010-12-30T21:15:34.463" UserId="14" Comment="deleted 3 characters in body; edited tags; deleted 2 characters in body; edited tags" Text="I want to ask you about some resources to learn simulating soft bodies, do you know some good knowledge sources?&#xD;&#xA;&#xD;&#xA;I asking because I want to make car crash simulator, I've made something but it didn't work well. :/" />
  <row Id="13897" PostHistoryTypeId="6" PostId="6943" RevisionGUID="79d2d697-33b3-4144-b7df-13d1bf5c7506" CreationDate="2010-12-30T21:15:34.463" UserId="14" Comment="deleted 3 characters in body; edited tags; deleted 2 characters in body; edited tags" Text="&lt;physics&gt;&lt;simulations&gt;" />
  <row Id="13899" PostHistoryTypeId="2" PostId="6953" RevisionGUID="0930e79b-b656-4af9-85fa-03015411ec0b" CreationDate="2010-12-30T22:40:56.923" UserId="1297" Text="Is there a game development platform -- similar to Torque, or Unity -- which can be used to deploy 2D games on the following platforms:&#xD;&#xA;&#xD;&#xA;* Web &#xD;&#xA;* iOs&#xD;&#xA;* Android&#xD;&#xA;* Xbox Live Arcade (Preferred but not required)&#xD;&#xA;&#xD;&#xA;And which has an integrated or mature physics engine? Perhaps, even a built in editor?&#xD;&#xA;&#xD;&#xA;I've looked at the following possibilities but I've found something missing in each one. Of course in each case I may be guilty of misconception.&#xD;&#xA;&#xD;&#xA;* Corona SDK (No web deployment, no windows support)&#xD;&#xA;* Torque 2D (No web deployment)&#xD;&#xA;* Flash + Flash Punk or Flixel (No native android deployment, and I'm not sure if it is stable on mobile platforms)&#xD;&#xA;* Unity + SpriteManager2 (Not really optimised for 2D games, and I haven't seen enough advanced 2D examples -- like say platformers -- to really have any confidence in using it for something like this)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Has anyone had any luck with this?" />
  <row Id="13900" PostHistoryTypeId="1" PostId="6953" RevisionGUID="0930e79b-b656-4af9-85fa-03015411ec0b" CreationDate="2010-12-30T22:40:56.923" UserId="1297" Text="Development platform for 2D web and mobile games" />
  <row Id="13901" PostHistoryTypeId="3" PostId="6953" RevisionGUID="0930e79b-b656-4af9-85fa-03015411ec0b" CreationDate="2010-12-30T22:40:56.923" UserId="1297" Text="&lt;2d&gt;&lt;engine&gt;&lt;physics&gt;&lt;web&gt;&lt;mobile&gt;" />
  <row Id="13902" PostHistoryTypeId="2" PostId="6954" RevisionGUID="1caa1553-6ffd-4fe3-94f3-2c04e6d7035f" CreationDate="2010-12-30T23:18:06.987" UserId="2469" Text="A good book to read if you want to get up to speed with AS3.0 is Essential ActionScript 3.0 by Colin Moock. However it's not game related, it covers the &quot;entire&quot; AS3.0 language.&#xD;&#xA;&#xD;&#xA;For topics that are more gamedev related, as Bob Somers points out, Foundation ActionScript 3.0 Animation: Making Things Move is pretty neat!&#xD;&#xA;&#xD;&#xA;http://www.friendsofed.com/book.html?isbn=1590597915&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There is also the follow up to that book, AdvancED ActionScript 3.0 Animation, it covers a little more in depth topics, and is a great read too.&#xD;&#xA;&#xD;&#xA;![AdvancED ActionScript 3.0 Animation][1]&#xD;&#xA;&#xD;&#xA;[1]: http://www.friendsofed.com/img/cover/9781430216087.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://www.friendsofed.com/book.html?isbn=1430216085" />
  <row Id="13903" PostHistoryTypeId="2" PostId="6955" RevisionGUID="25674bb4-d9e2-4523-b76f-19068f68b232" CreationDate="2010-12-30T23:34:18.190" UserId="51" Text="Just use Unity.  At worst you could write your own sprite management solution and you'll get the platform deployment you want.  The only other real solution is writing your own, but that's hardly a solution." />
  <row Id="13904" PostHistoryTypeId="2" PostId="6956" RevisionGUID="1af809ce-c200-4a82-864e-7a3e4fd0268c" CreationDate="2010-12-30T23:35:06.160" UserId="2469" Text="These might help:&#xD;&#xA;&#xD;&#xA;http://cg.skeelogy.com/?download=SoftBodyPhysicsTutorial&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Soft_body_dynamics&#xD;&#xA;&#xD;&#xA;I also used some verlet integration once to do some pretty simple soft body physics. I know verlet I used more for rigid body physics, but by making the constraints a little more slack, It seems It can be used for some soft body stuff.&#xD;&#xA;&#xD;&#xA;http://www.google.com/#hl=en&amp;q=soft+body+verlet&amp;fp=9bef8cda26d1a6ec&#xD;&#xA;&#xD;&#xA;Hope it helps." />
  <row Id="13905" PostHistoryTypeId="2" PostId="6957" RevisionGUID="354bfccd-b921-4956-8bd0-44b05842eb31" CreationDate="2010-12-31T00:14:45.627" UserId="4321" Text="Given a `body` with an orientation angle and a point of interest or `targetAngle`, is there an elegant solution for keeping the `body` oriented towards the point of interest by applying torque or impulses?&#xD;&#xA;&#xD;&#xA;I have a naive solution working below, but the effect is pretty 'wobbly', it'll overshoot each time, slowly getting closer to the target angle - undesirable effect in my case.  I'd like to find a solution that is more intelligent - that can accelerate to near the target angle then decelerate and stop right at the target angle (or within a small range).&#xD;&#xA;&#xD;&#xA;If it helps, I'm using box2d and the `body` is a rectangle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def gameloop(dt):&#xD;&#xA;        targetAngle = get_target_angle()&#xD;&#xA;        bodyAngle = get_body_angle()&#xD;&#xA;        deltaAngle = targetAngle - bodyAngle&#xD;&#xA;        if deltaAngle &gt; PI:&#xD;&#xA;            deltaAngle = targetAngle - (bodyAngle + 2.0 * PI)&#xD;&#xA;        if deltaAngle &lt; -PI:&#xD;&#xA;            deltaAngle = targetAngle - (bodyAngle - 2.0 * PI)&#xD;&#xA;        # multiply by 2, for stronger reaction&#xD;&#xA;        deltaAngle = deltaAngle * 2.0;&#xD;&#xA;        body.apply_torque(deltaAngle);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One other thing, when body has no linear velocity, the above solution works ok.  But when the body has some linear velocity, the solution above causes really wonky movement.  Not sure why, but would appreciate any hints as to why that might be.&#xD;&#xA;        &#xD;&#xA;        " />
  <row Id="13906" PostHistoryTypeId="1" PostId="6957" RevisionGUID="354bfccd-b921-4956-8bd0-44b05842eb31" CreationDate="2010-12-31T00:14:45.627" UserId="4321" Text="Follow point of interest by applying torque" />
  <row Id="13907" PostHistoryTypeId="3" PostId="6957" RevisionGUID="354bfccd-b921-4956-8bd0-44b05842eb31" CreationDate="2010-12-31T00:14:45.627" UserId="4321" Text="&lt;physics&gt;&lt;math&gt;&lt;torque&gt;&lt;orientation&gt;" />
  <row Id="13912" PostHistoryTypeId="2" PostId="6959" RevisionGUID="307492f5-b9f2-482e-a788-7f02823c29fe" CreationDate="2010-12-31T00:42:03.387" UserId="4275" Text="Cocos2d may be an option. There are some recent projects for it that have ported the API to most of the platforms you've specified aside from XBLA. It won't be a write-once, run anywhere sort of thing though. You'll need to convert it to the language for each platform, unless you use the C++ port but that won't get you on the web.&#xD;&#xA;&#xD;&#xA; - [iOS][1] (Objective-C)&#xD;&#xA; - [Android][2] (Java)&#xD;&#xA; - [Web][3] (Javascript)&#xD;&#xA; - [PC, iOS, Android][4] (C++)&#xD;&#xA;&#xD;&#xA;I've only used the iOS version, but it has Box2D packaged with it for physics. I'm not sure about its integration on other platforms. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [2]: http://code.google.com/p/cocos2d-android-1/&#xD;&#xA;  [3]: http://www.cocos2d-javascript.org/&#xD;&#xA;  [4]: http://www.cocos2d-x.org/" />
  <row Id="13913" PostHistoryTypeId="2" PostId="6960" RevisionGUID="8d8af614-e593-4af7-86bf-02124fe23939" CreationDate="2010-12-31T00:46:49.923" UserDisplayName="Joshua" Text="I don't have formal studies in programming nor in graphic design, I'm self-taught, you know I have learned some things here and there. So far have been doing amateur stuff, sort of hobbyist. I would like at some point of my life be doing professional games, don't know if that would mean acquiring formal knowledge at some gaming college. It is something even desirable or advisable?" />
  <row Id="13914" PostHistoryTypeId="1" PostId="6960" RevisionGUID="8d8af614-e593-4af7-86bf-02124fe23939" CreationDate="2010-12-31T00:46:49.923" UserDisplayName="Joshua" Text="Should i formally sutdy to make games?" />
  <row Id="13915" PostHistoryTypeId="3" PostId="6960" RevisionGUID="8d8af614-e593-4af7-86bf-02124fe23939" CreationDate="2010-12-31T00:46:49.923" UserDisplayName="Joshua" Text="&lt;game-design&gt;" />
  <row Id="13916" PostHistoryTypeId="2" PostId="6961" RevisionGUID="66d56ee1-6c75-4f04-9edd-f9b1670f8d69" CreationDate="2010-12-31T01:04:26.397" UserId="2332" Text="From what I've understood from your post, this is essentially an Arrive behaviour. Arrival is a fairly simple behaviour to implement, and you don't have to use angles to get an angle back either.&#xD;&#xA;&#xD;&#xA;    Vector toTargetVector = targetPosition - bodyPosition;&#xD;&#xA;    double distanceToTarget = toTargetVector.Length();&#xD;&#xA;    &#xD;&#xA;    // It's very simple to get the angle from here, just use atan2 (or the equivalent function in whatever language you're using)&#xD;&#xA;    float angleToTarget = atan2( toTargetVector.y, toTargetVector.x );&#xD;&#xA;    &#xD;&#xA;    if( distanceToTarget &gt; 0.0 )&#xD;&#xA;    {&#xD;&#xA;        double rateOfDeceleration = 0.2;    // This can be tweaked to whatever value you like&#xD;&#xA;        double speed = distanceToTarget / rateOfDeceleration;&#xD;&#xA;        &#xD;&#xA;        Vector desiredVelocity = ( toTargetVector * speed ) / distanceToTarget;&#xD;&#xA;&#xD;&#xA;        return ( desiredVelocity - body.velocity );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This behaviour (among the rest of them) is very clearly detailed in Mat Buckland's book &quot;Programming Game AI by Example&quot;.&#xD;&#xA;&#xD;&#xA;If you want a very, very simple behaviour just to get your target angle correct then use Seek.&#xD;&#xA;&#xD;&#xA;    Vector toTargetVector = targetPosition - bodyPosition;&#xD;&#xA;    &#xD;&#xA;    double distanceToTarget = toTargetVector.Length();&#xD;&#xA;    &#xD;&#xA;    float angleToTarget = atan2( toTargetVector.y, toTargetVector.x );&#xD;&#xA;&#xD;&#xA;And that's basically it, you can then do all your physics stuff after this basic vector stuff.&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="13917" PostHistoryTypeId="5" PostId="4462" RevisionGUID="4d7e483f-73b2-45f2-863c-4525fb9ebfb6" CreationDate="2010-12-31T01:37:08.507" UserId="891" Comment="edited body" Text="Ctrl+C Ctrl+V from another question I posted on&#xD;&#xA;&#xD;&#xA;&gt; [**Slick**][1] is a nice 2D Java&#xD;&#xA;&gt; library based off of LWJGL. It handles&#xD;&#xA;&gt; the game loop, rendering, and contains&#xD;&#xA;&gt; useful functionality to implement&#xD;&#xA;&gt; sprites.&#xD;&#xA;&gt; &#xD;&#xA;&gt; It comes bundled with many different&#xD;&#xA;&gt; demos and examples.&#xD;&#xA;&#xD;&#xA;Things like tilemaps, sprite sheets, etc are all built in.  Basically lets you focus on the game, not how to write an engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/" />
  <row Id="13918" PostHistoryTypeId="2" PostId="6962" RevisionGUID="fba009b1-d162-4363-974c-3798310fd226" CreationDate="2010-12-31T01:37:58.847" UserDisplayName="David Hewitt" Text="If you think you'd enjoy making games then go for it!&#xD;&#xA;It's always best to do what makes you happy.&#xD;&#xA;But really, there are two routes you could take. You could take a generalised course that included computer programming for example a computer science course. Then maybe learn game programming afterwards. That way, if the game programming career falls through, you have other options.&#xD;&#xA;&#xD;&#xA;If you look at the money some of the recent games made especially with the financial recession, then I suppose it would be an advisable career. Notch's minecraft game is a good example. He did that near enough on his own and he now has nearly 1 million paying customers. It pays off if you hit a niche. It all comes down to luck like a lot of things in life.&#xD;&#xA;&#xD;&#xA;So definitely just go with it if you think you'll enjoy it." />
  <row Id="13919" PostHistoryTypeId="2" PostId="6963" RevisionGUID="fa5acae3-dbf5-4462-9907-53f019ce60f9" CreationDate="2010-12-31T04:59:00.647" UserId="4326" Text="&#xD;&#xA;It all depends on what you want to do in the long run.  Do you want to be a programmer or a designer?  Do you actually want to start a company yourself?  Is there a type of company you want to work for?  &#xD;&#xA;&#xD;&#xA;I'll guess that you want to be a programmer, that way this post won't be 10 pages long.&#xD;&#xA;&#xD;&#xA;If your focus is game programming, go for the CS degree.  Then on your own, apply it to game programming (side projects for example).  A &quot;Game Design&quot; or &quot;Game Design and Development&quot; program will not be focused enough on actual programming.  &#xD;&#xA;&#xD;&#xA;Also know that there is a difference between learning &quot;programming&quot; and learning &quot;computer science&quot;. CS is more about computational thinking, problem solving, logic, and even a bit of philosophy. And keep this in mind:&#xD;&#xA;&#xD;&#xA;*Computer science is no more about computers than astronomy is about telescopes.* &#xD;&#xA;--Edsger Dijkstra &#xD;&#xA;&#xD;&#xA;If you plan to start your own company, and focus on programming, i'd still suggest CS, but with either a minor in business, or business as a second degree altogether. &#xD;&#xA;&#xD;&#xA;Now, if you are already a strong programmer(and/or computer scientest) and have some money to blow (or plan on starting a successful company, [and have already researched enough on how to do that]), then you can look into a school like Full-Sail to acquire more focused skills.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13920" PostHistoryTypeId="6" PostId="6960" RevisionGUID="551d25a1-63f1-4580-a2d7-6b654dfc3b47" CreationDate="2010-12-31T05:07:09.103" UserId="51" Comment="edited tags; edited title" Text="&lt;education&gt;" />
  <row Id="13921" PostHistoryTypeId="4" PostId="6960" RevisionGUID="551d25a1-63f1-4580-a2d7-6b654dfc3b47" CreationDate="2010-12-31T05:07:09.103" UserId="51" Comment="edited tags; edited title" Text="Should I formally study to make games?" />
  <row Id="13922" PostHistoryTypeId="2" PostId="6964" RevisionGUID="0b3cdd4b-fb8e-49e1-ac42-d68f50065c26" CreationDate="2010-12-31T07:49:48.690" UserId="503" Text="- [angel-engine][1] is for simple prototyping but is pretty complete.&#xD;&#xA;- [panda 3d][2] is a full fledged 3d engine with commercial games using it, but has a relatively simple python interface if you don't want to get fancy (just look at the simplest examples).&#xD;&#xA;&#xD;&#xA;Both are well documented.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/&#xD;&#xA;  [2]: http://www.panda3d.org/" />
  <row Id="13924" PostHistoryTypeId="2" PostId="6965" RevisionGUID="e4104ae2-2bce-4b1f-a310-f34c0f12979e" CreationDate="2010-12-31T13:14:08.850" UserId="1829" Text="When thinking about C/C++ (because these are the industrial standard languages), I learned most of C by myself, but I admit that school helped a lot for C++: C++ is really a fat subject when used for game programming, but that doesn't necessarily mean I couldn't learn things by myself; school is a very efficient shortcut, but like every shortcut, it's harder and can cost money, and even worst, sometimes you might feel you are learning nothing.&#xD;&#xA;&#xD;&#xA;Don't forget there are 2 sides for being a game developer; first you have to be able to use C++ fluently, and not just classes and virtual function: also the basic STL containers. Secondly, since game programming is all about code and nothing else, you have to learn about design patterns, but often that might not be enough.&#xD;&#xA;&#xD;&#xA;I'm sure you could do some Ogre programming for example if you have some project in mind and time to spare. Don't forget that it's much much better to learn something new to solve a problem when you explicitly know what it's for: learning the theory while practicing is more logical because you have a concrete example which makes it better to remind you what it's for. It's more reassuring than school.&#xD;&#xA;&#xD;&#xA;On the other hand, you have to have a pretty good amount of free time and self-confidence, because at school you have help not only from teachers but also from students, but don't forget that there's also pretty good help on forums and IRC channels.&#xD;&#xA;&#xD;&#xA;To answer your question, I'd say it mainly depends on what you need to learn, since the basics are quite important, but it also depends on your curiosity and how autonomous you can be.&#xD;&#xA;&#xD;&#xA;I have taken the opportunity to get into a private school because I had funds at the moment, I don't know if I would have risked to make a loan for that. On the other hand I met people, which is an important thing, but that won't change the way I conceive programming and how I like to learn things: most of what I see are people unable to seek the information for themselves and are too much used to being teach planned things rather than asking questions or asking themselves questions, after to watch them complain about the program.&#xD;&#xA;&#xD;&#xA;I guess the answer would have been very much different would you have asked it 10 or 15 years ago, but nowadays multi-core processors and giga-powerful consoles require a game programmer to be able to get hold of bigger data structures and algorithms and design patterns etc etc.&#xD;&#xA;&#xD;&#xA;Of course I'm not talking about hobbyist/low-project game programming, which can be done with unity for example, but more about professional/know-how-it-s-done/from-scratch game programming, which gives you a lot more." />
  <row Id="13925" PostHistoryTypeId="2" PostId="6966" RevisionGUID="287860eb-360a-4136-9fa7-6234910d0e2a" CreationDate="2010-12-31T13:15:13.733" UserId="1829" Text="Honestly I don't think anything can do better than pygame:&#xD;&#xA;SDL is simple enough, so it's a good choice.&#xD;&#xA;Python, when thinking about programmer-friendliness, is like the best language ever.&#xD;&#xA;I don't think you can do much better than pygame." />
  <row Id="13926" PostHistoryTypeId="2" PostId="6967" RevisionGUID="1ab431eb-0adb-483d-9406-edb588d20b67" CreationDate="2010-12-31T13:16:32.943" UserDisplayName="user4328" Text="I am looking into make a 3g online multiplayer game for the iphone. Multiplayer is my main focus but I have noticed all game apps require wi-fi. Dose anyone know if this is simply an issue with the speed of the 3g network or dose apple put restrictions on their 3g network that prevents developers from doing this?" />
  <row Id="13927" PostHistoryTypeId="1" PostId="6967" RevisionGUID="1ab431eb-0adb-483d-9406-edb588d20b67" CreationDate="2010-12-31T13:16:32.943" UserDisplayName="user4328" Text="What are the restrictions of 3g online games" />
  <row Id="13928" PostHistoryTypeId="3" PostId="6967" RevisionGUID="1ab431eb-0adb-483d-9406-edb588d20b67" CreationDate="2010-12-31T13:16:32.943" UserDisplayName="user4328" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;programming&gt;" />
  <row Id="13929" PostHistoryTypeId="6" PostId="6967" RevisionGUID="9a848211-5868-4067-883c-516cdb9ea249" CreationDate="2010-12-31T13:31:46.810" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;programming&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="13931" PostHistoryTypeId="2" PostId="6969" RevisionGUID="69a347d5-995b-4257-9721-cbd4f1d073e0" CreationDate="2010-12-31T16:05:30.720" UserId="2301" Text="I agree with most of the above posters, that programmers are paid higher(generally, the quality of work would make a huge difference)  But I also find artist have an easier time picking up small jobs outside of work." />
  <row Id="13932" PostHistoryTypeId="2" PostId="6970" RevisionGUID="9a63e36d-3f40-4112-aa14-2ec9b860af48" CreationDate="2010-12-31T16:25:09.870" UserId="73" Text="Straight answer: it is **very** advisable. I'll explain you what I've learned, and hope it helps.&#xD;&#xA;&#xD;&#xA;Formal studies always help when you want to take things to the professional level. However, the entertainment industry is very big and there is an advantage/disadvantage when it comes to media: everything comes down to portfolio and imagination.&#xD;&#xA;&#xD;&#xA;Let's say you want to work on EA. Big thing, huh? They ask for formal studies; sure, but then they see your portfolio (and you need a strong one, not necessarily a big one). So... it helps, but imagination and portfolio helps better.&#xD;&#xA;&#xD;&#xA;Now, let's say you want to go indie. Good thing. People don't ask for code standards, design documents or formal education; they want games. Good, funny, maybe free ones.&#xD;&#xA;&#xD;&#xA;If you have the time, and the budget, to afford formal education; **go for it**. Why? You'll be on the shoulder of giants and you'll have subjects to focus your attention on; so learning will be kind of faster. But always remember that all of the theoretical material is worthless unless you make games, show it to people and get feedback from them to get the hang of it.&#xD;&#xA;&#xD;&#xA;Finally, keep self-teaching yourself. That's key on being successful. Users/clients/bosses don't care too much if you were taught about a subject, but rather whether you actually **know about it**.&#xD;&#xA;&#xD;&#xA;*PS:* As David pointed out, it's recommended to go for a specialized curriculum. Computer Science or Arts and getting a game development major. But that's up to you to decide and there are pros and cons that don't belong to this subject.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13936" PostHistoryTypeId="2" PostId="6972" RevisionGUID="4a13b6cb-a0d3-409e-9a7e-1dd99ee2051b" CreationDate="2010-12-31T21:10:49.427" UserId="4330" Text="I'm currently programming a 2d game where the player moves around on a rectangular playing field. The player has a direction and a velocity. What is the best way to limit the player's movement so he/she cannot move past the boundaries of the playing field?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;DLiKS" />
  <row Id="13937" PostHistoryTypeId="1" PostId="6972" RevisionGUID="4a13b6cb-a0d3-409e-9a7e-1dd99ee2051b" CreationDate="2010-12-31T21:10:49.427" UserId="4330" Text="What is the best way to limit player movement?" />
  <row Id="13938" PostHistoryTypeId="3" PostId="6972" RevisionGUID="4a13b6cb-a0d3-409e-9a7e-1dd99ee2051b" CreationDate="2010-12-31T21:10:49.427" UserId="4330" Text="&lt;math&gt;&lt;movement&gt;" />
  <row Id="13939" PostHistoryTypeId="2" PostId="6973" RevisionGUID="66adfcb5-4901-4a64-9183-0ddc4a7628c7" CreationDate="2010-12-31T21:40:55.413" UserId="4331" Text="If your game is running iterations/frames, where each iteration takes up a certain amount of real time, you can figure out whether the velocity vector for the player will cause them to cross the boundary. How simple or complicated this calculation needs to be depends on how complicated your boundary is.&#xD;&#xA;&#xD;&#xA;Some basic ballistic physics...&#xD;&#xA;&#xD;&#xA;Measure the increment of time, t, between iterations. If your player's position is a set of coordinates, `x0 (x0_x, x0_y)`, and the velocity is a vector `v (v_x, v_y)`, the position at the next iteration can always be calculated as: &#xD;&#xA;&#xD;&#xA;    x = x0 + v*t =&gt; (x_x = x0_x + v_x*t, x_y = x0_y + v_y * t)&#xD;&#xA;&#xD;&#xA;If the player is accelerating at a constant rate `a` during that interval:&#xD;&#xA;&#xD;&#xA;    x = x0 + v*t + 1/2 a*(t^2) =&gt; (x0_x + v_x*t + 0.5*a_x*t*t, x0_y + v_y*t + 0.5*a_y*t*t)&#xD;&#xA;&#xD;&#xA;All of the above math is just to predict what the player's next x and y position will be.&#xD;&#xA;&#xD;&#xA;Determine whether the destination coordinates cross the boundary. If the boundary is a simple rectangle (0 &lt;= x &lt;= 400, 0 &lt;= y &lt;= 300, let's say), you can detect whether a boundary is crossed:&#xD;&#xA;&#xD;&#xA;    if (x_x &lt; 0) ...&#xD;&#xA;    if (x_x &gt; 400) ...&#xD;&#xA;    if (x_y &lt; 0) ...&#xD;&#xA;    if (x_y &gt; 300) ...&#xD;&#xA;&#xD;&#xA;When the boundary is crossed, instead of moving the player that direction, you can do a couple of things:&#xD;&#xA;&#xD;&#xA; - Stop them at the boundary (if x_x &lt; 0, set v_x = 0)&#xD;&#xA; - &quot;Bounce&quot; them at the boundary (if x_x &lt; 0, set v_x = -v_x)&#xD;&#xA; - &quot;Wrap around&quot; and put them on the other side of the screen (if x_x &lt; 0, set x_x = 400 + x_x)&#xD;&#xA;&#xD;&#xA;If the boundary is more complicated (like a map), you will have to do collision detection.&#xD;&#xA;&#xD;&#xA;If you decide to stop them at the boundary or bounce them, you may wish to add in a margin equal to half the width or height of the player's icon (if the player's coordinates are in the center of the icon), so that the player's icon doesn't move partway off of the screen.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="13940" PostHistoryTypeId="2" PostId="6974" RevisionGUID="d2bc7263-375e-49ba-9342-7c44646aa7d7" CreationDate="2010-12-31T23:15:08.363" UserId="4212" Text="Are the [Daz][1] products viable for 2D/3D game asset creation or are they geared more towards creating art?  I am thinking of the products: Daz Studio 3D, Bryce and Carrara. &#xD;&#xA;&#xD;&#xA;If you have used any of these products for 2D or 3D asset creation please provide input on any export issues you have encountered.&#xD;&#xA;&#xD;&#xA;  [1]: http://daz3d.com" />
  <row Id="13941" PostHistoryTypeId="1" PostId="6974" RevisionGUID="d2bc7263-375e-49ba-9342-7c44646aa7d7" CreationDate="2010-12-31T23:15:08.363" UserId="4212" Text="Daz3D for creating game assets" />
  <row Id="13942" PostHistoryTypeId="3" PostId="6974" RevisionGUID="d2bc7263-375e-49ba-9342-7c44646aa7d7" CreationDate="2010-12-31T23:15:08.363" UserId="4212" Text="&lt;discussion&gt;" />
  <row Id="13943" PostHistoryTypeId="17" PostId="6974" RevisionGUID="271b8d8a-16f3-43a8-abc0-b320a4adf464" CreationDate="2011-01-01T00:02:30.350" UserId="-1" Comment="from http://meta.gamedev.stackexchange.com/questions/342/daz3d-for-creating-game-assets" Text="" />
  <row Id="13944" PostHistoryTypeId="5" PostId="6916" RevisionGUID="1be0b823-6527-470b-9421-0df931878c29" CreationDate="2011-01-01T00:02:37.253" UserId="3536" Comment="deleted 2 characters in body" Text="I allow the user to look around the scene by holding down the left mouse button and moving the mouse. The problem that I have is I can be facing one direction, I move the mouse up and the view tilts up, I move down and the view tilts down. If I spin around 180 my left and right still works fine, but when I move the mouse up the view tilts down, and when I move the mouse down the view tilts up.&#xD;&#xA;&#xD;&#xA;This is the code I am using, can anyone see what the problem with the logic is?&#xD;&#xA;&#xD;&#xA;      var viewDir = g_math.subVector(target, g_eye);  &#xD;&#xA;      var rotatedViewDir = [];  &#xD;&#xA;      rotatedViewDir[0] = (Math.cos(g_mouseXDelta * g_rotationDelta) * viewDir[0]) - (Math.sin(g_mouseXDelta * g_rotationDelta) * viewDir[2]);  &#xD;&#xA;      rotatedViewDir[1] = viewDir[1];  &#xD;&#xA;      rotatedViewDir[2] = (Math.cos(g_mouseXDelta * g_rotationDelta) * viewDir[2]) + (Math.sin(g_mouseXDelta * g_rotationDelta) * viewDir[0]);  &#xD;&#xA;      viewDir = rotatedViewDir;  &#xD;&#xA;      rotatedViewDir[0] = viewDir[0];  &#xD;&#xA;      rotatedViewDir[1] = (Math.cos(g_mouseYDelta * g_rotationDelta * -1) * viewDir[1]) - (Math.sin(g_mouseYDelta * g_rotationDelta * -1) * viewDir[2]);  &#xD;&#xA;      rotatedViewDir[2] = (Math.cos(g_mouseYDelta * g_rotationDelta * -1) * viewDir[2]) + (Math.sin(g_mouseYDelta * g_rotationDelta * -1) * viewDir[1]);  &#xD;&#xA;      g_lookingDir = rotatedViewDir;  &#xD;&#xA;      var newtarget = g_math.addVector(rotatedViewDir, g_eye);" />
  <row Id="13945" PostHistoryTypeId="6" PostId="6974" RevisionGUID="6273800a-35b4-460c-a444-6a2b1d961325" CreationDate="2011-01-01T00:02:58.730" UserId="51" Comment="edited tags" Text="&lt;assets&gt;&lt;asset-creation&gt;" />
  <row Id="13946" PostHistoryTypeId="2" PostId="6975" RevisionGUID="82e12592-6813-41cf-90c1-64d8833b8d80" CreationDate="2011-01-01T01:51:52.787" UserId="56" Text="We're planning on developing a 2D, grid-based puzzle game, and although it's still very early in the planning stages, we'd like to make our decisions well from the beginning. &#xD;&#xA;&#xD;&#xA;Our strategy will be to make the game available to as many platforms as possible, for example PCs (Windows, Mac and/or Linux), mobile phones (iPhone and/or Android based phones), game consoles (XBLA and/or PSN)&#xD;&#xA;PC will have an emphasis, but I believe that's the most flexible platform so that shouldn't be a problem.&#xD;&#xA;&#xD;&#xA;So, what programming language, game engine, frameworks and all around tools would be best suited for our goal?&#xD;&#xA;&#xD;&#xA;P.S.: I'm betting a set of tools won't cover ALL of them, and that there will still be some kind of &quot;translating&quot; effort for some platforms, but we'd like to know what the most far reaching are." />
  <row Id="13947" PostHistoryTypeId="1" PostId="6975" RevisionGUID="82e12592-6813-41cf-90c1-64d8833b8d80" CreationDate="2011-01-01T01:51:52.787" UserId="56" Text="What tools should I consider if my strategy is to make a game available to as many platforms as possible?" />
  <row Id="13948" PostHistoryTypeId="3" PostId="6975" RevisionGUID="82e12592-6813-41cf-90c1-64d8833b8d80" CreationDate="2011-01-01T01:51:52.787" UserId="56" Text="&lt;engine&gt;&lt;programming&gt;&lt;tools&gt;&lt;cross-platform&gt;&lt;framework&gt;" />
  <row Id="13949" PostHistoryTypeId="2" PostId="6976" RevisionGUID="fe286556-3c38-4a88-b723-8c6614899eb3" CreationDate="2011-01-01T02:15:02.440" UserId="51" Text="Just use &lt;a href=&quot;http://unity3d.com/unity/publishing/&quot;&gt;Unity&lt;/a&gt;" />
  <row Id="13950" PostHistoryTypeId="2" PostId="6977" RevisionGUID="8012c590-fa26-41c2-a967-8c4f21ff9a5e" CreationDate="2011-01-01T06:16:08.193" UserId="953" Text="Flash and Java have very widespread support; they work on all PCs (more or less) and many mobile devices (more or less), and I'm sure they're about as easy to port to a console as any other project with a PC influence." />
  <row Id="13951" PostHistoryTypeId="2" PostId="6978" RevisionGUID="30e6a6e0-9851-4e9e-a8db-c8bd25d48c29" CreationDate="2011-01-01T06:54:22.673" UserDisplayName="ven" Text="I started to involve myself with easing functions (Flash AS3), came about in trying to understand TweenLite and Robert Penner's website: http://www.robertpenner.com/easing/&#xD;&#xA;&#xD;&#xA;The question I have is what is the math basis for these functions.  I've seen other sites modify the functions to create custom easing function.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="13952" PostHistoryTypeId="1" PostId="6978" RevisionGUID="30e6a6e0-9851-4e9e-a8db-c8bd25d48c29" CreationDate="2011-01-01T06:54:22.673" UserDisplayName="ven" Text="Easing Functions" />
  <row Id="13953" PostHistoryTypeId="3" PostId="6978" RevisionGUID="30e6a6e0-9851-4e9e-a8db-c8bd25d48c29" CreationDate="2011-01-01T06:54:22.673" UserDisplayName="ven" Text="&lt;flash&gt;" />
  <row Id="13954" PostHistoryTypeId="4" PostId="6975" RevisionGUID="7622c089-1417-4ff4-b9ef-e311ad65812c" CreationDate="2011-01-01T07:40:55.053" UserId="56" Comment="edited title" Text="What tools should I consider if my aim is to make a game available to as many platforms as possible?" />
  <row Id="13955" PostHistoryTypeId="2" PostId="6979" RevisionGUID="ef3f56db-fcaf-4111-91c1-397f010bd6f5" CreationDate="2011-01-01T08:55:03.813" UserId="51" Text="Well tweening in the general case is just parametric movement (specifically, defining a function *f(x)* where *x* can be 0..1 for position/rotation/scale/whatever) with a modifier on the parametric value you pass in.  The modifier also has the range 0..1.&#xD;&#xA;&#xD;&#xA;If you plot the algorithm on a graph you'll get something that starts at 0, ends at 1, and the slope of the curve defines the velocity at that point in time.&#xD;&#xA;&#xD;&#xA;If you want the math for the easing functions themselves, check this out: http://iphonedevelopment.blogspot.com/2010/12/more-animation-curves-than-you-can.html" />
  <row Id="13956" PostHistoryTypeId="6" PostId="6978" RevisionGUID="78ee3597-38ab-4b60-b3ef-26efe78a7adf" CreationDate="2011-01-01T08:57:58.723" UserId="51" Comment="edited tags; deleted 20 characters in body" Text="&lt;flash&gt;&lt;animation&gt;&lt;tweening&gt;&lt;easing&gt;" />
  <row Id="13957" PostHistoryTypeId="5" PostId="6978" RevisionGUID="78ee3597-38ab-4b60-b3ef-26efe78a7adf" CreationDate="2011-01-01T08:57:58.723" UserId="51" Comment="edited tags; deleted 20 characters in body" Text="I started to involve myself with easing functions (Flash AS3), came about in trying to understand TweenLite and Robert Penner's website: http://www.robertpenner.com/easing/&#xD;&#xA;&#xD;&#xA;The question I have is what is the math basis for these functions.  I've seen other sites modify the functions to create custom easing function.&#xD;&#xA;" />
  <row Id="13958" PostHistoryTypeId="2" PostId="6980" RevisionGUID="8230a481-d8b0-4b35-a0c1-20d4a82ae99b" CreationDate="2011-01-01T09:43:11.673" UserId="4210" Text="Well that depends, can you programming in C/C++, Obj-C and C#?&#xD;&#xA;&#xD;&#xA;Unity3D is the best 1 size fits all but 2D games in it can be abit tricky (for a 2D game anyway).&#xD;&#xA;&#xD;&#xA;If you are targeting the Xbox with XNA (aka the indie store) then you have to use C#. But you cant really use C# with iOS (except with unity). While you can use C/C++ for iOS you still need to use a little bit of Obj-C unless you use some sort of middle ware.&#xD;&#xA;&#xD;&#xA;If you don't use an engine, I think the best thing to-do is write your own layer of abstraction. So that any calls to your library have to go through this middle layer, so when it comes time to port you just need to change the implementation of the abstraction layer and your game code is more or less intact." />
  <row Id="13959" PostHistoryTypeId="2" PostId="6981" RevisionGUID="bd13ee48-f94a-4eba-b26f-e3f441bbd042" CreationDate="2011-01-01T10:17:56.720" UserId="4339" Text="read this [FAQ: What 3D Object File Formats can Bryce Export?][1]&#xD;&#xA;&#xD;&#xA;you can export a various file formats for multiple uses (programming: dxf,3ds, x...)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.daz3d.com/i/faq/0?id=211&amp;_m=d" />
  <row Id="13960" PostHistoryTypeId="2" PostId="6982" RevisionGUID="3c472f0a-e4ee-4e3e-9582-ccad99f59959" CreationDate="2011-01-01T10:20:51.157" UserId="4340" Text="I would say your best language choice would be c#.  You can use it to develop in Unity for a number of platforms.  c# is also the language used in MonoTouch (for developing for iOS) and MondoDroid (not out yet but will let you target Android platforms). And, of course, c# can be used in XNA which lets you target XBOX 360 and Windows Phones.&#xD;&#xA;&#xD;&#xA;That pretty much covers everything.  There will still be work to do in the fact that you will be using different tools for manipulating game content, but your core game logic shouldn't need to change if it's all in c#.&#xD;&#xA;&#xD;&#xA;oh and of course c# is used in Silverlight which would let you target the web also." />
  <row Id="13961" PostHistoryTypeId="2" PostId="6983" RevisionGUID="cae89bd7-4dc5-4866-a654-de20451f128b" CreationDate="2011-01-01T10:27:43.423" UserId="4264" Text="I've written a primer on interpolation, which may be of some use - http://iki.fi/sol/interpolation/&#xD;&#xA;&#xD;&#xA;Another great resource is this interactive tool: http://www.gizma.com/easing/" />
  <row Id="13962" PostHistoryTypeId="2" PostId="6984" RevisionGUID="492deb4a-64a2-470f-93cc-ac8314c06426" CreationDate="2011-01-01T11:22:11.327" UserId="2879" Text="Never Underestimate the time and effort it takes to get a game from a prototype to a full-fledged production-quality game. The last &quot;5%&quot; can easily take half of the production time. " />
  <row Id="13963" PostHistoryTypeId="2" PostId="6985" RevisionGUID="a36aaf76-5181-46f1-af0c-cf92e11139f5" CreationDate="2011-01-01T12:15:57.893" UserDisplayName="Bhaskar" Text="I am working on a simple game, where I need to do a collision detection of two Texture2D. The code I have written is:&#xD;&#xA;&#xD;&#xA;    bool perPixelCollission = false;&#xD;&#xA;                Texture2D texture1 = sprite1.Texture;&#xD;&#xA;                Texture2D texture2 = sprite1.Texture;&#xD;&#xA;                Vector2 position1 = new Vector2(sprite1.CurrentScope.X, sprite1.CurrentScope.Y);&#xD;&#xA;                Vector2 position2 = new Vector2(sprite2.CurrentScope.X, sprite2.CurrentScope.Y);&#xD;&#xA;                &#xD;&#xA;                uint[] bitsA = new uint[texture1.Width * texture1.Height];&#xD;&#xA;                uint[] bitsB = new uint[texture2.Width * texture2.Height];&#xD;&#xA;    &#xD;&#xA;                Rectangle texture1Rectangle = new Rectangle(Convert.ToInt32(position1.X), Convert.ToInt32(position1.Y), texture1.Width, texture1.Height);&#xD;&#xA;                Rectangle texture2Rectangle = new Rectangle(Convert.ToInt32(position2.X), Convert.ToInt32(position2.Y), texture2.Width, texture2.Height);&#xD;&#xA;    &#xD;&#xA;                texture1.GetData&lt;uint&gt;(bitsA);&#xD;&#xA;                texture2.GetData&lt;uint&gt;(bitsB);&#xD;&#xA;    &#xD;&#xA;                int x1 = Math.Max(texture1Rectangle.X, texture2Rectangle.X);&#xD;&#xA;                int x2 = Math.Min(texture1Rectangle.X + texture1Rectangle.Width, texture2Rectangle.X + texture2Rectangle.Width);&#xD;&#xA;    &#xD;&#xA;                int y1 = Math.Max(texture1Rectangle.Y, texture2Rectangle.Y);&#xD;&#xA;                int y2 = Math.Min(texture1Rectangle.Y + texture1Rectangle.Height, texture2Rectangle.Y + texture2Rectangle.Height);&#xD;&#xA;    &#xD;&#xA;                for (int y = y1; y &lt; y2; ++y)&#xD;&#xA;                {&#xD;&#xA;                    for (int x = x1; x &lt; x2; ++x)&#xD;&#xA;                    {&#xD;&#xA;                        if (((bitsA[(x - texture1Rectangle.X) + (y - texture1Rectangle.Y) * texture1Rectangle.Width] &amp; 0xFF000000) &gt;&gt; 24) &gt; 20 &amp;&amp;&#xD;&#xA;                            ((bitsB[(x - texture2Rectangle.X) + (y - texture2Rectangle.Y) * texture2Rectangle.Width] &amp; 0xFF000000) &gt;&gt; 24) &gt; 20)&#xD;&#xA;                        {&#xD;&#xA;                            perPixelCollission = true;&#xD;&#xA;                            break;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    // Reduce amount of looping by breaking out of this.&#xD;&#xA;                    if (perPixelCollission)&#xD;&#xA;                    {&#xD;&#xA;                        break;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                return perPixelCollission;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But this code is really making the game slow. Where can I get some very good collision detection tutorial and code? What is wrong in this code?" />
  <row Id="13964" PostHistoryTypeId="1" PostId="6985" RevisionGUID="a36aaf76-5181-46f1-af0c-cf92e11139f5" CreationDate="2011-01-01T12:15:57.893" UserDisplayName="Bhaskar" Text="Collision Detection for 2D" />
  <row Id="13965" PostHistoryTypeId="3" PostId="6985" RevisionGUID="a36aaf76-5181-46f1-af0c-cf92e11139f5" CreationDate="2011-01-01T12:15:57.893" UserDisplayName="Bhaskar" Text="&lt;games-for-windows&gt;" />
  <row Id="13966" PostHistoryTypeId="17" PostId="6985" RevisionGUID="004465c4-1dbb-4062-9325-ae5347453352" CreationDate="2011-01-01T12:35:44.483" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/13689/collision-detection-for-2d" Text="" />
  <row Id="13967" PostHistoryTypeId="6" PostId="6985" RevisionGUID="f50523d3-6c5b-414c-872a-dd1bf532b298" CreationDate="2011-01-01T13:12:33.470" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;physics&gt;&lt;collision-detection&gt;&lt;2d-physics&gt;" />
  <row Id="13968" PostHistoryTypeId="2" PostId="6986" RevisionGUID="3c6ba82e-72d5-4bd9-b3a9-a0993354a8c3" CreationDate="2011-01-01T13:32:34.753" UserId="1923" Text="One problem with this code that can cause a slow down is that you are testing every pixel between the two sprites... So it the sprites are not colliding and are, say, at opposite corners of the screen, you are darn near brute force checking each and every pixel on the screen.&#xD;&#xA;&#xD;&#xA;Consider a simple rectangle/rectangle test instead or a separating axis test.... Much faster.&#xD;&#xA;&#xD;&#xA;Check out page 3 of this article. It works for 2d or 3d: http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php" />
  <row Id="13969" PostHistoryTypeId="2" PostId="6987" RevisionGUID="e5444b33-6af2-4f57-bf89-e659459403c6" CreationDate="2011-01-01T14:39:04.730" UserId="4345" Text="Split your collision test up in several steps:&#xD;&#xA;&#xD;&#xA;1. quick check if two sprites might collides: Rectangle.Intersect(textureRectangle1, textureRectangle2)&#xD;&#xA;&#xD;&#xA;2. your elaborate pixel collision check&#xD;&#xA;&#xD;&#xA;Only perform step 2, if step 1 is true.&#xD;&#xA;&#xD;&#xA;You also can return the collision result directly in the inner for loop, if it's true and always return false, if both loops finish without finding a collision.&#xD;&#xA;&#xD;&#xA;This should speed up things considerably. But it will be slow if you have a lot of object to check (&gt;100). Since n*(n-1) checks are done each frame." />
  <row Id="13970" PostHistoryTypeId="2" PostId="6988" RevisionGUID="dfaad3fb-b514-4df1-8d4c-e3717c2fc4c7" CreationDate="2011-01-01T14:48:32.883" UserId="4082" Text="Generate a [quadtree][1] for each image. The lowest cell size of the quadtree lets you determine the tradeoff between speed of collision test and precision. If the last size is 1, you get pixel-perfect collision detection, but you can often get away with 2x2 or even 5x5 cells, depending on the application.&#xD;&#xA;&#xD;&#xA;Quadtree vs quadtree checks are probably log(n), and since the first check compares the top-level rectangles, it's in fact the same as the early rejection test you'd do if you used only pixel by pixel checks.&#xD;&#xA;&#xD;&#xA;This approach is extremely flexible - with some work you can make it work for rotated and scaled textures as well (implement a axis-aligned-rect-to-rotated-and-scaled-rect test, and then transform each rectangle of both textures so that one is axis aligned)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree" />
  <row Id="13971" PostHistoryTypeId="2" PostId="6989" RevisionGUID="2cefb6f5-a37e-40f7-8f0c-7a128acd1cb4" CreationDate="2011-01-01T14:51:01.977" UserId="659" Text="&#xD;&#xA;Step one should probably be to make the game, at least a decent prototype, using your favourite tools/tech, for a single platform (or small number of platforms).&#xD;&#xA;&#xD;&#xA;It's very easy to get bogged down in cross-platform tools/tech development. Focusing too much on cross-platformness before having a game is kind of like premature optimization. It's certainly worth thinking about early on, but don't spend all your time on it until you've actually got a game.&#xD;&#xA;&#xD;&#xA;Trying to support every platform before knowing whether the game will be a success sounds like a high-risk strategy - especially if it's a simple low-budget game (where the cost of developing cross-platform systems could massively outweigh the cost of developing the game itself?).&#xD;&#xA;&#xD;&#xA;Wouldn't it make sense to launch it on a small number of platforms, see how well it does, and determine if it's worth supporting the more challenging platforms (e.g. less powerful systems, those with arkward input devices, or those that require a complete port to C# or Java)" />
  <row Id="13972" PostHistoryTypeId="2" PostId="6990" RevisionGUID="a2017ee2-fc8b-463c-b471-f444450b958d" CreationDate="2011-01-01T14:55:38.583" UserId="4082" Text="We have a thick C++ framework on top of a thin platform layer, also C++. Porting a game to a new platform is a matter of implementing a new platform layer, which because it's quite thin, it's quite fast to do.&#xD;&#xA;&#xD;&#xA;Also, all of our dependencies are open source and cross platform libs, such as SDL, Ogg, LibPNG, etc.&#xD;&#xA;&#xD;&#xA;For example, we have a Win32/DirectX platform, a SDL/OpenGL platform for Linux and Mac, working on an iOS platform for iPhone/iPad, and an android port would also be possible. For some time we had a Playground platform, meaning our framework ran on top of PlayFirst's Playground engine. This layered approach allows you to leverage whatever interface you have to the underlying hardware/OS, as long as you can draw a textured quad, get some input and play a sound, you're pretty much set.&#xD;&#xA;&#xD;&#xA;I'll get flamed for this, but C++ is probably the most cross-platform language there is. Every architecture and OS most likely has a C++ compiler or gcc can be ported to it." />
  <row Id="13973" PostHistoryTypeId="2" PostId="6991" RevisionGUID="cc4e29bf-b902-42c8-81ea-c8e1ca289833" CreationDate="2011-01-01T15:18:13.463" UserId="4345" Text="I would group 5-7 puzzles into one tier. The player has to complete a certain percentage of the puzzles for each tier to unlock the next tier e.g. 5 out of 7.&#xD;&#xA;&#xD;&#xA;That way the player can progress and can try difficult puzzles at a later time. It would be a good idea to give some sort of incentive. Maybe making hints available if you complete all puzzles of one tier or bonus levels, different UI skins etc. " />
  <row Id="13974" PostHistoryTypeId="2" PostId="6992" RevisionGUID="e7b12256-6106-47d5-a3de-98b856e4efa4" CreationDate="2011-01-01T08:59:43.147" UserDisplayName="jpartogi" Text="I am interested to learn more about game development especially on XBox Kinect. What do I need to learn and what books I should read so I can make games on XBox Kinect?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="13975" PostHistoryTypeId="1" PostId="6992" RevisionGUID="e7b12256-6106-47d5-a3de-98b856e4efa4" CreationDate="2011-01-01T08:59:43.147" UserDisplayName="jpartogi" Text="What do I need to learn so I can make games on XBox Kinect?" />
  <row Id="13976" PostHistoryTypeId="3" PostId="6992" RevisionGUID="e7b12256-6106-47d5-a3de-98b856e4efa4" CreationDate="2011-01-01T08:59:43.147" UserDisplayName="jpartogi" Text="&lt;games&gt;" />
  <row Id="13977" PostHistoryTypeId="17" PostId="6992" RevisionGUID="bb2468eb-aeaa-4937-8fb4-abcf80b4fd13" CreationDate="2011-01-01T15:21:30.147" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/33030/what-do-i-need-to-learn-so-i-can-make-games-on-xbox-kinect" Text="" />
  <row Id="13978" PostHistoryTypeId="6" PostId="6992" RevisionGUID="8964f41e-e63a-49a2-aae5-33c8bc2c2485" CreationDate="2011-01-01T15:31:06.823" UserId="1156" Comment="edited tags" Text="&lt;xbox360&gt;&lt;books&gt;&lt;kinect&gt;" />
  <row Id="13979" PostHistoryTypeId="2" PostId="6993" RevisionGUID="dee1dbdb-395e-4124-94c3-33810344bdd6" CreationDate="2011-01-01T16:16:24.973" UserId="4347" Text="I need simple game engine with pixel-perfect collision detection, camera component with following function, network and particle components would be desirable. Anyone knows whether the engine right under these requirements?" />
  <row Id="13980" PostHistoryTypeId="1" PostId="6993" RevisionGUID="dee1dbdb-395e-4124-94c3-33810344bdd6" CreationDate="2011-01-01T16:16:24.973" UserId="4347" Text="Flash game engine" />
  <row Id="13981" PostHistoryTypeId="3" PostId="6993" RevisionGUID="dee1dbdb-395e-4124-94c3-33810344bdd6" CreationDate="2011-01-01T16:16:24.973" UserId="4347" Text="&lt;engine&gt;&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="13982" PostHistoryTypeId="2" PostId="6994" RevisionGUID="3dfd42df-ef2d-45ce-b363-066e4b4e8d06" CreationDate="2011-01-01T16:22:22.673" UserId="4345" Text="To avoid strange behavior in the 2d physics they're using?&#xD;&#xA;&#xD;&#xA;Honestly I can just guess. I'll try an explanation:&#xD;&#xA;&#xD;&#xA;At heart of the game is the main game loop.&#xD;&#xA;Which basicly looks like this:&#xD;&#xA;&#xD;&#xA;    while(gameRunning)&#xD;&#xA;    {&#xD;&#xA;      updateGame(timestep);&#xD;&#xA;      renderGame(timestep);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;updateGame updates the gameState: checks player input, applies player input to the game world and runs the physics simulation etc.&#xD;&#xA;&#xD;&#xA;renderGame draws and animates the game.&#xD;&#xA;&#xD;&#xA;This couples the physics update to the rendering. If you want to decouple it you would need use threads and properly synchronize each data access of the rendering and the gameUpdate thread to shared data e.g. player position. This can be done.&#xD;&#xA;&#xD;&#xA;Another problem might be that the physics simulation requires a constant timestep to run stable. This depends on how supermeatboy calculates the movement (Again we can just guess how they've done it ;) ).&#xD;&#xA;&#xD;&#xA;A naive approach would be (which I'm using in my game \*sigh\*):&#xD;&#xA;&#xD;&#xA;    position=position+speed*timestep;&#xD;&#xA;    speed=speed+acceleration*timestep;&#xD;&#xA;&#xD;&#xA;This is called Euler Integration and is generally considered to be a bad idea. If the timestep is none-constant calculation errors occur which will make the simulation less stable. Object might move at excessive speeds or not all or fly through the walls off the screen. Even if the timestep is constant Euler Integration causes minor calculation errors. Better use another integration method like RK4 or use a physics engine.&#xD;&#xA;&#xD;&#xA;Apart from that there can be problems doing the collision detection if the timestep gets too large.&#xD;&#xA;Since collisions are not checked between two gameUpdates, objects might pass through obstacles." />
  <row Id="13983" PostHistoryTypeId="2" PostId="6995" RevisionGUID="2b9a58ff-fda4-4368-aa3e-a1c931a8a27f" CreationDate="2011-01-01T16:28:34.577" UserId="20" Text="Definitely look into [flixel][1]. It already covers a lot of your requirements. &#xD;&#xA;&#xD;&#xA;Also check out [Flash Game Dojo][2]. That will help getting you started.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org/&#xD;&#xA;  [2]: http://www.flashgamedojo.com/go/" />
  <row Id="13984" PostHistoryTypeId="2" PostId="6996" RevisionGUID="06579a01-7709-4ddb-8518-ff559767aaa2" CreationDate="2011-01-01T16:33:30.177" UserId="4344" Text="Hey there, there's no problem with exporting to common model formats, however if you have any content from Daz3D website they are very much geared towards art use so are generally very high poly and wont be good for real time use." />
  <row Id="13985" PostHistoryTypeId="5" PostId="6995" RevisionGUID="1523980b-bc3a-4456-84b8-1994911967e7" CreationDate="2011-01-01T16:34:04.917" UserId="20" Comment="added 226 characters in body" Text="Definitely look into [flixel][1]. It already covers a lot of your requirements. &#xD;&#xA;&#xD;&#xA;Also check out [Flash Game Dojo][2]. That will help getting you started.&#xD;&#xA;&#xD;&#xA;**Update:** For the sake of completeness: Also look at [FlashPunk][3]. It is similar to flixel but has some other strenghts/philosophy. Look at the Flash Game Dojo page for a brief comparison.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org/&#xD;&#xA;  [2]: http://www.flashgamedojo.com/go/&#xD;&#xA;  [3]: http://flashpunk.net/" />
  <row Id="13986" PostHistoryTypeId="2" PostId="6997" RevisionGUID="6ddee017-61e0-4b53-9ccd-ece3521b1b8e" CreationDate="2011-01-01T16:37:53.857" UserId="4344" Text="I'd like to add [Pushbutton Engine][1] as another candidate. This is a modular engine so you don't need to include the whole feature set if you don't need it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pushbuttonengine.com/ " />
  <row Id="13987" PostHistoryTypeId="2" PostId="6998" RevisionGUID="06ed2663-da4c-4942-bff8-e07e7a28a924" CreationDate="2011-01-01T16:38:09.837" UserId="4345" Text="What are you trying to achieve? Can you only load the next image if the previous one has finished loading?&#xD;&#xA;&#xD;&#xA;You can track the time when the last image was loaded and then check in your game update function if enough time since the last loaded image has passed.&#xD;&#xA;&#xD;&#xA;Your game stalls when using sleep because you pause your main thread. As nhnb said you need to write seperate image loader thread class." />
  <row Id="13988" PostHistoryTypeId="5" PostId="6995" RevisionGUID="1fa12d37-c6f2-49cf-a3f9-e52837428c63" CreationDate="2011-01-01T16:58:42.957" UserId="20" Comment="wording" Text="Definitely look into [flixel][1]. It already covers a lot of your requirements. &#xD;&#xA;&#xD;&#xA;Also check out [Flash Game Dojo][2]. That will help getting you started.&#xD;&#xA;&#xD;&#xA;**Update:** For the sake of completeness: Also look at [FlashPunk][3]. It is similar to flixel but has some other strenghts/philosophy. Check out the Flash Game Dojo page for a brief comparison.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org/&#xD;&#xA;  [2]: http://www.flashgamedojo.com/go/&#xD;&#xA;  [3]: http://flashpunk.net/" />
  <row Id="13989" PostHistoryTypeId="2" PostId="6999" RevisionGUID="9b4726ba-73c6-4376-9831-1f55f75a44dd" CreationDate="2011-01-01T17:16:46.240" UserId="2332" Text="At the minute there is no support in XNA for Kinect (although, hopefully this will change in the near future).&#xD;&#xA;&#xD;&#xA;There are two ways to develop for Kinect at the moment.&#xD;&#xA;&#xD;&#xA;The first is to become a licensed Xbox developer (although it might be a little expensive :P)&#xD;&#xA;&#xD;&#xA;The second is to use the open source drivers for Kinect known as OpenKinect (libfreenect, they're interchangeable I think)&#xD;&#xA;&#xD;&#xA;The open source libraries can be found here: http://openkinect.org/wiki/Main_Page&#xD;&#xA;&#xD;&#xA;They are a C library and I think you'll probably need to develop in Linux to make stuff now, but I believe work is being done for support for Windows. Of course, you'll only be able to develop PC applications for the moment.&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="13990" PostHistoryTypeId="2" PostId="7000" RevisionGUID="902cead5-a471-449b-85fa-5b4467c10299" CreationDate="2011-01-01T17:58:51.950" UserId="4345" Text="Cyclic dependencies are a common design mistake in software development. Game development might be more susceptible to it, since you have a lot moving parts which have to depend on another in some way. &#xD;&#xA;&#xD;&#xA;If you're overusing cyclic dependencies your code will turn into one tightly coupled mess.&#xD;&#xA;&#xD;&#xA;Suppose you have Sprite class to render the player sprite on screen, a PhysicObject class for movement&amp;collision detection, a Animator class to animate the player sprite, a PlayerControl class to apply user input to the player character.&#xD;&#xA;&#xD;&#xA;If each class knows about the others you cannot use just a subset of these. An invisible wall might just consist of the PhysicObject. A wooden crate consist of a Sprite and a PhysicsObject and so on.&#xD;&#xA;&#xD;&#xA;If classes have to speak to each other it is better to use an event system. Or have a parent class which encapsulates common data members. Child classes are also data members of the parent class and just manipulate the data members of the parent.&#xD;&#xA;&#xD;&#xA;There is no single right ways to structure a game.&#xD;&#xA;&#xD;&#xA;Another problem with cyclic dependencies is what if one of the classes is deleted? If the Foo object is deleted the Bar object has an invalid pointer and will cause an error the next time it tries to access it.&#xD;&#xA;&#xD;&#xA;You also cannot use boosts shared pointer class if you have cyclic dependencies. Shared pointer will delete the object it points to if there are no more references to it. But if Foo points to Bar and Bar points to Foo, Foo and Bar will never be deleted and you have a memory leak.&#xD;&#xA;&#xD;&#xA;Game entities with components:    &#xD;&#xA;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;&#xD;&#xA;I'm reading Mike McShaffry's &quot;Game Coding Complete&quot; which give a quite good overview how to design and build games. It also has a bunch of code samples. Might be worth a look ;)&#xD;&#xA;&#xD;&#xA;Regarding your code sample:    &#xD;&#xA;Use inclusion guards to avoid multiple includes of the same header file:&#xD;&#xA;&#xD;&#xA;    #ifndef BAR_H&#xD;&#xA;    #define BAR_H&#xD;&#xA;    class BAR {&#xD;&#xA;      //class definition&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;or if you're using Visual Studio:&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;    class BAR {&#xD;&#xA;      //class definition&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;This will stop the compiler from complaining." />
  <row Id="13991" PostHistoryTypeId="19" PostId="1611" RevisionGUID="0a2be989-96e0-4e54-8606-f91d8064034d" CreationDate="2011-01-01T18:41:27.537" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="13992" PostHistoryTypeId="2" PostId="7001" RevisionGUID="878afa17-da7a-47ae-8ffe-033b92fd122d" CreationDate="2011-01-01T18:57:41.443" UserId="4345" Text="Why do you want bit-blit in C# XNA?&#xD;&#xA;&#xD;&#xA;Your problem seems to be to render a lot of objects on screen. XNA is more than capable to handle this, but you don't need to go low-level for this.&#xD;&#xA;&#xD;&#xA;You might wanna take a look how the SpriteBatch class renders Texture2D.&#xD;&#xA;SpriteBatch doesn't immediately send draw request to the graphics card, but puts them into a list. If the next draw call is for a different Texture2D or SpriteBatch.End() is called all draw requests from the list are sent at once to the graphics card and the image is only copied once to the graphics card memory but rendered for each request in the list.&#xD;&#xA;&#xD;&#xA;So you can either put all images your game needs into one big image and tell the sprite batch which parts of it it needs to render or sort your sprites to draw after drawing depth and texture.&#xD;&#xA;&#xD;&#xA;That way you can draw a few thousands images without any performance problems.&#xD;&#xA;&#xD;&#xA;A complete explanation with sample code:    &#xD;&#xA;http://blogs.msdn.com/b/shawnhar/archive/2006/12/14/spritebatch-sorting-part-2.aspx" />
  <row Id="13993" PostHistoryTypeId="2" PostId="7002" RevisionGUID="f44fc557-5b01-4c87-a560-3d73017ca436" CreationDate="2011-01-01T19:21:59.693" UserId="4345" Text="Yes this is possible. Your game will have some kind of main game loop. Something like this:&#xD;&#xA;&#xD;&#xA;    while(gameRunning)&#xD;&#xA;    {&#xD;&#xA;      checkUserInput()&#xD;&#xA;      updateGame()&#xD;&#xA;      renderGame()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In updateGame you can iterate over your game objects and update them &quot;a little&quot;.&#xD;&#xA;If you are doing any heavy calculation in this method the game will simply hang. So you need a way to split up these calculations to run over several iterations of the game loop.&#xD;&#xA;&#xD;&#xA;How to split them up, depends on the kind of game you are building. Suppose you are have a path finder routine which uses A* to calculate a path through a labyrinth. You would need to stop the algorithm after a certain amount of time or after a fixed amount of iterations, keep the calculated path so far and return control back to the game loop. The path finding will continue next time updateGame is called. You can even move the character along the partial path while it is still being calculated.&#xD;&#xA;&#xD;&#xA;Most times you don't need to worry about the updateGame call taking too long.&#xD;&#xA;&#xD;&#xA;&quot;Premature optimization is the root of all evil!&quot;   &#xD;&#xA;If you do hit a performance bottleneck in your update routine, that's the time to investigate and optimize. Since you cannot know in advance what parts of your game will take the most time to compute and might waste time optimizing the wrong stuff." />
  <row Id="13994" PostHistoryTypeId="6" PostId="6974" RevisionGUID="c009dac3-0ab6-4ab7-a5ba-b917f062a583" CreationDate="2011-01-01T19:29:23.950" UserId="14" Comment="edited tags" Text="&lt;assets&gt;" />
  <row Id="13995" PostHistoryTypeId="2" PostId="7003" RevisionGUID="b1ac1423-3833-4708-8630-fa3d632e166d" CreationDate="2011-01-01T19:34:21.130" UserId="4264" Text="The way I understand your question is that basically you're asking about cooperative multitasking.&#xD;&#xA;&#xD;&#xA;Basic infrastructure would be a list of function pointers, all called in a round-robin manner (unless a more sophisticated prioritization is required), and all these functions would do &quot;a little bit of work&quot;, small enough not to cause the game to become sluggish. I've done this in DOS before threads were hot, and also on mobile devices that didn't support threading.&#xD;&#xA;&#xD;&#xA;A better question, in my opinion, is what to do while waiting for the player to move. What kinds of things would be so processor-intensive that they can't be performed on the fly anyway, while, at the same time, being so optional that if the player just hammers some move key fast enough, the game doesn't have time to process these. Thus, stuff like calculating A* for a couple thousand AIs is out.&#xD;&#xA;&#xD;&#xA;Better solution, in my opinion, is to simply yield/sleep, and let the computer's power management do its job. Laptop users will like you better for it." />
  <row Id="13996" PostHistoryTypeId="6" PostId="6974" RevisionGUID="40467cce-52fe-44f7-97b2-a4454283a0e5" CreationDate="2011-01-01T19:37:23.220" UserId="14" Comment="edited tags" Text="&lt;assets&gt;&lt;asset-creation&gt;" />
  <row Id="13998" PostHistoryTypeId="5" PostId="6375" RevisionGUID="41811dcf-eff2-4827-a233-0dfaf5b53e6b" CreationDate="2011-01-01T22:14:28.313" UserId="3794" Comment="corrected spelling" Text="Correct solution should be to use another thread for loading images. And the waiting aprox half second is not good. Yours image loading function should have some callback to say loading thread that image is loaded." />
  <row Id="13999" PostHistoryTypeId="5" PostId="6375" RevisionGUID="4609b101-3785-4575-9309-560ac4b94bb1" CreationDate="2011-01-01T22:54:20.350" UserId="51" Comment="added 5 characters in body; added 4 characters in body" Text="Correct solution should be to use another thread for loading images. And the waiting aprox half second is not good. Your image loading function should have some callback to tell the  loading thread that the image is loaded." />
  <row Id="14000" PostHistoryTypeId="2" PostId="7005" RevisionGUID="f562c298-24af-461a-9727-3850e4affc64" CreationDate="2011-01-01T23:59:09.957" UserId="2735" Text="I am told repeatedly that XNA Game Studio uses a right-handed coordinate system, and I understand the difference between a right-handed and left-handed coordinate system.  But given that you can use a method like Matrix.CreateOrthographicOffCenter to create your own custom projection matrix, specifying the left, right, top, bottom, zNear and zFar values, when does XNA's coordinate system come into play?&#xD;&#xA;&#xD;&#xA;For example, I'm told that in a right-handed coordinate system, increasingly negative Z values go &quot;into&quot; the screen.  But I can easily create my projection matrix like this:&#xD;&#xA;&#xD;&#xA;Matrix.CreateOrthographicOffCenter(left, right, bottom, top, 0.1f, 10000f);&#xD;&#xA;&#xD;&#xA;I've now specified a *lower* value for the near Z than the far Z, which, as I understand it, means that *positive* Z now goes into the screen.  I can similarly tweak the values of left/right/top/bottom to achieve similar results.&#xD;&#xA;&#xD;&#xA;If specifying a lower zNear than zFar value doesn't affect the Z direction of the coordinate system, what does it do?  And when is the right-handed coordinate system enforced?&#xD;&#xA;&#xD;&#xA;The reason I ask is that I'm trying to implement a 2.5D camera that supports zooming and rotation, and I've spent two full days encountering one unexpected result after another." />
  <row Id="14001" PostHistoryTypeId="1" PostId="7005" RevisionGUID="f562c298-24af-461a-9727-3850e4affc64" CreationDate="2011-01-01T23:59:09.957" UserId="2735" Text="Why / how does XNA's right-handed coordinate system effect anything if you can specify near/far Z values?" />
  <row Id="14002" PostHistoryTypeId="3" PostId="7005" RevisionGUID="f562c298-24af-461a-9727-3850e4affc64" CreationDate="2011-01-01T23:59:09.957" UserId="2735" Text="&lt;xna&gt;&lt;3d&gt;&lt;camera&gt;&lt;coordinates&gt;" />
  <row Id="14003" PostHistoryTypeId="2" PostId="7006" RevisionGUID="ecf0eadf-5874-48b1-b19f-f1c6f8730782" CreationDate="2011-01-02T00:46:23.880" UserId="2332" Text="Okay, a couple of questions here, so I'll do my best to explain them all.&#xD;&#xA;&#xD;&#xA;**Coordinate System**&#xD;&#xA;&#xD;&#xA;The coordinate system of anything affects more than just the orthographic projection. It affects translation and rotation as well.&#xD;&#xA;&#xD;&#xA;For example, set up your camera projection as you have described. Now create an object and set it to move either toward you or away from you. It will move toward the camera when you increase the Z-value of the object's coordinate and move away from the camera when you decrease the Z-value.&#xD;&#xA;&#xD;&#xA;Now if you rotate your camera around the scene (for gameplay reasons, or whatever you like) then the world's Z-axis stays the same, so this time increasing or decreasing the Z-value will affect the object in a different way (depending on the orientation of your camera.&#xD;&#xA;&#xD;&#xA;**Rotation**&#xD;&#xA;&#xD;&#xA;Now for rotation:&#xD;&#xA;&#xD;&#xA;Rotating around the X, Y and Z axis is slightly different in right-hand systems than left-hand systems.&#xD;&#xA;&#xD;&#xA;I refer you to this picture:&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;The left image shows rotations in a left-handed system and the right shows rotations in a right-handed system (although not very well, but it was the only picture I could find relatively quickly from Wikipedia)&#xD;&#xA;&#xD;&#xA;The easiest way to explain it is using your hands. If you put up your right hand when your thumb and index finger make an L-shape with your palm facing towards you, your thumb is the positive X direction and your index finger is the positive Y direction. &#xD;&#xA;&#xD;&#xA;Now bend your middle finger so it is point towards you, this is the positive Z direction in a right handed system (I'm getting to rotations, honest! Just wanted to make everything clear)&#xD;&#xA;&#xD;&#xA;Make a thumbs up and point your thumb towards your face. The direction in which your fingers coil is the POSITIVE direction for a rotation about the Z-axis.&#xD;&#xA;&#xD;&#xA;So lets add +45 degrees of rotation to the Z axis on the object and it will dip its left side down and its right side up.&#xD;&#xA;&#xD;&#xA;Phew, hope that explains rotations in a right-handed system.&#xD;&#xA;&#xD;&#xA;**Projection**&#xD;&#xA;&#xD;&#xA;Now to answer your projection matrix questions. No, creating a projection does not change the world's Z-axis. All it does is is creates a view frustum (Best explained here: [Viewing Frustum][2])&#xD;&#xA;&#xD;&#xA;To work with this rule enforcement, it might be best to have LOCAL axes for your world objects (including your camera).&#xD;&#xA;&#xD;&#xA;I usually have Heading, Right and Up normalized vector members for each of my world objects to help me out in this respect. So whenever you translate an object, instead of adding X, Y or Z values, I simply map it relative to the vectors (e.g. If I press forward, then my camera moves towards it heading, if I press right, it moves when its right vector is pointing).&#xD;&#xA;&#xD;&#xA;**Zoom**&#xD;&#xA;&#xD;&#xA;I know you didn't ask about zooming, but I thought I'd nip it in the bud since you want your camera to support it too.&#xD;&#xA;&#xD;&#xA;Personally, I do a cheap zooming effect by changing the FieldOfView member of the view frustum. This is usually set to around 45-60 degrees. Play around with this until you get the effect you want.&#xD;&#xA;&#xD;&#xA;I think that's everything, hope it helps! :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/jNOhq.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Viewing_frustum" />
  <row Id="14004" PostHistoryTypeId="2" PostId="7007" RevisionGUID="bfbd66ea-2143-42a5-9f7a-578cd3b530c3" CreationDate="2011-01-02T01:15:03.237" UserId="619" Text="Put simply, near and far is simply the closest and furtherest distance that objects will be rendered. You won't be able to see any polygons that are closer to the camera than the near distance, and you won't be able to see any polygons that are further away from the camera than the far distance. It has *nothing* to do with which co-ordinate system is being used.&#xD;&#xA;&#xD;&#xA;It's not 100% accurate to say that increasing the Z-Value moves the object towards the camera, and decreasing it moves it away. This is only true when the camera is facing forward. If the camera was facing backwards, then the opposite would be true.&#xD;&#xA;&#xD;&#xA;If the camera is in the default position and default orientation, then you would need to place objects with negative Z values in order for them to be visible. For instance, if the camera is at 0,0,0, then an object at 0,0,-10 would be visible, but an object at 0,0,10 would not be (as it is behind the camera)." />
  <row Id="14005" PostHistoryTypeId="2" PostId="7008" RevisionGUID="59d2309b-22d6-48c8-a4ea-e75b2ee3679b" CreationDate="2011-01-02T02:22:42.090" UserId="962" Text="I am trying to figure out the best way to render a 2d game at any resolution.&#xD;&#xA;&#xD;&#xA;I am currently rendering the game at 1920x1200. I am trying scale the game to any user selected resolution.&#xD;&#xA;&#xD;&#xA;**What is the best way to scale a game to any arbitrary resolution?**" />
  <row Id="14006" PostHistoryTypeId="1" PostId="7008" RevisionGUID="59d2309b-22d6-48c8-a4ea-e75b2ee3679b" CreationDate="2011-01-02T02:22:42.090" UserId="962" Text="Resolution Independent 2D Rendering in XNA" />
  <row Id="14007" PostHistoryTypeId="3" PostId="7008" RevisionGUID="59d2309b-22d6-48c8-a4ea-e75b2ee3679b" CreationDate="2011-01-02T02:22:42.090" UserId="962" Text="&lt;2d&gt;&lt;xna-4.0&gt;&lt;resolution&gt;" />
  <row Id="14008" PostHistoryTypeId="2" PostId="7009" RevisionGUID="a1304d41-e041-4823-95ea-50b9e4eb1624" CreationDate="2011-01-02T02:46:52.560" UserId="1923" Text="Your assumption that a -Z axis advances into the screen presupposes that a camera is looking in that direction. If the camera was looking in the +X direction, then +X would be advancing into the screen.&#xD;&#xA;&#xD;&#xA;clip values are expressed in projection space. The -Z values you speak of are in world space. You must be able to convert between spaces when visualizing concepts." />
  <row Id="14009" PostHistoryTypeId="2" PostId="7010" RevisionGUID="36447953-04bd-44c6-84cf-e663e24fe595" CreationDate="2011-01-02T03:08:55.420" UserId="4296" Text="When constructing the game class or initializing, you create a [GraphicsDeviceManager][1] - this lets you set the screen resolution, as well as many other options.&#xD;&#xA;&#xD;&#xA;    public class MyGame : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        public MyGame()&#xD;&#xA;        {&#xD;&#xA;            var graphicsManager = new GraphicsDeviceManager(this);&#xD;&#xA;            graphicsManager.PreferredBackBufferWidth = 1920;&#xD;&#xA;            graphicsManager.PreferredBackBufferHeight= 1200;&#xD;&#xA;            graphicsManager.ApplyChanges();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A few other options available in the device manager:&#xD;&#xA;&#xD;&#xA; - IsFullScreen&#xD;&#xA; - PreferMultiSampling (antialiasing)&#xD;&#xA; - SynchronizeWithVerticalRetrace (vsync)&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphicsdevicemanager.aspx" />
  <row Id="14010" PostHistoryTypeId="5" PostId="7010" RevisionGUID="2b63bc02-d2c9-442f-a5fc-02728cae230c" CreationDate="2011-01-02T03:18:55.423" UserId="4296" Comment="added 873 characters in body" Text="When constructing the game class or initializing, you create a [GraphicsDeviceManager][1] - this lets you set the screen resolution, as well as many other options.&#xD;&#xA;&#xD;&#xA;    public class MyGame : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        public MyGame()&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;            //... Load settings here if needed ...&#xD;&#xA;            &#xD;&#xA;            var graphicsManager = new GraphicsDeviceManager(this);&#xD;&#xA;            graphicsManager.PreferredBackBufferWidth = 1920;  // Width&#xD;&#xA;            graphicsManager.PreferredBackBufferHeight= 1200;  // Height&#xD;&#xA;            graphicsManager.ApplyChanges();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I load up the actual settings from an XML file - just a simple serializer.  If you want to run in windowed mode, then you'll want to look at the DeviceReset event - use it to recompute the aspect ratio on resize (more applicable in 3d, haven't done quite as much in pure 2d).&#xD;&#xA;&#xD;&#xA;    public MyGame()&#xD;&#xA;    {&#xD;&#xA;        ...&#xD;&#xA;        graphicsManager.DeviceReset += new EventHandler&lt;EventArgs&gt;(DeviceResetHandler);&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// Event handler called when the device initializes itself.&#xD;&#xA;    /// Calls any compnents that are listening to re-initialize themselves.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    protected void DeviceResetHandler(object sender, EventArgs e)&#xD;&#xA;    {&#xD;&#xA;        if (OnDeviceReset != null)&#xD;&#xA;        {&#xD;&#xA;            OnDeviceReset();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A few other options available in the device manager:&#xD;&#xA;&#xD;&#xA; - IsFullScreen&#xD;&#xA; - PreferMultiSampling (antialiasing)&#xD;&#xA; - SynchronizeWithVerticalRetrace (vsync)&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphicsdevicemanager.aspx" />
  <row Id="14011" PostHistoryTypeId="2" PostId="7011" RevisionGUID="351305c2-b1eb-42c3-af83-482286680a8e" CreationDate="2011-01-02T05:20:54.790" UserId="4360" Text="[[[ I CANNOT POST LINKS YET SORRY ]]]&#xD;&#xA;&#xD;&#xA;You REALLY have to check out CAAT library - it's awesome. It's a scenegraph (e.g thing.addchild / thing2.removechild) library for canvas.&#xD;&#xA;&#xD;&#xA;This demo of it blue me away, along with the game also contained on that page:&#xD;&#xA;labs.hyperandroid.com/animation&#xD;&#xA;&#xD;&#xA;So much so that I transfered over our own game to use it, and it only took me one night.&#xD;&#xA;(realtime multiplayer snowball fight)&#xD;&#xA;holiday2010.ogilvy.com&#xD;&#xA;&#xD;&#xA;So much so that I have tried to improve the lirary and add stuff back into it:&#xD;&#xA;github.com/onedayitwillmake/CAAT-Hello &#xD;&#xA;Available on github, github.com/onedayitwillmake/CAAT-Hello/tree/circlepack" />
  <row Id="14012" PostHistoryTypeId="5" PostId="7010" RevisionGUID="5911ef10-7a5a-43b3-a6ee-72924e7216c8" CreationDate="2011-01-02T06:31:40.737" UserId="4296" Comment="Misunderstood question, re-answering." Text="Edit:&#xD;&#xA;&#xD;&#xA;You're looking for the [SpriteBatch.Draw(Texture2D, Rectangle, Color)][1] call.  The Rectangle represents the scaled draw target on the screen.&#xD;&#xA;&#xD;&#xA;I'm assuming here that you're not using a grid layout - wasn't specified in the question so I'll go with assets being able to be drawn at any pixel rather than on a set grid.&#xD;&#xA;&#xD;&#xA; 1. First decide on what should be 'native' resolution.  Probably just height though, different monitors have different aspect ratios so that'll have to be accounted for.  Lets pick 1200 as the native height.  All scaling will be based off this number.&#xD;&#xA;&#xD;&#xA; 2.  Say I'm running the game on my TV with only 720p - 60% of the height.  All unit coordinates and the Rectangle sizes then should be multiplied by 0.6.  A hypothetical orc unit is 20 pixels tall and located at (50,45) under native resolution.  At draw time, the target Rectangle would become 12 pixels tall and drawn at (30, 27)&#xD;&#xA;&#xD;&#xA; 3. Where exactly you calculate in the scaling may be an issue.  You can run the game entirely as if it were running at native resolution - this would mean no extra scaling in things like distance computations, animation speed and interpolation, etc... Then, only do the scaling at draw time, or with hit testing mouse clicks.  If you chose to scale everything, then you just need to make that scale accessible to all systems globally and remember to account for it.&#xD;&#xA;&#xD;&#xA;Hope this answers your question better.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritebatch.draw.aspx" />
  <row Id="14022" PostHistoryTypeId="2" PostId="7015" RevisionGUID="0adbac6e-8055-4511-9eaa-acee78c09c8a" CreationDate="2011-01-02T13:02:26.537" UserId="659" Text="I'm working on a level editing tool that saves its data as XML.&#xD;&#xA;&#xD;&#xA;This is ideal during development, as it's painless to make small changes to the data format, and it works nicely with tree-like data.&#xD;&#xA;&#xD;&#xA;The downside, though, is that the XML files are rather bloated, mostly due to duplication of tag and attribute names. Also due to numeric data taking significantly more space than using native datatypes. A small level could easily end up as 1Mb+. I want to get these sizes down significantly, especially if the system is to be used for a game on the iPhone or other devices with relatively limited memory.&#xD;&#xA;&#xD;&#xA;The optimal solution, for memory and performance, would be to convert the XML to a binary level format. But I don't want to do this. I want to keep the format fairly flexible. XML makes it very easy to add new attributes to objects, and give them a default value if an old version of the data is loaded.  So I want to keep with the hierarchy of nodes, with attributes as name-value pairs.&#xD;&#xA;&#xD;&#xA;But I need to store this in a more compact format - to remove the massive duplication of tag/attribute names. Maybe also to give attributes native types, so, for example floating-point data is stored as 4 bytes per float, not as a text string.&#xD;&#xA;&#xD;&#xA;Google/Wikipedia reveal that 'binary XML' is hardly a new problem - it's been solved a number of times already. Has anyone here got experience with any of the existing systems/standards? - are any ideal for games use - with a free, lightweight and cross-platform parser/loader library (C/C++) available?&#xD;&#xA;&#xD;&#xA;Or should I reinvent this wheel myself?&#xD;&#xA;&#xD;&#xA;Or am I better off forgetting the ideal, and just compressing my raw .xml data (it should pack well with zip-like compression), and just taking the memory/performance hit on-load?" />
  <row Id="14023" PostHistoryTypeId="1" PostId="7015" RevisionGUID="0adbac6e-8055-4511-9eaa-acee78c09c8a" CreationDate="2011-01-02T13:02:26.537" UserId="659" Text="'Binary XML' for game data?" />
  <row Id="14024" PostHistoryTypeId="3" PostId="7015" RevisionGUID="0adbac6e-8055-4511-9eaa-acee78c09c8a" CreationDate="2011-01-02T13:02:26.537" UserId="659" Text="&lt;tools&gt;&lt;xml&gt;&lt;compression&gt;" />
  <row Id="14025" PostHistoryTypeId="5" PostId="6790" RevisionGUID="45bc4fe3-5dbb-48fb-9cac-fa10d98ccf51" CreationDate="2011-01-02T14:07:36.997" UserId="741" Comment="edited body" Text="In the absence of further clarification on what the restrictions are, I'm going to assume two meshes that are basically polygon soup (a set of triangles, possibly unconnected).&#xD;&#xA;&#xD;&#xA;You're basically doing n*m triangle to triangle collisions (where n is the number of triangles in object A, m the number in object B). The easiest way is to simply do a brute force closest-point-between-two-triangles for every pairing of triangles. So check triangle 0 in object A against triangle 0 in B, then 1 in B, 2, etc.&#xD;&#xA;&#xD;&#xA;Triangle to triangle checks are pretty straightforward, if you have the RTC book mentioned you probably have a better algorithm already. But basically you only have three cases&#xD;&#xA;&#xD;&#xA; 1. the two triangles are parallel (in which case any point on the triangle is equally close to the other triangle)&#xD;&#xA; 2. an edge on one triangle is parallel to a line which crosses the triangle. So you can find two lines of equal length, one contained in the first triangle, one in the second. As those lines are parallel to each other, every point along those lines is equally close to the equivalent point on the other triangle.&#xD;&#xA; 3. a single vertex of one triangle is closest to some point on the plane inside the other triangle.&#xD;&#xA;&#xD;&#xA;The 3rd case is just a closest-point-on-triangle-to-point, for which you project the point onto the plane of the triangle (i.e. find the closest point to your target on the plane which contains the triangle), and then constrain it to be within the triangle. If the projected point is within the triangle, then you have your closest point, otherwise you now have 3 closest-point-on-line-to-point problems, which you can solve with dot products (and pick the smallest of the three solutions).&#xD;&#xA;&#xD;&#xA;Again you can brute force the triangle-triangle check, by iterating every vertex in triangle X and doing a closest-point-to-triangle check against triangle Y; then iterating every vertex in Y and doing a closest-point-to-triangle check against X. Now for each vertex you have a distance to the other triangle. If you have one vertex which is strictly closer than all the others, you're in case 3, and you're done. If you have two vertices *on the same triangle* equally close to the other triangle, you're in case two. If all three verts of one triangle are equally close to the other, you're in case 1.&#xD;&#xA;&#xD;&#xA;In terms of optimisations / early outs, you need to find a cheaper way of testing two triangles for rough closeness, so that you can discard all but the few potential options. I think you could probably get a lot from AABB checking. E.g.:&#xD;&#xA;&#xD;&#xA; - for each triangle calculate the AABB&#xD;&#xA; - for each triangle pairing (n * m), calculate the distance between the two closest parts of the AABB, and the two furthest parts (separating axis makes this fairly cheap).&#xD;&#xA; - Now you know that for those two triangles, the closest point is somewhere in between those two distances.&#xD;&#xA; - Find the pairing with the smallest maximum distance ([min], [max]). From that pairing you know that you have a closest point which is at most [max] distance away, and so you can eliminate all other pairings which have a minimum distance further away than [max], because even at its best, the pairing is worse than the one you already have." />
  <row Id="14026" PostHistoryTypeId="5" PostId="7008" RevisionGUID="05206713-003c-4a8f-b1f2-7338a6a6924b" CreationDate="2011-01-02T15:22:14.700" UserId="962" Comment="added 295 characters in body" Text="I am trying to figure out the best way to render a 2d game at any resolution.&#xD;&#xA;&#xD;&#xA;I am currently rendering the game at 1920x1200. I am trying scale the game to any user selected resolution **without changing the way I am rendering, or game logic.**&#xD;&#xA;&#xD;&#xA;**What is the best way to scale a game to any arbitrary resolution?**&#xD;&#xA;&#xD;&#xA;Edit: I am trying to achieve this:&#xD;&#xA;&#xD;&#xA;http://www.david-amador.com/2010/03/xna-2d-independent-resolution-rendering/&#xD;&#xA;&#xD;&#xA; but I think the code he has is for a different version of XNA because I cannot find that method overload he uses." />
  <row Id="14027" PostHistoryTypeId="2" PostId="7016" RevisionGUID="0a9bc71b-0ef1-4071-8020-46b08445329f" CreationDate="2011-01-02T15:54:38.853" UserId="1413" Text="Biolab Disaster is a pretty good sidescrolling platformer showing what can be done with html5 and js. http://playbiolab.com/" />
  <row Id="14028" PostHistoryTypeId="2" PostId="7017" RevisionGUID="3ec5e7f1-302b-4fd9-ad63-f226fc3de79b" CreationDate="2011-01-02T16:40:12.590" UserId="4345" Text="Google Protocol Buffers seem like the way to go, but I haven't used them myself.    &#xD;&#xA;http://code.google.com/p/protobuf/&#xD;&#xA;&#xD;&#xA;You define a .proto file which describes the file format:&#xD;&#xA;&#xD;&#xA;    message Person {&#xD;&#xA;      required int32 id = 1;&#xD;&#xA;      required string name = 2;&#xD;&#xA;      optional string email = 3;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is then compiled with a command line tool which generates C/C++ classes to write and parse binary data files in the previously defined data format. There are also a couple of extension for different programming languages.&#xD;&#xA;&#xD;&#xA;The downside to ProtocolBuffer is that they aren't a plaintext format. You would need a tool to generate, read and edit them. But this shouldn't be a problem if you're using them only to exchange data between your game editor and your game. I wouldn't use it to define config files ;)&#xD;&#xA;&#xD;&#xA;Compressing the raw xml files should also work. What type of game are you making? If it is level-based then you should load all necessary resources only once when the level is loaded." />
  <row Id="14029" PostHistoryTypeId="2" PostId="7018" RevisionGUID="da743d2a-d9bb-44fc-9cc2-2052a5775909" CreationDate="2011-01-02T16:52:09.403" UserId="2390" Text="Store and edit your levels as normal XML, but have your game engine lazily bake it into binary XML during loading, and save the binary XML back to the disk so that it can load that next time (if the raw XML hasn't changed).&#xD;&#xA;&#xD;&#xA;Something like this:&#xD;&#xA;&#xD;&#xA;    data loadXml(xmlFile)&#xD;&#xA;    {&#xD;&#xA;        if (xmlFile has changed OR binFile doesn't exist)&#xD;&#xA;        {&#xD;&#xA;            binFile = convertToBinary(xmlFile)&#xD;&#xA;            save(binFile)&#xD;&#xA;        }&#xD;&#xA;        return loadBinaryXml(binFile)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That way you get the best of both worlds. On release, you just need to make sure all the binary files are there." />
  <row Id="14030" PostHistoryTypeId="5" PostId="7011" RevisionGUID="a587cf9c-6b33-4f61-8863-cd09f6cb0ffa" CreationDate="2011-01-02T18:06:18.197" UserId="3830" Comment="bad spelling made me blue so I blew it away" Text="[[[ I CANNOT POST LINKS YET SORRY ]]]&#xD;&#xA;&#xD;&#xA;You REALLY have to check out CAAT library - it's awesome. It's a scenegraph (e.g thing.addchild / thing2.removechild) library for canvas.&#xD;&#xA;&#xD;&#xA;This demo of it blew me away, along with the game also contained on that page:&#xD;&#xA;labs.hyperandroid.com/animation&#xD;&#xA;&#xD;&#xA;So much so that I transfered over our own game to use it, and it only took me one night.&#xD;&#xA;(realtime multiplayer snowball fight)&#xD;&#xA;holiday2010.ogilvy.com&#xD;&#xA;&#xD;&#xA;So much so that I have tried to improve the lirary and add stuff back into it:&#xD;&#xA;github.com/onedayitwillmake/CAAT-Hello &#xD;&#xA;Available on github, github.com/onedayitwillmake/CAAT-Hello/tree/circlepack" />
  <row Id="14031" PostHistoryTypeId="2" PostId="7019" RevisionGUID="793b2178-4385-45ec-bd5f-36a0db082415" CreationDate="2011-01-02T18:33:27.343" UserId="3547" Text="You could try [Karvonite][1]. It's supposed to be agile. It's a persistence framework that will adapt to the changes in your data fairly well (which is nice compared to handling binary your self). I'm not actually sure how the data is structured, but the files are a lot smaller than xml bloated files. (I'm assuming it saves the data in a binary format instead of text like xml)&#xD;&#xA;&#xD;&#xA;The only con I can think of with this is that if your data gets corrupted or some how messed up in a way that Karvonite doesn't like it, your kind of at the mercy of it's creators unless you figure out how the structure of the data works.&#xD;&#xA;&#xD;&#xA;The way you specify how to save/load your data is you just open up their persistence editor, import your assembly with all the data objects and check some check boxes to show what objects you want supported and what fields/properties to save.&#xD;&#xA;&#xD;&#xA;It might be worth a try. Since your using C#, this fits right in with your language since it works with XNA (Windows, Xbox360, and Windows Phone 7 which I think your interested in since you mentioned the iPhone?).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite" />
  <row Id="14032" PostHistoryTypeId="2" PostId="7020" RevisionGUID="c0b8160c-53a9-4d6b-aaf6-b76394b40ac0" CreationDate="2011-01-02T18:51:28.130" UserId="2942" Text="I'm interested in starting some physics simulations and I'm getting hung up on the visualization side of things. I have lots of resources for reading how to implement the simulation itself but I'd rather not learn two things at once - the simulation part and a new complex visualization API.&#xD;&#xA;&#xD;&#xA;Are there any high-level visualization tools that are language independent? I understand that I'll have to learn some new code for visualization but I'd like to start at a high level, OpenGL is my long-term goal and not my prototype goal." />
  <row Id="14033" PostHistoryTypeId="1" PostId="7020" RevisionGUID="c0b8160c-53a9-4d6b-aaf6-b76394b40ac0" CreationDate="2011-01-02T18:51:28.130" UserId="2942" Text="Visualization tools for physical simulations" />
  <row Id="14034" PostHistoryTypeId="3" PostId="7020" RevisionGUID="c0b8160c-53a9-4d6b-aaf6-b76394b40ac0" CreationDate="2011-01-02T18:51:28.130" UserId="2942" Text="&lt;simulations&gt;&lt;visualization&gt;" />
  <row Id="14035" PostHistoryTypeId="2" PostId="7021" RevisionGUID="529a2706-35f1-4e2e-b34e-7f9b19e6ebcb" CreationDate="2011-01-02T20:17:49.430" UserId="2332" Text="Havok and PhysX both come with Visual Debuggers. They're relatively simple to use in your code. &#xD;&#xA;&#xD;&#xA;As far as I know, I haven't seen any generic visualizers, simply because it's impossible to know how you're designing and implementing your physics classes, what integrators you're using, what units you're using, etc, etc.&#xD;&#xA;&#xD;&#xA;Havok and PhysX are both free to use now, so I'd probably recommended using them." />
  <row Id="14036" PostHistoryTypeId="2" PostId="7022" RevisionGUID="77dc686f-f844-47ae-8eed-24acc7943b48" CreationDate="2011-01-02T20:19:48.157" UserId="51" Text="If you don't have a lot of preexiting code you might want to consider Unity.&#xD;&#xA;&#xD;&#xA;Some benefits:&#xD;&#xA;&#xD;&#xA;* Probably the easiest &quot;drop in a primitive shape in an editor and attach some functionality to it&quot; engine I know of.&#xD;&#xA;* Has the ability to allow you to recompile code at run time for tweaking purposes (this breaks if you do &lt;a href=&quot;http://answers.unity3d.com/questions/1559/edit-and-continue-scripting-destroys-current-state&quot;&gt;certain things&lt;/a&gt;, but assuming you don't design yourself into a corner and rely on something that has known issues this could be very useful)&#xD;&#xA;* Can write scripts in either C#, &quot;Unityscript&quot; (which is a variant of Javascript), or Boo (which is a lot like Python), so while it isn't language independent at all, you could probably find a language you're comfortable with.&#xD;&#xA;* Can use .NET DLLs, so ostensibly you could write some underlying code in F# or maybe even C++/CLI&#xD;&#xA;* Super cross platform.&#xD;&#xA;* Don't have to know any graphics code, and everything is very visual in the editor" />
  <row Id="14037" PostHistoryTypeId="2" PostId="7023" RevisionGUID="730b8e97-779b-47c7-b0c9-95184dea434c" CreationDate="2011-01-02T20:22:26.967" UserId="3794" Text="Everybody mentions polygonal renderers. If your visualisation is going to be volumetric (smoke, fluids) or vector or something else you should consider [VTK - Visualization Toolkit][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vtk.org/" />
  <row Id="14038" PostHistoryTypeId="2" PostId="7024" RevisionGUID="7a0fb034-ec06-476e-b552-08c63d9a2ed1" CreationDate="2011-01-02T21:22:40.490" UserId="4092" Text="I have downloaded the latest Mingw toolchain from mingw.org, but it seems DirectX headers are missing. Where can I get those?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I assume there are open source compatibility headers out there, in particular for ddraw.h, which is deprecated by Microsoft." />
  <row Id="14039" PostHistoryTypeId="1" PostId="7024" RevisionGUID="7a0fb034-ec06-476e-b552-08c63d9a2ed1" CreationDate="2011-01-02T21:22:40.490" UserId="4092" Text="Where can I get DirectX headers for Mingw?" />
  <row Id="14040" PostHistoryTypeId="3" PostId="7024" RevisionGUID="7a0fb034-ec06-476e-b552-08c63d9a2ed1" CreationDate="2011-01-02T21:22:40.490" UserId="4092" Text="&lt;c&gt;" />
  <row Id="14042" PostHistoryTypeId="2" PostId="7025" RevisionGUID="e09830a4-ff85-4393-b2b8-79d478bb940c" CreationDate="2011-01-02T22:06:00.913" UserId="3830" Text="This website offers several suggested solutions.  &#xD;&#xA;&#xD;&#xA;http://www.google.com/search?q=Where+can+I+get+DirectX+headers+for+Mingw&#xD;&#xA;&#xD;&#xA;:^)" />
  <row Id="14043" PostHistoryTypeId="6" PostId="7024" RevisionGUID="682df9ea-20ea-4598-a4d9-6a64b6ec0891" CreationDate="2011-01-02T22:06:53.440" UserId="3830" Comment="edited tags" Text="&lt;directx&gt;&lt;c&gt;&lt;mingw&gt;&lt;too-lazy-to-google-it&gt;" />
  <row Id="14044" PostHistoryTypeId="2" PostId="7026" RevisionGUID="938bf107-a033-434a-a476-bf7296aec84b" CreationDate="2011-01-02T23:10:11.303" UserId="744" Text="&lt;a href=&quot;http://mamedev.org/tools/&quot;&gt;The MAME development site&lt;/a&gt; recommends using &lt;a href=&quot;http://mamedev.org/tools/20100102/directx-headers-for-mingw-20100102.zip&quot;&gt;these headers from WINE&lt;/a&gt;; the particular zip they link is from a year ago, so you may be able to extract more recent (and presumably, somehow better) headers from WINE itself." />
  <row Id="14045" PostHistoryTypeId="6" PostId="7024" RevisionGUID="59689ace-d5b5-46cc-a78c-146199ece327" CreationDate="2011-01-02T23:10:46.513" UserId="744" Comment="edited tags" Text="&lt;directx&gt;&lt;windows&gt;&lt;c&gt;&lt;mingw&gt;" />
  <row Id="14046" PostHistoryTypeId="2" PostId="7027" RevisionGUID="1b9661f3-a842-4bc0-89c4-bed0c16fae31" CreationDate="2011-01-02T23:23:21.640" UserId="458" Text="Keep in mind that not all fighting games have gameplay-identical backgrounds. I've played a few games where the stages had different environmental hazards, or secrets that allowed for special fatality-like moves when performed in specific locations, etc.&#xD;&#xA;&#xD;&#xA;So if it really bugs you to produce extra assets with no gameplay value, you could always add some gameplay to the equation..." />
  <row Id="14047" PostHistoryTypeId="5" PostId="7019" RevisionGUID="5f7f436b-fb50-4bbd-8f39-24f2d15fff16" CreationDate="2011-01-02T23:52:37.560" UserId="3547" Comment="added 149 characters in body" Text="You could try [Karvonite][1]. It's supposed to be agile. It's a persistence framework that will adapt to the changes in your data fairly well (which is nice compared to handling binary your self). I'm not actually sure how the data is structured, but the files are a lot smaller than xml bloated files. (I'm assuming it saves the data in a binary format instead of text like xml)&#xD;&#xA;&#xD;&#xA;The only con I can think of with this is that if your data gets corrupted or some how messed up in a way that Karvonite doesn't like it, your kind of at the mercy of it's creators unless you figure out how the structure of the data works.&#xD;&#xA;&#xD;&#xA;The way you specify how to save/load your data is you just open up their persistence editor, import your assembly with all the data objects and check some check boxes to show what objects you want supported and what fields/properties to save.&#xD;&#xA;&#xD;&#xA;It might be worth a try. Since your using C#, this fits right in with your language since it works with XNA (Windows, Xbox360, and Windows Phone 7 which I think your interested in since you mentioned the iPhone?).&#xD;&#xA;&#xD;&#xA;Edit: Just noticed your only using C# for the tools. This probably wouldn't fit very well in your workflow. For some reason I had XNA in my head.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.msdn.microsoft.com/karvonite" />
  <row Id="14048" PostHistoryTypeId="2" PostId="7028" RevisionGUID="ed4c420d-3031-46a6-a971-d553c96fe767" CreationDate="2011-01-03T01:17:26.827" UserId="2577" Text="3D cameras are simpler to implement using Quaternions, in my opinion.&#xD;&#xA;&#xD;&#xA;Take a look at the sample code for the &quot;Simple Scene Viewer&quot;:&#xD;&#xA;&#xD;&#xA;[http://code.google.com/p/o3d/source/browse/trunk/samples_webgl/o3d-webgl-samples/simpleviewer/simpleviewer.html?r=215][1]&#xD;&#xA;&#xD;&#xA;In particular, the drag handler:&#xD;&#xA;&#xD;&#xA;    var rotationQuat = g_aball.drag([e.x, e.y]);&#xD;&#xA;    var rot_mat = g_quaternions.quaternionToRotation(rotationQuat);&#xD;&#xA;    g_thisRot = g_math.matrix4.mul(g_lastRot, rot_mat);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All you need to do with Quaternions is perform a simple matrix multiplication.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/o3d/source/browse/trunk/samples_webgl/o3d-webgl-samples/simpleviewer/simpleviewer.html?r=215" />
  <row Id="14049" PostHistoryTypeId="2" PostId="7029" RevisionGUID="cca9178e-7c1f-46d9-b38b-52a89686c996" CreationDate="2011-01-03T01:45:15.770" UserDisplayName="Alexander" Text="I'm looking to understand and find the terminology for what causes - or allows - players to interfere with geometry in old games.  Famously, ID's Quake3 gave birth to a whole community of people breaking the physics by jumping, sliding, getting stuck and launching themselves off points in geometry.&#xD;&#xA;&#xD;&#xA;Some months ago (though I'd be darned if I can find it again!) I saw a conference held by Bungie's Vic DeLeon and a colleague in which Vic briefly discussed the issues he ran into while attempting to wrap 'collision' objects (please correct my terminology) around environment objects so that players could appear as though they were walking on organic surfaces, while not clipping through them or appear to be walking on air at certain points, due to complexities in the modeling.&#xD;&#xA;&#xD;&#xA;My aim is to compose a case study essay for University in which I can tackle this issue in games, drawing on early exploits and how techniques have changed to address such exploits and to aid in the gameplay itself.  I have 3 current day example of where exploits still exist, however specifically targeting ID Software clearly shows they've massively improved their techniques between Q3 and Q4.&#xD;&#xA;&#xD;&#xA;So in summary, with your help please, I'd like to gain a slightly better understanding of this issue as a whole (its terminology mainly) so I can use terms and ask the right questions within the right contexts.  In practical application, I know what it is, I know how to do it, but I don't have the benefit of level design knowledge yet and its technical widgety knick-knack terms =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Many thanks in advance&#xD;&#xA;&#xD;&#xA;AJ" />
  <row Id="14050" PostHistoryTypeId="1" PostId="7029" RevisionGUID="cca9178e-7c1f-46d9-b38b-52a89686c996" CreationDate="2011-01-03T01:45:15.770" UserDisplayName="Alexander" Text="What causes player box/world geometry glitches in old games?" />
  <row Id="14051" PostHistoryTypeId="3" PostId="7029" RevisionGUID="cca9178e-7c1f-46d9-b38b-52a89686c996" CreationDate="2011-01-03T01:45:15.770" UserDisplayName="Alexander" Text="&lt;collision-detection&gt;" />
  <row Id="14052" PostHistoryTypeId="2" PostId="7030" RevisionGUID="447f1152-aa21-4c3f-9892-11fba0775418" CreationDate="2011-01-03T01:55:17.517" UserId="3455" Text="**Easy to learn controls.**&#xD;&#xA;&#xD;&#xA;This means I don't want to spend the first 3 hours of 'gameplay' doing frustratingly dull tutorial levels. I want to play (even a very easy level) of the game now. &#xD;&#xA;&#xD;&#xA;FPS games are by far the worst offenders here.. 'go hit this moving target', 'run over here', etc. Very boring. If I want to learn the basic controls then I'll check the controls screen on the menu. Or the manual.&#xD;&#xA;&#xD;&#xA;If I absolutely must learn one or two things to be able to play the level I'm on, then as long as they are introduced the first time I need them that's OK, but it shouldn't feel like a chore to learn to play the game! " />
  <row Id="14053" PostHistoryTypeId="2" PostId="7031" RevisionGUID="dbd0d662-6be7-4525-978c-f053f25cd219" CreationDate="2011-01-03T02:41:01.947" UserId="4116" Text="Which license / type of contract is normally used by independent-developer, when they outsource something like graphics / sound work for their games? Is there something like an template floating around?&#xD;&#xA;&#xD;&#xA;Thanks a lot," />
  <row Id="14054" PostHistoryTypeId="1" PostId="7031" RevisionGUID="dbd0d662-6be7-4525-978c-f053f25cd219" CreationDate="2011-01-03T02:41:01.947" UserId="4116" Text="How to license outsourced game-content?" />
  <row Id="14055" PostHistoryTypeId="3" PostId="7031" RevisionGUID="dbd0d662-6be7-4525-978c-f053f25cd219" CreationDate="2011-01-03T02:41:01.947" UserId="4116" Text="&lt;indie&gt;&lt;licensing&gt;&lt;outsourcing&gt;" />
  <row Id="14056" PostHistoryTypeId="5" PostId="6862" RevisionGUID="18127c49-873b-4ebb-87ea-ba0200de016e" CreationDate="2011-01-03T02:47:01.217" UserId="919" Comment="added 104 characters in body" Text="I'm not really sure if it's a good value add seeing as it would entail asset generation. &#xD;&#xA;&#xD;&#xA;The only value I see in it would be for variance but even that would wear thin really quickly.&#xD;&#xA;&#xD;&#xA;Clarification: i.e. Backgrounds that don't add game play related features, just appearance changes. " />
  <row Id="14057" PostHistoryTypeId="2" PostId="7032" RevisionGUID="922516e0-f819-4617-b9d8-94d8526acd95" CreationDate="2011-01-03T05:22:10.610" UserId="160" Text="We used binary XML heavily for *Superman Returns: The Videogame*. We're talking thousands and thousands of files. It worked OK, but honestly didn't seem worth the effort. It ate up a noticeable fraction of our loading time, and the &quot;flexibility&quot; of XML didn't scale up. After a while, our data files had too many weird identifiers, external references that needed to be kept in sync, and other strange requirements for them to really be feasibly human-edited any more.&#xD;&#xA;&#xD;&#xA;Also, XML is really a markup format, and not a data format. It's optimized for a lot of text with occasional tags. It isn't great for fully structured data. It wasn't my call, but if it had been and I knew then what I knew now, I probably would have done JSON or YAML. They're both terse enough to not require compaction, and are optimized for representing *data*, not *text*." />
  <row Id="14058" PostHistoryTypeId="5" PostId="7031" RevisionGUID="7898e066-773c-416a-ab15-46bd62b6483c" CreationDate="2011-01-03T05:27:58.197" UserId="4116" Comment="added 112 characters in body" Text="Which license / type of contract is normally used by independent-developer, when they outsource something like graphics / sound work for their games? Is there something like an template floating around?&#xD;&#xA;&#xD;&#xA;Edit: Im alone, so the contract is only between me and another person who's doing graphics, sounds or so on.&#xD;&#xA;&#xD;&#xA;Thanks a lot," />
  <row Id="14059" PostHistoryTypeId="2" PostId="7033" RevisionGUID="b1dc589c-e0c2-4145-9fb9-ae74956511b0" CreationDate="2011-01-03T06:39:23.380" UserId="3991" Text="Regarding Quake 3: I remember websites with quite in-depth analysis of strafe-jumping and their relation to current framerate, including some mathematical formulas behind it. Quick google search turned out this site: http://www.funender.com/quake/articles/strafing_theory.html looks preaty good, but I'm almost sure it's not the one I saw before." />
  <row Id="14060" PostHistoryTypeId="2" PostId="7034" RevisionGUID="e44fc42b-ae1b-4390-94a0-091759f2b7e8" CreationDate="2011-01-03T07:30:37.570" UserId="3830" Text="A release.  &#xD;&#xA;&#xD;&#xA;Many games that have great potential on the indie side of things never get this." />
  <row Id="14061" PostHistoryTypeId="2" PostId="7035" RevisionGUID="ae5d5bb1-25e9-4c9d-a72b-1a45c9d7f51e" CreationDate="2011-01-03T07:39:11.313" UserId="177" Text="What about the JSON-format?&#xD;&#xA;&#xD;&#xA;http://www.json.org/xml.html" />
  <row Id="14062" PostHistoryTypeId="2" PostId="7036" RevisionGUID="16d31bf8-3355-4c0e-9fa4-d86404d80637" CreationDate="2011-01-03T07:59:57.553" UserId="4377" Text="Just curious what might be a good way to implement a decent collision system. As a class inherited by a base Entity class? Currently I'm stuck and could just use a couple better ideas than my own.&#xD;&#xA;&#xD;&#xA;Any help is appreciated!" />
  <row Id="14063" PostHistoryTypeId="1" PostId="7036" RevisionGUID="16d31bf8-3355-4c0e-9fa4-d86404d80637" CreationDate="2011-01-03T07:59:57.553" UserId="4377" Text="Design questions with Collisions" />
  <row Id="14064" PostHistoryTypeId="3" PostId="7036" RevisionGUID="16d31bf8-3355-4c0e-9fa4-d86404d80637" CreationDate="2011-01-03T07:59:57.553" UserId="4377" Text="&lt;game-design&gt;&lt;collision-detection&gt;" />
  <row Id="14065" PostHistoryTypeId="2" PostId="7037" RevisionGUID="fcc42a02-2c6e-49bd-a5d3-45f4e34c2fbd" CreationDate="2011-01-03T08:20:34.163" UserId="51" Text="Usually contracts like that are work for hire. The person doing the work has no rights to what they create for you since it's yours. " />
  <row Id="14067" PostHistoryTypeId="5" PostId="7036" RevisionGUID="c218248a-a79d-4aff-be74-a6ab9b5352da" CreationDate="2011-01-03T09:29:19.487" UserId="4377" Comment="added 402 characters in body; edited title" Text="Just curious what might be a good way to implement a decent collision system. As a class inherited by a base Entity class? Currently I'm stuck and could just use a couple better ideas than my own.&#xD;&#xA;&#xD;&#xA;Any help is appreciated!&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Sorry, it's 2D Collisioning but honestly, I'm not looking for specific collision methods. I'm looking more about the lines of implementation. Just curious of some of the common methods of how to implement collision systems such as:&#xD;&#xA;&#xD;&#xA;Should the entire collision system be it's own class?&#xD;&#xA;What, if anything, should be inheritable?&#xD;&#xA;&#xD;&#xA;These are some of my questions. Sorry for the confusion." />
  <row Id="14068" PostHistoryTypeId="4" PostId="7036" RevisionGUID="c218248a-a79d-4aff-be74-a6ab9b5352da" CreationDate="2011-01-03T09:29:19.487" UserId="4377" Comment="added 402 characters in body; edited title" Text="Collision Systems Implementation" />
  <row Id="14069" PostHistoryTypeId="2" PostId="7039" RevisionGUID="201c6fc2-b501-4ff9-a94c-dace169fa96d" CreationDate="2011-01-03T10:12:03.750" UserId="364" Text="Each time I ask about collision systems, discussions (online) goes this way :&#xD;&#xA;&#xD;&#xA; - &quot;Hey how should I do this kind of collision?&quot;&#xD;&#xA; - &quot;You should try this algorithm.&quot;&#xD;&#xA; - &quot;No, this one algorithm would be better!&quot;&#xD;&#xA; - &quot;Maybe a more global view of the system would help, like using this algorithm.&quot;&#xD;&#xA; - &quot;Just get the Real Time Collisions book and shut up.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So after several discussions like that I finally bought the book : http://realtimecollisiondetection.net/&#xD;&#xA;&#xD;&#xA;It presents all aspects of the subject to inform you enough to let you decide what to do for each case." />
  <row Id="14070" PostHistoryTypeId="2" PostId="7040" RevisionGUID="47a25190-7de0-4b77-b1b1-e5c8096aabc1" CreationDate="2011-01-03T10:20:23.220" UserId="2050" Text="This is a question of design approach, so there is no single optimal solution.&#xD;&#xA;&#xD;&#xA;A possible approach would be to create a superclass for collidable objects which defines functions for collision detection and have all collidable-object classes inherit from this class. &#xD;&#xA;&#xD;&#xA;How these functions work is dependent on other parameters, such as the type of collision detection (bounding box, bounding circle, bounding polygon, per pixel, ...).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14071" PostHistoryTypeId="2" PostId="7041" RevisionGUID="5a8e316d-8bdf-4f69-a7ed-d6f6ab2eaadb" CreationDate="2011-01-03T11:02:16.207" UserId="3689" Text="question for the experience 3d game developers , im long time programmer (c++/java)&#xD;&#xA;that after 15 years like to get into 3d gaming , after some net research i saw that the trend is mostly with ogre as 3d engine . &#xD;&#xA;what do you think ? for mac/linux/win " />
  <row Id="14072" PostHistoryTypeId="1" PostId="7041" RevisionGUID="5a8e316d-8bdf-4f69-a7ed-d6f6ab2eaadb" CreationDate="2011-01-03T11:02:16.207" UserId="3689" Text="what do you think about Ogre3d as first time engine for first time 3d Game" />
  <row Id="14073" PostHistoryTypeId="3" PostId="7041" RevisionGUID="5a8e316d-8bdf-4f69-a7ed-d6f6ab2eaadb" CreationDate="2011-01-03T11:02:16.207" UserId="3689" Text="&lt;3d-engines&gt;" />
  <row Id="14074" PostHistoryTypeId="2" PostId="7042" RevisionGUID="a14a8ce7-78a4-438d-92c3-b6f9379b2de2" CreationDate="2011-01-03T11:37:35.507" UserId="3232" Text="Keep in mind that Ogre3d is a Graphical engine and it will not allow you to build a game only using it, you will need to implement all the other subsystems or integrate with other engines, like physics, audio, etc.&#xD;&#xA;&#xD;&#xA;If you have no experience with game programming, I suggest as a first project that you use Unity3d or UDK. If you really want to use C++ instead of a scripting language, you can try to create a mod for a game, one good option is any game from Valve (like half life)." />
  <row Id="14079" PostHistoryTypeId="2" PostId="7044" RevisionGUID="6c54541e-089f-43eb-ade6-dfb783796871" CreationDate="2011-01-03T14:32:32.887" UserId="659" Text="**Sixty Frames Per Second!**&#xD;&#xA;&#xD;&#xA;If a game contains any form of action, it would benefit greatly from running at 60fps*, &#xD;&#xA; vsynced, without tearing.&#xD;&#xA;&#xD;&#xA;This can be the difference between an OK game and an awesome game.&#xD;&#xA;&#xD;&#xA;I expect that several uninformed newbies will now respond 'but the human eye can only see 25-ish'. That's nonsense. (Someone needs to write a nice little test program to demonstrate the difference, maybe split-screen 30 and 60fps)&#xD;&#xA;&#xD;&#xA;As developers we've got very sloppy about performance recently, in the push to add 'more stuff' and 'bigger stuff' to games. It's not uncommon for games to drop to 20fps or less, which is really quite poor.&#xD;&#xA;&#xD;&#xA;Back in the early-mid 90's, maybe even before, 60 frames per seconds was the very definition of 'Arcade Quality'. All those lovely smooth 16bit platformers and shooters. And remember games like Daytona and Ridge Racer?  Early, groundbreaking 3D titles - that made the (correct) decision to run at 60fps, rather than add more visual detail.&#xD;&#xA;&#xD;&#xA;These days everyone's competing on screenshot quality, and making games 'bigger'. Gameplay has really suffered, particularly in certain genres, such as racing games, where 30fps or less feels terrible to play once you've had a taste of 60fps&#xD;&#xA;&#xD;&#xA;(*Ok, there's nothing magic about 60 as a number, but to look good, a game should by synchronised with the refresh of the screen, at a constant framerate of 50 or more. And use of lower framerates for cutscenes, for a 'cinematic' look is perfectly acceptable)" />
  <row Id="14081" PostHistoryTypeId="4" PostId="1967" RevisionGUID="fe7f1721-5424-4f1a-95ca-f8423a31ba60" CreationDate="2011-01-03T15:02:50.773" UserId="659" Comment="Slight rewording of the question" Text="What would most games benefit from having?" />
  <row Id="14082" PostHistoryTypeId="6" PostId="7036" RevisionGUID="04831149-8bf4-4a1d-9af3-fe5d18c9fc72" CreationDate="2011-01-03T15:18:18.103" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;collision-detection&gt;" />
  <row Id="14083" PostHistoryTypeId="2" PostId="7045" RevisionGUID="cbc9d91f-48da-4f38-aff7-6a2cf79bd234" CreationDate="2011-01-03T16:27:18.127" UserId="4391" Text="You do not need a full-blown graphics engine at this point.&#xD;&#xA;I suggest starting with OpenGL and writing a little renderer yourself. It's actually pretty easy to get simple scenes on screen, it's rewarding and you will learn far more about graphics programming than from using Ogre or any other 3D engine.&#xD;&#xA;You can also refer to one of the thousand books on the subject during the process. With any engine you are mostly at the mercy of documentation writers.&#xD;&#xA;&#xD;&#xA;Start simple though, graphics programming can be a really challenging task, but IMO is one of the most rewarding types of programming." />
  <row Id="14084" PostHistoryTypeId="2" PostId="7046" RevisionGUID="1b297021-434e-4c9c-90a1-fddc6801b9e0" CreationDate="2011-01-03T16:40:54.087" UserId="3830" Text="It depends on whether you are interested in programming lower level game system frameworks or higher level game design and behavior.  &#xD;&#xA;&#xD;&#xA;If you start with Ogre you will initially be programming the framework and working your way up to the higher level stuff.  If you start with say Unity, the framework will all be setup for you.&#xD;&#xA;&#xD;&#xA;For example if what you really want to program is an idea for an AI or NPC behavior, you're better off with Unity as you can get right to what you are interested in.  " />
  <row Id="14085" PostHistoryTypeId="6" PostId="7041" RevisionGUID="be49a02b-a370-480a-b689-742f345c0c93" CreationDate="2011-01-03T17:58:02.527" UserId="51" Comment="edited tags" Text="&lt;3d-engines&gt;&lt;ogre&gt;" />
  <row Id="14086" PostHistoryTypeId="2" PostId="7047" RevisionGUID="546849a3-7e24-4bba-a956-fa9a82e7c051" CreationDate="2011-01-03T18:06:02.690" UserDisplayName="Koloblicin" Text="My wish list contains:&#xD;&#xA;&#xD;&#xA; - **Dynamically adjusting difficulty**. In most genres it's the easiest thing to implement. And nothing is more depressing, than paying 60 bucks for a new game and not getting past level 4, because meanwhile you got a life and have become a casual gamer ;) Also, it's depressing to have to select &quot;very super dummy easy&quot; ;)&#xD;&#xA;However, this should always be an (defaulted) addition to standard difficulties, because in first-person shooters it kills off comparability to others.&#xD;&#xA; - **COOP**, It's awesome to dive into a overwhelming, exciting fantasy-RPG world, but what's with being king of the hill, if no-one knows about it? ;) Oblivion and Two Worlds are good bad examples of this.&#xD;&#xA;Same goes for first-person shooters. Remember Counterstrike clan wars? Well guess what, that was a crippled self-made COOP variant of the game.&#xD;&#xA;IMHO, COOP should be in every 21st century game. Why do you guess the Wii boomed so much, apart from the controller? Certainly not because of good graphics or physics.&#xD;&#xA; - Remotely referencing Wight's post: **Non-linear gameplay**. Admittedly, if done very very well, a linear story can work. I guess Mafia II roughly did okay, because they had a dense story. But still: We should be way past the days where &quot;COMBINE glue WITH stick&quot; wouldn't work while &quot;COMBINE stick WITH glue&quot; did. I don't demand complete diversity like Fahrenheit/Indigo Prophecy stood out with (mainly because it's hard to continue the story with a follow-up, and it vastly challenges the ratio of gameplay length to game design effort (and thus financial spendings).&#xD;&#xA;Still: Every alternative makes the game more vivid and less &quot;gamey&quot; ^^" />
  <row Id="14088" PostHistoryTypeId="5" PostId="7032" RevisionGUID="2b64d299-5827-4486-816a-611218f08203" CreationDate="2011-01-03T20:20:11.737" UserId="160" Comment="edited body; edited body" Text="We used binary XML heavily for *Superman Returns: The Videogame*. We're talking thousands and thousands of files. It worked OK, but honestly didn't seem worth the effort. It ate up a noticeable fraction of our loading time, and the &quot;flexibility&quot; of XML didn't scale up. After a while, our data files had too many weird identifiers, external references that needed to be kept in sync, and other strange requirements for them to really be feasibly human-edited any more.&#xD;&#xA;&#xD;&#xA;Also, XML is really a markup format, and not a data format. It's optimized for a lot of text with occasional tags. It isn't great for fully structured data. It wasn't my call, but if it had been and I knew then what I know now, I probably would have done JSON or YAML. They're both terse enough to not require compaction, and are optimized for representing *data*, not *text*." />
  <row Id="14089" PostHistoryTypeId="2" PostId="7048" RevisionGUID="26444039-b07e-4690-b0b2-12aecc063a3c" CreationDate="2011-01-03T23:24:45.573" UserId="1581" Text="Usually, the person paying the bills is the one that gets the rights for the job.&#xD;&#xA;&#xD;&#xA;If you are paying him for making the graphics, then usually you should have all the rights. He just gets money for his time.&#xD;&#xA;&#xD;&#xA;Conversely, if he's paying *you* for your programming, then he should get all the rights: code and art.&#xD;&#xA;&#xD;&#xA;If you are both investing - either with an initial inversion or by not getting paid until the game is released - then you both should share all the rights. A usual move would be creating a society, and giving the rights to the society. But it really depends on your local legislation. " />
  <row Id="14090" PostHistoryTypeId="2" PostId="7049" RevisionGUID="bde37b03-dbc2-45f4-872b-b72647a5f91c" CreationDate="2011-01-04T00:09:13.243" UserId="4403" Text="I'm on my way with making a game in Java. Now I have some trouble with an interpolation based game loop in my calculations.&#xD;&#xA;&#xD;&#xA;Before I used that system the calculation of a falling object was like this:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA; - **Delta based system**&#xD;&#xA;&#xD;&#xA;        private static final float SPEED_OF_GRAVITY = 500.0f;&#xD;&#xA; &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;        @Override&#xD;&#xA;         public void update(float timeDeltaSeconds, Object parentObject) {&#xD;&#xA;    &#xD;&#xA;        parentObject.y = parentObject.y +&#xD;&#xA;                  (parentObject.yVelocity * timeDeltaSeconds);&#xD;&#xA;            &#xD;&#xA;        parentObject.yVelocity -= SPEED_OF_GRAVITY  * timeDeltaSeconds;&#xD;&#xA;            ......&#xD;&#xA;&#xD;&#xA;What you see here is that I used that delta value from previous frame to the current frame to calculate the physics. Now I switched and implement a interpolation based system and I actually left the current system where I used delta to calculate my physics.&#xD;&#xA;&#xD;&#xA;However, with the interpolation system the delta time is removed - but now are my calculations screwed up and I've tried the whole day to solve this:&#xD;&#xA;&#xD;&#xA; - **Interpolation based system**&#xD;&#xA;&#xD;&#xA;        private static final float SPEED_OF_GRAVITY = 500.0f;&#xD;&#xA; &#xD;&#xA;        @Override&#xD;&#xA;        public void update(Object parentObject) {&#xD;&#xA;  &#xD;&#xA;        parentObject.y = parentObject.y +&#xD;&#xA;                (parentObject.yVelocity);&#xD;&#xA;        &#xD;&#xA;        parentObject.yVelocity -= SPEED_OF_GRAVITY;&#xD;&#xA;            ......&#xD;&#xA;&#xD;&#xA;I'm totally clueless - how should this be solved? The rendering part is solved with a simple prediction method. With the delta system I could see my object be smoothly rendered to the screen, but with this interpolation/prediction method the object just appear sticky for one second and then it's gone.&#xD;&#xA;&#xD;&#xA;The core of this game loop is actually from here [deWiTTERS Game Loop][1], where I trying to implement the last solution he describes.&#xD;&#xA;&#xD;&#xA;**Shortly - my physics are in a mess and this need to be solved.**&#xD;&#xA;&#xD;&#xA;Any ideas? Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.koonsolo.com/news/dewitters-gameloop/" />
  <row Id="14091" PostHistoryTypeId="1" PostId="7049" RevisionGUID="bde37b03-dbc2-45f4-872b-b72647a5f91c" CreationDate="2011-01-04T00:09:13.243" UserId="4403" Text="Physics in my game confused after restructuring the Game loop" />
  <row Id="14092" PostHistoryTypeId="3" PostId="7049" RevisionGUID="bde37b03-dbc2-45f4-872b-b72647a5f91c" CreationDate="2011-01-04T00:09:13.243" UserId="4403" Text="&lt;game-design&gt;&lt;java&gt;&lt;gameloop&gt;" />
  <row Id="14093" PostHistoryTypeId="2" PostId="7050" RevisionGUID="ca884b4c-db01-4f14-804c-ddcc89760609" CreationDate="2011-01-04T00:57:35.287" UserId="2332" Text="Shortly put, your gravity speed is very, very different in the two systems.&#xD;&#xA;&#xD;&#xA;In the first, your delta time is probably around a few milliseconds (let's say 0.15 seconds for simplicity's sake).&#xD;&#xA;&#xD;&#xA;You are adding 500 * 0.15 to the y position which is 75.&#xD;&#xA;&#xD;&#xA;In the second, you're adding 500. Always. And increasing the velocity by 500 in each update is going to cause MASSIVE problems! So for the second reduce your gravity speed drastically, and see what happens.&#xD;&#xA;&#xD;&#xA;Hope that helps :)" />
  <row Id="14094" PostHistoryTypeId="2" PostId="7051" RevisionGUID="0d798933-ec96-4bec-a500-02610e62393b" CreationDate="2011-01-04T01:05:14.197" UserId="919" Text="This depends on the wording of the contract agreement and the governing countries laws (some states you cannot sign away your rights). Best to consult a legal counselor when drafting contracts so as to iron out the details and not have any issues for later IMHO." />
  <row Id="14096" PostHistoryTypeId="2" PostId="7052" RevisionGUID="668799c5-2e26-48eb-b754-5da887207df4" CreationDate="2011-01-04T04:34:17.353" UserId="4406" Text="Currently, Game Center leaderboard scores can only change one-way (e.g. increase). This makes it impossible (I think) to deal with Elo ratings and the like. How are you getting around this in your leaderboards?&#xD;&#xA;&#xD;&#xA;I have filed a bug report / feature request with Apple already FWIW.&#xD;&#xA;&#xD;&#xA;Are you using a third-party leaderboard service? Rolling  your own?" />
  <row Id="14097" PostHistoryTypeId="1" PostId="7052" RevisionGUID="668799c5-2e26-48eb-b754-5da887207df4" CreationDate="2011-01-04T04:34:17.353" UserId="4406" Text="How are you handling scores that can worsen (e.g. Elo rating) in Game Center?" />
  <row Id="14098" PostHistoryTypeId="3" PostId="7052" RevisionGUID="668799c5-2e26-48eb-b754-5da887207df4" CreationDate="2011-01-04T04:34:17.353" UserId="4406" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;game-center&gt;" />
  <row Id="14099" PostHistoryTypeId="2" PostId="7053" RevisionGUID="bb9d253c-19b0-46b7-b757-7a7a7dd8d06a" CreationDate="2011-01-04T04:54:18.117" UserId="4406" Text="The game is [Darts for the iPhone.][1] It's OK but it's more like a simulation than anything I'd ever claim to be overtly &quot;fun&quot;. I am looking for some ideas to spice up the gameplay. What are your thoughts?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://itunes.apple.com/us/app/darts/id294091463?mt=8" />
  <row Id="14100" PostHistoryTypeId="1" PostId="7053" RevisionGUID="bb9d253c-19b0-46b7-b757-7a7a7dd8d06a" CreationDate="2011-01-04T04:54:18.117" UserId="4406" Text="My game is dull; how would you make it more exciting?" />
  <row Id="14101" PostHistoryTypeId="3" PostId="7053" RevisionGUID="bb9d253c-19b0-46b7-b757-7a7a7dd8d06a" CreationDate="2011-01-04T04:54:18.117" UserId="4406" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;fun&gt;&lt;gameplay&gt;" />
  <row Id="14102" PostHistoryTypeId="2" PostId="7054" RevisionGUID="5e85460f-e094-4351-aeab-c1ad9b15767c" CreationDate="2011-01-04T05:30:07.397" UserId="2698" Text="Use JSON.&#xD;&#xA;&#xD;&#xA;You've mentioned in another comment it still has the issue of wasting space naming elements. It doesn't.&#xD;&#xA;&#xD;&#xA;JSON is built on two structures: name/value pairs (**objects**) and ordered lists of values (**arrays**).&#xD;&#xA;&#xD;&#xA;You are complaining about objects whilst forgetting arrays exist.&#xD;&#xA;&#xD;&#xA;Using mainly objects you could do this:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;some&quot;: ...,&#xD;&#xA;        &quot;data&quot;: ...,&#xD;&#xA;        &quot;fields&quot;: ...,&#xD;&#xA;        &quot;cars&quot;: [&#xD;&#xA;            {&quot;name:&quot;ford&quot;,&quot;num1&quot;:8C,&quot;num2&quot;:FA,&quot;num3:&quot;2A,&quot;num4&quot;:384FFFFF},&#xD;&#xA;            {&quot;name:&quot;holden&quot;,&quot;num1&quot;:00,&quot;num2&quot;:00,&quot;num3:&quot;04,&quot;num4&quot;:04FF54A9}&#xD;&#xA;        ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(That's using octal digits to represent bytes. In other words, each pair of digits you see there is my representation of a single byte in your file.)&#xD;&#xA;&#xD;&#xA;But you also have the option of dropping objects completely:&#xD;&#xA;&#xD;&#xA;    {[&#xD;&#xA;        ...,&#xD;&#xA;        ..., &#xD;&#xA;        ...,&#xD;&#xA;        [[&quot;ford&quot;,8C,FA,2A,384FFFFF],[&quot;holden&quot;,00,00,04,04FF54A9]],&#xD;&#xA;        ...,&#xD;&#xA;    ]}&#xD;&#xA;&#xD;&#xA;Does it get more concise than just having `[`, `]`, `,` and your values?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Well, it does if you're willing to just save the whole thing as a binary stream and forget about data formats altogether." />
  <row Id="14103" PostHistoryTypeId="5" PostId="7054" RevisionGUID="22aac49e-ce2a-4241-9f84-6a2162b46d17" CreationDate="2011-01-04T05:35:18.330" UserId="2698" Comment="added 226 characters in body; added 42 characters in body; added 4 characters in body" Text="Use JSON.&#xD;&#xA;&#xD;&#xA;You've mentioned in another comment it still has the issue of wasting space naming elements. It doesn't.&#xD;&#xA;&#xD;&#xA;JSON is built on two structures: name/value pairs (**objects**) and ordered lists of values (**arrays**).&#xD;&#xA;&#xD;&#xA;You are complaining about objects whilst forgetting arrays exist.&#xD;&#xA;&#xD;&#xA;Using mainly objects you could do this (using octal digit pairs to represent single bytes):&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;some&quot;: ...,&#xD;&#xA;        &quot;data&quot;: ...,&#xD;&#xA;        &quot;fields&quot;: ...,&#xD;&#xA;        &quot;cars&quot;: [&#xD;&#xA;            {&quot;name&quot;:&quot;nissan&quot;,&quot;num1&quot;:8C,&quot;num2&quot;:FA,&quot;num3&quot;:2A,&quot;num4&quot;:384FFFFF},&#xD;&#xA;            {&quot;name&quot;:&quot;holden&quot;,&quot;num1&quot;:00,&quot;num2&quot;:00,&quot;num3&quot;:04,&quot;num4&quot;:04FF54A9}&#xD;&#xA;        ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(You could end up with a byte with the value _2C_, which a parser could mistake for a comma, but this isn't an issue if you know the length of each field and so understand that the 2C is part of a value and not the markup)&#xD;&#xA;&#xD;&#xA;You have the option of dropping objects completely, however, as long as you know where everything will be, and that the 4th index of the main array is cars, etc:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        [&#xD;&#xA;            ...,&#xD;&#xA;            ..., &#xD;&#xA;            ...,&#xD;&#xA;            [[&quot;nissan&quot;,8C,FA,2A,384FFFFF],[&quot;holden&quot;,00,00,04,04FF54A9]],&#xD;&#xA;            ...,&#xD;&#xA;        ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Does it get more concise than just having `[`, `]`, `,` and your values?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Well, it does if you're willing to just save the whole thing as a binary stream and forget about data formats altogether." />
  <row Id="14104" PostHistoryTypeId="2" PostId="7055" RevisionGUID="3653d3d4-9359-49d5-845e-529078b2896b" CreationDate="2011-01-04T05:46:14.927" UserId="395" Text="A clock. Really, if your game starts in fullscreen by default (which far too many games do, but thats another show) it needs to have a wall-time clock (as opposed to game time)." />
  <row Id="14105" PostHistoryTypeId="5" PostId="7054" RevisionGUID="e6a8dc78-6a7a-4476-88e7-61dae619c9cf" CreationDate="2011-01-04T06:11:40.187" UserId="2698" Comment="added 171 characters in body" Text="##Use JSON.##&#xD;&#xA;&#xD;&#xA;(Building on Munificent's response, and largely in response to your concerns expressed elsewhere)&#xD;&#xA;&#xD;&#xA;You've mentioned concern that JSON has the issue of wasting space naming elements, like XML. It doesn't.&#xD;&#xA;&#xD;&#xA;JSON is built on two structures: name/value pairs (**objects**) and ordered lists of values (**arrays**). XML is built _only_ on name/value pairs.&#xD;&#xA;&#xD;&#xA;If you think JSON relies on objects you've been reading JSON that's built to be self-descriptive and human-readable, like this (using octal digit pairs to represent single bytes):&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;some&quot;: ...,&#xD;&#xA;        &quot;data&quot;: ...,&#xD;&#xA;        &quot;fields&quot;: ...,&#xD;&#xA;        &quot;cars&quot;: [&#xD;&#xA;            {&quot;name&quot;:&quot;greg&quot;,&quot;cost&quot;:8C,&quot;speed&quot;:FA,&quot;age&quot;:04,&quot;driverID&quot;:384FFFFF},&#xD;&#xA;            {&quot;name&quot;:&quot;ole rustbucket&quot;,&quot;cost&quot;:00,&quot;speed&quot;:00,&quot;age&quot;:2A,&quot;driverID&quot;:04FF54A9}&#xD;&#xA;        ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However you also have the option of writing it like this, so long as you know where everything will be (and so can look for index 4, rather than object &quot;cars&quot;, to get your list of cars):&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        [&#xD;&#xA;            ...,&#xD;&#xA;            ..., &#xD;&#xA;            ...,&#xD;&#xA;            [[&quot;greg&quot;,8C,FA,04,384FFFFF],[&quot;ole rustbucket&quot;,00,00,2A,04FF54A9]],&#xD;&#xA;            ...,&#xD;&#xA;        ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Does it get more concise than just having `[`, `]`, `,` and your values?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Well, it does if you're willing to just get closer and closer to a pure binary stream.&#xD;&#xA;&#xD;&#xA;    &quot;cars&quot;:{&quot;names&quot;:[&quot;greg&quot;,&quot;ole rustbucket&quot;],&quot;stream&quot;:8CFA04384FFFFF00002A04FF54A9}&#xD;&#xA;    or&#xD;&#xA;    [[&quot;greg&quot;,&quot;ole rustbucket&quot;],8CFA04384FFFFF00002A04FF54A9]&#xD;&#xA;&#xD;&#xA;Just don't shoot yourself in the leg by optimising too much." />
  <row Id="14106" PostHistoryTypeId="2" PostId="7056" RevisionGUID="e6968660-fe8b-48d7-bee7-105855ef61fc" CreationDate="2011-01-04T06:25:34.610" UserId="2158" Text="As pointed out by Ray, you need to adjust the gravity.&#xD;&#xA;I'd like to add that your life will be easier if you adapt metric units to your game. That means:&#xD;&#xA;&#xD;&#xA; - In the coordinate system 1.0 should equal one meter&#xD;&#xA; - For time 1.0 should equal one second&#xD;&#xA; - For mass 1.0 should equal one kilogram&#xD;&#xA;&#xD;&#xA;If you follow these rules, you can intuitively relate values from the game physics to real world units. What also follows is that you can use 9.81 for the gravity constant to get natural gravity.&#xD;&#xA;" />
  <row Id="14107" PostHistoryTypeId="2" PostId="7057" RevisionGUID="29c3f6bd-edaf-4e0e-939e-6dfd8f540eb5" CreationDate="2011-01-04T07:05:27.353" UserId="4264" Text="Let other people play it while you watch. Consider their reactions. Ask for their comments, and listen to them - this is surprisingly difficult.&#xD;&#xA;&#xD;&#xA;Not knowing much about your game, it's difficult to give any more specific suggestions, but here are some that may or may not apply;&#xD;&#xA;&#xD;&#xA;- Eye-candy is always fun. Consider television-sports game like huge transitions, replays, particles (explosions or confetti), etc&#xD;&#xA;- Various game modes may help. Invent new ones!&#xD;&#xA;- Scoring can be tweaked to make things more interesting, like chains, trying to get certain patterns, etc&#xD;&#xA;- And of course, achievements for managing to do specific things." />
  <row Id="14108" PostHistoryTypeId="2" PostId="7058" RevisionGUID="1353b1aa-a979-46d7-8211-2b08ee578e46" CreationDate="2011-01-04T07:44:14.943" UserId="4212" Text="I don't know of any specific limitations Apple imposes regarding 3G.  The communication medium would still be TCP/UDP or HTTP POST/GET.&#xD;&#xA;&#xD;&#xA;In terms of network limitations, cell networks like your 3G service certainly have a unique set of characteristics.  3G networks are notorious for having horrible latency, it isn't uncommon to see round-trip times of up to 700 ms.  In terms of bandwidth, 3G isn't that bad once the data starts flowing.&#xD;&#xA;&#xD;&#xA;If you are looking at a multi-player action game where every second counts, having spikes of 0.7 seconds would be pretty bad.  This is one reason why you would use Wifi.  However if it's a Mafia Wars type game, you would be ok.&#xD;&#xA;&#xD;&#xA;I may be remembering this incorrectly but I seem to remember there being an issue establishing a client/client session between two 3G users - like there was a firewall that prevented any incoming ports over 3G.  For this reason you would either need a centralized server to match clients or use Wifi." />
  <row Id="14109" PostHistoryTypeId="2" PostId="7059" RevisionGUID="2ce1faba-2e49-4b38-8ffa-adf33a75c0db" CreationDate="2011-01-04T09:43:05.183" UserId="4409" Text="I am a newbie in gamedev, and I don't know about programmer's problems that can appear during development. &#xD;&#xA;&#xD;&#xA;So can you advice me some best practice for starting build new online multi-player game backend?&#xD;&#xA;&#xD;&#xA;I just saw reddraft server, and I think Spring library can also do some of its features. What is big difference? Do I need learn more spring or I have to use servers like reddraft or write these tools myself?&#xD;&#xA;&#xD;&#xA;I know that I need to learn hard and many - and the question is - what I should to learn now at the beginning?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="14110" PostHistoryTypeId="1" PostId="7059" RevisionGUID="2ce1faba-2e49-4b38-8ffa-adf33a75c0db" CreationDate="2011-01-04T09:43:05.183" UserId="4409" Text="Online architecture guide" />
  <row Id="14111" PostHistoryTypeId="3" PostId="7059" RevisionGUID="2ce1faba-2e49-4b38-8ffa-adf33a75c0db" CreationDate="2011-01-04T09:43:05.183" UserId="4409" Text="&lt;java&gt;&lt;tools&gt;&lt;online&gt;" />
  <row Id="14112" PostHistoryTypeId="2" PostId="7060" RevisionGUID="d7554617-454f-457d-9fdc-38a1d76bc23c" CreationDate="2011-01-04T09:55:32.140" UserId="2735" Text="I assumed this was a straightforward problem but it has been plaguing me for days.&#xD;&#xA;&#xD;&#xA;I am creating a 2D game with an orthographic camera.  I am using a 3D camera rather than just hacking it because I want to support rotating, panning, and zooming.  Unfortunately the math overwhelms me when I'm trying to figure out how to determine if a clicked point intersects a bounds (let's say rectangular) in the game.&#xD;&#xA;&#xD;&#xA;I was under the impression that I could simply transform the screen point (the clicked point) by the inverse of the camera's View * Projection matrix to obtain the world coordinates of the clicked point.  Unfortunately this is not the case at all; I get some point that seems to be in some completely different coordinate system.&#xD;&#xA;&#xD;&#xA;So then as a sanity check I tried taking an arbitrary world point and transforming it by the camera's View*Projection matrices.  Surely this should get me the corresponding screen point, but even *that* didn't work, and it is quickly shattering any illusion I had that I understood 3D coordinate systems and the math involved.&#xD;&#xA;&#xD;&#xA;So, if I could form this into a question: How would I use my camera's state information (view and projection matrices, for instance) to transform a world point to a screen point, and vice versa?  I hope the problem will be simpler since I'm using an orthographic camera and can make several assumptions from that.&#xD;&#xA;&#xD;&#xA;I very much appreciate any help.  If it makes a difference, I'm using XNA Game Studio." />
  <row Id="14113" PostHistoryTypeId="1" PostId="7060" RevisionGUID="d7554617-454f-457d-9fdc-38a1d76bc23c" CreationDate="2011-01-04T09:55:32.140" UserId="2735" Text="Obtaining a world point from a screen point with an orthographic projection" />
  <row Id="14114" PostHistoryTypeId="3" PostId="7060" RevisionGUID="d7554617-454f-457d-9fdc-38a1d76bc23c" CreationDate="2011-01-04T09:55:32.140" UserId="2735" Text="&lt;xna&gt;&lt;2d&gt;&lt;3d&gt;&lt;camera&gt;&lt;coordinates&gt;" />
  <row Id="14115" PostHistoryTypeId="2" PostId="7061" RevisionGUID="063ce6f9-e937-4297-bb45-9632e13da284" CreationDate="2011-01-04T09:56:48.637" UserId="4411" Text="Are you sure you have installed mingw's dist of the win32 api? I do believe the dx headers are part of that package. Do note that dx9 is the latest dx version available with mingw and that it is not complete (if you're hoping to use d3d, however, you should be good to go)." />
  <row Id="14116" PostHistoryTypeId="2" PostId="7062" RevisionGUID="a679f292-6568-4fa2-947d-44dd40efd8c5" CreationDate="2011-01-04T10:04:17.473" UserId="4412" Text="I've always thought, that using Direct X for Windows was the most powerful, easy and modern method to create games with modern graphics nowdays. And knowing, that it's only Windows I thinks it's pretty difficult to make something similar on other platforms (Mac OS to be exact). But Blizzard somehow managed to deliver Starcraft 2 for Mac OS, and Diablo 3 will be available for Mac too.&#xD;&#xA;&#xD;&#xA;So what I'm interested in is information about:&#xD;&#xA;&#xD;&#xA;- what technologies are they using for their game engines?&#xD;&#xA;- are they using one engine for both games (Starcraft 2 and Diablo 3)? Or develop custom for each game?&#xD;&#xA;- what are they paying in terms of time and money for Mac OS support?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="14117" PostHistoryTypeId="1" PostId="7062" RevisionGUID="a679f292-6568-4fa2-947d-44dd40efd8c5" CreationDate="2011-01-04T10:04:17.473" UserId="4412" Text="How does Blizzard manage to support Mac OS and Windows in their games?" />
  <row Id="14118" PostHistoryTypeId="3" PostId="7062" RevisionGUID="a679f292-6568-4fa2-947d-44dd40efd8c5" CreationDate="2011-01-04T10:04:17.473" UserId="4412" Text="&lt;engine&gt;&lt;windows&gt;&lt;macos&gt;" />
  <row Id="14120" PostHistoryTypeId="2" PostId="7063" RevisionGUID="ad205d56-4abb-402d-8c8c-7c77db6c76bd" CreationDate="2011-01-04T10:35:42.973" UserId="3599" Text="I am not sure on what they actually use (each one would have a powerful solution, surely) . Probably already proven and used game engines succesfully releasing games on that platform, or rolling their own custom solution. But to me that it'd be opengl, shaders, etc, mostly. If you are an indy developer, or even plan on doing commercial games (just no AAA) [jMonkeyEngine 3][1] is quite a nice free solution. It's java based, so probably you could deploy trusting on OSX's included JRE (probably cutting features if not using a very modern jre) , or embed/wrap a binary (we made a test doing so for Windows) using any of the available free or commercial solutions. There are a bunch of other engines compiling to OSX and other platforms, but not totally 'AAA', which output for OSX and other platforms: [Unity][2], [C4 Engine][3], etc. Or if using other open source or commercial multiplatform engine, you might need using a cross platform installer like [InstallBuilder][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/&#xD;&#xA;  [2]: http://unity3d.com/unity/publishing/&#xD;&#xA;  [3]: http://www.terathon.com/c4engine/index.php&#xD;&#xA;  [4]: http://installbuilder.bitrock.com" />
  <row Id="14121" PostHistoryTypeId="2" PostId="7064" RevisionGUID="65e46ffc-25d5-4132-86b4-e7394938b73f" CreationDate="2011-01-04T10:37:48.397" UserId="20" Text="There are graphic engines out there (take [Ogre3D][1] as an example) that provide an abstract layer on top of DirectX and OpenGL. So as a developer you just use the Framework and don't have to care much about the underlying GPU-API. Some special things like shaders may have to be written in HLSL *and* GLSL but there are also higher level shader languages that can run/compile to both APIs.&#xD;&#xA;&#xD;&#xA;My assumption would be that the engine Blizzard uses (they wrote their own) also provides an abstraction layer that makes it easy to swap the underlying graphics API, so that they don't have to rewrite all their graphics code for a Mac port.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/" />
  <row Id="14122" PostHistoryTypeId="2" PostId="7065" RevisionGUID="c51d79b1-a2c0-4997-8e8f-a92733a99bfe" CreationDate="2011-01-04T10:39:18.193" UserId="3794" Text="Is you screenPoint between values -1 - 1? If you are using 0-screen resolution it will not work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //conversion from pixel values to unit cube (result of projection)&#xD;&#xA;    vec4 screenPoint = ( (clickedX / screenWidth)*2.0 - 1.0, (clickedY / screenHeight)*2.0 - 1.0, 0.5, 1.0);&#xD;&#xA;&#xD;&#xA;`screenPoint.Z` defines distance from camera 0.0 = znear, 1.0 = zfar. As you are making 2D game, you dont care about it propably. &#xD;&#xA;&#xD;&#xA;`screenPoint.W` have to be 1.0" />
  <row Id="14123" PostHistoryTypeId="5" PostId="7065" RevisionGUID="f76f6401-3156-46eb-bb16-fcd54ef39416" CreationDate="2011-01-04T10:45:07.270" UserId="3794" Comment="added 2 characters in body; added 5 characters in body" Text="Is you screenPoint between values (-1 ; 1)? If you are using ( 0 ; screenResolution ) it will not work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //conversion from pixel values to unit cube (result of projection)&#xD;&#xA;    vec4 screenPoint = ( (clickedX / screenWidth)*2.0 - 1.0, (clickedY / screenHeight)*2.0 - 1.0, 0.5, 1.0);&#xD;&#xA;&#xD;&#xA;`screenPoint.Z` defines distance from camera 0.0 = znear, 1.0 = zfar. As you are making 2D game, you dont care about it propably. &#xD;&#xA;&#xD;&#xA;`screenPoint.W` have to be 1.0" />
  <row Id="14124" PostHistoryTypeId="2" PostId="7066" RevisionGUID="cd5401e5-1fff-41d4-895e-11156160b47b" CreationDate="2011-01-04T11:17:57.047" UserId="4413" Text="The following engines don't support ISO out of the box but are - from the kind of abstraction they provide - maybe interesting for you to read, or might even provide underlying code:&#xD;&#xA;&#xD;&#xA;  * github.com/oberhamsi/gamejs - (my library) port of PyGame; CommonJs compatible&#xD;&#xA;  * github.com/biilly/doodle-js - Scenegraph&#xD;&#xA;  * github.com/batiste/sprite.js - simplistic but fast sprite handling" />
  <row Id="14125" PostHistoryTypeId="2" PostId="7067" RevisionGUID="50bcd297-7ab6-451d-99ef-274c2e6fc443" CreationDate="2011-01-04T11:22:46.247" UserId="4413" Text="My favorite JS engines built on top of canvas, in personal order:&#xD;&#xA;&#xD;&#xA;  * github.com/oberhamsi/gamejs - (my lib) port of PyGame; CommonJs compatible&#xD;&#xA;  * github.com/kesiev/akihabara - arcade game centric&#xD;&#xA;  * github.com/biilly/doodle-js - scene graph&#xD;&#xA;  * github.com/batiste/sprite.js - simplistic but fast sprite handling&#xD;&#xA;  * github.com/fairfieldt/xcjs - coffeescript&#xD;&#xA;  * easeljs.com/" />
  <row Id="14126" PostHistoryTypeId="2" PostId="7068" RevisionGUID="821f7571-3e39-4792-b5bb-1ef40844c90b" CreationDate="2011-01-04T14:04:29.913" UserId="953" Text="I know this is disheartening, but I'd recommend getting a bit of single-player development experience before coding a multiplayer game.  Multiplayer development has all of the issues of single-player, plus a hundred more.  Doing a single-player game will let you learn some of the programming problems that can appear.  When you no longer consider yourself a gamedev newbie, go for multiplayer." />
  <row Id="14127" PostHistoryTypeId="2" PostId="7069" RevisionGUID="1a787432-7264-4cd3-b321-ebb9ed3f60db" CreationDate="2011-01-04T14:24:02.860" UserId="4103" Text="I have seen many examples of how to render sprites from a spritesheet but I havent grasped why it is the most common way of dealing with sprites in 2d games.&#xD;&#xA;&#xD;&#xA;I have started out with 2d sprite rendering in the few demo applications I've made by dealing with each animation frame for any given sprite type as its own texture - and this collection of textures is stored in a dictionary. This seems to work for me, and suits my workflow pretty well, as I tend to make my animations as gif/mng files and then extract the frames to individual pngs.&#xD;&#xA;&#xD;&#xA;Is there a noticeable performance advantage to rendering from a single sheet rather than from individual textures? With modern hardware that is capable of drawing millions of polygons to the screen a hundred times a second, does it even matter for my 2d games which just deal with a few dozen 50x100px rectangles?&#xD;&#xA;&#xD;&#xA;The implementation details of loading a texture into graphics memory and displaying it in XNA seems pretty abstracted. All I know is that textures are bound to the graphics device when they are loaded, then during the game loop, the textures get rendered in batches. So it's not clear to me whether my choice affects performance.&#xD;&#xA;&#xD;&#xA;I suspect that there are some very good reasons most 2d game developers seem to be using them, I just don't understand why." />
  <row Id="14128" PostHistoryTypeId="1" PostId="7069" RevisionGUID="1a787432-7264-4cd3-b321-ebb9ed3f60db" CreationDate="2011-01-04T14:24:02.860" UserId="4103" Text="2D graphics - why use spritesheets?" />
  <row Id="14129" PostHistoryTypeId="3" PostId="7069" RevisionGUID="1a787432-7264-4cd3-b321-ebb9ed3f60db" CreationDate="2011-01-04T14:24:02.860" UserId="4103" Text="&lt;xna&gt;&lt;2d&gt;&lt;graphics-programming&gt;" />
  <row Id="14130" PostHistoryTypeId="2" PostId="7070" RevisionGUID="fad79ddb-6065-46b1-b194-88e3044dbb5b" CreationDate="2011-01-04T14:36:05.133" UserId="20" Text="A strong argument for using spritesheets is that the number of available textures on a graphic card can be limited. Therefore your graphics library would constantly have to remove texture and re-allocate textures on the GPU. It's much more efficient to just allocate a large texture once.&#xD;&#xA;&#xD;&#xA;Also consider that texture sizes are usually power of 2. So if you have a 50x100px Sprite, you'll allocate textures with the size 64x128 or in the worse case 128x128. That's just wasting graphics memory. Better pack all the sprites into a 1024x1024 texture, which would allow 20x10 sprites and you'll only loose 24 pixels horizontally and vertically. Sometimes even sprites of different sizes are combined into one huge sprite-sheet to use the texture as efficient as possible." />
  <row Id="14131" PostHistoryTypeId="6" PostId="6967" RevisionGUID="6ee3ea8a-4ed3-4566-93ad-e302a90f7370" CreationDate="2011-01-04T14:54:52.930" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;&lt;programming&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="14132" PostHistoryTypeId="6" PostId="7049" RevisionGUID="7b8501c0-3657-4160-8188-6508e9f7d301" CreationDate="2011-01-04T14:55:41.637" UserId="14" Comment="edited tags" Text="&lt;physics&gt;&lt;java&gt;&lt;gameloop&gt;" />
  <row Id="14133" PostHistoryTypeId="2" PostId="7071" RevisionGUID="9014df85-cbaa-4a7e-a505-9c115dda1358" CreationDate="2011-01-04T15:24:33.440" UserId="4410" Text="I'd say the arguement to use would be the ability to render multiple things in a single draw call. Take for example font rendering, without a spritesheet you'd need to render each character with a separate texture swap followed by a draw call. Throw them into a spritesheet and you can render entire sentences with a single draw call (the difference characters in the font being picked out by just specifying the different UV's for the corners). This is a much more efficient way of rendering when a very real overhead of rendering stuff on a lot of platforms is in making too many API calls.&#xD;&#xA;&#xD;&#xA;It can also help save space, but it depends on what your packing into the spritesheet in the first place." />
  <row Id="14134" PostHistoryTypeId="2" PostId="7072" RevisionGUID="6562f15a-b4b2-4dc7-b61b-8f4cef129b89" CreationDate="2011-01-04T15:25:26.850" UserId="51" Text="Each draw call has a certain amount of overhead. By using sprite sheets you can batch the drawing of things that aren't using the same frame of an animation (or more generally, everything that's on the same material) greatly enhancing performance. This may not matter too much for modern PCs depending on your game, but it definitely matters on, say, the iPhone. " />
  <row Id="14135" PostHistoryTypeId="2" PostId="7073" RevisionGUID="e87e1c2b-5f62-413a-bfbd-df387835d92f" CreationDate="2011-01-04T16:20:22.263" UserId="4419" Text="I generated a height map with the diamond square algorithm. The thing is i do not manage to create islands, this is, restrict the height other than water level range to a certain value in the center of the map.&#xD;&#xA;&#xD;&#xA;I manualy seeded a circle in the middle of the map but the rest of the map still receives heights over the water level.&#xD;&#xA;&#xD;&#xA;I dont fully understand the Perlin noise algorithm so i'd like to work with my current implementation of the diamond square algorithm which took me 3 days to interpret and code in PHP. :P" />
  <row Id="14136" PostHistoryTypeId="1" PostId="7073" RevisionGUID="e87e1c2b-5f62-413a-bfbd-df387835d92f" CreationDate="2011-01-04T16:20:22.263" UserId="4419" Text="Control diamond square algorithm to generate islands/pangea." />
  <row Id="14137" PostHistoryTypeId="3" PostId="7073" RevisionGUID="e87e1c2b-5f62-413a-bfbd-df387835d92f" CreationDate="2011-01-04T16:20:22.263" UserId="4419" Text="&lt;algorithm&gt;&lt;maps&gt;" />
  <row Id="14138" PostHistoryTypeId="6" PostId="7059" RevisionGUID="4891c580-babc-4a85-9726-2da75baa79a0" CreationDate="2011-01-04T16:40:55.053" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;tools&gt;&lt;server&gt;&lt;online&gt;" />
  <row Id="14139" PostHistoryTypeId="6" PostId="7052" RevisionGUID="8872d7bd-a906-4ac0-b615-e42b58bff770" CreationDate="2011-01-04T16:44:38.513" UserId="1156" Comment="edited tags" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;game-center&gt;&lt;leaderboards&gt;" />
  <row Id="14140" PostHistoryTypeId="6" PostId="7073" RevisionGUID="6434e711-9080-44f4-9762-6886c6d4a686" CreationDate="2011-01-04T16:58:30.967" UserId="1156" Comment="edited tags" Text="&lt;algorithm&gt;&lt;maps&gt;&lt;php&gt;&lt;heightmap&gt;" />
  <row Id="14141" PostHistoryTypeId="2" PostId="7074" RevisionGUID="2b66b849-f3ba-4fb0-b7af-6706cdc481bd" CreationDate="2011-01-04T17:23:43.707" UserId="953" Text="In addition to performance considerations, sprite sheets can be handy when creating the art; each character can be in its own sheet, and you can see all the frames just by scrolling around.  It helps me keep a consistent look across all the frames.&#xD;&#xA;&#xD;&#xA;Additionally, I code in AS3, and each image file requires a separate embed instruction.  I'd rather have a single embed of an entire spritesheet than 24 embeds for all the frames, even if I'm using a separate resource class." />
  <row Id="14142" PostHistoryTypeId="2" PostId="7075" RevisionGUID="b3576b03-ff4a-43f8-a7b5-81d09fe0f12e" CreationDate="2011-01-04T18:00:13.070" UserId="337" Text="There are multiple ways to generate islands, if you want a single island you could try to simply add a gradient (multiplying the result by 0 (edges of the map) to 1 (perfect center)) would usually create a single island.&#xD;&#xA;&#xD;&#xA;Its also possible to pre-seed certain values, initialize part of the height map with some values and on choosing a new value check before hand if it hasn't been pre-seeded yet, this could create multiple islands (choose a few random places and put large values in them) or a single island (put a large value in the center of the map)." />
  <row Id="14143" PostHistoryTypeId="2" PostId="7076" RevisionGUID="dc3129e9-b2b5-4341-9f6e-cfcd214c4acc" CreationDate="2011-01-04T18:40:18.760" UserId="3108" Text="The graphics memory does not have a bloat up **memory management** like file systems on disks; the oposite is the case: it is kept **simple and fast**.&#xD;&#xA;&#xD;&#xA;One such simple and fast memory mangement might be like having only one single giant 4096x4096 sprite that is cut in multiple smaller sprites by halfing its width and/or height. (There exists a similar 1-dimensional memory-managing technique, but I forgot the name.) Eventually, Defragmentation has to be performed.&#xD;&#xA;&#xD;&#xA;To skip such memory management at **run-time**, developers fill single large sprites with multiple smaller sprites automatically at **compile-time** or even while in the desing-process of the graphics." />
  <row Id="14144" PostHistoryTypeId="2" PostId="7077" RevisionGUID="0829d7a6-56a8-44a2-987b-ac66514731c7" CreationDate="2011-01-04T19:32:05.960" UserId="1156" Text="I'm not going to mention memory/GPU here, since there's enough answers like that.&#xD;&#xA;&#xD;&#xA;Instead, it can clear up your art as you work on it - and after. Instead of having to flick through 10 images to see the walk cycle, you can see all the frames in one go. If you wanted to distribute this, you've only got 1 file to deal with instead of 10. &#xD;&#xA;&#xD;&#xA;And then it's also cleaner (from a organizing point of  view) to have character.png and enemy.png over characterwalk01 through to characterwalk10, then characterattack01 to characterattack05, and it goes on." />
  <row Id="14145" PostHistoryTypeId="2" PostId="7078" RevisionGUID="418ce3e4-a2a2-42bf-b091-17428bdb93dd" CreationDate="2011-01-04T20:07:57.947" UserId="1135" Text="I recently found these two gems:&#xD;&#xA;&#xD;&#xA;http://powdertoy.co.uk/&#xD;&#xA;&#xD;&#xA;http://dan-ball.jp/en/javagame/dust/&#xD;&#xA;&#xD;&#xA;My question is: How are the physics with so many elements efficiently handled? Am I just severely underestimating modern computing power or is it possible to 'just' have a two-dimensional array, each cell of which describes what is placed at the according position and simulate each cell in every step. Or are there more complex things being done like summarising large areas of the same kind into a single data set and separating said set as needed?&#xD;&#xA;&#xD;&#xA;Are there any open-source games like this I could look at?" />
  <row Id="14146" PostHistoryTypeId="1" PostId="7078" RevisionGUID="418ce3e4-a2a2-42bf-b091-17428bdb93dd" CreationDate="2011-01-04T20:07:57.947" UserId="1135" Text="Powder games: how do they work?" />
  <row Id="14147" PostHistoryTypeId="3" PostId="7078" RevisionGUID="418ce3e4-a2a2-42bf-b091-17428bdb93dd" CreationDate="2011-01-04T20:07:57.947" UserId="1135" Text="&lt;efficiency&gt;&lt;powder&gt;" />
  <row Id="14148" PostHistoryTypeId="6" PostId="7078" RevisionGUID="8269f388-9b53-4a61-990a-d3af2e09d116" CreationDate="2011-01-04T20:11:03.437" UserId="14" Comment="edited tags" Text="&lt;2d-physics&gt;&lt;efficiency&gt;" />
  <row Id="14149" PostHistoryTypeId="2" PostId="7079" RevisionGUID="d66e063a-0ad0-4203-a372-60e68561b1c5" CreationDate="2011-01-04T20:29:22.383" UserId="2773" Text="I've asked similar question about sand simulation on [original Stackowerflow][1]&#xD;&#xA;&#xD;&#xA;The answers might help you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4392552/hourglass-visualization-algorithm" />
  <row Id="14150" PostHistoryTypeId="2" PostId="7080" RevisionGUID="23309cad-1536-45b9-ab33-8d6ab30046df" CreationDate="2011-01-04T20:47:29.833" UserId="1156" Text="There's certainly quite a few; I used to mod them. Note the links are for forum threads and source downloads. The two I have the best memories of are:&#xD;&#xA;&#xD;&#xA;[EngimaSand][1] by xavierenigma ([C++][2] | [Java][3] ) The Java one is newer. &#xD;&#xA;&#xD;&#xA;[BurningSand][4] by sieben ([C++][5]) This one is very fast physics-wise.&#xD;&#xA;&#xD;&#xA;The site is unfortunately close to death, but there's several threads [here][6] about physics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fallingsandgame.com/viewtopic.php?f=11&amp;t=696&#xD;&#xA;  [2]: http://www.fallingsandgame.com/enigma/EnigmaSand3-Source.zip&#xD;&#xA;  [3]: http://www.fallingsandgame.com/enigma/ES4-source.zip&#xD;&#xA;  [4]: http://siebn.de/burningsand/bs2&#xD;&#xA;  [5]: http://siebn.de/download/BS2Source-20081014.zip&#xD;&#xA;  [6]: http://fallingsandgame.com/viewforum.php?f=13" />
  <row Id="14151" PostHistoryTypeId="2" PostId="7081" RevisionGUID="20616c65-35fe-4746-b41f-09af574db62f" CreationDate="2011-01-04T21:12:56.363" UserId="1156" Text="There's [isogame][1] that came up from google. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/isogame/" />
  <row Id="14152" PostHistoryTypeId="2" PostId="7082" RevisionGUID="27441e2c-f48f-458f-b287-77aca43fd551" CreationDate="2011-01-04T21:14:30.843" UserId="2943" Text="I already went through Planet Quake. Where else can I find them?" />
  <row Id="14153" PostHistoryTypeId="1" PostId="7082" RevisionGUID="27441e2c-f48f-458f-b287-77aca43fd551" CreationDate="2011-01-04T21:14:30.843" UserId="2943" Text="Where can I find md2 models?" />
  <row Id="14154" PostHistoryTypeId="3" PostId="7082" RevisionGUID="27441e2c-f48f-458f-b287-77aca43fd551" CreationDate="2011-01-04T21:14:30.843" UserId="2943" Text="&lt;models&gt;&lt;character&gt;" />
  <row Id="14155" PostHistoryTypeId="2" PostId="7083" RevisionGUID="b35bc8f2-f8b8-4be0-9618-25c3fd938281" CreationDate="2011-01-04T21:22:41.503" UserId="1156" Text="Consider:  &#xD;&#xA;[This question about boxing models][1]  &#xD;&#xA;[This question about free models for OGRE/jMonkeyEngine][2]  &#xD;&#xA;[Turbosquid][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6545/where-can-i-find-free-md2-models-and-obj-objects-for-a-boxing-game&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2400/open-source-3d-models-easily-usable-in-ogre3d-jmonkeyengine&#xD;&#xA;  [3]: http://www.turbosquid.com/" />
  <row Id="14156" PostHistoryTypeId="5" PostId="7080" RevisionGUID="ab9caae1-ea84-43b7-b2e9-252bc48a7002" CreationDate="2011-01-04T21:42:02.297" UserId="1156" Comment="added 143 characters in body" Text="There's certainly quite a few; I used to mod them. Note the links are for forum threads and source downloads. The two I have the best memories of are:&#xD;&#xA;&#xD;&#xA;[EngimaSand][1] by xavierenigma ([C++][2] | [Java][3] ) The Java one is newer. &#xD;&#xA;&#xD;&#xA;[BurningSand][4] by sieben ([C++][5]) This one is very fast physics-wise.&#xD;&#xA;&#xD;&#xA;The site is unfortunately close to death, but there's several threads [here][6] about physics.&#xD;&#xA;&#xD;&#xA;EDIT: For anyone interested, I have mediafire'd the Java source for EnigmaSand [here][7].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fallingsandgame.com/viewtopic.php?f=11&amp;t=696&#xD;&#xA;  [2]: http://www.fallingsandgame.com/enigma/EnigmaSand3-Source.zip&#xD;&#xA;  [3]: http://www.fallingsandgame.com/enigma/ES4-source.zip&#xD;&#xA;  [4]: http://siebn.de/burningsand/bs2&#xD;&#xA;  [5]: http://siebn.de/download/BS2Source-20081014.zip&#xD;&#xA;  [6]: http://fallingsandgame.com/viewforum.php?f=13&#xD;&#xA;  [7]: http://www.mediafire.com/?0wxhxctvzmqhi6w" />
  <row Id="14157" PostHistoryTypeId="2" PostId="7084" RevisionGUID="0c343b39-7702-49a3-9152-13d33470d6da" CreationDate="2011-01-04T22:23:01.483" UserId="953" Text="The physics in these games is simulated by use of a system based on a complex &lt;a href=&quot;https://secure.wikimedia.org/wikipedia/en/wiki/Cellular_automaton&quot;&gt;cellular automaton&lt;/a&gt;.  It's significantly more complicated than the one used in, say, the Game of Life, and incorporates features that mean it's probably not a proper CA, but it's still relatively simple to calculate and has been for years.  Not to go into too much detail, but the complexity of the algorithm is going to be quite small, perhaps even O(area).&#xD;&#xA;&#xD;&#xA;It looks like there's also some swarm intelligence in there, which is also surprisingly efficient for the interesting effects it can create." />
  <row Id="14158" PostHistoryTypeId="2" PostId="7085" RevisionGUID="8a6ecba1-c667-4ad6-9f2b-e5e68753a414" CreationDate="2011-01-04T22:35:04.143" UserId="543" Text="From your question I infer that you're trying to seed the border/shore of the island. You might want to do that if it's important that the island's shape is fairly circular, otherwise there's no need. &#xD;&#xA;&#xD;&#xA;But what you do have to do is seed a point (the highest) inside the island and few points (the lowest) outside the island. The rest will arrange itself.&#xD;&#xA;&#xD;&#xA;To simplify, assuming sea-level is 0, highest point 1, this should be enough a seed:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     -1,0                    -1,0&#xD;&#xA;                         &#xD;&#xA;                  1,0          &#xD;&#xA;                         &#xD;&#xA;     -1,0                    -1,0&#xD;&#xA;                         &#xD;&#xA;Ignoring randomization, first iteration (square) gives:                    &#xD;&#xA;                         &#xD;&#xA;     -1,0       [-0,3]       -1,0&#xD;&#xA;                       &#xD;&#xA;    [-0,3]        1,0       [-0,3]&#xD;&#xA;                       &#xD;&#xA;     -1,0       [-0,3]       -1,0&#xD;&#xA;                         &#xD;&#xA;Second (diamond):                    &#xD;&#xA;                         &#xD;&#xA;     -1,0        -0,3        -1,0&#xD;&#xA;          [-0,2]      [-0,2]  &#xD;&#xA;     -0,3         1,0        -0,3&#xD;&#xA;          [-0,2]      [-0,2]  &#xD;&#xA;     -1,0        -0,3        -1,0&#xD;&#xA;                         &#xD;&#xA;Third (square):                    &#xD;&#xA;                         &#xD;&#xA;     -1,0 [-0,4] -0,3 [-0,4] -1,0&#xD;&#xA;    [-0,4] -0,2  [0,1] -0,2 [-0,4]&#xD;&#xA;     -0,3  [0,1]  1,0  [0,1] -0,3&#xD;&#xA;    [-0,4] -0,2  [0,1] -0,2 [-0,4]&#xD;&#xA;     -1,0 [-0,4] -0,3 [-0,4] -1,0&#xD;&#xA;&#xD;&#xA;A bit of clutter, but you might see the beginning of a island in the middle of the map." />
  <row Id="14159" PostHistoryTypeId="5" PostId="7085" RevisionGUID="2bdff21c-1c61-4e0a-945a-d6e0991efeed" CreationDate="2011-01-04T22:41:44.733" UserId="543" Comment="added 1 characters in body" Text="From your question I infer that you're trying to seed the border/shore of the island. You might want to do that if it's important that the island's shape is fairly circular, otherwise there's no need. &#xD;&#xA;&#xD;&#xA;But what you do have to do is seed a point (the highest) inside the island and few points (the lowest) outside the island. The rest will arrange itself.&#xD;&#xA;&#xD;&#xA;To simplify, assuming sea-level is 0, highest point 1, this should be enough a seed:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     -1,0                    -1,0&#xD;&#xA;                         &#xD;&#xA;                  1,0          &#xD;&#xA;                         &#xD;&#xA;     -1,0                    -1,0&#xD;&#xA;                         &#xD;&#xA;Ignoring randomization, first iteration (square) gives:                    &#xD;&#xA;                         &#xD;&#xA;     -1,0       [-0,3]       -1,0&#xD;&#xA;                       &#xD;&#xA;    [-0,3]        1,0       [-0,3]&#xD;&#xA;                       &#xD;&#xA;     -1,0       [-0,3]       -1,0&#xD;&#xA;                         &#xD;&#xA;Second (diamond):                    &#xD;&#xA;                         &#xD;&#xA;     -1,0        -0,3        -1,0&#xD;&#xA;          [-0,2]      [-0,2]  &#xD;&#xA;     -0,3         1,0        -0,3&#xD;&#xA;          [-0,2]      [-0,2]  &#xD;&#xA;     -1,0        -0,3        -1,0&#xD;&#xA;                         &#xD;&#xA;Third (square):                    &#xD;&#xA;                         &#xD;&#xA;     -1,0 [-0,4] -0,3 [-0,4] -1,0&#xD;&#xA;    [-0,4] -0,2  [0,1] -0,2 [-0,4]&#xD;&#xA;     -0,3  [0,1]  1,0  [0,1] -0,3&#xD;&#xA;    [-0,4] -0,2  [0,1] -0,2 [-0,4]&#xD;&#xA;     -1,0 [-0,4] -0,3 [-0,4] -1,0&#xD;&#xA;&#xD;&#xA;A bit of clutter, but you might see the beginning of an island in the middle of the map." />
  <row Id="14160" PostHistoryTypeId="2" PostId="7086" RevisionGUID="37b0db2f-a118-4d27-b97c-1188eaa484cf" CreationDate="2011-01-04T22:42:04.480" UserId="659" Text="Another thing to consider is the texture format. Is it a raw 32bpp texture?  If so, consider using a compressed DXT1 texture, which is 4 bits/pixel (taking 1/8th of the space), or DXT5 if you need the alpha channel, at 8 bits/pixel.&#xD;&#xA;&#xD;&#xA;Reducing the size of the texture data should result in reduced texture memory bandwidth requirements, and improved texture cache performance.&#xD;&#xA;&#xD;&#xA;Also, check that you've not setting maximum quality anisotropic filtering - that can add a fair bit of cost." />
  <row Id="14161" PostHistoryTypeId="2" PostId="7087" RevisionGUID="a16a29f6-d522-4ec7-aad7-b51167178b7c" CreationDate="2011-01-04T22:51:28.837" UserId="744" Text="&lt;a href=&quot;http://www.gamedev.net/community/forums/topic.asp?topic_id=401276&quot;&gt;This post about de Blob&lt;/a&gt; is cited in the first chapter of &lt;em&gt;Game Feel&lt;/em&gt;:&#xD;&#xA;&#xD;&#xA;&gt; When the ball bounces or moves very fast, it slightly deforms, and while rolling it slightly sags. On screenshots this is quite a subtle effect, but when seen in action, it really looks fun. An interesting detail about this, is that it changes the feel of the gameplay entirely. Without the squash-shader, the game feels like playing with a ball made of stone. Then with no changes to the physics at all, the squash-shader makes it feel much more like a ball of paint.&#xD;&#xA;&#xD;&#xA;In other words, _yes_. Appearance alone can significantly affect _perception_ of the game mechanics, which in turn affects _how players play_. Swink calls this &quot;interactions  emphasized by polish&quot;, and it's the earliest working definition of &quot;game feel&quot; provided in the book." />
  <row Id="14162" PostHistoryTypeId="2" PostId="7088" RevisionGUID="4738133f-ed02-46ec-80a6-3a6d4e31b986" CreationDate="2011-01-04T22:55:50.280" UserDisplayName="josh12" Text="Do you know some simple program to create music ( not very complexity, something like old amiga's music ) ?&#xD;&#xA;How can I learn to create songs ? Do you know where can I read about create some music for games ?" />
  <row Id="14163" PostHistoryTypeId="1" PostId="7088" RevisionGUID="4738133f-ed02-46ec-80a6-3a6d4e31b986" CreationDate="2011-01-04T22:55:50.280" UserDisplayName="josh12" Text="Create simple music" />
  <row Id="14164" PostHistoryTypeId="3" PostId="7088" RevisionGUID="4738133f-ed02-46ec-80a6-3a6d4e31b986" CreationDate="2011-01-04T22:55:50.280" UserDisplayName="josh12" Text="&lt;music&gt;" />
  <row Id="14165" PostHistoryTypeId="2" PostId="7089" RevisionGUID="1ffcd9e4-fee6-42d6-bcbe-2f637afda5c2" CreationDate="2011-01-05T00:20:24.763" UserId="1062" Text="Something like [Wolfram Tones][1] or [FamiTracker][2] might be useful for creating basic tunes for simple games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tones.wolfram.com/&#xD;&#xA;  [2]: http://famitracker.shoodot.net/" />
  <row Id="14166" PostHistoryTypeId="2" PostId="7090" RevisionGUID="96bcbb04-6a93-44ff-9772-b819dc73a282" CreationDate="2011-01-05T01:47:50.677" UserId="4429" Text="I'm in the process of building a JavaScript / HTML5 game (using Canvas) for mobile (Android / iPhone/ WebOS) with PhoneGap. I'm currently trying to design out how the UI and playing board should be built and how they should interact but I'm not sure what the best solution is. Here's what I can think of -&#xD;&#xA;&#xD;&#xA;Build the UI right into the canvas using things like drawImage and fillText&#xD;&#xA;Build parts of the UI outside of the canvas using regular DOM objects and then float a div over the canvas when UI elements need to overlap the playing board canvas.&#xD;&#xA;Are there any other possible techniques I can use for building the game UI that I haven't thought of? Also, which of these would be considered the &quot;standard&quot; way (I know HTML5 games are not very popular so there probably isn't a &quot;standard&quot; way yet)? And finally, which way would YOU recommend / use?&#xD;&#xA;&#xD;&#xA;Many thanks in advance!" />
  <row Id="14167" PostHistoryTypeId="1" PostId="7090" RevisionGUID="96bcbb04-6a93-44ff-9772-b819dc73a282" CreationDate="2011-01-05T01:47:50.677" UserId="4429" Text="HTML5 Game (Canvas) - UI Techniques?" />
  <row Id="14168" PostHistoryTypeId="3" PostId="7090" RevisionGUID="96bcbb04-6a93-44ff-9772-b819dc73a282" CreationDate="2011-01-05T01:47:50.677" UserId="4429" Text="&lt;gui&gt;&lt;javascript&gt;&lt;html5&gt;&lt;mobile&gt;&lt;canvas&gt;" />
  <row Id="14169" PostHistoryTypeId="10" PostId="7088" RevisionGUID="b0f50896-0dc2-4df9-be32-e9543be0eaa4" CreationDate="2011-01-05T03:12:32.323" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="14170" PostHistoryTypeId="5" PostId="7073" RevisionGUID="84df5e98-a61d-4b23-b8c0-b169bc35ce75" CreationDate="2011-01-05T03:16:20.063" UserId="4419" Comment="added 672 characters in body" Text="I generated a height map with the diamond square algorithm. The thing is i do not manage to create islands, this is, restrict the height other than water level range to a certain value in the center of the map.&#xD;&#xA;&#xD;&#xA;I manualy seeded a circle in the middle of the map but the rest of the map still receives heights over the water level.&#xD;&#xA;&#xD;&#xA;I dont fully understand the Perlin noise algorithm so i'd like to work with my current implementation of the diamond square algorithm which took me 3 days to interpret and code in PHP. :P&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;I'm trying to get a gradient and its working (it's late and have to refine it, i'll try tomorrow). I tried to work with gradients but silly me, I had been clamping the affected values to a radius, giving me a circle when generating the map.&#xD;&#xA;&#xD;&#xA;The seeding option is NOT working. I may get some bigger landmass, but may be located in any sector in the map, not even close to the center.&#xD;&#xA;&#xD;&#xA;Please have in mind that the DSA generates the middle value averaging it's corners, so its not possible to seed the middle of a square.&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;a     b&#xD;&#xA;   f&#xD;&#xA;c     d&#xD;&#xA;&#xD;&#xA;f = (a+b+c+d) / 4 + random(-value,value)&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Perhaps that's why seeding it's not working." />
  <row Id="14172" PostHistoryTypeId="2" PostId="7091" RevisionGUID="094ff27d-40f6-443e-adfa-d9b562004b59" CreationDate="2011-01-05T08:26:04.977" UserId="4360" Text="Canvas is slow on mobile platforms, at least mobile safari is anyway, so you'll want go use CSS based positioning of objects on those. Specifically use &quot;translate3d&quot; which will turn on the hardware accelerated rendering of objects. &#xD;&#xA;&#xD;&#xA;Check out the CAAT library for canvas though, it's fast and you can use CSS backed &quot;actors&quot; and not change the game logic.&#xD;&#xA;&#xD;&#xA;I cannot post links yet but here are some pseudo links&#xD;&#xA;http://labs.hyperandroid.com/animation&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14173" PostHistoryTypeId="5" PostId="7091" RevisionGUID="ea962a94-5a8c-434c-aea7-66c16f20b25b" CreationDate="2011-01-05T08:42:27.093" UserId="4360" Comment="deleted 2 characters in body" Text="Canvas is slow on mobile platforms, at least mobile safari is anyway, so you'll want go use CSS based positioning of objects on those. Specifically use &quot;translate3d&quot; which will turn on the hardware accelerated rendering of objects. &#xD;&#xA;&#xD;&#xA;Check out the CAAT library for canvas though, it's fast and you can use CSS backed &quot;actors&quot; and not change the game logic.&#xD;&#xA;&#xD;&#xA;I cannot post links yet but here are some pseudo links&#xD;&#xA;http://labs.hyperandroid.com/animation&#xD;&#xA;" />
  <row Id="14174" PostHistoryTypeId="2" PostId="7092" RevisionGUID="41bd62f8-ac49-41f9-9d33-b30a8ab764f8" CreationDate="2011-01-05T08:43:02.370" UserId="4153" Text="Increasing costs of **training**.&#xD;&#xA;&#xD;&#xA;The more **ability** the player have, the more it costs to train another point." />
  <row Id="14177" PostHistoryTypeId="2" PostId="7094" RevisionGUID="b87207cd-8e9c-4a67-bca5-b2486e51a454" CreationDate="2011-01-05T14:15:33.140" UserId="4410" Text="It sounds like the texture is still selected into the GraphicsDevice (or at the very least in use still as the GPU is allowed to lag behind the CPU to achieve the best performance). I've not really used XNA so I can't really speak to the exact nature of that error.&#xD;&#xA;&#xD;&#xA;However, if you do this with a single texture and managed to fix the above problem you would most likely incur a costly peformance bottleneck which requires the CPU to sit around waiting for the GPU to finish using that texture before it can lock it again (the CPU would be blocked from continuing until it could lock the texture knowing it was safe to do so). A better solution would be to create two textures and double-buffer their usage, so you write to Texture 1, then render with it, the next frame write to Texture 2 instead, render with it, switch back to Texture 1 again, etc. That way you can ensure the GPU won't be using the texture still and should also solve the problem you have now." />
  <row Id="14181" PostHistoryTypeId="2" PostId="7096" RevisionGUID="55005a65-aa7f-4860-b423-68397cc57cce" CreationDate="2011-01-05T14:42:29.010" UserId="138" Text="Blizzard is very custom-tech driven. I don't have links to the articles, but I remember seeing that they develop thousands of custom shaders per game for both multiplatform compatibility and backwards compatibility.&#xD;&#xA;&#xD;&#xA;Multiplatform support isn't something new. Plenty of software supports Linux, Mac OS, and Windows. As was mentioned above, the important part is abstracting away from platform specifics.&#xD;&#xA;&#xD;&#xA;Any contemporary game engine handles multiplatform and many can switch between OpenGL and DirectX depending on the platform.&#xD;&#xA;&#xD;&#xA;Blizzard is a C++ house, like most professional large scale developers. But, as was mentioned by S.gfx, if you're looking for an easy solution, there are plenty of non-C++ solutions -- including jMonkeyEngine or LWJGL.&#xD;&#xA;&#xD;&#xA;From the C++ side, you can utilize Glut and Glu to easily handle different operating systems while using OpenGL, or write your own abstraction for specific OS calls.&#xD;&#xA;&#xD;&#xA;To more specifically answer your bullets:&#xD;&#xA;&#xD;&#xA;**what technologies are they using for their game engines?**&#xD;&#xA;Blizzard probably wouldn't say; but, you can be sure the engine is written in C++ and utilizes OpenGL or OpenGL and DirectX. Remember, OpenGL runs on Windows.&#xD;&#xA;&#xD;&#xA;**are they using one engine for both games (Starcraft 2 and Diablo 3)? Or develop custom for each game?**&#xD;&#xA;Blizzard has been known to maintain multiple engines. Diablo 3, from the onset, was a fork of WoW's code, I believe. But, you can be sure it will be nothing like WoW once they've finished the project. Blizzard isn't a company afraid of writing plenty of code per project.&#xD;&#xA;&#xD;&#xA;**what are they paying in terms of time and money for Mac OS support?**&#xD;&#xA;If done correctly, Mac OS support shouldn't be &quot;too&quot; significant of a cost. Anyone can guess. Blizzard, as I said, has a tendency to write custom shaders so everything looks &quot;just right&quot;; so, it could be more than other houses pay." />
  <row Id="14183" PostHistoryTypeId="2" PostId="7097" RevisionGUID="9e204811-dba3-49d3-8ef5-2233e9c65b33" CreationDate="2011-01-05T14:50:33.940" UserId="1829" Text="I remember, and I still think, that one cannot even make a prototyped 3D game to test just simple behaviors without using gigantic tools like unity or knowing extensive C++ programming, design pattern, a decent or basic 3D engine, etc.&#xD;&#xA;&#xD;&#xA;Now I'm wondering, since I know programming, that I'm still more lucky that the ones who need to learn programming prior to know how to make something: even scripted engines such as unity are not for kids, and to my sense they tend to dictate their ways of doing things, which is not the case with engine like ogre or irrlicht.&#xD;&#xA;&#xD;&#xA;I remember toying a little with the blender game engine, it was possible to link states or something I don't remember very well.&#xD;&#xA;&#xD;&#xA;Now I'm thinking that character driven games occupies a big part of the game market. Do you think it is a good idea to make a character-controlled oriented game engine which allows only to build AI instead of anything else ?" />
  <row Id="14184" PostHistoryTypeId="1" PostId="7097" RevisionGUID="9e204811-dba3-49d3-8ef5-2233e9c65b33" CreationDate="2011-01-05T14:50:33.940" UserId="1829" Text="Is it a good idea to simplify an character -driven game engine to the point it's unnecessary to learn scripting/programming ?" />
  <row Id="14185" PostHistoryTypeId="3" PostId="7097" RevisionGUID="9e204811-dba3-49d3-8ef5-2233e9c65b33" CreationDate="2011-01-05T14:50:33.940" UserId="1829" Text="&lt;game-design&gt;&lt;3d&gt;&lt;engine-design&gt;" />
  <row Id="14186" PostHistoryTypeId="6" PostId="7097" RevisionGUID="9b884933-4c08-4fc9-ba58-e1efbb8a5054" CreationDate="2011-01-05T15:06:36.077" UserId="14" Comment="edited tags" Text="&lt;3d&gt;&lt;architecture&gt;&lt;engine-design&gt;" />
  <row Id="14187" PostHistoryTypeId="2" PostId="7098" RevisionGUID="225d8f42-b84d-4b14-927f-41181cd8a5c1" CreationDate="2011-01-05T15:29:24.470" UserId="4183" Text="I am making a 2d platformer where the player can press a button, and restart the level, only their previous character will also run the level at the same time, like they are traveling back in time.&#xD;&#xA;&#xD;&#xA;I know other games have done this before, and the way I have thought of doing it is to make the game character have a set of actions (Idle, Jumping, Walking Left etc.) and then detect changes in those actions and log them into a list along with the game time. So then when I need the character to run the level again on its own, I can just go through the list changing its actions at the right time.&#xD;&#xA;&#xD;&#xA;Is this the best way to do it? Does anyone have any experience in this?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="14188" PostHistoryTypeId="1" PostId="7098" RevisionGUID="225d8f42-b84d-4b14-927f-41181cd8a5c1" CreationDate="2011-01-05T15:29:24.470" UserId="4183" Text="&quot;Time Control&quot; in a 2d Platformer" />
  <row Id="14189" PostHistoryTypeId="3" PostId="7098" RevisionGUID="225d8f42-b84d-4b14-927f-41181cd8a5c1" CreationDate="2011-01-05T15:29:24.470" UserId="4183" Text="&lt;2d&gt;&lt;time-management&gt;" />
  <row Id="14190" PostHistoryTypeId="2" PostId="7099" RevisionGUID="ec0bdbcb-0e4c-48e8-b334-152459dd1fd6" CreationDate="2011-01-05T16:50:04.817" UserId="2698" Text="You're on the right track. I haven't programmed such a game myself, but I've put some thought into the mechanism.&#xD;&#xA;&#xD;&#xA;Here's the approach I'd use:&#xD;&#xA;&#xD;&#xA;Have a Control object which receives keyboard input and passes it on to your character. However, also have the object record exactly when the significant keys (e.g. arrows, jump, etc) were pressed and when they were released. It would store up this sort of information:&#xD;&#xA;&#xD;&#xA;    actions[0].milliseconds = 400     actions[0].action = right pressed&#xD;&#xA;    actions[1].milliseconds = 1000    actions[1].action = jump pressed&#xD;&#xA;    actions[2].milliseconds = 1300    actions[2].action = jump released&#xD;&#xA;    actions[3].milliseconds = 2500    actions[3].action = jump pressed&#xD;&#xA;    actions[4].milliseconds = 3000    actions[4].action = jump released&#xD;&#xA;    actions[5].milliseconds = 5330    actions[5].action = right released&#xD;&#xA;&#xD;&#xA;The Control object has two modes:&#xD;&#xA;&#xD;&#xA;1. Record: Receives keyboard input. Records input in the list. Hands the character input based on keyboard state.&#xD;&#xA;2. Replay: Ignores keyboard input. Advances through the list according to milliseconds elapsed since the level began. Hands the character based on the recorded keyboard state at the current moment (e.g. at 110ms it knows right and jump are both pressed).&#xD;&#xA;&#xD;&#xA;When your Character object is constructed, you give it a Control object. The Character can be in two modes:&#xD;&#xA;&#xD;&#xA;1. Active (the default): There is only ever one active Character and it is the one you control.&#xD;&#xA;2. Ghost: This is the one that replays your past actions.&#xD;&#xA;&#xD;&#xA;When you start the level, create a single Character object and give it its Control object. Now the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;When the level resets, tell the current Active Character to enter Ghost mode. When a Character enters ghost mode, it changes its appearance (semitransparent is common) and sets its Control object to Replay mode. Create a new Active Character with a new control object set to Record mode. Move all Characters back to the starting position, reset the Ghosts' Control objects back to the beginning (i.e. so they're at 0 milliseconds), then the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;If anything is unclear let me know and I'll try to clarify." />
  <row Id="14191" PostHistoryTypeId="5" PostId="7099" RevisionGUID="d3d028c5-d6c7-41d8-9730-cdccd37ce3e2" CreationDate="2011-01-05T16:55:48.933" UserId="2698" Comment="deleted 90 characters in body" Text="You're on the right track. Here's the approach I'd use:&#xD;&#xA;&#xD;&#xA;Have a Control object which receives keyboard input and passes it on to your character. However, also have the object record exactly when the significant keys (e.g. arrows, jump, etc) were pressed and when they were released. It would store up this sort of information:&#xD;&#xA;&#xD;&#xA;    actions[0].milliseconds = 400     actions[0].action = right pressed&#xD;&#xA;    actions[1].milliseconds = 1000    actions[1].action = jump pressed&#xD;&#xA;    actions[2].milliseconds = 1300    actions[2].action = jump released&#xD;&#xA;    actions[3].milliseconds = 2500    actions[3].action = jump pressed&#xD;&#xA;    actions[4].milliseconds = 3000    actions[4].action = jump released&#xD;&#xA;    actions[5].milliseconds = 5330    actions[5].action = right released&#xD;&#xA;&#xD;&#xA;The Control object has two modes:&#xD;&#xA;&#xD;&#xA;1. Record: Receives keyboard input. Records input in the list. Hands the character input based on keyboard state.&#xD;&#xA;2. Replay: Ignores keyboard input. Advances through the list according to milliseconds elapsed since the level began. Hands the character based on the recorded keyboard state at the current moment (e.g. at 110ms it knows right and jump are both pressed).&#xD;&#xA;&#xD;&#xA;When your Character object is constructed, you give it a Control object. The Character can be in two modes:&#xD;&#xA;&#xD;&#xA;1. Active (the default): There is only ever one active Character and it is the one you control.&#xD;&#xA;2. Ghost: This is the one that replays your past actions.&#xD;&#xA;&#xD;&#xA;When you start the level, create a single Character object and give it its Control object. Now the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;When the level resets, tell the current Active Character to enter Ghost mode. When a Character enters ghost mode, it changes its appearance (semitransparent is common) and sets its Control object to Replay mode. Create a new Active Character with a new control object set to Record mode. Move all Characters back to the starting position, reset the Ghosts' Control objects back to the beginning (i.e. so they're at 0 milliseconds), then the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;If anything is unclear let me know and I'll try to clarify." />
  <row Id="14192" PostHistoryTypeId="5" PostId="7011" RevisionGUID="3c9daa4e-a999-457d-98f6-e016d8cbbb9c" CreationDate="2011-01-05T17:02:14.093" UserId="4360" Comment="deleted 11 characters in body; added 3 characters in body" Text="You REALLY have to check out CAAT library - it's awesome!&#xD;&#xA;It's a scenegraph (e.g thing.addchild / thing2.removechild) library for canvas.&#xD;&#xA;&#xD;&#xA;This demo of it blew me away, along with the game also contained on that page:&#xD;&#xA;http://labs.hyperandroid.com/animation&#xD;&#xA;&#xD;&#xA;So much so that I transferred over our own game to use it, and it only took me one night.&#xD;&#xA;&#xD;&#xA;Drop in, multiplayer snowball fight&#xD;&#xA;http://holiday2010.ogilvy.com&#xD;&#xA;&#xD;&#xA;So much so that I have tried to improve the lirary and add stuff back into it:&#xD;&#xA;http://github.com/onedayitwillmake/CAAT-Hello &#xD;&#xA;&#xD;&#xA;Available on github:&#xD;&#xA;http://github.com/onedayitwillmake/CAAT-Hello/tree/circlepack" />
  <row Id="14193" PostHistoryTypeId="6" PostId="7098" RevisionGUID="f4fc256b-a0a5-43bf-93d1-bc5995eff036" CreationDate="2011-01-05T17:09:14.083" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;architecture&gt;" />
  <row Id="14194" PostHistoryTypeId="2" PostId="7100" RevisionGUID="4e82a597-4c1d-4407-b530-f8d2ff2bbe6d" CreationDate="2011-01-05T17:10:40.120" UserId="51" Text="There are a lot of topics that cover game recording/replay systems/etc which should probably be the keystone of your past runthroughs.&#xD;&#xA;&#xD;&#xA;Here's one: http://gamedev.stackexchange.com/questions/6080/how-to-design-a-replay-system" />
  <row Id="14195" PostHistoryTypeId="5" PostId="7099" RevisionGUID="421bf6be-0fb7-4a9c-8663-542229d8bd30" CreationDate="2011-01-05T17:15:08.097" UserId="2698" Comment="added 176 characters in body" Text="You're on the right track. Here's the approach I'd use:&#xD;&#xA;&#xD;&#xA;##Controllers##&#xD;&#xA;&#xD;&#xA;Create a Controller class which receives keyboard input and passes it on to your character. However, also have a Controller record exactly when the significant keys (e.g. arrows, jump, etc) were pressed and when they were released. It would store up this sort of information:&#xD;&#xA;&#xD;&#xA;    actions[0].milliseconds = 400     actions[0].action = right pressed&#xD;&#xA;    actions[1].milliseconds = 1000    actions[1].action = jump pressed&#xD;&#xA;    actions[2].milliseconds = 1300    actions[2].action = jump released&#xD;&#xA;    actions[3].milliseconds = 2500    actions[3].action = jump pressed&#xD;&#xA;    actions[4].milliseconds = 3000    actions[4].action = jump released&#xD;&#xA;    actions[5].milliseconds = 5330    actions[5].action = right released&#xD;&#xA;&#xD;&#xA;A Controller has two modes:&#xD;&#xA;&#xD;&#xA;1. Record: Receives keyboard input. Records input in the list. Hands the character input based on keyboard state.&#xD;&#xA;2. Replay: Ignores keyboard input. Advances through the list according to milliseconds elapsed since the level began. Hands the character based on the recorded keyboard state at the current moment.&#xD;&#xA;&#xD;&#xA;##Characters##&#xD;&#xA;&#xD;&#xA;When your Character object is constructed, it creates a fresh Controller for itself. The Character can be in one of two modes at any time:&#xD;&#xA;&#xD;&#xA;1. Active: There is only ever one active Character and it is the one you control. When the Character is in Active mode, its Controller is in Record mode. **By default** when a Character is constructed it is in Active mode.&#xD;&#xA;2. Ghost: This is the one that replays your past actions. When a Character enters Ghost mode, it changes its appearance and sets its Controller to Replay mode.&#xD;&#xA;&#xD;&#xA;##Levels##&#xD;&#xA;&#xD;&#xA;###A freshly started level###&#xD;&#xA;&#xD;&#xA;When you start the level, create a single Character. Now the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;###When time resets###&#xD;&#xA;&#xD;&#xA;When the level resets, do three things:&#xD;&#xA;&#xD;&#xA;1. Tell the current Active Character to enter Ghost mode.&#xD;&#xA;2. Create a new Character.&#xD;&#xA;3. Call all Characters to Reset themselves. This will place them back at the starting position with no movement, etc. They will in turn tell their Controllers to reset to millisecond 0 with no keys pressed.&#xD;&#xA;&#xD;&#xA;Then the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;If anything is unclear let me know and I'll clarify." />
  <row Id="14196" PostHistoryTypeId="2" PostId="7101" RevisionGUID="a3842e17-5170-4b2b-bfc2-16cf7ea00cbe" CreationDate="2011-01-05T17:21:25.300" UserId="51" Text="Regardless of the input mechanism, at the end of the day you still need to set up some kind of way of telling the game what the logic is.  &quot;Scripting&quot; is a good colloquial term for this.  So basically I disagree with the assertion that you can simplify something to the point where you don't need to know &quot;scripting&quot;.&#xD;&#xA;&#xD;&#xA;That being said, not all scripting needs to be done with a text-based programming language.  There has been some work (but not a lot) towards making a visual scripting system.  Unreal's level scripting tool, Kismet, is a pretty good example of one.  Source engine has a similar mechanic, but it uses entities in the world instead of on a flat plane.&#xD;&#xA;&#xD;&#xA;Basically you have boxes that you drag around in some kind of environment that have inputs and outputs.  If you need some kind of branching output you have some box that have one input and multiple outputs.  Those outputs can go to actions that have data tied to them (i.e. &quot;move to this point&quot;, &quot;say this line&quot;, &quot;ask this question&quot;, etc.).  It's usually a significantly lower barrier to entry to get something up and running in a visual language since you don't have to know keywords or syntax, you just have a limited set of boxes to pick from which all have defined behaviors, and you just connect them together.&#xD;&#xA;&#xD;&#xA;However it's my opinion that visual scripting engines aren't really worth the trouble.  You need to be able to think structured and logically in order to successfully tell the engine what you want to do.  If you can think like that, making the jump from boxes with inputs/outputs to basic branching statements and function calls in a scripting language isn't that big of a deal.  In fact, after a while the visual part of it is probably a hindrance.  Plus, it's a lot more work on the engine side of things.  You have to do things like implement undo, copy/paste, maybe have some higher level features for organizing your scripts.  With a text-based language you can leave all that to the IDE." />
  <row Id="14197" PostHistoryTypeId="6" PostId="7097" RevisionGUID="4d102ba5-1236-4fd4-b26b-fa1915f7b2c6" CreationDate="2011-01-05T17:49:51.100" UserId="14" Comment="edited tags" Text="&lt;3d&gt;&lt;architecture&gt;" />
  <row Id="14198" PostHistoryTypeId="2" PostId="7102" RevisionGUID="b7ddadb5-6ba9-4451-a360-4c4fc4a440d5" CreationDate="2011-01-05T17:53:55.437" UserId="4443" Text="It will in general be a trade off. If you truly want to remove the need to do any sort of scripting you are generally going to be talking about making some sort of an interface that will piece the scripts together in the background (or just connect logic objects or what not). There are entire games where that is the entire point to them, a well defined environment where you drag and drop functionality to see how it interacts with it.&#xD;&#xA;&#xD;&#xA;At the end of the day however, it will always be a trade off.. The more simple you attempt to make the interface the more simplistic the things created through that interface." />
  <row Id="14199" PostHistoryTypeId="5" PostId="7099" RevisionGUID="b2635192-613f-447e-bda2-db848b9d9fdc" CreationDate="2011-01-05T18:15:39.240" UserId="2698" Comment="added 6 characters in body" Text="You're on the right track. Here's the approach I'd use:&#xD;&#xA;&#xD;&#xA;##Controllers##&#xD;&#xA;&#xD;&#xA;Create a Controller class which receives keyboard input and passes it on to your character. However, also have a Controller record exactly when the significant keys (e.g. arrows, jump, etc) were pressed and when they were released. It would store up this sort of information:&#xD;&#xA;&#xD;&#xA;    actions[0].milliseconds = 400     actions[0].action = right pressed&#xD;&#xA;    actions[1].milliseconds = 1000    actions[1].action = jump pressed&#xD;&#xA;    actions[2].milliseconds = 1300    actions[2].action = jump released&#xD;&#xA;    actions[3].milliseconds = 2500    actions[3].action = jump pressed&#xD;&#xA;    actions[4].milliseconds = 3000    actions[4].action = jump released&#xD;&#xA;    actions[5].milliseconds = 5330    actions[5].action = right released&#xD;&#xA;&#xD;&#xA;A Controller has two modes:&#xD;&#xA;&#xD;&#xA;1. Record: Receives keyboard input. Records input in the list. Hands the character input based on keyboard state.&#xD;&#xA;2. Replay: Ignores keyboard input. Advances through the list according to milliseconds elapsed since the level began. Hands the character input based on the recorded keyboard state at the current moment.&#xD;&#xA;&#xD;&#xA;##Characters##&#xD;&#xA;&#xD;&#xA;When your Character object is constructed, it creates a fresh Controller for itself. The Character can be in one of two modes at any time:&#xD;&#xA;&#xD;&#xA;1. Active: There is only ever one active Character and it is the one you control. When the Character is in Active mode, its Controller is in Record mode. **By default** when a Character is constructed it is in Active mode.&#xD;&#xA;2. Ghost: This is the one that replays your past actions. When a Character enters Ghost mode, it changes its appearance and sets its Controller to Replay mode.&#xD;&#xA;&#xD;&#xA;##Levels##&#xD;&#xA;&#xD;&#xA;###A freshly started level###&#xD;&#xA;&#xD;&#xA;When you start the level, create a single Character. Now the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;###When time resets###&#xD;&#xA;&#xD;&#xA;When the level resets, do three things:&#xD;&#xA;&#xD;&#xA;1. Tell the current Active Character to enter Ghost mode.&#xD;&#xA;2. Create a new Character.&#xD;&#xA;3. Call all Characters to Reset themselves. This will place them back at the starting position with no movement, etc. They will in turn tell their Controllers to reset to millisecond 0 with no keys pressed.&#xD;&#xA;&#xD;&#xA;Then the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;If anything is unclear let me know and I'll clarify." />
  <row Id="14200" PostHistoryTypeId="2" PostId="7103" RevisionGUID="550f4e40-9154-48a0-b33c-69140385e40e" CreationDate="2011-01-05T18:42:27.890" UserId="3458" Text="As already the existing people have added good answers, let me answer uncovered situations.&#xD;&#xA;&#xD;&#xA;If at all you are in a position where you have completed coding your game and now starting to code achievements and find it very complex to maintain too many variables and counts and clearing them off at certain events and things like that.&#xD;&#xA;&#xD;&#xA;You can always create one class (preferably singleton) to receive all events. Now list all your achievements. Then list all game events needed to be tracked. For e.g. my current list looks like this&#xD;&#xA;&#xD;&#xA;KILL ENEMY - walking, bullets&#xD;&#xA;PLAYER DEATH - falling_off, health&#xD;&#xA;ENTER_ROOM, EXIT_ROOM etc.&#xD;&#xA;&#xD;&#xA;Those extra details like walking, bullets can be parameters. Now have one function called fireEvent in that Achievement tracking class. Search all places in code where you need to fireEvents and call that function. Now do the rest of dirty work in the Achievements class. this is the safest way to not disturb existing code and code Achievements. It worked out pretty fast for me." />
  <row Id="14201" PostHistoryTypeId="2" PostId="7104" RevisionGUID="d03ccc65-fa56-4199-b166-bb7c43eb026d" CreationDate="2011-01-05T18:58:12.433" UserId="3843" Text="Okay, I've read several articles, tutorials, and questions regarding this.  Most point to the same technique which doesn't solve my problem.  I need the ability to create semi-transparent sprites (texture2D's really) and have them overlay another sprite.  &#xD;&#xA;&#xD;&#xA;I can achieve that somewhat with the code samples I've found but I'm not satisfied with the results and I know there is a way to do this.  In mobile programming (BREW) we did it old school and actually checked each pixel for transparency before rendering.  &#xD;&#xA;&#xD;&#xA;In this case it seems to render the sprite below it blended with the alpha above it.  This may be an artifact of how I'm rendering the texture but, as I said before, all examples point to this one technique.  Before I go any further I'll go ahead and paste my example code.&#xD;&#xA;&#xD;&#xA;        public void Draw(SpriteBatch batch, Camera camera, float alpha)&#xD;&#xA;        {&#xD;&#xA;            int tileMapWidth = Width;&#xD;&#xA;            int tileMapHeight = Height;&#xD;&#xA;&#xD;&#xA;            batch.Begin(SpriteSortMode.Texture,&#xD;&#xA;                BlendState.AlphaBlend,&#xD;&#xA;                SamplerState.PointWrap,&#xD;&#xA;                DepthStencilState.Default,&#xD;&#xA;                RasterizerState.CullNone,&#xD;&#xA;                null, camera.TransformMatrix);&#xD;&#xA;&#xD;&#xA;            for (int x = 0; x &lt; tileMapWidth; x++)&#xD;&#xA;            {&#xD;&#xA;                for (int y = 0; y &lt; tileMapHeight; y++)&#xD;&#xA;                {&#xD;&#xA;                    int tileIndex = _map[y, x];&#xD;&#xA;&#xD;&#xA;                    if (tileIndex != -1)&#xD;&#xA;                    {&#xD;&#xA;                        Texture2D texture = _tileTextures[tileIndex];&#xD;&#xA;&#xD;&#xA;                        batch.Draw(&#xD;&#xA;                            texture,&#xD;&#xA;                            new Rectangle(&#xD;&#xA;                                (x * Engine.TileWidth),&#xD;&#xA;                                (y * Engine.TileHeight),&#xD;&#xA;                                Engine.TileWidth,&#xD;&#xA;                                Engine.TileHeight),&#xD;&#xA;                            new Color(new Vector4(1f, 1f, 1f, alpha )));&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            batch.End();&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As you can see, in this code I'm using the overloaded SpriteBatch.Begin method which takes, among other things, a blend state.  I'm almost positive that's my problem.  I don't want to BLEND the sprites, I want them to be transparent when alpha is 0.  In this example I can set alpha to 0 but it still renders both tiles, with the lower z ordered sprite showing through, discolored because of the blending.  This is not a desired effect, I want the higher z-ordered sprite to fade out and not effect the color beneath it in such a manner.&#xD;&#xA;&#xD;&#xA;I might be way off here as I'm fairly new to XNA development so feel free to steer me in the correct direction in the event I'm going down the wrong rabbit hole.&#xD;&#xA;&#xD;&#xA;TIA" />
  <row Id="14202" PostHistoryTypeId="1" PostId="7104" RevisionGUID="d03ccc65-fa56-4199-b166-bb7c43eb026d" CreationDate="2011-01-05T18:58:12.433" UserId="3843" Text="How to do proper Alpha in XNA?" />
  <row Id="14203" PostHistoryTypeId="3" PostId="7104" RevisionGUID="d03ccc65-fa56-4199-b166-bb7c43eb026d" CreationDate="2011-01-05T18:58:12.433" UserId="3843" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;&lt;rendering&gt;&lt;transparency&gt;" />
  <row Id="14204" PostHistoryTypeId="2" PostId="7105" RevisionGUID="15473d7b-9f48-4d59-861e-b719af34fa39" CreationDate="2011-01-05T19:22:53.207" UserId="539" Text="If I follow the issue correctly try calling Begin with BlendState.NonPremultiplied. This article may also help shed some light on how alpha blending works in XNA:&#xD;&#xA;&#xD;&#xA;http://blogs.msdn.com/b/shawnhar/archive/2010/04/08/premultiplied-alpha-in-xna-game-studio-4-0.aspx" />
  <row Id="14205" PostHistoryTypeId="5" PostId="7097" RevisionGUID="1f047b28-3f82-48b2-9980-02efc72b1c70" CreationDate="2011-01-05T19:32:02.587" UserId="1829" Comment="Edited the purpose of the engine." Text="I remember, and I still think, that one cannot even make a prototyped 3D game to test just simple behaviors without using gigantic tools like unity or knowing extensive C++ programming, design pattern, a decent or basic 3D engine, etc.&#xD;&#xA;&#xD;&#xA;Now I'm wondering, since I know programming, that I'm still more lucky that the ones who need to learn programming prior to know how to make something: even scripted engines such as unity are not for kids, and to my sense they tend to dictate their ways of doing things, which is not the case with engine like ogre or irrlicht.&#xD;&#xA;&#xD;&#xA;Now I'm thinking that character driven games occupies a big part of the game market. Do you think it is a good idea to make a character-controlled oriented game engine which allows only to build AI instead of anything else ?&#xD;&#xA;&#xD;&#xA;When I mean prototype I also mean &quot;generic&quot; in the sense that one can quickly choose from a set of gameplay parameters such as the scenemager, the camera POV of the player, the controls, some very basic collisions/physics, and integration of basic steering (opensteer for example). The main idea is to make an AI sandbox, but in 3D, so it can be demonstrated without the 2D constraints (and also it makes it more fit to prototype in 3D for a 3D project instead of 2D)." />
  <row Id="14206" PostHistoryTypeId="2" PostId="7106" RevisionGUID="835513b3-1c14-4456-adbf-9e62544788c6" CreationDate="2011-01-05T19:57:02.997" UserId="619" Text="Fully agree with Alex's response, though if you stick with premultiplied alpha I believe you could also do it this way&#xD;&#xA;&#xD;&#xA;    new Color(new Vector4(alpha, alpha, alpha, alpha ))&#xD;&#xA;&#xD;&#xA;Shawn also did a post explaining the difference between premultiplied and multiplied alpha - http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx" />
  <row Id="14207" PostHistoryTypeId="2" PostId="7107" RevisionGUID="8997a4b4-cca4-4963-b495-bde3cd07574f" CreationDate="2011-01-05T20:13:01.233" UserId="4062" Text="Design your first level to teach players how to play. The original Mario Bros. games are good examples of this:&#xD;&#xA;&#xD;&#xA;http://us.wii.com/iwata_asks/nsmb/vol1_page4.jsp&#xD;&#xA;&#xD;&#xA;http://www.significant-bits.com/super-mario-bros-3-level-design-lessons" />
  <row Id="14208" PostHistoryTypeId="2" PostId="7108" RevisionGUID="6c7ed6fc-f38b-43c7-9cba-03981787552b" CreationDate="2011-01-05T20:25:53.000" UserId="2634" Text="I really like the under-appreciated game engine in Blender. (http://www.blender.org) The sensor-controller-actuator model is really easy to follow even for non-programmers, and it's possible to make a reasonably complete game (move an animated character, fire a weapon, destroy targets, show score, keep track of health, reset level or move to a new one) without any programming at all.  &#xD;&#xA;&#xD;&#xA;Of course, some things do require programming (especially getting mouse input for an FPS.)  However, blender already incorporates Python, and Python scripting is tied very nicely into the model so you never need to replace sensor-actuators with Python. Instead, you just switch from a very simple 'pass-through' controller to a complete Python script that can read all the sensors in the scene and pass control to all actuators.  &#xD;&#xA;&#xD;&#xA;It is quite feasible to create a game prototype in a few days in Blender (I did it for a project at a local children's museum last year.)  &#xD;&#xA;&#xD;&#xA;Of course, nothing replaces good-old programming know-how, and eventually, a developer does need to understand programming." />
  <row Id="14209" PostHistoryTypeId="5" PostId="7106" RevisionGUID="5fc7dc99-cb3f-499c-906e-e7edb419e427" CreationDate="2011-01-05T21:42:24.053" UserId="619" Comment="added 4 characters in body" Text="Fully agree with Alex's response, though if you stick with premultiplied alpha I believe you could also do it this way&#xD;&#xA;&#xD;&#xA;    new Color(new Vector4(alpha, alpha, alpha, alpha ))&#xD;&#xA;&#xD;&#xA;Shawn also did a post explaining the difference between premultiplied and non-multiplied alpha - http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx" />
  <row Id="14210" PostHistoryTypeId="2" PostId="7109" RevisionGUID="612d8931-3f20-4a8d-9844-cf3e7320a49a" CreationDate="2011-01-05T22:15:57.957" UserId="422" Text="Both solutions (drawing on your canvas VS. traditional HTML/CSS) are totally valid and will work just fine. Some things to consider:&#xD;&#xA;&#xD;&#xA;* If you're already using a canvas-based library, your code may be cleaner/more organized by continuing to use canvas instead of having additional (DOM-based) methods for UI.&#xD;&#xA;* If your UI is extremely text-heavy (with dialogs etc.) then it may be simpler to implement via HTML/CSS. For instance, it's pretty trivial for text to flow in a DOM element (with stuff like wrapping and paragraph spacing) and comparatively difficult to implement in canvas.&#xD;&#xA;* Depending heavily on the library you're using, it could be much easier to implement click handling on DOM elements than within your canvas. For example if you want to detect a click on an &quot;Ok&quot; button, that's a trivial task in HTML/JS world. But in canvas you'd need to listen to the click on a different element and check its coordinates to see where the click took place.&#xD;&#xA;* Some user agents (especially mobile devices) can be tricky when using DOM elements containing text. For example, Mobile Safari may want to pop up a modal with the tools to copy/paste. Preventing this behavior might be difficult and would probably be easier in canvas land.&#xD;&#xA;&#xD;&#xA;Some of this will be subjective; a developer I know **always** prefers using canvas since he just finds DOM to be ugly and verbose. Since either solution will work fine, I'd pick a simple single screen in your app, quickly develop it separately using both methods and see which one feels easier/better.&#xD;&#xA;&#xD;&#xA;Best of luck!" />
  <row Id="14211" PostHistoryTypeId="4" PostId="7104" RevisionGUID="b7873f1c-e8ca-4db1-8620-aa22232d3635" CreationDate="2011-01-05T22:53:34.310" UserId="3843" Comment="edited title; edited title" Text="How Do I Do Alpha Transparency Properly In XNA 4.0?" />
  <row Id="14212" PostHistoryTypeId="2" PostId="7110" RevisionGUID="0637c0c2-a504-4a1b-9478-d9ba9a0650d6" CreationDate="2011-01-05T23:21:47.720" UserId="3794" Text="First theoretical question. What is better (faster)? Develop your own gpgpu techniques for physics simulation (cloth, fluids, colisions...) or to use PhysX?  &#xD;&#xA;(If i say develop i mean implement existing algorithms like navier-strokes...)&#xD;&#xA;&#xD;&#xA;I don't care about what will take more time to develop. What will be faster for end user? As i understand that physx are accelerated through PPU units in gpu, does it mean that physical simulation can run in paralel with rastarization? Are PPUs different units than unified shader units used as vertex/geometry/pixel shader units?&#xD;&#xA;&#xD;&#xA;And little non-theoretical question: Is physx able to do sofisticated simulation equal to lets say Autodesk's Maya fluid solver?&#xD;&#xA;&#xD;&#xA;Are there any c++ gpu accelerated physics frameworks to try? (I am interested in both physx and gpgpu, commercial engines are ok too). " />
  <row Id="14213" PostHistoryTypeId="1" PostId="7110" RevisionGUID="0637c0c2-a504-4a1b-9478-d9ba9a0650d6" CreationDate="2011-01-05T23:21:47.720" UserId="3794" Text="gpgpu vs. physX for physics simulation" />
  <row Id="14214" PostHistoryTypeId="3" PostId="7110" RevisionGUID="0637c0c2-a504-4a1b-9478-d9ba9a0650d6" CreationDate="2011-01-05T23:21:47.720" UserId="3794" Text="&lt;c++&gt;&lt;physics&gt;&lt;physics-engine&gt;&lt;gpgpu&gt;" />
  <row Id="14215" PostHistoryTypeId="2" PostId="7111" RevisionGUID="4426a91f-47a1-41ce-b42f-8300877faf1f" CreationDate="2011-01-05T23:50:08.037" UserId="4410" Text="If you have a &quot;special case&quot; where you know exactly what you want, then in theory you should be able to at least match, if not beat for your scenario, one of the generic physics engines that run on the GPU. Will you write something that beats the off-the-shelf solution in a short amount of time, no. They've got a lot of smart people doing nothing but that for a long time (plus the GPU manufacturers helping them out to optimise).&#xD;&#xA;&#xD;&#xA;The physics simulation will not run in parallel with rasterisation on the same graphics card (it's the same hardware used for vertex/pixel processing). If you have 2 cards then I think that's the ideal scenario for doing both physics and rendering via the GPU (unless you have very basic visuals that leaves a lot of spare time on your fast GPU).&#xD;&#xA;&#xD;&#xA;I've not used any of the GPU physics systems myself, however I'd expect PhysX to be designed for performing real-time simulation work, where Maya's fluid solver doesn't have to work in real-time and can therefore run a much more sophisticated simulation, however the only thing stopping PhysX being able to match it would be how long it takes to do the simulation." />
  <row Id="14216" PostHistoryTypeId="5" PostId="7110" RevisionGUID="cb3bf45e-c413-4cdb-b3ab-59d3fa729b2d" CreationDate="2011-01-05T23:50:35.297" UserId="3794" Comment="clearification" Text="First theoretical question. What is better (faster)? Develop your own gpgpu techniques for physics simulation (cloth, fluids, colisions...) or to use PhysX?  &#xD;&#xA;(If i say develop i mean implement existing algorithms like navier-strokes...)&#xD;&#xA;&#xD;&#xA;I don't care about what will take more time to develop. What will be faster for end user? As i understand that physx are accelerated through PPU units in gpu, does it mean that physical simulation can run in paralel with rastarization? Are PPUs different units than unified shader units used as vertex/geometry/pixel/gpgpu shader units?&#xD;&#xA;&#xD;&#xA;And little non-theoretical question: Is physx able to do sofisticated simulation equal to lets say Autodesk's Maya fluid solver?&#xD;&#xA;&#xD;&#xA;Are there any c++ gpu accelerated physics frameworks to try? (I am interested in both physx and gpgpu, commercial engines are ok too). " />
  <row Id="14217" PostHistoryTypeId="5" PostId="7110" RevisionGUID="39454066-62da-4470-a9ec-c34acbc6e07e" CreationDate="2011-01-06T00:04:42.223" UserId="3794" Comment="added 87 characters in body" Text="First theoretical question. What is better (faster)? Develop your own gpgpu techniques for physics simulation (cloth, fluids, colisions...) or to use PhysX?  &#xD;&#xA;(If i say develop i mean implement existing algorithms like navier-strokes...)&#xD;&#xA;&#xD;&#xA;I don't care about what will take more time to develop. What will be faster for end user? As i understand that physx are accelerated through PPU units in gpu, does it mean that physical simulation can run in paralel with rastarization? Are PPUs different units than unified shader units used as vertex/geometry/pixel/gpgpu shader units?&#xD;&#xA;&#xD;&#xA;And little non-theoretical question: Is physx able to do sofisticated simulation equal to lets say Autodesk's Maya fluid solver?&#xD;&#xA;&#xD;&#xA;Are there any c++ gpu accelerated physics frameworks to try? (I am interested in both physx and gpgpu, commercial engines are ok too). &#xD;&#xA;&#xD;&#xA;Edit: Simulation does not have to be realtime i'm thinking just about acceleration." />
  <row Id="14218" PostHistoryTypeId="2" PostId="7112" RevisionGUID="19ff5195-1f27-496c-b3b4-620362f89862" CreationDate="2011-01-06T00:41:09.573" UserId="4443" Text="If I understand correctly what you are talking about, then its dealing with framerates and the short cuts taken to get physics, and collision in general, to run in a reasonable manner in video games.&#xD;&#xA;&#xD;&#xA;Basically you would do the movement, collision and reaction calculations over the time step of each frame. What if the time step of the frame with the current forces were enough to push you Into an object.. A wall or narrow passage say, that you normally would not be able to enter? Well the system has to 'eject' you from the object.. Depending on how this ejection was done it could result in a very large force applied over a very small time that may Not get you all the way out of the object.. The force could build up over 2-3 frames and pretty much just send you flying.&#xD;&#xA;&#xD;&#xA;I am not 100% sure this is the actual case as mentioned in Quake 3, but I know in learning to develop games this is the type of example they would use to explain why the strangest things happen some times when you do not take into consideration all the time within a time step.. most physics engines I have worked with will use some sort of a set time step to do its calculations (This includes the people that nVidia bought :)). If a frame rendered to fast, the physics do not get calculated that frame, if the next time step is over that set value then enough to make a complete step is taken, physics is calculated, and that bit of time is used as the new point to add each next frame's time to before the next step.&#xD;&#xA;&#xD;&#xA;Hope this helps give you some ideas of what to look for. " />
  <row Id="14219" PostHistoryTypeId="5" PostId="7029" RevisionGUID="7ccb3221-1fe2-4b9e-add4-ec9cc0f705d0" CreationDate="2011-01-06T01:24:38.673" UserId="14" Comment="deleted 34 characters in body" Text="I'm looking to understand and find the terminology for what causes - or allows - players to interfere with geometry in old games.  Famously, ID's Quake3 gave birth to a whole community of people breaking the physics by jumping, sliding, getting stuck and launching themselves off points in geometry.&#xD;&#xA;&#xD;&#xA;Some months ago (though I'd be darned if I can find it again!) I saw a conference held by Bungie's Vic DeLeon and a colleague in which Vic briefly discussed the issues he ran into while attempting to wrap 'collision' objects (please correct my terminology) around environment objects so that players could appear as though they were walking on organic surfaces, while not clipping through them or appear to be walking on air at certain points, due to complexities in the modeling.&#xD;&#xA;&#xD;&#xA;My aim is to compose a case study essay for University in which I can tackle this issue in games, drawing on early exploits and how techniques have changed to address such exploits and to aid in the gameplay itself.  I have 3 current day example of where exploits still exist, however specifically targeting ID Software clearly shows they've massively improved their techniques between Q3 and Q4.&#xD;&#xA;&#xD;&#xA;So in summary, with your help please, I'd like to gain a slightly better understanding of this issue as a whole (its terminology mainly) so I can use terms and ask the right questions within the right contexts.  In practical application, I know what it is, I know how to do it, but I don't have the benefit of level design knowledge yet and its technical widgety knick-knack terms =)" />
  <row Id="14220" PostHistoryTypeId="2" PostId="7113" RevisionGUID="08436044-b6be-4b60-8b3f-7bc4d12b551e" CreationDate="2011-01-06T04:40:40.583" UserId="1954" Text="Because I'm using sprite sheets instead of an individual texture per sprite, I need to pass in a `Rectangle` when calling `Texture2D.GetData()` in my collision detection for per-pixel tests. Unfortunately, without fail I get an `ArgumentException` percolated down from an internal method inside the `Texture` (not `Texture2D`) class.&#xD;&#xA;&#xD;&#xA;My code for getting the texture data looks like this:&#xD;&#xA;&#xD;&#xA;        public override Color[] GetPixelData()&#xD;&#xA;        {&#xD;&#xA;            Color[] data = new Color[(int)size.Product()];&#xD;&#xA;            Rectangle rect = new Rectangle(hframe * (int)size.X, vframe * (int)size.Y, (int)size.X, (int)size.Y);&#xD;&#xA;&#xD;&#xA;    #if DEBUG&#xD;&#xA;            if (sprite.Bounds.Contains(rect) &amp;&amp; sprite.Format == SurfaceFormat.Color)&#xD;&#xA;    #endif&#xD;&#xA;                sprite.GetData(0, rect, data, 0, 1);&#xD;&#xA;      &#xD;&#xA;            return data;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Even with the check to ensure I'm grabbing a valid rectangle and that the texture format matches what I'm trying to get, I still get that exception, claiming &quot;The size of the data passed in is too large or too small for this resource.&quot; Unfortunately, the debugger won't let me check the locals within the `Texture.ValidateTotalSize()` method where the exception originates.&#xD;&#xA;&#xD;&#xA;Has anyone else had this problem and knows how to fix it? I'm relying on AABB testing only for now, but that doesn't really work for some of my game's entities due to odd shapes, rotation and scaling." />
  <row Id="14221" PostHistoryTypeId="1" PostId="7113" RevisionGUID="08436044-b6be-4b60-8b3f-7bc4d12b551e" CreationDate="2011-01-06T04:40:40.583" UserId="1954" Text="Texture2D.GetData fails to return pixel colour data" />
  <row Id="14222" PostHistoryTypeId="3" PostId="7113" RevisionGUID="08436044-b6be-4b60-8b3f-7bc4d12b551e" CreationDate="2011-01-06T04:40:40.583" UserId="1954" Text="&lt;xna&gt;&lt;textures&gt;&lt;xna-4.0&gt;" />
  <row Id="14223" PostHistoryTypeId="2" PostId="7114" RevisionGUID="27eb756b-eeb8-403d-bfe3-79df808f4f36" CreationDate="2011-01-06T05:13:01.230" UserId="4453" Text="The code you've posted isn't necessarily enough to figure out what's going wrong. XNA's Texture2D.GetData&lt;T&gt;() method takes a Type, for instance, so you must be using some custom class. I have a guess though.&#xD;&#xA;&#xD;&#xA;From the looks of it, the type you're using for size uses floats (or doubles; same thing for purposes of this). It's eminently possible that the problem comes from that: casting a float to an int truncates the result. Assuming size.Product() multiplies the floats together and returns the result, you could easily be getting something like:&#xD;&#xA;&#xD;&#xA;size.X = 10.3&#xD;&#xA;size.Y = 20.4&#xD;&#xA;&#xD;&#xA;(int)size.X * (int)size.Y = 200&#xD;&#xA;(int)(size.X * size.Y) = 210&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;&#xD;&#xA;`Color[] data = new Color[(int)size.X * (int)size.Y];`&#xD;&#xA;&#xD;&#xA;and see what happens." />
  <row Id="14224" PostHistoryTypeId="2" PostId="7115" RevisionGUID="7ab602b3-94e0-48b9-9161-ae0808e650cd" CreationDate="2011-01-06T06:06:00.883" UserId="4456" Text="I've been using [easeljs][1] for my canvas interaction.&#xD;&#xA;&#xD;&#xA;It's pretty good and facilitates solid design.&#xD;&#xA;One of the key features that made me choose it was the facility to sync the position of your canvas objects and dom elements.&#xD;&#xA;&#xD;&#xA;This makes it easy to do CSS speach bubbles and static UI elements like the hud frame and that kind of thing.&#xD;&#xA;&#xD;&#xA;The advantage this has for browsers is that you get the rich canvas but you get to pawn off the smaller and static things to the dom to keep performance in check.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.easeljs.com" />
  <row Id="14225" PostHistoryTypeId="2" PostId="7116" RevisionGUID="3b3b5ef0-3e19-4dc3-a499-0d1caf6239f4" CreationDate="2011-01-06T06:13:42.277" UserId="288" Text="You can use Reflector to look inside `Texture.ValidateTotalSize()` to get an idea of what might be happening to throw the exception.&#xD;&#xA;&#xD;&#xA;But in this case I think it's simply that:&#xD;&#xA;&#xD;&#xA;    sprite.GetData(0, rect, data, 0, 1);&#xD;&#xA;&#xD;&#xA;should be:&#xD;&#xA;&#xD;&#xA;    sprite.GetData(0, rect, data, 0, data.Length());" />
  <row Id="14226" PostHistoryTypeId="2" PostId="7117" RevisionGUID="3440ec9e-d8b7-44c8-8d64-4ae50e1b5292" CreationDate="2011-01-06T06:49:31.440" UserId="4264" Text="I can think of a couple of potential reasons.&#xD;&#xA;&#xD;&#xA;First is that the geometry in these games is rarely &quot;airtight&quot;. While working on a 3d game project we talked with a PVS technology provider, who processed some of our levels through their system and showed that perfect PVS data is impossible due to the holes in the geometry. These holes are not visible; I'm talking about t-intersections and floating pointy inaccuracies etc.&#xD;&#xA;&#xD;&#xA;Sometimes physics just manages to blow up because the players hit the geometry &quot;just right&quot;; geometry that, while visually perfect, isn't mathematically so.&#xD;&#xA;&#xD;&#xA;The second reason that I can think of, to quote Tim Sweeney - making realistic game physics is *difficult*. Floating point calculations are surprisingly inaccurate. There's plenty of articles about this on the net (for instance, http://docs.sun.com/source/806-3568/ncg_goldberg.html is a pretty good one). Add to that the fact that we're talking about online games with all their interpolations, predictions and such, and you get a rather unstable system, which still somehow manages to work." />
  <row Id="14228" PostHistoryTypeId="2" PostId="7119" RevisionGUID="579ed412-cc94-49a5-8f16-e30de2327b56" CreationDate="2011-01-06T08:36:15.597" UserDisplayName="user4458" Text="One of the most important things in game networking is to only send information *when* it's needed.&#xD;&#xA;&#xD;&#xA;So the answer is neither of your suggestions. You run the simulation on both client and server (or just clients if peer2peer). If you press the up arrow, you send a packet that you now have initiated an upward motion, and until you stop moving in that direction there is no need to send any more packets, as both the clients and servers can run their physical simulation based on the information in that packet.&#xD;&#xA;&#xD;&#xA;It's called Client-side prediction." />
  <row Id="14229" PostHistoryTypeId="2" PostId="7120" RevisionGUID="36d12c98-e01c-4d77-8bbe-7663a1daac41" CreationDate="2011-01-06T08:43:24.610" UserId="659" Text="If you are replaying recorded inputs, consider the implications of any moving/destructible/interactive objects in the world, which may have moved or changed state when the actions are replayed&#xD;&#xA;&#xD;&#xA;Also, replaying inputs will not work precisely if your game uses a variable timestep. You may want to consider a fixed-timestep game update (with interpolation for variable framerate rendering)?" />
  <row Id="14230" PostHistoryTypeId="5" PostId="6361" RevisionGUID="e9974071-eb2c-445e-b3fc-1ede5c1e16f2" CreationDate="2011-01-06T08:47:25.250" UserId="51" Comment="Spelling/grammar" Text="Are you asking from the perspective of technicalities of implementing or the ramifications of the design?  Either way, the answer to your question is &quot;yes&quot;.  &#xD;&#xA;&#xD;&#xA;From the technical side of things, generally speaking you just find the hooks in your code that are responding to your achievement events and put in your stat tracking code there.  You might have to add some new things if you're tracking things that aren't exactly discrete events that are already happening in the game (for example: X amount of hours played).&#xD;&#xA;&#xD;&#xA;From the design side of things, well, achievements are extrinsic motivators and adding them doesn't really play too much into the core gameplay loop, except for people who want to seek them out.  So they're pretty safe regardless." />
  <row Id="14231" PostHistoryTypeId="2" PostId="7121" RevisionGUID="6a5942b4-1b19-4324-bf8d-28627ec47728" CreationDate="2011-01-06T08:52:34.473" UserId="659" Text="What kind of game is it?&#xD;&#xA;&#xD;&#xA;Is it possible to keep the 2 simulations entirely in sync?&#xD;&#xA;&#xD;&#xA;If you start the 2 instances of the simulation in exactly the same state, and update with a fixed timestep, then they should remain synchronized.&#xD;&#xA;&#xD;&#xA;But when you do anything to a physics object, you send a message to all clients telling them what to do and on which frame.&#xD;&#xA;&#xD;&#xA;So if you were making something like 'Worms' or 'Angry Birds', and the player launched a projectile on frame 1000, you'd send a message saying 'on frame 1000+N' we're going to spawn a physics object with these parameters.&#xD;&#xA;&#xD;&#xA;Of course, this will add input lag. And you need some way to ensure that no player will get too far ahead to respond to messages on the correct frame.  Maybe a 5-10Hz 'clock' message, telling all clients 'you may advance your simulation to frame N, but no further'.&#xD;&#xA;&#xD;&#xA;(I believe that this is how online RTS games work, where it would not be practical to send the positions and states of several hundred units every update, and where a fraction of a second's lag between giving an order and the unit executing it is acceptable)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14232" PostHistoryTypeId="2" PostId="7122" RevisionGUID="8aa4cff3-2b1e-421f-afe1-8e4979db3dd2" CreationDate="2011-01-06T09:02:01.327" UserId="659" Text="Something else to think about, is a clear separation of 'gameplay physics' which needs careful synchronization, and 'special effects physics' which doesn't.&#xD;&#xA;&#xD;&#xA;Physics used for effects only, such as explosion debris, does not usually need keeping in sync, and can run independently on each client. It doesn't matter if it looks a bit different on each." />
  <row Id="14233" PostHistoryTypeId="2" PostId="7123" RevisionGUID="2379a6b9-425c-4f1d-b81b-665aaecf2373" CreationDate="2011-01-06T09:22:19.157" UserId="2933" Text="I'm trying to figure out a way to determine the relative velocity of a body colliding with another in a 2D environment.&#xD;&#xA;&#xD;&#xA;For example if one body is moving at (1,0) and another traveling behind it collides with it from behind at (2,0) the velocity of the impact relative to the first body was (1,0).&#xD;&#xA;&#xD;&#xA;I need a method which takes in two velocities, one velocity belonging to the body the velocity is being measured against, and the other for the impacting body and return the relative velocity." />
  <row Id="14234" PostHistoryTypeId="1" PostId="7123" RevisionGUID="2379a6b9-425c-4f1d-b81b-665aaecf2373" CreationDate="2011-01-06T09:22:19.157" UserId="2933" Text="Determining relative velocities on impact?" />
  <row Id="14235" PostHistoryTypeId="3" PostId="7123" RevisionGUID="2379a6b9-425c-4f1d-b81b-665aaecf2373" CreationDate="2011-01-06T09:22:19.157" UserId="2933" Text="&lt;xna&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="14236" PostHistoryTypeId="2" PostId="7124" RevisionGUID="b9d2116d-473a-4f5a-bde3-824088ff0ace" CreationDate="2011-01-06T10:36:03.143" UserId="2698" Text="This is a simple operation of [vector difference](http://mathworld.wolfram.com/VectorDifference.html). In XNA you don't even need to create a specific method really.&#xD;&#xA;&#xD;&#xA;If you want the velocity of Body B from the perspective of Body A, you subtract Body A's velocity from Body B.&#xD;&#xA;&#xD;&#xA;So in C# with XNA, using your example:&#xD;&#xA;&#xD;&#xA;    Vector2 MovingBody = new Vector2(1, 0);&#xD;&#xA;    Vector2 Impact = new Vector2(2, 0);&#xD;&#xA;    Vector2 PerceivedImpact = Impact - MovingBody;&#xD;&#xA;    // PerceivedImpact equals (1, 0) in this scenario" />
  <row Id="14237" PostHistoryTypeId="6" PostId="7123" RevisionGUID="e988cd3e-4f3e-42e4-8e99-b812b5678af5" CreationDate="2011-01-06T10:39:16.727" UserId="2698" Comment="edited tags" Text="&lt;xna&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;vector&gt;" />
  <row Id="14238" PostHistoryTypeId="5" PostId="7124" RevisionGUID="27d72ac8-d0dd-4ee4-961b-a6ca37da519e" CreationDate="2011-01-06T10:49:29.277" UserId="2698" Comment="added 38 characters in body" Text="This is a simple operation of [vector difference](http://mathworld.wolfram.com/VectorDifference.html). In XNA you don't even need to create a specific method for it - vectors already support subtraction.&#xD;&#xA;&#xD;&#xA;If you want the velocity of Body B from the perspective of Body A, you subtract Body A's velocity from Body B.&#xD;&#xA;&#xD;&#xA;So in C# with XNA, using your example:&#xD;&#xA;&#xD;&#xA;    Vector2 MovingBody = new Vector2(1, 0);&#xD;&#xA;    Vector2 Impact = new Vector2(2, 0);&#xD;&#xA;    Vector2 PerceivedImpact = Impact - MovingBody;&#xD;&#xA;    // PerceivedImpact equals (1, 0) in this scenario" />
  <row Id="14239" PostHistoryTypeId="2" PostId="7125" RevisionGUID="bc72e0e9-b723-422c-8bb5-1740fe0c8b82" CreationDate="2011-01-06T18:15:16.693" UserId="1021" Text="I'm making a simple 2D game for iPhone.  Think of the game as a ball on the screen that goes up while the user is touching the screen and falls down when the user stops touching the screen. &#xD;&#xA;&#xD;&#xA;The ball starts moving up in touchesBegan:withEvent and starts moving down in touchesEnded:withEvent.  This works fine almost all the time. However on occasion the ball will keep moving up after the user stops touching... or the ball will keep moving down while the user is touching.  Why is this happening?&#xD;&#xA;&#xD;&#xA;Just fyi the ball is drawn on a UIWindow.  The taps are handled by a UIImageview subclass that's clearColor and takes up the entire screen.  This &quot;touchLayer&quot; is also moved to the front of the window in the game loop.&#xD;&#xA;&#xD;&#xA;Any idea why this control scheme occasionally fails?  Perhaps the touch events just aren't firing?  Or they're fired out of order?&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="14240" PostHistoryTypeId="1" PostId="7125" RevisionGUID="bc72e0e9-b723-422c-8bb5-1740fe0c8b82" CreationDate="2011-01-06T18:15:16.693" UserId="1021" Text="Trouble with touch events on iPhone" />
  <row Id="14241" PostHistoryTypeId="3" PostId="7125" RevisionGUID="bc72e0e9-b723-422c-8bb5-1740fe0c8b82" CreationDate="2011-01-06T18:15:16.693" UserId="1021" Text="&lt;iphone&gt;&lt;touch&gt;" />
  <row Id="14242" PostHistoryTypeId="2" PostId="7126" RevisionGUID="e3b7cab7-43f4-4fdb-a2b6-cbcc7710e178" CreationDate="2011-01-06T19:11:39.093" UserId="891" Text="For **Python** specifically you can try and use **[Coroutines][1]** to do calculations over multiple update calls.&#xD;&#xA;&#xD;&#xA;&gt; ... coroutines are program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[**PEP-0342**][2] details coroutine implementation in Python.&#xD;&#xA;&#xD;&#xA;You can create your own scheduler and tasks which can simulate multithreading on a single thread.  This is the same way that Javascript frameworks allow for multithreaded like processing even though Javascript is run on a single process.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Coroutine&#xD;&#xA;  [2]: http://www.python.org/dev/peps/pep-0342/" />
  <row Id="14243" PostHistoryTypeId="2" PostId="7127" RevisionGUID="58ba4112-68dc-4d79-9cd6-eea87b50c69d" CreationDate="2011-01-06T20:48:48.840" UserId="4469" Text="I know this is a really difficult subject. I have been reading a lot this days about Entity systems, etc... And now I'm ready to ask some questions (if you don't mind answering them) because I'm really messed.&#xD;&#xA;&#xD;&#xA;First of all, I have a 2D basic editor written in Qt, and I'm in the process of adding entitiy edition. I want the editor to be able to receive RTTI information from entities to change properties, create some logic being able to link published events to published actions (Ex:A level activate event throws a door open action), etc... Because all of this I guess my entity system should be written in scripting, in my case Lua. &#xD;&#xA;&#xD;&#xA;In the other hand I want to use a component based design for my entities, and here starts my questions:&#xD;&#xA;&#xD;&#xA;1) Should I define my componentes en C++? If I do this en C++ won't I loose all the RTTI information I want for my editor?. In the other hand, I use box2d for physics, if I define all my components in script won't it be a lot of work to expose third party libs to lua?&#xD;&#xA;&#xD;&#xA;2) Where should I place the messa system for my game engine? Lua? C++?.&#xD;&#xA;&#xD;&#xA;I'm tempted to just have C++ object to behave as servers, offering services to lua business logic. Things like physics system, rendering system, input system, World class, etc... And for all the other things, lua. Creation/Composition of entities based on components, game logic, etc...&#xD;&#xA;&#xD;&#xA;Could anyone give any insight on how to accomplish this? And what aproach is better?.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;HexDump." />
  <row Id="14244" PostHistoryTypeId="1" PostId="7127" RevisionGUID="58ba4112-68dc-4d79-9cd6-eea87b50c69d" CreationDate="2011-01-06T20:48:48.840" UserId="4469" Text="Entity system in Lua, communication with C++ and level editor. Need advice." />
  <row Id="14245" PostHistoryTypeId="3" PostId="7127" RevisionGUID="58ba4112-68dc-4d79-9cd6-eea87b50c69d" CreationDate="2011-01-06T20:48:48.840" UserId="4469" Text="&lt;architecture&gt;" />
  <row Id="14246" PostHistoryTypeId="2" PostId="7128" RevisionGUID="89e46864-5a99-4ed9-9ff5-b83bf7b735b6" CreationDate="2011-01-06T21:02:14.973" UserId="4443" Text="1) Yes. While you want to expose the functionality via Lua for scripting you will in general want all the objects defined in C++. This will likely require either using the built in (and usually crappy) RTTI or writing your own system (If you look into it, for the basics, its really not that hard to do so dont let this deter you).&#xD;&#xA;&#xD;&#xA;By keeping all of the objects within C++ then your game knows how to deal with them, and you can use the scripting to define them or give them small little action sets via the script and the like. And as you said, this keeps them available for other third party libs if need be.&#xD;&#xA;&#xD;&#xA;2) C++ again. This will just be another thing that you want to expose through Lua so that other things can trigger or script logic to react to the messages and the like. This will also let the objects defined in C++ use the system as well with out having to go through Lua to do it.&#xD;&#xA;&#xD;&#xA;In general I would say Always design your engine in the language its going to be running in. Hardware these days is very powerful compared to even a few years ago, but that doesnt mean you will not reach the ends of that power with your projects. A Scripting language will never run as fast as a compiled language. &#xD;&#xA;&#xD;&#xA;Secondly this allows you to develop the entities/objects as completely as you want with out having to expose everything to the scripting interface. This is potentially another handy layer of abstraction that you can utilize to rework and upgrade or the like, parts of the system as you work on it with out necessarily having to redo every part at the same time.&#xD;&#xA;&#xD;&#xA;Plus, Kudos on the Component system... Most people go straight tree hierarchy from the get go and then get overwhelmed with its upkeep and lack of extensibility." />
  <row Id="14247" PostHistoryTypeId="5" PostId="7127" RevisionGUID="d7953e7e-1de5-4f92-9d1f-62373be6853c" CreationDate="2011-01-06T21:16:41.460" UserId="51" Comment="language; deleted 1 characters in body" Text="I have a 2D basic editor written in Qt, and I'm in the process of adding entities. I want the editor to be able to receive RTTI information from entities to change properties, create some logic being able to link published events to published actions (for example, A level activate event throws a door open action), etc... Because of this I guess my entity system should be written in a scripting language, in my case Lua. &#xD;&#xA;&#xD;&#xA;On the other hand I want to use a component based design for my entities, and here starts my questions:&#xD;&#xA;&#xD;&#xA;1) Should I define my componentes in C++? If I do this in C++ won't I lose all the RTTI information I want for my editor? On the other hand, I use box2d for physics, if I define all my components in script won't it be a lot of work to expose third party libs to lua?&#xD;&#xA;&#xD;&#xA;2) Where should I place the messaging system for my game engine? Lua? C++?&#xD;&#xA;&#xD;&#xA;I'm tempted to just have C++ object to behave as servers, offering services to lua business logic. Things like physics system, rendering system, input system, World class, etc... And for all the other things, lua. Creation/Composition of entities based on components, game logic, etc...&#xD;&#xA;&#xD;&#xA;Could anyone give any insight on how to accomplish this? And which approach is better?&#xD;&#xA;" />
  <row Id="14248" PostHistoryTypeId="2" PostId="7129" RevisionGUID="e412e1ae-6a46-42b1-b6ac-14126ef67adc" CreationDate="2011-01-06T21:47:05.823" UserId="4440" Text="Occasionally touch events get dropped, so you may also need to implement the same logic in touchesCancelled:withEvent.&#xD;&#xA;&#xD;&#xA;See http://discussions.apple.com/thread.jspa?messageID=8397178&#xD;&#xA;" />
  <row Id="14249" PostHistoryTypeId="5" PostId="7099" RevisionGUID="637c025c-3f20-45b7-911c-7facabd36c83" CreationDate="2011-01-06T23:52:17.920" UserId="2698" Comment="added 104 characters in body" Text="##EDIT:##&#xD;&#xA;Please see @Bluescrn's answer to this question; he elaborates on weaknesses in replaying controls rather than movement vectors or position.&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;You're on the right track. Here's the approach I'd use:&#xD;&#xA;&#xD;&#xA;##Controllers##&#xD;&#xA;&#xD;&#xA;Create a Controller class which receives keyboard input and passes it on to your character. However, also have a Controller record exactly when the significant keys (e.g. arrows, jump, etc) were pressed and when they were released. It would store up this sort of information:&#xD;&#xA;&#xD;&#xA;    actions[0].milliseconds = 400     actions[0].action = right pressed&#xD;&#xA;    actions[1].milliseconds = 1000    actions[1].action = jump pressed&#xD;&#xA;    actions[2].milliseconds = 1300    actions[2].action = jump released&#xD;&#xA;    actions[3].milliseconds = 2500    actions[3].action = jump pressed&#xD;&#xA;    actions[4].milliseconds = 3000    actions[4].action = jump released&#xD;&#xA;    actions[5].milliseconds = 5330    actions[5].action = right released&#xD;&#xA;&#xD;&#xA;A Controller has two modes:&#xD;&#xA;&#xD;&#xA;1. Record: Receives keyboard input. Records input in the list. Hands the character input based on keyboard state.&#xD;&#xA;2. Replay: Ignores keyboard input. Advances through the list according to milliseconds elapsed since the level began. Hands the character input based on the recorded keyboard state at the current moment.&#xD;&#xA;&#xD;&#xA;##Characters##&#xD;&#xA;&#xD;&#xA;When your Character object is constructed, it creates a fresh Controller for itself. The Character can be in one of two modes at any time:&#xD;&#xA;&#xD;&#xA;1. Active: There is only ever one active Character and it is the one you control. When the Character is in Active mode, its Controller is in Record mode. **By default** when a Character is constructed it is in Active mode.&#xD;&#xA;2. Ghost: This is the one that replays your past actions. When a Character enters Ghost mode, it changes its appearance and sets its Controller to Replay mode.&#xD;&#xA;&#xD;&#xA;##Levels##&#xD;&#xA;&#xD;&#xA;###A freshly started level###&#xD;&#xA;&#xD;&#xA;When you start the level, create a single Character. Now the level begins and the player does his thing.&#xD;&#xA;&#xD;&#xA;###When time resets###&#xD;&#xA;&#xD;&#xA;When the level resets, do three things:&#xD;&#xA;&#xD;&#xA;1. Tell the current Active Character to enter Ghost mode.&#xD;&#xA;2. Create a new Character.&#xD;&#xA;3. Call all Characters to Reset themselves. This will place them back at the starting position with no movement, etc. They will in turn tell their Controllers to reset to millisecond 0 with no keys pressed.&#xD;&#xA;&#xD;&#xA;Then the level begins and the player does his thing." />
  <row Id="14253" PostHistoryTypeId="2" PostId="7131" RevisionGUID="a3b3539d-1884-4e2b-9a69-fd5552fa6918" CreationDate="2011-01-07T02:58:06.610" UserId="4212" Text="I am working on some movement AI where there are no obstacles and movement is restricted to the XY plane.&#xD;&#xA;&#xD;&#xA;I am calculating 2 vectors:&lt;br&gt;&#xD;&#xA;v - the direction of ship 1&lt;br&gt;&#xD;&#xA;w - the vector pointing from the position of ship 1 to ship 2&#xD;&#xA;&#xD;&#xA;I am then calculating the angle between these two vectors using the standard formula:&#xD;&#xA;arccos( v . w / ( |v| |w| ) )&#xD;&#xA;&#xD;&#xA;The problem I'm having is the nature of arccos only returning values between 0 and 180.  This makes it impossible to determine whether I should turn left or right to face the other ship.&#xD;&#xA;&#xD;&#xA;Is there a better way to do this?" />
  <row Id="14254" PostHistoryTypeId="1" PostId="7131" RevisionGUID="a3b3539d-1884-4e2b-9a69-fd5552fa6918" CreationDate="2011-01-07T02:58:06.610" UserId="4212" Text="Calculating angle between 2 vectors " />
  <row Id="14255" PostHistoryTypeId="3" PostId="7131" RevisionGUID="a3b3539d-1884-4e2b-9a69-fd5552fa6918" CreationDate="2011-01-07T02:58:06.610" UserId="4212" Text="&lt;2d&gt;&lt;ai&gt;&lt;vector&gt;" />
  <row Id="14256" PostHistoryTypeId="5" PostId="7131" RevisionGUID="aaaaaa46-5cd6-4710-b73e-8116aa217838" CreationDate="2011-01-07T03:03:49.683" UserId="4212" Comment="added 4 characters in body" Text="I am working on some movement AI where there are no obstacles and movement is restricted to the XY plane.&#xD;&#xA;&#xD;&#xA;I am calculating 2 vectors:&lt;br&gt;&#xD;&#xA;v - the direction of ship 1&lt;br&gt;&#xD;&#xA;w - the vector pointing from the position of ship 1 to ship 2&#xD;&#xA;&#xD;&#xA;I am then calculating the angle between these two vectors using the standard formula:&lt;br&gt;&#xD;&#xA;arccos( v . w / ( |v| |w| ) )&#xD;&#xA;&#xD;&#xA;The problem I'm having is the nature of arccos only returning values between 0 and 180.  This makes it impossible to determine whether I should turn left or right to face the other ship.&#xD;&#xA;&#xD;&#xA;Is there a better way to do this?" />
  <row Id="14257" PostHistoryTypeId="2" PostId="7132" RevisionGUID="1ee5d5de-f1ca-4478-b12c-b6c0e0688f2d" CreationDate="2011-01-07T03:37:29.807" UserId="51" Text="Use arcsin of the 2D cross product (i.e magnitude of the cross product vector).  That'll give you -90 to 90 which will let you know whether to go left or right.&#xD;&#xA;&#xD;&#xA;Be careful because A cross B is not the same as B cross A." />
  <row Id="14258" PostHistoryTypeId="2" PostId="7133" RevisionGUID="1423aabb-c487-4c5c-b5f6-0b6f842583b2" CreationDate="2011-01-07T05:27:36.230" UserId="4477" Text="There's a lot of press about the ad controls included on the new 7 phone, but I'm looking for candidates for the PC platform." />
  <row Id="14259" PostHistoryTypeId="1" PostId="7133" RevisionGUID="1423aabb-c487-4c5c-b5f6-0b6f842583b2" CreationDate="2011-01-07T05:27:36.230" UserId="4477" Text="Any ad network for XNA games on the PC platform?" />
  <row Id="14260" PostHistoryTypeId="3" PostId="7133" RevisionGUID="1423aabb-c487-4c5c-b5f6-0b6f842583b2" CreationDate="2011-01-07T05:27:36.230" UserId="4477" Text="&lt;xna&gt;" />
  <row Id="14261" PostHistoryTypeId="2" PostId="7134" RevisionGUID="baede976-70c8-4293-b00a-ff4442cd2b41" CreationDate="2011-01-07T06:05:57.450" UserDisplayName="f00b4r" Text="I started working on an item system for my (first) game, and I'm having a problem conceptualizing how it should work. Since Items can produce a bunch of potentially non-standard actions (revive a character vs increasing some stat) or have use restrictions (can only revive if a character is dead). For obvious reasons, I don't want to create a new Item class for every item type. What is the best way to handle this?&#xD;&#xA;&#xD;&#xA;Should I make a handful of item types (field modifiers, status modifiers, &lt;special cases&gt;)?&#xD;&#xA;&#xD;&#xA;Is it normal to script item usage? Could (should?) this be combined with the above mentioned solution (have a couple of different sub item types, make special case items usage scripted)?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="14262" PostHistoryTypeId="1" PostId="7134" RevisionGUID="baede976-70c8-4293-b00a-ff4442cd2b41" CreationDate="2011-01-07T06:05:57.450" UserDisplayName="f00b4r" Text="RPG Item processing" />
  <row Id="14263" PostHistoryTypeId="3" PostId="7134" RevisionGUID="baede976-70c8-4293-b00a-ff4442cd2b41" CreationDate="2011-01-07T06:05:57.450" UserDisplayName="f00b4r" Text="&lt;architecture&gt;&lt;learning&gt;&lt;rpg&gt;" />
  <row Id="14264" PostHistoryTypeId="2" PostId="7135" RevisionGUID="b38b8ad8-5422-4d5d-82c0-0163e3fd6ab1" CreationDate="2011-01-07T06:29:13.173" UserId="2262" Text="I have a game that I am writing in Java. It is a top down RPG and I am trying to handle movement in the world. The world is largely procedural and I am having a difficult time tackling how to handle character movement around the world and render the changes to the screen. I have the world loaded in blocks which contains all the tiles.&#xD;&#xA;&#xD;&#xA;How do I tackle the character movement? &#xD;&#xA;&#xD;&#xA;I am stumped and can't figure out where I should go with it." />
  <row Id="14265" PostHistoryTypeId="1" PostId="7135" RevisionGUID="b38b8ad8-5422-4d5d-82c0-0163e3fd6ab1" CreationDate="2011-01-07T06:29:13.173" UserId="2262" Text="How do I tackle top down RPG movement?" />
  <row Id="14266" PostHistoryTypeId="3" PostId="7135" RevisionGUID="b38b8ad8-5422-4d5d-82c0-0163e3fd6ab1" CreationDate="2011-01-07T06:29:13.173" UserId="2262" Text="&lt;java&gt;&lt;rpg&gt;&lt;movement&gt;" />
  <row Id="14267" PostHistoryTypeId="2" PostId="7136" RevisionGUID="97af1026-6cb4-4957-8ad5-317e22f394de" CreationDate="2011-01-07T06:35:19.467" UserDisplayName="Gregory Ray" Text="Your question is a bit abstract but perhaps you're looking for a path finding algorithm, I suggest A* (http://en.wikipedia.org/wiki/A*_search_algorithm). This will help you move your character tile to tile if the tile is not blocked terrain." />
  <row Id="14268" PostHistoryTypeId="5" PostId="7135" RevisionGUID="12b05b56-1aaa-4acb-a2a9-ba8c8f029098" CreationDate="2011-01-07T06:40:11.180" UserId="2262" Comment="added 273 characters in body; deleted 1 characters in body" Text="I have a game that I am writing in Java. It is a top down RPG and I am trying to handle movement in the world. The world is largely procedural and I am having a difficult time tackling how to handle character movement around the world and render the changes to the screen. I have the world loaded in blocks which contains all the tiles.&#xD;&#xA;&#xD;&#xA;How do I tackle the character movement? &#xD;&#xA;&#xD;&#xA;I am stumped and can't figure out where I should go with it.&#xD;&#xA;&#xD;&#xA;**EDIT**:&#xD;&#xA;Well I was abstract with the issue at hand. &#xD;&#xA;&#xD;&#xA;Right now I can only think of rigidly sticking everything into a 2D array and saving the block ID and the player offset in the Block or I could just &quot;float&quot; everything and move about between tiles so to speak." />
  <row Id="14269" PostHistoryTypeId="2" PostId="7137" RevisionGUID="9761f958-3609-4ac8-9cf9-0bb609700eaa" CreationDate="2011-01-07T07:01:46.963" UserId="2698" Text="Give the player world coordinates.&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.SetWidth(100);&#xD;&#xA;    Block.SetHeight(100);&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public ???? GetPlayerBlock() {&#xD;&#xA;        int blockX = Player.Position.X / Block.Width&#xD;&#xA;        int blockY = Player.Position.Y / Block.Height&#xD;&#xA;        &#xD;&#xA;        // Your choice of return value:&#xD;&#xA;        // Return the block object itself&#xD;&#xA;        return blocks[blockX, blockY];      // Return the block object itself&#xD;&#xA;        // Or return the position of the block in the array&#xD;&#xA;        return new int[] {blockX, blockY};&#xD;&#xA;        // Either one may be useful depending on what you want to do.&#xD;&#xA;    }&#xD;&#xA;    // Keep in mind that after placing a block in the blocks array, you could tell&#xD;&#xA;    // it its position in the array and its position in the world, so that you can&#xD;&#xA;    // just return the block object itself from this method and have it contain any&#xD;&#xA;    // other information you might like to know.&#xD;&#xA;    " />
  <row Id="14270" PostHistoryTypeId="5" PostId="7137" RevisionGUID="8a04a1de-56ef-44ac-a4d7-4b9f64803cf8" CreationDate="2011-01-07T07:09:18.690" UserId="2698" Comment="deleted 83 characters in body; added 223 characters in body" Text="Give the player world coordinates.&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.SetWidth(100);&#xD;&#xA;    Block.SetHeight(100);&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = Player.Position.X / Block.Width;&#xD;&#xA;        blockPosition.Y = Player.Position.Y / Block.Height;&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="14271" PostHistoryTypeId="5" PostId="7137" RevisionGUID="66709398-4022-4ebc-a728-a8f137b75d05" CreationDate="2011-01-07T07:14:29.073" UserId="2698" Comment="added 148 characters in body; added 84 characters in body; added 38 characters in body" Text="**Give the player world coordinates.** (Or as you put it, float everything.)&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**The rest of this answer** will be an explanation of how to calculate the world block a player is in based on his world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.SetWidth(100);&#xD;&#xA;    Block.SetHeight(100);&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = Player.Position.X / Block.Width;&#xD;&#xA;        blockPosition.Y = Player.Position.Y / Block.Height;&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;2 functions &gt; all the mess of within-block tracking and inter-block transferring&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="14272" PostHistoryTypeId="2" PostId="7138" RevisionGUID="cdbf34d2-6102-4628-92d9-e41379b89e66" CreationDate="2011-01-07T07:18:13.190" UserId="51" Text="You can use a very similar strategy as described here: http://gamedev.stackexchange.com/questions/5626/how-to-design-the-attack-class-in-an-rpg-game&#xD;&#xA;&#xD;&#xA;Just imagine that you're dealing with Items instead of Attacks." />
  <row Id="14273" PostHistoryTypeId="5" PostId="7134" RevisionGUID="2163297e-f22a-447b-aa0a-866e677812a9" CreationDate="2011-01-07T07:24:23.060" UserId="51" Comment="deleted 11 characters in body; edited tags" Text="I started working on an item system for my (first) game, and I'm having a problem conceptualizing how it should work. Since Items can produce a bunch of potentially non-standard actions (revive a character vs increasing some stat) or have use restrictions (can only revive if a character is dead). For obvious reasons, I don't want to create a new Item class for every item type. What is the best way to handle this?&#xD;&#xA;&#xD;&#xA;Should I make a handful of item types (field modifiers, status modifiers, &lt;special cases&gt;)?&#xD;&#xA;&#xD;&#xA;Is it normal to script item usage? Could (should?) this be combined with the above mentioned solution (have a couple of different sub item types, make special case items usage scripted)?" />
  <row Id="14274" PostHistoryTypeId="6" PostId="7134" RevisionGUID="2163297e-f22a-447b-aa0a-866e677812a9" CreationDate="2011-01-07T07:24:23.060" UserId="51" Comment="deleted 11 characters in body; edited tags" Text="&lt;architecture&gt;&lt;rpg&gt;" />
  <row Id="14275" PostHistoryTypeId="5" PostId="7137" RevisionGUID="d0acf85c-9aec-4098-b37a-77576231a550" CreationDate="2011-01-07T07:43:31.140" UserId="2698" Comment="Fixed up with Java property syntax. Can you tell I'm used to C# yet?" Text="**Give the player world coordinates.** (Or as you put it, float everything.)&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**The rest of this answer** will be an explanation of how to calculate the world block a player is in based on his world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.GetWidth() == 100;&#xD;&#xA;    Block.GetHeight() == 100;&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = Player.Position.X / Block.GetWidth();&#xD;&#xA;        blockPosition.Y = Player.Position.Y / Block.GetHeight();&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;2 functions &gt; all the mess of within-block tracking and inter-block transferring&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="14276" PostHistoryTypeId="5" PostId="7132" RevisionGUID="4cca8f27-26ca-42a2-87c4-d54e369fc2f1" CreationDate="2011-01-07T07:48:12.447" UserId="51" Comment="added 234 characters in body" Text="Use arcsin of the 2D cross product (i.e magnitude of the cross product vector).  That'll give you -90 to 90 which will let you know whether to go left or right.&#xD;&#xA;&#xD;&#xA;Be careful because A cross B is not the same as B cross A.&#xD;&#xA;&#xD;&#xA;Another strategy (but probably not as straight forward) is to calculate the &quot;heading&quot; of the two vectors using atan2 and then figuring out whether A pointing at X degrees needs to go left or right to go to B pointing at y degrees." />
  <row Id="14277" PostHistoryTypeId="5" PostId="7137" RevisionGUID="0d54d075-3658-45d1-9682-f5ce07171acc" CreationDate="2011-01-07T08:02:55.523" UserId="2698" Comment="added 845 characters in body; deleted 70 characters in body" Text="###Use World Coordinates###&#xD;&#xA;&#xD;&#xA;(Or as you put it, float everything.)&#xD;&#xA;&#xD;&#xA;World coordinates are what you generally work with, and there's plenty of reasons for that. To name just a few:&#xD;&#xA;&#xD;&#xA;1. They're the most simple and intuitive way of representing your position in the world (heck, even you have a world coordinate - according to GPS at least).&#xD;&#xA;2. They're generic and versatile - anything you need to know about specific locations in the world can be derived from or translated to world coordinates, and should probably just be stored as exactly that to begin with&#xD;&#xA;3. They're the only useful way for comparing two objects' positions in the same world space. Entering block (local) space means when you want to compare positions with blocks in other spaces, you'll just have to translate those coordinates back to world space anyway.&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, one advantage is you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**The rest of this answer** will be an explanation of how to calculate the world block a player is in based on his world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.GetWidth() == 100;&#xD;&#xA;    Block.GetHeight() == 100;&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = Player.Position.X / Block.GetWidth();&#xD;&#xA;        blockPosition.Y = Player.Position.Y / Block.GetHeight();&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;2 functions &gt; all the mess of within-block tracking and inter-block transferring&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="14278" PostHistoryTypeId="5" PostId="7137" RevisionGUID="8d370bcb-6804-400b-9490-d3abc2c10dcf" CreationDate="2011-01-07T08:08:16.877" UserId="2698" Comment="Cut the unnecessary elaboration" Text="###Use World Coordinates###&#xD;&#xA;&#xD;&#xA;(Or as you put it, float everything.)&#xD;&#xA;&#xD;&#xA;World coordinates are what you generally work with, and there's plenty of reasons for that. They're the most simple and intuitive way of representing your position in the world, and the only way of really comparing the positions of any two entities in the same world.&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, one advantage is you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**The rest of this answer** will be an explanation of how to calculate the world block a player is in based on his world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.GetWidth() == 100;&#xD;&#xA;    Block.GetHeight() == 100;&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = Player.Position.X / Block.GetWidth();&#xD;&#xA;        blockPosition.Y = Player.Position.Y / Block.GetHeight();&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;2 functions &gt; all the mess of within-block tracking and inter-block transferring&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="14279" PostHistoryTypeId="2" PostId="7139" RevisionGUID="78420f95-6ad9-4b62-b022-eb917c5d83d8" CreationDate="2011-01-07T08:10:29.493" UserId="4481" Text="I'm developing a gameboard for a 4 players cardgame well know in my region ( near a Bridge with 8 cards).&#xD;&#xA;&#xD;&#xA;I create a cardcontrol class, all the deck methods and all the logics for value card and score count.&#xD;&#xA;&#xD;&#xA;But I need some link or suggestion for the implementation of  &quot;computer player&quot; based on a few rules to follow.&#xD;&#xA;&#xD;&#xA;thank you all for any help.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14280" PostHistoryTypeId="1" PostId="7139" RevisionGUID="78420f95-6ad9-4b62-b022-eb917c5d83d8" CreationDate="2011-01-07T08:10:29.493" UserId="4481" Text="Card Game Suggestion" />
  <row Id="14281" PostHistoryTypeId="3" PostId="7139" RevisionGUID="78420f95-6ad9-4b62-b022-eb917c5d83d8" CreationDate="2011-01-07T08:10:29.493" UserId="4481" Text="&lt;card-game&gt;" />
  <row Id="14282" PostHistoryTypeId="5" PostId="2069" RevisionGUID="fb52b55d-6dfb-4528-b285-e1d4761c03ac" CreationDate="2011-01-07T08:16:04.777" UserId="2698" Comment="Corrected spelling. Gimble Lock -&gt; Gimbal Lock" Text="There are *many* other forms of math that are useful, but at the absolute _minimum_ you need to know these:&#xD;&#xA;&#xD;&#xA;* **Algebra and Arithmetic**&#xD;&#xA;&#xD;&#xA;These are pretty basic, but if you don't know these you won't have a chance at even being a programmer let alone a game developer.&#xD;&#xA;&#xD;&#xA;* **[Vector Math][1]**&#xD;&#xA;&#xD;&#xA;Objects in a game world are represented with vectors. A vector represents things like an object's position, look direction and speed. Vector math calculations such as the [Dot Product][2], [Cross Product][3], Vector normalisation are essential.&#xD;&#xA;&#xD;&#xA;How do I move my game object? The novice might say:&#xD;&#xA;&#xD;&#xA;&quot;I know! I'll just do:&quot; `object.position.x++`.&#xD;&#xA;&#xD;&#xA;No no no. You need to use a vector calculation. The object needs a position, direction and acceleration vector which you can use to move the object. If you do the novice thing, you'll get stuck in an unmaintainable mess, and how do you make it move in a direction not aligned with the world's XYZ axis?&#xD;&#xA;&#xD;&#xA;* **[Quaternions][4]**&#xD;&#xA;&#xD;&#xA;Main reason games use quaternions is to eliminate [Gimbal lock][5]. Gimbal lock is that effect where when you move your mouse to look down, it will stop when you look directly down. Think about it, in games where you are in a space ship this would be pretty stupid if your camera stopped when you looked at the 'floor'.&#xD;&#xA;&#xD;&#xA;* **[Physics][6]**&#xD;&#xA;&#xD;&#xA;If you are going to be programming the math for physics responses in a game, then taking a physics class wouldn't have been a bad idea. &#xD;&#xA;&#xD;&#xA;Reasons will you need to know physics equations:&#xD;&#xA;&#xD;&#xA; 1. Making a ball bounce (see: co-efficient of restitution)&#xD;&#xA; 2. Make a ball move in a direction with 'x' newtons of force&#xD;&#xA; 3. Make something have more or less friction so it will slide at a different speed&#xD;&#xA; 4. Collision responses: What direction will the object rotate when I hit it 'here'?&#xD;&#xA;&#xD;&#xA;If you use a physics engine (or a game engine which has the physics engine inbuilt) then you can get away with knowing very little about physics. Still, it's quite good to know when you need to get your hands dirty because the physics engine isn't performing properly. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://physics.about.com/od/mathematics/a/VectorMath.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Dot_product&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Cross_product&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Quaternion&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Gimbal_lock&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Game_physics" />
  <row Id="14283" PostHistoryTypeId="5" PostId="7139" RevisionGUID="577d15d8-07f7-4799-b50a-a689dea68293" CreationDate="2011-01-07T08:18:03.980" UserId="4481" Comment="edited body" Text="I'm developing a gameboard for a 4 players cardgame well know in my region ( like a Bridge with 8 cards).&#xD;&#xA;&#xD;&#xA;I create a cardcontrol class, all the deck methods and all the logics for value card and score count.&#xD;&#xA;&#xD;&#xA;But I need some link or suggestion for the implementation of  &quot;computer player&quot; based on a few rules to follow.&#xD;&#xA;&#xD;&#xA;thank you all for any help.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14284" PostHistoryTypeId="2" PostId="7140" RevisionGUID="bcf2db69-c8b2-4520-8dfa-8447d8ee356f" CreationDate="2011-01-07T08:46:03.520" UserId="4469" Text="Sorry for the late response James, I did go to sleep. I have prefered to create a new response becaue I'm going to write a somehow long text.&#xD;&#xA;&#xD;&#xA;I think you were not wrong and you did get the idea exactly as I wanted. Let me explain my ideas right now and key points after some sleep to clarify everything:&#xD;&#xA;&#xD;&#xA;1) Components: At first I wanted to write them in lua. Now I have clear I'm going to write them in C++ and expose everything needed. Ussually only interfaces are exposed to lua, so I have come across that to export properties to be published in the editor we could get all &quot;getXXXXX&quot; methods (that have been exported to lua) and show them in the editor as XXXXX. Other things like data type, etc... should be thought.&#xD;&#xA;&#xD;&#xA;2) Entities: They will be defined in lua through composition of C++ components (entity templates). They could be hardcoded too in the C++ side and have a factory for components and another for entities and let the lua side instantiate them.&#xD;&#xA;&#xD;&#xA;All this, is what I can think of now. I know my editor can still be using game objects even if it is external, but the game am I into is for iphone using cocos2d and the editor is writtien in QT, so, I can't have the game running in a qt canvas and make qt&lt;-&gt;game talk.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;HexDump." />
  <row Id="14286" PostHistoryTypeId="2" PostId="7142" RevisionGUID="13c8eddd-d2e1-4201-890b-ec2e9af6a712" CreationDate="2011-01-07T09:24:03.150" UserId="4011" Text="Try building a class which handles game turns, who knows all the players and their order, in a array for example.&#xD;&#xA;&#xD;&#xA;Each time a player (human or CPU) finish playing, check if the condition to end the game (win or lose) are met.&#xD;&#xA;&#xD;&#xA;If not, find who will be the next player. In case the next player is CPU, make it choosing the correct card combination according to its level (easy-medium-hard), and then finish the game loop again by triggering the same method I've just discussed." />
  <row Id="14287" PostHistoryTypeId="2" PostId="7143" RevisionGUID="3b3b4d4c-2024-4a0e-a093-46a6b62ca2dd" CreationDate="2011-01-07T12:17:27.160" UserId="2721" Text="I am creating simple game for iPhone like &quot;Bubble Explode&quot;. Generally, what elements of game make it addictive and exciting for similar simple games." />
  <row Id="14288" PostHistoryTypeId="1" PostId="7143" RevisionGUID="3b3b4d4c-2024-4a0e-a093-46a6b62ca2dd" CreationDate="2011-01-07T12:17:27.160" UserId="2721" Text="What elements make simple game aaddictive" />
  <row Id="14289" PostHistoryTypeId="3" PostId="7143" RevisionGUID="3b3b4d4c-2024-4a0e-a093-46a6b62ca2dd" CreationDate="2011-01-07T12:17:27.160" UserId="2721" Text="&lt;game-design&gt;&lt;design-patterns&gt;" />
  <row Id="14290" PostHistoryTypeId="2" PostId="7144" RevisionGUID="8ce9af0c-dedf-4665-a7b4-9bc584889b55" CreationDate="2011-01-07T12:58:12.537" UserId="3794" Text="Very addictive is so called flow feeling. It means that the game is challenging but also not that hard and great is when combined when you can receive some rewards. First reward is supper easy, next harder and so on. &#xD;&#xA;&#xD;&#xA;Stackexchange is great example of this. You came here, ask question and receive some repution and badges. And then you want more. And its harder to get them. You start answering questions to receive more reputation and badges. And next badges and site privileques needs some of your work, but you know that you can get them. It's pretty addictive :)&#xD;&#xA;&#xD;&#xA;Or maybe better example is brainwashing FarmVille on facebook.&#xD;&#xA;&#xD;&#xA;[flow on wikipedia][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Flow_(psychology)" />
  <row Id="14291" PostHistoryTypeId="5" PostId="7144" RevisionGUID="7ac11906-da76-43ec-847b-1f0a31dfd136" CreationDate="2011-01-07T13:05:26.643" UserId="3794" Comment="typo" Text="Very addictive is so called flow feeling. It means that the game is challenging but also not that hard and great is when combined with possibility of recieving some rewards. First reward is super easy, next harder and so on. &#xD;&#xA;&#xD;&#xA;Stackexchange is great example of this. You came here, ask question and receive some reputation and badges. And then you want more. And its harder to get them. You start answering questions to receive more reputation and badges. And next badges and site privileques needs some of your work, but you know that you can get them. It's pretty addictive :)&#xD;&#xA;&#xD;&#xA;Or maybe better example is brainwashing FarmVille on facebook.&#xD;&#xA;&#xD;&#xA;[flow on wikipedia][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Flow_(psychology)" />
  <row Id="14292" PostHistoryTypeId="2" PostId="7145" RevisionGUID="ca6618bc-c538-491c-9ad0-281676945a1e" CreationDate="2011-01-07T13:48:09.417" UserId="4200" Text="I saw the articles that were going on about OpenGL being better than DirectX and that Microsoft are really just trying to get everyone to use DirectX even though it's inferior so that gaming is almost exclusively for Windows and XBox, but since the article was written in 2006 is it still relevant today?&#xD;&#xA;&#xD;&#xA;Also I know plenty of games are written in DirectX but does anyone have any examples of popular games written in OpenGL?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="14293" PostHistoryTypeId="1" PostId="7145" RevisionGUID="ca6618bc-c538-491c-9ad0-281676945a1e" CreationDate="2011-01-07T13:48:09.417" UserId="4200" Text="OpenGL vs DirectX?" />
  <row Id="14294" PostHistoryTypeId="3" PostId="7145" RevisionGUID="ca6618bc-c538-491c-9ad0-281676945a1e" CreationDate="2011-01-07T13:48:09.417" UserId="4200" Text="&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="14295" PostHistoryTypeId="2" PostId="7146" RevisionGUID="6be6cc2d-b736-4ccf-995f-953051c4953d" CreationDate="2011-01-07T13:50:12.673" UserId="3232" Text="Popular games that use OpenGL: Quake 1, 2, 3 and 4 (maybe 4), Doom 3&#xD;&#xA;" />
  <row Id="14296" PostHistoryTypeId="2" PostId="7147" RevisionGUID="925d44a1-0850-4991-8df7-c4edaf164ff0" CreationDate="2011-01-07T13:53:38.300" UserId="2698" Text="Flow is one part of it, as notabene mentioned. However behind the effects is a whole host of psychological effects that combine to make games fun or addictive. MMORPGs, especially WoW, thrive off of such tools, to make themselves addictive at the very least.&#xD;&#xA;&#xD;&#xA;[Behavioural Game Design][1] is a good, short introduction to the psychological toolset that tackles some key concepts. [Psychology Is Fun][2] is a good follow-up, as it goes into more depth, especially on generating a sense of Flow.&#xD;&#xA;&#xD;&#xA;If you're after more, it's no understatement that the professionals who blog for Gamasutra seem to have turned it into a treasure trove for this sort of thing. They're how I found out about these concepts myself. Googling &quot;[psychology site:gamasutra.com][4]&quot; turns up results such as:&#xD;&#xA;&#xD;&#xA;* [The Psychology of Games][3], a blog series&#xD;&#xA;* [Psychology of Achievements &amp; Trophies][5]&#xD;&#xA;* [Psychology behind Item Collecting &amp; Achievements][6]&#xD;&#xA;* [Game Design Psychology: The Full Hirokazu Yasuhara Interview][7]&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3085/behavioral_game_design.php&#xD;&#xA;[2]: http://www.gamasutra.com/view/feature/6145/psychology_is_fun.php&#xD;&#xA;[3]: http://www.google.com.au/search?q=gamasutra+the+psychology+of+games&#xD;&#xA;[4]: http://www.google.com.au/search?q=psychology+site%3Agamasutra.com&#xD;&#xA;[5]: http://www.gamasutra.com/blogs/AkiJarvinen/20090305/709/Psychology_of_Achievements__Trophies.php&#xD;&#xA;[6]: http://www.gamasutra.com/php-bin/news_index.php?story=23724&#xD;&#xA;[7]: http://www.gamasutra.com/view/feature/3769/game_design_psychology_the_full_.php" />
  <row Id="14297" PostHistoryTypeId="2" PostId="7148" RevisionGUID="e0d4fba6-f011-4636-96fe-506883734835" CreationDate="2011-01-07T14:05:08.113" UserId="2792" Text="Assuming you mean Direct3D:&#xD;&#xA;&#xD;&#xA;The difference is in interface mostly. They both talk to the same underlying hardware, and there might be minor differences in what they expose, but most skills you get in one can be used in the other.&#xD;&#xA;&#xD;&#xA;That said, tool support is a lot better for D3D than for GL." />
  <row Id="14298" PostHistoryTypeId="2" PostId="7149" RevisionGUID="e0a35645-7088-4188-9173-6ded1b8be7b6" CreationDate="2011-01-07T14:34:56.130" UserId="3015" Text="&quot;Better&quot;, in this case, is a relative term. The two (assuming, as mentioned, D3D) are very similar in what they do and how they do it; but there is a pivotal point in here:&#xD;&#xA;&#xD;&#xA;While D3D has more tools available (jury is still out on &quot;better&quot;), and perhaps better support on the Windows platform, on other platforms support is pretty much non-existent.&#xD;&#xA;&#xD;&#xA;In computers, both Mac OS X and Linux both support OpenGL, and in terms of consoles, at least the Wii has interfaces that are highly reminiscent of OpenGL. I can't speak to the PSP or handhelds, but if they don't have proprietary interfaces, they probably have OpenGL (which is pretty much true everywhere).&#xD;&#xA;&#xD;&#xA;It all boils down to portability: If you are supporting one platform, and one platform only, for all of eternity; use whatever makes your job the easiest on that platform.&#xD;&#xA;&#xD;&#xA;If you plan on ever possibly supporting other platforms, the OpenGL path is probably one of the more attractive ones open to you. The other option is doing a lot of abstraction, or an engine that can interface with several different GPU interfaces." />
  <row Id="14299" PostHistoryTypeId="2" PostId="7150" RevisionGUID="573ee757-3358-4751-8e5b-151c9593bb97" CreationDate="2011-01-07T14:58:50.337" UserId="2472" Text="I'd store everything about items as pure data, and then traverse the data to determine how the item behaves.&#xD;&#xA;&#xD;&#xA;For example, suppose item properties vary per item type (instead of per item instance), and there can be multiple properties per item type.  This could be set up as a set of lookup tables on the item type. Example in JSON format:&#xD;&#xA;&#xD;&#xA;    restrictions = {&#xD;&#xA;      'ghost_amulet': ['must_be_dead'],&#xD;&#xA;      'magic_sword': ['in_combat'],&#xD;&#xA;      …&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actions = {&#xD;&#xA;      'ghost_amulet': [('revive', 0)],  # note: int parameter not used for revive&#xD;&#xA;      'magic_sword': [('fire_damage', +3), ('ice_damage', -1)],&#xD;&#xA;      'wooden_shield': [('armor_modifier', +5), ('block_modifier', +3)],&#xD;&#xA;      …&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Each action and restriction would map to a piece of code that implements it. Note that instead of restricting items to have only one type of modifier, I'd start out with having any item have any action or restriction. It's simpler and more flexible to put all of this into a data file than to use a class hierarchy that has to be recompiled when you change something. If there are space/speed issues you can add restrictions to streamline the data format.&#xD;&#xA;&#xD;&#xA;There are lots of variants of this. There might be properties that vary per item instance. There might be more parameters for some actions.  The action names might correspond to method names in the code instead of fields to modify.  Actions and restrictions might be ints instead of strings.  If only one restriction/action is needed you wouldn't need a list.  Modifiers might be put into their own lookup table (for example you could make a fire_damage lookup table that maps to numbers). All of these details will vary by game.&#xD;&#xA;" />
  <row Id="14300" PostHistoryTypeId="2" PostId="7151" RevisionGUID="72969dbb-89d1-48f4-a6bc-dbd47f89345e" CreationDate="2011-01-07T15:03:49.613" UserId="51" Text="First off, the only time this question is applicable is for Windows-based PCs.  Console, smartphones, and mac platforms all have a singular API (or a singular API and a &quot;closer to the hardware&quot; API), so your question doesn't apply to them.&#xD;&#xA;&#xD;&#xA;&quot;Better&quot; is a terrible term anyway.  Better for what?  As far as I'm concerned, DirectX is better for Windows since OpenGL drivers are generally terrible.  Or at least that's what the Unity guys discovered with their cross-platform engine.  I really wish I had a link for that.&#xD;&#xA;&#xD;&#xA;Maybe at some point in time API X has feature Y which is really attractive (and therefore might seem &quot;better&quot;)... but you can't use it because nobody would have a video card to support that feature.  And if you made a game that really needed that feature it would be much harder to port it to another platform that didn't use that API." />
  <row Id="14301" PostHistoryTypeId="2" PostId="7152" RevisionGUID="09a08f08-1d26-4ae9-a8da-ce59f106eff7" CreationDate="2011-01-07T15:21:19.440" UserId="2792" Text="PC games by Starbreeze uses OpenGL. The Chronicles of Riddick and Enclave." />
  <row Id="14302" PostHistoryTypeId="2" PostId="7153" RevisionGUID="5658ebc7-e827-444e-ac82-64a69e13f95b" CreationDate="2011-01-07T15:24:49.317" UserId="1829" Text="The situation about those two API is greatly dependent of the PC game market which is completely dominated by microsoft.&#xD;&#xA;&#xD;&#xA;You also have to understand that as the graphic technologies has been very much influenced by the progress made in computer speed, and since graphic acceleration involves **all** aspects of a computer (the electronic architecture aspect, the OS aspect, the CPU aspect, the API compatibility aspect), it involves a very tight and dense engineering work, so you can easily understand that it requires enormous resources so those technologies can not only be released, but evolve and be &quot;easy&quot; enough to work with for game and/or 3D engines developers.&#xD;&#xA;&#xD;&#xA;Microsoft has been tightly working with nVidia, and they are more able to throw money to be sure their technology is more advanced on such special hardware, something which can't be possible with an open source model, since there are much less developers ready to work for an open model which doesn't rewards them money directly.&#xD;&#xA;&#xD;&#xA;Open standards are been efficient for a long time but as this quote says:&#xD;&#xA;&quot;Walking on water and developing software from a specification are easy if both are frozen.&quot; Edward V Berard&#xD;&#xA;&#xD;&#xA;The reason why it favors direct x is because shiny stuff sells more, and shiny stuff requires recent software AND hardware.&#xD;&#xA;&#xD;&#xA;But you can still learn OpenGL, do something sufficient with it, and let the engines do the hard work, because graphic programming evolves a lot, and don't remember Direct X is not the only proprietary: Sony, Nintendo, and other Arcade or other systems, use proprietary APIs.&#xD;&#xA;&#xD;&#xA;So my advice is this: learn OpenGL, because for the shiny stuff, you won't stay on OpenGL. You can also learn Direct X, but if you plan to work on consoles, you will have to learn again.&#xD;&#xA;&#xD;&#xA;All that chit chat is not very interesting: just pick an engine like Ogre or Irrlicht or Panda3D and start coding.&#xD;&#xA;&#xD;&#xA;And one thing: if you plan to learn either Direct X or OpenGL, be sure to learn everything you can about Matrix algebra, and some more which are specific to graphic programming.&#xD;&#xA;&#xD;&#xA;The read will be long." />
  <row Id="14303" PostHistoryTypeId="10" PostId="7145" RevisionGUID="3d0cc5a2-bb66-4211-b213-c41c731440f6" CreationDate="2011-01-07T15:30:21.237" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="14304" PostHistoryTypeId="2" PostId="7154" RevisionGUID="68fe2fee-b47b-447a-b115-f8030f8cb135" CreationDate="2011-01-07T15:32:23.857" UserId="14" Text="Not complete, but very long list at Wikipedia.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/List_of_OpenGL_programs" />
  <row Id="14305" PostHistoryTypeId="4" PostId="7143" RevisionGUID="0107e8ce-b91b-4e28-b7e1-73e29e0f1146" CreationDate="2011-01-07T15:53:17.963" UserId="14" Comment="edited title; edited title" Text="What elements make a simple game addictive?" />
  <row Id="14306" PostHistoryTypeId="6" PostId="7139" RevisionGUID="3f0f4024-a54f-4ea5-bba9-e013a6c153b8" CreationDate="2011-01-07T15:54:20.973" UserId="1156" Comment="edited tags" Text="&lt;ai&gt;&lt;card-game&gt;" />
  <row Id="14307" PostHistoryTypeId="2" PostId="7155" RevisionGUID="81daec5b-a420-48c0-bfc7-a23d3283aa58" CreationDate="2011-01-07T15:56:10.783" UserId="370" Text="It's much faster to use a 2d cross-product.  No costly trig function involved.&#xD;&#xA;&#xD;&#xA;    b2Vec2 target( ... );&#xD;&#xA;    b2Vec2 heading( ... );&#xD;&#xA;    &#xD;&#xA;    float cross = b2Cross( target, heading );&#xD;&#xA;    &#xD;&#xA;    if( cross == -0.0f )&#xD;&#xA;       // turn around&#xD;&#xA;    &#xD;&#xA;    if( cross == 0.0f )&#xD;&#xA;      // already traveling the right direction&#xD;&#xA;    &#xD;&#xA;    if( cross &lt; 0.0f)&#xD;&#xA;      // turn left&#xD;&#xA;    &#xD;&#xA;    if( cross &gt; 0.0f)&#xD;&#xA;      // turn right" />
  <row Id="14308" PostHistoryTypeId="6" PostId="7143" RevisionGUID="6cc4b5e5-41e8-4a54-8a0d-1e9cccb1079e" CreationDate="2011-01-07T15:57:43.310" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="14309" PostHistoryTypeId="2" PostId="7156" RevisionGUID="cbbdf5a7-2f3d-4fcb-8e78-f9912edb67cd" CreationDate="2011-01-07T16:01:15.790" UserId="1156" Text="There's [this][1] thread on puzzle games in particular. Since I don't know bubble explode, I can't say if it's exactly what you want.  &#xD;&#xA;And [this][2] one on score-based games, which is slightly less useful but still a good source.&#xD;&#xA;&#xD;&#xA;But some general ideas from there:&#xD;&#xA;&#xD;&#xA; - Make it easy to replay&#xD;&#xA; - Make it **fun**&#xD;&#xA; - Simple controls&#xD;&#xA; - Make it challenging, so the player wants to continue&#xD;&#xA; - But not too challenging, so they don't want to give up&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5667/what-makes-puzzle-games-addictive&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/5279/how-can-i-make-my-score-based-game-addictive" />
  <row Id="14310" PostHistoryTypeId="6" PostId="7135" RevisionGUID="f8d10964-3e59-4cda-9fb8-24c5aa65f9ae" CreationDate="2011-01-07T16:02:05.397" UserId="1156" Comment="edited tags" Text="&lt;java&gt;&lt;tiles&gt;&lt;rpg&gt;&lt;movement&gt;" />
  <row Id="14311" PostHistoryTypeId="6" PostId="7127" RevisionGUID="91105c55-4fe5-4dc1-a69c-9ea30d55a248" CreationDate="2011-01-07T16:02:35.490" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;lua&gt;&lt;component-based&gt;" />
  <row Id="14312" PostHistoryTypeId="5" PostId="7155" RevisionGUID="afc4228d-d521-43e9-a4db-334a1cfe5b82" CreationDate="2011-01-07T16:03:00.887" UserId="370" Comment="added 503 characters in body" Text="It's much faster to use a 2d cross-product.  No costly trig function involved.&#xD;&#xA;&#xD;&#xA;    b2Vec2 target( ... );&#xD;&#xA;    b2Vec2 heading( ... );&#xD;&#xA;    &#xD;&#xA;    float cross = b2Cross( target, heading );&#xD;&#xA;    &#xD;&#xA;    if( cross == -0.0f )&#xD;&#xA;       // turn around&#xD;&#xA;    &#xD;&#xA;    if( cross == 0.0f )&#xD;&#xA;      // already traveling the right direction&#xD;&#xA;    &#xD;&#xA;    if( cross &lt; 0.0f)&#xD;&#xA;      // turn left&#xD;&#xA;    &#xD;&#xA;    if( cross &gt; 0.0f)&#xD;&#xA;      // turn right&#xD;&#xA;&#xD;&#xA;If you still need the actual angles I recommend using `atan2`.  `atan2` will give you the absolute angle of any vector.  To get the relative angle between any to vectors, calcuate their absolute angles and use simple subtraction.&#xD;&#xA;&#xD;&#xA;    b2Vec2 A(...);&#xD;&#xA;    b2Vec2 B(...);&#xD;&#xA;    &#xD;&#xA;    float angle_A = std::atan2(A.y,A.x);&#xD;&#xA;    float angle_B = B.GetAngle(); // Box2D already figured this out for you.&#xD;&#xA;    &#xD;&#xA;    float angle_from_A_to_B = angle_B-angle_A;&#xD;&#xA;    float angle_from_B_to_A = angle_A-angle_B;" />
  <row Id="14313" PostHistoryTypeId="2" PostId="7157" RevisionGUID="25e8ca94-8541-4a1d-93e7-694380ef92e3" CreationDate="2011-01-07T17:02:13.797" UserId="3536" Text="This is the code I am currently using, and it works great, except for the strafe always causes the camera to move along the X axis which is not relative to the direction in which the camera is actually facing. As you can see currently only the x location is updated: [delta * -1, 0, 0]&#xD;&#xA;&#xD;&#xA;How should I take into account the direction in which the camera is facing (I have the camera's target x,y,z) when creating a first person strafe (left/right) movement?&#xD;&#xA;&#xD;&#xA;        case 'a':&#xD;&#xA;            var eyeOriginal = g_eye;&#xD;&#xA;            var targetOriginal = g_target;&#xD;&#xA;            var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;            var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;            viewEye = g_math.addVector([delta * -1, 0, 0], viewEye);&#xD;&#xA;            viewTarget = g_math.addVector([delta * -1, 0, 0], viewTarget);&#xD;&#xA;            g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;            g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;            break;&#xD;&#xA;        case 'd':&#xD;&#xA;            var eyeOriginal = g_eye;&#xD;&#xA;            var targetOriginal = g_target;&#xD;&#xA;            var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;            var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;            viewEye = g_math.addVector([delta, 0, 0], viewEye);&#xD;&#xA;            viewTarget = g_math.addVector([delta, 0, 0], viewTarget);&#xD;&#xA;            g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;            g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;            break;" />
  <row Id="14314" PostHistoryTypeId="1" PostId="7157" RevisionGUID="25e8ca94-8541-4a1d-93e7-694380ef92e3" CreationDate="2011-01-07T17:02:13.797" UserId="3536" Text="How do I have to take into account the direction in which the camera is facing when creating a first person strafe (left/right) movement" />
  <row Id="14315" PostHistoryTypeId="3" PostId="7157" RevisionGUID="25e8ca94-8541-4a1d-93e7-694380ef92e3" CreationDate="2011-01-07T17:02:13.797" UserId="3536" Text="&lt;3d&gt;&lt;camera&gt;&lt;first-person-shooter&gt;&lt;matrix&gt;" />
  <row Id="14317" PostHistoryTypeId="2" PostId="7159" RevisionGUID="502a22e6-6052-4ad7-bb0a-eb609e4c5fa1" CreationDate="2011-01-07T17:36:22.593" UserId="2698" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;    if (key == 'a' || key == 'd')&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // I've got no idea which language or framework you're using, so...&#xD;&#xA;        // PSEUDOCODE BEGINS NOW!!&#xD;&#xA;        &#xD;&#xA;        var cameraRotation = the camera's rotation matrix&#xD;&#xA;&#xD;&#xA;        int xMovement = 1;&#xD;&#xA;        if (key == 'a') xMovement *= -1;&#xD;&#xA;        var movementVector = new Vector3(delta * xMovement, 0, 0);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera&#xD;&#xA;        var realMovementVector = movementVector * cameraRotation;&#xD;&#xA;        // Warning: a * b is not the same as b * a&#xD;&#xA;        // Your framework may have a different way of doing this&#xD;&#xA;        &#xD;&#xA;        // PSEUDOCODE ENDS NOW!!&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* See the pseudocode.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14318" PostHistoryTypeId="5" PostId="7159" RevisionGUID="c776be3b-c8d7-4e95-8e36-06f047b233e5" CreationDate="2011-01-07T17:43:44.430" UserId="2698" Comment="added 312 characters in body; added 3 characters in body" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;    if (movementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // I've got no idea which language or framework you're using, so...&#xD;&#xA;        // PSEUDOCODE BEGINS NOW!!&#xD;&#xA;        &#xD;&#xA;        var cameraRotation = // the camera's rotation matrix&#xD;&#xA;&#xD;&#xA;        int xMovement = 1;&#xD;&#xA;        if (key == 'a') xMovement *= -1;&#xD;&#xA;        var movementVector = new Vector3(delta * xMovement, 0, 0);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera&#xD;&#xA;        var realMovementVector = movementVector * cameraRotation;&#xD;&#xA;        // Warning: a * b is not the same as b * a&#xD;&#xA;        // Your framework may have a different way of doing this&#xD;&#xA;        &#xD;&#xA;        // PSEUDOCODE ENDS NOW!!&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* See the pseudocode.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14319" PostHistoryTypeId="5" PostId="7159" RevisionGUID="1d46e40b-160c-4b20-aceb-c4abf2511920" CreationDate="2011-01-07T17:51:11.400" UserId="2698" Comment="added 462 characters in body; added 1 characters in body" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;I have no idea which language or framework you're using so I'm going to be using some C# and XNA here.&#xD;&#xA;&#xD;&#xA;    if (MovementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // I've got no idea which language or framework you're using, so...&#xD;&#xA;        // PSEUDOCODE BEGINS NOW!!&#xD;&#xA;        &#xD;&#xA;        var cameraRotation = // the camera's rotation matrix&#xD;&#xA;&#xD;&#xA;        int xMovement = 1;&#xD;&#xA;        if (key == 'a') xMovement *= -1;&#xD;&#xA;        var movementVector = new Vector3(delta * xMovement, 0, 0);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera&#xD;&#xA;        var realMovementVector = movementVector * cameraRotation;&#xD;&#xA;        // Warning: a * b is not the same as b * a&#xD;&#xA;        // Your framework may have a different way of doing this rotation&#xD;&#xA;        &#xD;&#xA;        // PSEUDOCODE ENDS NOW!!&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    bool MovementKeysPressed() {&#xD;&#xA;        // current state of the keyboard, stores for each key&#xD;&#xA;        // whether it's pressed or not&#xD;&#xA;        KeyboardState keys = Keyboard.GetState();&#xD;&#xA;        return (keys.A.State == KeyState.Down || keys.D.State == KeyState.Down);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* See the pseudocode section for movement vector-specific code, and the necessary rotation&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14320" PostHistoryTypeId="10" PostId="7143" RevisionGUID="e39a4d66-c29d-4f90-9d82-0c38fb706433" CreationDate="2011-01-07T18:14:57.740" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="14321" PostHistoryTypeId="5" PostId="7143" RevisionGUID="ef9d3c38-cb2a-4e8e-8be5-a3f1cdf8fbe8" CreationDate="2011-01-07T18:14:57.867" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What should a game have in order to keep humans playing it?](http://gamedev.stackexchange.com/questions/4532/what-should-a-game-have-in-order-to-keep-humans-playing-it)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am creating simple game for iPhone like &quot;Bubble Explode&quot;. Generally, what elements of game make it addictive and exciting for similar simple games." />
  <row Id="14322" PostHistoryTypeId="5" PostId="7143" RevisionGUID="6550c9bc-c06e-4998-8e1a-5ee6e6bc1904" CreationDate="2011-01-07T18:20:07.780" UserId="14" Comment="Editing in other dupes." Text="&gt; **Possible Duplicates:**  &#xD;&#xA;&gt; [What should a game have in order to keep humans playing it?](http://gamedev.stackexchange.com/questions/4532/what-should-a-game-have-in-order-to-keep-humans-playing-it)  &#xD;&#xA;&#xD;&#xA;&gt; [How can I make my score-based game addictive](http://gamedev.stackexchange.com/questions/5279/how-can-i-make-my-score-based-game-addictive) &#xD;&#xA;&#xD;&#xA;&gt; [What makes puzzle games addictive?](http://gamedev.stackexchange.com/questions/5667/what-makes-puzzle-games-addictive)&#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;I am creating simple game for iPhone like &quot;Bubble Explode&quot;. Generally, what elements of game make it addictive and exciting for similar simple games.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14323" PostHistoryTypeId="2" PostId="7160" RevisionGUID="e8e7cd8f-5ab3-40ea-b923-e074e6911499" CreationDate="2011-01-07T19:42:57.493" UserId="1952" Text="If you are looking into box2d at all, be sure to check out World Construction Kit.&#xD;&#xA;http://www.sideroller.com/wck/&#xD;&#xA;&#xD;&#xA;It uses an Alchemy port of Box2d, meaning it is converted from pure C code using Alchemy which really enhances the performance.&#xD;&#xA;&#xD;&#xA;If you are authoring your game in the Flash IDE and not in pure as3, it basically makes the Flash IDE into a level editor by adding components for physics based shapes and joints. Definitely at least worth checking out the demo.&#xD;&#xA;&#xD;&#xA;If you are using pure as3, the component classes could still come in handy.&#xD;&#xA;&#xD;&#xA;If nothing else, playing with the components in the IDE and messing with the demos would be a nice introduction to using a physics engine and an easy way to familiarize yourself with the concepts." />
  <row Id="14325" PostHistoryTypeId="2" PostId="7161" RevisionGUID="22ff9ef3-47e9-452f-9743-8bb0916b4b65" CreationDate="2011-01-07T21:22:58.777" UserId="4129" Text="Are there any robust performant libraries for indexing objects?&#xD;&#xA;&#xD;&#xA;It would need [fustrum culling][1] and visiting objects hit by a ray as well as neighbourhood searches.&#xD;&#xA;&#xD;&#xA;I can find lots of articles showing the math for the component parts, often as algebra rather than simple c, but nothing that puts it all together (apart from perhaps Ogre, which has rather more involved and isn't so stand-alone).  Surely hobby game makers don't all have to make their own octrees?&#xD;&#xA;&#xD;&#xA;(Python or C/C++ w/bindings preferred)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Frustum_Culling.shtml" />
  <row Id="14326" PostHistoryTypeId="1" PostId="7161" RevisionGUID="22ff9ef3-47e9-452f-9743-8bb0916b4b65" CreationDate="2011-01-07T21:22:58.777" UserId="4129" Text="library for octree or kdtree" />
  <row Id="14327" PostHistoryTypeId="3" PostId="7161" RevisionGUID="22ff9ef3-47e9-452f-9743-8bb0916b4b65" CreationDate="2011-01-07T21:22:58.777" UserId="4129" Text="&lt;python&gt;&lt;octree&gt;&lt;fustrum&gt;" />
  <row Id="14328" PostHistoryTypeId="6" PostId="7161" RevisionGUID="b299bc4e-2f4e-4823-a541-1587424eb931" CreationDate="2011-01-07T21:46:48.730" UserId="3794" Comment="edited tags" Text="&lt;python&gt;&lt;octree&gt;&lt;frustum&gt;" />
  <row Id="14329" PostHistoryTypeId="2" PostId="7162" RevisionGUID="ddd40ac5-29af-4a57-8a27-af60b833fc28" CreationDate="2011-01-07T21:53:19.643" UserId="744" Text="&gt; Surely hobby game makers don't all have to make their own octrees?&#xD;&#xA;&#xD;&#xA;Unless they are using something larger (like Ogre, or another physics/rendering engine), many do. An octree is a fairly simple structure to implement, and there's a lot of tradeoffs:&#xD;&#xA;&#xD;&#xA; * Is the octree intrusive or not? If it's intrusive you get better cache performance, but larger structures.&#xD;&#xA; * If it's not intrusive, does it store pointers or some kind of safe handle?&#xD;&#xA; * Is it stored flat or with child pointers?&#xD;&#xA; * How type-safe is it? If it uses templates, it'll be a lot safer with minimal runtime overhead, but much harder to bind to Python.&#xD;&#xA; * Any octree with spatial querying is going to have to include some kind of vector/point/ray type, and anything with frustum culling is going to include a frustum and matrix math routines. Is writing the code to interface that to the dozen matrix/vector classes you've already dragged in from all the other libraries you're using actually less work than just writing the base octree you want?&#xD;&#xA;&#xD;&#xA;That being said, &lt;a href=&quot;http://www.google.com/search?q=octree.cpp&quot;&gt;there are plenty of octree implementations online&lt;/a&gt;. Just don't assume grabbing one of them is going to save you much work, and don't assume there's One True Way to make any data structure other than an array." />
  <row Id="14330" PostHistoryTypeId="2" PostId="7163" RevisionGUID="8c5015e9-f020-4429-a8d4-64dd3e8657b0" CreationDate="2011-01-07T21:56:51.243" UserId="2763" Text="You can get a `Skysphere` [here][1].  I have managed to convert it and you can see it working [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnacommunity.codeplex.com/wikipage?title=Componente%20SkyDome&amp;referringTitle=Componentes&#xD;&#xA;  [2]: http://project-vanquish.co.cc" />
  <row Id="14331" PostHistoryTypeId="5" PostId="7161" RevisionGUID="79f199f3-b627-4158-a47b-ca5341c8a33f" CreationDate="2011-01-07T21:57:41.170" UserId="744" Comment="edited body; edited title" Text="Are there any robust performant libraries for indexing objects?&#xD;&#xA;&#xD;&#xA;It would need [frustum culling][1] and visiting objects hit by a ray as well as neighbourhood searches.&#xD;&#xA;&#xD;&#xA;I can find lots of articles showing the math for the component parts, often as algebra rather than simple C, but nothing that puts it all together (apart from perhaps Ogre, which has rather more involved and isn't so stand-alone).  Surely hobby game makers don't all have to make their own octrees?&#xD;&#xA;&#xD;&#xA;(Python or C/C++ w/bindings preferred)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Frustum_Culling.shtml" />
  <row Id="14332" PostHistoryTypeId="4" PostId="7161" RevisionGUID="79f199f3-b627-4158-a47b-ca5341c8a33f" CreationDate="2011-01-07T21:57:41.170" UserId="744" Comment="edited body; edited title" Text="What library for octrees or kd-trees?" />
  <row Id="14333" PostHistoryTypeId="5" PostId="7162" RevisionGUID="a1c5d835-4a66-4432-9f56-68c22e2a7ac5" CreationDate="2011-01-07T21:59:26.597" UserId="744" Comment="added 23 characters in body" Text="&gt; Surely hobby game makers don't all have to make their own octrees?&#xD;&#xA;&#xD;&#xA;Unless they are using something larger (like Ogre, or another physics/rendering engine), many do. An octree is a fairly simple structure to implement, and there's a lot of tradeoffs:&#xD;&#xA;&#xD;&#xA; * Is the octree intrusive or not? If it's intrusive you get better cache performance, but larger structures.&#xD;&#xA; * If it's not intrusive, does it store pointers or some kind of safe handle?&#xD;&#xA; * Is it stored flat or with child pointers?&#xD;&#xA; * How type-safe is it? If it uses templates, it'll be a lot safer with minimal runtime overhead, but much harder to bind to Python.&#xD;&#xA; * Any octree with spatial querying is going to have to include some kind of vector/point/ray type, and anything with frustum culling is going to include a frustum and matrix math routines. Is writing the code to interface that to the dozen matrix/vector classes you've already dragged in from all the other libraries you're using actually less work than just writing the base octree you want?&#xD;&#xA; * Is it thread-safe?&#xD;&#xA;&#xD;&#xA;That being said, &lt;a href=&quot;http://www.google.com/search?q=octree.cpp&quot;&gt;there are plenty of octree implementations online&lt;/a&gt;. Just don't assume grabbing one of them is going to save you much work, and don't assume there's One True Way to make any data structure other than an array." />
  <row Id="14334" PostHistoryTypeId="2" PostId="7164" RevisionGUID="45e5bd86-b779-4183-96f7-6b57b4ed07f6" CreationDate="2011-01-07T22:25:34.063" UserId="1528" Text="In the process of writing my game prototype, I have found the [OBJ][1] format to be insufficient for my needs - it does not support any sort of animation, it doesn't support triangle strips (I'm targeting my ancient hardware). [MD2][2] wouldn't fit the bill because it doesn't have support for named model pieces. [MD3][3] would probably work, but like OBJ, it doesn't have support for triangle strips. Considering the limitations of the formats above, I've come to the conclusion that it may be necessary to write my own format to accommodate my requirements, but that feels like reinventing the wheel.&#xD;&#xA;&#xD;&#xA;So, I need a format which can specify indexed tri-strips, supports textures, UV-mapping, collision data, can have multiple named segments and supports animations (have I forgotten anything?). Is there any format like that which already exists, or do I have to write my own?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wavefront_.obj_file&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/MD2_(file_format)&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/MD3_(file_format)" />
  <row Id="14335" PostHistoryTypeId="1" PostId="7164" RevisionGUID="45e5bd86-b779-4183-96f7-6b57b4ed07f6" CreationDate="2011-01-07T22:25:34.063" UserId="1528" Text="Custom mesh format - yea or nay?" />
  <row Id="14336" PostHistoryTypeId="3" PostId="7164" RevisionGUID="45e5bd86-b779-4183-96f7-6b57b4ed07f6" CreationDate="2011-01-07T22:25:34.063" UserId="1528" Text="&lt;3d-meshes&gt;&lt;file-format&gt;" />
  <row Id="14337" PostHistoryTypeId="2" PostId="7165" RevisionGUID="9252c955-bb15-4548-8b32-cc72fa65fb38" CreationDate="2011-01-07T22:38:55.530" UserId="3794" Text="I'm programming gpgpu raymarching (volumetric raytracing) in directx11. I succesfully perform compute shader and save raymarched volume data to texture. Then i want to use same texture as SRV in normal graphic pipeline. But it doesnt work, texture is not visible. &#xD;&#xA;&#xD;&#xA;Texture is ok, when i save it file it is what i expect. Texture rendering is ok too, when i render another SRV, it is ok. So problem is only in UAV-&gt;SRV. I also triple checked if pointers are ok. Please help, i'm getting mad about this. &#xD;&#xA;&#xD;&#xA;Here is some code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //before dispatch&#xD;&#xA;    D3D11_TEXTURE2D_DESC textureDesc;&#xD;&#xA;    ZeroMemory( &amp;textureDesc, sizeof( textureDesc ) );&#xD;&#xA;    textureDesc.Width = xr;&#xD;&#xA;    textureDesc.Height = yr;&#xD;&#xA;    textureDesc.MipLevels = 1;&#xD;&#xA;    textureDesc.ArraySize = 1;&#xD;&#xA;    textureDesc.SampleDesc.Count = 1;&#xD;&#xA;    textureDesc.SampleDesc.Quality = 0;&#xD;&#xA;    textureDesc.Usage = D3D11_USAGE_DEFAULT;&#xD;&#xA;    textureDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE ;&#xD;&#xA;    textureDesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;&#xD;&#xA;    D3D-&gt;CreateTexture2D( &amp;textureDesc, NULL, &amp;pTexture );&#xD;&#xA;    &#xD;&#xA;    D3D11_UNORDERED_ACCESS_VIEW_DESC viewDescUAV;&#xD;&#xA;    ZeroMemory( &amp;viewDescUAV, sizeof( viewDescUAV ) );&#xD;&#xA;    viewDescUAV.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;&#xD;&#xA;    viewDescUAV.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2D;&#xD;&#xA;    viewDescUAV.Texture2D.MipSlice = 0;&#xD;&#xA;    D3DD-&gt;CreateUnorderedAccessView( pTexture, &amp;viewDescUAV, &amp;pTextureUAV );&#xD;&#xA;    &#xD;&#xA;    //the getSRV function after dispatch.&#xD;&#xA;    D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc ;&#xD;&#xA;    ZeroMemory( &amp;srvDesc, sizeof( srvDesc ) );&#xD;&#xA;    srvDesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;&#xD;&#xA;    srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;&#xD;&#xA;    srvDesc.Texture2D.MipLevels = 1;&#xD;&#xA;    D3DD-&gt;CreateShaderResourceView( pTexture, &amp;srvDesc, &amp;pTextureSRV);" />
  <row Id="14338" PostHistoryTypeId="1" PostId="7165" RevisionGUID="9252c955-bb15-4548-8b32-cc72fa65fb38" CreationDate="2011-01-07T22:38:55.530" UserId="3794" Text="SRV from UAV on the same texture in directx" />
  <row Id="14339" PostHistoryTypeId="3" PostId="7165" RevisionGUID="9252c955-bb15-4548-8b32-cc72fa65fb38" CreationDate="2011-01-07T22:38:55.530" UserId="3794" Text="&lt;c++&gt;&lt;directx&gt;&lt;directx11&gt;" />
  <row Id="14340" PostHistoryTypeId="2" PostId="7166" RevisionGUID="e3b64082-2998-40b1-95dc-c5155bce1b41" CreationDate="2011-01-07T22:47:15.407" UserId="4410" Text="Never used it myself, but there was some interest a while back (or maybe still is) in [Collada][1]. Projects I've worked on have always rolled our own export formats, you'll always have exactly what you want that way, just depends how much work you want to do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.khronos.org/collada/" />
  <row Id="14341" PostHistoryTypeId="2" PostId="7167" RevisionGUID="dded8ea8-64dd-4b19-942b-b136ec51ddf5" CreationDate="2011-01-07T22:54:34.797" UserId="4360" Text="Go with box2d, ape and fisix projects you mentioned are both dead. &#xD;&#xA;Box2d for flash has to one of resources and by learning it youre learning something you can take to almost anywhere.&#xD;&#xA;&#xD;&#xA;I've made games in Ape it was good but as I said it's a dead project. I've made games in box2d, it's more upfront work but your returns are solid. &#xD;&#xA;&#xD;&#xA;To the person who mentioned they could tell a game used box 2d by how it felt. I really doubt that, if anything you could tell it is using some kind of rigid body physics engine but that's about it.&#xD;&#xA;&#xD;&#xA;Also check out motor2, another box2d port by a really smart guy.&#xD;&#xA;&#xD;&#xA;Sent on iphone" />
  <row Id="14342" PostHistoryTypeId="2" PostId="7168" RevisionGUID="1fc7c816-66a5-47f7-a32b-9ac6e5a1b3b8" CreationDate="2011-01-07T22:56:36.433" UserId="4496" Text="I'd look through the standards first, just to make sure; but if your needs aren't being met that may be a decent solution.  &#xD;&#xA;&#xD;&#xA;Check out FBX, I've been working in XNA and so have been kind of bound into them (or .x but we had difficulties with that due to Maya).  They are a bit of a headache at times, but I've been told they support animations well, and I have seen evidence of the ability for named bones n' the like." />
  <row Id="14343" PostHistoryTypeId="2" PostId="7169" RevisionGUID="d8c40ec0-992f-4066-969e-b4cd809a040e" CreationDate="2011-01-07T23:07:34.240" UserId="4496" Text="I had to do one of these.  Easiest method is to texture the sphere (make sure the normals are facing *inward*, otherwise you won't be able to see it).  Then if you want clouds n' the like, just move another texture over it in a shader (there's a good number of fairly easy HLSL tutorials out there.  Others have recommended some, I would recommend [Riemers][1] even if it's not specifically skysphere related as a good starting point)&#xD;&#xA;&#xD;&#xA;If you want a day/night cycle, it's heavily going to be influenced just by the lighting you cast on the rest of your scene.  However, if the lights in the sky are looking kinda flat, make a second texture that just has the light sources in white (intensity = whiteness) then do an additive blend based on how much you want them to light up.&#xD;&#xA;&#xD;&#xA;In any case, good luck.  Wanting a skysphere is something that drove me into getting a lot more involved with shaders.  It won't be too scary once you start digging into it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/series3.php" />
  <row Id="14344" PostHistoryTypeId="2" PostId="7170" RevisionGUID="5bf3fcd0-0559-49a5-b843-daf5e1a3aff2" CreationDate="2011-01-08T01:56:29.777" UserId="1130" Text="I started to learn Cinema 4D. I've noticed it's really easy to use for motion graphics, but I want to use it for modeling for games/realtime 3d engines.&#xD;&#xA;&#xD;&#xA;Before I used 3dsmax and it was easy to estimate how a model would look/behave in a 3d engine. The two main things I did was **displaying Polygon triangles** and **displaying the Polygon Count**.&#xD;&#xA;&#xD;&#xA;I've found the Total Polygons tick in HUD settings in Cinema 4D, but I can't find any display mode that will show triangles.&#xD;&#xA;&#xD;&#xA;Is there there a way to display triangle faces/not quads in Cinema4D ? If so how ?&#xD;&#xA;&#xD;&#xA;There is a Triangulate function, but I'd rather not Triangulate/Untriangulate all the time, especially since it's converting back and forth between the two doesn't always produce the same result.&#xD;&#xA;&#xD;&#xA;I imagine I'm asking for old school techniques, but I plan to use these to make low poly models for web(canvas/webGL) and mobile." />
  <row Id="14345" PostHistoryTypeId="1" PostId="7170" RevisionGUID="5bf3fcd0-0559-49a5-b843-daf5e1a3aff2" CreationDate="2011-01-08T01:56:29.777" UserId="1130" Text="Where can I find Cinema4D for game development tutorials ?" />
  <row Id="14346" PostHistoryTypeId="3" PostId="7170" RevisionGUID="5bf3fcd0-0559-49a5-b843-daf5e1a3aff2" CreationDate="2011-01-08T01:56:29.777" UserId="1130" Text="&lt;3d&gt;&lt;web&gt;&lt;mobile&gt;&lt;low-poly&gt;&lt;cinema-4d&gt;" />
  <row Id="14347" PostHistoryTypeId="2" PostId="7171" RevisionGUID="87e9d9c7-c5c4-4899-aa87-153b335bb893" CreationDate="2011-01-08T03:14:20.800" UserId="4499" Text="I would like to develop a backgammon game to play against other players online, as a way of learning more Javascript/jQuery and a little game development. I'm a web developer and most of my experience is in PHP. I have minimal Javascript experience and no game development experience. Where should I start? Are there any particular books, tutorials, libraries, or frameworks that would help give me a jumpstart? As a beginner, am I better of using the DOM or Canvas?" />
  <row Id="14348" PostHistoryTypeId="1" PostId="7171" RevisionGUID="87e9d9c7-c5c4-4899-aa87-153b335bb893" CreationDate="2011-01-08T03:14:20.800" UserId="4499" Text="Where to start, to develop an online Backgammon game?" />
  <row Id="14349" PostHistoryTypeId="3" PostId="7171" RevisionGUID="87e9d9c7-c5c4-4899-aa87-153b335bb893" CreationDate="2011-01-08T03:14:20.800" UserId="4499" Text="&lt;web&gt;&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="14350" PostHistoryTypeId="5" PostId="7159" RevisionGUID="28995dfb-870f-49b1-b8b0-7572d4759278" CreationDate="2011-01-08T03:28:41.747" UserId="2698" Comment="Rewritten to (a) suit JavaScript, (b) do the camera rotation calculation" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;I have no idea which language or framework you're using so I'm going to be using some C# and XNA here.&#xD;&#xA;&#xD;&#xA;    var keys = Keyboard.GetState();&#xD;&#xA;&#xD;&#xA;    if (MovementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // The important camera rotation stuff happens here&#xD;&#xA;&#xD;&#xA;        // Determine camera rotation&#xD;&#xA;        // I am assuming g_eye is the camera's location,&#xD;&#xA;        // and g_target is where it's looking,&#xD;&#xA;        // and they are both Vector3s&#xD;&#xA;        var up = [0, 1, 0];&#xD;&#xA;        var cameraRotation = g_math.matrix4.lookAt(g_eye, g_target, up);&#xD;&#xA;&#xD;&#xA;        // Right now we're only doing *direction* of movement - working with 1s only.&#xD;&#xA;        // Speed comes after rotation.&#xD;&#xA;        var xMovement = 0;&#xD;&#xA;        if (keys.A.Down) xMovement -= 1;&#xD;&#xA;        if (keys.D.Down) xMovement += 1;&#xD;&#xA;        var movementVector4 = [delta * xMovement, 0, 0, 0];&#xD;&#xA;        // Note that holding both A and D is possible and gets you nowhere.&#xD;&#xA;        &#xD;&#xA;        // This step will only be necessary if you're performing calculations on&#xD;&#xA;        // more than one axis, or set a single axis longer than 1.&#xD;&#xA;        // It reduces the vector's magnitude/length to 1.&#xD;&#xA;        var movementVector4 = g_math.normalize(movementVector4);&#xD;&#xA;        // After we do speed you'll understand why that's important.&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera. &#xD;&#xA;        var realMovementVector4 = g_math.rowMajor.mulVectorMatrix(movementVector, cameraRotation);&#xD;&#xA;&#xD;&#xA;        // Now for speed. Let's take a ridiculous example speed of 42.&#xD;&#xA;        var speed = 42;&#xD;&#xA;        realMovementVector4 = g_math.mulVectorScalar(realMovementVector4, speed);&#xD;&#xA;        // If you don't know what just happened:&#xD;&#xA;        // We created movementVector as a 1-unit long line (or had a magnitude of 1).&#xD;&#xA;        // After we rotated it, it still only had magnitude 1.&#xD;&#xA;        // By multiplying it by a scalar (aka integer), we multiplied its magnitude,&#xD;&#xA;        // which is now (1 x 42) = 42. It will now move 42 units either left or right&#xD;&#xA;        // of the camera (unless the player has both 'a' and 'd' held down).&#xD;&#xA;&#xD;&#xA;        realMovementVector3 = Vector4toVector3(realMovementVector4); // defined below&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector3, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector3, viewTarget);&#xD;&#xA;&#xD;&#xA;        // End important camera stuff&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MovementKeysPressed = function() {&#xD;&#xA;        // current state of the keyboard, stores for each key&#xD;&#xA;        // whether it's pressed or not&#xD;&#xA;        var keys = Keyboard.GetState();&#xD;&#xA;        return (keys.A.State == KeyState.Down || keys.D.State == KeyState.Down);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Vector4toVector3 = function(v4) {&#xD;&#xA;        var x=0, y=1, z=2, w=3&#xD;&#xA;        if (v4[w] == 1) {&#xD;&#xA;            return [v4[x], v4[y], v4[z]];&#xD;&#xA;        } else {&#xD;&#xA;            return [v4[x] / v4[w],&#xD;&#xA;                    v4[y] / v4[w],&#xD;&#xA;                    v4[z] / v4[w]];&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* Did camera-rotatey things in the code.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14351" PostHistoryTypeId="5" PostId="7159" RevisionGUID="229f1ff1-2f83-4d53-9605-e6c6c1b4e261" CreationDate="2011-01-08T03:38:02.943" UserId="2698" Comment="Replaced unnecessary Vector4 operations with Vector3 operations" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;I have no idea which language or framework you're using so I'm going to be using some C# and XNA here.&#xD;&#xA;&#xD;&#xA;    var keys = Keyboard.GetState();&#xD;&#xA;&#xD;&#xA;    if (MovementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // The important camera rotation stuff happens here&#xD;&#xA;&#xD;&#xA;        // Determine camera rotation. I am assuming that:&#xD;&#xA;        // g_eye is the camera's location,&#xD;&#xA;        // g_target is where it's looking,&#xD;&#xA;        // and they are both Vector3s&#xD;&#xA;        var up = [0, 1, 0];&#xD;&#xA;        var cameraRotationMatrix4 = g_math.matrix4.lookAt(g_eye, g_target, up);&#xD;&#xA;&#xD;&#xA;        // The rotation component of a 4D matrix is always the upper-left 3x3&#xD;&#xA;        var cameraRotation = g_math.getUpper3x3(cameraRotationMatrix4);&#xD;&#xA;&#xD;&#xA;        // Right now we're only doing *direction* of movement - working with 1s only.&#xD;&#xA;        // Speed comes after rotation.&#xD;&#xA;        var xMovement = 0;&#xD;&#xA;        if (keys.A.Down) xMovement -= 1;&#xD;&#xA;        if (keys.D.Down) xMovement += 1;&#xD;&#xA;        var movementVector = [delta * xMovement, 0, 0];&#xD;&#xA;        // Note that holding both A and D is possible and gets you nowhere.&#xD;&#xA;        &#xD;&#xA;        // Sets the vector's length to 1. You'll understand why this is important&#xD;&#xA;        // after we introduce speed.&#xD;&#xA;        var movementVector = g_math.normalize(movementVector);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera. &#xD;&#xA;        var realMovementVector = g_math.rowMajor.mulVectorMatrix(movementVector, cameraRotation);&#xD;&#xA;&#xD;&#xA;        // Now for speed. Let's take a ridiculous example speed of 42.&#xD;&#xA;        var speed = 42;&#xD;&#xA;        realMovementVector = g_math.mulVectorScalar(realMovementVector, speed);&#xD;&#xA;        // If you don't know what just happened:&#xD;&#xA;        // We created movementVector as a 1-unit long line (or had a magnitude of 1).&#xD;&#xA;        // After we rotated it, it still only had magnitude 1.&#xD;&#xA;        // By multiplying it by a scalar (aka integer), we multiplied its magnitude,&#xD;&#xA;        // which is now (1 x 42) = 42. It will now move 42 units either left or right&#xD;&#xA;        // of the camera (unless the player has both 'a' and 'd' held down).&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        // End important camera stuff&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MovementKeysPressed = function() {&#xD;&#xA;        // current state of the keyboard, stores for each key&#xD;&#xA;        // whether it's pressed or not&#xD;&#xA;        var keys = Keyboard.GetState();&#xD;&#xA;        return (keys.A.State == KeyState.Down || keys.D.State == KeyState.Down);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* Did camera-rotatey things in the code.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14352" PostHistoryTypeId="5" PostId="7159" RevisionGUID="54373658-af3d-49ba-a85d-e665c31a1224" CreationDate="2011-01-08T03:53:45.040" UserId="2698" Comment="Rewrote speed slightly" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;I have no idea which language or framework you're using so I'm going to be using some C# and XNA here.&#xD;&#xA;&#xD;&#xA;    var keys = Keyboard.GetState();&#xD;&#xA;&#xD;&#xA;    if (MovementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // The important camera rotation stuff happens here&#xD;&#xA;&#xD;&#xA;        // Determine camera rotation. I am assuming that:&#xD;&#xA;        // g_eye is the camera's location,&#xD;&#xA;        // g_target is where it's looking,&#xD;&#xA;        // and they are both Vector3s&#xD;&#xA;        var up = [0, 1, 0];&#xD;&#xA;        var cameraRotationMatrix4 = g_math.matrix4.lookAt(g_eye, g_target, up);&#xD;&#xA;&#xD;&#xA;        // The rotation component of a 4D transformation matrix is always&#xD;&#xA;        // the upper-left 3x3&#xD;&#xA;        var cameraRotation = g_math.getUpper3x3(cameraRotationMatrix4);&#xD;&#xA;&#xD;&#xA;        // Right now we're only doing *direction* of movement - working with 1s only.&#xD;&#xA;        // Speed comes after rotation.&#xD;&#xA;        var xMovement = 0;&#xD;&#xA;        if (keys.A.Down) xMovement -= 1;&#xD;&#xA;        if (keys.D.Down) xMovement += 1;&#xD;&#xA;        var movementVector = [delta * xMovement, 0, 0];&#xD;&#xA;        // Note that holding both A and D is possible and gets you nowhere.&#xD;&#xA;        &#xD;&#xA;        // Sets the vector's length to 1. You'll understand why this is important&#xD;&#xA;        // after we introduce speed.&#xD;&#xA;        var movementVector = g_math.normalize(movementVector);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera. &#xD;&#xA;        var realMovementVector = g_math.rowMajor.mulVectorMatrix(movementVector, cameraRotation);&#xD;&#xA;&#xD;&#xA;        // Now for speed.&#xD;&#xA;        // We earlier normalized movementVector to give it a magnitude (length) of 1.&#xD;&#xA;        // After we rotated it, it still only had magnitude of 1.&#xD;&#xA;        // Any movement would always create only 1 unit of movement in any direction.&#xD;&#xA;        // Let's say you want your character to move faster than that though!&#xD;&#xA;        // What if you want your character to move at 4.2 units per update?&#xD;&#xA;        // By multiplying it by a scalar (aka integer), we multiplied its magnitude,&#xD;&#xA;        // which is now (1 x 4.2) = 4.2. It will now move 4.2 units either left or right&#xD;&#xA;        // of the camera (unless the player has both 'a' and 'd' held down).&#xD;&#xA;        var speed = 4.2;&#xD;&#xA;        realMovementVector = g_math.mulVectorScalar(realMovementVector, speed);&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        // End important camera stuff&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MovementKeysPressed = function() {&#xD;&#xA;        // current state of the keyboard, stores for each key&#xD;&#xA;        // whether it's pressed or not&#xD;&#xA;        var keys = Keyboard.GetState();&#xD;&#xA;        return (keys.A.State == KeyState.Down || keys.D.State == KeyState.Down);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* Did camera-rotatey things in the code.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14353" PostHistoryTypeId="5" PostId="7132" RevisionGUID="a59154af-7ccb-455f-8c62-7bd11f46e233" CreationDate="2011-01-08T04:11:36.020" UserId="51" Comment="added 6 characters in body" Text="Use arcsin of the 2D cross product (i.e the z component of the cross product vector).  That'll give you -90 to 90 which will let you know whether to go left or right.&#xD;&#xA;&#xD;&#xA;Be careful because A cross B is not the same as B cross A.&#xD;&#xA;&#xD;&#xA;Another strategy (but probably not as straight forward) is to calculate the &quot;heading&quot; of the two vectors using atan2 and then figuring out whether A pointing at X degrees needs to go left or right to go to B pointing at y degrees." />
  <row Id="14354" PostHistoryTypeId="5" PostId="7137" RevisionGUID="386a216d-7fc9-4fcf-b7e4-e296ab500650" CreationDate="2011-01-08T07:19:59.073" UserId="2698" Comment="Added an int cast to fix a crash that would be caused by accessing an array using floating-point indices" Text="###Use World Coordinates###&#xD;&#xA;&#xD;&#xA;(Or as you put it, float everything.)&#xD;&#xA;&#xD;&#xA;World coordinates are what you generally work with, and there's plenty of reasons for that. They're the most simple and intuitive way of representing your position in the world, and the only way of really comparing the positions of any two entities in the same world.&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, one advantage is you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**The rest of this answer** will be an explanation of how to calculate the world block a player is in based on his world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.GetWidth() == 100;&#xD;&#xA;    Block.GetHeight() == 100;&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // Block[0][0] should be at position (0,0) in the world&#xD;&#xA;    // Block[2][5] should be at position (200,500) due to the width/height of a block&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = (int)(Player.Position.X / Block.GetWidth());&#xD;&#xA;        blockPosition.Y = (int)(Player.Position.Y / Block.GetHeight());&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;2 functions &gt; all the mess of within-block tracking and inter-block transferring&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="14355" PostHistoryTypeId="2" PostId="7172" RevisionGUID="3532a4b9-b6a1-48f4-9f69-c562197ea7eb" CreationDate="2011-01-08T07:22:12.057" UserId="4432" Text="i want to find the intersecting of 2 circle with radius r1 and r2 with very simple way.&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;Ganapathy" />
  <row Id="14356" PostHistoryTypeId="1" PostId="7172" RevisionGUID="3532a4b9-b6a1-48f4-9f69-c562197ea7eb" CreationDate="2011-01-08T07:22:12.057" UserId="4432" Text="How to Find two circle are intersect each other" />
  <row Id="14357" PostHistoryTypeId="3" PostId="7172" RevisionGUID="3532a4b9-b6a1-48f4-9f69-c562197ea7eb" CreationDate="2011-01-08T07:22:12.057" UserId="4432" Text="&lt;2d&gt;" />
  <row Id="14358" PostHistoryTypeId="6" PostId="6191" RevisionGUID="bf585629-f4fe-479f-b6bb-dd692327464c" CreationDate="2011-01-08T07:54:11.087" UserId="2698" Comment="edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;side-scroller&gt;" />
  <row Id="14359" PostHistoryTypeId="6" PostId="5906" RevisionGUID="d5c09d08-f63c-4072-bc10-b5fac48d9dbd" CreationDate="2011-01-08T07:54:25.207" UserId="2698" Comment="edited tags" Text="&lt;collision-detection&gt;" />
  <row Id="14360" PostHistoryTypeId="2" PostId="7173" RevisionGUID="f561c757-7b49-4736-ab62-3c487dccb791" CreationDate="2011-01-08T08:00:26.323" UserId="51" Text="Do you mean if the circles are overlapping?  That's easy, just figure out the distance between the two and compare it to the r1 and r2.  Or more specifically, calculate the squared distance between the two (it's faster) and compare it to (r1 + r2)^2.&#xD;&#xA;&#xD;&#xA;If you mean what the actual intersection points are of the two circles, then I don't know the math for that offhand." />
  <row Id="14361" PostHistoryTypeId="2" PostId="7174" RevisionGUID="b8acd5f5-8821-440e-a04b-8b076bd7e216" CreationDate="2011-01-08T09:35:21.993" UserId="2132" Text="I am currently working on a text based game, where the outcome of a combat round goes something like this&#xD;&#xA;&#xD;&#xA;    %attacker% inflicts a serious wound (12 points damage) on %defender%&#xD;&#xA;&#xD;&#xA;Right now, I just swap %attacker% with the name of the attacker, and %defender% for the name of the defender. However, the description works, but don't read correctly. Since the game is just all text, I don't want to resort to generic descriptions (Such as &quot;You use Attack on Goblin for 5 damage&quot;, which arguably solve the problem)&#xD;&#xA;&#xD;&#xA;How do I generate correct descriptions for cases where %attacker% refers to&#xD;&#xA;&#xD;&#xA; - &quot;You&quot;, the player? &quot;You inflicts...&quot; is wrong&#xD;&#xA; - &quot;Bees&quot;, or other plural? I need somehow to know I should prefix the name with a &quot;The &quot;&#xD;&#xA; - If %attacker% is a generic noun, such as &quot;Goblin&quot;, it will read weird as opposed to %attacker% being a name. Compare &quot;Goblin inflicts...&quot; vs. &quot;Aldraic Swordbringer inflicts....&quot;&#xD;&#xA;&#xD;&#xA;How does text-based games usually resolve such issues?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14362" PostHistoryTypeId="1" PostId="7174" RevisionGUID="b8acd5f5-8821-440e-a04b-8b076bd7e216" CreationDate="2011-01-08T09:35:21.993" UserId="2132" Text="Generating grammatically correct MUD-style attack descriptions" />
  <row Id="14363" PostHistoryTypeId="3" PostId="7174" RevisionGUID="b8acd5f5-8821-440e-a04b-8b076bd7e216" CreationDate="2011-01-08T09:35:21.993" UserId="2132" Text="&lt;games&gt;&lt;text-based&gt;" />
  <row Id="14364" PostHistoryTypeId="2" PostId="7175" RevisionGUID="f1a2affe-24b5-4ab0-b814-b5711fd760c5" CreationDate="2011-01-08T09:48:46.793" UserId="2698" Text="Tetrad covered general intersection in his post. Here I'll cover an algorithm that returns the specific points of intersection based on the formulae in [this concise article][1]. I'm matching my variable names to those in the article, so keep this diagram in mind - and probably in view too!&#xD;&#xA;&#xD;&#xA;![2][]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The language is Python. You can verify your results in [Wolfram Alpha][3] by running a query to determine the intersection of two circles like this:&#xD;&#xA;&#xD;&#xA;`intersection ((x - 0)^2 + (y - 0)^2 = 2^2), ((x - 1)^2 + (y - 0)^2 = 2^2)`&#xD;&#xA;&#xD;&#xA;or in the general case&#xD;&#xA;&#xD;&#xA;`intersection ((x - h)^2 + (y - k)^2 = r^2), ((x - h)^2 + (y - k)^2 = r^2)`&#xD;&#xA;&#xD;&#xA;where for each of the two circles, h = the x-coordinate of the centre of the circle, k = the y-coordinate, and r is the radius.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    from math import sqrt&#xD;&#xA;&#xD;&#xA;    def ip(P0, P1, r0, r1):&#xD;&#xA;        return IntersectPoints(P0, P1, r0, r1)&#xD;&#xA;&#xD;&#xA;    def IntersectPoints(P0, P1, r0, r1):&#xD;&#xA;        if type(P0) != complex or type(P1) != complex:&#xD;&#xA;            return&#xD;&#xA;        # d = distance&#xD;&#xA;        d = sqrt((P1.real - P0.real)**2 + (P1.imag - P0.imag)**2)&#xD;&#xA;        # n**2 in Python means &quot;n to the power of 2&quot;&#xD;&#xA;        # in the diagram, a and b combined form the line d&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        if d &gt; (r0 + r1):&#xD;&#xA;            # no collision&#xD;&#xA;            return False&#xD;&#xA;        elif d &lt; abs(r0 - r1):&#xD;&#xA;            # one circle is completely contained in the other, their edges do not intersect&#xD;&#xA;            return True&#xD;&#xA;        else:&#xD;&#xA;            # The lengths of a and b are in direct proportion to the ratio r1:r2&#xD;&#xA;            a = (r0**2 - r1**2 + d**2) / (2 * d) # d**2 means d squared in python&#xD;&#xA;            b = d - a&#xD;&#xA;            h = sqrt(r0**2 - a**2)&#xD;&#xA;            P2 = P0 + a * (P1 - P0) / d&#xD;&#xA;            &#xD;&#xA;            i1x = P2.real + h * (P1.imag - P0.imag) / d&#xD;&#xA;            i1y = P2.imag - h * (P1.real - P0.real) / d&#xD;&#xA;            i2x = P2.real - h * (P1.imag - P0.imag) / d&#xD;&#xA;            i2y = P2.imag + h * (P1.real - P0.real) / d&#xD;&#xA;&#xD;&#xA;            i1 = complex(i1x, i1y)&#xD;&#xA;            i2 = complex(i2x, i2y)&#xD;&#xA;&#xD;&#xA;            return [i1, i2]&#xD;&#xA;&#xD;&#xA;    def CompToStr(c):&#xD;&#xA;        return &quot;(&quot; + str(c.real) + &quot;, &quot; + str(c.imag) + &quot;)&quot;&#xD;&#xA;&#xD;&#xA;    def PairToStr(p):&#xD;&#xA;        return CompToStr(p[0]) + &quot; , &quot; + CompToStr(p[1])&#xD;&#xA;&#xD;&#xA;    def Test():&#xD;&#xA;        i = ip(complex(0,0), complex(1, 0), 2, 2)&#xD;&#xA;        s = ip(complex(0,0), complex(4, 0), 2, 2)&#xD;&#xA;&#xD;&#xA;        print &quot;Intersection:&quot;, PairToStr(i)&#xD;&#xA;        print &quot;Wholly inside:&quot;, ip(complex(0,0), complex(1, 0), 5, 2)&#xD;&#xA;        print &quot;Single-point edge collision:&quot;, PairToStr(s)&#xD;&#xA;        print &quot;No collision:&quot;, ip(complex(0,0), complex(5, 0), 2, 2)&#xD;&#xA;&#xD;&#xA;    Test()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that this algorithm uses the readily-available [complex][4] class for Python which can mimic a 2D Vector's `x` and `y` via the `complex.real` and `complex.imag` attributes. Mathematically speaking a complex _is_ a 2D vector on the imaginary plane, which is why this works, so programmatically only the syntax is different. Unfortunately `complex.real` and `complex.imag` are read-only attributes; you can't modify them.&#xD;&#xA;&#xD;&#xA;It's not optimal but I don't think Python natively has a proper geometric vector class. If you use a vector class with `.X` and `.Y` fields just change `.real` to `.X` and `.imag` to `.Y`.&#xD;&#xA;&#xD;&#xA;_Whether this was useful to you or not it was still fun. ;)_&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/&#xD;&#xA;[2]: http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/2circle1.gif &quot;Circle intersection diagram&quot;&#xD;&#xA;[3]: http://www.wolframalpha.com/&#xD;&#xA;[4]: http://docs.python.org/library/cmath.html" />
  <row Id="14365" PostHistoryTypeId="2" PostId="7176" RevisionGUID="53476689-f14d-4c10-9091-b083a91152f0" CreationDate="2011-01-08T09:52:27.723" UserId="3794" Text="I solved this. Problem was in releasing. You can't access compute shader's resources until it is fully unbind and released.&#xD;&#xA;&#xD;&#xA;    //code is shortened&#xD;&#xA;    //create UAV&#xD;&#xA;    D3D-&gt;CreateTexture2D( &amp;textureDesc, NULL, &amp;pTexture );&#xD;&#xA;    D3DD-&gt;CreateUnorderedAccessView( pTexture, &amp;viewDescUAV, &amp;pTextureUAV );&#xD;&#xA;    &#xD;&#xA;    D3DC-&gt;dispatch(...);&#xD;&#xA;    &#xD;&#xA;    pTextureUAV-&gt;release(); //first release UAV&#xD;&#xA;    outputTexH-&gt;SetUnorderedAccessView(NULL); //then shader variable (oposite order doesn't work)&#xD;&#xA;&#xD;&#xA;    effpass-&gt;Apply(0,D3DC); // unbind compute shader&#xD;&#xA;    &#xD;&#xA;    //create SRV on the texture, use it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14366" PostHistoryTypeId="5" PostId="7175" RevisionGUID="48c326c7-dc70-4657-af94-fb6f271e2dec" CreationDate="2011-01-08T10:11:25.727" UserId="2698" Comment="deleted 136 characters in body" Text="Tetrad covered general intersection in his post. Here I'll cover an algorithm that returns the specific points of intersection based on the formulae in [this concise article][1]. I'm matching my variable names to those in the article, so keep this diagram in mind - and probably in view too!&#xD;&#xA;&#xD;&#xA;![2][]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The language is Python. You can verify your results in [Wolfram Alpha][3] by running a query to determine the intersection of two circles like this:&#xD;&#xA;&#xD;&#xA;`intersection ((x - 0)^2 + (y - 0)^2 = 2^2), ((x - 1)^2 + (y - 0)^2 = 2^2)`&#xD;&#xA;&#xD;&#xA;or in the general case&#xD;&#xA;&#xD;&#xA;`intersection ((x - h)^2 + (y - k)^2 = r^2), ((x - h)^2 + (y - k)^2 = r^2)`&#xD;&#xA;&#xD;&#xA;where for each of the two circles, h = the x-coordinate of the centre of the circle, k = the y-coordinate, and r is the radius.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    from math import sqrt&#xD;&#xA;&#xD;&#xA;    def ip(P0, P1, r0, r1):&#xD;&#xA;        return IntersectPoints(P0, P1, r0, r1)&#xD;&#xA;&#xD;&#xA;    def IntersectPoints(P0, P1, r0, r1):&#xD;&#xA;        if type(P0) != complex or type(P1) != complex:&#xD;&#xA;            return&#xD;&#xA;        # d = distance&#xD;&#xA;        d = sqrt((P1.real - P0.real)**2 + (P1.imag - P0.imag)**2)&#xD;&#xA;        # n**2 in Python means &quot;n to the power of 2&quot;&#xD;&#xA;        # in the diagram, a and b combined form the line d&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        if d &gt; (r0 + r1):&#xD;&#xA;            # no collision&#xD;&#xA;            return False&#xD;&#xA;        elif d &lt; abs(r0 - r1):&#xD;&#xA;            # one circle is completely contained in the other, their edges do not intersect&#xD;&#xA;            return True&#xD;&#xA;        else:&#xD;&#xA;            # The lengths of a and b are in direct proportion to the ratio r1:r2&#xD;&#xA;            a = (r0**2 - r1**2 + d**2) / (2 * d) # d**2 means d squared in python&#xD;&#xA;            b = d - a&#xD;&#xA;            h = sqrt(r0**2 - a**2)&#xD;&#xA;            P2 = P0 + a * (P1 - P0) / d&#xD;&#xA;            &#xD;&#xA;            i1x = P2.real + h * (P1.imag - P0.imag) / d&#xD;&#xA;            i1y = P2.imag - h * (P1.real - P0.real) / d&#xD;&#xA;            i2x = P2.real - h * (P1.imag - P0.imag) / d&#xD;&#xA;            i2y = P2.imag + h * (P1.real - P0.real) / d&#xD;&#xA;&#xD;&#xA;            i1 = complex(i1x, i1y)&#xD;&#xA;            i2 = complex(i2x, i2y)&#xD;&#xA;&#xD;&#xA;            return [i1, i2]&#xD;&#xA;&#xD;&#xA;    def CompToStr(c):&#xD;&#xA;        return &quot;(&quot; + str(c.real) + &quot;, &quot; + str(c.imag) + &quot;)&quot;&#xD;&#xA;&#xD;&#xA;    def PairToStr(p):&#xD;&#xA;        return CompToStr(p[0]) + &quot; , &quot; + CompToStr(p[1])&#xD;&#xA;&#xD;&#xA;    def Test():&#xD;&#xA;        i = ip(complex(0,0), complex(1, 0), 2, 2)&#xD;&#xA;        s = ip(complex(0,0), complex(4, 0), 2, 2)&#xD;&#xA;&#xD;&#xA;        print &quot;Intersection:&quot;, PairToStr(i)&#xD;&#xA;        print &quot;Wholly inside:&quot;, ip(complex(0,0), complex(1, 0), 5, 2)&#xD;&#xA;        print &quot;Single-point edge collision:&quot;, PairToStr(s)&#xD;&#xA;        print &quot;No collision:&quot;, ip(complex(0,0), complex(5, 0), 2, 2)&#xD;&#xA;&#xD;&#xA;    Test()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that this algorithm uses the readily-available [complex][4] class for Python which can mimic a 2D Vector's `x` and `y` via the `complex.real` and `complex.imag` attributes respectively. Mathematically speaking a complex _is_ a 2D vector on the [complex plane][5], which is why this works, so programmatically only the syntax is different. It's not optimal but I don't think Python natively has a proper geometric vector class.&#xD;&#xA;&#xD;&#xA;_Whether this was useful to you or not it was still fun. ;)_&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/&#xD;&#xA;[2]: http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/2circle1.gif &quot;Circle intersection diagram&quot;&#xD;&#xA;[3]: http://www.wolframalpha.com/&#xD;&#xA;[4]: http://docs.python.org/library/cmath.html&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Complex_plane" />
  <row Id="14367" PostHistoryTypeId="2" PostId="7177" RevisionGUID="5d8d990b-5631-43b9-87d5-80d5ce92138a" CreationDate="2011-01-08T10:31:09.580" UserId="3630" Text="I really want to know how many game designers prefer to work with a huge table for all items, another table for all skills, and even another table for all mobs in a MMORPG. And these tables may grow to several hundred MBs with thousand records, but most records only use a few fields in a table.  &#xD;&#xA;I know some game designer works in this way. Are there any better method?" />
  <row Id="14368" PostHistoryTypeId="1" PostId="7177" RevisionGUID="5d8d990b-5631-43b9-87d5-80d5ce92138a" CreationDate="2011-01-08T10:31:09.580" UserId="3630" Text="Do you fill all your game data in huge excel tables? Are there any better method?" />
  <row Id="14369" PostHistoryTypeId="3" PostId="7177" RevisionGUID="5d8d990b-5631-43b9-87d5-80d5ce92138a" CreationDate="2011-01-08T10:31:09.580" UserId="3630" Text="&lt;game-design&gt;&lt;mmo&gt;&lt;data&gt;" />
  <row Id="14371" PostHistoryTypeId="6" PostId="7172" RevisionGUID="1ba5872c-b79b-432a-89db-c9fe155b8ad0" CreationDate="2011-01-08T11:23:18.293" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="14372" PostHistoryTypeId="2" PostId="7179" RevisionGUID="b9ac9120-3938-4c84-9b35-1142929a194b" CreationDate="2011-01-08T11:43:00.217" UserId="20" Text="I think it depends on how you're planning to render your graphics. Do you want to include animations? A playing board with a pseudo-3d-view?&#xD;&#xA;&#xD;&#xA;A top-down view is probably easiest and could be done using DOM and/or Canvas. Since DOM is supported in all major Browsers and jQuery offers a nice toolset (including animations) for DOM manipulation, I'd probably pick DOM over Canvas.&#xD;&#xA;&#xD;&#xA;Since this is a multiplayer game, you'll have to think about where to put the game logic. The best approach (which also prevents cheating) would be to keep all the game-logic on the server-side (programmed in PHP) and only have rendering logic and user-input in the clients.&#xD;&#xA;&#xD;&#xA;I don't know about any PHP framework that has a focus on game-development. I'd probably pick a multi-purpose framework like [Zend][1], [Cake][2], [Sapphire][3] or [Symfony][4]. This will let you focus on the implementation of the game-logic while it will already provide tools for data-persistence or handling of AJAX-request (which you'll probably use for communication).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://framework.zend.com/&#xD;&#xA;  [2]: http://cakephp.org/&#xD;&#xA;  [3]: http://silverstripe.org/sapphire/&#xD;&#xA;  [4]: http://www.symfony-project.org/" />
  <row Id="14373" PostHistoryTypeId="2" PostId="7180" RevisionGUID="2e091468-2e13-4e0e-a3d2-941d93b46448" CreationDate="2011-01-08T12:19:47.383" UserId="3794" Text="I didn't want to answer here, but when i saw another answer/comments i changed mind. SQL is not very good solution of this. SQL defines tables and inserts lots of data into that tables. This is not that case. When creating/testing game design you are mostly want to check if the huge system is balanced. That means lots of tables which affect each other. Nothing good for SQL actualy - or it is, but not easy to handle, bacause you have to do programming which is not necessary. And game designer doesn't have to know it.&#xD;&#xA;&#xD;&#xA;As game programmers/developers we can disdain excel and its usage for anything, but it is pretty good tool for this case, especialy when game designer can use it well and the document is well created. &#xD;&#xA;&#xD;&#xA;I cant recommend any other tool, but i can say that i know professional game designers who use excel too. So i assume it is common tool. " />
  <row Id="14374" PostHistoryTypeId="5" PostId="7172" RevisionGUID="884ea10d-cffc-41de-817b-aaea05b5598c" CreationDate="2011-01-08T13:09:07.213" UserId="20" Comment="removed hi and thanks, minor changes" Text="I want to find the intersecting of 2 circles with radius *r1* and *r2* (simple solutions preferred)." />
  <row Id="14375" PostHistoryTypeId="4" PostId="7172" RevisionGUID="884ea10d-cffc-41de-817b-aaea05b5598c" CreationDate="2011-01-08T13:09:07.213" UserId="20" Comment="removed hi and thanks, minor changes" Text="How to find out if two circles intersect each other" />
  <row Id="14376" PostHistoryTypeId="5" PostId="7159" RevisionGUID="2383384e-89e7-4584-944a-99a8583156b6" CreationDate="2011-01-08T13:32:45.580" UserId="2698" Comment="Moved delta to speed where it almost certainly belongs" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;I have no idea which language or framework you're using so I'm going to be using some C# and XNA here.&#xD;&#xA;&#xD;&#xA;    var keys = Keyboard.GetState();&#xD;&#xA;&#xD;&#xA;    if (MovementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // The important camera rotation stuff happens here&#xD;&#xA;&#xD;&#xA;        // Determine camera rotation. I am assuming that:&#xD;&#xA;        // g_eye is the camera's location,&#xD;&#xA;        // g_target is where it's looking,&#xD;&#xA;        // and they are both Vector3s&#xD;&#xA;        var up = [0, 1, 0];&#xD;&#xA;        var cameraRotationMatrix4 = g_math.matrix4.lookAt(g_eye, g_target, up);&#xD;&#xA;&#xD;&#xA;        // The rotation component of a 4D transformation matrix is always&#xD;&#xA;        // the upper-left 3x3&#xD;&#xA;        var cameraRotation = g_math.getUpper3x3(cameraRotationMatrix4);&#xD;&#xA;&#xD;&#xA;        // Right now we're only doing *direction* of movement - working with 1s only.&#xD;&#xA;        // Speed comes after rotation.&#xD;&#xA;        var xMovement = 0;&#xD;&#xA;        if (keys.A.Down) xMovement -= 1;&#xD;&#xA;        if (keys.D.Down) xMovement += 1;&#xD;&#xA;        var movementVector = [xMovement, 0, 0];&#xD;&#xA;        // Note that holding both A and D is possible and gets you nowhere.&#xD;&#xA;        &#xD;&#xA;        // Sets the vector's length to 1. You'll understand why this is important&#xD;&#xA;        // after we introduce speed.&#xD;&#xA;        var movementVector = g_math.normalize(movementVector);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera. &#xD;&#xA;        var realMovementVector = g_math.rowMajor.mulVectorMatrix(movementVector, cameraRotation);&#xD;&#xA;&#xD;&#xA;        // Now for speed.&#xD;&#xA;        // We earlier normalized movementVector to give it a magnitude (length) of 1.&#xD;&#xA;        // After we rotated it, it still only had magnitude of 1.&#xD;&#xA;        // Any movement would always create only 1 unit of movement in any direction.&#xD;&#xA;        // Let's say you want your character to move faster than that though!&#xD;&#xA;        // What if you want your character to move at 4.2 units per update?&#xD;&#xA;        // By multiplying it by a scalar (aka integer), we multiplied its magnitude,&#xD;&#xA;        // which is now (1 x 4.2) = 4.2. It will now move 4.2 units either left or right&#xD;&#xA;        // of the camera (unless the player has both 'a' and 'd' held down).&#xD;&#xA;        var speed = 4.2;&#xD;&#xA;        var speedThisStep = delta * speed;&#xD;&#xA;        realMovementVector = g_math.mulVectorScalar(realMovementVector, speedThisStep);&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        // End important camera stuff&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MovementKeysPressed = function() {&#xD;&#xA;        // current state of the keyboard, stores for each key&#xD;&#xA;        // whether it's pressed or not&#xD;&#xA;        var keys = Keyboard.GetState();&#xD;&#xA;        return (keys.A.State == KeyState.Down || keys.D.State == KeyState.Down);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* Did camera-rotatey things in the code.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14377" PostHistoryTypeId="5" PostId="7175" RevisionGUID="0bed564a-ae1a-499e-9e51-826385484c30" CreationDate="2011-01-08T13:49:28.130" UserId="2698" Comment="Diagram links to article" Text="Tetrad covered general intersection in his post. Here I'll cover an algorithm that returns the specific points of intersection based on the formulae in [this concise article][1]. I'm matching my variable names to those in the article, so keep this diagram in mind - and probably in view too!&#xD;&#xA;&#xD;&#xA;[![2][]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The language is Python. You can verify your results in [Wolfram Alpha][3] by running a query to determine the intersection of two circles like this:&#xD;&#xA;&#xD;&#xA;`intersection ((x - 0)^2 + (y - 0)^2 = 2^2), ((x - 1)^2 + (y - 0)^2 = 2^2)`&#xD;&#xA;&#xD;&#xA;or in the general case&#xD;&#xA;&#xD;&#xA;`intersection ((x - h)^2 + (y - k)^2 = r^2), ((x - h)^2 + (y - k)^2 = r^2)`&#xD;&#xA;&#xD;&#xA;where for each of the two circles, h = the x-coordinate of the centre of the circle, k = the y-coordinate, and r is the radius.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    from math import sqrt&#xD;&#xA;&#xD;&#xA;    # Determines whether two circles collide and, if applicable,&#xD;&#xA;    # the points at which their borders intersect.&#xD;&#xA;    # Based on an algorithm described by Paul Bourke:&#xD;&#xA;    # http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/&#xD;&#xA;    # Arguments:&#xD;&#xA;    #   P0 (complex): the centre point of the first circle&#xD;&#xA;    #   P1 (complex): the centre point of the second circle&#xD;&#xA;    #   r0 (numeric): radius of the first circle&#xD;&#xA;    #   r1 (numeric): radius of the second circle&#xD;&#xA;    # Returns:&#xD;&#xA;    #   False if the circles do not collide&#xD;&#xA;    #   True if one circle wholly contains another such that the borders&#xD;&#xA;    #       do not overlap, or overlap exactly (e.g. two identical circles)&#xD;&#xA;    #   An array of two complex numbers containing the intersection points&#xD;&#xA;    #       if the circle's borders intersect.&#xD;&#xA;    def IntersectPoints(P0, P1, r0, r1):&#xD;&#xA;        if type(P0) != complex or type(P1) != complex:&#xD;&#xA;            raise TypeError(&quot;P0 and P1 must be complex types&quot;)&#xD;&#xA;        # d = distance&#xD;&#xA;        d = sqrt((P1.real - P0.real)**2 + (P1.imag - P0.imag)**2)&#xD;&#xA;        # n**2 in Python means &quot;n to the power of 2&quot;&#xD;&#xA;        # note: d = a + b&#xD;&#xA;&#xD;&#xA;        if d &gt; (r0 + r1):&#xD;&#xA;            return False&#xD;&#xA;        elif d &lt; abs(r0 - r1):&#xD;&#xA;            return True&#xD;&#xA;        elif d == 0:&#xD;&#xA;            return True&#xD;&#xA;        else:&#xD;&#xA;            a = (r0**2 - r1**2 + d**2) / (2 * d)&#xD;&#xA;            b = d - a&#xD;&#xA;            h = sqrt(r0**2 - a**2)&#xD;&#xA;            P2 = P0 + a * (P1 - P0) / d&#xD;&#xA;&#xD;&#xA;            i1x = P2.real + h * (P1.imag - P0.imag) / d&#xD;&#xA;            i1y = P2.imag - h * (P1.real - P0.real) / d&#xD;&#xA;            i2x = P2.real - h * (P1.imag - P0.imag) / d&#xD;&#xA;            i2y = P2.imag + h * (P1.real - P0.real) / d&#xD;&#xA;&#xD;&#xA;            i1 = complex(i1x, i1y)&#xD;&#xA;            i2 = complex(i2x, i2y)&#xD;&#xA;&#xD;&#xA;            return [i1, i2]&#xD;&#xA;&#xD;&#xA;    def CompToStr(c):&#xD;&#xA;        return &quot;(&quot; + str(c.real) + &quot;, &quot; + str(c.imag) + &quot;)&quot;&#xD;&#xA;&#xD;&#xA;    def PairToStr(p):&#xD;&#xA;        return CompToStr(p[0]) + &quot; , &quot; + CompToStr(p[1])&#xD;&#xA;&#xD;&#xA;    def Test():&#xD;&#xA;        ip = IntersectPoints&#xD;&#xA;        &#xD;&#xA;        i = ip(complex(0,0), complex(1, 0), 2, 2)&#xD;&#xA;        s = ip(complex(0,0), complex(4, 0), 2, 2)&#xD;&#xA;&#xD;&#xA;        print &quot;Intersection:&quot;, PairToStr(i)&#xD;&#xA;        print &quot;Wholly inside:&quot;, ip(complex(0,0), complex(1, 0), 5, 2)&#xD;&#xA;        print &quot;Single-point edge collision:&quot;, PairToStr(s)&#xD;&#xA;        print &quot;No collision:&quot;, ip(complex(0,0), complex(5, 0), 2, 2)&#xD;&#xA;&#xD;&#xA;    Test()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that this algorithm uses the readily-available [complex][4] class for Python which can mimic a 2D Vector's `x` and `y` via the `complex.real` and `complex.imag` attributes respectively. Mathematically speaking a complex _is_ a 2D vector on the [complex plane][5], which is why this works, so programmatically only the syntax is different. It's not optimal but I don't think Python natively has a proper geometric vector class.&#xD;&#xA;&#xD;&#xA;_Whether this was useful to you or not it was still fun. ;)_&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/&#xD;&#xA;[2]: http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/2circle1.gif &quot;Circle intersection diagram&quot;&#xD;&#xA;[3]: http://www.wolframalpha.com/&#xD;&#xA;[4]: http://docs.python.org/library/cmath.html&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Complex_plane" />
  <row Id="14378" PostHistoryTypeId="2" PostId="7181" RevisionGUID="d2db7b17-f744-43ba-b800-660f49959aba" CreationDate="2011-01-08T14:05:11.557" UserId="4011" Text="Since your goal is to experiment with Javascript, I suggest you to take a look on [Node.js][1] for the server side. It's well suited for what you're trying to do because you can build a realtime server through websocket quite easily and stay DRY. &#xD;&#xA;Your backgammon logic will be wrote only one time and shared both client and server side (for anti-cheating / game rules validation)&#xD;&#xA;&#xD;&#xA;Search for chess games build on these technology.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nodejs.org/" />
  <row Id="14380" PostHistoryTypeId="2" PostId="7182" RevisionGUID="d0d77ccd-a985-4c4d-95d0-2de9c0e961a7" CreationDate="2011-01-08T14:10:57.357" UserId="4508" Text="this is my method for lighting:&#xD;&#xA;&#xD;&#xA;    private void lights(GL gl) {&#xD;&#xA;		float[] LightPos = {0.0f, 0.0f, -1.0f, 1.0f};&#xD;&#xA;		float[] LightAmb = {0.2f, 0.2f, 0.2f, 1.0f};&#xD;&#xA;		float[] LightDif = {0.6f, 0.6f, 0.6f, 1.0f};&#xD;&#xA;		float[] LightSpc = {0.9f, 0.9f, 0.9f, 1.0f};&#xD;&#xA;&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_POSITION, LightPos, 0);&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_AMBIENT, LightAmb, 0);&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_DIFFUSE, LightDif, 0);&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_SPECULAR, LightSpc, 0);&#xD;&#xA;&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, LightSpc, 0);&#xD;&#xA;&#xD;&#xA;		gl.glEnable(GL.GL_LIGHT0);&#xD;&#xA;		gl.glEnable(GL.GL_LIGHT1);&#xD;&#xA;		gl.glShadeModel(GL.GL_SMOOTH);&#xD;&#xA;		gl.glEnable(GL.GL_LIGHTING);  &#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and i see my objects flat, no specular light.. any ideas?&#xD;&#xA;&#xD;&#xA;ps. to render my objects:&#xD;&#xA;&#xD;&#xA;    gl.glColor3f(1f,0f,0f);&#xD;&#xA;	gl.glBegin(GL.GL_TRIANGLES);&#xD;&#xA;	for(Triangle t : tubeModel.getTriangles()) {&#xD;&#xA;		gl.glVertex3f(t.v1.x, t.v1.y, t.v1.z);&#xD;&#xA;		gl.glVertex3f(t.v2.x, t.v2.y, t.v2.z);&#xD;&#xA;		gl.glVertex3f(t.v3.x, t.v3.y, t.v3.z);&#xD;&#xA;	}&#xD;&#xA;	gl.glEnd();" />
  <row Id="14381" PostHistoryTypeId="1" PostId="7182" RevisionGUID="d0d77ccd-a985-4c4d-95d0-2de9c0e961a7" CreationDate="2011-01-08T14:10:57.357" UserId="4508" Text="why specular light is not running?" />
  <row Id="14382" PostHistoryTypeId="3" PostId="7182" RevisionGUID="d0d77ccd-a985-4c4d-95d0-2de9c0e961a7" CreationDate="2011-01-08T14:10:57.357" UserId="4508" Text="&lt;opengl&gt;&lt;lighting&gt;" />
  <row Id="14383" PostHistoryTypeId="2" PostId="7183" RevisionGUID="c60e725f-7d84-41f9-b67b-a179b2c9b287" CreationDate="2011-01-08T14:12:45.630" UserId="2472" Text="The %attacker% approach can be extended to include some information other than just the names of the objects:&#xD;&#xA;&#xD;&#xA; 1. The verb may be singular or plural. This depends on the subject. &quot;You **attack** X&quot; (singular 2nd person subject) vs. &quot;Extrakun **attacks** X&quot; (singular 3rd person subject) vs. &quot;The goblins **attack** X&quot; (plural 3rd person subject). Most verbs just need an `-s` added but there are a few exceptions.&#xD;&#xA; 1. The noun may be a proper noun (&quot;**Goblin** attacks X&quot;) or a common noun (&quot;**A goblin** attacks X&quot;). Common nouns starting with a vowel sound should use &quot;an&quot; instead of &quot;a&quot;. It may be a common noun but having only one instance in the current context (&quot;**The goblin** attacks X&quot;). &#xD;&#xA; 1. The noun may vary in number, from zero (&quot;You hit **no goblins**&quot;) to one (&quot;You hit **one goblin**&quot;) to many (&quot;You hit **three goblins**&quot;). Many nouns just need an `-s` or `-es` added but there are many exceptions.&#xD;&#xA; 1. Subjects and objects may be simple (&quot;**A goblin**&quot;) or compound (&quot;**A goblin and her brother**&quot;).&#xD;&#xA; 1. Common nouns at the beginning of the sentence need to be capitalized, but if the noun has an article or if it's compound you want to only capitalize the first word. Proper nouns are always capitalized.&#xD;&#xA; 1. The subject position (&quot;**She** hit the goblin&quot;) and object position (&quot;The goblin hit **her**&quot;) use different pronouns.&#xD;&#xA; 1. Possessives can be generated by adding `'s` if singular (&quot;A **goblin's** axe&quot;), `'` if plural (&quot;Two **goblins'** axes&quot;), but pronouns have their own rules (&quot;**Your** axe&quot;).&#xD;&#xA;&#xD;&#xA;For English, I wrote Python a text generation library derived from a MUD called JaysHouseMOO. Feel free to study or copy [the code][1].  It doesn't have a good library of exceptional cases; you'll have to add that with the words used in your game. I'm afraid my ported code isn't extensively tested. It might also need more cases added for games (it was designed for a social MUD, not a gaming MUD).&#xD;&#xA;&#xD;&#xA;Your example would be written as `&quot;%1I %1:(inflicts) a serious wound (%2n damage) on %3i&quot;`.  The numbers `%1`, `%2`, `%3` tell it which object is to be substituted; `I`/`i` tell it to add an indirect article (&quot;a&quot;, &quot;an&quot;) if needed; `n` tells it to display the noun without articles; `:(inflicts)` tells it to conjugate the verb for that object.&#xD;&#xA;&#xD;&#xA;Here's the output to show to the attacker, the defender, and to everyone else:&#xD;&#xA;&#xD;&#xA;    $ python&#xD;&#xA;    &gt;&gt;&gt; import msg&#xD;&#xA;    &gt;&gt;&gt; m = &quot;%1I %1:(inflicts) a serious wound (%2n damage) on %3i.&quot;&#xD;&#xA;    &gt;&gt;&gt; attacker = msg.GenderedObject('Amit', 'm', 'proper')&#xD;&#xA;    &gt;&gt;&gt; defender = msg.GenderedObject('goblin', 'm', 'unique')&#xD;&#xA;    &gt;&gt;&gt; points = (12, 'point')&#xD;&#xA;    &gt;&gt;&gt; msg.Msg().sub_parties({1: attacker, 2: points, 3: defender}, &#xD;&#xA;                              m, [attacker, defender])&#xD;&#xA;    (['You inflict a serious wound (12 points damage) on the goblin.', &#xD;&#xA;      'Amit inflicts a serious wound (12 points damage) on you.'], &#xD;&#xA;     'Amit inflicts a serious wound (12 points damage) on the goblin.')&#xD;&#xA;&#xD;&#xA;Note if you had given it `(1, 'point')` it would have printed &quot;1 point&quot; instead of &quot;1 points&quot;.  That's something that bugs me in game text, so I made sure to include a feature to make it easy to print that properly.&#xD;&#xA;&#xD;&#xA;Here's another example, with compound nouns, and &quot;a&quot; vs. &quot;an&quot;:&#xD;&#xA;&#xD;&#xA;    &gt;&gt;&gt; m = &quot;%1I %1:(hits) %2'n %2'(head).&quot;&#xD;&#xA;    &gt;&gt;&gt; a1 = msg.GenderedObject('goblin', 'm', 'normal')&#xD;&#xA;    &gt;&gt;&gt; a2 = msg.GenderedObject('orc', 'm', 'normal')&#xD;&#xA;    &gt;&gt;&gt; d1 = msg.GenderedObject('Amit', 'm', 'proper')&#xD;&#xA;    &gt;&gt;&gt; d2 = msg.GenderedObject('Extrakun', 'm', 'proper')&#xD;&#xA;    &gt;&gt;&gt; msg.Msg().sub_parties({1: [a1, a2], 2: [d1, d2]}, m, [d1, d2])&#xD;&#xA;    ([&quot;A goblin and an orc hit your and Extrakun's heads.&quot;, &#xD;&#xA;      &quot;A goblin and an orc hit Amit's and your heads.&quot;], &#xD;&#xA;     &quot;A goblin and an orc hit Amit's and Extrakun's heads.&quot;)&#xD;&#xA;&#xD;&#xA;These examples are in English, and only track male/female, pronouns, singular/plural verbs/nouns, and proper/common nouns. What you need to track will vary across languages and the type of text in your game. In Spanish there are formal and informal pronouns. Several languages have masculine and feminine forms of verbs. Japanese pronouns depend on the status of the subject relative to the object. In some languages the [verb conjugation][2] can implicitly include the subject. Determine all the kinds of text you want to generate and the languages you want to translate to, and that'll tell you what you need to track in your game objects. When you're creating the content, you can include the necessary annotations and exceptional cases. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://theory.stanford.edu/~amitp/Python/code/msg.py&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Grammatical_conjugation" />
  <row Id="14388" PostHistoryTypeId="16" PostId="7159" RevisionGUID="b6373074-81e8-4e0a-ad98-80f2526c9805" CreationDate="2011-01-08T15:05:50.067" UserId="2698" />
  <row Id="14389" PostHistoryTypeId="5" PostId="7159" RevisionGUID="b6373074-81e8-4e0a-ad98-80f2526c9805" CreationDate="2011-01-08T15:05:50.067" UserId="2698" Comment="added 9 characters in body" Text="###Code quality first and foremost###&#xD;&#xA;&#xD;&#xA;That's a lot of duplicated code you've got going on there. If you've got duplicated code, you need to do it differently - duplicated code is dangerous (you'll change one side but forget to change the other and get logic errors).&#xD;&#xA;&#xD;&#xA;* If you've got duplicated code down both ends of a conditional, take it out of the conditional.&#xD;&#xA;* If you still need to only execute it conditionally (e.g. when the key is a or d) wrap it all in its own conditional.&#xD;&#xA;* Consider helper methods.&#xD;&#xA;&#xD;&#xA;###Now the answer###&#xD;&#xA;&#xD;&#xA;What you need is to get the Camera's rotation matrix: the exact direction it's pointing.&#xD;&#xA;&#xD;&#xA;If the classes you're working with can return that from the camera itself, great! If it can't, you can calculate it based on the camera position and target - [see here](http://forums.create.msdn.com/forums/p/28346/28346.aspx) for one way to do that.&#xD;&#xA;&#xD;&#xA;Once you have the camera's rotation matrix, you can just set up the movement vector then rotate it to point in the camera's direction using its rotation matrix.&#xD;&#xA;&#xD;&#xA;The advantage of this approach is you can instantiate one general movement matrix, throw in all the vertical, horizontal and forward movement for your character in that update, do all the calculations you'd like on all of it then you do one rotation to face the camera and make that movement happen all at once.&#xD;&#xA;&#xD;&#xA;I have no idea which language or framework you're using so I'm going to be using some C# and XNA here.&#xD;&#xA;&#xD;&#xA;    var keys = Keyboard.GetState();&#xD;&#xA;&#xD;&#xA;    if (MovementKeysPressed())&#xD;&#xA;    {&#xD;&#xA;        var eyeOriginal = g_eye;&#xD;&#xA;        var targetOriginal = g_target;&#xD;&#xA;        var viewEye = g_math.subVector(g_eye, g_target);&#xD;&#xA;        var viewTarget = g_math.subVector(g_target, g_eye);&#xD;&#xA;&#xD;&#xA;        // The important camera rotation stuff happens here&#xD;&#xA;&#xD;&#xA;        // Determine camera rotation. I am assuming that:&#xD;&#xA;        // g_eye is the camera's location,&#xD;&#xA;        // g_target is where it's looking,&#xD;&#xA;        // and they are both Vector3s&#xD;&#xA;        var up = [0, g_up[1]*-1, 0];&#xD;&#xA;        var cameraRotationMatrix4 = g_math.matrix4.lookAt(g_eye, g_target, up);&#xD;&#xA;&#xD;&#xA;        // The rotation component of a 4D transformation matrix is always&#xD;&#xA;        // the upper-left 3x3&#xD;&#xA;        var cameraRotation = g_math.getUpper3x3(cameraRotationMatrix4);&#xD;&#xA;&#xD;&#xA;        // Right now we're only doing *direction* of movement - working with 1s only.&#xD;&#xA;        // Speed comes after rotation.&#xD;&#xA;        var xMovement = 0;&#xD;&#xA;        if (keys.A.Down) xMovement -= 1;&#xD;&#xA;        if (keys.D.Down) xMovement += 1;&#xD;&#xA;        var movementVector = [xMovement, 0, 0];&#xD;&#xA;        // Note that holding both A and D is possible and gets you nowhere.&#xD;&#xA;        &#xD;&#xA;        // Sets the vector's length to 1. You'll understand why this is important&#xD;&#xA;        // after we introduce speed.&#xD;&#xA;        var movementVector = g_math.normalize(movementVector);&#xD;&#xA;        &#xD;&#xA;        // rotate movement to face camera. &#xD;&#xA;        var realMovementVector = g_math.rowMajor.mulVectorMatrix(movementVector, cameraRotation);&#xD;&#xA;&#xD;&#xA;        // Now for speed.&#xD;&#xA;        // We earlier normalized movementVector to give it a magnitude (length) of 1.&#xD;&#xA;        // After we rotated it, it still only had magnitude of 1.&#xD;&#xA;        // Any movement would always create only 1 unit of movement in any direction.&#xD;&#xA;        // Let's say you want your character to move faster than that though!&#xD;&#xA;        // What if you want your character to move at 4.2 units per update?&#xD;&#xA;        // By multiplying it by a scalar (aka integer), we multiplied its magnitude,&#xD;&#xA;        // which is now (1 x 4.2) = 4.2. It will now move 4.2 units either left or right&#xD;&#xA;        // of the camera (unless the player has both 'a' and 'd' held down).&#xD;&#xA;        var speed = 4.2;&#xD;&#xA;        var speedThisStep = delta * speed;&#xD;&#xA;        realMovementVector = g_math.mulVectorScalar(realMovementVector, speedThisStep);&#xD;&#xA;        &#xD;&#xA;        viewEye = g_math.addVector(realMovementVector, viewEye);&#xD;&#xA;        viewTarget = g_math.addVector(realMovementVector, viewTarget);&#xD;&#xA;&#xD;&#xA;        // End important camera stuff&#xD;&#xA;&#xD;&#xA;        g_eye = g_math.addVector(viewEye, targetOriginal);&#xD;&#xA;        g_target = g_math.addVector(viewTarget, eyeOriginal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MovementKeysPressed = function() {&#xD;&#xA;        // current state of the keyboard, stores for each key&#xD;&#xA;        // whether it's pressed or not&#xD;&#xA;        var keys = Keyboard.GetState();&#xD;&#xA;        return (keys.A.State == KeyState.Down || keys.D.State == KeyState.Down);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Changes:&#xD;&#xA;&#xD;&#xA;* Complete refactor&#xD;&#xA;* Did camera-rotatey things in the code.&#xD;&#xA;* Changed the first argument in the last two occurrences of `viewEye` and `viewTarget`" />
  <row Id="14390" PostHistoryTypeId="2" PostId="7186" RevisionGUID="254fb859-5bb4-4b29-bace-1f3620bb4c38" CreationDate="2011-01-08T15:43:26.523" UserId="1156" Text="I found some code for a Python octree implementation [here][1], by simply googling 'octree python'. ;D&#xD;&#xA;&#xD;&#xA;It is not library dependent (though originally written for PyOgre) and is well commented.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.activestate.com/recipes/498121-python-octree-implementation/" />
  <row Id="14395" PostHistoryTypeId="2" PostId="7189" RevisionGUID="1a82551c-1929-41a0-8d37-80fa8500003b" CreationDate="2011-01-08T17:19:36.437" UserId="4508" Text="i'm getting started with glsl with quartz composer.&#xD;&#xA;i have a patch with a particle system in which each particle is mapped into a sphere with a blend value. with blend=0 particles are in random positions, blend=1 particles are in the sphere. the code is here:&#xD;&#xA;&#xD;&#xA;        vec3 sphere(vec2 domain)&#xD;&#xA;    {&#xD;&#xA;        vec3 range;&#xD;&#xA;        range.x = radius * cos(domain.y) * sin(domain.x);&#xD;&#xA;        range.y = radius * sin(domain.y) * sin(domain.x);&#xD;&#xA;        range.z = radius * cos(domain.x);&#xD;&#xA;        return range;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // in main:&#xD;&#xA;&#xD;&#xA;        normal = sphere(p0); * blend + gl_Normal * (1.0 - blend);&#xD;&#xA;&#xD;&#xA;i'd like the particle to be on a cube if blend=0&#xD;&#xA;&#xD;&#xA;i've tried to find but i can't figure out some parametric equation for the cube.&#xD;&#xA;mayebe it is not the right way?" />
  <row Id="14396" PostHistoryTypeId="1" PostId="7189" RevisionGUID="1a82551c-1929-41a0-8d37-80fa8500003b" CreationDate="2011-01-08T17:19:36.437" UserId="4508" Text="morph a sphere to a cube and a a cube to a sphere with GLSL" />
  <row Id="14397" PostHistoryTypeId="3" PostId="7189" RevisionGUID="1a82551c-1929-41a0-8d37-80fa8500003b" CreationDate="2011-01-08T17:19:36.437" UserId="4508" Text="&lt;glsl&gt;&lt;geometry&gt;" />
  <row Id="14398" PostHistoryTypeId="2" PostId="7190" RevisionGUID="1fbc7e4b-47c3-429a-af11-459e0f16d757" CreationDate="2011-01-08T17:21:08.873" UserId="191" Text="Excel may be a very good solution. I had been wondering how this should be done. But thinking about it, Excel is a very popular tool and quite adequate for this duty. I would not recommend any actual database because, as notabene suggests, there is a **lot** of extra overhead that you really don't need. I see a couple of options, one of which is akin to using Excel:&#xD;&#xA;&#xD;&#xA; - Open Office Calc: free&#xD;&#xA; - serialized data: either XML or&#xD;&#xA;   binary, either way, free and you have&#xD;&#xA;   complete control  &#xD;&#xA;&#xD;&#xA;I personally would be inclined to go with binary serialized data. Two reasons:&#xD;&#xA;&#xD;&#xA; - game data cannot be easily tampered&#xD;&#xA;   with&#xD;&#xA; - I can work with datatables rather&#xD;&#xA;   than Xml serialization of datasets,&#xD;&#xA;   i.e. **I** have the option.  &#xD;&#xA;&#xD;&#xA;Is there a need for a dedicated, true game-oriented *data library*? Maybe...unless someone knows of such a library already in existence." />
  <row Id="14399" PostHistoryTypeId="5" PostId="7190" RevisionGUID="caee1b5e-9e9d-462e-910a-f60a1cd041ac" CreationDate="2011-01-08T17:26:15.747" UserId="191" Comment="deleted 2 characters in body; added 317 characters in body" Text="Excel is an excellent solution. I had been wondering how this should be done. But thinking about it, Excel is a very popular tool and quite adequate for this duty. I would not recommend any actual database because, as @notabene suggests, there is a **lot** of extra overhead that you really don't need. I see a couple of options, one of which is akin to using Excel:&#xD;&#xA;&#xD;&#xA; - Open Office Calc: free&#xD;&#xA; - serialized data: either XML or&#xD;&#xA;   binary, either way, free and you have&#xD;&#xA;   complete control  &#xD;&#xA;&#xD;&#xA;I personally would be inclined to go with binary serialized data. Two reasons:&#xD;&#xA;&#xD;&#xA; - game data cannot be easily tampered&#xD;&#xA;   with&#xD;&#xA; - I can work with datatables rather&#xD;&#xA;   than Xml serialization of datasets,&#xD;&#xA;   i.e. **I** have the option.  &#xD;&#xA;&#xD;&#xA;Is there a need for a dedicated, true game-oriented *data library*? Maybe...unless someone knows of such a library already in existence.  &#xD;&#xA;&#xD;&#xA;To the point of the OP's question, look at each *page* as a single data table - akin to a table in a database. Each page should contain related data:&#xD;&#xA;&#xD;&#xA; - Skills&#xD;&#xA; - Gear&#xD;&#xA; - NPCs&#xD;&#xA;&#xD;&#xA;This helps you keep a high level of organization which will be very important as data content grows, game content expands, etc." />
  <row Id="14402" PostHistoryTypeId="2" PostId="7191" RevisionGUID="14cf5495-453c-49af-8fc6-3837dc379a01" CreationDate="2011-01-08T18:27:42.653" UserId="1829" Text="I have heard about the GPX, but i don't really think the embedded market is mature enough in terms of performance, but what about the home console market ?&#xD;&#xA;&#xD;&#xA;I'm not talking about last-generation graphics, because that would be economically impossible, but what about an hardware as fast as a playstation 2/Xbox 1/Gamecube ?&#xD;&#xA;&#xD;&#xA;For games, the trick would be to ask some editors to recompile their best sellers  for the new machine: those games being from the PSX age or even older console generations, I think this would have a very low cost job and they could still make some good profit, but I need to know if this is doable technically, considering the architecture which can be quite exotic.&#xD;&#xA;&#xD;&#xA;Do you think it would be a viable project to talk about to investors ?" />
  <row Id="14403" PostHistoryTypeId="1" PostId="7191" RevisionGUID="14cf5495-453c-49af-8fc6-3837dc379a01" CreationDate="2011-01-08T18:27:42.653" UserId="1829" Text="Has an open console any chance to give more strength to the indie game world ?" />
  <row Id="14404" PostHistoryTypeId="3" PostId="7191" RevisionGUID="14cf5495-453c-49af-8fc6-3837dc379a01" CreationDate="2011-01-08T18:27:42.653" UserId="1829" Text="&lt;open-source&gt;&lt;project-management&gt;&lt;game-industry&gt;" />
  <row Id="14405" PostHistoryTypeId="2" PostId="7192" RevisionGUID="dcfec768-1710-4997-9e97-a2f7a6352a16" CreationDate="2011-01-08T18:48:50.680" UserId="3175" Text="So long as the nature of your data permits it to be stored in a spreadsheet without jumping through too many hoops it makes a very good format, especially for development work.  In the end you may want to store it in other formats for use but the spreadsheet gives you a very powerful editor which can be *VERY* nice if you decide to change how you handle something!&#xD;&#xA;&#xD;&#xA;If you're using Excel go get a copy of ASAP utilities--it makes the spreadsheet into an even better editor." />
  <row Id="14406" PostHistoryTypeId="2" PostId="7193" RevisionGUID="b7e4de29-233a-4a2d-a8b5-5392b864d7c4" CreationDate="2011-01-08T18:57:33.887" UserId="3175" Text="Do you really need the actual intersection area or do you just need to know if you're in the intersection area?  The latter is easier to solve--if you're closer than the radius to both centers you're in the intersection area." />
  <row Id="14407" PostHistoryTypeId="2" PostId="7194" RevisionGUID="5b2397b8-e812-4c7f-8031-4fc68478b334" CreationDate="2011-01-08T19:26:33.280" UserId="3794" Text="You have to set up material.  &#xD;&#xA;Enable material:&#xD;&#xA;&#xD;&#xA;    glEnable(GL_COLOR_MATERIAL);&#xD;&#xA;&#xD;&#xA;Set ambient and diffuse to read from what you set in glColor:&#xD;&#xA;&#xD;&#xA;    glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);&#xD;&#xA;&#xD;&#xA;Setup specular. For complete specular you have to have defined specular reflective color and shinines.&#xD;&#xA;&#xD;&#xA;    float specReflection[] = { 0.8f, 0.8f, 0.8f, 1.0f };&#xD;&#xA;    glMaterialfv(GL_FRONT, GL_SPECULAR, specReflection)&#xD;&#xA;    glMateriali(GL_FRONT, GL_SHININESS, 56);&#xD;&#xA;&#xD;&#xA;Shinines is between 1 - 128. Bigger value = more bright. &#xD;&#xA;" />
  <row Id="14408" PostHistoryTypeId="2" PostId="7195" RevisionGUID="7735a241-c281-4398-92e3-37e371962dba" CreationDate="2011-01-08T19:27:40.197" UserId="659" Text="Adding an answer myself - as I ended up using this: http://sourceforge.net/projects/polyclipping/ - rather than attempting an implementation from scratch.&#xD;&#xA;&#xD;&#xA;So far it's doing the job quite nicely, and it was very easy to get use (with C#)&#xD;&#xA;&#xD;&#xA;Wikipedia has links to a fair bit of information on the subject, once I started searching using the right terminology: http://en.wikipedia.org/wiki/Boolean_operations_on_polygons" />
  <row Id="14409" PostHistoryTypeId="5" PostId="7190" RevisionGUID="08b0d675-5fc3-4e93-8e75-2652da8873d7" CreationDate="2011-01-08T19:30:01.380" UserId="191" Comment="added link" Text="Excel is an excellent solution. I had been wondering how this should be done. But thinking about it, Excel is a very popular tool and quite adequate for this duty. I would not recommend any actual database because, as @notabene suggests, there is a **lot** of extra overhead that you really don't need. I see a couple of options, one of which is akin to using Excel:&#xD;&#xA;&#xD;&#xA; - Open Office Calc: free. There is also a [MySql connector][1] download (open source I believe) for Calc.&#xD;&#xA; - serialized data: either XML or&#xD;&#xA;   binary, either way, free and you have&#xD;&#xA;   complete control  &#xD;&#xA;&#xD;&#xA;I personally would be inclined to go with binary serialized data. Two reasons:&#xD;&#xA;&#xD;&#xA; - game data cannot be easily tampered&#xD;&#xA;   with&#xD;&#xA; - I can work with datatables rather&#xD;&#xA;   than Xml serialization of datasets,&#xD;&#xA;   i.e. **I** have the option.  &#xD;&#xA;&#xD;&#xA;Is there a need for a dedicated, true game-oriented *data library*? Maybe...unless someone knows of such a library already in existence.  &#xD;&#xA;&#xD;&#xA;To the point of the OP's question, look at each *page* as a single data table - akin to a table in a database. Each page should contain related data:&#xD;&#xA;&#xD;&#xA; - Skills&#xD;&#xA; - Gear&#xD;&#xA; - NPCs&#xD;&#xA;&#xD;&#xA;This helps you keep a high level of organization which will be very important as data content grows, game content expands, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://extensions.services.openoffice.org/en/project/mysql_connector" />
  <row Id="14410" PostHistoryTypeId="2" PostId="7196" RevisionGUID="680abe0f-37dc-4865-84a7-a03ffa52be36" CreationDate="2011-01-08T19:42:30.803" UserId="659" Text="I strongly suspect that there's simply no market for it. (Except for a small number of geeks/developers that would be attracted to any new and open hardware)&#xD;&#xA;&#xD;&#xA;There's plenty of devices out there that can play games very well, many of which are open, or 'open enough' for indies. We can already develop for a wide variety of computers, phones, and tablets.&#xD;&#xA;&#xD;&#xA;Whilst consoles are much more limited, we do already have Xbox Indie Games (XNA), and there's active homebrew scenes for some of the older consoles such as the Dreamcast (and I wouldn't be surprised if we see a thriving PS3 homebrew scene soon?)&#xD;&#xA;&#xD;&#xA;I suspect that in the future, we'll see a mainstream 'box under the TV', maybe a future iteration of something like Apple TV, that's not a traditional console, but is good at playing casual/less demanding games, and has an app store which is reasonably open to indie devlopers." />
  <row Id="14411" PostHistoryTypeId="5" PostId="7194" RevisionGUID="dd29de66-a9ea-4003-9902-80a85e724857" CreationDate="2011-01-08T20:15:02.150" UserId="3794" Comment="add links" Text="You have to set up material.  &#xD;&#xA;Enable material:&#xD;&#xA;&#xD;&#xA;    glEnable(GL_COLOR_MATERIAL);&#xD;&#xA;&#xD;&#xA;Set ambient and diffuse to read from what you set in glColor:&#xD;&#xA;&#xD;&#xA;    glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);&#xD;&#xA;&#xD;&#xA;Setup specular. For complete specular you have to have defined specular reflective color and shinines.&#xD;&#xA;&#xD;&#xA;    float specReflection[] = { 0.8f, 0.8f, 0.8f, 1.0f };&#xD;&#xA;    glMaterialfv(GL_FRONT, GL_SPECULAR, specReflection)&#xD;&#xA;    glMateriali(GL_FRONT, GL_SHININESS, 56);&#xD;&#xA;&#xD;&#xA;Shinines is between 1 - 128. Bigger value = more bright. &#xD;&#xA;&#xD;&#xA;You can find more help on these links:  &#xD;&#xA;http://www.falloutsoftware.com/tutorials/gl/gl8.htm  &#xD;&#xA;http://www.ozone3d.net/tutorials/glsl_lighting_phong.php" />
  <row Id="14412" PostHistoryTypeId="2" PostId="7197" RevisionGUID="358ebf52-996f-4dc9-9d40-8c4a2aae3860" CreationDate="2011-01-08T21:15:36.653" UserId="4327" Text="If you have the forward vector and the vector for straight &quot;up&quot;, you can take the cross product to get a vector pointing sideways for strafing." />
  <row Id="14413" PostHistoryTypeId="2" PostId="7198" RevisionGUID="3211d730-e223-4ad8-898c-cc30fe7550d3" CreationDate="2011-01-08T22:11:40.800" UserId="3794" Text="Once you use a 3D coord instead 2D to sample cube, it is possible (but not paremetric :)).&#xD;&#xA;&#xD;&#xA;I will use gl_Normal. First theory: (i'm going to explain it later now i have to work)&#xD;&#xA;&#xD;&#xA;You have to know to which face of cube vertex belongs. It is the biggest componnent in normal (or another vector).&#xD;&#xA;&#xD;&#xA;Once you have face, you can specify face normal. Than compute angle between face normal and vertex's normal. Use Law of sines to get distance of point in space from cube origin(in middle). Multiply this distance with normal and you got it :)&#xD;&#xA;&#xD;&#xA;    // this code sucks for shader ... it would be slow it is written to be clear not optimal.&#xD;&#xA;    // I wrote this on notebook, did not test it but it should be ok.&#xD;&#xA;    &#xD;&#xA;    vec3 positionOnCube = cube(gl_normal,cubeOrigin);&#xD;&#xA;&#xD;&#xA;    vec3 cube(vec3 coord,vec3 cubeOrigin)&#xD;&#xA;    {&#xD;&#xA;        int face = face(coord)&#xD;&#xA;        vec3 faceNormal;&#xD;&#xA;        switch (faceNormal)&#xD;&#xA;        {&#xD;&#xA;          case 0: faceNormal = vec3(1,0,0); break;&#xD;&#xA;          case 1: faceNormal = vec3(-1,0,0); break;&#xD;&#xA;          case 2: faceNormal = vec3(0,1,0); break;&#xD;&#xA;          case 3: faceNormal = vec3(0,-1,0); break;&#xD;&#xA;          case 4: faceNormal = vec3(0,0,1); break;&#xD;&#xA;          case 5: faceNormal = vec3(0,0,-1); break;&#xD;&#xA;        }  &#xD;&#xA;        &#xD;&#xA;        float gamma = acos (faceNormal,coord);&#xD;&#xA;        float alfa = PI - HALF_PI - gamma; //there is no PI or HALF_PI in glsl you have to define it on your own.&#xD;&#xA;        //this is little hard stuff. You want to know length from origin to place on cube. It is simple triangle and can be solved by law of sines. &#xD;&#xA;        //It should be multiplied with sin(HALF_PI) but it is 1. &#xD;&#xA;        float posFactor =  (CUBE_SIZE/2.0)/sin(alfa) ; &#xD;&#xA;        &#xD;&#xA;        return cubeOrigin + coord * posFactor;      &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    //return face's ID based on sampling vector&#xD;&#xA;    int face(vec3 coord)&#xD;&#xA;    {&#xD;&#xA;        if((abs(coord.x) &gt; abs(coord.y)) &amp;&amp; (abs(coord.x) &gt; abs(coord.x)))&#xD;&#xA;        {&#xD;&#xA;          if (coord.x &gt; 0)&#xD;&#xA;            return 0;&#xD;&#xA;          else&#xD;&#xA;            return 1;&#xD;&#xA;        }&#xD;&#xA;        if( abs(coord.y) &gt; abs(coord.z))&#xD;&#xA;        {&#xD;&#xA;          if (coord.y &gt; 0)&#xD;&#xA;            return 2;&#xD;&#xA;          else&#xD;&#xA;            return 3;&#xD;&#xA;        }&#xD;&#xA;        if (coord.z &gt; 0)&#xD;&#xA;          return 4;&#xD;&#xA;        return 5;         &#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="14414" PostHistoryTypeId="2" PostId="7199" RevisionGUID="6ffc3a1e-28a5-412a-94af-e8cc17b14855" CreationDate="2011-01-08T22:25:04.363" UserId="154" Text="The home console market is more open to indie developers than at probably any other time in it's history. &#xD;&#xA;&#xD;&#xA;You have downloadable games on PSN/XBLA for sub $2m budgets, and the XNA channel offering distribution for basically $100. On the PC side you have Facebook/Flash which is a platform offering distribution to millions of potential users with minimal cost, not to mention countless flash/unity web portals.&#xD;&#xA;&#xD;&#xA;In the mobile space Android, WinPho7 and iOS offer options that are again at bargain entry price points compared to previous mobile options.&#xD;&#xA;&#xD;&#xA;Why would you want/need a custom piece of hardware?" />
  <row Id="14415" PostHistoryTypeId="2" PostId="7200" RevisionGUID="caba01a7-3e40-4034-be65-fa6d455d25ff" CreationDate="2011-01-08T22:57:19.453" UserId="659" Text="3D with shutter glasses first appeared on the PC almost a decade ago. 3D cinemas (using polarised glasses) have been around for even longer, although primiarly at theme parks.&#xD;&#xA;&#xD;&#xA;It didn't take off then, and little has changed since then, really.&#xD;&#xA;&#xD;&#xA;Nobody wants to wear 3D glasses for their daily living room TV viewing, and it's not a whole lot more appealing for regular gaming.&#xD;&#xA;&#xD;&#xA;But even if  you don't mind the glasses, there's another perhaps more serious problem. On current platforms, stereoscopic 3D often offers a significantly worse experience than 'flat 3D', as rendering the scene for each eye usually results in a halving of the framerate.&#xD;&#xA;&#xD;&#xA;I recently looked at Gran Turismo 5 on a 3D TV, it was not impressive. The framerate was all over the place, ruining the 3D effect. Switch off 3D mode and you've got a much nicer game, running at a lovely smooth 60fps.&#xD;&#xA;&#xD;&#xA;I'm sure there'll be a lot more games released with 3D support in the near future, simply becaust the hardware support is now there. But it's likely to be more as a 'tick the box' extra feature, rather than a fundamental part of the game, and at the price of a severe drop in framerate and/or image quality.&#xD;&#xA;&#xD;&#xA;The 3DS, on the other hand, is likely to be a big success. (Although Nintendo's only big hardware release failure was their last attempt at 3D, the Virtual Boy...). But I wouldn't be surprised if most gamers turn off the 3D effect after the novelty factor quickly wears off." />
  <row Id="14416" PostHistoryTypeId="2" PostId="7201" RevisionGUID="b9463ed7-100c-4a77-b3f7-dc0671434067" CreationDate="2011-01-08T23:13:23.007" UserId="744" Text="A truly &quot;open console&quot; is an oxymoron. What consoles bring to the table, for developers and users, is a standardized platform - a fixed set of well-understood hardware and software. For developers this means less time testing and less worksforme bug reports. For users this means guaranteed compatibility and a base level of stability and quality.&#xD;&#xA;&#xD;&#xA;What both parties give up to the platform owner for these benefits is control. For developers, they agree to be bound by approved APIs, and give up some revenue from the product. For users, they agree to only install licensed and supported software.&#xD;&#xA;&#xD;&#xA;One could talk about &quot;open consoles&quot; in the 70s and 80s, when the difference in price and power between a &quot;gaming computer&quot; and a &quot;real computer&quot; was enormous. But today, it's not meaningful. _What defines a console platform is the lack of openness_, in exchange for those benefits. Right now we even have platforms running the gamut of tradeoffs - PC on one end, Wii/PS3/Xbox 360 retail on the other. On the more open platforms, like the Android, we can see the compatibility and user support problems of the PC emerging.&#xD;&#xA;&#xD;&#xA;But the value of each platform in that continuum is based on how much or how little control it takes away from you in exchange for simplicity of development/use - and with so many platforms, consumers and developers finally have the ability to vote with their code and dollars as to how much openness they want. Just don't be too surprised if, for the mass market, it's less open than PC enthusiasts are used to.&#xD;&#xA;&#xD;&#xA;There is another, wholly useless, way to think about &quot;open consoles&quot;, and that's in terms of hardware fetishism. (And it's what I see from a lot of people interested in the GP2X/Pandora/etc., as well as PS3 and DS homebrew.) Playing around with novel low-level hardware is fun. But it's really a secondary characteristic of what defines a console, driven by the desire to drive down component costs and size and power consumption, and to increase platform lock-in, and unfettered by the need for Win32-on-x86 compatibility. If this is why you want to do &quot;console development&quot;, you're probably better off getting an Arduino or something.&#xD;&#xA;&#xD;&#xA;I really don't mean to disparage low-level programming. I personally enjoy it, _as a software developer_. But if that's what you mean by &quot;open console&quot;, you're really romanticizing what consoles are, and ignoring the reality of why they're still around after two decades of high-spec low-cost general-purpose personal computing devices." />
  <row Id="14417" PostHistoryTypeId="2" PostId="7202" RevisionGUID="6f05d85b-92ce-41e0-9014-de0607af7f84" CreationDate="2011-01-08T23:30:45.817" UserId="4514" Text="There is a set of modules for Perl starting with [Lingua::EN::Inflect][1] that deals with these issues.  Even if you're using a different language, the API choices made might help you frame your own design.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://search.cpan.org/search?query=lingua%3A%3Aen%3A%3Ainflect&amp;mode=all" />
  <row Id="14418" PostHistoryTypeId="5" PostId="7189" RevisionGUID="41490196-77c4-46bc-9f8a-3808073f43f8" CreationDate="2011-01-09T00:02:18.183" UserId="4508" Comment="added 181 characters in body" Text="i'm getting started with glsl with quartz composer.&#xD;&#xA;i have a patch with a particle system in which each particle is mapped into a sphere with a blend value. with blend=0 particles are in random positions, blend=1 particles are in the sphere. the code is here:&#xD;&#xA;&#xD;&#xA;        vec3 sphere(vec2 domain)&#xD;&#xA;    {&#xD;&#xA;        vec3 range;&#xD;&#xA;        range.x = radius * cos(domain.y) * sin(domain.x);&#xD;&#xA;        range.y = radius * sin(domain.y) * sin(domain.x);&#xD;&#xA;        range.z = radius * cos(domain.x);&#xD;&#xA;        return range;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // in main:&#xD;&#xA;&#xD;&#xA;    vec2 p0 = gl_Vertex.xy * twopi;&#xD;&#xA;    vec3 normal = sphere(p0);;&#xD;&#xA;    vec3 r0 = radius * normal;&#xD;&#xA;    vec3 vertex = r0;&#xD;&#xA;&#xD;&#xA;    normal = normal * blend + gl_Normal * (1.0 - blend);&#xD;&#xA;    vertex = vertex * blend + gl_Vertex.xyz * (1.0 - blend);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i'd like the particle to be on a cube if blend=0&#xD;&#xA;&#xD;&#xA;i've tried to find but i can't figure out some parametric equation for the cube.&#xD;&#xA;mayebe it is not the right way?" />
  <row Id="14419" PostHistoryTypeId="5" PostId="7198" RevisionGUID="a2d8aaad-4bf3-4593-8600-7c72aa619a5c" CreationDate="2011-01-09T01:35:24.607" UserId="3794" Comment="shader update" Text="**edit: source shader code tested, updated and works...**&#xD;&#xA;&#xD;&#xA;Once you use a 3D coord instead 2D to sample cube, it is possible (but not paremetric :)).&#xD;&#xA;&#xD;&#xA;I will use gl_Normal. First theory: (i'm going to explain it later now i have to work)&#xD;&#xA;&#xD;&#xA;You have to know to which face of cube vertex belongs. It is the biggest componnent in normal (or another vector).&#xD;&#xA;&#xD;&#xA;Once you have face, you can specify face normal. Than compute angle between face normal and vertex's normal. Use Law of sines to get distance of point in space from cube origin(in middle). Multiply this distance with normal and you got it :)&#xD;&#xA;&#xD;&#xA;    // this code sucks for shader ... it would be slow it is written to be clear not optimal.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    uniform int timer;&#xD;&#xA;    &#xD;&#xA;    //return face's ID based on sampling vector&#xD;&#xA;    int face(vec3 coord)&#xD;&#xA;    {&#xD;&#xA;        if((abs(coord.x) &gt; abs(coord.y)) &amp;&amp; (abs(coord.x) &gt; abs(coord.z)))&#xD;&#xA;        {&#xD;&#xA;          if (coord.x &gt; 0)&#xD;&#xA;            return 0;&#xD;&#xA;          else&#xD;&#xA;            return 1;&#xD;&#xA;        }&#xD;&#xA;        if( abs(coord.y) &gt; abs(coord.z))&#xD;&#xA;        {&#xD;&#xA;          if (coord.y &gt; 0)&#xD;&#xA;            return 2;&#xD;&#xA;          else&#xD;&#xA;            return 3;&#xD;&#xA;        }&#xD;&#xA;        if (coord.z &gt; 0)&#xD;&#xA;          return 4;&#xD;&#xA;        return 5;         &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    vec3 cube(vec3 position,vec3 cubeOrigin)&#xD;&#xA;    {&#xD;&#xA;        int CUBE_SIZE = 2;&#xD;&#xA;        vec3 coord = normalize(position - cubeOrigin);&#xD;&#xA;        int face = face(coord);&#xD;&#xA;        vec3 faceNormal = vec3(0);&#xD;&#xA;        switch (face)&#xD;&#xA;        {&#xD;&#xA;          case 0: faceNormal = vec3(1,0,0); break;&#xD;&#xA;          case 1: faceNormal = vec3(-1,0,0); break;&#xD;&#xA;          case 2: faceNormal = vec3(0,1,0); break;&#xD;&#xA;          case 3: faceNormal = vec3(0,-1,0); break;&#xD;&#xA;          case 4: faceNormal = vec3(0,0,1); break;&#xD;&#xA;          case 5: faceNormal = vec3(0,0,-1); break;&#xD;&#xA;        }  &#xD;&#xA;    &#xD;&#xA;        float gamma = acos (dot(faceNormal,coord));&#xD;&#xA;        float alfa = 3.14 - 1.57 - gamma; //there is no PI or HALF_PI in glsl you have to define it on your own.&#xD;&#xA;        //this is little hard stuff. You want to know length from origin to place on cube. It is simple triangle and can be solved by law of sines. &#xD;&#xA;        //It should be multiplied with sin(HALF_PI) but it is 1. &#xD;&#xA;        float posFactor =  (CUBE_SIZE/2.0)/sin(alfa) ; &#xD;&#xA;    &#xD;&#xA;        return (cubeOrigin + coord * posFactor);      &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;    	vec3 transformed = cube(gl_Vertex.xyz,vec3(0.0,0.0,0.0));&#xD;&#xA;    	vec4 cubetrans = vec4 (transformed,1.0);&#xD;&#xA;    	gl_Position		= mix(gl_ModelViewProjectionMatrix * cubetrans,gl_ModelViewProjectionMatrix * gl_Vertex,timer/200.0);&#xD;&#xA;    	&#xD;&#xA;    	gl_FrontColor = gl_Color;&#xD;&#xA;    }" />
  <row Id="14420" PostHistoryTypeId="5" PostId="7198" RevisionGUID="0a6df5e6-67b5-45ac-aea6-ef5b0a9a7a55" CreationDate="2011-01-09T02:14:57.847" UserId="3794" Comment="added image and link to video" Text="**edit: source shader code tested, updated and works...**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![morph teapot to cube][2]&#xD;&#xA;&#xD;&#xA;**[there is also video...][1]**&#xD;&#xA;&#xD;&#xA;Once you use a 3D coord instead 2D to sample cube, it is possible (but not paremetric :)).&#xD;&#xA;&#xD;&#xA;I will use gl_Normal. First theory:&#xD;&#xA;&#xD;&#xA;You have to know to which face of cube vertex belongs. It is the biggest componnent in normal (or another vector).&#xD;&#xA;&#xD;&#xA;Once you have face, you can specify face normal. Than compute angle between face normal and vertex's normal. Use Law of sines to get distance of point in space from cube origin(in middle). Multiply this distance with normal and you got it :)&#xD;&#xA;&#xD;&#xA;    // this code sucks for shader ... it would be slow it is written to be clear not optimal.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    uniform int timer;&#xD;&#xA;    &#xD;&#xA;    //return face's ID based on sampling vector&#xD;&#xA;    int face(vec3 coord)&#xD;&#xA;    {&#xD;&#xA;        if((abs(coord.x) &gt; abs(coord.y)) &amp;&amp; (abs(coord.x) &gt; abs(coord.z)))&#xD;&#xA;        {&#xD;&#xA;          if (coord.x &gt; 0)&#xD;&#xA;            return 0;&#xD;&#xA;          else&#xD;&#xA;            return 1;&#xD;&#xA;        }&#xD;&#xA;        if( abs(coord.y) &gt; abs(coord.z))&#xD;&#xA;        {&#xD;&#xA;          if (coord.y &gt; 0)&#xD;&#xA;            return 2;&#xD;&#xA;          else&#xD;&#xA;            return 3;&#xD;&#xA;        }&#xD;&#xA;        if (coord.z &gt; 0)&#xD;&#xA;          return 4;&#xD;&#xA;        return 5;         &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    vec3 cube(vec3 position,vec3 cubeOrigin)&#xD;&#xA;    {&#xD;&#xA;        int CUBE_SIZE = 2;&#xD;&#xA;        vec3 coord = normalize(position - cubeOrigin);&#xD;&#xA;        int face = face(coord);&#xD;&#xA;        vec3 faceNormal = vec3(0);&#xD;&#xA;        switch (face)&#xD;&#xA;        {&#xD;&#xA;          case 0: faceNormal = vec3(1,0,0); break;&#xD;&#xA;          case 1: faceNormal = vec3(-1,0,0); break;&#xD;&#xA;          case 2: faceNormal = vec3(0,1,0); break;&#xD;&#xA;          case 3: faceNormal = vec3(0,-1,0); break;&#xD;&#xA;          case 4: faceNormal = vec3(0,0,1); break;&#xD;&#xA;          case 5: faceNormal = vec3(0,0,-1); break;&#xD;&#xA;        }  &#xD;&#xA;    &#xD;&#xA;        float gamma = acos (dot(faceNormal,coord));&#xD;&#xA;        float alfa = 3.14 - 1.57 - gamma; //there is no PI or HALF_PI in glsl you have to define it on your own.&#xD;&#xA;        //this is little hard stuff. You want to know length from origin to place on cube. It is simple triangle and can be solved by law of sines. &#xD;&#xA;        //It should be multiplied with sin(HALF_PI) but it is 1. &#xD;&#xA;        float posFactor =  (CUBE_SIZE/2.0)/sin(alfa) ; &#xD;&#xA;    &#xD;&#xA;        return (cubeOrigin + coord * posFactor);      &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;    	vec3 transformed = cube(gl_Vertex.xyz,vec3(0.0,0.0,0.0));&#xD;&#xA;    	vec4 cubetrans = vec4 (transformed,1.0);&#xD;&#xA;    	gl_Position		= mix(gl_ModelViewProjectionMatrix * cubetrans,gl_ModelViewProjectionMatrix * gl_Vertex,timer/200.0);&#xD;&#xA;    	&#xD;&#xA;    	gl_FrontColor = gl_Color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=sLLvevfkadQ&#xD;&#xA;  [2]: http://i.stack.imgur.com/Kx25c.png" />
  <row Id="14421" PostHistoryTypeId="5" PostId="7198" RevisionGUID="51aacf20-de49-4f58-834d-52b55159dbf0" CreationDate="2011-01-09T02:25:57.810" UserId="3794" Comment="clearification" Text="**edit: source shader code tested, updated and works...**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![morph teapot to cube][2]&#xD;&#xA;&#xD;&#xA;**[there is also video...][1]**&#xD;&#xA;&#xD;&#xA;Once you use a 3D coord instead 2D to sample cube, it is possible (but not parametric :)).&#xD;&#xA;&#xD;&#xA;First theory:&#xD;&#xA;&#xD;&#xA;Use normalize(GL_Vertex - cubeOrigin) as sampling vector.&#xD;&#xA;&#xD;&#xA;You have to know to which face of cube vertex belongs. It is the biggest componnent in sampling vector. &#xD;&#xA;&#xD;&#xA;Once you have face, you can specify face normal. Than compute angle between face normal and sampling vector. Use Law of sines to get distance of point in space from cube origin(in middle). Multiply this distance with normal and you got it :)&#xD;&#xA;&#xD;&#xA;    // this code sucks for shader ... it would be slow it is written to be clear not optimal.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    uniform int timer;&#xD;&#xA;    &#xD;&#xA;    //return face's ID based on sampling vector&#xD;&#xA;    int face(vec3 coord)&#xD;&#xA;    {&#xD;&#xA;        if((abs(coord.x) &gt; abs(coord.y)) &amp;&amp; (abs(coord.x) &gt; abs(coord.z)))&#xD;&#xA;        {&#xD;&#xA;          if (coord.x &gt; 0)&#xD;&#xA;            return 0;&#xD;&#xA;          else&#xD;&#xA;            return 1;&#xD;&#xA;        }&#xD;&#xA;        if( abs(coord.y) &gt; abs(coord.z))&#xD;&#xA;        {&#xD;&#xA;          if (coord.y &gt; 0)&#xD;&#xA;            return 2;&#xD;&#xA;          else&#xD;&#xA;            return 3;&#xD;&#xA;        }&#xD;&#xA;        if (coord.z &gt; 0)&#xD;&#xA;          return 4;&#xD;&#xA;        return 5;         &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    vec3 cube(vec3 position,vec3 cubeOrigin)&#xD;&#xA;    {&#xD;&#xA;        int CUBE_SIZE = 2;&#xD;&#xA;        vec3 coord = normalize(position - cubeOrigin);&#xD;&#xA;        int face = face(coord);&#xD;&#xA;        vec3 faceNormal = vec3(0);&#xD;&#xA;        switch (face)&#xD;&#xA;        {&#xD;&#xA;          case 0: faceNormal = vec3(1,0,0); break;&#xD;&#xA;          case 1: faceNormal = vec3(-1,0,0); break;&#xD;&#xA;          case 2: faceNormal = vec3(0,1,0); break;&#xD;&#xA;          case 3: faceNormal = vec3(0,-1,0); break;&#xD;&#xA;          case 4: faceNormal = vec3(0,0,1); break;&#xD;&#xA;          case 5: faceNormal = vec3(0,0,-1); break;&#xD;&#xA;        }  &#xD;&#xA;    &#xD;&#xA;        float gamma = acos (dot(faceNormal,coord));&#xD;&#xA;        float alfa = 3.14 - 1.57 - gamma; //there is no PI or HALF_PI in glsl you have to define it on your own.&#xD;&#xA;        //this is little hard stuff. You want to know length from origin to place on cube. It is simple triangle and can be solved by law of sines. &#xD;&#xA;        //It should be multiplied with sin(HALF_PI) but it is 1. &#xD;&#xA;        float posFactor =  (CUBE_SIZE/2.0)/sin(alfa) ; &#xD;&#xA;    &#xD;&#xA;        return (cubeOrigin + coord * posFactor);      &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;    	vec3 transformed = cube(gl_Vertex.xyz,vec3(0.0,0.0,0.0));&#xD;&#xA;    	vec4 cubetrans = vec4 (transformed,1.0);&#xD;&#xA;    	gl_Position		= mix(gl_ModelViewProjectionMatrix * cubetrans,gl_ModelViewProjectionMatrix * gl_Vertex,timer/200.0);&#xD;&#xA;    	&#xD;&#xA;    	gl_FrontColor = gl_Color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=sLLvevfkadQ&#xD;&#xA;  [2]: http://i.stack.imgur.com/Kx25c.png" />
  <row Id="14423" PostHistoryTypeId="6" PostId="7174" RevisionGUID="3857b337-feab-4b2a-85b9-125f83dee200" CreationDate="2011-01-09T04:02:36.010" UserId="51" Comment="edited tags" Text="&lt;mud&gt;&lt;text-based&gt;" />
  <row Id="14426" PostHistoryTypeId="2" PostId="7204" RevisionGUID="b1a8ade4-8545-412b-83bb-017e505f3324" CreationDate="2011-01-09T04:17:32.207" UserId="3990" Text="Instead of having a single string, and trying to substitute into it properly, you could have a whole set of them. Start with the objects. You know, when creating the mob, what to refer to it as. You can give it a specific property, separate from it's name, for substituting into attack strings. Weapons can have multiple strings for variety, and can substitute in more detail. Instead of 'attacker', they can ask specifically for 'attacker-pronoun' or 'attacker-propername'. Mobs can have plural versions of these identifiers too, if your 'bees' are represented by multiple mobs and not just a single mob that happens to be called 'bees'.&#xD;&#xA;&#xD;&#xA;So you would have a mob like&#xD;&#xA;&#xD;&#xA;    name = goblin&#xD;&#xA;    pronoun = he&#xD;&#xA;    plural = goblins&#xD;&#xA;    proper = goblin&#xD;&#xA;    common = a goblin&#xD;&#xA;    specific_common = the goblin&#xD;&#xA;    possessive = the goblin's&#xD;&#xA;    possessive_pronoun = his&#xD;&#xA;&#xD;&#xA;Then your attack string asks for specific items like so..&#xD;&#xA;&#xD;&#xA;%attacker-pronoun% hit %defender-specific_common% for %damage%! %defender-pronoun% really felt that one!" />
  <row Id="14427" PostHistoryTypeId="6" PostId="7177" RevisionGUID="8406b251-a4c1-4810-a6e9-e6a56eb96c79" CreationDate="2011-01-09T04:19:01.847" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;tools&gt;&lt;mmo&gt;&lt;data&gt;" />
  <row Id="14428" PostHistoryTypeId="6" PostId="5108" RevisionGUID="9cc65010-e7a0-4bc0-ab80-d26d104b5b7f" CreationDate="2011-01-09T04:19:52.500" UserId="51" Comment="edited tags; edited title" Text="&lt;game-industry&gt;" />
  <row Id="14429" PostHistoryTypeId="4" PostId="5108" RevisionGUID="9cc65010-e7a0-4bc0-ab80-d26d104b5b7f" CreationDate="2011-01-09T04:19:52.500" UserId="51" Comment="edited tags; edited title" Text="Will we see a trend of stereoscopic 3D games coming up in the near future?" />
  <row Id="14430" PostHistoryTypeId="6" PostId="7191" RevisionGUID="9041b123-c70e-43c7-adc9-95c164999d6e" CreationDate="2011-01-09T04:28:16.300" UserId="51" Comment="edited tags" Text="&lt;open-source&gt;&lt;project-management&gt;&lt;game-industry&gt;&lt;platform&gt;" />
  <row Id="14431" PostHistoryTypeId="2" PostId="7205" RevisionGUID="02e84449-8742-4ec3-904b-305103a98eb3" CreationDate="2011-01-09T06:01:49.230" UserId="4213" Text="Anyone know any site that provide a good screencast about learning blender?" />
  <row Id="14432" PostHistoryTypeId="1" PostId="7205" RevisionGUID="02e84449-8742-4ec3-904b-305103a98eb3" CreationDate="2011-01-09T06:01:49.230" UserId="4213" Text="Any good screencast for learning blender?" />
  <row Id="14433" PostHistoryTypeId="3" PostId="7205" RevisionGUID="02e84449-8742-4ec3-904b-305103a98eb3" CreationDate="2011-01-09T06:01:49.230" UserId="4213" Text="&lt;blender&gt;" />
  <row Id="14434" PostHistoryTypeId="2" PostId="7206" RevisionGUID="335aa1ef-5383-4f00-b499-b63daa4d1b8d" CreationDate="2011-01-09T06:03:55.953" UserId="4191" Text="The way I handle this is through a large set of systemry that, among other things, involves modeling the message as a data structure rather than a string.  The values for the attacker and the defender are their actual objects; the verb (&quot;inflict&quot; in your message) is marked as such, and knows the object for the person performing it, so that the message renderer knows that it needs to be displayed in first person to the actor and second person to everybody else.  Objects also know whether their nouns are proper or not (and therefore, whether &quot;the&quot; or &quot;a/an&quot; should ever be applied to them), there are data models that allow me to specify that &quot;the&quot; or &quot;a/an&quot; would normally be expected to be applied to a non-proper noun in that position, and a lot more.&#xD;&#xA;&#xD;&#xA;[This thread on Mudconnector][1] is very similar to your question, and I go into my system's details extensively there.  Basically, the way I do it is what you would want if you want to be completely unconstrained by your messaging system's underlying capabilities and are willing to pay a price in learning curve for that.  (Much like vi vs. nano.)&#xD;&#xA;&#xD;&#xA;  [1]: http://mudconnect.com/discuss/discuss.cgi?mode=MSG&amp;area=adv_code&amp;message=16373" />
  <row Id="14435" PostHistoryTypeId="2" PostId="7207" RevisionGUID="231e7928-48b0-4e41-9341-e4ee2de3cc56" CreationDate="2011-01-09T07:10:04.863" UserId="3817" Text="As you may know, I am programming an on-line game using FLASH. I am connecting my FLASH 8 movie with MySQL database through PHP. I am doing very good in that, and I have everything working fine. &#xD;&#xA;&#xD;&#xA;The problems come when I am trying to insert (Using the INSERT SQL func) data to the database that are non-english. In other words, UTF-8 data. &#xD;&#xA;&#xD;&#xA;I red a lot of articls about that stuff and found and apply the fallowing:&#xD;&#xA;1. In PHP4, you need to tell the PHP to use UTF-8 when using the xml_parser_crater() func, however, in PHP5 that is done automatically. Even though I told PHP5 to use the UTF-8 when calling the func.&#xD;&#xA;&#xD;&#xA;2. Adding the &lt;?xmlversion=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; header to the XML sent to PHP from flash.&#xD;&#xA;&#xD;&#xA;3. Force the FLASH to use UTF-8 encoding in the preference options.&#xD;&#xA;&#xD;&#xA;4. Set the encoding in MySQL to UTF-8 (utf8_unicode_ci with InnoDB engine). I can read and insert the other language data correctly in the phpadmin as well. &#xD;&#xA;&#xD;&#xA;I did all that in my coding, and still I can't insert such data. &#xD;&#xA;&#xD;&#xA;one more strange thing is that, when I use the same link, that the FLASH using, with the XML, that the FLASH creating, on the browser (google chrome), I got the data inserted right in the database!!!!!&#xD;&#xA;&#xD;&#xA;I am about to get crazy about that stuff, What am I missing? what cause the problem?&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="14436" PostHistoryTypeId="1" PostId="7207" RevisionGUID="231e7928-48b0-4e41-9341-e4ee2de3cc56" CreationDate="2011-01-09T07:10:04.863" UserId="3817" Text="UTF-8 encoding problem with flash mysql and php" />
  <row Id="14437" PostHistoryTypeId="3" PostId="7207" RevisionGUID="231e7928-48b0-4e41-9341-e4ee2de3cc56" CreationDate="2011-01-09T07:10:04.863" UserId="3817" Text="&lt;flash&gt;&lt;languages&gt;&lt;php&gt;" />
  <row Id="14438" PostHistoryTypeId="2" PostId="7208" RevisionGUID="9dc354bc-8ce0-4a1b-b333-2c9d3bfcd2cd" CreationDate="2011-01-09T08:31:05.660" UserId="3817" Text="Well, for me, I thing speartesheet programs can't handle such stuff correctly and effectively. RDB was design, actually, to handle huge data and tables. Modern RDB were designed to handle the 'Huge' kind of things and they are doing it very good. &#xD;&#xA;&#xD;&#xA;The point is, to get the best output of the RDB you need to design your database in the correct way. If your data schema was poor, or did not cover all the data of your project, you will end with a very bad results, performance, and output.&#xD;&#xA;&#xD;&#xA;The idea of RDB is to break down huge table into smaller ones so that you can improve performance and readability. If you have a very huge table (attributes wise or even records wise) or a lot of repartitions, and you don't use most of them, that means your design of the DB has some errors.&#xD;&#xA;&#xD;&#xA;In your question Huang F. Lei, if I were asked to design a MMORPG database, I will not add all the skills in one table and all mobs in one table. I will divide the skills according to their classes and usage into multi tables. Each skill type will have its own table or even tables. For mobs, I will either divide them according to their types, or according to their location in different worlds. And so on. &#xD;&#xA;&#xD;&#xA;This way I can shrink the table sizes, make it easier for me to track the data, and improve the DB performance.&#xD;&#xA;&#xD;&#xA;In Excel, on the other hand, all the data will be 'crumbed' in one place. and to find one piece of data is almost impassable, epically when you have a repeated data. In addition, as the data grow in size, the opening time of the file will increase.&#xD;&#xA;&#xD;&#xA;At the end, Excel - in my opinion - is a very poor way to handle huge related data.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14440" PostHistoryTypeId="5" PostId="7161" RevisionGUID="097ae805-8d9b-4db7-8163-720354e74eee" CreationDate="2011-01-09T10:16:29.970" UserId="4129" Comment="added 291 characters in body; added 232 characters in body" Text="Are there any robust performant libraries for indexing objects?&#xD;&#xA;&#xD;&#xA;Objects would have bounds themselves, rather than being represented by points; and an object could therefore be in more than one compartment if the index divides things in fixed sized partitions.&#xD;&#xA;&#xD;&#xA;It would need [frustum culling][1] and visiting objects hit by a ray as well as neighbourhood searches.&#xD;&#xA;&#xD;&#xA;I can find lots of articles showing the math for the component parts, often as algebra rather than simple C, but nothing that puts it all together (apart from perhaps Ogre, [although apparently PyOrge doesn't expose the octree][2]).  Surely hobby game makers don't all have to make their own spartial indices?&#xD;&#xA;&#xD;&#xA;(I am sitting down writing my own sphere-sphere, sphere-ray, ray-aabb, cone-aabb, cone-fustrum, aabb-fustrum and octree implementation; surely there is a better way i.e. someone has already done this and make a nice package?!?!)&#xD;&#xA;&#xD;&#xA;(Python or C/C++ w/bindings preferred)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Frustum_Culling.shtml&#xD;&#xA;  [2]: http://code.activestate.com/recipes/498121-python-octree-implementation/" />
  <row Id="14441" PostHistoryTypeId="2" PostId="7210" RevisionGUID="0f514e47-20bd-4b70-92ba-f15e504da6e5" CreationDate="2011-01-09T10:33:36.627" UserId="20" Text="Not sure if your question is appropriate for gamedev, probably an edge case.&#xD;&#xA;&#xD;&#xA;Nevertheless, I suggest you start here: http://blendercookie.com/ (Here's a direct link to the getting started videos: http://www.blendercookie.com/getting-started-with-blender/).&#xD;&#xA;&#xD;&#xA;There are a lot of good videos there and mostly they already use Blender 2.5 which is quite different from 2.4x (2.5 is a major rewrite and has a completely new GUI)." />
  <row Id="14442" PostHistoryTypeId="5" PostId="7182" RevisionGUID="cf4b5f29-76d2-4c3b-afb3-1b02d97913f5" CreationDate="2011-01-09T11:38:55.050" UserId="4508" Comment="added 227 characters in body" Text="this is my method for lighting:&#xD;&#xA;&#xD;&#xA;    private void lights(GL gl) {&#xD;&#xA;		float[] LightPos = {0.0f, 0.0f, -1.0f, 1.0f};&#xD;&#xA;		float[] LightAmb = {0.2f, 0.2f, 0.2f, 1.0f};&#xD;&#xA;		float[] LightDif = {0.6f, 0.6f, 0.6f, 1.0f};&#xD;&#xA;		float[] LightSpc = {0.9f, 0.9f, 0.9f, 1.0f};&#xD;&#xA;&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_POSITION, LightPos, 0);&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_AMBIENT, LightAmb, 0);&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_DIFFUSE, LightDif, 0);&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT1, GL.GL_SPECULAR, LightSpc, 0);&#xD;&#xA;&#xD;&#xA;		gl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, LightSpc, 0);&#xD;&#xA;&#xD;&#xA;		gl.glEnable(GL.GL_LIGHT0);&#xD;&#xA;		gl.glEnable(GL.GL_LIGHT1);&#xD;&#xA;		gl.glShadeModel(GL.GL_SMOOTH);&#xD;&#xA;		gl.glEnable(GL.GL_LIGHTING);  &#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and i see my objects flat, no specular light.. any ideas?&#xD;&#xA;&#xD;&#xA;ps. to render my objects:&#xD;&#xA;&#xD;&#xA;    gl.glColor3f(1f,0f,0f);&#xD;&#xA;	gl.glBegin(GL.GL_TRIANGLES);&#xD;&#xA;	for(Triangle t : tubeModel.getTriangles()) {&#xD;&#xA;		gl.glVertex3f(t.v1.x, t.v1.y, t.v1.z);&#xD;&#xA;		gl.glVertex3f(t.v2.x, t.v2.y, t.v2.z);&#xD;&#xA;		gl.glVertex3f(t.v3.x, t.v3.y, t.v3.z);&#xD;&#xA;	}&#xD;&#xA;	gl.glEnd();&#xD;&#xA;&#xD;&#xA;this is what i'm looking for:![alt text][1]&#xD;&#xA;&#xD;&#xA;this is what i get:![alt text][2]&#xD;&#xA;&#xD;&#xA;well it's not all black but if i rotate it becomes grey-white&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/HT86m.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/ek5cb.png" />
  <row Id="14443" PostHistoryTypeId="5" PostId="7195" RevisionGUID="4cf92c04-e4b5-4c3f-a839-84420d7a20ac" CreationDate="2011-01-09T13:58:23.467" UserId="659" Comment="typo" Text="Adding an answer myself - as I ended up using this: http://sourceforge.net/projects/polyclipping/ - rather than attempting an implementation from scratch.&#xD;&#xA;&#xD;&#xA;So far it's doing the job quite nicely, and it was very easy to use (with C#)&#xD;&#xA;&#xD;&#xA;Wikipedia has links to a fair bit of information on the subject, once I started searching using the right terminology: http://en.wikipedia.org/wiki/Boolean_operations_on_polygons" />
  <row Id="14444" PostHistoryTypeId="2" PostId="7211" RevisionGUID="2165262c-2216-4c1c-abd7-05c15eb788ba" CreationDate="2011-01-09T14:01:34.453" UserId="4523" Text="I am trying to program point line segment collision detection and reaction.  I am doing this for fun and to learn.&#xD;&#xA;&#xD;&#xA;The point moves (it has a velocity, and can be controlled by the user), whilst the lines are strait and stationary.  The lines are not axis aligned.&#xD;&#xA;&#xD;&#xA;It is quite straight forward to work out if a collision has occurred.  For each frame, the point moves from A to B.  AB is a line, and if it crosses the line segment, a collision has occurred (or will occur) and I am able to work out the point of intersection (poi).&#xD;&#xA;&#xD;&#xA;The problem I am having is with the reaction.  Ideally I would like the point to be prevented from moving across the line.  In one frame, I can move the point back to the poi (or only alow it to move as far as the poi), and alter the velocity.  The problem I am having with this approach (I think) is that, next frame the user may try to cross the line again.&#xD;&#xA;&#xD;&#xA;Although the point is on the poi, the point may not be exactly on the line.  Since it is not axis aligned, I think there is always some subtle rounding issue (A float representation of a point on a line might be rounded to a point that is slightly on one side or the other).  Because of this, next frame the path might not intersect the line (because it can start on the other side and move away from it) and the point is effectively allowed to cross the line.&#xD;&#xA;&#xD;&#xA;Firstly, does the analysis sound correct?&#xD;&#xA;&#xD;&#xA;Having accepted (maybe) that I cannot always exactly position the point on the line, I tried to move the point away from the line slightly (either along the normal to the line, or along the path vector).  I then get a problem at edges.  Attempting to fix one collision by moving the point away from the line (even slightly) can cause it to cross another line (one shape I am dealing with is a star, with sharp corners).  This can mean that the solution to one collision inadvertently creates another collision, which is ignored.&#xD;&#xA;&#xD;&#xA;Again, does this sound correct?&#xD;&#xA;&#xD;&#xA;Anyway, whatever I try, I am having difficulty with edges, and the point is occasionally able to penetrate the polygons and cross lines, which is undesirable.  Whilst I can find a lot of information about collision detection on the web (and on this site) I can find precious little information on collision reaction.&#xD;&#xA;&#xD;&#xA;Does any one know of any good point line collision reaction tutorials?  Or is my approach too flawed/over complicated?&#xD;&#xA;" />
  <row Id="14445" PostHistoryTypeId="1" PostId="7211" RevisionGUID="2165262c-2216-4c1c-abd7-05c15eb788ba" CreationDate="2011-01-09T14:01:34.453" UserId="4523" Text="Point line collision reaction" />
  <row Id="14446" PostHistoryTypeId="3" PostId="7211" RevisionGUID="2165262c-2216-4c1c-abd7-05c15eb788ba" CreationDate="2011-01-09T14:01:34.453" UserId="4523" Text="&lt;collision-detection&gt;" />
  <row Id="14447" PostHistoryTypeId="5" PostId="7211" RevisionGUID="3bbf0578-297b-4b7b-8ef6-5acb5f5c100f" CreationDate="2011-01-09T14:11:19.503" UserId="4523" Comment="added 22 characters in body; edited tags" Text="I am trying to program point line segment collision detection and reaction.  I am doing this for fun and to learn.&#xD;&#xA;&#xD;&#xA;The point moves (it has a velocity, and can be controlled by the user), whilst the lines are strait and stationary.  The lines are not axis aligned.  Everything is in 2D.&#xD;&#xA;&#xD;&#xA;It is quite straight forward to work out if a collision has occurred.  For each frame, the point moves from A to B.  AB is a line, and if it crosses the line segment, a collision has occurred (or will occur) and I am able to work out the point of intersection (poi).&#xD;&#xA;&#xD;&#xA;The problem I am having is with the reaction.  Ideally I would like the point to be prevented from moving across the line.  In one frame, I can move the point back to the poi (or only alow it to move as far as the poi), and alter the velocity.  The problem I am having with this approach (I think) is that, next frame the user may try to cross the line again.&#xD;&#xA;&#xD;&#xA;Although the point is on the poi, the point may not be exactly on the line.  Since it is not axis aligned, I think there is always some subtle rounding issue (A float representation of a point on a line might be rounded to a point that is slightly on one side or the other).  Because of this, next frame the path might not intersect the line (because it can start on the other side and move away from it) and the point is effectively allowed to cross the line.&#xD;&#xA;&#xD;&#xA;Firstly, does the analysis sound correct?&#xD;&#xA;&#xD;&#xA;Having accepted (maybe) that I cannot always exactly position the point on the line, I tried to move the point away from the line slightly (either along the normal to the line, or along the path vector).  I then get a problem at edges.  Attempting to fix one collision by moving the point away from the line (even slightly) can cause it to cross another line (one shape I am dealing with is a star, with sharp corners).  This can mean that the solution to one collision inadvertently creates another collision, which is ignored.&#xD;&#xA;&#xD;&#xA;Again, does this sound correct?&#xD;&#xA;&#xD;&#xA;Anyway, whatever I try, I am having difficulty with edges, and the point is occasionally able to penetrate the polygons and cross lines, which is undesirable.  Whilst I can find a lot of information about collision detection on the web (and on this site) I can find precious little information on collision reaction.&#xD;&#xA;&#xD;&#xA;Does any one know of any good point line collision reaction tutorials?  Or is my approach too flawed/over complicated?&#xD;&#xA;" />
  <row Id="14448" PostHistoryTypeId="6" PostId="7211" RevisionGUID="3bbf0578-297b-4b7b-8ef6-5acb5f5c100f" CreationDate="2011-01-09T14:11:19.503" UserId="4523" Comment="added 22 characters in body; edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="14449" PostHistoryTypeId="2" PostId="7212" RevisionGUID="b733af1f-9af1-49be-827a-765171a105fa" CreationDate="2011-01-09T14:20:12.617" UserId="4524" Text="Although your problem may have been solved I would highly suggest that you look at this link: http://www.infinity-universe.com/Infinity/index.php?option=com_content&amp;task=view&amp;id=98&amp;Itemid=27&#xD;&#xA;&#xD;&#xA;The other dev posts may interest you as it goes through galaxy generation.." />
  <row Id="14450" PostHistoryTypeId="2" PostId="7213" RevisionGUID="cc8cc447-5c9e-4671-b961-7f22032670ea" CreationDate="2011-01-09T14:46:53.593" UserId="4524" Text="(Cited Links in pastebin link: http://pastebin.com/PpJknMuT )&#xD;&#xA;&#xD;&#xA;Well you could say that there are 2 different kinds. It depends what you want.&#xD;&#xA;For example if we take a recent GTA game, 100's of artists were used to make the city and to personalise it. Procedural generation could be used here, but it would be used as an artists tool rather than something running on the game engine as we don't particularly want a different city layout with each game.&#xD;&#xA;&#xD;&#xA;So my undergraduate dissertation was on procedural city generation with city zoning:&#xD;&#xA;[1]&#xD;&#xA;&#xD;&#xA;This tool is used by the artist to create a city whilst allowing control over different aspects if they require it. The city generation is similar to L-systems as seen by Pascal Mueller's work: [2]&#xD;&#xA;The city zoning works as an image map taking probabilities of zones (commercial, residential, industrial) from the pixel rgb data. It would be possible to automate the generation if you wanted to, but to make cities look believable the algorithm would have to be far more complex using population AI mechanics rather than L-System and noise algorithms.&#xD;&#xA;&#xD;&#xA;On the fly generation can be seen in [3] or I guess the simplest example would be helicopter: [4]&#xD;&#xA;&#xD;&#xA;Something similar to Torchlight would be Infinity: Quest for Earth [5]&#xD;&#xA;&#xD;&#xA;In Infinity, the galaxy and everything within it is generated with a seed value that then creates all the other variables used to generate everything contained in the galaxy (planets, suns etc) The link talks about how this works in greater detail.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14451" PostHistoryTypeId="2" PostId="7214" RevisionGUID="a27727f3-2f25-4bcf-8e2a-5160fe9e9385" CreationDate="2011-01-09T14:50:58.457" UserId="4524" Text="Supposedly there are 8 developers working on Infinity: Quest for Earth http://www.infinity-universe.com/Infinity/index.php?option=com_content&amp;task=view&amp;id=114&amp;Itemid=49&#xD;&#xA;&#xD;&#xA;Its even more interesting that most of what you see is procedurally generated." />
  <row Id="14452" PostHistoryTypeId="2" PostId="7215" RevisionGUID="474d6f2c-38ad-4889-81ce-8e5ac1c3ab7a" CreationDate="2011-01-09T14:59:23.520" UserId="4524" Text="Blender cookie has a few free tutorials but most need a subscription. There are few here on Blenderguru that are interesting: http://www.blenderguru.com/&#xD;&#xA;&#xD;&#xA;If you need help, head over to blenderartists .org or go on irc freenode to #blender&#xD;&#xA;&#xD;&#xA;If you need any more help on Blender, give me a shout. Whilst not amazing, I have been using it for 3 years so I may be able to point you in the right direction if you get stuck on anything in particular." />
  <row Id="14453" PostHistoryTypeId="2" PostId="7216" RevisionGUID="79f11442-7b82-4501-a3a4-f613fb44725c" CreationDate="2011-01-09T18:04:05.857" UserId="4514" Text="With the caveats that I have no direct experience with them and their web site login/logout is a bit wonky, I've [heard good things](http://boardgames.stackexchange.com/questions/1594/boardgaming-online) about [gamesbyemail.com's developer program](http://gamesbyemail.com/Developers).  They provide a downloadable tutorial for building games within their framework." />
  <row Id="14454" PostHistoryTypeId="16" PostId="7210" RevisionGUID="5246e883-ee79-40d9-b4ce-12ad95472ec9" CreationDate="2011-01-09T19:22:01.377" UserId="2" />
  <row Id="14455" PostHistoryTypeId="16" PostId="7215" RevisionGUID="ea235f44-ae21-40d4-b724-23468139abcf" CreationDate="2011-01-09T19:22:01.377" UserId="2" />
  <row Id="14456" PostHistoryTypeId="16" PostId="7205" RevisionGUID="820b9861-0f1c-464b-9704-e869485a285d" CreationDate="2011-01-09T19:22:01.377" UserId="2" />
  <row Id="14457" PostHistoryTypeId="17" PostId="7218" RevisionGUID="065c3321-353a-4332-b510-b7b52edf8ab2" CreationDate="2011-01-09T19:33:26.433" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/14096/how-should-i-show-shared-resources-during-a-shared-resource-game-in-the-galaxy-ed/14103#14103" Text="" />
  <row Id="14458" PostHistoryTypeId="17" PostId="7219" RevisionGUID="2eaf0171-af99-4eba-bead-b5d45a41c27b" CreationDate="2011-01-09T19:33:26.433" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/14096/how-should-i-show-shared-resources-during-a-shared-resource-game-in-the-galaxy-ed/14197#14197" Text="" />
  <row Id="14459" PostHistoryTypeId="2" PostId="7218" RevisionGUID="da497537-2ce3-47b9-9133-fa77859c0430" CreationDate="2011-01-07T21:54:44.353" UserDisplayName="Wikwocket" Text="I would think you could add a panel near the upper-right of the screen showing your team's resources/supply. A lot of custom maps have little info panels all over the screen so I'm sure this is possible. The only trick would be getting it to show just your team's stats, not those of both teams.&#xD;&#xA;&#xD;&#xA;You may want to ask this at [gamedev.stackexchange.com](http://gamedev.stackexchange.com) as well; custom map building is kind of a game development topic, and policy questions like &quot;how should I show X to the player&quot; are also within their scope." />
  <row Id="14460" PostHistoryTypeId="2" PostId="7219" RevisionGUID="ff1d3ed8-c4cd-497e-a4e7-b5cc99fdf6f4" CreationDate="2011-01-09T04:39:36.647" UserId="388" Text="*I am fine with moving this over to GameDev, and would vote to Close and Migrate myself were the option available.*&#xD;&#xA;&#xD;&#xA;Meanwhile, I figured it out!  As @Wikwocket says, custom Dialogs are the way to go; however, here's a very detailed explanation of precisely how I did it.&#xD;&#xA;&#xD;&#xA;First off, for convenience I made a new **Record** in the Trigger Editor I called ResourceDialogUI.&#xD;&#xA;&#xD;&#xA;![New Record in the Trigger Editor][1]&#xD;&#xA;&#xD;&#xA;I also had to make a variable of type &quot;**- Record / ResourceDialogUI**,&quot; which I cleverly also called ResourceDialogUI.&#xD;&#xA;&#xD;&#xA;I then painstakingly recreated the positions and sizes of the ingame Resources UI to make a UI that looks almost, but not quite, entirely like the defaults. Also I turned off the defaults. I hope these numbers are useful to someone else too.&#xD;&#xA;&#xD;&#xA;![New UI setup to mimic the ingame UI][2]&#xD;&#xA;&#xD;&#xA;Then it's just a matter of updating the numbers at appropriate times using **ResourceDialogUI.MineralsText** etc. and the &quot;Player Property&quot; getter function to get the values. To update, I simply used a Trigger that fires every .5 seconds, and it works *pretty* well.  It's not as nice as the default text, which &quot;rolls&quot; around to the real numbers, but I'm sure I could polish that.&#xD;&#xA;&#xD;&#xA;Also of note: Supply is &quot;SuppliesUsed / SuppliesMade.&quot; That took me a couple tries. I was *not* able to get the color to update to red when you need more supplies; the trigger to set the text color on the fly didn't seem to actually do anything.&#xD;&#xA;&#xD;&#xA;My map lets you join other teams on the fly, so I also added in a Trigger to change the icons to appropriate race-specific icons.  Using a local variable &quot;race&quot; which is a &quot;Game Link -&gt; Race,&quot; here's what does that:&#xD;&#xA;&#xD;&#xA;![Trigger to update race icons][3]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/I0yjf.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/57PKk.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/s0mzw.png" />
  <row Id="14461" PostHistoryTypeId="2" PostId="7217" RevisionGUID="3537ea53-6471-467d-8406-68a520dfefaa" CreationDate="2011-01-07T19:20:37.737" UserId="388" Text="One of my favorite ways to play the original StarCraft was in a &quot;Team&quot; game.  In this game type, multiple players on the same &quot;team&quot; would *share* control, resources, supply, and even the same starting location.  It was like playing as 1 player, only 2 humans were controlling it.  It was a lot of fun.&#xD;&#xA;&#xD;&#xA;I want to do something very similar in StarCraft 2, but I need to create a custom map in the Galaxy Editor to do it.&#xD;&#xA;&#xD;&#xA;I found the editor can quite easily emulate this behavior.  There is a Trigger action &quot;Set Alliance for Player Group&quot; to &quot;...treat each other as **Ally With Shared Vision, Control, And Spending**.&quot;  To use this, I create units for only 1 of the players, and then set all players to be allied with each other in this way.  All the other players get no units and no resources.  This makes it so 1 player is the actual owner of all the units and everyone else is tagging along with full control.&#xD;&#xA;&#xD;&#xA;This nearly works! The problem is that if I am not the actual owning player, I can't actually *see* how many minerals/gas/supply the team has.  This makes it pretty difficult to build stuff.&#xD;&#xA;&#xD;&#xA;What would be the best way to display to the other players how many Minerals/Gas/Supply the team has?" />
  <row Id="14462" PostHistoryTypeId="1" PostId="7217" RevisionGUID="3537ea53-6471-467d-8406-68a520dfefaa" CreationDate="2011-01-07T19:20:37.737" UserId="388" Text="How should I show shared resources during a Shared Resource game in the Galaxy Editor?" />
  <row Id="14463" PostHistoryTypeId="3" PostId="7217" RevisionGUID="3537ea53-6471-467d-8406-68a520dfefaa" CreationDate="2011-01-07T19:20:37.737" UserId="388" Text="&lt;starcraft-2&gt;" />
  <row Id="14464" PostHistoryTypeId="17" PostId="7217" RevisionGUID="d4d2c96d-bc08-47db-a37c-e3b21522fafb" CreationDate="2011-01-09T19:33:26.433" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/14096/how-should-i-show-shared-resources-during-a-shared-resource-game-in-the-galaxy-ed" Text="" />
  <row Id="14465" PostHistoryTypeId="5" PostId="7219" RevisionGUID="7ef0c046-e5ac-4f86-b7a5-a90c2bde4e65" CreationDate="2011-01-09T20:16:09.907" UserId="388" Comment="Removing migration info, a note on positioning for large supply sizes" Text="Meanwhile, I figured it out!  As @Wikwocket says, custom Dialogs are the way to go; however, here's a very detailed explanation of precisely how I did it.&#xD;&#xA;&#xD;&#xA;First off, for convenience I made a new **Record** in the Trigger Editor I called ResourceDialogUI.&#xD;&#xA;&#xD;&#xA;![New Record in the Trigger Editor][1]&#xD;&#xA;&#xD;&#xA;I also had to make a variable of type &quot;**- Record / ResourceDialogUI**,&quot; which I cleverly also called ResourceDialogUI.&#xD;&#xA;&#xD;&#xA;I then painstakingly recreated the positions and sizes of the ingame Resources UI to make a UI that looks almost, but not quite, entirely like the defaults. Also I turned off the defaults. I hope these numbers are useful to someone else too.&#xD;&#xA;&#xD;&#xA;![New UI setup to mimic the ingame UI][2]&#xD;&#xA;&#xD;&#xA;*Edit: dialogSizeX might need to be a little bigger and dialogRightBuffer correspondingly larger to account for supply sizes in the triple digits; otherwise you get ... truncation.*&#xD;&#xA;&#xD;&#xA;Then it's just a matter of updating the numbers at appropriate times using **ResourceDialogUI.MineralsText** etc. and the &quot;Player Property&quot; getter function to get the values. To update, I simply used a Trigger that fires every .5 seconds, and it works *pretty* well.  It's not as nice as the default text, which &quot;rolls&quot; around to the real numbers, but I'm sure I could polish that.&#xD;&#xA;&#xD;&#xA;Also of note: Supply is &quot;SuppliesUsed / SuppliesMade.&quot; That took me a couple tries. I was *not* able to get the color to update to red when you need more supplies; the trigger to set the text color on the fly didn't seem to actually do anything.&#xD;&#xA;&#xD;&#xA;My map lets you join other teams on the fly, so I also added in a Trigger to change the icons to appropriate race-specific icons.  Using a local variable &quot;race&quot; which is a &quot;Game Link -&gt; Race,&quot; here's what does that:&#xD;&#xA;&#xD;&#xA;![Trigger to update race icons][3]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/I0yjf.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/57PKk.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/s0mzw.png" />
  <row Id="14466" PostHistoryTypeId="2" PostId="7220" RevisionGUID="cd99407a-a4a4-48ac-86ef-c34039585414" CreationDate="2011-01-09T21:02:52.957" UserId="51" Text="Well first off I'm assuming you're doing a kind of &quot;trace&quot; like described here: http://www.realtimerendering.com/intersections.html&#xD;&#xA;&#xD;&#xA;So for a given frame you have a certain amount of velocity you want to account for.  For the sake of argument let's say you want to slide along surfaces instead of bouncing off of them.&#xD;&#xA;&#xD;&#xA;So let's say the user is pushing their point (or circle, if you want to give yourself a little more wiggle room with penetration testing) along a surface.  You might have a certain amount of movement until you hit the wall.  So place the object at the earliest intersection point you detect (but slightly offset in the opposite direction to avoid the floating point errors you mentioned).  Then in the same frame figure out the desired velocity (in our case we'd do a sliding effect by taking the remaining component of the velocity vector that's parallel to the hit surface).  In the same frame you'd attempt to move the user's point along this updated velocity vector, doing collision detections along the way.  Iterating the collisions, if you will.  You'll probably have to set some maximum number of per-frame collisions so that you don't get into some kind of near-infinite-loop situation.  This number is usually pretty small, like 5 or so.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="14467" PostHistoryTypeId="2" PostId="7221" RevisionGUID="a5dea846-405a-487c-90b4-44dbe65f0661" CreationDate="2011-01-09T21:04:55.123" UserId="2187" Text="The first part seems reasonable, and your solution also seems reasonable. The second part can be avoided by finding the closest line that intersects the path. You can't create a new collision if there is nothing closer that will collide." />
  <row Id="14468" PostHistoryTypeId="2" PostId="7222" RevisionGUID="8ec3dc0e-3d77-44e4-bd95-c49a7992dbdd" CreationDate="2011-01-10T00:18:56.047" UserId="2668" Text="While I am not aware of any XNA specific ad controls (heck, I do now even know a single Windows based ad platform at all and Google fails me; the only one I saw is/was used in FeedDemon seems to be HTML based [The Deck][1] and targeted at “creative, web and design professionals”, which might not intersect your audience…) I would assume that any Windows supporting platform could be used within an XNA game. However, it might involve quite a bit of work to get the ad rendered onto a D3D surface if the ad framework does not support it itself (and it might even be next to impossible). I would search for something that gives you raw text/image and a link to open as this would be the easiest way to integrate into your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As a side note: I have no idea how well-received an ad-supported game would be or how much revenue it could collect. The pessimist might assume that a donate PayPal button will perform better for a mid-popular game than any form of advertisement ever will…&#xD;&#xA;&#xD;&#xA;  [1]: http://decknetwork.net/" />
  <row Id="14470" PostHistoryTypeId="2" PostId="7224" RevisionGUID="683328d4-7ed2-47ca-bca7-03f517e1e16c" CreationDate="2011-01-10T00:34:05.840" UserId="2668" Text="XAPO is a rather new technology and as such not widely supported (yet). So, yes, you have to create most of your effects yourself, however it shouldn’t be too hard to port/convert the older DirectSound SFX’ (I forgot the name of that technology and if it even was related to DirectSound…).&#xD;&#xA;&#xD;&#xA;The [AppBuh DirectX &gt; Audio/XACT forum][1] and the [DirectX mailing list][2] seems to be the places to ask questions about XAudio2, even though both are rather low frequency but will get you [“access” to the devs of it][3] :)&#xD;&#xA;&#xD;&#xA; [1]: http://forums.create.msdn.com/forums/33.aspx&#xD;&#xA; [2]: http://discussms.hosting.lsoft.com/SCRIPTS/WA-MSD.EXE?A0=DIRECTXDEV&#xD;&#xA; [3]: http://forums.create.msdn.com/forums/t/8716.aspx" />
  <row Id="14471" PostHistoryTypeId="2" PostId="7225" RevisionGUID="880943c2-736b-4eab-bb47-b6e9b7c538b8" CreationDate="2011-01-10T02:26:39.790" UserId="4524" Text="If you do want to check out Blender then these links may help:&#xD;&#xA;&#xD;&#xA;Blenderartists finished games forum: http://blenderartists.org/forum/forumdisplay.php?f=39&#xD;&#xA;Blenderartists game resources forum: http://blenderartists.org/forum/forumdisplay.php?f=36&#xD;&#xA;&#xD;&#xA;Beginners thread: http://blenderartists.org/forum/showthread.php?t=196825&#xD;&#xA;&#xD;&#xA;Tutorial list thread: http://blenderartists.org/forum/showthread.php?t=11430&#xD;&#xA;&#xD;&#xA;Project Apricot open game: http://www.yofrankie.org/&#xD;&#xA;&#xD;&#xA;Personally I would wait for the next upgrade to the game engine in blender. Work seems to have been done integrating the BGE with Ogre: http://blenderartists.org/forum/showthread.php?t=155310&amp;page=29&#xD;&#xA;&#xD;&#xA;As stated by others Unity is nice to use, and although Blender has python scripting I am unsure how stable the scripting api is for the BGE whilst Unity can use javascript which is very easy to pickup.&#xD;&#xA;&#xD;&#xA;BGE = Blender game engine" />
  <row Id="14472" PostHistoryTypeId="2" PostId="7226" RevisionGUID="4a975fdb-05f5-4004-9c02-f656605f8389" CreationDate="2011-01-10T02:40:11.060" UserId="4524" Text="The following are blender tools:&#xD;&#xA;&#xD;&#xA;ANT landscape generator: http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Add_Mesh/ANT_Landscape&#xD;&#xA;&#xD;&#xA;Procedural generation of landscapes which simplifies the generation of complex terrain.&#xD;&#xA;&#xD;&#xA;Blended Cities:&#xD;&#xA;http://jerome.le.chat.free.fr/index.php/en/city-engine/news/&#xD;&#xA;&#xD;&#xA;Procedural city generation for the artist to quickly generate large cities. For my undergraduate dissertation I added city zoning to this:&#xD;&#xA;http://www.blendernation.com/2010/04/26/city-zoning-modification-for-blended-cities-script/&#xD;&#xA;&#xD;&#xA;L-system tree generator:&#xD;&#xA;http://lsystem.liquidweb.co.nz/Examples/tabid/122/Default.aspx&#xD;&#xA;&#xD;&#xA;Standalone vegetation generator: http://arbaro.sourceforge.net/&#xD;&#xA;" />
  <row Id="14473" PostHistoryTypeId="2" PostId="7227" RevisionGUID="5002d56b-ab48-4d72-9ac7-e64a594b7713" CreationDate="2011-01-10T02:50:14.823" UserId="4524" Text="You can also get left, back, bottom views. Try holding shift when using the keypad to activate those views. I would also suggest editing the images in photoshop or something similar first.&#xD;&#xA;&#xD;&#xA;The blender noob to pro wiki is a bit out of date. Its not using the most recent Blender version (2.55) and as the interface is completely different, this could be confusing.&#xD;&#xA;&#xD;&#xA;Try going to http://www.blenderatists.org/forum or irc freenode #blender for help" />
  <row Id="14474" PostHistoryTypeId="2" PostId="7228" RevisionGUID="20839299-0242-4f31-87a0-068d2d0f3c48" CreationDate="2011-01-10T06:07:59.373" UserDisplayName="jack" Text="I amgenerating a bitmap, however, I am not sure on how to render the UV's and placement. I had a thread like this once before, but it was too loosely worded as to what I was looking to do.&#xD;&#xA;&#xD;&#xA;What I am doing right now is creating a large 1024x1024 image with characters evenly placed every 64 pixels. Here is an example of what I mean. I then save the bitmap X/Y information to a file (which is all multiples of 64).&#xD;&#xA;&#xD;&#xA;However, I am not sure how to properly use this information and bitmap to render. This falls into two different categories, UV generation and kerning. Now I believe I know how to do both of these, however, when I attempt to couple them together I will get horrendous results.&#xD;&#xA;&#xD;&#xA;For example, I am trying to render two different text arrays, &quot;123&quot; and &quot;njfb&quot;. While ignoring the texture quality (I will be increasing the texture to provide more detail once I fix this issue), here is what it looks like when I try to render them.&#xD;&#xA;&#xD;&#xA;http://img64.imageshack.us/img64/599/badfontrendering.png&#xD;&#xA;&#xD;&#xA;Now for the algorithm. I am doing my letter placement with both GetABCWidth and GetKerningPairs. I am using GetABCWidth for the width of the characters, then I am getting the kerning information for adjust the characters.&#xD;&#xA;&#xD;&#xA;Does anyone have any suggestions on how I can implement my own bitmap font renderer? I am trying to do this without using external libraries such as angel bitmap tool or freetype. I also want to stick to the way the bitmap font sheet is generated so I can do extra effects in the future.&#xD;&#xA;&#xD;&#xA;Rendering Algorithm for(U32 c = 0, vertexID = 0, i = 0; c &lt; numberOfCharacters; ++c, vertexID += 4, i += 6) { ObtainCharInformation(fontName, m_Text[c]);&#xD;&#xA;&#xD;&#xA;letterWidth = (charInfo.A + charInfo.B + charInfo.C) * scale;&#xD;&#xA;&#xD;&#xA;if(c != 0)&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;    DWORD BytesReq = GetGlyphOutlineW(dc, m_Text[c], GGO_GRAY8_BITMAP, &amp;gm, 0, 0, &amp;mat);&#xD;&#xA;    U8 * glyphImg= new U8[BytesReq];&#xD;&#xA;    DWORD r = GetGlyphOutlineW(dc, m_Text[c], GGO_GRAY8_BITMAP, &amp;gm, BytesReq, glyphImg, &amp;mat);&#xD;&#xA;&#xD;&#xA;    for (int k=0; k&lt;nKerningPairs; k++)&#xD;&#xA;    {&#xD;&#xA;        if ((kerningpairs[k].wFirst == previousCharIndex) &amp;&amp; (kerningpairs[k].wSecond == m_Text[c])) {&#xD;&#xA;            letterBottomLeftX += (kerningpairs[k].iKernAmount * scale);&#xD;&#xA;            break;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    letterBottomLeftX -= (gm.gmCellIncX * scale);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;SetVertex(letterBottomLeftX, 0.0f, zFight, vertexID);&#xD;&#xA;SetVertex(letterBottomLeftX, letterHeight, zFight, vertexID + 1);&#xD;&#xA;SetVertex(letterBottomLeftX + letterWidth, letterHeight, zFight, vertexID + 2);&#xD;&#xA;SetVertex(letterBottomLeftX + letterWidth, 0.0f, zFight, vertexID + 3);&#xD;&#xA;zFight -= 0.001f;&#xD;&#xA;&#xD;&#xA;float BottomLeftX = (F32)(charInfo.bitmapXOrigin) / (float)m_BitmapWidth;&#xD;&#xA;float BottomLeftY = (F32)(charInfo.bitmapYOrigin + charInfo.charBitmapHeight) / (float)m_BitmapWidth;&#xD;&#xA;&#xD;&#xA;float TopLeftX = BottomLeftX;&#xD;&#xA;float TopLeftY = (F32)(charInfo.bitmapYOrigin) / (float)m_BitmapWidth;&#xD;&#xA;&#xD;&#xA;float TopRightX = (F32)(charInfo.bitmapXOrigin + charInfo.B - charInfo.C) / (float)m_BitmapWidth;&#xD;&#xA;float TopRightY = TopLeftY;&#xD;&#xA;&#xD;&#xA;float BottomRightX = TopRightX;&#xD;&#xA;float BottomRightY = BottomLeftY;&#xD;&#xA;&#xD;&#xA;SetTextureCoordinate(TopLeftX, TopLeftY, vertexID + 1);&#xD;&#xA;SetTextureCoordinate(BottomLeftX, BottomLeftY, vertexID + 0);&#xD;&#xA;SetTextureCoordinate(BottomRightX, BottomRightY, vertexID + 3);&#xD;&#xA;SetTextureCoordinate(TopRightX, TopRightY, vertexID + 2);&#xD;&#xA;&#xD;&#xA;/// index setting&#xD;&#xA;&#xD;&#xA;letterBottomLeftX += letterWidth;&#xD;&#xA;&#xD;&#xA;previousCharIndex = m_Text[c];&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;Bitmap font rendering, UV generation and vertex placement" />
  <row Id="14475" PostHistoryTypeId="1" PostId="7228" RevisionGUID="20839299-0242-4f31-87a0-068d2d0f3c48" CreationDate="2011-01-10T06:07:59.373" UserDisplayName="jack" Text="Bitmap font rendering, UV generation and vertex placement" />
  <row Id="14476" PostHistoryTypeId="3" PostId="7228" RevisionGUID="20839299-0242-4f31-87a0-068d2d0f3c48" CreationDate="2011-01-10T06:07:59.373" UserDisplayName="jack" Text="&lt;c++&gt;&lt;graphics&gt;&lt;c#&gt;&lt;algorithm&gt;&lt;rendering&gt;" />
  <row Id="14477" PostHistoryTypeId="2" PostId="7229" RevisionGUID="0317b2e8-5281-44ff-b62c-e7bd632b7969" CreationDate="2011-01-10T06:24:21.683" UserId="2158" Text="I have never tried this myself, but it looks like a very interesting way to generate spherical landscapes.&#xD;&#xA;http://freespace.virgin.net/hugo.elias/models/m_landsp.htm" />
  <row Id="14478" PostHistoryTypeId="5" PostId="7228" RevisionGUID="1b20fd94-1600-4e50-a727-9217c517b1e1" CreationDate="2011-01-10T06:57:04.197" UserId="51" Comment="added 384 characters in body" Text="I am generating a bitmap, however, I am not sure on how to render the UV's and placement. I had a thread like this once before, but it was too loosely worded as to what I was looking to do.&#xD;&#xA;&#xD;&#xA;What I am doing right now is creating a large 1024x1024 image with characters evenly placed every 64 pixels. Here is an example of what I mean. I then save the bitmap X/Y information to a file (which is all multiples of 64).&#xD;&#xA;&#xD;&#xA;However, I am not sure how to properly use this information and bitmap to render. This falls into two different categories, UV generation and kerning. Now I believe I know how to do both of these, however, when I attempt to couple them together I will get horrendous results.&#xD;&#xA;&#xD;&#xA;For example, I am trying to render two different text arrays, &quot;123&quot; and &quot;njfb&quot;. While ignoring the texture quality (I will be increasing the texture to provide more detail once I fix this issue), here is what it looks like when I try to render them.&#xD;&#xA;&#xD;&#xA;http://img64.imageshack.us/img64/599/badfontrendering.png&#xD;&#xA;&#xD;&#xA;Now for the algorithm. I am doing my letter placement with both GetABCWidth and GetKerningPairs. I am using GetABCWidth for the width of the characters, then I am getting the kerning information for adjust the characters.&#xD;&#xA;&#xD;&#xA;Does anyone have any suggestions on how I can implement my own bitmap font renderer? I am trying to do this without using external libraries such as angel bitmap tool or freetype. I also want to stick to the way the bitmap font sheet is generated so I can do extra effects in the future.&#xD;&#xA;&#xD;&#xA;Rendering Algorithm &#xD;&#xA;&#xD;&#xA;    for(U32 c = 0, vertexID = 0, i = 0; c &lt; numberOfCharacters; ++c, vertexID += 4, i += 6) &#xD;&#xA;    { &#xD;&#xA;        &#xD;&#xA;        ObtainCharInformation(fontName, m_Text[c]);&#xD;&#xA;        &#xD;&#xA;        letterWidth = (charInfo.A + charInfo.B + charInfo.C) * scale;&#xD;&#xA;        &#xD;&#xA;        if(c != 0)&#xD;&#xA;        {&#xD;&#xA;        &#xD;&#xA;            DWORD BytesReq = GetGlyphOutlineW(dc, m_Text[c], GGO_GRAY8_BITMAP, &amp;gm, 0, 0, &amp;mat);&#xD;&#xA;            U8 * glyphImg= new U8[BytesReq];&#xD;&#xA;            DWORD r = GetGlyphOutlineW(dc, m_Text[c], GGO_GRAY8_BITMAP, &amp;gm, BytesReq, glyphImg, &amp;mat);&#xD;&#xA;        &#xD;&#xA;            for (int k=0; k&lt;nKerningPairs; k++)&#xD;&#xA;            {&#xD;&#xA;                if ((kerningpairs[k].wFirst == previousCharIndex) &amp;&amp; (kerningpairs[k].wSecond == m_Text[c])) {&#xD;&#xA;                    letterBottomLeftX += (kerningpairs[k].iKernAmount * scale);&#xD;&#xA;                    break;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        &#xD;&#xA;            letterBottomLeftX -= (gm.gmCellIncX * scale);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        SetVertex(letterBottomLeftX, 0.0f, zFight, vertexID);&#xD;&#xA;        SetVertex(letterBottomLeftX, letterHeight, zFight, vertexID + 1);&#xD;&#xA;        SetVertex(letterBottomLeftX + letterWidth, letterHeight, zFight, vertexID + 2);&#xD;&#xA;        SetVertex(letterBottomLeftX + letterWidth, 0.0f, zFight, vertexID + 3);&#xD;&#xA;        zFight -= 0.001f;&#xD;&#xA;        &#xD;&#xA;        float BottomLeftX = (F32)(charInfo.bitmapXOrigin) / (float)m_BitmapWidth;&#xD;&#xA;        float BottomLeftY = (F32)(charInfo.bitmapYOrigin + charInfo.charBitmapHeight) / (float)m_BitmapWidth;&#xD;&#xA;        &#xD;&#xA;        float TopLeftX = BottomLeftX;&#xD;&#xA;        float TopLeftY = (F32)(charInfo.bitmapYOrigin) / (float)m_BitmapWidth;&#xD;&#xA;        &#xD;&#xA;        float TopRightX = (F32)(charInfo.bitmapXOrigin + charInfo.B - charInfo.C) / (float)m_BitmapWidth;&#xD;&#xA;        float TopRightY = TopLeftY;&#xD;&#xA;        &#xD;&#xA;        float BottomRightX = TopRightX;&#xD;&#xA;        float BottomRightY = BottomLeftY;&#xD;&#xA;        &#xD;&#xA;        SetTextureCoordinate(TopLeftX, TopLeftY, vertexID + 1);&#xD;&#xA;        SetTextureCoordinate(BottomLeftX, BottomLeftY, vertexID + 0);&#xD;&#xA;        SetTextureCoordinate(BottomRightX, BottomRightY, vertexID + 3);&#xD;&#xA;        SetTextureCoordinate(TopRightX, TopRightY, vertexID + 2);&#xD;&#xA;        &#xD;&#xA;        /// index setting&#xD;&#xA;        &#xD;&#xA;        letterBottomLeftX += letterWidth;&#xD;&#xA;        &#xD;&#xA;        previousCharIndex = m_Text[c];&#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14479" PostHistoryTypeId="2" PostId="7230" RevisionGUID="47dcf68b-7bda-4740-b305-5cae1c6e75f1" CreationDate="2011-01-10T08:19:07.120" UserId="3818" Text="I'm working on a ragdoll fighting game as a hobby project, but I have one dilemma. I am not sure if my ragdoll should collide with itself or not, i.e. if ragdoll's body parts should collide. &#xD;&#xA;&#xD;&#xA;2D world is somewhat different than 3D, because there are several layers of stuff implied (for example in Super Mario you jump through a platform above you while going up).&#xD;&#xA;&#xD;&#xA;The setup I'm currently most satisfied with is when only the parts which are joined by a joint don't collide, so head doesn't collide with neck, neck with chest, chest with upper arm etc, but the head can collide with chest, arms, legs.&#xD;&#xA;&#xD;&#xA;I've tried every different way, but I'm not content with either. Which way would recommend me to go? " />
  <row Id="14480" PostHistoryTypeId="1" PostId="7230" RevisionGUID="47dcf68b-7bda-4740-b305-5cae1c6e75f1" CreationDate="2011-01-10T08:19:07.120" UserId="3818" Text="2D Ragdoll - should it collide with itself?" />
  <row Id="14481" PostHistoryTypeId="3" PostId="7230" RevisionGUID="47dcf68b-7bda-4740-b305-5cae1c6e75f1" CreationDate="2011-01-10T08:19:07.120" UserId="3818" Text="&lt;2d-physics&gt;" />
  <row Id="14482" PostHistoryTypeId="2" PostId="7231" RevisionGUID="87ce9ebc-8b9f-4aaa-832e-4d43deb5a2e1" CreationDate="2011-01-10T09:00:03.623" UserId="51" Text="It depends on the style of game and the &quot;perspective&quot; you're going for, really. For the sake of argument I'm assuming your game is a pure side view instead of top down or faked perspective (think castle crashers or final fight). &#xD;&#xA;&#xD;&#xA;Generally I would think you wouldn't want anything to collide. In a pure 2d game you aren't really going to be able to pull off what you might need self collision for anyway, like the body landing on it's side, or legs getting twisted up.  Now you could do that with a 3G game played in 2d, but I'm guessing that's not the point. " />
  <row Id="14483" PostHistoryTypeId="2" PostId="7232" RevisionGUID="eee44d1a-be1f-4778-ac13-d0fbd8d68f3d" CreationDate="2011-01-10T09:00:18.643" UserId="20" Text="I'm not an expert when it comes to ragdolls but when I think &quot;2D fighting game&quot; I imagine seeing the fighters from the side.&#xD;&#xA;&#xD;&#xA;So colliding legs won't work or the poor guys/gals won't even be able to walk. Also the arms shouldn't collide with the torso (because of the side-view). The limbs should collide with the head though, so that if a player has raised his arms in defense and gets hit, the arms will hit the head.&#xD;&#xA;&#xD;&#xA;It probably helps to think in layers. The arms are on another layer than the legs or the torso and therefore don't collide. You wouldn't want the arms to be affected by a kick.&#xD;&#xA;&#xD;&#xA;I'd probably setup the collision group as follows:&#xD;&#xA;&#xD;&#xA; - Head collides with everything. &#xD;&#xA; - Arms collide with head.&#xD;&#xA; - Legs collide with torso and head&#xD;&#xA;&#xD;&#xA;It's probably best to reduce the amount of possible collisions within a ragdoll to a minimum and just work with joint constraints.&#xD;&#xA;And of course playerA collides with playerB." />
  <row Id="14484" PostHistoryTypeId="2" PostId="7233" RevisionGUID="4b481a69-e4a3-4046-8eeb-7f5f6ded5cce" CreationDate="2011-01-10T10:08:48.523" UserId="259" Text="I agree with most answerers that sometimes spreadsheets can make decent dev tools, especially for designers.&#xD;&#xA;&#xD;&#xA;If you are interested in taking this approach further, the [Resolver One][1] spreadsheet program uses python for scripting, making it easy to set up a spreadsheet for designers that both does complex modelling and exporting to a game-friendly data format. I find it much easier to work with than Excel's VBScript.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.resolversystems.com/" />
  <row Id="14485" PostHistoryTypeId="2" PostId="7234" RevisionGUID="8b654404-8460-45e4-b0b5-32241b6f11a7" CreationDate="2011-01-10T11:39:58.137" UserId="3232" Text="this is like a complement for http://gamedev.stackexchange.com/questions/801/assets-management-database-or-versioning-system/811#811.&#xD;&#xA;&#xD;&#xA;I am wondering about how to separate development, specially programmers assets from production assets? &#xD;&#xA;&#xD;&#xA;For example, if we keep all the assets on the same repository, how do you keep with programmers assets and final game assets? Do you keep a separate directory for each of those, allowing duplicates? Or do you use some fancy scheme for striping out the &quot;development&quot; and &quot;test&quot; assets from final build?" />
  <row Id="14486" PostHistoryTypeId="1" PostId="7234" RevisionGUID="8b654404-8460-45e4-b0b5-32241b6f11a7" CreationDate="2011-01-10T11:39:58.137" UserId="3232" Text="How to separate production and test assets during development?" />
  <row Id="14487" PostHistoryTypeId="3" PostId="7234" RevisionGUID="8b654404-8460-45e4-b0b5-32241b6f11a7" CreationDate="2011-01-10T11:39:58.137" UserId="3232" Text="&lt;assets&gt;&lt;indie&gt;&lt;testing&gt;&lt;management&gt;" />
  <row Id="14488" PostHistoryTypeId="2" PostId="7235" RevisionGUID="e51cdad5-0772-4bc8-94d6-b48bebd6a4f8" CreationDate="2011-01-10T12:13:31.577" UserId="3794" Text="If i understand well. In my team we use SVN. If you didn't know, you can also create branches in SVN. So it is simple. We create branch for every release we do. Then we have &#xD;&#xA;releases untouched and marked in same system we are using. " />
  <row Id="14489" PostHistoryTypeId="2" PostId="7236" RevisionGUID="c423d3bf-55ef-4956-9ad7-cfe1aa6284b9" CreationDate="2011-01-10T13:00:26.510" UserDisplayName="Abhishek" Text="I am trying to move the object around the screen&#xD;&#xA;&#xD;&#xA;I try this code &#xD;&#xA;&#xD;&#xA;    -(void) move&#xD;&#xA;    {&#xD;&#xA;    CGFloat upperLimit = mWinSize.height - (mGunda.contentSize.height / 2.0);&#xD;&#xA;     CGFloat upperLimit1 = mWinSize.height;&#xD;&#xA;     CGFloat lowerLimit = (mGunda.contentSize.height / 2.0);&#xD;&#xA;    CGFloat RightLimit = mWinSize.width - (mGunda.contentSize.width/2.0);&#xD;&#xA;     CGFloat Right = (mGunda.contentSize.width/2.0);&#xD;&#xA;    &#xD;&#xA;    if ( mImageGoingUpward ) &#xD;&#xA;     {&#xD;&#xA;     &#xD;&#xA;     mGunda.position = ccp( mGunda.position.x, mGunda.position.y + 5);&#xD;&#xA;    &#xD;&#xA;    if ( mGunda.position.y &gt;= upperLimit ) &#xD;&#xA;      {&#xD;&#xA;       &#xD;&#xA;       mImageGoingUpward = NO;&#xD;&#xA;       mHori = NO;&#xD;&#xA;     }&#xD;&#xA;     }&#xD;&#xA;     else&#xD;&#xA;     {&#xD;&#xA;      mGunda.position = ccp( mGunda.position.x, mGunda.position.y - 5);&#xD;&#xA;    if ( mGunda.position.y &lt;= lowerLimit )&#xD;&#xA;      {&#xD;&#xA;       mGunda.position = ccp(mGunda.position.x +5, lowerLimit);&#xD;&#xA;       &#xD;&#xA;      }&#xD;&#xA;      if(mGunda.position.x &gt;= RightLimit) &#xD;&#xA;      {&#xD;&#xA;    mGunda.position = ccp(mGunda.position.x, mGunda.position.y+10);&#xD;&#xA;       &#xD;&#xA;       &#xD;&#xA;       &#xD;&#xA;       mHori = YES;   &#xD;&#xA;          &#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;           if(mHori)&#xD;&#xA;     {&#xD;&#xA;     if(mGunda.position.y &gt;= upperLimit)&#xD;&#xA;     {&#xD;&#xA;     mGunda.position = ccp(mGunda.position.x - 5,mGunda.position.y);&#xD;&#xA;          }&#xD;&#xA;        }  &#xD;&#xA;      }   &#xD;&#xA;     }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It move the object from bottom to top &amp; top to bottom &amp; bottom to right &amp; right to right top of the screen here is problem I have got It not move to the right top to left side of screen this rotationis not happen.&#xD;&#xA;How can I do this &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14490" PostHistoryTypeId="1" PostId="7236" RevisionGUID="c423d3bf-55ef-4956-9ad7-cfe1aa6284b9" CreationDate="2011-01-10T13:00:26.510" UserDisplayName="Abhishek" Text="How to move the object around the screen" />
  <row Id="14491" PostHistoryTypeId="3" PostId="7236" RevisionGUID="c423d3bf-55ef-4956-9ad7-cfe1aa6284b9" CreationDate="2011-01-10T13:00:26.510" UserDisplayName="Abhishek" Text="&lt;iphone&gt;" />
  <row Id="14492" PostHistoryTypeId="17" PostId="7236" RevisionGUID="60571085-7869-46a3-b8ec-502db2ef20cd" CreationDate="2011-01-10T13:38:22.180" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/14278/how-to-move-the-object-around-the-screen" Text="" />
  <row Id="14493" PostHistoryTypeId="2" PostId="7237" RevisionGUID="df7f0ae8-1aa6-4a16-af8d-e41f5f2441a7" CreationDate="2011-01-10T13:45:14.730" UserId="744" Text="At my last job we prefaced everything that was development-only with _, and the support for that convention ran into the lowest levels of our filesystem handling code in the game, like directory listing and our file opening wrappers. Test and development-only assets were just checked into the same RCS repository as the real game data.&#xD;&#xA;&#xD;&#xA;So for example,&#xD;&#xA;&#xD;&#xA;    # This is always loaded&#xD;&#xA;    data/texture_library/titlescreen.tex &#xD;&#xA;    data/spells/magicmissile.spell&#xD;&#xA;&#xD;&#xA;    # These are only loaded in development mode.&#xD;&#xA;    data/texture_library/foo.tex &#xD;&#xA;    data/spells/_testmissile.spell&#xD;&#xA;    data/spells/_testing/fireball.spell&#xD;&#xA;&#xD;&#xA;It's a very simple convention, but was easy to use with other tools (grep, one-off Perl scripts, etc.), and straightforward for everyone on the project to understand." />
  <row Id="14494" PostHistoryTypeId="2" PostId="7238" RevisionGUID="99301aaa-8b59-4c29-8901-1b149b6de9fd" CreationDate="2011-01-10T13:46:36.397" UserId="3599" Text="- [Ivy][1] Complex vegetation generator&#xD;&#xA;&#xD;&#xA;- [Sculptris][2] .Absolutely great as a free option for Zbrush like modeling, some even prefer it in its area to the giant tool&#xD;&#xA;&#xD;&#xA;- [xNormal][3]. Free, and not just the usual normal map generator. It creates normal maps, ambient occlusion maps, displacement, and much more cool stuff.&#xD;&#xA;&#xD;&#xA;- [InstallBuilder][4] for making cross platform installers.&#xD;&#xA;&#xD;&#xA;- [Clarisse][5]. Sort of quite a time cutter for so many things, but seems is gonna be expensive. In  the line of what you asked for, maybe.&#xD;&#xA;&#xD;&#xA;- [Havok][6] physics and AI&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://graphics.uni-konstanz.de/~luft/ivy_generator/&#xD;&#xA;  [2]: http://www.sculptris.com&#xD;&#xA;  [3]: http://www.xnormal.net&#xD;&#xA;  [4]: http://installbuilder.bitrock.com&#xD;&#xA;  [5]: http://www.isotropix.com/clarisse.php&#xD;&#xA;  [6]: http://www.havok.com" />
  <row Id="14495" PostHistoryTypeId="2" PostId="7239" RevisionGUID="1037f32d-bf17-4175-8499-c17792c8bf63" CreationDate="2011-01-10T13:47:23.403" UserDisplayName="user4542" Text="I'm making a Sokoban-like game i.e. there's a grid that has some crates on it you can push and you have to get the crates on crosses to win the level (although I'm going to add some extra elements to it). Are there any general algorithms or reading material I can look at for  how I could go about generating interesting (as in, not trivial to solve) levels for this style of game? I'm aware that random level generators exist for Sokoban but I'm having trouble finding the algorithm descriptions.&#xD;&#xA;&#xD;&#xA;I'm interested in making a game where the machine can generate lots of levels for me, sorted by difficulty. I'm even willing to constrain the rules of the game to make the level generation easier (e.g. I'll probably limit the grid size to about 7x7). I suspect there are some general ways to do level generation here as I've seen e.g. Traffic Jam-like games (where you have to move blocks around the free some block) with 1000s of levels where each one has a unique solution.&#xD;&#xA;&#xD;&#xA;One idea I had was to generate a random map in its final state (i.e. where all crates are on top of their crosses) and then the computer would pull (instead of push) these crates around to create a level. The nice property here is that we know the level is solvable. However, I'd need some heuristics to ensure the level was interesting." />
  <row Id="14496" PostHistoryTypeId="1" PostId="7239" RevisionGUID="1037f32d-bf17-4175-8499-c17792c8bf63" CreationDate="2011-01-10T13:47:23.403" UserDisplayName="user4542" Text="Random generation of interesting puzzle levels?" />
  <row Id="14497" PostHistoryTypeId="3" PostId="7239" RevisionGUID="1037f32d-bf17-4175-8499-c17792c8bf63" CreationDate="2011-01-10T13:47:23.403" UserDisplayName="user4542" Text="&lt;game-design&gt;&lt;level-design&gt;&lt;random&gt;&lt;puzzle&gt;&lt;procedural&gt;" />
  <row Id="14498" PostHistoryTypeId="2" PostId="7240" RevisionGUID="db49185a-65ce-41d3-a99c-79ee265639ac" CreationDate="2011-01-10T14:53:00.593" UserId="3697" Text="Again - the perspective, PoV, matters. But I imagine a fighting game just like Tekken or Street Fighter.&#xD;&#xA;&#xD;&#xA;In that case - there probably should be some layers, from front to the back.&#xD;&#xA;&#xD;&#xA;Front layer would (for example) have right arm of the fighting figure, as well as the whole right leg. Assuming he is facing an opponent to the right of him on the screen. Middle layer would be head and torso, and finally the layer furthest from the camera would contain the rest.&#xD;&#xA;&#xD;&#xA;The layers would not collide with each other - otherwise the figure would not be able to walk.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But this makes me think - there is no point for collision detection at this point. Player would most likely be in a standard boxing pose, which means that the wrist should not collide with the shoulder - it would be hard to make an arm bend otherwise.&#xD;&#xA;&#xD;&#xA;This can be fixed by splitting both the wrist and the shoulder into two sub-parts, which would not collide at the elbow joint. It would also enable stuff like breaking arms possible, but this is quite a lot of work.&#xD;&#xA;&#xD;&#xA;For the legs - the same, because they wouldn't bend normally otherwise.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The final answer IMO is ***no***, but IF you want to invest some more time into stuff like fractures and realism, yes." />
  <row Id="14499" PostHistoryTypeId="2" PostId="7241" RevisionGUID="b268e17f-4179-45aa-990a-f3b56ddabc75" CreationDate="2011-01-10T14:58:35.100" UserId="2091" Text="[Automatic making of Sokoban problems (pdf via google docs via google cache)][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/url?sa=t&amp;source=web&amp;cd=3&amp;ved=0CCcQxQEwAg&amp;url=http%3A%2F%2Fdocs.google.com%2Fviewer%3Fa%3Dv%26q%3Dcache%3AlmOC-0pv3NgJ%3Aciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%253Fdoi%253D10.1.1.47.2303%2526rep%253Drep1%2526type%253Dpdf%2Bautomatic%2Bmaking%2Bof%2Bsokoban%2Bproblems%26hl%3Den%26pid%3Dbl%26srcid%3DADGEESizjB5-G7sRvF4IWAq5M9dSasVBc1gB2Z-gJACBYKdVH_s7eXN0rSh-oo372MDgx9TSfUgqq7tsThx8LZtwzJn61rty6Nj6JcLW9Qs0m6N3TrmBkBsin-dZWfCSWVLNfIZzUsbc%26sig%3DAHIEtbQWS_jYJZOlDgo8ocyH05fNKwfsMw&amp;rct=j&amp;q=automatic%20making%20of%20sokoban%20problems&amp;ei=4R4rTYWKBNCbOrzQ8ZwL&amp;usg=AFQjCNGHaqd7KvI6Ol_E7oESg4-CDoKLxg&amp;sig2=BuN4L6ECqB1pypcve5luzA&amp;cad=rja" />
  <row Id="14500" PostHistoryTypeId="2" PostId="7242" RevisionGUID="82f3019c-25e3-45c6-9639-da2f29d8fff1" CreationDate="2011-01-10T15:23:30.347" UserId="3536" Text="How do I apply an arcball (using quaternions) along with mouse events, to allow the user to look around the screen using the o3d webgl framework?&#xD;&#xA;&#xD;&#xA;This sample (http://code.google.com/p/o3d/source/browse/trunk/samples_webgl/o3d-webgl-samples/simpleviewer/simpleviewer.html?r=215) uses the arcball for rotating the transform of an &quot;object&quot;, but rather than apply this to a transform, I would like to apply the rotation to the camera's target, to create a first person style ability to look around the scene, as if the camera is inside the centre of the arcball instead of rotating from the outside.&#xD;&#xA;&#xD;&#xA;The code that is used in this sample is&#xD;&#xA;&#xD;&#xA;    var rotationQuat = g_aball.drag([e.x, e.y]);&#xD;&#xA;    var rot_mat = g_quaternions.quaternionToRotation(rotationQuat);&#xD;&#xA;    g_thisRot = g_math.matrix4.mul(g_lastRot, rot_mat);&#xD;&#xA;&#xD;&#xA;The code that I am using which doesn't work&#xD;&#xA;&#xD;&#xA;    var rotationQuat = g_aball.drag([e.x, e.y]);&#xD;&#xA;    var rot_mat = g_quaternions.quaternionToRotation(rotationQuat);&#xD;&#xA;    g_thisRot = g_math.matrix4.mul(g_lastRot, rot_mat);&#xD;&#xA;&#xD;&#xA;    var cameraRotationMatrix4 = g_math.matrix4.lookAt(g_eye, g_target, [g_up[0], g_up[1] * -1, g_up[2]]);&#xD;&#xA;    var cameraRotation = g_math.matrix4.setUpper3x3(cameraRotationMatrix4,g_thisRot);&#xD;&#xA;    g_target = g_math.addVector(cameraRotation, g_target);&#xD;&#xA;where am I going wrong?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="14501" PostHistoryTypeId="1" PostId="7242" RevisionGUID="82f3019c-25e3-45c6-9639-da2f29d8fff1" CreationDate="2011-01-10T15:23:30.347" UserId="3536" Text="How do I apply an arcball (using quaternions) along with mouse events, to allow the user to look around the screen using the o3d webgl framework?" />
  <row Id="14502" PostHistoryTypeId="3" PostId="7242" RevisionGUID="82f3019c-25e3-45c6-9639-da2f29d8fff1" CreationDate="2011-01-10T15:23:30.347" UserId="3536" Text="&lt;3d&gt;&lt;javascript&gt;&lt;html5&gt;&lt;webgl&gt;" />
  <row Id="14505" PostHistoryTypeId="5" PostId="7238" RevisionGUID="6df6eaf9-3d20-4839-b87e-dd236d04200a" CreationDate="2011-01-10T15:38:54.870" UserId="744" Comment="Remove non-open-source projects." Text="- [Ivy][1] Complex vegetation generator&#xD;&#xA;&#xD;&#xA;  [1]: http://graphics.uni-konstanz.de/~luft/ivy_generator/&#xD;&#xA;" />
  <row Id="14506" PostHistoryTypeId="5" PostId="5782" RevisionGUID="db06eaf9-4f3c-4c5e-b27c-120cbf47e6bd" CreationDate="2011-01-10T15:42:09.437" UserId="744" Comment="Remove non-open-source projects." Text="I think [OpenGL][1] and [OpenAL][2] are extremely obvious, but beyond that...&#xD;&#xA;&#xD;&#xA;API&#xD;&#xA;&#xD;&#xA; - [Bullet][3] 3D Physics engine, used in AAA titles&#xD;&#xA; - [Chipmunk][4] Flexible and Powerful 2D Physics engine in straight C&#xD;&#xA; - [Box2D][5] Another robust and popular 2D physics engine&#xD;&#xA; - [FPMath][6] C++ template based math library, specifically for dealing with Fixed Point arithmetic (requires [Boost][7])&#xD;&#xA; - [OpenSteer][8] Steering Behaviors for Autonomous Characters&#xD;&#xA; - [Xiph][9] home of lots of open source audio and video alternatives like Vorbis and Theora&#xD;&#xA;&#xD;&#xA;Tools&#xD;&#xA;&#xD;&#xA; - [Blender][10] 3D Modeling Tool with a great deal of functionality and support for many different file formats&#xD;&#xA; - [Gimp][12] 2D Raster image manipulation, very robust feature set&#xD;&#xA; - [Inkscape][13] 2D Vector image manipulation, based on SVG&#xD;&#xA; - [sfxr][14] Sound effect generator, great if you're in a hurry or don't have an audio specialist&#xD;&#xA; - [FFMpeg][15] record, convert and stream audio and video&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [RakNet][16] cross platform, open source, networking engine for game programmers (RakNet 4 is free for independent Developers that gross $50K or less)&#xD;&#xA; - [Irrlicht][17] open source high performance realtime 3D engine written and usable in C++ and also available for .NET languages.&#xD;&#xA; - [Ogre3D][18] One of the most popular open source game engines, and for good reason&#xD;&#xA;&#xD;&#xA;Mobile Specific (since that's what I'm into at the moment)&#xD;&#xA;&#xD;&#xA; - [Oolong][20] game engine that includes much of the above mentioned, optimized for PowerVR on the iphone, maintained by [Wolfgang Engel][21] and [Erwin Coumans][22] of Grand Theft Auto fame&#xD;&#xA; - [Cocos2D][23] free Objective-C based iPhone specific port of the Python original, very easy to use and lots of community support&#xD;&#xA; - [VFPMath][24] Crazy fast math library written mostly with inline assembly to take advantage of the ARM processor&#xD;&#xA; - [AndEngine][25] 2D OpenGL Game Engine for Android&#xD;&#xA;&#xD;&#xA;More Exotic:&#xD;&#xA;&#xD;&#xA; - [Canonical Multitouch][26] Gesturing system for all multitouch input devices and more&#xD;&#xA; - [1 dollar][27] and [N dollar][28] stroke recognition systems.  Links are for javascript implementations, but they have been ported to many other languages&#xD;&#xA; - [OpenFoam][29] Computational Fluid Dynamics (CFD) library in C++, see also [FireFOAM][30] an extension for modeling fire&#xD;&#xA; - [Moody][31] an n-Model body development framework I found interesting, primary usage would be Celestial Mechanics and Astrodynamics.  Includes a viewer tool for files.&#xD;&#xA; - [ofxMSAFluid][32] Fluid dynamics simulation framework&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/&#xD;&#xA;  [2]: http://connect.creativelabs.com/openal/default.aspx&#xD;&#xA;  [3]: http://bulletphysics.org/wordpress/&#xD;&#xA;  [4]: http://code.google.com/p/chipmunk-physics/&#xD;&#xA;  [5]: http://www.box2d.org/&#xD;&#xA;  [6]: http://code.google.com/p/fpmath/&#xD;&#xA;  [7]: http://www.boost.org/&#xD;&#xA;  [8]: http://opensteer.sourceforge.net/&#xD;&#xA;  [9]: http://www.xiph.org/&#xD;&#xA;  [10]: http://www.blender.org/&#xD;&#xA;  [12]: http://www.gimp.org/&#xD;&#xA;  [13]: http://inkscape.org/&#xD;&#xA;  [14]: http://www.drpetter.se/project_sfxr.html&#xD;&#xA;  [15]: http://www.ffmpeg.org/&#xD;&#xA;  [16]: http://www.jenkinssoftware.com/&#xD;&#xA;  [17]: http://irrlicht.sourceforge.net/&#xD;&#xA;  [18]: http://www.ogre3d.org/&#xD;&#xA;  [20]: http://code.google.com/p/oolongengine/&#xD;&#xA;  [21]: http://www.mobygames.com/developer/sheet/view/developerId,158706/&#xD;&#xA;  [22]: http://www.mobygames.com/developer/sheet/view/developerId,182064/&#xD;&#xA;  [23]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [24]: http://code.google.com/p/vfpmathlibrary/&#xD;&#xA;  [25]: http://code.google.com/p/andengine/&#xD;&#xA;  [26]: https://launchpad.net/canonical-multitouch&#xD;&#xA;  [27]: http://depts.washington.edu/aimgroup/proj/dollar/&#xD;&#xA;  [28]: http://depts.washington.edu/aimgroup/proj/dollar/ndollar.html&#xD;&#xA;  [29]: http://www.openfoam.com/&#xD;&#xA;  [30]: http://code.google.com/p/firefoam-dev/&#xD;&#xA;  [31]: http://moody.politespider.com/index.php&#xD;&#xA;  [32]: http://memo.tv/ofxmsafluid" />
  <row Id="14507" PostHistoryTypeId="2" PostId="7243" RevisionGUID="d755aba0-0ba6-431e-8122-e1098ee7a7c4" CreationDate="2011-01-10T16:30:58.643" UserId="4545" Text="Another reason so use spritesheets with XNA is that with Xbox360 development there's a known issue with slow deploy/load times in relation to the number of files you have in your project. So combining lots of small image files into a single image file will help combat that issue. " />
  <row Id="14508" PostHistoryTypeId="2" PostId="7244" RevisionGUID="292f2208-7f2e-4b02-bc41-0c1e026c4b90" CreationDate="2011-01-10T16:35:03.957" UserId="1743" Text="At present I load my font for my game in with `@font-face`&#xD;&#xA;&#xD;&#xA;For instance:&#xD;&#xA;&#xD;&#xA;    @font-face {&#xD;&#xA;        font-family: 'Orbitron';&#xD;&#xA;        src: url('res/orbitron-medium.ttf');&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and then reference it throughout my JS implementation as such:&#xD;&#xA;&#xD;&#xA;    ctx.font = &quot;12pt Orbitron&quot;;&#xD;&#xA;&#xD;&#xA;where ctx is my 2d context from the canvas.&#xD;&#xA;&#xD;&#xA;However, I notice a certain lag time while the font is downloaded to the user.  Is there a way I can use a default font until it is loaded in?" />
  <row Id="14509" PostHistoryTypeId="1" PostId="7244" RevisionGUID="292f2208-7f2e-4b02-bc41-0c1e026c4b90" CreationDate="2011-01-10T16:35:03.957" UserId="1743" Text="HTML5 - check if font has loaded" />
  <row Id="14510" PostHistoryTypeId="3" PostId="7244" RevisionGUID="292f2208-7f2e-4b02-bc41-0c1e026c4b90" CreationDate="2011-01-10T16:35:03.957" UserId="1743" Text="&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="14511" PostHistoryTypeId="2" PostId="7245" RevisionGUID="c13196be-923a-4e9f-9295-df2dad7363d2" CreationDate="2011-01-10T16:41:05.067" UserId="3536" Text="If you are interested in an innovative 3D framework, checkout [Google's O3D][1] that allows development of 3D games for WebGL compatible browsers, such as Chrome 9 (beta), Firefox's nighly build; Minefield &amp; Safari WebKit (iPhone)&#xD;&#xA;&#xD;&#xA;Checkout [this video][2] of the body browser made with this new technology if you don't yet have one of these browsers :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/o3d/wiki/GettingStarted&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=BIckuRRR-DE" />
  <row Id="14513" PostHistoryTypeId="2" PostId="7247" RevisionGUID="6d163fa9-7a17-4fb0-9dcb-750463966120" CreationDate="2011-01-10T16:52:27.357" UserId="2414" Text="Your question is akin to asking what kind of car is preferable to getting you to work every day.  Different people have different tastes, needs, experiences, etc.  At the end of the day, the preferable car is the one that got you to work.&#xD;&#xA;&#xD;&#xA;Pick one, learn it, and commit yourself to finishing some projects with it.  They will all have a learning curve that you will have to overcome, and they will all provide valuable experience to you after your project is completed.&#xD;&#xA;&#xD;&#xA;The best advice I can give is to google &quot;&lt;tool/language&gt; game programming tutorial&quot; for each and find a tutorial which you understand and is done well.  Then pick that as your starting language/tool." />
  <row Id="14515" PostHistoryTypeId="2" PostId="7248" RevisionGUID="5beae713-b7a1-471e-b7f2-d5fe533bfc0a" CreationDate="2011-01-10T17:00:37.973" UserId="3536" Text="I am not sure if it is possible to detect this, the browser will download the font when it see's the CSS. You could draw the text using a default font, then use something like [this][1] to detect if the font has loaded outside your canvas. If it is detected as having loaded, you could then refresh your canvas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ajaxian.com/archives/javascriptcss-font-detector" />
  <row Id="14516" PostHistoryTypeId="2" PostId="7249" RevisionGUID="e651a9e4-d5d6-45da-8d70-1b40238f76eb" CreationDate="2011-01-10T17:04:01.917" UserId="1430" Text="There's a &quot;SimpleModel10&quot; sample in our samples distribution for SlimDX -- it is essentially the same code as in the ScapeCode post. In fact, it was written by the same developer." />
  <row Id="14517" PostHistoryTypeId="2" PostId="7250" RevisionGUID="0928efc7-8835-4ef4-b4c4-eb813c9b04ba" CreationDate="2011-01-10T17:29:47.027" UserId="1430" Text="Without knowing exactly how it &quot;doesn't work,&quot; it's a bit hard to say. I will say that the canonical arcball approach involves projection the 2D screen position onto the surface of an imaginary sphere that surrounds the object, and might be overcomplex for the kind of rotation you want for your camera.&#xD;&#xA;&#xD;&#xA;It sounds like you would be able to get away with building a [shortest-arc quaterion][1] between the previous mouse position and the new one (in screen space, during a drag) and using that quaternion to modify your view matrix.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=hiBFUv_FT0wC&amp;pg=PA214&amp;lpg=PA214&amp;dq=shortest+arc+quaternion+computation&amp;source=bl&amp;ots=OBkGMzv9Yh&amp;sig=3TpNiSOxgwVmsjeEBEqLRyaB0qU&amp;hl=en&amp;ei=10ErTYOAB42CsQO4s_iYCA&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=7&amp;ved=0CEMQ6AEwBg#v=onepage&amp;q&amp;f=false" />
  <row Id="14518" PostHistoryTypeId="2" PostId="7251" RevisionGUID="1d291a14-b2e6-409c-8113-51dab1a18e6c" CreationDate="2011-01-10T17:34:56.243" UserId="3659" Text="I am developing a strategy-game AI (think: Final Fantasy Tactics), and I am having trouble coming up for the design of the AI. My main problem is determining which is the optimal thing for it to do.&#xD;&#xA;&#xD;&#xA;**First let me describe the priority of what action I would like the AI to take:**&#xD;&#xA;&#xD;&#xA; 1. Kill nearest player unit&#xD;&#xA; &#xD;&#xA; 2. Fulfill primary directive (kill all player units, kill target unit, survive for x turns)&#xD;&#xA; 3. Heal ally unit / cast buffer&#xD;&#xA;&#xD;&#xA;**Now the AI can do the following in its turn:**&#xD;&#xA;&#xD;&#xA;- Move -&gt; {Attack / Ability / Item}  (either attack or ability or item)&#xD;&#xA;&#xD;&#xA;- {Attack / Ability / Item} -&gt; Move&#xD;&#xA;&#xD;&#xA;- Move closer (if targets not in range)&#xD;&#xA;- {Attack / Ability / Item} (if move not available)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Notes**&#xD;&#xA;&#xD;&#xA;Abilities have various ranges / effects / costs / effects.&#xD;&#xA;Each ai unit has maybe 5-10 abilities to choose from.&#xD;&#xA;The AI will prioritize killing over safety unless its directive is to survive for x turns. It also doesn't care about ability cost much. While a player may want to save a big spell for later, the AI will most likely use it asap.&#xD;&#xA;&#xD;&#xA;Movement is on a (hex) grid&#xD;&#xA;&#xD;&#xA;num of player units: 3-6&#xD;&#xA;&#xD;&#xA;num of ai units: 3-7 or more. Probably max 10.&#xD;&#xA;&#xD;&#xA;AI and player take turns controlling ONE unit, instead of all at the same time.&#xD;&#xA;&#xD;&#xA;Platform is Android (if program doesnt respond after some time, there will be a popup saying to Force Quit or Wait - which looks really bad!).&#xD;&#xA;&#xD;&#xA;**Now comes the questions:**&#xD;&#xA;&#xD;&#xA;- The best ability to use would obviously be the one that hits the most targets for the most damage. But since each ability has different ranges, I won't know if they are in range without exploring each possible place I can move to. &#xD;&#xA;&#xD;&#xA;- One solution would be to go through each possible places to move to, determine the optimal attack at that location - which gives me a list of optimal moves for each location. Then choose *the* optimal out of the list and execute it. But this will take a lot of CPU time. Is there a better solution?&#xD;&#xA;&#xD;&#xA;- My **current idea** is to move as close as possible towards the closest, largest group of people, and determine the optimal attack/ability from there. I think this would be a lot less work for the CPU and still allow for wide-range attacks. Its sub-optimal but the AI will still seem 'smart'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Other notes/questions:**&#xD;&#xA;&#xD;&#xA;- Am I over-thinking/over-complicating it? Better solution? **I am open to all sorts of suggestions**&#xD;&#xA;- I have taken a look at [the spell-casting question][1], but it doesn't take into account the movement - so perhaps use that algo for each possible move location? The top answer mentioned it wasn't great for area-of-effect and group fights - so maybe requires more tweaking?&#xD;&#xA;- **Please**, if you mention a graph/tree, let me know *basically* how to use it. E.g. Node means ability, level corresponds to damage, then search for the deepest node.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5593/spell-casting-how-to-optimize-damage-per-second" />
  <row Id="14519" PostHistoryTypeId="1" PostId="7251" RevisionGUID="1d291a14-b2e6-409c-8113-51dab1a18e6c" CreationDate="2011-01-10T17:34:56.243" UserId="3659" Text="Help with Strategy-game AI" />
  <row Id="14520" PostHistoryTypeId="3" PostId="7251" RevisionGUID="1d291a14-b2e6-409c-8113-51dab1a18e6c" CreationDate="2011-01-10T17:34:56.243" UserId="3659" Text="&lt;android&gt;&lt;ai&gt;" />
  <row Id="14521" PostHistoryTypeId="2" PostId="7252" RevisionGUID="8c49a739-7617-416a-ba4f-a741d230c14a" CreationDate="2011-01-10T17:52:08.647" UserId="1430" Text="Your note about quitting/waiting suggests to me you're doing all the processing work on the main thread of the application. You could, assuming there is sufficient thread support in the Android's SDK (which I assume there must be), offload the &quot;thinking&quot; portion of your AI to a worker thread while the main thread pops up an in-game &quot;AI is considering...&quot; UI but otherwise renders normally. &#xD;&#xA;&#xD;&#xA;Of course there are good reasons not to want to do that, such as not wanting the AI to take so long anyhow because the player will get bored.&#xD;&#xA;&#xD;&#xA;As for your actual question, while your &quot;current idea&quot; is workable, it's very simple. It's a good starting point, though. It's a system where the AI is purely result-focused -- trying to maximum one value (damage). Other options include a target-focused approach, where you pick a target from the opposing team (randomly, one with the most HP, some combination thereof, et cetera), and move to that target, trying to damage it.&#xD;&#xA;&#xD;&#xA;One thing you might want to consider is giving each ability a 'power' or 'effectiveness' stat that is hidden from the player and is used only internally by your AI. You determine the values of this stat yourself, based on your own knowledge of the abilities as the game's programmer.&#xD;&#xA;&#xD;&#xA;Your AI would then select their highest rated ability and try to use that, if they can't for whatever reason, pick the next, et cetera. If built appropriately general enough, you could start to tie these two systems together, so that once you establish a target you have heuristics for the best kinds of attacks on that target (for example, weight an attack that does MP damage as more effective if the target has high MP)." />
  <row Id="14522" PostHistoryTypeId="2" PostId="7253" RevisionGUID="2415e4e1-ec66-499a-ae9b-d24ecec25596" CreationDate="2011-01-10T17:57:38.017" UserId="1430" Text="I like to take an approach where content is organized into 'packages' with the content root, and packages can be scheduled into the production build (in order) via some kind of manifest. &#xD;&#xA;&#xD;&#xA;The simplest implementation of this technique is a flat-file one, where you have an asset directory which subdirectories for each package. Each package subdirectory contains assets, possibly in a fixed tree form (such as all the models in a 'model' folder). &#xD;&#xA;&#xD;&#xA;The manifest simply contains an ordered list of packages to apply to a build -- packages applied later override those applied earlier. The manifest for dev builds includes the packages for developer-only stuff, and the manifest for live builds doesn't.&#xD;&#xA;&#xD;&#xA;Obviously you can scale this out to an arbitrary complexity, supporting things like efficient fallbacks for missing resources if you forget to schedule in a package, or emitting warnings, et cetera. The system lends itself well a local 'override' directory, too, allowing for quick asset iteration.&#xD;&#xA;&#xD;&#xA;This approach is orthogonal to the SCM package used, so you don't necessarily need a branch per package or anything like that." />
  <row Id="14523" PostHistoryTypeId="5" PostId="7237" RevisionGUID="4913bd93-974d-455e-b574-ac1ca5753e73" CreationDate="2011-01-10T19:12:47.037" UserId="744" Comment="Fix typo." Text="At my last job we prefaced everything that was development-only with _, and the support for that convention ran into the lowest levels of our filesystem handling code in the game, like directory listing and our file opening wrappers. Test and development-only assets were just checked into the same RCS repository as the real game data.&#xD;&#xA;&#xD;&#xA;So for example,&#xD;&#xA;&#xD;&#xA;    # This is always loaded&#xD;&#xA;    data/texture_library/titlescreen.tex &#xD;&#xA;    data/spells/magicmissile.spell&#xD;&#xA;&#xD;&#xA;    # These are only loaded in development mode.&#xD;&#xA;    data/texture_library/_foo.tex &#xD;&#xA;    data/spells/_testmissile.spell&#xD;&#xA;    data/spells/_testing/fireball.spell&#xD;&#xA;&#xD;&#xA;It's a very simple convention, but was easy to use with other tools (grep, one-off Perl scripts, etc.), and straightforward for everyone on the project to understand." />
  <row Id="14524" PostHistoryTypeId="5" PostId="7250" RevisionGUID="a2d2a47e-775c-4bbe-beac-b17855c76b5a" CreationDate="2011-01-10T21:15:18.713" UserId="1430" Comment="added 1 characters in body" Text="Without knowing exactly how it &quot;doesn't work,&quot; it's a bit hard to say. I will say that the canonical arcball approach involves projection the 2D screen position onto the surface of an imaginary sphere that surrounds the object, and might be overcomplex for the kind of rotation you want for your camera.&#xD;&#xA;&#xD;&#xA;It sounds like you would be able to get away with building a [shortest-arc quaternion][1] between the previous mouse position and the new one (in screen space, during a drag) and using that quaternion to modify your view matrix.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=hiBFUv_FT0wC&amp;pg=PA214&amp;lpg=PA214&amp;dq=shortest+arc+quaternion+computation&amp;source=bl&amp;ots=OBkGMzv9Yh&amp;sig=3TpNiSOxgwVmsjeEBEqLRyaB0qU&amp;hl=en&amp;ei=10ErTYOAB42CsQO4s_iYCA&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=7&amp;ved=0CEMQ6AEwBg#v=onepage&amp;q&amp;f=false" />
  <row Id="14525" PostHistoryTypeId="2" PostId="7254" RevisionGUID="c3a2be7c-11d7-47ca-9e31-dd1b8e7963ce" CreationDate="2011-01-10T22:03:03.573" UserId="1163" Text="The other day I herd this &quot;MSN Game API&quot; mentioned, but I can not find any information about it anywhere. This particular API seems to be for browser based games (Such as Flash, and ActiveX embedded games).&#xD;&#xA;&#xD;&#xA;What exactly is this API for? And is that its correct name? Where can I find more information about it, and maybe even some documentation on the actual API." />
  <row Id="14526" PostHistoryTypeId="1" PostId="7254" RevisionGUID="c3a2be7c-11d7-47ca-9e31-dd1b8e7963ce" CreationDate="2011-01-10T22:03:03.573" UserId="1163" Text="What is the &quot;MSN Game API&quot;?" />
  <row Id="14527" PostHistoryTypeId="3" PostId="7254" RevisionGUID="c3a2be7c-11d7-47ca-9e31-dd1b8e7963ce" CreationDate="2011-01-10T22:03:03.573" UserId="1163" Text="&lt;api&gt;&lt;microsoft&gt;&lt;documentation&gt;" />
  <row Id="14528" PostHistoryTypeId="2" PostId="7255" RevisionGUID="39b990e8-2a1c-4610-be0d-a3b16f4d6e31" CreationDate="2011-01-10T22:05:51.653" UserId="3041" Text="We tend to keep all of our test assets in a 'test' folder which get stripped out when making final releases of our games.  These folders can be broken down by person (which is what we do) or perhaps asset type, or both.  Once benefit that we've gotten is that we can use perforce exclusionary mappings to allow people to remove folders (inside of 'test') that they don't want to look at.&#xD;&#xA;&#xD;&#xA;To do this method right though, does requires some planning and adherence to the scheme on the part of the development team.  This type (or any type) of organization can be hard as you scale up the number of members on your team.  I guess the advice here is that no matter what scheme you pick, make sure that your team members follow it, otherwise, it will break down in ways that can be pretty irritating.  For example, the scheme that involves prefacing files with an underscore sounds workable.  But in practice, it also seems easy for someone to forget this convention (either way) and then you wind up with missing or extra assets (the latter typically being less of a problem).  Again, these problems can happen with any scheme, so it's worthwhile to have it documented and drilled into your team's collective head.&#xD;&#xA;" />
  <row Id="14529" PostHistoryTypeId="2" PostId="7256" RevisionGUID="152ab4f5-e8e1-44f3-b69e-6da0e6549661" CreationDate="2011-01-10T22:30:32.313" UserId="4552" Text="I've just posted this at the Blender artists' forums before realising I would probably get a better response from a more game development-specific audience, so apologies for cross-posting! It's for the right reasons :)&#xD;&#xA;&#xD;&#xA;I'm a programmer trying to animate a character walking for a game project, using Ogre. I've made a very simple walk cycle in Blender and exported it to Ogre, and it plays just fine. By fine, I mean it works, but there's terrible foot sliding. This is because I just animated the walk in-place (at the origin) in Blender, and of course I don't know what &quot;speed of walk&quot; that corresponds to, so when I move the character in-game the motion doesn't necessarily match up with the movement of the feet in the animation.&#xD;&#xA;&#xD;&#xA;So my question is: what's the normal approach for this kind of thing? At work we use Maya, and the animators either animate a special 'moveTrans' node that represents the &quot;position&quot; of the character (or have the exporter generate it for them from the movement of the root node), then the game can read this to know how fast the animation moves the character. So in the Maya file, the character will walk forward for one cycle and this extra node will follow along with them by their feet. I've not seen anything like this in open-source land, and there's certainly no provision for that in the Ogre Exporter script. What do you chaps normally do for this?" />
  <row Id="14530" PostHistoryTypeId="1" PostId="7256" RevisionGUID="152ab4f5-e8e1-44f3-b69e-6da0e6549661" CreationDate="2011-01-10T22:30:32.313" UserId="4552" Text="Common way of animating 'motion' for walk cycle animations" />
  <row Id="14531" PostHistoryTypeId="3" PostId="7256" RevisionGUID="152ab4f5-e8e1-44f3-b69e-6da0e6549661" CreationDate="2011-01-10T22:30:32.313" UserId="4552" Text="&lt;animation&gt;" />
  <row Id="14532" PostHistoryTypeId="2" PostId="7257" RevisionGUID="17ec4169-c6df-4de8-a195-49a7c3d42ee9" CreationDate="2011-01-10T22:35:02.187" UserId="284" Text="I've got this BBG going ( http://ninjawars.net ), and the character stats currently are simplistic.  I'm looking to add a few stats to the current 1/2 (strength and maximum hitpoints, essentially).&#xD;&#xA;I've come up with: (strength (unchanged), speed, stamina, and some others that are somewhat interesting wildcard stats).&#xD;&#xA;However, I'm not satisfied with how boring the effects of some of these stats are, because they're very linear.  Better stat, better effects of the stat, but the stats don't interact with each-other, there's no Rock-Paper-Scissors interaction, having more is always better all the time.&#xD;&#xA;&#xD;&#xA;So what I'd really like is to see examples of interesting character stats?&#xD;&#xA;&#xD;&#xA;Examples that I can think of off hand:&#xD;&#xA;Call of Cthulu's Insanity stat (things get really weird/chaotic if you start losing sanity)&#xD;&#xA;White Wolf stats, to a certain extent (the stats themselves have some basic effects, and all skills use stats as well)&#xD;&#xA;&#xD;&#xA;What are some others to check out?" />
  <row Id="14533" PostHistoryTypeId="1" PostId="7257" RevisionGUID="17ec4169-c6df-4de8-a195-49a7c3d42ee9" CreationDate="2011-01-10T22:35:02.187" UserId="284" Text="Examples of interesting implementations of character stats?" />
  <row Id="14534" PostHistoryTypeId="3" PostId="7257" RevisionGUID="17ec4169-c6df-4de8-a195-49a7c3d42ee9" CreationDate="2011-01-10T22:35:02.187" UserId="284" Text="&lt;character&gt;&lt;stats&gt;&lt;uniqueness&gt;" />
  <row Id="14535" PostHistoryTypeId="5" PostId="7254" RevisionGUID="68c7ba23-7c0a-4e15-b073-ea4e90da1a23" CreationDate="2011-01-10T22:35:38.660" UserId="1163" Comment="added 68 characters in body" Text="The other day I herd this &quot;MSN Game API&quot; mentioned, but I can not find any information about it anywhere. This particular API seems to be for browser based games (Such as Flash, and ActiveX embedded games).&#xD;&#xA;&#xD;&#xA;What exactly is this API for? And is that its correct name? is it to do with the [MSN Zone][1]? Where can I find more information about it, and maybe even some documentation on the actual API.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zone.msn.com" />
  <row Id="14536" PostHistoryTypeId="2" PostId="7258" RevisionGUID="5e4f7fbb-4acc-4849-a65a-710602fbbacf" CreationDate="2011-01-10T22:36:16.553" UserId="1430" Text="The API in question is, I believe, the MSN Games GDK for developing games for the MSN Games portal (or Live Messenger). The SDK itself is not readily available to the public; I believe you need to contact developer support to get it. Check out [this page][1] at the MS Casual Games portal.&#xD;&#xA;&#xD;&#xA;  [1]: http://zone.msn.com/en/microsoftcasualgames/submit.htm" />
  <row Id="14537" PostHistoryTypeId="5" PostId="7257" RevisionGUID="4da87d91-1ff4-4184-bb41-a749dec940f1" CreationDate="2011-01-10T22:49:32.600" UserId="284" Comment="added 53 characters in body; added 27 characters in body" Text="I've got this BBG going ( http://ninjawars.net ), and the character stats currently are simplistic.  I'm looking to add a few stats to the current 1/2 (strength and maximum hitpoints, essentially).&#xD;&#xA;I've come up with: (strength (unchanged), speed, stamina, and some others that are somewhat interesting wildcard stats).&#xD;&#xA;However, I'm not satisfied with how boring the effects of some of these stats are, because they're very linear.  Better stat, better effects of the stat, but the stats don't interact with each-other, there's no Rock-Paper-Scissors interaction, having more is always better all the time.&#xD;&#xA;&#xD;&#xA;So what I'd really like is to see examples of interesting character stats or effects of stats?&#xD;&#xA;&#xD;&#xA;Examples that I can think of off hand:&#xD;&#xA;Call of Cthulu's Insanity stat (things get really weird/chaotic if you start losing sanity)&#xD;&#xA;White Wolf stats, to a certain extent (the stats themselves have some basic effects, and all skills effectiveness base themselves off of stats as well)&#xD;&#xA;&#xD;&#xA;What are some other ways people have used stats to check out?" />
  <row Id="14538" PostHistoryTypeId="2" PostId="7259" RevisionGUID="5b667b8f-4c2d-4d9a-ac1f-2d75aadc7bc7" CreationDate="2011-01-10T22:57:13.827" UserId="4191" Text="The way Shadowrun's core stats shook out, if you think about them abstractly, was interesting to me:&#xD;&#xA;&#xD;&#xA;                   Offense      Defense      Speed&#xD;&#xA;    Physical       Strength     Body         Quickness&#xD;&#xA;    Mental         Charisma     Willpower    Intelligence&#xD;&#xA;&#xD;&#xA;If you have underlying abstract roles defined for your stats like that, the ways they wind up used come very naturally.&#xD;&#xA;&#xD;&#xA;The main thing I don't like about that stat layout is that &quot;perception&quot; winds up being the same thing as &quot;intelligence&quot;, which frankly lacks verisimilitude in a big, bad way." />
  <row Id="14539" PostHistoryTypeId="2" PostId="7260" RevisionGUID="3cca39ca-8a90-4879-be7d-3548add3ba57" CreationDate="2011-01-10T23:00:45.463" UserId="3536" Text="I have just spent my first half hour playing with the shader language.&#xD;&#xA;&#xD;&#xA;I have modified the basic program I have which renders the texture, to allow me to colour the texture.&#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    &#xD;&#xA;    /* Given the texture coordinates, our pixel shader grabs the corresponding&#xD;&#xA;     * color from the texture.&#xD;&#xA;     */&#xD;&#xA;    void main() {&#xD;&#xA;      //gl_FragColor = texture2D(texSampler, texCoord);&#xD;&#xA;        gl_FragColor = vec4(0,1,0,1)*vec4(texture2D(texSampler,texCoord).xyz,1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I have noticed how this affects my transparent textures, and I believe I am loosing the alpha channel which would explain why previously transparent area's appear totally black.&#xD;&#xA;&#xD;&#xA;If I use the following line instead, I am shown the transparent area's&#xD;&#xA;&#xD;&#xA;    gl_FragColor = vec4(0,1,0,1)*vec4(texture2D(texSampler,texCoord).aaa,1);&#xD;&#xA;&#xD;&#xA;How can I retain the transparency after this modification to the colour?&#xD;&#xA;&#xD;&#xA;I have seen various things about a .w property, and also luminous, but my tweaks with those and the .aaa property are not working XD" />
  <row Id="14540" PostHistoryTypeId="1" PostId="7260" RevisionGUID="3cca39ca-8a90-4879-be7d-3548add3ba57" CreationDate="2011-01-10T23:00:45.463" UserId="3536" Text="OpenGL ES Basic Fragment Shader help with transparency" />
  <row Id="14541" PostHistoryTypeId="3" PostId="7260" RevisionGUID="3cca39ca-8a90-4879-be7d-3548add3ba57" CreationDate="2011-01-10T23:00:45.463" UserId="3536" Text="&lt;opengl&gt;&lt;shaders&gt;" />
  <row Id="14542" PostHistoryTypeId="2" PostId="7261" RevisionGUID="214c09cd-af14-4d9c-ab12-b76e99d7740a" CreationDate="2011-01-10T23:14:12.480" UserId="4410" Text="You seem to be throwing away the alpha channel each time you try and play with multiplying the colour part of the texture. You should be able to get to it through either &quot;a&quot; or &quot;w&quot; and then copy it through unchanged.&#xD;&#xA;&#xD;&#xA;    gl_FragColor = vec4(0,1,0,1)*vec4(texture2D(texSampler,texCoord).xyz,texture2D(texSampler,texCoord).w);&#xD;&#xA;&#xD;&#xA;(While I'm guessing this should work, it's been a while since I've played with shader stuff)" />
  <row Id="14543" PostHistoryTypeId="2" PostId="7262" RevisionGUID="bdc77a9e-2499-4b99-82c1-6bd74368cf19" CreationDate="2011-01-10T23:16:45.877" UserId="51" Text="There are two ways of doing it: root motion or &quot;in code&quot;.&#xD;&#xA;&#xD;&#xA;With root motion you have basically exactly what you're suggesting with the &quot;moveTrans&quot; node.  You use the motion of that object to determine how quickly to play back the walk cycles.  You might be able to do a reverse lookup of sorts to figure out that if you want to be at position X what frame you need to be at.  But the real advantage of root motion is that to get truly realistic animations you need to account for the fact that movement isn't a true linear path.  Real people move at a variable speed over time, or maybe they're shuffling left and right a bit, or whatever.&#xD;&#xA;&#xD;&#xA;Mixamo did a good example with root motion control using Unity.  There's a video of it here: http://vimeo.com/12052874&#xD;&#xA;&#xD;&#xA;Now root motion does have its drawbacks.  It can get tricky with things like trying to get the &quot;walk&quot; animation to work on stairs (ideally you'd have a separate stair/ladder climbing anim and do all the movement for that in the animation as well).  I'm also not really sure how IK really plays into it, if at all.&#xD;&#xA;&#xD;&#xA;Now doing it &quot;in code&quot; is a lot easier from the programming side of things.  What I suggest doing is first making sure all your units are consistent.  For example, 1 unit in Maya and your game is 1 meter.  Then you get your artists to animate a character walking (complete with forward movement).  Use that to figure out the speed of the animation, and export the animation without the forward velocity.  Use that to figure out how fast to play back the animation.  So if the walk animation at 1x speed is 5 m/s, and you want to have the player run at 7 m/s, you simply play back at 7/5 = 1.4x speed.  If your model is scaled up or down multiply the animation playback rate by the inverse of the scale.  A half height dude will have to walk twice as fast to move the same rate as a 1x scale guy." />
  <row Id="14544" PostHistoryTypeId="2" PostId="7263" RevisionGUID="47f7d93c-8687-42b9-925a-7265243419c6" CreationDate="2011-01-10T23:20:49.573" UserId="4013" Text="I am designing a puzzle game for the iphone and was wondering as most puzzle games consist of the player progressing through multiple levels. You see for example Angry Birds has over 100 levels.&#xD;&#xA;&#xD;&#xA;Once the basis of the game is made, how do developers typically go about building their levels?&#xD;&#xA;&#xD;&#xA;Do they generally build them from scratch each one more or less, or work of their own template or have some other method which they use to tailor these levels?&#xD;&#xA;&#xD;&#xA;I imagine building so many levels is a long process, certainly if building each one individually. Do they do this, or have a method which speeds it up once they have their basis?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="14545" PostHistoryTypeId="1" PostId="7263" RevisionGUID="47f7d93c-8687-42b9-925a-7265243419c6" CreationDate="2011-01-10T23:20:49.573" UserId="4013" Text="Typical Method Of Building Puzzle Levels" />
  <row Id="14546" PostHistoryTypeId="3" PostId="7263" RevisionGUID="47f7d93c-8687-42b9-925a-7265243419c6" CreationDate="2011-01-10T23:20:49.573" UserId="4013" Text="&lt;iphone&gt;&lt;level-design&gt;&lt;cocos2d-iphone&gt;&lt;levels&gt;&lt;puzzle&gt;" />
  <row Id="14547" PostHistoryTypeId="2" PostId="7264" RevisionGUID="6c87afb0-8830-4795-9239-958aeddabfb6" CreationDate="2011-01-10T23:58:48.120" UserId="1163" Text="I have herd a little talk about the MSN Games GDK lately, and what wondering what **Rapid** was.&#xD;&#xA;&#xD;&#xA;It sounds like some sort of testing environment, is this true? How can I get access to it? Or find out more about it?" />
  <row Id="14548" PostHistoryTypeId="1" PostId="7264" RevisionGUID="6c87afb0-8830-4795-9239-958aeddabfb6" CreationDate="2011-01-10T23:58:48.120" UserId="1163" Text="What is &quot;Rapid&quot; in reference to the MSN Games GDK?" />
  <row Id="14549" PostHistoryTypeId="3" PostId="7264" RevisionGUID="6c87afb0-8830-4795-9239-958aeddabfb6" CreationDate="2011-01-10T23:58:48.120" UserId="1163" Text="&lt;api&gt;&lt;microsoft&gt;&lt;documentation&gt;" />
  <row Id="14550" PostHistoryTypeId="2" PostId="7265" RevisionGUID="aa0dd781-be6e-4fb3-9378-d4391d87cd39" CreationDate="2011-01-11T00:26:51.197" UserId="3536" Text="Earlier I required assistance getting to grips with [how to retain the alpha channel of a transparent texture][1] in my colourised texture shader program.&#xD;&#xA;&#xD;&#xA;Whilst playing with my program (before obtaining the solution to my requirement), I managed to enable transparency for the whole texture (effectively blending via GLSL), and I quite liked this, and I would now like to know if and how it is possible to retain this blending, on top of the the texture whilst still retaining the original alpha channel.&#xD;&#xA;&#xD;&#xA;A basic example of the blending program I am referring to (minus any other functionality) is as follows...&#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;        gl_FragColor = vec4(texture2D(texSampler,texCoord).xyz,0.5);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Where 0.5 is the transparency (blending effect) of the whole texture. &#xD;&#xA;&#xD;&#xA;This is the current version of my program, which provides the ability to colour a texture according the colour parameter passed to the program, and retains the alpha channel of the original texture. &#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    uniform vec3 colour;&#xD;&#xA;    &#xD;&#xA;    /* Given the texture coordinates, the pixel shader grabs the corresponding&#xD;&#xA;     * color from the texture. It then colourises the texture from the colour parameter&#xD;&#xA;     * provided to the program. The alpha channel of any transparent texture is retained.&#xD;&#xA;     */&#xD;&#xA;    void main() {&#xD;&#xA;        gl_FragColor = vec4(colour,1)&#xD;&#xA;        * vec4(texture2D(texSampler,texCoord).xyz,texture2D(texSampler,texCoord).w);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I need to know if it is possible to apply transparency on top this program, without affecting the original alpha channel which I have already preserved.&#xD;&#xA;&#xD;&#xA;I hope this makes enough sense, if not I guess I will have to put together some screen dumps. Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7260/opengl-es-basic-fragment-shader-help-with-transparency" />
  <row Id="14551" PostHistoryTypeId="1" PostId="7265" RevisionGUID="aa0dd781-be6e-4fb3-9378-d4391d87cd39" CreationDate="2011-01-11T00:26:51.197" UserId="3536" Text="OpenGL ES Shader help (Blending)" />
  <row Id="14552" PostHistoryTypeId="3" PostId="7265" RevisionGUID="aa0dd781-be6e-4fb3-9378-d4391d87cd39" CreationDate="2011-01-11T00:26:51.197" UserId="3536" Text="&lt;shaders&gt;&lt;opengl-es&gt;&lt;transparency&gt;&lt;blending&gt;" />
  <row Id="14553" PostHistoryTypeId="5" PostId="7265" RevisionGUID="f095e126-a5db-40d3-b7a0-1012a237cf8f" CreationDate="2011-01-11T00:32:05.030" UserId="3536" Comment="added 7 characters in body; added 120 characters in body; added 37 characters in body; added 28 characters in body; added 9 characters in body" Text="Earlier I required assistance getting to grips with [how to retain the alpha channel of a transparent texture][1] in my colourised texture shader program.&#xD;&#xA;&#xD;&#xA;Whilst playing with that first version of my program (before obtaining the solution to my first requirement), I managed to enable transparency for the whole texture (effectively blending via GLSL), and I quite liked this, and I would now like to know if and how it is possible to retain this blending effect, on top of the existing output without affecting the original alpha channel - as I don't know how to input this transparency via the parameter that is already being provided with the textures alpha channel.&#xD;&#xA;&#xD;&#xA;A basic example of the blending program I am referring to (minus any other functionality) is as follows...&#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;        gl_FragColor = vec4(texture2D(texSampler,texCoord).xyz,0.5);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Where 0.5 is the transparency (blending effect) of the whole texture. &#xD;&#xA;&#xD;&#xA;This is the current version of my program, which provides the ability to colour a texture according the colour parameter passed to the program, and retains the alpha channel of the original texture. &#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    uniform vec3 colour;&#xD;&#xA;    &#xD;&#xA;    /* Given the texture coordinates, the pixel shader grabs the corresponding&#xD;&#xA;     * color from the texture. It then colourises the texture from the colour parameter&#xD;&#xA;     * provided to the program. The alpha channel of any transparent texture is retained.&#xD;&#xA;     */&#xD;&#xA;    void main() {&#xD;&#xA;        gl_FragColor = vec4(colour,1)&#xD;&#xA;        * vec4(texture2D(texSampler,texCoord).xyz,texture2D(texSampler,texCoord).w);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I need to know if it is possible to apply transparency on top this program, without affecting the original alpha channel which I have already preserved.&#xD;&#xA;&#xD;&#xA;I hope this makes enough sense, I am sure it is possible, and if so I should imagine it is rather simple, but this has me stumped. Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7260/opengl-es-basic-fragment-shader-help-with-transparency" />
  <row Id="14554" PostHistoryTypeId="2" PostId="7266" RevisionGUID="826350a8-3fb6-46e8-a4e9-eb70a0d729a4" CreationDate="2011-01-11T00:33:13.377" UserId="4410" Text="From some old (2006/2007) presentation on MSN Games...&#xD;&#xA;&#xD;&#xA;RAPID!&#xD;&#xA;&#xD;&#xA; - Integration Test Tool&#xD;&#xA; - Allows&#xD;&#xA;   developers to test that the MSN API&#xD;&#xA;   is correctly implemented&#xD;&#xA; - It does not:&#xD;&#xA;   - Verify client requirements&#xD;&#xA;   - Doesn't&#xD;&#xA;   test the game play&#xD;&#xA;&#xD;&#xA;Links to the main site is here [MSN Games][1] and the developer resources are [here][2]&#xD;&#xA;&#xD;&#xA;To get access to the developer libs you'll need to submit a concept, have it approved and then take it from there. (I've not actually done any of this so can't advise you on the process itself).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zone.msn.com/en/microsoftcasualgames/resources.htm&#xD;&#xA;  [2]: http://zone.msn.com/en/microsoftcasualgames" />
  <row Id="14555" PostHistoryTypeId="5" PostId="7265" RevisionGUID="0e2725df-a4b2-4a05-891f-a38c30cfc69b" CreationDate="2011-01-11T00:38:03.467" UserId="3536" Comment="deleted 245 characters in body; added 8 characters in body" Text="Earlier I required assistance getting to grips with [how to retain the alpha channel of a transparent texture][1] in my colourised texture shader program.&#xD;&#xA;&#xD;&#xA;Whilst playing with that first version of my program (before obtaining the solution to my first requirement), I managed to enable transparency for the whole texture (effectively blending via GLSL), and I quite liked this, and I would now like to know if and how it is possible to retain this blending effect, on top of the existing output without affecting the original alpha channel - as I don't know how to input this transparency via the parameter that is already being provided with the textures alpha channel.&#xD;&#xA;&#xD;&#xA;A basic example of the blending program I am referring to (minus any other functionality) is as follows...&#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;        gl_FragColor = vec4(texture2D(texSampler,texCoord).xyz,0.5);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Where 0.5 is the transparency (blending effect) of the whole texture. &#xD;&#xA;&#xD;&#xA;This is the current version of my program, which provides the ability to colour a texture according the colour parameter passed to the program, and retains the alpha channel of the original texture. &#xD;&#xA;&#xD;&#xA;    varying vec2 texCoord;&#xD;&#xA;    uniform sampler2D texSampler;&#xD;&#xA;    uniform vec3 colour;&#xD;&#xA; &#xD;&#xA;    void main() {&#xD;&#xA;        gl_FragColor = vec4(colour,1)&#xD;&#xA;        * vec4(texture2D(texSampler,texCoord).xyz,texture2D(texSampler,texCoord).w);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I need to know if it is possible to apply transparency on top this program, without affecting the original alpha channel which I have already preserved.&#xD;&#xA;&#xD;&#xA;I hope this makes enough sense, I am sure it is possible, and if so I should imagine it is rather simple, but this has me stumped. Any help much appreachiated.&#xD;&#xA;&#xD;&#xA;Cheers, Chris&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7260/opengl-es-basic-fragment-shader-help-with-transparency" />
  <row Id="14556" PostHistoryTypeId="2" PostId="7267" RevisionGUID="b7126f15-31cd-47e1-add4-50a89f4fd274" CreationDate="2011-01-11T00:39:10.083" UserId="4410" Text="Are you just trying to scale the value of the alpha coming out of the texture? If so you can just supply a floating point value between 0 and 1 as a scaling value in the part &quot;vec4(colour,1)&quot; instead of the 1." />
  <row Id="14557" PostHistoryTypeId="2" PostId="7268" RevisionGUID="0f442e60-1f4a-405d-8b0b-e58a126e6f3c" CreationDate="2011-01-11T00:53:56.817" UserId="4082" Text="For the [Pirate Poppers][1] puzzle mode, I generated the levels randomly based on some parameters related to difficulty. &#xD;&#xA;&#xD;&#xA;Difficulty is always difficult to measure objectively, but in this case there were some variables that were good indicators (chain length, number of different colors, nesting level of the combos) so I was able to generate pretty good puzzles quickly, with a sensible difficulty progression. &#xD;&#xA;&#xD;&#xA;I did manually test every one of them afterwards to make sure they were winnable (some of them weren't, right after generation, due to other variables not included in the generator, such as chain position and path shape), tweaked some of them and re-generated others that were too difficult.&#xD;&#xA;&#xD;&#xA;The first levels were hand made, though, to make sure they were simple enough and worked as a tutorial of sorts.&#xD;&#xA;&#xD;&#xA;In summary, you can batch-generate tons of levels and manually pick and tweak the subset you finally include in the game.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playfirst.com/game/piratepoppers" />
  <row Id="14558" PostHistoryTypeId="5" PostId="6199" RevisionGUID="75358c7c-a5a7-4a49-8ab7-9224569d4ddc" CreationDate="2011-01-11T01:09:05.377" UserId="1552" Comment="added 1 characters in body" Text="Several years ago I overheard a technique that gives the user the illusion of a rotating planet by using a 2D texture. Given that the user isn't able to change its position or viewport.&#xD;&#xA;&#xD;&#xA;What's the name of this technique?" />
  <row Id="14559" PostHistoryTypeId="5" PostId="6203" RevisionGUID="2c0fb097-6d69-4e92-ae39-c3acf16ef547" CreationDate="2011-01-11T01:59:35.313" UserId="3794" Comment="fixed typos (a lots of them)" Text="How to implement soft shadows for omni directional (point) light. We use typical shadow mapping technique. Depth is rendered to texture cube and addresing is pretty simple then. Just using vector from light to fragments world position. It works perfectly. Until you want soft shadows. In our engine we use PCSS technique for spot lights. But for point light there begins troubles. &#xD;&#xA;&#xD;&#xA;How to sample in 3D? &#xD;&#xA;&#xD;&#xA;I developed technique when orthonormal basis is created from  a direction and upvector (0,1,0). And then multiply sampling vector (something like this (1.0,i/depthMapSize,j/depthMapSize) with this basis. But this (of course :)) looks pretty bad for vectors near (0,1,0) and (0,-1,0). &#xD;&#xA;&#xD;&#xA;I will appreciate any help on this. " />
  <row Id="14560" PostHistoryTypeId="2" PostId="7269" RevisionGUID="bd223bc0-a054-4eb1-a59a-dd28dcdf2abc" CreationDate="2011-01-11T02:02:04.000" UserId="3358" Text="I've hired people to produce art and graphics before, but only ever at a per-job rate and that has worked out well.&#xD;&#xA;&#xD;&#xA;This question is for both artists and the people who hire them:&#xD;&#xA;&#xD;&#xA;As a buyer, are there any situations or types of projects you've experienced where it worked out better billed at an hourly rate?&#xD;&#xA;&#xD;&#xA;For artists, do you have a preference for one over the other and if so, why?" />
  <row Id="14561" PostHistoryTypeId="1" PostId="7269" RevisionGUID="bd223bc0-a054-4eb1-a59a-dd28dcdf2abc" CreationDate="2011-01-11T02:02:04.000" UserId="3358" Text="Outsourcing Artwork: Hourly or Per-Project?" />
  <row Id="14562" PostHistoryTypeId="3" PostId="7269" RevisionGUID="bd223bc0-a054-4eb1-a59a-dd28dcdf2abc" CreationDate="2011-01-11T02:02:04.000" UserId="3358" Text="&lt;graphics&gt;&lt;art&gt;&lt;outsourcing&gt;" />
  <row Id="14563" PostHistoryTypeId="2" PostId="7270" RevisionGUID="c59e6ac9-ca8b-4af5-999a-465f1d75c690" CreationDate="2011-01-11T02:17:02.697" UserId="4116" Text="So you're speaking about some Rock-Paper-Scissor interaction?&#xD;&#xA;The simplest and wide-spread way to do this, would be by using _character types_ instead of character stats for this behaviour.&#xD;&#xA;I.e. every character has to be either &quot;Rock&quot;, &quot;Paper&quot; or &quot;Scissor&quot; and depending on which types are fighting you can multiply your stats with a certain factor.&#xD;&#xA;&#xD;&#xA;I.e.&#xD;&#xA;&#xD;&#xA;    if(opponents(rock, scissor))&#xD;&#xA;    rocks_strength = rocks_strength * 1.5;&#xD;&#xA;    if(opponents(paper, scissor))&#xD;&#xA;    scissors_strength = scissors_strength * 1.5;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;and so on. That's how I would go in your case. You can also add more complexity if your boost different stats for different types and/or add additional clauses (i.e. the stone gets doubled stamina if his opponent is a scissor with a higher strength)...&#xD;&#xA;There are _really_ a lot of possibilities..." />
  <row Id="14564" PostHistoryTypeId="2" PostId="7271" RevisionGUID="d0e2023b-28dd-44aa-bf3b-fe754c00cb28" CreationDate="2011-01-11T03:06:26.290" UserId="3175" Text="Over the years I've written 3 game AIs, all of which played a respectable game.&#xD;&#xA;&#xD;&#xA;Two of the cases had limited options per turn and so I explored all possibilities and evaluated the resulting positions--I altered the depth I searched based on the difficulty and it didn't take very many layers to make a quite respectable opponent.  I could get a couple of layers down and still have a response back in a second or two and that was on some pretty ancient processors.  (All of these were before Windows was on the scene.)  The quality of the position analysis is *VERY* important when using this approach.&#xD;&#xA;&#xD;&#xA;The third case did not permit such an analysis as the number of possible moves per turn could easily exceed the particles in the universe.  It was a situation sort of like Risk--territory with a number of armies on it but you could make any number of moves per turn, the key factor being moves took time.  A province next door generally took 1 turn, one on the other side of the map could take 9.&#xD;&#xA;&#xD;&#xA;I used a totally different approach here.  I decided the percent of the forces to be allocated to defense and allocated those based on the value of the territory and the estimated enemy threat (While you could see what forces your opponent moved you could not see where they were going--it assumed the human would be concentrating it's forces somewhere and figured it was much more likely to be where they could all arrive at once rather than piecemeal.)  Anything not needed for defense became available for offense.  I looked at each possible objective and computed what it would take to have a good chance of taking it quickly (a protracted battle would destroy basically all it's production) and generated a set of attack orders for it.  The value of the order was the value of the province, the cost was the number of army/turns committed to the attack.  Pick the highest value and execute the orders, repeat until the available forces couldn't take anything.  The execution time was trivial.&#xD;&#xA;&#xD;&#xA;I hope I gave you some ideas here." />
  <row Id="14565" PostHistoryTypeId="2" PostId="7272" RevisionGUID="bd847909-7310-4bd5-afd7-e68612779e9a" CreationDate="2011-01-11T03:42:13.537" UserId="1047" Text="I remember hearing that wii and the ds uses CodeWarrior as their IDE. I know xbox uses visual studios but i have no idea what ps3 uses.&#xD;&#xA;&#xD;&#xA;What IDE do ps3 developers use and how do they debug? How do wii programmers debug? I always heard they use GDB but is that built into CodeWarrior or is that a separate application?" />
  <row Id="14566" PostHistoryTypeId="1" PostId="7272" RevisionGUID="bd847909-7310-4bd5-afd7-e68612779e9a" CreationDate="2011-01-11T03:42:13.537" UserId="1047" Text="IDE &amp; Debugging of Official SDK for wii and ps3? " />
  <row Id="14567" PostHistoryTypeId="3" PostId="7272" RevisionGUID="bd847909-7310-4bd5-afd7-e68612779e9a" CreationDate="2011-01-11T03:42:13.537" UserId="1047" Text="&lt;tools&gt;&lt;ide&gt;" />
  <row Id="14568" PostHistoryTypeId="2" PostId="7273" RevisionGUID="1d082e50-faa1-4155-ad53-13228f3a064a" CreationDate="2011-01-11T04:28:25.200" UserId="4338" Text="I want to place my items and enemies randomly (or as randomly as possible).  Other than making use of the `Random` class and generating a random X and Y coordinate, what are some other good techniques?&#xD;&#xA;&#xD;&#xA;I have an 800x600 game window." />
  <row Id="14569" PostHistoryTypeId="1" PostId="7273" RevisionGUID="1d082e50-faa1-4155-ad53-13228f3a064a" CreationDate="2011-01-11T04:28:25.200" UserId="4338" Text="Random enemy placement on a 2d grid" />
  <row Id="14570" PostHistoryTypeId="3" PostId="7273" RevisionGUID="1d082e50-faa1-4155-ad53-13228f3a064a" CreationDate="2011-01-11T04:28:25.200" UserId="4338" Text="&lt;xna&gt;&lt;2d&gt;&lt;sprites&gt;&lt;random&gt;" />
  <row Id="14571" PostHistoryTypeId="2" PostId="7274" RevisionGUID="59ed9a8e-504d-4f12-b109-4999d67509c9" CreationDate="2011-01-11T04:32:25.607" UserId="1430" Text="One can use the Visual Studio IDE for PS3 development -- the PS3 relevant bits are, of course, just command-line tools (GCC ports) that can be plugged in to makefiles that VS can understand, after all.&#xD;&#xA;&#xD;&#xA;There's also a toolchain called [ProDG, by SN Systems][1] that is used for PS3 development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;GDB, as an aside, is its own, command-line program. Some IDEs (such as Xcode on the Mac) have a GUI that wraps it. So it's not &quot;built in&quot; to CodeWarrior or any other IDE, per se, but ships with some as GUI layers some times communicate with it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.snsys.com/ps3/prodg.asp" />
  <row Id="14572" PostHistoryTypeId="5" PostId="7273" RevisionGUID="88f5efc0-bdd9-4407-9a28-1ee76d9819bd" CreationDate="2011-01-11T05:23:25.093" UserId="4338" Comment="added 155 characters in body; added 37 characters in body" Text="I want to place my items and enemies randomly (or as randomly as possible).  At the moment I use XNA's `Random` class to generate a number between 800 for X and 600 for Y.  It feels like enemies spawn more towards the top of the map than in the middle or bottom.  I do not seed the generator, maybe that is something to consider.&#xD;&#xA;&#xD;&#xA;Are there other techniques described that can improve random enemy placement on a 2d grid?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14573" PostHistoryTypeId="2" PostId="7275" RevisionGUID="86695793-d07b-45d8-9d8f-251c55356985" CreationDate="2011-01-11T05:26:51.347" UserId="2472" Text="Random placement doesn't look random enough to the eye. You'll probably want the enemies spaced out a bit more evenly. Take a look at [this article][1] about Poisson disk sampling, or read about blue noise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://devmag.org.za/2009/05/03/poisson-disk-sampling/" />
  <row Id="14574" PostHistoryTypeId="2" PostId="7276" RevisionGUID="809eaa7b-00ef-458d-9534-3144c9e6c353" CreationDate="2011-01-11T06:20:39.710" UserId="1198" Text="What would be a good algorithm for calculating the recoil of a shooting guns cross-hairs? &#xD;&#xA;&#xD;&#xA;What I've got now, is something like this:&#xD;&#xA;&#xD;&#xA; 1. Define min/max recoil based on weapon size&#xD;&#xA; 2. Generate random number of &quot;delta&quot; movement&#xD;&#xA; 3. Apply random value to X, Y, or both of cross-hairs (only &quot;up&quot; on the Y axis)&#xD;&#xA; 4. Multiply new delta based on time from the previous shot (more recoil for full-auto)&#xD;&#xA;&#xD;&#xA;What I'm worried about is that this feels rather predicable, what other factors should one take into account when building recoil? While I'd like it to be somewhat predictable, I'd also like to keep players on their toes. I'm thinking about increasing the min/max recoil values by a large amount (relatively) and adding a weighting, so large recoils will be more rare -- it seems like a lot of effort to go into something I felt would be simple.&#xD;&#xA;&#xD;&#xA;Maybe this is just something that needs to be fine-tuned with additional playtesting, and more playtesters? I think that it's important to note, that the recoil will be a large part of the game, and is a key factor in the game being fun/challenging or not." />
  <row Id="14575" PostHistoryTypeId="1" PostId="7276" RevisionGUID="809eaa7b-00ef-458d-9534-3144c9e6c353" CreationDate="2011-01-11T06:20:39.710" UserId="1198" Text="Factors to consider when building an algorithm for gun recoil" />
  <row Id="14576" PostHistoryTypeId="3" PostId="7276" RevisionGUID="809eaa7b-00ef-458d-9534-3144c9e6c353" CreationDate="2011-01-11T06:20:39.710" UserId="1198" Text="&lt;algorithm&gt;&lt;playtesting&gt;&lt;design&gt;" />
  <row Id="14577" PostHistoryTypeId="2" PostId="7277" RevisionGUID="70b84a3a-74ee-467f-bdbe-4fc41ceaf2f6" CreationDate="2011-01-11T06:50:54.923" UserId="1525" Text="It depends on what kind of results your looking for, I'd say.&#xD;&#xA;&#xD;&#xA;I have clients with whom I've worked out this per-hour approach: My client have a list of tasks that they keep filled. I take out time and work on the tasks with the highest priority. We agree on beforehand how many hours, roughly, I should work every week. This means, for them, the cost is pretty constant, but the results are varying. Usually we also agree I can deviate and work on smaller impulsive tasks, ie follow my &quot;spur of the moment&quot;-creativity. Then once a week we meet up and discuss my work. (That regular meeting is important.)&#xD;&#xA;&#xD;&#xA;The benefit of this is I can work whenever I want. This may sound sloppy, but what happends is you end up working when you have ideas and a feel inspired. If you want &quot;innovate&quot; creative results, I think a setup similar to this is almost required.&#xD;&#xA;&#xD;&#xA;The down-side is there can be weeks where nothing significant happends. If results are needed on a certain date, I don't think this works that well. It also requires you have a healthy business relationship and can trust eachother. I wouldn't do this from day 1. I would say it also requires that the creator is passionate about the project.&#xD;&#xA;&#xD;&#xA;Then I have clients with &quot;normal&quot; projects where the desired results are more or less known and there's a set time frame. There's also usually a known budget. Here I think the only viably approach is agreeing on a set price for a given amount of results of a certain quality. The benefit is the chance of getting those results at the given time is much higher, and that means the client can plan the project. The down-side is you seem to slip into this &quot;daily-grind&quot; mode, as a creator. You run more on auto-pilot and mostly stick to methods you already know. Since you know what you need to deliver, you deliver that, and that's it. Then of course, that also means you usually get more done in less time.&#xD;&#xA;&#xD;&#xA;I have to say I like both approaches. They compliment eachother and mixing them up keeps me evolving new skills as well as improving my already existing ones. My clients seem to like both as well: One delivers out-of-the-leftfield ideas and the other gets things done.&#xD;&#xA;&#xD;&#xA;I'm not sure I quite answered your question. But at least I think these two methods are related to being paid per-hour vs. per-project, somehow, I hope." />
  <row Id="14578" PostHistoryTypeId="5" PostId="7263" RevisionGUID="b92513ca-651b-4b38-a944-d4f3c3a02c45" CreationDate="2011-01-11T07:43:55.973" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I am designing a puzzle game for the iphone and was wondering as most puzzle games consist of the player progressing through multiple levels. You see for example Angry Birds has over 100 levels.&#xD;&#xA;&#xD;&#xA;Once the basis of the game is made, how do developers typically go about building their levels?&#xD;&#xA;&#xD;&#xA;Do they generally build them from scratch each one more or less, or work of their own template or have some other method which they use to tailor these levels?&#xD;&#xA;&#xD;&#xA;I imagine building so many levels is a long process, certainly if building each one individually. Do they do this, or have a method which speeds it up once they have their basis?" />
  <row Id="14579" PostHistoryTypeId="2" PostId="7278" RevisionGUID="115a69a8-526a-4917-b0a8-153c8cecea61" CreationDate="2011-01-11T08:22:58.203" UserId="1430" Text="Guns tend to recoil vertically far more than they recoil to the left or right (at least the few I've fired -- pistols and a shotgun -- have done so to the best of my recollection). I have a feeling the random variance in X would just feel unusual.&#xD;&#xA;&#xD;&#xA;I would start with an implementation that kicks the gun/view upwards only, probably based on the power of the gun. When fired, a cooldown timer starts. If the gun is fired again while the cooldown timer is still counting down, the vertical kick is applied again, with intensity proportional to how much time is left on the timer. After a certain threshold it might be appropriate to add X axis variance to indicate that the player is really losing control of the (probably automatic) weapon. I've never fired such a thing so I don't know what that is supposed to feel like, but I imagine &quot;chaotic&quot; would fit nicely. The cooldown should probably scale a bit -- but nonlinearly -- as you continue to fire and the intensity of the kicks should probably be similarly damped or smoothed. Pure linear measures might feel too harsh.&#xD;&#xA;&#xD;&#xA;Whatever you do, it sounds like your initial plans called for a fair bit of randomization and I don't think that would be appropriate -- a small bit, certainly, but sudden large recoils amidst smaller ones seem like they'd be unusual. " />
  <row Id="14580" PostHistoryTypeId="2" PostId="7279" RevisionGUID="cca324b0-e943-45e3-a6ba-b3d9561daa8b" CreationDate="2011-01-11T08:54:51.307" UserDisplayName="user4560" Text="How about this one:&#xD;&#xA;http://code.google.com/p/jgen/" />
  <row Id="14581" PostHistoryTypeId="2" PostId="7280" RevisionGUID="9371ab92-4c22-44a7-8607-82018b8801db" CreationDate="2011-01-11T09:49:23.667" UserId="659" Text="You could always give this a try: http://www.angelcode.com/products/bmfont/&#xD;&#xA;&#xD;&#xA;It generates nicely-packed textures of bitmap characters, and an .xml file of all the UV/spacing data. Results are generally very good." />
  <row Id="14582" PostHistoryTypeId="5" PostId="7244" RevisionGUID="714a149d-c422-4a80-96ac-b2ff7ea345b8" CreationDate="2011-01-11T11:19:55.847" UserId="1743" Comment="expanded question" Text="At present I load my font for my game in with `@font-face`&#xD;&#xA;&#xD;&#xA;For instance:&#xD;&#xA;&#xD;&#xA;    @font-face {&#xD;&#xA;        font-family: 'Orbitron';&#xD;&#xA;        src: url('res/orbitron-medium.ttf');&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and then reference it throughout my JS implementation as such:&#xD;&#xA;&#xD;&#xA;    ctx.font = &quot;12pt Orbitron&quot;;&#xD;&#xA;&#xD;&#xA;where ctx is my 2d context from the canvas.&#xD;&#xA;&#xD;&#xA;However, I notice a certain lag time while the font is downloaded to the user.  Is there a way I can use a default font until it is loaded in?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Edit -&#xD;&#xA;&#xD;&#xA;I'll expand the question, because I hadn't taken the first comment into account.  What would the proper method of handling this be in the case that a user has disabled custom fonts?" />
  <row Id="14583" PostHistoryTypeId="2" PostId="7281" RevisionGUID="00f6b635-21bc-4412-bda0-bafadd8540d9" CreationDate="2011-01-11T12:20:05.297" UserId="1923" Text="I'd be tempted to try to approximate real physics here. It isn't something you're going to do several times per frame so the cost of the calc probably won't factor much.&#xD;&#xA;&#xD;&#xA;The impulse force of the powder explosion acting along a vector opposite the barrel direction with opposing force vectors where the hands/shoulder are all combine into a linear &amp; angular momentums for the gun.&#xD;&#xA;&#xD;&#xA;You vary the mass of the gun, shooter, &amp; the hand/arm strength, along with varying amounts of ammo powers for different recoils. A gun's recoil for a particular person doesn't vary much unless different cartridges are used or the shooter gets fatigued." />
  <row Id="14584" PostHistoryTypeId="2" PostId="7282" RevisionGUID="e3463395-5d10-4848-9bcc-fde6226c43a1" CreationDate="2011-01-11T12:47:47.997" UserId="338" Text="one possible solution would be to have some *basic* stats and some *derived* stats. &#xD;&#xA;For example you got strength (S) constitution (C) and mass (M). Hit point could come from C+M, while speed would come from S-M (mass could add to your basic hit point, but you're slower). if you got a derived stat (or bonus/malus) for falling, it could come from agility and mass, and so on.&#xD;&#xA;&#xD;&#xA;regards   &#xD;&#xA;Guillaume" />
  <row Id="14585" PostHistoryTypeId="2" PostId="7283" RevisionGUID="76d4ee79-c6d0-4896-bb1e-8c3611ed3668" CreationDate="2011-01-11T13:12:26.313" UserId="3503" Text="You can write wrapper around your Ogre particle system which represents internally two particles systems with the same parameters but with different images, and call it instead direct call of Ogre3d Api." />
  <row Id="14586" PostHistoryTypeId="2" PostId="7284" RevisionGUID="30bd46f8-a4d1-4894-a0fb-a05702df9960" CreationDate="2011-01-11T14:21:21.080" UserId="120" Text="Shawn Hargreaves to the rescue!&#xD;&#xA;&#xD;&#xA;http://blogs.msdn.com/b/shawnhar/archive/2009/12/17/the-psychology-of-randomness.aspx&#xD;&#xA;http://blogs.msdn.com/b/shawnhar/archive/2010/09/10/links-5-charles-bloom-on-randomness.aspx&#xD;&#xA;&#xD;&#xA;When you think random ditribution, you really mean even distribution. .Net's Random is thinking random. You need something else to even it out. The Poisson disk sampling method amitp linked to looks perfect for your needs." />
  <row Id="14587" PostHistoryTypeId="2" PostId="7285" RevisionGUID="04e8946a-a53c-4273-8a98-238fc181f5e3" CreationDate="2011-01-11T14:37:52.373" UserId="4463" Text="The scenario as you can see in the picture. A ball will be hitting a surface and I want to fairly correctly get the new angle after the collision.. &#xD;&#xA;&#xD;&#xA;I expect to know the X,Y coordinates of the lines breaking points (The picture below would has 6 lines)&#xD;&#xA;&#xD;&#xA;Secondly, if the ball would have a rotation - Is there a standard way of compensate for a &quot;screewed&quot; ball?&#xD;&#xA;&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/azLmn.jpg" />
  <row Id="14588" PostHistoryTypeId="1" PostId="7285" RevisionGUID="04e8946a-a53c-4273-8a98-238fc181f5e3" CreationDate="2011-01-11T14:37:52.373" UserId="4463" Text="How to calculate new direction after sprite collision " />
  <row Id="14589" PostHistoryTypeId="3" PostId="7285" RevisionGUID="04e8946a-a53c-4273-8a98-238fc181f5e3" CreationDate="2011-01-11T14:37:52.373" UserId="4463" Text="&lt;math&gt;&lt;collision-detection&gt;" />
  <row Id="14590" PostHistoryTypeId="2" PostId="7286" RevisionGUID="43e8012c-aa3d-4f18-a167-902f36eb345c" CreationDate="2011-01-11T15:03:11.330" UserId="4568" Text="What you need to calculate is the reflection vector;&#xD;&#xA;&#xD;&#xA;if **v** is the velocity of your ball and **n** is the normal vector of the surface the ball is bouncing from then the the velocty of the ball after the bounce (assuming perfectly elastic collision etc) will be;&#xD;&#xA;&#xD;&#xA;**v**-2(**v**.n)**n**&#xD;&#xA;&#xD;&#xA;in 2d this will be;&#xD;&#xA;&#xD;&#xA;newvelocity_x=v_x-2(v_x.n_x+v_y.n_y)n_x&#xD;&#xA;&#xD;&#xA;newvelocity_y=v_y-2(v_x.n_x+v_y.n_y)n_y&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14591" PostHistoryTypeId="2" PostId="7287" RevisionGUID="2736acc6-a7a5-44fd-9c2e-b1aefd39275c" CreationDate="2011-01-11T15:25:34.710" UserId="4569" Text="In my search for a good HTML5 game engine, the only one I can find that has decent features, has good documentation, and isn't in alpha is [RenderEngine](http://renderengine.com/). However, I barely ever hear about it. Is it just relatively unknown, or is there some glaring reason more people aren't using it?" />
  <row Id="14592" PostHistoryTypeId="1" PostId="7287" RevisionGUID="2736acc6-a7a5-44fd-9c2e-b1aefd39275c" CreationDate="2011-01-11T15:25:34.710" UserId="4569" Text="Has anyone used RenderEngine?" />
  <row Id="14593" PostHistoryTypeId="3" PostId="7287" RevisionGUID="2736acc6-a7a5-44fd-9c2e-b1aefd39275c" CreationDate="2011-01-11T15:25:34.710" UserId="4569" Text="&lt;html5&gt;" />
  <row Id="14594" PostHistoryTypeId="5" PostId="7286" RevisionGUID="c52a063a-7220-4934-adcd-adc8cd7cf0e2" CreationDate="2011-01-11T15:31:09.247" UserId="20" Comment="replaced period in the formula with a dot (bullet) for &quot;dot-product&quot;" Text="What you need to calculate is the reflection vector;&#xD;&#xA;&#xD;&#xA;if **v** is the velocity of your ball and **n** is the normal vector of the surface the ball is bouncing from then the the velocty of the ball after the bounce (assuming perfectly elastic collision etc) will be;&#xD;&#xA;&#xD;&#xA;**v**-2(**v**•n)**n**&#xD;&#xA;&#xD;&#xA;in 2d this will be;&#xD;&#xA;&#xD;&#xA;newvelocity_x=v_x-2(v_x.n_x+v_y.n_y)n_x&#xD;&#xA;&#xD;&#xA;newvelocity_y=v_y-2(v_x.n_x+v_y.n_y)n_y&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14595" PostHistoryTypeId="2" PostId="7288" RevisionGUID="ca5529f9-f1d6-4f0b-b37c-d111e0536186" CreationDate="2011-01-11T15:53:58.037" UserId="2332" Text="There are a lot of applications that you could use for this kind of AI. Personally, one of the most obvious techniques you could make use of is a position evaluation function. Killzone made use of this technique and it's described in the following paper:&#xD;&#xA;&#xD;&#xA;http://www.cgf-ai.com/docs/straatman_remco_killzone_ai.pdf&#xD;&#xA;&#xD;&#xA;Actually, you could probably utilise a lot of that paper since it describes world representation, line of sight data, lookup tables, etc, and you've basically got a graph already with your hex grid (you just need to add neighbouring nodes, which in this case would be the neighbouring hexagons to a single hexagon).&#xD;&#xA;&#xD;&#xA;Another thing to look into (that's pretty impressive at the moment, but slightly more advanced) is planners. I haven't read up much on Hierarchical Task Networks, I'll leave that to you. One planner that might help is GOAP (Goal Oriented Action Planning)&#xD;&#xA;&#xD;&#xA;This link has lots of information regarding GOAP: http://web.media.mit.edu/~jorkin/goap.html&#xD;&#xA;&#xD;&#xA;Something that I just thought of with regards to your &quot;Survive for X number of turns&quot; goal is the use of an influence map. An influence map is just a very simple representation for your world where each node (hexagon) has a single value associated with it (called the influence).&#xD;&#xA;&#xD;&#xA;The influence can be calculated in a number of ways, but an example for your case could be to have the players generate +10 influence on the hexagon they are placed on and +1 influence on the hexagon that is designated as the maximum range of the player.&#xD;&#xA;&#xD;&#xA;So for example, if you have a group of players clustered together, the influence around them would be relatively high. This could be construed by the AI as a threat to its life and moves away from the points of highest influence.&#xD;&#xA;&#xD;&#xA;These are just a few techniques that you could use, but there are loads others. If you want something simple, use something like hierarchical FSMs (pretty much FSMs with each state containing another FSM with a higher level of detail). If you want something complex but functional and practical use GOAP and influence maps. It doesn't really matter to be honest because the **MAIN POINT** is to make the AI fun, and to do that you need to implement some sort of &quot;artificial stupidity&quot;. No one will want to play an AI that's infinitely smarter than they are, regardless of how much effort you put into it. I'm not saying this to sound harsh, I'm saying this because it's important that the AI make mistakes cos their human counterparts sure do!&#xD;&#xA;&#xD;&#xA;Good luck! :)" />
  <row Id="14596" PostHistoryTypeId="5" PostId="7287" RevisionGUID="e18ad286-854c-449f-9049-a6bc8b380f73" CreationDate="2011-01-11T15:57:28.563" UserId="4569" Comment="added 36 characters in body; edited title; edited title" Text="In my search for a good HTML5 game engine, the only one I can find that has decent features, has good documentation, and isn't in alpha is [RenderEngine](http://renderengine.com/). However, I barely ever hear about it. Is it just relatively unknown, or is there some glaring reason more people aren't using it? What has your experience been like?" />
  <row Id="14597" PostHistoryTypeId="4" PostId="7287" RevisionGUID="e18ad286-854c-449f-9049-a6bc8b380f73" CreationDate="2011-01-11T15:57:28.563" UserId="4569" Comment="added 36 characters in body; edited title; edited title" Text="What is your experience with RenderEngine?" />
  <row Id="14598" PostHistoryTypeId="2" PostId="7289" RevisionGUID="685a71e3-efbf-419d-960d-b55407c794ba" CreationDate="2011-01-11T16:03:24.310" UserId="14" Text="RenderEngine like many other HTML5 game engines is still relatively new and unknown. That is why you haven't heard much about it. Just looking at it I can't really comment on how well it performs.&#xD;&#xA;&#xD;&#xA;As it stands, the best place to find out information about it would be it's message board: http://groups.google.com/group/the-render-engine/topics or the Google Code Issues Page:&#xD;&#xA;http://code.google.com/p/renderengine/issues/list" />
  <row Id="14599" PostHistoryTypeId="6" PostId="5111" RevisionGUID="f7862653-0816-42ea-b531-0d3eb1b4592b" CreationDate="2011-01-11T16:36:54.567" UserId="1156" Comment="edited tags" Text="&lt;ogre&gt;&lt;particles&gt;" />
  <row Id="14604" PostHistoryTypeId="2" PostId="7291" RevisionGUID="862d71e4-09ba-449f-a0ea-87e4fb0fd7d7" CreationDate="2011-01-11T17:05:57.487" UserId="1156" Text="I don't think it's relevant to what you're doing, but the most interesting way I have seen so far is in Amnesia: The Dark Descent (by the makers of Penumbra).&#xD;&#xA;&#xD;&#xA;The basic principle of the game is that the character does not have any memory of what is going on, and you are alone in a castle that is alive - that is, something is chasing you, but you don't know what. You have to try to escape, whilst avoiding the monsters that will chase you around and stopping yourself literally going insane.&#xD;&#xA;&#xD;&#xA;You cannot actually fight - one of the reasons its so scary (meeting a monster is certain death) - so there's less attributes, but you have 2: **Health** and **Sanity**. Instead of having '100/100 health', you simply get a description - 'A few minor cuts and bruises' or 'Struggling to walk'. And then low sanity made the screen go all weird.&#xD;&#xA;&#xD;&#xA;I much preferred this over the standard 'you have 15/200 health left'.&#xD;&#xA;&#xD;&#xA;An idea I was planning on using for my RPG:&#xD;&#xA;&#xD;&#xA;Instead of a 'hit points', 'constitution', or 'strength' stat, you instead have 'upper body muscle' or 'arm dexterity'. It's very much a BODY PART + STAT system, but it makes more logical sense. I mean, if you worked out at a gym in a game running, then you would have much stronger legs, but having your hit points going up would be very generic - *I have strong legs, so therefore getting hit in the chest doesn't do as much damage.* In the same kind of way, a high strength would usually equate to a direct damage bonus. With a sledgehammer, this makes sense, but there's only a certain amount of power you can apply to a katana, say." />
  <row Id="14605" PostHistoryTypeId="2" PostId="7292" RevisionGUID="fda170a5-1475-4be9-89cd-d05b924b26bc" CreationDate="2011-01-11T17:16:16.983" UserId="1320" Text="While Constantin's solution for player classes is valid, another possibility is to force the player to create his own class similar to what is done in Demon's Souls.&#xD;&#xA;&#xD;&#xA;For those not familiar, with each level the player can add 1 point to any stat (speed, magic, strength, vitality, stamina, etc.).  Now while this can lead to stats being linear and not giving an RPS type mechanic (a fully upgraded character will have access to all stats), you can limit the player's ability to do this by making the level scaling incredibly high at later levels or just limit them to a certain level so that all stats cannot be 99.  In either case, you end up with players forced to lean toward speed, power, vitality, etc. types of builds which will create an RPS mechanic." />
  <row Id="14606" PostHistoryTypeId="5" PostId="7291" RevisionGUID="d3958534-7097-41e2-806d-84daaf9b1eee" CreationDate="2011-01-11T19:59:08.247" UserId="1156" Comment="added 858 characters in body" Text="I don't think it's relevant to what you're doing, but the most interesting way I have seen so far is in Amnesia: The Dark Descent (by the makers of Penumbra).&#xD;&#xA;&#xD;&#xA;The basic principle of the game is that the character does not have any memory of what is going on, and you are alone in a castle that is alive - that is, something is chasing you, but you don't know what. You have to try to escape, whilst avoiding the monsters that will chase you around and stopping yourself literally going insane.&#xD;&#xA;&#xD;&#xA;You cannot actually fight - one of the reasons its so scary (meeting a monster is certain death) - so there's less attributes, but you have 2: **Health** and **Sanity**. Instead of having '100/100 health', you simply get a description - 'A few minor cuts and bruises' or 'Struggling to walk'. And then low sanity made the screen go all weird.&#xD;&#xA;&#xD;&#xA;I much preferred this over the standard 'you have 15/200 health left'.&#xD;&#xA;&#xD;&#xA;An idea I was planning on using for my RPG:&#xD;&#xA;&#xD;&#xA;Instead of a 'hit points', 'constitution', or 'strength' stat, you instead have 'upper body muscle' or 'arm dexterity'. It's very much a BODY PART + STAT system, but it makes more logical sense. I mean, if you worked out at a gym in a game running, then you would have much stronger legs, but having your hit points going up would be very generic - *I have strong legs, so therefore getting hit in the chest doesn't do as much damage.* In the same kind of way, a high strength would usually equate to a direct damage bonus. With a sledgehammer, this makes sense, but there's only a certain amount of power you can apply to a katana, say.&#xD;&#xA;&#xD;&#xA;EDIT: I have remembered another stat system I was very fond of: **Fallout 3.**&#xD;&#xA;&#xD;&#xA;It had your usual 'base stats' - strength, endurance, luck, perception, agility, intelligence etc. Then there were a number - I think about 23 - other stats. These stats actually defined your character more. For example, a high strength meant you could carry more equipment, but not necessarily meant you could do lots of damage with a baseball bat. In the same way having a high energy weapons meant you could do a lot of damage with a laser rifle, but wouldn't necessarily mean you were very agile.&#xD;&#xA;&#xD;&#xA;Then each of the base skills had a trickledown of a few points to other skills - every point in strength gave about 1.5 points to melee weapons, for example. This made me as a player consider my stat choices much more than 'durrr shove it all in &lt; weapon I'm using &gt;'." />
  <row Id="14607" PostHistoryTypeId="2" PostId="7293" RevisionGUID="d1aa91d9-aeb6-4581-be0a-42f2ca7d23a7" CreationDate="2011-01-11T19:34:08.143" UserDisplayName="Yann Core" Text="I'm making a game in Pygame and I want to be able to target enemy unit.&#xD;&#xA;I made it so when I click on them a variable &quot;targeted&quot; becomes true, and stays true until I click somewhere else on the screen. I also want targeted units to have a small green circle around them, so I made it in GEDIT. I have made a function that draws everything on the screen (the background, the player, objects, etc) and in the part where it draws the units it checks if the variable &quot;targeted&quot; is true and if  it is it should move that little green circle over the enemy units.&#xD;&#xA;&#xD;&#xA;here is the code that does that:&#xD;&#xA;&#xD;&#xA;    screen.blit(enemy_unit.pic, enemy_unit.rect) #draw the unit&#xD;&#xA;&#xD;&#xA;    if enemy_unit.targeted == True: #if the unit has been targeted then draw a circle over it &#xD;&#xA;        target_rect.move_ip(enemy_unit.pos)  #move the circle to the unit&#xD;&#xA;        target_rect.fit(enemy_unit.rect)     #there are some bigger units and some smaller ones, so we have to &quot;scale&quot; the circle&#xD;&#xA;        screen.blit(target_pic, target_rect) #actually draw the circle&#xD;&#xA;&#xD;&#xA;This doesn't work, when I target the unit the circle just appears for a 1/5 of second next (not on, but just next) to the unit and then disappears. I am sure that I am keeping a good track of &quot;enemy_unit.pos&quot; because I tested it (I added a piece of code that would print one units position and mouse's position every time i clicked the mouse and when i was near him the numbers were same).&#xD;&#xA;&#xD;&#xA;If you could give me a hint about what I'm doing wrong. I think its in move_ip function, but I tried just move and it didn't work either (the circle didn't even show at all)!" />
  <row Id="14608" PostHistoryTypeId="1" PostId="7293" RevisionGUID="d1aa91d9-aeb6-4581-be0a-42f2ca7d23a7" CreationDate="2011-01-11T19:34:08.143" UserDisplayName="Yann Core" Text="Problems moving a rectangle in Pygame." />
  <row Id="14609" PostHistoryTypeId="3" PostId="7293" RevisionGUID="d1aa91d9-aeb6-4581-be0a-42f2ca7d23a7" CreationDate="2011-01-11T19:34:08.143" UserDisplayName="Yann Core" Text="&lt;python&gt;&lt;game-development&gt;&lt;pygame&gt;" />
  <row Id="14610" PostHistoryTypeId="17" PostId="7293" RevisionGUID="92e200ae-e4c1-4af0-bbe5-6261079c2497" CreationDate="2011-01-11T21:04:36.730" UserId="-1" Comment="from http://stackoverflow.com/questions/4661787/problems-moving-a-rectangle-in-pygame" Text="" />
  <row Id="14611" PostHistoryTypeId="2" PostId="7294" RevisionGUID="831eae01-855d-42a8-a642-7fa698232bf8" CreationDate="2011-01-11T21:10:55.957" UserId="4576" Text="     elif event.type == MOUSEBUTTONDOWN and event.button == 1 and pressed == False:&#xD;&#xA;          pressed = True&#xD;&#xA;          for enemie in lista_neprijatelja:&#xD;&#xA;               if enemie.rect.collidepoint(pygame.mouse.get_pos()):&#xD;&#xA;                    enemie.targeted = True&#xD;&#xA;               else:&#xD;&#xA;                    enemie.targeted = False&#xD;&#xA;    &#xD;&#xA;     elif event.type == MOUSEBUTTONUP and event.button == 1 and pressed == True:&#xD;&#xA;          pressed = False&#xD;&#xA;&#xD;&#xA;I am sure that this works as it should - I tested it." />
  <row Id="14612" PostHistoryTypeId="25" PostId="7293" RevisionGUID="5f2484c5-11b5-4ac4-a745-57037a3d2106" CreationDate="2011-01-11T22:55:26.107" Comment="http://twitter.com/#!/StackGameDev/status/24962615847419904" />
  <row Id="14613" PostHistoryTypeId="6" PostId="7293" RevisionGUID="46817dd3-fde3-48a9-bb8d-d906edfeabae" CreationDate="2011-01-11T23:06:33.817" UserId="51" Comment="edited tags" Text="&lt;python&gt;&lt;pygame&gt;" />
  <row Id="14614" PostHistoryTypeId="2" PostId="7295" RevisionGUID="e534fa43-0a15-4e84-997c-540c89c523d9" CreationDate="2011-01-11T23:24:43.457" UserId="4508" Text="hi juys my simple opengl program is really toooo slow and not fluid&#xD;&#xA;i'm rendering 30 sphere with simple illumination and simple material.&#xD;&#xA;the only hard(?) computing stuffs i do is a collision detection between ray-mouse and spheres (that works ok and i do it only in mouseMoved)&#xD;&#xA;i have no thread only animator to move spheres&#xD;&#xA;&#xD;&#xA;how can i profile my jogl project?&#xD;&#xA;&#xD;&#xA;or mayebe (most probable..) i have some opengl instruction that i don't understand and make render particular accurate (or back face rendering that i don't need or whatever i don't know exctly i'm just entered in opengl world)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14615" PostHistoryTypeId="1" PostId="7295" RevisionGUID="e534fa43-0a15-4e84-997c-540c89c523d9" CreationDate="2011-01-11T23:24:43.457" UserId="4508" Text="[JOGL] my program is too slow, ho can i profile with Eclipse?" />
  <row Id="14616" PostHistoryTypeId="3" PostId="7295" RevisionGUID="e534fa43-0a15-4e84-997c-540c89c523d9" CreationDate="2011-01-11T23:24:43.457" UserId="4508" Text="&lt;java&gt;&lt;profiler&gt;" />
  <row Id="14617" PostHistoryTypeId="2" PostId="7296" RevisionGUID="7d7661bf-5fb6-4d1b-b812-f74240900cfd" CreationDate="2011-01-11T23:26:03.980" UserId="4579" Text="I am wondering if there is a simple tutorial that covers the basics of how to initialize rotation, translation and projection matrices, and how to multiply them, and how to get the screen coordinates afterwards for a 3d point.&#xD;&#xA;&#xD;&#xA;Idealy, the tutorial comes with compilable code and is not dependent on any 3rd party library. &#xD;&#xA;&#xD;&#xA;Searching the internet, I found lots of tutorials, so this is not the problem. Yet, it seemed all of these either covered openGl or directX, or they were theoretical in nature.&#xD;&#xA;" />
  <row Id="14618" PostHistoryTypeId="1" PostId="7296" RevisionGUID="7d7661bf-5fb6-4d1b-b812-f74240900cfd" CreationDate="2011-01-11T23:26:03.980" UserId="4579" Text="Basic tutorial/introduction for 3d matrices, idealy in c++, without openGl or directX" />
  <row Id="14619" PostHistoryTypeId="3" PostId="7296" RevisionGUID="7d7661bf-5fb6-4d1b-b812-f74240900cfd" CreationDate="2011-01-11T23:26:03.980" UserId="4579" Text="&lt;math&gt;&lt;tutorials&gt;&lt;matrix&gt;" />
  <row Id="14620" PostHistoryTypeId="2" PostId="7297" RevisionGUID="c5459228-4136-4469-bc86-bdfe6cba502a" CreationDate="2011-01-11T23:41:00.607" UserId="2306" Text="One of my very, very favoritest things:&#xD;&#xA;&#xD;&#xA;[Matrices can be your friends][1]&#xD;&#xA;&#xD;&#xA;And another one that just came up but looks nice, [Matrices ARE your friends][2].&#xD;&#xA;&#xD;&#xA;Get the math down, and the framework you're using (OpenGL, DirectX/XNA, or whatever) will start to make more sense.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sjbaker.org/steve/omniv/matrices_can_be_your_friends.html&#xD;&#xA;  [2]: http://rel.betterwebber.com/mytutes/3dtutes/chapter4/chapter4.htm" />
  <row Id="14621" PostHistoryTypeId="6" PostId="7295" RevisionGUID="56b583de-8b21-479e-8cf2-01822cb5d029" CreationDate="2011-01-12T00:08:32.117" UserId="51" Comment="tried to fix some english issues..." Text="&lt;java&gt;&lt;profiler&gt;&lt;jogl&gt;" />
  <row Id="14622" PostHistoryTypeId="5" PostId="7295" RevisionGUID="56b583de-8b21-479e-8cf2-01822cb5d029" CreationDate="2011-01-12T00:08:32.117" UserId="51" Comment="tried to fix some english issues..." Text="My simple opengl program is really toooo slow and not fluid.&#xD;&#xA;I'm rendering 30 sphere with simple illumination and simple materials.&#xD;&#xA;The only complex computing stuff I do is a collision detection between ray-mouse and spheres (that works ok and i do it only in mouseMoved)&#xD;&#xA;I'm not using any threads, just an animator to move spheres.&#xD;&#xA;&#xD;&#xA;How can I profile my jogl project?&#xD;&#xA;&#xD;&#xA;Or maybe (most probable...) I have some opengl instructions that I don't understand and make render particular accurate (or back face rendering that I don't need or whatever I don't know exactly I'm just entering the opengl world)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14623" PostHistoryTypeId="4" PostId="7295" RevisionGUID="56b583de-8b21-479e-8cf2-01822cb5d029" CreationDate="2011-01-12T00:08:32.117" UserId="51" Comment="tried to fix some english issues..." Text="[JOGL] My program is too slow, how can I profile with Eclipse?" />
  <row Id="14624" PostHistoryTypeId="2" PostId="7298" RevisionGUID="aee4326f-2691-4778-9beb-99f3d691f08b" CreationDate="2011-01-12T00:30:05.130" UserId="3794" Text="This is not a actual answer to your question. But something like learning exercise i suggest for you, if you want to learn about 3D graphics matrices. &#xD;&#xA;&#xD;&#xA;Make you own super simple CPU based 3D rendering library. For start you should use something like canvas which enables to draw polygones (triangles). I sugests [SDL][1]. For algebra maybe [armadillo][2], but it is little overkill. You can be fine with some simple matrix4x4 and vector2/3/4 class (or write own). &#xD;&#xA;&#xD;&#xA;Then go to opengl documentation and code these function:&#xD;&#xA;&#xD;&#xA;    gl_begin //(support only triangles)&#xD;&#xA;    gl_color //color will help you to determine which triangle is which one&#xD;&#xA;    gl_vertex&#xD;&#xA;    gl_end&#xD;&#xA;    &#xD;&#xA;    glMatrixMode // it is not neccesery to have matrix stack for you, so you can use some easier approach&#xD;&#xA;    glLoadIdentity&#xD;&#xA;    glOrtho&#xD;&#xA;    glFrustum&#xD;&#xA;    gluPerspective&#xD;&#xA;    &#xD;&#xA;    glTranslate&#xD;&#xA;    glRotate&#xD;&#xA;    glScale&#xD;&#xA;    // and that could be enough for easy render library. &#xD;&#xA;&#xD;&#xA;And read as much theory before. David Lively suggested nice articles. I don't say to make it in the same way that opengl does. It can be simplier for super simple library you are going to create, but opengl has very smart archicture, so consider keeping your path with it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org&#xD;&#xA;  [2]: http://arma.sourceforge.net/" />
  <row Id="14625" PostHistoryTypeId="5" PostId="7298" RevisionGUID="89a48da5-7663-450f-8e57-ac5f151885d1" CreationDate="2011-01-12T00:57:32.273" UserId="3794" Comment="added glViewport function" Text="This is not a actual answer to your question. But something like learning exercise i suggest for you, if you want to learn about 3D graphics matrices. &#xD;&#xA;&#xD;&#xA;Make you own super simple CPU based 3D rendering library. For start you should use something like canvas which enables to draw polygones (triangles). I sugests [SDL][1]. For algebra maybe [armadillo][2], but it is little overkill. You can be fine with some simple matrix4x4 and vector2/3/4 class (or write own). &#xD;&#xA;&#xD;&#xA;Then go to opengl documentation and code these function:&#xD;&#xA;&#xD;&#xA;    gl_begin //(support only triangles)&#xD;&#xA;    gl_color //color will help you to determine which triangle is which one&#xD;&#xA;    gl_vertex&#xD;&#xA;    gl_end&#xD;&#xA;    &#xD;&#xA;    glViewport&#xD;&#xA;&#xD;&#xA;    glMatrixMode // it is not neccesery to have matrix stack for you, so you can use some easier approach&#xD;&#xA;    glLoadIdentity&#xD;&#xA;    glOrtho&#xD;&#xA;    glFrustum&#xD;&#xA;    gluPerspective&#xD;&#xA;    &#xD;&#xA;    glTranslate&#xD;&#xA;    glRotate&#xD;&#xA;    glScale&#xD;&#xA;    // and that could be enough for easy render library. &#xD;&#xA;&#xD;&#xA;And read as much theory before. David Lively suggested nice articles. I don't say to make it in the same way that opengl does. It can be simplier for super simple library you are going to create, but opengl has very smart archicture, so consider keeping your path with it. &#xD;&#xA;&#xD;&#xA;It is possible that i forgoten to include some crucial function, let me know in comments please.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org&#xD;&#xA;  [2]: http://arma.sourceforge.net/" />
  <row Id="14626" PostHistoryTypeId="2" PostId="7299" RevisionGUID="14832354-e4be-4dd8-ac75-302a7accddd6" CreationDate="2011-01-12T01:08:27.067" UserDisplayName="Zahne" Text="I wouldn't recommend Silverlight. I've worked in &lt;a href=&quot;http://gameshastra.com/GameDev_Overview.html&quot;&gt;game development&lt;/a&gt; for some time and most serious developers would make the same call - esp w/ the competition of flash + now HTML5" />
  <row Id="14627" PostHistoryTypeId="25" PostId="7296" RevisionGUID="28df7d2f-04a2-4a68-b2b8-06533c0067f2" CreationDate="2011-01-12T01:55:26.713" Comment="http://twitter.com/#!/StackGameDev/status/25007916863983616" />
  <row Id="14628" PostHistoryTypeId="2" PostId="7300" RevisionGUID="dc700874-70b3-4f06-9e8a-971948d83bc5" CreationDate="2011-01-12T01:55:57.323" UserId="4581" Text="I'm creating a basic &quot;game&quot; in iOS 4.1. The premise is simple, there is a green rectangle (&quot;disk&quot;) that moves/bounces around the screen, and red rectangle (&quot;bump&quot;) that is stationary. The user can move the red &quot;bump&quot; by touching another coordinate on the screen, but that's irrelevant to this question.&#xD;&#xA;&#xD;&#xA;Each rectangle is a UIImageView (I will replace them with some kind of image/icon once I get the mechanics down). I've gotten as far as detecting when the rectangles collide, and I'm able to reverse the direction of the green &quot;disk&quot; on the Y axis if they do. This works well when the green &quot;disk&quot; approaches the red &quot;bump&quot; from top or bottom, it bounces off in the other direction. But when it approaches from the side, the bounce is incorrect; I need to reverse the X direction instead.&#xD;&#xA;&#xD;&#xA;Here's the timer I setup:&#xD;&#xA;&#xD;&#xA;    - (void)viewDidLoad {&#xD;&#xA;        xSpeed =  3;&#xD;&#xA;        ySpeed = -3;&#xD;&#xA;        gameTimer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(mainGameLoop:) userInfo:nil repeats:YES];    &#xD;&#xA;        [super viewDidLoad];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Here's the main game loop:&#xD;&#xA;&#xD;&#xA;    - (void) mainGameLoop:(NSTimer *)theTimer {&#xD;&#xA;        disk.center = CGPointMake(disk.center.x + xSpeed, disk.center.y + ySpeed);&#xD;&#xA;        &#xD;&#xA;        // make sure the disk does not travel off the edges of the screen&#xD;&#xA;        // magic number values based on size of disk's frame&#xD;&#xA;        // startAnimating causes the image to &quot;pulse&quot;&#xD;&#xA;        if (disk.center.x &lt; 55 || disk.center.x &gt; 265) {&#xD;&#xA;            xSpeed = xSpeed * -1;&#xD;&#xA;            [disk startAnimating];&#xD;&#xA;        } &#xD;&#xA;        if (disk.center.y &lt; 55 || disk.center.y &gt; 360) {&#xD;&#xA;            ySpeed = ySpeed * -1;&#xD;&#xA;            [disk startAnimating];&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;    &#xD;&#xA;        // check to see if the disk collides with the bump&#xD;&#xA;        if (CGRectIntersectsRect(disk.frame, bump.frame)) {&#xD;&#xA;            NSLog(@&quot;Collision detected...&quot;);&#xD;&#xA;            if (! [disk isAnimating]) {&#xD;&#xA;                ySpeed = ySpeed * -1;&#xD;&#xA;                [disk startAnimating];&#xD;&#xA;            }    &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So my question is: how can I detect whether I need to flip the X speed or the Y speed? ie: how can I calculate which edge of the bump was collided with?" />
  <row Id="14629" PostHistoryTypeId="1" PostId="7300" RevisionGUID="dc700874-70b3-4f06-9e8a-971948d83bc5" CreationDate="2011-01-12T01:55:57.323" UserId="4581" Text="How to detect which edges of a rectange touch when they collide in iOS" />
  <row Id="14630" PostHistoryTypeId="3" PostId="7300" RevisionGUID="dc700874-70b3-4f06-9e8a-971948d83bc5" CreationDate="2011-01-12T01:55:57.323" UserId="4581" Text="&lt;iphone&gt;&lt;collision-detection&gt;&lt;learning&gt;" />
  <row Id="14631" PostHistoryTypeId="2" PostId="7301" RevisionGUID="48b983b7-c22f-43fe-8109-cb7eaabef756" CreationDate="2011-01-12T02:07:55.497" UserId="1430" Text="I have found that the D3D SDK documentation does have a reasonably good, and relatively API-agnostic overview of the transformation pipeline. The thing to remember is that while references may show you how to set matrices with API-specific alls, nothing about the form or values in those matrices is API-specific -- it's all just math under the hood, and you can make it do whatever you need it to.&#xD;&#xA;&#xD;&#xA;In addition to the two links David Lively provided, there's an MIT Opencourseware graphics course [here][1]. You can also find a fair number of references -- of perhaps unknown quality -- by searching for &quot;computer graphics pipeline&quot; and omitting specific references to APIs.&#xD;&#xA;&#xD;&#xA;However, for the deepest forays into the theoretical graphics pipeline fundamentals, I would submit that books are still the best way to go. I am particularly fond of &quot;Fundamentals of Computer Graphics, 3rd Ed,&quot; and &quot;The Geometry Toolbox&quot; (the latter is primarily a discussion of the linear algebra behind the graphics and not so much the graphics itself, though).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-837-computer-graphics-fall-2003/" />
  <row Id="14632" PostHistoryTypeId="5" PostId="7248" RevisionGUID="13a51916-825a-4ca2-82a2-b2ff7a420c11" CreationDate="2011-01-12T02:10:05.517" UserId="3536" Comment="added 171 characters in body" Text="I am not sure if it is possible to detect this, the browser will download the font when it see's the CSS. You could draw the text using a default font, then use something like [this][1] to detect if the font has loaded outside your canvas. If it is detected as having loaded, you could then refresh your canvas.&#xD;&#xA;&#xD;&#xA;Edit; &quot;What would the proper method of handling this be in the case that a user has disabled custom fonts&quot; - You would have to let the default parent font remain present&#xD;&#xA;&#xD;&#xA;  [1]: http://ajaxian.com/archives/javascriptcss-font-detector" />
  <row Id="14633" PostHistoryTypeId="6" PostId="7300" RevisionGUID="43a01063-5bb2-411a-9b0c-7dfcc4ccaf54" CreationDate="2011-01-12T02:28:56.153" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;collision-detection&gt;" />
  <row Id="14634" PostHistoryTypeId="2" PostId="7302" RevisionGUID="d1859533-16e7-49a8-aefd-b8187e102a9d" CreationDate="2011-01-12T02:46:50.587" UserId="4583" Text="What do you mean by &quot;too slow&quot;, as in it dropped from 5000 frames per second to 500, or it went from 100 to 2 (do note that frame rate is a logarithmic time scale).&#xD;&#xA;&#xD;&#xA;For profiling, there are several java profilers, and some of them have plugins for eclipse. A quick google turns up several potential solutions.&#xD;&#xA;&#xD;&#xA;As far as OpenGL goes, a couple of things: are you using matrices, or manually transforming the vertices? Do you use VBOs or Display Lists, or are you submitting each sphere using immediate mode instructions? How many triangles in each sphere?" />
  <row Id="14635" PostHistoryTypeId="2" PostId="7303" RevisionGUID="4cc36cc6-f7ce-4914-866f-33445d9f30e8" CreationDate="2011-01-12T03:08:14.690" UserId="1430" Text="There are [several Java profilers][1] you can evaluate. That will only tell you so much, though -- basically what's going on CPU-side. If that's where your performance bottleneck is, great, but if not you may need to resort to tools like [gDebugger][2] to do analysis on your OpenGL call stream.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=java+profiler&#xD;&#xA;  [2]: http://www.gremedy.com/" />
  <row Id="14636" PostHistoryTypeId="2" PostId="7304" RevisionGUID="2e8c01f2-0493-40cf-8d0e-93c97f322e9c" CreationDate="2011-01-12T04:01:37.777" UserId="1516" Text="I'm creating a path-finder for navmesh. I'm wondering which method should I use after the A* has been completed, funneling or string pulling? What are the advantages/disadvantages of using them on a triangle-based navmesh?" />
  <row Id="14637" PostHistoryTypeId="1" PostId="7304" RevisionGUID="2e8c01f2-0493-40cf-8d0e-93c97f322e9c" CreationDate="2011-01-12T04:01:37.777" UserId="1516" Text="Navmesh string pulling vs funneling" />
  <row Id="14638" PostHistoryTypeId="3" PostId="7304" RevisionGUID="2e8c01f2-0493-40cf-8d0e-93c97f322e9c" CreationDate="2011-01-12T04:01:37.777" UserId="1516" Text="&lt;path-finding&gt;" />
  <row Id="14639" PostHistoryTypeId="2" PostId="7305" RevisionGUID="b4df9d9b-4eb5-49db-bbef-fe75bed7d93c" CreationDate="2011-01-12T04:19:26.870" UserId="4584" Text="I would hope that we have all played Zelda: A Link to the Past, please correct me if I'm wrong, but I want to emulate that kind of 2D, top-down character movement with a touch of correction. It has been done in other games, but I feel this reference would be the easiest to relate to.  More specifically the kind of movement and correction I'm talking about is:&#xD;&#xA;&#xD;&#xA; - Floating movement not restricted to tile based movement like Pokemon and other games where one tap of the movement pad moves you one square in that cardinal direction. This floating movement should be able to achieve diagonal motion.&#xD;&#xA; - If you're walking West and you come to a wall that is diagonal in a North East/South West fashion, you are corrected into a South West movement even if you continue holding left (West) on the controller. This should work for both diagonals correcting in both directions.&#xD;&#xA; - If you're a few pixels off from walking squarely into a door or hallway, you are corrected into walking through the hall or down the hallway, i.e. bumping into the corner causes you to be pushed into the hall/door.&#xD;&#xA;&#xD;&#xA;I've hunted for efficient ways to achieve this and have had no luck. To be clear I'm talking about the human character's movement, not an NPC's movement. Are their resources available on this kind of movement? Equations or algorithms explained on a wiki or something?&#xD;&#xA;&#xD;&#xA;I'm using the XNA Framework, is there anything in it to help with this?" />
  <row Id="14640" PostHistoryTypeId="1" PostId="7305" RevisionGUID="b4df9d9b-4eb5-49db-bbef-fe75bed7d93c" CreationDate="2011-01-12T04:19:26.870" UserId="4584" Text="Top Down RPG Movement w/ Correction?" />
  <row Id="14641" PostHistoryTypeId="3" PostId="7305" RevisionGUID="b4df9d9b-4eb5-49db-bbef-fe75bed7d93c" CreationDate="2011-01-12T04:19:26.870" UserId="4584" Text="&lt;movement&gt;" />
  <row Id="14642" PostHistoryTypeId="2" PostId="7306" RevisionGUID="1f1e8238-26c3-4909-bdcb-0057d734b3a9" CreationDate="2011-01-12T04:41:47.040" UserId="4116" Text="You can't simply do that with CGRectIntersectsRect. That's only a method that say if a collision is detected or not.&#xD;&#xA;&#xD;&#xA;So you have to &quot;split&quot; your rect into more &quot;pieces&quot; and call CGRectIntersectsRect for each piece (or do that by hand without CGRectIntersectsRect).&#xD;&#xA;I.e. &#xD;&#xA;&#xD;&#xA;    CGRect Up = CGRectMake(bump.frame.origin.x, bump.frame.origin.y, bump.frame.size.width, bump.frame.size.height/4);&#xD;&#xA;    CGRect Down = CGRectMake(bump.frame.origin.x, bump.frame.origin.y + (bump.frame.size.height/4)*3, bump.frame.size.width, bump.frame.size.height/4);&#xD;&#xA;    &#xD;&#xA;    CGRect Left = CGRectMake(bump.frame.origin.x, bump.frame.origin.y + bump.frame.size.height/4, bump.frame.size.width/4, bump.frame.size.height/2);&#xD;&#xA;    CGRect Right = CGRectMake(bump.frame.origin.x+(bump.frame.size.width/4)*3, bump.frame.origin.y + bump.frame.size.height/4, bump.frame.size.width/4, bump.frame.size.height/2);&#xD;&#xA;&#xD;&#xA;Then you can check where your frame first collide (but be carefull: that example is only edge detection - the center isn't detected at all).&#xD;&#xA;&#xD;&#xA;    if (CGRectIntersectsRect(disk.frame, Up) || CGRectIntersectsRect(disk.frame, Down)) {&#xD;&#xA;      NSLog(@&quot;Collision detected...&quot;);&#xD;&#xA;      if (! [disk isAnimating]) {&#xD;&#xA;        ySpeed = ySpeed * -1;&#xD;&#xA;        [disk startAnimating];&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    if (CGRectIntersectsRect(disk.frame, Left) || CGRectIntersectsRect(disk.frame, Right)) {&#xD;&#xA;      NSLog(@&quot;Collision detected...&quot;);&#xD;&#xA;      if (! [disk isAnimating]) {&#xD;&#xA;        xSpeed = xSpeed * -1;&#xD;&#xA;        [disk startAnimating];&#xD;&#xA;      }    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I couldn't test this code, so please be carefull - it's only to give you an general idea about this...&#xD;&#xA;" />
  <row Id="14643" PostHistoryTypeId="2" PostId="7307" RevisionGUID="137ed3d8-afb4-4b85-a210-1206e70a4eeb" CreationDate="2011-01-12T04:50:54.500" UserId="1430" Text="Well, the first bullet point is easy. You simply store and manipulate the character's position in world or pixel coordinates instead of tile-based coordinates. If you were having an issue with this, it might be due to a a confusing choice of representation for your world and tile space, so perhaps you should post more details about it / ask a separate, specific question.&#xD;&#xA;&#xD;&#xA;For the second point, the most direct approach would be to take the player's (normalized) movement vector and add it to the wall's normal vector, then renormalize. The sign of the components of the resulting vector will indicate how the wall relates to the player's motion while the vector itself indicates which direction the player may now move.&#xD;&#xA;&#xD;&#xA;For the third point, assuming you have collision rectangles for both the wall and the player, you should be able to determine how much of the player's collision rectangle contacts with the wall's collision rectangle. If, for example, the player is moving to the right and hits a vertical wall, you compare the Y axis extents of the collision rectangles -- if if the player's extent exceeds the wall's extent by some threshold, say 75% of the player's Y axis extent, then you &quot;cheat&quot; the player towards the door.&#xD;&#xA;&#xD;&#xA;I've made a fair number of assumptions here in how your object model looks in your code and what techniques you've chosen -- largely due to the generality of your question. I've tried to suggest approaches that are simple (although perhaps not optimal) for the same reason. If you can provide more specific information, either in this question or in a new one, I can try to provide more details or a better idea." />
  <row Id="14644" PostHistoryTypeId="25" PostId="7305" RevisionGUID="367fea25-c08a-4fe6-8c0d-bcdda6930a5a" CreationDate="2011-01-12T04:55:26.880" Comment="http://twitter.com/#!/StackGameDev/status/25053216399958016" />
  <row Id="14645" PostHistoryTypeId="2" PostId="7308" RevisionGUID="002df1aa-713b-4dfd-97f9-6b9e132059a0" CreationDate="2011-01-12T04:59:47.327" UserId="4585" Text="I'm developing a picking system that will use rays that intersect volumes and I'm having trouble with ray intersection versus a plane. I was able to figure out spheres fairly easily, but planes are giving me trouble. I've tried to understand various sources and get hung up on some of the variables used within their explanations.&#xD;&#xA;&#xD;&#xA;Here is a snippet of my code:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       bool Picking()&#xD;&#xA;     {&#xD;&#xA;      D3DXVECTOR3 vec;&#xD;&#xA;      D3DXVECTOR3 vRayDir;&#xD;&#xA;      D3DXVECTOR3 vRayOrig;&#xD;&#xA;      D3DXVECTOR3 vROO, vROD; // vect ray obj orig, vec ray obj dir&#xD;&#xA;      D3DXMATRIX m;&#xD;&#xA;      D3DXMATRIX mInverse;&#xD;&#xA;      D3DXMATRIX worldMat;&#xD;&#xA;    &#xD;&#xA;                    // Obtain project matrix&#xD;&#xA;      D3DXMATRIX pMatProj =   CDirectXRenderer::GetInstance()-&gt;Director()-&gt;Proj();&#xD;&#xA;                    // Obtain mouse position&#xD;&#xA;      D3DXVECTOR3 pos = CGUIManager::GetInstance()-&gt;GUIObjectList.front().pos;&#xD;&#xA;                    &#xD;&#xA;                    // Get window width &amp; height&#xD;&#xA;      float w = CDirectXRenderer::GetInstance()-&gt;GetWidth();&#xD;&#xA;      float h = CDirectXRenderer::GetInstance()-&gt;GetHeight();&#xD;&#xA;    &#xD;&#xA;                    // Transform vector from screen to 3D space&#xD;&#xA;      vec.x =  (((2.0f * pos.x) / w) - 1.0f) / pMatProj._11;&#xD;&#xA;      vec.y = -(((2.0f * pos.y) / h) - 1.0f) / pMatProj._22;&#xD;&#xA;      vec.z = 1.0f;&#xD;&#xA;    &#xD;&#xA;                    // Create a view inverse matrix&#xD;&#xA;      D3DXMatrixInverse(&amp;m, NULL, &amp;CDirectXRenderer::GetInstance()-&gt;Director()-&gt;View());&#xD;&#xA;    &#xD;&#xA;                    // Determine our ray's direction&#xD;&#xA;      vRayDir.x = vec.x * m._11 + vec.y * m._21 + vec.z * m._31;&#xD;&#xA;      vRayDir.y = vec.x * m._12 + vec.y * m._22 + vec.z * m._32;&#xD;&#xA;      vRayDir.z = vec.x * m._13 + vec.y * m._23 + vec.z * m._33;&#xD;&#xA;    &#xD;&#xA;                    // Determine our ray's origin&#xD;&#xA;      vRayOrig.x = m._41;&#xD;&#xA;      vRayOrig.y = m._42;&#xD;&#xA;      vRayOrig.z = m._43;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      D3DXMatrixIdentity(&amp;worldMat);&#xD;&#xA;      //worldMat = aliveActors[0]-&gt;GetTrans();&#xD;&#xA;      D3DXMatrixInverse(&amp;mInverse, NULL, &amp;worldMat); &#xD;&#xA;    &#xD;&#xA;      D3DXVec3TransformCoord(&amp;vROO, &amp;vRayOrig, &amp;mInverse);&#xD;&#xA;      D3DXVec3TransformNormal(&amp;vROD, &amp;vRayDir, &amp;mInverse);&#xD;&#xA;      D3DXVec3Normalize(&amp;vROD, &amp;vROD);&#xD;&#xA;&#xD;&#xA;When using this code I'm able to detect a ray intersection via a sphere, but I have questions when determining an intersection via a plane. First off should I be using my vRayOrig &amp; vRayDir variables for the plane intersection tests or should I be using the new vectors that are created for use in object space? &#xD;&#xA;&#xD;&#xA;When looking at a site like this for example: http://www.tar.hu/gamealgorithms/ch22lev1sec2.html&#xD;&#xA;&#xD;&#xA;I'm curious as to what D is in the equation AX + BY + CZ + D = 0 and how does it factor in to determining a plane intersection?&#xD;&#xA;&#xD;&#xA;Any help will be appreciated, thanks." />
  <row Id="14646" PostHistoryTypeId="1" PostId="7308" RevisionGUID="002df1aa-713b-4dfd-97f9-6b9e132059a0" CreationDate="2011-01-12T04:59:47.327" UserId="4585" Text="Ray Intersecting Plane Formula in C++/DirectX" />
  <row Id="14647" PostHistoryTypeId="3" PostId="7308" RevisionGUID="002df1aa-713b-4dfd-97f9-6b9e132059a0" CreationDate="2011-01-12T04:59:47.327" UserId="4585" Text="&lt;c++&gt;" />
  <row Id="14648" PostHistoryTypeId="2" PostId="7309" RevisionGUID="d3afe14b-7cf1-4be1-828b-23440cafac63" CreationDate="2011-01-12T06:06:19.787" UserId="1430" Text="For your first question, about vRayOrig &amp; vRayDir, you should use what you need to use -- certainly the plane and the ray must be defined in the same space, or the results you get out of the intersection test will be meaningless. So you need to either define or transform the plane into the same space as the ray, or the other way around.&#xD;&#xA;&#xD;&#xA;For the second question, that's the implicit equation of a plane. D itself is just some constant for the plane; when the plane is normalized, it can be interpreted as &quot;the distance to the origin&quot; (A, B and C can be interpreted as the X, Y, Z components of the plane's normal), but you need to be careful with that.&#xD;&#xA;&#xD;&#xA;Look at it like this. A plane can be defined by some normal vector N, and a point P. All points in the plane will be perpendicular to the normal vector, which is to say the vector from P to any point T will be (T - P) and will be perpendicular to N. The dot product of two perpendicular vectors is zero. Thus:&#xD;&#xA;&#xD;&#xA;                              N dot (T - P) = 0&#xD;&#xA;    Nx(Tx - Px) + Ny(Ty - Py) + Nz(Tz - Pz) = 0    (dot product)&#xD;&#xA;    NxTx - NxPx + NyTy - NyPy + NzTz - NzPz = 0    (distribute)&#xD;&#xA;    NxTx + NyTy + NzTz - NxPx - NyPy - NzPz = 0    (collect and group)&#xD;&#xA;&#xD;&#xA;In case it's not clear, &quot;Nx&quot; is the X component of N, et cetera. Now that we've got that expansion, remember that (A,B,C) are often the names of the plane's normal's components, so we can rename:&#xD;&#xA;&#xD;&#xA;    ATx + BTy + CTz - APx - BPy - CPz = 0    (collect and group)&#xD;&#xA;&#xD;&#xA;That should look a little more familiar. If we call the whole second half of the equation D, we end up with `ATx + BTy + CTz + D = 0` or in general `Ax + By + Cz + D = 0` -- so D, is in fact (-APx - BPy - CPz) where P is the point that defines the plane.&#xD;&#xA;&#xD;&#xA;This is useful for ray intersection because it will be zero for any (x,y,z) on the plane -- and the point that the ray passes through the plane _will_ be on the plane. That's the computation that the page you linked to is demonstrating. For any point (x,y,z) that _isn't_ on the plane, the evaluation of (Ax + By + Cz + D) will be nonzero.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14649" PostHistoryTypeId="6" PostId="7308" RevisionGUID="921f1bc9-4a58-496b-8f6d-0e788bcbfd32" CreationDate="2011-01-12T06:07:43.000" UserId="1430" Comment="edited tags" Text="&lt;c++&gt;&lt;3d&gt;&lt;math&gt;&lt;linear-algebra&gt;" />
  <row Id="14650" PostHistoryTypeId="2" PostId="7310" RevisionGUID="1956aea2-62fa-4b40-b891-1482cb1092dd" CreationDate="2011-01-12T06:57:21.923" UserId="1430" Text="Since you're using rectangles and it sounds like you're also confining yourself to eight directional movement, you can probably get away with computing a vector from the ball's center to the bumper's, and examining that; it will tell you about their relative positions. If the magnitude of the Y component is greater the ball is hitting the top or bottom, if the X component is greater the ball is hitting the left or right, and if they are equal it's hitting exactly on the corner (maybe reverse both directions in that case?).&#xD;&#xA;&#xD;&#xA;A more robust solution would probably involve the [separating axis theorem][1] and use of penetration vectors to gauge response and real reflection vectors to compute the change in velocity. I don't know how robust a solution you need though.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Separating_axis_theorem" />
  <row Id="14651" PostHistoryTypeId="2" PostId="7311" RevisionGUID="060eaf62-4303-4041-9dca-43b0a865f645" CreationDate="2011-01-12T06:58:19.810" UserId="3630" Text="Somebody told me that when a png image is stored in swf, it's separated to several layer, hence the alpha channel can be compressed better. Is it true? Or, once png image is imported into a swf, it's format is changed, e.g converted into bitmap data, and than compressed by swf's compress algorithm. That's, it is not in png format anymore.  &#xD;&#xA;I don't know how swf packing its resource, please tell me if you know." />
  <row Id="14652" PostHistoryTypeId="1" PostId="7311" RevisionGUID="060eaf62-4303-4041-9dca-43b0a865f645" CreationDate="2011-01-12T06:58:19.810" UserId="3630" Text="Does swf provide better compress rate than zlib for png image?" />
  <row Id="14653" PostHistoryTypeId="3" PostId="7311" RevisionGUID="060eaf62-4303-4041-9dca-43b0a865f645" CreationDate="2011-01-12T06:58:19.810" UserId="3630" Text="&lt;flash&gt;&lt;image&gt;&lt;swf&gt;&lt;compression&gt;" />
  <row Id="14654" PostHistoryTypeId="25" PostId="7311" RevisionGUID="142b6764-b5e4-4ba1-a6b3-6f8444fd0aef" CreationDate="2011-01-12T07:55:26.920" Comment="http://twitter.com/#!/StackGameDev/status/25098515487137792" />
  <row Id="14655" PostHistoryTypeId="2" PostId="7312" RevisionGUID="0973b73d-d6f0-4e8d-9446-f6c82672ecce" CreationDate="2011-01-12T08:11:02.927" UserId="20" Text="If you add a PNG image in the Flash IDE, you can choose JPEG compression for it. The interesting part about this is, that it will preserve alpha transparency.&#xD;&#xA;&#xD;&#xA;So what internally happens is exactly as you describe. The alpha channel and the color information get separated and compressed individually. AFAIK the alpha will always be JPEG compressed whereas I'm not so sure about the image. I suspect that there is some analyzing going on and the algorithm then chooses either PNG or JPEG compression for the color data.&#xD;&#xA;&#xD;&#xA;This only applies for the Flash IDE though (eg. Flash CS 5, Flash CS 4, etc.). In Flex, images aren't treated that way. However there's a tool that can do that with any existing SWF. It's called &quot;reducer&quot; and can be found here: http://blog.joa-ebert.com/2009/08/08/reducer/&#xD;&#xA;&#xD;&#xA;Actually I encountered some weird behavior using Flex Builder a while back, where I compressed PNG game-assets using [ImageOptim][1] but the resulting SWF didn't decrease in filesize like I would have expected. This lead to [this question][2] on stackoverflow which isn't answered till today :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://imageoptim.pornel.net/&#xD;&#xA;  [2]: http://stackoverflow.com/questions/3139265/flex-does-the-flex-compiler-automatically-optimize-embedded-png-assets" />
  <row Id="14656" PostHistoryTypeId="2" PostId="7313" RevisionGUID="3d4ef29a-84ff-4f11-89f7-e2e3a905adc1" CreationDate="2011-01-12T08:58:27.103" UserId="20" Text="As long as you're just checking circle vs. rectangle collisions it should be sufficient to do the following:&#xD;&#xA;&#xD;&#xA;Whenever you detect a collision, check the center of your circle against the 6 outer sides of the rectangle, as in the following image:&#xD;&#xA;&#xD;&#xA;![6 outer areas of 2d rectangle][1]&#xD;&#xA;&#xD;&#xA;If the circle is in *bottom* or *top*, flip the Y-speed. If in *left* or *right* flip the X-speed. If the circle is located in one of the edges, you'll probably want to flip both. &#xD;&#xA;Please note that this will only work reliably when the traveled distance of the circle doesn't exceed the circle radius (this is per update). If your circle is moving faster, you'll be better off with continuous collision detection.&#xD;&#xA;&#xD;&#xA;This approach should be really fast and easy to implement. For a more robust collision detection that can also handle arbitrary convex polygons, check out the [separation axis theorem][2] (as also stated by Josh Petrie).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/t4hs7.png&#xD;&#xA;  [2]: http://www.sevenson.com.au/actionscript/sat/" />
  <row Id="14657" PostHistoryTypeId="5" PostId="7313" RevisionGUID="28b50e5b-e2e7-4cef-a2a0-0830d69d27a5" CreationDate="2011-01-12T09:06:57.587" UserId="20" Comment="fixed mistake" Text="As long as you're just checking circle vs. rectangle collisions it should be sufficient to do the following:&#xD;&#xA;&#xD;&#xA;Whenever you detect a collision, check the center of your circle against the 6 outer sides of the rectangle, as in the following image:&#xD;&#xA;&#xD;&#xA;![6 outer areas of 2d rectangle][1]&#xD;&#xA;&#xD;&#xA;If the circle is in *bottom* or *top*, flip the Y-speed. If in *left* or *right* flip the X-speed. If the circle is located in one of the edges, you'll probably want to flip both. &#xD;&#xA;Please note that this will only work reliably when the traveled distance of the circle doesn't exceed the circle diameter (this is per update). If your circle is moving faster, you'll be better off with continuous collision detection.&#xD;&#xA;&#xD;&#xA;This approach should be really fast and easy to implement. For a more robust collision detection that can also handle arbitrary convex polygons, check out the [separation axis theorem][2] (as also stated by Josh Petrie).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/t4hs7.png&#xD;&#xA;  [2]: http://www.sevenson.com.au/actionscript/sat/" />
  <row Id="14658" PostHistoryTypeId="2" PostId="7314" RevisionGUID="c2b7d96d-b8d3-494b-8ae0-689896e9168b" CreationDate="2011-01-12T09:11:20.877" UserDisplayName="user4590" Text="I am facing the exact same kind of problematic, so I was happy to find that post, but things remain a little confusing to me.&#xD;&#xA;&#xD;&#xA;I do not understand how the conversion from M_View to P_View works.&#xD;&#xA;&#xD;&#xA;Here what I have&#xD;&#xA;- the absolute 6d position of the camera (x,y,z,wx,wy,wz) and its fields of view&#xD;&#xA;- the absolute 3d position of a point&#xD;&#xA;&#xD;&#xA;I would like : to know of the point is in the field of vision of the camera&#xD;&#xA;&#xD;&#xA;I understood how to answer this question once I have P_View, but I do not get how the conversion takes place ...&#xD;&#xA;&#xD;&#xA;Thanks a lot&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14659" PostHistoryTypeId="25" PostId="7308" RevisionGUID="8d3d207d-eb08-4308-9f0c-b3b8f67c67bc" CreationDate="2011-01-12T10:55:26.883" Comment="http://twitter.com/#!/StackGameDev/status/25143812863037442" />
  <row Id="14660" PostHistoryTypeId="2" PostId="7315" RevisionGUID="cf014787-8778-4598-b772-1ceb4229c775" CreationDate="2011-01-12T10:57:02.757" UserId="4403" Text="I'm not the very best at design, but I have looked for tutorials to design normal sprites for games (mobile devices), like background, ground and all that stuff in 2D. Are there any inspirations/tutorials for this?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="14661" PostHistoryTypeId="1" PostId="7315" RevisionGUID="cf014787-8778-4598-b772-1ceb4229c775" CreationDate="2011-01-12T10:57:02.757" UserId="4403" Text="Design sprites for games (iPhone game)" />
  <row Id="14662" PostHistoryTypeId="3" PostId="7315" RevisionGUID="cf014787-8778-4598-b772-1ceb4229c775" CreationDate="2011-01-12T10:57:02.757" UserId="4403" Text="&lt;game-design&gt;" />
  <row Id="14663" PostHistoryTypeId="2" PostId="7316" RevisionGUID="757aca72-0bc4-4af5-adfc-875dd77443fe" CreationDate="2011-01-12T11:10:05.187" UserId="4129" Text="(`SDL_GL_SwapBuffers()` in particular)&#xD;&#xA;&#xD;&#xA;When you have drawn a scene, and you call swap-buffers, it is routine to then `glClear()` the scene before drawing anything; if you ***don't*** clear, what is the contents of the buffer?  Is this defined by any specification, or does it vary by driver?" />
  <row Id="14664" PostHistoryTypeId="1" PostId="7316" RevisionGUID="757aca72-0bc4-4af5-adfc-875dd77443fe" CreationDate="2011-01-12T11:10:05.187" UserId="4129" Text="What is the contents of the buffer *after* a call to glSwapBuffers()?" />
  <row Id="14665" PostHistoryTypeId="3" PostId="7316" RevisionGUID="757aca72-0bc4-4af5-adfc-875dd77443fe" CreationDate="2011-01-12T11:10:05.187" UserId="4129" Text="&lt;opengl&gt;&lt;sdl&gt;&lt;double-buffering&gt;" />
  <row Id="14667" PostHistoryTypeId="2" PostId="7318" RevisionGUID="dcd24b04-160c-4862-a083-8f696a29e8e3" CreationDate="2011-01-12T12:12:43.613" UserId="2857" Text="From what i have read the only behaviour is UNDEFINED.  So i would assume there is no guarantee to what will be the contents of the buffer.  Not to mention that some libs actually wrap a clear call into the swap buffers call." />
  <row Id="14668" PostHistoryTypeId="2" PostId="7319" RevisionGUID="e0637992-d6a3-435b-bd11-ffab0fc2ed4e" CreationDate="2011-01-12T13:23:12.673" UserId="744" Text="The details of how to swap the front and back buffer vary from platform to platform, and so the answer is platform-dependent.&#xD;&#xA;&#xD;&#xA;According to &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glXSwapBuffers.xml&quot;&gt;the GLX glXSwapBuffers reference documentation&lt;/a&gt;:&#xD;&#xA;&gt; The contents of the back buffer become undefined after a swap. Note that this applies to pixel buffers as well as windows.&#xD;&#xA;&#xD;&#xA;But &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd369060%28v=vs.85%29.aspx&quot;&gt;Win32 SwapBuffers&lt;/a&gt; only says:&#xD;&#xA;&gt; If the current pixel format for the window referenced by this device context includes a back buffer, the function exchanges the front and back buffers... If the current pixel format for the window referenced by the device context does not include a back buffer, this call has no effect and the content of the back buffer is undefined when the function returns.&#xD;&#xA;&#xD;&#xA;And &lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGL_OpenGL/Reference/reference.html#//apple_ref/c/func/CGLFlushDrawable&quot;&gt;CGLFlushDrawable, for OS X Core Graphics&lt;/a&gt; says:&#xD;&#xA;&gt; If the backing store attribute is set to false, the buffers can be exchanged rather than copied. This is often the case in full-screen mode. If the receiver is not a double-buffered context, this call does nothing.&#xD;&#xA;&#xD;&#xA;Finally, &lt;a href=&quot;http://www.khronos.org/opengles/documentation/opengles1_0/html/eglSwapBuffers.html&quot;&gt;in OpenGL ES standard buffer-swapping function eglSwapBuffers&lt;/a&gt;:&#xD;&#xA;&gt; The color buffer of surface is left undefined after calling eglSwapBuffers.&#xD;&#xA;&#xD;&#xA;So what does all this mean?&#xD;&#xA;&#xD;&#xA; * To be truly cross-platform, you can't assume anything about the back buffer after a swap. Its content is undefined, and you should probably glClear or otherwise fix it up before using it.&#xD;&#xA; * If you are using OS X, you might get copied, and you might get an exchange. So you can assume that the contents of the backbuffer is not garbage, but you don't control whether it's the frame you just sent or the one before that.&#xD;&#xA; * If you are only targeting Win32 and are _sure_ you have a back buffer, you can presumably assume its contents are now what was in the front buffer. (Although this is an assumption from omission rather than explicitly stated; I would not be surprised if it doesn't work on many/any configurations.)&#xD;&#xA;&#xD;&#xA;Given the constraints of GLX and CGL, and a desire to minimize changes between OpenGL and OpenGL ES, you might as well just assume the contents are garbage." />
  <row Id="14669" PostHistoryTypeId="25" PostId="7316" RevisionGUID="737908c9-58f9-4fb9-9e6d-36d2dc84b45c" CreationDate="2011-01-12T13:55:26.940" Comment="http://twitter.com/#!/StackGameDev/status/25189111623061505" />
  <row Id="14670" PostHistoryTypeId="2" PostId="7320" RevisionGUID="4e1d3a07-28dc-49d6-bfbc-b02e0059138b" CreationDate="2011-01-12T13:59:29.553" UserId="4129" Text="It is general wisdom that you redraw the entire viewport on each frame.&#xD;&#xA;&#xD;&#xA;I would like to use partial updates; what are the various ways can do that, and what are their pros, cons and relative performance?&#xD;&#xA;&#xD;&#xA;(Using textures, FBOs, the accumulator buffer, any kind of scissors that can affect swapbuffers etc?)&#xD;&#xA;" />
  <row Id="14671" PostHistoryTypeId="1" PostId="7320" RevisionGUID="4e1d3a07-28dc-49d6-bfbc-b02e0059138b" CreationDate="2011-01-12T13:59:29.553" UserId="4129" Text="how to do partial updates in OpenGL?" />
  <row Id="14672" PostHistoryTypeId="3" PostId="7320" RevisionGUID="4e1d3a07-28dc-49d6-bfbc-b02e0059138b" CreationDate="2011-01-12T13:59:29.553" UserId="4129" Text="&lt;opengl&gt;&lt;performance&gt;&lt;double-buffering&gt;" />
  <row Id="14673" PostHistoryTypeId="2" PostId="7321" RevisionGUID="254c5681-de20-4364-b295-14a7b4677939" CreationDate="2011-01-12T14:12:06.420" UserId="744" Text="&lt;a href=&quot;http://www.opengl.org/registry/specs/MESA/copy_sub_buffer.txt&quot;&gt;There is a MESA extension to do this, glXCopySubBufferMESA.&lt;/a&gt; As buffer swaps are platform-dependent, any partial buffer copy is also going to be.&#xD;&#xA;&#xD;&#xA;Although, the obvious question is, what are you tackling where you think such a thing may help?" />
  <row Id="14676" PostHistoryTypeId="5" PostId="7248" RevisionGUID="4b22b6f5-ef80-43bd-b8f4-d82ec4a8c466" CreationDate="2011-01-12T14:58:36.733" UserId="3536" Comment="added 853 characters in body; added 31 characters in body" Text="I am not sure if it is possible to detect this, the browser will download the font when it see's the CSS. You could draw the text using a default font, then use something like [this][1] to detect if the font has loaded outside your canvas. If it is detected as having loaded, you could then refresh your canvas.&#xD;&#xA;&#xD;&#xA;Edit; &quot;What would the proper method of handling this be in the case that a user has disabled custom fonts&quot; - You would have to let the default parent font remain present&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;OK, So after digging into this further (and playing alot with [this][2]), it would appear it is not as simple to handle this as first thought. However, after searching for a solution as if this were my own problem, I have located the following which is what I recommend using to detect if the font has loaded. If the font hasn't loaded, just set it to use a standard local font.&#xD;&#xA;&#xD;&#xA;[detect HTML5 and CSS3 features][3] (search for tests['fontface'])&#xD;&#xA;&#xD;&#xA;Also take a look at these:&#xD;&#xA;[http://paulirish.com/2009/font-face-feature-detection/][4]&#xD;&#xA;[http://news.ycombinator.com/item?id=1347011][5]&#xD;&#xA;&#xD;&#xA;I hope you find this more useful.&#xD;&#xA;&#xD;&#xA;Regards,Chris&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ajaxian.com/archives/javascriptcss-font-detector&#xD;&#xA;  [2]: http://jsfiddle.net/zMKge/&#xD;&#xA;  [3]: https://github.com/Modernizr/Modernizr/blob/master/modernizr.js&#xD;&#xA;  [4]: http://paulirish.com/2009/font-face-feature-detection/&#xD;&#xA;  [5]: http://news.ycombinator.com/item?id=1347011" />
  <row Id="14677" PostHistoryTypeId="5" PostId="7248" RevisionGUID="4a524b9c-f053-4462-9aef-0db80af39612" CreationDate="2011-01-12T15:05:00.240" UserId="3536" Comment="added 324 characters in body" Text="I am not sure if it is possible to detect this, the browser will download the font when it see's the CSS. You could draw the text using a default font, then use something like [this][1] to detect if the font has loaded outside your canvas. If it is detected as having loaded, you could then refresh your canvas.&#xD;&#xA;&#xD;&#xA;Edit; &quot;What would the proper method of handling this be in the case that a user has disabled custom fonts&quot; - You would have to let the default parent font remain present&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;OK, So after digging into this further (and playing alot with [this][2]), it would appear it is not as simple to handle this as first thought. However, after searching for a solution as if this were my own problem, I have located the following which is what I recommend using to detect if the browser supports font face. If the browser doesn't support font face, just set it to use a standard local font, otherwise the user would have to wait for the font to load, unfortunately any delay you may be experiencing is most likely down to file size and really isn't is something I can help you with, other than by advising you load the font at the start of your page, and assign it at the end of the page.&#xD;&#xA;&#xD;&#xA;[detect HTML5 and CSS3 features][3] (search for tests['fontface'])&#xD;&#xA;&#xD;&#xA;Also take a look at these:&#xD;&#xA;[http://paulirish.com/2009/font-face-feature-detection/][4]&#xD;&#xA;[http://news.ycombinator.com/item?id=1347011][5]&#xD;&#xA;&#xD;&#xA;I hope you find this more useful.&#xD;&#xA;&#xD;&#xA;Regards,Chris&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ajaxian.com/archives/javascriptcss-font-detector&#xD;&#xA;  [2]: http://jsfiddle.net/zMKge/&#xD;&#xA;  [3]: https://github.com/Modernizr/Modernizr/blob/master/modernizr.js&#xD;&#xA;  [4]: http://paulirish.com/2009/font-face-feature-detection/&#xD;&#xA;  [5]: http://news.ycombinator.com/item?id=1347011" />
  <row Id="14678" PostHistoryTypeId="2" PostId="7322" RevisionGUID="ad95d293-aedf-4c7e-b5d4-6fc8e7c8d119" CreationDate="2011-01-12T15:27:00.070" UserId="3503" Text="I am not an artist but I read this tutorials and watched some method used there&#xD;&#xA;&#xD;&#xA;[Pixel art tutorials list - must be viewed][1]&#xD;&#xA;&#xD;&#xA;[Methods used creating art][2]&#xD;&#xA;&#xD;&#xA;[One more site][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://garmahis.com/tutorials/pixel-art-tutorials/&#xD;&#xA;  [2]: http://www.natomic.com/hosted/marks/mpat/&#xD;&#xA;  [3]: http://www.pixeljoint.com/pixels/tutorials.asp" />
  <row Id="14682" PostHistoryTypeId="25" PostId="7320" RevisionGUID="9136a39c-c120-4e55-875f-b91ba5a0c977" CreationDate="2011-01-12T16:55:27.043" Comment="http://twitter.com/#!/StackGameDev/status/25234410827677696" />
  <row Id="14683" PostHistoryTypeId="2" PostId="7324" RevisionGUID="b5dcf6c9-885c-40a6-96fe-6f977d7a73c8" CreationDate="2011-01-12T17:19:52.547" UserId="1021" Text="**Is there a special order in which vertices are entered into a vertex array?**  Currently I'm drawing single textures like this:&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, texName);&#xD;&#xA;    glVertexPointer(2, GL_FLOAT, 0, vertices);&#xD;&#xA;    glTexCoordPointer(2, GL_FLOAT, 0, coordinates);&#xD;&#xA;    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;&#xD;&#xA;where vertices has four &quot;xy pairs&quot;.  This is working fine.  &#xD;&#xA;&#xD;&#xA;As a test I doubled the sizes of the vertices and coordinates arrays and changed the last line above to:&#xD;&#xA;&#xD;&#xA;    glDrawArrays(GL_TRIANGLE_STRIP, 0, 8);&#xD;&#xA;&#xD;&#xA;since vertices now contains eight &quot;xy pairs&quot;.  I do see two textures (the second is intentionally offset from the first).  **However the textures are now distorted**.  I've tried passing GL_TRIANGLES to glDrawArrays instead of GL_TRIANGLE_STRIP but this doesn't work either.  I'm so new to OpenGL that I thought it's best to just ask here :-)&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="14684" PostHistoryTypeId="1" PostId="7324" RevisionGUID="b5dcf6c9-885c-40a6-96fe-6f977d7a73c8" CreationDate="2011-01-12T17:19:52.547" UserId="1021" Text="Beginner question about vertex arrays in OpenGL" />
  <row Id="14685" PostHistoryTypeId="3" PostId="7324" RevisionGUID="b5dcf6c9-885c-40a6-96fe-6f977d7a73c8" CreationDate="2011-01-12T17:19:52.547" UserId="1021" Text="&lt;opengl&gt;&lt;iphone&gt;&lt;vertex-arrays&gt;" />
  <row Id="14686" PostHistoryTypeId="2" PostId="7325" RevisionGUID="9ea84282-0e5e-44fd-be39-306f990762b0" CreationDate="2011-01-12T17:20:06.043" UserId="1058" Text="I'm developing a 2D sprite-based game, and I'm finding that I'm having trouble with making the sprites rotate correctly. In a nutshell, I've got spritesheets for each of 5 directions (the other 3 come from just flipping the sprite horizontally), and I need to clamp the velocity/rotation of the sprite to one of those directions. My sprite class has a pre-computed list of radians corresponding to the cardinal directions like this:&#xD;&#xA;&#xD;&#xA;    protected readonly List&lt;float&gt; CardinalDirections = new List&lt;float&gt;&#xD;&#xA;                               {&#xD;&#xA;                                   MathHelper.PiOver4,&#xD;&#xA;                                   MathHelper.PiOver2,&#xD;&#xA;                                   MathHelper.PiOver2 + MathHelper.PiOver4,&#xD;&#xA;                                   MathHelper.Pi, &#xD;&#xA;                                   -MathHelper.PiOver4,&#xD;&#xA;                                   -MathHelper.PiOver2,&#xD;&#xA;                                   -MathHelper.PiOver2 + -MathHelper.PiOver4,&#xD;&#xA;                                   -MathHelper.Pi,&#xD;&#xA;                               };&#xD;&#xA;&#xD;&#xA;Here's the positional update code:&#xD;&#xA;&#xD;&#xA;    if (velocity == Vector2.Zero)&#xD;&#xA;                return;&#xD;&#xA;&#xD;&#xA;            var rot = ((float)Math.Atan2(velocity.Y, velocity.X));&#xD;&#xA;            TurretRotation = SnapPositionToGrid(rot);&#xD;&#xA;&#xD;&#xA;            var snappedX = (float)Math.Cos(TurretRotation);&#xD;&#xA;            var snappedY = (float)Math.Sin(TurretRotation);&#xD;&#xA;            var rotVector = new Vector2(snappedX, snappedY);&#xD;&#xA;&#xD;&#xA;            velocity *= rotVector;&#xD;&#xA;            //...snip&#xD;&#xA;&#xD;&#xA;    private float SnapPositionToGrid(float rotationToSnap)&#xD;&#xA;        {&#xD;&#xA;            if (rotationToSnap == 0)&#xD;&#xA;                return 0.0f;&#xD;&#xA;&#xD;&#xA;            var targetRotation = CardinalDirections.First(x =&gt; &#xD;&#xA;                    (x - rotationToSnap &gt;= -0.01 &amp;&amp; x - rotationToSnap &lt;= 0.01));&#xD;&#xA;            return (float)Math.Round(targetRotation, 3);&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong here? I know that the SnapPositionToGrid method is far from what it needs to be - the .First(..) call is on purpose so that it throws on no match, but I have no idea how I would go about accomplishing this, and unfortunately, Google hasn't helped too much either. Am I thinking about this the wrong way, or is the answer staring at me in the face?" />
  <row Id="14687" PostHistoryTypeId="1" PostId="7325" RevisionGUID="9ea84282-0e5e-44fd-be39-306f990762b0" CreationDate="2011-01-12T17:20:06.043" UserId="1058" Text="snapping an angle to the closest cardinal direction" />
  <row Id="14688" PostHistoryTypeId="3" PostId="7325" RevisionGUID="9ea84282-0e5e-44fd-be39-306f990762b0" CreationDate="2011-01-12T17:20:06.043" UserId="1058" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;&lt;math&gt;&lt;sprites&gt;" />
  <row Id="14689" PostHistoryTypeId="2" PostId="7326" RevisionGUID="3c09fedc-662e-47b8-9e79-430e2da60037" CreationDate="2011-01-12T17:20:14.357" UserId="4568" Text="Agree with [notabene's][1] answer, material needs to be specified.&#xD;&#xA;&#xD;&#xA;But for correct lighting (diffuse and specular) you will also need to specify a normals for each vertex. Although the default normal may create (incorrect) specular reflections.&#xD;&#xA;&#xD;&#xA;    glNormal3f(x,y,z);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/3794/notabene" />
  <row Id="14690" PostHistoryTypeId="2" PostId="7327" RevisionGUID="04170eab-acef-4722-9c88-b15ed2bec6f5" CreationDate="2011-01-12T17:28:00.560" UserId="2081" Text="OpenGL picking using the selection buffer is deprecated. If your scene is small enough, you should use [colour-based picking](http://www.lighthouse3d.com/opengl/picking/index.php3?color1); otherwise, you can use [gluUnProject](http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml) to obtain a world coordinate from a mouse coordinate and a depth read from the depth buffer using `glReadPixels()`." />
  <row Id="14691" PostHistoryTypeId="6" PostId="7315" RevisionGUID="5f83de05-b6f4-4972-b351-5f06d1da7af6" CreationDate="2011-01-12T17:54:13.140" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;sprites&gt;&lt;art&gt;" />
  <row Id="14692" PostHistoryTypeId="2" PostId="7328" RevisionGUID="140836c1-12b6-43f9-bf88-61c0436ab50b" CreationDate="2011-01-12T17:56:17.210" UserId="1156" Text="[This question][1] has a vast amount of resources. In fact, yours is a duplicate question.&#xD;&#xA;&#xD;&#xA;[Hasgraphics.][2]&#xD;&#xA;&#xD;&#xA;[Spriters-Resource][3] is a nice place, but you cannot use them commercially. (Ripped from video games)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA;  [2]: http://hasgraphics.com/free-sprites/&#xD;&#xA;  [3]: http://www.spriters-resource.com/" />
  <row Id="14693" PostHistoryTypeId="6" PostId="4436" RevisionGUID="0f5b68f6-2326-4a54-8eef-95df036d33c9" CreationDate="2011-01-12T17:59:56.803" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;camera&gt;" />
  <row Id="14694" PostHistoryTypeId="2" PostId="7329" RevisionGUID="1e3c99d1-2fcb-4572-af60-e9d3aab3f644" CreationDate="2011-01-12T18:02:38.660" UserId="4410" Text="You've got the two quads joined by the tri-strip. You could either do two separate glDrawArrays with the first being (0,4) and the 2nd being (4,4) to split the two quads up, or as you say, do triangles instead.&#xD;&#xA;&#xD;&#xA;If you switch to triangles then you'll need to either duplicate up vertices, or if you use indices to index, you'll need to specify the 3 corners of each triangle.&#xD;&#xA;&#xD;&#xA;Tri-strips work by taking the first 2 vertices specified then draw a triangle to the 3rd. Subsequently every extra vertex results in another triangle where it makes a triangle using the last 2 vertices and the new vertex. Some platforms support providing an index value allowing you to &quot;reset&quot; the tri-strip and effectively allowing you to split a sequence into multiple tri-strips with a single call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14695" PostHistoryTypeId="2" PostId="7330" RevisionGUID="52cc60df-2a34-4ec8-98c3-8af524e17773" CreationDate="2011-01-12T18:17:44.203" UserId="953" Text="I'd do this mathematically, assuming I understand your question.  You want your rotation to be an integer multiple of PiOver4, right?  So divide by your direction increment, round to the nearest integer, and multiply by the increment again.  An unoptimized version would be:&#xD;&#xA;&#xD;&#xA;    return PiOver4 * (float) Math.Round(rotationToSnap / PiOver4);&#xD;&#xA;&#xD;&#xA;I'm not too familiar with optimization in XNA; if modulos and comparisons are cheaper than multiplications and divisions (as I suspect), it'll be faster to do something like:&#xD;&#xA;&#xD;&#xA;    var modRot = rotationToSnap % PiOver4;&#xD;&#xA;    if(modRot &lt; PiOver8) return rotationToSnap - modRot;&#xD;&#xA;    else return rotationToSnap + PiOver4 - modRot;&#xD;&#xA;&#xD;&#xA;I haven't tested that code or anything, but it or a similar approach should work." />
  <row Id="14696" PostHistoryTypeId="2" PostId="7331" RevisionGUID="c730022b-f3f6-4fec-9ea4-0a025879fadc" CreationDate="2011-01-12T18:18:31.710" UserId="2862" Text="I have a rectangle in 3d space `(p1, p2, p3, p4)` and when the mouse roll's over it I need to calculate the exact Z of the point on the rect, given the mouse coordinates `(x, y)`.&#xD;&#xA;&#xD;&#xA;Would a Ray-Triangle intersection find the Z of the intersecting point?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="14697" PostHistoryTypeId="1" PostId="7331" RevisionGUID="c730022b-f3f6-4fec-9ea4-0a025879fadc" CreationDate="2011-01-12T18:18:31.710" UserId="2862" Text="Ray-Triangle intersection to find the Z of the intersecting point" />
  <row Id="14698" PostHistoryTypeId="3" PostId="7331" RevisionGUID="c730022b-f3f6-4fec-9ea4-0a025879fadc" CreationDate="2011-01-12T18:18:31.710" UserId="2862" Text="&lt;3d&gt;&lt;coordinates&gt;&lt;ray-casting&gt;&lt;rectangles&gt;&lt;triangles&gt;" />
  <row Id="14699" PostHistoryTypeId="4" PostId="7331" RevisionGUID="1952c840-5869-4ad3-99aa-3a629e8a9f7a" CreationDate="2011-01-12T18:28:14.607" UserId="2862" Comment="edited title; deleted 3 characters in body" Text="Ray-plane intersection to find the Z of the intersecting point" />
  <row Id="14700" PostHistoryTypeId="5" PostId="7331" RevisionGUID="1952c840-5869-4ad3-99aa-3a629e8a9f7a" CreationDate="2011-01-12T18:28:14.607" UserId="2862" Comment="edited title; deleted 3 characters in body" Text="I have a rectangle in 3d space `(p1, p2, p3, p4)` and when the mouse roll's over it I need to calculate the exact Z of the point on the rect, given the mouse coordinates `(x, y)`.&#xD;&#xA;&#xD;&#xA;Would a Ray-plane intersection find the Z of the intersecting point?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="14701" PostHistoryTypeId="5" PostId="7331" RevisionGUID="711e918e-27d3-4a7c-b8bc-c577e6cb668b" CreationDate="2011-01-12T18:32:35.183" UserId="1156" Comment="deleted 11 characters in body" Text="I have a rectangle in 3d space `(p1, p2, p3, p4)` and when the mouse rolls over it I need to calculate the exact Z of the point on the rect, given the mouse coordinates `(x, y)`.&#xD;&#xA;&#xD;&#xA;Would a Ray-plane intersection find the Z of the intersecting point?" />
  <row Id="14702" PostHistoryTypeId="2" PostId="7332" RevisionGUID="551d1d24-ed0e-42f4-b210-dc0164457962" CreationDate="2011-01-12T18:33:57.700" UserId="3794" Text="If you dont mind using your rect as two triangles, here is the code from my raytracer:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //RAY-TRAINGLE test&#xD;&#xA;    Vec3f e1 = p2 - p1;&#xD;&#xA;    Vec3f e2 = p3 - p1;&#xD;&#xA;    Vec3f s1 = cross(aRay.dir, e2);&#xD;&#xA;    &#xD;&#xA;    float divisor = dot(s1, e1);&#xD;&#xA;    if (divisor == 0.)&#xD;&#xA;     return false; //not hit&#xD;&#xA;    &#xD;&#xA;    float invDivisor = 1.f / divisor;&#xD;&#xA;    &#xD;&#xA;    // Compute first barycentric coordinate&#xD;&#xA;    Vec3f d = aRay.org - p1;&#xD;&#xA;    &#xD;&#xA;    float b1 = dot(d, s1) * invDivisor;&#xD;&#xA;    if (b1 &lt; 0. || b1 &gt; 1.)&#xD;&#xA;     return false; // not hit&#xD;&#xA;    &#xD;&#xA;    // Compute second barycentric coordinate&#xD;&#xA;    Vec3f s2 = cross(d, e1);&#xD;&#xA;    float b2 = dot(aRay.dir, s2) * invDivisor;&#xD;&#xA;    if (b2 &lt; 0. || b1 + b2 &gt; 1.)&#xD;&#xA;     return false;&#xD;&#xA;    &#xD;&#xA;    // Compute _t_ to intersection distance&#xD;&#xA;    float t = dot(e2, s2) * invDivisor; /// &lt;&lt; HERE you go.&#xD;&#xA;    Vec3f intersection = aRay.org + t*aRay.dir;" />
  <row Id="14703" PostHistoryTypeId="12" PostId="7332" RevisionGUID="e8e028c1-1994-47d9-9da8-6814c9a72ce4" CreationDate="2011-01-12T18:35:24.827" UserId="3794" Text="[{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;notabene&quot;}]" />
  <row Id="14704" PostHistoryTypeId="2" PostId="7333" RevisionGUID="1974aa40-3ceb-4cf3-8765-3fffbc69adda" CreationDate="2011-01-12T18:37:39.253" UserId="2164" Text="I just noticed [this article][1] today on creating good game trailers, and thought it would be useful to link it as an answer to this question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pocketcyclone.com/2011/01/11/game-video-tips-tricks/" />
  <row Id="14705" PostHistoryTypeId="13" PostId="7332" RevisionGUID="5f06d8e5-a1f0-4dbe-8ee5-f5568b85252a" CreationDate="2011-01-12T18:39:02.980" UserId="3794" Text="[{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;notabene&quot;}]" />
  <row Id="14706" PostHistoryTypeId="5" PostId="7332" RevisionGUID="0238d879-1321-41fe-92c2-564e18ee57c8" CreationDate="2011-01-12T18:43:36.157" UserId="3794" Comment="added link to picture" Text="If you dont mind using your rect as two triangles, here is the code from my ([working][1]) raytracer:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //RAY-TRAINGLE test&#xD;&#xA;    Vec3f e1 = p2 - p1;&#xD;&#xA;    Vec3f e2 = p3 - p1;&#xD;&#xA;    Vec3f s1 = cross(aRay.dir, e2);&#xD;&#xA;    &#xD;&#xA;    float divisor = dot(s1, e1);&#xD;&#xA;    if (divisor == 0.)&#xD;&#xA;     return false; //not hit&#xD;&#xA;    &#xD;&#xA;    float invDivisor = 1.f / divisor;&#xD;&#xA;    &#xD;&#xA;    // Compute first barycentric coordinate&#xD;&#xA;    Vec3f d = aRay.org - p1;&#xD;&#xA;    &#xD;&#xA;    float b1 = dot(d, s1) * invDivisor;&#xD;&#xA;    if (b1 &lt; 0. || b1 &gt; 1.)&#xD;&#xA;     return false; // not hit&#xD;&#xA;    &#xD;&#xA;    // Compute second barycentric coordinate&#xD;&#xA;    Vec3f s2 = cross(d, e1);&#xD;&#xA;    float b2 = dot(aRay.dir, s2) * invDivisor;&#xD;&#xA;    if (b2 &lt; 0. || b1 + b2 &gt; 1.)&#xD;&#xA;     return false;&#xD;&#xA;    &#xD;&#xA;    // Compute _t_ to intersection distance&#xD;&#xA;    float t = dot(e2, s2) * invDivisor; /// &lt;&lt; HERE you go.&#xD;&#xA;    Vec3f intersection = aRay.org + t*aRay.dir;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/5034466/output1.jpg" />
  <row Id="14707" PostHistoryTypeId="2" PostId="7334" RevisionGUID="4c9ca339-6ca9-4a6f-bef5-26ed7764512b" CreationDate="2011-01-12T18:43:49.487" UserId="4599" Text="Using OpenGL it is possible to load textures, buffer arrays, compiled shaders and more to the video memory. When a C++ program exits, heap memory that was allocated by it is cleaned. What happens to the stuff allocated on the video memory? Will memory leak beyond program's scope?" />
  <row Id="14708" PostHistoryTypeId="1" PostId="7334" RevisionGUID="4c9ca339-6ca9-4a6f-bef5-26ed7764512b" CreationDate="2011-01-12T18:43:49.487" UserId="4599" Text="What happens to alocated video memory when program dies?" />
  <row Id="14709" PostHistoryTypeId="3" PostId="7334" RevisionGUID="4c9ca339-6ca9-4a6f-bef5-26ed7764512b" CreationDate="2011-01-12T18:43:49.487" UserId="4599" Text="&lt;3d&gt;&lt;c++&gt;&lt;opengl&gt;&lt;programming&gt;" />
  <row Id="14710" PostHistoryTypeId="4" PostId="7334" RevisionGUID="16e80419-83e2-4a70-99d2-8dad0e4a95fa" CreationDate="2011-01-12T18:51:27.593" UserId="1156" Comment="edited title" Text="What happens to allocated video memory when the program terminates?" />
  <row Id="14711" PostHistoryTypeId="5" PostId="7328" RevisionGUID="22f9ac96-d59f-4afc-b7aa-a490d12e8770" CreationDate="2011-01-12T18:52:00.650" UserId="1156" Comment="deleted 39 characters in body" Text="[This question][1] has a vast amount of resources. &#xD;&#xA;&#xD;&#xA;[Hasgraphics.][2]&#xD;&#xA;&#xD;&#xA;[Spriters-Resource][3] is a nice place, but you cannot use them commercially. (Ripped from video games)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA;  [2]: http://hasgraphics.com/free-sprites/&#xD;&#xA;  [3]: http://www.spriters-resource.com/" />
  <row Id="14712" PostHistoryTypeId="2" PostId="7335" RevisionGUID="fc8445de-c431-4c31-b866-575e67257916" CreationDate="2011-01-12T18:55:51.697" UserId="744" Text="No. If the driver is written correctly, everything should be cleaned up just fine.&#xD;&#xA;&#xD;&#xA;At least that's the theory. Drivers are rarely written 100% correctly; you may find on particular models of video cards, on particular OSs, you need to do some manual cleanup." />
  <row Id="14713" PostHistoryTypeId="2" PostId="7336" RevisionGUID="707482da-14a1-4aa9-a16b-55d7ec3aebcf" CreationDate="2011-01-12T18:59:39.713" UserId="2414" Text="Your question was answered on SO:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/2215088/opengl-gpu-memory-cleanup-required][1]&#xD;&#xA;&#xD;&#xA;Basically the answer is when your program exits, the memory should be cleared, so you will not have leaks.&#xD;&#xA;&#xD;&#xA;You can test this by opening/closing multiple instances of your program without freeing the resources and verifying that your video memory usage stays the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/2215088/opengl-gpu-memory-cleanup-required&#xD;&#xA;&#xD;&#xA;However, as also mentioned in the link, you should of course get into the habit of freeing resources when they are no longer needed." />
  <row Id="14714" PostHistoryTypeId="5" PostId="7331" RevisionGUID="f88c0e00-908b-4b24-8604-e931a23c4903" CreationDate="2011-01-12T19:25:49.807" UserId="2862" Comment="added 298 characters in body; added 10 characters in body" Text="I have a rectangle in 3d space `(p1, p2, p3, p4)` and when the mouse rolls over it I need to calculate the exact Z of the point on the rect, given the mouse coordinates `(x, y)`.&#xD;&#xA;&#xD;&#xA;Would a Ray-plane intersection find the Z of the intersecting point?&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;**Edit:** Would this one-liner work? .. it returns the `t` value for the intersection, apparently the Z value.&#xD;&#xA;&#xD;&#xA;     float rayPlane(vector3D planepoint, vector3D normal, vector3D origin, vector3D direction){&#xD;&#xA;&#xD;&#xA;         return -((origin-planepoint).dot(normal))/(direction.dot(normal));&#xD;&#xA;     }" />
  <row Id="14715" PostHistoryTypeId="25" PostId="7331" RevisionGUID="a3a40489-fda8-4c06-b3ed-506e2f3d3c9f" CreationDate="2011-01-12T19:55:27.620" Comment="http://twitter.com/#!/StackGameDev/status/25279711399645184" />
  <row Id="14716" PostHistoryTypeId="2" PostId="7337" RevisionGUID="ec236e6b-fec8-4863-a790-fbdc854c08be" CreationDate="2011-01-12T20:11:32.640" UserId="4603" Text="I study Computer Science at Technical University of Lodz (in Poland) with Computer Game and Simulation Technology specialization. I'm going to defend BSc thesis next year and I was wondering what topic I could choose but nothing **really interesting** is coming to my mind.&#xD;&#xA;&#xD;&#xA;Maybe You could help me and suggest some subjects related to programming graphics, games or simulations? (or maybe something else that is interesting enough :) ). I would be very grateful for any suggestion!" />
  <row Id="14717" PostHistoryTypeId="1" PostId="7337" RevisionGUID="ec236e6b-fec8-4863-a790-fbdc854c08be" CreationDate="2011-01-12T20:11:32.640" UserId="4603" Text="Any interesting thesis topic?" />
  <row Id="14718" PostHistoryTypeId="3" PostId="7337" RevisionGUID="ec236e6b-fec8-4863-a790-fbdc854c08be" CreationDate="2011-01-12T20:11:32.640" UserId="4603" Text="&lt;graphics&gt;&lt;education&gt;&lt;computer-science&gt;" />
  <row Id="14719" PostHistoryTypeId="2" PostId="7338" RevisionGUID="929dfec6-1faa-45f2-bdc7-01a5ce3d1ae2" CreationDate="2011-01-12T20:14:07.210" UserId="1908" Text="I'm aware there is immense slowing whenever data synchronization is required (let alone any mutex locks).&#xD;&#xA;&#xD;&#xA;I was thinking getting it to the extreme and doing threads for any subsystem conceivable. But I was worried that may even slow it. e.g. would it be sane to separate input thread from rendering or game logic thread? Would the data synchronization required make it pointless or even slower?" />
  <row Id="14720" PostHistoryTypeId="1" PostId="7338" RevisionGUID="929dfec6-1faa-45f2-bdc7-01a5ce3d1ae2" CreationDate="2011-01-12T20:14:07.210" UserId="1908" Text="Multi-threaded games best practices. One thread for 'logic', one for rendering, or more?" />
  <row Id="14721" PostHistoryTypeId="3" PostId="7338" RevisionGUID="929dfec6-1faa-45f2-bdc7-01a5ce3d1ae2" CreationDate="2011-01-12T20:14:07.210" UserId="1908" Text="&lt;multithreading&gt;" />
  <row Id="14722" PostHistoryTypeId="16" PostId="7337" RevisionGUID="e4b8ddf8-2d36-42f1-8a68-dc222cbd9494" CreationDate="2011-01-12T20:23:38.553" UserId="14" />
  <row Id="14723" PostHistoryTypeId="2" PostId="7339" RevisionGUID="1cd1e0fd-77f4-4938-bca1-3990c354799a" CreationDate="2011-01-12T20:26:29.000" UserId="119" Text="Great answer for Josh, but I'll add a few suggestions:&#xD;&#xA; - For more info on sliding against walls, check out [my question][1] - from this answer I managed to get it working really nicely.&#xD;&#xA; - If I'm not mistaken, when walking up the screen Link will ease to align to the closest whole horizontal grid square. This way when you get to the doors you're more likely to be properly lined up (might be wrong).&#xD;&#xA; - To make it easy to get through doors, make sure the collision box of your character is way smaller than the width of the door.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4059/how-to-make-the-player-slide-smoothly-against-terrain" />
  <row Id="14724" PostHistoryTypeId="2" PostId="7340" RevisionGUID="8c241539-82c4-4d23-9c1f-4b4c78f4fdf0" CreationDate="2011-01-12T20:35:36.307" UserDisplayName="Juul" Text="I do not have experience with Ogre3D specifically but maybe you can make a texture with multiple images inside and replace the UV's matching the image you want?" />
  <row Id="14725" PostHistoryTypeId="2" PostId="7341" RevisionGUID="1f1771e9-0c7b-455f-b1bb-9a2b8d2d66f5" CreationDate="2011-01-12T20:44:16.763" UserId="3794" Text="Few topics come to my mind&#xD;&#xA;&#xD;&#xA; - Fluids simulation: Navier-strokes equations. And gpgpu acceleration ([video][1])&#xD;&#xA; - Fluids rendering - volumetric raycasting ([video][2]) &#xD;&#xA; - Volumetric rendering - marching cubes ([video][3])&#xD;&#xA; - Realtime bokeh rendering ([paper][4])&#xD;&#xA; - Point based rendering ([video][5])&#xD;&#xA; - Realtime rain rendering ([paper][6])&#xD;&#xA; - Simple raytracer with global ilumination - propably without accelaration structs. &#xD;&#xA; &#xD;&#xA;And the best is contact some computer games/graphics/movie company and offer them to create something they need for free. That have only pluses. You will have hard and interesting thesis ( and prototype ) and some experienced advisor from company who will help you. Don't be afraid to do it. Enthusiasm helps very much in this case. (I know it)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=igXZs2oJQcA&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=ZVRQUD20q6g&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=dk3SvwOEBe8&#xD;&#xA;  [4]: http://dxp.korea.ac.kr/homewiki/images/f/f5/PG-PointDof-submit.pdf&#xD;&#xA;  [5]: http://www.youtube.com/watch?v=CSwQUkx4tyk&#xD;&#xA;  [6]: ftp://ftp.research.microsoft.com/pub/tr/TR-2006-102.pdf" />
  <row Id="14727" PostHistoryTypeId="5" PostId="7325" RevisionGUID="f451abd1-6e63-4277-98fd-12a52fbf9244" CreationDate="2011-01-12T20:54:45.207" UserId="1058" Comment="added 578 characters in body" Text="I'm developing a 2D sprite-based game, and I'm finding that I'm having trouble with making the sprites rotate correctly. In a nutshell, I've got spritesheets for each of 5 directions (the other 3 come from just flipping the sprite horizontally), and I need to clamp the velocity/rotation of the sprite to one of those directions. My sprite class has a pre-computed list of radians corresponding to the cardinal directions like this:&#xD;&#xA;&#xD;&#xA;    protected readonly List&lt;float&gt; CardinalDirections = new List&lt;float&gt;&#xD;&#xA;                               {&#xD;&#xA;                                   MathHelper.PiOver4,&#xD;&#xA;                                   MathHelper.PiOver2,&#xD;&#xA;                                   MathHelper.PiOver2 + MathHelper.PiOver4,&#xD;&#xA;                                   MathHelper.Pi, &#xD;&#xA;                                   -MathHelper.PiOver4,&#xD;&#xA;                                   -MathHelper.PiOver2,&#xD;&#xA;                                   -MathHelper.PiOver2 + -MathHelper.PiOver4,&#xD;&#xA;                                   -MathHelper.Pi,&#xD;&#xA;                               };&#xD;&#xA;&#xD;&#xA;Here's the positional update code:&#xD;&#xA;&#xD;&#xA;    if (velocity == Vector2.Zero)&#xD;&#xA;                return;&#xD;&#xA;&#xD;&#xA;            var rot = ((float)Math.Atan2(velocity.Y, velocity.X));&#xD;&#xA;            TurretRotation = SnapPositionToGrid(rot);&#xD;&#xA;&#xD;&#xA;            var snappedX = (float)Math.Cos(TurretRotation);&#xD;&#xA;            var snappedY = (float)Math.Sin(TurretRotation);&#xD;&#xA;            var rotVector = new Vector2(snappedX, snappedY);&#xD;&#xA;&#xD;&#xA;            velocity *= rotVector;&#xD;&#xA;            //...snip&#xD;&#xA;&#xD;&#xA;    private float SnapPositionToGrid(float rotationToSnap)&#xD;&#xA;        {&#xD;&#xA;            if (rotationToSnap == 0)&#xD;&#xA;                return 0.0f;&#xD;&#xA;&#xD;&#xA;            var targetRotation = CardinalDirections.First(x =&gt; &#xD;&#xA;                    (x - rotationToSnap &gt;= -0.01 &amp;&amp; x - rotationToSnap &lt;= 0.01));&#xD;&#xA;            return (float)Math.Round(targetRotation, 3);&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong here? I know that the SnapPositionToGrid method is far from what it needs to be - the .First(..) call is on purpose so that it throws on no match, but I have no idea how I would go about accomplishing this, and unfortunately, Google hasn't helped too much either. Am I thinking about this the wrong way, or is the answer staring at me in the face?&#xD;&#xA;&#xD;&#xA;EDIT: Thanks Gregory for the answer. Only thing I really had to modify from the answer  was to re-construct the velocity vector to the new snapped rotation (I'm sure there are further optimizations that I can do, but for now it's enough that it works!):&#xD;&#xA;&#xD;&#xA;            var snappedX = (float)Math.Round(Math.Cos(TurretRotation), 3) * &#xD;&#xA;                               velocity.Length();&#xD;&#xA;            var snappedY = (float)Math.Round(Math.Sin(TurretRotation), 3) *&#xD;&#xA;                               velocity.Length();&#xD;&#xA;            var rotVector = new Vector2(snappedX, snappedY);" />
  <row Id="14728" PostHistoryTypeId="2" PostId="7343" RevisionGUID="9533b9c4-e586-418c-8527-90b6d5f15aa3" CreationDate="2011-01-12T21:29:54.320" UserId="4604" Text="That question has no best answer, as it depends upon what you are trying to accomplish.&#xD;&#xA;&#xD;&#xA;The xbox has three cores and can handle a few threads before context switching overhead becomes a problem.  The pc can deal with quite a few more.&#xD;&#xA;&#xD;&#xA;A lot of games have typically been single threaded for ease of programming.  This is fine for most personal games.  The only thing you would likely have to have another thread for is Networking and Audio.&#xD;&#xA;&#xD;&#xA;Unreal has a game thread, render thread, network thread, and audio thread (if I remember correctly).  This is pretty standard for a lot of current-gen engines, though being able to support a seperate rendering thread can be a pain and involves a lot of groundwork.&#xD;&#xA;&#xD;&#xA;The idTech5 engine being developed for Rage actually uses any number of threads, and it does so by breaking down game tasks into 'jobs' that are processed with a tasking system.  Their explicit goal is to have their game engine scale nicely when the number of cores on the average gaming system jumps.&#xD;&#xA;&#xD;&#xA;The technology I use (and have written) has a seperate thread for Networking, Input, Audio, Rendering, and Scheduling.  It then has any number of threads which can be used to perform game tasks, and this is managed by the scheduling thread.  A **lot** of work went into getting all the threads to play nicely with each other, but it seems to be working well and getting very good use out multicore systems, so perhaps it is mission accomplished (for now; I might break down audio/networking/input work into just 'tasks' that the worker threads can update).&#xD;&#xA;&#xD;&#xA;It really depends upon your final goal." />
  <row Id="14729" PostHistoryTypeId="2" PostId="7344" RevisionGUID="ae75bb1a-bb68-42e5-921a-e4dff177c0a6" CreationDate="2011-01-12T22:48:16.647" UserId="4082" Text="I did pathfinding on arbitrary 3D environments. Admittedly not totally interesting nor innovative, but it was the closest thing to a game-related thesis I managed to negotiate :S&#xD;&#xA;&#xD;&#xA;It was a few years ago, though. Now they're talking about having game development as an elective. How times change :(" />
  <row Id="14730" PostHistoryTypeId="25" PostId="7338" RevisionGUID="0de785ec-d933-4ebb-855b-9d3f3f6408de" CreationDate="2011-01-12T22:55:27.973" Comment="http://twitter.com/#!/StackGameDev/status/25325011883524096" />
  <row Id="14732" PostHistoryTypeId="2" PostId="7345" RevisionGUID="3dfdbbda-3c88-4b5e-a98b-091bff45ad49" CreationDate="2011-01-12T23:17:53.983" UserId="4604" Text="As a possible answer for the second point is to project the player's movement vector along the wall vector using a dot product (a.b * normalized(b)).  You then get a vector that tells you how far to move the player in the direction of the wall, and if you move the player by that vector, you get a 'slide' along the wall.  Worked well for me in a previous game project." />
  <row Id="14733" PostHistoryTypeId="2" PostId="7346" RevisionGUID="a7896886-ab13-4d5b-8c9d-90f1509ec0da" CreationDate="2011-01-13T00:51:31.213" UserDisplayName="Bill Zimmerman" Text="I am looking for a good method to determine which objects will be considered for collision with other objects.&#xD;&#xA;&#xD;&#xA;My current idea is that each object has the following properties:&#xD;&#xA;&#xD;&#xA;alwaysCollidesWith = [list of objects that will always trigger a collision check]&#xD;&#xA;neverCollidesWith = [lost of objects that will never be considered]&#xD;&#xA;teamCollidesWith = [list of objects that will be checked, provided they belong to a different team]&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;-projectiles never have to be checked for collisions with other projectiles&#xD;&#xA;-players are always checked for collisions with players, regardless of team&#xD;&#xA;-projectiles are only considered for collisions if they collide with another teams players&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone see any weaknesses with this approach? Can anyone recommend a better approach?" />
  <row Id="14734" PostHistoryTypeId="1" PostId="7346" RevisionGUID="a7896886-ab13-4d5b-8c9d-90f1509ec0da" CreationDate="2011-01-13T00:51:31.213" UserDisplayName="Bill Zimmerman" Text="Collision filtering by object, team" />
  <row Id="14735" PostHistoryTypeId="3" PostId="7346" RevisionGUID="a7896886-ab13-4d5b-8c9d-90f1509ec0da" CreationDate="2011-01-13T00:51:31.213" UserDisplayName="Bill Zimmerman" Text="&lt;collision-detection&gt;" />
  <row Id="14736" PostHistoryTypeId="2" PostId="7347" RevisionGUID="842d89fd-d4c4-4f12-afc3-0dea65a1d359" CreationDate="2011-01-13T01:22:42.100" UserId="4443" Text="General rule of thumb for threading an application: 1 thread per CPU Core. On a quad core PC that means 4, on a console like the XBox 360 that means 3... On a system like the PS3... well good luck on that one :) People are still trying to figure it out.&#xD;&#xA;&#xD;&#xA;I would suggest designing each system as a self contained module that you could thread if you wanted. This usually means having very clearly defined communication pathways between the module and the rest of the engine. I particularly like Read-Only processes like Rendering and audio as well as 'are we there yet' processes like reading player input for things to be threaded off. To touch on the answer given by AttackingHobo, when you are rendering 30-60fps, if your data is 1/30th-1/60th of a second out of date it really is not going to detract from the responsive feel of your game. Always remember that the main difference between application software and video games is doing everything 30-60 times a second. On that same note however, input may be one of the things you want to keep on the main thread so the rest can react to it as soon as it appears :)&#xD;&#xA;&#xD;&#xA;If you design your engine's systems well enough any of them can be moved from thread to thread to load balance your engine more appropriately on a per-game basis and the like. In theory you could also use your engine in a distributed system if need be where entirely separate computer systems run each component.&#xD;&#xA;" />
  <row Id="14737" PostHistoryTypeId="5" PostId="7257" RevisionGUID="06f0a122-a21a-4f8d-8665-becb8b7c03c8" CreationDate="2011-01-13T01:47:30.030" UserId="284" Comment="added 4 characters in body" Text="I've got this BBG going ( http://ninjawars.net ), and the character stats currently are simplistic.  I'm looking to add a few stats to the current 1/2 (strength and maximum hitpoints, essentially).&#xD;&#xA;I've come up with: (strength (unchanged), speed, stamina, and some others that are somewhat interesting wildcard stats).&#xD;&#xA;However, I'm not satisfied with how boring the effects of some of these stats are, because they're very linear.  Better stat, better effects of the stat, but the stats don't interact with each-other, there's no Rock-Paper-Scissors interaction, having more is always better all the time.&#xD;&#xA;&#xD;&#xA;So what I'd really like is to see examples of interesting character stats or effects of stats?&#xD;&#xA;&#xD;&#xA;Examples that I can think of off hand:&#xD;&#xA;&#xD;&#xA;Call of Cthulu's Insanity stat (things get really weird/chaotic if you start losing sanity)&#xD;&#xA;&#xD;&#xA;White Wolf stats, to a certain extent (the stats themselves have some basic effects, and all skills effectiveness base themselves off of stats as well)&#xD;&#xA;&#xD;&#xA;What are some other ways people have used stats to check out?" />
  <row Id="14738" PostHistoryTypeId="25" PostId="7346" RevisionGUID="2c2f9ba5-411d-47d6-8b77-efd689c1a640" CreationDate="2011-01-13T01:55:31.040" Comment="http://twitter.com/#!/StackGameDev/status/25370323381653504" />
  <row Id="14739" PostHistoryTypeId="25" PostId="7337" RevisionGUID="239b0ed9-7c55-4046-a063-bd88303278a2" CreationDate="2011-01-13T04:55:30.740" Comment="http://twitter.com/#!/StackGameDev/status/25415619432161280" />
  <row Id="14740" PostHistoryTypeId="17" PostId="7349" RevisionGUID="8e6c02ab-bdc9-46e8-8de7-330fb7dfe83c" CreationDate="2011-01-13T05:47:34.647" UserId="-1" Comment="from http://photo.stackexchange.com/questions/6853/changing-palette-for-day-light-mode-using-gimp/6878#6878" Text="" />
  <row Id="14741" PostHistoryTypeId="2" PostId="7349" RevisionGUID="e7d2481a-0369-4987-b90c-54254d384896" CreationDate="2011-01-12T21:59:01.107" UserDisplayName="chills42" Text="When I want to change the color balance on an entire image like is being done in the example, I tend to use the [Color Balance tool][1], which is one of the simplest ways the shift colors throughout a selected area.&#xD;&#xA;&#xD;&#xA;There are also a few other tools that you can use to fine tune the color in your images.&#xD;&#xA;&#xD;&#xA; - [Gimp Color Tools Documentation][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.gimp.org/en/gimp-tool-color-balance.html&#xD;&#xA;  [2]: http://docs.gimp.org/en/gimp-tools-color.html" />
  <row Id="14742" PostHistoryTypeId="2" PostId="7348" RevisionGUID="cab599b4-043f-4cc1-8a98-a8d346c1062a" CreationDate="2011-01-12T16:59:16.443" UserDisplayName="J.C." Text="Suppose I've a picture, which want to achieve day/light mode by changing 8bpp color palette.&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/sfm8o.jpg&quot; /&gt;&#xD;&#xA;&#xD;&#xA;If I want the pixel index of my picture is always fixed for both day mode and night mode. For example, the 1st pixel index is 100. Which I can look up index 100 in day mode palette and night mode palette. How can I use GIMP to do so? My goal is to not update my pixel index of my picture.&#xD;&#xA;&#xD;&#xA;Also, as you see in two palette, they are not one one mapping. That is index 1 of the day mode palette and index 1 of the night mode palette may not used in the same pixel of the picture, how can I tackle this problem?&#xD;&#xA;&#xD;&#xA;Actually, my use case is as follow&#xD;&#xA;I want to use one 8bpp picture to achieve day/night mode by update only the color palette (without updating the pixel index). The advantage is I only have to prepare 2 256 byte palette rather than saving 2 big pictures in my limited data ram.&#xD;&#xA;&#xD;&#xA;Thanks a lot&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sfm8o.jpg" />
  <row Id="14743" PostHistoryTypeId="1" PostId="7348" RevisionGUID="cab599b4-043f-4cc1-8a98-a8d346c1062a" CreationDate="2011-01-12T16:59:16.443" UserDisplayName="J.C." Text="Changing Palette for Day/Light Mode using GIMP " />
  <row Id="14744" PostHistoryTypeId="3" PostId="7348" RevisionGUID="cab599b4-043f-4cc1-8a98-a8d346c1062a" CreationDate="2011-01-12T16:59:16.443" UserDisplayName="J.C." Text="&lt;gimp&gt;" />
  <row Id="14745" PostHistoryTypeId="17" PostId="7348" RevisionGUID="d0162ba8-93cb-4e47-814c-b57d38e62629" CreationDate="2011-01-13T05:47:34.647" UserId="-1" Comment="from http://photo.stackexchange.com/questions/6853/changing-palette-for-day-light-mode-using-gimp" Text="" />
  <row Id="14746" PostHistoryTypeId="2" PostId="7350" RevisionGUID="e3d0a631-6650-4d19-9322-cdf5291aa0fa" CreationDate="2011-01-13T06:02:27.297" UserId="4261" Text="I'm slightly confused about how Direct3D rendering works. Basically, as long as I render to one surface, everything is fine. But when I try rendering to multiple surfaces, it seems like everything is still rendered to one surface. I think there's something wrong with my calls.&#xD;&#xA;&#xD;&#xA;For each update cycle this is what I do&#xD;&#xA;1. device-&gt;BeginScene()&#xD;&#xA;2. sprite-&gt;Begin(...)&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;A bunch of GetRenderTarget to store the old render target, then SetRenderTarget to set a new surface, and then things like CreateVertexBuffer, SetTexture, etc to draw on the new render target. Then resetting to the old render target.&#xD;&#xA;&#xD;&#xA;4. sprite-&gt;Draw([the back buffer]) (the back buffer is actually another surface, not the actual back buffer. But here it is being drawn onto the actual back buffer, I think)&#xD;&#xA;5. sprite-&gt;End()&#xD;&#xA;6. device-&gt;EndScene()&#xD;&#xA;7. device-&gt;Present(...)&#xD;&#xA;&#xD;&#xA;Also, it seems like if I mix sprite drawing and non-sprite drawing onto a surface, that first one set of render commands is executed and then the other set, rather than in order by when each command was called.&#xD;&#xA;&#xD;&#xA;If anyone could shed light on any of this, it would be much appreciated." />
  <row Id="14747" PostHistoryTypeId="1" PostId="7350" RevisionGUID="e3d0a631-6650-4d19-9322-cdf5291aa0fa" CreationDate="2011-01-13T06:02:27.297" UserId="4261" Text="Rendering with Direct3D" />
  <row Id="14748" PostHistoryTypeId="3" PostId="7350" RevisionGUID="e3d0a631-6650-4d19-9322-cdf5291aa0fa" CreationDate="2011-01-13T06:02:27.297" UserId="4261" Text="&lt;directx&gt;&lt;directx9&gt;" />
  <row Id="14749" PostHistoryTypeId="2" PostId="7351" RevisionGUID="b7506d92-ec58-4437-a798-ef2e2762b011" CreationDate="2011-01-13T06:04:20.747" UserId="370" Text="Which is more efficient using OpenGL's transformation stack or applying the transformations by hand.&#xD;&#xA;&#xD;&#xA;I've often heard that you should minimize the number of state transitions in your graphics pipeline.  Pushing and popping translation matrices seem like a big change.  However, I wonder if the graphics card might be able to more than make up for pipeline hiccup by using its parallel execution hardware to bulk multiply the vertices.&#xD;&#xA;&#xD;&#xA;My specific case.  I have font rendered to a sprite sheet.  The coordinates of each character or a string are calculated and added to a vertex buffer.  Now I need to move that string.  Would it be better to iterate through the vertex buffer and adjust each of the vertices by hand or temporarily push a new translation matrix?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14750" PostHistoryTypeId="1" PostId="7351" RevisionGUID="b7506d92-ec58-4437-a798-ef2e2762b011" CreationDate="2011-01-13T06:04:20.747" UserId="370" Text="OpenGL's matrix stack vs Hand multiplying" />
  <row Id="14751" PostHistoryTypeId="3" PostId="7351" RevisionGUID="b7506d92-ec58-4437-a798-ef2e2762b011" CreationDate="2011-01-13T06:04:20.747" UserId="370" Text="&lt;opengl&gt;&lt;optimization&gt;&lt;opengl-es&gt;&lt;fonts&gt;" />
  <row Id="14753" PostHistoryTypeId="2" PostId="7352" RevisionGUID="303de7fe-b4fa-4e39-a036-061713d3bc09" CreationDate="2011-01-13T06:10:03.110" UserId="263" Text="It's my understanding that in the most recent versions of the spec (3.3 and 4.x) the matrix stacks are gone and you need to keep track of your transformation matrices by hand. I believe this might be true for the mobile (ES) spec as well.&#xD;&#xA;&#xD;&#xA;If you're looking for a consistent way to handle your matrices by hand, you might be interested in [GLM][1]. It's a pretty neat math library (which includes matrix transformations) modeled after the GLSL spec so you only need to keep one set of math routines in your head when dealing with OpenGL code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/" />
  <row Id="14754" PostHistoryTypeId="2" PostId="7353" RevisionGUID="b9f21b8d-fa8e-43ff-bba9-d3d2fbfa5c25" CreationDate="2011-01-13T06:16:35.723" UserId="263" Text="There's a couple things to consider. The thread-per-subsystem route is easy to think about since the code separation is pretty apparent from the get go. However, depending on how much intercommunication your subsystems need, inter-thread communication could really kill your performance. In addition, this only scales to N cores, where N is the number of subsystems you abstract into threads.&#xD;&#xA;&#xD;&#xA;If you're just looking to multithread an existing game, this is probably the path or least resistance. However, if you're working on some low level engine systems that might be shared between several games or projects, I would consider another approach.&#xD;&#xA;&#xD;&#xA;It can take a bit of mind twisting, but if you can break things up as a job queue with a set of worker threads it will scale much better in the long run. As the latest and greatest chips come out with a gazillion cores, your game's performance will scale along with it, just fire up more worker threads.&#xD;&#xA;&#xD;&#xA;So basically, if you're looking to bolt on some parallelism to an existing project, I'd parallelize across subsystems. If you're building a new engine from scratch with parallel scalability in mind, I'd look into a job queue." />
  <row Id="14755" PostHistoryTypeId="2" PostId="7354" RevisionGUID="2d080792-6d16-410f-a4ea-b15c0422f762" CreationDate="2011-01-13T06:33:50.783" UserId="325" Text="I posted this on [StackOverlow][1], but of course it should be posted here.&#xD;&#xA;&#xD;&#xA;I am maintaining a multiplatform codebase for Xbox360 and WinXP. I am seeing an issue on the XP side that appears to be related to D3DRS_VIEWPORTENABLE on the Xbox360 version not having an equivalent on WinXP D3D9. This article had an interesting idea, but the only way to construct an identity matrix is to supply negative numbers to D3DVIEWPORT9::X and D3DVIEWPORT9::Height, but they are unsigned numbers. (I tried to put in negative numbers anyway, but nothing interesting happened.)&#xD;&#xA;&#xD;&#xA;So, how does one emulate the behavior of D3DRS_VIEWPORTENABLE under WinXP/D3D9?&#xD;&#xA;&#xD;&#xA;(For clarity, the result I'm seeing is that a 2d screen-aligned quad works fine on Xbox360 but is offset/stretched on WinXP. In fact, the (0, 0) starts in the center of the screen on WinXP instead of in the lower-left corner like on the Xbox360 as a result of applying the viewport transform.)&#xD;&#xA;&#xD;&#xA;Update: I didn't have an Xbox360 devkit at the time I wrote up this question, but I've since gotten one. I commented out the disabling of the D3DRS_VIEWPORTENABLE state, and the exact same behavior resulted on the Xbox360 as on the WinXP build. So, there must be some DirectX magic to bridge the gap here for emulating D3DRS_VIEWPORTENABLE being turned off on WinXP.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4583380/what-is-the-xbox360s-d3drs-viewportenable-equivalent-on-winxp-d3d9" />
  <row Id="14756" PostHistoryTypeId="1" PostId="7354" RevisionGUID="2d080792-6d16-410f-a4ea-b15c0422f762" CreationDate="2011-01-13T06:33:50.783" UserId="325" Text="What is the Xbox360's D3DRS_VIEWPORTENABLE equivalent on WinXP D3D9?" />
  <row Id="14757" PostHistoryTypeId="3" PostId="7354" RevisionGUID="2d080792-6d16-410f-a4ea-b15c0422f762" CreationDate="2011-01-13T06:33:50.783" UserId="325" Text="&lt;graphics&gt;&lt;xbox360&gt;&lt;windows&gt;&lt;directx9&gt;" />
  <row Id="14758" PostHistoryTypeId="2" PostId="7355" RevisionGUID="4d78c4cc-3d84-4167-923c-ca159aea06cf" CreationDate="2011-01-13T07:23:00.133" UserId="1430" Text="The stack is the less-optimal option here -- not because pushing and popping it was expensive, as it should not ever induce a complex driver-level state change (the matrix shouldn't be sent to the card until a render command is issued, so it's all CPU-side manipulation in the API, usually).&#xD;&#xA;&#xD;&#xA;The problem with the stack is that it has a limit to how far you can push it -- it's one of the parameters you could get at via glGet* I think. There's no big advantage to using the stack unless you don't have or are incapable/do not desire to write matrix math. I would recommend doing it yourself.&#xD;&#xA;&#xD;&#xA;I don't know what the state of the stack functions are in modern GL. I believe they've been deprecated/removed as well, but I haven't had the need to actually use GL in a while so I have not kept as up to date." />
  <row Id="14759" PostHistoryTypeId="2" PostId="7356" RevisionGUID="d250dd57-e006-45cd-9902-545513187c09" CreationDate="2011-01-13T07:34:10.963" UserId="1430" Text="It sounds like the bulk of what you're doing when you say &quot;... A bunch of GetRenderTarget to store the old render target, then SetRenderTarget to set a new surface, and then things like CreateVertexBuffer, SetTexture, etc to draw on the new render target. Then resetting to the old render target.&quot; is actually stuff that needs to be done outside of a BeginScene()/EndScene() block. Certainly you shouldn't be creating vertex buffers in there, in the general case (just for performance concerns).&#xD;&#xA;&#xD;&#xA;Depending on what the render targets are, and how you're creating and setting them, you may need to doing one BeginScene/EndScene per target, and not shoving them all into a single scene.&#xD;&#xA;&#xD;&#xA;I assume you're clearing the render targets before you start drawing, too.&#xD;&#xA;&#xD;&#xA;Have you enabled the D3D debug runtimes (via the D3D &quot;Control Panel&quot; in the DX SDK's start menu folder, under the utilities or tools subfolder)? They will cause useful diagnostics to be printed to the output window in VS while you debug.&#xD;&#xA;&#xD;&#xA;There are a few multiple-render-target samples in the SDK, too, and probably a few online (although they may deal with multiple swap chains, which isn't what you're done I don't think?)" />
  <row Id="14760" PostHistoryTypeId="25" PostId="7351" RevisionGUID="8a41bddb-5e78-442d-a0c8-abd2c2de41a0" CreationDate="2011-01-13T07:55:30.700" Comment="http://twitter.com/#!/StackGameDev/status/25460918104096768" />
  <row Id="14764" PostHistoryTypeId="2" PostId="7358" RevisionGUID="3cbbcfc7-980a-40ef-842b-52d0f2c663bf" CreationDate="2011-01-13T09:56:08.460" UserId="500" Text="You are right that the most critical part is to avoid synchronization wherever possible. There are a few ways to achieve this.&#xD;&#xA;&#xD;&#xA;1. Know your data and store it in memory according to your processing needs. This enables you to plan for parallel calculations without the need of synchronization. Unfortuantely this is most of the time quite hard to achieve as the data is often accessed from different systems at unpredictable times.&#xD;&#xA;&#xD;&#xA;2. Define clear access-times for data. You could separate your main-tick into x phases. If you are sure that Thread X reads the data only in a specific phase, you also know that this data can be modified by other threads in a different phase.&#xD;&#xA;&#xD;&#xA;3. Double-Buffer your data. That is the most simple approach, but it increases the latency, as Thread X is working with the data from the last frame, while Thread Y is preparing the data for the next frame.&#xD;&#xA;&#xD;&#xA;My personal experience shows that fine grained calculations are the most effective way, as these can scale far better than a subsystem-based solutions. If you thread your subsystems, the frame-time will be bound to the most expensive subsystem. This can lead to all threads but one idling until the expensive subsystem has finally finished it's work.&#xD;&#xA;If you are able to separate large parts of your game into small tasks, these tasks can be scheduled accordingly to avoid idling cores. But this is something that is hard to accomplish if you have already a big code-base.&#xD;&#xA;&#xD;&#xA;To take some hardware constraints into consideration, you should try to never oversubscribe your hardware. With oversubscribe, I mean having more software threads than your platform hardware threads. Especially on PPC architectures ( Xbox360, PS3 ) a task-switch is really expensive. It's of course perfectly okay if you have a few threads oversubscribed which are only triggered for an small amount of time ( once a frame, for example )&#xD;&#xA;If you target the PC, you should keep in mind that the number of cores ( or better HW-Threads ) is constantly growing, so you would want to find a scalable solution, which takes advantage of the additional CPU-Power. So, in this area, you should try to design your code as task-based as possible." />
  <row Id="14765" PostHistoryTypeId="2" PostId="7359" RevisionGUID="05216b5e-1adf-428d-90db-498c474b952c" CreationDate="2011-01-13T10:03:20.177" UserId="4568" Text="As I understand it,  potentially visible sets (PVS) are used to determine 2 things;&#xD;&#xA;1. which objects are inside the camera's view volume&#xD;&#xA;2. which objects are not occluded (hidden) from the camera's point of view.&#xD;&#xA;&#xD;&#xA;I understand that things like octtrees &amp; BSP trees have been used for PVS calculation in the past, but how are PVSs calculated in today's AAA titles?" />
  <row Id="14766" PostHistoryTypeId="1" PostId="7359" RevisionGUID="05216b5e-1adf-428d-90db-498c474b952c" CreationDate="2011-01-13T10:03:20.177" UserId="4568" Text="How are potentially visible sets (PVS) determined in state of the art games?" />
  <row Id="14767" PostHistoryTypeId="3" PostId="7359" RevisionGUID="05216b5e-1adf-428d-90db-498c474b952c" CreationDate="2011-01-13T10:03:20.177" UserId="4568" Text="&lt;graphics&gt;&lt;graphics-programming&gt;&lt;bsp&gt;" />
  <row Id="14768" PostHistoryTypeId="2" PostId="7360" RevisionGUID="a8ca30e8-d320-490a-908b-b45991ee0174" CreationDate="2011-01-13T10:16:16.423" UserId="1581" Text="What you are referring to is commonly known as **collision filtering**.&#xD;&#xA;&#xD;&#xA;The problem I see with your approach is that it doesn't scale very well. For every object, you are storing relations with all the objects that collide with it. If you only have 2 players and a 10 proyectiles, it will work ok. But when that number increases to, say, 20 players and 100 proyectiles, then the number of relations increases exponentially. It'll gradually run more slowly and consume more memory when the number of players increases.&#xD;&#xA;&#xD;&#xA;You would be better off by organizing your objects into &quot;groups&quot;. And then adding collision/non-collision relationships between each object and those groups. The memory consumption will be slower, and the checks will be faster.&#xD;&#xA;&#xD;&#xA;Box2D has a fairly flexible system set up for that.&#xD;&#xA;&#xD;&#xA;First, there's categories and masks:&#xD;&#xA;&#xD;&#xA; 1. Shapes can have up to 16 &quot;categories&quot; (it's really a 16-bit mask). By default, they are on category &quot;1&quot;&#xD;&#xA; 2. Shapes can also have a &quot;mask&quot; that defines with what categories they can collide. By default, they collide with category &quot;1&quot; only.&#xD;&#xA;&#xD;&#xA;Then, there's also groups. A group is an integer.&#xD;&#xA;&#xD;&#xA; 1. Two shapes with the same group will always collide, if the group is positive.&#xD;&#xA; 2. Two shapes with the same group will never collide, if the group is negative.&#xD;&#xA; 3. Group rules override mask and category rules.&#xD;&#xA;&#xD;&#xA;With these two things, the question &quot;do these two objects collide?&quot;, filtering is very fast (a bitmask operation and an integer comparison) and has a very small memory footprint (4 bytes per object).&#xD;&#xA;&#xD;&#xA;In your example:&#xD;&#xA;&#xD;&#xA; - Players would have category 1, and mask {1,2} (so they collide with all projectiles by default)&#xD;&#xA; - Projectiles would have category 2, and mask {1} (they only collide with players)&#xD;&#xA; - Players and projectile of team 1 would all be in group -1, and team 2 would have the group -2. This way, friendly fire would not happen.&#xD;&#xA;&#xD;&#xA;The most recent tutorial that I could find is from 2009 - here it is:&#xD;&#xA;&#xD;&#xA;http://www.emanueleferonato.com/2009/10/01/introducing-box2d-filtering/&#xD;&#xA;&#xD;&#xA;You can also browse the [box2d manual][1] - scroll down until it says &quot;Filtering&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/manual.html" />
  <row Id="14769" PostHistoryTypeId="2" PostId="7361" RevisionGUID="436f69b2-66cb-46d3-9fda-71b32b536167" CreationDate="2011-01-13T10:33:05.373" UserId="4410" Text="If you ask 5 game developers you may well get 5 different solutions or overlapping answers. The system to go for depends a lot on the type of game and the environment you exist in. There's also the divide between offline and real-time solutions. There's also no reason why octree and BSP tree solutions aren't also still used in certain scenarios.&#xD;&#xA;&#xD;&#xA;Personally, for what I've worked on (racing games) we've used a pre-calculated static visibility system where offline we divide the world up into a grid, then we move the camera around inside the grid cell checking to see what it can see at a fairly coarse level. What we end up with is for every cell we have a bit list which says which models definately are not visible to the camera from that location. Once in game, we can very quickly get a subset of the world from which we can frustrum cull to work out what we actually need to render in front of the camera.&#xD;&#xA;&#xD;&#xA;Another title here uses a combination of that and [portals][1], where you effectively have a door through which you can determine if you can see whats on the other side. If you can't see the door, you don't need to worry what's on the other side.&#xD;&#xA;&#xD;&#xA;A real-time system that I've seen used (but have no personal experience of) is [dPVS][2], which performs occlusion testing in real-time (they've got a paper linked from their website on how it works).&#xD;&#xA;&#xD;&#xA;It all depends on what you need, different systems also allow you trade a bit of extra memory for speed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Portal_rendering&#xD;&#xA;  [2]: http://www.umbrasoftware.com/" />
  <row Id="14770" PostHistoryTypeId="2" PostId="7362" RevisionGUID="86f377a3-12f0-4e16-ba46-e0571f379ee8" CreationDate="2011-01-13T10:50:19.283" UserId="4620" Text="I have to download the html code of a web site during the game. I am taking the poster url of a movie from the imdb web site by scrapping the html ( also other informations ). I have to do the download process many times during the game for different movies. I can download and scrap the html but downloading the html takes too much time and it causes the game to slow down(freeze while downloading). How can I solve this problem? My one approach is to download and scrap all the information and store them in a database before the game and during the game access this information from the database. I think this will work properly but that is not what I exactly want. It would be better if it is dynamic. I also thought of using multi-threading but I am a bit confused about how to implement threading in xna. I read some articles about it but it is not so clear. I mean when should I start the thread and what about the update function etc. I need your help guys" />
  <row Id="14771" PostHistoryTypeId="1" PostId="7362" RevisionGUID="86f377a3-12f0-4e16-ba46-e0571f379ee8" CreationDate="2011-01-13T10:50:19.283" UserId="4620" Text="xna download website source code" />
  <row Id="14772" PostHistoryTypeId="3" PostId="7362" RevisionGUID="86f377a3-12f0-4e16-ba46-e0571f379ee8" CreationDate="2011-01-13T10:50:19.283" UserId="4620" Text="&lt;xna&gt;&lt;multithreading&gt;" />
  <row Id="14773" PostHistoryTypeId="25" PostId="7359" RevisionGUID="15025015-bf39-43e7-8d25-7451c02e13e3" CreationDate="2011-01-13T10:55:30.697" Comment="http://twitter.com/#!/StackGameDev/status/25506217082232832" />
  <row Id="14774" PostHistoryTypeId="5" PostId="7360" RevisionGUID="b9c14554-7971-4f74-8d7d-c30705223312" CreationDate="2011-01-13T11:02:43.340" UserId="1581" Comment="removed obvious statement" Text="The problem I see with your approach is that it doesn't scale very well. For every object, you are storing relations with all the objects that collide with it. If you only have 2 players and a 10 proyectiles, it will work ok. But when that number increases to, say, 20 players and 100 proyectiles, then the number of relations increases exponentially. It'll gradually run more slowly and consume more memory when the number of players increases.&#xD;&#xA;&#xD;&#xA;You would be better off by organizing your objects into &quot;groups&quot;. And then adding collision/non-collision relationships between each object and those groups. The memory consumption will be slower, and the checks will be faster.&#xD;&#xA;&#xD;&#xA;Box2D has a fairly flexible system set up for that.&#xD;&#xA;&#xD;&#xA;First, there's categories and masks:&#xD;&#xA;&#xD;&#xA; 1. Shapes can have up to 16 &quot;categories&quot; (it's really a 16-bit mask). By default, they are on category &quot;1&quot;&#xD;&#xA; 2. Shapes can also have a &quot;mask&quot; that defines with what categories they can collide. By default, they collide with category &quot;1&quot; only.&#xD;&#xA;&#xD;&#xA;Then, there's also groups. A group is an integer.&#xD;&#xA;&#xD;&#xA; 1. Two shapes with the same group will always collide, if the group is positive.&#xD;&#xA; 2. Two shapes with the same group will never collide, if the group is negative.&#xD;&#xA; 3. Group rules override mask and category rules.&#xD;&#xA;&#xD;&#xA;With these two things, the question &quot;do these two objects collide?&quot;, filtering is very fast (a bitmask operation and an integer comparison) and has a very small memory footprint (4 bytes per object).&#xD;&#xA;&#xD;&#xA;In your example:&#xD;&#xA;&#xD;&#xA; - Players would have category 1, and mask {1,2} (so they collide with all projectiles by default)&#xD;&#xA; - Projectiles would have category 2, and mask {1} (they only collide with players)&#xD;&#xA; - Players and projectile of team 1 would all be in group -1, and team 2 would have the group -2. This way, friendly fire would not happen.&#xD;&#xA;&#xD;&#xA;The most recent tutorial that I could find is from 2009 - here it is:&#xD;&#xA;&#xD;&#xA;http://www.emanueleferonato.com/2009/10/01/introducing-box2d-filtering/&#xD;&#xA;&#xD;&#xA;You can also browse the [box2d manual][1] - scroll down until it says &quot;Filtering&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/manual.html" />
  <row Id="14775" PostHistoryTypeId="2" PostId="7363" RevisionGUID="9f7afba3-b124-425c-adb4-cac6750f0a33" CreationDate="2011-01-13T11:09:21.097" UserId="3794" Text="Creating a thread for your downloading operation will solve the problem. It means your game will create thread every time that you need download, then runs in paralel independently with download and after downloading is done, thread ends. Make thread for every download you need (so they can run in parallel too)." />
  <row Id="14776" PostHistoryTypeId="2" PostId="7364" RevisionGUID="3ff441ae-00bd-4ad9-9712-1bd09b3d23e8" CreationDate="2011-01-13T11:12:15.947" UserId="3630" Text="I want to packing image files(png, jpg) into swf, then game can load files easily. But I want to do this by a Makefile, not FLASH CS.  &#xD;&#xA;Do you know any command line swf tool set can do that? And can I packing XML files into it as well?&#xD;&#xA;" />
  <row Id="14777" PostHistoryTypeId="1" PostId="7364" RevisionGUID="3ff441ae-00bd-4ad9-9712-1bd09b3d23e8" CreationDate="2011-01-13T11:12:15.947" UserId="3630" Text="Are there any command line swf packing tools?" />
  <row Id="14778" PostHistoryTypeId="3" PostId="7364" RevisionGUID="3ff441ae-00bd-4ad9-9712-1bd09b3d23e8" CreationDate="2011-01-13T11:12:15.947" UserId="3630" Text="&lt;flash&gt;&lt;swf&gt;" />
  <row Id="14784" PostHistoryTypeId="2" PostId="7368" RevisionGUID="d08adcae-4937-4f6f-99da-f80438b0f305" CreationDate="2011-01-13T11:46:13.067" UserId="4129" Text="[SWFMill][1] is the tool to use.&#xD;&#xA;&#xD;&#xA;And you might also be interested in developing with [Haxe][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://swfmill.org/&#xD;&#xA;  [2]: http://haxe.org/" />
  <row Id="14786" PostHistoryTypeId="2" PostId="7369" RevisionGUID="69aaf750-ede1-4737-be78-6749d48be12f" CreationDate="2011-01-13T12:12:36.513" UserId="3884" Text="Do not try to keep anything persistent in the window's framebuffer. For example, graphics cards usually maintain a hierarchical z-buffer that only works if you call glClear regularly.&#xD;&#xA;If you have a rarely redrawn background, I suggest you render that into an FBO (or PBUFFER, if you lack proper FBO support with MSAA) when it changes. If the background drawing takes very long, you can even spread it out over multiple frames and smoothly blend over. That's a technique that's often used for very expensive skyboxes with lots of atmospherical effects." />
  <row Id="14787" PostHistoryTypeId="2" PostId="7370" RevisionGUID="e7fd0628-ae8a-4da9-9f0f-71f33613b8c7" CreationDate="2011-01-13T12:13:07.793" UserId="1502" Text="The name &quot;Draw&quot; in the somewhat misleading. It should better be called &quot;AddToBatch&quot;.&#xD;&#xA;What it actually does is batch your Draw calls. Only when you call ID3DXSprite::Flush or Id3DXSprite::End it fills the sprites into one big vertex buffer and renders that onto the current render target.&#xD;&#xA;&#xD;&#xA;So if you want to switch render targets in between, you will have to do something along these lines (pseudo-code):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Scene-&gt;Begin()&#xD;&#xA;    &#xD;&#xA;    Device-&gt;SetRenderTarget( FirstTarget )&#xD;&#xA;      Sprite-&gt;Begin()&#xD;&#xA;      for each sprite to draw onto first target&#xD;&#xA;        Sprite-&gt;Draw()&#xD;&#xA;      Sprite-&gt;End()&#xD;&#xA;    &#xD;&#xA;    Device-&gt;SetRenderTarget( SecondTarget )&#xD;&#xA;      Sprite-&gt;Begin()&#xD;&#xA;      for each sprite to draw onto second target&#xD;&#xA;        Sprite-&gt;Draw()&#xD;&#xA;      Sprite-&gt;End()&#xD;&#xA;    &#xD;&#xA;    Scene-&gt;End()&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14788" PostHistoryTypeId="2" PostId="7371" RevisionGUID="20758c9a-3226-4d15-8d48-50f14ed0c548" CreationDate="2011-01-13T12:57:23.177" UserId="4508" Text="[Flex SDK][1] has support for command-line compilations because it is a compiler.&#xD;&#xA;And then you could be interested also in Mike Chambers [Flash Command][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK&#xD;&#xA;  [2]: http://www.mikechambers.com/blog/index.php?s=FlashCommand+" />
  <row Id="14790" PostHistoryTypeId="25" PostId="7364" RevisionGUID="166b0a93-ea18-4095-9de4-00b43c55fcf3" CreationDate="2011-01-13T13:55:30.590" Comment="http://twitter.com/#!/StackGameDev/status/25551514684624897" />
  <row Id="14791" PostHistoryTypeId="2" PostId="7372" RevisionGUID="6c94cb16-e64f-42ae-9dc1-e44b6b0631cd" CreationDate="2011-01-13T13:59:58.473" UserId="4264" Text="I think you should always compose the final image completely, but you may keep parts of it in auxiliary buffers.&#xD;&#xA;&#xD;&#xA;In other words, let's say you have some very complex HUD. Render that to a separate texture with everything see-through masked with alpha. You don't need to update the HUD texture every frame, only whenever it actually needs to be updated.&#xD;&#xA;&#xD;&#xA;When rendering a frame, you just re-use the HUD texture each frame.&#xD;&#xA;&#xD;&#xA;This was just an example, the same principle could be applied to other things that do not require update each frame.&#xD;&#xA;&#xD;&#xA;The only place where I think updating only parts of the screen would help are extremely platform-specific to some obscure low-end hardware, and OpenGL doesn't really apply there. Everything else more or less requires the full screen update (either due to double buffering, tiling, or whatever weird NDS did again)." />
  <row Id="14792" PostHistoryTypeId="2" PostId="7373" RevisionGUID="4cf02663-dd2e-466c-834f-e0a960a37f9f" CreationDate="2011-01-13T14:05:02.243" UserId="4264" Text="The behavior is UNDEFINED, so if you're going to fill the whole screen anyway, you may consider dropping the clear.. except, on some environments (certain tiling architectures at least), that will actually degrade performance. The full screen clear at the start of rendering is so common operation that I'd be surprised if it wasn't optimized well on all target platforms." />
  <row Id="14793" PostHistoryTypeId="2" PostId="7374" RevisionGUID="0ac756c1-3bc1-4ee1-9f2d-440b5beba5d6" CreationDate="2011-01-13T14:12:37.670" UserId="4508" Text="i've just reviewing in [Frenet Frame][1] math. It is an interest geometrical issue. &#xD;&#xA;&#xD;&#xA;I know that common application are:&#xD;&#xA; - camera movement belong a curve&#xD;&#xA; - tube and ribbons surface&#xD;&#xA;&#xD;&#xA;someone can suggest me other intersting application?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Frenet–Serret_formulas" />
  <row Id="14794" PostHistoryTypeId="1" PostId="7374" RevisionGUID="0ac756c1-3bc1-4ee1-9f2d-440b5beba5d6" CreationDate="2011-01-13T14:12:37.670" UserId="4508" Text="Frenet frame and application" />
  <row Id="14795" PostHistoryTypeId="3" PostId="7374" RevisionGUID="0ac756c1-3bc1-4ee1-9f2d-440b5beba5d6" CreationDate="2011-01-13T14:12:37.670" UserId="4508" Text="&lt;math&gt;&lt;geometry&gt;" />
  <row Id="14796" PostHistoryTypeId="5" PostId="6890" RevisionGUID="2ea8b905-84d3-4a81-a8b5-c3ae01966a63" CreationDate="2011-01-13T14:16:35.043" UserId="14" Comment="deleted 3 characters in body" Text="I have two suggestions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first is to **limit the amount of direct skips they get**, and allow them to regain used skips if they go back and complete a puzzle they skipped previously.&#xD;&#xA;&#xD;&#xA;This will ensure that the user remains motivated. They no-longer have unlimited potential for an easy ride, and it will add another motivating factor. Not using their skips because there is 'potentially' a far harder puzzle down the line. Also, as puzzles tend to effect the way that people approach a general set of problems they may get inspiration for a puzzle they play down the line. The act of returning and finishing a puzzle that had once defeated them will equal an immense amount of gratification (Consider finally one-upping someone who was better than you in ever class). For example of this, see World of Goo, although I don't know if they return skips.&#xD;&#xA;&#xD;&#xA;The second suggestion is to **give them unlimited hints**, from the early casual hints to helping them step by step. There are any number of factors you could use to give out hints to players, time, failed attempts but casually release more information that would make solving the particular puzzle easier for them. For you, this may seem as juvenile hand holding, but thanks to  [Hindsight Bias][1] your players won't see it that way. Mentally they will say, &quot;Oh it's that simple, I would have figured that out&quot; and continue without feeling slighted in the slightest. (Or alternatively, they will go *&quot;No one would have thought of that, I'm happy I cheated&quot;* or *&quot;I was over-thinking the puzzle, I'm to smart to have ever guessed that&quot;* and actually feel pleased). For an example of this (in a form) see the monkey island 1/2 remakes. You can hold down a button to get a hint, and repeatedly clicking things (in general) in monkey island games (and many other adventure games) makes the character give subtle hints.&#xD;&#xA;&#xD;&#xA;The trick with that one, is to do it casually and without interrupting play. A simple visual tick could be the lowest hint levels, a sort of inconspicuous action to draw their eyes to something else (sparkles around something they should click, a change to a happier 'successful' tone when they are completing a proper chain of actions or touching the correct area)&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hindsight_bias" />
  <row Id="14797" PostHistoryTypeId="5" PostId="7320" RevisionGUID="1bbfecdd-114e-4eb7-9adf-c9abe0ab16c5" CreationDate="2011-01-13T14:46:41.480" UserId="4129" Comment="added 436 characters in body" Text="It is general wisdom that you redraw the entire viewport on each frame.&#xD;&#xA;&#xD;&#xA;I would like to use partial updates; what are the various ways can do that, and what are their pros, cons and relative performance?&#xD;&#xA;&#xD;&#xA;(Using textures, FBOs, the accumulator buffer, any kind of scissors that can affect swapbuffers etc?)&#xD;&#xA;&#xD;&#xA;A scenario: a scene with a fair few thousand visible trees; although the textures are mipmapped and they are drawn via VBOs roughly front-to-back with so on, its still a lot of polys.  Would streaming a single screen-sized texture be better than throwing them at the screen every frame?  You'd have to redraw and recapture them only on camera movement or as often as your wind model updates or whatever, which need not be every frame." />
  <row Id="14799" PostHistoryTypeId="2" PostId="7376" RevisionGUID="ff2992eb-b37a-40f5-b8c5-044ba7940633" CreationDate="2011-01-13T16:22:08.387" UserId="2414" Text="On the lines of what IQ said, some of the puzzle flash games I played and like implemented a star or coin type progression.&#xD;&#xA;&#xD;&#xA;You need 1 star to unlock level 2, 5 stars to unlock level 3, 7 stars to unlock level 4, etc. etc.&#xD;&#xA;&#xD;&#xA;You get a star for solving a puzzle, and also for completing secondary objectives for each puzzle.  For example, if you beat a puzzle in under a minute, you get a star.  If you beat the puzzle with 85% efficiency, you get a star.  This way, you still have to go rather sequentially through each puzzle, but if you do well enough on the earlier ones, you can &quot;skip&quot; a puzzle that you get stuck on and go to the next.&#xD;&#xA;&#xD;&#xA;Some of it depends on what kind of puzzle game it is, but I've always enjoyed these type of progressions because you can skip puzzles you get stuck on and it adds to replayability of earlier levels you've already beaten.  Especially if you get rewards or bonus levels for getting all the stars on each level." />
  <row Id="14800" PostHistoryTypeId="2" PostId="7377" RevisionGUID="de73f6f5-ac24-42c8-97e6-c9d69ae0f495" CreationDate="2011-01-13T16:27:20.277" UserId="4410" Text="I'd have to agree with JoeW further up, the question seems to be too specific, in that you state you want to solve the performance problem of lots of trees, but the question states only by partial updates and that leaves only to solutions based around that.&#xD;&#xA;&#xD;&#xA;What you don't seem to mention above is any form of LOD on the mesh, just mip-maps for the textures. When I've needed to make sure lots of tree's have to be drawn on screen I'd have at least two polygon mesh LOD's for them and in the distance have that go down to a simple forward facing sprite (we've used a bit of a hybrid solution where we also use [SpeedTree][1] which does pretty much the same thing). I guess it comes down again to where the bottleneck is and until you understand exactly what it is that's slowing it down the most you can't really optimize that area.&#xD;&#xA;&#xD;&#xA;Just in case by FBO you didn't mean [2D Imposters][2] I've also thrown a link in for that. I've not shipped anything using them dynamically myself but I know titles have with success, it all depends how much video memory you have free on your target platform to implement.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.speedtree.com/games/&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/2501/dynamic_2d_imposters_a_simple_.php" />
  <row Id="14801" PostHistoryTypeId="5" PostId="7363" RevisionGUID="2f2ee560-e2b1-48f5-ad02-b511687a3570" CreationDate="2011-01-13T16:32:59.320" UserId="3794" Comment="corrected formulation" Text="Creating a thread for your downloading operation will solve the problem. It means your game will create thread every time that you need download, than thread runs in parallel independently with download and after downloading is done, thread ends. Make thread for every download you need (so they can run in parallel too)." />
  <row Id="14802" PostHistoryTypeId="5" PostId="7370" RevisionGUID="163ed874-72ba-487a-ac42-beb205ad3945" CreationDate="2011-01-13T16:37:44.707" UserId="1502" Comment="typo" Text="The name &quot;Draw&quot; is somewhat misleading. It should better be called &quot;AddToBatch&quot;.&#xD;&#xA;What it actually does is batch your Draw calls. Only when you call ID3DXSprite::Flush or Id3DXSprite::End it fills the sprites into one big vertex buffer and renders that onto the current render target.&#xD;&#xA;&#xD;&#xA;So if you want to switch render targets in between, you will have to do something along these lines (pseudo-code):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Scene-&gt;Begin()&#xD;&#xA;    &#xD;&#xA;    Device-&gt;SetRenderTarget( FirstTarget )&#xD;&#xA;      Sprite-&gt;Begin()&#xD;&#xA;      for each sprite to draw onto first target&#xD;&#xA;        Sprite-&gt;Draw()&#xD;&#xA;      Sprite-&gt;End()&#xD;&#xA;    &#xD;&#xA;    Device-&gt;SetRenderTarget( SecondTarget )&#xD;&#xA;      Sprite-&gt;Begin()&#xD;&#xA;      for each sprite to draw onto second target&#xD;&#xA;        Sprite-&gt;Draw()&#xD;&#xA;      Sprite-&gt;End()&#xD;&#xA;    &#xD;&#xA;    Scene-&gt;End()&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14803" PostHistoryTypeId="5" PostId="7347" RevisionGUID="7a2d0a41-286d-4ebd-8162-fe23f9f15e89" CreationDate="2011-01-13T16:52:37.113" UserId="4443" Comment="Included information given in a comment to increase the accuracy of the response." Text="General rule of thumb for threading an application: 1 thread per CPU Core. On a quad core PC that means 4. As was noted, the XBox 360 however has 3 cores but 2 hardware threads each, so 6 threads in this case. On a system like the PS3... well good luck on that one :) People are still trying to figure it out.&#xD;&#xA;&#xD;&#xA;I would suggest designing each system as a self contained module that you could thread if you wanted. This usually means having very clearly defined communication pathways between the module and the rest of the engine. I particularly like Read-Only processes like Rendering and audio as well as 'are we there yet' processes like reading player input for things to be threaded off. To touch on the answer given by AttackingHobo, when you are rendering 30-60fps, if your data is 1/30th-1/60th of a second out of date it really is not going to detract from the responsive feel of your game. Always remember that the main difference between application software and video games is doing everything 30-60 times a second. On that same note however, input may be one of the things you want to keep on the main thread so the rest can react to it as soon as it appears :)&#xD;&#xA;&#xD;&#xA;If you design your engine's systems well enough any of them can be moved from thread to thread to load balance your engine more appropriately on a per-game basis and the like. In theory you could also use your engine in a distributed system if need be where entirely separate computer systems run each component.&#xD;&#xA;" />
  <row Id="14804" PostHistoryTypeId="25" PostId="7374" RevisionGUID="c078bd98-1e51-4c8d-8644-172d94a04580" CreationDate="2011-01-13T16:55:30.773" Comment="http://twitter.com/#!/StackGameDev/status/25596814379982848" />
  <row Id="14805" PostHistoryTypeId="5" PostId="7373" RevisionGUID="feefd6c3-776f-4591-bbfb-dd47a9aa539f" CreationDate="2011-01-13T17:13:09.673" UserId="4264" Comment="added 818 characters in body" Text="The behavior is UNDEFINED, so if you're going to fill the whole screen anyway, you may consider dropping the clear.. except, on some environments (certain tiling architectures at least), that will actually degrade performance. The full screen clear at the start of rendering is so common operation that I'd be surprised if it wasn't optimized well on all target platforms.&#xD;&#xA;&#xD;&#xA;Reason why it's UNDEFINED is that for many architectures, making the content state defined would be an extra overhead, regardless of how you'd define the standard.&#xD;&#xA;&#xD;&#xA;As to what you'll find there, I can take a guess based on experience;&#xD;&#xA;&#xD;&#xA;On double (or multi-) buffered architectures, like most desktop PC video hardware, you'll likely find the &quot;other&quot; buffer data. This is not guaranteed though, as it's not in the spec, if some weird optimization benefits from it, they will garble the data.&#xD;&#xA;&#xD;&#xA;On tiled architectures, you might find the same data as the last frame, some oddly garbled data based on the tile size, or just about anything else.&#xD;&#xA;&#xD;&#xA;Then you have some oddball architectures (like the NDS) which might give you just about anything, as their definition of the buffer isn't exactly what you'd expect." />
  <row Id="14806" PostHistoryTypeId="2" PostId="7378" RevisionGUID="bed40807-9fe2-4beb-aae3-709d19cb25dc" CreationDate="2011-01-13T17:34:49.287" UserId="4628" Text="I'm not sure of your level of experience, but I would recommend doing it by hand. It may take more effort to learn how to do this, but it is immensely beneficial to know what your matrices are doing and to be able to manipulate them yourself. It will also make you more aware of issues that may crop up when applying matrices in different orders (eg. scaling then rotating). I know I spent many hours trying to figure out weird render &quot;bugs&quot; before deciding my time would be better spent thoroughly studying what each operation was doing. It's worth the investment.&#xD;&#xA;&#xD;&#xA;Addressing your specific issue, applying a transform to the vertices seems like the easiest way, just be aware of the order of operations of matrices." />
  <row Id="14807" PostHistoryTypeId="25" PostId="7350" RevisionGUID="08971566-665b-4dc5-a76a-845bf271121e" CreationDate="2011-01-13T19:55:30.783" Comment="http://twitter.com/#!/StackGameDev/status/25642113253253120" />
  <row Id="14808" PostHistoryTypeId="6" PostId="7346" RevisionGUID="a0d37912-d7f9-4e34-b7b0-220f94eb03d4" CreationDate="2011-01-13T20:00:59.673" UserId="2332" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;optimization&gt;" />
  <row Id="14809" PostHistoryTypeId="2" PostId="7379" RevisionGUID="692064f3-57a0-4f3e-9c15-2731d06448f8" CreationDate="2011-01-13T21:12:08.993" UserId="4602" Text="Inverse kinematics and behaviors ala NaturalMotion." />
  <row Id="14810" PostHistoryTypeId="25" PostId="7362" RevisionGUID="08edb1a2-999b-48c4-a2c6-f9a7c39f48e7" CreationDate="2011-01-13T22:55:30.780" Comment="http://twitter.com/#!/StackGameDev/status/25687410935336960" />
  <row Id="14811" PostHistoryTypeId="2" PostId="7380" RevisionGUID="76238468-9c04-4150-9d0f-4213bbc186dd" CreationDate="2011-01-13T22:56:31.417" UserId="659" Text="Just set up your projection matrix to reverse any offset+scale done by the viewport?" />
  <row Id="14812" PostHistoryTypeId="2" PostId="7381" RevisionGUID="de4aa603-1fc9-4cba-9981-43a29b5f81ea" CreationDate="2011-01-13T22:59:53.847" UserId="1419" Text="It's a bit of an old topic but has some other recent posts, so I'm going to throw in my own voxel library. It's great for creating environment with smooth voxel terrain or 'cubic' environments like Minecraft. Environments can then be modified in real time and it should be easy to integrate with most 3D engines. It's under the zlib license for free for commercial use.&#xD;&#xA;&#xD;&#xA;Have a look at http://www.thermite3d.org for more information." />
  <row Id="14813" PostHistoryTypeId="2" PostId="7382" RevisionGUID="d2cf1083-2244-4486-9f8b-a2b9c41be691" CreationDate="2011-01-14T01:27:24.100" UserId="4638" Text="I am trying to make a simple pong game using opengl-es. I have checked out some of the tutorials/samples, but most of them are pre-dated to 2009.&#xD;&#xA;&#xD;&#xA;I am familiar with game programming, and consider pong to be the hello-world!&#xD;&#xA;&#xD;&#xA;Right now, I intend to make it using their supplied SDK (2.3), but eventually I want to make it in NDK, so I can port my other work to android.&#xD;&#xA;&#xD;&#xA;Would anyone have a good reference for a starting point ?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="14814" PostHistoryTypeId="1" PostId="7382" RevisionGUID="d2cf1083-2244-4486-9f8b-a2b9c41be691" CreationDate="2011-01-14T01:27:24.100" UserId="4638" Text="Make Pong on android using OpenGL-ES" />
  <row Id="14815" PostHistoryTypeId="3" PostId="7382" RevisionGUID="d2cf1083-2244-4486-9f8b-a2b9c41be691" CreationDate="2011-01-14T01:27:24.100" UserId="4638" Text="&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="14816" PostHistoryTypeId="2" PostId="7383" RevisionGUID="2b0388e7-4353-4aba-9c93-db359eeef787" CreationDate="2011-01-14T04:44:41.890" UserId="4116" Text="If you are already familiar with game programming, I would suggest you to get started with studying some source code. Here you can find an Pong for Android with source-code:&#xD;&#xA;http://code.google.com/p/android-pong/&#xD;&#xA;&#xD;&#xA;If you would prefer something like an tutorial, here you go: http://mikeyhogarth.wordpress.com/2010/10/09/how-to-develop-pong-for-android/&#xD;&#xA;&#xD;&#xA;And further I would also recommend you the Android Reference to get started: http://developer.android.com/reference/packages.html&#xD;&#xA;&#xD;&#xA;If you try it and get lost somewhere, you can come back here with more precise questions..." />
  <row Id="14817" PostHistoryTypeId="25" PostId="7334" RevisionGUID="23e23973-92cc-4514-bfda-b7f21dfe7fc5" CreationDate="2011-01-14T04:55:33.140" Comment="http://twitter.com/#!/StackGameDev/status/25778018710458368" />
  <row Id="14818" PostHistoryTypeId="2" PostId="7384" RevisionGUID="2e3b4bb7-1a02-46b0-a16f-67239ca3db3b" CreationDate="2011-01-14T06:29:03.193" UserId="4129" Text="The [Verse Protocol and reference Engine][1] is astonishingly awesome; [check out some discussion of a game made with the engine, and then ... the tools demos][2]!  The tools demos will blow you away....&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.quelsolaar.com/&#xD;&#xA;  [2]: http://vimeo.com/18423305" />
  <row Id="14819" PostHistoryTypeId="2" PostId="7385" RevisionGUID="e09b41f5-5bf4-4037-9444-8600716f2965" CreationDate="2011-01-14T07:00:56.707" UserId="4264" Text="As others have noted, the matrix stack is on its way out, which is a good reason to investigate alternatives. &#xD;&#xA;&#xD;&#xA;On one of my projects, I used the OpenGL's matrix ops to calculate my matrices, but ended up having to use glGet functions to fetch the matrix back so I could do some operations on the matrix that OpenGL's own functions didn't support. The performance was abysmal, and I traced the loss to the single glGet function. It's possible that the matrix ops are actually performed on the GPU somehow, and using glGet caused pipeline flush, or something.&#xD;&#xA;&#xD;&#xA;Whatever the reason, I replaced the matrix operations with &lt;a href=&quot;http://cmldev.net/&quot;&gt;CML&lt;/a&gt;, the configurable math library, and the performance improved dramatically. Not only was I no longer bound to the performance metrics of the OpenGL matrix operations, CML also included tons of operations OpenGL doesn't support.&#xD;&#xA;&#xD;&#xA;And implementing a stack of matrices is pretty easy using STL vector or some such.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14820" PostHistoryTypeId="25" PostId="7273" RevisionGUID="6e7a5e6e-bc05-4ea9-98a7-995af1cf5190" CreationDate="2011-01-14T07:55:33.903" Comment="http://twitter.com/#!/StackGameDev/status/25823319198539777" />
  <row Id="14821" PostHistoryTypeId="2" PostId="7386" RevisionGUID="c641b756-61ba-41a9-b7aa-a16fd983f8ad" CreationDate="2011-01-14T10:08:08.167" UserDisplayName="seenu" Text="refer this tutorial:-  http://www.raywenderlich.com/2343/how-to-drag-and-drop-sprites-with-cocos2d&#xD;&#xA;&#xD;&#xA;this tutorial contains how to scroll the view and with uipanrecogniser. &#xD;&#xA;&#xD;&#xA;this will helps ." />
  <row Id="14823" PostHistoryTypeId="2" PostId="7388" RevisionGUID="63b24f05-7d8d-4f51-b97e-74186138427b" CreationDate="2011-01-14T10:53:08.000" UserId="4264" Text="I won't refer to any specific formats, but here's points for your &quot;yea or nay&quot; question: &#xD;&#xA;&#xD;&#xA;**Reasons to use custom formats:**&#xD;&#xA;&#xD;&#xA; - Speed up loading of your game&#xD;&#xA;   - Can do all preprocessing your heart desires and store the results&#xD;&#xA; - Support for features not in generic formats&#xD;&#xA; - Doesn't include anything you don't want to&#xD;&#xA;   - .3ds, for instance, has tons of stuff you'll never need, but will add to your binary size&#xD;&#xA; - Slow down or stop content alteration / stealing &#xD;&#xA;   - Some consider this a plus, ymmv.&#xD;&#xA;&#xD;&#xA;**Reasons to use generic formats:**&#xD;&#xA;&#xD;&#xA; - Support built-in in modelling packages&#xD;&#xA;   - Be careful to test the actual support though. The actual quality of COLLADA support varies from one package to the next, for instance. Most formats supported by Blender don't include bones, even if the format would support them, etc.&#xD;&#xA; - Can (possibly) use existing loading code made by other people&#xD;&#xA; - No need for additional build step (conversion from generic format, preprocessing) or custom exporters&#xD;&#xA;   - Supporting custom exporters can be a huge pain" />
  <row Id="14824" PostHistoryTypeId="25" PostId="7285" RevisionGUID="94aaa06d-caa4-410d-905b-fb64d259ab64" CreationDate="2011-01-14T10:55:33.990" Comment="http://twitter.com/#!/StackGameDev/status/25868618382188545" />
  <row Id="14825" PostHistoryTypeId="2" PostId="7389" RevisionGUID="9e269cf2-4d2e-4754-9315-50ce5c13e459" CreationDate="2011-01-14T11:08:22.707" UserId="3232" Text="The main problem that I see is that you need to access the results for other game tasks and acessing those results can be complicated and slow.&#xD;&#xA;&#xD;&#xA;Thats why I prefer to do those matrix operations myself.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14829" PostHistoryTypeId="2" PostId="7391" RevisionGUID="b915e3ac-3c38-4815-b9ee-99ce4b9800c4" CreationDate="2011-01-14T13:28:14.543" UserId="3656" Text="I pulled some audio gems from my memory with help from [Wikipedia][1].&#xD;&#xA;&#xD;&#xA;- [Ardour (OS X, Linux)][2] - DAW&#xD;&#xA;- [RoseGarden][6] - DAW&#xD;&#xA;- [Linux MuliMedia Studio][3] - FLOSS FL Studio clone&#xD;&#xA;- [PureData][4] - FLOSS alternative to Max/MSP. Good for prototyping audio effects and - - dynamic music systems. Spore devs used this for generative music&#xD;&#xA;- [OpenMPT (ModPlug)][5] - Tracker, useful for music on phones&#xD;&#xA;- [Spear][7] - Spectrum analyzer and more&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_free_audio_software&#xD;&#xA;  [2]: http://ardour.org/&#xD;&#xA;  [3]: http://lmms.sourceforge.net/&#xD;&#xA;  [4]: http://puredata.info/&#xD;&#xA;  [5]: http://openmpt.org/&#xD;&#xA;  [6]: http://www.rosegardenmusic.com/&#xD;&#xA;  [7]: http://www.klingbeil.com/spear/" />
  <row Id="14832" PostHistoryTypeId="2" PostId="7392" RevisionGUID="b298b5f6-9d89-467e-aa8b-07274b375ba6" CreationDate="2011-01-14T16:38:11.897" UserId="4654" Text="*(Note : This question is being transfered from stackoverflow to gamedev.stackexchange where it belongs)*&#xD;&#xA;&#xD;&#xA;I really suck at graphics / music / 3D modeling / animation and it's a must-have when you have a hundred hobby game development projects you're working on. I'm looking for different quality sources on the web that provide **free** resources.&#xD;&#xA;&#xD;&#xA;**[EDIT]**&#xD;&#xA;Some resources given by the answers, in **bold** the biggest resource per section:&#xD;&#xA;&#xD;&#xA;**MODELS** &#xD;&#xA;&#xD;&#xA; - **[TurboSquid][11]**&#xD;&#xA; - [archive3d][10]&#xD;&#xA; - [3Dvia][12]&#xD;&#xA; - [Google Sketchup][13]&#xD;&#xA; - [ShareCG][14]&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**SPRITES**&#xD;&#xA; &#xD;&#xA; - **[OpenGameArt][7]** (also contains textures and 3D models)&#xD;&#xA; - [LostGarden][4] (a couple of *isometric* tilesets)&#xD;&#xA; - [The Protagonist Domain][5] (2 sprite sets)&#xD;&#xA; - [Reiner's Tilesets][6] (also contains a couple of 3D models)&#xD;&#xA; - [Flying Yogi][8] (3 sprite sets)&#xD;&#xA; - [Has Graphics][21] (a couple of links to tile sets)&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**ANIMATED SPRITES** &#xD;&#xA;&#xD;&#xA; - **[The Spriters Resource][9]** (mostly sprites from released games)&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**CLIPART / VECTOR BASED** &#xD;&#xA;&#xD;&#xA; - **[Clker][22]**&#xD;&#xA; - [OpenClipArt][23]&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**PHOTOS** &#xD;&#xA;&#xD;&#xA; - **[EveryStockPhoto][24]**&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**TEXTURES**&#xD;&#xA;&#xD;&#xA; - **[CG Textures][17]**&#xD;&#xA; - [OpenFrag][18]&#xD;&#xA; &#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**MUSIC**&#xD;&#xA;&#xD;&#xA; - **[Jamendo][1]**&#xD;&#xA; - [OpSound][20]&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**SOUND EFFECTS**&#xD;&#xA;&#xD;&#xA; - **[FreeSound][2]**&#xD;&#xA; - [StoneWashed][3]&#xD;&#xA; - [MySoundFx][25]&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**OTHER PRECOMPILED LISTS**&#xD;&#xA;&#xD;&#xA; - **[FreeGameDev.net][19]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jamendo.com&#xD;&#xA;  [2]: http://www.freesound.org/&#xD;&#xA;  [3]: http://www.stonewashed.net/sfx.html&#xD;&#xA;  [4]: http://lostgarden.com/labels/free%20game%20graphics.html&#xD;&#xA;  [5]: http://www.freewebs.com/teh_pro/sprites.htm&#xD;&#xA;  [6]: http://reinerstileset.4players.de/englisch.html&#xD;&#xA;  [7]: http://opengameart.org/&#xD;&#xA;  [8]: http://www.flyingyogi.com/fun/spritelib.html&#xD;&#xA;  [9]: http://www.spriters-resource.com/&#xD;&#xA;  [10]: http://archive3d.net&#xD;&#xA;  [11]: http://www.turbosquid.com/&#xD;&#xA;  [12]: http://www.3dvia.com/&#xD;&#xA;  [13]: http://sketchup.google.com/3dwarehouse/&#xD;&#xA;  [14]: http://www.sharecg.com&#xD;&#xA;  [15]: http://www.gamasutraexchange.com&#xD;&#xA;  [16]: http://www.turbosquid.com/&#xD;&#xA;  [17]: http://cgtextures.com/&#xD;&#xA;  [18]: http://openfrag.org/&#xD;&#xA;  [19]: http://wiki.freegamedev.net/index.php/Free_3D_and_2D_art_and_audio_resources&#xD;&#xA;  [20]: http://www.opsound.org/index.php&#xD;&#xA;  [21]: http://www.hasgraphics.com&#xD;&#xA;  [22]: http://www.clker.com/&#xD;&#xA;  [23]: http://www.openclipart.org/&#xD;&#xA;  [24]: http://www.everystockphoto.com/&#xD;&#xA;  [25]: http://www.mysoundfx.com" />
  <row Id="14833" PostHistoryTypeId="1" PostId="7392" RevisionGUID="b298b5f6-9d89-467e-aa8b-07274b375ba6" CreationDate="2011-01-14T16:38:11.897" UserId="4654" Text="What are good sites that provide free media resources for hobby game development?" />
  <row Id="14834" PostHistoryTypeId="3" PostId="7392" RevisionGUID="b298b5f6-9d89-467e-aa8b-07274b375ba6" CreationDate="2011-01-14T16:38:11.897" UserId="4654" Text="&lt;resources&gt;&lt;free&gt;" />
  <row Id="14835" PostHistoryTypeId="25" PostId="7257" RevisionGUID="0354c849-2a3c-46e0-8689-57d279d75697" CreationDate="2011-01-14T16:55:33.750" Comment="http://twitter.com/#!/StackGameDev/status/25959214300004352" />
  <row Id="14836" PostHistoryTypeId="2" PostId="7393" RevisionGUID="8790c7e7-c1eb-44f7-926c-97b04f2efc2a" CreationDate="2011-01-14T17:13:53.740" UserId="2853" Text="Let me get this out there before anything else: this is a learning exercise for me. I am not a game developer by trade or hobby (at least, not seriously) and am purely delving into some AI- and 3D-related topics to broaden my horizons a bit.&#xD;&#xA;&#xD;&#xA;As part of the learning experience, I thought I'd have a go at developing a basic card game AI.  I selected [Pit][1] as the card game I was going to attempt to emulate (specifically, the 'bull and bear' variation of the game as mentioned in the link above).  Unfortunately, the rule-set that I'm used to playing with (an older version of the game) isn't described.  The basics of it are:&#xD;&#xA;&#xD;&#xA; - The number of commodities played with is equal to the number of players.&#xD;&#xA; - The bull and bear cards are included.&#xD;&#xA; - All but two players receive 8 cards, two receive 9 cards.&#xD;&#xA; - A player can win the round with 7 + bull, 8, or 8 + bull (receiving double points).&#xD;&#xA; - The bear is a penalty card.&#xD;&#xA; - You can trade up to a maximum of 4 cards at a time.  They must all be of the same type, but can optionally include the bull or bear (so, you could trade A, A, A, Bull - but not A, B, A, Bull).&#xD;&#xA;&#xD;&#xA;For those who have played the card game, it will probably have been as obvious to you as it was to me that given the nature of the game, gameplay would seem to resemble a greedy algorithm.  With this in mind, I thought it might simplify my AI experience somewhat.&#xD;&#xA;&#xD;&#xA;So, here's what I've come up with for a basic AI player to play Pit... and I'd really just like any form of suggestion (from improvements to reading materials) relating to it.&#xD;&#xA;&#xD;&#xA;Here it is in something vaguely pseudo-code-ish ;)&#xD;&#xA;&#xD;&#xA;    While AI does not hold 7 similar + bull, 8 similar, or 8 similar + bull, do:&#xD;&#xA;        1. Establish 'target' hand, by seeing which card AI holds the most of.&#xD;&#xA;        2. Prepare to trade next-most-numerous card type in a trade (max. held, or 4, whichever is fewer)&#xD;&#xA;        3. If holding the bear, add to (if trading &lt;=3 cards) or replace in (if trading 4 cards) hand.&#xD;&#xA;        4. Offer cards for trade.&#xD;&#xA;        5. If cards are accepted for trade within X turns, continue (clearing 'failed card types').&#xD;&#xA;            Otherwise:&#xD;&#xA;                a. If only one card remains in the trade, go to #6.&#xD;&#xA;                    Otherwise:&#xD;&#xA;                        i. Remove one non-penalty card from the trade.&#xD;&#xA;                        ii. Return to #5.&#xD;&#xA;        6. Add card type to temporary list of failed card types.&#xD;&#xA;        7. Repeat from #2 (excluding 'failed card types').&#xD;&#xA;&#xD;&#xA;I'm aware this is likely to be a sub-optimal way of solving the problem, but that's why I'm posting this question.  Are there any AI- or algorithm-related concepts that I've missed and should be incorporating to make a better AI?  Additionally, what are the flaws with my AI at present (I'm well aware it's probably far from complete)?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pit_(game)" />
  <row Id="14837" PostHistoryTypeId="1" PostId="7393" RevisionGUID="8790c7e7-c1eb-44f7-926c-97b04f2efc2a" CreationDate="2011-01-14T17:13:53.740" UserId="2853" Text="How Can I Improve This Card-Game AI?" />
  <row Id="14838" PostHistoryTypeId="3" PostId="7393" RevisionGUID="8790c7e7-c1eb-44f7-926c-97b04f2efc2a" CreationDate="2011-01-14T17:13:53.740" UserId="2853" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;card-game&gt;" />
  <row Id="14839" PostHistoryTypeId="2" PostId="7394" RevisionGUID="deea3173-6388-4b26-87f9-a5f464ccfb0e" CreationDate="2011-01-14T17:19:59.727" UserId="4656" Text="A while ago, I picked up a copy of the OpenGL SuperBible fifth edition and slowly and painfully started teaching myself OpenGL the 3.3 way, after having been used to the 1.0 way from school way back when. Making things more challenging, I am primarily a .NET developer, so I was working in Mono with the OpenTK OpenGL wrapper. On my laptop, I put together a program that let the user walk around a simple landscape using a couple shaders that implemented per-vertex coloring and lighting and texture mapping. Everything was working brilliantly until I ran the same program on my desktop. &#xD;&#xA;&#xD;&#xA;Disaster! Nothing would render! I have chopped my program down to the point where the camera sits near the origin, pointing at the origin, and renders a square (technically, a triangle fan). The quad renders perfectly on my laptop, coloring, lighting, texturing and all, but the desktop renders a small distorted non-square quadrilateral that is colored incorrectly, not affected by the lights, and not textured. &#xD;&#xA;&#xD;&#xA;I suspect the graphics card is at fault, because I get the same result whether I am booted into Ubuntu 10.10 or Win XP. I did find that if I pare the vertex shader down to ONLY outputting the positional data and the fragment shader to ONLY outputting a solid color (white) the quad renders correctly. But as SOON as I start passing in color data (whether or not I use it in the fragment shader) the output from the vertex shader is distorted again. The shaders follow. I left the pre-existing code in, but commented out so you can get an idea what I was trying to do. I'm a noob at glsl so the code could probably be a lot better.&#xD;&#xA;&#xD;&#xA;My laptop is an old lenovo T61p with a Centrino (Core 2) Duo and an nVidia Quadro graphics card running Ubuntu 10.10 My desktop has an i7 with a Radeon HD 4850 x2 (single card, dual GPU) from Saphire dual booting into Ubuntu 10.10 and Windows XP. The problem occurs in both XP and Ubuntu.&#xD;&#xA;&#xD;&#xA;Can anyone see something wrong that I am missing? What is &quot;special&quot; about my HD 4850x2?&#xD;&#xA;&#xD;&#xA;    string vertexShaderSource = @&quot;&#xD;&#xA;    #version 330&#xD;&#xA;    &#xD;&#xA;    precision highp float;&#xD;&#xA;    &#xD;&#xA;    uniform mat4 projection_matrix;&#xD;&#xA;    uniform mat4 modelview_matrix;&#xD;&#xA;    //uniform mat4 normal_matrix;&#xD;&#xA;    //uniform mat4 cmv_matrix;  //Camera modelview.  Light sources are transformed by this matrix.&#xD;&#xA;    //uniform vec3 ambient_color;&#xD;&#xA;    //uniform vec3 diffuse_color;&#xD;&#xA;    //uniform vec3 diffuse_direction;&#xD;&#xA;    &#xD;&#xA;    in vec4 in_position;&#xD;&#xA;    in vec4 in_color;&#xD;&#xA;    //in vec3 in_normal;&#xD;&#xA;    //in vec3 in_tex_coords;&#xD;&#xA;    &#xD;&#xA;    out vec4 varyingColor;&#xD;&#xA;    //out vec3 varyingTexCoords; &#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;      //Get surface normal in eye coordinates&#xD;&#xA;      //vec4 vEyeNormal = normal_matrix * vec4(in_normal, 0);&#xD;&#xA;    &#xD;&#xA;      //Get vertex position in eye coordinates&#xD;&#xA;      //vec4 vPosition4 = modelview_matrix * vec4(in_position, 0);&#xD;&#xA;      //vec3 vPosition3 = vPosition4.xyz / vPosition4.w;&#xD;&#xA;    &#xD;&#xA;      //Get vector to light source in eye coordinates&#xD;&#xA;      //vec3 lightVecNormalized = normalize(diffuse_direction);&#xD;&#xA;      //vec3 vLightDir = normalize((cmv_matrix * vec4(lightVecNormalized, 0)).xyz);&#xD;&#xA;    &#xD;&#xA;      //Dot product gives us diffuse intensity&#xD;&#xA;      //float diff = max(0.0, dot(vEyeNormal.xyz, vLightDir.xyz));&#xD;&#xA;    &#xD;&#xA;      //Multiply intensity by diffuse color, force alpha to 1.0&#xD;&#xA;      //varyingColor.xyz = in_color * diff * diffuse_color.xyz;&#xD;&#xA;      varyingColor = in_color;&#xD;&#xA;    &#xD;&#xA;      //varyingTexCoords = in_tex_coords;&#xD;&#xA;      gl_Position = projection_matrix * modelview_matrix * in_position;&#xD;&#xA;    }&quot;;&#xD;&#xA;    &#xD;&#xA;            string fragmentShaderSource = @&quot;&#xD;&#xA;    #version 330&#xD;&#xA;    //#extension GL_EXT_gpu_shader4 : enable&#xD;&#xA;    &#xD;&#xA;    precision highp float;&#xD;&#xA;    &#xD;&#xA;    //uniform sampler2DArray colorMap;&#xD;&#xA;    &#xD;&#xA;    //in vec4 varyingColor;&#xD;&#xA;    //in vec3 varyingTexCoords;&#xD;&#xA;    &#xD;&#xA;    out vec4 out_frag_color;&#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;      out_frag_color = vec4(1,1,1,1);&#xD;&#xA;      //out_frag_color = varyingColor;&#xD;&#xA;      //out_frag_color = vec4(varyingColor, 1) * texture(colorMap, varyingTexCoords.st);&#xD;&#xA;      //out_frag_color = vec4(varyingColor, 1) * texture(colorMap, vec3(varyingTexCoords.st, 0));&#xD;&#xA;      //out_frag_color = vec4(varyingColor, 1) * texture2DArray(colorMap, varyingTexCoords);&#xD;&#xA;    }&quot;;&#xD;&#xA;&#xD;&#xA;Note that in this code the color data is accepted but not actually used. The geometry is outputted the same (wrong) whether the fragment shader uses varyingColor or not. Only if I comment out the line varyingColor = in_color; does the geometry output correctly. Originally the shaders took in vec3 inputs, I only modified them to take vec4s while troubleshooting." />
  <row Id="14840" PostHistoryTypeId="1" PostId="7394" RevisionGUID="deea3173-6388-4b26-87f9-a5f464ccfb0e" CreationDate="2011-01-14T17:19:59.727" UserId="4656" Text="OpenGL 3 and the Radeon HD 4850x2" />
  <row Id="14841" PostHistoryTypeId="3" PostId="7394" RevisionGUID="deea3173-6388-4b26-87f9-a5f464ccfb0e" CreationDate="2011-01-14T17:19:59.727" UserId="4656" Text="&lt;opengl&gt;&lt;.net&gt;&lt;glsl&gt;&lt;mono&gt;" />
  <row Id="14842" PostHistoryTypeId="10" PostId="7392" RevisionGUID="0401a41f-c021-4aab-a814-486d6fc53fd4" CreationDate="2011-01-14T17:20:43.860" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="14843" PostHistoryTypeId="2" PostId="7395" RevisionGUID="0c02f199-14fa-46ea-a5d4-bbc8b92ada0e" CreationDate="2011-01-14T17:42:14.123" UserDisplayName="Norla" Text="I would like to try my hand at creating a custom map in Starcraft 2 that has a third-person camera follow an individual unit.  There are a few custom maps that exist with this feature already, so I do know this is possible.&#xD;&#xA;&#xD;&#xA;What I'm having trouble wrapping my head around are the features that are new to the SC2 map editor that didn't exist in the Warcraft 3 editor.  For instance, to do a third-person map, do I need a custom mods file, or can everything be done in the map file?  Regardless, is it worth using a mod file?  What map settings do I NEED to edit/implement?  Which are not necessary, but recommended?" />
  <row Id="14844" PostHistoryTypeId="1" PostId="7395" RevisionGUID="0c02f199-14fa-46ea-a5d4-bbc8b92ada0e" CreationDate="2011-01-14T17:42:14.123" UserDisplayName="Norla" Text="Starcraft 2 - Third Person Custom Map" />
  <row Id="14845" PostHistoryTypeId="3" PostId="7395" RevisionGUID="0c02f199-14fa-46ea-a5d4-bbc8b92ada0e" CreationDate="2011-01-14T17:42:14.123" UserDisplayName="Norla" Text="&lt;starcraft-2&gt;&lt;third-person-view&gt;&lt;map-editor&gt;" />
  <row Id="14846" PostHistoryTypeId="17" PostId="7395" RevisionGUID="bfcf7c9b-608d-4bce-accc-adca1e6d7436" CreationDate="2011-01-14T17:43:55.787" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/14597/starcraft-2-third-person-custom-map" Text="" />
  <row Id="14847" PostHistoryTypeId="2" PostId="7396" RevisionGUID="a7088971-8998-4bf2-92f0-8414e9440b80" CreationDate="2011-01-14T18:08:21.227" UserId="1189" Text="I want make a game similar to &lt;a href=&quot;http://www.blitwise.com/ptanks.html&quot;&gt;Pocket Tanks&lt;/a&gt; but for Android and then sell it. Since I am not directly copying anything from Pocket Tanks, but simply using it to give me ideas, I should be allowed to make it. I don't want to finish making my game and then get into some legal trouble, so I wanted to ask here if its allowed. If this is the wrong place to ask, can you tell me where I could ask this question?" />
  <row Id="14848" PostHistoryTypeId="1" PostId="7396" RevisionGUID="a7088971-8998-4bf2-92f0-8414e9440b80" CreationDate="2011-01-14T18:08:21.227" UserId="1189" Text="Can I Base My Game on Another Game and Earn Money?" />
  <row Id="14849" PostHistoryTypeId="3" PostId="7396" RevisionGUID="a7088971-8998-4bf2-92f0-8414e9440b80" CreationDate="2011-01-14T18:08:21.227" UserId="1189" Text="&lt;legal&gt;" />
  <row Id="14850" PostHistoryTypeId="2" PostId="7397" RevisionGUID="d06481dc-07bb-4a7d-b343-b2dfbb62d45a" CreationDate="2011-01-14T18:11:46.590" UserId="4657" Text="Here's something that I try to follow when programming AIs.&#xD;&#xA;&#xD;&#xA;Create a set of &quot;personalities&quot;, that is, ways in which you might expect the computer player to act.  Have their actions conform to these.  For instance, in a card game, you might have 3 personalities: aggressive, defensive and moderate.&#xD;&#xA;&#xD;&#xA;Next, when it gets to the computer player's turn, randomly choose an action that conforms to the player's personality, and make sure the action is also in a list of sensible things to do.&#xD;&#xA;&#xD;&#xA;So the logic comes down to this:&#xD;&#xA;&#xD;&#xA;1- Based on the situation, what is a list of sensible actions to take?&#xD;&#xA;&#xD;&#xA;2- Based on my personality, what actions from the above list would I choose?&#xD;&#xA;&#xD;&#xA;3- Randomly choose one of these, then do it!" />
  <row Id="14851" PostHistoryTypeId="2" PostId="7398" RevisionGUID="f578913e-1335-4132-ac74-3a6b8438b04c" CreationDate="2011-01-14T18:15:27.070" UserId="4657" Text="If you search around a bit, you can find a bunch of games that are also much like Pocket Tanks.  For instance, just Google &quot;Scorched Earth game&quot;.&#xD;&#xA;&#xD;&#xA;Find these other games, then determine how they differ from Pocket Tanks.  Then, make sure that your game is at least that different.&#xD;&#xA;&#xD;&#xA;There's no way to know what kind of legal issues may arise.  The best you can do is as much as possible to make your software different." />
  <row Id="14852" PostHistoryTypeId="10" PostId="7396" RevisionGUID="02437ef4-2998-4539-ac24-3545cece6783" CreationDate="2011-01-14T18:15:32.777" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="14853" PostHistoryTypeId="5" PostId="7396" RevisionGUID="1a249a0e-a0c9-4b5e-8668-10eed0a53fcb" CreationDate="2011-01-14T18:15:32.950" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How closely can a game resemble another game without legal problems](http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I want make a game similar to &lt;a href=&quot;http://www.blitwise.com/ptanks.html&quot;&gt;Pocket Tanks&lt;/a&gt; but for Android and then sell it. Since I am not directly copying anything from Pocket Tanks, but simply using it to give me ideas, I should be allowed to make it. I don't want to finish making my game and then get into some legal trouble, so I wanted to ask here if its allowed. If this is the wrong place to ask, can you tell me where I could ask this question?" />
  <row Id="14854" PostHistoryTypeId="2" PostId="7399" RevisionGUID="869b46e0-551e-491b-be66-6cfce422fa6e" CreationDate="2011-01-14T18:49:15.307" UserDisplayName="JustChris" Text="There are data structures in meshes that work best for development and others that are more optimal for loading. In the development phase generic formats can speed up production and creation of assets. &#xD;&#xA;&#xD;&#xA;In the final stages of development closer to completion, start optimizing for load times. When all your assets are final use a custom-made mesh exporter to convert your meshes off-line, and use those converted meshes for the final game.&#xD;&#xA;&#xD;&#xA;A mesh file that is most optimized for fast loads would have its data aligned exactly as it is in whatever kind of vertex buffer you use in your API. It would be a simple copy operation and it's done." />
  <row Id="14855" PostHistoryTypeId="2" PostId="7400" RevisionGUID="32f2afd7-e4ac-450c-b837-f785038100e1" CreationDate="2011-01-14T19:35:33.337" UserId="539" Text="I came across some tools for 2D game development recently that I find quite exciting:&#xD;&#xA;&#xD;&#xA;  * [SWFSheet](http://www.bit-101.com/blog/?p=2948) converts a SWF created in Flash (including animations created using Actionscript) into a spritesheet or series of sprites&#xD;&#xA;  * [Zwoptex](http://zwoptexapp.com/) packs a series of sprites into a spritesheet and emits metadata about their position&#xD;&#xA;  * [Texture Packer](http://texturepacker.com/) is an alternative program which does the same&#xD;&#xA;&#xD;&#xA;Personally, I think the Flash authoring tools are amazing and dearly miss them when I work in XNA or Java. Which is why I'm excited about giving the above a spin." />
  <row Id="14856" PostHistoryTypeId="25" PostId="7393" RevisionGUID="b4a75fec-4e70-451f-aef1-7c2b8923b1c4" CreationDate="2011-01-14T19:55:33.933" Comment="http://twitter.com/#!/StackGameDev/status/26004514041499648" />
  <row Id="14857" PostHistoryTypeId="2" PostId="7401" RevisionGUID="f6d6fa27-bdbf-4dbd-a0ae-123819435b9b" CreationDate="2011-01-14T20:55:28.770" UserId="4469" Text="Well during this week I have deciding about implementation of my entity system. It is a big topic so it has been difficult to take one option from the whole. This has been my decision:&#xD;&#xA;&#xD;&#xA;1) I don't have an entity class it is just an id.&#xD;&#xA;&#xD;&#xA;2) I have systems that contain a list of components (the list is homegenous, I mean, RenderSystem will just have RenderComponents).&#xD;&#xA;&#xD;&#xA;3) Compones will be just data.&#xD;&#xA;&#xD;&#xA;4) There would be some kind of &quot;entity prototypes&quot; in a manager or something from we will create entity instances.Ideally they will define the type of components it has and initialization data.&#xD;&#xA;&#xD;&#xA;5) Prototype code to create an entity (this is from the top of my head):&#xD;&#xA;&#xD;&#xA;    int id=World::getInstance()-&gt;createEntity(&quot;entity template&quot;);&#xD;&#xA;&#xD;&#xA;6) This will notify all systems that a new entity has been created, and if the entity needs a component that the system handles it will add it to the entity.&#xD;&#xA;&#xD;&#xA;Ok, this are the ideas. Let's see if some can help with the problems:&#xD;&#xA;&#xD;&#xA;1) The main problem is this templates that are sent to the systems in creation process to populate the entity with needed components. What would you use, an OR(ed) int?, a list of strings?.&#xD;&#xA;&#xD;&#xA;2) How to do initialization for components when the entity has been created? How to store this in the template? I have thought about having a function in the template that is virtual and after entity is created an populated, gets the components and sets initialization values.&#xD;&#xA;&#xD;&#xA;3) Don't you think this is a lot of work for just an entity creation?.&#xD;&#xA;&#xD;&#xA;Sorry for the long post, I have tried to expose my ideas and finding in order other could have a start beside exposing my problems.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;Notbad.&#xD;&#xA;" />
  <row Id="14858" PostHistoryTypeId="1" PostId="7401" RevisionGUID="f6d6fa27-bdbf-4dbd-a0ae-123819435b9b" CreationDate="2011-01-14T20:55:28.770" UserId="4469" Text="Implementing my Entity System. Questions about some problems I have found." />
  <row Id="14859" PostHistoryTypeId="3" PostId="7401" RevisionGUID="f6d6fa27-bdbf-4dbd-a0ae-123819435b9b" CreationDate="2011-01-14T20:55:28.770" UserId="4469" Text="&lt;architecture&gt;" />
  <row Id="14860" PostHistoryTypeId="2" PostId="7402" RevisionGUID="4971648c-f543-499f-9c68-7aae3e12fa01" CreationDate="2011-01-14T18:15:42.060" UserDisplayName="Ogapo" Text="I am working on a Windows game and while rendering, some computers will experience intermittent pauses (&quot;hitches&quot; for lack of a better term). When profiled they appear in seemingly random places in the code. Eventually I noticed that it wasn't just my process that was affected, but (seemingly) every process on the system. All of the threads in my application hitch at once. The CPU utilization drops during these hitches and it appears as if most processes make no progress.&#xD;&#xA;&#xD;&#xA;This leads me to believe this may be an Operating System or Driver issue, but it only occurs while playing the game (and only on some systems). What sort of operations might the operating system be doing that would require the kernel to pause all user threads and block. Some kind of I/O? At first I thought of paging but my impression is that would only affect a single process, no?&#xD;&#xA;&#xD;&#xA;Some systems in use: Windows, DirectX (3d), nVidia cards (unknown if replicates on ATI), using overlapped io for streaming" />
  <row Id="14861" PostHistoryTypeId="1" PostId="7402" RevisionGUID="4971648c-f543-499f-9c68-7aae3e12fa01" CreationDate="2011-01-14T18:15:42.060" UserDisplayName="Ogapo" Text="What sort of things can cause a whole system to appear to hang for 100s-1000s of milliseconds?" />
  <row Id="14862" PostHistoryTypeId="3" PostId="7402" RevisionGUID="4971648c-f543-499f-9c68-7aae3e12fa01" CreationDate="2011-01-14T18:15:42.060" UserDisplayName="Ogapo" Text="&lt;directx&gt;" />
  <row Id="14863" PostHistoryTypeId="17" PostId="7402" RevisionGUID="6513ed2e-318e-4f8e-a53c-4f4eaa525a9c" CreationDate="2011-01-14T20:56:27.630" UserId="-1" Comment="from http://superuser.com/questions/233345/what-sort-of-things-can-cause-a-whole-system-to-appear-to-hang-for-100s-1000s-of" Text="" />
  <row Id="14865" PostHistoryTypeId="2" PostId="7404" RevisionGUID="56e9ebc9-637a-444d-999e-ba897985e2a3" CreationDate="2011-01-14T21:31:57.073" UserId="953" Text="What you've got there is a basic rules-based system.  It's fine, but it will play the same way every time and possibly have exploitable patterns of play.  The domain's simple enough that there might not be an easy pattern to exploit, but it's not a very interesting approach. :)&#xD;&#xA;&#xD;&#xA;You may want to look into planning AIs.  Instead of defining an algorithm for play, you can code the AI with the steps it can take: how to trade and what the consequences are for it.  These are sometimes called &quot;inference rules.&quot;  Then you use forward or backward chaining to figure out a sequence of actions from the current state to the goal state.&#xD;&#xA;&#xD;&#xA;Alternately, if you think you can define a good heuristic for how close you are to winning, you can use an adversarial approach like alpha-beta pruning search that allows the AI to take the state of the opponents into account.  I'd guess that a good heuristic would include what the AI can know about its opponents' hands based on their previous trades.&#xD;&#xA;&#xD;&#xA;I'm sure there are approaches that an AI expert would think of that I've missed." />
  <row Id="14866" PostHistoryTypeId="2" PostId="7405" RevisionGUID="2c723a8b-53ae-412a-ba2a-820871efb919" CreationDate="2011-01-14T21:53:36.700" UserId="916" Text="I'm having problems making a simple sprite rendering. I load 2 different textures. Then, I bind these textures and draw 2 squares, one with each texture. But only the texture of the first rendered object is drawn in both squares. Its like if I'd only use a texture or as if glBindTexture don't work properly. I know that GL is a state machine, but I think that you only need to change active texture with glBindTexture. &#xD;&#xA;&#xD;&#xA;I load texture with this method:&#xD;&#xA;&#xD;&#xA;     bool CTexture::generate( utils::CImageBuff* img )&#xD;&#xA;     { &#xD;&#xA;      assert(img);&#xD;&#xA;      m_image = img;&#xD;&#xA;      CHECKGL(glGenTextures(1,&amp;m_textureID));&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBindTexture(GL_TEXTURE_2D,m_textureID));&#xD;&#xA;      CHECKGL(glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR));&#xD;&#xA;      CHECKGL(glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR));&#xD;&#xA;      //CHECKGL(glTexImage2D(GL_TEXTURE_2D,0,img-&gt;getBpp(),img-&gt;getWitdh(),img-&gt;getHeight(),0,img-&gt;getFormat(),GL_UNSIGNED_BYTE,img-&gt;getImgData()));&#xD;&#xA;      CHECKGL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img-&gt;getWitdh(), img-&gt;getHeight(),&#xD;&#xA;       0, GL_RGBA, GL_UNSIGNED_BYTE, img-&gt;getImgData()));&#xD;&#xA;    &#xD;&#xA;      return true;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;And I bind textures with this function:&#xD;&#xA;&#xD;&#xA;    void CTexture::bind()&#xD;&#xA;     {&#xD;&#xA;      CHECKGL(glBindTexture(GL_TEXTURE_2D,m_textureID));&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Also, I draw sprites with this method&#xD;&#xA;&#xD;&#xA;    void CSprite2D::render()&#xD;&#xA;     {&#xD;&#xA;      CHECKGL(glLoadIdentity());&#xD;&#xA;      CHECKGL(glEnable(GL_TEXTURE_2D));&#xD;&#xA;      CHECKGL(glEnable(GL_BLEND));&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));&#xD;&#xA;      m_texture-&gt;bind();&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glPushMatrix());&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBegin(GL_QUADS));&#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaStart.s,m_textureAreaStart.t)); // 0,0 by default&#xD;&#xA;      CHECKGL(glVertex3i(m_position.x,m_position.y,0));&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaEnd.s,m_textureAreaStart.t)); // 1,0 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y, 0)); &#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaEnd.s, m_textureAreaEnd.t)); // 1,1 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y + m_dimensions.y, 0));  &#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaStart.s, m_textureAreaEnd.t));  // 0,1 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x, m_position.y + m_dimensions.y,0));&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glPopMatrix());&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glDisable(GL_BLEND));&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Could you help me? All help is welcome.&#xD;&#xA;&#xD;&#xA;Thanks!!&#xD;&#xA;" />
  <row Id="14867" PostHistoryTypeId="1" PostId="7405" RevisionGUID="2c723a8b-53ae-412a-ba2a-820871efb919" CreationDate="2011-01-14T21:53:36.700" UserId="916" Text="Problem texturing with opengl" />
  <row Id="14868" PostHistoryTypeId="3" PostId="7405" RevisionGUID="2c723a8b-53ae-412a-ba2a-820871efb919" CreationDate="2011-01-14T21:53:36.700" UserId="916" Text="&lt;c++&gt;&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="14869" PostHistoryTypeId="2" PostId="7406" RevisionGUID="4203e8a2-5c63-4410-9172-b811e188a420" CreationDate="2011-01-14T22:01:49.623" UserId="4443" Text="Hey again NotBad, lets see if I can give you a hand again :)&#xD;&#xA;&#xD;&#xA;1) I would use XML or something similar to it. The language has a built in nesting capability that can easily match up with a component based system. Again, this is just for the template objects :) You may then want to take the XML file and parse it into some smaller internal representation for the components that make up the object as a whole, but if you include default values and the like (Which is very handy to do) you are generally going to end up getting an object that will track all this data instead of things like a set of masked bits, but it would still be faster than a list of strings.&#xD;&#xA;&#xD;&#xA;2) As eluded to in the first one, you may want to include default values in the templates, this would set up their initial values when they are created (Read in a component, add it to the object in whatever tethering method you are using for your component system and then give it the values supplied by the teamplate). If I recall you are using Lua in here. If the object is represented in Lua after you call the sample CreateEntity() method you may want to return a Lua object that represents the object (even if in C/C++ it is just unified by Id). You could then just set the values directly via the object reference. This may be a bit more work in translation and such between the two systems but I can almost guarantee the payoff will be there in the long run.&#xD;&#xA;&#xD;&#xA;3) I think its alot of work, but I do not think this is alot of wasted work. The effort will pay off in the end when you want to either extend the engine with new functionality, repurpose the engine towards a new game, whatever it is that may come down the road.. I strongly adhere to the beliefe that you take the complicated stuff head on so the rest of the road is all down hill :)&#xD;&#xA;&#xD;&#xA;So again, hope I have helped as much as I thought I did on your first set of questions and good luck!" />
  <row Id="14870" PostHistoryTypeId="2" PostId="7407" RevisionGUID="4ecc45a7-edf5-43ec-9f0f-9259bcfeef7e" CreationDate="2011-01-14T22:03:35.057" UserId="744" Text="Once you are done sending vertex data to OpenGL, you need to call &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml&quot;&gt;glEnd&lt;/a&gt;, which I don't see called anywhere in your code. It should probably be before your PopMatrix call.&#xD;&#xA;&#xD;&#xA;For example, &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glBindTexture.xml&quot;&gt;glBindTexture's documentation says&lt;/a&gt;:&#xD;&#xA;&gt; GL_INVALID_OPERATION is generated if glBindTexture is executed between the execution of glBegin and the corresponding execution of glEnd.&#xD;&#xA;&#xD;&#xA;I assume your CHECKGL macro is supposed to catch reports via glGetError, in which case you might want to go back and make sure it works." />
  <row Id="14871" PostHistoryTypeId="5" PostId="7405" RevisionGUID="7a1129d4-8b60-4dc2-b289-d5f7f80e1cd1" CreationDate="2011-01-14T22:08:03.793" UserId="744" Comment="Whoops, the title doesn't go in the edit summary..." Text="I'm having problems making a simple sprite rendering. I load 2 different textures. Then, I bind these textures and draw 2 squares, one with each texture. But only the texture of the first rendered object is drawn in both squares. Its like if I'd only use a texture or as if glBindTexture don't work properly. I know that GL is a state machine, but I think that you only need to change active texture with glBindTexture. &#xD;&#xA;&#xD;&#xA;I load texture with this method:&#xD;&#xA;&#xD;&#xA;     bool CTexture::generate( utils::CImageBuff* img )&#xD;&#xA;     { &#xD;&#xA;      assert(img);&#xD;&#xA;      m_image = img;&#xD;&#xA;      CHECKGL(glGenTextures(1,&amp;m_textureID));&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBindTexture(GL_TEXTURE_2D,m_textureID));&#xD;&#xA;      CHECKGL(glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR));&#xD;&#xA;      CHECKGL(glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR));&#xD;&#xA;      //CHECKGL(glTexImage2D(GL_TEXTURE_2D,0,img-&gt;getBpp(),img-&gt;getWitdh(),img-&gt;getHeight(),0,img-&gt;getFormat(),GL_UNSIGNED_BYTE,img-&gt;getImgData()));&#xD;&#xA;      CHECKGL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img-&gt;getWitdh(), img-&gt;getHeight(),&#xD;&#xA;       0, GL_RGBA, GL_UNSIGNED_BYTE, img-&gt;getImgData()));&#xD;&#xA;    &#xD;&#xA;      return true;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;And I bind textures with this function:&#xD;&#xA;&#xD;&#xA;    void CTexture::bind()&#xD;&#xA;     {&#xD;&#xA;      CHECKGL(glBindTexture(GL_TEXTURE_2D,m_textureID));&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Also, I draw sprites with this method&#xD;&#xA;&#xD;&#xA;    void CSprite2D::render()&#xD;&#xA;     {&#xD;&#xA;      CHECKGL(glLoadIdentity());&#xD;&#xA;      CHECKGL(glEnable(GL_TEXTURE_2D));&#xD;&#xA;      CHECKGL(glEnable(GL_BLEND));&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));&#xD;&#xA;      m_texture-&gt;bind();&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glPushMatrix());&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBegin(GL_QUADS));&#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaStart.s,m_textureAreaStart.t)); // 0,0 by default&#xD;&#xA;      CHECKGL(glVertex3i(m_position.x,m_position.y,0));&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaEnd.s,m_textureAreaStart.t)); // 1,0 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y, 0)); &#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaEnd.s, m_textureAreaEnd.t)); // 1,1 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y + m_dimensions.y, 0));  &#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaStart.s, m_textureAreaEnd.t));  // 0,1 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x, m_position.y + m_dimensions.y,0));&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glPopMatrix());&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glDisable(GL_BLEND));&#xD;&#xA;     }&#xD;&#xA;" />
  <row Id="14872" PostHistoryTypeId="6" PostId="7405" RevisionGUID="7a1129d4-8b60-4dc2-b289-d5f7f80e1cd1" CreationDate="2011-01-14T22:08:03.793" UserId="744" Comment="Whoops, the title doesn't go in the edit summary..." Text="&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="14873" PostHistoryTypeId="4" PostId="7405" RevisionGUID="7a1129d4-8b60-4dc2-b289-d5f7f80e1cd1" CreationDate="2011-01-14T22:08:03.793" UserId="744" Comment="Whoops, the title doesn't go in the edit summary..." Text="Why does OpenGL seem to ignore my glBindTexture call?" />
  <row Id="14874" PostHistoryTypeId="2" PostId="7408" RevisionGUID="dc572ce0-88be-47ff-981d-7fdd7f7e114c" CreationDate="2011-01-14T22:09:29.283" UserId="4662" Text="If you managed to hang the entire computer, not just your own process or any processes you were actively messing with, then this means a bug in Windows or a driver, as it should be impossible for user-mode code to cause this kind of system-wide hang. That doesn't mean that the bug isn't triggered by a bug in your own code- but your code might also be perfectly bug-free.&#xD;&#xA;&#xD;&#xA;What you need to do is narrow down the issues- record the state of all threads at the time of a hitch. Also, you should verify that no external code is messing with your process. There's a specific Logitech Webcam, whose drivers will inject a DLL into all processes and it would damage several games that I know of, just for example. This kind of thing can damage your system from the outside in unknowable ways." />
  <row Id="14876" PostHistoryTypeId="5" PostId="7405" RevisionGUID="b41a1067-8f97-4921-9bde-e1f728c5d1d8" CreationDate="2011-01-14T22:19:29.560" UserId="916" Comment="Attached the error check code" Text="I'm having problems making a simple sprite rendering. I load 2 different textures. Then, I bind these textures and draw 2 squares, one with each texture. But only the texture of the first rendered object is drawn in both squares. Its like if I'd only use a texture or as if glBindTexture don't work properly. I know that GL is a state machine, but I think that you only need to change active texture with glBindTexture. &#xD;&#xA;&#xD;&#xA;I load texture with this method:&#xD;&#xA;&#xD;&#xA;     bool CTexture::generate( utils::CImageBuff* img )&#xD;&#xA;     { &#xD;&#xA;      assert(img);&#xD;&#xA;      m_image = img;&#xD;&#xA;      CHECKGL(glGenTextures(1,&amp;m_textureID));&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBindTexture(GL_TEXTURE_2D,m_textureID));&#xD;&#xA;      CHECKGL(glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR));&#xD;&#xA;      CHECKGL(glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR));&#xD;&#xA;      //CHECKGL(glTexImage2D(GL_TEXTURE_2D,0,img-&gt;getBpp(),img-&gt;getWitdh(),img-&gt;getHeight(),0,img-&gt;getFormat(),GL_UNSIGNED_BYTE,img-&gt;getImgData()));&#xD;&#xA;      CHECKGL(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img-&gt;getWitdh(), img-&gt;getHeight(),&#xD;&#xA;       0, GL_RGBA, GL_UNSIGNED_BYTE, img-&gt;getImgData()));&#xD;&#xA;    &#xD;&#xA;      return true;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;And I bind textures with this function:&#xD;&#xA;&#xD;&#xA;    void CTexture::bind()&#xD;&#xA;     {&#xD;&#xA;      CHECKGL(glBindTexture(GL_TEXTURE_2D,m_textureID));&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Also, I draw sprites with this method&#xD;&#xA;&#xD;&#xA;    void CSprite2D::render()&#xD;&#xA;     {&#xD;&#xA;      CHECKGL(glLoadIdentity());&#xD;&#xA;      CHECKGL(glEnable(GL_TEXTURE_2D));&#xD;&#xA;      CHECKGL(glEnable(GL_BLEND));&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));&#xD;&#xA;      m_texture-&gt;bind();&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glPushMatrix());&#xD;&#xA;      &#xD;&#xA;      CHECKGL(glBegin(GL_QUADS));&#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaStart.s,m_textureAreaStart.t)); // 0,0 by default&#xD;&#xA;      CHECKGL(glVertex3i(m_position.x,m_position.y,0));&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaEnd.s,m_textureAreaStart.t)); // 1,0 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y, 0)); &#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaEnd.s, m_textureAreaEnd.t)); // 1,1 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y + m_dimensions.y, 0));  &#xD;&#xA;    &#xD;&#xA;      CHECKGL(glTexCoord2f(m_textureAreaStart.s, m_textureAreaEnd.t));  // 0,1 by default&#xD;&#xA;      CHECKGL(glVertex3i( m_position.x, m_position.y + m_dimensions.y,0));&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glPopMatrix());&#xD;&#xA;    &#xD;&#xA;      CHECKGL(glDisable(GL_BLEND));&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;I bring also the check error code:&#xD;&#xA;&#xD;&#xA;    int CheckGLError(const char *GLcall, const char *file, int line)&#xD;&#xA;    {&#xD;&#xA;    	GLenum errCode;&#xD;&#xA;    &#xD;&#xA;    	//avoids infinite loop&#xD;&#xA;    	int errorCount = 0;&#xD;&#xA;    	while ( (errCode=glGetError()) != GL_NO_ERROR &amp;&amp; ++errorCount &lt; 3000)&#xD;&#xA;    	{&#xD;&#xA;    		utils::globalLogPtr log = utils::CGLogFactory::getLogInstance();&#xD;&#xA;    		const GLubyte *errString;&#xD;&#xA;    		errString = gluErrorString(errCode);&#xD;&#xA;    		std::stringstream ss;&#xD;&#xA;    		ss &lt;&lt; &quot;In &quot;&lt;&lt; __FILE__&lt;&lt;&quot;(&quot;&lt;&lt; __LINE__&lt;&lt;&quot;) &quot;&lt;&lt;&quot;GL error with code: &quot; &lt;&lt; errCode&lt;&lt;&quot; at file &quot; &lt;&lt; file &lt;&lt; &quot;, line &quot; &lt;&lt; line &lt;&lt; &quot; with message: &quot; &lt;&lt; errString &lt;&lt; &quot;\n&quot;; &#xD;&#xA;    		log-&gt;addMessage(ss.str(),ZEL_APPENDER_GL,utils::LOGLEVEL_ERROR);&#xD;&#xA;    	}&#xD;&#xA;    	return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14877" PostHistoryTypeId="2" PostId="7409" RevisionGUID="b66fe107-316c-413e-9629-40bb4d17c20a" CreationDate="2011-01-14T22:22:22.287" UserId="4662" Text="The viewport transform transforms co-ordinates into normalized device co-ordinates. They're kind of similar to texels, with 0,0 in the center and the corners being various permutations of 1 and -1.&#xD;&#xA;&#xD;&#xA;However, you can observe that in ID3DXSprite, there is an option to render in screen-space co-ordinates. You could render to a texture, and then present it to the screen in a custom way by rendering it with ID3DXSprite.&#xD;&#xA;&#xD;&#xA;D3D9 generates the Viewport transform with the following formula:&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/9bQR3.jpg&#xD;&#xA;&#xD;&#xA;If you know that you want an identity transform, you could solve to find it using this, or alter the projection matrix to counteract it's effects. I wish I could be of more use but I couldn't find any documentation on D3DRS_VIEWPORTENABLE for the 360- I only code for D3D9 on Windows." />
  <row Id="14878" PostHistoryTypeId="2" PostId="7410" RevisionGUID="614ad7e3-c5d0-4e16-adc1-e503a4076312" CreationDate="2011-01-14T22:34:28.913" UserId="4662" Text="A thread per subsystem is the wrong way to go. Suddenly, your app won't scale because some subsystems demand a lot more than others. This was the threading approach taken by Supreme Commander and it didn't scale beyond two cores because they only had two subsystems that took up a substantial amount of CPU- rendering and physics/game logic, even though they had 16 threads, the other threads just barely amounted to any work.&#xD;&#xA;&#xD;&#xA;What you should do is use something called a thread pool. This somewhat mirrors the approach taken on GPUs- that is, you post work, and any available thread simply comes along and does it, and then returns to waiting for work- think of it like a ring buffer, of threads. This approach has the advantage of N-core scaling and is very good at scaling for both low and high core counts. The disadvantage is that it's quite hard to work the thread ownership for this approach, as it's impossible to know which thread is doing what work at any given time, so you have to have the ownership issues locked down very tightly. It also makes it very hard to use technologies like Direct3D9 which don't support multiple threads. &#xD;&#xA;&#xD;&#xA;Thread pools are very hard to use, but they deliver the best possible results. If you need extremely good scaling, or you have plenty of time to work on it, use a thread pool. If you're trying to introduce parallelism into an existing project with unknown dependency problems and single-threaded technologies, this isn't the solution for you." />
  <row Id="14879" PostHistoryTypeId="2" PostId="7411" RevisionGUID="cc794b48-d755-41e8-8032-2fab70172703" CreationDate="2011-01-14T22:51:46.500" UserId="916" Text="I'm having problems drawing a simple sprite. When I draw:&#xD;&#xA;&#xD;&#xA;    void CSprite2D::render()&#xD;&#xA;    	{&#xD;&#xA;    		CHECKGL(glLoadIdentity());&#xD;&#xA;    		CHECKGL(glEnable(GL_TEXTURE_2D));&#xD;&#xA;    		CHECKGL(glEnable(GL_BLEND));&#xD;&#xA;&#xD;&#xA;    		CHECKGL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));&#xD;&#xA;    		&#xD;&#xA;    		m_texture-&gt;bind();&#xD;&#xA;    &#xD;&#xA;    		//CHECKGL(glPushMatrix());&#xD;&#xA;&#xD;&#xA;    		CHECKGL(glBegin(GL_TRIANGLE_STRIP));&#xD;&#xA;    			CHECKGL(glNormal3i(0,0,1));&#xD;&#xA;    			CHECKGL(glTexCoord2f(m_textureAreaStart.s,m_textureAreaStart.t)); // 0,0 by default&#xD;&#xA;    			CHECKGL(glVertex3i(m_position.x,m_position.y,0));&#xD;&#xA;    			&#xD;&#xA;    			CHECKGL(glNormal3i(0,0,1));&#xD;&#xA;    			CHECKGL(glTexCoord2f(m_textureAreaEnd.s,m_textureAreaStart.t)); // 1,0 by default&#xD;&#xA;    			CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y, 0));	&#xD;&#xA;    &#xD;&#xA;    			CHECKGL(glNormal3i(0,0,1));&#xD;&#xA;    			CHECKGL(glTexCoord2f(m_textureAreaEnd.s, m_textureAreaEnd.t)); // 1,1 by default&#xD;&#xA;    			CHECKGL(glVertex3i( m_position.x + m_dimensions.x, m_position.y + m_dimensions.y, 0));		&#xD;&#xA;    &#xD;&#xA;    			CHECKGL(glNormal3i(0,0,1));&#xD;&#xA;    			CHECKGL(glTexCoord2f(m_textureAreaStart.s, m_textureAreaEnd.t));  // 0,1 by default&#xD;&#xA;    			CHECKGL(glVertex3i( m_position.x, m_position.y + m_dimensions.y,0));&#xD;&#xA;    		CHECKGL(glEnd());&#xD;&#xA;    &#xD;&#xA;    		//CHECKGL(glPopMatrix());&#xD;&#xA;    &#xD;&#xA;    		CHECKGL(glDisable(GL_BLEND));&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;I'm always get an GL_INVALID_OPERATION in glEnd(). I suspect that error is not here, but I can't detect where may be.&#xD;&#xA;Actually, the output render seems ok. But I want to solve this situation before to catch a subtle bug tomorrow.&#xD;&#xA;&#xD;&#xA;Any idea of what could be" />
  <row Id="14880" PostHistoryTypeId="1" PostId="7411" RevisionGUID="cc794b48-d755-41e8-8032-2fab70172703" CreationDate="2011-01-14T22:51:46.500" UserId="916" Text="GL_INVALID_OPERATION in glEnd" />
  <row Id="14881" PostHistoryTypeId="3" PostId="7411" RevisionGUID="cc794b48-d755-41e8-8032-2fab70172703" CreationDate="2011-01-14T22:51:46.500" UserId="916" Text="&lt;c++&gt;&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="14882" PostHistoryTypeId="25" PostId="7405" RevisionGUID="c7b1a8a3-df41-499d-aeaa-4bb961a30a14" CreationDate="2011-01-14T22:55:33.863" Comment="http://twitter.com/#!/StackGameDev/status/26049812382097408" />
  <row Id="14883" PostHistoryTypeId="2" PostId="7412" RevisionGUID="415500b3-f363-4343-b19b-4981ba4b662d" CreationDate="2011-01-14T23:02:59.797" UserId="4604" Text="My guess is your CHECKGL macro is calling glGetError between a glBegin/glEnd, which is not one of the defined functions that can be called.&#xD;&#xA;&#xD;&#xA;http://www.talisman.org/opengl-1.1/Reference/glEnd.html&#xD;&#xA;&#xD;&#xA;http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml" />
  <row Id="14884" PostHistoryTypeId="2" PostId="7413" RevisionGUID="f02383ff-37a2-49fb-b3f1-6c9c13422b7e" CreationDate="2011-01-14T23:16:18.887" UserId="4664" Text="I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I create instances of all classes and do all the drawing and calculation in there.&#xD;&#xA;&#xD;&#xA;Question: Should I instead create the instances of other classes in my activity?&#xD;&#xA;&#xD;&#xA;Now I create a custom thread class that handles the game loop.&#xD;&#xA;&#xD;&#xA;Question: How do I use this one class in all my activities? Or do I have to create a separate thread each time?&#xD;&#xA;&#xD;&#xA;In my previous game, I had multiple levels that had to create an instance of the thread class and in the thread class I had to set constructor methods for each separate level and in the loop use a switch statement to check which level it needs to render and update. Sorry if that sounds confusing.&#xD;&#xA;&#xD;&#xA;I just want to know if the method I am using is inefficient (which it probably is) and how to go about designing it the correct way. I have read many tutorials out there and I am still having lots of trouble with this particular topic. Maybe a link to a some tutorials that explain this? Thanks." />
  <row Id="14885" PostHistoryTypeId="1" PostId="7413" RevisionGUID="f02383ff-37a2-49fb-b3f1-6c9c13422b7e" CreationDate="2011-01-14T23:16:18.887" UserId="4664" Text="Android threads trouble wrapping my head around design" />
  <row Id="14886" PostHistoryTypeId="3" PostId="7413" RevisionGUID="f02383ff-37a2-49fb-b3f1-6c9c13422b7e" CreationDate="2011-01-14T23:16:18.887" UserId="4664" Text="&lt;game-design&gt;&lt;java&gt;&lt;android&gt;&lt;multithreading&gt;" />
  <row Id="14887" PostHistoryTypeId="5" PostId="7354" RevisionGUID="f34512ed-d8c2-46e8-bff1-9fd95f60971f" CreationDate="2011-01-15T00:01:48.473" UserId="325" Comment="added 77 characters in body" Text="I posted this on [StackOverlow][1], but of course it should be posted here.&#xD;&#xA;&#xD;&#xA;I am maintaining a multiplatform codebase for Xbox360 and WinXP. I am seeing an issue on the XP side that appears to be related to D3DRS_VIEWPORTENABLE on the Xbox360 version not having an equivalent on WinXP D3D9. [This article][2] had an interesting idea, but the only way to construct an identity matrix is to supply negative numbers to D3DVIEWPORT9::X and D3DVIEWPORT9::Height, but they are unsigned numbers. (I tried to put in negative numbers anyway, but nothing interesting happened.)&#xD;&#xA;&#xD;&#xA;So, how does one emulate the behavior of D3DRS_VIEWPORTENABLE under WinXP/D3D9?&#xD;&#xA;&#xD;&#xA;(For clarity, the result I'm seeing is that a 2d screen-aligned quad works fine on Xbox360 but is offset/stretched on WinXP. In fact, the (0, 0) starts in the center of the screen on WinXP instead of in the lower-left corner like on the Xbox360 as a result of applying the viewport transform.)&#xD;&#xA;&#xD;&#xA;Update: I didn't have an Xbox360 devkit at the time I wrote up this question, but I've since gotten one. I commented out the disabling of the D3DRS_VIEWPORTENABLE state, and the exact same behavior resulted on the Xbox360 as on the WinXP build. So, there must be some DirectX magic to bridge the gap here for emulating D3DRS_VIEWPORTENABLE being turned off on WinXP.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4583380/what-is-the-xbox360s-d3drs-viewportenable-equivalent-on-winxp-d3d9&#xD;&#xA;  [2]: http://www.gamedev.net/topic/502536-enablingdisabling-viewport/" />
  <row Id="14888" PostHistoryTypeId="5" PostId="7406" RevisionGUID="59451084-76b4-4445-877e-5592d4b09f29" CreationDate="2011-01-15T01:20:40.570" UserId="4443" Comment="Edited where marked with the word EDITED" Text="Hey again NotBad, lets see if I can give you a hand again :)&#xD;&#xA;&#xD;&#xA;1) EDITED. If you have alot of common components then pre-making a set of them could be very helpful in increasing the speed of creation and deletion. In previous component systems I have used all of the components were tied together with a single ID for example. So to 'allocate' a component to a specific object you would just give it the id of the object it belonged to. To 'deallocate' the object you would remove the id or set it to -1 or some other value to mark it as Unused. This way you only ever allocate memory on startup or when you run out and need to make another handful of a specific type. Deallocating would basically only be done at the end of the game's runtime.. You would eventually want to put in some sort of balancing routine that if you have say 15 unused components in a pool of 30 of that type that it dumps a certain number of them down or the like.. What you DO have to be careful of with this setup though is memory fragmentation.. If you are working within a managed system this should not be a concern, but just in case you are not be aware of that. Hope this helps answer the question a little better :)&#xD;&#xA;&#xD;&#xA;2) As eluded to in the first one, you may want to include default values in the templates, this would set up their initial values when they are created (Read in a component, add it to the object in whatever tethering method you are using for your component system and then give it the values supplied by the teamplate). If I recall you are using Lua in here. If the object is represented in Lua after you call the sample CreateEntity() method you may want to return a Lua object that represents the object (even if in C/C++ it is just unified by Id). You could then just set the values directly via the object reference. This may be a bit more work in translation and such between the two systems but I can almost guarantee the payoff will be there in the long run.&#xD;&#xA;&#xD;&#xA;3) I think its alot of work, but I do not think this is alot of wasted work. The effort will pay off in the end when you want to either extend the engine with new functionality, repurpose the engine towards a new game, whatever it is that may come down the road.. I strongly adhere to the beliefe that you take the complicated stuff head on so the rest of the road is all down hill :)&#xD;&#xA;&#xD;&#xA;So again, hope I have helped as much as I thought I did on your first set of questions and good luck!" />
  <row Id="14889" PostHistoryTypeId="2" PostId="7414" RevisionGUID="244acf10-9708-4609-a8cf-ac52cd1785ee" CreationDate="2011-01-15T01:26:02.393" UserId="4212" Text="In my experience, these types of issues typically boil down to some type of resource exhaustion.&#xD;&#xA;&#xD;&#xA;It's easy to speculate to the n-th degree about what it &quot;could&quot; be, but without data, these remain speculations.&#xD;&#xA;&#xD;&#xA;To gather data that can solve the puzzle, on windows you need to collect perfmon data.  Some counters you should grab for all processes (if applicable) are:&#xD;&#xA;Local disk queue length, secs/write&#xD;&#xA;Process working set, cpu usage, virtual set size&#xD;&#xA;Memory utilization/*&#xD;&#xA;Pagefile utilization&#xD;&#xA;&#xD;&#xA;Sorry, I am working from memory and mobile here.&#xD;&#xA;&#xD;&#xA;To add to the speculation about what it might be. It sounds like you may be under memory pressure.  This means that physical free memory has been exhausted and the os needs to read or write memory contents to or from disk.&#xD;&#xA;&#xD;&#xA;The perfmon data that would validate the above scenario would show a steady rise  in memory utilization followed by a sharp fall. Simultaneously there would be a sharp rise in pagefile usage as well as local disk I/o.  Again, just speculating without any hard data (which you need)." />
  <row Id="14890" PostHistoryTypeId="5" PostId="7406" RevisionGUID="9456f1fb-1965-4002-9e80-2d6b20eae07d" CreationDate="2011-01-15T01:31:52.793" UserId="4443" Comment="Another EDITED tag shows the change" Text="Hey again NotBad, lets see if I can give you a hand again :)&#xD;&#xA;&#xD;&#xA;1) EDITED. If you have alot of common components then pre-making a set of them could be very helpful in increasing the speed of creation and deletion. In previous component systems I have used all of the components were tied together with a single ID for example. So to 'allocate' a component to a specific object you would just give it the id of the object it belonged to. To 'deallocate' the object you would remove the id or set it to -1 or some other value to mark it as Unused. This way you only ever allocate memory on startup or when you run out and need to make another handful of a specific type. Deallocating would basically only be done at the end of the game's runtime.. You would eventually want to put in some sort of balancing routine that if you have say 15 unused components in a pool of 30 of that type that it dumps a certain number of them down or the like.. What you DO have to be careful of with this setup though is memory fragmentation.. If you are working within a managed system this should not be a concern, but just in case you are not be aware of that. Hope this helps answer the question a little better :)&#xD;&#xA;&#xD;&#xA;2) As eluded to in the first one, you may want to include default values in the templates, this would set up their initial values when they are created (Read in a component, add it to the object in whatever tethering method you are using for your component system and then give it the values supplied by the teamplate). If I recall you are using Lua in here. If the object is represented in Lua after you call the sample CreateEntity() method you may want to return a Lua object that represents the object (even if in C/C++ it is just unified by Id). You could then just set the values directly via the object reference. This may be a bit more work in translation and such between the two systems but I can almost guarantee the payoff will be there in the long run.&#xD;&#xA;&#xD;&#xA;3) EDITED. All in all some of the slowest execution speed in what you are doing here is going to be memory allocation. Having a good method as touched upon in the first answer can be key to this. Using a pooling system as described above can be very nice especially in a component system.. if you have a component that moves entities then you can use the same one for a positional sound effect, a particle effect, a player character, etc.. All it does is hold a position and functions for movements. Reuse-ability of component based systems along with their wide instead of tall structure a just a few of the benifits you can get :) For example, the engine I was working in professionally a few years ago was capped to say 100 objects for an entire level, I made a pooling/spawning system to make it 100 objects at a time.. now a PSP can not render that many objects at once, but it freed up the designers to really go wild and make the levels more interactable :) Back on topic, if you can allocate and deallocate all your memory on 'loading' screens (Yes, giving away knowledge that generally the first thing done on Loading screens in games is Unloading data) you will have much smoother game play sessions.&#xD;&#xA;&#xD;&#xA;So again, hope I have helped as much as I thought I did on your first set of questions and good luck!" />
  <row Id="14891" PostHistoryTypeId="25" PostId="7413" RevisionGUID="a8a16312-e0e8-4211-b390-cbe31470925c" CreationDate="2011-01-15T01:55:33.960" Comment="http://twitter.com/#!/StackGameDev/status/26095110525554688" />
  <row Id="14892" PostHistoryTypeId="25" PostId="7411" RevisionGUID="24862ad5-3f41-4a35-b65c-e44cae2c3749" CreationDate="2011-01-15T04:55:33.960" Comment="http://twitter.com/#!/StackGameDev/status/26140409390440448" />
  <row Id="14893" PostHistoryTypeId="25" PostId="7401" RevisionGUID="ae0cda14-a289-4726-a5ce-77a761b3853f" CreationDate="2011-01-15T07:55:33.750" Comment="http://twitter.com/#!/StackGameDev/status/26185707554869248" />
  <row Id="14894" PostHistoryTypeId="2" PostId="7415" RevisionGUID="27b3acaf-9b6f-486b-8c55-04c09aa166ef" CreationDate="2011-01-15T08:28:26.777" UserDisplayName="Volatil3" Text="I'm a programmer but I have never worked on Game programming so have no idea about OpenGL and all that. I am more interested to get into physics based games like Angry Birds and want to implement fewer ideas.&#xD;&#xA;&#xD;&#xA;Can you recommend me some good books which not only teach the concept of game programming but also practical implementation in iPhone platform?&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="14895" PostHistoryTypeId="1" PostId="7415" RevisionGUID="27b3acaf-9b6f-486b-8c55-04c09aa166ef" CreationDate="2011-01-15T08:28:26.777" UserDisplayName="Volatil3" Text="Resources for Game Development in iPhone for beginners" />
  <row Id="14896" PostHistoryTypeId="3" PostId="7415" RevisionGUID="27b3acaf-9b6f-486b-8c55-04c09aa166ef" CreationDate="2011-01-15T08:28:26.777" UserDisplayName="Volatil3" Text="&lt;iphone&gt;&lt;game-development&gt;" />
  <row Id="14897" PostHistoryTypeId="17" PostId="7415" RevisionGUID="cf884541-d1da-49ee-98cb-21a3d85a5b26" CreationDate="2011-01-15T10:02:34.200" UserId="-1" Comment="from http://stackoverflow.com/questions/4698663/resources-for-game-development-in-iphone-for-beginners" Text="" />
  <row Id="14898" PostHistoryTypeId="25" PostId="7402" RevisionGUID="d7ada314-6056-4f05-b853-d2dd883be5c6" CreationDate="2011-01-15T10:55:34.640" Comment="http://twitter.com/#!/StackGameDev/status/26231006558167040" />
  <row Id="14899" PostHistoryTypeId="5" PostId="7410" RevisionGUID="22ed5346-3e74-4bc4-a565-2eb4846c8ccf" CreationDate="2011-01-15T11:06:22.650" UserId="4662" Comment="added 51 characters in body" Text="A thread per subsystem is the wrong way to go. Suddenly, your app won't scale because some subsystems demand a lot more than others. This was the threading approach taken by Supreme Commander and it didn't scale beyond two cores because they only had two subsystems that took up a substantial amount of CPU- rendering and physics/game logic, even though they had 16 threads, the other threads just barely amounted to any work and as a result, the game only scaled to two cores.&#xD;&#xA;&#xD;&#xA;What you should do is use something called a thread pool. This somewhat mirrors the approach taken on GPUs- that is, you post work, and any available thread simply comes along and does it, and then returns to waiting for work- think of it like a ring buffer, of threads. This approach has the advantage of N-core scaling and is very good at scaling for both low and high core counts. The disadvantage is that it's quite hard to work the thread ownership for this approach, as it's impossible to know which thread is doing what work at any given time, so you have to have the ownership issues locked down very tightly. It also makes it very hard to use technologies like Direct3D9 which don't support multiple threads. &#xD;&#xA;&#xD;&#xA;Thread pools are very hard to use, but they deliver the best possible results. If you need extremely good scaling, or you have plenty of time to work on it, use a thread pool. If you're trying to introduce parallelism into an existing project with unknown dependency problems and single-threaded technologies, this isn't the solution for you." />
  <row Id="14900" PostHistoryTypeId="2" PostId="7416" RevisionGUID="8183258a-206d-480f-b803-0d81bc38ceec" CreationDate="2011-01-15T13:39:01.643" UserId="2215" Text="Minecraft server comes as a single jar. How are mods developed? How do they interact with the original jar? What is there under the hood?&#xD;&#xA;&#xD;&#xA;What technologies are involved there? I'm mostly a C++/Python guy, but I'd like to learn something about mods development." />
  <row Id="14901" PostHistoryTypeId="1" PostId="7416" RevisionGUID="8183258a-206d-480f-b803-0d81bc38ceec" CreationDate="2011-01-15T13:39:01.643" UserId="2215" Text="Mods for Minecraft Server - how does it work?" />
  <row Id="14902" PostHistoryTypeId="3" PostId="7416" RevisionGUID="8183258a-206d-480f-b803-0d81bc38ceec" CreationDate="2011-01-15T13:39:01.643" UserId="2215" Text="&lt;java&gt;&lt;mods&gt;" />
  <row Id="14903" PostHistoryTypeId="2" PostId="7417" RevisionGUID="6c45f4af-4c0f-4e7c-a3d5-7f4a6568fc67" CreationDate="2011-01-15T13:50:30.623" UserId="3318" Text="A JAR is simply a ZIP file, containing the various class files and other metadata used - it's a completely standardized format.&#xD;&#xA;&#xD;&#xA;ZIP files can be extracted, and the class files can be edited as necessary for the modification. The modified files are then added back into the archive, which makes the server use the modified files instead of the original ones.&#xD;&#xA;&#xD;&#xA;Of course, that isn't a very nice way of doing things if you actively design for mods. Instead, you would design some sort of plugin architecture which allows custom code to be run where appropriate. Exactly how you would go about this depends on what you want your mods to be able to do - e.g., if security is a concern, you probably want to design the mod interface to use some sort of scripting, so you can restrict mods from doing all sorts of things to the user's computer." />
  <row Id="14904" PostHistoryTypeId="25" PostId="7416" RevisionGUID="04925962-dc5f-4b6a-b977-394060df59a1" CreationDate="2011-01-15T13:55:34.870" Comment="http://twitter.com/#!/StackGameDev/status/26276308023508992" />
  <row Id="14905" PostHistoryTypeId="5" PostId="7417" RevisionGUID="03559854-00d0-4e38-814e-5ed39616a2ef" CreationDate="2011-01-15T13:58:47.250" UserId="3318" Comment="added 275 characters in body" Text="A JAR is simply a ZIP file, containing the various class files and other metadata used - it's a completely standardized format.&#xD;&#xA;&#xD;&#xA;ZIP files can be extracted, and the class files can be edited as necessary for the modification. The modified files are then added back into the archive, which makes the server use the modified files instead of the original ones.&#xD;&#xA;&#xD;&#xA;Technically, Minecraft mods are really &quot;hacked&quot; versions of the original code: the actual binary class files have to be modified to let the game know about the new stuff; there's no official mod support yet (although Notch has stated that they'll work on it during Beta).&#xD;&#xA;&#xD;&#xA;Of course, that isn't a very nice way of doing things if you actively design for mods. Instead, you would design some sort of plugin architecture which allows custom code to be run where appropriate. Exactly how you would go about this depends on what you want your mods to be able to do - e.g., if security is a concern, you probably want to design the mod interface to use some sort of scripting, so you can restrict mods from doing all sorts of things to the user's computer." />
  <row Id="14906" PostHistoryTypeId="2" PostId="7418" RevisionGUID="a196d9b7-16fa-49fd-99a3-3230c20e92fe" CreationDate="2011-01-15T15:15:17.830" UserId="918" Text="Typically, your game-loop is self-contained inside a single Activity.&#xD;&#xA;&#xD;&#xA;when you switch Activity, you pause / kill your game-loop. Separate activities should correspond to pausing the game anyway (e.g. because you've switched to a &quot;send email to friends&quot; or &quot;main menu&quot; activity)&#xD;&#xA;&#xD;&#xA;For extra levels, you shouldn't be creating or destorying any new threads ... unless you switched to a &quot;level-complete, loading next level, please wait&quot; Activity, and you're going to have to restart the &quot;main game&quot; Activity anyway. But even in that case, you're not really making &quot;extra&quot; threads, you're just making one thread in that one Activity, and sequentially killing / restarting / killing / restarting ... etc that Activity. each time a level is completed." />
  <row Id="14907" PostHistoryTypeId="2" PostId="7419" RevisionGUID="3ca36eda-15f9-4f47-a774-496273a13552" CreationDate="2011-01-15T15:20:25.483" UserId="918" Text="There's a wiki that's gathering examples of all these:&#xD;&#xA;&#xD;&#xA;http://entity-systems.wikidot.com/&#xD;&#xA;&#xD;&#xA;...along with explanations of the differences between the different approaches." />
  <row Id="14908" PostHistoryTypeId="2" PostId="7420" RevisionGUID="8c329a42-ed3e-45ca-bd2f-f4d72d2d4a84" CreationDate="2011-01-15T15:26:14.493" UserId="4669" Text="Single player mods are hacked versions of the original code. Multiplayer mods are different right now. They almost all use hey0's server wrapper, which links in the minecraft_server.jar (or whatever the term is in Java land) but defines its own functions classes, overloads some of the core functions, and runs its own main()&#xD;&#xA;&#xD;&#xA;Hey0 provides a mod [API][1]. See HTTP://Hey0.net&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hey0.net/javadoc" />
  <row Id="14909" PostHistoryTypeId="2" PostId="7421" RevisionGUID="c0fcf74c-be5e-4533-aac5-55e86b094605" CreationDate="2011-01-15T15:37:29.277" UserId="3659" Text="I am an indie developer and I need some detailed artwork. How much is reasonable to pay an artist for say 20 character designs? I know it depends on the artist's skills, etc, but I am wondering what to expect so that I can budget it." />
  <row Id="14910" PostHistoryTypeId="1" PostId="7421" RevisionGUID="c0fcf74c-be5e-4533-aac5-55e86b094605" CreationDate="2011-01-15T15:37:29.277" UserId="3659" Text="How much to pay for artwork in an indie game?" />
  <row Id="14911" PostHistoryTypeId="3" PostId="7421" RevisionGUID="c0fcf74c-be5e-4533-aac5-55e86b094605" CreationDate="2011-01-15T15:37:29.277" UserId="3659" Text="&lt;indie&gt;&lt;art&gt;&lt;costs&gt;" />
  <row Id="14913" PostHistoryTypeId="2" PostId="7423" RevisionGUID="02540552-b7c4-42c8-890e-d55eef9dcd58" CreationDate="2011-01-15T16:43:32.757" UserId="2188" Text="Random art costs random money.&#xD;&#xA;&#xD;&#xA;You can find any kind of quality and any kind of cost.&#xD;&#xA;&#xD;&#xA;Set a budget, search for people who will do that for that budget, and among them chose the one you like most." />
  <row Id="14914" PostHistoryTypeId="6" PostId="7413" RevisionGUID="596859a6-eee0-4a5f-9119-807d486fc798" CreationDate="2011-01-15T17:17:37.693" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;android&gt;&lt;multithreading&gt;" />
  <row Id="14915" PostHistoryTypeId="6" PostId="7415" RevisionGUID="6ed78a7a-a4e3-404e-9478-3667dcde6cc5" CreationDate="2011-01-15T17:17:56.913" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;" />
  <row Id="14916" PostHistoryTypeId="2" PostId="7424" RevisionGUID="83d7af13-2366-4225-b4a7-fa801174dc33" CreationDate="2011-01-15T17:29:52.827" UserId="2910" Text="Before you run out to pay for any art, see what you can find online for free that comes with a license that works for you, if nothing satisfies you I would use temporary art that is on the net until you able to come up with something.&#xD;&#xA;&#xD;&#xA;Also, try poking around an art department at a local university or an art guild. I'm sure there might be a student dieing to get there work exposed or create something that can get them more exposure.&#xD;&#xA;&#xD;&#xA;Ultimately, you may not have to pay much if at all if you can find the right people and prove that you wont be wasting anyones time! =)" />
  <row Id="14917" PostHistoryTypeId="2" PostId="7425" RevisionGUID="2bac7d30-1b6c-4e83-9d46-ffd60a9a518b" CreationDate="2011-01-15T17:30:52.233" UserId="4675" Text="I wanted an answer to this very question. But as the others state, Random art, Random price.&#xD;&#xA;&#xD;&#xA;Also think about it logically, a drawing that is going to become a 3D model, a drawing that is going to be created in to a realistic person once in the game and then a Sprite (eg SNES style) are both going to cost different amounts.&#xD;&#xA;&#xD;&#xA;If you want a ball park figure then you'll probably looking at again a different amount for the detail inside. For example if this is going to be a cartoon style character, or in the style of perfect people, or in the style of a realism. Additionally it is a different story to draw an animal, a person, an imaginary creature or combination.&#xD;&#xA;&#xD;&#xA;Without spices you'll never get a figure. I'd suggest posting (not necessarily on here...) a more in depth request with the intention of people coming back with amounts they feel it is worth or they would draw them for you." />
  <row Id="14919" PostHistoryTypeId="10" PostId="7415" RevisionGUID="770d09c8-db5f-4dbc-af9f-11787eac63db" CreationDate="2011-01-15T17:52:13.323" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="14920" PostHistoryTypeId="5" PostId="7415" RevisionGUID="18b82d25-f108-4acf-906e-eea04301e806" CreationDate="2011-01-15T17:52:13.463" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are the best iPhone game development resources?](http://gamedev.stackexchange.com/questions/5/what-are-the-best-iphone-game-development-resources)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hi&#xD;&#xA;&#xD;&#xA;I'm a programmer but I have never worked on Game programming so have no idea about OpenGL and all that. I am more interested to get into physics based games like Angry Birds and want to implement fewer ideas.&#xD;&#xA;&#xD;&#xA;Can you recommend me some good books which not only teach the concept of game programming but also practical implementation in iPhone platform?&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="14921" PostHistoryTypeId="6" PostId="7416" RevisionGUID="e10e4f8b-e83f-4e29-b64d-89a3844dcdc1" CreationDate="2011-01-15T17:55:01.043" UserId="51" Comment="edited tags" Text="&lt;java&gt;&lt;mods&gt;&lt;minecraft&gt;" />
  <row Id="14922" PostHistoryTypeId="5" PostId="7421" RevisionGUID="2ac157a9-6434-418a-b638-ed6f4f237293" CreationDate="2011-01-15T19:08:36.680" UserId="3659" Comment="added 717 characters in body" Text="I am an indie developer and I need some detailed artwork. How much is reasonable to pay an artist for say 20 character designs? I know it depends on the artist's skills, etc, but I am wondering what to expect so that I can budget it.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Let's say cartoon-ish art ([Example][1] - not necessarily in that level of detail but that kind of cartoony-art style). No 3-d modelling - The art will be used as still images in game and for promotional reasons. I'd provide a base sprite design for them to expand on and detail. &#xD;&#xA;&#xD;&#xA;Also, some numbers would be nice - I like numbers. Even a range is helpful. &#xD;&#xA;&#xD;&#xA;Like: expect to spend $x2 ~ $x1 for top-notch and $y2 ~ $y1 for decent quality.&#xD;&#xA;&#xD;&#xA;I understand I can ask at some indie-help site but, if an artist says something like $1000 for 20 designs, I wouldn't have any idea if it's reasonable / good deal / bad idea etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.creativeuncut.com/gallery-01/dis-laharl1.html &quot;Example&quot;" />
  <row Id="14923" PostHistoryTypeId="25" PostId="7421" RevisionGUID="cca7a545-4f54-4b89-9a8a-4656a8502a0c" CreationDate="2011-01-15T19:55:34.727" Comment="http://twitter.com/#!/StackGameDev/status/26366905006694400" />
  <row Id="14924" PostHistoryTypeId="5" PostId="7414" RevisionGUID="083579e7-a915-44ce-ae40-ddf1ef368ed0" CreationDate="2011-01-15T21:12:43.443" UserId="4212" Comment="added actual counter names along with details on logging/analyzing data" Text="In my experience, these types of issues typically boil down to some type of resource exhaustion.&#xD;&#xA;&#xD;&#xA;It's easy to speculate to the n-th degree about what it &quot;could&quot; be, but without data, these remain speculations.&#xD;&#xA;&#xD;&#xA;*EDIT - Added some more details on actual counters and how to analyze them*&lt;br&gt;&#xD;&#xA;&#xD;&#xA;## Counters ##&#xD;&#xA;To gather data that can solve the puzzle, on windows you need to collect perfmon data.  Some counters you should grab for all processes (if applicable) are:&#xD;&#xA;&#xD;&#xA;    **Processor** /All Counters/All instances&#xD;&#xA;    **Logical Disk**/All Counters/All instances&#xD;&#xA;    **Memory**/All Counters/All instances&#xD;&#xA;    **Network Interface**/All Counters/All instances&#xD;&#xA;    **Paging File**/All Counters/All instances&#xD;&#xA;    **Process**/All Counters/All instances&#xD;&#xA;    **Processor**/All Counters/All instances&#xD;&#xA;    **Server**/All Counters/All instances&#xD;&#xA;    **Server Work Queues**/All Counters/All instances&#xD;&#xA;    **System**/All Counters/All instances&#xD;&#xA;&#xD;&#xA;In my opinion, this is an exhaustive list of all possible counters that you might find relevant data in.  There is a penalty for capturing all of this data, it is a lot of data to log, so you may want to try a subset of the counters that you feel are most relevant for your situation.&#xD;&#xA;&#xD;&#xA;## Logging ##&#xD;&#xA;When you run perfmon you want to select to create a new manually defined Data Collector Set for Performance Counters.  There will be a screen that asks for the sample interval.  You need to make sure that the sample interval is small enough to capture the problem but not so small that you overwhelm the system with data logging.&#xD;&#xA;&#xD;&#xA;I would recommend setting the capture to manually start/stop.  So that you can start the capture, repro the problem, then stop and analyze the logs.&#xD;&#xA;&#xD;&#xA;## Analyzing Data ##&#xD;&#xA;The perfmon utility allows you to look at every counter individually.  If you know what you're looking for, this works.  If you're not familiar with this process or which counters to look at, you might benefit from using an automated analysis tool such as [PAL][1].  PAL is free and awesome.  Essentially it has a set of thresholds defined for each counter, it parses through your log collection and spits out an HTML report that shows you:&lt;br&gt;&#xD;&#xA;**Warnings** - Any counter that is close to a threshold&lt;br&gt;&#xD;&#xA;**Critical** - Any counter that has exceeded a threshold&#xD;&#xA;&#xD;&#xA;This can be a simple way to start your analysis and narrow in on any items marked Critical.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Best Guess/Speculation on Problem Statement&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;To add to the speculation about what it might be. It sounds like you may be under memory pressure.  This means that physical free memory has been exhausted and the os needs to read or write memory contents to or from disk.&#xD;&#xA;&#xD;&#xA;The perfmon data that would validate the above scenario would show a steady rise  in memory utilization followed by a sharp fall. Simultaneously there would be a sharp rise in pagefile usage as well as local disk I/o.  Again, just speculating without any hard data (which you need).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pal.codeplex.com/" />
  <row Id="14925" PostHistoryTypeId="2" PostId="7426" RevisionGUID="33e9f00b-85a6-4bec-bfe8-c7b035af246f" CreationDate="2011-01-15T21:17:07.030" UserId="2854" Text="The [DeviantArt Job Offers Forum][1] is a place where people often request such projects from designers. You can probably find proposals with prices, but from what I can tell, they're very disparate. &#xD;&#xA;&#xD;&#xA;  [1]: http://forum.deviantart.com/jobs/offers/" />
  <row Id="14926" PostHistoryTypeId="25" PostId="7415" RevisionGUID="aff5d7db-0b8a-43bc-9b51-0976e35a594a" CreationDate="2011-01-15T22:55:35.247" Comment="http://twitter.com/#!/StackGameDev/status/26412205872254976" />
  <row Id="14927" PostHistoryTypeId="2" PostId="7427" RevisionGUID="4e4aea9a-5b7b-4984-a51b-e6410af682ee" CreationDate="2011-01-15T23:19:10.597" UserId="4679" Text="I'm having a go at creating a very simple text based game and am wondering what the standard design patterns are when it comes to entities (characters, sentient scenery) and the actions those entities can perform.&#xD;&#xA;&#xD;&#xA;As an example, I have entity that is a 'person' with various properties such as age, gender, height, etc. This 'person' can also perform some actions such as speaking, walking, jumping, flying, etc etc.&#xD;&#xA;&#xD;&#xA;How would you seperate out the entity from the actions it can perform and what are some common design patterns that solve this kind of problem?" />
  <row Id="14928" PostHistoryTypeId="1" PostId="7427" RevisionGUID="4e4aea9a-5b7b-4984-a51b-e6410af682ee" CreationDate="2011-01-15T23:19:10.597" UserId="4679" Text="Seperating entities from their actions or behaviours" />
  <row Id="14929" PostHistoryTypeId="3" PostId="7427" RevisionGUID="4e4aea9a-5b7b-4984-a51b-e6410af682ee" CreationDate="2011-01-15T23:19:10.597" UserId="4679" Text="&lt;design-patterns&gt;&lt;text-based&gt;&lt;behavior&gt;" />
  <row Id="14930" PostHistoryTypeId="2" PostId="7428" RevisionGUID="ef2921b7-834c-49c6-82db-a0ed00665a46" CreationDate="2011-01-15T23:30:40.580" UserId="51" Text="The common answer you'll get is &quot;with components&quot;.  There are lots of questions with that phrase in them that you can search through.&#xD;&#xA;&#xD;&#xA;In particular, here's a good article that has been linked to several times that's worth a read: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" />
  <row Id="14931" PostHistoryTypeId="25" PostId="7427" RevisionGUID="0d07f1b4-7ffa-4e9e-b821-c2cf05847ff4" CreationDate="2011-01-16T01:55:36.130" Comment="http://twitter.com/#!/StackGameDev/status/26457507849310209" />
  <row Id="14932" PostHistoryTypeId="2" PostId="7429" RevisionGUID="79846cd8-a377-4f26-8162-cc31586a8788" CreationDate="2011-01-16T03:19:11.917" UserDisplayName="Jim Deleh" Text="A friend of mine has had his Flash game stolen and published on the iPhone app store without his consent.  What is the best way to get Apple's attention about this?" />
  <row Id="14933" PostHistoryTypeId="1" PostId="7429" RevisionGUID="79846cd8-a377-4f26-8162-cc31586a8788" CreationDate="2011-01-16T03:19:11.917" UserDisplayName="Jim Deleh" Text="How do I get Apple to pull an App that violates a copyright?" />
  <row Id="14934" PostHistoryTypeId="3" PostId="7429" RevisionGUID="79846cd8-a377-4f26-8162-cc31586a8788" CreationDate="2011-01-16T03:19:11.917" UserDisplayName="Jim Deleh" Text="&lt;copyright&gt;" />
  <row Id="14935" PostHistoryTypeId="25" PostId="7429" RevisionGUID="62477224-21f5-4976-b26b-010dc2decb3f" CreationDate="2011-01-16T04:55:36.653" Comment="http://twitter.com/#!/StackGameDev/status/26502808211562496" />
  <row Id="14936" PostHistoryTypeId="17" PostId="7431" RevisionGUID="452450e3-d287-4e29-8fc5-35f94d6d868a" CreationDate="2011-01-16T04:57:07.937" UserId="-1" Comment="from http://stackoverflow.com/questions/4696714/android-threads-trouble-wrapping-my-head-around-design/4696945#4696945" Text="" />
  <row Id="14937" PostHistoryTypeId="17" PostId="7432" RevisionGUID="7d72c379-b637-4a6b-9a23-51546e243fcc" CreationDate="2011-01-16T04:57:07.937" UserId="-1" Comment="from http://stackoverflow.com/questions/4696714/android-threads-trouble-wrapping-my-head-around-design/4696955#4696955" Text="" />
  <row Id="14938" PostHistoryTypeId="2" PostId="7431" RevisionGUID="85975b6b-a8d8-4f34-b863-501444ed3134" CreationDate="2011-01-14T23:15:37.670" UserDisplayName="Viktor Lannér" Text="I highly recommend that you have a render thread (using `Canvas`/`OpenGL ES`, `Canvas` is probably a little bit easier to setup) and a game thread where you put your game logic.&#xD;&#xA;&#xD;&#xA;To actually &quot;load&quot; the game you can create a GameEngine class and make that the central point of your application. When your renderer is ready to go you can create a callback to the GameEngine instance which will create and start two threads using a `Runnable` for the rendering and another `Runnable` for the game logic.&#xD;&#xA;&#xD;&#xA;Sample code:&#xD;&#xA;## Application start ##&#xD;&#xA;    private GameEngine engine;&#xD;&#xA;    private CanvasRenderer renderer;&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    protected void onCreate(Bundle savedInstanceState) {&#xD;&#xA;       super.onCreate(savedInstanceState);&#xD;&#xA;       // Create instances of your two Runnable classes and pass that into&#xD;&#xA;       // the GameEngine constructor.&#xD;&#xA;       // Create an instance of the game engine.&#xD;&#xA;       engine = new GameEngine(canvasRunnable, gamelogicRunnable);&#xD;&#xA;       renderer = new CanvasRenderer(this, engine); &#xD;&#xA;       setContentView(renderer); &#xD;&#xA;    }&#xD;&#xA;## CanvasRenderer ##&#xD;&#xA;&#xD;&#xA;    private GameEngine engine;    &#xD;&#xA;&#xD;&#xA;    // Save your instance from the GameEngine reference in your constrcutor and make&#xD;&#xA;    // a global initializion for your GameEngine instance.  &#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    public void surfaceCreated(SurfaceHolder holder) {  &#xD;&#xA;       // One time setup here.&#xD;&#xA;       // When your view is ready, make this callback to the &#xD;&#xA;       // GameEngine.&#xD;&#xA;       engine.surfaceIsReady();&#xD;&#xA;    }&#xD;&#xA;## GameEngine ##&#xD;&#xA;&#xD;&#xA;    private Thread canvasThread;&#xD;&#xA;    private CanvasRunnable canvasRunnable;&#xD;&#xA;    // You should be able to figure out how to create a second thread&#xD;&#xA;    // where you should put your game logic. :)&#xD;&#xA;&#xD;&#xA;    // Constructor stuff like creating instances of your threads&#xD;&#xA;    // and passing references as you wish to those.&#xD;&#xA;    // Don't start the threads here.&#xD;&#xA;    // Remember to set references from your Runnable's into your Thread's &#xD;&#xA;    // instances here!&#xD;&#xA;    &#xD;&#xA;    /**&#xD;&#xA;     * Callback. Now your renderer is ready and you&#xD;&#xA;     * can start your threads.&#xD;&#xA;     */&#xD;&#xA;    public void surfaceIsReady() {&#xD;&#xA;       thread.setName(&quot;Canvas&quot;);&#xD;&#xA;       thread.start();&#xD;&#xA;       // Same for game logic.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;" />
  <row Id="14939" PostHistoryTypeId="2" PostId="7432" RevisionGUID="172b536c-410d-4c04-8183-bd0675bed65f" CreationDate="2011-01-14T23:17:16.747" UserDisplayName="Roflcoptr" Text="If you understand german, [this tutorial][1] is very nice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For english language I can recommend [this tutorial][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.androidpit.de/de/android/wiki/view/Spieleentwicklung_101#toc220&#xD;&#xA;  [2]: http://www.rbgrn.net/content/54-getting-started-android-game-development&#xD;&#xA;&#xD;&#xA;Concerning the thread class: I dont know if it is really necessary that you can refefrnce from all the classes in your application. In my game, I solved it that way:&#xD;&#xA;&#xD;&#xA;The class that is responsible to draw the main GUI has an overriden render method. In this a thread class is called which updates all the GUI elements and processes user inputs.&#xD;&#xA;&#xD;&#xA;The thread is also responsible to maintain a constant framerate. Depending on the game your developing this could be important." />
  <row Id="14940" PostHistoryTypeId="2" PostId="7430" RevisionGUID="132ac9e1-13bb-4b10-9b65-93736eaa99bb" CreationDate="2011-01-14T22:35:48.763" UserId="4664" Text="I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I create instances of all classes and do all the drawing and calculation in there.&#xD;&#xA;&#xD;&#xA;Question: Should I instead create the instances of other classes in my activity?&#xD;&#xA;&#xD;&#xA;Now I create a custom thread class that handles the game loop.&#xD;&#xA;&#xD;&#xA;Question: How do I use this one class in all my activities? Or do I have to create a separate instance of the extended thread class each time?&#xD;&#xA;&#xD;&#xA;In my previous game, I had multiple levels that had to create an instance of the thread class and in the thread class I had to set constructor methods for each separate level and in the loop use a switch statement to check which level it needs to render and update. Sorry if that sounds confusing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I just want to know if the method I am using is inefficient (which it probably is) and how to go about designing it the correct way. I have read many tutorials out there and I am still having lots of trouble with this particular topic. Maybe a link to a some tutorials that explain this? Thanks." />
  <row Id="14941" PostHistoryTypeId="1" PostId="7430" RevisionGUID="132ac9e1-13bb-4b10-9b65-93736eaa99bb" CreationDate="2011-01-14T22:35:48.763" UserId="4664" Text="Android threads trouble wrapping my head around design" />
  <row Id="14942" PostHistoryTypeId="3" PostId="7430" RevisionGUID="132ac9e1-13bb-4b10-9b65-93736eaa99bb" CreationDate="2011-01-14T22:35:48.763" UserId="4664" Text="&lt;java&gt;&lt;android&gt;&lt;multithreading&gt;&lt;design&gt;&lt;game-development&gt;" />
  <row Id="14943" PostHistoryTypeId="17" PostId="7430" RevisionGUID="ce1d0da9-539f-4fd6-a044-1178d2a7a8ee" CreationDate="2011-01-16T04:57:07.937" UserId="-1" Comment="from http://stackoverflow.com/questions/4696714/android-threads-trouble-wrapping-my-head-around-design" Text="" />
  <row Id="14944" PostHistoryTypeId="17" PostId="7434" RevisionGUID="1a4ce97a-3391-49fa-be17-2e3ac5583abe" CreationDate="2011-01-16T05:03:46.200" UserId="-1" Comment="from http://stackoverflow.com/questions/4700560/what-frameworks-are-available-for-cross-device-2d-game-development/4701676#4701676" Text="" />
  <row Id="14945" PostHistoryTypeId="2" PostId="7434" RevisionGUID="7138a400-985c-405d-a5ca-59739b212d95" CreationDate="2011-01-15T19:27:15.363" UserDisplayName="Joe Blow" Text="Corona ?&#xD;&#xA;&#xD;&#xA;the big downside with Unity3D is you need two or three really large monitors  :)" />
  <row Id="14946" PostHistoryTypeId="2" PostId="7433" RevisionGUID="b4396c9d-9f11-4e6a-a1d1-72d93e9118f5" CreationDate="2011-01-15T16:01:30.143" UserId="4671" Text="I'm about to embark on a 2D gaming project. Initially, I'll be targeting iPhone and Facebook, but would like to expand the rollout to include Android (and possibly Windows Phone) in a future phase.&#xD;&#xA;&#xD;&#xA;Flash and Unity seem to be the most likely suspects, but is one better than the other? Are there pros/cons that may not be obvious at first glance? Are there frameworks that I have not considered?&#xD;&#xA;&#xD;&#xA;I am primarily a .NET developer, so the Unity C# integration is appealling. But I also have experience with AS3, JavaScript and Objective-C.&#xD;&#xA;&#xD;&#xA;Rich" />
  <row Id="14947" PostHistoryTypeId="1" PostId="7433" RevisionGUID="b4396c9d-9f11-4e6a-a1d1-72d93e9118f5" CreationDate="2011-01-15T16:01:30.143" UserId="4671" Text="What frameworks are available for cross device 2d game development?" />
  <row Id="14948" PostHistoryTypeId="3" PostId="7433" RevisionGUID="b4396c9d-9f11-4e6a-a1d1-72d93e9118f5" CreationDate="2011-01-15T16:01:30.143" UserId="4671" Text="&lt;iphone&gt;&lt;game-development&gt;&lt;unity&gt;&lt;flash-cs5&gt;&lt;game-engine&gt;" />
  <row Id="14949" PostHistoryTypeId="17" PostId="7433" RevisionGUID="b2675872-30c0-479b-8b4b-822740060420" CreationDate="2011-01-16T05:03:46.200" UserId="-1" Comment="from http://stackoverflow.com/questions/4700560/what-frameworks-are-available-for-cross-device-2d-game-development" Text="" />
  <row Id="14950" PostHistoryTypeId="2" PostId="7435" RevisionGUID="a35bc6ae-ff65-4463-bcec-ec728cba7780" CreationDate="2011-01-16T05:35:02.220" UserId="4682" Text="Sorry if the question is not worded well, I'm a new to both 3D and OpenGL. &#xD;&#xA;&#xD;&#xA;How could I go about obtaining the 3D coordinates of the ***occluding*** object, **at the point where occlusion is happening** (i.e. the 'intersection' of the object in front/closest to the screen)?&#xD;&#xA;&#xD;&#xA;Just to offer a [very] rudimentary, visual, example, if you were to form an index-finger cross, with your right hand closest to your face, I'd like to know the coordinates of the part of your ***right*** finger which obscures the other finger (obviously back within the OpenGL context - no jokers ;-) ).&#xD;&#xA;&#xD;&#xA;If there is a way to find out both about the occluder (hider) and the occluded (hidden) objects in OpenGL, then that would be of great use, also.&#xD;&#xA;&#xD;&#xA;Cheers&#xD;&#xA;&#xD;&#xA;Rich" />
  <row Id="14951" PostHistoryTypeId="1" PostId="7435" RevisionGUID="a35bc6ae-ff65-4463-bcec-ec728cba7780" CreationDate="2011-01-16T05:35:02.220" UserId="4682" Text="Retrieve the coordinates of the *occluding* (closest/drawn) pixels during 3D overlap, using OpenGL?" />
  <row Id="14952" PostHistoryTypeId="3" PostId="7435" RevisionGUID="a35bc6ae-ff65-4463-bcec-ec728cba7780" CreationDate="2011-01-16T05:35:02.220" UserId="4682" Text="&lt;3d&gt;&lt;opengl&gt;" />
  <row Id="14953" PostHistoryTypeId="6" PostId="7433" RevisionGUID="524d0605-a5d1-488b-87d9-6cdb61628f3f" CreationDate="2011-01-16T05:44:35.467" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;iphone&gt;&lt;unity&gt;&lt;flash-cs5&gt;" />
  <row Id="14954" PostHistoryTypeId="6" PostId="7430" RevisionGUID="a7e830d4-19cf-4515-8eba-7c0adcd29418" CreationDate="2011-01-16T05:45:18.540" UserId="51" Comment="edited tags" Text="&lt;java&gt;&lt;android&gt;&lt;multithreading&gt;&lt;design&gt;" />
  <row Id="14955" PostHistoryTypeId="2" PostId="7436" RevisionGUID="7ff67bb6-91d9-4f5a-8540-1b4a68548374" CreationDate="2011-01-16T07:02:16.470" UserId="51" Text="Unity's great and all, and works pretty well on the iPhone, but for Facebook there are two near-fatal flaws.&#xD;&#xA;&#xD;&#xA;1) Technical flaw: it always drops on top of other elements on the web page it's on.  If you want to do a facebook &quot;post to wall&quot; fake popup window thing, you'll probably have to work around it by reducing the size of your unity window to 1x1.  There might be ways around it by doing your facebook requests with your own UI, but I'm not entirely sure if that's possible/allowed.&#xD;&#xA;&#xD;&#xA;2) Non-technical flaw: Users don't like installing plugins.  You're not going to hit super high numbers by using a Unity game.  This might change in the future, especially as more big-name people start using Unity for their web games (WB and EA in particular use it pretty frequently).&#xD;&#xA;&#xD;&#xA;That being said, I'd trust Unity over the Flash cross compiler for iPhone dev any day of the week.  It also has Android support.  It doesn't have Linux support, and it most likely will never have WP7 support.  &#xD;&#xA;&#xD;&#xA;For reference, our game 2D game, Splode, was shipped to the following platforms: iPhone/iPad (universal app), Mac app store, and android apps store.  Cross platform dev was pretty easy, all things considered.  " />
  <row Id="14956" PostHistoryTypeId="25" PostId="7435" RevisionGUID="2c4acad6-f268-4c15-a5f9-3b4eafc30be5" CreationDate="2011-01-16T07:55:36.860" Comment="http://twitter.com/#!/StackGameDev/status/26548107516841984" />
  <row Id="14957" PostHistoryTypeId="2" PostId="7437" RevisionGUID="c7c13611-01e1-4eac-8d1c-2a2095f0f8ae" CreationDate="2011-01-16T08:17:50.507" UserId="1430" Text="At the bottom of every app's page in the app store on the phone is a &quot;Report a problem&quot; button you could try, but I suspect the best way is to have your friend's lawyer handle it (and if your friend does not have a lawyer, he or she may want to consider finding and talking with one)." />
  <row Id="14958" PostHistoryTypeId="25" PostId="7430" RevisionGUID="19610b81-0612-494b-9911-5d7d04ef964b" CreationDate="2011-01-16T13:55:36.787" Comment="http://twitter.com/#!/StackGameDev/status/26638704328056832" />
  <row Id="14962" PostHistoryTypeId="2" PostId="7439" RevisionGUID="25c91993-7624-4a86-a021-fa0548444093" CreationDate="2011-01-16T15:07:24.597" UserId="4129" Text="Finding the foremost object can be thought of as 'picking'.  There are basically [three obvious ways][1] to do it - using GL's selection mode, using unique colours for objects when rendering them and finally doing it via geometry on the CPU rather than using OpenGL.&#xD;&#xA;&#xD;&#xA;If using OpenGL, you could draw the scene back to front, doing a test after each draw, to determine the next-most-top object at that location.&#xD;&#xA;&#xD;&#xA;Ultimately, using ray intersections with octrees is going to be a far more professional solution.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/faq/technical/selection.htm" />
  <row Id="14963" PostHistoryTypeId="2" PostId="7440" RevisionGUID="a0408053-752b-4df4-a3e6-d03a629ef01f" CreationDate="2011-01-16T15:21:37.687" UserId="2763" Text="[Here][1] is a lot of tutorials on Post Processing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://digitalerr0r.wordpress.com/tutorials/" />
  <row Id="14964" PostHistoryTypeId="4" PostId="4990" RevisionGUID="fdd7e69f-e0e3-40a6-93d5-f34685ef4172" CreationDate="2011-01-16T15:28:53.167" UserId="14" Comment="edited tags; edited title" Text="Coordinates from 3DS Max  to XNA 3.5 " />
  <row Id="14965" PostHistoryTypeId="6" PostId="4990" RevisionGUID="fdd7e69f-e0e3-40a6-93d5-f34685ef4172" CreationDate="2011-01-16T15:28:53.167" UserId="14" Comment="edited tags; edited title" Text="&lt;xna&gt;&lt;c#&gt;&lt;coordinates&gt;&lt;3dsmax&gt;" />
  <row Id="14966" PostHistoryTypeId="25" PostId="7433" RevisionGUID="c79d2157-8315-47a5-a2c2-5a872a90cd31" CreationDate="2011-01-16T16:55:36.993" Comment="http://twitter.com/#!/StackGameDev/status/26684003482341376" />
  <row Id="14967" PostHistoryTypeId="2" PostId="7441" RevisionGUID="4963ce9d-bb9a-4b7f-a42b-5ede397c0894" CreationDate="2011-01-16T17:57:15.570" UserId="154" Text="IANAL but unless they directly copied art resources you are likely out of luck. Game mechanics are incredibly hard to defend and frankly it's in the industries interest that they remain that way.&#xD;&#xA;&#xD;&#xA;You can attack someone for directly coping the wording of your games rules, and art coping is an obvious point of contention. However if their game just plays like your game then you are pretty much out of luck.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="14968" PostHistoryTypeId="2" PostId="7442" RevisionGUID="04dfef0c-815e-43d1-9abc-0a653d4726c4" CreationDate="2011-01-16T18:43:49.550" UserId="4688" Text="Here is a interesting thread regarding copyright and games.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems/" />
  <row Id="14969" PostHistoryTypeId="25" PostId="7069" RevisionGUID="857de507-d76b-4da2-afc8-1f7a27255511" CreationDate="2011-01-16T19:55:37.150" Comment="http://twitter.com/#!/StackGameDev/status/26729302326255616" />
  <row Id="14970" PostHistoryTypeId="2" PostId="7443" RevisionGUID="02ec659d-081f-4e62-8c7e-a6be2d6598aa" CreationDate="2011-01-16T20:16:58.987" UserId="4690" Text="The short answer: Iterate, iterate, iterate. Start small, and get something running before trying to implement the whole system. It's still important to do some top-level design and planning, but being able to see what you're working with and playtest parts as you go is incredibly important to staying motivated; it's hard for me (and most any other programmer I know) to work day in and day out on something that doesn't actually show them visible results." />
  <row Id="14971" PostHistoryTypeId="2" PostId="7444" RevisionGUID="081c63ee-b803-4c83-a929-4e853b85cee7" CreationDate="2011-01-17T00:40:53.860" UserId="4690" Text="LittleBigPlanet2 just came out. I've worked with the original LBP level editor a bit and really enjoyed it. I've read that LBP2's featureset in the game is much richer; is it possible to use these advanced features to create different sorts of game other than just a regular platformer? I imagine that something along the lines of a Breakout clone would definitely be manageable, but I'm interested in hearing more about the capabilities of the platform." />
  <row Id="14972" PostHistoryTypeId="1" PostId="7444" RevisionGUID="081c63ee-b803-4c83-a929-4e853b85cee7" CreationDate="2011-01-17T00:40:53.860" UserId="4690" Text="Can LittleBigPlanet2's engine be used for other ?" />
  <row Id="14973" PostHistoryTypeId="3" PostId="7444" RevisionGUID="081c63ee-b803-4c83-a929-4e853b85cee7" CreationDate="2011-01-17T00:40:53.860" UserId="4690" Text="&lt;hobby-development&gt;&lt;console&gt;" />
  <row Id="14974" PostHistoryTypeId="2" PostId="7445" RevisionGUID="f40fb0d1-e97c-4b6b-a31b-9c2a6758a6c8" CreationDate="2011-01-17T01:54:36.767" UserId="953" Text="Seems like it can: http://www.youtube.com/watch?v=afjZUFRNLqc If you google for various game &quot;genres&quot; along with &quot;LittleBigPlanet 2,&quot; there are plenty of other examples." />
  <row Id="14975" PostHistoryTypeId="25" PostId="7444" RevisionGUID="f2a6c301-0a59-4575-95f5-801643444ebf" CreationDate="2011-01-17T01:55:36.667" Comment="http://twitter.com/#!/StackGameDev/status/26819897770123264" />
  <row Id="14976" PostHistoryTypeId="25" PostId="7269" RevisionGUID="f883435f-4462-4d02-8eec-4c54daae8e2e" CreationDate="2011-01-17T04:55:37.137" Comment="http://twitter.com/#!/StackGameDev/status/26865198149140480" />
  <row Id="14977" PostHistoryTypeId="5" PostId="7350" RevisionGUID="abd6b0f9-169a-4727-9adc-cfbb78a041df" CreationDate="2011-01-17T05:16:52.113" UserId="4261" Comment="added 136 characters in body" Text="I'm slightly confused about how Direct3D rendering works. Basically, as long as I render to one surface, everything is fine. But when I try rendering to multiple surfaces, it seems like everything is still rendered to one surface. I think there's something wrong with my calls.&#xD;&#xA;&#xD;&#xA;For each update cycle this is what I do&#xD;&#xA;1. device-&gt;BeginScene()&#xD;&#xA;2. sprite-&gt;Begin(...)&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;A bunch of GetRenderTarget to store the old render target, then SetRenderTarget to set a new surface, and then things like CreateVertexBuffer, SetTexture, etc to draw on the new render target. Then resetting to the old render target.&#xD;&#xA;&#xD;&#xA;4. sprite-&gt;Draw([the back buffer]) (the back buffer is actually another surface, not the actual back buffer. But here it is being drawn onto the actual back buffer, I think)&#xD;&#xA;5. sprite-&gt;End()&#xD;&#xA;6. device-&gt;EndScene()&#xD;&#xA;7. device-&gt;Present(...)&#xD;&#xA;&#xD;&#xA;Also, it seems like if I mix sprite drawing and non-sprite drawing onto a surface, that first one set of render commands is executed and then the other set, rather than in order by when each command was called.&#xD;&#xA;&#xD;&#xA;If anyone could shed light on any of this, it would be much appreciated.&#xD;&#xA;&#xD;&#xA;EDIT: To clarify, my render targets are mainly surface 0 of the texture created by D3DXCreateTexture or D3DXCreateTextureFromFileEx." />
  <row Id="14978" PostHistoryTypeId="2" PostId="7446" RevisionGUID="50f41a40-a159-43a2-8b10-2ef40cdba261" CreationDate="2011-01-17T06:38:46.620" UserId="4105" Text="I have a very old adult (e.g. boobs and stuff) arcade game (think Delphi 7/DirectX 8 age), that currently is backported to Droid. Can the game be published to Android Market? Are there any age restrictions?" />
  <row Id="14979" PostHistoryTypeId="1" PostId="7446" RevisionGUID="50f41a40-a159-43a2-8b10-2ef40cdba261" CreationDate="2011-01-17T06:38:46.620" UserId="4105" Text="Can I publish games with adult content to Android Market?" />
  <row Id="14980" PostHistoryTypeId="3" PostId="7446" RevisionGUID="50f41a40-a159-43a2-8b10-2ef40cdba261" CreationDate="2011-01-17T06:38:46.620" UserId="4105" Text="&lt;android&gt;&lt;content-rating&gt;" />
  <row Id="14981" PostHistoryTypeId="2" PostId="7447" RevisionGUID="9cd0a47e-90fc-40ad-b357-ad0a446c51f4" CreationDate="2011-01-17T06:55:06.287" UserId="4696" Text="Obviously you can't. You'll have to host it on your own.&#xD;&#xA;&#xD;&#xA;See developer [content-policy][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.android.com/us/developer-content-policy.html" />
  <row Id="14982" PostHistoryTypeId="2" PostId="7448" RevisionGUID="2e64ee30-2cc2-4a2d-b960-c820ac237722" CreationDate="2011-01-17T06:58:47.253" UserId="4514" Text="There's plenty of prior art in the whole [MUD][1] and [MUSH][2] culture, with many open source platforms. Many MU*'S include support for adding behaviors/actions on the fly--i.e. admin users can create new commands via scripting. Then there's [Inform7][3], which is arguably the state of the art for [IF][4] or and single-player, text-based games today.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/MUD&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/MUSH&#xD;&#xA;  [3]: http://inform7.com/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Interactive_fiction" />
  <row Id="14983" PostHistoryTypeId="25" PostId="7446" RevisionGUID="edb6c17b-cec0-4aeb-97b5-0a9addf162c9" CreationDate="2011-01-17T07:55:37.013" Comment="http://twitter.com/#!/StackGameDev/status/26910496191938560" />
  <row Id="14984" PostHistoryTypeId="2" PostId="7449" RevisionGUID="54a8baf8-750a-4a9e-abb9-72798584ce17" CreationDate="2011-01-17T07:56:58.487" UserId="4697" Text="I'm trying to learn a little about OpenGL, so I'm making a simple 2D game (with OpenTK), and so far it's coming along well. I thought it would be fun to give it that, for lack of a better word, retropixelated look of games from the early nineties. I figured it would be an easy thing to do -- simply draw everything at half its normal size and scale up with no anti-aliasing.&#xD;&#xA;&#xD;&#xA;But I can't find any resources on how to do this. I can set the min/mag filters of my textures to nearest and that works fine for my sprites, but I'm using lots of primitives and I'd like the effect to apply to them as well.&#xD;&#xA;&#xD;&#xA;The one idea I had was to draw everything at half size, then somehow copy the render buffer to a texture, then render that texture full-size, but I don't know how to do that, and it seems like there must be a better way. Can anyone help me out?" />
  <row Id="14985" PostHistoryTypeId="1" PostId="7449" RevisionGUID="54a8baf8-750a-4a9e-abb9-72798584ce17" CreationDate="2011-01-17T07:56:58.487" UserId="4697" Text="Is there a global &quot;low resolution&quot; filter for OpenGL?" />
  <row Id="14986" PostHistoryTypeId="3" PostId="7449" RevisionGUID="54a8baf8-750a-4a9e-abb9-72798584ce17" CreationDate="2011-01-17T07:56:58.487" UserId="4697" Text="&lt;opengl&gt;" />
  <row Id="14987" PostHistoryTypeId="2" PostId="7450" RevisionGUID="2123a43f-17a0-4fd1-8894-06648830fb31" CreationDate="2011-01-17T08:16:54.313" UserId="4264" Text="Basic idea is to render to a framebuffer object, bind that as a texture and render the texture on screen on a full-screen quad.&#xD;&#xA;&#xD;&#xA;If you want to support lower-end hardware, you may want to render to the top-left corner of the screen instead, copy the bits to a texture and then render the full-screen quad; this is, however, much slower than the FBO technique, if FBO is available." />
  <row Id="14988" PostHistoryTypeId="5" PostId="7450" RevisionGUID="faf64fd1-cc55-42bd-ab3a-59188c2e2817" CreationDate="2011-01-17T09:05:01.413" UserId="4264" Comment="added 154 characters in body" Text="Basic idea is to render to a &lt;a href=&quot;http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt&quot;&gt;framebuffer object&lt;/a&gt;, bind that as a texture and render the texture on screen on a full-screen quad.&#xD;&#xA;&#xD;&#xA;If you want to support lower-end hardware, you may want to render to the top-left corner of the screen instead, &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml&quot;&gt;copy the bits&lt;/a&gt; to a texture and then render the full-screen quad; this is, however, much slower than the FBO technique, if FBO is available." />
  <row Id="14989" PostHistoryTypeId="2" PostId="7451" RevisionGUID="eec40995-8456-478e-96fa-2b37a42d258f" CreationDate="2011-01-17T09:36:25.967" UserId="721" Text="Android Market has a very restrictive adult category. So you probably can't. But, you can publish your application on alternative markets as Mikandi or Appslib.&#xD;&#xA;&#xD;&#xA; - http://www.mikandi.com/ (Semi official porn market for android)&#xD;&#xA; - http://appslib.com/ (Archos market with an adult category)" />
  <row Id="14990" PostHistoryTypeId="2" PostId="7452" RevisionGUID="cfa46188-6467-4628-8954-421a4d2b40cb" CreationDate="2011-01-17T10:53:56.927" UserId="1590" Text="Besides SWFMill, there's also [Sam HaXe][1]. Haven't used it (yet), but I ran into some obscure problems with SWFMill at some point so I'll be trying SamHaXe in the near future instead. According to the documentation, you can embed arbitrary (binary) files with optional zlib compression, so embedding xml files shouldn't be a problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mindless-labs.com/trac/samhaxe/" />
  <row Id="14991" PostHistoryTypeId="25" PostId="7449" RevisionGUID="3d403ab4-4f1f-4a10-be7d-aaf22c1f9f41" CreationDate="2011-01-17T10:55:37.657" Comment="http://twitter.com/#!/StackGameDev/status/26955797439188992" />
  <row Id="14992" PostHistoryTypeId="2" PostId="7453" RevisionGUID="0b529184-2142-4ad6-b495-67f9a51583a6" CreationDate="2011-01-17T13:30:57.993" UserId="4463" Text="If we take the game Angry Birds that had big success lately I were thinking how do they implement the physics in a game like that?&#xD;&#xA;&#xD;&#xA;Your are shooting of your birds and they hit something that will fall off and in turn creating a chain reaction of things either falling or exploding.. Are all this happening with calculations with rules considering all collisions together with gravity etc.?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="14993" PostHistoryTypeId="1" PostId="7453" RevisionGUID="0b529184-2142-4ad6-b495-67f9a51583a6" CreationDate="2011-01-17T13:30:57.993" UserId="4463" Text="How does 2D Game Physics work?" />
  <row Id="14994" PostHistoryTypeId="3" PostId="7453" RevisionGUID="0b529184-2142-4ad6-b495-67f9a51583a6" CreationDate="2011-01-17T13:30:57.993" UserId="4463" Text="&lt;game-design&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="14995" PostHistoryTypeId="25" PostId="7453" RevisionGUID="d441dccb-7a29-46bd-9fad-f3370fab27d9" CreationDate="2011-01-17T13:55:38.347" Comment="http://twitter.com/#!/StackGameDev/status/27001098623524865" />
  <row Id="14996" PostHistoryTypeId="2" PostId="7454" RevisionGUID="cdc66944-ceef-45c4-88be-da3543906cba" CreationDate="2011-01-17T14:05:49.057" UserId="1110" Text="I've done this quite a lot using the standard Flex SDK.  With a bit of python or something else you can even generate some nice class stubs to improve your work flow with the end product." />
  <row Id="14997" PostHistoryTypeId="2" PostId="7455" RevisionGUID="34d0e192-9188-4ea2-9c0b-f2397e9b2499" CreationDate="2011-01-17T14:09:04.577" UserId="2792" Text="Erin Catto, the guy who wrote the Box2D physics engine has made a lot of good presentations on how to make 2D physics engines.&#xD;&#xA;&#xD;&#xA;The general idea is to move your objects in small time steps, calculate intersections and then resolve them iteratively. Check out the GDC talks at http://code.google.com/p/box2d/downloads/list" />
  <row Id="14998" PostHistoryTypeId="5" PostId="4585" RevisionGUID="51c23d23-2348-4fba-a2a2-c4f622b595b3" CreationDate="2011-01-17T15:28:21.807" UserId="744" Comment="Clean up grammar and formatting, remove some filler." Text="The most advanced games I've made are a 8-ball pool game made with the physics engine Box2dFlashAS3 and a platform game with levels.&#xD;&#xA;&#xD;&#xA;When I did platform games, I've always wished to know how to make an engine, so that I could re-use it. When I see games that have slopes, curved slopes, perfect gravity and real-life physics, I've always wished I knew how to code the engine.&#xD;&#xA;&#xD;&#xA;Please suggest techniques and articles for whatever relevant knowledge-base is necessary." />
  <row Id="14999" PostHistoryTypeId="4" PostId="4585" RevisionGUID="51c23d23-2348-4fba-a2a2-c4f622b595b3" CreationDate="2011-01-17T15:28:21.807" UserId="744" Comment="Clean up grammar and formatting, remove some filler." Text="How do I build a 2D physics engine?" />
  <row Id="15000" PostHistoryTypeId="2" PostId="7456" RevisionGUID="b2ba29ef-0998-4d8b-933a-cf31bfcac0be" CreationDate="2011-01-17T15:44:50.513" UserId="1868" Text="Found a good post about iPad and HTML5:&#xD;&#xA;http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/" />
  <row Id="15001" PostHistoryTypeId="5" PostId="7456" RevisionGUID="b5b7c81c-290e-4db6-96a8-cc6bbf2b605d" CreationDate="2011-01-17T16:43:48.483" UserId="1868" Comment="added 96 characters in body" Text="Found a good post about iPad and HTML5:&#xD;&#xA;http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/&#xD;&#xA;&#xD;&#xA;Also I would avoid heavy canvas drawing on iPad, for some reason it seems to be pretty slow." />
  <row Id="15002" PostHistoryTypeId="25" PostId="7174" RevisionGUID="016b4b48-08f1-4010-837b-89b289fab15e" CreationDate="2011-01-17T16:55:38.690" Comment="http://twitter.com/#!/StackGameDev/status/27046398629253120" />
  <row Id="15003" PostHistoryTypeId="2" PostId="7457" RevisionGUID="ed9d77db-7335-47ce-b37d-72262d0608f5" CreationDate="2011-01-17T17:18:27.860" UserId="4707" Text="I have heard that textures consumes lot of memory but I am surprised how much....&#xD;&#xA;I have 7 textures 1024 16 bit each. And while I will run my app it consumes 57MB of memory.&#xD;&#xA;I think that this is &quot;a bit&quot; too much.&#xD;&#xA;&#xD;&#xA;I am writing 2D application (no cocos or other framework)&#xD;&#xA;&#xD;&#xA;Strange is that while I will compile my app with disabled rendering methods:&#xD;&#xA;glDrawArrays than It uses only 27MB....  which is about 30MB less...&#xD;&#xA;&#xD;&#xA;Do you have any Idea why?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am creating textures before rendering of course:&#xD;&#xA;rendering looks like this:&#xD;&#xA;&#xD;&#xA; [EAGLContext setCurrentContext:context];&#xD;&#xA; glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer);&#xD;&#xA;&#xD;&#xA; glClearColor(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA; glPushMatrix();&#xD;&#xA; glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA; glEnableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA; glEnable(GL_TEXTURE_2D);&#xD;&#xA; &#xD;&#xA; glEnable(GL_BLEND);&#xD;&#xA; glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;&#xD;&#xA; TeksturaObrazek *obrazek_klaw =[[AppDirector sharedAppDirector] obrazek_klaw];&#xD;&#xA; glBindTexture(GL_TEXTURE_2D, [[obrazek_klaw image_texture] name] );&#xD;&#xA;&#xD;&#xA;  glVertexPointer(2, GL_FLOAT, 0,vertex1);&#xD;&#xA;  glTexCoordPointer(2, GL_FLOAT, 0, vertex2);&#xD;&#xA;  glColor4f(1,1,1,alpha);&#xD;&#xA;  glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;&#xD;&#xA; glDisable(GL_BLEND);&#xD;&#xA; glDisable(GL_TEXTURE_2D);&#xD;&#xA; glDisableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA; glPopMatrix();&#xD;&#xA;    [context presentRenderbuffer:GL_RENDERBUFFER_OES];&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It looks like standard routine...&#xD;&#xA;I have spent about 2 days looking for for answer and I still have no clue.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15004" PostHistoryTypeId="1" PostId="7457" RevisionGUID="ed9d77db-7335-47ce-b37d-72262d0608f5" CreationDate="2011-01-17T17:18:27.860" UserId="4707" Text="opengl memory issue - quite strange." />
  <row Id="15005" PostHistoryTypeId="3" PostId="7457" RevisionGUID="ed9d77db-7335-47ce-b37d-72262d0608f5" CreationDate="2011-01-17T17:18:27.860" UserId="4707" Text="&lt;2d&gt;&lt;opengl&gt;&lt;iphone&gt;&lt;programming&gt;&lt;memory-efficiency&gt;" />
  <row Id="15006" PostHistoryTypeId="10" PostId="7453" RevisionGUID="b2d1ef3d-bac3-4d6b-a3ad-2a4274e685ed" CreationDate="2011-01-17T17:46:53.980" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="15007" PostHistoryTypeId="5" PostId="7453" RevisionGUID="6ef79f2b-4911-445a-8384-ff4c17fa773f" CreationDate="2011-01-17T17:46:54.090" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How do I build a 2D physics engine?](http://gamedev.stackexchange.com/questions/4585/how-do-i-build-a-2d-physics-engine)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;If we take the game Angry Birds that had big success lately I were thinking how do they implement the physics in a game like that?&#xD;&#xA;&#xD;&#xA;Your are shooting of your birds and they hit something that will fall off and in turn creating a chain reaction of things either falling or exploding.. Are all this happening with calculations with rules considering all collisions together with gravity etc.?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="15008" PostHistoryTypeId="5" PostId="7457" RevisionGUID="31218110-8709-4a9c-a872-f9f46e532782" CreationDate="2011-01-17T17:49:51.560" UserId="51" Comment="added 110 characters in body" Text="I have heard that textures consumes lot of memory but I am surprised how much....&#xD;&#xA;I have 7 textures 1024 16 bit each. And while I will run my app it consumes 57MB of memory.&#xD;&#xA;I think that this is &quot;a bit&quot; too much.&#xD;&#xA;&#xD;&#xA;I am writing 2D application (no cocos or other framework)&#xD;&#xA;&#xD;&#xA;Strange is that while I will compile my app with disabled rendering methods:&#xD;&#xA;glDrawArrays than It uses only 27MB....  which is about 30MB less...&#xD;&#xA;&#xD;&#xA;Do you have any Idea why?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am creating textures before rendering of course:&#xD;&#xA;rendering looks like this:&#xD;&#xA;&#xD;&#xA;     [EAGLContext setCurrentContext:context];&#xD;&#xA;     glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer);&#xD;&#xA;    &#xD;&#xA;     glClearColor(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;            glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;    &#xD;&#xA;     glPushMatrix();&#xD;&#xA;     glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;     glEnableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA;     glEnable(GL_TEXTURE_2D);&#xD;&#xA;     &#xD;&#xA;     glEnable(GL_BLEND);&#xD;&#xA;     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;    &#xD;&#xA;     TeksturaObrazek *obrazek_klaw =[[AppDirector sharedAppDirector] obrazek_klaw];&#xD;&#xA;     glBindTexture(GL_TEXTURE_2D, [[obrazek_klaw image_texture] name] );&#xD;&#xA;    &#xD;&#xA;      glVertexPointer(2, GL_FLOAT, 0,vertex1);&#xD;&#xA;      glTexCoordPointer(2, GL_FLOAT, 0, vertex2);&#xD;&#xA;      glColor4f(1,1,1,alpha);&#xD;&#xA;      glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;    &#xD;&#xA;     glDisable(GL_BLEND);&#xD;&#xA;     glDisable(GL_TEXTURE_2D);&#xD;&#xA;     glDisableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA;     glPopMatrix();&#xD;&#xA;        [context presentRenderbuffer:GL_RENDERBUFFER_OES];&#xD;&#xA;&#xD;&#xA;It looks like standard routine...&#xD;&#xA;I have spent about 2 days looking for for answer and I still have no clue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15009" PostHistoryTypeId="2" PostId="7458" RevisionGUID="1f9086ec-a5c2-4554-bcbb-92497fbf7ad8" CreationDate="2011-01-17T19:00:34.113" UserId="4552" Text="1) Your question sounds like &quot;What type should the template identifier be&quot;, but seeing your comment on James' answer I think you're actually asking &quot;How should templates be stored to make creating instances fast&quot;. It sounds like your entity template is basically a set of component templates, which themselves basically *are* instances of components. So, when you register these entity templates (either in code or by loading from a file), you'd just go through each component template in the entity template, look up the system by name (the components will need some kind of identifier, e.g. &quot;Renderable&quot;), and give that system the entity name (&quot;Alien&quot;) and the block of data that makes up that component template.&#xD;&#xA;&#xD;&#xA;If doing this at runtime, you can just construct a component and pass it along as that type (e.g. RenderSystem-&gt;register(&quot;Alien&quot;, AlienComponentData(1,2,3)); ), or if loading in from a file you can either pass in binary data for the system to just memcpy, or xml data for it to parse.&#xD;&#xA;&#xD;&#xA;2) Carrying on from my answer to 1), just copy the template, which *is* an instance of a component (just not one that's active in the game). Then add that to your set of active components, with its entity id set. Nice and fast.&#xD;&#xA;&#xD;&#xA;3) Not really, these things have to be done somewhere! In traditional inheritance-based entity structures it's just harder to see. Creating an entity by just copying some memory is going to be pretty slick, especially if you're copying it into already-allocated space inside a pool.&#xD;&#xA;&#xD;&#xA;I hope I've understood, and I hope my answers are what you were expecting :)" />
  <row Id="15010" PostHistoryTypeId="6" PostId="7401" RevisionGUID="d1c0b83f-c378-4b59-9e54-65774c64db02" CreationDate="2011-01-17T19:10:10.747" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;entity-system&gt;" />
  <row Id="15011" PostHistoryTypeId="2" PostId="7459" RevisionGUID="b220ca9c-673f-48ea-b64d-e170f866747c" CreationDate="2011-01-17T19:17:17.650" UserId="4552" Text="I assume that when texturing environments, one or several textures will be used, and the UVs of the environment geometry will likely overlap on these textures, so that e.g. a tiling brick texture can be used by many parts of the environment, rather than UV unwrapping the entire thing, and having several areas of the texture be identical. If my assumption is wrong, please let me know!&#xD;&#xA;&#xD;&#xA;Now, when thinking about baking lighting, clearly this can't be done the same way - lighting in general will be unique to every face so the environment *must* be UV unwrapped without overlap, and lighting *must* be baked onto unique areas of one or several textures, to give each surface its own texture space to store its lighting.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;&#xD;&#xA; 1. Have I got this wrong? If so, how?&#xD;&#xA; 2. Isn't baking lighting going to use a *lot* of texture space?&#xD;&#xA; 3. Will the geometry need two UV sets, one used for the colour/normal texture and one for the lighting texture?&#xD;&#xA; 4. Anything else you'd like to add? :)" />
  <row Id="15012" PostHistoryTypeId="1" PostId="7459" RevisionGUID="b220ca9c-673f-48ea-b64d-e170f866747c" CreationDate="2011-01-17T19:17:17.650" UserId="4552" Text="Is there any difference between storing textures and baked lighting for environment meshes?" />
  <row Id="15013" PostHistoryTypeId="3" PostId="7459" RevisionGUID="b220ca9c-673f-48ea-b64d-e170f866747c" CreationDate="2011-01-17T19:17:17.650" UserId="4552" Text="&lt;textures&gt;&lt;lighting&gt;&lt;uvw-mapping&gt;" />
  <row Id="15014" PostHistoryTypeId="6" PostId="1119" RevisionGUID="7e5f35ac-d4e6-4981-bf6d-0fa680da495a" CreationDate="2011-01-17T19:35:26.030" UserId="1156" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;entity-system&gt;" />
  <row Id="15015" PostHistoryTypeId="6" PostId="5106" RevisionGUID="b7cc50c0-3302-426e-94c3-964084fd3022" CreationDate="2011-01-17T19:35:57.763" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;architecture&gt;&lt;entity-system&gt;" />
  <row Id="15016" PostHistoryTypeId="6" PostId="4922" RevisionGUID="7ba848cd-51bf-4569-b01f-0f6feaf90070" CreationDate="2011-01-17T19:36:16.097" UserId="1156" Comment="edited tags" Text="&lt;engine&gt;&lt;scripting&gt;&lt;lua&gt;&lt;entity-system&gt;" />
  <row Id="15017" PostHistoryTypeId="2" PostId="7460" RevisionGUID="32ad4fdb-0120-4ace-9c70-cd82b44f2f56" CreationDate="2011-01-17T19:41:17.130" UserId="4598" Text=" 1. I think you are right. You would&#xD;&#xA;    really like to tile your bricks,&#xD;&#xA;    because it saves a lot of memory&#xD;&#xA;    space and is also quick in your GPU.&#xD;&#xA;    Baking the lighting does need a&#xD;&#xA;    unique texturing, because no place&#xD;&#xA;    is the same. You could tile some&#xD;&#xA;    parts of your texture, for example,&#xD;&#xA;    on really straight long places. (I'm&#xD;&#xA;    no UV wrapper, but I do think that&#xD;&#xA;    is possible to tile just parts,&#xD;&#xA;    right?)&#xD;&#xA;&#xD;&#xA; 2. Yes, baking lighting uses texture&#xD;&#xA;    space, but you could use different&#xD;&#xA;    LOD's (level of detail's) to create&#xD;&#xA;    your lighting. For instance, you could choose to just create a low-quality image as your baked lightmap.&#xD;&#xA;&#xD;&#xA; 3. Yes, you will need two UV sets, because this is way better than baking your tiled bricks into the lighting map as well. UV maps are just a matter of asking what the coordinates are (which is fast), so storing an extra UV maps isn't that much of a burden.&#xD;&#xA;&#xD;&#xA; 4. Shouldn't know what to add. It seems very clear. Just create 2 UV maps and create a lightmap if you want. It is always faster than casting realtime shadows." />
  <row Id="15018" PostHistoryTypeId="2" PostId="7461" RevisionGUID="c784a1de-78fd-4d8c-b551-aeaccdeed749" CreationDate="2011-01-17T21:51:37.570" UserId="1477" Text="What Are some Game Development publications (electronic or otherwise) that aren't so large that there is no chance to potentially get included in the publication after a few well-written articles sent their way.&#xD;&#xA;&#xD;&#xA;Looking for publications geared towards developers, not gamers, and can be any aspect of the game process, design, development, business, etc." />
  <row Id="15019" PostHistoryTypeId="1" PostId="7461" RevisionGUID="c784a1de-78fd-4d8c-b551-aeaccdeed749" CreationDate="2011-01-17T21:51:37.570" UserId="1477" Text="What are some Game Development Publications that accept outside articles" />
  <row Id="15020" PostHistoryTypeId="3" PostId="7461" RevisionGUID="c784a1de-78fd-4d8c-b551-aeaccdeed749" CreationDate="2011-01-17T21:51:37.570" UserId="1477" Text="&lt;marketing&gt;&lt;business&gt;&lt;publishing&gt;&lt;articles&gt;" />
  <row Id="15021" PostHistoryTypeId="2" PostId="7462" RevisionGUID="7daa31f2-cf5d-4fbd-b7d8-18645c41dab5" CreationDate="2011-01-17T22:01:32.300" UserId="2029" Text="Not exactly a publication, but you can always share articles you've written on gamedev.net" />
  <row Id="15022" PostHistoryTypeId="2" PostId="7463" RevisionGUID="cd93210b-4b8d-4b72-933c-96fc077ea435" CreationDate="2011-01-17T22:12:30.850" UserId="4410" Text="[Game Developer][1] magazine?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdmag.com/write/" />
  <row Id="15023" PostHistoryTypeId="2" PostId="7464" RevisionGUID="3d9da3ce-8f2a-43cf-bb56-44d8508f1f06" CreationDate="2011-01-17T22:13:00.210" UserId="3104" Text="[Gamasutra][1] might be an option.&#xD;&#xA;&#xD;&#xA;I don't know if they are too big and they do not explictly request articles but their site covers some of the topics you list.&#xD;&#xA;&#xD;&#xA;Their email address is at the bottom of their page.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/" />
  <row Id="15024" PostHistoryTypeId="2" PostId="7465" RevisionGUID="4cff73d2-6f92-43a5-801c-27080b4019cc" CreationDate="2011-01-17T22:16:08.920" UserDisplayName="user4710" Text="I'm an experienced programmer that recently got into iOS development by working through the big nerd ranch book by Aaron Hillegass and Joe Conway. I loved the way the book was structured in terms of typing in the code and doing the challenges.&#xD;&#xA;&#xD;&#xA;I'm interested in learning more about iOS gaming and cocos2d, but am a complete newbie in terms of game development/design. there are [a number of books on amazon on cocos2d][1], can anyone recommend one in particular?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=cocos2d&amp;x=0&amp;y=0" />
  <row Id="15025" PostHistoryTypeId="1" PostId="7465" RevisionGUID="4cff73d2-6f92-43a5-801c-27080b4019cc" CreationDate="2011-01-17T22:16:08.920" UserDisplayName="user4710" Text="recommended book for cocos2d?" />
  <row Id="15026" PostHistoryTypeId="3" PostId="7465" RevisionGUID="4cff73d2-6f92-43a5-801c-27080b4019cc" CreationDate="2011-01-17T22:16:08.920" UserDisplayName="user4710" Text="&lt;books&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="15027" PostHistoryTypeId="5" PostId="7017" RevisionGUID="078ff0df-9076-47f1-aff1-77759d543c69" CreationDate="2011-01-17T22:19:15.077" UserId="4345" Comment="added 165 characters in body" Text="Google Protocol Buffers seem like the way to go, but I haven't used them myself.    &#xD;&#xA;http://code.google.com/p/protobuf/&#xD;&#xA;&#xD;&#xA;You define a .proto file which describes the file format:&#xD;&#xA;&#xD;&#xA;    message Person {&#xD;&#xA;      required int32 id = 1;&#xD;&#xA;      required string name = 2;&#xD;&#xA;      optional string email = 3;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is then compiled with a command line tool which generates C/C++ classes to write and parse binary data files in the previously defined data format. There are also a couple of extension for different programming languages.&#xD;&#xA;&#xD;&#xA;The downside to ProtocolBuffer is that they aren't a plaintext format. You would need a tool to generate, read and edit them. But this shouldn't be a problem if you're using them only to exchange data between your game editor and your game. I wouldn't use it to define config files ;)&#xD;&#xA;&#xD;&#xA;Compressing the raw xml files should also work. What type of game are you making? If it is level-based then you should load all necessary resources only once when the level is loaded.&#xD;&#xA;&#xD;&#xA;**update:**&#xD;&#xA;There are several projects for other languages such as C# to work with ProtocolBuffers:    &#xD;&#xA;http://code.google.com/p/protobuf/wiki/ThirdPartyAddOns" />
  <row Id="15028" PostHistoryTypeId="2" PostId="7466" RevisionGUID="6b9add14-58a3-4272-84e5-afb874705aaf" CreationDate="2011-01-17T22:33:09.023" UserId="744" Text="Specific to software engineering and production, &lt;a href=&quot;http://cacm.acm.org/&quot;&gt;Communications of the ACM&lt;/a&gt; and &lt;a href=&quot;http://queue.acm.org/&quot;&gt;ACM Queue&lt;/a&gt; both seemed to cover game software and related content (AI, graphics, real-time systems) regularly when I was a subscriber." />
  <row Id="15029" PostHistoryTypeId="25" PostId="7459" RevisionGUID="be346b34-be72-4500-bc02-51b6edca9dd6" CreationDate="2011-01-17T22:55:38.800" Comment="http://twitter.com/#!/StackGameDev/status/27136995943776257" />
  <row Id="15030" PostHistoryTypeId="16" PostId="7462" RevisionGUID="3970dd3f-7e4d-426a-b5ad-e1ddabdbcf28" CreationDate="2011-01-18T00:41:25.213" UserId="51" />
  <row Id="15031" PostHistoryTypeId="16" PostId="7463" RevisionGUID="f994b436-4ca0-4acf-acf0-4f9c1b16dac7" CreationDate="2011-01-18T00:41:25.213" UserId="51" />
  <row Id="15032" PostHistoryTypeId="16" PostId="7464" RevisionGUID="3d303669-9e97-494a-b991-327dc19da670" CreationDate="2011-01-18T00:41:25.213" UserId="51" />
  <row Id="15033" PostHistoryTypeId="16" PostId="7466" RevisionGUID="bbce2fc7-4550-49bb-9e35-d36e46256ecb" CreationDate="2011-01-18T00:41:25.213" UserId="51" />
  <row Id="15034" PostHistoryTypeId="16" PostId="7461" RevisionGUID="a191245a-bff7-408f-9f7f-3761c22394b6" CreationDate="2011-01-18T00:41:25.213" UserId="51" />
  <row Id="15035" PostHistoryTypeId="2" PostId="7467" RevisionGUID="753fc2ae-e326-4a07-b6cb-ea8969433ed4" CreationDate="2011-01-18T01:16:39.077" UserId="154" Text="In addition to [Game Developer][1] and [Gamasutra][2] there is [Develop][3] which has a more EU tilt and the more recently launched [Gamesauce][4] which is a small growing publication and probably the most interested in unsolicited articles.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdmag.com/write/&#xD;&#xA;  [2]: http://www.gamasutra.com/&#xD;&#xA;  [3]: http://www.develop-online.net/&#xD;&#xA;  [4]: http://gamesauce.org/news/" />
  <row Id="15036" PostHistoryTypeId="2" PostId="7468" RevisionGUID="6dd39224-cd25-40c8-97d4-9c0ff778b547" CreationDate="2011-01-18T01:19:46.263" UserDisplayName="user4712" Text="I am currently working on a project with a few friends, and I am trying to get frustum culling working.  Every single tutorial or article I go to shows that my math is correct and that this should be working.  I thought maybe posting here, somebody would catch something I could not.  Thank you.&#xD;&#xA;&#xD;&#xA;Here are the important code snippets&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     /create the projection matrix&#xD;&#xA;void CD3DCamera::SetLens(float fov, float aspect, float nearZ, float farZ)&#xD;&#xA;{&#xD;&#xA; D3DXMatrixPerspectiveFovLH(&amp;projMat, D3DXToRadian(fov), aspect, nearZ, farZ);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;//build the view matrix after changes have been made to camera&#xD;&#xA;void CD3DCamera::BuildView()&#xD;&#xA;{&#xD;&#xA; //keep axes orthoganal&#xD;&#xA; D3DXVec3Normalize(&amp;look, &amp;look);&#xD;&#xA;&#xD;&#xA; //up&#xD;&#xA; D3DXVec3Cross(&amp;up, &amp;look, &amp;right);&#xD;&#xA; D3DXVec3Normalize(&amp;up, &amp;up);&#xD;&#xA;&#xD;&#xA; //right&#xD;&#xA; D3DXVec3Cross(&amp;right, &amp;up, &amp;look);&#xD;&#xA; D3DXVec3Normalize(&amp;right, &amp;right);&#xD;&#xA;&#xD;&#xA; //fill view matrix&#xD;&#xA; float x = -D3DXVec3Dot(&amp;position, &amp;right);&#xD;&#xA; float y = -D3DXVec3Dot(&amp;position, &amp;up);&#xD;&#xA; float z = -D3DXVec3Dot(&amp;position, &amp;look);&#xD;&#xA;&#xD;&#xA; viewMat(0,0) = right.x;&#xD;&#xA; viewMat(1,0) = right.y;&#xD;&#xA; viewMat(2,0) = right.z;&#xD;&#xA; viewMat(3,0) = x;&#xD;&#xA;&#xD;&#xA; viewMat(0,1) = up.x;&#xD;&#xA; viewMat(1,1) = up.y;&#xD;&#xA; viewMat(2,1) = up.z;&#xD;&#xA; viewMat(3,1) = y;&#xD;&#xA;&#xD;&#xA; viewMat(0,2) = look.x;&#xD;&#xA; viewMat(1,2) = look.y;&#xD;&#xA; viewMat(2,2) = look.z;&#xD;&#xA; viewMat(3,2) = z;&#xD;&#xA;&#xD;&#xA; viewMat(0,3) = 0.0f;&#xD;&#xA; viewMat(1,3) = 0.0f;&#xD;&#xA; viewMat(2,3) = 0.0f;&#xD;&#xA; viewMat(3,3) = 1.0f;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;    void CD3DCamera::BuildFrustum()&#xD;&#xA;{ &#xD;&#xA; &#xD;&#xA; &#xD;&#xA; D3DXMATRIX VP;&#xD;&#xA; D3DXMatrixMultiply(&amp;VP, &amp;viewMat, &amp;projMat);&#xD;&#xA;&#xD;&#xA; D3DXVECTOR4 col0(VP(0,0), VP(1,0), VP(2,0), VP(3,0));&#xD;&#xA;&#xD;&#xA; D3DXVECTOR4 col1(VP(0,1), VP(1,1), VP(2,1), VP(3,1));&#xD;&#xA;&#xD;&#xA; D3DXVECTOR4 col2(VP(0,2), VP(1,2), VP(2,2), VP(3,2));&#xD;&#xA;&#xD;&#xA; D3DXVECTOR4 col3(VP(0,3), VP(1,3), VP(2,3), VP(3,3));&#xD;&#xA;&#xD;&#xA; // Planes face inward&#xD;&#xA; frustum[0] = (D3DXPLANE)(col2);    // near&#xD;&#xA; frustum[1] = (D3DXPLANE)(col3 - col2);  // far&#xD;&#xA; frustum[2] = (D3DXPLANE)(col3 + col0);  // left&#xD;&#xA; frustum[3] = (D3DXPLANE)(col3 - col0);  // right&#xD;&#xA; frustum[4] = (D3DXPLANE)(col3 - col1);  // top&#xD;&#xA; frustum[5] = (D3DXPLANE)(col3 + col1);  // bottom&#xD;&#xA;&#xD;&#xA; // Normalize the frustum&#xD;&#xA; for( int i = 0; i &lt; 6; ++i )&#xD;&#xA;  D3DXPlaneNormalize( &amp;frustum[i], &amp;frustum[i] );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;    bool FrustumCheck(D3DXVECTOR3 max, D3DXVECTOR3 min, const D3DXPLANE* frustum)&#xD;&#xA;{&#xD;&#xA; // Test assumes frustum planes face inward.&#xD;&#xA;&#xD;&#xA; D3DXVECTOR3 P;&#xD;&#xA; D3DXVECTOR3 Q;&#xD;&#xA; bool ret = false;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA; for(int i = 0; i &lt; 6; ++i)&#xD;&#xA; {&#xD;&#xA;  // For each coordinate axis x, y, z...&#xD;&#xA;  for(int j = 0; j &lt; 3; ++j)&#xD;&#xA;  {&#xD;&#xA;   // Make PQ point in the same direction as the plane normal on this axis.&#xD;&#xA;   if( frustum[i][j] &gt; 0.0f )&#xD;&#xA;   {&#xD;&#xA;    P[j] = min[j];&#xD;&#xA;    Q[j] = max[j];&#xD;&#xA;   }&#xD;&#xA;   else &#xD;&#xA;   {&#xD;&#xA;    P[j] = max[j];&#xD;&#xA;    Q[j] = min[j];&#xD;&#xA;   }&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;  if(D3DXPlaneDotCoord(&amp;frustum[i], &amp;Q) &lt; 0.0f  )&#xD;&#xA;   ret = false;&#xD;&#xA; }&#xD;&#xA; return true;&#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15037" PostHistoryTypeId="1" PostId="7468" RevisionGUID="6dd39224-cd25-40c8-97d4-9c0ff778b547" CreationDate="2011-01-18T01:19:46.263" UserDisplayName="user4712" Text="problem with frustum AABB culling in DirectX" />
  <row Id="15038" PostHistoryTypeId="3" PostId="7468" RevisionGUID="6dd39224-cd25-40c8-97d4-9c0ff778b547" CreationDate="2011-01-18T01:19:46.263" UserDisplayName="user4712" Text="&lt;collision-detection&gt;&lt;directx&gt;&lt;rendering&gt;&lt;frustum&gt;" />
  <row Id="15039" PostHistoryTypeId="5" PostId="7468" RevisionGUID="ebc35818-ed29-4b2d-a2b1-a5c1c775c6e7" CreationDate="2011-01-18T01:26:56.813" UserId="51" Comment="added 436 characters in body" Text="I am currently working on a project with a few friends, and I am trying to get frustum culling working.  Every single tutorial or article I go to shows that my math is correct and that this should be working.  I thought maybe posting here, somebody would catch something I could not.  Thank you.&#xD;&#xA;&#xD;&#xA;Here are the important code snippets&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;         /create the projection matrix&#xD;&#xA;    void CD3DCamera::SetLens(float fov, float aspect, float nearZ, float farZ)&#xD;&#xA;    {&#xD;&#xA;     D3DXMatrixPerspectiveFovLH(&amp;projMat, D3DXToRadian(fov), aspect, nearZ, farZ);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //build the view matrix after changes have been made to camera&#xD;&#xA;    void CD3DCamera::BuildView()&#xD;&#xA;    {&#xD;&#xA;     //keep axes orthoganal&#xD;&#xA;     D3DXVec3Normalize(&amp;look, &amp;look);&#xD;&#xA;    &#xD;&#xA;     //up&#xD;&#xA;     D3DXVec3Cross(&amp;up, &amp;look, &amp;right);&#xD;&#xA;     D3DXVec3Normalize(&amp;up, &amp;up);&#xD;&#xA;    &#xD;&#xA;     //right&#xD;&#xA;     D3DXVec3Cross(&amp;right, &amp;up, &amp;look);&#xD;&#xA;     D3DXVec3Normalize(&amp;right, &amp;right);&#xD;&#xA;    &#xD;&#xA;     //fill view matrix&#xD;&#xA;     float x = -D3DXVec3Dot(&amp;position, &amp;right);&#xD;&#xA;     float y = -D3DXVec3Dot(&amp;position, &amp;up);&#xD;&#xA;     float z = -D3DXVec3Dot(&amp;position, &amp;look);&#xD;&#xA;    &#xD;&#xA;     viewMat(0,0) = right.x;&#xD;&#xA;     viewMat(1,0) = right.y;&#xD;&#xA;     viewMat(2,0) = right.z;&#xD;&#xA;     viewMat(3,0) = x;&#xD;&#xA;    &#xD;&#xA;     viewMat(0,1) = up.x;&#xD;&#xA;     viewMat(1,1) = up.y;&#xD;&#xA;     viewMat(2,1) = up.z;&#xD;&#xA;     viewMat(3,1) = y;&#xD;&#xA;    &#xD;&#xA;     viewMat(0,2) = look.x;&#xD;&#xA;     viewMat(1,2) = look.y;&#xD;&#xA;     viewMat(2,2) = look.z;&#xD;&#xA;     viewMat(3,2) = z;&#xD;&#xA;    &#xD;&#xA;     viewMat(0,3) = 0.0f;&#xD;&#xA;     viewMat(1,3) = 0.0f;&#xD;&#xA;     viewMat(2,3) = 0.0f;&#xD;&#xA;     viewMat(3,3) = 1.0f;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;        void CD3DCamera::BuildFrustum()&#xD;&#xA;    { &#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     D3DXMATRIX VP;&#xD;&#xA;     D3DXMatrixMultiply(&amp;VP, &amp;viewMat, &amp;projMat);&#xD;&#xA;    &#xD;&#xA;     D3DXVECTOR4 col0(VP(0,0), VP(1,0), VP(2,0), VP(3,0));&#xD;&#xA;    &#xD;&#xA;     D3DXVECTOR4 col1(VP(0,1), VP(1,1), VP(2,1), VP(3,1));&#xD;&#xA;    &#xD;&#xA;     D3DXVECTOR4 col2(VP(0,2), VP(1,2), VP(2,2), VP(3,2));&#xD;&#xA;    &#xD;&#xA;     D3DXVECTOR4 col3(VP(0,3), VP(1,3), VP(2,3), VP(3,3));&#xD;&#xA;    &#xD;&#xA;     // Planes face inward&#xD;&#xA;     frustum[0] = (D3DXPLANE)(col2);    // near&#xD;&#xA;     frustum[1] = (D3DXPLANE)(col3 - col2);  // far&#xD;&#xA;     frustum[2] = (D3DXPLANE)(col3 + col0);  // left&#xD;&#xA;     frustum[3] = (D3DXPLANE)(col3 - col0);  // right&#xD;&#xA;     frustum[4] = (D3DXPLANE)(col3 - col1);  // top&#xD;&#xA;     frustum[5] = (D3DXPLANE)(col3 + col1);  // bottom&#xD;&#xA;    &#xD;&#xA;     // Normalize the frustum&#xD;&#xA;     for( int i = 0; i &lt; 6; ++i )&#xD;&#xA;      D3DXPlaneNormalize( &amp;frustum[i], &amp;frustum[i] );&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;        bool FrustumCheck(D3DXVECTOR3 max, D3DXVECTOR3 min, const D3DXPLANE* frustum)&#xD;&#xA;    {&#xD;&#xA;     // Test assumes frustum planes face inward.&#xD;&#xA;    &#xD;&#xA;     D3DXVECTOR3 P;&#xD;&#xA;     D3DXVECTOR3 Q;&#xD;&#xA;     bool ret = false;&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;     for(int i = 0; i &lt; 6; ++i)&#xD;&#xA;     {&#xD;&#xA;      // For each coordinate axis x, y, z...&#xD;&#xA;      for(int j = 0; j &lt; 3; ++j)&#xD;&#xA;      {&#xD;&#xA;       // Make PQ point in the same direction as the plane normal on this axis.&#xD;&#xA;       if( frustum[i][j] &gt; 0.0f )&#xD;&#xA;       {&#xD;&#xA;        P[j] = min[j];&#xD;&#xA;        Q[j] = max[j];&#xD;&#xA;       }&#xD;&#xA;       else &#xD;&#xA;       {&#xD;&#xA;        P[j] = max[j];&#xD;&#xA;        Q[j] = min[j];&#xD;&#xA;       }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      &#xD;&#xA;      if(D3DXPlaneDotCoord(&amp;frustum[i], &amp;Q) &lt; 0.0f  )&#xD;&#xA;       ret = false;&#xD;&#xA;     }&#xD;&#xA;     return true;&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15040" PostHistoryTypeId="25" PostId="7461" RevisionGUID="c0a8aec7-2120-489f-9ba2-9b0e7face8c0" CreationDate="2011-01-18T01:55:38.707" Comment="http://twitter.com/#!/StackGameDev/status/27182294242430976" />
  <row Id="15041" PostHistoryTypeId="2" PostId="7469" RevisionGUID="9aea27aa-2ed1-4c42-b351-37c5fe7f029f" CreationDate="2011-01-18T03:41:43.130" UserId="4682" Text="I know you've accepted an answer, but Google both &quot;Fast Infoset&quot; (binary XML) and vtd-xml. &#xD;&#xA;&#xD;&#xA;Although latter (VTD) might not resolve the compression aspect of you XML usage, it might speed up node access across large files, considerably (it uses a binary offsets 'dictionary' to jump to nodes, and *doesn't* create objects for each node, instead work on the original XML string). Therefore, it's XML lookup are [said to be] both faster and it doesn't require as much in-process memory to access/manipulate the XML doc.&#xD;&#xA;&#xD;&#xA;Both of the above have bindings in the popular languages (which include C#).&#xD;&#xA;&#xD;&#xA;Cheers&#xD;&#xA;&#xD;&#xA;Rich" />
  <row Id="15045" PostHistoryTypeId="2" PostId="7471" RevisionGUID="9024a1f7-3e51-49e6-a349-94abacb777f2" CreationDate="2011-01-18T04:35:03.643" UserId="962" Text="I am trying to figure out how to make sprite sheets 2d game that update if the source graphics files change.&#xD;&#xA;&#xD;&#xA;So the steps I think I need are:&#xD;&#xA;&#xD;&#xA;    //Get requested folder.&#xD;&#xA;&#xD;&#xA;    //**If There are changes:**&#xD;&#xA;        //For each png in folder, &#xD;&#xA;             //draw onto single sprite sheet image, &#xD;&#xA;            //saving each location to a List&lt;Vector2&gt;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Save the spritesheet as a file that is native to XNA.&#xD;&#xA;&#xD;&#xA;            //return a dataclass with the name of the graphic,&#xD;&#xA;            ///The Texture2D, its state, how many frames, width, height and so on.&#xD;&#xA;   &#xD;&#xA;            //Save the dataClass that contains the image.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;     //Load XNA compatible files as a the class it was saved &#xD;&#xA;     ///as and be added to the assets list&#xD;&#xA;&#xD;&#xA;Is this plan workable? Can XNA load files like that, and save them in the correct format?" />
  <row Id="15046" PostHistoryTypeId="1" PostId="7471" RevisionGUID="9024a1f7-3e51-49e6-a349-94abacb777f2" CreationDate="2011-01-18T04:35:03.643" UserId="962" Text="Creating and Saving spritesheets at runtime from PNG sequences in XNA" />
  <row Id="15047" PostHistoryTypeId="3" PostId="7471" RevisionGUID="9024a1f7-3e51-49e6-a349-94abacb777f2" CreationDate="2011-01-18T04:35:03.643" UserId="962" Text="&lt;2d&gt;&lt;xna-4.0&gt;&lt;spritesheet&gt;" />
  <row Id="15049" PostHistoryTypeId="25" PostId="7468" RevisionGUID="b42b92c1-28f8-4f70-9d8a-e5c54932dda5" CreationDate="2011-01-18T04:55:38.840" Comment="http://twitter.com/#!/StackGameDev/status/27227592775962625" />
  <row Id="15050" PostHistoryTypeId="2" PostId="7472" RevisionGUID="ad19fc25-1ed1-405d-a761-854ef9b640a9" CreationDate="2011-01-18T06:47:19.397" UserId="3656" Text="Are you talking about runtime as in while running on the Xbox? If so, no. But if you are talking about as part of your development process, then you could add a special content pipeline class, or at the most basic, a simple custom build step that runs a tool that updates image files needed.&#xD;&#xA;&#xD;&#xA;Custom build steps allow you to specify the output files that should be checked to see if they need to be updated or not. You'll probably need a directory with standard naming schemes for the individual frames of an animated sprite, and a text file with the properties of the spritesheet to be parsed by your tool and also double checked for being up-to-date by MSBuild.&#xD;&#xA;&#xD;&#xA;Check out the [Spritesheet Packer by Nick Gravelyn][1] for the example of modifying image data and outputting it. It's not what you're looking for, but it covers similar ground.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.nickgravelyn.com/2009/10/sprite-sheet-packer-tool-xna-gs-example/" />
  <row Id="15051" PostHistoryTypeId="25" PostId="7471" RevisionGUID="e9db810c-419f-4caf-915f-c0c2f49cbc03" CreationDate="2011-01-18T07:55:38.770" Comment="http://twitter.com/#!/StackGameDev/status/27272891372412928" />
  <row Id="15053" PostHistoryTypeId="2" PostId="7474" RevisionGUID="3ffb7f0a-32e9-413c-93ef-8a9b71efe353" CreationDate="2011-01-18T08:25:30.257" UserId="3656" Text="To achieve this, separate your XNA solution into 4 projects:&#xD;&#xA;&#xD;&#xA;1.  Content Project&#xD;&#xA; - This will contain all of your assets (like normal). Including your XML files that will be generated by your editor. &#xD;&#xA;&#xD;&#xA;2.  Engine Project&#xD;&#xA; - This will contain common classes like `TilemapContent` and `WhateverOtherContent` that you want to load in-game as well as edit in the editor, as well as any utility classes common between the game and editor (or your whole engine if you want essentially a &quot;game-with-editor-mode&quot; project).&#xD;&#xA; - Any classes you wish to instantiate, edit, and reload should have appropriated attribute flags like `[ContentSerializer]` (or something, look at [Shawn Hargreaves' blog][1].&#xD;&#xA;&#xD;&#xA;3.  Game Project&#xD;&#xA; - This will contain the game logic. If you want to run the game, you run this project.&#xD;&#xA; - It will reference the Engine project to get access to `TilemapContent`, etc. for deserializing TilemapContent objects from the XML that's been compiled into the XNB files.&#xD;&#xA;&#xD;&#xA;4.  Editor Project&#xD;&#xA; - This will contain your editor code. Mainly, the GUI code, and even if you'd like you can reference all the same files as the game engine project so running this project is the equivalent of running the game in editor mode.&#xD;&#xA; - Use conditional compilation to allow or disallow compilation &amp; execution of editor functionality. You can set conditional compilation symbols on a per-project basis, and you can setup separate exes for editor and game.&#xD;&#xA; - This will also reference the engine project of course, but it will also reference the ContentPipeline assemblies.&#xD;&#xA;&#xD;&#xA;A 2d XNA game framework I'm creating on and off for fun does this, so I can verify it works.&#xD;&#xA;&#xD;&#xA;Note of course that making a level editor using the `Content.Load&lt;YourObjectType&gt;(&quot;foo&quot;);` that's intended to run on Xbox won't work at all, and you'll have to go through the pain and misery of writing your own data format and intermediary classes. The serialization supported in XNA is designed to be part of the Content Pipeline since it uses reflection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/automatic-xnb-serialization-in-xna-game-studio-3-1.aspx" />
  <row Id="15054" PostHistoryTypeId="2" PostId="7475" RevisionGUID="ecb07801-fc96-47da-940a-50380f52995b" CreationDate="2011-01-18T08:29:07.177" UserId="4564" Text="I’m currently planning to develop an RPG. It will be a project I do in my free time. No pres-sure behind it. I’ll probably be doing it together with a friend and it’s just supposed to be a fun project, something we just work on, if we like to. Although it is a private fun project, I will make arrangements for this project, like project management and detailed documentation etc. I will also have a look at [this thread][1] and gather more information before starting.&#xD;&#xA;&#xD;&#xA;An important choice I have to make is what libraries or framework I want to develop the game with. I know that there isn’t a BEST library, but maybe someone with some experience can recommend a fitting library. Maybe I just write down what my “requirements” are.&#xD;&#xA;&#xD;&#xA; - C++&#xD;&#xA; - Offline RPG&#xD;&#xA; - Running on Windows will suffice&#xD;&#xA; - Therefore I tend do Direct3D, contradictions? Proposals? OpenGL?&#xD;&#xA; - Well documented API&#xD;&#xA;&#xD;&#xA;If you need some more specific information, just tell me.&#xD;&#xA;&#xD;&#xA;If you can recommend libraries, how is multithreading done in those? Are new threads created implicitly? I’d just like to know as much as possible about what is coming to me, before starting.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/85/how-can-i-effectively-manage-a-hobby-game-project" />
  <row Id="15055" PostHistoryTypeId="1" PostId="7475" RevisionGUID="ecb07801-fc96-47da-940a-50380f52995b" CreationDate="2011-01-18T08:29:07.177" UserId="4564" Text="Need 3D RPG development library/framework recommendations" />
  <row Id="15056" PostHistoryTypeId="3" PostId="7475" RevisionGUID="ecb07801-fc96-47da-940a-50380f52995b" CreationDate="2011-01-18T08:29:07.177" UserId="4564" Text="&lt;c++&gt;&lt;libraries&gt;&lt;framework&gt;&lt;rpg&gt;&lt;api&gt;" />
  <row Id="15057" PostHistoryTypeId="2" PostId="7476" RevisionGUID="4713b262-f401-48f3-a686-9adff05d1707" CreationDate="2011-01-18T08:31:36.820" UserId="3644" Text="7 described textures could take as much as 14mb in 16bit, 28mb in 32bit (uncompressed).&#xD;&#xA;My ideas:&#xD;&#xA;&#xD;&#xA;- when you disable rendering compiler disables texture creation (pretty weird);&#xD;&#xA;&#xD;&#xA;- you create GL_RGBA textures and they use 32bit per pixel = total of 28mb;&#xD;&#xA;&#xD;&#xA;- you load your textures from &quot;HDD&quot; and pass them to OpenGL, but you forgot to clean up after that, hence you have additional 14mb+ wasting your RAM;&#xD;&#xA;&#xD;&#xA;- you use uncompressed (raw) textures by mistake;&#xD;&#xA;&#xD;&#xA;- creating/using mipmaps may add additional ~30% RAM usage." />
  <row Id="15058" PostHistoryTypeId="2" PostId="7477" RevisionGUID="a79b437e-e84d-454d-a92d-157a70222b6b" CreationDate="2011-01-18T08:52:42.090" UserId="51" Text="To give proper advice we need to take a step back.&#xD;&#xA;&#xD;&#xA;1) What are your goals.&#xD;&#xA;&#xD;&#xA;2) What is your experience level.&#xD;&#xA;&#xD;&#xA;If your answer to #1 is &quot;I just want to make an RPG/tell a story/bring my characters to life&quot; and #2 is &quot;little to none&quot;, then I recommend you read this thread: http://gamedev.stackexchange.com/questions/6213/recommended-rpg-game-that-can-be-used-to-learn-game-modding&#xD;&#xA;&#xD;&#xA;There's no reason to write rendering code if all you want to do is lay the framework for your story to take place in an existing engine, for example.  &#xD;&#xA;&#xD;&#xA;Also, I personally don't think C++ is a good requirement to have.  Learning a new language, especially something that's higher level, can be an enlightening experience and also help you get stuff done faster, even if it's not theoretically as efficient." />
  <row Id="15059" PostHistoryTypeId="2" PostId="7478" RevisionGUID="71dc3551-9cf7-4489-831e-987c58d61a62" CreationDate="2011-01-18T09:06:32.310" UserId="288" Text="Breaking down what you want to do into solutions:&#xD;&#xA;&#xD;&#xA;1. You need some way to watch the file system to trigger this process. Polling it or using &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(v=VS.100).aspx&quot;&gt;`FileSystemWatcher`&lt;/a&gt; come to mind as appropriate solutions. (If this is for some kind of editor, I personally find assigning a hotkey is preferable.)&#xD;&#xA;&#xD;&#xA;2. You need a way to actually create sprite sheets. Googling around will probably find something. Nick Gravelyn's &lt;a href=&quot;http://spritesheetpacker.codeplex.com/&quot;&gt;Spritesheet Packer&lt;/a&gt; that bearcdp mentioned is probably more fully-featured, but I'm not sure that it is integrated into the content pipeline - the one in the XNA &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/sprite_sheet&quot;&gt;Sprite Sheet sample&lt;/a&gt; is.&#xD;&#xA;&#xD;&#xA;3. To create XNA's native XNB files you need to use the Content Pipeline. This requires you have XNA Game Studio installed on the end-user machine. You can invoke the content pipeline at runtime, and a good example of this to get you started is the &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2&quot;&gt;Winforms 2&lt;/a&gt; XNA sample.&#xD;&#xA;&#xD;&#xA;4. You can then load those XNB files with `ContentManager` as normal (and unload the old ones that you aren't using). I think the Winforms 2 sample has some discussion of your various options for caching and so on." />
  <row Id="15060" PostHistoryTypeId="25" PostId="7475" RevisionGUID="c158be75-585d-4d62-9d27-467bd8ea3d72" CreationDate="2011-01-18T10:55:38.817" Comment="http://twitter.com/#!/StackGameDev/status/27318189792694272" />
  <row Id="15062" PostHistoryTypeId="2" PostId="7480" RevisionGUID="16ecbe83-f562-424b-ae21-75c4559562f8" CreationDate="2011-01-18T12:06:33.327" UserId="1130" Text="I've noticed sprite sheets are used more and more in Flash games and I don't fully understand what are the advantages over an image sequence/flash timeline - MovieClip.&#xD;&#xA;&#xD;&#xA;I've read this related question:&#xD;&#xA;[2D graphics - why use spritesheets?][1] &#xD;&#xA;and that makes sense for hardware accelerated games, but that's not the case for&#xD;&#xA;flash yet. &#xD;&#xA;&#xD;&#xA;Any Flash Player specific insights ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7069/2d-graphics-why-use-spritesheets" />
  <row Id="15063" PostHistoryTypeId="1" PostId="7480" RevisionGUID="16ecbe83-f562-424b-ae21-75c4559562f8" CreationDate="2011-01-18T12:06:33.327" UserId="1130" Text="What are the advantages of a sprite sheet over an image sequence/flash timeline ?" />
  <row Id="15064" PostHistoryTypeId="3" PostId="7480" RevisionGUID="16ecbe83-f562-424b-ae21-75c4559562f8" CreationDate="2011-01-18T12:06:33.327" UserId="1130" Text="&lt;2d&gt;&lt;graphics&gt;&lt;flash&gt;&lt;spritesheet&gt;" />
  <row Id="15065" PostHistoryTypeId="2" PostId="7481" RevisionGUID="0fca15b4-fb1b-4eea-bec9-b3fad93bc547" CreationDate="2011-01-18T12:22:16.833" UserId="2710" Text="A good framework - or actually a toolset - is Unity3D. It's somewhat less flexible than &quot;engines&quot; that are focused only on rendering, but then it can save you _enormous_ amounts of time by taking care of a lot of common tasks. You don't have to worry about render, physics, sound, resource importing, terrain engine (if you need one), it has passable GUI system. &#xD;&#xA;&#xD;&#xA;In my experience, it's the only game engine out there that enables a single person to create a big game.&#xD;&#xA;&#xD;&#xA;It requires C#, though (or its own Unityscript, but C# is way better)." />
  <row Id="15067" PostHistoryTypeId="2" PostId="7482" RevisionGUID="b9fbf91f-b22e-4bd5-abe6-81888a7d15d4" CreationDate="2011-01-18T13:34:28.150" UserId="4704" Text="If you really do want to write a 3D RPG (a goal I highly support, by the way) I think [Ogre3D][1] is going to be your best bet for a starting framework.  It's OpenGL-based and C++-based and can just get a lot of the &quot;busywork&quot; of making a basic renderer out of the way.  Plus, it's released under the LGPL, which means that, should you decide to make this a commercial project in the future, you won't have to change engines.&#xD;&#xA;&#xD;&#xA;Second, I would recommend reading a blog called the CRPG Addict.  (I don't have enough rep to embed a link, just google it).  Not only is it interesting watching him play through older RPGs, but he's got some excellent articles on RPG design that you really should check out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://crpgaddict.blogspot.com/" />
  <row Id="15068" PostHistoryTypeId="5" PostId="2375" RevisionGUID="8b515539-2aab-4d14-bba0-ed4904f7a6a8" CreationDate="2011-01-18T13:42:39.980" UserId="189" Comment="added 310 characters in body; added 18 characters in body" Text="I just ran the [HTML5 test][1]:&#xD;&#xA;&#xD;&#xA; - My iPod Touch 2nd generation with iOS **3.1.3** scores 125 and 7 bonux points out of 300 in Safari. Of particular note to game development:&#xD;&#xA;  - Full points in Canvas! Great for game rendering.&#xD;&#xA;  - Supports the video element with MPEG-4 and H.264 formats&#xD;&#xA;  - Supports the audio element with PCM, MP3 and AAC formats (great for bgm and sounds!)&#xD;&#xA;  - Session and local storages are supported, as is Web SQL Database! (game save files?)&#xD;&#xA;  - Application Cache is supported; I assume this feature would let you cache game data files (images and such) for faster loading. Sounds great to me!&#xD;&#xA;  - No WebGL support.&#xD;&#xA;  - No WebSocket either; multiplayer games will need to use something else like AJAX polling.&#xD;&#xA; - My Droid Incredible with Android OS 2.1 (+ Sense UI) scores 151 and no bonus points out of 300 on its built-in browser. Again, of particular note:&#xD;&#xA;  - Full Canvas support&#xD;&#xA;  - video element supported but all four codecs had X's on them. I wonder what formats it can play?&#xD;&#xA;  - audio element, same thing as video - supported but formats all have X's.&#xD;&#xA;  - Session and local storage and Web SQL Database all supported&#xD;&#xA;  - Application Cache is supported&#xD;&#xA;  - No WebGL or WebSocket&#xD;&#xA;  - Web workers are supported, which were not supported on my iPod; these could be a good thing in game development for things that act in parallel -- perhaps AI?&#xD;&#xA; - *Edit 2011/1/18:* My Droid Incredible now has Android 2.2 and scores a 176 out of 300. Tchalvak (in the comments) got the same score with his Droid 2, so it seems to be common for the Android 2.2 browser. I also tried the Opera Mobile browser which got a terrible 72 (no bonus points) out of 300, but fully supports canvas!&#xD;&#xA;&#xD;&#xA;So as you can see, the iPod/iPhone and Android are very much neck-and-neck and seem to support a decent range of HTML5 features. Canvas is great for 2D browser graphics and the audio element would probably be great for playing background sounds and music, and it's also really cool to see that both platforms support storage (though you could always just use cookies of course, depending on the size of a game save). So overall I'd say you should go for it. The numbers aren't everything; as wkerslake said &quot;none of these numbers inspire confidence&quot; but if you look through what is supported, it seems to be everything you need!&#xD;&#xA;&#xD;&#xA;I say go for it! I wish you the best of luck.&#xD;&#xA;&#xD;&#xA;By the way, you might want to watch for [Vanthia][2]. It's a browser game which utilizes canvas for efficient drawing. I got to play the closed beta and it was sure coming along! The developer has said very little for over half a year now, except that he is definitely developing it but just keeping things somewhat secret.&#xD;&#xA;&#xD;&#xA;You could also get some ideas from Google's recent [Pacman][3] interactive logo. It wasn't very HTML5 but it sure was functional! It shows that you don't actually need HTML5 to make a browser game (and I think HTML5 is being thrown around as a buzzword far too much, just as AJAX was or still is). There is [a github project][4] with a deobfuscated, cleaned up version of the source that you can look through and play with.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.html5test.com/&#xD;&#xA;  [2]: http://www.vanthia.com/&#xD;&#xA;  [3]: http://www.google.com/pacman&#xD;&#xA;  [4]: http://github.com/macek/google_pacman" />
  <row Id="15069" PostHistoryTypeId="2" PostId="7483" RevisionGUID="13d99378-59f3-4173-b319-9bd267a653c2" CreationDate="2011-01-18T14:15:48.580" UserId="1386" Text="I have developed a game for iOS that has had a decent amount of downloads, but I think I would get significantly more revenue if I were to convert the game to free to play, with in app purchases (especially since some competitors products are now free to download with in app purchases).&#xD;&#xA;&#xD;&#xA;My question is what is the best way to go about converting to a free game with in app purchases without annoying the existing users?&#xD;&#xA;&#xD;&#xA;On upgrading I'd like the people who previously paid for the app to have access to all the in-app purchases because I don't want to make them have to pay for content they previously had, and I don't want to make all the content (that is currently in the game) free." />
  <row Id="15070" PostHistoryTypeId="1" PostId="7483" RevisionGUID="13d99378-59f3-4173-b319-9bd267a653c2" CreationDate="2011-01-18T14:15:48.580" UserId="1386" Text="How can I convert a paid iOS game to a free game with in game purchases?" />
  <row Id="15071" PostHistoryTypeId="3" PostId="7483" RevisionGUID="13d99378-59f3-4173-b319-9bd267a653c2" CreationDate="2011-01-18T14:15:48.580" UserId="1386" Text="&lt;ios&gt;" />
  <row Id="15072" PostHistoryTypeId="2" PostId="7484" RevisionGUID="51349e9b-023d-4146-9b96-3c13524d873c" CreationDate="2011-01-18T15:07:25.240" UserId="1910" Text="An example of offline skilling would be EvE Online. Your character (pilot) does not gain skills by getting experience. Instead, your character gains skillpoints towards a skill you are training whether you are in or out of game. Also, I am fairly certain that skills continue to build even when the game servers are down.&#xD;&#xA;&#xD;&#xA;Anyone have any broad ideas of how they go about this, or better yet how I could go about implementing something like this in a game I am developing. I'm not looking for a detailed explanation here (don't let me hold you back though), but I am looking for a signpost that points me in the correct direction.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="15073" PostHistoryTypeId="1" PostId="7484" RevisionGUID="51349e9b-023d-4146-9b96-3c13524d873c" CreationDate="2011-01-18T15:07:25.240" UserId="1910" Text="How can I implement Offline Skilling" />
  <row Id="15074" PostHistoryTypeId="3" PostId="7484" RevisionGUID="51349e9b-023d-4146-9b96-3c13524d873c" CreationDate="2011-01-18T15:07:25.240" UserId="1910" Text="&lt;mmo&gt;&lt;character&gt;" />
  <row Id="15075" PostHistoryTypeId="2" PostId="7485" RevisionGUID="7b219fbb-1853-4bd4-8f7f-405a01a925de" CreationDate="2011-01-18T15:11:25.560" UserId="4264" Text="Assuming the skill development is deterministic and fairly linear, all you need to do is to hook into some kind of real time clock (such as the system clock, or server clock), and calculate how long the skill has been in development.&#xD;&#xA;&#xD;&#xA;In other words, when the skill development starts, take timestamp and store it, and whenever you want to check if the skill has improved, compare the timestamp with the current one, check if the delta is big enough, and bing, the player has a new skill." />
  <row Id="15076" PostHistoryTypeId="2" PostId="7486" RevisionGUID="27a4ddee-9648-4553-a0ae-aaf155cd4010" CreationDate="2011-01-18T15:13:52.377" UserId="20" Text="Some popular flash game engines (eg. [flixel][1]) use sprite-sheets for sprite-animations. This is mainly because they also implemented a bitmap-based rendering engine which doesn't use the native flash display-classes like &quot;Sprite&quot;, &quot;MovieClip&quot; for each object but rather a big bitmap-image where stuff is drawn onto using pixel-operations.&#xD;&#xA;Using a bitmap-based approach (i.e. Spritesheet) for a bitmap-based rendering engine is the most efficient thing to do.&#xD;&#xA;&#xD;&#xA;This [question][2] covers some of the different rendering-methods.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1081/rendering-performance-for-flash-games" />
  <row Id="15077" PostHistoryTypeId="2" PostId="7487" RevisionGUID="ad3d006b-15d6-401c-a348-1a02c7361d5a" CreationDate="2011-01-18T15:27:53.130" UserId="953" Text="Most publications accept submissions.  Look for a &quot;submissions&quot; or &quot;contact us&quot; link on their websites and make sure to follow their guidelines." />
  <row Id="15078" PostHistoryTypeId="2" PostId="7488" RevisionGUID="ae17ed15-68ff-48b3-81a0-d366217490d8" CreationDate="2011-01-18T15:31:34.630" UserId="337" Text="If the skill won't be used until the player is back online you can simply store the log-off time and remaining time on any skills in the queue, and then when the player logs in do something like this:&#xD;&#xA;&#xD;&#xA;    timeRemaining = currentTime - logoutTime&#xD;&#xA;    while ( timeRemaining &gt; 0 and hasQueuedSkill() ) {&#xD;&#xA;         skillTime -= timeRemaining&#xD;&#xA;         if ( skillTime &lt;= 0 ) {&#xD;&#xA;               popSkill()&#xD;&#xA;               timeRemaining = -skillTime&#xD;&#xA;         }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="15079" PostHistoryTypeId="2" PostId="7489" RevisionGUID="572da9a6-4822-4d81-a280-86e8512ad5ff" CreationDate="2011-01-18T15:43:18.050" UserId="3563" Text="I have been writing GLSL shaders for over a year but this is the first time I have run into this problem. I am on the iOS platform - if that matters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In a vertex shader I have this:&#xD;&#xA;&#xD;&#xA;    uniform mediump mat4 projectionViewModelMatrix;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In a fragment shader I have been using for months I have the following uniforms:  &#xD;&#xA;&#xD;&#xA;    uniform int channels;&#xD;&#xA;    uniform sampler2D hero;&#xD;&#xA;&#xD;&#xA;Nothing to write home about. I added three additional uniforms to the fragment shader:&#xD;&#xA;&#xD;&#xA;    uniform int heroChannels;&#xD;&#xA;    uniform int heroWidth;&#xD;&#xA;    uniform int heroHeight;&#xD;&#xA;&#xD;&#xA;Using&#xD;&#xA;&#xD;&#xA;    glGetUniformLocation&#xD;&#xA;&#xD;&#xA;I tried to grab the location of all my uniforms. This is when my own personal hell began. This is the result:&#xD;&#xA;&#xD;&#xA;    uniform heroChannels location -1&#xD;&#xA;    uniform channels location 4&#xD;&#xA;    uniform hero location 5&#xD;&#xA;    uniform heroHeight location -1&#xD;&#xA;    uniform projectionViewModelMatrix location 0&#xD;&#xA;    uniform heroWidth location -1&#xD;&#xA;&#xD;&#xA;Huh? Why are the recently added uniforms not given a valid location by the GL Gods?&#xD;&#xA;&#xD;&#xA;Thanks in advance,  &#xD;&#xA;Doug&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15080" PostHistoryTypeId="1" PostId="7489" RevisionGUID="572da9a6-4822-4d81-a280-86e8512ad5ff" CreationDate="2011-01-18T15:43:18.050" UserId="3563" Text="OpenGL. Pulling Hair Out Over Undefined uniform in fragment shader." />
  <row Id="15081" PostHistoryTypeId="3" PostId="7489" RevisionGUID="572da9a6-4822-4d81-a280-86e8512ad5ff" CreationDate="2011-01-18T15:43:18.050" UserId="3563" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;glsl&gt;" />
  <row Id="15082" PostHistoryTypeId="2" PostId="7490" RevisionGUID="406275da-0136-4520-8e2f-a30886f7be69" CreationDate="2011-01-18T15:59:39.443" UserId="4719" Text="I'm using [Three.JS][1] to render some objects. I'm struggling with some very simple object rendering and translation.&#xD;&#xA;&#xD;&#xA;The scenario is that I spawn an object at 0,0,0 in world space with 0,0,0 rotation.&#xD;&#xA;&#xD;&#xA;    var scene, camera, cube;&#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;    &#xD;&#xA;    function change() {&#xD;&#xA;      var degrees = 90&#xD;&#xA;      var zTranslation = 5;&#xD;&#xA;      &#xD;&#xA;      cube.rotation.y = degrees * Math.PI / 180;&#xD;&#xA;      cube.rotation.z = zTranslation;&#xD;&#xA;      &#xD;&#xA;      var newCubeMatrix = cube.matrix;        &#xD;&#xA;      newCubeMatrix.identity();&#xD;&#xA;      newCubeMatrix.multiplySelf(THREE.Matrix4.rotationYMatrix(cube.rotation.y));&#xD;&#xA;      newCubeMatrix.multiplySelf(THREE.Matrix4.translationMatrix(cube.position.x, cube.position.y, cube.position.z));&#xD;&#xA;    &#xD;&#xA;      cube.updateMatrix();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function loop() {&#xD;&#xA;      renderer.render( scene, camera );&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;What now happens is that the cube is rotation 90 degrees and translated 5 points on the Z axis in world space, not 5 points on the Z axis in the cube's local space.&#xD;&#xA;&#xD;&#xA;How do I make the cube translate 5 points in it's local space?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mrdoob/three.js/ &quot;three.js&quot;" />
  <row Id="15083" PostHistoryTypeId="1" PostId="7490" RevisionGUID="406275da-0136-4520-8e2f-a30886f7be69" CreationDate="2011-01-18T15:59:39.443" UserId="4719" Text="Translate object in world space usings it's local rotation" />
  <row Id="15084" PostHistoryTypeId="3" PostId="7490" RevisionGUID="406275da-0136-4520-8e2f-a30886f7be69" CreationDate="2011-01-18T15:59:39.443" UserId="4719" Text="&lt;3d&gt;&lt;javascript&gt;" />
  <row Id="15085" PostHistoryTypeId="2" PostId="7491" RevisionGUID="e28889a3-a007-4b40-b335-687a92cfb167" CreationDate="2011-01-18T16:03:48.383" UserId="4264" Text="Couple things come to mind.&#xD;&#xA;&#xD;&#xA;First, it's possible each of your int uniforms actually takes a whole vector in uniform space, and thus you may be running out of space - you can try to combine them into vectors to see if it helps.&#xD;&#xA;&#xD;&#xA;Second, it's possible that the shader compiler happily discards the uniforms in case they're not actually in use. If this is the case, then they naturally won't get a location." />
  <row Id="15087" PostHistoryTypeId="25" PostId="7484" RevisionGUID="ea9afad8-288b-42a3-af62-a295a0037f9e" CreationDate="2011-01-18T16:55:39.793" Comment="http://twitter.com/#!/StackGameDev/status/27408790005485568" />
  <row Id="15088" PostHistoryTypeId="2" PostId="7493" RevisionGUID="ded6b2f3-488a-4792-a304-402c3894c463" CreationDate="2011-01-18T17:08:21.763" UserId="1156" Text="One thing I would like to clear you up on - don't expect to find one library that does all that. Or even some of it. Robust, sturdy libraries exist for large things (SDL for 2D graphics, OGRE3D and Irrlicht for 3D, FMOD for sound, etc), but don't expect to find a well documented RPG engine.&#xD;&#xA;&#xD;&#xA;Also, there is going to be little difference if you choose DX over GL. The only thing I can possibly see is that OpenGL drivers (Windows) tend to be slightly worse than directX ones. Since both OGRE and Irrlicht are abstractions, you can switch between either. So cross platform-ity is not completely out the window.&#xD;&#xA;&#xD;&#xA;However, if you take each of your requirements separately:&#xD;&#xA;[ogre3D][1] and [Irrlicht][2] are good solid 3D graphics engines.&#xD;&#xA;&#xD;&#xA;And as for your threading concern, here is an article about threading [OGRE][3]. Natively, neither of the engines support it. But there's no reason why you cannot support it yourself.&#xD;&#xA;&#xD;&#xA;I do not know of any RPG engines, but you can always try searching here, [Gamedev.net][4] and forums, and generally googling for RPG designs. I know for a fact there are a lot of great threads on the gamedev.net forums (though you may have to search a bit harder since they just updated the forums).&#xD;&#xA;&#xD;&#xA;Of course, there's always [Unity][5] to look at. You can script in C# or Javascript (both being easy enough to learn) and it is very powerful. This would probably be the easiest route, but it depends on how you want to do your project :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://irrlicht.sourceforge.net/index.html&#xD;&#xA;  [3]: http://www.ogre3d.org/tikiwiki/Threading&amp;structure=Cookbook&#xD;&#xA;  [4]: http://www.gamedev.net/&#xD;&#xA;  [5]: http://unity3d.com/" />
  <row Id="15089" PostHistoryTypeId="2" PostId="7494" RevisionGUID="b786a46f-398b-4c33-9c0f-b96eb1d022ff" CreationDate="2011-01-18T17:18:34.343" UserDisplayName="Bryan C" Text="By including all content into the game but locking it off unless the user can authenticate against a server of yours, then pull down account information and unlock correct content.  There is no easier way because of the method in which you have sub" />
  <row Id="15090" PostHistoryTypeId="2" PostId="7495" RevisionGUID="a286d584-20c4-42bb-b4d8-c61ae64cc24c" CreationDate="2011-01-18T17:24:46.800" UserId="4082" Text="The order of the transforms is important. &#xD;&#xA;&#xD;&#xA;Rotating around Y and then translating along Z rotates the object around its Y and then translates along world Z.&#xD;&#xA;&#xD;&#xA;Translating along Z and then rotating around Y rotates *the scene* around Y, that is, the cube is already 5 units from the origin, and the whole scene rotates.&#xD;&#xA;&#xD;&#xA;First of all you need to determine which you're trying to achieve. It may be useful to forget about different coordinate spaces, just assume the cube starts at the scene's origin and you then apply several transforms to its vertices, all in scene space.&#xD;&#xA;&#xD;&#xA;Once you've figured out the correct order of operations, figure out (either by trial and error or reading the documentation (!)) whether the API premultiplies or postmultiplies the vertices and the matrices. Then make sure you concatenate the transforms in the correct order, because P*T*R will yield a different P' (transformed P) than T*R*P, even if the composite transform T*R is the same." />
  <row Id="15091" PostHistoryTypeId="2" PostId="7496" RevisionGUID="1bd6aa17-45f3-498c-b0b3-2f43a682e351" CreationDate="2011-01-18T17:35:48.140" UserDisplayName="Senawy" Text="I recommend this book :&#xD;&#xA;&#xD;&#xA;http://apress.com/book/view/1430233036&#xD;&#xA;&#xD;&#xA;check it out" />
  <row Id="15092" PostHistoryTypeId="2" PostId="7497" RevisionGUID="2c9b8141-4a61-4460-abd9-5bfe28a1e7d4" CreationDate="2011-01-18T17:36:43.657" UserId="51" Text="Have you considered just making a different SKU?  Keep your paid version up there, and add a new one that's free with IAP.  It will be a bit more of a maintenance issue with future updates, but it seems like the fairest way to make sure that people who paid don't have to be in a situation where they have to do anything to keep their content." />
  <row Id="15093" PostHistoryTypeId="5" PostId="7471" RevisionGUID="85b3b591-494d-461b-b6ea-60e01b74c55d" CreationDate="2011-01-18T18:02:29.113" UserId="962" Comment="added 229 characters in body" Text="I am trying to figure out how to make sprite sheets 2d game that update if the source graphics files change.&#xD;&#xA;&#xD;&#xA;So the steps I think I need are:&#xD;&#xA;&#xD;&#xA;    //Get requested folder.&#xD;&#xA;&#xD;&#xA;    //**If There are changes:**&#xD;&#xA;        //For each png in folder, &#xD;&#xA;             //draw onto single sprite sheet image, &#xD;&#xA;            //saving each location to a List&lt;Vector2&gt;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Save the spritesheet as a file that is native to XNA.&#xD;&#xA;&#xD;&#xA;            //return a dataclass with the name of the graphic,&#xD;&#xA;            ///The Texture2D, its state, how many frames, width, height and so on.&#xD;&#xA;   &#xD;&#xA;            //Save the dataClass that contains the image.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;     //Load XNA compatible files as a the class it was saved &#xD;&#xA;     ///as and be added to the assets list&#xD;&#xA;&#xD;&#xA;Is this plan workable? Can XNA load files like that, and save them in the correct format?&#xD;&#xA;&#xD;&#xA;**Edit: My main goal is to not have to use a 3rd part sprite sheet packer. I would like to just use sequenced PNGs and have the sprite sheets be made, updated, and saved automatically when I run my game in Development mode.**" />
  <row Id="15094" PostHistoryTypeId="25" PostId="7483" RevisionGUID="fb272747-a1a8-4ef8-8652-d6989b68ce56" CreationDate="2011-01-18T19:55:39.527" Comment="http://twitter.com/#!/StackGameDev/status/27454088656461824" />
  <row Id="15095" PostHistoryTypeId="5" PostId="7489" RevisionGUID="b580fba3-74cf-4910-ae4e-11169de19026" CreationDate="2011-01-18T20:38:38.063" UserId="744" Comment="deleted 54 characters in body; edited title" Text="I have been writing GLSL shaders for over a year but this is the first time I have run into this problem. I am on the iOS platform - if that matters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In a vertex shader I have this:&#xD;&#xA;&#xD;&#xA;    uniform mediump mat4 projectionViewModelMatrix;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In a fragment shader I have been using for months I have the following uniforms:  &#xD;&#xA;&#xD;&#xA;    uniform int channels;&#xD;&#xA;    uniform sampler2D hero;&#xD;&#xA;&#xD;&#xA;Nothing to write home about. I added three additional uniforms to the fragment shader:&#xD;&#xA;&#xD;&#xA;    uniform int heroChannels;&#xD;&#xA;    uniform int heroWidth;&#xD;&#xA;    uniform int heroHeight;&#xD;&#xA;&#xD;&#xA;Using&#xD;&#xA;&#xD;&#xA;    glGetUniformLocation&#xD;&#xA;&#xD;&#xA;I tried to grab the location of all my uniforms. This is when my own personal hell began. This is the result:&#xD;&#xA;&#xD;&#xA;    uniform heroChannels location -1&#xD;&#xA;    uniform channels location 4&#xD;&#xA;    uniform hero location 5&#xD;&#xA;    uniform heroHeight location -1&#xD;&#xA;    uniform projectionViewModelMatrix location 0&#xD;&#xA;    uniform heroWidth location -1&#xD;&#xA;&#xD;&#xA;Huh? Why are the recently added uniforms not given a valid location by the GL Gods?" />
  <row Id="15096" PostHistoryTypeId="4" PostId="7489" RevisionGUID="b580fba3-74cf-4910-ae4e-11169de19026" CreationDate="2011-01-18T20:38:38.063" UserId="744" Comment="deleted 54 characters in body; edited title" Text="Why does glGetUniformLocation report some of my uniform locations as -1?" />
  <row Id="15097" PostHistoryTypeId="2" PostId="7498" RevisionGUID="2afad227-e46c-4ba9-b156-7969e26fa1cd" CreationDate="2011-01-18T21:13:27.257" UserId="284" Text="The `&lt;audio&gt;` tag and the `&lt;object&gt;` tag are (somewhat hard to use) ways to embed audio on a page... ...but what about creating sound effects in a browser-based game?  E.g. if the game becomes aware you died, I plan to have some music play on the &quot;you're dead&quot; page.  But what about some kind of fighting sound when people click an &quot;attack&quot; link, or the sound of flowing water when they click to &quot;heal&quot;.&#xD;&#xA;&#xD;&#xA;Do I essentially have to look into embedding an invisible flash widget like facebook does for some of it's sounds in order to make this work, or are there other approaches?" />
  <row Id="15098" PostHistoryTypeId="1" PostId="7498" RevisionGUID="2afad227-e46c-4ba9-b156-7969e26fa1cd" CreationDate="2011-01-18T21:13:27.257" UserId="284" Text="Techniques for creating sound effects in a browser based game?" />
  <row Id="15099" PostHistoryTypeId="3" PostId="7498" RevisionGUID="2afad227-e46c-4ba9-b156-7969e26fa1cd" CreationDate="2011-01-18T21:13:27.257" UserId="284" Text="&lt;audio&gt;&lt;browser-based-games&gt;&lt;sound-effects&gt;" />
  <row Id="15107" PostHistoryTypeId="2" PostId="7502" RevisionGUID="73bf5408-6948-4f9a-97ef-6eee89d5c843" CreationDate="2011-01-18T22:03:12.280" UserId="953" Text="I'm making a small game in Unity, and some models are displaying very ugly shading.  The shading usually looks funky along the edges between triangles.  I'm pretty new to working in 3D; I bet this is an artifact of vertex lighting, but I'm not sure, and I'm not sure how to fix it.&#xD;&#xA;&#xD;&#xA;Here you can see the worst example of this problem: ![alt text][1]&#xD;&#xA;&#xD;&#xA;Low-quality lightmapping is visible in that shot, but I'm asking about the visible bands and weird shapes visible on the surface of the orange mesh in the foreground.  The mesh was built and UV-mapped in Blender, and is using a standard bumped diffuse shader.  There is a light behind and above the camera; all other lights in the scene are pretty far away.  What am I doing wrong, and how can I do better?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wVHyL.jpg" />
  <row Id="15108" PostHistoryTypeId="1" PostId="7502" RevisionGUID="73bf5408-6948-4f9a-97ef-6eee89d5c843" CreationDate="2011-01-18T22:03:12.280" UserId="953" Text="How do I fix this weird lighting problem?" />
  <row Id="15109" PostHistoryTypeId="3" PostId="7502" RevisionGUID="73bf5408-6948-4f9a-97ef-6eee89d5c843" CreationDate="2011-01-18T22:03:12.280" UserId="953" Text="&lt;3d&gt;&lt;graphics&gt;&lt;unity&gt;&lt;lighting&gt;" />
  <row Id="15110" PostHistoryTypeId="5" PostId="7502" RevisionGUID="bec4cd48-9be1-4bba-b3c0-70b7b84b9262" CreationDate="2011-01-18T22:37:54.907" UserId="953" Comment="Added wireframe." Text="I'm making a small game in Unity, and some models are displaying very ugly shading.  The shading usually looks funky along the edges between triangles.  I'm pretty new to working in 3D; I bet this is an artifact of vertex lighting, but I'm not sure, and I'm not sure how to fix it.&#xD;&#xA;&#xD;&#xA;Here you can see the worst example of this problem: ![alt text][1]&#xD;&#xA;&#xD;&#xA;Low-quality lightmapping is visible in that shot, but I'm asking about the visible bands and weird shapes visible on the surface of the orange mesh in the foreground.  The mesh was built and UV-mapped in Blender, and is using a standard bumped diffuse shader.  There is a light behind and above the camera; all other lights in the scene are pretty far away.  What am I doing wrong, and how can I do better?&#xD;&#xA;&#xD;&#xA;EDIT: Below is the wireframe for this model in Blender.&#xD;&#xA;&#xD;&#xA;![alt text][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wVHyL.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/Yyg43.jpg" />
  <row Id="15111" PostHistoryTypeId="2" PostId="7503" RevisionGUID="df375cb3-239c-4b9c-916c-655c1a640c56" CreationDate="2011-01-18T22:52:36.883" UserId="4679" Text="I'm working on a little text based console game for a bit of fun and am starting work on the user commands entered into the console.&#xD;&#xA;&#xD;&#xA;Are there some good design patterns for deciding what to do with the commands the user enters into the console window?&#xD;&#xA;&#xD;&#xA;My thoughts so far:&#xD;&#xA;&#xD;&#xA;I've createed a basic query structure for obtaining the command and it's arguments. It works kinda as follows (the code is C#):&#xD;&#xA;&#xD;&#xA;    var userCommand = _getUserInputQuery.Invoke(new GetUserInputRequest&#xD;&#xA;                                                    {&#xD;&#xA;                                                      FullCommandText = Console.ReadLine()&#xD;&#xA;                                                    });&#xD;&#xA;I now have two items available to me in the userCommand. Firstly I have the name of the command as a string `userCommand.UserCommand` and secondly I have a string array of arguments `userCommand.UserCommandArgs`.&#xD;&#xA;&#xD;&#xA;I figure there's a couple of ways I can now proceed with the information I have.&#xD;&#xA;&#xD;&#xA;The most basic form could be a simple `switch/if` on the command name and invoke the relevant class/method required (seems a bit icky though).&#xD;&#xA;&#xD;&#xA;I also figured given a generic interface for all commands `IUserInputCommand` I could create the class required using reflection and fire off a generic `Invoke` method from the interface. (Although I'm not sure how useful this will be given that some command invokations will require different data than others).&#xD;&#xA;&#xD;&#xA;What are some design patterns already available for solving this kind of problem? What would you do personally?" />
  <row Id="15112" PostHistoryTypeId="1" PostId="7503" RevisionGUID="df375cb3-239c-4b9c-916c-655c1a640c56" CreationDate="2011-01-18T22:52:36.883" UserId="4679" Text="Receiving user commands in a text based console game" />
  <row Id="15113" PostHistoryTypeId="3" PostId="7503" RevisionGUID="df375cb3-239c-4b9c-916c-655c1a640c56" CreationDate="2011-01-18T22:52:36.883" UserId="4679" Text="&lt;c#&gt;&lt;design-patterns&gt;&lt;console&gt;&lt;text-based&gt;" />
  <row Id="15118" PostHistoryTypeId="25" PostId="7498" RevisionGUID="068ebbbe-1a52-4dc6-a0d7-28b8145b40c0" CreationDate="2011-01-18T22:55:39.780" Comment="http://twitter.com/#!/StackGameDev/status/27499388234375168" />
  <row Id="15120" PostHistoryTypeId="2" PostId="7505" RevisionGUID="8a783fea-fbbd-48a8-85f2-4545697defc1" CreationDate="2011-01-18T23:06:52.170" UserId="4732" Text="It looks like your vertex normals might be messed up. Each vertex's normals should be perpendicular to its face (parallel with the face normals that your wireframe image shows), and you'll need separate vertices for the corners, one for each face that meets at a corner." />
  <row Id="15121" PostHistoryTypeId="2" PostId="7506" RevisionGUID="34f0aa93-19ef-4a01-bb4f-df7531558774" CreationDate="2011-01-18T23:24:50.540" UserId="378" Text="You can trigger audio that is loaded in `&lt;audio&gt;` or `&lt;object&gt;` tags in a couple of ways.&#xD;&#xA;&#xD;&#xA;In HTML5-compatible browsers like Firefox, Chrome, IE9, and Safari this is accomplished like so:&#xD;&#xA;&#xD;&#xA;    &lt;audio id=&quot;attack&quot;&gt;&#xD;&#xA;      &lt;source src=&quot;attack.wav&quot;&gt;&#xD;&#xA;    &lt;/audio&gt;&#xD;&#xA;    &lt;audio id=&quot;heal&quot;&gt;&#xD;&#xA;      &lt;source src=&quot;heal.wav&quot;&gt;&#xD;&#xA;    &lt;/audio&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;a href = &quot;#&quot; onclick=&quot;document.getElementById('attack').play()&quot;&gt;Click to Attack&lt;/a&gt;&#xD;&#xA;    &lt;a href = &quot;#&quot; onclick=&quot;document.getElementById('heal').play()&quot;&gt;Click to Heal&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;The &quot;#&quot; link is just to make sure that you don't go to a new page. I recommend using WAV files for short sounds -- WAV is compatible with basically every browser, and as long as your total sound effects end up less than maybe 1MB you should be okay. Otherwise you'll have to include both an .OGG and .MP3 files for each sound effect inside the &lt;audio&gt; tag, like so:&#xD;&#xA;&#xD;&#xA;    &lt;audio id='attack'&gt;&#xD;&#xA;      &lt;source src='attack.ogg'&gt;&#xD;&#xA;      &lt;source src='attack.mp3'&gt;&#xD;&#xA;    &lt;/audio&gt;&#xD;&#xA;    &lt;audio id='heal'&gt;&#xD;&#xA;      &lt;source src='heal.ogg'&gt;&#xD;&#xA;      &lt;source src='heal.mp3'&gt;&#xD;&#xA;    &lt;/audio&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;a href = &quot;#&quot; onclick=&quot;document.getElementById('attack').play()&quot;&gt;Click to Attack&lt;/a&gt;&#xD;&#xA;    &lt;a href = &quot;#&quot; onclick=&quot;document.getElementById('heal').play()&quot;&gt;Click to Heal&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;If you want to get this to work on IE7 and IE8 then you'll need to fall back on the `&lt;object&gt;` tag. There's a good example of that [available in this article][1].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.elated.com/articles/html5-audio/" />
  <row Id="15122" PostHistoryTypeId="2" PostId="7507" RevisionGUID="0a9e0071-ebd9-4a47-8e86-c0cc0b799c79" CreationDate="2011-01-18T23:51:02.743" UserId="4443" Text="Old MUDs and Talkers (mostly the talker code bases) would use an array of arrays of structs for keeping lookups only to possible alphabetic matches. This would be done with&#xD;&#xA;&#xD;&#xA;    input[0].ToLowerInvarriant() - 'a'&#xD;&#xA; == the index of all the commands starting with the same letter... In C# however I would say just use a Dictionary. Their hashing routines for strings is nice and zippy so just&#xD;&#xA;&#xD;&#xA;    Dictionary&lt;string, Delegate&gt; dCommandHash;&#xD;&#xA;or so would work. Then just&#xD;&#xA;&#xD;&#xA;    if ( dCommandHash.ContainsKey(userCommand.UserCommand))&#xD;&#xA;        Whatever.You.Call.Invoke.On.Invoke(dCommandHash[userCommand.UserCommand],userCommand.UserCommandArgs);&#xD;&#xA;&#xD;&#xA;would likely be the most straight forward way to accomplish this." />
  <row Id="15123" PostHistoryTypeId="2" PostId="7508" RevisionGUID="26f9beee-dd36-49a4-be42-f6a96c39268d" CreationDate="2011-01-18T23:59:20.783" UserId="51" Text="If you're actually using lightmapping, Unity has a modle import setting to Generate Lightmap UVs which would probably solve your problem." />
  <row Id="15124" PostHistoryTypeId="2" PostId="7509" RevisionGUID="bea7fb4e-6cbd-437d-8a66-b5dae53b7012" CreationDate="2011-01-19T01:53:13.540" UserId="154" Text="That looks like a vertex normal issue. Not having used Blender I'm not sure what options you have to see/modify the normals directly at the vertex level. &#xD;&#xA;&#xD;&#xA;The first thing I would do to test, is break off the front surface from the rest of the object and see if it lights correctly. If that works then you could just export it as 2 parts, front &amp; back faces as one object and then side parts as another. " />
  <row Id="15125" PostHistoryTypeId="25" PostId="7502" RevisionGUID="dc02e1a6-8c5c-4df8-b2fc-0fbd78308fa0" CreationDate="2011-01-19T01:55:39.790" Comment="http://twitter.com/#!/StackGameDev/status/27544686558191618" />
  <row Id="15126" PostHistoryTypeId="2" PostId="7510" RevisionGUID="b3583137-e251-498a-bc23-45a5849fab63" CreationDate="2011-01-19T02:03:17.507" UserId="4191" Text="If you'd like to see what one approach to this looks like far down the evolutionary path, take a look at [the MudOS parser][1].  This is a complex, powerful mechanism for defining pattern-based parsing, meant to be able to intelligently route command handling for targets with multiple nouns and adjectives, and handle cases like `put ITEM in CONTAINER` vs. `put on CLOTHING` (i.e. very different actions that happen to start with the same verb).  It may help illuminate where you're going.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://islandsofmyth.org/wiz/parser_guide.html" />
  <row Id="15127" PostHistoryTypeId="2" PostId="7511" RevisionGUID="10116f8f-a661-4fa8-99ff-c39924d1efb2" CreationDate="2011-01-19T03:29:00.103" UserId="4736" Text="I could suggest Leadwerks, a really easy but flexible and powerful game engine which does dynamic real-time lighting, physics, sounds, and basic controllers for you.&#xD;&#xA;&#xD;&#xA;http://www.leadwerks.com/" />
  <row Id="15128" PostHistoryTypeId="2" PostId="7512" RevisionGUID="425f0502-2d1a-41be-950f-58f6cc7e28b6" CreationDate="2011-01-19T06:33:16.503" UserId="4264" Text="&gt; - Why it allocates 4 Mb per texture during rendering &#xD;&#xA;&gt; and how to release this memory if is not used.&#xD;&#xA;&#xD;&#xA;4MB sounds like 1024*1024*4, or 1kx1k 32bit per pixel texture. The reason why such memory would be allocated during rendering is that the GL implementation converts the texture into a more hardware-friendly format. It should get freed when you free the texture. You can try to change the internalFormat of the &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml&quot;&gt;glTexImage2D&lt;/a&gt; call to something more suitable - can't remember which ones are supported in ES, but GL_RGB16 might be it?&#xD;&#xA;&#xD;&#xA;&gt; - Why after loading more the 4 textures 1024 App break?&#xD;&#xA;&#xD;&#xA;This one I don't know. Maybe you're running out of memory. Why do you need so many of such massive textures anyway for a mobile application?" />
  <row Id="15130" PostHistoryTypeId="2" PostId="7514" RevisionGUID="ce6a3d42-4495-4094-a64a-50030d4ca277" CreationDate="2011-01-19T10:35:40.373" UserId="500" Text="This sounds like you are crashing/stalling the GFX-Driver.&#xD;&#xA;&#xD;&#xA;The best tools to narrow this down are a PIX and the directx-debug runtime.&#xD;&#xA;&#xD;&#xA;You can change the DirectX Runtime into debug mode in the &quot;DirectX Control Panel&quot;. This should give you a lot of log-output about any issues there could be in your driver-calls or the data you are providing. You should try to fix every error/warning the runtime is logging, as it is totally driver-dependent how these problems are handled on specific graphcs-cards.&#xD;&#xA;&#xD;&#xA;If this does not show anything suspicious you can try to get more info about what is happening with PIX. But I am pretty sure that the first step should give you the informations you need.&#xD;&#xA;" />
  <row Id="15132" PostHistoryTypeId="2" PostId="7515" RevisionGUID="9af09059-0581-443b-b32f-8a352b482e51" CreationDate="2011-01-19T10:37:37.133" UserId="3630" Text="I just find a 3D web game which run in browser. Before play it, I need to install a plug-in firstly. I guess the plug-in creates a D3D window in browser. If you know something about how to implement this kind of plug-in, please share with me.  &#xD;&#xA; Thanks a lot." />
  <row Id="15133" PostHistoryTypeId="1" PostId="7515" RevisionGUID="9af09059-0581-443b-b32f-8a352b482e51" CreationDate="2011-01-19T10:37:37.133" UserId="3630" Text="How to make D3D to work in IE/Firefox/Chrome" />
  <row Id="15134" PostHistoryTypeId="3" PostId="7515" RevisionGUID="9af09059-0581-443b-b32f-8a352b482e51" CreationDate="2011-01-19T10:37:37.133" UserId="3630" Text="&lt;3d&gt;&lt;web&gt;&lt;browser-based-games&gt;" />
  <row Id="15135" PostHistoryTypeId="2" PostId="7516" RevisionGUID="e8f488e3-6228-4657-b489-e73c623769dc" CreationDate="2011-01-19T10:42:46.943" UserDisplayName="Vlad" Text="We're always interested in contributions form industry professionals. Feel free to contact me!&#xD;&#xA;&#xD;&#xA;Best regards,&#xD;&#xA;&#xD;&#xA;Vlad Micu&#xD;&#xA;European Editor for Gamesauce Magazine" />
  <row Id="15136" PostHistoryTypeId="2" PostId="7517" RevisionGUID="fad9d812-ab92-495e-868c-3b41fa5badac" CreationDate="2011-01-19T10:56:38.487" UserId="862" Text="You need a contract with Microsoft. Your should contact them directly (hard) or through one of their partners that work on WP7 (somewhat easier)." />
  <row Id="15137" PostHistoryTypeId="2" PostId="7518" RevisionGUID="2c886eff-ac0a-4e7c-8f87-c68682d1f03b" CreationDate="2011-01-19T11:53:46.323" UserDisplayName="Niksa" Text="I have to make a tank that sits still but moves his turret and shoots missiles.&#xD;&#xA;&#xD;&#xA;As this is my first Android application ever and I haven't done any game development either, I've come across a few problems...&#xD;&#xA;&#xD;&#xA;Now, I did the tank and the moving turret once I read the Android tutorial for the LunarLander sample code. So this code is based on the LunarLander code.&#xD;&#xA;&#xD;&#xA;But I'm having trouble doing the missile firing then SPACE button is being pressed.&#xD;&#xA;&#xD;&#xA;    private void doDraw(Canvas canvas) {&#xD;&#xA;    &#xD;&#xA;    canvas.drawBitmap(backgroundImage, 0, 0, null);&#xD;&#xA;    // draws the tank&#xD;&#xA;    canvas.drawBitmap(tank, x_tank, y_tank, new Paint());&#xD;&#xA;    // draws and rotates the tank turret&#xD;&#xA;    canvas.rotate((float) mHeading, (float) x_turret + mTurretWidth, y_turret);&#xD;&#xA;    canvas.drawBitmap(turret, x_turret, y_turret, new Paint());&#xD;&#xA;    &#xD;&#xA;    // draws the grenade that is a regular circle  from ShapeDrawable class&#xD;&#xA;    bullet.setBounds(x_bullet, y_bullet, x_bullet + width, y_bullet + height);&#xD;&#xA;    bullet.draw(canvas);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;UPDATE GAME method&#xD;&#xA;&#xD;&#xA;&gt; private void updateGame() throws&#xD;&#xA;&gt; InterruptedException {&#xD;&#xA;&gt; &#xD;&#xA;&gt; long now = System.currentTimeMillis();&#xD;&#xA;&gt; &#xD;&#xA;&gt; if (mLastTime &gt; now)  return; double&#xD;&#xA;&gt; elapsed = (now - mLastTime) / 1000.0;&#xD;&#xA;&gt; mLastTime = now;&#xD;&#xA;&gt; &#xD;&#xA;&gt; &#xD;&#xA;&gt; // dUP and dDown, rotates the turret&#xD;&#xA;&gt; from 0 to 75 degrees. if (dUp)&#xD;&#xA;&gt; mHeading += 1 * (PHYS_SLEW_SEC *&#xD;&#xA;&gt; elapsed);&#xD;&#xA;&gt; &#xD;&#xA;&gt; if (mHeading &gt;= 75) mHeading = 75;&#xD;&#xA;&gt; &#xD;&#xA;&gt; if (dDown) mHeading += (-1) *&#xD;&#xA;&gt; (PHYS_SLEW_SEC * elapsed); if&#xD;&#xA;&gt; (mHeading &lt; 0) mHeading = 0;&#xD;&#xA;&gt; &#xD;&#xA;&gt; &#xD;&#xA;&gt; if (dSpace){ //  missile Logic, a&#xD;&#xA;&gt; straight trajectorie for now x_bullet&#xD;&#xA;&gt; -= 1; y_bullet -= 1;&#xD;&#xA;&gt; &#xD;&#xA;&gt; }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;a method run that runs the game...&#xD;&#xA;&#xD;&#xA;    public void run() {&#xD;&#xA;                while (mRun) {&#xD;&#xA;                    Canvas c = null;&#xD;&#xA;                    try {&#xD;&#xA;                        c = mSurfaceHolder.lockCanvas(null);&#xD;&#xA;                        synchronized (mSurfaceHolder) {&#xD;&#xA;                            if (mMode == STATE_RUNNING) &#xD;&#xA;                             updateGame();&#xD;&#xA;                            doDraw(c);&#xD;&#xA;                        }&#xD;&#xA;                    } catch (InterruptedException e) {&#xD;&#xA;         // TODO Auto-generated catch block&#xD;&#xA;         e.printStackTrace();&#xD;&#xA;        } finally {&#xD;&#xA;                        // do this in a finally so that if an exception is thrown&#xD;&#xA;                        // during the above, we don't leave the Surface in an&#xD;&#xA;                        // inconsistent state&#xD;&#xA;                        if (c != null) {&#xD;&#xA;                            mSurfaceHolder.unlockCanvasAndPost(c);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;**So the question would be, how do I make that the bullet is fired on a single SPACE key press from the turret to the end of the screen?**&#xD;&#xA;&#xD;&#xA;Could you help me out here, I seem to be in the dark here...&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;Niksa" />
  <row Id="15138" PostHistoryTypeId="1" PostId="7518" RevisionGUID="2c886eff-ac0a-4e7c-8f87-c68682d1f03b" CreationDate="2011-01-19T11:53:46.323" UserDisplayName="Niksa" Text="2D game - Missile shooting problem Android" />
  <row Id="15139" PostHistoryTypeId="3" PostId="7518" RevisionGUID="2c886eff-ac0a-4e7c-8f87-c68682d1f03b" CreationDate="2011-01-19T11:53:46.323" UserDisplayName="Niksa" Text="&lt;2d&gt;&lt;bullet-physics&gt;" />
  <row Id="15140" PostHistoryTypeId="2" PostId="7519" RevisionGUID="1c177073-b7cf-4545-8c2b-c49193e9d571" CreationDate="2011-01-19T13:12:43.650" UserId="1829" Text="The game you are playing might use WebGL http://en.wikipedia.org/wiki/WebGL, or something more exotic like a firefox plugin, but I don't think you can embed machine code in a firefox plugin (I'm not sure, that would be a little security flaw).&#xD;&#xA;&#xD;&#xA;Unity implements a web plugin version of their engine, and it seems they do so with ActiveX. I don't know if it implements on Mac..., I wonder though.&#xD;&#xA;&#xD;&#xA;The best way to find out how this game you are playing use a 3D API or any other kind of plugin stuff, is to look at the HTML source of the page, and look for object or activex or else." />
  <row Id="15141" PostHistoryTypeId="5" PostId="7518" RevisionGUID="79a28d73-3f12-4fee-8768-5f829017cad2" CreationDate="2011-01-19T13:30:04.830" UserDisplayName="Niksa" Comment="added 656 characters in body; added 151 characters in body" Text="I have to make a tank that sits still but moves his turret and shoots missiles.&#xD;&#xA;&#xD;&#xA;As this is my first Android application ever and I haven't done any game development either, I've come across a few problems...&#xD;&#xA;&#xD;&#xA;Now, I did the tank and the moving turret once I read the Android tutorial for the LunarLander sample code. So this code is based on the LunarLander code.&#xD;&#xA;&#xD;&#xA;But I'm having trouble doing the missile firing then SPACE button is being pressed.&#xD;&#xA;&#xD;&#xA;    private void doDraw(Canvas canvas) {&#xD;&#xA;    &#xD;&#xA;    canvas.drawBitmap(backgroundImage, 0, 0, null);&#xD;&#xA;    // draws the tank&#xD;&#xA;    canvas.drawBitmap(tank, x_tank, y_tank, new Paint());&#xD;&#xA;    // draws and rotates the tank turret&#xD;&#xA;    canvas.rotate((float) mHeading, (float) x_turret + mTurretWidth, y_turret);&#xD;&#xA;    canvas.drawBitmap(turret, x_turret, y_turret, new Paint());&#xD;&#xA;    &#xD;&#xA;    // draws the grenade that is a regular circle  from ShapeDrawable class&#xD;&#xA;    bullet.setBounds(x_bullet, y_bullet, x_bullet + width, y_bullet + height);&#xD;&#xA;    bullet.draw(canvas);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;UPDATE GAME method&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    private void updateGame() throws&#xD;&#xA;     InterruptedException {&#xD;&#xA;     &#xD;&#xA;     long now = System.currentTimeMillis();&#xD;&#xA;     &#xD;&#xA;     if (mLastTime &gt; now)  return; double&#xD;&#xA;     elapsed = (now - mLastTime) / 1000.0;&#xD;&#xA;     mLastTime = now;&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     // dUP and dDown, rotates the turret&#xD;&#xA;     from 0 to 75 degrees. if (dUp)&#xD;&#xA;     mHeading += 1 * (PHYS_SLEW_SEC *&#xD;&#xA;     elapsed);&#xD;&#xA;     &#xD;&#xA;     if (mHeading &gt;= 75) mHeading = 75;&#xD;&#xA;     &#xD;&#xA;     if (dDown) mHeading += (-1) *&#xD;&#xA;     (PHYS_SLEW_SEC * elapsed); if&#xD;&#xA;     (mHeading &lt; 0) mHeading = 0;&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     if (dSpace){ &#xD;&#xA;//  missile Logic, a straight trajectorie for now &#xD;&#xA;       x_bullet -= 1; &#xD;&#xA;       y_bullet -= 1;&#xD;&#xA;&#xD;&#xA;//doesn't work, has to be updated every pixel or what?&#xD;&#xA;     &#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;    boolean doKeyDown(int keyCode, KeyEvent msg) {&#xD;&#xA;            	boolean handled = false;&#xD;&#xA;                synchronized (mSurfaceHolder) {&#xD;&#xA;                	if (keyCode == KeyEvent.KEYCODE_SPACE){&#xD;&#xA;                		dSpace = true;&#xD;&#xA;                		handled = true;&#xD;&#xA;                	}&#xD;&#xA;                	if (keyCode == KeyEvent.KEYCODE_DPAD_UP){&#xD;&#xA;                		dUp = true;&#xD;&#xA;                		handled = true;&#xD;&#xA;                	}&#xD;&#xA;                	if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN){&#xD;&#xA;                		dDown = true;&#xD;&#xA;                		handled = true;&#xD;&#xA;                	}&#xD;&#xA;                    return handled;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;a method run that runs the game...&#xD;&#xA;&#xD;&#xA;    public void run() {&#xD;&#xA;                while (mRun) {&#xD;&#xA;                    Canvas c = null;&#xD;&#xA;                    try {&#xD;&#xA;                        c = mSurfaceHolder.lockCanvas(null);&#xD;&#xA;                        synchronized (mSurfaceHolder) {&#xD;&#xA;                            if (mMode == STATE_RUNNING) &#xD;&#xA;                             updateGame();&#xD;&#xA;                            doDraw(c);&#xD;&#xA;                        }&#xD;&#xA;                    } catch (InterruptedException e) {&#xD;&#xA;         // TODO Auto-generated catch block&#xD;&#xA;         e.printStackTrace();&#xD;&#xA;        } finally {&#xD;&#xA;                        // do this in a finally so that if an exception is thrown&#xD;&#xA;                        // during the above, we don't leave the Surface in an&#xD;&#xA;                        // inconsistent state&#xD;&#xA;                        if (c != null) {&#xD;&#xA;                            mSurfaceHolder.unlockCanvasAndPost(c);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;**So the question would be, how do I make that the bullet is fired on a single SPACE key press from the turret to the end of the screen?**&#xD;&#xA;&#xD;&#xA;Could you help me out here, I seem to be in the dark here...&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;Niksa" />
  <row Id="15142" PostHistoryTypeId="10" PostId="3342" RevisionGUID="7ca51d46-dec4-4bb3-8afd-2675cd65f4d9" CreationDate="2011-01-19T13:30:06.110" UserId="14" CloseReasonId="2" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="15143" PostHistoryTypeId="6" PostId="7257" RevisionGUID="a16e3d3b-ad1f-4723-894c-6929ae05f62c" CreationDate="2011-01-19T13:43:08.967" UserId="14" Comment="edited tags" Text="&lt;character&gt;&lt;stats&gt;" />
  <row Id="15144" PostHistoryTypeId="2" PostId="7520" RevisionGUID="134e1ee6-54ae-45ef-acbb-cc1149d51b91" CreationDate="2011-01-19T13:59:02.317" UserId="1386" Text="All the movements in the lunar lander game are multiplied by the elapsed time since the last frame. This comes from the formula velocity * time = distance. Because of this the motion will be constant no matter what the frame rate is.&#xD;&#xA;&#xD;&#xA;Instead of&#xD;&#xA;&#xD;&#xA;    x_bullet -= 1; y_bullet -= 1;&#xD;&#xA;&#xD;&#xA;You should have something like:&#xD;&#xA;&#xD;&#xA;    x_bullet -= BULLET_SPEED * elapsed;&#xD;&#xA;    y_bullet -= BULLET_SPEED * elapsed;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15145" PostHistoryTypeId="2" PostId="7521" RevisionGUID="d034cda3-a25d-4708-9a7f-0e20245141e5" CreationDate="2011-01-19T14:33:20.653" UserId="853" Text=" Is there any literature on game design patterns? I'm taking a software design class and would like to learn how some of these design patterns would apply to game development." />
  <row Id="15146" PostHistoryTypeId="1" PostId="7521" RevisionGUID="d034cda3-a25d-4708-9a7f-0e20245141e5" CreationDate="2011-01-19T14:33:20.653" UserId="853" Text="Game Design Patterns ( think GOF ) literature?" />
  <row Id="15147" PostHistoryTypeId="3" PostId="7521" RevisionGUID="d034cda3-a25d-4708-9a7f-0e20245141e5" CreationDate="2011-01-19T14:33:20.653" UserId="853" Text="&lt;programming&gt;" />
  <row Id="15148" PostHistoryTypeId="10" PostId="7521" RevisionGUID="cbec595d-51eb-43c5-9460-383b7dd39f81" CreationDate="2011-01-19T15:01:21.130" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="15149" PostHistoryTypeId="5" PostId="7521" RevisionGUID="a87c9113-62dd-4880-9e01-42eaa244216d" CreationDate="2011-01-19T15:01:21.273" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are some programming design patterns that are useful in game development?](http://gamedev.stackexchange.com/questions/4157/what-are-some-programming-design-patterns-that-are-useful-in-game-development)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA; Is there any literature on game design patterns? I'm taking a software design class and would like to learn how some of these design patterns would apply to game development." />
  <row Id="15150" PostHistoryTypeId="2" PostId="7522" RevisionGUID="2f8ec2ec-ba5b-4f89-a34a-6d4df8b080ea" CreationDate="2011-01-19T15:14:30.773" UserId="1386" Text="Unity web player (for windows) can use both DirectX and OpenGL in a window (however it abstracts your access to these APIs).&#xD;&#xA;&#xD;&#xA;Another approach would be to implement a DirectX plugin using ActiveX (for Internet Explorer), or [NPAPI][1] (for other browsers).&#xD;&#xA;&#xD;&#xA;If you use NPAPI, when your plugin starts up you'll receive a window handle where you can draw whatever you want (including a D3D window). If you go this route you're essentially running native code on the clients machines.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/NPAPI" />
  <row Id="15151" PostHistoryTypeId="2" PostId="7523" RevisionGUID="e40a42bd-cd4e-4dc9-8c2e-4f2b645a752b" CreationDate="2011-01-19T15:30:02.947" UserId="4191" Text="A design pattern that I evolved over the course of many years, and which has been spectacularly useful to me, is something I refer to as &quot;brokered definition sets&quot;; as eventually revealed by [this question I wrote about it on StackOverflow][1], in GOF terminology it's a species of Flyweight-Singleton-Registry (sometimes with Factory mixed in).&#xD;&#xA;&#xD;&#xA;The core concept is that some property of a model, like the species of a creature, is set up so that each possible value for the property has a corresponding definition object -- a single, shared object per value -- that specifies its behavior (the Flyweight-Singletons), and these are accessed through a central broker (the Registry and/or Factory).  In my usage, they're also generally accessed via scalar keys, to facilitate weak binding for runtime morphism purposes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/401720/brokered-definition-set-design-pattern-well-known-under-another-name" />
  <row Id="15152" PostHistoryTypeId="2" PostId="7524" RevisionGUID="8f78e3c5-f835-4d7a-9d0a-187130abe031" CreationDate="2011-01-19T16:29:31.610" UserId="1829" Text="I dont know much about finite state machine in AI or other game behaviors in game, except this quick tutorial with a Miner: http://www.ai-junkie.com/architecture/state_driven/tut_state1.html which is object oriented.&#xD;&#xA;&#xD;&#xA;I don't really know if this tutorial describes the State pattern or not, what do you think ?&#xD;&#xA;&#xD;&#xA;I'm not speaking about other more arithmetic-oriented stuff like steering or physics or path-finding or collisions, but rather about game logics, state-driven AI, and things that involves a lot of simultaneous states and `if`s and/or `switch`es&#xD;&#xA;&#xD;&#xA;What are the pro/cons of using either a State Pattern or a sequential check of a plain state structure like this:&#xD;&#xA;&#xD;&#xA;    struct States&#xD;&#xA;    {&#xD;&#xA;    bool is_walking, is_running, holds_a_weapon, is_crouch;&#xD;&#xA;    int weapon_id, int id_team;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    void HandleStates (States state)&#xD;&#xA;    {&#xD;&#xA;    //etc&#xD;&#xA;    }" />
  <row Id="15153" PostHistoryTypeId="1" PostId="7524" RevisionGUID="8f78e3c5-f835-4d7a-9d0a-187130abe031" CreationDate="2011-01-19T16:29:31.610" UserId="1829" Text="State Machines: State Object versus sequential check: what are the pro/cons ?" />
  <row Id="15154" PostHistoryTypeId="3" PostId="7524" RevisionGUID="8f78e3c5-f835-4d7a-9d0a-187130abe031" CreationDate="2011-01-19T16:29:31.610" UserId="1829" Text="&lt;c++&gt;&lt;ai&gt;&lt;c&gt;&lt;state&gt;" />
  <row Id="15155" PostHistoryTypeId="5" PostId="7515" RevisionGUID="34f4a7d0-2d8f-43ae-9b0e-46f6aafb1493" CreationDate="2011-01-19T16:41:18.877" UserId="51" Comment="completely reworded the question to fix the broken english" Text="I've come across games that are 3D that are playable in a browser.  They require a plugin to be installed to work.  I guess the plugin creates a D3D window inside the browser.&#xD;&#xA;&#xD;&#xA;How would I go about implementing something similar?&#xD;&#xA;" />
  <row Id="15156" PostHistoryTypeId="4" PostId="7515" RevisionGUID="34f4a7d0-2d8f-43ae-9b0e-46f6aafb1493" CreationDate="2011-01-19T16:41:18.877" UserId="51" Comment="completely reworded the question to fix the broken english" Text="How do you make Direct3D work in a browser?" />
  <row Id="15157" PostHistoryTypeId="2" PostId="7525" RevisionGUID="c3e2396c-c369-4777-8e08-1943627e670b" CreationDate="2011-01-19T17:19:14.517" UserId="4752" Text="I am porting an AGS game to iPhone, and was wondering what the best approach to the port would be? Is there a mature engine developed solely for the point-and-click style?&#xD;&#xA;&#xD;&#xA;If not, how best would you structure your code and assets?" />
  <row Id="15158" PostHistoryTypeId="1" PostId="7525" RevisionGUID="c3e2396c-c369-4777-8e08-1943627e670b" CreationDate="2011-01-19T17:19:14.517" UserId="4752" Text="iPhone point-and-click adventure game engine" />
  <row Id="15159" PostHistoryTypeId="3" PostId="7525" RevisionGUID="c3e2396c-c369-4777-8e08-1943627e670b" CreationDate="2011-01-19T17:19:14.517" UserId="4752" Text="&lt;engine&gt;&lt;iphone&gt;" />
  <row Id="15163" PostHistoryTypeId="2" PostId="7527" RevisionGUID="f21cbad1-d5a7-4ab5-bd02-183b8237d20b" CreationDate="2011-01-19T17:22:51.307" UserId="4191" Text="You might want to look at [Sauerbraten (Cube 2)][1], a project focused on being a working open source 3D game with a well-designed, extendable engine.  The game they implemented is an FPS rather than an RPG, so the RPG elements would be up to you to design in, but that level of design is probably one that'd wind up being completely custom in any event.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sauerbraten.org/" />
  <row Id="15164" PostHistoryTypeId="2" PostId="7528" RevisionGUID="305bac84-cc61-4fcb-b7af-68e614fd524f" CreationDate="2011-01-19T17:23:48.390" UserId="4720" Text="I am making a first-person computer game in the style of Carmen Sandiego or The Cluefinders. My game company is just starting up, so we have no spare money.&#xD;&#xA;&#xD;&#xA;My animator and I decided that the best way to get movement throughout the game would be to create 640x480 videos that would serve as backdrops, and would hold everything from entering/exiting the scene to talking with other characters (especially since Flash and WPF don't play well with each other). Everything the user interacts with directly (by clicking or dragging) would be put over this video, and in cases of clicking &quot;something in the video,&quot; we'll use empty image boxes as &quot;hotspots&quot;.&#xD;&#xA;&#xD;&#xA;Thus, bringing me to the question. What is the best video format to use so that we have good quality video at 640x480 res, yet does not take up too much space, as this will be running from disk. Whatever it is, it must be able to be integrated in WPF without WinHost, because I have to have WPF objects over it. And again, it must be a format I can use commercially without royalties, but also does not require me to pay for it (therefore, BINK Video is not an option).&#xD;&#xA;" />
  <row Id="15165" PostHistoryTypeId="1" PostId="7528" RevisionGUID="305bac84-cc61-4fcb-b7af-68e614fd524f" CreationDate="2011-01-19T17:23:48.390" UserId="4720" Text="Smallest MQ/HQ Video Format for Game Software (VB.net/WPF based)" />
  <row Id="15166" PostHistoryTypeId="3" PostId="7528" RevisionGUID="305bac84-cc61-4fcb-b7af-68e614fd524f" CreationDate="2011-01-19T17:23:48.390" UserId="4720" Text="&lt;video&gt;" />
  <row Id="15167" PostHistoryTypeId="2" PostId="7529" RevisionGUID="72ebb840-dce8-46ec-8917-c6916b39bdf2" CreationDate="2011-01-19T17:46:52.917" UserId="2447" Text="There have been several excellent recommendations,  I would add panda3d to the list of items to check out.  It has quite good documentation and is fairly easy to use. " />
  <row Id="15168" PostHistoryTypeId="6" PostId="7502" RevisionGUID="15ba826f-6615-46b6-8dfa-c4c4eed47689" CreationDate="2011-01-19T17:51:28.677" UserId="953" Comment="Added &quot;blender&quot; tag" Text="&lt;3d&gt;&lt;graphics&gt;&lt;unity&gt;&lt;lighting&gt;&lt;blender&gt;" />
  <row Id="15169" PostHistoryTypeId="2" PostId="7530" RevisionGUID="e3240afb-3429-4b88-a4f6-4986ba67ac03" CreationDate="2011-01-19T17:52:16.810" UserId="3822" Text="Check out Firebreath for Cross-broswer support. &#xD;&#xA;&#xD;&#xA;http://code.google.com/p/firebreath/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15170" PostHistoryTypeId="2" PostId="7531" RevisionGUID="ec66c34d-eb1f-4230-b98b-3a35c10c9747" CreationDate="2011-01-19T17:55:45.170" UserId="1156" Text="Chances are, there are no (maybe one or two hobby ones) 'mature engines' for iPhone point-and-click.&#xD;&#xA;&#xD;&#xA;However, [Cocos2D iPhone][1] has a high level of abstraction, so it should be easy enough to use that.&#xD;&#xA;&#xD;&#xA;As for code structuring, that's really up to you. I personally would have a system where:&#xD;&#xA;&#xD;&#xA; - The background is just a static image.&#xD;&#xA; - Items are graphically static on the background, but in code they exist with a position and general rules for combining. So a lamp at (x,y) would receive the touch there and do whatever it has to.&#xD;&#xA; - If an object is on the screen, it could have checks for 'am I being used with object X?' and 'has event Y happened?'. This indicates you would need a set of event flags, muchlike an RPG. Something like 'has player opened secret door', 'has player killed bad guy', 'has player unlocked safe', etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/" />
  <row Id="15171" PostHistoryTypeId="5" PostId="7525" RevisionGUID="8084c597-5aee-4d76-a983-79f555c1262e" CreationDate="2011-01-19T18:08:50.363" UserId="4752" Comment="added 551 characters in body" Text="I am porting an AGS game to iPhone, and was wondering what the best approach to the port would be? Is there a mature engine developed solely for the point-and-click style? Note: I have never developed an adventure point-and-click game before.&#xD;&#xA;&#xD;&#xA;If not, how best would you structure your code and assets?&#xD;&#xA;&#xD;&#xA;More specifically, how would you deal with say 100+ scenes. My initial approach is to create a scene superclass with things common between all scenes, like backgrounds, music, doors, windows, characters. Then for each scene an inherited version of that superclass with more particular things like checks, dependencies etc. Upon entering the scene, you'd check for dependencies and go from there. This is all off the top of my head mind you, so probably forgetting quite a bit." />
  <row Id="15173" PostHistoryTypeId="5" PostId="7527" RevisionGUID="159819b7-ac37-4f24-b83e-4a7e06f4ac34" CreationDate="2011-01-19T18:45:15.150" UserId="4191" Comment="+note" Text="You might want to look at [Sauerbraten (Cube 2)][1], a project focused on being a working open source 3D game with a well-designed, extendable engine.  The game they implemented is an FPS rather than an RPG, so the RPG elements would be up to you to design in, but that level of design is probably one that'd wind up being completely custom in any event.&#xD;&#xA;&#xD;&#xA;One notable aspect of Sauerbraten is that it, like Cube, is heavily focused on the world model being runtime morphic, which can be extremely useful both for developers working on the setting from within it, and if you want to go the ambitious dynamic persistent world route.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sauerbraten.org/" />
  <row Id="15174" PostHistoryTypeId="5" PostId="7531" RevisionGUID="9a297884-c5b5-4924-8d7c-c7a542822a84" CreationDate="2011-01-19T19:07:46.967" UserId="1156" Comment="added 417 characters in body; added 38 characters in body" Text="Chances are, there are no (maybe one or two hobby ones) 'mature engines' for iPhone point-and-click.&#xD;&#xA;&#xD;&#xA;However, [Cocos2D iPhone][1] has a high level of abstraction, so it should be easy enough to use that.&#xD;&#xA;&#xD;&#xA;As for code structuring, that's really up to you. I personally would have a system where:&#xD;&#xA;&#xD;&#xA; - The background is just a static image.&#xD;&#xA; - Items are graphically static on the background, but in code they exist with a position and general rules for combining. So a lamp at (x,y) would receive the touch there and do whatever it has to.&#xD;&#xA; - If an object is on the screen, it could have checks for 'am I being used with object X?' and 'has event Y happened?'. This indicates you would need a set of event flags, muchlike an RPG. Something like 'has player opened secret door', 'has player killed bad guy', 'has player unlocked safe', etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/&#xD;&#xA;&#xD;&#xA;EDIT: Following your edit, Cocos2D has its own Scene class. This can quite easily be derived from, and would save significant time from having to develop a whole scene object.&#xD;&#xA;&#xD;&#xA;As for doors, I would treat them as a separate object. If you give each object the player as a parameter when you press them, you could simply have pressing a rock call player.add_item(this), and a door player.setzone(scene.leftexit).&#xD;&#xA;&#xD;&#xA;I wish you luck with your project." />
  <row Id="15175" PostHistoryTypeId="2" PostId="7532" RevisionGUID="ee483664-5a11-460b-842d-bdb88ba82d16" CreationDate="2011-01-19T19:30:02.050" UserId="4755" Text="I have a problem with my XNA Game, I have a function where I need my sprite to face towards an enemy, using this code:&#xD;&#xA;&#xD;&#xA;            Vector2 currentPosition = Position;&#xD;&#xA;            Vector2 nearestEnemy = gameObjectManager.GetNearestEnemy(Position, GameObjectTypes.Zombie);&#xD;&#xA;&#xD;&#xA;            Orientation = (float)Math.Atan2(nearestEnemy.Y - currentPosition.Y, nearestEnemy.X - currentPosition.X)&#xD;&#xA;&#xD;&#xA;As found on an XNA forum results in my character looking 90 degrees away from the enemy.&#xD;&#xA;&#xD;&#xA;Adding &quot;MathHelper.ToRadians(90);&quot; to the end of my Orientation assignment fixes this bug, why is this happening? &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="15176" PostHistoryTypeId="1" PostId="7532" RevisionGUID="ee483664-5a11-460b-842d-bdb88ba82d16" CreationDate="2011-01-19T19:30:02.050" UserId="4755" Text="XNA - Weird bug with 2D Sprite Rotation" />
  <row Id="15177" PostHistoryTypeId="3" PostId="7532" RevisionGUID="ee483664-5a11-460b-842d-bdb88ba82d16" CreationDate="2011-01-19T19:30:02.050" UserId="4755" Text="&lt;xna&gt;&lt;ai&gt;" />
  <row Id="15178" PostHistoryTypeId="6" PostId="7532" RevisionGUID="a11f448f-83f3-4041-b02b-328d2a693a2c" CreationDate="2011-01-19T19:39:55.247" UserId="3794" Comment="edited tags" Text="&lt;xna&gt;&lt;2d&gt;&lt;math&gt;" />
  <row Id="15179" PostHistoryTypeId="2" PostId="7533" RevisionGUID="c16aa79f-ef23-4712-8748-27db66fac954" CreationDate="2011-01-19T19:45:59.510" UserId="3081" Text="It seems to me that your sprite may be incorrectly oriented in the source file.  Atan2, I believe, returns the angle of the given vector, where zero indicates a vector pointing &quot;to the right&quot; (+X, Y=0).  If your sprite file does not point &quot;to the right&quot;, you will have to make angle corrections." />
  <row Id="15180" PostHistoryTypeId="2" PostId="7534" RevisionGUID="2d239814-d235-405e-9344-7ca21a803526" CreationDate="2011-01-19T19:49:15.170" UserId="395" Text="Given your listed requirements I'm pretty sure there is no answer. Theora or WebM are probably the only that will be free, and I'm sure by now there are Windows codecs for WebM that you could bundle. This seems like a horrible idea though, you should really just do animation the way everyone else does it." />
  <row Id="15181" PostHistoryTypeId="25" PostId="7532" RevisionGUID="ade32a79-503c-48de-ba21-985c7e4bd2b1" CreationDate="2011-01-19T19:55:39.847" Comment="http://twitter.com/#!/StackGameDev/status/27816477407051776" />
  <row Id="15184" PostHistoryTypeId="2" PostId="7536" RevisionGUID="a2a44678-3448-48fc-a921-be9d77962241" CreationDate="2011-01-19T21:03:44.903" UserId="1198" Text="To make a real-world example, lets assume I want to build an animated sprite for an explosion. The duration of the animation should last ~1 second, and we'll say exactly one second to make the math a bit more simple. And lets assume I'm using XNA and my goal is to target both XBox (60fps), PC (60fps), and Windows Phone 7 (30fps).&#xD;&#xA;&#xD;&#xA;My question is this, how should I build the sprite animations so that my programming is as simple as possible without simply using a timer to calculate which frame I should be on (which I feel would make the animation &quot;choppy&quot;)? " />
  <row Id="15185" PostHistoryTypeId="1" PostId="7536" RevisionGUID="a2a44678-3448-48fc-a921-be9d77962241" CreationDate="2011-01-19T21:03:44.903" UserId="1198" Text="Building 2D Assets for a Game Targeting Multiple Framerates" />
  <row Id="15186" PostHistoryTypeId="3" PostId="7536" RevisionGUID="a2a44678-3448-48fc-a921-be9d77962241" CreationDate="2011-01-19T21:03:44.903" UserId="1198" Text="&lt;xna&gt;&lt;algorithm&gt;&lt;assets&gt;&lt;animation&gt;" />
  <row Id="15187" PostHistoryTypeId="2" PostId="7537" RevisionGUID="0fa8a94c-9f6b-4f8f-ac18-89e22b6507e4" CreationDate="2011-01-19T22:01:30.473" UserId="744" Text="You have two basic options, animate by frame or animate by time. If you animate by frame it will run twice as long. If you animate by time it will skip half the frames. Choppiness in this case is largely the result of bad animation (no blur, no squash+stretch, no ease-in/out); 30fps is more than smooth enough for sprites in motion.&#xD;&#xA;&#xD;&#xA;As for how I'd do it with a timer,&#xD;&#xA;&#xD;&#xA;    # Figure out how long the animation's been going&#xD;&#xA;    elapsed = (now - start)&#xD;&#xA;    # Figure out how far we are into it.&#xD;&#xA;    percentage = elapsed / animation.duration &#xD;&#xA;    # Figure out what frame we are given that state.&#xD;&#xA;    frame = animation.frames[percentage * animation.frames.size()]&#xD;&#xA;" />
  <row Id="15188" PostHistoryTypeId="5" PostId="7523" RevisionGUID="041889b6-5331-4cf9-8d75-8b2bd0a11bea" CreationDate="2011-01-19T22:23:45.757" UserId="4191" Comment="tweak to de-GOF" Text="A design pattern that I evolved over the course of many years, and which has been spectacularly useful to me, is something I refer to as &quot;brokered definition sets&quot;; how to summarize it in GOF terms appears to be controversial, but [this question I wrote about it on StackOverflow][1] goes into some detail about it.&#xD;&#xA;&#xD;&#xA;The core concept is that some property of a model, like the species of a creature, is set up so that each possible value for the property has a corresponding definition object -- a single, shared object per value -- that specifies its behavior, and these are accessed through a central broker (which, GOF-wise, may be a Registry, a Factory, or both).  In my usage, they're also generally accessed via scalar keys, to facilitate weak binding for runtime morphism purposes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/401720/brokered-definition-set-design-pattern-well-known-under-another-name" />
  <row Id="15189" PostHistoryTypeId="25" PostId="7525" RevisionGUID="defcfef6-c5d3-402c-89fd-7a61ce1ed614" CreationDate="2011-01-19T22:55:40.097" Comment="http://twitter.com/#!/StackGameDev/status/27861776854945792" />
  <row Id="15190" PostHistoryTypeId="2" PostId="7538" RevisionGUID="6a14f179-1fac-4825-a837-dcc2de43aa30" CreationDate="2011-01-19T23:33:37.053" UserId="4129" Text="My models are axis-aligned.&#xD;&#xA;&#xD;&#xA;I know the normal of the surface I want to draw them on; how do I compute the rotations or rotation matrix that I should use to draw the model perpendicular to the surface?&#xD;&#xA;" />
  <row Id="15191" PostHistoryTypeId="1" PostId="7538" RevisionGUID="6a14f179-1fac-4825-a837-dcc2de43aa30" CreationDate="2011-01-19T23:33:37.053" UserId="4129" Text="drawing a model on a slope" />
  <row Id="15192" PostHistoryTypeId="3" PostId="7538" RevisionGUID="6a14f179-1fac-4825-a837-dcc2de43aa30" CreationDate="2011-01-19T23:33:37.053" UserId="4129" Text="&lt;geometry&gt;" />
  <row Id="15195" PostHistoryTypeId="2" PostId="7540" RevisionGUID="b4667676-5b4c-4ce1-a759-70c921b54b2e" CreationDate="2011-01-20T01:42:14.243" UserId="4761" Text="I'm creating a game where the enemies spawn randomly on a map then move towards the player every frame at a random speed. The map has no obstacles so the enemies should always move in a straight line. I wrote the movement function a few times but no matter what the enemies always hit 0, 45, 90, 135, 180, 225, 270, 315 angles but never a straight line. Here is an example of the code: &#xD;&#xA;&#xD;&#xA;        base_speed = random();&#xD;&#xA;&#xD;&#xA;        diff_x = abs(enemy_y_pos - player_x_pos);&#xD;&#xA;        diff_y = abs(enemy_x_pos - player_y_pos);&#xD;&#xA;         if (diff_x &gt; diff_y) {&#xD;&#xA;          y_speed = base_speed;&#xD;&#xA;         } else if (diff_y &gt; diff_x) {&#xD;&#xA;          x_speed = base_speed;&#xD;&#xA;         }&#xD;&#xA; &#xD;&#xA;         if (enemy_x_pos &lt; player_x_pos) {&#xD;&#xA;          velocity.x = x_speed;&#xD;&#xA;         } else if (enemy_x_pos &gt; player_x_pos) {&#xD;&#xA;          velocity.x = -x_speed;&#xD;&#xA;         } else {&#xD;&#xA;          velocity.x = 0;&#xD;&#xA;         }&#xD;&#xA; &#xD;&#xA;         if (enemy_y_pos &lt; player_y_pos) {&#xD;&#xA;          velocity.y = y_speed;&#xD;&#xA;         } else if (enemy_y_pos &gt; player_y_pos) {&#xD;&#xA;          velocity.y = -y_speed;&#xD;&#xA;         } else {&#xD;&#xA;                velocity.y = 0;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        enemy_x_pos = enemy_x_pos + velocity.x;&#xD;&#xA;        enemy_y_pos = enemy_y_pos + velocity.y;&#xD;&#xA;&#xD;&#xA;This is my first attempt at game programming. I guessing it's should use algorithm like Bresenham’s Line( http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm) but my attempts to implement have the same issue. How do I make enemies move in a straight line?" />
  <row Id="15196" PostHistoryTypeId="1" PostId="7540" RevisionGUID="b4667676-5b4c-4ce1-a759-70c921b54b2e" CreationDate="2011-01-20T01:42:14.243" UserId="4761" Text="Enemy movement in straight line to player in chase game." />
  <row Id="15197" PostHistoryTypeId="3" PostId="7540" RevisionGUID="b4667676-5b4c-4ce1-a759-70c921b54b2e" CreationDate="2011-01-20T01:42:14.243" UserId="4761" Text="&lt;movement&gt;" />
  <row Id="15198" PostHistoryTypeId="25" PostId="7538" RevisionGUID="5f8d3c5f-6347-4878-a200-efdddf61780c" CreationDate="2011-01-20T01:55:39.893" Comment="http://twitter.com/#!/StackGameDev/status/27907074994208769" />
  <row Id="15199" PostHistoryTypeId="2" PostId="7541" RevisionGUID="bbbbc697-6af8-470b-a728-66ea23767b1e" CreationDate="2011-01-20T02:02:38.203" UserId="3794" Text="I hope i understand what you wish to do. &#xD;&#xA;&#xD;&#xA;Bresenham's line algorithm was developed for fast drawing lines without using floating point operations (integer operations are faster). It is very interesting historicaly but not very good solution for a game (especialy because you cannot specify speed).&#xD;&#xA;&#xD;&#xA;When doing a 2D movement use always vectors. This will do all the stuff for you. Sometimes is algebra just wonderful.&#xD;&#xA;&#xD;&#xA;    Vec2d playerPos;&#xD;&#xA;    Vec2d direction; // always normalized&#xD;&#xA;    float velocity;&#xD;&#xA;&#xD;&#xA;    update()&#xD;&#xA;    {&#xD;&#xA;       direction = normalize(playerPos - enemyPos);&#xD;&#xA;       playerPos = playerPos + direction * velocity;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;There will be some vector2D class for your target language for sure. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15200" PostHistoryTypeId="2" PostId="7542" RevisionGUID="cbc7d0af-00b9-4ae9-9ea2-fd3107479166" CreationDate="2011-01-20T03:07:01.123" UserId="4327" Text="Are you calculating every frame?  Your code sets either x_speed or y_speed to a random number and the other to zero (or the default).  Let's say the enemy is at 0, 0 and player is at 20, 10.  This looks like it will set x_speed to some random number each frame and move the enemy to the right until he is at 10, 0.  Then the enemy will move either x or y each frame so it will seem he moves in a 45 degree angle up to 10, 10.  &#xD;&#xA;&#xD;&#xA;Notabene's vector explanation is right but here's how it works.  The Vec2d will have an x and y component.  In the example above, playerPos - enemyPos will give you a vector of (20, 10).  normalize() changes the vector so that the length is 1.  Currently the length is sqrt(20 * 20 + 10 * 10).  That is about 22.36068.  normalize divides both X and Y by this number, giving you about (0.89443, 0.44721) for the direction, which is a vector pointing from the enemy to the player with a length of 1.  Multiplying this by your random speed does what you want.  &#xD;&#xA;&#xD;&#xA;However I would not calculate a new random speed each frame.  You probably just want to set the random speed once, or have an initial speed and a target speed that you get closer to each frame.  It doesn't make sense for your enemy to go 100 mph initially, then 50 mph for one frame and 200 mph for the next.  &#xD;&#xA;&#xD;&#xA;    float targetSpeed = random(); // do this only rarely, or each frame if you don't mind slowing down and speeding up constantly&#xD;&#xA;    &#xD;&#xA;    float acceleration = max(abs(targetSpeed - speed), 0.5) * sgn(targetSpeed - speed); // cap accel/decel at 0.5 per frame&#xD;&#xA;    speed = speed + acceleration;&#xD;&#xA;" />
  <row Id="15201" PostHistoryTypeId="5" PostId="7541" RevisionGUID="aed3fd33-3218-4056-9ea8-9ed4b6d73ef2" CreationDate="2011-01-20T03:12:29.813" UserId="3794" Comment="deleted 45 characters in body" Text="Bresenham's line algorithm was developed for fast drawing lines without using floating point operations (integer operations are faster). It is very interesting historicaly but not very good solution for a game (especialy because you cannot specify speed).&#xD;&#xA;&#xD;&#xA;When doing a 2D movement use always vectors. This will do all the stuff for you. Sometimes is algebra just wonderful.&#xD;&#xA;&#xD;&#xA;    Vec2d playerPos;&#xD;&#xA;    Vec2d direction; // always normalized&#xD;&#xA;    float velocity;&#xD;&#xA;&#xD;&#xA;    update()&#xD;&#xA;    {&#xD;&#xA;       direction = normalize(playerPos - enemyPos);&#xD;&#xA;       playerPos = playerPos + direction * velocity;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;There will be some vector2D class for your target language for sure. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15202" PostHistoryTypeId="5" PostId="7176" RevisionGUID="42007b10-ac29-4756-a32f-2c64802148e5" CreationDate="2011-01-20T03:15:58.700" UserId="3794" Comment="correction" Text="I solved this. Problem was in releasing. You can't access compute shader's resources until it is fully unbind and released. &#xD;&#xA;&#xD;&#xA;**Edit** you dont have to release it at all. Only &quot;unplug&quot; UAV from from gpu.&#xD;&#xA;&#xD;&#xA;    //code is shortened&#xD;&#xA;    //create UAV&#xD;&#xA;    D3D-&gt;CreateTexture2D( &amp;textureDesc, NULL, &amp;pTexture );&#xD;&#xA;    D3DD-&gt;CreateUnorderedAccessView( pTexture, &amp;viewDescUAV, &amp;pTextureUAV );&#xD;&#xA;    &#xD;&#xA;    D3DC-&gt;dispatch(...);&#xD;&#xA;    &#xD;&#xA;    //pTextureUAV-&gt;release(); // You dont have to release (if you want to use UAV again)&#xD;&#xA;    outputTexH-&gt;SetUnorderedAccessView(NULL); // This is what is important&#xD;&#xA;&#xD;&#xA;    effpass-&gt;Apply(0,D3DC); // unbind compute shader&#xD;&#xA;    &#xD;&#xA;    //create SRV on the texture, use it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15203" PostHistoryTypeId="25" PostId="7536" RevisionGUID="787e2039-34fe-47f0-b6b4-d3b69ed660c6" CreationDate="2011-01-20T04:55:40.000" Comment="http://twitter.com/#!/StackGameDev/status/27952372797939712" />
  <row Id="15204" PostHistoryTypeId="17" PostId="6779" RevisionGUID="d7d3eefc-361b-4efe-b10c-89420da77bf6" CreationDate="2010-12-23T21:34:12.277" Comment="from http://stackoverflow.com/questions/4521171/c-xna-normals-question/4522072#4522072" Text="" />
  <row Id="15205" PostHistoryTypeId="17" PostId="6849" RevisionGUID="974c2b8e-a4b7-47f5-92d9-79998f647997" CreationDate="2010-12-27T19:12:57.783" Comment="from http://gaming.stackexchange.com/questions/13417/civilization-4-time-in-own-scenario-runs-up-too-quickly/13431#13431" Text="" />
  <row Id="15207" PostHistoryTypeId="25" PostId="7540" RevisionGUID="d07246f5-e3b7-49be-9809-89a3bb4dff97" CreationDate="2011-01-20T07:55:40.560" Comment="http://twitter.com/#!/StackGameDev/status/27997674812743680" />
  <row Id="15208" PostHistoryTypeId="25" PostId="7515" RevisionGUID="f588ce00-d23b-4332-a51d-6419659ce308" CreationDate="2011-01-20T10:55:40.517" Comment="http://twitter.com/#!/StackGameDev/status/28042973224640512" />
  <row Id="15209" PostHistoryTypeId="2" PostId="7543" RevisionGUID="74297e15-dcc0-4a2f-893e-4b056ed03465" CreationDate="2011-01-20T11:06:40.833" UserId="4456" Text="One of my favorite ways to find this info is by using virtual machines.&#xD;&#xA;&#xD;&#xA;Seeing as how you can configure the hardware and memory that the VM is allowed you can test a wide range of setups on your own PC. This also allows you to test across multiple operating systems.&#xD;&#xA;" />
  <row Id="15210" PostHistoryTypeId="2" PostId="7544" RevisionGUID="a1a7dd58-ceb3-4de7-9bd4-3ec467db3101" CreationDate="2011-01-20T11:30:57.023" UserId="3995" Text="Is there a good tutorial that shows the difference between opengl 1.* and 2.*&#xD;&#xA;&#xD;&#xA;It would be very helpful to know which functions I should **not** be calling (like glBegin() I assume)" />
  <row Id="15211" PostHistoryTypeId="1" PostId="7544" RevisionGUID="a1a7dd58-ceb3-4de7-9bd4-3ec467db3101" CreationDate="2011-01-20T11:30:57.023" UserId="3995" Text="OpenGL 2.0 differences" />
  <row Id="15212" PostHistoryTypeId="3" PostId="7544" RevisionGUID="a1a7dd58-ceb3-4de7-9bd4-3ec467db3101" CreationDate="2011-01-20T11:30:57.023" UserId="3995" Text="&lt;c++&gt;&lt;opengl&gt;&lt;c&gt;" />
  <row Id="15213" PostHistoryTypeId="2" PostId="7545" RevisionGUID="47500001-848e-4062-a042-0171c76ec625" CreationDate="2011-01-20T11:38:03.333" UserId="4264" Text="The &lt;a href=&quot;http://www.opengl.org/wiki/Getting_started&quot;&gt;OpenGL.org getting started&lt;/a&gt; page has an overview, with plenty of links to various tutorials.&#xD;&#xA;&#xD;&#xA;In short, OpenGL 2.0 lives between the fixed function (1.x) and fully programmable (2.x+) world; you can still use everything OpenGL 1.x has, while adding shaders. Moving forward (3.x+), all sorts of old fixed function systems start to get deprecated though, so it may be better to have a clean start instead of mixing both worlds.&#xD;&#xA;&#xD;&#xA;I'm also surprised this had not been asked before.. or at least I couldn't find it on a quick search." />
  <row Id="15214" PostHistoryTypeId="4" PostId="7544" RevisionGUID="0af29ba9-5661-452e-bb11-7c321346f5bb" CreationDate="2011-01-20T11:40:15.873" UserId="744" Comment="Change topic to make it clear that this is 1-&gt;2, not 2-&gt;{3,4}." Text="What is the difference between OpenGL 1.x and 2.x?" />
  <row Id="15215" PostHistoryTypeId="6" PostId="7544" RevisionGUID="0af29ba9-5661-452e-bb11-7c321346f5bb" CreationDate="2011-01-20T11:40:15.873" UserId="744" Comment="Change topic to make it clear that this is 1-&gt;2, not 2-&gt;{3,4}." Text="&lt;opengl&gt;&lt;c&gt;" />
  <row Id="15216" PostHistoryTypeId="2" PostId="7546" RevisionGUID="912fbad9-77f7-42ba-813c-8890508f8a25" CreationDate="2011-01-20T11:41:25.513" UserId="1829" Text="Since building a game is not about 2D anymore, I just want to build a list of the (not necessarily best, but good enough) open source software available to make games.&#xD;&#xA;&#xD;&#xA;I prefer to put emphasis on libraries that insist on specializing on one part of what makes a game (like Ogre does for graphics, and OpenSteer does for steering), rather than engines/libraries that try to feature a lot of different features.&#xD;&#xA;&#xD;&#xA;- **3D Graphics**:&#xD;&#xA;    - OGRE3D http://www.ogre3d.org/&#xD;&#xA;    - Irrlicht http://irrlicht.sourceforge.net/&#xD;&#xA;&#xD;&#xA;- **Sound**:&#xD;&#xA;    - IrrKlang http://www.ambiera.com/irrklang/&#xD;&#xA;&#xD;&#xA;- **Multipurpose/Multimedia**:&#xD;&#xA;    - SDL http://www.libsdl.org/&#xD;&#xA;    - SFML http://www.sfml-dev.org/&#xD;&#xA;&#xD;&#xA;- **AI/Behaviour/PathFinding**:&#xD;&#xA;    - OpenSteer http://opensteer.sourceforge.net/&#xD;&#xA;&#xD;&#xA;- **Physics**:&#xD;&#xA;    - NxOgre (plugin for Ogre3d) http://sourceforge.net/projects/nxogre/&#xD;&#xA;    - Bullet&#xD;&#xA;&#xD;&#xA;Feel free to update this list and/or add categories." />
  <row Id="15217" PostHistoryTypeId="1" PostId="7546" RevisionGUID="912fbad9-77f7-42ba-813c-8890508f8a25" CreationDate="2011-01-20T11:41:25.513" UserId="1829" Text="Good open source / free C/C++ engines/libraries" />
  <row Id="15218" PostHistoryTypeId="3" PostId="7546" RevisionGUID="912fbad9-77f7-42ba-813c-8890508f8a25" CreationDate="2011-01-20T11:41:25.513" UserId="1829" Text="&lt;c++&gt;&lt;ai&gt;&lt;3d-engines&gt;&lt;physics-engine&gt;" />
  <row Id="15219" PostHistoryTypeId="5" PostId="7546" RevisionGUID="f6806d13-5d2a-464d-a1c0-183d5b9f588a" CreationDate="2011-01-20T11:47:03.650" UserId="1829" Comment="added 57 characters in body" Text="Since building a game is not about 2D anymore, I just want to build a list of the (not necessarily best, but good enough) open source software available to make games.&#xD;&#xA;&#xD;&#xA;I prefer to put emphasis on libraries that insist on specializing on one part of what makes a game (like Ogre does for graphics, and OpenSteer does for steering), rather than engines/libraries that try to feature a lot of different features.&#xD;&#xA;&#xD;&#xA;- **3D Graphics**:&#xD;&#xA;    - OGRE3D http://www.ogre3d.org/&#xD;&#xA;    - Irrlicht http://irrlicht.sourceforge.net/&#xD;&#xA;&#xD;&#xA;- **Sound**:&#xD;&#xA;    - IrrKlang http://www.ambiera.com/irrklang/&#xD;&#xA;&#xD;&#xA;Found this: http://wiki.gamedev.net/index.php/Libraries&#xD;&#xA;- **Multipurpose/Multimedia**:&#xD;&#xA;    - SDL http://www.libsdl.org/&#xD;&#xA;    - SFML http://www.sfml-dev.org/&#xD;&#xA;&#xD;&#xA;- **AI/Behaviour/PathFinding**:&#xD;&#xA;    - OpenSteer http://opensteer.sourceforge.net/&#xD;&#xA;&#xD;&#xA;- **Physics**:&#xD;&#xA;    - NxOgre (plugin for Ogre3d) http://sourceforge.net/projects/nxogre/&#xD;&#xA;    - Bullet&#xD;&#xA;&#xD;&#xA;Feel free to update this list and/or add categories." />
  <row Id="15220" PostHistoryTypeId="2" PostId="7547" RevisionGUID="d710e701-5b7f-40f7-b754-b852879df990" CreationDate="2011-01-20T13:28:58.980" UserId="741" Text="Basically you want to test on as many other machines as you can - from your friend's hard-core gaming rig to your gran's email-and-internet-only machine. Especially your gran's email-and-internet-only machine, because it's probably loaded with cruftware and other stuff that will interfere and slow your game to a crawl.&#xD;&#xA;&#xD;&#xA;PC compatibility testing is a big nasty can of worms, and there's a reason why professional testing is expensive. So you want as many different odd scenarios tested as you can.&#xD;&#xA;&#xD;&#xA;Beta testing is the way to go I think, both with friends and family and a wider circle in your fan community. Key thing - don't rely on anecdotal reports. Your friends might be relied on to actually reply, but the wider community will not, unless you make it easy for them.&#xD;&#xA;&#xD;&#xA;Build logging into your app to give you hard facts on FPS, startup time, etc. Give the user an easy questionnaire, ideally built into the game, where they can report whether or not they though it played okay. And have those statistics and logging easily emailable / transmittable back to you, for you to pore over later. The more stats you get back, the better a sense you can have of whether your title is a) working at all on other systems, and b) working well on other systems." />
  <row Id="15221" PostHistoryTypeId="2" PostId="7548" RevisionGUID="61cd6b36-e0ec-45f2-bbfc-ad86d4f55441" CreationDate="2011-01-20T13:30:40.167" UserId="3644" Text="Test on as many PCs as you can (that will also help you to catch all specific bugs). As developer you should know your main bottlenecks - focus on stressing them. You may ask your friends, colleagues at work, girlfriend, parents, lots of people in forums. &#xD;&#xA;&#xD;&#xA;P.S. Just for reference:&#xD;&#xA;&#xD;&#xA;- CPU requirement = run game in minimum resolution or with no GPU rendering at all (I hope the render code utilizes minimum of CPU)&#xD;&#xA;- GPU requirement = run the game on powerful CPU with default resolution and see which GPU is sufficient of doing the task, also mention minimum Direct3D/OpenGL version&#xD;&#xA;- RAM requirement = how much RAM does the game takes (e.g. via TaskManager, with VM size column, to see all allocated RAM, not only active)&#xD;&#xA;- Sound = almost anything fits, just mention 2 / 5.1 channels support&#xD;&#xA;- Display = specify minimum playable resolution where game controls fit&#xD;&#xA;- Network = some massive load tests and see which bandwidth allows it (56k modem, DSL, T1, LAN)&#xD;&#xA;- Keyboard/Mouse/Tablet/Joystick, etc.." />
  <row Id="15222" PostHistoryTypeId="25" PostId="7544" RevisionGUID="c957042f-afa2-4bc1-98ce-07c964e776dd" CreationDate="2011-01-20T13:55:40.823" Comment="http://twitter.com/#!/StackGameDev/status/28088272433451008" />
  <row Id="15223" PostHistoryTypeId="16" PostId="7546" RevisionGUID="9928a5fb-1e32-43e2-b022-1dc3d8e726e4" CreationDate="2011-01-20T14:10:22.360" UserId="14" />
  <row Id="15224" PostHistoryTypeId="2" PostId="7549" RevisionGUID="e9b58b73-be45-4b58-ad7e-ca6abaedf938" CreationDate="2011-01-20T15:16:11.983" UserId="3794" Text="It is always perfect get comunity feedback as mentioned. But where to get community and people who will try to test it? Posting it on some indie games forums will help, but problem will be to get actual feedback. &#xD;&#xA;&#xD;&#xA;Only few percent of people who will test a game it will write you their exact configuration and problems that ocured. People just dont do that. Much better way is enable some kind of benchmark with reading users system configuration. Ask user to run some one button benchmark. Offer some numbers and times(yeah people like it :-)) and let him compare with other users (with sending data) ... It will help. &#xD;&#xA;&#xD;&#xA;And then you have database full of configurations, screen resolutionn, render times and failed features...&#xD;&#xA;&#xD;&#xA;If you are on windows calling DXdiag will help you read the users configuration. But there are some programs you can use on other systems. " />
  <row Id="15225" PostHistoryTypeId="2" PostId="7550" RevisionGUID="81e66258-18d1-4e24-9d28-914fc23317e4" CreationDate="2011-01-20T16:53:40.003" UserId="1430" Text="You should have some rough idea of the minspec just by developing your game -- for example if you made an explicit choice to use D3D10+, you obviously are culling out XP machines. So that's a place to start.&#xD;&#xA;&#xD;&#xA;Find a way to test on as many machines as possible, ideally after implementing some way to gather performance metrics automatically (as users can be unreliable) as well as non-identifiable information about the machine the game is running on (processor(s), core count, GPU type, RAM, OS, et cetera -- take a look at [the kind of data the Steam Hardware &amp; Software Survey collects][1]). One of the best ways to do this is to give your game to friends and family, as has been suggested many times already. Another way might be to approach a community of hobby game developers and see if they are interested in testing your game. I'm not sure such a thing would be an appropriate *question* here on GDSE, but you could probably find a few people in the 'chat' area and you could also look around/post on websites like:&#xD;&#xA;&#xD;&#xA; * http://gamedev.net&#xD;&#xA; * http://tigsource.com&#xD;&#xA; * http://create.msdn.com&#xD;&#xA;&#xD;&#xA;All of those websites have forums or sub-forums dedicated in some way to showing off games, and so you might be able to get a reasonably good response out of them. I would make sure to disclose up front whatever statistics your game collects and/or sends you though, and why you are collecting them. People can get annoyed by that if they discover it after the fact.&#xD;&#xA;&#xD;&#xA;N.B. that the Steam survey is also a useful tool in itself for gauges what a minspec should be -- it can help you see what the cost/benefit ratio of supporting a particular feature or class of hardware might be for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/hwsurvey" />
  <row Id="15226" PostHistoryTypeId="25" PostId="7546" RevisionGUID="b48505f7-e231-42c8-ab16-15ffac86c693" CreationDate="2011-01-20T16:55:40.797" Comment="http://twitter.com/#!/StackGameDev/status/28133571000532992" />
  <row Id="15227" PostHistoryTypeId="4" PostId="7518" RevisionGUID="babe4d97-9d3a-4852-b679-e7750adc6e45" CreationDate="2011-01-20T17:00:34.520" UserId="1156" Comment="Removed wrongly tagged bullet-physics, " Text="2D game - Missile shooting problem on Android" />
  <row Id="15228" PostHistoryTypeId="6" PostId="7518" RevisionGUID="babe4d97-9d3a-4852-b679-e7750adc6e45" CreationDate="2011-01-20T17:00:34.520" UserId="1156" Comment="Removed wrongly tagged bullet-physics, " Text="&lt;2d&gt;&lt;physics&gt;&lt;java&gt;&lt;android&gt;" />
  <row Id="15229" PostHistoryTypeId="10" PostId="7546" RevisionGUID="b23f4511-b89b-42e5-9740-e0528acb8d2a" CreationDate="2011-01-20T17:13:21.530" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="15230" PostHistoryTypeId="25" PostId="7503" RevisionGUID="14329ee6-61e3-4865-a717-0eedfb5dc551" CreationDate="2011-01-20T19:55:41.890" Comment="http://twitter.com/#!/StackGameDev/status/28178874332352512" />
  <row Id="15231" PostHistoryTypeId="2" PostId="7551" RevisionGUID="2dd66e98-10b6-4a49-b69a-750eac6c7846" CreationDate="2011-01-20T20:54:53.760" UserId="1562" Text="To the best of my knowledge Relic's Essence Engine Series (as used in *Company of Heroes* and *Dawn of War II*) uses Lua or a dialect of it for unit stats and mission scripting. There are no real web sources for it, but you could always check out some of the mods at [RelicNews.com][1] to ask your way around if you are interested.&#xD;&#xA;&#xD;&#xA;The [Spark Engine][2] by Unknown Worlds as used in their upcoming game *Natural Selection 2* allows most of the game code to be in Lua as far as I know. The SDK comes with the game pre-order and is currently in beta as is the game.&#xD;&#xA;&#xD;&#xA;Another game that was once promoted heavily relying on Lua would be [Eufloria][3] (formerly Dyson). There is a Lua modding reference on their forums as well.&#xD;&#xA;&#xD;&#xA;Valve's free Co-Op Game [Alien Swarm][4] heavily uses a scripting language called &quot;Squirrel&quot; that has been influenced by Lua. The Alien Swarm SDK should be available for download on Steam.&#xD;&#xA;&#xD;&#xA;I had a pretty comprehensive list of links here but unfortunately, I'm not allowed to post them because my rep is too low.&#xD;&#xA;&#xD;&#xA;  [2]: http://www.unknownworlds.com/ns2/spark/" />
  <row Id="15232" PostHistoryTypeId="2" PostId="7552" RevisionGUID="7a05d13c-65d6-431e-b82e-eb72bc7e1b66" CreationDate="2011-01-20T21:26:36.153" UserId="2301" Text="Don't think there is a huge advantage to using one or the other, but it makes porting your game/graphics a lot easier, as any platform can use spritesheets.  If you are doing a strict flash game, probably comes down to preference/quickness." />
  <row Id="15233" PostHistoryTypeId="6" PostId="4217" RevisionGUID="572aaafb-8dc9-4bc3-9f60-dbf220cac22c" CreationDate="2011-01-20T21:28:37.540" UserId="2301" Comment="edited tags; deleted 1 characters in body; added 1 characters in body; edited tags; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;windows-phone-7&gt;&lt;zune&gt;" />
  <row Id="15234" PostHistoryTypeId="5" PostId="4217" RevisionGUID="572aaafb-8dc9-4bc3-9f60-dbf220cac22c" CreationDate="2011-01-20T21:28:37.540" UserId="2301" Comment="edited tags; deleted 1 characters in body; added 1 characters in body; edited tags; edited tags" Text="We don't have zune HD in Canada (yet) just wondering if it has the same programmable features as WP7? Like gestures and accelerometer.&#xD;&#xA;&#xD;&#xA;Basically if I am just making a game, with screen controls (thumbsticks on the screen) is this an easy port to zune?  &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="15235" PostHistoryTypeId="5" PostId="7551" RevisionGUID="c032280f-96ff-4531-bb7e-9ef6435b80b2" CreationDate="2011-01-20T22:00:15.067" UserId="1156" Comment="Added your links in :); added 1 characters in body" Text="To the best of my knowledge Relic's Essence Engine Series (as used in *Company of Heroes* and *Dawn of War II*) uses Lua or a dialect of it for unit stats and mission scripting. There are no real web sources for it, but you could always check out some of the mods at [RelicNews.com][1] to ask your way around if you are interested.&#xD;&#xA;&#xD;&#xA;The [Spark Engine][2] by Unknown Worlds as used in their upcoming game *Natural Selection 2* allows most of the game code to be in Lua as far as I know. The SDK comes with the game pre-order and is currently in beta as is the game.&#xD;&#xA;&#xD;&#xA;Another game that was once promoted heavily relying on Lua would be [Eufloria][3] (formerly [Dyson][4]). There is a Lua modding reference on their forums as well.&#xD;&#xA;&#xD;&#xA;Valve's free co-op game [Alien Swarm][5] heavily uses a scripting language called &quot;Squirrel&quot; that has been influenced by Lua. The Alien Swarm SDK should be available for download on Steam. ([Dev wiki][6])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.relicnews.com/&#xD;&#xA;  [2]: http://www.unknownworlds.com/ns2/spark/&#xD;&#xA;  [3]: http://eufloria-game.com/news.php&#xD;&#xA;  [4]: http://dyson-game.com/smf/index.php?board=3.0&#xD;&#xA;  [5]: http://alienswarm.com&#xD;&#xA;  [6]: http://developer.valvesoftware.com/wiki/Category:Alien_Swarm " />
  <row Id="15236" PostHistoryTypeId="6" PostId="7538" RevisionGUID="05fcdba5-096b-47d3-8601-6220f83e7d8e" CreationDate="2011-01-20T22:02:05.783" UserId="1156" Comment="edited tags" Text="&lt;geometry&gt;&lt;matrix&gt;&lt;rotation&gt;" />
  <row Id="15237" PostHistoryTypeId="25" PostId="7528" RevisionGUID="b0e68103-4bd2-440b-ba31-0afb2aa2f5e7" CreationDate="2011-01-20T22:55:41.710" Comment="http://twitter.com/#!/StackGameDev/status/28224171922161664" />
  <row Id="15238" PostHistoryTypeId="6" PostId="7540" RevisionGUID="af110cc4-1ce6-4ce7-a874-2284b27e598f" CreationDate="2011-01-20T23:21:19.773" UserId="2301" Comment="edited tags" Text="&lt;ai&gt;&lt;movement&gt;" />
  <row Id="15239" PostHistoryTypeId="9" PostId="4217" RevisionGUID="cdd2f604-998c-417a-a5af-7540d2205819" CreationDate="2011-01-20T23:24:37.757" UserId="2301" Comment="Rollback to [1d033fa9-7a6b-423c-9977-ccc0d4fecbc5]" Text="&lt;xna&gt;&lt;c#&gt;&lt;windows-phone-7&gt;" />
  <row Id="15240" PostHistoryTypeId="2" PostId="7553" RevisionGUID="4ad086ed-26c2-475a-b10b-e4c390e1266b" CreationDate="2011-01-20T23:33:38.273" UserId="4777" Text="Hey, I have been away from XNA for a couple months and want to get back into it.  I had a game I was currently working on, but it was done in XNA 3.1. I was wondering what the differences between the two are? and if its worth updating???" />
  <row Id="15241" PostHistoryTypeId="1" PostId="7553" RevisionGUID="4ad086ed-26c2-475a-b10b-e4c390e1266b" CreationDate="2011-01-20T23:33:38.273" UserId="4777" Text="Difference between XNA 3.1 and 4.0??" />
  <row Id="15242" PostHistoryTypeId="3" PostId="7553" RevisionGUID="4ad086ed-26c2-475a-b10b-e4c390e1266b" CreationDate="2011-01-20T23:33:38.273" UserId="4777" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;framework&gt;" />
  <row Id="15243" PostHistoryTypeId="2" PostId="7554" RevisionGUID="ba023381-adea-416e-a80e-d814f0d7d2b5" CreationDate="2011-01-20T23:35:30.830" UserId="2301" Text="I would say its very beneficial to update your XNA to 4.0 (especially if you want to work on windows phone 7)&#xD;&#xA;&#xD;&#xA;There are a few changes (not a ridiculous amount though) between 3.1 and 4.0. &#xD;&#xA;Here is an excellent site that I have had bookmarked that will help you out! (its a cheatsheet)&#xD;&#xA;[XNA 3.1 to 4.0 CheatSheet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/" />
  <row Id="15244" PostHistoryTypeId="2" PostId="7555" RevisionGUID="78242514-efb4-43a1-96a9-a0d0929438e2" CreationDate="2011-01-20T23:37:06.990" UserId="2332" Text="I will try to answer this as best as I can, but there are certain &quot;best practices&quot; which I am unsure on, but I'll try to break it down as cleanly as possible.&#xD;&#xA;&#xD;&#xA;**FSMs**&#xD;&#xA;&#xD;&#xA;Firstly, the Miner tutorial is from Programming Game AI by Example by Mat Buckland (which I do recommend you get as an introduction to AI). He uses an enum for each state, NOT a struct. With the struct in your example you have booleans as the states, so you could have any number of these on at the same time. This might lead to behaviour you want, but more often than not with FSMs (Finite State Machines) it leads to undesirable behaviour.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    enum&#xD;&#xA;    {&#xD;&#xA;    WANDER_AROUND,&#xD;&#xA;    ATTACK,&#xD;&#xA;    RUN_AWAY,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Secondly, that's not the only way he describes states. The way I personally prefer (depending on the situation) is to create an abstract class called State that has an Enter(), Exit() and Update() functions. Then create my states as subclasses of the State class.&#xD;&#xA;&#xD;&#xA;Like this picture (found on page 2 of that link actually):&#xD;&#xA;![alt text][1]&#xD;&#xA;&#xD;&#xA;**State Pattern**&#xD;&#xA;&#xD;&#xA;In my personal opinion, the state pattern is just a part of software design where the software has a number of states. The *implementation* is down to the developer. I don't feel there's a proper difference between using a big switch statement or creating a complete state machine to run all your states like I've outlined above. They're essentially doing the same thing.&#xD;&#xA;So in that respect, the answer to one of your questions is yes, I do believe that page describes the state pattern.&#xD;&#xA;&#xD;&#xA;**Pros/Cons**&#xD;&#xA;&#xD;&#xA;There are pros and cons to any method you use to implement a state-driven design.&#xD;&#xA;&#xD;&#xA;*Using an If/Else or Switch Statement*&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - Very easy to add and check conditions&#xD;&#xA;   of states&#xD;&#xA; - Can be prototyped very quickly&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - When you've got a load of states, it&#xD;&#xA;   can turn very ugly, very quickly.&#xD;&#xA; - Keeping track of transitions, effects when the state is entered/exited or anything specific to the state is difficult&#xD;&#xA;&#xD;&#xA;*Using an object-oriented state machine*&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - Highly extensible - the only thing you need to do is create a new state that inherits the abstract State class&#xD;&#xA; - Easily maintainable - You don't have to worry about spaghetti looking code as each state resides in its own class. You can easily see the conditions associated with that state without worrying about the other states.&#xD;&#xA; - Intuitive - If you're working on a team project with this sort of state machine, it will be so much easier for the person reading your code. They won't have to read through lines upon lines of code just to get to a certain state (&quot;Always program as if the programmer maintaining your code is a psychopath who knows where you live!&quot; :))&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - Slight learning curve - This design may take a while to get your head completely round when implementing it&#xD;&#xA; - I honestly can't think of any more, since I do prefer this way, but if anyone wishes to add to it, just comment and I'll add them.&#xD;&#xA;&#xD;&#xA;I hope that answers all your questions. In fact, I've just opened up my copy of Programming Game AI by Example and Mat does mention that the state machine is known as the &quot;state design pattern&quot;. Personally, I disagree, but to each his own.&#xD;&#xA;&#xD;&#xA;Hope it helps :)&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/uYcS7.gif" />
  <row Id="15245" PostHistoryTypeId="2" PostId="7556" RevisionGUID="444bd1a2-5af1-4b87-acf6-ef97f09fc271" CreationDate="2011-01-20T23:45:38.557" UserId="4776" Text="There are 4 moving physical nodes in 3D space. They are paired with two rubber strings (1 &lt;-&gt; 2; 3 &lt;-&gt; 4).&#xD;&#xA;&#xD;&#xA;Part I: How to detect the collision of two strings?&#xD;&#xA;&#xD;&#xA;Part II: On the moment of collision, fifth node is created at the intersection point and here you have the [force-based graph](http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)). 5-th node (bend point) **can slide** among the strings as in a real world. Given the new coordinates of 4 nodes, how to calculate the position of the 5-th node on the next frame? I assume string force on the nodes to be `F = -k * x` where x is the string length.&#xD;&#xA;&#xD;&#xA;All I came up to is that the force between 5 and 1 equals 5 and 2 (the same with 3 and 4). What are the other properties?." />
  <row Id="15246" PostHistoryTypeId="1" PostId="7556" RevisionGUID="444bd1a2-5af1-4b87-acf6-ef97f09fc271" CreationDate="2011-01-20T23:45:38.557" UserId="4776" Text="How to detect and collide two elastic strings?" />
  <row Id="15247" PostHistoryTypeId="3" PostId="7556" RevisionGUID="444bd1a2-5af1-4b87-acf6-ef97f09fc271" CreationDate="2011-01-20T23:45:38.557" UserId="4776" Text="&lt;physics&gt;&lt;math&gt;&lt;collision-detection&gt;" />
  <row Id="15248" PostHistoryTypeId="2" PostId="7557" RevisionGUID="98eeca1a-c22d-49b7-af0f-38ca5dee3657" CreationDate="2011-01-21T00:06:04.767" UserId="1069" Text="XNA 4 restructured a lot of the graphics section of XNA, it also added support for more built in effects (as opposed to just BasicEffect.) XNA 4 also dropped Zune support and now supports Windows Phone 7 development in its Reach mode. Shawn Hargreaves posted a lot of comparison posts on his blog last year, for example http://blogs.msdn.com/b/shawnhar/archive/2010/03/12/reach-vs-hidef.aspx" />
  <row Id="15249" PostHistoryTypeId="2" PostId="7558" RevisionGUID="b6ff53b9-9149-4d75-9976-f0317975b545" CreationDate="2011-01-21T00:16:03.760" UserId="3656" Text="XNA4 introduced [DynamicSoundEffectInstance][1] which opens up **HUGE** doors for dynamic audio.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff434006.aspx" />
  <row Id="15250" PostHistoryTypeId="25" PostId="7553" RevisionGUID="44a4a5ee-6529-446a-ab92-fbb0335ab3cd" CreationDate="2011-01-21T01:55:41.677" Comment="http://twitter.com/#!/StackGameDev/status/28269469889470465" />
  <row Id="15251" PostHistoryTypeId="2" PostId="7559" RevisionGUID="88e2fe51-e210-4e1b-9a70-abbdfa71f43f" CreationDate="2011-01-21T03:06:39.463" UserId="1021" Text="I'd like to add an online leaderboard to my iPhone game.  Upon discovering the time and effort required to create a Game Center account I started considering other options.&#xD;&#xA;&#xD;&#xA;What do you use for online leaderboards?  Why?  &#xD;&#xA;&#xD;&#xA;I'm open to a variety of options including App Engine, using EC2, Open Feint, PlusPlus etc.&#xD;&#xA;&#xD;&#xA;-- I'd like to make this a community wiki but I don't see the option." />
  <row Id="15252" PostHistoryTypeId="1" PostId="7559" RevisionGUID="88e2fe51-e210-4e1b-9a70-abbdfa71f43f" CreationDate="2011-01-21T03:06:39.463" UserId="1021" Text="Online leaderboards for iPhone games" />
  <row Id="15253" PostHistoryTypeId="3" PostId="7559" RevisionGUID="88e2fe51-e210-4e1b-9a70-abbdfa71f43f" CreationDate="2011-01-21T03:06:39.463" UserId="1021" Text="&lt;iphone&gt;&lt;leaderboards&gt;" />
  <row Id="15254" PostHistoryTypeId="2" PostId="7560" RevisionGUID="788c2339-d10c-4c31-ab83-fe9d950c9d62" CreationDate="2011-01-21T03:54:02.727" UserId="4779" Text="Go for OpenFeint, it is easy to use. Why I say that? Well, because even *I* managed to do it XD!&#xD;&#xA;&#xD;&#xA;OpenFeint accepts achievements, leaderboards and other stuff I didn't pay much attention to. Also, if you make a decent game, the site seems to focus a lot on helping you advertise your game, making it a &quot;free app download&quot; for one day in the site and in another iPhone games site. It *really* drags a lot of people's attention to your game.&#xD;&#xA;&#xD;&#xA;A lot of games use OpenFeint, so the community is decently big, and remember: players are hungry for the achievement points they get in games.&#xD;&#xA;&#xD;&#xA;Of course, with Game Center out, a lot of people is implementing it into their games, so you still might want to give it a go." />
  <row Id="15255" PostHistoryTypeId="25" PostId="7559" RevisionGUID="db935e4d-dccc-455f-bdd5-849395d4928f" CreationDate="2011-01-21T04:55:41.680" Comment="http://twitter.com/#!/StackGameDev/status/28314768896950272" />
  <row Id="15256" PostHistoryTypeId="25" PostId="7556" RevisionGUID="41f4a0bb-1cf1-4013-9269-ee3f0214199a" CreationDate="2011-01-21T07:55:41.610" Comment="http://twitter.com/#!/StackGameDev/status/28360066893615104" />
  <row Id="15257" PostHistoryTypeId="2" PostId="7561" RevisionGUID="6611e5d7-fa02-4e26-b975-b6a7135583a8" CreationDate="2011-01-21T08:15:30.023" UserId="4782" Text="I am having problems while rendering in Maya 2008.&#xD;&#xA;&#xD;&#xA;1 frame is taking 1 hr.&#xD;&#xA;&#xD;&#xA;My 5 computers have config of : core i3 , 1 gb ATI radeon graphics card, 8 GB Ram.&#xD;&#xA;&#xD;&#xA;OS: win Xp pro 32 bit.&#xD;&#xA;&#xD;&#xA;I am giving render from command prompt.&#xD;&#xA;&#xD;&#xA;What should be my page file size ?&#xD;&#xA;&#xD;&#xA;How to diagnose if any problem ?  &#xD;&#xA;&#xD;&#xA;suggest tips to improve rendering time and quality ?&#xD;&#xA;&#xD;&#xA;Also heard there are scripts and tools for rendering ?!!&#xD;&#xA;&#xD;&#xA;I am a total newbie to maya, 3d etc and i have team of 3d artists who have inability to google and solve problems independently( due to lack of english knowledge and exposure to net) !" />
  <row Id="15258" PostHistoryTypeId="1" PostId="7561" RevisionGUID="6611e5d7-fa02-4e26-b975-b6a7135583a8" CreationDate="2011-01-21T08:15:30.023" UserId="4782" Text="having problems while rendering in Maya 2008." />
  <row Id="15259" PostHistoryTypeId="3" PostId="7561" RevisionGUID="6611e5d7-fa02-4e26-b975-b6a7135583a8" CreationDate="2011-01-21T08:15:30.023" UserId="4782" Text="&lt;3d&gt;&lt;rendering&gt;" />
  <row Id="15260" PostHistoryTypeId="2" PostId="7562" RevisionGUID="65a5e2e5-ef0a-4229-b604-92781a2909fa" CreationDate="2011-01-21T08:42:32.987" UserId="4284" Text="I'm about tu pick up computer graphics once again for an university project. For a previous project I used a library called [ftgl][1] that didn't leave me quite satisfied as it felt kind of heavy (I tried all rendering techniques, text rendering didn't scale very well).&#xD;&#xA;&#xD;&#xA;My question is, is there a good and **efficient** library for this?, if not, what would be the way to implement fast but nice looking text?. Some intended uses are:&#xD;&#xA;&#xD;&#xA; - Floating object/character labels&#xD;&#xA; - Dialogues&#xD;&#xA; - Menus&#xD;&#xA; - HUD&#xD;&#xA;&#xD;&#xA;Regards and thanks in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/apps/mediawiki/ftgl/index.php?title=Main_Page" />
  <row Id="15261" PostHistoryTypeId="1" PostId="7562" RevisionGUID="65a5e2e5-ef0a-4229-b604-92781a2909fa" CreationDate="2011-01-21T08:42:32.987" UserId="4284" Text="Preferred way to render text in OpenGL" />
  <row Id="15262" PostHistoryTypeId="3" PostId="7562" RevisionGUID="65a5e2e5-ef0a-4229-b604-92781a2909fa" CreationDate="2011-01-21T08:42:32.987" UserId="4284" Text="&lt;textures&gt;&lt;rendering&gt;&lt;efficiency&gt;" />
  <row Id="15263" PostHistoryTypeId="2" PostId="7563" RevisionGUID="2c1f6b18-0900-4a77-8ab1-cf5970bea4f0" CreationDate="2011-01-21T08:48:41.010" UserId="4129" Text="A popular framework is [Crazy Eddie's GUI][1].&#xD;&#xA;&#xD;&#xA;But whilst that is appealing, its not unusual to roll your own (and perhaps regret it as the scope increases later ;))&#xD;&#xA;&#xD;&#xA;Its normal to have your glyphs on bitmaps and then draw the bitmaps using OpenGL.&#xD;&#xA;&#xD;&#xA;Sometimes you show transient text that might only appear for a handful of frames.  Just using GL_QUADS+glVertex will be sufficient.  But for any large quantity of text or any long duration of visibility its well worth putting the GL_QUADS in a VBO - I've noticed big performance improvements from this.&#xD;&#xA;&#xD;&#xA;There is of course the question of generating the actual glyphs that you need.  There are programs like [bmfont][2] that you can use for that.  Or you might need rather more complicated rendering, e.g. freetype on demand.  I've been using bmfont with my own renderer quite happily, its very straightforward to deduce.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cegui.org.uk/wiki/index.php/Main_Page&#xD;&#xA;  [2]: http://www.angelcode.com/products/bmfont/" />
  <row Id="15264" PostHistoryTypeId="2" PostId="7564" RevisionGUID="d8b569f5-5db9-43ec-9a43-c64cb5f1dee7" CreationDate="2011-01-21T08:56:16.090" UserId="2239" Text="1 frame could take several days or a few milliseconds to render depending on the renderer, the configuration of the renderer, the complexity of the scene, the lighting and so on. Mostly it's about configuring the render though, trading off quality for speed.&#xD;&#xA;&#xD;&#xA;This doesn't sound entirely on-topic for Game Development though. Where I come from we use progressive renderers that constantly improves on the rendered frame(s) until the time/deadline is up - that way there's much less guesswork. We're just telling the renderer that we have x amount of time so please go ahead and render this scene/animation as pretty as possible until the time is up ^^" />
  <row Id="15265" PostHistoryTypeId="2" PostId="7565" RevisionGUID="b669f25f-b0f1-46eb-adab-cd108a691164" CreationDate="2011-01-21T09:02:37.273" UserId="4116" Text="There are a lot of ways - depending on what you want... Like everywhere else, there isn't something like &quot;the best solution&quot;. Which plattform is your target? Which language are you using? What is about text resizing/rotation - is it necessary? Do you need to be able to render TrueTypeFonts? Whats about Multilanguage/Unicode? How do you want to store your text (which encoding etc.)?&#xD;&#xA;&#xD;&#xA;I used in the past also FTGL, as well as pure freetype (http://www.freetype.org/ FTGL is based on this), different kind of bitmap fonts, outline fonts... Now I'm mostly addicted to bitmap fonts, but thats only my personal preference. Because I dont want to deal with different charsets, encoding and stuff like that anymore - and licensing for bitmapfonts is also easilier and cheaper than for TrueTypeFonts. And its usable on every plattform that can load images. I use simply an quad in openGL and map a part of my texture on it. The other side is: The font will be only clean resizable at a factor about +/-50%. If you can live with that, I would suggest using a bitmapfont.&#xD;&#xA;&#xD;&#xA;If you have also to deal with different encoding/charsets you should find a way to load and use TrueTypeFonts (like with freetype, using another library or with your own implemenation)...&#xD;&#xA;&#xD;&#xA;Also have an look at nehes different tutorials on this topic:&#xD;&#xA;&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13 Bitmap Fonts&#xD;&#xA;&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=14 Outline Fonts &#xD;&#xA;&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=15 Texture Mapped &#xD;&#xA;Outline Fonts&#xD;&#xA;&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=17 2D Texture Font&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="15266" PostHistoryTypeId="2" PostId="7566" RevisionGUID="680c22cb-a809-4e65-9b51-914b055c1e79" CreationDate="2011-01-21T09:49:19.160" UserId="3794" Text="Ok this is great example of offtopic. But i will recommend you to use some of the gpu or gpgpu renderers. If you dont own renderfarm it is great way how to render 10-300 times faster in same quality. There are some renderers to consider. &#xD;&#xA;&#xD;&#xA;**CPU rendering is dead** &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA; - [iray][2] Is gpgpu raytracer from Mental Images, authors of Mental Ray&#xD;&#xA; - [V-Ray][3] Most famous and really good gpgpu renderer. &#xD;&#xA; - [FurryBall][1] is the fastest renderer&#xD;&#xA;   for Maya, works like game engine and that means best speed, but bad support for indirect lighting.&#xD;&#xA;&#xD;&#xA;  [1]: http://furryball.aaa-studio.eu/&#xD;&#xA;  [2]: http://www.mentalimages.com/products/iray.html&#xD;&#xA;  [3]: http://www.chaosgroup.com/en/2/vray.html" />
  <row Id="15267" PostHistoryTypeId="25" PostId="7562" RevisionGUID="c2dabd3d-1577-49de-a88a-e50497103262" CreationDate="2011-01-21T10:55:41.977" Comment="http://twitter.com/#!/StackGameDev/status/28405367020986369" />
  <row Id="15268" PostHistoryTypeId="2" PostId="7567" RevisionGUID="ffc7152e-abf9-4c67-ae85-156b6df5d53c" CreationDate="2011-01-21T11:40:13.997" UserId="4788" Text="http:// advertising.microsoft.com/mobile-apps&#xD;&#xA;&#xD;&#xA;&gt; Download the free Microsoft&#xD;&#xA;&gt; Advertising SDK for Windows Phone 7&#xD;&#xA;&gt; for mobile applications using the XNA&#xD;&#xA;&gt; Framework or Silverlight.&#xD;&#xA;&#xD;&#xA;http:// www.microsoft.com/downloads/en/details.aspx?FamilyID=b0f00afc-9709-4cc2-ba2c-57728db6cbd6&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15269" PostHistoryTypeId="25" PostId="7480" RevisionGUID="eea69ba5-300b-4200-b7c8-68edbc6748d4" CreationDate="2011-01-21T13:55:41.960" Comment="http://twitter.com/#!/StackGameDev/status/28450665512570881" />
  <row Id="15270" PostHistoryTypeId="10" PostId="7561" RevisionGUID="c55fafa6-3e0a-4106-9fc6-b9197867cfff" CreationDate="2011-01-21T14:25:14.400" UserId="14" CloseReasonId="2" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="15271" PostHistoryTypeId="5" PostId="5201" RevisionGUID="4138d96f-3e22-421a-8b57-fc7252ba5d52" CreationDate="2011-01-21T14:27:48.097" UserId="14" Comment="added 391 characters in body; added 7 characters in body; added 8 characters in body" Text="&lt;p&gt;Game Development - Stack Exchange is for &lt;span class=&quot;revision-comment&quot;&gt;professional and amateur video/computer game developers&lt;/span&gt;. If you have questions relating to...&lt;/p&gt;&#xA;&#xA;&#xA; - Game design (architecture, gameplay, ideas, mechanics, etc)&#xA; - Game assets (creation, storage, editing, etc)&#xA; - Game programming (coding, bugs, best practices, patterns, etc)&#xA; - Game development (testing, team development, tools, etc)&#xA; - Game release (hosting, publishing, etc)&#xA; - Game industry (careers, trends, technology, etc)&#xA;&#xA;&#xA;Then you are likely in the right place." />
  <row Id="15272" PostHistoryTypeId="2" PostId="7568" RevisionGUID="690a54c3-733e-4ec9-a3b1-3bd221f220cf" CreationDate="2011-01-21T15:10:28.487" UserId="3563" Text="Does anyone the GL frame rate for iPad and iPhone 4 under the follow conditions:&#xD;&#xA;&#xD;&#xA;- Unlit&#xD;&#xA;- Non supersampled&#xD;&#xA;- GLSL texture mapped with two textures.&#xD;&#xA;- Single quad, 4 vertices&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,  &#xD;&#xA;Doug  &#xD;&#xA;Twitter: @dugla&#xD;&#xA;" />
  <row Id="15273" PostHistoryTypeId="1" PostId="7568" RevisionGUID="690a54c3-733e-4ec9-a3b1-3bd221f220cf" CreationDate="2011-01-21T15:10:28.487" UserId="3563" Text="What is the ballpark GL framerate for iPad and iPhone 4?" />
  <row Id="15274" PostHistoryTypeId="3" PostId="7568" RevisionGUID="690a54c3-733e-4ec9-a3b1-3bd221f220cf" CreationDate="2011-01-21T15:10:28.487" UserId="3563" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;ipad&gt;" />
  <row Id="15275" PostHistoryTypeId="2" PostId="7569" RevisionGUID="7c0d6903-945f-4355-88e1-336589fb7647" CreationDate="2011-01-21T16:10:00.487" UserId="2100" Text="I'd like to create beams of electricity between two points very similar to this video: http://www.youtube.com/watch?v=eMJ8-56L3Lc. The effect is so dynamic, with varying lengths and pseudo-random movement in-between the points, that I'm having trouble imagining how I'd accomplish such a thing. Is there any helpful information that might point me in the right direction?&#xD;&#xA;&#xD;&#xA;I should note that I'm using the XNA 4.0 Reach profile, but custom shaders are okay because I'm not targeting the Windows Phone." />
  <row Id="15276" PostHistoryTypeId="1" PostId="7569" RevisionGUID="7c0d6903-945f-4355-88e1-336589fb7647" CreationDate="2011-01-21T16:10:00.487" UserId="2100" Text="Creating an electricity/lighting/tesla coil effect in a 2D XNA game?" />
  <row Id="15277" PostHistoryTypeId="3" PostId="7569" RevisionGUID="7c0d6903-945f-4355-88e1-336589fb7647" CreationDate="2011-01-21T16:10:00.487" UserId="2100" Text="&lt;2d&gt;&lt;graphics-programming&gt;&lt;xna-4.0&gt;&lt;graphic-effects&gt;" />
  <row Id="15278" PostHistoryTypeId="5" PostId="7568" RevisionGUID="efdde2bd-dad3-409d-948b-31e3efc217e5" CreationDate="2011-01-21T16:10:43.253" UserId="1156" Comment="deleted 19 characters in body; edited tags" Text="Does anyone the GL frame rate for iPad and iPhone 4 under the follow conditions:&#xD;&#xA;&#xD;&#xA;- Unlit&#xD;&#xA;- Non supersampled&#xD;&#xA;- GLSL texture mapped with two textures.&#xD;&#xA;- Single quad, 4 vertices&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,  &#xD;&#xA;Doug&#xD;&#xA;" />
  <row Id="15279" PostHistoryTypeId="6" PostId="7568" RevisionGUID="efdde2bd-dad3-409d-948b-31e3efc217e5" CreationDate="2011-01-21T16:10:43.253" UserId="1156" Comment="deleted 19 characters in body; edited tags" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;ipad&gt;&lt;frame-rate&gt;" />
  <row Id="15280" PostHistoryTypeId="2" PostId="7570" RevisionGUID="d35ec0bf-596c-43b7-8214-31a0cf92c60e" CreationDate="2011-01-21T16:25:40.267" UserId="1430" Text="There are a few breaking changes, as [Shawn Hargreaves outlines here][1], as well as new features, et cetera. A discussion of &quot;what's new&quot; in XNA 4.0 can be found in [the XNA documentation on the MSDN site][2]. You'll have to evaluate the new features and changes in the context of your current game and see if its worth upgrading -- certainly I'd think you should do it for new games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2010/03/16/breaking-changes-in-xna-game-studio-4-0.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb417503.aspx" />
  <row Id="15281" PostHistoryTypeId="5" PostId="7558" RevisionGUID="e80d0b50-a626-4930-9b6b-654efc5b37a1" CreationDate="2011-01-21T16:31:47.503" UserId="3656" Comment="added 220 characters in body" Text="XNA4 introduced [DynamicSoundEffectInstance][1] which opens up **HUGE** doors for dynamic audio.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;Also note that you only have until February 7th to submit XNA 3.1 games for XBLIG. See [this post][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff434006.aspx&#xD;&#xA;  [2]: http://blogs.msdn.com/b/xna/archive/2010/11/08/xblig-4-0-submission-now-open-on-app-hub.aspx" />
  <row Id="15282" PostHistoryTypeId="25" PostId="7568" RevisionGUID="b99eb66f-80ae-4488-9f9c-db71d6f2eb1e" CreationDate="2011-01-21T16:55:42.290" Comment="http://twitter.com/#!/StackGameDev/status/28495965287620610" />
  <row Id="15283" PostHistoryTypeId="2" PostId="7571" RevisionGUID="9b3bd97a-4873-4cb3-8a8a-7a2489abd03f" CreationDate="2011-01-21T16:57:43.587" UserId="1430" Text="My friend is working on a side-scrolling shooter in XNA that uses similar effects ([here's a video of an early test][1]). He wrote [a blog post about the technique][2] that you might find helpful.&#xD;&#xA;&#xD;&#xA;He's also usually hanging out in the #graphicschat IRC channel on irc.afternet.org (name's Drilian) and could probably help you out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=NE8Zq4whs_A&amp;feature=player_embedded&#xD;&#xA;  [2]: http://drilian.com/2009/02/25/lightning-bolts/" />
  <row Id="15284" PostHistoryTypeId="2" PostId="7572" RevisionGUID="449ae05f-4c94-4144-988f-a431f5b27565" CreationDate="2011-01-21T18:11:05.943" UserId="4776" Text="I realized one can detect two segment collision by observing 180° change in [shortest distance vector](http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/) comparing with previous frame.&#xD;&#xA;&#xD;&#xA;_Continuing research..._" />
  <row Id="15285" PostHistoryTypeId="2" PostId="7573" RevisionGUID="41fe8de8-ac49-46db-9629-398740194149" CreationDate="2011-01-21T18:57:33.303" UserId="659" Text="60fps, if nicely vsynced?&#xD;&#xA;&#xD;&#xA;If you're looking for (un-vsynced) big numbers like '1000fps', stop thinking in framerates and start thinking in milliseconds-per-frame. The numbers are a lot more meaningful that way around (You won't panic when your first draw call halves your framerate...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15286" PostHistoryTypeId="2" PostId="7574" RevisionGUID="5a648f13-8a59-4346-b673-6b471228a4e0" CreationDate="2011-01-21T19:09:36.840" UserId="4431" Text="The general problem is, game authors tend to make the economy in which advances players will create tremendous amount of gold and goods. The more the level, the more the energy. The more the perk, the more goods or gold for one point of energy. Isn't it?&#xD;&#xA;&#xD;&#xA;Well, good, balanced game should be more like a life. More advanced players can do more advanced things than beginners, not 100x more things ad day. Gold doesn't grow on trees. There's no computer tradesman that will buy everything you produce or any skin you will hunt in forest.&#xD;&#xA;&#xD;&#xA;Have you considered to allow player guildes to emit their own currency? They would have to adapt it's number to the number of players. When they emit too much, it would inflate and nobody would buy it. &#xD;&#xA;&#xD;&#xA;Doing good economy is very difficult, hovewer. " />
  <row Id="15287" PostHistoryTypeId="5" PostId="7190" RevisionGUID="4c0e3a05-ab9d-4205-82aa-16c0182cc449" CreationDate="2011-01-21T19:12:40.687" UserId="191" Comment="updated with current experience and expanded options." Text="&lt;strike&gt;Excel is an excellent solution.&lt;/strike&gt;I had been wondering how this should be done. But thinking about it, Excel &lt;strike&gt;is&lt;/strike&gt; while a very popular tool and quite adequate for this duty, I would not recommend this practice. Additionally, actual database, as @notabene suggests, brings a **lot** of extra overhead that you really don't need. I see a couple of options, one of which is akin to using Excel:&#xD;&#xA;&#xD;&#xA; - Open Office Calc: free. There is also a [MySql connector][1] download (open source I believe) for Calc.&#xD;&#xA; - serialized data: either XML or&#xD;&#xA;   binary (encrypted)  &#xD;&#xA;&#xD;&#xA;...either way, free and you have complete control.&#xD;&#xA;&#xD;&#xA;I personally would be inclined to go with binary serialized *and encrypted* data. Two reasons:&#xD;&#xA;&#xD;&#xA; - game data cannot be easily tampered&#xD;&#xA;   with&#xD;&#xA; - I can work with datatables rather&#xD;&#xA;   than Xml serialization of datasets,&#xD;&#xA;   i.e. **I** have the option.  &#xD;&#xA;&#xD;&#xA;Is there a need for a dedicated, true game-oriented *data library*? Maybe...unless someone knows of such a library already in existence.  &#xD;&#xA;&#xD;&#xA;To the point of the OP's question, look at each &lt;strike&gt;*page*&lt;/strike&gt; *csv file* as a single data table - akin to a table in a database. Each &lt;strike&gt;page&lt;/strike&gt; file should contain related data:&#xD;&#xA;&#xD;&#xA; - Skills, or&#xD;&#xA; - Gear, or&#xD;&#xA; - NPC stats&#xD;&#xA;&#xD;&#xA;This helps you keep a high level of organization which will be very important as data content grows, game content expands, etc.&#xD;&#xA;&#xD;&#xA;**Edit**  &#xD;&#xA;After actually attempting to use .ODS (OpenOffice Calc file) and connecting from an application, it is actually *not* possible as initial posts on OO site implied. I could not find anything specifically showing *teh codez* on implementation.  &#xD;&#xA;&#xD;&#xA;Also, using Excel files might be *okay* while developing a game so data can be tweaked without overhead from a database. However, and this is important, if you plan on doing this, you must have MS Office installed so you can reference Microsoft Excel Interop COM. This may be beneficial at first, but I wouldn't want to remove or change a bunch of code to get an application ready for Alpha, Beta, or RC. A very simplified library would take more effort than I could see being useful.  &#xD;&#xA;&#xD;&#xA;I am going to use .CSV files for early stage data storage. There are some drawbacks, but overall I feel this is a much better option. Everything is contained within my libraries. .Net has very useful classes for reading these text files. Also, as .CSV files, the data is easily manipulated; and, for later stages of development, all I need to do is have my data files serialized to XML, then later to serialized encrypted binary.  &#xD;&#xA;&#xD;&#xA;  [1]: http://extensions.services.openoffice.org/en/project/mysql_connector" />
  <row Id="15288" PostHistoryTypeId="2" PostId="7575" RevisionGUID="1302afd1-ae2f-45c9-b586-cedbefffb6d4" CreationDate="2011-01-21T19:17:28.853" UserId="4431" Text="Don't forget PHP. It is very popular in MMORGP played via WWW development. In Poland f.g. there is very large number of MMORPG based on Vallheru engine, written entirely in PHP. " />
  <row Id="15289" PostHistoryTypeId="2" PostId="7576" RevisionGUID="e616bbb1-3d10-452e-a530-837b33733769" CreationDate="2011-01-21T19:42:20.410" UserId="4797" Text="Hey Guys i'am wondering how to creat a mini-game like &quot;diner dash&quot; or like &quot;big fish games&quot; I want my game to be 2d but it looks like 3d see this image [http://www.topxgames.com/bigfish/diner-dash-flo-through-time/screen1.jpg][1] Also if u know some good game-engine to creat like those games Thenx A lot in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.topxgames.com/bigfish/diner-dash-flo-through-time/screen1.jpg" />
  <row Id="15290" PostHistoryTypeId="1" PostId="7576" RevisionGUID="e616bbb1-3d10-452e-a530-837b33733769" CreationDate="2011-01-21T19:42:20.410" UserId="4797" Text="How to creat a mini-game?" />
  <row Id="15291" PostHistoryTypeId="3" PostId="7576" RevisionGUID="e616bbb1-3d10-452e-a530-837b33733769" CreationDate="2011-01-21T19:42:20.410" UserId="4797" Text="&lt;xna&gt;&lt;directx&gt;&lt;unity&gt;&lt;unreal&gt;" />
  <row Id="15292" PostHistoryTypeId="2" PostId="7577" RevisionGUID="fbe38e91-fd72-4fff-aaa5-dea58e724c49" CreationDate="2011-01-21T19:58:48.663" UserId="4421" Text="According to Apple, iOS devices max out at 60FPS." />
  <row Id="15293" PostHistoryTypeId="2" PostId="7578" RevisionGUID="edb4766b-333c-4824-88af-bb92e82c782f" CreationDate="2011-01-21T20:52:44.470" UserId="1156" Text="I feel I would be a good candidate to be a moderator, since I am active at participating on the site. I am in the top 15 users based solely on reputation (at time of writing), and feel I have the qualities to be a successful moderator: that is, patient and showing respect to other users.&#xD;&#xA;&#xD;&#xA;I also think I would be both fair but firm, and able to help the community to the best of my abilities.&#xD;&#xA;&#xD;&#xA;Thanks for your time. :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15294" PostHistoryTypeId="5" PostId="7553" RevisionGUID="3531aa3f-9637-4907-b8f1-1dd9e2ca0684" CreationDate="2011-01-21T21:00:27.703" UserId="1156" Comment="Editing for clarity" Text="I have been away from XNA for a couple months and want to get back into it.  I had a game I was currently working on, but it was done in XNA 3.1. What are the differences between the two are, and is it worth updating?" />
  <row Id="15295" PostHistoryTypeId="4" PostId="7553" RevisionGUID="3531aa3f-9637-4907-b8f1-1dd9e2ca0684" CreationDate="2011-01-21T21:00:27.703" UserId="1156" Comment="Editing for clarity" Text="Difference between XNA 3.1 and 4.0?" />
  <row Id="15296" PostHistoryTypeId="5" PostId="7576" RevisionGUID="b956d73d-fdba-4e9f-9b11-dfdce58f39f2" CreationDate="2011-01-21T21:01:53.053" UserId="1156" Comment="Edited for clarity" Text="I am wondering how to creat a mini-game like &quot;Diner Dash&quot; or like &quot;Big Fish Games&quot;. I want my game to be 2d, but it looks like 3d: see this image. [http://www.topxgames.com/bigfish/diner-dash-flo-through-time/screen1.jpg][1] Also, if you know some good game-engine to create games like those then thanks a lot in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.topxgames.com/bigfish/diner-dash-flo-through-time/screen1.jpg" />
  <row Id="15297" PostHistoryTypeId="4" PostId="7576" RevisionGUID="b956d73d-fdba-4e9f-9b11-dfdce58f39f2" CreationDate="2011-01-21T21:01:53.053" UserId="1156" Comment="Edited for clarity" Text="How to create a mini-game?" />
  <row Id="15298" PostHistoryTypeId="2" PostId="7579" RevisionGUID="5101ecf9-8e66-4469-92b6-3697506fb50d" CreationDate="2011-01-21T21:21:21.843" UserId="2301" Text="The 2D game but looks 3D is sometimes referred to as 2.5D.  As for creating a mini game, that is a very broad question. You need to first pick a language you want to work in, then maybe we can provide you with a game-engine, but even with a game engine, you still need to know how to program, and edit the game engine.   " />
  <row Id="15299" PostHistoryTypeId="2" PostId="7580" RevisionGUID="eff5323a-5be1-4542-aedb-c819e39a6dea" CreationDate="2011-01-21T22:35:12.453" UserId="1198" Text="I'm assuming that you are confusing the term &quot;[mini-game][1]&quot; with &quot;[casual game][2].&quot; I'm going to attempt to answer you with the assumption that you are talking about creating a casual game, which is still a very broad question, but I'll try to give it a stab from a high-level; however, if you really do have a full game and are just looking to add mini-games to it, I don't know what I can offer to guide you there.&#xD;&#xA;&#xD;&#xA;Some key concepts for casual games, are (all my opinion):&#xD;&#xA;&#xD;&#xA; - **Quick to play**, that is to say your game should have gameplay that is very simple to pick up and just play. You shouldn't have a &quot;tutorial mode&quot; or any of that, it should be so simple anyone can figure it out.&#xD;&#xA; - By extension of quick to play, most popular casual games have gameplay that is on the shorter end of the spectrum, 30-90 seconds is common. &#xD;&#xA; - Progress after a gameplay period should be saved.&#xD;&#xA;&#xD;&#xA;I can only speak for myself, but [XNA][3] has a very low cost of entry, the learning curve is small if you already are familiar with C++ and/or Java. It also lets you deploy your game to Xbox, Windows Phone, and PC.&#xD;&#xA;&#xD;&#xA;As @Spooks said, 2D games that appear to be 3D are frequently called [2.5D][4] or pseudo-3D. And is typically done with 2D sprites that appear to be 3D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Minigame&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Casual_game&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/aa937791.aspx&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/2.5D" />
  <row Id="15300" PostHistoryTypeId="2" PostId="7581" RevisionGUID="37a19232-6d18-4098-b77f-e2ee29c3ebd8" CreationDate="2011-01-21T22:41:05.903" UserId="659" Text="Might as well put myself forward, too...  I'm a programmer with a little over 10 years of games industry experience, working on a wide variety of platforms.&#xD;&#xA;&#xD;&#xA;I'm not an aggressive downvoter, won't stamp out lively and interesting discussions just because it's marginally off-topic or slightly subjective. I'm fairly active on here, although I don't go out of my way to earn 'achievements' and 'gamerscore'" />
  <row Id="15301" PostHistoryTypeId="2" PostId="7582" RevisionGUID="7e6ad2cc-a3cc-46d2-a0a5-f69e55ce0a27" CreationDate="2011-01-21T22:55:02.477" UserId="4802" Text="I have a 2D tile-based strategy in the works.  I'm wandering how to handle the relationship between the map and the units on the map.&#xD;&#xA;&#xD;&#xA;Given a tile coordinate I'll need to be able to get the unit standing on it, if any.  At the same time, if given a unit I'll want to be able to get the unit's coordinate.&#xD;&#xA;&#xD;&#xA;I've seen two solutions to this.  The first solution would be to have units store a coordinate and the map store unit references in its tiles.  This creates a cyclic dependency between the map and units.  I'd need to make sure that the map an any unit are kept in sync if the unit moves.&#xD;&#xA;&#xD;&#xA;The second solution would be to only have the units keep track of their coordinates.  To tell if a tile contains a unit and to get that unit, I'd loop through the whole set of units unit I find one with matching coordinates.  That get rids of the cyclic dependency, but it looses the O(1) property the first solution had for looking up units from the map.  This may add up as I want to be able to scan the map regularly for things such as path finding, determining movement range, and finding valid targets for a given unit.&#xD;&#xA;&#xD;&#xA;I also can't just store the units in the map (or can I?).  Units are associated with &quot;armies&quot;, either player or AI.  An army should be able to easily access and iterate over all of its units.&#xD;&#xA;&#xD;&#xA;Since this appears to be a common issue in strategy games, are there any other patterns besides the two I described for managing unit/map relationships?" />
  <row Id="15302" PostHistoryTypeId="1" PostId="7582" RevisionGUID="7e6ad2cc-a3cc-46d2-a0a5-f69e55ce0a27" CreationDate="2011-01-21T22:55:02.477" UserId="4802" Text="How to manage dependencies between tile map and units" />
  <row Id="15303" PostHistoryTypeId="3" PostId="7582" RevisionGUID="7e6ad2cc-a3cc-46d2-a0a5-f69e55ce0a27" CreationDate="2011-01-21T22:55:02.477" UserId="4802" Text="&lt;tiles&gt;&lt;maps&gt;&lt;character&gt;" />
  <row Id="15304" PostHistoryTypeId="25" PostId="7569" RevisionGUID="db2d8e80-cee5-405b-8c33-1fba37c3caba" CreationDate="2011-01-21T22:55:43.053" Comment="http://twitter.com/#!/StackGameDev/status/28586565290696704" />
  <row Id="15305" PostHistoryTypeId="2" PostId="7583" RevisionGUID="63ccb7fd-1869-4b6c-8905-bc1d8d2b3016" CreationDate="2011-01-21T23:12:24.597" UserId="51" Text="As a pro tempore moderator, I like to think I have the reputation and experience necessary to continuing to help moderate the site, and I would enjoy to continue to serve the community.&#xD;&#xA;&#xD;&#xA;- I'm currently a professional video game developer, and have been for over 6 years now&#xD;&#xA;- I've visited the site every day since it opened (almost 200 days consecutive now)&#xD;&#xA;- I'm an active participant.  Currently the #1 person in rep overall.&#xD;&#xA;- I'm an active voter.  And yes, that does mean down voting questions I think are bad, but aren't necessarily so bad as to require a binding moderator vote. &#xD;&#xA;- I've been active in the meta discussion of the site&#xD;&#xA;- I've been active in making sure the discussion on the site is high quality and on topic through editing posts, offering suggestions to people on how they might improve their questions, and yes, closing questions where I would hope would be appropriate. &#xD;&#xA;&#xD;&#xA;Right now the community just doesn't have enough active reputation users yet to truly police itself.  So most closed questions on the site are done so by the moderators.  Unfortunately for the current moderators, that means that any &quot;controversial&quot; closings have the brunt of the negative opinions fall on us.  &#xD;&#xA;&#xD;&#xA;That being said, I do feel that the decisions we've made, taken as a whole, have kept the site at a pretty high quality.    &#xD;&#xA;&#xD;&#xA;In the future, I would like to see the community grow to the point that the moderators only really have to take care the most obvious of bad questions on the site.  I've expressed this a couple of times in the GameDev.SE chat room.  The community really determines what this site wants, and while I can help shape that, it really is a group effort to make the site the best place to ask experts game development questions. " />
  <row Id="15306" PostHistoryTypeId="2" PostId="7584" RevisionGUID="2c09b907-bb07-4592-862f-5260f14aa4c8" CreationDate="2011-01-21T23:15:59.993" UserId="14" Text="I'll put my name forward also. Well then, I'm fairly active here checking the main site, meta and chat several times a day (barring Sundays which consistently destroy my streak...).&#xD;&#xA;&#xD;&#xA;My moderation style has been, for the most part, to wait and see how the community handles things that don't quite fit, or to discuss it with the other active chat users. I will however, when I see something that blatantly doesn't fit, take swift action (If Tetrad doesn't beat me to it first...). That being said, I am currently in second place for total mod-flags handled amongst the community moderators :)&#xD;&#xA;&#xD;&#xA;Although I am lacking, relatively, in reputation (feeling as though someone has posted an answer better than I would give, and in general not having to many questions at this point) I have continuously reached out to the developers and companies that have been the subjects of our questions, I've even got a few of them to chime in with an answer. I also take whatever opportunity I can to casually mention the site to the various people that I meet that I think would make good additions to the site. So, even though it isn't always directly apparent I am active in a subtle way :D&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15307" PostHistoryTypeId="5" PostId="7583" RevisionGUID="c2965d2e-dd25-4d0e-9c6c-14bc0fd3f9e5" CreationDate="2011-01-21T23:18:35.373" UserId="51" Comment="edited body" Text="As a moderator pro tempore, I like to think I have the reputation and experience necessary to continuing to help moderate the site, and I would enjoy to continue to serve the community.&#xD;&#xA;&#xD;&#xA;- I'm currently a professional video game developer, and have been for over 6 years now&#xD;&#xA;- I've visited the site every day since it opened (almost 200 days consecutive now)&#xD;&#xA;- I'm an active participant.  Currently the #1 person in rep overall.&#xD;&#xA;- I'm an active voter.  And yes, that does mean down voting questions I think are bad, but aren't necessarily so bad as to require a binding moderator vote. &#xD;&#xA;- I've been active in the meta discussion of the site&#xD;&#xA;- I've been active in making sure the discussion on the site is high quality and on topic through editing posts, offering suggestions to people on how they might improve their questions, and yes, closing questions where I would hope would be appropriate. &#xD;&#xA;&#xD;&#xA;Right now the community just doesn't have enough active reputation users yet to truly police itself.  So most closed questions on the site are done so by the moderators.  Unfortunately for the current moderators, that means that any &quot;controversial&quot; closings have the brunt of the negative opinions fall on us.  &#xD;&#xA;&#xD;&#xA;That being said, I do feel that the decisions we've made, taken as a whole, have kept the site at a pretty high quality.    &#xD;&#xA;&#xD;&#xA;In the future, I would like to see the community grow to the point that the moderators only really have to take care the most obvious of bad questions on the site.  I've expressed this a couple of times in the GameDev.SE chat room.  The community really determines what this site wants, and while I can help shape that, it really is a group effort to make the site the best place to ask experts game development questions. " />
  <row Id="15308" PostHistoryTypeId="2" PostId="7585" RevisionGUID="999ae4db-829f-421e-b3ab-5fffc2af92cf" CreationDate="2011-01-21T23:48:38.773" UserId="4803" Text="Well, you unless you several thousand units per player, I wouldn't worry about memory usage, and use the first solution. Memory is cheaper than CPU it seems.&#xD;&#xA;&#xD;&#xA;In fact even if you had 4000 units per player, using two integers to store there location, and 8 players, that only takes 2MB, but with the first solution, you get to use a O(1) co-ord getter, rather than O(n) (assuming unsorted), which with a lot of units could be slow.&#xD;&#xA;&#xD;&#xA;Most games seem to be pixel based, rather than tile, now a days so they only need to get the unit to store the co-ords." />
  <row Id="15309" PostHistoryTypeId="25" PostId="7582" RevisionGUID="d7db992c-0be9-444a-bc92-9d3199bfe308" CreationDate="2011-01-22T01:55:42.647" Comment="http://twitter.com/#!/StackGameDev/status/28631862553350145" />
  <row Id="15310" PostHistoryTypeId="25" PostId="7576" RevisionGUID="b7483fb8-6ee6-453a-af64-c3a788299b3d" CreationDate="2011-01-22T04:55:42.587" Comment="http://twitter.com/#!/StackGameDev/status/28677160378044417" />
  <row Id="15311" PostHistoryTypeId="2" PostId="7586" RevisionGUID="c3568d1b-b10b-480c-892a-d216f67663ae" CreationDate="2011-01-22T06:16:03.437" UserId="191" Text="I am working with an [XNA content loader sample][1]. In the references for the project (VS 2010 Express) there are:&#xD;&#xA;&#xD;&#xA; - Microsoft.Build&#xD;&#xA; - Microsoft.Build.Framework&#xD;&#xA;&#xD;&#xA;    //as well as the standard XNA framework and graphics references&#xD;&#xA;&#xD;&#xA;To emulate this project, I am trying to first add a reference to Microsoft.Build.dll. But Visual Studio warns me that it cannot load the .dll. I looked at MSDN and the [document referenced Microsoft.Build.Evaluation][2]. This is suppose to be available in the Microsoft.Build.dll and then I'll have access to the Project class.  &#xD;&#xA;&#xD;&#xA;Has anyone had any experience with this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.build.evaluation.project.aspx" />
  <row Id="15312" PostHistoryTypeId="1" PostId="7586" RevisionGUID="c3568d1b-b10b-480c-892a-d216f67663ae" CreationDate="2011-01-22T06:16:03.437" UserId="191" Text="Why doesn't this ContentLoader project (VS2010 e) recognize Microsoft.Build.dll?" />
  <row Id="15313" PostHistoryTypeId="3" PostId="7586" RevisionGUID="c3568d1b-b10b-480c-892a-d216f67663ae" CreationDate="2011-01-22T06:16:03.437" UserId="191" Text="&lt;xna&gt;&lt;windows&gt;&lt;xna-4.0&gt;" />
  <row Id="15314" PostHistoryTypeId="2" PostId="7587" RevisionGUID="7de48bfb-de51-490f-b949-5b78a130214d" CreationDate="2011-01-22T06:28:53.210" UserId="2472" Text="It's not a popular pattern but the relational database world offers a third way: use a data structure that has multiple keys. In tabular form, it might look like this:&#xD;&#xA;&#xD;&#xA;    Unit id    Location&#xD;&#xA;    -------------------&#xD;&#xA;      1309     13,15&#xD;&#xA;      2357      7,93&#xD;&#xA;      8552      7,93&#xD;&#xA;&#xD;&#xA;You want to be able to ask, “where is unit 2357?” and get back 7,93.  You also want to be able to ask, “what's in location 7,93?” and get back 2357 and 8552.  There are data structures that allow multiple keys for looking things up.  You can store this outside the units and outside the map if you want to remove dependencies.&#xD;&#xA;&#xD;&#xA;However, in practice it's more common to store location in each unit, and then on the side use a spatial partitioning data structure that tells you what units are in a given region. Since it's a separate structure, the regions don't have to be grid spaces; they can be larger areas.&#xD;&#xA;&#xD;&#xA;I recommend doing whatever's easiest (your second solution) and then later if it's a performance problem you can add a spatial partition to make lookups faster." />
  <row Id="15315" PostHistoryTypeId="5" PostId="7572" RevisionGUID="ebc46180-0bc3-4273-b54a-13d8b0922847" CreationDate="2011-01-22T10:21:13.903" UserId="4776" Comment="Part II solved" Text="I realized one can detect two segment collision by observing 180° change in [shortest distance vector](http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/) comparing with previous frame.&#xD;&#xA;&#xD;&#xA;*Update:*&#xD;&#xA;&#xD;&#xA;Yep, collision seems to be detected correctly and guess what? The length of the elastic strings is actually zero. It only has this super ability to stretch infinitely. If the length is zero, **no sliding** is possible. From visual observation, everything seems real, sliding is not needed here." />
  <row Id="15316" PostHistoryTypeId="2" PostId="7588" RevisionGUID="02007f7e-af2e-4665-836d-d5d379b5b362" CreationDate="2011-01-22T10:25:07.280" UserId="659" Text="If you want to use bitmap fonts, you can't go far wrong with the Angelcode Bitmap Font Generator: http://www.angelcode.com/products/bmfont/&#xD;&#xA;&#xD;&#xA;It converts a truetype font to one or more textures (with nicely packed glyphs), and outputs a little file containing the UVs and spacings (I find that the XML output is particularly easy to work with, and the quality of the spacing data is generally very good, even without true kerning)" />
  <row Id="15317" PostHistoryTypeId="2" PostId="7589" RevisionGUID="97fb7eb8-996a-440d-ad8b-6bb6c7948434" CreationDate="2011-01-22T10:35:19.550" UserId="659" Text="&#xD;&#xA;Are there any free/affordable systems/libraries out there for adding online features to a small PC game? (most likely, for a small primarily-Windows-based indie game)&#xD;&#xA;&#xD;&#xA;I'm not concerned about matchmaking or online multiplayer - but I'm interested in leaderboards, and maybe slightly more advanced features, such as the upload/download of user-created-content (e.g. replays or player-created levels). Maybe even automatic updates or downloadable content?&#xD;&#xA;&#xD;&#xA;Whilst it probably shouldn't be too hard to implement at least the very basics from scratch, it seems like a big wheel to reinvent, and a tried-and-tested system would be preferable, to reduce development time, and reduce the chance of gaping security holes. Is there anything in reach of low/no-budget indie developers?" />
  <row Id="15318" PostHistoryTypeId="1" PostId="7589" RevisionGUID="97fb7eb8-996a-440d-ad8b-6bb6c7948434" CreationDate="2011-01-22T10:35:19.550" UserId="659" Text="Online leaderboard systems for (small/indie) PC games?" />
  <row Id="15319" PostHistoryTypeId="3" PostId="7589" RevisionGUID="97fb7eb8-996a-440d-ad8b-6bb6c7948434" CreationDate="2011-01-22T10:35:19.550" UserId="659" Text="&lt;indie&gt;&lt;pc&gt;&lt;online&gt;&lt;leaderboards&gt;" />
  <row Id="15320" PostHistoryTypeId="5" PostId="7562" RevisionGUID="c15ddb1f-2af4-483b-87f1-097516944354" CreationDate="2011-01-22T10:39:27.937" UserId="4284" Comment="added 45 characters in body" Text="I'm about tu pick up computer graphics once again for an university project. For a previous project I used a library called [ftgl][1] that didn't leave me quite satisfied as it felt kind of heavy (I tried all rendering techniques, text rendering didn't scale very well).&#xD;&#xA;&#xD;&#xA;My question is, is there a good and **efficient** library for this?, if not, what would be the way to implement fast but nice looking text?. Some intended uses are:&#xD;&#xA;&#xD;&#xA; - Floating object/character labels&#xD;&#xA; - Dialogues&#xD;&#xA; - Menus&#xD;&#xA; - HUD&#xD;&#xA;&#xD;&#xA;Regards and thanks in advance.&#xD;&#xA;&#xD;&#xA;EDIT: Preferrably that it can load fonts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/apps/mediawiki/ftgl/index.php?title=Main_Page" />
  <row Id="15321" PostHistoryTypeId="5" PostId="7572" RevisionGUID="9ec9da99-3fdb-48e0-99f5-4bba0843ba20" CreationDate="2011-01-22T11:51:30.110" UserId="4776" Comment="Sliding is needed" Text="I realized one can detect two segment collision by observing 180° change in [shortest distance vector](http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/) comparing with previous frame.&#xD;&#xA;&#xD;&#xA;*Update:*&#xD;&#xA;&#xD;&#xA;Yep, collision seems to be detected correctly and guess what? The length of the elastic strings is actually zero. It only has this super ability to stretch infinitely. If the length is zero, **no sliding** is possible. From visual observation, everything seems real, sliding is not needed here.&#xD;&#xA;&#xD;&#xA;*Update:*&#xD;&#xA;&#xD;&#xA;Something is still wrong. Sliding *is* needed. It's very visible, when you turn on global gravity and observe one horizontal pair hit vertical pair with velocity. Horizontal one should slide down, but instead, it remains stuck in the middle of the string. Looking in further." />
  <row Id="15322" PostHistoryTypeId="2" PostId="7590" RevisionGUID="866075be-7393-4632-824c-2ea4107d5379" CreationDate="2011-01-22T12:27:48.240" UserId="2442" Text="In my experience, two approaches are preferred when people want to handle scripting in multithreaded environment.&#xD;&#xA;&#xD;&#xA;1. Synchronize every accesses to scripting module with one coarse-grained lock.&#xD;&#xA;2. No Synchronization - Scripting module should be used by just one logic thread.&#xD;&#xA;&#xD;&#xA;Of course, both solutions are not scalable in multi-core perspective.&#xD;&#xA;&#xD;&#xA;Question - Is there any other (multi-core) scalable solution?" />
  <row Id="15323" PostHistoryTypeId="1" PostId="7590" RevisionGUID="866075be-7393-4632-824c-2ea4107d5379" CreationDate="2011-01-22T12:27:48.240" UserId="2442" Text="How do you handle scripting in multithreaded environment" />
  <row Id="15324" PostHistoryTypeId="3" PostId="7590" RevisionGUID="866075be-7393-4632-824c-2ea4107d5379" CreationDate="2011-01-22T12:27:48.240" UserId="2442" Text="&lt;scripting&gt;&lt;multithreading&gt;" />
  <row Id="15325" PostHistoryTypeId="2" PostId="7591" RevisionGUID="9ad8ff63-b676-4344-80af-b5cfed98e6bf" CreationDate="2011-01-22T13:11:28.827" UserId="4284" Text="We need to make a zombie videogame for a semester project and I was wondering about what are considered nice algorithms/techniques for implementing zombie AI that don't take too long to implement.&#xD;&#xA;&#xD;&#xA;The project is a videogame **product**, involving other stuff as physics and multiplayer, so we have limited time, so what I'm specifically looking for is:&#xD;&#xA;&#xD;&#xA; - A **quick &amp; dirty** way to implement zombie AI (I'm thinking on **neural networks** or perhaps even **fuzzy logic**)&#xD;&#xA; - Common ways of implementing and optimizing zombie AI&#xD;&#xA; - The ideal way of implementing zombie AI (I imagine it would involve **pathfinding**, or even **swarm intelligence**?)&#xD;&#xA; - General advice on zombie AI&#xD;&#xA;&#xD;&#xA;Considering that the quick &amp; dirty implementation would perhaps be a place-holder for another and better algorithm/technique.&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="15326" PostHistoryTypeId="1" PostId="7591" RevisionGUID="9ad8ff63-b676-4344-80af-b5cfed98e6bf" CreationDate="2011-01-22T13:11:28.827" UserId="4284" Text="How to implement zombie AI?" />
  <row Id="15327" PostHistoryTypeId="3" PostId="7591" RevisionGUID="9ad8ff63-b676-4344-80af-b5cfed98e6bf" CreationDate="2011-01-22T13:11:28.827" UserId="4284" Text="&lt;programming&gt;&lt;ai&gt;&lt;game-mechanics&gt;" />
  <row Id="15328" PostHistoryTypeId="2" PostId="7592" RevisionGUID="2f15fa91-31db-4cb1-9d44-341b691b9125" CreationDate="2011-01-22T13:21:27.197" UserId="337" Text="You may be over-engineering it, a basic implementation is just a state machine with a state &quot;Shamble&quot; which will cause the zombie to move around a bit (checking it won't hit walls and such perhaps, or stay out of the light etc, it can be expanded upon) and a &quot;Follow&quot; which will cause the zombie to move toward a player (maybe using path finding like A*) and attack him/her if the zombie gets to close.&#xD;&#xA;&#xD;&#xA;This will be fairly &quot;realistic&quot; (as far as zombies go) because players usually don't look at enemies for a long time (they usually run from them/attack them)." />
  <row Id="15329" PostHistoryTypeId="2" PostId="7593" RevisionGUID="017fb6b8-c6bf-4610-b5c7-adf0f976a288" CreationDate="2011-01-22T13:22:54.280" UserId="4813" Text="My scene consists of individual meshes. At the moment each mesh has its associated light map texture, I was able to implement the light mapping using these many small textures. &#xD;&#xA;&#xD;&#xA;1) Of course, I want to create an atlas, but how do you split atlases to pages, I mean do you group the lm's of objects that are close to each other, and load light maps on the fly if scene is expected to be big.&#xD;&#xA;&#xD;&#xA;2) the 3d authoring software provides automatic uv coordinates for each mesh in the scene, but  there are empty areas in the texel space, so if I scale the texture polygons the texel density of each face wil not match other meshes, if I create atlas like that there will be varying lm resolution, how do you solve this, just leave it as it is, or ignore resolution ?&#xD;&#xA;&#xD;&#xA;Actually these questions also applies to other non tiled maps.&#xD;&#xA;" />
  <row Id="15330" PostHistoryTypeId="1" PostId="7593" RevisionGUID="017fb6b8-c6bf-4610-b5c7-adf0f976a288" CreationDate="2011-01-22T13:22:54.280" UserId="4813" Text="Common light map practices" />
  <row Id="15331" PostHistoryTypeId="3" PostId="7593" RevisionGUID="017fb6b8-c6bf-4610-b5c7-adf0f976a288" CreationDate="2011-01-22T13:22:54.280" UserId="4813" Text="&lt;opengl&gt;&lt;directx&gt;&lt;textures&gt;&lt;lighting&gt;" />
  <row Id="15332" PostHistoryTypeId="2" PostId="7594" RevisionGUID="d76caf11-5893-402b-ae9f-c2914965c9bd" CreationDate="2011-01-22T13:28:23.140" UserId="4662" Text="Treat scripts like the GPU treats shaders- no global variables, limited inputs and outputs." />
  <row Id="15333" PostHistoryTypeId="25" PostId="7591" RevisionGUID="5d3fb8bd-b961-4bd2-8148-9e55df4f1445" CreationDate="2011-01-22T13:55:43.030" Comment="http://twitter.com/#!/StackGameDev/status/28813056985272320" />
  <row Id="15334" PostHistoryTypeId="2" PostId="7595" RevisionGUID="c38d3881-9ce2-488c-b519-1b8b67c69231" CreationDate="2011-01-22T14:22:30.870" UserId="4662" Text="I've created some simple Phong shading code from a sample. The issue is that the sample only handles one light. If I wanted a variable number of lights set at the start of each frame, how could I specify in the effect file that I need to pass a variable number of e.g. light positions and etc to render from?" />
  <row Id="15335" PostHistoryTypeId="1" PostId="7595" RevisionGUID="c38d3881-9ce2-488c-b519-1b8b67c69231" CreationDate="2011-01-22T14:22:30.870" UserId="4662" Text="D3D9 Effects- variable parameters" />
  <row Id="15336" PostHistoryTypeId="3" PostId="7595" RevisionGUID="c38d3881-9ce2-488c-b519-1b8b67c69231" CreationDate="2011-01-22T14:22:30.870" UserId="4662" Text="&lt;c++&gt;&lt;directx9&gt;" />
  <row Id="15337" PostHistoryTypeId="2" PostId="7596" RevisionGUID="d62753c9-0bbb-4e32-8a0a-c31ee19c8ff7" CreationDate="2011-01-22T14:55:03.590" UserId="2332" Text="First of all, DON'T use neural nets. They're simply not applicable to this (unless you have some real life zombies where you can get some training data :) )&#xD;&#xA;&#xD;&#xA;Just to clarify neural nets and fuzzy logic are not quick and dirty ways of implementing AI. They're fairly in depth (neural nets, more so than fuzzy logic).&#xD;&#xA;&#xD;&#xA;Secondly, unless your zombies are clever, they might not need pathfinding at all. Sure it's useful to avoid obstacles, but there are simpler ways of achieving that.&#xD;&#xA;&#xD;&#xA;If your semester is around 10 weeks long (approx) you're going to be getting stuck on more important things than the AI (that's not a criticism on your coding skills, it's just usually how it happens unless your design stage is almost perfect). Therefore *simplicity is key* here.&#xD;&#xA;&#xD;&#xA;The simplest thing to do is to combine a number of steering behaviours. Simple behaviours merged together can create intelligent looking behaviour (this is called emergent behaviour if you're interested, and is what swarm intelligence and flocking is based on).&#xD;&#xA;&#xD;&#xA;The behaviours I'd suggest you use are:&#xD;&#xA;&#xD;&#xA; - Seek&#xD;&#xA; - Wander&#xD;&#xA; - ObstacleAvoidance&#xD;&#xA; - WallAvoidance&#xD;&#xA; - Cohesion&#xD;&#xA; - Alignment&#xD;&#xA; - Separation&#xD;&#xA;&#xD;&#xA;Read Programming Game AI by Example, as those behaviours are very well documented (or you could just find the source code somewhere)&#xD;&#xA;&#xD;&#xA;Cohesion, Alignment and Separation are behaviours that work together to create the &quot;flocking&quot; effect. Cohesion makes sure that each zombie moves towards the average position of the flock. Alignment makes sure the zombie aligns with the average orientation of the flock. And finally Separation just maintains a distance from the zombie's neighbours.&#xD;&#xA;&#xD;&#xA;You can optimize this by having each zombie have a &quot;neighbourhood&quot; region, so the zombie will only check it's neighbours for the appropriate values.&#xD;&#xA;&#xD;&#xA;If you have a fairly small game world, you can use a grid based partitioning system to optimize further as it's relatively simple to code and won't take up much memory since the world is small. If it's larger, consider using a quad-(oct-)tree. If it's an indoor level, consider using BSP.&#xD;&#xA;&#xD;&#xA;But to sum up, keep it as simple as you can. Simple behaviours are easier to debug and when combined they look very impressive. And don't use neural nets, whatever you do.&#xD;&#xA;&#xD;&#xA;P.S. If you're allowed to use external libraries, try and use [OpenSteer][1] :)&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opensteer.sourceforge.net/" />
  <row Id="15338" PostHistoryTypeId="5" PostId="7594" RevisionGUID="2d15ef2d-f6f7-49b4-af48-79effa7e9c69" CreationDate="2011-01-22T15:24:32.413" UserId="4662" Comment="added 51 characters in body" Text="Treat scripts like the GPU treats shaders- no global variables, limited inputs and outputs, that is, enforce thread safety via language rules." />
  <row Id="15339" PostHistoryTypeId="5" PostId="7572" RevisionGUID="6ce14ea0-101d-4cab-ae48-9f83dc20c9d6" CreationDate="2011-01-22T16:01:52.273" UserId="4776" Comment="Sliding enabled" Text="I realized one can detect two segment collision by observing 180° change in [shortest distance vector](http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/) comparing with previous frame.&#xD;&#xA;&#xD;&#xA;*Update:*&#xD;&#xA;&#xD;&#xA;Yep, collision seems to be detected correctly and guess what? The length of the elastic strings is actually zero. It only has this super ability to stretch infinitely. If the length is zero, **no sliding** is possible. From visual observation, everything seems real, sliding is not needed here.&#xD;&#xA;&#xD;&#xA;*Update:*&#xD;&#xA;&#xD;&#xA;Something is still wrong. Sliding *is* needed. It's very visible, when you turn on global gravity and observe one horizontal pair hit vertical pair with velocity. Horizontal one should slide down, but instead, it remains stuck in the middle of the string. Looking in further.&#xD;&#xA;&#xD;&#xA;*Update:*&#xD;&#xA;&#xD;&#xA;I managed to fix up a formula:&#xD;&#xA;&#xD;&#xA;k - general pair's tension.  &#xD;&#xA;k1 and k2 - two new tensions for 1 &lt;-&gt; 5 and 2 &lt;-&gt; 5  &#xD;&#xA;d - distance 1 &lt;-&gt; 2  &#xD;&#xA;d1 and d2 - distance 1 &lt;-&gt; 5 and 2 &lt;-&gt; 5  &#xD;&#xA;&#xD;&#xA;k2 = k * d / (2 * d2)  &#xD;&#xA;k1 = d2 * k2 / d1&#xD;&#xA;&#xD;&#xA;Update k1 and k2 for a pair each frame before physics forces integration kicks in and it behaves OK. Basic frictionless sliding has been enabled, finally." />
  <row Id="15340" PostHistoryTypeId="5" PostId="7556" RevisionGUID="32256165-a5d0-4526-9eb0-a252c93a60a9" CreationDate="2011-01-22T16:06:29.930" UserId="4776" Comment="SEO" Text="There are 4 moving physical nodes in 3D space. They are paired with two elastic line segments / strings (1 &lt;-&gt; 2; 3 &lt;-&gt; 4).&#xD;&#xA;&#xD;&#xA;Part I: How to detect the collision of two segments?&#xD;&#xA;&#xD;&#xA;Part II: On the moment of collision, fifth node is created at the intersection point and here you have the [force-based graph](http://en.wikipedia.org/wiki/Force-based_algorithms_(graph_drawing)). 5-th node (bend point) **can slide** among the strings as in a real world. Given the new coordinates of 4 nodes, how to calculate the position of the 5-th node on the next frame? I assume string force on the nodes to be `F = -k * x` where x is the string length.&#xD;&#xA;&#xD;&#xA;All I came up to is that the force between 5 and 1 equals 5 and 2 (the same with 3 and 4). What are the other properties?." />
  <row Id="15341" PostHistoryTypeId="4" PostId="7556" RevisionGUID="32256165-a5d0-4526-9eb0-a252c93a60a9" CreationDate="2011-01-22T16:06:29.930" UserId="4776" Comment="SEO" Text="How to detect and collide two elastic line segments?" />
  <row Id="15342" PostHistoryTypeId="2" PostId="7597" RevisionGUID="5eb1e82d-a4e0-437e-9549-bef3b10a3156" CreationDate="2011-01-22T16:12:32.630" UserId="4413" Text="This is not feasable right now (early 2011). You can not create a MMO in native, browser technologies (meaning no plugins).&#xD;&#xA;&#xD;&#xA;In the future... I won't speculate. This is how it looks right now. Assuming you target only modern browsers. If you plan to support IE7 then you are crazy. That will never work.&#xD;&#xA;&#xD;&#xA;Things missing:&#xD;&#xA;&#xD;&#xA; * full control over keyboard and mouse (ability to set mouse position, key interception)&#xD;&#xA; * fullscreen&#xD;&#xA; * 3D&#xD;&#xA;&#xD;&#xA;Areas / solutions with serious problems:&#xD;&#xA;&#xD;&#xA;  * WebSockets now deactivated in the few browsers that supported it&#xD;&#xA;     * without it: now low latency, bi-directional client-server communication&#xD;&#xA;  * audio problems&#xD;&#xA;     * codec mess, you need ogg and mp3&#xD;&#xA;     * common frequences not supported&#xD;&#xA;     * concurrancy&#xD;&#xA;     * delay&#xD;&#xA;  * canvas performance (in some cases doing divs &amp; css transformations is faster)" />
  <row Id="15343" PostHistoryTypeId="2" PostId="7598" RevisionGUID="455da05d-19a5-4cd2-9fba-f650f73c53fb" CreationDate="2011-01-22T16:44:43.180" UserId="450" Text="Right after the call to mysql_connect/mysql_select_db execute this:&#xD;&#xA;&#xD;&#xA;    mysql_query('set character set utf8');&#xD;&#xA;to tell the PHP-MySQL driver to use UTF-8" />
  <row Id="15344" PostHistoryTypeId="25" PostId="7590" RevisionGUID="6b1ae09b-cbc9-4cfe-92bf-dfcf39892c68" CreationDate="2011-01-22T16:55:43.327" Comment="http://twitter.com/#!/StackGameDev/status/28858357129412608" />
  <row Id="15345" PostHistoryTypeId="2" PostId="7599" RevisionGUID="4e95d391-ff34-4074-9c0e-02a0ed555f73" CreationDate="2011-01-22T17:22:16.487" UserId="3656" Text="How do you pros out there implement footstep sounds in so that they're synced with character animation?&#xD;&#xA;&#xD;&#xA;I have an idea in mind: an FMOD event that has two footstep playback triggers, and a parameter that controls how fast each plays back in sequence, and the event is triggered as soon as the animation is on a frame (assuming the programmer handling animation will post an event or update a param for this) where you could reasonably assume the character's foot has hit the ground.&#xD;&#xA;&#xD;&#xA;Is this overkill, or assuming too much accuracy out of an engine?&#xD;&#xA;&#xD;&#xA;This is not a specific project, but I am working on integrating FMOD Designer support into an existing engine and am thinking of some general effects to implement while the audio spec is being figured out. Also, I mention FMOD since that's what we're using, but if anyone's done similar syncing tasks in Wwise, XACT or anything else (or heck, even if you hand-coded it) and could share their experiences that'd be great to hear as well." />
  <row Id="15346" PostHistoryTypeId="1" PostId="7599" RevisionGUID="4e95d391-ff34-4074-9c0e-02a0ed555f73" CreationDate="2011-01-22T17:22:16.487" UserId="3656" Text="How to make footsteps sound sync with animation (FMOD/Wwise/similar)" />
  <row Id="15347" PostHistoryTypeId="3" PostId="7599" RevisionGUID="4e95d391-ff34-4074-9c0e-02a0ed555f73" CreationDate="2011-01-22T17:22:16.487" UserId="3656" Text="&lt;audio&gt;&lt;synchronization&gt;&lt;fmod&gt;&lt;wwise&gt;" />
  <row Id="15348" PostHistoryTypeId="5" PostId="7596" RevisionGUID="dd415de9-3a06-4bd4-9835-62e36090ece4" CreationDate="2011-01-22T18:15:08.847" UserId="2332" Comment="added 214 characters in body" Text="First of all, DON'T use neural nets. They're simply not applicable to this (unless you have some real life zombies where you can get some training data :) )&#xD;&#xA;&#xD;&#xA;Just to clarify neural nets and fuzzy logic are not quick and dirty ways of implementing AI. They're fairly in depth (neural nets, more so than fuzzy logic).&#xD;&#xA;&#xD;&#xA;Secondly, unless your zombies are clever, they might not need pathfinding at all. Sure it's useful to avoid obstacles, but there are simpler ways of achieving that.&#xD;&#xA;&#xD;&#xA;If your semester is around 10 weeks long (approx) you're going to be getting stuck on more important things than the AI (that's not a criticism on your coding skills, it's just usually how it happens unless your design stage is almost perfect). Therefore *simplicity is key* here.&#xD;&#xA;&#xD;&#xA;The simplest thing to do is to combine a number of steering behaviours. Simple behaviours merged together can create intelligent looking behaviour (this is called emergent behaviour if you're interested, and is what swarm intelligence and flocking is based on).&#xD;&#xA;&#xD;&#xA;The behaviours I'd suggest you use are:&#xD;&#xA;&#xD;&#xA; - Seek&#xD;&#xA; - Wander&#xD;&#xA; - ObstacleAvoidance&#xD;&#xA; - WallAvoidance&#xD;&#xA; - Cohesion&#xD;&#xA; - Alignment&#xD;&#xA; - Separation&#xD;&#xA;&#xD;&#xA;These behaviours are collectively known as *steering behaviours* and this link will show you exactly how they work (albeit without source code): [Steering Behaviours][1]&#xD;&#xA;&#xD;&#xA;Read Programming Game AI by Example, as those behaviours are very well documented (or you could just find the source code somewhere).&#xD;&#xA;&#xD;&#xA;Cohesion, Alignment and Separation are behaviours that work together to create the &quot;flocking&quot; effect. Cohesion makes sure that each zombie moves towards the average position of the flock. Alignment makes sure the zombie aligns with the average orientation of the flock. And finally Separation just maintains a distance from the zombie's neighbours.&#xD;&#xA;&#xD;&#xA;You can optimize this by having each zombie have a &quot;neighbourhood&quot; region, so the zombie will only check it's neighbours for the appropriate values.&#xD;&#xA;&#xD;&#xA;If you have a fairly small game world, you can use a grid based partitioning system to optimize further as it's relatively simple to code and won't take up much memory since the world is small. If it's larger, consider using a quad-(oct-)tree. If it's an indoor level, consider using BSP.&#xD;&#xA;&#xD;&#xA;But to sum up, keep it as simple as you can. Simple behaviours are easier to debug and when combined they look very impressive. And don't use neural nets, whatever you do.&#xD;&#xA;&#xD;&#xA;P.S. If you're allowed to use external libraries, try and use [OpenSteer][2] :)&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/&#xD;&#xA;  [2]: http://opensteer.sourceforge.net/" />
  <row Id="15349" PostHistoryTypeId="2" PostId="7600" RevisionGUID="124f36c0-7da4-4b83-b175-39a2edcb1fa8" CreationDate="2011-01-22T18:43:04.413" UserId="2910" Text="I think whats complicating your project is the fact you are trying to make Artificially Intelligent Zombies.&#xD;&#xA;&#xD;&#xA;As another poster stated, I think you over engineering your project. Think about a couple &quot;states&quot; you want your zombies to have.&#xD;&#xA;&#xD;&#xA;1) Searching/moving aimlessly &#xD;&#xA;&#xD;&#xA;2) Pursuit/Chase&#xD;&#xA;&#xD;&#xA;These come to mind, you mind consider more for uniqueness.&#xD;&#xA;&#xD;&#xA;The nice thing is zombies don't really act intelligently, use this to your advantage!" />
  <row Id="15350" PostHistoryTypeId="25" PostId="7599" RevisionGUID="977666ac-16c0-445a-88d7-49a1763e492b" CreationDate="2011-01-22T19:55:42.830" Comment="http://twitter.com/#!/StackGameDev/status/28903653192503296" />
  <row Id="15351" PostHistoryTypeId="6" PostId="7591" RevisionGUID="f8cd03c8-8581-44b4-861f-ce3dc6de3ae5" CreationDate="2011-01-22T20:02:42.787" UserId="2188" Comment="edited tags" Text="&lt;programming&gt;&lt;ai&gt;&lt;game-mechanics&gt;&lt;homework&gt;" />
  <row Id="15352" PostHistoryTypeId="5" PostId="7600" RevisionGUID="f0e70a83-9f9b-45f5-9161-d888d26bc534" CreationDate="2011-01-22T20:15:46.383" UserId="2910" Comment="added 1 characters in body" Text="I think whats complicating your project is the fact you are trying to make Artificially Intelligent Zombies.&#xD;&#xA;&#xD;&#xA;As another poster stated, I think you over engineering your project. Think about a couple &quot;states&quot; you want your zombies to have.&#xD;&#xA;&#xD;&#xA;1) Searching/moving aimlessly &#xD;&#xA;&#xD;&#xA;2) Pursuit/Chase&#xD;&#xA;&#xD;&#xA;These come to mind, you might consider more for uniqueness.&#xD;&#xA;&#xD;&#xA;The nice thing is zombies don't really act intelligently, use this to your advantage!" />
  <row Id="15353" PostHistoryTypeId="2" PostId="7601" RevisionGUID="0010f968-5958-4c00-82fd-b8381d4a2a8f" CreationDate="2011-01-22T20:30:33.330" UserId="1156" Text="I'm taking all my zombie-related facts from the [Zombie Survival Handbook][1]. Which, on a tangent, is a very entertaining read.&#xD;&#xA;&#xD;&#xA;A stereotypical zombie would be very stupid - so it wouldn't need AI for things like:&#xD;&#xA;&#xD;&#xA; - Opening doors, though it could probably break them (if you choose to go for a destructible route)&#xD;&#xA; - Any kind of tactics&#xD;&#xA; - Climbing, or the Z-axis at all.&#xD;&#xA; - Swarming.&#xD;&#xA;&#xD;&#xA;Instead, you would want zombies to do things like:&#xD;&#xA;&#xD;&#xA; - Walk around aimlessly until they get a target&#xD;&#xA; - Chase the target until it disappears&#xD;&#xA; - Follow the trail of the lost target for a short time&#xD;&#xA; - Repeat&#xD;&#xA;&#xD;&#xA;I'm pretty sure a simple state machine would be useful - either WANDER, FOLLOW, OR LOST. &#xD;&#xA;&#xD;&#xA;As for the target searching, each zombie could have a field-of-vision check. If target can be seen, change state and set the direction to go.  &#xD;&#xA;Something interesting may be to have different target checks. Not just if a zombie sees you, but perhaps if you wandered an area you could leave a 'scent trail', putting a zombie into the LOST state? Or if you fired a large weapon, the zombie would be attracted to your position in the LOST state? This second one could have an area-of-effect radius, giving a swarm-type pattern since all the zombies will end up in one area, and then move as one.&#xD;&#xA;&#xD;&#xA;As for implementing, it wouldn't be much more than having a check to see if the player has been seen, then some very dirty pathfinding - quick and dirty rather than something like A* - a zombie isn't going to go the optimal route - and a state machine. Just make sure that your random walk does have some form of obstacle avoiding - I really hate it when enemies just run into buildings for ages. ;-)&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/The_Zombie_Survival_Guide" />
  <row Id="15354" PostHistoryTypeId="2" PostId="7602" RevisionGUID="483e6fa6-9c81-451d-865c-c74186e2de77" CreationDate="2011-01-22T21:04:16.383" UserId="4818" Text="Is there any good **documented** and **simple** Game engine for RTS games, especially for building DotA-like game?&#xD;&#xA;&#xD;&#xA;I know I can use Crystal Space, Irrlicht or another Game Engine. But I need most similar game or engine to DotA gameplay." />
  <row Id="15355" PostHistoryTypeId="1" PostId="7602" RevisionGUID="483e6fa6-9c81-451d-865c-c74186e2de77" CreationDate="2011-01-22T21:04:16.383" UserId="4818" Text="RTS Engine or DotA-like game" />
  <row Id="15356" PostHistoryTypeId="3" PostId="7602" RevisionGUID="483e6fa6-9c81-451d-865c-c74186e2de77" CreationDate="2011-01-22T21:04:16.383" UserId="4818" Text="&lt;c++&gt;&lt;engine&gt;&lt;3d-engines&gt;&lt;rts&gt;" />
  <row Id="15357" PostHistoryTypeId="2" PostId="7603" RevisionGUID="cb0d29a3-499e-4fbd-99e1-b9a07d12b50d" CreationDate="2011-01-22T21:17:51.487" UserId="3794" Text="For each light do one render pass and use Additive blending. &#xD;&#xA;&#xD;&#xA;For first pass (doesn't matter which light is will be first) consider material color and light color in your phong. For other lights count only with light color. And thats it.&#xD;&#xA;&#xD;&#xA;Question is why to do it this way and not just send all of the light positions and params in few arrays. Answer is that this is much easier to handle once you start making some more complex effects. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15358" PostHistoryTypeId="2" PostId="7604" RevisionGUID="18dbee5c-1d42-437d-89fa-2498a02b4a60" CreationDate="2011-01-22T21:25:27.673" UserId="1156" Text="[Spring RTS engine][1] looks very nice.  &#xD;&#xA;[Stratagus][2] is another option.&#xD;&#xA;&#xD;&#xA;Both the above came from the search 'c++ RTS engine'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://springrts.com/&#xD;&#xA;  [2]: http://stratagus.sourceforge.net/" />
  <row Id="15359" PostHistoryTypeId="2" PostId="7605" RevisionGUID="e15a5b94-d2ef-4bc0-831a-74a978920619" CreationDate="2011-01-22T21:39:55.510" UserId="4129" Text="Glest, especially [MegaGlest][1] and the [Glest Advanced Engine][2] ([forums][3])&#xD;&#xA;&#xD;&#xA;Its a classic RTS engine that is fairly straightforward to 'mod' and add 'factions' using 3D models and XML files to define the unit attributes.  It can be used as a basis for 'total conversions' and the code-base is accessible enough to add specific features.  It may be that you don't actually need to touch the code, however - its designed to be modded!&#xD;&#xA;&#xD;&#xA;[MegaGlest 3.4][4] has just reached beta - its an awesome engine that's approachable to modding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://megaglest.org/&#xD;&#xA;  [2]: http://glest.org/glest_board/index.php?topic=6411.0&#xD;&#xA;  [3]: http://glest.org/glest_board/&#xD;&#xA;  [4]: http://glest.org/glest_board/index.php?topic=6460.0" />
  <row Id="15360" PostHistoryTypeId="5" PostId="7603" RevisionGUID="62815138-0afc-4dbe-980e-6fce1259053a" CreationDate="2011-01-22T21:40:06.117" UserId="3794" Comment="corrected spelling" Text="For each light do one render pass and use Additive blending. &#xD;&#xA;&#xD;&#xA;For first pass (doesn't matter which light is will be first) consider material color and light color in your phong. For other lights count only with light color. And thats it.&#xD;&#xA;&#xD;&#xA;Question is: Why to do it this way and not just send all of the light positions and params in few arrays? Answer is that this is much easier to handle once you start making some more complex effects. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15361" PostHistoryTypeId="6" PostId="7591" RevisionGUID="b0041a79-e21a-4af9-bf67-f8a7b8b4814d" CreationDate="2011-01-22T21:46:17.950" UserId="962" Comment="edited tags" Text="&lt;programming&gt;&lt;ai&gt;&lt;game-mechanics&gt;" />
  <row Id="15362" PostHistoryTypeId="5" PostId="7591" RevisionGUID="2bed2ebf-5938-48e5-b2e4-bb1d50c7fe89" CreationDate="2011-01-22T21:51:17.830" UserId="1156" Comment="deleted 6 characters in body" Text="We need to make a zombie videogame for a semester project and I was wondering about what are considered nice algorithms/techniques for implementing zombie AI that don't take too long to implement.&#xD;&#xA;&#xD;&#xA;The project is a videogame **product**, involving other stuff as physics and multiplayer, so we have limited time, so what I'm specifically looking for is:&#xD;&#xA;&#xD;&#xA; - A **quick &amp; dirty** way to implement zombie AI (I'm thinking on **neural networks** or perhaps even **fuzzy logic**)&#xD;&#xA; - Common ways of implementing and optimizing zombie AI&#xD;&#xA; - The ideal way of implementing zombie AI (I imagine it would involve **pathfinding**, or even **swarm intelligence**?)&#xD;&#xA; - General advice on zombie AI&#xD;&#xA;&#xD;&#xA;Considering that the quick &amp; dirty implementation would perhaps be a place-holder for another and better algorithm/technique.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="15363" PostHistoryTypeId="5" PostId="7605" RevisionGUID="036e8c0f-e1cc-4ec3-974b-6c62be14241d" CreationDate="2011-01-22T21:52:09.167" UserId="4129" Comment="added 70 characters in body" Text="Glest, especially [MegaGlest][1] and the [Glest Advanced Engine][2] ([forums][3])&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/WKoed.jpg&quot; width=&quot;320&quot; height=&quot;240&quot;/&gt;&#xD;&#xA;&#xD;&#xA;Its a classic RTS engine that is fairly straightforward to 'mod' and add 'factions' using 3D models and XML files to define the unit attributes.  It can be used as a basis for 'total conversions' and the code-base is accessible enough to add specific features.  It may be that you don't actually need to touch the code, however - its designed to be modded!&#xD;&#xA;&#xD;&#xA;[MegaGlest 3.4][5] has just reached beta - its an awesome engine that's approachable to modding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://megaglest.org/&#xD;&#xA;  [2]: http://glest.org/glest_board/index.php?topic=6411.0&#xD;&#xA;  [3]: http://glest.org/glest_board/&#xD;&#xA;  [5]: http://glest.org/glest_board/index.php?topic=6460.0" />
  <row Id="15364" PostHistoryTypeId="5" PostId="7578" RevisionGUID="cbc59306-5766-4ee2-aba8-2d709e1fa2ef" CreationDate="2011-01-22T21:53:04.753" UserId="1156" Comment="added 214 characters in body" Text="I feel I would be a good candidate to be a moderator, since I am active at participating on the site. I am in the top 15 users based solely on reputation (at time of writing), and feel I have the qualities to be a successful moderator: that is, patient and showing respect to other users.&#xD;&#xA;&#xD;&#xA;I also think I would be both fair but firm, and able to help the community to the best of my abilities.&#xD;&#xA;&#xD;&#xA;As for myself, I'm a student with ambitions to work in the gamedev/software industry and have been working on various hobby projects for about 5 years now, and have dabbled in a wide range of different areas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for your time. :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15365" PostHistoryTypeId="2" PostId="7606" RevisionGUID="9649cbe8-e7b2-4dfe-8354-861420a7ddf1" CreationDate="2011-01-22T22:00:10.127" UserId="55" Text="Here is an outstanding checklist that somebody put together. This one is a keeper - http://bit.ly/hVPPMV " />
  <row Id="15366" PostHistoryTypeId="2" PostId="7607" RevisionGUID="e5d2d380-2a7c-4be1-824b-92b944892319" CreationDate="2011-01-22T22:09:29.350" UserId="3175" Text="You're going about it all wrong!  Zombies are stupid!&#xD;&#xA;&#xD;&#xA;    if CanSeeCharacter()&#xD;&#xA;        IterateLegalMoves()&#xD;&#xA;        Pick the move that ends up as close to the character as possible (by crow only)&#xD;&#xA;    else if Dice &lt; 5%&#xD;&#xA;        PickRandomBearing()&#xD;&#xA;    else if Position + Speed * CurrentBearing is legal&#xD;&#xA;        Move()&#xD;&#xA;    else&#xD;&#xA;        PickRandomBearing()&#xD;&#xA;&#xD;&#xA;No pathfinding, let them get stuck.  That's how zombies should behave.  If there's enough of them the crowd will fill in any dead ends and force the additional zombies to go around so they can actually get to the character." />
  <row Id="15367" PostHistoryTypeId="2" PostId="7608" RevisionGUID="31fdc801-499b-4049-b74e-6e65b4ca4922" CreationDate="2011-01-22T22:36:11.847" UserId="4212" Text="I am considering different game server architectures that use GAE.  The types of games I am considering are turn-based where the world status would need to be updated about once per minute.&#xD;&#xA;&#xD;&#xA;I am looking for an answer that persuades me to either perform the world update on the google servers OR an authoritative server that syncs with the datastore.  The main goal here would be to minimize GAE daily quotas.&#xD;&#xA;&#xD;&#xA;For some rough numbers, I am assuming 10,000 entities requiring updates.  Each entity update would require:&lt;br&gt;&#xD;&#xA;&#xD;&#xA; - Reading 5 private entity variables (fetched from datastore)&#xD;&#xA; - Fetching as many as 20 static variables (from datastore or persisted in server memory)&#xD;&#xA; - Writing 5 entity variables&#xD;&#xA;&#xD;&#xA;Clients of the game would authenticate and set state directly against GAE as well as pull the latest world state from GAE.&#xD;&#xA;&#xD;&#xA;Running the update on GAE would consist of a cron job launched every minute.  This would update all of the entities and save the results to the datastore.  This would be more CPU intensive for GAE.&#xD;&#xA;&#xD;&#xA;Running the update on an authoritative server would consist of fetching entity data from the GAE datastore, calculating the new entity states and pushing the new state variables  back to the datastore.  This would be more bandwidth intensive for the datastore." />
  <row Id="15368" PostHistoryTypeId="1" PostId="7608" RevisionGUID="31fdc801-499b-4049-b74e-6e65b4ca4922" CreationDate="2011-01-22T22:36:11.847" UserId="4212" Text="Using Google App Engine to Perform World Updates vs an Authoritative Server" />
  <row Id="15369" PostHistoryTypeId="3" PostId="7608" RevisionGUID="31fdc801-499b-4049-b74e-6e65b4ca4922" CreationDate="2011-01-22T22:36:11.847" UserId="4212" Text="&lt;mmo&gt;&lt;network&gt;&lt;server&gt;&lt;databases&gt;&lt;google-app-engine&gt;" />
  <row Id="15370" PostHistoryTypeId="25" PostId="7602" RevisionGUID="5a711c8c-1e45-47dc-9de9-61a405125db1" CreationDate="2011-01-22T22:55:42.807" Comment="http://twitter.com/#!/StackGameDev/status/28948952044806144" />
  <row Id="15371" PostHistoryTypeId="2" PostId="7609" RevisionGUID="363c9ec2-91de-4a57-b271-a25e12748bc7" CreationDate="2011-01-22T23:23:03.377" UserId="744" Text="The Warcraft III and Starcraft II editors are probably, almost by definition, the best engines to make DotA-like games in. They are reasonably well documented, simpler than anything suggested thus far, and have a proven record of being able to make excellent RTS games." />
  <row Id="15372" PostHistoryTypeId="5" PostId="7606" RevisionGUID="ecd5d359-9b38-438d-bb45-a879d12269f0" CreationDate="2011-01-22T23:25:56.150" UserId="744" Comment="Remove crappy link." Text="&lt;a href=&quot;http://www.mindjuice.net/2011/01/21/ios-development-marketing-checklist/&quot;&gt;Here is an outstanding checklist that somebody put together. This one is a keeper.&lt;/a&gt;" />
  <row Id="15373" PostHistoryTypeId="2" PostId="7610" RevisionGUID="9956ec27-90f9-4889-86f6-df0026938ec8" CreationDate="2011-01-22T23:28:46.430" UserId="1037" Text="Here is how I implemented this in case anyone else is trying to do this (I have limited it to 2-button combos but I could easily extend the logic to 3 &amp; 4-button combos as well).  I chose to handle each touch individually using the ccTouchBegan/Ended/Moved instead of using the ccTouchesBegan/Ended/Moved because I just couldn't get it to work with the hash code.  Any alternative ideas would be welcome.&#xD;&#xA;&#xD;&#xA;spuButton.h (a CCSprite Subclass)&#xD;&#xA;&#xD;&#xA;    #import &lt;Foundation/Foundation.h&gt;&#xD;&#xA;    #import &quot;cocos2d.h&quot;&#xD;&#xA;    &#xD;&#xA;    typedef enum tagButtonState {&#xD;&#xA;     kButtonStatePressed,&#xD;&#xA;     kButtonStateNotPressed&#xD;&#xA;    } ButtonState;&#xD;&#xA;    &#xD;&#xA;    typedef enum tagButtonStatus {&#xD;&#xA;     kButtonStatusEnabled,&#xD;&#xA;     kButtonStatusDisabled&#xD;&#xA;    } ButtonStatus;&#xD;&#xA;    &#xD;&#xA;    @interface spuButton : CCSprite &lt;CCTargetedTouchDelegate&gt; {&#xD;&#xA;    @private&#xD;&#xA;     ButtonState buttonState;&#xD;&#xA;     CCTexture2D *buttonNormal;&#xD;&#xA;     CCTexture2D *buttonLit;&#xD;&#xA;     ButtonStatus buttonStatus; &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    @property(nonatomic, readonly) CGRect rect;&#xD;&#xA;    &#xD;&#xA;    + (id)spuButtonWithTexture:(CCTexture2D *)normalTexture;&#xD;&#xA;    &#xD;&#xA;    - (void)setNormalTexture:(CCTexture2D *)normalTexture;&#xD;&#xA;    - (void)setLitTexture:(CCTexture2D *)litTexture;&#xD;&#xA;    - (BOOL)isPressed;&#xD;&#xA;    - (BOOL)isNotPressed;&#xD;&#xA;    - (void)makeDisabled;&#xD;&#xA;    - (void)makeEnabled;&#xD;&#xA;    - (BOOL)isEnabled;&#xD;&#xA;    - (BOOL)isDisabled;&#xD;&#xA;    - (void)makeLit;&#xD;&#xA;    - (void)makeNormal;&#xD;&#xA;    - (void)dealloc;&#xD;&#xA;    &#xD;&#xA;    @end&#xD;&#xA;&#xD;&#xA;spuButton.m&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #import &quot;spuButton.h&quot;&#xD;&#xA;    #import &quot;cocos2d.h&quot;&#xD;&#xA;    &#xD;&#xA;    @implementation spuButton&#xD;&#xA;    &#xD;&#xA;    - (CGRect)rect {&#xD;&#xA;     CGSize s = [self.texture contentSize];&#xD;&#xA;     return CGRectMake(-s.width / 2, -s.height / 2, s.width, s.height);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    + (id)spuButtonWithTexture:(CCTexture2D *)normalTexture {&#xD;&#xA;     return [[[self alloc] initWithTexture:normalTexture] autorelease];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)setNormalTexture:(CCTexture2D *)normalTexture {&#xD;&#xA;     buttonNormal = normalTexture;&#xD;&#xA;    }&#xD;&#xA;    - (void)setLitTexture:(CCTexture2D *)litTexture {&#xD;&#xA;     buttonLit = litTexture;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (BOOL)isPressed {&#xD;&#xA;     if (buttonState== kButtonStateNotPressed) return NO;&#xD;&#xA;     if (buttonState== kButtonStatePressed) return YES;&#xD;&#xA;     return NO;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (BOOL)isNotPressed {&#xD;&#xA;     if (buttonState== kButtonStateNotPressed) return YES;&#xD;&#xA;     if (buttonState== kButtonStatePressed) return NO;&#xD;&#xA;     return YES;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)makeDisabled {&#xD;&#xA;     buttonStatus = kButtonStatusDisabled;&#xD;&#xA;     buttonState= kButtonStateNotPressed;&#xD;&#xA;     [self makeNormal];&#xD;&#xA;    }&#xD;&#xA;    - (void)makeEnabled {&#xD;&#xA;     buttonStatus = kButtonStatusEnabled;&#xD;&#xA;     buttonState= kButtonStateNotPressed;&#xD;&#xA;     [self makeNormal];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (BOOL)isEnabled {&#xD;&#xA;     if (buttonStatus== kButtonStatusDisabled) return NO;&#xD;&#xA;     if (buttonStatus== kButtonStatusEnabled) return YES;&#xD;&#xA;     return NO;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (BOOL)isDisabled {&#xD;&#xA;     if (buttonStatus== kButtonStatusEnabled) return NO;&#xD;&#xA;     if (buttonStatus== kButtonStatusDisabled) return YES;&#xD;&#xA;     return YES;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)makeLit {&#xD;&#xA;     [self setTexture:buttonLit];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)makeNormal {&#xD;&#xA;     [self setTexture:buttonNormal];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (id)initWithTexture:(CCTexture2D *)aTexture {&#xD;&#xA;     if ((self = [super initWithTexture:aTexture]) ) {  &#xD;&#xA;      buttonState = kButtonStateNotPressed;&#xD;&#xA;      buttonStatus = kButtonStatusEnabled;&#xD;&#xA;     }&#xD;&#xA;     return self;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)onEnter {&#xD;&#xA;     if (buttonStatus == kButtonStatusDisabled) return;&#xD;&#xA;     [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:NO];&#xD;&#xA;     [super onEnter];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)onExit {&#xD;&#xA;     if (buttonStatus == kButtonStatusDisabled) return;&#xD;&#xA;     [[CCTouchDispatcher sharedDispatcher] removeDelegate:self];&#xD;&#xA;     [super onExit];&#xD;&#xA;    } &#xD;&#xA;    &#xD;&#xA;    - (BOOL)containsTouchLocation:(UITouch *)touch {&#xD;&#xA;     return CGRectContainsPoint(self.rect, [self convertTouchToNodeSpaceAR:touch]);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {&#xD;&#xA;     if (buttonStatus == kButtonStatusDisabled) return NO;&#xD;&#xA;     if (buttonState== kButtonStatePressed) return NO;&#xD;&#xA;     if ( ![self containsTouchLocation:touch] ) return NO;&#xD;&#xA;     &#xD;&#xA;     buttonState= kButtonStatePressed;&#xD;&#xA;     [self makeLit];&#xD;&#xA;     &#xD;&#xA;     return YES;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event {&#xD;&#xA;     // If it weren't for the TouchDispatcher, you would need to keep a reference&#xD;&#xA;     // to the touch from touchBegan and check that the current touch is the same&#xD;&#xA;     // as that one.&#xD;&#xA;     // Actually, it would be even more complicated since in the Cocos dispatcher&#xD;&#xA;     // you get NSSets instead of 1 UITouch, so you'd need to loop through the set&#xD;&#xA;     // in each touchXXX method.&#xD;&#xA;     &#xD;&#xA;     if (buttonStatus == kButtonStatusDisabled) return;&#xD;&#xA;     if ([self containsTouchLocation:touch]) return;&#xD;&#xA;     &#xD;&#xA;     buttonState= kButtonStateNotPressed;&#xD;&#xA;     [self makeNormal];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event {&#xD;&#xA;     if (buttonStatus == kButtonStatusDisabled) return;&#xD;&#xA;     &#xD;&#xA;     buttonState= kButtonStateNotPressed;&#xD;&#xA;     [self makeNormal];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)dealloc {&#xD;&#xA;     [buttonNormal release];&#xD;&#xA;     [buttonLit release];&#xD;&#xA;     [super dealloc];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    @end&#xD;&#xA;&#xD;&#xA;HelloWorldScene.m (Just my tick: method to keep my other functions from confusing the example)&#xD;&#xA;&#xD;&#xA;    -(void)tick:(ccTime)dt {&#xD;&#xA;     if ([[_otherControlsArray objectAtIndex:0] wasPressed]) {&#xD;&#xA;      [[_otherControlsArray objectAtIndex:0] setWasPressed:NO];&#xD;&#xA;      [self removeChild:[_otherControlsArray objectAtIndex:0] cleanup:YES];&#xD;&#xA;      [self addChild:[_otherControlsArray objectAtIndex:1]];&#xD;&#xA;      NSLog(@&quot;Play&quot;);&#xD;&#xA;      &#xD;&#xA;      _gameHasNotBeenPlayedYet = NO;&#xD;&#xA;      Snarfle_s_PowerUPAppDelegate *delegate = [[UIApplication sharedApplication] delegate];&#xD;&#xA;      [delegate makeNotPaused];&#xD;&#xA;      [self gameLogic];&#xD;&#xA;     }&#xD;&#xA;     &#xD;&#xA;     if (_gameHasNotBeenPlayedYet) {&#xD;&#xA;      return;&#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;     if (_buttonsPressedAndReleased &gt; 0) {  //respond to button(s) released and reset&#xD;&#xA;      NSLog(@&quot;Buttons Pressed and Released--&gt;%d&quot;,_buttonsPressedAndReleased);&#xD;&#xA;      if ([self checkButtons:_buttonsPressedAndReleased]);&#xD;&#xA;      _buttonsPressed = 0;&#xD;&#xA;      _buttonsPressedAndReleased = 0;&#xD;&#xA;      &#xD;&#xA;      return;&#xD;&#xA;     }&#xD;&#xA;     if (_buttonsPressed &lt;= 4) { // two buttons have not already been pressed&#xD;&#xA;      for (spuButton *aButton in _fourButtonsArray) {&#xD;&#xA;       if ([aButton isNotPressed]) continue; //this button is not pressed&#xD;&#xA;       if (_buttonsPressed == 0) { //this button is pressed and no other buttons have been pressed&#xD;&#xA;        _buttonsPressed = aButton.tag;&#xD;&#xA;        continue;&#xD;&#xA;       }&#xD;&#xA;       //this button is pressed while another has been pressed&#xD;&#xA;       //figure out which two buttons have been pressed&#xD;&#xA;       if (_buttonsPressed == 1) {  //red plus another&#xD;&#xA;        switch (aButton.tag) {&#xD;&#xA;         case 2:   //blue&#xD;&#xA;          _buttonsPressed = 5;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 3:  //green&#xD;&#xA;          _buttonsPressed = 6;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 4:  //yellow&#xD;&#xA;          _buttonsPressed = 7;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         default:&#xD;&#xA;          _buttonsPressed = 1;&#xD;&#xA;          break;&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       if (_buttonsPressed == 2) {  //blue plus another&#xD;&#xA;        switch (aButton.tag) {&#xD;&#xA;         case 1:   //red&#xD;&#xA;          _buttonsPressed = 5;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 3:  //green&#xD;&#xA;          _buttonsPressed = 8;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 4:  //yellow&#xD;&#xA;          _buttonsPressed = 9;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         default:&#xD;&#xA;          _buttonsPressed = 2;&#xD;&#xA;          break;&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       if (_buttonsPressed == 3) {  //green plus another&#xD;&#xA;        switch (aButton.tag) {&#xD;&#xA;         case 1:   //red&#xD;&#xA;          _buttonsPressed = 6;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 2:  //blue&#xD;&#xA;          _buttonsPressed = 8;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 4:  //yellow&#xD;&#xA;          _buttonsPressed = 10;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         default:&#xD;&#xA;          _buttonsPressed = 3;&#xD;&#xA;          break;&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       if (_buttonsPressed == 4) {  //yellow plus another&#xD;&#xA;        switch (aButton.tag) {&#xD;&#xA;         case 1:   //red&#xD;&#xA;          _buttonsPressed = 7;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 2:  //blue&#xD;&#xA;          _buttonsPressed = 9;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         case 3:  //green&#xD;&#xA;          _buttonsPressed = 10;&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;          [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;          break;&#xD;&#xA;         default:&#xD;&#xA;          _buttonsPressed = 4;&#xD;&#xA;          break;&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       if (_buttonsPressed &gt; 4) break;  //more than one has been pressed and identified&#xD;&#xA;      }&#xD;&#xA;     }&#xD;&#xA;     //now we know what buttons have been pressed now check to see if they have been released&#xD;&#xA;     //if more than one has been pressed disable the other two&#xD;&#xA;     //also if more than one has been pressed and one of them gets released disable the released one but keep it lit&#xD;&#xA;     switch (_buttonsPressed) {&#xD;&#xA;      case 1:  //red&#xD;&#xA;       if ([[_fourButtonsArray objectAtIndex:0] isNotPressed]) _buttonsPressedAndReleased = 1;&#xD;&#xA;       break;&#xD;&#xA;      case 2:  //blue&#xD;&#xA;       if ([[_fourButtonsArray objectAtIndex:1] isNotPressed]) _buttonsPressedAndReleased = 2;&#xD;&#xA;       break;&#xD;&#xA;      case 3:  //green&#xD;&#xA;       if ([[_fourButtonsArray objectAtIndex:2] isNotPressed]) _buttonsPressedAndReleased = 3;&#xD;&#xA;       break;&#xD;&#xA;      case 4:  //yellow&#xD;&#xA;       if ([[_fourButtonsArray objectAtIndex:3] isNotPressed]) _buttonsPressedAndReleased = 4;&#xD;&#xA;       break;&#xD;&#xA;      case 5:  //red &amp; blue&#xD;&#xA;       if (([[_fourButtonsArray objectAtIndex:0] isNotPressed]) &amp;&amp; ([[_fourButtonsArray objectAtIndex:1] isNotPressed])) _buttonsPressedAndReleased = 5;&#xD;&#xA;       else {&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:0] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:0] makeLit];&#xD;&#xA;        }&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:1] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:1] makeLit];&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       break;&#xD;&#xA;      case 6:  //red &amp; green&#xD;&#xA;       if (([[_fourButtonsArray objectAtIndex:0] isNotPressed]) &amp;&amp; ([[_fourButtonsArray objectAtIndex:2] isNotPressed])) _buttonsPressedAndReleased = 6;&#xD;&#xA;       else {&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:0] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:0] makeLit];&#xD;&#xA;        }&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:2] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:2] makeLit];&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       break;&#xD;&#xA;      case 7:  //red &amp; yellow&#xD;&#xA;       if (([[_fourButtonsArray objectAtIndex:0] isNotPressed]) &amp;&amp; ([[_fourButtonsArray objectAtIndex:3] isNotPressed])) _buttonsPressedAndReleased = 7;&#xD;&#xA;       else {&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:0] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:0] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:0] makeLit];&#xD;&#xA;        }&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:3] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:3] makeLit];&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       break;&#xD;&#xA;      case 8:  //blue &amp; green&#xD;&#xA;       if (([[_fourButtonsArray objectAtIndex:1] isNotPressed]) &amp;&amp; ([[_fourButtonsArray objectAtIndex:2] isNotPressed])) _buttonsPressedAndReleased = 8;&#xD;&#xA;       else {&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:1] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:1] makeLit];&#xD;&#xA;        }&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:2] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:2] makeLit];&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       break;&#xD;&#xA;      case 9:  //blue &amp; yellow&#xD;&#xA;       if (([[_fourButtonsArray objectAtIndex:1] isNotPressed]) &amp;&amp; ([[_fourButtonsArray objectAtIndex:3] isNotPressed])) _buttonsPressedAndReleased = 9;&#xD;&#xA;       else {&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:1] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:1] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:1] makeLit];&#xD;&#xA;        }&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:3] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:3] makeLit];&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       break;&#xD;&#xA;      case 10:  //green &amp; yellow&#xD;&#xA;       if (([[_fourButtonsArray objectAtIndex:2] isNotPressed]) &amp;&amp; ([[_fourButtonsArray objectAtIndex:3] isNotPressed])) _buttonsPressedAndReleased = 10;&#xD;&#xA;       else {&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:2] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:2] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:2] makeLit];&#xD;&#xA;        }&#xD;&#xA;        if ([[_fourButtonsArray objectAtIndex:3] isNotPressed]) {&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:3] makeDisabled];&#xD;&#xA;         [[_fourButtonsArray objectAtIndex:3] makeLit];&#xD;&#xA;        }&#xD;&#xA;       }&#xD;&#xA;       break;&#xD;&#xA;      default:&#xD;&#xA;       _buttonsPressedAndReleased = 0;&#xD;&#xA;       break;&#xD;&#xA;     }&#xD;&#xA;    }" />
  <row Id="15374" PostHistoryTypeId="2" PostId="7611" RevisionGUID="5d071695-9f50-4b6c-ba89-af5016e7662f" CreationDate="2011-01-22T23:36:35.790" UserDisplayName="user4820" Text="I came up with a method for recursively generating simple dungeon maps by starting with one room and recursively connecting new adjacent rooms randomly to it.&#xD;&#xA;&#xD;&#xA;Maps are represented as two dimensional arrays where each cell contains a value of 0-15. 0 represents no room while each direction is represented by north=1, east=2, south=4, west=8.&#xD;&#xA;&#xD;&#xA;I wanted to start with a single non room ([[0]]) and then expand the 2d array as necessary to fit the generated map. The difficulty I face with this tree like recursion is that if the arrays have to be unshifted to add rows and columns to the left and top of the map, I have to adjust the current position of the function, what row and column it is at. This makes it so that separate branches are not aware of array index adjustments from other branches, only their child functions will know because they have the adjusted position passed to them as their row and column arguments.&#xD;&#xA;&#xD;&#xA;Is there a way to do this? I tried storing row and column offset values outside of the recursion, but it did not work for some reason." />
  <row Id="15375" PostHistoryTypeId="1" PostId="7611" RevisionGUID="5d071695-9f50-4b6c-ba89-af5016e7662f" CreationDate="2011-01-22T23:36:35.790" UserDisplayName="user4820" Text="Recursive dungeon maps as represented by an elastic 2d array" />
  <row Id="15376" PostHistoryTypeId="3" PostId="7611" RevisionGUID="5d071695-9f50-4b6c-ba89-af5016e7662f" CreationDate="2011-01-22T23:36:35.790" UserDisplayName="user4820" Text="&lt;programming&gt;&lt;game-mechanics&gt;&lt;level-design&gt;" />
  <row Id="15377" PostHistoryTypeId="2" PostId="7612" RevisionGUID="d2f9ad41-1b7e-49d2-81a0-b83c64db161a" CreationDate="2011-01-23T00:09:03.743" UserId="1037" Text="Similar to [this question][1] that also has some good resources. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/2326/1037" />
  <row Id="15378" PostHistoryTypeId="2" PostId="7613" RevisionGUID="50aee7df-cf21-4eda-8679-b4991ab6ab32" CreationDate="2011-01-23T00:16:56.910" UserId="51" Text="The way I typically do that is set up animation events that are hooked up to each frame that would require a footstep sound.  So in the walk animation there will typically be two steps, so at those frames I tell whatever sound system I'm using to play a random step sound.  (In your case, I think it's just a regular fmod event.)&#xD;&#xA;&#xD;&#xA;Another way I've seen it done is by using your engine's physics engine.  Attach colliders to your characters feet (parent them to the bones or something), and when they hit the ground play a step sound in the same way.  I've personally never done it that way, though.&#xD;&#xA;&#xD;&#xA;Either way, it's less &quot;how do I do this in FMOD&quot;, and more &quot;how do I do this with our animation or physics system&quot;.&#xD;&#xA;&#xD;&#xA;One thing that sound guys will tell you is that &quot;random sounds&quot; isn't just picking from your sound randomly.  The way you're supposed to do it is by shuffling all of your sounds from whatever bank you're currently picking from, and then go through that shuffled list in order.  That way you don't run into the issue where your random number generator can get into a situation where it plays the same sound multiple times in a row.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15379" PostHistoryTypeId="2" PostId="7614" RevisionGUID="c4db0adc-f591-4ab6-b1a0-a27b06aa6f63" CreationDate="2011-01-23T00:47:45.643" UserId="744" Text="Is there a reason you must use a 2D array, or would some a hash table or other kind of map work? Then the x,y indices just continue into negative space, but it doesn't matter.&#xD;&#xA;&#xD;&#xA;If you're concerned about memory or CPU speed, 1) Don't be, hash tables are very efficient at things like pairs of dense integers, 2) you can build the level in a hash table and then post-process it into an array once you know the final size." />
  <row Id="15380" PostHistoryTypeId="2" PostId="7615" RevisionGUID="0f3ddf8c-9df4-4192-a6ff-588cab11dcc2" CreationDate="2011-01-23T01:33:31.007" UserId="4086" Text="I would like to make a game that amalgamates Homeworld and Freespace with inspirations from the novel Ender's game. This is probably not a new idea, but I haven't seen anything  that did anything like it. It would be team based and allows players to control units in an RTS (Homeworld) or first person fashion (Freespace)&#xD;&#xA;&#xD;&#xA;I was doing some research on frameworks to help get me started, and my findings are summarized below. I believe one of the hardest parts is going to be UI, which Homeworld did a decent job at, but could be improved slightly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;OGRE: just covers graphics, with plugs for collision detection&#xD;&#xA;&#xD;&#xA;Irrilicht: Covers graphics / collision with plugins for Sound. looks dated, though mainly because of aged art assets&#xD;&#xA;&#xD;&#xA;Unity: While looks fairly complete, the Free version is feature robbed, and Feels more like a &quot;for artists&quot; tool. I would like to be figuring out programming problems, not where buttons are on menus.&#xD;&#xA;&#xD;&#xA;Torque: From what I hear is abandoned.&#xD;&#xA;&#xD;&#xA;Are there other obvious choices that I missed?&#xD;&#xA;" />
  <row Id="15381" PostHistoryTypeId="1" PostId="7615" RevisionGUID="0f3ddf8c-9df4-4192-a6ff-588cab11dcc2" CreationDate="2011-01-23T01:33:31.007" UserId="4086" Text="Framework suitable for 3D RTS ala Homeworld?" />
  <row Id="15382" PostHistoryTypeId="3" PostId="7615" RevisionGUID="0f3ddf8c-9df4-4192-a6ff-588cab11dcc2" CreationDate="2011-01-23T01:33:31.007" UserId="4086" Text="&lt;3d-engines&gt;&lt;rts&gt;" />
  <row Id="15383" PostHistoryTypeId="25" PostId="7611" RevisionGUID="0137abdb-38ce-462d-a99c-c8a2cce3892d" CreationDate="2011-01-23T01:55:43.167" Comment="http://twitter.com/#!/StackGameDev/status/28994251794677760" />
  <row Id="15384" PostHistoryTypeId="2" PostId="7616" RevisionGUID="c5ed7808-bad6-497c-8a24-e32b9347277d" CreationDate="2011-01-23T06:18:02.247" UserId="4779" Text="Unity is fairly easy to use, may take a small while, but it is worth it. Learning it can be fast thanks to UnityAnswers, a site stackoverflow-styled where you can ask pretty much anything about Unity and they usually answer pretty quickly.&#xD;&#xA;Unity supports a couple languages, like Javascript.&#xD;&#xA;Unity is pretty interesting, you make prefabs of your game objects and put them in your scenes. Performance is good, and I believe networking is fine as well.&#xD;&#xA;&#xD;&#xA;It has great water surface assets, real-time lighting, tree creator, landscapes, skyboxes, a nice way to &quot;expose&quot; variables and quickly edit them without going directly into the code, nice HUD system, etc.&#xD;&#xA;Apparently, Unity Pro comes with a couple great performance tools that might come handy when drawing your game scenes too.&#xD;&#xA;There is also the Asset Store. You can buy graphic packs or other code projects, in case you need a boost somewhere in your game development.&#xD;&#xA;&#xD;&#xA;Unity has a strong community, support and good documentation covering all the supported languages. Worth giving it a go. Learning may take a while thought." />
  <row Id="15385" PostHistoryTypeId="2" PostId="7617" RevisionGUID="7d56bde1-372a-4d0a-974f-85aa07efd575" CreationDate="2011-01-23T07:14:45.083" UserId="4822" Text="I know php and some python, but not much c. Where should I start to learn iphone game development? Is there some recommended books/tutorials for beginners? I'm looking at using cocos2d but I'm open to anything that isn't too limited." />
  <row Id="15386" PostHistoryTypeId="1" PostId="7617" RevisionGUID="7d56bde1-372a-4d0a-974f-85aa07efd575" CreationDate="2011-01-23T07:14:45.083" UserId="4822" Text="Best way to learn iphone game development?" />
  <row Id="15387" PostHistoryTypeId="3" PostId="7617" RevisionGUID="7d56bde1-372a-4d0a-974f-85aa07efd575" CreationDate="2011-01-23T07:14:45.083" UserId="4822" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="15388" PostHistoryTypeId="25" PostId="7617" RevisionGUID="f0c551c8-9cbe-4a11-9ae0-f9e2bb41be23" CreationDate="2011-01-23T07:55:43.130" Comment="http://twitter.com/#!/StackGameDev/status/29084849465720832" />
  <row Id="15389" PostHistoryTypeId="2" PostId="7618" RevisionGUID="caa5fa84-ee99-429f-a85a-8d62ed1c24e8" CreationDate="2011-01-23T08:27:38.733" UserId="4823" Text="The Homeworld Engine is available and open for use. Though I'm not 100% sure about the license for distribution. I would say that the Homeworld engine would be a great place to start for a Homeworld Style game. It it is free you are after look no further." />
  <row Id="15390" PostHistoryTypeId="2" PostId="7619" RevisionGUID="a6a6c76e-c02b-43db-8165-2020796af7e8" CreationDate="2011-01-23T08:32:55.953" UserId="4191" Text="I've been very favorably impressed by [O'Reilly's *iPhone Game Development*][1].  For my taste it's a bit deep in the mindset where &quot;game&quot; means &quot;screen-oriented pixels-moving-around exercise&quot;, but since that mindset is dominant in the industry that's not too surprising.  It'll definitely get you a good start, in any event.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://oreilly.com/catalog/9780596159863" />
  <row Id="15391" PostHistoryTypeId="2" PostId="7620" RevisionGUID="36b23d6e-8a07-4af7-8eaa-49edd427e164" CreationDate="2011-01-23T08:36:59.710" UserId="4191" Text="The minimum effort solution is to pick a maximum size (X and Y extent) that you want the dungeon to reach, put your starting point in the center of that, and don't allow growth outside of it.  No need to do any shifting.  Depends on a fixed extent being acceptable, of course." />
  <row Id="15392" PostHistoryTypeId="2" PostId="7621" RevisionGUID="392e5765-0385-41a5-b5ea-ac5a5e10a7b7" CreationDate="2011-01-23T09:40:25.610" UserId="51" Text="" />
  <row Id="15393" PostHistoryTypeId="2" PostId="7622" RevisionGUID="deb582db-8965-4d62-9fe4-1b176e7b5086" CreationDate="2011-01-23T09:40:25.610" UserId="51" Text="XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7." />
  <row Id="15399" PostHistoryTypeId="2" PostId="7625" RevisionGUID="f01ba125-859f-4d1a-8c4c-126176ad2489" CreationDate="2011-01-23T11:38:44.503" UserId="1156" Text="I'm doing a similar thing, in Python. (Or at least the elastic part).&#xD;&#xA;&#xD;&#xA;I have a dictionary of (x,y) tuples mapping to the cells. In pseudo code:  &#xD;&#xA;&#xD;&#xA;    map = dictionary( (0,0) : cell at (0,0), (1,0) : cell at (1,0) ... (2, 2) : cell at (2,2)&#xD;&#xA;    getCell(x,y):&#xD;&#xA;        return map[(x,y)]&#xD;&#xA;        catch error if out of bounds:&#xD;&#xA;             map[(x,y)] = new cell and return&#xD;&#xA;&#xD;&#xA;A hash table would be very good for this kind of thing." />
  <row Id="15400" PostHistoryTypeId="2" PostId="7626" RevisionGUID="81976529-9c8b-4682-834b-af87b94b8e7a" CreationDate="2011-01-23T13:09:45.377" UserDisplayName="user4712" Text="Thank you for looking at the code, everyone that did, I have fixed the problem. The problem was that our level editor's coordinate system was flipped on the x axis. So what we had to do was flip the x on the vectors of the min/max of the bounding boxes so that they were accurate. However, eventually we will go back and fix the level editor so that it has the correct coordinate system. lol &#xD;&#xA;" />
  <row Id="15401" PostHistoryTypeId="2" PostId="7627" RevisionGUID="adf526ed-96da-4924-937a-9cd5b6e63d13" CreationDate="2011-01-23T13:10:24.107" UserId="4345" Text="You would want to use a graph instead of the 2D array.&#xD;&#xA;&#xD;&#xA;Each room would be a node in the graph and knows which other rooms are adjacent to it:&#xD;&#xA;&#xD;&#xA;    Room {&#xD;&#xA;        long x;&#xD;&#xA;        long y;&#xD;&#xA;        List adjacentRooms;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That way you don't have to define how large your map can become.&#xD;&#xA;&#xD;&#xA;The x,y-Coordinates can be used as unique key in a hashmap for fast access to each room. Adding a new room would just add entries to the adjacentRooms lists of the rooms close-by.&#xD;&#xA;&#xD;&#xA;The graph is also great for path finding algorithms, if you need them." />
  <row Id="15402" PostHistoryTypeId="2" PostId="7628" RevisionGUID="83a6d947-1351-4674-9607-54675fee3617" CreationDate="2011-01-23T13:46:45.123" UserId="20" Text="I also just recently started developing for iOS. I found the [documentation][1] over at [cocos2d-iphone.org][2] quite helpful, but sadly it isn't very in-depth. That's why I also bought the &quot;[Learn iPhone and iPad Cocos2D Game Development Book][3]&quot; (written by Steffen Itterheim who is also an active community member here on gamedev SE).&#xD;&#xA;&#xD;&#xA;Objective-C was also new to me, but thankfully the documentation over at [developer.apple.com][4] is really good. Be sure to also read the [introduction to Objective-C][5].&#xD;&#xA;&#xD;&#xA;I've got some C++ experience, so the whole memory-management stuff wasn't totally new to me (well, actually everybody should know about that stuff, even if you don't have to manage things yourself). Since Objective-C doesn't come with a garbage-collector (at least not when you develop for iOS), you should also read the [memory-management guide][6]. XCode also comes with a handy tool called &quot;[Leaks][7]&quot; which allows you to profile memory-usage and detect leaks. This makes spotting memory-leaks much easier and you should definitely run your app through it (make sure to always run on the device, since the simulator apparently produces leaks where there aren't any).&#xD;&#xA;&#xD;&#xA;Umm, I went a bit off-topic in the last paragraph I guess, but it's always good to know about this stuff beforehand :-)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/wiki/doku.php/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [3]: http://www.learn-cocos2d.com/&#xD;&#xA;  [4]: http://developer.apple.com&#xD;&#xA;  [5]: https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html&#xD;&#xA;  [6]: https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html&#xD;&#xA;  [7]: http://developer.apple.com/library/mac/#documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html" />
  <row Id="15403" PostHistoryTypeId="25" PostId="7615" RevisionGUID="3725830e-0030-4fdb-a9f2-f5dc559c92b9" CreationDate="2011-01-23T13:55:43.537" Comment="http://twitter.com/#!/StackGameDev/status/29175448239865856" />
  <row Id="15404" PostHistoryTypeId="5" PostId="7628" RevisionGUID="7754fb6f-eff2-4404-a5b0-ecfe95e3f3c3" CreationDate="2011-01-23T14:04:04.293" UserId="20" Comment="added update with some alternatives to cocos2d" Text="I also just recently started developing for iOS. I found the [documentation][1] over at [cocos2d-iphone.org][2] quite helpful, but sadly it isn't very in-depth. That's why I also bought the &quot;[Learn iPhone and iPad Cocos2D Game Development Book][3]&quot; (written by Steffen Itterheim who is also an active community member here on gamedev SE).&#xD;&#xA;&#xD;&#xA;Objective-C was also new to me, but thankfully the documentation over at [developer.apple.com][4] is really good. Be sure to also read the [introduction to Objective-C][5].&#xD;&#xA;&#xD;&#xA;I've got some C++ experience, so the whole memory-management stuff wasn't totally new to me (well, actually everybody should know about that stuff, even if you don't have to manage things yourself). Since Objective-C doesn't come with a garbage-collector (at least not when you develop for iOS), you should also read the [memory-management guide][6]. XCode also comes with a handy tool called &quot;[Leaks][7]&quot; which allows you to profile memory-usage and detect leaks. This makes spotting memory-leaks much easier and you should definitely run your app through it (make sure to always run on the device, since the simulator apparently produces leaks where there aren't any).&#xD;&#xA;&#xD;&#xA;Umm, I went a bit off-topic in the last paragraph I guess, but it's always good to know about this stuff beforehand :-)&#xD;&#xA;&#xD;&#xA;**Update:** Since you're open to other options, you might also consider [Unity3D][8], [UDK][9] or even [Ogre3D][10] (although it's not a game-engine but &quot;just&quot; a graphics-engine).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/wiki/doku.php/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [3]: http://www.learn-cocos2d.com/&#xD;&#xA;  [4]: http://developer.apple.com&#xD;&#xA;  [5]: https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html&#xD;&#xA;  [6]: https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html&#xD;&#xA;  [7]: http://developer.apple.com/library/mac/#documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html&#xD;&#xA;  [8]: http://unity3d.com/&#xD;&#xA;  [9]: http://www.udk.com/&#xD;&#xA;  [10]: http://www.ogre3d.org/" />
  <row Id="15405" PostHistoryTypeId="2" PostId="7629" RevisionGUID="bfc90e21-57a7-4ccd-bcd3-862248860df4" CreationDate="2011-01-23T15:50:01.950" UserId="4830" Text="try this as a starter to learn or refresh your language skills:&#xD;&#xA;&#xD;&#xA; http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-winter&#xD;&#xA;" />
  <row Id="15406" PostHistoryTypeId="2" PostId="7630" RevisionGUID="523d4a25-0f80-4bc5-85ed-56f68eadcec8" CreationDate="2011-01-23T16:48:46.357" UserId="1562" Text="**[#AltDevBlogADay][1]** - Recently brought to life by Insomniac's Mike Acton and some other guys (/girls?). It's got way more contributors than makes sense listing here.&#xD;&#xA;&#xD;&#xA;It covers a wide range of topics, with the only common denominator being Game Development - be it design, programming or management. It's mainly there to encourage all contributors to post more often with one blog being published every day. Most of the contributors are on Twitter and share their credentials, so it should be possible to have some fruitful discussions on certain topics in case someone is interested.&#xD;&#xA;&#xD;&#xA;Since it covers a potentially infinitely wide range of topics, singling out a representative one is pretty much impossible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://altdevblogaday.com/" />
  <row Id="15407" PostHistoryTypeId="25" PostId="7608" RevisionGUID="1cb28a63-48b9-4c89-b50e-fd9f1a63a735" CreationDate="2011-01-23T16:55:44.047" Comment="http://twitter.com/#!/StackGameDev/status/29220748123963392" />
  <row Id="15408" PostHistoryTypeId="2" PostId="7631" RevisionGUID="b4faf494-fea8-4d97-b989-f6f4ece3d1d7" CreationDate="2011-01-23T19:27:16.180" UserId="4779" Text="iPhone game development is incredibly fast using Cocos2d.&#xD;&#xA;&#xD;&#xA;Since you already know some programming, I'd recommend you to first take a look at the basic concepts in Cocoa development [here][1].&#xD;&#xA;&#xD;&#xA;Now that you know how Objective-C thinks, you may want to pay a visit to Raywenderlich's blog. Many of his posts are about Cocos2d, like [this one][2].&#xD;&#xA;&#xD;&#xA;It is not necessary you understand the whole tutorial. You simply copy and paste the code he provides you and take your time to see what it does.&#xD;&#xA;&#xD;&#xA;Cocos2d has all kinds of useful tools for making development fast. It has great iPhone retina display support, great bitmap font labels performance, process lots of sprites with ease, create tilemaps, schedule functions, stack scenes, create menu and buttons, box2d and chipmunk physic engine support, export to Mac feature, particle effects, great sound engine and a nice array of &quot;actions&quot; you can apply to your objects, like move, jump, rotate, fade etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cocoadevcentral.com/d/learn_objectivec/&#xD;&#xA;  [2]: http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial" />
  <row Id="15409" PostHistoryTypeId="5" PostId="7631" RevisionGUID="bce0702c-15b1-4086-8bce-ac1051bab1ab" CreationDate="2011-01-23T19:33:24.177" UserId="4779" Comment="added 336 characters in body; added 330 characters in body" Text="iPhone game development is incredibly fast using Cocos2d.&#xD;&#xA;&#xD;&#xA;Since you already know some programming, I'd recommend you to first take a look at the basic concepts in Cocoa development [here][1].&#xD;&#xA;&#xD;&#xA;Now that you know how Objective-C thinks, you may want to pay a visit to Raywenderlich's blog. Many of his posts are about Cocos2d, like [this one][2].&#xD;&#xA;&#xD;&#xA;It is not necessary you understand the whole tutorial. You simply copy and paste the code he provides you and take your time to see what it does.&#xD;&#xA;&#xD;&#xA;Cocos2d has all kinds of useful tools for making development fast. It has great iPhone retina display support, great bitmap font labels performance, process lots of sprites with ease, create tilemaps, schedule functions, stack scenes, create menu and buttons, box2d and chipmunk physic engine support, export to Mac feature, particle effects, great sound engine and a nice array of &quot;actions&quot; you can apply to your objects, like move, jump, rotate, fade etc.&#xD;&#xA;&#xD;&#xA;Since Cocos2d is just a framework on Objective-C, you have full freedom to do lots of things game engines usually lack. You can quickly implement leaderboards and achievements for your games with OpenFeint, for example. You can use iAds too.&#xD;&#xA;&#xD;&#xA;[This][3] is nice to read as well.&#xD;&#xA;&#xD;&#xA;Cocos2d is well supported. The community forums are good, you shouldn't have problems asking what you need there. And there are starting to appear lots of ports, like Cocos2d implemented with javascript and html5 for web development, or with Ruby, etc.&#xD;&#xA;&#xD;&#xA;So here's my opinion: Cocos2d has potential and is worth giving it a go.&#xD;&#xA;&#xD;&#xA;  [1]: http://cocoadevcentral.com/d/learn_objectivec/&#xD;&#xA;  [2]: http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial&#xD;&#xA;  [3]: http://www.cocos2d-iphone.org/wiki/doku.php/" />
  <row Id="15410" PostHistoryTypeId="2" PostId="7632" RevisionGUID="dc9aa89a-807b-4234-97ab-60950a48c057" CreationDate="2011-01-23T19:40:50.080" UserId="160" Text="Adding a &quot;play sound&quot; tag at specific keyframes in the walk animation is how I've always done it." />
  <row Id="15411" PostHistoryTypeId="2" PostId="7633" RevisionGUID="52edecc0-0fc0-40e7-ac7d-c6859d97ba84" CreationDate="2011-01-23T22:10:56.130" UserId="1550" Text="I've found a question for visual script editing software tool for creating game behavior logic, but I am looking for something more flexible. I would like to configure such visual script editing software tool to make it produce code that I need. I use LUA for creating quests in my mmorpg game, but every time there is need of creating a new quest I feel like writing the same code all the time. I'd like to allow my co-workers to do this job in some easy way. The easiest way I can think of would be some sort of making graphs that would represent the quest, and fill all the nodes with different if statements and game texts or procedures like spawning mobs.&#xD;&#xA;&#xD;&#xA;Is there any tool that I could use for this purpose?" />
  <row Id="15412" PostHistoryTypeId="1" PostId="7633" RevisionGUID="52edecc0-0fc0-40e7-ac7d-c6859d97ba84" CreationDate="2011-01-23T22:10:56.130" UserId="1550" Text="Visual Programming tool for creating game quests" />
  <row Id="15413" PostHistoryTypeId="3" PostId="7633" RevisionGUID="52edecc0-0fc0-40e7-ac7d-c6859d97ba84" CreationDate="2011-01-23T22:10:56.130" UserId="1550" Text="&lt;programming&gt;&lt;mmo&gt;&lt;logic&gt;" />
  <row Id="15414" PostHistoryTypeId="2" PostId="7634" RevisionGUID="15dbc171-ad20-4000-bf8c-c19d44d41796" CreationDate="2011-01-23T22:22:02.743" UserId="3249" Text="[Real-Time Rendering Blog][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimerendering.com/blog/&#xD;&#xA;&#xD;&#xA;From the authors of the book.  Obviously graphics related generally.  One of my favorites." />
  <row Id="15415" PostHistoryTypeId="25" PostId="7633" RevisionGUID="e4f280f8-702d-4f15-b3ab-b12871868325" CreationDate="2011-01-23T22:55:43.800" Comment="http://twitter.com/#!/StackGameDev/status/29311344465420288" />
  <row Id="15416" PostHistoryTypeId="2" PostId="7635" RevisionGUID="1289a661-88e5-4007-99e0-a9f1f7528c86" CreationDate="2011-01-23T23:17:08.237" UserId="4257" Text="So I've been playing Mass Effect 2 (PC) and one of the things I've noticed is that you can only save your game when you're not engaged in combat.  As soon as the first enemy shows up on your radar, the save button is disabled.  Once combat is over, save functionality reappears.&#xD;&#xA;&#xD;&#xA;It seems reasonable to assume that Mass Effect 2 is a state machine, and therefore, the internal state of the program at any moment can be captured and reloaded later.  This is basically a solved problem - games have been designed this way since the Half-Life era.  It also seems reasonable to assume that BioWare knew what they were doing when they made the decision not to follow this model - it's a tried and true system; BioWare wouldn't have done it the way they did without some good reason.  &#xD;&#xA;&#xD;&#xA;**What reasons are there to disable game save functionality during combat?**" />
  <row Id="15417" PostHistoryTypeId="1" PostId="7635" RevisionGUID="1289a661-88e5-4007-99e0-a9f1f7528c86" CreationDate="2011-01-23T23:17:08.237" UserId="4257" Text="Reasons to disable game save during combat (e.g. Mass Effect 2)" />
  <row Id="15418" PostHistoryTypeId="3" PostId="7635" RevisionGUID="1289a661-88e5-4007-99e0-a9f1f7528c86" CreationDate="2011-01-23T23:17:08.237" UserId="4257" Text="&lt;game-mechanics&gt;&lt;state&gt;" />
  <row Id="15419" PostHistoryTypeId="2" PostId="7636" RevisionGUID="88150d55-fe79-44fe-8a58-b0adffa1eff7" CreationDate="2011-01-23T23:45:10.883" UserId="2332" Text="There are a number of reasons that I can think of why designers would do it this way.&#xD;&#xA;&#xD;&#xA;The first and probably the most important reason is to prevent really, really annoying the player. E.g. You're in a middle of a tense firefight, you save the game, leave it for a few weeks, load it back up and you're under fire from all angles without any room to breathe.&#xD;&#xA;&#xD;&#xA;Another reason is that saving the states of the enemies at that particular time could potentially be problematic. Saving the game state is fairly simple since everything is fairly static (objects in the game world, position of the player, etc). You could save the enemies, but depending on how their AI was implemented it could cause some serialization issues.&#xD;&#xA;&#xD;&#xA;Finally saving in other times apart from combat is by design. Again, if the fight you're in is a particularly tense firefight, the developers would want you to experience that tension every time (or something to that effect).&#xD;&#xA;&#xD;&#xA;Personally, I believe it's the first and second reason more than anything.&#xD;&#xA;&#xD;&#xA;Ray" />
  <row Id="15420" PostHistoryTypeId="2" PostId="7637" RevisionGUID="9f5c2441-297d-4ee1-864f-3167431c4eea" CreationDate="2011-01-24T00:01:55.387" UserId="3830" Text="If you save in combat, you run the risk of saving just before something is going to kill you.  Reloading that saved game just puts you right back into the game moments before that event, and it can sometimes be impossible to recover.&#xD;&#xA;&#xD;&#xA;As an example, I have a saved game right now in Dead Space where my health is incredibly low, and not 1 second after the save, a big boss monster attacks.  I've tried loading and fighting it numerous times, and basically have given up on ever doing so.  My only solution is to go back to a VERY old save, and frankly I'm not sure if I want to do that. &#xD;&#xA;&#xD;&#xA;So basically, you never want to have the player save the game just before something is going to give them a serious setback.  And being in combat greatly increases the odds of this." />
  <row Id="15421" PostHistoryTypeId="5" PostId="7603" RevisionGUID="13c18f0b-11e3-45f2-85ad-d4aa9655827b" CreationDate="2011-01-24T00:32:52.507" UserId="3794" Comment="added renders" Text="For each light do one render pass and use Additive blending. &#xD;&#xA;&#xD;&#xA;For first pass (doesn't matter which light is will be first) consider material color and light color in your phong. For other lights count only with light color. And thats it.&#xD;&#xA;&#xD;&#xA;Question is: Why to do it this way and not just send all of the light positions and params in few arrays? Answer is that this is much easier to handle once you start making some more complex effects, like shadow mapping.&#xD;&#xA;&#xD;&#xA;**Edit:** To prove my point, i added two renders, because this technique sometimes sounds weird. One is rendered with gpu renderer which using described technique. And second is same scene rendered with Maya. Scene is lighted with 3 lights. One emits red, one blue and one green color. Common shadow mapping is used. &#xD;&#xA;&#xD;&#xA;Realtime renderer:  &#xD;&#xA;![furryball][1] &#xD;&#xA; &#xD;&#xA;Rendered with maya&#xD;&#xA;&#xD;&#xA;![maya][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/n4ATo.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/gjWSW.png" />
  <row Id="15422" PostHistoryTypeId="5" PostId="7603" RevisionGUID="8ea8fcfd-68c1-4f8d-b9be-a4dd771fd8a6" CreationDate="2011-01-24T01:00:31.453" UserId="3794" Comment="little change of words" Text="For each light do one render pass and use Additive blending. &#xD;&#xA;&#xD;&#xA;For first pass (doesn't matter which light is will be first) consider material color and light color in your phong. For other lights count only with light color. And thats it.&#xD;&#xA;&#xD;&#xA;Question is: Why to do it this way and not just send all of the light positions and params in few arrays? Answer is that this is much easier to handle once you start making some more complex effects. And there is one plus more. You can use your current shader. &#xD;&#xA;&#xD;&#xA;**Edit:** To prove my point, i added two renders, because this technique sometimes sounds weird. One is rendered with gpu renderer which using described technique. And second is same scene rendered with Maya. Scene is lighted with 3 lights. One emits red, one blue and one green color. Common shadow mapping is used. &#xD;&#xA;&#xD;&#xA;Realtime renderer:  &#xD;&#xA;![furryball][1] &#xD;&#xA; &#xD;&#xA;Rendered with maya&#xD;&#xA;&#xD;&#xA;![maya][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/n4ATo.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/gjWSW.png" />
  <row Id="15423" PostHistoryTypeId="2" PostId="7638" RevisionGUID="07f4ddca-f22b-40c8-959c-983d4164b378" CreationDate="2011-01-24T01:05:08.687" UserId="4690" Text="Many game development companies are less formal in terms of workplace attire than other types of software development houses. For example, I know that one place at which I will be interviewing soon has a predominant workplace culture of jeans and polos or t-shirts. &#xD;&#xA;&#xD;&#xA;Should I wear a suit? Shirt and tie? Shirt and sport jacket, with or without tie? I want to show that I'm serious about the job, but that I understand the culture, too." />
  <row Id="15424" PostHistoryTypeId="1" PostId="7638" RevisionGUID="07f4ddca-f22b-40c8-959c-983d4164b378" CreationDate="2011-01-24T01:05:08.687" UserId="4690" Text="What should I wear to a job interview with a game development company?" />
  <row Id="15425" PostHistoryTypeId="3" PostId="7638" RevisionGUID="07f4ddca-f22b-40c8-959c-983d4164b378" CreationDate="2011-01-24T01:05:08.687" UserId="4690" Text="&lt;jobs&gt;" />
  <row Id="15426" PostHistoryTypeId="2" PostId="7639" RevisionGUID="b41fe215-4cd9-4f5b-aabf-eac09d1076cc" CreationDate="2011-01-24T01:14:05.527" UserId="189" Text="[Programming Role-Playing Games with DirectX][1] walks through creating what the author calls a &quot;Mad Lib Script System&quot;, complete with the editor and the module of the engine that is created over the course of the book. It would surely take some tweaking and doesn't generate LUA so it might be totally unrelated to what you need, but on the other hand, its functionality sounds a lot like what you describe: It takes a dictionary of different possible actions, and then scripts can be created which are just lists of the actions with the blanks filled in, like a [Mad Lib][2]. It's made to be extremely user friendly.&#xD;&#xA;&#xD;&#xA;Here is a screenshot. I could not find the code online but it does come in full on the book's CD-ROM and of course is explained over the course of one of the chapters of the book (Chapter 10). (this is a Windows executable, but I ran it in Wine to take the screenshot, thus the Mac titlebar and old Windows 2000 look)&#xD;&#xA;&#xD;&#xA;![Mad Lib Script Editor][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/exec/obidos/tg/detail/-/159200315X/qid=1094731883/sr=1-2/ref=sr_1_2/002-5963551-4379228?v=glance&amp;s=books&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Mad_Lib&#xD;&#xA;  [3]: http://i.stack.imgur.com/b7peY.png" />
  <row Id="15427" PostHistoryTypeId="25" PostId="7635" RevisionGUID="09d6ad28-50ee-41a1-a887-cf146c571936" CreationDate="2011-01-24T01:55:44.073" Comment="http://twitter.com/#!/StackGameDev/status/29356643787476993" />
  <row Id="15428" PostHistoryTypeId="10" PostId="7638" RevisionGUID="ea3b5731-fa3c-468e-a003-06ecbc930565" CreationDate="2011-01-24T02:06:26.327" UserId="-1" CloseReasonId="2" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="15429" PostHistoryTypeId="2" PostId="7640" RevisionGUID="fc1bc2e8-9652-47fe-96aa-f448b19c82b4" CreationDate="2011-01-24T02:38:15.250" UserId="1974" Text="I'm trying to get basic frustum culling against an AABB working, and I'm having a bit of trouble figuring out how to extract the frustum planes from my camera's transform matrix. All the example code I've found expects position, look, and up vectors, as you'd pass to gluLookAt. My camera matrix can be transformed by a parent and other bits of code, so those vectors never exist anywhere that I could use them.&#xD;&#xA;&#xD;&#xA;I've looked at code for gluLookAt and tried to graft the inverse of that on top of the Lighthouse3D example for creating the Frustum planes. It's really close to correct, but I have objects flickering in and out of existence still, so something's not quite right. All of the related code is here, so I'm hoping this will be an easy find for somebody.&#xD;&#xA;&#xD;&#xA;    struct Frustum {&#xD;&#xA;      enum {&#xD;&#xA;        TOP,&#xD;&#xA;        BOTTOM,&#xD;&#xA;        LEFT,&#xD;&#xA;        RIGHT,&#xD;&#xA;        NEAR,&#xD;&#xA;        FAR&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;      Frustum(hsMatrix44 cam, float znear, float zfar, float angle, float aspect) {&#xD;&#xA;        float nw, nh, fw, fh, tang;&#xD;&#xA;        tang = (float)tan(angle * 0.5);&#xD;&#xA;        nh = znear * tang;&#xD;&#xA;        nw = nh * aspect; &#xD;&#xA;        fh = zfar  * tang;&#xD;&#xA;        fw = fh * angle;&#xD;&#xA;&#xD;&#xA;        hsVector3 dir,nc,fc,X,Y,Z,P,U;&#xD;&#xA;        hsVector3 ntl,ntr,nbl,nbr,ftl,ftr,fbl,fbr;&#xD;&#xA;&#xD;&#xA;        Z.X = -cam(2,0);&#xD;&#xA;        Z.Y = -cam(2,1);&#xD;&#xA;        Z.Z = -cam(2,2);&#xD;&#xA;        U.X = cam(1,0);&#xD;&#xA;        U.Y = cam(1,1);&#xD;&#xA;        U.Z = cam(1,2);&#xD;&#xA;        X = U.crossP(Z);&#xD;&#xA;        X = X * (1.f/X.magnitude());&#xD;&#xA;        Y = Z.crossP(X);&#xD;&#xA;        hsMatrix44 icam = cam.inverse();&#xD;&#xA;        P.X = icam(0,3);&#xD;&#xA;        P.Y = icam(1,3);&#xD;&#xA;        P.Z = icam(2,3);&#xD;&#xA;        nc = P - Z * znear;&#xD;&#xA;        fc = P - Z * zfar;&#xD;&#xA;&#xD;&#xA;        ntl = nc + Y * nh - X * nw;&#xD;&#xA;        ntr = nc + Y * nh + X * nw;&#xD;&#xA;        nbl = nc - Y * nh - X * nw;&#xD;&#xA;        nbr = nc - Y * nh + X * nw;&#xD;&#xA;        ftl = fc + Y * fh - X * fw;&#xD;&#xA;        ftr = fc + Y * fh + X * fw;&#xD;&#xA;        fbl = fc - Y * fh - X * fw;&#xD;&#xA;        fbr = fc - Y * fh + X * fw;&#xD;&#xA;&#xD;&#xA;        planes[TOP] = planeFromPoints(ntr, ntl, ftl);&#xD;&#xA;        planes[BOTTOM] = planeFromPoints(nbl, nbr, fbr);&#xD;&#xA;        planes[LEFT] = planeFromPoints(ntl, nbl, fbl);&#xD;&#xA;        planes[RIGHT] = planeFromPoints(nbr, ntr, fbr);&#xD;&#xA;        planes[NEAR] = planeFromPoints(ntl, ntr, nbr);&#xD;&#xA;        planes[FAR] = planeFromPoints(ftr, ftl, fbl);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      bool checkBox(const hsBounds3Ext&amp; box) {&#xD;&#xA;        for(int i = 0; i &lt; 6; ++i) {&#xD;&#xA;          float d0, d1;&#xD;&#xA;          d0 = planes[i].W + planes[i].N.dotP(box.getMins());&#xD;&#xA;          d1 = planes[i].W + planes[i].N.dotP(box.getMaxs());&#xD;&#xA;          if((d0 &lt; 0.f) &amp;&amp; (d1 &lt; 0.f))&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      hsPlane3 planes[6];&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    hsPlane3 planeFromPoints(hsVector3 a, hsVector3 b, hsVector3 c) {&#xD;&#xA;      hsPlane3 p;&#xD;&#xA;      hsVector3 tmp0, tmp1;&#xD;&#xA;      tmp0 = a - b;&#xD;&#xA;      tmp1 = c - b;&#xD;&#xA;      p.N = tmp1.crossP(tmp0);&#xD;&#xA;      p.N = p.N * (1.f/p.N.magnitude());&#xD;&#xA;      p.W = -(p.N.dotP(b));&#xD;&#xA;      return p;&#xD;&#xA;    }" />
  <row Id="15430" PostHistoryTypeId="1" PostId="7640" RevisionGUID="fc1bc2e8-9652-47fe-96aa-f448b19c82b4" CreationDate="2011-01-24T02:38:15.250" UserId="1974" Text="Calculating camera frustum planes using existing matrix" />
  <row Id="15431" PostHistoryTypeId="3" PostId="7640" RevisionGUID="fc1bc2e8-9652-47fe-96aa-f448b19c82b4" CreationDate="2011-01-24T02:38:15.250" UserId="1974" Text="&lt;camera&gt;&lt;culling&gt;&lt;frustum&gt;" />
  <row Id="15432" PostHistoryTypeId="2" PostId="7641" RevisionGUID="b0a99a34-68a9-457d-a9d4-f502c2f97e43" CreationDate="2011-01-24T03:09:32.297" UserId="55" Text="An Objective-C solution for the curious: [Cocos Live][1] is free for leaderboards. I've used it previously for an iOS project of mine. It's a stand-alone library that takes advantage of Google App Engine on it's end. They don't charge you anything until your game is really, really pushing a LOT of scores (then they'll probably ask).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocoslive.net/faq" />
  <row Id="15433" PostHistoryTypeId="5" PostId="7641" RevisionGUID="f87c0788-d2bf-4030-b572-cbc09e9d0946" CreationDate="2011-01-24T03:15:10.777" UserId="55" Comment="added 143 characters in body" Text="An Objective-C solution for the curious: [Cocos Live][1] is free for leaderboards. I've used it previously for an iOS project of mine. It's a stand-alone library that takes advantage of Google App Engine on it's end. They don't charge you anything until your game is really, really pushing a LOT of scores (then they'll probably ask).&#xD;&#xA;&#xD;&#xA;Alternatively, it would be very simple for you to roll your own using Google App Engine. You could implement some basic security if needed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocoslive.net/faq" />
  <row Id="15434" PostHistoryTypeId="2" PostId="7642" RevisionGUID="d085a352-5dec-4602-a218-f65c45c38a81" CreationDate="2011-01-24T03:19:13.797" UserId="2332" Text="As mentioned by others, the best way is to get the a beta out there and gather community feedback to get reliable results.&#xD;&#xA;&#xD;&#xA;I'd also like to suggest the use of ESXi. It's a Virtual Machine solution from VMWare. Don't be put off because it's a VM solution. ESX is a lot more low level.&#xD;&#xA;&#xD;&#xA;It's basically its own very slimmed down operating system that you can install other operating systems on top of. We use it at work for compatibility among a great deal of OS's. It's very fast and reliable, almost as responsive as a vanilla machine.&#xD;&#xA;&#xD;&#xA;I know hardware requirements is what you're looking for and ESXi has a very nice feature where you can limit the amount of RAM, CPU or disk space usage by the operating system and could potentially emulate how your game would run on anything from a low end CPU or low memory, to top-end CPU or memory use (limited by your actual hardware).&#xD;&#xA;&#xD;&#xA;So if you had quite a high spec PC you could install ESXi on it, install whatever operating systems you wanted to and play around with the CPU and Memory usage (I believe you can even modify the number of cores the OS uses as well!)&#xD;&#xA;&#xD;&#xA;Here's a link to it: http://www.vmware.com/products/vsphere-hypervisor/index.html&#xD;&#xA;&#xD;&#xA;Best thing about it? It's 100% free!" />
  <row Id="15435" PostHistoryTypeId="5" PostId="7641" RevisionGUID="3874d469-d40a-4f15-9915-b5f20a48f5ef" CreationDate="2011-01-24T03:22:39.707" UserId="55" Comment="added 140 characters in body; deleted 28 characters in body" Text="Well, it would be relatively simple for you to roll your own basic system using Google App Engine. You could implement some basic security if needed. Most likely, this is probably what you will need to do unless you find an SDK, like Steamworks, that include such a thing.&#xD;&#xA;&#xD;&#xA;Objective-C Solution: [Cocos Live][1] is free for leaderboards. I've used it previously for an iOS project of mine. It's a stand-alone library that takes advantage of Google App Engine on it's end. They don't charge you anything until your game is really, really pushing a LOT of scores (then they'll probably ask).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocoslive.net/faq" />
  <row Id="15436" PostHistoryTypeId="5" PostId="7642" RevisionGUID="00d98e1d-1a13-4672-bce0-62cce688c405" CreationDate="2011-01-24T03:24:32.683" UserId="2332" Comment="added 214 characters in body" Text="As mentioned by others, the best way is to get the a beta out there and gather community feedback to get reliable results.&#xD;&#xA;&#xD;&#xA;I'd also like to suggest the use of ESXi. It's a Virtual Machine solution from VMWare. Don't be put off because it's a VM solution. ESX is a lot more low level.&#xD;&#xA;&#xD;&#xA;This would probably be ideal to you since you have one machine. You can test different operating systems, hardware setups (bar the graphics hardware, ESXi would use whatever you have installed on your machine).&#xD;&#xA;&#xD;&#xA;It's basically its own very slimmed down operating system that you can install other operating systems on top of. We use it at work for compatibility among a great deal of OS's. It's very fast and reliable, almost as responsive as a vanilla machine.&#xD;&#xA;&#xD;&#xA;I know hardware requirements is what you're looking for and ESXi has a very nice feature where you can limit the amount of RAM, CPU or disk space usage by the operating system and could potentially emulate how your game would run on anything from a low end CPU or low memory, to top-end CPU or memory use (limited by your actual hardware).&#xD;&#xA;&#xD;&#xA;So if you had quite a high spec PC you could install ESXi on it, install whatever operating systems you wanted to and play around with the CPU and Memory usage (I believe you can even modify the number of cores the OS uses as well!)&#xD;&#xA;&#xD;&#xA;Here's a link to it: http://www.vmware.com/products/vsphere-hypervisor/index.html&#xD;&#xA;&#xD;&#xA;Best thing about it? It's 100% free!" />
  <row Id="15437" PostHistoryTypeId="2" PostId="7643" RevisionGUID="164e3e3a-bf97-4e04-b696-90f1897d9c95" CreationDate="2011-01-24T03:32:33.467" UserId="2332" Text="I would probably create your own editor. You can use C# or something similar to create a very simple windows application.&#xD;&#xA;&#xD;&#xA;If you want to abstract away from having to script things using text, you can take a graphical approach (i.e. using buttons to add a goal). The only things that I would have as textual input are conditions, values, etc.&#xD;&#xA;&#xD;&#xA;Firstly, I'd look over your LUA scripts, find the common elements and isolate them.&#xD;&#xA;&#xD;&#xA;Then look at all the possible actions or goals that make up a quest and add a combo box with all those possible actions.&#xD;&#xA;&#xD;&#xA;So for example, the quest is to kill 10 zombies, the workflow I would imagine is this:&#xD;&#xA;&#xD;&#xA; 1. Select &quot;Kill&quot; from Goals combo box&#xD;&#xA; 2. Another combo box appears with a list of enemies, select &quot;Zombie&quot;&#xD;&#xA; 3. Enter the condition in the condition textbox, so add &quot;10&quot;.&#xD;&#xA; 4. Click &quot;Add Goal&quot;&#xD;&#xA; 5. The &quot;Kill 10 Zombies&quot; goal is added to the Quest listbox&#xD;&#xA; 6. If you want to change the sequence, just have some &quot;Move up&quot;, &quot;Move down&quot; buttons&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15438" PostHistoryTypeId="2" PostId="7644" RevisionGUID="1c5f239a-2559-43d4-85c9-38345466cb87" CreationDate="2011-01-24T03:47:22.437" UserId="141" Text="I think the existing answers are very good but I want to posit another possible reason. Disabling save prevents the user from using as a cheap crutch, saving right before taking a serious risk and then reloading their save if they fail. I used to do that all the time in RTS games and it eventually sucked all the challenge out of it. Similarly in console emulators with &quot;save state&quot; functions, you can practically tune your game to be perfect. By disabling save, you preserve the sense of risk vs reward, and make the player think rationally before trying something stupid." />
  <row Id="15439" PostHistoryTypeId="2" PostId="7645" RevisionGUID="7574874a-3288-4d93-a75b-7f1ec5cc0afa" CreationDate="2011-01-24T03:52:53.223" UserId="962" Text="I have been here for bit now, and I have a good feel for what content is appropriate for this stackexchange. I am the 17th in the list of rep for this site. I am a native speaker of the English Language and can help make sense of some posts from people who's native language is obviously not English.&#xD;&#xA;&#xD;&#xA;I visit gamedev.stackexchange.com multiple times per day.&#xD;&#xA;&#xD;&#xA;I am respectful of other members, old members and newbies alike.&#xD;&#xA;&#xD;&#xA;I moderate on reddit.com/r/gaming which is one of the top subreddit on the site.&#xD;&#xA;&#xD;&#xA;I am an independent game developer: Designer, programmer, and artist. My current main project is **Sect of The White Worm** which will be released for PC in 2011." />
  <row Id="15440" PostHistoryTypeId="5" PostId="7643" RevisionGUID="599017c9-639a-42d1-8b99-73ae256f45bf" CreationDate="2011-01-24T04:00:22.123" UserId="2332" Comment="Submitted prematurely" Text="I would probably create your own editor. You can use C# or something similar to create a very simple windows application.&#xD;&#xA;&#xD;&#xA;If you want to abstract away from having to script things using text, you can take a graphical approach (i.e. using buttons to add a goal). The only things that I would have as textual input are conditions, values, etc.&#xD;&#xA;&#xD;&#xA;Firstly, I'd look over your LUA scripts, find the common elements and isolate them.&#xD;&#xA;&#xD;&#xA;Then look at all the possible actions or goals that make up a quest and add a combo box with all those possible actions.&#xD;&#xA;&#xD;&#xA;So for example, the quest is to kill 10 zombies, the workflow I would imagine is this:&#xD;&#xA;&#xD;&#xA; 1. Select &quot;Kill&quot; from Goals combo box&#xD;&#xA; 2. Another combo box appears with a list of enemies, select &quot;Zombie&quot;&#xD;&#xA; 3. Enter the condition in the condition textbox, so add &quot;10&quot;.&#xD;&#xA; 4. Click &quot;Add Goal&quot;&#xD;&#xA; 5. The &quot;Kill 10 Zombies&quot; goal is added to the Quest listbox&#xD;&#xA; 6. If you want to change the sequence, just have some &quot;Move up&quot;, &quot;Move down&quot; buttons&#xD;&#xA;&#xD;&#xA;After you've finished &quot;building&quot; your quest like this, you can then just click the &quot;Compose Script&quot; button and it'll map all the actions you have listed to your LUA code, including the common stuff that you have in every script.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;" />
  <row Id="15441" PostHistoryTypeId="25" PostId="7640" RevisionGUID="2a18b865-ff01-415d-b468-14dd968380f3" CreationDate="2011-01-24T04:55:44.027" Comment="http://twitter.com/#!/StackGameDev/status/29401942274871296" />
  <row Id="15442" PostHistoryTypeId="25" PostId="7589" RevisionGUID="fb6a6dea-1acd-4748-8500-8a8a45e0bf79" CreationDate="2011-01-24T07:55:43.857" Comment="http://twitter.com/#!/StackGameDev/status/29447240204427264" />
  <row Id="15443" PostHistoryTypeId="2" PostId="7646" RevisionGUID="4dfdc992-5c2a-4e74-becb-bb2101e42d1a" CreationDate="2011-01-24T08:02:18.823" UserId="1581" Text="I'm investigating about virtual machines and their use in Games.&#xD;&#xA;&#xD;&#xA;I'm looking for something cross-platform (at least win/mac/linux, mobile and consoles are a nice to have but not mandatory) and it would be nice if it could be binded to the usual things that you need for a game, like a graphics and sound lib. If it had any sort of automatic garbage collection, it would be nice, too. And since I want to use it for games, it should be fast and not very memory-consuming.&#xD;&#xA;&#xD;&#xA;So far I've found:&#xD;&#xA;&#xD;&#xA; - [Parrot VM][1]&#xD;&#xA; - The [Lua Virtual Machine][2] (pdf)&#xD;&#xA; - [V8][3]&#xD;&#xA;&#xD;&#xA;I'm leaving the Java Virtual Machine and .net VM out of this list since I feel they are a bit too big for my purposes - but I'm far from an expert on these things. If you think I should include them, please put your reasons below.&#xD;&#xA;&#xD;&#xA;Am I missing any important one?&#xD;&#xA;&#xD;&#xA;PS: I think this should be a community wiki, but I don't seem to be able to mark it as one.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.parrot.org/&#xD;&#xA;  [2]: http://luaforge.net/docman/view.php/83/98/ANoFrillsIntroToLua51VMInstructions.pdf&#xD;&#xA;  [3]: http://code.google.com/p/v8/" />
  <row Id="15444" PostHistoryTypeId="1" PostId="7646" RevisionGUID="4dfdc992-5c2a-4e74-becb-bb2101e42d1a" CreationDate="2011-01-24T08:02:18.823" UserId="1581" Text="Is there any game-oriented virtual machine out there?" />
  <row Id="15445" PostHistoryTypeId="3" PostId="7646" RevisionGUID="4dfdc992-5c2a-4e74-becb-bb2101e42d1a" CreationDate="2011-01-24T08:02:18.823" UserId="1581" Text="&lt;cross-platform&gt;&lt;libraries&gt;&lt;virtual-machines&gt;" />
  <row Id="15446" PostHistoryTypeId="2" PostId="7647" RevisionGUID="133f496e-a749-4f8c-a04d-1e22c49b284f" CreationDate="2011-01-24T08:20:24.910" UserId="2050" Text="I am using a function to extract the frustum from my Projection and modelview Matrix. This code was developed by a friend of mine using some Maple 5 or something like that. The code is a bit bulky (~10K) and the comments are in german, but it works fine ( i use it for octree-frustum culling in my OpenGL-Application).&#xD;&#xA;&#xD;&#xA;The project is hosted on Sourceforge ( http://sourceforge.net/projects/sumkindaproject/ ).&#xD;&#xA;&#xD;&#xA;The frustum-extraction and checking code is located in the folders inc/frustum.h and src/frustum.cpp&#xD;&#xA;&#xD;&#xA;Please don't mind the nasty coding style in other fiels of this project, since it is more or less an experimental playground app - the Culling however works fine ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15447" PostHistoryTypeId="5" PostId="7647" RevisionGUID="8b70cc87-0e04-4f7e-8c91-ad699aaa1f75" CreationDate="2011-01-24T08:30:45.610" UserId="2050" Comment="edited body" Text="I am using a function to extract the frustum from my Projection and modelview Matrix. This code was developed by a friend of mine using some Maple 5 or something like that. The code is a bit bulky (~10K) and the comments are in german, but it works fine ( i use it for octree-frustum culling in my OpenGL-Application).&#xD;&#xA;&#xD;&#xA;The project is hosted on Sourceforge ( http://sourceforge.net/projects/sumkindaproject/ ).&#xD;&#xA;&#xD;&#xA;The frustum-extraction and checking code is located in the folders inc/frustum.h and src/frustum.cpp&#xD;&#xA;&#xD;&#xA;Please don't mind the nasty coding style in other files of this project, since it is more or less an experimental playground app - the Culling however works fine ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15448" PostHistoryTypeId="2" PostId="7648" RevisionGUID="d96ce817-9c8f-41e3-b68b-851261cba2f7" CreationDate="2011-01-24T08:49:10.610" UserId="4784" Text="The venerable shortest-path graph theoretic algorithm A* and subsequent improvements (e.g., Hierarchical Annotated A*) is clearly the technique of choice for pathfinding in game development. &#xD;&#xA;&#xD;&#xA;Instead, it just seems to me that RL is a more natural paradigm move a character around a game space.&#xD;&#xA;&#xD;&#xA;And yet I'm not aware of a single game developer who has implemented a Reinforcement Learning-based pathfinding engine. (I don't infer from this that the application of RL in pathfinding is 0, just that it's very small relative to A* and friends.)&#xD;&#xA;&#xD;&#xA;Whatever the reason, it's not because these developers are unaware of RL, as evidenced by the fact that RL is frequently used elsewhere in the game engine. &#xD;&#xA;&#xD;&#xA;This question is *not* a pretext for offering an opinion on RL in pathfinding; in fact, i am assuming that the tacit preference for A* et al. over RL is correct--but that preference is not obviously to me and i'm very curious about the reason for it, particularly from anyone who has tried to use RL for pathfinding.&#xD;&#xA;" />
  <row Id="15449" PostHistoryTypeId="1" PostId="7648" RevisionGUID="d96ce817-9c8f-41e3-b68b-851261cba2f7" CreationDate="2011-01-24T08:49:10.610" UserId="4784" Text="Pathfinding--Why is Reinforcement Learning So Rarely Used in Pathfinding?" />
  <row Id="15450" PostHistoryTypeId="3" PostId="7648" RevisionGUID="d96ce817-9c8f-41e3-b68b-851261cba2f7" CreationDate="2011-01-24T08:49:10.610" UserId="4784" Text="&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="15451" PostHistoryTypeId="2" PostId="7649" RevisionGUID="8a2a82fa-cad4-4e5d-a600-3bd0fad7b656" CreationDate="2011-01-24T08:50:20.967" UserId="4838" Text="The only reasons I can think of are that:&#xD;&#xA;&#xD;&#xA; 1. It's difficult to save the state of&#xD;&#xA;    the AI for the enemies and such.&#xD;&#xA; 2. You wish to force a certain method of&#xD;&#xA;    playing upon the players.&#xD;&#xA;&#xD;&#xA;I don't think you should use arguments about being able to save right before you die as a reason why you shouldn't be able to save anywhere or in-combat. As the developer, you can implement auto-saves that kick in around areas where combat is about to break out. That way the player can always go back to before the combat started. You can also let the player have multiple saves, then they can go back to any point that they want if they're using that feature." />
  <row Id="15452" PostHistoryTypeId="5" PostId="7646" RevisionGUID="9e09493a-b20e-4f62-8cdf-d036b7170be3" CreationDate="2011-01-24T09:13:53.670" UserId="1581" Comment="added 265 characters in body" Text="I'm investigating about virtual machines and their use in Games.&#xD;&#xA;&#xD;&#xA;I'm looking for something cross-platform (at least win/mac/linux, mobile and consoles are a nice to have but not mandatory) and it would be nice if it could be binded to the usual things that you need for a game, like a graphics and sound lib. If it had any sort of automatic garbage collection, it would be nice, too. And since I want to use it for games, it should be fast and not very memory-consuming.&#xD;&#xA;&#xD;&#xA;So far I've found:&#xD;&#xA;&#xD;&#xA; - [Parrot VM][1]&#xD;&#xA; - The [Lua Virtual Machine][2] (pdf)&#xD;&#xA; - [V8][3]&#xD;&#xA;&#xD;&#xA;I'm leaving the Java Virtual Machine and .net VM out of this list since I feel they are a bit too big for my purposes - but I'm far from an expert on these things. If you think I should include them, please put your reasons below.&#xD;&#xA;&#xD;&#xA;Am I missing any important one?&#xD;&#xA;&#xD;&#xA;PS: I think this should be a community wiki, but I don't seem to be able to mark it as one.&#xD;&#xA;&#xD;&#xA;EDIT: My final objective is creating a scripting language for game development. I've no problem with interpreters (have implemented a couple in the past) but this time I'd like to translate the Abstract Syntax Tree of my language to a VM, for efficiency mostly.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.parrot.org/&#xD;&#xA;  [2]: http://luaforge.net/docman/view.php/83/98/ANoFrillsIntroToLua51VMInstructions.pdf&#xD;&#xA;  [3]: http://code.google.com/p/v8/" />
  <row Id="15453" PostHistoryTypeId="2" PostId="7650" RevisionGUID="e4f41c97-0444-4843-9501-286c9af1bca3" CreationDate="2011-01-24T09:21:29.740" UserId="51" Text="Without knowing much about RL, I'll attempt to answer your question with other questions:&#xD;&#xA;&#xD;&#xA;Using RL, can you determine if it's possible to reach point A from point B?  &#xD;&#xA;&#xD;&#xA;Can RL guarantee reproducible/consistent/testable navigation behavior?&#xD;&#xA;&#xD;&#xA;How does memory and CPU run time requirements compare vs. A*?  Likewise, how much can you precompute compared to, say, nav meshes?&#xD;&#xA;&#xD;&#xA;How does RL fair in an environment with dynamic collision?&#xD;&#xA;&#xD;&#xA;How much more difficult is it to understand and implement RL correctly vs, say, steering behaviors?&#xD;&#xA;&#xD;&#xA;Are there any good middleware providers for RL?&#xD;&#xA;&#xD;&#xA;Maybe those questions can help you with your answer." />
  <row Id="15454" PostHistoryTypeId="2" PostId="7651" RevisionGUID="ecf383c3-ef47-4f1c-a15f-a26cb1a24978" CreationDate="2011-01-24T09:32:31.097" UserId="721" Text="As said, you can use [Cocos Live][1] for leaderboards. I used it with android projects (Java and C++). I have rewritten the client part in Java (100 lines). Our C++ client uses [libcurl][2] and [jansson][3].&#xD;&#xA;&#xD;&#xA;Cocos Live uses HTTP commands (REST + Json). So it can be implemented easily in many langages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocoslive.net/&#xD;&#xA;  [2]: http://curl.haxx.se/libcurl/&#xD;&#xA;  [3]: http://www.digip.org/jansson/" />
  <row Id="15455" PostHistoryTypeId="5" PostId="7651" RevisionGUID="51208dc2-1520-43c2-bcd1-fa1b2d967303" CreationDate="2011-01-24T09:38:08.467" UserId="721" Comment="added 218 characters in body" Text="As said, you can use [Cocos Live][1] for leaderboards. I used it with android projects (Java and C++). I have rewritten the client part in Java (100 lines). Our C++ client uses [libcurl][2] and [jansson][3].&#xD;&#xA;&#xD;&#xA;Cocos Live uses HTTP commands (REST + Json). So it can be implemented easily in many langages.&#xD;&#xA;&#xD;&#xA;Cocos live pros:&#xD;&#xA;&#xD;&#xA; * Leaderboard server available if you don't need yours&#xD;&#xA; * Google App Engine available if you need your private leaderboard servers&#xD;&#xA;&#xD;&#xA;Cocos live cons:&#xD;&#xA;&#xD;&#xA; * Not complete as OpenFeint/ScoreLoop..&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocoslive.net/&#xD;&#xA;  [2]: http://curl.haxx.se/libcurl/&#xD;&#xA;  [3]: http://www.digip.org/jansson/" />
  <row Id="15456" PostHistoryTypeId="2" PostId="7652" RevisionGUID="9b744702-546c-4976-8b08-7cf8000edf6b" CreationDate="2011-01-24T10:48:29.440" UserId="4264" Text="&quot;Game oriented virtual machines&quot; have been around just about as long as there has been games. Zork, and other Infocom games, ran on Z-Machine. Whenever the company got the Z-Machine ported onto a new platform (say, c-64), they could easily release their whole portfolio on said platform.&#xD;&#xA;&#xD;&#xA;Later on, companies like Sierra or LucasArts came up with their own (AGI, SCI, SCUMM).&#xD;&#xA;&#xD;&#xA;Those were, however, extremely limited scope VMs for games (interactive fiction in case of infocom and graphic adventure in case of Sierra or LucasArts).&#xD;&#xA;&#xD;&#xA;So what's needed for a game anyway? Steve Wozniak was quoted to say that when he was designing the apple, (or possibly apple II?) he pondered what features a game needs - and the computer was never primarily a game platform. So looking for a VM that aims JUST games seems kind of funny, unless you're targeting some extremely specific game genre.&#xD;&#xA;&#xD;&#xA;As such, the most distributed VMs out there today that are used for games are, I guess, java vm and flash vm." />
  <row Id="15457" PostHistoryTypeId="25" PostId="7648" RevisionGUID="9765a19b-b557-42dd-8f11-57f14890f687" CreationDate="2011-01-24T10:55:44.020" Comment="http://twitter.com/#!/StackGameDev/status/29492538834427904" />
  <row Id="15458" PostHistoryTypeId="2" PostId="7653" RevisionGUID="1340ff63-b0c6-43e4-a78a-e6982f8e1a89" CreationDate="2011-01-24T10:59:00.773" UserId="2361" Text="The [Neoaxis][1] Engine might be an idea.  When I was evaluating it, I recall that part of the demo involved an RTS.  It's general purpose, and may be a little raw for what you want, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.neoaxisgroup.com/" />
  <row Id="15459" PostHistoryTypeId="2" PostId="7654" RevisionGUID="dff13deb-2c0b-49b8-bd8d-14193fbf0be8" CreationDate="2011-01-24T12:35:56.073" UserId="4191" Text="I would imagine it's because, since you won't get any useful generalization of policy out of anything but toy problems, and the reward function is going to look suspiciously like an A* heuristic, the prospect of using RL tends to look like a really overbuilt, inefficient way of getting results that are identical with A*'s at best, but probably aren't going to be nearly that good.&#xD;&#xA;&#xD;&#xA;This may be unfair to RL, and if so I'd be interested in hearing why, but I'm not really seeing anything to indicate that.&#xD;&#xA;&#xD;&#xA;Many of us also remember what pathfinding was like in games before widespread adoption of A*, and aren't eager to inflict anything resembling those days on players, or suffer the market consequences of doing so." />
  <row Id="15460" PostHistoryTypeId="2" PostId="7655" RevisionGUID="46d0f936-7bae-493e-9baf-ccfa36295023" CreationDate="2011-01-24T13:11:40.687" UserId="3818" Text="I've been planning for a long time to mix data from OpenStreetMap, some digital elevation model (heightmap), satellite imagery for textures, and cook a racing/cruising game where I could drive around familiar parts of the city. &#xD;&#xA;&#xD;&#xA;OpenStreetMap contains very nice and detailed maps of all the locations I've checked, so I imagine it won't be so hard to download data for a specified region, like Boone County, Nebraska and stuff them into the game. I could generate buildings in 3d somewhat, as they have defined contour in OpenStreetMap. Roads would be the easiest thing to do as they are the core part of OSM.&#xD;&#xA;&#xD;&#xA;What I'm worried about is the game/&quot;simulator&quot; part. I don't know where particularly to start. I suppose I would have to generate a lot of this world during the loading / on the fly. I don't even know if there is anything racing/vehicular-like out there available to use, except for the XNA Racing Game. I'm employed as C# developer, so I'm skilled in that language, but I'd be willing to venture into Python or something similar, if it would increase productivity in this hobby project. &#xD;&#xA;&#xD;&#xA;Can you recommend me some engines worth looking into?" />
  <row Id="15461" PostHistoryTypeId="1" PostId="7655" RevisionGUID="46d0f936-7bae-493e-9baf-ccfa36295023" CreationDate="2011-01-24T13:11:40.687" UserId="3818" Text="Game engine for  &quot;racing&quot; game" />
  <row Id="15462" PostHistoryTypeId="3" PostId="7655" RevisionGUID="46d0f936-7bae-493e-9baf-ccfa36295023" CreationDate="2011-01-24T13:11:40.687" UserId="3818" Text="&lt;racing&gt;" />
  <row Id="15463" PostHistoryTypeId="5" PostId="7551" RevisionGUID="6aa80fc9-5b33-40a8-8117-a6cd60f4bce7" CreationDate="2011-01-24T13:38:58.547" UserId="1562" Comment="Added another example of a game that heavily relies on a scripting language" Text="To the best of my knowledge Relic's Essence Engine Series (as used in *Company of Heroes* and *Dawn of War II*) uses Lua or a dialect of it for unit stats and mission scripting. There are no real web sources for it, but you could always check out some of the mods at [RelicNews.com][1] to ask your way around if you are interested.&#xD;&#xA;&#xD;&#xA;The [Spark Engine][2] by Unknown Worlds as used in their upcoming game *Natural Selection 2* allows most of the game code to be in Lua as far as I know. The SDK comes with the game pre-order and is currently in beta as is the game.&#xD;&#xA;&#xD;&#xA;Another game that was once promoted heavily relying on Lua would be [Eufloria][3] (formerly [Dyson][4]). There is a Lua modding reference on their forums as well.&#xD;&#xA;&#xD;&#xA;Valve's free co-op game [Alien Swarm][5] heavily uses a scripting language called &quot;Squirrel&quot; that has been influenced by Lua. The Alien Swarm SDK should be available for download on Steam. ([Dev wiki][6])&#xD;&#xA;&#xD;&#xA;EDIT: How could I have forgotten about [World in Conflict][7]!&#xD;&#xA;The game does a whole lot of stuff in Python as becomes obvious when looking at mods like the Modern Warfare Mod that implement completely new mechanics.&#xD;&#xA;&#xD;&#xA; - [Modern Warfare Mod Community&#xD;&#xA;   Facebook-Page][8] &#xD;&#xA; - [Official World in Conflict Modding Forum][9]&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.relicnews.com/&#xD;&#xA;  [2]: http://www.unknownworlds.com/ns2/spark/&#xD;&#xA;  [3]: http://eufloria-game.com/news.php&#xD;&#xA;  [4]: http://dyson-game.com/smf/index.php?board=3.0&#xD;&#xA;  [5]: http://alienswarm.com&#xD;&#xA;  [6]: http://developer.valvesoftware.com/wiki/Category:Alien_Swarm&#xD;&#xA;  [7]: http://massgate.net/&#xD;&#xA;  [8]: http://www.facebook.com/pages/WiC-MW-Mod/278172278829?v=wall&amp;ref=mf&#xD;&#xA;  [9]: http://www.massgate.net/list.php?39454" />
  <row Id="15464" PostHistoryTypeId="2" PostId="7656" RevisionGUID="e92a3d1a-fe38-45c2-a62b-d87a0dc7871d" CreationDate="2011-01-24T14:05:34.800" UserId="2332" Text="Pathfinding is a relatively &quot;solved&quot; problem, RL is not. &#xD;&#xA;&#xD;&#xA;With A*, developers can create heuristics quickly and improve them over time. RL (I'm talking about Q-Learning, when referring to RL here), takes time to compute the best learning rates and discount factors (time worth spending on other aspects of the game)." />
  <row Id="15465" PostHistoryTypeId="2" PostId="7657" RevisionGUID="391024b5-8011-4363-89e3-9582ee0d030b" CreationDate="2011-01-24T14:23:14.263" UserId="2778" Text="I'm actually an industrial systems developer with knowledge of .NET C# and VB.NET, C/C++, Delphi, and an intermediate knowledge of 80286 Intel assembly language.&#xD;&#xA;&#xD;&#xA;I would be interested to learn how to develop games while taking as fully as possible advantage of my already acquired experience.&#xD;&#xA;&#xD;&#xA;My first objective is to learn the differences between management and game software development so that I may make my mind up as to what is important to think about as a game developer.&#xD;&#xA;&#xD;&#xA;Any hint as to where to start to learn is appreciated, such as game writing tutorials, the kind of &quot;Hello World!&quot; program, if I may say.&#xD;&#xA;&#xD;&#xA;The answer that will have guided me the most will be accepted. Thanks for your help! =)" />
  <row Id="15466" PostHistoryTypeId="1" PostId="7657" RevisionGUID="391024b5-8011-4363-89e3-9582ee0d030b" CreationDate="2011-01-24T14:23:14.263" UserId="2778" Text="Where to start writing games, any tutorials or the like?" />
  <row Id="15467" PostHistoryTypeId="3" PostId="7657" RevisionGUID="391024b5-8011-4363-89e3-9582ee0d030b" CreationDate="2011-01-24T14:23:14.263" UserId="2778" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;tutorials&gt;&lt;hobby-development&gt;&lt;learning&gt;" />
  <row Id="15470" PostHistoryTypeId="2" PostId="7659" RevisionGUID="c1a97f0d-e042-4c3b-806a-1bd8303d0ff6" CreationDate="2011-01-24T14:39:21.747" UserId="2332" Text="With your .NET experience, I'd suggest getting read up on XNA. It's a .NET framework for creating games on Windows, Xbox 360, and Windows Phone 7.&#xD;&#xA;&#xD;&#xA;The &quot;Hello World&quot; of the games world is probably a very simple game like Pong or Breakout. There are plenty of tutorial on XNA:&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/tutorial/2d_chapter_1&#xD;&#xA;&#xD;&#xA;http://www.riemers.net/&#xD;&#xA;&#xD;&#xA;And check out the http://www.gamedev.net forums as they currently have an XNA 4.0 workshop going on.&#xD;&#xA;&#xD;&#xA;That's just a taster of what you can do and getting a basic sense of game architecture. I'd recommend getting Game Coding Complete (any edition) by Mike McShaffry. It offers a good overview of all aspects of game development without bombarding you with irrelevant facts.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray" />
  <row Id="15471" PostHistoryTypeId="5" PostId="7657" RevisionGUID="d3a46e0e-2c74-47d7-8ceb-b75ea262ac6e" CreationDate="2011-01-24T14:40:42.627" UserId="2778" Comment="added 682 characters in body; edited title; added 112 characters in body" Text="I'm actually an industrial systems developer with knowledge of .NET C# and VB.NET, C/C++, Delphi, and an intermediate knowledge of 80286 Intel assembly language. Plus, I have more than 6 years of experience in professional programming, and more than 12 years as a hobbyist.&#xD;&#xA;&#xD;&#xA;I would be interested to learn how to develop games while taking as fully as possible advantage of my already acquired experience.&#xD;&#xA;&#xD;&#xA;My first objective is to learn the differences between management and game software development so that I may make my mind up as to what is important to think about as a game developer.&#xD;&#xA;&#xD;&#xA;These following tutorials were found while &quot;googling&quot;:&#xD;&#xA;&#xD;&#xA;1. [C++ Game Programming][1];&#xD;&#xA;2. [C and C++ Programming Games and Entertainment Tutorials][2];&#xD;&#xA;3. [C++ Game Programming Resource Center][3];&#xD;&#xA;4. [Creating a game in C++][4].&#xD;&#xA; &#xD;&#xA;Any hint as to where to start to learn is appreciated, such as game writing tutorials, the kind of &quot;Hello World!&quot; program, if I may say. Other and perhaps better tutorials than the one found here are also appreciated.&#xD;&#xA;&#xD;&#xA;The answer that will have guided me the most will be accepted. Thanks for your help! =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cppgameprogramming.com/cgi/nav.cgi?page=index&#xD;&#xA;  [2]: http://www.tutorialized.com/tutorials/C-and-Cpp/Games-and-Entertainment/1&#xD;&#xA;  [3]: http://www.deitel.com/ResourceCenters/Programming/CGameProgramming/CGameProgrammingTutorialsandArticles/tabid/1533/Default.aspx&#xD;&#xA;  [4]: http://www.dreamincode.net/forums/topic/42855-creating-a-game-in-c/" />
  <row Id="15472" PostHistoryTypeId="4" PostId="7657" RevisionGUID="d3a46e0e-2c74-47d7-8ceb-b75ea262ac6e" CreationDate="2011-01-24T14:40:42.627" UserId="2778" Comment="added 682 characters in body; edited title; added 112 characters in body" Text="Are these tutorials any good, and are there better tutorials to get faster on track to writing my first game?" />
  <row Id="15473" PostHistoryTypeId="2" PostId="7660" RevisionGUID="08e095fc-5841-46ba-86b7-1942d3c1ea48" CreationDate="2011-01-24T14:51:03.813" UserId="2778" Text="God knows I am no graphics designer! Aside, I'm a good developer with much experience.&#xD;&#xA;&#xD;&#xA;So, my quesiton is the following:&#xD;&#xA;&#xD;&#xA;Are any 3D-design skills required for game development?&#xD;&#xA;&#xD;&#xA;If no, how to write a game with 3D characters without having to design them? (Not sure if this even make sense to ask! =S)&#xD;&#xA;&#xD;&#xA;Thanks! =)" />
  <row Id="15474" PostHistoryTypeId="1" PostId="7660" RevisionGUID="08e095fc-5841-46ba-86b7-1942d3c1ea48" CreationDate="2011-01-24T14:51:03.813" UserId="2778" Text="Are any 3D-design skills required for game development?" />
  <row Id="15475" PostHistoryTypeId="3" PostId="7660" RevisionGUID="08e095fc-5841-46ba-86b7-1942d3c1ea48" CreationDate="2011-01-24T14:51:03.813" UserId="2778" Text="&lt;game-design&gt;&lt;3d&gt;&lt;3d-engines&gt;&lt;character&gt;" />
  <row Id="15476" PostHistoryTypeId="2" PostId="7661" RevisionGUID="c281c74e-b36b-4a03-be30-cdd852469777" CreationDate="2011-01-24T14:56:46.983" UserId="4264" Text="Like with just about any skill, like math, the answer is no, it's not required, but it helps.&#xD;&#xA;&#xD;&#xA;So how do you cope with it? You find someone who has the skills required to help you. Or design something that does not require said skills, like in this case, a 2d game." />
  <row Id="15477" PostHistoryTypeId="2" PostId="7662" RevisionGUID="f913aa1a-0ed4-4aeb-bed3-e5bc4d0f2374" CreationDate="2011-01-24T15:26:51.553" UserId="51" Text="Personally I don't think there's that much special about racing games that makes them that specific to choose engines for.&#xD;&#xA;&#xD;&#xA;I would think that things like cost, language, platforms, art pipeline, etc. are more relevant to the topic at hand.  Since there are at least a dozen &quot;what engine should I use for game type X&quot; questions out there I'm not going to rehash the same answers over and over.&#xD;&#xA;&#xD;&#xA;A lot of the problems with making a game can be solved by not picking a design that requires advanced features.  Don't try to make a racing game with Forza-style ultra realistic physics.  Don't try to make a game where there are streaming levels or procedurally generated levels.  Solve the &quot;make the game fun&quot; part first, then add the complicated features.  Pretty much any engine with some kind of middleware can be used to some success to make a car work.  Visibility problems and solutions (occlusion culling, mainly) are going to be similar in pretty much all engines.&#xD;&#xA;&#xD;&#xA;All that being said, if you're completely floundering about, the Unity guys put together a sample project with a pair of cars that would get you up and running pretty quickly, and the Unity engine itself is easy to use.  See http://blogs.unity3d.com/2010/04/24/car-tutorial/" />
  <row Id="15478" PostHistoryTypeId="6" PostId="7655" RevisionGUID="8028fd88-cd8a-4d6d-af12-c35a64210c78" CreationDate="2011-01-24T15:28:18.527" UserId="51" Comment="edited tags" Text="&lt;3d-engines&gt;&lt;racing&gt;" />
  <row Id="15479" PostHistoryTypeId="2" PostId="7663" RevisionGUID="79d39ce5-43cc-4cb7-9996-8ef9bd18b7c9" CreationDate="2011-01-24T15:31:52.037" UserId="4851" Text="I'm developing a Real-Time game which should hold thousands of players in real-time (FPS like. max 1s lag). What would be the best infrastructure for this?&#xD;&#xA;&#xD;&#xA;My idea was using 2 server clusters - one for the Server End (all the computing side) and one for the Database end, where a load balancer is &quot;responsible&quot; for each of the clusters. One main server will receive the requests from the users and send back the IP address of the relevant server that the user can work this.&#xD;&#xA;&#xD;&#xA;The database cluster will use database replication for consistency between the databases.&#xD;&#xA;&#xD;&#xA;There should be a geographical load balancer as well - so it will assign the regional load balancer to each user for best response.&#xD;&#xA;&#xD;&#xA;I'm using .NET + MSSQL for the game.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;" />
  <row Id="15480" PostHistoryTypeId="1" PostId="7663" RevisionGUID="79d39ce5-43cc-4cb7-9996-8ef9bd18b7c9" CreationDate="2011-01-24T15:31:52.037" UserId="4851" Text="What's the best server architecture for real-time games?" />
  <row Id="15481" PostHistoryTypeId="3" PostId="7663" RevisionGUID="79d39ce5-43cc-4cb7-9996-8ef9bd18b7c9" CreationDate="2011-01-24T15:31:52.037" UserId="4851" Text="&lt;server&gt;&lt;client-server&gt;&lt;.net&gt;" />
  <row Id="15482" PostHistoryTypeId="5" PostId="7659" RevisionGUID="389e16a6-ea6f-4b15-8770-808710a8b6e4" CreationDate="2011-01-24T15:39:29.927" UserId="2332" Comment="added 737 characters in body" Text="With your .NET experience, I'd suggest getting read up on XNA. It's a .NET framework for creating games on Windows, Xbox 360, and Windows Phone 7.&#xD;&#xA;&#xD;&#xA;The &quot;Hello World&quot; of the games world is probably a very simple game like Pong or Breakout. There are plenty of tutorial on XNA:&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/tutorial/2d_chapter_1&#xD;&#xA;&#xD;&#xA;http://www.riemers.net/&#xD;&#xA;&#xD;&#xA;And check out the http://www.gamedev.net forums as they currently have an XNA 4.0 workshop going on.&#xD;&#xA;&#xD;&#xA;That's just a taster of what you can do and getting a basic sense of game architecture. I'd recommend getting Game Coding Complete (any edition) by Mike McShaffry. It offers a good overview of all aspects of game development without bombarding you with irrelevant facts.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;With regards to the tutorials that you have found, personally, I don't like the look of http://www.cppgameprogramming.com Simply because it looks like a C++ wrapped around C. If you're using C++, I'm of the opinion that you should be using the object-oriented features in C++.&#xD;&#xA;&#xD;&#xA;I haven't used SDL, but have heard a lot of good things about it so I would read up on it and use Jari Komppa's link to it.&#xD;&#xA;&#xD;&#xA;The last link is also in C, so I don't think it's completely relevant.&#xD;&#xA;&#xD;&#xA;Just to clarify, I'm not against the use of C for game development at all. I just think a game that is designed using an OOP approach is easier to understand (and therefore implement in code), especially when you're starting out with game dev.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray" />
  <row Id="15483" PostHistoryTypeId="2" PostId="7664" RevisionGUID="b670fb89-19a2-4876-a933-2b439358f9ea" CreationDate="2011-01-24T15:50:53.030" UserId="4854" Text="The question you should ask yourself is why will game developpers want to depend on web technology they do not master and have no control over, current langages allows you even in a web browser to make awesome games ?" />
  <row Id="15484" PostHistoryTypeId="2" PostId="7665" RevisionGUID="ef4072e3-b790-42cc-9ef2-7044bffb94a0" CreationDate="2011-01-24T16:11:07.313" UserId="4856" Text="Yes, but with major caveats.&#xD;&#xA;&#xD;&#xA;You won't have full keyboard control, and for many control freaks, this could be a deal-breaker.  The F-keys for example will likely remain out of reach for quite some time.&#xD;&#xA;&#xD;&#xA;You're not going to be able to hit most browsers, either.  WebGL isn't really well-supported yet, and websocket support is hit-and-miss these days, with some browser vendors enabling it for one version, then disabling it for the next.&#xD;&#xA;&#xD;&#xA;But you can put together something simple, sure.  Throw in some compelling gameplay and it won't matter that the graphics are a little low-key.  Runescape started off pretty simple, and grew into a complex, fun, incredibly popular MMO, back when everyone said that an MMO created in a browser plug-in was a pipe dream.&#xD;&#xA;&#xD;&#xA;An MMO built withing the current limits for browsers that adapts as things change would certainly have a leg-up by the time that browsers are far enough to support a &quot;AAA&quot; MMO." />
  <row Id="15485" PostHistoryTypeId="11" PostId="7638" RevisionGUID="5a33e3ad-6ced-4586-900c-39f601379275" CreationDate="2011-01-24T16:43:28.167" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="15486" PostHistoryTypeId="25" PostId="7663" RevisionGUID="f110b4ab-6f0a-4dbf-b8bf-42fb457c6c94" CreationDate="2011-01-24T16:55:43.820" Comment="http://twitter.com/#!/StackGameDev/status/29583135217811456" />
  <row Id="15487" PostHistoryTypeId="2" PostId="7666" RevisionGUID="80ef084f-7458-41e2-ae9d-808bcfa9ed74" CreationDate="2011-01-24T16:58:45.033" UserId="51" Text="As with a lot of hiring questions, &quot;it depends&quot;.  The human element in hiring can't be ignored.&#xD;&#xA;&#xD;&#xA;That being said, there are a couple of things to keep in mind.&#xD;&#xA;&#xD;&#xA;Are you going to be talking to a big company or a small one?  Bigger companies might have HR personnel who aren't necessarily game developers who do the initial filtering.  They might be more inclined to look at appearances for their opinions on candidates than, say, the art director at a small company simply because they don't have the expertise to really look analytically at someone's portfolio.&#xD;&#xA;&#xD;&#xA;Also, remember just like any other job you're going to be working side by side with people for (hopefully) a long period of time.  First impressions matter. As an interviewer I'm looking for both game development skills and people skills.  Namely, am I going to want to work side-by-side with whoever I'm talking to?  Do they show poor judgement (like wearing an offensive t-shirt to a professional setting where they don't know the audience)?  How's their hygiene?  Dressing sharper might help with those sides of things.  &#xD;&#xA;&#xD;&#xA;But don't dress sharp if you don't know how.  Don't wear a button down shirt that isn't ironed.  Don't put on too much cologne.  And if you're not comfortable in a tie, don't wear one.  An interview is stressful enough as it is, and you don't want your clothes working against you.&#xD;&#xA;&#xD;&#xA;I've interviewed junior candidates that wore suits and ties.  If we thought they were smart (and likely to get the job), we'd poke fun at them a bit.  Mainly just to get the point across that our culture didn't really care about that kind of thing (and, as far as I know, most game companies really don't care).  But generally it didn't count against them.  " />
  <row Id="15488" PostHistoryTypeId="2" PostId="7667" RevisionGUID="b25d3281-e54d-4dc2-ac55-9f682113986a" CreationDate="2011-01-24T17:38:07.517" UserId="2188" Text="Just like for any other job, dress as you would like to dress every day if you get the job.&#xD;&#xA;&#xD;&#xA;You can't complain you have to wear a tie, if you wore one during your interview." />
  <row Id="15489" PostHistoryTypeId="2" PostId="7668" RevisionGUID="0e21732c-0966-423e-adf4-b98916a1aa3d" CreationDate="2011-01-24T18:08:54.607" UserId="4191" Text="Find out how people generally dress there.  Dress one step fancier than that." />
  <row Id="15490" PostHistoryTypeId="2" PostId="7669" RevisionGUID="653a485c-6cb6-4819-a9dd-b3961b8631cc" CreationDate="2011-01-24T18:24:44.010" UserId="2332" Text="Personally, I feel that you should always convey a professional image. You don't have to be completely suited and booted, but you should at least make an effort to wear an ironed shirt and some smart trousers. Regardless of whether you have a small or large games company, even if the culture is to work in T-shirts and jeans, like it is as my place (and many other games companies), first impressions count.&#xD;&#xA;&#xD;&#xA;You don't know who is going to interview you, and it's not always possible to find out exactly how people dress at the company you're going to, so it's always best to paint yourself in a positive light.&#xD;&#xA;&#xD;&#xA;Other general tips for interviews:&#xD;&#xA;&#xD;&#xA; - Check your teeth for food before going in&#xD;&#xA; - Don't smell (either too much cologne, or not enough)&#xD;&#xA; - Relax in the interview and be yourself, but don't go so far as to slouch completely.&#xD;&#xA; - Smile lots and make eye contact" />
  <row Id="15491" PostHistoryTypeId="2" PostId="7670" RevisionGUID="90534f52-c72b-441d-9486-c705e5cb3d48" CreationDate="2011-01-24T18:28:23.567" UserId="656" Text="There isn't a &quot;it depends&quot; on company. You don't get hired based on what you wear, so wear the standard interview gear (e.g. dress shirt, tie and dress shoes). This is universally accepted by all companies and dressing otherwise is running the risk of &quot;it depends&quot; on company." />
  <row Id="15492" PostHistoryTypeId="4" PostId="7648" RevisionGUID="8a37e464-e5f3-4cfc-ae3c-1c0a5cf20065" CreationDate="2011-01-24T19:39:18.830" UserId="1156" Comment="edited title; added 3 characters in body; edited title" Text="Why is Reinforcement Learning so rarely used in pathfinding?" />
  <row Id="15493" PostHistoryTypeId="5" PostId="7648" RevisionGUID="8a37e464-e5f3-4cfc-ae3c-1c0a5cf20065" CreationDate="2011-01-24T19:39:18.830" UserId="1156" Comment="edited title; added 3 characters in body; edited title" Text="The venerable shortest-path graph theoretic algorithm A* and subsequent improvements (e.g., Hierarchical Annotated A*) is clearly the technique of choice for pathfinding in game development. &#xD;&#xA;&#xD;&#xA;Instead, it just seems to me that RL is a more natural paradigm to move a character around a game space.&#xD;&#xA;&#xD;&#xA;And yet I'm not aware of a single game developer who has implemented a Reinforcement Learning-based pathfinding engine. (I don't infer from this that the application of RL in pathfinding is 0, just that it's very small relative to A* and friends.)&#xD;&#xA;&#xD;&#xA;Whatever the reason, it's not because these developers are unaware of RL, as evidenced by the fact that RL is frequently used elsewhere in the game engine. &#xD;&#xA;&#xD;&#xA;This question is *not* a pretext for offering an opinion on RL in pathfinding; in fact, i am assuming that the tacit preference for A* et al. over RL is correct--but that preference is not obviously to me and i'm very curious about the reason for it, particularly from anyone who has tried to use RL for pathfinding.&#xD;&#xA;" />
  <row Id="15494" PostHistoryTypeId="2" PostId="7671" RevisionGUID="bbc266c2-449f-45bb-8fdd-9387877fa73a" CreationDate="2011-01-24T19:43:15.533" UserId="1156" Text="If you can get a copy, [Game Scripting Mastery][1] is a great book for exactly what you want. It goes through the design and implementation of a scripting language for a game, covering everything you need to know.&#xD;&#xA;&#xD;&#xA;It goes from the general reasons to use a scripting language, to writing the **virtual machine and bytecode**, and writing a parser and lexer.&#xD;&#xA;&#xD;&#xA;Of course, it covers a lot more than you want for this question, but I think it would fit perfectly with your current project, if you can afford a copy. ;-)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Scripting-Mastery-Premier-Press-Development/dp/1931841578" />
  <row Id="15495" PostHistoryTypeId="6" PostId="7646" RevisionGUID="d7230842-f506-48f4-8468-2dd74443e79d" CreationDate="2011-01-24T19:45:54.220" UserId="1156" Comment="Not sure why it was tagged virtual-machine twice ;-)" Text="&lt;cross-platform&gt;&lt;libraries&gt;&lt;virtual-machines&gt;" />
  <row Id="15496" PostHistoryTypeId="25" PostId="7660" RevisionGUID="44313460-38f6-43b3-8bcb-67743deadfd5" CreationDate="2011-01-24T19:55:44.110" Comment="http://twitter.com/#!/StackGameDev/status/29628434430824448" />
  <row Id="15497" PostHistoryTypeId="5" PostId="7671" RevisionGUID="56eaa17b-3bf8-4bb1-a79e-8209c9706b0f" CreationDate="2011-01-24T19:59:21.400" UserId="1156" Comment="added 204 characters in body" Text="If you can get a copy, [Game Scripting Mastery][1] is a great book for exactly what you want. It goes through the design and implementation of a scripting language for a game, covering everything you need to know.&#xD;&#xA;&#xD;&#xA;It goes from the general reasons to use a scripting language, to writing the **virtual machine and bytecode**, and writing a parser and lexer.&#xD;&#xA;&#xD;&#xA;Of course, it covers a lot more than you want for this question, but I think it would fit perfectly with your current project, if you can afford a copy. ;-)&#xD;&#xA;&#xD;&#xA;EDIT: This isn't exactly what you're wanting, since you're looking for an out-of-the-box solution. However, if you're interested in rolling your own, it is a great resource. And not skimpy (1250 pages).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Scripting-Mastery-Premier-Press-Development/dp/1931841578" />
  <row Id="15498" PostHistoryTypeId="2" PostId="7672" RevisionGUID="0bafd799-a691-4dbc-b1c1-20a2d603c0d8" CreationDate="2011-01-24T20:05:57.527" UserId="2332" Text="I'm currently writing a 2D AI simulation, but I'm not completely certain how to check whether the position of an agent is within the field of view of another.&#xD;&#xA;&#xD;&#xA;Currently, my world partitioning is simple cell-space partitioning (a grid). I want to use a triangle to represent the field of view, but how can I calculate the cells that intersect with the triangle?&#xD;&#xA;&#xD;&#xA;Similar to this picture:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/mScHK.jpg&#xD;&#xA;&#xD;&#xA;The red areas are the cells I want to calculate, by checking whether the triangle intersects those cells.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="15499" PostHistoryTypeId="1" PostId="7672" RevisionGUID="0bafd799-a691-4dbc-b1c1-20a2d603c0d8" CreationDate="2011-01-24T20:05:57.527" UserId="2332" Text="How to determine which cells in a grid intersect with a given triangle?" />
  <row Id="15500" PostHistoryTypeId="3" PostId="7672" RevisionGUID="0bafd799-a691-4dbc-b1c1-20a2d603c0d8" CreationDate="2011-01-24T20:05:57.527" UserId="2332" Text="&lt;collision-detection&gt;&lt;intersection&gt;" />
  <row Id="15501" PostHistoryTypeId="2" PostId="7673" RevisionGUID="efe09db1-1cab-4f2e-8a36-26be5fafa1e9" CreationDate="2011-01-24T20:34:51.440" UserId="4604" Text="I would put the Java VM back on your list.  It has been used by enterprise programmers for over a decade, has many good libraries that do exactly what you are looking for, and is running between 85 ~ 90 % the speed of compiled native code.  On top of that, Java's reflection API will let you map 'script' classes into java code very easily.&#xD;&#xA;&#xD;&#xA;Yes, it is big, but you only need to use as much of it as you require." />
  <row Id="15502" PostHistoryTypeId="2" PostId="7674" RevisionGUID="740a0efd-f705-46c3-a633-b9f741abd6f0" CreationDate="2011-01-24T20:45:40.260" UserId="51" Text="There's some algorithm work done in the roguelike community that deals with FOV/LOS/lighting in a tile-based world.&#xD;&#xA;&#xD;&#xA;Perhaps you can find something on this page that can be used to help solve your problem: http://roguebasin.roguelikedevelopment.org/index.php?title=Field_of_Vision&#xD;&#xA;&#xD;&#xA;Specifically &quot;Permissive FOV&quot; might be the most applicable to your situation." />
  <row Id="15505" PostHistoryTypeId="2" PostId="7676" RevisionGUID="86d247f9-90d9-4355-b25e-a4ae29430ef8" CreationDate="2011-01-24T21:29:02.000" UserId="4129" Text="Calculate the three corners of your fov triangle, rotate them to be facing the correct way and such, and then do one of:&#xD;&#xA;&#xD;&#xA;1) do a point-in-triangle test for all the potential targets&#xD;&#xA;    &#xD;&#xA;2) calculate the bounding box of the this triangle, and do a point-in-triangle test for all&#xD;&#xA;potential targets in cells in this bounding box - this will be very straightforward code to debug&#xD;&#xA;    &#xD;&#xA;3) 'rasterise' this triangle and check the cells that it 'paints' - likely the most efficient code, but perhaps only marginally as I'd speculate its all dominated by cache miss times and depends on how complex your cells are and how occupied they are.&#xD;&#xA;&#xD;&#xA;An alternative approach is to render the FOV to an off-screen bitmap and then read the pixel value for each of your objects; you can't 'unmix paint' but with a limited number of objects and by carefully choosing your paint you can deduce who saw who.  This approach is similar to how many games work out what the user clicked on - they draw the scene off-screen using solid colours for the hit-areas.  GPUs are very fast at triangle fill..." />
  <row Id="15506" PostHistoryTypeId="2" PostId="7677" RevisionGUID="e6d0c51b-ff7a-420a-97be-e3dbd091dcbb" CreationDate="2011-01-24T21:30:46.183" UserDisplayName="user4866" Text="There is not a single feature your game requires that would necessitate the need for the Android SDK 2.3 (Ginger bread). For instance, the improvements to the phone camera(s) in the 2.3 sdk will do nothing to improve your game of Pong whatsoever.&#xD;&#xA;&#xD;&#xA;Do your game with Android SDK 1.6. Test it out with a 2.3 emulator, and you'll see that it works just fine on anything 1.6 and above. If you're doing this game to learn OpenGL (which frankly, your simple 2D game doesn't really need either), then you can use OpenGL ES 1.1 within Android 1.6, or if you'd prefer to learn OpenGL ES 2.0 instead, then target Android 2.1.&#xD;&#xA;&#xD;&#xA;My point is: either do 1.6 or 2.1, they will both work as intended on phones and emulators of higher versions, but do not do it on 2.3, there is not only no reason to do so, and the syntax isn't even different, but that needless move would only ensure that your program couldn't run on anything, but  the Nexus S (the only phone that runs Ginger bread right now). " />
  <row Id="15507" PostHistoryTypeId="2" PostId="7678" RevisionGUID="0dc1f877-8399-40ae-b5a8-0e0ddf9a46ad" CreationDate="2011-01-24T21:37:18.873" UserId="378" Text="You might just want to look at a Javascript based &quot;slippy map&quot; library like [Polymaps][1] or [OpenLayers][2]. These already do the kind of tile-based sectioning that you (correctly) surmise would work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://polymaps.org/docs/&#xD;&#xA;  [2]: http://www.openlayers.org/" />
  <row Id="15508" PostHistoryTypeId="2" PostId="7679" RevisionGUID="db6652de-4869-4f8a-a8e6-2f1cd60d3e17" CreationDate="2011-01-24T21:44:16.540" UserId="378" Text="I've written [pretty extensively][1] about implementing &quot;dead zones&quot; in the camera for a side scroller (or top-down game). The dead zone is the area in the center (or sometimes off-center) of the screen where moving your character does not cause the camera to move. This can reduce motion sickness and almost always makes the game feel a little less amateurish than if you completely lock the camera onto the X-axis position of the player. One of the subtle things that can make a side scroller more playable is the value you choose for your left-side or right-side camera buffers!&#xD;&#xA;&#xD;&#xA;For example, I made a short video demonstrating the (very narrow) dead zone in Super Mario Bros 3: http://www.youtube.com/watch?v=89TRXUm8jMI&#xD;&#xA;&#xD;&#xA;If you want to learn the basics of implementing a dead zone, check out the article I wrote that I linked above. For an in-depth explanation of what different kinds of dead zones can make the player feel, check out Steve Swink's book [Game Feel][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://bostongamejams.com/akihabara-tutorials/akihabara-tutorial-part-4-scrolling-map/&#xD;&#xA;  [2]: http://www.game-feel.com/" />
  <row Id="15509" PostHistoryTypeId="5" PostId="7672" RevisionGUID="6ef16c4f-34bf-4ebd-9a2c-f564fb401b98" CreationDate="2011-01-24T22:02:31.057" UserId="2332" Comment="added 187 characters in body" Text="I'm currently writing a 2D AI simulation, but I'm not completely certain how to check whether the position of an agent is within the field of view of another.&#xD;&#xA;&#xD;&#xA;Currently, my world partitioning is simple cell-space partitioning (a grid). I want to use a triangle to represent the field of view, but how can I calculate the cells that intersect with the triangle?&#xD;&#xA;&#xD;&#xA;Similar to this picture:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/mScHK.jpg&#xD;&#xA;&#xD;&#xA;The red areas are the cells I want to calculate, by checking whether the triangle intersects those cells.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Just to add to the confusion (or perhaps even make it easier). Each cell has a min and max vector where the min is the bottom left corner and the max is the top right corner." />
  <row Id="15510" PostHistoryTypeId="5" PostId="7676" RevisionGUID="5a86fa20-ae8d-4ce2-99dd-0e7f88233e58" CreationDate="2011-01-24T22:13:47.423" UserId="4129" Comment="added 507 characters in body" Text="Calculate the three corners of your fov triangle, rotate them to be facing the correct way and such, and then do one of:&#xD;&#xA;&#xD;&#xA;1) do a point-in-triangle test for all the potential targets&#xD;&#xA;    &#xD;&#xA;2) calculate the bounding box of the this triangle, and do a point-in-triangle test for all&#xD;&#xA;potential targets in cells in this bounding box - this will be very straightforward code to debug&#xD;&#xA;&#xD;&#xA;A similar approach is to use a quadtree rather than a grid and do the intersections on that.  If the O(1) tile access is speeding you up, then just testing all the cells in the bounds of the fov triangle for in-triangle ought to be so fast as to be instant.  As you're looking at other options, I presume its not and that the O(1) is actually taking a massive cache miss cost as you thrash your cache.  You could of course perhaps look at prefetch instructions to annotate your bounding box walk with...&#xD;&#xA;    &#xD;&#xA;3) 'rasterise' this triangle and check the cells that it 'paints' - likely the most efficient code, but perhaps only marginally as I'd speculate its all dominated by cache miss times and depends on how complex your cells are and how occupied they are.&#xD;&#xA;&#xD;&#xA;An alternative approach is to render the FOV to an off-screen bitmap and then read the pixel value for each of your objects; you can't 'unmix paint' but with a limited number of objects and by carefully choosing your paint you can deduce who saw who.  This approach is similar to how many games work out what the user clicked on - they draw the scene off-screen using solid colours for the hit-areas.  GPUs are very fast at triangle fill..." />
  <row Id="15511" PostHistoryTypeId="2" PostId="7680" RevisionGUID="edd31252-d3e2-451e-a7e2-47d23aec76aa" CreationDate="2011-01-24T22:34:34.963" UserDisplayName="user4873" Text="I've got a 2D game that I'm working on that is in a single aspect ratio. When I switch it to fullscreen mode on my widescreen monitor it stretches. I tried using two viewports to give a black background to where the game shouldn't stretch to, but that left the game in the same size as before. I couldn't get it to fill the viewport that was supposed to hold the whole game.&#xD;&#xA;&#xD;&#xA;How can I get it to go fullscreen without stretching and without me needing to modify every position and draw statement in the game?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15512" PostHistoryTypeId="1" PostId="7680" RevisionGUID="edd31252-d3e2-451e-a7e2-47d23aec76aa" CreationDate="2011-01-24T22:34:34.963" UserDisplayName="user4873" Text="Going fullscreen without stretching in an XNA game" />
  <row Id="15513" PostHistoryTypeId="3" PostId="7680" RevisionGUID="edd31252-d3e2-451e-a7e2-47d23aec76aa" CreationDate="2011-01-24T22:34:34.963" UserDisplayName="user4873" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="15514" PostHistoryTypeId="2" PostId="7681" RevisionGUID="e9802957-711a-4c90-b941-425ff2cb31be" CreationDate="2011-01-24T22:37:08.673" UserId="2111" Text="I've already looked at some examples from StackOverflow, but I'd like to know if any of you could show concrete examples of job interview questions... Are they different with a job related to game development?" />
  <row Id="15515" PostHistoryTypeId="1" PostId="7681" RevisionGUID="e9802957-711a-4c90-b941-425ff2cb31be" CreationDate="2011-01-24T22:37:08.673" UserId="2111" Text="What are typical job interview questions related to game development?" />
  <row Id="15516" PostHistoryTypeId="3" PostId="7681" RevisionGUID="e9802957-711a-4c90-b941-425ff2cb31be" CreationDate="2011-01-24T22:37:08.673" UserId="2111" Text="&lt;game-industry&gt;&lt;jobs&gt;" />
  <row Id="15517" PostHistoryTypeId="2" PostId="7682" RevisionGUID="98d99a88-0086-4ac1-bcd8-7d72d175539e" CreationDate="2011-01-24T22:41:14.590" UserId="4604" Text="The context of the questions might change, but not really; if you are looking to program, you will still be asked questions that apply to Computer Science in general, including, but not limited to:&#xD;&#xA;&#xD;&#xA; * Mathematics&#xD;&#xA; * Programming Syntax&#xD;&#xA; * Programming Methodology&#xD;&#xA; * Debugging&#xD;&#xA;&#xD;&#xA;At least, I was.  My programming methodology question was phrased in terms of game related terms, such as `ships` and `bullets`, but it was really a design question and a math question." />
  <row Id="15518" PostHistoryTypeId="25" PostId="7680" RevisionGUID="2c4c4861-677a-48fd-9b83-4d51b27b22b9" CreationDate="2011-01-24T22:55:45.373" Comment="http://twitter.com/#!/StackGameDev/status/29673738232406016" />
  <row Id="15521" PostHistoryTypeId="2" PostId="7684" RevisionGUID="837c3a77-642e-4f2a-80c0-b8955588325e" CreationDate="2011-01-24T23:44:38.137" UserId="1198" Text="Disclaimer: my game programming experience is based around client-side single player games, but I have a background in web applications (specifically on the Microsoft stack), so that is where I'm coming from with this answer, I feel that much would apply, but without actual testing a real game server  its difficult to say how it will apply, but here goes. Know this: I haven't deployed a game server, only webapps.&#xD;&#xA;&#xD;&#xA;I would suggest a two (server) tier approach. A database tier and an &quot;application&quot; tier; with the third (presentation) tier being your game client. &#xD;&#xA;&#xD;&#xA;Relational databases, are great at querying data, and decent at writing data. The key is to serialize your database writes into manageable size chunks that your cluster can handle. The more advanced editions (Data center/Enterprise) of SQL Server support clustering and replication. I would start by building a small cluster and running some queries against it to see how it works.&#xD;&#xA;&#xD;&#xA;In the application tier, if you're doing &quot;zoning&quot; or something similar, you can probably get away without setting up any clusters, and simply setup a server per zone. If your zones become to big, you could setup a cluster for each zone.&#xD;&#xA;&#xD;&#xA;You will want to build a serialization process for sending data from application tier --&gt; database tier. The key is to have multiple levels of serialization going on. Something *like* this:&#xD;&#xA;&#xD;&#xA; - Level 1: Save to DB every X seconds, includes critical data:&#xD;&#xA;  - Player Health&#xD;&#xA;  - Player Items/Pickups&#xD;&#xA; - Level 2: Save to DB every 2X seconds, includes medium data:&#xD;&#xA;  - Player locations&#xD;&#xA;  - NPC locations&#xD;&#xA; - Level 3: Everything else, as infrequently as possible&#xD;&#xA;&#xD;&#xA;This will keep your writes consistent and predictable, depending on the nature of your game, you could have infrequent database writes. The key is to realize that if your application server crashed, you'd have to come back online from the state in your database, so serializing player inventory every 90 minutes might make players upset.&#xD;&#xA;&#xD;&#xA;For reading data, you'll want to load as much as possible into memory in the application tier as possible, then insure that all of your code uses this memory pool, in the background you can synchronize the memory pool with the database.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15522" PostHistoryTypeId="2" PostId="7685" RevisionGUID="9a78828f-5fad-45c6-a7b2-003438a1f3c1" CreationDate="2011-01-24T23:49:59.753" UserId="4677" Text="Of course, there are the standard interview questions (programming, personal, etc.). But then there are also the games-related questions, for example: &#xD;&#xA;&#xD;&#xA; - What kinds of games do you like/play?&#xD;&#xA; - What is your favorite game?&#xD;&#xA; - Are you okay with working on genre X?&#xD;&#xA;&#xD;&#xA;Furthermore, they might ask you about specific technologies/APIs/SDKs and what your specialization is (graphics? physics? audio?)." />
  <row Id="15523" PostHistoryTypeId="2" PostId="7686" RevisionGUID="8ff33aa4-af9c-4ccd-8213-527120efea39" CreationDate="2011-01-24T23:53:14.383" UserId="1198" Text="From: http://forums.create.msdn.com/forums/p/58545/358858.aspx (emphasis mine)&#xD;&#xA;&#xD;&#xA;&gt; There is a very simple answer to your&#xD;&#xA;&gt; question: **your monitor is a widescreen&#xD;&#xA;&gt; monitor, if you set a non-widescreen&#xD;&#xA;&gt; resolution to it, it will have to&#xD;&#xA;&gt; stretch the output to give you an image**.&#xD;&#xA;&gt; Some graphics adapters and some&#xD;&#xA;&gt; screens provide a '4:3 in wide' mode&#xD;&#xA;&gt; which destretches for you. &#xD;&#xA;&gt; &#xD;&#xA;&gt; However if you want your game to&#xD;&#xA;&gt; always look right and not be stretched&#xD;&#xA;&gt; you have todo the following:&#xD;&#xA;&gt; &#xD;&#xA;&gt; - Render to a rendertarget instead of to the screen directly &#xD;&#xA;&gt; - Get the texture from the render target &#xD;&#xA;&gt; - Clear the screen to black &#xD;&#xA;&gt; - Start a spritebatch and render your texture at the correct aspectratio on&#xD;&#xA;&gt; screen scale it by using an overload&#xD;&#xA;&gt; that uses the targetRectangle, this&#xD;&#xA;&gt; way you have automatic black borders&#xD;&#xA;&gt; either above or on the sides. &#xD;&#xA;&gt; &#xD;&#xA;&gt; This should be be realy easy to&#xD;&#xA;&gt; implement :)" />
  <row Id="15524" PostHistoryTypeId="2" PostId="7687" RevisionGUID="f7d49a62-18f9-4b3f-a13c-56f907beb854" CreationDate="2011-01-25T00:20:05.193" UserId="2332" Text="You can just set your ProjectionMatrix like so:&#xD;&#xA;&#xD;&#xA;    ProjectionMatrix = Matrix.CreatePerspectiveFieldOfView( MathHelper.PiOver4,&#xD;&#xA;                                                            (float)Game.Window.ClientBounds.Width / (float)Game.Window.ClientBounds.Height,&#xD;&#xA;                                                            1.0f,&#xD;&#xA;                                                            3000.0f );&#xD;&#xA;&#xD;&#xA;This will set your aspect ratio correctly, in whatever screen you're using." />
  <row Id="15525" PostHistoryTypeId="2" PostId="7688" RevisionGUID="fb0cb5e3-2362-47e9-97b3-1cbb1f7b65bf" CreationDate="2011-01-25T00:29:38.210" UserId="3884" Text="I'm using a variation of the scanline algorithm to solve the exact same problem. I started by sorting the three triangle points by their height. I then basically check whether two edges are on the left or on the right side. For the side with two edges, you have to mark they row where you change which edge delimits your rows. For the side with one edge, you can just always use that.&#xD;&#xA;&#xD;&#xA;So then for each row, I know which two edges delimit the it, and I can compute upper and lower bounds in x-direction. It sounds quite complicated, but it condenses down to just a few lines of code. Make sure you handle the special-case where one edge is completely horizontal!" />
  <row Id="15526" PostHistoryTypeId="2" PostId="7689" RevisionGUID="aa2bdc37-3ed1-4b53-852a-d149bc866593" CreationDate="2011-01-25T00:38:04.380" UserId="3794" Text="For the question like this there is great website: [glassdoor.com][1]. It is specialized mostly on inteviews and also offer some other things about companies. Membership is free (or was a half of year ago) if you after some time you spend there fill yours interview in your company. Propably you will find lots of people attending on similar position at similar company.&#xD;&#xA;&#xD;&#xA;And for me as a computer graphics engineer&#xD;&#xA;&#xD;&#xA; - Describe graphic pipeline on gpu (not&#xD;&#xA;   just programmable part, but how it&#xD;&#xA;   really work) &#xD;&#xA; - How would you do ... something related to the game engines (mine was shadows for omni-directional light.) &#xD;&#xA; - shadow mapping, environment mapping, shading models, ambient occlusion ... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.glassdoor.com/index.htm" />
  <row Id="15527" PostHistoryTypeId="2" PostId="7690" RevisionGUID="f5b46c2c-3484-44b3-97c5-e8500b9a5b62" CreationDate="2011-01-25T00:39:37.290" UserId="1101" Text="I'm confused by the suggestion that RL is &quot;a more natural paradigm&quot;. I don't see how reinforcement learning maps to the problem domain anywhere near as cleanly or accurately as graph search does. Typically you don't want an agent to learn - you've assumed that they already know the route. Instead, you want them to pick and use the most direct route available, and graph search facilitates that in a near optimal way. If you were to use RL offline to calculate the best direction to take at any given node for any given destination, that would end up bring broadly equivalent to A*, except requiring significantly more memory* and also requiring that the developers were very careful to ensure that all nodes were adequately explored during training. And that training will just yield a value that we can already approximate very well with the Pythagoras algorithm, due to knowing in advance that the graph obeys Euclidean rules of distance. (This is, of course, not the case for all cases where graph search and/or reinforcement learning may be employed.)&#xD;&#xA;&#xD;&#xA;(Regarding the memory issue: If you had 1000 possible quantised positions on a map, that's 1000 nodes plus 1000 * M edges (where M is the average number of nodes reachable from any other node.) That, plus the heuristic, is enough for A* to operate. For reinforcement learning to work, at least in the way I envisage it, you'd also need 1000 entries for each of those 1000*M edges, to score the reward value of following that edge for any of the 1000 possible destinations. That's a lot of data - and every single bit of it has to be reasonably accurate to avoid loops, detours, or dead-ends." />
  <row Id="15528" PostHistoryTypeId="2" PostId="7691" RevisionGUID="75e2b850-7bf0-4727-83b4-3a28e4775ecc" CreationDate="2011-01-25T00:48:06.340" UserId="4327" Text="How about maintaining a range of columns for each row that are in the triangle?  What you can do is set the min and max column for each row where each point is, and where each triangle line crosses a horizontal row separator line.&#xD;&#xA;&#xD;&#xA;	public class Point&#xD;&#xA;	{&#xD;&#xA;		public float X;&#xD;&#xA;		public float Y;&#xD;&#xA;		public Point(float x, float y) { this.X = x; this.Y = y; }&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public class Line&#xD;&#xA;	{&#xD;&#xA;		float ROW_SIZE = 100f;&#xD;&#xA;		float COL_SIZE = 100f;&#xD;&#xA;&#xD;&#xA;		public Point P1, P2; // P1 has the lowest Y&#xD;&#xA;		public float Slope, Intercept; // set in constructor&#xD;&#xA;		public bool IsVertical;&#xD;&#xA;&#xD;&#xA;		public Line(Point p1, Point p2)&#xD;&#xA;		{&#xD;&#xA;			if (p1.Y &gt; p2.Y) { P1 = p2; P2 = p1; } // p1 has lowest Y&#xD;&#xA;			else { P1 = p1; P2 = p2; }&#xD;&#xA;			IsVertical = (p1.X == p2.X);&#xD;&#xA;			if (!IsVertical) { Slope = (p2.Y - p1.Y) / (p2.X - p1.X); Intercept = p1.Y - Slope * p1.X; }&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		public void ExpandRanges(int[] minCol, int[] maxCol)&#xD;&#xA;		{&#xD;&#xA;			// start out at row, col where P1 is, which has lowest Y&#xD;&#xA;			int row = (int)(P1.Y / ROW_SIZE);&#xD;&#xA;			int col = (int)(P1.X / COL_SIZE);&#xD;&#xA;			int lastRow = (int)(P2.Y / ROW_SIZE);&#xD;&#xA;			int lastCol = (int)(P2.X / COL_SIZE);&#xD;&#xA;&#xD;&#xA;			// expand row to include P1&#xD;&#xA;			minCol[row] = Math.Min(col, minCol[row]); maxCol[row] = Math.Max(col, maxCol[row]);&#xD;&#xA;&#xD;&#xA;			// now we find where our line intercepts each horizontal line up to P2&#xD;&#xA;			float currY = P1.Y;&#xD;&#xA;			float currX = P1.X;&#xD;&#xA;			while (row &lt; lastRow)&#xD;&#xA;			{&#xD;&#xA;				row = row + 1;&#xD;&#xA;				float rowY = row * ROW_SIZE;&#xD;&#xA;				float diffY = rowY - currY;&#xD;&#xA;				float diffX = IsVertical ? 0f : diffY / Slope;&#xD;&#xA;				currY = currY + diffY;&#xD;&#xA;				currX = currX + diffX;&#xD;&#xA;				col = (int)(currX / COL_SIZE);&#xD;&#xA;&#xD;&#xA;				// expand rows above and below dividing line to include point&#xD;&#xA;				minCol[row - 1] = Math.Min(col, minCol[row - 1]);&#xD;&#xA;				maxCol[row - 1] = Math.Max(col, maxCol[row - 1]);&#xD;&#xA;				minCol[row] = Math.Min(col, minCol[row]);&#xD;&#xA;				maxCol[row] = Math.Max(col, maxCol[row]);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			// expand last row to include P2&#xD;&#xA;			minCol[lastRow] = Math.Min(lastCol, minCol[lastRow]);&#xD;&#xA;			maxCol[lastRow] = Math.Max(lastCol, maxCol[lastRow]);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		public static void Test()&#xD;&#xA;		{&#xD;&#xA;			Point p1 = new Point(160, 250);&#xD;&#xA;			Point p2 = new Point(340, 250);&#xD;&#xA;			Point p3 = new Point(250, 40);&#xD;&#xA;			Line l1 = new Line(p1, p2);&#xD;&#xA;			Line l2 = new Line(p2, p3);&#xD;&#xA;			Line l3 = new Line(p3, p1);&#xD;&#xA;&#xD;&#xA;			Line[] lines = { l1, l2, l3 };&#xD;&#xA;&#xD;&#xA;			int rowCount = 4;&#xD;&#xA;			int[] minCol = new int[rowCount];&#xD;&#xA;			int[] maxCol = new int[rowCount];&#xD;&#xA;			for (int i = 0; i &lt; rowCount; i++)&#xD;&#xA;			{&#xD;&#xA;				minCol[i] = int.MaxValue;&#xD;&#xA;				maxCol[i] = int.MinValue;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			for (int i = 0; i &lt; lines.Length; i++)&#xD;&#xA;				lines[i].ExpandRanges(minCol, maxCol);&#xD;&#xA;&#xD;&#xA;			for (int i = 0; i &lt; rowCount; i++)&#xD;&#xA;				Console.WriteLine(&quot;Row {0}:  {1} - {2}&quot;, i, minCol[i], maxCol[i]);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;&#xD;&#xA;    Row 0:  2 - 2&#xD;&#xA;    Row 1:  1 - 3&#xD;&#xA;    Row 2:  1 - 3&#xD;&#xA;    Row 3:  2147483647 - -2147483648" />
  <row Id="15529" PostHistoryTypeId="2" PostId="7692" RevisionGUID="d478a91a-f275-46ef-8eab-902378993c5f" CreationDate="2011-01-25T00:50:00.033" UserId="1101" Text="It's impossible to say what sort of synchronisation you need when you've not mentioned the kind of resources you will have your scripts accessing.&#xD;&#xA;&#xD;&#xA;Personally, having looked at what happens in a couple of game engines and thought about the various implications of scripting with regards to concurrency, I'd be inclined to have all game logic and scripting running sequentially and have other features use your extra cores." />
  <row Id="15530" PostHistoryTypeId="5" PostId="7689" RevisionGUID="d169e336-bbc7-4318-bebb-8bdd2c6bcd85" CreationDate="2011-01-25T01:16:23.473" UserId="3794" Comment="corrected spelling" Text="For the question like this there is great website: [glassdoor.com][1]. It is specialized mostly on inteviews and also offesr some other things about companies. Membership is free (or was a half of year ago) if you after some time you spend there fill yours interview in your company. Propably you will find lots of people attending on similar position at similar company.&#xD;&#xA;&#xD;&#xA;And for me as a computer graphics engineer&#xD;&#xA;&#xD;&#xA; - Describe graphic pipeline on gpu (not&#xD;&#xA;   just programmable part, but how it&#xD;&#xA;   really work) &#xD;&#xA; - How would you do ... something related to the game engines (mine was shadows for omni-directional light.) &#xD;&#xA; - shadow mapping, environment mapping, shading models, ambient occlusion ... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.glassdoor.com/index.htm" />
  <row Id="15531" PostHistoryTypeId="2" PostId="7693" RevisionGUID="8588b6d5-6536-4854-a83b-09f5d25da92b" CreationDate="2011-01-25T01:41:13.287" UserId="1101" Text="There is no best architecture without knowing a lot more about your requirements, eg. the sort of interactions between characters, how much data is going to be persistent, and so on.&#xD;&#xA;&#xD;&#xA;If you can cope with 1 second of latency, you can probably host 1000 players on a single server without problems - but that actually conflicts with the idea of an FPS as they typically require much lower latency, eg. less than 100ms. But a system that can deal with high latency can afford to do everything via message passing which makes consistency pretty trivial. Providing your logic is quite simple, that is - complex logic gets even worse when you turn it into a message-based system rather than a locked-object system - but it all depends on your application's needs.&#xD;&#xA;&#xD;&#xA;Similarly, if you're not persisting much data, you don't need the database machine at all, but without knowing that, it's hard to say. If you're persisting small amounts of data, and perhaps only doing it at the end of a tournament or something, again you don't need a separate database, certainly not a cluster of them. On the other hand if you're not persisting much but reading a lot, that's where the replicated databases can help you - but it also indicates that a relational database may not be the best match for your problem in the first place. Often an in-memory cache is a better solution. Similarly, if there are no transaction-style interactions between characters, then consistency becomes less important. (And if there are only a few such transactions, you can make them a special case.)&#xD;&#xA;&#xD;&#xA;In fact, be wary of adopting an RDBMS just because it is the done thing in large systems. Although I personally do approve of using them in online games, it's best to look at your requirements and figure out your persistence strategy from that, rather than taking your preferred database and then trying to tweak it with caches and replication to get it to fit your app. You may find that all you need is offline reporting capability, in which case it's probably best to have a background process logging from your game persistence mechanism into a remote RDBMS somewhere else." />
  <row Id="15532" PostHistoryTypeId="2" PostId="7694" RevisionGUID="c909aac6-3317-48b1-a218-b39a3619fa6d" CreationDate="2011-01-25T01:42:55.900" UserId="4191" Text="Am I a bad person because I think of these?&#xD;&#xA;&#xD;&#xA;* What do you do for fun? *(Translation: Do you have a social life that will interfere with putting in 60 hour weeks normally, 100+ hour weeks in crunch?)*&#xD;&#xA;* How do you balance your personal life with work? *(Translation: Have you had experience with a normal job that you put in a day at and then go home from when you're done, or can we format your brain with the insane expectations that make us money?)*&#xD;&#xA;* Where do you see yourself in five years? *(Translation: Do we have a reasonable shot of keeping you in the same code monkey role for several product cycles?)*" />
  <row Id="15533" PostHistoryTypeId="2" PostId="7695" RevisionGUID="eb9a3b24-09bf-4f4e-8590-8087537ed178" CreationDate="2011-01-25T01:45:46.897" UserId="4869" Text="I'm currently using Rectangle Collision for my collision detection, and it's worked. Now I wish to expand it.&#xD;&#xA;&#xD;&#xA;Instead of it simply detecting whether or not the paddle/ball intersect, I want to make it so that it can determine what section of the paddle gets hit. I wanted it in 4 parts, with each having a different reaction to impact.&#xD;&#xA;&#xD;&#xA;My first thought is to base it on the Ball's Y position compared to the Paddle's Y position. But since I want it in 4 parts, I don't know how to do that.&#xD;&#xA;&#xD;&#xA;So it's essentially be &#xD;&#xA;&#xD;&#xA;    if (ball.Y &gt; Paddle.Y)&#xD;&#xA;    {&#xD;&#xA;    PaddleSection1 == true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Except modified so that instead of being top half/bottom half, it's 1st Quarter, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15534" PostHistoryTypeId="1" PostId="7695" RevisionGUID="eb9a3b24-09bf-4f4e-8590-8087537ed178" CreationDate="2011-01-25T01:45:46.897" UserId="4869" Text="Pong Collision Help in C# w/ XNA" />
  <row Id="15535" PostHistoryTypeId="3" PostId="7695" RevisionGUID="eb9a3b24-09bf-4f4e-8590-8087537ed178" CreationDate="2011-01-25T01:45:46.897" UserId="4869" Text="&lt;xna&gt;&lt;c#&gt;&lt;collision-detection&gt;" />
  <row Id="15536" PostHistoryTypeId="5" PostId="7690" RevisionGUID="c49e0601-0f68-4b6a-84bf-5cb3ac3f2d9b" CreationDate="2011-01-25T01:46:55.057" UserId="1101" Comment="word change to read less awkwardly..." Text="I'm confused by the suggestion that RL is &quot;a more natural paradigm&quot;. I don't see how reinforcement learning maps to the problem domain anywhere near as cleanly or accurately as graph search does. Typically you don't want an agent to learn - you've assumed that they already know the route. Instead, you want them to pick and use the most direct route available, and graph search facilitates that in a near optimal way. If you were to use RL offline to calculate the best direction to take at any given node for any given destination, that would end up bring broadly equivalent to A*, except requiring significantly more memory* and also requiring that the developers were very careful to ensure that all nodes were adequately explored during training. And that training will just yield a value that we can already approximate very well with the Pythagoras algorithm, due to knowing in advance that the graph obeys Euclidean rules of distance. (This is, of course, not the case for all situations where graph search and/or reinforcement learning may be employed.)&#xD;&#xA;&#xD;&#xA;(Regarding the memory issue: If you had 1000 possible quantised positions on a map, that's 1000 nodes plus 1000 * M edges (where M is the average number of nodes reachable from any other node.) That, plus the heuristic, is enough for A* to operate. For reinforcement learning to work, at least in the way I envisage it, you'd also need 1000 entries for each of those 1000*M edges, to score the reward value of following that edge for any of the 1000 possible destinations. That's a lot of data - and every single bit of it has to be reasonably accurate to avoid loops, detours, or dead-ends." />
  <row Id="15537" PostHistoryTypeId="2" PostId="7696" RevisionGUID="5f041484-e8c2-40e5-898c-61444aa4511c" CreationDate="2011-01-25T01:52:57.310" UserId="4443" Text="If you want to split the paddle into 4 areas and see which one of the four sections it has hit you could do simple comparisons like your if statement above.. if its above or below the mid point in the X or Y position you will now if its left or right, top or bottom... &#xD;&#xA;&#xD;&#xA;Assuming ball.Y and Paddle.Y are in the same coordinate system (I am assuming 0,0 is in the bottom left corner of the screen) and you already know that the two have collided, then&#xD;&#xA;&#xD;&#xA;    if ( ball.Y &gt; Paddle.Y + (Paddle.Width * 0.5))&#xD;&#xA;    {&#xD;&#xA;        Top of Paddle&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        Bottom of Paddle&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And you could extend this to the X coords for Left and right as well.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="15538" PostHistoryTypeId="25" PostId="7681" RevisionGUID="2ac6c3f2-22c6-4bb9-bbe5-8863a376d1a9" CreationDate="2011-01-25T01:55:45.033" Comment="http://twitter.com/#!/StackGameDev/status/29719035859968001" />
  <row Id="15539" PostHistoryTypeId="2" PostId="7697" RevisionGUID="cfbc3bee-765a-46c7-90ff-3bc1fe850993" CreationDate="2011-01-25T02:00:01.167" UserId="4443" Text="There is no other answer that is also not a good answer.&#xD;&#xA;&#xD;&#xA;Programming Tests: Generally want to see what you are capable with and what your turn around times are.. Just remember that a Wrong answer is never a good one so do not rush these in order to make it look like you can turn them around quick. Just do a google search for programming tests. Also, take a look at the Sucker Punch programming test.. that one is Infamous and has been around forever (hundreds of forum posts generated from trying to get a good solution to it).&#xD;&#xA;&#xD;&#xA;Over the phone: These will generally be light tech questions and mostly personal questions. Why do you want to make video games, why do you want to make Their video games.. etc so on and so forth.&#xD;&#xA;&#xD;&#xA;In Person: Usually the final stage.. Making video games is VERY stressful.. you need to show you can be accommodating, interact with the person you are interviewing with and I can almost guarantee you will be shown around to a few other key members of the team. Also, some hands on tech questions can be brought up here... I have however been very successful in avoiding receiving them... Might be something to do with telling Them what their code/script is doing with out them asking me to write something ;)&#xD;&#xA;&#xD;&#xA;Please note though, as mentioned at the start.. No other answer here is a bad answer, the questions will be wide and many.. Mostly game or game object oriented, but programming is programming.. video games just have to do it 60 times a second :)&#xD;&#xA;&#xD;&#xA;Good Luck!" />
  <row Id="15540" PostHistoryTypeId="25" PostId="7672" RevisionGUID="fe7795ef-932f-44bb-8178-1208cf65374a" CreationDate="2011-01-25T04:55:45.590" Comment="http://twitter.com/#!/StackGameDev/status/29764336822001664" />
  <row Id="15542" PostHistoryTypeId="5" PostId="7684" RevisionGUID="071fbb01-9871-47ae-8795-fdaee0415e17" CreationDate="2011-01-25T05:39:40.683" UserId="1198" Comment="added more info, per Joe's comment." Text="Disclaimer: my game programming experience is based around client-side single player games, but I have a background in web applications (specifically on the Microsoft stack), so that is where I'm coming from with this answer, I feel that much would apply, but without actual testing a real game server  its difficult to say how it will apply, but here goes. Know this: I haven't deployed a game server, only webapps.&#xD;&#xA;&#xD;&#xA;I would suggest a two (server) tier approach. A database tier and an &quot;application&quot; tier; with the third (presentation) tier being your game client. &#xD;&#xA;&#xD;&#xA;Relational databases, are great at querying data, and decent at writing data. The key is to serialize your database writes into manageable size chunks that your cluster can handle. The more advanced editions (Data center/Enterprise) of SQL Server support clustering and replication. I would start by building a small cluster and running some queries against it to see how it works.&#xD;&#xA;&#xD;&#xA;In the application tier, if you're doing &quot;zoning&quot; or something similar, you can probably get away without setting up any clusters, and simply setup a server per zone. If your zones become to big, you could setup a cluster for each zone.&#xD;&#xA;&#xD;&#xA;You will want to build a serialization process for sending data from application tier --&gt; database tier. The key is to have multiple levels of serialization going on. Something *like* this:&#xD;&#xA;&#xD;&#xA; - Level 1: Save to DB every X seconds, includes critical data:&#xD;&#xA;  - Player Health&#xD;&#xA;  - Player Items/Pickups&#xD;&#xA; - Level 2: Save to DB every 2X seconds, includes medium data:&#xD;&#xA;  - Player locations&#xD;&#xA;  - NPC locations&#xD;&#xA; - Level 3: Everything else, as infrequently as possible&#xD;&#xA;&#xD;&#xA;This will keep your writes consistent and predictable, depending on the nature of your game, you could have infrequent database writes. The key is to realize that if your application server crashed, you'd have to come back online from the state in your database, so serializing player inventory every 90 minutes might make players upset.&#xD;&#xA;&#xD;&#xA;For reading data, you'll want to load as much as possible into memory in the application tier as possible, then insure that all of your code uses this memory pool, in the background you can synchronize the memory pool with the database. As Joe points out, there will be times when you need &quot;real-time&quot; transactions. By serializing most of your writes, you should still have sufficient IO on your database to do real-time transactions when necessary, presuming sufficient hardware on the database server/cluster.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15543" PostHistoryTypeId="2" PostId="7699" RevisionGUID="2409429c-8058-4723-938c-d6347eb74b2f" CreationDate="2011-01-25T06:31:06.753" UserId="395" Text="If you are looking for something to embed, Lua or Python are probably your best bet. Python is an easier of a language to work in than Lua, but Lua is the better choice for ease of embedding (we just did both and use them for different tasks). Also if you are concerned about speed, LuaJIT makes it so much of a non-issue your head will spin. Look at something like Luabind or SWIG to help expose C/C++ to the script environment." />
  <row Id="15544" PostHistoryTypeId="5" PostId="7695" RevisionGUID="a57af4fd-7a22-4a6e-97d3-b89c416f6add" CreationDate="2011-01-25T07:47:03.553" UserId="4869" Comment="added 277 characters in body" Text="Edit: My goal is to have it function like this:&#xD;&#xA;&#xD;&#xA;Ball hits 1st Quarter = rebounds higher (aka Y++)&#xD;&#xA;Ball hits 2nd Quarter = rebounds higher (using random value)&#xD;&#xA;Ball hits 3rd Quarter = rebounds lower (using random value)&#xD;&#xA;Ball hits 4th Quarter = rebounds lower (aka Y--)&#xD;&#xA;&#xD;&#xA;I'm currently using Rectangle Collision for my collision detection, and it's worked. Now I wish to expand it.&#xD;&#xA;&#xD;&#xA;Instead of it simply detecting whether or not the paddle/ball intersect, I want to make it so that it can determine what section of the paddle gets hit. I wanted it in 4 parts, with each having a different reaction to impact.&#xD;&#xA;&#xD;&#xA;My first thought is to base it on the Ball's Y position compared to the Paddle's Y position. But since I want it in 4 parts, I don't know how to do that.&#xD;&#xA;&#xD;&#xA;So it's essentially be &#xD;&#xA;&#xD;&#xA;    if (ball.Y &gt; Paddle.Y)&#xD;&#xA;    {&#xD;&#xA;    PaddleSection1 == true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Except modified so that instead of being top half/bottom half, it's 1st Quarter, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15545" PostHistoryTypeId="2" PostId="7700" RevisionGUID="ab43d473-b5da-4959-9ed7-2afd03c062fa" CreationDate="2011-01-25T09:08:27.067" UserId="2698" Text="To split a paddle into four sections along its Y-axis, you could measure penetration percentage through the bat. Hitting the top would be 0%, the bottom would be 100%.&#xD;&#xA;&#xD;&#xA;Here's a method that would perform this calculation and return the result as a float between 0 and 1:&#xD;&#xA;&#xD;&#xA;    float PenetrationDepth(Vector2 ballOrigin, Vector2 paddleOrigin, float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float paddleTop = paddleOrigin.Y - paddleThickness * 0.5;&#xD;&#xA;        int ballRelativePos = ballOrigin.Y - paddleTop;&#xD;&#xA;        &#xD;&#xA;        float ballDepth = (ballRelativePos - paddleTop) / paddleThickness;&#xD;&#xA;        return ballDepth;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that if the ball and paddle are not actually colliding, the result will be greater than 1 or less than 0.&#xD;&#xA;&#xD;&#xA;Thus if the PenetrationDepth is between 0 and 0.25, it's within the first quarter, etc." />
  <row Id="15547" PostHistoryTypeId="2" PostId="7701" RevisionGUID="f7aea971-9232-4eb7-9761-83965892d7c0" CreationDate="2011-01-25T10:39:33.463" UserId="2242" Text="If you're stopping condition for the funneling algorithm is the invalidity of the cone I think you'll get pretty much the same end result than with string pulling.&#xD;&#xA;&#xD;&#xA;But using another stopping condition you can produce more various behaviors by setting a particular aperture threshold and/or by tweaking how the local target/velocity is chosen in the final cone.&#xD;&#xA;" />
  <row Id="15548" PostHistoryTypeId="5" PostId="7700" RevisionGUID="3a418c59-684a-4e40-ad4c-a995809dfc92" CreationDate="2011-01-25T10:52:55.883" UserId="2698" Comment="Added PenetrationQuarter method and enum" Text="To split a paddle into four sections along its Y-axis, you could measure penetration percentage through the bat. Hitting the top would be 0%, the bottom would be 100%.&#xD;&#xA;&#xD;&#xA;Here's a method that would perform this calculation and return the result as a float between 0 and 1:&#xD;&#xA;&#xD;&#xA;    float PenetrationDepth(Vector2 ballOrigin, Vector2 paddleOrigin, float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float paddleTop = paddleOrigin.Y - paddleThickness * 0.5;&#xD;&#xA;        int ballRelativePos = ballOrigin.Y - paddleTop;&#xD;&#xA;        &#xD;&#xA;        float ballDepth = (ballRelativePos - paddleTop) / paddleThickness;&#xD;&#xA;        return ballDepth;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that if the ball and paddle are not actually colliding, the result will be greater than 1 or less than 0.&#xD;&#xA;&#xD;&#xA;Thus if the PenetrationDepth is between 0 and 0.25, it's within the first quarter, etc.&#xD;&#xA;&#xD;&#xA;Edit: Or you can use this method to translate the percentage into an enum representing which quarter the ball collided with. 0.25, 0.5 and 0.75 will count as being within the second, third and forth quarters in this implementation.&#xD;&#xA;&#xD;&#xA;    enum PenetrationQuarter {None = 0, First, Second, Third, Fourth}    &#xD;&#xA;&#xD;&#xA;    PenetrationQuarter PenetrationQuarter(Vector2 ballOrigin, Vector2 paddleOrigin,&#xD;&#xA;        float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float depth = PenetrationDepth(ballOrigin, paddleOrigin, paddleThickness);&#xD;&#xA;        if (depth &gt; 1 || depth &lt; 0) return PenetrationQuarter.None;&#xD;&#xA;&#xD;&#xA;        int quarter = (int)(depth * 4) + 1;&#xD;&#xA;        // Edge case: If depth was 1.0, quarter will be 5.0, which is still valid&#xD;&#xA;        if (quarter == 5) quarter = 4;&#xD;&#xA;&#xD;&#xA;        return (PenetrationQuarter)quarter&#xD;&#xA;    }" />
  <row Id="15549" PostHistoryTypeId="25" PostId="7638" RevisionGUID="dc467b32-3910-412f-ac58-7c151bc00480" CreationDate="2011-01-25T10:55:45.870" Comment="http://twitter.com/#!/StackGameDev/status/29854935084437504" />
  <row Id="15550" PostHistoryTypeId="5" PostId="7700" RevisionGUID="d180a753-91f9-4559-b99c-8dd2d2093e20" CreationDate="2011-01-25T10:58:18.683" UserId="2698" Comment="added 32 characters in body" Text="To split a paddle into four sections along its Y-axis, you could measure penetration percentage through the bat. Hitting the top would be 0%, the bottom would be 100%.&#xD;&#xA;&#xD;&#xA;Here's a method that would perform this calculation and return the percentage as a float between 0.0 and 1.0:&#xD;&#xA;&#xD;&#xA;    float PenetrationDepth(Vector2 ballOrigin, Vector2 paddleOrigin, float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float paddleTop = paddleOrigin.Y - paddleThickness * 0.5;&#xD;&#xA;        int ballRelativePos = ballOrigin.Y - paddleTop;&#xD;&#xA;        &#xD;&#xA;        float ballDepth = (ballRelativePos - paddleTop) / paddleThickness;&#xD;&#xA;        return ballDepth;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that if the ball and paddle are not actually colliding, the result will be greater than 1 or less than 0.&#xD;&#xA;&#xD;&#xA;Thus if the PenetrationDepth is between 0.0 and 0.25, it's within the first quarter, etc.&#xD;&#xA;&#xD;&#xA;Edit: Or you can use this method to translate the percentage into an enum representing which quarter the ball collided with. 0.25, 0.5 and 0.75 will count as being within the second, third and forth quarters respectively in this implementation.&#xD;&#xA;&#xD;&#xA;    enum PenetrationQuarter {None = 0, First, Second, Third, Fourth}    &#xD;&#xA;&#xD;&#xA;    PenetrationQuarter PenetrationQuarter(Vector2 ballOrigin, Vector2 paddleOrigin,&#xD;&#xA;        float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float depth = PenetrationDepth(ballOrigin, paddleOrigin, paddleThickness);&#xD;&#xA;        if (depth &gt; 1.0f || depth &lt; 0.0f) return PenetrationQuarter.None;&#xD;&#xA;&#xD;&#xA;        int quarter = (int)(depth * 4) + 1;&#xD;&#xA;        // Edge case: If depth was 1.0, quarter will be 5, which is within quarter 4&#xD;&#xA;        if (quarter == 5) quarter = 4;&#xD;&#xA;&#xD;&#xA;        return (PenetrationQuarter)quarter&#xD;&#xA;    }" />
  <row Id="15551" PostHistoryTypeId="2" PostId="7702" RevisionGUID="a29fd519-a8e1-4c24-9ab4-d3d1b9586240" CreationDate="2011-01-25T11:39:39.920" UserId="119" Text="If I have a downloadable game or in-game item that I need to sell for a fixed amount in all countries, how do I work out how to set the price? My local currency is UK pounds. Would I come up with a round number figure in £ and let customers in other countries deal with the currency fluctuations? Should I try to display the figure in the local currency if possible? Would it be better to price the game in dollars or euros and deal with the currency fluctuations myself? How are other games handling this?" />
  <row Id="15552" PostHistoryTypeId="1" PostId="7702" RevisionGUID="a29fd519-a8e1-4c24-9ab4-d3d1b9586240" CreationDate="2011-01-25T11:39:39.920" UserId="119" Text="How do I price a game that sells internationally online?" />
  <row Id="15553" PostHistoryTypeId="3" PostId="7702" RevisionGUID="a29fd519-a8e1-4c24-9ab4-d3d1b9586240" CreationDate="2011-01-25T11:39:39.920" UserId="119" Text="&lt;online&gt;&lt;sales&gt;" />
  <row Id="15554" PostHistoryTypeId="2" PostId="7703" RevisionGUID="3b8a6924-8582-4637-997b-b98a635c2452" CreationDate="2011-01-25T12:11:25.343" UserId="4896" Text="I'm using the libraries of Sean Barret [1]  to render truetype-glyphs under OpenGL (stb_image, stb_truetype).&#xD;&#xA;&#xD;&#xA;The Recast/Detour-project [2] is using these libraries to create an user interface (IMUI, see [3]) &#xD;&#xA;&#xD;&#xA;[1] nothings.org&#xD;&#xA;[2] code.google.com/p/recastnavigation/source/browse/trunk/RecastDemo/Source/imguiRenderGL.cpp&#xD;&#xA;[3] www.mollyrocket.com/861&#xD;&#xA;" />
  <row Id="15555" PostHistoryTypeId="5" PostId="7700" RevisionGUID="2db3f3c9-26ca-462e-9576-4a9fa6398fdf" CreationDate="2011-01-25T12:15:48.023" UserId="2698" Comment="Missed a semicolon" Text="To split a paddle into four sections along its Y-axis, you could measure penetration percentage through the bat. Hitting the top would be 0%, the bottom would be 100%.&#xD;&#xA;&#xD;&#xA;Here's a method that would perform this calculation and return the percentage as a float between 0.0 and 1.0:&#xD;&#xA;&#xD;&#xA;    float PenetrationDepth(Vector2 ballOrigin, Vector2 paddleOrigin, float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float paddleTop = paddleOrigin.Y - paddleThickness * 0.5;&#xD;&#xA;        int ballRelativePos = ballOrigin.Y - paddleTop;&#xD;&#xA;        &#xD;&#xA;        float ballDepth = (ballRelativePos - paddleTop) / paddleThickness;&#xD;&#xA;        return ballDepth;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that if the ball and paddle are not actually colliding, the result will be greater than 1 or less than 0.&#xD;&#xA;&#xD;&#xA;Thus if the PenetrationDepth is between 0.0 and 0.25, it's within the first quarter, etc.&#xD;&#xA;&#xD;&#xA;Edit: Or you can use this method to translate the percentage into an enum representing which quarter the ball collided with. 0.25, 0.5 and 0.75 will count as being within the second, third and forth quarters respectively in this implementation.&#xD;&#xA;&#xD;&#xA;    enum PenetrationQuarter {None = 0, First, Second, Third, Fourth}    &#xD;&#xA;&#xD;&#xA;    PenetrationQuarter PenetrationQuarter(Vector2 ballOrigin, Vector2 paddleOrigin,&#xD;&#xA;        float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float depth = PenetrationDepth(ballOrigin, paddleOrigin, paddleThickness);&#xD;&#xA;        if (depth &gt; 1.0f || depth &lt; 0.0f) return PenetrationQuarter.None;&#xD;&#xA;&#xD;&#xA;        int quarter = (int)(depth * 4) + 1;&#xD;&#xA;        // Edge case: If depth was 1.0, quarter will be 5, which is within quarter 4&#xD;&#xA;        if (quarter == 5) quarter = 4;&#xD;&#xA;&#xD;&#xA;        return (PenetrationQuarter)quarter;&#xD;&#xA;    }" />
  <row Id="15556" PostHistoryTypeId="5" PostId="7700" RevisionGUID="247789c0-c1af-4d01-92ec-87b3533a5197" CreationDate="2011-01-25T12:38:33.343" UserId="2698" Comment="derp, vector2" Text="To split a paddle into four sections along its Y-axis, you could measure penetration percentage through the bat. Hitting the top would be `0.0f`, the bottom would be `1.0f`. The second quarter would be between `0.25f` and `0.5f`, etc.&#xD;&#xA;&#xD;&#xA;Following is a method to calculate the penetration depth and a method which translates that into the far more important quarter.&#xD;&#xA;&#xD;&#xA;    // Note: This method can return a value &gt; 1.0 or &lt; 0.0 if the paddle and ball are&#xD;&#xA;    // not actually colliding.&#xD;&#xA;    float PenetrationDepth(Vector2 ballOrigin, Vector2 paddleOrigin, float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float paddleTop = paddleOrigin.Y - paddleThickness * 0.5f;&#xD;&#xA;        float ballRelativePos = ballOrigin.Y - paddleTop;&#xD;&#xA;&#xD;&#xA;        float ballDepth = ballRelativePos / paddleThickness;&#xD;&#xA;        return ballDepth;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    enum PenetrationQuarter { None = 0, First, Second, Third, Fourth }&#xD;&#xA;&#xD;&#xA;    PenetrationQuarter GetPenetrationQuarter(Vector2 ballOrigin, Vector2 paddleOrigin,&#xD;&#xA;        float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float depth = PenetrationDepth(ballOrigin, paddleOrigin, paddleThickness);&#xD;&#xA;        if (depth &gt; 1.0f || depth &lt; 0.0f) return PenetrationQuarter.None;&#xD;&#xA;&#xD;&#xA;        int quarter = (int)(depth * 4) + 1;&#xD;&#xA;        // Edge case: If depth was 1.0, quarter will be 5, which is within quarter 4&#xD;&#xA;        if (quarter == 5) quarter = 4;&#xD;&#xA;&#xD;&#xA;        return (PenetrationQuarter)quarter;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Edit: Fixed some (fairly terrible) logic errors." />
  <row Id="15557" PostHistoryTypeId="2" PostId="7704" RevisionGUID="e9a1e890-31cb-4f68-8bad-5c0c3062583f" CreationDate="2011-01-25T13:05:02.813" UserId="1352" Text="I would suggest just finding a round figure in your own currency and let the customers deal with the fluctuation.&#xD;&#xA;&#xD;&#xA;It looks smoother and most people have a rough estimate of how much their own currency is worth in comparison to the big world currencies. (Euro,USD,GBP)&#xD;&#xA;&#xD;&#xA;Because a customer usually just does a fast conversion in their heads they will still buy the game even though their currency is weak in comparison to GBP.&#xD;&#xA;&#xD;&#xA;Some payment services like PayPal previews what the cost in the local currency will be before you pay." />
  <row Id="15558" PostHistoryTypeId="2" PostId="7705" RevisionGUID="1a480cf6-573d-4ba0-ab45-0f7a34364453" CreationDate="2011-01-25T13:07:55.243" UserDisplayName="user4898" Text="It really depends on whether you have access to a merchant account in multiple currencies (they usually only work in your home currency) in which to receive the international payments.  I would say specify the price in GBP / USD / EUR and then you will have most things covered.&#xD;&#xA;&#xD;&#xA;As a rule of thumb however, most stuff denominated out of the States in USD is usually cheaper than we pay here in the UK.  If you accept payments via Paypal then you can keep all the currencies in your Paypal account and hedge as appropriate.&#xD;&#xA;&#xD;&#xA;Good luck." />
  <row Id="15559" PostHistoryTypeId="2" PostId="7706" RevisionGUID="346f17ca-65a7-4095-8289-4fda54252a3b" CreationDate="2011-01-25T13:12:15.503" UserId="4264" Text="Plimus, at least, gives you lots of different options;&#xD;&#xA;&#xD;&#xA; - Fixed price in one currency, or set values of each currency&#xD;&#xA; - Various rounding options on currency conversions &#xD;&#xA;&#xD;&#xA;As an example, 12.34 turns into..&#xD;&#xA;&#xD;&#xA; - 12.30 &#xD;&#xA; - 12.35  &#xD;&#xA; - 12.50  &#xD;&#xA; - 12.95&#xD;&#xA; - and so on, depending on the options you choose&#xD;&#xA;&#xD;&#xA;As to what price point to choose for your game, and whether you want to anchor to one currency or define unique price for each, depends on the market you're entering. The iDevice market, for instance, is a completely different beast from Steam. In any case I'd look at what the other games in your target market are doing, and start from there.&#xD;&#xA;&#xD;&#xA;It does seem, for instance, that Europeans always get higher prices than the folks in the US. Maybe we're just stupid enough to pay higher prices." />
  <row Id="15560" PostHistoryTypeId="2" PostId="7707" RevisionGUID="0b68ec15-9a17-48ce-8f77-22637bedf9bf" CreationDate="2011-01-25T13:22:14.243" UserId="1829" Text="A good read:&#xD;&#xA;http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html&#xD;&#xA;&#xD;&#xA;Language any programmer need to know about (according to me) are C, python, and basic C++. All the rest is accessory, but other good languages are javascript, LUA, Ruby." />
  <row Id="15561" PostHistoryTypeId="6" PostId="7562" RevisionGUID="a04332bd-64ca-48d8-b2a9-68eba450e2f4" CreationDate="2011-01-25T13:29:43.553" UserId="51" Comment="edited tags" Text="&lt;textures&gt;&lt;rendering&gt;&lt;fonts&gt;&lt;efficiency&gt;&lt;text&gt;" />
  <row Id="15562" PostHistoryTypeId="25" PostId="7702" RevisionGUID="6a109df4-c069-4d8a-ac17-48a5e79e4e30" CreationDate="2011-01-25T13:55:46.710" Comment="http://twitter.com/#!/StackGameDev/status/29900236671418368" />
  <row Id="15563" PostHistoryTypeId="2" PostId="7708" RevisionGUID="d6f20d8f-0b90-4eff-b2d0-f63634d274bc" CreationDate="2011-01-25T14:20:05.597" UserId="2332" Text="I want to render some text over a mesh in my DirectX app. It will have a similar application to health bars for units in games, just as text rather than a bar. I'm looking for the simplest way to do this.&#xD;&#xA;&#xD;&#xA;It's a Win32 app, I'm using DirectX 9 and I need it to be in 3D (i.e. when the unit is moving around the Z-axis, the text above moves with it).&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="15564" PostHistoryTypeId="1" PostId="7708" RevisionGUID="d6f20d8f-0b90-4eff-b2d0-f63634d274bc" CreationDate="2011-01-25T14:20:05.597" UserId="2332" Text="How can I render text above a mesh in DirectX 9?" />
  <row Id="15565" PostHistoryTypeId="3" PostId="7708" RevisionGUID="d6f20d8f-0b90-4eff-b2d0-f63634d274bc" CreationDate="2011-01-25T14:20:05.597" UserId="2332" Text="&lt;3d&gt;&lt;rendering&gt;&lt;directx9&gt;&lt;text&gt;" />
  <row Id="15566" PostHistoryTypeId="8" PostId="7657" RevisionGUID="ad04138b-6386-4bde-9a02-aa3d5c88cd42" CreationDate="2011-01-25T14:29:03.387" UserId="14" Comment="Rollback to [391024b5-8011-4363-89e3-9582ee0d030b]" Text="I'm actually an industrial systems developer with knowledge of .NET C# and VB.NET, C/C++, Delphi, and an intermediate knowledge of 80286 Intel assembly language.&#xD;&#xA;&#xD;&#xA;I would be interested to learn how to develop games while taking as fully as possible advantage of my already acquired experience.&#xD;&#xA;&#xD;&#xA;My first objective is to learn the differences between management and game software development so that I may make my mind up as to what is important to think about as a game developer.&#xD;&#xA;&#xD;&#xA;Any hint as to where to start to learn is appreciated, such as game writing tutorials, the kind of &quot;Hello World!&quot; program, if I may say.&#xD;&#xA;&#xD;&#xA;The answer that will have guided me the most will be accepted. Thanks for your help! =)" />
  <row Id="15567" PostHistoryTypeId="7" PostId="7657" RevisionGUID="ad04138b-6386-4bde-9a02-aa3d5c88cd42" CreationDate="2011-01-25T14:29:03.387" UserId="14" Comment="Rollback to [391024b5-8011-4363-89e3-9582ee0d030b]" Text="Where to start writing games, any tutorials or the like?" />
  <row Id="15571" PostHistoryTypeId="2" PostId="7710" RevisionGUID="1d50fa87-ec25-47cf-a23d-f9a1421f3085" CreationDate="2011-01-25T15:39:24.930" UserId="4662" Text="You can use D3DXCreateText to create a text &quot;mesh&quot;, which you can then render however you like." />
  <row Id="15574" PostHistoryTypeId="5" PostId="7657" RevisionGUID="8d0db054-3593-40db-9e38-a9acdd1731ea" CreationDate="2011-01-25T16:35:18.853" UserId="2778" Comment="added 268 characters in body; edited tags; added 360 characters in body" Text="I'm actually an industrial systems developer with knowledge of .NET C# and VB.NET, C/C++, Delphi, and an intermediate knowledge of 80286 Intel assembly language.&#xD;&#xA;&#xD;&#xA;I would be interested to learn how to develop games while taking as fully as possible advantage of my already acquired experience.&#xD;&#xA;&#xD;&#xA;My first objective is to learn the differences between management and game software development so that I may make my mind up as to what is important to think about as a game developer.&#xD;&#xA;&#xD;&#xA;Any hint as to where to start to learn is appreciated, such as game writing tutorials, the kind of &quot;Hello World!&quot; program, if I may say.&#xD;&#xA;&#xD;&#xA;Besides, these following tutorials were found while &quot;googling&quot;:&#xD;&#xA;&#xD;&#xA;1. [C++ Game Programming][1];&#xD;&#xA;2. [C and C++ Programming Games and Entertainment Tutorials][2];&#xD;&#xA;3. [C++ Game Programming Resource Center][3];&#xD;&#xA;4. [Creating a game in C++][4].&#xD;&#xA;&#xD;&#xA;Are they any good?&#xD;&#xA;&#xD;&#xA;The answer that will have guided me the most will be accepted. Thanks for your help! =)&#xD;&#xA;&#xD;&#xA; [1]: http://www.cppgameprogramming.com/cgi/nav.cgi?page=index&#xD;&#xA;  [2]: http://www.tutorialized.com/tutorials/C-and-Cpp/Games-and-Entertainment/1&#xD;&#xA;  [3]: http://www.deitel.com/ResourceCenters/Programming/CGameProgramming/CGameProgrammingTutorialsandArticles/tabid/1533/Default.aspx&#xD;&#xA;  [4]: http://www.dreamincode.net/forums/topic/42855-creating-a-game-in-c/" />
  <row Id="15575" PostHistoryTypeId="6" PostId="7657" RevisionGUID="8d0db054-3593-40db-9e38-a9acdd1731ea" CreationDate="2011-01-25T16:35:18.853" UserId="2778" Comment="added 268 characters in body; edited tags; added 360 characters in body" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;tutorials&gt;&lt;learning&gt;&lt;hobby-development&gt;" />
  <row Id="15576" PostHistoryTypeId="2" PostId="7711" RevisionGUID="9d4062a9-9656-44ac-8a1f-956b8a62d933" CreationDate="2011-01-25T16:35:23.050" UserId="1430" Text="[ID3DXFont][1] can be used to render 2D text, and [D3DXCreateText][2] can be used to generate a 3D text mesh you could render as well. In general I would think the 2D approach is preferable, unless you want the text to do something odd like spin in 3D space.&#xD;&#xA;&#xD;&#xA;To find the appropriate place to start rendering the text (for the 2D case), you'll want to use the character's position in world space (perhaps plus some offset vector that provides a position just above the character's head). Then multiply that point by the combined view and projection matrix via something like [D3DXVec3Project][3]. This will yield a screen space position you can render the text to. Note that you may need to offset the screen space position by, for example, -(width of text / 2) or use the `DT_CENTER` flag if you want the text centered.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb173962(v=vs.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb172799(v=vs.85).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb205516(v=vs.85).aspx" />
  <row Id="15577" PostHistoryTypeId="25" PostId="7708" RevisionGUID="f5438df3-bfd9-4d49-8641-c24af99e9c71" CreationDate="2011-01-25T16:55:48.690" Comment="http://twitter.com/#!/StackGameDev/status/29945543098630144" />
  <row Id="15578" PostHistoryTypeId="5" PostId="7673" RevisionGUID="d32eedab-324e-40a6-9199-68e0cef9b860" CreationDate="2011-01-25T16:57:21.340" UserId="4604" Comment="added 748 characters in body; added 4 characters in body" Text="I would put the Java VM back on your list.  It has been used by enterprise programmers for over a decade, has many good libraries that do exactly what you are looking for, and is running between 85 ~ 90 % the speed of compiled native code (sometimes faster, sometimes slower, but usually close).  On top of that, Java's reflection API will let you map 'script' classes into java code very easily, and you could emulate a script such as &lt;a href=&quot;http://en.wikipedia.org/wiki/Groovy_(programming_language)&quot;&gt;Groovy&lt;/a&gt; if you wanted to.&#xD;&#xA;&#xD;&#xA;Yes, it is big, but you only need to use as much of it as you require.  The Java VM (JVM) has a notion of a maximum heap size.  This maximum memory imprint is set by using the `-Xmx(Size)M` parameter.  An example of this would be:&#xD;&#xA;&#xD;&#xA;    java game.jar -Xmx512M&#xD;&#xA;&#xD;&#xA;This would set the maximum memory heap size of the JVM to 512 MB.  &lt;a href=&quot;http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp&quot;&gt;This &lt;/a&gt; link may prove to be helpful.  For what it's worth, Minecraft Server usually operates fine with a heap size of 1024 MB, as detailed at the bottom of the &lt;a href=&quot;http://www.minecraft.net/download.jsp&quot;&gt;download page&lt;/a&gt;." />
  <row Id="15579" PostHistoryTypeId="5" PostId="7697" RevisionGUID="12ae6462-d851-44f3-b60a-f8122ceb9b8e" CreationDate="2011-01-25T17:06:28.570" UserId="4443" Comment="Added in requested information." Text="There is no other answer that is also not a good answer.&#xD;&#xA;&#xD;&#xA;Programming Tests: Generally want to see what you are capable with and what your turn around times are.. Just remember that a Wrong answer is never a good one so do not rush these in order to make it look like you can turn them around quick. Just do a google search for programming tests. Also, take a look at the Sucker Punch programming test.. that one is Infamous and has been around forever (hundreds of forum posts generated from trying to get a good solution to it).&#xD;&#xA;&#xD;&#xA;Over the phone: These will generally be light tech questions and mostly personal questions. Why do you want to make video games, why do you want to make Their video games.. etc so on and so forth.&#xD;&#xA;&#xD;&#xA;In Person: Usually the final stage.. Making video games is VERY stressful.. you need to show you can be accommodating, interact with the person you are interviewing with and I can almost guarantee you will be shown around to a few other key members of the team. Also, some hands on tech questions can be brought up here... I have however been very successful in avoiding receiving them... Might be something to do with telling Them what their code/script is doing with out them asking me to write something ;)&#xD;&#xA;&#xD;&#xA;Please note though, as mentioned at the start.. No other answer here is a bad answer, the questions will be wide and many.. Mostly game or game object oriented, but programming is programming.. video games just have to do it 60 times a second :)&#xD;&#xA;&#xD;&#xA;Good Luck!&#xD;&#xA;&#xD;&#xA;EDIT: Cached link to an old [Sucker Punch Job Listing][1] w/ Programming Test referenced at the bottom.&#xD;&#xA;&#xD;&#xA;  [1]: http://webcache.googleusercontent.com/search?q=cache:Ja9dLgwsmWQJ:jobs.gamasutra.com/jobseekerx/viewjobrss.asp%3Fcjid%3D22685%26accountno%3D358+suckerpunch.com+create+a+queue&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=us" />
  <row Id="15580" PostHistoryTypeId="2" PostId="7712" RevisionGUID="b38eeed2-ecf4-4bb5-a294-bb7f7b196df5" CreationDate="2011-01-25T17:18:35.630" UserId="189" Text="Unfortunately the publisher, Charles River Media, made a business decision to stop printing the journal.&#xD;&#xA;&#xD;&#xA;However there are other, more area-specific journals for game development in existence (i.e. journals about AI, networking, etc. - one specific aspect of game development)." />
  <row Id="15581" PostHistoryTypeId="5" PostId="7699" RevisionGUID="94870542-c7cc-4738-b71a-ce57ff8cc8e1" CreationDate="2011-01-25T17:21:10.430" UserId="395" Comment="deleted 5 characters in body" Text="If you are looking for something to embed, Lua or Python are probably your best bet. Python is an easier language to work in than Lua, but Lua is the better choice for ease of embedding (we just did both and use them for different tasks). Also if you are concerned about speed, LuaJIT makes it so much of a non-issue your head will spin. Look at something like Luabind or SWIG to help expose C/C++ to the script environment." />
  <row Id="15582" PostHistoryTypeId="5" PostId="7690" RevisionGUID="59d85f4f-6bd4-426b-9903-2e33119d8ca2" CreationDate="2011-01-25T17:37:03.747" UserId="1101" Comment="changed 'Pythagoras algorithm' to 'Pythagoras equation'" Text="I'm confused by the suggestion that RL is &quot;a more natural paradigm&quot;. I don't see how reinforcement learning maps to the problem domain anywhere near as cleanly or accurately as graph search does. Typically you don't want an agent to learn - you've assumed that they already know the route. Instead, you want them to pick and use the most direct route available, and graph search facilitates that in a near optimal way. If you were to use RL offline to calculate the best direction to take at any given node for any given destination, that would end up bring broadly equivalent to A*, except requiring significantly more memory* and also requiring that the developers were very careful to ensure that all nodes were adequately explored during training. And that training will just yield a value that we can already approximate very well with the Pythagoras equation, due to knowing in advance that the graph obeys Euclidean rules of distance. (This is, of course, not the case for all situations where graph search and/or reinforcement learning may be employed.)&#xD;&#xA;&#xD;&#xA;(Regarding the memory issue: If you had 1000 possible quantised positions on a map, that's 1000 nodes plus 1000 * M edges (where M is the average number of nodes reachable from any other node.) That, plus the heuristic, is enough for A* to operate. For reinforcement learning to work, at least in the way I envisage it, you'd also need 1000 entries for each of those 1000*M edges, to score the reward value of following that edge for any of the 1000 possible destinations. That's a lot of data - and every single bit of it has to be reasonably accurate to avoid loops, detours, or dead-ends." />
  <row Id="15583" PostHistoryTypeId="2" PostId="7713" RevisionGUID="e1ac625e-8266-41d5-98eb-ec208f1f191d" CreationDate="2011-01-25T18:26:55.147" UserId="2229" Text="I am reading one great book, **Game Coding Complete** (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1295978774&amp;sr=8-1&gt;), and that book strongly recommends using **MVC (Model-View-Controller)** approach, with three key layers:&#xD;&#xA;&#xD;&#xA; 1. *Game Application Layer*&#xD;&#xA; 2. *Game Logic*&#xD;&#xA; 3. *Game View*&#xD;&#xA;&#xD;&#xA;To me, this approach looks like an overkill for a mobile computer game. &#xD;&#xA;&#xD;&#xA;What is your opinion, please? Is it worth of implementing this architecture, even if it adds extra communication needed between modules? Can this design consume so much CPU power, that at the end, the result would be significantly slower, than if it were'nt implemented?" />
  <row Id="15584" PostHistoryTypeId="1" PostId="7713" RevisionGUID="e1ac625e-8266-41d5-98eb-ec208f1f191d" CreationDate="2011-01-25T18:26:55.147" UserId="2229" Text="MVC (Model-View-Controller) Game Engine Architecture - Yes or No?" />
  <row Id="15585" PostHistoryTypeId="3" PostId="7713" RevisionGUID="e1ac625e-8266-41d5-98eb-ec208f1f191d" CreationDate="2011-01-25T18:26:55.147" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="15586" PostHistoryTypeId="2" PostId="7714" RevisionGUID="db9cb603-0172-4609-ab8e-2f1e4e38113c" CreationDate="2011-01-25T18:32:37.610" UserId="1516" Text="What heuristics do programmers use in A* pathfinding for NavMeshes?" />
  <row Id="15587" PostHistoryTypeId="1" PostId="7714" RevisionGUID="db9cb603-0172-4609-ab8e-2f1e4e38113c" CreationDate="2011-01-25T18:32:37.610" UserId="1516" Text="What heuristics is used in NavMeshes?" />
  <row Id="15588" PostHistoryTypeId="3" PostId="7714" RevisionGUID="db9cb603-0172-4609-ab8e-2f1e4e38113c" CreationDate="2011-01-25T18:32:37.610" UserId="1516" Text="&lt;path-finding&gt;" />
  <row Id="15589" PostHistoryTypeId="2" PostId="7715" RevisionGUID="2c004375-110a-4e1c-b4a3-ed7fed753605" CreationDate="2011-01-25T18:32:50.767" UserId="189" Text="There is almost always a tradeoff between the clarity of the code and the speed of the program. Object-oriented languages have an overhead compared to procedural languages, but they have been shown to have many advantages over procedural languages, especially in long-term maintenance of code (bugs, etc.) and often development speed as well.&#xD;&#xA;&#xD;&#xA;So with that in mind, I propose that whatever tiny speed different it might make, **MVC is worth implementing for your sake as the game programmer**. Your code will better follow object-oriented principles, especially [encapsulation][1], and you will likely have a much easier time maintaining it (fixing bugs or adding new features).&#xD;&#xA;&#xD;&#xA;On the other hand, make sure to actually finish a game and not spend so much time working on the &quot;engine&quot; that it never gets done.&#xD;&#xA;&#xD;&#xA;For more info, please read the question [&quot;Why are MVC &amp; TDD not employed more in game architecture?&quot;][2] and my really long answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture" />
  <row Id="15590" PostHistoryTypeId="2" PostId="7716" RevisionGUID="de0badf6-4b75-4d80-898c-735d85739588" CreationDate="2011-01-25T18:45:11.077" UserId="4662" Text="Designs do not consume CPU power, unless you have a terrible compiler. An object orientated language or approach is no different in performance characteristics than a procedural one. You will not invoke any additional overhead for using MVC. Modularity exists at compile-time, not run-time, once the code is inlined and optimized, it won't make any difference at all.&#xD;&#xA;&#xD;&#xA;Many modern games actually run the models and the views on separate threads and gain great performance benefits on most platforms. &#xD;&#xA;&#xD;&#xA;Ultimately, MVC is a good design that gets you increased maintenance and less bugs etc for *free*. There's no reason *not* to use it. It's like asking why you should use a `for` loop instead of hand-written `goto`s. Unless you have a superior design in mind, it's sure as hell better than nothing." />
  <row Id="15591" PostHistoryTypeId="2" PostId="7717" RevisionGUID="2c81e03e-2233-4c4a-9549-74471b68590d" CreationDate="2011-01-25T18:46:02.510" UserId="4191" Text="I somewhat support using an MVC structure even for a simple mobile game.  If nothing else, it helps with an issue that plagues developers who haven't gotten bitten by it enough times: separating the display code from the game logic.&#xD;&#xA;&#xD;&#xA;I'll also say, though, to keep in mind that MVC, like all design patterns, exists *to make your life easier*.  That means that if, at any given time, staying within some set of rules about what you should and shouldn't do when using MVC is making your life harder, *ignore it*.  One of two things will happen: 1) you'll get bitten later, and then will understand why doing it differently in the first place would actually have made your life easier in the long run, or 2) no consequences whatsoever.&#xD;&#xA;&#xD;&#xA;Computer programming, by its nature, gets a lot of rule-followers who value adherence to elegant principle over actually accomplishing anything, and they love to propound their value system; don't let them make you one of them." />
  <row Id="15592" PostHistoryTypeId="5" PostId="7714" RevisionGUID="eee4c80a-f45c-4e78-ab88-2853f9df895e" CreationDate="2011-01-25T18:46:24.150" UserId="1516" Comment="added 95 characters in body" Text="What heuristics do programmers use in A* pathfinding for NavMeshes?&#xD;&#xA;&#xD;&#xA;NavMesh = Navigation Mesh, its a type of pathfinding that uses meshes instead of waypoints." />
  <row Id="15593" PostHistoryTypeId="2" PostId="7718" RevisionGUID="5ddf1e73-c3b8-44d2-96cb-df3caf945fc1" CreationDate="2011-01-25T18:47:45.580" UserId="2229" Text="As I am reading book **Game Coding Complete** (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1295978774&amp;sr=8-1&gt;), the author recommend **Event Driven communication** among the all game objects and modules.&#xD;&#xA;&#xD;&#xA;Basicaly, all the living game actors and object should communicate with the key modules (Physics, AI, Game Logic, Game View, etc..) via internal event messaging system. This would mean designing efficient event manager as well.&#xD;&#xA;&#xD;&#xA;My question is, whether this is proven and recommended approach. If it is not properly designed, it might mean consuming a lot of CPU cycles, which can be used elsewhere. This is especially true, if the game is targetted for mobile platform.&#xD;&#xA;&#xD;&#xA;What is your opinion and recommendation, please?" />
  <row Id="15594" PostHistoryTypeId="1" PostId="7718" RevisionGUID="5ddf1e73-c3b8-44d2-96cb-df3caf945fc1" CreationDate="2011-01-25T18:47:45.580" UserId="2229" Text="Event Driven Communication in Game Engine" />
  <row Id="15595" PostHistoryTypeId="3" PostId="7718" RevisionGUID="5ddf1e73-c3b8-44d2-96cb-df3caf945fc1" CreationDate="2011-01-25T18:47:45.580" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="15596" PostHistoryTypeId="5" PostId="7716" RevisionGUID="0ea38341-16aa-4259-ad89-7a98e47df7fb" CreationDate="2011-01-25T18:50:54.173" UserId="4662" Comment="added 117 characters in body; added 11 characters in body" Text="Compile-time designs do not consume CPU power, unless you have an incredibly abysmal compiler. An object orientated language or approach is no different in performance characteristics than a procedural one. You will not invoke any additional overhead for using MVC. Modularity exists at compile-time, not run-time, once the code is inlined and optimized, it won't make any difference at all.&#xD;&#xA;&#xD;&#xA;Many modern games actually run the models and the views on separate threads and gain great performance benefits on most platforms. &#xD;&#xA;&#xD;&#xA;Ultimately, MVC is a good design that gets you increased maintenance and less bugs etc for *free*. There's no reason *not* to use it. It's like asking why you should use a `for` loop instead of hand-written `goto`s. Unless you have a superior design in mind, it's sure as hell better than nothing.&#xD;&#xA;&#xD;&#xA;Edit: Compile-time designs do not consume CPU power. Run-time designs like inheritance obviously do." />
  <row Id="15597" PostHistoryTypeId="5" PostId="7717" RevisionGUID="4643937b-5c5e-4172-a579-1b01d1f08911" CreationDate="2011-01-25T18:51:15.207" UserId="4191" Comment="added 73 characters in body" Text="I somewhat support using an MVC structure even for a simple mobile game.  If nothing else, it helps with an issue that plagues developers who haven't gotten bitten by it enough times: separating the display code from the game logic.&#xD;&#xA;&#xD;&#xA;I'll also say, though, to keep in mind that MVC, like all design patterns, exists *to make your life easier*.  That means that if, at any given time, staying within some set of rules about what you should and shouldn't do when using MVC is making your life harder, *ignore it*.  One of two things will happen: 1) you'll get bitten later, and then will understand why doing it differently in the first place would actually have made your life easier in the long run, or 2) no consequences whatsoever.&#xD;&#xA;&#xD;&#xA;Computer programming, by its nature, gets a lot of rule-followers who value adherence to elegant principle over actually accomplishing anything, and they love to propound their value system; don't let them make you one of them.  The most important thing that can happen to your game is *shipping it*." />
  <row Id="15598" PostHistoryTypeId="5" PostId="7718" RevisionGUID="ce5556d9-a1e6-4fc7-a624-a4938004954f" CreationDate="2011-01-25T18:51:50.773" UserId="14" Comment="deleted 13 characters in body" Text="As I am reading book **Game Coding Complete** (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1295978774&amp;sr=8-1&gt;), the author recommend **Event Driven communication** among the all game objects and modules.&#xD;&#xA;&#xD;&#xA;Basicaly, all the living game actors and object should communicate with the key modules (Physics, AI, Game Logic, Game View, etc..) via internal event messaging system. This would mean designing efficient event manager as well.&#xD;&#xA;&#xD;&#xA;My question is, whether this is proven and recommended approach. If it is not properly designed, it might mean consuming a lot of CPU cycles, which can be used elsewhere. This is especially true, if the game is targetted for mobile platform.&#xD;&#xA;&#xD;&#xA;What is your opinion and recommendation, please?" />
  <row Id="15599" PostHistoryTypeId="6" PostId="7718" RevisionGUID="824938cf-83a7-45fe-bce2-ec87c9c524f7" CreationDate="2011-01-25T18:52:00.430" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="15600" PostHistoryTypeId="6" PostId="7713" RevisionGUID="057b7983-825a-4db5-8816-51f86c020a41" CreationDate="2011-01-25T18:52:46.950" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;" />
  <row Id="15601" PostHistoryTypeId="2" PostId="7719" RevisionGUID="5de22c6a-1509-479a-982e-2243ffc2b089" CreationDate="2011-01-25T18:57:45.803" UserId="189" Text="A better question is, what alternatives are there? In such a complex system with properly divided modules for physics, AI, etc., how else can you orchestrate these systems?&#xD;&#xA;&#xD;&#xA;Message passing does seem to be the &quot;best&quot; solution to this problem. I can't think of alternatives right now. But there are plenty of examples of message passing in practice. In fact, operating systems use message passing for several of their functions. From [Wikipedia][1]:&#xD;&#xA;&#xD;&#xA;&gt; Messages are also commonly used in the same sense as a means of interprocess communication; the other common technique being streams or pipes, in which data are sent as a sequence of elementary data items instead (the higher-level version of a virtual circuit).&#xD;&#xA;&#xD;&#xA;(Interprocess communication is the communication between processes (i.e. running instances of programs) within the operating system environment)&#xD;&#xA;&#xD;&#xA;So if it's good enough for an operating system, it's probably good enough for a game, right? There are other benefits as well, but I'll let the [Wikipedia article on message passing][2] do the explaining.&#xD;&#xA;&#xD;&#xA;I also asked a question on Stack Overflow, [&quot;Data structures for message passing within a program?&quot;][3], which you might want to read over.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/w/index.php?title=Message_passing&amp;oldid=409001293&#xD;&#xA;  [2]: http://en.wikipedia.org/w/index.php?title=Message_passing&amp;oldid=409001293&#xD;&#xA;  [3]: http://stackoverflow.com/questions/1189236/data-structures-for-message-passing-within-a-program" />
  <row Id="15602" PostHistoryTypeId="2" PostId="7720" RevisionGUID="e1e98d9d-0834-4c3c-9a51-8e1a0ed23678" CreationDate="2011-01-25T19:09:14.090" UserId="2332" Text="Take your pick:&#xD;&#xA;&#xD;&#xA;http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html&#xD;&#xA;&#xD;&#xA;There's a load of heuristics described in that link, either for speed or accuracy. There's always a trade-off, so I would assume that developers would use the most accurate heuristic that would cause minimal impact to their game's performance." />
  <row Id="15603" PostHistoryTypeId="5" PostId="7715" RevisionGUID="64302862-3a5f-4d0b-8b34-b43d0081047c" CreationDate="2011-01-25T19:10:32.030" UserId="189" Comment="added 20 characters in body; added 39 characters in body" Text="There is almost always a tradeoff between the clarity of the code and the technical requirements (speed, memory, etc.) of the program. Object-oriented languages have an overhead compared to procedural languages, but they have been shown to have many advantages over procedural languages, especially in long-term maintenance of code (bugs, etc.) and often development speed as well.&#xD;&#xA;&#xD;&#xA;So with that in mind, I propose that whatever tiny difference in memory usage or speed it might make, **MVC is worth implementing for your sake as the game programmer**. Your code will better follow object-oriented principles, especially [encapsulation][1], and you will likely have a much easier time maintaining it (fixing bugs or adding new features).&#xD;&#xA;&#xD;&#xA;On the other hand, make sure to actually finish a game and not spend so much time working on the &quot;engine&quot; that it never gets done.&#xD;&#xA;&#xD;&#xA;For more info, please read the question [&quot;Why are MVC &amp; TDD not employed more in game architecture?&quot;][2] and my really long answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture" />
  <row Id="15604" PostHistoryTypeId="5" PostId="7715" RevisionGUID="3d4eae08-a17a-4d2b-a0a9-02f2ada6811e" CreationDate="2011-01-25T19:16:50.257" UserId="189" Comment="deleted 65 characters in body" Text="There is almost always a tradeoff between the clarity of the code and the technical requirements (speed, memory, etc.) of the program. Object-oriented languages have an overhead compared to procedural languages, but they have been shown to have many advantages over procedural languages, especially in long-term maintenance of code (bugs, etc.) and often development speed as well.&#xD;&#xA;&#xD;&#xA;So with that in mind, I propose that **MVC is worth implementing for your sake as the game programmer**. Your code will better follow object-oriented principles, especially [encapsulation][1], and you will likely have a much easier time maintaining it (fixing bugs or adding new features).&#xD;&#xA;&#xD;&#xA;On the other hand, make sure to actually finish a game and not spend so much time working on the &quot;engine&quot; that it never gets done.&#xD;&#xA;&#xD;&#xA;For more info, please read the question [&quot;Why are MVC &amp; TDD not employed more in game architecture?&quot;][2] and my really long answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture" />
  <row Id="15608" PostHistoryTypeId="4" PostId="7718" RevisionGUID="0dd4e606-a7dc-4a20-bd20-481c6de30ef5" CreationDate="2011-01-25T19:22:00.347" UserId="2229" Comment="edited tags; edited title" Text="Event Driven Communication in Game Engine - Yes or No?" />
  <row Id="15609" PostHistoryTypeId="6" PostId="7718" RevisionGUID="0dd4e606-a7dc-4a20-bd20-481c6de30ef5" CreationDate="2011-01-25T19:22:00.347" UserId="2229" Comment="edited tags; edited title" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="15610" PostHistoryTypeId="2" PostId="7722" RevisionGUID="8ceecce1-6f94-4528-ad30-59dcdf7604ec" CreationDate="2011-01-25T19:35:20.830" UserId="4854" Text="An operating system is build to be stable, efficient and as fast as possible since it is a real time application. Why would you say that an operating system has less contraints than a video game ?" />
  <row Id="15611" PostHistoryTypeId="2" PostId="7723" RevisionGUID="a6bb4063-1c4b-47f5-8dc6-7d8220d7e8a2" CreationDate="2011-01-25T19:42:22.317" UserId="744" Text="My opinion is that you should just start making your game and implement what you're comfortable with. As you do that you'll find yourself using MVC some places, but not others; events some places, but not others; components some places, but inheritance others; clean design some places, and crufty design others.&#xD;&#xA;&#xD;&#xA;And that's OK, because when you're done you'll actually have a game, and a game is way cooler than a message-passing system." />
  <row Id="15613" PostHistoryTypeId="6" PostId="7718" RevisionGUID="e20c4e33-6440-417d-9132-9b50c9248dec" CreationDate="2011-01-25T19:51:00.620" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;events&gt;" />
  <row Id="15614" PostHistoryTypeId="2" PostId="7724" RevisionGUID="ed27a8ed-ba5a-4f8b-bde0-5d6b88248546" CreationDate="2011-01-25T19:55:11.333" UserId="1156" Text="A very, very rough (but very speedy) heuristic to use is:&#xD;&#xA;&#xD;&#xA;    vec1 = start vector&#xD;&#xA;    vec2 = end vector&#xD;&#xA;    &#xD;&#xA;    heuristic = abs(vec2.x - vec1.x) + abs(vec2.y - vec1.y))&#xD;&#xA;&#xD;&#xA;This avoids any square rooting, which could be costly (Pythagorean distance).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15615" PostHistoryTypeId="4" PostId="7714" RevisionGUID="991bbe47-e3aa-4944-a5ed-5f8e0c885b89" CreationDate="2011-01-25T19:55:57.307" UserId="1156" Comment="edited title" Text="What heuristics are used in NavMeshes?" />
  <row Id="15617" PostHistoryTypeId="2" PostId="7725" RevisionGUID="408e8ef2-8e3b-4cb4-9f83-587e7850ecd3" CreationDate="2011-01-25T20:45:08.667" UserId="4443" Text="Cut and paste of my comment that was suggested I make it a full answer. I have added in a bit more here to actually try and flesh it out into an answer.&#xD;&#xA;&#xD;&#xA;Yes, plain and simple.. Communication needs to happen and while there are situations where 'Are we there yet?' type of polling is required, you generally are wasting time having things check to see if they should be doing something else, when you can have them react to things they are told to do... Plus... a well defined communication pathway between objects/systems/modules helps significantly in multithreaded/process/core/computer setups&#xD;&#xA;&#xD;&#xA;Also, [over on Stack Overflow][1] I gave a general high level view of an event messaging system I have used from school into professional gaming titles and now non-gaming products, refined a bit each time to their specific usage of course, hehe..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4574016/game-objects-talking-to-each-other/4580241#4580241" />
  <row Id="15618" PostHistoryTypeId="5" PostId="7724" RevisionGUID="3cd67c98-0fe2-49d4-9e99-e897380e32b3" CreationDate="2011-01-25T21:07:44.580" UserId="1156" Comment="added 21 characters in body" Text="A very, very rough (but very speedy) heuristic to use is: (Manhattan distance)&#xD;&#xA;&#xD;&#xA;    vec1 = start vector&#xD;&#xA;    vec2 = end vector&#xD;&#xA;    &#xD;&#xA;    heuristic = abs(vec2.x - vec1.x) + abs(vec2.y - vec1.y))&#xD;&#xA;&#xD;&#xA;This avoids any square rooting, which could be costly (Pythagorean distance).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15619" PostHistoryTypeId="2" PostId="7726" RevisionGUID="c427dcd9-1f9a-45d2-88cf-6b209842a41b" CreationDate="2011-01-25T22:28:21.877" UserId="4677" Text="From what I have seen, it doesn't seem to be very common to have an engine completely based on messaging. Of course, there are subsystems which lend themselves very well to such a messaging system, like networking, GUI, and possibly others. In general though, there are a few problems I can think of:&#xD;&#xA;&#xD;&#xA; - Game engines deal with large amounts of data.&#xD;&#xA; - Games have to be fast (20-30 FPS should be the minimum).&#xD;&#xA; - Often it is necessary to know if something has been done or when it will be done.&#xD;&#xA;&#xD;&#xA;With the common game developer approach of &quot;it has to be efficient as possible&quot; such messaging system are thus not that common.&#xD;&#xA;&#xD;&#xA;However, I agree that you should just go ahead and try it. There certainly are lots advantages with such a system and computing power is cheaply available today." />
  <row Id="15620" PostHistoryTypeId="2" PostId="7727" RevisionGUID="2bae5277-eb4f-436d-981c-7c7282c33d69" CreationDate="2011-01-25T22:50:43.563" UserId="2778" Text="As being Scrum certified, I tend to prone for Agile methodologies while developping a system, and even use some canvas from the Scrum framework to manage my day-to-day work.&#xD;&#xA;&#xD;&#xA;Besides, I am wondering whether TDD is an option in game development, if it is viable?&#xD;&#xA;&#xD;&#xA;If I believe this GD question, TDD is not much of a use in game development.&lt;br&gt;&#xD;&#xA;[Why are MVC &amp; TDD not employed more in game architecture?][1]&#xD;&#xA;&#xD;&#xA;I come from industrial programming where big projects with big budgets need to work flawlessly, as it could result to catastrophic scenarios if the code wasn't throroughly tested inside and out.&#xD;&#xA;&#xD;&#xA;Plus, following Scrum rules encourages meeting the due dates of your work while every single action in Scrum is time-boxed! So, I agree when in the question linked above they say to stop trying to build a system, and start writing the game. It is quite what Scrum says, try not to build the perfect system, first: make it work by the Sprint end. Then, refactor the code while working in the second Sprint if needed!&#xD;&#xA;&#xD;&#xA;I understand that if not all departments responsible for the game development use Scrum, Scrum becomes useless. But let's consider for a moment that all the departments do use Scrum... I think that TDD would be good to write bug-free code, though you do not want to write the &quot;perfect&quot; system/game.&#xD;&#xA;&#xD;&#xA;So my question is the following:&#xD;&#xA;&#xD;&#xA;**Is TDD viable in game development anyhow?**&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture" />
  <row Id="15621" PostHistoryTypeId="1" PostId="7727" RevisionGUID="2bae5277-eb4f-436d-981c-7c7282c33d69" CreationDate="2011-01-25T22:50:43.563" UserId="2778" Text="Is TDD viable in game development?" />
  <row Id="15622" PostHistoryTypeId="3" PostId="7727" RevisionGUID="2bae5277-eb4f-436d-981c-7c7282c33d69" CreationDate="2011-01-25T22:50:43.563" UserId="2778" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;programming&gt;&lt;methodology&gt;&lt;tdd&gt;" />
  <row Id="15623" PostHistoryTypeId="25" PostId="7718" RevisionGUID="389299ff-d831-4131-b975-9088195d065e" CreationDate="2011-01-25T22:55:49.217" Comment="http://twitter.com/#!/StackGameDev/status/30036142682279936" />
  <row Id="15624" PostHistoryTypeId="2" PostId="7728" RevisionGUID="0c3565a2-c699-49f2-9d0b-d739ddd7afd2" CreationDate="2011-01-25T22:56:56.610" UserId="4914" Text="are you escaping with [mysql_real_escape_string()][1] ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://us2.php.net/manual/en/function.mysql-real-escape-string.php" />
  <row Id="15625" PostHistoryTypeId="6" PostId="7727" RevisionGUID="ce6ced2c-1a48-44fe-826f-e848726ca59a" CreationDate="2011-01-25T23:00:05.487" UserId="744" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;methodology&gt;&lt;testing&gt;" />
  <row Id="15626" PostHistoryTypeId="6" PostId="7727" RevisionGUID="8444b363-462e-4a91-a156-820618423f94" CreationDate="2011-01-25T23:02:33.357" UserId="2778" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;methodology&gt;&lt;testing&gt;&lt;tdd&gt;" />
  <row Id="15627" PostHistoryTypeId="2" PostId="7729" RevisionGUID="63fe723b-76ba-43cd-bd74-684745ad89a3" CreationDate="2011-01-25T23:09:42.207" UserId="4901" Text="For requirements, I would assume minimum things required to run you game.&#xD;&#xA;It will depend on what technologies you use to develop your games. &#xD;&#xA;&#xD;&#xA;For example, if you use specific APIs, such as D3D9 or OpenGL 3.0, you will need to specific that, because certain APIs are not downward compatible.  &#xD;&#xA;&#xD;&#xA;If you build with windows with .net framework, you will also need to specific that as well. &#xD;&#xA;&#xD;&#xA;For performance requirements, trying on different machines are pretty much the best way to go, though you may be able to measure the related performance by calculation. &#xD;&#xA;&#xD;&#xA;for example, if your current video card runs at 60 fps, and another computer with the similar configuration, except the video card is half speed of yours, should run about the half speed of your machine. Again, this is just an estimate, many others properties will hit the performance differently, but you can use that base info to test your game on targeted devices. &#xD;&#xA;&#xD;&#xA;Hope that helps, and anyone is welcome to correct me for any reasons.    " />
  <row Id="15628" PostHistoryTypeId="2" PostId="7730" RevisionGUID="f3ab9fce-94d6-459f-a5c1-c18bc33e407b" CreationDate="2011-01-25T23:20:05.747" UserId="51" Text="It's certainly viable, although a lot of game programmers haven't really gotten on board with the idea yet, or have a good understanding of how to test complicated systems.  I admit myself that I rarely use it, except for non-gameplay-related systems that are easy to test.&#xD;&#xA;&#xD;&#xA;Expect to use a lot of mock objects. Because of how tied together a lot of systems are, it's hard to test individual components of that.&#xD;&#xA;&#xD;&#xA;Plus a lot of things can't be thoroughly tested.  How do you test-drive, say, a particle system?  How do you test that your animation system is working correctly?  A lot of things are visual in nature, and aren't obvious (at least to me) as to how to do proper testing.&#xD;&#xA;&#xD;&#xA;There are, however, a lot of things that aren't necessarily unit tests in the traditional sense of the word, but that exists as &quot;tests&quot; for specific features.  Things like test levels for AI navigation are pretty common, but aren't necessarily the easiest things to automate.&#xD;&#xA;&#xD;&#xA;There are certain aspects of games that can (and probably should) have unit tests written for them.  Any kind of generic &quot;file reading&quot; system should be tested.  Maybe have some tests for initialization of hardware things (3d surfaces, etc).  Maybe have some mock servers and test your client/server interaction code.  Things like that." />
  <row Id="15629" PostHistoryTypeId="5" PostId="7725" RevisionGUID="ac08109f-c684-4558-914f-9da830d01e89" CreationDate="2011-01-25T23:21:35.323" UserId="4443" Comment="Added in more information to answer questions in the comments." Text="Cut and paste of my comment that was suggested I make it a full answer. I have added in a bit more here to actually try and flesh it out into an answer.&#xD;&#xA;&#xD;&#xA;Yes, plain and simple.. Communication needs to happen and while there are situations where 'Are we there yet?' type of polling is required, you generally are wasting time having things check to see if they should be doing something else, when you can have them react to things they are told to do... Plus... a well defined communication pathway between objects/systems/modules helps significantly in multithreaded/process/core/computer setups&#xD;&#xA;&#xD;&#xA;Also, [over on Stack Overflow][1] I gave a general high level view of an event messaging system I have used from school into professional gaming titles and now non-gaming products, refined a bit each time to their specific usage of course, hehe..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: To address the question in the comments of how do you know which objects should get the message, the objects themselves should Request to be notified about the events. Your EventMessagingSystem (EMS) will need a Register(int iEventId, IEventMessagingSystem * pOjbect, (EMSCallback)fpMethodToUseForACallback) as well as a matching Unregister (making a unique entry for an iEventId out of the object pointer and callback). This way, when an object wants to know about a message it can Register() with the system. When it no longer needs to know about the events it can Unregister().. Clearly you would want a pool of these callback registration objects and an effective way to add/remove them from lists (I personally have used self ordering arrays (fancy way of saying they track their own allocations between a pool stack of unused objects and arrays that shift their sizes in place when needed) for the most part).&#xD;&#xA;&#xD;&#xA;Hope this helps clear up your latest concern :)&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4574016/game-objects-talking-to-each-other/4580241#4580241" />
  <row Id="15630" PostHistoryTypeId="2" PostId="7731" RevisionGUID="683d13c6-7870-46be-9c63-ee8d04959965" CreationDate="2011-01-26T00:08:51.447" UserId="4191" Text="I don't think TDD, as such, is appropriate as a foundation for game development.  Automated unit testing as part of methodology, sure, but too many of the key concerns of game development are subjective and untestable for testing to be the *driver* of development.  How are you going to write a test for whether a game mechanic is fun?  That a level is visually appealing?  Even that a level takes a typical player around 15 minutes to complete?  TDD fits situations where the maturity of a project can be measured in terms of its compliance to a specification, and that just isn't game development." />
  <row Id="15631" PostHistoryTypeId="4" PostId="7727" RevisionGUID="255aa1d4-1a73-4f97-a494-e84c38f55c84" CreationDate="2011-01-26T00:46:42.063" UserId="154" Comment="Expanded the acronym in the title to help avoid confusion" Text="Is Test Driven Development viable in game development?" />
  <row Id="15632" PostHistoryTypeId="2" PostId="7732" RevisionGUID="be5469e2-c9a2-4696-8306-953e725d0045" CreationDate="2011-01-26T00:53:19.427" UserId="4191" Text="Wow.  This actually seems like a situation where old-school AI semantic webs, like Richard Bartle thought were going to be important to the future of games when he wrote *[Artificial Intelligence and Computer Games][1]*, would be useful.  You basically have a couple of data lists (database tables, whatever), the first of which specifies rules about how things can relate to each other, like:&#xD;&#xA;&#xD;&#xA;    a PERSON must LIVE IN a DOMICILE&#xD;&#xA;    a PERSON must OWN an ANIMAL&#xD;&#xA;    a PERSON must DRINK a BEVERAGE&#xD;&#xA;    a PERSON must SMOKE a CIGARETTE BRAND&#xD;&#xA;    a PERSON must BE OF a NATIONALITY&#xD;&#xA;    a DOMICILE must BE IN a POSITION&#xD;&#xA;    a DOMICILE must BE OF a COLOR&#xD;&#xA;&#xD;&#xA;Then you have instances of the categories:&#xD;&#xA;&#xD;&#xA;    ANIMAL: dog snail zebra fox horse&#xD;&#xA;    BEVERAGE: milk tea OJ coffee water&#xD;&#xA;    CIGARETTE BRAND: Kools Parliaments Luckies OldGold Chesterfields&#xD;&#xA;    NATIONALITY: Englishman Spaniard Ukrainian Japanese Norwegian&#xD;&#xA;    POSITION: first second third fourth fifth&#xD;&#xA;    COLOR: red green yellow ivory blue&#xD;&#xA;&#xD;&#xA;These data structures don't completely encapsulate the situation -- you need the uniqueness constraints, and some of the categories need meta-rules, like `POSITION` needs handling of the &quot;to the right of&quot;, &quot;to the left of&quot;, and &quot;next to&quot; concepts, for example -- but the structure of the problem seems to strongly suggest them.&#xD;&#xA;&#xD;&#xA;Dunno if this will take you very far, but I hope it helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Artificial-Intelligence-Computer-Richard-Bartle/dp/0712606610" />
  <row Id="15633" PostHistoryTypeId="2" PostId="7733" RevisionGUID="c0b84285-7978-4b3e-aec6-cc1922bf29bb" CreationDate="2011-01-26T01:08:02.577" UserId="1101" Text="It's a bit difficult to work out exactly what you're asking since the title is purely about TDD but you seem to be making Scrum an integral part of the question too - and as I understand it, one does not require the other.&#xD;&#xA;&#xD;&#xA;&gt; If I believe this GD question, TDD is not much of a use in game development.&#xD;&#xA;&#xD;&#xA;That is correct. I don't think I've ever heard of it used in practice in the games industry. (But then I never heard of it used outside the games industry either - just by individuals.)&#xD;&#xA;&#xD;&#xA;&gt; I come from industrial programming where big projects with big budgets need to work flawlessly, as it could result to catastrophic scenarios if the code wasn't throroughly tested inside and out.&#xD;&#xA;&#xD;&#xA;Games don't need to work flawlessly. So there is much less emphasis on code correctness. TDD doesn't guarantee code correctness, but some people feel it reduces the incorrectness. I'm yet to see proof of this.&#xD;&#xA;&#xD;&#xA;&gt; Plus, following Scrum rules encourages meeting the due dates of your work while every single action in Scrum is time-boxed!&#xD;&#xA;&#xD;&#xA;I've never seen a methodology that didn't encourage meeting due dates, or having actions that weren't time-boxed. The problem is that no matter what methodology you use, estimating software complexity is quite hard. It's not impossible, but estimating it accurately is not much to do with the process. If my task is to add a new GUI panel, or to fix a bug with the animation, or add a new statistic to characters, then the use of Scrum is not going to speed that up at all, and the use of TDD is going to slow down the task (at the possible benefit of reducing further maintenance tasks later). They're certainly not going to make it easier to estimate the task duration.&#xD;&#xA;&#xD;&#xA;&gt; I think that TDD would be good to write bug-free code, though you do not want to write the &quot;perfect&quot; system/game.&#xD;&#xA;&#xD;&#xA;If TDD is proven to write better code than other methods, then yes.&#xD;&#xA;&#xD;&#xA;Is there proof of this? The fact that industry might use it is not proof. Industry is well known for producing poor code that is delivered late. The absence of examples of major TDD projects that have failed or run late may just be because it's a new approach and few people have actually finished such a project yet. (And the ones that are running late... may still be running.)&#xD;&#xA;&#xD;&#xA;&gt; Is TDD viable in game development anyhow?&#xD;&#xA;&#xD;&#xA;Viable? Of course. Beneficial? That's yet to be proven.&#xD;&#xA;" />
  <row Id="15634" PostHistoryTypeId="25" PostId="7727" RevisionGUID="27825395-5908-4152-a829-cc3b6a66a44a" CreationDate="2011-01-26T01:55:49.497" Comment="http://twitter.com/#!/StackGameDev/status/30081442432155649" />
  <row Id="15635" PostHistoryTypeId="25" PostId="7714" RevisionGUID="731538f0-80b1-4626-889e-a1b663f2bb18" CreationDate="2011-01-26T07:55:49.950" Comment="http://twitter.com/#!/StackGameDev/status/30172041197912065" />
  <row Id="15636" PostHistoryTypeId="2" PostId="7734" RevisionGUID="e3f76258-7dc3-4104-ba9f-b622e34c287c" CreationDate="2011-01-26T08:16:11.637" UserId="962" Text="No, Test Driven Development is not suited for Game Development. Sure you can write tests for some parts you do want to test, but the Game Development process is completely different from Test Driven Development which requires having exact specifications before progress is started.&#xD;&#xA;&#xD;&#xA;Games rarely have exact specifications when started. And if they do, they always change and evolve during the development process.&#xD;&#xA;&#xD;&#xA;**Game design is an art, you can't have specific tests to know when art is good or complete.**" />
  <row Id="15637" PostHistoryTypeId="2" PostId="7735" RevisionGUID="8c3fdeea-2e15-41be-8f31-b3527f11fc8d" CreationDate="2011-01-26T11:05:09.607" UserId="1163" Text="I have a polygon (sometimes convex, but often concave), and a bunch of circles with different radius. How can I find out if a circle is intersecting/overlapping with the polygon?&#xD;&#xA;&#xD;&#xA;If it makes it easier, then I can split my concave polygon into convex pieces no problem. Would this help to solve the problem? Or just an unnecessary step?" />
  <row Id="15638" PostHistoryTypeId="1" PostId="7735" RevisionGUID="8c3fdeea-2e15-41be-8f31-b3527f11fc8d" CreationDate="2011-01-26T11:05:09.607" UserId="1163" Text="How to find if circle and concave polygon intersect?" />
  <row Id="15639" PostHistoryTypeId="3" PostId="7735" RevisionGUID="8c3fdeea-2e15-41be-8f31-b3527f11fc8d" CreationDate="2011-01-26T11:05:09.607" UserId="1163" Text="&lt;collision-detection&gt;&lt;geometry&gt;&lt;computational-geometry&gt;" />
  <row Id="15640" PostHistoryTypeId="2" PostId="7736" RevisionGUID="d8a30227-d2ed-4b29-91fd-0ef3ab486c8b" CreationDate="2011-01-26T11:25:31.423" UserId="2229" Text="The **traditional game design**, as I know it, uses Object Oriented programming with polymorphism and virtual functions. In other words, the same set of virtual functions are called in regular intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a newer game design approach available, called **patterns**. Using patterns, a highly effective event messaging system is built, and game objects react after only obtaining proper message.&#xD;&#xA;&#xD;&#xA;**Could I kindly ask to compare the two approaches:** &#xD;&#xA;&#xD;&#xA; - What are their advantages and disadvantages? &#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is patterns game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15641" PostHistoryTypeId="1" PostId="7736" RevisionGUID="d8a30227-d2ed-4b29-91fd-0ef3ab486c8b" CreationDate="2011-01-26T11:25:31.423" UserId="2229" Text="OO Design with Polymorphism Versus OO Patterns design - Comparison." />
  <row Id="15642" PostHistoryTypeId="3" PostId="7736" RevisionGUID="d8a30227-d2ed-4b29-91fd-0ef3ab486c8b" CreationDate="2011-01-26T11:25:31.423" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;design-patterns&gt;&lt;patterns&gt;" />
  <row Id="15643" PostHistoryTypeId="4" PostId="7736" RevisionGUID="5db5cab4-13cc-4aa3-a389-78b38ea69379" CreationDate="2011-01-26T11:32:18.807" UserId="2229" Comment="edited title; added 6 characters in body" Text="Virtual Functions Versus Patterns in Game Design - Comparison." />
  <row Id="15644" PostHistoryTypeId="5" PostId="7736" RevisionGUID="5db5cab4-13cc-4aa3-a389-78b38ea69379" CreationDate="2011-01-26T11:32:18.807" UserId="2229" Comment="edited title; added 6 characters in body" Text="The **traditional game design**, as I know it, uses Object Oriented programming with polymorphism and virtual functions. In other words, the same set of virtual functions are called in regular intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a newer game design approach available, called **patterns**. Using patterns, a highly effective event messaging system is built, and game objects react after only obtaining proper event message.&#xD;&#xA;&#xD;&#xA;**Could I kindly ask to compare the two approaches:** &#xD;&#xA;&#xD;&#xA; - What are their advantages and disadvantages? &#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is patterns game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15645" PostHistoryTypeId="2" PostId="7737" RevisionGUID="55700d13-b565-44c8-a877-02fb2cfe8015" CreationDate="2011-01-26T11:39:22.563" UserId="3794" Text="there are two cases of this problem. First is the intersection and second that is overlaping (containing).&#xD;&#xA;&#xD;&#xA;**First (intersection / polygon inside circle):**&#xD;&#xA;&#xD;&#xA;Find closest point on every edge of the polygon to the circle's center. If any distance between closest point to the center is less than radius, you got intersection or overlap.&#xD;&#xA;&#xD;&#xA;**Second (circle is whole in polygon):**&#xD;&#xA;Shoot ray from circle center to the right (or left/up/down) and count ray/segment (polygon edges) intersections. If intersection count is even circle is outside of polygon. If it's odd circle is inside. &#xD;&#xA;&#xD;&#xA;I'll share picter from lectue for this case:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;And take care of the singular cases.&#xD;&#xA;&#xD;&#xA;Hope this will help.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/PK2kz.png" />
  <row Id="15646" PostHistoryTypeId="4" PostId="7736" RevisionGUID="747fd7d0-bea3-4c99-b7e7-cddc899c35dc" CreationDate="2011-01-26T11:40:54.237" UserId="2229" Comment="edited title" Text="Polymorphism Versus Patterns in Game Design - Comparison" />
  <row Id="15647" PostHistoryTypeId="2" PostId="7738" RevisionGUID="eaeb1b97-bc2d-4122-ab18-2048b3b0a2bf" CreationDate="2011-01-26T11:42:32.190" UserId="744" Text="The first step, as you guess, is to split the concave polygon into multiple convex ones. The reason for this is that you'll use &lt;a href=&quot;http://en.wikipedia.org/wiki/Separating_Axis_Theorem&quot;&gt;the separating axis theorem&lt;/a&gt;, which only works on convex polygons.&#xD;&#xA;&#xD;&#xA;SAT per se only works on two convex polygons. The &quot;separating axis&quot; in the name refers to the axes perpendicular to the edges of the polygon. Circles, unfortunately, have an infinite number of these. However, it turns out there's a pretty easy way to find out which of those axes are relevant, by looking at this which project outwards to intersect the vertices of the polygon.&#xD;&#xA;&#xD;&#xA;Rather than go over the entire algorithm here, Metanet Software (makers of N/N+) have a &lt;a href=&quot;http://www.metanetsoftware.com/technique/tutorialA.html&quot;&gt;good tutorial on collision detection using SAT&lt;/a&gt;, the &lt;a href=&quot;http://www.metanetsoftware.com/technique/tutorialA.html#section3&quot;&gt;third section of which covers SAT when one of the objects is a circle&lt;/a&gt;." />
  <row Id="15648" PostHistoryTypeId="5" PostId="7736" RevisionGUID="39e9f1f5-22a3-47f2-9a3c-8b87d09d8f4c" CreationDate="2011-01-26T12:02:19.787" UserId="2229" Comment="I probably wrongly called Event Driven Messaging as a Game Patterns approach. To avoid confusion, I corrected it everywhere in the text.; added 214 characters in body; edited title" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions**. In other words, the same set of virtual functions are called in regular intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available, where a highly effective **event messaging system** is built, and game objects react only after they obtain proper event message.&#xD;&#xA;&#xD;&#xA;**Could I kindly ask to compare the two approaches:** &#xD;&#xA;&#xD;&#xA; - What are their advantages and disadvantages? &#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;Event Driven Game Architecture is well described in: Game Coding Complete by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15649" PostHistoryTypeId="4" PostId="7736" RevisionGUID="39e9f1f5-22a3-47f2-9a3c-8b87d09d8f4c" CreationDate="2011-01-26T12:02:19.787" UserId="2229" Comment="I probably wrongly called Event Driven Messaging as a Game Patterns approach. To avoid confusion, I corrected it everywhere in the text.; added 214 characters in body; edited title" Text="Polymorphism Versus Event Driven Messaging in Game Design" />
  <row Id="15650" PostHistoryTypeId="6" PostId="7736" RevisionGUID="39e9f1f5-22a3-47f2-9a3c-8b87d09d8f4c" CreationDate="2011-01-26T12:02:19.787" UserId="2229" Comment="I probably wrongly called Event Driven Messaging as a Game Patterns approach. To avoid confusion, I corrected it everywhere in the text.; added 214 characters in body; edited title" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;design-patterns&gt;&lt;events&gt;&lt;patterns&gt;" />
  <row Id="15651" PostHistoryTypeId="5" PostId="7736" RevisionGUID="711cc3ef-99b7-49d5-ba26-6b9b3dc626cc" CreationDate="2011-01-26T12:07:47.623" UserId="2229" Comment="added 13 characters in body" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions**. In other words, the same set of virtual functions are called in regular intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available, where a highly effective **event messaging system** is built, and game objects react only after they obtain proper event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Could I kindly ask to compare the two approaches:** &#xD;&#xA;&#xD;&#xA; - What are their advantages and disadvantages? &#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15652" PostHistoryTypeId="2" PostId="7739" RevisionGUID="de7f46bd-eb96-41e1-af33-65ebcada51c4" CreationDate="2011-01-26T12:22:51.163" UserId="4508" Text="sorry for my poor english and sorry for my biased point of view: i am not a game designer but a coder.&#xD;&#xA;&#xD;&#xA;I think there are some misunderstanding in this discussion. i'll talk about TDD in more general form, the so called BDD. Behavior driven development is not a way to test project (the tests are something like side effects). &#xD;&#xA;__BDD is a way to design__, a way to do refactor and software design during all the production (see some mottos as KISS, &quot;keep quality in&quot;, &quot;test early, test often&quot;) and not in a alone phase. BDD is the opposite of some classical software process like waterfall process or some other iterative methodology to make software.&#xD;&#xA;&#xD;&#xA;Another point is that automatic tests are for that features that could be tested automatically by a computational machine. there is no test for fun in games, and there is no test for usability of a graphical user interface. fun or usability are materials for other jobs and not for software development like interaction designer, world and level d. in the same way that artistic parts(modelling, texturing, etc) are for artist that use computers as tool for creativity - obviously those jobs could be performed by the same person that write code, but this is not the point. &#xD;&#xA;physics could be tested, optimization algorithms could be tested, singual object behaviours could be tested (with mocks, stubs and dummy as mentioned before)&#xD;&#xA;&#xD;&#xA;the last think is that, imho, is that not only game design but whole writing code is an art." />
  <row Id="15653" PostHistoryTypeId="5" PostId="7736" RevisionGUID="798818f3-2fbe-4eb1-9138-dfa73a4fc4e5" CreationDate="2011-01-26T12:35:38.657" UserId="2229" Comment="deleted 38 characters in body" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions**. In other words, the same set of virtual functions are called in regular intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available, where a highly effective **event messaging system** is built, and game objects react only after they obtain proper event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15654" PostHistoryTypeId="2" PostId="7740" RevisionGUID="b8d0eb85-45d5-451f-bcc9-4e0eea8d94e6" CreationDate="2011-01-26T13:11:14.120" UserDisplayName="user4939" Text="Have to agree about canvas slowness on iPhone 4.  Pretty sure safari canvas is not being backed by GL.  My cheezy game runs fast on iPhone 3GS and android but on iPhone 4 I think the retina display has too many pixels, or if canvas isn't riding on GL, this would explain why it drags. I like the canvas development model, haven't tried the css translate3d option yet.  In particular I used GWT and the gwt-g2d canvas wrapper (optimization/obfuscation).   http://www.photonjunky.com/shootout.html" />
  <row Id="15655" PostHistoryTypeId="5" PostId="7736" RevisionGUID="cecd9f2c-a525-4e3f-84af-66c8aae24633" CreationDate="2011-01-26T13:16:00.557" UserId="2229" Comment="added 57 characters in body" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions**. In other words, the same set of virtual functions are called in regular intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available, where a highly effective **event messaging system** is built, and game objects react only after they obtain proper event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15656" PostHistoryTypeId="5" PostId="7700" RevisionGUID="274e7954-9822-4dd5-b119-81d85acbc4d2" CreationDate="2011-01-26T13:17:12.937" UserId="2698" Comment="More intuitive name: paddleTop -&gt; paddleEdge" Text="To split a paddle into four sections along its Y-axis, you could measure penetration percentage through the bat. Hitting the top would be `0.0f`, the bottom would be `1.0f`. The second quarter would be between `0.25f` and `0.5f`, etc.&#xD;&#xA;&#xD;&#xA;Following is a method to calculate the penetration depth and a method which translates that into the far more important quarter.&#xD;&#xA;&#xD;&#xA;    // Note: This method can return a value &gt; 1.0 or &lt; 0.0 if the paddle and ball are&#xD;&#xA;    // not actually colliding.&#xD;&#xA;    float PenetrationDepth(Vector2 ballOrigin, Vector2 paddleOrigin, float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float paddleEdge = paddleOrigin.Y - paddleThickness * 0.5f;&#xD;&#xA;        float ballRelativePos = ballOrigin.Y - paddleEdge;&#xD;&#xA;&#xD;&#xA;        float ballDepth = ballRelativePos / paddleThickness;&#xD;&#xA;        return ballDepth;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    enum PenetrationQuarter { None = 0, First, Second, Third, Fourth }&#xD;&#xA;&#xD;&#xA;    PenetrationQuarter GetPenetrationQuarter(Vector2 ballOrigin, Vector2 paddleOrigin,&#xD;&#xA;        float paddleThickness)&#xD;&#xA;    {&#xD;&#xA;        float depth = PenetrationDepth(ballOrigin, paddleOrigin, paddleThickness);&#xD;&#xA;        if (depth &gt; 1.0f || depth &lt; 0.0f) return PenetrationQuarter.None;&#xD;&#xA;&#xD;&#xA;        int quarter = (int)(depth * 4) + 1;&#xD;&#xA;        // Edge case: If depth was 1.0, quarter will be 5, which is within quarter 4&#xD;&#xA;        if (quarter == 5) quarter = 4;&#xD;&#xA;&#xD;&#xA;        return (PenetrationQuarter)quarter;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Edit: Fixed some (fairly terrible) logic errors." />
  <row Id="15657" PostHistoryTypeId="2" PostId="7741" RevisionGUID="ebd3f2ff-2021-4524-8567-37405cde360f" CreationDate="2011-01-26T13:19:54.447" UserId="20" Text="I think you're comparing apples and oranges here. Polymorphism isn't replaced by messaging at all. You would probably want events/messaging to connect loosely coupled components. Eg. to send a message from an entity when a collision occurs, to update the player score or maybe to trigger a sound-effect. So that these individual classes don't know the other classes and just send out and/or handle messages.&#xD;&#xA;&#xD;&#xA;But your game is most likely going to have an update loop somewhere and since you *have* that update loop, it can easily be used to update all game entities that need to be updated every frame as well. This doesn't prevent you from using messaging though...&#xD;&#xA;&#xD;&#xA;If you have some sort of structure where you add/remove game-entities, you can just as well include them in your update loop instead of dispatching an *update* message to them every frame. So why not call *update* on your game entities directly while you're using messaging to connect different sub-systems of your game? I also like the Signal/Slot concept ([see qt example][1]) for event-like systems.&#xD;&#xA;&#xD;&#xA;Bottom line: There's no better approach, nor are they exclusive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://doc.qt.nokia.com/4.7/signalsandslots.html" />
  <row Id="15658" PostHistoryTypeId="4" PostId="7736" RevisionGUID="0285fdd4-77f4-4fa6-a31d-1169bedea405" CreationDate="2011-01-26T13:35:23.533" UserId="2229" Comment="edited title" Text="Virtual Function Calls Versus Event Driven Messaging in Game Design" />
  <row Id="15659" PostHistoryTypeId="2" PostId="7742" RevisionGUID="0b0ee9cb-0e77-428a-bc59-ca2749b80056" CreationDate="2011-01-26T13:38:10.607" UserId="2242" Text="I'll add to the list of commercial products Golaem (Full disclosure: I work for them).&#xD;&#xA;&#xD;&#xA;http://www.golaem.com&#xD;&#xA;&#xD;&#xA;Golaem Path is a real time 3D navigation library (path finding &amp; reactive navigation / steering behaviors). It is not marketed for game development but could be used for a game." />
  <row Id="15660" PostHistoryTypeId="4" PostId="7736" RevisionGUID="24ae6385-5a73-4be5-a7a2-20efb41529f9" CreationDate="2011-01-26T13:42:31.150" UserId="2229" Comment="edited title" Text="Virtual Function Calls versus Event Driven Messaging in Game Design" />
  <row Id="15661" PostHistoryTypeId="25" PostId="7735" RevisionGUID="c955ffe0-5dfd-49d0-85a2-c1b6cea0bd68" CreationDate="2011-01-26T13:55:49.653" Comment="http://twitter.com/#!/StackGameDev/status/30262637115740161" />
  <row Id="15662" PostHistoryTypeId="5" PostId="7742" RevisionGUID="baa66877-b3ac-459d-b192-8d08a15bf40c" CreationDate="2011-01-26T14:16:54.783" UserId="14" Comment="added 27 characters in body" Text="**Golaem** (Commerical)&#xD;&#xA;&#xD;&#xA;http://www.golaem.com&#xD;&#xA;&#xD;&#xA;I'll add to the list of commercial products Golaem (Full disclosure: I work for them).&#xD;&#xA;&#xD;&#xA;Golaem Path is a real time 3D navigation library (path finding &amp; reactive navigation / steering behaviors). It is not marketed for game development but could be used for a game." />
  <row Id="15663" PostHistoryTypeId="5" PostId="7736" RevisionGUID="cb75df5f-6218-482e-b8a8-9d1001d8b96b" CreationDate="2011-01-26T15:05:03.577" UserId="2229" Comment="added 15 characters in body; edited title" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions**. In other words, the same set of virtual functions are called in regular(ex: per-frame) intervals on every object in the game. This way, all the objects can update their game sate.&#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available, where a highly effective **event messaging system** is built, and game objects react only after they obtain proper event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15664" PostHistoryTypeId="4" PostId="7736" RevisionGUID="cb75df5f-6218-482e-b8a8-9d1001d8b96b" CreationDate="2011-01-26T15:05:03.577" UserId="2229" Comment="added 15 characters in body; edited title" Text="Per-Frame Function Calls versus Event Driven Messaging in Game Design" />
  <row Id="15665" PostHistoryTypeId="2" PostId="7743" RevisionGUID="d7bdf3a6-8e46-454f-8770-b83ea9960950" CreationDate="2011-01-26T15:14:34.873" UserId="1040" Text="I'm a full believer in necessity being the mother of invention.  I do not like to code anything unless its need is clear and well-defined.  I think that if you start your project by setting up an event messaging system, you're doing it wrong.  I believe that only once you've created and tested your infrastructure and have all the pieces to your project as well-defined, working modules should you focus on how you're going to connect these modules to each other.  Trying to design an event messaging system before you understand the shape and needs of each module is out of order.&#xD;&#xA;&#xD;&#xA;*What are the advantages and disadvantages of both approaches?*&#xD;&#xA;&#xD;&#xA;I think some people would argue that there are good messaging systems out there ready to be installed and used.  Perhaps this is true.  Certainly the performance of a custom-build solution specifically tailored to your needs would be greater than a general-purpose message bus.  The big question is - how much time are you going to spend building a messaging system rather than using something that has already been built.  Obviously, if you could find some sort of event system with exactly the feature set you need, then it's a pretty easy decision.  This is why I make sure that I understand exactly what I need before I make that decision.&#xD;&#xA;&#xD;&#xA;*Where is one better over the other?*&#xD;&#xA;&#xD;&#xA;We could talk about memory and resources here.  If you're developing for any hardware with limited resources, it's certainly an issue to use a event system that will cut into that significantly.  Really, though, I think the issue comes down to what you need, which as I mentioned already is something that you don't know until you see what all the pieces look like.  If you have enough experience building these systems that you know in advance exactly what all the pieces are going to look like, then you can answer this question in advance as well.  I'm guessing you don't have this experience, since you wouldn't be asking this question if you did.&#xD;&#xA;&#xD;&#xA;*Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mobile platforms?*&#xD;&#xA;&#xD;&#xA;Universal and better in all areas?  A pretty blanket statement like that is easily rejected.  Anything that adds overhead needs to be carrying its share of the workload.  If you're not using events enough to warrant the overhead of the design, then it's the wrong design.&#xD;&#xA;&#xD;&#xA;*Which one is more efficient and which is more difficult to develop?*&#xD;&#xA;&#xD;&#xA;Efficiency depends on how its implemented.  I think that a well-developed traditional design will out-perform an event-based system any day of the week.  This is because communication between pieces can be micro-managed and made super efficient.  Of course, this also makes it more difficult to design from the standpoint of experience and time required to complete it and make it more efficient.  On the other hand, if you lack this experience or don't have the time to develop the application well, then using an event based design that suits your needs will be more efficient.  If you have custom event needs that doesn't easily fit into an event-based structure, this could make the event-based structure very difficult to design - especially to keep the design efficient." />
  <row Id="15666" PostHistoryTypeId="2" PostId="7744" RevisionGUID="ba33773c-9fb5-42d2-bb8d-7ba7878f3764" CreationDate="2011-01-26T15:23:18.503" UserId="3656" Text="This started as a comment to bummzack's answer, but got long.&#xD;&#xA;&#xD;&#xA;Unless you actually make it asynchronous (dispatch events on a new thread), your objects are still getting the memo synchronously. Assuming your event dispatcher uses a basic hash table with a linked list in a cell, the order will be the order in which objects were aded to that cell.&#xD;&#xA;&#xD;&#xA;Further, unless you decide to use function pointers for some reason, you still are using virtual function calls since each object getting a message must implement IEventListener (or whatever you call it). Events are a high level abstraction that you build using polymorphism.&#xD;&#xA;&#xD;&#xA;Use events where you find yourself having to call a laundry list of methods for various in-game happenings in order to synchronize different systems in the game or where various objects and systems' reaction so said happenings are not able to be clearly defined or you want to add more reactions to said happenings in the future.&#xD;&#xA;&#xD;&#xA;They are a great tool, but like bummzack said, don't assume that polymorphism and events solve the same problem." />
  <row Id="15667" PostHistoryTypeId="5" PostId="7736" RevisionGUID="7e7574ad-7a16-4e49-81d2-81ed6937c968" CreationDate="2011-01-26T16:23:43.713" UserId="2229" Comment="added 32 characters in body; added 236 characters in body; added 10 characters in body" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions** to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) intervals on every object in the game. &#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available to update states of game objects. A highly effective **event messaging system** is built, and game objects react only after they obtain proper event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;As updating game states via Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;*To clarify, my question is not about removing polymorphism completely from a game design. I simply wish to understand the difference and benefit from using event messaging vs regular(per-frame) calls to virtual functions to update game state.*&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15668" PostHistoryTypeId="2" PostId="7745" RevisionGUID="fab65b2d-8bf7-4c11-bb87-576258ba3549" CreationDate="2011-01-26T16:50:25.350" UserId="4946" Text="if I want to build a game for web, facebook, and iphone, do I need to build 3 completely different versions? I know there is a new company that is &quot;build once, launch anywhere,&quot; but I'm asking about current best/practice and methodology in doing this." />
  <row Id="15669" PostHistoryTypeId="1" PostId="7745" RevisionGUID="fab65b2d-8bf7-4c11-bb87-576258ba3549" CreationDate="2011-01-26T16:50:25.350" UserId="4946" Text="Games for Facebook, iPhone, Web." />
  <row Id="15670" PostHistoryTypeId="3" PostId="7745" RevisionGUID="fab65b2d-8bf7-4c11-bb87-576258ba3549" CreationDate="2011-01-26T16:50:25.350" UserId="4946" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;cross-platform&gt;" />
  <row Id="15671" PostHistoryTypeId="5" PostId="7736" RevisionGUID="305369b3-face-4bcb-b815-e9b235e1fb70" CreationDate="2011-01-26T16:50:39.513" UserId="2229" Comment="deleted 26 characters in body" Text="The **traditional game design**, as I know it, uses Object Oriented programming with **polymorphism and virtual functions** to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) intervals on every object in the game. &#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is a **newer game design approach** available to update states of game objects. A highly effective **event messaging system** is built, and game objects react only after they obtain proper event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To clarify, my question is not about removing polymorphism completely from a game design. I simply wish to understand the difference and benefit from using event messaging vs regular(per-frame) calls to virtual functions to update game state.*&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15672" PostHistoryTypeId="25" PostId="7736" RevisionGUID="7f485f81-bedc-405a-aff9-1a91dcad58ec" CreationDate="2011-01-26T16:55:51.473" Comment="http://twitter.com/#!/StackGameDev/status/30307942511153152" />
  <row Id="15676" PostHistoryTypeId="2" PostId="7747" RevisionGUID="9ad27ec6-58da-42a3-a562-b7045880aebf" CreationDate="2011-01-26T17:21:17.920" UserId="1198" Text="This really depends what type of game that you are making.&#xD;&#xA;&#xD;&#xA;If your game is a simple text based game, then you can build the same interface in HTML and use different CSS to make it look good based on where the game is being accessed from.&#xD;&#xA;&#xD;&#xA;More realistically, your game is highly interactive, and it would be best to build the web/facebook version in Flash/Silverlight or another browser plugin. Then port it to iPhone in Objective-C. (Or, if you're more proficient in Objective-C start there and port to web/facebook.) &#xD;&#xA;&#xD;&#xA;The main issue that you'll probably run into is that on iPhone the input scheme will be different which could impact gameplay.&#xD;&#xA;&#xD;&#xA;The bottom line, is that you will need to, at a minimum, build a different Rendering and Input scheme for each platform you wish to deploy to. Facebook, is really just a normal web deployment, inside the facebook site, so the design would be the same for facebook or any other web game. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15679" PostHistoryTypeId="2" PostId="7748" RevisionGUID="72815058-3742-4472-be57-cd88e5c4247b" CreationDate="2011-01-26T17:33:07.933" UserId="1430" Text="There are platforms that could enable you to minimize the amount of porting work you'd need to do -- [Unity][1], for example, [which somebody apparently managed to integrate into Facebook][2] with at least some success. It's certainly technically possible to build a product that more-or-less seemlessly compiled and deployed to multiple distinct platforms like that, but there are problems that are nontechnical in nature that you'd have to overcome -- such as how to design a game that functions well in the wildly different contexts of all those platforms (some of which have very different input styles).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://forum.unity3d.com/threads/7812-Unity3D-meet-Facebook!" />
  <row Id="15680" PostHistoryTypeId="5" PostId="7736" RevisionGUID="eba6d852-6f97-4baf-989e-30f5d5b4e7b9" CreationDate="2011-01-26T17:33:22.957" UserId="2229" Comment="added 85 characters in body; deleted 26 characters in body" Text="The **traditional game design**, as I know it, uses **polymorphism and virtual functions** to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) intervals on every object in the game. &#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is another - **event driven messaging system** available to update states of game objects. Here, the objects usually are not updated on per-frame basis. Instead, a highly effective **event messaging system** is built, and game objects get updated only after receiving valid event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To clarify, my question is not about removing polymorphism completely from a game design. I simply wish to understand the difference and benefit from using event driven messaging vs regular(per-frame) calls to virtual functions to update game state.*&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="15681" PostHistoryTypeId="5" PostId="7736" RevisionGUID="1a39736e-1439-408c-8472-3127aa48309b" CreationDate="2011-01-26T17:40:32.740" UserId="2229" Comment="deleted 27 characters in body; edited body" Text="The **traditional game design**, as I know it, uses **polymorphism and virtual functions** to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) intervals on every object in the game. &#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is another - **event driven messaging system** available to update states of game objects. Here, the objects usually are not updated on per-frame basis. Instead, a highly efficient **event messaging system** is built, and game objects get updated only after receiving valid event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To clarify, my question is not about removing polymorphism completely from a game design. I simply wish to understand the difference and benefit from using event driven messaging vs regular(per-frame) calls to virtual functions to update game state.*" />
  <row Id="15682" PostHistoryTypeId="16" PostId="7736" RevisionGUID="1a39736e-1439-408c-8472-3127aa48309b" CreationDate="2011-01-26T17:41:12.270" UserId="2229" />
  <row Id="15683" PostHistoryTypeId="5" PostId="7724" RevisionGUID="d878485d-e063-4914-9eac-4075c6a67c8d" CreationDate="2011-01-26T17:50:47.630" UserId="1156" Comment="added 219 characters in body" Text="A very, very rough (but very speedy) heuristic to use is: (Manhattan distance)&#xD;&#xA;&#xD;&#xA;    vec1 = start vector&#xD;&#xA;    vec2 = end vector&#xD;&#xA;    &#xD;&#xA;    heuristic = abs(vec2.x - vec1.x) + abs(vec2.y - vec1.y)&#xD;&#xA;&#xD;&#xA;This avoids any square rooting, which could be costly (Pythagorean distance).&#xD;&#xA;&#xD;&#xA;EDIT: Or, like bumzack has pointed out, you can use the Pythagorean distance but without the square rooting - which is very much a relative distance:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    heuristic = (vec2.x - vec1.x)**2 + (vec2.y - vec1.y)**2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15684" PostHistoryTypeId="5" PostId="7747" RevisionGUID="b674347f-5b8e-4f45-bcc1-48c6cf74eeeb" CreationDate="2011-01-26T17:55:02.633" UserId="1198" Comment="updated for comments" Text="This really depends what type of game that you are making.&#xD;&#xA;&#xD;&#xA;If your game is a simple text based game, then you can build the same interface in HTML and use different CSS to make it look good based on where the game is being accessed from.&#xD;&#xA;&#xD;&#xA;More realistically, your game is highly interactive, and it would be best to build the web/facebook version in Flash/Silverlight or another browser plugin. Then port it to iPhone in Objective-C. (Or, if you're more proficient in Objective-C start there and port to web/facebook.) &#xD;&#xA;&#xD;&#xA;The main issue that you'll probably run into is that on iPhone the input scheme will be different which could impact gameplay.&#xD;&#xA;&#xD;&#xA;The bottom line, is that you will need to, at a minimum, build a different Rendering and Input scheme for each platform you wish to deploy to. Facebook, is really just a normal web deployment, inside the facebook site, so the design would be the same for facebook or any other web game. &#xD;&#xA;&#xD;&#xA;**edit**&#xD;&#xA;&#xD;&#xA;A few things I'd like to point out, based on your comments. First, HTML5 is probably NOT a good place to start, it has poor browser support (thought getting better), I'd stick with HTML4 and/or XHTML 1.1 and CSS2, these will work in almost all modern browsers; however, if you require any animation, I'd recommend using Flash or Sliverlight to build the game, and use their associated ability to call web services to save state to a server. Second, HTML is just the presentation, if you don't go the plugin route, you would likely need PHP or ASP.NET on the server to manage your game state and persist it to a database." />
  <row Id="15685" PostHistoryTypeId="2" PostId="7749" RevisionGUID="2b354549-e3e2-4ddf-ba92-298c343def9f" CreationDate="2011-01-26T18:13:09.133" UserId="4662" Text="I would say that this is pretty wrong. Some objects need calling every frame- some don't. If you have an object you want to render, you *need* to make a render call to it every frame. Events can't make this change. The same is true for any time-based physics objects- you *must* call them every frame.&#xD;&#xA;&#xD;&#xA;However, I don't make calls every frame to my object management objects, or my user input objects, or anything like that. Mass virtual calls to every object on frame is a terrible idea.&#xD;&#xA;&#xD;&#xA;The design used for any particular object should be based on the needs of those objects, and *not* based on some ideology for the system as a whole." />
  <row Id="15686" PostHistoryTypeId="5" PostId="7749" RevisionGUID="9d4406a7-ca9d-4fa7-b725-2b2562ebb35a" CreationDate="2011-01-26T18:23:11.460" UserId="4662" Comment="added 70 characters in body" Text="I would say that choosing one or the other is pretty wrong. Some objects need calling every frame- some don't. If you have an object you want to render, you *need* to make a render call to it every frame. Events can't make this change. The same is true for any time-based physics objects- you *must* call them every frame.&#xD;&#xA;&#xD;&#xA;However, I don't make calls every frame to my object management objects, or my user input objects, or anything like that. Mass virtual calls to every object on frame is a terrible idea.&#xD;&#xA;&#xD;&#xA;The design used for any particular object should be based on the needs of those objects, and *not* based on some ideology for the system as a whole.&#xD;&#xA;&#xD;&#xA;Edited to be more clear on my first sentence." />
  <row Id="15687" PostHistoryTypeId="2" PostId="7750" RevisionGUID="09e62f11-6656-45e1-b244-b816100896d8" CreationDate="2011-01-26T18:36:28.953" UserId="4951" Text="Here's a case study from someone who thinks TDD and gamedev mix pretty well:&#xD;&#xA;&#xD;&#xA;http://powertwenty.com/kpd/downloads/TestDrivenDevelopmentInPython.pdf&#xD;&#xA;&#xD;&#xA;Admittedly, this is a small project in Pygame, but it gives the idea of which parts can be tested with a graphical game and which can't. I was surprised at how much could be done with TDD in this scenario." />
  <row Id="15692" PostHistoryTypeId="5" PostId="7736" RevisionGUID="504273e8-3b9e-48ae-9808-332d451815c0" CreationDate="2011-01-26T18:44:23.620" UserId="2229" Comment="As the question was stil vague, I added an example." Text="The **traditional game design**, as I know it, uses **polymorphism and virtual functions** to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) intervals on every object in the game. &#xD;&#xA;&#xD;&#xA;Recently, I discovered, that there is another - **event driven messaging system** available to update states of game objects. Here, the objects usually are not updated on per-frame basis. Instead, a highly efficient **event messaging system** is built, and game objects get updated only after receiving valid event message. &#xD;&#xA;&#xD;&#xA;**Event Driven Game Architecture** is well described in: *Game Coding Complete* by Mike McShaffry (&lt;http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;qid=1296043478&amp;sr=8-1&gt;).&#xD;&#xA;&#xD;&#xA;Could I kindly ask for help with the following questions:&#xD;&#xA;&#xD;&#xA; - What are the advantages and disadvantages of the both approaches?&#xD;&#xA; - Where is one better over the other? &#xD;&#xA; - Is Event driven game design universal and better in all areas? Is it therefore recommended for usage even in mombile platforms? &#xD;&#xA; - Which one is more efficient and which is more difficult to develop?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To clarify, my question is not about removing polymorphism completely from a game design. I simply wish to understand the difference and benefit from using event driven messaging vs regular(per-frame) calls to virtual functions to update game state.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;-----------------------&#xD;&#xA;**Example:**&#xD;&#xA;This question caused a bit of controversy here, so let me offer you example:&#xD;&#xA;According to MVC, the game engine is divided into trhee main parts:&#xD;&#xA;&#xD;&#xA; 1. Application Layer (Hardware and OS communication)&#xD;&#xA; 2. Game Logic&#xD;&#xA; 3. Game View&#xD;&#xA;&#xD;&#xA;In a racing game, the Game View is responsible for rendering the screen as quickly as possible, at least 30fps. Game View listens for player's input too. Now this happens:&#xD;&#xA;&#xD;&#xA; - Player presses fuel pedal to 80%&#xD;&#xA; - GameView constructs a message &quot;Car 2 Fuel Pedal Pressed to 80%&quot; and sends it to Game Logic.&#xD;&#xA; - Game Logic gets the message, evaluates, calculates new car's position and behavior and creates the following messages for GameView: &quot;Draw Car 2 Fuel Pedal Pressed 80%&quot;, &quot;Car 2 Sound Acceleration&quot;, &quot;Car 2 Coordinates X, Y&quot; ... &#xD;&#xA; - GameView receives the messages and processes them accordingly" />
  <row Id="15695" PostHistoryTypeId="5" PostId="7737" RevisionGUID="e1ecf493-f99b-4b22-8dec-38df9e7660d7" CreationDate="2011-01-26T19:41:00.410" UserId="3794" Comment="added credits" Text="there are two cases of this problem. First is the intersection and second that is overlaping (containing).&#xD;&#xA;&#xD;&#xA;**First (intersection / polygon inside circle):**&#xD;&#xA;&#xD;&#xA;Find closest point on every edge of the polygon to the circle's center. If any distance between closest point to the center is less than radius, you got intersection or overlap.&#xD;&#xA;&#xD;&#xA;**Second (circle is whole in polygon):**&#xD;&#xA;Shoot ray from circle center to the right (or left/up/down) and count ray/segment (polygon edges) intersections. If intersection count is even circle is outside of polygon. If it's odd circle is inside. &#xD;&#xA;&#xD;&#xA;I'll share picter from lectue for this case:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;And take care of the singular cases.&#xD;&#xA;&#xD;&#xA;Hope this will help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;edit: I think that it is just fair to add credits to the picture. Author is Petr Felkel,  Assistant Professor at Czech Technical University in Prague&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/PK2kz.png" />
  <row Id="15696" PostHistoryTypeId="2" PostId="7753" RevisionGUID="c2b554f1-d1b6-40b3-a312-3451067a091a" CreationDate="2011-01-26T19:46:35.857" UserId="189" Text="I'm Richard Carter. I'm a student studying computer science with a concentration in game development at [North Carolina State University][1]. Believe it or not, I have quite a bit of free time to dedicate to this site (despite being a student), and I'm very interested in game development.&#xD;&#xA;&#xD;&#xA;Before this site was created, I was an active participant at [Stack Overflow][2] (I still visit pretty often). I ask a lot of questions (97 at time of writing) and a number of them, of course, involved game development. In fact I appear in the [top users for the `game-development` tag][3] (I just discovered this page!).&#xD;&#xA;&#xD;&#xA;I've been here from the very beginning, and have been very active. I was the #1 user for a while and am currently #3. I think my [profile][5] does a lot of the talking for me. Feel free to read some of my answers to get a feel for my tone and behavior. I always try to be very kind and fair. I like the motto &quot;**There's no such thing as a stupid question**&quot; and as such never try to look down upon someone no matter the question. I'm also a fast typer so many of my answers are long and detailed (which probably contributes to their getting upvoted and accepted often).&#xD;&#xA;&#xD;&#xA;I don't vote up/down as often as I should, but **I'm conscious of it** and I'm working to increase it. However, I don't hesitate to flag a question or comment on it if I think the author could clarify or if it just isn't a good question. **Any bad question can be made good with a bit of editing**, and I like to try and give that responsibility to the original asker, so generally I just comment if could be better.&#xD;&#xA;&#xD;&#xA;Also a sidenote, I have notifiers on my computers, so that **whenever I'm at my computer I am keeping an eye on the site**, ready to jump for the flag button on a new bad question or read an interesting one the moment it appears.&#xD;&#xA;&#xD;&#xA;Anyway, to wrap this up, here's a summary. &lt;sub&gt;Yay bullets!&lt;/sub&gt;&#xD;&#xA;&#xD;&#xA; - I'm very active, as shown by my reputation and participation in chat, meta, etc.&#xD;&#xA; - I have time to dedicate to the site.&#xD;&#xA; - I comment often and flag bad questions, and I am learning to vote up/down more frequently.&#xD;&#xA; - I try to be as fair and kind as possible at all times.&#xD;&#xA;&#xD;&#xA;**I love this site** and have tried from the beginning to keep it buzzing with questions and answers so that it can become popular and one day be THE place for game development Q&amp;A (if it isn't already!). I certainly don't need to be a moderator to work towards that goal, but if I were to become moderator I would be better equipped!&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ncsu.edu/&#xD;&#xA;  [2]: http://stackoverflow.com/users/47493/ricket&#xD;&#xA;  [3]: http://stackoverflow.com/tags/game-development/topusers&#xD;&#xA;  [4]: http://twitter.com/#!/Ricket/status/16945773439&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/users/189/ricket" />
  <row Id="15698" PostHistoryTypeId="5" PostId="7645" RevisionGUID="6460b2fc-893a-491a-930d-0f23dcd26b61" CreationDate="2011-01-26T20:07:26.167" UserId="962" Comment="edited body" Text="I have been here for bit now, and I have a good feel for what content is appropriate for this stackexchange. I am the 17th in the list of rep for this site. I am a native speaker of the English Language and can help make sense of some posts from people whose native language is obviously not English.&#xD;&#xA;&#xD;&#xA;I visit gamedev.stackexchange.com multiple times per day.&#xD;&#xA;&#xD;&#xA;I am respectful of other members, old members and newbies alike.&#xD;&#xA;&#xD;&#xA;I moderate on reddit.com/r/gaming which is one of the top subreddit on the site.&#xD;&#xA;&#xD;&#xA;I am an independent game developer: Designer, programmer, and artist. My current main project is **Sect of The White Worm** which will be released for PC in 2011." />
  <row Id="15699" PostHistoryTypeId="2" PostId="7754" RevisionGUID="4530abf7-ff7e-47c0-aabe-f073b5745904" CreationDate="2011-01-26T21:20:43.820" UserId="4129" Text="What are the standard alternatives for the mechanics of attaching turrets and such to 3D models for use in-game?  I don't mean the logic, but rather the graphics aspects.&#xD;&#xA;&#xD;&#xA;My naive approach is to extend the MD2-like format that I'm using (blender-exported using a script) to include a new set of properties for a mesh that:&#xD;&#xA;&#xD;&#xA;* is anchored in another 'parent' mesh.  The anchor is a point and normal in the parent mesh and a point and normal in the child mesh; these will always be colinear, giving the child rotation but not translation relative to the parent point.&#xD;&#xA;&#xD;&#xA;* has a normal that is aligned with a 'target'.  Classically this target is the enemy that is being engaged, but it might be some other vector e.g. 'the wind' (for sails and flags (and smoke, which is a particle system but the same principle applies)) or 'upwards' (e.g. so bodies of riders bend properly when riding a horse up an incline etc).&#xD;&#xA;&#xD;&#xA;* that the anchor and target alignments have maximum and minimum and a speed coeff.&#xD;&#xA;&#xD;&#xA;* there is game logic for multiple turrets and on a model and deciding which engages which enemy.  'primary' and 'secondary' or 'target0' ... 'targetN' or some such annotation will be there.&#xD;&#xA;&#xD;&#xA;So to illustrate, a classic tank would be made from three meshes; a main body mesh, a turret mesh that is anchored to the top of the main body so it can spin only horizontally and a barrel mesh that is anchored to the front of the turret and can only move vertically within some bounds.&#xD;&#xA;&#xD;&#xA;And there might be a forth flag mesh on top of the turret that is aligned with 'wind' where wind is a function the engine solves that merges environment's wind angle with angle the vehicle is travelling in an velocity, or something fancy.&#xD;&#xA;&#xD;&#xA;Are there better approaches?  Are there formats that already include this information?  Is this routine?" />
  <row Id="15700" PostHistoryTypeId="1" PostId="7754" RevisionGUID="4530abf7-ff7e-47c0-aabe-f073b5745904" CreationDate="2011-01-26T21:20:43.820" UserId="4129" Text="turrets that turn" />
  <row Id="15701" PostHistoryTypeId="3" PostId="7754" RevisionGUID="4530abf7-ff7e-47c0-aabe-f073b5745904" CreationDate="2011-01-26T21:20:43.820" UserId="4129" Text="&lt;3d-engines&gt;&lt;models&gt;&lt;turrets&gt;" />
  <row Id="15702" PostHistoryTypeId="5" PostId="7754" RevisionGUID="5dde3ed7-fdfd-43d1-b41d-3cde9a11ea4b" CreationDate="2011-01-26T21:41:56.187" UserId="4129" Comment="added 351 characters in body" Text="What are the standard alternatives for the mechanics of attaching turrets and such to 3D models for use in-game?  I don't mean the logic, but rather the graphics aspects.&#xD;&#xA;&#xD;&#xA;My naive approach is to extend the MD2-like format that I'm using (blender-exported using a script) to include a new set of properties for a mesh that:&#xD;&#xA;&#xD;&#xA;* is anchored in another 'parent' mesh.  The anchor is a point and normal in the parent mesh and a point and normal in the child mesh; these will always be colinear, giving the child rotation but not translation relative to the parent point.&#xD;&#xA;&#xD;&#xA;* has a normal that is aligned with a 'target'.  Classically this target is the enemy that is being engaged, but it might be some other vector e.g. 'the wind' (for sails and flags (and smoke, which is a particle system but the same principle applies)) or 'upwards' (e.g. so bodies of riders bend properly when riding a horse up an incline etc).&#xD;&#xA;&#xD;&#xA;* that the anchor and target alignments have maximum and minimum and a speed coeff.&#xD;&#xA;&#xD;&#xA;* there is game logic for multiple turrets and on a model and deciding which engages which enemy.  'primary' and 'secondary' or 'target0' ... 'targetN' or some such annotation will be there.&#xD;&#xA;&#xD;&#xA;So to illustrate, a classic tank would be made from three meshes; a main body mesh, a turret mesh that is anchored to the top of the main body so it can spin only horizontally and a barrel mesh that is anchored to the front of the turret and can only move vertically within some bounds.&#xD;&#xA;&#xD;&#xA;And there might be a forth flag mesh on top of the turret that is aligned with 'wind' where wind is a function the engine solves that merges environment's wind angle with angle the vehicle is travelling in an velocity, or something fancy.&#xD;&#xA;&#xD;&#xA;This gives each mesh one degree of freedom relative to its parent.  Things with multiple degrees of freedom can be modelled by zero-vertex connecting meshes perhaps?  This is where I think the approach I outlined begins to feel inelegant, yet perhaps its still a workable system?  This is why I want to know how it is done in professional games ;)&#xD;&#xA;&#xD;&#xA;Are there better approaches?  Are there formats that already include this information?  Is this routine?" />
  <row Id="15703" PostHistoryTypeId="2" PostId="7755" RevisionGUID="9a27cc9b-2891-41dd-a85d-65b9854bff06" CreationDate="2011-01-26T21:57:11.137" UserId="3265" Text="I'm currently looking into XNA game development with the C# language.&#xD;&#xA;&#xD;&#xA;I have two classes: the main game handler and a &quot;sprite&quot; class. Following is some basic pseudo-code which I hope adequately describes the issue.&#xD;&#xA;&#xD;&#xA;**Game.cs**&#xD;&#xA;&#xD;&#xA;    class game {&#xD;&#xA;      sprite the_sprite;&#xD;&#xA;      void update(time) {&#xD;&#xA;        var mouse = mouse.state&#xD;&#xA;        if(mouse.clicked) { this.the_sprite.moveTo(mouse.x, mouse.y) }&#xD;&#xA;        this.the_sprite.update(time)&#xD;&#xA;        base.update(time)&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Sprite.cs**&#xD;&#xA;&#xD;&#xA;    class sprite {&#xD;&#xA;      vector2 location;&#xD;&#xA;      vector2 move_to;&#xD;&#xA;      void moveTo(x, y) { this.move_to = new vector2(x, y) }&#xD;&#xA;      void update(time) {&#xD;&#xA;        if(this.location.x &gt; this.move_to.x /* (or less than) */) {&#xD;&#xA;          // adjust location.x&#xD;&#xA;        }&#xD;&#xA;        if(this.location.y &gt; this.move_to.y /* (or greater than) */) {&#xD;&#xA;          // adjust location.y&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Basically: when the user clicks somewhere in the game window, the x and y coordinates of the mouse are taken, and the game object will move towards that location over a period of time.&#xD;&#xA;&#xD;&#xA;Well... the code works, but it's ugly, and objects don't move directly towards the object (instead, it's diagonal movement, followed by single-axis movement). I'm guessing there are some mathematical functions I can use, but I honestly haven't a clue where to get started. Any suggestions?" />
  <row Id="15704" PostHistoryTypeId="1" PostId="7755" RevisionGUID="9a27cc9b-2891-41dd-a85d-65b9854bff06" CreationDate="2011-01-26T21:57:11.137" UserId="3265" Text="Moving a sprite in XNA/C#, using vectors" />
  <row Id="15705" PostHistoryTypeId="3" PostId="7755" RevisionGUID="9a27cc9b-2891-41dd-a85d-65b9854bff06" CreationDate="2011-01-26T21:57:11.137" UserId="3265" Text="&lt;xna&gt;&lt;c#&gt;&lt;vector&gt;&lt;movement&gt;" />
  <row Id="15706" PostHistoryTypeId="2" PostId="7756" RevisionGUID="6dce00a1-f7d8-4fd2-a545-7b801d676ab9" CreationDate="2011-01-26T22:05:25.497" UserId="4956" Text="Google normalization... i am also a little lost at this, but i am pretty sure this will help solve your problem. Someone else can elaborate or disprove my answer i am sure" />
  <row Id="15707" PostHistoryTypeId="6" PostId="7754" RevisionGUID="2cd22934-cabe-447d-aeb7-36b35dcab596" CreationDate="2011-01-26T22:06:04.567" UserId="1156" Comment="edited tags" Text="&lt;3d-meshes&gt;&lt;models&gt;&lt;turrets&gt;" />
  <row Id="15708" PostHistoryTypeId="2" PostId="7757" RevisionGUID="0f3404f3-d709-4993-9392-c6dc1400d12f" CreationDate="2011-01-26T22:20:47.747" UserId="2111" Text="If I understand your problem properly, you should just have a direction Vector2 representing the direction you want to move in inside your sprite class.&#xD;&#xA;Like this:&#xD;&#xA;&#xD;&#xA;    public Vector2 Direction { get; set; }&#xD;&#xA;&#xD;&#xA;This is the normalized vector(which means it has a length of 1) showing where you want to go.&#xD;&#xA;&#xD;&#xA;Then, add a Speed float property, which says how fast the sprite should go.&#xD;&#xA;&#xD;&#xA;    public float Speed { get; set; }&#xD;&#xA;&#xD;&#xA;You also need to add a UpdateSprite function, so why not put it inside your Sprite class?&#xD;&#xA;&#xD;&#xA;    public Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;       Position += Direction * Speed * gameTime.ElapsedGameTime.TotalSeconds;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This will update the sprite's position to make it move(you multiply by the delta seconds so that the sprite moves properly on slow computers too).&#xD;&#xA;&#xD;&#xA;Finally, you just set your direction property like this:&#xD;&#xA;&#xD;&#xA;    sprite.Direction = location - sprite.Position;&#xD;&#xA;    sprite.Direction.Normalize();" />
  <row Id="15709" PostHistoryTypeId="2" PostId="7758" RevisionGUID="1d5fe302-7fe6-4e68-a413-bbf5653b7d62" CreationDate="2011-01-26T23:49:55.203" UserId="20" Text="I'm not entirely sure if I fully understood your questions(s). But I'd definitely use a mesh format that supports bones and animations. Especially the bones are important if you wish to move separate mesh-parts individually.&#xD;&#xA;&#xD;&#xA;The flag you're speaking of could be pre-animated (wave movement) and aligned in the direction of the wind by using bones. The speed of the animation could be controlled by the strength of the wind.&#xD;&#xA;&#xD;&#xA;I can't give you any format recommendations though, since you didn't mention the engine/framework you're using. [OGRE][1] for example uses its own mesh format that supports bones and animations. [Unity][2] can load several popular native formats directly... and there's always [Collada][3], an XML based 3D format which you could write a parser for (or use an existing one).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://unity3d.com/&#xD;&#xA;  [3]: https://collada.org" />
  <row Id="15710" PostHistoryTypeId="25" PostId="7755" RevisionGUID="f983caf3-75af-4b15-9d64-02dcccc353c2" CreationDate="2011-01-27T05:15:52.190" Comment="http://twitter.com/#!/StackGameDev/status/30494173073248256" />
  <row Id="15711" PostHistoryTypeId="2" PostId="7759" RevisionGUID="c8915bc3-ab5e-466a-86d1-53aa32edf369" CreationDate="2011-01-27T06:12:29.797" UserId="4638" Text="I am new to using Farseer Physics Engine 3.2(FPE), so please bear with my questions. Also, since FPE 3.2 is based on Box2D, I have been reading Box2D manual and pieces of code scattered in samples to better understand terminology and usage.&#xD;&#xA;&#xD;&#xA;Pong is usually my testbed whenever I try to do something new. Here is one of the issue I am running into:&#xD;&#xA;&#xD;&#xA;- How can I restrict paddles to move only along Y axis, because the ball comes in and knocks off the paddles and everything floats in space afterwards ? (Box = Rectangle and ball = circle)&#xD;&#xA;&#xD;&#xA;- I know MKS is the unit system, but is there a recommendation for sizes/position to be used ? I know this is a very generic question, but it would be good to know a simple set of values that one could use for making a game as simple as pong.&#xD;&#xA;&#xD;&#xA;Between box2d and FPE, I have some doubts:&#xD;&#xA;&#xD;&#xA;- what is the recommended way of making a body in FPE ? &#xD;&#xA;&#xD;&#xA; - world.CreateBody() does not exist in FPE&#xD;&#xA; - Box2d manual recommends never to &quot;new&quot; body(since Box2D uses Small Object allocators), so is there a recommended way in Farseer to create a body (apart from factories) ?&#xD;&#xA;- In box2d, it is recommended to keep a track of the body object, since it is also the parent to fixture(s). Why is it that in most of the examples, the fixture object is tracked ? Is there a reason why body is not tracked ?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="15712" PostHistoryTypeId="1" PostId="7759" RevisionGUID="c8915bc3-ab5e-466a-86d1-53aa32edf369" CreationDate="2011-01-27T06:12:29.797" UserId="4638" Text="How to restrict paddle movement using Farseer Physics engine 3.2" />
  <row Id="15713" PostHistoryTypeId="3" PostId="7759" RevisionGUID="c8915bc3-ab5e-466a-86d1-53aa32edf369" CreationDate="2011-01-27T06:12:29.797" UserId="4638" Text="&lt;physics&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="15714" PostHistoryTypeId="5" PostId="7758" RevisionGUID="a34bd14e-6916-495b-b8a4-b4877827d855" CreationDate="2011-01-27T08:08:44.180" UserId="20" Comment="fixed typo" Text="I'm not entirely sure if I fully understood your question(s). But I'd definitely use a mesh format that supports bones and animations. Especially the bones are important if you wish to move separate mesh-parts individually.&#xD;&#xA;&#xD;&#xA;The flag you're speaking of could be pre-animated (wave movement) and aligned in the direction of the wind by using bones. The speed of the animation could be controlled by the strength of the wind.&#xD;&#xA;&#xD;&#xA;I can't give you any format recommendations though, since you didn't mention the engine/framework you're using. [OGRE][1] for example uses its own mesh format that supports bones and animations. [Unity][2] can load several popular native formats directly... and there's always [Collada][3], an XML based 3D format which you could write a parser for (or use an existing one).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://unity3d.com/&#xD;&#xA;  [3]: https://collada.org" />
  <row Id="15715" PostHistoryTypeId="4" PostId="7754" RevisionGUID="06230f22-2786-4412-8f3d-63e2f09b79f3" CreationDate="2011-01-27T08:15:11.847" UserId="20" Comment="rephrased title" Text="How to export 3D models that consist of several parts (eg. turret on a tank)?" />
  <row Id="15716" PostHistoryTypeId="6" PostId="7754" RevisionGUID="06230f22-2786-4412-8f3d-63e2f09b79f3" CreationDate="2011-01-27T08:15:11.847" UserId="20" Comment="rephrased title" Text="&lt;best-practices&gt;&lt;3d-meshes&gt;&lt;models&gt;" />
  <row Id="15717" PostHistoryTypeId="25" PostId="7754" RevisionGUID="9a669572-08c3-451f-8174-6dfcbf0f7113" CreationDate="2011-01-27T08:15:51.893" Comment="http://twitter.com/#!/StackGameDev/status/30539470071660545" />
  <row Id="15718" PostHistoryTypeId="2" PostId="7760" RevisionGUID="47f8d85f-f8b6-4126-a18c-e24758a46af2" CreationDate="2011-01-27T08:54:50.033" UserId="3599" Text="Yap. Bones formats. MD2 is a vertex animation format, not bones based format. And in Blender, depends on the version you're working with, but can probably make use of:&#xD;&#xA;&#xD;&#xA; - Directx *.x (I think in both 2.49 and 2.56 beta)&#xD;&#xA; - *.md5 . Doom III, like md2, from Id Software, but much better than md2. Md2 has vertex position accuracy problems, normals/lighting problems, UVs have its issues too, etc. Still, all blenders do export it, and can be useful for the flag animation. But you can asign some bones to the flag, some weight painting, and have same effect.Even easier.&#xD;&#xA; - Collada. But it is still not ended, in certain newest builds at graphicall.org I have checked to be working, at least in basic stuff which you need.&#xD;&#xA; - You need to use Blender 'constraints' in your bone animations, to have the behaviours you mention, and then export with those &quot;baked&quot;. Then code would do the rest.(and don't quote me on this, but I think md5 did export constraints also. And that you can use a md5 version with blender 2.41.  I think , set as an addon, md5 can work well with 2.56, but have not tried yet.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;A good knowledge of Blender rigging (bones, weights, constraints) system and formats is quite needed for this, but seems pretty doable.&#xD;&#xA;&#xD;&#xA;A lot of people just used to use Milkshape, ideal for these kind of things, and there were very good loaders for game programmers, for ms3d format.&#xD;&#xA;&#xD;&#xA;IMHO you can achieve the same by loading for example an md5, there are good loaders out there, and am told is an easy to handle format for programmers. Collada anyway might be the best in long run: Is the definite Blender's bet, and in general, everybody, engines, etc, are trusting on it. But it's a very complex format, so making a loader might be hard, unless you can grab sth already made or whatever. I don't know, that's the programmer side of things.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15719" PostHistoryTypeId="5" PostId="2556" RevisionGUID="41755218-e498-4d17-81ca-0ed5e01170b7" CreationDate="2011-01-27T09:27:17.297" UserId="4264" Comment="deleted 17 characters in body" Text="xAItment (commercial)&#xD;&#xA;&#xD;&#xA;http://www.xaitment.com/&#xD;&#xA;&#xD;&#xA;Fairly new middleware suite providing everything from pathfinding to behavior / decision making systems. Haven't tried it myself, so I can't say if it's any good." />
  <row Id="15720" PostHistoryTypeId="5" PostId="2158" RevisionGUID="9a384b6b-669a-4cdf-a02a-41a55dc2abdd" CreationDate="2011-01-27T09:29:30.537" UserId="4264" Comment="added 268 characters in body" Text="**SharpSteer**. (MIT license?)&#xD;&#xA;&#xD;&#xA;http://sharpsteer.codeplex.com/&#xD;&#xA;&#xD;&#xA;SharpSteer is a C# port of OpenSteer. Like OpenSteer, the aim of SharpSteer is to help construct steering behaviors for autonomous characters in games and animation, with a current implementation focus toward Microsoft's XNA." />
  <row Id="15721" PostHistoryTypeId="5" PostId="2179" RevisionGUID="08365620-48b3-4258-9b2c-3068f634f303" CreationDate="2011-01-27T10:45:06.857" UserId="4264" Comment="added 48 characters in body" Text="Havok AI (Commercial - not cheap)&#xD;&#xA;&#xD;&#xA;http://www.havok.com/index.php?page=havok-ai&#xD;&#xA;&#xD;&#xA;Havok is pretty good at physics, and has been offering behaviour, animation and other kinds of middleware for a while now.&#xD;&#xA;&#xD;&#xA;Physics and AI is not easy to get to cooperate, especially animations, so save yourself some time and use Havok.&#xD;&#xA;&#xD;&#xA;Highly recommended. :)&#xD;&#xA;&#xD;&#xA;If you can afford it.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;Industry strength quality, proven technology.&#xD;&#xA;Makes AI and Physics cooperate.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;Steep Price." />
  <row Id="15722" PostHistoryTypeId="25" PostId="7759" RevisionGUID="57cf4073-ba62-42b3-a84f-c4f7df467115" CreationDate="2011-01-27T11:15:52.200" Comment="http://twitter.com/#!/StackGameDev/status/30584769263697920" />
  <row Id="15723" PostHistoryTypeId="2" PostId="7761" RevisionGUID="2cf0859c-60aa-4f3d-8ba9-fda96f2a216f" CreationDate="2011-01-27T11:42:01.353" UserDisplayName="user4967" Text="What should I learn? OpenGL 4.1 or OpenGL ES 2.0?&#xD;&#xA;&#xD;&#xA;I will be developing desktop applications using Qt but I may start developing mobile applications in a few months, too. I don't know anything about 3D, 3D math, etc and I'd rather spend 100 bucks in a good book than 1 week digging websites and going through trial and error.&#xD;&#xA;&#xD;&#xA;One problem I see with OpenGL 4.1 is as far as I know there is no book yet (the most recent ones are for OpenGL 3.3 or 4.0), while there are books on OpenGL ES 2.0.&#xD;&#xA;&#xD;&#xA;On the other hand, from my naive point of view, OpenGL 4.1 seems like OpenGL ES 2.0 + additions, so it looks like it would be easier/better to first learn OpenGL ES 2.0, then go for the shader language, etc&#xD;&#xA;&#xD;&#xA;Please, don't tell me to use NeHe (it's generally agreed it's full of bad/old practices), the Durian tutorial, etc.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="15724" PostHistoryTypeId="1" PostId="7761" RevisionGUID="2cf0859c-60aa-4f3d-8ba9-fda96f2a216f" CreationDate="2011-01-27T11:42:01.353" UserDisplayName="user4967" Text="OpenGL or OpenGL ES" />
  <row Id="15725" PostHistoryTypeId="3" PostId="7761" RevisionGUID="2cf0859c-60aa-4f3d-8ba9-fda96f2a216f" CreationDate="2011-01-27T11:42:01.353" UserDisplayName="user4967" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;qt&gt;" />
  <row Id="15726" PostHistoryTypeId="2" PostId="7762" RevisionGUID="63e27304-d7fe-47b3-99dd-dba46f6323be" CreationDate="2011-01-27T11:50:34.780" UserId="178" Text="I suggest going the route with OpenGL ES 2.0, because as you have already said it is pretty much a subset of modern OpenGL. You should also be aware that even today some mobile devices only support OpenGL ES 1.0, which is radically different to OpenGL ES 2.0 and more like OpenGL 2.x (fixed function)." />
  <row Id="15727" PostHistoryTypeId="5" PostId="7756" RevisionGUID="1f0a74b6-120e-40be-95f1-72a1b426a9d5" CreationDate="2011-01-27T13:01:53.383" UserId="4956" Comment="added 270 characters in body" Text="Google normalization... i am also a little lost at this, but i am pretty sure this will help solve your problem. Someone else can elaborate or disprove my answer i am sure&#xD;&#xA;&#xD;&#xA;Edit: I could answer this better, apologies&#xD;&#xA;&#xD;&#xA;I personally always look to this blog post to help with these types of problems:&#xD;&#xA;http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;&#xD;&#xA;It starts from scratch and is relevant to game development." />
  <row Id="15728" PostHistoryTypeId="2" PostId="7763" RevisionGUID="b196ac20-88ac-4e04-898c-47cf7b2f80f0" CreationDate="2011-01-27T13:05:58.317" UserId="4264" Text="From a general point of view, either. The practices you learn in one will benefit you in the other.&#xD;&#xA;&#xD;&#xA;It's more of a question of what you have access to, and what your interests are.&#xD;&#xA;&#xD;&#xA;As for books, any book related to OpenGL later than 2.0 will help you get into the bleeding edge, since OpenGL works through extensions.&#xD;&#xA;&#xD;&#xA;Also see http://gamedev.stackexchange.com/questions/150/what-is-the-difference-between-opengl-es-and-opengl" />
  <row Id="15729" PostHistoryTypeId="2" PostId="7764" RevisionGUID="c5fc2bb8-d42f-45c4-8db6-711b8f63397f" CreationDate="2011-01-27T13:25:35.950" UserId="4956" Text="I believe you would be looking to using transformation matrices here, though i think you need to elaborate upon your update function in order to accomodate for this. Ask yourself what transformations you need - translation, rotation?&#xD;&#xA;&#xD;&#xA;            sx, sy = 0;&#xD;&#xA;        for (j = 0; j &lt; mesh-&gt;vertices[i]-&gt;bone_count; j++) {&#xD;&#xA;            sx += (/* ??? */) * mesh-&gt;vertices[i]-&gt;weights[j];&#xD;&#xA;            sy += (/* ??? */) * mesh-&gt;vertices[i]-&gt;weights[j];&#xD;&#xA;&#xD;&#xA;I find sometimes putting something down in plain english helps. The above for e.g.:&#xD;&#xA;&#xD;&#xA;For each bone, perform a (transformation) multiplied by the weights of the bone.&#xD;&#xA;&#xD;&#xA;I would put more into&#xD;&#xA;&#xD;&#xA; - Are we rotating or translating this&#xD;&#xA;   bone? &#xD;&#xA; - Does the parent constrain this   &#xD;&#xA;   movement?&#xD;&#xA;&#xD;&#xA;Matrices are handy for this because they can work off of a structure like this in that you can work out the constraint from the parent bone's information and apply it to the child bone.&#xD;&#xA; &#xD;&#xA; - Perform transformation based on previous questions&#xD;&#xA;&#xD;&#xA;This may be a completely wrong way about things, but certainly food for thought." />
  <row Id="15730" PostHistoryTypeId="25" PostId="7761" RevisionGUID="57ec8065-3066-4527-9d89-4e68410da2e9" CreationDate="2011-01-27T14:15:53.090" Comment="http://twitter.com/#!/StackGameDev/status/30630072373219328" />
  <row Id="15731" PostHistoryTypeId="2" PostId="7765" RevisionGUID="9d227796-69b5-4319-8835-3e322527889d" CreationDate="2011-01-27T14:19:04.880" UserId="1868" Text="I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.&#xD;&#xA;&#xD;&#xA;I found out Box2D and its JS port.&#xD;&#xA;&#xD;&#xA;http://box2d-js.sourceforge.net&#xD;&#xA;&#xD;&#xA;It seems to be quite old port, made in 2008. Is it lacking many features of current Box2D? And are there any know issues with it?" />
  <row Id="15732" PostHistoryTypeId="1" PostId="7765" RevisionGUID="9d227796-69b5-4319-8835-3e322527889d" CreationDate="2011-01-27T14:19:04.880" UserId="1868" Text="Box2d JS port experiences?" />
  <row Id="15733" PostHistoryTypeId="3" PostId="7765" RevisionGUID="9d227796-69b5-4319-8835-3e322527889d" CreationDate="2011-01-27T14:19:04.880" UserId="1868" Text="&lt;javascript&gt;&lt;box2d&gt;&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="15734" PostHistoryTypeId="2" PostId="7766" RevisionGUID="9aa7ee80-0c09-4131-a4f4-befb59e95c2e" CreationDate="2011-01-27T14:25:48.193" UserId="4413" Text="Box2D has a kind of maintained version on github:&#xD;&#xA;&#xD;&#xA;https://github.com/thinkpixellab/box2d&#xD;&#xA;&#xD;&#xA;Microsoft is using it for at least on of their IE9 test drive demos." />
  <row Id="15735" PostHistoryTypeId="5" PostId="7597" RevisionGUID="a7d09516-ab0b-4779-9691-1eb92106b1ed" CreationDate="2011-01-27T14:26:28.783" UserId="4413" Comment="added 10 characters in body; added 4 characters in body" Text="This is not feasable right now (early 2011). You can not create a real-time, 3D MMO in native, browser technologies (meaning no plugins).&#xD;&#xA;&#xD;&#xA;In the future... I won't speculate. This is how it looks right now. Assuming you target only modern browsers. If you plan to support IE7 then you are crazy. That will never work.&#xD;&#xA;&#xD;&#xA;Things missing:&#xD;&#xA;&#xD;&#xA; * full control over keyboard and mouse (ability to set mouse position, key interception)&#xD;&#xA; * fullscreen&#xD;&#xA; * 3D&#xD;&#xA;&#xD;&#xA;Areas / solutions with serious problems:&#xD;&#xA;&#xD;&#xA;  * WebSockets now deactivated in the few browsers that supported it&#xD;&#xA;     * without it: now low latency, bi-directional client-server communication&#xD;&#xA;  * audio problems&#xD;&#xA;     * codec mess, you need ogg and mp3&#xD;&#xA;     * common frequences not supported&#xD;&#xA;     * concurrancy&#xD;&#xA;     * delay&#xD;&#xA;  * canvas performance (in some cases doing divs &amp; css transformations is faster)" />
  <row Id="15736" PostHistoryTypeId="5" PostId="7597" RevisionGUID="299b5e01-fae3-4fac-a353-96fc5c3af136" CreationDate="2011-01-27T14:33:48.257" UserId="4413" Comment="edited body; added 16 characters in body" Text="This is not feasable right now (early 2011). You can not create a real-time, 3D MMO in native, browser technologies (meaning no plugins).&#xD;&#xA;&#xD;&#xA;I won't speculate about the future. This is how it looks right now. Assuming you target only modern browsers (IE9, FF4, etc). If you plan to support IE7 then you are crazy. That will never work.&#xD;&#xA;&#xD;&#xA;Things missing:&#xD;&#xA;&#xD;&#xA; * full control over keyboard and mouse (ability to set mouse position, key interception)&#xD;&#xA; * fullscreen&#xD;&#xA; * 3D&#xD;&#xA;&#xD;&#xA;Areas / solutions with serious problems:&#xD;&#xA;&#xD;&#xA;  * WebSockets now deactivated in the few browsers that supported it&#xD;&#xA;     * without it: now low latency, bi-directional client-server communication&#xD;&#xA;  * audio problems&#xD;&#xA;     * codec mess, you need ogg and mp3&#xD;&#xA;     * common frequences not supported&#xD;&#xA;     * concurrancy&#xD;&#xA;     * delay&#xD;&#xA;  * canvas performance (in some cases doing divs &amp; css transformations is faster)" />
  <row Id="15737" PostHistoryTypeId="4" PostId="7765" RevisionGUID="65174bc5-d0ed-4a88-b618-fe35939ae93d" CreationDate="2011-01-27T15:53:33.753" UserId="14" Comment="edited title" Text="Are there any known issues with the JS port of Box2D?" />
  <row Id="15738" PostHistoryTypeId="5" PostId="7325" RevisionGUID="57dc076b-e4ce-488a-9811-fe3f8a856362" CreationDate="2011-01-27T15:54:07.700" UserId="1058" Comment="Added a correction to increase accuracy" Text="I'm developing a 2D sprite-based game, and I'm finding that I'm having trouble with making the sprites rotate correctly. In a nutshell, I've got spritesheets for each of 5 directions (the other 3 come from just flipping the sprite horizontally), and I need to clamp the velocity/rotation of the sprite to one of those directions. My sprite class has a pre-computed list of radians corresponding to the cardinal directions like this:&#xD;&#xA;&#xD;&#xA;    protected readonly List&lt;float&gt; CardinalDirections = new List&lt;float&gt;&#xD;&#xA;                               {&#xD;&#xA;                                   MathHelper.PiOver4,&#xD;&#xA;                                   MathHelper.PiOver2,&#xD;&#xA;                                   MathHelper.PiOver2 + MathHelper.PiOver4,&#xD;&#xA;                                   MathHelper.Pi, &#xD;&#xA;                                   -MathHelper.PiOver4,&#xD;&#xA;                                   -MathHelper.PiOver2,&#xD;&#xA;                                   -MathHelper.PiOver2 + -MathHelper.PiOver4,&#xD;&#xA;                                   -MathHelper.Pi,&#xD;&#xA;                               };&#xD;&#xA;&#xD;&#xA;Here's the positional update code:&#xD;&#xA;&#xD;&#xA;    if (velocity == Vector2.Zero)&#xD;&#xA;                return;&#xD;&#xA;&#xD;&#xA;            var rot = ((float)Math.Atan2(velocity.Y, velocity.X));&#xD;&#xA;            TurretRotation = SnapPositionToGrid(rot);&#xD;&#xA;&#xD;&#xA;            var snappedX = (float)Math.Cos(TurretRotation);&#xD;&#xA;            var snappedY = (float)Math.Sin(TurretRotation);&#xD;&#xA;            var rotVector = new Vector2(snappedX, snappedY);&#xD;&#xA;&#xD;&#xA;            velocity *= rotVector;&#xD;&#xA;            //...snip&#xD;&#xA;&#xD;&#xA;    private float SnapPositionToGrid(float rotationToSnap)&#xD;&#xA;        {&#xD;&#xA;            if (rotationToSnap == 0)&#xD;&#xA;                return 0.0f;&#xD;&#xA;&#xD;&#xA;            var targetRotation = CardinalDirections.First(x =&gt; &#xD;&#xA;                    (x - rotationToSnap &gt;= -0.01 &amp;&amp; x - rotationToSnap &lt;= 0.01));&#xD;&#xA;            return (float)Math.Round(targetRotation, 3);&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong here? I know that the SnapPositionToGrid method is far from what it needs to be - the .First(..) call is on purpose so that it throws on no match, but I have no idea how I would go about accomplishing this, and unfortunately, Google hasn't helped too much either. Am I thinking about this the wrong way, or is the answer staring at me in the face?&#xD;&#xA;&#xD;&#xA;EDIT: Thanks Gregory for the answer. Only thing I really had to modify from the answer  was to re-construct the velocity vector to the new snapped rotation (I'm sure there are further optimizations that I can do, but for now it's enough that it works!):&#xD;&#xA;&#xD;&#xA;            var snappedX = (float)Math.Round(Math.Cos(TurretRotation), 3) * &#xD;&#xA;                               velocity.Length();&#xD;&#xA;            var snappedY = (float)Math.Round(Math.Sin(TurretRotation), 3) *&#xD;&#xA;                               velocity.Length();&#xD;&#xA;            var rotVector = new Vector2(snappedX, snappedY);&#xD;&#xA;&#xD;&#xA;FOLLOW-UP EDIT:&#xD;&#xA;The initial answer worked very well as a naive implementation, but suffered from inaccuracies of up to 45 degrees when dealing with negative angles; -3.14 snapped to -2.356 for instance. To correct that, I added a check to account for those situations.  Below is a complete implementation of a SnapToGrid method. Some optimizations have been made, like pre-computing the various divisors of Pi to avoid the division. Further optimization could possibly be achieved by looking for short-circuit scenarios, i.e. `if rotationToSnap ~=0,` but if anyone has further optimizations, I'd be curious to see them!&#xD;&#xA;&#xD;&#xA;    public static float SnapPositionToGrid(float rotationToSnap)&#xD;&#xA;    {&#xD;&#xA;    	if (rotationToSnap == 0)&#xD;&#xA;    		return 0.0f;&#xD;&#xA;     &#xD;&#xA;    	var modRot = rotationToSnap  % MathHelper.PiOver4;&#xD;&#xA;    			&#xD;&#xA;    	float finalRot; &#xD;&#xA;    				&#xD;&#xA;    	if (modRot &lt; RoundedPiOver8)&#xD;&#xA;    	{&#xD;&#xA;    		if (modRot &lt; -RoundedPiOver8)&#xD;&#xA;    			finalRot = rotationToSnap + -MathHelper.PiOver4 - modRot;&#xD;&#xA;    		else&#xD;&#xA;    			finalRot = rotationToSnap - modRot;&#xD;&#xA;    	}&#xD;&#xA;    	else&#xD;&#xA;    		finalRot = rotationToSnap + MathHelper.PiOver4 - modRot;&#xD;&#xA;    				&#xD;&#xA;    	return (float)Math.Round(finalRot, 3);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15739" PostHistoryTypeId="6" PostId="7761" RevisionGUID="0afaeaec-31e8-4b04-9e1b-1426ec3f5184" CreationDate="2011-01-27T16:02:39.517" UserId="2229" Comment="edited tags" Text="&lt;opengl&gt;&lt;graphics&gt;&lt;graphics-programming&gt;&lt;opengl-es&gt;&lt;qt&gt;" />
  <row Id="15740" PostHistoryTypeId="2" PostId="7767" RevisionGUID="26c0deba-598c-420f-8d05-21bd529aff83" CreationDate="2011-01-27T16:06:11.227" UserId="4973" Text="I have an idea for a game that I want to develop and I feel is unique, and I'm wondering if I should patent it.  I read on the web that games can be patented, but just because it can be done doesn't mean that it makes sense to do it.  &#xD;&#xA;&#xD;&#xA;I actually don't really want patent it (it's expensive, a hassle and I don't believe in patenting of ideas... unless it's something truly revolutionary). However, I'm concerned a bigger company could come along, with more experienced game designers and developers and steal the idea." />
  <row Id="15741" PostHistoryTypeId="1" PostId="7767" RevisionGUID="26c0deba-598c-420f-8d05-21bd529aff83" CreationDate="2011-01-27T16:06:11.227" UserId="4973" Text="Can and should a game design be patented?" />
  <row Id="15742" PostHistoryTypeId="3" PostId="7767" RevisionGUID="26c0deba-598c-420f-8d05-21bd529aff83" CreationDate="2011-01-27T16:06:11.227" UserId="4973" Text="&lt;game-design&gt;&lt;business&gt;" />
  <row Id="15743" PostHistoryTypeId="2" PostId="7768" RevisionGUID="753b7666-0315-4112-b9ae-178c67fdeb45" CreationDate="2011-01-27T16:12:01.873" UserId="1430" Text="It is often said that game ideas are a dime a dozen, but that's not true -- they're probably cheaper than that. An idea alone is essentially worthless, what matters is that you have the skill or capability to flesh that idea out into a design, and then execute that design.&#xD;&#xA;&#xD;&#xA;Professional game developers do not trawl the internet looking for ideas to &quot;steal&quot; -- an one individual in a company has at least a few ideas they eventually would love to develop and most company's have many people, so there is never likely to be a shortage of game ideas. Furthermore, company's do not want to get themselves into even *potential* legal hot water by doing what you're worried about -- it's part of the reason most studios simply bin unsolicited &quot;game design documents&quot; (and believe me, we do get these in the mail quite often) without reading them as a general policy.&#xD;&#xA;&#xD;&#xA;The chance that your idea is truly unique is pretty slim. But that doesn't mean it's a bad idea, just that you probably do not need to spend a lot of time or money patenting it. I would instead suggest that you spend that time and money developing it into a playable game." />
  <row Id="15744" PostHistoryTypeId="2" PostId="7769" RevisionGUID="5d776394-92b8-48a0-b292-822c5825118d" CreationDate="2011-01-27T16:13:51.403" UserId="4690" Text="(IANAL)&#xD;&#xA;&#xD;&#xA;**Patent**s, for the most part, do not apply to ideas but rather to specific implementations of them. You may be able to get a patent for a specific process or methodology that your game uses, but this is a rather poorly-defined area with software. Also, patents require disclosing all of your information. Coca-cola's recipe is not patented because that would involve divulging their secret recipe.&#xD;&#xA;&#xD;&#xA;**Copyright** tends to be more applicable to code, but it is very loose in terms of what it protects. Two pieces of software can be frighteningly similar yet not infringe upon each other.&#xD;&#xA;&#xD;&#xA;What you want to do is keep it a **trade secret**. Don't tell anyone about it who doesn't need to know about it. Make everyone who you DO tell about it sign a non-disclosure agreement. If you're worried about someone independently arriving at your idea and beating you to market with it...well, you're out of luck. There is no protection for that." />
  <row Id="15745" PostHistoryTypeId="6" PostId="7767" RevisionGUID="5cc78eb9-f178-42d0-8a6e-0dfd58fa216b" CreationDate="2011-01-27T16:16:07.493" UserId="14" Comment="edited tags" Text="&lt;game-design&gt;&lt;legal&gt;&lt;business&gt;" />
  <row Id="15746" PostHistoryTypeId="5" PostId="7768" RevisionGUID="08c7121d-4eec-4018-ac75-fa98a0794052" CreationDate="2011-01-27T16:33:07.450" UserId="189" Comment="grammar/spelling fixes" Text="It is often said that game ideas are a dime a dozen, but that's not true -- they're probably cheaper than that. An idea alone is essentially worthless, what matters is that you have the skill or capability to flesh that idea out into a design, and then execute that design.&#xD;&#xA;&#xD;&#xA;Professional game developers do not trawl the internet looking for ideas to &quot;steal&quot; -- any one individual in a company has at least a few ideas they eventually would love to develop and most companies have many people, so there is never likely to be a shortage of game ideas. Furthermore, companies do not want to get themselves into even *potential* legal hot water by doing what you're worried about -- it's part of the reason most studios simply bin unsolicited &quot;game design documents&quot; (and believe me, we do get these in the mail quite often) without reading them as a general policy.&#xD;&#xA;&#xD;&#xA;The chance that your idea is truly unique is pretty slim. But that doesn't mean it's a bad idea, just that you probably do not need to spend a lot of time or money patenting it. I would instead suggest that you spend that time and money developing it into a playable game." />
  <row Id="15747" PostHistoryTypeId="8" PostId="7724" RevisionGUID="7eb44a7c-af86-439a-8a50-aea7af0f0aaf" CreationDate="2011-01-27T17:08:53.870" UserId="1156" Comment="Rollback to [3cd67c98-0fe2-49d4-9e99-e897380e32b3]" Text="A very, very rough (but very speedy) heuristic to use is: (Manhattan distance)&#xD;&#xA;&#xD;&#xA;    vec1 = start vector&#xD;&#xA;    vec2 = end vector&#xD;&#xA;    &#xD;&#xA;    heuristic = abs(vec2.x - vec1.x) + abs(vec2.y - vec1.y))&#xD;&#xA;&#xD;&#xA;This avoids any square rooting, which could be costly (Pythagorean distance).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15748" PostHistoryTypeId="25" PostId="7767" RevisionGUID="a3c2a058-995c-4422-8598-3b4802506b74" CreationDate="2011-01-27T17:15:52.873" Comment="http://twitter.com/#!/StackGameDev/status/30675370009165825" />
  <row Id="15749" PostHistoryTypeId="2" PostId="7770" RevisionGUID="3bae0e7e-19c6-446d-b361-e3e4c33da450" CreationDate="2011-01-27T18:02:10.990" UserId="1156" Text="In short? Yes, you probably can patent the idea. I'm not a lawyer, however.   &#xD;&#xA;Would you want to? No.  &#xD;&#xA;Should you be worried of large companies stealing your idea? No. They have large teams who are trained to develop new game concepts. I seriously doubt they would go around the internet looking for concepts.&#xD;&#xA;&#xD;&#xA;If you want to be worried of anything (which is stupid), then think of hobby developers. They're the ones who will be playing your games and might take your idea. But who cares if they do? Ideas are so common, they're pretty much worthless.&#xD;&#xA;&#xD;&#xA;I've had a massive amount of them. Some of them have actually been games which I had never heard about. So the chance of your idea being unique is tiny." />
  <row Id="15750" PostHistoryTypeId="2" PostId="7771" RevisionGUID="aa1ebb97-58bf-482c-af30-d4a00763342a" CreationDate="2011-01-27T18:17:13.523" UserId="4822" Text="I know you have to have mac os x to use xcode and thus to develop/compile apps for the iphone. And I'm not exactly wanting to go the hackintosh way, so I'm looking at buying a used mac.&#xD;&#xA;&#xD;&#xA;What specs are recommended. If I buy a cheap mac mini that has only 1gb of ram would that be enough? (I'm not talking about using that to create the graphics/audio, I'll use my normal windows/ubuntu pc for that). I'm just talking about being able to use xcode and write applications.&#xD;&#xA;&#xD;&#xA;I'm trying to spend the least amount I can without running into problems developing the app." />
  <row Id="15751" PostHistoryTypeId="1" PostId="7771" RevisionGUID="aa1ebb97-58bf-482c-af30-d4a00763342a" CreationDate="2011-01-27T18:17:13.523" UserId="4822" Text="Recommended hardware for developing ios games?" />
  <row Id="15752" PostHistoryTypeId="3" PostId="7771" RevisionGUID="aa1ebb97-58bf-482c-af30-d4a00763342a" CreationDate="2011-01-27T18:17:13.523" UserId="4822" Text="&lt;iphone&gt;&lt;hardware&gt;&lt;development-speed&gt;&lt;ios&gt;" />
  <row Id="15753" PostHistoryTypeId="2" PostId="7772" RevisionGUID="ae4caae9-5eb2-4d0d-96e9-2415e5a5f0c7" CreationDate="2011-01-27T18:26:32.360" UserId="1040" Text="The big concern is that is has to be able to run Snow Leopard, the latest version of Mac OSX, in order to run the latest version of xcode.  As long as it can run that, you can do your development on it.&#xD;&#xA;&#xD;&#xA;I would not expect great speed, though." />
  <row Id="15754" PostHistoryTypeId="2" PostId="7773" RevisionGUID="7e321134-d507-4e33-acf9-0cf882435fd5" CreationDate="2011-01-27T19:29:00.147" UserId="189" Text="If you already have a good PC, you could indeed turn it into a Hackintosh (dual-boot OS X or whatever) to run Xcode and do the programming, and then transfer your code to a low-powered Mac Mini when it's all ready. It is of course against Apple's terms to actually publish an app from a hackintosh system (whether they actually detect it is another matter; I don't know the answer to that), but **code is code. It's just text.** Who's to say what you wrote it on?&#xD;&#xA;&#xD;&#xA;You could write an iOS app on a clay tablet, and as long as you transcribe it into OS X before the final compile and publish, you'd be fine. :)&#xD;&#xA;&#xD;&#xA;&lt;sub&gt;(IANAL, just speaking from common sense.)&lt;/sub&gt;" />
  <row Id="15755" PostHistoryTypeId="2" PostId="7774" RevisionGUID="36ea58d1-1269-4e3b-b434-54747e376110" CreationDate="2011-01-27T19:33:50.327" UserId="160" Text="The canonical solution in software renderers (which must do this exact algorithm every time they rasterize a triangle) is, I believe, to scan the triangle one row of pixels at a time. The left and right edges of each row and calculated by walking down the sides of the triangle using [Bresenham](http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm), and then you fill in the row between them.&#xD;&#xA;&#xD;&#xA;I'm glossing over *lots* of details but that's the basic idea. If you hunt around for &quot;software render&quot; and &quot;triangle rasterization&quot;, you'll probably find some more details. This is a well-solved problem. Your graphics card is doing this millions of times a frame.&#xD;&#xA;&#xD;&#xA;If you want a more roguelike-specific solution, [here's](https://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Fov.cs) how I implemented FOV in mine. It seems to work pretty quickly. It's essentially a simple shadow caster, working on octant at a time, scanning outwards from the player." />
  <row Id="15756" PostHistoryTypeId="2" PostId="7775" RevisionGUID="249a671e-b7fe-4991-9bc1-72dbb7b47ab3" CreationDate="2011-01-27T19:50:02.980" UserId="4191" Text="Don't worry about people stealing your ideas.  If your ideas are any good, you'll have to ram them down people's throats." />
  <row Id="15757" PostHistoryTypeId="25" PostId="7771" RevisionGUID="86cec26b-6724-4b3a-b191-9160ab335c47" CreationDate="2011-01-27T20:15:53.347" Comment="http://twitter.com/#!/StackGameDev/status/30720670325284864" />
  <row Id="15758" PostHistoryTypeId="5" PostId="7770" RevisionGUID="a747d6ec-3c80-49cd-914f-5d427f597d4e" CreationDate="2011-01-27T21:16:11.630" UserId="1156" Comment="added 18 characters in body" Text="In short? Yes, you probably can patent the methodology or process. I'm not a lawyer, however.   &#xD;&#xA;Would you want to? No.  &#xD;&#xA;Should you be worried of large companies stealing your idea? No. They have large teams who are trained to develop new game concepts. I seriously doubt they would go around the internet looking for concepts.&#xD;&#xA;&#xD;&#xA;If you want to be worried of anything (which is stupid), then think of hobby developers. They're the ones who will be playing your games and might take your idea. But who cares if they do? Ideas are so common, they're pretty much worthless.&#xD;&#xA;&#xD;&#xA;I've had a massive amount of them. Some of them have actually been games which I had never heard about. So the chance of your idea being unique is tiny." />
  <row Id="15759" PostHistoryTypeId="5" PostId="7578" RevisionGUID="f680944c-0f81-498a-97fc-d43595c35997" CreationDate="2011-01-27T21:17:14.077" UserId="1156" Comment="added 99 characters in body" Text="I feel I would be a good candidate to be a moderator, since I am active at participating on the site. I am in the top 15 users based solely on reputation (at time of writing), and feel I have the qualities to be a successful moderator: that is, patient and showing respect to other users.&#xD;&#xA;&#xD;&#xA;I am very active on the site - on every day if I can, which is most days for a good 5 hours. :)&#xD;&#xA;&#xD;&#xA;I also think I would be both fair but firm, and able to help the community to the best of my abilities.&#xD;&#xA;&#xD;&#xA;As for myself, I'm a student with ambitions to work in the gamedev/software industry and have been working on various hobby projects for about 5 years now, and have dabbled in a wide range of different areas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for your time. :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15760" PostHistoryTypeId="5" PostId="7769" RevisionGUID="a4ece0da-b1b0-40bf-b92c-bf11530a994f" CreationDate="2011-01-27T21:22:48.423" UserId="4690" Comment="edited body" Text="(IANAL)&#xD;&#xA;&#xD;&#xA;**Patents**, for the most part, do not apply to ideas but rather to specific implementations of them. You may be able to get a patent for a specific process or methodology that your game uses, but this is a rather poorly-defined area with software. Also, patents require disclosing all of your information. Coca-cola's recipe is not patented because that would involve divulging their secret recipe.&#xD;&#xA;&#xD;&#xA;**Copyright** tends to be more applicable to code, but it is very loose in terms of what it protects. Two pieces of software can be frighteningly similar yet not infringe upon each other.&#xD;&#xA;&#xD;&#xA;What you want to do is keep it a **trade secret**. Don't tell anyone about it who doesn't need to know about it. Make everyone who you DO tell about it sign a non-disclosure agreement. If you're worried about someone independently arriving at your idea and beating you to market with it...well, you're out of luck. There is no protection for that." />
  <row Id="15761" PostHistoryTypeId="2" PostId="7776" RevisionGUID="f6a16fa2-90f0-4133-9565-cfb532d0f334" CreationDate="2011-01-27T21:38:54.180" UserId="4871" Text="I would suggest keeping your controls as html elements such as `menu` and `command` for accessibility reasons. Using a bit of CSS you can [display elements over a canvas](http://stackoverflow.com/questions/4797748/can-i-put-a-html-button-inside-the-canvas/4797877#4797877), and not lose out on the pre-built functionality of HTML." />
  <row Id="15762" PostHistoryTypeId="2" PostId="7777" RevisionGUID="be8fc8a2-462a-440d-8042-527545de9e16" CreationDate="2011-01-27T21:54:17.380" UserId="111" Text="Yes, but the technology still needs to stabilize and there will likely remain performance trade-offs vs native applications." />
  <row Id="15764" PostHistoryTypeId="2" PostId="7778" RevisionGUID="b23a762e-229e-49eb-b26e-a62d1ee24d07" CreationDate="2011-01-27T22:00:23.647" UserId="4638" Text="I found the answer at farseer forumn itself. Please check out this thread for answers and more info!&#xD;&#xA;&#xD;&#xA;[http://farseerphysics.codeplex.com/Thread/View.aspx?ThreadId=243468][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com/Thread/View.aspx?ThreadId=243468" />
  <row Id="15765" PostHistoryTypeId="2" PostId="7779" RevisionGUID="c401ebb5-d538-4864-82e0-fbafc98db975" CreationDate="2011-01-27T22:01:44.723" UserId="111" Text="Is there data on how many users have Flash, Java, or Unity plugins installed?" />
  <row Id="15766" PostHistoryTypeId="1" PostId="7779" RevisionGUID="c401ebb5-d538-4864-82e0-fbafc98db975" CreationDate="2011-01-27T22:01:44.723" UserId="111" Text="Flash, Java, Unity plugin install penetration?" />
  <row Id="15767" PostHistoryTypeId="3" PostId="7779" RevisionGUID="c401ebb5-d538-4864-82e0-fbafc98db975" CreationDate="2011-01-27T22:01:44.723" UserId="111" Text="&lt;flash&gt;&lt;java&gt;&lt;unity&gt;&lt;browser-based-games&gt;" />
  <row Id="15769" PostHistoryTypeId="2" PostId="7781" RevisionGUID="c9723a87-eb5d-409f-819b-ccc7fdcdd92f" CreationDate="2011-01-27T23:07:36.347" UserId="769" Text="I think you need to ditch the `mysql_*` functions and switch to something better like `mysqli_*` or PDO. See http://maurus.net/weblog/2006/07/28/typo3-php-mysql-connections-and-unicode/" />
  <row Id="15770" PostHistoryTypeId="2" PostId="7782" RevisionGUID="b28989b9-7f0c-4fd9-834a-d4b48caff0df" CreationDate="2011-01-27T23:07:42.637" UserId="34" Text="I use two machines regularly while doing iOS development -- a late 2009 quad core i5 iMac and an 11&quot; MacBook Air.  Both machines have their pluses and minuses, but both are more than capable enough for the job.  Basically it comes down to buying what you can afford and what you feel comfortable with.  Any Mac sold by Apple today has more than enough power for iOS development.&#xD;&#xA;&#xD;&#xA;If you go with a used Mac, I would try to stick with the 64-bit capable Macs rather than a 32-bit only like the original MacBook, MacBook Pros, iMacs and Mac minis.  The only reason I recommend this is that Apple typically drops support for some machines every time a new major OS X release is done.  And the 32-bit Macs are looking like the most likely candidates for being dropped with Lion.  The other side of this is that Apple also has been keeping iOS developers on the latest OS X release -- the latest SDKs are now requiring 10.6.6, for example.&#xD;&#xA;&#xD;&#xA;Don't skimp out on RAM -- 1GB of RAM is not enough to keep MacOS X, Xcode, Interface Builder and the simulator happily in RAM all the time.  You will not be very happy with just 1GB of RAM.  4GB of RAM is fairly cheap these days -- even on some of the older machines where Apple says it can only take 2GB you can actually toss in 4GB and get about 3.5GB of memory.  The Core 2 Duo MacBooks are like this, probably some of the Mac minis as well.&#xD;&#xA;&#xD;&#xA;On the iOS device side, you'll obviously need at least one device to develop and test with.  The cheapest option is the 8GB iPod touch.  But if you are intending to make a real game to release, you'll want to have other devices as well.  At the very least, you should have one of each device for each generation you want to support -- so if you are only targeting the current generation, that would be an iPod touch and an iPhone 4.  If you want to target the prior generation, you should have those as well.  You can get away with not having the newer hardware if all you have is an older device, but I wouldn't recommend only having the newer hardware while also targeting the older devices.  There are huge differences in how OpenGL and the CPU performs on some of the devices and you really don't want to find out about those differences while reading the reviews for your app.  And then there is the iPad as well to consider as well..." />
  <row Id="15771" PostHistoryTypeId="2" PostId="7783" RevisionGUID="d2d428d4-3ed8-4030-81d2-bf410553c991" CreationDate="2011-01-27T23:15:41.400" UserId="4583" Text="According to the Adobe Flash website, [Flash Player Version Penetration][1], it's about 99-98% in most markets.&#xD;&#xA;&#xD;&#xA;Java is also pretty ubiquitous. Unity is less frequently found, however the installer is inline and quite small in most cases.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.adobe.com/products/player_census/flashplayer/version_penetration.html" />
  <row Id="15772" PostHistoryTypeId="2" PostId="7784" RevisionGUID="51c11d78-25ea-488f-aa2b-990ba089fa9f" CreationDate="2011-01-27T23:30:35.327" UserId="539" Text="This website extrapolates from a panel of some sort:&#xD;&#xA;&#xD;&#xA;http://www.riastats.com/&#xD;&#xA;&#xD;&#xA;Bottom line as of posting this:&#xD;&#xA;&#xD;&#xA;  * Flash: 97%&#xD;&#xA;  * Silverlight: 70%&#xD;&#xA;  * Java: 75%" />
  <row Id="15773" PostHistoryTypeId="2" PostId="7785" RevisionGUID="f3bb56f6-e037-41c9-90ab-89a27664c32d" CreationDate="2011-01-27T23:32:49.290" UserId="4688" Text="I have not tried this but, you can also run os x in a virtual machine.&#xD;&#xA;&#xD;&#xA;Also get a old iphone or ipod touch to try your app out. If it runs well on old hardware it runs great on new hardware." />
  <row Id="15774" PostHistoryTypeId="5" PostId="7785" RevisionGUID="cc6d9eb3-44fc-4b38-be1b-771415e34a0b" CreationDate="2011-01-27T23:42:11.400" UserId="4688" Comment="deleted 5 characters in body" Text="I have not tried this but, you can run os x in a virtual machine.&#xD;&#xA;&#xD;&#xA;Also get a old iphone or ipod touch to try your app out. If it runs well on old hardware it runs great on new hardware." />
  <row Id="15775" PostHistoryTypeId="2" PostId="7786" RevisionGUID="4ddb1006-cac5-4c8c-860c-8849aadb1ddd" CreationDate="2011-01-28T01:33:55.920" UserId="458" Text="From my experience being interviewed:&#xD;&#xA;&#xD;&#xA;* Expect some technical questions relating to your specialty (i.e. if you're trying for a graphics programmer position, expect some questions about what graphics libraries you've worked with and some of the more prominent graphics algorithms)&#xD;&#xA;&#xD;&#xA;* Some companies give you programming tests, of the &quot;write code to do X&quot; variety. This might happen at your interview in real-time, or they might ask you to do this ahead of time and send it in with your application. Expect to struggle red-faced through the embarrassment of having to correctly identify the bugs in your own code.&#xD;&#xA;&#xD;&#xA;* You may have some questions about other fields, such as audio, visual art, production and game design, or questions about your ability to play nicely with people in those fields. You don't need to be expert in non-programming fields, but you do need to be able to communicate effectively with non-programmers. (My favorite question: &quot;Describe [polymorphism / A* / quaternions / whatever] to me in terms my technophobic grandmother would understand.&quot;)&#xD;&#xA;&#xD;&#xA;* Since game dev is so team-oriented, expect lots of non-programming questions that are trying to find team fit: questions about how you handle stressful situations, disagreements with superiors, eleventh-hour requests from publishers, impossible-to-implement specs from designers, and just generally if you're the kind of person that other people would like to spend more time with than they spend with their families.&#xD;&#xA;&#xD;&#xA;Every company's interview process is different, of course, but I think you'll find more similarities than differences between game industry programming, and greater software industry programming, in terms of what the interview is like. The biggest difference is that in the game industry, the person interviewing you probably won't be wearing a suit :)" />
  <row Id="15776" PostHistoryTypeId="2" PostId="7787" RevisionGUID="c6ee4621-2e5e-4409-84d8-d749204bdbbe" CreationDate="2011-01-28T01:40:11.790" UserId="458" Text="Easy answer: when you are offered the interview in the first place, ask how they prefer applicants to dress! If you forget, you can always call/email your contact at that company and ask in advance. It's a reasonable question and you don't lose points for asking.&#xD;&#xA;&#xD;&#xA;The good news is that the game industry is mostly a meritocracy. I personally like to wear a suit and tie for the interview (it was just drilled into me when I was young to always always always do this), I usually get some gentle ribbing about how I'd better not show up to work looking like that, and then we get down to actually figuring out whether I'm a good fit for the position. I have plenty of colleagues who &quot;dress down&quot; and get hired that way, too. &#xD;&#xA;&#xD;&#xA;Ultimately, a hire / don't hire decision is going to come down to your skills, abilities, and fit. I have never, NEVER heard of anyone in the game industry getting (or not getting) a job solely because they did or didn't wear a suit. (I suppose if you showed up wearing a t-shirt with an offensive image on it that would count against you, or if you showed up wearing nothing but a Speedo or something, but accounting for basic common sense you should stress about showing why you're an awesome developer, not a snazzy dresser :)" />
  <row Id="15777" PostHistoryTypeId="2" PostId="7788" RevisionGUID="63f11a10-887b-4923-ae56-d4aed57d16a3" CreationDate="2011-01-28T02:05:29.923" UserId="1198" Text="Since you're building a game for Windows, you can access the full framework as @Ranieri stated. Your architecture sounds solid; however, you might want to check into [MEF][1], the Managed Extensibility Framework. It might make that workflow you outline more streamlined. I haven't used it myself, but I've read good things about it.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/magazine/ee291628.aspx" />
  <row Id="15778" PostHistoryTypeId="25" PostId="7779" RevisionGUID="15aa2176-844b-45dd-898d-fed4208594e3" CreationDate="2011-01-28T02:15:53.880" Comment="http://twitter.com/#!/StackGameDev/status/30811269523054592" />
  <row Id="15779" PostHistoryTypeId="2" PostId="7789" RevisionGUID="c70bb797-e185-4aa8-80cf-48dc7ad0da24" CreationDate="2011-01-28T02:35:36.257" UserId="4168" Text="Make sure to change the project's target .Net Framework from .Net 4 Client Profile to .Net 4.  The client framework does not include MSBuild.&#xD;&#xA;&#xD;&#xA;To do this open the project properties, select the Application tab, and change the Target Framework dropdown to &quot;.Net Framework 4&quot;." />
  <row Id="15780" PostHistoryTypeId="2" PostId="7790" RevisionGUID="50e1f7c4-bb28-4b0a-be4c-352bef4e0e71" CreationDate="2011-01-28T02:53:48.773" UserId="211" Text="From my (limited) experience with GAE, while database reads are trivial, database writes are *expensive*. We've got a database of around 20,000 GAE entities; when measured, writes are taking around 0.3 - 0.5 *billable* seconds. Updating our entire datastore takes ~2.5 billable CPU hours.&#xD;&#xA;&#xD;&#xA;It's perfectly possible to use GAE to run an authoritative server, but given the cost, I wouldn't want to -- a cloud-hosted VM server would be more flexible and would likely cost less." />
  <row Id="15781" PostHistoryTypeId="5" PostId="7694" RevisionGUID="91a8557d-59ca-4ebe-8355-104e9c9786a9" CreationDate="2011-01-28T02:57:33.330" UserId="4191" Comment="add disclaimer" Text="Am I a bad person because I think of these?&#xD;&#xA;&#xD;&#xA;* What do you do for fun? *(Translation: Do you have a social life that will interfere with putting in 60 hour weeks normally, 100+ hour weeks in crunch?)*&#xD;&#xA;* How do you balance your personal life with work? *(Translation: Have you had experience with a normal job that you put in a day at and then go home from when you're done, or can we format your brain with the insane expectations that make us money?)*&#xD;&#xA;* Where do you see yourself in five years? *(Translation: Do we have a reasonable shot of keeping you in the same code monkey role for several product cycles?)*&#xD;&#xA;&#xD;&#xA;**Disclaimer**: Please note that this answer contains a high quotient of bitterness and cynicism, and that its contents reflect a worst-case scenario that the gaming industry is unfortunately notorious for.  There are many ethical and well-motivated people performing hiring and management in the industry, and being asked any of these questions *does not* automatically mean that the &quot;translations&quot; apply." />
  <row Id="15782" PostHistoryTypeId="2" PostId="7791" RevisionGUID="fd9b8bee-0e02-4b93-b0f3-ce930971bc9c" CreationDate="2011-01-28T03:24:34.227" UserId="211" Text="Off the top of my head, if negative scores are not allowed: track positive and negative scores separately.&#xD;&#xA;&#xD;&#xA;For instance, when writing the leaderboard:&#xD;&#xA;&#xD;&#xA;    // Pseudocode&#xD;&#xA;    points_for_win = 3;&#xD;&#xA;    points_for_loss = 2;&#xD;&#xA;&#xD;&#xA;    if (didWin)&#xD;&#xA;        leaderboard.positive_score += points_for_win;&#xD;&#xA;    else&#xD;&#xA;        leaderboard.negative_score += points_for_loss;&#xD;&#xA;&#xD;&#xA;When retrieving the leaderboard, you can then compute the user's actual score by:&#xD;&#xA;&#xD;&#xA;    actual_score = leaderboard.positive_score - leaderboard.negative_score; " />
  <row Id="15783" PostHistoryTypeId="2" PostId="7792" RevisionGUID="84d2ca0a-6455-4ddc-8636-92d5a42a44a6" CreationDate="2011-01-28T03:34:03.450" UserId="4822" Text="Where can I learn how to do simple 2d animation well? Or is it really just literally drawing every single frame of something in photoshop? Is there tips or tricks? Tutorials to help get started?&#xD;&#xA;&#xD;&#xA;Also, what software options are there (preferably open source or even just free)?" />
  <row Id="15784" PostHistoryTypeId="1" PostId="7792" RevisionGUID="84d2ca0a-6455-4ddc-8636-92d5a42a44a6" CreationDate="2011-01-28T03:34:03.450" UserId="4822" Text="How to learn beginning 2d animation?" />
  <row Id="15785" PostHistoryTypeId="3" PostId="7792" RevisionGUID="84d2ca0a-6455-4ddc-8636-92d5a42a44a6" CreationDate="2011-01-28T03:34:03.450" UserId="4822" Text="&lt;2d&gt;&lt;animation&gt;&lt;tutorials&gt;&lt;learning&gt;&lt;image&gt;" />
  <row Id="15786" PostHistoryTypeId="2" PostId="7793" RevisionGUID="1ebe7d64-b5e8-4e0b-a7f6-bf4d9a6a4a26" CreationDate="2011-01-28T03:50:54.650" UserId="2910" Text="There are plenty of resources available to do this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Heres a good tutorial to get you started on one particular method using Sprite Sheets. Sprite Sheets are just that, a sheet of sprite that you run in code similar to a flip book animation in real life. But you use code to do it. It can be difficult to get started, but I feel is the most rewarding and grants the most control.&#xD;&#xA;&#xD;&#xA;http://www.dreamincode.net/forums/topic/194878-xna-animated-sprite/&#xD;&#xA;&#xD;&#xA;Here is the first thing I found using flash which is also a good tool. I personally have not used flash perhaps another poster can chime in with their experience.&#xD;&#xA;&#xD;&#xA;http://animation.about.com/od/2danimationtutorials/2D_Computer_Animation_Tutorials_StepbyStep_Lessons_in_Flash.htm&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15787" PostHistoryTypeId="2" PostId="7794" RevisionGUID="72bff142-e285-4250-9fe9-e2f9278f371a" CreationDate="2011-01-28T04:08:06.950" UserId="3659" Text="Right now, I can think of a few ways you can do a 2-D animation:&#xD;&#xA;&#xD;&#xA; - Moving an object's x,y coordinates around (e.g. to slide a rectangular menu - you change the y-coordinates every few ms)&#xD;&#xA; - Drawing every single frame out in an image editor and choosing the right frame to draw at the right moment (e.g. drawing a flame animation)&#xD;&#xA; - combining the two above (e.g. having a sprite walk across a screen)&#xD;&#xA;&#xD;&#xA;It's all about giving the *illusion* of movement.&#xD;&#xA;&#xD;&#xA;How to do it well?&#xD;&#xA;&#xD;&#xA;- It has to be timed properly to make it appear smooth (be aware of hardware constraints)&#xD;&#xA;- The more frames you have, the more details you can show, and the better it will look (however you end up having to draw more frames)&#xD;&#xA;&#xD;&#xA;Tips and tricks?&#xD;&#xA;&#xD;&#xA; - Wikipedia has some concepts that you should take a look at: [tweening][1], [morphing][2], [onion skinning][3] and [interpolated][4] rotoscoping&#xD;&#xA;&#xD;&#xA;Software options? &#xD;&#xA;&#xD;&#xA;- I would say it depends on what you are trying to animate. If you want to animate sprites or simple objects, then MS Paint will probably suffice&#xD;&#xA;-  [GIMP][5] is an open source alternative to Photoshop&#xD;&#xA;&#xD;&#xA;As for tutorials, I think this depends a lot on your goal. If you are doing a flash game, then search flash tutorials. Drawing is one thing, but you also need to time (and possibly move) the images to animate it properly - and so you might as well learn how to do it in the platform you are going for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tweening&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Morphing&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Onion_skinning&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Interpolated&#xD;&#xA;  [5]: http://www.gimp.org/" />
  <row Id="15788" PostHistoryTypeId="25" PostId="7792" RevisionGUID="78ae0dcf-8297-4a0e-ac92-6940b019b470" CreationDate="2011-01-28T05:15:53.880" Comment="http://twitter.com/#!/StackGameDev/status/30856568023031808" />
  <row Id="15789" PostHistoryTypeId="2" PostId="7795" RevisionGUID="bdedd6e4-6667-47d5-8dd8-36435e8d31fe" CreationDate="2011-01-28T08:30:38.080" UserId="20" Text="Classical 2D animations are done frame by frame. What you'll see often is that they use a reduced framerate (eg. every frame is displayed twice) to lower the amount of images that have to be drawn.&#xD;&#xA;&#xD;&#xA;[Flash][1] is a very good tool for 2D animation. It provides you with onion-skinning (previous frames shine through while you're drawing your new frame), tweening and shape-morphing. Since version CS4, it also comes with bones and inverse kinematics which makes animating characters with limbs so much easier.&#xD;&#xA;&#xD;&#xA;There's also &quot;[Toon Boom][2]&quot;. Although their website looks horrible, their products are used by professional animators. They have a lot of different software-packages available, for hobby/fun up to professional animation software.&#xD;&#xA;&#xD;&#xA;Tools like GIMP and Photoshop also provide some functionality for animation but that's really just for very basic stuff.&#xD;&#xA;&#xD;&#xA;Another, not so obvious option for 2D animation is using a 3D Program. Did you know that later episodes of [Southpark][3] are animated in Maya?&#xD;&#xA;&#xD;&#xA;With an orthographic camera projection, proper lighting and flat-shading you can create animations that look 2D, but are created in a 3D software. Most 3D programs have sophisticated animation tools like bones, inverse kinematics, constraints, soft-bodies etc. [Blender][4] would be a good (free) choice to get started. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.adobe.com/products/flash/&#xD;&#xA;  [2]: http://www.toonboom.com/main/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/South_Park&#xD;&#xA;  [4]: http://www.blender.org/" />
  <row Id="15790" PostHistoryTypeId="4" PostId="7792" RevisionGUID="0e975cfd-a256-4332-ad43-b242719e8321" CreationDate="2011-01-28T08:59:33.850" UserId="20" Comment="edited title, tags" Text="How to learn 2d animation?" />
  <row Id="15791" PostHistoryTypeId="6" PostId="7792" RevisionGUID="0e975cfd-a256-4332-ad43-b242719e8321" CreationDate="2011-01-28T08:59:33.850" UserId="20" Comment="edited title, tags" Text="&lt;2d&gt;&lt;animation&gt;&lt;tutorials&gt;&lt;learning&gt;" />
  <row Id="15792" PostHistoryTypeId="2" PostId="7796" RevisionGUID="b1265806-a92b-4485-bd73-f5d52a30148f" CreationDate="2011-01-28T09:12:08.987" UserId="4984" Text="What technology would you use to communicate between a two-player,turn-based, board game (like checkers or Othello) running native on iOS, and a remote game server&#xD;&#xA;&#xD;&#xA;The remote game server is just the artificial intelligence portion of the computer player and it is coded in Lua." />
  <row Id="15793" PostHistoryTypeId="1" PostId="7796" RevisionGUID="b1265806-a92b-4485-bd73-f5d52a30148f" CreationDate="2011-01-28T09:12:08.987" UserId="4984" Text="What technology would you use to communicate between an iOS game and a Lua-based AI server?" />
  <row Id="15794" PostHistoryTypeId="3" PostId="7796" RevisionGUID="b1265806-a92b-4485-bd73-f5d52a30148f" CreationDate="2011-01-28T09:12:08.987" UserId="4984" Text="&lt;game-design&gt;&lt;lua&gt;&lt;gameloop&gt;&lt;ios&gt;" />
  <row Id="15795" PostHistoryTypeId="2" PostId="7797" RevisionGUID="e25eb7b8-3548-4f28-8865-a256163465ce" CreationDate="2011-01-28T09:21:38.470" UserId="20" Text="Others have mentioned Flash, Java and Silverlight. Sadly there are no official numbers for Unity I'm aware of. In a rather old [blog post][1] they talk about ~1% pre-installed user base. This [article over at Gamasutra][2] also assumes 1% penetration. Although the conversion seems to rather high (people willing to install the plugin). &#xD;&#xA;&#xD;&#xA;User base might also increase with gaming platforms like [Kongregate supporting Unity Web-Games][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.unity3d.com/2008/03/31/thoughts-on-browser-plugin-penetration/&#xD;&#xA;  [2]: http://www.gamasutra.com/blogs/AlistairDoulin/20110121/6847/Is_There_A_Unity_Penetration_Issue.php&#xD;&#xA;  [3]: http://www.kongregate.com/unity_game_contest" />
  <row Id="15796" PostHistoryTypeId="2" PostId="7798" RevisionGUID="064d172f-6c22-462b-8df3-81697854be01" CreationDate="2011-01-28T09:26:40.103" UserId="1581" Text="One option is Websockets.&#xD;&#xA;&#xD;&#xA;There's a [Lua Websocket server][1]. I'm pretty sure iOS will be able to communicate with that (at least with regular sockets)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pastebin.com/f50d79dcd" />
  <row Id="15797" PostHistoryTypeId="2" PostId="7799" RevisionGUID="95fa2b17-9423-41ab-a0ee-b9123e6867fd" CreationDate="2011-01-28T09:34:34.570" UserId="3599" Text="2D animation is a whole art and profession. And actually a very hard one to master. Not every animator out there does good animation, indeed. But for basic animation as you said... It depends. It's mostly simple to achieve an ok level of sprite animation for mobiles using like 4 frames for a walk cycle 24x24 pixels sprite. You can do that indeed just with Gimp and using layers transparency to have the previous or next frame in overlay as a guide.(&quot;onion skinning&quot;) .It has other features to help in this.&#xD;&#xA;&#xD;&#xA;As you go trying to do higher resolution 2d animation, the thing gets more complex. A fast advice is to draw, in a, for example, 13 frames walk cycle, the frames 1, 7, 13. Then draw ibetweens of those, like 4, 10. Then the remaining ones. (is a bad example, tho)&#xD;&#xA;&#xD;&#xA;All this, using onion skinning feature.&#xD;&#xA;There are many softwares, I'd advice using [Pencil][1] and [Gimp][2].&#xD;&#xA;For pixel art, low res sprites, might want to check as well [GraphicsGale][3].&#xD;&#xA;And of course, is a lot about checking constantly the flow and animation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pencil-animation.org&#xD;&#xA;  [2]: http://www.gimp.org&#xD;&#xA;  [3]: http://www.humanbalance.net/gale/us/" />
  <row Id="15798" PostHistoryTypeId="2" PostId="7800" RevisionGUID="960de0d9-d934-4236-b162-bf8001b7e4b5" CreationDate="2011-01-28T10:05:24.160" UserId="1868" Text="Strange that [Google Closure Library][1] hasn't been mentioned. It has a huge API, allows more object oriented coding style and has the compiler.&#xD;&#xA;&#xD;&#xA;I have used so far only the compiler but I am planning to study rest asap.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/closure/library/" />
  <row Id="15799" PostHistoryTypeId="25" PostId="7796" RevisionGUID="bf6c71ad-1c7f-4323-9d0b-bb72fd9530cf" CreationDate="2011-01-28T11:15:53.943" Comment="http://twitter.com/#!/StackGameDev/status/30947165723435010" />
  <row Id="15800" PostHistoryTypeId="2" PostId="7801" RevisionGUID="28e0c5b8-3ef0-40a9-8003-5fd713656f8d" CreationDate="2011-01-28T12:06:30.450" UserId="3817" Text="Well, as a result of my study so far about the problem, I found that the xml_parser can't read the data written in UTF-8 format. In other words, it stops when reaching such data reporting an error 'Invalid character'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15804" PostHistoryTypeId="4" PostId="6608" RevisionGUID="2afd33a4-fc31-4fa2-bc9f-44a487db0ec7" CreationDate="2011-01-28T13:16:29.447" UserId="189" Comment="fixed spelling in title" Text="Which one would be preferred as a game development language/tool?" />
  <row Id="15810" PostHistoryTypeId="2" PostId="7804" RevisionGUID="39380f0b-8e69-4890-a9f0-9f8c78bad6e3" CreationDate="2011-01-28T14:30:43.093" UserId="4991" Text="Game design and development are different (often confused) topics.  Game design concerns the design of gameplay and game mechanics (rules of the game, so to speak) rather than the actual coding, audio and graphic design involved in implementing the game.  I believe this question is about Game design.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- [The Art of Game Design: A book of lenses][1] This book is hands-down the best I've come across.&#xD;&#xA;- &quot;Game Design: Theory and Practice&quot; is quite interesting, especially numerous lengthy interviews with prominent game designers.&#xD;&#xA;- &quot;Art of Computer Game Design&quot; stood for two decades as the authoritative book on this topic.  Although a bit dated, it still contains much relevant wisdom.  It can be legally downloaded free (google for it - I don't have the requisite karma to post a link).&#xD;&#xA;- &quot;Rules of Play&quot; is often cited as a foundational book, but I didn't find it that helpful.&#xD;&#xA;&#xD;&#xA;I've also checked out a number of other game design books that didn't do much for me, such as &quot;Fundamentals of Game Design.&quot;  Many repeat the same few truisms and have a very low signal/noise ratio.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/dp/0123694965/?tag=xenocidslair-20&#xD;&#xA;" />
  <row Id="15811" PostHistoryTypeId="2" PostId="7805" RevisionGUID="78fc3e8e-679d-4afe-8a33-5642c2fca1df" CreationDate="2011-01-28T14:32:19.650" UserId="1094" Text="Absolutely, yes.&#xD;&#xA;&#xD;&#xA;WebGL is included in nightly builds of both WebKit (Chrome/Safari) and Gecko (Firefox). WebSockets is currently disabled due to security issues, but there is no reason why it shouldn't be re-enabled once the issues are resolved. In the meantime there is always HTTP. &#xD;&#xA;&#xD;&#xA;Will all games be written this way? No, but a significant number will be. Once WebGL is in final versions of Chrome and Firefox the penetration will already be higher than that of native plug-ins like Unity.&#xD;&#xA;&#xD;&#xA;JavaScript performance is absolutely up to writing games. You probably won't see a Crysis level of graphics for a while, but remember with WebGL, the number-crunching is offloaded to the GPU.&#xD;&#xA;&#xD;&#xA;For a small 2-man team you will need to be prepared to do a lot coding which ever engine you use. There currently aren't any WebGL/JavaScript engines that actually cover much of the game code. SceneJS, three.js and similar are wrappers over the graphics layer, but provide nothing for collision, physics, audio, resource-loading, network or tools which make up the bulk of a product like Unreal Engine, or Unity.&#xD;&#xA;&#xD;&#xA;It's early days at the moment, I'd expect to see more middleware emerging over the next year." />
  <row Id="15812" PostHistoryTypeId="2" PostId="7806" RevisionGUID="6c37d8a0-b06e-4a41-8356-717365dc263b" CreationDate="2011-01-28T14:50:42.987" UserId="2229" Text="In my game, I have:&#xD;&#xA;&#xD;&#xA;**Execution Manager**, which initalizes the application (game), loads resources, releases resources on application exit, etc. It initalizes Application Engine, GameViewEngine, GameLogicEngine.&#xD;&#xA;&#xD;&#xA;**Game State Manager**, which resides in the GameLogicEngine, and is responsible for controlling the things related to game main loop: collision detection, physics calculation, keyboard reading, math operations, etc...&#xD;&#xA;&#xD;&#xA;Initially, I tended to have only one Game State Manager which was part of my GameLogicEngine. However, I had some difficulties with controll over the intialization of main subsystems (GameLogic, ApplicationEngine, ...). It could have been done, but it was more messy, imo.&#xD;&#xA;&#xD;&#xA;Now things look more transparent to me, and I am happy with the design." />
  <row Id="15817" PostHistoryTypeId="5" PostId="7795" RevisionGUID="f5ba613f-7ba2-4ad9-aa6e-ce7d0b0f3179" CreationDate="2011-01-28T15:17:50.013" UserId="20" Comment="fixed grammar" Text="Classical 2D animations are done frame by frame. What you'll see often is that they use a reduced framerate (eg. every frame is displayed twice) to lower the amount of images that have to be drawn.&#xD;&#xA;&#xD;&#xA;[Flash][1] is a very good tool for 2D animation. It provides you with onion-skinning (previous frames shine through while you're drawing your new frame), tweening and shape-morphing. Since version CS4, it also comes with bones and inverse kinematics which makes animating characters with limbs so much easier.&#xD;&#xA;&#xD;&#xA;There's also &quot;[Toon Boom][2]&quot;. Although their website looks horrible, their products are used by professional animators. They have a lot of different software-packages available, for hobby/fun up to professional animation software.&#xD;&#xA;&#xD;&#xA;Tools like GIMP and Photoshop also provide some functionality for animation but that's really just for very basic stuff.&#xD;&#xA;&#xD;&#xA;Another, not so obvious option for 2D animation is using a 3D Program. Did you know that later episodes of [Southpark][3] were animated using Maya?&#xD;&#xA;&#xD;&#xA;With an orthographic camera projection, proper lighting and flat-shading you can create animations that look 2D, but are created in a 3D software. Most 3D programs have sophisticated animation tools like bones, inverse kinematics, constraints, soft-bodies etc. [Blender][4] would be a good (free) choice to get started. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.adobe.com/products/flash/&#xD;&#xA;  [2]: http://www.toonboom.com/main/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/South_Park&#xD;&#xA;  [4]: http://www.blender.org/" />
  <row Id="15829" PostHistoryTypeId="5" PostId="7797" RevisionGUID="dc469848-7452-40af-b4a0-da0dd971a6b5" CreationDate="2011-01-28T15:36:21.800" UserId="20" Comment="spelling" Text="Others have mentioned Flash, Java and Silverlight. Sadly there are no official numbers for Unity I'm aware of. In a rather old [blog post][1] they talk about ~1% pre-installed user base. This [article over at Gamasutra][2] also assumes 1% penetration. Although the conversion seems to be rather high (people willing to install the plugin). &#xD;&#xA;&#xD;&#xA;User base might also increase with gaming platforms like [Kongregate supporting Unity Web-Games][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.unity3d.com/2008/03/31/thoughts-on-browser-plugin-penetration/&#xD;&#xA;  [2]: http://www.gamasutra.com/blogs/AlistairDoulin/20110121/6847/Is_There_A_Unity_Penetration_Issue.php&#xD;&#xA;  [3]: http://www.kongregate.com/unity_game_contest" />
  <row Id="15832" PostHistoryTypeId="2" PostId="7812" RevisionGUID="a4fbcb2d-59a4-4781-b56f-b6a3ab2264a0" CreationDate="2011-01-28T16:19:40.607" UserId="4997" Text="I recently began programming a game with the xna, so I'm sorry if this is a stupid question.  &#xD;&#xA;&#xD;&#xA;I would like to do a first person shooter game and move the camera with the mouse. The problem is that when it reaches the limits of the screen the camera won't turn anymore. How can I keep the mouse centered and detect its movements anyway?" />
  <row Id="15833" PostHistoryTypeId="1" PostId="7812" RevisionGUID="a4fbcb2d-59a4-4781-b56f-b6a3ab2264a0" CreationDate="2011-01-28T16:19:40.607" UserId="4997" Text="Avoid mouse movements in fps-style game" />
  <row Id="15834" PostHistoryTypeId="3" PostId="7812" RevisionGUID="a4fbcb2d-59a4-4781-b56f-b6a3ab2264a0" CreationDate="2011-01-28T16:19:40.607" UserId="4997" Text="&lt;xna&gt;&lt;camera&gt;" />
  <row Id="15835" PostHistoryTypeId="2" PostId="7813" RevisionGUID="83176eb2-b2c5-4be0-8a68-583ee0cb971a" CreationDate="2011-01-28T16:21:14.160" UserId="4996" Text="I remember that way back around 1995, there was this big craze with VR in the media, a whole bunch of (mostly mediocre) games labeled as &quot;virtual-reality-interactive-movie (...)&quot; were published. If I recall correctly, the first 3D VR helmet was called VFX-1 and was sold bundled with Descent and some dedicated joystick. I never owned one, and I read just one review which was mostly enthusiastic, but pointed to some weak points, like the eyes getting tired after an hour or so of playing. Then the whole thing basically flickered down and died. &#xD;&#xA;&#xD;&#xA;I suppose the main reason it wasn't successful was that the hardware of the day was not powerful enough, the VR gear's design wasn't perfected to make it comfortable and natural to use, and the companies that made it failed to market it successfully. What I can't understand is why isn't there any development in the field today. There is some vr-ish hardware mostly targeted at the consoles (Kinect, Wii remote, TrackIR), but all projects of creating some 3d head-mounted display system seem to be in early infancy, appear once in a trade show somewhere and aren't heard of again. &#xD;&#xA;&#xD;&#xA;I think it could work great with head tracking and some of today's shooters, flight sims (trackIR is nice but the movement scale translation is awkward) and other games with an FPP POV. Is there any technological reason why decent vr headgear can't be made today, or is it just that nobody really cares/everyone is scared to repeat the '90s failure?" />
  <row Id="15836" PostHistoryTypeId="1" PostId="7813" RevisionGUID="83176eb2-b2c5-4be0-8a68-583ee0cb971a" CreationDate="2011-01-28T16:21:14.160" UserId="4996" Text="Why doesn't it seem to be any development in the field of 3D VR gear, especially with regard to gaming?" />
  <row Id="15837" PostHistoryTypeId="3" PostId="7813" RevisionGUID="83176eb2-b2c5-4be0-8a68-583ee0cb971a" CreationDate="2011-01-28T16:21:14.160" UserId="4996" Text="&lt;3d&gt;" />
  <row Id="15839" PostHistoryTypeId="2" PostId="7815" RevisionGUID="3c591856-1f87-4406-8b37-e3aded395344" CreationDate="2011-01-28T16:31:28.470" UserId="741" Text="My opinion: I think the fact that it's been tried and failed several times should hint that the fundamental problems haven't yet been overcome. Users aren't interested enough in the 3D / immersion, and the downsides (the requirement to wear head-gear) are more than enough to outweigh the interest.&#xD;&#xA;&#xD;&#xA;Certainly everyone I've ever spoken to about it says something along the lines of 'maybe, if the glasses were cheap, and looked just like glasses'. And it's hard to make display glasses which are equivalent in terms of lightness and comfort to regular glasses; even before you get into the display quality or issues of mixing the virtual display with the ability to see the real world.&#xD;&#xA;&#xD;&#xA;Maybe, if there was a tech advance that meant the displays could improve on previous efforts in terms of functionality, but cheap enough to come somewhere near the mass market. Until that tech advance comes, this will stay an expensive prototype that you only see at tech shows.&#xD;&#xA;&#xD;&#xA;In a similar way, I think that even the requirement to wear inert glasses is enough to put many people off the new wave of 3D TVs. If 3D is really to become the new standard, there needs to be an evolution in display technology that lets the display show 3D, without the need for observers to be wearing / doing anything." />
  <row Id="15840" PostHistoryTypeId="2" PostId="7816" RevisionGUID="adf17f00-23e4-4ee7-8a91-66582d1b2221" CreationDate="2011-01-28T16:32:46.533" UserId="1430" Text="I'm sure there are several factors.&#xD;&#xA;&#xD;&#xA;Head-tracking technology is usually pretty bulky and expensive to produce. That means it's also expensive for consumers to acquire and since there are so few games that utilize it, it's kind of a catch-22. Similarly the lack of penetration or interest in the technology means that not much money has been devoted to researching miniaturization of the relevant technology for the consumer space, so the devices aren't getting smaller or cheaper.&#xD;&#xA;&#xD;&#xA;Furthermore, the requirement to wear such a thing drastically reduces the social aspect of the game-playing experience, which is a major trend in popular gaming right now -- especially when paired with the direction that controller technology has taken (focusing on much less encumbering devices that allow much more freedom)... such as the Wii and the Kinect.&#xD;&#xA;&#xD;&#xA;A headset is bulky, complicated, and isolating, which means it's much more of a hardcore gamer's type of thing. The hardcore market is a lot smaller *and* a lot more discerning, usually, so with that in mind I can see how this catch-22 came about. It takes a lot of money, a lot of smart people, and a lot of marketing to make an alternative input device a common enough item, which is why it's ended up being basically a thing that only first-party console designers can seem to pull off -- and even then, they've had a poor track record (consider Nintendo's prior attempts at doing so -- not all of them were particularly successful). " />
  <row Id="15841" PostHistoryTypeId="2" PostId="7817" RevisionGUID="ad3bea58-5a6c-4e29-9c77-c18aece23c94" CreationDate="2011-01-28T16:54:22.973" UserId="1430" Text="The general approach to handling this is classic Win32 programming is to capture the mouse delta each frame, and then reset the mouse position to the center of the screen. You also want to make the mouse cursor invisible, obviously, as otherwise things look ugly. &#xD;&#xA;&#xD;&#xA;You can do the same thing in XNA, you just work with a slightly different interface. So you might do something like:&#xD;&#xA;&#xD;&#xA;1. At startup, set the mouse's position to the center of your screen with [Mouse.SetPosition][1].&#xD;&#xA;2. Also at startup, [make the mouse invisible][2].&#xD;&#xA;3. Every input frame, [grab the current mouse state][3].&#xD;&#xA;4. Since you know the mouse was at the center, you can use the current X and Y values from the [MouseState][4] object you recovered in step #3 to compute the delta movement in both dimensions. You can feed these deltas to the rest of your game logic, such as (in your case) the camera code.&#xD;&#xA;5. Reset the mouse to the center of the screen before moving on to the next frame. &#xD;&#xA;&#xD;&#xA;EDIT: Also, [here is a tutorial][5] I dug up via a Google search for &quot;XNA relative mouse input&quot; (which is what you're asking about). It's a bit old, I think, so some of the methods may have had their names changed, but the concepts should still apply.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.input.mouse.setposition.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.ismousevisible.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.input.mouse.getstate.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.input.mousestate.aspx&#xD;&#xA;  [5]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Mouse_camera.php" />
  <row Id="15842" PostHistoryTypeId="5" PostId="7794" RevisionGUID="373a7ab4-72f7-4e20-9082-c4b36689c232" CreationDate="2011-01-28T16:54:56.880" UserId="3659" Comment="Added software for making gifs: Photoscape and ImageReady" Text="Right now, I can think of a few ways you can do a 2-D animation:&#xD;&#xA;&#xD;&#xA; - Moving an object's x,y coordinates around (e.g. to slide a rectangular menu - you change the y-coordinates every few ms)&#xD;&#xA; - Drawing every single frame out in an image editor and choosing the right frame to draw at the right moment (e.g. drawing a flame animation)&#xD;&#xA; - combining the two above (e.g. having a sprite walk across a screen)&#xD;&#xA;&#xD;&#xA;It's all about giving the *illusion* of movement.&#xD;&#xA;&#xD;&#xA;How to do it well?&#xD;&#xA;&#xD;&#xA;- It has to be timed properly to make it appear smooth (be aware of hardware constraints)&#xD;&#xA;- The more frames you have, the more details you can show, and the better it will look (however you end up having to draw more frames)&#xD;&#xA;&#xD;&#xA;Tips and tricks?&#xD;&#xA;&#xD;&#xA; - Wikipedia has some concepts that you should take a look at: [tweening][1], [morphing][2], [onion skinning][3] and [interpolated][4] rotoscoping&#xD;&#xA;&#xD;&#xA;Software options? &#xD;&#xA;&#xD;&#xA;- I would say it depends on what you are trying to animate. If you want to animate sprites or simple objects, then MS Paint will probably suffice&#xD;&#xA;-  [GIMP][5] is an open source alternative to Photoshop&#xD;&#xA;- [Photoscape][6] is another free photo editor. It also allows you to make animated GIFs. &#xD;&#xA;- ImageReady (Not free, discontinued) can also animate gifs&#xD;&#xA;&#xD;&#xA;As for tutorials, I think this depends a lot on your goal. If you are doing a flash game, then search flash tutorials. Drawing is one thing, but you also need to time (and possibly move) the images to animate it properly - and so you might as well learn how to do it in the platform you are going for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tweening&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Morphing&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Onion_skinning&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Interpolated&#xD;&#xA;  [5]: http://www.gimp.org/&#xD;&#xA;  [6]: http://www.photoscape.org/ps/main/index.php" />
  <row Id="15843" PostHistoryTypeId="6" PostId="7812" RevisionGUID="59da6aea-8252-467c-ae21-c388bcecd79d" CreationDate="2011-01-28T16:59:29.020" UserId="1430" Comment="edited tags" Text="&lt;xna&gt;&lt;camera&gt;&lt;input&gt;" />
  <row Id="15844" PostHistoryTypeId="5" PostId="7794" RevisionGUID="8243cce0-ca81-4d19-ac35-95b9ace86827" CreationDate="2011-01-28T17:05:32.513" UserId="3659" Comment="removed ImageReady since it is discontinued, explained what making gifs does for you" Text="Right now, I can think of a few ways you can do a 2-D animation:&#xD;&#xA;&#xD;&#xA; - Moving an object's x,y coordinates around (e.g. to slide a rectangular menu - you change the y-coordinates every few ms)&#xD;&#xA; - Drawing every single frame out in an image editor and choosing the right frame to draw at the right moment (e.g. drawing a flame animation)&#xD;&#xA; - combining the two above (e.g. having a sprite walk across a screen)&#xD;&#xA;&#xD;&#xA;It's all about giving the *illusion* of movement.&#xD;&#xA;&#xD;&#xA;How to do it well?&#xD;&#xA;&#xD;&#xA;- It has to be timed properly to make it appear smooth (be aware of hardware constraints)&#xD;&#xA;- The more frames you have, the more details you can show, and the better it will look (however you end up having to draw more frames)&#xD;&#xA;&#xD;&#xA;Tips and tricks?&#xD;&#xA;&#xD;&#xA; - Wikipedia has some concepts that you should take a look at: [tweening][1], [morphing][2], [onion skinning][3] and [interpolated][4] rotoscoping&#xD;&#xA;&#xD;&#xA;Software options? &#xD;&#xA;&#xD;&#xA;- I would say it depends on what you are trying to animate. If you want to animate sprites or simple objects, then MS Paint will probably suffice&#xD;&#xA;-  [GIMP][5] is an open source alternative to Photoshop&#xD;&#xA;- [Photoscape][6] is another free photo editor. It also allows you to make animated GIFs - good for testing the timing in your animations &#xD;&#xA;&#xD;&#xA;As for tutorials, I think this depends a lot on your goal. If you are doing a flash game, then search flash tutorials. Drawing is one thing, but you also need to time (and possibly move) the images to animate it properly - and so you might as well learn how to do it in the platform you are going for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tweening&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Morphing&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Onion_skinning&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Interpolated&#xD;&#xA;  [5]: http://www.gimp.org/&#xD;&#xA;  [6]: http://www.photoscape.org/ps/main/index.php" />
  <row Id="15845" PostHistoryTypeId="25" PostId="7812" RevisionGUID="b2f42f42-dc73-4eb5-a851-a0ea16694507" CreationDate="2011-01-28T17:15:55.030" Comment="http://twitter.com/#!/StackGameDev/status/31037766913490944" />
  <row Id="15847" PostHistoryTypeId="2" PostId="7818" RevisionGUID="e91c55e6-5b10-453f-8075-94a34d1da10e" CreationDate="2011-01-28T18:23:00.317" UserId="154" Text="There are multiple levels of what you are calling VR.&#xD;&#xA;&#xD;&#xA;**Translated Head Tracking**&#xD;&#xA;&#xD;&#xA;On the PC companies like [TrackIR][1] release devices precisely for doing this sort of thing. And several games, mostly on the flight simulation side, have support the head tracking.&#xD;&#xA;&#xD;&#xA;ARMA II + TrackIR [Demonstration][2]&#xD;&#xA;&#xD;&#xA;There hasn't been anything like this available in the console space but that may be changing soon. For example it's possible to do something very similar to what you see with TrackIR using the Xbox Kinect. Imagine the player playing with a standard controller and the Kinect tracks the movement of the players head and translates it on screen. There are two problems with this though:&#xD;&#xA;&#xD;&#xA;1. The amount of processing power needed to find the players head and track movements. Not to mention that any mistakes in tracking can be hugely distracting. &#xD;&#xA;2. This limits the locations a player can sit while playing a game. On the PC you tend to sit directly in front of and in the center of the monitor. On the console side people sit at all sorts of distances and positions from their TV. And effect like this works best only when you are centered to the display device.&#xD;&#xA;&#xD;&#xA;**Head Mounted Displays**&#xD;&#xA;&#xD;&#xA;This is the VR helmet style step the people often think of when VR is mentioned. There are several problems with HMDs.&#xD;&#xA;&#xD;&#xA;1. Displays were often heavy, leading to neck fatigue. This will improve over time as display tech gets smaller and lighter.&#xD;&#xA;2. Displays were low resolution. This has basically been addressed as an offshoot of the advancements in the mobile phone market. There are now lots of relatively cheap high res small screen technologies.&#xD;&#xA;3. Safety issues with enveloping displays. To really feel immersed you want to block out the players vision outside the screens in the HMD. Of course in doing so players my trip and fall over something in the real world. No one wants to take that lawsuit risk.&#xD;&#xA;4. Displays need a connection to content source. If you want console level graphics/games in your HMD, then you need to connect your HMD to a console. So now you've got a cable running to your head which hurts in a world of wireless controllers and communication. There are some advancements in wireless video transfer, but then we start to run into battery issues with the display itself, if it doesn't have a constant source of wired power. &#xD;&#xA;5. Control issues related to 360 movement. If your game requires you to turn around to look behind you this doesn't mesh well with peoples living room furniture. People play games sitting on a couch or chair and they often are restricted in where they can move. This effectively limits the control input of an HMD to the level of the translated head tracking above, which can be done with much simpler technology.&#xD;&#xA;6. HMDs are inherently isolating. Recent market expansion in games has come from more social experiences: dancing, music, and motion games. Building an expensive piece of technology for a smaller market isn't economically viable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.naturalpoint.com/trackir/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=9wXx3vMy_AQ" />
  <row Id="15848" PostHistoryTypeId="2" PostId="7819" RevisionGUID="e0ea18d5-d0af-4db5-8b35-9ecf2ae23d63" CreationDate="2011-01-28T19:09:09.643" UserId="178" Text="I would recommend you the book &quot;The Animators Survival Kit&quot;, it's not directly targeted at 2D animation using computer software but more about general animation techniques (and quite entertaining to read).&#xD;&#xA;&#xD;&#xA;[Amazon link][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Animators-Survival-Kit-Expanded-Principles/dp/0571238343/ref=sr_1_1?ie=UTF8&amp;qid=1296241253&amp;sr=8-1" />
  <row Id="15849" PostHistoryTypeId="2" PostId="7820" RevisionGUID="2eb03fbf-88ad-4429-99cc-93d5582c303e" CreationDate="2011-01-28T19:41:23.240" UserId="160" Text="Gregory's answer can be amended to handle negative rotation by just wrapping and unwrapping by a full rotation:&#xD;&#xA;&#xD;&#xA;    return PiOver4 * (float) (Math.Round(TwoPi + rotationToSnap / PiOver4) - TwoPi);&#xD;&#xA;" />
  <row Id="15850" PostHistoryTypeId="2" PostId="7821" RevisionGUID="c0f93134-81ee-4f29-8823-2958229c47e4" CreationDate="2011-01-28T20:08:05.347" UserId="4822" Text="I'm trying to think of sounds that will help convey the time of day and weather condition. I'm not even sure of all the weather conditions I would consider, and some are obvious. Like if it's raining, the sound of rain. But then I'm thinking, what about for a calm day? If it's morning time, I could do birds chirping or something. Night time could be an owl or something. What are some good combinations of sounds/weather/time to have a good effect?" />
  <row Id="15851" PostHistoryTypeId="1" PostId="7821" RevisionGUID="c0f93134-81ee-4f29-8823-2958229c47e4" CreationDate="2011-01-28T20:08:05.347" UserId="4822" Text="Sounds to describe the weather?" />
  <row Id="15852" PostHistoryTypeId="3" PostId="7821" RevisionGUID="c0f93134-81ee-4f29-8823-2958229c47e4" CreationDate="2011-01-28T20:08:05.347" UserId="4822" Text="&lt;game-design&gt;&lt;sound&gt;&lt;special-effects&gt;&lt;sound-effects&gt;" />
  <row Id="15853" PostHistoryTypeId="2" PostId="7822" RevisionGUID="a2dea045-1d14-441b-bdcf-6e1fdbaf7542" CreationDate="2011-01-28T20:13:59.440" UserId="189" Text="How about using **background music** instead of sound effects?&#xD;&#xA;&#xD;&#xA;[Animal Crossing][1] is a real-time game (meaning the game keeps track of the time), and it had a different background tune for each hour of the day; the tune in the middle of the day is upbeat, &quot;friendly&quot; sounding, and the night one is very quiet and slow with some extra percussion sounds thrown in. I don't recall any bird chirping sounds, though there is the sound of water running when you walk near a stream and the sound of your own footsteps when you walk around (specific to the material being walked on), and there definitely was the pitter-patter of rain when it was raining.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Animal_crossing" />
  <row Id="15854" PostHistoryTypeId="25" PostId="7821" RevisionGUID="79b44c4f-cb00-41db-b4f7-1d0c7d471c5a" CreationDate="2011-01-28T20:15:54.593" Comment="http://twitter.com/#!/StackGameDev/status/31083063358259200" />
  <row Id="15855" PostHistoryTypeId="2" PostId="7823" RevisionGUID="63ac3d9a-9c59-4bf7-bf41-36b24c5be30c" CreationDate="2011-01-28T20:38:45.540" UserId="5001" Text="I am trying to implement a song into a game that begins playing and continually loops on Windows Phone 7 via XNA 4.0. On the emulator, this works fine, however when deployed to a phone, it simply gives a black screen before going back to the home screen. Here is the rogue code in question, and commenting this code out makes the app run fine on the phone:&#xD;&#xA;&#xD;&#xA;    // in the constructor fields&#xD;&#xA;    private Song song;&#xD;&#xA;&#xD;&#xA;    // in the LoadContent() method&#xD;&#xA;    song = Content.Load&lt;Song&gt;(&quot;song&quot;);&#xD;&#xA;&#xD;&#xA;    // in the Update() method&#xD;&#xA;    if (MediaPlayer.GameHasControl &amp;&amp; MediaPlayer.State != MediaState.Playing)&#xD;&#xA;    {&#xD;&#xA;        MediaPlayer.Play(song);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The song file itself is a 2:53 long, 2.28mb .wma file at 106kbps bitrate.&#xD;&#xA;&#xD;&#xA;Again this works perfectly on emulator but does not run at all on phone. Thanks for any help you can provide!" />
  <row Id="15856" PostHistoryTypeId="1" PostId="7823" RevisionGUID="63ac3d9a-9c59-4bf7-bf41-36b24c5be30c" CreationDate="2011-01-28T20:38:45.540" UserId="5001" Text="Playing a Song causing WP7 to crash on phone, but not on emulator" />
  <row Id="15857" PostHistoryTypeId="3" PostId="7823" RevisionGUID="63ac3d9a-9c59-4bf7-bf41-36b24c5be30c" CreationDate="2011-01-28T20:38:45.540" UserId="5001" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;audio&gt;&lt;windows-phone-7&gt;" />
  <row Id="15858" PostHistoryTypeId="2" PostId="7824" RevisionGUID="8da1c154-76f7-4386-ad7a-04ec6234c101" CreationDate="2011-01-28T21:50:58.193" UserId="4604" Text="The sound of rain, provided it is not too loud, is a good idea, as a rain visual without a rain sound is disconcerting.  Occasional playing of the sound of thunder can really help, but you would probably need to support some kind of lightning effect for that to work.&#xD;&#xA;&#xD;&#xA;Is your game set in the country or the city?  This drastically alters the sound of a 'calm' day and a usual night.  Considering what you mentioned, I'm going to assume country.  The sound of an occasional wind gust or a wolf howl for such a situation is not out of the question.  Whatever enhances the overall feeling of being *in* the environment.  That is quite possibly the biggest problem with music and sound effects - they are at their best when you don't even notice them for what they are; their presence is just part of the scene and they don't stand out.&#xD;&#xA;&#xD;&#xA;Whatever your choice, make sure to sufficiently space the sound effect between plays and provide a pretty decent number of sounds that are played.  Hearing the same chirping owl every three seconds at night could get *really* annoying." />
  <row Id="15863" PostHistoryTypeId="2" PostId="7826" RevisionGUID="e8daa8f5-5577-4fc9-a959-b2541ed150f1" CreationDate="2011-01-28T22:04:56.103" UserId="1443" Text="You didn't specify a discipline, but for programming almost every game company test I've seen has included:&#xD;&#xA;&#xD;&#xA;- A question about virtual destructors in C++. What they do, when are they needed, etc.&#xD;&#xA;- A question about dot products and cross products, what they do, how they're used, possibly how they're derived." />
  <row Id="15864" PostHistoryTypeId="2" PostId="7827" RevisionGUID="99faf751-c2f4-43c9-881b-90875b311fe5" CreationDate="2011-01-29T01:01:48.027" UserId="2520" Text="Can I make a significant difference by changing the types of games that are available? Are there any generic features that I can add to games, which will help make them more attractive to casual female gamers?" />
  <row Id="15865" PostHistoryTypeId="1" PostId="7827" RevisionGUID="99faf751-c2f4-43c9-881b-90875b311fe5" CreationDate="2011-01-29T01:01:48.027" UserId="2520" Text="What can I do to increase the female:male ratio of gamers in an online, casual gaming, community?" />
  <row Id="15866" PostHistoryTypeId="3" PostId="7827" RevisionGUID="99faf751-c2f4-43c9-881b-90875b311fe5" CreationDate="2011-01-29T01:01:48.027" UserId="2520" Text="&lt;community-management&gt;" />
  <row Id="15867" PostHistoryTypeId="2" PostId="7828" RevisionGUID="dff53246-731c-4919-88a5-ecd17218b5c3" CreationDate="2011-01-29T01:31:47.193" UserId="395" Text="[ZeroMQ](http://www.zeromq.org/) is a great layer for taking care of the actual transport and has bindings available for both C# and Lua. For the actual messaging I would probably use either [Protocol Buffers](http://code.google.com/p/protobuf/) (again, available for both langs) or simply use JSON strings (available for everything ever)." />
  <row Id="15868" PostHistoryTypeId="2" PostId="7829" RevisionGUID="6f52a816-3b62-40de-b0aa-88990ceb057e" CreationDate="2011-01-29T02:00:09.430" UserId="5007" Text="I am currently planning how to integrate Lua scripting in my 2D Game Engine, and i would like to go straight to the most adequate solution for having C++ classes and objects exposed.&#xD;&#xA;&#xD;&#xA;I've read this (if it helps you help): http://lua-users.org/wiki/BindingCodeToLua&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All help is welcome, i need to pickup the best solution to start implementing &#xD;&#xA;Thanks" />
  <row Id="15869" PostHistoryTypeId="1" PostId="7829" RevisionGUID="6f52a816-3b62-40de-b0aa-88990ceb057e" CreationDate="2011-01-29T02:00:09.430" UserId="5007" Text="What is the recommended library for using Lua from C++?" />
  <row Id="15870" PostHistoryTypeId="3" PostId="7829" RevisionGUID="6f52a816-3b62-40de-b0aa-88990ceb057e" CreationDate="2011-01-29T02:00:09.430" UserId="5007" Text="&lt;c++&gt;&lt;lua&gt;" />
  <row Id="15871" PostHistoryTypeId="5" PostId="7829" RevisionGUID="ea8c7c0c-2263-4ce2-b0dc-887f6b4e6194" CreationDate="2011-01-29T02:14:58.033" UserId="5007" Comment="added 67 characters in body" Text="I am currently planning how to integrate Lua scripting in my 2D Game Engine, and i would like to go straight to the most adequate solution for having C++ classes and objects exposed.&#xD;&#xA;&#xD;&#xA;I've read this (if it helps you help): http://lua-users.org/wiki/BindingCodeToLua&#xD;&#xA;&#xD;&#xA;If you have a better scripting language to recomend, go for it ;D&#xD;&#xA;&#xD;&#xA;All help is welcome, i need to pickup the best solution to start implementing &#xD;&#xA;Thanks" />
  <row Id="15872" PostHistoryTypeId="25" PostId="7827" RevisionGUID="02207197-cdb6-4eee-bb08-e36566d04859" CreationDate="2011-01-29T02:15:54.970" Comment="http://twitter.com/#!/StackGameDev/status/31173661926891520" />
  <row Id="15873" PostHistoryTypeId="2" PostId="7830" RevisionGUID="ec56026c-d5d1-4431-abfb-67be4b2bbbb7" CreationDate="2011-01-29T02:21:41.873" UserId="953" Text="I am not a woman gamer, but one thing you should definitely try is removing things which would tend to drive them away.  Are there games that use a lot of cleavage or exploitative visuals?  Does your advertising or the game copy use gendered language (&quot;are you man enough&quot;)?  Do your games tend to feature male main characters, with women as props or victims?  Are your community features (forums and chat rooms) policed for sexist, antisocial, and homophobic content?  All these are things that I often hear discussed as reasons why women are driven away from communities.&#xD;&#xA;&#xD;&#xA;Things that you shouldn't do in an attempt to attract women: add lots of pink or games about shopping and fashion.  While these games may appeal to some girls and women, they can often come across as pandering or disingenuous.  Also, avoid having a ghetto category like &quot;games for girls.&quot;" />
  <row Id="15874" PostHistoryTypeId="2" PostId="7831" RevisionGUID="bdfa331c-327b-4836-ad1d-c58693804102" CreationDate="2011-01-29T02:49:56.490" UserId="2520" Text="There are many traditional animation techniques - such as blurring of motion, motion along an elliptical curve rather than a straight line, counter-motion before beginning of movement - which help with creating the appearance of a realistic 3D animated character.&#xD;&#xA;&#xD;&#xA;I'm looking to incorporate tools and short cuts for some of these into my graphics engine, to make it easier for my end users to use these techniques in their animations. Is there a good resource listing the techniques and the principles behind them, especially how they might apply to a graphics engine or 3D animation?" />
  <row Id="15875" PostHistoryTypeId="1" PostId="7831" RevisionGUID="bdfa331c-327b-4836-ad1d-c58693804102" CreationDate="2011-01-29T02:49:56.490" UserId="2520" Text="I'm looking to learn how to apply traditional animation techniques to my graphics engine - are there any tutorials or online-resources that can help?" />
  <row Id="15876" PostHistoryTypeId="3" PostId="7831" RevisionGUID="bdfa331c-327b-4836-ad1d-c58693804102" CreationDate="2011-01-29T02:49:56.490" UserId="2520" Text="&lt;animation&gt;&lt;techniques&gt;" />
  <row Id="15877" PostHistoryTypeId="2" PostId="7832" RevisionGUID="4175fdd9-bc97-4b8d-b9d7-9574660b34ad" CreationDate="2011-01-29T03:57:28.987" UserId="4779" Text="I will not go into details, but I would like to hear your opinions about this:&#xD;&#xA;&#xD;&#xA;Essentially, my project will be a 2d game, with lots of complex levels, where some might be simple and others might be a bit more deep, with physics, etc. We want to implement **our very own** online structure: logging in, leaderboards, achievements, friends etc with our own servers. This means no OpenFeint nor GameCenter at all. We expect this game to be very large in both graphics and audio. We wish to use in-app purchases.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;Now, we considered two options. Cocos2d and Unity3d.&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;We need help deciding using the factors I mentioned before (networking, good performance even for a large game in terms of graphics and audio like this, in-app purchases, etc) which option would fit better this?&#xD;&#xA;&#xD;&#xA;Technically, both options can create 2d games. I'd like to hear your opinion." />
  <row Id="15878" PostHistoryTypeId="1" PostId="7832" RevisionGUID="4175fdd9-bc97-4b8d-b9d7-9574660b34ad" CreationDate="2011-01-29T03:57:28.987" UserId="4779" Text="Help comparing Cocos2d and Unity3d for this project....." />
  <row Id="15879" PostHistoryTypeId="3" PostId="7832" RevisionGUID="4175fdd9-bc97-4b8d-b9d7-9574660b34ad" CreationDate="2011-01-29T03:57:28.987" UserId="4779" Text="&lt;2d&gt;&lt;iphone&gt;&lt;unity&gt;&lt;network&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="15880" PostHistoryTypeId="2" PostId="7833" RevisionGUID="0dd0ded3-8423-4171-ada3-a87ecb4f913b" CreationDate="2011-01-29T03:58:03.487" UserId="1047" Text="I was thinking, what is needed for a good setup and what are good (free) tools to use? Some of what i came up with are&#xD;&#xA;&#xD;&#xA;- Bug tracking&#xD;&#xA;- Some good (distributed:P) source control (which means no svn fellas)&#xD;&#xA;- automated nightly builds or a continuous integration (or anything that automates builds and possibly sends emails when there are build errors)&#xD;&#xA;- wiki to document decisions, road map or milestones.&#xD;&#xA;- Something to backup assets (art, sound, etc) &#xD;&#xA;&#xD;&#xA;What else? and do you have suggestions for any of the above? i pretty much clueless of all of these except for source control" />
  <row Id="15881" PostHistoryTypeId="1" PostId="7833" RevisionGUID="0dd0ded3-8423-4171-ada3-a87ecb4f913b" CreationDate="2011-01-29T03:58:03.487" UserId="1047" Text="Whats a good setup/toolchain for a project?" />
  <row Id="15882" PostHistoryTypeId="3" PostId="7833" RevisionGUID="0dd0ded3-8423-4171-ada3-a87ecb4f913b" CreationDate="2011-01-29T03:58:03.487" UserId="1047" Text="&lt;tools&gt;" />
  <row Id="15883" PostHistoryTypeId="2" PostId="7834" RevisionGUID="fcbde0b0-6910-449f-8f2a-ee7671fb7505" CreationDate="2011-01-29T04:44:02.223" UserId="395" Text="Github, git, Hudson (note: this is not a hosted service), Github, Github :-)" />
  <row Id="15884" PostHistoryTypeId="2" PostId="7835" RevisionGUID="878b5768-6a72-4832-a379-a0ed3782f5d5" CreationDate="2011-01-29T05:14:33.533" UserId="1021" Text="Disclaimer: this is an open-ended and kinda &quot;far out&quot; question&#xD;&#xA;&#xD;&#xA;Over the last few years I've made a few iPhone games.  I use very common programs like Xcode and Illustrator to make the games.  &#xD;&#xA;&#xD;&#xA;Lately I've become tired of repeating certain tasks over and over again.  Here are some examples: &#xD;&#xA;&#xD;&#xA; - in Xcode: &quot;clean target, build, run&quot; over and over again&#xD;&#xA; - in Xcode: delete image resources and then import updated image resources (identical names)&#xD;&#xA;&#xD;&#xA;I'd like to automate these tasks in Xcode.  Any ideas?  I've done some automation in Photoshop using the &quot;button mode&quot; thing where you record a macro... that's been very useful.&#xD;&#xA;&#xD;&#xA;Here's the kinda wacky or &quot;far out&quot; part of the question:  how can this automation be done via voice commands?  (perhaps using a [Nuance][1] product or something)&#xD;&#xA;&#xD;&#xA;Here's an example of what I'd love to do via a few voice commands:&#xD;&#xA;&#xD;&#xA; 1. Save artwork from illustrator at a user-specified size (@2x versions as well)&#xD;&#xA; 2. Delete &quot;someArt.png&quot; and &quot;someArt@2x.png&quot; from Xcode&#xD;&#xA; 3. Add the updated versions of someArt.png to Xcode&#xD;&#xA; 4. In Xcode:  clean target, build, and run&#xD;&#xA;&#xD;&#xA;I know this question probably seems bizarre...  but something like this could make certain things substantially easier for game developers.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nuance.com/for-individuals/by-product/dragon-for-mac/index.htm" />
  <row Id="15885" PostHistoryTypeId="1" PostId="7835" RevisionGUID="878b5768-6a72-4832-a379-a0ed3782f5d5" CreationDate="2011-01-29T05:14:33.533" UserId="1021" Text="Automating repetitive game development tasks" />
  <row Id="15886" PostHistoryTypeId="3" PostId="7835" RevisionGUID="878b5768-6a72-4832-a379-a0ed3782f5d5" CreationDate="2011-01-29T05:14:33.533" UserId="1021" Text="&lt;automation&gt;" />
  <row Id="15887" PostHistoryTypeId="5" PostId="7835" RevisionGUID="f14cac38-1426-4e25-a9df-0d9fd1263cb6" CreationDate="2011-01-29T05:24:00.323" UserId="1021" Comment="more info" Text="Disclaimer: this is an open-ended and kinda &quot;far out&quot; question&#xD;&#xA;&#xD;&#xA;Over the last few years I've made a few iPhone games.  I use very common programs like Xcode and Illustrator to make the games.  &#xD;&#xA;&#xD;&#xA;Lately I've become tired of repeating certain tasks over and over again.  Here are some examples: &#xD;&#xA;&#xD;&#xA; - in Xcode: &quot;clean target, build, run&quot; over and over again&#xD;&#xA; - in Xcode: delete image resources and then import updated image resources (identical names)&#xD;&#xA;&#xD;&#xA;I'd like to automate these tasks in Xcode.  Any ideas?  I've done some automation in Photoshop using the &quot;button mode&quot; thing where you record a macro... that's been very useful.&#xD;&#xA;&#xD;&#xA;Here's the kinda wacky or &quot;far out&quot; part of the question:  how can this automation be done via voice commands?  (perhaps using a [Nuance][1] product or something)&#xD;&#xA;&#xD;&#xA;Here's an example of what I'd love to do via a few voice commands:&#xD;&#xA;&#xD;&#xA; 1. Save artwork from illustrator at a user-specified size (@2x versions as well)&#xD;&#xA; 2. Delete &quot;someArt.png&quot; and &quot;someArt@2x.png&quot; from Xcode&#xD;&#xA; 3. Add the updated versions of someArt.png to Xcode&#xD;&#xA; 4. In Xcode:  clean target, build, and run&#xD;&#xA;&#xD;&#xA;I know this question probably seems bizarre...  but something like this could make certain things substantially easier for game developers.&#xD;&#xA;&#xD;&#xA;Edit: wonder if a combination of AppleScript and Nuance might work?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nuance.com/for-individuals/by-product/dragon-for-mac/index.htm" />
  <row Id="15888" PostHistoryTypeId="2" PostId="7836" RevisionGUID="b0a6e828-e745-4e4a-b690-3010f72f1e28" CreationDate="2011-01-29T05:33:37.280" UserId="1430" Text="I like [Google Code][1] a lot -- if you are willing to make your project open-source, it's pretty awesome. It provides you with hosting for code (SVN or Mercurial), files for releases, a simple-but-effective wiki, and a straight-forward bug tracker. The downsides are that access control for the wiki is limited, and edits to the wiki cause commits to your repository.&#xD;&#xA;&#xD;&#xA;I've heard good things about [github][2], and from what I've seen of it while grabbing people's code from it, I like it. But I have never used it for more than that, because I don't have a compelling need (or desire) to use distributed version control.&#xD;&#xA;&#xD;&#xA;In the realm of less-general tools, [Perforce][3] is a powerful version control system that is used by just about every professional game development studio I have worked at or know of. They have free limited-user licenses. You need to host and administer the server yourself, though, which is something I have very limited experience doing so I can't comment much to that.&#xD;&#xA;&#xD;&#xA;I have used [Trac][4] for bug tracking before (and still do for my own projects that I host on my private SVN). It's also simple -- I am a fan of simple bug tracking and such, instead of systems like [Bugzilla][5], which I think are too much trouble to configure. I don't use Trac's built-in wiki, really, preferring [DokuWiki][6] instead. There is also the ever-popular [MediaWiki][7], if that's your thing.&#xD;&#xA;&#xD;&#xA;Backup-wise, I mostly use [Backblaze][8], which is awesome but violates your &quot;free&quot; constraint. If I couldn't use Backblaze I'd just back everything up via a cron job or something to an external hard drive and mirror that to my web server, probably.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/projecthosting/&#xD;&#xA;  [2]: http://github.com&#xD;&#xA;  [3]: http://perforce.com&#xD;&#xA;  [4]: http://trac.edgewall.org/&#xD;&#xA;  [5]: http://www.bugzilla.org/&#xD;&#xA;  [6]: http://www.dokuwiki.org/dokuwiki&#xD;&#xA;  [7]: http://www.mediawiki.org/wiki/MediaWiki&#xD;&#xA;  [8]: http://www.backblaze.com/" />
  <row Id="15889" PostHistoryTypeId="16" PostId="7834" RevisionGUID="0f451840-0497-4907-a97b-cf009571c0bd" CreationDate="2011-01-29T05:35:20.530" UserId="51" />
  <row Id="15890" PostHistoryTypeId="16" PostId="7836" RevisionGUID="8bd38877-ff76-472d-b989-8aee1baa039a" CreationDate="2011-01-29T05:35:20.530" UserId="51" />
  <row Id="15891" PostHistoryTypeId="16" PostId="7833" RevisionGUID="3c688ba0-d32b-47b4-abca-e97dcdc976ca" CreationDate="2011-01-29T05:35:20.530" UserId="51" />
  <row Id="15892" PostHistoryTypeId="2" PostId="7837" RevisionGUID="a9c9c7a5-377d-4e1d-82a9-d6538adeee97" CreationDate="2011-01-29T05:42:11.610" UserId="51" Text="I can't say enough positive things about &lt;a href=&quot;http://www.fogcreek.com/FogBugz/&quot;&gt;FogBugz&lt;/a&gt;.  It's the best bug/task tracking system I've used.  As of FogBugz 8 it even has a decent Wiki based of CKEditor.  It supports plugins so you can extend it to do a bunch of stuff (like a Kanban board), or customize its workflow, or do more extensive timesheet reporting, or whatever.  You can do self hosted or pay them to host.  &#xD;&#xA;&#xD;&#xA;Now the base solution isn't free, but you can do a &quot;students and startups&quot; hosted solution which is good for 2 users.&#xD;&#xA;&#xD;&#xA;They have a separate product, &lt;a href=&quot;http://www.fogcreek.com/kiln/&quot;&gt;Kiln&lt;/a&gt;, which is basically Mercurial but tied in Fogbugz (optionally) and has a pretty slick code review pipeline.  I talked to one of the guys that worked on it and they said it had pretty decent tools for dealing with the &quot;big file&quot; problem with DVCS solutions (namely that every client has every version of every file, and that not scaling for, say, giant zbrush files), like filtering &quot;big files&quot; by extension, and that sort of thing.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15893" PostHistoryTypeId="2" PostId="7838" RevisionGUID="00341ee7-6d78-42cd-958a-95c64d675f42" CreationDate="2011-01-29T05:50:35.700" UserId="51" Text="They both have their pluses and minuses, and I don't think that the little detail you've specified can really narrow down between the two which is better.  It would probably be better to pick one based on desired workflow, tools support, cost, and experience of the team, I would think." />
  <row Id="15894" PostHistoryTypeId="2" PostId="7839" RevisionGUID="9b5c80bd-ce9f-4f77-857b-5008080f4f41" CreationDate="2011-01-29T06:37:14.077" UserId="5001" Text="We figured this out. The information is available online but it's really well hidden, so I'll post it here for good measure.&#xD;&#xA;&#xD;&#xA;Basically if the phone is tethered to a computer and the Zune software is running, it locks the media on the phone, which means that MediaPlayers in apps will *never* have permission to play a Song.&#xD;&#xA;&#xD;&#xA;In order to get it to work, the user must un-tether the phone (i.e. unplug the USB cord), or use the Windows Phone Connect tool which has been designed with this in mind with regards to debugging: http://msdn.microsoft.com/en-us/library/gg180729%28v=VS.92%29.aspx - I haven't tried the tool, but untethering worked like a charm.&#xD;&#xA;&#xD;&#xA;Also, when the app doesn't have permission to play a song, it will crash unless the exception is handled, so make sure to use try/catch blocks. The caught exception can simply be ignored." />
  <row Id="15895" PostHistoryTypeId="25" PostId="7829" RevisionGUID="250977e1-aaa2-4d99-a552-f90ae194511c" CreationDate="2011-01-29T08:15:54.940" Comment="http://twitter.com/#!/StackGameDev/status/31264258821980160" />
  <row Id="15896" PostHistoryTypeId="2" PostId="7840" RevisionGUID="59f22f1c-0a74-47f7-9b3a-5d27474b3a6c" CreationDate="2011-01-29T09:21:45.900" UserId="20" Text="You can simulate a lot of different movement types using easing-equations. Your engine would definitely benefit from having them built in.&#xD;&#xA;&#xD;&#xA;See this question and it's answers for more resources: http://gamedev.stackexchange.com/questions/6978/easing-functions&#xD;&#xA;&#xD;&#xA;The &quot;[Interpolation Tricks Tutorial][1]&quot; by Jari Komppa is a good starting point IMHO&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://iki.fi/sol/interpolation/" />
  <row Id="15897" PostHistoryTypeId="2" PostId="7841" RevisionGUID="428e04e0-2242-4426-b39f-766e656a0ba1" CreationDate="2011-01-29T10:11:30.093" UserId="1156" Text="I've heard good things about [LuaPlus][1]. It wraps the low level C API into a higher level C++ one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://luaplus.org/" />
  <row Id="15898" PostHistoryTypeId="2" PostId="7842" RevisionGUID="6a6ea0fd-0c1e-45c0-b570-141542b62d01" CreationDate="2011-01-29T10:23:36.720" UserId="5014" Text="For 2d game, cocos2d is surely preferable. Unity makes it easy for 3d apps, and the features that make it great for 3d will not be used in your project at all. Also considering unity is cross-platform, while cocos is single platform, that keeps you out of unnecessary overhead that is present in the engine. &#xD;&#xA;Cocos2d is also very polished and easy to use - features that will come very handy in large projects." />
  <row Id="15899" PostHistoryTypeId="2" PostId="7843" RevisionGUID="17bdf1b8-a4d1-444c-b0c8-44eb0ee504cd" CreationDate="2011-01-29T10:30:14.077" UserId="786" Text="More than on language and visuals, it depends on the very nature of your game. Does it encourage aggressive gameplay (think any FPS)? Then you'll attract more males than females. Does it appeal to the caring personality, such as gardening and management games (think Sims)? Then you'll attract more females.&#xD;&#xA;&#xD;&#xA;Males tend to be more competitive, females tend to be more collaborative. If you include both gameplay aspects, you'll see more balanced ratio between men and women. An example is World of Warcraft, which is highly competitive environment (think DPS, PvP), however it also has much of leeway for collaboration (think tank, healer, guilds).&#xD;&#xA;&#xD;&#xA;You can also consider adding player-owned housing, gardens etc. that feature growth in return for care (find items). Vanity items also are a good way to appeal to the &quot;other&quot; side, such as non-combat pets, collectibles etc." />
  <row Id="15900" PostHistoryTypeId="2" PostId="7844" RevisionGUID="76795983-c984-4f61-9a3e-8f09ff30d5a8" CreationDate="2011-01-29T10:48:32.657" UserId="786" Text="I'd recommend [Scirra Construct][1] for beginners and quick prototyping. &#xD;&#xA;&#xD;&#xA;The game engine itself is abstracted, so you can focus on your game entirely. Plugins enable additional functionality, the &quot;code&quot; is made of draggable event, condition and action blocks etc.&#xD;&#xA;&#xD;&#xA;Construct is under active development and has an active community as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scirra.com" />
  <row Id="15901" PostHistoryTypeId="2" PostId="7845" RevisionGUID="ade9e121-5202-4993-8906-128ed2c3d2bc" CreationDate="2011-01-29T10:56:01.733" UserId="4264" Text="If the primary quality of your scripting language is easy binding, try &lt;a href=&quot;http://www.angelcode.com/angelscript/&quot;&gt;AngelScript&lt;/a&gt;. It can call registered functions directly without the need to write proxy functions, and it supports calling conventions of wide variety of compilers. The language itself is similar to c/c++, which may be a good or a bad thing, depending." />
  <row Id="15902" PostHistoryTypeId="25" PostId="7833" RevisionGUID="cc99a052-c05b-49c3-a0ea-6ff9f1db598a" CreationDate="2011-01-29T11:15:55.003" Comment="http://twitter.com/#!/StackGameDev/status/31309557808496640" />
  <row Id="15903" PostHistoryTypeId="2" PostId="7846" RevisionGUID="12f01fa4-6bf7-4d97-abd1-b8a5efb11c0c" CreationDate="2011-01-29T11:37:04.300" UserId="2242" Text="There's one practical difference i can think off regarding path planning. Traversing from the center of an hex cell to on of its neighbors is always the same distance whereas, if you a allow diagonal travel, this is not true for squares." />
  <row Id="15904" PostHistoryTypeId="2" PostId="7847" RevisionGUID="f8138dcf-57bd-4267-9c0d-b93c25dd0e95" CreationDate="2011-01-29T11:37:13.253" UserId="171" Text="I am simply trying to make an object move in a circle around a point. Let's say I have an object with a position vector going from that point to the object, and also the angle of the object with the x axis. &#xD;&#xA;&#xD;&#xA;What is the equation I can use to obtain a velocity vector for that object so that it continues to move in a circle? What other information do I need? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="15905" PostHistoryTypeId="1" PostId="7847" RevisionGUID="f8138dcf-57bd-4267-9c0d-b93c25dd0e95" CreationDate="2011-01-29T11:37:13.253" UserId="171" Text="How can I get a velocity vector for an object moving in a circle? " />
  <row Id="15906" PostHistoryTypeId="3" PostId="7847" RevisionGUID="f8138dcf-57bd-4267-9c0d-b93c25dd0e95" CreationDate="2011-01-29T11:37:13.253" UserId="171" Text="&lt;math&gt;&lt;algorithm&gt;" />
  <row Id="15907" PostHistoryTypeId="2" PostId="7848" RevisionGUID="fcc073c1-a149-4b6d-9056-54a91a3ae48f" CreationDate="2011-01-29T12:17:48.070" UserId="4082" Text="The velocity vector should be tangent to the circle, that is, perpendicular to the vector from the center to the current position. IIRC, the vector perpendicular to (u, v) is (-v, u).&#xD;&#xA;&#xD;&#xA;Note that the perpendicular vector changes constantly as the object moves, so you need a new velocity vector after each update." />
  <row Id="15908" PostHistoryTypeId="2" PostId="7849" RevisionGUID="faf63fb6-e06a-4298-8aeb-9e97b82ae511" CreationDate="2011-01-29T12:21:20.220" UserId="4082" Text="&gt; Can I make a significant difference by&#xD;&#xA;&gt; changing the types of games that are&#xD;&#xA;&gt; available?&#xD;&#xA;&#xD;&#xA;Absolutely. Type and setting/story. I'm pretty sure most players of [Murder, She Wrote][1] are female. I know for a fact that my 60+ year old mother-in-law, who was quite anti-gaming before, played it through at least twice :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.legacygames.com/download_games/1475/murder%252c_she_wrote/" />
  <row Id="15909" PostHistoryTypeId="2" PostId="7850" RevisionGUID="b7c34884-9d7b-4daa-bb0f-31e0b8514109" CreationDate="2011-01-29T13:04:40.183" UserId="5017" Text="I'm a female gamer. I can't really tell you what you could do to attract me to a game, but I guess you're free to ask me any questions about my gaming habits.&#xD;&#xA;&#xD;&#xA;I can tell you why I like particular games or maybe you can kind of gather from the games I play, what attracts me to them.&#xD;&#xA;&#xD;&#xA;When it comes to computer games I play, or have played:&#xD;&#xA;Guild Wars (a loong time ago)&#xD;&#xA;World of Warcraft (Mipey's right about the vanity pets.)&#xD;&#xA;Left 4 Dead&#xD;&#xA;Command &amp; Conquer (the original one, again long time ago.)&#xD;&#xA;Plants vs Zombies&#xD;&#xA;The Sims&#xD;&#xA;Sim City&#xD;&#xA;Diablo 2&#xD;&#xA;Portal&#xD;&#xA;TF2&#xD;&#xA;Fortress Forever&#xD;&#xA;&#xD;&#xA;One huge appeal to a lot of games is having a nice balance of male/female playable characters. In a LOT of games, seriously a TON if there is a female character, there's only one. So I mean, guys can pick from a few avatars to have someone represent them and female players get one character to choose from. That's one thing I liked about WoW, even number of male/female characters." />
  <row Id="15910" PostHistoryTypeId="2" PostId="7851" RevisionGUID="350712aa-e231-4f7a-9a57-9c2e54ec00ba" CreationDate="2011-01-29T13:48:07.713" UserId="1923" Text="I would use a vector that I call angularVelocity where the direction the vector is pointing represents the axis of rotation (orbital axis, in your case) and the magnitude represents the angular change per second. I can feed that vector to a matrix that is set up to perform an axis, angle rotation. All that is left is to offset this mechanism by the point that you want to orbit around.&#xD;&#xA;In pseudo code, it would look like this to orbit the moon around the earth assuming the sun was the gameworld origin:&#xD;&#xA;&#xD;&#xA;    angularVelocity = /*arbitrary*/ new Vector(0, 1, 0) * 3.14; //orbits 2 rev/sec&#xD;&#xA;    &#xD;&#xA;    Matrix rotation = CreateARotationMatrix(angularVelocity);&#xD;&#xA;    &#xD;&#xA;    moonPosition = ((moonPosition - earthPosition) * rotation) + earthPosition; //assuming your code library has a way to transform a vector by a matrix there.&#xD;&#xA;    &#xD;&#xA;    public Matrix CreateARotationMatrix(Vector av)&#xD;&#xA;    {&#xD;&#xA;       float angle = av.Length();&#xD;&#xA;       Vector axis = av.Normalize;&#xD;&#xA;       axisAngle4d.X = av.X;&#xD;&#xA;       axisAngle4d.Y = av.Y;&#xD;&#xA;       axisAngle4d.Z = av.Z;&#xD;&#xA;       axisAngle4d.W = angle * elapsedTimeSinceLastFrame;&#xD;&#xA;    &#xD;&#xA;       //plug above into code found here to finish matrix: [http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm][1]&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The speed that the object orbits (the mood in our case here) can be related directly to whatever linear velocity you want by factoring in the orbital radius.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm" />
  <row Id="15911" PostHistoryTypeId="5" PostId="7851" RevisionGUID="991365f9-0e91-4f2f-b4a3-3b2fe7354314" CreationDate="2011-01-29T13:53:54.430" UserId="1923" Comment="added 110 characters in body" Text="I would use a vector that I call angularVelocity where the direction the vector is pointing represents the axis of rotation (orbital axis, in your case) and the magnitude represents the angular change per second. I can feed that vector to a matrix that is set up to perform an axis, angle rotation. All that is left is to offset this mechanism by the point that you want to orbit around.&#xD;&#xA;In pseudo code, it would look like this to orbit the moon around the earth assuming the sun was the gameworld origin:&#xD;&#xA;&#xD;&#xA;    angularVelocity = /*arbitrary*/ new Vector(0, 1, 0) * 3.14; //orbits 2 rev/sec&#xD;&#xA;    &#xD;&#xA;    Matrix rotation = CreateARotationMatrix(angularVelocity);&#xD;&#xA;    &#xD;&#xA;    moonPosition = ((moonPosition - earthPosition) * rotation) + earthPosition; //assuming your code library has a way to transform a vector by a matrix there.&#xD;&#xA;    &#xD;&#xA;    public Matrix CreateARotationMatrix(Vector av)&#xD;&#xA;    {&#xD;&#xA;       float angle = av.Length();&#xD;&#xA;       Vector axis = av.Normalize;&#xD;&#xA;       axisAngle4d.X = av.X;&#xD;&#xA;       axisAngle4d.Y = av.Y;&#xD;&#xA;       axisAngle4d.Z = av.Z;&#xD;&#xA;       axisAngle4d.W = angle * elapsedTimeSinceLastFrame;&#xD;&#xA;    &#xD;&#xA;       //plug above into code found here to finish matrix: [http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm][1]&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The speed that the object orbits (the mood in our case here) can be related directly to whatever linear velocity you want by factoring in the orbital radius.&#xD;&#xA;&#xD;&#xA;Note: You only have to build that matrix once, not every frame, unless the axis or the angular rate changes.&#xD;&#xA;  [1]: http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToMatrix/index.htm" />
  <row Id="15912" PostHistoryTypeId="25" PostId="7847" RevisionGUID="2514a40d-9feb-4648-b3b6-db7e82a44b9c" CreationDate="2011-01-29T14:15:54.630" Comment="http://twitter.com/#!/StackGameDev/status/31354854651731969" />
  <row Id="15913" PostHistoryTypeId="2" PostId="7852" RevisionGUID="5cb9903d-5817-41e2-aa6f-8f99b9fcd44d" CreationDate="2011-01-29T16:03:42.903" UserId="1101" Text="There is no single vector in Cartesian coordinates that will keep an object moving in a circle, as a single vector can only represent a straight line in the given system. However, you can express this motion in [polar coordinates][1], where a straight line can actually represent circular motion in the equivalent Cartesian coordinate system.&#xD;&#xA;&#xD;&#xA;For example, the polar vector (r=0,θ=5) rotates you 5 units around the origin (where a unit is typically a degree or a radian).&#xD;&#xA;&#xD;&#xA;The rotation is done around the origin of the coordinate system, so you need to factor that in when converting between the 2 coordinate systems, typically as a translation done in Cartesian space I would expect.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Polar_coordinate_system" />
  <row Id="15921" PostHistoryTypeId="2" PostId="7854" RevisionGUID="a18cd3f7-82f8-4e38-87cb-828ea750b194" CreationDate="2011-01-29T17:16:31.917" UserId="178" Text="Bitbucket uses Mercurial as its dvcs and has features similar to Github, but it also has a great free plan where you can store unlimited private projects with up to 5 collaborators.&#xD;&#xA;&#xD;&#xA;[http://bitbucket.org][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bitbucket.org" />
  <row Id="15922" PostHistoryTypeId="2" PostId="7855" RevisionGUID="a94b8e18-1e6f-4d08-aba6-de8b484c1876" CreationDate="2011-01-29T17:52:08.077" UserId="2999" Text="I'm currently working on a game that creates a window using WindowsAPI.  However, at the moment the process is taking up 50% of my CPU.  All I am doing is creating the window and looping using the code found below:&#xD;&#xA;&#xD;&#xA;    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)&#xD;&#xA;    {&#xD;&#xA;        MSG message = {0};&#xD;&#xA;        WNDCLASSEX wcl = {0};&#xD;&#xA;    &#xD;&#xA;        wcl.cbSize = sizeof(wcl);&#xD;&#xA;        wcl.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;&#xD;&#xA;        wcl.lpfnWndProc = WindowProc;&#xD;&#xA;        wcl.cbClsExtra = 0;&#xD;&#xA;        wcl.cbWndExtra = 0;&#xD;&#xA;        wcl.hInstance = hInstance = hInstance;&#xD;&#xA;        wcl.hIcon = LoadIcon(0, IDI_APPLICATION);&#xD;&#xA;        wcl.hCursor = LoadCursor(0, IDC_ARROW);&#xD;&#xA;        wcl.hbrBackground = 0;&#xD;&#xA;        wcl.lpszMenuName = 0;&#xD;&#xA;        wcl.lpszClassName = &quot;GL2WindowClass&quot;;&#xD;&#xA;        wcl.hIconSm = 0;&#xD;&#xA;    &#xD;&#xA;        if (!RegisterClassEx(&amp;wcl))&#xD;&#xA;            return 0;&#xD;&#xA;    &#xD;&#xA;        hWnd = CreateAppWindow(wcl, &quot;Application&quot;);&#xD;&#xA;    &#xD;&#xA;        if (hWnd)&#xD;&#xA;        {&#xD;&#xA;            if (Init())&#xD;&#xA;            {&#xD;&#xA;                ShowWindow(hWnd, nShowCmd);&#xD;&#xA;                UpdateWindow(hWnd);			&#xD;&#xA;    &#xD;&#xA;                while (true)&#xD;&#xA;                {&#xD;&#xA;                    while (PeekMessage(&amp;message, 0, 0, 0, PM_REMOVE))&#xD;&#xA;                    {&#xD;&#xA;                        if (message.message == WM_QUIT)&#xD;&#xA;                            break;&#xD;&#xA;    &#xD;&#xA;                        TranslateMessage(&amp;message);&#xD;&#xA;                        DispatchMessage(&amp;message);&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    if (message.message == WM_QUIT)&#xD;&#xA;                        break;&#xD;&#xA;    &#xD;&#xA;                    if (hasFocus)&#xD;&#xA;                    {&#xD;&#xA;    &#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        WaitMessage();&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;            Cleanup();&#xD;&#xA;            UnregisterClass(wcl.lpszClassName, hInstance);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return static_cast&lt;int&gt;(message.wParam);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So even when I am not drawing anything when the window has focus it still takes up 50%.  I don't understand how this is taking up so much system resources.&#xD;&#xA;&#xD;&#xA;Am I doing something wrong?&#xD;&#xA;&#xD;&#xA;Any help would be much appreciated, thank you!" />
  <row Id="15923" PostHistoryTypeId="1" PostId="7855" RevisionGUID="a94b8e18-1e6f-4d08-aba6-de8b484c1876" CreationDate="2011-01-29T17:52:08.077" UserId="2999" Text="WinAPI window taking 50% of CPU when idle" />
  <row Id="15924" PostHistoryTypeId="3" PostId="7855" RevisionGUID="a94b8e18-1e6f-4d08-aba6-de8b484c1876" CreationDate="2011-01-29T17:52:08.077" UserId="2999" Text="&lt;opengl&gt;&lt;windows&gt;&lt;gameloop&gt;" />
  <row Id="15925" PostHistoryTypeId="2" PostId="7856" RevisionGUID="6aabfd2d-49eb-4707-9f77-34bac7dd4772" CreationDate="2011-01-29T18:00:05.247" UserId="4264" Text="If you don't respond to paint messages, windows will keep spamming your window with paint messages, which probably takes a bit of cpu time. This is my guess. I'm not entirely certain, though." />
  <row Id="15926" PostHistoryTypeId="2" PostId="7857" RevisionGUID="29e010cb-e94f-4432-94a7-c92df673d859" CreationDate="2011-01-29T18:00:38.570" UserId="1430" Text="[You have two cores or two processors, right][1]?&#xD;&#xA;&#xD;&#xA;When focused, your program executes the loop continuously. It uses all of the available CPU resources given to it by the OS because you have said &quot;I must use all of the available CPU resources given to me by the OS&quot; -- you don't have any statements -- such as a call to Sleep() or using GetMessage() instead of PeekMessage() -- that will block your thread and tell the OS you wouldn't mind being switched out now.&#xD;&#xA;&#xD;&#xA;Note that I'm not suggesting Sleep() or GetMessage() are proper solutions, per se, only that using them would cause your apparent CPU usage to drop. It isn't necessarily a problem that your program asks for as big/frequent of a timeslice as you can get from the OS. Games typically do this, for example. As long as you play nice when you're not the foreground app by reducing processing or drawing, et cetera, which it looks like you are doing, you should be fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/oldnewthing/archive/2005/12/02/499389.aspx" />
  <row Id="15927" PostHistoryTypeId="5" PostId="7855" RevisionGUID="cb10a2cd-a6b3-4dfb-a903-08c9b473dd44" CreationDate="2011-01-29T18:15:09.323" UserId="2999" Comment="added 854 characters in body" Text="I'm currently working on a game that creates a window using WindowsAPI.  However, at the moment the process is taking up 50% of my CPU.  All I am doing is creating the window and looping using the code found below:&#xD;&#xA;&#xD;&#xA;    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)&#xD;&#xA;    {&#xD;&#xA;        MSG message = {0};&#xD;&#xA;        WNDCLASSEX wcl = {0};&#xD;&#xA;    &#xD;&#xA;        wcl.cbSize = sizeof(wcl);&#xD;&#xA;        wcl.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;&#xD;&#xA;        wcl.lpfnWndProc = WindowProc;&#xD;&#xA;        wcl.cbClsExtra = 0;&#xD;&#xA;        wcl.cbWndExtra = 0;&#xD;&#xA;        wcl.hInstance = hInstance = hInstance;&#xD;&#xA;        wcl.hIcon = LoadIcon(0, IDI_APPLICATION);&#xD;&#xA;        wcl.hCursor = LoadCursor(0, IDC_ARROW);&#xD;&#xA;        wcl.hbrBackground = 0;&#xD;&#xA;        wcl.lpszMenuName = 0;&#xD;&#xA;        wcl.lpszClassName = &quot;GL2WindowClass&quot;;&#xD;&#xA;        wcl.hIconSm = 0;&#xD;&#xA;    &#xD;&#xA;        if (!RegisterClassEx(&amp;wcl))&#xD;&#xA;            return 0;&#xD;&#xA;    &#xD;&#xA;        hWnd = CreateAppWindow(wcl, &quot;Application&quot;);&#xD;&#xA;    &#xD;&#xA;        if (hWnd)&#xD;&#xA;        {&#xD;&#xA;            if (Init())&#xD;&#xA;            {&#xD;&#xA;                ShowWindow(hWnd, nShowCmd);&#xD;&#xA;                UpdateWindow(hWnd);			&#xD;&#xA;    &#xD;&#xA;                while (true)&#xD;&#xA;                {&#xD;&#xA;                    while (PeekMessage(&amp;message, 0, 0, 0, PM_REMOVE))&#xD;&#xA;                    {&#xD;&#xA;                        if (message.message == WM_QUIT)&#xD;&#xA;                            break;&#xD;&#xA;    &#xD;&#xA;                        TranslateMessage(&amp;message);&#xD;&#xA;                        DispatchMessage(&amp;message);&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    if (message.message == WM_QUIT)&#xD;&#xA;                        break;&#xD;&#xA;    &#xD;&#xA;                   if (hasFocus)&#xD;&#xA;                {&#xD;&#xA;					elapsedTime = GetElapsedTimeInSeconds();&#xD;&#xA;					lastEarth += elapsedTime;&#xD;&#xA;					lastUpdate += elapsedTime;&#xD;&#xA;					lastFrame += elapsedTime;&#xD;&#xA;					lastParticle += elapsedTime;&#xD;&#xA;&#xD;&#xA;					if(lastUpdate &gt;= (1.0f / 100.0f))&#xD;&#xA;					{&#xD;&#xA;						Update(lastUpdate);		   &#xD;&#xA;						lastUpdate = 0;&#xD;&#xA;					}&#xD;&#xA;					if(lastFrame &gt;= (1.0f / 60.0f))&#xD;&#xA;					{&#xD;&#xA;						UpdateFrameRate(lastFrame);&#xD;&#xA;						lastFrame = 0;&#xD;&#xA;						Render();&#xD;&#xA;						SwapBuffers(hDC);&#xD;&#xA;					}&#xD;&#xA;					if(lastEarth &gt;= (1.0f / 10.0f))&#xD;&#xA;					{&#xD;&#xA;						UpdateEarthAnimation();&#xD;&#xA;						lastEarth = 0;&#xD;&#xA;					}&#xD;&#xA;					if(lastParticle &gt;= (1.0f / 30.0f))&#xD;&#xA;					{&#xD;&#xA;						particleManager-&gt;rightBooster-&gt;Update();&#xD;&#xA;						particleManager-&gt;rightBoosterSmoke-&gt;Update();&#xD;&#xA;						particleManager-&gt;leftBooster-&gt;Update();&#xD;&#xA;						particleManager-&gt;leftBoosterSmoke-&gt;Update();&#xD;&#xA;						&#xD;&#xA;						particleManager-&gt;breakUp-&gt;Update();&#xD;&#xA;						lastParticle = 0;&#xD;&#xA;					}&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    WaitMessage();&#xD;&#xA;                }&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;            Cleanup();&#xD;&#xA;            UnregisterClass(wcl.lpszClassName, hInstance);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return static_cast&lt;int&gt;(message.wParam);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So even when I am not drawing anything when the window has focus it still takes up 50%.  I don't understand how this is taking up so much system resources.&#xD;&#xA;&#xD;&#xA;Am I doing something wrong?&#xD;&#xA;&#xD;&#xA;Any help would be much appreciated, thank you!" />
  <row Id="15928" PostHistoryTypeId="2" PostId="7858" RevisionGUID="df181a24-9c16-4926-94c7-2c0e2dda426b" CreationDate="2011-01-29T19:20:54.773" UserId="659" Text="There's a large number of versions of the D3DX dll, from each SDK update, each version having a unique name (http://www.toymaker.info/Games/html/d3dx_dlls.html).&#xD;&#xA;&#xD;&#xA;All-too-often, people have versions missing. So even though they have a compatible version of DirectX, your D3D-based project won't run on their machine.&#xD;&#xA;&#xD;&#xA;I want to be able to distribute games (little spare-time projects, game jam entries, etc) as a simple zip file, without the need for an installer. But a significant percentage of users run into missing D3DX .dll errors. And without an installer, Microsoft's official solution (the DirectX web installer/updater) isn't really much of a solution.&#xD;&#xA;&#xD;&#xA;Unfortunately, Microsoft still won't give us the option of static linking to D3DX (which would be a nice clean solution). And avoiding using D3DX isn't very practical, especially if you're working with shaders (and no, I'm not switching to OpenGL, at least for now)&#xD;&#xA;&#xD;&#xA;Does anyone have clever solutions to avoiding this DLL hell?" />
  <row Id="15929" PostHistoryTypeId="1" PostId="7858" RevisionGUID="df181a24-9c16-4926-94c7-2c0e2dda426b" CreationDate="2011-01-29T19:20:54.773" UserId="659" Text="How to deal with D3DX .dll hell?" />
  <row Id="15930" PostHistoryTypeId="3" PostId="7858" RevisionGUID="df181a24-9c16-4926-94c7-2c0e2dda426b" CreationDate="2011-01-29T19:20:54.773" UserId="659" Text="&lt;directx&gt;&lt;installer&gt;" />
  <row Id="15931" PostHistoryTypeId="2" PostId="7859" RevisionGUID="9e5e201e-2b0f-4893-9aad-4471c411727d" CreationDate="2011-01-29T19:33:25.430" UserId="5021" Text="I can't find any useful information on packing 4 values into a 32 bit float in HLSL.&#xD;&#xA;&#xD;&#xA;Ideally, what I want to be able to do in HLSL is:&#xD;&#xA;&#xD;&#xA;    float4 values = ... // Some values where each component is between 0 and 1.&#xD;&#xA;    float packedValues = pack32R(values);&#xD;&#xA;    float4 values2 = unpack32R(packedValues);&#xD;&#xA;&#xD;&#xA;I realize that there will be precision limitations, and performance tradeoffs between different precisions in different methods. I'm just wondering what ideas are out there." />
  <row Id="15932" PostHistoryTypeId="1" PostId="7859" RevisionGUID="9e5e201e-2b0f-4893-9aad-4471c411727d" CreationDate="2011-01-29T19:33:25.430" UserId="5021" Text="HLSL: Pack 4 values into 32 bit float." />
  <row Id="15933" PostHistoryTypeId="3" PostId="7859" RevisionGUID="9e5e201e-2b0f-4893-9aad-4471c411727d" CreationDate="2011-01-29T19:33:25.430" UserId="5021" Text="&lt;hlsl&gt;" />
  <row Id="15934" PostHistoryTypeId="2" PostId="7860" RevisionGUID="5d5e0dc7-a7c1-45e6-a697-e262b870de51" CreationDate="2011-01-29T19:51:15.047" UserId="5022" Text="I spend a lot of time playing games and **personally** i don't find myself off-put by male orientated games that use huge breasted victimized ladies and what not, infact i have no problems with most of the issues Gregory Weir raised. Although there are point's i do concur with such as community attitude and no pink/games4girls, all good points.&#xD;&#xA;&#xD;&#xA;I think as a whole woman are looking for different features, Customisation is a huge favourite for example. It's a stereotype 'cause it's true. I like to make my any character or gameplay personal to me, that's a huge factor in keeping me interested and coming back for more. Of course it doesn't need to mean i want more pretty coloured wizard hats, i just want to be involved with the role i'm playing in a game, i want to be able to define myself so that i feel that my presence there is worth something. &#xD;&#xA;&#xD;&#xA;Another thing is that i like to feel emotionally (or mentally if you like ) involved. This is mostly through scripts, if there's an npc or an instructional character for example i wan't thought to have gone into his script so he doesn't just feel like another game mechanic. Or if a game has a &quot;world&quot; i want to feel that i have some place in it. Alternatively this aspect can be covered in a good community forum or some such.&#xD;&#xA;&#xD;&#xA;It's true i might just be encouraging distinction between men and woman here when the industry is trying to find the happy medium, but i think i'm just being realistic. You can't ignore the fact that what ladies look for is very different, it a tough balance to strike, we don't want to be playing a whole different game from the blokes, we want to be able to play the same game our own way. And we wan't more substance to the game because hack and slash (/other generic gameplay) just can't satisfy us alone like it can with a lot of young men." />
  <row Id="15935" PostHistoryTypeId="2" PostId="7861" RevisionGUID="3903b364-d4e9-4bf6-adcf-ee7570a2bde1" CreationDate="2011-01-29T19:57:36.757" UserId="5023" Text="Sorry this got long and all prose-y. I'm creating my first truly gamified web app and could use some help thinking about how to structure the data. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### The Set-up&#xD;&#xA;Users need to accomplish tasks in each of several categories before they can move up a level. I've got my `Users`, `Tasks`, and `Categories` tables, and a `UserTasks` table which joins the three. (&quot;User 3 has added Task 42 in Category 8. Now they've completed it.&quot;) That's all fine and working wonderfully. &#xD;&#xA;&#xD;&#xA;### The Challenge&#xD;&#xA;I'm not sure of the best way to track the progress in the individual categories toward each level. The &quot;business&quot; rules are:&#xD;&#xA;&#xD;&#xA; 1. You have to achieve a certain number of points in each category to move up.&#xD;&#xA; 2. If you get the number of points needed in Cat 8, but still have other work to do to complete the level, any new Cat 8 points count toward your overall score, but don't &quot;roll over&quot; into the next level.&#xD;&#xA; 3. The number of Categories is small (five currently) and unlikely to change often, but by no means absolutely fixed.&#xD;&#xA; 4. The number of points needed to level-up will vary per level, probably by a formula, or perhaps a lookup table.&#xD;&#xA;&#xD;&#xA;So the challenge is to track each user's progress toward the next level in each category. I've thought of a few potential approaches:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Possible Solutions&#xD;&#xA; 1. Add a column to the users table for each category and reset them all to zero each time a user levels-up. &#xD;&#xA; 2. Have a separate `UserProgress` table with a row for each category for each user and the number of points they have. (Basically a Many-to-Many version of #1.)&#xD;&#xA; 3. Add a `userLevel` column to the `UserTasks` table and use that to derive their progress with some kind of SUM statement.&#xD;&#xA;&#xD;&#xA;Their current level will be a simple int in the User table.&#xD;&#xA;&#xD;&#xA;### Pros &amp; Cons&#xD;&#xA;&#xD;&#xA;(1) seems like by far the most straightforward, but it's also the least flexible. Perhaps I could use a naming convention based on the category ids to help overcome some of that. (With code like &quot;`select cats; for each cat, get the value from Users.progress_{cat.id}`.&quot;) It's also the one where I lose the most data -- I won't know which points counted toward leveling up. I don't have a need in mind for that, so maybe I don't care about that.&#xD;&#xA;&#xD;&#xA;(2) seems complicated: every time I add or subtract a user or a category, I have to maintain the other table. I foresee synchronization challenges. &#xD;&#xA;&#xD;&#xA;(3) Is somewhere in between -- cleaner than #2, but less intuitive than #1. In order to find out where a user is, I'd have mildly complex SQL like:&#xD;&#xA;&#xD;&#xA;    SELECT categoryId, SUM(points) from UserTasks WHERE userId={user.id} &amp; countsTowardLevel={user.level} groupBy categoryId&#xD;&#xA;&#xD;&#xA;Hmm... that doesn't seem so bad. I think I'm talking myself into #3 here, but would love any input, advice or other ideas.&#xD;&#xA;&#xD;&#xA;P.S. Sorry for the [cross-post][1]. I wrote this up on SO and then remembered that there was a game dev-focused one. Curious to see if I get different answers one place than the other....&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4839061/database-design-help-for-game-user-levels-progress" />
  <row Id="15936" PostHistoryTypeId="1" PostId="7861" RevisionGUID="3903b364-d4e9-4bf6-adcf-ee7570a2bde1" CreationDate="2011-01-29T19:57:36.757" UserId="5023" Text="database design help for game / user levels / progress" />
  <row Id="15937" PostHistoryTypeId="3" PostId="7861" RevisionGUID="3903b364-d4e9-4bf6-adcf-ee7570a2bde1" CreationDate="2011-01-29T19:57:36.757" UserId="5023" Text="&lt;data-structure&gt;" />
  <row Id="15938" PostHistoryTypeId="25" PostId="7858" RevisionGUID="3ad685ad-c4e6-4c64-8e4b-bfa3957c8d4e" CreationDate="2011-01-29T20:15:55.067" Comment="http://twitter.com/#!/StackGameDev/status/31445453228740608" />
  <row Id="15939" PostHistoryTypeId="2" PostId="7862" RevisionGUID="df117725-cedb-45ce-9f81-72dcb873bc2c" CreationDate="2011-01-29T20:32:33.573" UserDisplayName="user5025" Text="I am looking for algorithm to calculate direction and speed of balls in a pool game. I am sure there has to be some type of open source code for this since pool games are some of the oldest computer games I can remember. &#xD;&#xA;&#xD;&#xA;I mean, when one ball hits another, I need a algorithm to calculate direction of both of them. It will depend of exact angle of where they hit each other and on speed.&#xD;&#xA;&#xD;&#xA;I want to practice Java coding, so I am looking for java code or package that has this type of code." />
  <row Id="15940" PostHistoryTypeId="1" PostId="7862" RevisionGUID="df117725-cedb-45ce-9f81-72dcb873bc2c" CreationDate="2011-01-29T20:32:33.573" UserDisplayName="user5025" Text="Is there an algorithm for a pool game?" />
  <row Id="15941" PostHistoryTypeId="3" PostId="7862" RevisionGUID="df117725-cedb-45ce-9f81-72dcb873bc2c" CreationDate="2011-01-29T20:32:33.573" UserDisplayName="user5025" Text="&lt;java&gt;" />
  <row Id="15942" PostHistoryTypeId="2" PostId="7863" RevisionGUID="49b0ae60-441a-4568-9805-4961ca27e5dd" CreationDate="2011-01-29T20:36:44.253" UserId="668" Text="You can distribute those dx3dx9_xx.dll with your application." />
  <row Id="15943" PostHistoryTypeId="6" PostId="7862" RevisionGUID="92451535-0799-43c3-bc71-b204f125478c" CreationDate="2011-01-29T20:37:11.840" UserId="189" Comment="edited tags" Text="&lt;physics&gt;&lt;java&gt;" />
  <row Id="15944" PostHistoryTypeId="2" PostId="7864" RevisionGUID="a69062ba-103d-4dec-9843-e6a2033ae6dd" CreationDate="2011-01-29T20:38:42.490" UserId="111" Text="&lt;audio&gt; still has issues. Flash works but... requires flash (an issue for iOS). What do you use in Javascript for audio?" />
  <row Id="15945" PostHistoryTypeId="1" PostId="7864" RevisionGUID="a69062ba-103d-4dec-9843-e6a2033ae6dd" CreationDate="2011-01-29T20:38:42.490" UserId="111" Text="Javascript Audio solution" />
  <row Id="15946" PostHistoryTypeId="3" PostId="7864" RevisionGUID="a69062ba-103d-4dec-9843-e6a2033ae6dd" CreationDate="2011-01-29T20:38:42.490" UserId="111" Text="&lt;javascript&gt;&lt;html5&gt;&lt;audio&gt;&lt;browser-based-games&gt;" />
  <row Id="15947" PostHistoryTypeId="2" PostId="7865" RevisionGUID="e88d06dd-7096-422f-b302-6aa42b2e9cef" CreationDate="2011-01-29T20:40:22.630" UserId="111" Text="SoundManager 2 is BSD licensed. &#xD;&#xA;http://www.schillmania.com/projects/soundmanager2&#xD;&#xA;How well has it worked for you, (or did you go with something else)?" />
  <row Id="15948" PostHistoryTypeId="2" PostId="7866" RevisionGUID="155bd19d-7fcc-4ee1-b4be-76f449db6961" CreationDate="2011-01-29T21:22:50.597" UserId="1430" Text="Unfortunately, there isn't a good, legal solution for this except to make an installer, because your hands are tied by the distribution rights granted to you by the DirectX SDK, which provides the D3DX DLLs. Under the terms of the license agreement you are bound to by using the SDK (which is located in `(SDK Install Directory)/Documentation/License Agreements/` you are only permitted to redistribute the binary forms of certain subsets of the SDK, along with some of the sample and utility code. &#xD;&#xA;&#xD;&#xA;As of the June 2010 SDK, you allowed to redistribute anything in the &quot;Redist&quot; directory and when doing so you must include certain components (DSetup32.dll, DSetup.dll, DXSetup.exe, DXupdate.cab and dxdllreg_x86.cab). The Redist directory includes the .cab files for the D3DX DLLs, *but not the DLLs themselves* so you are out of luck. &#xD;&#xA;&#xD;&#xA;It isn't terribly hard to build an installer, fortunately, that just runs the appropriate D3DX web installer or whatnot that *is* something you redistribute. Simple .msi installers are just as easy for a user to use (double-clicking is generally all that's needed) and can be configured to allow installation into arbitrary directories, if you are concerned for some reason about &quot;polluting&quot; the Program Files directory with these small throw-away programs. The overhead in download size of an appropriately configured installer can be quite small, as well, so that shouldn't be too much of a problem." />
  <row Id="15949" PostHistoryTypeId="5" PostId="7866" RevisionGUID="09769ec1-edb8-444c-99f7-17dcdebc8c62" CreationDate="2011-01-29T22:08:47.357" UserId="1430" Comment="added a link to msdn" Text="Unfortunately, there isn't a good, legal solution for this except to make an installer, because your hands are tied by the distribution rights granted to you by the DirectX SDK, which provides the D3DX DLLs. Under the terms of the license agreement you are bound to by using the SDK (which is located in `(SDK Install Directory)/Documentation/License Agreements/` you are only permitted to redistribute the binary forms of certain subsets of the SDK, along with some of the sample and utility code. &#xD;&#xA;&#xD;&#xA;As of the June 2010 SDK, you allowed to redistribute anything in the &quot;Redist&quot; directory and when doing so you must include certain components (DSetup32.dll, DSetup.dll, DXSetup.exe, DXupdate.cab and dxdllreg_x86.cab). The Redist directory includes the .cab files for the D3DX DLLs, *but not the DLLs themselves* so you are out of luck. &#xD;&#xA;&#xD;&#xA;It isn't terribly hard to build an installer, fortunately, that just runs the appropriate D3DX web installer or whatnot that *is* something you redistribute. Simple .msi installers are just as easy for a user to use (double-clicking is generally all that's needed) and can be configured to allow installation into arbitrary directories, if you are concerned for some reason about &quot;polluting&quot; the Program Files directory with these small throw-away programs. The overhead in download size of an appropriately configured installer can be quite small, as well, so that shouldn't be too much of a problem.&#xD;&#xA;&#xD;&#xA;EDIT: [Here is a good page about DX installation stuff][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee416805%28VS.85%29.aspx" />
  <row Id="15950" PostHistoryTypeId="5" PostId="5201" RevisionGUID="ea793ca9-7892-4e65-a8dc-a936a80dfc43" CreationDate="2011-01-29T22:13:24.673" UserId="51" Comment="added 563 characters in body; edited body" Text="&lt;p&gt;Game Development - Stack Exchange is for &lt;span class=&quot;revision-comment&quot;&gt;professional and amateur video/computer game developers&lt;/span&gt;. If you have questions relating to...&lt;/p&gt;&#xA;&#xA; - Game design (architecture, gameplay, mechanics, etc)&#xA; - Game assets (creation, storage, editing, etc)&#xA; - Game programming (engine architecture, game-related APIs, networking, etc)&#xA; - Game development (testing, team management, tools, etc)&#xA; - Game release (hosting, publishing, etc)&#xA; - Game industry (careers, trends, technology, etc)&#xA;&#xA;Then you are likely in the right place.&#xA;&#xA;A note on programming-related questions:  general programming questions more likely belong on &lt;a href=&quot;http://stackoverflow&quot;&gt;StackOverflow&lt;/a&gt; instead of here.  A good rule of thumb is to ask yourself &quot;Would a professional game developer give me a better/different/more specific answer to this question than other programmers?&quot;.  If yes, then feel free to ask it here.  For more discussion on that topic, see &lt;a href=&quot;http://meta.gamedev.stackexchange.com/questions/3/programming-questions-here-or-belongs-on-stackoverflow&quot;&gt;this question&lt;/a&gt; on our meta site." />
  <row Id="15952" PostHistoryTypeId="2" PostId="7868" RevisionGUID="bc3b4641-a5c5-4fc2-9e46-a311da4820aa" CreationDate="2011-01-29T22:41:16.227" UserId="4662" Text="I've got an effect which is a fairly simple two-pass deal- but it involves rendering to a texture in the first pass. Is it possible to change the render target from within an effect?" />
  <row Id="15953" PostHistoryTypeId="1" PostId="7868" RevisionGUID="bc3b4641-a5c5-4fc2-9e46-a311da4820aa" CreationDate="2011-01-29T22:41:16.227" UserId="4662" Text="Changing render target within an effect" />
  <row Id="15954" PostHistoryTypeId="3" PostId="7868" RevisionGUID="bc3b4641-a5c5-4fc2-9e46-a311da4820aa" CreationDate="2011-01-29T22:41:16.227" UserId="4662" Text="&lt;c++&gt;&lt;directx9&gt;" />
  <row Id="15955" PostHistoryTypeId="5" PostId="7868" RevisionGUID="9af5dea2-57b8-4982-92f6-ae5a5d885347" CreationDate="2011-01-29T22:46:18.357" UserId="4662" Comment="added 118 characters in body" Text="I've got an effect which is a fairly simple two-pass deal- but it involves rendering to a texture in the first pass. Is it possible to change the render target from within an effect? I would definitely appreciate the reduction in code duplication from C++ by being able to do both passes within HLSL." />
  <row Id="15956" PostHistoryTypeId="5" PostId="7866" RevisionGUID="650e0c88-bde3-45b3-afa4-dfbd07eb0498" CreationDate="2011-01-29T23:14:57.003" UserId="1430" Comment="added 96 characters in body" Text="Unfortunately, there isn't a good, legal solution for this except to make an installer, because your hands are tied by the distribution rights granted to you by the DirectX SDK, which provides the D3DX DLLs. Under the terms of the license agreement you are bound to by using the SDK (which is located in `(SDK Install Directory)/Documentation/License Agreements/` you are only permitted to redistribute the binary forms of certain subsets of the SDK, along with some of the sample and utility code. &#xD;&#xA;&#xD;&#xA;As of the June 2010 SDK, you allowed to redistribute anything in the &quot;Redist&quot; directory and when doing so you must include certain components (DSetup32.dll, DSetup.dll, DXSetup.exe, DXupdate.cab and dxdllreg_x86.cab). The Redist directory includes the .cab files for the D3DX DLLs, *but not the DLLs themselves* so you are out of luck. &#xD;&#xA;&#xD;&#xA;It isn't terribly hard to build an installer, fortunately, that just runs the appropriate D3DX &lt;strike&gt;web&lt;/strike&gt; installer or whatnot that *is* something you redistribute. Simple .msi installers are just as easy for a user to use (double-clicking is generally all that's needed) and can be configured to allow installation into arbitrary directories, if you are concerned for some reason about &quot;polluting&quot; the Program Files directory with these small throw-away programs. The overhead in download size of an appropriately configured installer can be quite small, as well, so that shouldn't be too much of a problem.&#xD;&#xA;&#xD;&#xA;EDIT: [Here is a good page about DX installation stuff][1].&#xD;&#xA;&#xD;&#xA;EDIT 2: Struck out the &quot;web&quot; bit in response to a correction in the comments.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee416805%28VS.85%29.aspx" />
  <row Id="15957" PostHistoryTypeId="25" PostId="7868" RevisionGUID="44128450-55ec-4484-9f9b-660cdf997fd3" CreationDate="2011-01-29T23:15:54.570" Comment="http://twitter.com/#!/StackGameDev/status/31490749908385792" />
  <row Id="15958" PostHistoryTypeId="2" PostId="7869" RevisionGUID="e714e0a0-cbc9-4f73-ab3e-fd3300aa0c82" CreationDate="2011-01-30T00:30:11.563" UserId="4514" Text="Maybe a [procedural texture][1] can do this for you, but you'd have to handle the projection.&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/resources/example-projects/procedural-examples.html" />
  <row Id="15959" PostHistoryTypeId="2" PostId="7870" RevisionGUID="4dbf76f0-36e7-4b86-8017-7cc78884f159" CreationDate="2011-01-30T00:58:40.910" UserId="1398" Text="I'd like to improve my skills/try something new and I'd like to start with 3D. I have read [Starting programming in 3D with C++][1] but I have question about engines:&#xD;&#xA;&#xD;&#xA; - What should engine do? I know it is abstraction layer above 3D API (i.e. OpenGL or DirectX) but what should it exactly do?&#xD;&#xA; - Are there any recommendation regarding &quot;book or two&quot; about engines (as answered in linked question)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5465/starting-programming-in-3d-with-c" />
  <row Id="15960" PostHistoryTypeId="1" PostId="7870" RevisionGUID="4dbf76f0-36e7-4b86-8017-7cc78884f159" CreationDate="2011-01-30T00:58:40.910" UserId="1398" Text="Starting with gaming programming - engines" />
  <row Id="15961" PostHistoryTypeId="3" PostId="7870" RevisionGUID="4dbf76f0-36e7-4b86-8017-7cc78884f159" CreationDate="2011-01-30T00:58:40.910" UserId="1398" Text="&lt;engine&gt;&lt;programming&gt;" />
  <row Id="15962" PostHistoryTypeId="2" PostId="7871" RevisionGUID="e4f40165-a966-4bc5-ad78-53c6d5a11252" CreationDate="2011-01-30T01:22:43.387" UserDisplayName="user5027" Text="Wow what a question. It really depends so much on the type of game. If you're talking about a very simple iPhone game then artists and audio bods will be twiddling their thumbs before programming in complete. But if you're talking about a big 3D game then art content is by far the biggest part. For a AAA console game there may be a large team of developers in-house, but the art team will be at least twice that number and these days will probably include a huge amount of outsourced content.&#xD;&#xA;&#xD;&#xA;If you need a lot of art content try an outsource company like &lt;http://creativesintheattic.com&gt; there are many others but I've used them and it's been worth it. Unlike some outsource companies they were willing to work on a fairly small number of assets (my budget was low) but they also provide for AAA games so the quality is top notch." />
  <row Id="15963" PostHistoryTypeId="4" PostId="7870" RevisionGUID="e654ad6e-8091-4846-9b73-a57a100294d0" CreationDate="2011-01-30T01:25:14.867" UserId="2332" Comment="Changed question to be a lot more specific" Text="What should a game engine do and are there any recommended books on the topic?" />
  <row Id="15964" PostHistoryTypeId="24" PostId="7870" RevisionGUID="45e4c329-d27d-4f26-937b-7f4cfd4f2ac3" CreationDate="2011-01-30T01:25:14.867" Comment="Proposed by 2332 approved by 189 edit id of 1" />
  <row Id="15965" PostHistoryTypeId="2" PostId="7872" RevisionGUID="8e7fefb5-eafb-4d5c-a3d1-90c75f1614f3" CreationDate="2011-01-30T01:28:31.227" UserId="2332" Text="You're right in saying that a game engine is abstracting away from the low level graphics APIs, but a fully fledged game engine does a lot more.&#xD;&#xA;&#xD;&#xA;Game engines are intended to make everything with regards to game development easier. They do each have their own unique features, but generally they provide easy abstraction layers for graphics, audio, input, scene management, collision detection, maths and general useful utilities. Some provide wrappers and plugins for physics APIs and some even have some AI support (mostly limited to FSMs, pathfinding and - the current trend - behaviour trees). A lot of them support, and pride themselves, on cross-platform functionality.&#xD;&#xA;&#xD;&#xA;A game engine's purpose is to make it easier for the user to create a game, without having to deal with the small annoyances in creating a game from scratch or having to install a whole bunch of libraries and writing your own wrappers for them to suit your game.&#xD;&#xA;&#xD;&#xA;There are a lot of engines out there, but beware of the difference between a graphics engine and a games engine (For example, Unity would be a games engine, whereas Ogre would be a graphics engine).&#xD;&#xA;&#xD;&#xA;I've got two books on the subject, but they provide a good overview on the subject:  &#xD;&#xA;&#xD;&#xA; - 3D Game Engine Architecture by David&#xD;&#xA;   H Eberly&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA; - Game Coding Complete by Mike&#xD;&#xA;   McShaffry&#xD;&#xA;&#xD;&#xA;They're not too in depth as you would need several books on each component to get the depth of knowledge you'd need to create a full, professional game engine, but they explain the concepts very well, I think.&#xD;&#xA;&#xD;&#xA;If you're starting out game dev, don't make an engine. I refer you to the following page: http://scientificninja.com/blog/write-games-not-engines&#xD;&#xA;&#xD;&#xA;Engines are a tricky thing to get right. If you write a load of games, you'll find you have a lot of reusable code after a while which you can use to make your own personal engine to help you out. And having a lot of (complete) games under your belt is a lot more impressive than a single engine.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray" />
  <row Id="15966" PostHistoryTypeId="5" PostId="7870" RevisionGUID="7522f568-7ad8-4c9e-bc7b-6ea646ed0949" CreationDate="2011-01-30T01:44:34.330" UserId="51" Comment="removed the book request since that's a separate (duplicate) question" Text="I'd like to improve my skills/try something new and I'd like to start with 3D. I have read [Starting programming in 3D with C++][1] but I have question about engines:&#xD;&#xA;&#xD;&#xA; - What should engine do? I know it is abstraction layer above 3D API (i.e. OpenGL or DirectX) but what should it exactly do?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5465/starting-programming-in-3d-with-c" />
  <row Id="15967" PostHistoryTypeId="4" PostId="7870" RevisionGUID="7522f568-7ad8-4c9e-bc7b-6ea646ed0949" CreationDate="2011-01-30T01:44:34.330" UserId="51" Comment="removed the book request since that's a separate (duplicate) question" Text="What should a game engine do?" />
  <row Id="15968" PostHistoryTypeId="25" PostId="7870" RevisionGUID="82c05b45-b128-4be2-9b16-ce6a94249146" CreationDate="2011-01-30T02:15:55.507" Comment="http://twitter.com/#!/StackGameDev/status/31536052174848000" />
  <row Id="15969" PostHistoryTypeId="2" PostId="7873" RevisionGUID="20f88e98-cbf8-4ae6-b014-afbf02673869" CreationDate="2011-01-30T02:20:21.040" UserId="1430" Text="I am pretty sure you can't do this -- you have to change the render target between passes from the CPU side of things. The [list of effect states that can be manipulated][1] by effect files does not include anything regarding the render target.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb173347(v=vs.85).aspx" />
  <row Id="15970" PostHistoryTypeId="2" PostId="7874" RevisionGUID="4b139906-2a5b-4387-9431-6ed459cbe547" CreationDate="2011-01-30T03:06:45.137" UserId="1663" Text="Adding to Ray's answer: Engines (Game, Graphics, Audio, etc...) not only make it easier to interact with the underlying APIs, but implement functionality specific to the game, ex: Shading model, 3D sound.&#xD;&#xA;&#xD;&#xA;Specifically for Game engines: they manage game objects, resources (Memory, threads, all the other engines), and inter-module communication. They give the game stucture, scalability, and flexibility, which is essential for any non-trivial project." />
  <row Id="15980" PostHistoryTypeId="16" PostId="7682" RevisionGUID="30f85ce1-736f-4266-b3c2-7174eda224d1" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15981" PostHistoryTypeId="16" PostId="7685" RevisionGUID="7157d63f-17af-4fe9-bd08-1d36ec41c1b3" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15982" PostHistoryTypeId="16" PostId="7689" RevisionGUID="16f18bb2-a302-410e-8ed2-4b72d1311216" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15983" PostHistoryTypeId="16" PostId="7694" RevisionGUID="852df9fd-ac3b-4290-a8a2-d3197b164fa2" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15984" PostHistoryTypeId="16" PostId="7697" RevisionGUID="9d6b0157-3b6c-4eff-b141-b370b92189ad" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15985" PostHistoryTypeId="16" PostId="7786" RevisionGUID="32b622fb-8555-4167-9b62-981c8ae4306a" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15986" PostHistoryTypeId="16" PostId="7826" RevisionGUID="fd856ee5-ae40-4981-96cd-731cc8506b08" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15988" PostHistoryTypeId="16" PostId="7681" RevisionGUID="acf3cdb9-0f7f-4d22-9914-bcc24e27d4f5" CreationDate="2011-01-30T08:05:07.930" UserId="51" />
  <row Id="15991" PostHistoryTypeId="25" PostId="7855" RevisionGUID="1e321589-131a-4900-a045-6927b8dfb9e4" CreationDate="2011-01-30T08:15:55.617" Comment="http://twitter.com/#!/StackGameDev/status/31626650160463872" />
  <row Id="15992" PostHistoryTypeId="5" PostId="7817" RevisionGUID="fc70760f-9be5-4934-b7ba-3ac8a5a7c203" CreationDate="2011-01-30T08:19:09.593" UserId="1430" Comment="added 106 characters in body" Text="The general approach to handling this in classic Win32 programming is to capture the mouse delta each frame, and then reset the mouse position to the center of the screen. You also want to make the mouse cursor invisible, obviously, as otherwise things look ugly. &#xD;&#xA;&#xD;&#xA;You can do the same thing in XNA, you just work with a slightly different interface. So you might do something like:&#xD;&#xA;&#xD;&#xA;1. At startup, set the mouse's position to the center of your screen with [Mouse.SetPosition][1].&#xD;&#xA;2. Also at startup, [make the mouse invisible][2].&#xD;&#xA;3. Every input frame, [grab the current mouse state][3].&#xD;&#xA;4. Since you know the mouse was at the center, you can use the current X and Y values from the [MouseState][4] object you recovered in step #3 to compute the delta movement in both dimensions. You can feed these deltas to the rest of your game logic, such as (in your case) the camera code.&#xD;&#xA;5. Reset the mouse to the center of the screen before moving on to the next frame. &#xD;&#xA;&#xD;&#xA;EDIT: Also, [here is a tutorial][5] I dug up via a Google search for &quot;XNA relative mouse input&quot; (which is what you're asking about). It's a bit old, I think, so some of the methods may have had their names changed, but the concepts should still apply.&#xD;&#xA;&#xD;&#xA;EDIT 2: Meant to say &quot;handling this *in* Win32&quot; and not &quot;handling this *is* Win32,&quot; updated accordingly.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.input.mouse.setposition.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.ismousevisible.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.input.mouse.getstate.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.input.mousestate.aspx&#xD;&#xA;  [5]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Mouse_camera.php" />
  <row Id="15997" PostHistoryTypeId="2" PostId="7883" RevisionGUID="c21a489c-e8ca-41f5-9e79-99def4d83d8e" CreationDate="2011-01-30T10:53:00.347" UserId="659" Text="As a burned-out, bitter, and cynical programmer with &gt;10 years in the industry, this would be my advice:&#xD;&#xA;&#xD;&#xA;Don't plan on games as a long-term career.&#xD;&#xA;&#xD;&#xA;Plan to do it for a few years, get it out of your system. But plan for a more sensible career longer-term, and don't leave it too late to make that change&#xD;&#xA;&#xD;&#xA;You might manage 5-10 years in the industry, then you'll realise that there's not much long term future in being made redundant every 1-2 years, and crunching like crazy to buy the higher-ups supercars whilst barely seeing any pay rises, let alone bonuses. &#xD;&#xA;&#xD;&#xA;Also, the industry changes at quite a pace. When I was at high school age, it was all about the Amiga, 16-bit consoles, and 2D games. By the time I came out of university, it was all about 3D and Playstations. These days, the 'big games' industry is in a worse state than ever, can't see it lasting many more years as things are. But we have a resurgence in bedroom coding/indie development, and new opportunities in mobile devices and web-based platforms.&#xD;&#xA;&#xD;&#xA;Change can be exciting, but generally change means layoffs. Layoffs force salaries down. Changing job means relocating... Most people can't keep doing it for all that long...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="15998" PostHistoryTypeId="2" PostId="7884" RevisionGUID="60f1dd54-03dd-4c47-b06d-8e323ee1633d" CreationDate="2011-01-30T11:01:28.297" UserId="659" Text="Whilst basic sphere-sphere collision detection/response is quite simple, doing it accurately enough for a good pool simulation would be more tricky, as you'd have to deal with spin.&#xD;&#xA;&#xD;&#xA;Are you aware of the existence of physics engines? Some popular examples are these (and they can do a lot more than just pool ball collisions). Probably a good choice for making a pool game, but not so much for learning Java...&#xD;&#xA;&#xD;&#xA;In 2D&#xD;&#xA;&#xD;&#xA;Box2D:  http://www.box2d.org&#xD;&#xA;&#xD;&#xA;Chipmunk:  http://code.google.com/p/chipmunk-physics/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In 3D&#xD;&#xA;&#xD;&#xA;Bullet:  http://bulletphysics.org/&#xD;&#xA;&#xD;&#xA;ODE:  http://www.ode.org&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you were making a big-budget commercial game:&#xD;&#xA;&#xD;&#xA;Havok: http://www.havok.com" />
  <row Id="15999" PostHistoryTypeId="25" PostId="7861" RevisionGUID="dd5b8247-540d-4e86-aa5a-b151db093bf4" CreationDate="2011-01-30T11:15:55.663" Comment="http://twitter.com/#!/StackGameDev/status/31671948652056576" />
  <row Id="16000" PostHistoryTypeId="25" PostId="7859" RevisionGUID="b5535070-2ce5-4c8b-97fe-1faaf4ee2fb3" CreationDate="2011-01-30T14:15:56.520" Comment="http://twitter.com/#!/StackGameDev/status/31717250624917504" />
  <row Id="16001" PostHistoryTypeId="2" PostId="7885" RevisionGUID="ce62d07c-8263-4c18-a844-9532427badd5" CreationDate="2011-01-30T17:39:37.500" UserId="1134" Text="You may be interested in the article &quot;[Pool Hall Lessons: Fast, Accurate Collision Detection Between Circles or Spheres][1]&quot; if you choose to go the &quot;roll your own&quot; route.  It's not Java-specific, but does discuss some of the algorithms involved for a simple simulation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php" />
  <row Id="16002" PostHistoryTypeId="2" PostId="7886" RevisionGUID="c92d2c13-aa85-46bb-8a18-c1f89508d444" CreationDate="2011-01-30T18:37:32.927" UserId="1430" Text="[Edsger Dijkstra][1] allegedly said &quot;computer science is no more about computers than astronomy is about telescopes.&quot; Often people replace &quot;computers&quot; with &quot;programming,&quot; for much the same idea.&#xD;&#xA;&#xD;&#xA;An education in computer science will expose you to a wide variety of topics that have nothing to do with programming itself (although programming is often used as a vehicle for communicating and solving those problems) -- topics that have to do with modeling and manipulating information in interesting ways that tend to be very relevant in modern game development (even if it won't seem apparent while you're slogging through the classwork). For example I have leveraged the knowledge I acquired about graph theory in several instances to build automatic layout and diagramming tools, &quot;visual programming&quot; type editors, and unique-coloring algorithms to allow designers to have a holistic view of the the content they produced for a game, et cetera. &#xD;&#xA;&#xD;&#xA;You don't *need* a computer science degree to be a game programmer. You could have another degree (or, if you're quite good, no degree at all, but that could be risky in today's job market at least) -- math or physics, for example. You could even get one of those &quot;game school&quot; degrees (but [I would not recommend it][2]). It is important that you study what you are interested in, because college will only give you benefits proportional to the effort that you put into it, and you're not likely to do that if you're not invested in your coursework in some fashion.&#xD;&#xA;&#xD;&#xA;Certainly studying on your own, outside of school, is important, too -- because most colleges won't be teaching you how their coursework can be applied directly to game development. Plus, building games and little tech demos on your own will help you have a portfolio of interesting work to talk about in your future job interviews. Some interviewers, myself included, are greatly encouraged by a candidate who takes the time to pursue knowledge on his or her own.&#xD;&#xA;&#xD;&#xA;As for where you should go... that depends on you as well. You should go to a school that interests you, where you think you'd fit in, where you like the environment, et cetera. You should visit schools if possible. You don't need to go to Brown, MIT or Carnegie Mellon or whatever in order to get a good, solid CS education. In fact, I'm personally a bit skeptical that there is any significant benefit at all to doing so (many such schools are actually more well known for their *graduate* programs, and their undergraduate material may be no better off than anywhere else). &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Edsger_W._Dijkstra&#xD;&#xA;  [2]: http://scientificninja.com/blog/on-game-schools" />
  <row Id="16004" PostHistoryTypeId="5" PostId="7621" RevisionGUID="2c87a211-d8ae-4678-bd6c-899ea7679b9f" CreationDate="2011-01-30T19:01:47.927" UserId="962" Comment="Added Pc to target platforms" Text="XNA is a game framework by Microsoft that allows deployment for PC, Xbox Live Indie Games and Windows Phone 7." />
  <row Id="16005" PostHistoryTypeId="24" PostId="7621" RevisionGUID="37207a97-d445-4082-b8e8-129ac4ff4b0b" CreationDate="2011-01-30T19:01:47.927" Comment="Proposed by 962 approved by 51 edit id of 2" />
  <row Id="16006" PostHistoryTypeId="6" PostId="7754" RevisionGUID="bbb52ccd-c0d6-478c-b0b6-41426bb82aa7" CreationDate="2011-01-30T20:03:40.743" UserId="1156" Comment="edited tags" Text="&lt;3d-meshes&gt;&lt;models&gt;" />
  <row Id="16007" PostHistoryTypeId="2" PostId="7887" RevisionGUID="248e21f9-e7bd-49e1-882d-577eec04f020" CreationDate="2011-01-30T20:12:17.990" UserId="4662" Text="When writing code that interacts with multiple shaders, is it best practice to hard code the use of each effect? I wrote a couple of hard-coded loops and then noticed that I accidentally ended the pass of the wrong shader, and this has me concerned that instead, I should be writing some sort of Shader class that generically executes a shader. Is this the right way to go?" />
  <row Id="16008" PostHistoryTypeId="1" PostId="7887" RevisionGUID="248e21f9-e7bd-49e1-882d-577eec04f020" CreationDate="2011-01-30T20:12:17.990" UserId="4662" Text="Hardcoding C++ shader interop code" />
  <row Id="16009" PostHistoryTypeId="3" PostId="7887" RevisionGUID="248e21f9-e7bd-49e1-882d-577eec04f020" CreationDate="2011-01-30T20:12:17.990" UserId="4662" Text="&lt;c++&gt;&lt;directx9&gt;" />
  <row Id="16010" PostHistoryTypeId="25" PostId="7862" RevisionGUID="c8d01d6d-a407-42c5-b10c-46855f63c375" CreationDate="2011-01-30T20:15:56.783" Comment="http://twitter.com/#!/StackGameDev/status/31807848895741953" />
  <row Id="16011" PostHistoryTypeId="2" PostId="7888" RevisionGUID="e6c48928-e64c-422f-a03b-b6571255f509" CreationDate="2011-01-30T20:56:46.837" UserId="5034" Text="What is the &quot;best&quot; way to handle sprite sheets with shaders and buffers? In immediate mode it is easy to modify a sprite's texcoords when it is drawn, but I don't know how to do this with modern opengl. Should I store all the texcoords in a buffer and change the pointer for every sprite, or is there a better way?" />
  <row Id="16012" PostHistoryTypeId="1" PostId="7888" RevisionGUID="e6c48928-e64c-422f-a03b-b6571255f509" CreationDate="2011-01-30T20:56:46.837" UserId="5034" Text="Sprite sheets with buffer objects and shaders" />
  <row Id="16013" PostHistoryTypeId="3" PostId="7888" RevisionGUID="e6c48928-e64c-422f-a03b-b6571255f509" CreationDate="2011-01-30T20:56:46.837" UserId="5034" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;spritesheet&gt;" />
  <row Id="16014" PostHistoryTypeId="2" PostId="7889" RevisionGUID="e9c2b14a-137f-445f-a97e-ff0c8b60d8d9" CreationDate="2011-01-30T21:26:16.677" UserId="1430" Text="Yes, it would be more scalable in the long run to write a system could wrap and handle what your shaders need for you.&#xD;&#xA;&#xD;&#xA;There are several ways to do this, such as having a &quot;Shader&quot; class like you mentioned that inspects the underlying D3D Effect object for semantic [annotations][1] that let your wrapper class determine things like which kinds of vertex or texture input are required, begins and ends all the appropriate classes, et cetera.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb206299(v=vs.85).aspx#Add_Information_to_Effect_Parameters_with_Annotations" />
  <row Id="16015" PostHistoryTypeId="2" PostId="7890" RevisionGUID="866d528c-b553-42e2-a8a3-dd995ac942ca" CreationDate="2011-01-30T21:59:57.243" UserId="1437" Text="I have two object-aligned bounding boxes (i.e. not axis aligned, they rotate with the object).  I'd like to know if two object-aligned boxes overlap.&#xD;&#xA;&#xD;&#xA;My boxes are stored as four x,y points.  I've searched around for answers, but I can't make sense of the variable names and algorithms in examples to apply them to my particular case.&#xD;&#xA;&#xD;&#xA;Can someone help show me how this would be done, in a clear and simple way?  Thanks.  (The particular language isn't important, C-style pseudo code is OK.)" />
  <row Id="16016" PostHistoryTypeId="1" PostId="7890" RevisionGUID="866d528c-b553-42e2-a8a3-dd995ac942ca" CreationDate="2011-01-30T21:59:57.243" UserId="1437" Text="2D object-aligned bounding-box intersection test" />
  <row Id="16017" PostHistoryTypeId="3" PostId="7890" RevisionGUID="866d528c-b553-42e2-a8a3-dd995ac942ca" CreationDate="2011-01-30T21:59:57.243" UserId="1437" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;bounding-boxes&gt;" />
  <row Id="16018" PostHistoryTypeId="2" PostId="7891" RevisionGUID="49688591-de06-4175-bd70-528dac40f9df" CreationDate="2011-01-30T22:04:41.917" UserDisplayName="user5035" Text="Like bluescrn and Jari have suggested, I'd say go with bmfont if you can.&#xD;&#xA;&#xD;&#xA;But if you want an example that just draws text, here's a snippet I was toying with some months back.  Part are surely borrowed from somewhere (the PNG codec writer), but I have no idea where.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;    #include &lt;Windows.h&gt;&#xD;&#xA;    #include &lt;Wingdi.h&gt;&#xD;&#xA;    #include &lt;gdiplus.h&gt;&#xD;&#xA;    #include &lt;Gdiplusgraphics.h&gt;&#xD;&#xA;    using namespace Gdiplus;&#xD;&#xA;    &#xD;&#xA;    extern int MyGenTexture[512*512];&#xD;&#xA;    int MyGenTexture[512*512];&#xD;&#xA;    &#xD;&#xA;    int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)&#xD;&#xA;    {&#xD;&#xA;       UINT  num = 0;          // number of image encoders&#xD;&#xA;       UINT  size = 0;         // size of the image encoder array in bytes&#xD;&#xA;    &#xD;&#xA;       ImageCodecInfo* pImageCodecInfo = NULL;&#xD;&#xA;    &#xD;&#xA;       GetImageEncodersSize(&amp;num, &amp;size);&#xD;&#xA;       if(size == 0)&#xD;&#xA;          return -1;  // Failure&#xD;&#xA;    &#xD;&#xA;       pImageCodecInfo = (ImageCodecInfo*)(malloc(size));&#xD;&#xA;       if(pImageCodecInfo == NULL)&#xD;&#xA;          return -1;  // Failure&#xD;&#xA;    &#xD;&#xA;       GetImageEncoders(num, size, pImageCodecInfo);&#xD;&#xA;    &#xD;&#xA;       for(UINT j = 0; j &lt; num; ++j)&#xD;&#xA;       {&#xD;&#xA;          if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )&#xD;&#xA;          {&#xD;&#xA;             *pClsid = pImageCodecInfo[j].Clsid;&#xD;&#xA;             free(pImageCodecInfo);&#xD;&#xA;             return j;  // Success&#xD;&#xA;          }    &#xD;&#xA;       }&#xD;&#xA;    &#xD;&#xA;       free(pImageCodecInfo);&#xD;&#xA;       return -1;  // Failure&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    extern void MakeTexture();&#xD;&#xA;    void MakeTexture() {&#xD;&#xA;    	HDC myDC = CreateCompatibleDC(NULL);&#xD;&#xA;    	//HBITMAP GenTexture = CreateCompatibleBitmap( Context, 512, 512 );&#xD;&#xA;    	&#xD;&#xA;    	BITMAPINFOHEADER myInfoHeader = {&#xD;&#xA;    		sizeof(BITMAPINFOHEADER),&#xD;&#xA;    		512,&#xD;&#xA;    		-512, // Negative, to make it top down //&#xD;&#xA;    		1,&#xD;&#xA;    		32,&#xD;&#xA;    		BI_RGB,&#xD;&#xA;    		0, // Size of compressed data //&#xD;&#xA;    		4096, // Pixels per meter //&#xD;&#xA;    		4096,&#xD;&#xA;    		0,&#xD;&#xA;    		0&#xD;&#xA;    		};&#xD;&#xA;    &#xD;&#xA;    /*	HBITMAP myTexture = CreateDIBitmap(&#xD;&#xA;    		myDC,&#xD;&#xA;    		&amp;myInfoHeader,&#xD;&#xA;    		NULL,&#xD;&#xA;    		NULL,&#xD;&#xA;    		NULL,&#xD;&#xA;    		DIB_RGB_COLORS&#xD;&#xA;    		);&#xD;&#xA;    */&#xD;&#xA;    &#xD;&#xA;    	BITMAPINFO myInfo = {&#xD;&#xA;    		myInfoHeader,&#xD;&#xA;    		0&#xD;&#xA;    		};&#xD;&#xA;    &#xD;&#xA;    	int* Data;&#xD;&#xA;    &#xD;&#xA;    	HBITMAP myTexture = CreateDIBSection(&#xD;&#xA;    		myDC,&#xD;&#xA;    		&amp;myInfo,&#xD;&#xA;    		DIB_RGB_COLORS,&#xD;&#xA;    		(void**)&amp;Data,&#xD;&#xA;    		NULL,&#xD;&#xA;    		NULL&#xD;&#xA;    		);&#xD;&#xA;    &#xD;&#xA;    	SelectObject( myDC, myTexture );&#xD;&#xA;    &#xD;&#xA;    	GdiplusStartupInput gdiplusStartupInput;&#xD;&#xA;    	ULONG_PTR           gdiplusToken;&#xD;&#xA;    	// Initialize GDI+.&#xD;&#xA;    	GdiplusStartup(&amp;gdiplusToken, &amp;gdiplusStartupInput, NULL);&#xD;&#xA;    &#xD;&#xA;    	{&#xD;&#xA;    		Graphics g( myDC, myTexture );&#xD;&#xA;    		SolidBrush brush( Color(255,255,255,255) ); &#xD;&#xA;    		FontFamily fontFamily( L&quot;Times New Roman&quot; );&#xD;&#xA;    		Font font( &amp;fontFamily, 48, FontStyleRegular, UnitPixel );&#xD;&#xA;    &#xD;&#xA;    		for( int idx = 0; idx &lt; 512*512; idx++ ) {&#xD;&#xA;    			Data[idx] = 0x00FFFFFF;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    		//g.Clear( Color(0,255,255,255) );&#xD;&#xA;    		g.DrawString(L&quot;Using \&quot;Technology\&quot;, i.e.&quot;,-1,&amp;font,PointF(0,20),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;GDI+, I have created a&quot;,-1,&amp;font,PointF(0,70),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;texture from system&quot;,-1,&amp;font,PointF(0,120),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;installed fonts! That&quot;,-1,&amp;font,PointF(0,170),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;means international&quot;,-1,&amp;font,PointF(0,220),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;characters!&quot;,-1,&amp;font,PointF(0,270),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;&quot;,-1,&amp;font,PointF(0,320),&amp;brush);&#xD;&#xA;    		g.DrawString(L&quot;      スマイルズ &quot;,-1,&amp;font,PointF(0,370),&amp;brush);&#xD;&#xA;    		g.Flush();&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    		for( int idx = 0; idx &lt; 512*512; idx++ ) {&#xD;&#xA;    			MyGenTexture[idx] = Data[idx];&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    		// Write File //&#xD;&#xA;    		Bitmap OutBitmap(myTexture,NULL);&#xD;&#xA;    &#xD;&#xA;    		CLSID encoderClsid;&#xD;&#xA;    		GetEncoderClsid(L&quot;image/png&quot;, &amp;encoderClsid);&#xD;&#xA;    		Status stat = OutBitmap.Save(L&quot;Awesome.png&quot;, &amp;encoderClsid, NULL);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	GdiplusShutdown(gdiplusToken);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	DeleteObject( myTexture );&#xD;&#xA;    	//DeleteObject(GenTexture);&#xD;&#xA;    	DeleteDC(myDC);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16019" PostHistoryTypeId="2" PostId="7892" RevisionGUID="ec3e910a-10b7-4255-b3fd-b5f73987aaee" CreationDate="2011-01-30T22:15:12.127" UserId="4082" Text="The easier way is probably to test each vertex of box B against each side of box A (compute the signed distance). This way you can classify each vertex as &quot;in front&quot; or &quot;behind&quot; the segment.&#xD;&#xA;&#xD;&#xA;If all of B's vertexes classify as &quot;in front&quot; of one of A's segments, B and A don't overlap; otherwise, they do.&#xD;&#xA;&#xD;&#xA;This is somewhat involved, so you may get some performance gain by doing a circle-circle check first, using the bounding circles of the squares (trivial to compute)" />
  <row Id="16020" PostHistoryTypeId="5" PostId="7890" RevisionGUID="7c503f6a-4dcc-4d73-9176-f3ea12b76638" CreationDate="2011-01-30T22:20:18.120" UserId="1437" Comment="added 159 characters in body" Text="I have two object-aligned bounding boxes (i.e. not axis aligned, they rotate with the object).  I'd like to know if two object-aligned boxes overlap.  (*Edit: note - I'm using an axis-aligned bounding box test to quickly discard distant objects, so it doesn't matter if the quad routine is a little slower.*)&#xD;&#xA;&#xD;&#xA;My boxes are stored as four x,y points.  I've searched around for answers, but I can't make sense of the variable names and algorithms in examples to apply them to my particular case.&#xD;&#xA;&#xD;&#xA;Can someone help show me how this would be done, in a clear and simple way?  Thanks.  (The particular language isn't important, C-style pseudo code is OK.)" />
  <row Id="16021" PostHistoryTypeId="2" PostId="7893" RevisionGUID="069590fd-deea-4a03-be43-5dc577c7c2bb" CreationDate="2011-01-30T22:22:22.633" UserId="3794" Text="If you know where to look it is easy. You are looking for oobb. Go here: http://www.realtimerendering.com/intersections.html. There you find link to here http://www.geometrictools.com/LibMathematics/Intersection/Intersection.html and there find correct code. (ctrl+f &quot;Intersection of boxes (2D)&quot;)&#xD;&#xA;&#xD;&#xA;It uses SAT and contains source codes and article." />
  <row Id="16022" PostHistoryTypeId="2" PostId="7894" RevisionGUID="1a708dab-3b32-4c0c-9e37-de9d7a48dd71" CreationDate="2011-01-30T22:43:45.797" UserId="3794" Text="You can always make looong buffer &quot;vertex;texcoord&quot; repeat. And just use indexes how you said. It is propably most easy and kinda similar to what you know. &#xD;&#xA;&#xD;&#xA;If you want to save some memory. There is pretty neat solution and it is to have one sprite in buffer with unite texcoords and create UVs transformation matrix and send it to your shader and multiply texcoords with it.&#xD;&#xA;&#xD;&#xA;You dont have to create matrices by yourself if you are not fine with that. You can just use normal GL functions and than read matrix with `glGetFloatv`function. Like this:&#xD;&#xA;&#xD;&#xA;    glGetFloatv (GL_MODELVIEW_MATRIX ,&amp;g_TexCoordMat);&#xD;&#xA;&#xD;&#xA;If you don't know how to send matrix to shader i can share some code with you." />
  <row Id="16023" PostHistoryTypeId="5" PostId="7893" RevisionGUID="e260ac94-76d5-48ea-9062-06b20cfeb7f3" CreationDate="2011-01-30T22:47:54.360" UserId="3794" Comment="formating" Text="If you know where to look it is easy. You are looking for oobb. Go here: http://www.realtimerendering.com/intersections.html.  &#xD;&#xA;There you find link to this site   http://www.geometrictools.com/LibMathematics/Intersection/Intersection.html  &#xD;&#xA;and there find correct code. (ctrl+f &quot;Intersection of boxes (2D)&quot;)&#xD;&#xA;&#xD;&#xA;It uses SAT and contains source codes and article." />
  <row Id="16024" PostHistoryTypeId="2" PostId="7895" RevisionGUID="950dcd12-4b1d-4aa7-8427-6dced3b1b57f" CreationDate="2011-01-30T22:50:04.620" UserId="323" Text="As long as you're doing reasonably conventional binding, [LuaBind][1] will do everything you need. Binding classes and functions tends to be a one-line-per-function deal. If you'd like an example, [here's][2] the applicable file from the game engine I've been working on (look for module(L) for the start of the LuaBind interface, DontKillMeBro&lt;&gt; is a little system I rigged up to let me more precisely time object destruction for certain sensitive objects.)&#xD;&#xA;&#xD;&#xA;If you want something more complex, you're probably going to need to use the actual Lua API. Luckily, the Lua API is reasonably simple.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rasterbar.com/products/luabind.html&#xD;&#xA;  [2]: https://github.com/zorbathut/glorp/blob/master/core.cpp" />
  <row Id="16025" PostHistoryTypeId="5" PostId="7894" RevisionGUID="0a438d4d-ef47-4583-a627-a2846f89a154" CreationDate="2011-01-30T22:50:15.247" UserId="3794" Comment="fixing english error" Text="You can always make looong buffer &quot;vertex;texcoord&quot; repeat. And just use indices how you said. It is propably most easy and kinda similar to what you know. &#xD;&#xA;&#xD;&#xA;If you want to save some memory. There is pretty neat solution and it is to have one sprite in buffer with unite texcoords and create UVs transformation matrix and send it to your shader and multiply texcoords with it.&#xD;&#xA;&#xD;&#xA;You dont have to create matrices by yourself if you are not fine with that. You can just use normal GL functions and than read matrix with `glGetFloatv`function. Like this:&#xD;&#xA;&#xD;&#xA;    glGetFloatv (GL_MODELVIEW_MATRIX ,&amp;g_TexCoordMat);&#xD;&#xA;&#xD;&#xA;If you don't know how to send matrix to shader i can share some code with you." />
  <row Id="16026" PostHistoryTypeId="5" PostId="7894" RevisionGUID="d8ab0584-92a3-4cef-a4d1-299008e7693f" CreationDate="2011-01-30T22:55:25.927" UserId="3794" Comment="clearification" Text="You can always make looong buffer &quot;vertex;texcoord&quot; repeat. And just use indices how you said. It is propably most easy and kinda similar to what you know. &#xD;&#xA;&#xD;&#xA;If you want to save some memory. There is pretty neat solution and it is to have one sprite in buffer with unite texcoords and create UVs transformation matrix and send it to your shader and multiply texcoords with it.&#xD;&#xA;&#xD;&#xA;You dont have to create matrices by yourself if you are not fine with that. You can just use regular GL functions and than read matrix with `glGetFloatv`function. Like this:&#xD;&#xA;&#xD;&#xA;    glGetFloatv (GL_MODELVIEW_MATRIX ,&amp;g_TexCoordMat);&#xD;&#xA;&#xD;&#xA;If you don't know how to send matrix to shader i can share some code with you." />
  <row Id="16027" PostHistoryTypeId="2" PostId="7896" RevisionGUID="8950d297-35fd-42ae-9f0a-89f29a30b74d" CreationDate="2011-01-30T23:20:03.940" UserId="3794" Text="I recently read this GPU GEMS 3 article [Volumetric Light Scattering as a Post-Process][1]. I like the idea to add volumetric light property to realtime render i'm working on. Question is will it work for multiple lights? Our renderer uses one render pass per light and uses additive blending to sum incoming light.&#xD;&#xA;&#xD;&#xA;I'm mostly convinced that it have to work nice. Do you agree? Maybe there can be problem where light rays crosses each other.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch13.html" />
  <row Id="16028" PostHistoryTypeId="1" PostId="7896" RevisionGUID="8950d297-35fd-42ae-9f0a-89f29a30b74d" CreationDate="2011-01-30T23:20:03.940" UserId="3794" Text="Multiple volumetric lights" />
  <row Id="16029" PostHistoryTypeId="3" PostId="7896" RevisionGUID="8950d297-35fd-42ae-9f0a-89f29a30b74d" CreationDate="2011-01-30T23:20:03.940" UserId="3794" Text="&lt;lighting&gt;&lt;post-processing&gt;&lt;volumetric-light&gt;" />
  <row Id="16030" PostHistoryTypeId="2" PostId="7897" RevisionGUID="e1b405ec-d132-4d20-9cec-3a6ff8948d27" CreationDate="2011-01-30T23:40:09.410" UserDisplayName="user5038" Text="I wonder if the market is as small as people say. I mean I know several people who use Linux as their day to day OS that keep a partition free for a windows install to play their games. (I do the same)&#xD;&#xA;The one and only reason we have windows installed is because of the software developers. If they shift their positions and support Linux then I'm certain the adoption rate would go up.&#xD;&#xA;But nothing will change unless somebody takes the leap first (come on valve)." />
  <row Id="16031" PostHistoryTypeId="25" PostId="7890" RevisionGUID="296522be-d51c-473e-bd67-4326c5b81423" CreationDate="2011-01-31T02:15:56.893" Comment="http://twitter.com/#!/StackGameDev/status/31898446583566337" />
  <row Id="16032" PostHistoryTypeId="5" PostId="7894" RevisionGUID="f32f443a-d622-4127-8718-6dddb4cf4ce5" CreationDate="2011-01-31T03:52:31.070" UserId="3794" Comment="credits for picture" Text="You can always make looong buffer &quot;vertex;texcoord&quot; repeat. And just use indices how you said. It is propably most easy and kinda similar to what you know. &#xD;&#xA;&#xD;&#xA;If you want to save some memory. There is pretty neat solution and it is to have one sprite in buffer with unite texcoords and create UVs transformation matrix and send it to your shader and multiply texcoords with it (in vertex shader).&#xD;&#xA;&#xD;&#xA;You dont have to create matrices by yourself if you are not fine with that. You can just use regular GL functions and than read matrix with `glGetFloatv`function. Like this:&#xD;&#xA;&#xD;&#xA;    glGetFloatv (GL_MODELVIEW_MATRIX ,&amp;g_TexCoordMat);&#xD;&#xA;&#xD;&#xA;I created image to describe it better. glTranslate ang glScale can be looked as that they are just moving with the UV space basis. &#xD;&#xA;&#xD;&#xA;![spritesheet uvs][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you don't know how to send matrix to shader i can share some code with you.&#xD;&#xA;&#xD;&#xA;**Edit:** Added picture  &#xD;&#xA;(source for spritesheet i used: [funorb.com][2])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/KoCTP.jpg&#xD;&#xA;  [2]: http://www.funorb.com/kbase/guid/funorb_central_02" />
  <row Id="16033" PostHistoryTypeId="2" PostId="7898" RevisionGUID="b420d22a-90f3-44b9-b841-72f83597f4ca" CreationDate="2011-01-31T04:02:41.623" UserId="2708" Text="I'm implementing a 2D side scroller for iOS (using C/C++ with OpenGL) (beat'em up style like double dragon/final fight ).&#xD;&#xA;&#xD;&#xA;My scenes are composed of one cyclical background image ( the end of the image connects perfectly with the beginning ). This is to produce a cyclical scroll effect.&#xD;&#xA;&#xD;&#xA;I was wondering how could I implement a camera that follows my player movement ?&#xD;&#xA;&#xD;&#xA;( Resources / Links are greatly appreciated with explanations :) )" />
  <row Id="16034" PostHistoryTypeId="1" PostId="7898" RevisionGUID="b420d22a-90f3-44b9-b841-72f83597f4ca" CreationDate="2011-01-31T04:02:41.623" UserId="2708" Text="Implementing camera for 2d side scroller game ?" />
  <row Id="16035" PostHistoryTypeId="3" PostId="7898" RevisionGUID="b420d22a-90f3-44b9-b841-72f83597f4ca" CreationDate="2011-01-31T04:02:41.623" UserId="2708" Text="&lt;c++&gt;&lt;opengl&gt;&lt;iphone&gt;&lt;side-scroller&gt;" />
  <row Id="16036" PostHistoryTypeId="2" PostId="7899" RevisionGUID="ae5d9452-8029-4028-bac5-3f4821d3c87e" CreationDate="2011-01-31T04:19:54.353" UserId="3794" Text="The most easy thing to handle which came to my mind is just to draw fullscreen quad with your background texture. And move UVs in x (so move only U). And set UV border method to repeat." />
  <row Id="16037" PostHistoryTypeId="6" PostId="7898" RevisionGUID="6908217f-f4ca-46ee-936d-8023d9125497" CreationDate="2011-01-31T04:30:55.180" UserId="2332" Comment="edited tags" Text="&lt;c++&gt;&lt;opengl&gt;&lt;iphone&gt;&lt;camera&gt;&lt;side-scroller&gt;" />
  <row Id="16038" PostHistoryTypeId="2" PostId="7900" RevisionGUID="cbdc0c22-ac50-4e45-b7af-01f0c4e91b7a" CreationDate="2011-01-31T05:14:42.813" UserId="1430" Text="Presumably you have a coordinate system for your level, so that you always know where any individual entity in the level is (or, more likely, where those entities are spawned so that you know when they should become active and start engaging the player). You've also got your player entity in there, and that's the one you want your camera to track. The camera itself needs a position in the level, too -- I will assume here that the position of the camera in the world corresponds to the center of the screen, but you could just as easily choose another point of reference.&#xD;&#xA;&#xD;&#xA;The simple solution is to always have the player centered in the screen, so the camera's position is always set to the player's position every frame. This tends to be somewhat unpleasant for player's, however. A better solution is to allow the player to move around within the center region of the screen and only scroll when the player character gets near the edge of the screen -- since you know the camera's position and the width of the screen, you can use that to compute two borders. When the player's X coordinate falls outside of the range of one of those borders, adjust the camera's X coordinate appropriately.&#xD;&#xA;&#xD;&#xA;To scroll your background, you can do what notabene suggested and simply adjust the UV coordinates of the quad rendering the background (ideally this would be done by setting a shader parameter and doing the offset in the shader, instead of mapping and unmapping the quad's vertex buffer every frame, but you could do either). The important part there is that the addressing mode be set to wrap." />
  <row Id="16039" PostHistoryTypeId="25" PostId="7898" RevisionGUID="28d80d35-2e34-433c-a928-e247a117d237" CreationDate="2011-01-31T05:15:56.933" Comment="http://twitter.com/#!/StackGameDev/status/31943744114659328" />
  <row Id="16040" PostHistoryTypeId="2" PostId="7901" RevisionGUID="620645d1-1c6e-4c88-a500-22baa6afa5b7" CreationDate="2011-01-31T06:34:48.970" UserId="2158" Text="For a simple pool game where spin is not modeled the algorithm is quite simple.&#xD;&#xA;&#xD;&#xA; 1. To check if a collision happens, check if the distance between the balls is smaller than the sum of their radius.&#xD;&#xA; 2. Calculate the normal of the impact&#xD;&#xA; 3. Calculate the impact force based on the speed difference, normal, impact coefficient and masses&#xD;&#xA; 4. Apply the impact force to both balls&#xD;&#xA;&#xD;&#xA;In pseudo code this becomes:&#xD;&#xA;&#xD;&#xA;    vector difference = ball2.position - ball1.position&#xD;&#xA;    float distance = sqrt(difference)&#xD;&#xA;    if (distance &lt; ball1.radius + ball2.radius) {&#xD;&#xA;        vector normal = difference / distance&#xD;&#xA;        vector velocityDelta = ball2.velocity - ball1.velocity&#xD;&#xA;        float dot = dotProduct(velocityDelta, normal)&#xD;&#xA;        &#xD;&#xA;        if (dot &gt; 0) {&#xD;&#xA;            float coefficient = 0.5&#xD;&#xA;            float impulseStrength = (1 + coefficient) * dot * (1 / ball1.mass + 1 / ball2.mass)&#xD;&#xA;            vector impulse = impulseStrength * normal&#xD;&#xA;            ball1.velocity -= impulse / ball1.mass&#xD;&#xA;            ball2.velocity += impulse / ball2.mass&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can omit the mass from the algorithm if all balls have same mass and also assume constant radius for all balls for a pool game, but the code will be more useful for you without those simplifications.&#xD;&#xA;&#xD;&#xA;The code is based on this tutorial: http://freespace.virgin.net/hugo.elias/models/m_snokr.htm, but I remember that the impulse multiplication was incorrect there." />
  <row Id="16041" PostHistoryTypeId="2" PostId="7902" RevisionGUID="691d4f11-2933-4cf9-99d6-b6a05c89bb07" CreationDate="2011-01-31T08:01:09.613" UserId="4129" Text="I am looking at adopting a skeletal animation format ([as prompted here][1]) for an RTS game.  The individual representation of each model on-screen will be small but there will be lots of them!&#xD;&#xA;&#xD;&#xA;In skeletal animation e.g. MD5 files, each individual vertex can be attached to an arbitrary number of joints.&#xD;&#xA;&#xD;&#xA;How can you efficiently support this whilst doing the interpolation in GLSL?  Or do engines do their animation on the CPU?&#xD;&#xA;&#xD;&#xA;Or do engines set arbitrary limits on maximum joints per vertex and invoke nop multiplies for those joints that don't use the maximum number?&#xD;&#xA;&#xD;&#xA;Are there games that use skeletal animation in an RTS-like setting thus proving that on integrated graphics cards I have nothing to worry about in going the bones route?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7754/how-to-export-3d-models-that-consist-of-several-parts-eg-turret-on-a-tank" />
  <row Id="16042" PostHistoryTypeId="1" PostId="7902" RevisionGUID="691d4f11-2933-4cf9-99d6-b6a05c89bb07" CreationDate="2011-01-31T08:01:09.613" UserId="4129" Text="Efficient skelal animation" />
  <row Id="16043" PostHistoryTypeId="3" PostId="7902" RevisionGUID="691d4f11-2933-4cf9-99d6-b6a05c89bb07" CreationDate="2011-01-31T08:01:09.613" UserId="4129" Text="&lt;opengl&gt;&lt;animation&gt;&lt;shaders&gt;&lt;skeletal&gt;" />
  <row Id="16044" PostHistoryTypeId="25" PostId="7902" RevisionGUID="29fa623e-a040-4350-8a54-71c7384c9629" CreationDate="2011-01-31T08:15:57.197" Comment="http://twitter.com/#!/StackGameDev/status/31989043868733441" />
  <row Id="16045" PostHistoryTypeId="2" PostId="7903" RevisionGUID="53ea51c5-2a74-461c-8ccd-83cf6b10fa3d" CreationDate="2011-01-31T08:38:28.093" UserId="1091" Text="Limiting the number of bone influences is common, yes. You can either 0-weight unused influences, or have a loop/early-out mechanism to skip.&#xD;&#xA;&#xD;&#xA;As for whether it works for an RTS, I don't have a reference for you, but I imagine you're going to need LOD if working with a large number of characters on-screen, and also if those characters are small.&#xD;&#xA;&#xD;&#xA;LODing skeletal characters is much the same as LODing anything else, except you'll probably want to LOD the bone influences and skeleton as well as the mesh.&#xD;&#xA;&#xD;&#xA;For example, a low-ish level of detail might only use a single bone with the highest influence per-vertex (also known as &quot;hard skinning&quot;).&#xD;&#xA;&#xD;&#xA;You would probably also limit the number of bones in the skeleton for a low LOD model.&#xD;&#xA;&#xD;&#xA;Finally - consider whether you *ever* need to render the characters close-up. You probably only want to model, skin and animate the characters for the closest view distance... certainly you don't want to be storing all the runtime data at a resolution far higher than you'll ever render. You might find that you just don't need more than a very basic skeleton and a couple of influences per-vertex for your situation.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16046" PostHistoryTypeId="2" PostId="7904" RevisionGUID="e7ed8979-e405-4913-a93a-76d330f0f3df" CreationDate="2011-01-31T08:41:09.947" UserId="4264" Text="32bit floats have 24 bits of significant precision, so the best precision you're going to get is 6 bits per component.&#xD;&#xA;&#xD;&#xA;I haven't tested this, but basically all you need is:&#xD;&#xA;&#xD;&#xA;    // C side, params in 0..63 ints&#xD;&#xA;    #define PACKI(a,b,c,d) ((a) &lt;&lt; 18) | ((b) &lt;&lt; 12) | ((c) &lt;&lt; 6) | (d)&#xD;&#xA;    // C side, params in 0..1 floats&#xD;&#xA;    #define PACKF(a,b,c,d) \&#xD;&#xA;     ((int)floor((a)*63) &lt;&lt; 18) | \&#xD;&#xA;     ((int)floor((b)*63) &lt;&lt;  12) | \&#xD;&#xA;     ((int)floor((c)*63) &lt;&lt;   6) | \&#xD;&#xA;     ((int)floor((d)*63))&#xD;&#xA;&#xD;&#xA;    // GLSL side&#xD;&#xA;    vec4 unpack(float i)&#xD;&#xA;    {&#xD;&#xA;       return mod(vec4(i / 262144.0, i / 4096.0, i / 64.0, i), 64.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16047" PostHistoryTypeId="4" PostId="7902" RevisionGUID="6930f699-d170-4ed2-8f57-5a18a1cda6a2" CreationDate="2011-01-31T08:43:39.507" UserId="20" Comment="changed title" Text="Efficient skeletal animation" />
  <row Id="16048" PostHistoryTypeId="6" PostId="7859" RevisionGUID="d6f59dfd-f127-485b-b55d-12b8d69fa2b6" CreationDate="2011-01-31T08:46:07.833" UserId="5021" Comment="edited tags" Text="&lt;hlsl&gt;&lt;shadermodel3&gt;" />
  <row Id="16049" PostHistoryTypeId="2" PostId="7905" RevisionGUID="59860ef6-c76b-4345-8f51-f73e39d737c6" CreationDate="2011-01-31T11:03:35.680" UserId="5044" Text="I'm considering developing a space opera game, having already done some game design. Technically, though, I'm coming from a business applications background. Hence I don't really know how I should handle time and duration.&#xD;&#xA;&#xD;&#xA;Let's state the matter clearly: what if something is bound to happen in 5 hours and on which other events depend.&#xD;&#xA;&#xD;&#xA;For example the arrival of some space ship in some system where some defense systems are present, hence a fight would start.&#xD;&#xA;&#xD;&#xA;Should I use some kind of scheduler (like Quartz in my java land) to trigger the corresponding event when due (I plan to use events for communication)? Something else ?&#xD;&#xA;&#xD;&#xA;thanks in advance&#xD;&#xA;&#xD;&#xA;best&#xD;&#xA;&#xD;&#xA;borg" />
  <row Id="16050" PostHistoryTypeId="1" PostId="7905" RevisionGUID="59860ef6-c76b-4345-8f51-f73e39d737c6" CreationDate="2011-01-31T11:03:35.680" UserId="5044" Text="Time/duration handling in strategic game" />
  <row Id="16051" PostHistoryTypeId="3" PostId="7905" RevisionGUID="59860ef6-c76b-4345-8f51-f73e39d737c6" CreationDate="2011-01-31T11:03:35.680" UserId="5044" Text="&lt;engine&gt;&lt;game-mechanics&gt;&lt;language-agnostic&gt;&lt;strategy&gt;" />
  <row Id="16052" PostHistoryTypeId="2" PostId="7906" RevisionGUID="d395e037-d5f6-4794-acfc-63d3c8b91345" CreationDate="2011-01-30T19:49:51.540" UserDisplayName="juakob" Text="I dont understand how to use a finite state machine with the entity controlled by the player. &#xD;&#xA;For example i have a mario(2d platform) i can jump,run,walk,take damage,swim,etc so my first thought was to use this actions as states. But what happen when you are running when you take damage? or jumping taking damage and shooting at the same time?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I just want to add functionalities(actions) to the player in a clean way(not using ifs for all the actions in the entity update) &#xD;&#xA;" />
  <row Id="16053" PostHistoryTypeId="1" PostId="7906" RevisionGUID="d395e037-d5f6-4794-acfc-63d3c8b91345" CreationDate="2011-01-30T19:49:51.540" UserDisplayName="juakob" Text="finite state machine used in mario like platform game " />
  <row Id="16054" PostHistoryTypeId="3" PostId="7906" RevisionGUID="d395e037-d5f6-4794-acfc-63d3c8b91345" CreationDate="2011-01-30T19:49:51.540" UserDisplayName="juakob" Text="&lt;game-development&gt;&lt;platform&gt;&lt;actions&gt;&lt;state&gt;&lt;fsm&gt;" />
  <row Id="16055" PostHistoryTypeId="17" PostId="7906" RevisionGUID="cf436aef-3895-4afd-bf16-c5909455e2ea" CreationDate="2011-01-31T11:03:58.420" UserId="-1" Comment="from http://stackoverflow.com/questions/4845080/finite-state-machine-used-in-mario-like-platform-game" Text="" />
  <row Id="16056" PostHistoryTypeId="25" PostId="7888" RevisionGUID="18002e93-e5a1-4e7a-ace3-210eed7a7d24" CreationDate="2011-01-31T11:15:56.777" Comment="http://twitter.com/#!/StackGameDev/status/32034340657438721" />
  <row Id="16057" PostHistoryTypeId="2" PostId="7907" RevisionGUID="73621411-3af0-4b88-abbe-1e8bc8900c62" CreationDate="2011-01-31T11:29:33.257" UserId="1386" Text="States are not actions, in your game they would control how the character is updated (e.g. each state could have its own update() function). You could have states like:&#xD;&#xA;&#xD;&#xA; - jumping&#xD;&#xA; - running&#xD;&#xA; - in pain&#xD;&#xA; - falling&#xD;&#xA; - dead&#xD;&#xA;&#xD;&#xA;And the transition between states (the events / arrows between states) would be player inputs and reactions to the world, such as:&#xD;&#xA;&#xD;&#xA; - hit by monster&#xD;&#xA; - jump button pressed&#xD;&#xA; - shoot button pressed&#xD;&#xA;&#xD;&#xA;&gt; But what happen when you are running&#xD;&#xA;&gt; when you take damage?&#xD;&#xA;&#xD;&#xA;The `hit by monster` event would be triggered and transition the player into the `in pain` state.&#xD;&#xA;&#xD;&#xA;&gt; or jumping taking damage and shooting&#xD;&#xA;&gt; at the same time?&#xD;&#xA;&#xD;&#xA;The player would transition into the `in pain` state again.&#xD;&#xA;&#xD;&#xA;You probably aren't going to escape if statements, but you can avoid deeply nested statements." />
  <row Id="16058" PostHistoryTypeId="17" PostId="7909" RevisionGUID="a70baf90-be7d-4b6d-9616-188b39e21df9" CreationDate="2011-01-31T11:36:45.750" UserId="-1" Comment="from http://stackoverflow.com/questions/4847371/should-i-use-xna-c-or-java-to-create-a-basic-game-engine/4847395#4847395" Text="" />
  <row Id="16059" PostHistoryTypeId="17" PostId="7910" RevisionGUID="d869ae63-afa9-47aa-8cc2-42fc356fcf03" CreationDate="2011-01-31T11:36:45.750" UserId="-1" Comment="from http://stackoverflow.com/questions/4847371/should-i-use-xna-c-or-java-to-create-a-basic-game-engine/4847403#4847403" Text="" />
  <row Id="16060" PostHistoryTypeId="17" PostId="7911" RevisionGUID="ff3a15dd-ed1b-4ff5-b56f-812ecb73e822" CreationDate="2011-01-31T11:36:45.750" UserId="-1" Comment="from http://stackoverflow.com/questions/4847371/should-i-use-xna-c-or-java-to-create-a-basic-game-engine/4847539#4847539" Text="" />
  <row Id="16061" PostHistoryTypeId="2" PostId="7909" RevisionGUID="03c37de7-abcd-4433-ae53-1c00e9d62454" CreationDate="2011-01-31T03:33:59.387" UserDisplayName="kstrat2001" Text="It really depends on the requirements but XNA will be much better for learning game engines.  However, java is also not so bad.  I've done engines in both and would definitely recommend XNA if you are new to games.  The examples and the community will help you learn about game development and engine tech much faster in that environment.  Plus, your engine will allow you to make games for Xbox 360 as well as Win Phone 7 (if you support the Reach API).&#xD;&#xA;&#xD;&#xA;What features do you plan to have in the engine?  You said 2D so I'm assuming it's somewhat simple for now?" />
  <row Id="16062" PostHistoryTypeId="2" PostId="7910" RevisionGUID="a81343ad-ac15-40ef-9b92-93d4adde1890" CreationDate="2011-01-31T03:36:08.757" UserDisplayName="Shekhar_Pro" Text="I think you are going completely two different way. IMO XNA is a Well Established Platform and you will have the benefit of using the  DirectX straight away. As for java there may be libraries but i doubt they are as robust and Optimized for Hight Performance as XNA. &#xD;&#xA;&#xD;&#xA;More over Adding XNA to yor arsenal will benifit you in long run in developing games or Engines targeted for Windows and its sibling platforms. Platforms like XboX and Windows Phone 7 support XNA platform. So XNA should be the way to go." />
  <row Id="16063" PostHistoryTypeId="2" PostId="7911" RevisionGUID="1d40cfcc-6486-40a8-9c44-39bd08c364fa" CreationDate="2011-01-31T04:07:32.903" UserId="288" Text="In my opinion, XNA is a superior library to what you can find in the Java world. It's complete, well implemented, well documented, and widely used. The &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/&quot;&gt;sample catalog&lt;/a&gt; in particular makes XNA an excellent choice.&#xD;&#xA;&#xD;&#xA;One **critical** piece of information you left out of your question: *Who is your target audience?* Who is going to be using your engine?" />
  <row Id="16064" PostHistoryTypeId="2" PostId="7908" RevisionGUID="9cea8cd7-680a-4a89-a265-4ac8e236093a" CreationDate="2011-01-31T03:27:45.207" UserDisplayName="Xboxking" Text="My project is to design and build a game engine (in just about 3 months). &#xD;&#xA;&#xD;&#xA;I've been looking at two options for this game engine, either make it with XNA (and C#) or Java. My experience with XNA/C# is zero to none, however I have been a Java programmer for around 4 years.&#xD;&#xA;&#xD;&#xA;I've had a little play around with both but I am still not sure what would be best to use (i.e. what would turn out better with my experience).&#xD;&#xA;&#xD;&#xA;XNA is obviously for making games and I would presume making a game engine would be slightly easier in this - however that said, there are numerous libraries available in Java that could be used for a game engine (such as lwjgl). &#xD;&#xA;&#xD;&#xA;What would be my best option and ideally produce the best results out of both XNA or Java? For your information, the game engine at the moment is a 2D one and is not too advanced (although I plan to extend it in the future).&#xD;&#xA;&#xD;&#xA;Thanks in advance for all answers!" />
  <row Id="16065" PostHistoryTypeId="1" PostId="7908" RevisionGUID="9cea8cd7-680a-4a89-a265-4ac8e236093a" CreationDate="2011-01-31T03:27:45.207" UserDisplayName="Xboxking" Text="Should I use XNA (C#) or Java to create a basic game engine?" />
  <row Id="16066" PostHistoryTypeId="3" PostId="7908" RevisionGUID="9cea8cd7-680a-4a89-a265-4ac8e236093a" CreationDate="2011-01-31T03:27:45.207" UserDisplayName="Xboxking" Text="&lt;c#&gt;&lt;java&gt;&lt;xna&gt;&lt;game-engine&gt;" />
  <row Id="16067" PostHistoryTypeId="17" PostId="7908" RevisionGUID="2792067c-0f42-4944-8500-4c1f92b3596c" CreationDate="2011-01-31T11:36:45.750" UserId="-1" Comment="from http://stackoverflow.com/questions/4847371/should-i-use-xna-c-or-java-to-create-a-basic-game-engine" Text="" />
  <row Id="16068" PostHistoryTypeId="5" PostId="7907" RevisionGUID="3b223f32-a187-4d42-b317-65595e320434" CreationDate="2011-01-31T11:41:57.370" UserId="1386" Comment="added 110 characters in body" Text="States are not actions, in your game they would control how the character is updated (e.g. each state could have its own update() function). You could have states like:&#xD;&#xA;&#xD;&#xA; - jumping&#xD;&#xA; - running&#xD;&#xA; - in pain&#xD;&#xA; - falling&#xD;&#xA; - dead&#xD;&#xA;&#xD;&#xA;And the transition between states (the events / arrows between states) would be player inputs and reactions to the world, such as:&#xD;&#xA;&#xD;&#xA; - hit by monster&#xD;&#xA; - jump button pressed&#xD;&#xA; - shoot button pressed&#xD;&#xA;&#xD;&#xA;Each state needs to check if any relevant events have occurred. Typically this is done with if statements.&#xD;&#xA;&#xD;&#xA;&gt; But what happen when you are running&#xD;&#xA;&gt; when you take damage?&#xD;&#xA;&#xD;&#xA;The `hit by monster` event would be triggered and transition the player into the `in pain` state.&#xD;&#xA;&#xD;&#xA;&gt; or jumping taking damage and shooting&#xD;&#xA;&gt; at the same time?&#xD;&#xA;&#xD;&#xA;The player would transition into the `in pain` state again.&#xD;&#xA;&#xD;&#xA;You probably aren't going to escape if statements, but you can avoid deeply nested statements." />
  <row Id="16069" PostHistoryTypeId="2" PostId="7912" RevisionGUID="7c57c09a-fbe1-4e0a-b4fc-2fc72eabcf2f" CreationDate="2011-01-31T11:45:13.633" UserId="4129" Text="Most games centre around a 'game step' loop.  Things happen in discrete pacels of time.&#xD;&#xA;&#xD;&#xA;It is straightforward to have a queue of future events and to consume those events for each game step.&#xD;&#xA;&#xD;&#xA;[More about game time-steps on the gafferongames blog.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="16070" PostHistoryTypeId="5" PostId="7907" RevisionGUID="66c21833-3476-435e-bd76-9351504f095e" CreationDate="2011-01-31T11:47:53.053" UserId="1386" Comment="added 251 characters in body" Text="States are not actions, in your game they would control how the character is updated (e.g. each state could have its own update() function). &#xD;&#xA;&#xD;&#xA;Take a look at the diagram on this page:&#xD;&#xA;http://en.wikipedia.org/wiki/State_diagram.&#xD;&#xA;The states tell us something about the world (the door is open or closed).&#xD;&#xA;The actions show us what takes the world from one state to another.&#xD;&#xA;&#xD;&#xA;In your case you could have states like:&#xD;&#xA;&#xD;&#xA; - jumping&#xD;&#xA; - running&#xD;&#xA; - in pain&#xD;&#xA; - falling&#xD;&#xA; - dead&#xD;&#xA;&#xD;&#xA;And the transition between states (the events / arrows between states) would be player inputs and reactions to the world, such as:&#xD;&#xA;&#xD;&#xA; - hit by monster&#xD;&#xA; - jump button pressed&#xD;&#xA; - shoot button pressed&#xD;&#xA;&#xD;&#xA;Each state needs to check if any relevant events have occurred. Typically this is done with if statements.&#xD;&#xA;&#xD;&#xA;&gt; But what happen when you are running&#xD;&#xA;&gt; when you take damage?&#xD;&#xA;&#xD;&#xA;The `hit by monster` event would be triggered and transition the player into the `in pain` state.&#xD;&#xA;&#xD;&#xA;&gt; or jumping taking damage and shooting&#xD;&#xA;&gt; at the same time?&#xD;&#xA;&#xD;&#xA;The player would transition into the `in pain` state again.&#xD;&#xA;&#xD;&#xA;You probably aren't going to escape if statements, but you can avoid deeply nested statements." />
  <row Id="16071" PostHistoryTypeId="5" PostId="7907" RevisionGUID="5b9d9f58-825c-4cb7-9fe6-f1d375ce2ef2" CreationDate="2011-01-31T11:53:09.363" UserId="1386" Comment="added 94 characters in body" Text="States are not actions, in your game they would control how the character is updated (e.g. each state could have its own update() function). &#xD;&#xA;&#xD;&#xA;Take a look at the diagram on this page:&#xD;&#xA;http://en.wikipedia.org/wiki/State_diagram.&#xD;&#xA;The states tell us something about the world (the door is open or closed).&#xD;&#xA;The actions show us what takes the world from one state to another.&#xD;&#xA;&#xD;&#xA;In your case you could have states like:&#xD;&#xA;&#xD;&#xA; - jumping&#xD;&#xA; - running&#xD;&#xA; - in pain&#xD;&#xA; - falling&#xD;&#xA; - dead&#xD;&#xA;&#xD;&#xA;And the transition between states (the events / arrows between states) would be player inputs and reactions to the world, such as:&#xD;&#xA;&#xD;&#xA; - hit by monster&#xD;&#xA; - jump button pressed&#xD;&#xA; - shoot button pressed&#xD;&#xA;&#xD;&#xA;Each state needs to check if any relevant events have occurred. Typically this is done with if statements.&#xD;&#xA;&#xD;&#xA;&gt; But what happen when you are running&#xD;&#xA;&gt; when you take damage?&#xD;&#xA;&#xD;&#xA;The `hit by monster` event would be triggered and transition the player into the `in pain` state.&#xD;&#xA;&#xD;&#xA;&gt; or jumping taking damage and shooting&#xD;&#xA;&gt; at the same time?&#xD;&#xA;&#xD;&#xA;The player would transition into the `in pain` state again which is where you could display your &quot;hit&quot; sprite that shows the character falling backwards.&#xD;&#xA;&#xD;&#xA;You probably aren't going to escape if statements, but you can avoid deeply nested statements." />
  <row Id="16072" PostHistoryTypeId="5" PostId="7905" RevisionGUID="0f21926c-27de-4585-a431-f25b1adce510" CreationDate="2011-01-31T12:13:39.837" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I'm considering developing a space opera game, having already done some game design. Technically, though, I'm coming from a business applications background. Hence I don't really know how I should handle time and duration.&#xD;&#xA;&#xD;&#xA;Let's state the matter clearly: what if something is bound to happen in 5 hours and on which other events depend.&#xD;&#xA;&#xD;&#xA;For example the arrival of some space ship in some system where some defense systems are present, hence a fight would start.&#xD;&#xA;&#xD;&#xA;Should I use some kind of scheduler (like Quartz in my java land) to trigger the corresponding event when due (I plan to use events for communication)? Something else?" />
  <row Id="16073" PostHistoryTypeId="5" PostId="6557" RevisionGUID="4fc62916-f221-4f4a-8c82-f5bb419d637e" CreationDate="2011-01-31T13:53:42.707" UserId="14" Comment="added 1 characters in body" Text="Do you think it is technically possible to write a fully-fledged 3D MMO client with Browser JavaScript - WebGL for graphics, and WebSocket for Networking?&#xD;&#xA;&#xD;&#xA; - Do you think future MMOs (and games generally) will wrriten with WebGL?&#xD;&#xA; - Does today's JavaScript performance allow this?&#xD;&#xA; - Let's say your development team was you as a developer, and another model creator (artist). Would you use a library like [SceneJS][1] for the game, or write straight WebGL? If you would use a library, but not SceneJS, please specify which.  &#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: http://scenejs.org/" />
  <row Id="16074" PostHistoryTypeId="2" PostId="7913" RevisionGUID="c7801ddb-47ad-43bc-bf48-954c2e41a633" CreationDate="2011-01-31T14:12:03.543" UserId="3656" Text="Liberate yourself from the tyranny that is the Java programming language.&#xD;&#xA;&#xD;&#xA;No really--C# is like Java, but modern and useful. Since you get closures and lambdas, there's no fooling around with anonymous inner classes that exist solely for adding an actionListener. `Player.OnJump += () =&gt; beepSnd.Play();`&#xD;&#xA;&#xD;&#xA;Don't expect to make any money from XBLIG.&#xD;&#xA;&#xD;&#xA;But, XNA is great to work with. The integrated content pipeline is fantastic. It's the kind of framework that allows you to get the basics up and going relatively quickly, but leaves a lot of leeway for replacing parts of the pipeline, adding your own custom loaders, etc. And it's probably better documented than most Java libraries given that it has not only MSDN but also the whole AppHub site with examples and the blogs of all the framework developers." />
  <row Id="16075" PostHistoryTypeId="25" PostId="7905" RevisionGUID="126ed33f-5534-456d-b667-3333c83d1a41" CreationDate="2011-01-31T14:15:56.757" Comment="http://twitter.com/#!/StackGameDev/status/32079639568449536" />
  <row Id="16076" PostHistoryTypeId="2" PostId="7914" RevisionGUID="8a0c97ea-afa0-433b-88bd-062d232f73ec" CreationDate="2011-01-31T14:30:08.267" UserId="2301" Text="Just record your game time, add it to a variable, once the variable gets to a certain amount, fire your event." />
  <row Id="16077" PostHistoryTypeId="5" PostId="7899" RevisionGUID="4f86acf7-5e79-465e-9ae8-7f45a64d26e6" CreationDate="2011-01-31T14:34:34.133" UserId="3794" Comment="added info on askers request" Text="The most easy thing to handle which came to my mind is just to draw fullscreen quad with your background texture. And move UVs in x (so move only U). And set UV border method to repeat.&#xD;&#xA;&#xD;&#xA;**edit:**&#xD;&#xA;Texture coords are between 0-1. But that doesn't mean that you cannot specify any other values. UV border method says how will gpu handle value beyond 1 and under 0. You can set it to clamp, mirror, repeat. In opengl you can do it this way:  &#xD;&#xA;&#xD;&#xA;`glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);`&#xD;&#xA;&#xD;&#xA;nice article is here: &#xD;&#xA;http://www.flipcode.com/archives/Advanced_OpenGL_Texture_Mapping.shtml" />
  <row Id="16078" PostHistoryTypeId="2" PostId="7915" RevisionGUID="ed173569-99fa-4e78-8634-de4ed2e5d3e2" CreationDate="2011-01-31T14:57:31.443" UserId="4264" Text="Blender's coordinate system is different from what I'm used to, in that Z points upwards instead of Y. What would be the simplest way of converting all the world data (so that all animations, texture coordinates, etc still work) so that Y points upwards?" />
  <row Id="16079" PostHistoryTypeId="1" PostId="7915" RevisionGUID="ed173569-99fa-4e78-8634-de4ed2e5d3e2" CreationDate="2011-01-31T14:57:31.443" UserId="4264" Text="Changing coordinate system from Z-up to Y-up" />
  <row Id="16080" PostHistoryTypeId="3" PostId="7915" RevisionGUID="ed173569-99fa-4e78-8634-de4ed2e5d3e2" CreationDate="2011-01-31T14:57:31.443" UserId="4264" Text="&lt;math&gt;&lt;blender&gt;&lt;coordinates&gt;" />
  <row Id="16081" PostHistoryTypeId="2" PostId="7916" RevisionGUID="709f7b7c-5324-429d-b61b-e0141ef8b1c1" CreationDate="2011-01-31T15:10:19.593" UserId="5048" Text="I am aware of the performance hit when mixing signed ints with floats.&#xD;&#xA;Is it any worse to mix unsigned ints with floats?&#xD;&#xA;Is there any hit when mixing signed/unsigned without floats?&#xD;&#xA;&#xD;&#xA;Do the different sizes (u32, u16, u8, i32, i16, i8) have any effect on performance?&#xD;&#xA;What about on other platforms (PS2)?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16082" PostHistoryTypeId="1" PostId="7916" RevisionGUID="709f7b7c-5324-429d-b61b-e0141ef8b1c1" CreationDate="2011-01-31T15:10:19.593" UserId="5048" Text="On the PS3, what are the performance difference between unsigned and signed integers?" />
  <row Id="16083" PostHistoryTypeId="3" PostId="7916" RevisionGUID="709f7b7c-5324-429d-b61b-e0141ef8b1c1" CreationDate="2011-01-31T15:10:19.593" UserId="5048" Text="&lt;c++&gt;&lt;performance&gt;&lt;playstation3&gt;" />
  <row Id="16084" PostHistoryTypeId="5" PostId="7916" RevisionGUID="071c09bb-88ec-405b-a2fb-7b142972a21b" CreationDate="2011-01-31T15:21:18.827" UserId="1156" Comment="edited body" Text="I am aware of the performance hit when mixing signed ints with floats.&#xD;&#xA;Is it any worse to mix unsigned ints with floats?&#xD;&#xA;Is there any hit when mixing signed/unsigned without floats?&#xD;&#xA;&#xD;&#xA;Do the different sizes (u32, u16, u8, i32, i16, i8) have any effect on performance?&#xD;&#xA;What about on other platforms (PS3)?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16086" PostHistoryTypeId="5" PostId="7915" RevisionGUID="d41d0038-027d-4c66-b3bd-9121d58c98bd" CreationDate="2011-01-31T15:33:21.397" UserId="4264" Comment="added clarification; added 54 characters in body" Text="Blender's coordinate system is different from what I'm used to, in that Z points upwards instead of Y. What would be the simplest way of converting all the world data (so that all animations, texture coordinates, etc still work) so that Y points upwards?&#xD;&#xA;&#xD;&#xA;Clarification:&#xD;&#xA;&#xD;&#xA;Object positions are defined as matrices, so just switching translation/rotation/scale information in matrices is not a trivial task. (at least it does not seem like a trivial task to me)" />
  <row Id="16087" PostHistoryTypeId="2" PostId="7917" RevisionGUID="c897b997-18be-4a9c-a6f2-59f6afe76b94" CreationDate="2011-01-31T16:03:08.923" UserId="4082" Text="As Comrade Duck suggests, you can just swap Y and Z. If you need a matrix to do it, use this one:&#xD;&#xA;&#xD;&#xA;    | 1 0 0 |&#xD;&#xA;    | 0 0 1 |&#xD;&#xA;    | 0 1 0 |&#xD;&#xA;&#xD;&#xA;or in homogeneous coordinates&#xD;&#xA;&#xD;&#xA;    | 1 0 0 0 |&#xD;&#xA;    | 0 0 1 0 |&#xD;&#xA;    | 0 1 0 0 |&#xD;&#xA;    | 0 0 0 1 |&#xD;&#xA;" />
  <row Id="16088" PostHistoryTypeId="2" PostId="7918" RevisionGUID="3f2665e3-b53c-4bb0-b802-b2298f87a49e" CreationDate="2011-01-31T16:24:44.637" UserId="1430" Text="All other things being equal, I would suggest C# and XNA over Java and some roughly equivalent API for that language. However, what really matters is both the target platform, as others have said, *and your own skill as a developer*.&#xD;&#xA;&#xD;&#xA;C# and XNA are not difficult to learn, especially not for somebody who already has programming experience. But it will take you some time to familiarize yourself with new conventions and language features if/when you encounter them. The time it will take you to learn is an important consideration, especially when you have such a limited time frame (three months).&#xD;&#xA;&#xD;&#xA;If you know you pick up other languages quickly, or are confident that you could ramp up fast enough based on your limited exploration of C#/XNA so far, then definitely give XNA a shot. But in general I would probably recommend you use what you are most comfortable with -- Java -- for a project with a deadline, especially if you also know of a good game/media/et cetera API or set of APIs you can use with it. You can save learning XNA for later, when you can approach it at a more leisurely pace." />
  <row Id="16089" PostHistoryTypeId="2" PostId="7919" RevisionGUID="2f784703-573b-4411-9afd-07463de09dca" CreationDate="2011-01-31T16:24:58.957" UserId="1156" Text="If your matrix is:&#xD;&#xA;&#xD;&#xA;    x&#xD;&#xA;    y&#xD;&#xA;    z&#xD;&#xA;    w&#xD;&#xA;&#xD;&#xA;Then why not:  &#xD;&#xA;&#xD;&#xA;    temp = y&#xD;&#xA;    y = z&#xD;&#xA;    z = temp&#xD;&#xA;&#xD;&#xA;Or whatever swap method you want. " />
  <row Id="16090" PostHistoryTypeId="2" PostId="7920" RevisionGUID="fb1492f8-d045-43ea-a1fd-6de2bd10325a" CreationDate="2011-01-31T16:47:34.600" UserId="2332" Text="When you load your meshes with whatever mesh loader code you're using, just switch the Z and Y values. The mesh will then be loaded in your game in the appropriate coordinate space and you can do whatever you like to it (apply rotations, translations, etc). It's a similar situation I had with 3DS Max." />
  <row Id="16091" PostHistoryTypeId="2" PostId="7921" RevisionGUID="a866431e-3e75-4f73-855c-770200115d41" CreationDate="2011-01-31T16:48:00.180" UserId="634" Text="The large penalty from mixing ints (of any kind) and floats is because these are in different register sets. To go from one register set to the other, you have to write the value to memory and read it back, which incurs a a [load-hit-store][1] stall.&#xD;&#xA;&#xD;&#xA;Going between different sizes or signed-ness of ints keeps everything in the same register set, so you avoid the big penalty. There may be smaller penalties due to sign-extensions, etc. but these are much smaller than a load-hit-store.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://assemblyrequired.crashworks.org/2009/01/12/why-you-should-never-cast-floats-to-ints/" />
  <row Id="16092" PostHistoryTypeId="25" PostId="7916" RevisionGUID="d705ad98-0cc0-416f-80d8-bac11d9c2e4d" CreationDate="2011-01-31T17:15:57.083" Comment="http://twitter.com/#!/StackGameDev/status/32124939133784064" />
  <row Id="16093" PostHistoryTypeId="5" PostId="7916" RevisionGUID="c0ecc513-a2df-4d25-af3f-f93f3802051f" CreationDate="2011-01-31T17:25:27.737" UserId="744" Comment="Remove PS3 tag because there's nothing PS3-specific about this." Text="I am aware of the performance hit when mixing signed ints with floats.&#xD;&#xA;&#xD;&#xA;Is it any worse to mix unsigned ints with floats?&#xD;&#xA;&#xD;&#xA;Is there any hit when mixing signed/unsigned without floats?&#xD;&#xA;&#xD;&#xA;Do the different sizes (u32, u16, u8, i32, i16, i8) have any effect on performance? On which platforms?&#xD;&#xA;" />
  <row Id="16094" PostHistoryTypeId="4" PostId="7916" RevisionGUID="c0ecc513-a2df-4d25-af3f-f93f3802051f" CreationDate="2011-01-31T17:25:27.737" UserId="744" Comment="Remove PS3 tag because there's nothing PS3-specific about this." Text="What are the performance difference between unsigned and signed integers?" />
  <row Id="16095" PostHistoryTypeId="6" PostId="7916" RevisionGUID="c0ecc513-a2df-4d25-af3f-f93f3802051f" CreationDate="2011-01-31T17:25:27.737" UserId="744" Comment="Remove PS3 tag because there's nothing PS3-specific about this." Text="&lt;c++&gt;&lt;performance&gt;" />
  <row Id="16096" PostHistoryTypeId="2" PostId="7922" RevisionGUID="3fbf24dc-fb12-4ffc-88d4-42dc8071d11e" CreationDate="2011-01-31T17:44:57.143" UserId="721" Text="Operations with signed or unsigned int have the same cost on current processors (x86_64, x86, powerpc, arm). On 32bits processor, u32, u16, u8 s32, s16, s8 should be the same. You can have penalty with bad alignement.&#xD;&#xA;&#xD;&#xA;But convert int to float or float to int is a costly operation. You can easily find optimized implementation (SSE2, Neon ...)." />
  <row Id="16097" PostHistoryTypeId="2" PostId="7923" RevisionGUID="0800c10a-0551-46c1-b66b-85ec6c0dcf75" CreationDate="2011-01-31T17:52:15.943" UserId="2081" Text="As celion points out, the overhead of converting between ints and floats has largely to do with the copying and conversion of values between registers. The only overhead of unsigned ints in and of themselves comes from their guaranteed wraparound behaviour, which necessitates a certain amount of overflow checking in the compiled code.&#xD;&#xA;&#xD;&#xA;There is basically no overhead in converting between signed and unsigned integers. Different sizes of integer *may* be (infinitesimally) faster or slower to access depending on platform. Generally speaking, the size of integer that's closest to the word size of the platform will be the fastest to *access,* but the overall performance difference depends on many other factors, most notably cache size: if you use `uint64_t` when all you need is `uint32_t`, it may be that less of your data is going to fit in the cache at once, and you may incur some load overhead.&#xD;&#xA;&#xD;&#xA;It's a bit excessive to even think about this, though. If you use types that are appropriate for your data, things ought to work perfectly fine, and the amount of power to be gained by selecting types based on architecture is negligible anyway." />
  <row Id="16098" PostHistoryTypeId="2" PostId="7924" RevisionGUID="c39d4552-24c4-4d00-893b-556880334e2e" CreationDate="2011-01-31T18:09:21.783" UserDisplayName="user5052" Text="If you want an example of a format that was designed and built (probably overengineered) for being small (compressable), ridiculously secure and flexible, you should look to Blizzard's MPQ format.&#xD;&#xA;&#xD;&#xA;http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format&#xD;&#xA;&#xD;&#xA;The general archive layout is as follows:&#xD;&#xA;&#xD;&#xA;Archive Header&#xD;&#xA;File Data&#xD;&#xA;File Data - Special Files&#xD;&#xA;Hash Table&#xD;&#xA;Block Table&#xD;&#xA;Extended Block Table&#xD;&#xA;Strong Digital signature&#xD;&#xA;&#xD;&#xA;This format has EVERYTHING.&#xD;&#xA;Blocktable, extended blocktable, data split into sectors (for easy streaming), support for 7 (!) compression algorithms (if you count sound compression) that can be combined arbitrarily, weak digital signature, strong digital signature and so on.&#xD;&#xA;&#xD;&#xA;If you were to buy the API from Blizzard that deals with file architecture, you'd get everything you'd ever need and so much more." />
  <row Id="16100" PostHistoryTypeId="5" PostId="7922" RevisionGUID="7b0a31d7-3794-4b92-97a9-fc1e64089fa2" CreationDate="2011-01-31T18:57:20.943" UserId="721" Comment="added 139 characters in body" Text="Operations with signed or unsigned int have the same cost on current processors (x86_64, x86, powerpc, arm). On 32bits processor, u32, u16, u8 s32, s16, s8 should be the same. You can have penalty with bad alignement.&#xD;&#xA;&#xD;&#xA;But convert int to float or float to int is a costly operation. You can easily find optimized implementation (SSE2, Neon ...).&#xD;&#xA;&#xD;&#xA;The most important point is probably memory access. If your data doesn't fit in L1/L2 cache, you will loose more cycle than conversion." />
  <row Id="16101" PostHistoryTypeId="2" PostId="7926" RevisionGUID="a5ba7511-deff-42ee-acfe-c987a0e51721" CreationDate="2011-01-31T18:57:49.070" UserId="4410" Text="As this has recently been resurrected, your question (and therefore all answers so far) only seems to deal with the file loading, which is only as secure as the executable that wants to load it. On the PC there's nothing that's really secure (you just delay people), you can check against stuff on servers, but even that check can be removed so modded exe's can be run no matter what. The consoles are still &quot;pretty&quot; secures so in most cases there I generate a hash of important files, then sign the hash with a private key, embed the public key in the code and verify the secure hash against the file.&#xD;&#xA;&#xD;&#xA;I thought I'd throw another attack into the conversation, something I only came across last year as I don't tend to ship much on the PC. [Cheat Engine][1] is a very tidy little program that almost automates making your own hacks (which means anyone can use it). It's pretty advanced in what it can do, a lot of hacks/cheats that I've seen people sell are made by this or something very much like it from what I've seen (all the mass market ones). With some work you can protect against stuff like this again, I guess it all depends on how popular the game is and if someone cares enough to bother.&#xD;&#xA;&#xD;&#xA;Opps, forgot to mention a good lib for encryption (in C++) is [LibTomCrypt][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cheatengine.org/&#xD;&#xA;  [2]: http://www.libtom.org/?page=features&amp;newsitems=5&amp;whatfile=crypt" />
  <row Id="16102" PostHistoryTypeId="2" PostId="7927" RevisionGUID="ca52ea00-e707-4ec7-ac23-de0303eca70c" CreationDate="2011-01-31T19:33:39.163" UserId="4129" Text="In the early days of OpenGL and DirectX, it was required that textures were powers of two.  This meant that interpolation of float values could be done very quickly using shifting and such.&#xD;&#xA;&#xD;&#xA;Since OpenGL 2.0, and preceding that via an extension, non-power-of-two texture dimensions has been supported.&#xD;&#xA;&#xD;&#xA;Are there performance advantages to sticking to power-of-two textures on modern integrated and discrete GPUs?&#xD;&#xA;&#xD;&#xA;What advantages do non-power-of-two textures have, if any?&#xD;&#xA;&#xD;&#xA;Are there large populations of desktop users who don't have cards that support non-power-of-two textures?" />
  <row Id="16103" PostHistoryTypeId="1" PostId="7927" RevisionGUID="ca52ea00-e707-4ec7-ac23-de0303eca70c" CreationDate="2011-01-31T19:33:39.163" UserId="4129" Text="why would you use textures that are not a power of 2?" />
  <row Id="16104" PostHistoryTypeId="3" PostId="7927" RevisionGUID="ca52ea00-e707-4ec7-ac23-de0303eca70c" CreationDate="2011-01-31T19:33:39.163" UserId="4129" Text="&lt;opengl&gt;&lt;textures&gt;&lt;performance&gt;" />
  <row Id="16105" PostHistoryTypeId="2" PostId="7928" RevisionGUID="4e53e200-c746-4402-9032-9ae4f4d1f23e" CreationDate="2011-01-31T19:34:41.363" UserId="4327" Text="Why can't you just make the rotation matrix to orient it correctly the first part of your World matrix?" />
  <row Id="16106" PostHistoryTypeId="2" PostId="7929" RevisionGUID="3969602c-6baf-4e66-90c1-cc41bf55bdbd" CreationDate="2011-01-31T19:56:23.740" UserId="5014" Text="The reason that most systems (even many modern graphics cards) demand power-of-2 textures is mipmapping.&#xD;&#xA;&#xD;&#xA;**What is mipmapping?**&#xD;&#xA;&#xD;&#xA;Smaller versions of the image will be created in order to make the thing look correctly at a very small size. The image is divided by 2 over and over to make new images.&#xD;&#xA;&#xD;&#xA;So, imagine a 256x128 image. This would have smaller versions created of dimensions 128x64, 64x32, 32x16, 16x8, 8x4, 4x2, 2x1, and 1x1.&#xD;&#xA;&#xD;&#xA;If this image was 256x192, it would work fine until you got down to a size of 4x3. The next smaller image would be 2x1.5 which is obviously not a valid size. Some graphics hardware can deal with this, but many types cannot.&#xD;&#xA;&#xD;&#xA;Some hardware also requires a square image but this isn't very common anymore.&#xD;&#xA;&#xD;&#xA;**Why do you need mipmapping?**&#xD;&#xA;&#xD;&#xA;Imagine that you have a picture that is VERY far away, so far away as to be only the size of 4 pixels. Now, when each pixel is drawn, a position on the image will be selected as the color for that pixel. So you end up with 4 pixels that may not be at all representative of the image as a whole.&#xD;&#xA;&#xD;&#xA;Now, imagine that the picture is moving. Every time a new frame is drawn, a new pixel is selected. Because the image is SO far away, you are very likely to see very different colors for small changes in movement. This leads to very ugly flashing.&#xD;&#xA;&#xD;&#xA;Lack of mipmapping causes problems for any size that is smaller than the texture size, but it is most pronounced when the image is drawn down to a very small number of pixels.&#xD;&#xA;&#xD;&#xA;With mipmaps, the hardware will have access to 2x2 version of the texture, so each pixel on it will be the average color of that quadrant of the image. This eliminates the odd color flashing.&#xD;&#xA;&#xD;&#xA;[http://en.wikipedia.org/wiki/Mipmap][1]&#xD;&#xA;&#xD;&#xA;It's true that many modern GPUs can support non-power-of-two textures but it's also true that many cannot.&#xD;&#xA;&#xD;&#xA;I had a 1024x768 texture in an XNA app I was working on, and it caused a crash upon game load on a laptop that was only about a year old. It worked fine on most machines though. &#xD;&#xA;&#xD;&#xA;Also, when you have power of two integers, operations like addition, multiplication turn into bitwise shifts, which is much faster, even on current processors, though not that much noticeble.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mipmap" />
  <row Id="16107" PostHistoryTypeId="2" PostId="7930" RevisionGUID="1ba4bd25-6d0a-4c94-a22c-797409aa76a7" CreationDate="2011-01-31T19:58:36.240" UserId="3794" Text="There is no performance difference between power of two and non power of two textures on hardware which supports it. Texture units are handling the simple linear/bilinear/trilinear interpolations just fast. You don't need to worry about it.&#xD;&#xA;&#xD;&#xA;non-power-of-two textures have mostly advantege in freedom what texture to use. Also you can save some space by using textures in resolution which more fit to you usage. And it is absolutely great for application where user can import their own textures (which are mostly not games)." />
  <row Id="16108" PostHistoryTypeId="25" PostId="7927" RevisionGUID="a55e0820-78be-4f0a-b7fe-663a94202e23" CreationDate="2011-01-31T20:15:57.287" Comment="http://twitter.com/#!/StackGameDev/status/32170238971740160" />
  <row Id="16109" PostHistoryTypeId="2" PostId="7931" RevisionGUID="931e0325-b65e-4c8a-a56c-83e8a138ab4f" CreationDate="2011-01-31T20:16:38.987" UserId="4264" Text="There were limitations for NPOT textures on older hardware. As mentioned &lt;a href=&quot;http://www.opengl.org/wiki/NPOT_Texture&quot;&gt;on this OpenGL wiki&lt;/a&gt;, some older hardware requires NPOTs not to have mipmaps, compressed textures require alignment of 4x4 pixels, but new hardware should handle it perfectly.&#xD;&#xA;&#xD;&#xA;In my experience, some even relatively new hardware experiences major performance hit if you use NPOT textures instead of POTs. I don't know what the issue is; it's possible that in some combination of render states, the rendering is actually done in software. So, unless you have good reasons, I'd recommend still trying to use POTs as much as possible.&#xD;&#xA;&#xD;&#xA;As to why use NPOTs instead of POTs - if you have images that are of NPOT dimensions, say for example 1600x1200, using 2048x2048 pixel surface will waste a lot of video memory." />
  <row Id="16110" PostHistoryTypeId="5" PostId="7928" RevisionGUID="5c68f713-a5b4-4649-b478-13ca1203b221" CreationDate="2011-01-31T20:17:01.357" UserId="4327" Comment="added 215 characters in body" Text="Why can't you just make the rotation matrix to orient it correctly the first part of your World matrix?&#xD;&#xA;&#xD;&#xA;If you want to fix it when loading, create the rotation matrix to orient it correctly (i.e. 90 degrees around the X axis).  Apply this to all vertices, then change all existing matrices to (rotation * existing)." />
  <row Id="16111" PostHistoryTypeId="2" PostId="7932" RevisionGUID="938ba4aa-a7cc-480a-8522-4fa03134dc7c" CreationDate="2011-01-31T20:41:05.950" UserId="656" Text="Downvote me if I am wrong, but I don't see why people are recommending swapping y and z. That would make your coordinate system from being right handed to left handed. Try this yourself, swap the y and z, and reorient the axis so that x points right and y points up. You will see that z points the opposite direction from its original (away from the screen). The proper way is to rotate around the x-axis, which is swap y and z, and then invert the sign of the final z.&#xD;&#xA;&#xD;&#xA;I think the easier solution is to build your models with y value being up." />
  <row Id="16112" PostHistoryTypeId="2" PostId="7933" RevisionGUID="54667f20-5c29-4cfd-9204-ef4eb2d7f037" CreationDate="2011-01-31T21:53:40.293" UserId="744" Text="I suspect that information about the Xbox 360 and PS3 specifically are going to be behind licensed-developer-only walls, like most low-level details. However, we can construct an equivalent x86 program and disassemble it to get a general idea.&#xD;&#xA;&#xD;&#xA;First, let's see what unsigned widening costs:&#xD;&#xA;&#xD;&#xA;    unsigned char x = 1;&#xD;&#xA;    unsigned int y = 1;&#xD;&#xA;    unsigned int z;&#xD;&#xA;    z = x;&#xD;&#xA;    z = y;&#xD;&#xA;&#xD;&#xA;The relevant portion disassembles into (using GCC 4.4.5):&#xD;&#xA;&#xD;&#xA;        z = x;&#xD;&#xA;      27:   0f b6 45 ff             movzbl -0x1(%ebp),%eax&#xD;&#xA;      2b:   89 45 f4                mov    %eax,-0xc(%ebp)&#xD;&#xA;        z = y;&#xD;&#xA;      2e:   8b 45 f8                mov    -0x8(%ebp),%eax&#xD;&#xA;      31:   89 45 f4                mov    %eax,-0xc(%ebp)&#xD;&#xA;&#xD;&#xA;So basically the same - in one case we move a byte, in the other we move a word. Next:&#xD;&#xA;&#xD;&#xA;    signed char x = 1;&#xD;&#xA;    signed int y = 1;&#xD;&#xA;    signed int z;&#xD;&#xA;    z = x;&#xD;&#xA;    z = y;&#xD;&#xA;&#xD;&#xA;Turns into:&#xD;&#xA;&#xD;&#xA;       z = x;&#xD;&#xA;      11:   0f be 45 ff             movsbl -0x1(%ebp),%eax&#xD;&#xA;      15:   89 45 f4                mov    %eax,-0xc(%ebp)&#xD;&#xA;        z = y;&#xD;&#xA;      18:   8b 45 f8                mov    -0x8(%ebp),%eax&#xD;&#xA;      1b:   89 45 f4                mov    %eax,-0xc(%ebp)&#xD;&#xA;&#xD;&#xA;So the cost of the sign extension is whatever the cost of `movsbl` rather than `movzbl` is - sub-instruction level. That's basically impossible to quantify on modern processors due to the way the modern processors work. Everything else, ranging from memory speed to caching to what was in the pipeline beforehand, is going to dominate the runtime.&#xD;&#xA;&#xD;&#xA;In the ~10 minutes it took me to write these tests, I could easily have found a real performance bug, and as soon as I turn on any level of compiler optimization, the code becomes unrecognizable for such straightforward tasks.&#xD;&#xA;&#xD;&#xA;This isn't Stack Overflow, so I hope no one here will claim microoptimization doesn't matter. Games often work on data that is very large and very numeric, so careful attention to branching, casts, scheduling, structure alignment, and so on can give very critical improvements. Anyone who has spent a lot of time optimizing PPC code probably has at least one horror story about load-hit-stores. But in this case, it really doesn't matter. The storage size of your integer type doesn't affect performance, as long as it's aligned and fits in a register." />
  <row Id="16113" PostHistoryTypeId="16" PostId="7933" RevisionGUID="016996a4-92ba-41f7-8b2d-5578f6ec718c" CreationDate="2011-01-31T21:59:51.313" UserId="744" />
  <row Id="16114" PostHistoryTypeId="2" PostId="7934" RevisionGUID="cf68d4f3-ce10-4bf5-9501-d19fba3e9531" CreationDate="2011-01-31T22:23:42.793" UserId="450" Text="I guess the normal way is to have multiple state machines. This way you can stick to atomic states which often makes your live a lot easier than having to deal with complex states.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA; - Damage Mode: Normal, Invulnerable (as in just hit), invincible (as in got a star)&#xD;&#xA; - Pace: Walking Mode, Running Mode&#xD;&#xA; - Abilities: Normal, Super, Fire, Fly&#xD;&#xA; - Movement Type: Walking, Swimming, Flying&#xD;&#xA;&#xD;&#xA;In object oriented designed there is the [sate pattern][1] for this. It boils down to having one interface per state machine. And a class per possible state which implements this interface.&#xD;&#xA;&#xD;&#xA;To give an example: There would be an interface DamageMode and subclasses NormalDamageMode, InvulnerableDamageMode and InvincibleDamageMode. Whenever the player collidates with an enemy the method DamageMode.collision(enemy) is called. It is handled by the class responsible for the current state.&#xD;&#xA;&#xD;&#xA;So if damageMode == NormalDamageMode the player will be damaged and the state variable will be set to InvulnerableDamageMode. In InvulnerableDamageMode nothing happens and in InvincibleDamageMode the enemy will be damaged. Of course there needs to be timers to go back from InvulnerableDamageMode and InvincibleDamageMode to NormalDamageMode.&#xD;&#xA;&#xD;&#xA;The main advantage if the state pattern compared to if-elseif-elseif-elseif-blocks is that it put allows to structure your code better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/State_pattern" />
  <row Id="16115" PostHistoryTypeId="2" PostId="7935" RevisionGUID="9cc809e5-1208-4ee7-885d-ffd770dc8d81" CreationDate="2011-01-31T22:25:30.780" UserDisplayName="user5057" Text="  Jon Purdy says above (I can't comment) that unsigned might be slower because it can't overflow. I disagree, unsigned arithmetic is simple moular arithmetic modulo 2 to the number of bits in the word. Signed operations in principle can suffer overflows, but they are usually turned off.&#xD;&#xA;&#xD;&#xA;  Sometimes you can do clever (but not very readable things) like pack two or more data items into an int, and get multiple operations per instruction (pocket arithmetic). But you gotta understand what you are doing. Of course MMX allows you to do this naturally. But sometimes using the largest HW supported word size and manually packing the data gives you the fastest implementation.&#xD;&#xA;&#xD;&#xA;   Be careful about data alignment. On most HW implementations nonaligned loads and stores are slower. Natural alignment, means that for say a 4byte word, the address is a multiple of four, and eight byte word addresses should be multiples of eight bytes. This carries over into SSE (128bit favors 16byte alignment). AVX will soon extend these &quot;vector&quot; register sizes to 256bits then 512bits. And aligned loads/stores will be faster than unaligned ones. For HW geeks, an unaligned memory operation may span things like cacheline and even page boundaries, for which the HW has to be careful about." />
  <row Id="16116" PostHistoryTypeId="5" PostId="7905" RevisionGUID="f194851c-6727-45d2-b660-959f223cfc03" CreationDate="2011-01-31T22:32:09.413" UserId="5044" Comment="Well, use case is all about a web application with multiple nodes. A bit different from FPS games :$" Text="I'm considering developing a space opera game, having already done some game design. Technically, though, I'm coming from a business applications background. Hence I don't really know how I should handle time and duration.&#xD;&#xA;&#xD;&#xA;Let's state the matter clearly: what if something is bound to happen in 5 hours and on which other events depend.&#xD;&#xA;&#xD;&#xA;For example the arrival of some space ship in some system where some defense systems are present, hence a fight would start.&#xD;&#xA;&#xD;&#xA;Should I use some kind of scheduler (like Quartz in my java land) to trigger the corresponding event when due (I plan to use events for communication)? Something else?&#xD;&#xA;&#xD;&#xA;Edit: important side note: the aim is to do some web application, so with multiple nodes for better scalability and the like. Hence a single loop on one node wouldn't do it. Should there be a master node or are they some better known solution ? &#xD;&#xA;&#xD;&#xA;Furthermore, the loop in itself doesn't resolve this duration issue: between firing of the event on its ends, many loops happen. Does it mean every loop should check such &quot;waiting&quot; actions?" />
  <row Id="16117" PostHistoryTypeId="6" PostId="7905" RevisionGUID="f194851c-6727-45d2-b660-959f223cfc03" CreationDate="2011-01-31T22:32:09.413" UserId="5044" Comment="Well, use case is all about a web application with multiple nodes. A bit different from FPS games :$" Text="&lt;engine&gt;&lt;web&gt;&lt;game-mechanics&gt;&lt;language-agnostic&gt;&lt;strategy&gt;" />
  <row Id="16118" PostHistoryTypeId="2" PostId="7936" RevisionGUID="de9ae26d-3ade-46b1-b6a3-2724e6523e8b" CreationDate="2011-01-31T22:39:41.430" UserId="4662" Text="My programmer art is only of the correct size.&#xD;&#xA;&#xD;&#xA;It certainly simplifies my display logic to know that if I want to set a texture to the top left of the screen that I can just set 0,0 as the top left of the texture and see *all* the texture there in the correct location, whereas if I had to add 0alpha padding, positioning the texture against the edge of the screen would be more complex. Plus, of course, that 0alpha still has to be alpha blended, and if I'm looking at opaque textures, I may prefer not to have an alpha channel." />
  <row Id="16119" PostHistoryTypeId="2" PostId="7937" RevisionGUID="c64bb98e-1873-422f-afc2-359d13004e88" CreationDate="2011-01-31T23:06:42.523" UserId="659" Text="One common use of non-power-of-two textures is for 'screen-sized' or 'half-screen-sized' (and so on) render target textures used for postprocessing effects.&#xD;&#xA;&#xD;&#xA;In these cases, mipmaps aren't needed, the buffer is always uncompressed, so odd texture sizes cause less problems here" />
  <row Id="16120" PostHistoryTypeId="2" PostId="7938" RevisionGUID="4178cfb4-1642-4e28-8d32-0dcaaa308610" CreationDate="2011-01-31T23:25:59.453" UserId="4598" Text="This goes very deep actually. Strange that Wikipedia never mentions it.&#xD;&#xA;&#xD;&#xA;What you are looking for are very hard proofs that can, probably, be reached with things like [Fitch proofs][1]. So we are trying to deduct things out of our given data. There are a lot of [Fitch proof builders][2] that do a lot of work for you. But some exercises are just not to proof.&#xD;&#xA;&#xD;&#xA;I don't know if the user should do the calculations. If so, be aware of things like [3SAT][3], which are undoable problems for polynomial time.&#xD;&#xA;&#xD;&#xA;As for the data structures you want to use, I think you want to have some kind of `Rule` class. The rule can be anything, depending on the type. There aren't a lot of rules in [predicate logics][4], so this can be overcome by inheriting (if, iff, and, or, not...). These rules only have to be evaluated. And the only thing a rule can do, is return true or false. Because that is what you do with predicate logics. At university, I was recommended to read this book by [John Kelly][5].&#xD;&#xA;&#xD;&#xA;Going back to the classes: You should see these problems like you would see implementing normal calculations with math. What is a `+` operator? It contains two parameters, which can be a new equation by itself, or just a number. I think you have the same with Rules. They can have new Rules as a parameter, or just a boolean (so called predicate).&#xD;&#xA;&#xD;&#xA;I hope this helps you a lot, especially the references. If you want to know more, or if I'm going into the wrong direction, please tell me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.math.mcgill.ca/rags/JAC/124/Rules-Strategy-b.pdf&#xD;&#xA;  [2]: http://logik.phl.univie.ac.at/~chris/gateway/formular-uk-fitch.html&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Boolean_satisfiability_problem&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/First-order_logic&#xD;&#xA;  [5]: http://www.amazon.com/gp/reader/0133963756/ref=sib_dp_pt_reader-link#reader_0133963756" />
  <row Id="16121" PostHistoryTypeId="2" PostId="7939" RevisionGUID="6a925b40-095b-42c4-88b6-afdec43d83ac" CreationDate="2011-02-01T00:57:13.070" UserId="2679" Text="I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is:&#xD;&#xA;&#xD;&#xA;    x = x0 + vx0*t&#xD;&#xA;    y = y0 + vy0*t - 0.5*g*t*t&#xD;&#xA;&#xD;&#xA;where `g` is gravity, `t` is time, `x0` is the initial `x` position, `vx0` is the initial x velocity.&#xD;&#xA;&#xD;&#xA;What I would like to do is change the speed of this ball, without changing how far it travels. Let's say the ball starts in the lower left corner, moves upwards and rightwards in an arc, and finishes in the lower right corner, and this takes 5s. What I would like to be able to do is change this so it takes 10s or 20s, but the ball still follows the same curve and finishes in the same position.&#xD;&#xA;&#xD;&#xA;How can I achieve this? All I can think of is manipulating `t` but I don't think that's a good idea. I'm sure it's something simple, but my maths is pretty shaky." />
  <row Id="16122" PostHistoryTypeId="1" PostId="7939" RevisionGUID="6a925b40-095b-42c4-88b6-afdec43d83ac" CreationDate="2011-02-01T00:57:13.070" UserId="2679" Text="How to change speed without changing path travelled?" />
  <row Id="16123" PostHistoryTypeId="3" PostId="7939" RevisionGUID="6a925b40-095b-42c4-88b6-afdec43d83ac" CreationDate="2011-02-01T00:57:13.070" UserId="2679" Text="&lt;2d-physics&gt;" />
  <row Id="16125" PostHistoryTypeId="2" PostId="7941" RevisionGUID="361271e7-efb9-4783-8979-7e1401cf2617" CreationDate="2011-02-01T01:21:49.433" UserId="211" Text="Actually, you're correct -- without switching equations, the only way you have of altering speed without altering the path is to manipulate `t`.&#xD;&#xA;&#xD;&#xA;For the given `x0` and `y0`, you need to record `t0`. Then:&#xD;&#xA;&#xD;&#xA;    rate = 0.25 // run path at one-quarter speed&#xD;&#xA;&#xD;&#xA;    t' = (t - t0) * rate&#xD;&#xA;&#xD;&#xA;    x = x0 + vx0*t'&#xD;&#xA;    y = y0 + vy0*t' - 0.5*g*t'*t'&#xD;&#xA;&#xD;&#xA;Essentially what you are doing is slowing down time for the ball's path, without slowing down anything else." />
  <row Id="16127" PostHistoryTypeId="25" PostId="7939" RevisionGUID="86c4f1ec-d747-414c-b9a5-6bf88ba5616c" CreationDate="2011-02-01T02:15:57.663" Comment="http://twitter.com/#!/StackGameDev/status/32260837896880129" />
  <row Id="16128" PostHistoryTypeId="2" PostId="7942" RevisionGUID="73794e71-3863-490d-b8a6-d0cf26ba005a" CreationDate="2011-02-01T02:49:33.180" UserId="1101" Text="&gt; So the challenge is to track each user's progress toward the next level in each category. &#xD;&#xA;&#xD;&#xA;I'm not sure why is this a challenge? You can quickly and trivially calculate each of these 5 values from the contents of UserTasks, as I understand it:&#xD;&#xA;&#xD;&#xA; * You know their level, as it's already cached as an integer as part of the User.&#xD;&#xA; * This means you know how many points they need in each category, and therefore how many are needed overall.&#xD;&#xA; * So, you total up all the points they've earned from relevant tasks so far. (Which tasks are relevant? I don't know as your schema is unclear. See my second comment on the question.)&#xD;&#xA; * Then you can compare these against the total, whenever you need them.&#xD;&#xA;&#xD;&#xA;Since you have a small number of categories I would suggest just performing 5 seperate queries, one per category, clamping each value against the maximum number of points that count at this level. Add them up, compare against the total.&#xD;&#xA;&#xD;&#xA;If a task can count towards any given level (eg. you can do Task 10 at any point and collect the associated points towards your next level) then you might need a flag of some sort to show that the points for this task have been redeemed in order to go up a level. That flag allows you to exclude them from future queries.&#xD;&#xA;&#xD;&#xA;You could presumably do something sneaky like set the points column in usertasks to zero to mark it as redeemed, but that sort of thing leads to unmaintainable code so I wouldn't recommend it.&#xD;&#xA;&#xD;&#xA;So, something like: `select sum(points) from usertasks where redeemed=0 and category=1` - that's how many category 1 points you've built up. &#xD;&#xA;&#xD;&#xA;And: `select min(sum(points), 20) from usertasks where redeemed=0 and category=1` - that's how many category 1 points that contribute towards your total if you only require 20 points in category 1.&#xD;&#xA;&#xD;&#xA;If you had a separate table for 'category_level' which had a field for a current level and a field for the number of points you needed in that category at that level, I think you could do all this with one query: join usertasks to categorylevel (via category if necessary), group by category, sum up the points, and take the point cap from the categorylevel table. But that's a lot of complexity when 5 simple queries will suffice." />
  <row Id="16129" PostHistoryTypeId="5" PostId="877" RevisionGUID="574fa0d5-4357-426f-88b5-383b5a97a24e" CreationDate="2011-02-01T02:50:15.183" UserId="660" Comment="Updated broken link to point to the new location" Text="[GameDev.net][1] has a [good article recommending a progression of games][2] to incrementally learn about game development. My favorite advice from the list is to actually polish these games. Completely finish, to a releasable state.&#xD;&#xA;&#xD;&#xA;The list is as follows (some of these have been given in other answers):&#xD;&#xA;&#xD;&#xA;1. Tetris&#xD;&#xA;2. Breakout&#xD;&#xA;3. Side Scroller / Platformer&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.net&#xD;&#xA;  [2]: http://archive.gamedev.net/reference/design/features/makegames/" />
  <row Id="16130" PostHistoryTypeId="24" PostId="877" RevisionGUID="38eec0d9-9b71-4cef-aa12-ff6b950c98b6" CreationDate="2011-02-01T02:50:15.183" Comment="Proposed by 660 approved by 14 edit id of 4" />
  <row Id="16131" PostHistoryTypeId="2" PostId="7943" RevisionGUID="bf51c8df-0f62-419e-873a-0a54e94174f4" CreationDate="2011-02-01T02:55:28.427" UserId="4964" Text="From time-to-time I've wondered what kind of games are popular in Asia (India, China, Korea, Singapore, etc...). I hear about developers in the US and UK who outsource work there, but what goes into the games they make for themselves?&#xD;&#xA;&#xD;&#xA;Related, you hear these days about how Japanese developers have been marketing their games more for American audiences these days (with mixed success). In what ways could American developers aim their development toward Asian audiences?" />
  <row Id="16132" PostHistoryTypeId="1" PostId="7943" RevisionGUID="bf51c8df-0f62-419e-873a-0a54e94174f4" CreationDate="2011-02-01T02:55:28.427" UserId="4964" Text="Popular genres in Asian (non-Japanese) markets?" />
  <row Id="16133" PostHistoryTypeId="3" PostId="7943" RevisionGUID="bf51c8df-0f62-419e-873a-0a54e94174f4" CreationDate="2011-02-01T02:55:28.427" UserId="4964" Text="&lt;marketing&gt;&lt;outsourcing&gt;" />
  <row Id="16134" PostHistoryTypeId="2" PostId="7944" RevisionGUID="09cb07c6-48c9-4590-948c-c7f9382d6965" CreationDate="2011-02-01T03:04:53.640" UserId="1101" Text="What kind of web application is it?&#xD;&#xA;&#xD;&#xA;Is it one that runs all the time, as a continuous process? If so, simply do this with a standard game loop:&#xD;&#xA;&#xD;&#xA;    while app_still_running:&#xD;&#xA;        check queue of pending events&#xD;&#xA;        while the next pending event is due now:&#xD;&#xA;            execute event&#xD;&#xA;        sleep(some reasonable duration)&#xD;&#xA;        &#xD;&#xA;You may need to run this in a background thread if the rest of your app is event-driven: if so, be sure to put a lock around the whole event so that everything stays consistent.&#xD;&#xA;&#xD;&#xA;Or, is the web app one that only runs when you visit a page? (eg. like a PHP app?) If so, you can have an entry at the top of each page which checks if events are due, and if so, process them at that point before rendering the rest of the page. It's basically the same thing, except done just-in-time instead of periodically.&#xD;&#xA;&#xD;&#xA;Either way, the idea is to push events onto a queue and read them off in order. If you just have one process, this can be a queue data structure. If you have multiple processes, it's probably best to have them in a database and use a sorted query to collect them. (Though be careful to ensure multiple processes can't both read the same events.)&#xD;&#xA;&#xD;&#xA;There is probably no reason why a single loop on one node isn't good enough for your purposes. You can designate one node as the master for performing all this. Or you can store pending events in the database and just have the various nodes grabbing a handful of events via a transaction. On the whole though your scalability problems will not be at the business logic end.&#xD;&#xA;&#xD;&#xA;As far as consistency across nodes is concerned, where one node is processing an event but another is displaying or editing data relevant to that event, that's an issue for database transactions and the like. If you cache anything, you are pretty much throwing away consistency, so you have to make decisions over what can be cached, and what cannot. That starts to get outside the scope of this particular problem however." />
  <row Id="16135" PostHistoryTypeId="2" PostId="7945" RevisionGUID="989c92f4-69cb-4a9e-957c-c19451ab5683" CreationDate="2011-02-01T03:10:09.987" UserId="5063" Text="It is slightly better to use signed integers for loop indexes, because signed overflow is undefined in C, so the compiler will assume that such loops have fewer corner cases. This is controlled by gcc's &quot;-fstrict-overflow&quot; (enabled by default) and the effect is probably hard to notice without reading the assembly output.&#xD;&#xA;&#xD;&#xA;Beyond that, x86 works better if you don't mix types, because it can use memory operands. If it has to convert types (sign or zero extensions) that means an explicit load and the use of a register.&#xD;&#xA;&#xD;&#xA;Stick with int for local variables and most of this will happen by default.&#xD;&#xA;" />
  <row Id="16136" PostHistoryTypeId="2" PostId="7946" RevisionGUID="dfdadc5c-ebe1-49c8-a2ff-469b52156354" CreationDate="2011-02-01T03:25:55.927" UserId="5061" Text="Signed integer operations can be more expensive on nearly all architectures. For example, division by a constant is faster when unsigned, e.g:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a / 1024U; }&#xD;&#xA;&#xD;&#xA;is going to be optimized to:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a &gt;&gt; 10; }&#xD;&#xA;&#xD;&#xA;But...&#xD;&#xA;&#xD;&#xA;    int foo(int a) { return a / 1024; }&#xD;&#xA;&#xD;&#xA;will optimize to:&#xD;&#xA;&#xD;&#xA;    int foo(int a) {&#xD;&#xA;      if (a &gt;= 0) return a &gt;&gt; 10;&#xD;&#xA;      else return (a + 1023) &gt;&gt; 10;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Same goes for modulo. This also holds true for non-powers-of-2 (but the example is more complex). If your architecture doesn't have a hardware divide (e.g most ARM), unsigned divides of non-consts are also quicker.&#xD;&#xA;&#xD;&#xA;In general, telling the compiler that negative numbers can't result will aid optimization of expressions, especially those used for loop termination and other conditionals.&#xD;&#xA;&#xD;&#xA;As for different size ints, yes there's a slight impact but you'd have to weigh that vs moving less memory around. These days you probably gain more from accessing less memory than you lose from size expansion. You're very far into micro-optimization at that point.&#xD;&#xA;" />
  <row Id="16137" PostHistoryTypeId="25" PostId="7915" RevisionGUID="df959b98-8ffc-4872-ba77-47830aeb3c23" CreationDate="2011-02-01T05:15:56.323" Comment="http://twitter.com/#!/StackGameDev/status/32306131057516545" />
  <row Id="16138" PostHistoryTypeId="2" PostId="7947" RevisionGUID="781536ac-7d4e-4f3c-a065-ff46c39d2585" CreationDate="2011-02-01T06:17:16.930" UserId="5014" Text="&#xD;&#xA;&#xD;&#xA;First, Asian players most of all are interested in **MMOG's**. The market for them is growing rapidly, while in US it is stagnating. I provided some links in the end. While the Western RPG market is dominated by World of Warcraft, Asian MMORPGs are still booming. Worldwide, analysts expect the market to reach revenues of $8 billion in 2010, according to a Strategy Analytics [report][1] on BusinessWire. &#xD;&#xA;&#xD;&#xA;The U.S. market has been slowing, but not stopped, and Asian market growth has led to an overall global revenue increases. The market exceeded $5 billion in 2009, a 17% growth over the prior year. If the market hits the predicted $8 billion this year, companies will take it as a sign to continue pursuing free-to-play models.&#xD;&#xA;&#xD;&#xA;Highest interest goes into free games, or so called **Freemium model** s, where one can play for free, but get additional benefits by donating some money. The reason for such popularity may be the amount of piracy in Asia, where big companies just refuse to enter the market with single-player games as they are quickly pirated. The freemium model or usual subscription-based model is better suited for the market. &#xD;&#xA;&#xD;&#xA;Another big one is the **apps in social networks**, renren,com , 51.com and kaxin001.com Clones of Farmville with paid virtual items are hugely popular among casual gaming crowd. But here arises the problem of entering the market - you have to find out the details of what is popular and what is not, not even talking about language barrier here, as those networks are traditionally native-languages only. &#xD;&#xA;&#xD;&#xA;If we talk about Korea as a separate market, **Starcraft** is the main player there. There is half a dozen TV-channels streaming games 24/7 there, so you might get the perspective. For additional overview you may check [article on wikipedia][2].&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.businesswire.com/portal/site/home/permalink/?ndmViewId=news_view&amp;newsId=20100810006504&amp;newsLang=en&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Video_gaming_in_China" />
  <row Id="16139" PostHistoryTypeId="2" PostId="7948" RevisionGUID="de09045d-6843-4ea4-b720-786224054540" CreationDate="2011-02-01T06:54:24.163" UserId="5072" Text="So, alpha-beta pruning seems to be the most efficient algorithm out there aside from hard coding (for tic tac toe). However, I'm having problems converting the algorithm from the C++ example given in the link: http://www.webkinesia.com/games/gametree.php&#xD;&#xA;&#xD;&#xA;    #based off http://www.webkinesia.com/games/gametree.php&#xD;&#xA;    # (converted from C++ code from the alpha - beta pruning section)&#xD;&#xA;    # returns 0 if draw&#xD;&#xA;    LOSS = -1&#xD;&#xA;    DRAW = 0&#xD;&#xA;    WIN = 1&#xD;&#xA;    @next_move = 0&#xD;&#xA;    def calculate_ai_next_move&#xD;&#xA;        score = self.get_best_move(COMPUTER, WIN, LOSS)&#xD;&#xA;        return @next_move&#xD;&#xA;    end&#xD;&#xA;    &#xD;&#xA;    def get_best_move(player, alpha, beta)&#xD;&#xA;        best_score = nil&#xD;&#xA;        score = nil&#xD;&#xA;        if not self.has_available_moves?&#xD;&#xA;          return false&#xD;&#xA;        elsif self.has_this_player_won?(player)&#xD;&#xA;          return WIN&#xD;&#xA;        elsif self.has_this_player_won?(1 - player)&#xD;&#xA;          return LOSS&#xD;&#xA;        else&#xD;&#xA;          best_score = alpha&#xD;&#xA;          NUM_SQUARES.times do |square| &#xD;&#xA;            if best_score &gt;= beta&#xD;&#xA;              break&#xD;&#xA;            end&#xD;&#xA;            &#xD;&#xA;            if self.state[square].nil?&#xD;&#xA;              self.make_move_with_index(square, player)&#xD;&#xA;              # set to negative of opponent's best move; we only need the returned score;&#xD;&#xA;              # the returned move is irrelevant.&#xD;&#xA;              score = -get_best_move(1-player, -beta, -alpha)&#xD;&#xA;              &#xD;&#xA;              if (score &gt; bestScore)&#xD;&#xA;                @next_move = square&#xD;&#xA;                best_score = score&#xD;&#xA;              end&#xD;&#xA;              undo_move(square)&#xD;&#xA;            end&#xD;&#xA;          end&#xD;&#xA;        end&#xD;&#xA;        return best_score&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;the problem is that this is returning nil.&#xD;&#xA;&#xD;&#xA;some support methods that are used above: &#xD;&#xA;&#xD;&#xA;        WAYS_TO_WIN = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8],[0, 4, 8], [2, 4, 6]]&#xD;&#xA;    &#xD;&#xA;          &#xD;&#xA;        def has_this_player_won?(player)&#xD;&#xA;          result = false&#xD;&#xA;          WAYS_TO_WIN.each {|solution| result = self.state[solution[0]] if contains_win?(solution) }&#xD;&#xA;          return (result == player)&#xD;&#xA;        end&#xD;&#xA;        &#xD;&#xA;       def contains_win?(ttt_win_state)&#xD;&#xA;        ttt_win_state.each do |pos|&#xD;&#xA;          return false if self.state[pos] != self.state[ttt_win_state[0]] or self.state[pos].nil?&#xD;&#xA;        end&#xD;&#xA;        &#xD;&#xA;        return true&#xD;&#xA;      end&#xD;&#xA;    &#xD;&#xA;       def make_move(x, y, player)&#xD;&#xA;            self.set_square(x,y, player)&#xD;&#xA;        end" />
  <row Id="16140" PostHistoryTypeId="1" PostId="7948" RevisionGUID="de09045d-6843-4ea4-b720-786224054540" CreationDate="2011-02-01T06:54:24.163" UserId="5072" Text="Ruby: implementing alpha-beta pruning for tic-tac-toe" />
  <row Id="16141" PostHistoryTypeId="3" PostId="7948" RevisionGUID="de09045d-6843-4ea4-b720-786224054540" CreationDate="2011-02-01T06:54:24.163" UserId="5072" Text="&lt;c++&gt;&lt;algorithm&gt;&lt;ai&gt;&lt;ruby&gt;" />
  <row Id="16142" PostHistoryTypeId="2" PostId="7949" RevisionGUID="de17ecaa-420b-48b6-854f-6b1d6656393d" CreationDate="2011-02-01T06:57:20.890" UserId="3644" Text="Most of modern GPUs support non-power of two (NPOT) textures and handle them well. Performance drop is quite little. But there are few problems to consider:&#xD;&#xA;&#xD;&#xA;- When using NPOT texture it takes more space in RAM, just like next-sized POT texture. Technically you just waste the space that could be used to put something in there;&#xD;&#xA;&#xD;&#xA;- NPOT textures may be handled noticeably slower (in OpenGL 2.1 I had up to 30% performance drop) compared to POT of next size;&#xD;&#xA;&#xD;&#xA;- Older GPUs and on-board/on-chip GPUs are not so advanced, they often support NPOT textures, but support is quite slow and clumsy;&#xD;&#xA;&#xD;&#xA;- Even older GPUs may refuse to accept/display NPOT textures at all;&#xD;&#xA;&#xD;&#xA;- There could be edging artifacts caused by mip-map interpolation, your 25x25 texture might have a black fringe where pixels were added to stuff it to 32x32 size.&#xD;&#xA;&#xD;&#xA;P.S. I don't know for sure about mobile devices, there might be even more restrictions regarding POT textures." />
  <row Id="16143" PostHistoryTypeId="2" PostId="7950" RevisionGUID="abaf00bf-de4d-4ff5-9e71-b04814e1d8ab" CreationDate="2011-02-01T07:10:16.567" UserId="5073" Text="&gt;In My Application I Have One Arrow Image With Fix Center and i Can rotate it by touch move method on same center but i also need to Toss/trow the arrow after doing some rotation with dragging or without doing that &#xD;&#xA; How Can I Put The Toss/Throw Action  in MyApplication&#xD;&#xA;&#xD;&#xA; Thank You Very Much In/ advance" />
  <row Id="16144" PostHistoryTypeId="1" PostId="7950" RevisionGUID="abaf00bf-de4d-4ff5-9e71-b04814e1d8ab" CreationDate="2011-02-01T07:10:16.567" UserId="5073" Text="i want to move arrow by dragging and than want to toss/throw  when i give swipe event" />
  <row Id="16145" PostHistoryTypeId="3" PostId="7950" RevisionGUID="abaf00bf-de4d-4ff5-9e71-b04814e1d8ab" CreationDate="2011-02-01T07:10:16.567" UserId="5073" Text="&lt;iphone&gt;" />
  <row Id="16146" PostHistoryTypeId="2" PostId="7951" RevisionGUID="28a62406-4e93-4322-87ad-29c395051221" CreationDate="2011-02-01T08:06:08.070" UserId="4360" Text="Not sure about your specific application, but in general it would work like this.&#xD;&#xA;&#xD;&#xA;    float startPos = /* touchStart */;&#xD;&#xA;    float endPos = /* touchEnd */&#xD;&#xA;    float angle = atan2f(startpos.y - endpos.y, startpos.x - endpos.x);&#xD;&#xA;    float force = 10;&#xD;&#xA;&#xD;&#xA;    float velocityX = cosf(angle) * force;&#xD;&#xA;    float velocityY = sinf(angle) * force;&#xD;&#xA;&#xD;&#xA;    /** Move object every frame using velocityX / velocityY **/ " />
  <row Id="16147" PostHistoryTypeId="25" PostId="7950" RevisionGUID="79448f7d-7ab4-457e-b3e1-c179632d6b79" CreationDate="2011-02-01T08:15:56.747" Comment="http://twitter.com/#!/StackGameDev/status/32351430333431808" />
  <row Id="16148" PostHistoryTypeId="2" PostId="7952" RevisionGUID="c3aa6791-3bf7-4e08-b21c-bf6a047a11a0" CreationDate="2011-02-01T08:28:19.323" UserId="5076" Text="&gt; *Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.* &#xD;&#xA;&gt; - **Chinese Proverb**&#xD;&#xA;&#xD;&#xA;I could ask what kind of data storage I should use for my actual project, but I want to learn to _fish_, so I don't need to ask for a _fish_ each time I begin a new project.&#xD;&#xA;&#xD;&#xA;So, until I used two methods to store data on my non-game project: XML files, and relational databases. I know that there is also other kind of database, of the _NoSQL_ kind. However I wouldn't know if there is more choice available to me, or how to choose in the first place, aside arbitrary picking one.&#xD;&#xA;&#xD;&#xA;So the question is the following: How should I choose the kind of data storage for a game project?&#xD;&#xA;&#xD;&#xA;And I would be interested on the following criterion when choosing:&#xD;&#xA;  &#xD;&#xA;- The size of the project.&#xD;&#xA;- The complexity of the data structure.&#xD;&#xA;- Portability of data amongst many project.&#xD;&#xA;- Any other point you think is of interest when deciding what to use." />
  <row Id="16149" PostHistoryTypeId="1" PostId="7952" RevisionGUID="c3aa6791-3bf7-4e08-b21c-bf6a047a11a0" CreationDate="2011-02-01T08:28:19.323" UserId="5076" Text="How to choose how to store data?" />
  <row Id="16150" PostHistoryTypeId="3" PostId="7952" RevisionGUID="c3aa6791-3bf7-4e08-b21c-bf6a047a11a0" CreationDate="2011-02-01T08:28:19.323" UserId="5076" Text="&lt;databases&gt;&lt;data&gt;&lt;xml&gt;" />
  <row Id="16151" PostHistoryTypeId="5" PostId="7946" RevisionGUID="8df482b0-fae5-48dc-89ba-ef3a49dfbf93" CreationDate="2011-02-01T09:42:06.633" UserId="744" Comment="deleted 30 characters in body" Text="Signed integer operations can be more expensive on nearly all architectures. For example, division by a constant is faster when unsigned, e.g:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a / 1024U; }&#xD;&#xA;&#xD;&#xA;is going to be optimized to:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a &gt;&gt; 10; }&#xD;&#xA;&#xD;&#xA;But...&#xD;&#xA;&#xD;&#xA;    int foo(int a) { return a / 1024; }&#xD;&#xA;&#xD;&#xA;will optimize to:&#xD;&#xA;&#xD;&#xA;    int foo(int a) {&#xD;&#xA;      return (a + 1023 * (a &lt; 0)) &gt;&gt; 10;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Same goes for modulo. This also holds true for non-powers-of-2 (but the example is more complex). If your architecture doesn't have a hardware divide (e.g most ARM), unsigned divides of non-consts are also quicker.&#xD;&#xA;&#xD;&#xA;In general, telling the compiler that negative numbers can't result will aid optimization of expressions, especially those used for loop termination and other conditionals.&#xD;&#xA;&#xD;&#xA;As for different size ints, yes there's a slight impact but you'd have to weigh that vs moving less memory around. These days you probably gain more from accessing less memory than you lose from size expansion. You're very far into micro-optimization at that point.&#xD;&#xA;" />
  <row Id="16155" PostHistoryTypeId="2" PostId="7954" RevisionGUID="23c1ca6a-b8d8-4605-92aa-fe3c7372c74f" CreationDate="2011-02-01T09:54:28.140" UserId="1386" Text="You need a minimal test case that reproduces the problem - input a board that will be solved with one step of the algorithm, and follow it with a debugger, or print statements if that isn't possible.&#xD;&#xA;&#xD;&#xA;You can find out which return is actually returning the nil value  - you could insert a breakpoint on the line previous to each return statement, or add a unique print statement before each return. Then track backwards to discover where the nil was introduced.&#xD;&#xA;&#xD;&#xA;Other observations:&#xD;&#xA;&#xD;&#xA; - COMPUTER isn't defined&#xD;&#xA; - This looks more like minimax than alpha-beta&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16156" PostHistoryTypeId="5" PostId="7954" RevisionGUID="a1fd025d-3e6a-4c93-9026-c85c493bbfe6" CreationDate="2011-02-01T10:00:42.593" UserId="1386" Comment="added 194 characters in body; added 29 characters in body" Text="You need a minimal test case that reproduces the problem - input a board that will be solved with one step of the algorithm and demonstrates the problem, and follow it with a debugger, or print statements if that isn't possible.&#xD;&#xA;&#xD;&#xA;You can find out which return is actually returning the nil value  - you could insert a breakpoint on the line previous to each return statement, or add a unique print statement before each return. Then track backwards to discover where the nil was introduced.&#xD;&#xA;&#xD;&#xA;Another way would just be to step through the whole get_best_move function using a debugger and check it's doing what you expect (the code is short enough for this approach to be realistic).&#xD;&#xA;&#xD;&#xA;Other observations:&#xD;&#xA;&#xD;&#xA; - COMPUTER isn't defined&#xD;&#xA; - This looks more like minimax than alpha-beta&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16157" PostHistoryTypeId="5" PostId="7954" RevisionGUID="1f8bf9b4-438b-4813-b55a-b5a81a9955bc" CreationDate="2011-02-01T10:10:57.177" UserId="1386" Comment="deleted 29 characters in body; added 117 characters in body" Text="You need a minimal test case that reproduces the problem - input a board that will be solved with one step of the algorithm, and follow it with a debugger, or print statements if that isn't possible.&#xD;&#xA;&#xD;&#xA;You can find out which return is actually returning the nil value  - you could insert a breakpoint on the line previous to each return statement, or add a unique print statement before each return. Then track backwards to discover where the nil was introduced.&#xD;&#xA;&#xD;&#xA;Another way would just be to step through the whole get_best_move function using a debugger and check it's doing what you expect (the code is short enough for this approach to be realistic).&#xD;&#xA;&#xD;&#xA;Other observations:&#xD;&#xA;&#xD;&#xA; - COMPUTER isn't defined&#xD;&#xA; - This looks more like minimax than alpha-beta&#xD;&#xA; - It's not clear from your question if it's the calculate_ai_next_move or the get_best_move that is returning nil.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16158" PostHistoryTypeId="5" PostId="7952" RevisionGUID="4ca0f51d-6b87-4f7f-b2a4-aead32edd263" CreationDate="2011-02-01T10:12:43.527" UserId="5076" Comment="added 358 characters in body; added 38 characters in body" Text="&gt; *Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.* &#xD;&#xA;&gt; - **Chinese Proverb**&#xD;&#xA;&#xD;&#xA;I could ask what kind of data storage I should use for my actual project, but I want to learn to _fish_, so I don't need to ask for a _fish_ each time I begin a new project.&#xD;&#xA;&#xD;&#xA;So, until I used two methods to store data on my non-game project: XML files, and relational databases. I know that there is also other kind of database, of the _NoSQL_ kind. However I wouldn't know if there is more choice available to me, or how to choose in the first place, aside arbitrary picking one.&#xD;&#xA;&#xD;&#xA;So the question is the following: How should I choose the kind of data storage for a game project?&#xD;&#xA;&#xD;&#xA;And I would be interested on the following criterion when choosing:&#xD;&#xA;  &#xD;&#xA;- The size of the project.&#xD;&#xA;- The platform targeted by the game.&#xD;&#xA;- The complexity of the data structure.&#xD;&#xA;- Portability of data amongst many project.&#xD;&#xA;- Any other point you think is of interest when deciding what to use.&#xD;&#xA;&#xD;&#xA;__EDIT__ I know about [Would it be better to use XML/JSON/Text or a database to store game content?][1], but thought it didn't address exactly my point. Now if I am wrong, I would gladely be shown the error in my ways.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4666/would-it-be-better-to-use-xml-json-text-or-a-database-to-store-game-content" />
  <row Id="16160" PostHistoryTypeId="5" PostId="7952" RevisionGUID="9a0b2bf3-ed22-4c5d-9088-3e15dca196ad" CreationDate="2011-02-01T10:49:35.057" UserId="5076" Comment="Added some points" Text="&gt; *Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.* &#xD;&#xA;&gt; - **Chinese Proverb**&#xD;&#xA;&#xD;&#xA;I could ask what kind of data storage I should use for my actual project, but I want to learn to _fish_, so I don't need to ask for a _fish_ each time I begin a new project.&#xD;&#xA;&#xD;&#xA;So, until I used two methods to store data on my non-game project: XML files, and relational databases. I know that there is also other kind of database, of the _NoSQL_ kind. However I wouldn't know if there is more choice available to me, or how to choose in the first place, aside arbitrary picking one.&#xD;&#xA;&#xD;&#xA;So the question is the following: How should I choose the kind of data storage for a game project?&#xD;&#xA;&#xD;&#xA;And I would be interested on the following criterion when choosing:&#xD;&#xA;  &#xD;&#xA;- The size of the project.&#xD;&#xA;- The platform targeted by the game.&#xD;&#xA;- The complexity of the data structure.&#xD;&#xA;- *Added* Portability of data amongst many project.&#xD;&#xA;- *Added* How often should the data be accessed&#xD;&#xA;- *Added* Multiple type of data for a same application&#xD;&#xA;- Any other point you think is of interest when deciding what to use.&#xD;&#xA;&#xD;&#xA;__EDIT__ I know about [Would it be better to use XML/JSON/Text or a database to store game content?][1], but thought it didn't address exactly my point. Now if I am wrong, I would gladely be shown the error in my ways.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4666/would-it-be-better-to-use-xml-json-text-or-a-database-to-store-game-content" />
  <row Id="16161" PostHistoryTypeId="2" PostId="7955" RevisionGUID="2d0d47ec-1ee3-44c7-8ed7-b6b6e42a4ee5" CreationDate="2011-02-01T10:59:18.777" UserId="4129" Text="In the RTS gene, game data has been stored in files.&#xD;&#xA;&#xD;&#xA;The units and attributes have been stored in INI or XML files or other text-based formats, and the models have been a mix of binary or even text-based formats, and the textures and sounds and other media in mainstream formats.  Sometimes it has been in a container that has crude encryption - Westwood's mix format comes to mind.  But this is mostly obfuscation - if you look inside them, they are just normal files in easy to handle formats.&#xD;&#xA;&#xD;&#xA;With the advent of online play it has become increasingly common for the game data to be provisioned post-installation over the internet, although often this is still stored on the filesystem." />
  <row Id="16162" PostHistoryTypeId="5" PostId="7949" RevisionGUID="5662aa07-c14e-40db-986f-8cd254a35aa4" CreationDate="2011-02-01T11:07:38.210" UserId="3644" Comment="added 798 characters in body" Text="**Are there performance advantages to sticking to power-of-two textures on modern integrated and discrete GPUs?**&#xD;&#xA;&#xD;&#xA;Most of modern GPUs support non-power of two (NPOT) textures and handle them well. Performance drop is quite little. But there are few problems to consider:&#xD;&#xA;&#xD;&#xA;- When using NPOT texture it takes more space in RAM, just like next-sized POT texture. Technically you just waste the space that could be used to put something in there;&#xD;&#xA;&#xD;&#xA;- NPOT textures may be handled noticeably slower (in OpenGL 2.1 I had up to 30% performance drop) compared to POT of next size;&#xD;&#xA;&#xD;&#xA;- Older GPUs and on-board/on-chip GPUs are not so advanced, they often support NPOT textures, but support is quite slow and clumsy;&#xD;&#xA;&#xD;&#xA;- Even older GPUs may refuse to accept/display NPOT textures at all;&#xD;&#xA;&#xD;&#xA;- There could be edging artifacts caused by mip-map interpolation, your 25x25 texture might have a black fringe where pixels were added to stuff it to 32x32 size.&#xD;&#xA;&#xD;&#xA;P.S. I don't know for sure about mobile devices, there might be even more restrictions regarding POT textures.&#xD;&#xA;&#xD;&#xA;**What advantages do non-power-of-two textures have, if any?**&#xD;&#xA;&#xD;&#xA;As far as I know there are only 2 advantages:&#xD;&#xA;&#xD;&#xA; - They take less space on HDD if they are not packed (when packed empty areas give very little add)&#xD;&#xA; - You can save time on writing NPOT -&gt; POT converter. You will need one for release version, but using NPOT textures for designing and prototyping interface / models is just fine&#xD;&#xA;&#xD;&#xA;**Are there large populations of desktop users who don't have cards that support non-power-of-two textures?**&#xD;&#xA;&#xD;&#xA;As far as I know and tested on PC - Yes. That includes major percentage of speed-drop / minor bugs GPUs and minor percentage of cards that won't handle NPOT at all." />
  <row Id="16163" PostHistoryTypeId="25" PostId="7952" RevisionGUID="f71ffe0a-86e6-4c50-b568-ac05a0deb426" CreationDate="2011-02-01T11:15:57.140" Comment="http://twitter.com/#!/StackGameDev/status/32396730003628032" />
  <row Id="16164" PostHistoryTypeId="5" PostId="7946" RevisionGUID="083e99d3-8623-45e5-b879-54ba7fd383c3" CreationDate="2011-02-01T11:18:12.793" UserId="744" Comment="added 158 characters in body" Text="Signed integer operations can be more expensive on nearly all architectures. For example, division by a constant is faster when unsigned, e.g:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a / 1024U; }&#xD;&#xA;&#xD;&#xA;is going to be optimized to:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a &gt;&gt; 10; }&#xD;&#xA;&#xD;&#xA;But...&#xD;&#xA;&#xD;&#xA;    int foo(int a) { return a / 1024; }&#xD;&#xA;&#xD;&#xA;will optimize to:&#xD;&#xA;&#xD;&#xA;    int foo(int a) {&#xD;&#xA;      return (a + 1023 * (a &lt; 0)) &gt;&gt; 10;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;or on systems where branching is cheap,&#xD;&#xA;&#xD;&#xA;    int foo(int a) {&#xD;&#xA;      if (a &gt;= 0) return a &gt;&gt; 10;&#xD;&#xA;      else return (a + 1023 * (a &lt; 0)) &gt;&gt; 10;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Same goes for modulo. This also holds true for non-powers-of-2 (but the example is more complex). If your architecture doesn't have a hardware divide (e.g most ARM), unsigned divides of non-consts are also quicker.&#xD;&#xA;&#xD;&#xA;In general, telling the compiler that negative numbers can't result will aid optimization of expressions, especially those used for loop termination and other conditionals.&#xD;&#xA;&#xD;&#xA;As for different size ints, yes there's a slight impact but you'd have to weigh that vs moving less memory around. These days you probably gain more from accessing less memory than you lose from size expansion. You're very far into micro-optimization at that point.&#xD;&#xA;" />
  <row Id="16165" PostHistoryTypeId="5" PostId="7946" RevisionGUID="8b2ac5dd-4022-4e10-bd4c-fe5ae8963a99" CreationDate="2011-02-01T12:05:15.043" UserId="744" Comment="deleted 10 characters in body" Text="Signed integer operations can be more expensive on nearly all architectures. For example, division by a constant is faster when unsigned, e.g:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a / 1024U; }&#xD;&#xA;&#xD;&#xA;is going to be optimized to:&#xD;&#xA;&#xD;&#xA;    unsigned foo(unsigned a) { return a &gt;&gt; 10; }&#xD;&#xA;&#xD;&#xA;But...&#xD;&#xA;&#xD;&#xA;    int foo(int a) { return a / 1024; }&#xD;&#xA;&#xD;&#xA;will optimize to:&#xD;&#xA;&#xD;&#xA;    int foo(int a) {&#xD;&#xA;      return (a + 1023 * (a &lt; 0)) &gt;&gt; 10;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;or on systems where branching is cheap,&#xD;&#xA;&#xD;&#xA;    int foo(int a) {&#xD;&#xA;      if (a &gt;= 0) return a &gt;&gt; 10;&#xD;&#xA;      else return (a + 1023) &gt;&gt; 10;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Same goes for modulo. This also holds true for non-powers-of-2 (but the example is more complex). If your architecture doesn't have a hardware divide (e.g most ARM), unsigned divides of non-consts are also quicker.&#xD;&#xA;&#xD;&#xA;In general, telling the compiler that negative numbers can't result will aid optimization of expressions, especially those used for loop termination and other conditionals.&#xD;&#xA;&#xD;&#xA;As for different size ints, yes there's a slight impact but you'd have to weigh that vs moving less memory around. These days you probably gain more from accessing less memory than you lose from size expansion. You're very far into micro-optimization at that point.&#xD;&#xA;" />
  <row Id="16166" PostHistoryTypeId="17" PostId="7957" RevisionGUID="881d9c67-8ed2-4d43-baf3-0a7e4f3b4474" CreationDate="2011-02-01T12:20:58.140" UserId="-1" Comment="from http://stackoverflow.com/questions/4862394/does-c-have-a-future-in-games-development/4862463#4862463" Text="" />
  <row Id="16167" PostHistoryTypeId="17" PostId="7958" RevisionGUID="1074a5c7-e870-4acb-896c-5d1f2beb7a81" CreationDate="2011-02-01T12:20:58.140" UserId="-1" Comment="from http://stackoverflow.com/questions/4862394/does-c-have-a-future-in-games-development/4862482#4862482" Text="" />
  <row Id="16168" PostHistoryTypeId="17" PostId="7959" RevisionGUID="6cea27bc-aac3-48a7-8f84-75a8c86e44d3" CreationDate="2011-02-01T12:20:58.140" UserId="-1" Comment="from http://stackoverflow.com/questions/4862394/does-c-have-a-future-in-games-development/4862487#4862487" Text="" />
  <row Id="16169" PostHistoryTypeId="2" PostId="7957" RevisionGUID="ef00208a-2364-4461-b439-9308e84b8be7" CreationDate="2011-02-01T12:18:14.463" UserDisplayName="SiN" Text="You should check out [XNA][1]. A platform for building games for Windows, Xbox 360 and Windows Mobile 7. All in C# and .NET.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Microsoft_XNA" />
  <row Id="16170" PostHistoryTypeId="2" PostId="7958" RevisionGUID="dcbe45ce-6ce7-4e0f-a657-2394dcaed0da" CreationDate="2011-02-01T12:19:42.907" UserDisplayName="GoofyHTS" Text="Yes, C# has a future, with the XNA framework. Most prefer C++ because of speed, but C# is not **that** slow anymore..." />
  <row Id="16171" PostHistoryTypeId="2" PostId="7959" RevisionGUID="115b9280-3cf6-4794-a69d-452354b0b338" CreationDate="2011-02-01T12:20:10.227" UserDisplayName="berry120" Text="Java has always been a very versatile language and there's always been the ability for people to code games in it, from simple web based games (Java applets / GWT with the canvas plugin) to full 3D beasts (checkout [JMonkey][1]). So I wouldn't say the fact Java can do that sort of thing is a C# killer, because most people know Java can do that already.&#xD;&#xA;&#xD;&#xA;C# will still remain popular though since it inevitably ties in with Windows, Windows mobile and the Xbox much better than Java (which, really, is all game developers really care about targeting so the cross platform advantage that Java has is mostly lost.) It's also got XNA which has really taken off in terms of game development.&#xD;&#xA;&#xD;&#xA;So yes, Java is a perfectly good platform for games development if anyone wishes to go down that route, but it's certainly no C# or .NET killer.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jmonkeyengine.com/" />
  <row Id="16172" PostHistoryTypeId="2" PostId="7956" RevisionGUID="2e5a42d3-a55e-4636-9f1b-bceab48a2d34" CreationDate="2011-02-01T12:12:34.067" UserDisplayName="IbrarMumtaz" Text="I recently learned that the MMO Minecraft is powered by Java from a recent interview on CVG.co.uk on a possible collaboration between two former and now competing colleagues. In the interview he bluntly said that the founder of Minecraft is a Java coder and he is a C or C++ coder so they are incompatible with each other. So collaborating on future projects will be difficult. &#xD;&#xA;&#xD;&#xA;This got me thinking, If Java could do that? What does the future hold for MS very popular C# language and .Net platform as far as games or mainstream games development is concerned?" />
  <row Id="16173" PostHistoryTypeId="1" PostId="7956" RevisionGUID="2e5a42d3-a55e-4636-9f1b-bceab48a2d34" CreationDate="2011-02-01T12:12:34.067" UserDisplayName="IbrarMumtaz" Text="Does C# have a future in games development?" />
  <row Id="16174" PostHistoryTypeId="3" PostId="7956" RevisionGUID="2e5a42d3-a55e-4636-9f1b-bceab48a2d34" CreationDate="2011-02-01T12:12:34.067" UserDisplayName="IbrarMumtaz" Text="&lt;c#&gt;&lt;.net&gt;&lt;game-development&gt;" />
  <row Id="16175" PostHistoryTypeId="17" PostId="7956" RevisionGUID="f958cdd2-868e-487b-b478-c2512258ca35" CreationDate="2011-02-01T12:20:58.140" UserId="-1" Comment="from http://stackoverflow.com/questions/4862394/does-c-have-a-future-in-games-development" Text="" />
  <row Id="16176" PostHistoryTypeId="2" PostId="7960" RevisionGUID="91931d53-e634-408e-9159-66d41f87bde7" CreationDate="2011-02-01T12:23:09.593" UserId="4550" Text="Also - [MonoDroid][1] may be an option for C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.softwareassociates.in/blog/net/monodroid/" />
  <row Id="16177" PostHistoryTypeId="2" PostId="7961" RevisionGUID="214d7511-3af5-4758-9a2f-6c700c850d2a" CreationDate="2011-02-01T12:30:56.007" UserId="378" Text="There's box2dweb, which is a much newer port and has a lot fewer issues than box2djs. I highly recommend it.&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/box2dweb/" />
  <row Id="16178" PostHistoryTypeId="5" PostId="7911" RevisionGUID="ee714553-a570-4377-b4e4-c8417bdd5f72" CreationDate="2011-02-01T12:58:42.433" UserId="288" Comment="added 1736 characters in body; deleted 7 characters in body" Text="In my opinion, XNA is a superior library to what you can find in the Java world. It's complete, well implemented, well documented, and widely used. The &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/&quot;&gt;sample catalog&lt;/a&gt; in particular makes XNA an excellent choice.&#xD;&#xA;&#xD;&#xA;One **critical** piece of information you left out of your question: *Who is your target audience?* Who is going to be using your engine?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Edit: Additional discussion on the merits of making a 2D engine (from comments)  &#xD;&#xA;**Warning: Rant ahead**&#xD;&#xA;&#xD;&#xA;&gt; Would 3D not double/triple/even more increase the time taken to build this?&#xD;&#xA;&#xD;&#xA;Don't be so sure about that. A &quot;3D Engine&quot; basically means &quot;A FPS Engine&quot;. It's basically a dude walking around an environment - which you can simply base on reality. It's a known quantity. It's also well-understood and there are a lot of resources out there.&#xD;&#xA;&#xD;&#xA;On the other hand a &quot;2D Engine&quot; could mean almost anything. A platformer? a shooter? an RTS? *Tetris?* Even if I assume you mean a platformer - think of the huge variety of platformers in existance. Compare old tile-based &quot;Mario&quot;, to something physics-based like my game &quot;&lt;a href=&quot;http://andrewrussell.net/dark/&quot;&gt;Dark&lt;/a&gt;&quot;. Even if we pick two tile-based games like &quot;Mario&quot; and &quot;Super Meat Boy&quot; - think of all the differences in movement mechanics, world format, etc.&#xD;&#xA;&#xD;&#xA;As you make a 2D engine more generic to handle such differences, it very quickly becomes exponentially complicated and eventually impossible to implement. As you make it less generic, you rapidly reduce the number of games that can use it. It turns out that the sweet spot is &quot;**a single 2D game and *maybe* I'll expand on it later for a sequel**&quot;.&#xD;&#xA;&#xD;&#xA;Making a 2D *game*, where you have the freedom to hard-code pretty much everything, is relatively easy (so easy, in fact, that nobody *needs* a 2D engine). So do that. If you want it to &quot;feel&quot; like an engine, make a level editor to go with it.&#xD;&#xA;&#xD;&#xA;(I'll close by saying that I once tried to make a 2D game by implementing it as an &quot;engine&quot; first. This was a terrible plan and it wasted epic amounts before the project slowly self-destructed.)" />
  <row Id="16179" PostHistoryTypeId="5" PostId="7765" RevisionGUID="5097ad39-b4d6-4eb1-bf81-30f5d8569542" CreationDate="2011-02-01T13:01:02.587" UserId="1868" Comment="modifed question based on the feedback" Text="I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.&#xD;&#xA;&#xD;&#xA;I found out Box2D and its JS port.&#xD;&#xA;&#xD;&#xA;http://box2d-js.sourceforge.net&#xD;&#xA;&#xD;&#xA;It seems to be quite old port, made in 2008. Is it lacking many features of current Box2D? And are there any major issues with it?" />
  <row Id="16180" PostHistoryTypeId="2" PostId="7962" RevisionGUID="f6801947-e401-4cbd-808b-a64895a3aa31" CreationDate="2011-02-01T13:09:58.390" UserId="4956" Text="What he did with Java in this instance was create an applet so that you could just log on to the site and play with a very common plugin, completely transparent to which operating system was being used. I imagine his thinking was that Java was quite transparent when used this way and it would make it easy for the quick iterative development / testing he was getting fans to do. I don't believe you can just do this with XNA because usually the tester has to have everything installed as well as the game and some general knowledge about how to compile and run this.&#xD;&#xA;&#xD;&#xA;So I would say that there is no paradigm shift from this, it just suited what he needed at the time and obviously worked out well." />
  <row Id="16181" PostHistoryTypeId="2" PostId="7963" RevisionGUID="ad9b1f89-03a2-4bfc-af77-6516009be00f" CreationDate="2011-02-01T13:14:54.150" UserId="5086" Text="A project I am working on right now features a lot of &quot;traffic&quot; in the sense of cars moving along roads, aircraft moving aroun an apron etc.&#xD;&#xA;&#xD;&#xA;As of now the available paths are precalculated, so nodes are generated automatically for crossings which themselves are interconnected by edges. When a character/agent spawns into the world it starts at some node and finds a path to a target node by means of a simply A* algorithm. The agent follows the path and ultimately reaches its destination. No problem so far.&#xD;&#xA;&#xD;&#xA;Now I need to enable the agents to avoid collisions and to handle complex traffic situations. Since I'm new to the field of AI I looked up several papers/articles on steering behavior but found them to be too low-level. My problem consists less of the actual collision avoidance (which is rather simple in this case because the agents follow strictly defined paths) but of situations like one agent leaving a dead-end while another one wants to enter exactly the same one. Or two agents meeting at a bottleneck which only allows one agent to pass at a time but both need to pass it (according to the optimal route found before) and they need to find a way to let the other one pass first. So basically the main aspect of the problem would be predicting traffic movement to avoid dead-locks.&#xD;&#xA;&#xD;&#xA;Difficult to describe, but I guess you get what I mean. Do you have any recommendations for me on where to start looking? Any papers, sample projects or similar things that could get me started?&#xD;&#xA;&#xD;&#xA;I appreciate your help!" />
  <row Id="16182" PostHistoryTypeId="1" PostId="7963" RevisionGUID="ad9b1f89-03a2-4bfc-af77-6516009be00f" CreationDate="2011-02-01T13:14:54.150" UserId="5086" Text="How to build a &quot;traffic AI&quot;?" />
  <row Id="16183" PostHistoryTypeId="3" PostId="7963" RevisionGUID="ad9b1f89-03a2-4bfc-af77-6516009be00f" CreationDate="2011-02-01T13:14:54.150" UserId="5086" Text="&lt;ai&gt;&lt;movement&gt;" />
  <row Id="16184" PostHistoryTypeId="2" PostId="7964" RevisionGUID="dce97045-2f9f-441f-8211-3386ac5ba6a7" CreationDate="2011-02-01T13:37:59.277" UserId="5088" Text="Check if this is what you´re looking for:&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://developer.vbs2.com/onlinehelp/&quot; title=&quot;example&quot;&gt;Oxygen 2 Manual&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;**From the scripting section**: For those who would like to explore the possibilities available in O2 scripting, a command reference can be found at P:\docs\oxygen2 comref\comref.html." />
  <row Id="16185" PostHistoryTypeId="2" PostId="7965" RevisionGUID="40a5c95b-49c8-4073-aa6e-2532a8dbd573" CreationDate="2011-02-01T14:03:27.580" UserId="1386" Text="Not only does C# have a future in games development, it has a present -&#xD;&#xA;Check out [Magicka][1], a game recently released (and selling well) that was developed using XNA.&#xD;&#xA;Also take a look at the winning [Dream.Build.Play][2] entries. C# is a viable way to make games (although right now I don't believe it's the right choice for *all* games).&#xD;&#xA;&#xD;&#xA;As time goes by we'll see it becoming more popular in the computer gaming industry, however I don't expect a sudden shift to C# at any point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.magickagame.com/&#xD;&#xA;  [2]: http://www.dreambuildplay.com/Main/Winners.aspx" />
  <row Id="16186" PostHistoryTypeId="25" PostId="7963" RevisionGUID="32b7198d-9ace-4182-adc6-de1a24d32717" CreationDate="2011-02-01T14:15:57.517" Comment="http://twitter.com/#!/StackGameDev/status/32442030680444928" />
  <row Id="16187" PostHistoryTypeId="2" PostId="7966" RevisionGUID="93621d4f-2479-43d8-95a8-6db849e04454" CreationDate="2011-02-01T14:48:56.393" UserId="138" Text="As has been mentioned, [Mono][1] brings C# to multiple platforms. In that same area, you'll find [Tao][2], a multiplatform library for Mono and .NET that allows access to Cg, DevIL, FreeGLUT, GLFW, GLU, ODE, OpenAl, OpenGL, PhysicsFS, SDL, and WGL. It's obviously not as robust when it comes to features as XNA (which provides fundamental engine components directly to the developer); but, it's plenty powerful.&#xD;&#xA;&#xD;&#xA;So, cross platform beyond Microsoft controlled OS's and hardware is definitely possible. Just, not as many popular indie games have utilized this ability, yet.&#xD;&#xA;&#xD;&#xA;As has also been mentioned, XNA coupled with C# allows independent developers to publish to the 360, PC, and Windows Phone 7.&#xD;&#xA;&#xD;&#xA;Overall, C# is alive and well in game development as an engine/game language.&#xD;&#xA;&#xD;&#xA;As a tools language, it's in use everywhere. I've built tools for EA, THQ, and now Arkadium all using C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Main_Page&#xD;&#xA;  [2]: http://www.mono-project.com/Tao" />
  <row Id="16188" PostHistoryTypeId="2" PostId="7967" RevisionGUID="98cb666c-81b4-4257-84bf-97ad065c91f3" CreationDate="2011-02-01T14:53:35.873" UserId="2711" Text="I'm new on graphical programming, and I'm having some trouble understanding the Ocean Shader described on &quot;[Effective Water Simulation from Physical Models][1]&quot; from GPU Gems. The source code associated to this article is [here][2].&#xD;&#xA;&#xD;&#xA;My problem has been to understand the concept of texture waves. First of all, what is achieved by texture waves? I'm having a hard time trying to figure out it's usefulness.&#xD;&#xA;&#xD;&#xA;In the section 1.2.4 of the article, it does say that the waves summed into the texture have the same parametrization as the waves used for vertex positioning. Does it mean that I can't use the texture provided by the source code if I change the parameters of the waves, or add more waves to sum?&#xD;&#xA;&#xD;&#xA;And in the section 1.4.1, is said that we can assume that there is no rotation between texture space and world space if the texture coordinates for our normal map are implicit.&#xD;&#xA;What does mean that the &quot;normal map are implicit'? And why do I need a rotation between texture and world spaces if the normal map are not implicit?&#xD;&#xA;&#xD;&#xA;I would be very grateful for any help on this.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html&#xD;&#xA;  [2]: http://developer.download.nvidia.com/shaderlibrary/packages/Ocean.zip" />
  <row Id="16189" PostHistoryTypeId="1" PostId="7967" RevisionGUID="98cb666c-81b4-4257-84bf-97ad065c91f3" CreationDate="2011-02-01T14:53:35.873" UserId="2711" Text="Doubt about texture waves in CG Ocean Shader" />
  <row Id="16190" PostHistoryTypeId="3" PostId="7967" RevisionGUID="98cb666c-81b4-4257-84bf-97ad065c91f3" CreationDate="2011-02-01T14:53:35.873" UserId="2711" Text="&lt;textures&gt;&lt;shaders&gt;&lt;cg&gt;" />
  <row Id="16191" PostHistoryTypeId="5" PostId="7967" RevisionGUID="bf532722-1132-4313-a365-255d3f893d88" CreationDate="2011-02-01T14:58:26.150" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I'm new on graphical programming, and I'm having some trouble understanding the Ocean Shader described on &quot;[Effective Water Simulation from Physical Models][1]&quot; from GPU Gems. The source code associated to this article is [here][2].&#xD;&#xA;&#xD;&#xA;My problem has been to understand the concept of texture waves. First of all, what is achieved by texture waves? I'm having a hard time trying to figure out it's usefulness.&#xD;&#xA;&#xD;&#xA;In the section 1.2.4 of the article, it does say that the waves summed into the texture have the same parametrization as the waves used for vertex positioning. Does it mean that I can't use the texture provided by the source code if I change the parameters of the waves, or add more waves to sum?&#xD;&#xA;&#xD;&#xA;And in the section 1.4.1, is said that we can assume that there is no rotation between texture space and world space if the texture coordinates for our normal map are implicit.&#xD;&#xA;What does mean that the &quot;normal map are implicit'? And why do I need a rotation between texture and world spaces if the normal map are not implicit?&#xD;&#xA;&#xD;&#xA;I would be very grateful for any help on this.&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html&#xD;&#xA;  [2]: http://developer.download.nvidia.com/shaderlibrary/packages/Ocean.zip" />
  <row Id="16192" PostHistoryTypeId="2" PostId="7968" RevisionGUID="0bdd3ea8-56e5-49cc-9bef-abc1dbfbefe6" CreationDate="2011-02-01T15:13:20.133" UserId="5089" Text="I think what you need to do is implement a path finding algorithm. &#xD;&#xA;&#xD;&#xA;Break up your map into as small of pieces as you can (say squares) but only for valid places for traffic to travel. You would then determine where the vehicle is and where it is going and find a path, shortest or most direct perhaps. The path will be a array of squares, each step of the way to the destimation. What you would then want is to calculate not only the current position of all vehicles but the future positions of vehicles for a couple of steps in the future. If two vehicles are going to be in the same square in the future then you need to change the velocity of one or both of them.&#xD;&#xA;&#xD;&#xA;A* (A star) is a very simple path finding algorithm that you can probably just easily translate the psuedo code in wikipedia into your language of choice and it will work:&#xD;&#xA;[http://en.wikipedia.org/wiki/A*_search_algorithm][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A*_search_algorithm" />
  <row Id="16193" PostHistoryTypeId="2" PostId="7969" RevisionGUID="3e01790e-917f-404a-9137-2603419a126a" CreationDate="2011-02-01T14:37:13.593" UserDisplayName="Artemix" Text="So, long story short, some days ago I pusblished an iPhone game, I think the game wasnt that bad tbh, and still I got only 10 sells at $0.99.&#xD;&#xA;&#xD;&#xA;Are they any publishers, sponsors, or distributors to make your game &quot;visible&quot; on the app store market?, or the only thing you need is to have an amazing game and thats all?&#xD;&#xA;&#xD;&#xA;Somehow I think that even if you have an awesome game if you dont do that &quot;marketing magic&quot; correctly you will not exist in the store.&#xD;&#xA;&#xD;&#xA;Now Im making a second game, completly different, and I want to know how to do things right.&#xD;&#xA;&#xD;&#xA;If anyone knows something about this topic, let me know.&#xD;&#xA;&#xD;&#xA;Thx in advance." />
  <row Id="16194" PostHistoryTypeId="1" PostId="7969" RevisionGUID="3e01790e-917f-404a-9137-2603419a126a" CreationDate="2011-02-01T14:37:13.593" UserDisplayName="Artemix" Text="Selling your iphone games." />
  <row Id="16195" PostHistoryTypeId="3" PostId="7969" RevisionGUID="3e01790e-917f-404a-9137-2603419a126a" CreationDate="2011-02-01T14:37:13.593" UserDisplayName="Artemix" Text="&lt;iphone&gt;&lt;apple&gt;&lt;games&gt;&lt;publishing&gt;&lt;appstore&gt;" />
  <row Id="16196" PostHistoryTypeId="17" PostId="7969" RevisionGUID="2a001936-dac6-4f44-b2c5-3b9e00aab674" CreationDate="2011-02-01T15:16:42.767" UserId="-1" Comment="from http://superuser.com/questions/240387/selling-your-iphone-games" Text="" />
  <row Id="16197" PostHistoryTypeId="6" PostId="7969" RevisionGUID="9328cf30-4977-401c-bebd-66ad2dea6a85" CreationDate="2011-02-01T15:26:07.040" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;marketing&gt;&lt;publishing&gt;" />
  <row Id="16198" PostHistoryTypeId="2" PostId="7970" RevisionGUID="df701b86-166b-440f-8f59-2c727226f562" CreationDate="2011-02-01T15:28:04.587" UserId="884" Text="There are a number of iPhone publishers who will submit your app for you under their name, for a percentage of your profits. One that comes to mind is [Chillingo][1] (their other company, Clickgamer, published Angry Birds). If you look around, you'll most likely find one that fits your needs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chillingo.com/" />
  <row Id="16199" PostHistoryTypeId="2" PostId="7971" RevisionGUID="18753f19-877b-45f0-a252-483113471d4a" CreationDate="2011-02-01T15:31:01.210" UserId="20" Text="Matt Rix has shared some [insight about his game Trainyard][1] in his blog. I think the article shows some really interesting facts about sales and how they are related to decisions the developer made.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://struct.ca/2010/the-story-so-far/" />
  <row Id="16200" PostHistoryTypeId="5" PostId="7970" RevisionGUID="a65c014c-3241-4e75-8b48-cb9fee725d70" CreationDate="2011-02-01T15:34:55.543" UserId="884" Comment="added 470 characters in body" Text="There are a number of iPhone publishers who will submit your app for you under their name, for a percentage of your profits. One that comes to mind is [Chillingo][1] (their other company, Clickgamer, published Angry Birds). If you look around, you'll most likely find one that fits your needs.&#xD;&#xA;&#xD;&#xA;There are also companies who promote your app, but I don't know much about them. [Appular][2] (according to their website) is one of the promoters for Doodle Jump.&#xD;&#xA;&#xD;&#xA;One other thing you should do (that isn't linked to publishers or advertisers) is make a thread about your game on the major iPhone Gaming forums, like [TouchArcade][3]. Chances are, someone will find your game who wouldn't have otherwise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chillingo.com/&#xD;&#xA;  [2]: http://appular.com/&#xD;&#xA;  [3]: http://toucharcade.com/" />
  <row Id="16201" PostHistoryTypeId="2" PostId="7972" RevisionGUID="547acd28-a346-4807-baf7-8946ce097c65" CreationDate="2011-02-01T15:45:37.210" UserId="4951" Text="My recommendation is to look at the Python code for [Constraint Satisfaction Problems][1] (CSPs) provided with the [AIMA project][2]. They use a Dictionary (associative array/hash table) to keep track of valid constraints. Also, there are implementations of several algorithms used to solve CSPs, like min-conflicts and AC3. &#xD;&#xA;&#xD;&#xA;The code includes a sample Zebra problem as an example, like the one you linked to.&#xD;&#xA;&#xD;&#xA;  [1]: https://aima-python.googlecode.com/svn/trunk/csp.py&#xD;&#xA;  [2]: https://code.google.com/p/aima-python/" />
  <row Id="16202" PostHistoryTypeId="5" PostId="7969" RevisionGUID="85e049e4-e6c6-466e-834b-941f2809a6a3" CreationDate="2011-02-01T16:03:48.850" UserId="744" Comment="deleted 22 characters in body; edited title" Text="So, long story short, some days ago I published an iPhone game, I think the game wasn't that bad tbh, and still I got only 10 sells at $0.99.&#xD;&#xA;&#xD;&#xA;Are they any publishers, sponsors, or distributors to make your game &quot;visible&quot; on the app store market?, or the only thing you need is to have an amazing game and that's all?&#xD;&#xA;&#xD;&#xA;Somehow I think that even if you have an awesome game if you don't do that &quot;marketing magic&quot; correctly you will not exist in the store.&#xD;&#xA;&#xD;&#xA;Now I'm making a second game, completely different, and I want to know how to do things right.&#xD;&#xA;&#xD;&#xA;If anyone knows something about this topic, let me know." />
  <row Id="16203" PostHistoryTypeId="4" PostId="7969" RevisionGUID="85e049e4-e6c6-466e-834b-941f2809a6a3" CreationDate="2011-02-01T16:03:48.850" UserId="744" Comment="deleted 22 characters in body; edited title" Text="What are effective marketing strategies for iPhone games?" />
  <row Id="16204" PostHistoryTypeId="2" PostId="7973" RevisionGUID="e872bdc0-406b-4368-87cf-d64cf75cbbc7" CreationDate="2011-02-01T16:22:40.897" UserId="2332" Text="I'm not too experienced with traffic simulations, but a few things spring to mind.&#xD;&#xA;&#xD;&#xA;Firstly, to prevent bottlenecks in the first place I would have two lanes that allow the vehicles to travel in opposite directions. on the same &quot;road&quot;.&#xD;&#xA;&#xD;&#xA;Secondly, for collisions that may occur, you *should* have a collision avoidance steering behaviour to prevent a massive pile up. Steering behaviours may be low level, but they're very useful in creating realistic looking emergent behaviour.&#xD;&#xA;&#xD;&#xA;If you don't want to have more than one lane you're going to have to store more information in the graph. For example, if agent A is on a road (represented as a graph edge) and agent B is on the same road moving in the opposite direction to A then they *will* collide/deadlock/whatever you've coded to deal with this behaviour.&#xD;&#xA;&#xD;&#xA;However, if agent A is on a road, it could request ownership of that road. Owning the road would mean that no other agent can travel along that edge (you could do this quite simply by changing the edge cost to a massive number to make sure A* doesn't choose the road when calculating a path). Then when agent A is free of that road it relinquishes ownership.&#xD;&#xA;&#xD;&#xA;Honestly, it's a hacky solution that I'm not particularly fond of and most traffic simulations (if not all?) that I've seen use a multi-lane approach." />
  <row Id="16205" PostHistoryTypeId="2" PostId="7974" RevisionGUID="2f462fac-4887-4b2a-9350-54f5e0099944" CreationDate="2011-02-01T16:33:22.503" UserId="5094" Text="I've successfully implemented A* pathfinding in C# but it is very slow, and I don't understand why. I even tried not sorting the openNodes list but it's still the same.&#xD;&#xA;&#xD;&#xA;The map is 80x80, and there are 10-11 nodes.&#xD;&#xA;&#xD;&#xA;I took the pseudocode from here [Wikipedia][1]&#xD;&#xA;&#xD;&#xA;And this is my implementation:&#xD;&#xA;&#xD;&#xA;     public static List&lt;PGNode&gt; Pathfind(PGMap mMap, PGNode mStart, PGNode mEnd)&#xD;&#xA;        {&#xD;&#xA;            mMap.ClearNodes();&#xD;&#xA;&#xD;&#xA;            mMap.GetTile(mStart.X, mStart.Y).Value = 0;&#xD;&#xA;            mMap.GetTile(mEnd.X, mEnd.Y).Value = 0;&#xD;&#xA;&#xD;&#xA;            List&lt;PGNode&gt; openNodes = new List&lt;PGNode&gt;();&#xD;&#xA;            List&lt;PGNode&gt; closedNodes = new List&lt;PGNode&gt;();&#xD;&#xA;            List&lt;PGNode&gt; solutionNodes = new List&lt;PGNode&gt;();&#xD;&#xA;&#xD;&#xA;            mStart.G = 0;&#xD;&#xA;            mStart.H = GetManhattanHeuristic(mStart, mEnd);&#xD;&#xA;&#xD;&#xA;            solutionNodes.Add(mStart);&#xD;&#xA;            solutionNodes.Add(mEnd);&#xD;&#xA;&#xD;&#xA;            openNodes.Add(mStart); // 1) Add the starting square (or node) to the open list.&#xD;&#xA;&#xD;&#xA;            while (openNodes.Count &gt; 0) // 2) Repeat the following:&#xD;&#xA;            {&#xD;&#xA;                openNodes.Sort((p1, p2) =&gt; p1.F.CompareTo(p2.F));&#xD;&#xA;&#xD;&#xA;                PGNode current = openNodes[0]; // a) We refer to this as the current square.)&#xD;&#xA;&#xD;&#xA;                if (current == mEnd)&#xD;&#xA;                {&#xD;&#xA;                    while (current != null)&#xD;&#xA;                    {&#xD;&#xA;                        solutionNodes.Add(current);&#xD;&#xA;                        current = current.Parent;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    return solutionNodes;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                openNodes.Remove(current);&#xD;&#xA;                closedNodes.Add(current); // b) Switch it to the closed list.&#xD;&#xA;&#xD;&#xA;                List&lt;PGNode&gt; neighborNodes = current.GetNeighborNodes();&#xD;&#xA;                double cost = 0;&#xD;&#xA;                bool isCostBetter = false;&#xD;&#xA;&#xD;&#xA;                for (int i = 0; i &lt; neighborNodes.Count; i++)&#xD;&#xA;                {&#xD;&#xA;                    PGNode neighbor = neighborNodes[i];&#xD;&#xA;                    cost = current.G + 10;&#xD;&#xA;                    isCostBetter = false;&#xD;&#xA;&#xD;&#xA;                    if (neighbor.Passable == false || closedNodes.Contains(neighbor))&#xD;&#xA;                        continue; // If it is not walkable or if it is on the closed list, ignore it.&#xD;&#xA;&#xD;&#xA;                    if (openNodes.Contains(neighbor) == false)&#xD;&#xA;                    {&#xD;&#xA;                        openNodes.Add(neighbor); // If it isn’t on the open list, add it to the open list.&#xD;&#xA;                        isCostBetter = true;&#xD;&#xA;                    }&#xD;&#xA;                    else if (cost &lt; neighbor.G)&#xD;&#xA;                    {&#xD;&#xA;                        isCostBetter = true;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    if (isCostBetter)&#xD;&#xA;                    {&#xD;&#xA;                        neighbor.Parent = current; //  Make the current square the parent of this square. &#xD;&#xA;                        neighbor.G = cost;&#xD;&#xA;                        neighbor.H = GetManhattanHeuristic(current, neighbor);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            return null;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's the heuristic I'm using:&#xD;&#xA;&#xD;&#xA;        private static double GetManhattanHeuristic(PGNode mStart, PGNode mEnd)&#xD;&#xA;        {&#xD;&#xA;            return Math.Abs(mStart.X - mEnd.X) + Math.Abs(mStart.Y - mEnd.Y);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong? It's an entire day I keep looking at the same code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode" />
  <row Id="16206" PostHistoryTypeId="1" PostId="7974" RevisionGUID="2f462fac-4887-4b2a-9350-54f5e0099944" CreationDate="2011-02-01T16:33:22.503" UserId="5094" Text="Wikipedia A* pathfinding algorithm takes a lot of time" />
  <row Id="16207" PostHistoryTypeId="3" PostId="7974" RevisionGUID="2f462fac-4887-4b2a-9350-54f5e0099944" CreationDate="2011-02-01T16:33:22.503" UserId="5094" Text="&lt;c#&gt;&lt;path-finding&gt;&lt;optimization&gt;&lt;.net&gt;" />
  <row Id="16208" PostHistoryTypeId="2" PostId="7975" RevisionGUID="fdac3be8-9584-4aef-b2ef-afae4aa66c6e" CreationDate="2011-02-01T16:44:24.697" UserId="1430" Text="The point of the waves generated in a texture is to use them as normal maps, allowing the appearance of more detail to the waves than would be possible without spending a lot of actual geometry on the water surface.&#xD;&#xA;&#xD;&#xA;It's been a while since I did much actual graphics work, but I believe the point regarding the wave parameterization is just mentioned as a convenience -- if you change the vertex wave parameterization you can still use the original to generate the waves in the texture. It won't break the effect, although too much divergence might produce an undesired result. You should try experimenting. &#xD;&#xA;&#xD;&#xA;Earlier in the article the author explains that &quot;implicit&quot; texture coordinates are, in this case, referring to texture coordinates that are derived from the vertex position and not passed along explicitly by the CPU side of the pipeline. The implicit texture coordinates are computed by scaling the vertex position so that the vertex position within the water plane is transformed to a [0,1] texture coordinate range, that's all." />
  <row Id="16209" PostHistoryTypeId="2" PostId="7976" RevisionGUID="2fc90ab4-0f3c-4ebe-9130-3afc941bdce4" CreationDate="2011-02-01T16:48:17.027" UserId="4129" Text="http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html&#xD;&#xA;&#xD;&#xA; * At one extreme, if h(n) is 0, then only g(n) plays a role, and A* turns into Dijkstra’s algorithm, which is guaranteed to find a shortest path.&#xD;&#xA; * If h(n) is always lower than (or equal to) the cost of moving from n to the goal, then A* is guaranteed to find a shortest path. The lower h(n) is, the more node A* expands, making it slower.&#xD;&#xA; * If h(n) is exactly equal to the cost of moving from n to the goal, then A* will only follow the best path and never expand anything else, making it very fast. Although you can’t make this happen in all cases, you can make it exact in some special cases. It’s nice to know that given perfect information, A* will behave perfectly.&#xD;&#xA; * If h(n) is sometimes greater than the cost of moving from n to the goal, then A* is not guaranteed to find a shortest path, but it can run faster.&#xD;&#xA; * At the other extreme, if h(n) is very high relative to g(n), then only h(n) plays a role, and A* turns into Best-First-Search.&#xD;&#xA;&#xD;&#xA;You are using 'manhatten distance'.  This is almost always a bad heuristic.  Additionally, from looking at that info from the linked page, you can guess that your heuristic is lower than the true cost." />
  <row Id="16210" PostHistoryTypeId="2" PostId="7977" RevisionGUID="392dbf43-dafb-40b5-a05d-18fd65f52227" CreationDate="2011-02-01T16:53:46.070" UserId="4708" Text="Check out Unity 3D; C# (and JavaScript, and Boo) scripting in a high-performance 3D engine.&#xD;&#xA;&#xD;&#xA;Add XNA to the mix and you're looking at a couple of great platforms for using C# for game development.&#xD;&#xA;" />
  <row Id="16211" PostHistoryTypeId="2" PostId="7978" RevisionGUID="40a32913-8b40-4ce2-9030-9017771a129d" CreationDate="2011-02-01T16:54:13.743" UserId="284" Text="Lately I've found myself constrained by the rigidness/difficulty of adding to relational databases.  I'd love to explore document-based databases (e.g. couchdb), as they seem very suitable for games, state, and flexibility.  But it's not really practical to set up multiple database types for a small project.  As a result, I've set up a hack similar to just using a binary blob field in certain fields of the database.&#xD;&#xA;&#xD;&#xA;What I'm doing is using json encoded data in the database and a wrapper that converts the data into json and back out whenever it's needed.&#xD;&#xA;So a basic character profile might look like this in the database:&#xD;&#xA;&#xD;&#xA;`{&quot;char_id&quot;:24,&quot;char_name&quot;:&quot;tchalvak&quot;,&quot;level&quot;:43,&quot;profile&quot;:&quot;Some profile here.&quot;}`&#xD;&#xA;&#xD;&#xA;Json is still nicely readable in the database so if you're working bare to the metal with the sql and sometimes access the database directly as well, it's manually modifiable if you wish to.&#xD;&#xA;&#xD;&#xA;So here's the overall point:  Don't tie yourself down.  Use a relational database and fudge the system.  Or use two different types of systems (e.g. flat file and relational database?), so that you can get the most benefit from both.  No matter what people suggest, and what one system you go with, down the line you're going to find circumstances where another approach would work better, so be prepared to have an alternative as well." />
  <row Id="16212" PostHistoryTypeId="5" PostId="7978" RevisionGUID="604fef6f-aa90-4a81-9a19-b7305c86263e" CreationDate="2011-02-01T17:00:02.393" UserId="284" Comment="added 100 characters in body" Text="Lately I've found myself constrained by the rigidness/difficulty of adding to relational databases.  I'd love to explore document-based databases (e.g. couchdb), as they seem very suitable for games, state, and flexibility.  But it's not really practical to set up multiple database types for a small project.  As a result, I've set up a hack similar to just using a binary blob field in certain fields of the database.&#xD;&#xA;&#xD;&#xA;What I'm doing is using json encoded data in the database and a wrapper that converts the data into json and back out whenever it's needed.&#xD;&#xA;So a basic character profile might look like this in the database:&#xD;&#xA;&#xD;&#xA;`{&quot;char_id&quot;:24,&quot;char_name&quot;:&quot;tchalvak&quot;,&quot;level&quot;:43,&quot;profile&quot;:&quot;Some profile here.&quot;}`&#xD;&#xA;&#xD;&#xA;Json is still nicely readable in the database so if you're working bare to the metal with the sql and sometimes access the database directly as well, it's manually modifiable if you wish to.&#xD;&#xA;&#xD;&#xA;Now, all of that is a hack, and I don't advise copying it, but here's the overall point:  **Don't rely only on one system.**  Use a relational database and fudge the system.  Or use two different types of data storage systems (e.g. flat file and relational database?), so that you can get the most benefit from both.  No matter what people suggest, or what one system you go with, down the line you're going to find circumstances where another approach would work better, so be prepared to add an alternative and see where it takes you." />
  <row Id="16213" PostHistoryTypeId="2" PostId="7979" RevisionGUID="3ecb9e2e-976f-497f-a2e8-09d37a6dea1f" CreationDate="2011-02-01T17:04:32.777" UserId="3872" Text="I have some standard convex shapes (cubes, capsules) on a voxel terrain.  It is very easy to detect single vertex collisions.  However, it becomes computationally expensive when many vertices are involved.&#xD;&#xA;&#xD;&#xA;To clarify, currently my algorithm represents a cube as multiple vertices covering every face of the cube, not just the corners.  This is because the cubes can be much bigger than the voxels, so multiple sample points (vertices) are required (the distance between sample points must be at least the width of a voxel).  This very rapidly becomes intractable.&#xD;&#xA;&#xD;&#xA;It would be great if there were some standard algorithm(s) for collision detection between convex shapes and arbitrary voxel based terrain (like there is with OBB's and seperating axis theorem etc).&#xD;&#xA;&#xD;&#xA;Any help much appreciated." />
  <row Id="16214" PostHistoryTypeId="1" PostId="7979" RevisionGUID="3ecb9e2e-976f-497f-a2e8-09d37a6dea1f" CreationDate="2011-02-01T17:04:32.777" UserId="3872" Text="Collision detection of convex shapes on voxel terrain" />
  <row Id="16215" PostHistoryTypeId="3" PostId="7979" RevisionGUID="3ecb9e2e-976f-497f-a2e8-09d37a6dea1f" CreationDate="2011-02-01T17:04:32.777" UserId="3872" Text="&lt;3d&gt;&lt;collision-detection&gt;&lt;algorithm&gt;&lt;voxels&gt;" />
  <row Id="16216" PostHistoryTypeId="2" PostId="7980" RevisionGUID="b45b1eb0-4171-4659-b954-45eaef74e8f8" CreationDate="2011-02-01T17:24:47.297" UserId="1199" Text="I'm working on a breakout clone, and I wish to create some realistic physics effects for collision - angles on the paddle should allow the ball to bounce, as well as doing curve balls etc. I could use per-pixel based collision detection, but then I thought it might be easier with line/circle intersection testing.&#xD;&#xA;&#xD;&#xA;So, then I naturally consider making a polygon class for the line-based objects and use the built-in circle class for the circular objects. That sounds like an OK approach, right? And then just check for collision using the specified algorithm based on the objects that might be within each other's range?" />
  <row Id="16217" PostHistoryTypeId="1" PostId="7980" RevisionGUID="b45b1eb0-4171-4659-b954-45eaef74e8f8" CreationDate="2011-02-01T17:24:47.297" UserId="1199" Text="Breakout clone, how to handle/design for collision detection/physics between objects?" />
  <row Id="16218" PostHistoryTypeId="3" PostId="7980" RevisionGUID="b45b1eb0-4171-4659-b954-45eaef74e8f8" CreationDate="2011-02-01T17:24:47.297" UserId="1199" Text="&lt;physics&gt;&lt;collision-detection&gt;&lt;algorithm&gt;&lt;polygon&gt;" />
  <row Id="16219" PostHistoryTypeId="2" PostId="7981" RevisionGUID="22a97031-b8ee-42b1-baaa-e8f019810b6e" CreationDate="2011-02-01T17:33:57.017" UserId="1430" Text="That seems like a good approach, you can utilize the [separating axis theorem][1] to perform your collision detection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="16220" PostHistoryTypeId="2" PostId="7982" RevisionGUID="59d162c4-94c2-4262-8617-14ec858c3ec4" CreationDate="2011-02-01T17:35:00.633" UserId="953" Text="If you don't already, you should have a (mobile-friendly!) website for you and your game, and you should send polite promotional e-mails to sites that do reviews and news about iPhone games.  Make sure you include promo codes so that the reviewers on the sites can play your game for free." />
  <row Id="16221" PostHistoryTypeId="2" PostId="7983" RevisionGUID="a73177f4-95a6-49aa-9ae6-53733dea964d" CreationDate="2011-02-01T18:03:25.683" UserDisplayName="user5097" Text="&#xD;&#xA;&#xD;&#xA;I'm trying out modifications to the following particle system. http://create.msdn.com/en-US/education/catalog/sample/particle_3d&#xD;&#xA;&#xD;&#xA;I have a function such that when I press Space, all the particles have their positions and velocities set to 0.&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; particles.GetLength(0); i++)  &#xD;&#xA;    {  &#xD;&#xA;        particles[i].Position = Vector3.Zero;      &#xD;&#xA;        particles[i].Velocity = Vector3.Zero;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However, when I press space, the particles are still moving. If I go to FireParticleSystem.cs I can turn settings.Gravity to 0 and the particles stop moving, but the particles are still not being shifted to (0,0,0).&#xD;&#xA;&#xD;&#xA;As I understand it, the problem lies in the fact that the GPU is processing all the particle positions, and it's calculating where the particles should be based on their initial position, their initial velocity and multiplying by their age. Therefore, all I've been able to do is change the initial position and velocity of particles, but I'm unable to do it on the fly since the GPU is handling everything.&#xD;&#xA;&#xD;&#xA;I want the CPU to calculate the positions of the particles individually. This is because I will be later implementing some sort of wind to push the particles around. How do I stop the GPU from taking over? I think it's something to do with VertexBuffers and the draw function, but I don't know how to modify it to make it work.&#xD;&#xA;" />
  <row Id="16222" PostHistoryTypeId="1" PostId="7983" RevisionGUID="a73177f4-95a6-49aa-9ae6-53733dea964d" CreationDate="2011-02-01T18:03:25.683" UserDisplayName="user5097" Text="Drawing particles with CPU instead of GPU (XNA)" />
  <row Id="16223" PostHistoryTypeId="3" PostId="7983" RevisionGUID="a73177f4-95a6-49aa-9ae6-53733dea964d" CreationDate="2011-02-01T18:03:25.683" UserDisplayName="user5097" Text="&lt;xna-4.0&gt;" />
  <row Id="16224" PostHistoryTypeId="2" PostId="7984" RevisionGUID="084046de-d15c-4015-9d34-a3a7ccf97e69" CreationDate="2011-02-01T18:11:10.170" UserId="1430" Text="The particle system you are using as a base is explicitly designed to perform all its animation on the GPU. To disable that, you need to use a different design.&#xD;&#xA;&#xD;&#xA;You can modify the baseline you have to remove all position update/animation code from the vertex shader (see `ComputeParticlePosition`) and move that to your application. You'll have to employ dynamic vertex buffers -- locking the buffer each frame, copying the position out of the particle system data structure and in to the buffer (although with the rest of the particle's vertex attributes), and then unlocking the buffer. You may want to remove/modify the rest of the `ComputeParticleWhatever` methods in the shader, since any modifications they make to the particle system will clobber any updates you do on the CPU.&#xD;&#xA;&#xD;&#xA;Then you'll have complete CPU-side control over the particle attributes, at the cost of decreased performance due to the additional cost of updating the vertex buffer each frame -- this the bottleneck that the sample describes avoiding in the description:&#xD;&#xA;&#xD;&#xA;&gt; When displaying large numbers of&#xD;&#xA;&gt; particles, games can easily become&#xD;&#xA;&gt; bottlenecked by the amount of CPU work&#xD;&#xA;&gt; involved in updating everything and&#xD;&#xA;&gt; transferring the latest particle&#xD;&#xA;&gt; positions across to the GPU for&#xD;&#xA;&gt; drawing. This sample avoids that by&#xD;&#xA;&gt; animating particles entirely on the&#xD;&#xA;&gt; GPU, so the CPU overhead remains low&#xD;&#xA;&gt; regardless of how many particles are&#xD;&#xA;&gt; active. Moving eye candy to the GPU&#xD;&#xA;&gt; leaves the CPU free for other things&#xD;&#xA;&gt; such as gameplay, physics, or AI.&#xD;&#xA;&#xD;&#xA;So you should be aware that you are eliminating this optimization by moving per-frame update back to the GPU. Note that, depending on the complexity of your &quot;wind&quot; function, you could probably instead push that computation to the GPU as well, which would give you the finer control you are after as well as obviate the need to update a vertex buffer every frame." />
  <row Id="16226" PostHistoryTypeId="6" PostId="7983" RevisionGUID="aa1e3aa8-c9a3-4f04-bd7d-3fdef4d93b3a" CreationDate="2011-02-01T18:15:42.473" UserId="1430" Comment="edited tags" Text="&lt;xna&gt;" />
  <row Id="16227" PostHistoryTypeId="5" PostId="7934" RevisionGUID="97f2958d-1980-4ca6-9fd9-4e5cf75d920b" CreationDate="2011-02-01T18:19:18.427" UserId="450" Comment="deleted 4 characters in body" Text="I guess the normal way is to have multiple state machines. This way you can stick to atomic states which often makes your live a lot easier than having to deal with complex states.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA; - Damage Mode: Normal, Invulnerable (as in just hit), invincible (as in got a star)&#xD;&#xA; - Pace: Walking Mode, Running Mode&#xD;&#xA; - Abilities: Normal, Super, Fire, Fly&#xD;&#xA; - Movement Type: Walking, Swimming, Flying&#xD;&#xA;&#xD;&#xA;In object oriented designed there is the [sate pattern][1] for this. It boils down to having one interface per state machine. And a class per possible state which implements this interface.&#xD;&#xA;&#xD;&#xA;To give an example: There would be an interface DamageMode and subclasses NormalDamageMode, InvulnerableDamageMode and InvincibleDamageMode. Whenever the player collidates with an enemy the method DamageMode.collision(enemy) is called. It is handled by the class responsible for the current state.&#xD;&#xA;&#xD;&#xA;So if damageMode == NormalDamageMode the player will be damaged and the state variable will be set to InvulnerableDamageMode. In InvulnerableDamageMode nothing happens and in InvincibleDamageMode the enemy will be damaged. Of course there needs to be timers to go back from InvulnerableDamageMode and InvincibleDamageMode to NormalDamageMode.&#xD;&#xA;&#xD;&#xA;The main advantage of the state pattern compared to if-elseif-elseif-elseif-blocks is that it allows to structure your code better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/State_pattern" />
  <row Id="16228" PostHistoryTypeId="2" PostId="7985" RevisionGUID="779ccb16-2c2c-4262-9038-534a451c4c76" CreationDate="2011-02-01T18:23:59.763" UserId="4665" Text="It seems to me that bounding box techniques still apply - even though you might consider your cubes &quot;supersampled&quot;.  I would approach the problem in a hierarchical manner:  you should know the maximal extents of the cube (even though a number of points might exist &quot;between&quot; those points) - so consider those maximal vertices as the cube's bounding box.  &#xD;&#xA;&#xD;&#xA;Assuming you have some sort of BB structure defined for the landscape, your can then use BB intersection techniques as a high-level hit-test.  From there, you can &quot;dive down&quot; into the cube in order to determine precisely which vertices intersected.&#xD;&#xA;" />
  <row Id="16229" PostHistoryTypeId="2" PostId="7986" RevisionGUID="09b2fefd-96cf-4a1a-9d92-b5bfca129959" CreationDate="2011-02-01T18:31:18.303" UserId="1419" Text="In my engine I perform collision detection/physics against the extracted surface mesh, rather than the underlying voxel data. This avoids the type of problem you describe - the physics engine doesn't know there are voxels involved at all and perfroms standard mesh to mesh calculations.&#xD;&#xA;&#xD;&#xA;Of course, I can appriciate that using the voxel data has certain advantages (and it's something I would like to research in the future) but I found my current approach quite satisfactory. You can see a video of it in action and/or download a demo from my website: http://www.thermite3d.org" />
  <row Id="16230" PostHistoryTypeId="2" PostId="7987" RevisionGUID="84b80df3-ee17-4093-b69e-c1a5626f0864" CreationDate="2011-02-01T18:49:10.537" UserId="5098" Text="&#xD;&#xA;Your Cost and your Heuristic need to have a relationship.  It should be a clue that H is calculated in two different spots but never accessed." />
  <row Id="16231" PostHistoryTypeId="5" PostId="7948" RevisionGUID="c39c9ddd-86d2-4c5d-8556-3a8bfdb63bb7" CreationDate="2011-02-01T19:44:05.370" UserId="5072" Comment="deleted 374 characters in body; added 73 characters in body" Text="So, alpha-beta pruning seems to be the most efficient algorithm out there aside from hard coding (for tic tac toe). However, I'm having problems converting the algorithm from the C++ example given in the link: http://www.webkinesia.com/games/gametree.php&#xD;&#xA;&#xD;&#xA;Players are either 1 or 0, so doing 1 - player will switch the player&#xD;&#xA;&#xD;&#xA;      WIN = 1&#xD;&#xA;        LOSS = -1&#xD;&#xA;        DRAW = 0&#xD;&#xA;        INFINITY = 100&#xD;&#xA;        def calculate_ai_next_move&#xD;&#xA;            best_move = -1&#xD;&#xA;            best_score = -INFINITY&#xD;&#xA;            &#xD;&#xA;            cur_player = COMPUTER&#xD;&#xA;            self.remaining_moves.each do |move|&#xD;&#xA;              self.make_move_with_index(move, cur_player)&#xD;&#xA;              score = -self.alphabeta(-INFINITY,INFINITY, 1 - cur_player)&#xD;&#xA;              self.undo_move(move)&#xD;&#xA;              &#xD;&#xA;              if score &gt; best_score&#xD;&#xA;                best_score = score&#xD;&#xA;                best_move = move&#xD;&#xA;              end&#xD;&#xA;            end&#xD;&#xA;           &#xD;&#xA;            return best_move&#xD;&#xA;        end&#xD;&#xA;        &#xD;&#xA;        def alphabeta(alpha, beta, player)&#xD;&#xA;          best_score = -INFINITY&#xD;&#xA;          if not self.has_available_moves?&#xD;&#xA;            return WIN if self.has_this_player_won?(player) == player&#xD;&#xA;            return LOSS if self.has_this_player_won?(1 - player) == 1 - player&#xD;&#xA;          else&#xD;&#xA;            self.remaining_moves.each do |move|&#xD;&#xA;              break if alpha &gt; beta&#xD;&#xA;              &#xD;&#xA;              self.make_move_with_index(move, player)&#xD;&#xA;              move_score = -alphabeta(-alpha, -beta, 1 - player)&#xD;&#xA;              self.undo_move(move)&#xD;&#xA;              &#xD;&#xA;              if move_score &gt; alpha&#xD;&#xA;                alpha = move_score&#xD;&#xA;                next_move = move&#xD;&#xA;              end&#xD;&#xA;              best_score = alpha&#xD;&#xA;            end&#xD;&#xA;          end&#xD;&#xA;          return best_score&#xD;&#xA;        end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;currently, the algorithm is playing terribly. It will initially pick the last space, and then choose the first (from left to right) available space after that.  &#xD;&#xA;&#xD;&#xA;Any idea with whats wrong with it?&#xD;&#xA;&#xD;&#xA;Also, I've been doing TDD, so I know that self.has_this_player_won?, self.undo_move and self.remaining_moves is correct." />
  <row Id="16232" PostHistoryTypeId="2" PostId="7988" RevisionGUID="7f2cffdd-15f5-4097-a261-efd964a925ab" CreationDate="2011-02-01T19:47:34.577" UserId="5099" Text="I want to develop a simple game like: [http://www.albinoblacksheep.com/games/falldown2][1]&#xD;&#xA;And then making it a bit more fancy. But I don't know where to start. I have already started AS3 so I know about the syntax and stuff, but I am kinda lost. Does anyone knows of a nice starting point or a tutorial that can help me with this?&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;  [1]: http://www.albinoblacksheep.com/games/falldown2" />
  <row Id="16233" PostHistoryTypeId="1" PostId="7988" RevisionGUID="7f2cffdd-15f5-4097-a261-efd964a925ab" CreationDate="2011-02-01T19:47:34.577" UserId="5099" Text="Starting point for a simple game written in action script" />
  <row Id="16234" PostHistoryTypeId="3" PostId="7988" RevisionGUID="7f2cffdd-15f5-4097-a261-efd964a925ab" CreationDate="2011-02-01T19:47:34.577" UserId="5099" Text="&lt;game-design&gt;&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="16235" PostHistoryTypeId="10" PostId="7988" RevisionGUID="1885bc48-1d1f-4f6a-a3ae-7a48624e8a13" CreationDate="2011-02-01T19:49:42.937" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="16236" PostHistoryTypeId="5" PostId="7988" RevisionGUID="beb0a4cf-28ba-40c1-9190-b4d3f9208c6f" CreationDate="2011-02-01T19:49:43.017" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [AS3/Flash Game Dev:  Looking for good &amp;amp; current step by step.](http://gamedev.stackexchange.com/questions/4592/as3-flash-game-dev-looking-for-good-current-step-by-step)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hi,&#xD;&#xA;I want to develop a simple game like: [http://www.albinoblacksheep.com/games/falldown2][1]&#xD;&#xA;And then making it a bit more fancy. But I don't know where to start. I have already started AS3 so I know about the syntax and stuff, but I am kinda lost. Does anyone knows of a nice starting point or a tutorial that can help me with this?&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;  [1]: http://www.albinoblacksheep.com/games/falldown2" />
  <row Id="16237" PostHistoryTypeId="2" PostId="7989" RevisionGUID="93545c4e-0603-44d3-8511-ae8bc01b5588" CreationDate="2011-02-01T20:03:38.470" UserId="744" Text="It is not clear what you are comparing when you compare the F of different nodes. Is F a property defined as G + H? It should be. (Side-rant: This is an example of why the uniform access principle is crap.)&#xD;&#xA;&#xD;&#xA;More important though, you are re-sorting the nodes every frame. A* calls for the use of a &lt;a href=&quot;http://en.wikipedia.org/wiki/Priority_queue&quot;&gt;priority queue&lt;/a&gt;, which allows efficient - O(lg n) - sorted insertion of a single element, and a set, which allows quick checks for closed nodes. As you have written the algorithm, you have O(n lg n) insertion + sort, which raises the run-time to useless proportions.&#xD;&#xA;&#xD;&#xA;(You might get O(n) insertion + sort if C# has a good sorting algorithm. It's still too much. Use a real priority queue.)" />
  <row Id="16238" PostHistoryTypeId="2" PostId="7990" RevisionGUID="5309cee4-a6d5-4831-89e5-dc04b48b5776" CreationDate="2011-02-01T20:13:14.050" UserId="4082" Text="I see three things, one wrong, two suspicious.&#xD;&#xA;&#xD;&#xA;1) You're sorting on every iteration. Don't. Either use a priority queue, or at the very least do a linear search to find the minimum. You don't actually need the whole list to be sorted at all times!&#xD;&#xA;&#xD;&#xA;2) openNodes.Contains() is probably slow (not sure about the specifics of C#'s List, but I bet it does a linear search). You can add a flag to each node and do this in O(1).&#xD;&#xA;&#xD;&#xA;3) GetNeighborNodes() could be slow.&#xD;&#xA;" />
  <row Id="16239" PostHistoryTypeId="6" PostId="7956" RevisionGUID="323c52e0-e4ca-4354-b729-cb6aed6d520b" CreationDate="2011-02-01T20:15:04.137" UserId="284" Comment="edited tags" Text="&lt;c#&gt;&lt;programming&gt;&lt;.net&gt;" />
  <row Id="16240" PostHistoryTypeId="25" PostId="7980" RevisionGUID="0facd9b2-d8c6-4ca7-aee0-d8357be54ec4" CreationDate="2011-02-01T20:15:58.057" Comment="http://twitter.com/#!/StackGameDev/status/32532629739802624" />
  <row Id="16241" PostHistoryTypeId="6" PostId="7906" RevisionGUID="7f7b2dbc-e49a-4af7-8b69-8b15f69c68e5" CreationDate="2011-02-01T20:16:05.867" UserId="284" Comment="edited tags" Text="&lt;programming&gt;&lt;actions&gt;&lt;state&gt;&lt;fsm&gt;" />
  <row Id="16242" PostHistoryTypeId="2" PostId="7991" RevisionGUID="6ae84ca0-446c-4e05-81a7-fec5090cdb44" CreationDate="2011-02-01T21:23:25.967" UserId="5020" Text="In addition to the point already made that you should use a priority heap, you've misunderstood the heuristic. You have &lt;pre&gt;if (isCostBetter)&#xD;&#xA;{&#xD;&#xA;    ...&#xD;&#xA;    neighbor.H = GetManhattanHeuristic(current, neighbor);&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;But the heuristic is supposed to be an estimate for the distance to the destination. You should set it once, when you first add the neighbour: &lt;pre&gt;if (openNodes.Contains(neighbor) == false)&#xD;&#xA;{&#xD;&#xA;    neighbor.H = GetHeuristic(neighbor, mEnd);&#xD;&#xA;    ...&#xD;&#xA;}&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;And as a further minor point, you could simplify the A* by filtering out impassable nodes in `GetNeighbourNodes()`." />
  <row Id="16243" PostHistoryTypeId="2" PostId="7992" RevisionGUID="8ed3a38b-75b8-40de-8662-97c768900e51" CreationDate="2011-02-01T21:43:45.360" UserId="3794" Text="Your problem will solve rendering with 1bit alpha. Which means you specify some alpha of source texture which is not rendered (mostly 0.5).&#xD;&#xA;&#xD;&#xA;You have to write your own shader for saving depth from light and use instruction `discard`. Discard exists in hlsl, glsl and in cg as well. It exists only in pixel/fragment shader and discards curent fragment from the rendering into backBuffer and into z-buffer. &#xD;&#xA;&#xD;&#xA;    if (texSample.a &lt; 0.5)&#xD;&#xA;       discard;&#xD;&#xA;&#xD;&#xA;Advantage is that you don't need to change yours light rendering, only rendering of light's depth. And it works: &#xD;&#xA;![1bit alpha][1]&#xD;&#xA;&#xD;&#xA;If you want to render correct shadows for multiple transparent objects you will have to use multiple depth textures, with depth and opacity information rendered using depth peeling. And for smoke, hair etc. Deep opacity or Fourier opacity maps are best solution (I mostly recommend Fourier opacity maps)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wWOut.png" />
  <row Id="16244" PostHistoryTypeId="2" PostId="7993" RevisionGUID="757200c1-1cc3-4117-a9be-95c35a01e3e7" CreationDate="2011-02-01T21:53:20.877" UserId="659" Text="So I wanted to switch to IDirect3DDevice9Ex, purely for the SetFrameLatency function, as fullscreen vsynced D3D seemed to produce noticable input lag.&#xD;&#xA;&#xD;&#xA;But then it tells me 'ha ha ha! now you can't use D3DPOOL_MANAGED!':&#xD;&#xA;&#xD;&#xA;Direct3D9: (ERROR) :D3DPOOL_MANAGED is not valid with IDirect3DDevice9Ex&#xD;&#xA;&#xD;&#xA;Is this really as unpleasant as it looks (when you're relying quite heavily on managed resources) - or is there a simple solution?&#xD;&#xA;&#xD;&#xA;If it really does mean manual management of everything (reloading all static textures, VBs, and IBs on a device reset), is it worth the hassle, will IDirect3DDevice9Ex bring enough benefit to make it worth writing a new resource manager?&#xD;&#xA;" />
  <row Id="16245" PostHistoryTypeId="1" PostId="7993" RevisionGUID="757200c1-1cc3-4117-a9be-95c35a01e3e7" CreationDate="2011-02-01T21:53:20.877" UserId="659" Text="IDirect3DDevice9Ex and D3DPOOL_MANAGED?" />
  <row Id="16246" PostHistoryTypeId="3" PostId="7993" RevisionGUID="757200c1-1cc3-4117-a9be-95c35a01e3e7" CreationDate="2011-02-01T21:53:20.877" UserId="659" Text="&lt;directx&gt;&lt;rendering&gt;&lt;input&gt;" />
  <row Id="16247" PostHistoryTypeId="5" PostId="7993" RevisionGUID="8452c81c-7e58-44d4-b359-113383a6baac" CreationDate="2011-02-01T22:04:57.230" UserId="659" Comment="added 338 characters in body" Text="So I wanted to switch to IDirect3DDevice9Ex, purely for the SetFrameLatency function, as fullscreen vsynced D3D seemed to produce noticable input lag.&#xD;&#xA;&#xD;&#xA;But then it tells me 'ha ha ha! now you can't use D3DPOOL_MANAGED!':&#xD;&#xA;&#xD;&#xA;Direct3D9: (ERROR) :D3DPOOL_MANAGED is not valid with IDirect3DDevice9Ex&#xD;&#xA;&#xD;&#xA;Is this really as unpleasant as it looks (when you're relying quite heavily on managed resources) - or is there a simple solution?&#xD;&#xA;&#xD;&#xA;If it really does mean manual management of everything (reloading all static textures, VBs, and IBs on a device reset), is it worth the hassle, will IDirect3DDevice9Ex bring enough benefit to make it worth writing a new resource manager?&#xD;&#xA;&#xD;&#xA;Starting to think I must be doing something wrong, due to this:&#xD;&#xA;&#xD;&#xA;Direct3D9: (ERROR) :Lock is not supported for textures allocated with POOL_DEFAULT unless they are marked D3DUSAGE_DYNAMIC.&#xD;&#xA;&#xD;&#xA;So if I put my (static) textures in POOL_DEFAULT, they need flagging as D3DUSAGE_DYNAMIC, just because I lock them once to load the data in?&#xD;&#xA;" />
  <row Id="16248" PostHistoryTypeId="2" PostId="7994" RevisionGUID="e2ef1e64-3492-4e0e-8360-a41d40b0c513" CreationDate="2011-02-01T22:12:51.177" UserId="1430" Text="There is no simple solution I am aware of, you'll have to transition your resources to another pool type. I haven't ever really noticed the input latency issues you're describing, so I would venture to guess that they might be caused by a bug elsewhere in your code. Can you verify that it's a D3D-related issue (maybe it's a driver/card problem?) Or at least provide a more in-depth description of the problem?&#xD;&#xA;&#xD;&#xA;My hunch is that it's not worth the effort to transition to D3D9Ex just for that method." />
  <row Id="16249" PostHistoryTypeId="6" PostId="7974" RevisionGUID="12294100-374c-455f-ab19-8809e2307f8f" CreationDate="2011-02-01T23:47:29.560" UserId="4191" Comment="edited tags" Text="&lt;c#&gt;&lt;path-finding&gt;&lt;optimization&gt;&lt;.net&gt;" />
  <row Id="16250" PostHistoryTypeId="6" PostId="6755" RevisionGUID="d9d4e51a-cd05-4458-9fae-62ba5458394d" CreationDate="2011-02-01T23:49:35.207" UserId="4191" Comment="edited tags" Text="&lt;path-finding&gt;" />
  <row Id="16251" PostHistoryTypeId="6" PostId="15" RevisionGUID="169cb9a8-be8a-46c8-a743-e028e7e8bfbb" CreationDate="2011-02-01T23:50:01.680" UserId="4191" Comment="edited tags" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;computer-science&gt;" />
  <row Id="16252" PostHistoryTypeId="6" PostId="7648" RevisionGUID="29c3aff5-2c9e-4b1e-8518-bdce959c6ec0" CreationDate="2011-02-01T23:50:41.757" UserId="4191" Comment="edited tags" Text="&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="16253" PostHistoryTypeId="6" PostId="7956" RevisionGUID="f19b1ee5-69b7-4781-8430-7f811eaf2b67" CreationDate="2011-02-01T23:52:26.547" UserId="4191" Comment="edited tags" Text="&lt;c#&gt;&lt;programming&gt;&lt;game-industry&gt;&lt;.net&gt;" />
  <row Id="16254" PostHistoryTypeId="2" PostId="7995" RevisionGUID="053af6cf-8b83-4e26-815f-08a936e326f5" CreationDate="2011-02-02T01:21:32.927" UserId="5001" Text="I am trying to apply a slight sine wave movement to objects that float around the screen to make them a little more interesting. I would like to apply this to the objects so that they oscillate from side to side, not front to back (so the oscillation does not affect their forward velocity).&#xD;&#xA;&#xD;&#xA;After reading various threads and tutorials, I have come to the conclusion that I need to create and add vectors, but I simply cannot come up with a solution that works.&#xD;&#xA;&#xD;&#xA;This is where I'm at right now, in the object's update method:&#xD;&#xA;&#xD;&#xA;            //angleInDegrees is set to random(0,360) in the constructor&#xD;&#xA;            radians = (Math.PI / 180) * angleInDegrees;&#xD;&#xA;&#xD;&#xA;            //spritePos x/y and velocity are set randomly in constructor&#xD;&#xA;            spritePos.X += velocity * (float)Math.Cos(radians);&#xD;&#xA;            spritePos.Y += velocity * (float)Math.Sin(radians);&#xD;&#xA;&#xD;&#xA;            sinePosAng += 0.1f; //increase the sine angle&#xD;&#xA;            sinePos.X += 0.5f * (float)Math.Sin(sinePosAng);&#xD;&#xA;&#xD;&#xA;            sinePos = Vector2.Transform(sinePos, Matrix.CreateRotationZ((float)radians));&#xD;&#xA;            spritePos += sinePos;&#xD;&#xA;&#xD;&#xA;The resulting output is that the objects have a slightly random circular &quot;wobble&quot; around their center, seemingly based on their current direction.&#xD;&#xA;&#xD;&#xA;Am I using the Vector2.Transform method correctly? This is coded in C# with the XNA 4.0 framework. Thanks for any help!" />
  <row Id="16255" PostHistoryTypeId="1" PostId="7995" RevisionGUID="053af6cf-8b83-4e26-815f-08a936e326f5" CreationDate="2011-02-02T01:21:32.927" UserId="5001" Text="Adding 2D vector movement with rotation applied" />
  <row Id="16256" PostHistoryTypeId="3" PostId="7995" RevisionGUID="053af6cf-8b83-4e26-815f-08a936e326f5" CreationDate="2011-02-02T01:21:32.927" UserId="5001" Text="&lt;xna&gt;&lt;c#&gt;&lt;vector&gt;" />
  <row Id="16257" PostHistoryTypeId="2" PostId="7996" RevisionGUID="4cf4f35d-815b-43c6-9cbc-4472b1b976b6" CreationDate="2011-02-02T01:48:10.080" UserId="1430" Text="EDIT: Oh wait, I see what you're trying to do now. I'll tweak my answer to account for that shortly.&#xD;&#xA;&#xD;&#xA;You only want the object to move up and down slightly, so you only need to update the sprite's Y position, and you can do that by adding the result of `Math.Sin(angle)` to the Y component of the position. You may want to scale the result of `Math.Sin`, since by default it will be from -1 to 1 and might be too small to notice, depending on your coordinate system. Try something like this:&#xD;&#xA;&#xD;&#xA;    const float scale = 2.0f;&#xD;&#xA;    float offset = scale * (float)Math.Sin(sinePosAng);&#xD;&#xA;&#xD;&#xA;    radians = (Math.PI / 180) * angleInDegrees;&#xD;&#xA;    spritePos.X += velocity * (float)Math.Cos(radians);&#xD;&#xA;    spritePos.Y += velocity * (float)Math.Sin(radians);&#xD;&#xA;&#xD;&#xA;    spritePos.X += velocity.X;&#xD;&#xA;    spritePos.Y += velocity.Y + offset;&#xD;&#xA;&#xD;&#xA;    sinePosAng += 0.1f;&#xD;&#xA;&#xD;&#xA;(I assume, in the above, that &quot;radians&quot; is actually representing the direction of the object, otherwise the position update doesn't make that much sense since velocity appears to be a scalar)." />
  <row Id="16258" PostHistoryTypeId="12" PostId="7996" RevisionGUID="b0540ff9-0dbf-4d7d-8c29-51eaab69891d" CreationDate="2011-02-02T01:48:43.840" UserId="1430" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;}]" />
  <row Id="16259" PostHistoryTypeId="13" PostId="7996" RevisionGUID="d81fca4e-9ade-4a79-889d-5e4a87e70537" CreationDate="2011-02-02T01:48:50.830" UserId="1430" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;}]" />
  <row Id="16260" PostHistoryTypeId="5" PostId="7996" RevisionGUID="7fe95be5-a397-4ec2-842f-b78c3819f4b3" CreationDate="2011-02-02T01:53:53.507" UserId="1430" Comment="deleted 438 characters in body" Text="You want the object to move up and down slightly, in a direction that is perpendicular to the object's motion, it sounds like. There's an easy way to do this: if you have a vector representing the object's direction, you can compute a perpendicular vector as `perpendicular = new Vector(direction.Y, -direction.X)`&#xD;&#xA;&#xD;&#xA;If you have a perpendicular vector and you normalize it, you can then scale it by the result of `Math.Sin(sinePosAng)` and then scale it again to achieve the desired total offset.&#xD;&#xA;&#xD;&#xA;To compute a vector representing the object's direction, you can do `direction = newPosition - oldPosition`" />
  <row Id="16261" PostHistoryTypeId="5" PostId="7996" RevisionGUID="f034ae76-7747-446f-a6c1-e2ebd3e5c276" CreationDate="2011-02-02T01:59:08.417" UserId="1430" Comment="added 467 characters in body" Text="It sounds like you want the object to move up and down slightly in a direction that is perpendicular to the object's motion. There's an easy way to do this without matrices, if you prefer: if you have a vector representing the object's direction, you can compute a perpendicular vector as `perpendicular = new Vector(direction.Y, -direction.X)` -- to compute a vector representing the object's direction, you can do `direction = newPosition - oldPosition`.&#xD;&#xA;&#xD;&#xA;If you have a perpendicular vector and you normalize it, you can then scale it by the result of `Math.Sin(sinePosAng)` and then scale it again to achieve the desired total offset, which you then add to the new position.&#xD;&#xA;&#xD;&#xA;The thing you'll want to watch out for is that you may want to the old/new positions distinctly from the offset position (after the &quot;wobble&quot; is applied) -- this is because otherwise the &quot;wobble&quot; applied on frame N will factor in to the computation of the direction vector on frame N + 1 and if the scale of the wobble is large enough, you're object may start to curve in an undesired fashion." />
  <row Id="16262" PostHistoryTypeId="2" PostId="7997" RevisionGUID="84a59aa9-6b2a-4bfa-91ce-ec82e9992c7d" CreationDate="2011-02-02T02:07:44.410" UserId="1101" Text="In addition to the other top answers (which are undoubtedly more significant than this suggestion), another optimisation is to change the closed 'list' into some sort of hash table. You don't need it to be an ordered collection, just to be able to quickly add values and to quickly see if they exist in the collection." />
  <row Id="16263" PostHistoryTypeId="6" PostId="7908" RevisionGUID="b49f9929-f629-4665-a4b5-45d88ff9dc47" CreationDate="2011-02-02T02:07:51.103" UserId="14" Comment="edited tags" Text="&lt;xna&gt;&lt;engine&gt;&lt;c#&gt;&lt;java&gt;" />
  <row Id="16264" PostHistoryTypeId="2" PostId="7998" RevisionGUID="165d8c28-a866-454c-82f5-c18808b2a4bd" CreationDate="2011-02-02T02:11:05.107" UserId="3175" Text="Having seen some horrible failures in released games I have a couple of suggestions:&#xD;&#xA;&#xD;&#xA;1)  Unless there is a good reason otherwise make two lanes and for AI purposes make them have priority for a normal direction of flow--permit two-abreast travel but if something's coming the other way the guy on the wrong side of the road always yields to it.&#xD;&#xA;&#xD;&#xA;2)  Some sort of logic to unwind a traffic jam if it occurs.  I've watched situations where the traffic jam handling only applied to the vehicles that were trying to run into each other but utterly failed when confronted with a -&gt; -&gt; &lt;- &lt;- pattern.  I recall one map that was prone to this--it was a chokepoint meant to make the AI base harder to attack but sooner or later two resource harvesters would come in while an attack group was heading out and that was that.  The units in contact would spin around trying to find a route out but they had no legal moves.  It didn't backtrack and figure out that some other unit had to move first, and thus the AI took no useful actions until the roadblock was removed.  (You could watch the units in contact spin around and nothing else do anything.)&#xD;&#xA;&#xD;&#xA;I believe this could be solved by making a stuck unit tell neighboring units to get out of the way--this would propagate until it reached an unstuck unit that could back away.  This would have to involve some sort of logic to keep them away until the problem was cleared.&#xD;&#xA;&#xD;&#xA;Note that simply looking for an alternative path is often a bad answer.  I've watched a livelock situation of that kind--unit A notes that B is blocking the road up ahead and so it turns around to use a different route.  This now blocks the road for B who turns around--now the road is unblocked so both turn around again.  Each turn they alternate between moving forward and moving backwards.&#xD;&#xA;&#xD;&#xA;The same game I've seen a different version of it, also due to the fog of war.  There was an enemy unit at a chokepoint.  On auto-move the pathfinding would not fight unless actually targeted on the enemy unit.  It would move forward and see the road was blocked.  It then moved back, it could no longer see the blocker and it would move forward again.  Repeat until the human realized it wasn't getting where it was supposed to go." />
  <row Id="16265" PostHistoryTypeId="5" PostId="7992" RevisionGUID="59cc6710-5488-406b-b052-9cad2a51972d" CreationDate="2011-02-02T02:31:17.770" UserId="3794" Comment="improved spelling" Text="Your problem will solve rendering with 1bit alpha. Which means you specify some alpha of source texture which is not rendered (mostly 0.5).&#xD;&#xA;&#xD;&#xA;You have to write your own shader for saving depth from light and use instruction `discard`. Discard exists in hlsl, glsl and in cg as well. It exists only in pixel/fragment shader and discards curent fragment from the rendering into backBuffer and into z-buffer. &#xD;&#xA;&#xD;&#xA;    if (texSample.a &lt; 0.5)&#xD;&#xA;       discard;&#xD;&#xA;&#xD;&#xA;Advantage is that you don't need to change yours 2nd pass rendering, only rendering of light's depth. Also i have prove that it works:&#xD;&#xA;![1bit alpha][1]&#xD;&#xA;&#xD;&#xA;If you want to render correct shadows for multiple transparent objects you will have to use multiple depth textures, with depth and opacity information rendered using depth peeling. And for smoke, hair etc. Deep opacity or Fourier opacity maps are best solution (I mostly recommend Fourier opacity maps)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wWOut.png" />
  <row Id="16266" PostHistoryTypeId="5" PostId="7995" RevisionGUID="600d26cb-b8f1-441f-9553-a80c00f7485f" CreationDate="2011-02-02T02:57:07.373" UserId="5001" Comment="deleted 157 characters in body" Text="I am trying to apply a slight sine wave movement to objects that float around the screen to make them a little more interesting. I would like to apply this to the objects so that they oscillate from side to side, not front to back (so the oscillation does not affect their forward velocity).&#xD;&#xA;&#xD;&#xA;After reading various threads and tutorials, I have come to the conclusion that I need to create and add vectors, but I simply cannot come up with a solution that works.&#xD;&#xA;&#xD;&#xA;This is where I'm at right now, in the object's update method (updated based on comments):&#xD;&#xA;&#xD;&#xA;            Vector2 oldPosition = new Vector2(spritePos.X, spritePos.Y);&#xD;&#xA;&#xD;&#xA;            //note: newPosition is initially set in the constructor to spritePos.x/y&#xD;&#xA;            Vector2 direction = newPosition - oldPosition;&#xD;&#xA;            &#xD;&#xA;            Vector2 perpendicular = new Vector2(direction.Y, -direction.X);&#xD;&#xA;&#xD;&#xA;            perpendicular.Normalize();&#xD;&#xA;&#xD;&#xA;            sinePosAng += 0.1f;&#xD;&#xA;            perpendicular.X += 2.5f * (float)Math.Sin(sinePosAng);&#xD;&#xA;&#xD;&#xA;            spritePos.X += velocity * (float)Math.Cos(radians);&#xD;&#xA;            spritePos.Y += velocity * (float)Math.Sin(radians);&#xD;&#xA;&#xD;&#xA;            spritePos += perpendicular;&#xD;&#xA;&#xD;&#xA;            newPosition = spritePos;&#xD;&#xA;" />
  <row Id="16271" PostHistoryTypeId="5" PostId="7996" RevisionGUID="2471dab5-33fc-4e2d-91a8-90e063a10350" CreationDate="2011-02-02T03:45:50.267" UserId="1430" Comment="updated in response to changes in the question" Text="EDIT:&#xD;&#xA;Based on the discussion in the comments and your updated code, I suggest you try doing something like this:&#xD;&#xA;&#xD;&#xA;    // oldPosition is a member variable, it holds the real position of the&#xD;&#xA;    // object (without the &quot;wobble&quot; applied).&#xD;&#xA;    Vector2 newPosition = oldPosition;&#xD;&#xA;    newPosition.X += velocity * (float)Math.Cos(radians);&#xD;&#xA;    newPosition.Y += velocity * (float)Math.Sin(radians);&#xD;&#xA;&#xD;&#xA;    // This gives us a vector from the old position to the new position, indicating&#xD;&#xA;    // the direction our object is moving.&#xD;&#xA;    Vector2 direction = newPosition - oldPosition;&#xD;&#xA;&#xD;&#xA;    // We normalize the perpendicular vector so that we can scale it reliably later.&#xD;&#xA;    Vector2 perpendicular = new Vector(direction.Y, -direction.X);&#xD;&#xA;    perpendicular.Normalize();&#xD;&#xA;&#xD;&#xA;    float offset = 5.0f * (float)Math.Sin(sinPosAng);&#xD;&#xA;    sinPosAng += 0.01;f&#xD;&#xA;&#xD;&#xA;    // By keeping spritePos independent from oldPosition, we allow the wobble to visually&#xD;&#xA;    // affect the object without logically affecting it's real location; this prevents&#xD;&#xA;    // the wobble from feeding back on to itself.&#xD;&#xA;    spritePos = newPosition + (offset * perpendicular);&#xD;&#xA;&#xD;&#xA;    // For the next frame, the old position will be what is currently the new position.&#xD;&#xA;    oldPosition = newPosition;&#xD;&#xA;&#xD;&#xA;If you have a perpendicular vector and you normalize it, you can then scale it by the result of `Math.Sin(sinePosAng)` and then scale it again to achieve the desired total offset, which you then add to the new position. The purpose of the normalization is to ensure the scale is reliable each frame -- you know the length of the vector before you scale it, so you know the results will be exactly what you expect.&#xD;&#xA;&#xD;&#xA;The other thing you'll want to watch out for is that you may want to the old/new positions distinctly from the offset position (after the &quot;wobble&quot; is applied) -- this is because otherwise the &quot;wobble&quot; applied on frame N will factor in to the computation of the direction vector on frame N + 1 and if the scale of the wobble is large enough, you're object may start to curve in an undesired fashion. In the example above, I assume that both `oldPosition` and `spritePos` are member variables -- `spritePos` will contain the location of the sprite (which has the wobble applied), but `oldPosition` contains the un-wobble'd position." />
  <row Id="16272" PostHistoryTypeId="2" PostId="8000" RevisionGUID="594ce306-c042-4edb-9220-fb5f973fefea" CreationDate="2011-02-02T05:54:53.557" UserId="4679" Text="I recently asked about how to [seperate entities from their behaviour][1] and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;&#xD;&#xA;The ultimate concept written about here is that of: OBJECT AS A PURE AGGREGATION.&#xD;&#xA;&#xD;&#xA;I'm wondering how I might go about creating game entities as pure aggregation using C#. I've not quite grasped the concept of how this might work yet. (Perhaps the entity is an array of objects implmenting a certain interface or base type?)&#xD;&#xA;&#xD;&#xA;My current thinking still involves having a concreate class for each entity type that then impliments the relevant interfaces (IMoveable, ICollectable, ISpeakable etc).&#xD;&#xA;&#xD;&#xA;How can I go about creating an entity purely as an aggregation without having any concreate type for that entity?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7427/seperating-entities-from-their-actions-or-behaviours" />
  <row Id="16273" PostHistoryTypeId="1" PostId="8000" RevisionGUID="594ce306-c042-4edb-9220-fb5f973fefea" CreationDate="2011-02-02T05:54:53.557" UserId="4679" Text="Creating Entities as an aggregation" />
  <row Id="16274" PostHistoryTypeId="3" PostId="8000" RevisionGUID="594ce306-c042-4edb-9220-fb5f973fefea" CreationDate="2011-02-02T05:54:53.557" UserId="4679" Text="&lt;c#&gt;&lt;design-patterns&gt;&lt;character&gt;&lt;objects&gt;" />
  <row Id="16275" PostHistoryTypeId="4" PostId="8000" RevisionGUID="ab92af1e-b0cc-4c71-9e7f-8e29f3c69411" CreationDate="2011-02-02T06:01:30.117" UserId="4679" Comment="make title clearer" Text="Creating Entity as an aggregation" />
  <row Id="16276" PostHistoryTypeId="2" PostId="8001" RevisionGUID="0598f7d2-99e3-4894-8970-f43311656aa6" CreationDate="2011-02-02T06:21:58.680" UserId="2158" Text="With programmable pipeline you should do it how @notabene instructed. However it's easy to do with fixed pipeline as well without writing any shaders. In OpenGL glAlphaFunc is what you want. For example:&#xD;&#xA;&#xD;&#xA;    glEnable(GL_ALPHA_TEST);&#xD;&#xA;    glAlphaFunc(GL_GREATER, 0.5f);" />
  <row Id="16277" PostHistoryTypeId="5" PostId="5039" RevisionGUID="352846c6-fba3-42c4-a92b-961825bd2bea" CreationDate="2011-02-02T07:24:02.143" UserId="233" Comment="spelling and punctuation" Text="The only way I can think of doing this is creating a separate depth map texture, rendering the trees into it, outputting for depth where alpha != 0, otherwise outputting depth = 1, then combining this shadow map texture with the scene shadow map texture, which should be simple enough; simply take the smallest of the two values and set that to the final depth map.&#xD;&#xA;&#xD;&#xA;This doesn't solve blending orders though; if you output a depth behind an alpha texture it will be overridden when you render the quad with the texture on it, so for this effect to work you're going to have to render each quad individually into the depth map texture..." />
  <row Id="16278" PostHistoryTypeId="24" PostId="5039" RevisionGUID="fc302c08-d14f-40f5-a798-bcc1dae0c51c" CreationDate="2011-02-02T07:24:02.143" Comment="Proposed by 233 approved by 51 edit id of 6" />
  <row Id="16279" PostHistoryTypeId="5" PostId="8000" RevisionGUID="66bcebf0-5d95-478d-9a0f-fc33d3bce227" CreationDate="2011-02-02T07:24:14.500" UserId="233" Comment="&quot;separate&quot; and &quot;concrete&quot;" Text="I recently asked about how to [separate entities from their behaviour][1] and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;&#xD;&#xA;The ultimate concept written about here is that of: OBJECT AS A PURE AGGREGATION.&#xD;&#xA;&#xD;&#xA;I'm wondering how I might go about creating game entities as pure aggregation using C#. I've not quite grasped the concept of how this might work yet. (Perhaps the entity is an array of objects implementing a certain interface or base type?)&#xD;&#xA;&#xD;&#xA;My current thinking still involves having a concrete class for each entity type that then implements the relevant interfaces (IMoveable, ICollectable, ISpeakable etc).&#xD;&#xA;&#xD;&#xA;How can I go about creating an entity purely as an aggregation without having any concrete type for that entity?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7427/seperating-entities-from-their-actions-or-behaviours" />
  <row Id="16280" PostHistoryTypeId="24" PostId="8000" RevisionGUID="e8e6eba3-3473-475a-958f-31a425b90265" CreationDate="2011-02-02T07:24:14.500" Comment="Proposed by 233 approved by 51 edit id of 5" />
  <row Id="16281" PostHistoryTypeId="2" PostId="8002" RevisionGUID="a8018b36-894d-476e-a412-0f9ac0170be2" CreationDate="2011-02-02T07:38:51.527" UserId="51" Text="The way Unity does it is that all scripts (in your case, game code that's specific to a type of game object) derive from a base class, `MonoBehaviour`, which itself derives from the more relevant-to-your-case `Component` class.  You never edit (and don't have access to the code of) the GameObject class.  &#xD;&#xA;&#xD;&#xA;The game object is in charge of containing all those `Component`s.  It's also ostensibly in charge of calling the relevant functions on them (i.e. `Update`).  Unity uses reflection to determine what functions to call (look at the &quot;Overridable Functions&quot; section on &lt;a href=&quot;http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.html&quot;&gt;this page&lt;/a&gt;), but you'd probably want to make them virtual.&#xD;&#xA;&#xD;&#xA;So one of the mechanisms that you use in Unity is getting components on your current game object (or its children) by type.  There are some helper properties that wrap some of the common stuff.  For example, if you want to access the game object's `Transform` component (to control the game object's position/rotation/scale), you would normally have to do something like `this.GetComponent&lt;Transform&gt;().position`, but they wrap that into a helper `this.transform.position` call.  Another common pattern is accessing the current game object's `Renderer` component.  So if you want to do something like change the current game object's material, from another script you might do something like `this.renderer.material = someOtherMaterial`, and your game object updates appropriately.&#xD;&#xA;&#xD;&#xA;One of the ways this works in Unity is that their editor is set up such that you can create game objects in your scene that have components already hooked up.  In Unity's case, all game objects have a `Transform` component, but it can also contain built-in types like `AudioListener` or `Renderer`, which do what you would expect.  Or you can add your own components that do whatever it is you want them to do.  The editor also exposes public/serializable fields on your components so you don't have to make different scripts if you want to use the same basic code but change a few magic numbers around.&#xD;&#xA;&#xD;&#xA;All in all it's pretty slick, and I'd suggest downloading the free version of Unity and playing around with how their scripting system is set up as a pretty decent proof of concept of what you want to achieve." />
  <row Id="16282" PostHistoryTypeId="2" PostId="8003" RevisionGUID="aaa5c45a-bb69-4e7c-a4e8-2d1265d74c3d" CreationDate="2011-02-02T07:48:42.707" UserId="1430" Text="The &quot;pure aggregation&quot; approach described by West in that linked article eschews an &quot;entity&quot; object altogether. There are components, floating around in memory, but they are tied together only by implicit relationships, if at all.&#xD;&#xA;&#xD;&#xA;One way to do this is a so-called [outboard approach][1]. In such a system, components are held by systems that manage or otherwise control them (I use the term &quot;manage&quot; here, but you shouldn't take this to mean I'm suggesting that you have a bunch of *Manager classes to hold component types). For example, your physics system may hold on to a bunch of things representing each rigid body in its simulation world, and may expose those things as PhysicsComponents. The components can be the actual objects handled by the subsystem in question, or they can be proxies for those objects, as needed.&#xD;&#xA;&#xD;&#xA;In such a system there isn't necessarily a need for an &quot;Entity&quot; class to hold a collection of references to the components that comprise it; instead a notification is raised concerning the creation or destruction of an &quot;entity&quot; and each subsystem that handles components looks at the description of the created/destroyed entity (which is typically loaded from some data) and determines if a component is necessary for it.&#xD;&#xA;&#xD;&#xA;One of the advantages to this approach is that you get really good locality of reference for each component. Unfortunately it's a bit weird, overall, and not the most friendly flavor of component-based entities I've encountered. Sometimes it is really convenient to have a real object that represents an entity, even if that object does little more then aggregate weak references to components that are still held by other subsystems (if nothing else it provides a easy way to route messages between components).&#xD;&#xA;&#xD;&#xA;There are several good ways to implement component oriented game object systems; it really, really, *really* helps if you have a solid idea of the requirements you want out of your system -- you can look at what popular frameworks like Unity do for examples. Without setting strict requirements for yourself, you may run into the problem of endlessly &quot;designing&quot; the system without ever really building it, trying in vain to hit upon the perfect implementation. For whatever reason I've seen this a lot with component systems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/" />
  <row Id="16283" PostHistoryTypeId="25" PostId="8000" RevisionGUID="61c9ff62-b1c2-4f18-b1b9-27210bafede7" CreationDate="2011-02-02T08:15:57.787" Comment="http://twitter.com/#!/StackGameDev/status/32713822313644033" />
  <row Id="16284" PostHistoryTypeId="25" PostId="7956" RevisionGUID="6de8471a-293b-4b5a-93b8-b7a9eb53991c" CreationDate="2011-02-02T11:15:57.893" Comment="http://twitter.com/#!/StackGameDev/status/32759121191108608" />
  <row Id="16285" PostHistoryTypeId="2" PostId="8004" RevisionGUID="4319cb6e-1c3d-460b-9b62-4a824c064397" CreationDate="2011-02-02T11:32:09.293" UserId="2710" Text="I've been working in professional game development for over 5 years. Most of this time, I used C# almost exclusively.&#xD;&#xA;&#xD;&#xA;C# and .NET stack in general is really great for server-side tech. I've worked on no less than 4 MMO games with server written in C#. Also, with Unity3D gaining popularity, many browser AND mobile games require C#. Don't forget XNA framework: it's not the engine of choice for AAA console titles, but there are many great games made with it, and many more currently in the making.&#xD;&#xA;&#xD;&#xA;Overall, C# definitely has a future in game development. " />
  <row Id="16287" PostHistoryTypeId="2" PostId="8006" RevisionGUID="d712ee59-98eb-427c-b60e-1c5f4673e27b" CreationDate="2011-02-02T14:13:53.180" UserDisplayName="user5118" Text="The option in the rendering menu of Maya doesn't say &quot;Mental Ray&quot; anymore.&#xD;&#xA;Please help me to get it back, or even a better plugin for Maya game quality rendering." />
  <row Id="16288" PostHistoryTypeId="1" PostId="8006" RevisionGUID="d712ee59-98eb-427c-b60e-1c5f4673e27b" CreationDate="2011-02-02T14:13:53.180" UserDisplayName="user5118" Text="Mental Ray render loss in Maya?" />
  <row Id="16289" PostHistoryTypeId="3" PostId="8006" RevisionGUID="d712ee59-98eb-427c-b60e-1c5f4673e27b" CreationDate="2011-02-02T14:13:53.180" UserDisplayName="user5118" Text="&lt;rendering&gt;&lt;animation&gt;&lt;scene-graph&gt;" />
  <row Id="16290" PostHistoryTypeId="25" PostId="7995" RevisionGUID="33fc2e63-2b1f-44d5-94be-13582414832f" CreationDate="2011-02-02T14:16:03.507" Comment="http://twitter.com/#!/StackGameDev/status/32804443086921728" />
  <row Id="16291" PostHistoryTypeId="2" PostId="8007" RevisionGUID="df81a65d-8b67-44c7-95b4-2e4912d548a0" CreationDate="2011-02-02T14:23:50.380" UserId="3874" Text="I want to basically make a blur shader in glsl and use it like Windows 7 does for Windows. I want to for example draw something and then blur a rectangle, then draw text over it.&#xD;&#xA;&#xD;&#xA;If someone could point me in the right direction on how to do this I'd be very grateful.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16292" PostHistoryTypeId="1" PostId="8007" RevisionGUID="df81a65d-8b67-44c7-95b4-2e4912d548a0" CreationDate="2011-02-02T14:23:50.380" UserId="3874" Text="Bluring behind something then drawing text?" />
  <row Id="16293" PostHistoryTypeId="3" PostId="8007" RevisionGUID="df81a65d-8b67-44c7-95b4-2e4912d548a0" CreationDate="2011-02-02T14:23:50.380" UserId="3874" Text="&lt;c++&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;blur&gt;" />
  <row Id="16294" PostHistoryTypeId="2" PostId="8008" RevisionGUID="5fd129a9-d302-40bf-83ac-eaac6045800d" CreationDate="2011-02-02T14:38:33.800" UserId="5088" Text="You should check at this blog post from Andre Vrignaud, he was responsible for windows LIVE strategy.&#xD;&#xA;&#xD;&#xA;**From the post:**&#xD;&#xA;&#xD;&#xA;&gt; The bar is pretty high for titles to&#xD;&#xA;&gt; be able to use Xbox LIVE services –&#xD;&#xA;&gt; we’re aiming for a very high-quality,&#xD;&#xA;&gt; managed portfolio. But if you feel&#xD;&#xA;&gt; you’ve got the ideas and the chops to&#xD;&#xA;&gt; hit that bar, both our publishing&#xD;&#xA;&gt; partners and ourselves are interested&#xD;&#xA;&gt; in talking with you!&#xD;&#xA;&gt; &#xD;&#xA;&gt; Feel like you’ve got game? Here’s what&#xD;&#xA;&gt; you do:&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1. Email wpgames@microsoft.com with a description of your game and your&#xD;&#xA;&gt; contact information. We’ll send you a&#xD;&#xA;&gt; content submission form. We love&#xD;&#xA;&gt; playable demos!&#xD;&#xA;&gt; 2. If your game is accepted, you’ll hear from the developer relations&#xD;&#xA;&gt; staff and we’ll work with you to get&#xD;&#xA;&gt; you the resources required to get&#xD;&#xA;&gt; started.&#xD;&#xA;&gt; 3. We’ll take care of the rest – game integration, promotions, marketing,&#xD;&#xA;&gt; data analysis and community support.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[It has begun! First sessions on developing games for windows phone at gdc][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ozymandias.com/it-has-begun-first-sessions-on-developing-games-for-windows-phone-at-gdc" />
  <row Id="16295" PostHistoryTypeId="2" PostId="8009" RevisionGUID="da45fa5c-24d1-4ad3-9cc5-ce79ddd0b4f9" CreationDate="2011-02-02T14:42:56.370" UserId="1581" Text="A quick [google search][1] says that sometimes it &quot;deactivates itself&quot; and it has to be reactivated on the plugin manager (`Window &gt; Settings/Preferences &gt; Plug-in Manager`)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=maya+mental+ray+plugin" />
  <row Id="16296" PostHistoryTypeId="2" PostId="8010" RevisionGUID="2faf357a-707b-4ef7-8805-3acfc4e67773" CreationDate="2011-02-02T15:00:21.847" UserId="5119" Text="Hai,&#xD;&#xA;     I'm new to the genre &quot;Creating Games&quot;.Previously i had done only porting.I need some suggestion's for making a game.&#xD;&#xA;&#xD;&#xA;      What are the basic game logics i need to start with?&#xD;&#xA;                 - Should i write Tic-Tac-Toe game? - Actually this seem very basic to me.&#xD;&#xA;&#xD;&#xA;I'm totally confused on where to start with.I like to create big games but after starting i feel the game is too heavy to handle.&#xD;&#xA;Can any one list out the basic needs of a Game Play programmer?&#xD;&#xA;I don't mind using any platform (Flash,c++,objective-c) but i need to know what are the game logic's i need to know before i start a big game.&#xD;&#xA;&#xD;&#xA;     " />
  <row Id="16297" PostHistoryTypeId="1" PostId="8010" RevisionGUID="2faf357a-707b-4ef7-8805-3acfc4e67773" CreationDate="2011-02-02T15:00:21.847" UserId="5119" Text="What are the Starting Games I need to make?[Best steps for a beginner Game Developer?]" />
  <row Id="16298" PostHistoryTypeId="3" PostId="8010" RevisionGUID="2faf357a-707b-4ef7-8805-3acfc4e67773" CreationDate="2011-02-02T15:00:21.847" UserId="5119" Text="&lt;programming&gt;" />
  <row Id="16299" PostHistoryTypeId="10" PostId="8010" RevisionGUID="7b1d8e8a-ed5c-4eeb-a404-d0fccd406148" CreationDate="2011-02-02T15:02:02.250" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="16300" PostHistoryTypeId="5" PostId="8010" RevisionGUID="4bfd36f8-dc34-4acb-aa41-72beea0d75d5" CreationDate="2011-02-02T15:02:02.360" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are good games to &amp;ldquo;earn your wings&amp;rdquo; with?](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hai,&#xD;&#xA;     I'm new to the genre &quot;Creating Games&quot;.Previously i had done only porting.I need some suggestion's for making a game.&#xD;&#xA;&#xD;&#xA;      What are the basic game logics i need to start with?&#xD;&#xA;                 - Should i write Tic-Tac-Toe game? - Actually this seem very basic to me.&#xD;&#xA;&#xD;&#xA;I'm totally confused on where to start with.I like to create big games but after starting i feel the game is too heavy to handle.&#xD;&#xA;Can any one list out the basic needs of a Game Play programmer?&#xD;&#xA;I don't mind using any platform (Flash,c++,objective-c) but i need to know what are the game logic's i need to know before i start a big game.&#xD;&#xA;&#xD;&#xA;     " />
  <row Id="16301" PostHistoryTypeId="2" PostId="8011" RevisionGUID="da913251-8a65-4b3d-a6be-f55569895b51" CreationDate="2011-02-02T16:14:39.797" UserId="4956" Text="Not really sure about panda3d, but I am pretty sure you need to start thinking about the algorithms and structure / pattern of making bones then moving them, then skinning them with your sprites. &#xD;&#xA;&#xD;&#xA;Once these concepts are strong in your mind, you should then apply them to panda3d (what ever language / scripting it uses) or look up specific panda3d existing 2d animation systems using bones.&#xD;&#xA;&#xD;&#xA;Similar to - how to learn 2d animation&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/7792/how-to-learn-2d-animation" />
  <row Id="16302" PostHistoryTypeId="2" PostId="8012" RevisionGUID="273f90bd-bdf0-4ed0-8065-f98b8b9f4dd2" CreationDate="2011-02-02T16:18:02.547" UserId="1430" Text="This kind of effect is known as a [Guassian blur][1]. It's a relatively common effect, so you can find information about the algorithm and even some sample shaders relatively easily: for example, [here][2], [here][3] and [here][4] were the first three Google results that looked vaguely worthwhile.&#xD;&#xA;&#xD;&#xA;The general idea is that you're going to have to render the scene you want blurred into a render target texture, then bind that texture for a second render phase during which you'll compute the blur effect. &#xD;&#xA;&#xD;&#xA;To render *sharp* images on top of the blur (for example, your text), you can render the blurring phase into a render target texture as well, and bind that texture for the final pass where you'd render your text over the scene.&#xD;&#xA;&#xD;&#xA;You may also want to look for [discussion of GPU post-processing systems][5] to get a feel for how you might architect you render pipeline to be generally scalable to these sorts of multi-phase effects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gaussian_blur&#xD;&#xA;  [2]: http://www.gamerendering.com/2008/10/11/gaussian-blur-filter-shader/&#xD;&#xA;  [3]: http://callumhay.blogspot.com/2010/09/gaussian-blur-shader-glsl.html&#xD;&#xA;  [4]: http://theinstructionlimit.com/?p=14&#xD;&#xA;  [5]: http://poisonforthemind.blogspot.com/2009/12/gpu-post-processing.html" />
  <row Id="16304" PostHistoryTypeId="2" PostId="8013" RevisionGUID="3909c434-8491-4a75-a3e1-14d0ed7033b0" CreationDate="2011-02-02T17:07:14.823" UserId="4638" Text="I'm trying to draw textures aligned with this physics body whose coordinate system's origin is at the center of the screen. (XNA)Spritebatch has its default origin set to top-left corner.&#xD;&#xA;I got the textures to be positioned correctly, but I noticed my textures are vertically inverted. That is, an arrow texture pointing Up , when rendered points down. I'm not sure where I am going wrong with the math.&#xD;&#xA;&#xD;&#xA;My approach is to convert everything in physic's meter units and draw accordingly.&#xD;&#xA;&#xD;&#xA;            Matrix proj = Matrix.CreateOrthographic(scale * graphics.GraphicsDevice.Viewport.AspectRatio, scale, 0, 1);&#xD;&#xA;            Matrix view = Matrix.Identity;&#xD;&#xA;&#xD;&#xA;            effect.World = Matrix.Identity;&#xD;&#xA;            effect.View = view;&#xD;&#xA;            effect.Projection = proj;&#xD;&#xA;&#xD;&#xA;            effect.TextureEnabled = true;&#xD;&#xA;            effect.VertexColorEnabled = true;&#xD;&#xA;&#xD;&#xA;            effect.Techniques[0].Passes[0].Apply();&#xD;&#xA;            SpriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, null, DepthStencilState.Default, RasterizerState.CullNone, effect);&#xD;&#xA;&#xD;&#xA;            m_Paddles[1].Draw(gameTime);&#xD;&#xA;&#xD;&#xA;            GlobalBag.SpriteBatch.End();&#xD;&#xA;where Paddle::Draw looks like:&#xD;&#xA;&#xD;&#xA;           SpriteBatch.Draw(paddleTexture,&#xD;&#xA;                mBody.Position,&#xD;&#xA;                null,&#xD;&#xA;                Color.White,&#xD;&#xA;                0f,&#xD;&#xA;                new Vector2(16f, 16f),  // origin of the texture&#xD;&#xA;                0.1875f, SpriteEffects.None,   // width of box is 3*2 = 6 meters. texture is 32 pixels wide. to make it 6 meters wide in world space: 6/32 = 0.1875f&#xD;&#xA;                0);&#xD;&#xA;The orthographic projection matrix seem fine to me, but I am obviously doing something wrong somewhere! Can someone please help me figure out what am i doing wrong here ?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16305" PostHistoryTypeId="1" PostId="8013" RevisionGUID="3909c434-8491-4a75-a3e1-14d0ed7033b0" CreationDate="2011-02-02T17:07:14.823" UserId="4638" Text="Inverted textures" />
  <row Id="16306" PostHistoryTypeId="3" PostId="8013" RevisionGUID="3909c434-8491-4a75-a3e1-14d0ed7033b0" CreationDate="2011-02-02T17:07:14.823" UserId="4638" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;farseer-physics-engine&gt;&lt;projection&gt;" />
  <row Id="16307" PostHistoryTypeId="25" PostId="8007" RevisionGUID="fe219abd-e1ea-499a-96b0-4ab66c6bf614" CreationDate="2011-02-02T17:16:05.800" Comment="http://twitter.com/#!/StackGameDev/status/32849751477059584" />
  <row Id="16308" PostHistoryTypeId="5" PostId="8013" RevisionGUID="5f0954e7-bb99-4e2a-b840-3bdd118e0f0e" CreationDate="2011-02-02T18:04:34.963" UserId="4638" Comment="deleted 10 characters in body" Text="I'm trying to draw textures aligned with this physics body whose coordinate system's origin is at the center of the screen. (XNA)Spritebatch has its default origin set to top-left corner.&#xD;&#xA;I got the textures to be positioned correctly, but I noticed my textures are vertically inverted. That is, an arrow texture pointing Up , when rendered points down. I'm not sure where I am going wrong with the math.&#xD;&#xA;&#xD;&#xA;My approach is to convert everything in physic's meter units and draw accordingly.&#xD;&#xA;&#xD;&#xA;            Matrix proj = Matrix.CreateOrthographic(scale * graphics.GraphicsDevice.Viewport.AspectRatio, scale, 0, 1);&#xD;&#xA;            Matrix view = Matrix.Identity;&#xD;&#xA;&#xD;&#xA;            effect.World = Matrix.Identity;&#xD;&#xA;            effect.View = view;&#xD;&#xA;            effect.Projection = proj;&#xD;&#xA;&#xD;&#xA;            effect.TextureEnabled = true;&#xD;&#xA;            effect.VertexColorEnabled = true;&#xD;&#xA;&#xD;&#xA;            effect.Techniques[0].Passes[0].Apply();&#xD;&#xA;            SpriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend, null, DepthStencilState.Default, RasterizerState.CullNone, effect);&#xD;&#xA;&#xD;&#xA;            m_Paddles[1].Draw(gameTime);&#xD;&#xA;&#xD;&#xA;            SpriteBatch.End();&#xD;&#xA;where Paddle::Draw looks like:&#xD;&#xA;&#xD;&#xA;           SpriteBatch.Draw(paddleTexture,&#xD;&#xA;                mBody.Position,&#xD;&#xA;                null,&#xD;&#xA;                Color.White,&#xD;&#xA;                0f,&#xD;&#xA;                new Vector2(16f, 16f),  // origin of the texture&#xD;&#xA;                0.1875f, SpriteEffects.None,   // width of box is 3*2 = 6 meters. texture is 32 pixels wide. to make it 6 meters wide in world space: 6/32 = 0.1875f&#xD;&#xA;                0);&#xD;&#xA;The orthographic projection matrix seem fine to me, but I am obviously doing something wrong somewhere! Can someone please help me figure out what am i doing wrong here ?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16309" PostHistoryTypeId="2" PostId="8014" RevisionGUID="a032a31f-70e8-43e1-8056-6987f366cd63" CreationDate="2011-02-02T18:45:43.553" UserId="5121" Text="I am interested in developing games for the Android OS. I have played Replica Island and I have browsed over the source. I found that the levels/maps were in a .bin format. I could execute them because they were in an Android format. So how could I make a game map/level that could be used in my game? What program would I use? How could I load the map in Java (for Android)?" />
  <row Id="16310" PostHistoryTypeId="1" PostId="8014" RevisionGUID="a032a31f-70e8-43e1-8056-6987f366cd63" CreationDate="2011-02-02T18:45:43.553" UserId="5121" Text="How to make a video game map that can be used by Android?" />
  <row Id="16311" PostHistoryTypeId="3" PostId="8014" RevisionGUID="a032a31f-70e8-43e1-8056-6987f366cd63" CreationDate="2011-02-02T18:45:43.553" UserId="5121" Text="&lt;game-design&gt;&lt;android&gt;&lt;maps&gt;" />
  <row Id="16312" PostHistoryTypeId="2" PostId="8015" RevisionGUID="7dacaf59-f3e3-4b32-b75e-3f2a7f2428b9" CreationDate="2011-02-02T18:58:38.623" UserId="4638" Text="Usually, you make a map like lets say a 2D array, and then output it in whatever format. Binary is small and fast, so you might want to use that. You would then have a reader in your game which would parse through that file (binary or whatever) and load your &quot;level&quot; data structure accordingly.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16313" PostHistoryTypeId="2" PostId="8016" RevisionGUID="3e66c37b-514a-4f86-aed1-44e793df9888" CreationDate="2011-02-02T19:22:46.987" UserId="1156" Text="I think you're missing it a bit here. What happens is that your game or app is run, and that then opens and reads in the data from a map file. The map file is not actually executable, it simply holds data.&#xD;&#xA;&#xD;&#xA;Say you have a tile map of 10x10 in a 2d array. Say that it is all water (tile ID 0) and grass (tile ID 1). You would save this into a file, row by row, probably in a binary (not human readable) format. So if your map had a few rows like this:&#xD;&#xA;&#xD;&#xA;    0001011101&#xD;&#xA;    0010111101&#xD;&#xA;    0001011101&#xD;&#xA;    0010111101&#xD;&#xA;    0001011101&#xD;&#xA;    0010111101&#xD;&#xA;    0001011101&#xD;&#xA;    0010111101&#xD;&#xA;    0001011101&#xD;&#xA;    0010111101&#xD;&#xA;(It's repeating, but it's an example. All the 0s are water and 1s are land)&#xD;&#xA;&#xD;&#xA;You would go through each row and save it to a file. So your file would just be, in binary:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    0001011101001011110100010111010010111101000101110100101111010001011101001011110100010110010111101&#xD;&#xA;&#xD;&#xA;When you come to read it in, you would read in number by number, and you know that a 0 is water (and you would set that tile to be water) and the 1 to be land.&#xD;&#xA;&#xD;&#xA;Of course, this is very simple. But the chance is you would have an ID system, so rather than saving 'water water land' you can do '001'. Same for items - instead of 'sword, location 1,0; axe, location 3,0' you would maybe write yours in binary as '45 1 0 76 3 0'.&#xD;&#xA;&#xD;&#xA;For Java, look up any kind of file API documentation." />
  <row Id="16314" PostHistoryTypeId="2" PostId="8017" RevisionGUID="4ab9fe63-6700-47c9-8b97-801554cbfcb2" CreationDate="2011-02-02T19:31:19.330" UserId="4997" Text="I'm trying to build a terrain starting from a heightmap. I've already some ideas about the procedure, but I can't even get started. I felt like I have to use a [MeshBuider][1]. The problem is that Visual Studio (I'm using the 2008 version) wants an *assembly*. Effectively on the MSDN there's a line specifying the assembly needed by the MeshBuilder, but I don't know how to import/load it.  &#xD;&#xA;Any suggestions?&#xD;&#xA;  &#xD;&#xA;Thanks in advance :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.pipeline.graphics.meshbuilder%28v=XNAGameStudio.31%29.aspx" />
  <row Id="16315" PostHistoryTypeId="1" PostId="8017" RevisionGUID="4ab9fe63-6700-47c9-8b97-801554cbfcb2" CreationDate="2011-02-02T19:31:19.330" UserId="4997" Text="Assembly in visual studio 2008" />
  <row Id="16316" PostHistoryTypeId="3" PostId="8017" RevisionGUID="4ab9fe63-6700-47c9-8b97-801554cbfcb2" CreationDate="2011-02-02T19:31:19.330" UserId="4997" Text="&lt;xna&gt;&lt;importing&gt;" />
  <row Id="16317" PostHistoryTypeId="4" PostId="8017" RevisionGUID="7072ee27-bd20-42c6-91bc-0701530d2d98" CreationDate="2011-02-02T19:36:33.580" UserId="4997" Comment="edited title" Text="MeshBuider, assembly missing" />
  <row Id="16318" PostHistoryTypeId="5" PostId="8017" RevisionGUID="a4a242bb-d809-4800-a330-f5796d9a1f74" CreationDate="2011-02-02T19:39:02.470" UserId="1156" Comment="deleted 11 characters in body" Text="I'm trying to build a terrain starting from a heightmap. I've already some ideas about the procedure, but I can't even get started. I feel like I have to use a [MeshBuider][1]. The problem is that Visual Studio (I'm using the 2008 version) wants an *assembly*. Effectively on the MSDN there's a line specifying the assembly needed by the MeshBuilder, but I don't know how to import/load it.  &#xD;&#xA;Any suggestions?&#xD;&#xA;  &#xD;&#xA;Thanks in advance :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.pipeline.graphics.meshbuilder%28v=XNAGameStudio.31%29.aspx" />
  <row Id="16319" PostHistoryTypeId="2" PostId="8018" RevisionGUID="ed354866-f8e7-4478-aa59-4d90e5425af9" CreationDate="2011-02-02T19:45:50.577" UserDisplayName="user5124" Text="I agree with scaling up the sprite. By Far the easiest route,&#xD;&#xA;and you can apply it to selecting ANY sprite without having&#xD;&#xA;to create additional sprites especially for this purpose.&#xD;&#xA;&#xD;&#xA;- i.e.  spriteOutline.Scale = spriteOriginal.Scale * 0.1f;&#xD;&#xA;        spriteOutline.Color = new Color(255, 0, 0, 255);" />
  <row Id="16320" PostHistoryTypeId="2" PostId="8019" RevisionGUID="f699124b-187f-4c99-802c-94bea267dc38" CreationDate="2011-02-02T19:46:27.887" UserId="5123" Text="I have a C++ game that has a 3D engine that works only in Windows. I'm wondering which engine I should use so that it can be used in a browser or in iPad (iPhone) and Android environments? Does anyone have an idea of the size of the task to migrate from one 3D engine to another?" />
  <row Id="16321" PostHistoryTypeId="1" PostId="8019" RevisionGUID="f699124b-187f-4c99-802c-94bea267dc38" CreationDate="2011-02-02T19:46:27.887" UserId="5123" Text="What 3D engine should I use?" />
  <row Id="16322" PostHistoryTypeId="3" PostId="8019" RevisionGUID="f699124b-187f-4c99-802c-94bea267dc38" CreationDate="2011-02-02T19:46:27.887" UserId="5123" Text="&lt;3d-engines&gt;&lt;ipad&gt;&lt;browser-based-games&gt;" />
  <row Id="16323" PostHistoryTypeId="10" PostId="8019" RevisionGUID="04b79bad-298c-4759-b58a-ea26012674a1" CreationDate="2011-02-02T19:55:24.790" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="16324" PostHistoryTypeId="5" PostId="8019" RevisionGUID="669cd020-43f0-4040-b595-fc93c99eabef" CreationDate="2011-02-02T19:55:24.900" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Which 3D Engine for iPad development?](http://gamedev.stackexchange.com/questions/581/which-3d-engine-for-ipad-development)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have a C++ game that has a 3D engine that works only in Windows. I'm wondering which engine I should use so that it can be used in a browser or in iPad (iPhone) and Android environments? Does anyone have an idea of the size of the task to migrate from one 3D engine to another?" />
  <row Id="16325" PostHistoryTypeId="2" PostId="8020" RevisionGUID="d243ab91-f59a-42c1-a3d8-d47b95ad166c" CreationDate="2011-02-02T19:55:33.860" UserId="51" Text="There are only two engines I know of that work on iPhone, Android, and in a browser:&#xD;&#xA;&#xD;&#xA;Unity3D and Shiva3D.&#xD;&#xA;&#xD;&#xA;&gt; Does anyone have an idea of the size of the task to migrate from one 3D engine to another?&#xD;&#xA;&#xD;&#xA;This isn't an answerable question as-is.  How much code you have and what engine you're using are going to matter.&#xD;&#xA;&#xD;&#xA;I don't know about Shiva, but in Unity you're going to need to rewrite all your game code to one of the languages they support: C# or Javascript." />
  <row Id="16326" PostHistoryTypeId="11" PostId="8019" RevisionGUID="ad9c9faa-8dbd-4252-8c65-c4cd69cb9107" CreationDate="2011-02-02T19:58:54.863" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="16327" PostHistoryTypeId="5" PostId="8019" RevisionGUID="6edc1360-2ed6-4bbf-83af-046e36fe872c" CreationDate="2011-02-02T19:59:28.203" UserId="14" Comment="deleted 203 characters in body" Text="I have a C++ game that has a 3D engine that works only in Windows. I'm wondering which engine I should use so that it can be used in a browser or in iPad (iPhone) and Android environments? Does anyone have an idea of the size of the task to migrate from one 3D engine to another?" />
  <row Id="16328" PostHistoryTypeId="5" PostId="8020" RevisionGUID="ae91a051-8a2a-4379-b24d-9c9aca56ef9d" CreationDate="2011-02-02T20:00:59.623" UserId="51" Comment="added 73 characters in body" Text="There are only two engines I know of that work on iPhone, Android, and in a browser:&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://unity3d.com/&quot;&gt;Unity&lt;/a&gt; and &lt;a href=&quot;http://www.stonetrip.com/&quot;&gt;ShiVa 3D&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;&gt; Does anyone have an idea of the size of the task to migrate from one 3D engine to another?&#xD;&#xA;&#xD;&#xA;This isn't an answerable question as-is.  How much code you have and what engine you're using are going to matter.&#xD;&#xA;&#xD;&#xA;I don't know about Shiva, but in Unity you're going to need to rewrite all your game code to one of the languages they support: C# or Javascript." />
  <row Id="16329" PostHistoryTypeId="4" PostId="8019" RevisionGUID="e47f4af9-4dc5-49a2-958d-aa79b97e8243" CreationDate="2011-02-02T20:07:58.427" UserId="51" Comment="edited title" Text="What 3D engine should I use for the browser, iPhone, and Android platforms?" />
  <row Id="16330" PostHistoryTypeId="6" PostId="8019" RevisionGUID="07d41fb3-5eb6-4e11-8db9-49b2cbc0c93a" CreationDate="2011-02-02T20:09:19.377" UserId="51" Comment="edited tags" Text="&lt;android&gt;&lt;3d-engines&gt;&lt;ipad&gt;&lt;browser-based-games&gt;" />
  <row Id="16331" PostHistoryTypeId="2" PostId="8021" RevisionGUID="100828d8-23b5-4aec-8f99-6500d76adddf" CreationDate="2011-02-02T20:10:33.327" UserId="1221" Text="You said you looked up several articles about steering behaviour, though just in case,&#xD;&#xA;have you looked up the following one?&#xD;&#xA;&#xD;&#xA;http://www.red3d.com/cwr/steer/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If not, it might provide you some answers, as it covers some of the problems you named, for example the bottleneck problem (Queuing)." />
  <row Id="16332" PostHistoryTypeId="25" PostId="8019" RevisionGUID="c9911c3d-bdd1-4aa0-8065-c8970150e851" CreationDate="2011-02-02T20:16:05.780" Comment="http://twitter.com/#!/StackGameDev/status/32895049364668416" />
  <row Id="16333" PostHistoryTypeId="2" PostId="8022" RevisionGUID="c1e3c6e7-7892-447b-bd86-46a098c3fa25" CreationDate="2011-02-02T20:23:11.223" UserId="4296" Text="Okay, then you need to add a reference to the content pipeline assemblies from your game project.  XNA by default won't do this.&#xD;&#xA;&#xD;&#xA;In VS -&gt; Project Menu -&gt; Add Reference.  Under the .NET tab, you'll find everything.  It's helpful to sort by component name.  You're looking for the component Microsoft.Xna.Framework.Content.Pipeline. &#xD;&#xA;&#xD;&#xA;Don't add the importers, those are for converting resources into XNA's internal format in content pipeline projects." />
  <row Id="16334" PostHistoryTypeId="4" PostId="8017" RevisionGUID="9086a99b-e75c-479e-a78f-abece99ed20d" CreationDate="2011-02-02T20:41:30.977" UserId="1156" Comment="edited title" Text="MeshBuilder, assembly missing" />
  <row Id="16335" PostHistoryTypeId="2" PostId="8023" RevisionGUID="f91d8e34-df40-45c2-afbf-97349c7754c6" CreationDate="2011-02-02T20:45:19.630" UserId="741" Text="There are so many ways of addressing this problem I'd struggle to give a decent and comprehensive answer here. But here are some high level design points.&#xD;&#xA;&#xD;&#xA;1) You're building an agent simulation here. Pathfinding is simply one input into the system - the agent has a goal, and path-finding is just a way it can achieve that goal. Actually, thinking of it in real terms the agent has two goals: a driver's foremost goal is &quot;don't crash&quot;, second to that is &quot;get where I want to go&quot;.&#xD;&#xA;&#xD;&#xA;2) Your systems should build on real world parallels. The reason why most roads have two or more lanes is because it's much easier to organise traffic with that system, no-one has to think very much. In a single lane scenario, drivers have to sort out various problems:&#xD;&#xA;a) detection - recognising that you and the oncoming car will crash unless you avoid each other&#xD;&#xA;b) reaction - slowing down and entering into a negotiation phase.&#xD;&#xA;c) negotiation - one of the drivers has to take the lead, the other has to yield. The rules for how to decide this are vague, but basically you want something where one driver arbitrarily (or based on a heuristic about how many cars are coming in the other direction) decides to take priority. E.g. A takes priority at time 1, B sees A take priority, and yields (by moving out of the way and stopping). If both A and B try to take priority, they should both stop, wait a random amount of time (or signal each other) and try again. Eventually one will yield to the other.&#xD;&#xA;&#xD;&#xA;The beauty of this implementation is that it avoids the need to maintain artificial queues or other fake constructs. The negotiation is done in terms of real world perceptions - once both parties are in the negotiation phase, any significant forward motion is easily detected as an attempt to take priority. It should also react appropriately to the user, who will most likely not adhere to good driving rules.&#xD;&#xA;&#xD;&#xA;3) Assume the worst. Even in a perfect system, odd situations can come up, and your actors should act sensibly. This is even more likely if the player can interfere (artificially block off areas, etc.)&#xD;&#xA;&#xD;&#xA;Often, stopping altogether is the only sensible response (gridlock!) Spinning on the spot or obviously being in a broken state is a failure of AI. Stopping altogether is at least plausible in real world terms.&#xD;&#xA;&#xD;&#xA;The closer you model your actor's AI on simple real world logic, the easier it will be to create convincing AI. Real people don't stop or oscillate back and forward if they can't reach their goal. If the only road to the AI's destination is blocked, they should recognise that and choose a response (stop altogether, give up and drive home, give up and drive elsewhere).&#xD;&#xA;&#xD;&#xA;4) Layer behaviours to get what you want. Remember, 1st goal is not to crash. So avoidance (steering) logic should always dominate the driver's actions. Layer on top of that the directional logic that comes from the path-finding ('I want to take a right at the next junction'). Layer on top of that occasional re-evaluation of paths, with higher level logic ('prefer to go forward, but if I can't make progress, allow a new path that involves a U-turn').&#xD;&#xA;&#xD;&#xA;5) Path-finding comes from memory, but situational awareness is based on perception. Don't try to make your agents perfect. They know the way from their home to the office, so they know which turns to make. But they don't know that the street 2 miles away is blocked. Don't try to make your agents plot a perfect path, because there are none - even if it starts out perfect, other factors may block their path. Agents should only need to plan a few streets ahead where they're going." />
  <row Id="16336" PostHistoryTypeId="2" PostId="8024" RevisionGUID="6218d563-c0a2-4f01-b0f5-dee2a4f0a8a5" CreationDate="2011-02-02T20:47:34.340" UserId="5126" Text="I've read lots of articles about DOD and I understand it but I can't design an Object Oriented system with DOD in mind, I think my OOP education is blocking me. How should I think to mix the two? The objective is to have a nice OO interface while using DOD behind the scenes. &#xD;&#xA;&#xD;&#xA;I saw this too but didn't help much: http://stackoverflow.com/questions/3872354/how-to-apply-dop-and-keep-a-nice-user-interface" />
  <row Id="16337" PostHistoryTypeId="1" PostId="8024" RevisionGUID="6218d563-c0a2-4f01-b0f5-dee2a4f0a8a5" CreationDate="2011-02-02T20:47:34.340" UserId="5126" Text="How to apply Data Oriented Design with Object Oriented Programming?" />
  <row Id="16338" PostHistoryTypeId="3" PostId="8024" RevisionGUID="6218d563-c0a2-4f01-b0f5-dee2a4f0a8a5" CreationDate="2011-02-02T20:47:34.340" UserId="5126" Text="&lt;c++&gt;" />
  <row Id="16339" PostHistoryTypeId="5" PostId="8023" RevisionGUID="14973f1f-9c64-41e0-93d5-b6c5f5af8914" CreationDate="2011-02-02T20:52:15.567" UserId="741" Comment="added 315 characters in body" Text="There are so many ways of addressing this problem I'd struggle to give a decent and comprehensive answer here. But here are some high level design points.&#xD;&#xA;&#xD;&#xA; - You're building an agent simulation here. Pathfinding is simply one input into the system - the agent has a goal, and path-finding is just a way it can achieve that goal. Actually, thinking of it in real terms the agent has two goals: a driver's foremost goal is &quot;don't crash&quot;, second to that is &quot;get where I want to go&quot;.&#xD;&#xA; - Your systems should build on real world parallels. The reason why most roads have two or more lanes is because it's much easier to organise traffic with that system, no-one has to think very much. In a single lane scenario, drivers have to sort out various problems:&#xD;&#xA;&#xD;&#xA; **detection** - recognising that you and the oncoming car will crash unless you avoid each other&#xD;&#xA;&#xD;&#xA; **reaction** - slowing down and entering into a negotiation phase.&#xD;&#xA;&#xD;&#xA; **negotiation** - one of the drivers has to take the lead, the other has to yield. The rules for how to decide this are vague, but basically you want something where one driver arbitrarily (or based on a heuristic about how many cars are coming in the other direction) decides to take priority. E.g. A takes priority at time 1, B sees A take priority, and yields (by moving out of the way and stopping). If both A and B try to take priority, they should both stop, wait a random amount of time (or signal each other) and try again. Eventually one will yield to the other.&#xD;&#xA;&#xD;&#xA; The beauty of this implementation is that it avoids the need to maintain artificial queues or other fake constructs. The negotiation is done in terms of real world perceptions - once both parties are in the negotiation phase, any significant forward motion is easily detected as an attempt to take priority. It should also react appropriately to the user, who will most likely not adhere to good driving rules.&#xD;&#xA;&#xD;&#xA; - Assume the worst. Even in a perfect system, odd situations can come up, and your actors should act sensibly. This is even more likely if the player can interfere (artificially block off areas, etc.) Often, stopping altogether is the only sensible response (gridlock!) Spinning on the spot or obviously being in a broken state is a failure of AI. Stopping altogether is at least plausible in real world terms.&#xD;&#xA;&#xD;&#xA; The closer you model your actor's AI on simple real world logic, the easier it will be to create convincing AI. Real people don't stop or oscillate back and forward if they can't reach their goal. If the only road to the AI's destination is blocked, they should recognise that and choose a response (stop altogether, give up and drive home, give up and drive elsewhere). &#xD;&#xA;&#xD;&#xA; - Layer behaviours to get what you want. Remember, 1st goal is not to crash. So avoidance (steering) logic should always dominate the driver's actions. Layer on top of that the directional logic that comes from the path-finding ('I want to take a right at the next junction'). Layer on top of that occasional re-evaluation of paths, with higher level logic ('prefer to go forward, but if I can't make progress, allow a new path that involves a U-turn').&#xD;&#xA;&#xD;&#xA; - Path-finding comes from memory, but situational awareness is based on perception. Don't try to make your agents perfect. They know the way from their home to the office, so they know which turns to make. But they don't know that the street 2 miles away is blocked. Don't try to make your agents plot a perfect path, because there are none - even if it starts out perfect, other factors may block their path. Agents should only need to plan a few streets ahead where they're going.&#xD;&#xA;&#xD;&#xA; - Information quality. Your behaviours should be simple, but to achieve that you need good query functionality. You need to be able to ask questions of your environment like &quot;is that oncoming car occupying my lane?&quot;, &quot;how many cars are oncoming?&quot;, &quot;are there any cars behind me&quot;, &quot;can I do a U-turn&quot;." />
  <row Id="16340" PostHistoryTypeId="2" PostId="8025" RevisionGUID="6b2175ab-9f10-4a4c-be38-97949481ac5c" CreationDate="2011-02-02T21:04:01.197" UserDisplayName="user5127" Text="&#xD;&#xA; Basically if you want total control over spritebatch, you'd probably&#xD;&#xA; want to use variables for ALL of its overloads, (with the exception of spriteEffect&#xD;&#xA; and rectangle unless you're doing a side-scrolling platformer) like so:&#xD;&#xA;&#xD;&#xA;public class Character()&#xD;&#xA;{&#xD;&#xA;     &#xD;&#xA;     Texture2D texture; (optional variable)&#xD;&#xA;&#xD;&#xA;     Vector2 position;&#xD;&#xA;     Vector2 origin;&#xD;&#xA;     float rotation = 0f;&#xD;&#xA;     float scale = 1.0f;&#xD;&#xA;     float depth = 0;&#xD;&#xA;     Color color = Color.White;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i.e&#xD;&#xA;&#xD;&#xA;   spriteBatch.Draw(character.texture, character.position, null, character.color, character.rotation, character.origin, character.scale, SpriteEffects.None, character.depth);" />
  <row Id="16341" PostHistoryTypeId="5" PostId="7765" RevisionGUID="889141cf-0f35-4f3f-b7c6-1e1d2f43f367" CreationDate="2011-02-02T21:06:13.123" UserId="1868" Comment="fixed question to match answers" Text="I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.&#xD;&#xA;&#xD;&#xA;I found out Box2D and its JS port.&#xD;&#xA;&#xD;&#xA;http://box2d-js.sourceforge.net&#xD;&#xA;&#xD;&#xA;It seems to be quite old port, made in 2008. Is it lacking many features of current Box2D or does it have major issues with it? And are there any alternatives for it?" />
  <row Id="16342" PostHistoryTypeId="4" PostId="7765" RevisionGUID="889141cf-0f35-4f3f-b7c6-1e1d2f43f367" CreationDate="2011-02-02T21:06:13.123" UserId="1868" Comment="fixed question to match answers" Text="Are there any alternative JS ports of Box2D?" />
  <row Id="16343" PostHistoryTypeId="2" PostId="8026" RevisionGUID="858938f0-6a94-496d-a1d7-a7a1e260155f" CreationDate="2011-02-02T21:18:57.313" UserId="5089" Text="You should be using Dictionary&lt;int, PGNode&gt; instead of a list. No sorting needed. g_score, f_score and h_score are all dictionaries (aka maps). I implemented this a couple days ago myself in C# (don't have the sources handy, will post later) and it was very fast." />
  <row Id="16344" PostHistoryTypeId="2" PostId="8027" RevisionGUID="bd6163a2-0c6c-460e-aab1-344ee92c0d21" CreationDate="2011-02-02T21:51:17.563" UserId="744" Text="I would say that &lt;a href=&quot;http://gamesfromwithin.com/&quot;&gt;Noel Llopis's blog&lt;/a&gt; is probably the best instruction for a combination of object-oriented programming and data-oriented design. He is one of the originators of the DOD term, is a strong C++ programmer, and has written a good deal about his style and how he takes advantage of C++'s OO features.&#xD;&#xA;&#xD;&#xA;I guess if I were to call out the key elements of combining them, according to Noel:&#xD;&#xA;&#xD;&#xA; * Use POD and non-member, non-friend functions as much as possible. &lt;a href=&quot;http://www.drdobbs.com/184401197&quot;&gt;Non-member, non-friend functions improve encapsulation&lt;/a&gt; and are a key part of data-orientation because they keep the data, data.&#xD;&#xA; * Avoid storing &quot;temporary&quot; state on your objects. Temporary state clogs up your data. If you need to cache something (e.g. for performance) then that belongs in a new class, with non-member non-friend functions linking the two types, not a is-a nor a has-a relationship.&#xD;&#xA; * Avoid objects that can be in state A or state B. Prefer switching between two objects, one of which is A, and one of which is B.&#xD;&#xA; * Avoid polymorphism, avoid virtual functions, avoid templates, avoid anything that makes your data have the _syntactic appearance_ of sameness rather than _actual_ sameness.&#xD;&#xA;&#xD;&#xA;The other big name in DOD propaganda right now is Mike Acton of Insomniac, but reading what he's written I'd say he's not really pro-OO (or anti-OO, as long as it's still data-oriented)." />
  <row Id="16345" PostHistoryTypeId="5" PostId="8025" RevisionGUID="844267a7-ba8c-43df-9760-c7e0ef17106c" CreationDate="2011-02-02T22:11:32.413" UserId="51" Comment="added 52 characters in body" Text=" Basically if you want total control over spritebatch, you'd probably&#xD;&#xA; want to use variables for ALL of its overloads, (with the exception of spriteEffect&#xD;&#xA; and rectangle unless you're doing a side-scrolling platformer) like so:&#xD;&#xA;&#xD;&#xA;    public class Character()&#xD;&#xA;    {&#xD;&#xA;         &#xD;&#xA;         Texture2D texture; (optional variable)&#xD;&#xA;    &#xD;&#xA;         Vector2 position;&#xD;&#xA;         Vector2 origin;&#xD;&#xA;         float rotation = 0f;&#xD;&#xA;         float scale = 1.0f;&#xD;&#xA;         float depth = 0;&#xD;&#xA;         Color color = Color.White;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;i.e&#xD;&#xA;&#xD;&#xA;       spriteBatch.Draw(character.texture, character.position, null, character.color, character.rotation, character.origin, character.scale, SpriteEffects.None, character.depth);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16346" PostHistoryTypeId="2" PostId="8028" RevisionGUID="3dbb4c13-7189-4175-ad0a-23636bb56b84" CreationDate="2011-02-02T22:45:12.610" UserId="1430" Text="Assuming you have:the data set you want to plot already, and the map you want to plot it to, you can start by creating an intensity map, a grid of floating point values that is proportional in bounds to the final map (if the maps are small enough, 1:1 is probably fine). Initialize the entire array to 0.&#xD;&#xA;&#xD;&#xA;Then you walk through each point you want to plot, map it into the coordinate space of the intensity map (which should be a simple scale operation, normally), and then plot a &quot;blip&quot; in the intensity map centered at that position. A basic &quot;blip&quot; might just consist of increasing the intensity at the blip point plus some radius by a small amount. More complex implementations could read the existing intensity, and use a bigger falloff radius the more intense the blip point already is, et cetera. You can experiment with the blip plotter to find an implementation you like the look of.&#xD;&#xA;&#xD;&#xA;Once every point is plotted, you may need to re-normalize the intensity map back into the zero-to-one range. If you know enough about the shape of your input data, or you don't care about the intensity becoming saturated, you may not need to do this.&#xD;&#xA;&#xD;&#xA;Once you have a zero-to-one intensity map you can use the intensity at each individual point as a 1D look-up into a color gradient, which will allow you to achieve the desired visual impact. You should do this color lookup as you transfer the intensity map to your final plot (rescaling, obviously, as necessary to account for size differences in the intensity map versus the final image.&#xD;&#xA;&#xD;&#xA;This should be enough for a basic implementation, but there is potentially some room for optimization by skipping some of the steps if your data or system will allow it -- for example, the costly re-normalizing phase can be removed if you have enough data before to query the minimum and maximum intensities you expect to see in the data set -- basically if you have some map between (X,Y,Z) to the number of &quot;hits&quot; of the plotted data that occurred at that point -- that's something you can build in to the system that *collects* the data which will help you optimize the mapping portion.&#xD;&#xA;&#xD;&#xA;Since the intensity map is just, essentially, a grayscale image a really easy way to prototype this kind of system to use a bitmap for the intensity map and your drawing API of choice (for example, `System.Drawing` in C#) to plot partially-transparent circles to produce an intensity map. It doesn't look the best, but its functional." />
  <row Id="16347" PostHistoryTypeId="25" PostId="8024" RevisionGUID="8c38c3c1-2cde-47c4-b012-3d8b594095b9" CreationDate="2011-02-02T23:16:07.097" Comment="http://twitter.com/#!/StackGameDev/status/32940353388548098" />
  <row Id="16348" PostHistoryTypeId="2" PostId="8029" RevisionGUID="010567de-14d0-4bdb-b9a2-810378322615" CreationDate="2011-02-02T23:52:02.653" UserId="3056" Text="I'm getting a failure returned when calling Direct3DDevice-&gt;CreateDepthStencilSurface(). But rather than returning one of the values that the documentation says it should return (D3DERR_NOTAVAILABLE, D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY), it returns error code 80070057. What does this mean?" />
  <row Id="16349" PostHistoryTypeId="1" PostId="8029" RevisionGUID="010567de-14d0-4bdb-b9a2-810378322615" CreationDate="2011-02-02T23:52:02.653" UserId="3056" Text="Direct3D Error Code 80070057" />
  <row Id="16350" PostHistoryTypeId="3" PostId="8029" RevisionGUID="010567de-14d0-4bdb-b9a2-810378322615" CreationDate="2011-02-02T23:52:02.653" UserId="3056" Text="&lt;directx9&gt;" />
  <row Id="16351" PostHistoryTypeId="2" PostId="8030" RevisionGUID="410a6dd2-b987-428c-9fc7-bbc3b2bdbc3a" CreationDate="2011-02-03T00:00:46.160" UserId="2332" Text="Use the DirectX Error Lookup tool that's found in the SDK.&#xD;&#xA;&#xD;&#xA;Passing this value in it returns the following result:&#xD;&#xA;&#xD;&#xA;HRESULT: 0x80070057 (2147942487)  &#xD;&#xA;Name: E_INVALIDARG  &#xD;&#xA;Description: An invalid parameter was passed to the returning function  &#xD;&#xA;Severity code: Failed  &#xD;&#xA;Facility Code: FACILITY_WIN32 (7)  &#xD;&#xA;Error Code: 0x0057 (87)  &#xD;&#xA;&#xD;&#xA;You have an invalid argument passed into the function. Check the contents of your parameters." />
  <row Id="16352" PostHistoryTypeId="5" PostId="8028" RevisionGUID="f11641c9-43c2-440d-a7f3-4cc85dfdf6dd" CreationDate="2011-02-03T02:10:42.423" UserId="1430" Comment="tweaks" Text="Assuming you have the data set you want to plot already, and the map you want to plot it to, you can start by creating an intensity map: a grid of floating point values that is proportional in bounds to the final map (if the maps are small enough, 1:1 is probably fine). Initialize the entire array to 0.&#xD;&#xA;&#xD;&#xA;Then you walk through each point you want to plot, map it into the coordinate space of the intensity map (which should be a simple scale operation, normally), and then plot a &quot;blip&quot; in the intensity map centered at that position.&#xD;&#xA;&#xD;&#xA;A basic &quot;blip&quot; might just consist of increasing the intensity at the blip point plus some radius by a small amount. More complex implementations could read the existing intensity, and use a bigger falloff radius the more intense the blip point already is. You can experiment with the blip plotter to find an implementation you like the look of.&#xD;&#xA;&#xD;&#xA;Once you have an intensity map you can use the intensity at each individual point as a 1D look-up into a color gradient, which will allow you to achieve the desired visual impact (this is how you can get the multi-colored results that are most commonly seen). You should do this color lookup as you transfer the intensity map to your final plot (rescaling, obviously, as necessary to account for size differences in the intensity map versus the final image). &#xD;&#xA;&#xD;&#xA;This should be enough for a basic implementation, but there is room for optimization. For example, the intensity map will not be normalized, so you may need to renormalize it (probably slow) or keep track of the maximum intensity as you plot each blip, so that you can perform the renormalization of an individual intensity at the same time you are doing the recolorization.&#xD;&#xA;&#xD;&#xA;If you have enough data beforehand to query the minimum and maximum intensities you expect to see in the data set you can avoid having to renormalize at all -- basically if you have some map between (X,Y,Z) to the number of &quot;hits&quot; of the plotted data that occurred at that point -- that's something you can build in to the system that *collects* the data which will help you optimize the mapping portion.&#xD;&#xA;&#xD;&#xA;Since the intensity map is just, essentially, a grayscale image a really easy way to prototype this kind of system to use a bitmap for the intensity map and your drawing API of choice (for example, `System.Drawing` in C#) to plot partially-transparent circles to produce an intensity map. It doesn't look the best, but its functional." />
  <row Id="16353" PostHistoryTypeId="2" PostId="8031" RevisionGUID="6906e84e-81a7-4812-8c32-ab30251e8810" CreationDate="2011-02-03T02:47:43.960" UserId="229" Text="**[Echo Chamber][1] is a free logging and visualization tool specifically made for games.**&#xD;&#xA;&#xD;&#xA;&gt; Visualize SQL based data files that&#xD;&#xA;&gt; contain information generated by a c++&#xD;&#xA;&gt; application. Information can be log&#xD;&#xA;&gt; statements, function calls,&#xD;&#xA;&gt; screenshots, or parameter lists.&#xD;&#xA;&#xD;&#xA;&gt; View 2D and 3D game metrics such as&#xD;&#xA;&gt; death positions, which weapons are&#xD;&#xA;&gt; used most often, and memory usage over&#xD;&#xA;&gt; different parts of the level.&#xD;&#xA;&#xD;&#xA;The logging system has a C++ interface (which is like a printf() that outputs to an SQL database, optionally across a network), but Echo Chamber should be able to visualize any SQL database (or it should be simple to create a database in the format Echo Chamber expects). The web site navigation is a bit obtuse; relevant [Echo Chamber manual][2] and associated [Raknet logging function][3].&#xD;&#xA;&#xD;&#xA;Unfortunately there is no screen shot of the heat maps in action, but Echo Chamber definitely supports heat maps:&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jenkinssoftware.com/echochamber/index.html&#xD;&#xA;  [2]: http://www.jenkinssoftware.com/echochamber/manual/&#xD;&#xA;  [3]: http://www.jenkinssoftware.com/raknet/manual/sqlite3loggerplugin.html&#xD;&#xA;  [4]: http://i.stack.imgur.com/qkwoh.gif" />
  <row Id="16354" PostHistoryTypeId="2" PostId="8032" RevisionGUID="60963ce6-7263-4756-b7ff-edde84229610" CreationDate="2011-02-03T03:53:12.340" UserId="2778" Text="I'm currently learning XNA per suggestion from this question's accepted answer:&lt;br&gt;&#xD;&#xA;[Where to start writing games, any tutorials or the like?][1]&#xD;&#xA;&#xD;&#xA;I have then installed everything to get ready to work with XNA Game Studio 4.0.&#xD;&#xA;&#xD;&#xA;&gt;**General Objective**&#xD;&#xA;&#xD;&#xA;Writing an Arkanoid-like game. I want to make my ship move when I press either left or right keys.&#xD;&#xA;&#xD;&#xA;&gt;**Code Sample**&#xD;&#xA;&#xD;&#xA;        protected override void Update(GameTime gameTime) {&#xD;&#xA;            // Allows the game to exit&#xD;&#xA;            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                this.Exit();&#xD;&#xA;&#xD;&#xA;            // TODO: Add your update logic here&#xD;&#xA;    #if WINDOWS&#xD;&#xA;            if (Keyboard.GetState().IsKeyDown(Keys.Escape))&#xD;&#xA;                this.Exit();&#xD;&#xA;            else {&#xD;&#xA;                if (Keyboard.GetState().IsKeyDown(Keys.Left))&#xD;&#xA;                    MoveLeft(gameTime);&#xD;&#xA;            }&#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;            // Move the sprite around.&#xD;&#xA;            BounceEnergyBall(gameTime);&#xD;&#xA;&#xD;&#xA;            base.Update(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        void MoveLeft(GameTime gameTime) {&#xD;&#xA;            // I'm not sure how to play with the Vector2 object and its position here!...&#xD;&#xA;            _vausSpacecraftPos /= _vausSpacecraftSpeed.X; // This line makes the spacecraft move diagnol-top-left.&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&gt;**Question**&#xD;&#xA;&#xD;&#xA;What formula shall I use, or what algorithm shall I consider to make my spaceship move as expected left and right properly?&#xD;&#xA;&#xD;&#xA;&lt;hr/&gt;&#xD;&#xA;&#xD;&#xA;Thanks for your thoughts! Any clue will be appreciated. I am on my learning curve though I have years of development behind me (already)!&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7657/where-to-start-writing-games-any-tutorials-or-the-like" />
  <row Id="16355" PostHistoryTypeId="1" PostId="8032" RevisionGUID="60963ce6-7263-4756-b7ff-edde84229610" CreationDate="2011-02-03T03:53:12.340" UserId="2778" Text="XNA: How to make the Vaus Spacecraft move left and right on directional keys pressed?" />
  <row Id="16356" PostHistoryTypeId="3" PostId="8032" RevisionGUID="60963ce6-7263-4756-b7ff-edde84229610" CreationDate="2011-02-03T03:53:12.340" UserId="2778" Text="&lt;xna&gt;&lt;algorithm&gt;&lt;learning&gt;&lt;movement&gt;&lt;keyboard&gt;" />
  <row Id="16357" PostHistoryTypeId="2" PostId="8033" RevisionGUID="d75941a0-2a9b-46a1-bbe9-c38b0d634b38" CreationDate="2011-02-03T05:09:53.983" UserId="1430" Text="It looks like you want to do something like: `_vausSpacecraftPos.X += _vausSpacecraftSpeed.X;` -- you may also want to scale by the elapsed time stored in the GameTime object so you get frame-rate independent movement." />
  <row Id="16358" PostHistoryTypeId="25" PostId="8029" RevisionGUID="b5c401ca-64c2-4fb3-bb45-897765035251" CreationDate="2011-02-03T05:16:06.867" Comment="http://twitter.com/#!/StackGameDev/status/33030950023598080" />
  <row Id="16359" PostHistoryTypeId="2" PostId="8034" RevisionGUID="05856790-7306-4803-96ff-71dbc3e40858" CreationDate="2011-02-03T05:18:08.837" UserId="4436" Text="What technologies are used for `Game Development` and why they are chosen ? I am looking for technical thought process as to why one technology is preferred over other while thinking and moving in the direction of `Game Development` ?" />
  <row Id="16360" PostHistoryTypeId="1" PostId="8034" RevisionGUID="05856790-7306-4803-96ff-71dbc3e40858" CreationDate="2011-02-03T05:18:08.837" UserId="4436" Text="What technologies are used mainly to develop games and why ?" />
  <row Id="16361" PostHistoryTypeId="3" PostId="8034" RevisionGUID="05856790-7306-4803-96ff-71dbc3e40858" CreationDate="2011-02-03T05:18:08.837" UserId="4436" Text="&lt;game-design&gt;&lt;web&gt;&lt;language-choice&gt;" />
  <row Id="16362" PostHistoryTypeId="2" PostId="8035" RevisionGUID="d1886d1c-fb06-4690-ae78-541ef9e8cb8a" CreationDate="2011-02-03T05:36:38.537" UserId="51" Text="This question is super generic, so the only answers are super generic.&#xD;&#xA;&#xD;&#xA;What do you look at when choosing a technology?  (And what do you mean by &quot;techonlogy&quot;)&#xD;&#xA;&#xD;&#xA;- cost&#xD;&#xA;- speed of execution&#xD;&#xA;- development time&#xD;&#xA;- compatibility with desired platforms&#xD;&#xA;- &quot;robustness&quot;&#xD;&#xA;&#xD;&#xA;That sort of thing.&#xD;&#xA;" />
  <row Id="16363" PostHistoryTypeId="2" PostId="8036" RevisionGUID="66323d2d-b254-4581-82a5-1b2d5bd864d8" CreationDate="2011-02-03T06:16:38.890" UserId="4752" Text="I want to try learning rigid-body dynamic simulation. I have done a fluid and cloth simulation before, but never anything rigid. My maths knowledge is limited in that I don't know the notation that well. &#xD;&#xA;&#xD;&#xA;Are there any good cliff-notes, tutorials, guides on how I would accomplish a simple task like this? I don't want a super complex pdf that's only a little relevant. &#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="16364" PostHistoryTypeId="1" PostId="8036" RevisionGUID="66323d2d-b254-4581-82a5-1b2d5bd864d8" CreationDate="2011-02-03T06:16:38.890" UserId="4752" Text="Simple project - make a 3D box tumble and fall to the ground" />
  <row Id="16365" PostHistoryTypeId="3" PostId="8036" RevisionGUID="66323d2d-b254-4581-82a5-1b2d5bd864d8" CreationDate="2011-02-03T06:16:38.890" UserId="4752" Text="&lt;3d&gt;&lt;physics&gt;" />
  <row Id="16366" PostHistoryTypeId="10" PostId="8036" RevisionGUID="b1e6e2b4-0b69-4d39-944f-6a7c58028b51" CreationDate="2011-02-03T07:26:16.213" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="16367" PostHistoryTypeId="5" PostId="8036" RevisionGUID="f4c5a1a2-5b73-42cc-bb86-e3a245b47ac2" CreationDate="2011-02-03T07:26:16.323" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Resources to learn programming rigid body simulation](http://gamedev.stackexchange.com/questions/6351/resources-to-learn-programming-rigid-body-simulation)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hi guys,&#xD;&#xA;&#xD;&#xA;I want to try learning rigid-body dynamic simulation. I have done a fluid and cloth simulation before, but never anything rigid. My maths knowledge is limited in that I don't know the notation that well. &#xD;&#xA;&#xD;&#xA;Are there any good cliff-notes, tutorials, guides on how I would accomplish a simple task like this? I don't want a super complex pdf that's only a little relevant. &#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="16368" PostHistoryTypeId="2" PostId="8037" RevisionGUID="884a6bb1-1f7b-4b20-b032-90c1f2da6fd7" CreationDate="2011-02-03T07:53:53.750" UserId="4929" Text="Look into the GJK algorithm, which may be used for convex shape collision. You may be able to make appropriate adjustments to make it work with your voxels, I wouldn't know. Here's a great video explaining it: https://mollyrocket.com/849&#xD;&#xA;&#xD;&#xA;I think if you can create a function which can give the position of the voxel furthest along in a certain direction (ie, the support), you can probably make the algorithm work. Of course, you need to constrain your support vector function for voxel terrain to some region around the object you're testing collision with, since it makes no sense to check far away terrain." />
  <row Id="16369" PostHistoryTypeId="2" PostId="8038" RevisionGUID="15e9db61-594b-4cd5-b3f8-72b5bb7b6a08" CreationDate="2011-02-03T08:11:17.340" UserId="5135" Text="2.5D (&quot;two-and-a-half-dimensional&quot;), 3/4 perspective and pseudo-3D are terms used to describe either:&#xD;&#xA;&#xD;&#xA; - graphical projections and techniques&#xD;&#xA;   which cause a series of images or&#xD;&#xA;   scenes to fake or appear to be&#xD;&#xA;   three-dimensional (3D) when in fact&#xD;&#xA;   they are not, or&#xD;&#xA; - gameplay in an otherwise&#xD;&#xA;   three-dimensional video game that is&#xD;&#xA;   restricted to a two-dimensional&#xD;&#xA;   plane.&#xD;&#xA;&#xD;&#xA;(Information taken from Wikipedia.org)&#xD;&#xA;&#xD;&#xA;I have a question based on 2.5D game development. As stated before, 2.5D uses *graphical projections and techniques* to make fake 3d or a gameplay restricted to a *two-dimensional plane*.&#xD;&#xA;&#xD;&#xA;A good example is a TQ Digital made game: Zero Online ([screenshot][1]) the whole map is made of 2d images and only NPCs and players are 3d.&#xD;&#xA;&#xD;&#xA;The maps were drawn manually by hand without any 3d software rendering. As I'm playing the game I feel like I'm going from a lower part of the map (ground) to a higher one (some metal platform) and it feels like I'm moving in 3 dimensions. But when I look closely, I see that the player size didn't change and the shadow too but I'm still feeling like I'm somehow higher then before (I had rendered a simple map myself that I made in 3dmax but it didn't quite give the result I wanted).&#xD;&#xA;&#xD;&#xA;How to accomplish such an effect?&#xD;&#xA;&#xD;&#xA;  [1]: http://i337.photobucket.com/albums/n372/ne5tebiu/driver6722042.jpg" />
  <row Id="16370" PostHistoryTypeId="1" PostId="8038" RevisionGUID="15e9db61-594b-4cd5-b3f8-72b5bb7b6a08" CreationDate="2011-02-03T08:11:17.340" UserId="5135" Text="2.5D game development" />
  <row Id="16371" PostHistoryTypeId="3" PostId="8038" RevisionGUID="15e9db61-594b-4cd5-b3f8-72b5bb7b6a08" CreationDate="2011-02-03T08:11:17.340" UserId="5135" Text="&lt;2d&gt;&lt;maps&gt;&lt;2.5d&gt;" />
  <row Id="16372" PostHistoryTypeId="25" PostId="8038" RevisionGUID="a75741ca-2869-431d-96ea-8ebd5135cb4f" CreationDate="2011-02-03T08:16:07.053" Comment="http://twitter.com/#!/StackGameDev/status/33076248737480704" />
  <row Id="16373" PostHistoryTypeId="2" PostId="8039" RevisionGUID="fc8351bc-6607-4386-b739-7931fef5989f" CreationDate="2011-02-03T08:23:05.227" UserId="20" Text="To achieve such an effect, you can use a 3D Projection without perspective (called parallel projection). That will render all your objects at the same size and from the same angle, no matter where they are positioned. Something like this is mandatory if you're using a painted background.&#xD;&#xA;&#xD;&#xA;Here's a nice [overview of some possible projections][1].&#xD;&#xA;&#xD;&#xA;In addition to the background image, you'll have to store some sort of topological information for the ground. E.g. the height per &quot;cell&quot;, so that you can move your characters up/down accordingly. If you have a ramp, you can interpolate the height values between the upper and the lower cell.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graphical_projection" />
  <row Id="16374" PostHistoryTypeId="2" PostId="8040" RevisionGUID="19acafac-1480-4b33-9034-ffbe31796be0" CreationDate="2011-02-03T10:58:43.713" UserId="1199" Text="**[Nelxon Studio][1]**&#xD;&#xA;&#xD;&#xA;Here's an awesome game blog, focused mainly on XNA that I found! &lt;br /&gt;&#xD;&#xA;He's got a special section for XNA called [XDSK (XNA 4.0 Resources)][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nelxon.com/&#xD;&#xA;  [2]: http://www.nelxon.com/681/xdsk2/" />
  <row Id="16375" PostHistoryTypeId="25" PostId="8032" RevisionGUID="fafda902-86e9-4ad4-93f7-bb0444605c44" CreationDate="2011-02-03T11:16:07.180" Comment="http://twitter.com/#!/StackGameDev/status/33121548227321856" />
  <row Id="16376" PostHistoryTypeId="2" PostId="8041" RevisionGUID="bea35d9d-eadd-4cbe-b598-e9a9788f75d2" CreationDate="2011-02-03T11:32:36.543" UserId="259" Text="You could use some inertia by making the keys apply a force to the spacecraft rather than just applying speed:&#xD;&#xA;&#xD;&#xA;    const float MOVE_FORCE = 5.0f; // tweak this constant for more responsive movement&#xD;&#xA;    float force = 0.0f;&#xD;&#xA;    if (Keyboard.GetState().IsKeyDown(Keys.Left))&#xD;&#xA;    { &#xD;&#xA;        force -= MOVE_FORCE;&#xD;&#xA;    }&#xD;&#xA;    else if (Keyboard.GetState().IsKeyDown(Keys.Right))&#xD;&#xA;    {&#xD;&#xA;        force += MOVE_FORCE;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // we add in air resistence to cap the max speed of the spacecraft&#xD;&#xA;    const float AIR_RESISTENCE = 0.1f; // tweak this to change top speed&#xD;&#xA;    float airResistenceForce = _spacecraftSpeed.X * _spacecraftSpeed.X * AIR_RESISTENCE;&#xD;&#xA;    // air resistence is always applied against the current speed direction&#xD;&#xA;    if (_spacecraftSpeed.X &lt; 0.0f)&#xD;&#xA;    {&#xD;&#xA;        force += airResistenceForce;&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        force -= airResistenceForce;&#xD;&#xA;    }&#xD;&#xA;  &#xD;&#xA;    const float MASS = 1.0f; // tweak for more/less inertia&#xD;&#xA;    float acceleration = force / MASS;&#xD;&#xA;&#xD;&#xA;    _spacecraftSpeed.X += acceleration * timeStep;&#xD;&#xA;    _spacecraftPos.X += _spacecraftSpeed.X * timeStep;&#xD;&#xA;&#xD;&#xA;You have a few constants to tweak in here to get the handling exactly right. I'd reccomend hooking up some code to tweak them at runtime.&#xD;&#xA;&#xD;&#xA;You can go crazy and add more forces to the spacecraft - maybe an &quot;autoaim&quot; force that pushes the spacecraft towards a target point? Or a powerup/punishment random force that makes the spacecraft hard to control?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16377" PostHistoryTypeId="2" PostId="8042" RevisionGUID="3e52c941-5d52-4537-9ea6-475a3c9c3d88" CreationDate="2011-02-03T13:26:27.940" UserDisplayName="user5140" Text="I've just started out with OpenGL I still haven't really understood what Vertex Array Objects are and how they can be employed.&#xD;&#xA;&#xD;&#xA;If Vertex Buffer Object are used to store vertex data (such as their positions and texture coordinates) and the VAOs only contain status flags, where can they be used? What's their purpose?&#xD;&#xA;&#xD;&#xA;As far as I understood from the (very incomplete and unclear) GL Wiki, VAOs are used to set the flags/statūs for every vertex, following the order described in the Element Array Buffer, but the wiki was really ambiguous about it and I'm not really sure about what VAOs really do and how I could employ them." />
  <row Id="16378" PostHistoryTypeId="1" PostId="8042" RevisionGUID="3e52c941-5d52-4537-9ea6-475a3c9c3d88" CreationDate="2011-02-03T13:26:27.940" UserDisplayName="user5140" Text="Vertex Array Object (OpenGL)" />
  <row Id="16379" PostHistoryTypeId="3" PostId="8042" RevisionGUID="3e52c941-5d52-4537-9ea6-475a3c9c3d88" CreationDate="2011-02-03T13:26:27.940" UserDisplayName="user5140" Text="&lt;3d&gt;&lt;opengl&gt;&lt;graphics-programming&gt;&lt;api&gt;" />
  <row Id="16380" PostHistoryTypeId="2" PostId="8043" RevisionGUID="249b0f0f-b84e-4189-ae6b-91a10f1c01e2" CreationDate="2011-02-03T13:34:46.377" UserId="1101" Text="If you're talking about web and social games then the choice is almost entirely down to a compromise between the languages known by your developers, the needs of the game, and the market share of the relevant plugin (if appropriate). This means almost every web game has a Flash front-end as it is the only way to do high performance 2D graphics on browsers that is widely known to developers and widely available in browsers. Some simpler games that are less graphically intensive can just use Javascript. Other options are things like Silverlight or Unity but then you're buying certain features by conceding significant potential market share due to lack of plugin availability.&#xD;&#xA;&#xD;&#xA;For the back end, that's almost entirely down to what your developers are familiar with, as almost any language can adequately host a game server. This is not much different from building web services or APIs and you might see Java, ASP.NET, PHP, Python, Ruby, or other languages in this role." />
  <row Id="16381" PostHistoryTypeId="2" PostId="8044" RevisionGUID="1fdcc3c4-686c-492c-83bb-43be5c39efbe" CreationDate="2011-02-03T13:42:28.563" UserId="5126" Text="I think you will understand their purpose better with a sample. By reading the comments you will understand how VAOs are used.&#xD;&#xA;&#xD;&#xA;    // BEGIN INITIALIZATION&#xD;&#xA;    // Define some vertex data &#xD;&#xA;    struct Vertex {&#xD;&#xA;      GLfloat position[3];&#xD;&#xA;      GLfloat texcoord[2];&#xD;&#xA;    };&#xD;&#xA;    Vertex vertexdata[NUM_VERTS] = { ... };&#xD;&#xA;    GLubyte indexdata[NUM_INDICES] = { 0, 1, 2, ... };&#xD;&#xA;    &#xD;&#xA;    // Create and bind a VAO&#xD;&#xA;    GLuint vao;&#xD;&#xA;    glGenVertexArrays(1, &amp;vao);&#xD;&#xA;    glBindVertexArray(vao);&#xD;&#xA;    &#xD;&#xA;    // Create and bind a BO for vertex data&#xD;&#xA;    GLuint vbuffer;&#xD;&#xA;    glGenBuffers(1, &amp;vbuffer);&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, vbuffer);&#xD;&#xA;    &#xD;&#xA;    // copy data into the buffer object&#xD;&#xA;    glBufferData(GL_ARRAY_BUFFER, NUM_VERTS * sizeof(Vertex), vertexdata, GL_STATIC_DRAW);&#xD;&#xA;    &#xD;&#xA;    // set up vertex attributes&#xD;&#xA;    glEnableVertexAttribArray(0);&#xD;&#xA;    glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, position));&#xD;&#xA;    glEnableVertexAttribArray(1);&#xD;&#xA;    glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, texcoord));&#xD;&#xA;    &#xD;&#xA;    // Create and bind a BO for index data&#xD;&#xA;    GLuint ibuffer;&#xD;&#xA;    glGenBuffers(1, &amp;ibuffer);&#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibuffer);&#xD;&#xA;    &#xD;&#xA;    // copy data into the buffer object&#xD;&#xA;    glBufferData(GL_ELEMENT_ARRAY_BUFFER, NUM_INDICES * sizeof(GLubyte), indexdata, GL_STATIC_DRAW);&#xD;&#xA;    &#xD;&#xA;    // At this point the VAO is set up with two vertex attributes&#xD;&#xA;    // referencing the same buffer object, and another buffer object&#xD;&#xA;    // as source for index data. We can now unbind the VAO, go do&#xD;&#xA;    // something else, and bind it again later when we want to render&#xD;&#xA;    // with it.&#xD;&#xA;    &#xD;&#xA;    glBindVertexArray(0);&#xD;&#xA;    &#xD;&#xA;    // END INITIALIZATION&#xD;&#xA;    &#xD;&#xA;    // BEGIN RENDER LOOP&#xD;&#xA;    &#xD;&#xA;    // This is it. Binding the VAO again restores all buffer &#xD;&#xA;    // bindings and attribute settings that were previously set up&#xD;&#xA;    glBindVertexArray(vao);&#xD;&#xA;    glDrawElements(GL_TRIANGLES, NUM_INDICES, GL_UNSIGNED_BYTE, (void*)0);&#xD;&#xA;    &#xD;&#xA;    // END RENDER LOOP" />
  <row Id="16382" PostHistoryTypeId="2" PostId="8045" RevisionGUID="ce451ab5-6705-4cc5-88fc-34322d6b25a7" CreationDate="2011-02-03T14:02:01.843" UserId="1868" Text="I am looking for ideas how to implement following in 2D space. Unfortunately I don't know much about AI/path finding/autonomous control yet.&#xD;&#xA;&#xD;&#xA;Let's say this ship can move freely but it has mass and momentum. Also, external forces might affect it (explosions etc). The player can set a target for the ship at any time and it should reach that spot and stop.&#xD;&#xA;&#xD;&#xA;Without physics this would be simple, just point to the direction and go. But how to deal with existing momentum and then stopping on the spot? I don't want to modify ship's placement directly.&#xD;&#xA;" />
  <row Id="16383" PostHistoryTypeId="1" PostId="8045" RevisionGUID="ce451ab5-6705-4cc5-88fc-34322d6b25a7" CreationDate="2011-02-03T14:02:01.843" UserId="1868" Text="AI control for a ship with physics model" />
  <row Id="16384" PostHistoryTypeId="3" PostId="8045" RevisionGUID="ce451ab5-6705-4cc5-88fc-34322d6b25a7" CreationDate="2011-02-03T14:02:01.843" UserId="1868" Text="&lt;physics&gt;&lt;ai&gt;&lt;path-finding&gt;&lt;movement&gt;" />
  <row Id="16385" PostHistoryTypeId="25" PostId="8042" RevisionGUID="cc8c52eb-7211-4b53-bf8e-24996766f783" CreationDate="2011-02-03T14:16:09.007" Comment="http://twitter.com/#!/StackGameDev/status/33166853941501953" />
  <row Id="16386" PostHistoryTypeId="2" PostId="8046" RevisionGUID="12770d95-c296-41ea-ba4a-d40354f98cb6" CreationDate="2011-02-03T14:30:05.447" UserId="4947" Text="VAOs are useful, because you don't have to set up everytime all attributes. It should also be faster just bind one VAO rather then setting all attributes." />
  <row Id="16387" PostHistoryTypeId="2" PostId="8047" RevisionGUID="285cae6d-301a-4735-b5a2-91aec32cde5a" CreationDate="2011-02-03T14:33:42.950" UserId="4947" Text="I think your ship should have parameters like: position and velocity.&#xD;&#xA;&#xD;&#xA;Velocity is in each frame sum of all forces (like gravity, explosions, user input etc) and can also have some kind of damp. &#xD;&#xA;&#xD;&#xA;Position is calculated from last position plus velocity * time_step.&#xD;&#xA;&#xD;&#xA;However, with this it can be difficult to implement stopping on target. " />
  <row Id="16388" PostHistoryTypeId="5" PostId="8045" RevisionGUID="d554ddbc-6342-4fd8-8554-a0d925a64a05" CreationDate="2011-02-03T14:39:27.063" UserId="1868" Comment="added 84 characters in body; added 7 characters in body" Text="I am looking for ideas how to implement following in 2D space. Unfortunately I don't know much about AI/path finding/autonomous control yet.&#xD;&#xA;&#xD;&#xA;Let's say this ship can move freely but it has mass and momentum. Also, external forces might affect it (explosions etc). The player can set a target for the ship at any time and it should reach that spot and stop.&#xD;&#xA;&#xD;&#xA;Without physics this would be simple, just point to the direction and go. But how to deal with existing momentum and then stopping on the spot? I don't want to modify ship's placement directly.&#xD;&#xA;&#xD;&#xA;edit: Just to make clear, the physics related math of the ship itself is not the problem." />
  <row Id="16389" PostHistoryTypeId="2" PostId="8048" RevisionGUID="caa79612-3200-414d-bfa1-8d128fa92785" CreationDate="2011-02-03T14:56:45.417" UserId="259" Text="It's not an easy problem to get exactly right. You have two choices, although the specifics of each solution vary:&#xD;&#xA;&#xD;&#xA;A mathmatical solution. If your physics system is simple enough you can create the closed form for your motion and calculate when you need to start applying a braking force to stop at a point. If your braking force is a constant and you have no air resistence, this should decompose to a quadratic.&#xD;&#xA;&#xD;&#xA;An emperical solution. You can use a hand-tuned [PID controller][1] or actually record the braking distances for your ship in your physics system: in a testbed, brake the ship from max speed down to a stop, recording the distance travelled and speed every small timestep. Store the resultant distance/speed graph in a data directory. &#xD;&#xA;&#xD;&#xA;At run time, reconstruct the graph and plug in your current speed and target speed to get out a distance. At this distance from your target point you need to be at full brake. &#xD;&#xA;&#xD;&#xA;The advantage of this approach is that you can use it to brake exactly to any speed. The disadvantage is that if your brakes have to ramp on or off, you'll never be exactly on the curve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/PID_controller" />
  <row Id="16390" PostHistoryTypeId="5" PostId="7731" RevisionGUID="700c9f82-9b85-4780-be00-0caa32512d08" CreationDate="2011-02-03T15:04:33.837" UserId="4191" Comment="tweak phrasings to clarify that i mean that subjective testing by humans is important" Text="I don't think TDD, as such, is appropriate as a foundation for game development.  Automated unit testing as part of methodology, sure, but too many of the key concerns of game development are subjective and not machine-testable for testing to be the *driver* of development.  How are you going to write a scripted test for whether a game mechanic is fun?  That a level is visually appealing?  Even that a level takes a typical player around 15 minutes to complete?  TDD fits situations where the maturity of a project can be quantitatively measured in terms of its compliance to a specification, and that just isn't game development." />
  <row Id="16391" PostHistoryTypeId="2" PostId="8049" RevisionGUID="b2d48945-71ff-4a7a-a50e-4a586a303b5e" CreationDate="2011-02-03T15:04:55.710" UserId="20" Text="Have a look at [steering behaviors][1]. Especially [seek][2] and [arrival][3] might be interesting for your needs. These behaviors will also work when some other influences like an explosion changes the ships position temporarily. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/SeekFlee.html&#xD;&#xA;  [3]: http://www.red3d.com/cwr/steer/Arrival.html" />
  <row Id="16393" PostHistoryTypeId="2" PostId="8050" RevisionGUID="62a75b32-a7c7-444a-81d7-6475badc5672" CreationDate="2011-02-03T15:10:51.337" UserId="3563" Text="I am doing a GL multi-pass rendering app for iOS. The first pass renders to a depthbuffer texture. The second pass uses the values in the depth buffer to control the application of a fragment shader. I want to rescale the values in the depthbuffer to something useful but before I can do that I need to know the depth value range of the depthbuffer values. How do I do this?&#xD;&#xA;&#xD;&#xA;Thanks,  &#xD;&#xA;Doug&#xD;&#xA; " />
  <row Id="16394" PostHistoryTypeId="1" PostId="8050" RevisionGUID="62a75b32-a7c7-444a-81d7-6475badc5672" CreationDate="2011-02-03T15:10:51.337" UserId="3563" Text="In OpenGL Can I Discover the Depth Range of a Depth Buffer?" />
  <row Id="16395" PostHistoryTypeId="3" PostId="8050" RevisionGUID="62a75b32-a7c7-444a-81d7-6475badc5672" CreationDate="2011-02-03T15:10:51.337" UserId="3563" Text="&lt;opengl-es&gt;&lt;ios&gt;&lt;depth-buffer&gt;" />
  <row Id="16396" PostHistoryTypeId="2" PostId="8051" RevisionGUID="d76a21ad-fed7-4c27-9645-60a5c625aa88" CreationDate="2011-02-03T15:21:27.537" UserId="3794" Text="Values in depth buffer are always in range between 0-1. Zero is that rendered fragment is in depth of near plane and 1 is that fragment is in depth of far plane. And everything between it. &#xD;&#xA;&#xD;&#xA;If you want to know real depth in world space it is easy to compute it from depth buffer. &#xD;&#xA;&#xD;&#xA;    depth = nearPlane + ( farPlane - nearPlane ) * depthBufferValue;&#xD;&#xA;&#xD;&#xA;And thats why you specify the near and far planes. To gain more accuracy of depth buffer. &#xD;&#xA;&#xD;&#xA;Also be aware of difference between depth and distance when using depth buffer values.&#xD;&#xA;" />
  <row Id="16397" PostHistoryTypeId="6" PostId="8050" RevisionGUID="2204c0a0-c4f2-4420-9e7d-e6c6fa675f65" CreationDate="2011-02-03T15:22:14.137" UserId="3794" Comment="edited tags" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;depth-buffer&gt;" />
  <row Id="16398" PostHistoryTypeId="5" PostId="8051" RevisionGUID="2057d610-88bd-4d8a-b96a-a75b8f1ed5af" CreationDate="2011-02-03T15:26:59.077" UserId="3794" Comment="deleted 1 characters in body" Text="Values in depth buffer are always in range between 0-1. Zero is that rendered fragment is in depth of near plane and 1 is that fragment is in depth of far plane. And everything between it. &#xD;&#xA;&#xD;&#xA;If you want to know real depth in world space it is easy to compute it from depth buffer. &#xD;&#xA;&#xD;&#xA;    depth = nearPlane + ( farPlane - nearPlane ) * depthBufferValue;&#xD;&#xA;&#xD;&#xA;And thats why you specify the near and far planes to gain more accuracy of depth buffer. &#xD;&#xA;&#xD;&#xA;Also be aware of difference between depth and distance when using depth buffer values.&#xD;&#xA;" />
  <row Id="16402" PostHistoryTypeId="5" PostId="8051" RevisionGUID="85a99c87-0f95-4b78-8412-51c093e1c6e6" CreationDate="2011-02-03T15:35:45.917" UserId="3794" Comment="added 26 characters in body" Text="Values in depth buffer are always in range between 0-1. Zero is that rendered fragment is in depth of near plane and 1 is that fragment is in depth of far plane. And everything between it. &#xD;&#xA;&#xD;&#xA;If you want to know real depth in world space it is easy to compute it from depth buffer. &#xD;&#xA;&#xD;&#xA;    depth = nearPlane + ( farPlane - nearPlane ) * depthBufferValue;&#xD;&#xA;&#xD;&#xA;And thats why you specify the near and far planes in your projection matri, to gain more accuracy of depth buffer. &#xD;&#xA;&#xD;&#xA;Also be aware of difference between depth and distance when using depth buffer values.&#xD;&#xA;" />
  <row Id="16403" PostHistoryTypeId="2" PostId="8053" RevisionGUID="a9fe9767-3469-4f01-80d9-4d1459dedf26" CreationDate="2011-02-03T15:37:46.043" UserId="2862" Text="Two of the widest used 3D modeling tools in the development/modding areas are:&#xD;&#xA;&#xD;&#xA;- **[Gmax][1]** - free modified version of 3ds max&#xD;&#xA;&#xD;&#xA;   - exports to [MD5, MD3, ASE][2]&#xD;&#xA;&#xD;&#xA;- **[XSI Modtool][3]** - free modified version of softimage XSI&#xD;&#xA;&#xD;&#xA;   - exports to XNA, Unreal, Cryengine, FBX/Collada&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com/gmax&#xD;&#xA;  [2]: http://www.katsbits.com/tools/&#xD;&#xA;  [3]: http://www.google.co.in/search?q=xsi+modtool" />
  <row Id="16407" PostHistoryTypeId="2" PostId="8054" RevisionGUID="fcdc674f-2c3b-480d-83b2-a8ea20aa1ce8" CreationDate="2011-02-03T16:35:59.387" UserId="1430" Text="The range of the values written to the depth buffer are whatever you want them to be. Typically they fall in the 0-to-1 range. The actual value that is written in to the depth buffer is computed during the viewport transformation, based on the Z value of vertex in NDC space (after the perspective divide by w in clip space). &#xD;&#xA;&#xD;&#xA;The NDC depth value (Z, after the perspective divide by W) is scaled by depth portion of the viewport transformation (which brings your X and Y coordinates into a coordinate space you'd associate with pixels in the window), and then scaled by `(2^n-1)` -- that's meant to be read as &quot;two to the power of `n`&quot; -- `n` is the bit precision of the depth buffer. The resulting value is written to the depth buffer.&#xD;&#xA;&#xD;&#xA;OpenGL splits definition of the viewport transformation matrix into [glViewport][1] and [glDepthRange][2] calls. glDepthRange is what controls the scale factor responsible for determining the depth range you are asking about. You can call [glGetFloatv][3] with the `GL_DEPTH_RANGE` selector to recover the current range. This will allow you to make use of the range without assuming it's 0 to 1 (although 99.9% of the time, in practice, nobody ever changes it).&#xD;&#xA;&#xD;&#xA;Further reading, if you want some insight on how to reconstruct the math to follow the Z value all the way from eye space to the depth buffer.&#xD;&#xA;&#xD;&#xA;  * [The OpenGL Projection Matrix][4]&#xD;&#xA;  * [&quot;Why is my depth buffer precision so poor?&quot;][5]&#xD;&#xA;  * [Learning to Love Your Z Buffer][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml&#xD;&#xA;  [2]: http://www.khronos.org/opengles/sdk/1.1/docs/man/glDepthRange.xml&#xD;&#xA;  [3]: http://www.khronos.org/opengles/sdk/1.1/docs/man/glGet.xml&#xD;&#xA;  [4]: http://www.songho.ca/opengl/gl_projectionmatrix.html&#xD;&#xA;  [5]: http://www.opengl.org/resources/faq/technical/depthbuffer.htm&#xD;&#xA;  [6]: http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html" />
  <row Id="16408" PostHistoryTypeId="2" PostId="8055" RevisionGUID="1ad41997-32b3-48b1-8d14-8161eea98c90" CreationDate="2011-02-03T16:43:41.523" UserDisplayName="user5141" Text="Hey, im a newbie at this programming lark and its really frustrating me. I'm trying to move a snake in all directions while using classes. Ive created a vector2 for speed and ive attempted creating a method which moves the snake within the snake class. &#xD;&#xA;&#xD;&#xA;Now I'm confused and not sure what to do next. &#xD;&#xA;&#xD;&#xA;Appreciate any help. Thanks :D&#xD;&#xA;&#xD;&#xA;This is what i've done in terms of the method...&#xD;&#xA;&#xD;&#xA;  public Vector2 direction()&#xD;&#xA;        {&#xD;&#xA;                Vector2 inputDirection = Vector2.Zero;&#xD;&#xA;&#xD;&#xA;                if (Keyboard.GetState().IsKeyDown(Keys.Left)) inputDirection.X -= -1;&#xD;&#xA;                if (Keyboard.GetState().IsKeyDown(Keys.Right)) inputDirection.X += 1;&#xD;&#xA;                if (Keyboard.GetState().IsKeyDown(Keys.Up)) inputDirection.Y -= -1;&#xD;&#xA;                if (Keyboard.GetState().IsKeyDown(Keys.Down)) inputDirection.Y += 1;&#xD;&#xA;&#xD;&#xA;                return inputDirection * snakeSpeed;&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Appreciate any help. Thanks :D" />
  <row Id="16409" PostHistoryTypeId="1" PostId="8055" RevisionGUID="1ad41997-32b3-48b1-8d14-8161eea98c90" CreationDate="2011-02-03T16:43:41.523" UserDisplayName="user5141" Text="Moving my sprite in XNA using classes" />
  <row Id="16410" PostHistoryTypeId="3" PostId="8055" RevisionGUID="1ad41997-32b3-48b1-8d14-8161eea98c90" CreationDate="2011-02-03T16:43:41.523" UserDisplayName="user5141" Text="&lt;xna&gt;" />
  <row Id="16411" PostHistoryTypeId="5" PostId="8055" RevisionGUID="f8fe42ed-f489-4efb-8eb0-8632ba0230bb" CreationDate="2011-02-03T16:49:20.627" UserId="51" Comment="added 50 characters in body" Text="Hey, im a newbie at this programming lark and its really frustrating me. I'm trying to move a snake in all directions while using classes. Ive created a vector2 for speed and ive attempted creating a method which moves the snake within the snake class. &#xD;&#xA;&#xD;&#xA;Now I'm confused and not sure what to do next. &#xD;&#xA;&#xD;&#xA;Appreciate any help. Thanks :D&#xD;&#xA;&#xD;&#xA;This is what i've done in terms of the method...&#xD;&#xA;&#xD;&#xA;      public Vector2 direction()&#xD;&#xA;            {&#xD;&#xA;                    Vector2 inputDirection = Vector2.Zero;&#xD;&#xA;    &#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Left)) inputDirection.X -= -1;&#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Right)) inputDirection.X += 1;&#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Up)) inputDirection.Y -= -1;&#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Down)) inputDirection.Y += 1;&#xD;&#xA;    &#xD;&#xA;                    return inputDirection * snakeSpeed;&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Appreciate any help. Thanks :D&#xD;&#xA;" />
  <row Id="16412" PostHistoryTypeId="2" PostId="8056" RevisionGUID="ef64b475-9889-4c6b-9b61-6e83f50c9aec" CreationDate="2011-02-03T17:02:06.357" UserId="51" Text="&gt; Now I'm confused and not sure what to do next.&#xD;&#xA;&#xD;&#xA;Does this mean your code isn't doing what you think it should be doing or do you have some feature that you need to implement that you don't know how or do you want advice on what feature to implement next?&#xD;&#xA;&#xD;&#xA;Either way...&#xD;&#xA;&#xD;&#xA;    if (Keyboard.GetState().IsKeyDown(Keys.Left)) inputDirection.X -= -1;&#xD;&#xA;    if (Keyboard.GetState().IsKeyDown(Keys.Right)) inputDirection.X += 1;&#xD;&#xA;&#xD;&#xA;You don't want to subtract a negative for one direction and add a positive in the other.  Those two evaluate to the same thing." />
  <row Id="16413" PostHistoryTypeId="25" PostId="8045" RevisionGUID="4b3d4278-e097-4b31-9619-538f6815b535" CreationDate="2011-02-03T17:16:09.280" Comment="http://twitter.com/#!/StackGameDev/status/33212153481662464" />
  <row Id="16414" PostHistoryTypeId="2" PostId="8057" RevisionGUID="9d7d111b-a868-4d76-87d9-5a3f6f3dd6a3" CreationDate="2011-02-03T17:24:11.120" UserId="2778" Text="Although I am also a newbie in game development, here the approach I've went with, and this works fine for me.&#xD;&#xA;&#xD;&#xA;    Keys[] keys = Keyboard.GetState().GetPressedKeys();&#xD;&#xA;&#xD;&#xA;    if (keys != null &amp;&amp; keys.Length &gt; 0)&#xD;&#xA;        switch (keys[0]) {&#xD;&#xA;            case Keys.Escape:&#xD;&#xA;                Exit;&#xD;&#xA;                break;&#xD;&#xA;            case Keys.Down:&#xD;&#xA;                MoveDown();&#xD;&#xA;                break;&#xD;&#xA;            case Keys.Left:&#xD;&#xA;                MoveLeft();&#xD;&#xA;                break;&#xD;&#xA;            case Keys.Right:&#xD;&#xA;                MoveRight();&#xD;&#xA;                break;&#xD;&#xA;            case Keys.Up:&#xD;&#xA;                MoveUp();&#xD;&#xA;                break;&#xD;&#xA;            default:&#xD;&#xA;                break;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    void MoveDown() {&#xD;&#xA;        inputDirection.Y++;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveLeft() {&#xD;&#xA;        inputDirection.X--;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveRight() {&#xD;&#xA;        inputDirection.X++;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveUp() {&#xD;&#xA;        inputDirection.Y--;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When you want to increase the moves' speed, you only need to increment or decrement the `inputDirection.X` or `inputDirection.Y` accordingly.&#xD;&#xA;&#xD;&#xA;I hope this helps, and to be on the right direction to a viable solution! =)" />
  <row Id="16415" PostHistoryTypeId="17" PostId="8059" RevisionGUID="60caaed0-05d5-4dca-842f-14d18dcfc7ab" CreationDate="2011-02-03T17:34:02.350" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/15910/wow-lua-getting-quest-attributes-before-the-quest-detail-event/15915#15915" Text="" />
  <row Id="16416" PostHistoryTypeId="2" PostId="8059" RevisionGUID="7a1a13c2-4f45-4ae7-a1ae-41a70e6cfbe6" CreationDate="2011-02-03T15:36:54.137" UserDisplayName="Shaun" Text="[GetGossipAvailableQuests][1] allows you to get available quests from the NPC once you have triggered the [GOSSIP_SHOW event][2]. Assuming the &quot;one click&quot; is a right-click within range of the NPC, this would work.&#xD;&#xA;&#xD;&#xA;If you're looking for something that's available via a left-click at any range, I'm unfamiliar with such an API function.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wowwiki.com/API_GetGossipAvailableQuests&#xD;&#xA;  [2]: http://www.wowwiki.com/Events/G#GOSSIP_SHOW" />
  <row Id="16417" PostHistoryTypeId="2" PostId="8058" RevisionGUID="657171be-5fbf-4dc9-a8d0-e24ee31d7062" CreationDate="2011-02-03T15:08:40.540" UserDisplayName="Matt DiTrolio" Text="**I'd like to determine the attributes of a quest (i.e.,  information provided by functions such as QuestIsDaily and IsQuestCompletable) *before* the player clicks on the quest detail.**&#xD;&#xA;&#xD;&#xA;I'm trying to write an add-on that handles accepting and completing of daily quests with a single click on the NPC, but I'm running into a problem whereby I can't find out anything about a given quest unless the quest text is currently being displayed, defeating the purpose of the add-on. Other add-ons of this nature seem to be getting around this limitation by hard-coding information about quests, an approach I don't much like as it requires constant maintenance.&#xD;&#xA;&#xD;&#xA;It seems to me that this information must be available somehow, as the game itself can properly figure out which icon to display over the head of the NPC without player interaction. The only question is, are add-on authors allowed access to this information? If so, how?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;EDIT: What I originally left out was that the situations I'm trying to address are when:&#xD;&#xA;&#xD;&#xA; 1. An NPC has multiple quests&#xD;&#xA; 2. The quest detail is not the first thing that shows up upon right-click&#xD;&#xA;&#xD;&#xA;Otherwise, the situation is much simpler, as I have the information I need provided immediately.&#xD;&#xA;" />
  <row Id="16418" PostHistoryTypeId="1" PostId="8058" RevisionGUID="657171be-5fbf-4dc9-a8d0-e24ee31d7062" CreationDate="2011-02-03T15:08:40.540" UserDisplayName="Matt DiTrolio" Text="WoW lua: Getting quest attributes before the QUEST_DETAIL event" />
  <row Id="16419" PostHistoryTypeId="3" PostId="8058" RevisionGUID="657171be-5fbf-4dc9-a8d0-e24ee31d7062" CreationDate="2011-02-03T15:08:40.540" UserDisplayName="Matt DiTrolio" Text="&lt;world-of-warcraft&gt;&lt;quests&gt;" />
  <row Id="16420" PostHistoryTypeId="17" PostId="8058" RevisionGUID="397f5faa-b299-4b84-9f47-50229cf2c782" CreationDate="2011-02-03T17:34:02.350" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/15910/wow-lua-getting-quest-attributes-before-the-quest-detail-event" Text="" />
  <row Id="16421" PostHistoryTypeId="5" PostId="8057" RevisionGUID="596ee8d3-fac5-4672-b023-08854334a654" CreationDate="2011-02-03T17:34:04.880" UserId="2778" Comment="added 409 characters in body" Text="Although I am also a newbie in game development, here the approach I've went with, and this works fine for me.&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime) {&#xD;&#xA;        Keys[] keys = Keyboard.GetState().GetPressedKeys();&#xD;&#xA;&#xD;&#xA;        if (keys != null &amp;&amp; keys.Length &gt; 0)&#xD;&#xA;            switch (keys[0]) {&#xD;&#xA;                case Keys.Escape:&#xD;&#xA;                    Exit();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Down:&#xD;&#xA;                    MoveDown();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Left:&#xD;&#xA;                    MoveLeft();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Right:&#xD;&#xA;                    MoveRight();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Up:&#xD;&#xA;                    MoveUp();&#xD;&#xA;                    break;&#xD;&#xA;                default:&#xD;&#xA;                    break;&#xD;&#xA;            }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveDown() {&#xD;&#xA;        snakePos.Y += ++inputDirection.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveLeft() {&#xD;&#xA;        snakeSpeed.X -= --inputDirection.X;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveRight() {&#xD;&#xA;        snakeSpeed.X += ++inputDirection.X;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveUp() {&#xD;&#xA;        snakeSpeed.Y -= --inputDirection.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When you want to increase the moves' speed, you only need to increment or decrement the `inputDirection.X` or `inputDirection.Y` accordingly.&#xD;&#xA;&#xD;&#xA;I might not have taken into account your return value, and I don't know the way your game is structured though you're mentionning about classes. This is a general idea that I have exposed here.&#xD;&#xA;&#xD;&#xA;I hope this helps, and to be on the right direction to a viable solution! =)" />
  <row Id="16422" PostHistoryTypeId="5" PostId="8057" RevisionGUID="3dc0c585-8690-451d-b437-65ae30f80c83" CreationDate="2011-02-03T17:41:57.113" UserId="2778" Comment="added 239 characters in body" Text="Although I am also a newbie in game development, my bet would be that you are always reinitializing your `inputDirection` variable to `Vector2.Zero`.&#xD;&#xA;&#xD;&#xA;Here what I have coded so far in my first game ever (considered only what is relevant to this question):&#xD;&#xA;&#xD;&#xA;    Texture2D _snake;&#xD;&#xA;    Vector2 _snakePos = Vector2.Zero;&#xD;&#xA;    Vector2 _snakeSpeed = new Vector2(10.0f, 10.0f);&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime) {&#xD;&#xA;        Keys[] keys = Keyboard.GetState().GetPressedKeys();&#xD;&#xA;&#xD;&#xA;        if (keys != null &amp;&amp; keys.Length &gt; 0)&#xD;&#xA;            switch (keys[0]) {&#xD;&#xA;                case Keys.Escape:&#xD;&#xA;                    Exit();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Down:&#xD;&#xA;                    MoveDown();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Left:&#xD;&#xA;                    MoveLeft();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Right:&#xD;&#xA;                    MoveRight();&#xD;&#xA;                    break;&#xD;&#xA;                case Keys.Up:&#xD;&#xA;                    MoveUp();&#xD;&#xA;                    break;&#xD;&#xA;                default:&#xD;&#xA;                    break;&#xD;&#xA;            }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveDown() {&#xD;&#xA;        snakePos.Y += _snakeSpeed.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveLeft() {&#xD;&#xA;        snakePos.X -= _snakeSpeed.X;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveRight() {&#xD;&#xA;        snakePos.X += _snakeSpeed.X;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void MoveUp() {&#xD;&#xA;        snakePos.Y -= _snakeSpeed.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When you want to increase the moves' speed, you only need to increment or decrement the `inputDirection.X` or `inputDirection.Y` accordingly.&#xD;&#xA;&#xD;&#xA;I might not have taken into account your return value, and I don't know the way your game is structured though you're mentionning about classes. This is a general idea that I have exposed here.&#xD;&#xA;&#xD;&#xA;I hope this helps, and to be on the right direction to a viable solution! =)" />
  <row Id="16423" PostHistoryTypeId="5" PostId="8059" RevisionGUID="c9bf9769-2150-409a-9c99-05445cc023a7" CreationDate="2011-02-03T17:42:21.387" UserId="5143" Comment="add information about GetGossipActiveQuests" Text="[GetGossipAvailableQuests][1] allows you to get available quests from the NPC once you have triggered the [GOSSIP_SHOW event][2] and allows you to determine if it is a daily quest. [GetGossipActiveQuests][3] allows you to get active quests from the NPC under the same condition and returns a value for each one that indicates whether or not it is complete. Assuming the &quot;one click&quot; is a right-click within range of the NPC, this would work.&#xD;&#xA;&#xD;&#xA;If you're looking for something that's available via a left-click at any range, I'm unfamiliar with such an API function.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wowwiki.com/API_GetGossipAvailableQuests&#xD;&#xA;  [2]: http://www.wowwiki.com/Events/G#GOSSIP_SHOW&#xD;&#xA;  [3]: http://www.wowwiki.com/API_GetGossipActiveQuests" />
  <row Id="16424" PostHistoryTypeId="2" PostId="8060" RevisionGUID="5942a1ee-24e7-425e-8be5-2629cb873c63" CreationDate="2011-02-03T17:44:47.733" UserId="1198" Text="I use code like this to move my sprites, it tends to work quite well for me, it also uses &quot;GameTime&quot; to ensure movement is consistent across frame-rates.&#xD;&#xA;&#xD;&#xA;    // Sprite Protecteds&#xD;&#xA;    Vector2 direction;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    float speed;&#xD;&#xA;    &#xD;&#xA;    // Sprite Code&#xD;&#xA;    void Update(GameTime time, KeyboardState kb)&#xD;&#xA;    {&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Left)) direction.X = -1;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Right)) direction.X = 1;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Up)) direction.Y = -1;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Down)) direction.Y = 1;&#xD;&#xA;    &#xD;&#xA;        position += direction * speed * time. Milliseconds;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Game &quot;Update&quot; method (not sure of exact code here)&#xD;&#xA;    sprite.Update(gameTime, Keyboard.GetState());&#xD;&#xA;&#xD;&#xA;Obviously you may want to provide more parameters to the sprite during its update process, so you may very the speed or other things as well." />
  <row Id="16425" PostHistoryTypeId="2" PostId="8061" RevisionGUID="717962be-1124-4a1d-81f0-b7b596a71d60" CreationDate="2011-02-03T17:46:40.210" UserId="5142" Text="Here's how I'm doing this in one of my games on Windows Phone. Bear in mind that I have made some simplifications for the sake of example. In my game, enemies follow a set of waypoints along a path.&#xD;&#xA;&#xD;&#xA;In the `Update` method inside my `Enemy.cs` class, I evaluate `Enemy.Waypoints.Peek() - Enemy.Position` (normalized) to determine which direction the enemy should be moving.&#xD;&#xA;&#xD;&#xA;    this.Direction = this.Waypoints.Peek() - this.Position;&#xD;&#xA;    this.Direction.Normalize();&#xD;&#xA;&#xD;&#xA;Then, I calculate the velocity (direction + speed) for the current frame using the direction.&#xD;&#xA;&#xD;&#xA;    this.Velocity = Vector2.Multiply(this.Direction, Settings.Speed * this.Speed);&#xD;&#xA;   &#xD;&#xA;Finally, I adjust the actual position of the enemy.&#xD;&#xA;&#xD;&#xA;    // Adjust the position according to the velocity.&#xD;&#xA;    this.Position += this.Velocity;&#xD;&#xA;&#xD;&#xA;It helps to understand the math involved, but this is how you can move an object." />
  <row Id="16426" PostHistoryTypeId="5" PostId="8057" RevisionGUID="cbd33f67-c56f-42f0-9a0b-2270fe1d0289" CreationDate="2011-02-03T17:57:26.040" UserId="2778" Comment="added 350 characters in body" Text="Although I am also a newbie in game development, my bet would be that you are always reinitializing your `inputDirection` variable to `Vector2.Zero`.&#xD;&#xA;&#xD;&#xA;I don't know much about game development, but as for object-oriented programming, that is another thing! **Here what I have come with after having read your comment about classes.**&#xD;&#xA;&#xD;&#xA;    public class Snake {&#xD;&#xA;        private Texture2D _snake; // Represents your snake's sprite.&#xD;&#xA;        private Vector2 _snakePos; // Field that determines your snake's position.&#xD;&#xA;        private Vector2 _snakeSpeed = new Vector2(10.0f, 10.0f); // Field that determines the number of pixels your snake will move at once while moving.&#xD;&#xA;&#xD;&#xA;        public Snake(Vector2 initialPosition) {&#xD;&#xA;            _snakePos = initialPosition;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void MoveDown() {&#xD;&#xA;            _snakePos.Y += _snakeSpeed.Y;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void MoveLeft() {&#xD;&#xA;            _snakePos.X -= _snakeSpeed.X;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void MoveRight() {&#xD;&#xA;            _snakePos.X += _snakeSpeed.Y;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void MoveUp() {&#xD;&#xA;            _snakePos.Y -= _snakeSpeed.Y;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public class Game Game1 {&#xD;&#xA;        private Snake _snake = new Snake();&#xD;&#xA;&#xD;&#xA;        protected override void Update(GameTime gameTime) {&#xD;&#xA;            Keys[] keys = Keyboard.GetState().GetPressedKeys();&#xD;&#xA;&#xD;&#xA;            if (keys != null &amp;&amp; keys.Length &gt; 0)&#xD;&#xA;                switch (keys[0]) {&#xD;&#xA;                    case Keys.Escape:&#xD;&#xA;                        Exit();&#xD;&#xA;                        break;&#xD;&#xA;                    case Keys.Down:&#xD;&#xA;                        _snake.MoveDown();&#xD;&#xA;                        break;&#xD;&#xA;                    case Keys.Left:&#xD;&#xA;                        _snake.MoveLeft();&#xD;&#xA;                        break;&#xD;&#xA;                    case Keys.Right:&#xD;&#xA;                        _snake.MoveRight();&#xD;&#xA;                        break;&#xD;&#xA;                    case Keys.Up:&#xD;&#xA;                        _snake.MoveUp();&#xD;&#xA;                        break;&#xD;&#xA;                    default:&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I hope this helps, and to be on the right direction to a viable solution! =)" />
  <row Id="16427" PostHistoryTypeId="2" PostId="8062" RevisionGUID="3f1342b2-9b01-4e3d-8fa3-fa4e4fca8f3b" CreationDate="2011-02-03T18:06:15.200" UserId="1560" Text="How to create AI in games like suduko/snake and ladder/tic-tac-toe in general  board games where computer is a another opponent." />
  <row Id="16428" PostHistoryTypeId="1" PostId="8062" RevisionGUID="3f1342b2-9b01-4e3d-8fa3-fa4e4fca8f3b" CreationDate="2011-02-03T18:06:15.200" UserId="1560" Text="Artificial intelligence in board games in iPhone?" />
  <row Id="16429" PostHistoryTypeId="3" PostId="8062" RevisionGUID="3f1342b2-9b01-4e3d-8fa3-fa4e4fca8f3b" CreationDate="2011-02-03T18:06:15.200" UserId="1560" Text="&lt;iphone&gt;&lt;ai&gt;" />
  <row Id="16430" PostHistoryTypeId="2" PostId="8063" RevisionGUID="e2d41533-5455-4b1b-a60e-83830b9eccc1" CreationDate="2011-02-03T18:13:39.433" UserId="5142" Text="Your question is *really* broad because of the sheer number of genres out there, but here's the perspective of a professional software developer.&#xD;&#xA;&#xD;&#xA;You provided a list of criteria that you want to use to determine which data persistence mechanism you use. Those were:&#xD;&#xA;&#xD;&#xA; - The size of the project. &#xD;&#xA; - The platform targeted by the game.&#xD;&#xA; - The complexity of the data structure.&#xD;&#xA; - Portability of data amongst many project.&#xD;&#xA; - How often should the data be accessed&#xD;&#xA; - Multiple type of data for a same application&#xD;&#xA; - Any other point you think is of interest when deciding what to use.&#xD;&#xA;&#xD;&#xA;First we need to establish which options are available to us. Since you didn't specify a language or technology, it's hard to say exactly, but you are probably trying to decide between **XML** and **relational database** storage. &#xD;&#xA;&#xD;&#xA;An important distinction to make is that **XML** isn't really a storage *mechanism* so much as a serialization technique. It's a way to represent in-memory structures for your game. Given that, you're really talking about **flat file** vs. **relational database** storage. These aren't the only options, but they're the most common, so I'm going to use them.&#xD;&#xA;&#xD;&#xA;For flat files:&#xD;&#xA;&#xD;&#xA; - XML&#xD;&#xA; - JSON&#xD;&#xA; - YAML&#xD;&#xA; - XAML&#xD;&#xA; - Plain Text&#xD;&#xA;&#xD;&#xA;For databases:&#xD;&#xA;&#xD;&#xA; - SQL Server&#xD;&#xA; - MySQL&#xD;&#xA; - DB2&#xD;&#xA; - Oracle&#xD;&#xA; - Many More&#xD;&#xA;&#xD;&#xA;Now that we have all the basics out of the way, let's touch on some of your criteria.&#xD;&#xA;&#xD;&#xA;**The size of the project.** &#xD;&#xA; &#xD;&#xA;Some might disagree, but the size of your project won't necessarily have a huge impact on your data persistence mechanism. You will want to build a reusable library of functions that store/load data from whichever mechanism you want. I would even suggest implementing an abstraction layer (check out the [Adapter pattern][1]) so that you could easily change your persistence mechanism if you needed to.&#xD;&#xA;&#xD;&#xA;Having said that, for small projects, using XML on the file system can potentially work well, but you will want to address some of your security concerns (i.e., encryption) so that players can't change data at will.&#xD;&#xA;&#xD;&#xA;**The platform targeted by the game.**&#xD;&#xA; &#xD;&#xA;Platform isn't going to be a huge issue either. You should be more concerned about your development platform than the target platform. The reason for this is that some languages handle certain types of markup or databases better than others out of the box. That isn't to say that you couldn't use any of the above in almost any language, but sometimes it's best to use the supported tools that are available to you. Any platform will support flat files and parse XML, but on mobile platforms you might want to consider binary serialization if possible, or at least optimize your XML for storage.&#xD;&#xA;&#xD;&#xA;**The complexity of the data structure.**&#xD;&#xA; &#xD;&#xA;This is sort of a tricky one. Relational databases are great for just that...storing entities and their relationships. You have a better ability to enforce structure using a relational storage repository than you do with files on a file system. Consider the types of relationships between your entities as well as how often you're changing them or finding related entities. For extremely complex structures, I would suggest going the database route.&#xD;&#xA;&#xD;&#xA;**Portability of data amongst many project.**&#xD;&#xA; &#xD;&#xA;When it comes to portability, you should consider the fact that databases are naturally more heavyweight than files. There's installation and configuration overhead, different databases will be available for different platforms, etc. SQLite is a pretty good way around this. However, when it comes to portability, you will likely have an easier time with file-based solutions like XML.&#xD;&#xA;&#xD;&#xA;**How often should the data be accessed**&#xD;&#xA; &#xD;&#xA;Lots of data access means lots of I/O unless you have some kind of a caching mechanism. Databases keep structures in memory and are great for data manipulation and retrieval. If you're really persisting data constantly, you might want to stick with a database.&#xD;&#xA;&#xD;&#xA;**Multiple type of data for a same application**&#xD;&#xA; &#xD;&#xA;Volume is certainly a consideration, but unless you're talking about persisting thousands or millions of objects, file system will still be acceptable as a solution.&#xD;&#xA;&#xD;&#xA;**Game Type**&#xD;&#xA; &#xD;&#xA;The type of game you're building can have a huge influence on the platform you choose. Yeah, for most client-only single-player games, you're going to be fine using a compressed or encrypted file system-based solution. If you're talking about games with an online component, though, that would be crazy. Go the database route and save yourself the headache. Let the server manage all of your data using a back-end cluster.&#xD;&#xA;&#xD;&#xA;Hope some of this feedback helps. It's by no means completely comprehensive, and making the decision is ultimately up to you, but my commentary should give you some things to think about.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adapter_pattern" />
  <row Id="16431" PostHistoryTypeId="2" PostId="8064" RevisionGUID="f5068bcc-09bb-4df8-9aa8-58a2ac702417" CreationDate="2011-02-03T18:20:20.777" UserId="1430" Text="This is a really general question, so you're probably only going to get overly-general answers until you post a new, more specific question.&#xD;&#xA;&#xD;&#xA;It's also going to differ pretty significantly depending on the style of game. For example, the [algorithms used to implement Sudoku solvers][1] differ from those [used to solve tic-tac-toe, chess, or Go (game trees / alpha-beta pruning)][2]. And I'm not sure what kind of AI is necessary for Snake -- generally it tends to be mostly random.&#xD;&#xA;&#xD;&#xA;Alpha-beta pruning is probably the most common search technique for most of the class of board games you're thinking of (at least as far as *I* know, but I'm admittedly not terribly familiar with AI). There's also [Negascout][3] and [whatever this is][4] (these last two links aren't that great, if you spend more time sifting through the Google search results you can probably find better since you presumably have a more detailed idea of what you're really looking for).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Sudoku_algorithms&#xD;&#xA;  [2]: http://www.ocf.berkeley.edu/~yosenl/extras/alphabeta/alphabeta.html&#xD;&#xA;  [3]: http://www.iis.sinica.edu.tw/~tshsu/tcg2010/slides/slide8.pdf&#xD;&#xA;  [4]: http://www.top-5000.nl/ps/An%20Algorithm%20faster%20than%20negascout%20and%20SSS%20in%20pratice.pdf" />
  <row Id="16432" PostHistoryTypeId="5" PostId="8038" RevisionGUID="5be68ad3-cc0b-47bf-ae0d-e5bdecce1f79" CreationDate="2011-02-03T18:33:24.407" UserId="1156" Comment="added 29 characters in body" Text="&gt; 2.5D (&quot;two-and-a-half-dimensional&quot;), 3/4 perspective and pseudo-3D are&#xD;&#xA;&gt; terms used to describe either:&#xD;&#xA;&gt; &#xD;&#xA;&gt;  - graphical projections and techniques    which cause a series of&#xD;&#xA;&gt; images or    scenes to fake or appear&#xD;&#xA;&gt; to be    three-dimensional (3D) when&#xD;&#xA;&gt; in fact    they are not, or&#xD;&#xA;&gt;  - gameplay in an otherwise    three-dimensional video game that is  &#xD;&#xA;&gt; restricted to a two-dimensional   &#xD;&#xA;&gt; plane.&#xD;&#xA;&gt; &#xD;&#xA;&gt; *(Information taken from Wikipedia.org)*&#xD;&#xA;&#xD;&#xA;I have a question based on 2.5D game development. As stated before, 2.5D uses *graphical projections and techniques* to make fake 3d or a gameplay restricted to a *two-dimensional plane*.&#xD;&#xA;&#xD;&#xA;A good example is a TQ Digital made game: Zero Online ([screenshot][1]) the whole map is made of 2d images and only NPCs and players are 3d.&#xD;&#xA;&#xD;&#xA;The maps were drawn manually by hand without any 3d software rendering. As I'm playing the game I feel like I'm going from a lower part of the map (ground) to a higher one (some metal platform) and it feels like I'm moving in 3 dimensions. But when I look closely, I see that the player size didn't change and the shadow too but I'm still feeling like I'm somehow higher then before (I had rendered a simple map myself that I made in 3dmax but it didn't quite give the result I wanted).&#xD;&#xA;&#xD;&#xA;How can you accomplish such an effect?&#xD;&#xA;&#xD;&#xA;  [1]: http://i337.photobucket.com/albums/n372/ne5tebiu/driver6722042.jpg" />
  <row Id="16433" PostHistoryTypeId="4" PostId="8062" RevisionGUID="694216d8-853a-4871-9e1b-3b3f71c3968f" CreationDate="2011-02-03T18:59:13.683" UserId="51" Comment="removed iphone reference" Text="Artificial intelligence in board games?" />
  <row Id="16434" PostHistoryTypeId="6" PostId="8062" RevisionGUID="694216d8-853a-4871-9e1b-3b3f71c3968f" CreationDate="2011-02-03T18:59:13.683" UserId="51" Comment="removed iphone reference" Text="&lt;ai&gt;" />
  <row Id="16435" PostHistoryTypeId="5" PostId="8060" RevisionGUID="003f025d-e026-497a-8f56-574b341a7eeb" CreationDate="2011-02-03T19:02:09.790" UserId="1198" Comment="fixe bug in code sample" Text="I use code like this to move my sprites, it tends to work quite well for me, it also uses &quot;GameTime&quot; to ensure movement is consistent across frame-rates.&#xD;&#xA;&#xD;&#xA;    // Sprite Protecteds&#xD;&#xA;    Vector2 direction;&#xD;&#xA;    Vector2 position;&#xD;&#xA;    float speed;&#xD;&#xA;    &#xD;&#xA;    // Sprite Code&#xD;&#xA;    void Update(GameTime time, KeyboardState kb)&#xD;&#xA;    {&#xD;&#xA;        // reset to zero for no keys pressed&#xD;&#xA;        direction = Vector2.Zero;&#xD;&#xA;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Left)) direction.X = -1;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Right)) direction.X = 1;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Up)) direction.Y = -1;&#xD;&#xA;        if (Keyboard.GetState().IsKeyDown(Keys.Down)) direction.Y = 1;&#xD;&#xA;    &#xD;&#xA;        position += direction * speed * time. Milliseconds;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Game &quot;Update&quot; method (not sure of exact code here)&#xD;&#xA;    sprite.Update(gameTime, Keyboard.GetState());&#xD;&#xA;&#xD;&#xA;Obviously you may want to provide more parameters to the sprite during its update process, so you may very the speed or other things as well." />
  <row Id="16436" PostHistoryTypeId="5" PostId="8055" RevisionGUID="9ae4e052-fc99-410f-a988-2e4cde6c7a05" CreationDate="2011-02-03T19:10:18.773" UserDisplayName="user5141" Comment="added 486 characters in body" Text="Hey, im a newbie at this programming lark and its really frustrating me. I'm trying to move a snake in all directions while using classes. Ive created a vector2 for speed and ive attempted creating a method which moves the snake within the snake class. &#xD;&#xA;&#xD;&#xA;Now I'm confused and not sure what to do next. &#xD;&#xA;&#xD;&#xA;Appreciate any help. Thanks :D&#xD;&#xA;&#xD;&#xA;This is what i've done in terms of the method...&#xD;&#xA;&#xD;&#xA;      public Vector2 direction()&#xD;&#xA;            {&#xD;&#xA;                    Vector2 inputDirection = Vector2.Zero;&#xD;&#xA;    &#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Left)) inputDirection.X -= -1;&#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Right)) inputDirection.X += 1;&#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Up)) inputDirection.Y -= -1;&#xD;&#xA;                    if (Keyboard.GetState().IsKeyDown(Keys.Down)) inputDirection.Y += 1;&#xD;&#xA;    &#xD;&#xA;                    return inputDirection * snakeSpeed;&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Appreciate any help. Thanks :D&#xD;&#xA;&#xD;&#xA;EDIT: 	&#xD;&#xA;Well let me make everything clear. Im making a small basic game for an assignment. The game is similar to the old snake game on the old Nokia phones. I've created a snake class (even though I'm not sure whether this is needed because im only going to be having one moving sprite within the game). After I written the code above (in the snake class), the game ran with no errors but I couldn't actually move the image :( &#xD;&#xA;&#xD;&#xA;EDIT2: &#xD;&#xA;Thanks so much for everyones responses!!&#xD;&#xA;" />
  <row Id="16437" PostHistoryTypeId="2" PostId="8065" RevisionGUID="0b42ff1b-feee-45b5-8771-10043029fd21" CreationDate="2011-02-03T19:10:24.800" UserId="160" Text="The meta-answer: you should *never* just spend a day staring at code looking for performance problems. Five minutes with a profiler would show you exactly where the bottlenecks are. You can download a free trail of most profilers and get it hooked up to your app in a few minutes." />
  <row Id="16438" PostHistoryTypeId="2" PostId="8066" RevisionGUID="2cba98c6-a50d-42fc-a09b-3f52023f6568" CreationDate="2011-02-03T19:49:02.977" UserId="2261" Text="For your game, I have some suggestions.&#xD;&#xA;&#xD;&#xA;Interesting idea, but scrap it and start again.  Okay, not completely scrap it, but it needs some work :D&#xD;&#xA;&#xD;&#xA;(0) rebrand it as an edumacational - pitch it at kids - target the home school market&#xD;&#xA;&#xD;&#xA;(1) The music seems kind of repetititve&#xD;&#xA;&#xD;&#xA;(2) The music cancels the user's music which might have been playing in the background, don't do this&#xD;&#xA;&#xD;&#xA;(3) The initial (easy) trees are way too big&#xD;&#xA;&#xD;&#xA;(4) Tutorial with set tree (something like only 6 slots, and a predefined set of ornaments, and you walk the player through the process&#xD;&#xA;&#xD;&#xA;(5) First row of first tree should have... I dunno, 6 or 10 slots, then add a row every row or two they go up the tree&#xD;&#xA;&#xD;&#xA;(6) rapid early progress is good!  Even an adult can lose interest if the first ones are too 'hard' (read as: take too long even if they are actually 'trivial' compared to later trees)&#xD;&#xA;&#xD;&#xA;(7) work on the doco.  Okay, I get the thing about English not being your first language, and I have tremendous respect for people who speak multiple languages, so my hat goes off to you sir.  HOWEVER - when you target the educational market you want to be a bit more precise.  Example: trees are not 'male', so do not refer to them as 'his' - e.g. his sub-trees.&#xD;&#xA;&#xD;&#xA;(8) Straight out of the gate I think you gave up too easily.  The average paid iPhone game makes about $2000, which means that **most** games make considerably less than that, probably $1000 or less.  The average is skewed because you have a small handful of games (Angry Birds) that make enormous money.&#xD;&#xA;&#xD;&#xA;So I think you need to reset your expectations.  iPhone development is like the lottery, we all hear about the big winners, but most tickets are disappointing.  On the other hand, if I paid $100 for a lotto ticket, and it only gave me back $10, that would seem like a bad deal, but if it gave me back $10 *every week for the next 5 years* I'd be a lot happier and go and buy a lot more of them.  :D  Rather than getting one massive royalty cheque that you can use to buy a house, lambo and Brazilian supermodel on day one, you need to think of it as a stream of income - or better yet, a tree!  A tree that you need to tend and if you take good care of it it will slowly grow until it provides you shelter.&#xD;&#xA;&#xD;&#xA;:D&#xD;&#xA;&#xD;&#xA;Hope you found these comments useful" />
  <row Id="16439" PostHistoryTypeId="2" PostId="8067" RevisionGUID="828e0533-7bc3-4fae-a624-b1c95459b2db" CreationDate="2011-02-03T19:52:56.413" UserId="2708" Text="I'm trying to use gluLookAt to move the camera in my iPhone game, but every time I've tried to use gluLookAt my screen just goes &quot;blank&quot; ( grey in this case )&#xD;&#xA;&#xD;&#xA;I'm trying to render a simple triangle and to move the camera, this is my code:&#xD;&#xA;&#xD;&#xA;to setup my scene I do:&#xD;&#xA;&#xD;&#xA;	glViewport(0, 0, backingWidth, backingHeight);&#xD;&#xA;	glMatrixMode(GL_PROJECTION);&#xD;&#xA;	glLoadIdentity();&#xD;&#xA;	glRotatef(-90.0, 0.0, 0.0, 1.0); //using iPhone in horizontal mode&#xD;&#xA;	glOrthof(-240, 240, -160, 160, -1, 1);&#xD;&#xA;	glMatrixMode(GL_MODELVIEW);&#xD;&#xA;&#xD;&#xA;then my &quot;triangle rendering&quot; code looks like:&#xD;&#xA;	&#xD;&#xA;    GLfloat  triangle[] = {0, 100, 100, 0, -100, 0,};&#xD;&#xA;    glClearColor(0.7, 0.7, 0.7, 1.0);&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;    glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;    glColor4f(1.0, 0.0, 0.0, 1.0);&#xD;&#xA;    glVertexPointer(2, GL_FLOAT, 0, &amp;triangle);&#xD;&#xA;    glDrawArrays(GL_TRIANGLES, 0, 6);&#xD;&#xA;    glDisableClientState(GL_VERTEX_ARRAY);&#xD;&#xA; &#xD;&#xA;This draws a red triangle in the middle of the screen, when I try to apply gluLookAt ( I got the implementation of the function from Cocos2D so I asume it's correct ), i do:&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt(0,0,1,0,0,0,0,0,1); // try to move the camera a bit ?&#xD;&#xA;&#xD;&#xA;    GLfloat  triangle[] = {0, 100, 100, 0, -100, 0,};&#xD;&#xA;    glClearColor(0.7, 0.7, 0.7, 1.0);&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;    glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;    glColor4f(1.0, 0.0, 0.0, 1.0);&#xD;&#xA;    glVertexPointer(2, GL_FLOAT, 0, &amp;triangle);&#xD;&#xA;    glDrawArrays(GL_TRIANGLES, 0, 6);&#xD;&#xA;    glDisableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;&#xD;&#xA;This leads me to grey screen (glClearColor is grey), I've tried all sort of things and read what I've found about gluLookAt on the net, but no luck :(, if someone could explain me or show me how to move to move the camera in a top-down fashion ( zelda, etc ), I would really appreciate it.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="16440" PostHistoryTypeId="1" PostId="8067" RevisionGUID="828e0533-7bc3-4fae-a624-b1c95459b2db" CreationDate="2011-02-03T19:52:56.413" UserId="2708" Text="Using gluLookAt to move camera in 2D iPhone game ?" />
  <row Id="16441" PostHistoryTypeId="3" PostId="8067" RevisionGUID="828e0533-7bc3-4fae-a624-b1c95459b2db" CreationDate="2011-02-03T19:52:56.413" UserId="2708" Text="&lt;opengl&gt;&lt;iphone&gt;&lt;opengl-es&gt;&lt;glulookat&gt;" />
  <row Id="16442" PostHistoryTypeId="2" PostId="8068" RevisionGUID="d365622a-877b-45cc-a97e-2d7ac0a59744" CreationDate="2011-02-03T20:23:39.253" UserDisplayName="user5150" Text="Yes so this is a question more oriented towards the planning / project part of game development. What software do you use to plan your game, I am talking about visual stuff like a mindmap application for making some neat diagrams and so on, sort of like database design only it's for the game instead, is there any good ones? &#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16443" PostHistoryTypeId="1" PostId="8068" RevisionGUID="d365622a-877b-45cc-a97e-2d7ac0a59744" CreationDate="2011-02-03T20:23:39.253" UserDisplayName="user5150" Text="Software for game system design overview" />
  <row Id="16444" PostHistoryTypeId="3" PostId="8068" RevisionGUID="d365622a-877b-45cc-a97e-2d7ac0a59744" CreationDate="2011-02-03T20:23:39.253" UserDisplayName="user5150" Text="&lt;game-design&gt;&lt;project-management&gt;&lt;planning&gt;&lt;design&gt;" />
  <row Id="16445" PostHistoryTypeId="2" PostId="8069" RevisionGUID="5934d5cb-9e57-4116-b4a0-223b71bbd6d0" CreationDate="2011-02-03T20:28:17.717" UserId="189" Text="The most important element in game planning is a good design document. The typical example is [Chris Taylor's game design document][1]. Also check out this question: [&quot;Design Document Contents&quot;][2]&#xD;&#xA;&#xD;&#xA;Also for the technology involved in storing and editing documents and team management, check out [&quot;What type of document for game design?&quot;][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.runawaystudios.com/articles/chris_taylor_gdd.asp&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/130/design-document-contents&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/4446/what-type-of-document-for-game-design" />
  <row Id="16446" PostHistoryTypeId="2" PostId="8070" RevisionGUID="ce4f312f-ee49-4a66-939f-6e60c3f0af14" CreationDate="2011-02-03T20:43:23.643" UserId="452" Text="The question is a bit vague, so I'll give a primer on the subject.&#xD;&#xA;&#xD;&#xA;To make an AI opponent, you'll need to create a sub-routine that considers the current state of the board and chooses a move, just like the player would. For example, in Tic-Tac-Toe, the subroutine would look at the state of the nine positions of the board, and choose where to place its own mark.&#xD;&#xA;&#xD;&#xA;Now, how does this subroutine choose what move to make? In a simple game like Tic-Tac-Toe, each optimal move is obvious from the rules of the game (try to make three in a row and don't leave open lines to the player). For more complex games like chess, that depend on strategies beyond one move, you start looking into AI.&#xD;&#xA;&#xD;&#xA;AI is basically &quot;guessing for computers&quot; - algorithms that calculate not the best move, but a move that -could be- good. AI algorithms involve, among others:&#xD;&#xA;&#xD;&#xA; - Searching through all possible moves (for this turn, two turns, etc) and calculating which one is &quot;better&quot; (through mathematical formulas called 'heuristics')&#xD;&#xA; - Predicting what the player character will do and trying to minimize damage;&#xD;&#xA; - Memorising track of what strategies worked in the past and reusing them.&#xD;&#xA;&#xD;&#xA;From here it's a matter of studying AI algorithms, discovering which ones work best for your specific game, and implementing the math in code.&#xD;&#xA;&#xD;&#xA;A more indepth look at all the steps of AI programming for games can be found at Programming Game AI by Example, by Mat Buckland&#xD;&#xA;([http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782][1])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782" />
  <row Id="16447" PostHistoryTypeId="2" PostId="8071" RevisionGUID="ad18a70b-20b9-453d-9bf4-fc4cd3aaee4f" CreationDate="2011-02-03T22:29:23.803" UserId="160" Text="When I was at EA, we used some mindmapping software especially during meetings. Design docs were mostly done in Word, although the company has moved to doing most of that in Mediawiki now. Personally, I think wikis are a great fit for game design:&#xD;&#xA;&#xD;&#xA;1. They're non-linear and easily cross-linked.&#xD;&#xA;2. They support images inline.&#xD;&#xA;3. Content is easy to edit by many people (since designs change often).&#xD;&#xA;4. Anyone can view the docs with just a browser.&#xD;&#xA;5. A history of changes is stored with every page." />
  <row Id="16448" PostHistoryTypeId="2" PostId="8072" RevisionGUID="e143601e-971c-4560-bdd6-c7f6186c7a49" CreationDate="2011-02-03T22:31:46.780" UserId="3656" Text="[Freeplane][1] is an awesome fork of [Freemind][2], but you may also like [VUE][3].&#xD;&#xA;&#xD;&#xA;For me, the best tools for game design have always been a pencil and graph paper. Then Google Docs or a wiki to disseminate information throughout the team. Google Groups is useful as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeplane.sourceforge.net/wiki/index.php/Main_Page&#xD;&#xA;  [2]: http://freemind.sourceforge.net/wiki/index.php/Main_Page&#xD;&#xA;  [3]: http://vue.tufts.edu/" />
  <row Id="16449" PostHistoryTypeId="2" PostId="8073" RevisionGUID="1d8fc001-4e4d-42cc-8fe9-2821b34fd17a" CreationDate="2011-02-03T22:52:52.503" UserId="3656" Text="This question needs more lambdas.&#xD;&#xA;&#xD;&#xA;Note this is from a WIP, so there's some unused and implied-but-unimplemented features. Where you see the `() =&gt;` add your `inputDirection.X -= -1;`. I realize this is for a Gamepad and you're using a keyboard, but the grouping principle, or at least the notion of the action map still applies.&#xD;&#xA;&#xD;&#xA;This is probably overkill, but lots of fun!&#xD;&#xA;&#xD;&#xA;Setup function that maps the controls:&#xD;&#xA;&#xD;&#xA;    public void SetController(MyGamePad controller)&#xD;&#xA;    {&#xD;&#xA;    	controller.ClearActions();&#xD;&#xA;    &#xD;&#xA;    	controller.BindAction(Buttons.Start, ButtonGroup.FullyExclusive, () =&gt; sine.play());&#xD;&#xA;    &#xD;&#xA;    	controller.BindAction(Buttons.A,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;A!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.A | Buttons.B,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;A and B!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.B,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;B&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.B | Buttons.Y,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;B and Y!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.Y,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;Y!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.Y | Buttons.X,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;Y and X!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.X,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;X!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.X | Buttons.A,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;X n A, I made a funny!&quot;));&#xD;&#xA;    	controller.BindAction(0x0,&#xD;&#xA;    		ButtonGroup.FaceButtons, () =&gt; showText(&quot;Nothing on the face buttons.&quot;));&#xD;&#xA;    &#xD;&#xA;    	controller.BindAction(0x0,&#xD;&#xA;    		ButtonGroup.ShoulderButtons, () =&gt; showText(&quot;No shoulder buttons&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.LeftShoulder,&#xD;&#xA;    		ButtonGroup.ShoulderButtons, () =&gt; showText(&quot;Left shoulder button!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.RightShoulder,&#xD;&#xA;    		ButtonGroup.ShoulderButtons, () =&gt; showText(&quot;Right shoulder button!&quot;));&#xD;&#xA;    &#xD;&#xA;    	controller.BindAction(0x0,&#xD;&#xA;    		ButtonGroup.DirectionalPad, () =&gt; showText(&quot;Nothin' on the dpad!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.DPadUp,&#xD;&#xA;    		ButtonGroup.DirectionalPad, () =&gt; showText(&quot;DPAD UP!&quot;));&#xD;&#xA;    	controller.BindAction(Buttons.DPadDown,&#xD;&#xA;    		ButtonGroup.DirectionalPad, () =&gt; showText(&quot;DPAD DOWN!&quot;));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The game component that makes it work (instantiate 1 per player):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    &#xD;&#xA;    namespace MyGame&#xD;&#xA;    {&#xD;&#xA;    	[Flags]&#xD;&#xA;    	public enum ButtonGroup&#xD;&#xA;    	{&#xD;&#xA;    		NonExclusive 			= 0x00,&#xD;&#xA;    		FaceButtons				= 0x01,&#xD;&#xA;    		DirectionalPad			= 0x02,&#xD;&#xA;    		ShoulderButtons			= 0x04,&#xD;&#xA;    		LeftSide				= 0x08,&#xD;&#xA;    		RightSide				= 0x10,&#xD;&#xA;    		FullyExclusive			= 0xFF,&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	class MyGamePad : GameComponent&#xD;&#xA;    	{&#xD;&#xA;    		private Buttons FaceButtons;&#xD;&#xA;    		private Buttons DirectionalButtons;&#xD;&#xA;    		private Buttons ShoulderButtons;&#xD;&#xA;    		private Buttons LeftSideButtons;&#xD;&#xA;    		private Buttons RightSideButtons;&#xD;&#xA;    		private Buttons AllButtons;&#xD;&#xA;    &#xD;&#xA;    		private PlayerIndex playerIndex;&#xD;&#xA;    		private Dictionary&lt;KeyValuePair&lt;Buttons, ButtonGroup&gt;, Action&gt; actionMap = new Dictionary&lt;KeyValuePair&lt;Buttons, ButtonGroup&gt;, Action&gt;();&#xD;&#xA;    &#xD;&#xA;    		public InstrumentPad(Game game, PlayerIndex playerIndex) : base(game)&#xD;&#xA;    		{&#xD;&#xA;    			this.playerIndex = playerIndex;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		public void ClearActions()&#xD;&#xA;    		{&#xD;&#xA;    			actionMap.Clear();&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		public override void Update(GameTime gameTime)&#xD;&#xA;    		{&#xD;&#xA;    			base.Update(gameTime);&#xD;&#xA;    &#xD;&#xA;    			updateButtons();&#xD;&#xA;    &#xD;&#xA;    			foreach (KeyValuePair&lt;Buttons, ButtonGroup&gt; pair in actionMap.Keys)&#xD;&#xA;    			{&#xD;&#xA;    				switch (pair.Value)&#xD;&#xA;    				{&#xD;&#xA;    					case ButtonGroup.DirectionalPad:&#xD;&#xA;    						if (DirectionalButtons == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    					case ButtonGroup.FaceButtons:&#xD;&#xA;    						if (FaceButtons == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    					case ButtonGroup.ShoulderButtons:&#xD;&#xA;    						if (ShoulderButtons == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    					case ButtonGroup.LeftSide:&#xD;&#xA;    						if (LeftSideButtons == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    					case ButtonGroup.RightSide:&#xD;&#xA;    						if (RightSideButtons == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    					case ButtonGroup.FullyExclusive:&#xD;&#xA;    						if (AllButtons == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    					case ButtonGroup.NonExclusive:&#xD;&#xA;    						if ((AllButtons &amp; pair.Key) == pair.Key)&#xD;&#xA;    							actionMap[pair].Invoke();&#xD;&#xA;    						break;&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		public void BindAction(Buttons buttonCombo, ButtonGroup buttonGrouping, Action action)&#xD;&#xA;    		{&#xD;&#xA;    			KeyValuePair&lt;Buttons, ButtonGroup&gt; pair = new KeyValuePair&lt;Buttons, ButtonGroup&gt;(buttonCombo, buttonGrouping);&#xD;&#xA;    			if (!actionMap.ContainsKey(pair))&#xD;&#xA;    				actionMap.Add(pair, action);&#xD;&#xA;    			else&#xD;&#xA;    				actionMap[pair] = action;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		private void updateButtons()&#xD;&#xA;    		{&#xD;&#xA;    			GamePadState padState = GamePad.GetState(playerIndex);&#xD;&#xA;    			LeftSideButtons = 0x0;&#xD;&#xA;    			RightSideButtons = 0x0;&#xD;&#xA;    &#xD;&#xA;    			FaceButtons = 0x0;&#xD;&#xA;    			if (padState.Buttons.A == ButtonState.Pressed)&#xD;&#xA;    				FaceButtons |= Buttons.A;&#xD;&#xA;    			if (padState.Buttons.B == ButtonState.Pressed)&#xD;&#xA;    				FaceButtons |= Buttons.B;&#xD;&#xA;    			if (padState.Buttons.X == ButtonState.Pressed)&#xD;&#xA;    				FaceButtons |= Buttons.X;&#xD;&#xA;    			if (padState.Buttons.Y == ButtonState.Pressed)&#xD;&#xA;    				FaceButtons |= Buttons.Y;&#xD;&#xA;    &#xD;&#xA;    			RightSideButtons |= FaceButtons;&#xD;&#xA;    &#xD;&#xA;    			DirectionalButtons = 0x0;&#xD;&#xA;    			if (padState.DPad.Up == ButtonState.Pressed)&#xD;&#xA;    				DirectionalButtons |= Buttons.DPadUp;&#xD;&#xA;    			if (padState.DPad.Down == ButtonState.Pressed)&#xD;&#xA;    				DirectionalButtons |= Buttons.DPadDown;&#xD;&#xA;    			if (padState.DPad.Left == ButtonState.Pressed)&#xD;&#xA;    				DirectionalButtons |= Buttons.DPadLeft;&#xD;&#xA;    			if (padState.DPad.Right == ButtonState.Pressed)&#xD;&#xA;    				DirectionalButtons |= Buttons.DPadRight;&#xD;&#xA;    &#xD;&#xA;    			LeftSideButtons |= DirectionalButtons;&#xD;&#xA;    &#xD;&#xA;    			ShoulderButtons = 0x0;&#xD;&#xA;    			if (padState.Buttons.LeftShoulder == ButtonState.Pressed)&#xD;&#xA;    			{&#xD;&#xA;    				ShoulderButtons |= Buttons.LeftShoulder;&#xD;&#xA;    				LeftSideButtons |= Buttons.LeftShoulder;&#xD;&#xA;    			}&#xD;&#xA;    			if (padState.Buttons.RightShoulder == ButtonState.Pressed)&#xD;&#xA;    			{&#xD;&#xA;    				ShoulderButtons |= Buttons.RightShoulder;&#xD;&#xA;    				RightSideButtons |= Buttons.RightShoulder;&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			AllButtons = LeftSideButtons | RightSideButtons;&#xD;&#xA;    &#xD;&#xA;    			if (padState.Buttons.Start == ButtonState.Pressed)&#xD;&#xA;    				AllButtons |= Buttons.Start;&#xD;&#xA;    			if (padState.Buttons.Back == ButtonState.Pressed)&#xD;&#xA;    				AllButtons |= Buttons.Back;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16450" PostHistoryTypeId="2" PostId="8074" RevisionGUID="1720d70e-e60c-4860-9812-1b8d4532fd97" CreationDate="2011-02-03T22:59:09.653" UserId="3677" Text="I recently just found soya3d and from what i have seen through the tutorials i will be able to make exactly what i wanted with python skills. &#xD;&#xA;&#xD;&#xA;Now i have built this map generator. The only issue is that i can not manage to understand from any documents how to load obj files. At first i figured that i had to convert it to a .data file, but i dont understand how to do this. I just want to load a simple model of a house. I tried using the soya_editor, but i can not figure out at all how to do anything with that.&#xD;&#xA;Heres my script so far:&#xD;&#xA;&#xD;&#xA;    import sys, os, os.path, soya, soya.sdlconst&#xD;&#xA;    width, height = 760, 375&#xD;&#xA;    soya.init(&quot;Generator 0.1&quot;, width, height)&#xD;&#xA;    soya.path.append(os.path.join(os.path.dirname(sys.argv[0]), &quot;data&quot;))&#xD;&#xA;    &#xD;&#xA;    scene = soya.World()&#xD;&#xA;    model = soya.model.get(&quot;house&quot;)&#xD;&#xA;    &#xD;&#xA;    light = soya.Light(scene)&#xD;&#xA;    light.set_xyz(0.5, 0.0, 2.0)&#xD;&#xA;    &#xD;&#xA;    camera = soya.Camera(scene)&#xD;&#xA;    camera.z = 2.0&#xD;&#xA;    &#xD;&#xA;    soya.set_root_widget(camera)&#xD;&#xA;    soya.MainLoop(scene).main_loop()&#xD;&#xA;&#xD;&#xA;house is in .obj form at folder data/models&#xD;&#xA;The error i get is:&#xD;&#xA;&#xD;&#xA;    Traceback (most recent call last):&#xD;&#xA;      File &quot;introduction.py&quot;, line 7, in &lt;module&gt;&#xD;&#xA;        model = soya.Model.get(&quot;house&quot;)&#xD;&#xA;      File &quot;/usr/lib/pymodules/python2.6/soya/__init__.py&quot;, line 259, in get&#xD;&#xA;        return klass._alls.get(filename) or klass._alls.setdefault(filename, klass.load(filename))&#xD;&#xA;      File &quot;/usr/lib/pymodules/python2.6/soya/__init__.py&quot;, line 268, in load&#xD;&#xA;        dirname  = klass._get_directory_for_loading_and_check_export(filename)&#xD;&#xA;      File &quot;/usr/lib/pymodules/python2.6/soya/__init__.py&quot;, line 194, in _get_directory_for_loading_and_check_export&#xD;&#xA;        dirname = klass._get_directory_for_loading(filename, ext)&#xD;&#xA;      File &quot;/usr/lib/pymodules/python2.6/soya/__init__.py&quot;, line 171, in _get_directory_for_loading&#xD;&#xA;        raise ValueError(&quot;Cannot find a %s named %s!&quot; % (klass, filename))&#xD;&#xA;    ValueError: Cannot find a &lt;class 'soya.Model'&gt; named house!&#xD;&#xA;    * Soya3D * Quit...&#xD;&#xA;So i am figuring that because i dont understand how to turn my files into .data files, i will need to learn that.&#xD;&#xA;So my question is, how do i use my own models?&#xD;&#xA;" />
  <row Id="16451" PostHistoryTypeId="1" PostId="8074" RevisionGUID="1720d70e-e60c-4860-9812-1b8d4532fd97" CreationDate="2011-02-03T22:59:09.653" UserId="3677" Text="Loading Obj Files in Soya3d engine" />
  <row Id="16452" PostHistoryTypeId="3" PostId="8074" RevisionGUID="1720d70e-e60c-4860-9812-1b8d4532fd97" CreationDate="2011-02-03T22:59:09.653" UserId="3677" Text="&lt;3d-engines&gt;&lt;python&gt;" />
  <row Id="16453" PostHistoryTypeId="2" PostId="8075" RevisionGUID="99204652-2116-42d8-85fa-8bcbdcefb865" CreationDate="2011-02-03T23:21:55.193" UserId="3677" Text="ShiVa personally would be the better pick. &quot;The ShiVa Authoring Tool is available for Windows, Mac, Linux, Wii, iPhone, iPad, Android, HP WebOS and Airplay SDK for free.&quot; Unlike unity which is only Windows and Mac, iphone and Android." />
  <row Id="16454" PostHistoryTypeId="2" PostId="8076" RevisionGUID="aaf35597-878b-4efc-ad0f-1d1ea00b08be" CreationDate="2011-02-03T23:55:34.507" UserId="2469" Text="I'm just starting to get into 3D programming with Direct3D. What version of D3D should I pick up ? DX11 looks pretty neat, but DX9 and 10 still seems to be pretty present.&#xD;&#xA;Given the current state of the game dev industry, which version does it make more sense to start using ?" />
  <row Id="16455" PostHistoryTypeId="1" PostId="8076" RevisionGUID="aaf35597-878b-4efc-ad0f-1d1ea00b08be" CreationDate="2011-02-03T23:55:34.507" UserId="2469" Text="learning Direct3D 9, 10 or 11 ?" />
  <row Id="16456" PostHistoryTypeId="3" PostId="8076" RevisionGUID="aaf35597-878b-4efc-ad0f-1d1ea00b08be" CreationDate="2011-02-03T23:55:34.507" UserId="2469" Text="&lt;directx&gt;" />
  <row Id="16457" PostHistoryTypeId="2" PostId="8077" RevisionGUID="eac2a6b2-7338-414a-b3ab-0d66f4b361dc" CreationDate="2011-02-04T00:07:14.690" UserId="1430" Text="tldr: Learn D3D11.&#xD;&#xA;&#xD;&#xA;The difference between 10 and 11 is pretty small, in terms of the shape of the API. D3D11 allows you to use down-leveling to write code against the D3D11 API that will run all the way back to D3D9 class hardware (note that you will still require Vista or better however). So you may as well learn the newer API, which I feel is cleaner and more uniform anyhow.&#xD;&#xA;&#xD;&#xA;However, if you don't have Vista or better, or you eventually want your own code to run on XP (to for example distribute your game to XP users), you're going to have to use D3D9. The XP market is probably shrinking, though, so I'd say go for 11 if you can." />
  <row Id="16458" PostHistoryTypeId="2" PostId="8078" RevisionGUID="cf9ee1c5-51f3-4bee-a860-8b5237a9c457" CreationDate="2011-02-04T00:25:17.753" UserId="3794" Text="I recommend DX11 or DX10. The difference is very small. You can just do more things with DX11 (hw tessalation, better gpgpu, output to multiple textures on pixel shader..). DirectX 9 has another architecture and is little outdated at the moment. If you are asking about current game dev industry: for curently developed pc games is DX9 dead.&#xD;&#xA;&#xD;&#xA;But i have to say:  &#xD;&#xA;**Don't care about api**, once you really understand how graphics works, learning new api would take max one month. Even shorter time. " />
  <row Id="16459" PostHistoryTypeId="2" PostId="8079" RevisionGUID="28554db7-34f6-4187-aee4-500065b68378" CreationDate="2011-02-04T00:49:01.807" UserId="4662" Text="That depends on whether or not you want to design an engine to produce a game to be done in three years, or one year or six months, and whether or not you're thinking of console ports. It'll be relatively easy to throw out a 360 port of your game from Direct3D9, but you'll need to do a lot more originating from D3D11. Remember that D3D11 locks out all XP users, if not necessarily all D3D9 hardware. &#xD;&#xA;&#xD;&#xA;The most recent Steam survey suggests that 25% of people still use Windows XP. Can you afford to cut them out? By the time your game is done, how will this have changed? Are you going to use features that depend on the higher level API? These are questions that you will need to answer yourself.&#xD;&#xA;&#xD;&#xA;Direct3D 9 is pretty damn accessible and you can reach a lot of people with a D3D9 game, but it's days are numbered, especially on the PC. If you're not interested in targetting those people, then there's little point to it.&#xD;&#xA;&#xD;&#xA;Oh, and don't bother with DX10. There's no reason at all to use it over DX11.&#xD;&#xA;" />
  <row Id="16460" PostHistoryTypeId="5" PostId="8079" RevisionGUID="a9e06e1a-47f8-46b9-9b86-4b0f8334ab3b" CreationDate="2011-02-04T00:54:37.260" UserId="4662" Comment="added 458 characters in body; added 46 characters in body" Text="That depends on whether or not you want to design an engine to produce a game to be done in three years, or one year or six months, and whether or not you're thinking of console ports. It'll be relatively easy to throw out a 360 port of your game from Direct3D9, but you'll need to do a lot more originating from D3D11. Remember that D3D11 locks out all XP users, if not necessarily all D3D9 hardware. &#xD;&#xA;&#xD;&#xA;The most recent Steam survey suggests that 25% of people still use Windows XP. Can you afford to cut them out? By the time your game is done, how will this have changed? Are you going to use features that depend on the higher level API? These are questions that you will need to answer yourself.&#xD;&#xA;&#xD;&#xA;Direct3D 9 is pretty damn accessible and you can reach a lot of people with a D3D9 game, but it's days are numbered, especially on the PC. If you're not interested in targetting those people, then there's little point to it.&#xD;&#xA;&#xD;&#xA;Oh, and don't bother with DX10. There's no reason at all to use it over DX11. Unless you want to use D2D/DirectWrite, which is not unreasonable.&#xD;&#xA;&#xD;&#xA;Of course, it's worth mentioning that in DX11, there are no replacements for classes that, as a hobbyist myself, I found extremely useful in DX9. Such as ID3DXMesh, ID3DXSprite, ID3DXFont, have to compile ID3DXEffect from source, etc. Microsoft recommends DirectWrite to replace ID3DXFont, but of course, they forgot to actually make DX11 compatible with the new Direct2D/DirectWrite systems, which in my opinion was blindingly stupid." />
  <row Id="16461" PostHistoryTypeId="2" PostId="8080" RevisionGUID="a36a7419-e6ea-4f6b-aaa1-95122b7ebbef" CreationDate="2011-02-04T01:50:38.867" UserId="4779" Text="Lightcycles or whatever it was called like.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Given a 2d array representing the game map, where each element can be either 0 or 1 (0 representing blank space and 1 representing filled space), what is the algorithm used for TRON enemy A.I?" />
  <row Id="16462" PostHistoryTypeId="1" PostId="8080" RevisionGUID="a36a7419-e6ea-4f6b-aaa1-95122b7ebbef" CreationDate="2011-02-04T01:50:38.867" UserId="4779" Text="TRON: Game A.I algorithm?" />
  <row Id="16463" PostHistoryTypeId="3" PostId="8080" RevisionGUID="a36a7419-e6ea-4f6b-aaa1-95122b7ebbef" CreationDate="2011-02-04T01:50:38.867" UserId="4779" Text="&lt;2d&gt;&lt;ai&gt;" />
  <row Id="16464" PostHistoryTypeId="2" PostId="8081" RevisionGUID="1079eb6e-7f1e-4f37-a917-a362f390c00e" CreationDate="2011-02-04T01:53:10.837" UserId="4294" Text="There's no requirement to support both orientations. But if you do, you can change the content mode in the -(void)willAnimateRotationToInterfaceOrientation method. I'm on an ipad at the moment or i would post more specific code, but I'll come back later if someone hasn't posted more." />
  <row Id="16465" PostHistoryTypeId="25" PostId="8076" RevisionGUID="76f7ad46-e96b-4cbb-bd47-b6bdd6678b13" CreationDate="2011-02-04T02:16:12.527" Comment="http://twitter.com/#!/StackGameDev/status/33348062390784000" />
  <row Id="16466" PostHistoryTypeId="2" PostId="8082" RevisionGUID="8f8f1d65-eebe-4039-9405-e91927e70a67" CreationDate="2011-02-04T02:19:38.767" UserId="4690" Text="I haven't had the chance to dig through their code, but Armagetron Advanced is an open-source relatively mature lightcycle battling game.&#xD;&#xA;&#xD;&#xA;You can find the source (and executables) here: http://armagetronad.net/downloads.php" />
  <row Id="16467" PostHistoryTypeId="2" PostId="8083" RevisionGUID="c4ed4f5c-3b7b-4542-a429-918c9a2d752b" CreationDate="2011-02-04T03:23:29.597" UserId="18" Text="There's no reason to use gluLookAt in a 2D game, it is meant for setting the camera position in 3D space. Use the simpler and faster glTranslatef instead.&#xD;&#xA;&#xD;&#xA;If you really want your specific example to work then something like :&#xD;&#xA;&#xD;&#xA;    gluLookAt(200,0,1,200,0,0,0,1,0);&#xD;&#xA;&#xD;&#xA;would move everything up by 200 pixels. But you could get the same effect by replacing gluLookAt with glTranslatef:&#xD;&#xA;&#xD;&#xA;    glTranslatef(-200, 0, 0);" />
  <row Id="16468" PostHistoryTypeId="2" PostId="8084" RevisionGUID="cc4a6620-ce93-4f51-a689-f887fceec5b2" CreationDate="2011-02-04T03:24:48.327" UserId="4690" Text="Most companies have a cinematic team that is separate from the game development team. The models and scenes used in cinematics are often of a level of detail that would be completely unplayable in a live game, so it's likely the only shared assets are concept art. Large studios like Blizzard (I believe at least one of Sony's various sub-corps has one too) have their own internal cinematics team that works on the cutscenes, intros, and trailers for all of their products. Smaller companies may outsource this to another studio.&#xD;&#xA;&#xD;&#xA;The Atomic article in jeffora's response is a great explanation of this process. " />
  <row Id="16469" PostHistoryTypeId="5" PostId="8083" RevisionGUID="760dbd9f-a879-4c17-92e9-d2569c6bb450" CreationDate="2011-02-04T03:29:00.403" UserId="18" Comment="added 9 characters in body" Text="There's generally no reason to use gluLookAt in a 2D game, it is meant for setting the camera position in 3D space. Use the simpler and faster glTranslatef instead.&#xD;&#xA;&#xD;&#xA;If you really want your specific example to work then something like:&#xD;&#xA;&#xD;&#xA;    gluLookAt(200,0,1,200,0,0,0,1,0);&#xD;&#xA;&#xD;&#xA;would move everything up by 200 pixels. But you could get the same effect by replacing gluLookAt with glTranslatef:&#xD;&#xA;&#xD;&#xA;    glTranslatef(-200, 0, 0);" />
  <row Id="16470" PostHistoryTypeId="5" PostId="8083" RevisionGUID="09288478-db1f-42ae-b4c9-c77cdab9eef2" CreationDate="2011-02-04T03:39:34.483" UserId="18" Comment="added 433 characters in body; added 2 characters in body" Text="There's generally** no reason to use gluLookAt in a 2D game, it is meant for setting the camera position in 3D space. Use the simpler and faster glTranslatef instead.&#xD;&#xA;&#xD;&#xA;If you really want your specific example to work then something like:&#xD;&#xA;&#xD;&#xA;    gluLookAt(200,0,1,200,0,0,0,1,0);&#xD;&#xA;&#xD;&#xA;would move everything up by 200 pixels. But you could get the same effect by replacing gluLookAt with glTranslatef:&#xD;&#xA;&#xD;&#xA;    glTranslatef(-200, 0, 0);&#xD;&#xA;&#xD;&#xA;** cocos2d supports this method of setting the camera for special '3D' effects. If that's what you want then you need to better understand how gluLookAt works. The [projection example](http://www.xmission.com/~nate/tutors.html) by Nate Robin can be a good place to start visualizing how projection works with that command. With that said, you should still be able to get similar 3D effects with just translation/scaling/rotation." />
  <row Id="16471" PostHistoryTypeId="2" PostId="8085" RevisionGUID="7aae3af1-9da2-43d7-b76b-b6032683e9d7" CreationDate="2011-02-04T03:47:54.053" UserId="1430" Text="One of our (ArenaNet's) developers wrote [a blog entry about how cinematics for Guild Wars 2 are created][1]. There's also an [accompanying video][2] by our cinematic art lead. &#xD;&#xA;&#xD;&#xA;Back when I was a graphics programmer at Big Huge Games, we contracted with Blur for some of our cinema sequences (and another company, I believe, for the campaign cutscenes, but I am unfortunately drawing a blank as to who that was) -- [there's a write-up on this process here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.arena.net/blog/james-boer-opens-the-cinematics-toolbox&#xD;&#xA;  [2]: http://www.arena.net/blog/video-creating-guild-wars-2-cinematics&#xD;&#xA;  [3]: http://bighugegames.com/games/rise-of-nations/cinematic-behind-the-scenes" />
  <row Id="16472" PostHistoryTypeId="5" PostId="8085" RevisionGUID="63cac17c-4cda-47b1-91a7-68697ecf4b1e" CreationDate="2011-02-04T03:52:55.937" UserId="1430" Comment="added 268 characters in body" Text="One of our (ArenaNet's) developers wrote [a blog entry about how cinematics for Guild Wars 2 are created][1]. There's also an [accompanying video][2] by our cinematic art lead -- this may not be exactly what you're after, though, since it's not fully pre-rendered 3D.&#xD;&#xA;&#xD;&#xA;Back when I was a graphics programmer at Big Huge Games, we contracted with Blur for some of our cinema sequences (and another company, I believe, for the campaign cutscenes, but I am unfortunately drawing a blank as to who that was) -- [there's a write-up on this process here][3]. They were more disconnected videos, modeled, rigged, animated, and rendered out separately by the outsourcing team and we just played them back in-game at the appropriate point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.arena.net/blog/james-boer-opens-the-cinematics-toolbox&#xD;&#xA;  [2]: http://www.arena.net/blog/video-creating-guild-wars-2-cinematics&#xD;&#xA;  [3]: http://bighugegames.com/games/rise-of-nations/cinematic-behind-the-scenes" />
  <row Id="16473" PostHistoryTypeId="6" PostId="4642" RevisionGUID="7c43f4d3-0c8e-4fae-910f-e84ee5370a8f" CreationDate="2011-02-04T03:54:30.290" UserId="1430" Comment="edited tags" Text="&lt;video&gt;&lt;trailer&gt;&lt;cutscene&gt;" />
  <row Id="16474" PostHistoryTypeId="2" PostId="8086" RevisionGUID="885f50cc-7332-42c6-b49c-a963cef78942" CreationDate="2011-02-04T04:14:26.307" UserDisplayName="user5158" Text="I submitted this bug to Apple last month and with they sent me an email the other day that said this bug was fixed with the latest release of iOS. I believe its fixed after iOS 4.3" />
  <row Id="16475" PostHistoryTypeId="2" PostId="8087" RevisionGUID="12797b40-1d35-4810-b0b1-9a9719f2fa36" CreationDate="2011-02-04T04:17:13.317" UserId="4262" Text="I need help understanding the Triangle A* (TA*) algorithm that is described by Demyen in his paper [Efficient Triangulation-Based Pathfinding][1], on pages 76-81. &#xD;&#xA;&#xD;&#xA;He describes how to adapt the regular A* algorithm for triangulation, to search for other possibly more optimal paths, even after the final node is reached/expanded. Regular A* stops when the final node is expanded, but this is not always the best path when used in a triangulated graph. This is exactly the problem I'm having.&#xD;&#xA;&#xD;&#xA;The problem is illustrated on page 78, Figure 5.4:&#xD;&#xA;(can't post images yet, so heres the link: http://i.stack.imgur.com/YKL5X.png)&#xD;&#xA;&#xD;&#xA;I understand how to calculate the g and h values. But I don't understand the condition for stopping the search, as well as how to exclude the previously found paths from future searches. The paper lacks pseudocode, so pseudocode would be great.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://skatgame.net/mburo/ps/demyen-thesis.pdf&#xD;&#xA;  [2]: http://www.policyalmanac.org/games/aStarTutorial.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/YKL5X.png" />
  <row Id="16476" PostHistoryTypeId="1" PostId="8087" RevisionGUID="12797b40-1d35-4810-b0b1-9a9719f2fa36" CreationDate="2011-02-04T04:17:13.317" UserId="4262" Text="Triangulation A* (TA*) pathfinding algorithm" />
  <row Id="16477" PostHistoryTypeId="3" PostId="8087" RevisionGUID="12797b40-1d35-4810-b0b1-9a9719f2fa36" CreationDate="2011-02-04T04:17:13.317" UserId="4262" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;triangles&gt;" />
  <row Id="16478" PostHistoryTypeId="2" PostId="8088" RevisionGUID="b1b330f0-d549-4ca6-bd83-fda8e6a6f9f7" CreationDate="2011-02-04T05:08:27.620" UserDisplayName="slcpfmmm" Text="If you're completely new to 3D programming, and especially if you're new to COM and Windows programming, I would strongly advice against learning DirectX now. In my experience, DirectX is an extremely powerful tool, but it has a very steep learning curve, which you must consider in addition to the learning curves of Windows programming, 3D programming and many others. If you start with DirectX, you might feel overwhelmed by all the details of making boilerplate code, so I advice against it.&#xD;&#xA;&#xD;&#xA;Instead, I would recommend a simpler API that allows you to focus more on learning about 3D programming. XNA is quite nice, and since it lies on top of DirectX, once you move to DirectX, you'll have some ideas that will make the DirectX learning curve much easier to take on.&#xD;&#xA;&#xD;&#xA;Now, if you have experience in 3D programming, such as with OpenGL, and you know how to do COM programming, I'd recommend DirectX 11. Anything but the latest version is obsolete, and any experience you get from it will be useful for a shorter span of time.&#xD;&#xA;&#xD;&#xA;But then again, true experience comes from variety, so I'd recommend you learn both DirectX and OpenGL, and also XNA if you want, and as many APIs as you can. That way, you will have an abstract knowledge of how 3D programming works with different tools, and you will be able to use the right tool for each job." />
  <row Id="16479" PostHistoryTypeId="2" PostId="8089" RevisionGUID="30b712c9-a2de-4225-aba3-fe43edd970e4" CreationDate="2011-02-04T05:10:50.973" UserId="1186" Text="Reading several other questions and answers on using a component based system to define items I want to use one for the items and spells in a web game written in PHP. I'm just stuck on the implementation.&#xD;&#xA;&#xD;&#xA;I'm going to use a DB schema suggested in this series (part 5 describes the schema);  &#xD;&#xA;http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/&#xD;&#xA;&#xD;&#xA;This means I'll have an items table with generic item properties, a table listing all of the components for an item and finally records in each component table used to make up the item.&#xD;&#xA;&#xD;&#xA;Assuming I can select the first two together in a single query, I'm still going to do N queries for each component type. I'm kind of fine with this because I can cache the data into memcache and check there first before doing any queries. I'll need to build up the items on every request they are used in so the implementation needs to be on the lean side even if they're pulled from memcache.&#xD;&#xA;&#xD;&#xA;But right there is where I feel confident about implementing a component system for my items ends. I figure I'd need to bring attributes and behaviors into the container from each component it uses. I'm just not sure how to do that effectively and not end up writing a lot of specialized code to deal with each component.&#xD;&#xA;&#xD;&#xA;For example an AttackComponent might need to know how to filter targets inside of a battle context and also maybe provide an attack behavior. That same item might also have a UsableComponent which allows the item to be used and apply some effect onto a different set of targets filtered differently from the same battle context. Then not every part of an item is an active part, an AttributeBonusComponent might need to only kick in when the item is in an equipped state or when displaying the item details page.&#xD;&#xA;&#xD;&#xA;Ultimately, how should I bring all of the components together into the container so when I use an item as a weapon I get the correct list of targets? Know when a weapon can also be used as an item? Or to apply the bonuses the item provides to a character object?&#xD;&#xA;&#xD;&#xA;I feel like I've gone too far down the rabbit hole and I can't grasp onto the simple solution in front of me. (If that makes any sense at all.)&#xD;&#xA;&#xD;&#xA;Likewise if I were to implement the best answer from here I feel like I'd have a lot of the same questions.  &#xD;&#xA;http://gamedev.stackexchange.com/questions/5272/how-to-model-multiple-uses-e-g-weapon-for-usable-inventory-object-items-e-g" />
  <row Id="16480" PostHistoryTypeId="1" PostId="8089" RevisionGUID="30b712c9-a2de-4225-aba3-fe43edd970e4" CreationDate="2011-02-04T05:10:50.973" UserId="1186" Text="How to implement a component based system for items in a web game." />
  <row Id="16481" PostHistoryTypeId="3" PostId="8089" RevisionGUID="30b712c9-a2de-4225-aba3-fe43edd970e4" CreationDate="2011-02-04T05:10:50.973" UserId="1186" Text="&lt;architecture&gt;&lt;web&gt;&lt;component-based&gt;&lt;php&gt;" />
  <row Id="16482" PostHistoryTypeId="25" PostId="8080" RevisionGUID="1928e7ae-3d2a-4ece-9d3e-8543bd6cf832" CreationDate="2011-02-04T05:16:13.620" Comment="http://twitter.com/#!/StackGameDev/status/33393365877784576" />
  <row Id="16483" PostHistoryTypeId="2" PostId="8090" RevisionGUID="1febe463-1ff0-4595-9eac-15fb609cbfe8" CreationDate="2011-02-04T05:20:23.440" UserId="5040" Text="As part of my game, I thought it would be fun to make a hidden level that pays tribute to Mario Bros (one of the earliest games I ever played). It would be themed in that way with 8-bit graphics and question mark blocks and completing the level would say &quot;Thank you but the princess is in another castle&quot; or such.&#xD;&#xA;&#xD;&#xA;For the sound track, I'm thinking of just overlaying the standard mario theme music by playing it on a virtual keyboard using a different instrument/timing or something.&#xD;&#xA;&#xD;&#xA;My question is, am I legally safe? I'm not using anyone else's actual music, I'm just playing the same tune in a different way myself. Do I have to get licensing for this?" />
  <row Id="16484" PostHistoryTypeId="1" PostId="8090" RevisionGUID="1febe463-1ff0-4595-9eac-15fb609cbfe8" CreationDate="2011-02-04T05:20:23.440" UserId="5040" Text="Licensing Theme Music from other games" />
  <row Id="16485" PostHistoryTypeId="3" PostId="8090" RevisionGUID="1febe463-1ff0-4595-9eac-15fb609cbfe8" CreationDate="2011-02-04T05:20:23.440" UserId="5040" Text="&lt;legal&gt;&lt;music&gt;&lt;licensing&gt;" />
  <row Id="16486" PostHistoryTypeId="2" PostId="8091" RevisionGUID="ad15ac42-0b1b-449b-9764-294f6d2e30bd" CreationDate="2011-02-04T05:38:22.987" UserId="953" Text="I am not a lawyer.&#xD;&#xA;&#xD;&#xA;Performing or rerecording a piece of music still requires that you get authorization from the creator, and Nintendo is very unlikely to grant that authorization at any price (I hear they turned down Justin Beiber).  Fair use doesn't really apply in this case, either.&#xD;&#xA;&#xD;&#xA;From an ethical perspective, I don't think you've got much to worry about, and Nintendo's not likely to go after your game unless it's really prominent (i.e. a AAA title).  There are games out there that commit far worse appropriation of Mario, and they haven't been shut down.&#xD;&#xA;&#xD;&#xA;If you want to be totally safe, compose or have someone compose a theme which is heavily reminiscent of the Mario overworld theme, but is an original composition." />
  <row Id="16487" PostHistoryTypeId="2" PostId="8092" RevisionGUID="bff5d11a-35ef-40d1-b35c-ffb7da6c73d3" CreationDate="2011-02-04T05:52:52.340" UserId="4191" Text="I would implement a hook system (a mechanism by which callbacks to specifiable functions can be added to and removed from an object when events occur) on the container, and have components set up the appropriate hooks when added and tear them down when removed.  For instance, the AttributeBonusComponent might use `atEquip` and `atUnequip` hooks to add and remove its bonus, the AttackComponent could provide values to `pollForTargets` and `pollForAttackBehaviors` hooks, and the UsableComponent could talk to `pollForUseBehaviors`.&#xD;&#xA;&#xD;&#xA;So the container winds up only having an abstract understanding of the kinds of information that can be requested of it and ways it can be interacted with, and the components are responsible for defining how they interface with those." />
  <row Id="16488" PostHistoryTypeId="5" PostId="8087" RevisionGUID="a5be3bd9-5ed6-4a31-91d9-f64a001cf655" CreationDate="2011-02-04T06:12:42.830" UserId="4262" Comment="added 412 characters in body" Text="I need help understanding the Triangle A* (TA*) algorithm that is described by Demyen in his paper [Efficient Triangulation-Based Pathfinding][1], on pages 76-81. &#xD;&#xA;&#xD;&#xA;He describes how to adapt the regular A* algorithm for triangulation, to search for other possibly more optimal paths, even after the final node is reached/expanded. Regular A* stops when the final node is expanded, but this is not always the best path when used in a triangulated graph. This is exactly the problem I'm having.&#xD;&#xA;&#xD;&#xA;The problem is illustrated on page 78, Figure 5.4:&#xD;&#xA;(can't post images yet, so heres the link: http://i.stack.imgur.com/YKL5X.png)&#xD;&#xA;&#xD;&#xA;I understand how to calculate the g and h values. And I think the stop condition is:&#xD;&#xA;&#xD;&#xA;    if (currentNode.fCost &gt; shortestDistanceFound)&#xD;&#xA;    {&#xD;&#xA;        // stop&#xD;&#xA;        break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;where currentNode is the search node popped from the open list (priority queue), which has the lowest f-score. shortestDistanceFound is the actual distance of the shortest path found so far.&#xD;&#xA;&#xD;&#xA;But how do I exclude the previously found paths from future searches? Because if I do the search again, it will obviously find the same path. I need to modify something, but I don't know what it is I need to change. The paper lacks pseudocode, so pseudocode would be great.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://skatgame.net/mburo/ps/demyen-thesis.pdf&#xD;&#xA;  [2]: http://www.policyalmanac.org/games/aStarTutorial.htm&#xD;&#xA;  [3]: http://i.stack.imgur.com/YKL5X.png" />
  <row Id="16489" PostHistoryTypeId="5" PostId="8087" RevisionGUID="7a4d4c51-2daa-41b2-9f9a-34c324ac1230" CreationDate="2011-02-04T06:42:07.660" UserId="4262" Comment="deleted 99 characters in body" Text="I need help understanding the Triangle A* (TA*) algorithm that is described by Demyen in his paper [Efficient Triangulation-Based Pathfinding][1], on pages 76-81. &#xD;&#xA;&#xD;&#xA;He describes how to adapt the regular A* algorithm for triangulation, to search for other possibly more optimal paths, even after the final node is reached/expanded. Regular A* stops when the final node is expanded, but this is not always the best path when used in a triangulated graph. This is exactly the problem I'm having.&#xD;&#xA;&#xD;&#xA;The problem is illustrated on page 78, Figure 5.4:&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I understand how to calculate the g and h values. And I think the stop condition is:&#xD;&#xA;&#xD;&#xA;    if (currentNode.fCost &gt; shortestDistanceFound)&#xD;&#xA;    {&#xD;&#xA;        // stop&#xD;&#xA;        break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;where currentNode is the search node popped from the open list (priority queue), which has the lowest f-score. shortestDistanceFound is the actual distance of the shortest path found so far.&#xD;&#xA;&#xD;&#xA;But how do I exclude the previously found paths from future searches? Because if I do the search again, it will obviously find the same path. I need to modify something, but I don't know what it is I need to change. The paper lacks pseudocode, so pseudocode would be great.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://skatgame.net/mburo/ps/demyen-thesis.pdf&#xD;&#xA;  [2]: http://i.stack.imgur.com/yh6mC.png" />
  <row Id="16490" PostHistoryTypeId="5" PostId="8087" RevisionGUID="9c160624-59d0-47a3-9a4d-abfe3cd831f2" CreationDate="2011-02-04T06:49:49.383" UserId="4262" Comment="added 72 characters in body; deleted 4 characters in body" Text="I need help understanding the Triangle A* (TA*) algorithm that is described by Demyen in his paper [Efficient Triangulation-Based Pathfinding][1], on pages 76-81. &#xD;&#xA;&#xD;&#xA;He describes how to adapt the regular A* algorithm for triangulation, to search for other possibly more optimal paths, even after the final node is reached/expanded. Regular A* stops when the final node is expanded, but this is not always the best path when used in a triangulated graph. This is exactly the problem I'm having.&#xD;&#xA;&#xD;&#xA;The problem is illustrated on page 78, Figure 5.4:&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I understand how to calculate the g and h values presented in the paper (page 80). &#xD;&#xA;&#xD;&#xA;And I think the search stop condition is:&#xD;&#xA;&#xD;&#xA;    if (currentNode.fCost &gt; shortestDistanceFound)&#xD;&#xA;    {&#xD;&#xA;        // stop&#xD;&#xA;        break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;where currentNode is the search node popped from the open list (priority queue), which has the lowest f-score. shortestDistanceFound is the actual distance of the shortest path found so far.&#xD;&#xA;&#xD;&#xA;But how do I exclude the previously found paths from future searches? Because if I do the search again, it will obviously find the same path. Do I reset the closed list? I need to modify something, but I don't know what it is I need to change. The paper lacks pseudocode, so that would be helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://skatgame.net/mburo/ps/demyen-thesis.pdf&#xD;&#xA;  [2]: http://i.stack.imgur.com/yh6mC.png" />
  <row Id="16491" PostHistoryTypeId="5" PostId="8087" RevisionGUID="b75ade6b-e281-4226-a595-a25b1995795f" CreationDate="2011-02-04T06:57:55.673" UserId="4262" Comment="added 68 characters in body" Text="I need help understanding the Triangle A* (TA*) algorithm that is described by Demyen in his paper [Efficient Triangulation-Based Pathfinding][1], on pages 76-81. &#xD;&#xA;&#xD;&#xA;He describes how to adapt the regular A* algorithm for triangulation, to search for other possibly more optimal paths, even after the final node is reached/expanded. [Regular A*][2] stops when the final node is expanded, but this is not always the best path when used in a triangulated graph. This is exactly the problem I'm having.&#xD;&#xA;&#xD;&#xA;The problem is illustrated on page 78, Figure 5.4:&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;I understand how to calculate the g and h values presented in the paper (page 80). &#xD;&#xA;&#xD;&#xA;And I think the search stop condition is:&#xD;&#xA;&#xD;&#xA;    if (currentNode.fCost &gt; shortestDistanceFound)&#xD;&#xA;    {&#xD;&#xA;        // stop&#xD;&#xA;        break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;where currentNode is the search node popped from the open list (priority queue), which has the lowest f-score. shortestDistanceFound is the actual distance of the shortest path found so far.&#xD;&#xA;&#xD;&#xA;But how do I exclude the previously found paths from future searches? Because if I do the search again, it will obviously find the same path. Do I reset the closed list? I need to modify something, but I don't know what it is I need to change. The paper lacks pseudocode, so that would be helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://skatgame.net/mburo/ps/demyen-thesis.pdf&#xD;&#xA;  [2]: &lt;http://www.policyalmanac.org/games/aStarTutorial.htm&gt;&#xD;&#xA;  [3]: http://i.stack.imgur.com/yh6mC.png" />
  <row Id="16492" PostHistoryTypeId="2" PostId="8093" RevisionGUID="685598e6-e0d7-4cfd-a226-766f427c7fd8" CreationDate="2011-02-04T07:12:08.497" UserId="4638" Text="This is my favorite link: http://www.songho.ca/opengl/gl_vertexarray.html&#xD;&#xA;&#xD;&#xA;It should help you get a better understanding of the differences between VAO and VBOs. Also, Id recommend reading a chapter in OpenGL superbible on this topic. It does a good job at explaining these basics at length and with examples." />
  <row Id="16493" PostHistoryTypeId="2" PostId="8094" RevisionGUID="d34760c9-b8c6-4984-85a3-6aae296a0fc6" CreationDate="2011-02-04T07:15:40.207" UserId="154" Text="Nothing too exciting:&#xD;&#xA;&#xD;&#xA;- Word Docs for initial outline&#xD;&#xA;- Powerpoint to flesh out the pitch and get people excited&#xD;&#xA;- Transition to Wiki once getting into actual prototyping. Wiki's are great for splitting up design tasks among several designers, showing how mechanics cross link and giving the rest of the team and easily sorted and searchable database of what should be in the game.&#xD;&#xA;- Continue with focused powerpoints for mechanics when needed. Lots of people are visual learners and I've found you can just communicate ideas more quickly this way.&#xD;&#xA;- Post-it notes and a big section of wall somewhere for doing scoping and auditing exercises.&#xD;&#xA;&#xD;&#xA;*NOTE*&#xD;&#xA;&#xD;&#xA;Wiki's don't police themselves and can get out of control or just die if you don't have at least one resident Nazi who keeps the whole look &amp; quality consistent. Build out templates for content pages and stick to them. For information that changes regularly (like tuning numbers), put it in source control and just link to it from the page. Keep all other information in the Wiki. " />
  <row Id="16494" PostHistoryTypeId="2" PostId="8095" RevisionGUID="f58d7f38-7793-4d02-b84b-1625c5245b35" CreationDate="2011-02-04T08:04:11.440" UserId="634" Text="I haven't implemented this, but as I read it, I think you'd do something like this:&#xD;&#xA;&#xD;&#xA;    shortestDistance = infinity&#xD;&#xA;    do A* with modified g cost&#xD;&#xA;    	if node.fCost &gt; shortestDistance (section 5.5)&#xD;&#xA;    		don't open node&#xD;&#xA;    	if node.isGoal()&#xD;&#xA;    		run funnel algorithm (string pulling)&#xD;&#xA;    		update shortestDistance&#xD;&#xA;&#xD;&#xA;The difference is that even if you find **a** path to the goal, it's not necessarily the **shortest** path. But you'll keep improving the upper bounds on the shortest path, meaning that you won't have to open all nodes. Eventually your open set should be empty, and the best path you've found so far should be the shortest.&#xD;&#xA;&#xD;&#xA;The modified g cost that he describes seems like a big underestimate, so I'm skeptical about how well it works in practice." />
  <row Id="16495" PostHistoryTypeId="25" PostId="8087" RevisionGUID="df5348f7-e652-4910-a958-59850843db5f" CreationDate="2011-02-04T08:16:13.667" Comment="http://twitter.com/#!/StackGameDev/status/33438664906252288" />
  <row Id="16496" PostHistoryTypeId="5" PostId="8009" RevisionGUID="3c40db40-4139-4203-a52c-596dd16a6ac5" CreationDate="2011-02-04T08:35:40.890" UserId="1581" Comment="answering dll question" Text="A quick [google search][1] says that sometimes it &quot;deactivates itself&quot; and it has to be reactivated on the plugin manager (`Window &gt; Settings/Preferences &gt; Plug-in Manager`)&#xD;&#xA;&#xD;&#xA;EDIT: According to [this other post][2], Mental Ray's dll is called `Mayatomr.mll`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=maya+mental+ray+plugin&#xD;&#xA;  [2]: http://setdrivenkey.pdipierro.com/2010/02/tip-of-week-is-mental-ray-missing.html" />
  <row Id="16497" PostHistoryTypeId="2" PostId="8096" RevisionGUID="4b619b15-1ca5-489f-ac5f-a1e91ce42c72" CreationDate="2011-02-04T09:43:12.597" UserId="5163" Text="I'm writing a Minecraft-like game using Ogre engine and I have a problem. I must optimize my game, because when I try draw 10000 blocks, I have 2 FPS... So, I got the idea that blocks display of the plane and to hide the invisible blocks. But I have a problem - how do I know which blocks at a time are visible to the player?&#xD;&#xA;&#xD;&#xA;And - if you know of other optimization methods for such a game, write what and how to use them in Ogre.&#xD;&#xA;&#xD;&#xA;Please help.&lt;br&gt;Thaks in advance." />
  <row Id="16498" PostHistoryTypeId="1" PostId="8096" RevisionGUID="4b619b15-1ca5-489f-ac5f-a1e91ce42c72" CreationDate="2011-02-04T09:43:12.597" UserId="5163" Text="How to get the blocks seen by the player?" />
  <row Id="16499" PostHistoryTypeId="3" PostId="8096" RevisionGUID="4b619b15-1ca5-489f-ac5f-a1e91ce42c72" CreationDate="2011-02-04T09:43:12.597" UserId="5163" Text="&lt;ogre&gt;&lt;minecraft&gt;" />
  <row Id="16500" PostHistoryTypeId="2" PostId="8097" RevisionGUID="0052783f-81f2-4a99-89e8-cfc556ad4b5c" CreationDate="2011-02-04T09:59:28.117" UserId="4662" Text="You can use backface culling to cull vertices and their associated pixels that don't face the player. Depth buffering should take care of the rest. 10k blocks really isn't a lot, my 5770 can render 100k verts at 1500fps. I think that you're doing something else pretty badly wrong." />
  <row Id="16501" PostHistoryTypeId="2" PostId="8098" RevisionGUID="242fb2fa-f21c-4f6e-b08a-7874cdaa299d" CreationDate="2011-02-04T10:02:05.400" UserId="337" Text="Well, Ogre already implements frustrum culling (which basically does not draw anything that couldn't be shown on screen) but I think your problem is a different one.&#xD;&#xA;&#xD;&#xA;You should not really be displaying 10000 blocks, what is commonly done (or at least, in the few Ogre3d based minecraft like clones (of which I am making one to), and in the original to I believe (of which I am making one to) ) is creating a mesh (of some NxNxN region of chunks) which has the outer faces of the cubes shown.&#xD;&#xA;That is, when you put 2 cubes side by side, the 2 faces touching can't be seen and therefor don't need to be drawn.&#xD;&#xA;&#xD;&#xA;These faces should also be drawn in something like this: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=DynamicGrowingBuffers as modern video cards prefer one mesh of 100000 polygons versus 1000 meshes of 100 polygons." />
  <row Id="16502" PostHistoryTypeId="5" PostId="8096" RevisionGUID="fb755068-68d2-4bf9-a951-bcb8d5da5054" CreationDate="2011-02-04T10:15:29.983" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I'm writing a Minecraft-like game using Ogre engine and I have a problem. I must optimize my game, because when I try draw 10000 blocks, I have 2 FPS... So, I got the idea that blocks display of the plane and to hide the invisible blocks. But I have a problem - how do I know which blocks at a time are visible to the player?&#xD;&#xA;&#xD;&#xA;And - if you know of other optimization methods for such a game, write what and how to use them in Ogre." />
  <row Id="16503" PostHistoryTypeId="5" PostId="8098" RevisionGUID="91b63cba-1b19-4edd-95bd-b61d3e7728e1" CreationDate="2011-02-04T10:18:19.340" UserId="20" Comment="corrected some small mistakes" Text="Well, Ogre already implements frustum culling (which basically does not draw anything that couldn't be seen from the camera) but I think your problem is a different one.&#xD;&#xA;&#xD;&#xA;You should not really be displaying 10000 blocks, what is commonly done (or at least, in the few Ogre3d based minecraft like clones (of which I am making one too), and in the original to I believe (of which I am making one too) ) is creating a mesh (of some NxNxN region of chunks) which has the outer faces of the cubes shown.&#xD;&#xA;That is, when you put 2 cubes side by side, the 2 faces touching can't be seen and therefore don't need to be drawn.&#xD;&#xA;&#xD;&#xA;These faces should also be drawn in something like this: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=DynamicGrowingBuffers as modern video cards prefer one mesh of 100000 polygons versus 1000 meshes of 100 polygons." />
  <row Id="16504" PostHistoryTypeId="2" PostId="8099" RevisionGUID="cd217e6d-a93d-45e5-ab54-6f1213d3ce52" CreationDate="2011-02-04T10:20:50.257" UserId="5164" Text="I currently study computer engineering and I want to lead my career towards game industry which I always want to be a part of.  &#xD;&#xA;But I am not sure where to start.  &#xD;&#xA;I applied some of the companies in the industry for internship and so but most of them wants experience and some work in game developing. Many asks whether I developed a simple game or something similar which I haven't done so far.&#xD;&#xA;I am proficient at C, C++, Java, JS, HTML etc.  &#xD;&#xA;Any tips from people experienced in the industry on where to start ?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16505" PostHistoryTypeId="1" PostId="8099" RevisionGUID="cd217e6d-a93d-45e5-ab54-6f1213d3ce52" CreationDate="2011-02-04T10:20:50.257" UserId="5164" Text="Career in Game Development" />
  <row Id="16506" PostHistoryTypeId="3" PostId="8099" RevisionGUID="cd217e6d-a93d-45e5-ab54-6f1213d3ce52" CreationDate="2011-02-04T10:20:50.257" UserId="5164" Text="&lt;game-industry&gt;&lt;career&gt;&lt;jobs&gt;" />
  <row Id="16507" PostHistoryTypeId="2" PostId="8100" RevisionGUID="2ae136c7-ea59-4da3-bf04-cb7fd16a677a" CreationDate="2011-02-04T10:39:09.487" UserId="1581" Text="I'd suggest doing what they say: start developing simple game." />
  <row Id="16508" PostHistoryTypeId="2" PostId="8101" RevisionGUID="bb8791cc-0962-400c-903a-fa6fcf9fc11e" CreationDate="2011-02-04T10:45:05.553" UserId="3794" Text="Do what they want you to do. Create a game or demo (walk through landscape etc.). Don't be disappointed with that they did not want you to intership now. Great is they even responsed. And interships are the best what you can do in paralel with school. Also it is what will makes you unique in eyes of employers after school. &#xD;&#xA;&#xD;&#xA;For example, when i get my intership i had created this: &#xD;&#xA;&#xD;&#xA; - 1 released indie 3d game, &#xD;&#xA; - 1 interactive demo, using gpu, shaders and some advanced algorithms&#xD;&#xA; - computer graphics related Bsc. thesis  with prototype&#xD;&#xA; - 2 raytracers (this propably did not help :))&#xD;&#xA;&#xD;&#xA;You have to show that you are really interested in what you want to do. Enthusiasm is what helps most. &#xD;&#xA;&#xD;&#xA;This site is full of where to start questions with ton of great answers, just use search ;)" />
  <row Id="16509" PostHistoryTypeId="2" PostId="8102" RevisionGUID="bb841ecb-50ee-4232-b7cf-08b58e4fd54f" CreationDate="2011-02-04T10:48:07.967" UserId="561" Text="[ShaderToy][1] is a WebGL shader renderer which shows different shaders in your browser. It has many examples, and you can edit the examples and compile them on the fly! I've spent hours playing with it :)&#xD;&#xA;&#xD;&#xA;You will need WebGL running in your browser, though. Chrome is probably your best bet at the moment.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iquilezles.org/apps/shadertoy/" />
  <row Id="16510" PostHistoryTypeId="5" PostId="8101" RevisionGUID="9e618d18-4542-4417-b8fb-e38df40d759b" CreationDate="2011-02-04T10:52:17.263" UserId="3794" Comment="added 4 characters in body; added 1 characters in body" Text="Do what they want you to do. Create a game or demo (walk through landscape etc.). Don't be disappointed with that they did not want you to intership now. Great is they even responsed. And interships are the best what you can do in paralel with school. Also it is what will makes you unique in eyes of employers after school. &#xD;&#xA;&#xD;&#xA;For example, when i get my intership i had created this: &#xD;&#xA;&#xD;&#xA; - 1 released indie 3d game, &#xD;&#xA; - 1 interactive demo, using gpu, shaders and some advanced algorithms&#xD;&#xA; - computer graphics related Bsc. thesis  with prototype&#xD;&#xA; - 2 raytracers (this propably did not help :))&#xD;&#xA;&#xD;&#xA;You have to show that you are really interested in what you want to do. Enthusiasm is what helps most. &#xD;&#xA;&#xD;&#xA;**This site is full of where to start questions with tons of great answers, just use search ;)**" />
  <row Id="16511" PostHistoryTypeId="2" PostId="8103" RevisionGUID="3fede412-1467-469f-807b-61c32e879718" CreationDate="2011-02-04T11:01:07.353" UserId="229" Text="It looks like you are using relational modeling. There is an alternative method: property/prototype modeling, which Steve Yegge used to create his &quot;ultimate extensible&quot; MMORPG, [Wyvern][1]. Basically, each game object is stored as a single blob (only one query per object) which is then parsed into a property list after retrieval. The flexibility of property lists allows different game objects to have different sets of properties as needed.&#xD;&#xA;&#xD;&#xA;Yegge's [The Universal Design Pattern][2] goes into depth about property/prototype modeling. Steve's blog posts tend to be quite long, so I will try to point you to the relevant sections and summarize the points relevant to your question:&#xD;&#xA;&#xD;&#xA; 1. [Wyvern uses an implementation of the Properties Pattern.][3] A game object is basically a bag of arbitrary properties. Any object to can serve as the prototype for any other object, resulting in amazing open-ended flexibility.&#xD;&#xA; 2. [Persisting property lists.][4] There are various methods of serializing and saving property lists. Wyvern uses a database, &quot;shoving the XML-serialized property list into a text/clob column, and denormalizing the twenty or thirty fields ... needed for queries into their own columns.&quot; &#xD;&#xA; 3. [The datastore of property lists now needs a method of making queries on them.][5] Steve makes several suggestions. Simple text-based queries don't work well for hierarchical data. XML databases or JavaScript/JSON + jQuery might be answers to this problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cabochon.com/&#xD;&#xA;  [2]: http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html&#xD;&#xA;  [3]: http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html#Wyvern&#xD;&#xA;  [4]: http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html#persistence&#xD;&#xA;  [5]: http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html#Query_St" />
  <row Id="16512" PostHistoryTypeId="2" PostId="8104" RevisionGUID="78eb76c8-0efd-41ea-b403-2eacde328045" CreationDate="2011-02-04T11:11:30.813" UserId="229" Text="[Remember the  rules for optimization][1]!&#xD;&#xA;&#xD;&#xA; 1. Don't. &#xD;&#xA; 2. Don't Yet (for experts only).&#xD;&#xA;&#xD;&#xA;&gt; For example an AttackComponent might&#xD;&#xA;&gt; need to know how to filter targets&#xD;&#xA;&gt; inside of a battle context and also&#xD;&#xA;&gt; maybe provide an attack behavior. That&#xD;&#xA;&gt; same item might also have a&#xD;&#xA;&gt; UsableComponent which allows the item&#xD;&#xA;&gt; to be used and apply some effect onto&#xD;&#xA;&gt; a different set of targets filtered&#xD;&#xA;&gt; differently from the same battle&#xD;&#xA;&gt; context. Then not every part of an&#xD;&#xA;&gt; item is an active part, an&#xD;&#xA;&gt; AttributeBonusComponent might need to&#xD;&#xA;&gt; only kick in when the item is in an&#xD;&#xA;&gt; equipped state or when displaying the&#xD;&#xA;&gt; item details page.&#xD;&#xA;&#xD;&#xA;Is it really a problem if you load all the components (AttackComponent, UsableComponent, AttributeBonusComponent) even if all but one go unused?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://c2.com/cgi/wiki?RulesOfOptimization" />
  <row Id="16513" PostHistoryTypeId="2" PostId="8105" RevisionGUID="18715ea3-9108-4f9a-9c7d-0b96acdfdb6b" CreationDate="2011-02-04T11:25:09.980" UserId="4082" Text="If you're sure that's the direction you want to take your career, I wonder why you haven't done a simple game or demo.&#xD;&#xA;&#xD;&#xA;As a developer, I had been making simple games, demos and experiments since I was 5 until I was 22 and finally started my company. When hiring people, not having *anything* to show was a red flag for me.&#xD;&#xA;&#xD;&#xA;Please don't take this the wrong way, I'm not picking on you - on the contrary, I'm trying to help you. How/why do you know this is really what you want to do, if you don't have enough passion to do it just for fun?" />
  <row Id="16514" PostHistoryTypeId="2" PostId="8106" RevisionGUID="783b8778-926f-485e-9368-b5ae8c6fd9aa" CreationDate="2011-02-04T11:31:40.250" UserId="5162" Text="I'm making a scrolling 2D platformer in Java. I have experiance in app dev but none in game dev. I have no idea how I will load my levels in my game. So far I have a Swing application with a GameCanvas that repaints every umteen seconds. I can post the source code if it is nessacary for the answer to this question." />
  <row Id="16515" PostHistoryTypeId="1" PostId="8106" RevisionGUID="783b8778-926f-485e-9368-b5ae8c6fd9aa" CreationDate="2011-02-04T11:31:40.250" UserId="5162" Text="What are some good resources on creating and reading 2D game levels in Java?" />
  <row Id="16516" PostHistoryTypeId="3" PostId="8106" RevisionGUID="783b8778-926f-485e-9368-b5ae8c6fd9aa" CreationDate="2011-02-04T11:31:40.250" UserId="5162" Text="&lt;2d&gt;&lt;java&gt;&lt;level-design&gt;&lt;pc&gt;" />
  <row Id="16517" PostHistoryTypeId="2" PostId="8107" RevisionGUID="a962a066-b220-42ad-9b4f-963035fdb317" CreationDate="2011-02-04T12:26:38.200" UserId="20" Text="Have a look at [Tiled][1] or [OGMO Editor][2]. These editors allow you to create your levels and can also write the level-data to XML. Parsing the XML data in Java should be rather simple. Alternatively you could have a look at the [AndEngine][3] which comes with a [parser for the TMX format][4] (TMX is an XML format written by Tiled).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/&#xD;&#xA;  [2]: http://ogmoeditor.com/&#xD;&#xA;  [3]: http://code.google.com/p/andengine/&#xD;&#xA;  [4]: http://www.andengine.org/blog/2010/07/andengine-tiledmaps-in-the-tmx-format/" />
  <row Id="16518" PostHistoryTypeId="2" PostId="8108" RevisionGUID="23ac5ad5-4525-446e-bdbd-799caecc5e5d" CreationDate="2011-02-04T12:38:07.283" UserId="3311" Text="Is there and TODO list for a game design and development. I'm going to do a game in XNA and I would like to do my TODO list like:&#xD;&#xA;&#xD;&#xA;1. Logo&#xD;&#xA;2. Backgroud&#xD;&#xA;3. Music&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;Any tips?" />
  <row Id="16519" PostHistoryTypeId="1" PostId="8108" RevisionGUID="23ac5ad5-4525-446e-bdbd-799caecc5e5d" CreationDate="2011-02-04T12:38:07.283" UserId="3311" Text="Todo List for game design and  development" />
  <row Id="16520" PostHistoryTypeId="3" PostId="8108" RevisionGUID="23ac5ad5-4525-446e-bdbd-799caecc5e5d" CreationDate="2011-02-04T12:38:07.283" UserId="3311" Text="&lt;xna&gt;&lt;list&gt;" />
  <row Id="16521" PostHistoryTypeId="2" PostId="8109" RevisionGUID="fda378ab-d9ef-4d0e-8c3c-8c146f423035" CreationDate="2011-02-04T12:38:32.273" UserId="1868" Text="Hang around in the right places. Make your name known in the relevant sites (gamasutra, gamedev, tigsource etc) and build some online presence so your demos are seen." />
  <row Id="16522" PostHistoryTypeId="2" PostId="8110" RevisionGUID="a59cb23f-e4d8-4987-a732-39d9695d8e8e" CreationDate="2011-02-04T12:39:20.213" UserId="5166" Text="I want to create an installer for a game and after that an icon to be put in Games Explorer for Win Vista and Win 7. I have created the GDF (game definitions file), then build the script for project and obtained the .h, GDF and .rc files. But i can't compile using Visual Studio 2010 the .rc file into an executable to be used after that to create the installer. Some error is popping up after i set the executable path &quot;Could not load file or assembly'Microsoft.VisualStudio.HpcDebugger.Impl, Version 10.0.0.0, Culture=neutral, PublickKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.&quot;&#xD;&#xA;&#xD;&#xA;Any ideas what i'm doing wrong ? I need to mention that i've never worked before with GDF Editor and Visual Studio.&#xD;&#xA;&#xD;&#xA;Any answer would be highly appreciated.Thanks!&#xD;&#xA;" />
  <row Id="16523" PostHistoryTypeId="1" PostId="8110" RevisionGUID="a59cb23f-e4d8-4987-a732-39d9695d8e8e" CreationDate="2011-02-04T12:39:20.213" UserId="5166" Text="How to integrate the .gdf with a specific exe for Games Explorer" />
  <row Id="16524" PostHistoryTypeId="3" PostId="8110" RevisionGUID="a59cb23f-e4d8-4987-a732-39d9695d8e8e" CreationDate="2011-02-04T12:39:20.213" UserId="5166" Text="&lt;game-recording&gt;" />
  <row Id="16525" PostHistoryTypeId="2" PostId="8111" RevisionGUID="c43ca5b1-e4f2-4c9c-80ee-26dfb95e2c11" CreationDate="2011-02-04T13:23:52.483" UserId="4284" Text="I've always been a Valve fan, but now that I have the opportuninty to choose a game engine for a project I'm not sure I want to choose the Source Engine after watching [this wikipedia entry][1]. My options essentially boiled down to an open source stack (Horde3D + Zoidcom + Spark + SFML + CEGUI, and well, not OSS but PhysX too), UDK and the Source Engine.&#xD;&#xA;&#xD;&#xA;My question is (because I really have no experience with it) why should any developer choose the Source Engine over any other open source or commercial option?, is the Source Engine really worth it as a game development tool or has it time already passed and it is obsolete against other solutions?.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Source_engine#Criticism" />
  <row Id="16526" PostHistoryTypeId="1" PostId="8111" RevisionGUID="c43ca5b1-e4f2-4c9c-80ee-26dfb95e2c11" CreationDate="2011-02-04T13:23:52.483" UserId="4284" Text="Source Engine, is it worth it?" />
  <row Id="16527" PostHistoryTypeId="3" PostId="8111" RevisionGUID="c43ca5b1-e4f2-4c9c-80ee-26dfb95e2c11" CreationDate="2011-02-04T13:23:52.483" UserId="4284" Text="&lt;engine&gt;&lt;open-source&gt;&lt;framework&gt;" />
  <row Id="16528" PostHistoryTypeId="4" PostId="8111" RevisionGUID="7054c87b-3abb-47b6-9add-d7c1160b5e43" CreationDate="2011-02-04T13:33:33.163" UserId="14" Comment="Less Argumentative title." Text="Why should I consider using the Source Engine?" />
  <row Id="16529" PostHistoryTypeId="2" PostId="8112" RevisionGUID="82b652c1-2e37-4a41-8b4e-dc88b472b5f1" CreationDate="2011-02-04T13:52:39.310" UserId="1829" Text="The source engine is more a professionnal engine, I would recommend to use it if you have a project within a company, but if you are doing something &quot;through&quot; the help of internet, my answer is that you can't beat open source: its use is more widespread and their usage is more commonly &quot;standard&quot; in its design, while professionnal engines usually have been made with a goal in mind, which were half life 2 and all other mods alike, and thus, those requirements with their deadlines made it more difficult to use, even if the result is awesome.&#xD;&#xA;&#xD;&#xA;It really depends how do you work and what do you want to do; I'm not much experience, but as I see it, even an indie would use open source rather than pro engines.&#xD;&#xA;&#xD;&#xA;Open source softwares always have to shine in ease of use, whatever is the result, because that's the only thing that makes a software better than another: OSS and internet are brothers for life, but they can't beat the voodoo magics of proprietary top-notch last-generation software." />
  <row Id="16530" PostHistoryTypeId="2" PostId="8113" RevisionGUID="8d41a958-54ae-4eab-8c1a-8c1be61f3038" CreationDate="2011-02-04T14:38:15.140" UserId="3030" Text="I'm rewriting my game now using software designing patterns and want to do the code, most correct I can. While implementing MVC(Model View Controller) I got a question which I would like to discuss or to hear some opinions of experts.&#xD;&#xA;The question is about management of unused frames... For example next sequence of windows:&#xD;&#xA;ResourceLoadingWindow -&gt; LoginWindow -&gt; GameWindow&#xD;&#xA;Definetly that I don't want to reuse ResourceLoadingWindow , since I'm using Java Applet and I don't see any situation when I will need to reuse it. The different story is about LoginWindow, which can be reused a lot of times, because some player would want to Logout and come back again in few minutes for example. I would like to know, following the MVC structure, should I destroy window, removing it from ContentPane or just hide? Maybe I need to unregister it from controller or I shouldn't do so?&#xD;&#xA;&#xD;&#xA;Thanks in adavance." />
  <row Id="16531" PostHistoryTypeId="1" PostId="8113" RevisionGUID="8d41a958-54ae-4eab-8c1a-8c1be61f3038" CreationDate="2011-02-04T14:38:15.140" UserId="3030" Text="Unused frame(window) management" />
  <row Id="16532" PostHistoryTypeId="3" PostId="8113" RevisionGUID="8d41a958-54ae-4eab-8c1a-8c1be61f3038" CreationDate="2011-02-04T14:38:15.140" UserId="3030" Text="&lt;java&gt;&lt;gui&gt;" />
  <row Id="16533" PostHistoryTypeId="2" PostId="8114" RevisionGUID="b33833bd-c04b-4a5f-9ecf-911b45077984" CreationDate="2011-02-04T15:05:23.743" UserId="1829" Text="I'm looking for a way to write a typed text on a texture, and then render it on a screen: in the game it's just the screen of a computer where a scientist is typing text on.&#xD;&#xA;&#xD;&#xA;The texture will be already generated: it will have several textures in it.&#xD;&#xA;&#xD;&#xA;I can't find any obvious way to do a simple render to texture with unity, how could I do that ?" />
  <row Id="16534" PostHistoryTypeId="1" PostId="8114" RevisionGUID="b33833bd-c04b-4a5f-9ecf-911b45077984" CreationDate="2011-02-04T15:05:23.743" UserId="1829" Text="[Unity] Render an animated texture to a screen" />
  <row Id="16535" PostHistoryTypeId="3" PostId="8114" RevisionGUID="b33833bd-c04b-4a5f-9ecf-911b45077984" CreationDate="2011-02-04T15:05:23.743" UserId="1829" Text="&lt;unity&gt;&lt;textures&gt;&lt;rendering&gt;" />
  <row Id="16536" PostHistoryTypeId="2" PostId="8115" RevisionGUID="145063bd-8a36-4fb3-824f-8b3afb2be0c5" CreationDate="2011-02-04T15:29:10.643" UserId="51" Text="I don't think you can use render textures in anything but Unity Pro.  But assuming you have that...&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/documentation/ScriptReference/Camera-targetTexture.html&#xD;&#xA;&#xD;&#xA;Basically set up a camera pointing to whatever you want your render texture to be.  You can set up layers so that you camera can only see things on a certain layer instead of having to have it off in the middle of nowhere.  You then just have your screen's texture point to that render texture you've created.&#xD;&#xA;&#xD;&#xA;Then you can just point the camera to whatever you want.  If you want to just swap between textures it would be pretty easy to write a script to cycle some object to go between textures.  You could also do it dynamically with 3D text if you wanted to save on texture space (and assuming you already had a font texture loaded)." />
  <row Id="16537" PostHistoryTypeId="2" PostId="8116" RevisionGUID="11bc1071-96df-40e5-9782-7faea92ef977" CreationDate="2011-02-04T16:05:32.000" UserId="2332" Text="As said before this situation is perfect for steering behaviours, but I'd just like to extend on it slightly. The Arrive behaviour would be perfect for this scenario. You might also want to take obstacles into account as well. You can make use of the Obstacle Avoidance behaviour here as well.&#xD;&#xA;&#xD;&#xA;Unfortunately, http://www.red3d.com/cwr/steer/ doesn't provide source code for the behaviours. However, Programming Game AI by Example does and explains the behaviours in easy to understand chunks. If you can't get the book you can always get the source code here: http://www.wordware.com/files/ai/&#xD;&#xA;&#xD;&#xA;Furthermore, if you want to extend your movement to include pathfinding, you can have a pathfinder class that calculates the path (perhaps as a collection of 2D vectors) and use the Path Follow steering behaviour to add that into the mix too.&#xD;&#xA;&#xD;&#xA;The source code I've linked to also provides three different methods of combining these steering behaviours together as well.&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="16538" PostHistoryTypeId="2" PostId="8117" RevisionGUID="f358cfc1-ef12-4324-95d4-82b3b5bd2f30" CreationDate="2011-02-04T16:12:56.140" UserId="51" Text="There are a handful of things the source engine gets you.&#xD;&#xA;&#xD;&#xA; 1. It &quot;just works&quot;.  None of this trying to ham fist tech together like in your OSS solution.  &#xD;&#xA; 2. Lots of tech focused on realistic humans.  Ragdolls are good, IK (for proper foot placement) is good.  Pathfinding is there (I think).  Physics is pretty polished.  And you get their facial animation tool which lets you do passable cinematics in-game along with gestures (partial additive animations).  NPCs have things like &quot;interest points&quot; that they'll occasionally look at when wandering about, or event-based reactions to things (for example, saying something if you throw a physics object at them or if you're at low health).&#xD;&#xA; 3. It's not Unreal.  You're working in C++ as a programmer instead of UnrealScript. &#xD;&#xA;&#xD;&#xA;But there are some problems with it.  &#xD;&#xA;&#xD;&#xA; 1. I don't think they've solved the lighting for dynamic objects (last I checked dynamic objects were vertex lit using a single sample point at the origin), meaning that it can clash pretty bad with the nice-looking lightmapped static environment.&#xD;&#xA; 2. Not as modern occlusion solutions.  Unless they've changed it since I've used it, you still have to do Quake-3-style manual portal placement and sometimes hint brushes.  Hope you like making most of your level out of brushes.&#xD;&#xA; 3. It's not Unreal.  The artists' tools aren't going to be as polished. Techniques learned here probably aren't as useful to the job market as a whole as more studios use Unreal. " />
  <row Id="16539" PostHistoryTypeId="2" PostId="8118" RevisionGUID="bcb6ce81-d4e7-4bac-814e-44ded2844166" CreationDate="2011-02-04T16:43:07.553" UserId="1829" Text="We are doing our school project with Unity3d, since they were using Shiva the previous year (which seems horrible to me), and I wanted to know your point of view for this tool.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - multi platform, I even heard Google is going to implement it in Chrome&#xD;&#xA; - everything you need is here&#xD;&#xA; - scripting languages makes it a good choice for people who are not programming gurus &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - multiplayer ?&#xD;&#xA; - proprietary&#xD;&#xA; - it's less &quot;making a game from scratch&quot;&#xD;&#xA; - C++ would have been a cool thing&#xD;&#xA;&#xD;&#xA;I really think this kind of tool is interesting, but is it worth it to use at school for a project that involves more than 3 programming persons ? What do we really learn in term of programming from using this kind of tool (I'm ok with python and js, but I hate C#) ? We could have use Ogre instead, even if we were learning direct x starting january..." />
  <row Id="16540" PostHistoryTypeId="1" PostId="8118" RevisionGUID="bcb6ce81-d4e7-4bac-814e-44ded2844166" CreationDate="2011-02-04T16:43:07.553" UserId="1829" Text="What are the pro/cons of Unity3D as a choice to make games ?" />
  <row Id="16541" PostHistoryTypeId="3" PostId="8118" RevisionGUID="bcb6ce81-d4e7-4bac-814e-44ded2844166" CreationDate="2011-02-04T16:43:07.553" UserId="1829" Text="&lt;unity&gt;" />
  <row Id="16542" PostHistoryTypeId="2" PostId="8119" RevisionGUID="0ae600e3-934a-4e6c-9b72-58bfdbcd98c6" CreationDate="2011-02-04T16:44:52.980" UserId="4204" Text="I have been developing for win7 mobile (XNA/silverlight and will continue to do so, love everything about it) but I wanted to branch a few of my more polished games to google app store online, and perhaps android(though not sure, as with all the different versions it makes learning/loading applications a bit tricky)&#xD;&#xA;&#xD;&#xA;Was wondering what is the most versatile language to start learning from chrome apps/android:&#xD;&#xA;&#xD;&#xA;Java I know would be excellent for android, but could I port it to a web app for chrome? (and its close to C#)&#xD;&#xA;&#xD;&#xA;Flash would work for a web app as I can just embed it into a html page (have done actionscript before, didn't care much for the IDE though), but would it also work on android?&#xD;&#xA;&#xD;&#xA;or I guess there is always C/C++ but haven't heard much about that, though I think it works for both (though C++ does interest me)&#xD;&#xA;&#xD;&#xA;Any advice would be excellent, thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16543" PostHistoryTypeId="1" PostId="8119" RevisionGUID="0ae600e3-934a-4e6c-9b72-58bfdbcd98c6" CreationDate="2011-02-04T16:44:52.980" UserId="4204" Text="Developing for Chrome App/Android?" />
  <row Id="16544" PostHistoryTypeId="3" PostId="8119" RevisionGUID="0ae600e3-934a-4e6c-9b72-58bfdbcd98c6" CreationDate="2011-02-04T16:44:52.980" UserId="4204" Text="&lt;c++&gt;&lt;flash&gt;&lt;java&gt;&lt;android&gt;" />
  <row Id="16545" PostHistoryTypeId="2" PostId="8120" RevisionGUID="f9d73c77-f1ad-4b71-b10b-b7d8430fabe3" CreationDate="2011-02-04T16:47:17.723" UserId="5001" Text="Well, by far and away your biggest question should be: is my game going to be commercial? If so, then you will have to obtain a Source engine license, which is going to be (in most cases) substantially more costly than other engines, especially options like Unity. From the jist of your post I assume you aren't going to be commercial, though.&#xD;&#xA;&#xD;&#xA;If your game is not going to be commercial, you can use the Source engine for free, but then you will have limited access to the engine and be at the mercy of the SDK tools. Valve has not done a great job (I am putting this lightly) at maintaining the SDK lately and the tools remain in a near-broken state.&#xD;&#xA;&#xD;&#xA;Personally, speaking as someone who has worked on multiple Source SDK mods since 2005, I would stay as far away from source as possible. The tools are simply far too outdated and unkempt at this point. They have literally gotten worse as time has passed; for example the demo smoother tool (used to edit the camera movement in a demo to get good footage for movies such as trailers), has actually become harder to use from the Episode 1 SDK to the Orange Box SDK. It has more bugs and more crashes. The other tools can have the same said of them, OBSDK's Hammer (the level editing tool) now has multiple render bugs that did not exist in previous SDK versions, etc... it simply feels as if they do not care about their free tools anymore. It's a shame, as mods are a huge part of why Valve is what they are today. I do not know if their commercial tools fare the same (I would hope not!), but given what I have experienced with the free SDK there is no way I would ever consider purchasing/using the source engine for a commercial game.&#xD;&#xA;&#xD;&#xA;As for other free engines, Ogre3D and Irrlicht are worth looking into as well. Also the Torque engine from Garage Games has just recently re-launched with a much lower price, $100 for their 3D engine, down from what used to be around $2000 iirc." />
  <row Id="16546" PostHistoryTypeId="2" PostId="8121" RevisionGUID="521510b8-ca89-411f-bfa1-0a06a6f29767" CreationDate="2011-02-04T17:10:21.243" UserId="5001" Text="As far as game design goes, you should start a wiki or document with your other collaborators and just keep adding to it. The new Google docs is really good for collaboration I find.&#xD;&#xA;&#xD;&#xA;As well, try and &quot;play the game in your head&quot;, and imagine how a player will interact with the finished product. Take note of everything. The user launches the game, what does he see? Is there an intro video? Can he hit a key to skip it? How does the screen transition from the intro video to the main menu? Is there an animation on the main menu, such as the game title scrolling into frame? Should there be? How does the user select a menu option? Does it play a sound effect when he does? etc. etc. etc. Just keep asking yourself questions from the user perspective throughout the development of the game.&#xD;&#xA;&#xD;&#xA;Also, this article has some good things to check for regardless of platform: http://create.msdn.com/en-US/education/catalog/article/bestpractices_31" />
  <row Id="16547" PostHistoryTypeId="2" PostId="8122" RevisionGUID="d4b69a26-dc9b-42e3-8287-3e3aaa63c166" CreationDate="2011-02-04T17:15:08.660" UserId="1430" Text="I'll start by commenting on your list:&#xD;&#xA;&#xD;&#xA; * Scripting is not just a benefit to non-programmers. Being a (good) programmer is more than just knowing a language, it's knowing how to deconstruct problems and think in a particular way. Scripting languages can allow a programmer to leverage those higher-order critical thinking skills in order to produce more powerful, more interesting results in less time than he or she might need to produce equivalent results while also worrying about lower level details that some languages (C++ comes to mind) force into the picture.&#xD;&#xA;&#xD;&#xA; * Multiplayer support (or lack thereof) is only an issue one way or another if your project needs it.&#xD;&#xA;&#xD;&#xA; * I fail to see how &quot;proprietary&quot; is a con. If this is a school project you're probably not going to want to be spending time hacking on the source of the of the framework you use, or anything. Besides, DirectX is proprietary too.&#xD;&#xA;&#xD;&#xA; * There is absolutely nothing wrong with using higher-level frameworks or tools like Unity. &quot;Making a game from scratch&quot; is a non-achievement -- what exactly do you consider &quot;from scratch?&quot; You're still going to be using somebody else's graphics API. Somebody else's runtime (even C requires a runtime library). &quot;Making a game&quot; is what earns respect, not &quot;making a game without using any useful tools.&quot;&#xD;&#xA;&#xD;&#xA; * C++ being a &quot;cool&quot; thing is a bit subjective. The language is used very often by professionals in the industry, but probably not for the reasons you would think. As a language, it's starting to show its age and can be extremely cumbersome compared to more modern options. In any cases, languages are just tools and a good programmer should be able to pick up new ones with relative ease.&#xD;&#xA;&#xD;&#xA;The big advantage to using Unity for your school project is that it's a high level framework with a lot of infrastructural work already in place for you -- this will allow you to focus on your *game* and not on building a foundation. You have, presumably, a relatively limited window in which to produce this game so the more you can leverage existing tools, the more time you'll have to produce logic or assets that are specific to your game and will make your game look and feel more complete -- there's a learning curve for Unity, but you end up with much more at your disposal much quicker.&#xD;&#xA;&#xD;&#xA;A disadvantage is that you're potentially sinking time into learning a specific tool that involves knowledge that *might* not be transferrable, especially if you decide that Unity's workflow and environment just aren't for you and you don't ever want to use it again. Also, Unity doesn't have the most obvious *2D* workflow -- it's very focused on 3D games, which all the overhead in art assets that tends to involve. But I think that, for a school project like you're describing, Unity is a pretty good choice." />
  <row Id="16548" PostHistoryTypeId="25" PostId="8118" RevisionGUID="7bf5fb72-4eb0-4827-b7f2-bb6e0e696a7d" CreationDate="2011-02-04T17:16:13.673" Comment="http://twitter.com/#!/StackGameDev/status/33574560250990593" />
  <row Id="16549" PostHistoryTypeId="2" PostId="8123" RevisionGUID="26d8edf8-ba0a-4eac-80ca-ce67bb8cc616" CreationDate="2011-02-04T17:38:10.563" UserDisplayName="slcpfmmm" Text="As a person who just got hired in a major game company as my first real job, I'll tell you a little part of my story.&#xD;&#xA;&#xD;&#xA;I didn't graduate from DigiPen or any other game-specialized university. I have a B.S. and M.S. both in general Computer Science. But just before I started applying for a job, I thought that lots of people would be applying for game industry jobs, since, well, I know a crapton of people who want to make games. So I just had to make sure I had something to stand out in between everybody else. So I thought I'd make a game.&#xD;&#xA;&#xD;&#xA;Sure, I had been wanting to make games for a long time, and had made lots of prototypes for games, as well as other applications. Checking my source code folder from the past 5 years, I counted 500000 lines of code. But so far, I hadn't made a single complete game product (or any finished product for all that's worth).&#xD;&#xA;&#xD;&#xA;When I say complete, I mean that not only the program must be in final version, but also must come with a manual, and an installer, all in a CD with a nice design. Also I needed a webpage.&#xD;&#xA;&#xD;&#xA;So instead of trying to challenge my technical skills by making a game with overly complicated gameplay, AI and 3D effects, I thought I'd make a small project, but one I could make sure I could take from beginning to end. Since I'd be also making the graphics and music (I'm not so great at these), the project should be as simple as possible.&#xD;&#xA;&#xD;&#xA;Eventually, I decided I'd make a tetris clone. You should be able to play tetris yourself to get a huge score, play with somebody else, or play against the computer. It should have menus, and the resolution, the sound and music volumes and the controls should be customizable. I'd make that game in 2D, as even though I have made lots of 3D programs, my 3D modeling experience is null. So I'd make everything in pixel art.&#xD;&#xA;&#xD;&#xA;And after 3 hours, I had a prototype. I was playing games of tetris with an XBox controller, and it felt really nice. I was almost over...&#xD;&#xA;&#xD;&#xA;Or that's what I thought. The entire project took 2 more weeks after that until I reached a beta version (feature complete), which I took to the first interview at a company (the one that eventually hired me) the very same day I considered my game to be a beta.&#xD;&#xA;&#xD;&#xA;So why did it take so long? There are so many details in making a game! if the main menu fades out so the game fades in, how long should that fadeout take? 0.5s? 0.2s? what about the fade in of the game? 0.7s? What about the repeat rate for menu items when you keep the controller button pressed? should it be the same for the keyboard? How are two people going to play on the same keyboard at the same time? What about sounds? I bought an sfx pack with hundreds of sounds. Which one feels most like a turn, and which one feels more like a drop? They also have to sound like the same family of sounds! What happens when you clear a line? does the line disappear immediately? or should it be animated? should the other blocks fall immediately? or should this be animated as well?&#xD;&#xA;&#xD;&#xA;Well, that is what Edison meant when he said genius is 1% inspiration, 99% perspriation.&#xD;&#xA;&#xD;&#xA;If you take such a simple project and show (and tell) to a prospective employer that you were able to do all that and consider all those tiny details, I am convinced you will impress anybody. Not only you're showing you care about all that, but you're also showing that you can manage your project from beginning to end, and overall that you're a great hire.&#xD;&#xA;&#xD;&#xA;So try something like that. Make a game from start to end, and not only you'll have a great thing to show at an interview, you'll also have a taste of what making games is about, and therefore have a chance to meditate whether or not this is the industry you want to join.&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="16550" PostHistoryTypeId="2" PostId="8124" RevisionGUID="bb320428-be61-49fc-b1a1-dccadb081df6" CreationDate="2011-02-04T17:44:10.313" UserId="51" Text="One major problem with Unity is the source control.  If you're not working in a team this isn't going to matter as much (arguably), but that's pretty likely not going to be the case.&#xD;&#xA;&#xD;&#xA;You can use Unity Asset Server, but that requires 1) Unity Pro ($1500), and 2) a per-seat Asset Server License ($500).  I'm assuming you can get some kind of educational discount, but it isn't free.&#xD;&#xA;&#xD;&#xA;Alternatively, you can use something like SVN with Unity. To properly support it you still need Unity Pro.&#xD;&#xA;&#xD;&#xA;You can't really just check a non-pro version of Unity into SVN and expect it to work flawlessly.   Their mechanism for binding GUIDs to assets and so forth isn't exactly SCM-safe.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Multiplayer functionality is pretty decent, although to be honest I haven't shipped a game with it.  In theory you just attach network views to things and tell it what you want to serialize to set up replication properly.  From there it's some UI work to connect to other peers and set up.  It's mostly peer-to-peer, though.  You might be able to do client/server programming running unity in headless mode, but I haven't messed with it.  But just getting person A to run around on person B's screen is pretty easy and fast to do.&#xD;&#xA;&#xD;&#xA;Also C# is a *positive* as far as I'm concerned.  LINQ is super expressive.  It has proper exception handling and garbage collection.  It has much more modern paradigms like delegates, lambdas, interfaces and better generic support than C++.&#xD;&#xA;&#xD;&#xA;The biggest positive of using Unity, though, is probably the art pipeline.  You can take a PSD or Max file (assuming you have 3ds max installed) in the folder and it gets imported.  " />
  <row Id="16551" PostHistoryTypeId="5" PostId="8111" RevisionGUID="cc500444-932e-4951-9fde-448d83db7796" CreationDate="2011-02-04T18:15:50.170" UserId="4284" Comment="added 176 characters in body" Text="I've always been a Valve fan, but now that I have the opportuninty to choose a game engine for a project I'm not sure I want to choose the Source Engine after watching [this wikipedia entry][1]. My options essentially boiled down to an open source stack (Horde3D + Zoidcom + Spark + SFML + CEGUI, and well, not OSS but PhysX too), UDK and the Source Engine.&#xD;&#xA;&#xD;&#xA;My question is (because I really have no experience with it) what would be the **technical reasons** (not license or other) for any developer to choose the Source Engine over any other open source or commercial option ?, is the Source Engine really worth it as a game development tool or has it time already passed and it is obsolete against other solutions?.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;Edit: Precised my question a little more&#xD;&#xA;, I'm looking for technical reasons to choose the Source Engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Source_engine#Criticism" />
  <row Id="16552" PostHistoryTypeId="2" PostId="8125" RevisionGUID="2906e4ae-c88b-446b-b990-85b7fcc42d99" CreationDate="2011-02-04T18:26:21.247" UserId="1419" Text="There are a couple of aspects to this problem. Firstly, how are you drawing your 10000 blocks? Are you actually drawing them as 10000 seperate object? If so this is almost certainly your bottle neck, not the lack of occlusion culling. You should group these blocks into a smaller number of meshes (perhaps a few thousand per mesh) in order to reduce draw calls.&#xD;&#xA;&#xD;&#xA;As for your actual question, there are three types of occlusion culling which spring to mind.&#xD;&#xA;&#xD;&#xA;1) Blocks outside the view frustum. This means blocks which are behind you or two the side. Ogre already removes these via view frustum culling.&#xD;&#xA;&#xD;&#xA;2) Blocks which are 'underground' or completely surrounded by other blocks so they can never be seen from any angle. You can identify these by looking at the siz neighbouring blocks. If they are all solid your block is hidden. The GPU should never even hear about these blocks - they should be skipped when you are building the mesh which represent your surface.&#xD;&#xA;&#xD;&#xA;3) Blocks which are on the surface and can be seen from some positions in the level, but which are currently hidden by a hill (or something). This is the trickiest case which I haven't addressed myself, but there's a good chance that hardware occlusion queries can be used for this case.&#xD;&#xA;&#xD;&#xA;It's a shameless plug, but I have a fairly mature library which several people are using to develop Minecraft clones, including some using Ogre. You define the contents of the volume and it generates the surface mesh which you can then render. Here is the home page:&#xD;&#xA;&#xD;&#xA;http://www.thermite3d.org/&#xD;&#xA;&#xD;&#xA;And here is a video of someone else's project which is using it:&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=Jju6WRPEK7o" />
  <row Id="16553" PostHistoryTypeId="2" PostId="8126" RevisionGUID="1403ec3d-ad9a-41dd-9991-4f80e0c95078" CreationDate="2011-02-04T18:32:08.463" UserId="4638" Text="I want to improve upon my first person camera implementation and extend it to, so the user can toggle between third person/first person view.&#xD;&#xA;&#xD;&#xA;My current setup:&#xD;&#xA;draw()::&#xD;&#xA;&#xD;&#xA;	glPushMatrix();&#xD;&#xA;		m_pCamera-&gt;ApplyCameraTransform();&#xD;&#xA;&#xD;&#xA;		// Render gameObjects&#xD;&#xA;	glPopMatrix();&#xD;&#xA;&#xD;&#xA;Camera is strongly coupled to the player, so much so, that it is a friend of player. This is what the Camera::ApplyCameraTransform looks like:&#xD;&#xA;&#xD;&#xA;	glm::mat4 l_TransformationMatrix;&#xD;&#xA;	m_pPlayer-&gt;m_pTransformation-&gt;GetTransformation(l_TransformationMatrix, false);&#xD;&#xA;&#xD;&#xA;	l_TransformationMatrix = glm::core::function::matrix::inverse(l_TransformationMatrix);&#xD;&#xA;	glMultMatrixf(glm::value_ptr(l_TransformationMatrix));&#xD;&#xA;&#xD;&#xA;So, I take the player's transformation matrix and invert it to yield First person camera view. &lt;hr&gt;&#xD;&#xA;Since, Third person camera view is just a 'translated' first person view behind the player; what would be a good way to improve upon this (keeping in mind that I will be extending it to Third person camera as well.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16554" PostHistoryTypeId="1" PostId="8126" RevisionGUID="1403ec3d-ad9a-41dd-9991-4f80e0c95078" CreationDate="2011-02-04T18:32:08.463" UserId="4638" Text="Improving first person camera and implementing third person camera" />
  <row Id="16555" PostHistoryTypeId="3" PostId="8126" RevisionGUID="1403ec3d-ad9a-41dd-9991-4f80e0c95078" CreationDate="2011-02-04T18:32:08.463" UserId="4638" Text="&lt;architecture&gt;&lt;camera&gt;&lt;first-person-shooter&gt;&lt;design&gt;&lt;third-person-view&gt;" />
  <row Id="16556" PostHistoryTypeId="2" PostId="8127" RevisionGUID="7616fde3-d64d-4f79-8e20-e367f8844e21" CreationDate="2011-02-04T18:41:38.390" UserId="5171" Text="I'm just trying to figure out the best approach for running a scolling background on an android device. The method I have so far.... its pretty laggy. I use threads, which I believe is not the best bet for android platforms&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    	public void run() {&#xD;&#xA;    		// Game Loop&#xD;&#xA;    		while(runningThread){&#xD;&#xA;    			//Scroll background down&#xD;&#xA;    			bgY += 1;&#xD;&#xA;    &#xD;&#xA;    			try {&#xD;&#xA;    				this.postInvalidate();&#xD;&#xA;    				t.sleep(10);&#xD;&#xA;    			} catch (Exception e) {&#xD;&#xA;    				// TODO Auto-generated catch block&#xD;&#xA;    				e.printStackTrace();&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;where postinvalidate in the onDraw function simply pushings the background image down&#xD;&#xA;&#xD;&#xA;    canvas.drawBitmap(backgroundImage, bgX, bgY, null);&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="16557" PostHistoryTypeId="1" PostId="8127" RevisionGUID="7616fde3-d64d-4f79-8e20-e367f8844e21" CreationDate="2011-02-04T18:41:38.390" UserId="5171" Text="Android game scrolling background" />
  <row Id="16558" PostHistoryTypeId="3" PostId="8127" RevisionGUID="7616fde3-d64d-4f79-8e20-e367f8844e21" CreationDate="2011-02-04T18:41:38.390" UserId="5171" Text="&lt;2d&gt;&lt;java&gt;&lt;android&gt;&lt;gameloop&gt;" />
  <row Id="16559" PostHistoryTypeId="2" PostId="8128" RevisionGUID="9b6f6f18-93cc-4bf6-9c16-99cdfd686bc6" CreationDate="2011-02-04T18:52:48.900" UserId="4638" Text="In my current FPS game, I have the mouse setup in a way, that it always forces the position of the mouse to be centered at the screen. This gets the job done, but also gets very annoying, since the mouse is &quot;fixed&quot; at the center of the screen. &#xD;&#xA;&#xD;&#xA;Here is what I am doing:&#xD;&#xA;&#xD;&#xA;- get mouse current position&#xD;&#xA;- find offset from center of the screen&#xD;&#xA;- set mouse current position to center of the screen&#xD;&#xA;- apply difference to m_pTransformation (transformation matrix of the player)&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;Is there a better way to deal with this ?" />
  <row Id="16560" PostHistoryTypeId="1" PostId="8128" RevisionGUID="9b6f6f18-93cc-4bf6-9c16-99cdfd686bc6" CreationDate="2011-02-04T18:52:48.900" UserId="4638" Text="Improve mouse movement in First person game" />
  <row Id="16561" PostHistoryTypeId="3" PostId="8128" RevisionGUID="9b6f6f18-93cc-4bf6-9c16-99cdfd686bc6" CreationDate="2011-02-04T18:52:48.900" UserId="4638" Text="&lt;input&gt;&lt;movement&gt;&lt;first-person-shooter&gt;" />
  <row Id="16562" PostHistoryTypeId="2" PostId="8129" RevisionGUID="3b861729-6f51-4e0d-bcee-a27cad164020" CreationDate="2011-02-04T19:08:41.787" UserDisplayName="user5173" Text="I'm a little bit interested on this matter. You are saying there are a lots of problems with making a game p2p instead of a classic client-server model. But i'm pretty sure that p2p is like client-server but every peer has the chance to become a server. About the LAG if u add one more machine as a server there are more probabilities that many clients are further from the server, but using p2p there are no extra machines in the lobby u can manage the latency tests and create groups with minimal ping. About the traffic generating, as i've learned you must ask the clients to transmit lesser than less i mean the clients have to figure all the other clients are willing to mean." />
  <row Id="16563" PostHistoryTypeId="5" PostId="8119" RevisionGUID="4bf83c1d-d12a-4e2c-b92e-c432ac8fb87b" CreationDate="2011-02-04T19:32:56.040" UserId="2301" Comment="fixed grammar " Text="I have been developing for win7 mobile (XNA/silverlight and will continue to do so, love everything about it) but I wanted to branch a few of my more polished games to google app store online, and perhaps android(though not sure, as with all the different versions it makes learning/loading applications a bit tricky)&#xD;&#xA;&#xD;&#xA;What is the most versatile language to start learning from chrome apps/android:&#xD;&#xA;&#xD;&#xA;Java would be excellent for android, but could I port it to a web app for chrome? (and its close to C#)&#xD;&#xA;&#xD;&#xA;Flash would work for a web app as I can just embed it into a html page (have done actionscript before, didn't care much for the IDE though), but would it also work on android?&#xD;&#xA;&#xD;&#xA;or I guess there is always C/C++ but haven't heard much about that, though I think it works for both (though C++ does interest me)&#xD;&#xA;&#xD;&#xA;Any advice would be excellent, thanks.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16564" PostHistoryTypeId="24" PostId="8119" RevisionGUID="b824725a-b215-45f5-a0f5-6a17a08c4ab8" CreationDate="2011-02-04T19:32:56.040" Comment="Proposed by 2301 approved by 14 edit id of 7" />
  <row Id="16565" PostHistoryTypeId="2" PostId="8130" RevisionGUID="58c66813-a8a5-4486-8941-5be18d68526b" CreationDate="2011-02-04T19:50:41.560" UserId="1743" Text="I am interested in making a game that I currently have a co-op experience, however I'm curious as to the best method of implementing this in HTML5.&#xD;&#xA;&#xD;&#xA;I have made games before using straight C sockets, and also with the Net library for SDL.&#xD;&#xA;&#xD;&#xA;What are some of my best options for doing this in a canvas-based environment?&#xD;&#xA;&#xD;&#xA;At present, all I can come up with are either AJAX/database solutions (with a high refresh rate), or somehow implementing a PHP server that would funnel the data through sockets.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;The overall gameplay would be a 2.5D platformer-ish type of game, so both clients would need to be continually updated with player positions, enemy positions, projectiles, environmental data, etc.&#xD;&#xA;" />
  <row Id="16566" PostHistoryTypeId="1" PostId="8130" RevisionGUID="58c66813-a8a5-4486-8941-5be18d68526b" CreationDate="2011-02-04T19:50:41.560" UserId="1743" Text="Adding multiplayer to an HTML5 game" />
  <row Id="16567" PostHistoryTypeId="3" PostId="8130" RevisionGUID="58c66813-a8a5-4486-8941-5be18d68526b" CreationDate="2011-02-04T19:50:41.560" UserId="1743" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;html5&gt;" />
  <row Id="16568" PostHistoryTypeId="5" PostId="8118" RevisionGUID="9c79d7ea-2c65-40ab-b043-6181857f9a3c" CreationDate="2011-02-04T20:15:18.763" UserId="1829" Comment="edited proprietary" Text="We are doing our school project with Unity3d, since they were using Shiva the previous year (which seems horrible to me), and I wanted to know your point of view for this tool.&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - multi platform, I even heard Google is going to implement it in Chrome&#xD;&#xA; - everything you need is here&#xD;&#xA; - scripting languages makes it a good choice for people who are not programming gurus &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - multiplayer ?&#xD;&#xA; - proprietary, you are totally dependent of unity and its limit and can't extend it&#xD;&#xA; - it's less &quot;making a game from scratch&quot;&#xD;&#xA; - C++ would have been a cool thing&#xD;&#xA;&#xD;&#xA;I really think this kind of tool is interesting, but is it worth it to use at school for a project that involves more than 3 programming persons ? What do we really learn in term of programming from using this kind of tool (I'm ok with python and js, but I hate C#) ? We could have use Ogre instead, even if we were learning direct x starting january..." />
  <row Id="16569" PostHistoryTypeId="25" PostId="8126" RevisionGUID="8c7c2882-249b-4fec-96fb-e467ac4d8755" CreationDate="2011-02-04T20:16:13.833" Comment="http://twitter.com/#!/StackGameDev/status/33619859505942528" />
  <row Id="16570" PostHistoryTypeId="5" PostId="8083" RevisionGUID="337c7a9d-e0d1-48a8-ba16-68e103c21d13" CreationDate="2011-02-04T20:36:28.043" UserId="18" Comment="added 1725 characters in body" Text="There's generally** no reason to use gluLookAt in a 2D game, it is meant for setting the camera position in 3D space. Use the simpler and faster glTranslatef instead.&#xD;&#xA;&#xD;&#xA;If you really want your specific example to work then something like:&#xD;&#xA;&#xD;&#xA;    gluLookAt(200,0,1,200,0,0,1,0,0);&#xD;&#xA;&#xD;&#xA;would move everything up by 200 pixels. But you could get the same effect by replacing gluLookAt with glTranslatef:&#xD;&#xA;&#xD;&#xA;    glTranslatef(-200, 0, 0);&#xD;&#xA;&#xD;&#xA;** cocos2d supports this method of setting the camera for special '3D' effects. If that's what you want then you need to better understand how gluLookAt works. The [projection example](http://www.xmission.com/~nate/tutors.html) by Nate Robin can be a good place to start visualizing how projection works with that command. With that said, you should still be able to get similar 3D effects with just translation/scaling/rotation.&#xD;&#xA;&#xD;&#xA;Edit: About gluLookAt&#xD;&#xA;&#xD;&#xA;[gluLookAt](http://www.felixgers.de/teaching/jogl/gluLookAt.html) describes the position and orientation of the eye/camera in space. The first 3 arguments specify where the eye is located, the next 3 arguments specify where the eye is looking, and the last 3 specify the up direction that tells us how the camera is tilted. What this really does is define a viewing transformation by building a matrix. &#xD;&#xA;&#xD;&#xA;In the gluLookAt example I gave, the eye position is (200, 0, 1). Because you rotated the projection matrix around the z axis earlier, I have to change x to move vertically and y to move horizontally. For the z coordinate, the point that we're looking at (200, 0, 0) should be in front of the eye, meaning you can't use a z coordinate  of -1 for example because the look at point would be behind the eye. In this example it doesn't matter what z value you use as long as it is positive (comes before the look at point which has a z of 0).&#xD;&#xA;&#xD;&#xA;The camera normally always looks straight ahead in 2D games so we use the same x and y for the look at point (200, 0) but we move it away from the camera in z direction (0). Finally we need to define a vector that specifies the up direction, this is normally (0, 1, 0) because the x-z plane represents the ground in many games. Since you rotated the projection matrix around the z axis I guess you could also use (1, 0, 0) and then you wouldn't need to swap x and y coordinates when specifying the position of the eye and look at point.&#xD;&#xA;&#xD;&#xA;I still think it's simpler to just use the glTranslate and glRotate functions. If you familiarize yourself with their use you can easily write a simple camera class without the overhead of calling gluLookAt." />
  <row Id="16571" PostHistoryTypeId="5" PostId="7992" RevisionGUID="701ed3bb-8d32-4395-ac11-642afa05b69a" CreationDate="2011-02-04T20:37:11.460" UserId="3794" Comment="added credits" Text="Your problem will solve rendering with 1bit alpha. Which means you specify some alpha of source texture which is not rendered (mostly 0.5).&#xD;&#xA;&#xD;&#xA;You have to write your own shader for saving depth from light and use instruction `discard`. Discard exists in hlsl, glsl and in cg as well. It exists only in pixel/fragment shader and discards curent fragment from the rendering into backBuffer and into z-buffer. &#xD;&#xA;&#xD;&#xA;    if (texSample.a &lt; 0.5)&#xD;&#xA;       discard;&#xD;&#xA;&#xD;&#xA;Advantage is that you don't need to change yours 2nd pass rendering, only rendering of light's depth. Also i have prove that it works:&#xD;&#xA;![1bit alpha][1]&#xD;&#xA;&#xD;&#xA;If you want to render correct shadows for multiple transparent objects you will have to use multiple depth textures, with depth and opacity information rendered using depth peeling. And for smoke, hair etc. Deep opacity or Fourier opacity maps are best solution (I mostly recommend Fourier opacity maps)&#xD;&#xA;&#xD;&#xA;edit: I just realized that i forgotten to add credits. As always. The tree model is from [loopix project][2] which is just great if you are looking for some lowpoly, one texture and free models of vegetation. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wWOut.png&#xD;&#xA;  [2]: http://www.loopix-project.com/" />
  <row Id="16572" PostHistoryTypeId="6" PostId="8067" RevisionGUID="fd972460-a9b3-4efe-a0c3-c23c76f19889" CreationDate="2011-02-04T20:56:02.010" UserId="1156" Comment="edited tags" Text="&lt;opengl&gt;&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="16573" PostHistoryTypeId="2" PostId="8131" RevisionGUID="c5d4d159-b00d-48a5-b043-3eeae44bfe0c" CreationDate="2011-02-04T20:57:06.627" UserId="1101" Text="My personal workflow is as follows:&#xD;&#xA;&#xD;&#xA; - A [Google text document][1] to&#xD;&#xA;   capture the initial set of ideas under a meaningful title.&#xD;&#xA; - Later, I'd move those ideas into a [mind-map][2] to start organising and&#xD;&#xA;   building upon them.&#xD;&#xA; - Then, I just keep&#xD;&#xA;   a [To-Do list][3] of tasks necessary&#xD;&#xA;   to complete the project.&#xD;&#xA; - I might draw out complicated systems as [UML][4], although I've never been happy with any of the tools for that so I tend to use pencil and paper.&#xD;&#xA;&#xD;&#xA;That works for me as a lone developer. When working in a team we had good results when working with a Wiki for the design (my preference was [DokuWiki][5] but there may be something better, eg. [Confluence][6]) and issue and task tracking software for tasks (again, we used [JIRA][7] but you can get by with [Bugzilla][8], [Trac][9], [Redmine][10], etc)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.google.com/&#xD;&#xA;  [2]: http://freemind.sourceforge.net/wiki/index.php/Main_Page&#xD;&#xA;  [3]: http://www.codeproject.com/KB/applications/todolist2.aspx&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Unified_Modeling_Language&#xD;&#xA;  [5]: http://www.dokuwiki.org/&#xD;&#xA;  [6]: http://www.atlassian.com/software/confluence/&#xD;&#xA;  [7]: http://www.atlassian.com/software/jira/&#xD;&#xA;  [8]: http://www.bugzilla.org/&#xD;&#xA;  [9]: http://trac.edgewall.org/&#xD;&#xA;  [10]: http://www.redmine.org/" />
  <row Id="16574" PostHistoryTypeId="2" PostId="8132" RevisionGUID="4c699728-5e71-48ce-b73f-35293bffae85" CreationDate="2011-02-04T21:12:51.660" UserId="1198" Text="For developing a Chrome App, you simply need a website so I don't think its unreasonable to take your existing Silverlight app and try to deploy it to the Chrome Store. See this tutorial from Google Code [Getting Started: Chrome Web Store][1] on the steps involved.&#xD;&#xA;&#xD;&#xA;Java for Android is probably the fastest way to get started, but depending on the nature of how quickly you want to take your Android port to market, MonoDroid looks very promising for doing C# development on Android and [XNATouch][2] looks to be working on a MonoDroid port.&#xD;&#xA;&#xD;&#xA;These two options keep you on C#/XNA/Silverlight but the Android version isn't distributed with a Go-Live license yet. If you do not have firm deadlines to publish these, I might look into the MonoDroid route for your Android port, if you need to get them out quickly, then Java coupled with the [Android SDK][3] is probably the best bet since you can write today and deploy tomorrow.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/chrome/webstore/docs/get_started_simple.html&#xD;&#xA;  [2]: http://xnatouch.codeplex.com/&#xD;&#xA;  [3]: http://developer.android.com/sdk/index.html" />
  <row Id="16575" PostHistoryTypeId="6" PostId="8119" RevisionGUID="0a4ae510-6bf9-47fd-ba53-2e0ec361fc39" CreationDate="2011-02-04T21:44:16.360" UserId="1198" Comment="Tagged xna, since the question is about coming from xna --&gt; other platforms. Figured many XNA'ers might have thoughts..." Text="xnac++flashjavaandroid" />
  <row Id="16576" PostHistoryTypeId="24" PostId="8119" RevisionGUID="cb3df4e4-a899-44b6-a4e7-a12d4890cc4e" CreationDate="2011-02-04T21:44:16.360" Comment="Proposed by 1198 approved by 51 edit id of 8" />
  <row Id="16577" PostHistoryTypeId="2" PostId="8133" RevisionGUID="d0b58cca-1340-41b5-8dc6-d484792e95de" CreationDate="2011-02-04T21:54:11.003" UserId="2710" Text="The main &quot;pro&quot; of Uinty3D is that it's crazy fast. I'm not talking about performance here, but about development speed. You have:&#xD;&#xA;&#xD;&#xA; - Unified asset pipeline. No need to spend time on resource subsystem at all, no buggy import routines to write and fix: just drop a file into folder, and it works.&#xD;&#xA; - Integrated level editor. No need to spend time on level tools: just get straight to business.&#xD;&#xA; - Great tweaking and debugging support: all your gameplay variables are shown right as you play, and can be changed on the fly too - and all this without writing a single line of code. Pause the game anytime, or step through code one statement at a time. &#xD;&#xA; - Quite comprehesive library of ready-made components. Rendering, sound, physics, controls - a lot of &quot;boilerplate&quot; code is already written.&#xD;&#xA; - Mono as a script host. While one can argue about merits of C# as a language, Mono's base class library offers a wealth of functions. Collections, I/O, multithreading, and insanely expressive LINQ all speed up development considerably.&#xD;&#xA;&#xD;&#xA;Also, Unity3d is really good on multiple platforms. Of course, you can't create, say, a windows .exe game and then magically have it &quot;just work&quot; on the iPhone; but Unity gets pretty close to that. What is required is &quot;tweaking&quot; more than &quot;porting&quot;. &#xD;&#xA;&#xD;&#xA;Of course, in some cases Unity3D is not ideal. Network multiplayer integrated in Unity is OK for some LAN peer-to-peer play, but anything that requires central server pretty much requires you write all network code from scratch. Unity's GUI system is quite quirky and slow, so making complex in-game GUIs is a pain. However, all _other_ game GUI systems I've seen are painful too, so Unity's one is not that bad overall. &#xD;&#xA;&#xD;&#xA;And, of course, Unity3D is a little less flexible than &quot;game engines&quot; like OGRE, that offer only a library/source code. Its performance is not exactly top-notch, and since you only have a scripting sandbox, you can't use some clever low-level hacks to improve it. For example, if Unity's built-in tree renderer doesn't satisfy you for some reason, you can't write your own one (well, you could, but it would be working through scripts and most probably be too slow and too much hassle). Still, it's possible to do just about anything with Unity so long as you don't mind losing a bit of performance.&#xD;&#xA;&#xD;&#xA;The biggest &quot;con&quot; of Unity3D, though, is source control. As already mentioned, Unity's own Asset Server costs a pretty penny. And it sucks, really, really hard. It doesn't even have branching. While Unity3D theoretically supports 3rd-party SCM systems, using them is wrought with peril too. I've seen import settings &quot;magically&quot; change after SVN commit, or all objects' parameters disappear after using Perforce. All these can be worked around, but anyway, Unity3D + Source control = pain.&#xD;&#xA;&#xD;&#xA;So, to actually answer your question. I believe Unity3D is one of the best, if not _the_ best, choice of game engine for a &quot;little&quot; game. Especially in prototype stage. &#xD;&#xA;&#xD;&#xA;That said, if we're talking about an educational project, I' recommend against it. To learn how games work it's better to write one on as low level as possible. Game engines are a great tool; but to use it for maximum gains, it's necessary to understand how they work, and _why_ they work that way. And the best way to learn this is write your own game engine - even if it turns out crappy in the end." />
  <row Id="16578" PostHistoryTypeId="5" PostId="8132" RevisionGUID="39ad032b-1b88-42aa-944d-6ebc0ba2ee1b" CreationDate="2011-02-04T21:57:02.380" UserId="1198" Comment="monodroid link; added 5 characters in body" Text="For developing a Chrome App, you simply need a website so I don't think its unreasonable to take your existing Silverlight app and try to deploy it to the Chrome Store. See this tutorial from Google Code [Getting Started: Chrome Web Store][1] on the steps involved.&#xD;&#xA;&#xD;&#xA;Java for Android is probably the fastest way to get started, but depending on the nature of how quickly you want to take your Android port to market, [MonoDroid][3] looks very promising for doing C# development on Android and [XNATouch][2] looks to be working on a MonoDroid port.&#xD;&#xA;&#xD;&#xA;These two options keep you on C#/XNA/Silverlight but the Android version isn't distributed with a Go-Live license yet. If you do not have firm deadlines to publish these, I might look into the [MonoDroid][3] route for your Android port, if you need to get them out quickly, then Java coupled with the [Android SDK][4] is probably the best bet since you can write today and deploy tomorrow.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/chrome/webstore/docs/get_started_simple.html&#xD;&#xA;  [2]: http://xnatouch.codeplex.com/&#xD;&#xA;  [3]: http://monodroid.net&#xD;&#xA;  [4]: http://developer.android.com/sdk/index.html" />
  <row Id="16579" PostHistoryTypeId="2" PostId="8134" RevisionGUID="7ebfc296-375f-49e4-b30b-0e17b0a17107" CreationDate="2011-02-04T22:05:30.790" UserId="1198" Text="There could be a variety of things causing your background scrolling to be choppy.&#xD;&#xA;&#xD;&#xA; 1. Your image could be very large causing `canvas.drawBitmap();` to be slow&#xD;&#xA; 2. Your loop could be firing slowly or inconsistently. I could be wrong, and maybe there are extenuating circumstances, but generally a `sleep();` call is never good in a game loop, or any loop for that matter. It could quite easily be the a contributor to your choppiness. I'd remove it to see what happens.&#xD;&#xA; 3. Other code you've stripped out from the example could be taking up lots of milliseconds in your loop.&#xD;&#xA;&#xD;&#xA;I highly recommend you track the number of milliseconds between each iteration of your loop. You can use this data to determine how far to move your background based on how long the last loop took. This should smooth out your scrolling for the most part.&#xD;&#xA;&#xD;&#xA;If the issue is because your image is so large that drawing it is taking up too much time, you may need to break the image up into smaller parts and &quot;stream&quot; it across the screen based on the scrolling position." />
  <row Id="16580" PostHistoryTypeId="6" PostId="6172" RevisionGUID="6c6eff15-5525-4a2f-b36a-10b2eef68498" CreationDate="2011-02-04T22:11:26.807" UserId="3767" Comment="edited tags" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;blitzmax&gt;" />
  <row Id="16581" PostHistoryTypeId="2" PostId="8135" RevisionGUID="bffb0e80-3cb6-4005-8e97-5f2d8b695997" CreationDate="2011-02-04T22:15:10.563" UserId="5179" Text="“[Comet](http://en.wikipedia.org/wiki/Comet_(programming))” is probably an umbrella term that you could make use of here. WebSockets will be a more desirable option though (when they’re happy that it is safe)." />
  <row Id="16582" PostHistoryTypeId="2" PostId="8136" RevisionGUID="e4af0aba-608c-4504-b4b7-3e8857b32991" CreationDate="2011-02-04T22:16:47.697" UserId="1101" Text="&gt; &quot;I feel like I've gone too far down the rabbit hole&quot;&#xD;&#xA;&#xD;&#xA;Yes, exactly. Component-based systems are still in the 'fad' phase where there is no agreement on how best to use them. Several knowledgeable and competent people have posted articles suggesting their use, but each tends to disagree over how you assemble them, how they communicate, and so on.&#xD;&#xA;&#xD;&#xA;My personal opinion is that the relational model you've linked to is far too abstract for everyday use.&#xD;&#xA;&#xD;&#xA;Instead, I would look more closely at your own design and see which common aspects of functionality can be factored out to form interchangeable components. That will probably be much more fruitful than trying to wedge your game into a preconceived notion of what components should be." />
  <row Id="16583" PostHistoryTypeId="2" PostId="8137" RevisionGUID="e529632d-f151-4ca3-a8ed-7d30f4c42026" CreationDate="2011-02-04T23:10:19.090" UserId="4690" Text="That's a pretty standard solution. Try hiding the mouse cursor and superimposing a fixed targeting reticule (if your game needs one) if it's a distraction" />
  <row Id="16584" PostHistoryTypeId="25" PostId="8096" RevisionGUID="99a071ac-f3e3-4aa4-a778-445334c9be1f" CreationDate="2011-02-04T23:16:16.190" Comment="http://twitter.com/#!/StackGameDev/status/33665167715868672" />
  <row Id="16585" PostHistoryTypeId="2" PostId="8138" RevisionGUID="6231f4c9-6a24-4b06-b454-a9c3dec0f8b6" CreationDate="2011-02-04T23:18:27.470" UserId="5095" Text="You might want to take a look at the Android Examples, specifically JetBoy:&#xD;&#xA;&#xD;&#xA;http://developer.android.com/resources/samples/JetBoy/index.html&#xD;&#xA;&#xD;&#xA;I believe they have scrolling backgrounds, specifically Parallax Scrolling (which you can look up here: http://en.wikipedia.org/wiki/Parallax_scrolling)&#xD;&#xA;&#xD;&#xA;But if you just want one background scroll, you could get a pretty good feel for how to do it from this game example.&#xD;&#xA;&#xD;&#xA;(NOTE: I believe this game has scrolling backgrounds, correct me if I am wrong and I will edit this Answer)" />
  <row Id="16586" PostHistoryTypeId="2" PostId="8139" RevisionGUID="a110b73b-27f5-481a-bd67-9bdbc5a999ed" CreationDate="2011-02-04T23:54:18.037" UserId="189" Text="See [this answer][1]:&#xD;&#xA;&#xD;&#xA;&gt; You can, however, use Flash where available to provide your script with a fallback until WebSocket is widely available. Gimite's [web-socket-js][2] is one free example of such. However you are subject to the same limitations as Flash Sockets then, namely that your server has to be able to spit out a cross-domain policy on request to the socket port, and you will often have difficulties with proxies/firewalls. (Flash sockets are made directly; for someone without direct public IP access who can only get out of the network through an HTTP proxy, they won't work.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1736382/how-to-use-sockets-in-javascript-html/1736422#1736422&#xD;&#xA;  [2]: http://github.com/gimite/web-socket-js" />
  <row Id="16587" PostHistoryTypeId="5" PostId="8124" RevisionGUID="34def9f0-9682-4ad9-b463-c19ae4efb699" CreationDate="2011-02-05T00:16:58.750" UserId="51" Comment="added 182 characters in body" Text="One major problem with Unity is the source control.  If you're not working in a team this isn't going to matter as much (arguably), but that's pretty likely not going to be the case.&#xD;&#xA;&#xD;&#xA;You can use Unity Asset Server, but that requires 1) Unity Pro ($1500), and 2) a per-seat Asset Server License ($500).  I'm assuming you can get some kind of educational discount, but it isn't free.&#xD;&#xA;&#xD;&#xA;Alternatively, you can use something like SVN with Unity. To properly support it you still need Unity Pro.&#xD;&#xA;&#xD;&#xA;You can't really just check a non-pro version of Unity into SVN and expect it to work flawlessly.   Their mechanism for binding GUIDs to assets and so forth isn't exactly SCM-safe.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Multiplayer functionality is pretty decent, although to be honest I haven't shipped a game with it.  In theory you just attach network views to things and tell it what you want to serialize to set up replication properly.  From there it's some UI work to connect to other peers and set up.  It's mostly peer-to-peer, though.  You might be able to do client/server programming running unity in headless mode, but I haven't messed with it.  But just getting person A to run around on person B's screen is pretty easy and fast to do.&#xD;&#xA;&#xD;&#xA;Also C# is a *positive* as far as I'm concerned.  LINQ is super expressive.  It has proper exception handling and garbage collection.  It has much more modern paradigms like delegates, lambdas, interfaces and better generic support than C++.  (*Edit*: this is obviously controversial.  My point is that C# is hardly a *bad* language.  I don't want to get into a long debate about the pros and cons of the language vs. C++.)&#xD;&#xA;&#xD;&#xA;The biggest positive of using Unity, though, is probably the art pipeline.  You can take a PSD or Max file (assuming you have 3ds max installed) in the folder and it gets imported.  " />
  <row Id="16588" PostHistoryTypeId="2" PostId="8140" RevisionGUID="c908c686-b1f6-4159-9d43-539deee3b3bc" CreationDate="2011-02-05T01:43:40.637" UserId="154" Text="You can also just texture directly with an .mov, .mpg, .avi and so on. &#xD;&#xA;&#xD;&#xA;Details here: [Movie Texture][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;NOTE: Texturing with a video file is only available in Unity Pro and isn't supported on iOS/Andoid &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; [1]:  http://unity3d.com/support/documentation/Manual/Video%20Files.html" />
  <row Id="16589" PostHistoryTypeId="25" PostId="8099" RevisionGUID="0b20e61a-d13a-4239-ba10-324c1f7d68ad" CreationDate="2011-02-05T02:16:15.897" Comment="http://twitter.com/#!/StackGameDev/status/33710465175527424" />
  <row Id="16590" PostHistoryTypeId="2" PostId="8141" RevisionGUID="0538d46f-c202-4377-a776-be971ccbeb5f" CreationDate="2011-02-05T02:51:57.877" UserId="111" Text="[Socket.IO][1] offers a system built on top of several other layers (including websockets, flash, comet techniques) with graceful selection. &#xD;&#xA;&#xD;&#xA;[Node.js][2] is one option for running it server side.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://socket.io/&#xD;&#xA;  [2]: http://nodejs.org/" />
  <row Id="16591" PostHistoryTypeId="2" PostId="8142" RevisionGUID="61e36f5d-ee20-48f3-8ea1-93420bb1a336" CreationDate="2011-02-05T04:11:43.453" UserId="4497" Text="Something worth noting- if you are using the free version of Unity3D you will be unable to use several effects, including post-processing shaders (like bloom) and, much more importantly, dynamic shadows. These obviously will not have much of an effect on the workflow for the project, but they do place constraints on what can be achieved for free with the engine." />
  <row Id="16599" PostHistoryTypeId="2" PostId="8150" RevisionGUID="c8b3ba42-6cd2-4146-8a16-6a833792be58" CreationDate="2011-02-05T05:05:58.697" UserId="3656" Text="this question is very programming-centric, but it's for a game so I figured I might as well post it here.&#xD;&#xA;&#xD;&#xA;I'm doing polishing work on a GGJ '11 game because it will be shown at an indie arcade tomorrow afternoon, and they're expecting our final build in the morning.&#xD;&#xA;&#xD;&#xA;We'd like to have a high score table that displays during attract mode, but since it's Flash (Flixel) it would require some networking, Mochi, or something to keep a record of these scores. Only problem is the machine we'd be running on probably won't have network access.&#xD;&#xA;&#xD;&#xA;As a quick solution, I thought I'd just write up a dinky little high score server in C#/.NET that could take basic GET requests for submitting scores and getting the score list. We're talking REAL basic, like blocking while waiting for an incoming request, run &amp; forget console app, etc.&#xD;&#xA;&#xD;&#xA;There's no guarantee that our .swf won't get reloaded, and we'd like the scores to persist, so this server would pretty much exists to keep a safe copy of the scores that the game can add to and request, and occasionally the server will write the scores to a flat text file.&#xD;&#xA;&#xD;&#xA;But, HttpListener is giving me Error Code 87 'The parameter is incorrect.' Have any idea what I'm doing wrong? Or better yet, am I barking up the wrong tree and missing an obviously simpler solution?&#xD;&#xA;&#xD;&#xA;This is all I've got so far in my Main():&#xD;&#xA;&#xD;&#xA;    HttpListener listener = new HttpListener();&#xD;&#xA;    listener.Prefixes.Add(&quot;http://localhost:66666/&quot;);&#xD;&#xA;    listener.Start();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The exception happens at `listener.Start();` and the stack trace is:&#xD;&#xA;&#xD;&#xA;       at System.Net.HttpListener.AddAllPrefixes()&#xD;&#xA;       at System.Net.HttpListener.Start()&#xD;&#xA;       at WOSEBCE_ScoreServer.Program.Main(String[] args) in C:\Users\Michael\Documents\Visual Studio 2010\VS2010 Projects\WOSEBCE_ScoreServer\WOSEBCE_ScoreServer\Program.cs:line 24&#xD;&#xA;       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)&#xD;&#xA;       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&#xD;&#xA;       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&#xD;&#xA;       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)&#xD;&#xA;       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)&#xD;&#xA;       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&#xD;&#xA;       at System.Threading.ThreadHelper.ThreadStart()" />
  <row Id="16600" PostHistoryTypeId="1" PostId="8150" RevisionGUID="c8b3ba42-6cd2-4146-8a16-6a833792be58" CreationDate="2011-02-05T05:05:58.697" UserId="3656" Text="Urgent! [.NET, Flash, programming] Persisting high score table in flash game without a network. (Featuring: HttpListenerException)" />
  <row Id="16601" PostHistoryTypeId="3" PostId="8150" RevisionGUID="c8b3ba42-6cd2-4146-8a16-6a833792be58" CreationDate="2011-02-05T05:05:58.697" UserId="3656" Text="&lt;c#&gt;&lt;flash&gt;&lt;network&gt;&lt;.net&gt;&lt;leaderboards&gt;" />
  <row Id="16602" PostHistoryTypeId="2" PostId="8151" RevisionGUID="e18226db-bee7-4428-9427-138151720219" CreationDate="2011-02-05T05:08:01.083" UserId="5183" Text="This seems like a rather simple problem but I am having a lot of difficulty with it.&#xD;&#xA;What should I do to properly sort images in an isometric game?&#xD;&#xA;&#xD;&#xA;In a normal 2d top-down game one could use the screen y axis to sort the images. In this example the trees are properly sorted but the isometric walls are not.&#xD;&#xA;&#xD;&#xA;[Example image: sorted by screen y][1]&#xD;&#xA;&#xD;&#xA;Wall2 is one pixel below wall1 therefore it is drawn after wall1.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I sort by the isometric y axis the walls appear in the correct order but the trees do not.&#xD;&#xA;&#xD;&#xA;[Example imageL sorted by isometric y][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]:  http://i.stack.imgur.com/s9xQo.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/zATIH.jpg" />
  <row Id="16603" PostHistoryTypeId="1" PostId="8151" RevisionGUID="e18226db-bee7-4428-9427-138151720219" CreationDate="2011-02-05T05:08:01.083" UserId="5183" Text="How should I sort images in an isometric game so that they appear in the correct order?" />
  <row Id="16604" PostHistoryTypeId="3" PostId="8151" RevisionGUID="e18226db-bee7-4428-9427-138151720219" CreationDate="2011-02-05T05:08:01.083" UserId="5183" Text="&lt;math&gt;&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;&lt;isometric&gt;" />
  <row Id="16605" PostHistoryTypeId="2" PostId="8152" RevisionGUID="6cbe4ae6-0890-4d22-88e9-41b1124540b3" CreationDate="2011-02-05T05:20:08.500" UserId="3448" Text="Have you considered using [SharedObject](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html)? It allows you to store data on the hard disk, and the data is accessible even if the SWF is reloaded. Seems to meet your requirements, and doesn't require a separate program of any sort." />
  <row Id="16607" PostHistoryTypeId="4" PostId="8150" RevisionGUID="7a14370b-3486-4e14-be37-7ec0dfa5064b" CreationDate="2011-02-05T05:38:11.053" UserId="51" Comment="removed &quot;urgent&quot;, removed tags from title." Text="Persisting high score table in flash game without a network. (Featuring: HttpListenerException)" />
  <row Id="16608" PostHistoryTypeId="5" PostId="8151" RevisionGUID="05374abe-970a-44cd-b5ac-d68683c16aa4" CreationDate="2011-02-05T05:44:02.970" UserId="5183" Comment="edited body" Text="This seems like a rather simple problem but I am having a lot of difficulty with it.&#xD;&#xA;What should I do to properly sort images in an isometric game?&#xD;&#xA;&#xD;&#xA;In a normal 2d top-down game one could use the screen y axis to sort the images. In this example the trees are properly sorted but the isometric walls are not.&#xD;&#xA;&#xD;&#xA;[Example image: sorted by screen y][1]&#xD;&#xA;&#xD;&#xA;Wall2 is one pixel below wall1 therefore it is drawn after wall1.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I sort by the isometric y axis the walls appear in the correct order but the trees do not.&#xD;&#xA;&#xD;&#xA;[Example image: sorted by isometric y][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]:  http://i.stack.imgur.com/s9xQo.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/zATIH.jpg" />
  <row Id="16609" PostHistoryTypeId="2" PostId="8154" RevisionGUID="0745c75b-d1f1-474d-9fac-3e6009da4e93" CreationDate="2011-02-05T05:50:29.863" UserId="51" Text="I don't think there is a mathematic solution.  You probably don't have enough data in the 2D world your items are living in.  If your walls were mirrored on X they would be in the &quot;correct&quot; order.  Then again you might be able to do overlap testing with the bounding box of the image somehow, but this is an area I'm not familiar with.&#xD;&#xA;&#xD;&#xA;You should probably sort by screen Y per-tile and say that anything more complicated is a &quot;design problem&quot;.  For example, if you're authoring the content, just tell your designers the sorting algorithm and to shove wall2 2 pixels up to fix the problem.  That's how we had to fix it in the isometric game I worked on.  This might include taking &quot;long&quot; items and breaking them up into tile-sized chunks.&#xD;&#xA;&#xD;&#xA;If you are allowing users to edit the content, the completely safe thing to do is to make everything tile based and at most one tile large. That way you avoid the problem.  You might be able to get by with making everything larger than a tile, but possibly only if it's square.  I haven't played around with that." />
  <row Id="16610" PostHistoryTypeId="25" PostId="8151" RevisionGUID="b305aaa4-5e2c-4535-8c8c-0bdcd3621238" CreationDate="2011-02-05T08:16:16.070" Comment="http://twitter.com/#!/StackGameDev/status/33801062964006912" />
  <row Id="16611" PostHistoryTypeId="2" PostId="8155" RevisionGUID="49cc04a3-8a2b-4063-9e65-ad698332376d" CreationDate="2011-02-05T09:08:53.360" UserId="2560" Text="I'm taking a class on compilers, and the goal is to write a compiler for &lt;a href=&quot;http://www.evilmadscientist.com/article.php/meggyjr&quot;&gt;Meggy Jr devices&lt;/a&gt; (Arduino). The goal is just to make a simple compilers with loops and variables and stuff.&#xD;&#xA;&#xD;&#xA;Obviously, that's lame, so the &quot;real goal&quot; is to make an impressive game on the device. The problem is that it only has 64 pixels to work with (technically 72, but the top 8 are single-color and not part of the main display, so they're really only useful for displaying things like money).&#xD;&#xA;&#xD;&#xA;My problem is thinking of something to do on a device that small. It doesn't really matter if it's original, but it can't be something that's already available. My first idea was &quot;snake&quot;, but that comes with the SDK. Same with a side-scrolling shooter.&#xD;&#xA;&#xD;&#xA;Remaining ideas include a tower defense game (hard to write, hard to control), an RPG (same), tetris (lame)..&#xD;&#xA;&#xD;&#xA;The problem is that all of the games I like require a high-resolution screen because they have a lot of text. Even a really simple game like nethack would be hard because each creature would be a single color.&#xD;&#xA;&#xD;&#xA;tl;dr What styles of games require a. No text; and b. Few enough objects that representing them each with a single color is acceptable?" />
  <row Id="16612" PostHistoryTypeId="1" PostId="8155" RevisionGUID="49cc04a3-8a2b-4063-9e65-ad698332376d" CreationDate="2011-02-05T09:08:53.360" UserId="2560" Text="Styles of games that work at low-resolution" />
  <row Id="16613" PostHistoryTypeId="3" PostId="8155" RevisionGUID="49cc04a3-8a2b-4063-9e65-ad698332376d" CreationDate="2011-02-05T09:08:53.360" UserId="2560" Text="&lt;game-design&gt;&lt;old-school&gt;" />
  <row Id="16614" PostHistoryTypeId="2" PostId="8156" RevisionGUID="c540ec68-82af-43c9-a414-f35db6df8b2e" CreationDate="2011-02-05T09:12:18.707" UserId="2560" Text="You could always just use AJAX and some sort of message queue. &lt;a href=&quot;http://activemq.apache.org/ajax.html&quot;&gt;ActiveMQ&lt;/a&gt; is a good example. You run ActiveMQ on the server, then your JavaScript can send and receive messages. Just make each player have a unique name, and send messages to the other player." />
  <row Id="16615" PostHistoryTypeId="2" PostId="8157" RevisionGUID="5576e3b7-40ca-456e-888b-5505ecc7e119" CreationDate="2011-02-05T09:14:54.373" UserId="1198" Text="You could write something akin to a tomagatchi or other virtual pet. The original ones were done on very low resolution screens.&#xD;&#xA;&#xD;&#xA;Pong is another game that comes to mind for a low resolution display. While it may seem basic, it covers most of the important bits in many games: collisions, physics (albeit simple), game-loop, etc. On such a limited platform, you may be forced to &quot;roll your own&quot; for many of those tasks which may take up more time that you anticipated. " />
  <row Id="16616" PostHistoryTypeId="2" PostId="8158" RevisionGUID="153013bd-7b6d-40ba-851c-c326035c1d72" CreationDate="2011-02-05T09:28:53.603" UserId="2077" Text="Many of the classics would render well with such limited screen space, such as: Tetris, Pacman and Asteroids. You could also try board games such as Checkers, Chess and Backgammon. Also, &lt;a href=&quot;http://www.addictinggames.com/helicopter.html&quot;&gt;Helicopter&lt;/a&gt; is one of my favorite, simple games." />
  <row Id="16617" PostHistoryTypeId="2" PostId="8159" RevisionGUID="f6ea0c74-4321-4be9-980d-929468bbadb9" CreationDate="2011-02-05T10:35:46.363" UserId="744" Text="Low-resolution constraints &lt;a href=&quot;http://www.kokoromi.org/projects/gamma256/&quot;&gt;was the premise of the Gamma 256&lt;/a&gt; design challenge. Their mandatory constraint was quite a bit higher than 64x64, but many of the submissions used far less than the maximum.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://tinysubversions.com/category/meggyjr/&quot;&gt;Darius Kazemi has done (in my opinion), one of the best games on the Meggy Jr. device.&lt;/a&gt; You might look at his work for inspiration." />
  <row Id="16618" PostHistoryTypeId="25" PostId="8155" RevisionGUID="fef30f4e-9fbf-4721-9818-5f1217785274" CreationDate="2011-02-05T11:16:15.680" Comment="http://twitter.com/#!/StackGameDev/status/33846359714963456" />
  <row Id="16619" PostHistoryTypeId="2" PostId="8160" RevisionGUID="02b7e807-2fde-4a1b-a8c7-cf16b16300e9" CreationDate="2011-02-05T12:04:18.063" UserId="3464" Text="In industry games I mean like Quake, CoD etc." />
  <row Id="16620" PostHistoryTypeId="1" PostId="8160" RevisionGUID="02b7e807-2fde-4a1b-a8c7-cf16b16300e9" CreationDate="2011-02-05T12:04:18.063" UserId="3464" Text="Is C++ is being replaced by C# in industry games?" />
  <row Id="16621" PostHistoryTypeId="3" PostId="8160" RevisionGUID="02b7e807-2fde-4a1b-a8c7-cf16b16300e9" CreationDate="2011-02-05T12:04:18.063" UserId="3464" Text="&lt;c++&gt;&lt;c#&gt;" />
  <row Id="16622" PostHistoryTypeId="2" PostId="8161" RevisionGUID="d2b2fb7e-2276-4ff4-88c3-01a48bb7113c" CreationDate="2011-02-05T12:10:07.143" UserDisplayName="user5187" Text="I would suggest taking look at LimeJS, seems very promising - http://www.limejs.com" />
  <row Id="16623" PostHistoryTypeId="2" PostId="8162" RevisionGUID="45fc5b51-0905-4e56-ac02-fb60c04c945a" CreationDate="2011-02-05T12:28:29.663" UserId="2974" Text="Try this:&#xD;&#xA;[http://agilezen.com/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://agilezen.com/" />
  <row Id="16624" PostHistoryTypeId="2" PostId="8163" RevisionGUID="d3137984-ecd5-4b82-a6a7-85246e9a1862" CreationDate="2011-02-05T12:29:32.803" UserId="4662" Text="No. Depending on .NET would imply massive re-writes for platforms with no available Framework, like the PS3, and the performance disadvantages may be perfectly acceptable on the PC or for Live Arcade games, but larger games are going to need every scrap of performance from their consoles to run quickly enough. More than that, there are huge existing code-bases in C++ that nobody could afford to upgrade, even if they wanted to. C++ is in the game industry and it's going to stay there for a long time." />
  <row Id="16625" PostHistoryTypeId="2" PostId="8164" RevisionGUID="111c51a2-8034-498f-be1e-2f5303b3384e" CreationDate="2011-02-05T13:14:51.850" UserId="4508" Text="try to look at [www.processing.org][1] it's a simple and quite power system for making 2d in java&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.processing.org" />
  <row Id="16629" PostHistoryTypeId="2" PostId="8166" RevisionGUID="81c3fc74-acee-4adc-99c7-4e4b80f9b2e8" CreationDate="2011-02-05T14:08:30.850" UserId="2332" Text="It's not likely. C++ has the benefit of being low level so that developers can actually tweak the tiniest detail to gain the best performance possible. &#xD;&#xA;&#xD;&#xA;With C# and .NET you have garbage collection which is very useful, but when working with platforms with limited memory and resouces (portable consoles and to some extent home consoles) you need to have as much control over memory as possible to make the best use of the resources. Allowing managed languages to allocate and free up memory for you would most likely cause you lots of problems.&#xD;&#xA;&#xD;&#xA;The speed is also an issue (although probably less so). Over time, I'm sure that managed languages could be made to perform comparably to C++ compilers.&#xD;&#xA;&#xD;&#xA;Overall, in my experience anyway, game developers tend to be control freaks when it comes to memory, CPU times and resources (to squeeze out as much performance as they can), which is why C/C++ are the mainly used languages." />
  <row Id="16630" PostHistoryTypeId="25" PostId="8160" RevisionGUID="54c32adc-e8f7-4d86-9e11-9649f9106a5c" CreationDate="2011-02-05T14:16:15.857" Comment="http://twitter.com/#!/StackGameDev/status/33891658642759680" />
  <row Id="16631" PostHistoryTypeId="2" PostId="8167" RevisionGUID="fc8cd76e-bd80-4d52-a918-cc03386036d1" CreationDate="2011-02-05T14:26:52.173" UserId="51" Text="Language choice heavily depends on platform. Right now it seems really unlikely that anything but a Microsoft platform would actually require .NET as an implementation.&#xD;&#xA;&#xD;&#xA;Conventional wisdom would say that a small platform would need to be close to the metal to be performant, but on the other hand, managed platforms are *safer*. That's probably the reason Windows Phone 7 forces you to use .NET.  &#xD;&#xA;&#xD;&#xA;It would certainly be interesting if the a new Xbox requires a managed platform.  If a phone's hardware can handle it (and it does), I could certainly see them using it on a full sized console.  It would stir up the console ecosystem quite a bit from as it would be harder to write cross-platform games without writing all your game code in a scripting language.  If that's the case, then C# wouldn't *replace* C++, but it would go hand-in-hand.&#xD;&#xA;&#xD;&#xA;Right now you *could* use Mono as a scripting back end (similar to what Unity does), but I would imagine that most engine makers would either want to roll their own, or use something more compact like Lua or Python than C#.&#xD;&#xA;&#xD;&#xA;Either way, it's all about the right tool for the right job.  You really should learn both languages anyway, since C# makes it easier to do certain things (tools development, server development probably, etc), and you can't use anything but C++ in some cases." />
  <row Id="16633" PostHistoryTypeId="2" PostId="8168" RevisionGUID="b65aca1a-6e1d-4564-9ab3-a77f7d76bcf6" CreationDate="2011-02-05T14:57:31.407" UserId="2710" Text="In a sense, C++ is really being replaced - not only by C#, but by a slew of other languages. But if you ask, is it going to by replaced _completely_ - then the answer is definitely **no**.&#xD;&#xA;&#xD;&#xA;That's because C++ is traditionally used in two capacities. First, to create the game _engine_: the low-level components that load resources, push polygons to screen and crunch numbers in physics simulations. Second, to code the game _logic_: the actual rules that make gameplay.&#xD;&#xA;&#xD;&#xA;This second capacity does not require C++'s strong points (such as complete control over low-level details), but suffers from its weaknesses (such as bug-prone hand-coded memory management). And in this second capacity C++ is being replaced by different scripting languages. A lot of developers use Lua; some use Python. But if a CLI platform is available, in form of either .NET or Mono, it presents a great scripting host candidate. These platforms are quite fast, reliable, offer a widely known language (C#) and a comprehensive base class library. Let's not forget tools: MS Visual studio and SharpDevelop/MonoDevelop might not be the very best IDEs in the world, but they're quite good. &#xD;&#xA;&#xD;&#xA;That said, the game _engine_ is not going to be written in C# (or Lua, or Python for that matter). Why? Because they're just not fast enough. &#xD;&#xA;&#xD;&#xA;Contrary to many popular beliefs, _the single biggest performance hit today is due to memory latency_. This means that accessing memory is serious business. And managed languages don't allow user to control memory access - that's precisely why they're &quot;managed&quot; in the first place. So, no managed language will allow to write a really fast game engine. Actually, all big &quot;C#&quot; engines I can think of - XNA, MOGRE, Unity - are based on _native_ C++ code; but allow to write game logic in C#.&#xD;&#xA;&#xD;&#xA;**To sum it up**: C# is going to be used in place of C++ or other languages. But it will never replace C++, at least until someone invents latency-free, instant-access memory." />
  <row Id="16634" PostHistoryTypeId="5" PostId="8167" RevisionGUID="72262138-1d05-4576-a0cd-31d0500f22aa" CreationDate="2011-02-05T15:54:06.960" UserId="51" Comment="grammar" Text="Language choice heavily depends on platform. Right now it seems really unlikely that anything but a Microsoft platform would actually require .NET as an implementation.&#xD;&#xA;&#xD;&#xA;Conventional wisdom would say that a small platform would need to be close to the metal to be performant, but on the other hand, managed platforms are *safer*. That's probably the reason Windows Phone 7 forces you to use .NET.  &#xD;&#xA;&#xD;&#xA;It would certainly be interesting if the a new Xbox required a managed platform.  If a phone's hardware can handle it (and it does), I could certainly see them using it on a full sized console.  It would stir up the console ecosystem quite a bit as it would be harder to write cross-platform games without writing all your game code in a scripting language.  If that's the case, then C# wouldn't *replace* C++, but it would go hand-in-hand.&#xD;&#xA;&#xD;&#xA;Right now you *could* use Mono as a scripting back end (similar to what Unity does), but I would imagine that most engine makers would either want to roll their own, or use something more compact like Lua or Python than C#.&#xD;&#xA;&#xD;&#xA;Either way, it's all about the right tool for the right job.  You really should learn both languages anyway, since C# makes it easier to do certain things (tools development, server development probably, etc), and you can't use anything but C++ in some cases." />
  <row Id="16635" PostHistoryTypeId="2" PostId="8169" RevisionGUID="dd4b27c6-9bc6-432b-b063-5b6c20021e84" CreationDate="2011-02-05T16:12:23.090" UserId="4690" Text="I have a small 2D game I'm working on in XNA. So far, I have a player-controlled ship that operates on vector thrust and is terribly fun to spin around in circles. I've implemented this as a **DrawableGameComponent** and registered it with the game using **game.Components.Add(this)** in the Ship object constructor.&#xD;&#xA;&#xD;&#xA;How can I implement features like pausing and a menu system with my current implementation? Is it possible to set certain GameComponents to not update?&#xD;&#xA;&#xD;&#xA;Is this something for which I should even be using a DrawableGameComponent? If not, what are more appropriate uses for this?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16636" PostHistoryTypeId="1" PostId="8169" RevisionGUID="dd4b27c6-9bc6-432b-b063-5b6c20021e84" CreationDate="2011-02-05T16:12:23.090" UserId="4690" Text="How can I selectively update XNA GameComponents?" />
  <row Id="16637" PostHistoryTypeId="3" PostId="8169" RevisionGUID="dd4b27c6-9bc6-432b-b063-5b6c20021e84" CreationDate="2011-02-05T16:12:23.090" UserId="4690" Text="&lt;xna&gt;&lt;design-patterns&gt;" />
  <row Id="16638" PostHistoryTypeId="2" PostId="8170" RevisionGUID="9f6eff48-32c7-4f89-8e2a-cc63bedd44d0" CreationDate="2011-02-05T16:44:59.813" UserId="3547" Text="You can set the Enabled property on the game component to false. The game won't update it. You can also set the Visible property to false and the game won't tell it to draw. It can get kind of messy when you have a lot of game components. You might want to consider using some game state management and sub dividing your game components into separate states.&#xD;&#xA;&#xD;&#xA;That way game components that are part of the game play can be told to not draw/update when the game state is told not to update or draw, etc.&#xD;&#xA;&#xD;&#xA;This is a pretty good example of game state management: [Game State Management Sample][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="16639" PostHistoryTypeId="5" PostId="8170" RevisionGUID="acf125a1-bb46-4b7a-86b8-a105309a6f07" CreationDate="2011-02-05T17:00:09.303" UserId="3547" Comment="added 216 characters in body" Text="You can set the Enabled property on the game component to false. The game won't update it. You can also set the Visible property to false and the game won't tell it to draw. It can get kind of messy when you have a lot of game components. You might want to consider using some game state management and sub dividing your game components into separate states.&#xD;&#xA;&#xD;&#xA;That way game components that are part of the game play can be told to not draw/update when the game state is told not to update or draw, etc.&#xD;&#xA;&#xD;&#xA;This is a pretty good example of game state management: [Game State Management Sample][1]&#xD;&#xA;&#xD;&#xA;So then you could have your PlayScreen (the state with the game play in it) and have a the PauseScreen come on top of it. The PlayScreen wouldn't be updated, but it would still draw. (or something of that nature)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="16640" PostHistoryTypeId="25" PostId="8169" RevisionGUID="68db4971-488e-42ae-977a-0edf596aa5e8" CreationDate="2011-02-05T17:16:16.217" Comment="http://twitter.com/#!/StackGameDev/status/33936958946283520" />
  <row Id="16641" PostHistoryTypeId="2" PostId="8171" RevisionGUID="ad5840ee-be29-4085-a50d-2b064c2bf65c" CreationDate="2011-02-05T18:30:59.803" UserId="4191" Text="A lot of puzzle designs would work fine in that format.  Slider puzzles leap instantly to mind." />
  <row Id="16643" PostHistoryTypeId="2" PostId="8173" RevisionGUID="fbdd5872-374f-4ee7-9cf3-fb97fed2f714" CreationDate="2011-02-05T19:13:08.097" UserId="1430" Text="Not entirely sure what kind of improvements you're after here, so I will suggest two different kinds:&#xD;&#xA;&#xD;&#xA;  1. I don't see that it's necessary to strongly-couple the camera and the player object, certainly not to the point where they grant friendship. All it seems like you're doing in this example is grabbing the transform of the player, which is something I would expect you could do via the player's public interface -- in fact, I would expect it to be something you could do via a more generalized interface -- any entity with a position. For improved code health, I would suggest decoupling these two.&#xD;&#xA;&#xD;&#xA;  2. If the only different between your first-person and third-person camera is a transformation tweak to place the camera behind the target object, I think you'll notice some unpleasantly jerky camera dynamics in response to user input in 3rd person mode. Many 3rd person camera's implement a spring-like system to damp their movements in response to player input (example [here][1]), so you might consider implementing damping constraints that you can have applied separately for both camera modes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dhpoware.com/demos/d3dThirdPersonCamera2.html" />
  <row Id="16644" PostHistoryTypeId="2" PostId="8174" RevisionGUID="8a0bf26b-eb40-4d8d-802f-d467ddd97323" CreationDate="2011-02-05T19:16:20.033" UserId="4638" Text="I am trying to get a skybox rendered correctly in my first person shooter game. I have the skybox cube rendering using GL_TEXTURE_CUBE_MAP. I author the cube with extents of -1 and 1 along X,Y and Z. &#xD;&#xA;&#xD;&#xA;However, I can't wrap my head around the camera transformations that I need to apply to get it right. My render loop looks something like this:&#xD;&#xA;&#xD;&#xA; - mp_Camera-&gt;ApplyTransform() :: Takes the current player transformation and inverts it and pushes that on the modelview stack.&#xD;&#xA; - Draw GameObjects&#xD;&#xA; - Draw Skybox&#xD;&#xA;&#xD;&#xA;DrawSkybox does the following:&#xD;&#xA;&#xD;&#xA;	glEnable(GL_TEXTURE_CUBE_MAP);&#xD;&#xA;	glDepthMask(GL_FALSE);&#xD;&#xA;&#xD;&#xA;	// draw the cube here with extents&#xD;&#xA;&#xD;&#xA;	glDisable(GL_TEXTURE_CUBE_MAP);&#xD;&#xA;	glDepthMask(GL_TRUE);&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;Do I need to translate the skybox by the translation of the camera ? (btw, that didn't help either)" />
  <row Id="16645" PostHistoryTypeId="1" PostId="8174" RevisionGUID="8a0bf26b-eb40-4d8d-802f-d467ddd97323" CreationDate="2011-02-05T19:16:20.033" UserId="4638" Text="Rendering skybox in first person shooter" />
  <row Id="16646" PostHistoryTypeId="3" PostId="8174" RevisionGUID="8a0bf26b-eb40-4d8d-802f-d467ddd97323" CreationDate="2011-02-05T19:16:20.033" UserId="4638" Text="&lt;rendering&gt;&lt;camera&gt;&lt;terrain-rendering&gt;&lt;sky&gt;" />
  <row Id="16647" PostHistoryTypeId="2" PostId="8175" RevisionGUID="18808d8c-19db-4945-bf22-61eb12168cca" CreationDate="2011-02-05T19:26:22.640" UserId="1430" Text="**How Do I Get Started with DirectX?**&#xD;&#xA;&#xD;&#xA;The DirectX SDK can be found at the [DirectX Developer Center on MSDN][1].&#xD;&#xA;&#xD;&#xA;**Additional Resources**&#xD;&#xA;&#xD;&#xA; * [The DirectX SDK FAQs][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/directx/default&#xD;&#xA;  [2]: http://msdn.microsoft.com/library/ee416788(VS.85).aspx" />
  <row Id="16648" PostHistoryTypeId="2" PostId="8176" RevisionGUID="d298a2f8-be36-4209-b1fb-fb0c850d9f10" CreationDate="2011-02-05T19:26:22.640" UserId="1430" Text="DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio." />
  <row Id="16649" PostHistoryTypeId="5" PostId="8174" RevisionGUID="d54277d9-9e43-48f1-82a6-38a4c4648ba5" CreationDate="2011-02-05T19:32:13.497" UserId="4638" Comment="added 119 characters in body" Text="I am trying to get a skybox rendered correctly in my first person shooter game. I have the skybox cube rendering using GL_TEXTURE_CUBE_MAP. I author the cube with extents of -1 and 1 along X,Y and Z. &#xD;&#xA;&#xD;&#xA;However, I can't wrap my head around the camera transformations that I need to apply to get it right. My render loop looks something like this:&#xD;&#xA;&#xD;&#xA; - mp_Camera-&gt;ApplyTransform() :: Takes the current player transformation and inverts it and pushes that on the modelview stack.&#xD;&#xA; - Draw GameObjects&#xD;&#xA; - Draw Skybox&#xD;&#xA;&#xD;&#xA;DrawSkybox does the following:&#xD;&#xA;&#xD;&#xA;	glEnable(GL_TEXTURE_CUBE_MAP);&#xD;&#xA;	glDepthMask(GL_FALSE);&#xD;&#xA;&#xD;&#xA;	// draw the cube here with extents&#xD;&#xA;&#xD;&#xA;	glDisable(GL_TEXTURE_CUBE_MAP);&#xD;&#xA;	glDepthMask(GL_TRUE);&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;Do I need to translate the skybox by the translation of the camera ? (btw, that didn't help either)&#xD;&#xA;&#xD;&#xA;**EDIT**: I forgot to mention: It looks like a small cube with unit extents. Also, I can strafe in/out of the cube." />
  <row Id="16650" PostHistoryTypeId="5" PostId="8174" RevisionGUID="caa86acc-25f6-4bdd-8028-70d13f11fdf3" CreationDate="2011-02-05T19:40:32.057" UserId="4638" Comment="added 103 characters in body" Text="I am trying to get a skybox rendered correctly in my first person shooter game. I have the skybox cube rendering using GL_TEXTURE_CUBE_MAP. I author the cube with extents of -1 and 1 along X,Y and Z. &#xD;&#xA;&#xD;&#xA;However, I can't wrap my head around the camera transformations that I need to apply to get it right. My render loop looks something like this:&#xD;&#xA;&#xD;&#xA; - mp_Camera-&gt;ApplyTransform() :: Takes the current player transformation and inverts it and pushes that on the modelview stack.&#xD;&#xA; - Draw GameObjects&#xD;&#xA; - Draw Skybox&#xD;&#xA;&#xD;&#xA;DrawSkybox does the following:&#xD;&#xA;&#xD;&#xA;	glEnable(GL_TEXTURE_CUBE_MAP);&#xD;&#xA;	glDepthMask(GL_FALSE);&#xD;&#xA;&#xD;&#xA;	// draw the cube here with extents&#xD;&#xA;&#xD;&#xA;	glDisable(GL_TEXTURE_CUBE_MAP);&#xD;&#xA;	glDepthMask(GL_TRUE);&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;Do I need to translate the skybox by the translation of the camera ? (btw, that didn't help either)&#xD;&#xA;&#xD;&#xA;**EDIT**: I forgot to mention: It looks like a small cube with unit extents. Also, I can strafe in/out of the cube.&#xD;&#xA;Screenshot:&#xD;&#xA;![Skybox as seen when stepped back in space][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tLUvz.png" />
  <row Id="16651" PostHistoryTypeId="25" PostId="8174" RevisionGUID="aacaf064-d960-4964-9e6b-8e59c42086c8" CreationDate="2011-02-05T20:16:15.657" Comment="http://twitter.com/#!/StackGameDev/status/33982255261024256" />
  <row Id="16652" PostHistoryTypeId="2" PostId="8177" RevisionGUID="90bd2994-1474-477f-9df9-b3cc24654cd7" CreationDate="2011-02-05T20:29:08.893" UserId="4662" Text="What you want to do is construct a matrix with *only* the rotation of the camera, and use that for the camera's world matrix, render the skybox there (i.e., as if the camera is at 0,0,0), and then render the other geometry with the camera's real position." />
  <row Id="16653" PostHistoryTypeId="2" PostId="8178" RevisionGUID="c93b26c8-1fc7-40c8-9390-856b8b887863" CreationDate="2011-02-05T21:43:12.023" UserId="1221" Text="I am not sure if this is a fitting question for gamedev, or if it is too art related. I am currently trying, to create 2D character protraits for my game.&#xD;&#xA;&#xD;&#xA;At first I tried to draw them and even though it helped polishing my drawing skills the end result either required way too much time or it simply looked like it was created by a grade school kid.&#xD;&#xA;&#xD;&#xA;So I am currently looking into some tools which from which people like me who are not out of the art-world might benefit. Especially tools which can create a 3D head+hair, so that I can render them.&#xD;&#xA;I have tried several 3D generation tools such as makehead and makehuman to create the basic head-shape. &#xD;&#xA;&#xD;&#xA;But I have to admit I am not well versed in what other options are available/what has the best quality/etc." />
  <row Id="16654" PostHistoryTypeId="1" PostId="8178" RevisionGUID="c93b26c8-1fc7-40c8-9390-856b8b887863" CreationDate="2011-02-05T21:43:12.023" UserId="1221" Text="Most efficient way to generate 2D portraits" />
  <row Id="16655" PostHistoryTypeId="3" PostId="8178" RevisionGUID="c93b26c8-1fc7-40c8-9390-856b8b887863" CreationDate="2011-02-05T21:43:12.023" UserId="1221" Text="&lt;tools&gt;&lt;art&gt;&lt;generated&gt;" />
  <row Id="16656" PostHistoryTypeId="25" PostId="8178" RevisionGUID="68398df7-aa7b-44f7-a039-e49bb3b93fa5" CreationDate="2011-02-05T23:16:16.747" Comment="http://twitter.com/#!/StackGameDev/status/34027556911063040" />
  <row Id="16657" PostHistoryTypeId="2" PostId="8179" RevisionGUID="5342df94-338b-4c67-ab65-55684178eaef" CreationDate="2011-02-05T23:25:56.870" UserId="3020" Text="Perfect isometric sorting is hard. But for a first approach, to properly order your items, you should use a more complex comparision function with each object. This function must check this condition: A object &quot;a&quot; is behind of &quot;b&quot; if:&#xD;&#xA;&#xD;&#xA;(a.posX + a.sizeX &lt;= b.posX) &#xD;&#xA;or (a.posY + a.sizeY &lt;= b.posY)&#xD;&#xA;or (a.posZ + a.sizeZ &lt;= b.posZ)&#xD;&#xA;&#xD;&#xA;Of course, this is a first idea for a naive isometric implementation. For a more complex scenario (if you want view rotation, per-pixel positions on z-axis, etc.) you'll need a more complete solution." />
  <row Id="16658" PostHistoryTypeId="5" PostId="8179" RevisionGUID="80caa0fb-66e6-4298-8899-1bdfe42553e0" CreationDate="2011-02-05T23:31:15.520" UserId="3020" Comment="edited body" Text="Perfect isometric sorting is hard. But for a first approach, to properly order your items, you should use a more complex comparision function with each object. This function must check this condition: A object &quot;a&quot; is behind of &quot;b&quot; if:&#xD;&#xA;&#xD;&#xA;(a.posX + a.sizeX &lt;= b.posX) &#xD;&#xA;or (a.posY + a.sizeY &lt;= b.posY)&#xD;&#xA;or (a.posZ + a.sizeZ &lt;= b.posZ)&#xD;&#xA;&#xD;&#xA;Of course, this is a first idea for a naive isometric implementation. For a more complex scenario (if you want view rotation, per-pixel positions on z-axis, etc.) you'll need to check more conditions." />
  <row Id="16659" PostHistoryTypeId="5" PostId="8179" RevisionGUID="833c220c-5f21-4f3d-86bc-49599a67fad5" CreationDate="2011-02-05T23:41:01.307" UserId="3020" Comment="deleted 1 characters in body; added 11 characters in body; added 1 characters in body" Text="Perfect isometric sorting is hard. But for a first approach, to properly sort your items, you should use a more complex comparision function with each object. This function must check this condition: An overlaping object &quot;a&quot; is behind of &quot;b&quot; if:&#xD;&#xA;&#xD;&#xA;(a.posX + a.sizeX &lt;= b.posX) &#xD;&#xA;or (a.posY + a.sizeY &lt;= b.posY)&#xD;&#xA;or (a.posZ + a.sizeZ &lt;= b.posZ)&#xD;&#xA;&#xD;&#xA;Of course, this is a first idea for a naive isometric implementation. For a more complex scenario (if you want view rotation, per-pixel positions on z-axis, etc.) you'll need to check more conditions." />
  <row Id="16660" PostHistoryTypeId="5" PostId="8179" RevisionGUID="9ae6b6a7-37dc-461e-8f16-433170b5eacd" CreationDate="2011-02-05T23:46:14.810" UserId="3020" Comment="added 11 characters in body" Text="Perfect isometric sorting is hard. But for a first approach, to properly sort your items, you should use a more complex comparision function with each overlaping object. This function must check this condition: An overlaping object &quot;a&quot; is behind of &quot;b&quot; if:&#xD;&#xA;&#xD;&#xA;(a.posX + a.sizeX &lt;= b.posX) &#xD;&#xA;or (a.posY + a.sizeY &lt;= b.posY)&#xD;&#xA;or (a.posZ + a.sizeZ &lt;= b.posZ)&#xD;&#xA;&#xD;&#xA;Of course, this is a first idea for a naive isometric implementation. For a more complex scenario (if you want view rotation, per-pixel positions on z-axis, etc.) you'll need to check more conditions." />
  <row Id="16661" PostHistoryTypeId="2" PostId="8180" RevisionGUID="319a5df9-5e99-4a2c-8ba3-b97ffc363917" CreationDate="2011-02-06T00:44:25.307" UserId="20" Text="It's hard to give you an advice since you didn't tell us anything about the art-style you're going for.&#xD;&#xA;&#xD;&#xA;If you're planning to create realistic looking portraits you'll have to have pretty solid art skills and they abviously require a lot of work. The fastest way to get there would probably be: Downloading an existing 3d model and modify it, or paint over a photo.&#xD;&#xA;&#xD;&#xA;Luckily, we only need some very basic shapes to recognize something as a human face. You could use that to your advantage (and also give your game an unique look). Take Nintendos [Mii][1] as an example. There are only a few basic elements available to create portraits from, yet you can create almost every portrait and expression you want.&#xD;&#xA;&#xD;&#xA;Of course this is going to look out of place if your other game-art is completely different. IMHO the key is consistency in your art-style. Keep things simple. It's going to look good, if you can keep the same level of simplicity and art-style throughout your game. And if you're not happy with what you can do, ask somebody who has got the talent... better waste your time on things you're good at ;-)&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Mii" />
  <row Id="16662" PostHistoryTypeId="2" PostId="8181" RevisionGUID="25527b83-4407-4f80-9fb8-6d2166054ced" CreationDate="2011-02-06T01:52:53.510" UserId="4834" Text="Assuming that your sprites occupy sets of tiles that are rectangles (if they occupy arbitrary sets, then you cannot draw the correctly at all in the general case), the problem is that there is no total order relation between the elements, so you cannot sort them using a sort that would result in O(nlogn) comparisons.&#xD;&#xA;&#xD;&#xA;Note that for any two objects A and B, either A should be drawn before B (A &lt;- B), B should be drawn before A (B &lt;- A) or they can be drawn in any order. They form a partial order.&#xD;&#xA;&#xD;&#xA;One solution is to use the comparison (mentioned by the Dani) and compare each object to each other object to determine their dependencies and form a dependency graph (which will be a DAG). Then do a topological sort on the graph to determine drawing order. If there aren't too many objects, this may be fast enough (it's O(n^2)).&#xD;&#xA;&#xD;&#xA;Another solution is to use a (for balancing - [pseudo][1]) quad tree and store the corners of all objects into it.&#xD;&#xA;&#xD;&#xA;Then iterate through all the objects X, and use the quad tree to check if there are any elements Y in the stripe above the object X which starts with the leftmost and ends with the rightmost corner of object X - for all such Y, Y &lt;- X. Like this, you will still have to form a graph and sort topologically.&#xD;&#xA;&#xD;&#xA;But you can avoid it. You use a list of objects Q, and a table of objects T. You iterate all the visible slots in the following way - go through each slot visible on the screen row by row, left to right, starting from the top. If there is a bottom corner of an object at that slot, do the procedure above to determine dependencies. If an object X depends on some other object Y that is partly above it (Y &lt;- X), and every such Y is already in Q, add X to Q. If there is some Y which is not in Q, add X to T and denote that Y &lt;- X. Every time you add an object to Q, you remove dependencies of objects pending in T. If all dependencies are removed, an object from T is moved to Q.&#xD;&#xA;&#xD;&#xA;We are assuming that object sprites don't peek out of their slots on the bottom, the left or the right (only at the top, like trees in your picture). This should improve performance for a large number of objects. This approach will again be O(n^2), but only in the worst case which includes weird sized objects and/or weird configurations of objects. In most cases, it's O(n * logn * sqrt(n)).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.ch/books?id=Z8R9zaUQ6xAC&amp;pg=PA57&amp;lpg=PA57&amp;dq=pseudo+quad+trees&amp;source=bl&amp;ots=7xPqBl5iyu&amp;sig=dK1BDZ1oQ1kBxiN3VThlkAdvoNY&amp;hl=en&amp;ei=8fpNTdHaB8LpOaGi6PoP&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CBwQ6AEwAA#v=onepage&amp;q=pseudo%20quad%20trees&amp;f=false" />
  <row Id="16663" PostHistoryTypeId="25" PostId="8150" RevisionGUID="ee4de05a-89ae-4120-b6c4-67ad41058764" CreationDate="2011-02-06T02:16:17.217" Comment="http://twitter.com/#!/StackGameDev/status/34072858162368512" />
  <row Id="16664" PostHistoryTypeId="5" PostId="8181" RevisionGUID="5624a79d-08fd-4faf-9ee8-3f609ea1ad34" CreationDate="2011-02-06T02:20:29.100" UserId="4834" Comment="added 98 characters in body; added 174 characters in body; added 2 characters in body" Text="Assuming that your sprites occupy sets of tiles that are rectangles (if they occupy arbitrary sets, then you cannot draw the correctly at all in the general case), the problem is that there is no total order relation between the elements, so you cannot sort them using a sort that would result in O(nlogn) comparisons.&#xD;&#xA;&#xD;&#xA;Note that for any two objects A and B, either A should be drawn before B (A &lt;- B), B should be drawn before A (B &lt;- A) or they can be drawn in any order. They form a partial order.&#xD;&#xA;&#xD;&#xA;One solution is to use the comparison (mentioned by the Dani) and compare each object to each other object to determine their dependencies and form a dependency graph (which will be a DAG). Then do a topological sort on the graph to determine drawing order. If there aren't too many objects, this may be fast enough (it's `O(n^2)`).&#xD;&#xA;&#xD;&#xA;Another solution is to use a (for balancing - [pseudo][1]) quad tree and store the rectangles of all objects into it.&#xD;&#xA;&#xD;&#xA;Then iterate through all the objects X, and use the quad tree to check if there are any objects Y in the stripe above the object X which starts with the leftmost and ends with the rightmost corner of object X - for all such Y, Y &lt;- X. Like this, you will still have to form a graph and sort topologically.&#xD;&#xA;&#xD;&#xA;But you can avoid it. You use a list of objects Q, and a table of objects T. You iterate all the visible slots from smaller to bigger values on the x-axis (one row), going row by row on the y-axis. If there is a bottom corner of an object at that slot, do the procedure above to determine dependencies. If an object X depends on some other object Y that is partly above it (Y &lt;- X), and every such Y is already in Q, add X to Q. If there is some Y which is not in Q, add X to T and denote that Y &lt;- X. Every time you add an object to Q, you remove dependencies of objects pending in T. If all dependencies are removed, an object from T is moved to Q.&#xD;&#xA;&#xD;&#xA;We are assuming that object sprites don't peek out of their slots on the bottom, the left or the right (only at the top, like trees in your picture). This should improve performance for a large number of objects. This approach will again be `O(n^2)`, but only in the worst case which includes weird sized objects and/or weird configurations of objects. In most cases, it's `O(n * logn * sqrt(n))`. Knowing the height of your sprites can eliminate the `sqrt(n)`, because you don't have to check the entire stripe above. Depending on the number of objects on the screen, you may try replacing the quad tree with an array indicating which slots are taken (makes sense if there are many objects).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.ch/books?id=Z8R9zaUQ6xAC&amp;pg=PA57&amp;lpg=PA57&amp;dq=pseudo+quad+trees&amp;source=bl&amp;ots=7xPqBl5iyu&amp;sig=dK1BDZ1oQ1kBxiN3VThlkAdvoNY&amp;hl=en&amp;ei=8fpNTdHaB8LpOaGi6PoP&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CBwQ6AEwAA#v=onepage&amp;q=pseudo%20quad%20trees&amp;f=false" />
  <row Id="16665" PostHistoryTypeId="2" PostId="8182" RevisionGUID="2b0dd603-c55b-497c-99f5-80bf7e03fbdc" CreationDate="2011-02-06T02:33:01.710" UserId="3794" Text="I am doing volumetric raycasting and curently working on depth jitter. I have 3D position on ray and want to sample 2D noise texture to jitter the depth. &#xD;&#xA;&#xD;&#xA;Function for converting (or hashing) 3D position to 2D have to produce absolutely different numbers for a little changes (especialy because i am sampling in texture space so sample values differs very very little) and **have to be &quot;shader-wise&quot;** - so forget about branches, cycles etc.&#xD;&#xA;&#xD;&#xA;I'm looking forward for yours nice and fast solutions." />
  <row Id="16666" PostHistoryTypeId="1" PostId="8182" RevisionGUID="2b0dd603-c55b-497c-99f5-80bf7e03fbdc" CreationDate="2011-02-06T02:33:01.710" UserId="3794" Text="Hashing 3D position into 2D position" />
  <row Id="16667" PostHistoryTypeId="3" PostId="8182" RevisionGUID="2b0dd603-c55b-497c-99f5-80bf7e03fbdc" CreationDate="2011-02-06T02:33:01.710" UserId="3794" Text="&lt;directx&gt;&lt;textures&gt;&lt;ray-casting&gt;&lt;gpgpu&gt;" />
  <row Id="16669" PostHistoryTypeId="2" PostId="8183" RevisionGUID="deda3d60-00de-44f9-a8fe-cab4026707d5" CreationDate="2011-02-06T03:45:22.797" UserDisplayName="user5197" Text="You need to assign unique ids to all objects of the same type. Then you sort all objects by their positions and draw groups of objects in order of their ids. So that object 1 in group A will never overdraw object 2 in group A etc." />
  <row Id="16671" PostHistoryTypeId="2" PostId="8185" RevisionGUID="b896b9af-0508-463a-bab5-505bfd646519" CreationDate="2011-02-06T04:14:32.497" UserId="5198" Text="how can i move static box2d sprites. i have tried this tutorial from .&#xD;&#xA;http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12.&#xD;&#xA;&#xD;&#xA;I managed to add another &quot;paddle&quot; object with box2d body, but i can seam to be able to make the code to move the second &quot;paddle&quot; body.&#xD;&#xA;Can anyone direct me how to do it?&#xD;&#xA;&#xD;&#xA;Is there a way to move a &quot;b2_staticBody&quot; box 2d object? i have tried, but i can only move it when i use &quot;b2_dynamicBody&quot; if i used &quot;b2_staticBody&quot; i can move it at all." />
  <row Id="16672" PostHistoryTypeId="1" PostId="8185" RevisionGUID="b896b9af-0508-463a-bab5-505bfd646519" CreationDate="2011-02-06T04:14:32.497" UserId="5198" Text="how can i move static box2d object." />
  <row Id="16673" PostHistoryTypeId="3" PostId="8185" RevisionGUID="b896b9af-0508-463a-bab5-505bfd646519" CreationDate="2011-02-06T04:14:32.497" UserId="5198" Text="&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="16674" PostHistoryTypeId="2" PostId="8186" RevisionGUID="2b402012-b66f-441e-8887-0ebf0f8ec75d" CreationDate="2011-02-06T04:19:39.577" UserId="1021" Text="Is it possible to describe an &quot;optimal&quot; (in terms of performance) layout for a 2D side-scroller's game loop?  In this context the &quot;game loop&quot; takes user input, updates the states of game objects and draws the game objects.&#xD;&#xA;&#xD;&#xA;For example having a GameObject base class with a deep inheritance hierarchy could be good for maintenance... you can do something like the following:&#xD;&#xA;&#xD;&#xA;    foreach(GameObject g in gameObjects) g.update();&#xD;&#xA;&#xD;&#xA;However I think this approach can create performance issues.&#xD;&#xA;&#xD;&#xA;On the other hand all game objects' data and functions could be global.  Which would be a maintenance headache but might be closer to an optimally performing game loop.  &#xD;&#xA;&#xD;&#xA;**Any thoughts?**  I'm interested in practical applications of near optimal game loop structure... even if I get a maintenance headache in exchange for great performance.&#xD;&#xA;  " />
  <row Id="16675" PostHistoryTypeId="1" PostId="8186" RevisionGUID="2b402012-b66f-441e-8887-0ebf0f8ec75d" CreationDate="2011-02-06T04:19:39.577" UserId="1021" Text="&quot;Optimal&quot; game loop for 2D side-scroller" />
  <row Id="16676" PostHistoryTypeId="3" PostId="8186" RevisionGUID="2b402012-b66f-441e-8887-0ebf0f8ec75d" CreationDate="2011-02-06T04:19:39.577" UserId="1021" Text="&lt;optimization&gt;&lt;performance&gt;&lt;gameloop&gt;" />
  <row Id="16677" PostHistoryTypeId="2" PostId="8187" RevisionGUID="b88c266f-917f-479e-a536-e8dc17036403" CreationDate="2011-02-06T04:51:04.790" UserId="2843" Text="AFAIK .NET GC still suffers from [stop the world](http://msdn.microsoft.com/en-us/library/ee787088.aspx#concurrent_garbage_collection) style algorithm. While this can be appropriate for a wide variety of applications -- it's unacceptable for real-time apps like games.&#xD;&#xA;&#xD;&#xA;In fact, it is very difficult to use managed languages effectively for real-time programs until we have some breakthroughs in GC.&#xD;&#xA;" />
  <row Id="16678" PostHistoryTypeId="2" PostId="8188" RevisionGUID="d1b920ff-3b7a-44d1-bd23-0b2bbbbceb2a" CreationDate="2011-02-06T05:07:09.380" UserId="4638" Text="You want to use a dynamic body, if you want bodies to move in your physics. That is, the nature of bodies in box2d. You make a dynamic body, and apply impulse or force to it in the direction you want it to move.&#xD;&#xA;&#xD;&#xA;I recently wrote a very basic tutorial to create a pong game using farseer physics engine (which is a c# port of box2d), so the same things would apply. &#xD;&#xA;&#xD;&#xA;http://entropologygames.wordpress.com/2011/01/28/making-pong-using-farseer-physics-engine/&#xD;&#xA;&#xD;&#xA;Also, it would help to know what kind of a game are you making ?" />
  <row Id="16679" PostHistoryTypeId="25" PostId="8186" RevisionGUID="2d3088d2-5feb-49d7-b9fe-f798f00e6560" CreationDate="2011-02-06T05:16:16.657" Comment="http://twitter.com/#!/StackGameDev/status/34118154594557952" />
  <row Id="16680" PostHistoryTypeId="2" PostId="8189" RevisionGUID="fed5bcff-bf0a-4c80-8a2c-f466b6f449b9" CreationDate="2011-02-06T05:24:05.743" UserId="1430" Text="&gt; For example having a GameObject base&#xD;&#xA;&gt; class with a deep inheritance&#xD;&#xA;&gt; hierarchy could be good for&#xD;&#xA;&gt; maintenance...&#xD;&#xA;&#xD;&#xA;Actually, deep hierarchies are generally worse for maintainability than shallow ones, and the modern architectural style for game objects is trending towards [shallowing, aggregation-based approaches][1].&#xD;&#xA;&#xD;&#xA;&gt; However I think this approach can&#xD;&#xA;&gt; create performance issues. On the&#xD;&#xA;&gt; other hand all game objects' data and&#xD;&#xA;&gt; functions could be global. Which would&#xD;&#xA;&gt; be a maintenance headache but might be&#xD;&#xA;&gt; closer to an optimally performing game&#xD;&#xA;&gt; loop.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The loop you've shown potentially has performance issues, but not, as is implied by your subsequent statement, because you have instance data and member functions in the `GameObject` class. Rather, the problem is that you if you treat *every* object in the game as exactly the same, you probably aren't grouping those objects intelligently -- they're likely randomly scattered about throughout that list. Potentially, then, every call to the update method for that object (whether that method is a global function or not, and whether than object has instance data or &quot;global data&quot; floating around in some table you're indexing into or whatever) is different from the update call in the last loop iterations.&#xD;&#xA;&#xD;&#xA;This can put increased pressure on the system as you may need to page the memory with the relevant function in and out of memory and re-fill the instruction cache more frequently, resulting in a slower loop. Whether or not this is observable by the naked eye (or even in a profiler) depends on exactly *what* is a considered a &quot;game object,&quot; how many of them exist on average, and what else is going on in your application.&#xD;&#xA;&#xD;&#xA;Component-oriented object systems are a popular trend right now, leveraging the philosophy that [aggregation is preferable to inheritance][2]. Such systems potentially allow you to split the &quot;update&quot; logic of components (where &quot;component&quot; is roughly defined as some unit of functionality, such as the thing that represents the physically-simulated portion of some object, which is processed by the physics system) on to multiple threads -- discriminated by component type -- if possible and desired, which could have a performance gain. At the very least you can organize the components such that all components of a given type update *together*, making optimal use of the CPU's cache. An example of a such component-oriented system is [discussed in this thread][3].&#xD;&#xA;&#xD;&#xA;Such systems are often highly decoupled, which is a boon to maintenance as well.&#xD;&#xA;&#xD;&#xA;[Data-oriented design][4] is a related approach -- it's about orienting yourself around the data required of objects as a first priority, so that that data can be effectively processed in bulk (for example). This generally means an organization that tries to keep data used for the same purpose cluster together and operated on all at once. It is not fundamentally incompatible with OO design, and you can find some chatter on the subject [here at GDSE in this question][5].&#xD;&#xA;&#xD;&#xA;In effect, a more optimal approach to the game loop would be, instead of your original&#xD;&#xA;&#xD;&#xA;    foreach(GameObject g in gameObjects) g.update();&#xD;&#xA;&#xD;&#xA;something more like&#xD;&#xA;&#xD;&#xA;    ProcessUserInput();&#xD;&#xA;    UpdatePhysicsForAllObjects();&#xD;&#xA;    UpdateScriptsForAllObjects();&#xD;&#xA;    UpdateRenderDataForAllObjects();&#xD;&#xA;    RenderEverything();&#xD;&#xA;&#xD;&#xA;In such a world, each `GameObject` might have a pointer or reference to its own `PhysicsData` or `Script` or `RenderData`, for the cases where you might need to interact with objects on an individual basis, but the actual `PhysicsData`, `Scripts`, `RenderData`, et cetera would all be owned by their respective subsystems (physics simulator, script hosting environment, renderer) and processed in bulk as indicated above.&#xD;&#xA;&#xD;&#xA;It is **very important** to note that this approach isn't a magic bullet and will not always yield performance improvement (although it is generally a better *design* than a deep inheritance tree). You're especially likely to notice basically no performance difference if you have very few objects, or very many objects you cannot effectively parallelize the updates for. &#xD;&#xA;&#xD;&#xA;Unfortunately, there is no such magic loop that is the most optimal -- every game is different and may need performance tuning in different ways. So it's very important to measure (profile) things before you blindly go taking the advice of some random guy on the internet.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamearchitect.net/2008/06/01/an-anatomy-of-despair-aggregation-over-inheritance/&#xD;&#xA;  [2]: http://blogs.msdn.com/b/steverowe/archive/2008/04/28/prefer-composition-over-inheritance.aspx&#xD;&#xA;  [3]: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/&#xD;&#xA;  [4]: http://gamesfromwithin.com/data-oriented-design&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/8024/how-to-apply-data-oriented-design-with-object-oriented-programming" />
  <row Id="16681" PostHistoryTypeId="2" PostId="8190" RevisionGUID="c0d26559-43f0-4378-be42-5e461df1a4ee" CreationDate="2011-02-06T05:32:08.653" UserId="1430" Text="You could write a little ray-casting 3D engine, [like this fellow is working on][1]. Wouldn't require too much color; although your screen is smaller than the one he's got, it might be workable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.benryves.com/journal/3739423" />
  <row Id="16682" PostHistoryTypeId="2" PostId="8191" RevisionGUID="af6556ed-b5e0-4458-a7c2-cd72a5500fd7" CreationDate="2011-02-06T05:38:51.003" UserId="2862" Text="Do you have any reliable face normal calculation code?&#xD;&#xA;&#xD;&#xA;I'm using this but it fails when faces are 90 degrees upright or similar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			// the normal point&#xD;&#xA;			var x:Number = 0;&#xD;&#xA;			var y:Number = 0;&#xD;&#xA;			var z:Number = 0;&#xD;&#xA;			&#xD;&#xA;			// if is a triangle with 3 points&#xD;&#xA;			if (points.length == 3) {&#xD;&#xA;				&#xD;&#xA;				// read vertices of triangle&#xD;&#xA;				var Ax:Number, Bx:Number, Cx:Number;&#xD;&#xA;				var Ay:Number, By:Number, Cy:Number;&#xD;&#xA;				var Az:Number, Bz:Number, Cz:Number;&#xD;&#xA;				Ax = points[0].x;	Bx = points[1].x;	Cx = points[2].x;&#xD;&#xA;				Ay = points[0].y;	By = points[1].y;	Cy = points[2].y;&#xD;&#xA;				Az = points[0].z;	Bz = points[1].z;	Cz = points[2].z;&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a triangle&#xD;&#xA;				x = (By - Ay) * (Cz - Az) - (Bz - Az) * (Cy - Ay);&#xD;&#xA;				y = (Bz - Az) * (Cx - Ax) - (Bx - Ax) * (Cz - Az);&#xD;&#xA;				z = (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax);&#xD;&#xA;				&#xD;&#xA;			// if is a polygon with 4+ points&#xD;&#xA;			}else if (points.length &gt; 3){&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a polygon using all points&#xD;&#xA;				var n:int = points.length;			&#xD;&#xA;				x = 0;&#xD;&#xA;				y = 0;&#xD;&#xA;				z = 0&#xD;&#xA;				&#xD;&#xA;				// ensure all points above 0&#xD;&#xA;				var minx:Number = 0, miny:Number = 0, minz:Number = 0;&#xD;&#xA;				for (var p:int = 0, pl:int = points.length; p &lt; pl; p++) {&#xD;&#xA;					var po:_Point3D = points[p] = points[p].clone();&#xD;&#xA;					if (po.x &lt; minx) {	minx = po.x;	 }&#xD;&#xA;					if (po.y &lt; miny) {	miny = po.y;	 }&#xD;&#xA;					if (po.z &lt; minz) {	minz = po.z;	 }&#xD;&#xA;				}&#xD;&#xA;				if (minx &gt; 0 || miny &gt; 0 || minz &gt; 0){&#xD;&#xA;					for (p = 0; p &lt; pl; p++) {&#xD;&#xA;						po = points[p];&#xD;&#xA;						po.x -= minx;&#xD;&#xA;						po.y -= miny;&#xD;&#xA;						po.z -= minz;&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;				&#xD;&#xA;				var cur:int = 1, prev:int = 0, next:int = 2;&#xD;&#xA;				for (var i:int = 1; i &lt;= n; i++) {&#xD;&#xA;					&#xD;&#xA;					// using Newell method&#xD;&#xA;					x += points[cur].y * (points[next].z - points[prev].z);&#xD;&#xA;					y += points[cur].z * (points[next].x - points[prev].x);&#xD;&#xA;					z += points[cur].x * (points[next].y - points[prev].y);&#xD;&#xA;					cur = (cur+1) % n;&#xD;&#xA;					next = (next+1) % n;&#xD;&#xA;					prev = (prev+1) % n;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			// length of the normal&#xD;&#xA;			var length:Number = Math.sqrt(x * x + y * y + z * z);&#xD;&#xA;			&#xD;&#xA;			// if area is 0&#xD;&#xA;			if (length == 0) {&#xD;&#xA;				return null;&#xD;&#xA;				&#xD;&#xA;			}else{&#xD;&#xA;				// turn large values into a unit vector&#xD;&#xA;				x = x / length;&#xD;&#xA;				y = y / length;&#xD;&#xA;				z = z / length;&#xD;&#xA;			}&#xD;&#xA;			" />
  <row Id="16683" PostHistoryTypeId="1" PostId="8191" RevisionGUID="af6556ed-b5e0-4458-a7c2-cd72a5500fd7" CreationDate="2011-02-06T05:38:51.003" UserId="2862" Text="Any reliable polygon normal calculation code?" />
  <row Id="16684" PostHistoryTypeId="3" PostId="8191" RevisionGUID="af6556ed-b5e0-4458-a7c2-cd72a5500fd7" CreationDate="2011-02-06T05:38:51.003" UserId="2862" Text="&lt;3d&gt;&lt;normals&gt;&lt;polygon&gt;&lt;face&gt;" />
  <row Id="16685" PostHistoryTypeId="2" PostId="8192" RevisionGUID="d59756df-007f-491c-95e1-6c51122a4eeb" CreationDate="2011-02-06T06:02:50.420" UserId="953" Text="That makes me think about board games, like Go or Checkers, and puzzley things involving pentaminos or other interesting configurations of uniform parts.  I'd stay away from heavily spatial games as well as the text-heavy.  Your game pretty much has to be abstract.  With 64x64 rez, you might be able to do something as spatial as Sakoban, but I have my doubts." />
  <row Id="16686" PostHistoryTypeId="2" PostId="8193" RevisionGUID="f6affabb-b8f4-4ec4-b25e-f3aecd271af0" CreationDate="2011-02-06T06:25:55.060" UserDisplayName="user5204" Text="Actually. Multiplayer is supported. It simply a matter of choosing a server that you want to run your game. The hot one on the market now is &quot;SmartFox Server&quot; they offer a few different packages, all of which are free (to an extent). It's only free if you plan on having a certain amount of players, as each package allows a certain amount of players for &quot;free&quot;. If you chose to upgrade, the price is pretty steep for an indie developer. So... In the long run, if you have a lot of players on your server than you will have to charge for your game rather than uploading it on sites like Download.com as a free full game. This may not be an issue for some, but most of us can't afford $2,500 out of pocket for a server. &#xD;&#xA;For Example - SmartFox pro allows 20 players for free. If you want to upgrade it will cost you 500 Euros, which is a bit more in US, around 600-700, and that allows for 100 connections. The next upgrade is for max amount of players of 500, and it is 1000 Euros, but... You don't have to pay the 1000, you pay the difference. So you will have to pay only 500 more Euros, rather than the whole 1000. The last upgrades supports unlimited amount of connections, for 2,000 Euros. Which is almost $3,000 US. So if you upgrade from the 500 connections, you pay 1000 Euros, if you upgrade from 100 connections you pay 1,5000 Euros, and of course, 2,000 Euros to upgrade from free.&#xD;&#xA;&#xD;&#xA;Also, this server is very easy to setup with Unity and there are numerous tutorial videos of how to do it exactly on Youtube." />
  <row Id="16687" PostHistoryTypeId="25" PostId="8191" RevisionGUID="33583605-65c2-40f2-8e95-2e1d0619e65d" CreationDate="2011-02-06T08:16:16.923" Comment="http://twitter.com/#!/StackGameDev/status/34163453711228928" />
  <row Id="16688" PostHistoryTypeId="2" PostId="8194" RevisionGUID="26faecb9-e1bd-4d7e-b5da-53d5a6eb3f50" CreationDate="2011-02-06T08:47:23.263" UserId="4941" Text="I've been looking for the very same thing and found this: http://wiki.gamedev.net/index.php/D3DBook:Book_Cover&#xD;&#xA;&#xD;&#xA;It's only available only, which is a shame, but as far as I have looked into it, is a good read." />
  <row Id="16689" PostHistoryTypeId="2" PostId="8195" RevisionGUID="14d32d1f-f4c0-47af-b4e5-cb0d167d97fb" CreationDate="2011-02-06T10:08:49.270" UserDisplayName="user5207" Text="I'm working on a simple block-based puzzle game.&#xD;&#xA;&#xD;&#xA;The game play consists pretty much of moving blocks around in the game area, so it's a trivial physics simulation. My implementation, however, is in my opinion far from ideal and I'm wondering if you can give me any pointers on how to do it better.&#xD;&#xA;&#xD;&#xA;I've split the code up into two areas: Game logic and UI, as I did with a lot of puzzle games:&#xD;&#xA;&#xD;&#xA;- The game logic is responsible for the general rules of the game (e.g. the formal rule system in chess)&#xD;&#xA;- The UI displays the game area and pieces (e.g. chess board and pieces) and is responsible for animations (e.g. animated movement of chess pieces)&#xD;&#xA;&#xD;&#xA;The game logic represents the game state as a logical grid, where each unit is one cell's width/height on the grid. So for a grid of width 6, you can move a block of width 2 four times until it collides with the boundary.&#xD;&#xA;&#xD;&#xA;The UI takes this grid, and draws it by converting logical sizes into pixel sizes (that is, multiplies it by a constant). However, since the game has hardly any game logic, my game logic layer [1] doesn't have much to do except collision detection. Here's how it works:&#xD;&#xA;&#xD;&#xA;1. Player starts to drag a piece&#xD;&#xA;2. UI asks game logic for the legal movement area of that piece and lets the player drag it within that area&#xD;&#xA;3. Player lets go of a piece&#xD;&#xA;4. UI snaps the piece to the grid (so that it is at a valid logical position)&#xD;&#xA;5. UI tells game logic the new logical position (via mutator methods, which I'd rather avoid)&#xD;&#xA;&#xD;&#xA;I'm not quite happy with that:&#xD;&#xA;&#xD;&#xA;- I'm writing unit tests for my game logic layer, but not the UI, and it turned out all the tricky code is in the UI: Stopping the piece from colliding with others or the boundary and snapping it to the grid.&#xD;&#xA;- I don't like the fact that the UI tells the game logic about the new state, I would rather have it call a `movePieceLeft()` method or something like that, as in my other games, but I didn't get far with that approach, because the game logic knows nothing about the dragging and snapping that's possible in the UI.&#xD;&#xA;&#xD;&#xA;I think the best thing to do would be to get rid of my game logic layer and implement a physics layer instead. I've got a few questions regarding that:&#xD;&#xA;&#xD;&#xA;1. Is such a physics layer common, or is it more typical to have the game logic layer do this?&#xD;&#xA;2. Would the snapping to grid and piece dragging code belong to the UI or the physics layer?&#xD;&#xA;3. Would such a physics layer typically work with pixel sizes or with some kind of logical unit, like my game logic layer?&#xD;&#xA;4. I've seen event-based collision detection in a game's code base once, that is, the player would just drag the piece, the UI would render that obediently and notify the physics system, and the physics system would call a onCollision() method on the piece once a collision is detected. What is more common? This approach or asking for the legal movement area first?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1] *layer* is probably not the right word for what I mean, but *subsystem* sounds overblown and *class* is misguiding, because each layer can consist of several classes. " />
  <row Id="16690" PostHistoryTypeId="1" PostId="8195" RevisionGUID="14d32d1f-f4c0-47af-b4e5-cb0d167d97fb" CreationDate="2011-02-06T10:08:49.270" UserDisplayName="user5207" Text="Separating physics and game logic from UI code" />
  <row Id="16691" PostHistoryTypeId="3" PostId="8195" RevisionGUID="14d32d1f-f4c0-47af-b4e5-cb0d167d97fb" CreationDate="2011-02-06T10:08:49.270" UserDisplayName="user5207" Text="&lt;programming&gt;&lt;physics&gt;&lt;gui&gt;&lt;logic&gt;&lt;design&gt;" />
  <row Id="16692" PostHistoryTypeId="5" PostId="8181" RevisionGUID="7e8058d3-78da-46a2-b89d-93cfb491127e" CreationDate="2011-02-06T10:30:44.383" UserId="4834" Comment="added 367 characters in body" Text="Assuming that your sprites occupy sets of tiles that are rectangles (if they occupy arbitrary sets, then you cannot draw the correctly at all in the general case), the problem is that there is no total order relation between the elements, so you cannot sort them using a sort that would result in O(nlogn) comparisons.&#xD;&#xA;&#xD;&#xA;Note that for any two objects A and B, either A should be drawn before B (A &lt;- B), B should be drawn before A (B &lt;- A) or they can be drawn in any order. They form a partial order. If you draw yourself a few examples with 3 overlapping objects, you may notice that the even though the 1st and the 3rd object may not overlap, thus not having a direct dependency, their drawing order depends on the 2nd object that's between them - depending how you place it, you will obtain different drawing orders. Bottomline - traditional sorts don't work here.&#xD;&#xA;&#xD;&#xA;One solution is to use the comparison (mentioned by the Dani) and compare each object to each other object to determine their dependencies and form a dependency graph (which will be a DAG). Then do a topological sort on the graph to determine drawing order. If there aren't too many objects, this may be fast enough (it's `O(n^2)`).&#xD;&#xA;&#xD;&#xA;Another solution is to use a (for balancing - [pseudo][1]) quad tree and store the rectangles of all objects into it.&#xD;&#xA;&#xD;&#xA;Then iterate through all the objects X, and use the quad tree to check if there are any objects Y in the stripe above the object X which starts with the leftmost and ends with the rightmost corner of object X - for all such Y, Y &lt;- X. Like this, you will still have to form a graph and sort topologically.&#xD;&#xA;&#xD;&#xA;But you can avoid it. You use a list of objects Q, and a table of objects T. You iterate all the visible slots from smaller to bigger values on the x-axis (one row), going row by row on the y-axis. If there is a bottom corner of an object at that slot, do the procedure above to determine dependencies. If an object X depends on some other object Y that is partly above it (Y &lt;- X), and every such Y is already in Q, add X to Q. If there is some Y which is not in Q, add X to T and denote that Y &lt;- X. Every time you add an object to Q, you remove dependencies of objects pending in T. If all dependencies are removed, an object from T is moved to Q.&#xD;&#xA;&#xD;&#xA;We are assuming that object sprites don't peek out of their slots on the bottom, the left or the right (only at the top, like trees in your picture). This should improve performance for a large number of objects. This approach will again be `O(n^2)`, but only in the worst case which includes weird sized objects and/or weird configurations of objects. In most cases, it's `O(n * logn * sqrt(n))`. Knowing the height of your sprites can eliminate the `sqrt(n)`, because you don't have to check the entire stripe above. Depending on the number of objects on the screen, you may try replacing the quad tree with an array indicating which slots are taken (makes sense if there are many objects).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.ch/books?id=Z8R9zaUQ6xAC&amp;pg=PA57&amp;lpg=PA57&amp;dq=pseudo+quad+trees&amp;source=bl&amp;ots=7xPqBl5iyu&amp;sig=dK1BDZ1oQ1kBxiN3VThlkAdvoNY&amp;hl=en&amp;ei=8fpNTdHaB8LpOaGi6PoP&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CBwQ6AEwAA#v=onepage&amp;q=pseudo%20quad%20trees&amp;f=false" />
  <row Id="16693" PostHistoryTypeId="25" PostId="8195" RevisionGUID="16dbdd28-001d-4f57-8bf8-41e59fb5d5f8" CreationDate="2011-02-06T11:16:17.410" Comment="http://twitter.com/#!/StackGameDev/status/34208754815733761" />
  <row Id="16694" PostHistoryTypeId="2" PostId="8196" RevisionGUID="aec36afc-34c8-445f-9350-ce699231705f" CreationDate="2011-02-06T13:27:29.640" UserId="2229" Text="**Scene Graph** seems to be the most effective way of representing the game world. &#xD;&#xA;&#xD;&#xA;The game world usually tends to be as large as the memory and device can handle. In contrast, the screen of the device captures only a fraction of the Game World/Scene Graph.&#xD;&#xA;&#xD;&#xA;Ideally, I wish to process(update and render) **only the visible game objects/nodes** on per-frame basis. My question therefore is, **how to traverse the scene graph so, that I will focus only on the game notes that are in the camera frustum?**&#xD;&#xA;&#xD;&#xA; - How to organize data so that I can easily focus only on the scene graph nodes visible to me? &#xD;&#xA; - What are techniques to minimize scenegraph traversal time? &#xD;&#xA; - Is there such way as more effective traversal, or do I have to traverse whole scene graph on per-frame basis?" />
  <row Id="16695" PostHistoryTypeId="1" PostId="8196" RevisionGUID="aec36afc-34c8-445f-9350-ce699231705f" CreationDate="2011-02-06T13:27:29.640" UserId="2229" Text="Scene Graph Traversing Techniques" />
  <row Id="16696" PostHistoryTypeId="3" PostId="8196" RevisionGUID="aec36afc-34c8-445f-9350-ce699231705f" CreationDate="2011-02-06T13:27:29.640" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="16697" PostHistoryTypeId="2" PostId="8197" RevisionGUID="44a533ce-9675-4247-b8b5-c5cc2aa56a88" CreationDate="2011-02-06T14:06:23.407" UserId="3794" Text="If your scene is static, you can build BVH. And if you want clever BVH, use SAH. You can also build BVH for static scene and dynamic part of scene test every frame. &#xD;&#xA;&#xD;&#xA;But. What is most effective (mean HW effective) is sorting your geometry by shader it uses. Shader switching is one of most slowing down things for GPU. So i would prefer to prepare your scene graph traversal for no needless shader switching and frustum test every Bounding box/sphere. It would be more faster than any BVH/octree tests. **Sorting by shader can increase rendering performance twice.**" />
  <row Id="16698" PostHistoryTypeId="2" PostId="8198" RevisionGUID="29e1758a-f617-4a4e-bf49-300465c348aa" CreationDate="2011-02-06T15:42:42.990" UserId="2778" Text="I'll try an attempt to answer this question as I can understand what you're asking, though I don't have much game development experience since I'm still only learning.&#xD;&#xA;&#xD;&#xA;As I see it, you to to separate the GUI code from your game logic and domain objects, that is, the puzzle pieces. These are indeed three separate layers - and yes, `layer` is an appropriate term in my opinion. It is often used to explain the concepts of separating each objects level of a system into subsystems that are independent from each other.&#xD;&#xA;&#xD;&#xA;In regards of object-oriented programming, each object shall be a class. So, each piece of your puzzle shall consist of a class per itself, and so the game board. The game board should contains **X** pieces of puzzle depending on its size and movement capacity that you want to give to the player.&#xD;&#xA;&#xD;&#xA;So, here are my thoughts on the topic - I hope that it will help:&#xD;&#xA;&#xD;&#xA; 1. The GUI layer: This layer shall contain methods only to display the pieces on the game board to allow the interaction between the the game itself and the player;&#xD;&#xA; 2. The Game Controller layer: Is responsible for the player's inputs. That is the layer that should tell a piece to move in the different directions, and ask the game board whether there will be collisions upon movement and so on;&#xD;&#xA; 3. The Business layer: This layer shall contains all of your business classes, that is, the pieces of your game and the game board object that contains the puzzle pieces.&#xD;&#xA;&#xD;&#xA;In this architecture, you would have the GUI layer show the player of the game state, the location of each pieces of puzzle. The GUI layer would then be responsible for getting the player inputs and pass it to an underlying Game Controller layer, which would then be responsible for collision detection. If there's none, then the piece can be ordered to move into that input direction. To do so, you would simply have to call this piece's `MoveLeft`, `MoveRight`, etc. methods to make the piece move. You might as well let the game board know what piece you want to move, and then it orders by itself the piece's movement, and piece then moves into the demanded direction. This architecture makes it easy for testing each piece of code into the different layers, and then allows you for unit testing, integration testing and functional testing.&#xD;&#xA;&#xD;&#xA;I know this might seem a little confusing at for sight, and thank god if it isn't! Should you require further details and help, please feel free to ask, I'll be glad to help the best I can though I'm a beginner into game development.&#xD;&#xA;&#xD;&#xA;Thanks for reading! =)" />
  <row Id="16699" PostHistoryTypeId="2" PostId="8199" RevisionGUID="c320436d-e686-4dac-acca-312858799d42" CreationDate="2011-02-06T16:03:11.340" UserId="4662" Text="I'm writing my own small-time game from scratch, and now I'm looking to start creating models. I've been wondering- what is the best model format to use? Given that I will be writing the model loading code myself and using whatever program generates them. Ideally, I'd look for a format that has fairly wide support between modelling programs, so I can pick the one I like most to actually perform the building, and the format itself would be relatively simple to load, rather than having all of the latest features." />
  <row Id="16700" PostHistoryTypeId="1" PostId="8199" RevisionGUID="c320436d-e686-4dac-acca-312858799d42" CreationDate="2011-02-06T16:03:11.340" UserId="4662" Text="Model format for small game" />
  <row Id="16701" PostHistoryTypeId="3" PostId="8199" RevisionGUID="c320436d-e686-4dac-acca-312858799d42" CreationDate="2011-02-06T16:03:11.340" UserId="4662" Text="&lt;c++&gt;&lt;directx&gt;&lt;models&gt;" />
  <row Id="16702" PostHistoryTypeId="2" PostId="8200" RevisionGUID="1021dc22-6a70-4dbd-afc3-46583e56a8aa" CreationDate="2011-02-06T16:33:31.033" UserId="2332" Text="Since you've tagged DirectX, you could use .X meshes. You can then export 3D Studio Max models using the Panda Exporter (Found here: http://www.andytather.co.uk/Panda/directxmax.aspx)&#xD;&#xA;&#xD;&#xA;If you don't want to use the DX meshes for any reason, you could potentially use Lib3DS (Found at: http://code.google.com/p/lib3ds/) Although it's not very well documented and you might end up pulling your hair out :) There is a tutorial on using it here: http://www.donkerdump.nl/node/207&#xD;&#xA;&#xD;&#xA;The advantage here is that you don't need to export your .3DS meshes.&#xD;&#xA;&#xD;&#xA;Of course if you want the format to be used in a wide variety of modelling programs, then you're probably going to need an exporter (Like Panda above). You could also use the .OBJ format which is a human readable file, so it's not too difficult to parse and write some loading code for it. I'm no expert in OBJ files, since the .X format has been suitable for my needs so far.&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="16704" PostHistoryTypeId="25" PostId="8196" RevisionGUID="6a187dd7-b9f8-4cae-879e-04607acdfa7f" CreationDate="2011-02-06T17:16:17.843" Comment="http://twitter.com/#!/StackGameDev/status/34299353266921472" />
  <row Id="16705" PostHistoryTypeId="2" PostId="8202" RevisionGUID="c0d06332-97b9-4ecc-9298-c0df0880f286" CreationDate="2011-02-06T17:45:45.680" UserId="1430" Text="I have used [Value's SMD format][1] for a while to good effect (there's an [*extremely bare bones* loader][2] checked in to the SlimDX repository; it's in C# but it should be easily translatable to C++). I picked it because it was straightforward to load and debug (since it's a text-based format), supported textures and skeletal animation, and was natively supported by the [XSI Mod Tool][3].&#xD;&#xA;&#xD;&#xA;I used it as an interchange format which was eventually compiled down to a proprietary binary format.&#xD;&#xA;&#xD;&#xA;Although it seems like Valve has replaced SMD with [DMX][4], which I don't know much about.&#xD;&#xA;&#xD;&#xA;.X is a reasonable choice as well -- although it's being phased out to a degree by the DX SDK, it's still possibly to load the files even in later versions of Direct3D (if you don't mind round-tripping through the 9 D3DX interfaces) and you can find exporters for just about every modeling tool out there.&#xD;&#xA;&#xD;&#xA;.obj is also common, but lacks animation support (if that matters).&#xD;&#xA;&#xD;&#xA;If you don't mind setting up a longer asset pipeline, and cannot find a combination of format + modelling tool + exporter that works for you, you might consider looking in to [FBX][5] or [Collada][6]. They're both interchange formats -- so you probably don't want to load them directly (Collada, in particular, is painfully verbose), but you may be able to construct an asset transformation pipeline using the tools associated with both formats to allow you to use the model format you want with the modelling tool you like best.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Studiomdl_Data&#xD;&#xA;  [2]: http://code.google.com/p/slimdx/source/browse/trunk/samples/SampleFramework/Rendering/Mesh/SmdLoader.cs&#xD;&#xA;  [3]: http://usa.autodesk.com/adsk/servlet/pc/item?id=13571257&amp;siteID=123112&#xD;&#xA;  [4]: http://developer.valvesoftware.com/wiki/DMX_model&#xD;&#xA;  [5]: http://usa.autodesk.com/adsk/servlet/pc/index?id=6837478&amp;siteID=123112&#xD;&#xA;  [6]: https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema" />
  <row Id="16707" PostHistoryTypeId="2" PostId="8204" RevisionGUID="af4f75f4-ff73-4edf-97a1-f3b9b8331a65" CreationDate="2011-02-06T18:34:36.417" UserId="4947" Text="If you want to use non-animated models and want to write your own loader, I would recommend OBJ format. I have used it several times and it's simple and easy to load." />
  <row Id="16708" PostHistoryTypeId="2" PostId="8205" RevisionGUID="5eeed177-2938-4808-969d-948a3517efed" CreationDate="2011-02-06T18:51:06.683" UserId="1217" Text="I'm creating a simple tank game. No matter what I do, the turret keeps facing the target with it's side. I just can't figure out how to turn it 90 degrees in Y once so it faces it correctly. I've checked the pivot in Maya and it doesn't matter how I change it.&#xD;&#xA;&#xD;&#xA;This is the code I use to calculate how to face the target:&#xD;&#xA;&#xD;&#xA;    void LookAt()&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		var forwardA = transform.forward;&#xD;&#xA;		var forwardB = (toLookAt.transform.position - transform.position);&#xD;&#xA;		&#xD;&#xA;		var angleA = Mathf.Atan2(forwardA.x, forwardA.z) * Mathf.Rad2Deg;&#xD;&#xA;		var angleB = Mathf.Atan2(forwardB.x, forwardB.z) * Mathf.Rad2Deg;&#xD;&#xA;		&#xD;&#xA;		var angleDiff = Mathf.DeltaAngle(angleA, angleB);&#xD;&#xA;		//print(angleDiff.ToString());&#xD;&#xA;		if (angleDiff &gt; 20) {&#xD;&#xA;			//Rotate to &#xD;&#xA;			transform.Rotate(new Vector3(0, (-turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else if (angleDiff &lt; 20) {&#xD;&#xA;			transform.Rotate(new Vector3(0, (turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;I'm using Unity3d and would appreciate any help I can get!&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16709" PostHistoryTypeId="1" PostId="8205" RevisionGUID="5eeed177-2938-4808-969d-948a3517efed" CreationDate="2011-02-06T18:51:06.683" UserId="1217" Text="Weird rotation problem" />
  <row Id="16710" PostHistoryTypeId="3" PostId="8205" RevisionGUID="5eeed177-2938-4808-969d-948a3517efed" CreationDate="2011-02-06T18:51:06.683" UserId="1217" Text="&lt;unity&gt;&lt;vector&gt;&lt;rotation&gt;" />
  <row Id="16711" PostHistoryTypeId="5" PostId="8205" RevisionGUID="057763d2-8ac9-4e0b-8719-b04af18886ac" CreationDate="2011-02-06T18:57:57.023" UserId="1430" Comment="removed a bunch of extra whitespace" Text="I'm creating a simple tank game. No matter what I do, the turret keeps facing the target with it's side. I just can't figure out how to turn it 90 degrees in Y once so it faces it correctly. I've checked the pivot in Maya and it doesn't matter how I change it.&#xD;&#xA;&#xD;&#xA;This is the code I use to calculate how to face the target:&#xD;&#xA;&#xD;&#xA;    void LookAt()&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		var forwardA = transform.forward;&#xD;&#xA;		var forwardB = (toLookAt.transform.position - transform.position);&#xD;&#xA;		&#xD;&#xA;		var angleA = Mathf.Atan2(forwardA.x, forwardA.z) * Mathf.Rad2Deg;&#xD;&#xA;		var angleB = Mathf.Atan2(forwardB.x, forwardB.z) * Mathf.Rad2Deg;&#xD;&#xA;		&#xD;&#xA;		var angleDiff = Mathf.DeltaAngle(angleA, angleB);&#xD;&#xA;		//print(angleDiff.ToString());&#xD;&#xA;		if (angleDiff &gt; 20) {&#xD;&#xA;			//Rotate to &#xD;&#xA;			transform.Rotate(new Vector3(0, (-turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else if (angleDiff &lt; 20) {&#xD;&#xA;			transform.Rotate(new Vector3(0, (turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;I'm using Unity3d and would appreciate any help I can get!&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16712" PostHistoryTypeId="2" PostId="8206" RevisionGUID="a625854f-c257-413f-9183-5c7e09b2915e" CreationDate="2011-02-06T19:37:08.213" UserId="2229" Text="In an average game, there are hundreds or maybe thousands of obects in the scene. &#xD;&#xA;Is it completely correct to allocate memory for all objects, includiding gun shots(bullets), **dynamically via default *new()*?**&#xD;&#xA;&#xD;&#xA;Should I create any **memory pool for dynamic allocation**, or is there no need to bother with this? What if the target platform are mobile devices?&#xD;&#xA;&#xD;&#xA;Is there a need for a **memory manager** in a mobile game, please? Thank you.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16713" PostHistoryTypeId="1" PostId="8206" RevisionGUID="a625854f-c257-413f-9183-5c7e09b2915e" CreationDate="2011-02-06T19:37:08.213" UserId="2229" Text="Dynamic Memory Allocation and Memory Management" />
  <row Id="16714" PostHistoryTypeId="3" PostId="8206" RevisionGUID="a625854f-c257-413f-9183-5c7e09b2915e" CreationDate="2011-02-06T19:37:08.213" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;memory-efficiency&gt;" />
  <row Id="16715" PostHistoryTypeId="2" PostId="8207" RevisionGUID="1fceedb1-4284-413e-83b9-520965d1432a" CreationDate="2011-02-06T19:51:39.660" UserId="1430" Text="&gt; In an average game, there are hundreds&#xD;&#xA;&gt; or maybe thousands of obects in the&#xD;&#xA;&gt; scene. Is it completely correct to&#xD;&#xA;&gt; allocate memory for all objects,&#xD;&#xA;&gt; includiding gun shots(bullets),&#xD;&#xA;&gt; dynamically via default new()?&#xD;&#xA;&#xD;&#xA;That really depends what you mean by &quot;correct.&quot; If you take the term quite literally (and ignore any concept of correctness of the implied design) then yes, it is perfectly acceptable. Your program will compile and run fine.&#xD;&#xA;&#xD;&#xA;It may perform sub-optimally, but it still may also perform well enough to be a shippable, fun game.&#xD;&#xA;&#xD;&#xA;&gt; Should I create any memory pool for&#xD;&#xA;&gt; dynamic allocation, or is there no&#xD;&#xA;&gt; need to bother with this? What if the&#xD;&#xA;&gt; target platform are mobile devices?&#xD;&#xA;&#xD;&#xA;Profile and see. In C++, for example, dynamically allocation on the heap is usually a &quot;slow&quot; operation (in that it involves walking through the heap looking for a block of appropriate size). In C#, it's usually an extremely fast operation because it involves little more than an increment. Different language implementations have different performance characteristics with respect to memory allocation, fragmentation upon release, et cetera.&#xD;&#xA;&#xD;&#xA;Implementing a memory pooling system can certainly bring about performance gains -- and since mobile systems are usually underpowered relative to desktop systems, you may see more of a gain on a particular mobile platform than you would on a desktop. But again, you'd have to profile and see -- if, currently, your game is slow but memory allocation/release doesn't show up on the profiler as a hot spot, implementing infrastructure to optimize memory allocation and access probably won't get you much bang for your buck.&#xD;&#xA;&#xD;&#xA;&gt; Is there a need for a memory manager&#xD;&#xA;&gt; in a mobile game, please? Thank you.&#xD;&#xA;&#xD;&#xA;Again, profile and see. Is your game running fine now? Then you may not need to worry.&#xD;&#xA;&#xD;&#xA;All of that cautionary-speak aside, using dynamic allocation for everything isn't strictly speaking *necessary* and so it can be advantageous to avoid it -- both because of the potential performance gains, and because allocating memory that you need to track and eventually release means you have to track and eventually release it, possibly complicating your code.&#xD;&#xA;&#xD;&#xA;In particular, in your original example you cited &quot;bullets,&quot; which tend to be something that get created and destroyed frequently -- because many games involve lots of bullets, and bullets move fast and thus reach the end of their lifetime quickly (and often violently!). So implementing a pool allocator for them and objects like them (such as particles in a particle system) can usually result in efficiency gains and would likely be the first place to start looking at using pool allocation.&#xD;&#xA;&#xD;&#xA;I am unclear if you are considering a memory pool implementation to be distinct from a &quot;memory manager&quot; -- a memory pool is a relatively well-defined concept, so I can say with some certainty that they can be a benefit if you implement them. A &quot;memory manager&quot; is a bit more vague in terms of its responsibility, so I would have to say that whether or not one is required depends on what you think that &quot;memory manager&quot; would do.&#xD;&#xA;&#xD;&#xA;For example if you consider a memory manager to be a thing that just intercepts calls to new/delete/free/malloc/whatever and provides diagnostics on how much memory you allocate, what you leak, et cetera -- then that can be a useful tool for the game while it's in development to help you debug leaks and tune your optimal memory pool sizes, and so on." />
  <row Id="16716" PostHistoryTypeId="5" PostId="8206" RevisionGUID="9ab562df-dcec-49c6-a034-db9c1ba4170f" CreationDate="2011-02-06T19:52:27.973" UserId="1430" Comment="spelling and grammar" Text="In an average game, there are hundreds or maybe thousands of objects in the scene. &#xD;&#xA;Is it completely correct to allocate memory for all objects, including gun shots (bullets), **dynamically via default *new()*?**&#xD;&#xA;&#xD;&#xA;Should I create any **memory pool for dynamic allocation**, or is there no need to bother with this? What if the target platform are mobile devices?&#xD;&#xA;&#xD;&#xA;Is there a need for a **memory manager** in a mobile game, please? Thank you.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16717" PostHistoryTypeId="5" PostId="8192" RevisionGUID="5c88d429-5fbc-4d68-a429-d4d913094a1f" CreationDate="2011-02-06T20:05:45.483" UserId="953" Comment="added 340 characters in body" Text="That makes me think about board games, like Go or Checkers, and puzzley things involving pentaminos or other interesting configurations of uniform parts.  I'd stay away from heavily spatial games as well as the text-heavy.  Your game pretty much has to be abstract.  With 8x8 rez, you might be able to do something as spatial as Sakoban, but I have my doubts.&#xD;&#xA;&#xD;&#xA;To be clear here: none of the games named above will work very well.  You'll need to create your own game and rules, but I'd suggest keeping the above games in mind when you do so.  Simple world states that display easily, but more complex mechanics behind-the-scenes.  Your game won't be able to have much metaphor, so I'd stay abstract." />
  <row Id="16718" PostHistoryTypeId="25" PostId="8206" RevisionGUID="75c77365-e2aa-4d10-b12a-97932f296484" CreationDate="2011-02-06T20:16:17.970" Comment="http://twitter.com/#!/StackGameDev/status/34344652551225344" />
  <row Id="16719" PostHistoryTypeId="2" PostId="8208" RevisionGUID="5149d3de-5712-42a5-b752-1c7f92bf9bbd" CreationDate="2011-02-06T20:31:21.817" UserId="4822" Text="I'm learning iPhone development and a friend will be doing the graphics/animation. I'll be using cocos2d most likely (if that matters).&#xD;&#xA;&#xD;&#xA;My friend wants to get started on the graphics, and I don't know what image resolution or dpi or formats are recommended.&#xD;&#xA;&#xD;&#xA;This probably depends on if something is a background vs. a small character.&#xD;&#xA;&#xD;&#xA;Also, I know I read something about using @2x in image file names to support high res iphone screens. Does cocos2d prefer a different way? Or is this not something to worry about at this point?&#xD;&#xA;&#xD;&#xA;What should I know before they start working on the graphics?" />
  <row Id="16720" PostHistoryTypeId="1" PostId="8208" RevisionGUID="5149d3de-5712-42a5-b752-1c7f92bf9bbd" CreationDate="2011-02-06T20:31:21.817" UserId="4822" Text="iPhone image asset recommended resolution/dpi/format" />
  <row Id="16721" PostHistoryTypeId="3" PostId="8208" RevisionGUID="5149d3de-5712-42a5-b752-1c7f92bf9bbd" CreationDate="2011-02-06T20:31:21.817" UserId="4822" Text="&lt;iphone&gt;&lt;graphics&gt;&lt;animation&gt;&lt;cocos2d-iphone&gt;&lt;fo&gt;" />
  <row Id="16722" PostHistoryTypeId="2" PostId="8209" RevisionGUID="071a10c0-348c-467e-accc-1b90b2acffed" CreationDate="2011-02-06T20:57:51.567" UserId="4264" Text="Since you listed OpenGL as a tag, and nobody else has linked to it yet, the &lt;a href=&quot;http://www.opengl.org/documentation/books/#the_opengl_shading_language&quot;&gt;OpenGL shading language&lt;/a&gt; (aka. orange book) is a pretty good resource. It covers the shading language, as well as plenty of use cases." />
  <row Id="16723" PostHistoryTypeId="5" PostId="8155" RevisionGUID="6e0b6de3-d83d-4d5a-8db0-0fcd9b679357" CreationDate="2011-02-06T21:06:15.993" UserId="2560" Comment="added 77 characters in body" Text="I'm taking a class on compilers, and the goal is to write a compiler for &lt;a href=&quot;http://www.evilmadscientist.com/article.php/meggyjr&quot;&gt;Meggy Jr devices&lt;/a&gt; (Arduino). The goal is just to make a simple compilers with loops and variables and stuff.&#xD;&#xA;&#xD;&#xA;Obviously, that's lame, so the &quot;real goal&quot; is to make an impressive game on the device. The problem is that it only has 64 pixels to work with (technically 72, but the top 8 are single-color and not part of the main display, so they're really only useful for displaying things like money).&#xD;&#xA;&#xD;&#xA;My problem is thinking of something to do on a device that small. It doesn't really matter if it's original, but it can't be something that's already available. My first idea was &quot;snake&quot;, but that comes with the SDK. Same with a side-scrolling shooter.&#xD;&#xA;&#xD;&#xA;Remaining ideas include a tower defense game (hard to write, hard to control), an RPG (same), tetris (lame)..&#xD;&#xA;&#xD;&#xA;The problem is that all of the games I like require a high-resolution screen because they have a lot of text. Even a really simple game like nethack would be hard because each creature would be a single color.&#xD;&#xA;&#xD;&#xA;tl;dr What styles of games require a. No text; and b. Few enough objects that representing them each with a single color is acceptable?&#xD;&#xA;&#xD;&#xA;EDIT: To clarify, the display is 8x8 for a total of 64 pixels, not 64x64." />
  <row Id="16724" PostHistoryTypeId="2" PostId="8210" RevisionGUID="7554b429-da51-4228-9b70-a544bce2dbfa" CreationDate="2011-02-06T21:15:40.313" UserId="2229" Text="Scene graph contains game nodes representing game objects. At a first glance, it might seem practical to use Scene Graph as physical container for in game objects, instead of std::vector&lt;&gt; for example.&#xD;&#xA;&#xD;&#xA;My question is, **is it practical to use Scene Graph to contain the game objects**, or should it be used only to define scene objects/nodes linkages, while keepig the objects stored in separate container, such as std::vector&lt;&gt;?" />
  <row Id="16725" PostHistoryTypeId="1" PostId="8210" RevisionGUID="7554b429-da51-4228-9b70-a544bce2dbfa" CreationDate="2011-02-06T21:15:40.313" UserId="2229" Text="Scene Graph as Object Container?" />
  <row Id="16726" PostHistoryTypeId="3" PostId="8210" RevisionGUID="7554b429-da51-4228-9b70-a544bce2dbfa" CreationDate="2011-02-06T21:15:40.313" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;vector&gt;&lt;scene-graph&gt;" />
  <row Id="16727" PostHistoryTypeId="5" PostId="7621" RevisionGUID="26521c45-4370-4553-8343-8a5f2cdfe6f2" CreationDate="2011-02-06T21:32:47.950" UserId="1430" Comment="removing duplication in wiki body, linking to app hub instead" Text="**How Do I Get Started With XNA?**&#xD;&#xA;&#xD;&#xA;Microsoft's [App Hub][1] site provides access to the XNA SDK, tools, samples and educational resources.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/" />
  <row Id="16728" PostHistoryTypeId="6" PostId="8210" RevisionGUID="36ae340d-17c9-4be7-a108-c7b178de083e" CreationDate="2011-02-06T21:42:41.597" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;scene-graph&gt;" />
  <row Id="16729" PostHistoryTypeId="6" PostId="8206" RevisionGUID="872d4bdc-6566-46a1-9a5e-3b04bef262e0" CreationDate="2011-02-06T21:45:33.213" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;mobile&gt;&lt;memory-efficiency&gt;" />
  <row Id="16730" PostHistoryTypeId="2" PostId="8211" RevisionGUID="e85cc80b-ac11-4415-9549-c0b80285ecc5" CreationDate="2011-02-06T22:06:48.263" UserId="3503" Text="Game of life can be a good example for such low res devices. I have seen video where this game was made on LED cube" />
  <row Id="16731" PostHistoryTypeId="2" PostId="8212" RevisionGUID="33311e8e-8c94-45d3-b902-451ff9f82b13" CreationDate="2011-02-06T22:08:05.393" UserId="51" Text="Why are you doing the math at all instead of a helper function or two?&#xD;&#xA;&#xD;&#xA;For example, &lt;a href=&quot;http://unity3d.com/support/documentation/ScriptReference/Quaternion.LookRotation.html&quot;&gt;`Quaternion.LookRotation( Vector3 forward )`&lt;/a&gt;" />
  <row Id="16732" PostHistoryTypeId="2" PostId="8213" RevisionGUID="c413f2ed-c5e3-424b-b9ad-eb9d406ccd36" CreationDate="2011-02-06T22:10:30.317" UserId="1101" Text="I don't have much to add to Josh's excellent answer, but I'll comment on this:&#xD;&#xA;&#xD;&#xA;&gt; Should I create any memory pool for dynamic allocation, or is there no need to bother with this?&#xD;&#xA;&#xD;&#xA;There is a middle ground between memory pools and calling `new` on each allocation. For example, you can allocate a set number of objects in an array, then set a flag on them to 'destroy' them later. When you need to allocate more, you can overwrite the ones with the destroyed flag set. This kind of thing is only slightly more complex to use than new/delete (as you would have 2 new functions for that purpose) but is simple to write and can give you big gains." />
  <row Id="16733" PostHistoryTypeId="5" PostId="8206" RevisionGUID="cad8546c-6a32-42cf-94c4-79785d30a9a9" CreationDate="2011-02-06T23:01:50.173" UserId="2229" Comment="added 105 characters in body; deleted 11 characters in body" Text="In an average game, there are hundreds or maybe thousands of objects in the scene. &#xD;&#xA;Is it completely correct to allocate memory for all objects, including gun shots (bullets), **dynamically via default *new()*?**&#xD;&#xA;&#xD;&#xA;Should I create any **memory pool for dynamic allocation**, or is there no need to bother with this? What if the target platform are mobile devices?&#xD;&#xA;&#xD;&#xA;Is there a need for a **memory manager** in a mobile game, please? Thank you.&#xD;&#xA;&#xD;&#xA;*Language Used: C++; &#xD;&#xA;Currently developed under Windows, but planned to be ported later.*&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16734" PostHistoryTypeId="2" PostId="8214" RevisionGUID="edb74e36-b72a-4015-bd3e-ee540cee1866" CreationDate="2011-02-06T23:04:24.083" UserId="5174" Text="How were 2d and 3d art assets typically created in the early-to-mid 1990's (16-bit and 32-bit eras?) " />
  <row Id="16735" PostHistoryTypeId="1" PostId="8214" RevisionGUID="edb74e36-b72a-4015-bd3e-ee540cee1866" CreationDate="2011-02-06T23:04:24.083" UserId="5174" Text="How were art assets created in the late 16-bit/early 32-bit era?" />
  <row Id="16736" PostHistoryTypeId="3" PostId="8214" RevisionGUID="edb74e36-b72a-4015-bd3e-ee540cee1866" CreationDate="2011-02-06T23:04:24.083" UserId="5174" Text="&lt;assets&gt;&lt;art&gt;&lt;asset-creation&gt;" />
  <row Id="16737" PostHistoryTypeId="2" PostId="8215" RevisionGUID="84f7ae26-4f30-4215-b429-c4691ecd35fe" CreationDate="2011-02-06T23:13:02.517" UserId="4410" Text="For 2D, [Deluxe Paint][1] was pretty popular in those days.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Deluxe_Paint" />
  <row Id="16738" PostHistoryTypeId="25" PostId="8210" RevisionGUID="caf34dda-4fde-4902-b368-e432263acfb7" CreationDate="2011-02-06T23:16:17.500" Comment="http://twitter.com/#!/StackGameDev/status/34389949323153408" />
  <row Id="16739" PostHistoryTypeId="5" PostId="8215" RevisionGUID="de8de6ad-8e1d-4959-a277-8d6e0632076c" CreationDate="2011-02-06T23:54:00.290" UserId="4410" Comment="Added some more info on 3D packages" Text="For 2D, [Deluxe Paint][1] was pretty popular in those days.&#xD;&#xA;&#xD;&#xA;For 3D, [3D Studio][2] was around on the PC (eventually becomming Autodesk 3D Studio Max later in it's life). On the Amiga you had [Lightwave][3] (which was also used for TV and film). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Deluxe_Paint&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Autodesk_3ds_Max&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Lightwave" />
  <row Id="16740" PostHistoryTypeId="2" PostId="8216" RevisionGUID="aaa43485-5a08-4234-b73e-9ffb1367fc30" CreationDate="2011-02-07T00:54:45.807" UserId="4662" Text="&gt; Is it completely correct to allocate&#xD;&#xA;&gt; memory for all objects, including gun&#xD;&#xA;&gt; shots (bullets), dynamically via&#xD;&#xA;&gt; default new()?&#xD;&#xA;&#xD;&#xA;No, of course not. No memory allocation is correct for *all* objects. operator new() is for *dynamic* allocation, that is, it is appropriate only if you need the allocation to be dynamic, either because the object's lifetime is dynamic or because the type of the object is dynamic. If the type and lifetime of the object are known statically, you should allocate it statically.&#xD;&#xA;&#xD;&#xA;Of course, the more information you have about your allocation patterns, the faster these allocations can be made via specialist allocators, such as object pools. But, these are optimizations and you should only make them if they're known to be necessary." />
  <row Id="16741" PostHistoryTypeId="25" PostId="8214" RevisionGUID="1bc29622-b129-47cc-988f-1dd2038e5eac" CreationDate="2011-02-07T02:16:17.813" Comment="http://twitter.com/#!/StackGameDev/status/34435248666189824" />
  <row Id="16742" PostHistoryTypeId="2" PostId="8217" RevisionGUID="5629b877-992f-49db-96b5-f62273b8b09a" CreationDate="2011-02-07T03:40:16.050" UserId="409" Text="I can't speak to anything Cocos2D related, but for UIKit you want your images to be 72 DPI.  The iPhone, iPhone 3G and iPhone 3GS have a native resolution of 320 x 480.  The iPhone 4 has a native resolution of 640 x 960, which is exactly double the size of the older devices.&#xD;&#xA;&#xD;&#xA;To make it easier for developers, they play a trick with how graphics are handled in iOS.  You don't deal in Pixels, you deal in &quot;points&quot;.  The iPhone screen is 320 x 480 *points*, no matter what model it is.  If you have an image that's 320 x 480 *pixels*, it's drawn at native resolution on the iPhone 3G, and it's doubled to fill the size of the iPhone 4.&#xD;&#xA;&#xD;&#xA;To get even more clear images on the iPhone 4, you can also provide @2x images that are the correct size to match the native iPhone 4 screen.  As an example, if you have an image called `AvatarIcon.png` on your app that's 100 x 50 pixels.  You could also create on called `AvatarIcon@2x.png` that's 200 x 100 pixels.  Now you get a crisp image on both the iPhone 3G and the iPhone 4.&#xD;&#xA;&#xD;&#xA;Make sense?" />
  <row Id="16743" PostHistoryTypeId="2" PostId="8218" RevisionGUID="c6973582-ac95-48fd-b3fb-9561533a256e" CreationDate="2011-02-07T04:10:01.653" UserId="409" Text="I'm not aware of any easy way to make an App that will run on the iPhone, Android *and* Facebook unless you go straight HTML5.&#xD;&#xA;&#xD;&#xA;For iPhone and Android cross-platform development you have a lot of options.  Here are just a few:&#xD;&#xA;&#xD;&#xA; - PhoneGap&#xD;&#xA; - Titanium&#xD;&#xA; - RhoMobile&#xD;&#xA; - Corona" />
  <row Id="16744" PostHistoryTypeId="2" PostId="8219" RevisionGUID="1a4e4128-c1a0-4233-ab5a-bb79e54d3414" CreationDate="2011-02-07T04:58:39.750" UserId="182" Text="The common approach for taking advantage of multiple cores is, frankly, just plain misguided. Separating your subsystems into different threads will indeed split up some of the work across multiple cores, but it has some major problems. First, it's very hard to work with. Who wants to muck around with locks and synchronization and communication and stuff when they could just be writing straight up rendering or physics code instead? Second, the approach doesn't actually scale up. At best, this will allow you to take advantage of maybe three or four cores, and that's if you *really* know what you're doing. There are only so many subsystems in a game, and of those there are even fewer that take up large chunks of CPU time. There are a couple good alternatives that I know.&#xD;&#xA;&#xD;&#xA;One is to have a main thread along with a worker thread for each additional CPU. Regardless of subsystem, the main thread delegates isolated tasks to the worker threads via some sort of queue(s); these tasks may themselves create yet other tasks, as well. The sole purpose of the worker threads is to each grab tasks from the queue one at a time and perform them. The most important thing, though, is that as soon as a thread needs the result of a task, if the task is completed it can get the result, and if not it can safely remove the task from the queue and go ahead and perform that task itself. That is, not all tasks will end up being scheduled in parallel with each other. Having more tasks than can be executed in parallel is a *good* thing in this case; it means that it is likely to scale as you add more cores. One downside to this is that it requires a lot of work up front to design a decent queue and worker loop unless you have access to a library or language runtime that already provides this for you. The hardest part is making sure your tasks are truly isolated and thread safe, and making sure your tasks are in a happy middle ground between coarse-grained and fine-grained.&#xD;&#xA;&#xD;&#xA;Another alternative to subsystem threads is to parallelize each subsystem in isolation. That is, instead of running rendering and physics in their own threads, write the physics subsystem to use all your cores at once, write the rendering subsystem to use all your cores at once, then have the two systems simply run sequentially (or interleaved, depending on other aspects of your game architecture). For example, in the physics subsystem you could take all the point masses in the game, divide them up among your cores, and then have all the cores update them at once. Each core can then work on your data in tight loops with good locality. This lock-step style of parallelism is similar to what a GPU does. The hardest part here is in making sure that you are dividing your work up into fine-grained chunks such that dividing it evenly *actually* results in an equal amount of work across all processors.&#xD;&#xA;&#xD;&#xA;However, sometimes it's just easiest, due to politics, existing code, or other frustrating circumstances, to give each subsystem a thread. In that case, it's best to avoid making more software threads than hardware threads. Also, avoid excessive communication. Once nice trick is to try pipelining; each major subsystem can be working on a different game state at a time. Pipelining reduces the amount of communication necessary among your subsystems since they don't all need access to the same data at the same time, and it also can nullify some of the damage caused by bottlenecks. For example, if your physics subsystem tends to take a long time to complete and your rendering subsystem ends up always waiting for it, your absolute frame rate could be higher if you run the physics subsystem for the next frame while the rendering subsystem is still working on the previous frame. In fact, if you have such bottlenecks and can't remove them any other way, pipelining may be the most legitimate reason to bother with subsystem threads." />
  <row Id="16745" PostHistoryTypeId="25" PostId="8205" RevisionGUID="1fa0fde4-b700-480d-98a0-488c24fe7bec" CreationDate="2011-02-07T05:16:18.050" Comment="http://twitter.com/#!/StackGameDev/status/34480548361535488" />
  <row Id="16746" PostHistoryTypeId="25" PostId="8208" RevisionGUID="bad38644-f800-42eb-b613-28cd86c96f12" CreationDate="2011-02-07T08:16:17.550" Comment="http://twitter.com/#!/StackGameDev/status/34525844680482816" />
  <row Id="16747" PostHistoryTypeId="2" PostId="8220" RevisionGUID="821bc44b-9ddf-4aa0-90a0-3187682f63b8" CreationDate="2011-02-07T08:25:00.337" UserId="1217" Text="I'm making a simple top-down tank game on the ipad where the user controls the movement of the tank with the left &quot;joystick&quot; and the rotation of the turret with the right one. I've spent several hours just trying to get it to work decently but now I turn to the pros :)&#xD;&#xA;&#xD;&#xA;I have two referencial objects, one for the movement and one for the rotation. The referencial objects always stay max two units away from the tank and I use them to tell the tank in what direction to move. I chose this approach to decouple movement and rotational behaviour from the raw input of the joysticks, I believe this will make it simpler to implement whatever behaviour I want for the tank. &#xD;&#xA;&#xD;&#xA;My problem is 1; the turret rotates the long way to the target. With this I mean that the target can be -5 degrees away in rotation and still it rotates 355 degrees instead of -5 degrees. I can't figure out why. The other problem is with the movement. It just doesn't feel right to have the tank turn while moving. I'd like to have a solution that would work as well for the AI as for the player. A blackbox function for the movement where the player only specifies in what direction it should move and it moves there under the constraints that are imposed on it. &#xD;&#xA;&#xD;&#xA;I am using the standard joystick class found in the Unity iPhone package.&#xD;&#xA;&#xD;&#xA;This is the code I'm using for the movement:&#xD;&#xA;&#xD;&#xA;    public class TankFollow : MonoBehaviour {&#xD;&#xA;	//Check angle difference and turn accordingly&#xD;&#xA;	&#xD;&#xA;	public GameObject followPoint;&#xD;&#xA;	public float speed;&#xD;&#xA;	public float turningSpeed;&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;	void Update()&#xD;&#xA;	{&#xD;&#xA;		transform.position = Vector3.Slerp(transform.position, followPoint.transform.position, speed * Time.deltaTime);&#xD;&#xA;		//Calculate angle&#xD;&#xA;		var forwardA = transform.forward;&#xD;&#xA;		var forwardB = (followPoint.transform.position - transform.position);&#xD;&#xA;		&#xD;&#xA;		var angleA = Mathf.Atan2(forwardA.x, forwardA.z) * Mathf.Rad2Deg;&#xD;&#xA;		var angleB = Mathf.Atan2(forwardB.x, forwardB.z) * Mathf.Rad2Deg;&#xD;&#xA;		&#xD;&#xA;		var angleDiff = Mathf.DeltaAngle(angleA, angleB);&#xD;&#xA;		//print(angleDiff.ToString());&#xD;&#xA;		if (angleDiff &gt; 5) {&#xD;&#xA;			//Rotate to &#xD;&#xA;			transform.Rotate(new Vector3(0, (-turningSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else if (angleDiff &lt; 5) {&#xD;&#xA;			transform.Rotate(new Vector3(0, (turningSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		transform.position = new Vector3(transform.position.x, 0, transform.position.z);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;And this is the code I'm using to rotate the turret:&#xD;&#xA;&#xD;&#xA;    	void LookAt()&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		var forwardA = -transform.right;&#xD;&#xA;		var forwardB = (toLookAt.transform.position - transform.position);&#xD;&#xA;		&#xD;&#xA;		var angleA = Mathf.Atan2(forwardA.x, forwardA.z) * Mathf.Rad2Deg;&#xD;&#xA;		var angleB = Mathf.Atan2(forwardB.x, forwardB.z) * Mathf.Rad2Deg;&#xD;&#xA;		&#xD;&#xA;		var angleDiff = Mathf.DeltaAngle(angleA, angleB);&#xD;&#xA;		//print(angleDiff.ToString());&#xD;&#xA;		if (angleDiff - 180 &gt; 1) {&#xD;&#xA;			//Rotate to &#xD;&#xA;			transform.Rotate(new Vector3(0, (turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else if (angleDiff - 180 &lt; -1) {&#xD;&#xA;			transform.Rotate(new Vector3(0, (-turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			print((angleDiff - 180).ToString());&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Since I want the turret reference point to turn in relation to the tank (when you rotate the body, the turret should follow and not stay locked on since it makes it impossible to control when you've got two thumbs to work with), I've made the TurretFollowPoint a child of the Turret object, which in turn is a child of the body. I'm thinking that I'm making it too difficult for myself with the reference points but I'm imagining that it's a good idea. Please be honest about this point.&#xD;&#xA;&#xD;&#xA;So I'll be grateful for any help I can get!&#xD;&#xA;&#xD;&#xA;I'm using Unity3d iPhone. Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16748" PostHistoryTypeId="1" PostId="8220" RevisionGUID="821bc44b-9ddf-4aa0-90a0-3187682f63b8" CreationDate="2011-02-07T08:25:00.337" UserId="1217" Text="2d movement solution" />
  <row Id="16749" PostHistoryTypeId="3" PostId="8220" RevisionGUID="821bc44b-9ddf-4aa0-90a0-3187682f63b8" CreationDate="2011-02-07T08:25:00.337" UserId="1217" Text="&lt;unity&gt;&lt;vector&gt;&lt;movement&gt;&lt;rotation&gt;" />
  <row Id="16750" PostHistoryTypeId="2" PostId="8221" RevisionGUID="a70ca5ef-ee25-4d61-8649-47e024940157" CreationDate="2011-02-07T08:40:15.480" UserId="5224" Text="As a learning exercise I've written a deferred rendering engine. Now I'd like to add a scene graph to this engine but I'm a bit puzzled how to do this.&#xD;&#xA;&#xD;&#xA;On a normal (forward rendering engine) I would just add all items (All implementing IDrawable and IUpdateAble) to my scene graph, than travel the scene-graph breadth first and call Draw() everywhere.&#xD;&#xA;&#xD;&#xA;However in a deferred rendering engine I have to separate draw calls. First I have to draw the geometry, then the shadow casters and then the lights (all to different render targets), before I combine them all. So in this case I can't just travel over the scene graph and just call draw. The way I see it I either have to travel over the entire scene graph 3 times, checking what kind of object it is that has to be drawn, or I have to create 3 separate scene graphs that are somehow connected to each other. Both of these seem poor solutions, I'd like to handle scene objects more transparent.&#xD;&#xA;&#xD;&#xA;One other solution I've thought of was traveling trough the scene graph as normal and adding items to 3 separate lists, separating geometry, shadow casters and lights, and then iterating these lists to draw the correct stuff, is this better, and is it wise to repopulate 3 lists every frame?" />
  <row Id="16751" PostHistoryTypeId="1" PostId="8221" RevisionGUID="a70ca5ef-ee25-4d61-8649-47e024940157" CreationDate="2011-02-07T08:40:15.480" UserId="5224" Text="Scene Graph for Deferred Rendering Engine" />
  <row Id="16752" PostHistoryTypeId="3" PostId="8221" RevisionGUID="a70ca5ef-ee25-4d61-8649-47e024940157" CreationDate="2011-02-07T08:40:15.480" UserId="5224" Text="&lt;xna&gt;&lt;c#&gt;&lt;scene-graph&gt;" />
  <row Id="16753" PostHistoryTypeId="5" PostId="7952" RevisionGUID="1b6656a8-eb38-4e35-9494-56f254c61504" CreationDate="2011-02-07T08:53:24.677" UserId="5076" Comment="More points, and asked about the different data storage available out there" Text="&gt; *Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.* &#xD;&#xA;&gt; - **Chinese Proverb**&#xD;&#xA;&#xD;&#xA;I could ask what kind of data storage I should use for my actual project, but I want to learn to _fish_, so I don't need to ask for a _fish_ each time I begin a new project.&#xD;&#xA;&#xD;&#xA;So, until I used two methods to store data on my non-game project: XML files, and relational databases. I know that there is also other kind of database, of the _NoSQL_ kind. However I wouldn't know if there is more choice available to me, or how to choose in the first place, aside arbitrary picking one.&#xD;&#xA;&#xD;&#xA;So the question is the following: How should I choose the kind of data storage for a game project?&#xD;&#xA;&#xD;&#xA;And I would be interested on the following criterion when choosing:&#xD;&#xA;  &#xD;&#xA;- The size of the project.&#xD;&#xA;- The platform targeted by the game, as well as the development platform used.&#xD;&#xA;- The complexity of the data structure.&#xD;&#xA;- *Added* Portability of data amongst many project.&#xD;&#xA;- *Added2* Silmutaneous use of the data amongst different project. (i.e. User data)&#xD;&#xA;- *Added* How often should the data be accessed&#xD;&#xA;- *Added* Multiple type of data for a same application&#xD;&#xA;- *Added2* Configuration with multiple data storage.&#xD;&#xA;- Any other point you think is of interest when deciding what to use.&#xD;&#xA;&#xD;&#xA;__EDIT__ I know about [Would it be better to use XML/JSON/Text or a database to store game content?][1], but thought it didn't address exactly my point. Now if I am wrong, I would gladely be shown the error in my ways.&#xD;&#xA;&#xD;&#xA;__EDIT2__ Added some more points that I would consider relevant. Furthermore, I would be interested to hear what other options are available, aside flat file storage and relational database. What about non-relational database, for example? When it is relevant to use such a database over the formerly mentioned other options?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4666/would-it-be-better-to-use-xml-json-text-or-a-database-to-store-game-content" />
  <row Id="16754" PostHistoryTypeId="6" PostId="8208" RevisionGUID="0781a3d3-1004-4249-b007-a22599ab5c05" CreationDate="2011-02-07T10:08:53.490" UserId="20" Comment="tag removed" Text="&lt;iphone&gt;&lt;graphics&gt;&lt;animation&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="16755" PostHistoryTypeId="2" PostId="8222" RevisionGUID="3c6d1fcd-db3f-4bdd-8b54-7d9e50fb7d0f" CreationDate="2011-02-07T10:17:55.303" UserId="4129" Text="An approach I've used in a C++ project is that the scene-graph (which has the spatial index) fills up a 'visible' std::vector of hits based on the current frustum (this list is incidentally managed by the scene-graph so is only recalculated when the camera moves - moving objects in the graph are moved in this list).&#xD;&#xA;&#xD;&#xA;The list of visible items is sorted by shader-ID first and within each type by distance from camera.  The shader IDs are assigned such that terrain sorts first and then buildings and then units and then projectiles and then particles and so on - it being an RTS.  Some models have more than one shader, but they only advertise their primary shader.  When they are asked to draw, those which need bits drawn with another shader too add themselves to a next-pass single linked list.&#xD;&#xA;&#xD;&#xA;So drawing goes through the visible array in one pass, and in that one pass a linked list of those items to revisit is created, and they get drawn a second pass and so on.&#xD;&#xA;&#xD;&#xA;Drawing front-to-back and opaque-then-transparent helps keep everything sane.&#xD;&#xA;&#xD;&#xA;This is perhaps not minimising the number of shader changes etc but it is fairly workable and straightforward to implement.&#xD;&#xA;&#xD;&#xA;I have no idea about XNA and how applicable this is and how much of this low-level stuff you create I'm afraid.  It would be most interesting to know what the veterans think of this approach for C++ RTSes however." />
  <row Id="16756" PostHistoryTypeId="5" PostId="8222" RevisionGUID="4921b940-30bd-4a81-b14f-33f068a4281b" CreationDate="2011-02-07T10:35:58.407" UserId="4129" Comment="added 95 characters in body" Text="An approach I've used in a C++ project is that the scene-graph (which has the spatial index) fills up a 'visible' std::vector of hits based on the current viewing frustum.  This visible list is managed by the scene-graph so is only recalculated when the camera moves - moving objects in the graph are moved in this list and using tombstones and unsorted change-lists that get sorted and merged back in as-needed.&#xD;&#xA;&#xD;&#xA;The list of visible items is sorted by shader-ID first and within each type by distance from camera.  The shader IDs are assigned such that terrain sorts first and then buildings and then units and then projectiles and then particles and so on - it being an RTS.  Some models have more than one shader, but they only advertise their primary shader.  When they are asked to draw, those which need bits drawn with another shader too add themselves to a next-pass single linked list.&#xD;&#xA;&#xD;&#xA;So drawing goes through the visible array in one pass, and in that one pass a linked list of those items to revisit is created, and they get drawn a second pass and so on.&#xD;&#xA;&#xD;&#xA;Drawing front-to-back and opaque-then-transparent helps keep everything sane.&#xD;&#xA;&#xD;&#xA;This is perhaps not minimising the number of shader changes etc but it is fairly workable and straightforward to implement.&#xD;&#xA;&#xD;&#xA;I have no idea about XNA and how applicable this is and how much of this low-level stuff you create I'm afraid.  It would be most interesting to know what the veterans think of this approach for C++ RTSes however." />
  <row Id="16757" PostHistoryTypeId="2" PostId="8223" RevisionGUID="9c4db0de-1c8a-463e-ab74-a8b061e2a146" CreationDate="2011-02-07T12:06:32.480" UserId="1143" Text="Why use one method of data storage?&#xD;&#xA;&#xD;&#xA;In most cases, the game you release to the world does not need the same data storage functionality that the game needs during development.&#xD;&#xA;&#xD;&#xA;Here's a comparison of some release / development requirements:-&#xD;&#xA;&#xD;&#xA;    Requirement      |  Release  |  Development  |  QA&#xD;&#xA;    ==================================================&#xD;&#xA;    Multi user       |    No     |      Yes      |  No&#xD;&#xA;    Writable         |    No     |      Yes      |  No&#xD;&#xA;    Revision Control |    No     |      Yes      | Yes (but only reading)&#xD;&#xA;    Compact          |   Yes     |       No      |  No&#xD;&#xA;    Fast             |   Yes     |       No      |  No&#xD;&#xA;&#xD;&#xA;Ideally then, you would define an interface to your data loading module and then create multiple versions, each tailored to specific needs.&#xD;&#xA;&#xD;&#xA;On one project I worked on many years back, loading level data off CD was taking far too long (off HD wasn't great either). So I came up with a the following. I had three methods for loading level data:-&#xD;&#xA;&#xD;&#xA;1. Normal loading - for development time when assets were changing&#xD;&#xA;2. Pre-release - effectively a method to convert normal data into fast loading data&#xD;&#xA;3. Release - fast data only (not editable)&#xD;&#xA;&#xD;&#xA;This reduced loading times from minutes to seconds." />
  <row Id="16758" PostHistoryTypeId="2" PostId="8224" RevisionGUID="338f5036-60b7-4f0e-8d59-59ffb1edd379" CreationDate="2011-02-07T12:39:37.617" UserId="5226" Text="How about Chess? An 8x8 grid with different colours should be fine for some chess." />
  <row Id="16759" PostHistoryTypeId="2" PostId="8225" RevisionGUID="ba2243a9-3dbb-410a-9e48-f18af92e77b9" CreationDate="2011-02-07T12:53:43.470" UserId="1352" Text="What about a reflex game? Kind of like [2player reactor][1] for Android phones.&#xD;&#xA;&#xD;&#xA;You could also look to the Wario Ware games for inspiration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.appbrain.com/app/2-player-reactor/coolcherrytrees.games.reactor" />
  <row Id="16760" PostHistoryTypeId="25" PostId="8221" RevisionGUID="329c55e4-aab9-4dc8-acd8-0f7049b90a9d" CreationDate="2011-02-07T14:16:18.530" Comment="http://twitter.com/#!/StackGameDev/status/34616443505090560" />
  <row Id="16761" PostHistoryTypeId="2" PostId="8226" RevisionGUID="597bdb89-03ee-4463-9e77-6a58f293b0e7" CreationDate="2011-02-07T14:45:42.623" UserId="2188" Text="[Wolfenstein 1-D][1]&#xD;&#xA;&#xD;&#xA;While it uses 1px height, its width is way longer than 8px, so you'd probably have to come up with something.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wonder-tonic.com/wolf1d/" />
  <row Id="16765" PostHistoryTypeId="6" PostId="8208" RevisionGUID="15574bb7-913f-4f0c-81ad-8afbb3eba7fe" CreationDate="2011-02-07T15:18:20.117" UserId="4822" Comment="edited tags" Text="&lt;iphone&gt;&lt;graphics&gt;&lt;animation&gt;&lt;cocos2d-iphone&gt;&lt;file-format&gt;" />
  <row Id="16766" PostHistoryTypeId="2" PostId="8228" RevisionGUID="e632e9ce-007c-4010-bf15-18911aef276c" CreationDate="2011-02-07T15:30:19.117" UserId="5007" Text="I need to know an efficient way to cull the scene graph objects, to render exclusively the ones in the view, and as fast as possible.&#xD;&#xA;&#xD;&#xA;I am thinking of doing it the following way, having in each object a local boundingbox which holds the object bounds, and a global boundingbox which holds the bounds of the object and all children. &#xD;&#xA;&#xD;&#xA;When a camera is moved, the render list is updated by traversing the global boundingboxes.&#xD;&#xA;When only the object is being moved, it tries to enlarge or shrink the ancestors global boundingboxes, and in the end updating or not the renderlist.&#xD;&#xA;&#xD;&#xA;What do you think of this approach? Do you think it will provide a fast and efficient culling?&#xD;&#xA;&#xD;&#xA;Also, because the render list is a contiguous list, it could accelerate the rendering, right?&#xD;&#xA;&#xD;&#xA;Any further tips for a 2D scene graphs are highly appreciated!" />
  <row Id="16767" PostHistoryTypeId="1" PostId="8228" RevisionGUID="e632e9ce-007c-4010-bf15-18911aef276c" CreationDate="2011-02-07T15:30:19.117" UserId="5007" Text="What is a good practice for  2D scene graph partitioning for culling?" />
  <row Id="16768" PostHistoryTypeId="3" PostId="8228" RevisionGUID="e632e9ce-007c-4010-bf15-18911aef276c" CreationDate="2011-02-07T15:30:19.117" UserId="5007" Text="&lt;2d&gt;&lt;culling&gt;" />
  <row Id="16769" PostHistoryTypeId="2" PostId="8229" RevisionGUID="c4ea9689-9bd5-4fdc-a267-394d3f1076a2" CreationDate="2011-02-07T15:56:18.947" UserId="5231" Text="Alternatively, you can modify the shader used to update your particles so that it does the wind calculations on the GPU as well.  That way you have the added wind control, but don't lose the performance benefits of the GPU particle system.  Obviously there are limitations to what you can do with a GPU particle system, but adding wind shouldn't be one of them.  Good Luck!" />
  <row Id="16772" PostHistoryTypeId="2" PostId="8231" RevisionGUID="84c9d493-463b-4316-8070-2767b5ce098f" CreationDate="2011-02-07T16:03:54.537" UserId="2536" Text="Maya's preferred format for saving off a UV Snapshot is its own .IFF format, so I was hoping to find a plugin allowing Gimp 2 (Windows) to read it. I've found plenty of plugins for different linux distros, but none are win-friendly (that I can discern - admittedly I'm no whiz with Gimp). Does anyone know of one? &#xD;&#xA;&#xD;&#xA;Alternately, .tiff seems to work just fine, so if there's no good reason to bother fiddling with IFFs, I'd appreciate the input there, too.&#xD;&#xA;&#xD;&#xA;(sorry if this isn't on-topic)" />
  <row Id="16773" PostHistoryTypeId="1" PostId="8231" RevisionGUID="84c9d493-463b-4316-8070-2767b5ce098f" CreationDate="2011-02-07T16:03:54.537" UserId="2536" Text="Maya .IFF plugins for Gimp" />
  <row Id="16774" PostHistoryTypeId="3" PostId="8231" RevisionGUID="84c9d493-463b-4316-8070-2767b5ce098f" CreationDate="2011-02-07T16:03:54.537" UserId="2536" Text="&lt;windows&gt;&lt;gimp&gt;&lt;maya&gt;" />
  <row Id="16775" PostHistoryTypeId="2" PostId="8232" RevisionGUID="45a94762-f47b-47e1-a11b-d384006e9220" CreationDate="2011-02-07T16:12:18.750" UserId="4956" Text="Cannot comment so will answer&#xD;&#xA;&#xD;&#xA;I think what you are referring to is a QuadTree : http://en.wikipedia.org/wiki/Quadtree and from the article, it seems that this is a quick method. Looks also useful with regards to collision detection (a quick pass before going into the nitty gritty) as well as culling." />
  <row Id="16776" PostHistoryTypeId="2" PostId="8233" RevisionGUID="5e2f7a67-785f-44d6-b430-89cf78446e5a" CreationDate="2011-02-07T16:18:17.923" UserId="5233" Text="My suggestion would be a 2-step approach tailored to your specific requirements similar to what you described yourself. You need a scene graph and a &quot;render collection&quot; for each of the rendering steps, in your case shadow, geometry, lights (maybe a fourth being transparent objects?)&#xD;&#xA;&#xD;&#xA;The scene graph can be based on any type of relationships, but my personal preference would be based on spatial relationships where each node can contain the other nodes to facilitate fast culling.&#xD;&#xA;&#xD;&#xA;The render collections can be any type of data structure tailored to the specific step. For instance, the shadow collection could be a list or tree sorted by depth to maximize early-z rejection. The geometry collection could be sorted by shader usage to minimize shader (state) changes. The light collection could be a list or tree sorted by light distance, size or a combination of those so you can limit light rendering to only the most effective lights if performance is an issue.&#xD;&#xA;&#xD;&#xA;Whatever data structures you pick, be sure the insert operation is fast and make sure it uses pooling and other techniques to eliminate any allocation/destruction of data because you will be clearing and filling these lists each frame.&#xD;&#xA;&#xD;&#xA;Now tying it all together is easy. Just walk through the scene graph and add each item to the relevant render collection(s). It helps if your data structure automatically sorts/structures new entries based on the requirements. When you're done, go through the render collections in the required order and render them.&#xD;&#xA;&#xD;&#xA;Because your data structures have fast insert and don't generate garbage, there is no penalty for repopulating lists as you mentioned." />
  <row Id="16777" PostHistoryTypeId="5" PostId="8232" RevisionGUID="0ba4ec0c-ea6b-4ced-a5ad-28b73b4bd114" CreationDate="2011-02-07T16:19:06.400" UserId="4956" Comment="added 244 characters in body; added 79 characters in body; added 24 characters in body; edited body; edited body" Text="Cannot comment so will answer&#xD;&#xA;&#xD;&#xA;I think what you are referring to is a QuadTree : http://en.wikipedia.org/wiki/Quadtree and from the article, it seems that this is a quick method. Looks also useful with regards to collision detection (a quick pass before going into the nitty gritty) as well as identifying appropriate culling.&#xD;&#xA;&#xD;&#xA;Additionally useful for painter's algorithm because the leaves of the quadtree could be drawn last working from the root to the leaves - allowing back to front render and completing all the spatial information you need to draw correctly. So overall quite a lot of information and usefulness to store in one scene graph!" />
  <row Id="16778" PostHistoryTypeId="5" PostId="8220" RevisionGUID="e9312445-0ebe-4685-958b-5d667d2243b6" CreationDate="2011-02-07T16:36:50.020" UserId="1430" Comment="trimming extra blank lines in code" Text="I'm making a simple top-down tank game on the ipad where the user controls the movement of the tank with the left &quot;joystick&quot; and the rotation of the turret with the right one. I've spent several hours just trying to get it to work decently but now I turn to the pros :)&#xD;&#xA;&#xD;&#xA;I have two referencial objects, one for the movement and one for the rotation. The referencial objects always stay max two units away from the tank and I use them to tell the tank in what direction to move. I chose this approach to decouple movement and rotational behaviour from the raw input of the joysticks, I believe this will make it simpler to implement whatever behaviour I want for the tank. &#xD;&#xA;&#xD;&#xA;My problem is 1; the turret rotates the long way to the target. With this I mean that the target can be -5 degrees away in rotation and still it rotates 355 degrees instead of -5 degrees. I can't figure out why. The other problem is with the movement. It just doesn't feel right to have the tank turn while moving. I'd like to have a solution that would work as well for the AI as for the player. A blackbox function for the movement where the player only specifies in what direction it should move and it moves there under the constraints that are imposed on it. &#xD;&#xA;&#xD;&#xA;I am using the standard joystick class found in the Unity iPhone package.&#xD;&#xA;&#xD;&#xA;This is the code I'm using for the movement:&#xD;&#xA;&#xD;&#xA;    public class TankFollow : MonoBehaviour {&#xD;&#xA;	//Check angle difference and turn accordingly&#xD;&#xA;	&#xD;&#xA;	public GameObject followPoint;&#xD;&#xA;	public float speed;&#xD;&#xA;	public float turningSpeed;&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;	void Update()&#xD;&#xA;	{&#xD;&#xA;		transform.position = Vector3.Slerp(transform.position, followPoint.transform.position, speed * Time.deltaTime);&#xD;&#xA;		//Calculate angle&#xD;&#xA;		var forwardA = transform.forward;&#xD;&#xA;		var forwardB = (followPoint.transform.position - transform.position);&#xD;&#xA;		&#xD;&#xA;		var angleA = Mathf.Atan2(forwardA.x, forwardA.z) * Mathf.Rad2Deg;&#xD;&#xA;		var angleB = Mathf.Atan2(forwardB.x, forwardB.z) * Mathf.Rad2Deg;&#xD;&#xA;		&#xD;&#xA;		var angleDiff = Mathf.DeltaAngle(angleA, angleB);&#xD;&#xA;		//print(angleDiff.ToString());&#xD;&#xA;		if (angleDiff &gt; 5) {&#xD;&#xA;			//Rotate to &#xD;&#xA;			transform.Rotate(new Vector3(0, (-turningSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else if (angleDiff &lt; 5) {&#xD;&#xA;			transform.Rotate(new Vector3(0, (turningSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		transform.position = new Vector3(transform.position.x, 0, transform.position.z);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;And this is the code I'm using to rotate the turret:&#xD;&#xA;&#xD;&#xA;    	void LookAt()&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		var forwardA = -transform.right;&#xD;&#xA;		var forwardB = (toLookAt.transform.position - transform.position);&#xD;&#xA;		&#xD;&#xA;		var angleA = Mathf.Atan2(forwardA.x, forwardA.z) * Mathf.Rad2Deg;&#xD;&#xA;		var angleB = Mathf.Atan2(forwardB.x, forwardB.z) * Mathf.Rad2Deg;&#xD;&#xA;		&#xD;&#xA;		var angleDiff = Mathf.DeltaAngle(angleA, angleB);&#xD;&#xA;		//print(angleDiff.ToString());&#xD;&#xA;		if (angleDiff - 180 &gt; 1) {&#xD;&#xA;			//Rotate to &#xD;&#xA;			transform.Rotate(new Vector3(0, (turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		else if (angleDiff - 180 &lt; -1) {&#xD;&#xA;			transform.Rotate(new Vector3(0, (-turretSpeed * Time.deltaTime),0));&#xD;&#xA;			//transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y + adjustment, transform.rotation.z, transform.rotation.w);&#xD;&#xA;			print((angleDiff - 180).ToString());&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Since I want the turret reference point to turn in relation to the tank (when you rotate the body, the turret should follow and not stay locked on since it makes it impossible to control when you've got two thumbs to work with), I've made the TurretFollowPoint a child of the Turret object, which in turn is a child of the body. I'm thinking that I'm making it too difficult for myself with the reference points but I'm imagining that it's a good idea. Please be honest about this point.&#xD;&#xA;&#xD;&#xA;So I'll be grateful for any help I can get!&#xD;&#xA;&#xD;&#xA;I'm using Unity3d iPhone. Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16779" PostHistoryTypeId="25" PostId="8231" RevisionGUID="f999b086-9307-4739-aa8a-a365b7ef11ce" CreationDate="2011-02-07T17:16:18.717" Comment="http://twitter.com/#!/StackGameDev/status/34661745238736896" />
  <row Id="16780" PostHistoryTypeId="5" PostId="8219" RevisionGUID="3af9bae7-a601-4964-b0dd-4a9304e35861" CreationDate="2011-02-07T18:16:00.430" UserId="182" Comment="added a note about OS threads vs. lightweight threads in the last paragraph" Text="The common approach for taking advantage of multiple cores is, frankly, just plain misguided. Separating your subsystems into different threads will indeed split up some of the work across multiple cores, but it has some major problems. First, it's very hard to work with. Who wants to muck around with locks and synchronization and communication and stuff when they could just be writing straight up rendering or physics code instead? Second, the approach doesn't actually scale up. At best, this will allow you to take advantage of maybe three or four cores, and that's if you *really* know what you're doing. There are only so many subsystems in a game, and of those there are even fewer that take up large chunks of CPU time. There are a couple good alternatives that I know.&#xD;&#xA;&#xD;&#xA;One is to have a main thread along with a worker thread for each additional CPU. Regardless of subsystem, the main thread delegates isolated tasks to the worker threads via some sort of queue(s); these tasks may themselves create yet other tasks, as well. The sole purpose of the worker threads is to each grab tasks from the queue one at a time and perform them. The most important thing, though, is that as soon as a thread needs the result of a task, if the task is completed it can get the result, and if not it can safely remove the task from the queue and go ahead and perform that task itself. That is, not all tasks will end up being scheduled in parallel with each other. Having more tasks than can be executed in parallel is a *good* thing in this case; it means that it is likely to scale as you add more cores. One downside to this is that it requires a lot of work up front to design a decent queue and worker loop unless you have access to a library or language runtime that already provides this for you. The hardest part is making sure your tasks are truly isolated and thread safe, and making sure your tasks are in a happy middle ground between coarse-grained and fine-grained.&#xD;&#xA;&#xD;&#xA;Another alternative to subsystem threads is to parallelize each subsystem in isolation. That is, instead of running rendering and physics in their own threads, write the physics subsystem to use all your cores at once, write the rendering subsystem to use all your cores at once, then have the two systems simply run sequentially (or interleaved, depending on other aspects of your game architecture). For example, in the physics subsystem you could take all the point masses in the game, divide them up among your cores, and then have all the cores update them at once. Each core can then work on your data in tight loops with good locality. This lock-step style of parallelism is similar to what a GPU does. The hardest part here is in making sure that you are dividing your work up into fine-grained chunks such that dividing it evenly *actually* results in an equal amount of work across all processors.&#xD;&#xA;&#xD;&#xA;However, sometimes it's just easiest, due to politics, existing code, or other frustrating circumstances, to give each subsystem a thread. In that case, it's best to avoid making more OS threads than cores (if you have a runtime with lightweight threads that just happen to balance across your cores, this isn't as big of a deal). Also, avoid excessive communication. Once nice trick is to try pipelining; each major subsystem can be working on a different game state at a time. Pipelining reduces the amount of communication necessary among your subsystems since they don't all need access to the same data at the same time, and it also can nullify some of the damage caused by bottlenecks. For example, if your physics subsystem tends to take a long time to complete and your rendering subsystem ends up always waiting for it, your absolute frame rate could be higher if you run the physics subsystem for the next frame while the rendering subsystem is still working on the previous frame. In fact, if you have such bottlenecks and can't remove them any other way, pipelining may be the most legitimate reason to bother with subsystem threads." />
  <row Id="16781" PostHistoryTypeId="2" PostId="8234" RevisionGUID="182e1a41-e66a-47f6-8024-2c0021ccc85a" CreationDate="2011-02-07T20:10:03.820" UserId="2229" Text="Are you aware of a **complete** (or almost complete) **cross platform math library** for use in OpenGL ES 2.0 games?&#xD;&#xA;&#xD;&#xA;The library should contain: &#xD;&#xA;&#xD;&#xA; - Matrix2x2, Matrix 3x3, Matrix4x4 classes&#xD;&#xA; - Quaternions&#xD;&#xA; - Vector2, Vector3, Vector4 Classes&#xD;&#xA; - Euler Angle Class&#xD;&#xA; - Operations amongh the above mentioed classes, conversions, etc..&#xD;&#xA; - Standardly used math operations in 3D graphics (Dot Product, Cross Product, SLERP, etc...)&#xD;&#xA;&#xD;&#xA;Is there such Math API available either **standalone** or as a **part of any package**?&#xD;&#xA;&#xD;&#xA;*Programming Language: Visual C++ but planned to be ported to osX and Android OS.*" />
  <row Id="16782" PostHistoryTypeId="1" PostId="8234" RevisionGUID="182e1a41-e66a-47f6-8024-2c0021ccc85a" CreationDate="2011-02-07T20:10:03.820" UserId="2229" Text="Complete Math Library for use in OpenGL ES 2.0 Game?" />
  <row Id="16783" PostHistoryTypeId="3" PostId="8234" RevisionGUID="182e1a41-e66a-47f6-8024-2c0021ccc85a" CreationDate="2011-02-07T20:10:03.820" UserId="2229" Text="&lt;c++&gt;&lt;opengl&gt;&lt;programming&gt;&lt;math&gt;&lt;graphics-programming&gt;" />
  <row Id="16784" PostHistoryTypeId="25" PostId="8228" RevisionGUID="19c8e9a2-ed76-473f-a72d-1cca44587a41" CreationDate="2011-02-07T20:16:19.010" Comment="http://twitter.com/#!/StackGameDev/status/34707044602748928" />
  <row Id="16785" PostHistoryTypeId="2" PostId="8235" RevisionGUID="9cca3358-20e2-48ab-9798-d8ac66604577" CreationDate="2011-02-07T20:23:26.420" UserId="1430" Text="Have you considered the [Configurable Math Library][1]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cmldev.net/" />
  <row Id="16786" PostHistoryTypeId="5" PostId="8234" RevisionGUID="10e13144-7744-4580-a4a4-16c457b47fa5" CreationDate="2011-02-07T20:24:11.350" UserId="1430" Comment="minor spelling" Text="Are you aware of a **complete** (or almost complete) **cross platform math library** for use in OpenGL ES 2.0 games?&#xD;&#xA;&#xD;&#xA;The library should contain: &#xD;&#xA;&#xD;&#xA; - Matrix2x2, Matrix 3x3, Matrix4x4 classes&#xD;&#xA; - Quaternions&#xD;&#xA; - Vector2, Vector3, Vector4 Classes&#xD;&#xA; - Euler Angle Class&#xD;&#xA; - Operations amongh the above mentioned classes, conversions, etc..&#xD;&#xA; - Standardly used math operations in 3D graphics (Dot Product, Cross Product, SLERP, etc...)&#xD;&#xA;&#xD;&#xA;Is there such Math API available either **standalone** or as a **part of any package**?&#xD;&#xA;&#xD;&#xA;*Programming Language: Visual C++ but planned to be ported to OS X and Android OS.*" />
  <row Id="16787" PostHistoryTypeId="2" PostId="8236" RevisionGUID="b8f6cb78-f183-43db-9c60-c2b18d632ded" CreationDate="2011-02-07T20:51:58.717" UserId="5050" Text="I've started using WebGL and am pleased with how easy it is to leverage my OpenGL (and by extension OpenGL ES) experience. However, my understanding is as follows:&#xD;&#xA;&#xD;&#xA;  - OpenGL ES is a subset of OpenGL&#xD;&#xA;  - WebGL is a subset of OpenGL ES&#xD;&#xA;&#xD;&#xA;Is this correct for both cases? If so, are there resources for detailing which features are missing?&#xD;&#xA;&#xD;&#xA;For example, one notable missing feature is `glPushMatrix` and `glPopMatrix`. I don't see those in WebGL, but in my searches I cannot find them referenced in OpenGL ES material either." />
  <row Id="16788" PostHistoryTypeId="1" PostId="8236" RevisionGUID="b8f6cb78-f183-43db-9c60-c2b18d632ded" CreationDate="2011-02-07T20:51:58.717" UserId="5050" Text="Missing features from WebGL and OpenGL ES" />
  <row Id="16789" PostHistoryTypeId="3" PostId="8236" RevisionGUID="b8f6cb78-f183-43db-9c60-c2b18d632ded" CreationDate="2011-02-07T20:51:58.717" UserId="5050" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;webgl&gt;" />
  <row Id="16790" PostHistoryTypeId="2" PostId="8237" RevisionGUID="ae269225-36be-47bd-8386-4c988397807d" CreationDate="2011-02-07T21:02:25.667" UserId="5088" Text="Have you checked the latestp WebGL draft? &#xD;&#xA;&#xD;&#xA;According to the draft in case of a contradiction, the OpenGL ES 2.0 specification is the final authority.&#xD;&#xA;&#xD;&#xA;Chapter 6 outlines the differences from OpenGL ES 2.0 to WebGL.&#xD;&#xA;&#xD;&#xA;http://www.khronos.org/registry/webgl/specs/latest/" />
  <row Id="16791" PostHistoryTypeId="2" PostId="8238" RevisionGUID="36377c4e-2888-420c-929e-e619888d1ddc" CreationDate="2011-02-07T21:05:44.290" UserId="1430" Text="The [WebGL][1] wiki contained a section in its FAQ hierarchy for &quot;[WebGL and OpenGL Differences][2]&quot; which seems to focus on differences in WebGL from &quot;desktop&quot; OpenGL implementations and, alas, isn't very detailed (mostly it's about behavior, not the API). &#xD;&#xA;&#xD;&#xA;If that does not go into enough detail for you, you may need to compare [the latest WebGL draft][3] with the OpenGL ES or [OpenGL specifications][4] manually.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://khronos.org/webgl/wiki/Main_Page&#xD;&#xA;  [2]: http://khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences&#xD;&#xA;  [3]: http://www.khronos.org/registry/webgl/specs/latest/&#xD;&#xA;  [4]: http://www.khronos.org/opengles/" />
  <row Id="16792" PostHistoryTypeId="2" PostId="8239" RevisionGUID="3bfa110f-69ce-4574-b76d-7835a2ca2a44" CreationDate="2011-02-07T21:34:06.857" UserId="5014" Text="Let's imagine game like Heroes of might and magic, or Master of orion, or your turn-based game of choice. What is the game logic behind making next turn? Are there any materials or books to read about the topic? To be specific, let's imagine game loop:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void eventsHandler(); //something that responds to input&#xD;&#xA;    void gameLogic(); //something that decides whats going to be output on the screen&#xD;&#xA;    void render(); //this function outputs stuff on screen&#xD;&#xA;&#xD;&#xA;All those are getting called say 60 times a second. But how turn-based enters here? I might imagine that in gameLogic() there is a function like endTurn() that happens when a player clicks that button, but how do i handle it all? Need insights." />
  <row Id="16793" PostHistoryTypeId="1" PostId="8239" RevisionGUID="3bfa110f-69ce-4574-b76d-7835a2ca2a44" CreationDate="2011-02-07T21:34:06.857" UserId="5014" Text="How to implement turn-based game engine?" />
  <row Id="16794" PostHistoryTypeId="3" PostId="8239" RevisionGUID="3bfa110f-69ce-4574-b76d-7835a2ca2a44" CreationDate="2011-02-07T21:34:06.857" UserId="5014" Text="&lt;engine&gt;&lt;logic&gt;&lt;turn-based&gt;&lt;game&gt;" />
  <row Id="16795" PostHistoryTypeId="2" PostId="8240" RevisionGUID="01b9f187-4e10-4145-b59b-e0b0601ce732" CreationDate="2011-02-07T21:40:18.707" UserId="1743" Text="A turn based game is going to be governed by a [state machine][1].  Basically, you would lay out a series of states that can occur in a logical order.  &#xD;&#xA;&#xD;&#xA;At a high level, a player's turn could be the start of a new state, followed by all the possible actions that are allowed during that turn.&#xD;&#xA;&#xD;&#xA;For instance&#xD;&#xA;&#xD;&#xA; - State - change player&#xD;&#xA;   - it is now player 1's turn&#xD;&#xA; - Actions allowed&#xD;&#xA;   - attack&#xD;&#xA;     - select enemy to attack&#xD;&#xA;   - defend&#xD;&#xA;     - select unit to defend&#xD;&#xA;   - move unit&#xD;&#xA;     - select unit to move&#xD;&#xA;     - check to ensure movement is allowed&#xD;&#xA;   - etc&#xD;&#xA;&#xD;&#xA;Obviously this will balloon quite quickly, as I've only sketched out an extremely limited plan.  Having a good grasp on possible states early on will mean that you should be in a good position to implement.  I'd highly stress sketching out exactly how you want the game to run....a good turn-based game requires a lot of planning IMO.&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/State_machine" />
  <row Id="16796" PostHistoryTypeId="2" PostId="8241" RevisionGUID="c00e3bc0-84e9-4c58-98f0-74ea4f8af2ec" CreationDate="2011-02-07T21:40:55.073" UserDisplayName="user5238" Text="Hello not sure how old this post is, and if u are still looking but...&#xD;&#xA;I will not say anything as clever as people before me here. I am an artist not a scientist. But in my blog i have a section &quot;ideas for thesis,research&quot;. Most of it is regarding UI in 3dsmax. but there are other thoughts on blob mesh (topology of implicit surfaces) what else.. curved ray tracing (imagine how image would look like if say wind in 3d scene would affect rays which are coasted from camera towards a pixel in view plane, just a couple. my blog is here http://3dideas.wordpress.com/&#xD;&#xA;best,&#xD;&#xA;mantas. " />
  <row Id="16797" PostHistoryTypeId="5" PostId="8239" RevisionGUID="2fba92dd-f045-4d1b-9717-ed8ee1a075ae" CreationDate="2011-02-07T21:51:41.470" UserId="1430" Comment="capitalization" Text="Let's imagine game like Heroes of Might and Magic, or Master of Orion, or your turn-based game of choice. What is the game logic behind making next turn? Are there any materials or books to read about the topic? To be specific, let's imagine game loop:&#xD;&#xA;&#xD;&#xA;    void eventsHandler(); //something that responds to input&#xD;&#xA;    void gameLogic(); //something that decides whats going to be output on the screen&#xD;&#xA;    void render(); //this function outputs stuff on screen&#xD;&#xA;&#xD;&#xA;All those are getting called say 60 times a second. But how turn-based enters here? I might imagine that in gameLogic() there is a function like endTurn() that happens when a player clicks that button, but how do I handle it all? Need insights." />
  <row Id="16798" PostHistoryTypeId="2" PostId="8242" RevisionGUID="8421016a-394e-4273-8efa-28aeccf435a9" CreationDate="2011-02-07T21:53:17.340" UserId="1677" Text="Scene graphs is a way to go. I recommend [this gamedev thread][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/349829-scene-graph-resources/" />
  <row Id="16799" PostHistoryTypeId="2" PostId="8243" RevisionGUID="ad23aa58-b517-4121-b242-4ab295846e12" CreationDate="2011-02-07T22:08:14.513" UserId="4129" Text="The 3D variation of this question was asked recently: http://gamedev.stackexchange.com/questions/8221/scene-graph-for-deferred-rendering-engine/8222#8222&#xD;&#xA;&#xD;&#xA;I recommend a quadtree.  Objects would typically best be represented by bounding boxes, rather than points (it always puzzles me that all the 'tutorials' seem to think games are made from point clouds).  A node would contain four children - quadtree sub-nodes - and a list of those objects that straddle more than one child (which is way simpler than allowing objects to be in multiple nodes at once).&#xD;&#xA;&#xD;&#xA;As items move they check to see if they are not fully-within their quadtree node's bounds and if not they remove themselves from their current node and then re-add themselves to the quadtree.&#xD;&#xA;&#xD;&#xA;When rendering 3D you tend to want to draw front-to-back and opaque-then-transparent and in general this is true of 2D too, although you may know something about your artwork that lets you be less careful perhaps.  So you take a frustum - or however you decide what is visible - and you cast this through your octree.  This will be very fast.&#xD;&#xA;&#xD;&#xA;You might want to hoist the list of currently visible items into the quadtree manager so that the frustum is painted onto the quadtree only when the camera moves, and bit-flags in the octree that track those sub-nodes that are fully-in-view or partially-in-view allow you to efficiently add and remove your visible items from the list.&#xD;&#xA;&#xD;&#xA;At this point its all likely so blazingly fast - compared to your rendering cost - that you don't need to optimise it further with all the various special cases when moving things around and such, or deferred re-sorting of changing visibility lists and such." />
  <row Id="16800" PostHistoryTypeId="2" PostId="8244" RevisionGUID="759a3e55-2237-4ead-9adc-74d6145ed03d" CreationDate="2011-02-07T22:21:03.383" UserId="3214" Text="Flash has come a long way in the last decade, and it's a well-kept secret getting a flash game to connect to a multi-client server for chat and/or basic avatar movement in real time.&#xD;&#xA;&#xD;&#xA;Why has the industry as a whole not made this a common-knowledge type of thing yet? We keep pushing to the web but I am finding it incredibly difficult gathering learning material on this subject.&#xD;&#xA;&#xD;&#xA;Sure, I can find multi-client server socket tutorials in various languages (using select statements and/or threads to handle multiple socket connections), but in regards to Flash applications inside of a browser? NOPE!&#xD;&#xA;&#xD;&#xA;Can everyone please share what they know? :] It's a subject I'd really love to get into but I'm afraid I just honestly don't know enough about how to do it.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="16801" PostHistoryTypeId="1" PostId="8244" RevisionGUID="759a3e55-2237-4ead-9adc-74d6145ed03d" CreationDate="2011-02-07T22:21:03.383" UserId="3214" Text="Network Multiplayer in Flash" />
  <row Id="16802" PostHistoryTypeId="3" PostId="8244" RevisionGUID="759a3e55-2237-4ead-9adc-74d6145ed03d" CreationDate="2011-02-07T22:21:03.383" UserId="3214" Text="&lt;flash&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="16803" PostHistoryTypeId="4" PostId="8220" RevisionGUID="72cb5f20-72f5-4376-8186-2126632beb8c" CreationDate="2011-02-07T22:30:43.310" UserId="1217" Comment="edited title" Text="2d tank movement and turret solution" />
  <row Id="16804" PostHistoryTypeId="2" PostId="8245" RevisionGUID="f1382d9c-7926-4556-b461-3d08c642498c" CreationDate="2011-02-07T22:52:23.477" UserDisplayName="user5240" Text="Can't comment either, heh.&#xD;&#xA;&#xD;&#xA;I'm not sure a quad tree is the best solution. I believe quad trees (and oct trees in 3D) are typically used to sub-divide space for rendering and bounds checking of &lt;b&gt;static&lt;/b&gt; geometry, and are pre-generated and accessed only at load-time. If I understand the question, Devil is looking for a way to do scene culling of &lt;b&gt;dynamic&lt;/b&gt; geometry every frame at run-time. Having to re-calculate a quad tree every frame could get expensive.&#xD;&#xA;&#xD;&#xA;If you are really looking for a way to &lt;b&gt;just&lt;/b&gt; do view culling (as opposed to intelligent collision detection), have you tried simply checking for bounding rect intersection with the screen rect? This can be done relatively cheaply in screen coordinate space, even faster if you maintain a separate bounding rect in screen space for your dynamic objects and update only as necessary.  This should work fine unless you have a great many objects on screen at once.&#xD;&#xA;&#xD;&#xA;As for techniques of doing collision detection between dynamic objects, I have personally used the &lt;b&gt;binning&lt;/b&gt; technique quite successfully in a 2D side-scrolling shooter.  We tried using a dynamically-updated quad tree but took a pretty significant performance hit." />
  <row Id="16805" PostHistoryTypeId="25" PostId="8244" RevisionGUID="89715a1c-9e59-4eec-8e67-99a2329366b1" CreationDate="2011-02-07T23:16:19.913" Comment="http://twitter.com/#!/StackGameDev/status/34752346777071616" />
  <row Id="16806" PostHistoryTypeId="2" PostId="8246" RevisionGUID="0b25b18f-4841-4dc7-b4ce-31f24b9af2bd" CreationDate="2011-02-07T23:22:25.877" UserId="5020" Text="It may be mathematically equivalent - check it if you want - but the code given there is not the same as the pseudocode for Newell's method given on the OpenGL wiki. See http://www.opengl.org/wiki/Calculating_a_Surface_Normal" />
  <row Id="16807" PostHistoryTypeId="2" PostId="8247" RevisionGUID="9427170b-bd7a-4d9b-aa78-90709155eabc" CreationDate="2011-02-08T01:04:52.350" UserId="3051" Text="I'm on a team of students working on a third-person adventure game that takes place inside a pinball machine (like, small scale, on the surface, avoiding pinballs, etc).&#xD;&#xA;&#xD;&#xA;One of my responsibilities on the project is to find games that are similar to this concept in appearance and/or gameplay for reference.&#xD;&#xA;&#xD;&#xA;So, does anyone know of games (other than pinball) that takes place in a pinball-like environment?  Or, adventure games that take place in small, cramped environments with multiple paths around the world?  Or games in which the player is often bombarded with balls (or other similar unintelligent obstacles)?  Or games that take place on a small scale?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;(This should probably be a CW; I can't do that...)" />
  <row Id="16808" PostHistoryTypeId="1" PostId="8247" RevisionGUID="9427170b-bd7a-4d9b-aa78-90709155eabc" CreationDate="2011-02-08T01:04:52.350" UserId="3051" Text="Looking for games in environments similar to a pinball table" />
  <row Id="16809" PostHistoryTypeId="3" PostId="8247" RevisionGUID="9427170b-bd7a-4d9b-aa78-90709155eabc" CreationDate="2011-02-08T01:04:52.350" UserId="3051" Text="&lt;game-design&gt;&lt;level-design&gt;" />
  <row Id="16810" PostHistoryTypeId="2" PostId="8248" RevisionGUID="4910418f-4a72-40dc-acb0-0a374a4b65b6" CreationDate="2011-02-08T01:32:45.947" UserId="1230" Text="I have a grid of letters. The player clicks on a letter and drags out a selection. Using [Bresenham's Algorithm](http://en.wikipedia.org/wiki/Bresenham's_line_algorithm) I can create a line of highlighted letters representing the player's selection. &#xD;&#xA;&#xD;&#xA;However, what I _really_ want is to have the line segment be constrained to 45 degree angles (as is common for crossword-style games).&#xD;&#xA;&#xD;&#xA;So, **given a start point and an end point, how can I find the line that passes through the start point and is closest to the end point?**&#xD;&#xA;&#xD;&#xA;**Bonus**: To make things super sweet I'd like to get a list of points in the grid that the line passes through, and for super MEGA bonus points, I'd like to get them in order of selection (i.e. from start point to end point)." />
  <row Id="16811" PostHistoryTypeId="1" PostId="8248" RevisionGUID="4910418f-4a72-40dc-acb0-0a374a4b65b6" CreationDate="2011-02-08T01:32:45.947" UserId="1230" Text="Given a start and end point, how can I constrain the end point so the resulting line segment is horizontal, vertical, or 45 degrees?" />
  <row Id="16812" PostHistoryTypeId="3" PostId="8248" RevisionGUID="4910418f-4a72-40dc-acb0-0a374a4b65b6" CreationDate="2011-02-08T01:32:45.947" UserId="1230" Text="&lt;algorithm&gt;&lt;linear-algebra&gt;" />
  <row Id="16813" PostHistoryTypeId="6" PostId="8248" RevisionGUID="74c49430-d4b6-4baa-bdce-51f7eaf95a51" CreationDate="2011-02-08T01:37:04.910" UserId="3794" Comment="edited tags" Text="&lt;algorithm&gt;" />
  <row Id="16814" PostHistoryTypeId="25" PostId="8239" RevisionGUID="de5d3377-149c-4e48-8781-2afb0e255cc2" CreationDate="2011-02-08T02:16:25.547" Comment="http://twitter.com/#!/StackGameDev/status/34797669415124992" />
  <row Id="16815" PostHistoryTypeId="2" PostId="8249" RevisionGUID="9c31f28a-162c-44c4-b849-05e41ca1658c" CreationDate="2011-02-08T02:56:56.460" UserId="5007" Text="I didn't test this results, but i think it should work.&#xD;&#xA;&#xD;&#xA;Lets call the things by the names:&#xD;&#xA;Start point coordinates: (X1,Y1)&#xD;&#xA;End point coordinates: (X2, Y2)&#xD;&#xA;Resultant closest End Point: (RX, RY)&#xD;&#xA;&#xD;&#xA;A line that passes in Start point can be described as [y = x + (Y1 - X1)], for 45 degree slope. Slope equals the tangent of the desired angle, tan(pi/4) = 1. 45 degree is pi/4 radians.&#xD;&#xA;&#xD;&#xA;Now you have a line with beginning on your Start Point, and with no end, defined by the given equation. We need to find it's End Point.&#xD;&#xA;&#xD;&#xA;The End Point is closer to the line 1 wherever the line 1 intersects a line 2 with inverse slope, which passes in EndPoint. This line could be represented by [y = -x + (Y2+X2)], following the same principle, which has now -45 degrees slope.&#xD;&#xA;&#xD;&#xA;The point of intersection is therefore described by:&#xD;&#xA;[RX = (-Y1+X1+Y2+X2)/2]&#xD;&#xA;And you can find its corresponding image calculating RX for the Line 1 (the one that we have interest in)&#xD;&#xA;[RY = RX + (Y1-X1)]&#xD;&#xA;&#xD;&#xA;And done, you have your line ready, its a line generated by the function [y = x + (Y1-X1)] with a start in StartPoint and a end in (RX,RY).&#xD;&#xA;&#xD;&#xA;Bonus:&#xD;&#xA;Since you have the line equation, you can calculate list of points the line passes through by changing x for any value between X1 and RX.&#xD;&#xA;&#xD;&#xA;To get them for the order of selection, you just need to start changing x for X1 and go up to RX. Pretty straightforward.&#xD;&#xA;&#xD;&#xA;Tell me if it works :) If you want the line in -45 degrees too, its the same, but the Line 2 is the important one instead of Line 1. You figure it out easily.&#xD;&#xA;Hope it helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16816" PostHistoryTypeId="2" PostId="8250" RevisionGUID="0080c5ad-0356-4aa4-9108-b92c23c94433" CreationDate="2011-02-08T04:26:19.643" UserId="5007" Text="i would like to know the flow for making modern 2D games artwork.&#xD;&#xA;&#xD;&#xA;How are the assets made nowadays? Bitmap? Vectorial? Hand-Drawn and painted? Drawn digitally? Modeled tridimensionally and exported to bitmaps?&#xD;&#xA;&#xD;&#xA;I would like some information on programs as well, for fine looking art.&#xD;&#xA;Why does FLASH vectorial style look good in most games? How do i make equivalent graphics with external tools? Or equaly good and not vectorial, anyway.&#xD;&#xA;&#xD;&#xA;Any special hints for animating?&#xD;&#xA;&#xD;&#xA;An answer oriented towards a one-man-army indie developer with little experience but some artistic sense would be apreciated ! Not a complete dummy with paint programs, but also not a master at all, just need efficient ways to achieve results.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;NOTE: Pixel art is not the goal of this question, nothing related to direct pixel manipulation should be brought up here, but you're free to do exactly that :)" />
  <row Id="16817" PostHistoryTypeId="1" PostId="8250" RevisionGUID="0080c5ad-0356-4aa4-9108-b92c23c94433" CreationDate="2011-02-08T04:26:19.643" UserId="5007" Text="Modern ways for spriting" />
  <row Id="16818" PostHistoryTypeId="3" PostId="8250" RevisionGUID="0080c5ad-0356-4aa4-9108-b92c23c94433" CreationDate="2011-02-08T04:26:19.643" UserId="5007" Text="&lt;sprites&gt;&lt;art&gt;" />
  <row Id="16819" PostHistoryTypeId="2" PostId="8251" RevisionGUID="29da8d3e-040b-419d-acc8-b439ad07ee10" CreationDate="2011-02-08T04:31:32.603" UserId="5244" Text="I can think of a few games that might fit what you're looking for.&#xD;&#xA;&#xD;&#xA;**Odama:** An old Gamecube game that plays like an RTS inside a pinball machine&#xD;&#xA;&#xD;&#xA;**Marvel Ultimate Alliance 2:**  This might be an appropriate 3rd person example of the &quot;cramped environment&quot; that you're looking for&#xD;&#xA;&#xD;&#xA;**Toy Soldiers:**  A recent XBLA game that does a great job of convincingly depicting small scale.&#xD;&#xA;" />
  <row Id="16820" PostHistoryTypeId="16" PostId="8251" RevisionGUID="8189e74c-a717-489b-8fae-5da375808939" CreationDate="2011-02-08T04:46:21.733" UserId="51" />
  <row Id="16821" PostHistoryTypeId="16" PostId="8247" RevisionGUID="6c1d9b17-a695-446c-8f1e-013af855121b" CreationDate="2011-02-08T04:46:21.733" UserId="51" />
  <row Id="16822" PostHistoryTypeId="5" PostId="8247" RevisionGUID="a0b7428b-1148-4b04-a186-9391106f96ca" CreationDate="2011-02-08T04:46:32.843" UserId="51" Comment="deleted 65 characters in body" Text="I'm on a team of students working on a third-person adventure game that takes place inside a pinball machine (like, small scale, on the surface, avoiding pinballs, etc).&#xD;&#xA;&#xD;&#xA;One of my responsibilities on the project is to find games that are similar to this concept in appearance and/or gameplay for reference.&#xD;&#xA;&#xD;&#xA;So, does anyone know of games (other than pinball) that takes place in a pinball-like environment?  Or, adventure games that take place in small, cramped environments with multiple paths around the world?  Or games in which the player is often bombarded with balls (or other similar unintelligent obstacles)?  Or games that take place on a small scale?" />
  <row Id="16823" PostHistoryTypeId="25" PostId="8248" RevisionGUID="35cf368c-5e94-4894-ae10-16ade971845f" CreationDate="2011-02-08T05:16:25.763" Comment="http://twitter.com/#!/StackGameDev/status/34842968322084864" />
  <row Id="16824" PostHistoryTypeId="2" PostId="8252" RevisionGUID="48fe42e6-42ea-4b81-ae90-36ba951ff2cd" CreationDate="2011-02-08T05:36:04.030" UserId="4711" Text="I'm not sure which version you are working with, but version 2.1.0 has 'kinematic bodies'.&#xD;&#xA;&#xD;&#xA;Instead of `bodyDef.type = b2_dynamicBody;` you would put `bodyDef.type = b2_kinematicBody;`.&#xD;&#xA;&#xD;&#xA;They are sort of like static bodies, only you can move them. They only move how you tell them to, so they aren't affected by collisions or other forces (like gravity).&#xD;&#xA;&#xD;&#xA;From the box2d docs at http://www.box2d.org/manual.html&#xD;&#xA;&#xD;&#xA;&gt; A kinematic body moves under&#xD;&#xA;&gt; simulation according to its velocity.&#xD;&#xA;&gt; Kinematic bodies do not respond to&#xD;&#xA;&gt; forces. They can be moved manually by&#xD;&#xA;&gt; the user, but normally a kinematic&#xD;&#xA;&gt; body is moved by setting its velocity.&#xD;&#xA;&gt; A kinematic body behaves as if it has&#xD;&#xA;&gt; infinite mass, however, Box2D stores&#xD;&#xA;&gt; zero for the mass and the inverse&#xD;&#xA;&gt; mass. Kinematic bodies do not collide&#xD;&#xA;&gt; with other static or kinematic bodies." />
  <row Id="16825" PostHistoryTypeId="2" PostId="8253" RevisionGUID="2ee54fff-cd98-49c9-9aa1-e6fa34cc1e9b" CreationDate="2011-02-08T05:59:47.477" UserId="5245" Text="The reason you cannot find any info about running a socket server from Flash within the browser is because it is not possible.  You can only connect to a socket server from a Flash movie running in the browser.&#xD;&#xA;&#xD;&#xA;To run a socket server with Flash you need to create an AIR 2.x application that runs on the desktop.  This [article][1] on Adobe AIR Developer Center should get you started.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.adobe.com/devnet/air/flex/quickstart/articles/communicating_with_sockets.html" />
  <row Id="16826" PostHistoryTypeId="5" PostId="8250" RevisionGUID="9ffc948f-1552-4bc2-92a9-994ad2ec3b87" CreationDate="2011-02-08T06:27:54.750" UserId="1430" Comment="grammar, spelling, capitalization, replacing some odd word choice with more appropriate words (&quot;vectorial&quot; mostly)" Text="I would like to know the flow for making modern 2D game artwork.&#xD;&#xA;&#xD;&#xA;How are the assets made nowadays? Bitmap? Vector-based? Hand-drawn and painted? Drawn digitally? Modeled in 3D and exported to bitmaps?&#xD;&#xA;&#xD;&#xA;I would like some information on programs as well, for fine looking art.&#xD;&#xA;Why does Flash's vector art style look good in most games? How do I make equivalent graphics with external tools? Or equaly good and not vector-based, anyway.&#xD;&#xA;&#xD;&#xA;Any special hints for animating?&#xD;&#xA;&#xD;&#xA;An answer oriented towards a one-man-army indie developer with little experience but some artistic sense would be appreciated! Not a complete dummy with paint programs, but also not a master at all, just need efficient ways to achieve results.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;NOTE: Pixel art is not the goal of this question, nothing related to direct pixel manipulation should be brought up here, but you're free to do exactly that :)" />
  <row Id="16827" PostHistoryTypeId="4" PostId="8250" RevisionGUID="8dd69944-631d-4a69-887e-dc22dd9a19f7" CreationDate="2011-02-08T06:38:36.940" UserId="1430" Comment="clarified title" Text="Modern techniques for spriting" />
  <row Id="16828" PostHistoryTypeId="2" PostId="8254" RevisionGUID="d13d4a50-749e-4289-95fe-610b24990af4" CreationDate="2011-02-08T07:09:34.463" UserId="5246" Text="I am working on simple game using WPF/C#, and I am wondering what is the best practice to resize the game (views, assets…) when user re-sizes the game window? Is it good practice to use the ViewBox control for this job?&#xD;&#xA;&#xD;&#xA;thanks for your help." />
  <row Id="16829" PostHistoryTypeId="1" PostId="8254" RevisionGUID="d13d4a50-749e-4289-95fe-610b24990af4" CreationDate="2011-02-08T07:09:34.463" UserId="5246" Text="What is the best practice to resize game views-assets in WPF/silverlight?" />
  <row Id="16830" PostHistoryTypeId="3" PostId="8254" RevisionGUID="d13d4a50-749e-4289-95fe-610b24990af4" CreationDate="2011-02-08T07:09:34.463" UserId="5246" Text="&lt;game-design&gt;&lt;wpf&gt;&lt;silverlight&gt;" />
  <row Id="16831" PostHistoryTypeId="5" PostId="8244" RevisionGUID="9a50205b-fae7-40d0-99c9-d9b56ee00eaa" CreationDate="2011-02-08T07:41:14.203" UserId="1430" Comment="&quot;Flash&quot;" Text="Flash has come a long way in the last decade, and it's a well-kept secret getting a Flash game to connect to a multi-client server for chat and/or basic avatar movement in real time.&#xD;&#xA;&#xD;&#xA;Why has the industry as a whole not made this a common-knowledge type of thing yet? We keep pushing to the web but I am finding it incredibly difficult gathering learning material on this subject.&#xD;&#xA;&#xD;&#xA;Sure, I can find multi-client server socket tutorials in various languages (using select statements and/or threads to handle multiple socket connections), but in regards to Flash applications inside of a browser? NOPE!&#xD;&#xA;&#xD;&#xA;Can everyone please share what they know? :] It's a subject I'd really love to get into but I'm afraid I just honestly don't know enough about how to do it.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="16832" PostHistoryTypeId="5" PostId="8243" RevisionGUID="ba61a97e-0451-4073-a2fb-1f065f74a956" CreationDate="2011-02-08T07:50:20.430" UserId="4129" Comment="a defence of using quadtrees for projectiles" Text="The 3D variation of this question was asked recently: http://gamedev.stackexchange.com/questions/8221/scene-graph-for-deferred-rendering-engine/8222#8222&#xD;&#xA;&#xD;&#xA;I recommend a quadtree.  Objects would typically best be represented by bounding boxes, rather than points (it always puzzles me that all the 'tutorials' seem to think games are made from point clouds).  A node would contain four children - quadtree sub-nodes - and a list of those objects that straddle more than one child (which is way simpler than allowing objects to be in multiple nodes at once).&#xD;&#xA;&#xD;&#xA;As items move they check to see if they are not fully-within their quadtree node's bounds and if not they remove themselves from their current node and then re-add themselves to the quadtree.&#xD;&#xA;&#xD;&#xA;It is not uncommon to put projectiles and other very-fast-moving objects into a separate always-visit list or such, as adding and removing them constantly from the quadtree can hurt performance.  An approach I favour though is adding the bounds of their flight in some number of game time steps to the quadtree.  In this way they get moved around in the tree much more rarely, and they get found by all the nearest neighbour searches and such - this allows projectiles to actually hit things accidentally etc.  It can dramatically simplify collision detection by not having several code paths and the interaction of several lists.&#xD;&#xA;&#xD;&#xA;When rendering 3D you tend to want to draw front-to-back and opaque-then-transparent and in general this is true of 2D too, although you may know something about your artwork that lets you be less careful perhaps.  So you take a frustum - or however you decide what is visible - and you cast this through your octree.  This will be very fast.&#xD;&#xA;&#xD;&#xA;You might want to hoist the list of currently visible items into the quadtree manager so that the frustum is painted onto the quadtree only when the camera moves, and bit-flags in the octree that track those sub-nodes that are fully-in-view or partially-in-view allow you to efficiently add and remove your visible items from the list.&#xD;&#xA;&#xD;&#xA;At this point its all likely so blazingly fast - compared to your rendering cost - that you don't need to optimise it further with all the various special cases when moving things around and such, or deferred re-sorting of changing visibility lists and such." />
  <row Id="16833" PostHistoryTypeId="2" PostId="8255" RevisionGUID="44d19e19-a6d7-47ae-b002-bb64296a788a" CreationDate="2011-02-08T07:58:58.900" UserId="5014" Text="Well, it all depends. First, different kinds of games require different methods, based on the output desired by developers.&#xD;&#xA;Here is the usual pipeline of sprite making:&#xD;&#xA;&#xD;&#xA;1. Sketches, how the artist sees the character, object, you name it.&#xD;&#xA;2. Based on sketches artist produces raw sprites, just to outline features.&#xD;&#xA;3. High resolution version of the sprite is produced to be further dissected into resolutions and other requirements of the tech. &#xD;&#xA;4. Final version of sprites to be used in game.&#xD;&#xA;&#xD;&#xA;That's basically it. If you need animated sprites, or pixel art, multiply this work by factor of 10.&#xD;&#xA;Also, most of the painting is done in Adobe Photoshop using digital pen (google wacom bamboo). 90% of all graphics processing is done in Photoshop.&#xD;&#xA;&#xD;&#xA;If you need vector based images, you use special vector editors like Flash. But generally vector art is used for special cases, like flash game, where bandwidth is important, or if style of the game requires multiply mosifications and resize of your images. &#xD;&#xA;&#xD;&#xA;And remember, best graphics comes not from tools, but from the artists experience and talent. Technology is just a way to assist artist with his work, they are not going to do the job for you. &#xD;&#xA;" />
  <row Id="16835" PostHistoryTypeId="2" PostId="8257" RevisionGUID="579d5614-667c-4768-bca0-13960c8ccc0c" CreationDate="2011-02-08T08:12:21.083" UserId="20" Text="&gt; How are the assets made nowadays? Bitmap? Vector-based? Hand-drawn and painted? Drawn digitally? Modeled in 3D and exported to bitmaps?&#xD;&#xA;&#xD;&#xA;Well, all of these techniques are used in modern games. I guess the 3D modeling and rendering to bitmaps has become less popular with the possibilities to use rather high-poly models directly in your game.&#xD;&#xA;&#xD;&#xA;But any technique is valid. I just recently saw a [game where all assets where hand-painted][1]. It looks gorgeous.&#xD;&#xA;&#xD;&#xA;&gt; I would like some information on programs as well, for fine looking art. Why does Flash's vector art style look good in most games? How do I make equivalent graphics with external tools? Or equaly good and not vector-based, anyway.&#xD;&#xA;&#xD;&#xA;It isn't the program that makes a good artist. Expensive software like Photoshop or Illustrator (or the free counterparts GIMP and Inkscape) won't magically turn your art into masterpieces. Use the software that you feel comfortable with. The better you know a tool, the less it will stand in your way, increasing productivity and creativity.&#xD;&#xA;&#xD;&#xA;I don't share your opinion on the Flash vector graphics though. I think a lot of these games look awful, but that's just personal taste.&#xD;&#xA;&#xD;&#xA;Sadly, there's no *best* or most efficient way to achieve good results. &#xD;&#xA;However, I think it's important to sketch out a style and then stick with it. If an asset doesn't fit into the overall style of your game, redo it. Familiarize yourself with your tools, so that you can turn your ideas into artwork. Personally I always use paper and pencil first, because it's the &quot;tool&quot; I feel most comfortable with and I can achieve results *fast*. When I'm happy with the drawings, I can scan them and continue working on them in another tool.&#xD;&#xA;&#xD;&#xA;  [1]: http://eriksvedang.com/kometen/" />
  <row Id="16836" PostHistoryTypeId="25" PostId="8254" RevisionGUID="6ebe5385-8976-4c36-b880-d0c7e1304fe3" CreationDate="2011-02-08T08:16:26.263" Comment="http://twitter.com/#!/StackGameDev/status/34888269208485888" />
  <row Id="16837" PostHistoryTypeId="5" PostId="8257" RevisionGUID="1e139faf-3e88-4180-b04c-56c4b612e84c" CreationDate="2011-02-08T08:20:20.547" UserId="20" Comment="spelling" Text="&gt; How are the assets made nowadays? Bitmap? Vector-based? Hand-drawn and painted? Drawn digitally? Modeled in 3D and exported to bitmaps?&#xD;&#xA;&#xD;&#xA;Well, all of these techniques are used in modern games. I guess the 3D modeling and rendering to bitmaps has become less popular with the possibilities to use rather high-poly models directly in your game.&#xD;&#xA;&#xD;&#xA;But any technique is valid. I just recently saw a [game where all assets were hand-painted][1]. It looks gorgeous.&#xD;&#xA;&#xD;&#xA;&gt; I would like some information on programs as well, for fine looking art. Why does Flash's vector art style look good in most games? How do I make equivalent graphics with external tools? Or equaly good and not vector-based, anyway.&#xD;&#xA;&#xD;&#xA;It isn't the program that makes a good artist. Expensive software like Photoshop or Illustrator (or the free counterparts GIMP and Inkscape) won't magically turn your art into masterpieces. Use the software that you feel comfortable with. The better you know a tool, the less it will stand in your way, increasing productivity and creativity.&#xD;&#xA;&#xD;&#xA;I don't share your opinion on the Flash vector graphics though. I think a lot of these games look awful, but that's just personal taste.&#xD;&#xA;&#xD;&#xA;Sadly, there's no *best* or most efficient way to achieve good results. &#xD;&#xA;However, I think it's important to sketch out a style and then stick with it. If an asset doesn't fit into the overall style of your game, redo it. Familiarize yourself with your tools, so that you can turn your ideas into artwork. Personally I always use paper and pencil first, because it's the &quot;tool&quot; I feel most comfortable with and I can achieve results *fast*. When I'm happy with the drawings, I can scan them and continue working on them in another tool.&#xD;&#xA;&#xD;&#xA;  [1]: http://eriksvedang.com/kometen/" />
  <row Id="16838" PostHistoryTypeId="2" PostId="8258" RevisionGUID="b381818e-a792-416c-91bf-c8d8b17d5e1c" CreationDate="2011-02-08T10:01:58.197" UserId="1829" Text="At the times where computer power where scarce, everything needed to be programmed in C or C++, simply because garbage collected languages take memory control away from the programmer, and thus, performance can drop.&#xD;&#xA;&#xD;&#xA;Nowadays, computers are faster, but as Knuth says and to put it short, optimization can be evil:&#xD;&#xA;&#xD;&#xA; - it's obvious that low level core functionalities need to be optimized, because computing 3D geometry, physics, collisions, lighting, can quickly bloat the best processor available. You can easily tell that rising visual quality on a machine almost always significantly kills performance.&#xD;&#xA;&#xD;&#xA; - Now, there are other functionalities, such as game states, AI, sound, input, network, which are still important in a game, but which will hardly never take as much computer resource. Those functionalities, most of the time, have not to be optimized. That's the goal of scripting language and garbage collected languages: you don't have to think about your memory coherence and your application organization, because the code you will write with these languages, if you are not coding low level stuff, will never be a bottleneck.&#xD;&#xA;&#xD;&#xA;Example with 2 cases&#xD;&#xA;&#xD;&#xA; - Ship 500kg of furniture with a truck.&#xD;&#xA; - Ship 30 tons of material with a boat.&#xD;&#xA;&#xD;&#xA;both are at 500 kms distance.&#xD;&#xA;&#xD;&#xA;In both cases does it matter to make the loading/unloading process faster to make the whole transport time smaller, knowing you CANT make the boat nor the truck move faster  ?&#xD;&#xA;&#xD;&#xA;Answer is: it mattered with the truck, but not with the boat anymore, because you already did a lot by moving the stock with the boat.&#xD;&#xA;&#xD;&#xA;I don't know if you understand this metaphor, but in a way, it can make you imagine the mathematical problem, which is more important than understanding the answer.&#xD;&#xA;&#xD;&#xA;Scripting languages allows to make games faster if you already have an engine programmed in C/C++: the 3D engine solves the low-level problems, now you have to make the game with your scripts.&#xD;&#xA;&#xD;&#xA;But remember: you absolutely never will be able to replace low level compiled language, EVER. Statically typed, compiled languages are the core of performance and you CAN'T rule them out, would it be a kernel, a 3D engine or a graphic card driver.&#xD;&#xA;&#xD;&#xA;But of course, if your game is graphically simple and doesn't require a lot of vector computation, you can focus on the gameplay and forget about optimisation, because in this case you will never have to deal with optimisation since your machine are really fast for that&#xD;&#xA;&#xD;&#xA;Except if you plan to port ir on the DS.&#xD;&#xA;But I'll stop there." />
  <row Id="16839" PostHistoryTypeId="2" PostId="8259" RevisionGUID="11ab0e52-93db-4d5a-b640-909e6f0e0f18" CreationDate="2011-02-08T10:20:44.767" UserId="2188" Text="&gt; Or games that take place on a small scale?&#xD;&#xA;&#xD;&#xA;Micro Machines&#xD;&#xA;&#xD;&#xA;![Micro Machines VG (old) - billiard][1]&#xD;&#xA;![Micro Machines VG (new) - kitchen][2]&#xD;&#xA;![Micro Machines VG (new) - billiard][3]&#xD;&#xA;&#xD;&#xA;(never played the new one)&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/A4iaY.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/EanZH.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/jrXXZ.jpg" />
  <row Id="16840" PostHistoryTypeId="25" PostId="8236" RevisionGUID="f9549eee-23fc-4ded-a3c1-b5e9b3a74c4f" CreationDate="2011-02-08T11:16:26.390" Comment="http://twitter.com/#!/StackGameDev/status/34933565758115840" />
  <row Id="16841" PostHistoryTypeId="2" PostId="8260" RevisionGUID="2afdb1e7-ae35-48f5-90de-31e6d9e9364e" CreationDate="2011-02-08T11:34:31.533" UserId="4410" Text="There's also the [ShaderX][1] series of books. The first couple are free to download from the link and cover a range of topics, including water. The articles in the free books were originally targeting quite old shader versions, but the techniques should hopefully be clearly described and easily transferable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tog.acm.org/resources/shaderx/" />
  <row Id="16842" PostHistoryTypeId="2" PostId="8261" RevisionGUID="5622fc60-a401-4ff7-9e8f-b82ee8d6ff83" CreationDate="2011-02-08T12:12:19.513" UserId="4264" Text="Also not tested, but this is one way to approach it..&#xD;&#xA;&#xD;&#xA;Some preliminary calculations:&#xD;&#xA;&#xD;&#xA;    // Vector from x1,y1 to x2,y2:&#xD;&#xA;    &#xD;&#xA;    xd = x2 - x1&#xD;&#xA;    yd = y2 - y1&#xD;&#xA;    len = sqrt(xd*xd + yd*yd)&#xD;&#xA;&#xD;&#xA;Now we can test the trivial cases:&#xD;&#xA;    &#xD;&#xA;    if (xd == 0) // exactly vertical&#xD;&#xA;    if (yd == 0) // exactly horizontal&#xD;&#xA;    if (abs(xd) == abs(yd)) // exactly diagonal&#xD;&#xA;    &#xD;&#xA;Otherwise, we'll need to round a bit.. First, let's see which way the axes are going&#xD;&#xA;    &#xD;&#xA;    xsign = (x &gt; 0) ? 1 : -1&#xD;&#xA;    ysign = (y &gt; 0) ? 1 : -1&#xD;&#xA;&#xD;&#xA;Now, let's check the x major case.&#xD;&#xA;&#xD;&#xA;    // x major&#xD;&#xA;    if (abs(xd) &gt; abs(yd))&#xD;&#xA;    {&#xD;&#xA;      d = yd / xd&#xD;&#xA;      if (floor(d+0.5) == 0)&#xD;&#xA;      {&#xD;&#xA;        // about horizontal&#xD;&#xA;        yd = 0&#xD;&#xA;        xd = len * xsign&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        // about diagonal&#xD;&#xA;        xd = len / sqrt(2) * xsign&#xD;&#xA;        yd = len / sqrt(2) * ysign&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And similarly the y major case.&#xD;&#xA;&#xD;&#xA;    // y major&#xD;&#xA;    if (abs(yd) &gt; abs(xd))&#xD;&#xA;    {&#xD;&#xA;      d = xd / yd&#xD;&#xA;      if (floor(d+0.5) == 0)&#xD;&#xA;      {&#xD;&#xA;        // about vertical&#xD;&#xA;        xd = 0&#xD;&#xA;        yd = len * ysign&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        // about diagonal&#xD;&#xA;        yd = len / sqrt(2) * ysign&#xD;&#xA;        xd = len / sqrt(2) * xsign&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Finding all the steps between these is a matter of building a line-drawing algorithm from (x1),(y1) to (x1+xd),(y1+yd)." />
  <row Id="16843" PostHistoryTypeId="5" PostId="2681" RevisionGUID="54203dc2-b1a8-452c-bd44-a0b296b26777" CreationDate="2011-02-08T12:19:28.167" UserId="488" Comment="added note about the opensource.com article that was based on this answer." Text="Without referring to any of my previous projects, I can say that I've been involved with a great deal of open source activities, game-related and otherwise, and by and large I have thoroughly enjoyed the ride. Right now I'm a manager with the jMonkeyEngine project. I'll be glad to type up somewhat of an 'introduction to open source games', but bear in mind this will by no means be an exhaustive list of resources.&#xD;&#xA;&#xD;&#xA;I highly recommend checking out [similar pages][1] for all of the links I provide.&#xD;&#xA;&#xD;&#xA;Free, open source etc. - The subtle differences&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;It's worth merely noting that there are some differences to terms like 'free' (vs 'gratis'), 'open source', and 'free software'. The GNU project has a good but somewhat one-sided take on it, titled [Open Source Misses The Point][2]. Simply put though, I'd say the most damaging misconception about open source is that you're not supposed to make any money off of it.&#xD;&#xA;&#xD;&#xA;Point is, even if you're giving away your code as well as your art assets (though copyrighted art assets could be a good way to make an essential part of your game proprietary, without really damaging its technical 'openness') for free, that doesn't mean you can't commercialize other parts of your project.&#xD;&#xA;&#xD;&#xA;There's another gamedev thread here that'll hopefully bring in many good ideas on [how to commercialize a free game][3].&#xD;&#xA;&#xD;&#xA;Independent preparation&#xD;&#xA;-----------------------&#xD;&#xA;&#xD;&#xA;If you want to sharpen your talents before getting involved with a group of fellow developers, 'try make your own game' is a no-brainer, and there's no shortage of open source engines (see [devmaster.net/engines][4] and [wikipedia.org/wiki/List_of_game_engines][5]). If you're looking for a little motivational push though, there's nothing like a little bit of competition:&#xD;&#xA;&#xD;&#xA; - [Ludum Dare][6] - Frequently hosted 48h game competitions.&#xD;&#xA; - [GameJolt][7] - Infrequently hosts uniquely themed competitions. You can also upload your finished games there for free promotion.&#xD;&#xA; - [GameCareerGuide's Game Design Challenges][8] - Although not always requiring programming, GCG's weekly challenges open up a lot of opportunity for networking and unique concepts.&#xD;&#xA;&#xD;&#xA;Find a project&#xD;&#xA;-----------------&#xD;&#xA;&#xD;&#xA;There are plenty of places to look, and it's been a while since I was on the lookout, but I reckon most of the hobbyist projects (because that's what every open source game project is right now) make an appearance at either of these waterholes:&#xD;&#xA;&#xD;&#xA; - [GameDev.net - Help Wanted][9] or&#xD;&#xA; - [IndieDB - Jobs][10] (they also have a&#xD;&#xA;   [recruiting forum][11], I dunno why).&#xD;&#xA;&#xD;&#xA; Remember, progress is the best sign of promise; look for it. Speaking of which...&#xD;&#xA;&#xD;&#xA;Choose a project&#xD;&#xA;--------------&#xD;&#xA;&#xD;&#xA;Choosing the right project that matches your particular skillset and interests (no one's gonna want to work with you if you're not enthusiastic about the game you're making) can prove to be quite the challenge. Take your time, and for the love of all that is good pick (or start, but I'll get back to that) a project that looks perfectly achievable within just a couple months time, at most. There are disappointingly few of these around, but for a first-time open source project it comes highly recommended.&#xD;&#xA;&#xD;&#xA;**Extra pointers:**&#xD;&#xA;&#xD;&#xA; 1. Don't start out too picky; look in&#xD;&#xA;    different sites, consider odd&#xD;&#xA;    genres, get to know the width of&#xD;&#xA;    your skill-sets and interests.&#xD;&#xA; 2. Consider scope. How much time are&#xD;&#xA;    you willing to commit? How soon do&#xD;&#xA;    you want to see the project finish? Any pending time-sinkholes (studies, work, life commitment) worth factoring in?&#xD;&#xA; 3. Start by talking. Exchange at least&#xD;&#xA;    1000 words with someone involved&#xD;&#xA;    in a given project before finally making up&#xD;&#xA;    your mind.&#xD;&#xA; 4. Now stick with it and bring it to&#xD;&#xA;    the finishline!&#xD;&#xA;&#xD;&#xA;A great thing about open source projects is the low barrier to entry. There's loads of ways to contribute to a project besides applying your key skills. Here's [a list I made][12] for my own project. (I might rewrite and relocate that to a 'neutral' domain soon). I'm not a programmer myself, so I spend a lot of my time doing 'miscellaneous' tasks like listed there.&#xD;&#xA;&#xD;&#xA;Honestly, the 'open source games' complete/incomplete ratio could use a boost. The beauty of transparency and open source though is that 'incomplete' is far from 'unsuccessful' so long as you make the most out of the ride.&#xD;&#xA;&#xD;&#xA;**Update:** Also see my closely related [article on opensource.com][13], which is based on this answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.googleguide.com/similar_pages.html&#xD;&#xA;  [2]: http://www.gnu.org/philosophy/open-source-misses-the-point.html&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/297/what-are-some-common-ways-to-generate-revenue-from-a-free-game&#xD;&#xA;  [4]: http://www.devmaster.net/engines/&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/List_of_game_engines&#xD;&#xA;  [6]: http://www.ludumdare.com/&#xD;&#xA;  [7]: http://gamejolt.com/&#xD;&#xA;  [8]: http://www.gamecareerguide.com/features/&#xD;&#xA;  [9]: http://www.gamedev.net/community/forums/forum.asp?forum_id=8&#xD;&#xA;  [10]: http://www.indiedb.com/jobs&#xD;&#xA;  [11]: http://www.indiedb.com/jobs&#xD;&#xA;  [12]: http://www.jmonkeyengine.com/wiki/doku.php/contribute&#xD;&#xA;  [13]: http://opensource.com/life/11/2/open-source-games-it%E2%80%99s-team-effort" />
  <row Id="16844" PostHistoryTypeId="2" PostId="8262" RevisionGUID="b285f521-c53a-4ef3-8692-e41aceb84e39" CreationDate="2011-02-08T12:24:57.337" UserId="4264" Text="There's one good reason not to use the scene graph as the container for game objects, and that's instancing. If you want to reuse some resources, it makes much more sense to just refer to the resource from your scene graph several times than to have several actual copies." />
  <row Id="16845" PostHistoryTypeId="2" PostId="8263" RevisionGUID="f06fed78-dee1-42af-98cc-c50abc0fa0a8" CreationDate="2011-02-08T12:32:08.267" UserId="4264" Text="If you have 10000 separate objects, the bottleneck is probably primitive count, not vertex, polygon, or fill. Bake your objects into smaller number of higher polygon objects for speed.&#xD;&#xA;&#xD;&#xA;Minecraft has a concept of blocks of cubes, but I can't find the reference at the moment.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://iki.fi/sol/instancing.html&quot;&gt;Here's&lt;/a&gt; also my experiments on drawing tons of cubes with various techniques. Doesn't include baking (yet)." />
  <row Id="16846" PostHistoryTypeId="4" PostId="8160" RevisionGUID="64a8cb8d-9e08-47cb-98c7-fc9ade1b7cf7" CreationDate="2011-02-08T13:09:46.120" UserId="189" Comment="Removed double &quot;is&quot; in title" Text="Is C++ being replaced by C# in industry games?" />
  <row Id="16847" PostHistoryTypeId="2" PostId="8264" RevisionGUID="6769be5b-cbf8-4962-b543-6d6fa07a3d91" CreationDate="2011-02-08T13:31:02.663" UserId="1352" Text="Separating your objectmodel and viewmodel(your scenegraph) is usually a good idea.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See [this][1] article on the subject.&#xD;&#xA;&#xD;&#xA;Among many things this will allow for the use of object pools. Which might be essensial for efficient memory managment.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Model_View_ViewModel" />
  <row Id="16851" PostHistoryTypeId="2" PostId="8266" RevisionGUID="c40b6597-92d8-48b1-8a3c-9d8a3f51952a" CreationDate="2011-02-08T13:58:20.477" UserId="3995" Text="I'm looking for a name for my class that manipulates matrix4*4s that handle position rotation and scale. Is there a word that encompasses all three?&#xD;&#xA;&#xD;&#xA;(Because i'm splitting the matrix math into its own file/class)" />
  <row Id="16852" PostHistoryTypeId="1" PostId="8266" RevisionGUID="c40b6597-92d8-48b1-8a3c-9d8a3f51952a" CreationDate="2011-02-08T13:58:20.477" UserId="3995" Text="Is there for a name for position and rotation (and scale)" />
  <row Id="16853" PostHistoryTypeId="3" PostId="8266" RevisionGUID="c40b6597-92d8-48b1-8a3c-9d8a3f51952a" CreationDate="2011-02-08T13:58:20.477" UserId="3995" Text="&lt;math&gt;&lt;matrix&gt;&lt;design&gt;" />
  <row Id="16854" PostHistoryTypeId="2" PostId="8267" RevisionGUID="8fe8bab4-0c87-4914-b2b0-eadb98f52aae" CreationDate="2011-02-08T13:59:41.157" UserId="4129" Text="transform.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Transformation_matrix" />
  <row Id="16855" PostHistoryTypeId="2" PostId="8268" RevisionGUID="223c5f67-350d-4445-9762-033427806d9b" CreationDate="2011-02-08T14:00:25.400" UserId="4264" Text="I've seen PRS used (position, rotation, scale), but &quot;transformation matrix&quot; is a pretty informative name, and also covers other kinds of transformations (skewing etc)." />
  <row Id="16856" PostHistoryTypeId="2" PostId="8269" RevisionGUID="938d0a8a-cba2-443e-b217-013e4e1c026b" CreationDate="2011-02-08T14:14:35.887" UserId="5250" Text="If you compare the y values at the same x position, it will work every time. So, do not compare center to center. Instead compare the center of one sprite with the same x position on the other sprite.&#xD;&#xA;&#xD;&#xA;But, this requires some geometry data for each sprite. It could be as easy as two points from the left to right sides that describes the lower boundary for the sprite. Or, you could analyze the sprites image data and find the first pixel that is not transparent." />
  <row Id="16857" PostHistoryTypeId="25" PostId="8266" RevisionGUID="1489e603-6619-4b67-92cd-cd564a245bd1" CreationDate="2011-02-08T14:16:27.030" Comment="http://twitter.com/#!/StackGameDev/status/34978869085741056" />
  <row Id="16858" PostHistoryTypeId="2" PostId="8270" RevisionGUID="d83285f8-c4de-466e-8e90-e94331de6a7a" CreationDate="2011-02-08T15:05:12.603" UserId="51" Text="I've seen several engines shorten the term to `Xform` as well." />
  <row Id="16861" PostHistoryTypeId="2" PostId="8271" RevisionGUID="9e29825c-6aba-468a-8f8c-c223eb376041" CreationDate="2011-02-08T15:31:39.703" UserId="5251" Text="I have recently built a turn based strategy game similar to Master of Orion (it's only single player right now, multi-player would be a bit more complex, but a similar idea), here is what my endTurn function logic looks like (in my main Game Controller class):&#xD;&#xA;&#xD;&#xA;    //for all computer players:&#xD;&#xA;    computerTakeTurn(player)&#xD;&#xA;    &#xD;&#xA;    //for all players&#xD;&#xA;    moveShips(player)&#xD;&#xA;    &#xD;&#xA;    //for all players&#xD;&#xA;    endTurn(player)//see this function below&#xD;&#xA;    &#xD;&#xA;    //for all planets&#xD;&#xA;    planet.repairFleet()&#xD;&#xA;    &#xD;&#xA;    //for all players&#xD;&#xA;    resolvePlanetaryConflicts(player)&#xD;&#xA;    &#xD;&#xA;    //check to see if any players were destroyed or if the game is over&#xD;&#xA;    checkPlayerDestroyedAndGameOver()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My player end turn function will perform functions specific to that player that isn't affected by the order it takes place between players:&#xD;&#xA;&#xD;&#xA;    eatAndStarve()&#xD;&#xA;    &#xD;&#xA;    generatePlayerResources()&#xD;&#xA;    &#xD;&#xA;    buildPlayerPlanetImprovements()&#xD;&#xA;    &#xD;&#xA;    growPlayerPlanetPopulation()&#xD;&#xA;&#xD;&#xA;Where appropriate, these functions return status messages and/or trigger events so that the GUI can show what happened during the turn or let the player know a computer was destroyed, etc..." />
  <row Id="16862" PostHistoryTypeId="2" PostId="8272" RevisionGUID="3664464d-9dc7-434c-9624-8d6125e66003" CreationDate="2011-02-08T15:44:55.793" UserId="5251" Text="This depends on the size you designed you application at and what resolutions you want to support, I've played with using a **ScaleTransform** to try getting my 800x600 app down to a smaller size for the windows phone 7 (I ran into other problems while converting my silverlight app to the windows phone 7 sdk so I gave up, but the scaling worked pretty nicely).&#xD;&#xA;&#xD;&#xA;Mike Snow has a very good article on how to do this along with hooking up to the Content_Resized event in your Page:&#xD;&#xA;[Silverlight Tip of the Day #33: How to Scale your entire App and its Elements to your Browsers Size][1]&#xD;&#xA;&#xD;&#xA;You do want to be careful since scaling your app down too small will make certain elements like text too small to read and unusable.&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.silverlight.net/blogs/msnow/archive/2008/08/26/silverlight-tip-of-the-day-33-how-to-scale-your-entire-app-and-its-elements-to-your-browsers-size.aspx" />
  <row Id="16864" PostHistoryTypeId="2" PostId="8273" RevisionGUID="248027b0-8352-4fe3-9084-6b07c61f53f6" CreationDate="2011-02-08T16:34:28.860" UserId="3427" Text="One bottleneck in pygame is actually font rendering. You should not render the same text (with the same font/color) more than once but rather cache the surfaces once rendered and reuse them. Take this into acount if you're using Font.render() alot." />
  <row Id="16865" PostHistoryTypeId="2" PostId="8274" RevisionGUID="7147ad69-0505-4634-b7f4-787ed0c9d3e6" CreationDate="2011-02-08T16:41:34.227" UserId="1430" Text="Some variant of `Transform` or `Transformation` would work." />
  <row Id="16866" PostHistoryTypeId="2" PostId="8275" RevisionGUID="061559fe-9c04-4e01-a5fb-1a531b2c3916" CreationDate="2011-02-08T16:41:55.380" UserId="189" Text="Also make sure to unlock the mouse if the user alt-tabs out of the game and your game somehow still controls the cursor. Don't forget to test for that!&#xD;&#xA;&#xD;&#xA;Otherwise I agree that yours is the standard solution. The alternative is to capture raw mouse input; [MSDN documentation is here][1]. [This Stack Overflow question][2] might help you starting to implement it in Mac and Linux.&#xD;&#xA;&#xD;&#xA;I can't help but recommend against raw input though. I think you would need to test for anomalies and somehow handle all the different types of mice (different DPI, USB vs PS/2, etc.) and have a robust in-game system for sensitivity since raw input bypasses the operating system's mouse settings (acceleration, sensitivity, etc.).&#xD;&#xA;&#xD;&#xA;It seems to me your method is just fine. It's simple (at least, much more simple than raw input) and you haven't indicated that it is broken in any way, so why are you trying to fix it? This almost seems a case of premature optimization. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ms645543(v=vs.85).aspx&#xD;&#xA;  [2]: http://stackoverflow.com/questions/193073/is-there-an-alternative-to-rawinput-in-mac-os-x-linux" />
  <row Id="16867" PostHistoryTypeId="2" PostId="8276" RevisionGUID="6de57197-09ff-4d73-aaeb-12012d47f91c" CreationDate="2011-02-08T16:43:36.517" UserId="653" Text="If you add shear to your list (although rarely used in games), it is generally known in mathematics as an [affine transformation](http://en.wikipedia.org/wiki/Affine_transformation).&#xD;&#xA;&#xD;&#xA;The general term 'transformation' has been mentioned already, is a usually considered a superset and includes projection transformations as well (which are not affine)." />
  <row Id="16868" PostHistoryTypeId="4" PostId="8128" RevisionGUID="4d465bdf-9a55-4877-8eb5-0aa34071d77c" CreationDate="2011-02-08T16:50:37.050" UserId="1430" Comment="title capitalization" Text="Improve mouse movement in first person game" />
  <row Id="16869" PostHistoryTypeId="2" PostId="8277" RevisionGUID="ff7ab385-e041-4ea8-a498-7bb99f11846c" CreationDate="2011-02-08T16:53:55.827" UserId="5253" Text="I want to know what is the norm of loading rendering code.&#xD;&#xA;&#xD;&#xA;Take a button. When the application is loaded, a texture is loaded which has the image of the button on it. When the button is tapped, it then adds a loader into a queue, which is loaded on render thread. It then loads up an array buffer with vertexes and tex coords when render is called. It then adds to a render tree. Then it renders.&#xD;&#xA;&#xD;&#xA;the render function looks like this&#xD;&#xA;&#xD;&#xA;    void render()&#xD;&#xA;    {&#xD;&#xA;        update();&#xD;&#xA;        mBaseRenderer-&gt;render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`update()` is when the queue is checked to see if anything needs loading.&#xD;&#xA;`mBaseRenderer-&gt;render()` is the render tree.&#xD;&#xA;&#xD;&#xA;What I am asking then is, should I even have the `update()` there at all and instead have everything preloaded before it renders?&#xD;&#xA;If I can have it loaded when need, for instance when there is tap, then how can it be done (My current code causes an `dequeueing buffer error (Unknown error: -75)` which I assume is to do with OpenGL ES and the context)? " />
  <row Id="16870" PostHistoryTypeId="1" PostId="8277" RevisionGUID="ff7ab385-e041-4ea8-a498-7bb99f11846c" CreationDate="2011-02-08T16:53:55.827" UserId="5253" Text="OpenGL ES Loading" />
  <row Id="16871" PostHistoryTypeId="3" PostId="8277" RevisionGUID="ff7ab385-e041-4ea8-a498-7bb99f11846c" CreationDate="2011-02-08T16:53:55.827" UserId="5253" Text="&lt;c++&gt;&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="16872" PostHistoryTypeId="2" PostId="8278" RevisionGUID="257d3249-2af2-4a47-9eec-e165e8363eb9" CreationDate="2011-02-08T17:03:07.687" UserId="2229" Text="Would you help me to clarify, please, what what exactly **should be contained within a Game Scene Graph?** See the following list, please:&#xD;&#xA;&#xD;&#xA; - *Game Actors?* (obvioulsy yes, all the objects changing state should be the major prart of the Scene Graph)&#xD;&#xA; - *Simple static game ojbects?* (I mean ojects places in the background that do not get animated, neither they collide)&#xD;&#xA; - Game *Triggers?*&#xD;&#xA; - Game *Lights?*&#xD;&#xA; - Game *Cameras?*&#xD;&#xA; - Weapon *Bullets?*&#xD;&#xA; - Game Explosions and *Special Effects?*&#xD;&#xA;&#xD;&#xA;The above considered object types. Now to the **coverage of the Scene Graph:**&#xD;&#xA;&#xD;&#xA; - Should Scene Grap contain the **whole game level map** since the level start, or should it contain only the **visible portion of the map?** If the second is true, it would mean that scene graph would be continuously updated, by adding/removing game objects, as the player moves. However, containing only the visible are of the map obviously would be much faster to traverse and update." />
  <row Id="16873" PostHistoryTypeId="1" PostId="8278" RevisionGUID="257d3249-2af2-4a47-9eec-e165e8363eb9" CreationDate="2011-02-08T17:03:07.687" UserId="2229" Text="Game Scene Graph Content" />
  <row Id="16874" PostHistoryTypeId="3" PostId="8278" RevisionGUID="257d3249-2af2-4a47-9eec-e165e8363eb9" CreationDate="2011-02-08T17:03:07.687" UserId="2229" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;scene-graph&gt;" />
  <row Id="16875" PostHistoryTypeId="2" PostId="8279" RevisionGUID="1689d26f-0bc4-45b8-804d-91b44da784ba" CreationDate="2011-02-08T17:14:44.780" UserId="1430" Text="**In general** I think you should pre-load all the assets you are going to need immediate access to -- UI-related assets, especially -- otherwise your application may feel unresponsive and laggy as the user has to wait for load requests to queue up and complete the first time they click on any bit of UI. &#xD;&#xA;&#xD;&#xA;You can subdivide your assets into two classes: important ones that must be loaded as soon as possible, and less-important ones that can be delay loaded. The critical assets should be loaded immediately (if you have enough of them that it introduces a delay in your application start up, place this loading behind a loading screen of some sort perhaps). The rest of them can be loaded lazily on a background thread.&#xD;&#xA;&#xD;&#xA;This latter class of delay-loadable assets typically corresponds to in-game or other gameplay-related stuff, so if the background load queue isn't finished by the time the game starts, you can put up another load screen if you need to in order to get everything in-memory and prepared so that when actually rendering you don't have to worry about it.&#xD;&#xA;&#xD;&#xA;*Admittedly*, however, loading screens are kind of lame. If you really want to avoid them, you can implement a streaming asset system. In order to do that you'll need a fair bit more information about what assets you're going to need *before* you need them, so you'll still need to know which assets are high-priority UI-related files. Even in a streaming system you want to get the assets you need loaded as early as possible and not wait until they have to be loaded on-demand, unless such on-demand loading is fast enough for your platform.&#xD;&#xA;&#xD;&#xA;An old, but relatively classic, paper on streaming systems can be found [here][1], discussing the streaming world implementation used in Dungeon Siege.&#xD;&#xA;&#xD;&#xA;**In your specific case** it sounds like you have a very unusual process. From the description in your question it sounds like the geometry and texture coordinates (et cetera) are not loaded for the button until the user taps on it. But if that is the case, how did the button appear at all for the user to tap on? You must have had some geometry and texture coordinates loaded already, so it doesn't seem like you'd need to load anything else. The vertex data should be the same for both the unpressed and pressed button states -- the only thing different should be the image.&#xD;&#xA;&#xD;&#xA;You can use [sprite sheets][2] to pack multiple images into one texture and thus avoid having to manage the load of multiple texture assets per button. This will also mean that you only need to adjust the texture coordinates in the existing vertex buffer data for the button, or, if you're using ES 2.0 and have access to shaders, just offset the texture coordinates in the shader code as needed to access a different &quot;frame&quot; in the sprite sheet texture.&#xD;&#xA;&#xD;&#xA;Essentially, it does not sound like your `update` method is necessary and in fact sounds to me like you're over-complicating your code by having it, so I would remove it in favor of pre-loaded assets and a simpler UI codepath that does not create new geometry for every button state. You might also see if loading the assets you need on-demand is fast enough do simply do exactly when you need it (it might be, although I wouldn't really recommend such an approach since it may not scale well).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://scottbilas.com/files/2003/gdc_san_jose/continuous_world_paper.pdf&#xD;&#xA;  [2]: http://www.droidnova.com/2d-sprite-animation-in-android,471.html" />
  <row Id="16876" PostHistoryTypeId="2" PostId="8280" RevisionGUID="1427d88e-6d79-4314-b943-c8b83de4c938" CreationDate="2011-02-08T17:32:57.400" UserId="2332" Text="I think a good bit of reading up on what other scene graph technologies are doing would yield a lot of benefits for you.&#xD;&#xA;&#xD;&#xA;**Background**  &#xD;&#xA;For example, look at the Ogre3D description. It is a scene graph based graphics engine which is open source. I would suggest looking at the tutorials and see how scene nodes are being used (Note: I'm not telling you to learn how to use Ogre, rather what features are present in Ogre's scene nodes and scene managers)&#xD;&#xA;&#xD;&#xA;SceneNode documentation:  &#xD;&#xA;http://www.ogre3d.org/docs/api/html/classOgre_1_1SceneNode.html&#xD;&#xA;&#xD;&#xA;SceneManager documentation:&#xD;&#xA;http://www.ogre3d.org/docs/api/html/classOgre_1_1SceneManager.html&#xD;&#xA;&#xD;&#xA;Something else worth looking at is the following link:  &#xD;&#xA;http://sgl.sourceforge.net/#features&#xD;&#xA;&#xD;&#xA;It is an OpenGL based scene graph solution and the features page there shows all of the nodes that it can contain.&#xD;&#xA;&#xD;&#xA;**Your Suggested Nodes**  &#xD;&#xA;I'm of the opinion that a scene graph should be as abstracted away as much as possible from the game logic so you don't have any dependency issues. For each of your bullet points I would say the following:&#xD;&#xA;&#xD;&#xA;*Game Actors*  &#xD;&#xA;I'd probably say no. Similar to Ogre, I would have a base Entity class (which would contain the object specific logic) and a base SceneNode with an Entity member pointer to get the appropriate information to render the object (Position, Orientation, etc)&#xD;&#xA;&#xD;&#xA;*EDIT: I'm not saying to not include your game actors in the scene graph here (otherwise nothing would show up :P) I'm saying to have a scene node with a reference to the logical game actor class, so you've still got loose coupling of the rendering and updating of game objects.*&#xD;&#xA;&#xD;&#xA;*Simple static game ojbects*  &#xD;&#xA;Yes&#xD;&#xA;&#xD;&#xA;*Game Triggers?*  &#xD;&#xA;No, this sounds like game specific logic to me.&#xD;&#xA;&#xD;&#xA;*Game Lights?*  &#xD;&#xA;Yes&#xD;&#xA;&#xD;&#xA;*Game Cameras?*  &#xD;&#xA;Yes&#xD;&#xA;&#xD;&#xA;*Weapon Bullets?*  &#xD;&#xA;Not completely certain about this one, but I'd probably say yes, but you'd probably want all bullets as children to a &quot;BulletCollection&quot; parent scene node, just so you can cache that position and you won't have to traverse the scene graph much to remove and add bullets to render.&#xD;&#xA;&#xD;&#xA;*Game Explosions and Special Effects?*  &#xD;&#xA;Not certain, I'll let someone else answer that.&#xD;&#xA;&#xD;&#xA;**Scene Graph Coverage**  &#xD;&#xA;If you have a relatively small level, you should be able to store the entire level in a scene graph and then optimize for visibility using an Octree (usually for outdoor environments) or a BSP tree (usually for indoor environments).&#xD;&#xA;&#xD;&#xA;If you have a much larger level and you don't want to do any level loading, this is where streaming would come into play, but that's another issue entirely. I'd start out with a small level and incrementally see how large you can make it without adversely affecting performance.&#xD;&#xA;&#xD;&#xA;**Conclusion**  &#xD;&#xA;To me a scene graph is for the Render portion of a game loop. You shouldn't couple your rendering and your logic updates too closely together, otherwise you're going to run into annoying dependency issues." />
  <row Id="16877" PostHistoryTypeId="2" PostId="8281" RevisionGUID="6435a541-b84f-479e-a3e2-9aefb5fe050f" CreationDate="2011-02-08T17:33:36.293" UserId="1430" Text="**My inclination is to suggest putting *fewer* things in a scene graph.** See in particular this article by Tom Forsyth: &quot;[Scene Graphs -- Just Say No][1].&quot;&#xD;&#xA;&#xD;&#xA;The crux of Forsyth's article is that you shouldn't be trying to cram a bunch of unrelated stuff into one big master data structure. This is much akin to the ideas that I touched on [in this answer][2] as regards deriving everything in the game from `GameObject` and then shoving it all in one big heterogeneous list (which is to say, that's bad).&#xD;&#xA;&#xD;&#xA;Relatively few objects in the world truly exhibit a strong parent-child relationship as befits a tree structure. The canonical example of a coffee cup on a table is usually used here -- sure, you could consider it to be a 'child' of the table... at least until it gets knocked off. Then is it really still a child of the table? This means your 'tree' can end up pretty shallow and kind of degenerates to a list anyhow.&#xD;&#xA;&#xD;&#xA;**So I would suggest you use multiple data structures for multiple things, as makes the most sense for those things.** Static geometry and lights, for example, seem like a reasonable thing to shove into a scene graph. Even if the represented objects don't have natural parent-child relationships, the fact that they are static means you can give them structural parent-child relationships knowing that they never change.&#xD;&#xA;&#xD;&#xA;Game actors... I'm not so sure about. Anything that tends to move, in fact, means you usually need to keep them near the root of the graph or re-parent them constantly (which is a chore and not super efficient).&#xD;&#xA;&#xD;&#xA;Bullets, triggers, special effects and other transient objects I would store elsewhere. Nothing that renders or has a visual representation (a trigger is typically an invisible bounding volume, a bullet is usually just a ray-cast) should be in a render graph. **You should strive for separation of render and logic layers**.&#xD;&#xA;&#xD;&#xA;For what it's worth, I have never used a tree-like scene graph in any of the renderers I have built for non-academic use (obviously I have built tree-like scene graphs before, which is how I came to the conclusions that I am now attempting to get you to agree with). &#xD;&#xA;&#xD;&#xA;I use spatial partitioning methods that are appropriate to the style of game (quad-tree, octree, BSP, et cetera) to group/cull the logical entities in the game that are should be (a) processed this frame and (b) rendered this frame. I then end up feeding the set of objects from list (b) into a system that maps logical objects to render descriptions and sorts those descriptions into buckets based on properties (for example, anything that uses transparency will be shoved into the bucket for &quot;stuff that should be rendered back-to-front). Then I render every bucket in order, and for each bucket render every description in order. I guess you could call this a &quot;tree,&quot; but it's doesn't exhibit the typical state/transform propagation methods that traditional tree-oriented scene graphs do. YYMV, because the system certainly has deficiencies, but it works pretty well for me.&#xD;&#xA;&#xD;&#xA;  [1]: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BScene%20Graphs%20-%20just%20say%20no%5D%5D&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8186/optimal-game-loop-for-2d-side-scroller/8189#8189" />
  <row Id="16878" PostHistoryTypeId="5" PostId="8278" RevisionGUID="ba3bca54-7a64-4595-944c-5117b93b77a0" CreationDate="2011-02-08T17:51:11.570" UserId="1430" Comment="spelling and capitalization, reformatted title in the form of a question" Text="Would you help me to clarify, please, what what exactly **should be contained within a game scene graph?** See the following list, please:&#xD;&#xA;&#xD;&#xA; - *Game Actors?* (obviously yes, all the objects changing state should be the major prart of the Scene Graph)&#xD;&#xA; - *Simple static game ojbects?* (I mean ojects places in the background that do not get animated, neither do they collide)&#xD;&#xA; - Game *Triggers?*&#xD;&#xA; - Game *Lights?*&#xD;&#xA; - Game *Cameras?*&#xD;&#xA; - Weapon *Bullets?*&#xD;&#xA; - Game Explosions and *Special Effects?*&#xD;&#xA;&#xD;&#xA;The above considered object types. Now to the **coverage of the scene graph:**&#xD;&#xA;&#xD;&#xA; - Should a scene graph contain the **whole game level map** since the level start, or should it contain only the **visible portion of the map?** If the second is true, it would mean that scene graph would be continuously updated, by adding/removing game objects, as the player moves. However, containing only the visible are of the map obviously would be much faster to traverse and update." />
  <row Id="16879" PostHistoryTypeId="4" PostId="8278" RevisionGUID="ba3bca54-7a64-4595-944c-5117b93b77a0" CreationDate="2011-02-08T17:51:11.570" UserId="1430" Comment="spelling and capitalization, reformatted title in the form of a question" Text="What should be contained in a game scene graph?" />
  <row Id="16880" PostHistoryTypeId="2" PostId="8282" RevisionGUID="74583230-9631-4a37-8ea5-f3ba97410975" CreationDate="2011-02-08T18:26:59.820" UserId="1198" Text="Not sure how popular it is now, but before Counter-Strike: Source (and even somewhat after), there used to be loads of what were called &quot;rats&quot; maps. Basically they were maps where the scale and texture of the world was designed to make the player feel like they were a rat in a kitchen or some other environment. &#xD;&#xA;&#xD;&#xA;While the gameplay was generally still very Counter-Strike like it may not be what you're looking for, but it may help give you some ideas on general concepts of the player being in a world where every day looking objects are huge." />
  <row Id="16881" PostHistoryTypeId="2" PostId="8283" RevisionGUID="d995f821-4502-45ac-a67e-b884dfe8ca16" CreationDate="2011-02-08T18:34:06.070" UserId="1021" Text="I'm porting an iPhone game to the iPad.  When I move textures &quot;quickly&quot; (5.0 pixels every update at a rate of 60 Hz) I start to see little &quot;artifacts&quot; or remnants of where the texture used to be.  I'm not sure if I know the correct terminology for this... imagine a texture at some location on the screen... then next to it is the same texture but faded a bit... then the same texture again just faded a bit more.&#xD;&#xA;&#xD;&#xA;I'm using CADisplayLink to drive my update loop if that helps.  Also I didn't see this issue on the 3G or the iPhone 4.  Any ideas?&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="16882" PostHistoryTypeId="1" PostId="8283" RevisionGUID="d995f821-4502-45ac-a67e-b884dfe8ca16" CreationDate="2011-02-08T18:34:06.070" UserId="1021" Text="Beginner OpenGL ES issue" />
  <row Id="16883" PostHistoryTypeId="3" PostId="8283" RevisionGUID="d995f821-4502-45ac-a67e-b884dfe8ca16" CreationDate="2011-02-08T18:34:06.070" UserId="1021" Text="&lt;iphone&gt;&lt;graphics&gt;&lt;opengl-es&gt;&lt;ipad&gt;&lt;cadisplaylink&gt;" />
  <row Id="16884" PostHistoryTypeId="2" PostId="8284" RevisionGUID="17d4162c-3075-4fc5-856a-ac06cbc810a9" CreationDate="2011-02-08T18:37:36.180" UserId="1230" Text="The method I ended up using is to: &#xD;&#xA;&#xD;&#xA;1. Get the vector from the start point to the end point &#xD;&#xA;2. Get the angle of that vector&#xD;&#xA;3. Snap that angle to a multiple of 45 degrees&#xD;&#xA;4. Create a new vector with the same magnitude as the starting velocity but rotated by the snapped angle amount&#xD;&#xA;5. Add this vector to the start point to get the snapped end point&#xD;&#xA;&#xD;&#xA;The code I'm using, in Lua is:&#xD;&#xA;&#xD;&#xA;    function snapEndpoint(startpos, endpos)&#xD;&#xA;      -- startpos and endpos are vectors&#xD;&#xA;      local velocity = endpos - startpos&#xD;&#xA;      local step = math.rad(45)&#xD;&#xA;&#xD;&#xA;      local angle = -math.atan2(-velocity.y, velocity.x)&#xD;&#xA;&#xD;&#xA;      local snapped = (round(angle / step) % 8) * step&#xD;&#xA;&#xD;&#xA;      local base = vector(1, 0) * round(velocity:len())&#xD;&#xA;      local tmp = startpos + base:rotated(snapped)&#xD;&#xA;&#xD;&#xA;      return vector(round(tmp.x), round(tmp.y))&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;This gives me the end point of line segment that snaps to 45 degree angles and is the correct length. If I then use the start and end point with Bresenham's Algorithm I can generate a list of points within the line. &#xD;&#xA;&#xD;&#xA;This list of points is always returned in left-to-right, top-to-bottom order. I can look at the direction of the original line and, based on that, reverse the order of the returned points to get an ordered selection.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16887" PostHistoryTypeId="5" PostId="7812" RevisionGUID="02f3cdfc-5a1b-440d-9d62-d7334ccad144" CreationDate="2011-02-08T18:44:02.777" UserId="962" Comment="deleted 98 characters in body; edited title" Text="I would like to do a first person shooter game and move the camera with the mouse. The problem is that when the cursor reaches the limits of the screen the camera won't turn anymore. How can I keep the mouse centered and detect its movements anyway?" />
  <row Id="16888" PostHistoryTypeId="4" PostId="7812" RevisionGUID="02f3cdfc-5a1b-440d-9d62-d7334ccad144" CreationDate="2011-02-08T18:44:02.777" UserId="962" Comment="deleted 98 characters in body; edited title" Text="Mouse aim in a FPS game" />
  <row Id="16889" PostHistoryTypeId="2" PostId="8286" RevisionGUID="715812c6-8d34-4f1f-91c1-ce570c7ffa9f" CreationDate="2011-02-08T18:49:31.927" UserId="5119" Text="Game-object style of programming is fine for smaller projects.As the project becomes really huge you will end up with deep inheritance hierarchy and the Game-object base will become really heavy!&#xD;&#xA;           &#xD;&#xA;   As an example... Suppose you started creating Game-object base with minimum attributes say Position(for x and y),displayObject(this refers to the image if its a drawing element),width,height etc...&#xD;&#xA;&#xD;&#xA;Now later on if we need to add a sub class which will have an animation state,then you probably move 'animation control code' (say currentAnimationId,Number of frames for this animation,etc..) to GameObjectBase in the thought that most of the objects will have animation.  &#xD;&#xA; Later if you want to add a rigid body which is static (doesn't have any animation),you need to check the 'animation control code'in the update function of GameObject Base(eventhough its a check whether animation is there or not...it matters!) &#xD;&#xA;    Contrary to this if you follow Component based Structure, you will have a 'animation Control Component' attached to your object.If its needed you will attach it.For a Static body you will not attach that component.This way, we can avoid un-necessary checks.&#xD;&#xA;&#xD;&#xA;So, the selection of choosing the style depends on the size of the project.GameObject structure is only easy to master for smaller projects.Hope this helps a bit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;" />
  <row Id="16890" PostHistoryTypeId="2" PostId="8287" RevisionGUID="ed3d82ed-c215-490e-ba7d-1724a9231c6c" CreationDate="2011-02-08T19:07:00.470" UserId="-1" Text="" />
  <row Id="16891" PostHistoryTypeId="2" PostId="8288" RevisionGUID="57195708-0041-43c6-9277-ea158f7eb990" CreationDate="2011-02-08T19:07:00.470" UserId="-1" Text="" />
  <row Id="16892" PostHistoryTypeId="6" PostId="8231" RevisionGUID="08f04740-2261-4c09-a499-7c189836a077" CreationDate="2011-02-08T19:09:04.703" UserId="2536" Comment="edited tags" Text="&lt;windows&gt;&lt;3d-meshes&gt;&lt;gimp&gt;&lt;maya&gt;" />
  <row Id="16893" PostHistoryTypeId="2" PostId="8289" RevisionGUID="7bca6895-f808-4a6e-a5fe-d4be35f9b27f" CreationDate="2011-02-08T19:09:53.657" UserDisplayName="user4474" Text="What does a rim shader do and what is it used for? In what cases would it make sense to utilize a rim shader?" />
  <row Id="16894" PostHistoryTypeId="1" PostId="8289" RevisionGUID="7bca6895-f808-4a6e-a5fe-d4be35f9b27f" CreationDate="2011-02-08T19:09:53.657" UserDisplayName="user4474" Text="What is a rim shader used for?" />
  <row Id="16895" PostHistoryTypeId="3" PostId="8289" RevisionGUID="7bca6895-f808-4a6e-a5fe-d4be35f9b27f" CreationDate="2011-02-08T19:09:53.657" UserDisplayName="user4474" Text="&lt;shaders&gt;" />
  <row Id="16896" PostHistoryTypeId="2" PostId="8290" RevisionGUID="133b9b79-2b10-40f3-aa34-ded54f01e856" CreationDate="2011-02-08T19:23:31.470" UserId="3677" Text="I want a straight 3d/2d Python engine. Easily obtainable for linux and easy to use.&#xD;&#xA;&#xD;&#xA;I tried soya3d which failed for me because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;I also really want to be able to load common 3d models with out an issue.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;John" />
  <row Id="16897" PostHistoryTypeId="1" PostId="8290" RevisionGUID="133b9b79-2b10-40f3-aa34-ded54f01e856" CreationDate="2011-02-08T19:23:31.470" UserId="3677" Text="Best Python 3d Engline" />
  <row Id="16898" PostHistoryTypeId="3" PostId="8290" RevisionGUID="133b9b79-2b10-40f3-aa34-ded54f01e856" CreationDate="2011-02-08T19:23:31.470" UserId="3677" Text="&lt;engine&gt;&lt;python&gt;" />
  <row Id="16899" PostHistoryTypeId="2" PostId="8291" RevisionGUID="cea7c5d3-cf32-41e2-ac06-e23008af8655" CreationDate="2011-02-08T19:29:19.473" UserId="1430" Text="In the context of graphics programming and shaders, a &quot;rim&quot; shader would be one that focuses on achieving a lighting effect related to the silhouette or other feature/contour edges of an object (crudely, &quot;the outline&quot; of the object). Typically this would be to simulate [rim lighting][1] ([more examples][2]), which comes about from [back-lighting][3] a subject.&#xD;&#xA;&#xD;&#xA;I suppose if you wanted to stretch it, you could consider shaders employ other edge-related effects (such as drawing the outlines on cel shaded scenes) &quot;rim shaders&quot; as well, since they do have something to do with the feature edges of the object. More I think more traditionally the term is used to refer to the lighting effect.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dpreview.com/challenges/Challenge.aspx?ID=2072&#xD;&#xA;  [2]: http://www.thephotoargus.com/inspiration/30-beautiful-photographs-from-the-rim-lighting-challenge/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Backlighting_(lighting_design)" />
  <row Id="16900" PostHistoryTypeId="4" PostId="8283" RevisionGUID="46a254de-e6e8-46dc-8367-37ea6d9afac8" CreationDate="2011-02-08T19:37:08.183" UserId="4264" Comment="a bit more descriptive subject" Text="Texture artifacts on iPad" />
  <row Id="16901" PostHistoryTypeId="24" PostId="8283" RevisionGUID="61960bed-94ce-492d-bf8c-d13918ad4035" CreationDate="2011-02-08T19:37:08.183" Comment="Proposed by 4264 approved by 51 edit id of 11" />
  <row Id="16902" PostHistoryTypeId="5" PostId="8287" RevisionGUID="6172c132-120e-478f-ad2d-3abe9a36cecb" CreationDate="2011-02-08T19:37:18.573" UserId="3896" Comment="added 1129 characters in body" Text="Operating system for mobile devices. Developed by Google and the [Open Handset Alliance][7].&#xD;&#xA;&#xD;&#xA;* [Android Developers][1]  &#xD;&#xA;Contains the SDK downloads, documentation, class reference and tutorials. Start here.&#xD;&#xA;&#xD;&#xA;* [Android Developers Google Group][6]  &#xD;&#xA;Alternative developer discussion forum for Android.&#xD;&#xA;&#xD;&#xA;* [Android Open Source Project][2] (a.k.a. AOSP)  &#xD;&#xA;Contains all necessary information about the Android source code.&#xD;&#xA;&#xD;&#xA;* [Android page on Wikipedia][3]  &#xD;&#xA;Detailed information about the Android OS.&#xD;&#xA;&#xD;&#xA;* [Android.com][4]  &#xD;&#xA;General information about the Android OS.&#xD;&#xA;&#xD;&#xA;* [Google I/O developer conference][8]  &#xD;&#xA;Contains detailed videos and slides by Android product engineers&#xD;&#xA;&#xD;&#xA;For non-developer questions, see the [Android Enthusiasts StackExchange][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/&#xD;&#xA;  [2]: http://source.android.com/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Android_(operating_system)&#xD;&#xA;  [4]: http://www.android.com/&#xD;&#xA;  [5]: http://android.stackexchange.com&#xD;&#xA;  [6]: http://groups.google.com/group/android-developers&#xD;&#xA;  [7]: http://www.openhandsetalliance.com/&#xD;&#xA;  [8]: http://www.google.com/events/io/2010/" />
  <row Id="16903" PostHistoryTypeId="24" PostId="8287" RevisionGUID="287f9a4f-508a-46e7-a369-65c8dad3bfe9" CreationDate="2011-02-08T19:37:18.573" Comment="Proposed by 3896 approved by 51 edit id of 9" />
  <row Id="16904" PostHistoryTypeId="5" PostId="8288" RevisionGUID="d52ee259-4b81-474e-90a5-fdc9db733ab9" CreationDate="2011-02-08T19:37:18.883" UserId="3896" Comment="added 102 characters in body" Text="Operating system for mobile devices. For non-developer questions, see http://android.stackexchange.com" />
  <row Id="16905" PostHistoryTypeId="24" PostId="8288" RevisionGUID="843e6c54-8679-42d5-9432-6dad92abd468" CreationDate="2011-02-08T19:37:18.883" Comment="Proposed by 3896 approved by 51 edit id of 10" />
  <row Id="16906" PostHistoryTypeId="25" PostId="8289" RevisionGUID="adb761fc-0082-4849-8e76-25b5b1af1b40" CreationDate="2011-02-08T20:16:26.673" Comment="http://twitter.com/#!/StackGameDev/status/35069464953233409" />
  <row Id="16907" PostHistoryTypeId="2" PostId="8292" RevisionGUID="ce9812cb-7f0e-4725-83dd-40cd35f7d6c4" CreationDate="2011-02-08T20:17:54.630" UserId="5259" Text="Deciding on what type of scene management to use depends very heavily on what type of logic you are trying to run. Consider the different consumers of your scene:&#xD;&#xA;&#xD;&#xA;**Rendering Consumer**&#xD;&#xA;&#xD;&#xA;The renderer probably just wants to know what is currently visible to the user at any given point. It wants a bounding volume hierarchy for fast culling ([BVH wiki article)][1]&#xD;&#xA;so that it can figure out that a chair inside a boat doesn't need to be drawn because the boat's bounds are outside the view frustum. This might be embedded into an [octree][2].&#xD;&#xA;&#xD;&#xA;It also might want to have an idea that the chair is on its back inside the boat, and that the boat is rolling up and down on some waves when it finally comes into view. That way to find the final world coordinates of the chair's vertices it can concatenate the chair and boat transforms and be done with it (this also makes your job as a programmer easier).&#xD;&#xA;&#xD;&#xA;Yet another way of looking at this problem is that the renderer is probably running a good card, and ultimately just wants a pile of triangles sorted so as to minimize texture, shader, material, lighting, and transform state changes. This last will probably help you more than a BVH, preformance-wise.&#xD;&#xA;&#xD;&#xA;**Game Logic Consumer**&#xD;&#xA;&#xD;&#xA;The game logic probably just wants a flat list of things that can talk to each other by a messaging system, so a std::vector is probably fine.&#xD;&#xA;&#xD;&#xA;The game might also want a way of keeping track of who is closest to what, so some sort of [nearest-neighbor][3] information might be helpful in that case. This can be provided by a BVH also, but having to up and down the graph might be annoying.&#xD;&#xA;&#xD;&#xA;The game might even just want to know that when it moves A, A's item B should move too... in which case we are back to a sort of transform hierarchy.&#xD;&#xA;&#xD;&#xA;**Physics Consumer**&#xD;&#xA;&#xD;&#xA;Your game physics might want to have a [special representation][4] of indoor spaces for very fast collision detection. Alternately it might use some sort of octree or [spatial hashing][5] to efficiently find things that might collide.&#xD;&#xA;&#xD;&#xA;None of the above physics data structure really looks like a &quot;scene graph&quot; in the Java3D sense.&#xD;&#xA;&#xD;&#xA;**Audio Consumer**&#xD;&#xA;&#xD;&#xA;An audio engine just wants geometry, perhaps a potentially visible (audible) set, or some sort of bounding volume hierarchy to calculate sound attenuation and propogation. Again, not really a normal sort of scene graph, though it may well be a graph of geometry in your scene.&#xD;&#xA;&#xD;&#xA;**Ultimately...**&#xD;&#xA;...it really just depends on the exact needs of your application. I'd suggest using a flat list to start with, and seeing where your issues arise. You might even try a flat list with a transform hierarchy, because that is perhaps the one sort of scenegraph useful for reasons other than efficiency.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bounding_volume_hierarchy&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="16908" PostHistoryTypeId="2" PostId="8293" RevisionGUID="02bdcd5a-6982-4e95-b0ae-002afd1e6b92" CreationDate="2011-02-08T20:42:12.877" UserId="395" Text="[Panda3D](http://panda3d.org/) is only other one I would really call an engine per se. There are Python bindings for Ogre, but I've heard mixed review of them. Unity can be scripted in Boo which is almost, but not quite, entirely unlike Python." />
  <row Id="16909" PostHistoryTypeId="2" PostId="8294" RevisionGUID="51740e05-0c76-46ab-9284-2d61ebccf8f1" CreationDate="2011-02-08T20:44:40.027" UserId="5260" Text="I would like to clip a triangle if its bounds lie partially out of a cube for this I guess I would need some kind of Triangle Plane intersection code, I'm not well versed with math but I do have the points of the triangle in 3d space (P1, P2, P3).&#xD;&#xA;&#xD;&#xA;How do I get the 2 points of intersection of the triangle with one of the planes of the cube?" />
  <row Id="16910" PostHistoryTypeId="1" PostId="8294" RevisionGUID="51740e05-0c76-46ab-9284-2d61ebccf8f1" CreationDate="2011-02-08T20:44:40.027" UserId="5260" Text="Triangle-Plane intersection in 3D space" />
  <row Id="16911" PostHistoryTypeId="3" PostId="8294" RevisionGUID="51740e05-0c76-46ab-9284-2d61ebccf8f1" CreationDate="2011-02-08T20:44:40.027" UserId="5260" Text="&lt;3d&gt;&lt;triangles&gt;&lt;intersection&gt;" />
  <row Id="16912" PostHistoryTypeId="2" PostId="8295" RevisionGUID="8d49c691-c4b2-4a41-9fc5-65552e7734ac" CreationDate="2011-02-08T20:57:01.367" UserId="5259" Text="I'm not sure it is quite what you are looking for, but this article on spatial hashing is interesting (and has some HLSL code as well): [perfect spatial hashing][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://research.microsoft.com/en-us/um/people/hoppe/perfecthash.pdf" />
  <row Id="16913" PostHistoryTypeId="2" PostId="8296" RevisionGUID="6468056d-99c6-46fe-beaf-2947106deb38" CreationDate="2011-02-08T21:00:12.447" UserId="4679" Text="So I've reached the point in my exploration of gaming where I'd like to impliment the concept of time into my little demo I've been building.&#xD;&#xA;&#xD;&#xA;What are some common methodologies for creating the concept of time passing within a game?&#xD;&#xA;&#xD;&#xA;My thoughts so far:&#xD;&#xA;&#xD;&#xA;My game loop tendes to spend a fair bit of time sitting around waiting or user input so any time system will likely need to be run in a seperate thread.&#xD;&#xA;&#xD;&#xA;What I've currently done is create a `BackgroundWorker` passing in a method that contains a loop triggering every second. This is working fine and I can output information to the console from here etc. Inside this loop I have a `DateTime` object that is incrimented by 1 minute for every realtime second. (the game begins in the year 01/01/01)&#xD;&#xA;&#xD;&#xA;Is this a standard way of acheiving this result or are there more tried and tested methods?&#xD;&#xA;&#xD;&#xA;I'm also curious about how to go about performing time based actions (reducing player energy, moving entities around the game board, life/death etc).&#xD;&#xA;&#xD;&#xA;Thanks for any pointers or advice. I've searched around however I'm not familiar enough with the terms and so my searches are yeilding little result on this one.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16914" PostHistoryTypeId="1" PostId="8296" RevisionGUID="6468056d-99c6-46fe-beaf-2947106deb38" CreationDate="2011-02-08T21:00:12.447" UserId="4679" Text="Creating the concept of Time" />
  <row Id="16915" PostHistoryTypeId="3" PostId="8296" RevisionGUID="6468056d-99c6-46fe-beaf-2947106deb38" CreationDate="2011-02-08T21:00:12.447" UserId="4679" Text="&lt;c#&gt;&lt;multithreading&gt;&lt;gameloop&gt;&lt;text-based&gt;&lt;timer&gt;" />
  <row Id="16916" PostHistoryTypeId="2" PostId="8297" RevisionGUID="16203f50-a111-4a4c-b432-6a0d72e16403" CreationDate="2011-02-08T21:18:16.683" UserId="2492" Text="Both Mario 64 and Banjo Kazooie have parts where objects are sliding down towards you, and also have slope dynamics (where you can climb up a certain grade but slide down others). Although there's no literal roof in these games, you can only jump a certain height. I think the frantic nature of some of these levels would really help for the feel of being inside a pinball machine." />
  <row Id="16917" PostHistoryTypeId="2" PostId="8298" RevisionGUID="efb74401-2a48-4668-9b1b-b105b99fff90" CreationDate="2011-02-08T21:48:42.367" UserId="5259" Text="**[Xith3D][1]**&#xD;&#xA;&#xD;&#xA;   * Cross Platform - **Yes (java)**&#xD;&#xA;   * Wrriten in Java/Scala (JOGL or LWJGL), C# (preferred OpenTK), Python or JavaScript/WebGL. - **Yes (java)**&#xD;&#xA;   * Support for OpenGL is a must. Direct3D is optional. - **Yes (java)**&#xD;&#xA;   * Some material system- **Yes (java)**&#xD;&#xA;   * Full support for some model format with full animation support (preferred COLLADA)- **Yes (.obj,.md2,.md3,.md5,.dae (somewhat), .ase,.3ds, and others)**&#xD;&#xA;   * Level of Detail (LOD) support - **Yes**&#xD;&#xA;   * Lighting support- **Yes**&#xD;&#xA;   * Shaders, GUI, Input and Terrain/Water support are also preferred, but not required - **Yes (no multipass shaders, but otherwise good enough; terrain system does exist; GUI is there and easy to use)**&#xD;&#xA;&#xD;&#xA;Xith3D is a useful Java-based engine in the spirit of Java3D, but with a lot of the crazy and overengineering removed. The community is helpful, and the documentation is a lot better than I've seen for similar projects. Tutorials exist and are succinct.&#xD;&#xA;  [1]: http://xith.org/" />
  <row Id="16918" PostHistoryTypeId="2" PostId="8299" RevisionGUID="855b53b6-bf0d-4754-a3e5-918af8cda347" CreationDate="2011-02-08T22:02:34.450" UserId="2613" Text="Fragile Allegiance was developed by Gremlin Interactive, which was later acquired by Infogrames (Atari). I couldn't find any details of the acquisition though.&#xD;&#xA;&#xD;&#xA;The only interesting thing I have found online is that the owner of the registered trademark Fragile Allegiance is Interplay, who published Fragile Allegiance. However, the only copyright note I've found was in one installation .ini file, claiming it for Gremlin.&#xD;&#xA;&#xD;&#xA;&lt;del&gt;What are the common business practices when it comes to old, unused IPs? What do publishers/developers actually need to legally claim an intellectual property? Does anyone have an experience with contacting big publishers with copyright/IP inquiries?&lt;/del&gt;&#xD;&#xA;&#xD;&#xA;[Related legal question.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems" />
  <row Id="16919" PostHistoryTypeId="1" PostId="8299" RevisionGUID="855b53b6-bf0d-4754-a3e5-918af8cda347" CreationDate="2011-02-08T22:02:34.450" UserId="2613" Text="Who owns the intellectual property to Fragile Allegiance?" />
  <row Id="16920" PostHistoryTypeId="3" PostId="8299" RevisionGUID="855b53b6-bf0d-4754-a3e5-918af8cda347" CreationDate="2011-02-08T22:02:34.450" UserId="2613" Text="&lt;legal&gt;&lt;copyright&gt;" />
  <row Id="16921" PostHistoryTypeId="2" PostId="8300" RevisionGUID="4486268d-54b3-4f4d-8297-acb80e5ac042" CreationDate="2011-02-08T22:47:06.140" UserId="5263" Text="I'm working on a flash game that saves your progress locally. These saves can easily be hacked. My solution is to add an md5 hash of all the variables saved into the save file itself. When loading the save, the game would check if the hash is valid.&#xD;&#xA;&#xD;&#xA;Is this a good soultion? Are there better solutions?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="16922" PostHistoryTypeId="1" PostId="8300" RevisionGUID="4486268d-54b3-4f4d-8297-acb80e5ac042" CreationDate="2011-02-08T22:47:06.140" UserId="5263" Text="Save Security with MD5 Hash" />
  <row Id="16923" PostHistoryTypeId="3" PostId="8300" RevisionGUID="4486268d-54b3-4f4d-8297-acb80e5ac042" CreationDate="2011-02-08T22:47:06.140" UserId="5263" Text="&lt;logic&gt;" />
  <row Id="16924" PostHistoryTypeId="2" PostId="8301" RevisionGUID="7a49474e-17c7-4bfb-830b-375b3ca26dae" CreationDate="2011-02-08T22:52:14.953" UserId="4129" Text="This is not a good solution, since all the values hashed are in the save file.&#xD;&#xA;&#xD;&#xA;If the attacker twiddles something, they just have to recompute the hash and store that in the save file too...&#xD;&#xA;&#xD;&#xA;Saving things locally without any online state tracking is fundamentally non-securable.&#xD;&#xA;&#xD;&#xA;You need an element that is on the server such as HMACing with a key that only the server stores.&#xD;&#xA;&#xD;&#xA;This will not guard against an active attack where the attacker impersonates or otherwise piggybacks a live session however.&#xD;&#xA;&#xD;&#xA;I know people who delight in hacking Flash games btw." />
  <row Id="16925" PostHistoryTypeId="2" PostId="8302" RevisionGUID="0ab5172e-03b8-451f-8e45-047937b7acd7" CreationDate="2011-02-08T22:53:29.473" UserId="4191" Text="The way you have it described, somebody hacking a save file would just need to construct an MD5 hash of the save file values in order to bypass this measure.  You need to add one thing in order for this to even really be worthwhile: a secret chunk of data (a [salt][1]) that's added to what you're hashing.  The mechanism won't be uncrackable or anything at that point, but it'll be resistant to medium-casual tampering.  If you can avoid having the salt be easily extractable from your runtime files using a hex editor, that'll add another notch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Salt_%28cryptography%29" />
  <row Id="16926" PostHistoryTypeId="5" PostId="8302" RevisionGUID="2446c40d-0b40-4ca9-b98d-fb14c287b62d" CreationDate="2011-02-08T22:59:21.480" UserId="4191" Comment="added 183 characters in body" Text="The way you have it described, somebody hacking a save file would just need to construct an MD5 hash of the save file values in order to bypass this measure.  You need to add one thing in order for this to even really be worthwhile: a secret chunk of data (a [salt][1]) that's added to what you're hashing.  The mechanism won't be uncrackable or anything at that point, but it'll be resistant to medium-casual tampering.  If you can avoid having the salt be easily extractable from your runtime files using a hex editor, that'll add another notch.&#xD;&#xA;&#xD;&#xA;If you want people to actually not be able to hack your saves, you cannot perform local saves at all.  You cannot trust the client because the client is in the hands of the enemy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Salt_%28cryptography%29" />
  <row Id="16927" PostHistoryTypeId="25" PostId="8300" RevisionGUID="6e3ff8c5-a3f4-40e4-a56e-01d0c7c90349" CreationDate="2011-02-08T23:16:26.973" Comment="http://twitter.com/#!/StackGameDev/status/35114763398807552" />
  <row Id="16928" PostHistoryTypeId="2" PostId="8303" RevisionGUID="1b6f62e6-dede-448c-8450-f4c7a27d37f0" CreationDate="2011-02-08T23:30:26.480" UserId="2301" Text="That is the standard way of getting the time from C#. And using a BackgroundWorker I think is better than multi threading it in this particular scenario.  &#xD;&#xA;&#xD;&#xA;Though I think the above comments are a bit confused as with most games, there is no waiting around for inputs its always updating. &#xD;&#xA;&#xD;&#xA;It will be hard to perform time based actions when you aren't using a game loop of some type. You might want to reconsider your structure. You could always have the game loop keep running, even if there is no text submitted, and when there finally is you can react upon that text.&#xD;&#xA;&#xD;&#xA;I would either do straight text-based game, or switch over to using a game loop, if you want those added features." />
  <row Id="16929" PostHistoryTypeId="2" PostId="8304" RevisionGUID="98cec2c6-2394-4647-83be-927e604b3170" CreationDate="2011-02-09T00:05:09.207" UserId="4947" Text="If cube is axis-aligned, then it's easy. &#xD;&#xA;&#xD;&#xA;You can compare each vertex of triangle with each face (plane) of cube. If it's out of cube (just compare apropriate coordinates), then find two new points, which lie on line connecting two other vertices with that one out of cube and which lie on plane (their coordinate is same as the plane). This is common linear interpolation. So I think you would handle it.&#xD;&#xA;&#xD;&#xA;But you should be aware of case, which is on picture. Everytime choose point, which is closer to vertex, which is not out of cube (inner vertex). Choose green point, not red (which is closer to vertex out of cube).&#xD;&#xA;![triangle plane intersection][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kTnNA.png&#xD;&#xA;&#xD;&#xA;Well. And if cube is not axis-aligned, you can look here: http://www.softsurfer.com/Archive/algorithm_0105/algorithm_0105.htm#Triangle-Plane&#xD;&#xA;&#xD;&#xA;There is intersection of triangle and plane (not axis aligned). You can use it and test it with all cube faces.&#xD;&#xA;&#xD;&#xA;I hope I answered your question. If not, then punch me and ask again :)" />
  <row Id="16930" PostHistoryTypeId="2" PostId="8305" RevisionGUID="d4d2853a-8e37-4bfc-9316-c7d8d3c34e95" CreationDate="2011-02-09T00:08:05.303" UserId="918" Text="It sounds like you're missing the point of this kind of entity system. If you're &quot;loading all components every time&quot; then you'll get almost no benefit out of it.&#xD;&#xA;&#xD;&#xA;You should be setting it up so that all the data needed for a particular class of operation (e.g. for &quot;resolving attacks&quot;) is bundled into a single component.&#xD;&#xA;&#xD;&#xA;Essentially, imagaine that you have to write the main code for some part of your game, complete with the main special cases, and you want to specify which data it needs from the start of that code to the end. That's one component (you could split it into smaller components, but only if you need to because some parts are (re)used later by other code).&#xD;&#xA;&#xD;&#xA;Then, when you have special cases, you have the choice to edit your main component (generally: don't) or to invent extra components that allow all the existing entities to keep working, and all the existing code to keep working, unchanged." />
  <row Id="16932" PostHistoryTypeId="2" PostId="8307" RevisionGUID="81b85198-3d2b-4bfe-a5ff-d2ab50ca09d0" CreationDate="2011-02-09T00:12:55.813" UserId="4443" Text="If this is not an online tracked competitive type game:&#xD;&#xA;&#xD;&#xA;Let em hack away man. You can spend way too much energy on things like this when people who will play the game, will just play the game. Those who want to hack it will never really want to play it, they just want to hack it.&#xD;&#xA;&#xD;&#xA;If it is an online competitive type game:&#xD;&#xA;&#xD;&#xA;All you have to do is store the hashes on a server some where with their login information. If the hash from their save file is not valid, then their game is not valid.. Start over, or revert, or whatever :)&#xD;&#xA;&#xD;&#xA;This is fairly basic but there again, we are talking about games, not bank accounts and such.. And always remember.. hobbyist or professional gamer developer, there are Hundreds of people out there who are going to try and hack your games. Put in enough effort to try and preserve the enjoyment of the game for those who are going to play by the game's rules, and thats about it." />
  <row Id="16933" PostHistoryTypeId="6" PostId="8300" RevisionGUID="0f9c48dd-a6ed-4a77-9732-159637d32bcd" CreationDate="2011-02-09T00:52:53.753" UserId="4191" Comment="edited tags" Text="&lt;logic&gt;&lt;anti-cheat&gt;&lt;security&gt;" />
  <row Id="16934" PostHistoryTypeId="25" PostId="8296" RevisionGUID="0cecb342-96db-4e0c-87e7-d22448a92799" CreationDate="2011-02-09T02:16:27.177" Comment="http://twitter.com/#!/StackGameDev/status/35160063387635712" />
  <row Id="16935" PostHistoryTypeId="2" PostId="8308" RevisionGUID="7bf32742-e76d-495f-9ec6-6b871d912cd0" CreationDate="2011-02-09T03:03:24.640" UserId="395" Text="http://www.atari.com/publish would be where to contact Atari (sorry, you do need to login using an Atari account)." />
  <row Id="16936" PostHistoryTypeId="2" PostId="8309" RevisionGUID="54a3862e-3108-4226-85f3-42d520e82fc5" CreationDate="2011-02-09T03:11:38.720" UserId="2696" Text="I am relevantly new to Graphics Programming. I have written some basic games in xna in the past but I am trying to understand what the point of all these surface formats is. For instance Xna and DDS support the standard RGBA (8bpp). Why does one need 32 bpp or even stranger combinations of bits per channel like Rg32. Isn't it enough to have the standard DXn, RGBA, and HDR formats?" />
  <row Id="16937" PostHistoryTypeId="1" PostId="8309" RevisionGUID="54a3862e-3108-4226-85f3-42d520e82fc5" CreationDate="2011-02-09T03:11:38.720" UserId="2696" Text="Whats the point of all these Surface Formats" />
  <row Id="16938" PostHistoryTypeId="3" PostId="8309" RevisionGUID="54a3862e-3108-4226-85f3-42d520e82fc5" CreationDate="2011-02-09T03:11:38.720" UserId="2696" Text="&lt;xna&gt;&lt;image&gt;&lt;file-format&gt;" />
  <row Id="16939" PostHistoryTypeId="2" PostId="8310" RevisionGUID="809ab264-c563-4f2a-bae0-94a417f58459" CreationDate="2011-02-09T03:27:55.680" UserId="1430" Text="You think [XNA has a lot of surface formats][1]? Boy, you [ain't seen nothing yet][2].&#xD;&#xA;&#xD;&#xA;Joking aside, I suspect the reason has to do with a combination of legacy/backwards compatibility and flexibility. &#xD;&#xA;&#xD;&#xA;Obviously, once a surface format is introduced it needs to be supported forward for some time, or the entire API takes a backwards compatibility hit. So there are probably a few surface formats that float about just due to that reason alone.&#xD;&#xA;&#xD;&#xA;But the bigger reason is the flexibility that is afforded to developers by having many surface format options to choose from -- this allows developers to do things like use as few bits as possible for a particular channel, or as few channels as possible for scenarios where optimizing space is an important consideration. It allows for the possibility of expanding to very large bit-widths when broad ranges of color data are going to be required (for example, for HDR, as you mentioned). Some formats exist for relatively specialized (but very common, possibly performance critical graphics operations) tasks -- the `NormalizedByte2` format, for example, is commonly used in bump-map related operations (per the documentation).&#xD;&#xA;&#xD;&#xA;Some of the strange looking formats can be useful for non-graphics operations, too, like general GPU computation where you may only need two channels of input data (and thus, why waste space on the third when that video memory could be put to better use -- such as allowing *more* of the two-channel data you're trying to process?)&#xD;&#xA;&#xD;&#xA;Having a variety of formats also allows the developer to communicate to the GPU how the data will be arranged and used (this is why the DXGI format list is so big, because it not only includes bit-width variations, but some type information as well, such as whether the values will be signed or unsigned), which in turn can allow the GPU to optimize its buffer layouts for maximum pipeline throughput.&#xD;&#xA;&#xD;&#xA;Finally, [some of the formats are restricted in where and when they can be used][3], which necessitates a list that may seem sprawling at first, but is actually relatively compact for any given scenario. Relatively few formats can be used for a depth buffer, for example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.surfaceformat.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb173059(v=vs.85).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ff471325(VS.85).aspx" />
  <row Id="16940" PostHistoryTypeId="2" PostId="8311" RevisionGUID="722800db-9644-434b-9491-e7be36d10bb4" CreationDate="2011-02-09T03:38:41.687" UserId="237" Text="If it's text-based, why not just store the starting time in a `DateTime`? Then when you need the time, just subtract that value from `DateTime.Now`, pull the `TotalSeconds` from the resulting `TimeSpan`, then add that many minutes to the starting `DateTime`?&#xD;&#xA;&#xD;&#xA;eg:&#xD;&#xA;&#xD;&#xA;    private DateTime StartTime;&#xD;&#xA;    const DateTime StartOfGame; // = 1/1/0001 AD&#xD;&#xA;    &#xD;&#xA;    void Init()&#xD;&#xA;    {&#xD;&#xA;      StartTime = DateTime.Now;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void Logic()&#xD;&#xA;    {&#xD;&#xA;      // ...&#xD;&#xA;      DateTime gameTime = StartOfGame.AddMinutes((DateTime.Now - StartTime).TotalSeconds);&#xD;&#xA;      // ...&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="16941" PostHistoryTypeId="2" PostId="8312" RevisionGUID="4ba40e16-1a99-47b2-91ec-3cd64ed3d401" CreationDate="2011-02-09T03:38:52.003" UserId="3547" Text="Most game loops I've encountered like to check an input state of some kind (not wait around for input, instead have it buffered).&#xD;&#xA;&#xD;&#xA;I'm assuming your making some game with the Command Prompt in C#. You'll probably want to buffer input via ReadLine() in a thread safe queue. You should then implement a more normal game loop in a separate thread that checks this queue for new input every frame.&#xD;&#xA;&#xD;&#xA;Also, you should probably keep track of time with a Stopwatch object or something that is strong performance wise. (I don't think your using DateTime.Now, but if you are it's a very bad idea)&#xD;&#xA;&#xD;&#xA;That's how I would do it. Usually, time based actions are done via keeping track of passed time and executing a step (or the entire action itself) after certain intervals of time pass. So every certain unit of time (kept track after multiple updates) you would perhaps increment the age of the player or something of that nature. When the age is incremented, certain changes will take place (defined in the player's class perhaps).&#xD;&#xA;&#xD;&#xA;That's just one way to do it." />
  <row Id="16942" PostHistoryTypeId="5" PostId="8312" RevisionGUID="34120afb-7db7-4ec5-abec-2313e85ba11d" CreationDate="2011-02-09T03:44:21.857" UserId="3547" Comment="added 48 characters in body; added 335 characters in body" Text="Most game loops I've encountered like to check an input state of some kind (not wait around for input, instead have it buffered).&#xD;&#xA;&#xD;&#xA;I'm assuming your making some game with the Command Prompt in C#. You'll probably want to buffer input via ReadLine() in a thread safe queue. You should then implement a more normal game loop in a separate thread that checks this queue for new input every frame.&#xD;&#xA;&#xD;&#xA;Also, you should probably keep track of time with a Stopwatch object or something that is strong performance wise. (I don't think your using DateTime.Now, but if you are it's a very bad idea)&#xD;&#xA;&#xD;&#xA;That's how I would do it. Usually, time based actions are done via keeping track of passed time and executing a step (or the entire action itself) after certain intervals of time pass. So every certain unit of time (kept track after multiple updates) you would perhaps increment the age of the player or something of that nature. When the age is incremented, certain changes will take place (defined in the player's class perhaps).&#xD;&#xA;&#xD;&#xA;That's just one way to do it, not necessarily the only/right way of doing it.&#xD;&#xA;&#xD;&#xA;Edit: Once you've got your game loop, you should separate logic into separate classes (one for the player, one for a plant, etc, whatever is needed). These classes should be updated by the loop and they can keep track of their aging/changes. (they should be passed some kind of timing variable or should have a way of accessing it)" />
  <row Id="16943" PostHistoryTypeId="2" PostId="8313" RevisionGUID="4d6b4776-2c0e-484a-acb2-0aee461dc598" CreationDate="2011-02-09T04:44:57.240" UserId="5266" Text="I would like to start learning 3d game development and currently only develop 2d games.&#xD;&#xA;&#xD;&#xA;A few basic questions I am interested in is&#xD;&#xA;&#xD;&#xA;What is used to create the 3d environments? Are they all done in e.g. Maya, Lightwave, 3d modeling software?&#xD;&#xA;&#xD;&#xA;What is the output format for these models and how are they manipulated in iOS? Is it all done using openGL(GL ES on iOS)?&#xD;&#xA;&#xD;&#xA;e.g a monster needs to be spawned in the game world. What coordinates are used?&#xD;&#xA;&#xD;&#xA;Are the concepts the same as 2d in terms of collision on the coordinates and movement on the coordinates of the game world?&#xD;&#xA;&#xD;&#xA;How are 3d games managed in iOS on the low available memory. (e.g. FPS games)&#xD;&#xA;&#xD;&#xA;Lastly, Can someone please recommend a good book that is up to date and can be applied to todays techniques.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16944" PostHistoryTypeId="1" PostId="8313" RevisionGUID="4d6b4776-2c0e-484a-acb2-0aee461dc598" CreationDate="2011-02-09T04:44:57.240" UserId="5266" Text="3d environments and managing them on iOS" />
  <row Id="16945" PostHistoryTypeId="3" PostId="8313" RevisionGUID="4d6b4776-2c0e-484a-acb2-0aee461dc598" CreationDate="2011-02-09T04:44:57.240" UserId="5266" Text="&lt;3d&gt;&lt;coordinates&gt;" />
  <row Id="16946" PostHistoryTypeId="5" PostId="8313" RevisionGUID="4cc91bea-99b7-450b-a292-38dbebf16092" CreationDate="2011-02-09T04:52:47.290" UserId="5266" Comment="added 2 characters in body" Text="I would like to start learning 3d game development and currently only develop 2d games.&#xD;&#xA;&#xD;&#xA;A few basic questions I am interested in are:&#xD;&#xA;&#xD;&#xA;What is used to create the 3d environments? Are they all done in e.g. Maya, Lightwave, 3d modeling software?&#xD;&#xA;&#xD;&#xA;What is the output format for these models and how are they manipulated in iOS? Is it all done using openGL(GL ES on iOS)?&#xD;&#xA;&#xD;&#xA;e.g a monster needs to be spawned in the game world. What coordinates are used?&#xD;&#xA;&#xD;&#xA;Are the concepts the same as 2d in terms of collision on the coordinates and movement on the coordinates of the game world?&#xD;&#xA;&#xD;&#xA;How are 3d games managed in iOS on the low available memory. (e.g. FPS games)&#xD;&#xA;&#xD;&#xA;Lastly, Can someone please recommend a good book that is up to date and can be applied to todays techniques.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="16947" PostHistoryTypeId="25" PostId="8309" RevisionGUID="bfb5fbf9-9920-46e9-a466-75f8ef4162de" CreationDate="2011-02-09T05:16:26.850" Comment="http://twitter.com/#!/StackGameDev/status/35205359912230912" />
  <row Id="16948" PostHistoryTypeId="2" PostId="8314" RevisionGUID="b6d734fe-2f7d-4565-a149-d0172414882f" CreationDate="2011-02-09T05:48:52.427" UserId="5267" Text="To get the smallest possible replay file you'll need make sure your game is deterministic. Usually this involves looking at your random number generator and seeing where it is used in the game logic. &#xD;&#xA;&#xD;&#xA;You'll most likely need to have a game logic RNG and an everything else RNG for things like GUI, particle effects, sounds. Once you have this done, you need record the initial state of the game logic RNG, then the game commands of all the players every frame.&#xD;&#xA;&#xD;&#xA;For many games there is a level of abstraction between the input and the game logic where the input is turned into commands. For example pressing the A button on the controller results in a &quot;jump&quot; digital command being set to true and the game logic reacts to commands without checking the controller directly. By doing this, you'll only need to record the commands which impact the game logic (no need to record the &quot;Pause&quot; command) and most likely this data will be smaller than recording the controller data. You also don't have to worry about recording the state of the control scheme in case the player decided to remap buttons.&#xD;&#xA;&#xD;&#xA;Rewinding is a difficult problem using the deterministic method and other than using snapshot of the game state and fast-forwarding to the point in time you want to look at there is not much you can do other than recording the entire game state each frame.&#xD;&#xA;&#xD;&#xA;On the otherhand, fast-forwarding is certainly doable. As long as your game logic isn't reliant on your rendering, you can run the game logic as many times as you want prior to rendering a new frame of the game. The speed of fast-forwarding will just be bound by your machine. If you want to skip ahead in large increments, you'll need to use the same snapshot method as you would need for rewinding.&#xD;&#xA;&#xD;&#xA;Possibly the single most important part of writing a replay system that relies on determinism is to record a debug stream of data. This debug stream contains a snapshot of as much information as possible each frame (RNG seeds, entity transforms, animations, etc) and be able to test that recorded debug stream against the state of the game during the replays. This will allow you to quickly let you know mismatches at the end of any given frame. This will save countless hours of wanting to pull your hair out from unknown non-deterministic bugs. Something as simple as an uninitialized variable will mess everything up at the 11th hour.&#xD;&#xA;&#xD;&#xA;NOTE: If your game involves dynamic streaming of content or you have game-logic on multiple threads or on different cores... good luck." />
  <row Id="16949" PostHistoryTypeId="2" PostId="8315" RevisionGUID="f4b5101e-b04a-4bfc-a59f-c8680a59b53c" CreationDate="2011-02-09T06:54:24.710" UserId="4264" Text="One thing that other answers have not covered yet are the danger of floats. You can't make a fully deterministic application using floats.&#xD;&#xA;&#xD;&#xA;Using floats, you can have a completely deterministic system, but only if:&#xD;&#xA;&#xD;&#xA;  - Using the exactly same binary&#xD;&#xA;  - Using the exactly same CPU&#xD;&#xA;&#xD;&#xA;This is because the internal representation of floats varies from one CPU to another - most dramatically between AMD and intel CPUs. As long as the values are in FPU registers, they're more accurate than they look like from C side, so any intermediate calculations are done in higher precision.&#xD;&#xA;&#xD;&#xA;It's quite obvious how this will affect the AMD vs intel bit - let's say one uses 80 bit floats and the other 64, for example - but why the same binary requirement?&#xD;&#xA;&#xD;&#xA;As I said, the higher precision is in use _as long as the values are in FPU registers_. This means that whenever you recompile, your compiler optimization may swap values in and out of FPU registers, resulting in subtly different results.&#xD;&#xA;&#xD;&#xA;You may be able to help this by setting &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e9b52ceh%28v=vs.71%29.aspx&quot;&gt;_control87()/_controlfp()&lt;/a&gt; flags to use the lowest possible precision. However, some libraries may also touch this (at least some version of d3d did)." />
  <row Id="16951" PostHistoryTypeId="25" PostId="8278" RevisionGUID="e5daeeeb-9b17-4d40-a1cc-499f9c9f8492" CreationDate="2011-02-09T08:16:26.953" Comment="http://twitter.com/#!/StackGameDev/status/35250659800383488" />
  <row Id="16952" PostHistoryTypeId="2" PostId="8317" RevisionGUID="754a02e2-160e-4e1f-95c3-8b98f8025e4e" CreationDate="2011-02-09T08:51:59.107" UserId="5272" Text="Aplogies if this is a FAQ, but I didn't find it by searching ... what is the recommended reading list for a very experienced s/w developer, with no MMORPG experience, who wants to design an MMORPG?" />
  <row Id="16953" PostHistoryTypeId="1" PostId="8317" RevisionGUID="754a02e2-160e-4e1f-95c3-8b98f8025e4e" CreationDate="2011-02-09T08:51:59.107" UserId="5272" Text="FAQ? Good books for MMORPG design?" />
  <row Id="16954" PostHistoryTypeId="3" PostId="8317" RevisionGUID="754a02e2-160e-4e1f-95c3-8b98f8025e4e" CreationDate="2011-02-09T08:51:59.107" UserId="5272" Text="&lt;mmo&gt;&lt;books&gt;" />
  <row Id="16955" PostHistoryTypeId="5" PostId="8302" RevisionGUID="8370c32e-666f-47ae-adfd-2c93e479574c" CreationDate="2011-02-09T09:02:49.283" UserId="4191" Comment="deleted 15 characters in body; added 16 characters in body" Text="The way you have it described, somebody hacking a save file would just need to construct an MD5 hash of the save file values in order to bypass this measure.  You need to add one thing in order for this to even really be worthwhile: a secret block of arbitrary data that's added to what you're hashing (both when creating the save and when validating it on restore).  The mechanism won't be uncrackable or anything at that point, but it'll be resistant to medium-casual tampering.  If you can avoid having the data block be easily extractable from your runtime files using a hex editor, that'll add another notch.&#xD;&#xA;&#xD;&#xA;If you want people to actually not be able to hack your saves, you cannot perform local saves at all.  You cannot trust the client because the client is in the hands of the enemy." />
  <row Id="16956" PostHistoryTypeId="2" PostId="8318" RevisionGUID="999626fd-60cc-4a78-af6c-3284e852771d" CreationDate="2011-02-09T09:24:13.963" UserId="1047" Text="Its hard. First and most of all read Jari Komppa answers.&#xD;&#xA;&#xD;&#xA;A replay made on my computer may not work on your computer because the float result is SLIGHTLY different. Its a big deal.&#xD;&#xA;&#xD;&#xA;But after that, if you have random numbers is to store the seed value in the replay. Then load all default states and set the random number to that seed. From there you could simply record the current key/mouse state and the length of time its been that way. Then run all events using that as input.&#xD;&#xA;&#xD;&#xA;To jump around files (which is much harder) you'll need to dump THE MEMORY. Like, where every unit is, money, length of time passes, all of the game state. Then fast forwarding but replaying everything but skipping rendering, sound etc until you get to the time destination you want. This could happen every minute or 5mins depending how fast it is to forward.&#xD;&#xA;&#xD;&#xA;Main points are&#xD;&#xA;- Dealing with random numbers&#xD;&#xA;- Copying input (player(s), and remote player(s))&#xD;&#xA;- Dumping state for jumping around files&#xD;&#xA;and...&#xD;&#xA;- HAVING FLOAT NOT BREAK THINGS (yes, i had to yell)&#xD;&#xA;" />
  <row Id="16957" PostHistoryTypeId="2" PostId="8319" RevisionGUID="6585da7f-75ee-40b4-ad2e-7e729d063d54" CreationDate="2011-02-09T10:28:18.243" UserId="4191" Text="* Richard Bartle, [*Designing Virtual Worlds*][1]&#xD;&#xA;* Jessica Mulligan &amp; Bridgette Patrovsky, [*Developing Online Games*][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Designing_Virtual_Worlds&#xD;&#xA;  [2]: http://www.amazon.com/Developing-Online-Games-Insiders-Nrg-Programming/dp/1592730000" />
  <row Id="16958" PostHistoryTypeId="2" PostId="8320" RevisionGUID="101e114a-1c4d-4f5d-bfbb-79ad1c6d96b6" CreationDate="2011-02-09T10:59:16.073" UserId="5275" Text="I've been looking for a way to implement wall-jump in my xna game, but I can't find any information about it, can someone could someone please help me out ?" />
  <row Id="16959" PostHistoryTypeId="1" PostId="8320" RevisionGUID="101e114a-1c4d-4f5d-bfbb-79ad1c6d96b6" CreationDate="2011-02-09T10:59:16.073" UserId="5275" Text="Wall Jump for 2D Platformer" />
  <row Id="16960" PostHistoryTypeId="3" PostId="8320" RevisionGUID="101e114a-1c4d-4f5d-bfbb-79ad1c6d96b6" CreationDate="2011-02-09T10:59:16.073" UserId="5275" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="16961" PostHistoryTypeId="5" PostId="8319" RevisionGUID="716c7bf8-21a3-4ed1-bea4-53938b2a4e99" CreationDate="2011-02-09T11:17:15.423" UserId="4191" Comment="added 250 characters in body" Text="* Richard Bartle, [*Designing Virtual Worlds*][1]&#xD;&#xA;* Jessica Mulligan &amp; Bridgette Patrovsky, [*Developing Online Games*][2]&#xD;&#xA;* Edward Castronova, [*Synthetic Worlds*][3]&#xD;&#xA;&#xD;&#xA;Hanging around [Terra Nova][4] is also probably not a terrible idea.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Designing_Virtual_Worlds&#xD;&#xA;  [2]: http://www.amazon.com/Developing-Online-Games-Insiders-Nrg-Programming/dp/1592730000&#xD;&#xA;  [3]: http://www.amazon.com/Synthetic-Worlds-Business-Culture-Online/dp/0226096262&#xD;&#xA;  [4]: http://terranova.blogs.com/terra_nova/" />
  <row Id="16962" PostHistoryTypeId="2" PostId="8321" RevisionGUID="04463e8d-8701-408d-9f13-fc9cf982f7d8" CreationDate="2011-02-09T11:40:55.247" UserId="4191" Text="When a player collides with a wall, turn on a flag for the next 100 milliseconds or so that causes an attempt to jump to successfully initiate a jump (ignoring any surface contact checks) with a fair amount of speed on the X axis in the direction away from the wall." />
  <row Id="16963" PostHistoryTypeId="6" PostId="8320" RevisionGUID="1b24d279-a09e-4b22-9a94-4eb5acafd917" CreationDate="2011-02-09T11:41:46.993" UserId="4191" Comment="edited tags" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;&lt;platform-games&gt;" />
  <row Id="16964" PostHistoryTypeId="5" PostId="7775" RevisionGUID="bef7f338-4c73-42c6-b536-fe55ecf86b05" CreationDate="2011-02-09T11:44:10.643" UserId="4191" Comment="added 832 characters in body" Text="&gt; Don't worry about people stealing your&#xD;&#xA;&gt; ideas.  If your ideas are any good,&#xD;&#xA;&gt; you'll have to ram them down people's&#xD;&#xA;&gt; throats.&#xD;&#xA;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;mdash; [Howard H. Aiken][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Howard_H._Aiken" />
  <row Id="16965" PostHistoryTypeId="2" PostId="8322" RevisionGUID="143c06f6-a576-4c30-8f10-40f62ad18a05" CreationDate="2011-02-09T12:23:21.373" UserId="1829" Text="You can try Panda3D, but this is more a game engine than a 3D engine.&#xD;&#xA;&#xD;&#xA;I don't know any 3D engine using python as a main language, since 3D applications are, most of the time, required to have smooth execution speed.&#xD;&#xA;&#xD;&#xA;I didn't tried PyOgre either, but you might want to check out PyGLet, I don't really know what it is, but it looks great." />
  <row Id="16966" PostHistoryTypeId="2" PostId="8323" RevisionGUID="a5fe64b7-f533-42c3-8f6f-314dd1337feb" CreationDate="2011-02-09T12:26:35.987" UserId="1829" Text="Patent are useful for laboratories when they spend a lot of money finding solutions which need a lot of scientific work: for example, finding an efficient molecule to develop a drug that treats a certain disease, requires work, while making that molecule is just a matter of chemistry.&#xD;&#xA;&#xD;&#xA;On the other hand, a software idea just requires the work to implement it, something that is just plain different.&#xD;&#xA;&#xD;&#xA;In one case, it requires work to find a solution, in the second it requires work to make it work.&#xD;&#xA;&#xD;&#xA;Patent protects research that finds stuff, NOT the people who make them. The protection for people who makes stuff is called copyright, which is completely different. This way, patents are much much rarer than copyrights.&#xD;&#xA;&#xD;&#xA;The problem with patents is this:&#xD;&#xA;They are over used anyways, because there will always be a debate about the expertise necessary to validate something that can be patented. Just look at all those numbers that appear when you start up adobe reader: it didn't prevent Google, Foxit and other application to write their own PDF converter. Also TeX seems to be able to produce equal if not superior quality documents." />
  <row Id="16967" PostHistoryTypeId="2" PostId="8324" RevisionGUID="c7c37ffc-20b0-4983-a6f4-3d2e064f6c8e" CreationDate="2011-02-09T12:29:51.213" UserId="5277" Text="To answer some:&#xD;&#xA;&#xD;&#xA;Yes, modelling is being done in a modelling software. Tho you can generate meshes programatically too. Or you can write the model files using a text editor :) So basically you use some 3d software like Max, Maya or Blender.&#xD;&#xA;&#xD;&#xA;The output depends on the software used. E.g. Max has the .max format. But usually you can export your models into some common formats like .obj. If you want to write a 3d game engine from the ground up, then you'd have to write the code that loads these formats. It's quite tedious, but that's the reason people use libraries for these (or complete game engines...).&#xD;&#xA;&#xD;&#xA;World coordinates are used for spawning things into the world :) Check out some books on 3d.&#xD;&#xA;&#xD;&#xA;I'd recommend checking out some available 3d engines, to try things out and understand the concepts better. Ogre or Unity is a good start I think. I can't recommend any books, there're thousands on this topics regarding your questions (most of them are rubbish tho). It's like you ask us to recommend you a book on mathematics. Be more specific." />
  <row Id="16968" PostHistoryTypeId="2" PostId="8325" RevisionGUID="9ff539b3-8d1e-4c68-ad3a-912911df78f0" CreationDate="2011-02-09T13:14:30.520" UserId="1868" Text="I tried HTML5 audio on [my first game][1] but I could not get it to work perfectly (lag for the first time the sample is played etc). &#xD;&#xA;&#xD;&#xA;SoundManager2 looks ok and I tried it a bit in a [demo][2]. For the next game I will use it as it has functionality to fall back to HTML5 audio in case Flash is not available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.momentumracer.com&#xD;&#xA;  [2]: http://www.momentumracer.com/electricanvas" />
  <row Id="16969" PostHistoryTypeId="2" PostId="8326" RevisionGUID="57af7b55-2867-454d-9862-a6a4096d7a8d" CreationDate="2011-02-09T13:44:20.787" UserId="5260" Text="I had previously asked [this][1] for 3D but now I changed my strategy and would like to do the intersection in 2D.&#xD;&#xA;&#xD;&#xA;The Rectangle is axis aligned and will always be in a fixed position, and has a constant shape and size, basically I want to clip the red areas of the triangles that extend outside the bounds of the rectangle &#xD;&#xA;The triangles could be in any position, shape or size, I my code I have a loop where I check the triangles one by one however I am still clueless about the math.&#xD;&#xA;&#xD;&#xA;I have identified 5 cases of triangle rectangle intersection as shown here.![Triangle Rectangle Intersections][2]&#xD;&#xA;&#xD;&#xA;How do I find the intersection points of the triangle and the rectangle?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8294/triangle-plane-intersection-in-3d-space&#xD;&#xA;  [2]: http://i.stack.imgur.com/NaDgG.jpg" />
  <row Id="16970" PostHistoryTypeId="1" PostId="8326" RevisionGUID="57af7b55-2867-454d-9862-a6a4096d7a8d" CreationDate="2011-02-09T13:44:20.787" UserId="5260" Text="Triangle - Rectangle Intersection in 2D" />
  <row Id="16971" PostHistoryTypeId="3" PostId="8326" RevisionGUID="57af7b55-2867-454d-9862-a6a4096d7a8d" CreationDate="2011-02-09T13:44:20.787" UserId="5260" Text="&lt;2d&gt;&lt;triangles&gt;&lt;intersection&gt;&lt;rectangles&gt;" />
  <row Id="16972" PostHistoryTypeId="5" PostId="7703" RevisionGUID="9caecacc-6d47-4657-8d75-d2a0308b2675" CreationDate="2011-02-09T14:02:24.683" UserId="18" Comment="Fixed links" Text="I'm using the libraries of [Sean Barret][1] to render truetype-glyphs under OpenGL (stb_image, stb_truetype).&#xD;&#xA;&#xD;&#xA;The [Recast/Detour-project][2] is using these libraries to create an user interface ([IMUI][3]) &#xD;&#xA;&#xD;&#xA; [1]: http://nothings.org&#xD;&#xA; [2]: http://code.google.com/p/recastnavigation/source/browse/trunk/RecastDemo/Source/imguiRenderGL.cpp&#xD;&#xA; [3]: http://www.mollyrocket.com/861&#xD;&#xA;" />
  <row Id="16973" PostHistoryTypeId="24" PostId="7703" RevisionGUID="ebabe8a2-e30e-48bf-8078-60dff2660462" CreationDate="2011-02-09T14:02:24.683" Comment="Proposed by 18 approved by 189 edit id of 12" />
  <row Id="16974" PostHistoryTypeId="2" PostId="8327" RevisionGUID="30d0a467-c037-446f-b7bf-6a7c095b9c4d" CreationDate="2011-02-09T14:13:10.360" UserId="2316" Text="I'm making an RPG game system and I'm having a hard time deciding on doing detailed or abstract character statistics.  These statistics define the character's natural - not learned - abilities.  For example:&#xD;&#xA;&#xD;&#xA; - Mass Effect: **0** *(None that I can see)*&#xD;&#xA; - X20 *(Xtreme Dungeon Mastery)*: **1** &quot;STAT&quot;&#xD;&#xA; - Diablo: **4** &quot;Strength, Magic, Dexterity, Vitality&quot;&#xD;&#xA; - Pendragon: **5** &quot;SIZ, STR, DEX, CON, APP&quot;&#xD;&#xA; - Dungeons &amp; Dragons (3.x, 4e): **6** &quot;Str, Dex, Con, Wis, Int, Cha&quot;&#xD;&#xA; - Fallout 3: **7** &quot;S.P.E.C.I.A.L.&quot;&#xD;&#xA; - RIFTS: **8** &quot;IQ, ME, MA, PS, PP, PE, PB, Spd&quot;&#xD;&#xA; - Warhammer Fantasy Roleplay (1st ed?): **12**-ish &quot;WS, BS, S, T, Ag, Int, WP, Fel, A, Mag, IP, FP&quot;&#xD;&#xA; - HERO (5th ed): **14** &quot;Str, Dex, Con, Body, Int, Ego, Pre, Com, PD, ED, Spd, Rec, END, STUN&quot;&#xD;&#xA;&#xD;&#xA;The more stats, the more complex and detailed your character becomes.  This comes with a trade-off however, because you usually only have limited resources to describe your character.  D&amp;D made this infamous with the whole min/max-ing thing where strong characters were typically not also smart.&#xD;&#xA;&#xD;&#xA;But also, a character with a high Str typically also has high Con, Defenses, Hit Points/Health.  Without high numbers in all those other stats, they might as well not be strong since they wouldn't hold up well in hand-to-hand combat.  So things like that force trade-offs *within the category* of strength.&#xD;&#xA;&#xD;&#xA;So my original (now rejected) idea was to force players into deciding between offensive and defensive stats:&#xD;&#xA;&#xD;&#xA; - Might / Body&#xD;&#xA; - Dexterity / Speed&#xD;&#xA; - Wit / Wisdom&#xD;&#xA; - Heart&#xD;&#xA; - Soul&#xD;&#xA;&#xD;&#xA;But this left some stat's without &quot;opposites&quot; (or opposites that were easily defined). I'm leaning more towards the following:&#xD;&#xA;&#xD;&#xA; - Body (Physical Prowess)&#xD;&#xA; - Mind (Mental Prowess)&#xD;&#xA; - Heart (Social Prowess)&#xD;&#xA; - Soul (Spiritual Prowess)&#xD;&#xA;&#xD;&#xA;This will define a character with just 4 numbers.  Everything else gets based off of these numbers, which means they're pretty important.  There won't, however, be ways of describing characters who are fast, but not strong or smart, but absent minded.  Instead of defining the character with these numbers, they'll be detailing their character by buying skills and powers like these:&#xD;&#xA;&#xD;&#xA;&gt; **Quickness**  &#xD;&#xA;&gt; Add a +2 Bonus to **Body** Rolls when Dodging.&#xD;&#xA;&#xD;&#xA;for a character that wants to be faster, or the following for a big, tough character&#xD;&#xA;&#xD;&#xA;&gt; **Body Building**  &#xD;&#xA;&gt; Add a +2 Bonus to **Body** Rolls when Lifting, Pushing, or Throwing objects.&#xD;&#xA;&#xD;&#xA;So my actual questions are:  &#xD;&#xA;&#xD;&#xA; - **Is a small attribute block a bad idea?**  Are there examples of games&#xD;&#xA;   that have small stat blocks that do a&#xD;&#xA;   poor job of character defining and&#xD;&#xA;   detailing?&#xD;&#xA;   &#xD;&#xA;   &#xD;&#xA; - I can see having a ton of other&#xD;&#xA;   skills/feats/powers really clutter up&#xD;&#xA;   a character.  **Is defining a&#xD;&#xA;   character through secondary&#xD;&#xA;   selections like skills and powers&#xD;&#xA;   better or worse than through&#xD;&#xA;   attributes?**  Are there examples of&#xD;&#xA;   games that do a good or bad job at&#xD;&#xA;   this?&#xD;&#xA;   &#xD;&#xA; - I'm planning on having the system be&#xD;&#xA;   &quot;cross-platform&quot; (pen&amp;paper, video&#xD;&#xA;   game).  **Which style design (few&#xD;&#xA;   stats, many powers) or (many stats,&#xD;&#xA;   few powers) is &quot;easier&quot; to implement&#xD;&#xA;   on the computer?** Many video games&#xD;&#xA;   abstract powers and abilities found&#xD;&#xA;   in Pen &amp; Paper games.  Never Winter&#xD;&#xA;   Nights changed a fair amount of the&#xD;&#xA;   powers in DnD 3.5.  So if my game is&#xD;&#xA;   designed for many powers, this will&#xD;&#xA;   be difficult.  OTOH, Diablo I and II&#xD;&#xA;   have stats that would be *terribly&#xD;&#xA;   inconvenient* to translate to&#xD;&#xA;   pen/paper/dice.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;" />
  <row Id="16975" PostHistoryTypeId="1" PostId="8327" RevisionGUID="30d0a467-c037-446f-b7bf-6a7c095b9c4d" CreationDate="2011-02-09T14:13:10.360" UserId="2316" Text="Character Stats and Power" />
  <row Id="16976" PostHistoryTypeId="3" PostId="8327" RevisionGUID="30d0a467-c037-446f-b7bf-6a7c095b9c4d" CreationDate="2011-02-09T14:13:10.360" UserId="2316" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;character&gt;&lt;experience&gt;" />
  <row Id="16977" PostHistoryTypeId="2" PostId="8328" RevisionGUID="4151db11-ac6f-4419-a3be-cccaa83db6e2" CreationDate="2011-02-09T14:28:06.280" UserId="2316" Text="You may find the answer to your question here on [Stack Overflow.](http://stackoverflow.com/questions/2140070/compute-union-of-two-arbitrary-shapes)&#xD;&#xA;&#xD;&#xA;They suggest using [CGAL](http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Function_intersection.html) which is a C++ library for Geometric Algorithms.  You could also use C++'s [Boost.Geometry](http://geometrylibrary.geodan.nl/sets.html) for a solution as well." />
  <row Id="16978" PostHistoryTypeId="2" PostId="8329" RevisionGUID="a338a651-8423-4886-bd79-18e84c6e7dd8" CreationDate="2011-02-09T14:32:37.627" UserId="3656" Text="From what I gather, HTML 5's audio potential has a long long way to go. Firefox 4 Beta apparently has a [cool audio API][1] but it's going to be a little while before we see the major browsers provdie comprehensive support for the [W3C Web Audio API Standard][2]&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.mozilla.org/Audio_Data_API&#xD;&#xA;  [2]: http://chromium.googlecode.com/svn/trunk/samples/audio/specification/specification.html" />
  <row Id="16979" PostHistoryTypeId="5" PostId="8327" RevisionGUID="4b8656f5-4f3a-4771-9872-3a863c928694" CreationDate="2011-02-09T14:41:22.513" UserId="2316" Comment="removed subjectiveness" Text="I'm making an RPG game system and I'm having a hard time deciding on doing detailed or abstract character statistics.  These statistics define the character's natural - not learned - abilities.  For example:&#xD;&#xA;&#xD;&#xA; - Mass Effect: **0** *(None that I can see)*&#xD;&#xA; - X20 *(Xtreme Dungeon Mastery)*: **1** &quot;STAT&quot;&#xD;&#xA; - Diablo: **4** &quot;Strength, Magic, Dexterity, Vitality&quot;&#xD;&#xA; - Pendragon: **5** &quot;SIZ, STR, DEX, CON, APP&quot;&#xD;&#xA; - Dungeons &amp; Dragons (3.x, 4e): **6** &quot;Str, Dex, Con, Wis, Int, Cha&quot;&#xD;&#xA; - Fallout 3: **7** &quot;S.P.E.C.I.A.L.&quot;&#xD;&#xA; - RIFTS: **8** &quot;IQ, ME, MA, PS, PP, PE, PB, Spd&quot;&#xD;&#xA; - Warhammer Fantasy Roleplay (1st ed?): **12**-ish &quot;WS, BS, S, T, Ag, Int, WP, Fel, A, Mag, IP, FP&quot;&#xD;&#xA; - HERO (5th ed): **14** &quot;Str, Dex, Con, Body, Int, Ego, Pre, Com, PD, ED, Spd, Rec, END, STUN&quot;&#xD;&#xA;&#xD;&#xA;The more stats, the more complex and detailed your character becomes.  This comes with a trade-off however, because you usually only have limited resources to describe your character.  D&amp;D made this infamous with the whole min/max-ing thing where strong characters were typically not also smart.&#xD;&#xA;&#xD;&#xA;But also, a character with a high Str typically also has high Con, Defenses, Hit Points/Health.  Without high numbers in all those other stats, they might as well not be strong since they wouldn't hold up well in hand-to-hand combat.  So things like that force trade-offs *within the category* of strength.&#xD;&#xA;&#xD;&#xA;So my original (now rejected) idea was to force players into deciding between offensive and defensive stats:&#xD;&#xA;&#xD;&#xA; - Might / Body&#xD;&#xA; - Dexterity / Speed&#xD;&#xA; - Wit / Wisdom&#xD;&#xA; - Heart&#xD;&#xA; - Soul&#xD;&#xA;&#xD;&#xA;But this left some stat's without &quot;opposites&quot; (or opposites that were easily defined). I'm leaning more towards the following:&#xD;&#xA;&#xD;&#xA; - Body (Physical Prowess)&#xD;&#xA; - Mind (Mental Prowess)&#xD;&#xA; - Heart (Social Prowess)&#xD;&#xA; - Soul (Spiritual Prowess)&#xD;&#xA;&#xD;&#xA;This will define a character with just 4 numbers.  Everything else gets based off of these numbers, which means they're pretty important.  There won't, however, be ways of describing characters who are fast, but not strong or smart, but absent minded.  Instead of defining the character with these numbers, they'll be detailing their character by buying skills and powers like these:&#xD;&#xA;&#xD;&#xA;&gt; **Quickness**  &#xD;&#xA;&gt; Add a +2 Bonus to **Body** Rolls when Dodging.&#xD;&#xA;&#xD;&#xA;for a character that wants to be faster, or the following for a big, tough character&#xD;&#xA;&#xD;&#xA;&gt; **Body Building**  &#xD;&#xA;&gt; Add a +2 Bonus to **Body** Rolls when Lifting, Pushing, or Throwing objects.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[EDIT - removed subjectiveness]&#xD;&#xA;&#xD;&#xA;So my actual questions is **what are some pitfalls with a small stat list and a large amount of descriptive powers?**  Is this more difficult to port cross-platform (pen&amp;paper, PC) for example?  Are there examples of this being done well/poorly?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;" />
  <row Id="16980" PostHistoryTypeId="16" PostId="8319" RevisionGUID="737289d5-d02b-475e-91fe-f07cce6f141b" CreationDate="2011-02-09T15:03:04.897" UserId="51" />
  <row Id="16981" PostHistoryTypeId="16" PostId="8317" RevisionGUID="4cb0278a-aae5-4756-b87b-c30274c3e626" CreationDate="2011-02-09T15:03:04.897" UserId="51" />
  <row Id="16982" PostHistoryTypeId="5" PostId="8317" RevisionGUID="593be1c6-8a6a-40e7-aa9e-1898251c5be0" CreationDate="2011-02-09T15:03:27.453" UserId="51" Comment="deleted 65 characters in body; edited title" Text="What is the recommended reading list for a very experienced s/w developer, with no MMORPG experience, who wants to design an MMORPG?" />
  <row Id="16983" PostHistoryTypeId="4" PostId="8317" RevisionGUID="593be1c6-8a6a-40e7-aa9e-1898251c5be0" CreationDate="2011-02-09T15:03:27.453" UserId="51" Comment="deleted 65 characters in body; edited title" Text="Good books for MMORPG design?" />
  <row Id="16984" PostHistoryTypeId="2" PostId="8330" RevisionGUID="abdee062-2a07-42a7-b2aa-6ee1357db75e" CreationDate="2011-02-09T15:13:14.860" UserId="20" Text="The [Sutherland-Hodgman polygon clipping algorithm][1] should work just fine for triangle vs. rectangle clipping. You'll find some more information about clipping algorithms [here][2]. Or just search for &quot;Sutherland Hodgman clipping&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman&#xD;&#xA;  [2]: http://books.google.ch/books?id=fGX8yC-4vXUC&amp;pg=PA84&amp;lpg=PA84#v=onepage&amp;q&amp;f=false" />
  <row Id="16985" PostHistoryTypeId="5" PostId="8269" RevisionGUID="e9eadc5d-38b6-4809-9323-7b63a88dd59a" CreationDate="2011-02-09T15:18:07.133" UserId="5250" Comment="Added a clarifying image and a second suggestion for a solution." Text="If you compare the y values at the same x position, it will work every time. So, do not compare center to center. Instead compare the center of one sprite with the same x position on the other sprite.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;But, this requires some geometry data for each sprite. It could be as easy as two points from the left to right sides that describes the lower boundary for the sprite. Or, you could analyze the sprites image data and find the first pixel that is not transparent.&#xD;&#xA;&#xD;&#xA;An easier approach is to divide all sprites into three groups: diagonal along x axis, diagonal along y axis and flat. If two object are both diagonal along the same axis, sort them based on the other axis.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/0Mgv9.png" />
  <row Id="16986" PostHistoryTypeId="5" PostId="8321" RevisionGUID="0fe69f54-19ba-4626-8a49-8b671f2cdd1a" CreationDate="2011-02-09T15:26:03.947" UserId="4191" Comment="added 14 characters in body" Text="When a player collides with a wall while jumping, turn on a flag for the next 100 milliseconds or so that causes an attempt to jump to successfully initiate a jump (ignoring any surface contact checks) with a fair amount of speed on the X axis in the direction away from the wall." />
  <row Id="16987" PostHistoryTypeId="2" PostId="8331" RevisionGUID="852300ab-5bbb-4a1f-bca0-f933c114fb98" CreationDate="2011-02-09T15:35:41.833" UserId="4191" Text="To my way of thinking, the main pitfall of a small core stat list is when disparate capabilities wind up tied together in a counter-dramatic way.  Maybe the most recurrent example is when *perception* winds up being a function of *intelligence*, making it impossible, or at least against the grain of the system, to play the extremely-brainy-professor-with-his-head-in-the-clouds type, or to represent animals having highly acute senses!  The enormous mass of things that get lumped together under a Body stat can be pretty questionable, too, and don't get me started on Wisdom.&#xD;&#xA;&#xD;&#xA;Your deviation-from-baseline traits can address this concern in a lot of cases, which is very helpful.  The cases where they can't address it are probably a key indicator of where separate underlying stats are needed." />
  <row Id="16988" PostHistoryTypeId="2" PostId="8332" RevisionGUID="82e8ae5e-ff62-476c-be35-8c89c094e034" CreationDate="2011-02-09T15:48:04.317" UserId="4947" Text="I think CGAL i too robust for such simple task. And Sutherland Hodgman clipping is usefull, when you have general polygon. But you have axis aligned box and you should make use of it. &#xD;&#xA;&#xD;&#xA;So my opinion: &#xD;&#xA;&#xD;&#xA;First case: Triangle and box are intersecting. You can figure it out by line-line intersection test (for example this: http://mathworld.wolfram.com/Line-LineIntersection.html but you can google it in many ways). You make line from every edge of box and every edge of triangle. Then you find intersection of all combinations (there are 12 cases &lt;- 3 (triangle) x 4 (box) edges). &#xD;&#xA;&#xD;&#xA;If you find intersection point (IP), test, if IP lies between two vertices of triangle or somewhere else on line (created from triangle edge). If IP lies between vertices, then test, if IP's x and y coordinates lie in box x and y intervals (it's axis aligned) - it's green case on picture. If IP doesn't lie in both of it's intervals, then it's red case on picture. &#xD;&#xA;![intersections][1]&#xD;&#xA;&#xD;&#xA;After this test, you should have several vertices, which define your new polygon created from triangle.&#xD;&#xA;&#xD;&#xA;\\EDIT: Oh. I forget, you have to take also every vertex from triangle for your new polygon, which lies in box (on picture there are two such vertices).&#xD;&#xA;&#xD;&#xA;If no edge-edge intersection is found, you have to check two other cases:&#xD;&#xA;&#xD;&#xA;Second case: Whole rectangle lies in triangle - your new points from triangle are just vertices of box. &#xD;&#xA;&#xD;&#xA;Third case: Whole triangle is in box. Take original triangle as result.&#xD;&#xA;&#xD;&#xA;I hope, this can work. It's not tested. Maybe you can use some heuristic and avoid of testing all possible edge-edge combinations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JC657.png" />
  <row Id="16989" PostHistoryTypeId="5" PostId="8321" RevisionGUID="a1ce0111-e3c8-43e4-b08b-5b1f3dafb22a" CreationDate="2011-02-09T15:49:03.443" UserId="4191" Comment="added 27 characters in body" Text="When a player collides with a wall while jumping (or, if you like, falling), turn on a flag for the next 100 milliseconds or so that causes an attempt to jump to successfully initiate a jump (ignoring any surface contact checks) with a fair amount of speed on the X axis in the direction away from the wall." />
  <row Id="16990" PostHistoryTypeId="2" PostId="8333" RevisionGUID="fa53e6c2-c0b5-4524-be57-e86cbb422176" CreationDate="2011-02-09T15:55:07.367" UserId="5267" Text="If the turret is turning the wrong way try using Mathf.MoveTowardsAngle:&#xD;&#xA;http://unity3d.com/support/documentation/ScriptReference/Mathf.MoveTowardsAngle.html&#xD;&#xA;&#xD;&#xA;Seems like you could do something like below to get the desired result:&#xD;&#xA;&#xD;&#xA;    var angle : float = Mathf.MoveTowardsAngle(angleA, angleB, turretSpeed * Time.deltaTime);&#xD;&#xA;    transform.eulerAngles = Vector3(0, angle, 0);" />
  <row Id="16991" PostHistoryTypeId="5" PostId="8332" RevisionGUID="5bc92ea3-1690-4fbb-9600-8c2ae01ad5d8" CreationDate="2011-02-09T15:57:16.120" UserId="4947" Comment="added 240 characters in body; added 47 characters in body" Text="I think CGAL i too robust for such simple task. And Sutherland Hodgman clipping is usefull, when you have general polygon. But you have axis aligned box and you should make use of it. &#xD;&#xA;&#xD;&#xA;So my opinion: &#xD;&#xA;&#xD;&#xA;First case: Triangle and box are intersecting. You can figure it out by line-line intersection test (for example this: http://mathworld.wolfram.com/Line-LineIntersection.html but you can google it in many ways - also look at EDIT2 at the end of this answer). You make line from every edge of box and every edge of triangle. Then you find intersection of all combinations (there are 12 cases &lt;- 3 (triangle) x 4 (box) edges). &#xD;&#xA;&#xD;&#xA;If you find intersection point (IP), test, if IP lies between two vertices of triangle or somewhere else on line (created from triangle edge). If IP lies between vertices, then test, if IP's x and y coordinates lie in box x and y intervals (it's axis aligned) - it's green case on picture. If IP doesn't lie in both of it's intervals, then it's red case on picture. &#xD;&#xA;![intersections][1]&#xD;&#xA;&#xD;&#xA;After this test, you should have several vertices, which define your new polygon created from triangle.&#xD;&#xA;&#xD;&#xA;//EDIT: Oh. I forget, you have to take also every vertex from triangle for your new polygon, which lies in box (on picture there are two such vertices).&#xD;&#xA;&#xD;&#xA;If no edge-edge intersection is found, you have to check two other cases:&#xD;&#xA;&#xD;&#xA;Second case: Whole rectangle lies in triangle - your new points from triangle are just vertices of box. &#xD;&#xA;&#xD;&#xA;Third case: Whole triangle is in box. Take original triangle as result.&#xD;&#xA;&#xD;&#xA;I hope, this can work. It's not tested. Maybe you can use some heuristic and avoid of testing all possible edge-edge combinations.&#xD;&#xA;&#xD;&#xA;//EDIT2: You should also make use of axis aligned box in line-line intersection test - just find y coordinate with given x constant (in case of vertical box edge) or find x coordinate with given y constant (in case of horizontal edge). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JC657.png" />
  <row Id="16992" PostHistoryTypeId="2" PostId="8334" RevisionGUID="8a650151-481b-4d62-9726-5ad42abd03c9" CreationDate="2011-02-09T16:01:44.690" UserId="458" Text="Basically what I think you're trying to do is compare two things: a game where your character has a relatively large number of base stats and everything is based off of a direct stat roll (canonical example being D&amp;D) or a game where your character has a smaller number of base stats but a large number of &quot;special abilities&quot; or &quot;feats&quot; that give bonuses to a stat in a specific situation. And from your update, it looks like you are trying to compare these specifically with the design goal of portability between pen-and-paper and computer games.&#xD;&#xA;&#xD;&#xA;The design goal is important here, because either method can work in some cases but not others. Overall, for a PC game, the fewer your abilities (in total, including both the base stats and specials), the simpler the coding will be -- consider that every new stat or ability is basically an extra special case that needs to be coded. Since you mentioned Diablo, realize that this game really had a minimal number of stats, only a handful of special abilities granted by equipment, and that's about it... but also realize that as an action-RPG, an overly complicated and detailed system would just make the game much harder to play because the player can't process that much info in real time anyway. On the other hand, as you're noticing, fewer stats offers less self-expression through character creation (which may or may not be important to the system you're designing -- for a total hack-and-slash game, who cares about personality anyway?).&#xD;&#xA;&#xD;&#xA;That said, your main concern at this point should be what kind of system makes for good gameplay. Keep in mind that the ability to have a stat for every little thing a character might want to do is &quot;realistic&quot; but not necessarily fun; do you really want your characters spending half an hour making a series of die-rolls to determine the hardness and mass of their latest bowel movement? Decide what it is that is the &quot;core&quot; of the game, what do you want the players to spend most of their time doing, and then design the system and stats to emphasize the core." />
  <row Id="16993" PostHistoryTypeId="2" PostId="8335" RevisionGUID="94831fd2-743c-4ba0-ab97-ac6be8246bbd" CreationDate="2011-02-09T15:59:48.240" UserId="5284" Text="Have had a quick look at Battle of Wesnoth, but not sure if it would be suitable for a light operational/strategic level WW2 wargame I'd like to develop over time as a hobby (think &quot;Panzer General&quot; or &quot;Commander: Europe at War&quot;).&#xD;&#xA;&#xD;&#xA;Programming language does not matter nor does the platform (I have/use both Windows/Mac/Linux at home)." />
  <row Id="16994" PostHistoryTypeId="1" PostId="8335" RevisionGUID="94831fd2-743c-4ba0-ab97-ac6be8246bbd" CreationDate="2011-02-09T15:59:48.240" UserId="5284" Text="Looking for an open source, tile-based turn-based wargame/engine" />
  <row Id="16995" PostHistoryTypeId="3" PostId="8335" RevisionGUID="94831fd2-743c-4ba0-ab97-ac6be8246bbd" CreationDate="2011-02-09T15:59:48.240" UserId="5284" Text="&lt;turn-based-strategy&gt;&lt;open-source&gt;" />
  <row Id="16996" PostHistoryTypeId="17" PostId="8335" RevisionGUID="42f52597-c819-4a86-b4ad-3dbc10871005" CreationDate="2011-02-09T16:07:24.667" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/16288/looking-for-an-open-source-tile-based-turn-based-wargame-engine" Text="" />
  <row Id="16997" PostHistoryTypeId="17" PostId="8337" RevisionGUID="1de93ced-7f23-4b4e-9baa-1b9f62d5cfa3" CreationDate="2011-02-09T16:25:53.817" UserId="-1" Comment="from http://stackoverflow.com/questions/4946816/2d-zelda-collision-detection/4946911#4946911" Text="" />
  <row Id="16998" PostHistoryTypeId="17" PostId="8338" RevisionGUID="0a6a15fa-258a-4c20-a6a2-05113b6d7e05" CreationDate="2011-02-09T16:25:53.817" UserId="-1" Comment="from http://stackoverflow.com/questions/4946816/2d-zelda-collision-detection/4946989#4946989" Text="" />
  <row Id="16999" PostHistoryTypeId="2" PostId="8337" RevisionGUID="6a82fb75-a2fa-4159-958a-21462b6d08d1" CreationDate="2011-02-09T15:28:54.780" UserDisplayName="larsmans" Text="The map grid has large (apparently 16x16 pixel) elements, probably so that it can be stored efficiently on the limited ROM cards of the SNES/Super Famicom by reusing tiles. But if you observe the game closely, you'll notice the sprites move on a much more fine-grained grid. (Try sticking your sword out and notice that an enemy can bump into it and get hit, even when it's on the border of two tiles.) This was already true in the original Legend of Zelda." />
  <row Id="17000" PostHistoryTypeId="2" PostId="8338" RevisionGUID="1e297568-6f70-4703-924f-0be59248fde4" CreationDate="2011-02-09T15:34:58.557" UserId="5283" Text="Given the memory limitations of the NES(or was it SNES, I forget), the solution must be very simple.  &#xD;&#xA;&#xD;&#xA;My guess is that they have another 16*16 grid that tells you how to handle collision in the tile. A tile can be:  &#xD;&#xA;&#xD;&#xA;* Empty&#xD;&#xA;* Full(i.e. a square block collision)&#xD;&#xA;* Half-full-1(a diagonal top-left to bottom-right line collision)&#xD;&#xA;* Half-full-2(a diagonal top-right to bottom-left line collision)&#xD;&#xA;&#xD;&#xA;So, when Link moves, the game engine checks the surrounding tiles and applies the collision logic for them, according to the collision grid.&#xD;&#xA;&#xD;&#xA;Of course, I didn't disassemble the Zelda sources, I'm just saying how I would do it.&#xD;&#xA;&#xD;&#xA;And the &quot;roundness&quot; of the corners is just an illusion - some special code written to make them feel that way. Developers have been doing it since the Pac-Man years:  &#xD;&#xA;http://home.comcast.net/~jpittman2/pacman/pacmandossier.html#CH2_Cornering&#xD;&#xA;&#xD;&#xA;As you see, even though the maze's topography is both tiled and super simple(only squares), a technique like smooth turning can be simulated by creating an optical illusion(square tiles with round textures) and some clever code(beginning a turn before the end of the tile)." />
  <row Id="17001" PostHistoryTypeId="2" PostId="8336" RevisionGUID="5a87fe19-7a00-464c-9469-6366fcf68d47" CreationDate="2011-02-09T15:20:09.550" UserId="5282" Text="I would like to know how the collision detection was done in **TLOZ: A Link To The Past**&#xD;&#xA;the game is 16x16 tile based right?&#xD;&#xA;but how did they do the tiles where only 1/4 or 1/2 of the tile is occupied?&#xD;&#xA;did they use a smaller grid for collision detection? like 8x8 tiles, so 4 of them make one 16x16 tile of the texture grid? &#xD;&#xA;&#xD;&#xA;but then they also have true half tiles which are diagonally cut.&#xD;&#xA;and the corners of the tiles seem to be round or something, if link walks into tiles corner he can keep on walking and automatically moves around it's corner.&#xD;&#xA;how's that done?&#xD;&#xA;&#xD;&#xA;hope someone can help me out here.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/iGpPx.png" />
  <row Id="17002" PostHistoryTypeId="1" PostId="8336" RevisionGUID="5a87fe19-7a00-464c-9469-6366fcf68d47" CreationDate="2011-02-09T15:20:09.550" UserId="5282" Text="2D Zelda collision detection" />
  <row Id="17003" PostHistoryTypeId="3" PostId="8336" RevisionGUID="5a87fe19-7a00-464c-9469-6366fcf68d47" CreationDate="2011-02-09T15:20:09.550" UserId="5282" Text="&lt;c#&gt;&lt;game-development&gt;&lt;2d&gt;&lt;collision-detection&gt;&lt;nintendo&gt;" />
  <row Id="17004" PostHistoryTypeId="17" PostId="8336" RevisionGUID="f31fd6a0-e212-48cb-a686-fdbde8551d6a" CreationDate="2011-02-09T16:25:53.817" UserId="-1" Comment="from http://stackoverflow.com/questions/4946816/2d-zelda-collision-detection" Text="" />
  <row Id="17005" PostHistoryTypeId="2" PostId="8339" RevisionGUID="3253d367-ef8b-4952-91cf-bffba3e815fc" CreationDate="2011-02-09T16:43:40.297" UserId="5050" Text="I am displaying a cube using a vertex buffer object (gl.ELEMENT_ARRAY_BUFFER). This allows me to specify vertex *indicies*, rather than having duplicate vertexes. In the case of displaying a simple cube, this means I only need to have eight vertices total. Opposed to needing three vertices per triangle, times two triangles per face, times six faces. Sound correct so far?&#xD;&#xA;&#xD;&#xA;My question is, how do I now deal with vertex attribute data such as color, texture coordinates, and normals when reusing vertices using the vertex buffer object?&#xD;&#xA;&#xD;&#xA;If I am reusing the same vertex data in my indexed vertex buffer, how can I differentiate when vertex X is used as part of the cube's front face versus the cube's left face? In both cases I would like the surface normal and texture coordinates to be different. I understand I *could* average the surface normal, however I would like to render a cube. Also, this still doesn't work for texture coordinates.&#xD;&#xA;&#xD;&#xA;Is there a way to save memory using a vertex buffer object while being able to provide different vertex attribute data based on context? (Per-triangle would be idea.)&#xD;&#xA;&#xD;&#xA;Or should I just duplicate each vertex for each context in which it gets rendered. (So there is a one-to-one mapping between vertex, normal, color, etc.)&#xD;&#xA;&#xD;&#xA;Note: I'm using OpenGL ES." />
  <row Id="17006" PostHistoryTypeId="1" PostId="8339" RevisionGUID="3253d367-ef8b-4952-91cf-bffba3e815fc" CreationDate="2011-02-09T16:43:40.297" UserId="5050" Text="How to create per-vertex normals when reusing vertex data?" />
  <row Id="17007" PostHistoryTypeId="3" PostId="8339" RevisionGUID="3253d367-ef8b-4952-91cf-bffba3e815fc" CreationDate="2011-02-09T16:43:40.297" UserId="5050" Text="&lt;opengl-es&gt;&lt;normals&gt;&lt;vertex-arrays&gt;" />
  <row Id="17008" PostHistoryTypeId="2" PostId="8340" RevisionGUID="746a2996-6013-495b-9159-09691d475959" CreationDate="2011-02-09T16:54:06.493" UserId="1430" Text="Unfortunately, you can't -- you can't have differently-sized attribute streams (you'd need multiple index buffers, or some other kind of mapping to correlate them all.&#xD;&#xA;&#xD;&#xA;You'll have to duplicate the vertices you want to participate in different triangles. This isn't actually as bad *in practice* as it seems in terms of duplication of the position data. A cube is actually a pretty pathological case for this scenario, and tends to make the amount of duplication you'll end up with *seem* much higher than it would be for &quot;real&quot; models. Unless you're game is all about cubes, in which case, well... sorry. :D" />
  <row Id="17009" PostHistoryTypeId="2" PostId="8341" RevisionGUID="6adba0da-f5f0-4e69-8ea9-ca03cb1ffdbd" CreationDate="2011-02-09T16:55:40.567" UserId="5259" Text="I'll take a stab at this but first a couple of comments:&#xD;&#xA;&#xD;&#xA;&gt; &quot;The more stats, the more complex and&#xD;&#xA;&gt; detailed your character becomes.&#xD;&#xA;&#xD;&#xA;If you mean complex and detailed in the sense that you've got more numbers in flight, sure. If you mean complex in terms of &quot;Hey, my character is a nuanced being with a unique story!&quot;, eh. This especially falls short when dealing with min-maxing... if there are dozens of stats, but only one really useful combination, all you've done is put the annoyance of looking up the optimal build into your players' gameplay experience. You can have perfectly detailed characters (detailed in their interactions with the world) without a lot of stats--see *Munchkin*, *S.T.A.L.K.E.R.*, or *System Shock 2* (granted, that last does have a bit of a skill system involved).&#xD;&#xA;&#xD;&#xA;&gt; But also, a character with a high Str&#xD;&#xA;&gt; typically also has high Con, Defenses,&#xD;&#xA;&gt; Hit Points/Health. Without high&#xD;&#xA;&gt; numbers in all those other stats, they&#xD;&#xA;&gt; might as well not be strong since they&#xD;&#xA;&gt; wouldn't hold up well in hand-to-hand&#xD;&#xA;&gt; combat. So things like that force&#xD;&#xA;&gt; trade-offs within the category of&#xD;&#xA;&gt; strength.&#xD;&#xA;&#xD;&#xA;So, the distressing thing here is that you are assuming a playstyle where people are trying to actually have 'optimal' complimentary attribute loadouts. Why should a person not dump Con to get that many more points in Strength, or dump Defense to get more Health? What's wrong with letting people make glass-cannon characters? Obviously, not everyone will do this--but the option shouldn't be removed.&#xD;&#xA;&#xD;&#xA;Now, as to your questions:&#xD;&#xA;&#xD;&#xA;***What are some pitfalls with a small stat list and a large amount of descriptive powers?***&#xD;&#xA;&#xD;&#xA;With a very small stat list you potentially limit what the user can do. The trick here is that, depending on gameplay, this can be avoided.&#xD;&#xA;&#xD;&#xA;*Dungeon Siege* only had four stats, if I remember correctly: melee, archery, magic, and max health. These each incremented over time as the player used them, and each had a clear effect on gameplay. This system was a success, because while there were few stats each one completely governed some important aspect of gameplay.&#xD;&#xA;&#xD;&#xA;Having secondary powers, or skills as D&amp;D or Fallout would call them, is a good way of combining a limited number of stats into a larger number of game-influencing traits. Moreover, any mistakes the players make in allocating attributes is resolved after some gameplay as skill points are assigned.&#xD;&#xA;&#xD;&#xA;The problem you face in those two-tiered systems is that anything that causes stat degradation (attribute damage in D&amp;D terms) needs to be propagated forwards into the skills. For a computer, this isn't a big deal, and players will pick up on &quot;Hey, my lockpicking isn't quite up to par today... lemme fix my agility&quot;. For a pen/paper game, this means an extra level of bookkeeping, which is annoying at best and error-prone at worse.&#xD;&#xA;&#xD;&#xA;Note that a perk/powerup system is a way of patching up any mechanics or effects not covered by a two-tier system. *Fallout* did this especially well--&quot;Lady Killer&quot; is a perk whose effects are clearly felt, but have absolutely no convenient way of being expressed using the attribute/skill system.&#xD;&#xA;&#xD;&#xA;***Is this more difficult to port cross-platform (pen&amp;paper, PC) for example?***&#xD;&#xA;&#xD;&#xA;The biggest issue going to pen/paper is that the more numbers you have the slower gameplay goes. Character creation goes from being a quick &quot;roll numbers, start playing&quot; to a &quot;roll numbers/calculate armor class/frob spreadsheet&quot; affair. Remember, computers are *really good* at crunching numbers. Every addition/multiplication you add to a pen/paper game adds delay to the player's actions, whether at creation or during game. This is pretty much unforgivable, and it's why every D&amp;D group I've ever been with uses a strict subset of all of the calculations exposed by the game books.&#xD;&#xA;&#xD;&#xA;Which brings us to...&#xD;&#xA;&#xD;&#xA;***Are there examples of this being done well/poorly?***&#xD;&#xA;&#xD;&#xA;So, as I already mentioned, *Dungeon Siege* is a really good example of a game that gets away with having very few stats.&#xD;&#xA;&#xD;&#xA;*Deus Ex* had something on the order of ten skills/stats, each one again directly impacting some aspect of gameplay in a clear and obvious fashion. The player still could make useful decisions about their character's path in the game, but the system was simple enough that doing so was not burdensome. Similarly, the augmentation system as well as in-game items helped improve the skills usage yet further or--perhaps even more importantly--helped mitigate any problems the player would've had encountering a situation for which they didn't quite spec skills for.&#xD;&#xA;&#xD;&#xA;*Fallout* does a good job on handling skills, as mentioned above. The big advantage for them was the ability to use a computer, as most of the bookkeeping is hidden from the player unless they look for it, and so minimally impacts the gameplay. This was so much the case, in fact, that they were able to turn the series into a first-person shooter in *Fallout 3*.&#xD;&#xA;&#xD;&#xA;On the other end of the spectrum, you have *FATAL*. Look it up; it's got more numbers than you could ever need. Ever. I can't imagine this actually being played in a pen/paper setting, and it is so convoluted a system I can barely imagine implementing it in code (or even worse, as data-driving XML).&#xD;&#xA;&#xD;&#xA;*GURPS* and *RIFTS* have similar issues with somewhat computationally-expensive systems. The sourcebooks are interesting to read, and full of detail, but actually running through a session can be a chore.&#xD;&#xA;&#xD;&#xA;*Pathfinder*, in my opinion, cleaned up a lot of the issues that D&amp;D 3/3.5 had with their skill system and game mechanics. For example, I no longer have to worry about rolling a rogue who is great at ropes but terrible at acrobatics and climbing, or vice versa. Other than deprecating a large variety of increasingly troublesome sourcebooks, *Pathfinder*'s other big win is combining skills so as to give each a clearer influence on gameplay.&#xD;&#xA;&#xD;&#xA;**Conclusions**&#xD;&#xA;&#xD;&#xA; - Don't worry about the exact number of stats, as long as they mean something to the player and aid gameplay.&#xD;&#xA; - Don't worry about the exact number of skills, as long as they clearly influence gameplay.&#xD;&#xA; - Do worry about how tedious calculations will become if you intend to make a pen/paper sytem.&#xD;&#xA; - Don't worry about tedious calculations as much if you are writing a system for a computer.&#xD;&#xA; - Two-tiered systems (primary stats, skills/derived stats) have been shown to work well.&#xD;&#xA; - One-tiered systems (skills or stats) have also been shown to work well.&#xD;&#xA; - **Most importantly, do what is best for your players, and after that, what is best for your game.** Anything else is just stroking your ego as a designer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17010" PostHistoryTypeId="2" PostId="8342" RevisionGUID="78a36b84-81cf-4ccb-97c9-2c5e06d2e83d" CreationDate="2011-02-09T16:57:40.513" UserId="1156" Text="The [Vassal][1] engine may be a good choice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vassalengine.org/" />
  <row Id="17011" PostHistoryTypeId="2" PostId="8343" RevisionGUID="0af7f569-2ca3-4ceb-8207-b0201e908a88" CreationDate="2011-02-09T16:58:52.540" UserId="4662" Text="Interpolating the normal is fine for the vast majority of real cases.&#xD;&#xA;&#xD;&#xA;Plus, cubes have their own special textures, cube maps, with 3D texture co-ordinates. In conjunction with a normal map, you shouldn't have any problems." />
  <row Id="17012" PostHistoryTypeId="5" PostId="8340" RevisionGUID="f572517e-c671-440d-8fd3-e030871c36ce" CreationDate="2011-02-09T17:04:02.390" UserId="1430" Comment="closed paren" Text="Unfortunately, you can't -- you can't have differently-sized attribute streams (you'd need multiple index buffers, or some other kind of mapping to correlate them all).&#xD;&#xA;&#xD;&#xA;You'll have to duplicate the vertices you want to participate in different triangles or otherwise have unique attributes other than position. This isn't actually as bad *in practice* as it seems in terms of duplication of the position data. A cube is actually a pretty pathological case for this scenario, and tends to make the amount of duplication you'll end up with *seem* much higher than it would be for &quot;real&quot; models. Unless you're game is all about cubes, in which case, well... sorry. :D" />
  <row Id="17013" PostHistoryTypeId="2" PostId="8344" RevisionGUID="5f42dfa9-2742-49bf-8788-386824a36759" CreationDate="2011-02-09T17:06:21.617" UserId="5098" Text="Personally, I'm of the opinion that the fewest needed to represent the kind of experience you want for the players is the appropriate number.  I'll always take decreased complexity for the user over increased simulation-accuracy - when that accuracy doesn't provide a measurable improvement in satisfaction. &#xD;&#xA;&#xD;&#xA;You'll find a lot of pen and paper RPG designers at forum.rpg.net.  &#xD;&#xA;&#xD;&#xA;But I'd be careful of making sure the ideas translates medium well." />
  <row Id="17014" PostHistoryTypeId="17" PostId="8346" RevisionGUID="3511c9bb-bbc3-43bb-93ac-00e00eec9257" CreationDate="2011-02-09T17:29:10.170" UserId="-1" Comment="from http://stackoverflow.com/questions/4948231/java-game-design-question-graphical-objects/4948276#4948276" Text="" />
  <row Id="17015" PostHistoryTypeId="2" PostId="8346" RevisionGUID="281cf560-3ad9-455b-ad90-215888010194" CreationDate="2011-02-09T17:26:55.807" UserDisplayName="aioobe" Text="Most Java UI's are event-driven. Since you seem to plan to implement a KeyListener, I would suggest you follow this convention. That is, throw out the update/draw loop, and repaint the panel after processing received events." />
  <row Id="17016" PostHistoryTypeId="2" PostId="8345" RevisionGUID="1a54504c-3f79-4e95-b10e-a2c09fe2a9e7" CreationDate="2011-02-09T17:21:58.273" UserDisplayName="vemalsar" Text="I'm beginner in game development, in Java and here on this site too and I have a game design question. Please comment my idea:&#xD;&#xA;&#xD;&#xA;I have a main loop which call update and draw method. I want to use an ArrayList which store graphical objects, they have coordinate and image or text to draw and my game objects extends this class. In update, I can choose which objects should be put in the array and in draw method I'll display the elements of array on the screen. I'm using a buffer and draw first there, but it is not important now I guess...Here is a simple (not full) code, only the logic:&#xD;&#xA;&#xD;&#xA;    public class GamePanel extends JPanel implements KeyListener&#xD;&#xA;    {&#xD;&#xA;       ArrayList&lt;graphicalObjects&gt; graphArray = new ArrayList&lt;graphicalObjects&gt;();&#xD;&#xA;&#xD;&#xA;       public void update()&#xD;&#xA;       {&#xD;&#xA;          //change the game scene, update the graphArray, process input etc.&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       public void draw()&#xD;&#xA;       {&#xD;&#xA;          //draws every element of graphArray to a JPanel&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       public static main(String[] args)&#xD;&#xA;       {&#xD;&#xA;          while(true)&#xD;&#xA;          {&#xD;&#xA;              update();&#xD;&#xA;              draw();&#xD;&#xA;          }&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My questions:&#xD;&#xA;&#xD;&#xA;1. Should have I use interface or abstract class for graphicalObjects? graphicalObjects class and the ArrayList really needs or there is some better solution?&#xD;&#xA;&#xD;&#xA;2. How to draw objects? They draw themself with their own method or in the draw method I have to draw manually based on graphicalObjects variables (x,y coordinates, image etc.)?&#xD;&#xA;&#xD;&#xA;3. If this conception is wrong, please suggest another one!&#xD;&#xA;&#xD;&#xA;All comments are welcome and sorry if this is dumb question, thanks!" />
  <row Id="17017" PostHistoryTypeId="1" PostId="8345" RevisionGUID="1a54504c-3f79-4e95-b10e-a2c09fe2a9e7" CreationDate="2011-02-09T17:21:58.273" UserDisplayName="vemalsar" Text="Java game design question (graphical objects)" />
  <row Id="17018" PostHistoryTypeId="3" PostId="8345" RevisionGUID="1a54504c-3f79-4e95-b10e-a2c09fe2a9e7" CreationDate="2011-02-09T17:21:58.273" UserDisplayName="vemalsar" Text="&lt;java&gt;&lt;game-development&gt;&lt;logic&gt;&lt;jpanel&gt;&lt;graphic&gt;" />
  <row Id="17019" PostHistoryTypeId="17" PostId="8345" RevisionGUID="9b613c71-e000-47cf-914c-630b08155c6d" CreationDate="2011-02-09T17:29:10.170" UserId="-1" Comment="from http://stackoverflow.com/questions/4948231/java-game-design-question-graphical-objects" Text="" />
  <row Id="17020" PostHistoryTypeId="5" PostId="8346" RevisionGUID="bb8b8c2c-d7bc-410c-9bd7-1b82c0222352" CreationDate="2011-02-09T17:32:36.097" UserId="5292" Comment="added 768 characters in body" Text="&#xD;&#xA;&gt; 1. **Should have I use interface or abstract class for graphicalObjects? graphicalObjects class and the ArrayList really needs or there is some better solution?**&#xD;&#xA;&#xD;&#xA;I would go with an interface. If all graphical objects have lots of similar data, you may reconsider.&#xD;&#xA;&#xD;&#xA;&gt; **2.&amp;nbsp; How to draw objects? They draw themself with their own method or in the draw method I have to draw manually based on graphicalObjects variables (x,y coordinates, image etc.)?**&#xD;&#xA;&#xD;&#xA;I suggest you follow Javas pattern and pass on a `Graphics` object and let the object paint themselves. Just set clip and offset properly before you pass on the graphics object.&#xD;&#xA;&#xD;&#xA;&gt; **3. If this conception is wrong, please suggest another one!**&#xD;&#xA;&#xD;&#xA;I think it's okay, but here is a small remark:&#xD;&#xA;&#xD;&#xA;Most Java UI's are event-driven. Since you seem to plan to implement a KeyListener, I would suggest you follow this convention. That is, throw out the update/draw loop, and repaint the panel after processing received events." />
  <row Id="17021" PostHistoryTypeId="5" PostId="8321" RevisionGUID="960ef515-4f72-4f0e-9fb1-7693f2e0341e" CreationDate="2011-02-09T18:08:30.580" UserId="4191" Comment="added 69 characters in body" Text="When a player collides with a wall while jumping (or, if you like, falling), turn on a flag for the next 100 milliseconds or so that causes an attempt to jump to successfully initiate a jump (ignoring any surface contact checks) with a fair amount of speed on the X axis in the direction away from the wall.  Remember to turn the flag off early if a jump is in fact initiated." />
  <row Id="17022" PostHistoryTypeId="2" PostId="8347" RevisionGUID="56511961-e6f7-443e-a596-18ce034727f9" CreationDate="2011-02-09T18:13:16.240" UserId="-1" Text="" />
  <row Id="17023" PostHistoryTypeId="2" PostId="8348" RevisionGUID="2f54d9bd-b265-4491-9c06-e08ce49b4a68" CreationDate="2011-02-09T18:13:16.240" UserId="-1" Text="" />
  <row Id="17024" PostHistoryTypeId="5" PostId="7621" RevisionGUID="70d333a4-e114-49b0-b770-81a04910cc7d" CreationDate="2011-02-09T19:03:44.513" UserId="163" Comment="same wiki entry from stackoverflow" Text="![alt text][1]&#xD;&#xA;&#xD;&#xA;**How Do I Get Started With XNA?**&#xD;&#xA;&#xD;&#xA;Microsoft's [App Hub][2] site provides access to the XNA SDK, tools, samples and educational resources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Supported Platforms for Game Development:&#xD;&#xA;&#xD;&#xA; - Windows&#xD;&#xA; - XBox&#xD;&#xA; - Windows Phone 7&#xD;&#xA; - Zune&#xD;&#xA; - Silverlight (via [SilverSprite][3])&#xD;&#xA; - iPhone and iPad (via [XNA Touch][4])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/en/d/d3/Xnalogo.PNG&#xD;&#xA;  [2]: http://creators.xna.com&#xD;&#xA;  [3]: http://silversprite.codeplex.com/&#xD;&#xA;  [4]: http://xnatouch.codeplex.com/" />
  <row Id="17025" PostHistoryTypeId="24" PostId="7621" RevisionGUID="fd1ed0bb-47df-44ad-91a7-5a984a48f592" CreationDate="2011-02-09T19:03:44.513" Comment="Proposed by 163 approved by 51 edit id of 15" />
  <row Id="17026" PostHistoryTypeId="2" PostId="8349" RevisionGUID="74ee7560-8f7e-4b4f-9a95-784af7125653" CreationDate="2011-02-09T19:57:27.410" UserId="3346" Text="I am currently prototyping an idea for an iPhone game. I'd like to create an avatar editor inside the game so that the player can create a 3d avatar face and modify certain features (using slider controls), such as nose shape, eye color, mouth size, etc. This has been done in several games, but what I'm looking to do would be fairly cartoon-ish/caricature-ish, similar to the Mii editor on the Nintendo Wii (http://www.myavatareditor.com/). I'd also like the final result to have the ability to use some canned animations, such as simple speech animations, smiling, frowning, etc.&#xD;&#xA;&#xD;&#xA;I am not an artist, so I would be unable to create these assets, but what kind of effort is required for an artist to create the 3d models necessary for this type of game? Also what mechanism would be required to tweak the face's characteristics? Would you use bones or morph targets? How would the final result be animated? Would facial animation use bones or morph targets?&#xD;&#xA;&#xD;&#xA;I've seen several tools that do this sort of thing too, such as FacialStudio. Are there any facial generation tools out there you'd recommend for generating some base content for this game, or should I just hire an artist to do this type of work.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="17027" PostHistoryTypeId="1" PostId="8349" RevisionGUID="74ee7560-8f7e-4b4f-9a95-784af7125653" CreationDate="2011-02-09T19:57:27.410" UserId="3346" Text="How to create art assets for a 3d avatar editor" />
  <row Id="17028" PostHistoryTypeId="3" PostId="8349" RevisionGUID="74ee7560-8f7e-4b4f-9a95-784af7125653" CreationDate="2011-02-09T19:57:27.410" UserId="3346" Text="&lt;iphone&gt;&lt;3d-meshes&gt;&lt;art&gt;" />
  <row Id="17029" PostHistoryTypeId="2" PostId="8350" RevisionGUID="c63771bb-b0da-4070-8eda-9980ced2e47c" CreationDate="2011-02-09T20:12:44.970" UserId="5295" Text="I actually know this.  It's common in all SNES games.&#xD;&#xA;&#xD;&#xA;The hardware framebuffer redraws all of the sprites on every frame.  If, while redrawing, a sprite draws over another sprite's pixel, if results in an event.  The sprite quadtree is then scanned to figure out which one was actually impacted." />
  <row Id="17030" PostHistoryTypeId="2" PostId="8351" RevisionGUID="18c57698-82ed-469a-bbb9-e608b5af4a4d" CreationDate="2011-02-09T20:20:36.403" UserId="5296" Text="So I have always wondered how one makes a nice (not so squarish) 2d tile map, is it possible?  all games now days I think use textured polygons...but my game engine (andengine) doesn't support that to my knowledge.  But it does support nice TMX files generated by mapeditor.org's Tiled Map Editor.  Though my game I want nice twisting and turning caverns to traverse ... i was wondering some ideas on such a process...is it in the art style? the type of tile engine? both?  So what are some common techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17031" PostHistoryTypeId="1" PostId="8351" RevisionGUID="18c57698-82ed-469a-bbb9-e608b5af4a4d" CreationDate="2011-02-09T20:20:36.403" UserId="5296" Text="Making organic 2d tilemaps for tile based agmes..." />
  <row Id="17032" PostHistoryTypeId="3" PostId="8351" RevisionGUID="18c57698-82ed-469a-bbb9-e608b5af4a4d" CreationDate="2011-02-09T20:20:36.403" UserId="5296" Text="&lt;tiles&gt;&lt;maps&gt;" />
  <row Id="17033" PostHistoryTypeId="25" PostId="8336" RevisionGUID="d249212c-c6a4-4e08-982c-c828bf6fd47b" CreationDate="2011-02-09T20:22:17.440" Comment="http://twitter.com/#!/StackGameDev/status/35433321647456256" />
  <row Id="17034" PostHistoryTypeId="4" PostId="8351" RevisionGUID="0f844dd9-72e8-48ec-b7d8-f3ade436b384" CreationDate="2011-02-09T20:34:35.667" UserId="189" Comment="really obvious title spelling mistake" Text="Making organic 2D tilemaps for tile based games..." />
  <row Id="17035" PostHistoryTypeId="5" PostId="8338" RevisionGUID="d7959902-d354-4b05-9391-d4e91bb21e3f" CreationDate="2011-02-09T20:39:14.270" UserId="381" Comment="It was on the SNES." Text="Given the memory limitations of the SNES, the solution must be very simple.  &#xD;&#xA;&#xD;&#xA;My guess is that they have another 16*16 grid that tells you how to handle collision in the tile. A tile can be:  &#xD;&#xA;&#xD;&#xA;* Empty&#xD;&#xA;* Full(i.e. a square block collision)&#xD;&#xA;* Half-full-1(a diagonal top-left to bottom-right line collision)&#xD;&#xA;* Half-full-2(a diagonal top-right to bottom-left line collision)&#xD;&#xA;&#xD;&#xA;So, when Link moves, the game engine checks the surrounding tiles and applies the collision logic for them, according to the collision grid.&#xD;&#xA;&#xD;&#xA;Of course, I didn't disassemble the Zelda sources, I'm just saying how I would do it.&#xD;&#xA;&#xD;&#xA;And the &quot;roundness&quot; of the corners is just an illusion - some special code written to make them feel that way. Developers have been doing it since the Pac-Man years:  &#xD;&#xA;http://home.comcast.net/~jpittman2/pacman/pacmandossier.html#CH2_Cornering&#xD;&#xA;&#xD;&#xA;As you see, even though the maze's topography is both tiled and super simple(only squares), a technique like smooth turning can be simulated by creating an optical illusion(square tiles with round textures) and some clever code(beginning a turn before the end of the tile)." />
  <row Id="17036" PostHistoryTypeId="24" PostId="8338" RevisionGUID="7975b5e9-bb3d-42ea-bf32-1ff1f290171e" CreationDate="2011-02-09T20:39:14.270" Comment="Proposed by 381 approved by 189 edit id of 16" />
  <row Id="17037" PostHistoryTypeId="5" PostId="8351" RevisionGUID="f024adb1-bbf6-4634-b74f-0e29392e1fa6" CreationDate="2011-02-09T20:39:38.263" UserId="1198" Comment="links, capitalization, spacing." Text="So I have always wondered how one makes a nice (not so squarish) 2d tile map, is it possible?  all games now days I think use textured polygons...but my game engine (and engine) doesn't support that to my knowledge.  But it does support nice TMX files generated by [mapeditor.org's][1] Tiled Map Editor.  Though in my game I want nice twisting and turning caverns to traverse ... I was wondering some ideas on such a process... is it in the art style? The type of tile engine? both? So what are some common techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/" />
  <row Id="17038" PostHistoryTypeId="24" PostId="8351" RevisionGUID="a51bfc37-2eba-4916-b6ee-ca88fbce606f" CreationDate="2011-02-09T20:39:38.263" Comment="Proposed by 1198 approved by 189 edit id of 17" />
  <row Id="17039" PostHistoryTypeId="2" PostId="8352" RevisionGUID="ab8a174e-4c02-4b50-be75-511926c7b366" CreationDate="2011-02-09T20:58:30.093" UserId="-1" Text="" />
  <row Id="17040" PostHistoryTypeId="2" PostId="8353" RevisionGUID="bb11332a-68c4-4083-9aa0-5653782c9b6d" CreationDate="2011-02-09T20:58:30.093" UserId="-1" Text="" />
  <row Id="17041" PostHistoryTypeId="6" PostId="8345" RevisionGUID="e6a6da87-cb69-403c-b4a5-23f44487e0c1" CreationDate="2011-02-09T21:03:14.323" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;" />
  <row Id="17042" PostHistoryTypeId="2" PostId="8354" RevisionGUID="ca11be36-6bf3-4fde-8bf3-474809125e94" CreationDate="2011-02-09T21:55:39.020" UserDisplayName="user5304" Text="A suggestion to do pixel based collision detection:&#xD;&#xA;&#xD;&#xA;Sprites are rectangular right? it's the drawing minus the alpha in a rectangular image. &#xD;&#xA;So the first check is to see if any 2 rectangle sprites overlap any number of pixels in the screen area, which is fairly simple.  &#xD;&#xA;&#xD;&#xA;If this is true: Do a check for each non-alpha pixel of sprite 1, to see if it is sharing the the same (X,Y) coordinate of the screen with of any other non alpha pixel from the colliding sprite B.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17043" PostHistoryTypeId="2" PostId="8355" RevisionGUID="0cb5facc-0657-4964-8559-eeb3ff259739" CreationDate="2011-02-09T22:01:55.197" UserId="160" Text="Isometric games are functionally 3D, so internally, you should be storing the 3D coordinates for each entity in the game. The actual coordinates you pick are arbitrary, but let's say X and Y are the two on-the-ground axes, and Z is off the ground up into the air.&#xD;&#xA;&#xD;&#xA;The renderer then needs to project that into 2D to draw stuff on screen. &quot;Isometric&quot; is one such projection. Projecting from 3D to 2D isometrically is pretty simple. Let's say that the X axis goes from top-left to bottom-right and down one pixel for each two horizontal pixels. Likewise, the Y axis goes from top-right to bottom-left. The Z axis goes straight up. To convert from 3D to 2D then is just:&#xD;&#xA;&#xD;&#xA;    function projectIso(x, y, z) {&#xD;&#xA;        {&#xD;&#xA;            x: x - y,&#xD;&#xA;            y: (x / 2) + (y / 2) - z&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now to your original question, sorting. Now that we're working with our objects directly in 3D, sorting becomes much simpler. In our coordinate space here, the farthest sprite has the lowest x, y and z coordinates (i.e. all three axes point out from the screen). So you just sort them by the sum of those:&#xD;&#xA;&#xD;&#xA;    function nearness(obj) {&#xD;&#xA;        return obj.x + obj.y + obj.z;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    function closer(a, b) {&#xD;&#xA;        if (nearness(a) &gt; nearness(b)) {&#xD;&#xA;            return &quot;a&quot;;&#xD;&#xA;        } else {&#xD;&#xA;            return &quot;b&quot;;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To avoid re-sorting your entities every frame, use a pigeonhole sort, detailed [here](http://gamedev.stackexchange.com/questions/3454/most-efficient-3d-depth-sorting-for-isometric-3d-in-as3/3532#3532)." />
  <row Id="17044" PostHistoryTypeId="4" PostId="6888" RevisionGUID="c55fb8d6-6779-4682-81ce-d20388265829" CreationDate="2011-02-09T22:09:31.623" UserId="3637" Comment="Title misspelling." Text="Does it make the game more fun when the user is forced to progress through the levels sequentially rather than letting them pick and play?" />
  <row Id="17045" PostHistoryTypeId="24" PostId="6888" RevisionGUID="3e1dc8bc-a895-45f7-80aa-313171cbe6b7" CreationDate="2011-02-09T22:09:31.623" Comment="Proposed by 3637 approved by 51 edit id of 20" />
  <row Id="17046" PostHistoryTypeId="5" PostId="8353" RevisionGUID="4d5d3da1-6035-49a0-856e-96fa21fed770" CreationDate="2011-02-09T22:09:46.473" UserId="4191" Comment="added 393 characters in body" Text="MUDs (historically Multi-User Dungeon, with later variants including Multi-User Dimension and Multi-User Domain) are a broad category of multi-user virtual world systems -- usually text-based, usually games, usually accessed via the Telnet protocol, and usually free.  They date to Roy Trubshaw and Richard Bartle's creation of MUD1 in 1978, and are the direct predecessor genre to the MMORPG." />
  <row Id="17047" PostHistoryTypeId="24" PostId="8353" RevisionGUID="3be0a08c-f21b-4856-b9fb-9996f93d1d2a" CreationDate="2011-02-09T22:09:46.473" Comment="Proposed by 4191 approved by 51 edit id of 19" />
  <row Id="17048" PostHistoryTypeId="5" PostId="8352" RevisionGUID="639c32bd-0c95-4af0-9495-684564d06cf9" CreationDate="2011-02-09T22:09:48.143" UserId="4191" Comment="added 2042 characters in body" Text="The [MUD][1] genre peaked in popularity in the 1990s with the spread of the four major MUD codebase families: [AberMUD][2], [TinyMUD][3], [LPMud][4], and [DikuMUD][5].  All of these codebases, though open-source, were created with non-free, anti-commercial licensing, which guaranteed the availability of free games in the short term but hobbled the evolution of the genre in the long term.  MUDs had the greatest relevance when they were essentially the only game in town if you wanted multiplayer persistent-world online RPGs; once MMORPGs (originally referred to as &quot;graphical MUDs&quot;) came on the scene in the late 1990s, MUDs were quickly eclipsed culturally and suffered considerable shrinkage of their market, which has never recovered to its mid-1990s levels.&#xD;&#xA;&#xD;&#xA;Despite these setbacks, [a number of significant MUDs continue to operate][6], even including Trubshaw and Bartle's original [*MUD1*][7] and the first LPMud, [*Genesis*][8].  New MUDs continue to open as well, though it is notoriously harder for them to attract attention and a workable player base than in earlier days.  The genre is also worth noting for the tremendous amount of innovation and exploration of the virtual world problem space that it has produced; it's not for nothing that Bartle's [*Designing Virtual Worlds*][9], a volume based largely on experience with MUDs, is called &quot;the bible of MMORPG development&quot;, and many luminaries of MMORPG creation, like [Raph Koster][10] and [Brad McQuaid][11], began as MUD developers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/MUD&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/AberMUD&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/TinyMUD&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/LPMud&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/DikuMUD&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Chronology_of_MUDs&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/MUD1&#xD;&#xA;  [8]: http://en.wikipedia.org/wiki/Genesis_LPMud&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/Designing_Virtual_Worlds&#xD;&#xA;  [10]: http://en.wikipedia.org/wiki/Raph_Koster&#xD;&#xA;  [11]: http://en.wikipedia.org/wiki/Brad_McQuaid" />
  <row Id="17049" PostHistoryTypeId="24" PostId="8352" RevisionGUID="05ef071f-78a5-43d1-b44d-1725e0a834aa" CreationDate="2011-02-09T22:09:48.143" Comment="Proposed by 4191 approved by 51 edit id of 18" />
  <row Id="17050" PostHistoryTypeId="2" PostId="8356" RevisionGUID="3b15ad33-aecb-4701-a864-22eb390c5990" CreationDate="2011-02-09T22:10:58.070" UserId="5307" Text="(Previously asked at http://stackoverflow.com/questions/4922478/sfml-title-bar-with-weird-characters-when-using-utf-8)&#xD;&#xA;&#xD;&#xA;I've just started using SFML and one of the first problems I've come across is some weird characters on the the titlebar whenever I try to use accents or any other extended char.&#xD;&#xA;&#xD;&#xA;For instance, I've got:&#xD;&#xA;&#xD;&#xA;    sf::RenderWindow Ventana(sf::VideoMode(800, 600, 32), &quot;Año nuevóóó&quot;);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And the titlebar renders like `AÂ+o nuevoA³A³A³`&#xD;&#xA;&#xD;&#xA;This ONLY HAPPENS if my source code file is enconded in UTF-8. If I change the file encoding to ISO-8859-1, it shows properly. Obviously all of my files use UTF-8, as its the system-wide encoding. I'm using GCC under Ubuntu GNU/Linux.&#xD;&#xA;&#xD;&#xA;I've tried using the different utilities in `sf::Unicode` to adapt the text, but none of them seems to work." />
  <row Id="17051" PostHistoryTypeId="1" PostId="8356" RevisionGUID="3b15ad33-aecb-4701-a864-22eb390c5990" CreationDate="2011-02-09T22:10:58.070" UserId="5307" Text="SFML title bar with weird characters when using UTF-8" />
  <row Id="17052" PostHistoryTypeId="3" PostId="8356" RevisionGUID="3b15ad33-aecb-4701-a864-22eb390c5990" CreationDate="2011-02-09T22:10:58.070" UserId="5307" Text="&lt;c++&gt;" />
  <row Id="17053" PostHistoryTypeId="2" PostId="8357" RevisionGUID="34b81350-7447-444b-b7ae-f4904bf7214e" CreationDate="2011-02-09T22:13:27.923" UserId="4443" Text="The quick answer is: Both.&#xD;&#xA;&#xD;&#xA;The human brain is very good at recognizing axis aligned repeating patterns.. Very very good.. however, rotate a textures repeating edges 30-60 degrees and you will find it hides the repeating edges very well. Now this is more of a discussion for 3D environments than 2D but the same basic principals apply. If you can make it so your the repeating edges of your Texture are NOT the same edges as the repeating edges of your tiles, it will make them a bit nicer.&#xD;&#xA;&#xD;&#xA;Another way that this is accomplished in the realm of 3D is multi-texturing. Now this is a much easier thing to do in a 2D environment. Adding in multiple 'tile layers' that render on top of each other would achieve a more varied set of tiles with out requiring a significant amount of new tiles to be created. You would want around 5 layers or so total, 3 layers that are completely behind the player and then 2-3 layers that would render on top of the player, or objects in the scene in general. &#xD;&#xA;&#xD;&#xA;The farthest back layer would be the most repetitious and would be the generic surface you are walking on (I am assuming from what your question said that you are a top down or angle down view of the environment like Diablo or so). The next layer would still be commonly repeating but would make each area a bit 'different'. This could be collections of loose rubble, piles of bones, monster tracks and things like this that would be on top of the floor. The third background layer may or may not be needed and would be mostly for specialized tile sets, like a trickle of water or the like.&#xD;&#xA;&#xD;&#xA;The foreground layers would be used to add a bit more uniqueness to your view. You could have a character walk behind hanging lamps down the corridors, cobwebs that hint at a large number of spiders in the area or even a completely obscuring object such as a roof brace or the like.&#xD;&#xA;&#xD;&#xA;Now the answer is both in that as soon as you have adapted your tile engine to allow multiple layers like this, you will need the artwork to fill both of the layers.. And the key for the artist will to be to create the basic patters and the unique patterns that can be used together in multiple combinations and still look good (and not completely suck up all the memory you have to work with :))&#xD;&#xA;&#xD;&#xA;Anywho, hope this was enough of an answer to help you progress or at the least have new questions to ask. &#xD;&#xA;&#xD;&#xA;Enjoy!&#xD;&#xA;" />
  <row Id="17055" PostHistoryTypeId="5" PostId="8336" RevisionGUID="b5e28124-846a-4d12-b737-ca65364a6346" CreationDate="2011-02-09T22:23:28.810" UserId="5308" Comment="mostly adding capital letters and punctuation" Text="I would like to know how the collision detection was done in **The Legend of Zelda: A Link To The Past.**&#xD;&#xA;&#xD;&#xA;The game is 16x16 tile based, so how did they do the tiles where only a quarter or half of the tile is occupied?&#xD;&#xA;Did they use a smaller grid for collision detection like 8x8 tiles, so four of them make one 16x16 tile of the texture grid? &#xD;&#xA;&#xD;&#xA;But then, they also have true half tiles which are diagonally cut&#xD;&#xA;and the corners of the tiles seem to be round or something. If Link walks into tiles corner he can keep on walking and automatically moves around it's corner.&#xD;&#xA;How is that done?&#xD;&#xA;&#xD;&#xA;I hope someone can help me out here.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/iGpPx.png" />
  <row Id="17056" PostHistoryTypeId="6" PostId="8336" RevisionGUID="b5e28124-846a-4d12-b737-ca65364a6346" CreationDate="2011-02-09T22:23:28.810" UserId="5308" Comment="mostly adding capital letters and punctuation" Text="&lt;2d&gt;&lt;c#&gt;&lt;collision-detection&gt;&lt;nintendo&gt;" />
  <row Id="17057" PostHistoryTypeId="24" PostId="8336" RevisionGUID="2a991cf6-aad9-40d9-ac92-7a3626fcba23" CreationDate="2011-02-09T22:23:28.810" Comment="Proposed by 5308 approved by 189 edit id of 21" />
  <row Id="17058" PostHistoryTypeId="6" PostId="8356" RevisionGUID="f2158fd5-0e04-4bd8-8748-80bacd5d395d" CreationDate="2011-02-09T22:25:06.397" UserId="14" Comment="edited tags" Text="&lt;c++&gt;&lt;sfml&gt;" />
  <row Id="17059" PostHistoryTypeId="5" PostId="8063" RevisionGUID="64653a18-9289-4d9b-8181-aca41c51c316" CreationDate="2011-02-09T22:27:29.663" UserId="5142" Comment="added 1707 characters in body" Text="Your question is *really* broad because of the sheer number of genres out there, but here's the perspective of a professional software developer.&#xD;&#xA;&#xD;&#xA;You provided a list of criteria that you want to use to determine which data persistence mechanism you use. Those were:&#xD;&#xA;&#xD;&#xA; - The size of the project. &#xD;&#xA; - The platform targeted by the game.&#xD;&#xA; - The complexity of the data structure.&#xD;&#xA; - Portability of data amongst many project.&#xD;&#xA; - How often should the data be accessed&#xD;&#xA; - Multiple type of data for a same application&#xD;&#xA; - Any other point you think is of interest when deciding what to use.&#xD;&#xA;&#xD;&#xA;First we need to establish which options are available to us. Since you didn't specify a language or technology, it's hard to say exactly, but you are probably trying to decide between **XML** and **relational database** storage. &#xD;&#xA;&#xD;&#xA;An important distinction to make is that **XML** isn't really a storage *mechanism* so much as a serialization technique. It's a way to represent in-memory structures for your game. Given that, you're really talking about **flat file** vs. **relational database** storage. These aren't the only options, but they're the most common, so I'm going to use them.&#xD;&#xA;&#xD;&#xA;For flat files:&#xD;&#xA;&#xD;&#xA; - XML&#xD;&#xA; - JSON&#xD;&#xA; - YAML&#xD;&#xA; - XAML&#xD;&#xA; - Plain Text&#xD;&#xA;&#xD;&#xA;For databases:&#xD;&#xA;&#xD;&#xA; - SQL Server&#xD;&#xA; - MySQL&#xD;&#xA; - DB2&#xD;&#xA; - Oracle&#xD;&#xA; - Many More&#xD;&#xA;&#xD;&#xA;**EDIT:** You asked about other types of mechanisms aside from files and relational databases. The only other notable type of database that I have seen used on a regular basis are &quot;Berkeley-style&quot; databases, which are essentially key-value based. These tend to use B-trees to structure data so lookups are fast. These are great for configuration/setting lookup where you know exactly what you want (e.g., give me all the telemetry data for &quot;Level 1&quot;).&#xD;&#xA;&#xD;&#xA;Now that we have all the basics out of the way, let's touch on some of your criteria.&#xD;&#xA;&#xD;&#xA;**The size of the project.** &#xD;&#xA; &#xD;&#xA;Some might disagree, but the size of your project won't necessarily have a huge impact on your data persistence mechanism. You will want to build a reusable library of functions that store/load data from whichever mechanism you want. I would even suggest implementing an abstraction layer (check out the [Adapter pattern][1]) so that you could easily change your persistence mechanism if you needed to.&#xD;&#xA;&#xD;&#xA;Having said that, for small projects, using XML on the file system can potentially work well, but you will want to address some of your security concerns (i.e., encryption) so that players can't change data at will.&#xD;&#xA;&#xD;&#xA;**The platform targeted by the game.**&#xD;&#xA; &#xD;&#xA;Platform isn't going to be a huge issue either. You should be more concerned about your development platform than the target platform. The reason for this is that some languages handle certain types of markup or databases better than others out of the box. That isn't to say that you couldn't use any of the above in almost any language, but sometimes it's best to use the supported tools that are available to you. Any platform will support flat files and parse XML, but on mobile platforms you might want to consider binary serialization if possible, or at least optimize your XML for storage.&#xD;&#xA;&#xD;&#xA;**The complexity of the data structure.**&#xD;&#xA; &#xD;&#xA;This is sort of a tricky one. Relational databases are great for just that...storing entities and their relationships. You have a better ability to enforce structure using a relational storage repository than you do with files on a file system. Consider the types of relationships between your entities as well as how often you're changing them or finding related entities. For extremely complex structures, I would suggest going the database route.&#xD;&#xA;&#xD;&#xA;**Portability of data amongst many project.**&#xD;&#xA; &#xD;&#xA;When it comes to portability, you should consider the fact that databases are naturally more heavyweight than files. There's installation and configuration overhead, different databases will be available for different platforms, etc. SQLite is a pretty good way around this. However, when it comes to portability, you will likely have an easier time with file-based solutions like XML.&#xD;&#xA;&#xD;&#xA;**EDIT:** There are some other concerns you mentioned about portability in one of your comments. Ultimately you don't want your data to be coupled too tightly to any product or file type. It's ultimately best if you can store stock data (levels, enemies, etc.) in some kind of abstract format (tab delimited files, XML, etc.) that you can easily parse and store in a database/file system at compile or load time. This means that you can swap out your storage mechanism on a whim and just rewrite the parsing piece.&#xD;&#xA;&#xD;&#xA;**How often should the data be accessed**&#xD;&#xA; &#xD;&#xA;Lots of data access means lots of I/O unless you have some kind of a caching mechanism. Databases keep structures in memory and are great for data manipulation and retrieval. If you're really persisting data constantly, you might want to stick with a database.&#xD;&#xA;&#xD;&#xA;**Multiple type of data for a same application**&#xD;&#xA; &#xD;&#xA;Volume is certainly a consideration, but unless you're talking about persisting thousands or millions of objects, file system will still be acceptable as a solution.&#xD;&#xA;&#xD;&#xA;**Game Type**&#xD;&#xA; &#xD;&#xA;The type of game you're building can have a huge influence on the platform you choose. Yeah, for most client-only single-player games, you're going to be fine using a compressed or encrypted file system-based solution. If you're talking about games with an online component, though, that would be crazy. Go the database route and save yourself the headache. Let the server manage all of your data using a back-end cluster.&#xD;&#xA;&#xD;&#xA;Hope some of this feedback helps. It's by no means completely comprehensive, and making the decision is ultimately up to you, but my commentary should give you some things to think about.&#xD;&#xA;&#xD;&#xA;**EDIT:** There are some times where taking a hybdrid approach makes a lot of sense. For example, let's say you are developing an MMORPG. On the client side, you might store cached data about other players in a non-relational database (as mentioned above). On the server side, you're storing all game data in a relational database to persist it. And then again on the client side you're probably storing log data, configuration data, etc. in XML/flat files for easier accessibility. &#xD;&#xA;&#xD;&#xA;Another poster also mentioned that sometimes it's nice, even if you're storing data for production in a database, to have a way that you can use flat files for development instead...it can just be easier to remove another product from the mix.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adapter_pattern" />
  <row Id="17061" PostHistoryTypeId="2" PostId="8359" RevisionGUID="3dbea47f-bd8f-40d7-b58d-c208a9f7eaf1" CreationDate="2011-02-09T22:33:21.120" UserId="5318" Text="I'm working on a very simple OpenGL ES 2.0 game, and I'm not sure what tool to use to create the vertex data I need. My first thought was adobe illustrator, but I can't seem to google up any info on how to convert an .ai file to vertices. I'm only going to be using very simple 2d shapes so I wonder if I need to use a 3d modelling program?&#xD;&#xA;How is this typically done, when you are working with 2d non-sprite shapes?" />
  <row Id="17062" PostHistoryTypeId="1" PostId="8359" RevisionGUID="3dbea47f-bd8f-40d7-b58d-c208a9f7eaf1" CreationDate="2011-02-09T22:33:21.120" UserId="5318" Text="what tool should I use for drawing 2d OpenGL shapes?" />
  <row Id="17063" PostHistoryTypeId="3" PostId="8359" RevisionGUID="3dbea47f-bd8f-40d7-b58d-c208a9f7eaf1" CreationDate="2011-02-09T22:33:21.120" UserId="5318" Text="&lt;2d&gt;&lt;opengl-es&gt;&lt;art&gt;" />
  <row Id="17064" PostHistoryTypeId="4" PostId="8336" RevisionGUID="faa83e2f-5048-40ce-bf82-9f609cb7126e" CreationDate="2011-02-09T22:37:58.430" UserId="14" Comment="edited tags; edited title" Text="How was collision detection handled The Legend of Zelda: A Link to the Past?" />
  <row Id="17065" PostHistoryTypeId="6" PostId="8336" RevisionGUID="faa83e2f-5048-40ce-bf82-9f609cb7126e" CreationDate="2011-02-09T22:37:58.430" UserId="14" Comment="edited tags; edited title" Text="&lt;2d&gt;&lt;c#&gt;&lt;collision-detection&gt;&lt;nintendo&gt;" />
  <row Id="17066" PostHistoryTypeId="2" PostId="8360" RevisionGUID="68e47d15-7ae9-4b4c-b168-054804e099d7" CreationDate="2011-02-09T22:48:49.730" UserId="4491" Text="If the shapes are really simple (eg circles, triangles, etc), you can just generate the vertices using simple functions without going through any graphics or modeling program." />
  <row Id="17067" PostHistoryTypeId="4" PostId="8336" RevisionGUID="404e9b26-610d-403d-8159-d77ace89fc45" CreationDate="2011-02-09T22:56:35.513" UserId="5308" Comment="added a missing 'in' to the title" Text="How was collision detection handled in The Legend of Zelda: A Link to the Past?" />
  <row Id="17068" PostHistoryTypeId="24" PostId="8336" RevisionGUID="1344cc98-f49c-463e-9858-24e2aa563ed9" CreationDate="2011-02-09T22:56:35.513" Comment="Proposed by 5308 approved by 14 edit id of 23" />
  <row Id="17069" PostHistoryTypeId="5" PostId="8338" RevisionGUID="539c8297-bfae-4b19-a161-a7f06304eb79" CreationDate="2011-02-09T22:56:38.103" UserId="5308" Comment="added spaces before parantheses " Text="Given the memory limitations of the SNES, the solution must be very simple.  &#xD;&#xA;&#xD;&#xA;My guess is that they have another 16*16 grid that tells you how to handle collision in the tile. A tile can be:  &#xD;&#xA;&#xD;&#xA;* Empty&#xD;&#xA;* Full (i.e. a square block collision)&#xD;&#xA;* Half-full-1 (a diagonal top-left to bottom-right line collision)&#xD;&#xA;* Half-full-2 (a diagonal top-right to bottom-left line collision)&#xD;&#xA;&#xD;&#xA;So, when Link moves, the game engine checks the surrounding tiles and applies the collision logic for them, according to the collision grid.&#xD;&#xA;&#xD;&#xA;Of course, I didn't disassemble the Zelda sources, I'm just saying how I would do it.&#xD;&#xA;&#xD;&#xA;And the &quot;roundness&quot; of the corners is just an illusion - some special code written to make them feel that way. Developers have been doing it since the Pac-Man years:  &#xD;&#xA;http://home.comcast.net/~jpittman2/pacman/pacmandossier.html#CH2_Cornering&#xD;&#xA;&#xD;&#xA;As you see, even though the maze's topography is both tiled and super simple (only squares), a technique like smooth turning can be simulated by creating an optical illusion (square tiles with round textures) and some clever code (beginning a turn before the end of the tile)." />
  <row Id="17070" PostHistoryTypeId="24" PostId="8338" RevisionGUID="f38a84f5-3221-4dc7-9261-635fb74cb12d" CreationDate="2011-02-09T22:56:38.103" Comment="Proposed by 5308 approved by 14 edit id of 22" />
  <row Id="17071" PostHistoryTypeId="5" PostId="8357" RevisionGUID="868e0589-2eea-48f1-ab1c-4d5e99c6136e" CreationDate="2011-02-09T23:09:16.863" UserId="4443" Comment="Added in a quick response from the comments given on the initial answer.; deleted 11 characters in body" Text="The quick answer is: Both.&#xD;&#xA;&#xD;&#xA;The human brain is very good at recognizing axis aligned repeating patterns.. Very very good.. however, rotate a textures repeating edges 30-60 degrees and you will find it hides the repeating edges very well. Now this is more of a discussion for 3D environments than 2D but the same basic principals apply. If you can make it so your the repeating edges of your Texture are NOT the same edges as the repeating edges of your tiles, it will make them a bit nicer.&#xD;&#xA;&#xD;&#xA;Another way that this is accomplished in the realm of 3D is multi-texturing. Now this is a much easier thing to do in a 2D environment. Adding in multiple 'tile layers' that render on top of each other would achieve a more varied set of tiles with out requiring a significant amount of new tiles to be created. You would want around 5 layers or so total, 3 layers that are completely behind the player and then 2-3 layers that would render on top of the player, or objects in the scene in general. &#xD;&#xA;&#xD;&#xA;The farthest back layer would be the most repetitious and would be the generic surface you are walking on (I am assuming from what your question said that you are a top down or angle down view of the environment like Diablo or so). The next layer would still be commonly repeating but would make each area a bit 'different'. This could be collections of loose rubble, piles of bones, monster tracks and things like this that would be on top of the floor. The third background layer may or may not be needed and would be mostly for specialized tile sets, like a trickle of water or the like.&#xD;&#xA;&#xD;&#xA;The foreground layers would be used to add a bit more uniqueness to your view. You could have a character walk behind hanging lamps down the corridors, cobwebs that hint at a large number of spiders in the area or even a completely obscuring object such as a roof brace or the like.&#xD;&#xA;&#xD;&#xA;Now the answer is both in that as soon as you have adapted your tile engine to allow multiple layers like this, you will need the artwork to fill both of the layers.. And the key for the artist will to be to create the basic patters and the unique patterns that can be used together in multiple combinations and still look good (and not completely suck up all the memory you have to work with :))&#xD;&#xA;&#xD;&#xA;EDIT: From the comment given this gives an entirely new approach, hehe. What is said above still applies, but since we are dealing with large heights (perception wise if we are flying :)) you might benefit from a bit of parallax scrolling (where the tile layers do not scroll at the same rate as each other). This would potentially give you the ability to do deep crevices, or a break through the cloudy sky you are flying through to see the world below. As for the complication implied, its really just a repetition of what you are currently doing.. Instead of rendering a single set of tiles at a time you will do it a few times.. It should not be too much of a stretch from where it sounds like your current game and engine are :)&#xD;&#xA;&#xD;&#xA;Anywho, hope this was enough of an answer to help you progress or at the least have new questions to ask. &#xD;&#xA;&#xD;&#xA;Enjoy!&#xD;&#xA;" />
  <row Id="17072" PostHistoryTypeId="25" PostId="8351" RevisionGUID="b1e07c0c-eed1-400f-8406-96b7729eceec" CreationDate="2011-02-09T23:22:18.220" Comment="http://twitter.com/#!/StackGameDev/status/35478623058272256" />
  <row Id="17073" PostHistoryTypeId="2" PostId="8361" RevisionGUID="7e53db7c-1b2d-4e33-843d-9ca9e658002e" CreationDate="2011-02-10T00:05:03.737" UserId="4947" Text="If shapes are really complicated, I would recommend 3D modelling software (for example Blender, which is freeware). When you will be loading data, you can just throw away one coordinate. You can for example use front orthogonal view and then discard z-coordinate. &#xD;&#xA;&#xD;&#xA;Such software also allow to export data to some graphic format, like OBJ or PLY. There is a lot of loaders for them already written." />
  <row Id="17074" PostHistoryTypeId="2" PostId="8362" RevisionGUID="0e7d5e1c-2422-4565-a3fb-8157b5752189" CreationDate="2011-02-10T00:37:26.033" UserDisplayName="user5326" Text="I am using an ArrayList to handle objects and at each interval of 120 frames, I am adding a new object of the same type at a random location along the z-axis of 60. The problem is, it doesn't add just 1. It depends on how many are in the list. If I kill the Fox before the time interval when one is supposed to spawn comes, then no Fox will be spawned. If I don't kill any foxes, it grows exponentially. I only want one Fox to be added every 120 frames. This problem never happened before when I created new ones and added them to the environment. Any insights?&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;import env3d.EnvObject;&#xD;&#xA;import java.util.ArrayList;&#xD;&#xA;&#xD;&#xA;public class Fox extends Creature&#xD;&#xA;{&#xD;&#xA;    private int frame = 0;&#xD;&#xA;    public Fox(double x, double y, double z)&#xD;&#xA;    {&#xD;&#xA;        super(x, y, z);&#xD;&#xA;          &#xD;&#xA;        // Must use the mutator as the fields have private access&#xD;&#xA;        // in the parent class&#xD;&#xA;        setTexture(&quot;models/fox/fox.png&quot;);&#xD;&#xA;        setModel(&quot;models/fox/fox.obj&quot;);&#xD;&#xA;        &#xD;&#xA;        setScale(1.4);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public void move(ArrayList&lt;Creature&gt; creatures, ArrayList&lt;Creature&gt; dead_creatures, ArrayList&lt;Creature&gt; new_creatures)&#xD;&#xA;    {&#xD;&#xA;        frame++;&#xD;&#xA;        setX(getX()-0.2);&#xD;&#xA;        setRotateY(270);&#xD;&#xA;        &#xD;&#xA;        if (frame &gt; 120) {&#xD;&#xA;            Fox f = new Fox(60, 1, (int)(Math.random()*28)+1);&#xD;&#xA;            new_creatures.add(f);&#xD;&#xA;            frame = 0;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        for (Creature c : creatures) {&#xD;&#xA;            if (this.distance(c) &lt; this.getScale()+c.getScale() &amp;&amp; c instanceof Tux) {&#xD;&#xA;                    dead_creatures.add(c);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        for (Creature c : creatures) {&#xD;&#xA;            if (c.getX() &lt; 1 &amp;&amp; c instanceof Fox) {&#xD;&#xA;                dead_creatures.add(c);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;import env3d.Env;&#xD;&#xA;import java.util.ArrayList;&#xD;&#xA;import org.lwjgl.input.Keyboard;&#xD;&#xA;  &#xD;&#xA;/**&#xD;&#xA; * A predator and prey simulation.  Fox is the predator and Tux is the prey.&#xD;&#xA; */&#xD;&#xA;public class Game&#xD;&#xA;{&#xD;&#xA;    private Env env;    &#xD;&#xA;    private boolean finished;&#xD;&#xA;    private ArrayList&lt;Creature&gt; creatures;&#xD;&#xA;    private KingTux king;&#xD;&#xA;    private Snowball ball;&#xD;&#xA;    private int tuxcounter;&#xD;&#xA;    private int kills;&#xD;&#xA;  &#xD;&#xA;    /**&#xD;&#xA;     * Constructor for the Game class. It sets up the foxes and tuxes.&#xD;&#xA;     */&#xD;&#xA;    public Game()&#xD;&#xA;    {&#xD;&#xA;        // we use a separate ArrayList to keep track of each animal. &#xD;&#xA;        // our room is 50 x 50.&#xD;&#xA;        creatures = new ArrayList&lt;Creature&gt;();&#xD;&#xA;        &#xD;&#xA;        for (int i = 0; i &lt; 10; i++) {&#xD;&#xA;            creatures.add(new Tux((int)(Math.random()*10)+1, 1, (int)(Math.random()*28)+1));&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        for (int i = 0; i &lt; 1; i++) {&#xD;&#xA;            creatures.add(new Fox(60, 1, (int)(Math.random()*28)+1));&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        king = new KingTux(25, 1, 35);&#xD;&#xA;        &#xD;&#xA;        ball = new Snowball(-400, -400, -400);&#xD;&#xA;    }&#xD;&#xA;      &#xD;&#xA;    /**&#xD;&#xA;     * Play the game&#xD;&#xA;     */&#xD;&#xA;    public void play()&#xD;&#xA;    {&#xD;&#xA;          &#xD;&#xA;        finished = false;&#xD;&#xA;          &#xD;&#xA;        // Create the new environment.  Must be done in the same&#xD;&#xA;        // method as the game loop&#xD;&#xA;        env = new Env();&#xD;&#xA;          &#xD;&#xA;        // Make the room 50 x 50.&#xD;&#xA;        env.setRoom(new Room());&#xD;&#xA;          &#xD;&#xA;        // Add all the animals into to the environment for display&#xD;&#xA;        for (Creature c : creatures) {&#xD;&#xA;            env.addObject(c);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        for (Creature c : creatures) {&#xD;&#xA;            if (c instanceof Tux) {&#xD;&#xA;                tuxcounter++;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        env.addObject(king);&#xD;&#xA;        env.addObject(ball);&#xD;&#xA;        &#xD;&#xA;        // Sets up the camera&#xD;&#xA;        env.setCameraXYZ(30, 50, 55);&#xD;&#xA;        env.setCameraPitch(-63);&#xD;&#xA;          &#xD;&#xA;        // Turn off the default controls&#xD;&#xA;        env.setDefaultControl(false);&#xD;&#xA;          &#xD;&#xA;        // A list to keep track of dead tuxes.&#xD;&#xA;        ArrayList&lt;Creature&gt; dead_creatures = new ArrayList&lt;Creature&gt;();&#xD;&#xA;        ArrayList&lt;Creature&gt; new_creatures = new ArrayList&lt;Creature&gt;();&#xD;&#xA;          &#xD;&#xA;        // The main game loop&#xD;&#xA;        while (!finished) {            &#xD;&#xA;          &#xD;&#xA;            if (env.getKey() == 1 || tuxcounter == 0)  {&#xD;&#xA;                finished = true;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            env.setDisplayStr(&quot;Tuxes: &quot; + tuxcounter, 15, 0);&#xD;&#xA;            env.setDisplayStr(&quot;Kills: &quot; + kills, 140, 0);&#xD;&#xA;            &#xD;&#xA;            processInput(); &#xD;&#xA;            &#xD;&#xA;            ball.move();&#xD;&#xA;            &#xD;&#xA;            king.check();&#xD;&#xA;             &#xD;&#xA;            // Move each fox and tux.&#xD;&#xA;            for (Creature c : creatures) {&#xD;&#xA;                c.move(creatures, dead_creatures, new_creatures);&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            for (Creature c : creatures) {&#xD;&#xA;                if (c.distance(ball) &lt; c.getScale()+ball.getScale() &amp;&amp; c instanceof Fox) {&#xD;&#xA;                    dead_creatures.add(c);&#xD;&#xA;                    ball.setX(-400);&#xD;&#xA;                    ball.setY(-400);&#xD;&#xA;                    ball.setZ(-400);&#xD;&#xA;                    kills++;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;              &#xD;&#xA;            // Clean up of the dead tuxes.&#xD;&#xA;            for (Creature c : dead_creatures) {&#xD;&#xA;                if (c instanceof Tux) {&#xD;&#xA;                    tuxcounter--;&#xD;&#xA;                }&#xD;&#xA;                env.removeObject(c);&#xD;&#xA;                creatures.remove(c);&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            for (Creature c : new_creatures) {&#xD;&#xA;                creatures.add(c);&#xD;&#xA;                env.addObject(c);&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            // we clear the ArrayList for the next loop.  We could create a new one &#xD;&#xA;            // every loop but that would be very inefficient.&#xD;&#xA;            &#xD;&#xA;            dead_creatures.clear();&#xD;&#xA;            new_creatures.clear();&#xD;&#xA;          &#xD;&#xA;            // Update display&#xD;&#xA;            env.advanceOneFrame();&#xD;&#xA;        }&#xD;&#xA;          &#xD;&#xA;        // Just a little clean up&#xD;&#xA;        env.exit();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    private void processInput()&#xD;&#xA;    {&#xD;&#xA;        int keyDown = env.getKeyDown();&#xD;&#xA;        int key = env.getKey();&#xD;&#xA;        &#xD;&#xA;        if (keyDown == 203) {&#xD;&#xA;            king.setX(king.getX()-1);&#xD;&#xA;        } else if (keyDown == 205) {&#xD;&#xA;            king.setX(king.getX()+1);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        if (ball.getX() &lt;= -400 &amp;&amp; key == Keyboard.KEY_S) { &#xD;&#xA;            ball.setX(king.getX());&#xD;&#xA;            ball.setY(king.getY());&#xD;&#xA;            ball.setZ(king.getZ());&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;      &#xD;&#xA;    /**&#xD;&#xA;     * Main method to launch the program.&#xD;&#xA;     */&#xD;&#xA;    public static void main(String args[]) {&#xD;&#xA;        (new Game()).play();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Creature (Parent class to Tux, Fox, and KingTux): http://pastebin.com/upTNnDxc&#xD;&#xA;&#xD;&#xA;The rest of the classes are a bit trivial to this specific problem." />
  <row Id="17075" PostHistoryTypeId="1" PostId="8362" RevisionGUID="0e7d5e1c-2422-4565-a3fb-8157b5752189" CreationDate="2011-02-10T00:37:26.033" UserDisplayName="user5326" Text="Adding objects to the environment at timed intervals" />
  <row Id="17076" PostHistoryTypeId="3" PostId="8362" RevisionGUID="0e7d5e1c-2422-4565-a3fb-8157b5752189" CreationDate="2011-02-10T00:37:26.033" UserDisplayName="user5326" Text="&lt;java&gt;&lt;game&gt;" />
  <row Id="17077" PostHistoryTypeId="2" PostId="8363" RevisionGUID="28c99bc2-e55d-42df-94b0-0df76bd89d9b" CreationDate="2011-02-10T00:49:52.483" UserId="3547" Text="If I understand your code, your fox class is the one that spawns new fox objects inside the move method. By putting this logic in the move method, multiple fox instances are adding more foxes to the list. Also, if no foxes exist, this logic will never occur because the move method will not execute (no instances to call upon). Thus, if there are no more foxes (no fox objects are being updated) then foxes will not be spawned.&#xD;&#xA;&#xD;&#xA;You should move this spawning code outside of the fox class. That way only one fox is added every 120 frames (no exponential growth) and a fox will always respawn, regardless of whether there are no more foxes.&#xD;&#xA;&#xD;&#xA;Keep track of the frames and spawn foxes outside of this move method. Do not put it inside the fox class, make it independent on fox instances. That's the only reason why your seeing this erratic behavior." />
  <row Id="17078" PostHistoryTypeId="5" PostId="8363" RevisionGUID="7580bbd7-27db-4f03-990d-3d60ed68d197" CreationDate="2011-02-10T00:55:34.100" UserId="3547" Comment="added 101 characters in body" Text="If I understand your code, your fox class is the one that spawns new fox objects inside the move method. By putting this logic in the move method, multiple fox instances are adding more foxes to the list. Also, if no foxes exist, this logic will never occur because the move method will not execute (no instances to call upon). Thus, if there are no more foxes (no fox objects are being updated) then foxes will not be spawned.&#xD;&#xA;&#xD;&#xA;You should move this spawning code outside of the fox class. That way only one fox is added every 120 frames (no exponential growth) and a fox will always respawn, regardless of whether there are no more foxes.&#xD;&#xA;&#xD;&#xA;Keep track of the frames and spawn foxes outside of this move method. Do not put it inside the fox class, make it independent of fox instances so that this logic is only at least and no more than once, regardless of the number of fox instances. That's the only reason why your seeing this erratic behavior." />
  <row Id="17079" PostHistoryTypeId="2" PostId="8364" RevisionGUID="45f43cd0-d5af-4993-85c7-30221e36c6b0" CreationDate="2011-02-10T01:07:28.187" UserId="4443" Text="May be my lack of understanding the underlying objects here but I think the definition of 'frame' is the cause of the problems.&#xD;&#xA;&#xD;&#xA;You are incrementing the counter once per creature so the more creatures you have the faster new ones will spawn... This likely should be incremented Before the call to move() instead of inside the call that happens once per creature.&#xD;&#xA;&#xD;&#xA;If this isnt the case, please clarify in comments and I'll try again :)" />
  <row Id="17080" PostHistoryTypeId="5" PostId="8362" RevisionGUID="4a167799-8674-4c00-b263-fad29f73fda4" CreationDate="2011-02-10T02:09:08.150" UserId="1430" Comment="really removed pastebin link" Text="I am using an `ArrayList` to handle objects and at each interval of 120 frames, I am adding a new object of the same type at a random location along the z-axis of 60. The problem is, it doesn't add just 1. It depends on how many are in the list. If I kill the Fox before the time interval when one is supposed to spawn comes, then no Fox will be spawned. If I don't kill any foxes, it grows exponentially. I only want one Fox to be added every 120 frames. This problem never happened before when I created new ones and added them to the environment. Any insights?&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;    /**** FOX CLASS ****/&#xD;&#xA;    import env3d.EnvObject;&#xD;&#xA;    import java.util.ArrayList;&#xD;&#xA;    &#xD;&#xA;    public class Fox extends Creature&#xD;&#xA;    {&#xD;&#xA;        private int frame = 0;&#xD;&#xA;        public Fox(double x, double y, double z)&#xD;&#xA;        {&#xD;&#xA;            super(x, y, z);&#xD;&#xA;              &#xD;&#xA;            // Must use the mutator as the fields have private access&#xD;&#xA;            // in the parent class&#xD;&#xA;            setTexture(&quot;models/fox/fox.png&quot;);&#xD;&#xA;            setModel(&quot;models/fox/fox.obj&quot;);&#xD;&#xA;            &#xD;&#xA;            setScale(1.4);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void move(ArrayList&lt;Creature&gt; creatures, ArrayList&lt;Creature&gt; dead_creatures, ArrayList&lt;Creature&gt; new_creatures)&#xD;&#xA;        {&#xD;&#xA;            frame++;&#xD;&#xA;            setX(getX()-0.2);&#xD;&#xA;            setRotateY(270);&#xD;&#xA;            &#xD;&#xA;            if (frame &gt; 120) {&#xD;&#xA;                Fox f = new Fox(60, 1, (int)(Math.random()*28)+1);&#xD;&#xA;                new_creatures.add(f);&#xD;&#xA;                frame = 0;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            for (Creature c : creatures) {&#xD;&#xA;                if (this.distance(c) &lt; this.getScale()+c.getScale() &amp;&amp; c instanceof Tux) {&#xD;&#xA;                        dead_creatures.add(c);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            for (Creature c : creatures) {&#xD;&#xA;                if (c.getX() &lt; 1 &amp;&amp; c instanceof Fox) {&#xD;&#xA;                    dead_creatures.add(c);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    import env3d.Env;&#xD;&#xA;    import java.util.ArrayList;&#xD;&#xA;    import org.lwjgl.input.Keyboard;&#xD;&#xA;      &#xD;&#xA;    /**&#xD;&#xA;     * A predator and prey simulation.  Fox is the predator and Tux is the prey.&#xD;&#xA;     */&#xD;&#xA;    public class Game&#xD;&#xA;    {&#xD;&#xA;        private Env env;    &#xD;&#xA;        private boolean finished;&#xD;&#xA;        private ArrayList&lt;Creature&gt; creatures;&#xD;&#xA;        private KingTux king;&#xD;&#xA;        private Snowball ball;&#xD;&#xA;        private int tuxcounter;&#xD;&#xA;        private int kills;&#xD;&#xA;      &#xD;&#xA;        /**&#xD;&#xA;         * Constructor for the Game class. It sets up the foxes and tuxes.&#xD;&#xA;         */&#xD;&#xA;        public Game()&#xD;&#xA;        {&#xD;&#xA;            // we use a separate ArrayList to keep track of each animal. &#xD;&#xA;            // our room is 50 x 50.&#xD;&#xA;            creatures = new ArrayList&lt;Creature&gt;();&#xD;&#xA;            &#xD;&#xA;            for (int i = 0; i &lt; 10; i++) {&#xD;&#xA;                creatures.add(new Tux((int)(Math.random()*10)+1, 1, (int)(Math.random()*28)+1));&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            for (int i = 0; i &lt; 1; i++) {&#xD;&#xA;                creatures.add(new Fox(60, 1, (int)(Math.random()*28)+1));&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            king = new KingTux(25, 1, 35);&#xD;&#xA;            &#xD;&#xA;            ball = new Snowball(-400, -400, -400);&#xD;&#xA;        }&#xD;&#xA;          &#xD;&#xA;        /**&#xD;&#xA;         * Play the game&#xD;&#xA;         */&#xD;&#xA;        public void play()&#xD;&#xA;        {&#xD;&#xA;              &#xD;&#xA;            finished = false;&#xD;&#xA;              &#xD;&#xA;            // Create the new environment.  Must be done in the same&#xD;&#xA;            // method as the game loop&#xD;&#xA;            env = new Env();&#xD;&#xA;              &#xD;&#xA;            // Make the room 50 x 50.&#xD;&#xA;            env.setRoom(new Room());&#xD;&#xA;              &#xD;&#xA;            // Add all the animals into to the environment for display&#xD;&#xA;            for (Creature c : creatures) {&#xD;&#xA;                env.addObject(c);&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            for (Creature c : creatures) {&#xD;&#xA;                if (c instanceof Tux) {&#xD;&#xA;                    tuxcounter++;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            env.addObject(king);&#xD;&#xA;            env.addObject(ball);&#xD;&#xA;            &#xD;&#xA;            // Sets up the camera&#xD;&#xA;            env.setCameraXYZ(30, 50, 55);&#xD;&#xA;            env.setCameraPitch(-63);&#xD;&#xA;              &#xD;&#xA;            // Turn off the default controls&#xD;&#xA;            env.setDefaultControl(false);&#xD;&#xA;              &#xD;&#xA;            // A list to keep track of dead tuxes.&#xD;&#xA;            ArrayList&lt;Creature&gt; dead_creatures = new ArrayList&lt;Creature&gt;();&#xD;&#xA;            ArrayList&lt;Creature&gt; new_creatures = new ArrayList&lt;Creature&gt;();&#xD;&#xA;              &#xD;&#xA;            // The main game loop&#xD;&#xA;            while (!finished) {            &#xD;&#xA;              &#xD;&#xA;                if (env.getKey() == 1 || tuxcounter == 0)  {&#xD;&#xA;                    finished = true;&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;                env.setDisplayStr(&quot;Tuxes: &quot; + tuxcounter, 15, 0);&#xD;&#xA;                env.setDisplayStr(&quot;Kills: &quot; + kills, 140, 0);&#xD;&#xA;                &#xD;&#xA;                processInput(); &#xD;&#xA;                &#xD;&#xA;                ball.move();&#xD;&#xA;                &#xD;&#xA;                king.check();&#xD;&#xA;                 &#xD;&#xA;                // Move each fox and tux.&#xD;&#xA;                for (Creature c : creatures) {&#xD;&#xA;                    c.move(creatures, dead_creatures, new_creatures);&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;                for (Creature c : creatures) {&#xD;&#xA;                    if (c.distance(ball) &lt; c.getScale()+ball.getScale() &amp;&amp; c instanceof Fox) {&#xD;&#xA;                        dead_creatures.add(c);&#xD;&#xA;                        ball.setX(-400);&#xD;&#xA;                        ball.setY(-400);&#xD;&#xA;                        ball.setZ(-400);&#xD;&#xA;                        kills++;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                  &#xD;&#xA;                // Clean up of the dead tuxes.&#xD;&#xA;                for (Creature c : dead_creatures) {&#xD;&#xA;                    if (c instanceof Tux) {&#xD;&#xA;                        tuxcounter--;&#xD;&#xA;                    }&#xD;&#xA;                    env.removeObject(c);&#xD;&#xA;                    creatures.remove(c);&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;                for (Creature c : new_creatures) {&#xD;&#xA;                    creatures.add(c);&#xD;&#xA;                    env.addObject(c);&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;                // we clear the ArrayList for the next loop.  We could create a new one &#xD;&#xA;                // every loop but that would be very inefficient.&#xD;&#xA;                &#xD;&#xA;                dead_creatures.clear();&#xD;&#xA;                new_creatures.clear();&#xD;&#xA;              &#xD;&#xA;                // Update display&#xD;&#xA;                env.advanceOneFrame();&#xD;&#xA;            }&#xD;&#xA;              &#xD;&#xA;            // Just a little clean up&#xD;&#xA;            env.exit();&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private void processInput()&#xD;&#xA;        {&#xD;&#xA;            int keyDown = env.getKeyDown();&#xD;&#xA;            int key = env.getKey();&#xD;&#xA;            &#xD;&#xA;            if (keyDown == 203) {&#xD;&#xA;                king.setX(king.getX()-1);&#xD;&#xA;            } else if (keyDown == 205) {&#xD;&#xA;                king.setX(king.getX()+1);&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            if (ball.getX() &lt;= -400 &amp;&amp; key == Keyboard.KEY_S) { &#xD;&#xA;                ball.setX(king.getX());&#xD;&#xA;                ball.setY(king.getY());&#xD;&#xA;                ball.setZ(king.getZ());&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;          &#xD;&#xA;        /**&#xD;&#xA;         * Main method to launch the program.&#xD;&#xA;         */&#xD;&#xA;        public static void main(String args[]) {&#xD;&#xA;            (new Game()).play();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /**** CREATURE CLASS ****/&#xD;&#xA;    /* (Parent class to Tux, Fox, and KingTux) */&#xD;&#xA;    import env3d.EnvObject;&#xD;&#xA;    import java.util.ArrayList;&#xD;&#xA;      &#xD;&#xA;    abstract public class Creature extends EnvObject&#xD;&#xA;    {&#xD;&#xA;        private int frame;&#xD;&#xA;        private double rand;&#xD;&#xA;        /**&#xD;&#xA;         * Constructor for objects of class Creature&#xD;&#xA;         */&#xD;&#xA;        public Creature(double x, double y, double z)&#xD;&#xA;        {&#xD;&#xA;            setX(x);&#xD;&#xA;            setY(y);&#xD;&#xA;            setZ(z);&#xD;&#xA;            setScale(1);&#xD;&#xA;            rand = Math.random();&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private void randomGenerator()&#xD;&#xA;        {&#xD;&#xA;            rand = Math.random();&#xD;&#xA;        }&#xD;&#xA;          &#xD;&#xA;        public void move(ArrayList&lt;Creature&gt; creatures, ArrayList&lt;Creature&gt; dead_creatures, ArrayList&lt;Creature&gt; new_creatures)&#xD;&#xA;        {        &#xD;&#xA;            frame++;&#xD;&#xA;            if (frame &gt; 12) {&#xD;&#xA;                randomGenerator();&#xD;&#xA;                frame = 0;&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;    //         if (rand &lt; 0.25) {&#xD;&#xA;    //                 setX(getX()+0.3);&#xD;&#xA;    //                 setRotateY(90);&#xD;&#xA;    //         } else if (rand &lt; 0.5) {&#xD;&#xA;    //                 setX(getX()-0.3);&#xD;&#xA;    //                 setRotateY(270);&#xD;&#xA;    //         } else if (rand &lt; 0.75) {&#xD;&#xA;    //                 setZ(getZ()+0.3);&#xD;&#xA;    //                 setRotateY(0);&#xD;&#xA;    //         } else if (rand &lt; 1) {&#xD;&#xA;    //                 setZ(getZ()-0.3);&#xD;&#xA;    //                 setRotateY(180);&#xD;&#xA;    //         }&#xD;&#xA;            &#xD;&#xA;            if (rand &lt; 0.5) {&#xD;&#xA;                setRotateY(getRotateY()-7);&#xD;&#xA;            }   else if (rand &lt; 1) {&#xD;&#xA;                setRotateY(getRotateY()+7);&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            setX(getX()+Math.sin(Math.toRadians(getRotateY()))*0.5);&#xD;&#xA;            setZ(getZ()+Math.cos(Math.toRadians(getRotateY()))*0.5);&#xD;&#xA;            &#xD;&#xA;            if (getX() &lt; getScale()) setX(getScale());&#xD;&#xA;            if (getX() &gt; 50-getScale()) setX(50 - getScale());&#xD;&#xA;            if (getZ() &lt; getScale()) setZ(getScale());&#xD;&#xA;            if (getZ() &gt; 50-getScale()) setZ(50 - getScale());&#xD;&#xA;       &#xD;&#xA;            // The move method now handles collision detection&#xD;&#xA;            if (this instanceof Fox) {&#xD;&#xA;                for (Creature c : creatures) {&#xD;&#xA;                    if (c.distance(this) &lt; c.getScale()+this.getScale() &amp;&amp; c instanceof Tux) {&#xD;&#xA;                        dead_creatures.add(c);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The rest of the classes are a bit trivial to this specific problem.&#xD;&#xA;" />
  <row Id="17081" PostHistoryTypeId="2" PostId="8365" RevisionGUID="4393c6ea-8d81-44ac-a139-1cb0d7c48810" CreationDate="2011-02-10T02:18:08.830" UserId="1430" Text="You could try importing files in the [SVG file format][1]. It's not super simple, but there are a fair number of tools that can output the format (such as [Inkscape][2] on Windows). The [fog framework][3] includes a SVG loader, and you can find a few other examples by poking around Google.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scalable_Vector_Graphics&#xD;&#xA;  [2]: http://www.inkscape.org/&#xD;&#xA;  [3]: http://code.google.com/p/fog/" />
  <row Id="17082" PostHistoryTypeId="25" PostId="8320" RevisionGUID="c825c10e-be8d-4a20-b026-f54be9baf69b" CreationDate="2011-02-10T02:22:18.543" Comment="http://twitter.com/#!/StackGameDev/status/35523925429460992" />
  <row Id="17083" PostHistoryTypeId="2" PostId="8366" RevisionGUID="f9e279fa-8002-433a-bc70-f155501c2830" CreationDate="2011-02-10T03:05:03.073" UserId="5328" Text="I'm trying to access some variables in my shader, but I think I'm doing this wrong. Say I have a constant buffer that looks like this:&#xD;&#xA;&#xD;&#xA;    cbuffer perFrame&#xD;&#xA;    {&#xD;&#xA;    	float foo;&#xD;&#xA;        float bar;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;I got an ID3D10EffectConstantBuffer reference to it, and I can get a specific index by calling GetMemberByIndex, but how can I figure out how many members perFrame has so that I can get each member without going out of bounds?" />
  <row Id="17084" PostHistoryTypeId="1" PostId="8366" RevisionGUID="f9e279fa-8002-433a-bc70-f155501c2830" CreationDate="2011-02-10T03:05:03.073" UserId="5328" Text="DirectX10 How to use Constant Buffers" />
  <row Id="17085" PostHistoryTypeId="3" PostId="8366" RevisionGUID="f9e279fa-8002-433a-bc70-f155501c2830" CreationDate="2011-02-10T03:05:03.073" UserId="5328" Text="&lt;directx10&gt;" />
  <row Id="17086" PostHistoryTypeId="2" PostId="8367" RevisionGUID="ea3dc942-1d27-4f9a-aefb-4ac644855fe1" CreationDate="2011-02-10T05:35:24.760" UserId="5331" Text="I have used pyOgre sometimes and it have a lot of documentation and the community is great. You should give it a try. &#xD;&#xA;&#xD;&#xA;I can't say any other thing because i have never used Panda3D" />
  <row Id="17090" PostHistoryTypeId="5" PostId="8290" RevisionGUID="cb696098-ff77-48f2-9c83-b3991829e659" CreationDate="2011-02-10T06:24:22.163" UserId="51" Comment="deleted 15 characters in body; edited title" Text="I want a straight 3d/2d Python engine. Easily obtainable for linux and easy to use.&#xD;&#xA;&#xD;&#xA;I tried soya3d which failed for me because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;I also really want to be able to load common 3d models with out an issue.&#xD;&#xA;" />
  <row Id="17091" PostHistoryTypeId="4" PostId="8290" RevisionGUID="cb696098-ff77-48f2-9c83-b3991829e659" CreationDate="2011-02-10T06:24:22.163" UserId="51" Comment="deleted 15 characters in body; edited title" Text="Best Python 3d Engine" />
  <row Id="17093" PostHistoryTypeId="2" PostId="8369" RevisionGUID="3192b100-ae95-4cc4-b584-1b8af66a2bf8" CreationDate="2011-02-10T07:07:46.393" UserId="3188" Text="I have an app that plays back a video and draws the video onto the screen at a moving position. When I run the app, the video moves around the screen as it plays. Here is my `Draw` method...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            Texture2D videoTexture = null;&#xD;&#xA;&#xD;&#xA;            if (player.State != MediaState.Stopped)&#xD;&#xA;                videoTexture = player.GetTexture();&#xD;&#xA;&#xD;&#xA;            if (videoTexture != null)&#xD;&#xA;            {&#xD;&#xA;                spriteBatch.Begin();&#xD;&#xA;                spriteBatch.Draw(&#xD;&#xA;                        videoTexture,&#xD;&#xA;                        new Rectangle(x++, 0, 400, 300),  /* Where X is a class member */&#xD;&#xA;                        Color.White);&#xD;&#xA;                spriteBatch.End();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The video moves horizontally acros the screen. This is not exactly as I expected since I have no lines of code that clear the screen. My question is why does it not leave a trail behind?&#xD;&#xA;&#xD;&#xA;Also, how would I make it leave a trail behind?" />
  <row Id="17094" PostHistoryTypeId="1" PostId="8369" RevisionGUID="3192b100-ae95-4cc4-b584-1b8af66a2bf8" CreationDate="2011-02-10T07:07:46.393" UserId="3188" Text="How do I draw video frames onto the screen permanently using XNA?" />
  <row Id="17095" PostHistoryTypeId="3" PostId="8369" RevisionGUID="3192b100-ae95-4cc4-b584-1b8af66a2bf8" CreationDate="2011-02-10T07:07:46.393" UserId="3188" Text="&lt;xna&gt;&lt;windows&gt;&lt;video&gt;" />
  <row Id="17097" PostHistoryTypeId="2" PostId="8371" RevisionGUID="c94e8161-fc02-49e9-859f-1967e3609f50" CreationDate="2011-02-10T07:52:27.557" UserId="5335" Text="I am starting my Computer science degree at a local community college in Programming using C++. However, i will be transferring to a 4-year university. Does anyone have any insight on university programs?&#xD;&#xA;&#xD;&#xA;I know Cal State Fullerton has a degree with a minor in Game Dev. however, is that as important as getting a degree from a really great school? if i could shoot for something like Cal Poly would that be better? Or even Stanford or SF state being so close to so many gaming companies up there in the bay area?&#xD;&#xA;&#xD;&#xA;thank you in advance for any guidance. " />
  <row Id="17098" PostHistoryTypeId="1" PostId="8371" RevisionGUID="c94e8161-fc02-49e9-859f-1967e3609f50" CreationDate="2011-02-10T07:52:27.557" UserId="5335" Text="Good university for computer science with plans for Game Dev." />
  <row Id="17099" PostHistoryTypeId="3" PostId="8371" RevisionGUID="c94e8161-fc02-49e9-859f-1967e3609f50" CreationDate="2011-02-10T07:52:27.557" UserId="5335" Text="&lt;game-design&gt;&lt;education&gt;&lt;computer-science&gt;" />
  <row Id="17100" PostHistoryTypeId="2" PostId="8372" RevisionGUID="0e34d7e4-ae80-4a70-86d8-9d0893a3d702" CreationDate="2011-02-10T08:18:50.657" UserDisplayName="slcpfmmm" Text="You can view your system as if it were composed of a series of states and functions, where a function `f[j]` with input `x[j]` changes the system state `s[j]` into state `s[j+1]`, like so:&#xD;&#xA;&#xD;&#xA;    s[j+1] = f[j](s[j], x[j])&#xD;&#xA;&#xD;&#xA;A state is the explanation of your entire world. The locations of the player, the location of the enemy, the score, the remaining ammo, etc. Everything you require to draw a frame of your game.&#xD;&#xA;&#xD;&#xA;A function is anything that may effect the world. A frame change, a keypress, a network packet.&#xD;&#xA;&#xD;&#xA;The input is the data the function takes. A frame change may take the amount of time since the last frame passed, the keypress may include the actual key pressed, as well as whether or not the shift key was pressed.&#xD;&#xA;&#xD;&#xA;For the sake of this explanation, I will make the following assumptions:&#xD;&#xA;&#xD;&#xA;**Assumption 1:**&#xD;&#xA;&#xD;&#xA;The amount of states for a given run of the game is much larger than the amount of functions. You probably have hundreds of thousands of states, but only a several dozen functions (frame change, keypress, network packet, etc). Of course, the amount of inputs must be equal to the amount of states minus one.&#xD;&#xA;&#xD;&#xA;**Assumption 2:**&#xD;&#xA;&#xD;&#xA;The spacial cost (memory, disk) of storing a single state is much greater that that of storing a function and its input.&#xD;&#xA;&#xD;&#xA;**Assumption 3:**&#xD;&#xA;&#xD;&#xA;The temporal cost (time) of presenting a state is similar, or just one or two orders of magnitude longer than that of calculating a function over a state.&#xD;&#xA;&#xD;&#xA;Depending on the requirements of your replay system, there are several ways to implement a replay system, so we can start with the simplest one. I'll also make a small example using the game of chess, recorded on pieces of paper.&#xD;&#xA;&#xD;&#xA;**Method 1:**&#xD;&#xA;&#xD;&#xA;Store `s[0]...s[n]`. This is very simple, very straightforward. Because of assumption 2, the spacial cost of this is quite high.&#xD;&#xA;&#xD;&#xA;For chess, this would be accomplished by drawing the entire board for each move.&#xD;&#xA;&#xD;&#xA;**Method 2:**&#xD;&#xA;&#xD;&#xA;If you only need forward replay, you can simply store `s[0]`, and then store `f[0]...f[n-1]` (remember, this is only the name of id of the function) and `x[0]...x[n-1]` (what was the input for each of these functions). To replay, you simply start with `s[0]`, and calculate&#xD;&#xA;&#xD;&#xA;    s[1] = f[0](s[0], x[0])&#xD;&#xA;    s[2] = f[1](s[1], x[1])&#xD;&#xA;&#xD;&#xA;and so on...&#xD;&#xA;&#xD;&#xA;I want to make a small annotation here. Several other commenters said that the game &quot;must be deterministic&quot;. Anyone who says that needs to take Computer Science 101 again, because unless your game is meant to be run on quantum computers, ALL COMPUTER PROGRAMS ARE DETERMINISTIC¹. That's what makes computers so awesome.&#xD;&#xA;&#xD;&#xA;However, since your program most likely depends on external programs, ranging from libraries to the actual implementation of the CPU, making sure that your functions behave the same between platforms may be quite difficult.&#xD;&#xA;&#xD;&#xA;If you use pseudo-random numbers, you can either store the generated numbers as part of your input `x`, or store the state of the prng function as part of your state `s`, and its implementation as part of function `f`.&#xD;&#xA;&#xD;&#xA;For chess, this would be accomplished by drawing the initial board (which is known) and then describe each move saying which piece went where. This is how they actually do it, by the way.&#xD;&#xA;&#xD;&#xA;**Method 3:**&#xD;&#xA;&#xD;&#xA;Now, you most likely want to be able to seek into your replay. That is, calculate `s[n]` for an arbitrary `n`. By using method 2, you need to calculate `s[0]...s[n-1]` before you can calculate `s[n]`, which, according to assumption 2, may be quite slow.&#xD;&#xA;&#xD;&#xA;To implement this, method 3 is a generalization of methods 1 and 2: store `f[0]...f[n-1]` and `x[0]...x[n-1]` just like method 2, but also store `s[j]`, for all `j % Q == 0` for a given constant `Q`. In easier terms, this means that you store a bookmark at one out of every `Q` states. For example, for `Q == 100`, you store `s[0], s[100], s[200]...`&#xD;&#xA;&#xD;&#xA;In order to calculate `s[n]` for an arbitrary `n`, you first load the previously stored `s[floor(n/Q)]`, and then calculate all the functions from `floor(n/Q)` to `n`. At most, you will be calculating `Q` functions. Smaller values of `Q` are faster to calculate but consume much more space, while larger values of `Q` consume less space, but take longer to calculate.&#xD;&#xA;&#xD;&#xA;Method 3 with `Q==1` is the same as method 1, while method 3 with `Q==inf` is the same as method 2.&#xD;&#xA;&#xD;&#xA;For chess, this would be accomplished by drawing every move, as well as one in every 10 boards (for `Q==10`).&#xD;&#xA;&#xD;&#xA;**Method 4:**&#xD;&#xA;&#xD;&#xA;If you want to reverse replay, you can make a small variation of method 3. Suppose `Q==100`, and you want to calculate `s[150]` through `s[90]` in reverse. With the unmodified method 3, you will need to make 50 calculations to get `s[150]` and then 49 more calculations to get `s[149]` and so on. But since you already calculated `s[149]` to get `s[150]`, you can create a cache with `s[100]...s[150]` when you calculate `s[150]` for the first time, and then you already `s[149]` in the cache when you need to display it.&#xD;&#xA;&#xD;&#xA;You only need to regenerate the cache each time you need to calculate `s[j]`, for `j==(k*Q)-1` for any given `k`. This time, increasing `Q` will result in smaller size (just for the cache), but longer times (just for recreating the cache). An optimal value for `Q` can be calculated if you know the sizes and times required to calculate states and functions.&#xD;&#xA;&#xD;&#xA;For chess, this would be accomplished by drawing every move, as well as one in every 10 boards (for `Q==10`), but also, it would require to draw in a separate piece of paper, the last 10 boards you have calculated.&#xD;&#xA;&#xD;&#xA;**Method 5:**&#xD;&#xA;&#xD;&#xA;If states simply consume too much space, or functions consume too much time, you can create a solution that actually implements (not fakes) reverse replaying. To do this, you must create reverse functions for each of the functions you have. However, this requires that each of your functions is an injection. If this is doable, then for `f'` denoting the inverse of function `f`, calculating `s[j-1]` is as simple as&#xD;&#xA;&#xD;&#xA;    s[j-1] = f'[j-1](s[j], x[j-1])&#xD;&#xA;&#xD;&#xA;Note that in here, the function and input are both `j-1`, not `j`. This same function and input would be the ones you would have used if you were calculating&#xD;&#xA;&#xD;&#xA;    s[j] = f[j-1](s[j-1], x[j-1])&#xD;&#xA;&#xD;&#xA;Creating the inverse of these functions is the tricky part. However, you usually can't, since some state data is usually lost after each function in a game.&#xD;&#xA;&#xD;&#xA;This method, as is, can reverse calculate `s[j-1]`, but only if you have `s[j]`. This means that you can only watch the replay backwards, starting from the point at which you decided to replay backwards. If you want to replay backwards from an arbitrary point, you must mix this with method 4.&#xD;&#xA;&#xD;&#xA;For chess, this cannot be implemented, since with a given board and the previous move, you can know which piece was moved, but not where it moved from.&#xD;&#xA;&#xD;&#xA;**Method 6:**&#xD;&#xA;&#xD;&#xA;Finally, if you can't guarantee all your functions are injections, you can make a small trick to do so. Instead of having each function return only a new, state, you can also have it return the data it discarded, like so:&#xD;&#xA;&#xD;&#xA;    s[j+1], r[j] = f[j](s[j], x[j])&#xD;&#xA;&#xD;&#xA;Where `r[j]` is the discarded data. And then create your inverse functions so they take the discarded data, like so:&#xD;&#xA;&#xD;&#xA;    s[j] = f'[j](s[j+1], x[j], r[j])&#xD;&#xA;&#xD;&#xA;In addition of `f[j]` and `x[j]`, you must also store `r[j]` for each function. Once again, if you want to be able to seek, you must store bookmarks, such as with method 4.&#xD;&#xA;&#xD;&#xA;For chess, this would be the same as method 2, but unlike method 2, which only says which piece goes where, you also need to store where did each piece came from.&#xD;&#xA;&#xD;&#xA;**Implementation:**&#xD;&#xA;&#xD;&#xA;Since this works for all kinds of states, with all kinds of functions, for a specific game, you can make several assumptions, that will make it easier to implement. Actually, if you implement method 6 with the entire game state, not only you will be able to replay the data, but also go back in time and resume playing from any given moment. That would be pretty awesome.&#xD;&#xA;&#xD;&#xA;Instead of storing all the game state, you can simply store the bare minimum that you require to draw a given state, and serialize this data every fixed amount of time. Your states will be these serializations, and your input will now be the difference between two serializations. They key for this to work is that the serialization should change little if the world state changes little as well. This difference is completely inversible, so implementing method 5 with bookmarks is very possible.&#xD;&#xA;&#xD;&#xA;I've seen this implemented in some major games, mostly for instant replaying of recent data when an event (a frag in fps, or a score in sports games) occurs.&#xD;&#xA;&#xD;&#xA;I hope this explanation wasn't too boring.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;¹ This doesn't mean some programs act like they were non-deterministic (such as MS Windows ^^). Now seriously, if you can make a non-deterministic program on a deterministic computer, you can be pretty sure you will simultaneously win the Fields medal, Turing award and probably even an Oscar and Grammy for all that's worth.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17101" PostHistoryTypeId="25" PostId="8369" RevisionGUID="b70ad699-d098-467d-a1f5-249ff26df73d" CreationDate="2011-02-10T08:22:18.483" Comment="http://twitter.com/#!/StackGameDev/status/35614522374889472" />
  <row Id="17102" PostHistoryTypeId="2" PostId="8373" RevisionGUID="4ee07adc-6224-41ea-ab62-3a5c02fc5936" CreationDate="2011-02-10T08:26:46.747" UserDisplayName="slcpfmmm" Text="I wouldn't like to say what has already been said, so I'd recommend you [this page][1], which pretty much sums up my thoughts. I'm a recent addition to the major leagues of game development, so I can assure you that it's a tested method&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.firaxis.com/jobs/career.php" />
  <row Id="17103" PostHistoryTypeId="2" PostId="8374" RevisionGUID="2a7422dc-7c77-4d0f-b461-26093e80f586" CreationDate="2011-02-10T08:32:42.750" UserId="259" Text="Just do straight computer science, ignore any gamedev specific stuff. You need to be a good programmer first, before you can make games. No employer will turn their noses up at you because you haven't done a course on XNA development or whatever.&#xD;&#xA;&#xD;&#xA;Having said that, do as much programming and game dev in your spare time as possible. Go to X48 and take part in a Global Games Jam. Make a portfolio website listing your games and source code. These will help your CV get noticed, but once they take a closer look your straight CS degree will get you the interview." />
  <row Id="17104" PostHistoryTypeId="2" PostId="8375" RevisionGUID="d59f802b-84d1-4d4a-8aeb-08297b7cae99" CreationDate="2011-02-10T08:35:33.493" UserId="5224" Text="This will probably give you the correct effect without having to override BeginDraw which as Oscar Rodriguez rightfully said, is a bad idea.&#xD;&#xA;&#xD;&#xA;    RenderTarget2D smearRT;&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        GraphicsDevice.Clear(Color.Black);&#xD;&#xA;        &#xD;&#xA;        Texture2D videoTexture = null;&#xD;&#xA;&#xD;&#xA;        if (player.State != MediaState.Stopped)&#xD;&#xA;            videoTexture = player.GetTexture();&#xD;&#xA;&#xD;&#xA;        if (videoTexture != null)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.SetRenderTarget(smearRT);&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;            spriteBatch.Draw(&#xD;&#xA;                    videoTexture,&#xD;&#xA;                    new Rectangle(x++, 0, 400, 300),  /* Where X is a class member */&#xD;&#xA;                    Color.White);&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;            GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        spriteBatch.Begin();&#xD;&#xA;        spriteBatch.Draw(smearRT, new Rectangle(0,0, 800, 600), Color.White);&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }" />
  <row Id="17105" PostHistoryTypeId="2" PostId="8376" RevisionGUID="cc17d429-b366-4f74-9738-e1268ac8a56f" CreationDate="2011-02-10T08:38:55.897" UserDisplayName="slcpfmmm" Text="Drawing in the screen is much more than just drawing in it. A system called &quot;double buffering&quot; is commonly used. In double buffering, you have two canvases: a front and a back one.&#xD;&#xA;&#xD;&#xA;Whenever you're drawing, you draw onto the back canvas, and when you're done and ready to show it into the screen, you flip the back and front canvases. If canvases weren't cleared automatically before you started drawing on them, you'd end with even frame trails on one canvas and odd frame trails on the other. Sometimes the back canvas is cleared by the video card when you flip it, sometimes it's not. Sometimes it's actually filled with garbage so you can know you didn't clear it.&#xD;&#xA;&#xD;&#xA;However, that is not the only way to implement a graphics pipeline. There are many more, such as triple buffering, and many more esoteric ones. So you should never assume anything about data you don't explicitly save from one frame to another.&#xD;&#xA;&#xD;&#xA;Instead, if you want to have trails as you explained, you should capture your output, store it, and when you start the next frame, draw it at the very back." />
  <row Id="17106" PostHistoryTypeId="2" PostId="8377" RevisionGUID="9e5b5d22-b546-4a1d-82bc-9b6e24d079fd" CreationDate="2011-02-10T08:49:07.353" UserId="4264" Text="You're referring to two different kinds of avatar editors.&#xD;&#xA;&#xD;&#xA;Wii's avatar editor is mostly textures with glyph bombing - moving, scaling and rotating different facial features like nose, eyes, mouth etc. The only other features there are how tall and/or (iirc) fat your character is, and these are trivial scaling operations.&#xD;&#xA;&#xD;&#xA;More complex 3d avatar editors, like in mass effect or sims, are probably(tm) based on morph targets. The artist creates a &quot;generic&quot; face mesh, and lots of variants of it for each morph dimension set (like small nose, big nose, etc), and by combining all these morph dimensions, you get your final face.&#xD;&#xA;&#xD;&#xA;At least some of the commercial solutions are based on huge databases of actual 3d-scanned faces which they have analyzed to generate a morph database, resulting in interesting dimensions like male/female or caucasian/asian, etc." />
  <row Id="17107" PostHistoryTypeId="2" PostId="8378" RevisionGUID="51ee893d-2e0d-4afa-82a4-1bf44c1efbad" CreationDate="2011-02-10T08:55:51.217" UserId="288" Text="Just a bit of a guess here (after &lt;a href=&quot;http://stackoverflow.com/questions/4953191/xna-and-rendertargets/4954988#4954988&quot;&gt;answering this question&lt;/a&gt;): It's possible that the video renderer is clearing the graphics memory. Perhaps it has to emulate a quirk of the Xbox GPU hardware to remain consistent on Windows. I'm not entirely sure. &#xD;&#xA;&#xD;&#xA;But try modifying:&#xD;&#xA;&#xD;&#xA;    GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage&#xD;&#xA;&#xD;&#xA;And setting it to `RenderTargetUsage.PreserveContents`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'm pretty sure you don't need to fiddle with `BeginDraw` (as Josh mentioned). Unless you've change it yourself, it should have no effect.&#xD;&#xA;&#xD;&#xA;However you should be aware of double-buffering (as Oscar mentions) - this will probably cause the trail your video leaves behind to flicker. The simple way to solve this is to disable double-buffering. The more complicated way is to use render targets to store your video trail (this also solves the clearing problem)." />
  <row Id="17108" PostHistoryTypeId="2" PostId="8379" RevisionGUID="5ccea3ef-3d88-45f7-8930-f08af6fd5c27" CreationDate="2011-02-10T08:56:42.387" UserId="4264" Text="Pure roleplaying aside, the stats should have some kind of effect in gameplay. Like with interactive fiction, whenever you introduce a new physics element, the whole game changes.&#xD;&#xA;&#xD;&#xA;For example, if you add a torch in an interactive fiction game, the players will start to try to burn everything, and you'll have to have some kind of answer to what happens when the player tries to light something obviously flammable, or at least some reason why the player shouldn't do it.&#xD;&#xA;&#xD;&#xA;So how does this relate to stats? There's no point in adding a stat if it doesn't have anything to do with the game. Adding charisma, for example, means the game world has to react to, at least, extremely high and extremely low charisma values differently." />
  <row Id="17109" PostHistoryTypeId="5" PostId="8378" RevisionGUID="ee91d2c7-7e9d-4167-977c-51216b4ce8f7" CreationDate="2011-02-10T09:02:20.803" UserId="288" Comment="added 18 characters in body; added 63 characters in body" Text="Just a bit of a guess here (after &lt;a href=&quot;http://stackoverflow.com/questions/4953191/xna-and-rendertargets/4954988#4954988&quot;&gt;answering this question&lt;/a&gt;): It's possible that the video renderer is clearing the graphics memory. Perhaps it has to emulate a quirk of the Xbox GPU hardware to remain consistent on Windows. I'm not entirely sure. &#xD;&#xA;&#xD;&#xA;But try using:&#xD;&#xA;&#xD;&#xA;    GraphicsDeviceManager.PreparingDeviceSettings&#xD;&#xA;&#xD;&#xA;to modify:&#xD;&#xA;&#xD;&#xA;    GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage&#xD;&#xA;&#xD;&#xA;And setting it to `RenderTargetUsage.PreserveContents`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'm pretty sure you don't need to fiddle with `BeginDraw` (as Josh mentioned). Unless you've change it yourself, it should have no effect.&#xD;&#xA;&#xD;&#xA;However you should be aware of double-buffering (as Oscar mentions) - this will probably cause the trail your video leaves behind to flicker. The simple way to solve this is to disable double-buffering. The more complicated way is to use render targets (as Roy mentions) to store your video trail (this also solves the clearing problem)." />
  <row Id="17110" PostHistoryTypeId="2" PostId="8380" RevisionGUID="c57676cb-b876-4d30-96be-b7cae7933586" CreationDate="2011-02-10T09:16:59.357" UserId="4082" Text="I'd vote against deterministic replaying. It's FAR simpler and FAR less error-prone to save the state of every entity every 1/Nth of a second. &#xD;&#xA;&#xD;&#xA;Save just what you want to show on playback - if it's just position and heading, fine, if you also want to show stats save that, too, but in general save as little as possible.&#xD;&#xA;&#xD;&#xA;Tweak the encoding. Use as few bits as possible for everything. The replay doesn't have to be perfect as long as it looks good enough. Even if you use a float for, say, heading, you can save it in a byte and get 256 possible values (1.4º precision). That may be enough or even too much for your particular problem.&#xD;&#xA;&#xD;&#xA;Use delta encoding. Unless your entities teleport (and if they do, treat the case separately), encode positions as the difference between the new position and the old position - for short movements, you can get away with far less bits than you'd need for full positions. &#xD;&#xA;&#xD;&#xA;If you want easy rewind, add keyframes (full data, no deltas) every N frames. This way you can get away with lower precision for deltas and other values, rounding errors won't be so problematic if you reset to &quot;true&quot; values periodically.&#xD;&#xA;&#xD;&#xA;Finally, gzip the whole thing :)" />
  <row Id="17111" PostHistoryTypeId="2" PostId="8381" RevisionGUID="6299b6c5-ed97-4a65-8ad8-c1978c6506b5" CreationDate="2011-02-10T09:46:10.470" UserId="263" Text="A lot of universities who don't have formal &quot;game development&quot; programs are still great places to get a general Computer Science education, and many of them might have clubs or classes that will help you in that direction. I noticed you mentioned Cal Poly, and since I'm a Masters student at Poly with a focus in computer graphics maybe I can provide some insight.&#xD;&#xA;&#xD;&#xA;Cal Poly doesn't have a formal &quot;game development&quot; degree or program (although we're in the process of building a game dev track into the CS curriculum), but there are tons of resources here for people interested in games. Dr. Wood teaches a series of graphics courses which are great, including a 2 quarter real-time graphics course in which you [build a game from scratch](http://vimeo.com/12451657).&#xD;&#xA;&#xD;&#xA;We've also got a fairly new [Game Development Club](http://cpgd.org) which has seen an explosion of members in just the two years we've been around. We hosted one of the California Global Game Jam sites and had over 50 people attend and [make games](http://bit.ly/gPM0tx). A big part of our job as a club (I'm an officer) has been building relationships with industry to help our members find jobs making games when they graduate. (Without making this sound *too* much like a commercial, that's something that Poly is really good at.)&#xD;&#xA;&#xD;&#xA;None of this stuff is something you would find in a general brochure, or probably anywhere on Poly's main website.&#xD;&#xA;&#xD;&#xA;Basically my point is that there may be a **lot** of game dev stuff happening at different places that might not be publicized. With a general CS degree it opens the doors to work in game dev, but also allows you work in other areas as well if you end up getting burned out in the game industry (which is actually fairly common). Your best bet is to get in touch with the actual CS departments at universities you're interested and ask them directly if there's any game dev stuff going on.&#xD;&#xA;&#xD;&#xA;And if you have any questions about Poly specifically, I'm happy to answer them. :)" />
  <row Id="17112" PostHistoryTypeId="5" PostId="7353" RevisionGUID="2e2ef826-a470-48fb-8293-ca4cf6fb9977" CreationDate="2011-02-10T09:52:04.147" UserId="263" Comment="Fixed typo." Text="There's a couple things to consider. The thread-per-subsystem route is easy to think about since the code separation is pretty apparent from the get go. However, depending on how much intercommunication your subsystems need, inter-thread communication could really kill your performance. In addition, this only scales to N cores, where N is the number of subsystems you abstract into threads.&#xD;&#xA;&#xD;&#xA;If you're just looking to multithread an existing game, this is probably the path of least resistance. However, if you're working on some low level engine systems that might be shared between several games or projects, I would consider another approach.&#xD;&#xA;&#xD;&#xA;It can take a bit of mind twisting, but if you can break things up as a job queue with a set of worker threads it will scale much better in the long run. As the latest and greatest chips come out with a gazillion cores, your game's performance will scale along with it, just fire up more worker threads.&#xD;&#xA;&#xD;&#xA;So basically, if you're looking to bolt on some parallelism to an existing project, I'd parallelize across subsystems. If you're building a new engine from scratch with parallel scalability in mind, I'd look into a job queue." />
  <row Id="17113" PostHistoryTypeId="2" PostId="8382" RevisionGUID="8b07d680-e066-41a9-9163-0a359200b9fa" CreationDate="2011-02-10T09:54:15.673" UserDisplayName="Benny" Text="I have just started game dev and was wondering should I use DX11 or version 10?&#xD;&#xA;&#xD;&#xA;I know AMD/nVidia now have DX11 cards but there are not many games using them now.&#xD;&#xA;&#xD;&#xA;So should I wait untill they are mainstearm?" />
  <row Id="17114" PostHistoryTypeId="1" PostId="8382" RevisionGUID="8b07d680-e066-41a9-9163-0a359200b9fa" CreationDate="2011-02-10T09:54:15.673" UserDisplayName="Benny" Text="Should I start to use DX11" />
  <row Id="17115" PostHistoryTypeId="3" PostId="8382" RevisionGUID="8b07d680-e066-41a9-9163-0a359200b9fa" CreationDate="2011-02-10T09:54:15.673" UserDisplayName="Benny" Text="&lt;directx&gt;&lt;directx11&gt;" />
  <row Id="17116" PostHistoryTypeId="2" PostId="8383" RevisionGUID="669acee7-2ce1-40b3-b2c9-d86a4065a143" CreationDate="2011-02-10T10:07:03.307" UserId="1964" Text="I found this article some time ago about the movement mechanics in Zelda. I think it answers your question:&#xD;&#xA;&#xD;&#xA;http://troygilbert.com/2006/10/the-movement-and-attack-mechanics-of-the-legend-of-zelda/" />
  <row Id="17117" PostHistoryTypeId="25" PostId="8371" RevisionGUID="efaf27df-fdf4-4ef9-bc53-8128140a2ded" CreationDate="2011-02-10T11:22:19.353" Comment="http://twitter.com/#!/StackGameDev/status/35659824230301696" />
  <row Id="17118" PostHistoryTypeId="2" PostId="8384" RevisionGUID="20969d44-b6bb-42ad-85cc-5894c2861fe9" CreationDate="2011-02-10T11:35:02.070" UserId="5293" Text="I have an RPG-style Item class and I stored the type of the item in enum (itemType.sword). I want to store subtype too (itemSubtype.long), but I want to express the relation between two data type (sword can be long, short etc. but shield can't be long or short, only round, tower etc). I know this is wrong source code but similar what I want:&#xD;&#xA;&#xD;&#xA;    enum type&#xD;&#xA;    {&#xD;&#xA;        sword;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    //not valid code!&#xD;&#xA;    enum swordSubtype extends type.sword&#xD;&#xA;    {&#xD;&#xA;        short,&#xD;&#xA;        long&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Question:** How can I define this connection between two data type (or more exactly: two value of the data types), what is the most simple and standard way?&#xD;&#xA;&#xD;&#xA;1. Array-like data with all valid (itemType,itemSubtype) enum pairs or (itemType,itemSubtype[]) so more subtype for one type, it would be the best. OK but how can I construct this simplest way?&#xD;&#xA;&#xD;&#xA;2. Special enum with &quot;subenum&quot; set or second level enum or anything else if it does exists&#xD;&#xA;&#xD;&#xA;3. 2 dimensional &quot;canBePairs&quot; array, itemType and itemSubtype dimensions with all type and subtype and boolean elements, &quot;true&quot; means itemType (first dimension) and itemSubtype (second dimension) are okay, &quot;false&quot; means not okay&#xD;&#xA;&#xD;&#xA;4. Other better idea&#xD;&#xA;&#xD;&#xA;Thank you very much!" />
  <row Id="17119" PostHistoryTypeId="1" PostId="8384" RevisionGUID="20969d44-b6bb-42ad-85cc-5894c2861fe9" CreationDate="2011-02-10T11:35:02.070" UserId="5293" Text="Java enum pairs / &quot;subenum&quot; or what exactly?" />
  <row Id="17120" PostHistoryTypeId="3" PostId="8384" RevisionGUID="20969d44-b6bb-42ad-85cc-5894c2861fe9" CreationDate="2011-02-10T11:35:02.070" UserId="5293" Text="&lt;java&gt;&lt;rpg&gt;" />
  <row Id="17121" PostHistoryTypeId="2" PostId="8385" RevisionGUID="f17d524c-e7af-4f2a-a478-2f77f854b96c" CreationDate="2011-02-10T11:35:14.317" UserId="5343" Text="Use DX11. You can target DX10 and DX9 feature levels from DX11 so when you're ready, you can use the additional DX11 features." />
  <row Id="17122" PostHistoryTypeId="2" PostId="8386" RevisionGUID="55503747-138b-4feb-9926-2e2741afd273" CreationDate="2011-02-10T11:44:34.597" UserId="259" Text="This sounds more like you're trying to simulate a class hierarchy with enums. Just do items -&gt; weapons -&gt; swords -&gt; longsword/shortsword types, with appropriate virtual functions to provide the necessary functionality.&#xD;&#xA;&#xD;&#xA;Using enums would lead to type switches all over your code, which is exactly the problem polymorphism is designed to solve.&#xD;&#xA;    " />
  <row Id="17123" PostHistoryTypeId="2" PostId="8387" RevisionGUID="37fe0669-2b6d-4653-89da-3a06b2f15aac" CreationDate="2011-02-10T12:13:32.217" UserId="5344" Text="I want to write some simple flash games (as a hobby). I have a lot of programming experience, but no experience with Flash/ActionScript.&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA;As a beginner, is it a good idea to start with a framework like Flixel, FlashPunk or PushButton or would it be better to write my first games from scratch?&#xD;&#xA;&#xD;&#xA;Also, if you vote for using a framework, which one would you recommend? &#xD;&#xA;What are the differences?&#xD;&#xA;&#xD;&#xA;And another question: What about Flex, would you recommend using it?&#xD;&#xA;" />
  <row Id="17124" PostHistoryTypeId="1" PostId="8387" RevisionGUID="37fe0669-2b6d-4653-89da-3a06b2f15aac" CreationDate="2011-02-10T12:13:32.217" UserId="5344" Text="Beginner flash game development: Start with framework or from scratch?" />
  <row Id="17125" PostHistoryTypeId="3" PostId="8387" RevisionGUID="37fe0669-2b6d-4653-89da-3a06b2f15aac" CreationDate="2011-02-10T12:13:32.217" UserId="5344" Text="&lt;flash&gt;&lt;framework&gt;&lt;actionscript&gt;" />
  <row Id="17126" PostHistoryTypeId="2" PostId="8388" RevisionGUID="4ab86c91-63aa-4648-95dd-6893c84d4d79" CreationDate="2011-02-10T12:47:33.560" UserId="4264" Text="Depends what you want to use it for. If you just want to play with new features and learn stuff, go right ahead! Whatever you do will be useful in the future.&#xD;&#xA;&#xD;&#xA;If you're aiming to sell software, and want to have a large target market, it might not be the best move right now. According to &lt;a href=&quot;http://store.steampowered.com/hwsurvey&quot;&gt;steam hardware survey&lt;/a&gt;, only about 5% of users have dx11-capable systems, while over 50% have dx10 now. Keep in mind though that this is survey of steam users, who more likely have gaming-capable PCs, so the total market situation is probably worse." />
  <row Id="17127" PostHistoryTypeId="2" PostId="8389" RevisionGUID="b492e660-3f95-4b7e-ad18-219485f68949" CreationDate="2011-02-10T12:52:50.420" UserId="20" Text="I'd say you should start without a framework, just to get used to ActionScript and the core flash classes. Maybe write something very basic like Pong.&#xD;&#xA;&#xD;&#xA;When you feel comfortable with ActionScript and the core concepts, feel free to use a framework like Flixel or FlashPunk (look [here][1] to get started). They are quite different from the usual Flash philosophy, since they don't use the flash display objects (like Sprite, MovieClip etc.). Instead they implement their own display classes and a bitmap-based rendering engine. This is especially nice/useful if you don't own Flash or don't want to use Flash to create game assets.&#xD;&#xA;&#xD;&#xA;IMHO Flex isn't very useful for games. It's more of a Web-Application/GUI framework and would add a lot of bloat to a game. Use one of the more game-oriented frameworks like Flixel or FlashPunk instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flashgamedojo.com/" />
  <row Id="17128" PostHistoryTypeId="2" PostId="8390" RevisionGUID="986f3893-c66e-46f0-afed-b896060dd366" CreationDate="2011-02-10T12:55:59.247" UserId="4410" Text="I'm not a Flash/ActionScript developer, but as this is a hobby, what is do you want to work on most?&#xD;&#xA;&#xD;&#xA;If you first and foremost want to makes games, then by all means use a framework to do all the other stuff you don't care about too much at the moment. You'll get yourself up and running much faster and you'll have something on the screen quickly. You can worry about how all the other stuff happens another day when that becomes interesting.&#xD;&#xA;&#xD;&#xA;If you care more about how the whole thing works, plus love getting your hands dirty with all the behind the scenes stuff, then start from scratch and learn about it all as you go." />
  <row Id="17129" PostHistoryTypeId="2" PostId="8391" RevisionGUID="8ae72522-7623-4958-8715-497144956418" CreationDate="2011-02-10T13:19:16.973" UserId="5331" Text="Since you have a lot of programming experiences i could recommend you using one of the frameworks that are avaible, i have some tutorials and a template for flixel in my [blog][1], maybe you should take a look at them. &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;However i think the most important thing in games aren't the tools, is the game design.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bliipstudio.com" />
  <row Id="17131" PostHistoryTypeId="25" PostId="8384" RevisionGUID="9c267f57-75a0-4799-90bd-668da3d78757" CreationDate="2011-02-10T14:22:19.743" Comment="http://twitter.com/#!/StackGameDev/status/35705124437364737" />
  <row Id="17133" PostHistoryTypeId="2" PostId="8393" RevisionGUID="34a6ce25-c58a-4347-9782-8d00aef76e13" CreationDate="2011-02-10T15:13:31.617" UserId="1251" Text="I'd recommend you to start without any framework like flixel, flashpunk or even Box2d. They do really make life simpler to you by keeping in mind the ancient programmer philosophy *&quot;Don't always reinvent the wheel&quot;* &#xD;&#xA;If you start programming games with just flash, these would be your plus points&#xD;&#xA;&#xD;&#xA; 1. You learn little bit about the essential computer graphics necessary algorithms, ideas and programming logic.&#xD;&#xA;2. You make a lot of mistakes and *learn a lot more* when correcting them.&#xD;&#xA;3. You do think of &quot;making&quot; the game logic, rather than allowing the framework to do it for you.&#xD;&#xA;&#xD;&#xA;If you start with a framework, these are the plus points&#xD;&#xA;&#xD;&#xA;1. They provide you with a plethora of built in functions which help a lot in the game logic.&#xD;&#xA;2. They make life simpler.&#xD;&#xA;3. You would get more time to invest in building your core game logic.&#xD;&#xA;&#xD;&#xA;But, If you start programming games in flash with a framework, these are minus points&#xD;&#xA;&#xD;&#xA;1. You wouldn't need/try to understand the algorithm behind the game logic implementation.&#xD;&#xA;2. You may/would find it difficult when changing to another language for a similiar game programming need if that particular language doesn't have similiar library features as the one you use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To sum it all up, If I were a teacher I'd ask my students to start learning Game Programming without a framework.Using an SDK is recommended though.Flex SDK is useful if you were thinking of programming in FlashDevelop IDE or other Flash IDEs. &#xD;&#xA;&#xD;&#xA;Best Wishes.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="17135" PostHistoryTypeId="2" PostId="8394" RevisionGUID="60da3e4b-0eba-47c6-818f-814e6bd035a0" CreationDate="2011-02-10T15:27:12.803" UserId="953" Text="Use a framework; I recommend Flixel because it's the one I'm familiar with.  There's no real value in reinventing the wheel, and Flixel makes development much faster and easier, which means that you'll see results faster and you'll get experience more quickly.&#xD;&#xA;&#xD;&#xA;Frameworks help to structure your game, so you'll make fewer rookie mistakes with regard to organization and architecture.  Frameworks also tend to collect tutorials and example code.  If you need something a framework can't provide, you can always learn the lower-level Flash techniques... but honestly, the difference between framework and non-framework is very small.  It's not like comparing machine code and managed code.&#xD;&#xA;&#xD;&#xA;Regarding Flex: use the free Flex compiler, but compile a simple AS3/Flash project.  I wouldn't use Flex unless you wanted to use the Flex layout approach, and it's not especially compatible with more frameworks." />
  <row Id="17136" PostHistoryTypeId="2" PostId="8395" RevisionGUID="9d919506-a217-4e99-8926-72410d742fbb" CreationDate="2011-02-10T15:58:37.570" UserId="4604" Text="As a guy with a CS degree who got a job in the industry straight out of school with no prior game dev experience, I feel as though I may have some good advice.&#xD;&#xA;&#xD;&#xA;Go to a school with a reputable CS program.  If they offer a course on graphics, take it.  If they offer a course in game programming, take it.  All of these will help prepare you.  Your degree will teach you how to think about software development and other problems and see different (and discover optimal) ways of solving them.  These skills are an absolute must-have for any programmer.&#xD;&#xA;&#xD;&#xA;Having said that, you will then need to spend your spare time working on developing games.  Most of what I learned about the skills needed for game programming (C++, OpenGL / DirectX, Geometric Methods and Data Structures, etc.) I learned on my own, as CS degrees tend to focus on more general software engineering practices.&#xD;&#xA;&#xD;&#xA;With the combination of my school-taught knowledge and that I gained on my own, I was able to communicate my knowledge well in the interview and then aced the practical test.  I didn't know everything I needed to know (not by a long shot), but I was able to prove that I was a motivated self-learner, and that mattered." />
  <row Id="17137" PostHistoryTypeId="2" PostId="8396" RevisionGUID="e5400bbe-35db-42e7-9e5d-7808fc3eb54c" CreationDate="2011-02-10T16:56:41.267" UserId="1743" Text="With regards to your comment to Tullo&#xD;&#xA;&#xD;&#xA;&gt; I'm not really trying to get the time,&#xD;&#xA;&gt; more pass the time in such a way that&#xD;&#xA;&gt; players can age, plants can&#xD;&#xA;&gt; grow/die/breed and other time based&#xD;&#xA;&gt; events can occur&#xD;&#xA;&#xD;&#xA;Why not just use a timer?  Once the timer runs out, a callback function could be triggered and you would then update player age, plant status, etc in that callback function automatically.&#xD;&#xA;&#xD;&#xA;Once you are done with that, then make sure to restart the timer again for the next aging cycle." />
  <row Id="17138" PostHistoryTypeId="2" PostId="8397" RevisionGUID="b00d531a-de68-4fd6-804c-c91568d3c58b" CreationDate="2011-02-10T17:17:03.433" UserId="1430" Text="If you have an `ID3DX11EffectVariable` that represents `perFrame`, then you should be able to call [GetType][1] to get an `ID3DX11EffectType` for `perFrame`. Then you can call [GetDesc][2] on that type instance to get a [D3DX11_EFFECT_TYPE_DESC][3] which has a `Members` field which should give you want you need.&#xD;&#xA;&#xD;&#xA;That said, I think accessing members by index is generally fairly brittle and that giving fields semantics whenever possible to more desirable.&#xD;&#xA;&#xD;&#xA;Note that I have never actually tried this on structures denoted *cbuffer* so there may be some additional hoops you need to jump through if things don't quite work out -- constant buffers may have some specialized rules or handling via the effect interface. But I'm reasonably sure this will at least set you on the right track given that [constant buffers seem to be well-understood by the API][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476814(v=VS.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ff476775(v=VS.85).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ff476305(v=VS.85).aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/ff476670(v=VS.85).aspx" />
  <row Id="17139" PostHistoryTypeId="2" PostId="8398" RevisionGUID="e8746e36-29e7-4cc2-b684-37da0251aeb1" CreationDate="2011-02-10T17:17:30.390" UserId="2137" Text="These days, games often have multiplayer portals with chat channels &amp; match making system for the multiplayer aspects of the game.&#xD;&#xA;&#xD;&#xA;An example would be battle.net, magic the gathering online's chat rooms, halo etc.&#xD;&#xA;&#xD;&#xA;Now, for the rest of us indie gamers that probably won't be able to spend much development effort on creating those back-ends from scratch, what options do we have?&#xD;&#xA;&#xD;&#xA;I was thinking of something along the line of using IRC as the backbone of the system. From there, the &quot;community&quot; aspect and implement player tracking, game tracking and match making on top of that. It seems to be what the old battle.net (brood war era) used to be.&#xD;&#xA;&#xD;&#xA;The question is, is this easy to do? What does it take to run an irc server, and I suppose this also requires writing an IRC client (which seems to have been done a lot these days?)?&#xD;&#xA;&#xD;&#xA;If there are other ways as well (say, an open framework for this stuff), let's hear them too." />
  <row Id="17140" PostHistoryTypeId="1" PostId="8398" RevisionGUID="e8746e36-29e7-4cc2-b684-37da0251aeb1" CreationDate="2011-02-10T17:17:30.390" UserId="2137" Text="implementing match-making &amp; community system for multiplayer games" />
  <row Id="17141" PostHistoryTypeId="3" PostId="8398" RevisionGUID="e8746e36-29e7-4cc2-b684-37da0251aeb1" CreationDate="2011-02-10T17:17:30.390" UserId="2137" Text="&lt;architecture&gt;&lt;multiplayer&gt;&lt;community-management&gt;" />
  <row Id="17142" PostHistoryTypeId="5" PostId="8371" RevisionGUID="94b06471-f1dc-41d5-9cee-4a2a4be6d7c1" CreationDate="2011-02-10T17:18:51.280" UserId="1430" Comment="captialization" Text="I am starting my computer science degree at a local community college in programming using C++. However, I will be transferring to a 4-year university. Does anyone have any insight on university programs?&#xD;&#xA;&#xD;&#xA;I know Cal State Fullerton has a degree with a minor in Game Development. however, is that as important as getting a degree from a really great school? If I could shoot for something like Cal Poly would that be better? Or even Stanford or SF State being so close to so many gaming companies up there in the Bay area?&#xD;&#xA;&#xD;&#xA;Thank you in advance for any guidance. " />
  <row Id="17143" PostHistoryTypeId="4" PostId="8371" RevisionGUID="94b06471-f1dc-41d5-9cee-4a2a4be6d7c1" CreationDate="2011-02-10T17:18:51.280" UserId="1430" Comment="captialization" Text="Good university for computer science with plans for game development" />
  <row Id="17144" PostHistoryTypeId="25" PostId="8387" RevisionGUID="35ffc914-f4b3-4677-af43-9a7c833a9b93" CreationDate="2011-02-10T17:22:19.683" Comment="http://twitter.com/#!/StackGameDev/status/35750422605987841" />
  <row Id="17145" PostHistoryTypeId="2" PostId="8399" RevisionGUID="5b5d0a2c-eef6-41f6-8dbd-3513634dc441" CreationDate="2011-02-10T17:23:04.630" UserId="4662" Text="Typically, if you're on the PC, you use Steamworks for a smaller game. Half the reason the indie game scene is rocking on the PC is because of Steam and Steamworks. Steam is an excellent sales platform and Steamworks is basically the best you can get.&#xD;&#xA;&#xD;&#xA;If you're on a console, then the console manufacturer provides this functionality through Xbox Live/PSN/whatever." />
  <row Id="17146" PostHistoryTypeId="5" PostId="8382" RevisionGUID="05e88625-0b1a-4cda-86f3-ebaf84271d61" CreationDate="2011-02-10T17:24:12.833" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [learning Direct3D 9, 10 or 11 ?](http://gamedev.stackexchange.com/questions/8076/learning-direct3d-9-10-or-11)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have just started game dev and was wondering should I use DX11 or version 10?&#xD;&#xA;&#xD;&#xA;I know AMD/nVidia now have DX11 cards but there are not many games using them now.&#xD;&#xA;&#xD;&#xA;So should I wait untill they are mainstearm?" />
  <row Id="17147" PostHistoryTypeId="10" PostId="8382" RevisionGUID="b72885c6-ac3f-478e-a5dd-db111ba49b23" CreationDate="2011-02-10T17:24:12.690" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="17148" PostHistoryTypeId="2" PostId="8400" RevisionGUID="7c7aad18-b72f-4dca-a62b-38a4106f6677" CreationDate="2011-02-10T17:28:59.127" UserId="1430" Text="I wouldn't do this with IRC. IRC is straightforward and simple, but in the end is nothing but chat and some management commands, which is relatively simple to build yourself. I think EVE uses IRC for some in-game community stuff, but most games do not, despite looking similar.&#xD;&#xA;&#xD;&#xA;There are a few APIs available to provide match-making and other social/community features. [GameSpy][1] is one, [Steamworks][2] also provides the functionality. [OpenFeint][3] and [Scoreloop][4] exist for mobile platforms and provide some social features (but I don't see an obvious mention of match-making in either).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.poweredbygamespy.com/&#xD;&#xA;  [2]: https://partner.steamgames.com/documentation/api&#xD;&#xA;  [3]: http://openfeint.com/developers&#xD;&#xA;  [4]: http://www.scoreloop.com/dev_labs" />
  <row Id="17149" PostHistoryTypeId="5" PostId="8397" RevisionGUID="4d1d25c5-424d-42c1-a03d-df27e645451c" CreationDate="2011-02-10T17:40:01.853" UserId="1430" Comment="11 -&gt; 10." Text="If you have an `ID3DX10EffectVariable` that represents `perFrame`, then you should be able to call [GetType][1] to get an `ID3DX10EffectType` for `perFrame`. Then you can call [GetDesc][2] on that type instance to get a [D3DX10_EFFECT_TYPE_DESC][3] which has a `Members` field which should give you want you need.&#xD;&#xA;&#xD;&#xA;That said, I think accessing members by index is generally fairly brittle and that giving fields semantics whenever possible to more desirable.&#xD;&#xA;&#xD;&#xA;Note that I have never actually tried this on structures denoted *cbuffer* so there may be some additional hoops you need to jump through if things don't quite work out -- constant buffers may have some specialized rules or handling via the effect interface. But I'm reasonably sure this will at least set you on the right track given that [constant buffers seem to be well-understood by the API][4].&#xD;&#xA;&#xD;&#xA;EDIT: I retargetted all the links to point at the D3D10 versions and not the D3D11 versions.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb173745(v=VS.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb173717(v=VS.85).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb205054(v=VS.85).aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/bb173634(v=VS.85).aspx" />
  <row Id="17150" PostHistoryTypeId="5" PostId="8290" RevisionGUID="41c67b4a-63dd-43b5-a801-20f92cc6c34b" CreationDate="2011-02-10T18:11:05.413" UserId="3677" Comment="deleted 3 characters in body" Text="I want a straight 3d Python engine. Easily obtainable for linux and easy to use.&#xD;&#xA;&#xD;&#xA;I tried soya3d which failed for me because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;I also really want to be able to load common 3d models with out an issue.&#xD;&#xA;" />
  <row Id="17151" PostHistoryTypeId="5" PostId="8364" RevisionGUID="ea181873-798d-41d5-8a9e-83170c6f7788" CreationDate="2011-02-10T18:59:51.957" UserId="4443" Comment="Tried to make my answer more clear." Text="May be my lack of understanding the underlying objects here but I think the definition of 'frame' is the cause of the problems.&#xD;&#xA;&#xD;&#xA;You are incrementing the counter once per creature so the more creatures you have the faster new ones will spawn... This likely should be incremented Before the call to move() instead of inside the call that happens once per creature.&#xD;&#xA;&#xD;&#xA;If this isnt the case, please clarify in comments and I'll try again :)&#xD;&#xA;&#xD;&#xA;EDIT: This is the line that is the culprit, you are ++frame PER FOX, not Per update loop as mentioned in the comments section:&#xD;&#xA;&#xD;&#xA;    public void move(ArrayList&lt;Creature&gt; creatures, ArrayList&lt;Creature&gt; dead_creatures, ArrayList&lt;Creature&gt; new_creatures)&#xD;&#xA;    {&#xD;&#xA;        frame++;&#xD;&#xA;&#xD;&#xA;This should be done in the loop that is calling move() or the like, not by the move method.. Unless this frame variable is, as suggested, part of the fox object itself.. in which case every fox has its own unique frame counter to spawn off of.. and also giving you your exponential growth." />
  <row Id="17152" PostHistoryTypeId="2" PostId="8401" RevisionGUID="904563c7-d4dd-4207-8e4a-d25cfb0a087e" CreationDate="2011-02-10T19:02:33.530" UserId="5053" Text="Don't worry about game stuff, do that on your own. Go to the best school for computers you can get into/afford. &#xD;&#xA;&#xD;&#xA;[The University of Waterloo](http://uwaterloo.ca/) in Canada is very good, and Microsoft recruits directly from there.&#xD;&#xA;&#xD;&#xA;[Carnegie Mellon](http://www.cmu.edu/index.shtml) is very good for AI and robotics computing.&#xD;&#xA;&#xD;&#xA;[MIT](http://www.mit.edu/) is awesome, as is [Caltech](http://www.cs.caltech.edu/)&#xD;&#xA;&#xD;&#xA;[University of California, Berkeley](http://www.harvard.edu/), invented much of the internet. &#xD;&#xA;&#xD;&#xA;Larry Page and Bill Joy both went to [University of Michigan](http://www.umich.edu/)&#xD;&#xA;&#xD;&#xA;Let's not forget that Gates and Zuckerberg both went to, and dropped out of [Harvard](http://www.harvard.edu/).&#xD;&#xA;&#xD;&#xA;And Brin and Page started their PhDs at [Stanford](http://www.stanford.edu/). " />
  <row Id="17153" PostHistoryTypeId="5" PostId="7725" RevisionGUID="15cfd1a0-0eb7-4c60-bccc-d6c6fc12a68e" CreationDate="2011-02-10T19:07:49.777" UserId="4443" Comment="Added in a link to an old school project of mine." Text="Cut and paste of my comment that was suggested I make it a full answer. I have added in a bit more here to actually try and flesh it out into an answer.&#xD;&#xA;&#xD;&#xA;Yes, plain and simple.. Communication needs to happen and while there are situations where 'Are we there yet?' type of polling is required, you generally are wasting time having things check to see if they should be doing something else, when you can have them react to things they are told to do... Plus... a well defined communication pathway between objects/systems/modules helps significantly in multithreaded/process/core/computer setups&#xD;&#xA;&#xD;&#xA;Also, [over on Stack Overflow][1] I gave a general high level view of an event messaging system I have used from school into professional gaming titles and now non-gaming products, refined a bit each time to their specific usage of course, hehe..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: To address the question in the comments of how do you know which objects should get the message, the objects themselves should Request to be notified about the events. Your EventMessagingSystem (EMS) will need a Register(int iEventId, IEventMessagingSystem * pOjbect, (EMSCallback)fpMethodToUseForACallback) as well as a matching Unregister (making a unique entry for an iEventId out of the object pointer and callback). This way, when an object wants to know about a message it can Register() with the system. When it no longer needs to know about the events it can Unregister().. Clearly you would want a pool of these callback registration objects and an effective way to add/remove them from lists (I personally have used self ordering arrays (fancy way of saying they track their own allocations between a pool stack of unused objects and arrays that shift their sizes in place when needed) for the most part).&#xD;&#xA;&#xD;&#xA;EDIT: If you want a completely working game with an update loop and an event messaging system you might want to [check out an old school project][2] of mine. This link is also in the stack overflow post on this topic linked above.&#xD;&#xA;&#xD;&#xA;Hope this helps clear up your latest concern :)&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4574016/game-objects-talking-to-each-other/4580241#4580241&#xD;&#xA;  [2]: http://sourceforge.net/projects/bpfat/files/" />
  <row Id="17154" PostHistoryTypeId="6" PostId="8362" RevisionGUID="8374c74a-6c2d-4279-83fe-701d07bd3b1c" CreationDate="2011-02-10T19:26:15.940" UserId="1156" Comment="edited tags" Text="&lt;java&gt;" />
  <row Id="17155" PostHistoryTypeId="25" PostId="8398" RevisionGUID="763708c7-297f-4109-a8ca-2c717330d606" CreationDate="2011-02-10T20:22:19.770" Comment="http://twitter.com/#!/StackGameDev/status/35795720711839744" />
  <row Id="17156" PostHistoryTypeId="2" PostId="8402" RevisionGUID="d2b2a064-b7d5-49a8-a2ff-9ce7e8b2e4ee" CreationDate="2011-02-10T22:09:29.203" UserId="160" Text="Messages generally work well when:&#xD;&#xA;&#xD;&#xA;1. The thing sending the message doesn't care if it gets received.&#xD;&#xA;2. The sender does not need to get an immediate response back from the receiver.&#xD;&#xA;3. There may be multiple receivers listening to a single sender.&#xD;&#xA;4. Messages will be sent infrequently or unpredictably. (In other words, if every object needs to get an &quot;update&quot; message every single frame, messages aren't really buying you much.)&#xD;&#xA;&#xD;&#xA;The more your needs match that list, the better of a fit messages will be. At a very general level, they're pretty good. They do a good job of not wasting CPU cycles just to do nothing unlike polling or other more global solutions. They are fantastic at decoupling parts of a codebase, which is always helpful." />
  <row Id="17157" PostHistoryTypeId="2" PostId="8403" RevisionGUID="dc9d72a2-2ce6-4a70-a089-6b90de644bb8" CreationDate="2011-02-10T22:14:43.603" UserId="741" Text="Great answers so far from James and Ricket, I only answer to add a note of caution. Message passing / event driven communication is certainly an important tool in the developer's arsenal, but it can easily be overused. When you have a hammer, everything looks like a nail, and so on.&#xD;&#xA;&#xD;&#xA;You absolutely, 100%, should be thinking about the flow of data around your title, and be fully aware of how information is passing from one subsystem to another. In some cases message passing is clearly best; in others, it may be more appropriate for one subsystem to operate over a list of shared objects, allowing other subsystems to also operate on the same shared list; and many more methods besides.&#xD;&#xA;&#xD;&#xA;At all times you should be aware of which subsystems need access to which data, and when they need to access it. This affects your ability to parallelise and optimise, as well as helping you avoid the more insidious problems when different parts of your engine become too closely entwined. You need to be thinking about minimising unnecessary copying around of data, and how your data layout affects your cache usage. All of which will guide you to the best solution in each case.&#xD;&#xA;&#xD;&#xA;That being said, pretty much every game I've ever worked on has had a solid asynchronous message passing / event notification system. It allows you to write succinct, efficient maintainable code, even in the face of complex and quickly changing design needs." />
  <row Id="17158" PostHistoryTypeId="2" PostId="8404" RevisionGUID="e6a40146-b62c-421d-b355-4f676d0af0c0" CreationDate="2011-02-10T22:18:35.723" UserId="160" Text="Instead of using enums or making classes for each kind of object, I think the [type object](http://gameprogrammingpatterns.com/type-object.html) pattern is a friendly solution here. In your example, you don't really show how the enums are being used, so it's hard to show what a corresponding type object implementation would look like, but it would be something like:&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Integer damage) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int getDamage() {&#xD;&#xA;        // Here a subtype can just choose to completely override the&#xD;&#xA;        // damage or inherit it. A more complex system could maybe&#xD;&#xA;        // add them or combine them in some other way.&#xD;&#xA;        if (damage != null) return damage;&#xD;&#xA;    &#xD;&#xA;        return parent.getDamage();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Integer damage;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Item {&#xD;&#xA;      public int getDamage() {&#xD;&#xA;        return type.getDamage();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private final ItemType type;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ItemType swordType = new ItemType(null, 4);&#xD;&#xA;    ItemType shortSwordType = new ItemType(swordType, 3);&#xD;&#xA;    // inherits damage&#xD;&#xA;    ItemType longSwordType = new ItemType(swordType, null);&#xD;&#xA;&#xD;&#xA;    Item sword = new Item(swordType);&#xD;&#xA;&#xD;&#xA;Cool stuff about this:&#xD;&#xA;&#xD;&#xA;1. You only ever need to define two Java classes, `ItemType` and `Item`.&#xD;&#xA;2. You can define how subtypes refine their parent types however you want: they can overide values, or stack them, or whatever. You could even support multiple inheritance of you wanted by giving `ItemType` a list of parent types.&#xD;&#xA;3. Makes it *much* easier to make your item types data-driven. You just create new instances of `ItemType` with different values that you've read from some file.&#xD;&#xA;&#xD;&#xA;In the context of games, this is one of my absolute favorite design patterns and one I wish more people knew about. Every time I see a hard-coded class named `Sword`, I cry a little on the inside.&#xD;&#xA;&#xD;&#xA;You can see a bigger example of this [here](https://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Things/Items/). There's no inheritance in `ItemType` in Amaranth, though, because the [data format](https://bitbucket.org/munificent/bramble/src/5e40302278e4/Bramble.Core/PropertyBag.cs) itself handles that." />
  <row Id="17159" PostHistoryTypeId="5" PostId="8363" RevisionGUID="d1292cad-dde7-4db0-9cd3-fa7a0f5178bd" CreationDate="2011-02-10T22:21:04.487" UserId="3547" Comment="added 254 characters in body" Text="If I understand your code, your fox class is the one that spawns new fox objects inside the move method. By putting this logic in the move method, multiple fox instances are adding more foxes to the list. Also, if no foxes exist, this logic will never occur because the move method will not execute (no instances to call upon). Thus, if there are no more foxes (no fox objects are being updated) then foxes will not be spawned.&#xD;&#xA;&#xD;&#xA;You should move this spawning code outside of the fox class. That way only one fox is added every 120 frames (no exponential growth) and a fox will always respawn, regardless of whether there are no more foxes.&#xD;&#xA;&#xD;&#xA;Keep track of the frames and spawn foxes outside of this move method. Do not put it inside the fox class, make it independent of fox instances so that this logic is only at least and no more than once, regardless of the number of fox instances. That's the only reason why your seeing this erratic behavior. It's because you've got some game logic in the wrong place, making it dependent on whether there are fox instances being moved (updated) when this spawning logic should be independent and outside of the move method, and perhaps the fox class altogether." />
  <row Id="17160" PostHistoryTypeId="2" PostId="8405" RevisionGUID="a212a204-4309-4472-8074-d18d5c3855d5" CreationDate="2011-02-10T22:29:12.610" UserId="3234" Text="Ok, I've been writing c# for a while, but I'm new to actionscript, so I this is a question about best practices.&#xD;&#xA;&#xD;&#xA;We're developing a simple match game, where the user selects tiles and tries to match various numbers - sort of like memory - and when the match is made we want a series of animations to take place, and when they're done, remove the tile and add a new one.&#xD;&#xA;&#xD;&#xA;So basically its:&#xD;&#xA;&#xD;&#xA; 1. User clicks the MC&#xD;&#xA; 2. Animation 1 on the MC starts&#xD;&#xA; 3. Animation 1 ends&#xD;&#xA; 4. Remove the MC from the stage&#xD;&#xA; 5. Add a new MC&#xD;&#xA; 6. Start the animation on the new MC&#xD;&#xA;&#xD;&#xA;The problem I run into is that I don't want to make the same timeline motion tween on each and every tile, when the animation is all the same. It's just the picture in the tile that's different.&#xD;&#xA;&#xD;&#xA;The other method I've come up with is to just apply the tweens in code on the main stage. Then I attach an event handler for MOTION_FINISH, and in that handler I trigger the next animation and listen for that to finish etc. This works too, but not only do I have to do all the tweening in code, I have a seperate event handler for each stage of the animation.&#xD;&#xA;&#xD;&#xA;So is there a more structured way of chaining these animations together?" />
  <row Id="17161" PostHistoryTypeId="1" PostId="8405" RevisionGUID="a212a204-4309-4472-8074-d18d5c3855d5" CreationDate="2011-02-10T22:29:12.610" UserId="3234" Text="Managing flash animations for a game" />
  <row Id="17162" PostHistoryTypeId="3" PostId="8405" RevisionGUID="a212a204-4309-4472-8074-d18d5c3855d5" CreationDate="2011-02-10T22:29:12.610" UserId="3234" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;animation&gt;" />
  <row Id="17163" PostHistoryTypeId="5" PostId="8312" RevisionGUID="4715703b-e4a6-4e78-9d0d-ff66b1e61e71" CreationDate="2011-02-10T22:37:03.583" UserId="3547" Comment="added 1384 characters in body; added 4 characters in body; deleted 595 characters in body" Text="Most game loops I've encountered like to check an input state of some kind (not wait around for input, instead have it buffered).&#xD;&#xA;&#xD;&#xA;I'm assuming your making some game with the Command Prompt in C#. You'll probably want to buffer input via ReadLine() in a thread safe queue. You should then implement a more normal game loop in a separate thread that checks this queue for new input every frame.&#xD;&#xA;&#xD;&#xA;Also, you should probably keep track of time with a Stopwatch object or something that is strong performance wise. (I don't think your using DateTime.Now, but if you are it's a very bad idea)&#xD;&#xA;&#xD;&#xA;That's how I would do it. Usually, time based actions are done via keeping track of passed time and executing a step (or the entire action itself) after certain intervals of time pass. So every certain unit of time (kept track after multiple updates) you would perhaps increment the age of the player or something of that nature. When the age is incremented, certain changes will take place (defined in the player's class perhaps).&#xD;&#xA;&#xD;&#xA;That's just one way to do it, not necessarily the only/right way of doing it.&#xD;&#xA;&#xD;&#xA;Edit: Once you've got your game loop, you should separate logic into separate classes (one for the player, one for a plant, etc, whatever is needed). These classes should be updated by the loop and they can keep track of their aging/changes. (they should be passed some kind of timing variable or should have a way of accessing it)&#xD;&#xA;&#xD;&#xA;Edit2: If this is more of an architecture question (kind of like how I should structure my system so that my entities [like plants, people, etc] will age) than it's a bit harder to answer. I would have to say that you should take into consideration the structure you already have.&#xD;&#xA;&#xD;&#xA;I would create a list of trackers for each game object. So a plant would have 3 trackers. These trackers would keep track of time and after a certain interval (predefined for each tracker) it would set off an event (passed in as a delegate perhaps). This delegate could make the plant grow older or do whatever. Also, the delegate could return true or maybe some custom object to define whether the tracker should continue to track time and maybe at what interval it should track time, among other things." />
  <row Id="17164" PostHistoryTypeId="2" PostId="8406" RevisionGUID="fd8e2b24-6744-457e-b30c-704017ca20be" CreationDate="2011-02-10T22:41:23.363" UserId="4508" Text="i don't know if this answer the question, but i found this article and i thinks it is pertinent with discussion:&#xD;&#xA;&#xD;&#xA;[http://www.gamasutra.com/view/feature/6269/playing_games_is_hard_work_an_.php?print=1][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/6269/playing_games_is_hard_work_an_.php?print=1" />
  <row Id="17165" PostHistoryTypeId="5" PostId="8405" RevisionGUID="d867d9e3-6800-4242-ba5a-1f2c1bd0faff" CreationDate="2011-02-10T22:50:20.210" UserId="1430" Comment="capitalization" Text="Ok, I've been writing C# for a while, but I'm new to ActionScript, so this is a question about best practices.&#xD;&#xA;&#xD;&#xA;We're developing a simple match game, where the user selects tiles and tries to match various numbers - sort of like memory - and when the match is made we want a series of animations to take place, and when they're done, remove the tile and add a new one.&#xD;&#xA;&#xD;&#xA;So basically it's:&#xD;&#xA;&#xD;&#xA; 1. User clicks the MC&#xD;&#xA; 2. Animation 1 on the MC starts&#xD;&#xA; 3. Animation 1 ends&#xD;&#xA; 4. Remove the MC from the stage&#xD;&#xA; 5. Add a new MC&#xD;&#xA; 6. Start the animation on the new MC&#xD;&#xA;&#xD;&#xA;The problem I run into is that I don't want to make the same timeline motion tween on each and every tile, when the animation is all the same. It's just the picture in the tile that's different.&#xD;&#xA;&#xD;&#xA;The other method I've come up with is to just apply the tweens in code on the main stage. Then I attach an event handler for MOTION_FINISH, and in that handler I trigger the next animation and listen for that to finish etc. This works too, but not only do I have to do all the tweening in code, I have a seperate event handler for each stage of the animation.&#xD;&#xA;&#xD;&#xA;So is there a more structured way of chaining these animations together?" />
  <row Id="17166" PostHistoryTypeId="2" PostId="8407" RevisionGUID="6bc46997-eee8-4f0b-93ce-a00005ae7328" CreationDate="2011-02-10T22:50:44.267" UserId="20" Text="Definitely have a look at the greensock Tweening library. Especially [TweenLite][1] and [TimelineLite][2]. It's a really great tweening library and will definitely make tasks like the one you're facing a lot easier.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.greensock.com/tweenlite/&#xD;&#xA;  [2]: http://www.greensock.com/timelinelite/" />
  <row Id="17167" PostHistoryTypeId="2" PostId="8408" RevisionGUID="ec767378-c0c7-4078-9033-57d5fa3f4796" CreationDate="2011-02-10T23:00:22.317" UserId="4508" Text="i'm trying to make a simple 3d engine from scratch, more for educational purpose than for real use.&#xD;&#xA;&#xD;&#xA;i have a Surface object with inside a Triangle's list.&#xD;&#xA;For now i compute normals inside Triangle class, in this way:&#xD;&#xA;&#xD;&#xA;    triangle.computeFaceNormals() {&#xD;&#xA;        Vec3D u = v1.sub(v3)&#xD;&#xA;        Vec3D v = v1.sub(v2)&#xD;&#xA;        Vec3D normal = Vec3D.cross(u,v)&#xD;&#xA;        normal.normalized()&#xD;&#xA;        this.n1 = this.n2 = this.n3 = normal&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and when building surface:&#xD;&#xA;&#xD;&#xA;    t = new Triangle(v1,v2,v3).computeFaceNormals()&#xD;&#xA;    surface.addTriangle(t)&#xD;&#xA;&#xD;&#xA;and i think this is the best way to do that.. isn't it?&#xD;&#xA;&#xD;&#xA;now.. what about for vertex normals?&#xD;&#xA;i've found this simple algorithm: [flipcode vertex normal][1]&#xD;&#xA;&#xD;&#xA;but.. hei this algorithm has.. exponential complexity? (if my memory doesn't fail my computer science background..) (bytheway.. it has 3 nested loops.. i don't think it's the best way to do it..)&#xD;&#xA;&#xD;&#xA;any suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Vertex_Normals.shtml" />
  <row Id="17168" PostHistoryTypeId="1" PostId="8408" RevisionGUID="ec767378-c0c7-4078-9033-57d5fa3f4796" CreationDate="2011-02-10T23:00:22.317" UserId="4508" Text="best way to compute vertex normals from a Triangle's list" />
  <row Id="17169" PostHistoryTypeId="3" PostId="8408" RevisionGUID="ec767378-c0c7-4078-9033-57d5fa3f4796" CreationDate="2011-02-10T23:00:22.317" UserId="4508" Text="&lt;algorithm&gt;&lt;normals&gt;" />
  <row Id="17170" PostHistoryTypeId="5" PostId="8408" RevisionGUID="bee0b5e7-ae46-438b-9848-65d7d366c6e9" CreationDate="2011-02-10T23:11:59.490" UserId="4508" Comment="added 77 characters in body" Text="i'm a complete newbie in computergraphics so sorry if it's a stupid answer.&#xD;&#xA;i'm trying to make a simple 3d engine from scratch, more for educational purpose than for real use.&#xD;&#xA;&#xD;&#xA;i have a Surface object with inside a Triangle's list.&#xD;&#xA;For now i compute normals inside Triangle class, in this way:&#xD;&#xA;&#xD;&#xA;    triangle.computeFaceNormals() {&#xD;&#xA;        Vec3D u = v1.sub(v3)&#xD;&#xA;        Vec3D v = v1.sub(v2)&#xD;&#xA;        Vec3D normal = Vec3D.cross(u,v)&#xD;&#xA;        normal.normalized()&#xD;&#xA;        this.n1 = this.n2 = this.n3 = normal&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and when building surface:&#xD;&#xA;&#xD;&#xA;    t = new Triangle(v1,v2,v3).computeFaceNormals()&#xD;&#xA;    surface.addTriangle(t)&#xD;&#xA;&#xD;&#xA;and i think this is the best way to do that.. isn't it?&#xD;&#xA;&#xD;&#xA;now.. what about for vertex normals?&#xD;&#xA;i've found this simple algorithm: [flipcode vertex normal][1]&#xD;&#xA;&#xD;&#xA;but.. hei this algorithm has.. exponential complexity? (if my memory doesn't fail my computer science background..) (bytheway.. it has 3 nested loops.. i don't think it's the best way to do it..)&#xD;&#xA;&#xD;&#xA;any suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Vertex_Normals.shtml" />
  <row Id="17171" PostHistoryTypeId="2" PostId="8409" RevisionGUID="7dd08f63-e27c-4c8d-b1d6-8d17032edddb" CreationDate="2011-02-10T23:18:37.887" UserId="1430" Text="**&quot;Best&quot; is pretty subjective -- it's going to involve weighing what you need out of the algorithm versus it's inputs, runtime complexity and other properties.** &#xD;&#xA;&#xD;&#xA;That said, both your approach and the linked FlipCode approach are reasonable in terms of producing usable results. Other techniques include weighting the contribution of each face normal by the size of the angle made with each face shared by the vertex.&#xD;&#xA;&#xD;&#xA;You are correct in that the FlipCode approach appears suboptimal as written, but it could just be poorly specified: it's a little unclear whether or not it intends to suggest the second loop traverse *all* faces in the model, versus the handful of faces that share the vertex in question. If you have the adjacency information to reduce the search space of the second loop, it becomes less of a concern. Of course you may not have that adjacency information -- this is sort of what I mean by considering what inputs you have available to your algorithm. " />
  <row Id="17172" PostHistoryTypeId="25" PostId="8405" RevisionGUID="aa2ecee3-6d8f-4b92-b006-d7122801347a" CreationDate="2011-02-10T23:22:20.067" Comment="http://twitter.com/#!/StackGameDev/status/35841021094924289" />
  <row Id="17173" PostHistoryTypeId="5" PostId="8409" RevisionGUID="876fb4bd-3d07-4ac8-8bde-677bf9d3d736" CreationDate="2011-02-10T23:25:47.253" UserId="1430" Comment="added 168 characters in body" Text="**&quot;Best&quot; is pretty subjective -- it's going to involve weighing what you need out of the algorithm versus it's inputs, runtime complexity and other properties.** &#xD;&#xA;&#xD;&#xA;That said, both your approach and the linked FlipCode approach are reasonable in terms of producing usable results (you could quite simply copy your 'face normals' to each vertex, if you are not sharing actual vertex instances between triangles, which I'm unclear on from your code). Other techniques include weighting the contribution of each face normal by the size of the angle made with each face shared by the vertex.&#xD;&#xA;&#xD;&#xA;You are correct in that the FlipCode approach appears suboptimal as written, but it could just be poorly specified: it's a little unclear whether or not it intends to suggest the second loop traverse *all* faces in the model, versus the handful of faces that share the vertex in question. If you have the adjacency information to reduce the search space of the second loop, it becomes less of a concern. Of course you may not have that adjacency information -- this is sort of what I mean by considering what inputs you have available to your algorithm. " />
  <row Id="17174" PostHistoryTypeId="5" PostId="8409" RevisionGUID="fcbe0487-4a7e-4f95-b7a6-a5d6532a6743" CreationDate="2011-02-10T23:35:08.923" UserId="1430" Comment="added 526 characters in body" Text="**&quot;Best&quot; is pretty subjective -- it's going to involve weighing what you need out of the algorithm versus it's inputs, runtime complexity and other properties.** &#xD;&#xA;&#xD;&#xA;That said, both your approach and the linked FlipCode approach are reasonable in terms of producing usable results (you could quite simply copy your 'face normals' to each vertex, if you are not sharing actual vertex instances between triangles, which I'm unclear on from your code). Other techniques include weighting the contribution of each face normal by the size of the angle made with each face shared by the vertex.&#xD;&#xA;&#xD;&#xA;You are correct in that the FlipCode approach appears suboptimal as written, but it could just be poorly specified: it's a little unclear whether or not it intends to suggest the second loop traverse *all* faces in the model, versus the handful of faces that share the vertex in question. If you have the adjacency information to reduce the search space of the second loop, it becomes less of a concern. Of course you may not have that adjacency information -- this is sort of what I mean by considering what inputs you have available to your algorithm. &#xD;&#xA;&#xD;&#xA;If you don't just want to copy the face normal into the vertices, or you are sharing vertices and don't want to split them, you could:&#xD;&#xA;&#xD;&#xA;    foreach vertex:&#xD;&#xA;       set vertex normal to (0,0,0)&#xD;&#xA;&#xD;&#xA;    foreach triangle:&#xD;&#xA;       foreach vertex on that triangle:&#xD;&#xA;          set vertex normal = normalize( vertex normal + face normal )&#xD;&#xA;&#xD;&#xA;This assumes that each triangle is actually referencing each vertex rather than storing a copy of it -- I don't know what language you're using so I don't know if that's the case or not." />
  <row Id="17175" PostHistoryTypeId="5" PostId="8408" RevisionGUID="49d437c2-35cd-49e6-88e7-b9b73bb4be32" CreationDate="2011-02-10T23:42:38.660" UserId="4508" Comment="added 7 characters in body" Text="i'm a complete newbie in computergraphics so sorry if it's a stupid answer.&#xD;&#xA;i'm trying to make a simple 3d engine from scratch, more for educational purpose than for real use.&#xD;&#xA;&#xD;&#xA;i have a Surface object with inside a Triangle's list.&#xD;&#xA;For now i compute normals inside Triangle class, in this way:&#xD;&#xA;&#xD;&#xA;    triangle.computeFaceNormals() {&#xD;&#xA;        Vec3D u = v1.sub(v3)&#xD;&#xA;        Vec3D v = v1.sub(v2)&#xD;&#xA;        Vec3D normal = Vec3D.cross(u,v)&#xD;&#xA;        normal.normalized()&#xD;&#xA;        this.n1 = this.n2 = this.n3 = normal&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and when building surface:&#xD;&#xA;&#xD;&#xA;    t = new Triangle(v1,v2,v3)&#xD;&#xA;    t.computeFaceNormals()&#xD;&#xA;    surface.addTriangle(t)&#xD;&#xA;&#xD;&#xA;and i think this is the best way to do that.. isn't it?&#xD;&#xA;&#xD;&#xA;now.. what about for vertex normals?&#xD;&#xA;i've found this simple algorithm: [flipcode vertex normal][1]&#xD;&#xA;&#xD;&#xA;but.. hei this algorithm has.. exponential complexity? (if my memory doesn't fail my computer science background..) (bytheway.. it has 3 nested loops.. i don't think it's the best way to do it..)&#xD;&#xA;&#xD;&#xA;any suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Vertex_Normals.shtml" />
  <row Id="17176" PostHistoryTypeId="5" PostId="8408" RevisionGUID="6ef2e2b7-3ccc-4936-91f8-7123eb52a668" CreationDate="2011-02-10T23:50:09.053" UserId="4508" Comment="added 211 characters in body" Text="i'm a complete newbie in computergraphics so sorry if it's a stupid answer.&#xD;&#xA;i'm trying to make a simple 3d engine from scratch, more for educational purpose than for real use.&#xD;&#xA;&#xD;&#xA;for now i compute only face normals. in this way:&#xD;&#xA;&#xD;&#xA;i have a Surface object with inside a Triangle's list. i compute normals inside Triangle class, in this way:&#xD;&#xA;&#xD;&#xA;    triangle.computeFaceNormals() {&#xD;&#xA;        Vec3D u = v1.sub(v3)&#xD;&#xA;        Vec3D v = v1.sub(v2)&#xD;&#xA;        Vec3D normal = Vec3D.cross(u,v)&#xD;&#xA;        normal.normalized()&#xD;&#xA;        this.n1 = this.n2 = this.n3 = normal&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and when building surface:&#xD;&#xA;&#xD;&#xA;    t = new Triangle(v1,v2,v3)&#xD;&#xA;    t.computeFaceNormals()&#xD;&#xA;    surface.addTriangle(t)&#xD;&#xA;&#xD;&#xA;and i think this is the best way to do that.. isn't it?&#xD;&#xA;&#xD;&#xA;now.. this works, ok. but light it's not smoothed. i'm trying to compute also vertex normals. (i'm testing my engine with tubolar surfaces so i have almost all vertex shared with more then one triangles)&#xD;&#xA;&#xD;&#xA;i've found this simple algorithm: [flipcode vertex normal][1]&#xD;&#xA;but.. hei this algorithm has.. exponential complexity? (if my memory doesn't fail my computer science background..) (bytheway.. it has 3 nested loops.. i don't think it's the best way to do it..)&#xD;&#xA;&#xD;&#xA;any suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/Vertex_Normals.shtml" />
  <row Id="17177" PostHistoryTypeId="2" PostId="8410" RevisionGUID="63fc2512-7cdd-466f-9d30-79ea3885b20e" CreationDate="2011-02-11T00:23:50.920" UserId="4947" Text="Josh Petrie has right. If you want to compute vertex normals, you should weight triangle contribution by angle. But you can use naive solution and just sum all normals from all faces around vertex.&#xD;&#xA;&#xD;&#xA;So you just compute all face normals and normalize them. Then set all vertex normals to zero. Then for each face (triangle) add its normal to all of its vertices. Then normalize all vertex normals. And it's done. &#xD;&#xA;&#xD;&#xA;It's not too correct but it could be enough.&#xD;&#xA;&#xD;&#xA;And your face normal calculation above - it's correct but you should aware, which side normal heads. It could head up or down. It depends on cross product - AxB is not the same as BxA - it gives you opposite vector." />
  <row Id="17178" PostHistoryTypeId="5" PostId="8364" RevisionGUID="550db7a0-5a5a-4c42-9ec6-f935d96790b2" CreationDate="2011-02-11T00:34:45.713" UserId="233" Comment="general cleanup (punctuation, etc.)" Text="It may be my lack of understanding the underlying objects here, but I think the definition of 'frame' is the cause of the problems.&#xD;&#xA;&#xD;&#xA;You are incrementing the counter once per creature so the more creatures you have the faster new ones will spawn. This likely should be incremented before the call to move() instead of inside the call that happens once per creature.&#xD;&#xA;&#xD;&#xA;If this isn't the case, please clarify in comments and I'll try again. :)&#xD;&#xA;&#xD;&#xA;EDIT: This is the line that is the culprit; you are ++frame PER FOX, not per update loop as mentioned in the comments section:&#xD;&#xA;&#xD;&#xA;    public void move(ArrayList&lt;Creature&gt; creatures, ArrayList&lt;Creature&gt; dead_creatures, ArrayList&lt;Creature&gt; new_creatures)&#xD;&#xA;    {&#xD;&#xA;        frame++;&#xD;&#xA;&#xD;&#xA;This should be done in the loop that is calling move() or the like, not by the move method, unless this frame variable is, as suggested, part of the fox object itself. In that case, every fox has its own unique frame counter to spawn off of; that also gives you your exponential growth." />
  <row Id="17179" PostHistoryTypeId="24" PostId="8364" RevisionGUID="0e76b145-bc41-467b-acf7-ae398f008404" CreationDate="2011-02-11T00:34:45.713" Comment="Proposed by 233 approved by 51 edit id of 24" />
  <row Id="17180" PostHistoryTypeId="2" PostId="8411" RevisionGUID="54fe939c-829c-43ec-a743-55547301de73" CreationDate="2011-02-11T00:53:06.313" UserId="539" Text="So there seem like two good ways to solve this. The first is to take Bummzack's advice and use TweenLite to programmatically advance your movie clip. When the tween finishes you can then remove the clip and carry on. The second approach I've used is to add an event to the final frame in your movie clip. Usually I will fire an EVENT_COMPLETE event in the final frame. The game would then add the movie clip, start playing it, and listen for the complete event." />
  <row Id="17181" PostHistoryTypeId="2" PostId="8412" RevisionGUID="baa8541f-4d8a-4fdc-871a-068562efc2f8" CreationDate="2011-02-11T01:30:07.940" UserId="1101" Text="IF your source code file is in UTF-8 then those non-ASCII characters can be represented by more than one byte. eg. 'ó' is represented by 'A³' (or perhaps more accurately, 'ó' is represented by values that render as 'A³'). I think you should be very careful when using UTF-8 source files since C++ string literals imply 1 byte per character but UTF-8 characters break that assumption. I'd recommend switching to a fixed-width representation like ISO-8859-1 for your source files.&#xD;&#xA;&#xD;&#xA;The SFML RenderWindow constructor takes a &quot;const std::string &amp;Title&quot; - this has no encoding specified, but it gets passed through to a WindowImpl class which decides how to pass the string to the OS. It looks like Win32 makes an attempt at handling Unicode, but I don't have the Unix/X code to hand. I suggest looking through that and seeing if it does something similar. Either way, the std::string carries no encoding information at all so it's risky to use anything but ASCII, unless SFML explicitly states what kind of text encoding to supply." />
  <row Id="17182" PostHistoryTypeId="25" PostId="8408" RevisionGUID="8f0b5acc-12c2-48ef-8d3b-d2fa501a54fa" CreationDate="2011-02-11T02:22:20.443" Comment="http://twitter.com/#!/StackGameDev/status/35886321381670912" />
  <row Id="17183" PostHistoryTypeId="5" PostId="8191" RevisionGUID="e4fe935c-cd39-4811-b88d-1947f4b311e0" CreationDate="2011-02-11T04:01:16.580" UserId="2862" Comment="added 87 characters in body; added 86 characters in body" Text="Do you have any reliable 3d polygonal face normal calculation code?&#xD;&#xA;&#xD;&#xA;Any language will do, I'll port it to make it work. Even if you find some code in a 3d game engine and post it here I'll be more than grateful.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I'm using this but it fails when faces are 90 degrees upright or similar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			// the normal point&#xD;&#xA;			var x:Number = 0;&#xD;&#xA;			var y:Number = 0;&#xD;&#xA;			var z:Number = 0;&#xD;&#xA;			&#xD;&#xA;			// if is a triangle with 3 points&#xD;&#xA;			if (points.length == 3) {&#xD;&#xA;				&#xD;&#xA;				// read vertices of triangle&#xD;&#xA;				var Ax:Number, Bx:Number, Cx:Number;&#xD;&#xA;				var Ay:Number, By:Number, Cy:Number;&#xD;&#xA;				var Az:Number, Bz:Number, Cz:Number;&#xD;&#xA;				Ax = points[0].x;	Bx = points[1].x;	Cx = points[2].x;&#xD;&#xA;				Ay = points[0].y;	By = points[1].y;	Cy = points[2].y;&#xD;&#xA;				Az = points[0].z;	Bz = points[1].z;	Cz = points[2].z;&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a triangle&#xD;&#xA;				x = (By - Ay) * (Cz - Az) - (Bz - Az) * (Cy - Ay);&#xD;&#xA;				y = (Bz - Az) * (Cx - Ax) - (Bx - Ax) * (Cz - Az);&#xD;&#xA;				z = (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax);&#xD;&#xA;				&#xD;&#xA;			// if is a polygon with 4+ points&#xD;&#xA;			}else if (points.length &gt; 3){&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a polygon using all points&#xD;&#xA;				var n:int = points.length;			&#xD;&#xA;				x = 0;&#xD;&#xA;				y = 0;&#xD;&#xA;				z = 0&#xD;&#xA;				&#xD;&#xA;				// ensure all points above 0&#xD;&#xA;				var minx:Number = 0, miny:Number = 0, minz:Number = 0;&#xD;&#xA;				for (var p:int = 0, pl:int = points.length; p &lt; pl; p++) {&#xD;&#xA;					var po:_Point3D = points[p] = points[p].clone();&#xD;&#xA;					if (po.x &lt; minx) {	minx = po.x;	 }&#xD;&#xA;					if (po.y &lt; miny) {	miny = po.y;	 }&#xD;&#xA;					if (po.z &lt; minz) {	minz = po.z;	 }&#xD;&#xA;				}&#xD;&#xA;				if (minx &gt; 0 || miny &gt; 0 || minz &gt; 0){&#xD;&#xA;					for (p = 0; p &lt; pl; p++) {&#xD;&#xA;						po = points[p];&#xD;&#xA;						po.x -= minx;&#xD;&#xA;						po.y -= miny;&#xD;&#xA;						po.z -= minz;&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;				&#xD;&#xA;				var cur:int = 1, prev:int = 0, next:int = 2;&#xD;&#xA;				for (var i:int = 1; i &lt;= n; i++) {&#xD;&#xA;					&#xD;&#xA;					// using Newell method&#xD;&#xA;					x += points[cur].y * (points[next].z - points[prev].z);&#xD;&#xA;					y += points[cur].z * (points[next].x - points[prev].x);&#xD;&#xA;					z += points[cur].x * (points[next].y - points[prev].y);&#xD;&#xA;					cur = (cur+1) % n;&#xD;&#xA;					next = (next+1) % n;&#xD;&#xA;					prev = (prev+1) % n;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			// length of the normal&#xD;&#xA;			var length:Number = Math.sqrt(x * x + y * y + z * z);&#xD;&#xA;			&#xD;&#xA;			// if area is 0&#xD;&#xA;			if (length == 0) {&#xD;&#xA;				return null;&#xD;&#xA;				&#xD;&#xA;			}else{&#xD;&#xA;				// turn large values into a unit vector&#xD;&#xA;				x = x / length;&#xD;&#xA;				y = y / length;&#xD;&#xA;				z = z / length;&#xD;&#xA;			}&#xD;&#xA;			" />
  <row Id="17184" PostHistoryTypeId="2" PostId="8413" RevisionGUID="086385aa-7e55-4a9f-ad18-0b2acac43d59" CreationDate="2011-02-11T04:52:34.457" UserId="4875" Text="I'm looking to use [SuperTuxKart][1] as a basis for a PhD research project. A key requirement for the game is to provide vibration feedback through the controller (obviously dependant on the controller itself).  I don't believe that the game currently includes this feature and I'm trying to get a feel for how big a challenge it would be to add. &#xD;&#xA;&#xD;&#xA;My background is as a J2EE and PHP developer/architect, so I don't know C++ as such, but am prepared to give it a crack if there are resources and guides to assist, and it's not a herculean task. &#xD;&#xA;&#xD;&#xA;Alternatively, if you know of any open source games that do include vibration feedback, please feel free to let me know!  Preferably the game would be of the style that the player had to navigate a character (or character's vehicle) over a repeatable course/map.&#xD;&#xA;&#xD;&#xA;TIA,&#xD;&#xA;JD&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://supertuxkart.sourceforge.net/" />
  <row Id="17185" PostHistoryTypeId="1" PostId="8413" RevisionGUID="086385aa-7e55-4a9f-ad18-0b2acac43d59" CreationDate="2011-02-11T04:52:34.457" UserId="4875" Text="how difficult to add vibration/feedback to a open source driving game" />
  <row Id="17186" PostHistoryTypeId="3" PostId="8413" RevisionGUID="086385aa-7e55-4a9f-ad18-0b2acac43d59" CreationDate="2011-02-11T04:52:34.457" UserId="4875" Text="&lt;c++&gt;&lt;programming&gt;&lt;open-source&gt;&lt;feedback&gt;" />
  <row Id="17187" PostHistoryTypeId="25" PostId="8413" RevisionGUID="b8f733ed-5196-4c7e-abf7-619de2b9c11f" CreationDate="2011-02-11T05:22:20.657" Comment="http://twitter.com/#!/StackGameDev/status/35931620460470272" />
  <row Id="17188" PostHistoryTypeId="2" PostId="8414" RevisionGUID="2e41ef6a-672a-4708-9d05-85928db92d92" CreationDate="2011-02-11T06:04:29.863" UserId="4894" Text="Well as you said this is mostly dependant on the device you'll be using. My answer will only be theoretical. &#xD;&#xA;The most important to make things simple is to be sure that the controller has a public (or not) Sdk or Api that let you  bind it with your game engine. &#xD;&#xA;&#xD;&#xA;For your second question, my first guess would be XNA which supports natively the Xbox controller. But again this depends on your choice of controller. " />
  <row Id="17189" PostHistoryTypeId="2" PostId="8415" RevisionGUID="51d320da-bd96-4922-b8da-d942740b4912" CreationDate="2011-02-11T06:08:14.537" UserId="4264" Text="It appears SuperTuxKart is built using &lt;a href=&quot;http://www.irrlicht3d.org/&quot;&gt;Irrlicht&lt;/a&gt;, so the question is in that context. &lt;a href=&quot;http://www.irrlicht3d.org/wiki/index.php?n=Main.IntegratingOISWithIrrlicht&quot;&gt;This wiki page&lt;/a&gt; shows how to replace Irrlicht's internal input library with &lt;a href=&quot;http://www.wreckedgames.com/&quot;&gt;OIS&lt;/a&gt; which apparently supports force feedback.&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="17190" PostHistoryTypeId="2" PostId="8416" RevisionGUID="a950556e-0a1e-4454-8848-553dab988c95" CreationDate="2011-02-11T07:23:17.530" UserId="4264" Text="OpenGL wiki's &lt;a href=&quot;http://www.opengl.org/wiki/Calculating_a_Surface_Normal&quot;&gt;pseudocode&lt;/a&gt; (as referenced by Peter Taylor, as well) is correct. What you want is the normal of the _plane_ the triangle, quad or other polygon represents. All you need are two edges of any planar polygon that share a common vertex.&#xD;&#xA;&#xD;&#xA;The number of edges does not matter. All you need is to get enough information to define the plane, and then get the normal of said plane." />
  <row Id="17191" PostHistoryTypeId="2" PostId="8417" RevisionGUID="6e3e90e7-b89c-4740-9463-c9599030f8ca" CreationDate="2011-02-11T07:24:49.163" UserId="1091" Text="A cross product ought to be perfectly reliable for any planar polygon. If you've got problems with that, it's almost certainly just a bug in your code.&#xD;&#xA;&#xD;&#xA;As others have said, it would be useful to know why you think your normals are wrong.&#xD;&#xA;" />
  <row Id="17192" PostHistoryTypeId="25" PostId="8382" RevisionGUID="81a90d2d-f731-413c-bb68-b3dadf826e31" CreationDate="2011-02-11T08:22:21.030" Comment="http://twitter.com/#!/StackGameDev/status/35976920743018496" />
  <row Id="17193" PostHistoryTypeId="2" PostId="8418" RevisionGUID="3f564b30-7af1-49c3-8629-11757f21f190" CreationDate="2011-02-11T11:00:13.590" UserId="4264" Text="Judging from a &lt;a href=&quot;http://www.google.com/search?q=ghosting+ipad&quot;&gt;quick google search&lt;/a&gt; at least &lt;a href=&quot;http://www.mahalo.com/answers/is-ghosting-normal-on-an-ipad-or-is-my-ipad-defective&quot;&gt;some&lt;/a&gt; (possibly defective, or at least less-than-perfect) iPads suffer from &lt;a href=&quot;http://www.youtube.com/watch?v=Lcps1zkDTsM&quot;&gt;ghosting&lt;/a&gt;. Is this what you're seeing?&#xD;&#xA;&#xD;&#xA;The youtube link above says the person has replaced his ipad with a functional one, and the other link suggests if you see clear ghosting, you should return your ipad." />
  <row Id="17194" PostHistoryTypeId="25" PostId="8349" RevisionGUID="89f2f079-bffa-4d17-9a03-db78083d1e16" CreationDate="2011-02-11T11:22:21.720" Comment="http://twitter.com/#!/StackGameDev/status/36022221709250560" />
  <row Id="17195" PostHistoryTypeId="2" PostId="8419" RevisionGUID="6380627f-6f3c-48a4-96e6-077fa9c549ed" CreationDate="2011-02-11T12:38:12.420" UserId="5374" Text="Hi I have programmed 1 openGL game which is a sceen whit one F1 car and track.It is simple it can contains around of 10 000-20 000 of triangles.And it should run on any pc but it wont, it need a really good graph card to run in relatvly good fps.Can you write some metods or links to site which make my scene/game more efective thx&#xD;&#xA;&#xD;&#xA;my game can be downloaded from [here][1]&#xD;&#xA;&#xD;&#xA;or directly from [here][2]&#xD;&#xA;&#xD;&#xA;THX&#xD;&#xA;  [1]: http://wblade.com&#xD;&#xA;  [2]: http://wblade.com/ogl/opnegl.zip" />
  <row Id="17196" PostHistoryTypeId="1" PostId="8419" RevisionGUID="6380627f-6f3c-48a4-96e6-077fa9c549ed" CreationDate="2011-02-11T12:38:12.420" UserId="5374" Text="Make open Gl game more efective" />
  <row Id="17197" PostHistoryTypeId="3" PostId="8419" RevisionGUID="6380627f-6f3c-48a4-96e6-077fa9c549ed" CreationDate="2011-02-11T12:38:12.420" UserId="5374" Text="&lt;opengl&gt;&lt;first-person-shooter&gt;" />
  <row Id="17198" PostHistoryTypeId="2" PostId="8420" RevisionGUID="480cc976-a955-45c0-9969-323f69ed5327" CreationDate="2011-02-11T12:39:27.843" UserId="1829" Text="In my mind, it first depends on the type of game. For games that requires reflexion and simples actions (meaning not immersive games), it requires artistic genius.&#xD;&#xA;&#xD;&#xA;For games which are &quot;immersive&quot;-kinded (where you control one of several character in a virtual environment), it is less complicated, but it requires to have played other genre-alike games.&#xD;&#xA;&#xD;&#xA;You have to implement mechanisms that make the player think he is in a world, make a reward system, but keeping all this simple, quick and more importantly, **coherent**. It's not because it's virtual that you can invent any rule you think is a good one and say &quot;it'll work, it's genius&quot;: It's great that virtuality allows to do anything you want, but players want to have fun, not test your ideas.&#xD;&#xA;&#xD;&#xA;It can seem you have to imagine you are being god and designing a world and its rules, and it can seem inappropriate, but that's the only way a game can be fun: you have to distort reality, not change it. BUT that doesn't you should not experiment, that is strongly encouraged, but if you want to implement an idea, don't forget that:&#xD;&#xA;&#xD;&#xA; - ideas are cheap, expensive to implement&#xD;&#xA;&#xD;&#xA; - most importantly, your idea might have to be balanced and/or adjusted before you release the game: an idea is more abstract than a state diagram, so in the end, you will have to make it do what you feel is the most appropriate.&#xD;&#xA;" />
  <row Id="17199" PostHistoryTypeId="2" PostId="8421" RevisionGUID="58d89457-4f24-4fd3-8513-f17417d5623d" CreationDate="2011-02-11T12:51:36.197" UserId="5094" Text="I'm trying to follow this tutorial http://www.tonypa.pri.ee/tbw/tut05.html to implement real-time collisions in a tile-based world.&#xD;&#xA;&#xD;&#xA;I find the center coordinates of my entities thanks to these properties:&#xD;&#xA;&#xD;&#xA;    public float CenterX&#xD;&#xA;    {&#xD;&#xA;        get { return X + Width / 2f; }&#xD;&#xA;        set { X = value - Width / 2f; }&#xD;&#xA;    }&#xD;&#xA;    public float CenterY&#xD;&#xA;    {&#xD;&#xA;        get { return Y + Height / 2f; }&#xD;&#xA;        set { Y = value - Height / 2f; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then in my update method, in the player class, which is called every frame, I have this code:&#xD;&#xA;&#xD;&#xA;    public override void Update()&#xD;&#xA;    {&#xD;&#xA;        base.Update();&#xD;&#xA; &#xD;&#xA;        int downY = (int)Math.Floor((CenterY + Height / 2f - 1) / 16f);&#xD;&#xA;        int upY = (int)Math.Floor((CenterY - Height / 2f) / 16f);&#xD;&#xA;        int leftX =     (int)Math.Floor((CenterX + Speed * NextX - Width / 2f) / 16f);&#xD;&#xA;        int rightX = (int)Math.Floor((CenterX + Speed * NextX + Width / 2f - 1) / 16f);&#xD;&#xA; &#xD;&#xA;        bool upleft = Game.CurrentMap[leftX, upY] != 1;&#xD;&#xA;        bool downleft = Game.CurrentMap[leftX, downY] != 1;&#xD;&#xA;        bool upright = Game.CurrentMap[rightX, upY] != 1;&#xD;&#xA;        bool downright = Game.CurrentMap[rightX, downY] != 1;&#xD;&#xA; &#xD;&#xA;        if(NextX == 1)&#xD;&#xA;        {&#xD;&#xA;            if (upright &amp;&amp; downright)&#xD;&#xA;               CenterX += Speed;&#xD;&#xA;            else&#xD;&#xA;               CenterX = (Game.GetCellX(CenterX) + 1)*16 - Width / 2f;&#xD;&#xA;        }&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;downY, upY, leftX and rightX should respectively find the lowest Y position, the highest Y position, the leftmost X position and the rightmost X position. I add + Speed * NextX because in the tutorial the getMyCorners function is called with these parameters:&#xD;&#xA;&#xD;&#xA;    getMyCorners (ob.x+ob.speed*dirx, ob.y, ob);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The GetCellX and GetCellY methods:&#xD;&#xA;&#xD;&#xA;    public int GetCellX(float mX)&#xD;&#xA;    {&#xD;&#xA;        return (int)Math.Floor(mX / SGame.Camera.TileSize); &#xD;&#xA;    }&#xD;&#xA;    public int GetCellY(float mY)&#xD;&#xA;    {&#xD;&#xA;        return (int)Math.Floor(mY / SGame.Camera.TileSize); &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The problem is that the player &quot;flickers&quot; while hitting a wall, and the corner detection doesn't even work correctly since it can overlap walls that only hit one of the corners. I do not understand what is wrong. In the tutorial the ob.x and ob.y fields should be the same as my CenterX and CenterY properties, and the ob.width and ob.height should be the same as Width / 2f and Height / 2f. However it still doesn't work. &#xD;&#xA;&#xD;&#xA;Thanks for your help." />
  <row Id="17200" PostHistoryTypeId="1" PostId="8421" RevisionGUID="58d89457-4f24-4fd3-8513-f17417d5623d" CreationDate="2011-02-11T12:51:36.197" UserId="5094" Text="Tile-based 2D collision detection problems" />
  <row Id="17201" PostHistoryTypeId="3" PostId="8421" RevisionGUID="58d89457-4f24-4fd3-8513-f17417d5623d" CreationDate="2011-02-11T12:51:36.197" UserId="5094" Text="&lt;2d&gt;&lt;c#&gt;&lt;collision-detection&gt;&lt;tiles&gt;" />
  <row Id="17202" PostHistoryTypeId="5" PostId="8419" RevisionGUID="25a41474-8786-43f2-805a-6ad53362e40a" CreationDate="2011-02-11T13:13:52.650" UserId="20" Comment="spelling, title changed" Text="I have programmed an OpenGL game which just contains one F1 car and a track. It is very simple and only uses around of 10'000 - 20'000 triangles. It should run on any PC but it won't, it needs a really good graphics-card to run at a decent framerate. Can you write some methods or links to sites which would help me make my scene/game more efective?&#xD;&#xA;&#xD;&#xA;my game can be downloaded from [here][1]&#xD;&#xA;&#xD;&#xA;or directly from [here][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://wblade.com&#xD;&#xA;  [2]: http://wblade.com/ogl/opnegl.zip" />
  <row Id="17203" PostHistoryTypeId="4" PostId="8419" RevisionGUID="25a41474-8786-43f2-805a-6ad53362e40a" CreationDate="2011-02-11T13:13:52.650" UserId="20" Comment="spelling, title changed" Text="Make OpenGL game perform better" />
  <row Id="17204" PostHistoryTypeId="6" PostId="8419" RevisionGUID="25a41474-8786-43f2-805a-6ad53362e40a" CreationDate="2011-02-11T13:13:52.650" UserId="20" Comment="spelling, title changed" Text="&lt;opengl&gt;&lt;performance&gt;" />
  <row Id="17205" PostHistoryTypeId="2" PostId="8422" RevisionGUID="7aaf7efe-39cf-4fac-8ceb-daff8542360b" CreationDate="2011-02-11T13:33:08.903" UserId="4264" Text="Go grab &lt;a href=&quot;http://www.gremedy.com/&quot;&gt;gDEBugger&lt;/a&gt;. It's free for everyone now - you just need to register to get a free 1-year license.&#xD;&#xA;&#xD;&#xA;With it, you can check if you're fill bound, vertex processing bound, shader bound or cpu bound - as well as check if you're doing something stupid like rendering 10000 separate objects." />
  <row Id="17206" PostHistoryTypeId="2" PostId="8423" RevisionGUID="07ea8687-731e-4606-a3cd-ab3b16ff9349" CreationDate="2011-02-11T13:36:59.580" UserId="4947" Text="What I have seen, you are using Display lists. They are already few years depricated and you should use vertex buffer objects. It maybe could help. &#xD;&#xA;&#xD;&#xA;They work on this princip: You create buffer in graphics memory. Still in init phase you copy your data there (vertex coordinates, texture coordinates, normals etc.). And always in display function just use these data to render all geometry. It's fast and most used in these days (I hope)." />
  <row Id="17207" PostHistoryTypeId="2" PostId="8424" RevisionGUID="fd038b1f-2d12-470b-b0d3-16c7f59a1940" CreationDate="2011-02-11T13:39:12.727" UserId="5331" Text="Maybe you shouldn't focus on learning one specific language. You should how to develop.&#xD;&#xA;&#xD;&#xA;Yesterday, i downloaded the iOS SDK and Xcode. And i took it right away and made a little tetris. I'm an as3 guy, and i haven't even bother about learning Objective-C. But i was able to make a simple game because i understand how to develop.&#xD;&#xA; &#xD;&#xA;So, my point here is that you maybe should spend more time learning new concepts, than a specific language. Or Learn X languages and port your knowledge to other languages." />
  <row Id="17208" PostHistoryTypeId="2" PostId="8425" RevisionGUID="068e06f4-1b49-4c5d-9cac-077e1b5085a8" CreationDate="2011-02-11T13:49:31.587" UserId="5331" Text="I suggest you to first, try to make a pacman!!&#xD;&#xA;&#xD;&#xA;I don't have any other suggestion sorry :S" />
  <row Id="17209" PostHistoryTypeId="2" PostId="8426" RevisionGUID="4030450d-d242-4614-b1f1-b42e31f52504" CreationDate="2011-02-11T13:54:54.917" UserId="5331" Text="I have just made some games with the cannabalt (flixel for iOS) source" />
  <row Id="17210" PostHistoryTypeId="25" PostId="8421" RevisionGUID="b21c47d2-9d67-4f1b-8813-7abd98fbeaf0" CreationDate="2011-02-11T14:22:21.710" Comment="http://twitter.com/#!/StackGameDev/status/36067520330858496" />
  <row Id="17211" PostHistoryTypeId="5" PostId="2200" RevisionGUID="267ffda5-79e5-4537-8ec1-56fa91469aff" CreationDate="2011-02-11T14:44:31.363" UserId="14" Comment="added 4 characters in body" Text="The [**Strategy pattern**][1] is great for determining what to do but not when to do it.  You're also going to need to use [**Finite State Machines**][2] to know which state your AI is in and what appropriate decisions are available.&#xD;&#xA;&#xD;&#xA;[**A Practical Guide to Building a Complete Game AI: Volume I** ][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Strategy_pattern&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Finite-state_machine&#xD;&#xA;  [3]: http://archive.gamedev.net/reference/articles/article784.asp" />
  <row Id="17212" PostHistoryTypeId="2" PostId="8427" RevisionGUID="477929df-eb75-4e22-96de-77ee9c202f2f" CreationDate="2011-02-11T14:55:34.230" UserId="4229" Text="I am a computer science student and i am developing with C/C++ and Python and i want to begin learning graphics tools to start developing in game engines and especially blender .. So what is your recommendation for me to learn and to read. " />
  <row Id="17213" PostHistoryTypeId="1" PostId="8427" RevisionGUID="477929df-eb75-4e22-96de-77ee9c202f2f" CreationDate="2011-02-11T14:55:34.230" UserId="4229" Text="The recommended road map to be a good Graphics/Game engine programmer" />
  <row Id="17214" PostHistoryTypeId="3" PostId="8427" RevisionGUID="477929df-eb75-4e22-96de-77ee9c202f2f" CreationDate="2011-02-11T14:55:34.230" UserId="4229" Text="&lt;engine&gt;&lt;graphics-programming&gt;&lt;blender-game-engine&gt;" />
  <row Id="17215" PostHistoryTypeId="2" PostId="8428" RevisionGUID="1ed38cf8-145d-43b7-a58e-be1747e16dd3" CreationDate="2011-02-11T15:05:13.887" UserId="259" Text="Some practical advice if you go for state machines: beware the megastate.&#xD;&#xA;&#xD;&#xA;It's tempting to have a &quot;flee&quot; state which handles setting a position to flee to, setting a high target speed, clearing all targets, etc. It's much better to instead have many state machines, each handling one or few ship controls - eg a state machine that handles selecting a target position, one that handles guns, etc.&#xD;&#xA;&#xD;&#xA;This may seem stupid, as you'd have to add flee states to each individual machine, but since you're constrained to only one or two outputs, your states end up very small so this should not be a problem. &#xD;&#xA;&#xD;&#xA;Also, since each control is now under individual control, you can end up selecting a flee target position while still having the attack state control your guns. You can strafe an enemy while still conserving engine power because of a coolant leak. You can steer to avoid a collision while still dumping countermeasures.  All these would be impossible with a single all-encompassing state machine." />
  <row Id="17216" PostHistoryTypeId="2" PostId="8429" RevisionGUID="38e1adcf-7442-4fd1-94a3-e7ea682c16bc" CreationDate="2011-02-11T15:37:08.493" UserId="5098" Text="[Behavioral Mathematics for Game AI][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Behavioral-Mathematics-Game-Dave-Mark/dp/1584506849&#xD;&#xA;&#xD;&#xA;Adding this book to the list of starting points for learning AI programming.  With its focus on observation and behavior implementation rather than algorithms of limited application, I believe it is well suited to the task.  " />
  <row Id="17217" PostHistoryTypeId="5" PostId="8427" RevisionGUID="e56f76fc-42c5-47de-94f7-cd0ff1a81ac0" CreationDate="2011-02-11T15:41:05.487" UserId="4229" Comment="added 12 characters in body; added 35 characters in body" Text="I am a computer science student and i am developing with C/C++ and Python and i want to begin learning graphics tools to start developing in game engines and especially blender game engine .. So what is your recommendation for me to learn and to read. And recommend me a road map for it." />
  <row Id="17218" PostHistoryTypeId="2" PostId="8430" RevisionGUID="9493cfa6-551d-43bb-8ea4-ef69933cf04e" CreationDate="2011-02-11T15:46:06.340" UserId="1638" Text="You would be best served by learning how to use openGL off their site. It will introduce you to programming for graphics. Only after you are comfortable with openGl then move to creating a game loop and object manager." />
  <row Id="17219" PostHistoryTypeId="2" PostId="8431" RevisionGUID="138ae17a-ea89-4223-a88a-22a25abd38b8" CreationDate="2011-02-11T15:47:21.863" UserId="1910" Text="Hey guys, I'm currently using JME3 to learn 3d game development in java, and I have run into a situation. I would like to add fog effects to my games, but I don't even know where to start to implement this. I know how to set the camera's far frustum to limit the render distance, but that just simply makes a sharp cutoff. I'd like the fog it up a bit to make it feel more natural.&#xD;&#xA;&#xD;&#xA;**I'm looking for an answer that points me into the correct direction. I'm not looking for specific code snippets or even JME3's engine specifics. I just want to get an idea of how this stuff works in general.**&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="17220" PostHistoryTypeId="1" PostId="8431" RevisionGUID="138ae17a-ea89-4223-a88a-22a25abd38b8" CreationDate="2011-02-11T15:47:21.863" UserId="1910" Text="How do I get started with fog type effects in a first person game?" />
  <row Id="17221" PostHistoryTypeId="3" PostId="8431" RevisionGUID="138ae17a-ea89-4223-a88a-22a25abd38b8" CreationDate="2011-02-11T15:47:21.863" UserId="1910" Text="&lt;3d&gt;&lt;java&gt;&lt;camera&gt;" />
  <row Id="17222" PostHistoryTypeId="6" PostId="8427" RevisionGUID="be476c6a-56ff-4b9a-b010-170ba18163af" CreationDate="2011-02-11T15:55:16.067" UserId="4229" Comment="edited tags" Text="&lt;engine&gt;&lt;graphics&gt;&lt;programming&gt;&lt;graphics-programming&gt;&lt;blender-game-engine&gt;" />
  <row Id="17223" PostHistoryTypeId="2" PostId="8432" RevisionGUID="4bf3a185-530b-4f02-9cad-27f9bc594334" CreationDate="2011-02-11T15:56:16.963" UserId="4210" Text="**EDIT START**   &#xD;&#xA;Not looked into blender game engine for a while, but I'd have thought the only requirement to use BGE would be to learn how to use it, like any other program.   &#xD;&#xA;**EDIT END**&#xD;&#xA;&#xD;&#xA;Firstly a Game Engine and Graphics Engine are very different.&#xD;&#xA;A Game Engine could be thought of as lots of little engines, graphics, sound, network, input etc...&#xD;&#xA;A Graphics Engine such as `Ogre`, focuses entirely on the graphics side of things.&#xD;&#xA;&#xD;&#xA;The single most important thing is `Maths`. `Maths`, `Maths`, and `Maths`. Leaving aside the physics.&#xD;&#xA;&#xD;&#xA;`Vectors`, `Matrices`, `Quaternions`, `Ray tracing`, `curves in space`, `Projections stuff`, `Approximation methods`, it goes on ...&#xD;&#xA;&#xD;&#xA;The maths is platform independent and will be useful on `ALL` platforms.&#xD;&#xA;&#xD;&#xA;Also pick a graphics API such as `OpenGL` or `DirectX`, I prefer OpenGL for platform sakes, but it doesn't really matter. `XNA` would do I guess if you'd prefer C#.&#xD;&#xA;&#xD;&#xA;A good general book on Amazon   &#xD;&#xA;http://www.amazon.co.uk/Essential-Mathematics-Games-Interactive-Applications/dp/0123742978/ref=sr_1_3?ie=UTF8&amp;qid=1297439659&amp;sr=8-3" />
  <row Id="17224" PostHistoryTypeId="2" PostId="8433" RevisionGUID="ecc7ab03-f832-4a86-aff2-b824b4ccd825" CreationDate="2011-02-11T16:02:10.500" UserId="4947" Text="In general fog is very simple. It just takes depth of each fragment / pixel and according to some function sets the output color (blends between original fragment color and fog color according to fragment depht). You can use linear blending or quadratic blending or whatever you want (if you implement it yourself).&#xD;&#xA;&#xD;&#xA;I'm not java programmer so I can't say you exact commands. But in OpenGL it's very simple and in original rendering pipeline (non-programmable) it can be just enabled by one command and disabled by other. In programmable pipeline you have to write it in your shaders, but it's only blending." />
  <row Id="17225" PostHistoryTypeId="2" PostId="8434" RevisionGUID="4121b339-d858-4711-8c89-778fcab72097" CreationDate="2011-02-11T16:04:39.023" UserId="2332" Text="If this is your first time developing AI, you don't have to worry about things like the state pattern, behavioural maths or even get a book on the subject.&#xD;&#xA;&#xD;&#xA;You can literally get away with something like this:&#xD;&#xA;&#xD;&#xA;    if( targetInRange == true )  &#xD;&#xA;    {&#xD;&#xA;        FireAtTarget();&#xD;&#xA;    }&#xD;&#xA;    else if( bulletComingTowardsMe == true )&#xD;&#xA;    {&#xD;&#xA;        MoveAwayFromBullet();&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        WanderAroundAimlessly();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The main aspect of getting AI correct is by thinking about what behaviours you want the character to have and how this can be achieved realistically. So for a basic spaceship enemy, I'd imagine the possible actions it could carry out would be to:&#xD;&#xA;&#xD;&#xA; - Move around&#xD;&#xA; - Fire&#xD;&#xA; - Run away&#xD;&#xA;&#xD;&#xA;And when could these actions happen?&#xD;&#xA; &#xD;&#xA; - Move around - Nothing else to do&#xD;&#xA; - Fire - When I spot an enemy&#xD;&#xA; - Run away - When I'm low on health/When I'm taking fire/etc&#xD;&#xA;&#xD;&#xA;After you have done this due to the low number of &quot;states&quot; that your character can be in, you can use a simple if statement like the one above. I would then recommend you look at Steering Behaviours as these are very simple behaviours to implement and can result in really good looking movement.&#xD;&#xA;&#xD;&#xA;More can be found here: http://www.red3d.com/cwr/steer/  &#xD;&#xA;And I would definitely recommend Mat Buckland's book *Programming Game AI By Example*, especially when you're starting out.&#xD;&#xA;&#xD;&#xA;When you are really comfortable with these, I would suggest looking at the State and Strategy Patterns.&#xD;&#xA;&#xD;&#xA;The point is to start out small and simple. Don't worry about all these terms that everyone keeps flinging around about FSMs and design patterns and whatever. Design and build first of all, then worry about how you can improve it by using existing methods or standards.&#xD;&#xA;&#xD;&#xA;Hope that helps!" />
  <row Id="17226" PostHistoryTypeId="5" PostId="8404" RevisionGUID="dd7bd6c9-7f40-4cc5-a750-632b112124cc" CreationDate="2011-02-11T16:07:12.967" UserId="160" Comment="added 3997 characters in body" Text="Instead of using enums or making classes for each kind of object, I think the [type object](http://gameprogrammingpatterns.com/type-object.html) pattern is a friendly solution here. In your example, you don't really show how the enums are being used, so it's hard to show what a corresponding type object implementation would look like, but it would be something like:&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Integer damage) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int getDamage() {&#xD;&#xA;        // Here a subtype can just choose to completely override the&#xD;&#xA;        // damage or inherit it. A more complex system could maybe&#xD;&#xA;        // add them or combine them in some other way.&#xD;&#xA;        if (damage != null) return damage;&#xD;&#xA;    &#xD;&#xA;        return parent.getDamage();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Integer damage;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Item {&#xD;&#xA;      public int getDamage() {&#xD;&#xA;        return type.getDamage();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private final ItemType type;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ItemType swordType = new ItemType(null, 4);&#xD;&#xA;    ItemType shortSwordType = new ItemType(swordType, 3);&#xD;&#xA;    // inherits damage&#xD;&#xA;    ItemType longSwordType = new ItemType(swordType, null);&#xD;&#xA;&#xD;&#xA;    Item sword = new Item(swordType);&#xD;&#xA;&#xD;&#xA;Cool stuff about this:&#xD;&#xA;&#xD;&#xA;1. You only ever need to define two Java classes, `ItemType` and `Item`.&#xD;&#xA;2. You can define how subtypes refine their parent types however you want: they can overide values, or stack them, or whatever. You could even support multiple inheritance of you wanted by giving `ItemType` a list of parent types.&#xD;&#xA;3. Makes it *much* easier to make your item types data-driven. You just create new instances of `ItemType` with different values that you've read from some file.&#xD;&#xA;&#xD;&#xA;In the context of games, this is one of my absolute favorite design patterns and one I wish more people knew about. Every time I see a hard-coded class named `Sword`, I cry a little on the inside.&#xD;&#xA;&#xD;&#xA;You can see a bigger example of this [here](https://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Things/Items/). There's no inheritance in `ItemType` in Amaranth, though, because the [data format](https://bitbucket.org/munificent/bramble/src/5e40302278e4/Bramble.Core/PropertyBag.cs) itself handles that.&#xD;&#xA;&#xD;&#xA;**Edit: Responding to tenpn's comment below.**&#xD;&#xA;&#xD;&#xA;The assumption with the type object pattern is that your different &quot;types&quot; of object will vary mostly in attributes or maybe select from a few different pre-defined behaviors. If each type of item really does behave wholly differently, then it may be a better fit to just use full-on classes.&#xD;&#xA;&#xD;&#xA;But, if the types do pull from a set of well-defined behaviors, or you want to define your behavior in data instead of hard-coding it, type objects can still work. In many cases, behavioral differences can be modeled either using different attributes, or through the strategy pattern.&#xD;&#xA;&#xD;&#xA;Answering your use cases specifically:&#xD;&#xA;&#xD;&#xA;&gt; What if the shortsword only damages orcs&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Integer damage,&#xD;&#xA;          Map&lt;MonsterType, Float&gt; multipliers) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;        this.multipliers = multipliers;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      public int getDamage(MonsterType monster) {&#xD;&#xA;        return getBaseDamage() * getMultiplier(monster);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      protected int getBaseDamage() {&#xD;&#xA;        if (damage != null) return damage;&#xD;&#xA;        return parent.getDamage();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      protected float getMultiplier(MonsterType monsterType) {&#xD;&#xA;        Float multiplier = multipliers.get(monsterType);&#xD;&#xA;        if (multiplier != null) return multiplier;&#xD;&#xA;        if (parent == null) return 1;&#xD;&#xA;        return parent.getMultiplier();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Integer damage;&#xD;&#xA;      private Map&lt;MonsterType, Float&gt; multipliers;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MonsterType orc = ...&#xD;&#xA;    ItemType shortSword = new ItemType(null, 123,&#xD;&#xA;        Collections.singletonMap(orc, 0);&#xD;&#xA;&#xD;&#xA;Now you've got an extensible way to make certain items have different strength against different monsters, and you can still make it data-driven.&#xD;&#xA;&#xD;&#xA;My roguelike does something similar, though it adds a couple of levels of abstraction. An ItemType may have one or more Powers which modify the item (think &quot;Sword of burning&quot; where &quot;of burning&quot; is the power). A Power can have a set of flags. There are flags like &quot;hurts-orcs&quot; that modify the damage against a Group, and then, finally, a MonsterType can be in one or more Groups. The last allows items to be strong against different overlapping sets of monsters.&#xD;&#xA;&#xD;&#xA;For example an undead dragon is in both the &quot;undead&quot; and &quot;dragon&quot; groups, so a weapon that does extra damage against *either* of those will be effective against the monster.&#xD;&#xA;&#xD;&#xA;&gt; What if the dagger does random damage?&#xD;&#xA;&#xD;&#xA;    interface Dice {&#xD;&#xA;      int roll();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class FixedDice implements Dice {&#xD;&#xA;      public FixedDice(int value) {&#xD;&#xA;        this.value = value;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int roll() { return value; }&#xD;&#xA;  &#xD;&#xA;      private int value;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class RangeDice implements Dice {&#xD;&#xA;      public RangeDice(int min, int max) {&#xD;&#xA;        this.min = min;&#xD;&#xA;        this.max = max;&#xD;&#xA;        this.random = new Random();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int roll() {&#xD;&#xA;        return random.next(max - min) + min;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private int min;&#xD;&#xA;      private int max;&#xD;&#xA;      private Random random;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Dice damage) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      public int getDamage() {&#xD;&#xA;        if (damage != null) return damage.roll();&#xD;&#xA;        return parent.getDamage().roll();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Dice damage;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ItemType dagger = new ItemType(null, new RangeDice(2, 20));&#xD;&#xA;&#xD;&#xA;This is how my roguelike works now. Most attributes on a type are instances of a [https://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Roller.cs](Roller) class that can select from a couple of different number generators. These can be specified in the data files like:&#xD;&#xA;&#xD;&#xA;    123  // fixed amount&#xD;&#xA;    2-10 // equally weighted random range&#xD;&#xA;    3d6  // d&amp;d style dice roll&#xD;&#xA;" />
  <row Id="17227" PostHistoryTypeId="2" PostId="8435" RevisionGUID="5c8d66a9-bc35-40f6-a37e-9b9db9fc75f5" CreationDate="2011-02-11T16:31:47.103" UserId="1430" Text="Learning to be a good programmer and learning how to use the (relatively obscure and underused) Blender Game Engine are two very different problems. Almost so different that I think you should be asking two separate questions.&#xD;&#xA;&#xD;&#xA;That said, learning the Blender Game Engine is like learning any other API or toolchain. [Check out the documentation][1], read and understand it, and practice using it over and over until you are comfortable with it.&#xD;&#xA;&#xD;&#xA;That general concept applies to learning how to be a good programmer as well. Generally a programmer will learn by first acquiring some basic skill with a particular programming language and then experimenting in the default environment of that language -- this typically means building text-based, console-IO type programs and games for a while. It sounds like you are there already and want to move beyond that.&#xD;&#xA;&#xD;&#xA;At that point the programmer tends to start experimenting with windowing libraries or 2D graphics libraries. There's a big jump between console-based IO and 2D, window-oriented, event-based programming for some. Making games in this space that introduce the programmer to the fundamentals of [linear algebra][2], which is a critical part of understanding the 3D graphics programming that many programmers eventually end up doing. Once a programmer has built a few 2D games, it may be time to consider learning 3D math and APIs (Direct3D or OpenGL, or some higher-level API provided by some engine or whatnot).&#xD;&#xA;&#xD;&#xA;At some point during that whole process, which is very focused on the everyday minutiae of being a programmer, you will hopefully acquire a talent for larger-scale problem solving and for considering the design and architecture of the systems you build rather than just the &quot;how to&quot; of building them in particular languages -- this is the thing you want to strive for, this is where you start becoming a good software developer instead of a good code monkey. &#xD;&#xA;&#xD;&#xA;In your specific case, [PyGame][3] might be a reasonable thing for you to start looking at.&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.blender.org/index.php/Doc:Tutorials/Game_Engine/BSoD&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Linear_algebra&#xD;&#xA;  [3]: http://www.pygame.org/" />
  <row Id="17228" PostHistoryTypeId="5" PostId="8427" RevisionGUID="5b33dab8-c7c9-4521-b19b-cbb70833e3f4" CreationDate="2011-02-11T16:32:51.377" UserId="1430" Comment="grammar, capitalization" Text="I am a computer science student and I am developing with C/C++ and Python and I want to begin learning graphics tools to start developing with game engines, especially the Blender Game Engine. So what is your recommendation for me to learn and to read? And recommend me a road map for it." />
  <row Id="17229" PostHistoryTypeId="4" PostId="8427" RevisionGUID="5b33dab8-c7c9-4521-b19b-cbb70833e3f4" CreationDate="2011-02-11T16:32:51.377" UserId="1430" Comment="grammar, capitalization" Text="The recommended road map to be a good graphics/game engine programmer" />
  <row Id="17230" PostHistoryTypeId="5" PostId="8434" RevisionGUID="819fe636-74c4-4100-a284-5c92687710da" CreationDate="2011-02-11T16:58:30.920" UserId="241" Comment="added link to book mentioned." Text="If this is your first time developing AI, you don't have to worry about things like the state pattern, behavioural maths or even get a book on the subject.&#xD;&#xA;&#xD;&#xA;You can literally get away with something like this:&#xD;&#xA;&#xD;&#xA;    if( targetInRange == true )  &#xD;&#xA;    {&#xD;&#xA;        FireAtTarget();&#xD;&#xA;    }&#xD;&#xA;    else if( bulletComingTowardsMe == true )&#xD;&#xA;    {&#xD;&#xA;        MoveAwayFromBullet();&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        WanderAroundAimlessly();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The main aspect of getting AI correct is by thinking about what behaviours you want the character to have and how this can be achieved realistically. So for a basic spaceship enemy, I'd imagine the possible actions it could carry out would be to:&#xD;&#xA;&#xD;&#xA; - Move around&#xD;&#xA; - Fire&#xD;&#xA; - Run away&#xD;&#xA;&#xD;&#xA;And when could these actions happen?&#xD;&#xA; &#xD;&#xA; - Move around - Nothing else to do&#xD;&#xA; - Fire - When I spot an enemy&#xD;&#xA; - Run away - When I'm low on health/When I'm taking fire/etc&#xD;&#xA;&#xD;&#xA;After you have done this due to the low number of &quot;states&quot; that your character can be in, you can use a simple if statement like the one above. I would then recommend you look at Steering Behaviours as these are very simple behaviours to implement and can result in really good looking movement.&#xD;&#xA;&#xD;&#xA;More can be found here: http://www.red3d.com/cwr/steer/  &#xD;&#xA;And I would definitely recommend Mat Buckland's book [*Programming Game AI By Example*][1], especially when you're starting out.&#xD;&#xA;&#xD;&#xA;When you are really comfortable with these, I would suggest looking at the State and Strategy Patterns.&#xD;&#xA;&#xD;&#xA;The point is to start out small and simple. Don't worry about all these terms that everyone keeps flinging around about FSMs and design patterns and whatever. Design and build first of all, then worry about how you can improve it by using existing methods or standards.&#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ai-junkie.com/books/toc_pgaibe.html" />
  <row Id="17231" PostHistoryTypeId="24" PostId="8434" RevisionGUID="27e5521a-420d-4dac-9103-e02dfa1545ac" CreationDate="2011-02-11T16:58:30.920" Comment="Proposed by 241 approved by 51 edit id of 25" />
  <row Id="17232" PostHistoryTypeId="2" PostId="8436" RevisionGUID="d098eabc-7159-46e6-8a06-caec87963b93" CreationDate="2011-02-11T17:14:35.147" UserId="5379" Text="If you're a computer science student, then find out what the graphics course is at your university/collage and its prerequisites. You'll probably want to take both optional and required prerequisites for the graphics, but you also need to get all of the prerequisites for the graphics prerequisites. &#xD;&#xA;&#xD;&#xA;For example, the University of Waterloo's graphics course is [CS488][1]. The [prerequisites][2] are ([CM 339/CS 341][3] or [SE 240][4]) and ([CS 350][5] or [SE 350][6]) and ([CS 370][7] or [CS 371][8]). Each of these will have their own prerequisites that you need to fit into your schedule.&#xD;&#xA;&#xD;&#xA;While the specific courses are different for each school, I'd assume a lot of the content is similar. The UW graphics course requires students to build several small scenes and then a ray tracer. They then make a proposal for and implement their final project. You can get ahead in your education by going through the courseware for a lot of universities online: [MIT][9], [Stanford][10], etc... (MIT puts a lot of effort into making their courses available online.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.student.cs.uwaterloo.ca/~cs488/&#xD;&#xA;  [2]: http://www.cs.uwaterloo.ca/current/courses/course_descriptions/cDescr/CS488.shtml&#xD;&#xA;  [3]: http://www.math.uwaterloo.ca/navigation/CompMath/Courses/CM339course.shtml&#xD;&#xA;  [4]: https://ece.uwaterloo.ca/~se240/&#xD;&#xA;  [5]: http://www.student.cs.uwaterloo.ca/~cs350/W11/&#xD;&#xA;  [6]: https://ece.uwaterloo.ca/~ece354/&#xD;&#xA;  [7]: http://www.student.cs.uwaterloo.ca/~cs370/&#xD;&#xA;  [8]: http://www.student.cs.uwaterloo.ca/~cs371/&#xD;&#xA;  [9]: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-837-computer-graphics-fall-2003/&#xD;&#xA;  [10]: http://graphics.stanford.edu/courses/cs248-97-winter/" />
  <row Id="17233" PostHistoryTypeId="25" PostId="8427" RevisionGUID="e219393c-4e32-4e3c-9283-74c0514866ce" CreationDate="2011-02-11T17:22:22.163" Comment="http://twitter.com/#!/StackGameDev/status/36112820642775040" />
  <row Id="17234" PostHistoryTypeId="2" PostId="8437" RevisionGUID="c574bab3-3d0a-411f-9339-38f443a5152a" CreationDate="2011-02-11T17:25:42.643" UserId="3830" Text="One tip for choosing the color of your fog.  Assuming you are using a skybox, make the fog color be the average color of your skybox on the horizon.  If you do this, then as items slowly &quot;fog out&quot; as they become farther away, they will blend nicely into the skybox until they fade away.  If you just set your fog color to white and the skybox is not white, you'll end up with white silhouettes of objects, which looks wrong." />
  <row Id="17235" PostHistoryTypeId="2" PostId="8438" RevisionGUID="52817307-1dbc-477c-8acb-54e15417d132" CreationDate="2011-02-11T17:30:49.087" UserId="4662" Text="When specifying the material (ambient/diffuse/specular) for use in lighting calculations, what level of detail is the material specified at? Per vertex, mesh, bone?" />
  <row Id="17236" PostHistoryTypeId="1" PostId="8438" RevisionGUID="52817307-1dbc-477c-8acb-54e15417d132" CreationDate="2011-02-11T17:30:49.087" UserId="4662" Text="Materials when rendering geometry" />
  <row Id="17237" PostHistoryTypeId="3" PostId="8438" RevisionGUID="52817307-1dbc-477c-8acb-54e15417d132" CreationDate="2011-02-11T17:30:49.087" UserId="4662" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="17238" PostHistoryTypeId="2" PostId="8439" RevisionGUID="3ba55e66-f950-44df-8923-4a551a05ec70" CreationDate="2011-02-11T17:48:45.823" UserId="1430" Text="Generally, in a stateful graphics API, a material's settings will apply to *anything* rendered after the material state is set to the API. Whether or not the effect of that material will be per-vertex or per-pixel depends on the actual vertex and fragment shading programs that execute for the rendering of each individual primitive.&#xD;&#xA;&#xD;&#xA;If you're using [the materials built in to fixed function D3D9 pipeline][1], then the resulting object color is [vertex-oriented][2], but the material's impact will be apparent for every object you render until you change the material.&#xD;&#xA;&#xD;&#xA;Writing your own material system can allow you to embed material data into the vertex attributes, if you so choose (either directly into the vertex stream or indirectly via texture lookups) and thus have finer control over the material properties of an object without having to render that object in multiple draw batches just to swap out material data.&#xD;&#xA;&#xD;&#xA;Materials rarely apply to bones in any significant fashion (although that might make for an interested system to write: assigning materials to bones, blending material effects using the vertex weights).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb147175(v=VS.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb174694(v=vs.85).aspx" />
  <row Id="17239" PostHistoryTypeId="2" PostId="8440" RevisionGUID="e18d3572-7ae2-481d-9bd5-97c176ee61f9" CreationDate="2011-02-11T18:33:07.890" UserId="5374" Text="Hi I m student of informatics.And I try to create a game just for fun.I think aboute something like a litle rpg.I have learned OpenGl I know the basics or maybe somethink more...but I do not want to do it from the beginnings so I looking for a game engine, but i m not sure which is the best for me.well the criteries are:&#xD;&#xA;1-not be so complicated&#xD;&#xA;2-can do rpg game&#xD;&#xA;3-3D graphics&#xD;&#xA;&#xD;&#xA;Which is the best?" />
  <row Id="17240" PostHistoryTypeId="1" PostId="8440" RevisionGUID="e18d3572-7ae2-481d-9bd5-97c176ee61f9" CreationDate="2011-02-11T18:33:07.890" UserId="5374" Text="Which is ideal game engine for me?" />
  <row Id="17241" PostHistoryTypeId="3" PostId="8440" RevisionGUID="e18d3572-7ae2-481d-9bd5-97c176ee61f9" CreationDate="2011-02-11T18:33:07.890" UserId="5374" Text="&lt;engine&gt;" />
  <row Id="17242" PostHistoryTypeId="2" PostId="8441" RevisionGUID="c8f171e1-4507-41b8-af83-8d9b403ce00c" CreationDate="2011-02-11T18:40:05.887" UserId="4830" Text="it is absolutely Unity3D, and the basic version is for free.&#xD;&#xA;&#xD;&#xA;http://unity3d.com/&#xD;&#xA;&#xD;&#xA;Good luck" />
  <row Id="17243" PostHistoryTypeId="5" PostId="8440" RevisionGUID="0263ded7-a926-46d2-b0be-09ced52cb92c" CreationDate="2011-02-11T19:02:17.233" UserId="1156" Comment="grammar edits" Text="I am a student of Informatics. I am trying to create a game just for fun. I am thinking about something like a litle rpg. I have learned OpenGL; I know the basics or maybe something more...but I do not want to do it from the beginning so I am looking for a game engine. I'mm not sure which is the best for me. My criteria are:&#xD;&#xA;&#xD;&#xA; 1. Easy to use&#xD;&#xA; 2. Can do rpg&#xD;&#xA;    game &#xD;&#xA; 3. 3D&#xD;&#xA;&#xD;&#xA;Which is the best for me?" />
  <row Id="17244" PostHistoryTypeId="6" PostId="8438" RevisionGUID="60594d37-63a2-4474-9fa1-aa9aba8cc661" CreationDate="2011-02-11T19:03:42.067" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;directx&gt;&lt;rendering&gt;&lt;lighting&gt;" />
  <row Id="17245" PostHistoryTypeId="2" PostId="8442" RevisionGUID="69d9cecb-a2b7-4cf8-9cde-06e55cd7823d" CreationDate="2011-02-11T19:19:24.270" UserId="2132" Text="I am aware that there are opensource drivers for interfacing Kinect with the PC. My question is - the drivers at OpenKinect seems to provide only the images and depth data (from the reading of their wiki and API). It seems that you need to provide your own imaging solution.&#xD;&#xA;&#xD;&#xA;My question is - is there any all-in-one package, with samples/sources that not only grab images from Kinect, but also do the imaging/motion detection for you?" />
  <row Id="17246" PostHistoryTypeId="1" PostId="8442" RevisionGUID="69d9cecb-a2b7-4cf8-9cde-06e55cd7823d" CreationDate="2011-02-11T19:19:24.270" UserId="2132" Text="Which Kinect package for PC takes care of motion tracking too?" />
  <row Id="17247" PostHistoryTypeId="3" PostId="8442" RevisionGUID="69d9cecb-a2b7-4cf8-9cde-06e55cd7823d" CreationDate="2011-02-11T19:19:24.270" UserId="2132" Text="&lt;kinect&gt;" />
  <row Id="17248" PostHistoryTypeId="5" PostId="8440" RevisionGUID="c44647a3-f08d-48ce-83f8-6f214a296f3e" CreationDate="2011-02-11T19:22:20.600" UserId="962" Comment="Fixed formating, removed bloat" Text="I am thinking about making a small RPG. I know some basics of openGL, but I do not want create my own engine. &#xD;&#xA;&#xD;&#xA; My criteria are:&#xD;&#xA;&#xD;&#xA; 1. Ease of use&#xD;&#xA; 2. Can do rpg&#xD;&#xA;    game &#xD;&#xA; 3. 3D&#xD;&#xA;&#xD;&#xA;Which game engine is ideal for a 3D RPG?" />
  <row Id="17249" PostHistoryTypeId="4" PostId="8440" RevisionGUID="c44647a3-f08d-48ce-83f8-6f214a296f3e" CreationDate="2011-02-11T19:22:20.600" UserId="962" Comment="Fixed formating, removed bloat" Text="Which game engine is ideal for a 3D RPG?" />
  <row Id="17250" PostHistoryTypeId="25" PostId="8442" RevisionGUID="1afeef97-9f24-467d-9aba-1d5aaee14c87" CreationDate="2011-02-11T20:22:22.727" Comment="http://twitter.com/#!/StackGameDev/status/36158121789362176" />
  <row Id="17251" PostHistoryTypeId="2" PostId="8443" RevisionGUID="cddb20dd-f67a-482c-8b84-ac7ee2460cd0" CreationDate="2011-02-11T20:56:16.407" UserId="953" Text="I've got a pathfinding boss enemy that seeks the player using the A* algorithm.  It's a pretty complex environment, and I'm doing it in Flash, so the search can get a bit slow when it's searching over long distances.  If the player was stationary, I could just search once, but at the moment I'm searching every frame.  This takes long enough that my framerate is suffering.&#xD;&#xA;&#xD;&#xA;What's the usual solution to this?  Is there a way to &quot;replan&quot; A* without redoing the entire search?  Should I just search a little less often (every half-second or second) and accept that there will be a little inaccuracy in the path?" />
  <row Id="17252" PostHistoryTypeId="1" PostId="8443" RevisionGUID="cddb20dd-f67a-482c-8b84-ac7ee2460cd0" CreationDate="2011-02-11T20:56:16.407" UserId="953" Text="How should I replan A*?" />
  <row Id="17253" PostHistoryTypeId="3" PostId="8443" RevisionGUID="cddb20dd-f67a-482c-8b84-ac7ee2460cd0" CreationDate="2011-02-11T20:56:16.407" UserId="953" Text="&lt;ai&gt;&lt;path-finding&gt;&lt;planning&gt;" />
  <row Id="17254" PostHistoryTypeId="2" PostId="8444" RevisionGUID="892615f6-2cde-468d-8404-c22814a8cdce" CreationDate="2011-02-11T20:58:22.150" UserId="4191" Text="Your case is pretty much what [HPA*][1] was invented to address.  If it seems like overkill, though, I would tend to think that pathfinding every half second or so should work out pretty well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aigamedev.com/open/reviews/near-optimal-hierarchical-pathfinding/" />
  <row Id="17255" PostHistoryTypeId="2" PostId="8445" RevisionGUID="75fbcec7-5d7c-4617-9427-0bb673ca7757" CreationDate="2011-02-11T21:04:21.550" UserId="1198" Text="You could use proximity detection to run the algorithm every few frames if the distance is very great (because in most cases if the distance is large, the target path wont change drastically from frame-to-frame). For example:&#xD;&#xA;&#xD;&#xA;          Distance &gt; 100, run A* every 2 seconds&#xD;&#xA;    100 &gt; Distance &gt;  50, run A* every 1 second&#xD;&#xA;    50  &gt; Distance &gt;  25, run A* every 10 frames&#xD;&#xA;    25  &gt; Distance &lt;  25, run A* every frame&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is assuming that there is a distance where running A* every frame and performance is still acceptable.&#xD;&#xA; " />
  <row Id="17256" PostHistoryTypeId="5" PostId="8445" RevisionGUID="08224d47-1235-452f-8e05-07d73edc6fd7" CreationDate="2011-02-11T21:21:59.957" UserId="1198" Comment="added 252 characters in body" Text="You could use proximity detection to run the algorithm every few frames if the distance is very great (because in most cases if the distance is large, the target path wont change drastically from frame-to-frame). For example:&#xD;&#xA;&#xD;&#xA;          Distance &gt; 100, run A* every 2 seconds&#xD;&#xA;    100 &gt; Distance &gt;  50, run A* every 1 second&#xD;&#xA;    50  &gt; Distance &gt;  25, run A* every 10 frames&#xD;&#xA;    25  &gt; Distance &lt;  25, run A* every frame&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is assuming that there is a distance where running A* every frame and performance is still acceptable. In short, I'd go for your second option. Especially if what you have is working, I'd avoid reimplementing something else if I can just scale back what is working well. The bottom line is that you'll have to try it out to see if it works for your game.&#xD;&#xA; " />
  <row Id="17257" PostHistoryTypeId="5" PostId="8404" RevisionGUID="33e3ee7c-84a5-498d-bc58-704949d87ae5" CreationDate="2011-02-11T21:51:22.980" UserId="160" Comment="edited body; edited body" Text="Instead of using enums or making classes for each kind of object, I think the [type object](http://gameprogrammingpatterns.com/type-object.html) pattern is a friendly solution here. In your example, you don't really show how the enums are being used, so it's hard to show what a corresponding type object implementation would look like, but it would be something like:&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Integer damage) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int getDamage() {&#xD;&#xA;        // Here a subtype can just choose to completely override the&#xD;&#xA;        // damage or inherit it. A more complex system could maybe&#xD;&#xA;        // add them or combine them in some other way.&#xD;&#xA;        if (damage != null) return damage;&#xD;&#xA;    &#xD;&#xA;        return parent.getDamage();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Integer damage;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Item {&#xD;&#xA;      public int getDamage() {&#xD;&#xA;        return type.getDamage();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private final ItemType type;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ItemType swordType = new ItemType(null, 4);&#xD;&#xA;    ItemType shortSwordType = new ItemType(swordType, 3);&#xD;&#xA;    // inherits damage&#xD;&#xA;    ItemType longSwordType = new ItemType(swordType, null);&#xD;&#xA;&#xD;&#xA;    Item sword = new Item(swordType);&#xD;&#xA;&#xD;&#xA;Cool stuff about this:&#xD;&#xA;&#xD;&#xA;1. You only ever need to define two Java classes, `ItemType` and `Item`.&#xD;&#xA;2. You can define how subtypes refine their parent types however you want: they can overide values, or stack them, or whatever. You could even support multiple inheritance of you wanted by giving `ItemType` a list of parent types.&#xD;&#xA;3. Makes it *much* easier to make your item types data-driven. You just create new instances of `ItemType` with different values that you've read from some file.&#xD;&#xA;&#xD;&#xA;In the context of games, this is one of my absolute favorite design patterns and one I wish more people knew about. Every time I see a hard-coded class named `Sword`, I cry a little on the inside.&#xD;&#xA;&#xD;&#xA;You can see a bigger example of this [here](https://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Things/Items/). There's no inheritance in `ItemType` in Amaranth, though, because the [data format](https://bitbucket.org/munificent/bramble/src/5e40302278e4/Bramble.Core/PropertyBag.cs) itself handles that.&#xD;&#xA;&#xD;&#xA;**Edit: Responding to tenpn's comment below.**&#xD;&#xA;&#xD;&#xA;The assumption with the type object pattern is that your different &quot;types&quot; of object will vary mostly in attributes or maybe select from a few different pre-defined behaviors. If each type of item really does behave wholly differently, then it may be a better fit to just use full-on classes.&#xD;&#xA;&#xD;&#xA;But, if the types do pull from a set of well-defined behaviors, or you want to define your behavior in data instead of hard-coding it, type objects can still work. In many cases, behavioral differences can be modeled either using different attributes, or through the strategy pattern.&#xD;&#xA;&#xD;&#xA;Answering your use cases specifically:&#xD;&#xA;&#xD;&#xA;&gt; What if the shortsword only damages orcs&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Integer damage,&#xD;&#xA;          Map&lt;MonsterType, Float&gt; multipliers) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;        this.multipliers = multipliers;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      public int getDamage(MonsterType monster) {&#xD;&#xA;        return getBaseDamage() * getMultiplier(monster);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      protected int getBaseDamage() {&#xD;&#xA;        if (damage != null) return damage;&#xD;&#xA;        return parent.getDamage();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      protected float getMultiplier(MonsterType monsterType) {&#xD;&#xA;        Float multiplier = multipliers.get(monsterType);&#xD;&#xA;        if (multiplier != null) return multiplier;&#xD;&#xA;        if (parent == null) return 1;&#xD;&#xA;        return parent.getMultiplier();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Integer damage;&#xD;&#xA;      private Map&lt;MonsterType, Float&gt; multipliers;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    MonsterType orc = ...&#xD;&#xA;    ItemType shortSword = new ItemType(null, 123,&#xD;&#xA;        Collections.singletonMap(orc, 0);&#xD;&#xA;&#xD;&#xA;Now you've got an extensible way to make certain items have different strength against different monsters, and you can still make it data-driven.&#xD;&#xA;&#xD;&#xA;My roguelike does something similar, though it adds a couple of levels of abstraction. An ItemType may have one or more Powers which modify the item (think &quot;Sword of burning&quot; where &quot;of burning&quot; is the power). A Power can have a set of flags. There are flags like &quot;hurts-orcs&quot; that modify the damage against a Group, and then, finally, a MonsterType can be in one or more Groups. The last allows items to be strong against different overlapping sets of monsters.&#xD;&#xA;&#xD;&#xA;For example an undead dragon is in both the &quot;undead&quot; and &quot;dragon&quot; groups, so a weapon that does extra damage against *either* of those will be effective against the monster.&#xD;&#xA;&#xD;&#xA;&gt; What if the dagger does random damage?&#xD;&#xA;&#xD;&#xA;    interface Dice {&#xD;&#xA;      int roll();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class FixedDice implements Dice {&#xD;&#xA;      public FixedDice(int value) {&#xD;&#xA;        this.value = value;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int roll() { return value; }&#xD;&#xA;  &#xD;&#xA;      private int value;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class RangeDice implements Dice {&#xD;&#xA;      public RangeDice(int min, int max) {&#xD;&#xA;        this.min = min;&#xD;&#xA;        this.max = max;&#xD;&#xA;        this.random = new Random();&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      public int roll() {&#xD;&#xA;        return random.next(max - min) + min;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      private int min;&#xD;&#xA;      private int max;&#xD;&#xA;      private Random random;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class ItemType {&#xD;&#xA;      public ItemType(ItemType parent, Dice damage) {&#xD;&#xA;        this.parent = parent;&#xD;&#xA;        this.damage = damage;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      public int getDamage() {&#xD;&#xA;        if (damage != null) return damage.roll();&#xD;&#xA;        return parent.getDamage().roll();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      private ItemType parent;&#xD;&#xA;      private Dice damage;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ItemType dagger = new ItemType(null, new RangeDice(2, 20));&#xD;&#xA;&#xD;&#xA;This is how my roguelike works now. Most attributes on a type are instances of a [Roller](https://bitbucket.org/munificent/amaranth/src/b6be068243e4/Amaranth.Engine/Classes/Roller.cs) class that can select from a couple of different number generators. These can be specified in the data files like:&#xD;&#xA;&#xD;&#xA;    123  // fixed amount&#xD;&#xA;    2-10 // equally weighted random range&#xD;&#xA;    3d6  // d&amp;d style dice roll&#xD;&#xA;" />
  <row Id="17258" PostHistoryTypeId="2" PostId="8446" RevisionGUID="d871a366-d733-43cf-9231-7ea416efa67a" CreationDate="2011-02-11T21:56:58.200" UserId="1286" Text="In my rhythm game, I have a note object which can be of different colors depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to parametrize this.&#xD;&#xA;(For information, a note sprite is compound with one main color, for example a red note has only red, light red and dark red.)&#xD;&#xA;&#xD;&#xA;So, how to change the colors of a sprite basing on a new color ?&#xD;&#xA;&#xD;&#xA;I'm working with opengl, but any algorithm or math explanation will do. :)&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17259" PostHistoryTypeId="1" PostId="8446" RevisionGUID="d871a366-d733-43cf-9231-7ea416efa67a" CreationDate="2011-02-11T21:56:58.200" UserId="1286" Text="How to change the sprite colors" />
  <row Id="17260" PostHistoryTypeId="3" PostId="8446" RevisionGUID="d871a366-d733-43cf-9231-7ea416efa67a" CreationDate="2011-02-11T21:56:58.200" UserId="1286" Text="&lt;opengl&gt;&lt;sprites&gt;&lt;color&gt;" />
  <row Id="17261" PostHistoryTypeId="2" PostId="8447" RevisionGUID="f1e2c970-a931-4538-8668-bd618a5595b9" CreationDate="2011-02-11T22:18:35.930" UserId="20" Text="I'd probably use a single color image (eg. your note-sprite) with alpha channel and then color the whole image with your base-color. So, something like in the following image ([from wikimedia commons][1]):&#xD;&#xA;&#xD;&#xA;![image of a music-note][2]&#xD;&#xA;&#xD;&#xA;If your color was red, you would then color the note (all the black parts) with the same red. What you would need in addition, is a grayscale image with the shading of the note. Then combine the shading with the flat color by using [blend-modes][3] like *Multiply* and/or *Screen*.&#xD;&#xA;&#xD;&#xA;Another, probably simpler approach would be to just have a grayscale image where you would multiply each color component with your selected color. So if you have a gray value of `0.5`, and a red color `RGB(1.0, 0.0, 0.0)`, that would result in `RGB(0.5, 0.0, 0.0)` for the given pixel.&#xD;&#xA;That's only going to give you recogizable shading with darker colors though... so better go for the blend-modes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://commons.wikimedia.org/wiki/File:1-8_note_quaver_%28music%29.svg&#xD;&#xA;  [2]: http://i.stack.imgur.com/HFRfH.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Blend_modes" />
  <row Id="17262" PostHistoryTypeId="5" PostId="8401" RevisionGUID="1dfa07ba-aa9e-47b8-ae6f-ae56bacc7ac8" CreationDate="2011-02-11T22:27:15.457" UserId="5335" Comment="UC Berkeley link went to Harvard" Text="Don't worry about game stuff, do that on your own. Go to the best school for computers you can get into/afford. &#xD;&#xA;&#xD;&#xA;[The University of Waterloo](http://uwaterloo.ca/) in Canada is very good, and Microsoft recruits directly from there.&#xD;&#xA;&#xD;&#xA;[Carnegie Mellon](http://www.cmu.edu/index.shtml) is very good for AI and robotics computing.&#xD;&#xA;&#xD;&#xA;[MIT](http://www.mit.edu/) is awesome, as is [Caltech](http://www.cs.caltech.edu/)&#xD;&#xA;&#xD;&#xA;[University of California, Berkeley](http://www.berkeley.edu/), invented much of the internet. &#xD;&#xA;&#xD;&#xA;Larry Page and Bill Joy both went to [University of Michigan](http://www.umich.edu/)&#xD;&#xA;&#xD;&#xA;Let's not forget that Gates and Zuckerberg both went to, and dropped out of [Harvard](http://www.harvard.edu/).&#xD;&#xA;&#xD;&#xA;And Brin and Page started their PhDs at [Stanford](http://www.stanford.edu/). " />
  <row Id="17263" PostHistoryTypeId="24" PostId="8401" RevisionGUID="9c55cd00-1a60-48fb-8a2e-8a4b3ca53506" CreationDate="2011-02-11T22:27:15.457" Comment="Proposed by 5335 approved by 51 edit id of 26" />
  <row Id="17264" PostHistoryTypeId="5" PostId="8445" RevisionGUID="4b08f894-82b6-4a9e-ac6c-caa0f3fcf8b8" CreationDate="2011-02-11T22:29:46.733" UserId="1198" Comment="grammar" Text="You could use proximity detection to run the algorithm every few frames if the distance is very great (because in most cases if the distance is large, the target path wont change drastically from frame-to-frame). For example:&#xD;&#xA;&#xD;&#xA;          Distance &gt; 100, run A* every 2 seconds&#xD;&#xA;    100 &gt; Distance &gt;  50, run A* every 1 second&#xD;&#xA;    50  &gt; Distance &gt;  25, run A* every 10 frames&#xD;&#xA;    25  &gt; Distance &lt;  25, run A* every frame&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is assuming that there is a distance where running A* every frame has performance that is still acceptable. In short, I'd go for your second option. Especially if what you have is working, I'd avoid reimplementing something else if I can just scale back what is working well. The bottom line is that you'll have to try it out to see if it works for your game.&#xD;&#xA; " />
  <row Id="17265" PostHistoryTypeId="5" PostId="8447" RevisionGUID="5162577a-58c6-46ce-835a-937173939898" CreationDate="2011-02-11T22:42:09.920" UserId="20" Comment="added image to illustrate what I mean; added 2 characters in body" Text="I'd probably use a single color image (eg. your note-sprite) with alpha channel and then color the whole image with your base-color. So, something like in the following image ([from wikimedia commons][1]):&#xD;&#xA;&#xD;&#xA;![image of a music-note][2]&#xD;&#xA;&#xD;&#xA;If your color was red, you would then color the note (all the black parts) with the same red. What you would need in addition, is a grayscale image with the shading of the note. Then combine the shading with the flat color by using [blend-modes][3] like *Multiply* and/or *Screen*.&#xD;&#xA;&#xD;&#xA;Another, probably simpler approach would be to just have a grayscale image where you would multiply each color component with your selected color. So if you have a gray value of `0.5`, and a red color `RGB(1.0, 0.0, 0.0)`, that would result in `RGB(0.5, 0.0, 0.0)` for the given pixel.&#xD;&#xA;That's only going to give you recogizable shading with darker colors though... so better go for the blend-modes.&#xD;&#xA;&#xD;&#xA;**Update:** Here's an example image to illustrate what I mean with the blend-modes:&#xD;&#xA;&#xD;&#xA;![blending layers][4]&#xD;&#xA;&#xD;&#xA;Of course you could just use the *shadow* layer if you don't need the highlights..&#xD;&#xA;&#xD;&#xA;  [1]: http://commons.wikimedia.org/wiki/File:1-8_note_quaver_%28music%29.svg&#xD;&#xA;  [2]: http://i.stack.imgur.com/HFRfH.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Blend_modes&#xD;&#xA;  [4]: http://i.stack.imgur.com/IQSqT.png" />
  <row Id="17266" PostHistoryTypeId="2" PostId="8448" RevisionGUID="1911b800-9f36-46c5-9e49-f0d7594b948a" CreationDate="2011-02-11T22:53:34.657" UserId="4082" Text="Not really answering your exact question, but... if you're willing to &quot;cheat&quot;, you can make the player leave &quot;breadcrumbs&quot; and have the boss follow them. If the breadcrumbs path crosses itself, follow the most recent one (this makes the boss avoid loops and other paths that may be too long, not to mention not following the exact path of the player)&#xD;&#xA;&#xD;&#xA;This would work fine if the boss is some kind of animal with a good sense of smell. This would work a lot like following the scent of the player :)" />
  <row Id="17267" PostHistoryTypeId="2" PostId="8449" RevisionGUID="8d12ed23-c3b7-4e78-88c8-ad002a6a98f5" CreationDate="2011-02-11T22:55:50.820" UserId="4082" Text="Make a greyscale (or just white) version of the image you want to show, with a suitable alpha channel. Use the vertex color to &quot;dye&quot; the image.&#xD;&#xA;&#xD;&#xA;Vertex color multiplies each channel, so white x red = red, 50% grey x red = 50% red, and so on." />
  <row Id="17268" PostHistoryTypeId="2" PostId="8450" RevisionGUID="88d9c909-6de0-460f-91c2-4ae6d3252ab2" CreationDate="2011-02-11T22:56:54.227" UserId="2819" Text="I am interested in plot writing for games, and wondered first of all:&#xD;&#xA;&#xD;&#xA;Is this available as an entry-level position, or is it accessed through other avenues (even external to games development)&#xD;&#xA;&#xD;&#xA;And secondly, what are the daily tasks of a games writer, both at the entry level and at a higher level?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="17269" PostHistoryTypeId="1" PostId="8450" RevisionGUID="88d9c909-6de0-460f-91c2-4ae6d3252ab2" CreationDate="2011-02-11T22:56:54.227" UserId="2819" Text="What are the typical day-to-day tasks of a games writer?" />
  <row Id="17270" PostHistoryTypeId="3" PostId="8450" RevisionGUID="88d9c909-6de0-460f-91c2-4ae6d3252ab2" CreationDate="2011-02-11T22:56:54.227" UserId="2819" Text="&lt;game-industry&gt;" />
  <row Id="17271" PostHistoryTypeId="2" PostId="8451" RevisionGUID="6cc8e6a5-2044-4f93-a822-edd6b093c56c" CreationDate="2011-02-11T23:33:19.733" UserId="5383" Text="1. From what I've seen, IF you're already published in other media (e.g. novels), AND you have a personal connection to a game company (e.g. you're good friends with the executive producer), AND the game company is relatively small and unknown, you have a good chance of getting hired with no prior experience in the games industry. Otherwise, it's probably pretty difficult.&#xD;&#xA;&#xD;&#xA;2. Most game writers would spend the bulk of their time writing whatever needs to be written, whether it's NPC dialogue, backstory, etc. Whatever story you write will need to be tailored for the game, and you'd be working under the direction of the lead designer, design director, producer, or other such person." />
  <row Id="17272" PostHistoryTypeId="5" PostId="8447" RevisionGUID="fe2779e1-5e97-4bc5-a01b-887a1cc581ee" CreationDate="2011-02-11T23:56:34.113" UserId="20" Comment="removed misleading statement; added 69 characters in body" Text="I'd probably use a single color image (eg. your note-sprite) with alpha channel and then color the whole image with your base-color. So, something like in the following image ([from wikimedia commons][1]):&#xD;&#xA;&#xD;&#xA;![image of a music-note][2]&#xD;&#xA;&#xD;&#xA;If your color was red, you would then color the note (all the black parts) with the same red. What you would need in addition, is a grayscale image with the shading of the note. Then combine the shading with the flat color by using [blend-modes][3] like *Multiply* and/or *Screen*.&#xD;&#xA;&#xD;&#xA;Another, probably simpler approach would be to just have a grayscale image where you would multiply each color component with your selected color. So if you have a gray value of `0.5`, and a red color `RGB(1.0, 0.0, 0.0)`, that would result in `RGB(0.5, 0.0, 0.0)` for the given pixel.&#xD;&#xA;&#xD;&#xA;**Update:** Here's an example image to illustrate what I mean with the blend-modes:&#xD;&#xA;&#xD;&#xA;![blending layers][4]&#xD;&#xA;&#xD;&#xA;Of course you could just use the *shadow* layer if you don't need the highlights (which is basically the same as the simpler approach mentioned above).&#xD;&#xA;&#xD;&#xA;  [1]: http://commons.wikimedia.org/wiki/File:1-8_note_quaver_%28music%29.svg&#xD;&#xA;  [2]: http://i.stack.imgur.com/HFRfH.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Blend_modes&#xD;&#xA;  [4]: http://i.stack.imgur.com/IQSqT.png" />
  <row Id="17273" PostHistoryTypeId="5" PostId="8191" RevisionGUID="7aa1366b-6064-4639-9175-feb218f1f356" CreationDate="2011-02-12T02:02:39.090" UserId="2862" Comment="added 358 characters in body" Text="Do you have any reliable 3d polygonal face normal calculation code?&#xD;&#xA;&#xD;&#xA;Any language will do, I'll port it to make it work. Even if you find some code in a 3d game engine and post it here I'll be more than grateful.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I'm using this but it fails when faces are 90 degrees upright or similar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			// the normal point&#xD;&#xA;			var x:Number = 0;&#xD;&#xA;			var y:Number = 0;&#xD;&#xA;			var z:Number = 0;&#xD;&#xA;			&#xD;&#xA;			// if is a triangle with 3 points&#xD;&#xA;			if (points.length == 3) {&#xD;&#xA;				&#xD;&#xA;				// read vertices of triangle&#xD;&#xA;				var Ax:Number, Bx:Number, Cx:Number;&#xD;&#xA;				var Ay:Number, By:Number, Cy:Number;&#xD;&#xA;				var Az:Number, Bz:Number, Cz:Number;&#xD;&#xA;				Ax = points[0].x;	Bx = points[1].x;	Cx = points[2].x;&#xD;&#xA;				Ay = points[0].y;	By = points[1].y;	Cy = points[2].y;&#xD;&#xA;				Az = points[0].z;	Bz = points[1].z;	Cz = points[2].z;&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a triangle&#xD;&#xA;				x = (By - Ay) * (Cz - Az) - (Bz - Az) * (Cy - Ay);&#xD;&#xA;				y = (Bz - Az) * (Cx - Ax) - (Bx - Ax) * (Cz - Az);&#xD;&#xA;				z = (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax);&#xD;&#xA;				&#xD;&#xA;			// if is a polygon with 4+ points&#xD;&#xA;			}else if (points.length &gt; 3){&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a polygon using all points&#xD;&#xA;				var n:int = points.length;			&#xD;&#xA;				x = 0;&#xD;&#xA;				y = 0;&#xD;&#xA;				z = 0&#xD;&#xA;				&#xD;&#xA;				// ensure all points above 0&#xD;&#xA;				var minx:Number = 0, miny:Number = 0, minz:Number = 0;&#xD;&#xA;				for (var p:int = 0, pl:int = points.length; p &lt; pl; p++) {&#xD;&#xA;					var po:_Point3D = points[p] = points[p].clone();&#xD;&#xA;					if (po.x &lt; minx) {	minx = po.x;	 }&#xD;&#xA;					if (po.y &lt; miny) {	miny = po.y;	 }&#xD;&#xA;					if (po.z &lt; minz) {	minz = po.z;	 }&#xD;&#xA;				}&#xD;&#xA;				if (minx &gt; 0 || miny &gt; 0 || minz &gt; 0){&#xD;&#xA;					for (p = 0; p &lt; pl; p++) {&#xD;&#xA;						po = points[p];&#xD;&#xA;						po.x -= minx;&#xD;&#xA;						po.y -= miny;&#xD;&#xA;						po.z -= minz;&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;				&#xD;&#xA;				var cur:int = 1, prev:int = 0, next:int = 2;&#xD;&#xA;				for (var i:int = 1; i &lt;= n; i++) {&#xD;&#xA;					&#xD;&#xA;					// using Newell method&#xD;&#xA;					x += points[cur].y * (points[next].z - points[prev].z);&#xD;&#xA;					y += points[cur].z * (points[next].x - points[prev].x);&#xD;&#xA;					z += points[cur].x * (points[next].y - points[prev].y);&#xD;&#xA;					cur = (cur+1) % n;&#xD;&#xA;					next = (next+1) % n;&#xD;&#xA;					prev = (prev+1) % n;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			// length of the normal&#xD;&#xA;			var length:Number = Math.sqrt(x * x + y * y + z * z);&#xD;&#xA;			&#xD;&#xA;			// if area is 0&#xD;&#xA;			if (length == 0) {&#xD;&#xA;				return null;&#xD;&#xA;				&#xD;&#xA;			}else{&#xD;&#xA;				// turn large values into a unit vector&#xD;&#xA;				x = x / length;&#xD;&#xA;				y = y / length;&#xD;&#xA;				z = z / length;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I can somehow display 3d arrows for each calculated normal and go so far as to document test cases where it worked and failed. But I was looking for a simpler solution, simply by using code that someone else has created and found to be working. Is OpenGL all you have? Doesn't anyone have any triangle/polygonal normal calculation code at all?" />
  <row Id="17274" PostHistoryTypeId="25" PostId="8450" RevisionGUID="29262f26-b138-436e-87c4-075dff57cdfe" CreationDate="2011-02-12T02:22:22.660" Comment="http://twitter.com/#!/StackGameDev/status/36248718474743808" />
  <row Id="17275" PostHistoryTypeId="2" PostId="8452" RevisionGUID="bacfab0e-b95c-42df-93c9-ad1ecfb5c75f" CreationDate="2011-02-12T02:23:50.490" UserId="1430" Text="I work at one of the relatively few studios that retain a full-time writing team. I also work very closely with the writers in my role as a tools developer. We have around seven (I think) full-time writers, including their lead, and two writer/designers who act as lore directors and generally are the final authority on the direction of the world.&#xD;&#xA;&#xD;&#xA;For the most part, the writing team authors new text or edits existing produced by other designers. The kind of content they generate tends towards the minor characters, dialog scenes and conversation, bits of chatter and background VO, quest description, descriptions for areas -- basically, anything that needs to be written. They also work with those designers to help ensure that all the text that is produced fits within the framework of the universe we are creating -- that nobody uses anachronisms, that characters of a particular cultural background exhibit the traits of that background, that the game is not too chock-full of pop culture references, et cetera.&#xD;&#xA;&#xD;&#xA;Our writers also work with external partners, such as the authors of books based in our world, to ensure accuracy and adherence to what is canon. Most studios maintain a &quot;story bible&quot; of some sort that documents these sorts of things, and maintains guidelines for what is and is not canon (ours are not public, but [Bungie has published this guide to what is considered canon in Halo][1], for example)&#xD;&#xA;&#xD;&#xA;If you have a strong background in literature, writing, or related fields you may be able to break in to the industry provided you can find a company that employs a team of full-time writers. This may be difficult. I would caution you that is far more about editing and creating in-the-small than it is sitting around and getting to dictate the entire plot of a game.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bungie.net/Forums/posts.aspx?postID=33630397" />
  <row Id="17276" PostHistoryTypeId="2" PostId="8453" RevisionGUID="e617fad3-e542-452a-8249-feba5f8eecb5" CreationDate="2011-02-12T03:05:05.010" UserId="5007" Text="I wonder what are the best ways to organize different screens in a game?&#xD;&#xA;&#xD;&#xA;I am thinking of it like this:&#xD;&#xA;&#xD;&#xA;Inheriting a base State class, and overriding update and render methods, to handle the current screen.&#xD;&#xA;Then, under certain events a StateManager is able to activate another Screen State, and the game screen changes as only the current State is rendered.&#xD;&#xA;&#xD;&#xA;On the activation of a new screen, effects like fading could be added, and also the same goes for its deactivation. This way a flow of screen could be made. By saying when A ends, B starts, allowing for complex animations etc.&#xD;&#xA;&#xD;&#xA;Toughts?" />
  <row Id="17277" PostHistoryTypeId="1" PostId="8453" RevisionGUID="e617fad3-e542-452a-8249-feba5f8eecb5" CreationDate="2011-02-12T03:05:05.010" UserId="5007" Text="Good practices in screen states management?" />
  <row Id="17278" PostHistoryTypeId="3" PostId="8453" RevisionGUID="e617fad3-e542-452a-8249-feba5f8eecb5" CreationDate="2011-02-12T03:05:05.010" UserId="5007" Text="&lt;rendering&gt;&lt;animation&gt;&lt;state&gt;&lt;screen&gt;" />
  <row Id="17279" PostHistoryTypeId="2" PostId="8454" RevisionGUID="52b198ad-b34c-4ae0-a757-75333d0491bf" CreationDate="2011-02-12T03:35:47.497" UserId="3547" Text="I would also consider allowing a stack of states. That way when the state on top leaves, the state under activates. this is really nice for menu states. When one menu leads to another, it simply puts the next state on top. If the user wants to go back, you simply deactivate the current state and the previous state activates. Very easy for menu navigation.&#xD;&#xA;&#xD;&#xA;Also, I would advise implementing some way to have states on top of other states while the states below the top one still draw. This could be useful for pause states, but it's up to you in the end.&#xD;&#xA;&#xD;&#xA;Also take a look at this sample: [XNA Game State Management Sample][1]&#xD;&#xA;I know it's in C#, but it's a pretty decent implementation of the concept.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="17280" PostHistoryTypeId="25" PostId="8453" RevisionGUID="c0e5e6a6-5ce3-41f0-b332-ec205a1da835" CreationDate="2011-02-12T05:22:22.520" Comment="http://twitter.com/#!/StackGameDev/status/36294016282656768" />
  <row Id="17281" PostHistoryTypeId="2" PostId="8455" RevisionGUID="2e9739e7-45b0-41ca-8683-bea61c4ee575" CreationDate="2011-02-12T06:59:41.180" UserId="5390" Text="We're using [OOLua][1] for [Pioneer][2]. It gives a pile of macros that you use to bind Lua &quot;classes&quot; to C++ classes. Its got a fair bit of power but is pretty straightforward. I haven't used any others so I can't comment on how it compares. Here's an [example][3].&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/oolua/&#xD;&#xA;  [2]: http://pioneerspacesim.net/&#xD;&#xA;  [3]: https://github.com/tomm/pioneer/blob/aafdcbd/src/StarSystem.h#L75" />
  <row Id="17282" PostHistoryTypeId="2" PostId="8456" RevisionGUID="b85c5d40-2821-439f-b37b-2e552d7d9916" CreationDate="2011-02-12T07:09:17.593" UserId="4210" Text="You don't have to search the entire path in one frame, I have done this by giving a limit on the search loop, the AI will then start to follow the little information it has, and the next frame I'll search some more, it might take 3 frames until the path is found. It can look quite convincing to, as it looks like the AI is actually searching." />
  <row Id="17283" PostHistoryTypeId="2" PostId="8457" RevisionGUID="6aad9157-03bc-4ec4-988f-36392d13bff3" CreationDate="2011-02-12T07:48:01.570" UserId="5223" Text="I need some help with the SpriteFont. I want a different font for my game, other than Kootenay. So, I edit the SpriteFont xml, i.e:&#xD;&#xA;&#xD;&#xA;    &lt;FontName&gt;Kootenay&lt;/FontName&gt;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;    &lt;FontName&gt;Arial&lt;/FontName&gt;&#xD;&#xA;&#xD;&#xA;No problem with Windows fonts, or other XNA redistributable fonts pack. However, I want to use other fonts, that I downloaded and installed already, they are TTF or OTF, both supported by XNA.&#xD;&#xA;My problem is, I cant use them, I got this error:&#xD;&#xA;&#xD;&#xA;    The font family &quot;all the fonts i tried&quot; could not be found. Please ensure the requested font is installed, and is a TrueType or OpenType font. &#xD;&#xA;&#xD;&#xA;So, checking at the windows fonts folder, I check the properties and details of the fonts, I try all the names they have, and but never works. Maybe I need some kind of importing or installing in order to use them, I dont know, and I hope you guys can help me, thanks!" />
  <row Id="17284" PostHistoryTypeId="1" PostId="8457" RevisionGUID="6aad9157-03bc-4ec4-988f-36392d13bff3" CreationDate="2011-02-12T07:48:01.570" UserId="5223" Text="XNA: SpriteFont question" />
  <row Id="17285" PostHistoryTypeId="3" PostId="8457" RevisionGUID="6aad9157-03bc-4ec4-988f-36392d13bff3" CreationDate="2011-02-12T07:48:01.570" UserId="5223" Text="&lt;xna&gt;&lt;c#&gt;&lt;fonts&gt;" />
  <row Id="17286" PostHistoryTypeId="5" PostId="8191" RevisionGUID="aa94f35b-d375-4392-a155-0bf08f570c27" CreationDate="2011-02-12T08:13:40.337" UserId="2862" Comment="added 590 characters in body" Text="Do you have any reliable 3d polygonal face normal calculation code?&#xD;&#xA;&#xD;&#xA;Any language will do, I'll port it to make it work. Even if you find some code in a 3d game engine and post it here I'll be more than grateful.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I'm using this but it fails when faces are 90 degrees upright or similar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			// the normal point&#xD;&#xA;			var x:Number = 0;&#xD;&#xA;			var y:Number = 0;&#xD;&#xA;			var z:Number = 0;&#xD;&#xA;			&#xD;&#xA;			// if is a triangle with 3 points&#xD;&#xA;			if (points.length == 3) {&#xD;&#xA;				&#xD;&#xA;				// read vertices of triangle&#xD;&#xA;				var Ax:Number, Bx:Number, Cx:Number;&#xD;&#xA;				var Ay:Number, By:Number, Cy:Number;&#xD;&#xA;				var Az:Number, Bz:Number, Cz:Number;&#xD;&#xA;				Ax = points[0].x;	Bx = points[1].x;	Cx = points[2].x;&#xD;&#xA;				Ay = points[0].y;	By = points[1].y;	Cy = points[2].y;&#xD;&#xA;				Az = points[0].z;	Bz = points[1].z;	Cz = points[2].z;&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a triangle&#xD;&#xA;				x = (By - Ay) * (Cz - Az) - (Bz - Az) * (Cy - Ay);&#xD;&#xA;				y = (Bz - Az) * (Cx - Ax) - (Bx - Ax) * (Cz - Az);&#xD;&#xA;				z = (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax);&#xD;&#xA;				&#xD;&#xA;			// if is a polygon with 4+ points&#xD;&#xA;			}else if (points.length &gt; 3){&#xD;&#xA;				&#xD;&#xA;				// calculate normal of a polygon using all points&#xD;&#xA;				var n:int = points.length;			&#xD;&#xA;				x = 0;&#xD;&#xA;				y = 0;&#xD;&#xA;				z = 0&#xD;&#xA;				&#xD;&#xA;				// ensure all points above 0&#xD;&#xA;				var minx:Number = 0, miny:Number = 0, minz:Number = 0;&#xD;&#xA;				for (var p:int = 0, pl:int = points.length; p &lt; pl; p++) {&#xD;&#xA;					var po:_Point3D = points[p] = points[p].clone();&#xD;&#xA;					if (po.x &lt; minx) {	minx = po.x;	 }&#xD;&#xA;					if (po.y &lt; miny) {	miny = po.y;	 }&#xD;&#xA;					if (po.z &lt; minz) {	minz = po.z;	 }&#xD;&#xA;				}&#xD;&#xA;				if (minx &gt; 0 || miny &gt; 0 || minz &gt; 0){&#xD;&#xA;					for (p = 0; p &lt; pl; p++) {&#xD;&#xA;						po = points[p];&#xD;&#xA;						po.x -= minx;&#xD;&#xA;						po.y -= miny;&#xD;&#xA;						po.z -= minz;&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;				&#xD;&#xA;				var cur:int = 1, prev:int = 0, next:int = 2;&#xD;&#xA;				for (var i:int = 1; i &lt;= n; i++) {&#xD;&#xA;					&#xD;&#xA;					// using Newell method&#xD;&#xA;					x += points[cur].y * (points[next].z - points[prev].z);&#xD;&#xA;					y += points[cur].z * (points[next].x - points[prev].x);&#xD;&#xA;					z += points[cur].x * (points[next].y - points[prev].y);&#xD;&#xA;					cur = (cur+1) % n;&#xD;&#xA;					next = (next+1) % n;&#xD;&#xA;					prev = (prev+1) % n;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			// length of the normal&#xD;&#xA;			var length:Number = Math.sqrt(x * x + y * y + z * z);&#xD;&#xA;			&#xD;&#xA;			// if area is 0&#xD;&#xA;			if (length == 0) {&#xD;&#xA;				return null;&#xD;&#xA;				&#xD;&#xA;			}else{&#xD;&#xA;				// turn large values into a unit vector&#xD;&#xA;				x = x / length;&#xD;&#xA;				y = y / length;&#xD;&#xA;				z = z / length;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I can somehow display 3d arrows for each calculated normal and go so far as to document test cases where it worked and failed. But I was looking for a simpler solution, simply by using code that someone else has created and found to be working. Is OpenGL all you have? Doesn't anyone have any triangle/polygonal normal calculation code at all?&#xD;&#xA;&#xD;&#xA;**To Jari:**&#xD;&#xA;&#xD;&#xA;I'm using this code to calculate normals, as built from OpenGL's pseudo code. Is there something I've done wrong? and what would happen if the points are not perfectly inplane? would it fail and return a random normal or just change the normal slightly?&#xD;&#xA;&#xD;&#xA;				n = points.length;&#xD;&#xA;				x = y = z = 0;&#xD;&#xA;				for (i = 0; i &lt; n; i++) {&#xD;&#xA;					j = (i + 1) % n;&#xD;&#xA;					x += (points[i].y - points[j].y) * (points[i].z + points[j].z);&#xD;&#xA;					y += (points[i].z - points[j].z) * (points[i].x + points[j].x);&#xD;&#xA;					z += (points[i].x - points[j].x) * (points[i].y + points[j].y);&#xD;&#xA;				}" />
  <row Id="17287" PostHistoryTypeId="25" PostId="8443" RevisionGUID="d0fb5c76-dab4-4e7f-ad6f-9a2be5371aae" CreationDate="2011-02-12T08:22:22.770" Comment="http://twitter.com/#!/StackGameDev/status/36339315030245376" />
  <row Id="17288" PostHistoryTypeId="2" PostId="8458" RevisionGUID="971d8808-60eb-4a71-9ace-9b585ebe7bb8" CreationDate="2011-02-12T10:54:01.223" UserId="5020" Text="If it's a static environment then you can precalculate all-pairs shortest path." />
  <row Id="17289" PostHistoryTypeId="2" PostId="8459" RevisionGUID="a9288996-0b88-4984-a95a-362fa076cf6a" CreationDate="2011-02-12T10:59:16.363" UserId="4947" Text="If you see your font in fonts directory, just try to restart Visual Studio or whole system. It should help. &#xD;&#xA;&#xD;&#xA;I tried it - I installed new font, add it into running MSVS project, then compile and get the same error as you. When I restarted MSVS and compile again, it worked." />
  <row Id="17290" PostHistoryTypeId="25" PostId="8457" RevisionGUID="8b46d861-1cd3-44e3-897d-5f24c3582eec" CreationDate="2011-02-12T11:22:22.663" Comment="http://twitter.com/#!/StackGameDev/status/36384613811228672" />
  <row Id="17291" PostHistoryTypeId="2" PostId="8460" RevisionGUID="46a3c42a-d686-4fbe-91e6-b64af0cf82da" CreationDate="2011-02-12T12:54:57.263" UserId="5397" Text="It all depends on the language you want to use.  [Py-Game or Blender's game engine][1] are easy to use, in python (so easy) and open source.  If you're going to make a game that requires a *real* engine though, PeterK is completely correct in saying that unity is by far the best (publicly available) engine on the market.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/education-help/tutorials/game-engine/" />
  <row Id="17292" PostHistoryTypeId="2" PostId="8461" RevisionGUID="1fedfca4-4ce9-4c0a-83b0-a77b2f607d08" CreationDate="2011-02-12T13:02:46.807" UserId="5399" Text="I was wondering about the term 'photorealistic' in regards to rendering and was wondering how this is used.&#xD;&#xA;&#xD;&#xA;Is it used to describe a shader (or set of) that have certain quantifiable features? Or any rendering thats not meant to be abstract, like the cartoon effect seen in Borderlands? Or is it just a subjective term meaning 'really really realistic'?" />
  <row Id="17293" PostHistoryTypeId="1" PostId="8461" RevisionGUID="1fedfca4-4ce9-4c0a-83b0-a77b2f607d08" CreationDate="2011-02-12T13:02:46.807" UserId="5399" Text="What does the term 'photorealistic' really mean?" />
  <row Id="17294" PostHistoryTypeId="3" PostId="8461" RevisionGUID="1fedfca4-4ce9-4c0a-83b0-a77b2f607d08" CreationDate="2011-02-12T13:02:46.807" UserId="5399" Text="&lt;graphics&gt;&lt;rendering&gt;&lt;shaders&gt;&lt;terminology&gt;" />
  <row Id="17295" PostHistoryTypeId="6" PostId="8440" RevisionGUID="a2557ecb-096c-489f-ad42-7751497b7b49" CreationDate="2011-02-12T13:48:42.060" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;engine&gt;&lt;rpg&gt;" />
  <row Id="17296" PostHistoryTypeId="2" PostId="8462" RevisionGUID="16398859-1d9e-48de-8f0f-17c0a9976653" CreationDate="2011-02-12T13:53:44.313" UserId="4410" Text="I've worked on a few games that have been described as photorealistic and I'd have to say it's purely subjective, especially as what we might describe as photorealistic today won't in a few years (as hardware improves, rendering gets closed to perfection and people's expectations of games goes up).&#xD;&#xA;&#xD;&#xA;You can apply the term to anything that is rendered, I would take it to mean that what your describing looks as real as you can make it (be that the shading, textures, lighting, etc). In an ideal world, a screenshot would look just like a photo taken on a camera." />
  <row Id="17297" PostHistoryTypeId="2" PostId="8463" RevisionGUID="95ccd9ef-08e7-448e-a3de-0cc788dce743" CreationDate="2011-02-12T14:18:29.640" UserId="5224" Text="Try putting the font file in the same directory as your spritefont file." />
  <row Id="17298" PostHistoryTypeId="25" PostId="8461" RevisionGUID="163c2d0d-13dc-40d8-a6f5-042efaa8f61a" CreationDate="2011-02-12T14:22:22.523" Comment="http://twitter.com/#!/StackGameDev/status/36429911887450112" />
  <row Id="17299" PostHistoryTypeId="2" PostId="8464" RevisionGUID="53e8363f-77a2-4528-92d4-c33c2c8519f6" CreationDate="2011-02-12T14:25:53.880" UserId="3689" Text="&#xD;&#xA;Hello all Where can I find architectures and examples of building massive multiplayer game server Does the does the concept of building it on top of libenevt is right ? or I need to think more on thread per connection ? im targeting to web players playing from flash / html5 clients . Thanks&#xD;&#xA;" />
  <row Id="17300" PostHistoryTypeId="1" PostId="8464" RevisionGUID="53e8363f-77a2-4528-92d4-c33c2c8519f6" CreationDate="2011-02-12T14:25:53.880" UserId="3689" Text="Looking for architectures to develop massive multiplayer game server" />
  <row Id="17301" PostHistoryTypeId="3" PostId="8464" RevisionGUID="53e8363f-77a2-4528-92d4-c33c2c8519f6" CreationDate="2011-02-12T14:25:53.880" UserId="3689" Text="&lt;client-server&gt;&lt;game&gt;" />
  <row Id="17302" PostHistoryTypeId="5" PostId="8464" RevisionGUID="e5d2a161-283c-4fc2-84e0-832c7bdabb89" CreationDate="2011-02-12T14:28:16.957" UserId="1156" Comment="deleted 2 characters in body; edited tags; edited tags" Text="Hello all Where can I find architectures and examples of building massive multiplayer game server Does the does the concept of building it on top of libenevt is right ? or I need to think more on thread per connection ? im targeting to web players playing from flash / html5 clients . Thanks&#xD;&#xA;" />
  <row Id="17303" PostHistoryTypeId="6" PostId="8464" RevisionGUID="e5d2a161-283c-4fc2-84e0-832c7bdabb89" CreationDate="2011-02-12T14:28:16.957" UserId="1156" Comment="deleted 2 characters in body; edited tags; edited tags" Text="&lt;architecture&gt;&lt;mmo&gt;&lt;client-server&gt;" />
  <row Id="17304" PostHistoryTypeId="2" PostId="8465" RevisionGUID="29b2bbdf-d3a8-49f8-9908-f5f50eced827" CreationDate="2011-02-12T15:15:05.990" UserDisplayName="user2035" Text="Unless you absolutely want (or need) to use A*, you could also take a look into [Steering Behaviours][1]. As there is no complete path planning per frame involved, it should be a lot lighter on the processing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="17305" PostHistoryTypeId="2" PostId="8466" RevisionGUID="815a54f5-939f-4164-90e7-8e0593832bdf" CreationDate="2011-02-12T16:03:18.363" UserId="953" Text="When I've seen the term &quot;photorealistic&quot; used, it's shorthand for &quot;trying to be photorealistic.&quot;  That is, aiming for the rendered picture to look as real as possible, and using as much real physics with regard to lighting that the machine can handle.&#xD;&#xA;&#xD;&#xA;Most rendering is photorealistic, or trying to be.  If you make a conscious choice toward the stylized, as in Borderlands, you're no longer photorealistic." />
  <row Id="17306" PostHistoryTypeId="2" PostId="8467" RevisionGUID="253bc359-7cf9-4ad9-90e3-4a442807b73b" CreationDate="2011-02-12T16:04:59.907" UserId="5403" Text="If you are thinking about a real time MMO and not a social MMO, it would definitely be worth taking a look at [MV3D][1] which is open source. It is mainly geared towards having a less lightweight client than flash, but I'm currently using it to make a browser based game and it's going well.&#xD;&#xA;&#xD;&#xA;For a social MMO, I'd suggest building the server on the web framework of your choice rather than making your own server application. You can architect and scale your server similar to how large websites do it. There are plenty of online resources for doing that.&#xD;&#xA;&#xD;&#xA;For either way, a great place to look is highscalability.com. In particular, here's some info on [Playfish's architecture][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mv3d.com/ &quot;MV3D&quot;&#xD;&#xA;  [2]: http://highscalability.com/blog/2010/9/21/playfishs-social-gaming-architecture-50-million-monthly-user.html" />
  <row Id="17307" PostHistoryTypeId="2" PostId="8468" RevisionGUID="2ed4f271-0aba-494e-92b0-39fef8e3c2db" CreationDate="2011-02-12T16:26:10.760" UserId="1693" Text="I'm working on a perfect information game in my spare time. I've implemented a naive [minmax][1] algorithm for the computer player. I've further optimized it using [alpha-beta pruning][2].&#xD;&#xA;&#xD;&#xA;What I'm looking for is next logical steps to improve the speed of the search (currently the computer player searches 5 nodes deep with acceptable time taken).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Minimax&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Alpha-beta_pruning" />
  <row Id="17308" PostHistoryTypeId="1" PostId="8468" RevisionGUID="2ed4f271-0aba-494e-92b0-39fef8e3c2db" CreationDate="2011-02-12T16:26:10.760" UserId="1693" Text="Naive minmax optimizations" />
  <row Id="17309" PostHistoryTypeId="3" PostId="8468" RevisionGUID="2ed4f271-0aba-494e-92b0-39fef8e3c2db" CreationDate="2011-02-12T16:26:10.760" UserId="1693" Text="&lt;ai&gt;&lt;optimization&gt;" />
  <row Id="17310" PostHistoryTypeId="2" PostId="8469" RevisionGUID="1157756a-8930-4c4e-bec0-a5fcca6f190d" CreationDate="2011-02-12T17:01:50.547" UserId="5404" Text="I'm working on a J2ME game and I want to have walking animations. &#xD;&#xA;&#xD;&#xA;Each direction of walking has a separate sprite sheet (i.e. one for walking up, one for walking right etc), I also have a static idle image for each direction held together in a single file. I've tried to hold an array of sprites in my player class and then just drawing the sprite corresponding to the current direction, but this doesn't seem to work. &#xD;&#xA;&#xD;&#xA;I'm aware that if I combine all the animations into one sprite sheet I could set up different animation sequences, but I want to be able to do it with separate images for each animation.&#xD;&#xA;&#xD;&#xA;Is there a way that anyone knows of to achieve this? And ideally without too much extra code (as opposed to combining the sprites into one sheet)" />
  <row Id="17311" PostHistoryTypeId="1" PostId="8469" RevisionGUID="1157756a-8930-4c4e-bec0-a5fcca6f190d" CreationDate="2011-02-12T17:01:50.547" UserId="5404" Text="J2ME Character Animation with multiple sprite sheets" />
  <row Id="17312" PostHistoryTypeId="3" PostId="8469" RevisionGUID="1157756a-8930-4c4e-bec0-a5fcca6f190d" CreationDate="2011-02-12T17:01:50.547" UserId="5404" Text="&lt;java&gt;&lt;animation&gt;&lt;sprites&gt;" />
  <row Id="17313" PostHistoryTypeId="2" PostId="8470" RevisionGUID="4089515e-6034-44fd-9eda-312675246b0b" CreationDate="2011-02-12T17:15:14.273" UserId="4276" Text="i'm currently programming an iPhone game and I would like to create an online multiplayer mode. In the future, this app will be port to Android devices, so I was wondering how to create the game-server ?&#xD;&#xA;&#xD;&#xA;First at all, which language should I choose ? How to make a server able to communicate both with programs written in objective-c and Java ?&#xD;&#xA;&#xD;&#xA;Then, how to effectively do it ? Is it good if I open a socket by client (there'll be 2) ? What kind of information should I send to the server ? to the clients ?&#xD;&#xA;&#xD;&#xA;Thanks for your time." />
  <row Id="17314" PostHistoryTypeId="1" PostId="8470" RevisionGUID="4089515e-6034-44fd-9eda-312675246b0b" CreationDate="2011-02-12T17:15:14.273" UserId="4276" Text="Game server for an android/iOS turn-based board-game" />
  <row Id="17315" PostHistoryTypeId="3" PostId="8470" RevisionGUID="4089515e-6034-44fd-9eda-312675246b0b" CreationDate="2011-02-12T17:15:14.273" UserId="4276" Text="&lt;iphone&gt;&lt;android&gt;&lt;server&gt;&lt;client-server&gt;&lt;turn-based&gt;" />
  <row Id="17316" PostHistoryTypeId="2" PostId="8471" RevisionGUID="a98a2428-f821-475c-bc48-a3b73e54bc4e" CreationDate="2011-02-12T17:17:23.933" UserId="1021" Text="I'm interested in promoting my latest iOS game.  **What have you done that really helped spread the word**?  Any smaller game review sites that were helpful?  How about publishing?" />
  <row Id="17317" PostHistoryTypeId="1" PostId="8471" RevisionGUID="a98a2428-f821-475c-bc48-a3b73e54bc4e" CreationDate="2011-02-12T17:17:23.933" UserId="1021" Text="Promoting independent iOS games" />
  <row Id="17318" PostHistoryTypeId="3" PostId="8471" RevisionGUID="a98a2428-f821-475c-bc48-a3b73e54bc4e" CreationDate="2011-02-12T17:17:23.933" UserId="1021" Text="&lt;publishing&gt;&lt;ios&gt;&lt;revenue&gt;&lt;marketing&gt;" />
  <row Id="17319" PostHistoryTypeId="2" PostId="8472" RevisionGUID="d865b1b8-52e0-4ddd-9309-3a507549ffda" CreationDate="2011-02-12T17:21:39.543" UserId="1902" Text="I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection.&#xD;&#xA;&#xD;&#xA;The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on SAT, which I discovered in the answer to a question I found when searching, talks about voronoi regions.&#xD;&#xA;&#xD;&#xA;I'm having trouble finding material on how I would calculate these regions for an arbitrary convex polygon and aleo how I would determine if a point is in one + which.&#xD;&#xA;&#xD;&#xA;The tutorial does contain source code but it's a .fla and I don't have Flash unfortunately." />
  <row Id="17320" PostHistoryTypeId="1" PostId="8472" RevisionGUID="d865b1b8-52e0-4ddd-9309-3a507549ffda" CreationDate="2011-02-12T17:21:39.543" UserId="1902" Text="Voronoi regions of a (convex) polygon." />
  <row Id="17321" PostHistoryTypeId="3" PostId="8472" RevisionGUID="d865b1b8-52e0-4ddd-9309-3a507549ffda" CreationDate="2011-02-12T17:21:39.543" UserId="1902" Text="&lt;2d&gt;&lt;math&gt;&lt;collision-detection&gt;&lt;2d-physics&gt;&lt;geometry&gt;" />
  <row Id="17322" PostHistoryTypeId="25" PostId="8468" RevisionGUID="c9af41c4-c888-4dc5-a7e0-173d04900ce1" CreationDate="2011-02-12T17:22:22.800" Comment="http://twitter.com/#!/StackGameDev/status/36475211385675776" />
  <row Id="17323" PostHistoryTypeId="2" PostId="8473" RevisionGUID="c58b14ab-e120-4414-bff2-1431e7972c66" CreationDate="2011-02-12T17:41:55.190" UserId="1198" Text="Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.&#xD;&#xA;&#xD;&#xA;In order to provide updates in near real-time, I recommend you look into [long polling.][1] The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.&#xD;&#xA;&#xD;&#xA;In terms of what data should you send back, always treat the client as hostile. The client should send whatever its &quot;turn-state&quot; is, the server validates it, and then if everything checks out, it sends the new &quot;game-state&quot; back to all connected clients.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/333664/simple-long-polling-example-code" />
  <row Id="17324" PostHistoryTypeId="2" PostId="8474" RevisionGUID="147b0ded-48bd-47a1-9d25-07da5dbf0c20" CreationDate="2011-02-12T17:46:26.077" UserId="20" Text="I didn't have to calculate voronoi regions for my SAT implementation. I implemented circle vs. polygon intersection as described here: http://www.sevenson.com.au/actionscript/sat/ and it worked fine (also have a look at the links at the bottom of the article)." />
  <row Id="17325" PostHistoryTypeId="4" PostId="8469" RevisionGUID="fda889a2-a520-4ca5-b6fe-e46732bc1912" CreationDate="2011-02-12T17:53:10.290" UserId="5404" Comment="edited title; edited tags" Text="J2ME character animation with multiple sprite sheets" />
  <row Id="17326" PostHistoryTypeId="6" PostId="8469" RevisionGUID="fda889a2-a520-4ca5-b6fe-e46732bc1912" CreationDate="2011-02-12T17:53:10.290" UserId="5404" Comment="edited title; edited tags" Text="&lt;2d&gt;&lt;java&gt;&lt;animation&gt;&lt;sprites&gt;" />
  <row Id="17327" PostHistoryTypeId="5" PostId="8470" RevisionGUID="fff2e7fb-f867-4f58-80dc-443bd979ac0b" CreationDate="2011-02-12T17:56:17.677" UserId="1198" Comment="spacing I missed the first time around." Text="I am currently programming an iPhone game and I would like to create an online multiplayer mode. In the future, this app will be port to Android devices, so I was wondering how to create the game-server?&#xD;&#xA;&#xD;&#xA;First at all, which language should I choose? How to make a server able to communicate both with programs written in objective-c and Java?&#xD;&#xA;&#xD;&#xA;Then, how to effectively do it? Is it good if I open a socket by client (there'll be 2)? What kind of information should I send to the server? to the clients?" />
  <row Id="17328" PostHistoryTypeId="24" PostId="8470" RevisionGUID="7f9d9b96-aac9-45a3-846d-33883543265b" CreationDate="2011-02-12T17:56:17.677" Comment="Proposed by 1198 approved by 14 edit id of 28" />
  <row Id="17329" PostHistoryTypeId="2" PostId="8475" RevisionGUID="3b290b2a-cc43-4632-961b-f49f0883d13e" CreationDate="2011-02-12T18:18:33.137" UserId="5405" Text="I just recently saw stackoverflow had a game dev sister site so here I am, wondering if you experienced fellows know where one can search/look for game developers for an indie game startup? In other words:&#xD;&#xA;&#xD;&#xA;I have a game idea which I've written down with as much detail as possible (so anyone else can understand how it works) and now I'm looking for a heavy php programmer with whom to pair up in order to go from idea to reality. I'm a front-end/interface designer and an intermediate programmer. I recognize my project requires heavy programming skills which I do not have as of today =)&#xD;&#xA;&#xD;&#xA;So, what websites, communities or places do you recommend I go look into? Where do good programmers interested in indie games go look for projects if they don't have their own?&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;G.Campos" />
  <row Id="17330" PostHistoryTypeId="1" PostId="8475" RevisionGUID="3b290b2a-cc43-4632-961b-f49f0883d13e" CreationDate="2011-02-12T18:18:33.137" UserId="5405" Text="Where do you search/look for game developers for an indie game startup?" />
  <row Id="17331" PostHistoryTypeId="3" PostId="8475" RevisionGUID="3b290b2a-cc43-4632-961b-f49f0883d13e" CreationDate="2011-02-12T18:18:33.137" UserId="5405" Text="&lt;game-design&gt;&lt;programming&gt;" />
  <row Id="17332" PostHistoryTypeId="2" PostId="8476" RevisionGUID="115a4c0c-a9a5-418f-b73f-8e1540c1f9d1" CreationDate="2011-02-12T18:37:46.733" UserId="4360" Text="I'm successfully using this for quads / triangles.&#xD;&#xA;&#xD;&#xA;Loop through each face, and pass in 3 verticies. &#xD;&#xA;If you have a quad ABCD pass in ABD. For example for the front facing face on this cube, I would pass in, v2, v3, v0&#xD;&#xA;&#xD;&#xA;    // cube ///////////////////////////////////////////////////////////////////////&#xD;&#xA;    //    v6----- v5&#xD;&#xA;    //   /|      /|&#xD;&#xA;    //  v1------v0|&#xD;&#xA;    //  | |     | |&#xD;&#xA;    //  | |v7---|-|v4&#xD;&#xA;    //  |/      |/&#xD;&#xA;    //  v2------v3&#xD;&#xA;&#xD;&#xA;This is in C++ which supports operator overloading, so if in AS3 convert to Vector3d, which I notice you're not using now, might as well. ( I could see why you aren't, sometimes when trying to make found code work i also want to rule out any variables that could make it fail )&#xD;&#xA;&#xD;&#xA;    // &#xD;&#xA;	Vec3f RibbonMesh::calcNormal( const Vec3f &amp;p1, const Vec3f &amp;p2, const Vec3f &amp;p3 )&#xD;&#xA;	{&#xD;&#xA;		Vec3f V1= (p2 - p1);&#xD;&#xA;		Vec3f V2 = (p3 - p1);&#xD;&#xA;		Vec3f surfaceNormal;&#xD;&#xA;		surfaceNormal.x = (V1.y*V2.z) - (V1.z-V2.y);&#xD;&#xA;		surfaceNormal.y = - ( (V2.z * V1.x) - (V2.x * V1.z) );&#xD;&#xA;		surfaceNormal.z = (V1.x-V2.y) - (V1.y-V2.x);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;        // Dont forget to normalize if needed&#xD;&#xA;		return surfaceNormal;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17333" PostHistoryTypeId="2" PostId="8477" RevisionGUID="5b7007eb-c793-4b1a-8bae-aa0ab1b83f8e" CreationDate="2011-02-12T18:39:38.310" UserId="1101" Text="How to handle this really depends on what you mean by a 'screen'. Often the presentation of the game at a certain point is tied into the input system for that stage, and this is grouped together as some sort of game state object. I tend to dislike this approach because too often these states become dumping grounds for all sorts of unrelated data and functions, filling your code with de facto globals. Having a stack of states instead of a single state can facilitate some things (eg. having a menu render over the top of the game while it's paused) but complicate others (eg. needing to have a dummy state for the same menu to render correctly when the game isn't in progress).&#xD;&#xA;&#xD;&#xA;Therefore I prefer to keep much of this information in separate objects, whether for input, world rendering, the GUI, etc. Fading one screen into another tends to just become a function of the GUI. A menu rendered over the game becomes just another GUI window paired up with the pause functionality. And so on. Complex animations don't require a game state system to work, and in fact should really be decoupled from any overall game state - you don't want to have to implement a separate state any time you want interesting interface animations, after all. You should be able to have that during normal gameplay if you choose." />
  <row Id="17334" PostHistoryTypeId="5" PostId="8473" RevisionGUID="44066b91-710f-4cc3-a4f2-e141f0226e2c" CreationDate="2011-02-12T18:54:11.337" UserId="1198" Comment="added 550 characters in body" Text="Since your game is going to be turn based, real-time updates are not super important. The easiest way to do this is to use an already built server, I would go with a web server. Any platform worth porting your game to should facilitate accessing web services located on a web server.&#xD;&#xA;&#xD;&#xA;In order to provide updates in near real-time, I recommend you look into [long polling.][1] The code at that link, provides the most basic implementation of long polling from the server side. But the bottom line is that once a request is made to a resource, the server executes a blocking call until the data requested becomes available. Then you repeat the process again, and again.&#xD;&#xA;&#xD;&#xA;In terms of what data should you send back, always treat the client as hostile. The client should send whatever its &quot;turn-state&quot; is, the server validates it, and then if everything checks out, it sends the new &quot;game-state&quot; back to all connected clients.&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;SOAP web services is probably the best place to start ([link][2]), they are easy to get started, and most web frameworks provide a method for exposing them. You might also want to look into RESTful services, but they typically leave a bit more of the serialization process up to the consumer.&#xD;&#xA;&#xD;&#xA;For consuming SOAP web services on Android, I'd look [here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/333664/simple-long-polling-example-code&#xD;&#xA;  [2]: http://mac-objective-c.blogspot.com/2009/04/soap-webservices-in-objective-ccocoa.html&#xD;&#xA;  [3]: http://stackoverflow.com/questions/297586/how-to-call-web-service-with-android" />
  <row Id="17335" PostHistoryTypeId="2" PostId="8478" RevisionGUID="b28da4d4-4adb-4ddb-9ef7-a97838b2cae2" CreationDate="2011-02-12T19:07:06.600" UserId="5020" Text="The most obvious next step is to cache the tree, hang on to the calculations you already made for the branch chosen, and use the time saved by not recalculating it to extend it further.&#xD;&#xA;&#xD;&#xA;Depending on how confident you can be that your cost function is accurate, it might be worth trying to improve it. You may be able to semi-automate this using genetic algorithms to improve it by having different versions play against each other." />
  <row Id="17336" PostHistoryTypeId="2" PostId="8479" RevisionGUID="90970cec-c010-4a00-a08a-3bd8e899fd2d" CreationDate="2011-02-12T19:24:06.203" UserId="659" Text="What options are out there these days for audio playback/mixing in C++?  &#xD;&#xA;&#xD;&#xA;Primarily for Windows, but portability (particularly to Mac and iOS) would be desirable.&#xD;&#xA;&#xD;&#xA;For a small indie game, potentially commercial, though - so I'm looking for something free/low-cost.&#xD;&#xA;&#xD;&#xA;My requirements are fairly basic - I don't need 3D sound, or many-channels - simple stereo is fine. Just need to be able to mix sound effects and a music stream, maybe decoding one or more compressed audio formats (.ogg/.mp3 etc), with all the basic controls over looping, pitch, volume, etc.&#xD;&#xA;&#xD;&#xA;Is OpenAL more-or-less the standard choice, or are there other good options out there?&#xD;&#xA;" />
  <row Id="17337" PostHistoryTypeId="1" PostId="8479" RevisionGUID="90970cec-c010-4a00-a08a-3bd8e899fd2d" CreationDate="2011-02-12T19:24:06.203" UserId="659" Text="Audio libraries for PC indie games" />
  <row Id="17338" PostHistoryTypeId="3" PostId="8479" RevisionGUID="90970cec-c010-4a00-a08a-3bd8e899fd2d" CreationDate="2011-02-12T19:24:06.203" UserId="659" Text="&lt;audio&gt;&lt;sound&gt;&lt;music&gt;&lt;sound-effects&gt;" />
  <row Id="17339" PostHistoryTypeId="5" PostId="8479" RevisionGUID="2add1b10-5960-4c35-8b7d-7a653dd53a2b" CreationDate="2011-02-12T20:10:58.533" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Cross-Platform Audio API Suggestions](http://gamedev.stackexchange.com/questions/3753/cross-platform-audio-api-suggestions)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;What options are out there these days for audio playback/mixing in C++?  &#xD;&#xA;&#xD;&#xA;Primarily for Windows, but portability (particularly to Mac and iOS) would be desirable.&#xD;&#xA;&#xD;&#xA;For a small indie game, potentially commercial, though - so I'm looking for something free/low-cost.&#xD;&#xA;&#xD;&#xA;My requirements are fairly basic - I don't need 3D sound, or many-channels - simple stereo is fine. Just need to be able to mix sound effects and a music stream, maybe decoding one or more compressed audio formats (.ogg/.mp3 etc), with all the basic controls over looping, pitch, volume, etc.&#xD;&#xA;&#xD;&#xA;Is OpenAL more-or-less the standard choice, or are there other good options out there?&#xD;&#xA;" />
  <row Id="17340" PostHistoryTypeId="10" PostId="8479" RevisionGUID="844fb96a-8d06-47fb-adc4-8598d4628b57" CreationDate="2011-02-12T20:10:58.377" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="17341" PostHistoryTypeId="25" PostId="8471" RevisionGUID="be3332c7-5209-4d2d-a4c4-ac3334a746ce" CreationDate="2011-02-12T20:22:22.873" Comment="http://twitter.com/#!/StackGameDev/status/36520510053416961" />
  <row Id="17343" PostHistoryTypeId="2" PostId="8481" RevisionGUID="60ecd9ce-a3fe-4705-8e67-a228d1b73919" CreationDate="2011-02-12T21:35:50.907" UserId="5410" Text="I have big creativity burnout :/ Do you have any ideas how can I fight with it ??" />
  <row Id="17344" PostHistoryTypeId="1" PostId="8481" RevisionGUID="60ecd9ce-a3fe-4705-8e67-a228d1b73919" CreationDate="2011-02-12T21:35:50.907" UserId="5410" Text="Fight with creativity burnout" />
  <row Id="17345" PostHistoryTypeId="3" PostId="8481" RevisionGUID="60ecd9ce-a3fe-4705-8e67-a228d1b73919" CreationDate="2011-02-12T21:35:50.907" UserId="5410" Text="&lt;game-design&gt;" />
  <row Id="17346" PostHistoryTypeId="2" PostId="8482" RevisionGUID="608a621d-f4a6-4c72-b24f-2f100068435d" CreationDate="2011-02-12T21:42:37.717" UserId="2862" Text="I'm intersecting a line in 2D and I calculate the X,Y coordinates of the intersection point. What I need is the Z of the intersection point given the X,Y,Z of the line points, and the X,Y of the intersection. From what I understand of equations it should be a one-liner but I don't know enough math to get there.&#xD;&#xA;" />
  <row Id="17347" PostHistoryTypeId="1" PostId="8482" RevisionGUID="608a621d-f4a6-4c72-b24f-2f100068435d" CreationDate="2011-02-12T21:42:37.717" UserId="2862" Text="Calculate the Z of a line intersection given the XY coordinates?" />
  <row Id="17348" PostHistoryTypeId="3" PostId="8482" RevisionGUID="608a621d-f4a6-4c72-b24f-2f100068435d" CreationDate="2011-02-12T21:42:37.717" UserId="2862" Text="&lt;3d&gt;&lt;coordinates&gt;&lt;line&gt;&lt;points&gt;&lt;z&gt;" />
  <row Id="17349" PostHistoryTypeId="2" PostId="8483" RevisionGUID="af9d4df1-e261-4378-877d-82522a3929fc" CreationDate="2011-02-12T22:33:05.767" UserId="5412" Text="You can use either the x or the y value of the intersection to compute the z-value (using x):&#xD;&#xA;&#xD;&#xA;    t = (x - X1) / (X2 - X1)&#xD;&#xA;    z = Z1 + (Z2 - Z1) * t&#xD;&#xA;&#xD;&#xA;Where x is the x-intersection. X1, X2 and Z1, Z2 are your known x and z-values, respectively, of the segment's endpoints." />
  <row Id="17350" PostHistoryTypeId="2" PostId="8484" RevisionGUID="2df502a4-24b5-4f59-b3a5-9e404c47938d" CreationDate="2011-02-12T22:45:02.570" UserId="4410" Text="As you're just curious about other stuff out there, I don't see any mention of [Miles][1] on here yet. I've not used it myself (although we did use it many years ago on a game), however these [games][2] use it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.radgametools.com/miles.htm&#xD;&#xA;  [2]: http://www.radgametools.com/mssgames.htm" />
  <row Id="17351" PostHistoryTypeId="2" PostId="8485" RevisionGUID="6feeef82-ca5a-4d1c-b176-e48bff8f0e27" CreationDate="2011-02-12T23:31:29.637" UserId="3874" Text="I was wondering if somebody could tell me how the game and the game engine fit into game development. Specifically what I mean is, the game engine does not actually have a game. So where I'm unclear about is basically, do game developpers build an engine, then create a new class that inherits from engine which becomes the game?&#xD;&#xA;&#xD;&#xA;Ex:&#xD;&#xA;&#xD;&#xA;    class ShooterGame : public Engine&#xD;&#xA;    {&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;So basically i'm unclear on where the game code fits into the engine.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="17352" PostHistoryTypeId="1" PostId="8485" RevisionGUID="6feeef82-ca5a-4d1c-b176-e48bff8f0e27" CreationDate="2011-02-12T23:31:29.637" UserId="3874" Text="The Game vs The Game Engine?" />
  <row Id="17353" PostHistoryTypeId="3" PostId="8485" RevisionGUID="6feeef82-ca5a-4d1c-b176-e48bff8f0e27" CreationDate="2011-02-12T23:31:29.637" UserId="3874" Text="&lt;game-design&gt;&lt;c++&gt;&lt;engine&gt;" />
  <row Id="17354" PostHistoryTypeId="2" PostId="8486" RevisionGUID="10d6ce26-4170-48e9-a2d3-218178722b7e" CreationDate="2011-02-13T00:19:16.337" UserId="4360" Text="Yes, look at **OpenNI** with the **NITE** module. It is created by Primesense, who are the people that microsoft licensed the Kinect technology from.  &#xD;&#xA;It has many compiled examples with it &#xD;&#xA;&#xD;&#xA;**OpenNI** uses the concept of modules, **NITE** is a module created by Primesense that can track hand movement, and can understand gestures.&#xD;&#xA;&#xD;&#xA;**OpenNI**  &#xD;&#xA;https://github.com/OpenNI/OpenNI&#xD;&#xA;&#xD;&#xA;Branch i'm using (I'm on a Mac though)   &#xD;&#xA;https://github.com/avin2/SensorKinect" />
  <row Id="17355" PostHistoryTypeId="2" PostId="8487" RevisionGUID="abd74105-dca2-4248-a08e-c13bf7b6f775" CreationDate="2011-02-13T00:30:25.207" UserId="4410" Text="I'm sure there are circumstances where people have done as you have above, but personally I've always favoured engines as a collection of libraries, with bits you can pull in as needed. That would ultimately give you more flexibility of choice to swap different components in/out based on their suitability to a specific type of game (i.e. you could choose a 2D or 3D physics library or renderer depending on the type of game) without having to have all the other alternatives resident in memory, or you could choose between a rendered based on DX9/DX11/etc)." />
  <row Id="17356" PostHistoryTypeId="2" PostId="8488" RevisionGUID="b5156224-008b-4cbe-8dcd-da1338c8c9fd" CreationDate="2011-02-13T00:43:20.670" UserId="189" Text="Don't get caught up on the concept of a &quot;game engine&quot;. While it is true that game studios often have some sort of game engine which they create in order to speed the process of producing games, many independent developers get hung up on trying to create a game engine that they never actually make something that works.&#xD;&#xA;&#xD;&#xA;A game engine can be whatever you want it to be. If you find enough in common between your games that you can subclass an `Engine` class like your example, that's fine. If an &quot;engine&quot; is really just a small library of functions which you've found to be handy in past games you've developed, that's great too. Whatever it means to you, the concept of an &quot;engine&quot; is just reusable code to help you make more games.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game though, don't focus on making an engine. Make a game. Once the game is done and you're ready to make your second one, start making the second one, and you'll find bits that you already made in your first game; then you can extract those bits into a library or engine, to be shared between the two games. That's how an engine should be made. It's not typically something that you decide to write before making a game, because you'll end up with tons of code which is untested and you are essentially writing things before you know you need them (therefore you might not even need them). This is like premature optimization, but worse.&#xD;&#xA;&#xD;&#xA;So to directly answer your question, basically **a game engine is a reusable &quot;thing&quot;** (library, tool, framework) which a game studio uses to aid in quickly producing games, and they typically create it with specific games in mind or after having created several games, extracting out the similar bits and moulding them into an engine which they know can be used in future games. It should almost never be created without either retrospect (two or more games already created) or EXTENSIVE planning." />
  <row Id="17357" PostHistoryTypeId="2" PostId="8489" RevisionGUID="d9f96c59-ad26-48d9-b546-f426b407cb5e" CreationDate="2011-02-13T00:56:52.937" UserId="2111" Text="I've recently started learning how to program in 3D with XNA and I've been trying to implement a Terrain3D class(a very simple height map). I've managed to draw a simple terrain, but I'm getting a weird bug where I can see through the terrain. This bug happens when I'm looking through a hill from the map. Here is a picture of what happens:&#xD;&#xA;![][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/PeAbY.png&#xD;&#xA;&#xD;&#xA;I was wondering if this is a common mistake for starters and if any of you ever experienced the same problem and could tell me what I'm doing wrong. If it's not such an obvious problem, here is my Draw method:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    public override void Draw()&#xD;&#xA;    {&#xD;&#xA;        Parent.Engine.SpriteBatch.Begin(SpriteBlendMode.None, &#xD;&#xA;            SpriteSortMode.Immediate, SaveStateMode.SaveState);&#xD;&#xA;&#xD;&#xA;        Camera3D cam = (Camera3D)Parent.Engine.Services.GetService(typeof(Camera3D));&#xD;&#xA;        if (cam == null)&#xD;&#xA;            throw new Exception(&quot;Camera3D couldn't be found. Drawing a 3D terrain requires a 3D camera.&quot;);&#xD;&#xA;&#xD;&#xA;        float triangleCount = indices.Length / 3f;&#xD;&#xA;&#xD;&#xA;        basicEffect.Begin();&#xD;&#xA;&#xD;&#xA;        basicEffect.World = worldMatrix;&#xD;&#xA;        basicEffect.View = cam.ViewMatrix;&#xD;&#xA;        basicEffect.Projection = cam.ProjectionMatrix;&#xD;&#xA;        basicEffect.VertexColorEnabled = true;&#xD;&#xA;&#xD;&#xA;        Parent.Engine.GraphicsDevice.VertexDeclaration = new VertexDeclaration(&#xD;&#xA;            Parent.Engine.GraphicsDevice,&#xD;&#xA;            VertexPositionColor.VertexElements);&#xD;&#xA;&#xD;&#xA;        foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)&#xD;&#xA;        {&#xD;&#xA;            pass.Begin();&#xD;&#xA;            Parent.Engine.GraphicsDevice.Vertices[0].SetSource(vertexBuffer, 0, &#xD;&#xA;                VertexPositionColor.SizeInBytes);&#xD;&#xA;            Parent.Engine.GraphicsDevice.Indices = indexBuffer;&#xD;&#xA;            Parent.Engine.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList,&#xD;&#xA;                0, 0, vertices.Length, 0, (int)triangleCount);&#xD;&#xA;            pass.End();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        basicEffect.End();&#xD;&#xA;&#xD;&#xA;        Parent.Engine.SpriteBatch.End();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;*Parent is just a property holding the screen that the component belongs to. Engine is a property of that parent screen holding the engine that it belongs to.*&#xD;&#xA;&#xD;&#xA;If I should post more code(like the initialization code), then just leave a comment and I will." />
  <row Id="17358" PostHistoryTypeId="1" PostId="8489" RevisionGUID="d9f96c59-ad26-48d9-b546-f426b407cb5e" CreationDate="2011-02-13T00:56:52.937" UserId="2111" Text="XNA Seeing through heightmap problem" />
  <row Id="17359" PostHistoryTypeId="3" PostId="8489" RevisionGUID="d9f96c59-ad26-48d9-b546-f426b407cb5e" CreationDate="2011-02-13T00:56:52.937" UserId="2111" Text="&lt;xna&gt;&lt;terrain-rendering&gt;&lt;heightmap&gt;" />
  <row Id="17360" PostHistoryTypeId="2" PostId="8490" RevisionGUID="561387d7-3310-47ce-8f38-ed435de0c535" CreationDate="2011-02-13T01:13:50.847" UserId="5413" Text="Do you remember a arcade game, that allow two people to versus or play each other? A Galaga/Gradius type game.&#xD;&#xA;&#xD;&#xA;Me and a couple of other people I know wanna make a game like this. We want to get some other opinions on what programming languages to use.(C or C++ isn't an option &gt;.&gt;).&#xD;&#xA;&#xD;&#xA;We plan to use an engine to help us build. It's gonna be a multiplayer game, so we would be handling the networking with this language as well.&#xD;&#xA;&#xD;&#xA;We are thinking about C#, Java, or Actionscript 3.&#xD;&#xA;&#xD;&#xA;Any Advice on this? And if anyone knows the arcade game I am referring to please post up :)!" />
  <row Id="17361" PostHistoryTypeId="1" PostId="8490" RevisionGUID="561387d7-3310-47ce-8f38-ed435de0c535" CreationDate="2011-02-13T01:13:50.847" UserId="5413" Text="Any Programming Languages Recommendations? A Space shooter game that allows two people to play at the same time?" />
  <row Id="17362" PostHistoryTypeId="3" PostId="8490" RevisionGUID="561387d7-3310-47ce-8f38-ed435de0c535" CreationDate="2011-02-13T01:13:50.847" UserId="5413" Text="&lt;c#&gt;&lt;programming&gt;&lt;java&gt;&lt;actionscript-3&gt;" />
  <row Id="17363" PostHistoryTypeId="2" PostId="8491" RevisionGUID="77d697e2-0729-463d-9de0-96a6e48460b6" CreationDate="2011-02-13T01:30:17.157" UserId="1198" Text="C# and XNA will allow you to develop for Windows, XBox, and Windows Phone. It supports multi-player two former platforms. One of the game samples that comes with the developer tools used to be a space shooter. &#xD;&#xA;&#xD;&#xA;In my experience it has a very low barrier to entry, the tools are free for Windows, and only $99/year for XBox and Windows Phone." />
  <row Id="17364" PostHistoryTypeId="5" PostId="8490" RevisionGUID="5cf090bf-6fff-49a8-8ece-7935fcd6d8cd" CreationDate="2011-02-13T01:38:49.383" UserId="5413" Comment="added 172 characters in body" Text="Do you remember a arcade game, that allow two people to versus or play each other? A Galaga/Gradius type game.&#xD;&#xA;&#xD;&#xA;Me and a couple of other people I know wanna make a game like this. We want to get some other opinions on what programming languages to use.(C or C++ isn't an option &gt;.&gt;).&#xD;&#xA;&#xD;&#xA;We plan to use an engine to help us build. It's gonna be a multiplayer game, so we would be handling the networking with this language as well.&#xD;&#xA;&#xD;&#xA;We are thinking about C#, Java, or Actionscript 3.&#xD;&#xA;&#xD;&#xA;Any Advice on this? And if anyone knows the arcade game I am referring to please post up :)!&#xD;&#xA;&#xD;&#xA;Edit&#xD;&#xA;&#xD;&#xA;Let me add something here, this game will be plain on computers and laptops only. We mainly wanna what's good for handling the networking and Dual screen play. " />
  <row Id="17365" PostHistoryTypeId="2" PostId="8492" RevisionGUID="879c2fc5-7e02-4d12-903a-92bd7127f11d" CreationDate="2011-02-13T01:59:18.373" UserId="5414" Text="I'm currently writing a game in XNA for fun which uses C#.  I have got my sprites loaded and when the character moves right he looks like he is running right and when he moves left he looks like he is running left.&#xD;&#xA;&#xD;&#xA;I been looking everywhere for a good coding example for how to create a jumping ability.  I have read all the physics stuff that I can stand and it doesn't help when I can't figure out how to use say space bar to jump yet can't keep them from using space just jump again until they land." />
  <row Id="17366" PostHistoryTypeId="1" PostId="8492" RevisionGUID="879c2fc5-7e02-4d12-903a-92bd7127f11d" CreationDate="2011-02-13T01:59:18.373" UserId="5414" Text="2D Platform Game Jumping" />
  <row Id="17367" PostHistoryTypeId="3" PostId="8492" RevisionGUID="879c2fc5-7e02-4d12-903a-92bd7127f11d" CreationDate="2011-02-13T01:59:18.373" UserId="5414" Text="&lt;xna&gt;&lt;2d&gt;" />
  <row Id="17368" PostHistoryTypeId="2" PostId="8493" RevisionGUID="debc1d01-af79-4a0c-862f-e47bf569fe0c" CreationDate="2011-02-13T02:04:32.390" UserId="2111" Text="Take a look at this tutorial:&#xD;&#xA;http://www.xnadevelopment.com/tutorials/thewizardjumping/thewizardjumping.shtml&#xD;&#xA;the site is also full of really useful tutorials related to XNA." />
  <row Id="17369" PostHistoryTypeId="2" PostId="8494" RevisionGUID="943f5a9e-3b6c-49fa-bf62-62b5d226126a" CreationDate="2011-02-13T02:05:21.063" UserId="4209" Text="Set a variable, can jump and set it to true whenever your sprite is on a jumpable surface. If you are using a negative y velocity every frame then letting collision detection prevent you from falling through the ground then you can set canjump whenever the players sprite collides with terrain. Whenever the player jumps just set can jump to false and it will remain that way until collision detection changes it back" />
  <row Id="17370" PostHistoryTypeId="5" PostId="8476" RevisionGUID="31e0c223-9133-4452-982d-f3ae606e3152" CreationDate="2011-02-13T02:21:45.413" UserId="4360" Comment="Source supplied; deleted 1 characters in body" Text="I'm successfully using this for quads / triangles.&#xD;&#xA;&#xD;&#xA;Loop through each face, and pass in 3 verticies. &#xD;&#xA;If you have a quad ABCD pass in ABD. For example for the front facing face on this cube, I would pass in, v2, v3, v0&#xD;&#xA;&#xD;&#xA;    // cube ///////////////////////////////////////////////////////////////////////&#xD;&#xA;    //    v6----- v5&#xD;&#xA;    //   /|      /|&#xD;&#xA;    //  v1------v0|&#xD;&#xA;    //  | |     | |&#xD;&#xA;    //  | |v7---|-|v4&#xD;&#xA;    //  |/      |/&#xD;&#xA;    //  v2------v3&#xD;&#xA;&#xD;&#xA;This is in C++ which supports operator overloading, so if in AS3 convert to Vector3d, which I notice you're not using now, might as well. ( I could see why you aren't, sometimes when trying to make found code work i also want to rule out any variables that could make it fail )&#xD;&#xA;&#xD;&#xA;    //  Modified from http://www.fullonsoftware.co.uk/snippets/content/Math_-_Calculating_Face_Normals.pdf&#xD;&#xA;	Vec3f RibbonMesh::calcNormal( const Vec3f &amp;p1, const Vec3f &amp;p2, const Vec3f &amp;p3 )&#xD;&#xA;	{&#xD;&#xA;		Vec3f V1= (p2 - p1);&#xD;&#xA;		Vec3f V2 = (p3 - p1);&#xD;&#xA;		Vec3f surfaceNormal;&#xD;&#xA;		surfaceNormal.x = (V1.y*V2.z) - (V1.z-V2.y);&#xD;&#xA;		surfaceNormal.y = - ( (V2.z * V1.x) - (V2.x * V1.z) );&#xD;&#xA;		surfaceNormal.z = (V1.x-V2.y) - (V1.y-V2.x);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;        // Dont forget to normalize if needed&#xD;&#xA;		return surfaceNormal;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Edit: Found source where I got this from&#xD;&#xA;" />
  <row Id="17371" PostHistoryTypeId="25" PostId="8492" RevisionGUID="a45ab087-a989-49e4-9bd9-464f3ec206a5" CreationDate="2011-02-13T02:22:22.760" Comment="http://twitter.com/#!/StackGameDev/status/36611106097213440" />
  <row Id="17372" PostHistoryTypeId="5" PostId="8494" RevisionGUID="ecf461fd-c697-4512-9247-cae0eeca0aa1" CreationDate="2011-02-13T02:43:42.383" UserId="4209" Comment="added 1 characters in body" Text="Create a variable, canJump and set it to true whenever your sprite is on a jumpable surface. If you are using a negative y velocity every frame then letting collision detection prevent you from falling through the ground then you can set canJump whenever the players sprite collides with terrain. Whenever the player jumps just set canJump to false and it will remain that way until collision detection changes it back" />
  <row Id="17374" PostHistoryTypeId="2" PostId="8496" RevisionGUID="1272ea60-5cfb-4556-9b42-1fe4983c2f6b" CreationDate="2011-02-13T03:39:35.113" UserId="202" Text="Sprite batches tend to overwrite some render states. Try to set &lt;code&gt;device.RenderState.DepthBufferWriteEnable = true;&lt;/code&gt; and &lt;code&gt;device.RenderState.DepthBufferEnable;&lt;/code&gt; manually. Hope that helps." />
  <row Id="17375" PostHistoryTypeId="2" PostId="8497" RevisionGUID="163ef310-be47-4490-a165-6f5173942863" CreationDate="2011-02-13T03:39:54.323" UserId="1923" Text="You should end your spriteBatch before doing any 3d drawing. Always keep 2d and 3d drawing separate.&#xD;&#xA;&#xD;&#xA;By the way, why are you even beginning &amp; ending the spritebatch if you're not drawing any 2d?&#xD;&#xA;&#xD;&#xA;Within a spritbatch begin/end, XNA sets various renderstates for 2d drawing. Often these aren't best for 3d drawing... especially if you're using XNA 3.1. In 3.1, SpriteBatch.Begin disables the depthbuffer... which is needed for 3d drawing and could factor into your issue.&#xD;&#xA;&#xD;&#xA;Also, if the problem turns out to be what's known as Z-fighting (it is hard to tell from the screen shot), increase your nearclip value when setting up your camera's projection matrix. " />
  <row Id="17376" PostHistoryTypeId="2" PostId="8498" RevisionGUID="c5df52bb-c724-488f-bae6-c0be920191fb" CreationDate="2011-02-13T03:49:15.773" UserId="1101" Text="&gt; basically i'm unclear on where the game code fits into the engine.&#xD;&#xA;&#xD;&#xA;Don't worry: I've worked professionally on games where we were all a bit confused on where the game code fits into the engine. ;)&#xD;&#xA;&#xD;&#xA;I find myself saying this a lot in game development, but there is no standard system or definition for this. Some engines (typically for quite simple games) let you create new games without writing any more code at all. Other engines are basically a skeleton of an existing game and you must alter the code in-place to add your features. Some are like your example and are collections of classes which you can subclass or aggregate into your own system. Others are more like libraries of code which you add to your own application and make use of as necessary. The only thing they have in common is that the engine is the part of the system that is suitable (or claims to be suitable!) for multiple games." />
  <row Id="17377" PostHistoryTypeId="2" PostId="8499" RevisionGUID="98e3f193-da4f-4e01-93ed-ca5e9db0b239" CreationDate="2011-02-13T04:07:06.623" UserId="1101" Text=" * Force yourself. The best creative works are 5% inspiration, 95% perspiration. If the ideas aren't flowing, still, keep working. Get your mind into the habit of getting work done and that is half the battle right there.&#xD;&#xA; * Seek out interesting stimuli. If you're making games, stop looking to other games for inspiration: Watch films, visit a museum, read a book, attend a talk.&#xD;&#xA; * Improve your skills. Often what we call burnout is really frustration, perhaps because we're having trouble fleshing out an idea or implementing a design. If this is true, ask other designers how they overcome problems, or read books such as [The Art of Game Design][1] to gain a fresh perspective on your game, or scour a few blogs to gain inspiration from published games.&#xD;&#xA; * Improve or change your tools. Related to the skills issue is the tools issue. Sometimes you just need to use different tools to see the work in a different light and perhaps discover new ways to make progress. If you normally write linear design docs, try a mind-map, or a Wiki. If you make maps in a 3D editor, try sketching them on paper or using a 2D tile editor. Try a different graphics app, audio app, programming language, game engine or library, or game-maker environment. A subtly different approach can often result in a massively different result.&#xD;&#xA; * Work with artificial constraints and starting points. Pick 2 random nouns from a dictionary and try to combine them into some sort of gameplay. Go for a walk and try to think of games based around things that you see. Look up a film on IMDB.com and see how you would make a game out of it. Take a game you know well and see if you could rework the essence of its gameplay to work with one button, or two colours, or audio only.&#xD;&#xA; * Rediscover your original motivation. If you care about burnout, that implies that you feel unable to do something which you really wish to do. Why do you wish to design games? Think back on what originally caught your interest, imagine the context and the possibilities that you saw, and recapture the feeling.&#xD;&#xA; * Back to the first one - force yourself. If you can follow Chris's suggestion and take 3 months off to recharge your batteries then that is great, but most of the time you can't afford to only work half the time. Get used to making those first marks on an intimidatingly blank canvas, and don't worry about failure - you can revise and improve your work later, as long as you do the work in the first place. Even the greatest novels consist 1/3rd of words like &quot;the&quot;, &quot;and&quot;, &quot;is&quot;, and so on - and there's no reason why that requires inspiration or creativity. Keep designing - you can improve it later.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965" />
  <row Id="17378" PostHistoryTypeId="25" PostId="8485" RevisionGUID="14ae045b-0614-4f7c-8152-d72d53b5fd59" CreationDate="2011-02-13T05:22:22.490" Comment="http://twitter.com/#!/StackGameDev/status/36656404022427649" />
  <row Id="17379" PostHistoryTypeId="2" PostId="8500" RevisionGUID="a50bf38f-e8a8-4685-8df9-7f9bc265d3a2" CreationDate="2011-02-13T05:37:56.153" UserId="4665" Text="Two books, Graphics Gems IV and Numerical Recipes, provide good discussion as well as source code.  I recommend either." />
  <row Id="17380" PostHistoryTypeId="2" PostId="8501" RevisionGUID="d6aaf1f3-3bc5-49ab-a383-31e27be9dca2" CreationDate="2011-02-13T06:25:10.267" UserId="5223" Text="Define this:&#xD;&#xA;&#xD;&#xA;    int gravity = 2, jump=50, spX=20,spY=20, surface=200;&#xD;&#xA;    bool click = false;&#xD;&#xA;    bool canJump = true;&#xD;&#xA;    Texture2D sprite;&#xD;&#xA;    MouseState m;&#xD;&#xA;&#xD;&#xA;---Update---&#xD;&#xA;&#xD;&#xA;    m = Mouse.GetState();&#xD;&#xA;&#xD;&#xA;            if (spY &lt; surface)&#xD;&#xA;            {&#xD;&#xA;                spY += gravity;&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                if (spY == surface)&#xD;&#xA;                {&#xD;&#xA;                    canJump = true ;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if (m.LeftButton == ButtonState.Pressed)&#xD;&#xA;            {&#xD;&#xA;                click = true;&#xD;&#xA;            }&#xD;&#xA;            if ((click) &amp;&amp; (m.LeftButton == ButtonState.Released))&#xD;&#xA;            {&#xD;&#xA;                if (canJump)&#xD;&#xA;                {&#xD;&#xA;                    click = false;&#xD;&#xA;                    spY -= jump;&#xD;&#xA;                    canJump = false;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;---EndUpdate---&#xD;&#xA;&#xD;&#xA;---Draw---&#xD;&#xA;&#xD;&#xA;    spriteBatch.Draw(sprite,new Vector2(spX,spY),Color.White);&#xD;&#xA;&#xD;&#xA;---EndDraw---&#xD;&#xA;&#xD;&#xA;I just tried it, it works fine" />
  <row Id="17381" PostHistoryTypeId="2" PostId="8502" RevisionGUID="f2ae8a29-2268-4af3-b658-cef25d4adcce" CreationDate="2011-02-13T08:19:07.220" UserId="5106" Text="Whenever I try and write a game in any object-oriented language, the first problem I always face (after thinking about what kind of game to write) is how to design the engine. Even if I'm using existing libraries or frameworks like SDL, I still find myself having to make certain decisions for every game, like whether to use a state machine to manage menus, what kind of class to use for resource loading, etc. &#xD;&#xA;&#xD;&#xA;What is a good design and how would it be implemented? What are some tradeoffs that have to be made and their pros/cons?" />
  <row Id="17382" PostHistoryTypeId="1" PostId="8502" RevisionGUID="f2ae8a29-2268-4af3-b658-cef25d4adcce" CreationDate="2011-02-13T08:19:07.220" UserId="5106" Text="How to design a game engine in an object-oriented language?" />
  <row Id="17383" PostHistoryTypeId="3" PostId="8502" RevisionGUID="f2ae8a29-2268-4af3-b658-cef25d4adcce" CreationDate="2011-02-13T08:19:07.220" UserId="5106" Text="&lt;game-design&gt;&lt;engine&gt;" />
  <row Id="17384" PostHistoryTypeId="2" PostId="8503" RevisionGUID="9decf489-91ce-4929-87dc-8ee3fcc0c980" CreationDate="2011-02-13T08:19:47.233" UserId="5106" Text="As an example, here's how my current roguelike project is structured (in Java). It is using a 2D graphics engine so a lot of the rendering code was already taken care of for me. Criticism is welcomed.&#xD;&#xA;&#xD;&#xA;`class Game`  &#xD;&#xA;This class sets up the state machine that manages the current state of the game. (in a menu vs. starting a new game vs. playing a saved game)  &#xD;&#xA;&#xD;&#xA;`interface State`  &#xD;&#xA;Each State class contains two loops: a loop for updating the logic and a loop for rendering. They also contain code for calling the `Game` class and requesting a change to a different state.  &#xD;&#xA;&#xD;&#xA;`class ResourceManager`  &#xD;&#xA;A singleton that is initialized by the `Game` class that loads all the needed resources and allows access to them. I don't like this design because it makes it hard to load/unload resources on different levels, for example. I would probably design this differently if I were starting over.  &#xD;&#xA;&#xD;&#xA;`class Map`  &#xD;&#xA;A map contains an array of tiles and a list of all the creatures and items on the map. It's a pretty basic class.  &#xD;&#xA;&#xD;&#xA;`class Creature`  &#xD;&#xA;Creatures contain information about themselves including movement calculations (requiring them to know which Map they're in, and and to be able to query it to find out about obstacles). Deciding whether to do this, or have some kind of manager class take care of it for all the creatures is something I struggle with.  &#xD;&#xA;&#xD;&#xA;`interface AITask`  &#xD;&#xA;Creatures can have a list of AITasks, which are executed every time the creature's logic loop is run. The AITask has its own logic loop that issues commands to the creature, and a termination condition that determines if the task was completed successfully or not.  &#xD;&#xA;&#xD;&#xA;`interface UIElement`  &#xD;&#xA;I implemented my own UI for this engine. Each UIElement has a rendering loop and a logic loop. They also have a loop for processing keyboard/mouse input. All elements can have a number of child elements, which are rendered after their parents, and take over the keyboard/mouse input. This lets you have menus with submenus, for example." />
  <row Id="17385" PostHistoryTypeId="25" PostId="8482" RevisionGUID="aac2fcad-c556-4ef8-84f5-c5ce8f52c25f" CreationDate="2011-02-13T08:22:22.753" Comment="http://twitter.com/#!/StackGameDev/status/36701703608729600" />
  <row Id="17386" PostHistoryTypeId="6" PostId="8502" RevisionGUID="8e5017b9-5ad3-4d15-941d-4ed9ed379e4e" CreationDate="2011-02-13T09:53:42.223" UserId="1156" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;" />
  <row Id="17387" PostHistoryTypeId="2" PostId="8504" RevisionGUID="93948fc5-36f4-494a-92a1-93250881cfe7" CreationDate="2011-02-13T09:54:01.193" UserId="5378" Text="I am currently reading a book named &quot;3D Graphics with XNA Game Studio 4.0&quot; by Sean James and have some questions to ask :&#xD;&#xA;&#xD;&#xA;If i create a effect parameter named lets say SpecularPower and have in my effect a variable named SpecularPower , if i do something like &#xD;&#xA;&#xD;&#xA;&gt; effect.Parameters[&quot;SpecularPower&quot;].SetValue(3)&#xD;&#xA;&#xD;&#xA;That wil change the SpecularPower variable in my effect ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And a second question, not regarding the book : &#xD;&#xA;If i have a spaceship and i've created a &quot;boost&quot; functionality that speeds up my spaceship, what effects should i implement to create the impresion oh high speed ? I was thinking of making everything except my spaceship blurry but i think there would be something missing . Any ideas ?&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Alex Badescu" />
  <row Id="17388" PostHistoryTypeId="1" PostId="8504" RevisionGUID="93948fc5-36f4-494a-92a1-93250881cfe7" CreationDate="2011-02-13T09:54:01.193" UserId="5378" Text="Setting effects variables in XNA" />
  <row Id="17389" PostHistoryTypeId="3" PostId="8504" RevisionGUID="93948fc5-36f4-494a-92a1-93250881cfe7" CreationDate="2011-02-13T09:54:01.193" UserId="5378" Text="&lt;xna&gt;&lt;effects&gt;" />
  <row Id="17390" PostHistoryTypeId="6" PostId="8485" RevisionGUID="bd4e3408-718f-4471-ad00-6974e0008985" CreationDate="2011-02-13T09:54:54.907" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;engine&gt;" />
  <row Id="17391" PostHistoryTypeId="2" PostId="8505" RevisionGUID="f24ba583-c950-45c9-8a7d-7ec0205c6316" CreationDate="2011-02-13T09:56:01.457" UserId="5418" Text="Obviously, trying to apply the min-max algorithm on the complete tree of moves works only for small games (I apologize to all chess enthusiasts, by &quot;small&quot; I do not mean &quot;simplistic&quot;).&#xD;&#xA;For typical turn-based strategy games where the board is often wider than 100 tiles and all pieces in a side can move simultaneously, the min-max algorithm is inapplicable.&#xD;&#xA;&#xD;&#xA;I was wondering if a partial min-max algorithm which limits itself to N board configurations at each depth couldn't be good enough? Using a genetic algorithm, it might be possible to find a number of board configurations that are good wrt to the evaluation function. Hopefully, these configurations might also be good wrt to long-term goals.&#xD;&#xA;&#xD;&#xA;I would be surprised if this hasn't been thought of before and tried. Has it? How does it work?" />
  <row Id="17392" PostHistoryTypeId="1" PostId="8505" RevisionGUID="f24ba583-c950-45c9-8a7d-7ec0205c6316" CreationDate="2011-02-13T09:56:01.457" UserId="5418" Text="Is chess-like AI really inapplicable in turn-based strategy games?" />
  <row Id="17393" PostHistoryTypeId="3" PostId="8505" RevisionGUID="f24ba583-c950-45c9-8a7d-7ec0205c6316" CreationDate="2011-02-13T09:56:01.457" UserId="5418" Text="&lt;ai&gt;&lt;turn-based&gt;" />
  <row Id="17394" PostHistoryTypeId="2" PostId="8506" RevisionGUID="13337287-bb84-4121-841b-b90e67b735bb" CreationDate="2011-02-13T09:58:51.843" UserId="1156" Text="Whichever language you know best, and suits your end product. If you're not wanting a web game, Actionscript is out the window. If you don't know Java, why bother with it?&#xD;&#xA;&#xD;&#xA;On a more concrete note, I would probably go for C# or Java.&#xD;&#xA;&#xD;&#xA;Then again, I'm pretty sure [Unity][1] might work too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="17395" PostHistoryTypeId="2" PostId="8507" RevisionGUID="708ea032-21bb-48a7-b3f1-51988c986ed3" CreationDate="2011-02-13T10:03:50.263" UserId="778" Text="The input system of Quake3 is handled using a Keybinding relay, whereby each keypress is matched against a 'binding' which is then passed to the [CLI][1] along with a time stamp of when the keypress (or release) occurred.&#xD;&#xA;&#xD;&#xA;I just wanted to get an idea from developers what they considered to be the key benefits of designing your input system around this approach?  &#xD;&#xA;One thing i don't particularly like is the appending of the timestamp to the bound command. This seems like a bit of a hack to bend the CLI into handling the games input?  &#xD;&#xA;Also I feel that detecting the keypress only to add the command to a stream of text that gets parsed at a later date to be a slightly latent way of responding to input? (or is this unfounded?)&#xD;&#xA;&#xD;&#xA;The only real benefit i can see is that it allows you to bind 'complex' commands to keypresses; like 'switch weapon;+fire;' for example. Or maybe for journaling purposes?&#xD;&#xA;&#xD;&#xA;Thanks for any insights!&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Console_(video_game_CLI)" />
  <row Id="17396" PostHistoryTypeId="1" PostId="8507" RevisionGUID="708ea032-21bb-48a7-b3f1-51988c986ed3" CreationDate="2011-02-13T10:03:50.263" UserId="778" Text="What are the benefits of designing a KeyBinding relay?" />
  <row Id="17397" PostHistoryTypeId="3" PostId="8507" RevisionGUID="708ea032-21bb-48a7-b3f1-51988c986ed3" CreationDate="2011-02-13T10:03:50.263" UserId="778" Text="&lt;architecture&gt;&lt;input&gt;" />
  <row Id="17398" PostHistoryTypeId="2" PostId="8508" RevisionGUID="522d18cd-cedf-40a7-a94f-03cf83f357d1" CreationDate="2011-02-13T10:14:48.173" UserId="1156" Text="I doubt somebody is going to be able to say 'You have to do this and that and this and this slots with that using pattern X'. &#xD;&#xA;&#xD;&#xA;However, some useful resources:  &#xD;&#xA;[Enginuity][1] - a series of engine building articles on Gamedev.net.  &#xD;&#xA;[Game Coding Complete][2] - I own this book, and it goes over every (well, almost) aspect of game programming well. It also does have an engine built throughout the book.  &#xD;&#xA;[Game Engine Architecture][3] - This is another great book for engine design.  &#xD;&#xA;[C4 Engine Layout][4] - Taken from my comment, but this shows a high-level way of fitting each part of the engine together.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;These may be a little too much for what you need, but you can't know too much about something, and I'm sure you'll get a good plan from them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/reference/programming/features/enginuity1/&#xD;&#xA;  [2]: http://rads.stackoverflow.com/amzn/click/1584506806&#xD;&#xA;  [3]: http://www.gameenginebook.com/&#xD;&#xA;  [4]: http://i.stack.imgur.com/81zIY.png" />
  <row Id="17399" PostHistoryTypeId="5" PostId="8508" RevisionGUID="ea2009fc-0e9e-4be0-b0eb-805356ae5313" CreationDate="2011-02-13T10:22:52.423" UserId="1156" Comment="added 89 characters in body" Text="I doubt somebody is going to be able to say 'You have to do this and that and this and this slots with that using pattern X'. &#xD;&#xA;&#xD;&#xA;However, some useful resources:  &#xD;&#xA;[Enginuity][1] - a series of engine building articles on Gamedev.net.  &#xD;&#xA;[Game Coding Complete][2] - I own this book, and it goes over every (well, almost) aspect of game programming well. It also does have an engine built throughout the book.  &#xD;&#xA;[Game Engine Architecture][3] - This is another great book for engine design.  &#xD;&#xA;[C4 Engine Layout][4] - Taken from my comment, but this shows a high-level way of fitting each part of the engine together.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;These may be a little too much for what you need, but you can't know too much about something, and I'm sure you'll get a good plan from them.&#xD;&#xA;&#xD;&#xA;EDIT: I forgot the Gamedev articles have been archived since the new site, fixed :)&#xD;&#xA;&#xD;&#xA;  [1]: http://archive.gamedev.net/reference/programming/features/enginuity1/&#xD;&#xA;  [2]: http://rads.stackoverflow.com/amzn/click/1584506806&#xD;&#xA;  [3]: http://www.gameenginebook.com/&#xD;&#xA;  [4]: http://i.stack.imgur.com/81zIY.png" />
  <row Id="17400" PostHistoryTypeId="2" PostId="8509" RevisionGUID="c63586d3-9e11-499d-9fa2-390a45d324b8" CreationDate="2011-02-13T10:41:00.620" UserId="778" Text="The first important point to make is that there is no one 'good' answer to this question.&#xD;&#xA;&#xD;&#xA;The closest thing to a right answer would be something like:&#xD;&#xA;It very much depends on the type of game, target platform, constraints (time) etc.&#xD;&#xA;&#xD;&#xA;That said there are some really good articles out there that will show you how other people have tried to answer this problem (as i have tried to find info on this in the past).  &#xD;&#xA;As The communist duck mentioned the [enginuity][1] article on game dev helped me understand some parts of game architecture.  &#xD;&#xA;&#xD;&#xA;My current design is a hybrid of Quake3/Doom3 and a little bit of the .NET class library :)&#xD;&#xA;&#xD;&#xA;I have two libraries (static or dynamic depends on how you want to build/deliver) the `Framework` and the `Library`.&#xD;&#xA;&#xD;&#xA;The Library contains all helper classes which are there to help with the production of game software but aren't limited to this kind of product. ie it has an implementation of a linked list which is optimized for game code but could be used by anything which needs the service of a linked list.&#xD;&#xA;&#xD;&#xA;The Framework is the guts of the 'engine' if you want to call it that. A lot of this follows Quake3's design philosophies (just in a more object orientated way). It contains the [CLI][2], timing management, OS specific code, and eventually networking layers etc.&#xD;&#xA;&#xD;&#xA;These two are then linked against the actual app that is being produced. The `Game` if you like, which contains the game specific code. In much the same way Quake3 loads DLL's depending on which 'mod' is being played.&#xD;&#xA;&#xD;&#xA;To give you an idea of structure here is a quick breakdown of folders and contents for each lib:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - **Framework**&#xD;&#xA;     - **IO** (Specialist file management classes, Text Printing classes (eg to the CLI), and logging etc.)&#xD;&#xA;     - **Network**&#xD;&#xA;          - **Client** (classes which represent what the Framework considers to be a 'person playing/connected to the game')&#xD;&#xA;          - **Server** (classes to manage connection into the framework and manage the player(s))&#xD;&#xA;     - **Platform** (Keyboard/mouse/controllers handling classes, OS specific routines like getTime())&#xD;&#xA;     - **System** (very low level classes like an error class to aid printing of error messages, Timing classes, and the CLI itself.)&#xD;&#xA;     - **Renderer** (self explanatory)&#xD;&#xA;     - etc.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- **Library**  &#xD;&#xA;      - **Collections** (classes which represent collections of data, linked lists/hashtables etc.)&#xD;&#xA;      - **Math** (basic math helper classes like Vectors and matrices)&#xD;&#xA;      - etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;HTH! Should give you some pointers...&#xD;&#xA;&#xD;&#xA;  [1]: http://archive.gamedev.net/reference/programming/features/enginuity2/layout.gif&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Console_(video_game_CLI)" />
  <row Id="17401" PostHistoryTypeId="5" PostId="8509" RevisionGUID="829ad7c5-466a-44a5-8f52-b6a264330996" CreationDate="2011-02-13T10:48:44.060" UserId="778" Comment="added 46 characters in body" Text="The first important point to make is that there is no one 'good' answer to this question.&#xD;&#xA;&#xD;&#xA;The closest thing to a right answer would be something like:&#xD;&#xA;It very much depends on the type of game, target platform, constraints (time) etc.&#xD;&#xA;&#xD;&#xA;That said there are some really good articles out there that will show you how other people have tried to answer this problem (as i have tried to find info on this in the past).  &#xD;&#xA;As The communist duck mentioned the [enginuity][1] article on game dev helped me understand some parts of game architecture.  &#xD;&#xA;&#xD;&#xA;My current design is a hybrid of Quake3/[Doom3][2] and a little bit of the .NET class library :)&#xD;&#xA;&#xD;&#xA;I have two libraries (static or dynamic depends on how you want to build/deliver) the `Framework` and the `Library`.&#xD;&#xA;&#xD;&#xA;The Library contains all helper classes which are there to help with the production of game software but aren't limited to this kind of product. ie it has an implementation of a linked list which is optimized for game code but could be used by anything which needs the service of a linked list.&#xD;&#xA;&#xD;&#xA;The Framework is the guts of the 'engine' if you want to call it that. A lot of this follows Quake3's design philosophies (just in a more object orientated way). It contains the [CLI][3], timing management, OS specific code, and eventually networking layers etc.&#xD;&#xA;&#xD;&#xA;These two are then linked against the actual app that is being produced. The `Game` if you like, which contains the game specific code. In much the same way Quake3 loads DLL's depending on which 'mod' is being played.&#xD;&#xA;&#xD;&#xA;To give you an idea of structure here is a quick breakdown of folders and contents for each lib:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - **Framework**&#xD;&#xA;     - **IO** (Specialist file management classes, Text Printing classes (eg to the CLI), and logging etc.)&#xD;&#xA;     - **Network**&#xD;&#xA;          - **Client** (classes which represent what the Framework considers to be a 'person playing/connected to the game')&#xD;&#xA;          - **Server** (classes to manage connection into the framework and manage the player(s))&#xD;&#xA;     - **Platform** (Keyboard/mouse/controllers handling classes, OS specific routines like getTime())&#xD;&#xA;     - **System** (very low level classes like an error class to aid printing of error messages, Timing classes, and the CLI itself.)&#xD;&#xA;     - **Renderer** (self explanatory)&#xD;&#xA;     - etc.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- **Library**  &#xD;&#xA;      - **Collections** (classes which represent collections of data, linked lists/hashtables etc.)&#xD;&#xA;      - **Math** (basic math helper classes like Vectors and matrices)&#xD;&#xA;      - etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;HTH! Should give you some pointers...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://archive.gamedev.net/reference/programming/features/enginuity2/layout.gif&#xD;&#xA;  [2]: http://www.iddevnet.com/doom3/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Console_(video_game_CLI)" />
  <row Id="17402" PostHistoryTypeId="25" PostId="8507" RevisionGUID="3bcb6309-1bf7-4c92-a413-66beb11eea50" CreationDate="2011-02-13T11:22:22.763" Comment="http://twitter.com/#!/StackGameDev/status/36747002230345728" />
  <row Id="17403" PostHistoryTypeId="2" PostId="8510" RevisionGUID="1f785b60-e596-4684-b6be-ef9b648c58a1" CreationDate="2011-02-13T11:35:59.143" UserId="5401" Text="I'll post my solution too, it takes the average of the normals of all triangles that a vertex belongs to.&#xD;&#xA;&#xD;&#xA;It takes a mesh with vertices and indices and calculates the normals for all vertices.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; indices.Length; i += 3)&#xD;&#xA;    {&#xD;&#xA;       Vector3 v0 = vertices[indicies[i]].Position;&#xD;&#xA;       Vector3 v1 = vertices[indicies[i+1]].Position;&#xD;&#xA;       Vector3 v2 = vertices[indicies[i+2]].Position;&#xD;&#xA;    &#xD;&#xA;       Vector3 normal = Vector3.Normalize(Vector3.Cross(v2 - v0, v1 - v0)); //This is the normal of the triangle if that's all you're interested in.&#xD;&#xA;    &#xD;&#xA;       vertices[indicies[i]].Normal += normal;&#xD;&#xA;       vertices[indicies[i+1]].Normal += normal;&#xD;&#xA;       vertices[indicies[i+2]].Normal += normal;&#xD;&#xA;    }&#xD;&#xA;    for(int i = 0; i &lt; vertices.Length; i++)&#xD;&#xA;    {&#xD;&#xA;       vertices[i].Normal = Vector3.Normalize(vertices[i].Normal);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17404" PostHistoryTypeId="2" PostId="8511" RevisionGUID="9818bba2-de7f-4c9c-8759-1ee8d3a79607" CreationDate="2011-02-13T12:13:49.813" UserId="4947" Text="If you want to compute voronoi diagram of arbitrary (convex or non-convex) polygon, where elements are vertices and edges, you can use Fortune's sweep line algorithm, but you have to split polygon to line segments (edges). But I don't think you should use it - it's really hard to implement, especially for line segments. &#xD;&#xA;&#xD;&#xA;In which region is your point is another problem ([point location problem][1]) - most used method is trapezoidal decomposition (I think) - it's build on space partitioning (your voronoi region) and search complexity should be O(log n).&#xD;&#xA;&#xD;&#xA;I think you can find much easier way how to compute circle-polygon intersection test that with voronoi diagram and point location.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Point_location" />
  <row Id="17405" PostHistoryTypeId="2" PostId="8512" RevisionGUID="9a0da128-a406-4830-9966-52c712836c1b" CreationDate="2011-02-13T13:33:26.363" UserId="3689" Text="I wander for my own use , and curiosity how much java got popular in the indie game development &#xD;&#xA;in 2d and 3d gaming development ? is there any good open and not open source games done in java ? &#xD;&#xA;" />
  <row Id="17406" PostHistoryTypeId="1" PostId="8512" RevisionGUID="9a0da128-a406-4830-9966-52c712836c1b" CreationDate="2011-02-13T13:33:26.363" UserId="3689" Text="How much java is usined in 2d and 3d games in the indie world ? (after and before minicraft boom)" />
  <row Id="17407" PostHistoryTypeId="3" PostId="8512" RevisionGUID="9a0da128-a406-4830-9966-52c712836c1b" CreationDate="2011-02-13T13:33:26.363" UserId="3689" Text="&lt;2d&gt;&lt;3d&gt;&lt;java&gt;" />
  <row Id="17408" PostHistoryTypeId="5" PostId="8512" RevisionGUID="d0314e23-b908-47c6-8d73-88a811a18b30" CreationDate="2011-02-13T14:17:52.527" UserId="1156" Comment="deleted 36 characters in body; edited title; edited tags" Text="I wonder for my own use and curiosity, how popular is Java in indie game development ,&#xD;&#xA;in 2d and 3d? Are there any good open/closed source games done in java? &#xD;&#xA;" />
  <row Id="17409" PostHistoryTypeId="4" PostId="8512" RevisionGUID="d0314e23-b908-47c6-8d73-88a811a18b30" CreationDate="2011-02-13T14:17:52.527" UserId="1156" Comment="deleted 36 characters in body; edited title; edited tags" Text="How much is java used in 2d/3d indie games? (before/after Minecraft)" />
  <row Id="17410" PostHistoryTypeId="6" PostId="8512" RevisionGUID="d0314e23-b908-47c6-8d73-88a811a18b30" CreationDate="2011-02-13T14:17:52.527" UserId="1156" Comment="deleted 36 characters in body; edited title; edited tags" Text="&lt;2d&gt;&lt;3d&gt;&lt;java&gt;&lt;indie&gt;" />
  <row Id="17411" PostHistoryTypeId="25" PostId="8502" RevisionGUID="dfaa8559-28b0-4bc9-a757-fed9eae19e41" CreationDate="2011-02-13T14:22:22.633" Comment="http://twitter.com/#!/StackGameDev/status/36792300067622912" />
  <row Id="17412" PostHistoryTypeId="2" PostId="8513" RevisionGUID="600bdd6c-a092-4fab-8973-ac7d16146f15" CreationDate="2011-02-13T14:42:50.577" UserId="202" Text="- It makes it very easy to implement customizable button assignment in your game.&#xD;&#xA;- It makes programming very easy because you can think in abstract terms: You only have to decide what shall happen if the player input is &quot;forward&quot; for example, whether this &quot;forward&quot; comes from pressing the *up key*, *w*, an *analog stick* or even a *combination of keys*.&#xD;&#xA;- A keybinding relay is an abstract concept and your implementation can differ from the one of Quake3. For example I wouldn't implement a timestamp if I didn't need a replay function. The overhead you're worried about is negligible if you query the whole controller state at once." />
  <row Id="17413" PostHistoryTypeId="2" PostId="8514" RevisionGUID="0acc91fa-d2d5-4dfa-8780-5e391898ae3c" CreationDate="2011-02-13T14:56:20.577" UserId="2395" Text="Looks like you're trying to make something 2d and relatively simple. I'd say go for PyGame (a game library for python); if you were going 3d i'd say unity. " />
  <row Id="17414" PostHistoryTypeId="2" PostId="8515" RevisionGUID="031e8ce3-158c-47d4-aea2-49836d6f9277" CreationDate="2011-02-13T14:59:24.000" UserId="323" Text="It's not terribly popular, in my experience. There's a few problems. First off, Java isn't the most efficient language around (though better than many think), but that lack of efficiency isn't really compensated for by ease of development. Second, running Java is kind of a pain - it's gotten better recently, but it's still tainted by Java's legendary growing pains. Third, Java hasn't had particularly good graphics support in-browser, and if you're outside the browser, you may as well use something else.&#xD;&#xA;&#xD;&#xA;It's not really a matter of Java being bad. It's a matter of Java not being particularly good for any game-related niche, and other languages actually being good. The language that does everything in a mediocre fashion loses to the languages that do something well.&#xD;&#xA;&#xD;&#xA;There's a list of [famous Java games][1] on this very site, but, well, you can see how popular it is.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java" />
  <row Id="17415" PostHistoryTypeId="2" PostId="8516" RevisionGUID="235d2a58-5b9f-4ae7-876b-8beca1fded0c" CreationDate="2011-02-13T15:38:28.270" UserId="4828" Text="Is there possiblity to write my own plugin/extension to Unity editor ? I want to write plugin to generate map for me from xml file." />
  <row Id="17416" PostHistoryTypeId="1" PostId="8516" RevisionGUID="235d2a58-5b9f-4ae7-876b-8beca1fded0c" CreationDate="2011-02-13T15:38:28.270" UserId="4828" Text="Can I write plugin/extension to Unity editor ?" />
  <row Id="17417" PostHistoryTypeId="3" PostId="8516" RevisionGUID="235d2a58-5b9f-4ae7-876b-8beca1fded0c" CreationDate="2011-02-13T15:38:28.270" UserId="4828" Text="&lt;unity&gt;&lt;extension&gt;&lt;editors&gt;" />
  <row Id="17418" PostHistoryTypeId="2" PostId="8517" RevisionGUID="d226df0f-4611-485f-bed7-092fe51655c5" CreationDate="2011-02-13T15:40:59.500" UserId="4956" Text="Yes - look on the Unity Manual:&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/documentation/Manual/Plugins.html&#xD;&#xA;&#xD;&#xA;The manual also points you to further reading by providing things like the simplest plugin project - you could use this as a starting framework" />
  <row Id="17419" PostHistoryTypeId="2" PostId="8518" RevisionGUID="c8c3ef80-c223-4c18-a89f-0b2648aaa774" CreationDate="2011-02-13T15:51:21.553" UserId="1156" Text="Chances are that you are using the free version of Unity. As such, you cannot write plugins unless you use the Pro version.&#xD;&#xA;&#xD;&#xA;If you are using the Pro version, then check the manual." />
  <row Id="17420" PostHistoryTypeId="2" PostId="8519" RevisionGUID="c8ef57d0-8dc7-4249-8c36-d74379d7ea7a" CreationDate="2011-02-13T16:12:49.697" UserId="51" Text="&quot;Plugins&quot; in Unity nomenclature mean native code (read: written in C/C++/Objective-C) DLLs.  For what you want to do you more than likely don't need (or want, really) to use plugins.&#xD;&#xA;&#xD;&#xA;For extensions, the Unity editor is very scriptable.&#xD;&#xA;&#xD;&#xA;Are you asking if you can &#xD;&#xA;&#xD;&#xA; 1. Populate a unity scene at editor time from an XML file&#xD;&#xA; 2. Replace unity's default scene format entirely with an xml file.&#xD;&#xA;&#xD;&#xA;Either way, what you're asking is more than possible.  Here's an example of somebody completely replacing Unity's binary scene file format with a text representation: https://github.com/terravision/UnityTextScene&#xD;&#xA;&#xD;&#xA;What you probably want to do is more likely just take advantage of their editor scripting tools.  For example, look at &lt;a href=&quot;http://unity3d.com/support/documentation/ScriptReference/ScriptableWizard.html&quot;&gt;ScriptableWizard&lt;/a&gt;.  You can take that base code and then do something like load an XML file and spawn a bunch of prefabs, or whatever.  &#xD;&#xA;&#xD;&#xA;Pretty much the vast majority of things you see in the editor is scriptable.  You can attach components, move/rotate/scale things, spawn prefabs, edit materials, all sorts of things." />
  <row Id="17421" PostHistoryTypeId="2" PostId="8520" RevisionGUID="c5ab2890-5a66-4c88-9190-2625eb0bcccf" CreationDate="2011-02-13T16:50:05.203" UserId="1430" Text="`Parameters` is an [EffectParameterCollection][1], which is indexable by string and integer. Indexing it by string returns an [EffectParameter][2] for the named parameter, which can be used to assign values to that parameter, as illustrated in the link documentation.&#xD;&#xA;&#xD;&#xA;In short, the answer to your first question is &quot;yes.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.effectparametercollection_members.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.effectparameter.aspx" />
  <row Id="17422" PostHistoryTypeId="2" PostId="8521" RevisionGUID="e3a3be66-462c-4694-8e88-bfce7124c054" CreationDate="2011-02-13T16:55:38.613" UserId="5399" Text="I use XNA for my projects and on those forums I sometimes see references to the fact that swapping an effect for a mesh has a relatively high cost, which surprises me as I thought to swap an effect was simply a case of copying the replacement shader program to the GPU along with appropriate parameters.&#xD;&#xA;&#xD;&#xA;I wondered if someone could explain exactly what is costly about this process? And put, if possible, 'relatively' into context?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example say I wanted to use a short shader to help with picking, I would:&#xD;&#xA;&#xD;&#xA; 1. Change the effect on every object, calculting a unique color to identify it and providing it to the shader.&#xD;&#xA; 2. Draw all the objects to a render target in memory.&#xD;&#xA; 3. Get the color from the target and use it to look up the selected object.&#xD;&#xA;&#xD;&#xA;What portion of the total time taken to complete that process would be spent swapping the shaders?&#xD;&#xA;My instincts would say that rendering the scene again, no matter how simple the shader, would be an order of magnitude slower than any other part of the process so why all the concern over effects?&#xD;&#xA;" />
  <row Id="17423" PostHistoryTypeId="1" PostId="8521" RevisionGUID="e3a3be66-462c-4694-8e88-bfce7124c054" CreationDate="2011-02-13T16:55:38.613" UserId="5399" Text="The practical cost of swapping effects" />
  <row Id="17424" PostHistoryTypeId="3" PostId="8521" RevisionGUID="e3a3be66-462c-4694-8e88-bfce7124c054" CreationDate="2011-02-13T16:55:38.613" UserId="5399" Text="&lt;xna&gt;&lt;graphics&gt;&lt;directx&gt;&lt;shaders&gt;&lt;effects&gt;" />
  <row Id="17428" PostHistoryTypeId="5" PostId="8355" RevisionGUID="c7c095cb-d616-4c47-952e-09901f66bb98" CreationDate="2011-02-13T17:01:09.527" UserId="160" Comment="added 7 characters in body" Text="Isometric games are functionally 3D, so internally, you should be storing the 3D coordinates for each entity in the game. The actual coordinates you pick are arbitrary, but let's say X and Y are the two on-the-ground axes, and Z is off the ground up into the air.&#xD;&#xA;&#xD;&#xA;The renderer then needs to project that into 2D to draw stuff on screen. &quot;Isometric&quot; is one such projection. Projecting from 3D to 2D isometrically is pretty simple. Let's say that the X axis goes from top-left to bottom-right and down one pixel for each two horizontal pixels. Likewise, the Y axis goes from top-right to bottom-left. The Z axis goes straight up. To convert from 3D to 2D then is just:&#xD;&#xA;&#xD;&#xA;    function projectIso(x, y, z) {&#xD;&#xA;        return {&#xD;&#xA;            x: x - y,&#xD;&#xA;            y: (x / 2) + (y / 2) - z&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now to your original question, sorting. Now that we're working with our objects directly in 3D, sorting becomes much simpler. In our coordinate space here, the farthest sprite has the lowest x, y and z coordinates (i.e. all three axes point out from the screen). So you just sort them by the sum of those:&#xD;&#xA;&#xD;&#xA;    function nearness(obj) {&#xD;&#xA;        return obj.x + obj.y + obj.z;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    function closer(a, b) {&#xD;&#xA;        if (nearness(a) &gt; nearness(b)) {&#xD;&#xA;            return &quot;a&quot;;&#xD;&#xA;        } else {&#xD;&#xA;            return &quot;b&quot;;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To avoid re-sorting your entities every frame, use a pigeonhole sort, detailed [here](http://gamedev.stackexchange.com/questions/3454/most-efficient-3d-depth-sorting-for-isometric-3d-in-as3/3532#3532)." />
  <row Id="17429" PostHistoryTypeId="25" PostId="8516" RevisionGUID="3e6595d0-d891-4f3f-ba7c-35f69297a91c" CreationDate="2011-02-13T17:22:23.240" Comment="http://twitter.com/#!/StackGameDev/status/36837601004494848" />
  <row Id="17430" PostHistoryTypeId="2" PostId="8523" RevisionGUID="0fed8602-b549-42ed-956c-ade18e9917ac" CreationDate="2011-02-13T17:34:56.520" UserId="5020" Text="Not quite answering the question, but javagaming.org has a non-exhaustive list of commercial Java games [here](http://www.java-gaming.org/index.php/topic,3123.msg192440.html)." />
  <row Id="17434" PostHistoryTypeId="2" PostId="8524" RevisionGUID="432f3975-433d-4827-b152-4010af1976bd" CreationDate="2011-02-13T18:19:39.677" UserId="5119" Text="I don't know whether you mean this or not ..but i have this problem when i'm using render Texture in cocos2d.When the player sprite is moved,the sprites residue used to be ther for 3-5 frames.Clearing the alpha of the render texture fbo fixed the problem.Please mention the problem clearly if you have still problems." />
  <row Id="17438" PostHistoryTypeId="2" PostId="8526" RevisionGUID="0ef9d9fb-f8d8-4ebe-b512-487c118868d7" CreationDate="2011-02-13T18:37:52.747" UserId="5119" Text="As you said each direction of walking had a sprite sheet.Some thing like this structure will help.&#xD;&#xA;&#xD;&#xA;Have the 0'th index as the static IDLE image.When you want to animate just update the animation Index to draw the rest of images in that sprite Sheet.&#xD;&#xA;&#xD;&#xA;if(animate)//Just a rough code...you can optimize better ;) &#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;     animIndex++;//animIndex is the current Frame of the animation&#xD;&#xA;     draw(currentSpriteSheetImages[animIndex]);//currentSpriteSheetImages holds the set of images created from a sprite sheet&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;else&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      draw(currentSpriteSheetImages[0]);//drawing the idle image&#xD;&#xA;      animIndex = 0;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Btw, Just for some more info...As J2me devices have less memory,its better if you follow some thing which will create sprites with minimum memory footprint.I recommend you to check this useful tool.[http://www.motionwelder.com/tutorial.php]&#xD;&#xA;" />
  <row Id="17439" PostHistoryTypeId="2" PostId="8527" RevisionGUID="ea174930-daed-4e0b-b3ee-1087a9673d59" CreationDate="2011-02-13T18:50:40.757" UserId="3659" Text="Java is the language used for Android games. (I believe there may be some other methods like using C++ but its usually Java). If you have an Android phone, you can test the top-downloaded games to see good examples.&#xD;&#xA;&#xD;&#xA;I think it's good for indie development - in fact I am doing an indie game for android. There are many tools that Google provides for you - such as debugger, emulator, memory allocation tracker. You can also use the Eclipse IDE with it.&#xD;&#xA;&#xD;&#xA;There is also a lot of code online and the StackOverflow site if you get stuck on a bug. Also, Android supports openGL for 2D/3D games (though you can make a 2D game without it - as I am doing)." />
  <row Id="17440" PostHistoryTypeId="2" PostId="8528" RevisionGUID="fb2d4472-b577-4be1-9571-f55d1a4be01b" CreationDate="2011-02-13T18:56:59.930" UserId="1923" Text="Help others with their problems. You will naturally seek creative solutions for them and the juices will start flowing again." />
  <row Id="17442" PostHistoryTypeId="5" PostId="8526" RevisionGUID="2f333f43-15d2-4710-a45c-46baf3c21c6f" CreationDate="2011-02-13T19:40:59.090" UserId="51" Comment="added 22 characters in body" Text="As you said each direction of walking had a sprite sheet.Some thing like this structure will help.&#xD;&#xA;&#xD;&#xA;Have the 0'th index as the static IDLE image.When you want to animate just update the animation Index to draw the rest of images in that sprite Sheet.&#xD;&#xA;&#xD;&#xA;    if(animate)//Just a rough code...you can optimize better ;) &#xD;&#xA;    {&#xD;&#xA;         animIndex++;//animIndex is the current Frame of the animation&#xD;&#xA;         draw(currentSpriteSheetImages[animIndex]);//currentSpriteSheetImages holds the set of images created from a sprite sheet&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;          draw(currentSpriteSheetImages[0]);//drawing the idle image&#xD;&#xA;          animIndex = 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Btw, Just for some more info...As J2me devices have less memory,its better if you follow some thing which will create sprites with minimum memory footprint.I recommend you to check this useful tool.[http://www.motionwelder.com/tutorial.php]&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17443" PostHistoryTypeId="2" PostId="8529" RevisionGUID="1a656671-258f-4516-9a9c-219108fe2ab6" CreationDate="2011-02-13T20:10:19.067" UserDisplayName="user5433" Text="Try making flash demo and post it on Newgrounds or other flash portals. Make sure you add information about your game. If the flash game is good, then people will buy the app. Otherwise, you can go with traditional promotion by contacting game review or game blog or youtube channels such as rock paper shotgun, wikigames, machinama, IGN etc." />
  <row Id="17444" PostHistoryTypeId="2" PostId="8530" RevisionGUID="9543d3f6-eee3-413e-bf5b-bc40923397ec" CreationDate="2011-02-13T20:12:56.663" UserId="2332" Text="This isn't a minimax algorithm, however the guys responsible for the Killzone AI released a paper based on position evaluation functions which some chess AI also uses.&#xD;&#xA;&#xD;&#xA;It's very simple in that all it does is picks a position on the board based on the agent's current knowledge. So if the agent is low on health, then positions further away from its enemy will be awarded a higher score as it is more desirable to be out of the enemy's range.&#xD;&#xA;&#xD;&#xA;The paper can be found in [AI Game Programming Wisdom 3][1] and has the title Dynamic Tactical Position Evaluation.&#xD;&#xA;&#xD;&#xA;A draft of the paper can be found online here:  &#xD;&#xA;http://www.cgf-ai.com/docs/straatman_remco_killzone_ai.pdf&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/AI-Game-Programming-Wisdom-CD/dp/1584504579/ref=sr_1_4?s=books&amp;ie=UTF8&amp;qid=1297627922&amp;sr=1-4" />
  <row Id="17445" PostHistoryTypeId="25" PostId="8521" RevisionGUID="7f05a2f4-e259-4edf-9d36-a4fc4127da3a" CreationDate="2011-02-13T20:22:23.777" Comment="http://twitter.com/#!/StackGameDev/status/36882901844889600" />
  <row Id="17446" PostHistoryTypeId="2" PostId="8531" RevisionGUID="efc9905b-a0bc-4769-86b4-47b6c7f70e16" CreationDate="2011-02-13T21:03:14.880" UserId="4662" Text="I don't think that it would be good enough. Choosing the specific N configurations, how many and which ones, would be virtually impossible in something that complex. Remember that if your game features infinite resources or something similar, then there may be circles in how it can be played, making exploiting such an AI relatively easy." />
  <row Id="17447" PostHistoryTypeId="5" PostId="8471" RevisionGUID="18f37794-c4d0-4d36-88fa-09da3430dd43" CreationDate="2011-02-13T22:10:29.947" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are effective marketing strategies for iPhone games?](http://gamedev.stackexchange.com/questions/7969/what-are-effective-marketing-strategies-for-iphone-games)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I'm interested in promoting my latest iOS game.  **What have you done that really helped spread the word**?  Any smaller game review sites that were helpful?  How about publishing?" />
  <row Id="17448" PostHistoryTypeId="10" PostId="8471" RevisionGUID="663c101b-c167-489d-a368-eef12a04d8dc" CreationDate="2011-02-13T22:10:29.807" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="17449" PostHistoryTypeId="25" PostId="8512" RevisionGUID="2ddbd2cf-1f96-4379-a70b-5183edba1bcf" CreationDate="2011-02-13T23:22:23.537" Comment="http://twitter.com/#!/StackGameDev/status/36928199552143360" />
  <row Id="17450" PostHistoryTypeId="2" PostId="8532" RevisionGUID="b7d6def5-b36c-4fa9-af5d-87188c44ba4c" CreationDate="2011-02-14T01:59:11.503" UserId="4514" Text="It depends on the mechanics of the game.  Game tree min-max may be inapplicable overall, but maybe it applies in some areas.  It's common that some locations on a map are strategically important.  Min-max may apply at a strategic level for which of those locations to control.  At a tactical level, for the x squares around each strategic location, min-max might be used to decide how units deploy to capture and defend it." />
  <row Id="17451" PostHistoryTypeId="25" PostId="8505" RevisionGUID="5f0fee50-8a9a-46ff-898b-496acfcfb833" CreationDate="2011-02-14T02:22:23.600" Comment="http://twitter.com/#!/StackGameDev/status/36973498182287361" />
  <row Id="17452" PostHistoryTypeId="25" PostId="8481" RevisionGUID="6ab1bfab-d25e-44ab-be74-5935efac5ab7" CreationDate="2011-02-14T08:22:23.627" Comment="http://twitter.com/#!/StackGameDev/status/37064095458918400" />
  <row Id="17453" PostHistoryTypeId="2" PostId="8533" RevisionGUID="13356403-a4a2-459c-9e52-f0b2711c7d80" CreationDate="2011-02-14T08:38:16.307" UserId="288" Text="The problem you are describing is not a &quot;special&quot; problem. There's nothing especially slow about changing effects on the GPU. The problem with changing effects, effect parameters (including transformations), textures, various render states, and simply sending multiple draw commands, is that it necessitates that **another batch must be sent to the GPU**.&#xD;&#xA;&#xD;&#xA;Batches are **CPU**-bound and you only get **a few hundred per frame** to use.&#xD;&#xA;&#xD;&#xA;It depends on the CPU and what other work you are doing, but let's say you get about 300 batches per frame. If you are rendering one object per batch, you can draw about 300 objects on screen before you hit problems.&#xD;&#xA;&#xD;&#xA;If you suddenly add picking, and you have to render all your objects twice, then you are limited to drawing only 150 objects.&#xD;&#xA;&#xD;&#xA;(So if you've only got a small number of objects, then don't worry about it!)&#xD;&#xA;&#xD;&#xA;To reduce the number of batches you are using, you basically have to &quot;be clever&quot; about it. The prototypical method for doing this is to cleverly combine multiple objects into a single batch. In particular, look up &quot;**instancing**&quot;. Perhaps you can use the instance number  to assign a unique colour to each object within your shader.&#xD;&#xA;&#xD;&#xA;Another technique, especially suitable for picking, is to **cull** the rendered objects in software so that you're not rendering anything you know is not touching your picked pixel.&#xD;&#xA;&#xD;&#xA;Here's an entire presentation slide deck from NVidia titled &lt;a href=&quot;http://developer.nvidia.com/docs/IO/8230/BatchBatchBatch.pdf&quot;&gt;&quot;Batch, Batch, Batch: &#xD;&#xA;What Does It Really Mean?&quot;&lt;/a&gt; (PDF) that has nice graphs and stuff explaining this. It also lists some techniques for reducing your batch count." />
  <row Id="17454" PostHistoryTypeId="2" PostId="8534" RevisionGUID="b0bb7864-96e8-4812-b833-6dea1067933d" CreationDate="2011-02-14T09:15:08.873" UserId="5435" Text="I'm currently working in the Multimedia industry and although I'm better at design then development. I have knowledge of HTML, CSS, very basic jQuery, Actionscript. &#xD;&#xA;&#xD;&#xA;What programming Languages would you need to know?&#xD;&#xA;&#xD;&#xA;What else would you need to know to develop an application?&#xD;&#xA;&#xD;&#xA;I am assuming you would need to know xcode and Objective-C?" />
  <row Id="17455" PostHistoryTypeId="1" PostId="8534" RevisionGUID="b0bb7864-96e8-4812-b833-6dea1067933d" CreationDate="2011-02-14T09:15:08.873" UserId="5435" Text="What programming languages would be used to make an Apple App like Angry Birds or Cut the Rope?" />
  <row Id="17456" PostHistoryTypeId="3" PostId="8534" RevisionGUID="b0bb7864-96e8-4812-b833-6dea1067933d" CreationDate="2011-02-14T09:15:08.873" UserId="5435" Text="&lt;hobby-development&gt;&lt;career&gt;&lt;ios&gt;" />
  <row Id="17457" PostHistoryTypeId="2" PostId="8535" RevisionGUID="1e118478-5a3a-4854-a285-684416d3a101" CreationDate="2011-02-14T10:20:05.180" UserId="5378" Text="If i have a spaceship and i've created a &quot;boost&quot; functionality that speeds up my spaceship, what effects should i implement to create the impresion oh high speed ?&#xD;&#xA;&#xD;&#xA; I was thinking of making everything except my spaceship blurry but i think there would be something missing . Any ideas ? &#xD;&#xA;&#xD;&#xA;btw i am working in XNA C# but if you aren't familiar to XNA describing some effects is still usefull&#xD;&#xA;&#xD;&#xA;Regards, Alex Badescu" />
  <row Id="17458" PostHistoryTypeId="1" PostId="8535" RevisionGUID="1e118478-5a3a-4854-a285-684416d3a101" CreationDate="2011-02-14T10:20:05.180" UserId="5378" Text="effects to make a speeding spacheship look faster" />
  <row Id="17459" PostHistoryTypeId="3" PostId="8535" RevisionGUID="1e118478-5a3a-4854-a285-684416d3a101" CreationDate="2011-02-14T10:20:05.180" UserId="5378" Text="&lt;xna&gt;&lt;graphic-effects&gt;" />
  <row Id="17460" PostHistoryTypeId="2" PostId="8536" RevisionGUID="b337c685-7b2a-4039-b754-831a6ce8ef9b" CreationDate="2011-02-14T10:21:37.857" UserId="20" Text="Objective-C is the language of choice to develop for iOS. But you can also include plain C or C++ Code in there, so you could write large portions of your code in these languages. XCode and MacOS-X provide you with all tools needed to develop such Apps. There's (currently) no easy way to develop iOS Apps on Windows, except maybe a [Virtual-Machine][1] or trying to [install OS-X on your PC][2].&#xD;&#xA;&#xD;&#xA;Alternatively you can also create iOS Games/Apps using [Unity3D][3], [UDK][4] or [Flash][5].&#xD;&#xA;&#xD;&#xA;As soon as you want to test your App on an actual device or sell it in the AppStore you'll also require an [Apple Developer Membership][6].&#xD;&#xA;&#xD;&#xA;**Update**: You asked about Angry Birds and there's actually a nice [tutorial][7] out there on how to create such a game using the excellent [cocos2d framework][8].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Virtual_machine&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/OSx86&#xD;&#xA;  [3]: http://unity3d.com/unity/publishing/ios&#xD;&#xA;  [4]: http://www.udk.com/&#xD;&#xA;  [5]: http://labs.adobe.com/technologies/packagerforiphone/&#xD;&#xA;  [6]: http://developer.apple.com/programs/ios/&#xD;&#xA;  [7]: http://www.cocos2d-iphone.org/archives/1214&#xD;&#xA;  [8]: http://www.cocos2d-iphone.org/" />
  <row Id="17461" PostHistoryTypeId="2" PostId="8537" RevisionGUID="d2358132-1390-42bf-8423-9ea3a1f73f59" CreationDate="2011-02-14T10:40:19.037" UserDisplayName="user5438" Text="I've never really done much game programming before, pretty straightforward question.&#xD;&#xA;&#xD;&#xA;Imagine I'm building a Tetris game, with the main loop looking something like this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    for every frame&#xD;&#xA;    	handle input&#xD;&#xA;    	if it's time to make the current block move down a row&#xD;&#xA;    		if we can move the block&#xD;&#xA;    			move the block&#xD;&#xA;    		else&#xD;&#xA;    			remove all complete rows&#xD;&#xA;    			move rows down so there are no gaps&#xD;&#xA;    			if we can spawn a new block&#xD;&#xA;    				spawn a new current block&#xD;&#xA;    			else&#xD;&#xA;    				game over&#xD;&#xA;&#xD;&#xA;Everything in the game so far happens instantly - things are spawned instantly, rows are removed instantly etc. But what if I *don't* want things to happen instantly (i.e animate things)?&#xD;&#xA;&#xD;&#xA;    for every frame&#xD;&#xA;    	handle input&#xD;&#xA;    	if it's time to make the current block move down a row&#xD;&#xA;    		if we can move the block&#xD;&#xA;    			move the block&#xD;&#xA;    		else&#xD;&#xA;    			?? animate complete rows disappearing (somehow, wait over multiple frames until the animation is done)&#xD;&#xA;    			?? animate rows moving downwards (and again, wait over multiple frames)&#xD;&#xA;    			if we can spawn a new block&#xD;&#xA;    				spawn a new current block&#xD;&#xA;    			else&#xD;&#xA;    				game over&#xD;&#xA;&#xD;&#xA;In my Pong clone this wasn't an issue, as every frame I was just moving the ball and checking for collisions.&#xD;&#xA;&#xD;&#xA;How can I wrap my head around this issue? Surely most games involves some action that takes more than a frame, and other things halt until the action is done.&#xD;&#xA;" />
  <row Id="17462" PostHistoryTypeId="1" PostId="8537" RevisionGUID="d2358132-1390-42bf-8423-9ea3a1f73f59" CreationDate="2011-02-14T10:40:19.037" UserDisplayName="user5438" Text="Game actions that take multiple frames to complete" />
  <row Id="17463" PostHistoryTypeId="3" PostId="8537" RevisionGUID="d2358132-1390-42bf-8423-9ea3a1f73f59" CreationDate="2011-02-14T10:40:19.037" UserDisplayName="user5438" Text="&lt;architecture&gt;&lt;animation&gt;&lt;game-mechanics&gt;&lt;gameloop&gt;" />
  <row Id="17464" PostHistoryTypeId="2" PostId="8538" RevisionGUID="2a2e24b6-0c0e-41fd-a3e7-4f54757899b1" CreationDate="2011-02-14T10:42:46.183" UserId="20" Text="Here are some suggestions:&#xD;&#xA;&#xD;&#xA; - If your spaceship has a &quot;propulsion-flame&quot;, change its size and color. Eg. if it normally burns with a yellow color, make it blue and double the size of it.&#xD;&#xA; - Apply some jitter to your spaceship. The jitter occurs due to the heavy forces caused by the boost. Maybe you could apply random roll (rotation around the spaceship forward axis).&#xD;&#xA; - Add some particle-effects to the wings of the spaceship.&#xD;&#xA; - Add some wind-like effects to the tip of the rocket/spaceship.&#xD;&#xA;" />
  <row Id="17465" PostHistoryTypeId="2" PostId="8539" RevisionGUID="28c654e8-a4fd-4d44-9c70-127c25ecbd17" CreationDate="2011-02-14T10:44:18.320" UserId="4191" Text="* If it normally leaves an exhaust trail, leave a longer exhaust trail.&#xD;&#xA;* If it doesn't normally leave an exhaust trail, leave an exhaust trail.&#xD;&#xA;* Have the ship shake slightly, for example by rendering it off its actual position by +/- 1 or 2 pixels randomly." />
  <row Id="17466" PostHistoryTypeId="5" PostId="8538" RevisionGUID="aae6feb9-c0e5-4fd7-afd8-7577b793f396" CreationDate="2011-02-14T10:48:18.970" UserId="20" Comment="added 255 characters in body" Text="Here are some suggestions:&#xD;&#xA;&#xD;&#xA; - If your spaceship has a &quot;propulsion-flame&quot;, change its size and color. Eg. if it normally burns with a yellow color, make it blue and double the size of it.&#xD;&#xA; - Apply some jitter to your spaceship. The jitter occurs due to the heavy forces caused by the boost. Maybe you could apply random roll (rotation around the spaceship forward axis).&#xD;&#xA; - Add some particle-effects to the wings of the spaceship.&#xD;&#xA; - Add some wind-like effects to the tip of the rocket/spaceship.&#xD;&#xA;&#xD;&#xA;**Update:** If the look of your game allows it, you could also consider adding some [speed-lines][1]. Either at the back of your ship or as an overlay (maybe white lines) to your background-scene.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://images.google.ch/images?q=speed+lines" />
  <row Id="17467" PostHistoryTypeId="2" PostId="8540" RevisionGUID="a66eb047-4286-49cc-acb6-3081d6f4745a" CreationDate="2011-02-14T11:18:46.057" UserId="5224" Text="You always need to know the time difference between the previous and the current frame, then you've got to do two things.&#xD;&#xA;&#xD;&#xA;-Decide when to update your model: eg. in tetris when a row removal begins, you don't want stuff collide with the row anymore, so you remove the row from the 'model' of your application.&#xD;&#xA;&#xD;&#xA;-You then have to handle the object that is in a transitioning state to a separate class that resolves the animation/event over a period of time. In the tetris example you would have the row fade out slowly (change the opaqueness each frame a little bit). After the opaqueness is 0 you transfer all blocks on top of the row one down.&#xD;&#xA;&#xD;&#xA;This might seem a bit complicated at first, but you will get the hang of this, just make sure to abstract a lot in different classes, this will make it easier. Also make sure that events that take time, like the removing of a row in tetris, are of the kind &quot;Fire and Forget&quot;, just create a new object that handles everything that needs to be done automatically and that, when everything is done, removes itself from your scenegraph.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17468" PostHistoryTypeId="25" PostId="8535" RevisionGUID="166f0e4c-343a-4249-9a9d-b54feff142fb" CreationDate="2011-02-14T11:22:23.827" Comment="http://twitter.com/#!/StackGameDev/status/37109394768396289" />
  <row Id="17469" PostHistoryTypeId="2" PostId="8541" RevisionGUID="a8475b5c-90a3-476c-a68f-81bc81800f79" CreationDate="2011-02-14T11:30:11.743" UserId="3794" Text="I'll just add one thing which wasn't said here: motion blur" />
  <row Id="17470" PostHistoryTypeId="2" PostId="8542" RevisionGUID="b8782998-ed95-4ad6-a8a3-58636a8c3b96" CreationDate="2011-02-14T11:42:03.090" UserId="1352" Text="I kind of assume that you're talking about a 3rd person view here of the spaceship because of how you described your idea. &#xD;&#xA;&#xD;&#xA;Just in case you have a first person view:&#xD;&#xA;Try the &quot;pilot pushed back in his seat due to accelleration&quot; look. ie. pulling the camera a bit away from the cockpit when the boost is triggered.&#xD;&#xA;&#xD;&#xA;**It might even be useful in a 3rd person setting too as you often need a bigger FOV when your speeds are higher (Like the camera in the top down GTA games).**" />
  <row Id="17471" PostHistoryTypeId="2" PostId="8543" RevisionGUID="00a262b8-93be-44bc-a971-bd1829fad6c2" CreationDate="2011-02-14T11:50:41.687" UserId="4082" Text="You need to think of the game as a &quot;finite state machine&quot;. The game can be in one of several states: in your case, &quot;expecting input&quot;, &quot;piece moving down&quot;, &quot;row exploding&quot;.&#xD;&#xA;&#xD;&#xA;You do different things depending on the state. For example, during &quot;piece moving down&quot; you ignore player input, and instead animate the piece from its current row to the next row. Something like this:&#xD;&#xA;&#xD;&#xA;    if state == ACCEPTING_INPUT:&#xD;&#xA;        if player presses any key:&#xD;&#xA;            handle input&#xD;&#xA;        row_timer = row_timer - time_since_last_frame&#xD;&#xA;        if row_timer &lt; 0:&#xD;&#xA;            state = MOVING_PIECE_DOWN&#xD;&#xA;    elif state == MOVING_PIECE_DOWN:&#xD;&#xA;        piece.y = piece.y + piece.speed*time_since_last_frame&#xD;&#xA;        if piece.y &gt;= target_piece_y:&#xD;&#xA;            piece.y = target_piece_y&#xD;&#xA;            state = ACCEPTING_INPUT" />
  <row Id="17473" PostHistoryTypeId="5" PostId="8535" RevisionGUID="0ab3fe9d-cd91-4d81-9b2a-239c7a61e187" CreationDate="2011-02-14T12:24:37.687" UserId="20" Comment="minor spelling corrections" Text="I have a spaceship and I've created a &quot;boost&quot; functionality that speeds up my spaceship, what effects should I implement to create the impression of high speed?&#xD;&#xA;&#xD;&#xA;I was thinking of making everything except my spaceship blurry but I think there would be something missing. Any ideas? &#xD;&#xA;&#xD;&#xA;Btw. I am working in XNA C# but if you aren't familiar to XNA describing some effects is still useful." />
  <row Id="17474" PostHistoryTypeId="4" PostId="8535" RevisionGUID="0ab3fe9d-cd91-4d81-9b2a-239c7a61e187" CreationDate="2011-02-14T12:24:37.687" UserId="20" Comment="minor spelling corrections" Text="Effects to make a speeding spaceship look faster" />
  <row Id="17475" PostHistoryTypeId="2" PostId="8545" RevisionGUID="c4523b36-cb75-45cd-94c8-3a90f631a83e" CreationDate="2011-02-14T13:15:26.363" UserId="1217" Text="My 2 cents, some of it has already been said but I'd like to make my answer coherent as I believe many of these points together would create a nice effect but just alone they don't do much to create the immersion:&#xD;&#xA;&#xD;&#xA; - Random camera shaking, I used Perlin noise to make this nice. There's a C# script available over at the unifywiki.&#xD;&#xA; - Some blurryness spherically around the camera edges, like in the later need for speed games when travelling very fast.&#xD;&#xA; - Make the exhaust flame bigger and more intensive&#xD;&#xA; - Pull the camera back and widen the FOV, also make the colors around the edges of the camera more pale, as if the pilot is focusing really hard on what's ahead.&#xD;&#xA; - have some distortion effects following the ship (if the game supports render to texture shaders)&#xD;&#xA; - Of course, a sound to give feedback (more intensive engine sound, some kind of &quot;moving fast through air sound&quot; if your game allows it style wise. &#xD;&#xA; - Something like what happens with space ships entering the atmosphere would be cool as well, some kind of fire at the bow of the ship.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="17476" PostHistoryTypeId="2" PostId="8546" RevisionGUID="22bce51f-04fb-4139-ad40-6598269c10bf" CreationDate="2011-02-14T13:25:14.170" UserId="1217" Text="In the hopes of finding a fellow unity3d developer also aiming for the Kongregate contest..&#xD;&#xA;&#xD;&#xA;I've implemented the Kongregate API and can see that the game receives a call with my username and presents it ingame. I'm using `Application.ExternalCall(&quot;kongregate.stats.submit&quot;,type,amount);`&#xD;&#xA;&#xD;&#xA;where `type` is a string &quot;Best Score&quot; and `amount` is an int (1000 or something).&#xD;&#xA;&#xD;&#xA;This is the error I'm getting: `You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.&#xD;&#xA; callASFunction:function(a,b){if(FABrid...tion, can be used as a workaround.&quot;); `&#xD;&#xA;&#xD;&#xA;I'm wondering, has anyone else had this error or am I somehow doing something stupid?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="17477" PostHistoryTypeId="1" PostId="8546" RevisionGUID="22bce51f-04fb-4139-ad40-6598269c10bf" CreationDate="2011-02-14T13:25:14.170" UserId="1217" Text="Strange javascript error when using Kongregates API" />
  <row Id="17478" PostHistoryTypeId="3" PostId="8546" RevisionGUID="22bce51f-04fb-4139-ad40-6598269c10bf" CreationDate="2011-02-14T13:25:14.170" UserId="1217" Text="&lt;unity&gt;&lt;javascript&gt;&lt;api&gt;" />
  <row Id="17479" PostHistoryTypeId="2" PostId="8547" RevisionGUID="b653e5d5-650d-415b-8791-9de8b31f58aa" CreationDate="2011-02-14T14:14:23.983" UserId="3656" Text="To add on to Phil's suggestion about sound, take multiple approaches to it. You would combine multiple visual effects to achieve the sensation of speed, so do the same with sound.&#xD;&#xA;&#xD;&#xA;Have a slight increase in volume to your thrusting sound, or crossfade to one that is more intense and &quot;whooshy&quot;. If your collision is split into broad and narrow phase, raise an event when another object gets checked in narrow phase but doesn't actually hit. When this happens, play back a &quot;whipping by&quot;/Doppler effect sort of sound. You can vary it by shifting the pitch variance range upward as the difference between the velocity of the player and the velocity of the object increases.&#xD;&#xA;&#xD;&#xA;Also kick your music up a notch, fade in a supplemental rhythm track (layered on top of your main music track). This isn't directly related to perceived speed of the player, but will help increase the emotional intensity, which is what you're after at the end of the day." />
  <row Id="17480" PostHistoryTypeId="25" PostId="8534" RevisionGUID="6b45f8f2-9600-48f4-9fdd-84875756472f" CreationDate="2011-02-14T14:22:23.787" Comment="http://twitter.com/#!/StackGameDev/status/37154692903473152" />
  <row Id="17481" PostHistoryTypeId="2" PostId="8548" RevisionGUID="8337c438-38bf-4bda-879c-c6a9071d8dfc" CreationDate="2011-02-14T14:34:21.070" UserId="1829" Text="We have a big game project on Unity at school on which we are 12 to work on. My teacher seems to be convinced it's an important tool to teach students, since it makes students look from the high level to the lower level.&#xD;&#xA;&#xD;&#xA;I can understand his view, and I'm wondering: Is unity such an important engine in game developping companies ? Are there a lot of companies using it because they can't afford to use something else ? He is talking like Unity is a big player in game making, but I only see it fit small indie game companies who want to do a game as fast as possible.&#xD;&#xA;&#xD;&#xA;Do you think Unity is that much important in the industry ?&#xD;&#xA;Does it endangers the value of C++ skills ?&#xD;&#xA;&#xD;&#xA;It's not that I don't like Unity, it's just that I don't learn nothing with it, I prefer to achieve little steps with Ogre or SFML instead.&#xD;&#xA;&#xD;&#xA;Also, we also have C++ practice exercises, but those are just practice with theory, nothing much." />
  <row Id="17482" PostHistoryTypeId="1" PostId="8548" RevisionGUID="8337c438-38bf-4bda-879c-c6a9071d8dfc" CreationDate="2011-02-14T14:34:21.070" UserId="1829" Text="I prefer C/C++ over Unity and other tools: is it such a big downer for a game developper ?" />
  <row Id="17483" PostHistoryTypeId="3" PostId="8548" RevisionGUID="8337c438-38bf-4bda-879c-c6a9071d8dfc" CreationDate="2011-02-14T14:34:21.070" UserId="1829" Text="&lt;c++&gt;&lt;unity&gt;&lt;scripting&gt;" />
  <row Id="17484" PostHistoryTypeId="2" PostId="8549" RevisionGUID="c0199f48-5e0a-42bb-b03a-ad9fb7ae1b78" CreationDate="2011-02-14T14:53:20.567" UserId="323" Text="The traditional solution to this is a finite state machine, which is being suggested in several comments.&#xD;&#xA;&#xD;&#xA;I hate finite state machines.&#xD;&#xA;&#xD;&#xA;Sure, they're simple, they're supported in every language, but they're such an amazing pain to work with. Every manipulation takes a ton of bugprone copy-and-paste code, and tweaking the effect in small ways can be a huge change to code.&#xD;&#xA;&#xD;&#xA;If you can use a language that supports them, I recommend coroutines. They let you write code that looks like:&#xD;&#xA;&#xD;&#xA;    function TetrisPieceExplosion()&#xD;&#xA;      for brightness = 0, 1, 0.2 do&#xD;&#xA;        SetExplosionBrightness(brightness)&#xD;&#xA;        coroutine.yield()&#xD;&#xA;      end&#xD;&#xA;    &#xD;&#xA;      AllowNewBlockToFall()&#xD;&#xA;    &#xD;&#xA;      SpawnABunchOfParticles()&#xD;&#xA;&#xD;&#xA;      RemoveBlockPhysics()&#xD;&#xA;    &#xD;&#xA;      for transparency = 0, 1, 0.5 do&#xD;&#xA;        SetBlockTransparency(transparency)&#xD;&#xA;        coroutine.yield()&#xD;&#xA;      end&#xD;&#xA;&#xD;&#xA;      RemoveBlockGraphics()&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;Obviously rather pseudocodey, but it should be clear that not only is this a simple linear description of the special effect, but it easily lets us drop a new block *while the animation is still finishing*. Accomplishing this with a state machine will generally be ghastly.&#xD;&#xA;&#xD;&#xA;To the best of my knowledge, this functionality isn't easily available in C, C++, C#, Objective C, or Java. This is one of the main reasons I use Lua for all my game logic :)" />
  <row Id="17485" PostHistoryTypeId="2" PostId="8550" RevisionGUID="d8939a90-5665-4ffa-a089-75cf1990f3b8" CreationDate="2011-02-14T14:55:28.653" UserId="337" Text="As far as I can tell, it depends on your target platform, AAA games and console (XBOX, Wii, etc) games will typically be in C++ to get maximum performance, however if you'r writing a browser based game Unity is also frequently used.&#xD;&#xA;&#xD;&#xA;However as to your question, I think its simply to do with that tools like Unity give you a large standardized framework to work in, which in a project of half a year can make the difference between half baked prototype and pretty fleshed out game." />
  <row Id="17486" PostHistoryTypeId="2" PostId="8551" RevisionGUID="e295afbb-f8ca-42a5-a4f2-fc46824d5e6b" CreationDate="2011-02-14T14:56:00.033" UserId="953" Text="Unity is growing in popularity in the industry, mostly in smaller companies.  However, it is an excellent teaching environment.  It is an important teaching tool, but not particularly common among mainstream companies.  It's okay that you don't prefer it.&#xD;&#xA;&#xD;&#xA;Let me note something here, though, as I often see a confusion among programming students.  &quot;C++ skills&quot; are not very useful in the long run.  What you should be seeking out are &quot;programming skills&quot; and &quot;design skills.&quot;  If you understand programming language concepts and how a software system is put together, then language doesn't really matter.  I don't consider myself an amazing developer, but I can pick up a new language and produce useful code in a day or two, because I understand the fundamentals.&#xD;&#xA;&#xD;&#xA;Learning Unity will make you better at C++." />
  <row Id="17487" PostHistoryTypeId="2" PostId="8552" RevisionGUID="b7ab7cba-f916-4120-a243-95f5b8954cdb" CreationDate="2011-02-14T14:56:23.790" UserId="323" Text="I've been finding side projects help a lot. I went and got a job at an actual game studio, and somehow, spending forty hours a week plowing through game bugs makes me *more productive at home*, even discounting the fewer hours I work on my own projects.&#xD;&#xA;&#xD;&#xA;If I end up leaving this studio I'll probably contract myself out as an indie game coder. You provide art and design and money, I make your game, and on the side, I make my game.&#xD;&#xA;&#xD;&#xA;Another trick I've found is that, if you start getting bored with writing a game, start a different game. You have to be *really careful with this one* so you don't just leave a trail of abandoned games behind, but as long as you keep going back to them, juggling two or three dev projects can leave you more productive on all of them than you'd be individually." />
  <row Id="17488" PostHistoryTypeId="2" PostId="8553" RevisionGUID="38529fb3-d22b-4619-988f-95262fbf7ae6" CreationDate="2011-02-14T15:37:46.660" UserId="4264" Text="I've found this helpful, and it can also be found in &lt;a href=&quot;http://www.amazon.com/If-You-Want-Write-Independence/dp/1555972608&quot;&gt;_&quot;If you want to write&quot;_&lt;/a&gt; by Brenda Ueland.&#xD;&#xA;&#xD;&#xA;Take a walk.&#xD;&#xA;&#xD;&#xA;A long walk. At least 45 minutes. With no specific destination. Don't try to think about anything specific. At some point, things just start to pop in your head." />
  <row Id="17489" PostHistoryTypeId="5" PostId="8548" RevisionGUID="1b7030b6-2b04-4b21-bb53-a321112df5d6" CreationDate="2011-02-14T15:45:04.080" UserId="51" Comment="English fixes; deleted 2 characters in body" Text="We have a big game project using Unity at school. There are 12 of us working on it. My teacher seems to be convinced it's an important tool to teach students, since it makes students look from the high level to the lower level.&#xD;&#xA;&#xD;&#xA;I can understand his view, and I'm wondering: Is unity such an important engine in game development companies? Are there a lot of companies using it because they can't afford to use something else? He is talking like Unity is a big player in game making, but I only see it fit small indie game companies who want to do a game as fast as possible.&#xD;&#xA;&#xD;&#xA;Do you think Unity is of that much importance in the industry?&#xD;&#xA;Does it endanger the value of C++ skills?&#xD;&#xA;&#xD;&#xA;It's not that I don't like Unity, it's just that I don't learn anything with it, I prefer to achieve little steps with Ogre or SFML instead.&#xD;&#xA;&#xD;&#xA;Also, we also have C++ practice exercises, but those are just practice with theory, nothing much." />
  <row Id="17490" PostHistoryTypeId="4" PostId="8548" RevisionGUID="1b7030b6-2b04-4b21-bb53-a321112df5d6" CreationDate="2011-02-14T15:45:04.080" UserId="51" Comment="English fixes; deleted 2 characters in body" Text="I prefer C/C++ over Unity and other tools: is it such a big downer for a game developer ?" />
  <row Id="17491" PostHistoryTypeId="2" PostId="8554" RevisionGUID="ca80cd3f-1704-4ceb-aa3b-c34fa7e13556" CreationDate="2011-02-14T15:47:43.103" UserId="4604" Text="Unity is a perfectly valid solution in this context.  Imagine for a second having 12 people, most of whom are still in the process of learning C++, writing a large and complex game application using it.  In the amount of time spent debugging alone you will probably have been able to write *another* game in Unity.&#xD;&#xA;&#xD;&#xA;I'm not saying knowing how to use C++ is not important - it is, especially if you plan on joining the 'mainstream' gaming industry.  But perhaps your instructor is correct in this case - use this project as a learning experience in how to think about architecting a game, and have fun doing it.  In the process, try to hone your C++ skills using exercises or even go so far as to write small games in the meantime using SFML or some other basic framework.&#xD;&#xA;&#xD;&#xA;When it is all done, you will have learned a lot, probably become a better programmer, and your next project can be tackled in C++ with a lot more confidence." />
  <row Id="17492" PostHistoryTypeId="2" PostId="8555" RevisionGUID="fec48cef-a0fa-439c-a41f-25f6d342cd7e" CreationDate="2011-02-14T15:55:42.977" UserId="51" Text="&gt;Are there a lot of companies using it because they can't afford to use something else? &#xD;&#xA;&#xD;&#xA;Yes, but &quot;afford&quot; is so much more than just straight up dollar values.&#xD;&#xA;&#xD;&#xA;Yes, the feature set that Unity Pro gives you at the cost they charge is ridiculous, especially considering the fact that it's seat licenses instead of per-title licenses.&#xD;&#xA;&#xD;&#xA;But on top of that, it's a really easy tool to use.  You're not spending as much *time* training artists and designers how to use the art pipeline.  It's easy to say &quot;just drag in your textures and models and they're good to go.&#xD;&#xA;&#xD;&#xA;On top of that, it's one of the very few tools that actually let's you do 3D in a browser with any kind of regularity.  They support pretty much every shader platform from fixed function to DX9+ as well as Mac and Windows.  That tech alone is *invaluable* if you want to target the growing &quot;browser based game&quot; market.  &#xD;&#xA;&#xD;&#xA;From a programming side of things, what you get from Unity is a firm grasp of component design (compared to rolling your own C++ engine, which is usually too heavy on the inheritance side), as well as a very quick and visual environment to try out game code.  You'll hopefully learn good design practices by using Unity, that you can take over to future C++ engines.  &#xD;&#xA;&#xD;&#xA;Sure, it's fine to have a preference of one language over another.  Personally I prefer C# over C++.  But what language you use is really driven by the project requirements more so than anything else.  Developers can't really afford to be fanboys since you don't want to lock yourself out of a market because you happen to not like the tools or language for one reason or another. &#xD;&#xA;&#xD;&#xA;Besides, once you really learn a second language you can see that it's mostly just picking up new syntax and paradigms, and it really isn't that hard usually to add new tools to your tool belt.  Yes, you should learn and understand C++, but on a high level you need to understand good design first." />
  <row Id="17493" PostHistoryTypeId="2" PostId="8556" RevisionGUID="cd3ed56b-ca86-406b-9d96-248d5e8d84d9" CreationDate="2011-02-14T16:06:10.083" UserId="4210" Text="You say application? I'm going to asume you mean just games rather than any old application.&#xD;&#xA;&#xD;&#xA;For games in general (excluding iOS for the time being) C++ has been the staple for a long time in the games industry, and as such there are many many tools available for it, physics, graphics etc. C# is looking good atm, and the XNA platform is easy to use, You can also use C# with Unity3D if you are looking for a pre-built solution.&#xD;&#xA;&#xD;&#xA;I'm not sure how many games on the iOS use Obj-C, I wouldn't be surprised if alot of them are C++, All the ones I know for certain are in C++ or Unity and I dont know anybody who's made a Obj-C game for the iOS (Which is more todo with the circles I'm in than anything else). The game I've been working on for iOS is all C++.&#xD;&#xA;&#xD;&#xA;Obj-C and C++ talk to each other quite happily the xcode compiler is smart enough to know what is what.&#xD;&#xA;&#xD;&#xA;In short:&#xD;&#xA;&#xD;&#xA;Xcode is almost a must. The only exception I can think off at the top of my head is if you use Unity, or Corona (which you might want to look into, I've heard flash devs talk nicely about it)&#xD;&#xA;&#xD;&#xA;Obj-C You will need to know a little at the very least (this can just be cut and pasting)&#xD;&#xA;&#xD;&#xA;C++ Has a big following, however you will need a little Obj-C to get your game working even if you use C++." />
  <row Id="17494" PostHistoryTypeId="2" PostId="8557" RevisionGUID="c5532c0d-2e5b-4baf-8ed4-b03bdc11d796" CreationDate="2011-02-14T16:21:07.823" UserId="2132" Text="The core issue, from what I can see, is not C++ or Unity3D, but rather **do you need a high-level solution or a low-level solution**.&#xD;&#xA;&#xD;&#xA;A low-level solution is one which you get dirty with the processes of handing input, managing memory or loading the models. A high-level solution is which you get one neat package, like Unity3D.&#xD;&#xA;&#xD;&#xA;To me, whether to use Unity3D (or any other game engine) or C++ depends on the goals of your game and project.&#xD;&#xA;&#xD;&#xA;- Use Unity3D, if development time has to be quick and/or your game is not performance intensive or is not on the high end of graphical/computational performance. If you wish to concentrate on the game-play, and the default tools that Unity3D provide is all right, you may wish to consider using Unity3D&#xD;&#xA;&#xD;&#xA;- C++ with other libraries, if you have longer development time, the game requires more computational/graphical power, or employs some technology that Unity3D cannot incorporate. &#xD;&#xA;&#xD;&#xA;The good thing about Unity3D is that it still employs scripting languages which mirror real world development (C# or JavaScript). The OOP and software engineering concepts you learn (Singletons, facade, state machines, decorators, composition) can be applied in Unity3D. It helps to take care of the cookie-cutter processes such as resources management, scene graph, model loading, rendering, saving of scenes and etc. Even better, if there is a functionality you need which Unity3D don't provide, you can do DLL coding.&#xD;&#xA;&#xD;&#xA;Where does that leave C++? C++ is a language, and there are many programming concepts you do in C++ you can do in Unity3D, sans memory management or perhaps templates ( With Unity 3.2, the language specs have improved to cover closures, for example).&#xD;&#xA;&#xD;&#xA; So as I have stated, it's not really C++ vs. Unity3D. It is more of &quot;C++ plus libraries/SDK or roll your own engine&quot; vs. Unity3D. It depends on your goals and objectives. For high-end games or games where you need control over the rendering pipeline or input, you may want to use C++ plus an engine which allows you to mess under the hood. If not, I go with Unity3D as my default choice for 3D games.&#xD;&#xA;&#xD;&#xA;However, knowledge with Unity3d is not under the hood experience, but it is a good place to start for learning the overall process of developing games. For instance, you probably will need a semester worth of studying to write a renderer and load a model in OpenGL, plus a basic scenegraph and input. You get that done in Unity3D in less than a day." />
  <row Id="17495" PostHistoryTypeId="2" PostId="8558" RevisionGUID="e82a5289-8994-4cdf-a697-7e958fd311ad" CreationDate="2011-02-14T16:55:23.597" UserId="4662" Text="You can use a priority queue of actions. You push in an action, and a time. Each frame, you get the time, and you pop off all actions that have a time specified as before that time and execute them. Bonus: Approach parallelises nicely, and you can actually implement almost all game logic this way." />
  <row Id="17496" PostHistoryTypeId="2" PostId="8559" RevisionGUID="d8af9c78-52ac-4b2b-ba12-175bea1fc75c" CreationDate="2011-02-14T16:56:00.993" UserId="1956" Text="I don't mean to start a holy war here, but most of the internet services (flickr, twitter, facebook and such) have been dropping SOAP in favor of RESTful webservices and JSON as the serialized format. Although essentially the same, REST services rely on the url and http method to define what should be done, for example&#xD;&#xA;&#xD;&#xA;    GET /articles - list all articles&#xD;&#xA;    POST /articles - add a new article&#xD;&#xA;    PUT /articles/123 - update article 123 with new data&#xD;&#xA;&#xD;&#xA;JSON - described in json.org - is also simpler than XML, and altough maybe irrelevant, will save you a few bytes per request. Following the previous example, here's how an article would be described in JSON notation:&#xD;&#xA;&#xD;&#xA;    { &#xD;&#xA;     &quot;id&quot;: 123,&#xD;&#xA;     &quot;author&quot;: &quot;Cyril&quot;,&#xD;&#xA;     &quot;content&quot;: &quot;Hello, this is an article&quot;,&#xD;&#xA;     &quot;tags&quot;: [ &quot;gamedev&quot;, &quot;webservices&quot;, &quot;multiplayer&quot; ] &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;For the IOS there's this nice article http://petermcintyre.wordpress.com/2010/11/04/consume-json-rest-in-ios/ which mentions &#xD;&#xA;http://code.google.com/p/json-framework/ for parsing and generating the data.&#xD;&#xA;&#xD;&#xA;Being turn-based, you can rely on http sessions on the server to maintain state, so there's no need to keep a persistent socket connection to the server. Any server-side language supports this (php, python, java, etc).&#xD;&#xA;&#xD;&#xA;This architecture allows you to scale horizontally (adding more servers) in a transparent way." />
  <row Id="17497" PostHistoryTypeId="2" PostId="8560" RevisionGUID="bf8defb3-d705-43a9-b9ff-7ab0a81e055d" CreationDate="2011-02-14T17:00:08.040" UserId="3659" Text="Some suggestions&#xD;&#xA;&#xD;&#xA;- background sliding quickly in the opposite direction&#xD;&#xA;- objects/asteroids around the ship quickly moving in the opposite direction&#xD;&#xA;- after-images" />
  <row Id="17498" PostHistoryTypeId="25" PostId="8548" RevisionGUID="18e406ee-e2ec-40de-ab54-ea57957f410f" CreationDate="2011-02-14T17:22:25.077" Comment="http://twitter.com/#!/StackGameDev/status/37199997082537984" />
  <row Id="17499" PostHistoryTypeId="2" PostId="8561" RevisionGUID="c8379f10-e6f8-4600-a35a-312df5bb5808" CreationDate="2011-02-14T17:40:26.383" UserId="2710" Text="No, Unity3D in no way endangers C++ skills. In fact, knowing C++ is way more important for a game programmer.&#xD;&#xA;&#xD;&#xA;Unity3D is a really great tool for game development. I really like it myself, and would recommend it for almost any game, especially for small teams. But Unity3D itself is written in C++; and you have to know C++ (and also a bunch of other low-level stuff) to really understand how it works.&#xD;&#xA;&#xD;&#xA;Even if you use Unity3D, only C++ skills and low-level understanding of principles and algorithms involved would allow you to use it to its full potential. This applies to other game engines too, by the way. &#xD;&#xA;&#xD;&#xA;And to do a really good job, to squeeze every last bit of performance out of your platform of choice, and cram as many state-of-the-art effects and algorithms as possible, you can't use anything but C/C++. With bits of assembler, probably. " />
  <row Id="17504" PostHistoryTypeId="2" PostId="8563" RevisionGUID="d08308a9-6dc0-452a-8d88-3bdc46b642e7" CreationDate="2011-02-14T18:56:14.337" UserId="1156" Text="I'm taking this from Game Coding Complete by Mike McShaffry.&#xD;&#xA;&#xD;&#xA;He talks about a 'Process Manager', which boils down to a list of tasks that need to be done. For example, a process would control the animation for drawing a sword (AnimProcess), or opening a door, or in your case, make the row disappear.&#xD;&#xA;&#xD;&#xA;The process would be added to the process manager's list, which would be iterated every frame and Update() called on each. So verymuchlike entities, but for actions. There would be a kill flag to remove from the list when it has finished.&#xD;&#xA;&#xD;&#xA;The other neat thing about them is how they can link, by having a pointer to the next process. In this way, your animate row process may actually consist of:&#xD;&#xA;&#xD;&#xA; - An AnimationProcess for the row disappearing&#xD;&#xA; - A MovementProcess to remove the pieces&#xD;&#xA; - A ScoreProcess to add points to the score&#xD;&#xA;&#xD;&#xA;(Since processes can be one-use things, conditionally there, or there for X amount of time)&#xD;&#xA;&#xD;&#xA;If you want any more details, ask away." />
  <row Id="17510" PostHistoryTypeId="2" PostId="8566" RevisionGUID="c150301a-286d-4469-a580-801a34dfd2da" CreationDate="2011-02-14T20:24:00.330" UserId="4983" Text="http://ibetatest.com/&#xD;&#xA;&#xD;&#xA;Have people play test your games before sending them off for submission.  You'll get great feedback from the people there, and it's really cheap.  I usually pay $5 to a beta tester and they offer a lot of constructive feedback.&#xD;&#xA;&#xD;&#xA;It's better to have a polished game that you want to market then to have an unpolished one." />
  <row Id="17511" PostHistoryTypeId="2" PostId="8567" RevisionGUID="15fec35d-4110-4d61-a2d7-42f31138475e" CreationDate="2011-02-14T20:30:07.577" UserId="1163" Text="Make everything else except your ship, act like it's in slow-motion. Even if everything moves at the same speed, but just animates slower. This will give the feeling that you have an increased rate, like adrenaline or something." />
  <row Id="17512" PostHistoryTypeId="2" PostId="8568" RevisionGUID="3c7fcfa4-b0a4-4c03-bc87-82f5dd6c87a6" CreationDate="2011-02-14T20:39:49.823" UserId="1021" Text="This question is a follow-up to http://gamedev.stackexchange.com/questions/8283/texture-artifacts-on-ipad/8524#8524&#xD;&#xA;&#xD;&#xA;How does one &quot;clear the alpha of the render texture frameBufferObject&quot;?  I've searched around here, StackOverflow and various search engines but no luck.  I've tried a few things... for example calling GlClear(GL_COLOR_BUFFER_BIT) at the beginning of my render loop... but it doesn't seem to make a difference.  Any help is appreciated since I'm still new to OpenGL.&#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;p.s.  I read on SO and in Apple's documentation that GlClear should always be called at the beginning of the renderLoop.  Agree?  Disagree?  Here's where I read this: http://stackoverflow.com/questions/2538662/how-does-glclear-improve-performance" />
  <row Id="17513" PostHistoryTypeId="1" PostId="8568" RevisionGUID="3c7fcfa4-b0a4-4c03-bc87-82f5dd6c87a6" CreationDate="2011-02-14T20:39:49.823" UserId="1021" Text="OpenGL-ES:  clearing the alpha of the FrameBufferObject" />
  <row Id="17514" PostHistoryTypeId="3" PostId="8568" RevisionGUID="3c7fcfa4-b0a4-4c03-bc87-82f5dd6c87a6" CreationDate="2011-02-14T20:39:49.823" UserId="1021" Text="&lt;graphics&gt;&lt;textures&gt;&lt;opengl-es&gt;&lt;ipad&gt;" />
  <row Id="17517" PostHistoryTypeId="2" PostId="8571" RevisionGUID="1c4de163-90c3-42d7-abe8-75898c58e185" CreationDate="2011-02-14T20:52:17.667" UserId="2798" Text="Try&#xD;&#xA;&#xD;&#xA;    glClearColor(0, 0, 0, 0);&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;to clear both the color buffer (with transparent black) and the depth buffer, in case you are using depth testing.&#xD;&#xA;&#xD;&#xA;glClear must be called unless you are really sure you are redrawing all the pixels every frame, so parts of previous frames don't show over your new render." />
  <row Id="17519" PostHistoryTypeId="2" PostId="8572" RevisionGUID="c96f8130-7711-4534-8f4d-d0c851bd6df9" CreationDate="2011-02-14T22:24:31.927" UserId="5450" Text="I am a first year college student in India and want to make a small game as a this semester project.&#xD;&#xA;I am quite good at C and am learning it rapidly but I wanted to ask if developing a game entirely in C(no C++ or C#m I'd love to use these but for college projects, we have strict requirements of using only C).&#xD;&#xA;What I am looking for is a simple top view driving game. It won't have anything fancy and even the visual things will be powered by simple characters. For example, user controlled car can be represented by ▓ and edges of road by series of |'s.&#xD;&#xA;What do you think?" />
  <row Id="17520" PostHistoryTypeId="1" PostId="8572" RevisionGUID="c96f8130-7711-4534-8f4d-d0c851bd6df9" CreationDate="2011-02-14T22:24:31.927" UserId="5450" Text="Game Development In C Only. Is it possible?" />
  <row Id="17521" PostHistoryTypeId="3" PostId="8572" RevisionGUID="c96f8130-7711-4534-8f4d-d0c851bd6df9" CreationDate="2011-02-14T22:24:31.927" UserId="5450" Text="&lt;c&gt;" />
  <row Id="17522" PostHistoryTypeId="2" PostId="8573" RevisionGUID="1ceb8158-4d08-4582-8952-8dfb8624f473" CreationDate="2011-02-14T22:31:46.743" UserId="1356" Text="Writing games in C is no problem. Quake II is written purely in C, so there should be no more problem writing it in C, if your good in it, then in C++." />
  <row Id="17523" PostHistoryTypeId="2" PostId="8574" RevisionGUID="5da71da3-d85e-4883-8063-207a3f847f67" CreationDate="2011-02-14T22:45:05.343" UserId="4662" Text="Yes, it's perfectly possible. Many OS-level APIs like POSIX and Windows, DirectX and OpenGL all have C-compatible interfaces." />
  <row Id="17524" PostHistoryTypeId="2" PostId="8575" RevisionGUID="de4b9b73-fc19-43ee-8d27-017df9000b73" CreationDate="2011-02-14T22:53:15.577" UserId="4604" Text="Without a doubt.  A lot of libraries useful in game development (such as SDL, PhysFS, etc...) have C APIs, which helps a lot.&#xD;&#xA;&#xD;&#xA;You may wish to look into embedding a scripting language such as &lt;a href=&quot;http://www.lua.org&quot;&gt;lua&lt;/a&gt; if you wish to do any extensible, high-level programming.  Many people are beginning to see the appeal in programming a C framework that uses lua for things such as AI, events, etc...&#xD;&#xA;&#xD;&#xA;Good luck." />
  <row Id="17525" PostHistoryTypeId="2" PostId="8576" RevisionGUID="3df7986d-72d7-4f24-976b-d66df44814cc" CreationDate="2011-02-14T23:04:22.663" UserId="3794" Text="Simple for answer is: You can do simple text based game like this in every programing language. Even pascal, basic or x86 assembler :]&#xD;&#xA;&#xD;&#xA;(and do not need anything else)" />
  <row Id="17526" PostHistoryTypeId="2" PostId="8577" RevisionGUID="c59915d3-09c3-4464-a88f-02c2d266d698" CreationDate="2011-02-14T23:06:46.127" UserId="721" Text="Fabien Sanglard has written an article about his 3d engine in C. On reddit, this article has created an interesting debate.&#xD;&#xA;&#xD;&#xA; - http://fabiensanglard.net/c/&#xD;&#xA; - http://www.reddit.com/r/gamedev/comments/ctiqm/iphone_3d_engine_experience_from_2009_especially/&#xD;&#xA;&#xD;&#xA;C++ is a very difficult langage. So use it carefully.&#xD;&#xA;" />
  <row Id="17527" PostHistoryTypeId="5" PostId="8577" RevisionGUID="e4807e9a-570e-41c7-b918-5fac5f6fceb0" CreationDate="2011-02-14T23:15:29.160" UserId="721" Comment="added 188 characters in body" Text="Fabien Sanglard has written an article about his 3d engine in C. On reddit, this article has created an interesting debate.&#xD;&#xA;&#xD;&#xA; - http://fabiensanglard.net/c/&#xD;&#xA; - http://www.reddit.com/r/gamedev/comments/ctiqm/iphone_3d_engine_experience_from_2009_especially/&#xD;&#xA;&#xD;&#xA;Languages are only tools... So use them wisely. To create a good game, it can be easier to use XNA or Unity3D. Mastering C is a good first step, but you must learn C++, D, python, lua ... C++ is a very difficult langage. So use it carefully.&#xD;&#xA;" />
  <row Id="17528" PostHistoryTypeId="25" PostId="8572" RevisionGUID="041813f3-f15c-482c-af80-e895a564b49f" CreationDate="2011-02-14T23:22:26.827" Comment="http://twitter.com/#!/StackGameDev/status/37290600776736768" />
  <row Id="17529" PostHistoryTypeId="2" PostId="8578" RevisionGUID="ea10ab63-9378-4c4f-baf6-b9a28e0fbe99" CreationDate="2011-02-14T23:32:42.243" UserId="721" Text="Angry Birds is written in C/C++ and use its own 3d engine. For the physics part, rovio use Box2D. For the iphone version, they use ObjC to initialize the application and create the OpenGL ES context; otherwise it is C/C++.&#xD;&#xA;&#xD;&#xA;If you want to develop your own game, it is easier to use Unity3d. If you need OpenSource library, use cocos2d.&#xD;&#xA;&#xD;&#xA;Ps: You can find interesting symbols in .so of the android version." />
  <row Id="17530" PostHistoryTypeId="5" PostId="8573" RevisionGUID="bc263a67-3369-4a82-80a1-42f4524a7288" CreationDate="2011-02-15T00:51:10.053" UserId="4191" Comment="your -&gt; you're, then -&gt; than, gratuitous link to bring up edit distance" Text="Writing games in C is no problem. [Quake II][1] is written purely in C, so there should be no more problem writing it in C, if you're good in it, than in C++.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quake_II" />
  <row Id="17531" PostHistoryTypeId="24" PostId="8573" RevisionGUID="43bdb766-1583-4be5-8a2e-7b6f07d7b660" CreationDate="2011-02-15T00:51:10.053" Comment="Proposed by 4191 approved by 51 edit id of 29" />
  <row Id="17532" PostHistoryTypeId="5" PostId="8576" RevisionGUID="3a5cee56-5773-4498-ae0c-ffd7543aa396" CreationDate="2011-02-15T01:03:08.917" UserId="3794" Comment="added 14 characters in body; edited body" Text="Simple answer for this question is: You can do simple text based game like this in every programing language. Even pascal, basic or x86 assembler :]&#xD;&#xA;&#xD;&#xA;(and do not need anything else)" />
  <row Id="17533" PostHistoryTypeId="2" PostId="8579" RevisionGUID="1f9b4c60-816d-4c9e-b9e0-97e0f47d1f69" CreationDate="2011-02-15T01:14:33.320" UserId="3971" Text="As I'm returning to game dev, I've realized that I've lost a lot of the knowledge I had before. So now I'm looking at design patterns that I can use for my next project.&#xD;&#xA;&#xD;&#xA;One design pattern that I've seen a lot is the 'composition method,' which uses actors and components. Is that the right name for it? I'd like to look more at this and see what the advantages/pitfalls are.&#xD;&#xA;&#xD;&#xA;So what design patterns are out there, and what are the advantages/disadvantages to them?" />
  <row Id="17534" PostHistoryTypeId="1" PostId="8579" RevisionGUID="1f9b4c60-816d-4c9e-b9e0-97e0f47d1f69" CreationDate="2011-02-15T01:14:33.320" UserId="3971" Text="Design Patterns and their most common uses for them" />
  <row Id="17535" PostHistoryTypeId="3" PostId="8579" RevisionGUID="1f9b4c60-816d-4c9e-b9e0-97e0f47d1f69" CreationDate="2011-02-15T01:14:33.320" UserId="3971" Text="&lt;engine&gt;&lt;architecture&gt;&lt;design-patterns&gt;" />
  <row Id="17536" PostHistoryTypeId="5" PostId="8579" RevisionGUID="c1c3d655-28cb-4b88-b504-a5ed13956090" CreationDate="2011-02-15T01:22:55.607" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are some programming design patterns that are useful in game development?](http://gamedev.stackexchange.com/questions/4157/what-are-some-programming-design-patterns-that-are-useful-in-game-development)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;As I'm returning to game dev, I've realized that I've lost a lot of the knowledge I had before. So now I'm looking at design patterns that I can use for my next project.&#xD;&#xA;&#xD;&#xA;One design pattern that I've seen a lot is the 'composition method,' which uses actors and components. Is that the right name for it? I'd like to look more at this and see what the advantages/pitfalls are.&#xD;&#xA;&#xD;&#xA;So what design patterns are out there, and what are the advantages/disadvantages to them?" />
  <row Id="17537" PostHistoryTypeId="10" PostId="8579" RevisionGUID="b8cbe2c7-9ed4-415b-810c-730a8d66779c" CreationDate="2011-02-15T01:22:55.467" UserId="189" CloseReasonId="1" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="17538" PostHistoryTypeId="2" PostId="8580" RevisionGUID="171c0ff8-56c7-4eba-bae7-77e61384a2c8" CreationDate="2011-02-15T01:23:25.017" UserId="4638" Text="I've found this to be a good resource  [Game Programming Patterns][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gameprogrammingpatterns.com/" />
  <row Id="17539" PostHistoryTypeId="2" PostId="8581" RevisionGUID="a24a87d6-d454-4dd0-8d69-8b4b2449e809" CreationDate="2011-02-15T02:22:13.310" UserId="395" Text="I work on a AAA MMORPG codebase that is pure C, so yes." />
  <row Id="17540" PostHistoryTypeId="25" PostId="8579" RevisionGUID="5f3cf1fc-3b9b-4245-8946-c876ddef305c" CreationDate="2011-02-15T02:22:26.993" Comment="http://twitter.com/#!/StackGameDev/status/37335898265747456" />
  <row Id="17541" PostHistoryTypeId="2" PostId="8582" RevisionGUID="950e3a91-041f-4262-97b0-d88274369ee2" CreationDate="2011-02-15T02:23:23.153" UserId="3971" Text="I want to use certain parts of the [Game State Management Example][1] in a game I'm making, but I'm not sure how to do this legally. It says in the [license][2] that I'm supposed to include a copy of the license with it. So if I make a Visual Studio Solution, I just add the license.txt to the solution? Also, if I use a class and change it, do I have to keep the license info at the top or add that I changed it or what?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management &quot;Game State Management Example&quot;&#xD;&#xA;  [2]: http://create.msdn.com/downloads/?id=15" />
  <row Id="17542" PostHistoryTypeId="1" PostId="8582" RevisionGUID="950e3a91-041f-4262-97b0-d88274369ee2" CreationDate="2011-02-15T02:23:23.153" UserId="3971" Text="Understanding the Microsoft Permissive License" />
  <row Id="17543" PostHistoryTypeId="3" PostId="8582" RevisionGUID="950e3a91-041f-4262-97b0-d88274369ee2" CreationDate="2011-02-15T02:23:23.153" UserId="3971" Text="&lt;xna&gt;&lt;licensing&gt;" />
  <row Id="17544" PostHistoryTypeId="2" PostId="8583" RevisionGUID="b915fb80-91a5-48cf-9d46-900a86e37d4a" CreationDate="2011-02-15T03:32:16.463" UserId="953" Text="I am not a lawyer.&#xD;&#xA;&#xD;&#xA;3.D says that a distribution of the source code must include the license; if you don't distribute the source code, you don't need to worry about that sentence.  3.C says that you may not remove any of the notices it mentions, if they are present.  That would include a message printed on the screen or a credits dialog.&#xD;&#xA;&#xD;&#xA;If you change one of the source classes, I would keep the license info at the top; you don't need to add that you changed it, but it might be a nice thing to add a note saying so.&#xD;&#xA;&#xD;&#xA;In general, this is a pretty standard-looking open-ish source license that does a few things to cover the contributors' asses but doesn't require you to do much to comply with it." />
  <row Id="17548" PostHistoryTypeId="2" PostId="8585" RevisionGUID="282d2c2a-0571-420e-87c5-3c6783727433" CreationDate="2011-02-15T04:48:07.887" UserId="3136" Text="I'd go hands down with [Nuclex's][1] precompiled libs and include files for LUABind.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nuclex.org/articles/5-cxx/1-quick-introduction-to-luabind&#xD;&#xA;&#xD;&#xA;Since LUABind requires you to build it with some Boost libs and boost tools, this package will save you valuable time. I'd say you'd be able to get LUA running in less than an hour if you know what you're doing.&#xD;&#xA;&#xD;&#xA;With that, good luck!" />
  <row Id="17551" PostHistoryTypeId="5" PostId="8585" RevisionGUID="1169a77b-9cde-4c0c-9db8-9d4e9b7de22f" CreationDate="2011-02-15T04:53:53.263" UserId="3136" Comment="added luajit mention." Text="I'd go hands down with [Nuclex's][1] precompiled libs and include files for LUABind. (that is if you're working with VS2008)&#xD;&#xA;&#xD;&#xA;Since LUABind requires you to build it with some Boost libs and tools, this package will save you valuable time (and maybe some headache, who knows). I'd say you'd be able to get LUA running in less than an hour if you know what you're doing.&#xD;&#xA;&#xD;&#xA;You may also consider changing the default LUA dll to a [LUAJIT][2] dll if you're looking for a [small performance gain][3]. It's only a matter of compiling the library and replacing the lib/dll you're linking against in your main project, so it's quite easy.&#xD;&#xA;&#xD;&#xA;With that, good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nuclex.org/articles/5-cxx/1-quick-introduction-to-luabind&#xD;&#xA;  [2]: http://luajit.org&#xD;&#xA;  [3]: http://luajit.org/performance.html" />
  <row Id="17552" PostHistoryTypeId="25" PostId="8582" RevisionGUID="24ddb93e-80ef-4748-b61e-81ed363743e4" CreationDate="2011-02-15T05:22:27.597" Comment="http://twitter.com/#!/StackGameDev/status/37381201861812224" />
  <row Id="17554" PostHistoryTypeId="5" PostId="8514" RevisionGUID="ad005cb1-faea-439c-8b36-039ca065d5c4" CreationDate="2011-02-15T07:26:08.293" UserId="20" Comment="added links" Text="Looks like you're trying to make something 2d and relatively simple. I'd say go for [PyGame][1] (a game library for python); if you were going 3d I'd say [Unity][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/&#xD;&#xA;  [2]: http://unity3d.com/" />
  <row Id="17555" PostHistoryTypeId="25" PostId="8537" RevisionGUID="011031d2-106a-4d4b-8689-8a8144eebec5" CreationDate="2011-02-15T08:22:28.123" Comment="http://twitter.com/#!/StackGameDev/status/37426501905285120" />
  <row Id="17559" PostHistoryTypeId="2" PostId="8587" RevisionGUID="66346ece-4355-4aed-820c-b6b074337f9d" CreationDate="2011-02-15T09:14:04.907" UserId="252" Text="You could render the view distorted as given in _actual reality_ by the theory of [Special Relativity](http://en.wikipedia.org/wiki/Special_relativity) (you _are_ moving fast then, right? Just remember you need to define an upper speed limit in your game then), see e.g. [here. ![from that site](http://www.phys.ncku.edu.tw/mirrors/physicsfaq/Relativity/SR/Spaceship/OrionRel.jpg)](http://www.phys.ncku.edu.tw/mirrors/physicsfaq/Relativity/SR/Spaceship/spaceship.html)&#xD;&#xA;&#xD;&#xA; I can't give you a good source reference atm however..." />
  <row Id="17560" PostHistoryTypeId="2" PostId="8588" RevisionGUID="926acccf-2710-4f3d-8148-ad9279309331" CreationDate="2011-02-15T09:33:22.527" UserDisplayName="user5457" Text="how to create a alphabets/numbers in 3d in opengles,i trying to  create them with the existing primitives,but its not looking good,do we have any alternate way to get these things done if so please let me know!thanks in advance." />
  <row Id="17561" PostHistoryTypeId="1" PostId="8588" RevisionGUID="926acccf-2710-4f3d-8148-ad9279309331" CreationDate="2011-02-15T09:33:22.527" UserDisplayName="user5457" Text="creating a alphabet/number in 3d using opengles" />
  <row Id="17562" PostHistoryTypeId="3" PostId="8588" RevisionGUID="926acccf-2710-4f3d-8148-ad9279309331" CreationDate="2011-02-15T09:33:22.527" UserDisplayName="user5457" Text="&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="17563" PostHistoryTypeId="2" PostId="8589" RevisionGUID="fd3f5fa8-ef83-436f-813c-dd5622ad1e71" CreationDate="2011-02-15T09:49:16.220" UserId="1217" Text="I don't know how, but I solved it by making sure the API was only initialized once. The problem with that is that if the person playing is a guest, it's impossible to get to know when the player logs in during play. I solved that with a work around, giving the player the possibility of manually saying when he/she has logged in. Not beautiful but works in war." />
  <row Id="17564" PostHistoryTypeId="2" PostId="8590" RevisionGUID="bf88e260-d2c6-489e-8d59-7e59efa0bfaa" CreationDate="2011-02-15T10:13:50.420" UserId="4947" Text="I understood you are trying to create numbers and alphabets from primitives manually. You can create them in some modeling program (like Blender, which is freeware), it should be easier and you could get good results." />
  <row Id="17565" PostHistoryTypeId="25" PostId="8588" RevisionGUID="dcfa6bee-b0d1-4386-8aff-681a686a2f59" CreationDate="2011-02-15T11:22:27.523" Comment="http://twitter.com/#!/StackGameDev/status/37471798098399232" />
  <row Id="17570" PostHistoryTypeId="2" PostId="8593" RevisionGUID="de0263f1-68c5-4096-9948-75cbe60d1ed9" CreationDate="2011-02-15T12:02:05.277" UserId="5461" Text="I just need some tips for my first iPhone Game.&#xD;&#xA;&#xD;&#xA;In this game you need to protect something from enemies. But I don't know how to create this enemies randomly, and how I can save the data to each enemy (there can be many on the screen at once!)..?&#xD;&#xA;&#xD;&#xA;I hope someone can give good tips or good links to tutorials..?&#xD;&#xA;&#xD;&#xA;Greetings, mavrick3.&#xD;&#xA;" />
  <row Id="17571" PostHistoryTypeId="1" PostId="8593" RevisionGUID="de0263f1-68c5-4096-9948-75cbe60d1ed9" CreationDate="2011-02-15T12:02:05.277" UserId="5461" Text="iPhone Game Development" />
  <row Id="17572" PostHistoryTypeId="3" PostId="8593" RevisionGUID="de0263f1-68c5-4096-9948-75cbe60d1ed9" CreationDate="2011-02-15T12:02:05.277" UserId="5461" Text="&lt;iphone&gt;&lt;objective-c&gt;" />
  <row Id="17573" PostHistoryTypeId="2" PostId="8594" RevisionGUID="be177c03-5f19-4719-91cc-d76edc9da79e" CreationDate="2011-02-15T12:36:45.183" UserId="2137" Text="What is the most important thing to know about PR for indie developers?&#xD;&#xA;&#xD;&#xA;I'm considering spending some time learning about PR in general, but it seems that the indie field is quite different than other fields in general.&#xD;&#xA;&#xD;&#xA;What should most indie developers know about PR in general? Are PR-managers usually worth the money (and time?)?" />
  <row Id="17574" PostHistoryTypeId="1" PostId="8594" RevisionGUID="be177c03-5f19-4719-91cc-d76edc9da79e" CreationDate="2011-02-15T12:36:45.183" UserId="2137" Text="Public Relations for Game Developers" />
  <row Id="17575" PostHistoryTypeId="3" PostId="8594" RevisionGUID="be177c03-5f19-4719-91cc-d76edc9da79e" CreationDate="2011-02-15T12:36:45.183" UserId="2137" Text="&lt;marketing&gt;&lt;publishing&gt;&lt;outsourcing&gt;" />
  <row Id="17576" PostHistoryTypeId="2" PostId="8595" RevisionGUID="fb655e1a-12ba-4f19-90d4-8008b859d63f" CreationDate="2011-02-15T12:38:04.077" UserId="1386" Text="In short:&#xD;&#xA;&#xD;&#xA; - To generate random numbers use rand()&#xD;&#xA; - To keep track of enemies make arrays/lists of them&#xD;&#xA;&#xD;&#xA;Expanded:&#xD;&#xA;&#xD;&#xA;You can use the rand() function to generate random numbers.&#xD;&#xA;You could use these random numbers to set the position/health points or any other attribute or your enemies.&#xD;&#xA;&#xD;&#xA;As for saving the enemies data (I'm assuming you just mean store the variables, correct me if I'm wrong) you need to store the data in an array or list. This can be done in many  different ways.&#xD;&#xA;&#xD;&#xA;If your enemy is a C-Struct then you can store your enemies in a plain C-Array. If your enemy is implemented as an Objective-C class, then you can store your enemies in a NSArray class (such as [NSMutableArray][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html" />
  <row Id="17577" PostHistoryTypeId="5" PostId="8535" RevisionGUID="9b15c53e-87cb-4f68-a4ad-196c0e28d97c" CreationDate="2011-02-15T13:07:42.660" UserId="5378" Comment="added 392 characters in body" Text="I have a spaceship and I've created a &quot;boost&quot; functionality that speeds up my spaceship, what effects should I implement to create the impression of high speed?&#xD;&#xA;&#xD;&#xA;I was thinking of making everything except my spaceship blurry but I think there would be something missing. Any ideas? &#xD;&#xA;&#xD;&#xA;Btw. I am working in XNA C# but if you aren't familiar to XNA describing some effects is still useful.&#xD;&#xA;&#xD;&#xA;The Game is 3d and i've attached some printscreens of the game&#xD;&#xA;&#xD;&#xA;This is in normal mode ( none boosted ) &#xD;&#xA;![in normal, non-boosted mode][1]&#xD;&#xA;&#xD;&#xA;and here is the boosted mode ( the craft speeds up forward while the camera speeds in its normal speed , the non boosted speed ) &#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/KiZoL.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/5kAWU.png" />
  <row Id="17587" PostHistoryTypeId="5" PostId="8588" RevisionGUID="2e246d8d-79b0-474c-b9de-0eeb0363d559" CreationDate="2011-02-15T14:08:07.510" UserId="953" Comment="removed extraneous &quot;s&quot;" Text="How should I create an alphabet with numbers in 3d in opengl-es? I'm trying to create them with the existing primitives, but it's not looking good. Do we have any alternate way to get these things done? If so, please let me know! Thanks in advance." />
  <row Id="17588" PostHistoryTypeId="4" PostId="8588" RevisionGUID="2e246d8d-79b0-474c-b9de-0eeb0363d559" CreationDate="2011-02-15T14:08:07.510" UserId="953" Comment="removed extraneous &quot;s&quot;" Text="Creating an alphabet with numbers in 3d using opengl-es" />
  <row Id="17593" PostHistoryTypeId="25" PostId="8594" RevisionGUID="b8fa146e-d65b-4de3-9f60-b344c538e133" CreationDate="2011-02-15T14:22:27.877" Comment="http://twitter.com/#!/StackGameDev/status/37517098594869248" />
  <row Id="17598" PostHistoryTypeId="2" PostId="8599" RevisionGUID="4fdb3b8c-1e84-4a5f-97c5-b40441be8640" CreationDate="2011-02-15T15:58:49.817" UserId="2132" Text="Is it possible to package HTML5 game for iPhone and Android as an application or has it to be accessed through a browser?" />
  <row Id="17599" PostHistoryTypeId="1" PostId="8599" RevisionGUID="4fdb3b8c-1e84-4a5f-97c5-b40441be8640" CreationDate="2011-02-15T15:58:49.817" UserId="2132" Text="Packaging HTML5 games as applications for iPhone/Android" />
  <row Id="17600" PostHistoryTypeId="3" PostId="8599" RevisionGUID="4fdb3b8c-1e84-4a5f-97c5-b40441be8640" CreationDate="2011-02-15T15:58:49.817" UserId="2132" Text="&lt;iphone&gt;&lt;android&gt;&lt;html5&gt;" />
  <row Id="17601" PostHistoryTypeId="2" PostId="8600" RevisionGUID="9d17d36f-b6f5-4bf0-a347-4c4924dce86a" CreationDate="2011-02-15T16:03:02.450" UserDisplayName="user5468" Text="I am currently developing a relatively simple 2D, topdown oriented adventure game for the iPhone and was wondering what would be the easiest way to create the maps for my game. I figured I would need some kind of visual editor that would give me immediate feedback and would allow me to place all objects in the world exactly where I want them. I could then load the saved representation of the world I create in the editor in my game.&#xD;&#xA;&#xD;&#xA;So, I am looking for a simple map editor that allows me to do this. All the objects in my game are simply textured rectangles build up from two triangles. All I need to be able to do is position different rectangles/objects in the map, and give them a texture. I am using texture atlases, so it would be useful to be able to assign portions of textures to the objects. I then need to be able to extract all the objects from the saved representation of my maps, together with the name/identifier of the texture(atlas) they use, and the area of the texture atlas.&#xD;&#xA;&#xD;&#xA;I have looked at some tile-based map editors like Tiled and Ogmo, but they don't seem to be able to do what I want.&#xD;&#xA;Any suggestions?" />
  <row Id="17602" PostHistoryTypeId="1" PostId="8600" RevisionGUID="9d17d36f-b6f5-4bf0-a347-4c4924dce86a" CreationDate="2011-02-15T16:03:02.450" UserDisplayName="user5468" Text="2D non-tile based map editor" />
  <row Id="17603" PostHistoryTypeId="3" PostId="8600" RevisionGUID="9d17d36f-b6f5-4bf0-a347-4c4924dce86a" CreationDate="2011-02-15T16:03:02.450" UserDisplayName="user5468" Text="&lt;2d&gt;&lt;iphone&gt;&lt;maps&gt;&lt;levels&gt;&lt;editors&gt;" />
  <row Id="17604" PostHistoryTypeId="2" PostId="8601" RevisionGUID="6f57bfde-94cf-48e0-979c-6a9862a554b5" CreationDate="2011-02-15T16:06:13.693" UserId="189" Text="I can't vouch for iPhone, but in Android, a simple application with an [Activity][1] that just has one [WebView][2] would do the trick. The activity would look something like this:&#xD;&#xA;&#xD;&#xA;    public class WebApp extends Activity {&#xD;&#xA;    	protected void onCreate(Bundle savedInstanceState) {&#xD;&#xA;    		WebView wv = new WebView(this);&#xD;&#xA;    		wv.loadUrl(&quot;http://www.myapp.com/&quot;);&#xD;&#xA;    		setContentView(wv);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That would make the WebView the entirety of the screen; then you would just need a loading message. Or a better option is to load HTML in the WebView so that the app can be used offline; examples of this are on [the API page for WebView][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/reference/android/app/Activity.html&#xD;&#xA;  [2]: http://developer.android.com/reference/android/webkit/WebView.html" />
  <row Id="17606" PostHistoryTypeId="5" PostId="8572" RevisionGUID="fc9adad2-4e58-4b9f-bc10-d71c34ce8ad2" CreationDate="2011-02-15T16:41:08.980" UserId="1198" Comment="spacing and parens" Text="I am a first year college student in India and want to make a small game as a this semester project.&#xD;&#xA;&#xD;&#xA;I am quite good at C and am learning it rapidly but I wanted to ask if developing a game entirely in C (no C++ or C#) I'd love to use these but for college projects, we have strict requirements of using only C.&#xD;&#xA;&#xD;&#xA;What I am looking for is a simple top view driving game. It won't have anything fancy and even the visual things will be powered by simple characters. For example, user controlled car can be represented by ▓ and edges of road by series of |'s.&#xD;&#xA;What do you think?" />
  <row Id="17607" PostHistoryTypeId="24" PostId="8572" RevisionGUID="1305d4d5-ee25-4eec-abfe-4cf129d5666a" CreationDate="2011-02-15T16:41:08.980" Comment="Proposed by 1198 approved by 189 edit id of 31" />
  <row Id="17608" PostHistoryTypeId="5" PostId="4950" RevisionGUID="18e1efde-ce8e-4b37-9ab6-8391c644b49f" CreationDate="2011-02-15T16:41:21.043" UserId="2887" Comment="edited body" Text="Here are some examples of (open source) games that use scripting to implement entity behaviour:&#xD;&#xA;&#xD;&#xA;[Frogato][1] implements entities using a custom scripting language.&#xD;&#xA;[Battle for Wesnoth][2] implements entities using a custom description language in which Lua scripts can be embedded.&#xD;&#xA;[KQ][3] implements entity behaviour using Lua scripts.&#xD;&#xA;&#xD;&#xA;Edit: Posted links now that I'm allowed to...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.frogatto.com/&#xD;&#xA;  [2]: http://www.wesnoth.org/&#xD;&#xA;  [3]: http://kqlives.sourceforge.net/" />
  <row Id="17609" PostHistoryTypeId="2" PostId="8603" RevisionGUID="8b5446e7-c064-4af4-987a-b5084f6831bd" CreationDate="2011-02-15T16:43:26.813" UserId="1430" Text="Offhand, I don't know of any game-agnostic editors aimed at this task. However, you could consider using any existing paint program (Photoshop, GIMP, Paint.net, Acorn, Pixelmator, et cetera) that supports layers, build each level sprite in its own layer, then simply saving each layer individually to some directory, and then writing a tool to post-process that directory to isolate the position and bounds of each image within the layer file, save out that position and bounds information, and slice up the layer and re-composite all of them back on to a texture atlas.&#xD;&#xA;&#xD;&#xA;Fundamentally that algorithm isn't any different than what a dedicated tool would be doing, and if you can do it on a bunch of distinct image files you can do it on images in memory -- in other words, it might not be terribly complex to write your own simple tool that does this after you get the basics of the process down using a paint program. &#xD;&#xA;&#xD;&#xA;One problem might be if your levels are huge, editing them in a paint program might not be pleasant depending on the power of your machine. But for iPhone-game style levels I suspect you'd be fine." />
  <row Id="17610" PostHistoryTypeId="2" PostId="8604" RevisionGUID="4b3db722-90b1-427e-ba06-24061ea60664" CreationDate="2011-02-15T16:57:57.150" UserId="323" Text="I do that in my engine ([source available][1], but probably not worth deciphering).&#xD;&#xA;&#xD;&#xA;In my case, an &quot;entity&quot; is a concept that exists wholly within Lua. There's no C++ backing for &quot;entities&quot;. As such, an &quot;entity&quot; is whatever that specific game needs. Sometimes it's just a table with a little data attached to it, sometimes it's a 2d Frame element (note that Frames are entirely Lua constructions as well, I just have a standard UI library), sometimes it's something complicated with AI and rendering and then it's still just a thing created in Lua.&#xD;&#xA;&#xD;&#xA;Many people use Lua to script object systems that have C++ backing, such that the entity &quot;lives&quot; in C++ and calls Lua for its scripting. I used to do that, but I found myself getting happier and happier as I moved code out of C++ and into Lua. At this point, I use C++ solely to handle the OS API calls, and all layout/rendering/AI/game logic is in 100% pure Lua.&#xD;&#xA;&#xD;&#xA;Recommended.&#xD;&#xA;&#xD;&#xA;Feel free to ask questions, I'm quite willing to answer :)&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/zorbathut/glorp" />
  <row Id="17611" PostHistoryTypeId="2" PostId="8605" RevisionGUID="01024325-42af-41b7-ab2e-59192f5d25ed" CreationDate="2011-02-15T17:00:17.813" UserId="1430" Text="Hiring somebody to do your PR sounds very &quot;non-indie.&quot; And it's certainly not likely to be good from a budgetary standpoint -- most indie games do not sell nearly as well as, say, Minecraft has.&#xD;&#xA;&#xD;&#xA;For an indie developer with a small (or nonexistent) budget, you probably have to work the grass roots angle more than anything else. Promoting your game on Twitter/Facebook/whatever is an option but probably will not see great results unless you already have a ton of followers or friends or connections, et cetera, from previous successes. Otherwise the handful of people who follow you on Twitter are probably the ones who are pretty likely to buy your game anyhow.&#xD;&#xA;&#xD;&#xA;First, make sure your game is reasonably stable and polished (at least in some areas) and then assemble some marketing material -- good, interesting screenshots and some compelling descriptive text to go along with them. Check out what other indie developers, like [Jeff Vogel of Spiderweb Software][1] do for their game splash pages. &#xD;&#xA;&#xD;&#xA;Then start trying to talk to people -- basically cold-calling them. Useful demographics to target are smaller-scale publications that have a track record of dealing with or promoting indie titles ([TIGSource][2] is great, but IGN, not so much for example). See if you can entice them to review your game, or do a preview feature. You might consider suggesting that in exchange for a preview you could offer some promotional codes for the game that the site could give away, and then you have something of a cross-promotion that could be mutually beneficial.&#xD;&#xA;&#xD;&#xA;Other indie game developers are a good market to focus on as well: some of them are actually professionals by day, and most of them will have a higher tolerance for some of the rougher edges indie games usually sport and be more willing to give the game a shot and discover its potential. Many game development sites focusing on indies, such as [GameDev.Net][3], also have showcase and announcement forums where you can promote your project.&#xD;&#xA;&#xD;&#xA;Set up Google alerts for your products and reach out to people who promote your product without you actually asking them too -- the random bloggers who stumble across it and post about some cool game they found (or about some bug they found with it). This doesn't have to involve offering them registration codes or anything, just a simple email with a thanks or an assurance that the bug has been fixed or is being looked in to -- that can go pretty far in terms of making an impact on people. Hopefully it will be an impact they tell their friends about.&#xD;&#xA;&#xD;&#xA;This should go without saying, but make sure your game is easy to get, install, and get into. Struggling to even be able to launch a game is probably the biggest reason many indie games go untouched. It's difficult, not having as many resources, but try to get as many testers for your game as possible so you can ensure it's as rock-solid as possible. No amount of marketing savvy will save a broken product.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.avernum.com/avernum6/index.html&#xD;&#xA;  [2]: http://www.tigsource.com/&#xD;&#xA;  [3]: http://www.gamedev.net" />
  <row Id="17612" PostHistoryTypeId="5" PostId="8600" RevisionGUID="c430e5ba-9a13-4d6c-a690-646fe9e9dc34" CreationDate="2011-02-15T17:09:07.307" UserDisplayName="user5468" Comment="added concrete example" Text="I am currently developing a relatively simple 2D, topdown oriented adventure game for the iPhone and was wondering what would be the easiest way to create the maps for my game. I figured I would need some kind of visual editor that would give me immediate feedback and would allow me to place all objects in the world exactly where I want them. I could then load the saved representation of the world I create in the editor in my game.&#xD;&#xA;&#xD;&#xA;So, I am looking for a simple map editor that allows me to do this. All the objects in my game are simply textured rectangles build up from two triangles. All I need to be able to do is position different rectangles/objects in the map, and give them a texture. I am using texture atlases, so it would be useful to be able to assign portions of textures to the objects. I then need to be able to extract all the objects from the saved representation of my maps, together with the name/identifier of the texture(atlas) they use, and the area of the texture atlas.&#xD;&#xA;&#xD;&#xA;I have looked at some tile-based map editors like Tiled and Ogmo, but they don't seem to be able to do what I want.&#xD;&#xA;Any suggestions?&#xD;&#xA;&#xD;&#xA;EDIT: a more concrete example: something like the GameMaker level editor, but then with added export functionality in a handy format." />
  <row Id="17613" PostHistoryTypeId="25" PostId="8600" RevisionGUID="c81af030-830b-4325-bb25-94e836e2c638" CreationDate="2011-02-15T17:22:28.670" Comment="http://twitter.com/#!/StackGameDev/status/37562399582064641" />
  <row Id="17614" PostHistoryTypeId="2" PostId="8606" RevisionGUID="a109f91f-1118-4138-a172-6fb271219d3b" CreationDate="2011-02-15T17:55:01.253" UserId="259" Text="Shout out to http://www.showmethegames.com/, which aims to promote indie games and the people who make them. " />
  <row Id="17616" PostHistoryTypeId="2" PostId="8607" RevisionGUID="4366ed24-28b7-48ce-8264-60e8ee83243f" CreationDate="2011-02-15T18:25:40.263" UserId="5474" Text="I'm currently designing a turn based game for tablets. Initially for Android with porting to iOS later considered in design.&#xD;&#xA;&#xD;&#xA;I'm having trouble narrowing down the available technologies to even know where to spend my research time. I am hoping that if I explain what I am trying to achieve someone may be able to suggest a platform and/or engine.&#xD;&#xA;&#xD;&#xA;I've looked into some of the open source Engines ( http://www.cuteandroid.com/ten-open-source-android-2d-or-3d-game-engine-for-android-developers ) and some appear to handle much of what I might require - although with a higher focus on graphics than i need. Mages looks interesting although development appears to have ceased.&#xD;&#xA;&#xD;&#xA;If I could somehow leverage GoogleApps that would be excellent.&#xD;&#xA;&#xD;&#xA;Here is what I am trying to achieve:&#xD;&#xA;&#xD;&#xA;PvP turn based strategy game over internet - minimal animation and bandwidth required&#xD;&#xA;Players match up online using MetaGame system&#xD;&#xA;MatchID created on Resolution Server and Game starts&#xD;&#xA;Clients have 30 second countdown to select MoveString&#xD;&#xA;Clients sends small secure timestamped and MatchIDed MoveString to Resolution server&#xD;&#xA;Resolution server looks up Move String for each player, Resolves and Updates Players status in MatchID on Server&#xD;&#xA;Resolution server updates Client Views&#xD;&#xA;Repeat until victory conditions met - MatchID Closed, Rewards earned in MetaGame&#xD;&#xA;&#xD;&#xA;There will also need to be a full social and account system and metagame backend - but this could be running on separate system(s)&#xD;&#xA;&#xD;&#xA;Tablet in Offline mode would be catalog browsing and perhaps single player AI - bum I'm focusing on the Resolution Server at this point&#xD;&#xA;&#xD;&#xA;I'm not even certain if I would be looking at an Android App or a WebApp at this stage! I want a custom GUI so I guess an app - but maybe as I have little animation a WebApp might also work. Probably some combination of both.&#xD;&#xA;&#xD;&#xA;There will be very small overhead in data between client server - essentially a small text string every 30 seconds sent to the Resolution server which looks up the Effect and applies it to the Opponents string and determines some results to apply to the match. The client view is updated minimally with the results (only 5 in game Integers tracked) - perhaps triggering small animations/popups on the client to show the end result. e.g Explosion.&#xD;&#xA;&#xD;&#xA;If you have suggestions for a good technology or platform to best achieving the Resolution Server I'd love to hear.&#xD;&#xA;&#xD;&#xA;Also if you have experience with open source Engines - and could narrow down which (if any ) might be most suitable that would be a big help.&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="17617" PostHistoryTypeId="1" PostId="8607" RevisionGUID="4366ed24-28b7-48ce-8264-60e8ee83243f" CreationDate="2011-02-15T18:25:40.263" UserId="5474" Text="Best Platform/Engine for turn based Client/Server Android game" />
  <row Id="17618" PostHistoryTypeId="3" PostId="8607" RevisionGUID="4366ed24-28b7-48ce-8264-60e8ee83243f" CreationDate="2011-02-15T18:25:40.263" UserId="5474" Text="&lt;game-design&gt;&lt;engine&gt;&lt;android&gt;&lt;client-server&gt;&lt;google-app-engine&gt;" />
  <row Id="17619" PostHistoryTypeId="2" PostId="8608" RevisionGUID="5a96218c-6039-4a1c-90fa-0b451aacfb31" CreationDate="2011-02-15T18:26:47.583" UserId="5378" Text="Can anyone direct me to a site where i can download a free 3d model with a skeleton so i can practice using them in the XNA environment untill i'll make my own models ? &#xD;&#xA;&#xD;&#xA;If the model is human-ish ( 2 legs , 2 hands and stands up ) that would be great !" />
  <row Id="17620" PostHistoryTypeId="1" PostId="8608" RevisionGUID="5a96218c-6039-4a1c-90fa-0b451aacfb31" CreationDate="2011-02-15T18:26:47.583" UserId="5378" Text="good 3d model with bones ?" />
  <row Id="17621" PostHistoryTypeId="3" PostId="8608" RevisionGUID="5a96218c-6039-4a1c-90fa-0b451aacfb31" CreationDate="2011-02-15T18:26:47.583" UserId="5378" Text="&lt;xna&gt;&lt;3d-meshes&gt;" />
  <row Id="17622" PostHistoryTypeId="2" PostId="8609" RevisionGUID="d442b9fb-1aa8-4881-a445-6ba95381ec3a" CreationDate="2011-02-15T18:35:36.337" UserDisplayName="user5475" Text="These are for flat side horizontal.  The terminology I am using is from Amit's thoughts on grids page, with the additional language of &quot;narrow side length&quot; meaning the length of the squished non-horizontal sides.&#xD;&#xA;&#xD;&#xA;http://www-cs-students.stanford.edu/~amitp/game-programming/grids/hex-grid-metrics-labeled.png&#xD;&#xA;&#xD;&#xA;equilateral (0 degree projection):&lt;br /&gt;&#xD;&#xA;&quot;height&quot;		= L√3&lt;br /&gt;&#xD;&#xA;&quot;wide width&quot;		= L&lt;br /&gt;&#xD;&#xA;&quot;narrow width&quot;		= L√3&lt;br /&gt;&#xD;&#xA;narrow side length	= L&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;45 degree projection:&lt;br /&gt;&#xD;&#xA;&quot;height&quot;		= L&lt;br /&gt;&#xD;&#xA;&quot;wide width&quot; 		= L&lt;br /&gt;&#xD;&#xA;&quot;narrow width&quot;		= 2 * √(3/8)L&lt;br /&gt;&#xD;&#xA;narrow side length 	= √(2)L&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;30 degree projection:&lt;br /&gt;&#xD;&#xA;&quot;height&quot;		= (3/2)L&lt;br /&gt;&#xD;&#xA;&quot;wide width&quot;		= L&lt;br /&gt;&#xD;&#xA;&quot;narrow width&quot;		= 2 * √(3/4)L&lt;br /&gt;&#xD;&#xA;narrow side length 	= √(13/16)L&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I calculated these by hand, so please check my work." />
  <row Id="17623" PostHistoryTypeId="2" PostId="8610" RevisionGUID="b5b400b3-299f-48e6-99dc-04a82a300ced" CreationDate="2011-02-15T18:36:30.267" UserId="1021" Text="I'm an independent game developer considering working with a publisher.  [This question][1] is very informative however I have more questions.  Please give feedback on the following issues... I think this can be helpful to many indie devs in the same situation.&#xD;&#xA;&#xD;&#xA; - **Source code**: is it common for developers to give the publisher the source code?&#xD;&#xA;&#xD;&#xA; - **Code quality**:  does this matter when working with a publisher any more so than when just working on your own (or in a small team)?  Just wondering if developers working for the publisher might scoff at the code quality and perhaps influence the relationship between developer and publisher.&#xD;&#xA; - **Unique game concepts**: are publishers generally biased towards new/novel game concepts?  &#xD;&#xA; - **Intellectual property**: if I send a playable demo to a publisher what's to stop them from just reproducing the new/novel game mechanic?  I think the answer is basically nothing... but I'm wondering if this is a realistic concern.&#xD;&#xA; - **Revenue sharing**: how does it work? what's a common ratio?  70/30?  30/70?&#xD;&#xA;&#xD;&#xA; - **Flaky publishers**: how common is it for a publisher to &quot;string along&quot; developers for a while then just drop them?  Can this be reconciled with a contract of some kind?&#xD;&#xA;&#xD;&#xA;And any **other issues** you've encountered or heard of.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3288/tips-pitfalls-in-selecting-and-working-with-publishers" />
  <row Id="17624" PostHistoryTypeId="1" PostId="8610" RevisionGUID="b5b400b3-299f-48e6-99dc-04a82a300ced" CreationDate="2011-02-15T18:36:30.267" UserId="1021" Text="Indie devs working with publishers" />
  <row Id="17625" PostHistoryTypeId="3" PostId="8610" RevisionGUID="b5b400b3-299f-48e6-99dc-04a82a300ced" CreationDate="2011-02-15T18:36:30.267" UserId="1021" Text="&lt;publishing&gt;" />
  <row Id="17626" PostHistoryTypeId="2" PostId="8611" RevisionGUID="b8eeac96-4d74-46c8-9eda-926ef2d7040a" CreationDate="2011-02-15T18:46:38.193" UserId="5474" Text="Another thing to try is tidy your workspace. Clean the whole space from top to bottom. Get rid of everything you don't need - even if that is into a box to deal with later. &#xD;&#xA;&#xD;&#xA;You may find that the clearing of space also has a clearing of mind effect." />
  <row Id="17627" PostHistoryTypeId="2" PostId="8612" RevisionGUID="69b8428a-f7a3-4825-a4c8-9f0b7e370aba" CreationDate="2011-02-15T19:04:26.520" UserId="1956" Text="There's http://www.phonegap.com/ which is open source and cross-platform. Besides packaging your HTML 5 as a native app, it also lets you access native features of the mobile phone.&#xD;&#xA;" />
  <row Id="17628" PostHistoryTypeId="5" PostId="8538" RevisionGUID="4cc48c95-dd1f-4549-91bd-cda14406fc85" CreationDate="2011-02-15T19:05:44.953" UserId="20" Comment="added 670 characters in body" Text="Here are some suggestions:&#xD;&#xA;&#xD;&#xA; - If your spaceship has a &quot;propulsion-flame&quot;, change its size and color. Eg. if it normally burns with a yellow color, make it blue and double the size of it.&#xD;&#xA; - Apply some jitter to your spaceship. The jitter occurs due to the heavy forces caused by the boost. Maybe you could apply random roll (rotation around the spaceship forward axis).&#xD;&#xA; - Add some particle-effects to the wings of the spaceship.&#xD;&#xA; - Add some wind-like effects to the tip of the rocket/spaceship.&#xD;&#xA;&#xD;&#xA;**Update:** If the look of your game allows it, you could also consider adding some [speed-lines][1]. Either at the back of your ship or as an overlay (maybe white lines) to your background-scene.&#xD;&#xA;&#xD;&#xA;**Follow-up:** When writing my initial answer I was thinking about a side-scrolling game, but most of the effects can still be applied to the &quot;follower-perspective&quot; you chose. As mentioned by others, motion-blur is a good idea. Use a radial motion-blur, as in this [example image][2]. Instead of keeping your camera at the &quot;normal&quot; speed and increasing the speed of your spaceship, you could increase the [camera FOV][3] which will result in a better speed-impression. Use a trail or radial speed lines to further enhance your effect.&#xD;&#xA;&#xD;&#xA;  [1]: http://images.google.ch/images?q=speed+lines&#xD;&#xA;  [2]: http://imagecache6.allposters.com/LRG/22/2244/E74ZD00Z.jpg&#xD;&#xA;  [3]: http://www.digital-flight.com/FOV/FOV_forgotten_factor.htm" />
  <row Id="17629" PostHistoryTypeId="5" PostId="8609" RevisionGUID="29517462-b6c5-4b95-9b33-9d401f34e589" CreationDate="2011-02-15T19:28:51.543" UserDisplayName="user5475" Comment="edited body" Text="These are for flat side horizontal.  The terminology I am using is from Amit's thoughts on grids page, with the additional language of &quot;narrow side length&quot; meaning the length of the squished non-horizontal sides.&#xD;&#xA;&#xD;&#xA;http://www-cs-students.stanford.edu/~amitp/game-programming/grids/hex-grid-metrics-labeled.png&#xD;&#xA;&#xD;&#xA;equilateral (0 degree projection):&lt;br /&gt;&#xD;&#xA;&quot;height&quot;		= L√3&lt;br /&gt;&#xD;&#xA;&quot;wide width&quot;		= L&lt;br /&gt;&#xD;&#xA;&quot;narrow width&quot;		= L√3&lt;br /&gt;&#xD;&#xA;narrow side length	= L&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;45 degree projection:&lt;br /&gt;&#xD;&#xA;&quot;height&quot;		= L&lt;br /&gt;&#xD;&#xA;&quot;wide width&quot; 		= L&lt;br /&gt;&#xD;&#xA;&quot;narrow width&quot;		= 2 * √(3/8)L&lt;br /&gt;&#xD;&#xA;narrow side length 	= √(2)L&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;60 degree projection:&lt;br /&gt;&#xD;&#xA;&quot;height&quot;		= (3/2)L&lt;br /&gt;&#xD;&#xA;&quot;wide width&quot;		= L&lt;br /&gt;&#xD;&#xA;&quot;narrow width&quot;		= 2 * √(3/4)L&lt;br /&gt;&#xD;&#xA;narrow side length 	= √(13/16)L&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I calculated these by hand, so please check my work." />
  <row Id="17630" PostHistoryTypeId="2" PostId="8613" RevisionGUID="fadfc9f0-e980-411a-adbc-7bf8b8e9bc84" CreationDate="2011-02-15T19:33:56.430" UserDisplayName="user5476" Text="Back again from my last question.  Now I was curious I use a foreach statement to use the same shot class.  How would I go about doing collison detection.  I used the tutorial here on how to shoot a fireball &lt;http://www.xnadevelopment.com/tutorials.shtml&gt;.&#xD;&#xA;&#xD;&#xA;I tried to put in several places a foreach to look at all of them to see if they have reached the borders of my sprite hero but doesn't seem to do anything.  If again some one might know of a good site that has tutorials to explain collision detection a little bit better that would be appriecated." />
  <row Id="17631" PostHistoryTypeId="1" PostId="8613" RevisionGUID="fadfc9f0-e980-411a-adbc-7bf8b8e9bc84" CreationDate="2011-02-15T19:33:56.430" UserDisplayName="user5476" Text="Multiple Sprites using foreach Collison Detection in XNA (C#)" />
  <row Id="17632" PostHistoryTypeId="3" PostId="8613" RevisionGUID="fadfc9f0-e980-411a-adbc-7bf8b8e9bc84" CreationDate="2011-02-15T19:33:56.430" UserDisplayName="user5476" Text="&lt;xna&gt;&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="17633" PostHistoryTypeId="2" PostId="8614" RevisionGUID="c0fa626e-1064-4074-96e6-3a5feca0559a" CreationDate="2011-02-15T19:48:18.650" UserId="5224" Text="The fireball is a 'box' of width and height 200. And it's at a given position. Add a rectangle (Rectangle boundingRect = new Rectangle(position.X, position.Y, 200, 200); to your fireball class. &#xD;&#xA;&#xD;&#xA;Make sure to update the rectangle with the new position of the fireball every frame (so in the fireball's update or draw method)&#xD;&#xA;&#xD;&#xA;Do the same thing for your player class.&#xD;&#xA;&#xD;&#xA;Now you can check if the fireball has hit the player like this in your game's update method:&#xD;&#xA;if(fireball.boundingRect.Intersects(player.boundingRect))&#xD;&#xA;{&#xD;&#xA; //hit&#xD;&#xA;}" />
  <row Id="17634" PostHistoryTypeId="2" PostId="8615" RevisionGUID="d5fb9173-1188-4e68-ace1-0204fa4c1da9" CreationDate="2011-02-15T20:21:22.843" UserId="1443" Text="Yes it is possible, but it may not be the most desirable course of action.  A number of people recognize these days that C and C++ both aren't ideal for a number of tasks, and high level game logic often falls into that category.&#xD;&#xA;&#xD;&#xA;If you insist on C instead of C++ (which makes no sense to me, but to each their own), you may be best off using Lua in conjunction with C.&#xD;&#xA;&#xD;&#xA;For your college projects that require C this won't be an option, but for spare time projects it would be a good way to learn." />
  <row Id="17635" PostHistoryTypeId="25" PostId="8610" RevisionGUID="4cad31d5-7cfd-46cd-b55f-f96690d1e240" CreationDate="2011-02-15T20:22:28.527" Comment="http://twitter.com/#!/StackGameDev/status/37607697117487104" />
  <row Id="17636" PostHistoryTypeId="2" PostId="8616" RevisionGUID="bc8807fe-8535-465f-9ff9-7fc9ffc6bbb3" CreationDate="2011-02-15T20:48:46.257" UserId="5478" Text="I'm attempting to make my first cocos2d (for iphone) multiplayer game and having difficulty understanding how to interact with a scene once it is running.&#xD;&#xA;&#xD;&#xA;The game is a simple turn-based one and so I have a GameController class which co-ordinates the rounds. I also have a GameScene class which is the actual scene that is displayed during a round of the game. The basic interaction I need is for the GameController to be able to pass messages to the GameScene class.. such as StartRound/StopRound etc. &#xD;&#xA;&#xD;&#xA;The thing that complicates this is that I am loading the GameScene with a LoadingScene class which simply initialises the scene and replaces the current scene with this one, so there is no reference from GameController to GameScene, so passing messages is quite tricky.&#xD;&#xA;&#xD;&#xA;Does anyone have any ways to get around this, ideally I would still like to use a Loading class as it smooths out the memory hit when replacing scenes. " />
  <row Id="17637" PostHistoryTypeId="1" PostId="8616" RevisionGUID="bc8807fe-8535-465f-9ff9-7fc9ffc6bbb3" CreationDate="2011-02-15T20:48:46.257" UserId="5478" Text="Interacting with scene cocos2d" />
  <row Id="17638" PostHistoryTypeId="3" PostId="8616" RevisionGUID="bc8807fe-8535-465f-9ff9-7fc9ffc6bbb3" CreationDate="2011-02-15T20:48:46.257" UserId="5478" Text="&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="17639" PostHistoryTypeId="2" PostId="8617" RevisionGUID="ac62051b-6c1a-4345-a712-bc63e30906bc" CreationDate="2011-02-15T20:51:59.733" UserId="3853" Text="What are examples of games sites that provide good community support? That is, ways for players to ask questions, exchange information, publish results." />
  <row Id="17640" PostHistoryTypeId="1" PostId="8617" RevisionGUID="ac62051b-6c1a-4345-a712-bc63e30906bc" CreationDate="2011-02-15T20:51:59.733" UserId="3853" Text="Game sites that provide good community support" />
  <row Id="17641" PostHistoryTypeId="3" PostId="8617" RevisionGUID="ac62051b-6c1a-4345-a712-bc63e30906bc" CreationDate="2011-02-15T20:51:59.733" UserId="3853" Text="&lt;community-management&gt;&lt;support&gt;" />
  <row Id="17646" PostHistoryTypeId="5" PostId="8617" RevisionGUID="9a41ea9d-33c2-4ccb-8c0d-cba0ffb9885e" CreationDate="2011-02-15T21:33:09.137" UserId="3853" Comment="added 238 characters in body; edited title" Text="What are examples of games sites that provide good community support for? That is, sites for a specific game that provide ways for players of that game for to ask questions, exchange information, publish results. &#xD;&#xA;&#xD;&#xA;A site supporting a game could provide ways for both beginners and experts to interact with games producers and players and to explore the set of notions evoked by the game." />
  <row Id="17647" PostHistoryTypeId="4" PostId="8617" RevisionGUID="9a41ea9d-33c2-4ccb-8c0d-cba0ffb9885e" CreationDate="2011-02-15T21:33:09.137" UserId="3853" Comment="added 238 characters in body; edited title" Text="Game sites that provide good community support  for that game" />
  <row Id="17648" PostHistoryTypeId="2" PostId="8619" RevisionGUID="609a2fb6-799f-49e9-af43-28adbf2f87d5" CreationDate="2011-02-15T22:00:52.510" UserId="4307" Text="I'm looking for a fixed-point 3D physics engine (basic kynematics and collision detection-resolution... nothing too fancy.)&#xD;&#xA;&#xD;&#xA;I need fixed-point math because I'd like to have deterministic results, for reproducibility purposes, and high portability, because I expect my game to be highly portable for devices such as mobile phones or portable gaming consoles without floating point units." />
  <row Id="17649" PostHistoryTypeId="1" PostId="8619" RevisionGUID="609a2fb6-799f-49e9-af43-28adbf2f87d5" CreationDate="2011-02-15T22:00:52.510" UserId="4307" Text="Any fixed-point portable open-source 3D physics engines?" />
  <row Id="17650" PostHistoryTypeId="3" PostId="8619" RevisionGUID="609a2fb6-799f-49e9-af43-28adbf2f87d5" CreationDate="2011-02-15T22:00:52.510" UserId="4307" Text="&lt;physics&gt;&lt;physics-engine&gt;" />
  <row Id="17652" PostHistoryTypeId="2" PostId="8620" RevisionGUID="e399ce7a-a2b6-42c6-bfce-7e1157c8ddbb" CreationDate="2011-02-15T23:14:59.423" UserId="539" Text="Try [Gleed](http://gleed2d.codeplex.com/). From its site:&#xD;&#xA;&#xD;&#xA;  &gt; GLEED2D (Generic LEvel EDitor 2D) is a general purpose, non tile-based Level Editor for 2D games of any genre that allows arbitrary placement of textures and other items in 2D space. Levels are saved in XML format. Custom Properties can be added to the items in order to represent game-specific data/events/associations between items etc. &#xD;&#xA;Check the video tutorials under the Documentation tab to get an idea of its powerful features.&#xD;&#xA;" />
  <row Id="17653" PostHistoryTypeId="2" PostId="8621" RevisionGUID="7a007f31-1281-498a-9d33-a428560de831" CreationDate="2011-02-15T23:22:02.047" UserId="111" Text="From [ImpactJS Tools][1] page there are:&#xD;&#xA;&#xD;&#xA; - [PhoneGap][2]&#xD;&#xA;  - Package your games into an iPhone or Android App, ready to be distributed in the App Stores.&#xD;&#xA; - [appMobi][3]&#xD;&#xA;  - Easily integrate and distribute your games into native iPhone and Android Apps. You don't even need a Mac or XCode to get your game into the iPhone App Store.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://impactjs.com/tools&#xD;&#xA;  [2]: http://www.phonegap.com/&#xD;&#xA;  [3]: http://appmobi.com/" />
  <row Id="17654" PostHistoryTypeId="25" PostId="8619" RevisionGUID="939f2169-c5b8-4564-a9ba-52528a5b03cd" CreationDate="2011-02-15T23:22:28.410" Comment="http://twitter.com/#!/StackGameDev/status/37652996351328256" />
  <row Id="17655" PostHistoryTypeId="2" PostId="8622" RevisionGUID="dc6e0aa3-67c0-4278-8142-91b886b800a7" CreationDate="2011-02-15T23:37:22.883" UserId="4802" Text="Suppose I'm building a chess game where I want to have animations.  Pieces glide to their new squares when moved.  Pieces perform attack animations when capturing other pieces.&#xD;&#xA;&#xD;&#xA;I'm not sure how to effectively separate the data and logic needed for these animations and the actual game model (in the MVC sense).  The pieces themselves should ideally not have to worry about their pixel coordinates or current animation frame.  At the same time, many changes to the model are effectively driven by animations.  A moved piece changes its position after (before?) its sprite is done gliding.  A piece is removed from the board after the capturing piece is finished its attack animation.&#xD;&#xA;&#xD;&#xA;How would you suggest I manage the game model, the graphics and animations, and their relationships?  For example, where would the animations &quot;live&quot;?  How would animations be created and managed in response to player moves?  How would animations drive updates to the game model, or how would the game model drive animations?" />
  <row Id="17656" PostHistoryTypeId="1" PostId="8622" RevisionGUID="dc6e0aa3-67c0-4278-8142-91b886b800a7" CreationDate="2011-02-15T23:37:22.883" UserId="4802" Text="Keeping game model and graphics/animation separate but in sync" />
  <row Id="17657" PostHistoryTypeId="3" PostId="8622" RevisionGUID="dc6e0aa3-67c0-4278-8142-91b886b800a7" CreationDate="2011-02-15T23:37:22.883" UserId="4802" Text="&lt;architecture&gt;&lt;animation&gt;&lt;models&gt;" />
  <row Id="17658" PostHistoryTypeId="2" PostId="8623" RevisionGUID="e9683539-9858-4ae0-97ab-9e149b618603" CreationDate="2011-02-16T00:17:12.320" UserId="982" Text="I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I had really just been using a function I made passed to glutIdleFunc to update all the drawing and physics in one pass. This was fine for simple animations that I didn't care too much about the frame rate, but since the game is mostly physics based, I really want to (need to) tie down how fast it's updating.&#xD;&#xA;&#xD;&#xA;So my first attempt was to have my function I pass to glutIdleFunc (myIdle()) to keep track of how much time has passed since the previous call to it, and update the physics (and currently graphics) every so many milliseconds. I used timeGetTime() to do this (by using &lt;windows.h&gt;). And this got me to thinking, is using the idle function really a good way of going about the game loop?&#xD;&#xA;&#xD;&#xA;My question is, what is a better way to implement the game loop in OpenGl? Should I avoid using the idle function?" />
  <row Id="17659" PostHistoryTypeId="1" PostId="8623" RevisionGUID="e9683539-9858-4ae0-97ab-9e149b618603" CreationDate="2011-02-16T00:17:12.320" UserId="982" Text="A good way to build a game loop in OpenGL" />
  <row Id="17660" PostHistoryTypeId="3" PostId="8623" RevisionGUID="e9683539-9858-4ae0-97ab-9e149b618603" CreationDate="2011-02-16T00:17:12.320" UserId="982" Text="&lt;opengl&gt;&lt;c&gt;&lt;gameloop&gt;" />
  <row Id="17661" PostHistoryTypeId="2" PostId="8624" RevisionGUID="18a0b577-69c2-4ec8-945c-394a74956e53" CreationDate="2011-02-16T00:28:13.177" UserId="202" Text="Use a simple [**observer pattern**](http://en.wikipedia.org/wiki/Observer_pattern):&#xD;&#xA;&#xD;&#xA;1. The player input (mouse clicks/button presses) manipulates the model (abstract representation of chess board with pieces on it).&#xD;&#xA;2. Your graphics component responsible for animating and rendering gets notified when the model's state changes and plays the according animation.&#xD;&#xA;&#xD;&#xA;There are two ways to &quot;sync&quot; both modules:&#xD;&#xA;&#xD;&#xA;1. Prevent any player input while an animation is running.&#xD;&#xA;2. Maintain a queue in which you insert animations that are then being played one after another, thus giving your players the possibility to &quot;play ahead&quot; (for example choosing a piece that isn't involved in the current animation and moving it after realizing what the enemy just did)&#xD;&#xA;&#xD;&#xA;Don't forget that your model contains all the game logic and follow this rule strictly. The graphics system just acts like an UI, while the model decides whether moves are actually allowed or not. This clear separation answers many questions (like: &quot;What if someone commands a piece to do X, when it's currently doing Y?&quot;) and avoids logic problems along the course of the game implementation." />
  <row Id="17663" PostHistoryTypeId="16" PostId="8617" RevisionGUID="1a786422-b080-491e-80aa-a6fcf2a1d14e" CreationDate="2011-02-16T00:31:07.640" UserId="189" />
  <row Id="17666" PostHistoryTypeId="2" PostId="8625" RevisionGUID="85acb822-ae95-4d4a-b024-4e58f371e3de" CreationDate="2011-02-16T00:55:52.940" UserId="189" Text="I think `glutIdleFunc` is just fine; it's essentially what you'd end up doing by hand anyway, if you didn't use it. No matter what you're going to have a tight loop which is not called in a fixed pattern, and you need to make the choice whether you want to convert it to a fixed-time loop or keep it a variable-time loop and make sure all your math accounts for interpolating time. Or even a mix of these, somehow.&#xD;&#xA;&#xD;&#xA;You can certainly have a `myIdle` function which you pass to `glutIdleFunc`, and within that, measure the time that has passed, divide it by your fixed timestep, and call another function that many times.&#xD;&#xA;&#xD;&#xA;Here is what **not** to do:&#xD;&#xA;&#xD;&#xA;    void myFunc() {&#xD;&#xA;        // (calculate timeDifference here)&#xD;&#xA;        int numOfTimes = timeDifference / 10;&#xD;&#xA;        for(int i=0; i&lt;numOfTimes; i++) {&#xD;&#xA;            fixedTimestep();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;fixedTimestep would not be called every 10 milliseconds. In fact it would run slower than real time, and you might end up fudging numbers to compensate when really the root of the problem lies in the loss of the remainder when you divide `timeDifference` by 10.&#xD;&#xA;&#xD;&#xA;Instead, do something like this:&#xD;&#xA;&#xD;&#xA;    long queuedMilliseconds; // static or whatever, this must persist outside of your loop&#xD;&#xA;    &#xD;&#xA;    void myFunc() {&#xD;&#xA;        // (calculate timeDifference here)&#xD;&#xA;        queuedMilliseconds += timeDifference;&#xD;&#xA;        while(queuedMilliseconds &gt;= 10) {&#xD;&#xA;            fixedTimestep();&#xD;&#xA;            queuedMilliseconds -= 10;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now this loop structure ensures that your `fixedTimestep` function would get called once per 10 milliseconds, without losing any milliseconds as remainder or anything like that.&#xD;&#xA;&#xD;&#xA;Due to the multitasking nature of operating systems you can't rely on a function being called exactly every 10 milliseconds; but the above loop would happen quick enough that it would hopefully be close enough, and you can assume that each call of `fixedTimestep` would increment your simulation 10 milliseconds worth.&#xD;&#xA;&#xD;&#xA;Please also read [this answer][1] and especially the links provided in the answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/651/tips-for-writing-the-main-game-loop/656#656" />
  <row Id="17667" PostHistoryTypeId="5" PostId="8623" RevisionGUID="11501ed5-5794-4a80-89c4-498b8efda042" CreationDate="2011-02-16T00:56:55.683" UserId="3637" Comment="Code formating" Text="I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I had really just been using a function I made passed to `glutIdleFunc` to update all the drawing and physics in one pass. This was fine for simple animations that I didn't care too much about the frame rate, but since the game is mostly physics based, I really want to (need to) tie down how fast it's updating.&#xD;&#xA;&#xD;&#xA;So my first attempt was to have my function I pass to `glutIdleFunc` (`myIdle()`) to keep track of how much time has passed since the previous call to it, and update the physics (and currently graphics) every so many milliseconds. I used `timeGetTime()` to do this (by using `&lt;windows.h&gt;`). And this got me to thinking, is using the idle function really a good way of going about the game loop?&#xD;&#xA;&#xD;&#xA;My question is, what is a better way to implement the game loop in OpenGL? Should I avoid using the idle function?" />
  <row Id="17668" PostHistoryTypeId="24" PostId="8623" RevisionGUID="caaa4a44-a2fe-40cc-9322-3fed0557acf9" CreationDate="2011-02-16T00:56:55.683" Comment="Proposed by 3637 approved by 189 edit id of 32" />
  <row Id="17669" PostHistoryTypeId="2" PostId="8626" RevisionGUID="d9932f62-9498-4362-ab62-e191deffe8b8" CreationDate="2011-02-16T01:51:35.980" UserId="3656" Text="Is this for a new elevated Web 2.0 developer-player relationships, or a developer's site with really tight integration between the multiplayer/social media/community connectivity and the developer's newsreel?&#xD;&#xA;&#xD;&#xA;The sites that come to mind for various reasons:&#xD;&#xA;&#xD;&#xA;- [Bungie.Net][1] - The original pioneer in getting down and dirty with its playerbase in the AAA space via the Weekly Update, having a designated community rep (Frankie), and beating everyone to the chase when it comes to displaying Xbox Live stats on a website.&#xD;&#xA;- [MuseGames][2] - For one of their first big Unity games, Guns of Icarus, they built a whole community site backend designed to have even more games plugged into it for connectivity.&#xD;&#xA;- [Battle.net][3] - All the new Facebook integration and combining all your product keys in one and even offering setup files for download was a big step.&#xD;&#xA;- [Steam][4] - Not for a specific game or developer, but still, a great model.&#xD;&#xA;- [Wolfire Games][5] - A good study of the importance of constant, reliable and interesting updates for indie games in development, as well as exerting leadership in the indie community via the Humble Bundle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bungie.net/&#xD;&#xA;  [2]: http://musegames.com/&#xD;&#xA;  [3]: http://us.battle.net/en/&#xD;&#xA;  [4]: http://steampowered.com&#xD;&#xA;  [5]: http://www.wolfire.com/" />
  <row Id="17670" PostHistoryTypeId="2" PostId="8627" RevisionGUID="323dc31a-9f3b-48c2-be62-0c5dd5a0a237" CreationDate="2011-02-16T01:55:38.427" UserId="5482" Text="I want to create a trivia game for my website. The graphic design does not have to be too fancy, probably no more advanced than a typical flash game. It needs to be secure because I want users to be able to play for real money. It also needs to run fast so users don't spend their time frustrated with game freezing. Compatibility, as with almost all online products, is key because of the large target market. &#xD;&#xA;&#xD;&#xA;I am most acquainted with Java programming, but I don't want to do it in Java if there is something much better. I am assuming I will have to utilize a variety of different languages in order for everything to come together.&#xD;&#xA;&#xD;&#xA;If someone could point out the main structure of everything so I could get a good start that would be great!&#xD;&#xA;&#xD;&#xA;1) Language choice for simple secure online multiplayer games?&#xD;&#xA;&#xD;&#xA;2) Perhaps use a database like MySQL, stored on a secure server for the trivia questions?&#xD;&#xA;&#xD;&#xA;3) Free educational resources and even simpler projects to practice?&#xD;&#xA;&#xD;&#xA;Any ideas or suggestions would be helpful...Thanks!" />
  <row Id="17671" PostHistoryTypeId="1" PostId="8627" RevisionGUID="323dc31a-9f3b-48c2-be62-0c5dd5a0a237" CreationDate="2011-02-16T01:55:38.427" UserId="5482" Text="Best way to go for simple online multi-player games?" />
  <row Id="17672" PostHistoryTypeId="3" PostId="8627" RevisionGUID="323dc31a-9f3b-48c2-be62-0c5dd5a0a237" CreationDate="2011-02-16T01:55:38.427" UserId="5482" Text="&lt;game-design&gt;&lt;multiplayer&gt;&lt;language-choice&gt;&lt;planning&gt;&lt;online&gt;" />
  <row Id="17673" PostHistoryTypeId="2" PostId="8628" RevisionGUID="f8737ae3-8f90-470b-a49b-40e3c4d769e8" CreationDate="2011-02-16T02:15:38.923" UserId="2130" Text="The simple answer is no, you do not want to use the glutIdleFunc callback in a game that has some sort of simulation. The reason for this is that this function divorces animation and draw code from window event handling, this is perfectly fine for an interactive application (interact, then response), but not for a game where the physics or game state must progress independent of interaction or render time.&#xD;&#xA;&#xD;&#xA;You want to completely decouple input handling, game state, and draw code. There is an easy and clean solution to this that does not involve the graphics library directly (i.e. it's portable and easy to visualize); you want the entire game loop to produce time and have the simulation consume the produced time (in chunks). The key however is to then integrate the amount of time your simulation consumed into your animation.&#xD;&#xA;&#xD;&#xA;The best explanation and tutorial I have found on this is Glenn Fiedler's [Fix Your Timestep][1]&#xD;&#xA;&#xD;&#xA;This tutorial has the full treatement, however if you do not have an _actual_ physics simulation, you can skip the true integration but the basic loop still boils down to (in verbose pseudo-code):&#xD;&#xA;&#xD;&#xA;    // The amount of time want to simulate each step in milliseconds&#xD;&#xA;    // (written as implicit frame-rate)&#xD;&#xA;    timeDelta = 1000/30&#xD;&#xA;    timeAccumulator = 0&#xD;&#xA;    while ( game should run )&#xD;&#xA;    {&#xD;&#xA;      timeSimulatedThisIteration = 0&#xD;&#xA;      startTime = currentTime()&#xD;&#xA;    &#xD;&#xA;      while ( timeAccumulator &gt;= timeDelta )&#xD;&#xA;      {&#xD;&#xA;        stepGameState( timeDelta )&#xD;&#xA;        timeAccumulator -= timeDelta&#xD;&#xA;        timeSimulatedThisIteration += timeDelta&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      stepAnimation( timeSimulatedThisIteration )&#xD;&#xA;    &#xD;&#xA;      renderFrame() // OpenGL frame drawing code goes here&#xD;&#xA;    &#xD;&#xA;      timeAccumulator += currentTime() - startTime &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;By doing it this way, stalls in your render code, input handling, or operating system do not cause your game state to fall behind. This method is also portable and graphics library independent.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/&#xD;&#xA;" />
  <row Id="17674" PostHistoryTypeId="25" PostId="8627" RevisionGUID="cf10cb82-9018-41f8-8177-669fdbe2d176" CreationDate="2011-02-16T02:22:29.063" Comment="http://twitter.com/#!/StackGameDev/status/37698295736446976" />
  <row Id="17675" PostHistoryTypeId="2" PostId="8629" RevisionGUID="31473b06-ef6f-4d7e-9fa3-f35ba04efe5c" CreationDate="2011-02-16T02:53:41.033" UserDisplayName="user5484" Text="I'm using OpenGL ES (in iOS) and am struggling with setting up a viewport with an off-center distance point.  &#xD;&#xA;&#xD;&#xA;Consider a game where you have a character in the left hand side of the screen, and some controls alpha'd over the left-hand side.  The &quot;main&quot; part of the screen is on the right, but you still want to show whats in the view on the left.  However when the character moves &quot;forward&quot; you want the character to appear to be going &quot;straight&quot;, or &quot;up&quot; on the device, and not heading on an angle to the point that is geographically at the mid-x position in the screen.&#xD;&#xA;&#xD;&#xA;Here's the jist of how i set my viewport up where it is centered in the middle:&#xD;&#xA;&#xD;&#xA;    // setup the camera&#xD;&#xA;    	//&#xD;&#xA;        &#xD;&#xA;        glMatrixMode(GL_PROJECTION);&#xD;&#xA;        glLoadIdentity();&#xD;&#xA;    &#xD;&#xA;    	const GLfloat zNear = 0.1;&#xD;&#xA;    	const GLfloat zFar = 1000.0;&#xD;&#xA;    	const GLfloat fieldOfView = 90.0; // can definitely adjust this to see more/less of the scene&#xD;&#xA;    	&#xD;&#xA;    	GLfloat size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0);&#xD;&#xA;    	CGRect rect;&#xD;&#xA;    	rect.origin = CGPointMake(0.0, 0.0);&#xD;&#xA;    	rect.size = CGSizeMake(backingWidth, backingHeight);&#xD;&#xA;    	glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar);&#xD;&#xA;    	&#xD;&#xA;    	glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    	// rotate the whole scene by the tilt to face down on the dude&#xD;&#xA;    	const float tilt = 0.3f;&#xD;&#xA;    	const float yscale = 0.8f;&#xD;&#xA;    	const float zscale = -4.0f;&#xD;&#xA;    	glTranslatef(0.0, yscale, zscale);&#xD;&#xA;    	const int rotationMinDegree = 0;&#xD;&#xA;    	const int rotationMaxDegree = 180;&#xD;&#xA;    &#xD;&#xA;            glRotatef(tilt * (rotationMaxDegree - rotationMinDegree) / 2, 1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;    	glTranslatef(0, -yscale, -zscale);&#xD;&#xA;    	&#xD;&#xA;    	static float b = -25; //0;&#xD;&#xA;    	static float c = 0;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    	// rotate by to face in the direction of the dude&#xD;&#xA;    	float a = RADIANS_TO_DEGREES(-atan2f(-gCamera.orientation.x, -gCamera.orientation.z));&#xD;&#xA;    	glRotatef(a, 0.0, 1.0, 0.0);&#xD;&#xA;    &#xD;&#xA;    	&#xD;&#xA;    	// and move to where it is&#xD;&#xA;    	glTranslatef(-gCamera.pos.x, -gCamera.pos.y, -gCamera.pos.z);&#xD;&#xA;    &#xD;&#xA;        // draw the rest of the scene&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've tried a variety of things to make it appear as though &quot;the dude&quot; is off to the right:&#xD;&#xA;- do a translate after the frustrum to the x direction&#xD;&#xA;- do a rotation after the frustrum about the up/y-axis&#xD;&#xA;- move the camera with a biased lean to the left of the dude&#xD;&#xA;&#xD;&#xA;Nothing i do seems to produce good results, the dude will either look like he's stuck on an angle, or the whole scene will appear tilted.  I'm no OpenGL expert, so i'm hoping someone can suggest some ideas or tricks on how to &quot;off-center&quot; these model views in OpenGL.  Thanks!" />
  <row Id="17676" PostHistoryTypeId="1" PostId="8629" RevisionGUID="31473b06-ef6f-4d7e-9fa3-f35ba04efe5c" CreationDate="2011-02-16T02:53:41.033" UserDisplayName="user5484" Text="Setting up OpenGL camera with off-center perspective" />
  <row Id="17677" PostHistoryTypeId="3" PostId="8629" RevisionGUID="31473b06-ef6f-4d7e-9fa3-f35ba04efe5c" CreationDate="2011-02-16T02:53:41.033" UserDisplayName="user5484" Text="&lt;opengl&gt;&lt;opengl-es&gt;" />
  <row Id="17678" PostHistoryTypeId="2" PostId="8630" RevisionGUID="5dff78db-13c4-41f8-b09b-af78944e5e1e" CreationDate="2011-02-16T02:54:00.243" UserId="284" Text="First off, I think that the best example in recent time is Minecraft.  It's not (all) coincidence that Minecraft has grown to be as successful as it has.&#xD;&#xA;&#xD;&#xA;The developer has put out a game from very very early on in the development life-cycle (pre-pre-pre alpha? anyway, it's only in beta now).  From that we get a few principles:&#xD;&#xA;&#xD;&#xA; - Get the game out there for people&#xD;&#xA;   early.  Even if it turns out that&#xD;&#xA;   people who try it hate it, better you&#xD;&#xA;   learn that early, when you can still&#xD;&#xA;   change direction or try a different&#xD;&#xA;   game prototype.&#xD;&#xA;&#xD;&#xA; - Get the word out as soon as you can, so you can start building link power for your website (and you pretty much always want a website).&#xD;&#xA;&#xD;&#xA;In addition, it seems that early user-created-content helps: Make the basic game mechanic something that people can pour their heart &amp; soul into, and they will be more likely to spread it via word of mouth on their own.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;From my own personal experience, google adwords is a (relative) very cheap PR method, you can get a lot of coverage, and get &quot;testers/players/viewers&quot; at quite a cheap rate." />
  <row Id="17679" PostHistoryTypeId="2" PostId="8631" RevisionGUID="92c831ef-235e-4c0e-8ff3-6e502db5b198" CreationDate="2011-02-16T02:59:10.603" UserDisplayName="slcpfmmm" Text="I think most would agree with me that security is almost completely unrelated to the programming language you develop a project in. Security is mostly achieved by having a well thought security-centric architecture, proven crypto where needed and a good management of secret information (such as crypto keys).&#xD;&#xA;&#xD;&#xA;Designing a secure system is not trivial, and there are no recipes for it. As I said before, security is not a programming language, a platform or a set of tools. You can say you make a program in C++, deploy it on OpenBSD, and have RSA all over the place, yet have holes big enough to drive trucks through.&#xD;&#xA;&#xD;&#xA;In ultra-broad terms, designing secure client-server applications comes down to:&#xD;&#xA;&#xD;&#xA;a. Anything that effects the data (such as scores, etc.) must be calculated on the server. Design your application so even a user with access to your source code cannot act improperly.&#xD;&#xA;&#xD;&#xA;b. Use high grade symmetric encryption (such as AES, or Blowfish) for communication between the server and client, with key exchange with a good public key crypto algorithm, such as RSA. Encryption between trusted components is unnecessary.&#xD;&#xA;&#xD;&#xA;c. Make sure your network is well designed. For example, the database server should be on a private network, only visible by the game server. Good firewall rules and router settings should complement everything.&#xD;&#xA;&#xD;&#xA;d. Make sure all your keys and passwords are secure and well kept. What good is an ultra-secure system, whose admin password is qwertyuiop? Remember, the security of a system is that of its weakest link.&#xD;&#xA;&#xD;&#xA;So basically, you should always assume the worst for every line of code you write. If this is your first time designing a secure system, I'd advice you either get some experience with other test systems, or get somebody to help you design it." />
  <row Id="17680" PostHistoryTypeId="2" PostId="8632" RevisionGUID="489398f3-feae-44ee-888b-56bb0584a5c4" CreationDate="2011-02-16T03:02:20.877" UserId="189" Text="Your need for it to run fast and have high compatibility point to writing it in regular HTML and avoiding the likes of Flash and Java (applets) for this. If you haven't written any HTML before, you're in for a long road and yes you will need to utilize a variety of languages (HTML, JavaScript, CSS).&#xD;&#xA;&#xD;&#xA;If you have the server hosting, I recently found [Socket.IO][1] which I think is really neat - it will facilitate true real-time communication between the browser and your server. Otherwise, if you want to only use your web server, then you'd need to write a system probably based on polling, and the backend would most likely be PHP pages. It wouldn't be true real time but it could be close enough.&#xD;&#xA;&#xD;&#xA;It's interesting you mention real money upfront though. That seems to raise the stakes a lot. You will then need to deal with APIs of your virtual money systems (Google Checkout, etc.), make sure your system is airtight from hackers and scams and such, design your game in such a way that seems fair to the players, eliminate cheating in every way possible... It complicates the whole thing, honestly, and I think it's much too early to rush into something with no knowledge with a goal of making money. But if you're determined, I can only stand aside and wish you the best of luck in your adventure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://socket.io/" />
  <row Id="17681" PostHistoryTypeId="2" PostId="8633" RevisionGUID="4c71394f-4ee6-48c6-b4a0-0fe922685d8b" CreationDate="2011-02-16T03:11:36.033" UserId="370" Text="Take a look at how [Infinity Universe][1] does it.&#xD;&#xA;&#xD;&#xA;They have a big problem in that everything is to scale.  That make any sense of speed to be almost non-existent right up to the moment when you arrive at the star/planet/moon/.&#xD;&#xA;&#xD;&#xA;They have the best implementation of environmental speed lines I've seen.&#xD;&#xA;&#xD;&#xA;They denote speed by making the ship look like its flying through a thin dust cloud.  As the particles stream by the leave slight speed lines.  When the ship is at rest the cloud is completely transparent.&#xD;&#xA;&#xD;&#xA;Here is a video [link][2] demonstrating ship movement.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.infinity-universe.com&#xD;&#xA;  [2]: http://www.infinity-universe.com/Infinity/index.php?option=com_content&amp;task=view&amp;id=113&amp;Itemid=93" />
  <row Id="17682" PostHistoryTypeId="2" PostId="8634" RevisionGUID="e2608c27-425e-45fa-8801-8758671c12b3" CreationDate="2011-02-16T03:58:31.030" UserId="4224" Text="I'm not sure where this question belongs, but as it pertains to the development of a game **idea**, I figured I'd try to post it here.&#xD;&#xA;&#xD;&#xA;Recently I've been inspired to create a game based on another game I've played. However, the idea that I have is very similar to the original game. I was wondering, when does a game idea cross from being a homage or parody into the realm of being a ripoff? Are there any hard or fast rules or does this cross into a gray area?" />
  <row Id="17683" PostHistoryTypeId="1" PostId="8634" RevisionGUID="e2608c27-425e-45fa-8801-8758671c12b3" CreationDate="2011-02-16T03:58:31.030" UserId="4224" Text="When does a game idea cross the line between homage/parody to ripoff?" />
  <row Id="17684" PostHistoryTypeId="3" PostId="8634" RevisionGUID="e2608c27-425e-45fa-8801-8758671c12b3" CreationDate="2011-02-16T03:58:31.030" UserId="4224" Text="&lt;game-industry&gt;&lt;copyright&gt;" />
  <row Id="17686" PostHistoryTypeId="2" PostId="8636" RevisionGUID="6ec40c5d-441f-4f2f-84e8-7465a515d36c" CreationDate="2011-02-16T05:09:07.113" UserId="5119" Text="Simple thing that you can do is iterate for few times for each enemy generation with the 'rand' function such that the generated values are at a specific distance(MINIMUM_ENEMY_DISTANCE_FROM_PLAYER) from the player.&#xD;&#xA;&#xD;&#xA;something like this...&#xD;&#xA;        &#xD;&#xA;        #define SCREEN_WIDTH 480      //just assuming Landscape mode&#xD;&#xA;        #define SCREEN_HEIGHT 320&#xD;&#xA;       for(i from 1..100) // 100 is some random number-for number of iterations&#xD;&#xA;       {&#xD;&#xA;           enemyPositionX = arc4random()% SCREEN_WIDTH ;&#xD;&#xA;           enemyPositionY = arc4random()% SCREEN_HEIGHT ;&#xD;&#xA;           if(distanceToPlayer(enemyPositionX,enemyPositionY) &gt; MINIMUM_ENEMY_DISTANCE_FROM_PLAYER)&#xD;&#xA;           {&#xD;&#xA;              break;&#xD;&#xA;           }&#xD;&#xA;       }&#xD;&#xA;       //Now use enemyPositionX , enemyPositionY as spawn points for your enemies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Other option can be...&#xD;&#xA;    If the enemies generated are moving enemies,you can have some predefined spawnpoints and generate from that positions.You can have a check of this kind of game something like 'Robokill'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17687" PostHistoryTypeId="2" PostId="8637" RevisionGUID="c1c24047-46c0-407b-a2d8-aed96dc4a004" CreationDate="2011-02-16T05:21:14.983" UserId="5328" Text="Typically when working with a camera system, in addition to the frustum, you need three other pieces of information: where the camera is (eye), what it's pointed at (at), and its orientation (up). When trying to solve your shoulder-view problem, it is not typical to be modifying the frustum. You should set the camera at that shoulder view by modifying &quot;eye.&quot; To get it to look like he is walking in a straight line, I would try making the camera look along a vector that is parallel to &quot;the dude's&quot; vector of movement in order to make it look like he is moving in a straight line, and that is done by modifying &quot;at.&quot; If you need to make your scene look wonky by twisting the camera (so it has a sideways orientation or such), that is when you would modify &quot;up.&quot;" />
  <row Id="17688" PostHistoryTypeId="25" PostId="8623" RevisionGUID="bea7df7c-6e55-4903-b25c-76a5943b761b" CreationDate="2011-02-16T05:22:28.960" Comment="http://twitter.com/#!/StackGameDev/status/37743594370506752" />
  <row Id="17689" PostHistoryTypeId="2" PostId="8638" RevisionGUID="b0357383-1934-4c2a-b161-fd9b7582cb28" CreationDate="2011-02-16T05:30:08.170" UserId="5119" Text="Solution on my first try was...&#xD;&#xA;     Have a getInstance() static method in GameScene class&#xD;&#xA;&#xD;&#xA;         +(GameScene*) getInstance()&#xD;&#xA;         {&#xD;&#xA;            return s_currentInstace;//This is the static variable that holds the current GameScene&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;you should update 's_currentInstace' variable as and when you create and destroy GameScene accordingly.(i mean set s_currentInstace to 'nil' when GameScene is getting destroyed)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you want to send a message to GameScene, you just need to call getInstance() on GameScene and based on the return value you act ;).&#xD;&#xA;&#xD;&#xA;Will update this when i have some more solutions.&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="17690" PostHistoryTypeId="2" PostId="8639" RevisionGUID="b432d592-baa6-4a42-a0cc-f865d954a9ef" CreationDate="2011-02-16T06:55:39.520" UserId="284" Text="Really, games are fluid, they're concepts, and you haven't implemented your game yet, so to me, that begs the question:  Why even bother doing something that seems to you excessively similar to the other concept?  &#xD;&#xA;&#xD;&#xA;If there's any question in your mind that it's too similar, then it -is- too similar, by a long shot.  And why would you want to put lots of work into something that someone else might consider similar as well?  Now is the perfect time to throw some original ideas into the game to take it in a different direction." />
  <row Id="17691" PostHistoryTypeId="2" PostId="8640" RevisionGUID="582355e9-4cea-4ae0-b83f-85e0c5fd0e09" CreationDate="2011-02-16T07:51:16.107" UserId="659" Text="If you haven't already read it, I'd recommend reading this, gives some ideas of how non-tile-based 2D can be done very effectively:&#xD;&#xA;&#xD;&#xA;http://www.davidhellman.net/blog/the-art-of-braid-index/&#xD;&#xA;&#xD;&#xA;You could also take a look at the Aquaria source code, and see if its editor is adaptable to your needs (that used a mix of tiles and arbitrary object placement)&#xD;&#xA;&#xD;&#xA;I've been working on a non-tile-based editor myself (screenshots: http://www.bluescrn.net/projects/twodee6.png , http://www.bluescrn.net/projects/twodee4.png), but it's still very much a work-in-progress.&#xD;&#xA;" />
  <row Id="17692" PostHistoryTypeId="2" PostId="8641" RevisionGUID="ec545359-286b-42b1-a1d8-2f1b3d4b0f24" CreationDate="2011-02-16T08:20:19.767" UserId="659" Text="You should be able to apply a 2D offset/scale after the projection.&#xD;&#xA;&#xD;&#xA;Just multiply the projection matrix by a suitable translation/scale matrix (where the translations are in the -1..1 range of viewport coordinates)&#xD;&#xA;" />
  <row Id="17693" PostHistoryTypeId="25" PostId="8599" RevisionGUID="54527dfc-8eec-426b-aae9-39bffa429b90" CreationDate="2011-02-16T08:22:35.897" Comment="http://twitter.com/#!/StackGameDev/status/37788922310303744" />
  <row Id="17694" PostHistoryTypeId="2" PostId="8642" RevisionGUID="0ebd5b69-d702-4835-815c-cc7e36026bd6" CreationDate="2011-02-16T08:36:39.840" UserId="908" Text="Source code: Usually you don't give away the source code unless you have e.g. a porting contract with the publisher.&#xD;&#xA;&#xD;&#xA;Code quality: Most publishers do QA. And if you're aiming for a console you have to go through first-party QA, too. But in the end your code should also be good if you self-publish your games.&#xD;&#xA;&#xD;&#xA;Unique game concepts: Publishers are rather biased towards established concepts because they try to reduce their risk. Just look at the viable self-published indie scene on Steam, iPhone and XBLIG and compare it to a shelf of AAA productions. Notice the difference?&#xD;&#xA;&#xD;&#xA;Revenue sharing: That depends on the deal. If you want a development deal with upfront payments and an IP by the publisher you might have to settle at 30/70 (30% for you, 70% for the publisher) after the first party took its share (e.g. 30% with Apple). If you do a &quot;normal&quot; development deal you most likely end up somewhere between 50/50 and 70/30. If you strike a marketing deal the publisher's share might go down to 15%.&#xD;&#xA;&#xD;&#xA;Flaky publishers: It is not uncommon and [there've been a lot of cases][1]. It's best if you try to find out as much as possible about your publisher before you sign a deal. That's no reason to shy away from working with publishers, but you best be careful. &#xD;&#xA;&#xD;&#xA;Other issues: Be sure to have a lawyer read your contract!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://news.bigdownload.com/2010/10/04/interview-we-chat-with-outerlights-co-founder-about-bloody-goo/" />
  <row Id="17695" PostHistoryTypeId="5" PostId="8628" RevisionGUID="3cbe15e3-b2f9-4a45-9831-69970923c956" CreationDate="2011-02-16T09:34:21.847" UserId="2130" Comment="Tried to clarify why the glut callback specifically is a bad idea." Text="The simple answer is no, you do not want to use the glutIdleFunc callback in a game that has some sort of simulation. The reason for this is that this function divorces animation and draw code from window event handling but not asynchronously. In other words, receiving and handing window events stalls draw code (or whatever you put in this callback), this is perfectly fine for an interactive application (interact, then response), but not for a game where the physics or game state must progress independent of interaction or render time.&#xD;&#xA;&#xD;&#xA;You want to completely decouple input handling, game state, and draw code. There is an easy and clean solution to this that does not involve the graphics library directly (i.e. it's portable and easy to visualize); you want the entire game loop to produce time and have the simulation consume the produced time (in chunks). The key however is to then integrate the amount of time your simulation consumed into your animation.&#xD;&#xA;&#xD;&#xA;The best explanation and tutorial I have found on this is Glenn Fiedler's [Fix Your Timestep][1]&#xD;&#xA;&#xD;&#xA;This tutorial has the full treatement, however if you do not have an _actual_ physics simulation, you can skip the true integration but the basic loop still boils down to (in verbose pseudo-code):&#xD;&#xA;&#xD;&#xA;    // The amount of time want to simulate each step in milliseconds&#xD;&#xA;    // (written as implicit frame-rate)&#xD;&#xA;    timeDelta = 1000/30&#xD;&#xA;    timeAccumulator = 0&#xD;&#xA;    while ( game should run )&#xD;&#xA;    {&#xD;&#xA;      timeSimulatedThisIteration = 0&#xD;&#xA;      startTime = currentTime()&#xD;&#xA;    &#xD;&#xA;      while ( timeAccumulator &gt;= timeDelta )&#xD;&#xA;      {&#xD;&#xA;        stepGameState( timeDelta )&#xD;&#xA;        timeAccumulator -= timeDelta&#xD;&#xA;        timeSimulatedThisIteration += timeDelta&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      stepAnimation( timeSimulatedThisIteration )&#xD;&#xA;    &#xD;&#xA;      renderFrame() // OpenGL frame drawing code goes here&#xD;&#xA;    &#xD;&#xA;      timeAccumulator += currentTime() - startTime &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;By doing it this way, stalls in your render code, input handling, or operating system do not cause your game state to fall behind. This method is also portable and graphics library independent.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/&#xD;&#xA;" />
  <row Id="17696" PostHistoryTypeId="2" PostId="8643" RevisionGUID="51faff75-e7c4-4370-b150-6b94a51db82e" CreationDate="2011-02-16T09:54:12.583" UserId="5486" Text="I need to find a simple game in which several people need to interact with each other. The game should be simple for an analysis (it should be simple to describe what happens in the game, what players did). Because of the last reason, the video games are not appropriate for my purposes. I am thinking of a simple, schematic, strategic game where people can make a limited set of simple moves.&#xD;&#xA;&#xD;&#xA;Moreover, the moves of the game should be conditioned **not only** by a pure logic (like in chess or go). The behavior in the game should depend on psychological factors, on relations between people. In more details, I think it should be a cooperation game where people make their decisions based on mutual trust. It would be nice if players can express punishment and forgiveness in the game.&#xD;&#xA;&#xD;&#xA;Does anybody knows a game that is close to what I have described above?" />
  <row Id="17697" PostHistoryTypeId="1" PostId="8643" RevisionGUID="51faff75-e7c4-4370-b150-6b94a51db82e" CreationDate="2011-02-16T09:54:12.583" UserId="5486" Text="Is there any simple game that involves psychological factors?" />
  <row Id="17698" PostHistoryTypeId="3" PostId="8643" RevisionGUID="51faff75-e7c4-4370-b150-6b94a51db82e" CreationDate="2011-02-16T09:54:12.583" UserId="5486" Text="&lt;strategy&gt;" />
  <row Id="17699" PostHistoryTypeId="2" PostId="8644" RevisionGUID="6033c64e-8f98-4239-9e03-6225b43e97ad" CreationDate="2011-02-16T10:57:36.357" UserId="4928" Text="Is it possible to pack all the little .xnb files into one big file?&#xD;&#xA;Given the level of abstraction of the XNA Framework I though this would come out of the box but I can't find any well integrated solution.&#xD;&#xA;&#xD;&#xA;So far the best candidate is [XnaZip][1] but in addition to having to compile the resources in a post-build event, and a little trouble porting the game to XBOX I have to rename all the references to resources I have already implemented.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnazip.codeplex.com/" />
  <row Id="17700" PostHistoryTypeId="1" PostId="8644" RevisionGUID="6033c64e-8f98-4239-9e03-6225b43e97ad" CreationDate="2011-02-16T10:57:36.357" UserId="4928" Text="Pack of resources in one big file with XNA" />
  <row Id="17701" PostHistoryTypeId="3" PostId="8644" RevisionGUID="6033c64e-8f98-4239-9e03-6225b43e97ad" CreationDate="2011-02-16T10:57:36.357" UserId="4928" Text="&lt;xna&gt;" />
  <row Id="17702" PostHistoryTypeId="2" PostId="8645" RevisionGUID="9d848953-3536-47b8-bfc3-c9c39b1eaadf" CreationDate="2011-02-16T11:05:13.140" UserId="1859" Text="There's [Mafia][1], a &quot;party game&quot; where players are split in two teams: a few members of the Mafia who know each other and a larger group of regular people who don't know who is who. The goal of each team is to eliminate the other one.&#xD;&#xA;&#xD;&#xA;Mafiosi kill one person at night. On the following day, people deliberate to nominate somebody who'll be killed. That's where you find psychology. The art of lying, betrayal and denunciation.&#xD;&#xA;&#xD;&#xA;Very fun game. I especially like the werewolf variant.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mafia_(game)" />
  <row Id="17703" PostHistoryTypeId="5" PostId="8643" RevisionGUID="3e43d77a-d4a4-45c0-8ff1-4ad2259c9e16" CreationDate="2011-02-16T11:09:37.810" UserId="5486" Comment="added 359 characters in body" Text="I need to find a simple game in which several people need to interact with each other. The game should be simple for an analysis (it should be simple to describe what happens in the game, what players did). Because of the last reason, the video games are not appropriate for my purposes. I am thinking of a simple, schematic, strategic game where people can make a limited set of simple moves.&#xD;&#xA;&#xD;&#xA;Moreover, the moves of the game should be conditioned **not only** by a pure logic (like in chess or go). The behavior in the game should depend on psychological factors, on relations between people. In more details, I think it should be a cooperation game where people make their decisions based on mutual trust. It would be nice if players can express punishment and forgiveness in the game.&#xD;&#xA;&#xD;&#xA;Does anybody knows a game that is close to what I have described above?&#xD;&#xA;&#xD;&#xA;**ADDED**&#xD;&#xA;&#xD;&#xA;I need to add that I need a game where actions of players are simple and easy to formalize. Because of that I cannot use verbal games (where communication between players is important). By simple actions I understand, for example, moves on the board from one position to another one, or passing chips from one player to another one and so on." />
  <row Id="17704" PostHistoryTypeId="2" PostId="8646" RevisionGUID="4acd105a-420a-4b06-8d02-f173a8a257af" CreationDate="2011-02-16T11:12:28.643" UserId="4410" Text="I've not played it myself, it might also be a bit more complex than you want, but I've a friend who likes http://www.transformice.com/" />
  <row Id="17705" PostHistoryTypeId="25" PostId="8643" RevisionGUID="51b9bd1e-3733-46cb-b0e0-6c97a3ec3562" CreationDate="2011-02-16T11:22:35.710" Comment="http://twitter.com/#!/StackGameDev/status/37834220084666368" />
  <row Id="17706" PostHistoryTypeId="2" PostId="8647" RevisionGUID="f8b77939-5a45-45f8-8cce-7d9812582669" CreationDate="2011-02-16T11:28:29.627" UserId="5488" Text="Can some one point me to Java code ( in Java not C or C++) that calculates all the normals for all the vertices of a mesh for OpenGL ES application. I need this for lighting. Lets say I have a cube with following vertices and indices:&#xD;&#xA;&#xD;&#xA;    float vertices[] = { -width, -height, -depth, // 0&#xD;&#xA;                                  width, -height, -depth, // 1&#xD;&#xA;                                  width,  height, -depth, // 2&#xD;&#xA;                                  &#xD;&#xA;                                 -width,  height, -depth, // 3&#xD;&#xA;                                 &#xD;&#xA;                                 -width, -height,  depth, // 4&#xD;&#xA;                                 &#xD;&#xA;                                 &#xD;&#xA;                                  width, -height,  depth, // 5&#xD;&#xA;                                  &#xD;&#xA;                                  width,  height,  depth, // 6&#xD;&#xA;                                  &#xD;&#xA;                                 -width,  height,  depth // 7&#xD;&#xA;            };  &#xD;&#xA;           short indices[] = { 0, 2, 1,&#xD;&#xA;                    0, 3, 2,&#xD;&#xA;                    &#xD;&#xA;                    1,2,6,&#xD;&#xA;                    6,5,1,&#xD;&#xA;                    &#xD;&#xA;                    4,5,6,&#xD;&#xA;                    6,7,4,&#xD;&#xA;                    &#xD;&#xA;                    2,3,6,&#xD;&#xA;                    6,3,7,&#xD;&#xA;                    &#xD;&#xA;                    0,7,3,&#xD;&#xA;                    0,4,7,&#xD;&#xA;                    &#xD;&#xA;                    0,1,5,&#xD;&#xA;                    0,5,4&#xD;&#xA;                    &#xD;&#xA;                    &#xD;&#xA;                   };&#xD;&#xA;&#xD;&#xA;In above specific example how many normals we need ?&#xD;&#xA;&#xD;&#xA;        " />
  <row Id="17707" PostHistoryTypeId="1" PostId="8647" RevisionGUID="f8b77939-5a45-45f8-8cce-7d9812582669" CreationDate="2011-02-16T11:28:29.627" UserId="5488" Text="How to calculate vertext normals for a mesh in Java  in OpenGL ES application?" />
  <row Id="17708" PostHistoryTypeId="3" PostId="8647" RevisionGUID="f8b77939-5a45-45f8-8cce-7d9812582669" CreationDate="2011-02-16T11:28:29.627" UserId="5488" Text="&lt;opengl-es&gt;" />
  <row Id="17709" PostHistoryTypeId="2" PostId="8648" RevisionGUID="b239afe0-aa31-441f-8cfb-8d68e770fc8f" CreationDate="2011-02-16T11:33:41.570" UserId="744" Text="I don't really have any good advice, but I have some examples. Most indie developers have a hard enough time selling _games_, let alone doing real PR.&#xD;&#xA;&#xD;&#xA;Tales of Tales &lt;a href=&quot;http://tale-of-tales.com/blog/information/&quot;&gt;pushes a pretty consistent message&lt;/a&gt; about who they are and what they do, to the point of &lt;a href=&quot;http://tale-of-tales.com/tales/RAM.html&quot;&gt;an explicit manifesto&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.wolfire.com/&quot;&gt;Wolfire&lt;/a&gt; has gotten a terrific amount of attention through publishing technical articles about their games. &quot;Behind the scenes&quot; stuff does a good job of personalizing the developers and can correct the (many) misconceptions gamers have about game development.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://news.quelsolaar.com/&quot;&gt;Eskil Steenberg&lt;/a&gt;, and &lt;a href=&quot;http://hcsoftware.sourceforge.net/jason-rohrer/&quot;&gt;Jason Rohrer&lt;/a&gt;, both of whom acquired small cults of personality, were presented consistently as outsiders who were going to stick it to the man with their new approaches to making games. Whether that's because they wanted that, or because the media loves to tell underdog stories, is anybody's guess.&#xD;&#xA;&#xD;&#xA;(CW - this is too long for a comment, but not a real answer to the question, and maybe other people can add good examples.)" />
  <row Id="17710" PostHistoryTypeId="2" PostId="8649" RevisionGUID="351f73a2-ed2d-4160-95c9-10029f343679" CreationDate="2011-02-16T12:04:19.480" UserId="259" Text="Cliffski of Positech fame has a bunch of useful blogposts on marketing and PR. His blog tags are too broad for easy browsing, but almost everything in Business is worth reading: http://positech.co.uk/cliffsblog/?cat=3&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17711" PostHistoryTypeId="2" PostId="8650" RevisionGUID="bfba5b28-bf15-4c67-a6dd-942eaca32abd" CreationDate="2011-02-16T12:52:48.733" UserId="211" Text="It's possible, but you either have to:&#xD;&#xA;&#xD;&#xA; - Find a library that does it for you, or&#xD;&#xA; - implement it yourself.&#xD;&#xA;&#xD;&#xA;XNA lets you do the latter by deriving from the `ContentManager` class and replacing the `OpenStream` method; in fact, the [documentation][1] explicitly says:&#xD;&#xA;&#xD;&#xA;&gt;     protected virtual Stream OpenStream (string assetName)&#xD;&#xA;&gt; Opens a stream for reading the specified asset. Derived classes can replace this to implement pack files or asset compression.&#xD;&#xA;&#xD;&#xA;In the override version of `OpenStream`, one would simply return a compatible `Stream` that read the requested asset data from a pack file, rather than opening a `FileStream` from disk.&#xD;&#xA;&#xD;&#xA;The tricky part is that you have to actually build the pack file yourself, incorporating the `xnb` files output via the content build pipeline. You could build a Content Pipeline Extension to do this, or find some other method, depending on what your goals are.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.contentmanager.openstream.aspx" />
  <row Id="17712" PostHistoryTypeId="2" PostId="8651" RevisionGUID="0a940deb-c358-4d55-9c61-9e4e6b1da4bc" CreationDate="2011-02-16T13:56:56.803" UserId="1868" Text="I am planning to make a Laser Squad clone and I think I have most of the aspects covered. But the major headache is the projectiles shot/thrown.&#xD;&#xA;&#xD;&#xA;The easy way would be to figure out the probability of hit and just mark miss/hit. But I want to be able to have the projectile to hit something eventually (collateral damage!).&#xD;&#xA;&#xD;&#xA;Currently everything is flat 2D tile map and there would be full (wall, door) and half height (desk, chair, window) obstacles.&#xD;&#xA;&#xD;&#xA;My idea is to draw an imaginary line from the shooter to the target and add some horizontal&amp;vertical error based on the player skills. Then I would trace the modified path until it hits something. This is basically what the original Laser Squad seems to do.&#xD;&#xA;&#xD;&#xA;Can you recommend any algorithms or other approaches for this? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="17713" PostHistoryTypeId="1" PostId="8651" RevisionGUID="0a940deb-c358-4d55-9c61-9e4e6b1da4bc" CreationDate="2011-02-16T13:56:56.803" UserId="1868" Text="Projectiles in tile mapped turn-based tactics game?" />
  <row Id="17714" PostHistoryTypeId="3" PostId="8651" RevisionGUID="0a940deb-c358-4d55-9c61-9e4e6b1da4bc" CreationDate="2011-02-16T13:56:56.803" UserId="1868" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;tiles&gt;&lt;turn-based-tactics&gt;" />
  <row Id="17715" PostHistoryTypeId="2" PostId="8652" RevisionGUID="8f380135-8cd7-43f9-9334-3a83271cc30c" CreationDate="2011-02-16T14:22:05.680" UserId="5208" Text="On my tiled shooter I basically start the projectile at the origin point with a given vector, that specifies its direction/velocity. On every move I test the distance to other actors and check if it's less than the projectile radius.&#xD;&#xA;&#xD;&#xA;We also have projectiles that will spawn explosions. The explosions themselves are just like projectiles, with zero or very little reach but with larger radius." />
  <row Id="17716" PostHistoryTypeId="25" PostId="8644" RevisionGUID="32fa2cbc-491f-4540-ae03-9b4ad2451fed" CreationDate="2011-02-16T14:22:35.633" Comment="http://twitter.com/#!/StackGameDev/status/37879518626582529" />
  <row Id="17717" PostHistoryTypeId="5" PostId="8648" RevisionGUID="04770641-c9d2-4d53-9d14-50e7b28f2cfb" CreationDate="2011-02-16T14:37:25.910" UserId="744" Comment="deleted 1 characters in body" Text="I don't really have any good advice, but I have some examples. Most indie developers have a hard enough time selling _games_, let alone doing real PR.&#xD;&#xA;&#xD;&#xA;Tale of Tales &lt;a href=&quot;http://tale-of-tales.com/blog/information/&quot;&gt;pushes a pretty consistent message&lt;/a&gt; about who they are and what they do, to the point of &lt;a href=&quot;http://tale-of-tales.com/tales/RAM.html&quot;&gt;an explicit manifesto&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.wolfire.com/&quot;&gt;Wolfire&lt;/a&gt; has gotten a terrific amount of attention through publishing technical articles about their games. &quot;Behind the scenes&quot; stuff does a good job of personalizing the developers and can correct the (many) misconceptions gamers have about game development.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://news.quelsolaar.com/&quot;&gt;Eskil Steenberg&lt;/a&gt;, and &lt;a href=&quot;http://hcsoftware.sourceforge.net/jason-rohrer/&quot;&gt;Jason Rohrer&lt;/a&gt;, both of whom acquired small cults of personality, were presented consistently as outsiders who were going to stick it to the man with their new approaches to making games. Whether that's because they wanted that, or because the media loves to tell underdog stories, is anybody's guess.&#xD;&#xA;&#xD;&#xA;(CW - this is too long for a comment, but not a real answer to the question, and maybe other people can add good examples.)" />
  <row Id="17718" PostHistoryTypeId="5" PostId="8614" RevisionGUID="a348f1e9-79e0-4a0e-88b3-7941633027fe" CreationDate="2011-02-16T14:58:05.627" UserId="2778" Comment="Formatted code sample" Text="The fireball is a 'box' of width and height 200. And it's at a given position. Add a rectangle &#xD;&#xA;&#xD;&#xA;    Rectangle boundingRect = new Rectangle(position.X, position.Y, 200, 200); &#xD;&#xA;&#xD;&#xA;to your fireball class. &#xD;&#xA;&#xD;&#xA;Make sure to update the rectangle with the new position of the fireball every frame (so in the fireball's update or draw method)&#xD;&#xA;&#xD;&#xA;Do the same thing for your player class.&#xD;&#xA;&#xD;&#xA;Now you can check if the fireball has hit the player like this in your game's update method:&#xD;&#xA;&#xD;&#xA;    if(fireball.boundingRect.Intersects(player.boundingRect)) {&#xD;&#xA;        //hit&#xD;&#xA;    }" />
  <row Id="17719" PostHistoryTypeId="24" PostId="8614" RevisionGUID="c83bd6e8-2809-45cf-bc43-55dbe9cab40f" CreationDate="2011-02-16T14:58:05.627" Comment="Proposed by 2778 approved by 51 edit id of 33" />
  <row Id="17720" PostHistoryTypeId="2" PostId="8653" RevisionGUID="ebdb7843-c15e-4c0c-b6eb-e19e7ea74f80" CreationDate="2011-02-16T15:15:45.117" UserId="5331" Text="I got a tutorial in my blog about how i made bomb rush that is basically protecting the base from some enemies, it's as3 oriented but the enemies generation concept is the same.&#xD;&#xA;&#xD;&#xA;Here is a link to it [BliipStudio][1]&#xD;&#xA;&#xD;&#xA;Hope it helps you. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wwww.bliipstudio.com/as3/to-basic-shooting-base-game-flixel-2-bumb-rush-%E2%80%93-part-3/" />
  <row Id="17721" PostHistoryTypeId="5" PostId="6849" RevisionGUID="1e296e0c-1dca-491b-b6d6-aeee595647bc" CreationDate="2011-02-16T15:42:27.530" UserId="938" Comment="Formatting." Text="You will want to open your worldbuilder save file, which by default is in &#xD;&#xA;&#xD;&#xA;    YourInstallDirectory\Sid Meiers Civilization IV\PublicMaps\ &#xD;&#xA;&#xD;&#xA;Open it with notepad or a similar program. You will probably want to set it to &#xD;&#xA;&#xD;&#xA;    Era=ERA_RENAISSANCE&#xD;&#xA;    &#xD;&#xA;    For Calendar=: &quot;The Calendar setting is used to determine the length in time of &#xD;&#xA;    each turn in the scenario.  By default the calendar is set to default which &#xD;&#xA;    means the scenario will use the same turn length time as the normal game. &#xD;&#xA;    Valid options include CALENDAR_YEARS (each turn is one year), &#xD;&#xA;    CALENDAR_SEASONS (each turn is one season: Winter, Spring, &#xD;&#xA;    Summer, Autumn), CALENDAR_MONTHS (each turn is one month) &#xD;&#xA;    and CALENDAR_WEEKS (each turn is one week, with four weeks to the &#xD;&#xA;    month).&quot;&#xD;&#xA;&#xD;&#xA;[Read more about the world builder.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.civfanatics.com/showthread.php?t=132800 " />
  <row Id="17722" PostHistoryTypeId="24" PostId="6849" RevisionGUID="ee91a6f4-4e49-4fc4-a746-17ba4aec5dea" CreationDate="2011-02-16T15:42:27.530" Comment="Proposed by 938 approved by 14 edit id of 34" />
  <row Id="17723" PostHistoryTypeId="2" PostId="8654" RevisionGUID="8bc60b1b-e087-4aa7-b2e5-e820cf757ba7" CreationDate="2011-02-16T16:46:19.277" UserId="4638" Text="In a lot of places I interviewed recently, I have been asked many a times if I have worked with shaders. Even though, I have read and understand the pipeline, the answer to that question has been no. Recently, one of the places asked me if I can send them a sample of 'something' that is &quot;visually polished&quot;.&#xD;&#xA;&#xD;&#xA;So, I decided to take the plunge and wrote some simple shader in GLSL(with opengl).I now have a basic setup where I can use vbos with glsl shaders.&#xD;&#xA;&#xD;&#xA;I have a very short window left to send something to them and I was wondering if someone  with experience, could suggest an idea that is interesting enough to grab someone's attention.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="17724" PostHistoryTypeId="1" PostId="8654" RevisionGUID="8bc60b1b-e087-4aa7-b2e5-e820cf757ba7" CreationDate="2011-02-16T16:46:19.277" UserId="4638" Text="glsl demo suggestions ?" />
  <row Id="17725" PostHistoryTypeId="3" PostId="8654" RevisionGUID="8bc60b1b-e087-4aa7-b2e5-e820cf757ba7" CreationDate="2011-02-16T16:46:19.277" UserId="4638" Text="&lt;opengl&gt;&lt;rendering&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="17726" PostHistoryTypeId="2" PostId="8655" RevisionGUID="497a069c-ece0-458c-b0be-2157df7f9c24" CreationDate="2011-02-16T16:58:26.817" UserId="5494" Text="What's the recommended bitrate for BGM in iPhone Games?" />
  <row Id="17727" PostHistoryTypeId="1" PostId="8655" RevisionGUID="497a069c-ece0-458c-b0be-2157df7f9c24" CreationDate="2011-02-16T16:58:26.817" UserId="5494" Text="What's the recommended bitrate for BGM in iPhone Games?" />
  <row Id="17728" PostHistoryTypeId="3" PostId="8655" RevisionGUID="497a069c-ece0-458c-b0be-2157df7f9c24" CreationDate="2011-02-16T16:58:26.817" UserId="5494" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;music&gt;&lt;ios&gt;" />
  <row Id="17729" PostHistoryTypeId="2" PostId="8656" RevisionGUID="27b18bbd-7f86-4e1a-81ca-229b40f22b54" CreationDate="2011-02-16T17:02:43.023" UserId="2469" Text="How about [metaballs][1] ? They make for a pretty interesting demo and there is a lot you can do with shading like point lights, reflection, refraction and so on.&#xD;&#xA;There is also the classic terrain + water demo, in which you can have texturing, shades, displacement mapping (for the water), reflection...&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=UFulkoGg9C0&amp;NR=1" />
  <row Id="17730" PostHistoryTypeId="2" PostId="8657" RevisionGUID="322b086e-4875-4d8a-8fa2-734f38bd7d59" CreationDate="2011-02-16T17:02:56.323" UserId="3794" Text="Everybody saw phong implemented. So how about:&#xD;&#xA;&#xD;&#xA; - **water** - there are tons of tutorials and it looks always great&#xD;&#xA; - **shadow mapping** - absolute basic in game dev. Multipass rendering is good thing to show. You can improve it with some kind of soft shadows (i highly recommend [PCSS][1] - easy effective or [Variance Shadow Maps][2]) &#xD;&#xA; - **bumpmapping** &#xD;&#xA; - **parallax mapping** - looks cool, and pretty easy if you got bump mapping done.&#xD;&#xA; - **geometry shaders** (if you do hairs/fur over the polygon - could be based on lines or billboards - they will love you :))&#xD;&#xA; - **mirrors**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/shaderlibrary/docs/shadow_PCSS.pdf&#xD;&#xA;  [2]: http://www.punkuser.net/vsm/" />
  <row Id="17731" PostHistoryTypeId="5" PostId="8657" RevisionGUID="fed01449-925e-485b-9d24-7c31bab9d100" CreationDate="2011-02-16T17:10:15.410" UserId="3794" Comment="more links" Text="Everybody saw phong implemented. So how about:&#xD;&#xA;&#xD;&#xA; - **water** - there are tons of tutorials and it looks always great&#xD;&#xA; - **shadow mapping** - absolute basic in game dev. Multipass rendering is good thing to show. You can improve it with some kind of soft shadows (i highly recommend [PCSS][1] - easy effective or [Variance Shadow Maps][2]) &#xD;&#xA; - **bumpmapping** &#xD;&#xA; - **parallax mapping** - looks cool, and pretty easy if you got bump mapping done.&#xD;&#xA; - **geometry shaders** (if you do hairs/fur over the polygon - could be based on lines or billboards - they will love you :)) - [whitepaper from nvidia][3]&#xD;&#xA; - **mirrors**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/shaderlibrary/docs/shadow_PCSS.pdf&#xD;&#xA;  [2]: http://www.punkuser.net/vsm/&#xD;&#xA;  [3]: http://developer.download.nvidia.com/SDK/10/direct3d/Source/Fur/doc/FurShellsAndFins.pdf" />
  <row Id="17732" PostHistoryTypeId="2" PostId="8658" RevisionGUID="124a8526-363a-4f43-8e65-0d10c2e39b77" CreationDate="2011-02-16T17:13:50.253" UserId="2229" Text="OpenGL VBOs (vertex buffer objects) have been developed to improve performance of OpenGL (*OpenGL ES 2.0* in my case). The logic is that with the help of VBOs, the data does not need to be copied from client memory to graphics card on per frame basis.&#xD;&#xA;&#xD;&#xA;However, as I see it, the game scene changes continuously: position of objects change, their scaling and rotating change, they get animated, they explode, they get spawn or disappear.&#xD;&#xA;&#xD;&#xA;**In such highly dynamic environment, such as computer game scene is, what is the point of using VBOs**, if the VBOs would need to be constructed on per-frame basis anyway?&#xD;&#xA;&#xD;&#xA;Can you please help me to understand how to practically take beneif of VBOs in computer games? Can there be more vertex based VBOs (say one per one object) or there must be always exactly only one VBO present for each draw cycle?" />
  <row Id="17733" PostHistoryTypeId="1" PostId="8658" RevisionGUID="124a8526-363a-4f43-8e65-0d10c2e39b77" CreationDate="2011-02-16T17:13:50.253" UserId="2229" Text="OpenGL ES 2.0: Using VBOs?" />
  <row Id="17734" PostHistoryTypeId="3" PostId="8658" RevisionGUID="124a8526-363a-4f43-8e65-0d10c2e39b77" CreationDate="2011-02-16T17:13:50.253" UserId="2229" Text="&lt;game-design&gt;&lt;opengl&gt;&lt;opengl-es&gt;&lt;graphics-programming&gt;" />
  <row Id="17735" PostHistoryTypeId="25" PostId="8654" RevisionGUID="4c9330d4-9ed1-46b5-b32e-036a4a9b06a4" CreationDate="2011-02-16T17:22:39.200" Comment="http://twitter.com/#!/StackGameDev/status/37924832486096896" />
  <row Id="17736" PostHistoryTypeId="2" PostId="8659" RevisionGUID="bd0f3149-0a91-4571-b8a2-458fa130d76d" CreationDate="2011-02-16T17:28:35.293" UserId="4947" Text="You can have as many VBOs as you want. You can also have each animation frame in one VBO or whole animation in one VBO. You can also use Per vertex animation, which is done with the same data, but transformed in vertex shader (program).&#xD;&#xA;&#xD;&#xA;If you change position, rotation or scale of object, it won't change VBO, it will only change transformation matrix. &#xD;&#xA;&#xD;&#xA;So if you have enough memory, you can just transfer all your data to graphics memory in initialization phase. " />
  <row Id="17737" PostHistoryTypeId="2" PostId="8660" RevisionGUID="891354e3-1ccd-4d58-bbfa-132f53d99281" CreationDate="2011-02-16T17:33:10.767" UserId="1430" Text="&gt; In such highly dynamic environment,&#xD;&#xA;&gt; such as computer game scene is, what&#xD;&#xA;&gt; is the point of using VBOs, if the&#xD;&#xA;&gt; VBOs would need to be constructed on&#xD;&#xA;&gt; per-frame basis anyway?&#xD;&#xA;&#xD;&#xA;If you are reconstructing the vertex data for every object every frame, you're doing it wrong. Or at least, you're probably doing it inefficiently. &#xD;&#xA;&#xD;&#xA;Moving objects in a scene can and should usually be done by changing the world transformation matrix used to render that object, *not* changing the vertex data directly. Skeletal animation has entirely on-GPU solutions, as well. Decomposable objects can be rendered with distinct transformation matrices, such that they appear together until they need to be decomposed, and then the matrices are adjusted to make them split apart as desired. Objects that are not visible or not spawned need not be rendered, even if their vertex data is on the card from a prior frame -- they don't need their buffers destroyed/recreated every time their visibility toggles.&#xD;&#xA;&#xD;&#xA;&gt; Can you please help me to understand&#xD;&#xA;&gt; how to practically take beneif of VBOs&#xD;&#xA;&gt; in computer games? Can there be more&#xD;&#xA;&gt; vertex based VBOs (say one per one&#xD;&#xA;&gt; object) or there must be always&#xD;&#xA;&gt; exactly only one VBO present for each&#xD;&#xA;&gt; draw cycle?&#xD;&#xA;&#xD;&#xA;You can have multiple vertex buffers. In generally you have one per each mesh/model, and you refer to that single mesh/model data structure with a collection of possibly-many renderable objects which contain their own unique world transformation matrix. This way if you have 50 enemies who all use the same mesh, you only need that mesh in-memory once. Then you have 50 smaller, lightweight instance structures that refer to that mesh and hold a unique world transform used when rendering each instance.&#xD;&#xA;" />
  <row Id="17738" PostHistoryTypeId="2" PostId="8661" RevisionGUID="4b26e66a-bead-4941-83d9-10c872091236" CreationDate="2011-02-16T17:43:48.310" UserId="4307" Text="I'm designing a networked turn based 3D-6DOF space fleet combat strategy game which relies heavily on ship customization. Let me explain the game a bit, since you need to know a bit about it to set the question.&#xD;&#xA;&#xD;&#xA;What I aim for is the ability to **create your own** fleet of ships with **custom** shapes and attached modules (propellers, tractor beams...) which would give advantages and disadvantages to each ship, so you have lots of different fleet distributions. E.g., long ship with two propellers at the side would let the ship spin around that plane easily, bigger sheeps would move slowly unless you place lots of propellers at the back (therefore spending more &quot;construction&quot; points, and energy when moving) and it will only move fast towards that direction. I plan to balance all the game around this feature.&#xD;&#xA;&#xD;&#xA;The game would revolve around two phases: orders and combat phase. During the orders phase, you command the different ships. When all players finish the order phase, the combat phase begins and the ships orders get resolved in real-time for some time, then the action pauses and there's a new orders phase.&#xD;&#xA;&#xD;&#xA;The problem comes when I think about player input. To move a ship, you need to turn on or off different propellers if you want to steer, travel forward, brake, rotate in place... These propellers don't have to work at their whole power, so you can achieve more movement combinations with less propellers.&#xD;&#xA;&#xD;&#xA;I think this approach is a bit boring. The player doesn't want to fiddle with motors or anything, you just want to MOVE and KILL. The way I intend the player to give orders to these ships is by a **destination** and a **rotation**, and then the AI would calculate the correct propeller power to achive that movement and rotation. Propulsion doesn't have to be the same throught the entire turn calculation (after the orders have been given) so it would be cool if the ships reacted as they move, adjusting the power of the propellers for their needs dynamically, but it may be too hard to implement and it's not really needed for the game to work.&#xD;&#xA;&#xD;&#xA;In both cases, **how would that AI decide which propellers to activate for the best (or at least not worst) trajectory to be achieved?**&#xD;&#xA;&#xD;&#xA;I though about some approaches:&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Learning AI:&lt;/b&gt; The ship types would learn about their movement by trial and error, adjusting their behaviour with more uses, and finally becoming &quot;smart&quot;. I don't want to get involved THAT far in AI coding, and I think it can be frustrating for the player (even if you can let it learn without playing.)&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Pre-calculated timestep movement:&lt;/b&gt; Upon ship creation, ALL possible movements are calculated for each propeller configuration and power for a given delta-time. Memory intensive, ugly, bad.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Pre-calculated trajectories:&lt;/b&gt; The same as above but not for each delta-time but the whole trajectory, which would then be fitted as much as possible. Requires a fixed propeller configuration for the whole combat phase and is still memory intensive, ugly and bad.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Continuous brute forcing:&lt;/b&gt; The AI continously checks ALL possible propeller configurations throughout the entire combat phase, precalculates a few time steps and decides which is the best one based on that. Con: what's good now might not be that good later, and it's too CPU intensive, ugly, and bad too.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Single brute forcing:&lt;/b&gt; Same as above, but only brute forcing at the beginning of the simulation, so it needs constant propeller configuration throughout the entire combat phase.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Coninuous angle check:&lt;/b&gt; This is not a full movement method, but maybe a way to discard &quot;stupid&quot; propeller configurations. Given the current propeller's normal vector and the final one, you can approximate the power needed for the propeller based on the angle. You must do this continuously throughout the whole combat phase. I figured this one out recently so I didn't put in too much thought. A priori, it has the &quot;what's good now might not be that good later&quot; drawback too, and it doesn't care about the other propellers which may act together to make a better propelling configuration.&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;I'm really stuck here. Any ideas?" />
  <row Id="17739" PostHistoryTypeId="1" PostId="8661" RevisionGUID="4b26e66a-bead-4941-83d9-10c872091236" CreationDate="2011-02-16T17:43:48.310" UserId="4307" Text="AI to move custom-shaped spaceships (shape affecting movement behaviour)" />
  <row Id="17740" PostHistoryTypeId="3" PostId="8661" RevisionGUID="4b26e66a-bead-4941-83d9-10c872091236" CreationDate="2011-02-16T17:43:48.310" UserId="4307" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;movement&gt;&lt;turn-based-strategy&gt;" />
  <row Id="17741" PostHistoryTypeId="5" PostId="8657" RevisionGUID="8e48dab7-a814-41f0-a932-86a02a0e3d59" CreationDate="2011-02-16T17:45:05.663" UserId="3794" Comment="added some idea" Text="Everybody saw phong implemented. So how about:&#xD;&#xA;&#xD;&#xA; - **water** - there are tons of tutorials and it looks always great&#xD;&#xA; - **shadow mapping** - absolute basic in game dev. Multipass rendering is good thing to show. You can improve it with some kind of soft shadows (i highly recommend [PCSS][1] - easy effective or [Variance Shadow Maps][2]) &#xD;&#xA; - **bumpmapping** &#xD;&#xA; - **parallax mapping** - looks cool, and pretty easy if you got bump mapping done.&#xD;&#xA; - **geometry shaders** (if you do hairs/fur over the polygon - could be based on lines or billboards - they will love you :)) - [whitepaper from nvidia][3]&#xD;&#xA; - **mirrors**&#xD;&#xA; - **post process** - cartoon shader, old camera shader&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/shaderlibrary/docs/shadow_PCSS.pdf&#xD;&#xA;  [2]: http://www.punkuser.net/vsm/&#xD;&#xA;  [3]: http://developer.download.nvidia.com/SDK/10/direct3d/Source/Fur/doc/FurShellsAndFins.pdf" />
  <row Id="17742" PostHistoryTypeId="2" PostId="8662" RevisionGUID="0b74e151-865c-4442-bf38-dde0c86f2700" CreationDate="2011-02-16T17:52:30.613" UserId="2332" Text="In all honesty, it's probably down to what sounds best at the lowest bitrate.&#xD;&#xA;&#xD;&#xA;So if you had music at 192kbps but you could still get it sounding decent without a whole lot of quality loss at, say, 64kbps, then you've got no reason not to use the 64kbps version.&#xD;&#xA;&#xD;&#xA;It might be worth having a bunch of different bitrates of the same song and see which &quot;sounds&quot; the best, whilst reducing the bitrate. If you've got some 8-bit retro sounds in the music you could get away with fairly low bitrates, but probably less so with a piece of music with a wide variety of sounds and textures (e.g. a classical composition, with full percussion, and synths and basses on top)." />
  <row Id="17743" PostHistoryTypeId="5" PostId="8661" RevisionGUID="c5d8e3a7-e041-40d2-b36c-9152b515f412" CreationDate="2011-02-16T17:56:13.777" UserId="4307" Comment="Corrected spelling; deleted 1 characters in body" Text="I'm designing a networked turn based 3D-6DOF space fleet combat strategy game which relies heavily on ship customization. Let me explain the game a bit, since you need to know a bit about it to set the question.&#xD;&#xA;&#xD;&#xA;What I aim for is the ability to **create your own** fleet of ships with **custom** shapes and attached modules (propellers, tractor beams...) which would give advantages and disadvantages to each ship, so you have lots of different fleet distributions. E.g., long ship with two propellers at the side would let the ship spin around that plane easily, bigger ships would move slowly unless you place lots of propellers at the back (therefore spending more &quot;construction&quot; points and energy when moving, and it will only move fast towards that direction.) I plan to balance all the game around this feature.&#xD;&#xA;&#xD;&#xA;The game would revolve around two phases: orders and combat phase. During the orders phase, you command the different ships. When all players finish the order phase, the combat phase begins and the ship orders get resolved in real-time for some time, then the action pauses and there's a new orders phase.&#xD;&#xA;&#xD;&#xA;The problem comes when I think about player input. To move a ship, you need to turn on or off different propellers if you want to steer, travel forward, brake, rotate in place... These propellers don't have to work at their whole power, so you can achieve more movement combinations with less propellers.&#xD;&#xA;&#xD;&#xA;I think this approach is a bit boring. The player doesn't want to fiddle with motors or anything, you just want to MOVE and KILL. The way I intend the player to give orders to these ships is by a **destination** and a **rotation**, and then the AI would calculate the correct propeller power to achive that movement and rotation. Propulsion doesn't have to be the same throught the entire turn calculation (after the orders have been given) so it would be cool if the ships reacted as they move, adjusting the power of the propellers for their needs dynamically, but it may be too hard to implement and it's not really needed for the game to work.&#xD;&#xA;&#xD;&#xA;In both cases, **how would that AI decide which propellers to activate for the best (or at least not worst) trajectory to be achieved?**&#xD;&#xA;&#xD;&#xA;I though about some approaches:&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Learning AI:&lt;/b&gt; The ship types would learn about their movement by trial and error, adjusting their behaviour with more uses, and finally becoming &quot;smart&quot;. I don't want to get involved THAT far in AI coding, and I think it can be frustrating for the player (even if you can let it learn without playing.)&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Pre-calculated timestep movement:&lt;/b&gt; Upon ship creation, ALL possible movements are calculated for each propeller configuration and power for a given delta-time. Memory intensive, ugly, bad.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Pre-calculated trajectories:&lt;/b&gt; The same as above but not for each delta-time but the whole trajectory, which would then be fitted as much as possible. Requires a fixed propeller configuration for the whole combat phase and is still memory intensive, ugly and bad.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Continuous brute forcing:&lt;/b&gt; The AI continously checks ALL possible propeller configurations throughout the entire combat phase, precalculates a few time steps and decides which is the best one based on that. Con: what's good now might not be that good later, and it's too CPU intensive, ugly, and bad too.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Single brute forcing:&lt;/b&gt; Same as above, but only brute forcing at the beginning of the simulation, so it needs constant propeller configuration throughout the entire combat phase.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&lt;b&gt;Coninuous angle check:&lt;/b&gt; This is not a full movement method, but maybe a way to discard &quot;stupid&quot; propeller configurations. Given the current propeller's normal vector and the final one, you can approximate the power needed for the propeller based on the angle. You must do this continuously throughout the whole combat phase. I figured this one out recently so I didn't put in too much thought. A priori, it has the &quot;what's good now might not be that good later&quot; drawback too, and it doesn't care about the other propellers which may act together to make a better propelling configuration.&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;I'm really stuck here. Any ideas?" />
  <row Id="17744" PostHistoryTypeId="2" PostId="8663" RevisionGUID="f1ff8622-580c-42be-98a8-bd5c210bdcf1" CreationDate="2011-02-16T18:32:34.243" UserId="3659" Text="How do they keep track of the NPC zombies in Left 4 Dead?&#xD;&#xA;&#xD;&#xA;I am talking about the NPCs that just walk into walls or wander around aimlessly. Even though the players cannot see them, they are there (say inside rooms or behind doors). Let's say there's about 10 or so zombies in a hallway and inside rooms. Does the game keep all of those zombies in a list and iterate through giving them commands? Do they just spawn when the user is within a certain radius or reached a special location?&#xD;&#xA;&#xD;&#xA;Say you placed the 4 units (controlled by players) on completely different places throughout the map. Let's assume you aren't being swarmed and then you have not killed any of these aimless NPCs. Would the game be keeping track of 10 x 4 = 40 zombies in total?&#xD;&#xA;&#xD;&#xA;Or is my understanding completely off?&#xD;&#xA;&#xD;&#xA;The reason I ask is if I were to implement something similar on a mobile device, keeping track of 40 or more NPCs might not be such a great idea." />
  <row Id="17745" PostHistoryTypeId="1" PostId="8663" RevisionGUID="f1ff8622-580c-42be-98a8-bd5c210bdcf1" CreationDate="2011-02-16T18:32:34.243" UserId="3659" Text="How do they keep track of the NPCs in Left 4 Dead?" />
  <row Id="17746" PostHistoryTypeId="3" PostId="8663" RevisionGUID="f1ff8622-580c-42be-98a8-bd5c210bdcf1" CreationDate="2011-02-16T18:32:34.243" UserId="3659" Text="&lt;game-design&gt;&lt;ai&gt;" />
  <row Id="17747" PostHistoryTypeId="2" PostId="8664" RevisionGUID="16170e8e-a6ac-482f-a281-aa744ed7001a" CreationDate="2011-02-16T18:32:47.100" UserId="89" Text="What a title, eh?&#xD;&#xA;&#xD;&#xA;I'm currently designing a videogame; a turn-based RPG like Final Fantasy (because everybody knows Final Fantasy). It's a 2D sprite game.&#xD;&#xA;&#xD;&#xA;These are my ideas for combat:&#xD;&#xA;&#xD;&#xA;-The player has a group of 15 members (main character included)&#xD;&#xA;&#xD;&#xA;-During battle, five of the group are designated as active, and appear in the battle.&#xD;&#xA;&#xD;&#xA;-These five may be switched out at leisure, or when one of the five die.&#xD;&#xA;&#xD;&#xA;-At any time, the Waiting members can cast buffs, be healed by the active members, or perform special attacks.&#xD;&#xA;&#xD;&#xA;-Battles should contain 10+ monsters at least. I'm aiming for 20, but I'm not sure if that's possible yet. &#xD;&#xA;&#xD;&#xA;-Battles should feel larger than normal due to the interaction of Waiting members, active members and the increased amount of monsters per battle.&#xD;&#xA;&#xD;&#xA;-The player has two rows in which to put the Active members:  front and back.&#xD;&#xA;&#xD;&#xA;-Depending on the implementation, I might allow comboing of player attacks and skills.&#xD;&#xA;&#xD;&#xA;These are just design ideas, so beware! I have not been able to test this out yet- I have no idea yet if any of these ideas bunched together will make for a compelling game. What sounds good on paper doesn't necessarily have to be good in practice!&#xD;&#xA;&#xD;&#xA;What I'm asking now is how to create the layout for this. My starting point are the battles in Final Fantasy VI, with up to 5-6 monsters on the left and the characters on the right- monsters on both sides if it's a pincer attack.&#xD;&#xA;&#xD;&#xA;However, this view would not work feasible with my goal of 20 monsters and 5 characters. All the monsters on the left would appear cluttered unless I scale them far far back. If I create a pincer-like map, then there would be no real pincer-attack possible. If I space the monsters out I force the player to scroll the screen- a game mechanic I've come across and not enjoyed imho.&#xD;&#xA;&#xD;&#xA;My question is:  does anybody have any layouts or guides for designing battle maps in turn-based RPGs, especially with a larger number of enemies taken into consideration? How should it look? I am not asking for specific combat mechanics, just the layout for the moment. " />
  <row Id="17748" PostHistoryTypeId="1" PostId="8664" RevisionGUID="16170e8e-a6ac-482f-a281-aa744ed7001a" CreationDate="2011-02-16T18:32:47.100" UserId="89" Text="Turn-Based RPG Battle Instance Layout For Larger Groups" />
  <row Id="17749" PostHistoryTypeId="3" PostId="8664" RevisionGUID="16170e8e-a6ac-482f-a281-aa744ed7001a" CreationDate="2011-02-16T18:32:47.100" UserId="89" Text="&lt;rpg&gt;&lt;turn-based&gt;&lt;design&gt;" />
  <row Id="17750" PostHistoryTypeId="2" PostId="8665" RevisionGUID="8597c1e8-c5c1-485f-b289-165b5b786302" CreationDate="2011-02-16T18:40:31.023" UserId="5119" Text="Once have a look at the below link (please check the afterRender method)&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/cocos2d-iphone/issues/detail?id=631&amp;q=glClear%28GL_COLOR_BUFFER_BIT&amp;colspec=ID%20Type%20Status%20Priority%20Milestone%20Component%20Owner%20Summary&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here the fix was to clear the RenderTextures's Alpha channel with 1.0 so that it will not have artifact when you draw other nodes on RenderTexture.That clearing should be done once you are done drawing on the renderTexture. Please let me know if you need further clarification." />
  <row Id="17751" PostHistoryTypeId="5" PostId="8524" RevisionGUID="5a301c5d-15c6-44eb-9096-2a849cf78e60" CreationDate="2011-02-16T18:41:47.357" UserId="5119" Comment="added 550 characters in body" Text="I don't know whether you mean this or not ..but i have this problem when i'm using render Texture in cocos2d.When the player sprite is moved,the sprites residue used to be ther for 3-5 frames.Clearing the alpha of the render texture fbo fixed the problem.Please mention the problem clearly if you have still problems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Updated]&#xD;&#xA;&#xD;&#xA;Once have a look at the below link (please check the afterRender method)&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/cocos2d-iphone/issues/detail?id=631&amp;q=glClear%28GL_COLOR_BUFFER_BIT&amp;colspec=ID%20Type%20Status%20Priority%20Milestone%20Component%20Owner%20Summary&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here the fix was to clear the RenderTextures's Alpha channel with 1.0 so that it will not have artifact when you draw other nodes on RenderTexture.That clearing should be done once you are done drawing on the renderTexture. Please let me know if you need further clarification." />
  <row Id="17752" PostHistoryTypeId="5" PostId="8655" RevisionGUID="ab4122ca-1ecf-4c87-b5c6-2e5572dc70d3" CreationDate="2011-02-16T18:43:48.287" UserId="962" Comment="Cleared up an acronym" Text="What is the recommended bitrate for Background Music in iPhone Games?" />
  <row Id="17753" PostHistoryTypeId="4" PostId="8655" RevisionGUID="ab4122ca-1ecf-4c87-b5c6-2e5572dc70d3" CreationDate="2011-02-16T18:43:48.287" UserId="962" Comment="Cleared up an acronym" Text="What's the recommended bitrate for Background Music in iPhone Games?" />
  <row Id="17754" PostHistoryTypeId="5" PostId="8665" RevisionGUID="3b9de98e-2eb0-45e9-b029-6d978228b491" CreationDate="2011-02-16T18:57:12.210" UserId="5119" Comment="added 274 characters in body" Text="Once have a look at the below link (please check the afterRender method)&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/cocos2d-iphone/issues/detail?id=631&amp;q=glClear%28GL_COLOR_BUFFER_BIT&amp;colspec=ID%20Type%20Status%20Priority%20Milestone%20Component%20Owner%20Summary&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here the fix was to clear the RenderTextures's Alpha channel with 1.0 so that it will not have artifact when you draw other nodes on RenderTexture.That clearing should be done once you are done drawing on the renderTexture. Please let me know if you need further clarification.&#xD;&#xA;&#xD;&#xA;Btw, for glClear call....&#xD;&#xA;              If you are drawing a full screen background, there is no need of calling glClear.The game i worked on recently  had a bit of performance gain when i removed  glClear call.The link you posted seems interesting.Thanks for the link." />
  <row Id="17755" PostHistoryTypeId="2" PostId="8666" RevisionGUID="600d1beb-c86a-4320-b4ca-75ef304eb49a" CreationDate="2011-02-16T19:11:09.703" UserId="1198" Text="I can't speak to how the Left 4 Dead implementation works, but I can say how I'd probably do it.&#xD;&#xA;&#xD;&#xA;I'd go for something like your second option, track each player and only load NPCs when players move past trigger points. The key in a system like this, is to make the trigger points far enough away from the player that they are unable to associate that `walking past this fence post` triggers `that car to blow up, and shoot a zombie at them.`&#xD;&#xA;&#xD;&#xA;I would probably have an active NPC collection, which the trigger points either add or remove NPCs from the collection. This allows you to spend CPU/GPU resources on NPCs that players are actually interacting with, but it gives you the flexibility to load NPCs at any time. &#xD;&#xA;&#xD;&#xA;Think about a boss who can hear sounds, maybe the boss is loaded at the start of the map and if the player going through the map makes lots of noise (grenades, pipe bombs, etc), the boss will seek out the player and attack out of the blue, instead of waiting till the player reaches the boss arena." />
  <row Id="17756" PostHistoryTypeId="2" PostId="8667" RevisionGUID="3a62eea8-336b-4cfc-a6b6-4c628d24a260" CreationDate="2011-02-16T20:11:45.590" UserId="2787" Text="I am looking into how to design an instance system for the game I am working on.&#xD;&#xA;I have always wondered how these are created in games like World of Warcraft, where instances == dungeons/raids/etc). Areas that are separated from players other than those in your group, but have specific logic to them.&#xD;&#xA;Specifically how can you reuse your existing code base and not have a bunch of checks everywhere ?&#xD;&#xA;&#xD;&#xA;`if (isInstance) do x; else do y;`&#xD;&#xA;" />
  <row Id="17757" PostHistoryTypeId="1" PostId="8667" RevisionGUID="3a62eea8-336b-4cfc-a6b6-4c628d24a260" CreationDate="2011-02-16T20:11:45.590" UserId="2787" Text="Building an instance system." />
  <row Id="17758" PostHistoryTypeId="3" PostId="8667" RevisionGUID="3a62eea8-336b-4cfc-a6b6-4c628d24a260" CreationDate="2011-02-16T20:11:45.590" UserId="2787" Text="&lt;mmo&gt;&lt;game-mechanics&gt;" />
  <row Id="17759" PostHistoryTypeId="2" PostId="8668" RevisionGUID="8f429f70-3b57-410b-b3d6-9d38d52342c4" CreationDate="2011-02-16T20:15:04.447" UserId="5259" Text="You are interested in the paper found here:&#xD;&#xA;&#xD;&#xA;[AI Systems of Left 4 Dead][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf" />
  <row Id="17760" PostHistoryTypeId="25" PostId="8667" RevisionGUID="b3a138ee-a84b-41f0-9410-8756f9a55954" CreationDate="2011-02-16T20:22:40.197" Comment="http://twitter.com/#!/StackGameDev/status/37970134530265088" />
  <row Id="17761" PostHistoryTypeId="2" PostId="8669" RevisionGUID="1ef36024-dae0-4cdc-8e40-65d6993caf61" CreationDate="2011-02-16T20:25:04.677" UserId="4307" Text="You wouldn't need a bunch of checks everywhere if you had lots of rooms, right? You just load the room, and do thing that belong to that room, while you're in the room. Leave the room, and these checks are never made again.&#xD;&#xA;&#xD;&#xA;Instance logic is decoupled from game logic. Usually they're just the same, but the regular game just &quot;plays&quot; and the instances are scripted (or whatever.) Specially in WoW, where LUA dominates." />
  <row Id="17762" PostHistoryTypeId="2" PostId="8670" RevisionGUID="72e5790a-090f-427f-8f4e-be4396382571" CreationDate="2011-02-16T20:43:05.980" UserId="5259" Text="Have you considered card games? Specifically something like straight poker (complete hands, no draws, no community cards). The mechanics are really simple, and all of the strategy is purely estimations of your opponents' state." />
  <row Id="17763" PostHistoryTypeId="5" PostId="8662" RevisionGUID="319bd65e-7953-4066-9737-317f3a45ff12" CreationDate="2011-02-16T20:47:12.617" UserId="2332" Comment="added 259 characters in body" Text="In all honesty, it's probably down to what sounds best at the lowest bitrate.&#xD;&#xA;&#xD;&#xA;So if you had music at 192kbps but you could still get it sounding decent without a whole lot of quality loss at, say, 64kbps, then you've got no reason not to use the 64kbps version.&#xD;&#xA;&#xD;&#xA;It might be worth having a bunch of different bitrates of the same song and see which &quot;sounds&quot; the best, whilst reducing the bitrate. If you've got some 8-bit retro sounds in the music you could get away with fairly low bitrates, but probably less so with a piece of music with a wide variety of sounds and textures (e.g. a classical composition, with full percussion, and synths and basses on top).&#xD;&#xA;&#xD;&#xA;EDIT: Just as an extra, if you're not certain about what sounds correct at a low bitrate, I'd suggest talking to an audio producer or if that's not possible then just ask the guys at http://audio.stackexchange.com those guys definitely know their audio :)" />
  <row Id="17764" PostHistoryTypeId="5" PostId="8571" RevisionGUID="eff46ddd-cced-4404-9f7a-f10a13349a0b" CreationDate="2011-02-16T20:51:37.813" UserId="5119" Comment="added glColorMask - as the question is to clear alpha " Text="Try&#xD;&#xA;    glColorMask(FALSE, FALSE, FALSE, TRUE);//This ensures that only alpha will be effected&#xD;&#xA;    glClearColor(0, 0, 0, alphaValue);//alphaValue - Value to which you need to clear&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;to clear both the color buffer (with transparent black) and the depth buffer, in case you are using depth testing.&#xD;&#xA;&#xD;&#xA;glClear must be called unless you are really sure you are redrawing all the pixels every frame, so parts of previous frames don't show over your new render." />
  <row Id="17765" PostHistoryTypeId="24" PostId="8571" RevisionGUID="dc095579-ed50-4124-bf35-b89a784aadaf" CreationDate="2011-02-16T20:51:37.813" Comment="Proposed by 5119 approved by 51 edit id of 35" />
  <row Id="17766" PostHistoryTypeId="5" PostId="8571" RevisionGUID="d4e27af4-a52b-4279-9a12-73218c5afd43" CreationDate="2011-02-16T20:52:02.087" UserId="51" Comment="added 4 characters in body" Text="Try&#xD;&#xA;&#xD;&#xA;    glColorMask(FALSE, FALSE, FALSE, TRUE);//This ensures that only alpha will be effected&#xD;&#xA;    glClearColor(0, 0, 0, alphaValue);//alphaValue - Value to which you need to clear&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;to clear both the color buffer (with transparent black) and the depth buffer, in case you are using depth testing.&#xD;&#xA;&#xD;&#xA;glClear must be called unless you are really sure you are redrawing all the pixels every frame, so parts of previous frames don't show over your new render.&#xD;&#xA;" />
  <row Id="17767" PostHistoryTypeId="2" PostId="8671" RevisionGUID="b39cf48a-e315-43cb-9b8e-d246bb058aaa" CreationDate="2011-02-16T22:09:46.347" UserId="4496" Text="Perhaps consider Mao.  Be warned that looking it up will ruin it for yourself, but in theory you could keep track of strict actions to try to draw psychological conclusions." />
  <row Id="17768" PostHistoryTypeId="5" PostId="8667" RevisionGUID="0d039980-fe73-4c61-af4a-522197e63e80" CreationDate="2011-02-16T22:41:55.427" UserId="2787" Comment="added information about object system." Text="I am looking into how to design an instance system for the game I am working on.&#xD;&#xA;I have always wondered how these are created in games like World of Warcraft, where instances == dungeons/raids/etc). Areas that are separated from players other than those in your group, but have specific logic to them.&#xD;&#xA;Specifically how can you reuse your existing code base and not have a bunch of checks everywhere ?&#xD;&#xA;&#xD;&#xA;`if (isInstance) do x; else do y;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I don't know if this will make too much of a difference on any answers, but we're using a pretty classic &quot;Object as pure aggregation&quot; component system for our entities." />
  <row Id="17770" PostHistoryTypeId="25" PostId="8663" RevisionGUID="db575e55-fc58-477a-b1ec-b18fd0ad12c8" CreationDate="2011-02-16T23:22:40.557" Comment="http://twitter.com/#!/StackGameDev/status/38015434544525312" />
  <row Id="17771" PostHistoryTypeId="2" PostId="8672" RevisionGUID="e7ff0e6a-c636-4bbc-8913-f72becf0398a" CreationDate="2011-02-17T00:18:45.120" UserId="4191" Text="My first thought is to switch the view from FF-standard side-on to looking from behind and above the player characters.  That way, you can render arbitrary numbers of monsters, with more distant ones scaled down, and instead of falling off the left side of the screen, the ones farther away are just partially or completely obscured by the nearer ones.  This should give a good sense of the size of the group facing the players and of its thinning out as the battle progresses.&#xD;&#xA;&#xD;&#xA;The downside is that it's a bit harder to have your PCs standing there looking epic if you're staring at their backs, but I think it would work to show them as facing somewhat sideways." />
  <row Id="17772" PostHistoryTypeId="2" PostId="8673" RevisionGUID="8873fbe6-30bc-490d-b12a-8365a769b74d" CreationDate="2011-02-17T00:21:16.100" UserId="4638" Text="I am trying to render mandelbrot set using glsl. I'm not sure why its not rendering the correct shape. Does the mandelbrot calculation require values to be within a  range for the (x,y) [ or (real, imag) ] ? &#xD;&#xA;Here is a screenshot: &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;I render a quad as follows:&#xD;&#xA;&#xD;&#xA;    float w2 = 6;&#xD;&#xA;    float h2 = 5;&#xD;&#xA;    glBegin(GL_QUADS);&#xD;&#xA;&#xD;&#xA;    glVertex3f(-w2, h2, 0.0);&#xD;&#xA;    glVertex3f(-w2, -h2, 0.0);&#xD;&#xA;&#xD;&#xA;    glVertex3f(w2, -h2, 0.0);&#xD;&#xA;    glVertex3f(w2, h2, 0.0);&#xD;&#xA;&#xD;&#xA;    glEnd();&#xD;&#xA;&#xD;&#xA;My vertex shader:&#xD;&#xA;&#xD;&#xA;    varying vec3 Position;&#xD;&#xA;&#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;        Position = gl_Vertex.xyz;&#xD;&#xA;	&#xD;&#xA;        gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My fragment shader (where all the meat is):&#xD;&#xA;&#xD;&#xA;    uniform float MAXITERATIONS;&#xD;&#xA;&#xD;&#xA;    varying vec3 Position;&#xD;&#xA;&#xD;&#xA;    void main (void)  &#xD;&#xA;    {     &#xD;&#xA;       float zoom = 1.0;&#xD;&#xA;       float centerX = 0.0;&#xD;&#xA;       float centerY = 0.0;&#xD;&#xA;&#xD;&#xA;       float real = Position.x * zoom + centerX;&#xD;&#xA;       float imag = Position.y * zoom + centerY;&#xD;&#xA;&#xD;&#xA;       float r2 = 0.0;&#xD;&#xA;       float iter;&#xD;&#xA;&#xD;&#xA;       for(iter = 0.0; iter &lt; MAXITERATIONS &amp;&amp; r2 &lt; 4.0; ++iter)&#xD;&#xA;       {&#xD;&#xA;        float tempreal = real;&#xD;&#xA;	&#xD;&#xA;        real = (tempreal * tempreal) + (imag * imag);&#xD;&#xA;        imag = 2.0 * real * imag;&#xD;&#xA;	&#xD;&#xA;        r2 = (real * real) + (imag * imag);&#xD;&#xA;       }&#xD;&#xA;   &#xD;&#xA;       vec3 color;&#xD;&#xA;   &#xD;&#xA;       if(r2 &lt; 4.0)&#xD;&#xA;        color = vec3(1.0);&#xD;&#xA;       else&#xD;&#xA;        color = vec3( iter / MAXITERATIONS );&#xD;&#xA;	&#xD;&#xA;	gl_FragColor = vec4(color, 1.0);&#xD;&#xA;    }    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/0CX7F.png" />
  <row Id="17773" PostHistoryTypeId="1" PostId="8673" RevisionGUID="8873fbe6-30bc-490d-b12a-8365a769b74d" CreationDate="2011-02-17T00:21:16.100" UserId="4638" Text="Mandelbrot set not displaying properly" />
  <row Id="17774" PostHistoryTypeId="3" PostId="8673" RevisionGUID="8873fbe6-30bc-490d-b12a-8365a769b74d" CreationDate="2011-02-17T00:21:16.100" UserId="4638" Text="&lt;opengl&gt;&lt;math&gt;&lt;rendering&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="17775" PostHistoryTypeId="2" PostId="8674" RevisionGUID="de415dd1-45a3-472d-896c-b2eeddb3e607" CreationDate="2011-02-17T00:45:46.747" UserId="395" Text="Design elements are generally data-driven, not done in code (at least not in the same code as the engine, some places use Lua or Python code for the gameplay bits)." />
  <row Id="17776" PostHistoryTypeId="2" PostId="8675" RevisionGUID="28359772-d1f4-4df3-8ec5-810894a5d5db" CreationDate="2011-02-17T01:43:25.530" UserId="3656" Text="Like Ray Dey said, you need to make the call on quality vs size. Remember the [project triangle][1]?&#xD;&#xA;&#xD;&#xA;The same applies to audio. You can have good quality audio that doesn't take up a lot of space, but you'll have to manage streaming it and you're often limited to a set number of streaming channels on non-PC hardware. You can have good quality without streaming, but it will take up a lot of memory, etc.&#xD;&#xA;&#xD;&#xA;Something to check out, if you are working with composers who would be comfortable writing the music in trackers, you can use FMOD (iPod/Pad/Phone and PSP license is listed under &quot;Casual&quot; on their [Sales Page][2] and is $500 flat) and load .MOD, .XM, and .IT. You can have high quality samples and fine-grain control over the flow of music.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/File:Project_Triangle.svg&#xD;&#xA;  [2]: http://www.fmod.org/index.php/sales" />
  <row Id="17777" PostHistoryTypeId="2" PostId="8676" RevisionGUID="e2bd7b21-a8b6-48c2-9dc4-423a30e6a5b6" CreationDate="2011-02-17T01:44:38.680" UserId="4191" Text="I am not a lawyer, and this is not legal advice.&#xD;&#xA;&#xD;&#xA;In the US, parody is a class of &quot;fair use&quot; of copyrighted material.  The primary litmus test used appears to be whether the derivative work offers significant *commentary* on the original work.  If the derivative work simply emulates the original, parody as a defense to an infringement claim is hollow.&#xD;&#xA;&#xD;&#xA;An example of a parodic commercial game derived from another commercial game was 1996's [*Pyst*][1], a parody of *Myst*.  It was basically a tour of Myst Island as interpreted after everyone who bought a copy of *Myst* had tromped through it.  It didn't have significantly similar gameplay to *Myst*, and obviously presented a significantly transformed version of its setting.  It was also subtitled ***A PARODY*** at every possible opportunity, which came across as a slightly desperate &quot;please don't sue us&quot;.&#xD;&#xA;&#xD;&#xA;Intellectual property law outside the US should *not* be assumed to grant any protected status to parody.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pyst" />
  <row Id="17778" PostHistoryTypeId="2" PostId="8677" RevisionGUID="e067f9a2-a920-4bfc-8882-155f5b62a3e4" CreationDate="2011-02-17T02:02:39.903" UserId="4638" Text="It was my fragment shader. Here is the correct version:&#xD;&#xA;&#xD;&#xA;	uniform float MAXITERATIONS;&#xD;&#xA;&#xD;&#xA;	varying vec3 Position;&#xD;&#xA;&#xD;&#xA;	void main (void)  &#xD;&#xA;	{     &#xD;&#xA;	   float zoom = 1.0;&#xD;&#xA;	   float centerX = 0.0;&#xD;&#xA;	   float centerY = 0.0;&#xD;&#xA;&#xD;&#xA;	   float real = Position.x * zoom + centerX;&#xD;&#xA;	   float imag = Position.y * zoom + centerY;&#xD;&#xA;	   float Creal = real;&#xD;&#xA;	   float Cimag = imag;&#xD;&#xA;&#xD;&#xA;	   float r2 = 0.0;&#xD;&#xA;	   float iter;&#xD;&#xA;&#xD;&#xA;	   for(iter = 0.0; iter &lt; MAXITERATIONS &amp;&amp; r2 &lt; 4.0; ++iter)&#xD;&#xA;	   {&#xD;&#xA;		float tempreal = real;&#xD;&#xA;	&#xD;&#xA;		real = (tempreal * tempreal) - (imag * imag) + Creal;&#xD;&#xA;		imag = (2.0 * tempreal * imag) + Cimag;&#xD;&#xA;	&#xD;&#xA;		r2 = (real * real) + (imag * imag);&#xD;&#xA;	   }&#xD;&#xA;   &#xD;&#xA;	   vec3 color;&#xD;&#xA;   &#xD;&#xA;	   if(r2 &lt; 4.0)&#xD;&#xA;		color = vec3(1.0);&#xD;&#xA;		else&#xD;&#xA;		color = vec3( iter / MAXITERATIONS );&#xD;&#xA;	&#xD;&#xA;		gl_FragColor = vec4(color, 1.0);&#xD;&#xA;	}  " />
  <row Id="17779" PostHistoryTypeId="25" PostId="8661" RevisionGUID="a552abef-9647-4ab9-a4e6-5c6ed7c7fcc1" CreationDate="2011-02-17T02:22:41.160" Comment="http://twitter.com/#!/StackGameDev/status/38060735846289408" />
  <row Id="17781" PostHistoryTypeId="2" PostId="8679" RevisionGUID="d2e86c80-5583-41a7-80ef-c90a2d40e029" CreationDate="2011-02-17T03:33:40.150" UserId="5050" Text="I'm ramping up on WebGL and was wondering what is the best way to specify my vertex and fragment shaders.&#xD;&#xA;&#xD;&#xA;Looking at some [tutorials][1], the shaders are embedded directly in the HTML. (And referenced via an ID.) For example:&#xD;&#xA;&#xD;&#xA;    &lt;script id=&quot;shader_1-fs&quot; type=&quot;x-shader/x-fragment&quot;&gt; &#xD;&#xA;      precision highp float;&#xD;&#xA;      void main(void) {&#xD;&#xA;        // ... &#xD;&#xA;      }&#xD;&#xA;    &lt;/script&gt; &#xD;&#xA;     &#xD;&#xA;    &lt;script id=&quot;shader_1-vs&quot; type=&quot;x-shader/x-vertex&quot;&gt; &#xD;&#xA;      attribute vec3 aVertexPosition;&#xD;&#xA;     &#xD;&#xA;      uniform mat4 uMVMatrix;&#xD;&#xA;      // ...&#xD;&#xA;&#xD;&#xA;My question is, is it possible to have my shaders referenced in a separate file? (Ideally as plain text.) I presume this is straight forward in JavaScript. Is there essentially a way to do this:&#xD;&#xA;&#xD;&#xA;    var shaderText = LoadRemoteFileOnSever('/shaders/shader_1.txt');&#xD;&#xA;&#xD;&#xA;  [1]: http://learningwebgl.com/blog/?page_id=1217" />
  <row Id="17782" PostHistoryTypeId="1" PostId="8679" RevisionGUID="d2e86c80-5583-41a7-80ef-c90a2d40e029" CreationDate="2011-02-17T03:33:40.150" UserId="5050" Text="Separate shaders from HTML file in WebGL" />
  <row Id="17783" PostHistoryTypeId="3" PostId="8679" RevisionGUID="d2e86c80-5583-41a7-80ef-c90a2d40e029" CreationDate="2011-02-17T03:33:40.150" UserId="5050" Text="&lt;javascript&gt;&lt;webgl&gt;" />
  <row Id="17784" PostHistoryTypeId="2" PostId="8680" RevisionGUID="3ad35d4e-64f6-43ca-afa6-2f19871f68a7" CreationDate="2011-02-17T04:11:31.680" UserId="312" Text="Yes, it's simple. You can just make an AJAX request to the file, and pass the code to shaderSource." />
  <row Id="17785" PostHistoryTypeId="2" PostId="8681" RevisionGUID="9109dc13-bdd8-4575-b508-56bc966adb45" CreationDate="2011-02-17T04:33:38.750" UserId="5505" Text="I haven't read the paper that ChrisE wrote a link to, but from either a conversation I had with a Valve employee or somewhere on their Development Wiki (can't remember which) I remember being informed that they essentially have only a couple of *real* entities (the AI director); the avatars you see portraying the infected NPC's are just &quot;finger-puppets&quot; to those entities. They did this to keep the number of edict (entity dictionary) entries to a minimum since there are obviously a ton of infected NPC's to keep track of. &#xD;&#xA;&#xD;&#xA;The engine's entity dictionary has a fixed size and cannot grow. This means that any game built on this engine which requires a large amount of NPC's--or any entity for that matter--has to make use of such system in order for the engine to function properly and not choke (and ultimately crash) because the entity count is too high." />
  <row Id="17786" PostHistoryTypeId="25" PostId="8655" RevisionGUID="3822fb2d-8fff-4aa5-96fb-834ebc64359b" CreationDate="2011-02-17T05:22:41.327" Comment="http://twitter.com/#!/StackGameDev/status/38106035512147968" />
  <row Id="17787" PostHistoryTypeId="5" PostId="8680" RevisionGUID="50e4381b-4e91-4665-a481-c1b3c749b9d5" CreationDate="2011-02-17T06:24:28.493" UserId="312" Comment="added 17 characters in body" Text="Yes, it's simple. You can just make an AJAX request to the file, and pass the code to WebGL's shaderSource function." />
  <row Id="17788" PostHistoryTypeId="2" PostId="8682" RevisionGUID="c2ee6398-b2e5-4863-ad30-5d58fa0a4bfb" CreationDate="2011-02-17T07:30:03.323" UserDisplayName="user5438" Text="I'm developing a Tetris clone and working on the input at the moment.&#xD;&#xA;&#xD;&#xA;When I was prototyping, movement was triggered by releasing a directional key. However, in most Tetris games I've played the movement is a bit more complex.&#xD;&#xA;&#xD;&#xA;&gt; When a directional key is pressed, the shape moves one space in that direction. After a short interval, if the key is still held down, the shape starts moving in the direction continuously until the key is released.&#xD;&#xA;&#xD;&#xA;&gt; In the case of the down key being pressed, there is no pause between the initial movement and the subsequent continuous movement.&#xD;&#xA;&#xD;&#xA;I've come up with a solution, and it works well, but it's totally over-engineered. Hey, at least I can recognize when things are getting silly, right? :)&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;    public class TetrisMover&#xD;&#xA;    {&#xD;&#xA;        List&lt;Keys&gt; registeredKeys;&#xD;&#xA;        Dictionary&lt;Keys, TimeSpan&gt; continuousPressedTime;&#xD;&#xA;        Dictionary&lt;Keys, TimeSpan&gt; totalPressedTime;&#xD;&#xA;        Dictionary&lt;Keys, TimeSpan&gt; initialIntervals;&#xD;&#xA;        Dictionary&lt;Keys, TimeSpan&gt; continousIntervals;&#xD;&#xA;        Dictionary&lt;Keys, Action&gt; keyActions;&#xD;&#xA;        Dictionary&lt;Keys, bool&gt; initialActionDone;&#xD;&#xA;        KeyboardState currentKeyboardState;&#xD;&#xA;&#xD;&#xA;        public TetrisMover()&#xD;&#xA;        {&#xD;&#xA;            *snip*&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            currentKeyboardState = Keyboard.GetState();&#xD;&#xA;&#xD;&#xA;            foreach (Keys currentKey in registeredKeys)&#xD;&#xA;            {&#xD;&#xA;                if (currentKeyboardState.IsKeyUp(currentKey))&#xD;&#xA;                {&#xD;&#xA;                    continuousPressedTime[currentKey] = TimeSpan.Zero;&#xD;&#xA;                    totalPressedTime[currentKey] = TimeSpan.Zero;&#xD;&#xA;                    initialActionDone[currentKey] = false;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    if (initialActionDone[currentKey] == false)&#xD;&#xA;                    {&#xD;&#xA;                        keyActions[currentKey]();&#xD;&#xA;                        initialActionDone[currentKey] = true;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    totalPressedTime[currentKey] += gameTime.ElapsedGameTime;&#xD;&#xA;&#xD;&#xA;                    if (totalPressedTime[currentKey] &gt;= initialIntervals[currentKey])&#xD;&#xA;                    {&#xD;&#xA;                        continuousPressedTime[currentKey] += gameTime.ElapsedGameTime;&#xD;&#xA;                        if (continuousPressedTime[currentKey] &gt;= continousIntervals[currentKey])&#xD;&#xA;                        {&#xD;&#xA;                            keyActions[currentKey]();&#xD;&#xA;                            continuousPressedTime[currentKey] = TimeSpan.Zero;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void RegisterKey(Keys key, TimeSpan initialInterval, TimeSpan continuousInterval, Action keyAction)&#xD;&#xA;        {&#xD;&#xA;            if (registeredKeys.Contains(key))&#xD;&#xA;                throw new InvalidOperationException(&#xD;&#xA;                    string.Format(&quot;The key %s is already registered.&quot;, key));&#xD;&#xA;&#xD;&#xA;            registeredKeys.Add(key);&#xD;&#xA;            continuousPressedTime.Add(key, TimeSpan.Zero);&#xD;&#xA;            totalPressedTime.Add(key, TimeSpan.Zero);&#xD;&#xA;            initialIntervals.Add(key, initialInterval);&#xD;&#xA;            continousIntervals.Add(key, continuousInterval);&#xD;&#xA;            keyActions.Add(key, keyAction);&#xD;&#xA;            initialActionDone.Add(key, false);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void UnregisterKey(Keys key)&#xD;&#xA;        {&#xD;&#xA;            *snip*&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;I'm updating it every frame, and this is how I'm registering keys for movement:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;            tetrisMover.RegisterKey(&#xD;&#xA;                Keys.Left, keyHoldStartSpecialInterval, keyHoldMovementInterval,&#xD;&#xA;                () =&gt; { Move(Direction.Left); });&#xD;&#xA;&#xD;&#xA;            tetrisMover.RegisterKey(&#xD;&#xA;                Keys.Right, keyHoldStartSpecialInterval, keyHoldMovementInterval,&#xD;&#xA;                () =&gt; { Move(Direction.Right); });&#xD;&#xA;&#xD;&#xA;            tetrisMover.RegisterKey(&#xD;&#xA;                Keys.Down, TimeSpan.Zero, keyHoldMovementInterval,&#xD;&#xA;                () =&gt; { PerformGravity(); });&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Issues that this doesn't address:&#xD;&#xA;&#xD;&#xA; - If both left and right are held down,&#xD;&#xA;   the shape moves back and forth really&#xD;&#xA;   quick.&#xD;&#xA; - If a directional key is held down and&#xD;&#xA;   the turn finishes and the shape is&#xD;&#xA;   replaced by a new one, the new one&#xD;&#xA;   will move quickly in that direction&#xD;&#xA;   instead of the little pause it is&#xD;&#xA;   supposed to have.&#xD;&#xA;&#xD;&#xA;I could fix the issues, but I think it will make the solution even worse. How would you implement this?" />
  <row Id="17789" PostHistoryTypeId="1" PostId="8682" RevisionGUID="c2ee6398-b2e5-4863-ad30-5d58fa0a4bfb" CreationDate="2011-02-17T07:30:03.323" UserDisplayName="user5438" Text="Tetris Movement - Implementation" />
  <row Id="17790" PostHistoryTypeId="3" PostId="8682" RevisionGUID="c2ee6398-b2e5-4863-ad30-5d58fa0a4bfb" CreationDate="2011-02-17T07:30:03.323" UserDisplayName="user5438" Text="&lt;xna&gt;&lt;game-mechanics&gt;&lt;input&gt;&lt;gameloop&gt;" />
  <row Id="17791" PostHistoryTypeId="2" PostId="8683" RevisionGUID="23b0299b-687e-459e-9864-428a3a9fe614" CreationDate="2011-02-17T07:30:15.553" UserId="2792" Text="The question is a bit ambiguous. Will it work? Sure it will. You can probably squeeze it down to one pass that traces against all lights, even though you use one pass per light. Can you add your lights to a list and do a post process batch where your lights are in a list?&#xD;&#xA;&#xD;&#xA;Will it look good? That's the problem. It's not really easy to answer and depend a lot on your art direction and how intense you want the effect from each light to be." />
  <row Id="17792" PostHistoryTypeId="2" PostId="8684" RevisionGUID="208c85d7-db4d-4939-90bd-61cf2afd2cbe" CreationDate="2011-02-17T07:45:25.400" UserId="5508" Text="Since you want to give up a bit of player control for playability using an AI, you might want to consider also simplifying the effect of tacking on propellers and altering ship dimensions into less, more easily manageable parameters for a computer algorithm. The player is still allowed to add propellers on any given part of the ship, but once completed this is 'compressed' into parameters.&#xD;&#xA;&#xD;&#xA;Each propeller affects the turn rate of the ship, or, combined with a parallel placed propeller, affects the travel rate in a specific dimension. Combine these parameters for each propeller, and you get the maximum turn rate and speed for a ship. Combine these two parameters for each propeller and propeller set into the maximum turn and speed rate for the ship as a whole, for all available dimensions (up, down, left, right, forward, backward).&#xD;&#xA;&#xD;&#xA;Using the turn rate and velocity for each dimension, you have enough information to actually allow the ship to move to a destination. The player will see the effect of his propeller configuration, but under the hood his input is vastly simplified. You could come up with more than one fly strategy based on the distance the ship has to travel, to make the flight look more natural and increase the player's sense he or she has exerted control over the ship movement. But in the end, like you said, it will not matter how the ship gets to the destination and whether its route is optimal, it just needs to be there and its arrival time is influenced by the propeller configuration." />
  <row Id="17793" PostHistoryTypeId="2" PostId="8685" RevisionGUID="919ebb2c-0e89-470a-a43a-28f2b0d79ff4" CreationDate="2011-02-17T07:54:50.593" UserDisplayName="slcpfmmm" Text="What you need is a simple key repeating algorithm. This is how I usually do it.&#xD;&#xA;&#xD;&#xA;    FRAMES_FOR_FIRST_PRESS = 4;&#xD;&#xA;    FRAMES_FOR_OTHER_PRESS = 1;&#xD;&#xA;    &#xD;&#xA;    key_pending_frames = -1;&#xD;&#xA;&#xD;&#xA;now, for every frame:&#xD;&#xA;&#xD;&#xA;    function OnFrame()&#xD;&#xA;    {&#xD;&#xA;    	if (IsKeyPressed())&#xD;&#xA;    	{&#xD;&#xA;    		if (key_pending_frames &lt; 0) // not pressed&#xD;&#xA;    		{&#xD;&#xA;    			key_pending_frames = FRAMES_FOR_FIRST_PRESS;&#xD;&#xA;    		}&#xD;&#xA;    		key_pending_frames--;&#xD;&#xA;    		if (key_pending_frames == 0)&#xD;&#xA;    		{&#xD;&#xA;    			DoYourAction();&#xD;&#xA;    			key_pending_frames = FRAMES_FOR_OTHER_PRESS;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    	else&#xD;&#xA;    	{&#xD;&#xA;    		key_pending_frames = -1;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You'd need a key_pending_frames for each key you want, and you can reset any key's counter just by setting its variable to -1.&#xD;&#xA;&#xD;&#xA;Note that for non-fixed frame lengths, you can use clock ticks, or another time interval structure you have. You just have to make sure your non-pressed value is unreachable by simply decrementing the counter. To be on the safe side, you can simply add a `bool key_pressed` for each key." />
  <row Id="17794" PostHistoryTypeId="25" PostId="8682" RevisionGUID="aca6b326-c26d-40ed-af01-be332d6e731a" CreationDate="2011-02-17T08:22:42.180" Comment="http://twitter.com/#!/StackGameDev/status/38151336319131648" />
  <row Id="17795" PostHistoryTypeId="5" PostId="8684" RevisionGUID="84925312-a825-4b5e-b9ec-b3ea95c7bc1f" CreationDate="2011-02-17T08:25:46.613" UserId="5508" Comment="Forgot to touch upon the custom ship dimensions" Text="Since you want to give up a bit of player control for playability using an AI, you might want to consider also simplifying the effect of tacking on propellers and altering ship dimensions into less, more easily manageable parameters for a computer algorithm. The player is still allowed to add propellers on any given part of the ship, but once completed this is 'compressed' into parameters.&#xD;&#xA;&#xD;&#xA;Each propeller affects the turn rate of the ship, or, combined with a parallel placed propeller, affects the travel rate in a specific dimension. Combine these parameters for each propeller, and you get the maximum turn rate and speed for a ship. Combine these two parameters for each propeller and propeller set into the maximum turn and speed rate for the ship as a whole, for all available dimensions (up, down, left, right, forward, backward).&#xD;&#xA;&#xD;&#xA;Using the turn rate and velocity for each dimension, you have enough information to actually allow the ship to move to a destination. The player will see the effect of his propeller configuration, but under the hood his input is vastly simplified. You could come up with more than one fly strategy based on the distance the ship has to travel, to make the flight look more natural and increase the player's sense he or she has exerted control over the ship movement. But in the end, like you said, it will not matter how the ship gets to the destination and whether its route is optimal, it just needs to be there and its arrival time is influenced by the propeller configuration.&#xD;&#xA;&#xD;&#xA;For the ship dimensions, you could factor them in once you have the compressed velocity values for a rough effect, or use them while calculating for a more precise effect. You would probably want to test if the precise method is worth the effort, because the difference might not impact the player's sense of control." />
  <row Id="17796" PostHistoryTypeId="2" PostId="8686" RevisionGUID="977df612-4a44-44df-a4bf-d5c5c0822ed0" CreationDate="2011-02-17T08:32:43.403" UserId="5131" Text="I am looking for help/links/notes/agorithms/URLs/examples on drawing/rendering spheres in pure Java (so that I can hopefully, one day, generate/render planets with various surfaces &amp; atmospheres) &#xD;&#xA;&#xD;&#xA;So for the moment, i'd be pretty happy to be able to start off with just drawing a wireframed sphere(s).&#xD;&#xA;&#xD;&#xA;ps: I don't want to use external libraries like Java3D, JOGL or aftermarket engines like JMonkeyEngine, Would rather keep it as straight Java." />
  <row Id="17797" PostHistoryTypeId="1" PostId="8686" RevisionGUID="977df612-4a44-44df-a4bf-d5c5c0822ed0" CreationDate="2011-02-17T08:32:43.403" UserId="5131" Text="Need help drawings planets in Java." />
  <row Id="17798" PostHistoryTypeId="3" PostId="8686" RevisionGUID="977df612-4a44-44df-a4bf-d5c5c0822ed0" CreationDate="2011-02-17T08:32:43.403" UserId="5131" Text="&lt;java&gt;&lt;terrain-rendering&gt;" />
  <row Id="17799" PostHistoryTypeId="2" PostId="8687" RevisionGUID="f344a201-3f5f-4476-8c59-64687015820a" CreationDate="2011-02-17T08:51:07.553" UserId="5509" Text="I just wanted to know if there was a way to find out the size of the window in XNA. I don't want to set it to a specific size; I would like to know what dimensions it currently displays as automatically. Is there a way to find this information out?&#xD;&#xA;&#xD;&#xA;I realize I probably should have found this information out (or set it myself manually) before working on the game, but I'm a novice and am now hoping to work within the dimensions I have already become invested in. Thanks!" />
  <row Id="17800" PostHistoryTypeId="1" PostId="8687" RevisionGUID="f344a201-3f5f-4476-8c59-64687015820a" CreationDate="2011-02-17T08:51:07.553" UserId="5509" Text="How to find the window size in XNA" />
  <row Id="17801" PostHistoryTypeId="3" PostId="8687" RevisionGUID="f344a201-3f5f-4476-8c59-64687015820a" CreationDate="2011-02-17T08:51:07.553" UserId="5509" Text="&lt;xna&gt;" />
  <row Id="17802" PostHistoryTypeId="4" PostId="8616" RevisionGUID="8fb30556-4f35-406f-84a5-eb3f323390b1" CreationDate="2011-02-17T09:10:08.910" UserId="5478" Comment="changed title" Text="Interacting with scene from controller/app delegate cocos2d" />
  <row Id="17803" PostHistoryTypeId="2" PostId="8688" RevisionGUID="187ea8da-5fb3-4a8a-935c-22575a1c1e97" CreationDate="2011-02-17T09:14:26.047" UserId="3794" Text="This is not possible in java as i know. &#xD;&#xA;&#xD;&#xA;If you still want to do this in plain java, you will have to implement some kind of simple 3D library by yourself. That is very useful for learning graphics programming, but not easy way how to get things working (and it will be slow, because you will not be able to use gpu). If there is not some special reason to not using libraries i think that you will be good with JOGL." />
  <row Id="17804" PostHistoryTypeId="2" PostId="8689" RevisionGUID="73cb38c2-d9aa-41e3-8f5e-027f8e6299af" CreationDate="2011-02-17T09:33:59.033" UserId="5440" Text="You can calculate normals by taking two edges, and cross product for each vertex. A cube actually has 24 vertices not 8, the reason is that each corner vertex is shared with different faces, because openGL takes per vertex attributes, you need to duplicate a vertex if you find that it has 2 different normals, assuming you want hard edges. &#xD;&#xA;&#xD;&#xA;http://www.devmaster.net/forums/showthread.php?t=1783&#xD;&#xA;&#xD;&#xA;this is a C++ code but its self explanatory. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17805" PostHistoryTypeId="5" PostId="8686" RevisionGUID="2db43385-8e18-4fa3-9a46-41be1a064ca9" CreationDate="2011-02-17T09:39:00.337" UserId="20" Comment="removed greeting line" Text="I am looking for help/links/notes/agorithms/URLs/examples on drawing/rendering spheres in pure Java (so that I can hopefully, one day, generate/render planets with various surfaces &amp; atmospheres) &#xD;&#xA;&#xD;&#xA;So for the moment, i'd be pretty happy to be able to start off with just drawing a wireframed sphere(s).&#xD;&#xA;&#xD;&#xA;ps: I don't want to use external libraries like Java3D, JOGL or aftermarket engines like JMonkeyEngine, Would rather keep it as straight Java." />
  <row Id="17807" PostHistoryTypeId="2" PostId="8690" RevisionGUID="cb044014-a660-48e2-ab94-cb052d4d0542" CreationDate="2011-02-17T10:09:06.867" UserId="4947" Text="GraphicsDevice.Viewport.Bounds - this returns Rectangle2D and it has parameters Width and Height." />
  <row Id="17808" PostHistoryTypeId="2" PostId="8691" RevisionGUID="88be495a-e6d9-4929-89bd-585af3f23912" CreationDate="2011-02-17T10:21:14.730" UserId="364" Text="I know a lot of logging libraries but didn't test a lot of them. (GoogleLog, Pantheios, the coming boost::log library...)&#xD;&#xA;&#xD;&#xA;In games, especially in remote multiplayer and multithreaded games, logging is vital to debugging, even if you remove all logs in the end.&#xD;&#xA;&#xD;&#xA;Let's say I'm making a PC game (not console) that needs logs (multiplayer and multithreaded and/or multiprocess) and I have good reasons for looking for a library for logging (like, I don't have time or I'm not confident in my ability to write one correctly for my case).&#xD;&#xA;&#xD;&#xA;Assuming that I need :&#xD;&#xA;&#xD;&#xA; 1. performance&#xD;&#xA; 2. ease of use (allow streaming or formating or something like that)&#xD;&#xA; 3. reliable (don't leak or crash!)&#xD;&#xA;&#xD;&#xA;Wich logging library would you recommand?&#xD;&#xA;&#xD;&#xA;Currently, I think that boost::log is the most flexible one (you can even log to remotely!), but have not good performance. Pantheios is often cited but I don't have comparison points on performance and usage. I've used my own lib for a long time but I know it don't manage multithreading so it's a big problem, even if it's fast enough. Google Log seems interesting, I just need to test it but if you already have compared those libs and more, your advice might be of good use.&#xD;&#xA;&#xD;&#xA;Games are often performance demanding while complex to debug so it would be good to know logging libraries that, in our specific case, have clear advantages." />
  <row Id="17809" PostHistoryTypeId="1" PostId="8691" RevisionGUID="88be495a-e6d9-4929-89bd-585af3f23912" CreationDate="2011-02-17T10:21:14.730" UserId="364" Text="Logging library for (c++) games" />
  <row Id="17810" PostHistoryTypeId="3" PostId="8691" RevisionGUID="88be495a-e6d9-4929-89bd-585af3f23912" CreationDate="2011-02-17T10:21:14.730" UserId="364" Text="&lt;c++&gt;&lt;programming&gt;&lt;performance&gt;&lt;logging&gt;&lt;log&gt;" />
  <row Id="17811" PostHistoryTypeId="5" PostId="8691" RevisionGUID="12028ca1-7e03-48c1-b533-c5d42235d951" CreationDate="2011-02-17T10:38:30.550" UserId="364" Comment="added 61 characters in body" Text="I know a lot of logging libraries but didn't test a lot of them. (GoogleLog, Pantheios, the coming boost::log library...)&#xD;&#xA;&#xD;&#xA;In games, especially in remote multiplayer and multithreaded games, logging is vital to debugging, even if you remove all logs in the end.&#xD;&#xA;&#xD;&#xA;Let's say I'm making a PC game (not console) that needs logs (multiplayer and multithreaded and/or multiprocess) and I have good reasons for looking for a library for logging (like, I don't have time or I'm not confident in my ability to write one correctly for my case).&#xD;&#xA;&#xD;&#xA;Assuming that I need :&#xD;&#xA;&#xD;&#xA; 1. performance&#xD;&#xA; 2. ease of use (allow streaming or formating or something like that)&#xD;&#xA; 3. reliable (don't leak or crash!)&#xD;&#xA; 4. cross-platform (at least Windows, MacOSX, Linux/Ubuntu)&#xD;&#xA;&#xD;&#xA;Wich logging library would you recommand?&#xD;&#xA;&#xD;&#xA;Currently, I think that boost::log is the most flexible one (you can even log to remotely!), but have not good performance. Pantheios is often cited but I don't have comparison points on performance and usage. I've used my own lib for a long time but I know it don't manage multithreading so it's a big problem, even if it's fast enough. Google Log seems interesting, I just need to test it but if you already have compared those libs and more, your advice might be of good use.&#xD;&#xA;&#xD;&#xA;Games are often performance demanding while complex to debug so it would be good to know logging libraries that, in our specific case, have clear advantages." />
  <row Id="17812" PostHistoryTypeId="2" PostId="8692" RevisionGUID="890a7a60-5d00-4ac4-9fbd-102a18bbf567" CreationDate="2011-02-17T10:53:09.903" UserId="5440" Text="I agree  with above answer, use ray cast to find intersection with an imaginary sphere now find the vector from intersection point to the center of the sphere for the first mouse position, now repeat the step for the next mouse position, you will have two vectors, make a cross product to the find the axis that you should rotate your camera around.   " />
  <row Id="17813" PostHistoryTypeId="2" PostId="8693" RevisionGUID="0369238f-b2fa-43fb-b345-e195057a819c" CreationDate="2011-02-17T11:01:44.653" UserId="5512" Text="When it comes to performance, I've found [templog](http://www.templog.org) pretty much unbeaten. It uses expression templates to defer evaluation of logging statements until it's established that the information will be logged at all. Since you can also partly turn off logging (depending on severity, origin, and targeted audience of a log message), some of these logging statement can be eliminated to zero code by the compiler for release builds. (I have actually seen this happen with VC.) &#xD;&#xA;&#xD;&#xA;There wasn't much done much to the library recently, and others on SO have found the trunk lacking in some regards, but in a company I used to work for we have found the guy quite responsive, and one of my then cow-workers even got commit access and added some code to it, so you might find it worth a shot. &#xD;&#xA;&#xD;&#xA;To enumerate your requirements: &#xD;&#xA;&#xD;&#xA;&gt; performance&#xD;&#xA;&#xD;&#xA;Best I've found. Especially its ability to exclude log messages _at compile-time_ and have the compiler completely eliminate those was very appealing. &#xD;&#xA;&#xD;&#xA;&gt; ease of use (allow streaming or formating or something like that)&#xD;&#xA;&#xD;&#xA;There's the classical horrible compiler error messages of templates-meta stuff when you do something wrong, but when it comes to ease of use, this &#xD;&#xA;&#xD;&#xA;    TEMPLOG_LOG(my_logger,sev_error,aud_support) &lt;&lt; &quot;logged in as &quot; &lt;&lt; user_name;&#xD;&#xA;&#xD;&#xA;is hard to beat.  &#xD;&#xA;However, you might have to create your own log sinks (that's where the log messages go), as the few pre-packaged ones (stderr, file, Windows logging, etc.) aren't all that sophisticated. &#xD;&#xA;Due to performance being a main goal, the intrinsics of the whole thing are somewhat complicated (like log message formatters being quite tangled with log sinks), but we did master that (I remember stepping through it in a debugger helping with that) and once understood it wasn't all that hard to write your own message formatters or log sinks. &#xD;&#xA;&#xD;&#xA;&gt; reliable (don't leak or crash!)&#xD;&#xA;&#xD;&#xA;We have used it without finding any such severe issues. There's virtually no dynamic memory allocation in there, so it's hard to even imagine it doing something wrong. Of course, we only ever put it to real-world tests in one product. &#xD;&#xA;&#xD;&#xA;&gt; cross-platform (at least Windows, MacOSX, Linux/Ubuntu)&#xD;&#xA;&#xD;&#xA;When we used it, we used it on Win32, OSX, and several different Linux distributions, Ubuntu among them. &#xD;&#xA;&#xD;&#xA;As for multi-threading: We haven't used this, but from what I remember of the lib's architecture it seems you would only need to handle this in log sinks. ICBWT. " />
  <row Id="17814" PostHistoryTypeId="2" PostId="8694" RevisionGUID="fa558884-0188-4161-b6b9-4753f00f1998" CreationDate="2011-02-17T11:13:27.693" UserId="288" Text="Here are your options:&#xD;&#xA;&#xD;&#xA;To get the back-buffer size use:&#xD;&#xA;&#xD;&#xA;`GraphicsDevice.PresentationParameters.Bounds` (for a rectangle) or `BackBufferWidth` and `BackBufferHeight`.&#xD;&#xA;&#xD;&#xA;You want the back-buffer size if you're doing stuff like setting viewports, taking screenshots, etc.&#xD;&#xA;&#xD;&#xA;**To get the *Viewport*, use:**&#xD;&#xA;&#xD;&#xA;`GraphicsDevice.Viewport.Bounds` (for a rectangle) or `Width` and `Height`.&#xD;&#xA;&#xD;&#xA;**The size of the viewport is what you want to use when you're actually rendering stuff**. Any coordinates you pass to `SpriteBatch` are in pixel-aligned client space in terms of the viewport: (0,0) for the top left pixel to (width-1,height-1) for the bottom right. If you're doing 3D stuff, *projection space* goes from (-1,-1) in the bottom left of the viewport to (1,1) in the top right.&#xD;&#xA;&#xD;&#xA;You can adjust the size and position of the viewport on screen (for doing effects like split-screen). So, while it is initialised to the size of the back-buffer, it is not necessarily always the same.&#xD;&#xA;&#xD;&#xA;If you're doing interface layout stuff, particularly if you will run on the Xbox 360, be aware of `Viewport.TitleSafeArea`. This tells you what region is definitely visible on screens that may cut off some of the border.&#xD;&#xA;&#xD;&#xA;If, for some reason, you're actually working with the game window itself, use `Game.GameWindow.ClientBounds`." />
  <row Id="17815" PostHistoryTypeId="25" PostId="8691" RevisionGUID="e9fe5456-eb73-4bbf-8ba8-f0db830354e9" CreationDate="2011-02-17T11:22:42.813" Comment="http://twitter.com/#!/StackGameDev/status/38196637725753344" />
  <row Id="17816" PostHistoryTypeId="2" PostId="8695" RevisionGUID="5fc4bd2d-0508-41b5-8ec7-4d12670bf8ac" CreationDate="2011-02-17T11:47:12.103" UserDisplayName="user5514" Text="For games like *fps* and *car racing*&#xD;&#xA;which language/tools is suggested&#xD;&#xA;for a beginner with no experience in game development?&#xD;&#xA;&#xD;&#xA;For designing and developing *first person shooter, 3rd person shooter,car racing games*.&#xD;&#xA;&#xD;&#xA;Any *good tutorial* link which will be helpful to learn game development?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="17817" PostHistoryTypeId="1" PostId="8695" RevisionGUID="5fc4bd2d-0508-41b5-8ec7-4d12670bf8ac" CreationDate="2011-02-17T11:47:12.103" UserDisplayName="user5514" Text="which is the suggested language for begining game development for a beginner" />
  <row Id="17818" PostHistoryTypeId="3" PostId="8695" RevisionGUID="5fc4bd2d-0508-41b5-8ec7-4d12670bf8ac" CreationDate="2011-02-17T11:47:12.103" UserDisplayName="user5514" Text="&lt;language-choice&gt;&lt;design&gt;" />
  <row Id="17819" PostHistoryTypeId="5" PostId="8693" RevisionGUID="70a7bc69-cbb6-4761-9bd7-11865954e9c6" CreationDate="2011-02-17T12:08:39.337" UserId="5512" Comment="deleted 5 characters in body" Text="When it comes to performance, I've found [templog](http://www.templog.org) pretty much unbeaten. It uses expression templates to defer evaluation of logging statements until it's established that the information will be logged at all. Since you can also partly turn off logging (depending on severity, origin, and targeted audience of a log message), some of these logging statement can be eliminated to zero code by the compiler for release builds. (I have actually seen this happen with VC.) &#xD;&#xA;&#xD;&#xA;There wasn't much done to the library recently, and others on SO have found the trunk lacking in some regards, but in a company I used to work for we have found the guy quite responsive, and one of my then cow-workers even got commit access and added some code to it, so you might find it worth a shot. &#xD;&#xA;&#xD;&#xA;To enumerate your requirements: &#xD;&#xA;&#xD;&#xA;&gt; performance&#xD;&#xA;&#xD;&#xA;Best I've found. Especially its ability to exclude log messages _at compile-time_ and have the compiler completely eliminate those was very appealing. &#xD;&#xA;&#xD;&#xA;&gt; ease of use (allow streaming or formating or something like that)&#xD;&#xA;&#xD;&#xA;There's the classical horrible compiler error messages of templates-meta stuff when you do something wrong, but when it comes to ease of use, this &#xD;&#xA;&#xD;&#xA;    TEMPLOG_LOG(my_logger,sev_error,aud_support) &lt;&lt; &quot;logged in as &quot; &lt;&lt; user_name;&#xD;&#xA;&#xD;&#xA;is hard to beat.  &#xD;&#xA;However, you might have to create your own log sinks (that's where the log messages go), as the few pre-packaged ones (stderr, file, Windows logging, etc.) aren't all that sophisticated. &#xD;&#xA;Due to performance being a main goal, the intrinsics of the whole thing are somewhat complicated (like log message formatters being quite tangled with log sinks), but we did master that (I remember stepping through it in a debugger helping with that) and once understood it wasn't all that hard to write your own message formatters or log sinks. &#xD;&#xA;&#xD;&#xA;&gt; reliable (don't leak or crash!)&#xD;&#xA;&#xD;&#xA;We have used it without finding any such severe issues. There's virtually no dynamic memory allocation in there, so it's hard to even imagine it doing something wrong. Of course, we only ever put it to real-world tests in one product. &#xD;&#xA;&#xD;&#xA;&gt; cross-platform (at least Windows, MacOSX, Linux/Ubuntu)&#xD;&#xA;&#xD;&#xA;When we used it, we used it on Win32, OSX, and several different Linux distributions, Ubuntu among them. &#xD;&#xA;&#xD;&#xA;As for multi-threading: We haven't used this, but from what I remember of the lib's architecture it seems you would only need to handle this in log sinks. ICBWT. " />
  <row Id="17820" PostHistoryTypeId="2" PostId="8696" RevisionGUID="968bd665-1a53-4cc9-916f-0a7782c9c76a" CreationDate="2011-02-17T12:15:20.503" UserId="2792" Text="If you are completely new and just want to make games, you should probably look at an engine.&#xD;&#xA;I have heard a lot of good things about [Unity][1], and it's supposedly very easy to prototype in. [UDK][2] can also be a candidate. A lot of people seem to like XNA, but it will require a lot more programming getting your game together.&#xD;&#xA;To get started with a smaller scope, like a 2D game, have a look at Python and Pygame.&#xD;&#xA;&#xD;&#xA;If you are looking into a career and would like to program commercial games, you will probably have to learn a few of Python, C, C++, Objective-C (for iPhone/iPad), C# (XNA), Lua.&#xD;&#xA;&#xD;&#xA;Play around and chose one, once you can program it's easy to switch both language and engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/ &quot;Unity&quot;&#xD;&#xA;  [2]: http://www.udk.com/ &quot;Unreal Development Kit&quot;" />
  <row Id="17821" PostHistoryTypeId="2" PostId="8697" RevisionGUID="29f4d9cc-4bc4-4fc1-811a-e80d9f510795" CreationDate="2011-02-17T12:41:27.963" UserId="2710" Text="As you probably guessed, having a bunch of `if` statements in your code is just about the worst thing you could do. What you actually need, is to abstract different functionality in different &quot;units&quot; - be they classes, functions, scripts or whatever - and make them as self-contained as possible.&#xD;&#xA;&#xD;&#xA;Here's how we do that. In our current game, characters can be either in an instance, or in town. We have so-called _services_, that run in their own threads and process players' requests and game logic. We have one town service and many instance services - one for each instance active on the server. &#xD;&#xA;&#xD;&#xA;Thus, town service has logic to deal with town tasks, such as visiting a shop; instance service has logic to deal with instance tasks, such as casting spells. These are not the only services - for example, quests and achievements can happen both in town and in instance, and they're handled in a special quest service, that towns and instances communicate with.&#xD;&#xA;&#xD;&#xA;But instance service doesn't contain all game logic pertaining to instances (for one thing, it would be enormous if it did). For example, there's `MoveController` that handles, you guessed it, movement in instance. This allows us to (theoretically) add some new logic to movement - like, for example, add flying - by just creating another `MoveController`-derived class. Not that we actually tried (-8&#xD;&#xA;&#xD;&#xA;An example that is closer to your question: at start of development, we only had PvE instances, that closed whenever all mobs _or_ all characters died. However, at some time we had to add PvP, which had a bunch of different rules about who won and who lost and when. That is, the game logic in PvP was the same as in PvE, _except_ the finishing part. This is what we did: we created an object called `ExitStrategy`, whose responsibility was to decide whether instance was to end, and what characters received rewards afterwards. Than we made several different strategies: `PvEExitStrategy`, `DuelExitStrategy`, `TeamBattleExitStrategy`, etc. The instance service has an object of type `ExitStrategy`, that is created during set-up, based on what type of instance it is. Thus, there's only one place with a bunch of `if`'s (`switch` actually), neatly tucked in a short method in the startup sequence.&#xD;&#xA;&#xD;&#xA;I want to emphasize that we _didn't_ subclass `InstanceService` instead. While this might seem like a logical thing to do, subclassing is actually bad decision in this case. Suppose we'd later want to add another type of instance - say, with some &quot;mission objectives&quot; to reach. If we used subclassing, we wouldn't be able to add this to both PvE and PvP instances without some code duplication. However, with aggregation we can easily add some `ObjectiveManager` or something.&#xD;&#xA;&#xD;&#xA;To reiterate: you want to have different logic in different places, as independent as possible?, and combine it with aggregation. If you do, you can use whatever &quot;common&quot; game logic you need in the instance, and add or override parts you don't need.&#xD;&#xA;&#xD;&#xA;Now, if you're anything like me, this approach would actually leave you with a lot of components that are just not independent enough, and tend to break if you push them too far, especially on first try. But that's still way better than huge inheritance hierarchy, code duplication or, heaven forbid, bunches of `if`'s everywhere." />
  <row Id="17822" PostHistoryTypeId="2" PostId="8698" RevisionGUID="9b5b94e9-b004-4ba2-8ca7-91a59527b1b6" CreationDate="2011-02-17T13:39:13.037" UserId="2778" Text="Assuming a greater experience in Java than the other mentioned languages such as C/C++ and VB.NET, I would suggest you go with [XNA Game Studio 4.0][1] or any older version if you're using another version than Visual Studio 2010.&#xD;&#xA;&#xD;&#xA;Besides, this question might guide you a bit more:&lt;br&gt;&#xD;&#xA;[Where to start writing games, any tutorials or the like?][2]&lt;br&gt;&#xD;&#xA;This is a question that I have asked myself based on my programming experience, and `XNA` has strongly been advised for me. The tutorials linked might guide you as for the direction you want to walk.&#xD;&#xA;&#xD;&#xA;Since there are many similitudes between Java and C#, and since you have already done some basic programming in VB.NET, I believe you can get up and running fast enough so that you may later change the language and learn something new as suggested by Void, such as Objective-C, Python, Lua, etc.&#xD;&#xA;&#xD;&#xA;Although I am not an experienced game developer, I would suggest anyway that you get acquainted with the concept of game loop and collision detection. Here are some XNA game tutorials with which I have learned much:&#xD;&#xA;&#xD;&#xA;1. [How to make a 2D XNA Game][3];&#xD;&#xA;2. [Going Beyond: XNA Game Studio in 3D][4].&#xD;&#xA;&#xD;&#xA;Browsing these links will provide you with plenty of other resources and learning materials that shall interest you, I guess.&#xD;&#xA;&#xD;&#xA;I hope this helps! =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9ac86eca-206f-4274-97f2-ef6c8b1f478f&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/7657/where-to-start-writing-games-any-tutorials-or-the-like&#xD;&#xA;  [3]: http://swsql.com/Tutorials/MakeXNA2D/mak_xna_2d_game_intro.htm&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/bb203897(v=xnagamestudio.31).aspx" />
  <row Id="17823" PostHistoryTypeId="2" PostId="8699" RevisionGUID="64fbf973-6ef3-48d9-83b8-cb3b5232302d" CreationDate="2011-02-17T14:00:35.333" UserId="2925" Text="I am working on an iPad game, and would like to have a few, pre-rendered cut scenes that are shown at key moments throughout the game.&#xD;&#xA;&#xD;&#xA;How do low-budget software developers create pre-rendered cut scenes, especially when the target device is an iPad?" />
  <row Id="17824" PostHistoryTypeId="1" PostId="8699" RevisionGUID="64fbf973-6ef3-48d9-83b8-cb3b5232302d" CreationDate="2011-02-17T14:00:35.333" UserId="2925" Text="Creating Cut Scenes For iPad" />
  <row Id="17825" PostHistoryTypeId="3" PostId="8699" RevisionGUID="64fbf973-6ef3-48d9-83b8-cb3b5232302d" CreationDate="2011-02-17T14:00:35.333" UserId="2925" Text="&lt;ipad&gt;&lt;cutscene&gt;" />
  <row Id="17826" PostHistoryTypeId="25" PostId="8699" RevisionGUID="14eb6da9-6ab8-4383-8e75-50d436afd8d0" CreationDate="2011-02-17T14:22:42.667" Comment="http://twitter.com/#!/StackGameDev/status/38241936460627968" />
  <row Id="17827" PostHistoryTypeId="2" PostId="8700" RevisionGUID="30e4a2af-de7e-46a6-a3eb-5cdf31c02412" CreationDate="2011-02-17T14:27:09.963" UserId="2836" Text="[log using socket][1] (any socket wrapper can suffice) + web browser [websocket][2] =&gt; most versatile, unobtrusive logging tool possible, will gain hours of debugging and avoid eye-sore.&#xD;&#xA;&#xD;&#xA;- asyncrhonous (speed as it defers all the job on the browser)&#xD;&#xA;- formatted (color, size etc..)&#xD;&#xA;- reliable (sockets...)&#xD;&#xA;- cross-platform (browser)&#xD;&#xA;&#xD;&#xA;Now, the bonus:&#xD;&#xA;&#xD;&#xA;- dynamic filtering very easily done (using javascript regex if needed)&#xD;&#xA;- with log history, memory and compare (HTML5 spec on the &quot;in-browser&quot; database)&#xD;&#xA;- Easy way to make some graph of any data (using SVG, or canvas or anything) like [memory][3], [memory fragmentation][4], etc... &#xD;&#xA;- easy way to make some 2D graph of any data ([kd-tree subdivision][5] ? potential field ? or even just a variable value variation ? etc...)&#xD;&#xA;- allows distant logging (using the browser other computer)&#xD;&#xA;- using html5 in browser storage, you can store log session parameteres (current log filters, etc.. and even notes on each)&#xD;&#xA;- very easy to create bug report or link trac tickets just with a click&#xD;&#xA;- ability to rewind logging easily, with a [timeline gui][6] &#xD;&#xA;&#xD;&#xA;and many more task outside of logging:&#xD;&#xA;- allows profiler info (graphs...)&#xD;&#xA;- can even serve as console (send command from browser) or even with quick GUI using some HTML or even flash ui &#xD;&#xA;- image diff  in the browser (send image using socket, and compare in browser using canvas image pixel capabilities)&#xD;&#xA;- etc...&#xD;&#xA;&#xD;&#xA;(nearly all of the above can be done using flash sockets, save the database capabilities)&#xD;&#xA;&#xD;&#xA;Now I know it seems a bit long to set up the thing. But it really is a gain of time on long project, with hard debugging situation (such as in games.) It's the most powerful thing I used since debuggers... &#xD;&#xA;&#xD;&#xA;Note 1: the only downside =&gt; double-check side effect when debugging game networking code (impact on socket buffer size, latency, bandwidth, etc...)&#xD;&#xA;Note 2: some broswer deactivated by default websocket due to security reason, check about:config things to be sure it's enabled.&#xD;&#xA;&#xD;&#xA;  [1]: http://logging.apache.org/log4cxx/&#xD;&#xA;  [2]: http://dev.w3.org/html5/websockets/" />
  <row Id="17828" PostHistoryTypeId="2" PostId="8701" RevisionGUID="497b10a7-4e79-4862-89cf-9591dbc40355" CreationDate="2011-02-17T14:37:33.497" UserId="1352" Text="I would suggest paintings with subtle animations in a comic like presentation.&#xD;&#xA;If you are lucky you might find a talented young artist that will spend his/her free time to get their art exposed in a game.&#xD;&#xA;&#xD;&#xA;A good example of awesome &quot;2D&quot; cutscenes are the mini-cutscenes before missions in Warhammer40k: Chaos Rising. It's basically paintings overlain on an animated 2D mesh. Very clerver, good looking and affordable! I can't find a video example online though. Most of the ones online are full 3D." />
  <row Id="17829" PostHistoryTypeId="5" PostId="8700" RevisionGUID="bf98ab84-bbeb-419c-8642-17d55e30a36c" CreationDate="2011-02-17T14:38:49.797" UserId="2836" Comment="spelling" Text="[log using socket][1] (any socket wrapper can suffice) + web browser [websocket][2] =&gt; most versatile, unobtrusive logging tool possible, will gain hours of debugging and avoid eye-sore.&#xD;&#xA;&#xD;&#xA;- asynchronous (speed as it defers all the job on the browser)&#xD;&#xA;- formatted (color, size etc..)&#xD;&#xA;- reliable (sockets...)&#xD;&#xA;- cross-platform (browser)&#xD;&#xA;&#xD;&#xA;Now, the bonus:&#xD;&#xA;&#xD;&#xA;- dynamic filtering very easily done (using javascript regex if needed)&#xD;&#xA;- with log history, memory and compare (HTML5 spec on the &quot;in-browser&quot; database)&#xD;&#xA;- Easy way to make some graph of any data (using SVG, or canvas or anything) like [memory][3], [memory fragmentation][4], etc... &#xD;&#xA;- easy way to make some 2D graph of any data ([kd-tree subdivision][5] ? potential field ? or even just a variable value variation ? etc...)&#xD;&#xA;- allows distant logging (using the browser other computer)&#xD;&#xA;- using html5 in browser storage, you can store log session parameteres (current log filters, etc.. and even notes on each)&#xD;&#xA;- very easy to create bug report or link trac tickets just with a click&#xD;&#xA;- ability to rewind logging easily, with a [timeline gui][6] &#xD;&#xA;&#xD;&#xA;and many more task outside of logging:&#xD;&#xA;- allows profiler info (graphs...)&#xD;&#xA;- can even serve as console (send command from browser) or even with quick GUI using some HTML or even flash ui &#xD;&#xA;- image diff  in the browser (send image using socket, and compare in browser using canvas image pixel capabilities)&#xD;&#xA;- etc...&#xD;&#xA;&#xD;&#xA;(nearly all of the above can be done using flash sockets, save the database capabilities)&#xD;&#xA;&#xD;&#xA;Now I know it seems a bit long to set up the thing. But it really is a gain of time on long project, with hard debugging situation (such as in games.) It's the most powerful thing I used since debuggers... &#xD;&#xA;&#xD;&#xA;Note 1: the only downside =&gt; double-check side effect when debugging game networking code (impact on socket buffer size, latency, bandwidth, etc...)&#xD;&#xA;Note 2: some broswer deactivated by default websocket due to security reason, check about:config things to be sure it's enabled.&#xD;&#xA;&#xD;&#xA;  [1]: http://logging.apache.org/log4cxx/&#xD;&#xA;  [2]: http://dev.w3.org/html5/websockets/" />
  <row Id="17830" PostHistoryTypeId="2" PostId="8702" RevisionGUID="8679c655-226c-4a9b-9ff7-0df3c0dc935a" CreationDate="2011-02-17T14:41:19.710" UserId="3676" Text="A common method is to record a movie, encode it to a file such as Mpeg-4, and use the iPhone's selection of video controls to play that movie back.&#xD;&#xA;&#xD;&#xA;The movie itself can be produced in a variety of ways:&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;- Live action;&#xD;&#xA;- Computer generated images using a CGI package such as Autodesk's 3ds Max or Maya;&#xD;&#xA;- Play out your scene using your own game and record it using something like FRAPS." />
  <row Id="17831" PostHistoryTypeId="2" PostId="8703" RevisionGUID="7963a859-3baa-4e19-85ee-118db144064c" CreationDate="2011-02-17T14:49:11.700" UserId="4911" Text="I'm a developer that's just now starting to mess around with game development. I'm a .Net guy, so I've messed with XNA and am now playing around with Cocos2d for the iPhone. My question really is more general though. &#xD;&#xA;&#xD;&#xA;Let's say I'm building a simple Pong game. I'd have a `Ball` class and a `Paddle` class. Coming from the business world development, my first instinct is to not have any drawing or input handling code in either of these classes.&#xD;&#xA;&#xD;&#xA;    //pseudo code&#xD;&#xA;    class Ball&#xD;&#xA;    {&#xD;&#xA;       Vector2D position;&#xD;&#xA;       Vector2D velocity;&#xD;&#xA;       Color color;&#xD;&#xA;       void Move(){}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Nothing in the ball class handles input, or deals with drawing. I'd then have another class, my `Game` class, or my `Scene.m` (in Cocos2D) which would new up the Ball, and during the game loop, it would manipulate the ball as needed.&#xD;&#xA;&#xD;&#xA;The thing is though, in many tutorials for both XNA and Cocos2D, I see a pattern like this:&#xD;&#xA;&#xD;&#xA;    //pseudo code&#xD;&#xA;    class Ball : SomeUpdatableComponent&#xD;&#xA;    {&#xD;&#xA;       Vector2D position;&#xD;&#xA;       Vector2D velocity;&#xD;&#xA;       Color color;&#xD;&#xA;       void Update(){}&#xD;&#xA;       void Draw(){}&#xD;&#xA;       void HandleInput(){}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My question is, is this right? Is this the pattern that people use in game development? It somehow goes against everything I'm used to, to have my Ball class do everything. Furthermore, in this second example, where my `Ball` knows how to move around, how would I handle collision detection with the `Paddle`? Would the `Ball` need to have knowledge of the `Paddle`? In my first example, the `Game` class would have references to both the `Ball` and the `Paddle`, and then ship both of those off to some `CollisionDetection` manager or something, but how do I deal with the complexity of various components, if each individual component does everything themselves? (I hope I'm making sense.....)&#xD;&#xA;" />
  <row Id="17832" PostHistoryTypeId="1" PostId="8703" RevisionGUID="7963a859-3baa-4e19-85ee-118db144064c" CreationDate="2011-02-17T14:49:11.700" UserId="4911" Text="Seperation of drawing and logic in games" />
  <row Id="17833" PostHistoryTypeId="3" PostId="8703" RevisionGUID="7963a859-3baa-4e19-85ee-118db144064c" CreationDate="2011-02-17T14:49:11.700" UserId="4911" Text="&lt;game-design&gt;&lt;xna&gt;&lt;cocos2d-iphone&gt;&lt;design-patterns&gt;" />
  <row Id="17834" PostHistoryTypeId="5" PostId="8700" RevisionGUID="19a10b92-0000-4f8b-8683-e9193c5f2441" CreationDate="2011-02-17T14:52:04.653" UserId="364" Comment="Making sure lists are visible as bullet points" Text="[log using socket][1] (any socket wrapper can suffice) + web browser [websocket][2] =&gt; most versatile, unobtrusive logging tool possible, will gain hours of debugging and avoid eye-sore.&#xD;&#xA;&#xD;&#xA;- asyncrhonous (speed as it defers all the job on the browser)&#xD;&#xA;- formatted (color, size etc..)&#xD;&#xA;- reliable (sockets...)&#xD;&#xA;- cross-platform (browser)&#xD;&#xA;&#xD;&#xA;Now, the bonus:&#xD;&#xA;&#xD;&#xA;- dynamic filtering very easily done (using javascript regex if needed)&#xD;&#xA;- with log history, memory and compare (HTML5 spec on the &quot;in-browser&quot; database)&#xD;&#xA;- Easy way to make some graph of any data (using SVG, or canvas or anything) like [memory][3], [memory fragmentation][4], etc... &#xD;&#xA;- easy way to make some 2D graph of any data ([kd-tree subdivision][5] ? potential field ? or even just a variable value variation ? etc...)&#xD;&#xA;- allows distant logging (using the browser other computer)&#xD;&#xA;- using html5 in browser storage, you can store log session parameteres (current log filters, etc.. and even notes on each)&#xD;&#xA;- very easy to create bug report or link trac tickets just with a click&#xD;&#xA;- ability to rewind logging easily, with a [timeline gui][6] &#xD;&#xA;&#xD;&#xA;and many more task outside of logging:&#xD;&#xA;&#xD;&#xA;- allows profiler info (graphs...)&#xD;&#xA;- can even serve as console (send command from browser) or even with quick GUI using some HTML or even flash ui &#xD;&#xA;- image diff  in the browser (send image using socket, and compare in browser using canvas image pixel capabilities)&#xD;&#xA;- etc...&#xD;&#xA;&#xD;&#xA;(nearly all of the above can be done using flash sockets, save the database capabilities)&#xD;&#xA;&#xD;&#xA;Now I know it seems a bit long to set up the thing. But it really is a gain of time on long project, with hard debugging situation (such as in games.) It's the most powerful thing I used since debuggers... &#xD;&#xA;&#xD;&#xA;Note 1: the only downside =&gt; double-check side effect when debugging game networking code (impact on socket buffer size, latency, bandwidth, etc...)&#xD;&#xA;&#xD;&#xA;Note 2: some broswer deactivated by default websocket due to security reason, check about:config things to be sure it's enabled.&#xD;&#xA;&#xD;&#xA;  [1]: http://logging.apache.org/log4cxx/&#xD;&#xA;  [2]: http://dev.w3.org/html5/websockets/&#xD;&#xA;  [3]: http://cbloomrants.blogspot.com/2010/08/08-25-10-profileparser.html&#xD;&#xA;  [4]: http://j.mp/hxmJje&#xD;&#xA;  [5]: http://blackpawn.com/blog/?p=211&#xD;&#xA;  [6]: http://j.mp/gDwJUh&#xD;&#xA;" />
  <row Id="17835" PostHistoryTypeId="24" PostId="8700" RevisionGUID="f0cb7421-f6f9-4d96-9e33-f705ea97e61a" CreationDate="2011-02-17T14:52:04.653" Comment="Proposed by 364 approved by 51 edit id of 36" />
  <row Id="17836" PostHistoryTypeId="2" PostId="8704" RevisionGUID="abde7a79-35da-4f7f-9efe-26ee4e92c720" CreationDate="2011-02-17T15:00:29.533" UserId="5345" Text="I once implemented a DPad in XNA and now I'm trying to port it to android, put, I still don't get how the touch events work in android, the more I read the more confused I get.&#xD;&#xA;&#xD;&#xA;Here is the code I wrote so far, it works, but guess that it will only handle one touch point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public boolean onTouchEvent(MotionEvent event)&#xD;&#xA;        {&#xD;&#xA;            if (event.getPointerCount() == 0) &#xD;&#xA;                return true;&#xD;&#xA;             &#xD;&#xA;            int touchX = -1;&#xD;&#xA;            int touchY = -1;&#xD;&#xA;             &#xD;&#xA;            pressedDirection = DPadDirection.None;&#xD;&#xA;            int actionCode = event.getAction() &amp; MotionEvent.ACTION_MASK;&#xD;&#xA;                if (actionCode == MotionEvent.ACTION_UP)&#xD;&#xA;                {&#xD;&#xA;                    if (event.getPointerId(0) == idDPad)&#xD;&#xA;                    {&#xD;&#xA;                        pressedDirection = DPadDirection.None;&#xD;&#xA;                        idDPad = -1;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                else if (actionCode == MotionEvent.ACTION_DOWN || actionCode == MotionEvent.ACTION_MOVE)&#xD;&#xA;                {                                     &#xD;&#xA;                    touchX = (int)event.getX();&#xD;&#xA;                    touchY = (int)event.getY();&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;                    if (rightRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Right;&#xD;&#xA;                    else if (leftRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Left;&#xD;&#xA;                    else if (upRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Up;&#xD;&#xA;                    else if (downRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Down;&#xD;&#xA;     &#xD;&#xA;                    if (pressedDirection != DPadDirection.None)&#xD;&#xA;                        idDPad = event.getPointerId(0);&#xD;&#xA;    &#xD;&#xA;                }              &#xD;&#xA;    &#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The logic is:&#xD;&#xA;&#xD;&#xA;Test if there is a &quot;DOWN&quot; or &quot;MOVED&quot; event, then if one of this events collides with one of the 4 rectangles of my DPad, I set the pressedDirectin variable to the side of the touch event, then I read the DPad actual pressed direction in my Update() event on another class.&#xD;&#xA;&#xD;&#xA;The thing I'm not sure, is how do I get track of the touch points, I store the ID of the touch point which generated the diretion that is being stored (last one), so when this ID is released I set the Direction to None, but I'm really confused about how to handle this in android, here is the code I had in XNA:&#xD;&#xA;&#xD;&#xA;     public override void Update(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                PressedDirection = DpadDirection.None;&#xD;&#xA;                foreach (TouchLocation _touchLocation in TouchPanel.GetState())&#xD;&#xA;                {&#xD;&#xA;                    if (_touchLocation.State == TouchLocationState.Released)&#xD;&#xA;                    {&#xD;&#xA;                        if (_touchLocation.Id == _idDPad)&#xD;&#xA;                        {&#xD;&#xA;                            PressedDirection = DpadDirection.None;&#xD;&#xA;                            _idDPad = -1;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    else if (_touchLocation.State == TouchLocationState.Pressed || _touchLocation.State == TouchLocationState.Moved)&#xD;&#xA;                    {                                     &#xD;&#xA;                        _intersectRect.X = (int)_touchLocation.Position.X;&#xD;&#xA;                        _intersectRect.Y = (int)_touchLocation.Position.Y;&#xD;&#xA;                        _intersectRect.Width = 1;&#xD;&#xA;                        _intersectRect.Height = 1;&#xD;&#xA;     &#xD;&#xA;                        if (_intersectRect.Intersects(_rightRect))&#xD;&#xA;                            PressedDirection = DpadDirection.Right;&#xD;&#xA;                        else if (_intersectRect.Intersects(_leftRect))&#xD;&#xA;                            PressedDirection = DpadDirection.Left;&#xD;&#xA;                        else if (_intersectRect.Intersects(_upRect))&#xD;&#xA;                            PressedDirection = DpadDirection.Up;&#xD;&#xA;                        else if (_intersectRect.Intersects(_downRect))&#xD;&#xA;                            PressedDirection = DpadDirection.Down;&#xD;&#xA;     &#xD;&#xA;                        if (PressedDirection != DpadDirection.None)&#xD;&#xA;                        {&#xD;&#xA;                            _idDPad = _touchLocation.Id;&#xD;&#xA;                            continue;&#xD;&#xA;                        }&#xD;&#xA;     &#xD;&#xA;                    }              &#xD;&#xA;                }&#xD;&#xA;     &#xD;&#xA;                base.Update(gameTime);            &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, first of all: Am I doing this correctly? if not, why?&#xD;&#xA;&#xD;&#xA;I don't want my DPad to handle multiple directions, but I still didn't get how to handle the multiple touch points, is the event called for every touch point, or all touch points comes in a single call? I still don't get it.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17837" PostHistoryTypeId="1" PostId="8704" RevisionGUID="abde7a79-35da-4f7f-9efe-26ee4e92c720" CreationDate="2011-02-17T15:00:29.533" UserId="5345" Text="Understanding MotionEvent to implement a virtual DPad and Buttons on Android (Multitouch)" />
  <row Id="17838" PostHistoryTypeId="3" PostId="8704" RevisionGUID="abde7a79-35da-4f7f-9efe-26ee4e92c720" CreationDate="2011-02-17T15:00:29.533" UserId="5345" Text="&lt;java&gt;&lt;android&gt;&lt;input&gt;&lt;multitouch&gt;" />
  <row Id="17839" PostHistoryTypeId="5" PostId="8700" RevisionGUID="13f366f4-ad7d-48a4-9bd9-9696e62e1534" CreationDate="2011-02-17T15:01:17.470" UserId="2836" Comment="added 36 characters in body" Text="[log using socket][1] (any socket wrapper can suffice) + web browser [websocket][2] =&gt; most versatile, unobtrusive logging tool possible, will gain hours of debugging and avoid eye-sore.&#xD;&#xA;&#xD;&#xA;- asyncrhonous (speed as it defers all the job on the browser)&#xD;&#xA;- formatted (color, size etc..)&#xD;&#xA;- reliable (sockets...)&#xD;&#xA;- cross-platform (browser)&#xD;&#xA;&#xD;&#xA;Now, the bonus:&#xD;&#xA;&#xD;&#xA;- dynamic filtering very easily done (using javascript regex if needed)&#xD;&#xA;- with log history, memory and compare (HTML5 spec on the &quot;in-browser&quot; database)&#xD;&#xA;- Easy way to make some graph of any data (using SVG, or canvas or anything) like [memory][3], [memory fragmentation][4], etc... &#xD;&#xA;- easy way to make some 2D graph of any data ([kd-tree subdivision][5] ? potential field ? or even just a variable value variation ? etc...)&#xD;&#xA;- allows distant logging (using the browser other computer)&#xD;&#xA;- using html5 in browser storage, you can store log session parameteres (current log filters, etc.. and even notes on each)&#xD;&#xA;- very easy to create bug report or link trac tickets just with a click&#xD;&#xA;- ability to rewind logging easily, with a [timeline gui][6] &#xD;&#xA;&#xD;&#xA;and many more task outside of logging:&#xD;&#xA;&#xD;&#xA;- allows profiler info (graphs...)&#xD;&#xA;- can even serve as console (send command from browser) or even with quick GUI using some HTML or even flash ui &#xD;&#xA;- image diff  in the browser (send image using socket, and compare in browser using canvas image pixel capabilities)&#xD;&#xA;- etc...&#xD;&#xA;&#xD;&#xA;(nearly all of the above can be done using flash sockets, save the database capabilities)&#xD;&#xA;&#xD;&#xA;Now I know it seems a bit long to set up the thing. But it really is a gain of time on long project, with hard debugging situation (such as in games.) It's the most powerful thing I used since debuggers... &#xD;&#xA;&#xD;&#xA;Note 1: the only downside =&gt; double-check side effect when debugging game networking code (impact on socket buffer size, latency, bandwidth, etc...)&#xD;&#xA;&#xD;&#xA;Note 2: some broswer deactivated by default websocket due to security reason, check about:config things to be sure it's enabled.&#xD;&#xA;&#xD;&#xA;  [1]: http://logging.apache.org/log4cxx/&#xD;&#xA;  [2]: http://dev.w3.org/html5/websockets/&#xD;&#xA;  [3]: http://cbloomrants.blogspot.com/2010/08/08-25-10-profileparser.html&#xD;&#xA;  [4]: http://blackpawn.com/blog/?p=305&#xD;&#xA;  [5]: http://blackpawn.com/blog/?p=211&#xD;&#xA;  [6]: http://code.google.com/p/simile-widgets/&#xD;&#xA;" />
  <row Id="17840" PostHistoryTypeId="2" PostId="8705" RevisionGUID="8ccddf7b-5efc-41b0-b8bb-364876bbee88" CreationDate="2011-02-17T15:24:04.313" UserDisplayName="slcpfmmm" Text="There are no explicit rules you -have- to follow when programming games. I find both patterns perfectly acceptable, as long as you follow the same design pattern all over your game. You'd be surprised that there are many more design patterns for games, several of which are not even on top of OOP.&#xD;&#xA;&#xD;&#xA;Now, onto my personal preference, I prefer separating code by behavior (one class/thread to draw, another to update), while having minimalist objects. I find it easier to parallelize, and I often find myself working on fewer files at the same time. I'd say this is more a procedural way of doing things.&#xD;&#xA;&#xD;&#xA;But if you come from the business world, you're probably more comfortable around writing classes that know how to do everything for themselves.&#xD;&#xA;&#xD;&#xA;Once again, I recommend you write what you feel is most natural to you." />
  <row Id="17841" PostHistoryTypeId="2" PostId="8706" RevisionGUID="a26aa95e-fef9-418c-83cb-b177cdb373c6" CreationDate="2011-02-17T15:32:00.730" UserDisplayName="user5517" Text="I'm a relatively good programmer but now that it comes to add some basic levels to my 2D game I'm kinda stuck.&#xD;&#xA;&#xD;&#xA;What I want to do: An acceptable, large (8000 * 1000 pixels) &quot;green hills&quot; test level for my game.&#xD;&#xA;&#xD;&#xA;- What is the best way for me to do this?&#xD;&#xA;&#xD;&#xA;It doesn't have to look great, it just shouldn't look like it was made in MS paint with the line and paint bucket tool.&#xD;&#xA;&#xD;&#xA;Basically it should just mud with grass on top of it, shaped in some form of hills.&#xD;&#xA;&#xD;&#xA;But how should I draw it, I can't just take out the pencil tool and start drawing it pixel per pixel, can I?" />
  <row Id="17842" PostHistoryTypeId="1" PostId="8706" RevisionGUID="a26aa95e-fef9-418c-83cb-b177cdb373c6" CreationDate="2011-02-17T15:32:00.730" UserDisplayName="user5517" Text="Drawing large 2D sidescroller level terrain" />
  <row Id="17843" PostHistoryTypeId="3" PostId="8706" RevisionGUID="a26aa95e-fef9-418c-83cb-b177cdb373c6" CreationDate="2011-02-17T15:32:00.730" UserDisplayName="user5517" Text="&lt;2d&gt;&lt;level-design&gt;&lt;side-scroller&gt;" />
  <row Id="17845" PostHistoryTypeId="2" PostId="8708" RevisionGUID="019c61c4-be8e-45d1-96a1-ad9d46d3001f" CreationDate="2011-02-17T15:35:38.417" UserId="5259" Text="If you don't mind it looking a little boring, you could just draw a bunch of circles of varying sizes along a flat line (your ground plane) and flood fill them in. Then you can go back and draw a brown box covering the &quot;underground&quot; portion of the map, and then add in little touches of ground to meet the top curves of the circle. Then you could do a detail pass to add grass or whatever (very easy if you have Photoshop with the different brushes).&#xD;&#xA;&#xD;&#xA;That help?" />
  <row Id="17846" PostHistoryTypeId="2" PostId="8709" RevisionGUID="48d63b2e-9b8e-4a89-8211-aa00aa37fe2d" CreationDate="2011-02-17T15:37:57.047" UserId="259" Text="Sorry haven't got a tried-and-tested solution, but can this not be solved mathmatically?&#xD;&#xA;&#xD;&#xA;Given any propeller and its offset from the center of mass, you can compute what plane you can rotate in. &#xD;&#xA;&#xD;&#xA;For any movement, you can use 1 or more propellers. Each propeller can be queried to see whether its plane can contribute to the target orientation, how much effort it would take from the propeller to contribute (propellers far from the CoM can use less energy to generate more turn), and how close that would get you to the target oritentation. Then you A* across that search space until you come up with a solution with low cost, which could be least total energy used or fastest movement. &#xD;&#xA;&#xD;&#xA;Keep reevaluating that as you complete the turn and moderate power as you approach the target, maybe with a PID controller.&#xD;&#xA;&#xD;&#xA;For forward movement, a simple solution would drive you always forwards, dropping your target speed as you approach the target. As you've got 3D space to play in you can avoid complicated 3-point turn routines.  You'd need to factor the output from the propellers chosen for straight-line speed into your turning calculations, as some kind of initial state.&#xD;&#xA;&#xD;&#xA;This is very back-of-the-envelope but I don't see any major flaws. Just lots of hard work and number tweaking. :)" />
  <row Id="17848" PostHistoryTypeId="2" PostId="8711" RevisionGUID="8889f7f4-da3b-4138-90b4-abc1d071d9fc" CreationDate="2011-02-17T15:56:58.737" UserId="1198" Text="I would highly recommend you grab a copy of [Paint.NET][1] its free, and 100x better than MS Paint -- its got some basic tools to facilitate generating art in the sense you are looking for. &#xD;&#xA;&#xD;&#xA;It will, for example, allow you to make a selection and fill the entire selection with a given color/gradient, this will save you from using the pen tool and drawing pixel by pixel.&#xD;&#xA;&#xD;&#xA;Its not even close to photoshop, but its excellent for this type of use-case, where you are looking for basic style art.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.getpaint.net/" />
  <row Id="17849" PostHistoryTypeId="2" PostId="8712" RevisionGUID="d1c755d9-826a-4b39-870a-cacc80a61aba" CreationDate="2011-02-17T16:00:35.077" UserId="5259" Text="&gt; My question is, is this right? Is this the pattern that people use in game development?&#xD;&#xA;&#xD;&#xA;Game developers tend to use whatever works. It's not rigorous, but hey, it ships.&#xD;&#xA;&#xD;&#xA;&gt; It somehow goes against everything I'm used to, to have my Ball class do everything. &#xD;&#xA;&#xD;&#xA;So, a more generalized idiom for what you have there is handleMessages/update/draw. In systems that make heavy use of messages (which has pros and cons as you would expect) a game entity grabs whatever messages it cares about, performs logic on those messages, and then draws itself.&#xD;&#xA;&#xD;&#xA;Note that that draw() call might not actually mean that the entity calls putPixel or whatever inside itself; in some cases, it could just mean updating data that is later polled by the code responsible for drawing. In more advanced cases, it &quot;draws&quot; itself by calling methods exposed by a renderer. In the tech I'm working on right now, the object would draw itself using renderer calls and then every frame the rendering thread organizes all calls made by all objects, optimizes for things like state changes, and then draws the entire thing out (all of this happening on a thread separate from the game logic, so we get asynchronous rendering).&#xD;&#xA;&#xD;&#xA;The delegation of responsibility is up to the programmer; for a simple pong game, it makes sense that each object handles its own drawing (complete with low-level calls) completely. It's a matter of style and wisdom.&#xD;&#xA;&#xD;&#xA;&gt;Furthermore, in this second example, where my Ball knows how to move around, how would I handle collision detection with the Paddle? Would the Ball need to have knowledge of the Paddle?&#xD;&#xA;&#xD;&#xA;So, one natural way of solving the problem here is to have every object take every other object as some sort of parameter for checking collisions. This scales poorly, and can have weird results.&#xD;&#xA;&#xD;&#xA;Having each class implement some sort of Collidable interface and then having a high-level bit of code that just loops over all Collidable objects in the update phase of your game and handles collisions, setting the object positions as needed.&#xD;&#xA;&#xD;&#xA;Again, you just have to develop a sense (or make up your mind) on how responsibility for different things in your game needs to be delegated. Rendering is a solitary activity and can be handled by an object in a vacuum; collision and physics generally can't.&#xD;&#xA;&#xD;&#xA;&gt;In my first example, the Game class would have references to both the Ball and the Paddle, and then ship both of those off to some CollisionDetection manager or something, but how do I deal with the complexity of various components, if each individual component does everything themselves?&#xD;&#xA;&#xD;&#xA;See the above for an exploration of this. If you are in a language that supports interfaces easily (i.e., Java, C#), this is easy. If you are in C++, this can be... interesting. I'm a favor of using messaging to solve these issues (classes handle messages they can, ignore others), some other folks like component composition.&#xD;&#xA;&#xD;&#xA;Again, whatever works and is easiest for you." />
  <row Id="17850" PostHistoryTypeId="2" PostId="8713" RevisionGUID="116e0412-3dc9-420c-85d2-46ce31226579" CreationDate="2011-02-17T16:03:12.997" UserId="1923" Text="the 'Ball' object has attributes &amp; behaviors. I find it makes sense to include the object's unique  attributes &amp; behaviors in their own class. The way a Ball object updates is different from the way a paddle would update so it makes sense that these are unique behaviors warranting being included it the class. Same with drawing. There often are unique difference in the way a paddle is drawn vs a Ball and I find it easier to modify the draw method of an individual object to suit these needs than work out conditional evaluations in another class to resolve them.&#xD;&#xA;&#xD;&#xA;Pong is a relatively simple game in terms of number of objects &amp; behaviors but when you get into the dozens or hundreds of unique game objects you might find your 2nd example a bit easier to modularize everything.&#xD;&#xA;&#xD;&#xA;Most folks do use an input class whose results are available to all the game objects through either a Service or a static class. &#xD;&#xA;" />
  <row Id="17852" PostHistoryTypeId="2" PostId="8714" RevisionGUID="8844271b-ad73-4b26-924e-29d3d65ac899" CreationDate="2011-02-17T16:27:36.460" UserId="20" Text="Photoshop has layer-effects which can be used to draw good looking levels really fast. I don't know if that would work with GIMP, but here are some steps how to get something on screen fast using Photoshop:&#xD;&#xA;&#xD;&#xA;##Instructions##&#xD;&#xA;&#xD;&#xA; 1. Get some dirt and grass textures. The one I'm using in my example are from this [freetexture set][1].&#xD;&#xA; 2. Open a dirt texture in Photoshop. Select all &lt;kbd&gt;Ctrl-A&lt;/kbd&gt; and copy &lt;kbd&gt;Ctrl-C&lt;/kbd&gt;. Then select `Edit &gt; Define Pattern...` from the Menu. Name your Pattern &quot;Dirt&quot;.&#xD;&#xA; 3. Do the same for the Grass texture, name it &quot;Grass&quot;.&#xD;&#xA; 4. Create a new Layer in Photoshop and apply the `Pattern Overlay` and `Stroke` Effect to your layer. Select the &quot;Dirt&quot; pattern for the overlay and the &quot;Grass&quot; pattern for your Stroke (see images below).&#xD;&#xA; 5. Paint with any brush on your layer... instead of having a boring single color, it should render as a landscape, thanks to the layer effects. The beauty of this is, that you can freely add/remove parts of your landscape by using regular drawing tools like the brush or eraser.&#xD;&#xA; 6. *(optional)* Draw a gradient from dark blue (top) to light blue (bottom) on the background layer for your sky (you could also use layer-effects for that).&#xD;&#xA; 7. *(optional)* Add some more layer-effects like a gradient and drop-shadow to your &quot;landscape&quot; layer in order to achieve a better look.&#xD;&#xA;&#xD;&#xA;##Images##&#xD;&#xA;&#xD;&#xA;###Pattern Overlay settings###&#xD;&#xA;![Photoshop pattern overlay settings][2]&#xD;&#xA;&#xD;&#xA;###Stroke settings###&#xD;&#xA;![Photoshop stroke settings][3]&#xD;&#xA;&#xD;&#xA;###Final result###&#xD;&#xA;With some more layer effects and a background.&#xD;&#xA;&#xD;&#xA;![final image][4]&#xD;&#xA;&#xD;&#xA;You can also download the PSD file [here][5] to have a look at it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opengameart.org/content/wall-grass-rock-stone-wood-and-dirt-480&#xD;&#xA;  [2]: http://i.stack.imgur.com/2oVMj.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/dwXDu.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/uG572.jpg&#xD;&#xA;  [5]: http://www.filesavr.com/AWG0GR75X2ULVN8" />
  <row Id="17853" PostHistoryTypeId="2" PostId="8715" RevisionGUID="7c9e4fc7-3a1c-4642-9efe-004f6766b6fa" CreationDate="2011-02-17T16:48:14.147" UserId="4662" Text="It's worth noting the similarities between commercial games from the same creator, but after the rights were lost. Compare Total Annihilation and Supreme Commander, for example, which are exceedingly similar games from Chris Taylor after he lost the TA rights.&#xD;&#xA;&#xD;&#xA;I personally would start by looking at the significant differences, rather than the obvious similarities. If the game is significantly different, you can probably escape, even if they have a lot in common." />
  <row Id="17854" PostHistoryTypeId="2" PostId="8716" RevisionGUID="ed4447a7-6888-4b97-88d7-e870a6327ef6" CreationDate="2011-02-17T17:11:50.427" UserId="5520" Text="I recently made a simple Space Invadors game using an 'entity system'.  It's a pattern that separates attributes and behaviours extremely well.  It took me a few iterations to fully understand it, but once you get a few components designed it becomes extremely simples to compose new objects using your existing components.&#xD;&#xA;&#xD;&#xA;You should read this:&#xD;&#xA;&#xD;&#xA;http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/&#xD;&#xA;&#xD;&#xA;It's updated frequently by an extremely knowledgable guy.  It's also the only entity system discussion with concrete code examples.&#xD;&#xA;&#xD;&#xA;My iterations went as follows:&#xD;&#xA;&#xD;&#xA;The first iteration had an &quot;EntitySystem&quot; object which was as Adam describes; however my components still had methods- my 'renderable' component had a paint() method, and my position component had a move() method and etc.  When I began to flesh out the entities I realized that I needed to start passing message between components and ordering the execution of components updates....way too messy.&#xD;&#xA;&#xD;&#xA;So, I went back and re-read T-machines blog.  There is a lot of information in the comment threads- and in them he really emphasizes that components do *not* have behaviours- behaviours are provided by the entity systems.  In this way you do not need to pass messages between components and order component updates because the ordering is determined by the *global* order of system execution.  Ok.  Maybe that's too abstract.&#xD;&#xA;&#xD;&#xA;Anyway for iteration #2 this is what I gleaned from the blog:&#xD;&#xA;&#xD;&#xA;EntityManager - acts as the component &quot;database&quot;, which can be queried for entities which contain certain types of components.  This can even be backed by an in-memory database for speedy access...see t-machine part 5 for more info.&#xD;&#xA;&#xD;&#xA;EntitySystem - Each system is essentially just a method which operates on a set of entites.  Each system will use component x,y and z of an entity to get it's work done.  So you would query the manager for entities with components x,y and z then pass that result to the system.&#xD;&#xA;&#xD;&#xA;Entity - just an id, like a long.  The entity is what groups a set of components instances together into an 'entity'.&#xD;&#xA;&#xD;&#xA;Component - a set of fields....no behaviours!  when you start adding behaviours it starts to get messy...even in a simple Space Invadors game.&#xD;&#xA;&#xD;&#xA;**Edit**: by the way, 'dt' is the delta time since the last main loop invocation&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So my main Invadors loop is this:&#xD;&#xA;&#xD;&#xA;    Collection&lt;Entity&gt; entitiesWithGuns = manager.getEntitiesWith(Gun.class);&#xD;&#xA;    Collection&lt;Entity&gt; entitiesWithDamagable =&#xD;&#xA;    manager.getEntitiesWith(BulletDamagable.class);&#xD;&#xA;    Collection&lt;Entity&gt; entitiesWithInvadorDamagable = manager.getEntitiesWith(InvadorDamagable.class);&#xD;&#xA;    &#xD;&#xA;    keyboardShipControllerSystem.update(entitiesWithGuns, dt);&#xD;&#xA;    touchInputSystem.update(entitiesWithGuns, dt);&#xD;&#xA;    Collection&lt;Entity&gt; entitiesWithInvadorMovement = manager.getEntitiesWith(InvadorMovement.class);&#xD;&#xA;    invadorMovementSystem.update(entitiesWithInvadorMovement);&#xD;&#xA;    &#xD;&#xA;    Collection&lt;Entity&gt; entitiesWithVelocity = manager.getEntitiesWith(Velocity.class);&#xD;&#xA;    movementSystem.move(entitiesWithVelocity, dt);&#xD;&#xA;    gunSystem.update(entitiesWithGuns, System.currentTimeMillis());&#xD;&#xA;    Collection&lt;Entity&gt; entitiesWithPositionAndForm = manager.getEntitiesWith(Position.class, Form.class);&#xD;&#xA;    collisionSystem.checkCollisions(entitiesWithPositionAndForm);&#xD;&#xA;&#xD;&#xA;It looks a little weird at first, but it's incredibly flexible.  It's also very easy to optimize; for different component types you can have different backing datastores to make retrieval faster.  For the 'form' class you can have it backed with a quadtree to speed access for collision detection.&#xD;&#xA;&#xD;&#xA;I'm like you; I'm a seasoned developer but had no experience writing games.  I spent a some time researching gave dev patterns, and this one caught my eye.  It is in no way the only way to do things, but I've found it very intuitive and robust.  I believe the pattern was officially discussed in book 6 of the series &quot;Game Programming Gems&quot; - http://www.amazon.com/Game-Programming-Gems/dp/1584500492.  I haven't read any of the books myself but I hear they are the de-facto reference for game programming." />
  <row Id="17855" PostHistoryTypeId="25" PostId="8706" RevisionGUID="9797b70a-a77f-4d83-90a2-b42da2a2eccf" CreationDate="2011-02-17T17:22:44.010" Comment="http://twitter.com/#!/StackGameDev/status/38287239087796224" />
  <row Id="17857" PostHistoryTypeId="2" PostId="8717" RevisionGUID="79e3d27f-8067-458a-9b81-9092d64ae811" CreationDate="2011-02-17T17:53:06.323" UserId="1363" Text="There is some good tips &#xD;&#xA;[HERE][1] and more info.&#xD;&#xA;&#xD;&#xA;1. Do Something You Love Doing / Spending Time On Your Hobbies&#xD;&#xA;2. Take a Break&#xD;&#xA;3. Spend Time with Others&#xD;&#xA;4. Change Surroundings&#xD;&#xA;5. Read Magazines, Books, Websites&#xD;&#xA;6. Inspirational Websites and Galleries&#xD;&#xA;7. Browse Portfolios&#xD;&#xA;8. Visit a Creative Showcase (art, theatre, etc)&#xD;&#xA;9. Travel&#xD;&#xA;10. Work Out / Stay Active&#xD;&#xA;11. Evaluate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.onextrapixel.com/2011/02/17/stuck-in-a-design-block-how-to-get-out-of-it/" />
  <row Id="17858" PostHistoryTypeId="16" PostId="8499" RevisionGUID="0e261dad-901f-4e73-b7b3-088b37bbc255" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17859" PostHistoryTypeId="16" PostId="8528" RevisionGUID="67971a08-9eeb-4fe6-8e34-8d5185c73b94" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17860" PostHistoryTypeId="16" PostId="8552" RevisionGUID="408a1f91-a0a8-47a1-944c-69bd98911406" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17861" PostHistoryTypeId="16" PostId="8553" RevisionGUID="b5b807e4-be60-431b-8360-2973ed304215" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17862" PostHistoryTypeId="16" PostId="8611" RevisionGUID="673fbf0b-fe59-403e-8ab4-d80e3d58f399" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17863" PostHistoryTypeId="16" PostId="8717" RevisionGUID="55e7117a-f593-4dab-84b2-4eae492c0787" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17864" PostHistoryTypeId="16" PostId="8481" RevisionGUID="a1d820f7-343b-49cf-8329-fa41b0d07656" CreationDate="2011-02-17T18:23:34.853" UserId="14" />
  <row Id="17865" PostHistoryTypeId="2" PostId="8718" RevisionGUID="15bbe067-22df-4f64-af0f-c27aafaffc1b" CreationDate="2011-02-17T18:43:07.743" UserId="3563" Text="In a GLSL fragment shader I am trying to cast a float into an int. The compiler has other ideas. It complains thusly:&#xD;&#xA;&#xD;&#xA;    ERROR: 0:60: '=' :  cannot convert from 'mediump float' to 'highp int'&#xD;&#xA;&#xD;&#xA;I am trying to do this:&#xD;&#xA;&#xD;&#xA;	mediump float indexf = floor(2.0 * mixer);&#xD;&#xA;	highp int index = indexf;&#xD;&#xA;&#xD;&#xA;I (vainly) tried to raise the precision of the int above the float to appease the GL Gods but no joy.&#xD;&#xA;&#xD;&#xA;Could someone please school me here?&#xD;&#xA;&#xD;&#xA;Thanks,  &#xD;&#xA;Doug&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17866" PostHistoryTypeId="1" PostId="8718" RevisionGUID="15bbe067-22df-4f64-af0f-c27aafaffc1b" CreationDate="2011-02-17T18:43:07.743" UserId="3563" Text="GLSL: How Do I cast a float into an int?" />
  <row Id="17867" PostHistoryTypeId="3" PostId="8718" RevisionGUID="15bbe067-22df-4f64-af0f-c27aafaffc1b" CreationDate="2011-02-17T18:43:07.743" UserId="3563" Text="&lt;opengl-es&gt;&lt;glsl&gt;" />
  <row Id="17868" PostHistoryTypeId="2" PostId="8719" RevisionGUID="7bae5f1d-f1c3-4f2b-9bd1-2a48989eab5e" CreationDate="2011-02-17T18:47:26.917" UserId="189" Text="Try this:&#xD;&#xA;&#xD;&#xA;    highp int index = int(indexf);&#xD;&#xA;&#xD;&#xA;I found it [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gpgpu.org/forums/viewtopic.php?t=4857" />
  <row Id="17869" PostHistoryTypeId="2" PostId="8720" RevisionGUID="222c137f-bcc8-4274-bec8-2ad1ca3fbe6d" CreationDate="2011-02-17T19:29:13.320" UserId="2229" Text="Say, I send 10 polygon pairs *(one polygon pair == one 2d sprite == one rectangle == two triangles)* into **OpenGL ES 2.0 VBO**. The 10 polygon pairs represent **one animated 2D object** consisting of 10 frames.&#xD;&#xA;&#xD;&#xA;The 10 frames, of course, can not be rendered all at the same time, but will be rendered in particular order to make up smooth animation. &#xD;&#xA;&#xD;&#xA;Would you have an advice, **how to pick up proper polygon pair for rendering** (4 vertices) inside Vertex Shader from the VBO?  Creating separate VBO for each frame would end up with thousands of VBOs, which is not the right way of doing it. &#xD;&#xA;&#xD;&#xA;I use OpenGL ES 2.0, and VBOs for both Vertices and Indices." />
  <row Id="17870" PostHistoryTypeId="1" PostId="8720" RevisionGUID="222c137f-bcc8-4274-bec8-2ad1ca3fbe6d" CreationDate="2011-02-17T19:29:13.320" UserId="2229" Text="OpenGL ES 2.0: Filtering Polygons within VBO" />
  <row Id="17871" PostHistoryTypeId="3" PostId="8720" RevisionGUID="222c137f-bcc8-4274-bec8-2ad1ca3fbe6d" CreationDate="2011-02-17T19:29:13.320" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;graphics-programming&gt;" />
  <row Id="17872" PostHistoryTypeId="2" PostId="8721" RevisionGUID="f8867982-303b-43a6-9db8-a83128375233" CreationDate="2011-02-17T19:50:17.453" UserId="4947" Text="If you use [glDrawElements][1], you should be able to define offset. If you have bound indeces with glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indices), last parameter in glDrawElements is just offset. So you can start from anywhere and stop after few indeces (second parameter - count).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/glDrawElements.xml" />
  <row Id="17873" PostHistoryTypeId="2" PostId="8722" RevisionGUID="50421cc8-3264-439c-a2ec-40789c1b16f3" CreationDate="2011-02-17T20:16:17.570" UserId="5091" Text="Im developing a flash game and I'd like to know how much info can I store in a browser cookie.&#xD;&#xA;&#xD;&#xA;The game is simple, but it needs to store several variables in order to save all the details of your current progress.&#xD;&#xA;&#xD;&#xA;The game is only one swf file, no server, no nothing.&#xD;&#xA;&#xD;&#xA;I need to know how should I use the cookies to achieve this, and if they have the posibility of doing it, of course.&#xD;&#xA;&#xD;&#xA;(several = 200 variables i.e)" />
  <row Id="17874" PostHistoryTypeId="1" PostId="8722" RevisionGUID="50421cc8-3264-439c-a2ec-40789c1b16f3" CreationDate="2011-02-17T20:16:17.570" UserId="5091" Text="How much info can I store in a cookie?" />
  <row Id="17875" PostHistoryTypeId="3" PostId="8722" RevisionGUID="50421cc8-3264-439c-a2ec-40789c1b16f3" CreationDate="2011-02-17T20:16:17.570" UserId="5091" Text="&lt;game-design&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;swf&gt;&lt;game&gt;" />
  <row Id="17876" PostHistoryTypeId="2" PostId="8723" RevisionGUID="ece59109-9b88-4737-b65a-28e9ea66e5b6" CreationDate="2011-02-17T20:21:23.357" UserId="189" Text="It is important to note that Flash cookies (or Local Shared Objects, as they are called) are different from browser cookies stored by webpages and JavaScript.&#xD;&#xA;&#xD;&#xA;From the [Wikipedia article][1] on Local Shared Objects:&#xD;&#xA;&#xD;&#xA;&gt; By default, a Flash application may&#xD;&#xA;&gt; store up to 100kb of data to user's&#xD;&#xA;&gt; hard drive (browser cookies have a&#xD;&#xA;&gt; limit of just 4kb). The defined&#xD;&#xA;&gt; storage sizes are 0kb, 10kb, 100kb,&#xD;&#xA;&gt; 1Mb, 10Mb, and Unlimited. If the&#xD;&#xA;&gt; current limit is exceeded, the user is&#xD;&#xA;&gt; shown a dialog requesting storage&#xD;&#xA;&gt; space of the next size. The user may&#xD;&#xA;&gt; override the amount manually by&#xD;&#xA;&gt; clicking the Flash application with&#xD;&#xA;&gt; right mouse button and selecting&#xD;&#xA;&gt; Settings; however, this applies only&#xD;&#xA;&gt; to the domain of the Flash movie. If&#xD;&#xA;&gt; the selected setting is smaller than&#xD;&#xA;&gt; the current data size, the data is&#xD;&#xA;&gt; deleted.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Local_Shared_Object" />
  <row Id="17877" PostHistoryTypeId="2" PostId="8724" RevisionGUID="74192ad7-c69f-4852-8a11-5d231bb68fc5" CreationDate="2011-02-17T20:22:30.607" UserId="395" Text="Browser cookies are generally limited to 4k, Flash LSOs default to 100k but the user and raise or lower this I think: http://en.wikipedia.org/wiki/Local_Shared_Object" />
  <row Id="17878" PostHistoryTypeId="25" PostId="8718" RevisionGUID="66aa3182-3f00-47df-9eb9-f5da891fe0a6" CreationDate="2011-02-17T20:22:44.440" Comment="http://twitter.com/#!/StackGameDev/status/38332540477644800" />
  <row Id="17879" PostHistoryTypeId="2" PostId="8725" RevisionGUID="b7af38f2-7897-4dca-863f-36e9303e4cc0" CreationDate="2011-02-17T20:36:57.023" UserId="4129" Text="One approach is to use a shader to interpolate frames, so you get smooth animation and possibly less data.&#xD;&#xA;&#xD;&#xA;Look at this question and its answers: http://gamedev.stackexchange.com/questions/6711/interpolating-frames-in-a-vertex-shader" />
  <row Id="17880" PostHistoryTypeId="2" PostId="8726" RevisionGUID="48a7c445-ed6c-4c9e-b2a7-54824786dd57" CreationDate="2011-02-17T21:36:05.053" UserId="5524" Text="Hey all. I got a rather inspired after playing gaia online's zOMG and wanted to revive an old project idea I've had laying around for a few years now.&#xD;&#xA;&#xD;&#xA;I'm looking to work with html5 (ie canvas, svg based sprites, &amp; WebGL) to build a graphical web based MUD/MMO. Obviously, this is a new take on an old idea and after searching google I haven't really turned up many good resources. But does anyone have any tutorials or other resources to point me in the right direction?" />
  <row Id="17881" PostHistoryTypeId="1" PostId="8726" RevisionGUID="48a7c445-ed6c-4c9e-b2a7-54824786dd57" CreationDate="2011-02-17T21:36:05.053" UserId="5524" Text="Are there any good html 5 mmo design tutorials?" />
  <row Id="17882" PostHistoryTypeId="3" PostId="8726" RevisionGUID="48a7c445-ed6c-4c9e-b2a7-54824786dd57" CreationDate="2011-02-17T21:36:05.053" UserId="5524" Text="&lt;mmo&gt;&lt;game-mechanics&gt;&lt;tutorials&gt;&lt;canvas&gt;&lt;webgl&gt;" />
  <row Id="17884" PostHistoryTypeId="2" PostId="8727" RevisionGUID="2aaa758d-b010-4ccf-a5ac-41430d3439d9" CreationDate="2011-02-17T22:53:43.143" UserId="4638" Text="This is what I am trying to achieve: A given image would occupy say 3/4th height of the screen. The remaining 1/4th area would be a reflection of it with some waves (water effect) on it.&#xD;&#xA;&#xD;&#xA;I'm not sure how to do this. But here's my approach:&#xD;&#xA;&#xD;&#xA;- render the given texture to another texture called mirror texture (maybe FBOs can help me?)&#xD;&#xA;- invert mirror texture (scale it by -1 along Y)&#xD;&#xA;- render mirror texture at height = 3/4 of the screen&#xD;&#xA;- add some sense of noise to it OR using pixel shader and time, put pixel.z = sin(time) to make it wavy&#xD;&#xA;&#xD;&#xA;(Tech: C++/OpenGL/glsl)&#xD;&#xA;&#xD;&#xA;Is my approach correct ? Is there a better way to do this ? Also, can someone please recommend me if using FrameBuffer Objects would be the right thing here ?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="17885" PostHistoryTypeId="1" PostId="8727" RevisionGUID="2aaa758d-b010-4ccf-a5ac-41430d3439d9" CreationDate="2011-02-17T22:53:43.143" UserId="4638" Text="how to add water effect to an image" />
  <row Id="17886" PostHistoryTypeId="3" PostId="8727" RevisionGUID="2aaa758d-b010-4ccf-a5ac-41430d3439d9" CreationDate="2011-02-17T22:53:43.143" UserId="4638" Text="&lt;opengl&gt;&lt;rendering&gt;&lt;glsl&gt;" />
  <row Id="17887" PostHistoryTypeId="2" PostId="8728" RevisionGUID="7a97d535-71f1-4d16-9b60-de4dfe02eeb6" CreationDate="2011-02-17T23:10:08.810" UserId="744" Text="No. There are not good tutorials to make MMOs for the languages and environments that MMOs have actually been written in. There are certainly not tutorials for languages and environments that barely work as is." />
  <row Id="17888" PostHistoryTypeId="25" PostId="8722" RevisionGUID="3d854171-7de2-4a52-9fcc-e65c805e130f" CreationDate="2011-02-17T23:22:44.713" Comment="http://twitter.com/#!/StackGameDev/status/38377840814592000" />
  <row Id="17889" PostHistoryTypeId="2" PostId="8729" RevisionGUID="7350cfe0-f3e6-4aed-a5ac-cbcf270c6aab" CreationDate="2011-02-17T23:26:37.000" UserId="2946" Text="Personally, I find this line is when the game that uses concepts from another game doesn't include anything new at all, and is generally worse than the original game. A homage should almost exactly replicate the original game, lest with some fixes or different content; a parody should do the same, except possibly exaggerate some flaws in the game. Finally, a ripoff is something that tries so hard to be another game, yet doesn't really achieve it. The developers have tried to add something new to the mix, yet it isn't very original." />
  <row Id="17891" PostHistoryTypeId="6" PostId="8722" RevisionGUID="adbef86c-a7eb-4a37-9139-2dc5ef0698bc" CreationDate="2011-02-18T00:09:29.450" UserId="182" Comment="has nothing to do with game design" Text="flashactionscript-3swfgame" />
  <row Id="17892" PostHistoryTypeId="24" PostId="8722" RevisionGUID="64580433-cc98-450f-9529-a9b425360010" CreationDate="2011-02-18T00:09:29.450" Comment="Proposed by 182 approved by 51 edit id of 39" />
  <row Id="17893" PostHistoryTypeId="25" PostId="8703" RevisionGUID="5e9ffd38-f632-4e7f-8af4-72f26f0e43fd" CreationDate="2011-02-18T02:22:44.557" Comment="http://twitter.com/#!/StackGameDev/status/38423137804615680" />
  <row Id="17894" PostHistoryTypeId="2" PostId="8730" RevisionGUID="b8ad44f5-1a17-49b2-9100-ab497a9d1df3" CreationDate="2011-02-18T02:34:18.760" UserId="953" Text="Many platformers and games of all kinds use a tile-based level system, where each level is made up of a grid of tiles, sometimes in multiple layers.  You might have several &quot;grass surface&quot; tiles, several mud tiles, and so on.  Then, instead of drawing a huge image, you lay the tiles out into a map.  It tends to save on texture space, among other things.&#xD;&#xA;&#xD;&#xA;More advanced 2D games take a similar approach, but with large &quot;stamps&quot; that can be freely moved, rotated, and/or scaled to make up a level and aren't stuck to a grid like in the tile-based technique.  *Aquaria* uses this method." />
  <row Id="17895" PostHistoryTypeId="2" PostId="8731" RevisionGUID="0f0f48c0-1174-4f77-9402-9add0f7061f2" CreationDate="2011-02-18T03:51:24.363" UserId="2332" Text="You can find a nice looking water tutorial [here][1] and check out [this link][2] for screenshots of the effect. There are a number of ocean shaders that you can have a look at for a more realistic water effect than a sine wave.&#xD;&#xA;&#xD;&#xA;There's lot of papers, articles, shaders etc [here][3] which ranges from fairly intermediate to advanced, and they use OpenGL and GLSL.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bonzaisoftware.com/water_tut.html&#xD;&#xA;  [2]: http://www.bonzaisoftware.com/wfs.html&#xD;&#xA;  [3]: http://www.vterrain.org/Water/" />
  <row Id="17896" PostHistoryTypeId="2" PostId="8732" RevisionGUID="8724a503-cd17-4b04-beb9-cfc3a8872c03" CreationDate="2011-02-18T04:31:18.883" UserId="892" Text="To make localizing easier, I'm using icons to show in-game information like achievements and bonuses. Coming up with good designs isn't easy, especially when it has to be integrated into the rest of the game's art style.&#xD;&#xA;&#xD;&#xA;Can I do better than looking at some random selection of existing games?&#xD;&#xA;&#xD;&#xA;Are there any reference books or sites that cover game graphics specifically?&#xD;&#xA;&#xD;&#xA;I'm looking for more theory and best-practices rather than pre-made graphics." />
  <row Id="17897" PostHistoryTypeId="1" PostId="8732" RevisionGUID="8724a503-cd17-4b04-beb9-cfc3a8872c03" CreationDate="2011-02-18T04:31:18.883" UserId="892" Text="Any technical references for game-oriented icons and symbols?" />
  <row Id="17898" PostHistoryTypeId="3" PostId="8732" RevisionGUID="8724a503-cd17-4b04-beb9-cfc3a8872c03" CreationDate="2011-02-18T04:31:18.883" UserId="892" Text="&lt;best-practices&gt;&lt;graphics-design&gt;" />
  <row Id="17899" PostHistoryTypeId="25" PostId="8727" RevisionGUID="54d5b827-272b-412e-bb91-c3492ed335a9" CreationDate="2011-02-18T05:22:44.317" Comment="http://twitter.com/#!/StackGameDev/status/38468435696418817" />
  <row Id="17900" PostHistoryTypeId="2" PostId="8733" RevisionGUID="462bad76-2cbe-4729-85e3-1f54de463bbe" CreationDate="2011-02-18T05:55:39.320" UserId="458" Text="Try looking at turn-based strategy games like the old Might&amp;Magic or Civilization games, which can display a large number of armies on tiles.&#xD;&#xA;&#xD;&#xA;Note that in the early Final Fantasy games, the only reason there were only a few enemies is that the enemy sprites were drawn so much larger than the player sprites. Reduce the size of the enemies and it's easier to cram them all in there (at the expense of having them be less recognizable, so your artist would have to put in extra work to make them really distinctive).&#xD;&#xA;&#xD;&#xA;Another alternative, if a typical monster group contains many copies of an individual type (so when you say &quot;20 enemies&quot; really you mean &quot;10 rats + 5 bats + 5 wolves&quot;), you could just limit it to, say, 6 enemy types and then put a number next to each enemy sprite to denote how many of that type there are." />
  <row Id="17901" PostHistoryTypeId="2" PostId="8734" RevisionGUID="f1897925-4d75-4c50-b8fd-935cdcb2e6cd" CreationDate="2011-02-18T05:59:05.587" UserId="458" Text="It sounds like you are asking a question about Game Theory. This weird branch of math-psychology-business contains a number of &quot;games&quot; that sound exactly like what you are asking for, such as the Ultimatum Game and Prisoner's Dilemma. Each player makes a very simple yes/no or numeric choice, results are compared to an outcome table, and players typically follow algorithms that are based partly on math/logic and partly on a subjective sense of fairness." />
  <row Id="17902" PostHistoryTypeId="2" PostId="8735" RevisionGUID="5f0d36ad-966b-4314-ac55-4e41e0e6ca76" CreationDate="2011-02-18T06:08:22.677" UserId="458" Text="Other answers seem to be looking at this from a legal standpoint, but it sounds like you are talking more conceptually.&#xD;&#xA;&#xD;&#xA;First, note that Parody and Homage are two very different categories; in the former case you're ridiculing the game's weaknesses, in the latter celebrating its strengths.&#xD;&#xA;&#xD;&#xA;I would say in either case, the question of when you cross the line to &quot;just another ripoff clone&quot; is answered by whether your game adds anything new to the discussion.&#xD;&#xA;&#xD;&#xA;For a parody, your game should not just be copying another game's mechanics, but it should be engineered to point out the flaws in the original in a way that the original game does not. For example, a parody of an old-school CRPG might not only have the player do a meaningless treadmill-grind for XP, but constantly remind them of how meaningless this is and how the game is just artificially increasing their required play time. Or it might eliminate the grind entirely, shortening the entire epic 40-hour experience to five minutes. In either case, the original game's mechanics are selectively copied (or not) to showcase a weakness with the form. To tell whether you are successful, I suppose a worthwhile question would be, &quot;after playing this parody do you feel different about playing the original game?&quot;&#xD;&#xA;&#xD;&#xA;For an homage, you should be taking the original game further, improving it in some meaningful way. Here the question would be, &quot;what reason is there to play this homage game, rather than playing the original?&quot; and you should have a good answer!" />
  <row Id="17903" PostHistoryTypeId="2" PostId="8736" RevisionGUID="cca390e5-f58e-4366-902f-03181d2db4df" CreationDate="2011-02-18T06:15:44.877" UserId="4264" Text="I assume you're after this kind of old-school, 2d effect:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://t0.gstatic.com/images?q=tbn:ANd9GcSzV_npcoksb6qsiPgW2pLjxdIN2-0BgkzGpD9veE0lDQEBWc2b&quot;&gt;&#xD;&#xA;&#xD;&#xA;If so, you're correct. &#xD;&#xA;  &#xD;&#xA;1. Render your &quot;real&quot; frame to an FBO.&#xD;&#xA;2. Render the top part to the framebuffer using a simple textured quad, using the FBO as the texture.&#xD;&#xA;3. Render the bottom part mirrored, with some horizontal waves.&#xD;&#xA;&#xD;&#xA;You have several options on how to achieve the third. The simplest way would be to render one pixel high textured spans, stretch and offset them. Alternatively you could use shaders and do even more interesting effects.&#xD;&#xA;&#xD;&#xA;Other things to try include tinting the mirrored version towards blue a bit, as well as varying the brightness of the scanlines (&quot;wave&quot; them too).&#xD;&#xA;&#xD;&#xA;You can also grow the waves further away from the mirroring point.&#xD;&#xA;&#xD;&#xA;This effect is also completely possible with good old plain opengl 1.x, even without FBOs. Render to texture and use &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml&quot;&gt;glReadPixels&lt;/a&gt; to read the top part back to system memory, upload it as a texture and then do the scanline-by-scanline rendering. This, however, is so slow that if you can use FBOs, it's always a much better option." />
  <row Id="17904" PostHistoryTypeId="2" PostId="8737" RevisionGUID="72eeea40-dec6-436c-8ead-34702f745787" CreationDate="2011-02-18T06:20:52.853" UserId="458" Text="When you say &quot;indie game startup&quot; there is one key piece of info you need to specify: is this a paid position?&#xD;&#xA;&#xD;&#xA;If so, Joel's &quot;field guide to developers&quot; and some other articles on finding great programmers in general are just as generally applicable to game programmers:&#xD;&#xA;http://www.joelonsoftware.com/articles/FieldGuidetoDevelopers.html&#xD;&#xA;&#xD;&#xA;If not, then beware. Your question can basically be restated as: &quot;Okay, so everyone has a Great Idea for a game, including any programmer I'd be working with. How do I convince a programmer to work on MY idea and not their own?&quot; And the answer is, you probably can't, for the same reason that you would probably not abandon your idea just to be slave labor on someone else's project." />
  <row Id="17905" PostHistoryTypeId="25" PostId="8726" RevisionGUID="fedec974-d38f-4609-973e-1fbd0e4b2589" CreationDate="2011-02-18T08:22:44.797" Comment="http://twitter.com/#!/StackGameDev/status/38513735668596736" />
  <row Id="17906" PostHistoryTypeId="5" PostId="8628" RevisionGUID="f5be3314-50ee-49f3-83e4-15cf31384337" CreationDate="2011-02-18T09:04:12.747" UserId="2130" Comment="Clarified that you hand over your main loop with GLUT. Added some links to additional windowing context libraries." Text="The simple answer is no, you do not want to use the glutIdleFunc callback in a game that has some sort of simulation. The reason for this is that this function divorces animation and draw code from window event handling but not asynchronously. In other words, receiving and handing window events stalls draw code (or whatever you put in this callback), this is perfectly fine for an interactive application (interact, then response), but not for a game where the physics or game state must progress independent of interaction or render time.&#xD;&#xA;&#xD;&#xA;You want to completely decouple input handling, game state, and draw code. There is an easy and clean solution to this that does not involve the graphics library directly (i.e. it's portable and easy to visualize); you want the entire game loop to produce time and have the simulation consume the produced time (in chunks). The key however is to then integrate the amount of time your simulation consumed into your animation.&#xD;&#xA;&#xD;&#xA;The best explanation and tutorial I have found on this is Glenn Fiedler's [Fix Your Timestep][1]&#xD;&#xA;&#xD;&#xA;This tutorial has the full treatement, however if you do not have an _actual_ physics simulation, you can skip the true integration but the basic loop still boils down to (in verbose pseudo-code):&#xD;&#xA;&#xD;&#xA;    // The amount of time we want to simulate each step, in milliseconds&#xD;&#xA;    // (written as implicit frame-rate)&#xD;&#xA;    timeDelta = 1000/30&#xD;&#xA;    timeAccumulator = 0&#xD;&#xA;    while ( game should run )&#xD;&#xA;    {&#xD;&#xA;      timeSimulatedThisIteration = 0&#xD;&#xA;      startTime = currentTime()&#xD;&#xA;    &#xD;&#xA;      while ( timeAccumulator &gt;= timeDelta )&#xD;&#xA;      {&#xD;&#xA;        stepGameState( timeDelta )&#xD;&#xA;        timeAccumulator -= timeDelta&#xD;&#xA;        timeSimulatedThisIteration += timeDelta&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      stepAnimation( timeSimulatedThisIteration )&#xD;&#xA;    &#xD;&#xA;      renderFrame() // OpenGL frame drawing code goes here&#xD;&#xA;&#xD;&#xA;      handleUserInput()&#xD;&#xA;    &#xD;&#xA;      timeAccumulator += currentTime() - startTime &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;By doing it this way, stalls in your render code, input handling, or operating system do not cause your game state to fall behind. This method is also portable and graphics library independent.&#xD;&#xA;&#xD;&#xA;GLUT is a fine library however it is _strictly_ event-driven. You register callbacks and fire off the main loop. You always hand over control of your main loop using GLUT. [There are hacks to get around it][2], you can also fake an external loop using timers and such, but another library is probably a better (easier) way to go. There are many alternatives, here are a few (ones with good documentation and quick tutorials):&#xD;&#xA;&#xD;&#xA;- [GLFW][3] which gives you the ability to get input events inline (in your own main loop).&#xD;&#xA;- [SDL][4], however its emphasis is not specifically OpenGL.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/&#xD;&#xA;  [2]: http://www.sjbaker.org/steve/software/glut_hack.html&#xD;&#xA;  [3]: http://www.glfw.org/&#xD;&#xA;  [4]: http://www.libsdl.org/&#xD;&#xA;" />
  <row Id="17907" PostHistoryTypeId="2" PostId="8738" RevisionGUID="8cc8c0ba-8e85-405b-b1ca-e49ee37ec8e4" CreationDate="2011-02-18T09:07:52.617" UserId="1581" Text="When you have to ask your question, it is safe to assume that at least some people will cry &quot;ripoff!&quot; (assuming that your game reaches a certain amount of people, that is)&#xD;&#xA;&#xD;&#xA;Now, this isn't necessarily a bad thing. Game devs have been doing this for years, with some impunity - Torchlight and Diablo, or Zelda and 3D Dot Heroes.&#xD;&#xA;&#xD;&#xA;It seems to me that the best &quot;marketing strategies&quot; around the problem are being honest about it and admitting that your game is &quot;a tribute of game xxxx&quot; or &quot;heavily inspired by xxxx&quot;." />
  <row Id="17908" PostHistoryTypeId="2" PostId="8739" RevisionGUID="96a7a7a3-c526-4e31-a876-a0256dd6eaee" CreationDate="2011-02-18T09:24:25.187" UserId="5073" Text="I AM Developing The Demo Game to  Hit The Balls And  i need To  Hit the Obstacle Like Real Physics&#xD;&#xA;&#xD;&#xA;  I  Know that It Is Possible Through The chipmunk API &#xD;&#xA; But I Don't know how to Use this  APi &#xD;&#xA; Any Buddy Suggest Me For this  API USAGES&#xD;&#xA; Thank You Very much In Advance &#xD;&#xA;" />
  <row Id="17909" PostHistoryTypeId="1" PostId="8739" RevisionGUID="96a7a7a3-c526-4e31-a876-a0256dd6eaee" CreationDate="2011-02-18T09:24:25.187" UserId="5073" Text="How to Use The ChipMunk Api for To Hit the Obstacles " />
  <row Id="17910" PostHistoryTypeId="3" PostId="8739" RevisionGUID="96a7a7a3-c526-4e31-a876-a0256dd6eaee" CreationDate="2011-02-18T09:24:25.187" UserId="5073" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;&lt;cocoa&gt;" />
  <row Id="17911" PostHistoryTypeId="2" PostId="8740" RevisionGUID="ff8c608a-7fc6-4d97-a01f-84e0f1d69ef6" CreationDate="2011-02-18T10:26:09.310" UserId="5119" Text="A quick search gave me these two links.On which platform you need?&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/grabbed/source/browse/#svn%2Ftrunk  [Sample done with ChipMunk]&#xD;&#xA;&#xD;&#xA;http://www.alexandre-gomes.com/articles/chipmunk/ [detailed description on usage ]" />
  <row Id="17912" PostHistoryTypeId="25" PostId="8739" RevisionGUID="5ea1422e-2a94-443e-a837-3ff24efff052" CreationDate="2011-02-18T11:22:44.557" Comment="http://twitter.com/#!/StackGameDev/status/38559033061425152" />
  <row Id="17913" PostHistoryTypeId="2" PostId="8741" RevisionGUID="13a16885-7e8f-44cc-8455-77db9d7cd211" CreationDate="2011-02-18T11:28:59.297" UserId="662" Text="The idea you have is to raytrace into the scenery to see what it hits. This is viable because your game is (presumably) tile based. When the bullet starts, you must know its 3D position, even if it is fake. Once you know the direction of the bullet, you can use a Bresenham algorithm (more commonly used for line drawing) to see which squares the bullet will &quot;touch&quot;. You can then do collision checking only for the objects touched by the Bresenham line.&#xD;&#xA;&#xD;&#xA;Basically:&#xD;&#xA;&#xD;&#xA;* Determine 3D starting position of bullet&#xD;&#xA;* Determine 3D direction of bullet&#xD;&#xA;* Determine in which square the bullet will land (if it hits nothing)&#xD;&#xA;* Draw a line (in data) with the direction of the bullet using Bresenham&#xD;&#xA;* For each square the bullet enters, check if the bullet hits anything" />
  <row Id="17914" PostHistoryTypeId="5" PostId="8739" RevisionGUID="af57fc5a-2d9b-4cc1-8e1f-225a1f83e134" CreationDate="2011-02-18T11:51:09.607" UserId="20" Comment="rewrote the post for better readability" Text="I am developing a game demo where I want a physics simulation with balls and obstacles.&#xD;&#xA;&#xD;&#xA;I know that this is possible with the chipmunk physics-engine but I don't know how to use it. Can anybody give me suggestions how to get started and provide links to the API documentation?&#xD;&#xA;" />
  <row Id="17915" PostHistoryTypeId="4" PostId="8739" RevisionGUID="af57fc5a-2d9b-4cc1-8e1f-225a1f83e134" CreationDate="2011-02-18T11:51:09.607" UserId="20" Comment="rewrote the post for better readability" Text="How to use the chipmunk physics-engine?" />
  <row Id="17916" PostHistoryTypeId="6" PostId="8739" RevisionGUID="af57fc5a-2d9b-4cc1-8e1f-225a1f83e134" CreationDate="2011-02-18T11:51:09.607" UserId="20" Comment="rewrote the post for better readability" Text="&lt;iphone&gt;&lt;2d-physics&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="17917" PostHistoryTypeId="2" PostId="8742" RevisionGUID="eba0087e-354b-402f-953d-8993c55e8290" CreationDate="2011-02-18T12:07:39.170" UserId="4307" Text="Why keep it in the game's subject? Take a look at subways, airports, train stations... you can go anywhere in the world and it's relatively easy to move around the city or arrive at the correct gates just looking at maps or signals. There are good designs all around the world, you just have to hunt them." />
  <row Id="17918" PostHistoryTypeId="2" PostId="8743" RevisionGUID="d21ae01a-ee65-43cd-8e17-639dad26ce85" CreationDate="2011-02-18T12:15:54.717" UserId="20" Text="I don't think icons for games are that much different from any other icon. You want it to be clearly recognizable and well.. *iconic*.&#xD;&#xA;&#xD;&#xA;Integrating an icon into the games art-style is basically the same as creating an icon for any existing platform. You'll have to respect the art-style that has been established for that platform (example: have a look at the [Windows guidelines][1] or [Mac OS X Guidelines][2]). For your game you can come up with your own set of guidelines though. It can be as simple as: Icon must have the shape of a circle and must be provided in two sizes, a big and a small version. &#xD;&#xA;&#xD;&#xA;I'm afraid there's no guide to the best game icon though. Creating good icons requires a lot of talent, because you'll have to be able to reduce stuff to the max, while still keeping it recognizable and maintain a consistent style. So definitely not something that should be done by a programmer (no offense).&#xD;&#xA;&#xD;&#xA;Maybe [these tutorials][3] are of some help to you. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ms997636.aspx&#xD;&#xA;  [2]: http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIcons/XHIGIcons.html&#xD;&#xA;  [3]: http://sixrevisions.com/graphics-design/50-excellent-icon-design-tutorials/" />
  <row Id="17919" PostHistoryTypeId="5" PostId="2388" RevisionGUID="a4d89b3d-e98e-4ef3-b892-6dd0d93e4a9a" CreationDate="2011-02-18T13:47:35.940" UserId="970" Comment="typos, punctuation" Text="30fps is probably your problem?&#xD;&#xA;&#xD;&#xA;Some/many people will try to tell you that 30fps is just fine. But really, it's not. While 30fps is certainly 'playable', it's never going to be 'smooth', especially for a fast-moving 2D scroller, and especially to any games enthusiast that's had a taste of 60fps.&#xD;&#xA; &#xD;&#xA;2D games on 16bit consoles and arcade machines ran at 50/60Hz for a very good reason — it looks far, far smoother than 25/30, *especially* for 2D scrolling games. Back then, 60fps was almost the definition of 'arcade quality'.  These days, many developers are prepared to sacrifice that smoothness for better image quality (better screenshots) or shorter development time (less time-consuming optimization work).&#xD;&#xA;&#xD;&#xA;Unfortunately, I can't help with the iPhone specifics. I get the impression that 60fps on iPhone/Android isn't easy to achieve — although a few do manage it. (The iPhone port of Pinball Dreams being one example.)" />
  <row Id="17920" PostHistoryTypeId="24" PostId="2388" RevisionGUID="3ecd4a7e-a211-454b-a095-0dc999c46920" CreationDate="2011-02-18T13:47:35.940" Comment="Proposed by 970 approved by 189 edit id of 40" />
  <row Id="17921" PostHistoryTypeId="25" PostId="8687" RevisionGUID="38486f89-901c-4d96-be03-271798a1eebc" CreationDate="2011-02-18T14:22:44.877" Comment="http://twitter.com/#!/StackGameDev/status/38604333314613248" />
  <row Id="17922" PostHistoryTypeId="2" PostId="8744" RevisionGUID="0348709b-2c73-466d-a03a-cd79254d3ee2" CreationDate="2011-02-18T14:36:53.240" UserId="1356" Text="I would recommend QT, as it's cross platform, C++ and you can get an Open Source version of it with the LGPL license. It's also easy to use and have a lot of pre-made components you can use." />
  <row Id="17923" PostHistoryTypeId="5" PostId="8704" RevisionGUID="b18503df-dc33-4a15-854a-2eb882388501" CreationDate="2011-02-18T14:45:59.820" UserId="5345" Comment="Removed the part about XNA, it was just confusing the post; deleted 74 characters in body" Text="I'm trying to implement a virtual DPad in android, but I'm still very confused about how do I keep track of each trouch point, from the moment it is pressed, till it is released.&#xD;&#xA;&#xD;&#xA;In my code, I test if there is a &quot;DOWN&quot; or &quot;MOVED&quot; event, then if one of this events collides with one of the 4 rectangles of my DPad, I set the pressedDirectin variable to the side of the touch event, then I read the DPad actual pressed direction in my Update() event on another class.&#xD;&#xA;&#xD;&#xA;The thing I'm not sure, is how do I get track of the touch points, I store the ID of the touch point which generated the diretion that is being stored, so when this ID is moved I update the direction of the DPad and when it gets released I set the Direction to None.&#xD;&#xA;&#xD;&#xA;I don't want my DPad to handle multiple directions, but I still didn't get how to handle the multiple touch points, so I can know exacly which touch point is touching the DPad and stored it's ID so I know when it is released.&#xD;&#xA;&#xD;&#xA;Is the onTouchEvent called for every touch point, or all touch points comes in a single call? I still don't get it.&#xD;&#xA;&#xD;&#xA;Here is the code I wrote so far, it works, but guess that it will only handle one touch point.&#xD;&#xA;&#xD;&#xA;    public boolean onTouchEvent(MotionEvent event)&#xD;&#xA;        {&#xD;&#xA;            if (event.getPointerCount() == 0) &#xD;&#xA;                return true;&#xD;&#xA;             &#xD;&#xA;            int touchX = -1;&#xD;&#xA;            int touchY = -1;&#xD;&#xA;             &#xD;&#xA;            pressedDirection = DPadDirection.None;&#xD;&#xA;            int actionCode = event.getAction() &amp; MotionEvent.ACTION_MASK;&#xD;&#xA;                if (actionCode == MotionEvent.ACTION_UP)&#xD;&#xA;                {&#xD;&#xA;                    if (event.getPointerId(0) == idDPad)&#xD;&#xA;                    {&#xD;&#xA;                        pressedDirection = DPadDirection.None;&#xD;&#xA;                        idDPad = -1;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                else if (actionCode == MotionEvent.ACTION_DOWN || actionCode == MotionEvent.ACTION_MOVE)&#xD;&#xA;                {                                     &#xD;&#xA;                    touchX = (int)event.getX();&#xD;&#xA;                    touchY = (int)event.getY();     &#xD;&#xA;     &#xD;&#xA;                    if (rightRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Right;&#xD;&#xA;                    else if (leftRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Left;&#xD;&#xA;                    else if (upRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Up;&#xD;&#xA;                    else if (downRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Down;&#xD;&#xA;     &#xD;&#xA;                    if (pressedDirection != DPadDirection.None)&#xD;&#xA;                        idDPad = event.getPointerId(0);    &#xD;&#xA;                }              &#xD;&#xA;    &#xD;&#xA;            return true;&#xD;&#xA;        }" />
  <row Id="17924" PostHistoryTypeId="2" PostId="8745" RevisionGUID="5289839f-8765-470a-b056-a9f610a11f27" CreationDate="2011-02-18T14:55:54.413" UserId="5034" Text="I haven't yet tried it myself, but this looks very interesting:&#xD;&#xA;&#xD;&#xA;[librocket][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://librocket.com/" />
  <row Id="17925" PostHistoryTypeId="5" PostId="8704" RevisionGUID="778d7e64-1e5c-4705-aa87-7456a4f282c7" CreationDate="2011-02-18T15:06:15.963" UserId="5345" Comment="deleted 72 characters in body" Text="I'm trying to implement a virtual DPad in android, but I'm still very confused about how do I keep track of each trouch point, from the moment it is pressed, till it is released.&#xD;&#xA;&#xD;&#xA;In my code, I test if there is a &quot;DOWN&quot; or &quot;MOVED&quot; event, then if one of this events collides with one of the 4 rectangles of my DPad, I set the pressedDirectin variable to the side of the DPad which the user pressed.&#xD;&#xA;&#xD;&#xA;The thing I'm not sure, is how do I get track of the touch points, I want to store the ID of the touch point which collided with the DPad direction, so when this ID is moved I update the direction of the DPad and when it gets released I set the Direction to None.&#xD;&#xA;&#xD;&#xA;I don't want my DPad to handle multiple directions, but I still didn't get how to handle the multiple touch points, so I can know exacly which touch point is touching the DPad and stored it's ID so I know when it is released.&#xD;&#xA;&#xD;&#xA;Is the onTouchEvent called for every touch point, or all touch points comes in a single call? I still don't get it.&#xD;&#xA;&#xD;&#xA;Here is the code I wrote so far, it works, but guess that it will only handle one touch point.&#xD;&#xA;&#xD;&#xA;    public boolean onTouchEvent(MotionEvent event)&#xD;&#xA;        {&#xD;&#xA;            if (event.getPointerCount() == 0) &#xD;&#xA;                return true;&#xD;&#xA;             &#xD;&#xA;            int touchX = -1;&#xD;&#xA;            int touchY = -1;&#xD;&#xA;             &#xD;&#xA;            pressedDirection = DPadDirection.None;&#xD;&#xA;            int actionCode = event.getAction() &amp; MotionEvent.ACTION_MASK;&#xD;&#xA;                if (actionCode == MotionEvent.ACTION_UP)&#xD;&#xA;                {&#xD;&#xA;                    if (event.getPointerId(0) == idDPad)&#xD;&#xA;                    {&#xD;&#xA;                        pressedDirection = DPadDirection.None;&#xD;&#xA;                        idDPad = -1;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                else if (actionCode == MotionEvent.ACTION_DOWN || actionCode == MotionEvent.ACTION_MOVE)&#xD;&#xA;                {                                     &#xD;&#xA;                    touchX = (int)event.getX();&#xD;&#xA;                    touchY = (int)event.getY();     &#xD;&#xA;     &#xD;&#xA;                    if (rightRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Right;&#xD;&#xA;                    else if (leftRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Left;&#xD;&#xA;                    else if (upRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Up;&#xD;&#xA;                    else if (downRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Down;&#xD;&#xA;     &#xD;&#xA;                    if (pressedDirection != DPadDirection.None)&#xD;&#xA;                        idDPad = event.getPointerId(0);    &#xD;&#xA;                }              &#xD;&#xA;    &#xD;&#xA;            return true;&#xD;&#xA;        }" />
  <row Id="17926" PostHistoryTypeId="2" PostId="8746" RevisionGUID="dca3cd9b-0add-404a-9aa4-a505aceac05f" CreationDate="2011-02-18T15:16:30.273" UserId="1352" Text="All the touch points come in a single call. And most of the accessor functions on the MotionEvent class have an overloaded function that takes in pointer index.&#xD;&#xA;&#xD;&#xA;So use MotionEvent.getPointerCount() and loop through your mouse pointers. &#xD;&#xA;&#xD;&#xA;http://developer.android.com/reference/android/view/MotionEvent.html&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="17927" PostHistoryTypeId="5" PostId="8704" RevisionGUID="80368bcd-fabb-4c39-9330-3d250087476a" CreationDate="2011-02-18T15:28:42.093" UserId="5345" Comment="deleted 1 characters in body" Text="I'm trying to implement a virtual DPad in android, but I'm still very confused about how do I keep track of each trouch point, from the moment it is pressed, till it is released.&#xD;&#xA;&#xD;&#xA;In my code, I test if there is a &quot;DOWN&quot; or &quot;MOVED&quot; event, then if one of this events collides with one of the 4 rectangles of my DPad, I set the pressedDirectin variable to the side of the DPad which the user pressed.&#xD;&#xA;&#xD;&#xA;The thing I'm not sure, is how do I get track of the touch points, I want to store the ID of the touch point which collided with the DPad direction, so when this ID is moved I update the direction of the DPad and when it gets released I set the Direction to None.&#xD;&#xA;&#xD;&#xA;I don't want my DPad to handle multiple directions, but I still didn't get how to handle the multiple touch points, so I can know exacly which touch point is touching the DPad and store it's ID so I know when it is released.&#xD;&#xA;&#xD;&#xA;Is the onTouchEvent called for every touch point, or all touch points comes in a single call? I still don't get it.&#xD;&#xA;&#xD;&#xA;Here is the code I wrote so far, it works, but guess that it will only handle one touch point.&#xD;&#xA;&#xD;&#xA;    public boolean onTouchEvent(MotionEvent event)&#xD;&#xA;        {&#xD;&#xA;            if (event.getPointerCount() == 0) &#xD;&#xA;                return true;&#xD;&#xA;             &#xD;&#xA;            int touchX = -1;&#xD;&#xA;            int touchY = -1;&#xD;&#xA;             &#xD;&#xA;            pressedDirection = DPadDirection.None;&#xD;&#xA;            int actionCode = event.getAction() &amp; MotionEvent.ACTION_MASK;&#xD;&#xA;                if (actionCode == MotionEvent.ACTION_UP)&#xD;&#xA;                {&#xD;&#xA;                    if (event.getPointerId(0) == idDPad)&#xD;&#xA;                    {&#xD;&#xA;                        pressedDirection = DPadDirection.None;&#xD;&#xA;                        idDPad = -1;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                else if (actionCode == MotionEvent.ACTION_DOWN || actionCode == MotionEvent.ACTION_MOVE)&#xD;&#xA;                {                                     &#xD;&#xA;                    touchX = (int)event.getX();&#xD;&#xA;                    touchY = (int)event.getY();     &#xD;&#xA;     &#xD;&#xA;                    if (rightRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Right;&#xD;&#xA;                    else if (leftRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Left;&#xD;&#xA;                    else if (upRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Up;&#xD;&#xA;                    else if (downRect.contains(touchX, touchY))&#xD;&#xA;                        pressedDirection = DPadDirection.Down;&#xD;&#xA;     &#xD;&#xA;                    if (pressedDirection != DPadDirection.None)&#xD;&#xA;                        idDPad = event.getPointerId(0);    &#xD;&#xA;                }              &#xD;&#xA;    &#xD;&#xA;            return true;&#xD;&#xA;        }" />
  <row Id="17928" PostHistoryTypeId="2" PostId="8747" RevisionGUID="9d2eb71d-f293-4440-ad6d-4adbdf6c681e" CreationDate="2011-02-18T15:32:12.977" UserId="5538" Text="I'm in the process of building a game in which virtual items can be obtained either by in-game play (defeating enemies, gaining levels), or by purchasing &quot;packs&quot; via microtransactions.&#xD;&#xA;&#xD;&#xA;Looking at an existing example like [Duels.com's item packs][1], it looks like a lot of thought went into their implementation, including:&#xD;&#xA;&#xD;&#xA;* Setting clear player expectations as to what can be obtained in the pack&#xD;&#xA;* Limiting pack supply to increase demand and control inflation&#xD;&#xA;&#xD;&#xA;Are there other considerations that should be taken into account?  For example, should the contents of the packs be pre-generated to guarantee the advertised drop rates, or is each drop rate just a random chance, and you could end up with higher or lower supply?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.duels.com/packs/ &quot;Duels.com Item Packs&quot;" />
  <row Id="17929" PostHistoryTypeId="1" PostId="8747" RevisionGUID="9d2eb71d-f293-4440-ad6d-4adbdf6c681e" CreationDate="2011-02-18T15:32:12.977" UserId="5538" Text="Best practices for implementing collectible virtual item &quot;packs&quot;?" />
  <row Id="17930" PostHistoryTypeId="3" PostId="8747" RevisionGUID="9d2eb71d-f293-4440-ad6d-4adbdf6c681e" CreationDate="2011-02-18T15:32:12.977" UserId="5538" Text="&lt;online&gt;" />
  <row Id="17931" PostHistoryTypeId="2" PostId="8748" RevisionGUID="80b107a3-42ff-40e4-9ecc-f5cf665994c1" CreationDate="2011-02-18T15:48:26.483" UserId="2137" Text="So suppose I'm currently developing a variant of a snakes game for the iPhone, and you decided to call it &quot;snakes&quot;.&#xD;&#xA;&#xD;&#xA;First, in general, how would you find out if a name's been copyrighted or not? It's probably safe with &quot;snakes&quot; because it's such a common word, and that there's been so many games around (**please** correct me if I'm wrong), but with some people copyrighting the name &quot;edge&quot;, it would be best to be a bit careful.&#xD;&#xA;&#xD;&#xA;Second, suppose I decided to go with some name that is guaranteed to be different (e.g EL SERPENTES DE LOS REYES), would gameplay be a point of contention on copyright issues? For example, the tetris game is sort of &quot;copyrighted&quot; at the apple app store, and there was a crackdown on anyone using the word &quot;tris&quot; or anything related to it. However, if there was a game with the gameplay of tetris (or loosely **very** similar), with the name &quot;BLOXODEREX&quot;, can it be liable to copyright/DMCA issues?" />
  <row Id="17932" PostHistoryTypeId="1" PostId="8748" RevisionGUID="80b107a3-42ff-40e4-9ecc-f5cf665994c1" CreationDate="2011-02-18T15:48:26.483" UserId="2137" Text="copyright of some arcade classics" />
  <row Id="17933" PostHistoryTypeId="3" PostId="8748" RevisionGUID="80b107a3-42ff-40e4-9ecc-f5cf665994c1" CreationDate="2011-02-18T15:48:26.483" UserId="2137" Text="&lt;legal&gt;&lt;copyright&gt;" />
  <row Id="17934" PostHistoryTypeId="2" PostId="8749" RevisionGUID="89e73dc5-2585-464d-b018-db1e725d37e2" CreationDate="2011-02-18T15:50:24.657" UserId="4662" Text="I'm looking for a GUI library built on top of DirectX- preferably 9, but I can also do 11. I've looked at stuff like DXUT, but it's way too much for me- I'm only needing some UI controls which I would rather not write (and debug) myself, and their need to keep a C-compatible API is definitely a big downside. I'd rather look at UI libs that are designed to be integrated into an existing DirectX-based system, rather than forming the basis of a system. Any recommendations?" />
  <row Id="17935" PostHistoryTypeId="1" PostId="8749" RevisionGUID="89e73dc5-2585-464d-b018-db1e725d37e2" CreationDate="2011-02-18T15:50:24.657" UserId="4662" Text="GUI for DirectX" />
  <row Id="17936" PostHistoryTypeId="3" PostId="8749" RevisionGUID="89e73dc5-2585-464d-b018-db1e725d37e2" CreationDate="2011-02-18T15:50:24.657" UserId="4662" Text="&lt;c++&gt;&lt;directx&gt;&lt;gui&gt;" />
  <row Id="17937" PostHistoryTypeId="2" PostId="8750" RevisionGUID="eba99f94-de93-43ba-b716-4380f17bfa88" CreationDate="2011-02-18T16:21:45.067" UserId="3659" Text="Given what you've told me in your comment, you can do something like this:&#xD;&#xA;&#xD;&#xA;    float touchX, touchY;&#xD;&#xA;&#xD;&#xA;    public boolean onTouchEvent(MotionEvent event)&#xD;&#xA;    {&#xD;&#xA;            if (event.getAction() == MotionEvent.ACTION_DOWN || &#xD;&#xA;                event.getAction() == MotionEvent.ACTION_MOVE)&#xD;&#xA;            {   &#xD;&#xA;               // store values&#xD;&#xA;               touchX = event.getX();&#xD;&#xA;               touchY = event.getY();&#xD;&#xA;            } else if(event.getAction() == MotionEvent.ACTION_UP) &#xD;&#xA;            {&#xD;&#xA;               // reset values&#xD;&#xA;               touchX = 0f;&#xD;&#xA;               touchY = 0f;&#xD;&#xA;            }     &#xD;&#xA;            // consume motion event&#xD;&#xA;            return true;&#xD;&#xA;    }&#xD;&#xA;In action_down or action_move, you store the event.getX() and event.getY() coordinates in a field outside the onTouchEvent class. Then in your update loop, before you do anything with the pressedDirection, you have your code:&#xD;&#xA;&#xD;&#xA;               if (rightRect.contains(touchX, touchY))&#xD;&#xA;                 pressedDirection = DPadDirection.Right;&#xD;&#xA;                else if (leftRect.contains(touchX, touchY))&#xD;&#xA;                    pressedDirection = DPadDirection.Left;&#xD;&#xA;                else if (upRect.contains(touchX, touchY))&#xD;&#xA;                    pressedDirection = DPadDirection.Up;&#xD;&#xA;                else if (downRect.contains(touchX, touchY))&#xD;&#xA;                    pressedDirection = DPadDirection.Down;&#xD;&#xA;    &#xD;&#xA;                if (pressedDirection != DPadDirection.None)&#xD;&#xA;                    idDPad = event.getPointerId(0);    &#xD;&#xA;&#xD;&#xA;               // do something based on pressedDirection&#xD;&#xA;&#xD;&#xA;So in the onTouchEvent you store the values the touch coordinates. In your game loop, you do the checks to see if the coordinates are in the appropriate Rects. Then you run the rest of your game code. You reset the values to zero when the MotionEvent is an ACTION_UP" />
  <row Id="17938" PostHistoryTypeId="2" PostId="8751" RevisionGUID="081f2d27-d93b-4656-b589-67996904a3b6" CreationDate="2011-02-18T16:28:21.323" UserId="5539" Text="How do I get rid of this alpha transparency artifacting with classic fixed function OpenGL?&#xD;&#xA;&#xD;&#xA;I tried all kinds of settings but I'm not sure why it's good in the upper half of the mask but not in the lower half.&#xD;&#xA;&#xD;&#xA;[alpha illustration | 1.7M GIF][1]&#xD;&#xA;&#xD;&#xA;I have a two-sided concave mesh and want to fade out the edges with an alpha vector on the vertex colors. I get the same artifact with an RGBA texture also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yhO6G.gif" />
  <row Id="17939" PostHistoryTypeId="1" PostId="8751" RevisionGUID="081f2d27-d93b-4656-b589-67996904a3b6" CreationDate="2011-02-18T16:28:21.323" UserId="5539" Text="Broken alpha of two-sided OpenGL mesh" />
  <row Id="17940" PostHistoryTypeId="3" PostId="8751" RevisionGUID="081f2d27-d93b-4656-b589-67996904a3b6" CreationDate="2011-02-18T16:28:21.323" UserId="5539" Text="&lt;opengl&gt;&lt;transparency&gt;" />
  <row Id="17941" PostHistoryTypeId="2" PostId="8752" RevisionGUID="f8206e4f-e7a4-43ea-9375-cdc4e517ac4a" CreationDate="2011-02-18T16:44:41.683" UserId="5399" Text="Apologies if I am missing something very obvious (likely!) but is there anything wrong with interpolating between two matrices by:&#xD;&#xA;&#xD;&#xA;        float d = (float)(targetTime.Ticks - keyframe_start.ticks) / (float)(keyframe_end.ticks - keyframe_start.ticks);&#xD;&#xA;        return ((keyframe_start.Transform * (1 - d)) + (keyframe_end.Transform * d));&#xD;&#xA;&#xD;&#xA;As in my app, when I try an use this to interpolate between two keyframes, the model begins to 'shrink' - the severity based on how far between the two keyframes the target time is; its worst when the transform split is ~50/50." />
  <row Id="17942" PostHistoryTypeId="1" PostId="8752" RevisionGUID="f8206e4f-e7a4-43ea-9375-cdc4e517ac4a" CreationDate="2011-02-18T16:44:41.683" UserId="5399" Text="Interpolating Matrices" />
  <row Id="17943" PostHistoryTypeId="3" PostId="8752" RevisionGUID="f8206e4f-e7a4-43ea-9375-cdc4e517ac4a" CreationDate="2011-02-18T16:44:41.683" UserId="5399" Text="&lt;xna&gt;&lt;animation&gt;&lt;matrix&gt;&lt;interpolation&gt;" />
  <row Id="17944" PostHistoryTypeId="2" PostId="8753" RevisionGUID="8f18cfa7-188d-496a-926a-663e76d9efde" CreationDate="2011-02-18T17:05:59.730" UserId="1091" Text="Interpolating the matrices like that isn't going to give a useful result, especially for anything involving a rotation. Ideally you want to decompose your animation into some other format (quaternion for rotation, for example) and then interpolate in that form before building the matrix.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="17945" PostHistoryTypeId="2" PostId="8754" RevisionGUID="3eb2f176-3dda-423d-894e-9024075a08b1" CreationDate="2011-02-18T17:06:08.977" UserId="5259" Text="Put very simply, linear interpolation of matrices is not always a good idea. If you have an animation you are trying to accomplish, and you are using matrices to handle the bones rotation, you can't just take a linear combination of them. You'll need to use slerp, extract the axis of rotation and interpolate the angle and recalculate the rotation matrix, or you'll need to just use quaternions. Translation is linear, rotation is not (except for small angles theta).&#xD;&#xA;&#xD;&#xA;Here is a[good writeup on matrices and 3d applications][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.j3d.org/matrix_faq/matrfaq_latest.html" />
  <row Id="17946" PostHistoryTypeId="2" PostId="8755" RevisionGUID="81f03058-192e-4628-9f1f-cd1b3621f771" CreationDate="2011-02-18T17:19:52.223" UserId="5540" Text="There's two important considerations for the game economy.&#xD;&#xA;&#xD;&#xA;1) When items are not able to be traded between players. &#xD;&#xA;&#xD;&#xA;If the pack items aren't able to be traded/gifted/etc between players then don't worry about supply and demand. Just let people spend what they would like and be clear about what you can get from the pack. Mafia wars sets a great precedent here and because the supply really doesn't matter, you can just have the items be totally randomly dropped. &#xD;&#xA;&#xD;&#xA;2) When items are able to be traded between players. &#xD;&#xA;&#xD;&#xA;That's when things get tricky. In order to have a functioning game economy, items must not just flow into the game but they must also leave the game. So you need to make sure that there must be a way that the items players buy in the packs, if they match the functionality of game items, are either used up over time or they can be lost on death. The particular mechanics depend on your game but you absolutely have to balance items leaving vs items entering the game.&#xD;&#xA;&#xD;&#xA;Then once you have the inflow and outflow of items balanced you can decide the specifics of whether you want the items to be totally random or balanced beforehand. In a large enough volume you'll get almost entirely the same result. &#xD;&#xA;&#xD;&#xA;In this situation I personally would set it up such that a pack gives you similar items to a certain amount of repetitions of whatever you do in game to get the items. So you can kill 50 X-dragon that gives you a 50% chance of 10 of Y-dragonhide per kill then you can go kill 50 dragons in game to get 250 dragonhide, or you can buy a pack of 250 dragonhide. That way you're not completely alienating the players who prefer to &quot;work&quot; for their items.&#xD;&#xA;&#xD;&#xA;That can be further balanced by simply allowing people to buy only the kills that could have happened, but nobody was online to kill the dragon(s). So if the dragons take 5 minutes to kill and respawn after 10 minutes, then you know that only 96 dragons can be killed per day. If there's only 50 dragons that are killed that day, then you can put 46 dragon kills up for sale.&#xD;&#xA;&#xD;&#xA;I don't know of any games that have implemented any systems like this, simply because making items that can be traded between players purchasable tends to really piss off everybody who plays for &quot;free&quot;." />
  <row Id="17947" PostHistoryTypeId="25" PostId="8752" RevisionGUID="d904a246-3f47-40c5-a413-965cefc949c8" CreationDate="2011-02-18T17:22:48.040" Comment="http://twitter.com/#!/StackGameDev/status/38649643319570433" />
  <row Id="17948" PostHistoryTypeId="2" PostId="8756" RevisionGUID="cad9e9e6-36c6-461a-9a33-80bddad849d4" CreationDate="2011-02-18T17:30:20.220" UserId="662" Text="You can't do this in a single pass.&#xD;&#xA;&#xD;&#xA;Well, maybe I should clarify.&#xD;&#xA;&#xD;&#xA;If you look at the way a triangle rasterizer works, is that it takes a bunch of triangles and puts them on the screen. But, for each pixel, it checks its z value to a value in the z-buffer. If the z of the pixel that wants to be drawn is greater than the pixel that was already there, the z in the z-buffer is set to that value and the pixel on the screen is set to that pixel.&#xD;&#xA;&#xD;&#xA;However, you might be able to work around this, like so:&#xD;&#xA;&#xD;&#xA;    glDepthMask(GL_FALSE);&#xD;&#xA;    &#xD;&#xA;    // render polygons&#xD;&#xA;&#xD;&#xA;    glDepthMask(GL_TRUE);&#xD;&#xA;&#xD;&#xA;Now you *read* from the z-buffer, but you don't *write* to it. This way, every pixel is drawn regardless of depth. However, this probably won't work for you. It will mean that some background triangles will be rendered on top of foreground triangles.&#xD;&#xA;&#xD;&#xA;What you want to do is split the rendering into two passes: a normal pass and a pass for alpha-transparent polygons. When you render the second batch, you can look up the color of the pixel behind the one you're drawing and alpha blend with it." />
  <row Id="17949" PostHistoryTypeId="2" PostId="8757" RevisionGUID="7ce49892-27ce-4932-bdb6-2cb78abed0c0" CreationDate="2011-02-18T19:39:51.983" UserId="5119" Text="Usually when ever i want to start a game,I will think to have a good basic architecture for rendering and better game loop from scratch.I usually don't want to use existing engines.The reason behind it is that i want to implement it on my own to learn stuff.&#xD;&#xA;&#xD;&#xA;   But lot of blogs and devs say its not a good option to go for re-inventing the wheel.&#xD;&#xA;&#xD;&#xA;Am i missing some thing in this aspect? If you feel i'm in the right way, can you please suggest some basic game mechanics that i need to start-up (in increasing complexity order) so that i can build a strong basic architecture after some games?" />
  <row Id="17950" PostHistoryTypeId="1" PostId="8757" RevisionGUID="7ce49892-27ce-4932-bdb6-2cb78abed0c0" CreationDate="2011-02-18T19:39:51.983" UserId="5119" Text="Starting from Scratch - Is it a Mistake if i re-invent the wheel?" />
  <row Id="17951" PostHistoryTypeId="3" PostId="8757" RevisionGUID="7ce49892-27ce-4932-bdb6-2cb78abed0c0" CreationDate="2011-02-18T19:39:51.983" UserId="5119" Text="&lt;game-mechanics&gt;" />
  <row Id="17952" PostHistoryTypeId="2" PostId="8758" RevisionGUID="56fa3dd2-aedd-4809-9466-0a0670322070" CreationDate="2011-02-18T19:42:34.800" UserId="141" Text="    i want to implement it on my own to learn stuff.&#xD;&#xA;&#xD;&#xA;That's probably the most important thing. If your goal is to learn, writing your own rendering and game loop engines from scratch is fine, and a perfectly good learning experience. If your goal is to make a finished game quickly and easily, then use an existing framework." />
  <row Id="17953" PostHistoryTypeId="2" PostId="8759" RevisionGUID="a330cdac-a11b-4cb3-89b5-b1a2e16bd28c" CreationDate="2011-02-18T19:45:23.990" UserId="4264" Text="Depends on what you're after. If you want to learn, reinvent as many wheels you feel like. I know people who have written their own JVMs or PNG loaders for the heck of it.&#xD;&#xA;&#xD;&#xA;Most blogs probably give advice on how to get to the stuff that get you paid quickly, but I don't know if it's a good long-term strategy. If you don't know what you're playing with, how do you know if it's a good choice? What will you do _when_ you hit issues, go whining on forums, or can you figure it out yourself?" />
  <row Id="17954" PostHistoryTypeId="2" PostId="8760" RevisionGUID="7d0f0e4b-ca98-4a38-9d49-945233c3344a" CreationDate="2011-02-18T19:53:34.670" UserId="4129" Text="And there are those who claim they are more productive precisely because they re-invent the wheel.&#xD;&#xA;&#xD;&#xA;Case in point: Eskil Steenberg, creator of World of Love (excellent video where he talks about his game, his engine and *awesome* tools, and his philosophy: http://vimeo.com/18423305 )" />
  <row Id="17955" PostHistoryTypeId="5" PostId="8748" RevisionGUID="86ca2497-f4c1-40e2-8f32-fb0d49b9240b" CreationDate="2011-02-18T19:54:47.113" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How closely can a game resemble another game without legal problems](http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;So suppose I'm currently developing a variant of a snakes game for the iPhone, and you decided to call it &quot;snakes&quot;.&#xD;&#xA;&#xD;&#xA;First, in general, how would you find out if a name's been copyrighted or not? It's probably safe with &quot;snakes&quot; because it's such a common word, and that there's been so many games around (**please** correct me if I'm wrong), but with some people copyrighting the name &quot;edge&quot;, it would be best to be a bit careful.&#xD;&#xA;&#xD;&#xA;Second, suppose I decided to go with some name that is guaranteed to be different (e.g EL SERPENTES DE LOS REYES), would gameplay be a point of contention on copyright issues? For example, the tetris game is sort of &quot;copyrighted&quot; at the apple app store, and there was a crackdown on anyone using the word &quot;tris&quot; or anything related to it. However, if there was a game with the gameplay of tetris (or loosely **very** similar), with the name &quot;BLOXODEREX&quot;, can it be liable to copyright/DMCA issues?" />
  <row Id="17956" PostHistoryTypeId="10" PostId="8748" RevisionGUID="faacfe0e-03e6-479b-999d-d9c97bc68feb" CreationDate="2011-02-18T19:54:46.987" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="17957" PostHistoryTypeId="2" PostId="8761" RevisionGUID="7258d0fc-8f3c-4344-b341-605f89f4ddd1" CreationDate="2011-02-18T19:57:14.073" UserId="2332" Text="No it's not a bad thing at all. Learning and the ability to learn is absolutely fundamental to being a good programmer. &#xD;&#xA;&#xD;&#xA;**BUT**  &#xD;&#xA;The important thing when building something from scratch is to finish it to completion. It doesn't matter how hacky and unoptimized it is, if you complete it there's a sense of satisfaction like no other. It will all give you valuable experience and you can always make the code more elegant or perform better later on when you've got something functional. At the end of the day, the only things separating awesome programmers and mediocre ones are experience and practice.&#xD;&#xA;&#xD;&#xA;Of course when you've got something done and want to create further games, there's no reason to reuse your old codebase.&#xD;&#xA;&#xD;&#xA;If you're looking to start a career in game development, or any kind of development really, experience will take you very, very far. But if you're looking to churn out games quickly and easily (relatively easily, compared to writing your own stuff) use an existing engine.&#xD;&#xA;&#xD;&#xA;To be honest with you, a combination of experience using your own code AND using a variety of different libraries and engines will make you a far better coder." />
  <row Id="17958" PostHistoryTypeId="2" PostId="8762" RevisionGUID="b68619eb-45a8-4878-a1f4-42c619aaae9d" CreationDate="2011-02-18T20:01:31.543" UserId="2239" Text="The thing is, what takes a lot of time when doing a game is the actual content and asset creation and testing - not generally writing code. That's likely why it's easy to skip that part and use an existing engine to be able to spend more time on content, game design and higher level bugs.&#xD;&#xA;&#xD;&#xA;I think, doing stuff from scratch to learn, will generate a good feel for the work behind existing engines and improve the ability to select one later on if needed.&#xD;&#xA;&#xD;&#xA;For fun and for learning, do whatever you fancy. If I had to write content pipeline classes from scratch, handling all the annoying details and edge cases of the file system and asset loaders I would go insane - as long as I have learned enough to have a really good grasp for how to do it, I tend to avoid doing it if someone's already done it well (though true, a lot of frameworks and engines won't fit into my own idea of &quot;good&quot; which would be cause to rewrite something). If I don't know how to do it, I really like doing it to completion at least once, just to grasp the finer details of whatever it is - like Ray Dey already stated." />
  <row Id="17959" PostHistoryTypeId="6" PostId="8757" RevisionGUID="416c77b5-9110-445e-b679-432564830e25" CreationDate="2011-02-18T20:05:00.613" UserId="51" Comment="english adjustment, removed ancillary question" Text="&lt;architecture&gt;" />
  <row Id="17960" PostHistoryTypeId="5" PostId="8757" RevisionGUID="416c77b5-9110-445e-b679-432564830e25" CreationDate="2011-02-18T20:05:00.613" UserId="51" Comment="english adjustment, removed ancillary question" Text="Usually whenever I want to start a game, I will think to have a good basic architecture for rendering and better game loop from scratch. I usually don't want to use existing engines. The reason behind it is that I want to implement it on my own to learn stuff.&#xD;&#xA;&#xD;&#xA;But lot of blogs and devs say it's not a good option to go for re-inventing the wheel.&#xD;&#xA;&#xD;&#xA;Am I missing something? " />
  <row Id="17961" PostHistoryTypeId="4" PostId="8757" RevisionGUID="416c77b5-9110-445e-b679-432564830e25" CreationDate="2011-02-18T20:05:00.613" UserId="51" Comment="english adjustment, removed ancillary question" Text="Starting from Scratch - Is it a Mistake if I re-invent the wheel?" />
  <row Id="17962" PostHistoryTypeId="25" PostId="8757" RevisionGUID="4b5cffa0-d648-4fb8-a6f3-7306ba0ca918" CreationDate="2011-02-18T20:22:47.727" Comment="http://twitter.com/#!/StackGameDev/status/38694941496578048" />
  <row Id="17963" PostHistoryTypeId="2" PostId="8763" RevisionGUID="9d726278-4f43-4205-9e4c-b6b2ae4ec611" CreationDate="2011-02-18T20:45:03.980" UserId="4191" Text="Reinventing the wheel teaches you how wheels work." />
  <row Id="17964" PostHistoryTypeId="2" PostId="8764" RevisionGUID="906ac987-fd46-45e6-8cfa-955f74a54800" CreationDate="2011-02-18T20:58:45.597" UserId="2332" Text="In my experience, there's not much available for DirectX, which I think is a great shame. The closest thing I've found is AntTweakBar which (unless you only want the GUI to act as an interface to tweak colours/behaviours/graphics/etc) isn't very fully featured.&#xD;&#xA;&#xD;&#xA;Of course I haven't used it very much, so it may have more features to it but check it out at: http://www.antisphere.com/Wiki/tools:anttweakbar" />
  <row Id="17965" PostHistoryTypeId="2" PostId="8765" RevisionGUID="09f46f85-8338-450d-aac1-e75bd1ffc2f7" CreationDate="2011-02-18T21:38:04.843" UserId="2972" Text="Simple programs that collect data from only one system need only one event loop. For example, Windows applications have the message loop, POSIX network programs usually have a select/epoll/etc. loop at their core, pure SDL games use SDL's event loop. But what if you need to collect events from several subsystems? Such as an SDL game which doesn't use SDL_net for networking.&#xD;&#xA;&#xD;&#xA;I can think of several solutions:&#xD;&#xA;&#xD;&#xA;1. Polling (ugh)&#xD;&#xA;2. Put each event loop in its own thread, and:&#xD;&#xA;&#xD;&#xA;   1. Send messages to the main thread, which collects and processes the events, or&#xD;&#xA;   2. Place the event-processing code of each thread in a critical section, so that the threads can wait for events asynchronously but process them synchronously&#xD;&#xA;&#xD;&#xA;3. Choose one subsystem for the main event loop, and pass events from other subsystems via that subsystem as custom messages (for example, the Windows message loop and custom messages, or a socket select() loop and passing events via a loopback connection).&#xD;&#xA;&#xD;&#xA;Option 2.1 is more interesting on platforms where message-passing is a well-developed threading primitive (e.g. [in the D programming language](http://www.informit.com/articles/article.aspx?p=1609144&amp;seqNum=6)), but 2.2 looks like the best option to me." />
  <row Id="17966" PostHistoryTypeId="1" PostId="8765" RevisionGUID="09f46f85-8338-450d-aac1-e75bd1ffc2f7" CreationDate="2011-02-18T21:38:04.843" UserId="2972" Text="One True Event Loop" />
  <row Id="17967" PostHistoryTypeId="3" PostId="8765" RevisionGUID="09f46f85-8338-450d-aac1-e75bd1ffc2f7" CreationDate="2011-02-18T21:38:04.843" UserId="2972" Text="&lt;architecture&gt;&lt;multithreading&gt;&lt;events&gt;" />
  <row Id="17968" PostHistoryTypeId="2" PostId="8766" RevisionGUID="e54b23af-9c47-4d48-bb6b-a710ce9341f5" CreationDate="2011-02-18T22:00:48.430" UserId="853" Text="I think what you're probably use to in the business world is separating abstraction and implementation. &#xD;&#xA;&#xD;&#xA;In the game dev world, you usually want to think in terms of speed. The more objects you have the more context switches will occur which may slow things down depending on the current load.&#xD;&#xA;&#xD;&#xA;This is only my speculation since I'm a wannabe game developer but a professonial developer." />
  <row Id="17969" PostHistoryTypeId="2" PostId="8767" RevisionGUID="e8269241-5282-4fe5-abe8-8600805f7acc" CreationDate="2011-02-18T22:01:55.510" UserId="5520" Text="I remember looking through the code base of ChucK http://chuck.cs.princeton.edu/ and noticing that the whole program uses just one thread.  ChucK is an interesting example because it fakes concurrency using one thread in a &quot;strongly-timed&quot; model (that's my best explanation ;) ).  However, there are threads for different event sources (MIDI events, Open Sound Control events, or socket messages) and these queue the events for processing by the main loop.&#xD;&#xA;&#xD;&#xA;So...I'd pick option 2.1.  which seems the same as option 3." />
  <row Id="17970" PostHistoryTypeId="2" PostId="8768" RevisionGUID="5f44b57d-c4db-4250-b3df-79bcb1e13e41" CreationDate="2011-02-18T22:06:08.440" UserId="2188" Text="I'd suggest you to completely separate &quot;things that are created in-game&quot; from &quot;things you can buy from outside the game&quot;.&#xD;&#xA;&#xD;&#xA;If you do, you raise the value of both the items bought (because they can't be obtained just farming) *and* the value of the farmable items (because they can't just be bought); this way you don't alienate any player.&#xD;&#xA;&#xD;&#xA;Then, regardless of how these items are obtained, they can be traded (of course you have to pay attention to all the economy problems).&#xD;&#xA;&#xD;&#xA;You are right about the importance of player expectations for the pack contents, about what I suggest:&#xD;&#xA;&#xD;&#xA;- there might be variations on quantity, but small variations (such as 3-5 of this, and 6-9 of that)&#xD;&#xA;- there shouldn't be anything very rare, or some people will buy a lot of packs without getting it, become angry, and not buy any more packs again" />
  <row Id="17971" PostHistoryTypeId="2" PostId="8769" RevisionGUID="352bf840-bf13-4788-bf88-6f9fcfdb7b55" CreationDate="2011-02-18T22:34:54.907" UserId="1198" Text="I don't know if this will get you what you're looking for, but here's a MSDN document on [WPF and Win32 Interoperation][1]. The section &quot;Hosting WPF Content in a Microsoft Win32 Window&quot; may be of the most interest to you. Also, from the first link: [Walkthrough: Hosting WPF in Win32][2].&#xD;&#xA;&#xD;&#xA;While I've never done this, it may be able to get you the benifits you're looking for without having to do too much wheel re-inventing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ms742522.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ms744829.aspx" />
  <row Id="17972" PostHistoryTypeId="2" PostId="8770" RevisionGUID="18ed4592-af53-43b1-8406-75f7f2bac284" CreationDate="2011-02-18T22:38:43.467" UserId="5007" Text="I am not sure how right it is to ask this question, but still here it goes.&#xD;&#xA;&#xD;&#xA;I have a full 2D environment, with sprites going around as landscape, characters, etc&#xD;&#xA;And to make it more state-of-art looking, i want to implement a motion blur effect, similar to modern FPS's (i.e. crysis) blur when moving fast the camera.&#xD;&#xA;&#xD;&#xA;In a sidescroller, the desired effect is having this slight blur appearing to give the idea of fast movement, when the camera is moving. If anyone could give me some tips on doing this, im assuming in a pixel shader, i'd be grate.&#xD;&#xA;&#xD;&#xA;Also, if anyone has other good tips on cool pixel shader effects for 2D games it would be awesome, like some stylizing post fx, such as previous Prince of Persia illustrative style.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="17973" PostHistoryTypeId="1" PostId="8770" RevisionGUID="18ed4592-af53-43b1-8406-75f7f2bac284" CreationDate="2011-02-18T22:38:43.467" UserId="5007" Text="GLSL Shader Effects: How to do motion blur, etc?" />
  <row Id="17974" PostHistoryTypeId="3" PostId="8770" RevisionGUID="18ed4592-af53-43b1-8406-75f7f2bac284" CreationDate="2011-02-18T22:38:43.467" UserId="5007" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;effects&gt;" />
  <row Id="17975" PostHistoryTypeId="2" PostId="8771" RevisionGUID="6ce0b728-cdce-4763-b362-b23934730070" CreationDate="2011-02-18T22:39:57.677" UserDisplayName="user5548" Text="Given a ray in a 2D world at position **p** with initial velocity **u** and acceleration **a** how can I tell when it's within a certain distance **r** from a certain point." />
  <row Id="17976" PostHistoryTypeId="1" PostId="8771" RevisionGUID="6ce0b728-cdce-4763-b362-b23934730070" CreationDate="2011-02-18T22:39:57.677" UserDisplayName="user5548" Text="2D Game Physics: How to evaluate when an accelerating ray is close to a point?" />
  <row Id="17977" PostHistoryTypeId="3" PostId="8771" RevisionGUID="6ce0b728-cdce-4763-b362-b23934730070" CreationDate="2011-02-18T22:39:57.677" UserDisplayName="user5548" Text="&lt;2d&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="17978" PostHistoryTypeId="2" PostId="8772" RevisionGUID="2a8681d8-06e4-4a95-a64e-8139f6e34dd4" CreationDate="2011-02-18T22:47:45.413" UserId="5259" Text="So, the tech that I'm working with right now has a notion of a central message stream shared by all threads via subscription and duplication (threads install handlers which may or may not duplicate consumed messages).&#xD;&#xA;&#xD;&#xA;This stream is fed by a thread dedicated to translating/polling different event queues/devices. If need be, because event sources all expose the same API to this thread, I can (in, say, the case of XInput which seems to be polling-only) create a class containing a thread devoted to handling a particular sort of input; this lets me handle things as diverse as 360 controllers and asynchronous social media querying.&#xD;&#xA;&#xD;&#xA;One nice thing about having this unified stream is also that I can do weird things like have a handler that consumes events and pattern matches them with a state-machine to handle things like attack combos for a fighting game and then emit a game event that says &quot;Haruken!&quot;&#xD;&#xA;&#xD;&#xA;Keep in mind that the end goal for something like this is to combine a diverse range of input events into a single stream some tech is guaranteed to handle correctly (Quake had a good take on this)." />
  <row Id="17979" PostHistoryTypeId="2" PostId="8773" RevisionGUID="26474cb7-6b16-4f58-8d54-31fad60d1438" CreationDate="2011-02-18T23:01:56.803" UserId="1021" Text="I'm always looking for ways to improve the smoothness of my games.  When I read around the net I come across the term &quot;**vsynched**&quot; quite often.  **What does vsynched mean**?" />
  <row Id="17980" PostHistoryTypeId="1" PostId="8773" RevisionGUID="26474cb7-6b16-4f58-8d54-31fad60d1438" CreationDate="2011-02-18T23:01:56.803" UserId="1021" Text="What does vsynched mean?" />
  <row Id="17981" PostHistoryTypeId="3" PostId="8773" RevisionGUID="26474cb7-6b16-4f58-8d54-31fad60d1438" CreationDate="2011-02-18T23:01:56.803" UserId="1021" Text="&lt;graphics&gt;&lt;performance&gt;" />
  <row Id="17982" PostHistoryTypeId="2" PostId="8774" RevisionGUID="80d25bec-fa79-4788-a720-80d1cf6b8926" CreationDate="2011-02-18T23:04:32.307" UserId="2332" Text="It just means that the game matches the refresh rate of the monitor/screen. So if you have a 60Hz monitor (meaning the monitor image is refreshed 60 times a second), the game won't perform above 60 FPS.&#xD;&#xA;&#xD;&#xA;If you have vertical synchronisation (vsync) turned off, then if the GPU and monitor go out of sync, then you get an artifact commonly known as &quot;tearing&quot; like so:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/dFdiD.jpg" />
  <row Id="17983" PostHistoryTypeId="25" PostId="8773" RevisionGUID="c1b33d91-0d1e-4fb5-8c82-8e48632af7f7" CreationDate="2011-02-18T23:22:48.407" Comment="http://twitter.com/#!/StackGameDev/status/38740241074491392" />
  <row Id="17984" PostHistoryTypeId="2" PostId="8775" RevisionGUID="e7d0f7c2-f78b-43f5-a104-2f2d776bf64f" CreationDate="2011-02-18T23:39:00.720" UserId="5020" Text="Uniform motion: s = ut + at^2/2&#xD;&#xA;&#xD;&#xA;Or p(t) - p(0) = ut + at^2 / 2&#xD;&#xA;&#xD;&#xA;You want the first t &gt;= 0 for which (p(t) - C).(p(t) - C) = r^2.&#xD;&#xA;&#xD;&#xA;If u and a could be non-perpendicular then I think you have to solve a quartic." />
  <row Id="17987" PostHistoryTypeId="2" PostId="8777" RevisionGUID="88657a30-99ee-4a9b-9a31-1ae5210f3943" CreationDate="2011-02-18T23:55:43.313" UserId="5554" Text="Take a look at [FLTK][1]. It can be used for all sorts of things and repurposed very simply. It is used especially for application building but is perfectly capable of handling 3D objects and built is on OpenGL.&#xD;&#xA;&#xD;&#xA;Personally I just have a buffer for menu backgrounds, button textures, navigation and string/placement info + an input handling library. Cheers.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fltk.org/applications/shots.php" />
  <row Id="17988" PostHistoryTypeId="2" PostId="8778" RevisionGUID="8e95bbe3-71a5-409d-bb10-4349fc40ecc5" CreationDate="2011-02-19T00:03:45.340" UserId="5554" Text="There is a lot of discouragement about this phrase in the general programing community but I think we all know that many of us love nothing more than reinventing the wheel and finding a way to make it spin a little better, faster and cooler.&#xD;&#xA;&#xD;&#xA;New technologies are coming out all the time which need people to reinvent the wheel. OpenCL and other GPU computing languages are a good example. &#xD;&#xA;&#xD;&#xA;You could use a framework that did include this year's new capabilities but making it on your own, if you really do the research and make improvements on what's already out there,.. you can really trek some new ground in performance and utility.&#xD;&#xA;&#xD;&#xA;Once you have invented a few wheels to get you rolling, you know your stuff pretty well as a strong bonus!&#xD;&#xA;&#xD;&#xA;Plus it's damn good fun." />
  <row Id="17989" PostHistoryTypeId="2" PostId="8779" RevisionGUID="8eacb4cb-f304-4960-92e0-d96985cefe61" CreationDate="2011-02-19T00:06:15.527" UserId="1693" Text="What would be the preferred way of handling game screens in WPF (conforming to MVVM)? I'm not asking about game states but the actual mechanics of presenting various screens.&#xD;&#xA;Do I implement screens as user controls?&#xD;&#xA;Do I collapse and show controls or dynamically add and remove controls from main window?&#xD;&#xA;How do I handle transitions (MenuToOptions, OptionsToMenu, GameToOptions etc.)?" />
  <row Id="17990" PostHistoryTypeId="1" PostId="8779" RevisionGUID="8eacb4cb-f304-4960-92e0-d96985cefe61" CreationDate="2011-02-19T00:06:15.527" UserId="1693" Text="Game screen management in WPF" />
  <row Id="17991" PostHistoryTypeId="3" PostId="8779" RevisionGUID="8eacb4cb-f304-4960-92e0-d96985cefe61" CreationDate="2011-02-19T00:06:15.527" UserId="1693" Text="&lt;wpf&gt;&lt;screen&gt;" />
  <row Id="17992" PostHistoryTypeId="2" PostId="8780" RevisionGUID="7c6eee0f-cccd-4396-83f6-c5b356cb916e" CreationDate="2011-02-19T00:43:33.097" UserId="5555" Text="I'm wondering what is the best (or at least a good) way of managing ennemies in a shoot them up.&#xD;&#xA;&#xD;&#xA;Basically, what i'd do would be a class that manages displaying and updating positions of all the ennemies.&#xD;&#xA;But how to create good deplacements for ennemies ? A list of where-to-go points ? _gravitating_ around some fixed points (with ponderation, distance evaluation etc) ?&#xD;&#xA;&#xD;&#xA;Same question for the shoot patterns ?&#xD;&#xA;&#xD;&#xA;Can you please put me on a track ?&#xD;&#xA;&#xD;&#xA;thanks :)" />
  <row Id="17993" PostHistoryTypeId="1" PostId="8780" RevisionGUID="7c6eee0f-cccd-4396-83f6-c5b356cb916e" CreationDate="2011-02-19T00:43:33.097" UserId="5555" Text="How to manage ennemy deplacement and shoot in a shmup ?" />
  <row Id="17994" PostHistoryTypeId="3" PostId="8780" RevisionGUID="7c6eee0f-cccd-4396-83f6-c5b356cb916e" CreationDate="2011-02-19T00:43:33.097" UserId="5555" Text="&lt;c++&gt;&lt;movement&gt;" />
  <row Id="17995" PostHistoryTypeId="5" PostId="8624" RevisionGUID="833d3591-7803-4027-9d22-9e143ff88814" CreationDate="2011-02-19T00:56:09.940" UserId="202" Comment="spelling" Text="Use a simple [**observer pattern**](http://en.wikipedia.org/wiki/Observer_pattern):&#xD;&#xA;&#xD;&#xA;1. The player input (mouse clicks/button presses) manipulates the model (abstract representation of chess board with pieces on it).&#xD;&#xA;2. Your graphics component responsible for animating and rendering gets notified when the model's state changes and plays the according animation.&#xD;&#xA;&#xD;&#xA;There are two ways to &quot;sync&quot; both modules:&#xD;&#xA;&#xD;&#xA;1. Prevent any player input while an animation is running.&#xD;&#xA;2. Maintain a queue in which you insert animations that are then being played one after another, thus giving your players the possibility to &quot;play ahead&quot; (for example choosing a piece that isn't involved in the current animation and moving it after realizing what the enemy just did)&#xD;&#xA;&#xD;&#xA;Don't forget that your model contains all the game logic and follow this rule strictly. The graphics system just acts like an UI, while the model decides whether moves are actually allowed or not. This clear separation answers many questions (like: &quot;What if someone commands a piece to do X, when it's currently doing Y?&quot;) and avoids logic problems along the course of the game implementation.&#xD;&#xA;&#xD;&#xA;**Edit: Example Implementation**&lt;br/&gt;&#xD;&#xA;Logic should be separated from the graphical representation.&#xD;&#xA;&#xD;&#xA;    class LogicalPiece {&#xD;&#xA;        Type _type; //enum: &quot;Pawn&quot;, &quot;Knight&quot;, ...&#xD;&#xA;        int _owner; //player index&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GraphicalPiece : LogicalPiece {&#xD;&#xA;        SpriteBatch _sprite;&#xD;&#xA;        Vector2 position;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The board can then store the logic aspects of all pieces while at the same time providing access to graphical information for the graphics system:&#xD;&#xA;&#xD;&#xA;    LogicalPiece[] _pieces = new GraphicalPiece[64];&#xD;&#xA;&#xD;&#xA;Example move:&#xD;&#xA;&#xD;&#xA;    //graphics system asks:&#xD;&#xA;    if (game.board.isMoveVald(startPos, endPos, player)) {&#xD;&#xA;        Move m = game.board.makeMove(startPos, endPos, player);&#xD;&#xA;        //process m&#xD;&#xA;    } else {&#xD;&#xA;        //output error msg&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;where the internal structure of *m* could look something like that:&#xD;&#xA;&#xD;&#xA;    m = {&#xD;&#xA;        action: &quot;move&quot;,&#xD;&#xA;        piece: board[34], //the actual GraphicalPiece provided by the board&#xD;&#xA;        startPos: {2, 5},&#xD;&#xA;        endPos: {1, 7},&#xD;&#xA;        effects : [&#xD;&#xA;            { effect: &quot;death&quot;,&#xD;&#xA;              piece: board[57] //some GraphicalPiece },&#xD;&#xA;            { effect: &quot;promotion&quot;,&#xD;&#xA;              callback: someFunc }&#xD;&#xA;        ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The graphics system updates itself with a fixed timestep (for example 60 times per second) and in the course of that includes animations of pieces. The game, when asked to do a move, not only updates itself(/the model), but collects all the changes that this move will cause and provides that information to the graphics system which parses and visualizes it. There are many implementation details to figure out, like:&#xD;&#xA;&#xD;&#xA;- What kind of notification to use: Events, callbacks or return values?&#xD;&#xA;- Should there be one central draw method or should every piece know how to draw (and animate) itself, so that the graphics system just dispatches animations?&#xD;&#xA;- etc.&#xD;&#xA;&#xD;&#xA;My advice is to start coding! Set yourself very easy goals at first and only add new goals after reaching the current one. The details will crystalize out over the course of programming. By trying to plan everything ahead all you'll accomplish is a headache.&#xD;&#xA;&#xD;&#xA;Possible roadmap:&#xD;&#xA;&#xD;&#xA;1. Be able to draw a game situation with the simplest imaginable implementation: Pieces' graphical representations are updated instantly just like the abstract model (they vanish at one place and pop out at another one)&#xD;&#xA;2. With the system in (1) implement all rules of the game so that players can play it with the correct outcome.&#xD;&#xA;3. Add moving animations: Pieces shall slide smoothly from origins to destinations.&#xD;&#xA;4. Add fighting animations.&#xD;&#xA;&#xD;&#xA;..." />
  <row Id="17996" PostHistoryTypeId="2" PostId="8781" RevisionGUID="402a8dc3-0048-49d5-b365-259ee3bffbab" CreationDate="2011-02-19T01:03:58.793" UserId="1923" Text="Here is a graphical example of what I meant in the comment I wrote in the comment section of the OP's question. While the ticks representing the d values progress evenly from one vector to the other, the angular change (red lines) is not even. the changes near the middle of the sequence represent greater change than near the ends. so an animation of interpolated vectors will start slow, speed up near the middle, and slow down towards the end. If the angle between start and end is not great, it may not be noticeable.&#xD;&#xA;&#xD;&#xA;The varying lengths of the interpolated vectors (red lines) are the reason your model was shrinking in places too as they will scale the model to their lengths. &#xD;&#xA;&#xD;&#xA;If you used quaternions, the blue line would arc from vec A to vec B and each tick would cause equal angular change as well as an equal distance along the arc.&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zfulF.png" />
  <row Id="17997" PostHistoryTypeId="25" PostId="8780" RevisionGUID="2d4ee1a8-4ef4-4685-a99a-9fb3f1998cd8" CreationDate="2011-02-19T02:22:49.767" Comment="http://twitter.com/#!/StackGameDev/status/38785547086340096" />
  <row Id="17998" PostHistoryTypeId="5" PostId="8781" RevisionGUID="ed08554f-adfe-4a00-97c4-0a9f4ab726da" CreationDate="2011-02-19T02:41:10.930" UserId="1923" Comment="added 1 characters in body" Text="Here is a graphical example of what I meant in the comment I wrote in the comment section of the OP's question. While the ticks representing the d values progress evenly from one vector to the other, the angular change (red lines) are not even. the changes near the middle of the sequence represent greater change than near the ends. so an animation of interpolated vectors will start slow, speed up near the middle, and slow down towards the end. If the angle between start and end is not great, it may not be noticeable.&#xD;&#xA;&#xD;&#xA;The varying lengths of the interpolated vectors (red lines) are the reason your model was shrinking in places too as they will scale the model to their lengths. &#xD;&#xA;&#xD;&#xA;If you used quaternions, the blue line would arc from vec A to vec B and each tick would cause equal angular change as well as an equal distance along the arc.&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zfulF.png" />
  <row Id="17999" PostHistoryTypeId="5" PostId="8780" RevisionGUID="f4b60bdb-9896-4bc5-9fdd-089811414cab" CreationDate="2011-02-19T03:30:13.787" UserId="4191" Comment="fix the more obvious typos" Text="I'm wondering what is the best (or at least a good) way of managing enemies in a shoot-em-up.&#xD;&#xA;&#xD;&#xA;Basically, what I'd do would be a class that manages displaying and updating positions of all the enemies.&#xD;&#xA;But how to create good deplacements for enemies?  A list of where-to-go points? _gravitating_ around some fixed points (with ponderation, distance evaluation etc.)?&#xD;&#xA;&#xD;&#xA;Same question for the shoot patterns?&#xD;&#xA;&#xD;&#xA;Can you please put me on a track?" />
  <row Id="18000" PostHistoryTypeId="4" PostId="8780" RevisionGUID="f4b60bdb-9896-4bc5-9fdd-089811414cab" CreationDate="2011-02-19T03:30:13.787" UserId="4191" Comment="fix the more obvious typos" Text="How to manage enemy deplacement and shoot in a shmup?" />
  <row Id="18001" PostHistoryTypeId="24" PostId="8780" RevisionGUID="09427a26-0109-400d-9c50-b15521fa2f4a" CreationDate="2011-02-19T03:30:13.787" Comment="Proposed by 4191 approved by 51 edit id of 41" />
  <row Id="18004" PostHistoryTypeId="2" PostId="8783" RevisionGUID="74b7efff-c395-4695-88d7-a8a66c44f8fb" CreationDate="2011-02-19T04:20:05.820" UserId="5559" Text="I am planning to make a small game in the near future. How can I minimize the chances of it being pirated. " />
  <row Id="18005" PostHistoryTypeId="1" PostId="8783" RevisionGUID="74b7efff-c395-4695-88d7-a8a66c44f8fb" CreationDate="2011-02-19T04:20:05.820" UserId="5559" Text="Minimizing chances of Piracy" />
  <row Id="18006" PostHistoryTypeId="3" PostId="8783" RevisionGUID="74b7efff-c395-4695-88d7-a8a66c44f8fb" CreationDate="2011-02-19T04:20:05.820" UserId="5559" Text="&lt;game-industry&gt;" />
  <row Id="18007" PostHistoryTypeId="2" PostId="8784" RevisionGUID="408aa830-2063-4b9f-9300-5733d33450c3" CreationDate="2011-02-19T04:38:29.987" UserId="3146" Text="The most effective type of DRM is to make sure that at least one part of the game is not actually included with the installer and cannot be duplicated by pirates. For example, have all the maps be stored on a server which you maintain and downloaded when the user runs the game. You can make this somewhat more effective by making users sign in with a username and password before the game can download this content. &#xD;&#xA;&#xD;&#xA;However, then the game won't run without an Internet connection and you have to maintain the server and pay for this bandwidth. In addition, even this can easily be defeated by a determined pirate.&#xD;&#xA;&#xD;&#xA;In fact, almost all traditional DRM methods don't work. The best you could hope for is making it too inconvenient to pirate the game, so it's not worth the trouble.&#xD;&#xA;&#xD;&#xA;There is a lot to be said for the honor system. Sure, you end up with some piracy, but there are plenty of businesses (GoG.com, Wolfire, 2DBoy, etc.) which have been very profitable without using any form of DRM. " />
  <row Id="18008" PostHistoryTypeId="2" PostId="8785" RevisionGUID="6e69fe6c-4d5d-4372-996a-5f22bc3ba76c" CreationDate="2011-02-19T04:46:41.703" UserDisplayName="user5560" Text="I'm reading C++ Primer Plus 5th Edition. I'm over at Chapter 8 exercises, which is more than half of the book to go but I was wondering ***what would be the &quot;next step&quot; after I'm through with the book?***&#xD;&#xA;&#xD;&#xA;I want to use SDL/OpenGL and whatever cross-platform open source api's and libs there are available for other components of game development." />
  <row Id="18009" PostHistoryTypeId="1" PostId="8785" RevisionGUID="6e69fe6c-4d5d-4372-996a-5f22bc3ba76c" CreationDate="2011-02-19T04:46:41.703" UserDisplayName="user5560" Text="C++ game-programming; What would be the &quot;next step&quot;?" />
  <row Id="18010" PostHistoryTypeId="3" PostId="8785" RevisionGUID="6e69fe6c-4d5d-4372-996a-5f22bc3ba76c" CreationDate="2011-02-19T04:46:41.703" UserDisplayName="user5560" Text="&lt;c++&gt;&lt;game&gt;" />
  <row Id="18011" PostHistoryTypeId="2" PostId="8786" RevisionGUID="c03702f9-c268-4370-b504-b3528813babb" CreationDate="2011-02-19T04:54:27.737" UserId="2338" Text="[Keeping the pirates at bay][1] is an old article about an old game for an old system, but it still makes for interesting reading, and may give you some ideas to keep a game 'uncracked' for a little while longer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3030/keeping_the_pirates_at_bay.php" />
  <row Id="18012" PostHistoryTypeId="5" PostId="8786" RevisionGUID="0054bcf0-3954-4bc4-a501-ea478167f7a5" CreationDate="2011-02-19T05:09:30.493" UserId="2338" Comment="added 64 characters in body" Text="Your game will be cracked, and it will be pirated. Having said that... [Keeping the pirates at bay][1] is an old article about an old game for an old system, but it still makes for interesting reading, and may give you some ideas to keep a game 'uncracked' for a little while.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3030/keeping_the_pirates_at_bay.php" />
  <row Id="18013" PostHistoryTypeId="25" PostId="8783" RevisionGUID="cc94e892-5f7b-476a-9f7e-1d8b29dd6f85" CreationDate="2011-02-19T05:22:50.290" Comment="http://twitter.com/#!/StackGameDev/status/38830847650045952" />
  <row Id="18014" PostHistoryTypeId="2" PostId="8787" RevisionGUID="7a0cc486-e952-4f41-9f1d-5c84bc1f0ad8" CreationDate="2011-02-19T06:25:40.690" UserId="2787" Text="Quite simply you should put what you've learned to the test and start making a simple game." />
  <row Id="18018" PostHistoryTypeId="2" PostId="8789" RevisionGUID="2ceb7e40-2c86-43a4-a09d-152c645b366d" CreationDate="2011-02-19T07:48:18.793" UserId="387" Text="Have a look at [AntTweakBar][1], it's being used by [Cinder][2]. There is also a new GUI library developed for Cinder in the works: [SimpleGUI][3].&#xD;&#xA;&#xD;&#xA;If you want to go HTML+CSS there is [Awesomium][4] (used by [Wolfire Games in their Overgrowth game][5]) and a free alternative called [Berkelium][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.antisphere.com/Wiki/tools:anttweakbar&#xD;&#xA;  [2]: http://libcinder.org/&#xD;&#xA;  [3]: http://marcinignac.com/blog/simplegui/&#xD;&#xA;  [4]: http://www.khrona.com/products/awesomium/&#xD;&#xA;  [5]: http://blog.wolfire.com/2009/07/a-webkit-primer-part-1/&#xD;&#xA;  [6]: http://berkelium.org/" />
  <row Id="18019" PostHistoryTypeId="25" PostId="8785" RevisionGUID="69237410-be06-4ece-a15f-8ec09b2d0be7" CreationDate="2011-02-19T08:22:50.663" Comment="http://twitter.com/#!/StackGameDev/status/38876147794051072" />
  <row Id="18020" PostHistoryTypeId="2" PostId="8790" RevisionGUID="9936b398-aeff-454d-99e0-f21a23b5d134" CreationDate="2011-02-19T08:58:42.743" UserId="4638" Text="I am learning to use Frame Buffer Objects. For this purpose, I chose to render a triangle to a texture and then map that to a quad.&#xD;&#xA;&#xD;&#xA;When I render the triangle, I clear the color to something blue. So, when I render the texture on the quad from fbo, it only renders everything blue, but doesn't show up the triangle. I can't seem to figure out why this is happening. Can someone please help me out with this ? &#xD;&#xA;&#xD;&#xA;I'll post the rendering code here, since `glCheckFramebufferStatus` doesn't complain when I setup the FBO. However, if you want me to post the code. I'll update it. Here is my rendering code:&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::Render(unsigned int elapsedGameTime)&#xD;&#xA;	{&#xD;&#xA;		glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);&#xD;&#xA;		glClearColor(0.0, 0.6, 0.5, 1);&#xD;&#xA;		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;		// adjust viewport and projection matrices to texture dimensions&#xD;&#xA;		glPushAttrib(GL_VIEWPORT_BIT);&#xD;&#xA;		glViewport(0,0, m_FBOWidth, m_FBOHeight);&#xD;&#xA;	&#xD;&#xA;		glMatrixMode(GL_PROJECTION);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;		glOrtho(0, m_FBOWidth, 0, m_FBOHeight, 1.0, 100.0);&#xD;&#xA;&#xD;&#xA;		glMatrixMode(GL_MODELVIEW);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;&#xD;&#xA;		DrawTriangle();&#xD;&#xA;&#xD;&#xA;		glPopAttrib();&#xD;&#xA;		// setting FrameBuffer back to window-specified Framebuffer&#xD;&#xA;		glBindFramebuffer(GL_FRAMEBUFFER, 0);		//unbind&#xD;&#xA;&#xD;&#xA;		// back to normal viewport and projection matrix&#xD;&#xA;		//glViewport(0, 0, 1280, 768);&#xD;&#xA;&#xD;&#xA;		glMatrixMode(GL_PROJECTION);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;		gluPerspective(45.0, 1.33, 1.0, 1000.0);&#xD;&#xA;&#xD;&#xA;		glMatrixMode(GL_MODELVIEW);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;&#xD;&#xA;		glClearColor(0, 0, 0, 0);&#xD;&#xA;		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;		render(elapsedGameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::DrawTriangle()&#xD;&#xA;	{&#xD;&#xA;		glPushMatrix();&#xD;&#xA;&#xD;&#xA;		glBegin(GL_TRIANGLES);&#xD;&#xA;			glColor3f(1, 0, 0);&#xD;&#xA;&#xD;&#xA;			glVertex2d(0, 0);&#xD;&#xA;			glVertex2d(m_FBOWidth, 0);&#xD;&#xA;			glVertex2d(m_FBOWidth, m_FBOHeight);&#xD;&#xA;&#xD;&#xA;		glEnd();&#xD;&#xA;&#xD;&#xA;		glPopMatrix();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::render(unsigned int elapsedTime)&#xD;&#xA;	{&#xD;&#xA;		glEnable(GL_TEXTURE_2D);&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, m_TextureID);&#xD;&#xA;&#xD;&#xA;		glPushMatrix();&#xD;&#xA;&#xD;&#xA;			glTranslated(0, 0, -20);&#xD;&#xA;&#xD;&#xA;		glBegin(GL_QUADS);&#xD;&#xA;			glColor4f(1, 1, 1, 1);&#xD;&#xA;&#xD;&#xA;			glTexCoord2f(1, 1);  glVertex3f(1,1,1);&#xD;&#xA;			glTexCoord2f(0, 1);  glVertex3f(-1,1,1);&#xD;&#xA;			glTexCoord2f(0, 0);  glVertex3f(-1,-1,1);&#xD;&#xA;			glTexCoord2f(1, 0);  glVertex3f(1,-1,1);&#xD;&#xA;&#xD;&#xA;		glEnd();&#xD;&#xA;		glPopMatrix();&#xD;&#xA;&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;		glDisable(GL_TEXTURE_2D);&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18021" PostHistoryTypeId="1" PostId="8790" RevisionGUID="9936b398-aeff-454d-99e0-f21a23b5d134" CreationDate="2011-02-19T08:58:42.743" UserId="4638" Text="FrameBuffer Render to texture not working all the way" />
  <row Id="18022" PostHistoryTypeId="3" PostId="8790" RevisionGUID="9936b398-aeff-454d-99e0-f21a23b5d134" CreationDate="2011-02-19T08:58:42.743" UserId="4638" Text="&lt;opengl&gt;&lt;rendering&gt;" />
  <row Id="18023" PostHistoryTypeId="2" PostId="8791" RevisionGUID="5c2c6343-b2ba-453f-a0f2-ec738fc740cc" CreationDate="2011-02-19T09:15:35.367" UserId="662" Text="There doesn't seem to anything inherently wrong to your code. It might be in your initialization, but you haven't posted that. &#xD;&#xA;&#xD;&#xA;That you have a blue rectangle on the screen means your FBO is working right, your problem is in the rendering of the triangle.&#xD;&#xA;&#xD;&#xA;Try turning backface culling into frontface culling before rendering:&#xD;&#xA;&#xD;&#xA;    glCullFace(GL_FRONT);&#xD;&#xA;&#xD;&#xA;Alternatively, just copy a triangle from a NeHe tutorial and see if that works.&#xD;&#xA;&#xD;&#xA;	glBegin(GL_TRIANGLES);						// Drawing Using Triangles&#xD;&#xA;		glVertex3f( 0.0f, 1.0f, 0.0f);				// Top&#xD;&#xA;		glVertex3f(-1.0f,-1.0f, 0.0f);				// Bottom Left&#xD;&#xA;		glVertex3f( 1.0f,-1.0f, 0.0f);				// Bottom Right&#xD;&#xA;	glEnd();							// Finished Drawing The Triangle" />
  <row Id="18024" PostHistoryTypeId="2" PostId="8792" RevisionGUID="ddeb1d3b-7aea-4f28-8155-c0985d0b9bfa" CreationDate="2011-02-19T09:26:03.343" UserId="5565" Text="im looking for some open source xbox project, I just wanna join it and try myself as game programmer, does anybody know such project?" />
  <row Id="18025" PostHistoryTypeId="1" PostId="8792" RevisionGUID="ddeb1d3b-7aea-4f28-8155-c0985d0b9bfa" CreationDate="2011-02-19T09:26:03.343" UserId="5565" Text="xbox open source project" />
  <row Id="18026" PostHistoryTypeId="3" PostId="8792" RevisionGUID="ddeb1d3b-7aea-4f28-8155-c0985d0b9bfa" CreationDate="2011-02-19T09:26:03.343" UserId="5565" Text="&lt;xbox360&gt;&lt;open-source&gt;&lt;xbox&gt;" />
  <row Id="18027" PostHistoryTypeId="5" PostId="8790" RevisionGUID="7ef387ec-11d2-47a9-9f06-0a80d79187a7" CreationDate="2011-02-19T09:26:58.043" UserId="4638" Comment="updated the initialization code" Text="I am learning to use Frame Buffer Objects. For this purpose, I chose to render a triangle to a texture and then map that to a quad.&#xD;&#xA;&#xD;&#xA;When I render the triangle, I clear the color to something blue. So, when I render the texture on the quad from fbo, it only renders everything blue, but doesn't show up the triangle. I can't seem to figure out why this is happening. Can someone please help me out with this ? &#xD;&#xA;&#xD;&#xA;I'll post the rendering code here, since `glCheckFramebufferStatus` doesn't complain when I setup the FBO. I've pasted the setup code at the end. Here is my rendering code:&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::Render(unsigned int elapsedGameTime)&#xD;&#xA;	{&#xD;&#xA;		glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);&#xD;&#xA;		glClearColor(0.0, 0.6, 0.5, 1);&#xD;&#xA;		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;		// adjust viewport and projection matrices to texture dimensions&#xD;&#xA;		glPushAttrib(GL_VIEWPORT_BIT);&#xD;&#xA;		glViewport(0,0, m_FBOWidth, m_FBOHeight);&#xD;&#xA;	&#xD;&#xA;		glMatrixMode(GL_PROJECTION);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;		glOrtho(0, m_FBOWidth, 0, m_FBOHeight, 1.0, 100.0);&#xD;&#xA;&#xD;&#xA;		glMatrixMode(GL_MODELVIEW);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;&#xD;&#xA;		DrawTriangle();&#xD;&#xA;&#xD;&#xA;		glPopAttrib();&#xD;&#xA;		// setting FrameBuffer back to window-specified Framebuffer&#xD;&#xA;		glBindFramebuffer(GL_FRAMEBUFFER, 0);		//unbind&#xD;&#xA;&#xD;&#xA;		// back to normal viewport and projection matrix&#xD;&#xA;		//glViewport(0, 0, 1280, 768);&#xD;&#xA;&#xD;&#xA;		glMatrixMode(GL_PROJECTION);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;		gluPerspective(45.0, 1.33, 1.0, 1000.0);&#xD;&#xA;&#xD;&#xA;		glMatrixMode(GL_MODELVIEW);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;&#xD;&#xA;		glClearColor(0, 0, 0, 0);&#xD;&#xA;		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;		render(elapsedGameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::DrawTriangle()&#xD;&#xA;	{&#xD;&#xA;		glPushMatrix();&#xD;&#xA;&#xD;&#xA;		glBegin(GL_TRIANGLES);&#xD;&#xA;			glColor3f(1, 0, 0);&#xD;&#xA;&#xD;&#xA;			glVertex2d(0, 0);&#xD;&#xA;			glVertex2d(m_FBOWidth, 0);&#xD;&#xA;			glVertex2d(m_FBOWidth, m_FBOHeight);&#xD;&#xA;&#xD;&#xA;		glEnd();&#xD;&#xA;&#xD;&#xA;		glPopMatrix();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::render(unsigned int elapsedTime)&#xD;&#xA;	{&#xD;&#xA;		glEnable(GL_TEXTURE_2D);&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, m_TextureID);&#xD;&#xA;&#xD;&#xA;		glPushMatrix();&#xD;&#xA;&#xD;&#xA;			glTranslated(0, 0, -20);&#xD;&#xA;&#xD;&#xA;		glBegin(GL_QUADS);&#xD;&#xA;			glColor4f(1, 1, 1, 1);&#xD;&#xA;&#xD;&#xA;			glTexCoord2f(1, 1);  glVertex3f(1,1,1);&#xD;&#xA;			glTexCoord2f(0, 1);  glVertex3f(-1,1,1);&#xD;&#xA;			glTexCoord2f(0, 0);  glVertex3f(-1,-1,1);&#xD;&#xA;			glTexCoord2f(1, 0);  glVertex3f(1,-1,1);&#xD;&#xA;&#xD;&#xA;		glEnd();&#xD;&#xA;		glPopMatrix();&#xD;&#xA;&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;		glDisable(GL_TEXTURE_2D);&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;	void FrameBufferObject::Initialize()&#xD;&#xA;	{&#xD;&#xA;		// Generate FBO&#xD;&#xA;		glGenFramebuffers(1, &amp;m_FBO);&#xD;&#xA;		glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);&#xD;&#xA;&#xD;&#xA;		// Add depth buffer as a renderbuffer to fbo&#xD;&#xA;		// create depth buffer id&#xD;&#xA;	&#xD;&#xA;		glGenRenderbuffers(1, &amp;m_DepthBuffer);&#xD;&#xA;		glBindRenderbuffer(GL_RENDERBUFFER, m_DepthBuffer);&#xD;&#xA;&#xD;&#xA;		// allocate space to render buffer for depth buffer&#xD;&#xA;		glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, m_FBOWidth, m_FBOHeight);&#xD;&#xA;&#xD;&#xA;		// attaching renderBuffer to FBO&#xD;&#xA;		// attach depth buffer to FBO at depth_attachment&#xD;&#xA;		glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_DepthBuffer);&#xD;&#xA;&#xD;&#xA;		// Adding a texture to fbo&#xD;&#xA;		// Create a texture&#xD;&#xA;		glGenTextures(1, &amp;m_TextureID);&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, m_TextureID);&#xD;&#xA;		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA;		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;		glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, m_FBOWidth, m_FBOHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);	// onlly allocating space&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;&#xD;&#xA;		// attach texture to FBO&#xD;&#xA;		glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_TextureID, 0);&#xD;&#xA;&#xD;&#xA;		// Check FBO Status&#xD;&#xA;		if( glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)&#xD;&#xA;			std::cout &lt;&lt; &quot;\n Error:: FrameBufferObject::Initialize() :: FBO loading not complete \n&quot;;&#xD;&#xA;&#xD;&#xA;		// switch back to window system Framebuffer&#xD;&#xA;		glBindFramebuffer(GL_FRAMEBUFFER, 0);&#xD;&#xA;    }&#xD;&#xA;Thanks!" />
  <row Id="18029" PostHistoryTypeId="5" PostId="8791" RevisionGUID="525eb96f-3279-4a0b-ab87-9add98400048" CreationDate="2011-02-19T09:54:06.247" UserId="662" Comment="second stab at solving problem: depth texture; added 113 characters in body" Text="There doesn't seem to anything inherently wrong to your code. It might be in your initialization, but you haven't posted that. &#xD;&#xA;&#xD;&#xA;That you have a blue rectangle on the screen means your FBO is working right, your problem is in the rendering of the triangle.&#xD;&#xA;&#xD;&#xA;Try turning backface culling into frontface culling before rendering:&#xD;&#xA;&#xD;&#xA;    glCullFace(GL_FRONT);&#xD;&#xA;&#xD;&#xA;Alternatively, just copy a triangle from a NeHe tutorial and see if that works.&#xD;&#xA;&#xD;&#xA;	glBegin(GL_TRIANGLES);						// Drawing Using Triangles&#xD;&#xA;		glVertex3f( 0.0f, 1.0f, 0.0f);				// Top&#xD;&#xA;		glVertex3f(-1.0f,-1.0f, 0.0f);				// Bottom Left&#xD;&#xA;		glVertex3f( 1.0f,-1.0f, 0.0f);				// Bottom Right&#xD;&#xA;	glEnd();							// Finished Drawing The Triangle&#xD;&#xA;&#xD;&#xA;EDIT: Second stab at solving this problem. Maybe the FBO isn't initialized properly?&#xD;&#xA;&#xD;&#xA;My own version of the FBO init code:&#xD;&#xA;&#xD;&#xA;	RenderTarget::RenderTarget( unsigned int a_Width, unsigned int a_Height, int a_Colors/* = 1*/, bool a_Depth/* = true*/)&#xD;&#xA;	{&#xD;&#xA;		m_Width = a_Width;&#xD;&#xA;		m_Height = a_Height;&#xD;&#xA;		m_Ratio = (float)m_Width / (float)m_Height;&#xD;&#xA;&#xD;&#xA;		// this function returns the width and height if a system doesn't have&#xD;&#xA;		// non-power of two texture support&#xD;&#xA;		GetTextureSizes(&amp;m_TexWidth, m_Width, &amp;m_TexHeight, m_Height);&#xD;&#xA;&#xD;&#xA;		m_TextureColors = a_Colors;&#xD;&#xA;		m_TextureTotal = a_Colors;&#xD;&#xA;		if (a_Depth) { m_TextureTotal++; }&#xD;&#xA;&#xD;&#xA;		m_Texture = new GLuint[m_TextureTotal];&#xD;&#xA;		glGenTextures(m_TextureTotal, m_Texture);&#xD;&#xA;		m_TexDepth = NULL;&#xD;&#xA;&#xD;&#xA;		glGenFramebuffersEXT(1, &amp;m_Target);&#xD;&#xA;		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_Target);&#xD;&#xA;&#xD;&#xA;		glEnable(GL_TEXTURE_2D);&#xD;&#xA;&#xD;&#xA;		int i = 0;&#xD;&#xA;		for (; i &lt; a_Colors; i++)&#xD;&#xA;		{&#xD;&#xA;			glBindTexture(GL_TEXTURE_2D, m_Texture[i]);&#xD;&#xA;				glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA;				glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;				glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;				glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;				glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, m_TexWidth, m_TexHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);&#xD;&#xA;			glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT + i, GL_TEXTURE_2D, m_Texture[i], 0);&#xD;&#xA;		}&#xD;&#xA;		if (a_Depth)&#xD;&#xA;		{&#xD;&#xA;			m_TexDepth = m_Texture[i];&#xD;&#xA;			&#xD;&#xA;			glBindTexture(GL_TEXTURE_2D, m_TexDepth);&#xD;&#xA;&#xD;&#xA;			glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;			glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA;			glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;			glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;			&#xD;&#xA;			glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, m_TexWidth, m_TexHeight, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);&#xD;&#xA;&#xD;&#xA;			glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, m_TexDepth, 0);&#xD;&#xA;		}&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;		glDisable(GL_TEXTURE_2D);&#xD;&#xA;&#xD;&#xA;		GLenum status;&#xD;&#xA;		&#xD;&#xA;		status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);&#xD;&#xA;		if (status != GL_FRAMEBUFFER_COMPLETE_EXT)&#xD;&#xA;		{&#xD;&#xA;			int i = 0;&#xD;&#xA;		}&#xD;&#xA;		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;As you can see, I attach a depth texture, not a depth render target." />
  <row Id="18030" PostHistoryTypeId="4" PostId="8780" RevisionGUID="40a12ec6-650a-47ba-99ea-611721b244b2" CreationDate="2011-02-19T11:12:13.143" UserId="5555" Comment="changed 'deplacement' to 'movement'" Text="How to manage enemy movement and shoot in a shmup?" />
  <row Id="18031" PostHistoryTypeId="2" PostId="8793" RevisionGUID="e124a667-2613-4fe8-88aa-493e809fc0e7" CreationDate="2011-02-19T11:19:40.827" UserId="744" Text="Use &lt;a href=&quot;http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html&quot;&gt;BulletML&lt;/a&gt; to define shot patterns:&#xD;&#xA;&#xD;&#xA;&gt; BulletML is the Bullet Markup Language. BulletML can describe the barrage of bullets in shooting games. (The storm of Progear, Psyvariar, Gigawing2, G DARIUS, XEVIOUS, ...)&#xD;&#xA;&#xD;&#xA;Most simple enemy movement can also be expressed in BulletML; bosses may need a bit more state. It has been used in many games and prototypes.&#xD;&#xA;&#xD;&#xA;The reference implementation is in Java. If you want to use C+++, you can use &lt;a href=&quot;http://shinh.skr.jp/libbulletml/index_en.html&quot;&gt;libBulletML&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18032" PostHistoryTypeId="25" PostId="8790" RevisionGUID="11aba309-5449-4fe5-abd3-3af3b12fe158" CreationDate="2011-02-19T11:22:50.937" Comment="http://twitter.com/#!/StackGameDev/status/38921447246274560" />
  <row Id="18033" PostHistoryTypeId="2" PostId="8794" RevisionGUID="00a4781f-6510-443f-bbe9-22283d3fa00f" CreationDate="2011-02-19T11:22:53.043" UserId="2696" Text="Books are often not the best of resources when it comes to learning programming. Especially in a language as complex as C++. If this is your first language I strongly suggest starting out with another language such as Java or C#/XNA which are both easy to learn and give you a good understanding of whats involved in building a game. Simply diving into SDL/OpenGL and expecting to build a game without having much understanding of how things work is a big mistake, one that many people make which results in them disliking programming.&#xD;&#xA;&#xD;&#xA;The book should only be used as a reference. You need to personally think of problems which you can solve and then solve them. Then begin writing more complex programs such as, for example Battleships in a console environment. The more programming you do the better you get. Furthermore, books don't teach you how to design your code, you get that from experience. Designing a good structure for your program is a difficult task but the more your practice the better you will get.&#xD;&#xA;&#xD;&#xA;Just as a side note. 3D programming is a lot more complicated than 2D programming (I'm assuming you want to build 3D games). Try building console games first then go to 2D. Once you learn more only then you will have the skills to attempt 3D and graphics programming." />
  <row Id="18034" PostHistoryTypeId="2" PostId="8795" RevisionGUID="3eed6a3c-40e4-4dab-aff4-3a1d7473fb4c" CreationDate="2011-02-19T11:28:51.810" UserDisplayName="user5567" Text="I'm trying to implement atmospheric scattering based on Sean O`Neil algorithm that was published in GPU Gems 2. But I have some trouble getting the shader to work. My latest attempts resulted in: http://img253.imageshack.us/g/scattering01.png/ &#xD;&#xA;&#xD;&#xA;I've downloaded sample code of O`Neil from: http://http.download.nvidia.com/developer/GPU_Gems_2/CD/Index.html. Made minor adjustments to the shader 'SkyFromAtmosphere' that would allow it to run in AMD RenderMonkey.&#xD;&#xA;&#xD;&#xA;In the images it is see-able a form of banding occurs, getting an blueish tone. However it is only applied to one half of the sphere, the other half is completely black. Also the banding appears to occur at Zenith instead of Horizon, and for a reason I managed to get pac-man shape.&#xD;&#xA;&#xD;&#xA;I would appreciate it if somebody could show me what I'm doing wrong. &#xD;&#xA;&#xD;&#xA;Vertex Shader:&#xD;&#xA;&#xD;&#xA;    uniform mat4 matView;&#xD;&#xA;    uniform vec4 view_position; &#xD;&#xA;    uniform vec3 v3LightPos;      &#xD;&#xA;    &#xD;&#xA;    const int   nSamples = 3;&#xD;&#xA;    const float fSamples = 3.0;&#xD;&#xA;    const vec3  Wavelength = vec3(0.650,0.570,0.475);&#xD;&#xA;    &#xD;&#xA;    const vec3  v3InvWavelength = 1.0f / vec3( Wavelength.x * Wavelength.x * Wavelength.x * Wavelength.x,&#xD;&#xA;                                               Wavelength.y * Wavelength.y * Wavelength.y * Wavelength.y, &#xD;&#xA;                                               Wavelength.z * Wavelength.z * Wavelength.z * Wavelength.z);  &#xD;&#xA;                                               &#xD;&#xA;    const float fInnerRadius = 10;&#xD;&#xA;    const float fOuterRadius = fInnerRadius * 1.025;&#xD;&#xA;    const float fInnerRadius2 = fInnerRadius * fInnerRadius;&#xD;&#xA;    const float fOuterRadius2 = fOuterRadius * fOuterRadius;&#xD;&#xA;    const float fScale = 1.0 / (fOuterRadius - fInnerRadius);&#xD;&#xA;    const float fScaleDepth = 0.25;&#xD;&#xA;    const float fScaleOverScaleDepth = fScale / fScaleDepth;&#xD;&#xA;    const vec3  v3CameraPos = vec3(0.0, fInnerRadius * 1.015, 0.0);&#xD;&#xA;    const float fCameraHeight = length(v3CameraPos);&#xD;&#xA;    const float fCameraHeight2 = fCameraHeight * fCameraHeight;&#xD;&#xA;    &#xD;&#xA;    const float fm_ESun  = 150.0;&#xD;&#xA;    const float fm_Kr    = 0.0025;&#xD;&#xA;    const float fm_Km    = 0.0010;&#xD;&#xA;    const float fKrESun = fm_Kr * fm_ESun;&#xD;&#xA;    const float fKmESun = fm_Km * fm_ESun;&#xD;&#xA;    const float fKr4PI = fm_Kr * 4 * 3.141592653;&#xD;&#xA;    const float fKm4PI = fm_Km * 4 * 3.141592653;&#xD;&#xA;    &#xD;&#xA;    varying vec3 v3Direction;&#xD;&#xA;    varying vec4 c0, c1;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    float scale(float fCos)&#xD;&#xA;    {&#xD;&#xA;       float x = 1.0 - fCos;&#xD;&#xA;       return fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    void main( void )&#xD;&#xA;    {           &#xD;&#xA;       // Get the ray from the camera to the vertex, and its length (which is the far point of the ray passing through the atmosphere)&#xD;&#xA;       vec3 v3FrontColor = vec3(0.0, 0.0, 0.0);&#xD;&#xA;       vec3 v3Pos = normalize(gl_Vertex.xyz) * fOuterRadius;&#xD;&#xA;       vec3 v3Ray = v3CameraPos - v3Pos;&#xD;&#xA;       float fFar = length(v3Ray);&#xD;&#xA;       v3Ray = normalize(v3Ray);&#xD;&#xA;    &#xD;&#xA;       // Calculate the ray's starting position, then calculate its scattering offset&#xD;&#xA;       vec3 v3Start = v3CameraPos;&#xD;&#xA;       float fHeight = length(v3Start);&#xD;&#xA;       float fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fCameraHeight));&#xD;&#xA;       float fStartAngle = dot(v3Ray, v3Start) / fHeight;&#xD;&#xA;       float fStartOffset = fDepth*scale(fStartAngle);&#xD;&#xA;    &#xD;&#xA;       // Initialize the scattering loop variables&#xD;&#xA;       float fSampleLength = fFar / fSamples;&#xD;&#xA;       float fScaledLength = fSampleLength * fScale;&#xD;&#xA;       vec3 v3SampleRay = v3Ray * fSampleLength;&#xD;&#xA;       vec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;       &#xD;&#xA;    &#xD;&#xA;       // Now loop through the sample rays &#xD;&#xA;       for(int i=0; i&lt;nSamples; i++)&#xD;&#xA;       {      &#xD;&#xA;          float fHeight = length(v3SamplePoint);&#xD;&#xA;          float fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));      &#xD;&#xA;          float fLightAngle =  dot(normalize(v3LightPos), v3SamplePoint) / fHeight;&#xD;&#xA;          float fCameraAngle = dot(normalize(v3Ray), v3SamplePoint) / fHeight;              &#xD;&#xA;          float fScatter = (-fStartOffset + fDepth*( scale(fLightAngle) - scale(fCameraAngle)))/* 0.25f*/;                         &#xD;&#xA;          vec3 v3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));&#xD;&#xA;          &#xD;&#xA;          v3FrontColor += v3Attenuate * (fDepth * fScaledLength);               &#xD;&#xA;          v3SamplePoint += v3SampleRay;      &#xD;&#xA;       }&#xD;&#xA;    &#xD;&#xA;       // Finally, scale the Mie and Rayleigh colors and set up the varying variables for the pixel shader&#xD;&#xA;       &#xD;&#xA;       vec4 newPos = vec4( (gl_Vertex.xyz + view_position.xyz), 1.0);          &#xD;&#xA;       gl_Position = gl_ModelViewProjectionMatrix * vec4(newPos.xyz, 1.0);&#xD;&#xA;       gl_Position.z = gl_Position.w * 0.99999;   &#xD;&#xA;       c1 = vec4(v3FrontColor * fKmESun, 1.0);&#xD;&#xA;       c0 = vec4(v3FrontColor * (v3InvWavelength * fKrESun), 1.0);      &#xD;&#xA;       v3Direction = v3CameraPos - v3Pos;                   &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader:&#xD;&#xA;&#xD;&#xA;    uniform vec3 v3LightPos; &#xD;&#xA;    varying vec3 v3Direction;&#xD;&#xA;    varying vec4 c0;&#xD;&#xA;    varying vec4 c1;&#xD;&#xA;     &#xD;&#xA;    const float g =-0.90f;&#xD;&#xA;    const float g2 = g * g;&#xD;&#xA;    const float Exposure =2;       &#xD;&#xA;    &#xD;&#xA;    void main(void){          &#xD;&#xA;       float fCos = dot(normalize(v3LightPos), v3Direction) / length(v3Direction);&#xD;&#xA;       float fMiePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + fCos*fCos) / pow(1.0 + g2 - 2.0*g*fCos, 1.5);&#xD;&#xA;       gl_FragColor = c0 + fMiePhase * c1;   &#xD;&#xA;       gl_FragColor.a = 1.0;   &#xD;&#xA;    }" />
  <row Id="18035" PostHistoryTypeId="1" PostId="8795" RevisionGUID="3eed6a3c-40e4-4dab-aff4-3a1d7473fb4c" CreationDate="2011-02-19T11:28:51.810" UserDisplayName="user5567" Text="Atmospheric Scattering" />
  <row Id="18036" PostHistoryTypeId="3" PostId="8795" RevisionGUID="3eed6a3c-40e4-4dab-aff4-3a1d7473fb4c" CreationDate="2011-02-19T11:28:51.810" UserDisplayName="user5567" Text="&lt;opengl&gt;&lt;math&gt;&lt;shaders&gt;&lt;special-effects&gt;&lt;debug&gt;" />
  <row Id="18037" PostHistoryTypeId="2" PostId="8796" RevisionGUID="0b75da2a-6aef-4dec-bcaf-bd612b76f98a" CreationDate="2011-02-19T11:31:13.497" UserId="2696" Text="Copy protection is useless. Whatever you do, it will be cracked because your product will be in the hands of the bad guys. The only people you will be inconveniencing are the people who purchased your product (look at what happened to Spore).&#xD;&#xA;&#xD;&#xA;Besides, pirates are usually the people that buy the most. The best you can do is make your product reasonably priced, don't piss off the consumer, make a good product, and make it accessible (steam, app stores, etc). Last one is very important. People pirate cause its hard or inconvenient to get it legitimately." />
  <row Id="18038" PostHistoryTypeId="6" PostId="8780" RevisionGUID="ff734a21-d3a4-4ca0-9acf-b61d1259f6ac" CreationDate="2011-02-19T11:57:11.303" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;movement&gt;&lt;shoot-em-up&gt;" />
  <row Id="18039" PostHistoryTypeId="2" PostId="8797" RevisionGUID="f1ffcd96-2955-4f33-b66d-902f65bec6c1" CreationDate="2011-02-19T11:59:23.470" UserId="1156" Text="First off, this is a question and answer site, rather than a project finding site.&#xD;&#xA;&#xD;&#xA;Secondly, you can only get an SDK for the Xbox if you are a licensed developer and pay a lot. So I doubt you'll find an open source one.&#xD;&#xA;&#xD;&#xA;However, you can create Xbox Live Community Arcade (?) games with XNA and C#, for $99 a year for a license. They won't be open source, but you can join them. [Gamedev's help wanted forum][1] is good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/forum/8-help-wanted/" />
  <row Id="18040" PostHistoryTypeId="5" PostId="6027" RevisionGUID="db23cd6b-178a-4ce9-9130-a63e95f7ef66" CreationDate="2011-02-19T13:16:17.400" UserId="364" Comment="added 37 characters in body" Text="__If C++ template magic and potential long compilation times is not a problem for you and you already have Boost installed to work with__:&#xD;&#xA;&#xD;&#xA;Boost now have an efficient ([in speed and size][1]) **[meta-state-machine library][2]** that have the advantage of [letting you set the transition table separately from the states structures][3] : you have a table that describe when to go from wich state to witch other state. You just have to read it to understand what's going on in the state machine. &#xD;&#xA;&#xD;&#xA;The other advantage is that it have been tested by several enterprises even in embedded softwares with high-performance software (see the boost mailing list for details). As the implementation is already there, it might be a good choice if you need a generic state machine implementation that Just Works(tm).&#xD;&#xA;&#xD;&#xA;It also support orthogonal states (parallel states) and other useful UML-based features.&#xD;&#xA;&#xD;&#xA;It also provide several ways to express the transition table, [one being experimental but interesting on the expressivity side][4] (although limited by current compiler performance -- too bad!) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/ch04.html&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/index.html&#xD;&#xA;  [3]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/ch03s02.html&#xD;&#xA;  [4]: http://www.boost.org/doc/libs/1_45_0/libs/msm/doc/HTML/ch03s04.html" />
  <row Id="18042" PostHistoryTypeId="2" PostId="8799" RevisionGUID="86d54af7-5e09-4c2a-bacf-60cc04ff22c8" CreationDate="2011-02-19T14:00:41.527" UserDisplayName="user5141" Text="Hey all, you may remember me asking a question regarding a snake game I was creating about two weeks ago. &#xD;&#xA;&#xD;&#xA;Well I'm quite far now into making the game (thanks to a brilliant tutorial I found). But I've come across the error described named above. &#xD;&#xA;&#xD;&#xA;So heres my problem;&#xD;&#xA;&#xD;&#xA;I have a SnakeFood class that has a method called &quot;Reposition&quot;. In the game1 class I have a method called &quot;UpdateInGame&quot; which calls the reposition method to load an orange that spawns in a random place every second. &#xD;&#xA;&#xD;&#xA;My latest piece of code changed the reposition method to allow the snake I have on the screen to not be overlapped by the orange that randomly spawns.&#xD;&#xA;&#xD;&#xA;Now I get the error (in full):&#xD;&#xA;&#xD;&#xA;Error	1	Inconsistent accessibility: parameter type 'TheMathsSnakeGame.Snake' is less accessible than method 'TheMathsSnakeGame.SnakeFood.Reposition(TheMathsSnakeGame.Snake)'	C:\Users\Tom\Documents\Visual Studio 2008\Projects\TheMathsSnakeGame\TheMathsSnakeGame\SnakeFood.cs	33	21	TheMathsSnakeGame&#xD;&#xA;&#xD;&#xA;I understand what the errors trying to tell me but having changed the accessiblity of the methods, I still can't get it to work.&#xD;&#xA;&#xD;&#xA;Sorry about the longwinded question.&#xD;&#xA;&#xD;&#xA;Thanks in advance :)&#xD;&#xA; " />
  <row Id="18043" PostHistoryTypeId="1" PostId="8799" RevisionGUID="86d54af7-5e09-4c2a-bacf-60cc04ff22c8" CreationDate="2011-02-19T14:00:41.527" UserDisplayName="user5141" Text="Inconsistent accessibility error in xna." />
  <row Id="18044" PostHistoryTypeId="3" PostId="8799" RevisionGUID="86d54af7-5e09-4c2a-bacf-60cc04ff22c8" CreationDate="2011-02-19T14:00:41.527" UserDisplayName="user5141" Text="&lt;xna&gt;" />
  <row Id="18045" PostHistoryTypeId="2" PostId="8800" RevisionGUID="d47ae33c-58c4-4eb0-9fb1-6facc8ac042c" CreationDate="2011-02-19T14:21:40.660" UserId="202" Text="The accessibility levels of C# are &lt;code&gt;public&lt;/code&gt; &gt; &lt;code&gt;protected&lt;/code&gt; &gt; &lt;code&gt;internal&lt;/code&gt; &gt; &lt;code&gt;protected internal&lt;/code&gt; &gt; &lt;code&gt;private&lt;/code&gt;. Your class' accessibility must by &gt;= to the accessibility of the methods it contains." />
  <row Id="18046" PostHistoryTypeId="25" PostId="8799" RevisionGUID="c2b780f7-dfd0-4e5a-82d9-a64dd02fb43b" CreationDate="2011-02-19T14:22:50.673" Comment="http://twitter.com/#!/StackGameDev/status/38966744672514048" />
  <row Id="18047" PostHistoryTypeId="5" PostId="8799" RevisionGUID="2d25397b-3c96-4898-b5ad-43eb1b8d0c6f" CreationDate="2011-02-19T14:26:48.733" UserDisplayName="user5141" Comment="added 581 characters in body; added 2 characters in body; added 12 characters in body; added 7 characters in body" Text="Hey all, you may remember me asking a question regarding a snake game I was creating about two weeks ago. &#xD;&#xA;&#xD;&#xA;Well I'm quite far now into making the game (thanks to a brilliant tutorial I found). But I've come across the error described named above. &#xD;&#xA;&#xD;&#xA;So heres my problem;&#xD;&#xA;&#xD;&#xA;I have a SnakeFood class that has a method called &quot;Reposition&quot;. In the game1 class I have a method called &quot;UpdateInGame&quot; which calls the reposition method to load an orange that spawns in a random place every second. &#xD;&#xA;&#xD;&#xA;My latest piece of code changed the reposition method to allow the snake I have on the screen to not be overlapped by the orange that randomly spawns.&#xD;&#xA;&#xD;&#xA;Now I get the error (in full):&#xD;&#xA;&#xD;&#xA;Error	1	Inconsistent accessibility: parameter type 'TheMathsSnakeGame.Snake' is less accessible than method 'TheMathsSnakeGame.SnakeFood.Reposition(TheMathsSnakeGame.Snake)'	C:\Users\Tom\Documents\Visual Studio 2008\Projects\TheMathsSnakeGame\TheMathsSnakeGame\SnakeFood.cs	33	21	TheMathsSnakeGame&#xD;&#xA;&#xD;&#xA;I understand what the errors trying to tell me but having changed the accessiblity of the methods, I still can't get it to work.&#xD;&#xA;&#xD;&#xA;Sorry about the longwinded question.&#xD;&#xA;&#xD;&#xA;Thanks in advance :)&#xD;&#xA; &#xD;&#xA;Edit: Code I'm using&#xD;&#xA;&#xD;&#xA;     (Game1 Class)&#xD;&#xA;    private void UpdateInGame(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            //Calls the oranges &quot;reposition&quot; method every second&#xD;&#xA;            if (gameTime.TotalGameTime.Milliseconds % 1000 == 0)&#xD;&#xA;                orange.Reposition(sidney);&#xD;&#xA;            sidney.Update(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    (SnakeFood Class)&#xD;&#xA;     public void Reposition(Snake snake)&#xD;&#xA;        {&#xD;&#xA;            do&#xD;&#xA;            {&#xD;&#xA;                position = new Point(rand.Next(Grid.maxHeight),     rand.Next(Grid.maxWidth));&#xD;&#xA;            } while (snake.IsBodyOnPoint(position));&#xD;&#xA;        }&#xD;&#xA;" />
  <row Id="18048" PostHistoryTypeId="2" PostId="8801" RevisionGUID="a3f52878-afe5-44eb-92c2-610d0801aaab" CreationDate="2011-02-19T14:31:17.657" UserId="5404" Text="I'm developing a J2ME game which uses tiled backgrounds for the levels. My question is how do I store this tile information in my game. At the moment it is stored as an array; with each number representing a different tile from the tile-sheet. This works well enough, however I don't like the fact that it is 'hard-coded' into the game because (at least in my opinion) it is harder to edit the levels, or design new ones. I was also thinking that it would be difficult if you wanted to add a 'level pack', I'm not sure on how this would be achieved though; it's not something I was planning on doing, I'm just curious.&#xD;&#xA;&#xD;&#xA;I was wondering if there was a way I could store level data in some external file and then load this in to the game. The problem is I don't know what the limitations are for J2ME regarding file I/O, can it read in any file like Java? I am aware of the RMS, but from my experience I don't think this would work (unless I am mistaken).&#xD;&#xA;&#xD;&#xA;Also, would loading the data in this way be too big a performance hit? Or is there another way I can achieve what I am trying to do. As I said, the way I have it at the moment works fine, and if this is the only viable option then it will suffice." />
  <row Id="18049" PostHistoryTypeId="1" PostId="8801" RevisionGUID="a3f52878-afe5-44eb-92c2-610d0801aaab" CreationDate="2011-02-19T14:31:17.657" UserId="5404" Text="Storing Tiled Level Data in J2ME game" />
  <row Id="18050" PostHistoryTypeId="3" PostId="8801" RevisionGUID="a3f52878-afe5-44eb-92c2-610d0801aaab" CreationDate="2011-02-19T14:31:17.657" UserId="5404" Text="&lt;java&gt;&lt;best-practices&gt;&lt;tiles&gt;&lt;mobile&gt;" />
  <row Id="18051" PostHistoryTypeId="2" PostId="8802" RevisionGUID="533315b5-9f4c-4117-a8b9-a5952020ce8e" CreationDate="2011-02-19T14:59:25.590" UserId="20" Text="Loading the tile information from file would work just fine. A very basic format would be a matrix with IDs like this:&#xD;&#xA;&#xD;&#xA;    0 1 1 1 0 2 0&#xD;&#xA;    0 1 1 1 0 2 0&#xD;&#xA;    0 0 0 0 0 2 0&#xD;&#xA;    0 3 3 3 3 3 3&#xD;&#xA;    ... etc.&#xD;&#xA;&#xD;&#xA;You can then read this in and split by space/newline to get an array.&#xD;&#xA;&#xD;&#xA;Another option is using an editor like [Tiled][1] or [OgmoEditor][2] which can both save to an XML format you can read and parse within Java. You should be able to read files using J2ME too. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/&#xD;&#xA;  [2]: http://ogmoeditor.com/" />
  <row Id="18052" PostHistoryTypeId="2" PostId="8803" RevisionGUID="10f2b744-1630-4b6a-9b35-f9a102a760d9" CreationDate="2011-02-19T16:10:48.790" UserId="458" Text="Just to add two minor points to others' answers:&#xD;&#xA;&#xD;&#xA;First, another reason why your game WILL be pirated is that pirates' resources are greater than yours. Maybe there are a dozen people trying to crack your game, for every one person on your dev team assigned to the task of &quot;copy protection.&quot; You just cannot compete on man-hours.&#xD;&#xA;&#xD;&#xA;Second, even professional big-budget AAA games get cracked, often within a week or two of release. For major titles, that may be worth the extra expense: an extra week of sales for a million-plus seller is big money, easy to justify spending a few tens of thousands -- not to keep pirates out for good, but to buy an extra few days of release sales. If your game is more modest in budget, and you don't expect to make the majority of your sales on release day, it's probably not a good use of your time from a pure cost/benefit analysis.&#xD;&#xA;&#xD;&#xA;Third, remember that SOME people pirate because the company doesn't release a demo, and they're using this as a &quot;try-before-you-buy&quot; approach. It doesn't matter what you think of this practice ethically, but if you release a reasonable gameplay demo that serves this purpose, you will at least cut out one chunk of piracy." />
  <row Id="18053" PostHistoryTypeId="2" PostId="8804" RevisionGUID="e2c70d02-991b-48a6-b1e0-12411a10c386" CreationDate="2011-02-19T16:16:22.713" UserId="458" Text="It sounds like what you're asking is a general question, &quot;what is a good enemy movement pattern / AI for a shmup?&quot; - a design question more than a programming one. There is no single right or wrong answer here. It all depends on your game and especially the design of your level environments. For example, in a level without much maneuverability and lots of tight spaces, enemies that just sit there and do nothing can make sufficiently challenging obstacles, while enemies that pass through walls and head directly to the player are just mean. In a wide-open space, enemies with no movement would be trivial to avoid (unless there's a lot of them!) while enemies that track the player movement might work better.&#xD;&#xA;&#xD;&#xA;My advice would be, play a lot of shmups, but as you play, pay attention to enemy movement patterns in relation to level design, and also which levels feel fun versus too easy versus really frustrating. After awhile you will probably get a good feel for what kinds of common patterns there are, and what makes them good or bad. But there is no simple answer other than that, I don't think, if I understand your question correctly." />
  <row Id="18054" PostHistoryTypeId="2" PostId="8805" RevisionGUID="132c3bcf-8e83-4bb8-8a1d-9dfef68b0c2b" CreationDate="2011-02-19T16:32:09.780" UserId="458" Text="To add to Kort Pleco's wonderful answer:&#xD;&#xA;&#xD;&#xA;* Are items permanent or consumable (or both)? For example, many free-to-play games offer microtransaction-purchasable items that do something like &quot;double your experience for the next 24 hours&quot;. If players are going to be getting items but then using them, inflation and availability are less of an issue.&#xD;&#xA;&#xD;&#xA;* Bulk rates. Do players get extra stuff for buying a lot of item packs at once? For example, maybe buying a single pack has a 10% chance of holding a &quot;super-rare&quot; item; maybe if you buy a box of 10 packs, you guarantee the player at least one super-rare.&#xD;&#xA;&#xD;&#xA;* Generally you don't have to worry about whether drop rates / random distribution will conform exactly to expectations or not; the laws of probability dictate that the more times you do something random, the closer your overall distribution conforms to the expected value. So if you're afraid of randomly generating too many of Item X and not enough of Item Y, enough item drops will fix that over time.&#xD;&#xA;&#xD;&#xA;* HOWEVER: absolutely do some statistical tests on your item generation code to make sure you are actually generating things according to the probability curve you thought. A software bug here will absolutely be noticed. (I actually did see some production code in a card game once where the shuffling algorithm was not done correctly, so certain cards tended to get shuffled to the top more often than others, so I'm not kidding about this.)&#xD;&#xA;&#xD;&#xA;* If players can trade/gift items to one another, there are a LOT of additional considerations. Are you okay with players trading their stuff for cash, i.e. Player 1 sells their stuff through Paypal to Player 2, and all you see on your server is an &quot;item gift&quot;? If not, what steps can you take to stop it, and how much time are you willing to spend cracking down on this? If so, what will you do when a player inevitably rips off or scams another player for money or items - will you actually reverse the trade, or will you leave your players twisting in the wind... and if you DO reverse the trade in the case of scams, keep in mind that'll cause scamming to proliferate because your players will think of you as a safety net. Or do you force all transactions to happen through your servers, including cash - and if so, are there additional legal issues since you're now effectively acting as a bank or payment processing service in addition to a game service (let alone any potential charges of &quot;gambling&quot; since players can spend or make money on your game that has random elements to it)?" />
  <row Id="18055" PostHistoryTypeId="25" PostId="8801" RevisionGUID="1cf52b4a-b805-4ddb-a23c-64f1f649392e" CreationDate="2011-02-19T17:22:50.880" Comment="http://twitter.com/#!/StackGameDev/status/39012043952635904" />
  <row Id="18056" PostHistoryTypeId="2" PostId="8806" RevisionGUID="7c0e1b55-6e37-4996-8462-e36a6726e5a3" CreationDate="2011-02-19T17:31:03.867" UserId="5540" Text="Host it online. &#xD;&#xA;&#xD;&#xA;No downloads, no pirates. Have you ever heard of somebody downloading a pirate copy of farmville? =)" />
  <row Id="18057" PostHistoryTypeId="2" PostId="8807" RevisionGUID="17dcd816-0355-42e1-9c9d-b9b8c33817c2" CreationDate="2011-02-19T19:37:39.760" UserId="5570" Text="Tried this code, but the texture didnot get any lighter.&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        try {&#xD;&#xA;            texture = TextureLoader.getTexture(&quot;png&quot;,                                &#xD;&#xA;               Game.class.getResourceAsStream(&quot;/brick.png&quot;), true, GL_NEAREST);&#xD;&#xA;        } catch (IOException e) {&#xD;&#xA;            e.printStackTrace();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getTextureID());&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;        glEnable(GL_BLEND);&#xD;&#xA;        glBlendFunc(GL_CONSTANT_ALPHA, GL_CONSTANT_ALPHA);&#xD;&#xA;        GL14.glBlendColor(1.0f, 1.0f, 1.0f, 0.5f);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        glColor4f(1, 1, 1, 0.5f);&#xD;&#xA;        GL11.glBegin(GL11.GL_QUADS);                            // Start Drawing Quads&#xD;&#xA;        // Front Face&#xD;&#xA;        GL11.glNormal3f(0.0f, 0.0f, 1.0f);                 // Normal Pointing Towards Viewer&#xD;&#xA;        GL11.glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;        GL11.glVertex3f(-1.0f, -1.0f, 1.0f);    // Point 1 (Front)&#xD;&#xA;        GL11.glTexCoord2f(1.0f, 0.0f);&#xD;&#xA;        GL11.glVertex3f(1.0f, -1.0f, 1.0f);    // Point 2 (Front)&#xD;&#xA;        GL11.glTexCoord2f(1.0f, 1.0f);&#xD;&#xA;        GL11.glVertex3f(1.0f, 1.0f, 1.0f);    // Point 3 (Front)&#xD;&#xA;        GL11.glTexCoord2f(0.0f, 1.0f);&#xD;&#xA;        GL11.glVertex3f(-1.0f, 1.0f, 1.0f);    // Point 4 (Front)&#xD;&#xA;        glEnd();" />
  <row Id="18058" PostHistoryTypeId="1" PostId="8807" RevisionGUID="17dcd816-0355-42e1-9c9d-b9b8c33817c2" CreationDate="2011-02-19T19:37:39.760" UserId="5570" Text="how to use opengl blend mode/functions to brighten/darken a texture." />
  <row Id="18059" PostHistoryTypeId="3" PostId="8807" RevisionGUID="17dcd816-0355-42e1-9c9d-b9b8c33817c2" CreationDate="2011-02-19T19:37:39.760" UserId="5570" Text="&lt;opengl&gt;&lt;java&gt;&lt;lwjgl&gt;" />
  <row Id="18060" PostHistoryTypeId="2" PostId="8808" RevisionGUID="a19a5fac-e17d-4bcb-b514-1cd92ae0725a" CreationDate="2011-02-19T20:04:17.797" UserId="1101" Text="Adding threads to the system creates bugs at worst and inefficiency at best (due to the necessary synchronisation) unless you have a clear example of the parallelism helping, so I wouldn't use it in this case. Note that your option 2.1 has left out the synchronisation aspect - you're ok on Windows since PostMessage is synchronised, but this is something you need to check on a per-API basis.&#xD;&#xA;&#xD;&#xA;I wouldn't choose to route several subsystems into another via custom messages because this could require significant rewriting should you change that subsystem - eg. port from Win32 to SDL or whatever.&#xD;&#xA;&#xD;&#xA;So, I usually go with polling where the subsystems make it possible and efficient. eg. It's rarely a problem to poll your network library, because either there is data ready to read or there is not - you're not going to slow down your program by checking for it if the library is well made." />
  <row Id="18061" PostHistoryTypeId="2" PostId="8809" RevisionGUID="85b2ae04-ca61-44be-8dfd-14a367c7e16e" CreationDate="2011-02-19T20:08:44.023" UserId="3794" Text="This is not how blending works, it doesnt work on the same polygon. Blending blends between more polygons (or fragments to be more correct). But you can use blending for lighting or darkening textures of course, its good idea actually.&#xD;&#xA;&#xD;&#xA;Simple solution is to draw first quad with texture and then draw quad with blending enabled with blending color on it. But the second quad must be slightly moved to the direction of the camera. Something like this: ` GL11.glVertex3f(-1.0f, -1.0f, 0.99f);`&#xD;&#xA;&#xD;&#xA;Much **nicer and cleaner solution** would be first draw quad with texture and than qaud with color at the same position but setup zBuffer comparison function to equal. &#xD;&#xA;&#xD;&#xA;And remember with alpha blending do not forget that you always first render opaque objects and then transparent.&#xD;&#xA;&#xD;&#xA;And once you start using shaders this will be trivial operation on fragment/pixel shader with no need of blending." />
  <row Id="18062" PostHistoryTypeId="2" PostId="8810" RevisionGUID="8f1d9129-2145-4489-9b34-883d85b7c0b7" CreationDate="2011-02-19T20:14:30.823" UserId="1101" Text="No, it's not 'right', or 'wrong', it's just a simplification.&#xD;&#xA;&#xD;&#xA;Some business code is exactly the same, unless you're working with a system that forcibly separates presentation and logic.&#xD;&#xA;&#xD;&#xA;Here, a VB.NET example, where &quot;business logic&quot; (adding a number) is written in a GUI event handler - http://www.homeandlearn.co.uk/net/nets1p12.html&#xD;&#xA;&#xD;&#xA;&gt;how do I deal with the complexity of various components, if each individual component does everything themselves?&#xD;&#xA;&#xD;&#xA;If and when it gets that complex, then you can factor it out.&#xD;&#xA;&#xD;&#xA;    class Ball&#xD;&#xA;    {&#xD;&#xA;        GraphicalModel ballVisual;&#xD;&#xA;        void Draw()&#xD;&#xA;        {&#xD;&#xA;            ballVisual.Draw();&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;" />
  <row Id="18063" PostHistoryTypeId="2" PostId="8811" RevisionGUID="a91011ad-aa31-439f-a3de-4ab4cbd72a06" CreationDate="2011-02-19T20:19:44.123" UserId="5242" Text="I'm making a simple bullet hell game but I can't figure out how to get my character to shoot. Lets say I have bulletBody and shipBody, how would I continually spawn bulletBodies using the shipBody coordinates. I've tried a function that uses an array of b2bodies and just assigns them the bodydef and fixture but that causes the game to crash. C++ sample code would be best but any help is appreciated. " />
  <row Id="18064" PostHistoryTypeId="1" PostId="8811" RevisionGUID="a91011ad-aa31-439f-a3de-4ab4cbd72a06" CreationDate="2011-02-19T20:19:44.123" UserId="5242" Text="Spawning bullets on command in Box2D" />
  <row Id="18065" PostHistoryTypeId="3" PostId="8811" RevisionGUID="a91011ad-aa31-439f-a3de-4ab4cbd72a06" CreationDate="2011-02-19T20:19:44.123" UserId="5242" Text="&lt;box2d&gt;" />
  <row Id="18066" PostHistoryTypeId="25" PostId="8807" RevisionGUID="2d14a264-4eeb-4ce7-b499-034c135b218b" CreationDate="2011-02-19T20:22:50.853" Comment="http://twitter.com/#!/StackGameDev/status/39057342624571392" />
  <row Id="18067" PostHistoryTypeId="2" PostId="8812" RevisionGUID="59098b75-0fe0-4474-af7f-a1df80491815" CreationDate="2011-02-19T20:22:59.620" UserId="4662" Text="If the event loop is cleanly written, there is no reason that a primary thread cannot have two event loops. Windows, for example, has PeekMessage. First you process all Windows messages, then you move on and process all whatever messages. As long as you're not blocking on a call to receive a message, then there's no reason that you can't call two message querying functions in a single loop instead of one." />
  <row Id="18068" PostHistoryTypeId="5" PostId="8809" RevisionGUID="703a2a13-a037-47bd-9ed2-38dc2aee3a05" CreationDate="2011-02-19T21:03:59.830" UserId="3794" Comment="added 1 characters in body" Text="This is not how blending works, it doesn't work on the same polygon. Blending blends between more polygons (or fragments to be more correct). But you can use blending for lighting or darkening textures of course, its good idea actually.&#xD;&#xA;&#xD;&#xA;Simple solution is to draw first quad with texture and then draw quad with blending enabled with blending color on it. But the second quad must be slightly moved to the direction of the camera. Something like this: ` GL11.glVertex3f(-1.0f, -1.0f, 0.99f);`&#xD;&#xA;&#xD;&#xA;Much **nicer and cleaner solution** would be first draw quad with texture and than qaud with color at the same position but setup zBuffer comparison function to equal. &#xD;&#xA;&#xD;&#xA;And remember with alpha blending do not forget that you always first render opaque objects and then transparent.&#xD;&#xA;&#xD;&#xA;And once you start using shaders this will be trivial operation on fragment/pixel shader with no need of blending." />
  <row Id="18069" PostHistoryTypeId="2" PostId="8813" RevisionGUID="0cee7adc-289f-46e7-893b-a220d32c7af5" CreationDate="2011-02-19T21:34:12.423" UserId="5223" Text="I been playing LOTRO for 3 months now. There are tons of items in that game. However, equips (weapons, armor) and other very cool items are bound to your character, so like Kort Pleco said before, there is no trading for those items. So, the game is very balanced, because if I have a superb item, there is no way that item could be sold when I dont need it anymore, and sold again, and again... You get a nice item (crafting it, looting it, buying it from the market) but is just for you, and when you dont need it anymore, the only thing you can do with is destroy it. The binding system isnt new, but I think its very useful." />
  <row Id="18070" PostHistoryTypeId="2" PostId="8814" RevisionGUID="ec8ade80-d971-4c1c-936f-29daf310d300" CreationDate="2011-02-19T21:52:41.873" UserId="1829" Text="http://www.lpi.usra.edu/lunar/missions/apollo/apollo_15/images/laser_beam_lg.gif&#xD;&#xA;&#xD;&#xA;I want to be able to such an effect, but I don't really know how the BillboardChain class works or how I can use it, examples for this class seems to be rare." />
  <row Id="18071" PostHistoryTypeId="1" PostId="8814" RevisionGUID="ec8ade80-d971-4c1c-936f-29daf310d300" CreationDate="2011-02-19T21:52:41.873" UserId="1829" Text="Make a laser beam effect with Ogre and a BillboardChain" />
  <row Id="18072" PostHistoryTypeId="3" PostId="8814" RevisionGUID="ec8ade80-d971-4c1c-936f-29daf310d300" CreationDate="2011-02-19T21:52:41.873" UserId="1829" Text="&lt;sprites&gt;&lt;ogre&gt;" />
  <row Id="18073" PostHistoryTypeId="2" PostId="8815" RevisionGUID="0ccbbaaf-edbc-4845-bcb2-69b185f75066" CreationDate="2011-02-19T21:53:39.350" UserId="5223" Text="&gt; but I can't figure out how to get my character to shoot&#xD;&#xA;&#xD;&#xA;Well, lets see, i did something like this the first time i did a shooter game... &#xD;&#xA;You can do a bullet class with int X, int Y, bool active... then you can do an array of bullet. Then, when the player shoots, you set the bullet[0] X and Y at the same position of the sprite, the gun, whatever, and put bool active = true... when you update the state of the game, you search the bullet array, and if active, you modify X and or Y. At your draw phase, you search the bullet array again, and if activr, you draw it at bullet.X, bullet.Y" />
  <row Id="18074" PostHistoryTypeId="5" PostId="8765" RevisionGUID="8e81b0b1-cdc4-47b9-aa0b-8222624076b4" CreationDate="2011-02-19T21:53:39.787" UserId="2972" Comment="more reasons why events are awesome" Text="Simple programs that collect data from only one system need only one (blocking) event loop. For example, Windows applications have the message loop, POSIX network programs usually have a select/epoll/etc. loop at their core, pure SDL games use SDL's event loop. But what if you need to collect events from several subsystems? Such as an SDL game which doesn't use SDL_net for networking.&#xD;&#xA;&#xD;&#xA;I can think of several solutions:&#xD;&#xA;&#xD;&#xA;1. Polling (ugh)&#xD;&#xA;2. Put each event loop in its own thread, and:&#xD;&#xA;&#xD;&#xA;   1. Send messages to the main thread, which collects and processes the events, or&#xD;&#xA;   2. Place the event-processing code of each thread in a critical section, so that the threads can wait for events asynchronously but process them synchronously&#xD;&#xA;&#xD;&#xA;3. Choose one subsystem for the main event loop, and pass events from other subsystems via that subsystem as custom messages (for example, the Windows message loop and custom messages, or a socket select() loop and passing events via a loopback connection).&#xD;&#xA;&#xD;&#xA;Note that I'm talking about an event loop that blocks execution until an event arrives. This allows writing event-based games that don't pointlessly burn 100% CPU, and can process events even during drawing or performing a logic update. Checking if a subsystem has events and continuing execution otherwise is what I'd call polling.&#xD;&#xA;&#xD;&#xA;Option 2.1 is more interesting on platforms where message-passing is a well-developed threading primitive (e.g. [in the D programming language](http://www.informit.com/articles/article.aspx?p=1609144&amp;seqNum=6)), but 2.2 looks like the best option to me." />
  <row Id="18075" PostHistoryTypeId="2" PostId="8816" RevisionGUID="aeeddc74-28c3-45b3-9154-13b6fa453404" CreationDate="2011-02-19T21:54:10.973" UserId="312" Text="I am working on a P2P game in Flash and I'm wondering what network topology would be most robust for dealing with people randomly joining/leaving. I was thinking the first user to join could be the host, but if the host leaves the whole session would be killed. I am looking for a way to deal with this with no (or little) disruption." />
  <row Id="18076" PostHistoryTypeId="1" PostId="8816" RevisionGUID="aeeddc74-28c3-45b3-9154-13b6fa453404" CreationDate="2011-02-19T21:54:10.973" UserId="312" Text="Game networking topology - dealing with host leaving" />
  <row Id="18077" PostHistoryTypeId="3" PostId="8816" RevisionGUID="aeeddc74-28c3-45b3-9154-13b6fa453404" CreationDate="2011-02-19T21:54:10.973" UserId="312" Text="&lt;flash&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="18078" PostHistoryTypeId="5" PostId="8815" RevisionGUID="865ec635-d0c3-4b65-a744-a0791cba366f" CreationDate="2011-02-19T22:00:51.630" UserId="5223" Comment="added 178 characters in body" Text="&gt; but I can't figure out how to get my character to shoot&#xD;&#xA;&#xD;&#xA;Well, lets see, i did something like this the first time i did a shooter game... &#xD;&#xA;You can do a bullet class with int X, int Y, bool active... then you can do an array of bullet. Then, when the player shoots, you set the bullet[0] X and Y at the same position of the sprite, the gun, whatever, and put bool active = true... when you update the state of the game, you search the bullet array, and if active, you modify X and or Y. At your draw phase, you search the bullet array again, and if activr, you draw it at bullet.X, bullet.Y.&#xD;&#xA;Also, at update stage, you check for collisions or check if the bullet is still inside the screen, so events are trigged like kill the guy and reset the bullet (active=false) " />
  <row Id="18079" PostHistoryTypeId="2" PostId="8817" RevisionGUID="5e1b34d2-d94e-4f13-85d7-62940640f945" CreationDate="2011-02-19T22:04:18.033" UserId="2942" Text="While not language independent, I found that [pygame][1] was a simple solution that contained most of the functionality I needed. Python in its most basic form is fairly easy to use (or learn) and hooking some basic python up to some visuals on a screen is done very easily with pygame.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/" />
  <row Id="18081" PostHistoryTypeId="5" PostId="8811" RevisionGUID="06e06cdf-a768-42a7-a378-62e208775fdc" CreationDate="2011-02-19T23:14:28.833" UserId="5242" Comment="added 179 characters in body" Text="I'm making a simple bullet hell game but I can't figure out how to get my character to shoot. Lets say I have bulletBody and shipBody, how would I continually spawn bulletBodies using the shipBody coordinates. I've tried a function that uses an array of b2bodies and just assigns them the bodydef and fixture but that causes the game to crash. C++ sample code would be best but any help is appreciated. &#xD;&#xA;&#xD;&#xA;EDIT: It looks like any reference to my b2World in a function will cause the game to crash. How do I declare the bodies without using a b2World as an argument in the function." />
  <row Id="18082" PostHistoryTypeId="25" PostId="8814" RevisionGUID="3b584544-f133-41aa-b9fd-89ae4bfbc34c" CreationDate="2011-02-19T23:22:51.820" Comment="http://twitter.com/#!/StackGameDev/status/39102641833254912" />
  <row Id="18083" PostHistoryTypeId="2" PostId="8819" RevisionGUID="b0b2bca7-f777-4768-b224-5730b8f5ec2d" CreationDate="2011-02-19T23:30:48.857" UserId="2798" Text="Keep a copy of the last framebuffer. Get the camera movement vector and invert it. Draw your scene as usual, then draw the last framebuffer with a slight offset (the camera delta you just calculated) and 0.75 alpha. Repeat as many times as you like to give the motion blur effect." />
  <row Id="18084" PostHistoryTypeId="5" PostId="3582" RevisionGUID="033ad42b-39c2-4608-9450-37db89328efb" CreationDate="2011-02-19T23:50:11.463" UserId="5574" Comment="Emphasis" Text="I'm not a tester but I've worked on teams with them, and had students enter the industry as testers.&#xD;&#xA;&#xD;&#xA;Up sides:&#xD;&#xA;&#xD;&#xA; - Yes, it is a &quot;relatively&quot; easy way to get a job. Key word: relative. Testing jobs are still competitive.&#xD;&#xA; - You're one of the few people on the development team that can actually say you play games for a living.&#xD;&#xA; - It's a foot in the door.&#xD;&#xA;&#xD;&#xA;Down sides:&#xD;&#xA;&#xD;&#xA; - The best description I've heard of QA is that it's walking into a wall for 40 hours to make sure you can't walk through it. **The job is tedious**, to say the least, and most people really can't stomach it for very long.&#xD;&#xA; - You're one of the few people on the development team that works part-time, so the pay is lousy and you can pretty much count on being let go at the end of the current project. You're on a ticking clock, so if you want to work yourself into a more permanent position, you've gotta work hard and fast to do so. **Actual transitions from part-time QA to full-time programmer or designer are rare** (all the more so as more would-be developers are treating QA as an entry point).&#xD;&#xA; - In my experience, there has been a clear separation between development and QA. While testers are at least treated nicely as human beings, it can be frustrating when you write up a bug only to hear that the dev team isn't doing anything about it -- not because they don't want to, but because there aren't enough resources and the leads have to make tough calls about what to fix and what not to.&#xD;&#xA;&#xD;&#xA;To answer your other questions: I've not seen very many QA people doing test scripting or other programming-like things, but that might be because many testers have no programming skills, or because purchasing a license for an automated test suite isn't in the budget, more than anything. And yes, bugs ALWAYS make it into production, but I've NEVER seen the testers get blamed." />
  <row Id="18085" PostHistoryTypeId="2" PostId="8820" RevisionGUID="e4a0fc5c-a5e9-40f3-b333-e3d71de00bf2" CreationDate="2011-02-20T00:02:12.580" UserId="4191" Text="Topology as such doesn't really come into it, the way you're describing; if you're using a model where there's a &quot;host&quot;, you pretty much have star topology, however you dress it up.  Recovery from loss of the central node requires that all the nodes be able to find each other in that event (which makes it sound like mesh topology but it isn't), and either all of them have sufficient state to be able to take over the host role or they can reconstruct that state between them.  Then you elect a new host by whatever method you like (I suggest lowest average ping to the rest of the nodes).&#xD;&#xA;&#xD;&#xA;You can potentially do that with no disruption if the host leaves &quot;nicely&quot;; you start the host-role transfer process when they hit Quit and let them leave when it's done.  If they leave by network interruption, force-quit, power loss, etc. there will be disruption." />
  <row Id="18086" PostHistoryTypeId="5" PostId="8820" RevisionGUID="a607b66e-0cc5-4c8b-bc08-1b23ac224e0d" CreationDate="2011-02-20T00:07:35.087" UserId="4191" Comment="added 370 characters in body; deleted 66 characters in body; deleted 1 characters in body; added 7 characters in body" Text="If you're using a model where there's a &quot;host&quot;, you pretty much have star topology, however you dress it up.  Recovery from loss of the central node in that model requires that all the nodes be able to find each other in that event (which makes it sound like mesh topology but it isn't), and either all of them have sufficient state to be able to take over the host role or they can reconstruct that state between them.  Then you elect a new host by whatever method you like (I suggest lowest average ping to the rest of the nodes).&#xD;&#xA;&#xD;&#xA;You can potentially do that with no disruption if the host leaves &quot;nicely&quot;; you start the host-role transfer process when they hit Quit and let them leave when it's done.  If they leave by network interruption, force-quit, power loss, etc. there will be disruption.&#xD;&#xA;&#xD;&#xA;If you do actual mesh topology, where each node has its own full state model and communicates about changes made to that out to everybody it's connected to, then you avoid the host role and the vulnerability that comes with it.  The fun part then is conflict resolution -- working out what happens when two nodes try to propagate changes that contradict each other." />
  <row Id="18087" PostHistoryTypeId="2" PostId="8821" RevisionGUID="32ae6792-d6cc-42ab-acce-239fee22738f" CreationDate="2011-02-20T00:26:36.347" UserId="5401" Text="What is the correct, or most elegant, way to manage cameras in large game engines? Or should I ask, how does everybody else do it?&#xD;&#xA;&#xD;&#xA;The methods I can think of are:&#xD;&#xA;&#xD;&#xA;Binding cameras straight to the engine; if someone needs to render something, they bind their own camera to the graphics engine which is in use until another camera is bound.&#xD;&#xA;&#xD;&#xA;A camera stack; a small task can push its own camera onto the stack, and pop it off at the end to return to the &quot;main&quot; camera.&#xD;&#xA;&#xD;&#xA;Attaching a camera to a shader; Every shader has exactly one camera bound to it, and when the shader is used, that camera is set by the engine when the shader is in use. This allows me to implement a bunch of optimizations on the engine side.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Are there other ways to do it?" />
  <row Id="18088" PostHistoryTypeId="1" PostId="8821" RevisionGUID="32ae6792-d6cc-42ab-acce-239fee22738f" CreationDate="2011-02-20T00:26:36.347" UserId="5401" Text="Handling cameras in a large scale game engine" />
  <row Id="18089" PostHistoryTypeId="3" PostId="8821" RevisionGUID="32ae6792-d6cc-42ab-acce-239fee22738f" CreationDate="2011-02-20T00:26:36.347" UserId="5401" Text="&lt;3d&gt;&lt;engine&gt;&lt;3d-engines&gt;&lt;camera&gt;" />
  <row Id="18090" PostHistoryTypeId="2" PostId="8822" RevisionGUID="f1e9f3b2-cf68-4857-a032-af6c04e7192c" CreationDate="2011-02-20T00:42:11.237" UserId="744" Text="b2World, b2Body, etc, cannot be copied. You must pass them by pointer or reference:&#xD;&#xA;&#xD;&#xA;    void process(b2World world);  // this is bad.&#xD;&#xA;    void process(b2World *world); // this is fine.&#xD;&#xA;    void process(b2World &amp;world); // this is probably best.&#xD;&#xA;&#xD;&#xA;Likewise, b2Bodys must be generated from b2World::CreateBody, and cannot be copied, so must be passed by pointer or reference:&#xD;&#xA;&#xD;&#xA;    std::vector&lt;b2Body *&gt; bodies;&#xD;&#xA;    b2World world(...);&#xD;&#xA;    ...&#xD;&#xA;    b2BodyDef dfn = ...;&#xD;&#xA;    bodies.push_back(world.CreateBody(&amp;dfn));&#xD;&#xA;&#xD;&#xA;It sounds like you might be doing:&#xD;&#xA;&#xD;&#xA;    std::vector&lt;b2Body&gt; bodies;&#xD;&#xA;    bodies.push_back(*world.CreateBody(&amp;dfn));&#xD;&#xA;&#xD;&#xA;Which _will not work_. The b2World instance owns the body.&#xD;&#xA;&#xD;&#xA;The &lt;a href=&quot;http://box2d.org/manual.html&quot;&gt;Box2D manual goes into detail&lt;/a&gt;, with code examples for most simple tasks." />
  <row Id="18091" PostHistoryTypeId="2" PostId="8823" RevisionGUID="051d5ad7-58cf-4a31-949b-09a7c20907ce" CreationDate="2011-02-20T00:58:20.027" UserId="744" Text="&lt;a href=&quot;http://www.amazon.com/Real-Time-Cameras-Mark-Haigh-Hutchinson/dp/0123116341&quot;&gt;Real-Time Cameras by Mark Haigh-Hutchinson&lt;/a&gt; covers just about everything there is to know about cameras. (Sorry I can't give a more direct reference to the issues you ask about, but my copy is across an ocean right now, I think.)" />
  <row Id="18092" PostHistoryTypeId="2" PostId="8824" RevisionGUID="64a1679a-683a-402a-bd5b-864e34c9dc3b" CreationDate="2011-02-20T01:51:31.153" UserId="2332" Text="The closest thing I have seen to this effect is [this][1]&#xD;&#xA;&#xD;&#xA;There is also [this thread][2] that asks the exact same question. It only has 3 replies, but probably worth watching (unless of course you asked this question :P)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/forums/viewtopic.php?p=304338&#xD;&#xA;  [2]: http://www.ogre3d.org/forums/viewtopic.php?f=2&amp;t=46870" />
  <row Id="18093" PostHistoryTypeId="25" PostId="8821" RevisionGUID="f3dbd2e5-f229-4c34-90cd-7aa5bd295114" CreationDate="2011-02-20T02:22:53.037" Comment="http://twitter.com/#!/StackGameDev/status/39147943558791168" />
  <row Id="18094" PostHistoryTypeId="6" PostId="8816" RevisionGUID="2fce8898-1fc1-43fa-9622-cb8d00e9a061" CreationDate="2011-02-20T03:33:12.493" UserId="312" Comment="edited tags" Text="&lt;flash&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;peer-to-peer&gt;" />
  <row Id="18095" PostHistoryTypeId="25" PostId="8816" RevisionGUID="5be5e64f-7151-48de-a5c4-48b1010fcb8a" CreationDate="2011-02-20T05:22:53.623" Comment="http://twitter.com/#!/StackGameDev/status/39193249893720064" />
  <row Id="18096" PostHistoryTypeId="2" PostId="8825" RevisionGUID="aabb9514-22fb-4693-9b80-8a4e42d7d1e9" CreationDate="2011-02-20T07:29:04.367" UserId="5050" Text="I have a hand-rolled camera class that converts yaw, pitch, and roll angles into a forward, side, and up vector suitable for calling gluLookAt. Using this camera class I can modify the model-view matrix to move about the 3D world just fine.&#xD;&#xA;&#xD;&#xA;However, I am having trouble when using this camera class (and associated model-view matrix) when trying to perform directional lighting in my vertex shader.&#xD;&#xA;&#xD;&#xA;The problem is that the light direction, (0, 1, 0) for example, is relative to where the 'camera is looking' and not the actual world coordinates. (Or is this eye coordinates vs. model coordinates?) I would like the light direction to be unaffected by the camera's viewing direction.&#xD;&#xA;&#xD;&#xA;For example, when the camera is looking down the Z axis the ground is lit correctly. However, if I point the camera straight at the ground, then it goes dark. This is (I think) because the light direction is parallel with the camera's 'up' vector which is perpendicular with the ground's normal vector.&#xD;&#xA;&#xD;&#xA;I tried computing the normal matrix without taking the camera's model view into account, but then none of my objects were rotated correctly.&#xD;&#xA;&#xD;&#xA;Sorry if this sounds vague. I suspect there is a straight forward answer, but I'm not 100% clear on how the normal matrix should be used for transforming vertex normals in my vertex shader.&#xD;&#xA;&#xD;&#xA;For reference, here is pseudo code for my rendering loop:&#xD;&#xA;&#xD;&#xA;    pMatrix = new Matrix();&#xD;&#xA;    pMatrix = makePerspective(...)&#xD;&#xA;&#xD;&#xA;    mvMatrix = new Matrix()&#xD;&#xA;    camera.apply(mvMatrix);  // Calls gluLookAt&#xD;&#xA;&#xD;&#xA;    // Move the object into position.&#xD;&#xA;    mvMatrix.translatev(position);&#xD;&#xA;    mvMatrix.rotatef(rotation.x, 1, 0, 0);&#xD;&#xA;    mvMatrix.rotatef(rotation.y, 0, 1, 0);&#xD;&#xA;    mvMatrix.rotatef(rotation.z, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;    var nMatrix = new Matrix();&#xD;&#xA;    nMatrix.set(mvMatrix.get().getInverse().getTranspose());&#xD;&#xA;&#xD;&#xA;    // Set vertex shader uniforms.&#xD;&#xA;    gl.uniformMatrix4fv(shaderProgram.pMatrixUniform,&#xD;&#xA;			false, new Float32Array(pMatrix.getFlattened()));&#xD;&#xA;    gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform,&#xD;&#xA;			false, new Float32Array(mvMatrix.getFlattened()));&#xD;&#xA;    gl.uniformMatrix4fv(shaderProgram.nMatrixUniform,&#xD;&#xA;			false, new Float32Array(nMatrix.getFlattened()));&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    gl.drawElements(gl.TRIANGLES, this.vertexIndexBuffer.numItems,&#xD;&#xA;		    gl.UNSIGNED_SHORT, 0);&#xD;&#xA;&#xD;&#xA;And the corresponding vertex shader:&#xD;&#xA;&#xD;&#xA;    // Attributes&#xD;&#xA;    attribute vec3 aVertexPosition;&#xD;&#xA;    attribute vec4 aVertexColor;&#xD;&#xA;    attribute vec3 aVertexNormal;&#xD;&#xA;       &#xD;&#xA;    // Uniforms&#xD;&#xA;    uniform mat4 uMVMatrix;&#xD;&#xA;    uniform mat4 uNMatrix;&#xD;&#xA;    uniform mat4 uPMatrix;&#xD;&#xA;    &#xD;&#xA;    // Varyings&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;    &#xD;&#xA;    // Constants&#xD;&#xA;    const vec3 LIGHT_DIRECTION = vec3(0, 1, 0);  // Opposite direction of photons.&#xD;&#xA;    const vec4 AMBIENT_COLOR   = vec4 (0.2,   0.2,   0.2, 1.0);&#xD;&#xA;    &#xD;&#xA;    float ComputeLighting() {&#xD;&#xA;        vec4 transformedNormal = vec4(aVertexNormal.xyz, 1.0);&#xD;&#xA;        transformedNormal = uNMatrix * transformedNormal;&#xD;&#xA;        float base = dot(normalize(transformedNormal.xyz),&#xD;&#xA;                         normalize(LIGHT_DIRECTION));&#xD;&#xA;        return max(base, 0.0);&#xD;&#xA;    }&#xD;&#xA;       &#xD;&#xA;    void main(void) {&#xD;&#xA;        gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);&#xD;&#xA;    &#xD;&#xA;        float lightWeight = ComputeLighting();&#xD;&#xA;        vColor = vec4(aVertexColor.xyz * lightWeight, 1.0) + AMBIENT_COLOR;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that I am using WebGL, so if the anser is use `glFixThisProblem(...)` any pointers on how to re-implement that on WebGL if missing would be appreciated." />
  <row Id="18097" PostHistoryTypeId="1" PostId="8825" RevisionGUID="aabb9514-22fb-4693-9b80-8a4e42d7d1e9" CreationDate="2011-02-20T07:29:04.367" UserId="5050" Text="Computing a normal matrix in conjunction with gluLookAt" />
  <row Id="18098" PostHistoryTypeId="3" PostId="8825" RevisionGUID="aabb9514-22fb-4693-9b80-8a4e42d7d1e9" CreationDate="2011-02-20T07:29:04.367" UserId="5050" Text="&lt;opengl&gt;&lt;opengl-es&gt;" />
  <row Id="18099" PostHistoryTypeId="25" PostId="8825" RevisionGUID="142a6d30-1c86-4fcc-a013-60a2f972ece9" CreationDate="2011-02-20T08:22:53.503" Comment="http://twitter.com/#!/StackGameDev/status/39238547642908672" />
  <row Id="18100" PostHistoryTypeId="2" PostId="8826" RevisionGUID="578c568c-3a69-47a3-a23e-767354113784" CreationDate="2011-02-20T09:32:42.630" UserId="55" Text="It's been said above, testing is very, very tedious. Manual testing is a monkeys job.&#xD;&#xA;&#xD;&#xA;Companies understand that coming in through support is a well known path for people looking to get into the game industry. There are companies that don't like it. I recently watched an interview with Gabe Newell where he mentioned companies firing an employee who attempts and move out of QA. Companies need testers who are genuinely interested in what they're doing. So if this is your path make the best of it.&#xD;&#xA;  &#xD;&#xA;&gt; How were the relationships between testers and developers?&#xD;&#xA;&#xD;&#xA;Big companies tend to create group atmospheres. Artists will hang out with artists. Programmers will hang out with programmers. Testers will probably hang out with support. You will have to make an effort to network (lunch, activities). There is no reason why you wouldn't be able to create good relationships with developers. &#xD;&#xA;&#xD;&#xA;&gt; Did you write any code? (test &quot;frameworks&quot;, unit tests etc)&#xD;&#xA;&#xD;&#xA;You're talking about two different roles. One is a developer and one is not. Your entry level position revolves around manual testing (actually playing the game). If you have development experience then you would come on board as a QA Engineer and focus on writing code that tests the code (you wouldn't be playing the game). Small studios just don't have a budget to support a QA engineering staff so you'll have to target the big dogs if you're interested in this.&#xD;&#xA;&#xD;&#xA;&gt; If bugs made it into production was any (potentially unfair) blame put on the testers?&#xD;&#xA;&#xD;&#xA;This is a team effort. If people are playing the blame game you might want to look for some other company to work with. With code bases being hundreds of thousands lines of code no tester is going to find all of the bugs. That's just not realistic." />
  <row Id="18101" PostHistoryTypeId="5" PostId="3582" RevisionGUID="e9815039-6c49-4d3d-8367-8486f325b9b8" CreationDate="2011-02-20T11:12:58.823" UserId="2188" Comment="added &quot;false&quot; to the &quot;foot in the door&quot;, since it later explains why it doesn't actually matter" Text="I'm not a tester but I've worked on teams with them, and had students enter the industry as testers.&#xD;&#xA;&#xD;&#xA;Up sides:&#xD;&#xA;&#xD;&#xA; - Yes, it is a &quot;relatively&quot; easy way to get a job. Key word: relative. Testing jobs are still competitive.&#xD;&#xA; - You're one of the few people on the development team that can actually say you play games for a living.&#xD;&#xA; - It's a (false) foot in the door.&#xD;&#xA;&#xD;&#xA;Down sides:&#xD;&#xA;&#xD;&#xA; - The best description I've heard of QA is that it's walking into a wall for 40 hours to make sure you can't walk through it. **The job is tedious**, to say the least, and most people really can't stomach it for very long.&#xD;&#xA; - You're one of the few people on the development team that works part-time, so the pay is lousy and you can pretty much count on being let go at the end of the current project. You're on a ticking clock, so if you want to work yourself into a more permanent position, you've gotta work hard and fast to do so. **Actual transitions from part-time QA to full-time programmer or designer are rare** (all the more so as more would-be developers are treating QA as an entry point).&#xD;&#xA; - In my experience, there has been a clear separation between development and QA. While testers are at least treated nicely as human beings, it can be frustrating when you write up a bug only to hear that the dev team isn't doing anything about it -- not because they don't want to, but because there aren't enough resources and the leads have to make tough calls about what to fix and what not to.&#xD;&#xA;&#xD;&#xA;To answer your other questions: I've not seen very many QA people doing test scripting or other programming-like things, but that might be because many testers have no programming skills, or because purchasing a license for an automated test suite isn't in the budget, more than anything. And yes, bugs ALWAYS make it into production, but I've NEVER seen the testers get blamed." />
  <row Id="18102" PostHistoryTypeId="25" PostId="8811" RevisionGUID="910a4b24-f01b-4174-94b6-2311f6ef09f1" CreationDate="2011-02-20T11:22:53.607" Comment="http://twitter.com/#!/StackGameDev/status/39283846532964352" />
  <row Id="18104" PostHistoryTypeId="2" PostId="8828" RevisionGUID="208ffcd7-1469-4218-914e-20cfa9987734" CreationDate="2011-02-20T12:04:36.440" UserId="5399" Text="In my animation editor, I have a 3D gizmo that sits on the origin of a bone; the user drags the mesh around to rotate the bone.&#xD;&#xA;&#xD;&#xA;I've found that translating the 2D movements of the mouse into sensible 3D transforms is not near as simple as i'd hoped.&#xD;&#xA;&#xD;&#xA;For example what is intuitively 'up' or 'down'? How should the magnitude of rotations change with respect to dX/dY? How to implement this? What happens when the gizmo changes position or orientation with respect to the camera? ect.&#xD;&#xA;&#xD;&#xA;So far with trial and error i've written something (very) simple that works 70% of the time. I could probably continue to hack at it until I made something that works 99% of the time, but there must be someone who needed the same thing, and spent the time coming up with a much more elegant solution.&#xD;&#xA;&#xD;&#xA;Does anyone know of one?" />
  <row Id="18105" PostHistoryTypeId="1" PostId="8828" RevisionGUID="208ffcd7-1469-4218-914e-20cfa9987734" CreationDate="2011-02-20T12:04:36.440" UserId="5399" Text="Resources on expected behaviour when manipulating 3D objects with the mouse" />
  <row Id="18106" PostHistoryTypeId="3" PostId="8828" RevisionGUID="208ffcd7-1469-4218-914e-20cfa9987734" CreationDate="2011-02-20T12:04:36.440" UserId="5399" Text="&lt;3d&gt;&lt;algorithm&gt;&lt;gui&gt;&lt;movement&gt;&lt;interface&gt;" />
  <row Id="18107" PostHistoryTypeId="2" PostId="8829" RevisionGUID="09fa98f7-87ec-4734-85f7-c3520442895f" CreationDate="2011-02-20T13:14:06.967" UserId="2379" Text="If it is your first time, even it is just for learning, it is still better to use some kind of engine because you will learn what the engine can provide for you. &#xD;&#xA;&#xD;&#xA;&quot;The wheel&quot; using in the metaphor is the concept, not the implementation. Even you will not re-invent the wheel, you still need to choose whether you will buy one or you will make one by your own. Hence, creating your own engine is not even re-inventing the wheel, it's just you want to create your own wheel for some purpose, which might be for learning, for low cost, for small size or any specific usage or requirements. " />
  <row Id="18108" PostHistoryTypeId="2" PostId="8830" RevisionGUID="0a3be303-0ccc-4285-a501-262e5ce2a6ac" CreationDate="2011-02-20T13:36:28.783" UserId="1923" Text="You could constrain rotation to just the 3 axes that align with the gizmo's vectors.&#xD;&#xA;&#xD;&#xA;Then add a drop down box to allow the gizmo to line up with either world, local, view, etc.&#xD;&#xA;&#xD;&#xA;This is the way 3ds max does it." />
  <row Id="18109" PostHistoryTypeId="2" PostId="8831" RevisionGUID="84a91625-829a-488f-8e4c-a82b4e1a5f24" CreationDate="2011-02-20T13:45:53.660" UserId="5578" Text="I have done a lot of research into random number generators for slot machines, reel stop calculations and how to physically give the user a good chance on winning.&#xD;&#xA;&#xD;&#xA;What I can't figure out is how to properly insure that the machine is going to have a payout rating of (lets say) 95%.&#xD;&#xA;&#xD;&#xA;So, I have a reel set up wit 22 spaces on it.  Filled with 16 different symbols.  &#xD;&#xA;&#xD;&#xA;When I get my random number, mod divide it by 64 and get the remainder, I hop over to a loop up table to see how the virtual stop relates to the reel position.&#xD;&#xA;&#xD;&#xA;Now that I have how the reels are going to stop, do I make sure the payout ratio is correct?  For every dollar they put in, how to I make sure the machine will pay out .95 cents?&#xD;&#xA;&#xD;&#xA;Thanks for the ideas.&#xD;&#xA;&#xD;&#xA;I am working in actionscript, if that helps with the language issues, but in general I am just looking for theory.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18110" PostHistoryTypeId="1" PostId="8831" RevisionGUID="84a91625-829a-488f-8e4c-a82b4e1a5f24" CreationDate="2011-02-20T13:45:53.660" UserId="5578" Text="Slot Machine Pay Out" />
  <row Id="18111" PostHistoryTypeId="3" PostId="8831" RevisionGUID="84a91625-829a-488f-8e4c-a82b4e1a5f24" CreationDate="2011-02-20T13:45:53.660" UserId="5578" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;game-mechanics&gt;" />
  <row Id="18112" PostHistoryTypeId="2" PostId="8832" RevisionGUID="ec9a50c6-fb73-43ee-aef8-19065192415a" CreationDate="2011-02-20T14:19:19.113" UserId="634" Text="You want the [expected value][1] to be .95. In simple terms, this is the sum  of `probability * payout ` for each state.&#xD;&#xA;&#xD;&#xA;A brute force method would be to iterate over all 22^3 states (assuming you have 3 reels), add up the payout, and divide the sum by 22^3. However, since most states probably don't pay out anything, it might be easier to work out all the states that do pay out instead.&#xD;&#xA;&#xD;&#xA;For example if you had 1 Bell sybols per reel, then the probability of&#xD;&#xA;&#xD;&#xA;    [Bell] [Bell] [Bell]&#xD;&#xA;&#xD;&#xA;would be 1/22^3. And if you had 2 Cherries per reel, then the probability of&#xD;&#xA;&#xD;&#xA;    [Cherry] [Cherry] [any]&#xD;&#xA;&#xD;&#xA;would be 1/11^2.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Expected_value" />
  <row Id="18113" PostHistoryTypeId="2" PostId="8833" RevisionGUID="65d9050b-a41b-42f6-8da3-73e6076aa158" CreationDate="2011-02-20T14:22:17.110" UserId="202" Text="Download a bunch of demos of 3D-editors, like 3ds max, Milkshape3D, Blender, ZBrush .... Follow a tutorial for every of the modelers that teaches you how to construct something out of primitive objects. The reason is that the chance to have to move objects around freely in 3D space is higher when working with primitive objects than, say, when manipulating vertices.&#xD;&#xA;&#xD;&#xA;Figure out, which software's approach you liked the most and copy as if there was no tomorrow." />
  <row Id="18114" PostHistoryTypeId="25" PostId="8831" RevisionGUID="4b9a42c6-e010-44a2-936d-cab3bfa52945" CreationDate="2011-02-20T14:22:53.570" Comment="http://twitter.com/#!/StackGameDev/status/39329145217486848" />
  <row Id="18115" PostHistoryTypeId="2" PostId="8834" RevisionGUID="74eedf43-708b-49e6-9137-4413c1ee7dd1" CreationDate="2011-02-20T15:32:23.567" UserDisplayName="user5207" Text="I'm developing an Android game, and I'm making it so that it can run on low end devices without GPU, so I'm using the 2D API. I have so far tried to use Android's mechanisms such as layouts and activities where possible, but I'm beginning to wonder if it's not easier to just create a single custom view (or one per activity) and do all the work there.&#xD;&#xA;&#xD;&#xA;Here's an example of how I currently do things: I'm using a layout to display the game's background as an image view and the square game area, which is a custom view, centered in the middle.&#xD;&#xA;&#xD;&#xA;What would you say? Should I continue to use layouts where possible or is it more common/reasonable to just use a large custom view? I'm thinking that this would probably also make it easier to port my code to other platforms." />
  <row Id="18116" PostHistoryTypeId="1" PostId="8834" RevisionGUID="74eedf43-708b-49e6-9137-4413c1ee7dd1" CreationDate="2011-02-20T15:32:23.567" UserDisplayName="user5207" Text="Android: Layouts and views or a single full screen custom view?" />
  <row Id="18117" PostHistoryTypeId="3" PostId="8834" RevisionGUID="74eedf43-708b-49e6-9137-4413c1ee7dd1" CreationDate="2011-02-20T15:32:23.567" UserDisplayName="user5207" Text="&lt;android&gt;&lt;best-practices&gt;" />
  <row Id="18118" PostHistoryTypeId="5" PostId="8831" RevisionGUID="cf809c66-73ce-4d32-9020-927fe38b7ddd" CreationDate="2011-02-20T15:52:18.063" UserId="5578" Comment="added 216 characters in body; added 2 characters in body" Text="I have done a lot of research into random number generators for slot machines, reel stop calculations and how to physically give the user a good chance on winning.&#xD;&#xA;&#xD;&#xA;What I can't figure out is how to properly insure that the machine is going to have a payout rating of (lets say) 95%.&#xD;&#xA;&#xD;&#xA;So, I have a reel set up wit 22 spaces on it.  Filled with 16 different symbols.  &#xD;&#xA;&#xD;&#xA;When I get my random number, mod divide it by 64 and get the remainder, I hop over to a loop up table to see how the virtual stop relates to the reel position.&#xD;&#xA;&#xD;&#xA;Now that I have how the reels are going to stop, do I make sure the payout ratio is correct?  For every dollar they put in, how to I make sure the machine will pay out .95 cents?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for the ideas.&#xD;&#xA;&#xD;&#xA;I am working in actionscript, if that helps with the language issues, but in general I am just looking for theory.&#xD;&#xA;&#xD;&#xA;**Edit:** There is real money involved only in the fact that they can buy more tokens to play more.  There is not going to be real money paid out to the person, if they were to actually hit the any of the paylines." />
  <row Id="18119" PostHistoryTypeId="2" PostId="8835" RevisionGUID="bb959582-b7b8-4502-9dd1-0f629a1b90f9" CreationDate="2011-02-20T16:31:26.223" UserId="5581" Text="I am trying to get more experienced with OGRE3D and I am following the basic tutorials on the website. All the code samples compile just fine.&#xD;&#xA;&#xD;&#xA;The first time I encountered a &quot;error&quot; was in [Basic Tutorurial 3][1].&#xD;&#xA;&#xD;&#xA;The code line where visual studio says something is not right is :&#xD;&#xA;&#xD;&#xA;    mTerrainGroup = OGRE_NEW Ogre::TerrainGroup(mSceneMgr, Ogre::Terrain::ALIGN_X_Z, 513, 12000.0f);&#xD;&#xA;&#xD;&#xA;Visual studio compiles this line but it shows a ugly red line beneath it and on mouse hover it says &quot;#define OGRE_NEW new (__FILE__, __LINE__, __FUNCTION__) Error: no instance of overloaded 'operator new' matches the argument list&quot; or if I mouse hover over Ogre::TerrainGlobalOptions() it says &quot;Error: expected a type specifier&quot;. &#xD;&#xA;&#xD;&#xA;I searched on google but couldn't find my answer. I got about a year c++ experience but that was mainly with the WinSock libarys.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/Basic+Tutorial+3" />
  <row Id="18120" PostHistoryTypeId="1" PostId="8835" RevisionGUID="bb959582-b7b8-4502-9dd1-0f629a1b90f9" CreationDate="2011-02-20T16:31:26.223" UserId="5581" Text="Ogre3D, OGRE_NEW gives editor errors" />
  <row Id="18121" PostHistoryTypeId="3" PostId="8835" RevisionGUID="bb959582-b7b8-4502-9dd1-0f629a1b90f9" CreationDate="2011-02-20T16:31:26.223" UserId="5581" Text="&lt;c++&gt;&lt;3d-engines&gt;&lt;ogre&gt;" />
  <row Id="18122" PostHistoryTypeId="25" PostId="8835" RevisionGUID="88bf6ef2-043b-403d-8443-f2d36a184a66" CreationDate="2011-02-20T17:22:53.803" Comment="http://twitter.com/#!/StackGameDev/status/39374444447277056" />
  <row Id="18123" PostHistoryTypeId="2" PostId="8836" RevisionGUID="37164d58-1833-46a3-80bd-70a9c413e1de" CreationDate="2011-02-20T18:32:29.643" UserDisplayName="user5583" Text="I'm trying to animate a player object in my 2D grid when the user clicks somewhere in the screen.&#xD;&#xA;&#xD;&#xA;I got the following 4 variables:&#xD;&#xA;&#xD;&#xA; 1. oX (Current player position X)&#xD;&#xA; 2. oY (Current player position Y)&#xD;&#xA; 3. dX (Destination X)&#xD;&#xA; 4. dY (Destination Y)&#xD;&#xA;&#xD;&#xA;How can I make sure the player moves in a straight line to the new XY coordinates. The way I'm doing it now is really awfull and causes the player to first move along x axis, and finally in y axis.&#xD;&#xA;&#xD;&#xA;Can someone give me some guidance with the involved math cause I'm really not sure on how to accomplish this.&#xD;&#xA;&#xD;&#xA;Thank you for your time.&#xD;&#xA;Kind regards,&#xD;&#xA;Mark&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18124" PostHistoryTypeId="1" PostId="8836" RevisionGUID="37164d58-1833-46a3-80bd-70a9c413e1de" CreationDate="2011-02-20T18:32:29.643" UserDisplayName="user5583" Text="My first animation - Using SDL.NET C#" />
  <row Id="18125" PostHistoryTypeId="3" PostId="8836" RevisionGUID="37164d58-1833-46a3-80bd-70a9c413e1de" CreationDate="2011-02-20T18:32:29.643" UserDisplayName="user5583" Text="&lt;c#&gt;&lt;animation&gt;&lt;sdl&gt;" />
  <row Id="18126" PostHistoryTypeId="2" PostId="8837" RevisionGUID="04ab9f07-a723-4dc0-a91b-118e75946cdb" CreationDate="2011-02-20T19:09:59.403" UserId="2332" Text="You will want to look into vector maths for this. The basic way you would handle this is as follows:&#xD;&#xA;&#xD;&#xA;You'd want two variables as your &quot;heading&quot;, this will tell you the direction you want to be heading in.&#xD;&#xA;&#xD;&#xA;Let's call them hX and hY.&#xD;&#xA;&#xD;&#xA;hX = dX - oX  &#xD;&#xA;hY = dY - oY  &#xD;&#xA;&#xD;&#xA;You should probably normalize these values (meaning, the length of the vector is equal to 1). You do that by performing the following:&#xD;&#xA;&#xD;&#xA;Length = sqrt( hX^2 + hY^2 )  &#xD;&#xA;hX = hX / Length  &#xD;&#xA;hY = hY / Length&#xD;&#xA;&#xD;&#xA;Now you can use a speed multiplier to determine how quickly you want your agent to move to the destination position.&#xD;&#xA;&#xD;&#xA;currentX = hX * SPEED  &#xD;&#xA;currentY = hY * SPEED&#xD;&#xA;&#xD;&#xA;That should be everything really. To make this a LOT easier, it might be worth looking into incorporating a maths library with SDL so that you can use vectors and vector operations." />
  <row Id="18127" PostHistoryTypeId="5" PostId="8837" RevisionGUID="94613863-390d-4be4-b1ac-a43fb5d24105" CreationDate="2011-02-20T19:19:43.360" UserId="2332" Comment="Fixed typo that made equations just wrong" Text="You will want to look into vector maths for this. The basic way you would handle this is as follows:&#xD;&#xA;&#xD;&#xA;You'd want two variables as your &quot;heading&quot;, this will tell you the direction you want to be heading in.&#xD;&#xA;&#xD;&#xA;Let's call them hX and hY.&#xD;&#xA;&#xD;&#xA;hX = dX - oX  &#xD;&#xA;hY = dY - oY  &#xD;&#xA;&#xD;&#xA;You should probably normalize these values (meaning, the length of the vector is equal to 1). You do that by performing the following:&#xD;&#xA;&#xD;&#xA;Length = sqrt( hX^2 + hY^2 )  &#xD;&#xA;hX = hX / Length  &#xD;&#xA;hY = hY / Length&#xD;&#xA;&#xD;&#xA;Now you can use a speed multiplier to determine how quickly you want your agent to move to the destination position.&#xD;&#xA;&#xD;&#xA;currentX += hX * SPEED  &#xD;&#xA;currentY += hY * SPEED&#xD;&#xA;&#xD;&#xA;That should be everything really. To make this a LOT easier, it might be worth looking into incorporating a maths library with SDL so that you can use vectors and vector operations." />
  <row Id="18128" PostHistoryTypeId="5" PostId="8745" RevisionGUID="c154a24f-3667-4fbc-9c11-e327ad581551" CreationDate="2011-02-20T19:28:49.400" UserId="5034" Comment="added 93 characters in body" Text="I haven't yet tried it myself, but this looks very interesting:&#xD;&#xA;&#xD;&#xA;[librocket][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://librocket.com/&#xD;&#xA;&#xD;&#xA;EDIT: Since you'll need a context to render to, I would recommend either SFML or SDL 1.3." />
  <row Id="18129" PostHistoryTypeId="25" PostId="8836" RevisionGUID="0988e66d-59d3-44b2-b418-99d07e59a729" CreationDate="2011-02-20T20:22:53.573" Comment="http://twitter.com/#!/StackGameDev/status/39419741336645632" />
  <row Id="18130" PostHistoryTypeId="2" PostId="8838" RevisionGUID="48ad84ad-ce65-43b0-8c81-964403ab2bd4" CreationDate="2011-02-20T20:33:42.233" UserId="2763" Text="[www.turbosquid.com][1] is a great place for free 3D models :o)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com" />
  <row Id="18131" PostHistoryTypeId="2" PostId="8839" RevisionGUID="ece63c59-d11c-4696-b471-0af90f092461" CreationDate="2011-02-20T20:43:28.013" UserId="5584" Text="Sorry for my clumsy question.&#xD;&#xA;But I don't know where I am wrong at creating view matrix.&#xD;&#xA;&#xD;&#xA;I have the following code:&#xD;&#xA;&#xD;&#xA;     createMatrix(vec4f(xAxis.x, xAxis.y, xAxis.z, dot(xAxis,eye)), &#xD;&#xA;     vec4f(  yAxis.x_, yAxis.y_, yAxis.z_, dot(yAxis,eye)), &#xD;&#xA;     vec4f(-zAxis.x_, -zAxis.y_, -zAxis.z_, -dot(zAxis,eye)), &#xD;&#xA;     vec4f(0, 0, 0, 1)); //column1, column2,...&#xD;&#xA;&#xD;&#xA;I have tried to transpose it, but with no success.&#xD;&#xA;I have also tried to use gluLookAt(...) with success.&#xD;&#xA;At the reference page, I watched the remarks about the to-be-created matrix, and it seems the same as mine. Where I am wrong?" />
  <row Id="18132" PostHistoryTypeId="1" PostId="8839" RevisionGUID="ece63c59-d11c-4696-b471-0af90f092461" CreationDate="2011-02-20T20:43:28.013" UserId="5584" Text="View matrix in opengl" />
  <row Id="18133" PostHistoryTypeId="3" PostId="8839" RevisionGUID="ece63c59-d11c-4696-b471-0af90f092461" CreationDate="2011-02-20T20:43:28.013" UserId="5584" Text="&lt;matrix&gt;" />
  <row Id="18134" PostHistoryTypeId="2" PostId="8840" RevisionGUID="355b17c9-6091-459e-ab48-dd0b32597a58" CreationDate="2011-02-20T20:48:46.943" UserId="2998" Text="I really want to know how the bullets in [Radiangames Inferno][1] are done. The bullets seem like they are just billboard particles but I am curious about how their tails are implemented. They can curve so this means they are not just a billboard. Also, they appear continuous which implies that the tails are not made of a bunch of smaller particles (I think).&#xD;&#xA;&#xD;&#xA;Can anyone shead some light on this for me?&#xD;&#xA;&#xD;&#xA;![screen shot][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=pZOuDX7hmpk&amp;feature=player_detailpage#t=60s&#xD;&#xA;  [2]: http://i.stack.imgur.com/orvw1.png" />
  <row Id="18135" PostHistoryTypeId="1" PostId="8840" RevisionGUID="355b17c9-6091-459e-ab48-dd0b32597a58" CreationDate="2011-02-20T20:48:46.943" UserId="2998" Text="How are these bullets done?" />
  <row Id="18136" PostHistoryTypeId="3" PostId="8840" RevisionGUID="355b17c9-6091-459e-ab48-dd0b32597a58" CreationDate="2011-02-20T20:48:46.943" UserId="2998" Text="&lt;xna&gt;&lt;particles&gt;" />
  <row Id="18137" PostHistoryTypeId="2" PostId="8841" RevisionGUID="7219e802-9a6a-4af5-bc0e-b26b726356e2" CreationDate="2011-02-20T21:00:28.597" UserId="659" Text="It's easy enough if you're doing 2D with a 3D API, and can draw textured polygons.&#xD;&#xA;&#xD;&#xA;Store a history of previous positions, use these to build a triangle strip along the bullet's path. Then texture it, and draw with additive blending&#xD;&#xA;&#xD;&#xA;(However, if the bullets make any sharp turns, or you need wide trails, it may get more interesting - you'll have problems creating clean geometry without unwanted overlaps)" />
  <row Id="18138" PostHistoryTypeId="2" PostId="8842" RevisionGUID="c0f3a31c-6740-4edb-977c-ca02152a9a34" CreationDate="2011-02-20T21:07:22.643" UserId="18" Text="It depends on your game. It's probably okay to use several views for more passive games like minesweeper or sudoku, but not for a shoot 'em up or a platformer. If your current setup is working fine and you find it easier to code using views then you might as well continue doing things that way. It doesn't really matters as long as you're satisfied with the result.&#xD;&#xA;&#xD;&#xA;If porting is an issue then you want to use abstractions for the platform-specific stuff regardless of your implementation. But I think that you're right about it being easier with using a custom view, mainly because you wouldn't worry about parsing the layout XML files on the new platform (unless you define the layout in code)." />
  <row Id="18139" PostHistoryTypeId="2" PostId="8843" RevisionGUID="0ee154e5-5268-45e8-85cd-87fb389743d6" CreationDate="2011-02-20T21:07:33.623" UserId="5401" Text="I don't know what is wrong with your code, but it looks different to mine.&#xD;&#xA;Here's what I've been using in my projects for the past few years.&#xD;&#xA;&#xD;&#xA;        return new float4x4(&#xD;&#xA;            Xax.X, Yax.X, Zax.X, 0,&#xD;&#xA;            Xax.Y, Yax.Y, Zax.Y, 0,&#xD;&#xA;            Xax.Z, Yax.Z, Zax.Z, 0,&#xD;&#xA;            -float3.Dot(pos, Xax), -float3.Dot(pos, Yax), -float3.Dot(pos, Zax), 1&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;I hope this helps somewhat." />
  <row Id="18141" PostHistoryTypeId="2" PostId="8845" RevisionGUID="2ec21bc4-c67a-45f8-8303-09055553bf6a" CreationDate="2011-02-20T21:33:26.810" UserId="3794" Text="In openGl matrices are transposed in memory. So transpose the matrix is OK. And also why are you doing that ` vec4f(-zAxis.x_, -zAxis.y_, -zAxis.z_, -dot(zAxis,eye))`? That is not correct. &#xD;&#xA;&#xD;&#xA;So you are in OpenGl. OpenGl uses right handed coordinate system. And for RH is lookat function defined like this:&#xD;&#xA;&#xD;&#xA;    zaxis = normal(cameraPosition - cameraTarget)&#xD;&#xA;    xaxis = normal(cross(cameraUpVector, zaxis))&#xD;&#xA;    yaxis = cross(zaxis, xaxis)&#xD;&#xA;    &#xD;&#xA;     xaxis.x           yaxis.x           zaxis.x          0&#xD;&#xA;     xaxis.y           yaxis.y           zaxis.y          0&#xD;&#xA;     xaxis.z           yaxis.z           zaxis.z          0&#xD;&#xA;    -dot(xaxis, cameraPosition)  -dot(yaxis, cameraPosition)  -dot(zaxis, cameraPosition)  1&#xD;&#xA;&#xD;&#xA;Especialy take care about `zaxis = normal(cameraPosition - cameraTarget)` because it is the only difference between RH and LH system. &#xD;&#xA;&#xD;&#xA;**Save it transposed and that's it**" />
  <row Id="18142" PostHistoryTypeId="6" PostId="8839" RevisionGUID="bcf41a10-1938-4e2e-aa6a-2d1da3451670" CreationDate="2011-02-20T21:46:28.010" UserId="3794" Comment="edited tags" Text="&lt;opengl&gt;&lt;matrix&gt;&lt;linear-algebra&gt;" />
  <row Id="18143" PostHistoryTypeId="19" PostId="3789" RevisionGUID="edc1125e-e3e8-444a-a8ff-7a75b5b29768" CreationDate="2011-02-20T22:18:17.307" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="18144" PostHistoryTypeId="5" PostId="8836" RevisionGUID="31c92af9-33e6-4a81-bdb3-c32c7ac6b0d2" CreationDate="2011-02-20T22:30:15.100" UserDisplayName="user5583" Comment="added 718 characters in body" Text="I'm trying to animate a player object in my 2D grid when the user clicks somewhere in the screen.&#xD;&#xA;&#xD;&#xA;I got the following 4 variables:&#xD;&#xA;&#xD;&#xA; 1. oX (Current player position X)&#xD;&#xA; 2. oY (Current player position Y)&#xD;&#xA; 3. dX (Destination X)&#xD;&#xA; 4. dY (Destination Y)&#xD;&#xA;&#xD;&#xA;How can I make sure the player moves in a straight line to the new XY coordinates. The way I'm doing it now is really awfull and causes the player to first move along x axis, and finally in y axis.&#xD;&#xA;&#xD;&#xA;Can someone give me some guidance with the involved math cause I'm really not sure on how to accomplish this.&#xD;&#xA;&#xD;&#xA;Thank you for your time.&#xD;&#xA;Kind regards,&#xD;&#xA;Mark&#xD;&#xA;&#xD;&#xA;Update: It's working now but whats the right way to check if the current positions are equal to the target position?&#xD;&#xA;&#xD;&#xA;        private static void MovePlayer(double x2, double y2, int duration)&#xD;&#xA;    {&#xD;&#xA;        double hX = x2 - m_PlayerPosition.X;&#xD;&#xA;        double hY = y2 - m_PlayerPosition.Y;&#xD;&#xA;&#xD;&#xA;        double Length = Math.Sqrt(Math.Pow(hX, 2) + Math.Pow(hY, 2));&#xD;&#xA;        hX = hX / Length;&#xD;&#xA;        hY = hY / Length;&#xD;&#xA;&#xD;&#xA;        while (m_PlayerPosition.X != Convert.ToInt32(x2) || m_PlayerPosition.Y != Convert.ToInt32(y2))&#xD;&#xA;        {&#xD;&#xA;            m_PlayerPosition.X += Convert.ToInt32(hX * 1);&#xD;&#xA;            m_PlayerPosition.Y += Convert.ToInt32(hY * 1);&#xD;&#xA;&#xD;&#xA;            UpdatePlayerLocation();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18145" PostHistoryTypeId="5" PostId="8845" RevisionGUID="dcc3379d-21a1-4047-8ef3-26bb3df72fcd" CreationDate="2011-02-20T22:40:17.600" UserId="3794" Comment="deleted 79 characters in body" Text="In openGl matrices are transposed in memory. So transpose the matrix is OK. But you code doesn't look correct.&#xD;&#xA;&#xD;&#xA;So you are in OpenGl. OpenGl uses right handed coordinate system. And for RH is lookat function defined like this:&#xD;&#xA;&#xD;&#xA;    zaxis = normal(cameraPosition - cameraTarget)&#xD;&#xA;    xaxis = normal(cross(cameraUpVector, zaxis))&#xD;&#xA;    yaxis = cross(zaxis, xaxis)&#xD;&#xA;    &#xD;&#xA;     xaxis.x           yaxis.x           zaxis.x          0&#xD;&#xA;     xaxis.y           yaxis.y           zaxis.y          0&#xD;&#xA;     xaxis.z           yaxis.z           zaxis.z          0&#xD;&#xA;    -dot(xaxis, cameraPosition)  -dot(yaxis, cameraPosition)  -dot(zaxis, cameraPosition)  1&#xD;&#xA;&#xD;&#xA;Especialy take care about `zaxis = normal(cameraPosition - cameraTarget)` because it is the only difference between RH and LH system. &#xD;&#xA;&#xD;&#xA;**Save it transposed and that's it**" />
  <row Id="18146" PostHistoryTypeId="5" PostId="8837" RevisionGUID="1ae2421a-ce46-495d-8ff3-289afc5a6875" CreationDate="2011-02-20T22:49:29.490" UserId="2332" Comment="Updated to answer updated question" Text="You will want to look into vector maths for this. The basic way you would handle this is as follows:&#xD;&#xA;&#xD;&#xA;You'd want two variables as your &quot;heading&quot;, this will tell you the direction you want to be heading in.&#xD;&#xA;&#xD;&#xA;Let's call them hX and hY.&#xD;&#xA;&#xD;&#xA;hX = dX - oX  &#xD;&#xA;hY = dY - oY  &#xD;&#xA;&#xD;&#xA;You should probably normalize these values (meaning, the length of the vector is equal to 1). You do that by performing the following:&#xD;&#xA;&#xD;&#xA;Length = sqrt( hX^2 + hY^2 )  &#xD;&#xA;hX = hX / Length  &#xD;&#xA;hY = hY / Length&#xD;&#xA;&#xD;&#xA;Now you can use a speed multiplier to determine how quickly you want your agent to move to the destination position.&#xD;&#xA;&#xD;&#xA;currentX += hX * SPEED  &#xD;&#xA;currentY += hY * SPEED&#xD;&#xA;&#xD;&#xA;That should be everything really. To make this a LOT easier, it might be worth looking into incorporating a maths library with SDL so that you can use vectors and vector operations.&#xD;&#xA;&#xD;&#xA;EDIT FOR UPDATED QUESTION:  &#xD;&#xA;The way you have your while loop at the moment will lock up your entire game until the player has arrived at the position.&#xD;&#xA;&#xD;&#xA;A better way is to have a standard game loop with an Update() function like so:&#xD;&#xA;&#xD;&#xA;    public class Game&#xD;&#xA;    {&#xD;&#xA;        // Other implementations left out&#xD;&#xA;        public void Update()&#xD;&#xA;        {&#xD;&#xA;            UpdatePlayer()&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;In your UpdatePlayer() function you can call MovePlayer() and within MovePlayer() since the Length variable is always updated every time you call the function, all you have to do is update MovePlayer() to do something like this:&#xD;&#xA;&#xD;&#xA;    private static void MovePlayer(double x2, double y2, int duration)&#xD;&#xA;    {&#xD;&#xA;        double hX = x2 - m_PlayerPosition.X;&#xD;&#xA;        double hY = y2 - m_PlayerPosition.Y;&#xD;&#xA;    &#xD;&#xA;        double Length = Math.Sqrt(Math.Pow(hX, 2) + Math.Pow(hY, 2));&#xD;&#xA;&#xD;&#xA;        if( Length &lt; 0.1f )    // Less-than rather than Length == 0.0 to handle floating point errors&#xD;&#xA;            return;&#xD;&#xA;&#xD;&#xA;        hX = hX / Length;&#xD;&#xA;        hY = hY / Length;&#xD;&#xA;&#xD;&#xA;        m_PlayerPosition.X += Convert.ToInt32(hX * 1);&#xD;&#xA;        m_PlayerPosition.Y += Convert.ToInt32(hY * 1);&#xD;&#xA;    &#xD;&#xA;        UpdatePlayerLocation();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18147" PostHistoryTypeId="5" PostId="8845" RevisionGUID="3888f0bb-384e-48d4-8557-7b8eb6f7b9a8" CreationDate="2011-02-20T23:10:37.903" UserId="3794" Comment="added 1 characters in body" Text="In openGl matrices are transposed in memory. So transpose the matrix is OK. But your code doesn't look correct.&#xD;&#xA;&#xD;&#xA;So you are in OpenGl. OpenGl uses right handed coordinate system. And for RH is lookat function defined like this:&#xD;&#xA;&#xD;&#xA;    zaxis = normal(cameraPosition - cameraTarget)&#xD;&#xA;    xaxis = normal(cross(cameraUpVector, zaxis))&#xD;&#xA;    yaxis = cross(zaxis, xaxis)&#xD;&#xA;    &#xD;&#xA;     xaxis.x           yaxis.x           zaxis.x          0&#xD;&#xA;     xaxis.y           yaxis.y           zaxis.y          0&#xD;&#xA;     xaxis.z           yaxis.z           zaxis.z          0&#xD;&#xA;    -dot(xaxis, cameraPosition)  -dot(yaxis, cameraPosition)  -dot(zaxis, cameraPosition)  1&#xD;&#xA;&#xD;&#xA;Especialy take care about `zaxis = normal(cameraPosition - cameraTarget)` because it is the only difference between RH and LH system. &#xD;&#xA;&#xD;&#xA;**Save it transposed and that's it**" />
  <row Id="18148" PostHistoryTypeId="25" PostId="8840" RevisionGUID="ac45b44b-e714-426e-ab18-5e9255bf0a50" CreationDate="2011-02-20T23:22:53.553" Comment="http://twitter.com/#!/StackGameDev/status/39465040398647296" />
  <row Id="18149" PostHistoryTypeId="2" PostId="8846" RevisionGUID="33de2ce7-d4c7-480d-af6d-113f4dbab784" CreationDate="2011-02-20T23:42:58.170" UserId="323" Text="There's two ways to make a game that will never be pirated.&#xD;&#xA;&#xD;&#xA;First, never release your game.&#xD;&#xA;&#xD;&#xA;Second, make a game that is so bad that nobody has any interest in playing it.&#xD;&#xA;&#xD;&#xA;I obviously don't recommend either of these. Make a good game, don't worry about pirates. They are a fact of life, and some of them will turn into customers." />
  <row Id="18150" PostHistoryTypeId="2" PostId="8847" RevisionGUID="401f95a3-661e-48cc-b909-ba0bc61567b9" CreationDate="2011-02-20T23:52:46.603" UserId="659" Text="It looks like you're applying the translation part of your modelview matrix to the normals?&#xD;&#xA;&#xD;&#xA;You don't want to do that - normals should only be rotated. (You're already removing any scale that may exist in the matrix by doing an inverse transpose, but the translation is still there)&#xD;&#xA;&#xD;&#xA;Changing this line may fix it:&#xD;&#xA;&#xD;&#xA;     vec4 transformedNormal = vec4(aVertexNormal.xyz, 0.0);&#xD;&#xA;&#xD;&#xA;(Setting the 4th element of the vector to 0 will cause it to add the translation component multiplied by 0, cancelling it out. You should probably use vec3s instead for normals, though)" />
  <row Id="18151" PostHistoryTypeId="5" PostId="8847" RevisionGUID="b0db12ce-a7af-45e0-8176-7d3eeab6ffa5" CreationDate="2011-02-20T23:58:20.480" UserId="659" Comment="added 34 characters in body; added 57 characters in body" Text="It looks like you're applying the translation part of your modelview matrix to the normals?&#xD;&#xA;&#xD;&#xA;You don't want to do that - normals should only be rotated. (You're already removing any scale that may exist in the matrix by doing an inverse transpose, but the translation is still there)&#xD;&#xA;&#xD;&#xA;Changing the first line of ComputeLighting() to this may fix it:&#xD;&#xA;&#xD;&#xA;     vec4 transformedNormal = vec4(aVertexNormal.xyz, 0.0);&#xD;&#xA;&#xD;&#xA;(Setting the 4th element of the vector to 0 will cause it to add the translation component multiplied by 0, cancelling it out. You should probably use vec3s instead for normals, though. And/or set a normal matrix with the translation removed)" />
  <row Id="18152" PostHistoryTypeId="2" PostId="8848" RevisionGUID="c5009e47-a3b0-4b57-ad62-7ac6e4a01fb2" CreationDate="2011-02-21T00:27:37.287" UserId="2998" Text="This is the most beautiful 2d lighting I have ever seen. Does anyone know how he went about doing it?&#xD;&#xA;&#xD;&#xA; - http://www.youtube.com/watch?v=BIQRhOFkvQY&#xD;&#xA; - http://www.youtube.com/watch?v=tnTYXPuecMs&#xD;&#xA; - http://www.youtube.com/watch?v=rhC_jVM8IYU&#xD;&#xA; - http://www.youtube.com/watch?v=_Aw5BdjWqqU&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Or download it here: http://grantkot.com/PollutedPlanet/publish.htm" />
  <row Id="18153" PostHistoryTypeId="1" PostId="8848" RevisionGUID="c5009e47-a3b0-4b57-ad62-7ac6e4a01fb2" CreationDate="2011-02-21T00:27:37.287" UserId="2998" Text="How is this lighting effect done?" />
  <row Id="18154" PostHistoryTypeId="3" PostId="8848" RevisionGUID="c5009e47-a3b0-4b57-ad62-7ac6e4a01fb2" CreationDate="2011-02-21T00:27:37.287" UserId="2998" Text="&lt;xna&gt;&lt;lighting&gt;&lt;hlsl&gt;" />
  <row Id="18155" PostHistoryTypeId="5" PostId="8832" RevisionGUID="bb04eae0-4f37-4313-90d5-968fabd08865" CreationDate="2011-02-21T00:30:05.703" UserId="634" Comment="added 458 characters in body" Text="You want the [expected value][1] to be .95. In simple terms, this is the sum  of `probability * payout ` for each state.&#xD;&#xA;&#xD;&#xA;A brute force method would be to iterate over all 22^3 states (assuming you have 3 reels), add up the payout, and divide the sum by 22^3. However, since most states probably don't pay out anything, it might be easier to work out all the states that do pay out instead.&#xD;&#xA;&#xD;&#xA;For example if you had 1 Bell sybols per reel, then the probability of&#xD;&#xA;&#xD;&#xA;    [Bell] [Bell] [Bell]&#xD;&#xA;&#xD;&#xA;would be 1/22^3. And if you had 2 Cherries per reel, then the probability of&#xD;&#xA;&#xD;&#xA;    [Cherry] [Cherry] [any]&#xD;&#xA;&#xD;&#xA;would be 1/11^2.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;EDIT: The above only tells you how to check that the payouts give the desired return rate. As a simple example, lets consider a game where you pay $1 to flip 2 coins. Here are three payout schemes that all give a return rate of .95:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. Two heads pays $3.80, everything else pays nothing&#xD;&#xA; 2. Two heads or two tails pays $1.90, everything else pays nothing&#xD;&#xA; 3. Two heads pays nothing, everything else pays $1.26&#xD;&#xA;&#xD;&#xA;Which one is more &quot;fun&quot;? You tell me...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Expected_value" />
  <row Id="18156" PostHistoryTypeId="2" PostId="8849" RevisionGUID="7065c46e-196f-4331-a45d-5c8642d5af17" CreationDate="2011-02-21T00:42:55.807" UserId="5586" Text="Make the distribution of your game as simple as possible and release frequent updates ( with free new content)&#xD;&#xA;&#xD;&#xA;eg. Angry Birds on the iPhone. Even if somebody pirates the game first, he might decide to buy it just because of the auto update function. (+ the new free content will give a feeling of becoming much more for the money and that you are a decent developer)&#xD;&#xA;&#xD;&#xA;on the PC I would use steam. It is great for small developers and the only distribution path more convenient than pirating. &#xD;&#xA;&#xD;&#xA;Prizing is far less important in my opinion. (A game for 9.99$ on steam will be bought far more often than one for 7$ on a private homepage.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And most importantly: dont focus on the pirates and potential losses, concentrate instead on the paying customers, quality, and increasing the revenue. " />
  <row Id="18157" PostHistoryTypeId="2" PostId="8850" RevisionGUID="c1ada481-0632-4d54-9843-1bcab6ba6074" CreationDate="2011-02-21T01:14:44.767" UserId="2345" Text="As others have stated, once your game is out, it really does not matter if they have the source code or not; it will get cracked. However, you can do a lot to make sure it doesn't burn you. &#xD;&#xA;&#xD;&#xA;The first recommendation I have is for you to **make it easier to purchase/download the game than for a pirate to torrent and crack it**. For example, steam makes it very easy for me to buy a game, so much so that it takes far less effort to buy a game than to crack it. Therefore, if you make your paying customers jump through hoops to play your game, by putting in some crazy DRM or registration system, you could be shooting yourself in the foot. &#xD;&#xA;&#xD;&#xA;Another thing to consider is that **you should not think about pirates as lost sales**. These people may never have bought your game even if no crack existed. But more importantly, they may actually be helping spread the word about your game to people who may not even know about it. Their friends wont necessarily pirate the game. Also, some pirates may enjoy your game enough to actually consider buying it. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="18158" PostHistoryTypeId="25" PostId="8848" RevisionGUID="b067a2c8-3517-457e-ad0b-957dbf7381f1" CreationDate="2011-02-21T02:22:53.123" Comment="http://twitter.com/#!/StackGameDev/status/39510338080612352" />
  <row Id="18159" PostHistoryTypeId="2" PostId="8851" RevisionGUID="496fbd23-b403-4807-8dde-8b9e5e121a6c" CreationDate="2011-02-21T03:56:10.570" UserId="3830" Text="It's only a mistake if you don't have the time to learn.  If you've got the time, go for it.  If you don't, then don't do it." />
  <row Id="18160" PostHistoryTypeId="2" PostId="8852" RevisionGUID="55a994f1-0202-46be-999c-956fb20e11c8" CreationDate="2011-02-21T04:56:11.427" UserId="4638" Text="Everything was fine. The triangle I was rendering for the FBO was getting clipped which is why I was not seeing anything. A translate Z of -20 is all it took to get the triangle rendering properly.&#xD;&#xA;&#xD;&#xA;A (obvious) thing I learnt: When the user FBO is not working properly, render it to the normal framebuffer and see if what you expect to show up in the user FBO, actually shows up there. If not, you have a problem in the way you are rendering to the user FBO.&#xD;&#xA;&#xD;&#xA;Hope it helps someone." />
  <row Id="18161" PostHistoryTypeId="2" PostId="8853" RevisionGUID="4dd73aba-60a3-4a81-ae1f-31caf144c2aa" CreationDate="2011-02-21T05:03:56.043" UserId="5073" Text="I have used the pan gesture for tracking the pixel Per Second (OR Speed For THe movement Of the hand ) But The Real Trouble Is that PanGesture library Doesn't Support In Deployment Target less Than 3.2 So ANy budy have Idea To Track the Speed in Pixel Per Second&#xD;&#xA;&#xD;&#xA;Thank you In Advance&#xD;&#xA;" />
  <row Id="18162" PostHistoryTypeId="1" PostId="8853" RevisionGUID="4dd73aba-60a3-4a81-ae1f-31caf144c2aa" CreationDate="2011-02-21T05:03:56.043" UserId="5073" Text="I Have use The PanGesture for tracking the speed of the hand MOve In Pixel Per second But It Doesn't Work in Os Less than 3.2 ..?Any other WAy?" />
  <row Id="18163" PostHistoryTypeId="3" PostId="8853" RevisionGUID="4dd73aba-60a3-4a81-ae1f-31caf144c2aa" CreationDate="2011-02-21T05:03:56.043" UserId="5073" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;cocoa&gt;" />
  <row Id="18164" PostHistoryTypeId="2" PostId="8854" RevisionGUID="852ddf88-fa78-44ea-93dc-5198e3bed3f1" CreationDate="2011-02-21T05:12:56.157" UserId="5590" Text="I also posted this on the main StackExchange, but this seems like a better place, but for give me for the double post if it shows up twice.&#xD;&#xA;&#xD;&#xA;I have been trying for several hours to implement a GLSL replacement for glTexGen with GL_OBJECT_LINEAR. For OpenGL ES 2.0.  In Ogl GLSL there is the gl_TextureMatrix that makes this easier, but thats not available on OpenGL ES 2.0 / OpenGL ES Shader Language 1.0&#xD;&#xA;&#xD;&#xA;Several sites have mentioned that this should be &quot;easy&quot; to do in a GLSL vert shader. But I just can not get it to work.&#xD;&#xA;&#xD;&#xA;My hunch is that I'm not setting the planes up correctly, or I'm missing something in my understanding.&#xD;&#xA;&#xD;&#xA;I've pored over the web. But most sites are talking about projected textures, I'm just looking to create UV's based on planar projection. The models are being built in Maya, have 50k polygons and the modeler is using planer mapping, but Maya will not export the UV's. So I'm trying to figure this out.&#xD;&#xA;&#xD;&#xA;I've looked at the glTexGen manpage information:&#xD;&#xA;&#xD;&#xA;g = p1xo + p2yo + p3zo + p4wo&#xD;&#xA;&#xD;&#xA;What is g? Is g the value of s in the texture2d call?&#xD;&#xA;&#xD;&#xA;I've looked at the site:&#xD;&#xA;&#xD;&#xA;http://www.opengl.org/wiki/Mathematics_of_glTexGen&#xD;&#xA;&#xD;&#xA;Another size explains the same function:&#xD;&#xA;&#xD;&#xA;coord = P1*X + P2*Y + P3*Z + P4*W&#xD;&#xA;&#xD;&#xA;I don't get how coord (an UV vec2 in my mind) is equal to the dot product (a scalar value)? Same problem I had before with &quot;g&quot;.&#xD;&#xA;&#xD;&#xA;What do I set the plane to be? In my opengl c++ 3.0 code, I set it to [0, 0, 1, 0] (basically unit z) and glTexGen works great.&#xD;&#xA;&#xD;&#xA;I'm still missing something.&#xD;&#xA;&#xD;&#xA;My vert shader looks basically like this:&#xD;&#xA;WVPMatrix = World View Project Matrix.&#xD;&#xA;POSITION is the model vertex position.&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;varying vec4 kOutBaseTCoord;&#xD;&#xA;void main()&#xD;&#xA;{&#xD;&#xA;	gl_Position = WVPMatrix * vec4(POSITION, 1.0);&#xD;&#xA;&#xD;&#xA;	vec4 sPlane = vec4(1.0, 0.0, 0.0, 0.0);&#xD;&#xA;	vec4 tPlane = vec4(0.0, 1.0, 0.0, 0.0);&#xD;&#xA;	vec4 rPlane = vec4(0.0, 0.0, 0.0, 0.0);&#xD;&#xA;	vec4 qPlane = vec4(0.0, 0.0, 0.0, 0.0);&#xD;&#xA;	&#xD;&#xA;	kOutBaseTCoord.s = dot(vec4(POSITION, 1.0), sPlane);&#xD;&#xA;	kOutBaseTCoord.t = dot(vec4(POSITION, 1.0), tPlane);&#xD;&#xA;	//kOutBaseTCoord.r = dot(vec4(POSITION, 1.0), rPlane);&#xD;&#xA;	//kOutBaseTCoord.q = dot(vec4(POSITION, 1.0), qPlane);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;The frag shader&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;precision mediump float;&#xD;&#xA;uniform sampler2D BaseSampler;&#xD;&#xA;varying mediump vec4 kOutBaseTCoord;&#xD;&#xA;void main()&#xD;&#xA;{&#xD;&#xA;	&#xD;&#xA;	//gl_FragColor = vec4(kOutBaseTCoord.st, 0.0, 1.0);&#xD;&#xA;	gl_FragColor = texture2D(BaseSampler, kOutBaseTCoord.st);&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;I've tried texture2DProj in frag shader&#xD;&#xA;&#xD;&#xA;Here are some of the other links I've looked up&#xD;&#xA;&#xD;&#xA;http://www.gamedev.net/topic/407961-texgen-not-working-with-glsl-with-fixed-pipeline-is-ok/&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="18165" PostHistoryTypeId="1" PostId="8854" RevisionGUID="852ddf88-fa78-44ea-93dc-5198e3bed3f1" CreationDate="2011-02-21T05:12:56.157" UserId="5590" Text="formula for replicating glTexGen in opengl es 2.0 glsl" />
  <row Id="18166" PostHistoryTypeId="3" PostId="8854" RevisionGUID="852ddf88-fa78-44ea-93dc-5198e3bed3f1" CreationDate="2011-02-21T05:12:56.157" UserId="5590" Text="&lt;opengl-es&gt;&lt;glsl&gt;" />
  <row Id="18167" PostHistoryTypeId="25" PostId="8839" RevisionGUID="0a3b3555-7dc5-453b-a525-a5d7f46dcfa1" CreationDate="2011-02-21T05:22:53.400" Comment="http://twitter.com/#!/StackGameDev/status/39555636677181440" />
  <row Id="18168" PostHistoryTypeId="2" PostId="8855" RevisionGUID="9fabfe28-5340-4a2d-bd5d-c4443c179df4" CreationDate="2011-02-21T05:27:18.637" UserId="4513" Text="I've run into the situation where the size of my mesh with all its vertices and indices, is larger than the (optimal) vertex buffer object upper limit (~8MB). I was wondering if I can sub-divide the mesh across multiple vertex buffers, and somehow retain validity of the indices. Ie a triangle with a indice at the first vertex, and an indice at the last (ie in seperate VBOs).&#xD;&#xA;&#xD;&#xA;All the while maintaining this within Vertex Array Objects.&#xD;&#xA;My thoughts are, save myself the hassle, and for meshes (messes :P) such as this, just use the necessary size (&gt; 8MB); which is what I do at the moment.&#xD;&#xA;But ideally my buffer manager (wip) at the moment is using optimal sizes; I may just have to make a special case then...&#xD;&#xA;&#xD;&#xA;Any ideas? If necessary, a simple C++ code example is appreciated." />
  <row Id="18169" PostHistoryTypeId="1" PostId="8855" RevisionGUID="9fabfe28-5340-4a2d-bd5d-c4443c179df4" CreationDate="2011-02-21T05:27:18.637" UserId="4513" Text="Multiple Vertex Buffers per Mesh" />
  <row Id="18170" PostHistoryTypeId="3" PostId="8855" RevisionGUID="9fabfe28-5340-4a2d-bd5d-c4443c179df4" CreationDate="2011-02-21T05:27:18.637" UserId="4513" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="18171" PostHistoryTypeId="2" PostId="8856" RevisionGUID="0290c9b8-a78b-4339-b9a4-700cc3308dc3" CreationDate="2011-02-21T05:46:27.117" UserId="957" Text="I want to make a very simple 2D game, and have been reading a lot of good things about Love, so I want to try it out. However I can't seem to find any good tutorials. The ones on the love page are rather unstructured, and the other one I found by Mathew Casperson is not very useful. Does anyone know of a better tutorial?" />
  <row Id="18172" PostHistoryTypeId="1" PostId="8856" RevisionGUID="0290c9b8-a78b-4339-b9a4-700cc3308dc3" CreationDate="2011-02-21T05:46:27.117" UserId="957" Text="Good Tutorial For Lua and Love" />
  <row Id="18173" PostHistoryTypeId="3" PostId="8856" RevisionGUID="0290c9b8-a78b-4339-b9a4-700cc3308dc3" CreationDate="2011-02-21T05:46:27.117" UserId="957" Text="&lt;lua&gt;" />
  <row Id="18174" PostHistoryTypeId="2" PostId="8857" RevisionGUID="70d029bd-b404-4b6c-b78d-3e6d9a6ff707" CreationDate="2011-02-21T06:52:31.167" UserId="2525" Text="let's say I have a fixed size grid puzzle game (8 x 10). I will be using sprites animation, when the &quot;pieces&quot; in the puzzle is moving from one grid to another grid.&#xD;&#xA;&#xD;&#xA;I was wondering, what is the technique to have this game being implemented as screen resolution independent. Here is what I plan to do.&#xD;&#xA;&#xD;&#xA;1) The data structure coordinate will be represented using `double`, with 1.0 as max value.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Puzzle grid of 8 x 10&#xD;&#xA;    Environment {&#xD;&#xA;        double width = 0.8;&#xD;&#xA;        double height = 1.0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Location of Sprite at coordinate (1, 1)&#xD;&#xA;    Sprite {&#xD;&#xA;        double posX = 0.1;&#xD;&#xA;        double posY = 0.1;&#xD;&#xA;        double width = 0.1;&#xD;&#xA;        double height = 0.1;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // scale = PYSICAL_SCREEN_SIZE&#xD;&#xA;    drawBitmap (	&#xD;&#xA;        sprite_image, &#xD;&#xA;        sprite_image_rect,&#xD;&#xA;        new Rect(sprite.posX * Scale, sprite.posY * Scale, (sprite.posX + sprite.width) * Scale, (sprite.posY + sprite.Height) * Scale),&#xD;&#xA;        paint&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;2) A large size sprite image will be used (128x128). As sprite image shall look fine if we scale from large size down to small size, but not vice versa.&#xD;&#xA;&#xD;&#xA;Besides the above mentioned technique, is there any other consideration I had missed out?&#xD;&#xA;" />
  <row Id="18175" PostHistoryTypeId="1" PostId="8857" RevisionGUID="70d029bd-b404-4b6c-b78d-3e6d9a6ff707" CreationDate="2011-02-21T06:52:31.167" UserId="2525" Text="Technique to have screen independent grid based puzzle with sprite animation" />
  <row Id="18176" PostHistoryTypeId="3" PostId="8857" RevisionGUID="70d029bd-b404-4b6c-b78d-3e6d9a6ff707" CreationDate="2011-02-21T06:52:31.167" UserId="2525" Text="&lt;android&gt;" />
  <row Id="18177" PostHistoryTypeId="5" PostId="8736" RevisionGUID="da7d16a2-6f5b-4c93-b340-064860dc4102" CreationDate="2011-02-21T07:09:18.753" UserId="4264" Comment="added 1230 characters in body" Text="I assume you're after this kind of old-school, 2d effect:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://t0.gstatic.com/images?q=tbn:ANd9GcSzV_npcoksb6qsiPgW2pLjxdIN2-0BgkzGpD9veE0lDQEBWc2b&quot;&gt;&#xD;&#xA;&#xD;&#xA;If so, you're correct. &#xD;&#xA;  &#xD;&#xA;1. Render your &quot;real&quot; frame to an FBO.&#xD;&#xA;2. Render the top part to the framebuffer using a simple textured quad, using the FBO as the texture.&#xD;&#xA;3. Render the bottom part mirrored, with some horizontal waves.&#xD;&#xA;&#xD;&#xA;You have several options on how to achieve the third. The simplest way would be to render one pixel high textured spans, stretch and offset them. Alternatively you could use shaders and do even more interesting effects.&#xD;&#xA;&#xD;&#xA;Other things to try include tinting the mirrored version towards blue a bit, as well as varying the brightness of the scanlines (&quot;wave&quot; them too).&#xD;&#xA;&#xD;&#xA;You can also grow the waves further away from the mirroring point.&#xD;&#xA;&#xD;&#xA;This effect is also completely possible with good old plain opengl 1.x, even without FBOs. Render to texture and use &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml&quot;&gt;glReadPixels&lt;/a&gt; to read the top part back to system memory, upload it as a texture and then do the scanline-by-scanline rendering. This, however, is so slow that if you can use FBOs, it's always a much better option.&#xD;&#xA;&#xD;&#xA;**EDIT: suggestions for the shader bit**&#xD;&#xA;&#xD;&#xA;I recommend doing these step by step, so you'll see what each change does, and adjust them based on what you're after.&#xD;&#xA;&#xD;&#xA;- Render the mirrored bit, top-down.&#xD;&#xA;- Adjust the horizontal texture coordinate (u or v, depending. I'm assuming u here) with sin() function, such as:&#xD;&#xA;&#xD;&#xA;  u+sin((v+t)*FREQ)*AMP&#xD;&#xA;&#xD;&#xA;where FREQ and AMP are constants you'll find by trial and error. Both are below zero. Let's say start with 0.1. 't' is a time constant, probably a float uniform.&#xD;&#xA;&#xD;&#xA;- Scale the waviness so that it's weaker near the mirror line, like:&#xD;&#xA;&#xD;&#xA;  u+(sin((v+t)*FREQ)*AMP) * v&#xD;&#xA;&#xD;&#xA;or possibly (1-v), depending on how the texture is oriented. You may wish to increase AMP after this change.&#xD;&#xA;&#xD;&#xA;- Since the texture coordinates go outside the 0..1 range, you may wish to scale it back, like..&#xD;&#xA;&#xD;&#xA;  u+((sin((v+t)*FREQ)*AMP+AMP)/(1.0 + 2*AMP)) * v&#xD;&#xA;&#xD;&#xA;Depending on the scene you're rendering, the above may look worse than letting it wrap.&#xD;&#xA;&#xD;&#xA;Note though that all the calculations above are off the top of my head without texting, and may contain mistakes, but that's the basic principle anyway. You may also want to try swapping u and v for another kind of wavy effect, or even combine the two." />
  <row Id="18178" PostHistoryTypeId="5" PostId="8855" RevisionGUID="172a47d5-a8d9-41a9-8c80-e22fe2901553" CreationDate="2011-02-21T07:32:06.310" UserId="4513" Comment="added 238 characters in body" Text="I've run into the situation where the size of my mesh with all its vertices and indices, is larger than the (optimal) vertex buffer object upper limit (~8MB). I was wondering if I can sub-divide the mesh across multiple vertex buffers, and somehow retain validity of the indices. Ie a triangle with a indice at the first vertex, and an indice at the last (ie in seperate VBOs).&#xD;&#xA;&#xD;&#xA;All the while maintaining this within Vertex Array Objects.&#xD;&#xA;My thoughts are, save myself the hassle, and for meshes (messes :P) such as this, just use the necessary size (&gt; 8MB); which is what I do at the moment.&#xD;&#xA;But ideally my buffer manager (wip) at the moment is using optimal sizes; I may just have to make a special case then...&#xD;&#xA;&#xD;&#xA;Any ideas? If necessary, a simple C++ code example is appreciated.&#xD;&#xA;&#xD;&#xA;Note: I have also cross-posted this on [stackoverflow][1], as I was not sure as to which it would be more suitable (its partly a design question).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5062625/multiple-vertex-buffers-per-mesh" />
  <row Id="18179" PostHistoryTypeId="2" PostId="8858" RevisionGUID="1c7372d6-ae4a-4497-8755-e8b7b698e080" CreationDate="2011-02-21T08:02:08.247" UserId="20" Text="Personally I wouldn't use *double* to store sprite coordinates. Since you have a fixed grid, why not simply use grid coordinates? *Double* would probably work, but is more complicated and you'll suddenly end up with rounding errors or equality check problems.&#xD;&#xA;&#xD;&#xA;Using grid coordinates, your sprite would be located at: `posX = 1` and `posY = 1`. You can then calculate the actual screen coordinates by multiplying with the grid-cell size. Animation is a special case, but I guess you'll move the sprites from one grid-position to another one, so you can calculate the initial position in pixels (screen space) and the target position (also in screen space) and animate from one position to the other.&#xD;&#xA;&#xD;&#xA;128x128 is probably a bit large for a sprite.. I guess 64x64 is still sufficient. But it really depends on how big you want to scale these sprites. 64x64 will result in a 640x512 grid.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18180" PostHistoryTypeId="25" PostId="8855" RevisionGUID="4be18005-8eb1-4b0e-8a82-d6116341affa" CreationDate="2011-02-21T08:22:53.613" Comment="http://twitter.com/#!/StackGameDev/status/39600935512702976" />
  <row Id="18181" PostHistoryTypeId="2" PostId="8859" RevisionGUID="ecaaf231-428c-4009-a96b-36f6b637cf21" CreationDate="2011-02-21T09:00:25.347" UserId="5250" Text="How many different sprites are we talking about?&#xD;&#xA;Is it possible to draw the sprites with vector graphics? If you search some you can probably find a way to draw svg (scalable vector graphics) with a canvas directly. &#xD;&#xA;&#xD;&#xA;Or, if you are ambitios, you can draw them yourself. Even if it is lots of work, it have its advantages. For instance, it is easy to change various colors of the drawing to account for selected/disabled/locked/etc status." />
  <row Id="18182" PostHistoryTypeId="2" PostId="8860" RevisionGUID="94d5d781-43a1-45f4-8e44-1142661e04e0" CreationDate="2011-02-21T09:51:03.997" UserId="1829" Text="    BillboardChain bbchain;&#xD;&#xA;    bbchain.addChainElement(BillboardChain::Element(Vector3(0,0,0), 10, 0, ColourValue(1, 0, 0)));&#xD;&#xA;&#xD;&#xA;The main reason it was not working for me is because I did not set a high enough width." />
  <row Id="18183" PostHistoryTypeId="2" PostId="8861" RevisionGUID="2b6c166e-8ba0-4be4-a909-2d9d1fd9c227" CreationDate="2011-02-21T10:18:13.937" UserDisplayName="user5593" Text="hm.. this isn't really an answer, but I've recently started looking into lua/love and haven't really found any 'ready-made tutorials' either, but their forums/irc have been a great resource. My recommendation is to just have a go at it :P.&#xD;&#xA;&#xD;&#xA;also- I was actually just looking for people wanting to start developing with love as a team instead of alone. check us out and lemme know if you're interested :D&#xD;&#xA;&#xD;&#xA;http://teslaprime.com/about.html" />
  <row Id="18184" PostHistoryTypeId="2" PostId="8862" RevisionGUID="1929778f-2a66-4baa-9925-fd6e498073da" CreationDate="2011-02-21T10:43:26.867" UserId="5584" Text="I am curious what kind of container would be the best choice for a resource container.&#xD;&#xA;BTree, binary search tree or something else?&#xD;&#xA;What like is the priority of the operations over it?&#xD;&#xA;So best inserting performance or best searching performance or between them?&#xD;&#xA;&#xD;&#xA;Are there any open source implementation over the net?" />
  <row Id="18185" PostHistoryTypeId="1" PostId="8862" RevisionGUID="1929778f-2a66-4baa-9925-fd6e498073da" CreationDate="2011-02-21T10:43:26.867" UserId="5584" Text="Best approach for a resource container" />
  <row Id="18186" PostHistoryTypeId="3" PostId="8862" RevisionGUID="1929778f-2a66-4baa-9925-fd6e498073da" CreationDate="2011-02-21T10:43:26.867" UserId="5584" Text="&lt;resources&gt;" />
  <row Id="18187" PostHistoryTypeId="2" PostId="8863" RevisionGUID="d913c0de-8a44-4cee-85bf-d83f10c233d6" CreationDate="2011-02-21T10:46:19.643" UserId="3599" Text="The free dwarf model in this page http://www.psionic3d.co.uk/?page_id=25 is in MS *.x format, probably a format you can use in XNA." />
  <row Id="18188" PostHistoryTypeId="6" PostId="8862" RevisionGUID="a1ef1278-9626-4f92-bb83-d35e92a7501a" CreationDate="2011-02-21T11:00:07.823" UserId="5584" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="18189" PostHistoryTypeId="2" PostId="8864" RevisionGUID="290c4197-39ab-416a-be82-014dd96612b0" CreationDate="2011-02-21T11:03:06.937" UserId="3599" Text="All can be pirated. Yet though you can stop a big amount of more newbie people using certain sofwtare like [Asprotect][1] or [ExeCryptor][2]. But keeping a glance on if it lowers too much performance, specially at initial load.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://asprotect.net/asprotect.aspx&#xD;&#xA;  [2]: http://www.strongbit.com/execryptor.asp" />
  <row Id="18190" PostHistoryTypeId="25" PostId="8857" RevisionGUID="02b9977d-b0c8-40f5-ab82-502f8e6ce212" CreationDate="2011-02-21T11:22:53.090" Comment="http://twitter.com/#!/StackGameDev/status/39646233232539649" />
  <row Id="18191" PostHistoryTypeId="2" PostId="8865" RevisionGUID="6a14f258-b0fe-4a14-9f7f-81938710956c" CreationDate="2011-02-21T12:22:14.053" UserId="3884" Text="The scalar product is a special case of the more general matrix multiplication. In the case of&#xD;&#xA;&#xD;&#xA;    coord = P1*X + P2*Y + P3*Z + P4*W&#xD;&#xA;&#xD;&#xA;imagine that P1 to P4 are actually vectors the same size as your texture coordinates. You can also think of P1 to P4 as columns of your object-coordinates to texture-coordinates matrix. In your case, where you want 2D coordinates, it'd be a 2x4 matrix. The columns of this matrix are what you would ordinarily submit as the planes when using `glTexGen`.&#xD;&#xA;The first 3 elements in each row are the direction of the respective texture axis. The length of this direction is inversely proportional to the stretch of the texture in that direction (I.e. the longer the direction, the more greater the texture coordinates and the texture will be smaller and repeat more often, if you use `GL_REPEAT`). You need to pick those direction orthogonally to your plane's normal! The last component in each row is used to move the texture around on that plane.&#xD;&#xA;&#xD;&#xA;I'm not entirely sure that this explanation is what you're looking for, but I hope it helps." />
  <row Id="18192" PostHistoryTypeId="2" PostId="8866" RevisionGUID="6c0375bc-f7fa-4187-a40b-abd97ec74d69" CreationDate="2011-02-21T12:52:12.243" UserId="5594" Text="If you want to add some protection (so only the people who are willing to at least hit google a bit can get your game without paying you) make sure to make it fun. &#xD;&#xA;&#xD;&#xA;Add optional community features which require internet or link it to physical goods. &#xD;&#xA;&#xD;&#xA;Remember the nifty monkey island pirate wheel? A pirated copy was actually less fun (no pirate game) or more work (search the copied data) than a bought one.&#xD;&#xA;&#xD;&#xA;An example: If your game should run offline (yes, I think it should), you could add a physical ID card which is needed to unlock the higher levels. On that you encode name and ID of the buyer over and over again to generate diffent data, a fraction of which the buyer has to type in when accessing the higher levels. This would work with an espionage game (the information could be a list of false IDs). Encoding the real information in the cards makes it less likely that people post their cards online. Once someone buys the game, you send him/her the card. " />
  <row Id="18193" PostHistoryTypeId="2" PostId="8867" RevisionGUID="8b2dd5a7-f5aa-4893-9d18-882b88506fed" CreationDate="2011-02-21T13:59:44.347" UserId="2469" Text="I started using Lua and Löve a couple of weeks ago, I didn't find any good resource on getting started, I just used the [wiki][1], it covers the very basics and then you can just use the documentation for the rest. It's not very different from any other 2D graphics API out there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/wiki/Main_Page" />
  <row Id="18194" PostHistoryTypeId="2" PostId="8868" RevisionGUID="0294af2d-db69-4d5d-a516-0603cb8092dd" CreationDate="2011-02-21T14:13:29.820" UserId="5596" Text="I think most billard/snooker games have a lot of problems with their physic engines. They are far away from realistic and you can't really enjoy the game (especially when snooker is your hobby :) )&#xD;&#xA;&#xD;&#xA;So I want to try to make an own physic engine (and own snooker game). I think the physic engine is the most important part of such a game. So my question is:&#xD;&#xA;&#xD;&#xA;Do anybody know an open physic enginge I can start with? Is there any literature about such physic problems? " />
  <row Id="18195" PostHistoryTypeId="1" PostId="8868" RevisionGUID="0294af2d-db69-4d5d-a516-0603cb8092dd" CreationDate="2011-02-21T14:13:29.820" UserId="5596" Text="Physic engine for snooker/billard game" />
  <row Id="18196" PostHistoryTypeId="3" PostId="8868" RevisionGUID="0294af2d-db69-4d5d-a516-0603cb8092dd" CreationDate="2011-02-21T14:13:29.820" UserId="5596" Text="&lt;physics-engine&gt;" />
  <row Id="18197" PostHistoryTypeId="25" PostId="8868" RevisionGUID="fdda4155-02ae-4847-93a7-ff6aee55a269" CreationDate="2011-02-21T14:22:53.880" Comment="http://twitter.com/#!/StackGameDev/status/39691534039252992" />
  <row Id="18198" PostHistoryTypeId="2" PostId="8869" RevisionGUID="2ec08735-6c4a-4e53-8c8d-82dec53f407c" CreationDate="2011-02-21T14:23:10.247" UserId="2792" Text="It is usually called bloom, and is done by adding a blurred version of the image on top of the original. This combined with a high dynamic range can give some nice effects.&#xD;&#xA;&#xD;&#xA;You will probably want to threshold the image before blurring, so that only really bright parts will bloom.&#xD;&#xA;&#xD;&#xA;Outline of algorithm:&#xD;&#xA;&#xD;&#xA; 1. Render scene to texture (preferable HDR)&#xD;&#xA; 1. Threshold to a new texture: out = rgb_to_gray(pixel) &gt; threshold ? pixel : black&#xD;&#xA; 1. Blur thresholded image&#xD;&#xA; 1. Add images together and do some HDR scaling to get in output range (usually RGB8)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18199" PostHistoryTypeId="5" PostId="8869" RevisionGUID="92643e3b-abcc-45ad-a69e-ae8aef8867ff" CreationDate="2011-02-21T14:44:21.170" UserId="2792" Comment="added 67 characters in body" Text="It is usually called bloom, and is done by adding a blurred version of the image on top of the original. This combined with a high dynamic range can give some nice effects.&#xD;&#xA;&#xD;&#xA;You will probably want to threshold the image before blurring, so that only really bright parts will bloom.&#xD;&#xA;&#xD;&#xA;Outline of algorithm:&#xD;&#xA;&#xD;&#xA; 1. Render scene to texture (preferable HDR)&#xD;&#xA; 1. Threshold to a new texture: out = rgb_to_gray(pixel) &gt; threshold ? pixel : black&#xD;&#xA; 1. Blur thresholded image, or generate the whole mip chain to get glow over the whole screen&#xD;&#xA; 1. Add images together and do some HDR scaling to get in output range (usually RGB8)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18200" PostHistoryTypeId="2" PostId="8870" RevisionGUID="d20fb5fa-c61d-49fa-b44c-d92eee68754a" CreationDate="2011-02-21T15:07:27.873" UserId="20" Text="There are several open source physics engines out there. [Box2D][1] is a really popular 2D physics-engine. [Bullet][2] is a popular 3D physics-engine.&#xD;&#xA;&#xD;&#xA;I think these engines are pretty good. My guess is that the lack of realism is mostly due to a poor setup. If you plug in good values into these engines, you'll get a good simulation. Writing such an engine from scratch is going to be a huge task... but here's a [question just about that][3]. Maybe you should also consider extending an existing engine instead of writing a new one? That's the point of open source, isn't it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://box2d.org/&#xD;&#xA;  [2]: http://bulletphysics.org/&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/4585/how-do-i-build-a-2d-physics-engine" />
  <row Id="18201" PostHistoryTypeId="2" PostId="8871" RevisionGUID="9f9c2729-6eca-44a8-a806-b1aaf7935500" CreationDate="2011-02-21T15:08:41.370" UserId="5044" Text="I'm currently looking at how to simulate easily some stellar systems (meaning some central stars and then some planets with maybe satellites), in order to allow later some space based strategy game (hence with space ships moving around). This should all be based around time (so the state of each system differs through time)&#xD;&#xA;&#xD;&#xA;I'm quite struggling with the math behind this topic, like for example:  &#xD;&#xA;- ellipse related math,  &#xD;&#xA;- creating the path from planet A to B having time in mind (respective positions will change over time)...&#xD;&#xA;&#xD;&#xA;Do you know of any resources for that ? I wouldn't mind even buying books about it...&#xD;&#xA;&#xD;&#xA;thanks in advance  &#xD;&#xA;best  &#xD;&#xA;space borg&#xD;&#xA;&#xD;&#xA;side note: how to display all this stuff isn't a matter at this point in time, I'll simple plans for that (basically sticking to 2D and a &quot;high level view&quot; with no space ships/planets details, just markers)" />
  <row Id="18202" PostHistoryTypeId="1" PostId="8871" RevisionGUID="9f9c2729-6eca-44a8-a806-b1aaf7935500" CreationDate="2011-02-21T15:08:41.370" UserId="5044" Text="Building (simple) stellar systems" />
  <row Id="18203" PostHistoryTypeId="3" PostId="8871" RevisionGUID="9f9c2729-6eca-44a8-a806-b1aaf7935500" CreationDate="2011-02-21T15:08:41.370" UserId="5044" Text="&lt;engine&gt;&lt;math&gt;&lt;game-mechanics&gt;" />
  <row Id="18204" PostHistoryTypeId="2" PostId="8872" RevisionGUID="08a623fd-a900-429d-9efc-6cb5b861db93" CreationDate="2011-02-21T15:38:15.003" UserId="5259" Text="So, let's look first at your likely usage pattern.&#xD;&#xA;&#xD;&#xA; * First, you want to be able to insert and remove in constant time. You don't want to be troubled by the number of other resources loaded.&#xD;&#xA; * Second, once a resource has been loaded and queried, you can assume that whoever needs it has access to it (via smart pointer or somesuch); so, you don't have to worry about repeated banging on the manager.&#xD;&#xA; * Third, you probably don't care what the order of the things in memory is.&#xD;&#xA;&#xD;&#xA;This sounds like a perfect place to use a HashMap or something similar, mapping resource names to allocated resources.&#xD;&#xA;&#xD;&#xA;That's the frontend, in-memory part of things. The backend on-disk solution is something else. I'd suggest using a flat pile of files, or something like [PhysicsFS][1] if you want features like a Quake-style .pak (really .zip) archive system.&#xD;&#xA;&#xD;&#xA;Note that for some things, like textures, you want to have a way of handling losing the hardware-specific storage; for example, if a graphics card evicts your memory due to alt-tabbing or something weird you want to be able to reload it transparently. In that case, you probably will need to maintain some extra data instead of just a reference to the resource in memory.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://icculus.org/physfs/" />
  <row Id="18205" PostHistoryTypeId="2" PostId="8873" RevisionGUID="2cfd9b5d-c37e-4724-ad08-f9ed680fa905" CreationDate="2011-02-21T15:42:17.370" UserId="4905" Text="Are there any tutorials , tools for creating background images, other images for an android game or iphone game? " />
  <row Id="18206" PostHistoryTypeId="1" PostId="8873" RevisionGUID="2cfd9b5d-c37e-4724-ad08-f9ed680fa905" CreationDate="2011-02-21T15:42:17.370" UserId="4905" Text="Tools for images in a game" />
  <row Id="18207" PostHistoryTypeId="3" PostId="8873" RevisionGUID="2cfd9b5d-c37e-4724-ad08-f9ed680fa905" CreationDate="2011-02-21T15:42:17.370" UserId="4905" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;android&gt;" />
  <row Id="18208" PostHistoryTypeId="2" PostId="8874" RevisionGUID="d08ef139-2b85-4902-9513-d64483171367" CreationDate="2011-02-21T15:50:57.217" UserId="3884" Text="From what I see, you have three alternatives to uber-shaders: &#xD;&#xA;&#xD;&#xA;1. Hand-code every shader. Obviously, this is easy if you just have a few shaders and similar lighting conditions everywhere (which might actually be the case on embedded devices). However, it quickly becomes unmanageable with even a few inputs (number of lights, shadows, different materials).&#xD;&#xA;&#xD;&#xA;2. Deferred rendering. Effectively splits up the complexity of uber-shaders into several rendering passes. It's very nice design-wise but the memory and bandwidth requirements are high. Variations include &quot;Light pre-pass&quot; rendering, which does just the lighting in separate passed and gives you complete lighting information in your final compositing shader (which makes this very flexible!).&#xD;&#xA;&#xD;&#xA;3. A shader &quot;build-system&quot;. It'll assemble shader-permutations from smaller modular shader-fragments. The whole idea is very similar to uber-shaders, but the more modular design can make it possible to get away with a lot less permutations (since not all options in the uber-shader are orthogonal to each other). It's a pain to build such a system, and there are quite a few pitfalls - but if you get it right, it is quite a powerful tool to have if you don't want something deferred.&#xD;&#xA;&#xD;&#xA;In the end, it depends on the specifics of your project. The bigger the project gets, the more I would steer away from hand-coded shaders or uber-shaders and pick something more modular like light pre-pass or a shader build-system. The trend is definitely going towards deferred rendering systems though." />
  <row Id="18209" PostHistoryTypeId="2" PostId="8875" RevisionGUID="a3bbe353-91a5-4f15-a1cf-8851c86f153f" CreationDate="2011-02-21T16:15:06.460" UserId="4638" Text="&gt; creating the path from planet A to B&#xD;&#xA;&gt; having time in mind (respective&#xD;&#xA;&gt; positions will change over time)&#xD;&#xA;&#xD;&#xA;Lookup linear interpolation. It lets you update a position from point A to B along a straight line using a function of time. &#xD;&#xA;&#xD;&#xA;This [link][1] might help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gpwiki.org/index.php/Linear_Interpolation" />
  <row Id="18210" PostHistoryTypeId="2" PostId="8876" RevisionGUID="4f38f12e-cbb1-4018-85da-266c917d3db8" CreationDate="2011-02-21T16:16:09.293" UserId="1156" Text="If you just want a good graphics program that is free, try out [Paint.NET][1] (Will require Windows or Mono) or [GIMP.][2]&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.paint.net/&#xD;&#xA;  [2]: http://www.gimp.org/" />
  <row Id="18211" PostHistoryTypeId="6" PostId="8862" RevisionGUID="2669d7ea-4587-4237-bbb1-8a3ff096cb9f" CreationDate="2011-02-21T16:37:53.213" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;resources&gt;" />
  <row Id="18212" PostHistoryTypeId="10" PostId="8873" RevisionGUID="211b6020-faf3-45ac-8cd5-138bf216aa2b" CreationDate="2011-02-21T16:44:27.433" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="18213" PostHistoryTypeId="6" PostId="8873" RevisionGUID="b5b1dce5-394d-4810-aac3-a96fe2d7c954" CreationDate="2011-02-21T16:44:56.543" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;&lt;android&gt;" />
  <row Id="18214" PostHistoryTypeId="5" PostId="8853" RevisionGUID="e4fead86-52f2-4dd1-a926-f3534b77b42c" CreationDate="2011-02-21T16:49:17.973" UserId="14" Comment="I tried my best, please help." Text="&#xD;&#xA;I have used the pan gesture for tracking the Pixel-Per-Second (or speed of the movement of the hand) but the real trouble is that the PanGesture library doesn't support any deployment target less than 3.2.&#xD;&#xA;&#xD;&#xA;So how would I track the speed of hand movements below a deployment target of 3.2?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18215" PostHistoryTypeId="4" PostId="8853" RevisionGUID="e4fead86-52f2-4dd1-a926-f3534b77b42c" CreationDate="2011-02-21T16:49:17.973" UserId="14" Comment="I tried my best, please help." Text="Any way to track speed of hand movements below iPhone 3.2?" />
  <row Id="18216" PostHistoryTypeId="6" PostId="8853" RevisionGUID="e4fead86-52f2-4dd1-a926-f3534b77b42c" CreationDate="2011-02-21T16:49:17.973" UserId="14" Comment="I tried my best, please help." Text="&lt;iphone&gt;&lt;cocoa&gt;" />
  <row Id="18217" PostHistoryTypeId="5" PostId="8868" RevisionGUID="15df82d7-0e0e-49f7-8180-562957857d6a" CreationDate="2011-02-21T16:52:11.493" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Is there an algorithm for a pool game?](http://gamedev.stackexchange.com/questions/7862/is-there-an-algorithm-for-a-pool-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I think most billard/snooker games have a lot of problems with their physic engines. They are far away from realistic and you can't really enjoy the game (especially when snooker is your hobby :) )&#xD;&#xA;&#xD;&#xA;So I want to try to make an own physic engine (and own snooker game). I think the physic engine is the most important part of such a game. So my question is:&#xD;&#xA;&#xD;&#xA;Do anybody know an open physic enginge I can start with? Is there any literature about such physic problems? " />
  <row Id="18218" PostHistoryTypeId="10" PostId="8868" RevisionGUID="e1019543-c849-4d93-b394-de218880f9f9" CreationDate="2011-02-21T16:52:11.323" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="18219" PostHistoryTypeId="5" PostId="3795" RevisionGUID="6d8447c6-6bf4-450e-b08e-649260591f1e" CreationDate="2011-02-21T17:16:30.607" UserId="2239" Comment="added 607 characters in body" Text="![Puzzle Pirates logo][1]&#xD;&#xA;&#xD;&#xA;[Puzzle Pirates][2] is written entirely in Java. Gives it some nice crossplatformability, and as it's not a particularly cpu-intensive or ram-intensive game, it runs without noticeable hitches.&#xD;&#xA;&#xD;&#xA;From Wikipedia:&#xD;&#xA;&gt; Yohoho! Puzzle Pirates is a massively&#xD;&#xA;&gt; multiplayer online role-playing game&#xD;&#xA;&gt; developed by Three Rings Design. The&#xD;&#xA;&gt; player takes the role of a pirate,&#xD;&#xA;&gt; adventuring on the high seas and&#xD;&#xA;&gt; pillaging money (&quot;pieces of eight&quot;)&#xD;&#xA;&gt; from roaming enemy ships (human or&#xD;&#xA;&gt; computer-controlled). The mechanics of&#xD;&#xA;&gt; Puzzle Pirates are driven by puzzles.&#xD;&#xA;&gt; For example, to effectively sail a&#xD;&#xA;&gt; ship, players must play puzzle games&#xD;&#xA;&gt; representing work at the sails for&#xD;&#xA;&gt; speed, pumping bilge water to remove&#xD;&#xA;&gt; it from the ship, and carpentry to fix&#xD;&#xA;&gt; any damage the ship may take&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/4hNLP.png&#xD;&#xA;  [2]: http://www.puzzlepirates.com/" />
  <row Id="18220" PostHistoryTypeId="25" PostId="8871" RevisionGUID="3197805b-84ea-42a9-aae9-354af7af97d6" CreationDate="2011-02-21T17:22:53.483" Comment="http://twitter.com/#!/StackGameDev/status/39736831398387712" />
  <row Id="18221" PostHistoryTypeId="2" PostId="8877" RevisionGUID="9bc697c8-3487-40cc-9a23-0ce20a5070d4" CreationDate="2011-02-21T17:57:11.520" UserId="5598" Text="[Magicka][1] is a new one. I played a bit of the demo and it seems pretty good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Magicka" />
  <row Id="18222" PostHistoryTypeId="2" PostId="8878" RevisionGUID="47586549-ef90-4422-8691-f269c6666b45" CreationDate="2011-02-21T18:36:53.797" UserId="5497" Text="I am not a math brain, but my S.F. reading and Google lead me to this page on [orbital mechanics][1]. It starts with explanations I can follow and follows it up with equations I can't. The type of motion I was looking for is called a Hohmann Transfer Orbit, which is one that uses the least fuel.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.braeunig.us/space/orbmech.htm" />
  <row Id="18223" PostHistoryTypeId="5" PostId="3795" RevisionGUID="4b37a171-b467-492e-bd74-c8aad6f3da8b" CreationDate="2011-02-21T18:44:45.037" UserId="14" Comment="added 47 characters in body" Text="![Puzzle Pirates logo][1]&#xD;&#xA;&#xD;&#xA;[Puzzle Pirates][2] is written entirely in Java. Gives it some nice crossplatformability, and as it's not a particularly cpu-intensive or ram-intensive game, it runs without noticeable hitches.&#xD;&#xA;&#xD;&#xA;From [Wikipedia](http://en.wikipedia.org/wiki/Puzzle_Pirates):&#xD;&#xA;&gt; Yohoho! Puzzle Pirates is a massively&#xD;&#xA;&gt; multiplayer online role-playing game&#xD;&#xA;&gt; developed by Three Rings Design. The&#xD;&#xA;&gt; player takes the role of a pirate,&#xD;&#xA;&gt; adventuring on the high seas and&#xD;&#xA;&gt; pillaging money (&quot;pieces of eight&quot;)&#xD;&#xA;&gt; from roaming enemy ships (human or&#xD;&#xA;&gt; computer-controlled). The mechanics of&#xD;&#xA;&gt; Puzzle Pirates are driven by puzzles.&#xD;&#xA;&gt; For example, to effectively sail a&#xD;&#xA;&gt; ship, players must play puzzle games&#xD;&#xA;&gt; representing work at the sails for&#xD;&#xA;&gt; speed, pumping bilge water to remove&#xD;&#xA;&gt; it from the ship, and carpentry to fix&#xD;&#xA;&gt; any damage the ship may take&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/4hNLP.png&#xD;&#xA;  [2]: http://www.puzzlepirates.com/" />
  <row Id="18224" PostHistoryTypeId="2" PostId="8879" RevisionGUID="83718ddf-e3ed-4b38-a67f-527c5540b027" CreationDate="2011-02-21T19:03:12.210" UserId="4662" Text="What you could do is divide the different *inputs* into different buffers- e.g., a buffer for posiiton, a buffer for normal, etc. This is similar to how Direct3D (don't know about OGL) achieves hardware instancing- they have a buffer for static data, and a buffer for per-instance data." />
  <row Id="18225" PostHistoryTypeId="2" PostId="8880" RevisionGUID="d0f8c254-8ce2-40da-9a3f-3cd8177b75ff" CreationDate="2011-02-21T19:29:08.500" UserId="4638" Text="I am learning to use FBOs and one of the things that I need to do when rendering something onto user defined FBO, I have to setup the projection, modelview and viewport for it. Once I am done rendering to the FBO, I need to restore these matrices. I found:&#xD;&#xA;&#xD;&#xA;	glPushAttrib(GL_VIEWPORT_BIT);&#xD;&#xA;	glPopAttrib();&#xD;&#xA;&#xD;&#xA;to restore the viewport to its old state. Is there a way to restore the projection and modelview matrix to whatever it was earlier ?&#xD;&#xA;&#xD;&#xA;Tech: C++/OpenGL&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18226" PostHistoryTypeId="1" PostId="8880" RevisionGUID="d0f8c254-8ce2-40da-9a3f-3cd8177b75ff" CreationDate="2011-02-21T19:29:08.500" UserId="4638" Text="Restoring projection matrix" />
  <row Id="18227" PostHistoryTypeId="3" PostId="8880" RevisionGUID="d0f8c254-8ce2-40da-9a3f-3cd8177b75ff" CreationDate="2011-02-21T19:29:08.500" UserId="4638" Text="&lt;opengl&gt;&lt;matrix&gt;&lt;projection&gt;" />
  <row Id="18228" PostHistoryTypeId="2" PostId="8881" RevisionGUID="1b399bb5-4da4-4718-9db3-409e972e8b28" CreationDate="2011-02-21T19:36:07.153" UserId="3031" Text="I've been working through [this tutorial][1] about drawing triangles with SlimDX, and while it works, I've been trying to structure my program differently than in the tutorial.&#xD;&#xA;&#xD;&#xA;The tutorial just has everything in the main method, I'm trying to separate components into their own classes. But I'm not sure where certain components belong: namely, contexts and shaders.&#xD;&#xA;&#xD;&#xA;The tutorial (as it's just rendering one triangle) has one device, one swapchain, one device context and one set of shaders. intuition says that there is only one device/swapchain for one game, but with contexts I don't know.&#xD;&#xA;&#xD;&#xA;I made a `Triangle` class and put the vertex stuff in there. Should it also create a context? Should it load its own shaders? Or should I pass some global context and shaders to the triangle class when it is constructed? Or pass the shaders and construct a new context?&#xD;&#xA;&#xD;&#xA;I'm just getting started with 3D programming, so in addition to answering this question, if anyone knows of a tutorial or article or something about the larger-scale structure of a game, I'd be interested in seeing that as well.&#xD;&#xA;&#xD;&#xA;  [1]: http://slimdx.org/tutorials/simpletriangle.php" />
  <row Id="18229" PostHistoryTypeId="1" PostId="8881" RevisionGUID="1b399bb5-4da4-4718-9db3-409e972e8b28" CreationDate="2011-02-21T19:36:07.153" UserId="3031" Text="Understanding DeviceContext and Shaders in Direct3D/SlimDX" />
  <row Id="18230" PostHistoryTypeId="3" PostId="8881" RevisionGUID="1b399bb5-4da4-4718-9db3-409e972e8b28" CreationDate="2011-02-21T19:36:07.153" UserId="3031" Text="&lt;c#&gt;&lt;directx11&gt;&lt;slimdx&gt;" />
  <row Id="18231" PostHistoryTypeId="2" PostId="8882" RevisionGUID="16f47201-8fa5-4399-b0a4-cd6c6aabccbc" CreationDate="2011-02-21T19:40:11.597" UserId="4662" Text="Contexts are for threading. If you're not having fun with with multithreading, just use the Immediate context. Shaders are typically, you have one set of shaders for an application, and they can be re-used for different objects. You should not have contexts *or* shaders per object." />
  <row Id="18232" PostHistoryTypeId="2" PostId="8883" RevisionGUID="0b2f42f2-5026-458b-b43d-92613b553a45" CreationDate="2011-02-21T19:51:45.793" UserId="3794" Text="There are depricated functions `glPushMatrix` and `glPopMatrix`. I'm not sure if you have them in your version of opengl.&#xD;&#xA;&#xD;&#xA;You can also very easily use function `glGetFloatv`. Example&#xD;&#xA;&#xD;&#xA;    //save matrix&#xD;&#xA;    glGetFloatv(GL_PROJECTION_MATRIX, &amp;floatArray[0]);&#xD;&#xA;    //set matrix back&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadMatrixf(floatArray);" />
  <row Id="18233" PostHistoryTypeId="2" PostId="8884" RevisionGUID="c109ab74-e890-4426-b363-6b1b68cb877a" CreationDate="2011-02-21T20:10:08.940" UserId="659" Text="You usually need one and only one device context for your application.&#xD;&#xA;&#xD;&#xA;Generally this would live in some sort of 'Renderer' or 'Graphics' class, which would often be a singleton. This would handle initialisation/shutdown, and resetting the device on, for example, window resizing or fullscreen-windowed switches.&#xD;&#xA;&#xD;&#xA;You really don't want a Triangle class with a Render() method and a lot of other stuff - which seems to be the direction you may be heading in? (I made this mistake with my first naive attempts at 3D rendering many years back, this really isn't good for performance!). &#xD;&#xA;&#xD;&#xA;What you want is a 'Mesh' class that can contain an entire 3D object (hundreds/thousands of triangles) in a single vertex buffer, and draw it in as few DrawPrimitive calls as possible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18234" PostHistoryTypeId="25" PostId="8881" RevisionGUID="876f9dc7-f5b9-4ad6-9a99-8cc5a8113d49" CreationDate="2011-02-21T20:22:53.400" Comment="http://twitter.com/#!/StackGameDev/status/39782129869131776" />
  <row Id="18235" PostHistoryTypeId="2" PostId="8885" RevisionGUID="dab45e3b-5fbf-4075-bf30-a073c55a4c48" CreationDate="2011-02-21T20:28:48.510" UserId="4082" Text="Maybe lots of particles with additive blending?" />
  <row Id="18236" PostHistoryTypeId="2" PostId="8886" RevisionGUID="1d631101-4f85-4c21-8319-7f7ccd934bcf" CreationDate="2011-02-21T20:48:08.657" UserId="3794" Text="This is beautiful and i'm sure that the lighting here is not that hard as i could look like. &#xD;&#xA;&#xD;&#xA;What is done here is fluid particle simulation, propably implemented on the gpu for fast simulation. I'm sure that it uses **density for lighting**. For similar implementation of particle system you can look at the directx SDK (June 2010) demo fluid11. &#xD;&#xA;&#xD;&#xA;For lighting you can see that objects doesn't produce real shadows (shadow are always in left bottom direction). So particles and objects are only attenuating light sources or in the oposite they are producing light. For this you need to render density prepass. For attenuating it can be just grayscale, for light emission use colors. Particles are best rendered using additive blending with alpha (maybe 0.2, but it depends on simulation and what you will like) so you can accumulate particle density in one pixel. Object like rectangles will be rendered with alpha 1.0. No blending for them. &#xD;&#xA;&#xD;&#xA;Then blur this render. Different blurs (box blur, gaussian) with different radiuses can produce very different effects. So now you have texture with attenuation or light emission based on the particle density in the pixel neigbourhood. Emession can be used just like background. Attenuation might be used with substract blending or just substracted on the shader.&#xD;&#xA;&#xD;&#xA;Everything can be done in max 3 shader passes (without simulation). &#xD;&#xA;&#xD;&#xA;" />
  <row Id="18237" PostHistoryTypeId="5" PostId="8848" RevisionGUID="d655f906-2792-4a68-aa91-d6a11b5e5688" CreationDate="2011-02-21T21:14:04.710" UserId="2345" Comment="added a screenshot" Text="This is the most beautiful 2d lighting I have ever seen. Does anyone know how he went about doing it?&#xD;&#xA;&#xD;&#xA; - http://www.youtube.com/watch?v=BIQRhOFkvQY&#xD;&#xA; - http://www.youtube.com/watch?v=tnTYXPuecMs&#xD;&#xA; - http://www.youtube.com/watch?v=rhC_jVM8IYU&#xD;&#xA; - http://www.youtube.com/watch?v=_Aw5BdjWqqU&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Or download it here: http://grantkot.com/PollutedPlanet/publish.htm&#xD;&#xA;&#xD;&#xA;![screenshot][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/f9mSm.jpg" />
  <row Id="18238" PostHistoryTypeId="24" PostId="8848" RevisionGUID="3d88cda6-aaed-43be-88f7-098faa3c9575" CreationDate="2011-02-21T21:14:04.710" Comment="Proposed by 2345 approved by 14 edit id of 43" />
  <row Id="18239" PostHistoryTypeId="2" PostId="8887" RevisionGUID="90755ae5-32af-4b03-8c93-9bf2ea9d6f8b" CreationDate="2011-02-21T21:28:18.437" UserId="659" Text="Fluid Dynamics + Additive Blending + Bloom?" />
  <row Id="18240" PostHistoryTypeId="5" PostId="8848" RevisionGUID="16e51ecf-b670-4ad1-9891-45669ac31606" CreationDate="2011-02-21T21:38:46.580" UserId="2998" Comment="added 92 characters in body" Text="This is the most beautiful 2d lighting I have ever seen. Does anyone know how he went about doing it?&#xD;&#xA;&#xD;&#xA; - http://www.youtube.com/watch?v=BIQRhOFkvQY&#xD;&#xA; - http://www.youtube.com/watch?v=tnTYXPuecMs&#xD;&#xA; - http://www.youtube.com/watch?v=rhC_jVM8IYU&#xD;&#xA; - http://www.youtube.com/watch?v=_Aw5BdjWqqU&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Or download it here: http://grantkot.com/PollutedPlanet/publish.htm&#xD;&#xA;&#xD;&#xA;![screenshot][1]&#xD;&#xA;&#xD;&#xA;**edit:** I am not asking how the particles are simulated; I don't care about the physics.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/f9mSm.jpg" />
  <row Id="18241" PostHistoryTypeId="2" PostId="8888" RevisionGUID="97096697-e75f-40d8-8ecb-6b8ebffd073d" CreationDate="2011-02-21T22:35:55.243" UserDisplayName="user5602" Text="I have a school project to build an AI for a 2D racing game in which it will compete with several other AIs (**no collision**).&#xD;&#xA;&#xD;&#xA;We are given a black and white bitmap image of the racing track, we are allowed to choose basic stats for our car (handling, acceleration, max speed and brakes) after we receive the map. The AI connects to the game's server and gives to it several times a second numbers for the current acceleration and steering. The language I chose is C++, by the way. The questions are:&#xD;&#xA;&#xD;&#xA;What is the best strategy or algorithm (since I want to try and&#xD;&#xA;win)? I currently have in mind some ideas found on the net and one or&#xD;&#xA;two of my own, but I would like before I start to code that my&#xD;&#xA;perspective is one of the best.&#xD;&#xA;What good books are there on that matter?&#xD;&#xA;What sites should I refer to?&#xD;&#xA;" />
  <row Id="18242" PostHistoryTypeId="1" PostId="8888" RevisionGUID="97096697-e75f-40d8-8ecb-6b8ebffd073d" CreationDate="2011-02-21T22:35:55.243" UserDisplayName="user5602" Text="Tips for building an AI for a 2D racing game" />
  <row Id="18243" PostHistoryTypeId="3" PostId="8888" RevisionGUID="97096697-e75f-40d8-8ecb-6b8ebffd073d" CreationDate="2011-02-21T22:35:55.243" UserDisplayName="user5602" Text="&lt;2d&gt;&lt;c++&gt;&lt;ai&gt;&lt;racing&gt;" />
  <row Id="18244" PostHistoryTypeId="5" PostId="8886" RevisionGUID="bab3385f-6c1c-4106-bacf-e80eefd25d94" CreationDate="2011-02-21T22:37:15.837" UserId="3794" Comment="blah blah blah" Text="This is beautiful and i'm sure that the lighting here is not that hard as i could look like. &#xD;&#xA;&#xD;&#xA;What is done here is fluid particle simulation, propably implemented on the gpu for fast simulation. I'm sure that it uses **density for lighting**. For similar implementation of particle system you can look at the directx SDK (June 2010) demo fluid11. &#xD;&#xA;&#xD;&#xA;For lighting you can see that objects doesn't produce real shadows (shadow are always in left bottom direction). So particles and objects are only attenuating light sources or in the oposite they are producing light. For this you need to render density prepass. For attenuating it can be just grayscale, for light emission use colors. Particles are best rendered using additive blending with alpha (maybe 0.2, but it depends on simulation and what you will like) so you can accumulate particle density in one pixel. Object like rectangles will be rendered with alpha 1.0. No blending for them. &#xD;&#xA;&#xD;&#xA;Then blur this render. Different blurs (box blur, gaussian) with different radiuses can produce very different effects. So now you have texture with attenuation or light emission based on the particle density in the pixel neigbourhood. Emession can be used just like background. Attenuation might be used with substract blending or just substracted on the shader.&#xD;&#xA;&#xD;&#xA;Everything can be done in max 3 shader passes (without simulation). &#xD;&#xA;&#xD;&#xA;**edit:** &#xD;&#xA;I was asked to add links and references. I just wanted to write: *Trust me i'm working on fluid renderers for movie production*. But it wouldn't be enough propably. So. If talking about Fluid rendering we have to consider &quot;radiative transfer equation&quot;. It counts with light absorbtion, emission and scattering in the volume. For realtime graphics we can use &quot;only emission&quot; or/and &quot;only absorbtion&quot; models, which can be simplified into two quite simple integrals. Most used is &quot;single scatter&quot; model which offers great compromise between performance and visual quality. What is important for this case. No light scattering in 2D. So absorbtion and emission. Question is where to gain them. Logical and surprisingly correct answer is that density = absorbtion and density = emission. In most natural cases emission is connected with temperature, but density is not bad solution. After all we are doing aproximation and effect not correct natural simulation. &#xD;&#xA;&#xD;&#xA;At the end. I didn't said anything that new. Sorry i made you read stuff this long. I just used correct terms &quot;absorbtion&quot; and &quot;emission&quot; and just said what somebody before or after me: Aditive blending particle render, blur, use. For emission, render colors and blur. For attenuation-absorbtion use grayscale render and blur.&#xD;&#xA;&#xD;&#xA;To be correct real phase function for light attenuation and production should be used. But there is not real reason why.&#xD;&#xA;&#xD;&#xA;Links:&#xD;&#xA;&#xD;&#xA;  - [real-time volume graphics][1] - the best book in the world about fluid rendering for programmers.  &#xD;&#xA;  - [radiative transfer on wiki][2]&#xD;&#xA;  - [navier-strokes on wiki][3] - basics of grid based fluid simulations (it uses grid for simulation not particles)&#xD;&#xA;  - [gpu accelerated navier strokes][4]&#xD;&#xA;  - I'll add fast 2D particle solutions on gpu later. I dont have resources here where i am now.&#xD;&#xA;  - [cuda for smoke particles using half-axis rendering][5] - Cuda samples, paper and source codes.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=lDWOu3_KGvoC&amp;printsec=frontcover&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=reZiTc_sK8iJ5Abu1OyBCg&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCoQ6AEwAA#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Radiative_transfer&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations&#xD;&#xA;  [4]: http://scholarworks.boisestate.edu/cgi/viewcontent.cgi?article=1003&amp;context=mecheng_facpubs&#xD;&#xA;  [5]: http://developer.download.nvidia.com/compute/cuda/sdk/website/samples.html#smokeParticles" />
  <row Id="18245" PostHistoryTypeId="5" PostId="8825" RevisionGUID="96798185-58b7-45ee-838a-4355207995ca" CreationDate="2011-02-21T22:52:29.550" UserId="5050" Comment="Added solution" Text="I have a hand-rolled camera class that converts yaw, pitch, and roll angles into a forward, side, and up vector suitable for calling gluLookAt. Using this camera class I can modify the model-view matrix to move about the 3D world just fine.&#xD;&#xA;&#xD;&#xA;However, I am having trouble when using this camera class (and associated model-view matrix) when trying to perform directional lighting in my vertex shader.&#xD;&#xA;&#xD;&#xA;The problem is that the light direction, (0, 1, 0) for example, is relative to where the 'camera is looking' and not the actual world coordinates. (Or is this eye coordinates vs. model coordinates?) I would like the light direction to be unaffected by the camera's viewing direction.&#xD;&#xA;&#xD;&#xA;For example, when the camera is looking down the Z axis the ground is lit correctly. However, if I point the camera straight at the ground, then it goes dark. This is (I think) because the light direction is parallel with the camera's 'up' vector which is perpendicular with the ground's normal vector.&#xD;&#xA;&#xD;&#xA;I tried computing the normal matrix without taking the camera's model view into account, but then none of my objects were rotated correctly.&#xD;&#xA;&#xD;&#xA;Sorry if this sounds vague. I suspect there is a straight forward answer, but I'm not 100% clear on how the normal matrix should be used for transforming vertex normals in my vertex shader.&#xD;&#xA;&#xD;&#xA;For reference, here is pseudo code for my rendering loop:&#xD;&#xA;&#xD;&#xA;    pMatrix = new Matrix();&#xD;&#xA;    pMatrix = makePerspective(...)&#xD;&#xA;&#xD;&#xA;    mvMatrix = new Matrix()&#xD;&#xA;    camera.apply(mvMatrix);  // Calls gluLookAt&#xD;&#xA;&#xD;&#xA;    // Move the object into position.&#xD;&#xA;    mvMatrix.translatev(position);&#xD;&#xA;    mvMatrix.rotatef(rotation.x, 1, 0, 0);&#xD;&#xA;    mvMatrix.rotatef(rotation.y, 0, 1, 0);&#xD;&#xA;    mvMatrix.rotatef(rotation.z, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;    var nMatrix = new Matrix();&#xD;&#xA;    nMatrix.set(mvMatrix.get().getInverse().getTranspose());&#xD;&#xA;&#xD;&#xA;    // Set vertex shader uniforms.&#xD;&#xA;    gl.uniformMatrix4fv(shaderProgram.pMatrixUniform,&#xD;&#xA;			false, new Float32Array(pMatrix.getFlattened()));&#xD;&#xA;    gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform,&#xD;&#xA;			false, new Float32Array(mvMatrix.getFlattened()));&#xD;&#xA;    gl.uniformMatrix4fv(shaderProgram.nMatrixUniform,&#xD;&#xA;			false, new Float32Array(nMatrix.getFlattened()));&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    gl.drawElements(gl.TRIANGLES, this.vertexIndexBuffer.numItems,&#xD;&#xA;		    gl.UNSIGNED_SHORT, 0);&#xD;&#xA;&#xD;&#xA;And the corresponding vertex shader:&#xD;&#xA;&#xD;&#xA;    // Attributes&#xD;&#xA;    attribute vec3 aVertexPosition;&#xD;&#xA;    attribute vec4 aVertexColor;&#xD;&#xA;    attribute vec3 aVertexNormal;&#xD;&#xA;       &#xD;&#xA;    // Uniforms&#xD;&#xA;    uniform mat4 uMVMatrix;&#xD;&#xA;    uniform mat4 uNMatrix;&#xD;&#xA;    uniform mat4 uPMatrix;&#xD;&#xA;    &#xD;&#xA;    // Varyings&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;    &#xD;&#xA;    // Constants&#xD;&#xA;    const vec3 LIGHT_DIRECTION = vec3(0, 1, 0);  // Opposite direction of photons.&#xD;&#xA;    const vec4 AMBIENT_COLOR   = vec4 (0.2,   0.2,   0.2, 1.0);&#xD;&#xA;    &#xD;&#xA;    float ComputeLighting() {&#xD;&#xA;        vec4 transformedNormal = vec4(aVertexNormal.xyz, 1.0);&#xD;&#xA;        transformedNormal = uNMatrix * transformedNormal;&#xD;&#xA;        float base = dot(normalize(transformedNormal.xyz),&#xD;&#xA;                         normalize(LIGHT_DIRECTION));&#xD;&#xA;        return max(base, 0.0);&#xD;&#xA;    }&#xD;&#xA;       &#xD;&#xA;    void main(void) {&#xD;&#xA;        gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);&#xD;&#xA;    &#xD;&#xA;        float lightWeight = ComputeLighting();&#xD;&#xA;        vColor = vec4(aVertexColor.xyz * lightWeight, 1.0) + AMBIENT_COLOR;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that I am using WebGL, so if the anser is use `glFixThisProblem(...)` any pointers on how to re-implement that on WebGL if missing would be appreciated.&#xD;&#xA;&#xD;&#xA;##Update - Solution##&#xD;&#xA;&#xD;&#xA;With the help of folks below, I managed to get this working. There were a few things wrong about the above code:&#xD;&#xA;&#xD;&#xA; 1. The vertex shader normal should be `vec4(aVertexNormal.xyz, 0.0)` to negate the impact of rotation. This wasn't a problem in this example, but is good to keep in mind when getting to positional lighting.&#xD;&#xA; 2. The order of rotation/translation was wrong for the object. **Rotation always happens about the origin.** So if you want to rotate an object in place, you need to translate/rotate/translate-other-way and then translate it into its final position.&#xD;&#xA; 3. Once the proper model-view matrix has been constructed, clone it to act as the normal matrix. (Inverting and transposing as required.) Then multiply by the gluLookAt matrix. However, because you have already translated/rotated the object you need to multiply model-view matrix by the camera matrix with the camera on the left and the model-view matrix on the right.&#xD;&#xA;&#xD;&#xA;If the above explanations don't help, here is the corrected code:&#xD;&#xA;&#xD;&#xA;    // Rotate the object about its position.&#xD;&#xA;    mvMatrix.translatef(this.position.x, this.position.y, this.position.z);&#xD;&#xA;    mvMatrix.rotatef(this.rotation.x, 1, 0, 0);&#xD;&#xA;    mvMatrix.rotatef(this.rotation.y, 0, 1, 0);&#xD;&#xA;    mvMatrix.rotatef(this.rotation.z, 0, 0, 1);&#xD;&#xA;    mvMatrix.translatef(-this.position.x, -this.position.y, -this.position.z);&#xD;&#xA;    &#xD;&#xA;    // Now move it into place.&#xD;&#xA;    mvMatrix.translatev(this.position);&#xD;&#xA;    &#xD;&#xA;    // Create a normal matrix based off the current model-view.&#xD;&#xA;    // For information on deriving the .getInverse().getTranspose() see:&#xD;&#xA;    // http://www.lighthouse3d.com/opengl/glsl/index.php?normalmatrix&#xD;&#xA;    var nMatrix = new Matrix();&#xD;&#xA;    nMatrix.set(mvMatrix.get().getInverse().getTranspose());&#xD;&#xA;    &#xD;&#xA;    var cameraMatrix = camera.getCameraMatrix();&#xD;&#xA;    mvMatrix.multiplyRight(cameraMatrix);&#xD;&#xA;" />
  <row Id="18246" PostHistoryTypeId="25" PostId="8888" RevisionGUID="2d5a6491-c50d-4a6c-a6f0-51eb56ed1e80" CreationDate="2011-02-21T23:22:54.717" Comment="http://twitter.com/#!/StackGameDev/status/39827432966066176" />
  <row Id="18247" PostHistoryTypeId="2" PostId="8889" RevisionGUID="35883ad7-def4-4181-ba73-e5fcc816b69c" CreationDate="2011-02-21T23:46:14.360" UserId="4513" Text="Set up a basic AI, then set up an API to handle your own car.&#xD;&#xA;If you can beat it, you should set up a recording algorithm that can then positively reinforce your AI. This could be a neural network to tweak your AI's actions. Such as gradual braking into a corner etc.&#xD;&#xA;&#xD;&#xA;Are you allowed to use external libraries in your project? If so, I suggest you look at [FANN][1]. It is a fast neural network library; to save you writing your own. If you need the source code, you could always write it yourself, it can take some time however.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://leenissen.dk/fann/wp/" />
  <row Id="18248" PostHistoryTypeId="2" PostId="8890" RevisionGUID="f41d20f7-ab7a-45e7-b916-cd36cf57f469" CreationDate="2011-02-22T00:12:35.207" UserId="2332" Text="If you can preprocess the map before running the AI, then just calculate the best racing lines through segments of the map.&#xD;&#xA;&#xD;&#xA;[This post][1] on GameDev.net has a number of suggestions.&#xD;&#xA;&#xD;&#xA;The [AI Wisdom][2] books have A LOT of articles about racing AI. I'd definitely recommend them, especially the first one which has articles describing how you can represent the map as a data structure within your AI.&#xD;&#xA;&#xD;&#xA;Another method I've seen is simple reinforcement learning (Q-learning), which will probably take a good few thousand iterations to get the optimal path. It's described in this paper: http://www.cs.ubc.ca/~zhijin/540report.pdf&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/535668-racing-game-ai-crash-course---excuse-the-bad-joke/&#xD;&#xA;  [2]: http://www.amazon.co.uk/s/ref=nb_sb_ss_c_1_26?url=search-alias%3Dstripbooks&amp;field-keywords=ai+game+programming+wisdom&amp;x=0&amp;y=0&amp;sprefix=ai+game+programming+wisdom" />
  <row Id="18249" PostHistoryTypeId="2" PostId="8891" RevisionGUID="e7cb6a9b-f5e0-4434-a8e3-0b9aa99f8423" CreationDate="2011-02-22T00:31:57.160" UserId="5604" Text="I am trying to make a class which controls a camera. It's pretty basic right now, it looks like this:&#xD;&#xA;&#xD;&#xA;    class HoveringCameraController&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       &#xD;&#xA;       void init(Ogre::Camera &amp; camera, AnimatedBody &amp; target, Ogre::Real height);&#xD;&#xA;       void update(Ogre::Real time_delta);&#xD;&#xA;    private:&#xD;&#xA;       Ogre::Camera * camera_;&#xD;&#xA;       AnimatedBody * target_;&#xD;&#xA;       Ogre::Real height_;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;HoveringCameraController.cpp&#xD;&#xA;&#xD;&#xA;    void HoveringCameraController::init(Ogre::Camera &amp; camera, AnimatedBody &amp; target, Ogre::Real height)&#xD;&#xA;    {&#xD;&#xA;       camera_ = &amp;camera;&#xD;&#xA;       target_ = &amp;target;&#xD;&#xA;       height_ = height;&#xD;&#xA;&#xD;&#xA;       update(0.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void HoveringCameraController::update(Ogre::Real time_delta)&#xD;&#xA;    {&#xD;&#xA;       auto position = target_-&gt;getPosition();&#xD;&#xA;       position.y += height_;&#xD;&#xA;       camera_-&gt;setPosition(position);&#xD;&#xA;       camera_-&gt;lookAt(target_-&gt;getPosition());&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;AnimatedBody is just a class that encapsulates an entity, it's animations and a scene node. The getPosition function is simply forwarded to it's scene node.&#xD;&#xA;&#xD;&#xA;What I want(for now) is for the camera to simply follow the AnimatedBody overhead at the distance given(the height parameter), and look down at it. It follows the object around, but it doesn't look straight down, it's tilted slightly in the positive Z direction. Does anybody have any idea why it would do that?&#xD;&#xA;&#xD;&#xA;If I change this line:&#xD;&#xA;&#xD;&#xA;    position.y += height_;&#xD;&#xA;&#xD;&#xA;to this:&#xD;&#xA;&#xD;&#xA;    position.x += height_;&#xD;&#xA;&#xD;&#xA;or this:&#xD;&#xA;&#xD;&#xA;    position.z += height_;&#xD;&#xA;&#xD;&#xA;it does exactly what I would expect. It follows the object from the side or front, and looks directly at it." />
  <row Id="18250" PostHistoryTypeId="1" PostId="8891" RevisionGUID="e7cb6a9b-f5e0-4434-a8e3-0b9aa99f8423" CreationDate="2011-02-22T00:31:57.160" UserId="5604" Text="Problem with Ogre::Camera lookAt function when target is directly below." />
  <row Id="18251" PostHistoryTypeId="3" PostId="8891" RevisionGUID="e7cb6a9b-f5e0-4434-a8e3-0b9aa99f8423" CreationDate="2011-02-22T00:31:57.160" UserId="5604" Text="&lt;c++&gt;&lt;ogre&gt;" />
  <row Id="18252" PostHistoryTypeId="2" PostId="8892" RevisionGUID="6488f0af-6b12-4a31-a3a5-9cac80e69125" CreationDate="2011-02-22T01:00:21.360" UserId="2708" Text="In my Game, a Scene is composed by several layers. Each layer has different camera transformations.&#xD;&#xA;&#xD;&#xA;This way I can have a layer at z=3 (GUI), z=2 (Monsters), z=1 (scrolling background), and this 3 layers compose my whole Scene.&#xD;&#xA;&#xD;&#xA;My render loop looks something like:&#xD;&#xA;&#xD;&#xA;    renderLayer()&#xD;&#xA;       &#xD;&#xA;       applyTransformations()&#xD;&#xA;       &#xD;&#xA;       renderVisibleEntities()&#xD;&#xA;       &#xD;&#xA;       renderChildLayers()&#xD;&#xA;       &#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;If I call `DrawDebugData()` in the render loop, the whole b2world debug data will be rendered once for each layer in my scene, this generates a mess, because the &quot;debug boxes&quot; get duplicated, some of them get the camera transformations applied and some of them don't, etc.&#xD;&#xA;&#xD;&#xA;What I would like to do, would be to make DrawDebugData to draw only certain debug boxes. In that way, I could call something like&#xD;&#xA;&#xD;&#xA;    b2world-&gt;DrawDebugDataForLayer(int layer_id)&#xD;&#xA;&#xD;&#xA;and call that on each layer like :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    renderLayer()&#xD;&#xA;       &#xD;&#xA;       applyTransformations()&#xD;&#xA;       &#xD;&#xA;       renderVisibleEntities()&#xD;&#xA;       &#xD;&#xA;       //Only render my corresponding layer debug data&#xD;&#xA;       b2world-&gt;DrawDebugDataForLayer(layer_id)&#xD;&#xA;       &#xD;&#xA;       renderChildLayers()&#xD;&#xA;       &#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;Is there a way to subclass `b2World` so I could add this functionality ( specific to my game ) ? &#xD;&#xA;&#xD;&#xA;If not, what would be the best way to achieve this (Cocos2d uses a similar scene graph approach and box2d, but I'm not sure if debugDraw works in Cocos2d... )&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18253" PostHistoryTypeId="1" PostId="8892" RevisionGUID="6488f0af-6b12-4a31-a3a5-9cac80e69125" CreationDate="2011-02-22T01:00:21.360" UserId="2708" Text="Using box2d DrawDebugData with multi layer scene ?" />
  <row Id="18254" PostHistoryTypeId="3" PostId="8892" RevisionGUID="6488f0af-6b12-4a31-a3a5-9cac80e69125" CreationDate="2011-02-22T01:00:21.360" UserId="2708" Text="&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="18255" PostHistoryTypeId="5" PostId="8891" RevisionGUID="85e34517-44cf-46fd-acc2-59d5202b68a1" CreationDate="2011-02-22T01:04:52.580" UserId="5604" Comment="added 3 characters in body" Text="I am trying to make a class which controls a camera. It's pretty basic right now, it looks like this:&#xD;&#xA;&#xD;&#xA;    class HoveringCameraController&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       &#xD;&#xA;       void init(Ogre::Camera &amp; camera, AnimatedBody &amp; target, Ogre::Real height);&#xD;&#xA;       void update(Ogre::Real time_delta);&#xD;&#xA;    private:&#xD;&#xA;       Ogre::Camera * camera_;&#xD;&#xA;       AnimatedBody * target_;&#xD;&#xA;       Ogre::Real height_;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;HoveringCameraController.cpp&#xD;&#xA;&#xD;&#xA;    void HoveringCameraController::init(Ogre::Camera &amp; camera, AnimatedBody &amp; target, Ogre::Real height)&#xD;&#xA;    {&#xD;&#xA;       camera_ = &amp;camera;&#xD;&#xA;       target_ = &amp;target;&#xD;&#xA;       height_ = height;&#xD;&#xA;&#xD;&#xA;       update(0.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void HoveringCameraController::update(Ogre::Real time_delta)&#xD;&#xA;    {&#xD;&#xA;       auto position = target_-&gt;getPosition();&#xD;&#xA;       position.y += height_;&#xD;&#xA;       camera_-&gt;setPosition(position);&#xD;&#xA;       camera_-&gt;lookAt(target_-&gt;getPosition());&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;AnimatedBody is just a class that encapsulates an entity, it's animations and a scene node. The getPosition function is simply forwarded to it's scene node.&#xD;&#xA;&#xD;&#xA;What I want(for now) is for the camera to simply follow the AnimatedBody overhead at the distance given(the height parameter), and look down at it. It follows the object around, but it doesn't look straight down, it's tilted quite a bit in the positive Z direction. Does anybody have any idea why it would do that?&#xD;&#xA;&#xD;&#xA;If I change this line:&#xD;&#xA;&#xD;&#xA;    position.y += height_;&#xD;&#xA;&#xD;&#xA;to this:&#xD;&#xA;&#xD;&#xA;    position.x += height_;&#xD;&#xA;&#xD;&#xA;or this:&#xD;&#xA;&#xD;&#xA;    position.z += height_;&#xD;&#xA;&#xD;&#xA;it does exactly what I would expect. It follows the object from the side or front, and looks directly at it." />
  <row Id="18256" PostHistoryTypeId="25" PostId="8891" RevisionGUID="582ff59f-345a-49c7-984e-9d9935379c82" CreationDate="2011-02-22T02:22:54.650" Comment="http://twitter.com/#!/StackGameDev/status/39872731734347776" />
  <row Id="18257" PostHistoryTypeId="6" PostId="8856" RevisionGUID="b17cb339-0b3f-47c5-a526-ebea52570ac4" CreationDate="2011-02-22T02:24:52.243" UserId="370" Comment="edited tags" Text="&lt;lua&gt;&lt;love2d&gt;" />
  <row Id="18258" PostHistoryTypeId="6" PostId="5808" RevisionGUID="153a6f17-e0ac-462a-a9ab-0dd8c982eae1" CreationDate="2011-02-22T02:27:35.940" UserId="370" Comment="edited tags" Text="&lt;3d&gt;&lt;lua&gt;&lt;love2d&gt;" />
  <row Id="18259" PostHistoryTypeId="2" PostId="8893" RevisionGUID="14286223-3f1a-4657-9c86-83398e98beaa" CreationDate="2011-02-22T03:01:14.710" UserId="721" Text="**OGRE_NEW** is just an overload of the operator **new**. Try to replace **OGRE_NEW** by the normal operator **new**. If it compiles, there is a problem in the declaration of OGRE_NEW. Otherwise, just find the problem and uses again the OGRE_NEW operator.&#xD;&#xA;&#xD;&#xA;Ps: if you use OGRE_NEW, you need to use OGRE_DELETE to remove your allocated object." />
  <row Id="18260" PostHistoryTypeId="2" PostId="8894" RevisionGUID="ea9b37a0-b26d-4ae4-b760-d0edbbe663c6" CreationDate="2011-02-22T03:05:39.947" UserId="189" Text="I believe you are feeling the effects of [Gimbal lock][1]. 3D camera implementations typically do not allow for looking directly up or down because of this (because then the forward and up vectors would be parallel). I know from experience that OpenGL can do strange things, and my simple implementation of a camera doesn't allow for less than a 0.1-degree angle up or down.&#xD;&#xA;&#xD;&#xA;If you can modify the camera's &quot;up&quot; vector to be something other than (0,0,1), then you should do so when you want to set its forward vector to (0,0,1) (i.e. when you want to look up). The forward and up vectors cannot be the same, though.&#xD;&#xA;&#xD;&#xA;Other alternatives include making sure the 'up' vector is orthogonal to the 'forward' vector at all times, or using quaternions. I don't know how these options apply to the Ogre3D engine, sorry.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gimbal_lock" />
  <row Id="18265" PostHistoryTypeId="25" PostId="8892" RevisionGUID="1a4eba0e-0131-4d16-8e4c-32f9ccccc17c" CreationDate="2011-02-22T05:22:54.177" Comment="http://twitter.com/#!/StackGameDev/status/39918028472721408" />
  <row Id="18266" PostHistoryTypeId="5" PostId="8856" RevisionGUID="c4375992-7680-4026-84be-e96435388b7a" CreationDate="2011-02-22T05:40:49.293" UserId="189" Comment="linked to homepage for those who wonder what LÖVE is" Text="I want to make a very simple 2D game, and have been reading a lot of good things about [LÖVE][1], so I want to try it out. However I can't seem to find any good tutorials. The ones on the LÖVE page are rather unstructured, and the other one I found by Mathew Casperson is not very useful. Does anyone know of a better tutorial?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/" />
  <row Id="18267" PostHistoryTypeId="4" PostId="8856" RevisionGUID="c4375992-7680-4026-84be-e96435388b7a" CreationDate="2011-02-22T05:40:49.293" UserId="189" Comment="linked to homepage for those who wonder what LÖVE is" Text="Good Tutorial For Lua and LÖVE" />
  <row Id="18268" PostHistoryTypeId="2" PostId="8896" RevisionGUID="4e51f9b2-ae35-4a17-a82c-cfc18b0e3dce" CreationDate="2011-02-22T05:57:35.817" UserId="831" Text="So I've switched from `NSTimer` to `CADisplayLink` and I'm still seeing unexpected variation in my frame counter - it fluctuates between 59-60fps, even when I'm not rendering much.&#xD;&#xA;&#xD;&#xA;Has anyone else seen this? Is this an expected variation in iOS? Or should I look more closely at my game loop?&#xD;&#xA;" />
  <row Id="18269" PostHistoryTypeId="1" PostId="8896" RevisionGUID="4e51f9b2-ae35-4a17-a82c-cfc18b0e3dce" CreationDate="2011-02-22T05:57:35.817" UserId="831" Text="iPhone 3GS - can't ever seem to hold 60fps with CADisplayLink" />
  <row Id="18270" PostHistoryTypeId="3" PostId="8896" RevisionGUID="4e51f9b2-ae35-4a17-a82c-cfc18b0e3dce" CreationDate="2011-02-22T05:57:35.817" UserId="831" Text="&lt;iphone&gt;&lt;gameloop&gt;" />
  <row Id="18271" PostHistoryTypeId="2" PostId="8897" RevisionGUID="f5344751-928d-4ee6-9e08-f1fd76b41b3f" CreationDate="2011-02-22T08:06:36.857" UserId="1829" Text="I still play counter strike 1.6/CSS these days, and since I play, when the frame rate drops, the crosshair animation is also affected by the frame rate.&#xD;&#xA;&#xD;&#xA;Can it be considered like a programming/design flaw or is it like so for anti-cheat reasons ?" />
  <row Id="18272" PostHistoryTypeId="1" PostId="8897" RevisionGUID="f5344751-928d-4ee6-9e08-f1fd76b41b3f" CreationDate="2011-02-22T08:06:36.857" UserId="1829" Text="Can it be considered that a frame-dependent crosshair is a flaw ?" />
  <row Id="18273" PostHistoryTypeId="3" PostId="8897" RevisionGUID="f5344751-928d-4ee6-9e08-f1fd76b41b3f" CreationDate="2011-02-22T08:06:36.857" UserId="1829" Text="&lt;game-design&gt;&lt;anti-cheat&gt;&lt;frame-rate&gt;" />
  <row Id="18274" PostHistoryTypeId="2" PostId="8898" RevisionGUID="63b88182-07cc-4433-a715-c2812fe5f953" CreationDate="2011-02-22T08:09:57.797" UserId="20" Text="From my experience this is normal behavior. The measured time can change slightly and if 59.99 FPS are calculated and you output that with just 2 digits, it's going to show 59.&#xD;&#xA;&#xD;&#xA;Don't worry about fluctuations of one frame.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18275" PostHistoryTypeId="25" PostId="8897" RevisionGUID="c7fa6710-0ce6-4760-a2ff-2ad28dde4902" CreationDate="2011-02-22T08:22:54.753" Comment="http://twitter.com/#!/StackGameDev/status/39963328734437376" />
  <row Id="18276" PostHistoryTypeId="25" PostId="8896" RevisionGUID="7c11a756-7ca0-4025-b470-1d6b96016ec1" CreationDate="2011-02-22T11:22:54.703" Comment="http://twitter.com/#!/StackGameDev/status/40008627414777856" />
  <row Id="18277" PostHistoryTypeId="2" PostId="8899" RevisionGUID="d8970798-01ed-4c47-8cf0-30b3d419a3f8" CreationDate="2011-02-22T11:25:41.650" UserId="5610" Text="Off course it depends on the situation. But when a lower lever object or system communicate with an higher level system, should callbacks or events be preferred to keeping a pointer to higher level object?&#xD;&#xA;&#xD;&#xA;For example, we have a `world class` that has a member variable `vector&lt;monster&gt; monsters`. When the monster class is going to communicate with the world class, should I prefer using a callback function then or should I have a pointer to the `world class` inside the `monster class`?" />
  <row Id="18278" PostHistoryTypeId="1" PostId="8899" RevisionGUID="d8970798-01ed-4c47-8cf0-30b3d419a3f8" CreationDate="2011-02-22T11:25:41.650" UserId="5610" Text="Low coupling and hight cohesion" />
  <row Id="18279" PostHistoryTypeId="3" PostId="8899" RevisionGUID="d8970798-01ed-4c47-8cf0-30b3d419a3f8" CreationDate="2011-02-22T11:25:41.650" UserId="5610" Text="&lt;game-design&gt;&lt;design&gt;" />
  <row Id="18280" PostHistoryTypeId="5" PostId="8899" RevisionGUID="9faf9feb-150c-4e47-8039-2928ff4bdbc3" CreationDate="2011-02-22T11:50:42.810" UserId="5610" Comment="deleted 1 characters in body" Text="Of course it depends on the situation. But when a lower lever object or system communicate with an higher level system, should callbacks or events be preferred to keeping a pointer to higher level object?&#xD;&#xA;&#xD;&#xA;For example, we have a `world class` that has a member variable `vector&lt;monster&gt; monsters`. When the monster class is going to communicate with the world class, should I prefer using a callback function then or should I have a pointer to the `world class` inside the `monster class`?" />
  <row Id="18281" PostHistoryTypeId="4" PostId="8899" RevisionGUID="e0df3f7c-cd0e-4a75-83af-f40e803b52b4" CreationDate="2011-02-22T13:42:58.220" UserId="189" Comment="corrected spelling in title, retagged (it is definitely not game design)" Text="Low coupling and tight cohesion" />
  <row Id="18282" PostHistoryTypeId="6" PostId="8899" RevisionGUID="e0df3f7c-cd0e-4a75-83af-f40e803b52b4" CreationDate="2011-02-22T13:42:58.220" UserId="189" Comment="corrected spelling in title, retagged (it is definitely not game design)" Text="&lt;architecture&gt;&lt;programming&gt;&lt;best-practices&gt;" />
  <row Id="18283" PostHistoryTypeId="25" PostId="8856" RevisionGUID="d39442f4-6022-48bf-8b6d-a63116b78f1e" CreationDate="2011-02-22T14:22:54.947" Comment="http://twitter.com/#!/StackGameDev/status/40053927311319040" />
  <row Id="18284" PostHistoryTypeId="2" PostId="8900" RevisionGUID="3c0d87e1-0e92-4efa-82bd-0a7e40b7f0c0" CreationDate="2011-02-22T14:41:06.643" UserId="5091" Text="Im trying to make a preloader in a Flash game.&#xD;&#xA;&#xD;&#xA;Thing is, I need some advices on this since I never made one, I have the game almost complete, but when, i.e, I upload the game to a website I get a white screen for a few seconds, and then I see the game.&#xD;&#xA;&#xD;&#xA;Is there a simple way, maybe using an a API or something like that, to make a preloader screen?&#xD;&#xA;&#xD;&#xA;Im using Flash Builder fyi.&#xD;&#xA;&#xD;&#xA;Thx!" />
  <row Id="18285" PostHistoryTypeId="1" PostId="8900" RevisionGUID="3c0d87e1-0e92-4efa-82bd-0a7e40b7f0c0" CreationDate="2011-02-22T14:41:06.643" UserId="5091" Text="Making a game preloader (Flash)" />
  <row Id="18286" PostHistoryTypeId="3" PostId="8900" RevisionGUID="3c0d87e1-0e92-4efa-82bd-0a7e40b7f0c0" CreationDate="2011-02-22T14:41:06.643" UserId="5091" Text="&lt;flash&gt;&lt;loading&gt;&lt;swf&gt;&lt;game&gt;&lt;preload&gt;" />
  <row Id="18287" PostHistoryTypeId="2" PostId="8901" RevisionGUID="11efa205-18d2-449e-bc57-b4d0a07822ab" CreationDate="2011-02-22T14:46:19.973" UserId="802" Text="I am starting a new Flash game and I was wondering if there is a better way to organize the timeline of the project. In my previous games I define a keyframe for each possible status of the game (loading, sponsor, intro, menu, gameplay, etc...). This method works but has some problems... For instance, it is not easy to implement transitions between the different screens in the game.&#xD;&#xA;&#xD;&#xA;How do you do this? Do you know of some better way?" />
  <row Id="18288" PostHistoryTypeId="1" PostId="8901" RevisionGUID="11efa205-18d2-449e-bc57-b4d0a07822ab" CreationDate="2011-02-22T14:46:19.973" UserId="802" Text="How to organize timeline in a Flash project?" />
  <row Id="18289" PostHistoryTypeId="3" PostId="8901" RevisionGUID="11efa205-18d2-449e-bc57-b4d0a07822ab" CreationDate="2011-02-22T14:46:19.973" UserId="802" Text="&lt;flash&gt;" />
  <row Id="18290" PostHistoryTypeId="6" PostId="8900" RevisionGUID="56855b1e-4794-43a6-9ae3-01f2d2c167b6" CreationDate="2011-02-22T14:54:46.543" UserId="14" Comment="edited tags" Text="&lt;flash&gt;&lt;loading&gt;&lt;swf&gt;" />
  <row Id="18291" PostHistoryTypeId="6" PostId="8239" RevisionGUID="c0053186-1df7-4c92-b2aa-3656048a749f" CreationDate="2011-02-22T14:55:09.710" UserId="14" Comment="edited tags" Text="&lt;engine&gt;&lt;logic&gt;&lt;turn-based&gt;" />
  <row Id="18292" PostHistoryTypeId="6" PostId="8722" RevisionGUID="6bf48ae9-9893-48cf-acb0-329124231a8f" CreationDate="2011-02-22T14:55:16.527" UserId="14" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;swf&gt;" />
  <row Id="18293" PostHistoryTypeId="6" PostId="8785" RevisionGUID="69ddd156-1ced-4ecf-b5ab-b277022f07d9" CreationDate="2011-02-22T14:55:25.513" UserId="14" Comment="edited tags" Text="&lt;c++&gt;" />
  <row Id="18294" PostHistoryTypeId="5" PostId="8897" RevisionGUID="6048219a-e908-4a3b-8daf-eced151a8f67" CreationDate="2011-02-22T14:56:24.170" UserId="1829" Comment="terms..." Text="I still play counter strike 1.6/CSS these days, and as you know, when shots are fired, the crosshair expands.&#xD;&#xA;&#xD;&#xA;When the frame rate drops, this crosshair animation is also affected by the frame rate.&#xD;&#xA;&#xD;&#xA;Can it be considered like a programming/design flaw or is it like so for anti-cheat reasons ?" />
  <row Id="18295" PostHistoryTypeId="6" PostId="8482" RevisionGUID="6b933ddc-c2e1-4d6d-91cf-17e107e4d7d5" CreationDate="2011-02-22T15:00:54.213" UserId="14" Comment="edited tags" Text="&lt;3d&gt;&lt;coordinates&gt;" />
  <row Id="18296" PostHistoryTypeId="2" PostId="8902" RevisionGUID="9ed32dc8-53ba-4ca2-b9e9-38a9d013c0d8" CreationDate="2011-02-22T15:19:26.127" UserId="20" Text="The most flexible way is to skip the keyframes altogether and implement your states (and transitions) in code. You could have a basic `GameState` class that inherits from `MovieClip` and can therefore be applied to MovieClips in your Library.&#xD;&#xA;&#xD;&#xA;This [wikipedia article][1] might help you understand the concept of a State-Machine. Also have a look at the following question: http://gamedev.stackexchange.com/questions/1783/game-state-stack&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Finite_state_machine" />
  <row Id="18297" PostHistoryTypeId="2" PostId="8903" RevisionGUID="f41160d2-fa56-445a-a8ad-c9798e775a67" CreationDate="2011-02-22T15:22:31.100" UserId="2437" Text="You won't go very far without events, obviously, but before even begin to write (and design) an event system, you should ask you the real question : why would the monster communicate with the world class ? Should it really ?&#xD;&#xA;&#xD;&#xA;Let's take a &quot;classical&quot; situation, a monster attacking a player.&#xD;&#xA;&#xD;&#xA;Monster is attacking : the world can very well identify the situation where a hero is next to a monster, and tell the monster to attack. So the function in monster would be :&#xD;&#xA;&#xD;&#xA;    void Monster::attack(LivingCreature l)&#xD;&#xA;    {&#xD;&#xA;      // Call to combat system&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But the world (who already knows the monster) doesn't not need to be knowed by the monster. Actually, the monster can ignore the very existence of the class World, which is probably better.&#xD;&#xA;&#xD;&#xA;Same thing when monster is moving (I let sub-systems get the creature and handle move computation / intention for it, the monster being just a bag of data, but lots of people would say this is not real OOP).&#xD;&#xA;&#xD;&#xA;My point being : events (or callback) are great, of course, but they are not the only answer to every problem you'll face." />
  <row Id="18300" PostHistoryTypeId="2" PostId="8905" RevisionGUID="736a7359-6e1b-4931-aa0a-89d6d4b22d0d" CreationDate="2011-02-22T15:54:39.583" UserId="51" Text="Don't use a callback function to hide what function you're calling.  If you were to put in a callback function, and that callback function will have one and only one function assigned to it, then you're not really breaking the coupling at all. You're just masking it with another layer of abstraction.  You're not gaining anything (other than maybe compilation time), but you're losing clarity.&#xD;&#xA;&#xD;&#xA;I wouldn't exactly call it a best practice, but it's a common pattern to have entities that are contained by something to have a pointer to their parent.  &#xD;&#xA;&#xD;&#xA;That being said, it might be worth your while to use the interface pattern to give your monsters a limited subset of functionality they can call on the world.  " />
  <row Id="18301" PostHistoryTypeId="2" PostId="8906" RevisionGUID="6aab3200-f1ec-420c-b3eb-8e9ab4ec51b1" CreationDate="2011-02-22T16:06:25.977" UserId="1021" Text="I'm almost ready to send a playable prototype of a game to a publisher.  I've never worked with publishers.  What legal or intellectual property issues should I consider at this stage (if any)?&#xD;&#xA;&#xD;&#xA;In this specific case the publisher is well known... perhaps this makes a difference.  Also the game is for a mobile platform." />
  <row Id="18302" PostHistoryTypeId="1" PostId="8906" RevisionGUID="6aab3200-f1ec-420c-b3eb-8e9ab4ec51b1" CreationDate="2011-02-22T16:06:25.977" UserId="1021" Text="Legal and IP considerations with publishers and playable prototypes" />
  <row Id="18303" PostHistoryTypeId="3" PostId="8906" RevisionGUID="6aab3200-f1ec-420c-b3eb-8e9ab4ec51b1" CreationDate="2011-02-22T16:06:25.977" UserId="1021" Text="&lt;legal&gt;&lt;mobile&gt;&lt;publishing&gt;&lt;intellectual-property&gt;" />
  <row Id="18304" PostHistoryTypeId="2" PostId="8907" RevisionGUID="cc0d2895-452c-4476-90b2-362dc2a92d4c" CreationDate="2011-02-22T16:23:29.527" UserId="4662" Text="The crosshair animation is only a general indicator. All the physics takes place on the game server and thus is totally independent of the client's frame rate." />
  <row Id="18305" PostHistoryTypeId="5" PostId="888" RevisionGUID="8c996718-0c3f-485d-a2bb-ffbde3a186b0" CreationDate="2011-02-22T16:31:33.593" UserId="318" Comment="added 15 characters in body" Text="Check how much memory it takes,&lt;BR&gt;&#xD;&#xA; - Minimum frame rate / Current frame rate * (CPU speed * SpeedUpFactorOf(number of cores in use)),&lt;BR&gt;&#xD;&#xA; - what level of opengl/directx/cuda your game engine requires from the graphics adaptor,&lt;BR&gt;&#xD;&#xA; - how much disk space the installation + user info takes...&lt;BR&gt;&#xD;&#xA;&#xD;&#xA;Also test on various hardware configurations." />
  <row Id="18306" PostHistoryTypeId="2" PostId="8908" RevisionGUID="2367baf8-308c-4880-a214-d12873dbf8a4" CreationDate="2011-02-22T16:32:06.667" UserId="165" Text="Check out some of the books in the answer to [Legal Resources?][1], specifically [Business and Legal Primer for Game Development][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/280/where-can-i-find-legal-or-business-resources-for-a-game-production-company&#xD;&#xA;  [2]: http://rads.stackoverflow.com/amzn/click/1584504927" />
  <row Id="18307" PostHistoryTypeId="5" PostId="888" RevisionGUID="f201528b-a899-4983-824c-79ea32183d74" CreationDate="2011-02-22T16:37:49.833" UserId="318" Comment="added 112 characters in body" Text="Check:&lt;BR&gt;&#xD;&#xA; - How much RAM it uses&lt;BR&gt;&#xD;&#xA; - How much texture + GPGPU memory it uses&lt;BR&gt;&#xD;&#xA; - Minimum frame rate / Current frame rate * CPU speed * SpeedUpFactorOf(minimal number of cores you can use)&lt;BR&gt;&#xD;&#xA; - Similar equation for GPU calculation units&lt;BR&gt;&#xD;&#xA; - what level of opengl/directx/cuda your game engine requires from the graphics adaptor&lt;BR&gt;&#xD;&#xA; - how much disk space the installation + user info takes...&lt;BR&gt;&#xD;&#xA;&#xD;&#xA;Also test on various hardware configurations." />
  <row Id="18308" PostHistoryTypeId="2" PostId="8909" RevisionGUID="3151ec8a-db5e-4d48-ba09-a96a14d55959" CreationDate="2011-02-22T16:50:53.330" UserId="4918" Text="I try to avoid having contained objects call their container because I find it leads to confusion, it becomes too easy to justify, it'll become overused and it creates dependencies that can't be managed. &#xD;&#xA;&#xD;&#xA;In my opinion, the ideal solution is for the higher level classes to be smart enough to manage the lower level classes. For example, the world knowing to determine if a collision between a monster and a knight occurred without either knowing about the other is better too me than the monster asking the world if it collided with a knight.&#xD;&#xA;&#xD;&#xA;Another option in your case, I would probably figure out why the monster class needs to know about the world class and you'll most likely find that there's something in the world class that can be broken out into a class of its own that it makes sense for the monster class to know about." />
  <row Id="18309" PostHistoryTypeId="2" PostId="8910" RevisionGUID="f9f5f3a1-65a7-42a8-a3f2-1849e84b24eb" CreationDate="2011-02-22T16:54:20.560" UserId="1101" Text="Anything you don't like *can* be considered a flaw. Who's to decide what is and what isn't?&#xD;&#xA;&#xD;&#xA;As it happens, pretty much all your graphics are frame-dependent. You can't draw something on the screen in between frames, by definition. The only possible way around that is to use some sort of hardware overlay system but I don't know how well supported they are these days." />
  <row Id="18310" PostHistoryTypeId="25" PostId="8906" RevisionGUID="3bca5217-ff89-45b0-a336-06237dc76ca0" CreationDate="2011-02-22T17:22:55.567" Comment="http://twitter.com/#!/StackGameDev/status/40099227501727745" />
  <row Id="18311" PostHistoryTypeId="5" PostId="8900" RevisionGUID="09ab6fbd-f6e3-44b5-92a9-d28fa21bb9bf" CreationDate="2011-02-22T17:35:06.097" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How do you create a single/internal pre-loader for a Flash game written using Flex?](http://gamedev.stackexchange.com/questions/1659/how-do-you-create-a-single-internal-pre-loader-for-a-flash-game-written-using-fle)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hi guys, Im trying to make a preloader in a Flash game.&#xD;&#xA;&#xD;&#xA;Thing is, I need some advices on this since I never made one, I have the game almost complete, but when, i.e, I upload the game to a website I get a white screen for a few seconds, and then I see the game.&#xD;&#xA;&#xD;&#xA;Is there a simple way, maybe using an a API or something like that, to make a preloader screen?&#xD;&#xA;&#xD;&#xA;Im using Flash Builder fyi.&#xD;&#xA;&#xD;&#xA;Thx!" />
  <row Id="18312" PostHistoryTypeId="10" PostId="8900" RevisionGUID="b443bc52-6a70-46fb-8b10-33770c40eaf0" CreationDate="2011-02-22T17:35:05.943" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="18313" PostHistoryTypeId="2" PostId="8911" RevisionGUID="72088a2e-5765-4e61-90a0-df6e889fb2a2" CreationDate="2011-02-22T18:11:36.007" UserId="1101" Text="Generally I try and avoid bidirectional links, but if I must have them, I make absolutely sure that there is one method to make them and one to break them, so that you never get inconsistencies.&#xD;&#xA;&#xD;&#xA;Often you can avoid the bidirectional link entirely by passing in data as it is necessary. A trivial refactoring is to make it so that instead of having the monster keeping a link to the world, you pass the world in by reference to the monster methods that need it. Better still is to only pass in an interface for the bits of the world that the monster strictly needs, meaning the monster doesn't come to rely on the world's concrete implementation. This corresponds to the [Interface Segregation Principle][1] and the [Dependency Inversion Principle][2], but doesn't start to introduce the excess abstraction you can sometimes get with events, signals+slots, etc.&#xD;&#xA;&#xD;&#xA;In a way, you can argue that using a callback is a very specialised mini-interface, and that is fine. You have to decide whether you can more meaningfully achieve your goals via one collection of methods in an interface object or several assorted ones in different callbacks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Interface_segregation_principle&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Dependency_inversion_principle" />
  <row Id="18314" PostHistoryTypeId="2" PostId="8912" RevisionGUID="d5c5d916-9246-471f-a07a-aba96ef63464" CreationDate="2011-02-22T19:11:20.160" UserId="182" Text="Whenever I can, I try to restrict communication between objects to a request-and-respond model. There is an implied partial ordering on the objects in my program such that between any two objects A and B, there may be a way for A to directly or indirectly call a method of B or for B to directly or indirectly call a method of A, but it is never possible for A and B to mutually call each others' methods. Sometimes, of course, you want to have backward communication to the caller of a method. There are a couple ways I like to do this, and neither of them are callbacks.&#xD;&#xA;&#xD;&#xA;One way is to include more information in the return value of the method call, which means the client code gets to decide what to do with it *after* the procedure returns control to it.&#xD;&#xA;&#xD;&#xA;The other way is to call out to a mutual child object. That is, if A calls a method on B, and B needs to communicate some information to A, B calls a method on C, where A and B can both call C, but C cannot call A or B. Object A would then be responsible for getting the information from C after B returns control to A. Note that this isn't really fundamentally different from the first way I proposed. Object A can still only retrieve the information from a return value; none of object A's methods are invoked by B or C. A variation of this trick is to pass C as a parameter to the method, but the restrictions on the relationship of C to A and B still apply.&#xD;&#xA;&#xD;&#xA;Now, the important question is *why* I insist on doing things this way. There are two main reasons:&#xD;&#xA;&#xD;&#xA;* It keeps my objects more loosely coupled. My objects may encapsulate other objects, but they will never depend on the context of the caller, and the context will never depend on the encapsulated objects.&#xD;&#xA;* It keeps my control flow easy to reason about. It's nice to be able to assume that the only code that can change the internal state of `self` while a method executing is that one method and no other. This is the same kind of reasoning that might lead one to put mutexes on concurrent objects.&#xD;&#xA;&#xD;&#xA;I'm not against all uses of callbacks. In keeping with my policy on never &quot;calling the caller,&quot; if an object A invokes a method on B and passes a callback to it, the callback may not change the internal state of A, and that includes the objects encapsulated by A and the objects in A's context. In other words, the callback may only invoke methods on objects given to it by B. The callback, in effect, is under the same restrictions that B is.&#xD;&#xA;&#xD;&#xA;One last loose end to tie up is that I will allow the invocation of any pure function, regardless of this partial ordering I've been talking about. Pure functions are a bit different from methods in that they can't change or depend on mutable state or side effects, so there is no worry about them confusing matters." />
  <row Id="18315" PostHistoryTypeId="2" PostId="8913" RevisionGUID="b6e4dce7-9221-40f1-ba2f-a6bc6425516e" CreationDate="2011-02-22T20:05:03.930" UserId="5604" Text="I found a simple solution to my problem using quaternions.&#xD;&#xA;&#xD;&#xA;    const Ogre::Real sqrt_one_half = 0.7071067811865475244; // Square root of 1/2&#xD;&#xA;    camera_-&gt;setOrientation(Ogre::Quaternion(sqrt_one_half,-sqrt_one_half,0.0,0.0));&#xD;&#xA;&#xD;&#xA;Also, why the hell am I setting the rotation every update?  I should just do in once in the init function, and then only modify the position in the update function.  Here's my updated code, if anyone is interested:&#xD;&#xA;&#xD;&#xA;    void HoveringCameraController::init(Ogre::Camera &amp; camera, AnimatedBody &amp; target, Ogre::Real height)&#xD;&#xA;    {&#xD;&#xA;    	camera_ = &amp;camera;&#xD;&#xA;    	target_ = &amp;target;&#xD;&#xA;    	height_ = height;&#xD;&#xA;    &#xD;&#xA;    	auto p = target_-&gt;getPosition();&#xD;&#xA;    	p.y += height_;&#xD;&#xA;    	camera_-&gt;setPosition(p);&#xD;&#xA;    &#xD;&#xA;    	const Ogre::Real sqrt_one_half = 0.7071067811865475244; // Square root of 1/2&#xD;&#xA;    	camera_-&gt;setOrientation(Ogre::Quaternion(sqrt_one_half,-sqrt_one_half,0.0,0.0));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void HoveringCameraController::update(Ogre::Real time_delta)&#xD;&#xA;    {&#xD;&#xA;    	auto p = target_-&gt;getPosition();&#xD;&#xA;    	p.y += height_;&#xD;&#xA;    	camera_-&gt;setPosition(p);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="18316" PostHistoryTypeId="5" PostId="8913" RevisionGUID="279b907d-294b-4ce4-a3bc-0a0f8ed6c393" CreationDate="2011-02-22T20:12:23.827" UserId="5604" Comment="edited body" Text="I found a simple solution to my problem using quaternions.&#xD;&#xA;&#xD;&#xA;    const Ogre::Real sqrt_one_half = 0.7071067811865475244; // Square root of 1/2&#xD;&#xA;    camera_-&gt;setOrientation(Ogre::Quaternion(sqrt_one_half,-sqrt_one_half,0.0,0.0));&#xD;&#xA;&#xD;&#xA;Also, why the hell am I setting the rotation every update?  I should just do it once in the init function, and then only modify the position in the update function.  Here's my updated code, if anyone is interested:&#xD;&#xA;&#xD;&#xA;    void HoveringCameraController::init(Ogre::Camera &amp; camera, AnimatedBody &amp; target, Ogre::Real height)&#xD;&#xA;    {&#xD;&#xA;    	camera_ = &amp;camera;&#xD;&#xA;    	target_ = &amp;target;&#xD;&#xA;    	height_ = height;&#xD;&#xA;    &#xD;&#xA;    	auto p = target_-&gt;getPosition();&#xD;&#xA;    	p.y += height_;&#xD;&#xA;    	camera_-&gt;setPosition(p);&#xD;&#xA;    &#xD;&#xA;    	const Ogre::Real sqrt_one_half = 0.7071067811865475244; // Square root of 1/2&#xD;&#xA;    	camera_-&gt;setOrientation(Ogre::Quaternion(sqrt_one_half,-sqrt_one_half,0.0,0.0));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void HoveringCameraController::update(Ogre::Real time_delta)&#xD;&#xA;    {&#xD;&#xA;    	auto p = target_-&gt;getPosition();&#xD;&#xA;    	p.y += height_;&#xD;&#xA;    	camera_-&gt;setPosition(p);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="18317" PostHistoryTypeId="25" PostId="8899" RevisionGUID="ea6bff8a-547c-4719-b168-c35aec715943" CreationDate="2011-02-22T20:22:55.437" Comment="http://twitter.com/#!/StackGameDev/status/40144525611642880" />
  <row Id="18318" PostHistoryTypeId="2" PostId="8914" RevisionGUID="8cb7d791-4738-4efb-95ea-7c1ae4ce09a5" CreationDate="2011-02-22T21:04:45.057" UserId="5599" Text="A couple of suggestions, although I'm not sure they will fix the problem as I don't have full code to run and debug.&#xD;&#xA;&#xD;&#xA;In this code:&#xD;&#xA;&#xD;&#xA;    if(NextX == 1)&#xD;&#xA;    {&#xD;&#xA;        if (upright &amp;&amp; downright)&#xD;&#xA;           CenterX += Speed;&#xD;&#xA;        else&#xD;&#xA;           CenterX = (Game.GetCellX(CenterX) + 1)*16 - Width / 2f;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;the else statement is moving the object even though the object should not be moving. &lt;br/&gt;&#xD;&#xA;I guess you are trying to make the object flush against the wall but maybe the calculation is incorrect.&lt;br/&gt;&#xD;&#xA;If you comment out the else statement, does the object still flicker?&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;The calculation does look a bit suspicious as it subtracts (Width / 2f) and then the CenterX set operator does the same subtraction again. &#xD;&#xA;&#xD;&#xA;Another thing I'd like to point, just to help the clarity of the code, is that you made the properties for CenterX calculate the value back and forth, but the code is still littered with the same calculation over and over again.&lt;br/&gt;&#xD;&#xA;This might well be part of the problem. Either way, I'd suggest making a few more properties and settling on one standard for all of them. For example, make the Center be the property stored and calculate the others from it:&#xD;&#xA;&#xD;&#xA;    public float CenterX&#xD;&#xA;    {&#xD;&#xA;        get { return X; }&#xD;&#xA;        set { X; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public float LeftX&#xD;&#xA;    {&#xD;&#xA;        get { return CenterX - Width / 2f; }&#xD;&#xA;        set { CenterX = value + Width / 2f; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public float RightX&#xD;&#xA;    {&#xD;&#xA;        get { return CenterX + Width / 2f; }&#xD;&#xA;        set { CenterX = value - Width / 2f; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18319" PostHistoryTypeId="2" PostId="8915" RevisionGUID="e211bb65-1c24-4a82-9c6b-bd46f167ba70" CreationDate="2011-02-22T21:18:31.357" UserId="5604" Text="[CEGUI](http://www.cegui.org.uk/wiki/index.php/Main_Page)" />
  <row Id="18320" PostHistoryTypeId="2" PostId="8916" RevisionGUID="42f03e75-6091-43d0-8e8a-34305e518bec" CreationDate="2011-02-22T21:30:49.893" UserId="3503" Text="MyGUI very good and only for DirectX also OpenGL and OGRE" />
  <row Id="18321" PostHistoryTypeId="5" PostId="8899" RevisionGUID="4e529d8c-9b49-48bd-bb63-1992ad00a224" CreationDate="2011-02-22T21:38:40.890" UserId="160" Comment="minor formatting" Text="Of course it depends on the situation. But when a lower lever object or system communicate with an higher level system, should callbacks or events be preferred to keeping a pointer to higher level object?&#xD;&#xA;&#xD;&#xA;For example, we have a `world` class that has a member variable `vector&lt;monster&gt; monsters`. When the `monster` class communicates with the `world`, should I prefer using a callback function then or should I have a pointer to the `world` class inside the `monster` class?" />
  <row Id="18322" PostHistoryTypeId="2" PostId="8917" RevisionGUID="4b85c88c-14ab-4d26-9206-975422ab96c2" CreationDate="2011-02-22T21:48:21.663" UserId="160" Text="There's three main ways that one class can talk to another without being tightly coupled to it:&#xD;&#xA;&#xD;&#xA;1. Through a callback function.&#xD;&#xA;2. Through an event system.&#xD;&#xA;3. Through an interface.&#xD;&#xA;&#xD;&#xA;The three are closely related to each other. An event system in many ways is just a list of callbacks. A callback is more or less an interface with a single method.&#xD;&#xA;&#xD;&#xA;In C++, I rarely use callbacks:&#xD;&#xA;&#xD;&#xA;1. C++ doesn't have good support for callbacks that retain their `this` pointer, so it's hard to use callbacks in object-oriented code.&#xD;&#xA;&#xD;&#xA;2. A callback is basically a non-extensible one-method interface. Over time, I find that I almost always end up needing more than one method to define that interface and a single callback is rarely enough.&#xD;&#xA;&#xD;&#xA;In this case, I'd probably do an interface. In your question, you don't actually spell out what `monster` actually needs to communicate to `world`. Taking a guess, I'd do something like:&#xD;&#xA;&#xD;&#xA;    class IWorld {&#xD;&#xA;    public:&#xD;&#xA;      virtual Monster* getNearbyMonster(const Position &amp; position) = 0;&#xD;&#xA;      virtual Item*    getItemAt(const Position &amp; position) = 0;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    class Monster {&#xD;&#xA;    public:&#xD;&#xA;      void update(IWorld * world) {&#xD;&#xA;        // Do stuff...&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class World : public IWorld {&#xD;&#xA;    public:&#xD;&#xA;      virtual Monster* getNearbyMonster(const Position &amp; position) {&#xD;&#xA;        // ...&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      virtual Item*    getItemAt(const Position &amp; position) {&#xD;&#xA;        // ...&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      // Lots of other stuff that Monster should not have access to...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The idea here is that you only put in `IWorld` (which is a crappy name) the bare minimum that `Monster` needs to access. Its view of the world should be as narrow as possible." />
  <row Id="18323" PostHistoryTypeId="5" PostId="8912" RevisionGUID="f153e48c-4fe3-44cf-a1c7-6c07dc77c47c" CreationDate="2011-02-22T22:09:15.943" UserId="182" Comment="wording correction" Text="Whenever I can, I try to restrict communication between objects to a request-and-respond model. There is an implied partial ordering on the objects in my program such that between any two objects A and B, there may be a way for A to directly or indirectly call a method of B or for B to directly or indirectly call a method of A, but it is never possible for A and B to mutually call each others' methods. Sometimes, of course, you want to have backward communication to the caller of a method. There are a couple ways I like to do this, and neither of them are callbacks.&#xD;&#xA;&#xD;&#xA;One way is to include more information in the return value of the method call, which means the client code gets to decide what to do with it *after* the procedure returns control to it.&#xD;&#xA;&#xD;&#xA;The other way is to call out to a mutual child object. That is, if A calls a method on B, and B needs to communicate some information to A, B calls a method on C, where A and B can both call C, but C cannot call A or B. Object A would then be responsible for getting the information from C after B returns control to A. Note that this isn't really fundamentally different from the first way I proposed. Object A can still only retrieve the information from a return value; none of object A's methods are invoked by B or C. A variation of this trick is to pass C as a parameter to the method, but the restrictions on the relationship of C to A and B still apply.&#xD;&#xA;&#xD;&#xA;Now, the important question is *why* I insist on doing things this way. There are three main reasons:&#xD;&#xA;&#xD;&#xA;* It keeps my objects more loosely coupled. My objects may encapsulate other objects, but they will never depend on the context of the caller, and the context will never depend on the encapsulated objects.&#xD;&#xA;* It keeps my control flow easy to reason about. It's nice to be able to assume that the only code that can change the internal state of `self` while a method executing is that one method and no other. This is the same kind of reasoning that might lead one to put mutexes on concurrent objects.&#xD;&#xA;* It protects invariants on the encapsulated data of my objects. Public methods are allowed to depend on invariants, and those invariants may be violated if one method can be called externally while another is already executing.&#xD;&#xA;&#xD;&#xA;I'm not against all uses of callbacks. In keeping with my policy on never &quot;calling the caller,&quot; if an object A invokes a method on B and passes a callback to it, the callback may not change the internal state of A, and that includes the objects encapsulated by A and the objects in A's context. In other words, the callback may only invoke methods on objects given to it by B. The callback, in effect, is under the same restrictions that B is.&#xD;&#xA;&#xD;&#xA;One last loose end to tie up is that I will allow the invocation of any pure function, regardless of this partial ordering I've been talking about. Pure functions are a bit different from methods in that they can't change or depend on mutable state or side effects, so there is no worry about them confusing matters." />
  <row Id="18324" PostHistoryTypeId="25" PostId="8901" RevisionGUID="fb9f6cda-383b-429a-9c42-46ae80f4a47a" CreationDate="2011-02-22T23:22:55.603" Comment="http://twitter.com/#!/StackGameDev/status/40189825336221696" />
  <row Id="18325" PostHistoryTypeId="2" PostId="8918" RevisionGUID="81e43a3a-b06c-48de-a1fb-a8fb852f8531" CreationDate="2011-02-22T23:43:11.600" UserId="744" Text="Fundamentally, the right approach is to only call DrawDebugData exactly once, at the start or end of your render loop usually. Everything is coming from the same b2World - which is the same coordinate system - which should mean, the same view/projection matrix.&#xD;&#xA;&#xD;&#xA;The point is to dump everything about the world onto the screen in as simple a way as possible - the more game logic you add to the debug data, the less useful it becomes for debugging. If your architecture makes this tricky, you should step back and look at why you're switching between projections so much in the first place." />
  <row Id="18326" PostHistoryTypeId="2" PostId="8919" RevisionGUID="72c16fb6-e8f1-49ec-9ff6-1f6d436ca97f" CreationDate="2011-02-23T00:33:02.960" UserDisplayName="user5622" Text="Check out [GWEN][1] from the maker of Garry's Mod.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gwen.facepunchstudios.com/" />
  <row Id="18327" PostHistoryTypeId="2" PostId="8920" RevisionGUID="0227e135-519f-40e6-9e31-ba962c52fa9f" CreationDate="2011-02-23T00:45:00.763" UserId="891" Text="What are some open source AI Bot interfaces?  Similar to **[Pogamut 3 GameBots2004][1]** for custom Unreal Tournament bots or **[Brood Wars API][2]** for Starcraft bots etc.&#xD;&#xA;&#xD;&#xA;If you could please post one AI bot interface per answer (make sure to provide a link) and give a brief summary as to the content of the blog posts.  &#xD;&#xA;&#xD;&#xA;Please include what type of bot interface structure it is, client/server, server/server, etc&#xD;&#xA;&#xD;&#xA;e.g. **BWAPI** is client/server which emulates a real player&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://diana.ms.mff.cuni.cz/main/tiki-index.php&#xD;&#xA;  [2]: http://code.google.com/p/bwapi/" />
  <row Id="18328" PostHistoryTypeId="1" PostId="8920" RevisionGUID="0227e135-519f-40e6-9e31-ba962c52fa9f" CreationDate="2011-02-23T00:45:00.763" UserId="891" Text="Open Source AI Bot implementations" />
  <row Id="18329" PostHistoryTypeId="3" PostId="8920" RevisionGUID="0227e135-519f-40e6-9e31-ba962c52fa9f" CreationDate="2011-02-23T00:45:00.763" UserId="891" Text="&lt;ai&gt;&lt;api&gt;&lt;bot&gt;" />
  <row Id="18330" PostHistoryTypeId="4" PostId="8920" RevisionGUID="b0fff0af-226f-4e00-9c5e-03aaf252e7f8" CreationDate="2011-02-23T00:50:47.943" UserId="891" Comment="edited title" Text="Open Source AI Bot interfaces" />
  <row Id="18331" PostHistoryTypeId="2" PostId="8921" RevisionGUID="28c9f9b8-2cbc-4255-b2c0-0ea84156015d" CreationDate="2011-02-23T00:56:13.803" UserId="3503" Text="MyGUI is rather good solution for both directx and opengl" />
  <row Id="18332" PostHistoryTypeId="2" PostId="8922" RevisionGUID="26c9e75f-44f8-4f89-a970-1b3af5f62944" CreationDate="2011-02-23T01:40:39.797" UserId="891" Text="**[Pogamut 3 GameBots2004][1]**&#xD;&#xA;&#xD;&#xA;Extension of the original GameBots work done by USC which supports UT2004/ UDK/ and Defcon.  Allows an external program to control bots in game in a **Client/Server** fashion as if they were a human player.&#xD;&#xA;&#xD;&#xA;&gt; External control mechanisms can be connected to many of these games using the scripting languages, thereby providing a tool to control the in-game characters from the outside. Pogamut utilizes UnrealScript (UT2004 scripting language) in this way and also NetBeans Java platform to provide an out-of-the box development environment for AI of virtual characters inhabiting **UT2004**, **Unreal Development Kit (UDK)** and **DEFCON** worlds.&#xD;&#xA;&#xD;&#xA;  [1]: http://diana.ms.mff.cuni.cz/main/tiki-index.php" />
  <row Id="18333" PostHistoryTypeId="25" PostId="8920" RevisionGUID="d71aea1b-465d-4be3-a0ba-6413550e457c" CreationDate="2011-02-23T02:22:55.543" Comment="http://twitter.com/#!/StackGameDev/status/40235122888282112" />
  <row Id="18334" PostHistoryTypeId="2" PostId="8923" RevisionGUID="57b6c548-9b5a-44c4-8d30-282f94cb978f" CreationDate="2011-02-23T02:43:03.317" UserId="323" Text="Personally? I just use a singleton.&#xD;&#xA;&#xD;&#xA;Yeah, okay, bad design, not object-oriented, etc. You know what? *I don't care*. I'm writing a game, not a technology showcase. Nobody's going to be grading me on the code. The purpose is to make a game that is fun, and everything that gets in my way is going to result in a game that is less fun.&#xD;&#xA;&#xD;&#xA;Will you ever have two worlds running at once? Maybe! Maybe you will. But unless you can think of that situation right now, you probably won't.&#xD;&#xA;&#xD;&#xA;So, my solution: make a World singleton. Call functions on it. Be done with the entire mess. You *could* pass in an extra parameter to every single function - and make no mistake, that's where this leads. Or you could just write code that works.&#xD;&#xA;&#xD;&#xA;Doing it this way requires a bit of discipline to clean things up when it gets messy (that's &quot;when&quot;, not &quot;if&quot;) but there's no way you can prevent code from getting messy - either you have the spaghetti problem, or the thousands-layers-of-abstraction problem. At least this way you're not writing large amounts of unnecessary code.&#xD;&#xA;&#xD;&#xA;And if you decide you don't want a singleton anymore, it's usually pretty simple to get rid of it. Takes some work, takes passing a billion parameters around, but those are parameters you'd need to pass around anyway." />
  <row Id="18335" PostHistoryTypeId="2" PostId="8924" RevisionGUID="05071590-e74e-4335-8f7b-b197fc3cb9e4" CreationDate="2011-02-23T03:41:30.813" UserId="4497" Text="Two things to note:&#xD;&#xA;&#xD;&#xA; - Browser cookies need to be transferred back and forth between the client and the server when each page is loaded, which can slow down a site's loading speed.&#xD;&#xA; - The new HTML 5 client storage APIs can provide a much better solution to storing data on the client side. This can, of course, be transferred back and forth between the client and the server when necessary. [Check this article for more info.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.webreference.com/authoring/languages/html/HTML5-Client-Side/" />
  <row Id="18336" PostHistoryTypeId="2" PostId="8925" RevisionGUID="4abf0bb0-4bbc-4b9a-88df-7c67cf4e3682" CreationDate="2011-02-23T05:00:22.133" UserId="5559" Text="What makes a game more interesting , fun to play for children of the age 8 to 14 +.&#xD;&#xA;&#xD;&#xA;Does the age of the customer play an important role in his/her interest in the game. &#xD;&#xA;&#xD;&#xA;What educational stuff can I put in  the game to make the more fun and interesting to play as well as learning." />
  <row Id="18337" PostHistoryTypeId="1" PostId="8925" RevisionGUID="4abf0bb0-4bbc-4b9a-88df-7c67cf4e3682" CreationDate="2011-02-23T05:00:22.133" UserId="5559" Text="Things that make a game more intersting for kids" />
  <row Id="18338" PostHistoryTypeId="3" PostId="8925" RevisionGUID="4abf0bb0-4bbc-4b9a-88df-7c67cf4e3682" CreationDate="2011-02-23T05:00:22.133" UserId="5559" Text="&lt;game-industry&gt;" />
  <row Id="18339" PostHistoryTypeId="5" PostId="8916" RevisionGUID="708c1add-d230-4f4c-94f6-3fc16e3b932d" CreationDate="2011-02-23T05:04:09.640" UserId="370" Comment="Improved english and added some links" Text="[MyGUI][1] is very good.  It works with DirectX as well as OpenGL and [OGRE][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mygui.info/&#xD;&#xA;  [2]: http://www.ogre3d.org/tikiwiki/MyGUI" />
  <row Id="18340" PostHistoryTypeId="24" PostId="8916" RevisionGUID="2e5a0673-3b2d-4d73-b73b-75c73a08580c" CreationDate="2011-02-23T05:04:09.640" Comment="Proposed by 370 approved by 189 edit id of 45" />
  <row Id="18341" PostHistoryTypeId="5" PostId="8921" RevisionGUID="17ea92bf-a471-44f0-9daa-1ef77fca7dd9" CreationDate="2011-02-23T05:06:17.047" UserId="189" Comment="link, grammar improvement" Text="[MyGUI][1] is a rather good solution for both DirectX and OpenGL.&#xD;&#xA;&#xD;&#xA;  [1]: http://mygui.info/" />
  <row Id="18342" PostHistoryTypeId="5" PostId="8925" RevisionGUID="f3f15c7d-3505-4185-800c-5f904812aaa1" CreationDate="2011-02-23T05:09:43.687" UserId="189" Comment="&quot;Interesting&quot; has two e's. Also cleaned up a bunch of the grammar, and added serious-games tag." Text="What makes a game more interesting or fun to play for children ages 8 to 14+?&#xD;&#xA;&#xD;&#xA;Does the age of the consumer play an important role in his/her interest in the game?&#xD;&#xA;&#xD;&#xA;What can I put in a game to make it more fun, educational, and interesting to play?" />
  <row Id="18343" PostHistoryTypeId="4" PostId="8925" RevisionGUID="f3f15c7d-3505-4185-800c-5f904812aaa1" CreationDate="2011-02-23T05:09:43.687" UserId="189" Comment="&quot;Interesting&quot; has two e's. Also cleaned up a bunch of the grammar, and added serious-games tag." Text="Things that make a game more interesting for kids" />
  <row Id="18344" PostHistoryTypeId="6" PostId="8925" RevisionGUID="f3f15c7d-3505-4185-800c-5f904812aaa1" CreationDate="2011-02-23T05:09:43.687" UserId="189" Comment="&quot;Interesting&quot; has two e's. Also cleaned up a bunch of the grammar, and added serious-games tag." Text="&lt;game-industry&gt;&lt;serious-games&gt;" />
  <row Id="18345" PostHistoryTypeId="25" PostId="8925" RevisionGUID="b3d3d8a3-361f-4ce6-bfed-0f70f31c25cc" CreationDate="2011-02-23T05:22:55.350" Comment="http://twitter.com/#!/StackGameDev/status/40280421073682432" />
  <row Id="18346" PostHistoryTypeId="2" PostId="8926" RevisionGUID="6f781feb-9243-4e9d-a0fc-61a57bf2f8f7" CreationDate="2011-02-23T05:34:55.553" UserId="370" Text="You are over thinking it.  When will one b2World have bodies it two layers?  I don't think you'll find one use case that isn't contrived.  Box2D has one coordinate system.  At any time world will is one way that world is represented to the player.  That mean there is one projection matrix and one one layer.&#xD;&#xA;&#xD;&#xA;What maybe misleading you is the desire to use Box2D in more than one layer.  For instance you could use Box2D to do some crazy GUI effects.  In this case you'll want to use two b2Worlds.  You could do it with one and some clever collision masking but it's not worth the effort.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I like your approach of using layers in a scene (I use the same in my games).  In my game I have a layer dedicated to `DrawDebugData`.  I make sure the debug layer is higher than the game layer and uses the same camera view." />
  <row Id="18347" PostHistoryTypeId="25" PostId="8900" RevisionGUID="fe2aee0a-6332-4dd6-a118-a3a030664230" CreationDate="2011-02-23T08:22:55.453" Comment="http://twitter.com/#!/StackGameDev/status/40325720131633152" />
  <row Id="18348" PostHistoryTypeId="5" PostId="8886" RevisionGUID="9f70bbea-644f-40f9-a943-c18224188bf6" CreationDate="2011-02-23T08:25:05.983" UserId="3794" Comment="some links added" Text="This is beautiful and i'm sure that the lighting here is not that hard as i could look like. &#xD;&#xA;&#xD;&#xA;What is done here is fluid particle simulation, propably implemented on the gpu for fast simulation. I'm sure that it uses **density for lighting**. For similar implementation of particle system you can look at the directx SDK (June 2010) demo fluid11. &#xD;&#xA;&#xD;&#xA;For lighting you can see that objects doesn't produce real shadows (shadow are always in left bottom direction). So particles and objects are only attenuating light sources or in the oposite they are producing light. For this you need to render density prepass. For attenuating it can be just grayscale, for light emission use colors. Particles are best rendered using additive blending with alpha (maybe 0.2, but it depends on simulation and what you will like) so you can accumulate particle density in one pixel. Object like rectangles will be rendered with alpha 1.0. No blending for them. &#xD;&#xA;&#xD;&#xA;Then blur this render. Different blurs (box blur, gaussian) with different radiuses can produce very different effects. So now you have texture with attenuation or light emission based on the particle density in the pixel neigbourhood. Emession can be used just like background. Attenuation might be used with substract blending or just substracted on the shader.&#xD;&#xA;&#xD;&#xA;Everything can be done in max 3 shader passes (without simulation). &#xD;&#xA;&#xD;&#xA;**edit:** &#xD;&#xA;I was asked to add links and references. I just wanted to write: *Trust me i'm working on fluid renderers for movie production*. But it wouldn't be enough propably. So. If talking about Fluid rendering we have to consider &quot;radiative transfer equation&quot;. It counts with light absorbtion, emission and scattering in the volume. For realtime graphics we can use &quot;only emission&quot; or/and &quot;only absorbtion&quot; models, which can be simplified into two quite simple integrals. Most used is &quot;single scatter&quot; model which offers great compromise between performance and visual quality. What is important for this case. No light scattering in 2D. So absorbtion and emission. Question is where to gain them. Logical and surprisingly correct answer is that density = absorbtion and density = emission. In most natural cases emission is connected with temperature, but density is not bad solution. After all we are doing aproximation and effect not correct natural simulation. &#xD;&#xA;&#xD;&#xA;At the end. I didn't said anything that new. Sorry i made you read stuff this long. I just used correct terms &quot;absorbtion&quot; and &quot;emission&quot; and just said what somebody before or after me: Aditive blending particle render, blur, use. For emission, render colors and blur. For attenuation-absorbtion use grayscale render and blur.&#xD;&#xA;&#xD;&#xA;To be correct real phase function for light attenuation and production should be used. But there is not real reason why.&#xD;&#xA;&#xD;&#xA;Links:&#xD;&#xA;&#xD;&#xA;  - [real-time volume graphics][1] - the best book in the world about fluid rendering for programmers.  &#xD;&#xA;  - [radiative transfer on wiki][2]&#xD;&#xA;  - [Particle-Based Fluid Simulation for Interactive Applications][3] Particle systems for fluid simulation&#xD;&#xA;  - [GPGPU collision detection][4] &#xD;&#xA;  - [navier-strokes on wiki][5] - basics of grid based fluid simulations (it uses grid for simulation not particles)&#xD;&#xA;  - [gpu accelerated navier strokes][6]&#xD;&#xA;  - [cuda for smoke particles using half-axis rendering][7] - Cuda samples, paper and source codes.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=lDWOu3_KGvoC&amp;printsec=frontcover&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=reZiTc_sK8iJ5Abu1OyBCg&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCoQ6AEwAA#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Radiative_transfer&#xD;&#xA;  [3]: http://www.google.cz/url?sa=t&amp;source=web&amp;cd=1&amp;sqi=2&amp;ved=0CB8QFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.2.7720%26rep%3Drep1%26type%3Dpdf&amp;ei=Y8NkTfj5BMSBOpqEydgF&amp;usg=AFQjCNGDCFwEpw-uvnbRFlEoC0t4fPkXWQ&#xD;&#xA;  [4]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch32.html&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations&#xD;&#xA;  [6]: http://scholarworks.boisestate.edu/cgi/viewcontent.cgi?article=1003&amp;context=mecheng_facpubs&#xD;&#xA;  [7]: http://developer.download.nvidia.com/compute/cuda/sdk/website/samples.html#smokeParticles" />
  <row Id="18349" PostHistoryTypeId="2" PostId="8927" RevisionGUID="4511353c-ca1f-4eeb-9908-6f59fc300090" CreationDate="2011-02-23T09:37:50.477" UserId="5628" Text="[LuaAV][1] might be a good option.  It is closer to creative coding frameworks like [Openframeworks][2] than a traditional game engine, and currently Mac OS X and Linux only, but it supports 3D graphics and integrates a lot of powerful support libraries (OpenCL, OpenCV, Kinect, fluids, etc.)  It is built with LuaJIT, so its performance will be better than the vanilla Lua interpreter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://lua-av.mat.ucsb.edu/blog/&#xD;&#xA;  [2]: http://www.openframeworks.cc/&#xD;&#xA;  [3]: http://www.libcinder.org" />
  <row Id="18350" PostHistoryTypeId="5" PostId="8886" RevisionGUID="c91c684f-b0a3-4e36-b3bd-292a8475ff11" CreationDate="2011-02-23T09:53:02.430" UserId="3794" Comment="added 6 characters in body" Text="This is beautiful and i'm sure that the lighting here is not that hard as i could look like. &#xD;&#xA;&#xD;&#xA;What is done here is fluid particle simulation, propably implemented on the gpu for fast simulation. I'm sure that it uses **density for lighting**. For similar implementation of particle system you can look at the directx SDK (June 2010) sample &quot;FluidCS11&quot;. &#xD;&#xA;&#xD;&#xA;For lighting you can see that objects doesn't produce real shadows (shadow are always in left bottom direction). So particles and objects are only attenuating light sources or in the oposite they are producing light. For this you need to render density prepass. For attenuating it can be just grayscale, for light emission use colors. Particles are best rendered using additive blending with alpha (maybe 0.2, but it depends on simulation and what you will like) so you can accumulate particle density in one pixel. Object like rectangles will be rendered with alpha 1.0. No blending for them. &#xD;&#xA;&#xD;&#xA;Then blur this render. Different blurs (box blur, gaussian) with different radiuses can produce very different effects. So now you have texture with attenuation or light emission based on the particle density in the pixel neigbourhood. Emession can be used just like background. Attenuation might be used with substract blending or just substracted on the shader.&#xD;&#xA;&#xD;&#xA;Everything can be done in max 3 shader passes (without simulation). &#xD;&#xA;&#xD;&#xA;**edit:** &#xD;&#xA;I was asked to add links and references. I just wanted to write: *Trust me i'm working on fluid renderers for movie production*. But it wouldn't be enough propably. So. If talking about Fluid rendering we have to consider &quot;radiative transfer equation&quot;. It counts with light absorbtion, emission and scattering in the volume. For realtime graphics we can use &quot;only emission&quot; or/and &quot;only absorbtion&quot; models, which can be simplified into two quite simple integrals. Most used is &quot;single scatter&quot; model which offers great compromise between performance and visual quality. What is important for this case. No light scattering in 2D. So absorbtion and emission. Question is where to gain them. Logical and surprisingly correct answer is that density = absorbtion and density = emission. In most natural cases emission is connected with temperature, but density is not bad solution. After all we are doing aproximation and effect not correct natural simulation. &#xD;&#xA;&#xD;&#xA;At the end. I didn't said anything that new. Sorry i made you read stuff this long. I just used correct terms &quot;absorbtion&quot; and &quot;emission&quot; and just said what somebody before or after me: Aditive blending particle render, blur, use. For emission, render colors and blur. For attenuation-absorbtion use grayscale render and blur.&#xD;&#xA;&#xD;&#xA;To be correct real phase function for light attenuation and production should be used. But there is not real reason why.&#xD;&#xA;&#xD;&#xA;Links:&#xD;&#xA;&#xD;&#xA;  - [real-time volume graphics][1] - the best book in the world about fluid rendering for programmers.  &#xD;&#xA;  - [radiative transfer on wiki][2]&#xD;&#xA;  - [Particle-Based Fluid Simulation for Interactive Applications][3] Particle systems for fluid simulation&#xD;&#xA;  - [GPGPU collision detection][4] &#xD;&#xA;  - [navier-strokes on wiki][5] - basics of grid based fluid simulations (it uses grid for simulation not particles)&#xD;&#xA;  - [gpu accelerated navier strokes][6]&#xD;&#xA;  - [cuda for smoke particles using half-axis rendering][7] - Cuda samples, paper and source codes.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=lDWOu3_KGvoC&amp;printsec=frontcover&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=reZiTc_sK8iJ5Abu1OyBCg&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCoQ6AEwAA#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Radiative_transfer&#xD;&#xA;  [3]: http://www.google.cz/url?sa=t&amp;source=web&amp;cd=1&amp;sqi=2&amp;ved=0CB8QFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.2.7720%26rep%3Drep1%26type%3Dpdf&amp;ei=Y8NkTfj5BMSBOpqEydgF&amp;usg=AFQjCNGDCFwEpw-uvnbRFlEoC0t4fPkXWQ&#xD;&#xA;  [4]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch32.html&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations&#xD;&#xA;  [6]: http://scholarworks.boisestate.edu/cgi/viewcontent.cgi?article=1003&amp;context=mecheng_facpubs&#xD;&#xA;  [7]: http://developer.download.nvidia.com/compute/cuda/sdk/website/samples.html#smokeParticles" />
  <row Id="18351" PostHistoryTypeId="2" PostId="8928" RevisionGUID="d8b3cc3f-ed76-4b98-bb96-562a200c0e50" CreationDate="2011-02-23T10:17:11.397" UserId="5073" Text="HI Friends&#xD;&#xA; I Got The Perfect Answer From The Following Link&#xD;&#xA;  &gt;http://stackoverflow.com/questions/5075291/i-want-to-track-the-speed-of-the-fingure-movement-in-pixel-per-second-is-it-possi/5083653#5083653" />
  <row Id="18352" PostHistoryTypeId="2" PostId="8929" RevisionGUID="7e443842-f3c8-4e8f-bd7f-2dd6f26ade6a" CreationDate="2011-02-23T10:43:39.910" UserDisplayName="user5629" Text="I guess violence will never get boring. Throwing ducks off a cliff seems to be very interesting.&#xD;&#xA;&#xD;&#xA;However, when I was 10-11-12-13 I liked Myst-like games, where things had to be discovered." />
  <row Id="18353" PostHistoryTypeId="2" PostId="8930" RevisionGUID="f4724f04-65e5-4acf-bb50-f662baf4e362" CreationDate="2011-02-23T11:06:31.983" UserId="1156" Text="You will find that education is not a good selling point. You'll never get a 10 year old to play to learn things.&#xD;&#xA;&#xD;&#xA;Instead, like Andrei has suggested, violence works well. Make sure it's cartoon and not gore, else it'll just be unsuitable.&#xD;&#xA;&#xD;&#xA;Give them something to laugh at, and not their own failure. Children have very little perseverance. Then again, don't make it too easy. ;-)  &#xD;&#xA;Cartoon characters and anything they can relate to as 'I like person X' works. &#xD;&#xA;&#xD;&#xA;As for educational, if you can hide that behind a fun puzzle or a way to defeat some evil aliens by solving maths problems, you'll get a lot more interest.&#xD;&#xA;&#xD;&#xA;Probably the best thing would be to make a prototype of your game (with nicer graphics) and actually get some kids to play it." />
  <row Id="18354" PostHistoryTypeId="25" PostId="8862" RevisionGUID="abfd06a2-86fb-41be-8c6a-2e49e31198d8" CreationDate="2011-02-23T11:22:55.533" Comment="http://twitter.com/#!/StackGameDev/status/40371018165919745" />
  <row Id="18355" PostHistoryTypeId="2" PostId="8931" RevisionGUID="00d48fff-f5f9-4f55-a7c4-8ae3fd38c234" CreationDate="2011-02-23T11:35:06.693" UserId="2437" Text="As the communist duck, I'd say there is a huge difference between 8 and 14. Around 12, I started wanting to build something in games, but I was too lazy for Civilization (too many things to understand), so I sticked with Sim City (cheating ; actually, I cheated regularly, not to beat the game, but to build my own story). I used to play the Warcraft &quot;dungeon&quot; levels, just to imagine there were castles. I would have loved minecraft at this age). Before that age, anything &quot;new&quot;, with secrets, lots of color, constant things to attract attention worked ; after that, I grew tired of it. &#xD;&#xA;&#xD;&#xA;So I'd say the gameplay is the variable, there : it should not be too dense, and be fairly linear (but with &quot;secrets to discover&quot;), before they get twelvish, and then more open-ended, giving more creativity after that. Once again, I'm basing this on my own experience, and I guess everybody is different. And it's likely that each generation is different, so trying on &quot;real kids&quot; would be the best idea.&#xD;&#xA;&#xD;&#xA;A note on violence, though : I think it's less violence than power that is attractive to a younger audience. Everything you can't do in real life appeals to the player ; and there is a lot of things kids can't do : drive, have money, own a house, dress as they want, and so on... They're so powerless that every impression of power, influence, will appeal to them. This is why violence is so used in video game, because it is a pure manifestation of power (and this is why survival horror and infiltration are more subtle, and give you another view point on power). &#xD;&#xA;&#xD;&#xA;Hope that helps !&#xD;&#xA;&#xD;&#xA;**Edit** : Oh, and a great way to have a good answer would be to go to a local video game store and ask them what they sell to this audience. " />
  <row Id="18356" PostHistoryTypeId="2" PostId="8932" RevisionGUID="f0183d34-edd5-4bd6-927b-4a695ad909b9" CreationDate="2011-02-23T11:40:48.993" UserId="5508" Text="I am starting to implement player and enemy AI in a game, but I am confused about how to best implement this in a component-based game architecture.&#xD;&#xA;&#xD;&#xA;Say I have a following player character that can be stationary, running and swinging a sword. A player can transit to the swing sword state from both the stationary and running state, but then the swing must be completed before the player can resume standing or running around. During the swing, the player cannot walk around.&#xD;&#xA;&#xD;&#xA;As I see it, I have two implementation approaches:&#xD;&#xA;&lt;ul&gt;&lt;li&gt;Create a single AI-component containing all player logic (either decoupled from the actual component or embedded as a PlayerAIComponent). I can easily how to enforce the state restrictions without creating coupling between individual components making up the player entity. However, the AI-component cannot be broken up. If I have, for example, an enemy that can only stand and walk around or only walks around and occasionally swing a sword, I have to create new AI-components.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Break the behavior up in components, each identifying a specific state. I then get a StandComponent, WalkComponent and SwingComponent. To enforce the transition rules, I have to couple each component. SwingComponent must disable StandComponent and WalkComponent for the duration of the swing. When I have an enemy that only stands around, swinging a sword occasionally, I have to make sure SwingComponent only disables WalkComponent if it is present. Although this allows for better mix-and-matching components, it can lead to a maintainability nightmare as each time a dependency is added, the existing components must be updated to play nicely with the new requirements the dependency places on the character.&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;The ideal situation would be that a designer can build new enemies/players by dragging components into a container, without having to touch a single line of engine or script code. Although I am not sure script coding can be avoided, I want to keep it as simple as possible.&#xD;&#xA;&#xD;&#xA;Summing it all up: Should I lob all AI logic into one component or break up each logic state into separate components to create entity variants more easily?" />
  <row Id="18357" PostHistoryTypeId="1" PostId="8932" RevisionGUID="f0183d34-edd5-4bd6-927b-4a695ad909b9" CreationDate="2011-02-23T11:40:48.993" UserId="5508" Text="How to implement behavior in a component-based game architecture?" />
  <row Id="18358" PostHistoryTypeId="3" PostId="8932" RevisionGUID="f0183d34-edd5-4bd6-927b-4a695ad909b9" CreationDate="2011-02-23T11:40:48.993" UserId="5508" Text="&lt;architecture&gt;&lt;ai&gt;&lt;component-based&gt;" />
  <row Id="18359" PostHistoryTypeId="2" PostId="8933" RevisionGUID="85afb392-2ea8-4c46-9105-4a2e22f30d27" CreationDate="2011-02-23T11:47:34.927" UserId="-1" Text="" />
  <row Id="18360" PostHistoryTypeId="2" PostId="8934" RevisionGUID="fe3fd0b0-7852-40ce-b40c-28bfc1744e8e" CreationDate="2011-02-23T11:47:34.927" UserId="-1" Text="" />
  <row Id="18361" PostHistoryTypeId="2" PostId="8935" RevisionGUID="fa402de1-74b6-458b-b404-202bde430fcb" CreationDate="2011-02-23T12:09:14.477" UserId="5631" Text="Latest news is that Microsoft will be coming out with a no0n-commercial version of an SDK for Kinect in Spring.Below is the link from Microsoft.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;http://research.microsoft.com/en-us/news/features/kinectforwindowssdk-022111.aspx&#xD;&#xA;" />
  <row Id="18362" PostHistoryTypeId="2" PostId="8936" RevisionGUID="e42ced86-fe4d-4868-a2ab-4d8d53c2d619" CreationDate="2011-02-23T12:21:32.527" UserId="3794" Text="Talk with children. Play with children. Then talk with children about their world. Talk about the games. Implement prototype. Test it with children. Iterate ... That will be fun :)&#xD;&#xA;&#xD;&#xA;And game should have easy to learn gameplay model and that model should be based on well known &quot;mental model&quot; - you dont have to know physics to know how ball should fly when you kick it. Or how it looks like when somebody jumps.&#xD;&#xA;&#xD;&#xA;*Side note: the game have to be fun even if you are not playing with children. My cousins loved my game when i was playing with them. But it was boring for them when i was gone.* " />
  <row Id="18363" PostHistoryTypeId="2" PostId="8937" RevisionGUID="c539f21c-b204-4f6f-a743-a2b5b779ba66" CreationDate="2011-02-23T13:13:05.117" UserId="241" Text="When I was about 8yo, at our school we had a simple PC game that you played by solving simple math problems (2*4=8) etc to move the pixelated flying man to his targets on the screen. I remember having several hours of fun with that, because the math part was simple enough to become sort of automatic pretty fast. I suspect this was on purpose. :)&#xD;&#xA;&#xD;&#xA;The key issue then, in my opinion, is to make the education you wish to pass onto the players stealthy. Kids (the majority) by definition probably feel they get enough education at their school classes already. There are however many ways the education can be slipped into the mix without them noticing. Geometry could be a very fruitful area as it is very intuitive to humans, we just have to sneak in the important aspects and the terms that we wish to pass on. Think trajectories in Worms, things involving Pythagorean theorem that is easily visualized, maybe the distinction between different triangles and how to make use of the shapes in the game etc etc.. &#xD;&#xA;&#xD;&#xA;When I was 10, I learned the English language with a dictionary at the side, so that I could understand more about civilization 1, but I was able to start to play it because the actual mechanics were very simple. I'm not sure if I qualify as mainstream enough to be a target audience though. But if you want kids to play the game, make sure that the entry skill level is low, even if the game has depth when one digs into it. &#xD;&#xA;&#xD;&#xA;At 13 I fell in love with a puzzle game called Atomix, that taught me the structures of many important organic chemical molecules. Perhaps a reason why I'm minoring on chemistry? :) That game was lots of fun and could certainly be further improved to pass on other chemical concepts to the players without them noticing. Perhaps I'll work on this sometime..&#xD;&#xA;&#xD;&#xA;So anyways, my hat is off to Sid, and I'm forever grateful for him for sneaking the English language and abridged world history on to me. :)" />
  <row Id="18364" PostHistoryTypeId="5" PostId="8934" RevisionGUID="fa2063b2-c39a-43df-ba55-3157bee4864b" CreationDate="2011-02-23T13:21:23.337" UserId="1156" Comment="added 68 characters in body" Text="Component-based designs rely on composition rather than inheritance." />
  <row Id="18365" PostHistoryTypeId="24" PostId="8934" RevisionGUID="7fdddfa4-158c-42cd-a309-1c923df199a9" CreationDate="2011-02-23T13:21:23.337" Comment="Proposed by 1156 approved by 189 edit id of 46" />
  <row Id="18366" PostHistoryTypeId="2" PostId="8938" RevisionGUID="31ea71d8-54d0-4e33-944b-8c7a7bbfdbe5" CreationDate="2011-02-23T13:58:30.843" UserDisplayName="user5633" Text="Well im kind of late to the party here but I once had been working on a system that went a little bit like this,  There were 5 main stats, Body, Agility, Mind, Personality and Spirit.  Each stat had two connected substats. For example the Body stat had strength and toughness.  When characters were created the amount of points put into each stat dictated how many points could be put into each substat.  Which in the end gave the characters the ability to put something like 15 points of strength into body and 0 in toughness. Thus making a &quot;Glass Cannon&quot; as someone earlier had mentioned.  The Mind stat was also sort of unique in that the two substats were Knowledge and Understanding.  Knowledgd being the booksmarts side and Understanding being the ability to well... understand things.  So a character with a low Knowledge and a very high Understanding wouldnt know squat but could figure out almost anything...  The whole point of this rant is to stress that a system can work very well with what I call a 1.5 tiered system so long as the derived substats are the two most important apsects of the core Stat.&#xD;&#xA;&#xD;&#xA;SonofSpock&#xD;&#xA;&#xD;&#xA;P.S. Sorry about the grammar and puncuation... I sort of just typed what I was saying out loud and didnt feel like proof reading.  I hope it is somewhat helpful." />
  <row Id="18367" PostHistoryTypeId="2" PostId="8939" RevisionGUID="d14963d5-81b5-4404-946c-8e9e103559a7" CreationDate="2011-02-23T14:14:11.100" UserId="953" Text="I'd at least keep Player AI (or what I'd call Player Controller) as its own component. With most games, the player is fundamentally different enough from the NPCs that you can't generalize from one to another except in basics like hit points.&#xD;&#xA;&#xD;&#xA;For NPCs, I see StandComponent and WalkComponent as aspects of the same thing. Are you ever going to have a WalkComponent without a StandComponent? I doubt it. Likewise, a RunComponent would just be a WalkComponent with a higher speed and different animations. I can see the value in having an NPCMovementComponent and a separate NPCSwordFighterComponent, but even that feels like overengineering to me." />
  <row Id="18368" PostHistoryTypeId="25" PostId="8932" RevisionGUID="8cd07a6a-6a38-4da5-8c68-cd3ad756ff09" CreationDate="2011-02-23T14:22:55.483" Comment="http://twitter.com/#!/StackGameDev/status/40416316988993536" />
  <row Id="18369" PostHistoryTypeId="2" PostId="8940" RevisionGUID="f3abe5e1-60d9-47d9-a195-bbe9233db4a7" CreationDate="2011-02-23T14:30:49.207" UserId="360" Text="Here is an excellent reference for driving AI: [Steering Behaviours for Autonomous Characters][1]. Posted here for everyone's reference. There is plenty of information to get you started, but also a lot of information, so don't get too bogged down in the details. &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="18370" PostHistoryTypeId="2" PostId="8941" RevisionGUID="5a5e057a-8786-4116-812a-73cad6b6f065" CreationDate="2011-02-23T14:33:26.593" UserId="141" Text="If you do intend to have more possible enemies or players that you can't imagine right now, then you should definitely break it up. What you're describing in your second point is basically the [state pattern][1].&#xD;&#xA;&#xD;&#xA;I think I agree with Gregory that you shouldn't have separate stand and walk state components. It's just a movement component with speed 0. On the other hand, if you have objects that can't move, you either have to split it up, or just put some kind of boolean restriction in the movement state that prevents having non zero velocity.&#xD;&#xA;&#xD;&#xA;For the player I don't think it needs to be completely separate. It can still use all the other components, with the addition of an input component. This component drives the transitions between states, whereas in the enemy it's controlled by a default AI, or if you want, different AI subclasses that your enemy designers can choose from.&#xD;&#xA;&#xD;&#xA;edit: actually, for your stationary enemies, rather than restricting the movement component, just give them a stationary AI component that never chooses to move them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/State_pattern" />
  <row Id="18371" PostHistoryTypeId="2" PostId="8942" RevisionGUID="fbaf2df0-b6f1-4862-8517-5c9576366f71" CreationDate="2011-02-23T15:38:12.820" UserId="5585" Text="I would like to write a &quot;game&quot;, where you can place an obstacle (red), and then the black dot tries to avoid it, and get to the green target.  &#xD;&#xA;I'm using a very easy way to avoid it, if the black dot is close to the red, it changes its direction, and moves for a while, then it moves forward to the green point.  &#xD;&#xA;[&quot;Unrealistic&quot; path][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How could I create a &quot;smooth&quot; path for the computer controlled &quot;player&quot;?  &#xD;&#xA;How could I implement some path finding algorithm if I just have basically 3 points?  &#xD;&#xA;(And what would it make the things much more complicated, if you could place multiple obstacles?)  &#xD;&#xA;[Smooth path][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AfzHo.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/moftl.jpg" />
  <row Id="18372" PostHistoryTypeId="1" PostId="8942" RevisionGUID="fbaf2df0-b6f1-4862-8517-5c9576366f71" CreationDate="2011-02-23T15:38:12.820" UserId="5585" Text="Moving around/avoiding obstacles" />
  <row Id="18373" PostHistoryTypeId="3" PostId="8942" RevisionGUID="fbaf2df0-b6f1-4862-8517-5c9576366f71" CreationDate="2011-02-23T15:38:12.820" UserId="5585" Text="&lt;ai&gt;&lt;path-finding&gt;" />
  <row Id="18374" PostHistoryTypeId="2" PostId="8943" RevisionGUID="50ddb016-d135-4b85-94eb-fc39eac8c072" CreationDate="2011-02-23T15:43:22.390" UserId="4638" Text="A very common and general approach is to divide your world space into grids and use algorithms like A*.&#xD;&#xA;&#xD;&#xA;This [link][1] helped me get started with understanding and implementing the A* algorithm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.policyalmanac.org/games/aStarTutorial.htm" />
  <row Id="18375" PostHistoryTypeId="5" PostId="8943" RevisionGUID="6a31bf9f-163d-496e-a5b5-76e718cedda9" CreationDate="2011-02-23T15:51:07.323" UserId="4638" Comment="added a simpler idea " Text="A very common and general approach is to divide your world space into grids and use algorithms like A*.&#xD;&#xA;&#xD;&#xA;This [link][1] helped me get started with understanding and implementing the A* algorithm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.policyalmanac.org/games/aStarTutorial.htm&#xD;&#xA;&#xD;&#xA;**Edit**:&#xD;&#xA;&#xD;&#xA;A simpler thought that comes to my mind is...once you have the world into grid-cells. Always, have the black dot follow manhattan distance to the green dot. Then, you can assign weights to each cell. Obstacles can have a high weight on the grid-cell and free-to-move can have (lets say) 0 weight. As you move along the manhattan distance, for each move, check to see if the weight of the next cell is not higher than the weight of the current cell. If it is higher, check the adjacent cell's weight and then move on.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="18376" PostHistoryTypeId="5" PostId="8942" RevisionGUID="0efcca82-14bd-4dfa-9e52-2bb0585fbe65" CreationDate="2011-02-23T16:25:43.770" UserId="5585" Comment="added 2 characters in body" Text="I would like to write a &quot;game&quot;, where you can place an obstacle (red), and then the black dot tries to avoid it, and get to the green target.  &#xD;&#xA;I'm using a very easy way to avoid it, if the black dot is close to the red, it changes its direction, and moves for a while, then it moves forward to the green point.  &#xD;&#xA;![&quot;Unrealistic&quot; path][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How could I create a &quot;smooth&quot; path for the computer controlled &quot;player&quot;?  &#xD;&#xA;How could I implement some path finding algorithm if I just have basically 3 points?  &#xD;&#xA;(And what would it make the things much more complicated, if you could place multiple obstacles?)  &#xD;&#xA;![Smooth path][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AfzHo.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/moftl.jpg" />
  <row Id="18380" PostHistoryTypeId="2" PostId="8945" RevisionGUID="073cb455-17ce-49fd-a099-b4ca81fe14d7" CreationDate="2011-02-23T16:46:27.517" UserId="5099" Text="I am kinda new to flash/AS3. I have written some stuff and now I now the basics of AS. I want to develop a game in which my character moves. exactly like the way Super Mario moves(the background changes and new obstacles come in the way like and animation with which you can interact by climbing and shooting etc.) There is one big thing that I don't understand is that how to make my  background moving and introduce new obstacles when my character moves forward. Currently my scene is static which means the background is the same and obstacles are also stationary. Can some point me to a tutorial or give me an answer that solves my confusion?&#xD;&#xA;thanks" />
  <row Id="18381" PostHistoryTypeId="1" PostId="8945" RevisionGUID="073cb455-17ce-49fd-a099-b4ca81fe14d7" CreationDate="2011-02-23T16:46:27.517" UserId="5099" Text="Need help starting with a game in Flash/AS3" />
  <row Id="18382" PostHistoryTypeId="3" PostId="8945" RevisionGUID="073cb455-17ce-49fd-a099-b4ca81fe14d7" CreationDate="2011-02-23T16:46:27.517" UserId="5099" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="18383" PostHistoryTypeId="2" PostId="8946" RevisionGUID="f1229045-7558-4ba5-880e-815597720e15" CreationDate="2011-02-23T16:55:22.843" UserId="51" Text="Steering behaviors are designed for pretty much this exact problem set.&#xD;&#xA;&#xD;&#xA;http://www.red3d.com/cwr/steer/&#xD;&#xA;&#xD;&#xA;Basically you would combine the obstacle avoidance behavior with probably the seek or pursue behavior.  That page has a bunch of java animations of the different behaviors and what they do.  There are several open source implementations of steering behaviors.  &lt;a href=&quot;http://opensteer.sourceforge.net/&quot;&gt;Here's one.&lt;/a&gt;" />
  <row Id="18384" PostHistoryTypeId="25" PostId="8942" RevisionGUID="268011ff-c190-4900-ad6e-e19a21e9282b" CreationDate="2011-02-23T17:22:55.273" Comment="http://twitter.com/#!/StackGameDev/status/40461614973075456" />
  <row Id="18385" PostHistoryTypeId="2" PostId="8947" RevisionGUID="fae312fa-42e3-4279-84cc-c1818bff45fe" CreationDate="2011-02-23T17:27:43.390" UserId="4443" Text="You are looking for a basic side scrolling tile engine.. In the case of later Mario games it has multiple layers for the parallax scrolling background (which just makes what is really far away scrolls slower than what is close by). A quick google search should give you quite a few ways to accomplish this task.&#xD;&#xA;&#xD;&#xA;In later Mario games, as far as screen scrolling goes, using two bounding boxes is also a good idea. One central box that mario can move around in that does not require the screen to scroll. As soon as mario gets outside that box the game should move slowly to keep him in it.. A secondary box thats a bit larger would be used as a 'mario cant get out of this box' sort of deal. This would be when the game Has to scroll at the speed mario is moving at.&#xD;&#xA;&#xD;&#xA;Hope this helps, those were the major things I had to accomplish when I made a mario clone for school all those years ago." />
  <row Id="18386" PostHistoryTypeId="16" PostId="8922" RevisionGUID="7a2d3452-4bba-4904-8e2d-ee7e23fb109b" CreationDate="2011-02-23T17:29:55.000" UserId="14" />
  <row Id="18387" PostHistoryTypeId="16" PostId="8920" RevisionGUID="6f2e47a3-c682-4627-aa34-d6d5d758cede" CreationDate="2011-02-23T17:29:55.000" UserId="14" />
  <row Id="18388" PostHistoryTypeId="2" PostId="8948" RevisionGUID="0bf0cbca-bc65-4d44-b224-55f398edada0" CreationDate="2011-02-23T17:39:31.457" UserId="20" Text="You want your game-world to consist of several &quot;chunks&quot;, so that you can add/remove elements to your scene when necessary. Some games use chunks the size of one screen, so you'll always see 4 of these chunks at the max.&#xD;&#xA;&#xD;&#xA;The most flexible way for this kind of game though, is to use a tilemap. You can create those maps by using an existing editor, like [Tiled][1] or [Ogmo Editor][2]. &#xD;&#xA;&#xD;&#xA;For the scrolling, you'll need some sort of &quot;2D camera&quot; that moves around with your character and defines the visible portion of your screen. You can also apply some drag to the camera, so that it follows the character with a delay.&#xD;&#xA;&#xD;&#xA;To add the illusion of depth, you can create one or multiple background layers that move with a fraction of the camera speed (parallax scrolling).&#xD;&#xA;&#xD;&#xA;All this stuff is already present in game engines like [flixel][3] or [flashpunk][4] so it might be worthwhile to check these out if you want to start create the game right away. If you want to implement that stuff all by yourself for learning purposes, that's fine too.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/&#xD;&#xA;  [2]: http://ogmoeditor.com/&#xD;&#xA;  [3]: http://flixel.org/&#xD;&#xA;  [4]: http://flashpunk.net/" />
  <row Id="18389" PostHistoryTypeId="5" PostId="8942" RevisionGUID="97cc82ca-d167-41f2-b7c3-2383827da571" CreationDate="2011-02-23T17:43:45.767" UserId="5585" Comment="added 138 characters in body" Text="I would like to write a &quot;game&quot;, where you can place an obstacle (red), and then the black dot tries to avoid it, and get to the green target.  &#xD;&#xA;I'm using a very easy way to avoid it, if the black dot is close to the red, it changes its direction, and moves for a while, then it moves forward to the green point.  &#xD;&#xA;![&quot;Unrealistic&quot; path][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How could I create a &quot;smooth&quot; path for the computer controlled &quot;player&quot;?  &#xD;&#xA;***Edit:*** Not the smoothness is the main point, but to avoid the red blocking &quot;wall&quot; and not to crash into it and _then_ avoid it.&#xD;&#xA;  &#xD;&#xA;How could I implement some path finding algorithm if I just have basically 3 points?  &#xD;&#xA;(And what would it make the things much more complicated, if you could place multiple obstacles?)  &#xD;&#xA;![Smooth path][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AfzHo.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/moftl.jpg" />
  <row Id="18391" PostHistoryTypeId="2" PostId="8950" RevisionGUID="fcf30e44-f1d2-4d95-8f1e-b4756f3110d3" CreationDate="2011-02-23T18:37:29.080" UserId="891" Text="**[Brood Wars Application Programming Interface (BWAPI)][1]**&#xD;&#xA;&#xD;&#xA;BWAPI is a dll injection type interface which natively is Server/Server design but also has extensions to support Client/Server architectures for additional language support.&#xD;&#xA;&#xD;&#xA;Extensions support Java, Python, C#, Php, etc.&#xD;&#xA;&#xD;&#xA;&gt; The Brood War Application Programming Interface (BWAPI) is a free and open source C++ framework for creating AI modules for Starcraft: Broodwar. Using BWAPI, programmers can retrieve information on players and individual units in Starcraft as well as issue a wide variety of commands to units, opening the doors for custom AIs with new micro and macro algorithms.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/bwapi/" />
  <row Id="18392" PostHistoryTypeId="2" PostId="8951" RevisionGUID="a4496b95-89c0-40e7-a067-4aadab7d70cf" CreationDate="2011-02-23T18:51:40.500" UserId="2787" Text="First I would make a State component and then I would create a state machine to handle the transitions. Make it generic enough that you can use this for your players and your AI. This will make sure the AI plays by the same rules and that you don't have to change your logic when you change how the player states work compared to the AI states.&#xD;&#xA;&#xD;&#xA;[Finite State Machine C++][1]&#xD;&#xA;&#xD;&#xA;The above has a concrete example of a state machine in c++ that can be used by players and AI alike.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6005/finite-state-machine-in-c/6010#6010" />
  <row Id="18393" PostHistoryTypeId="2" PostId="8952" RevisionGUID="8d87ad4e-94d6-40b5-b303-1888267be5fa" CreationDate="2011-02-23T19:19:30.210" UserId="891" Text="**[![MarioAI][2]][1]**&#xD;&#xA;&#xD;&#xA;The **[Mario AI][1]** Allows you to implement an AI Agent to control Mario.  Different levels of map details are available to allow a simple implementation or implementations with near engine level map details.&#xD;&#xA;&#xD;&#xA;Additionally a Level Generation API is provided for creating user generated levels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.marioai.org/&#xD;&#xA;  [2]: http://i.stack.imgur.com/ssfLh.png" />
  <row Id="18394" PostHistoryTypeId="5" PostId="8950" RevisionGUID="5c0938df-fafa-4a9b-84b2-eca69d99ce72" CreationDate="2011-02-23T19:21:30.630" UserId="891" Comment="added 54 characters in body" Text="**[![Brood Wars Application Programming Interface (BWAPI)][2]][1]**&#xD;&#xA;&#xD;&#xA;Brood Wars API is a dll injection type interface which natively is Server/Server design but also has extensions to support Client/Server architectures for additional language support.&#xD;&#xA;&#xD;&#xA;Extensions support Java, Python, C#, Php, etc.&#xD;&#xA;&#xD;&#xA;&gt; The Brood War Application Programming Interface (BWAPI) is a free and open source C++ framework for creating AI modules for Starcraft: Broodwar. Using BWAPI, programmers can retrieve information on players and individual units in Starcraft as well as issue a wide variety of commands to units, opening the doors for custom AIs with new micro and macro algorithms.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/bwapi/&#xD;&#xA;  [2]: http://i.stack.imgur.com/3Akqo.jpg" />
  <row Id="18395" PostHistoryTypeId="5" PostId="8952" RevisionGUID="89366838-0254-4d57-8076-df4bb499e87d" CreationDate="2011-02-23T19:27:47.890" UserId="891" Comment="added 60 characters in body" Text="**[![MarioAI][2]][1]**&#xD;&#xA;&#xD;&#xA;The **[Mario AI][1]** Allows you to implement an AI Agent to control Mario.  Different levels of map details are available to allow a simple implementation or implementations with near engine level map details.  The API is a server/server type implementation using Java.&#xD;&#xA;&#xD;&#xA;Additionally a Level Generation API is provided for creating user generated levels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.marioai.org/&#xD;&#xA;  [2]: http://i.stack.imgur.com/ssfLh.png" />
  <row Id="18399" PostHistoryTypeId="6" PostId="8899" RevisionGUID="e5276721-e13b-4e52-b148-e04f1f0e6cc7" CreationDate="2011-02-23T20:44:00.447" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="18400" PostHistoryTypeId="6" PostId="1512" RevisionGUID="f5d5a086-dd7f-414f-9906-1c4eef836b4a" CreationDate="2011-02-23T20:44:12.223" UserId="51" Comment="edited tags" Text="&lt;graphics&gt;&lt;shaders&gt;" />
  <row Id="18401" PostHistoryTypeId="6" PostId="8834" RevisionGUID="1ea04309-2cf0-44fa-bc05-6ead3c0c5323" CreationDate="2011-02-23T20:46:32.080" UserId="51" Comment="edited tags" Text="&lt;android&gt;" />
  <row Id="18402" PostHistoryTypeId="5" PostId="8127" RevisionGUID="5a252ff1-9137-49b1-a9e9-15d419511421" CreationDate="2011-02-23T22:07:32.633" UserId="5171" Comment="updated question; added 89 characters in body; added 23 characters in body" Text="I'm just trying to figure out the best approach for running a scolling background on an android device. The method I have so far.... its pretty laggy. I use threads, which I believe is not the best bet for android platforms&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    	public void run() {&#xD;&#xA;    		// Game Loop&#xD;&#xA;    		while(runningThread){&#xD;&#xA;    			//Scroll background down&#xD;&#xA;    			bgY += 1;&#xD;&#xA;    &#xD;&#xA;    			try {&#xD;&#xA;    				this.postInvalidate();&#xD;&#xA;    				t.sleep(10);&#xD;&#xA;    			} catch (Exception e) {&#xD;&#xA;    				// TODO Auto-generated catch block&#xD;&#xA;    				e.printStackTrace();&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;where postinvalidate in the onDraw function simply pushings the background image down&#xD;&#xA;&#xD;&#xA;    canvas.drawBitmap(backgroundImage, bgX, bgY, null);&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;-----------------&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;I've identified the problem. And it is the fact that my player updates the same rate as the background scrolls (making it look choppy). from top to bottom. This is because both get drawn in the same function. I'm not really sure how to tackle this and would be grateful for any help. i.e so that player movement is handled separately from the map scrolling&#xD;&#xA;&#xD;&#xA;Also how can I control the speed at which onDraw(canvas) get called?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;However, I have patched together a different run loop for anyone having the same problem. This is partially from the jetboy example on google.&#xD;&#xA;&#xD;&#xA;Below is my inner class in my surfaceview&#xD;&#xA;&#xD;&#xA;    class MapThread extends Thread{&#xD;&#xA;        private Map map;&#xD;&#xA;        private SurfaceHolder holder;&#xD;&#xA;        private boolean run = false;&#xD;&#xA;        &#xD;&#xA;        public MapThread(Map map, SurfaceHolder holder){&#xD;&#xA;            this.holder = holder;&#xD;&#xA;            this.map = map;&#xD;&#xA;            setRunning(true);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void setRunning(boolean run){&#xD;&#xA;            this.run = run;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        @Override&#xD;&#xA;        public void run(){&#xD;&#xA;            while(run){&#xD;&#xA;                try{&#xD;&#xA;                    Canvas c = null;&#xD;&#xA;&#xD;&#xA;                     try {&#xD;&#xA;                           c = holder.lockCanvas(null);&#xD;&#xA;                           synchronized (holder) {&#xD;&#xA;                                map.onDraw(c);&#xD;&#xA;                         }&#xD;&#xA;                     } finally {&#xD;&#xA;&#xD;&#xA;                         if (c != null) {&#xD;&#xA;                             holder.unlockCanvasAndPost(c);&#xD;&#xA;                         }&#xD;&#xA;                     }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="18403" PostHistoryTypeId="25" PostId="8945" RevisionGUID="ebe995c9-8ed6-4947-a52c-fadeefe4757a" CreationDate="2011-02-23T23:22:55.363" Comment="http://twitter.com/#!/StackGameDev/status/40552211926880256" />
  <row Id="18404" PostHistoryTypeId="2" PostId="8955" RevisionGUID="f74e0236-9bc0-4b85-87a1-a3246114fef4" CreationDate="2011-02-23T23:38:20.977" UserId="370" Text="I recently stumbled across [Gwen][1]. It's a GUI library written by the author of Gary's Mod.  It's MIT licensed as any good game library should be.  &#xD;&#xA;![Gwen logo][2]  &#xD;&#xA;The library has several things going for it.&#xD;&#xA;&#xD;&#xA;* Large widget set  &#xD;&#xA;Gwen has been under development for a few years and it shows.&#xD;&#xA;* Easy backend renderer customization  &#xD;&#xA;This is a big one.  The library comes with an OpenGL renderer rebuilt.  But making a renderer is simple enough that you'll likely want to build a renderer specific to your game's render system.&#xD;&#xA;* Less filling  &#xD;&#xA;Gwen seems to be on the lighter side of game GUI's.  No XML, no HTML renderer, just simple C++.  Gwen doesn't ship with image loaders either.  It expects the renderer backend to handle loading.  I like this feature as it keeps the library small and my game's render system already manages textures.&#xD;&#xA;* Skinable  &#xD;&#xA;Not the first thing in your milestones but eventually you'll need to customize your GUI to your game.&#xD;&#xA;* C++ skinning  &#xD;&#xA;I'm not a web developer and find the html css centric GUIs difficult.&#xD;&#xA;* Input injection  &#xD;&#xA;This is big for games.  It's always a pain to use GUI systems that want to own the input polling.&#xD;&#xA;* cross-platform  &#xD;&#xA;The library strives to be cross platform but they admit that you may find problems on less used platforms.&#xD;&#xA;* actively developed  &#xD;&#xA;Further, it's much smaller than CEGUI or MyGUI so hacking on it or submitting patches is much more practical.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gwen.facepunchstudios.com/&#xD;&#xA;  [2]: http://i.stack.imgur.com/z7rCA.png" />
  <row Id="18405" PostHistoryTypeId="5" PostId="6399" RevisionGUID="1b6f8061-6286-454c-b993-34ed1d07be56" CreationDate="2011-02-24T00:43:43.783" UserId="3929" Comment="MS officially supporting Kinect" Text="&gt; &quot;The non-commercial Kinect SDK for Windows will be released this spring, Microsoft said, and a commercial version is planned for a later date. The company said the SDKs will include support for audio, the Kinect API and direct control of the sensor.&quot;&#xD;&#xA;&#xD;&#xA;That being said, if you don't want to wait, there's a lot of work being done on several fronts with support for a number of languages (C++, C#, Java, JavaScript, ...) under Windows, Mac and Linux.&#xD;&#xA;&#xD;&#xA;For the freshest 0-day Kinect hacks, read [KinectHacks][1] and [FreeNect][2]&#xD;&#xA;&#xD;&#xA;If you want to get started writing code, have a look at these:&#xD;&#xA;&#xD;&#xA;- [Code Laboratories][3] released **CL NUI Platform drivers** for the Kinect, which also includes samples in several languages including C#. The latest 1.0.0.1210 seems to not work ATM, so maybe stick to the older version (1.0.0.1121).&#xD;&#xA;&#xD;&#xA;- I got started in minutes using the [KinectTouch C# project][6] together with CL NUI drivers.&#xD;&#xA;&#xD;&#xA;- For motion detection, check out the **haar detection** function inside **OpenCV** or the cross-platform .Net wrapper [Emgu CV][7]. Included are about 20 detection algorithms (XML files) for detecting e.g. hands, eyes, upper-torso, etc. A tool is also included to make your own. Google _haar detect_ for more info.&#xD;&#xA;&#xD;&#xA;- The [OpenKinect][4] project is in charge of **libfreenect** and has sample source code to get you started. AFAIK you will have to use [libusb-win32][5] to interface to the Kinect (which I was too lazy to get working in C#).&#xD;&#xA;&#xD;&#xA;- [OpenNI][8] just released an updated driver with Kinect support including sample source code for **skeleton tracking** using their **PrimeSense PSDK**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.KinectHacks.net&#xD;&#xA;  [2]: http://www.freenect.com&#xD;&#xA;  [3]: http://codelaboratories.com/&#xD;&#xA;  [4]: http://openkinect.org/wiki/Main_Page&#xD;&#xA;  [5]: https://sourceforge.net/apps/trac/libusb-win32/wiki&#xD;&#xA;  [6]: http://get.essexconsolerepairs.co.uk/kinecttouch/&#xD;&#xA;  [7]: http://www.emgu.com/wiki/index.php/Main_Page&#xD;&#xA;  [8]: http://openni.org/" />
  <row Id="18406" PostHistoryTypeId="2" PostId="8956" RevisionGUID="1b74a061-3843-4595-8d84-226b8b143640" CreationDate="2011-02-24T01:11:17.333" UserDisplayName="Sam Ellis" Text="I've just gotten into iOS development, and would love to develop some games, but need inspiration/support, all that stuff a great community gives you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone know of a community to get involved with?" />
  <row Id="18407" PostHistoryTypeId="1" PostId="8956" RevisionGUID="1b74a061-3843-4595-8d84-226b8b143640" CreationDate="2011-02-24T01:11:17.333" UserDisplayName="Sam Ellis" Text="What is an active Indie iOS development community?" />
  <row Id="18408" PostHistoryTypeId="3" PostId="8956" RevisionGUID="1b74a061-3843-4595-8d84-226b8b143640" CreationDate="2011-02-24T01:11:17.333" UserDisplayName="Sam Ellis" Text="&lt;ios&gt;" />
  <row Id="18409" PostHistoryTypeId="17" PostId="8956" RevisionGUID="890406b7-a027-42b3-83f6-d54f7fb2a3ab" CreationDate="2011-02-24T01:19:30.587" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/17173/what-is-an-active-indie-ios-development-community" Text="" />
  <row Id="18410" PostHistoryTypeId="2" PostId="8957" RevisionGUID="57f30773-4296-4ae1-a5d1-310afccff1c5" CreationDate="2011-02-24T01:25:06.920" UserId="5649" Text="I'd say check out the cocos2d forums. They are really active and supportive. There is also iDevGames." />
  <row Id="18411" PostHistoryTypeId="2" PostId="8958" RevisionGUID="70432594-d022-4aaf-800d-7ec882a0e74e" CreationDate="2011-02-24T01:38:27.393" UserId="5650" Text="WE are in final dev stages of our latest game and want to release it for the android market. &#xD;&#xA;What are the best sites to contact for reviews/advertising that specifically target the android users???&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18412" PostHistoryTypeId="1" PostId="8958" RevisionGUID="70432594-d022-4aaf-800d-7ec882a0e74e" CreationDate="2011-02-24T01:38:27.393" UserId="5650" Text="Marketing games for the android - what are the best sites to contact for reviews/advertising?" />
  <row Id="18413" PostHistoryTypeId="3" PostId="8958" RevisionGUID="70432594-d022-4aaf-800d-7ec882a0e74e" CreationDate="2011-02-24T01:38:27.393" UserId="5650" Text="&lt;android&gt;" />
  <row Id="18414" PostHistoryTypeId="2" PostId="8959" RevisionGUID="ae7ca1db-3da2-4611-aa92-f722513b46dd" CreationDate="2011-02-24T01:48:16.207" UserId="891" Text="**[Planet Wars / Galcon Clone AI][1]**&#xD;&#xA;&#xD;&#xA;Ran as a **Google AI Challenge**&#xD;&#xA;&#xD;&#xA;&gt;Planet Wars is a strategy game set in outer space. The objective is to take over all the planets on the map, or altenatively eliminate all of your opponents ships.&#xD;&#xA;&#xD;&#xA;Implemented as a **Server/Server** architecture you can implement your AI bot in C++/Java/Python/C#/Go/etc etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://ai-contest.com/" />
  <row Id="18415" PostHistoryTypeId="25" PostId="8958" RevisionGUID="75ae1c74-899a-497c-833e-a8598a615221" CreationDate="2011-02-24T02:22:55.140" Comment="http://twitter.com/#!/StackGameDev/status/40597509923405825" />
  <row Id="18416" PostHistoryTypeId="5" PostId="8959" RevisionGUID="c950519e-c01a-46b3-af27-0c44fc37585d" CreationDate="2011-02-24T02:28:26.080" UserId="891" Comment="added 568 characters in body" Text="**[Planet Wars / Galcon Clone AI][1]**&#xD;&#xA;&#xD;&#xA;Ran as a **Google AI Challenge**&#xD;&#xA;&#xD;&#xA;&gt;Planet Wars is a strategy game set in outer space. The objective is to take over all the planets on the map, or altenatively eliminate all of your opponents ships.&#xD;&#xA;&#xD;&#xA;&gt;Players start with 1-3 home planets and send off ships to conquer other planets around them. The numbers on each planet indicate how many ships it will take to conquer them. The numbers on a player's own planet indicate the amount of ships that their planet holds. Each planet a player owns produces ships for that player with more ships at a faster rate produced depending on the planet's size. Players can select what percentage of the ships to send from a planet and players can redirect ships in midair. The aim of the game is to defeat the other opponent(s).&#xD;&#xA;&#xD;&#xA;Implemented as a **Server/Server** architecture you can implement your AI bot in C++/Java/Python/C#/Go/etc etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://ai-contest.com/" />
  <row Id="18417" PostHistoryTypeId="2" PostId="8960" RevisionGUID="b29890f2-82ca-47fc-9ccf-de6f09f01906" CreationDate="2011-02-24T03:35:25.393" UserId="627" Text="There is another issue which you may want to give some thought to as well besides the physics of simulating a stellar system.&#xD;&#xA;&#xD;&#xA;Floating point precision will likely be an issue depending on how much of a &quot;simulation&quot; it is. When you think about it, the actual distances between a planet relative to the distance of an object orbiting around one of those planets is huge. Trying to simulate both a distant planet and an orbiting object in the same &quot;environment&quot; would likely break under the limitations of floating point accuracy.&#xD;&#xA;&#xD;&#xA;http://www.floatingorigin.com/mirror/oneil_01.htm" />
  <row Id="18418" PostHistoryTypeId="25" PostId="8956" RevisionGUID="0f7fb208-2625-40a5-ace2-0e503469a20d" CreationDate="2011-02-24T05:22:55.743" Comment="http://twitter.com/#!/StackGameDev/status/40642809325297664" />
  <row Id="18419" PostHistoryTypeId="5" PostId="8957" RevisionGUID="d00cf3f6-0f32-4b52-9936-c5684b381cf5" CreationDate="2011-02-24T06:24:59.823" UserId="20" Comment="added links" Text="I'd say check out the [cocos2d forums][1]. They are really active and supportive. There is also [iDevGames][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/forum/&#xD;&#xA;  [2]: http://www.idevgames.com/" />
  <row Id="18421" PostHistoryTypeId="25" PostId="8747" RevisionGUID="d8f3f79d-48ae-4b10-8520-faed11f9235a" CreationDate="2011-02-24T08:22:55.503" Comment="http://twitter.com/#!/StackGameDev/status/40688108022276096" />
  <row Id="18422" PostHistoryTypeId="2" PostId="8962" RevisionGUID="7c618752-bf3c-4182-b1dc-0b212fac618e" CreationDate="2011-02-24T09:17:49.570" UserId="3327" Text="Triplepoint PR helped Dave Whatley sell a few hundred thousand iOS copies of geoDefense. Chris Pruett, creator of Replica Island and Google employee talked about the importance of PR somewhere on his [blog][1] and also in this [video][2]. He has all kinds of great graphs and stuff too.&#xD;&#xA;&#xD;&#xA;Also, TalkAndroid and AndroidCentral seem to always be happy to do reviews of apps. I personally follow them both on Twitter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://replicaisland.blogspot.com/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=U4Bk5rmIpic" />
  <row Id="18423" PostHistoryTypeId="2" PostId="8963" RevisionGUID="46b55ebd-05a8-4405-af8d-41b5bbfb9309" CreationDate="2011-02-24T09:50:11.043" UserId="-1" Text="" />
  <row Id="18424" PostHistoryTypeId="2" PostId="8964" RevisionGUID="d602a4cd-d9f7-4a0d-998a-c71c673d4763" CreationDate="2011-02-24T09:50:11.043" UserId="-1" Text="" />
  <row Id="18425" PostHistoryTypeId="2" PostId="8965" RevisionGUID="5c8f893a-ee2a-4228-a16c-03e167f6e23f" CreationDate="2011-02-24T09:50:30.020" UserId="5655" Text="I'm currently writing a small game that is based on earning experiences when killing enemies. As usual, each level requires more experience gain than the level before, and on higher levels killing enemies awards more experience.&#xD;&#xA;&#xD;&#xA;But I have problem balancing this system. Are there any prebuild algorithms that help to caculate how the experience curve required for each level should look like? And how much experience an average enemy on a specific level should provide?" />
  <row Id="18426" PostHistoryTypeId="1" PostId="8965" RevisionGUID="5c8f893a-ee2a-4228-a16c-03e167f6e23f" CreationDate="2011-02-24T09:50:30.020" UserId="5655" Text="How to implement an experience system?" />
  <row Id="18427" PostHistoryTypeId="3" PostId="8965" RevisionGUID="5c8f893a-ee2a-4228-a16c-03e167f6e23f" CreationDate="2011-02-24T09:50:30.020" UserId="5655" Text="&lt;algorithm&gt;&lt;experience&gt;" />
  <row Id="18429" PostHistoryTypeId="2" PostId="8967" RevisionGUID="3c114732-7a9e-4ec1-b795-ba40f8f8e3f4" CreationDate="2011-02-24T10:16:41.073" UserId="1156" Text="You would want some kind of exponential curve, probably something like:&#xD;&#xA;&#xD;&#xA;    base_xp * (level_to_get ^ factor)&#xD;&#xA;&#xD;&#xA;base_xp is a constant that decides how much xp you need to go up a level.  &#xD;&#xA;level_to_get is the level you are aiming for; at level 1, this will be level 2.  &#xD;&#xA;factor is another constant that decides how much of an increase of xp you need for each level.&#xD;&#xA;&#xD;&#xA;Having a base_xp of 200 and a factor of, say, 2 gives something like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Whereas a base_xp of 50 and a factor of 2.6 gives:  &#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The second has a much lower starting xp rate, but you need more xp very quickly.&#xD;&#xA;&#xD;&#xA;As for monster xp, this is something you want to test. Try out various values. You want something that is not too high (you'll quickly become overpowered) yet not too low (players don't want to grind). Think about how many 'standard' enemies you would want the player to kill for level 10-&gt;11, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/gW3yU.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/21GNO.gif" />
  <row Id="18430" PostHistoryTypeId="2" PostId="8968" RevisionGUID="262f6f38-559f-4273-8070-54d661c2ebba" CreationDate="2011-02-24T10:17:22.393" UserId="89" Text="So I'm currently writing the engine for my videogame. I've almost integrated Tiled (I think) so I should have a map-creator here soon.&#xD;&#xA;&#xD;&#xA;My question is, how do I actually make the grid? I'm really confused here. If I create a large map with, say, 20x20 grids the size of 32x32 (screen size 640x640), then what do I do with it? &#xD;&#xA;&#xD;&#xA;Let's say I have the code for creating a window, and then place a player sprite that I can move with input, that's fine. If I use one map that's as big as the screen, then every pixel on the map is also a pixel on the game screen. The mapping is exact. &#xD;&#xA;&#xD;&#xA;Now what happens if I have a 2000x2000 map, for example? My character would have to keep moving and move the map around (or rather the camera focused on the player moves). Then I can no longer say that the screen maps exactly to the pixel position of the map. &#xD;&#xA;&#xD;&#xA;I tried making a Grid class that maps out the screen area to 32x32 tiles, but I'm not sure if that makes any sense. Once the map moves each tile would have to update its information, or something. I'm just really confused here.&#xD;&#xA;&#xD;&#xA;How do I actually make the tiles and a grid and map them to the data I get from tiled, or that I make myself? Are there any good examples of source code that I could look at?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18431" PostHistoryTypeId="1" PostId="8968" RevisionGUID="262f6f38-559f-4273-8070-54d661c2ebba" CreationDate="2011-02-24T10:17:22.393" UserId="89" Text="How to Create a Grid for a 2D Game?" />
  <row Id="18432" PostHistoryTypeId="3" PostId="8968" RevisionGUID="262f6f38-559f-4273-8070-54d661c2ebba" CreationDate="2011-02-24T10:17:22.393" UserId="89" Text="&lt;2d&gt;&lt;maps&gt;&lt;tiles&gt;" />
  <row Id="18433" PostHistoryTypeId="2" PostId="8969" RevisionGUID="e1fdc195-eeca-4ea1-b220-186a278b7c94" CreationDate="2011-02-24T10:21:21.747" UserId="1386" Text="There is no right answer for the question of how much experience an enemy should give, or how steep the experience curve should be. It may help to think about the playing time required to level up for each level and then base the experience required per level, and average experience rewarded per enemy on this.&#xD;&#xA;&#xD;&#xA;This article is a detailed breakdown of levelling mathematics in Lineage II.&#xD;&#xA;http://www.tstonramp.com/~mykel/lineage/" />
  <row Id="18434" PostHistoryTypeId="2" PostId="8970" RevisionGUID="96595ba4-82bf-424a-a92f-760883c6f315" CreationDate="2011-02-24T10:22:55.277" UserId="5516" Text="I'm considering using [micropather](http://www.grinninglizard.com/MicroPather/) to help me with pathfinding. I'm not using a discrete map : I'm working in 2d with sectors and portales. However, I'm just wondering what is the best way to compute costs with this library in this context.&#xD;&#xA;&#xD;&#xA;Just to be more clear about geometrical shapes I'm using : sectors are basically convex polygons, and portals are segments that lies on sector's edge.&#xD;&#xA;&#xD;&#xA;**Micropather** exposes a pure virtual _Graph_ class that you must inherate and overrides 3 functions. I understand how pathfinding works, so there's no problem in overriding those functions. Right now, my implementation give me results, i.e I'm able to find a path in my map, but I'm not sure I'm using an optimal solution.&#xD;&#xA;&#xD;&#xA;For the **AdjacentCost** method : I just take the distance between sector's centers as the cost. I think a better solution should be to use the portal between the two sectors, compute its center, and then the cost should be : **distance**_( sector A center, portal center )_ + **distance** _( sector B center, portal center )_. I'm pretty sure the approximation I'm using with just sector's center is enough for most cases, but maybe with thin and long sectors that are perpendicular, this approximation could mislead the A* algorithm.&#xD;&#xA;&#xD;&#xA;For the **LeastCostEstimate** method : I just take the midpoint of the two sectors.&#xD;&#xA;&#xD;&#xA;So, as you understand, I'm always working with sectors' centers, and it's working fine.  And I'm pretty sure there's a better way to work.&#xD;&#xA;&#xD;&#xA;Any suggestions or feedbacks? Thanks in advance!" />
  <row Id="18435" PostHistoryTypeId="1" PostId="8970" RevisionGUID="96595ba4-82bf-424a-a92f-760883c6f315" CreationDate="2011-02-24T10:22:55.277" UserId="5516" Text="Pathfinding with MicroPather : costs calculations with sectors and portals" />
  <row Id="18436" PostHistoryTypeId="3" PostId="8970" RevisionGUID="96595ba4-82bf-424a-a92f-760883c6f315" CreationDate="2011-02-24T10:22:55.277" UserId="5516" Text="&lt;c++&gt;&lt;ai&gt;&lt;path-finding&gt;&lt;feedback&gt;" />
  <row Id="18437" PostHistoryTypeId="25" PostId="8965" RevisionGUID="9d254189-94ab-42e3-bc6b-549d3e641932" CreationDate="2011-02-24T11:22:55.403" Comment="http://twitter.com/#!/StackGameDev/status/40733406480306177" />
  <row Id="18438" PostHistoryTypeId="2" PostId="8971" RevisionGUID="f7712803-b555-43c0-86b6-9cb59ebf26fb" CreationDate="2011-02-24T12:21:53.427" UserId="5660" Text="I found this very helpful: http://www.sdltutorials.com/sdl-maps/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18439" PostHistoryTypeId="6" PostId="8968" RevisionGUID="88eb7d5a-de43-4b2a-905d-45ee124ed868" CreationDate="2011-02-24T12:24:35.857" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;maps&gt;" />
  <row Id="18440" PostHistoryTypeId="9" PostId="8968" RevisionGUID="1d9b96f4-50a9-48d2-9050-c0a11124dda1" CreationDate="2011-02-24T12:24:50.570" UserId="1156" Comment="Rollback to [262f6f38-559f-4273-8070-54d661c2ebba]" Text="&lt;2d&gt;&lt;maps&gt;&lt;tiles&gt;" />
  <row Id="18441" PostHistoryTypeId="2" PostId="8972" RevisionGUID="36a40168-72ce-4e5d-86dd-1f0d4a019203" CreationDate="2011-02-24T12:26:55.027" UserId="1156" Text="It is not a specifically iOS forum, but try [Gamedev.net][1]. They are friendly and [very] active. (Unless you act like a moron)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.net/community" />
  <row Id="18442" PostHistoryTypeId="2" PostId="8973" RevisionGUID="245a5b22-3520-44bb-90e1-140322e8d1bc" CreationDate="2011-02-24T13:01:28.323" UserId="4200" Text="I'm not sure what language you're doing this in but this is how I generally do it in XNA:&#xD;&#xA;&#xD;&#xA;When your character has moved around and you want to move the camera then you change a Vector2 called something like `_screenPos` or something, which is a variable holding the current position of the screen.&#xD;&#xA;&#xD;&#xA;Then, whenever you want to check like a mouse click on a tile or whatever it is you want it to check pixels for then you would add `_screenPos` to your current mouse position to get the absolute position over the tiles and find which tile you're clicking in the grid." />
  <row Id="18443" PostHistoryTypeId="2" PostId="8974" RevisionGUID="0a172a4c-426e-488c-9b65-fa9fcb259e93" CreationDate="2011-02-24T13:18:04.227" UserId="4129" Text="I have a perspective projection.  When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection code with my world.&#xD;&#xA;&#xD;&#xA;I am using my own matrix and vector and ray classes and they all work as expected.&#xD;&#xA;&#xD;&#xA;However, when I try and convert the ray to world coordinates my far always ends up as 0,0,0 and so my ray goes from the mouse click to the centre of the object space, rather than through it.  (The x and y coordinates of near and far are identical, they differ only in the z coordinates where they are negatives of each other)&#xD;&#xA;&#xD;&#xA;	GLint vp[4];&#xD;&#xA;	glGetIntegerv(GL_VIEWPORT,vp);&#xD;&#xA;	matrix_t mv, p;&#xD;&#xA;	glGetFloatv(GL_MODELVIEW_MATRIX,mv.f);&#xD;&#xA;	glGetFloatv(GL_PROJECTION_MATRIX,p.f);&#xD;&#xA;	const matrix_t inv = (mv*p).inverse();&#xD;&#xA;	const float&#xD;&#xA;		unit_x = (2.0f*((float)(x-vp[0])/(vp[2]-vp[0])))-1.0f,&#xD;&#xA;		unit_y = 1.0f-(2.0f*((float)(y-vp[1])/(vp[3]-vp[1])));&#xD;&#xA;	const vec_t near(vec_t(unit_x,unit_y,-1)*inv);&#xD;&#xA;	const vec_t far(vec_t(unit_x,unit_y,1)*inv);&#xD;&#xA;	ray = ray_t(near,far-near);&#xD;&#xA;&#xD;&#xA;What have I got wrong?  (How do you unproject the mouse-point?)" />
  <row Id="18444" PostHistoryTypeId="1" PostId="8974" RevisionGUID="0a172a4c-426e-488c-9b65-fa9fcb259e93" CreationDate="2011-02-24T13:18:04.227" UserId="4129" Text="converting a mouse click to a ray" />
  <row Id="18445" PostHistoryTypeId="3" PostId="8974" RevisionGUID="0a172a4c-426e-488c-9b65-fa9fcb259e93" CreationDate="2011-02-24T13:18:04.227" UserId="4129" Text="&lt;opengl&gt;&lt;camera&gt;&lt;geometry&gt;" />
  <row Id="18446" PostHistoryTypeId="5" PostId="8964" RevisionGUID="a4b8389c-0d8b-41f0-974f-b9a5245af2a7" CreationDate="2011-02-24T13:54:47.267" UserId="5494" Comment="added 217 characters in body" Text="iOS (known as iPhone OS prior to June 2010) is Apple's mobile operating system. Originally developed for the iPhone, it has since been extended to support other Apple devices such as the iPod touch, iPad and Apple TV." />
  <row Id="18447" PostHistoryTypeId="24" PostId="8964" RevisionGUID="a4b8389c-0d8b-41f0-974f-b9a5245af2a7" CreationDate="2011-02-24T13:54:47.267" Comment="Proposed by 5494 approved by 189 edit id of 48" />
  <row Id="18448" PostHistoryTypeId="5" PostId="8963" RevisionGUID="ac84db7c-2a8e-4c23-b075-bb8df87d97f9" CreationDate="2011-02-24T13:54:58.200" UserId="5494" Comment="added 705 characters in body" Text="The user interface of iOS is based on the concept of direct manipulation, using multi-touch gestures. Interface control elements consist of sliders, switches, and buttons. The response to user input is immediate and provides a fluid interface. Interaction with the OS includes gestures such as swipe, tap, pinch, and reverse pinch, all of which have specific definitions within the context of the iOS operating system and its multitouch interface. Internal accelerometers are used by some applications to respond to shaking the device (one common result is the undo command) or rotating it in three dimensions (one common result is switching from portrait to landscape mode).&#xD;&#xA;&#xD;&#xA;[Extracted from Wikipedia]" />
  <row Id="18449" PostHistoryTypeId="24" PostId="8963" RevisionGUID="ac84db7c-2a8e-4c23-b075-bb8df87d97f9" CreationDate="2011-02-24T13:54:58.200" Comment="Proposed by 5494 approved by 189 edit id of 47" />
  <row Id="18454" PostHistoryTypeId="2" PostId="8975" RevisionGUID="437bcaca-6231-4435-a01f-67d90daa21da" CreationDate="2011-02-24T14:15:59.817" UserId="5661" Text="I've been looking at micropather as well.  If you are happy with the results, stick with it.  If not...&#xD;&#xA;&#xD;&#xA;Since you have control over the Graph, you can add arbitrary nodes.  Thus, rather than going through the calculation to add distance from sector center to portal center, just stick a node in the middle of your sectors, connected to each portal for that sector.  Micropather will take the distance from the portal to the middle of the sector in it's path finding algorithm.&#xD;&#xA;&#xD;&#xA;You could also go crazy and add edges between the portals bounding a sector.  (If I understand correctly, a sector is like a room, and portals are the doors out of the rooms).  Then the path finding would be able to &quot;cut corners&quot; if it didn't need to go to the center of the room.&#xD;&#xA;&#xD;&#xA;Should be easy to try these out." />
  <row Id="18455" PostHistoryTypeId="25" PostId="8974" RevisionGUID="1d6f5899-abef-4a05-b8aa-0e9f838443f9" CreationDate="2011-02-24T14:22:55.753" Comment="http://twitter.com/#!/StackGameDev/status/40778705240326144" />
  <row Id="18461" PostHistoryTypeId="2" PostId="8977" RevisionGUID="25dedbf1-a8d4-4522-9305-3f3166ecbee3" CreationDate="2011-02-24T15:39:54.113" UserId="2051" Text="What is a fragment in a fragment shader? Wikipedia says that:&#xD;&#xA;&#xD;&#xA;&gt; In general, a fragment can be thought of as the data needed to shade the pixel, plus the data needed to test whether the fragment survives to become a pixel (depth, alpha, stencil, scissor, window ID, etc.)&#xD;&#xA;&#xD;&#xA;So is it textures, vertices whatever.&#xD;&#xA;&#xD;&#xA;Sorry if I'm asking something rather trivial.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18462" PostHistoryTypeId="1" PostId="8977" RevisionGUID="25dedbf1-a8d4-4522-9305-3f3166ecbee3" CreationDate="2011-02-24T15:39:54.113" UserId="2051" Text="What is a fragment?" />
  <row Id="18463" PostHistoryTypeId="3" PostId="8977" RevisionGUID="25dedbf1-a8d4-4522-9305-3f3166ecbee3" CreationDate="2011-02-24T15:39:54.113" UserId="2051" Text="&lt;shaders&gt;" />
  <row Id="18464" PostHistoryTypeId="2" PostId="8978" RevisionGUID="83194cfa-b681-4b0e-93c4-6f7aef5cc7da" CreationDate="2011-02-24T15:45:03.090" UserId="4894" Text="A fragment is simply the data that is given from the contribution of the 3 vertices around the pixel you're shading. &#xD;&#xA;&#xD;&#xA;In the Vertex Shader, you output some data per vertex (color, texture coords, ...). &#xD;&#xA;Then in the Fragment Shader, for each pixel you get a weighted average of those values, that you then use to build the final color(s) of the pixel. " />
  <row Id="18465" PostHistoryTypeId="2" PostId="8979" RevisionGUID="8e0106fe-b37a-45d7-b16a-db42daf4364d" CreationDate="2011-02-24T15:55:22.610" UserId="1156" Text="In the same way a vertex shader acts on vertices, a [fragment (or pixel) shader][1] will just act on pixels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Pixel_shader" />
  <row Id="18469" PostHistoryTypeId="2" PostId="8980" RevisionGUID="4ad09975-5bc9-44d9-8818-873741bfe239" CreationDate="2011-02-24T16:17:22.740" UserId="4604" Text="So if you spend any time viewing / answering questions over on &lt;a href=&quot;http://www.stackoverflow.com&quot;&gt;Stack Overflow&lt;/a&gt; under the C++ tag, you will quickly notice that just about *everybody* uses the &lt;a href=&quot;http://www.boost.org/&quot;&gt;boost&lt;/a&gt; library; some would even say that if you aren't using it, you're not writing &quot;real' C++ (I disagree, but that's not the point).&#xD;&#xA;&#xD;&#xA;But then there is the game industry, which is well known for using C++ and *not* using boost.  I can't help but wonder why that is.  I don't care to use boost because I write games (now) as a hobby, and part of that hobby is implementing what I need when I am able to and using off-the-shelf libraries when I can't.  But that is just me.&#xD;&#xA;&#xD;&#xA;Why don't game developers, in general, use the boost library?  Is it performance or memory concerns?  Style?  Something Else?&#xD;&#xA;&#xD;&#xA;I was about to ask this on stack overflow, but I figured the question is better asked here." />
  <row Id="18470" PostHistoryTypeId="1" PostId="8980" RevisionGUID="4ad09975-5bc9-44d9-8818-873741bfe239" CreationDate="2011-02-24T16:17:22.740" UserId="4604" Text="Why don't C++ Game Developers use the boost library?" />
  <row Id="18471" PostHistoryTypeId="3" PostId="8980" RevisionGUID="4ad09975-5bc9-44d9-8818-873741bfe239" CreationDate="2011-02-24T16:17:22.740" UserId="4604" Text="&lt;c++&gt;&lt;boost&gt;" />
  <row Id="18472" PostHistoryTypeId="2" PostId="8981" RevisionGUID="a8176e28-33a7-4dab-bd06-f3cafa37acef" CreationDate="2011-02-24T16:20:23.610" UserId="5440" Text="In computer graphics, a fragment is the data necessary to generate a single pixel's worth of a drawing primitive in the frame buffer. This data may include, but is not limited to:&#xD;&#xA;raster position&#xD;&#xA;depth&#xD;&#xA;interpolated attributes (color, texture coordinates, etc.)&#xD;&#xA;stencil&#xD;&#xA;alpha&#xD;&#xA;window ID&#xD;&#xA;As a scene is drawn, drawing primitives are rasterized into fragments which are textured and combined with the existing frame buffer. How a fragment is combined with the data already in the frame buffer depends on various settings. In a typical case, a fragment may be discarded if it is farther away than the pixel that is already at that location (according to the depth buffer). If it is nearer than the existing pixel, it may replace what is already there, or, if alpha blending is in use, the pixel's color may be replaced with a mixture of the fragment's color and the pixel's existing color, as in the case of drawing a translucent object.&#xD;&#xA;In general, a fragment can be thought of as the data needed to shade the pixel, plus the data needed to test whether the fragment survives to become a pixel (depth, alpha, stencil, scissor, window ID, etc.)&#xD;&#xA;&#xD;&#xA;From wikipedia&#xD;&#xA;" />
  <row Id="18473" PostHistoryTypeId="2" PostId="8982" RevisionGUID="8d60b45c-a0e5-4f2e-b9bb-d072a8e0db6c" CreationDate="2011-02-24T16:23:08.410" UserId="138" Text="Who says they don't use boost? I've known one or two C++ engines that have used boost. I've never directly worked with them; but, that's mostly 'cause my experience lies in Unreal.&#xD;&#xA;&#xD;&#xA;As for reasons I've encountered for not using boost, and these are subjective:&#xD;&#xA;&#xD;&#xA; - We like rolling our own data structures specific to the platforms we're deploying to&#xD;&#xA; - We like limiting the amount of non-internally developed code we have to use in our projects, especially when that external code is reliant on other externally developed libraries.&#xD;&#xA;&#xD;&#xA;It basically boils down to: a general solution isn't always the &quot;right fit.&quot;&#xD;&#xA;&#xD;&#xA;I'm sure someone who's actually worked with the library could comment better." />
  <row Id="18474" PostHistoryTypeId="5" PostId="8980" RevisionGUID="56ac57d2-daf4-4240-8671-5cd7944002f8" CreationDate="2011-02-24T16:32:29.243" UserId="4604" Comment="added 265 characters in body; added 13 characters in body" Text="So if you spend any time viewing / answering questions over on &lt;a href=&quot;http://www.stackoverflow.com&quot;&gt;Stack Overflow&lt;/a&gt; under the C++ tag, you will quickly notice that just about *everybody* uses the &lt;a href=&quot;http://www.boost.org/&quot;&gt;boost&lt;/a&gt; library; some would even say that if you aren't using it, you're not writing &quot;real' C++ (I disagree, but that's not the point).&#xD;&#xA;&#xD;&#xA;But then there is the game industry, which is well known for using C++ and *not* using boost.  I can't help but wonder why that is.  I don't care to use boost because I write games (now) as a hobby, and part of that hobby is implementing what I need when I am able to and using off-the-shelf libraries when I can't.  But that is just me.&#xD;&#xA;&#xD;&#xA;Why don't game developers, in general, use the boost library?  Is it performance or memory concerns?  Style?  Something Else?&#xD;&#xA;&#xD;&#xA;I was about to ask this on stack overflow, but I figured the question is better asked here.&#xD;&#xA;&#xD;&#xA;EDIT :&#xD;&#xA;&#xD;&#xA;I realize I can't speak for all game programmers and I haven't seen all game projects, so I can't say game developers *never* use boost; this is simply my experience.  &#xD;&#xA;&#xD;&#xA;Allow me to edit my question to also ask, if you do use boost, why did you choose to use it?" />
  <row Id="18475" PostHistoryTypeId="2" PostId="8983" RevisionGUID="65f11db5-b512-47f2-8b7b-efecae3a7709" CreationDate="2011-02-24T16:37:32.350" UserId="1282" Text="Same thing is (was?) being said for the &quot;more standard&quot; STL. [This article][1] talks about EASTL, an in-house rewrite of (parts of) STL by Electronic Arts to accomodate the needs of game development which are rather different than those of &quot;more generic&quot; application development.&#xD;&#xA;&#xD;&#xA;So, maybe, someone somewhere is re-writing (parts of) *boost* to accomodate their needs in game development!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html" />
  <row Id="18476" PostHistoryTypeId="2" PostId="8984" RevisionGUID="f8c63af0-565d-43ed-ab27-a280edf619c5" CreationDate="2011-02-24T16:43:16.630" UserId="1430" Text="Some developers do, some developers don't (in games and elsewhere). It depends on what the needs/requirements of those developers are, and what existing technology they have to leverage. &#xD;&#xA;&#xD;&#xA;The SC++L is often given the same treatment, and people often wonder the same thing you are wondering about *it*, too. Most of the reasons are similar, for example:&#xD;&#xA;&#xD;&#xA;  * A developer may already have an in-house library of functionality that provides the same services that the SC++L or Boost provides. Such in-house libraries were often written long ago, when implementation support for the SC++L was weak and Boost was basically non-existent, so they more-or-less *had* to be written. In this scenario, it's usually not really worth transitioning away from the in-house functionality -- it would be a major porting effort that would destabilize a lot of code, and provide almost no benefit.&#xD;&#xA;&#xD;&#xA;  * A developer may be working on platforms where compiler support for the advanced C++ techniques leveraged by Boost are not well supported, such that the Boost code doesn't compile at all or performs quite poorly. This applies to the SC++L as well, although much less so these days.&#xD;&#xA;&#xD;&#xA;  * Boost and the SC++L are general purpose, and while that is fine and good for most applications, sometimes a developer has specific needs that can be better addressed by more specialized containers.&#xD;&#xA;&#xD;&#xA;I think the above are two reasonable reasons, although there are certainly others. You have to be careful though because many reasons for avoiding Boost/SC++L/whatever boil down to &quot;not invented here&quot; syndrome, which *can* be an indication that the reason isn't very well grounded in practical realities.&#xD;&#xA;&#xD;&#xA;Also remember that the needs of a large-ish studio are usually very different from the needs of an individual developer. For example, an individual developer probably has less legacy code floating around to maintain and so perhaps porting from a home-grown version of the Boost or SC++L functionality will not be as big of a time sink and will save that developer from having to maintain that code as extensively in the future -- thus invalidating my first bullet point.&#xD;&#xA;&#xD;&#xA;In the end, it is all about evaluating your requirements and time investiture against your desired goal and determining which option meets your needs the best. Developers who aren't using Boost/SC++L have usually done so and reached that conclusion -- perhaps you will too, and perhaps not." />
  <row Id="18477" PostHistoryTypeId="25" PostId="8980" RevisionGUID="993f7ba6-535c-4957-87d2-c14d0d73c597" CreationDate="2011-02-24T17:22:55.340" Comment="http://twitter.com/#!/StackGameDev/status/40824002733670401" />
  <row Id="18478" PostHistoryTypeId="2" PostId="8985" RevisionGUID="72e22195-48b5-4b77-95f3-93f2f395a724" CreationDate="2011-02-24T18:24:24.520" UserId="5667" Text="I Am selflearning Programming for videogames i have learned&#xD;&#xA;Basics(Variables Loops Branching etc)&#xD;&#xA;Oriented Object(classes,objects)&#xD;&#xA;Functions&#xD;&#xA;Dynamic Memory Allocation&#xD;&#xA;Operator Overloading &#xD;&#xA;Agregation&#xD;&#xA;Inheritance and Polymorphism&#xD;&#xA;Swallow Copy And Deep Copy&#xD;&#xA;Stl Libraries&#xD;&#xA;and i am learning I/O Files what is next? thanks for the help" />
  <row Id="18479" PostHistoryTypeId="1" PostId="8985" RevisionGUID="72e22195-48b5-4b77-95f3-93f2f395a724" CreationDate="2011-02-24T18:24:24.520" UserId="5667" Text="Whats Next to learn" />
  <row Id="18480" PostHistoryTypeId="3" PostId="8985" RevisionGUID="72e22195-48b5-4b77-95f3-93f2f395a724" CreationDate="2011-02-24T18:24:24.520" UserId="5667" Text="&lt;c++&gt;&lt;programming&gt;&lt;learning&gt;" />
  <row Id="18481" PostHistoryTypeId="2" PostId="8986" RevisionGUID="da70c9ec-397c-4ccd-9060-eb58d806d8fc" CreationDate="2011-02-24T18:37:34.750" UserDisplayName="user5634" Text="New reales: http://store.steampowered.com/app/92300/&#xD;&#xA;I haven't played Magicka to be honest, but i heard it was full of bugs when realesed.11 updates are realesed under 1 month.." />
  <row Id="18482" PostHistoryTypeId="2" PostId="8987" RevisionGUID="a26b07ca-587e-4391-900b-64280741c276" CreationDate="2011-02-24T18:40:56.033" UserId="4443" Text="You will want to start dealing with hardware soon. This takes the form of a few self contained areas that you can get into like Rendering technologies (Anything from Flash to Direct3D or OpenGL). User input from keyboards, mice and game controllers is another area of hardware to deal with. Audio programming. Networking.. All of these areas go together to make games along with basic programming knowledge mentioned above. I just recommend more than anything to take things one at a time.. People who are just starting out tend to try and go to recreate their favorite game, but games these days are very complicated pieces of software. Try and learn one thing at a time, user input, audio output, simple rendering or the like, but do them with very simple 'games' in mind if at all. Learning to program technologies and learning to program game logic and systems at the same time can become very cumbersome." />
  <row Id="18483" PostHistoryTypeId="2" PostId="8988" RevisionGUID="4fd34ca2-61fb-4ec9-918e-02787cc5022c" CreationDate="2011-02-24T19:39:32.130" UserId="3830" Text="Take a look at this web page -- it goes pretty deeply into orbital mechanics...&#xD;&#xA;&#xD;&#xA;http://www.braeunig.us/space/orbmech.htm&#xD;&#xA;&#xD;&#xA;Unfortunately it's pretty heavy on the math (which makes my brain hurt as well).&#xD;&#xA;&#xD;&#xA;There is a section on orbital maneuvers that might answer your question.  Keep in mind that an orbital maneuver for an item orbiting a planet is no different than an orbital maneuver for an item orbiting the sun, assuming of course that you're not interested in the gravitational attraction's influence on the spacecraft.&#xD;&#xA;&#xD;&#xA;I am wondering if you might be able to work out a simple rule based system for navigation.  Simply &quot;launch&quot; the vehicle on some vector, then on each pass of your event loop, have it look at it's current trajectory in relationship to the destination, and apply a correction.  &#xD;&#xA;&#xD;&#xA;When it gets tricky is where you have to take into account what you might call the motivations of the spaceship.  Does it have a finite fuel supply?  Is it better to get there faster, or to use less fuel?  Is the velocity you approach the target important?  I.e., can it just come flying in at a high speed or does it need to slow down to enter orbit?" />
  <row Id="18484" PostHistoryTypeId="2" PostId="8989" RevisionGUID="0aba2cd9-fe61-4c9d-8397-43b6e36d51c0" CreationDate="2011-02-24T20:18:22.630" UserDisplayName="user5673" Text="I think this discussion can be summarized as follows:&#xD;&#xA;&#xD;&#xA;mediocrely written application-specfic code &lt; well-written general purpose code &lt; well-written application-specific code&#xD;&#xA;&#xD;&#xA;Anyone whose home-grown solution would fall into category 3 surely knows the answer to the original question for their particular problem.  The STL falls into category 2.  So for someone who needs to ask the question, &quot;should _I_ use the STL&quot;, the answer is probably yes." />
  <row Id="18485" PostHistoryTypeId="25" PostId="8977" RevisionGUID="0b553ac5-23ec-4cbe-aca3-722e31724200" CreationDate="2011-02-24T20:22:55.477" Comment="http://twitter.com/#!/StackGameDev/status/40869301451894784" />
  <row Id="18486" PostHistoryTypeId="2" PostId="8990" RevisionGUID="8405544f-32fc-4900-aca3-9c194a4aa9a9" CreationDate="2011-02-24T20:38:42.690" UserId="3872" Text="I am modeling walking insects.  I implement them as cuboids and use forces (including friction and drag), to control motion.  However, the movement characteristics of this 'sliding box' physics don't match those due to a legged creature.&#xD;&#xA;&#xD;&#xA;For example, legged creatures near-instantly accelerate to their top speed; whereas applying a force to a box takes time to accelerate it.&#xD;&#xA;&#xD;&#xA;The applied force can be increased along with the counteracting drag, giving much quicker acceleration (via force) to a max speed (via drag).  However, this also means the force that creatures can exert when pushing on other objects is increased.&#xD;&#xA;&#xD;&#xA;Does anyone know of any techniques using a physics engine to cheaply model walking creatures?&#xD;&#xA;" />
  <row Id="18487" PostHistoryTypeId="1" PostId="8990" RevisionGUID="8405544f-32fc-4900-aca3-9c194a4aa9a9" CreationDate="2011-02-24T20:38:42.690" UserId="3872" Text="Approximating walking physics via simpler sliding physics" />
  <row Id="18488" PostHistoryTypeId="3" PostId="8990" RevisionGUID="8405544f-32fc-4900-aca3-9c194a4aa9a9" CreationDate="2011-02-24T20:38:42.690" UserId="3872" Text="&lt;3d&gt;&lt;engine&gt;&lt;programming&gt;&lt;physics&gt;&lt;math&gt;" />
  <row Id="18489" PostHistoryTypeId="2" PostId="8991" RevisionGUID="81d44943-0cd2-4042-8829-0ce9fdce4837" CreationDate="2011-02-24T20:51:21.920" UserId="962" Text="**High movement impulse, with high drag, will work perfectly.** For collisions, you **don't** use the force that is being applied for movement in the collision calculation, you use the resulting speed, mass, elasticity, etc.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18490" PostHistoryTypeId="2" PostId="8992" RevisionGUID="6ab5aa96-29e1-4621-8332-3cd59fac15e6" CreationDate="2011-02-24T21:59:28.597" UserId="5677" Text="Pretty new to the whole game development scene, but I have experience in other branches of programming. Anyway, I was wondering what methods are used to implement a skill structure. I imagine a skill in itself would a class. I'm using actionscript 3 for this project btw.&#xD;&#xA;&#xD;&#xA;    	public class Skill&#xD;&#xA;	{&#xD;&#xA;		public var power:int;&#xD;&#xA;		public var delay:int;&#xD;&#xA;		public var cooldown:int;&#xD;&#xA;		&#xD;&#xA;		public function Attack(user:Mob, target:Mob) &#xD;&#xA;		{&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Each skill would extend the Skill class and add it's own functionality.&#xD;&#xA;&#xD;&#xA;    	public class Tackle extends Skill&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		public function Tackle(user:Mob, target:Mob) &#xD;&#xA;		{&#xD;&#xA;			super(user, target);&#xD;&#xA;			executeAttack();&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function executeAttack():void &#xD;&#xA;		{&#xD;&#xA;			//multiply user.strength with power etc&#xD;&#xA;			//play attack animation&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This where I get stuck. How do I termine which mobs has which skills? And which skill will they later be able to retrieve (by reaching a certain level etc).&#xD;&#xA;How does the player actually execute the skill and how is it determine if it hits. It's all very new to me so I have no idea where to begin. &#xD;&#xA;Any links would also be appreciated. &#xD;&#xA;Thanks in advance.&#xD;&#xA;" />
  <row Id="18491" PostHistoryTypeId="1" PostId="8992" RevisionGUID="6ab5aa96-29e1-4621-8332-3cd59fac15e6" CreationDate="2011-02-24T21:59:28.597" UserId="5677" Text="Reusable skill class structure" />
  <row Id="18492" PostHistoryTypeId="3" PostId="8992" RevisionGUID="6ab5aa96-29e1-4621-8332-3cd59fac15e6" CreationDate="2011-02-24T21:59:28.597" UserId="5677" Text="&lt;actionscript-3&gt;&lt;design-patterns&gt;&lt;rpg&gt;" />
  <row Id="18493" PostHistoryTypeId="5" PostId="8975" RevisionGUID="f543e5b9-03cf-430d-8438-15b5b0daa962" CreationDate="2011-02-24T22:28:22.843" UserId="5661" Comment="Added example" Text="I've been looking at micropather as well.  If you are happy with the results, stick with it.  If not...&#xD;&#xA;&#xD;&#xA;Since you have control over the Graph, you can add arbitrary nodes.  Thus, rather than going through the calculation to add distance from sector center to portal center, just stick a node in the middle of your sectors, connected to each portal for that sector.  Micropather will take the distance from the portal to the middle of the sector in it's path finding algorithm.&#xD;&#xA;&#xD;&#xA;You could also go crazy and add edges between the portals bounding a sector.  (If I understand correctly, a sector is like a room, and portals are the doors out of the rooms).  Then the path finding would be able to &quot;cut corners&quot; if it didn't need to go to the center of the room.&#xD;&#xA;&#xD;&#xA;Should be easy to try these out.&#xD;&#xA;&#xD;&#xA;For example, if your sectors are square rooms with doors on all four sides, your graph might look like this:&#xD;&#xA;&#xD;&#xA;    N - N - N&#xD;&#xA;    |   |   |&#xD;&#xA;    N - N - N&#xD;&#xA;&#xD;&#xA;Where N are nodes/sectors, and the lines represent edges.  There is no explicit node for portals.&#xD;&#xA;&#xD;&#xA;If you include portals/doors in the graph you get for one room (with P for portal):&#xD;&#xA;&#xD;&#xA;         P&#xD;&#xA;         |&#xD;&#xA;    P -  N  - P&#xD;&#xA;         |&#xD;&#xA;         P&#xD;&#xA;&#xD;&#xA;If you put a bunch of these together:&#xD;&#xA;&#xD;&#xA;         P       P&#xD;&#xA;         | \   / |&#xD;&#xA;    P -  N - P - N  - P&#xD;&#xA;         |  /  \ |&#xD;&#xA;         P       P&#xD;&#xA;&#xD;&#xA;So you can go directly from the north door to the east door in the left hand room.&#xD;&#xA;" />
  <row Id="18494" PostHistoryTypeId="2" PostId="8993" RevisionGUID="26f335c4-2c2a-4629-b9c1-fc54d3ac7609" CreationDate="2011-02-24T22:56:44.760" UserId="3656" Text="There's a lot of different directions you could go with this. What kind of game are you making, and what does type Mob represent? It sounds like you need to separate your concerns more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; How do I termine which mobs has which skills?&#xD;&#xA;&#xD;&#xA;If each skill is its own class, and each skill extends the Skill class, then that leads me to think you should have a Vector.&lt;Skill&gt; field in the Mob class.&#xD;&#xA;&#xD;&#xA;Assuming you need to instantiate the skill for purposes of state management (like cooldowns and other things), then this Vector.&lt;Skill&gt; would contain objects which are-a Skill. To search for a specific skill, it could be useful to give Skill a property called Name which is overridden by subclasses of Skill. Then you can search through a mob's Vector.&lt;Skill&gt; looking at the name of each skill until you find the one you're looking for.&#xD;&#xA;&#xD;&#xA;A more robust solution would be to analyze your gameplay such that you don't even need to subclass Skill, and you could create entirely new skills by setting the properties of the skill class accordingly.&#xD;&#xA;&#xD;&#xA;&gt;And which skill will they later be able to retrieve (by reaching a certain level etc).&#xD;&#xA;&#xD;&#xA;This is a larger architecture question. &#xD;&#xA;&#xD;&#xA;&gt;How does the player actually execute the skill&#xD;&#xA;&#xD;&#xA;Presumably, the player is a Mob, and there's a keyboard mapping such that Attack gets called. Why do you have a separate function, executeAttack defined in the Tackle class?&#xD;&#xA;&#xD;&#xA;&gt;and how is it determine if it hits.&#xD;&#xA;&#xD;&#xA;This is something you need to decide. Read up on collision detection for checking if a point intersects a region on the screen, or find a D&amp;D rulebook and look at how the Difficult Class system works.&#xD;&#xA;&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;It sounds like you're biting off more than you can chew. Try breaking this game down into something simpler. Build individual aspects of it into smaller games, then as you learn more you will be able to assemble the bits and pieces you've learned on the way into something bigger." />
  <row Id="18495" PostHistoryTypeId="5" PostId="8985" RevisionGUID="ba88eba9-897c-409c-b4d6-676c27e77f40" CreationDate="2011-02-24T23:00:38.853" UserId="189" Comment="Cleaned it up quite a bit, while preserving the contents of the original text." Text="I am self-learning programming for video games. I have learned:&#xD;&#xA;&#xD;&#xA;  - Basics (variables, loops, branching, etc.)&#xD;&#xA;  - Object Oriented (classes, objects)&#xD;&#xA;  - Functions&#xD;&#xA;  - Dynamic Memory Allocation&#xD;&#xA;  - Operator Overloading&#xD;&#xA;  - Aggregation&#xD;&#xA;  - Inheritance and Polymorphism&#xD;&#xA;  - Swallow Copy And Deep Copy&#xD;&#xA;  - STL Libraries&#xD;&#xA;&#xD;&#xA;and I am learning I/O Files. What is next? Thanks for the help." />
  <row Id="18496" PostHistoryTypeId="4" PostId="8985" RevisionGUID="ba88eba9-897c-409c-b4d6-676c27e77f40" CreationDate="2011-02-24T23:00:38.853" UserId="189" Comment="Cleaned it up quite a bit, while preserving the contents of the original text." Text="What's next to learn?" />
  <row Id="18497" PostHistoryTypeId="25" PostId="8990" RevisionGUID="4ff93157-53a2-450c-b9a1-d720831d0f5c" CreationDate="2011-02-24T23:22:55.350" Comment="http://twitter.com/#!/StackGameDev/status/40914599293231104" />
  <row Id="18498" PostHistoryTypeId="2" PostId="8994" RevisionGUID="ebfcc774-e9e1-4bba-a94d-1f85829a1a7d" CreationDate="2011-02-25T00:02:41.260" UserId="5675" Text="i've implemented LuaPlus in my engine eventmanager successfully and really like the flexibility i gained.&#xD;&#xA;&#xD;&#xA;but i'm still not exactly where i want to by, because i can't link my c++ classes to a lua class.&#xD;&#xA;&#xD;&#xA;for example i have a Actor class in c++, and i want to be able to create the same class in lua and gain access to members with luaplus, but i can't figure how i can achieve that.&#xD;&#xA;&#xD;&#xA;Is this actually luaplus built in functionality, or do i have to write my own interface that exchanges data tables between c++ and lua?&#xD;&#xA;&#xD;&#xA;my current approach would be to fire an event in luascript that creates an new actor class in c++ code, and transfer its id and the data i need to back to lua. when i modify the data i send the modifications back to c++ code again, but i actually thought there's something in luaplus that exposes this functionality already." />
  <row Id="18499" PostHistoryTypeId="1" PostId="8994" RevisionGUID="ebfcc774-e9e1-4bba-a94d-1f85829a1a7d" CreationDate="2011-02-25T00:02:41.260" UserId="5675" Text="accessing c++ class members with luaplus" />
  <row Id="18500" PostHistoryTypeId="3" PostId="8994" RevisionGUID="ebfcc774-e9e1-4bba-a94d-1f85829a1a7d" CreationDate="2011-02-25T00:02:41.260" UserId="5675" Text="&lt;c++&gt;&lt;lua&gt;" />
  <row Id="18501" PostHistoryTypeId="5" PostId="8988" RevisionGUID="a334c6f8-a420-41be-8e55-ed0b057eab35" CreationDate="2011-02-25T00:33:17.083" UserId="3830" Comment="deleted 380 characters in body" Text="As Jason mentions above, take a look at this web page -- it goes pretty deeply into orbital mechanics...&#xD;&#xA;&#xD;&#xA;http://www.braeunig.us/space/orbmech.htm&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am wondering if you might be able to work out a simple rule based system for navigation.  Simply &quot;launch&quot; the vehicle on some vector, then on each pass of your event loop, have it look at it's current trajectory in relationship to the destination, and apply a correction.  &#xD;&#xA;&#xD;&#xA;When it gets tricky is where you have to take into account what you might call the motivations of the spaceship.  Does it have a finite fuel supply?  Is it better to get there faster, or to use less fuel?  Is the velocity you approach the target important?  I.e., can it just come flying in at a high speed or does it need to slow down to enter orbit?" />
  <row Id="18502" PostHistoryTypeId="2" PostId="8995" RevisionGUID="e4f9e0aa-403a-47c1-859d-5385f995a23c" CreationDate="2011-02-25T00:42:10.660" UserId="5684" Text="I completely do not understand how a video game can be coded.&#xD;&#xA;&#xD;&#xA;I'm a beginner programmer and only have experience writing console applications that do math and what not. I do not understand how these logical processes can make images move on the screen (video games). Obviously if i jumped into a game development book or something like that I would understand but I am currently still getting a grasp of the fundamentals of programming in general. Could anyone give a simple explanation , coding wise, on the jump between making a computer do simple math to making a computer produce amazing graphical programs such as video games? Maybe there are some intro videos someone can point me to? I " />
  <row Id="18503" PostHistoryTypeId="1" PostId="8995" RevisionGUID="e4f9e0aa-403a-47c1-859d-5385f995a23c" CreationDate="2011-02-25T00:42:10.660" UserId="5684" Text="What are the fundamentals of grame development?" />
  <row Id="18504" PostHistoryTypeId="3" PostId="8995" RevisionGUID="e4f9e0aa-403a-47c1-859d-5385f995a23c" CreationDate="2011-02-25T00:42:10.660" UserId="5684" Text="&lt;computer-science&gt;" />
  <row Id="18505" PostHistoryTypeId="2" PostId="8996" RevisionGUID="8fccd145-87fd-4a9e-9a72-f95d4d57f3aa" CreationDate="2011-02-25T00:54:30.597" UserId="4662" Text="What you need to understand is matrices. They underpin games. Once you understand the power of matrices, you will see how games reduce to simple mathematics.&#xD;&#xA;&#xD;&#xA;You take a vertex position in game space. You project it using a matrix on to the screen (find it's screen co-ordinates). You interpolate some pixels between it and it's neighbour vertices, and you're done. That is obviously an exceedingly large simplification, but the fundamentals of rasterization are not at all complex once you grok matrices." />
  <row Id="18506" PostHistoryTypeId="2" PostId="8997" RevisionGUID="e505a488-bd97-49df-abce-bc3dd8fe73fc" CreationDate="2011-02-25T01:15:23.180" UserId="3794" Text="I dont see any problems with your code. So i only have some suggestions: &#xD;&#xA;&#xD;&#xA;    unit_x = (2.0f*((float)(x-vp[0])/(vp[2]-vp[0])))-1.0f,&#xD;&#xA;    unit_y = (2.0f*((float)(y-vp[1])/(vp[3]-vp[1])))-1.0f;&#xD;&#xA;And trying to change matrix multiplacation to `(p*mv).inverse();`. Just because glMatrices are nutaraly transposed in memory. (this is one big maybe, sorry)&#xD;&#xA;&#xD;&#xA;**Another raycasting**  &#xD;&#xA;Unprojecting is not only way how to get ray from the pixel. This is my code for raycaster:&#xD;&#xA;&#xD;&#xA;    //works for right handed coordinates. So it is opengl friendly.&#xD;&#xA;    float mx = (float)((pixel.x - screenResolution.x * 0.5) * (1.0 / screenResolution.x) * camera.fovX * 0.5);&#xD;&#xA;    float my = (float)((pixel.y - screenResolution.y * 0.5) * (1.0 / screenResolution.x) * camera.fovX * 0.5);&#xD;&#xA;    float4 dx = cameraRight * mx;&#xD;&#xA;    float4 dy = cameraUp * my;&#xD;&#xA;    &#xD;&#xA;    float3 dir = normalize(cameraDir + (dx + dy).xyz * 2.0);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can get cameraRight, Up and Direction from view matrix (which is mostly useful in shader) http://gamedev.stackexchange.com/questions/8839/view-matrix-in-opengl/8845#8845&#xD;&#xA;&#xD;&#xA;**Color Picking**  &#xD;&#xA;Color picking is a technique where you render every clickable object with another (solid) color and then read the value of color at clicked point. It worked as GL_SELECTION in opengl. But it is deprecated now. But color picking is easy to code as 1 additional render pass. &#xD;&#xA;&#xD;&#xA;Use frame buffer and render to texture with same resolution as screen resolution, use simple shader which just return color in fragment shader. After &quot;color pass&quot;, read the value from a texture addressing with clickedPoint x and y. Find object with color which you read. Easy and quite fast.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18507" PostHistoryTypeId="2" PostId="8998" RevisionGUID="2695daf3-7027-40f9-8922-7a6965e5bdd4" CreationDate="2011-02-25T01:15:25.163" UserId="4443" Text="Take your console program that does math, and then when you put in a correct answer make it shoot off some confetti... It has become a game (Anyone besides me play Math Blaster as a kid? :)).&#xD;&#xA;&#xD;&#xA;As for how computers are made to create game environments, it can be a bit much to wrap your head around at times but it comes down to an application of human's understanding of the world around them. Games use the same math, physics and sciences to define themselves as we apply to the world around us to explain how it works.&#xD;&#xA;&#xD;&#xA;The Sim games are a good example of real to virtual. Long while ago I read an interview with the guy behind the Sim games and almost all of them, with out exception, were born from reading about a topic trying to explain the world around us, then harnessed with mathmatical formulas and put into a virtual environment to represent it. SimCity for example, was stemmed from trying to simulate the basics of economies.&#xD;&#xA;&#xD;&#xA;As for the specifics of how you make a 3D game environment, put physics in it, add in some audio, let a user start to interact with it.. Well that is what this site and many others are here for and would be impossible to sum up into a more specific answer.&#xD;&#xA;&#xD;&#xA;At the end of the day I describe video games as very fast limited data-set databases. They are highly focused on relational data and high speed data access.. I mean if you are rendering a frame every 60th of a second, you are processing potentially large amounts of data very fast based on the relationship of where the player is in the game to all the other data tracked by the game :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18508" PostHistoryTypeId="2" PostId="8999" RevisionGUID="6ace07a7-f722-4b6e-b242-7901b367019c" CreationDate="2011-02-25T01:17:18.700" UserId="2778" Text="Assuming you're an absolute beginner in programming, and in order to base my example on something you might know, while writing a console application which has a menu where you want the user to choose among the available option, what will you do first?&#xD;&#xA;&#xD;&#xA;If you thought about creating your menu, you got a point, but what if after the user pressed a key which is not part of the available option, &#xD;&#xA;&#xD;&#xA;1. will your application exit, or &#xD;&#xA;2. shall it continue until the user presses the &quot;Exit&quot; key?&#xD;&#xA;&#xD;&#xA;My bet would be #2, the application shall continue until the user expressly press the key to exit from the console application.&#xD;&#xA;&#xD;&#xA;A game is somehow the like! When do you want the game to exit? When the user chooses to, right? Hence, the action or the game menu has to last until the user wishes to exit. Then, you will have to create a loop that tells the program to continue until this very key to exit has been pressed.&#xD;&#xA;&#xD;&#xA;You've just been introduced to the Game Loop. A game is just another program that runs until it is expressly exited by the user.&#xD;&#xA;&#xD;&#xA;While in the game loop, when you're playing the game, the moves are images drawn on the screen at specific coordinates. When the user/player presses a directional key such as `[Left]`, then you make your image refresh its coordinates while decrementing its X coordinate so that you give the impression for a motion toward the left direction. You got to get these inputs in order to get what action the player wants his character/ship to do next. Then, the Game Loop continues to loop until you can get another desired action from the player, until the game is exited.&#xD;&#xA;&#xD;&#xA;Well, I'm afraid this answer begins to be fairly long enough, so allow me to point you to two other questions that might be of interest to you, I hope.&#xD;&#xA;&#xD;&#xA;1. [Where to start writing games, any tutorials or the like?][1]&#xD;&#xA;2. [Which is the suggested language for begining game development for a beginner?][2]&#xD;&#xA;3. [Moving my sprite in XNA using classes][3].&#xD;&#xA;&#xD;&#xA;This third link is not about how to begin to write games, but about how to make a sprite move on the screen. Since you also asked about how to make the graphics move on screen, I thought this could interest you.&#xD;&#xA;&#xD;&#xA;I hope this helps! =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7657/where-to-start-writing-games-any-tutorials-or-the-like&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8695/which-is-the-suggested-language-for-begining-game-development-for-a-beginner/8698#8698&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/8055/moving-my-sprite-in-xna-using-classes/8057#8057" />
  <row Id="18509" PostHistoryTypeId="4" PostId="8995" RevisionGUID="08cb9cb2-5a0a-4f06-a74f-130d55a3330b" CreationDate="2011-02-25T01:18:09.247" UserId="3830" Comment="title typo" Text="What are the fundamentals of game development?" />
  <row Id="18510" PostHistoryTypeId="24" PostId="8995" RevisionGUID="08cb9cb2-5a0a-4f06-a74f-130d55a3330b" CreationDate="2011-02-25T01:18:09.247" Comment="Proposed by 3830 approved by 1430 edit id of 50" />
  <row Id="18514" PostHistoryTypeId="25" PostId="8995" RevisionGUID="a727fa6c-ae43-4707-a9a1-35d4ff72f83b" CreationDate="2011-02-25T02:22:55.560" Comment="http://twitter.com/#!/StackGameDev/status/40959899101970432" />
  <row Id="18515" PostHistoryTypeId="5" PostId="8138" RevisionGUID="89e05247-2792-4034-af65-a2cbaca8972f" CreationDate="2011-02-25T02:25:43.077" UserId="5095" Comment="additional info" Text="You might want to take a look at the Android Examples, specifically JetBoy:&#xD;&#xA;&#xD;&#xA;http://developer.android.com/resources/samples/JetBoy/index.html&#xD;&#xA;&#xD;&#xA;I believe they have scrolling backgrounds, specifically Parallax Scrolling (which you can look up here: http://en.wikipedia.org/wiki/Parallax_scrolling)&#xD;&#xA;&#xD;&#xA;But if you just want one background scroll, you could get a pretty good feel for how to do it from this game example.&#xD;&#xA;&#xD;&#xA;(NOTE: I believe this game has scrolling backgrounds, correct me if I am wrong and I will edit this Answer)&#xD;&#xA;&#xD;&#xA;EDIT: &#xD;&#xA;&#xD;&#xA;You should definitely handle the drawing in a separate thread from the user input.  Also depending on what version of Android you are building for, you might want to sleep in the input handling method for a couple milliseconds.  You would want to do this because in earlier versions of Android, pressing the screen would result in a flood of inputs which would slow down the processing of an application.  This was more acute in games.  Check out the Replica Island code for more information on what I'm talking about.&#xD;&#xA;&#xD;&#xA;Specifically if you look at: http://code.google.com/p/replicaisland/source/browse/trunk/src/com/replica/replicaisland/AndouKun.java&#xD;&#xA;on line: 344&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public boolean onTouchEvent(MotionEvent event) {&#xD;&#xA;            if (!mGame.isPaused()) {&#xD;&#xA;                    mGame.onTouchEvent(event);&#xD;&#xA;                    &#xD;&#xA;                    final long time = System.currentTimeMillis();&#xD;&#xA;                    if (event.getAction() == MotionEvent.ACTION_MOVE &amp;&amp; time - mLastTouchTime &lt; 32) {&#xD;&#xA;                            // Sleep so that the main thread doesn't get flooded with UI events.&#xD;&#xA;                            try {&#xD;&#xA;                                Thread.sleep(32);&#xD;&#xA;                            } catch (InterruptedException e) {&#xD;&#xA;                                // No big deal if this sleep is interrupted.&#xD;&#xA;                            }&#xD;&#xA;                            mGame.getRenderer().waitDrawingComplete();&#xD;&#xA;                    }&#xD;&#xA;                    mLastTouchTime = time;&#xD;&#xA;            }&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Chris sleeps the input thread for 32 milliseconds which is approximately 30 sleeps per second (which matches 30 fps for the game).  This makes sense because if you are only calling your update method once per frame, you don't need to have the input thread produce any more than 1 input for a touch event." />
  <row Id="18516" PostHistoryTypeId="2" PostId="9001" RevisionGUID="73a605d7-3e2f-4346-88c8-38e087b1c828" CreationDate="2011-02-25T05:03:21.600" UserDisplayName="slcpfmmm" Text="While you're making console applications, you most likely use functions called print() or read() or write(). Instead of these, graphical games use other functions which can be as low level as set_pixel() to set the color of an individual pixel on the screen, to entire frameworks that allow you to draw three-dimensional models with lots of effects.&#xD;&#xA;&#xD;&#xA;But the main idea is the same as for a simple math console application. You get input from the user, act according to it to modify some variables, and then print (or draw) some output. Games and other interactive programs perform 30, 60 or more of these input-calculation-output cycles happen every second. Of course, every part can be as complex as you want, but it all usually comes down to input-calculation-output. So don't worry, you're on the right path.&#xD;&#xA;&#xD;&#xA;As for recommendations, I'd say you keep programming, as much as you can. If you're interested in focusing on game programming, and you only know console programming, try and make a small text based adventure or RPG. That way you'll practice a lot on how to manage your variables, use random numbers and organize your code.&#xD;&#xA;&#xD;&#xA;After you get some experience with that, take on to the basics of a graphics library. If you're doing procedural programming, I'd recommend OpenGL, while if you're doing object oriented programming, I'd recommend XNA.&#xD;&#xA;&#xD;&#xA;However, don't take too many things at once. It's very easy to get disappointed over learning a complicated tool, while you're learning how to manage a source tree, while you're learning how to iterate over an array, while you're learning how to get input and sound, all while you're designing your game.&#xD;&#xA;&#xD;&#xA;There's a long way ahead, but remember that the fun is actually walking through it.&#xD;&#xA;&#xD;&#xA;Keep up the good work!" />
  <row Id="18518" PostHistoryTypeId="2" PostId="9002" RevisionGUID="115d32e0-3f36-45fe-a6be-5e1b610106b8" CreationDate="2011-02-25T06:11:27.600" UserId="5687" Text="I'm currently working as a game programmer for a AAA-level developer and publisher - which falls into the 'nice problem to have' category, I know, except that I'm growing more and more disenchanted with the direction of both the company and the AAA portion of the industry as a whole.  I don't see any games on the studio's calendar for the next several years that I'm actually interested in working on; it looks like a continuing parade of sequels, license extensions and largely-derivative work.  Which isn't to say that there won't be interesting things to do on those projects; but more and more I find myself wanting to do something fundamentally different.  It seems like the market's never been better for smaller-scale projects, and I'd love to jump into that (and I've done small demos for Android and have started digging into iOS), but I obviously can't put anything out while I'm working for the company, and I'm concerned that I shouldn't even do substantial development in my spare time on anything I'd eventually like to release on my own.  At the same time, I'm leery of leaving the job I've got for hopefully-obvious reasons, especially without a specific plan in place.  Has anyone out there got experience with 'going indie' out of a mainstream job, and does anyone have specific suggestions as to what the best approach is and what I should specifically be thinking about or be careful of?" />
  <row Id="18519" PostHistoryTypeId="1" PostId="9002" RevisionGUID="115d32e0-3f36-45fe-a6be-5e1b610106b8" CreationDate="2011-02-25T06:11:27.600" UserId="5687" Text="How to go from mainstream to indie development? " />
  <row Id="18520" PostHistoryTypeId="3" PostId="9002" RevisionGUID="115d32e0-3f36-45fe-a6be-5e1b610106b8" CreationDate="2011-02-25T06:11:27.600" UserId="5687" Text="&lt;indie&gt;&lt;business&gt;" />
  <row Id="18521" PostHistoryTypeId="2" PostId="9003" RevisionGUID="67a5ccaf-48c9-4035-ae21-3a1b984c9715" CreationDate="2011-02-25T06:38:03.060" UserDisplayName="slcpfmmm" Text="A lot would agree with me that being good at programming is more about practical experience, than theoretical knowledge.&#xD;&#xA;&#xD;&#xA;If you're interested in making games, use what you've learned to make a game. If you don't know graphics libraries, you can make a text based adventure. You'll see that there are many more problems in programming than just learning a defined set of steps.&#xD;&#xA;&#xD;&#xA;Once you have a game, or while you're making it, ask yourself &quot;what would make this game better?&quot; and you will mathemagically find that the answer to that question is the same answer to your original question." />
  <row Id="18522" PostHistoryTypeId="2" PostId="9004" RevisionGUID="6c83fdd4-ad16-44d7-a553-d157112527b8" CreationDate="2011-02-25T06:44:34.190" UserId="5599" Text="An easy thing to try is to have an invisible dot that goes ahead of the black dot and executes the path in your first image. The black dot then follows the invisible dot at a small distance behind.&lt;br/&gt;&#xD;&#xA;I've seen this work with good results but of course might not suite your needs." />
  <row Id="18523" PostHistoryTypeId="2" PostId="9005" RevisionGUID="2ffb317a-4e8a-4c32-aae6-7afbda307105" CreationDate="2011-02-25T06:46:48.540" UserId="5599" Text="I'm looking for a video encoding library in C++ that I can use to record game footage.&#xD;&#xA;&#xD;&#xA;It can not be an external application like Fraps, it must be a library.&#xD;&#xA;&#xD;&#xA;Ideally the encoding can be done in real time without affecting game performance too much, although this is not a must have requirement.&#xD;&#xA;&#xD;&#xA;Another preference is that the video file being saved from the game is already compressed and ready to be used by most video players without any further processing. I realize that this might not be possible especially for real time encoding, so I would accept a trade off of having to process the file later for better compression and/or better file format.&#xD;&#xA;&#xD;&#xA;I'd like to hear about your experience integrating the library into a game if possible and any interesting trade offs you had to make.&#xD;&#xA;&#xD;&#xA;Some libraries support more that one file format or codec, so advice on the file format would also be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18524" PostHistoryTypeId="1" PostId="9005" RevisionGUID="2ffb317a-4e8a-4c32-aae6-7afbda307105" CreationDate="2011-02-25T06:46:48.540" UserId="5599" Text="Video Encoding library for C++ game" />
  <row Id="18525" PostHistoryTypeId="3" PostId="9005" RevisionGUID="2ffb317a-4e8a-4c32-aae6-7afbda307105" CreationDate="2011-02-25T06:46:48.540" UserId="5599" Text="&lt;c++&gt;&lt;libraries&gt;&lt;video&gt;" />
  <row Id="18526" PostHistoryTypeId="2" PostId="9006" RevisionGUID="eb84f963-cdc4-4058-9fc8-84bc63c08885" CreationDate="2011-02-25T08:17:47.437" UserId="4129" Text="It depends on the use-case.&#xD;&#xA;&#xD;&#xA;For recording games, I've seen that a general 'game record' mode where the game records the user input on a timeline so as to be able to recreate the game at any point to be really useful, and you can generate the video afterwards, or pass around these recorded games and others can watch using the game engine rather than a video player.&#xD;&#xA;&#xD;&#xA;Or maybe you mean in-game capture that immediately converts to a video live and stores only the video.  Assuming so:&#xD;&#xA;&#xD;&#xA;The classic library is ffmpeg's [libavcodec][1].  You can compile this so it as to avoid GPL codecs and such.&#xD;&#xA;&#xD;&#xA;Codecs like H.264 (libx264) are GPL - if that's ok with you, then fast presets and baseline profiles will work better than most.  H.263 or even MJPEG otherwise.&#xD;&#xA;&#xD;&#xA;But I normally stream y4m (its trivial to generate this format yourself without using the GPL lib) to an ffmpeg exe using my [popen3][2].  Why don't you want an external exe?  Its a tidy way of allowing it to run on separate cores and coping with the fact that it may take longer to compress your video than it the game time it represents.&#xD;&#xA;&#xD;&#xA;I have also streamed to MPEG and post-converted with FFMPEG.&#xD;&#xA;&#xD;&#xA;And finally I have made live FLV streams so games could be watched live.  This is surprisingly easy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ffmpeg.org/developer.html&#xD;&#xA;  [2]: http://sites.google.com/site/williamedwardscoder/popen3" />
  <row Id="18527" PostHistoryTypeId="25" PostId="9002" RevisionGUID="b4172237-38fc-4050-b915-3710ff702b79" CreationDate="2011-02-25T08:22:56.243" Comment="http://twitter.com/#!/StackGameDev/status/41050498471702528" />
  <row Id="18528" PostHistoryTypeId="2" PostId="9007" RevisionGUID="da001a5c-d09f-4e16-9e79-f4695c9158a1" CreationDate="2011-02-25T08:33:48.787" UserId="2137" Text="So I've been developing a game which is a bit.. blinky in terms of color and lightness contrasts. It's a game for the iPhone, so the screen's not gonna be so big..&#xD;&#xA;&#xD;&#xA;But I've heard about wipeout XL failing the epilepsy test.&#xD;&#xA;&#xD;&#xA;How does one even make sure that your game don't cause epileptic seizures on users in general?" />
  <row Id="18529" PostHistoryTypeId="1" PostId="9007" RevisionGUID="da001a5c-d09f-4e16-9e79-f4695c9158a1" CreationDate="2011-02-25T08:33:48.787" UserId="2137" Text="What viable way for an indie dev to test for epilepsy reactions on a game?" />
  <row Id="18530" PostHistoryTypeId="3" PostId="9007" RevisionGUID="da001a5c-d09f-4e16-9e79-f4695c9158a1" CreationDate="2011-02-25T08:33:48.787" UserId="2137" Text="&lt;graphics&gt;&lt;testing&gt;" />
  <row Id="18531" PostHistoryTypeId="2" PostId="9008" RevisionGUID="5a3315ca-bd4f-49d7-9f6a-99b843ea7d94" CreationDate="2011-02-25T09:05:37.170" UserId="5690" Text="You should learn OpenGL next, great way to render graphics." />
  <row Id="18532" PostHistoryTypeId="5" PostId="9006" RevisionGUID="b923bd7c-46ae-463d-aac8-52e1a591d6de" CreationDate="2011-02-25T09:10:30.537" UserId="4129" Comment="added 31 characters in body" Text="It depends on the use-case.&#xD;&#xA;&#xD;&#xA;For recording games, I've seen that a general 'game record' mode where the game records the user input on a timeline so as to be able to recreate the game at any point to be really useful, and you can generate the video afterwards, or pass around these recorded games and others can watch using the game engine rather than a video player.&#xD;&#xA;&#xD;&#xA;Or maybe you mean in-game capture that immediately converts to a video live and stores only the video.  Assuming so:&#xD;&#xA;&#xD;&#xA;The classic library is ffmpeg's [libavcodec][1].  You can compile this so it as to avoid GPL codecs and such.&#xD;&#xA;&#xD;&#xA;Codecs like H.264 (libx264) are GPL - if that's ok with you, then fast presets and baseline profiles will work better than most.  H.263 or even MJPEG otherwise.&#xD;&#xA;&#xD;&#xA;But I normally stream y4m (its trivial to generate this format yourself without using the GPL lib) to an ffmpeg exe using my [popen3][2].  Why don't you want an external exe?  Its a tidy way of allowing it to run on separate cores and coping with the fact that it may take longer to compress your video than it the game time it represents.&#xD;&#xA;&#xD;&#xA;I have also concatentated to MJPEG using libjpeg internally and post-converted with FFMPEG.&#xD;&#xA;&#xD;&#xA;And finally I have made live FLV streams so games could be watched live.  This is surprisingly easy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ffmpeg.org/developer.html&#xD;&#xA;  [2]: http://sites.google.com/site/williamedwardscoder/popen3" />
  <row Id="18533" PostHistoryTypeId="2" PostId="9009" RevisionGUID="eb7fee53-0e78-48f4-a39b-51da4d811baf" CreationDate="2011-02-25T09:53:30.163" UserId="778" Text="I've been adapting the [NeHe ogl/win32 code][1] to be more object orientated and I don't like the way some of the calls are structured.&#xD;&#xA;&#xD;&#xA;The example has the following pseudo structure:  &#xD;&#xA;&#xD;&#xA;&gt; Register window class  &#xD;&#xA;&gt; **Change display settings with a DEVMODE**  &#xD;&#xA;&gt; Adjust window rect  &#xD;&#xA;&gt; Create window  &#xD;&#xA;&gt; Get DC  &#xD;&#xA;&gt; **Find closest matching pixel format**  &#xD;&#xA;&gt; **Set the pixel format to closest match**  &#xD;&#xA;&gt; **Create rendering context**  &#xD;&#xA;&gt; **Make that context current**  &#xD;&#xA;&gt; Show the window  &#xD;&#xA;&gt; Set it to foreground  &#xD;&#xA;&gt; Set it to having focus  &#xD;&#xA;&gt; **Resize the GL scene**  &#xD;&#xA;&gt; **Init GL**&#xD;&#xA;&#xD;&#xA;The points in **bold** are what I want to move into a rendering class (the rest are what I see being pure win32 calls) but I'm not sure if I can call them *after* the win32 calls.  &#xD;&#xA;Essentially what I'm aiming for is to encapsulate the Win32 calls into a `Platform::Initiate()` type method and the rest into a sort of `Renderer::Initiate()` method.  &#xD;&#xA;  &#xD;&#xA;So me question essentially boils down to: **&quot;Would OpenGL allow these methods to be called in this order?&quot;**&#xD;&#xA;&#xD;&#xA;&gt; Register window class  &#xD;&#xA;&gt; Adjust window rect  &#xD;&#xA;&gt; Create window  &#xD;&#xA;&gt; Get DC  &#xD;&#xA;&gt; Show the window  &#xD;&#xA;&gt; Set it to foreground  &#xD;&#xA;&gt; Set it to having focus  &#xD;&#xA;&#xD;&#xA;&gt; **Change display settings with a DEVMODE**  &#xD;&#xA;&gt; **Find closest matching pixel format**  &#xD;&#xA;&gt; **Set the pixel format to closest match**  &#xD;&#xA;&gt; **Create rendering context**  &#xD;&#xA;&gt; **Make that context current**  &#xD;&#xA;&gt; **Resize the GL scene**  &#xD;&#xA;&gt; **Init GL**  &#xD;&#xA;&#xD;&#xA;(obviously passing through the appropriate window handles and device contexts.)&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;  [1]: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01" />
  <row Id="18534" PostHistoryTypeId="1" PostId="9009" RevisionGUID="eb7fee53-0e78-48f4-a39b-51da4d811baf" CreationDate="2011-02-25T09:53:30.163" UserId="778" Text="Can i change the order of these OpenGL / Win32 calls?" />
  <row Id="18535" PostHistoryTypeId="3" PostId="9009" RevisionGUID="eb7fee53-0e78-48f4-a39b-51da4d811baf" CreationDate="2011-02-25T09:53:30.163" UserId="778" Text="&lt;opengl&gt;&lt;windows&gt;" />
  <row Id="18536" PostHistoryTypeId="2" PostId="9010" RevisionGUID="d61e31d6-0f6d-4cb2-b3a4-84e6ae5598a2" CreationDate="2011-02-25T10:26:34.483" UserId="5694" Text="I'm new to game programming, although I have some years of experience in console/web development. My problem is not so much that I can't find what I'm looking for, it's just that I don't have the terminology to actually perform a successful search.&#xD;&#xA;&#xD;&#xA;I am looking for a physics engine which has great focus on sounds. In fact, I do not care at all for anything else. What I mean is better explained by an example:&#xD;&#xA;&#xD;&#xA;Suppose a 1st person type game. You are facing North, and someone somewhere around you throws a flute at you (nevermind the absurdity of the situation). The flute spins while it is on its way, making sounds through its holes. There is a wind of say, 5 knots South.&#xD;&#xA;&#xD;&#xA;I imagine a physics engine will be capable of calculating the trajectory of the flute, as well as the direction it takes after it hits. What I want is for the physics engine to calculate the precise sounds it will make, from any listener's perspective.&#xD;&#xA;&#xD;&#xA;Does any such engine exists? If there are several, which one would be best for the example above?" />
  <row Id="18537" PostHistoryTypeId="1" PostId="9010" RevisionGUID="d61e31d6-0f6d-4cb2-b3a4-84e6ae5598a2" CreationDate="2011-02-25T10:26:34.483" UserId="5694" Text="Physics-perfect (or somewhere near) 3d sound engine" />
  <row Id="18538" PostHistoryTypeId="3" PostId="9010" RevisionGUID="d61e31d6-0f6d-4cb2-b3a4-84e6ae5598a2" CreationDate="2011-02-25T10:26:34.483" UserId="5694" Text="&lt;3d&gt;&lt;engine&gt;&lt;sound&gt;" />
  <row Id="18539" PostHistoryTypeId="2" PostId="9011" RevisionGUID="28763cf0-53d3-48ed-92fc-17973d7185cd" CreationDate="2011-02-25T10:28:46.940" UserId="5119" Text="Write a Script in Schema language in Gimp.That will be easy to handle this." />
  <row Id="18540" PostHistoryTypeId="2" PostId="9012" RevisionGUID="47f3a154-e862-4219-aefc-f4db05a5026f" CreationDate="2011-02-25T10:40:09.880" UserId="1156" Text="I doubt you'll find a physics-audio engine. What is more likely is to use any physics engine you like (such as [Bullet][1]) and use [OpenAL][2] for sound. Calculate the position of the flute, and use that as the position of the Source.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bulletphysics.org/wordpress/&#xD;&#xA;  [2]: http://connect.creativelabs.com/openal/default.aspx" />
  <row Id="18541" PostHistoryTypeId="2" PostId="9013" RevisionGUID="ca23ff52-25db-419f-bc18-a65283053119" CreationDate="2011-02-25T10:46:46.130" UserId="5693" Text="I want to develop a flash game. It would draw a stick man, and edit his pose.&#xD;&#xA;&#xD;&#xA;I think what I need to learn are **bones animation** and p**hysical engine**.&#xD;&#xA;&#xD;&#xA;Anyone can introduce good resources to learn both?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18542" PostHistoryTypeId="1" PostId="9013" RevisionGUID="ca23ff52-25db-419f-bc18-a65283053119" CreationDate="2011-02-25T10:46:46.130" UserId="5693" Text="How to build a bones animation engine?" />
  <row Id="18543" PostHistoryTypeId="3" PostId="9013" RevisionGUID="ca23ff52-25db-419f-bc18-a65283053119" CreationDate="2011-02-25T10:46:46.130" UserId="5693" Text="&lt;flash&gt;&lt;2d-physics&gt;&lt;actionscript-3&gt;&lt;physics-engine&gt;" />
  <row Id="18544" PostHistoryTypeId="5" PostId="9013" RevisionGUID="8a383159-51d8-473b-bcf0-d80efffb8770" CreationDate="2011-02-25T10:49:06.140" UserId="3794" Comment="some problems with *" Text="I want to develop a flash game. It would draw a stick man, and edit his pose.&#xD;&#xA;&#xD;&#xA;I think what I need to learn are **bones animation** and **physical engine**.&#xD;&#xA;&#xD;&#xA;Anyone can introduce good resources to learn both?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18545" PostHistoryTypeId="2" PostId="9014" RevisionGUID="6351dece-bb36-49b8-be46-8c3d3926ea56" CreationDate="2011-02-25T11:21:16.027" UserId="5695" Text="You could try to use http://easywebsocket.org/, it's easy to implement and is a serverLess solution based on websocket :)" />
  <row Id="18546" PostHistoryTypeId="25" PostId="9007" RevisionGUID="66076abf-4999-4240-a258-2a661b0fb5ff" CreationDate="2011-02-25T11:22:56.300" Comment="http://twitter.com/#!/StackGameDev/status/41095797688897536" />
  <row Id="18547" PostHistoryTypeId="5" PostId="8932" RevisionGUID="a04f6f69-ceb0-4296-9a2e-9832ea639b42" CreationDate="2011-02-25T12:53:42.037" UserId="5508" Comment="added 835 characters in body" Text="I am starting to implement player and enemy AI in a game, but I am confused about how to best implement this in a component-based game architecture.&#xD;&#xA;&#xD;&#xA;Say I have a following player character that can be stationary, running and swinging a sword. A player can transit to the swing sword state from both the stationary and running state, but then the swing must be completed before the player can resume standing or running around. During the swing, the player cannot walk around.&#xD;&#xA;&#xD;&#xA;As I see it, I have two implementation approaches:&#xD;&#xA;&lt;ul&gt;&lt;li&gt;Create a single AI-component containing all player logic (either decoupled from the actual component or embedded as a PlayerAIComponent). I can easily how to enforce the state restrictions without creating coupling between individual components making up the player entity. However, the AI-component cannot be broken up. If I have, for example, an enemy that can only stand and walk around or only walks around and occasionally swing a sword, I have to create new AI-components.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Break the behavior up in components, each identifying a specific state. I then get a StandComponent, WalkComponent and SwingComponent. To enforce the transition rules, I have to couple each component. SwingComponent must disable StandComponent and WalkComponent for the duration of the swing. When I have an enemy that only stands around, swinging a sword occasionally, I have to make sure SwingComponent only disables WalkComponent if it is present. Although this allows for better mix-and-matching components, it can lead to a maintainability nightmare as each time a dependency is added, the existing components must be updated to play nicely with the new requirements the dependency places on the character.&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;The ideal situation would be that a designer can build new enemies/players by dragging components into a container, without having to touch a single line of engine or script code. Although I am not sure script coding can be avoided, I want to keep it as simple as possible.&#xD;&#xA;&#xD;&#xA;Summing it all up: Should I lob all AI logic into one component or break up each logic state into separate components to create entity variants more easily?&#xD;&#xA;&#xD;&#xA;**edit**: I suspect there is some confusion about what I meant with the first and second situation. I have tried to explain it in the diagram below.&#xD;&#xA;&#xD;&#xA;![Component diagram](http://img37.imageshack.us/img37/9072/explanationthumb.png &quot;Component Diagram&quot;)&#xD;&#xA;&#xD;&#xA;Note the relationship between the individual states and the entity. In the first situation, an AI component is pre-built before being put in the entity. A designer can only select from a distinct set of AIComponents made available by the programmer. The second situation has the different states on the same level as other components. A designer can now create an entity with unique AI without interference of a programmer.&#xD;&#xA;&#xD;&#xA;The question is, are these the only two options for structuring AI in an component-based entity and, if so, what would give the maximum flexibility?" />
  <row Id="18548" PostHistoryTypeId="5" PostId="8127" RevisionGUID="18e451d4-dd5b-4cc8-bd37-3e9f701ed078" CreationDate="2011-02-25T13:43:05.400" UserId="5171" Comment="deleted 210 characters in body" Text="I'm just trying to figure out the best approach for running a scolling background on an android device. The method I have so far.... its pretty laggy. I use threads, which I believe is not the best bet for android platforms&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    	public void run() {&#xD;&#xA;    		// Game Loop&#xD;&#xA;    		while(runningThread){&#xD;&#xA;    			//Scroll background down&#xD;&#xA;    			bgY += 1;&#xD;&#xA;    &#xD;&#xA;    			try {&#xD;&#xA;    				this.postInvalidate();&#xD;&#xA;    				t.sleep(10);&#xD;&#xA;    			} catch (Exception e) {&#xD;&#xA;    				// TODO Auto-generated catch block&#xD;&#xA;    				e.printStackTrace();&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;where postinvalidate in the onDraw function simply pushings the background image down&#xD;&#xA;&#xD;&#xA;    canvas.drawBitmap(backgroundImage, bgX, bgY, null);&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;-----------------&#xD;&#xA;**UPDATE &amp; SOLUTION**&#xD;&#xA;&#xD;&#xA;Thank you for everyone helping me. I came across this:&#xD;&#xA;&#xD;&#xA;post http://stackoverflow.com/questions/1430741/how-to-draw-lots-of-bitmaps-on-screen-in-an-android-game-without-slow-performance&#xD;&#xA;&#xD;&#xA;Helped my problem a lot. However, Seemed I was creating bitmaps in the onDraw every time is was caused, meaning that was doing 95% of the slowing down. oops :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below is my inner class in my surfaceview for reference purposes&#xD;&#xA;&#xD;&#xA;    class MapThread extends Thread{&#xD;&#xA;        private Map map;&#xD;&#xA;        private SurfaceHolder holder;&#xD;&#xA;        private boolean run = false;&#xD;&#xA;        &#xD;&#xA;        public MapThread(Map map, SurfaceHolder holder){&#xD;&#xA;            this.holder = holder;&#xD;&#xA;            this.map = map;&#xD;&#xA;            setRunning(true);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void setRunning(boolean run){&#xD;&#xA;            this.run = run;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        @Override&#xD;&#xA;        public void run(){&#xD;&#xA;            while(run){&#xD;&#xA;                try{&#xD;&#xA;                    Canvas c = null;&#xD;&#xA;&#xD;&#xA;                     try {&#xD;&#xA;                           c = holder.lockCanvas(null);&#xD;&#xA;                           synchronized (holder) {&#xD;&#xA;                                map.onDraw(c);&#xD;&#xA;                         }&#xD;&#xA;                     } finally {&#xD;&#xA;&#xD;&#xA;                         if (c != null) {&#xD;&#xA;                             holder.unlockCanvasAndPost(c);&#xD;&#xA;                         }&#xD;&#xA;                     }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="18549" PostHistoryTypeId="2" PostId="9015" RevisionGUID="266a847d-670c-42a8-8992-877e3226d835" CreationDate="2011-02-25T13:44:54.807" UserId="1829" Text="I wouldn't trust internet on that. I'd prefer asking a doctor, an ophthalmologist or a neurologist. The only thing I think I'm sure I know (and shouldn't be trusted), is that epileptic reactions are caused by blinking colors, meaning: very different colors (mainly meaning the hue component of the color) alternating at some kind of some particular threshold frequency; this may be linked to the fact the human eye cannot perceive animation beyond 60Hz.&#xD;&#xA;&#xD;&#xA;This is tightly linked to how the brain computes back and perceive images, but maybe and especially motion.&#xD;&#xA;&#xD;&#xA;To be sure you won't trigger crisis in anybody, document yourself or ask somebody who has a speciality: epilepsy is not well known because it's part or neurology.&#xD;&#xA;&#xD;&#xA;Try to make your game somewhat less blinky, blinking less rapidly or just fade; it will be more quiet for the eye/brain. Remember our brains aren't supposed to be used to artificial images and motion, so the more the thing you render compares to reality the more the better." />
  <row Id="18550" PostHistoryTypeId="2" PostId="9016" RevisionGUID="5bc963ed-957e-4ea8-8c8f-cc3b53a45a4e" CreationDate="2011-02-25T13:48:43.090" UserId="5679" Text="Currently I am using this: http://code.google.com/p/phpwebsocket/ as my socket server to test. It makes calls to the C sockets you are use to. May be of some service." />
  <row Id="18551" PostHistoryTypeId="25" PostId="9010" RevisionGUID="0e6341ec-f79e-4f43-a53c-c4381f6791b8" CreationDate="2011-02-25T14:22:56.310" Comment="http://twitter.com/#!/StackGameDev/status/41141096486535168" />
  <row Id="18552" PostHistoryTypeId="2" PostId="9017" RevisionGUID="5e535df9-f96d-48f7-8795-da1d50e88be0" CreationDate="2011-02-25T14:35:05.320" UserId="5584" Text="I have to watch the keyboard during rendering.&#xD;&#xA;So, is there a way to force glut to invoke the Keyboard callback immediately?" />
  <row Id="18553" PostHistoryTypeId="1" PostId="9017" RevisionGUID="5e535df9-f96d-48f7-8795-da1d50e88be0" CreationDate="2011-02-25T14:35:05.320" UserId="5584" Text="Manually invoke key callback in (free)glut" />
  <row Id="18554" PostHistoryTypeId="3" PostId="9017" RevisionGUID="5e535df9-f96d-48f7-8795-da1d50e88be0" CreationDate="2011-02-25T14:35:05.320" UserId="5584" Text="&lt;opengl&gt;" />
  <row Id="18555" PostHistoryTypeId="2" PostId="9018" RevisionGUID="36c59d2e-041c-4fd7-8650-cec282cd0e63" CreationDate="2011-02-25T14:35:37.560" UserId="4264" Text="I'm not a lawyer and all those standard disclaimers.&#xD;&#xA;&#xD;&#xA;First, talk to your boss. Maybe you can work on iphone apps and release them. You may have to ask for permission for everything you do put out, but it may still be possible. Self-development is a great selling point; you're investing your own free time into becoming a better employee.&#xD;&#xA;&#xD;&#xA;Eventually, if you really do want to go indie, just.. quit. Before you do, however, there's a few things you can (and in some cases, should) do.&#xD;&#xA;&#xD;&#xA;1. Save money. After you quit, your savings is what you'll be living on.&#xD;&#xA;&#xD;&#xA;2. Seek partnerships. Other like-minded people may be interested in starting a small studio for you.&#xD;&#xA;&#xD;&#xA;3. Investigate possibilities for angel investors.&#xD;&#xA;&#xD;&#xA;4. Possibly, work on something without releasing it. This is where we're far into the I'm-not-a-lawyer category. This depends on how aggressive your employer is and how cutthroat your contract is.&#xD;&#xA;&#xD;&#xA;You may also want to check out &lt;a href=&quot;http://jet.ro/2008/09/12/indie-startup-for-dummies/&quot;&gt;this seminar&lt;/a&gt; by a couple friends of mine. (&quot;Indie Startup for Dummies&quot;)&#xD;&#xA;" />
  <row Id="18556" PostHistoryTypeId="5" PostId="5003" RevisionGUID="cc3af5b5-483a-40a0-9f99-25a0ad7a83ef" CreationDate="2011-02-25T14:49:06.187" UserId="696" Comment="Fixed spelling and grammar." Text="I have a game concept which I wish to develop but don't have the funding to begin it.&#xD;&#xA;&#xD;&#xA;What should I do?" />
  <row Id="18557" PostHistoryTypeId="4" PostId="5003" RevisionGUID="cc3af5b5-483a-40a0-9f99-25a0ad7a83ef" CreationDate="2011-02-25T14:49:06.187" UserId="696" Comment="Fixed spelling and grammar." Text="How to develop a concept to receive funding?" />
  <row Id="18558" PostHistoryTypeId="24" PostId="5003" RevisionGUID="cc3af5b5-483a-40a0-9f99-25a0ad7a83ef" CreationDate="2011-02-25T14:49:06.187" Comment="Proposed by 696 approved by 51 edit id of 51" />
  <row Id="18559" PostHistoryTypeId="5" PostId="9002" RevisionGUID="4ccdff67-7848-4572-b716-876e4fcbe936" CreationDate="2011-02-25T14:49:16.063" UserId="696" Comment="Paragraphed up for readability" Text="I'm currently working as a game programmer for a AAA-level developer and publisher - which falls into the 'nice problem to have' category, I know, except that I'm growing more and more disenchanted with the direction of both the company and the AAA portion of the industry as a whole.&#xD;&#xA;&#xD;&#xA;I don't see any games on the studio's calendar for the next several years that I'm actually interested in working on; it looks like a continuing parade of sequels, license extensions and largely-derivative work.&#xD;&#xA;&#xD;&#xA;Which isn't to say that there won't be interesting things to do on those projects; but more and more I find myself wanting to do something fundamentally different.&#xD;&#xA;&#xD;&#xA;It seems like the market's never been better for smaller-scale projects, and I'd love to jump into that (and I've done small demos for Android and have started digging into iOS), but I obviously can't put anything out while I'm working for the company, and I'm concerned that I shouldn't even do substantial development in my spare time on anything I'd eventually like to release on my own.&#xD;&#xA;&#xD;&#xA;At the same time, I'm leery of leaving the job I've got for hopefully-obvious reasons, especially without a specific plan in place.&#xD;&#xA;&#xD;&#xA;Has anyone out there got experience with 'going indie' out of a mainstream job, and does anyone have specific suggestions as to what the best approach is and what I should specifically be thinking about or be careful of?" />
  <row Id="18560" PostHistoryTypeId="24" PostId="9002" RevisionGUID="4ccdff67-7848-4572-b716-876e4fcbe936" CreationDate="2011-02-25T14:49:16.063" Comment="Proposed by 696 approved by 51 edit id of 52" />
  <row Id="18561" PostHistoryTypeId="5" PostId="9009" RevisionGUID="15bf382f-ed7b-41c1-929d-a8ba61f84f71" CreationDate="2011-02-25T14:59:42.100" UserId="778" Comment="edited body" Text="I've been adapting the [NeHe ogl/win32 code][1] to be more object orientated and I don't like the way some of the calls are structured.&#xD;&#xA;&#xD;&#xA;The example has the following pseudo structure:  &#xD;&#xA;&#xD;&#xA;&gt; Register window class  &#xD;&#xA;&gt; **Change display settings with a DEVMODE**  &#xD;&#xA;&gt; Adjust window rect  &#xD;&#xA;&gt; Create window  &#xD;&#xA;&gt; Get DC  &#xD;&#xA;&gt; **Find closest matching pixel format**  &#xD;&#xA;&gt; **Set the pixel format to closest match**  &#xD;&#xA;&gt; **Create rendering context**  &#xD;&#xA;&gt; **Make that context current**  &#xD;&#xA;&gt; Show the window  &#xD;&#xA;&gt; Set it to foreground  &#xD;&#xA;&gt; Set it to having focus  &#xD;&#xA;&gt; **Resize the GL scene**  &#xD;&#xA;&gt; **Init GL**&#xD;&#xA;&#xD;&#xA;The points in **bold** are what I want to move into a rendering class (the rest are what I see being pure win32 calls) but I'm not sure if I can call them *after* the win32 calls.  &#xD;&#xA;Essentially what I'm aiming for is to encapsulate the Win32 calls into a `Platform::Initiate()` type method and the rest into a sort of `Renderer::Initiate()` method.  &#xD;&#xA;  &#xD;&#xA;So my question essentially boils down to: **&quot;Would OpenGL allow these methods to be called in this order?&quot;**&#xD;&#xA;&#xD;&#xA;&gt; Register window class  &#xD;&#xA;&gt; Adjust window rect  &#xD;&#xA;&gt; Create window  &#xD;&#xA;&gt; Get DC  &#xD;&#xA;&gt; Show the window  &#xD;&#xA;&gt; Set it to foreground  &#xD;&#xA;&gt; Set it to having focus  &#xD;&#xA;&#xD;&#xA;&gt; **Change display settings with a DEVMODE**  &#xD;&#xA;&gt; **Find closest matching pixel format**  &#xD;&#xA;&gt; **Set the pixel format to closest match**  &#xD;&#xA;&gt; **Create rendering context**  &#xD;&#xA;&gt; **Make that context current**  &#xD;&#xA;&gt; **Resize the GL scene**  &#xD;&#xA;&gt; **Init GL**  &#xD;&#xA;&#xD;&#xA;(obviously passing through the appropriate window handles and device contexts.)&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;  [1]: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01" />
  <row Id="18562" PostHistoryTypeId="2" PostId="9019" RevisionGUID="1195e34b-8e23-4299-ab6d-77a6fb7af465" CreationDate="2011-02-25T15:01:56.073" UserId="138" Text="I recently quit a triple-A development house out of frustration; but, instead of going indie, I found a smaller developer that does a broader array of projects. So, instead of working on one FPS for three years, they do several facebook/social/casual games a year.&#xD;&#xA;&#xD;&#xA;While that sounds like &quot;more of the same problem&quot;, it's actually turned out in my favor. I just managed to get one of my projects greenlit by the executive team. Meaning, we're building something I'm totally in love with!&#xD;&#xA;&#xD;&#xA;Now, that's not really answering your question; but, it could prove another avenue for thought. Finding a good developer to work for is just like trying to discover your life long partner. You have to find a company you love... or found one.&#xD;&#xA;&#xD;&#xA;As for going the indie route:&#xD;&#xA;&#xD;&#xA; 1. Plan for it -- you're going to need to have money to live off while you're not working; or, you're going to have to do freelance work. Build those funds and relationships now. Set a date and execute it. Possibly even tell your company that you're unhappy and looking to go indie, maybe you can pitch working two or three days a week to them.&#xD;&#xA; 2. Get yourself up and running -- I know Jari said to get a team; but, honestly? If you can go it yourself, you're far more likely to finish the project. Pull in as few people as you can and, preferably, find individuals that are also fully invested (not working at a large developer most of the time).&#xD;&#xA; 3. Plan your project -- don't just jump ship and say, &quot;Great! Now I can build something!&quot; You've done Android development and iOS development. Awesome. You know what you're going to have to code. What's your spec? What's your deadline? What product do you want to build? What platforms are you deploying to? Have a plan for success. Do you want to pitch a demo of your game to a publisher? Do you want to compete in an indie competition?&#xD;&#xA;&#xD;&#xA;You have a lot of soul searching to do; but, the end result could be spectacular. The way I always looked at it was this: the worst case is that you've just boosted your resume.&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="18563" PostHistoryTypeId="5" PostId="9018" RevisionGUID="334bf9b0-6535-4da5-8cf0-15351c6fb735" CreationDate="2011-02-25T15:11:17.323" UserId="4264" Comment="added 362 characters in body" Text="I'm not a lawyer and all those standard disclaimers.&#xD;&#xA;&#xD;&#xA;First, talk to your boss. Maybe you can work on iphone apps and release them. You may have to ask for permission for everything you do put out, but it may still be possible. Self-development is a great selling point; you're investing your own free time into becoming a better employee.&#xD;&#xA;&#xD;&#xA;Eventually, if you really do want to go indie, just.. quit. Before you do, however, there's a few things you can (and in some cases, should) do.&#xD;&#xA;&#xD;&#xA;1. Save money. After you quit, your savings is what you'll be living on.&#xD;&#xA;&#xD;&#xA;2. Seek partnerships. Other like-minded people may be interested in starting a small studio for you. Even if you're not going to pay salaries for them, knowing people you can trust to do projects (like outsourced art, music, whatever) is a great asset. If you manage to be successful, you may consider hiring them; or maybe they'll hire you. =)&#xD;&#xA;&#xD;&#xA;3. Investigate possibilities for angel investors. Be warned though, taking other people's money always means giving up something, like your freedom. Savings help here.&#xD;&#xA;&#xD;&#xA;4. Possibly, work on something without releasing it. This is where we're far into the I'm-not-a-lawyer category. This depends on how aggressive your employer is and how cutthroat your contract is.&#xD;&#xA;&#xD;&#xA;You may also want to check out &lt;a href=&quot;http://jet.ro/2008/09/12/indie-startup-for-dummies/&quot;&gt;this seminar&lt;/a&gt; by a couple friends of mine. (&quot;Indie Startup for Dummies&quot;)&#xD;&#xA;" />
  <row Id="18568" PostHistoryTypeId="2" PostId="9021" RevisionGUID="c08dc314-f1d5-4356-936a-71ed31ede5f2" CreationDate="2011-02-25T15:40:39.973" UserId="5701" Text="In our case (not games), we have a great reason for not using boost (nor std): We have a lot of code that dates back a decade. According to the seniors, std and boost were either incomplete, full of bugs or just too slow for the high-performance things we require. So some base classes were implemented, using the same concepts (such as iterators) and often optimized for our algorithms. Nowadays, all three libraries (ours, std and boost) are very similar. &#xD;&#xA;&#xD;&#xA;But do we want to port over all our code? Not really. I assume many other companies face the same dilemma. Either rewrite a lot of tested and working code or not use std/boost." />
  <row Id="18569" PostHistoryTypeId="2" PostId="9022" RevisionGUID="b9f4fc53-15ed-44c3-93d9-5677067fdef4" CreationDate="2011-02-25T16:28:41.097" UserId="1430" Text="Off I don't see any reason why you couldn't, unless some of the operations depend on values produced by earlier operations. An easy way to &quot;try it and see&quot; is to simply re-order the calls where there are now, without actually implementing any of the extra abstraction layers you want. That should let you know if anything is trivially wrong that I'm forgetting.&#xD;&#xA;&#xD;&#xA;If there is a more subtle problem, it is likely to be in an interaction between your new proposed setup and your other code that you have not shown, so we couldn't really diagnose it reliably now anyhow. You can always debug later -- don't be afraid of making the wrong decision now. That's why we refactor.&#xD;&#xA;&#xD;&#xA;I wouldn't necessarily show the window before it is prepared for rendering, though.&#xD;&#xA;&#xD;&#xA;You also might consider not separating the Win32 and GL calls, but just encapsulating them together. They are quite tightly tied together on a practical level -- especially if you are not *currently* developing your code against multiple OSs, it can neatly tie up your higher-level graphics API." />
  <row Id="18570" PostHistoryTypeId="5" PostId="9009" RevisionGUID="94338cd7-3539-407b-ac71-5925029d9f44" CreationDate="2011-02-25T16:29:53.450" UserId="1430" Comment="edited body; edited title" Text="I've been adapting the [NeHe OpenGL/Win32 code][1] to be more object-oriented and I don't like the way some of the calls are structured.&#xD;&#xA;&#xD;&#xA;The example has the following pseudo-structure:  &#xD;&#xA;&#xD;&#xA;&gt; Register window class  &#xD;&#xA;&gt; **Change display settings with a DEVMODE**  &#xD;&#xA;&gt; Adjust window rect  &#xD;&#xA;&gt; Create window  &#xD;&#xA;&gt; Get DC  &#xD;&#xA;&gt; **Find closest matching pixel format**  &#xD;&#xA;&gt; **Set the pixel format to closest match**  &#xD;&#xA;&gt; **Create rendering context**  &#xD;&#xA;&gt; **Make that context current**  &#xD;&#xA;&gt; Show the window  &#xD;&#xA;&gt; Set it to foreground  &#xD;&#xA;&gt; Set it to having focus  &#xD;&#xA;&gt; **Resize the GL scene**  &#xD;&#xA;&gt; **Init GL**&#xD;&#xA;&#xD;&#xA;The points in **bold** are what I want to move into a rendering class (the rest are what I see being pure Win32 calls) but I'm not sure if I can call them *after* the Win32 calls.  &#xD;&#xA;Essentially what I'm aiming for is to encapsulate the Win32 calls into a `Platform::Initiate()` type method and the rest into a sort of `Renderer::Initiate()` method.  &#xD;&#xA;  &#xD;&#xA;So my question essentially boils down to: **&quot;Would OpenGL allow these methods to be called in this order?&quot;**&#xD;&#xA;&#xD;&#xA;&gt; Register window class  &#xD;&#xA;&gt; Adjust window rect  &#xD;&#xA;&gt; Create window  &#xD;&#xA;&gt; Get DC  &#xD;&#xA;&gt; Show the window  &#xD;&#xA;&gt; Set it to foreground  &#xD;&#xA;&gt; Set it to having focus  &#xD;&#xA;&#xD;&#xA;&gt; **Change display settings with a DEVMODE**  &#xD;&#xA;&gt; **Find closest matching pixel format**  &#xD;&#xA;&gt; **Set the pixel format to closest match**  &#xD;&#xA;&gt; **Create rendering context**  &#xD;&#xA;&gt; **Make that context current**  &#xD;&#xA;&gt; **Resize the GL scene**  &#xD;&#xA;&gt; **Init GL**  &#xD;&#xA;&#xD;&#xA;(obviously passing through the appropriate window handles and device contexts)&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;  [1]: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01" />
  <row Id="18571" PostHistoryTypeId="4" PostId="9009" RevisionGUID="94338cd7-3539-407b-ac71-5925029d9f44" CreationDate="2011-02-25T16:29:53.450" UserId="1430" Comment="edited body; edited title" Text="Can I change the order of these OpenGL / Win32 calls?" />
  <row Id="18572" PostHistoryTypeId="2" PostId="9023" RevisionGUID="79a77c4b-32d3-42e6-9214-5780f6384a2f" CreationDate="2011-02-25T16:31:40.247" UserId="1119" Text="Look, I know this is a rant but i am not just splitting hairs. I feel most programmers don't really put this together. A language itself has nothing to do with run speed/performance. It's the compiler/framework. You could better argue gcc against cl (microsoft compiler pre 2010) or msbuild (current c++ compiler for 2010). Every release these compilers get better so you also have to compare them to previous versions of themselves. I am very impressed with .net and it does perform well but even if it was slightly better performing i don't see it taking over, one reason: portability.&#xD;&#xA;&#xD;&#xA;AAA games want to be on Windows, Linux, Mac, XBox, PS3, Nintendo, etc." />
  <row Id="18573" PostHistoryTypeId="2" PostId="9024" RevisionGUID="92e324d8-a849-43a7-9132-b28006e9e30c" CreationDate="2011-02-25T17:07:46.733" UserId="5703" Text="I'm having a really hard time deciding which way to go on this.  I'm about to start developing a game and I haven't been able to find many good comparisons between these approaches.  I don't have many requirements for the game yet, but here is what I do know.&#xD;&#xA;&#xD;&#xA;* needs to work on iPhone&#xD;&#xA;* I don't have much money ($400 for Unity for iPhone is probably too much. I'm in college, so I can get Corona for $99 and I can probably afford that.)&#xD;&#xA;* Graphics will be 2D&#xD;&#xA;* Physics is not needed&#xD;&#xA;* Ability to use particles would be nice&#xD;&#xA;* Game Center support would be nice (Corona is planning to support it soon)&#xD;&#xA;* It would be nice to be able to support Android as well if it isn't much effort.&#xD;&#xA;&#xD;&#xA;I have done my own research, so I know basic things about them.  I know Corona uses Lua and Cocos2D uses Objective C.  I know that Corona allows deployment to iPhone and Android, but how easy is it?&#xD;&#xA;&#xD;&#xA;Cocos2D is free, but so many people talk about how easy it is to use Corona, but I don't like being restricted to features Corona supports or the price tag.  I feel so torn here." />
  <row Id="18574" PostHistoryTypeId="1" PostId="9024" RevisionGUID="92e324d8-a849-43a7-9132-b28006e9e30c" CreationDate="2011-02-25T17:07:46.733" UserId="5703" Text="Comparison between Cocos2d and Corona" />
  <row Id="18575" PostHistoryTypeId="3" PostId="9024" RevisionGUID="92e324d8-a849-43a7-9132-b28006e9e30c" CreationDate="2011-02-25T17:07:46.733" UserId="5703" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="18576" PostHistoryTypeId="5" PostId="9024" RevisionGUID="5db597e8-31ff-49e9-8b63-1f923a0e4223" CreationDate="2011-02-25T17:17:21.813" UserId="5703" Comment="added 8 characters in body" Text="I'm having a really hard time deciding which way to go on this.  I'm about to start developing a game and I haven't been able to find many good comparisons between these approaches.  I don't have many requirements for the game yet, but here is what I do know.&#xD;&#xA;&#xD;&#xA;* needs to work on iPhone&#xD;&#xA;* I don't have much money ($400 for Unity for iPhone is probably too much. I'm in college, so I can get Corona for $99 and I can probably afford that.)&#xD;&#xA;* Graphics will be 2D&#xD;&#xA;* Physics support is not needed&#xD;&#xA;* Ability to use particles would be nice&#xD;&#xA;* Game Center support would be nice (Corona is planning to support it soon)&#xD;&#xA;* It would be nice to be able to support Android as well if it isn't much effort.&#xD;&#xA;&#xD;&#xA;I have done my own research, so I know basic things about them.  I know Corona uses Lua and Cocos2D uses Objective C.  I know that Corona allows deployment to iPhone and Android, but how easy is it?&#xD;&#xA;&#xD;&#xA;Cocos2D is free, but so many people talk about how easy it is to use Corona, but I don't like being restricted to features Corona supports or the price tag.  I feel so torn here." />
  <row Id="18577" PostHistoryTypeId="2" PostId="9025" RevisionGUID="7840f421-4333-4865-9a79-48640065c941" CreationDate="2011-02-25T17:20:46.550" UserId="1430" Text="I'm unclear as to when exactly you think &quot;immediately&quot; is in this context, or what you're actually trying to do by &quot;watching the keyboard during rendering.&quot;&#xD;&#xA;&#xD;&#xA;But given that you must have known what function is actually being assigned to the keyboard callback (since you had to pass to the `glutKeyboardWhatever` function), couldn't you just directly invoke the function you passed yourself when you want to?&#xD;&#xA;&#xD;&#xA;No flavor of GLUT that I'm aware of has the ability to manually invoke the callback indirectly." />
  <row Id="18578" PostHistoryTypeId="6" PostId="9017" RevisionGUID="aa56eeb8-e496-4dcf-b5b8-672ef37236d9" CreationDate="2011-02-25T17:21:08.327" UserId="1430" Comment="edited tags" Text="&lt;opengl&gt;&lt;glut&gt;" />
  <row Id="18579" PostHistoryTypeId="2" PostId="9026" RevisionGUID="d109e05b-2892-4459-bbcf-d06bdbd7cd71" CreationDate="2011-02-25T17:22:52.787" UserId="2229" Text="Could I knindly ask for correct examples of **OpenGL ES 2.0 Vertex and Fragment shader** for displaying 2D textured sprites **with transparency**?&#xD;&#xA;&#xD;&#xA;I have fairly simple shaders that display textured polygon pairs but transparency is not applied despite:&#xD;&#xA;&#xD;&#xA; - texture map contains transparency information&#xD;&#xA; - Blending is enabled: glEnable(GL_BLEND); glEnable(GL_DEPTH_TEST); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;&#xD;&#xA;*My Vertex Shader:*&#xD;&#xA;&#xD;&#xA;    uniform mat4 uOrthoProjection;&#xD;&#xA;    uniform vec3 Translation;&#xD;&#xA;    &#xD;&#xA;    attribute vec4 Position;&#xD;&#xA;    attribute vec2 TextureCoord;&#xD;&#xA;    &#xD;&#xA;    varying vec2 TextureCoordOut;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_Position = uOrthoProjection * (Position + vec4(Translation, 0));&#xD;&#xA;        TextureCoordOut = TextureCoord;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;*My Fragment Shader:*&#xD;&#xA;&#xD;&#xA;    varying mediump vec2 TextureCoordOut;&#xD;&#xA;    uniform sampler2D Sampler;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_FragColor = texture2D(Sampler, TextureCoordOut);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="18580" PostHistoryTypeId="1" PostId="9026" RevisionGUID="d109e05b-2892-4459-bbcf-d06bdbd7cd71" CreationDate="2011-02-25T17:22:52.787" UserId="2229" Text="OpenGL ES 2.0: Vertex and Fragment Shader for 2D with Transparency" />
  <row Id="18581" PostHistoryTypeId="3" PostId="9026" RevisionGUID="d109e05b-2892-4459-bbcf-d06bdbd7cd71" CreationDate="2011-02-25T17:22:52.787" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;graphics-programming&gt;" />
  <row Id="18582" PostHistoryTypeId="25" PostId="9005" RevisionGUID="5b9c06f7-08c5-4ffd-bf45-11e93883f298" CreationDate="2011-02-25T17:22:57.710" Comment="http://twitter.com/#!/StackGameDev/status/41186397868146688" />
  <row Id="18583" PostHistoryTypeId="2" PostId="9027" RevisionGUID="112d57e7-0300-497e-9da1-04ae1c8e9a22" CreationDate="2011-02-25T17:42:10.647" UserId="5704" Text="You *cannot* make sure that your game will not trigger seizures, ever, since the thresholds differ by orders of magnitudes between individuals and beetween the same person on different days and under influence of a hundred other factors which you cannot know about (lighting conditions, distance to the display, sleep deprivation, stress level, background noise, alcohol intake, etc).&#xD;&#xA;&#xD;&#xA;If you can, that is if it doesn't disturb the game's look and feel, you may try as jokoon said, reduce the flashing a bit. If that would &quot;destroy&quot; the game's look and feel, scratch the idea.&#xD;&#xA;&#xD;&#xA;Regardless, if you see a reasonable possibility that your game might trigger epileptic fits, you should add a (loosely worded) warning somewhere on the download page or on the package.&lt;br&gt;Something like &quot;Note: This game contains vivid graphics. Video games (in general) may cause...&quot;. This will give people who have a known seizure disorder a valuable hint, and that is as much as you can do -- for them, and for yourself.&lt;br&gt;&#xD;&#xA;You cannot prevent people from having seizures, but you can prevent them from filing a lawsuit against you claiming that you didn't warn them.&#xD;&#xA;&#xD;&#xA;I would however avoid saying &quot;*This* video game may cause...&quot; because that would be&lt;br&gt;a) massively negative marketing and&lt;br&gt;b) possibly the opposite effect of what a disclaimer should achieve (one could argue: &quot;Hey wait, you *knew* this game was designed in a dangerous way and you still sold it?&quot;)" />
  <row Id="18584" PostHistoryTypeId="2" PostId="9028" RevisionGUID="02a72529-4f22-4e0b-81b4-95422402a050" CreationDate="2011-02-25T18:21:56.953" UserId="721" Text="Are you sure that your texture has an alpha channel. Add this line in your fragment shader:&#xD;&#xA;&#xD;&#xA;    gl_FragColor = vec4(texture2D(Sampler, TextureCoordOut).xyz, 0.5);&#xD;&#xA;&#xD;&#xA;You should see some half transparency texture." />
  <row Id="18585" PostHistoryTypeId="2" PostId="9029" RevisionGUID="58131739-6f4a-4380-840c-d71e0a25cbcc" CreationDate="2011-02-25T19:19:14.860" UserId="3175" Text="Do you even need to solve this?  Hohmann transfer orbits are *SLOW*--1/2 the orbital period of the outer body and they also require a proper alignment of the planets to work.&#xD;&#xA;&#xD;&#xA;Do you really want to limit players to such motions?  And if you're doing that you are obviously using some sort of jump drive to get to the other star systems--why can't you use that within a system?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have any sort of continuous thrust system of non-trivial power you don't need to do such fancy orbital calculations.  Instead:&#xD;&#xA;&#xD;&#xA;1)  Figure the velocity change needed between the bodies.  This is both orbital velocity and the energy needed to move to the new orbit.&#xD;&#xA;&#xD;&#xA;2)  Figure the distance between A and B at their current positions.&#xD;&#xA;&#xD;&#xA;3)  Adjust this for the burn needed in part #1.  If you're going outward figure an extra burn at the start for the velocity change, if you're going in the extra burn is at the end.  Subtract this distance from the distance between the planets, add the time needed to the total time.&#xD;&#xA;&#xD;&#xA;4)  Take the remaining distance, divide in half and figure how long it will take your rocket to do this.  Double the result.&#xD;&#xA;&#xD;&#xA;5)  Add the times involved, figure where the target planet will be after that burn is over.  If it's moved too much use the new location of the planet as your target, redo the calculations.  This will rapidly converge.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Yes, this isn't up to NASA-spec but it's plenty close enough for game use." />
  <row Id="18586" PostHistoryTypeId="2" PostId="9030" RevisionGUID="33120ba1-8ca9-4a60-8aa1-c6bb1d47e6a3" CreationDate="2011-02-25T19:21:48.143" UserId="20" Text="I have never used Corona, but it looks nice. Especially the easy deployment to different platforms makes it interesting if you plan to release for Android and iOS.&#xD;&#xA;&#xD;&#xA;The problem with an engine like Corona or Unity is, that you're mostly limited to what they include in their API. Apparently corona doesn't come with a particle engine (you'll need a license for an addon).&#xD;&#xA;&#xD;&#xA;The big plus of Cocos2D is, that it's native code and you can mix and match it with other libraries. If you find some good C++ library that would be useful for your game you can add that rather easily (as long as it compiles for iOS). On the other hand you're stuck with iOS then. Porting to Android would most likely require a rewrite of your code in Java.&#xD;&#xA;&#xD;&#xA;Programming in Objective-C is most likely to be more difficult than using a scripting language, unless you have some previous experience with C or C++.&#xD;&#xA;&#xD;&#xA;I'm sorry that I probably didn't solve your problem, maybe I made it even worse.&#xD;&#xA;My advice to you is to make a checklist of your most important features and add a *weight* (or preference) to each point. Then add up the weights to choose which engine to use." />
  <row Id="18587" PostHistoryTypeId="5" PostId="9028" RevisionGUID="91d69a05-dd1d-40c1-9a1d-e50052c09ba4" CreationDate="2011-02-25T19:34:25.750" UserId="721" Comment="added 97 characters in body; deleted 93 characters in body; added 175 characters in body" Text="Are you sure that your texture has an alpha channel. Add this line in your fragment shader:&#xD;&#xA;&#xD;&#xA;    gl_FragColor = vec4(texture2D(Sampler, TextureCoordOut).xyz, 0.5);&#xD;&#xA;&#xD;&#xA;You should see some half transparency texture.&#xD;&#xA;&#xD;&#xA;Ps: Your result color will be darker, because it is a mix with color in backbuffer*0.5 and the gl_FragColor*0.5. Blending is done after the fragment in the OGLES 2.0 pipeline." />
  <row Id="18588" PostHistoryTypeId="5" PostId="9028" RevisionGUID="3d335dde-7dab-4a1e-a8b1-10707afc33d7" CreationDate="2011-02-25T19:45:28.253" UserId="721" Comment="added 295 characters in body" Text="Are you sure that your texture has an alpha channel. Add this line in your fragment shader:&#xD;&#xA;&#xD;&#xA;    gl_FragColor = vec4(texture2D(Sampler, TextureCoordOut).xyz, 0.5);&#xD;&#xA;&#xD;&#xA;You should see some half transparency texture.&#xD;&#xA;&#xD;&#xA;Ps: Your result color will be darker, because it is a mix with color in backbuffer*0.5 and the gl_FragColor*0.5. Blending is done after the fragment in the OGLES 2.0 pipeline.&#xD;&#xA;&#xD;&#xA;Your equation is:&#xD;&#xA;&#xD;&#xA;    ResultColor.r = glFragColor.r * glFragColor.a + ColorInBuffer.r * (1.-glFragColor.a)&#xD;&#xA;    ResultColor.g = glFragColor.g * glFragColor.a + ColorInBuffer.g * (1.-glFragColor.a)&#xD;&#xA;    ResultColor.b = glFragColor.b * glFragColor.a + ColorInBuffer.b * (1.-glFragColor.a)&#xD;&#xA;" />
  <row Id="18589" PostHistoryTypeId="2" PostId="9031" RevisionGUID="d160a43e-9704-4302-adcb-3032eda33850" CreationDate="2011-02-25T19:52:44.203" UserId="3794" Text="Bunkai (I expect that Bunkai is your first name),&#xD;&#xA;&#xD;&#xA;turn off the depthBufer. Do you use depth (different Z)? If not why depthBuffer? It is for 3D or layered 2D. &#xD;&#xA;&#xD;&#xA;Transparent objects are rendered **always** after opaque objects. Do you use this order?&#xD;&#xA;&#xD;&#xA;It must be one of this, i'm sure." />
  <row Id="18590" PostHistoryTypeId="2" PostId="9032" RevisionGUID="2e7c1fdf-01e0-4841-9457-253870359bc2" CreationDate="2011-02-25T20:01:27.053" UserId="5520" Text="You want physical modeling?  Try the Synthesis Toolkit: &#xD;&#xA;&#xD;&#xA;https://ccrma.stanford.edu/software/stk/classstk_1_1Flute.html.  &#xD;&#xA;&#xD;&#xA;You'll have to write the glue code which sets the wind speed / amplitude yourself.&#xD;&#xA;&#xD;&#xA;What you're asking for hasn't really been invented yet.  We're getting close though- check this out, I saw it the other day:&#xD;&#xA;&#xD;&#xA;http://www.physorg.com/news198351307.html" />
  <row Id="18591" PostHistoryTypeId="5" PostId="9024" RevisionGUID="0617d049-d689-4cad-858e-ecf91784eaee" CreationDate="2011-02-25T20:05:58.340" UserId="5703" Comment="deleted 38 characters in body" Text="I'm having a really hard time deciding which way to go on this.  I'm about to start developing a game and I haven't been able to find many good comparisons between these approaches.  I don't have many requirements for the game yet, but here is what I do know.&#xD;&#xA;&#xD;&#xA;* needs to work on iPhone&#xD;&#xA;* I don't have much money ($400 for Unity for iPhone is probably too much. I can probably afford $99 for Corona.)&#xD;&#xA;* Graphics will be 2D&#xD;&#xA;* Physics support is not needed&#xD;&#xA;* Ability to use particles would be nice&#xD;&#xA;* Game Center support would be nice (Corona is planning to support it soon)&#xD;&#xA;* It would be nice to be able to support Android as well if it isn't much effort.&#xD;&#xA;&#xD;&#xA;I have done my own research, so I know basic things about them.  I know Corona uses Lua and Cocos2D uses Objective C.  I know that Corona allows deployment to iPhone and Android, but how easy is it?&#xD;&#xA;&#xD;&#xA;Cocos2D is free, but so many people talk about how easy it is to use Corona, but I don't like being restricted to features Corona supports or the price tag.  I feel so torn here." />
  <row Id="18592" PostHistoryTypeId="25" PostId="9024" RevisionGUID="5f6b6b29-9591-4ce1-a8cf-69a473a7dc65" CreationDate="2011-02-25T20:22:57.317" Comment="http://twitter.com/#!/StackGameDev/status/41231697286533120" />
  <row Id="18593" PostHistoryTypeId="2" PostId="9033" RevisionGUID="93204c81-aa09-431b-9aea-6902fbc5507f" CreationDate="2011-02-25T21:09:30.900" UserId="5250" Text="A computer game is an endless loop of:&#xD;&#xA;&#xD;&#xA; - Update: Advance the game state one tiny time slice (like 1/80 second).&#xD;&#xA; - Paint the current game state.&#xD;&#xA;&#xD;&#xA;There are variations of these. Some games have more updates between each paint, or it can vary them to make the game flow equally smooth on different machines. But that is technical details.&#xD;&#xA;&#xD;&#xA;The update phase that occurs between 50 and 100 times each second (yes it's that often) does this:&#xD;&#xA;&#xD;&#xA; - Update the games physics. Say that an actor have a velocity. The update should move him one tiny bit in the right direction. Also, if you use a physics engine, it should check for collisions with other actos or obstacles.&#xD;&#xA; - Update the games rules. This is what makes it a game and not a physics experiment. Say that a bullet hit the player actor. The game rules tell the player to deduct X points of health and the bullet to disapear.&#xD;&#xA; - AI updates. Sometimes the computer controlled actors should deside what to do. Go left or right? Find a path to a nice place to be. Fire a weapon.&#xD;&#xA; - Input control. Update the player actor according the buttons pressed on the keyboard.&#xD;&#xA; - Update scene graph. This can be advancing an animation one step, or updating the GUI to show that the player now has 10 points less health. It's only purpose is to make the game look and feel nice.&#xD;&#xA;&#xD;&#xA;**Where do you start?**&#xD;&#xA;&#xD;&#xA;The basic requirement for a graphical game is to program graphics. Make sure you can open a window, and draw a ball in it.&#xD;&#xA;&#xD;&#xA;I assume you can make some kind of classes. Make a Ball class. It have the following members: x, y, deltaX, deltaY. All are integers and in pixel scales. Now, write this loop.&#xD;&#xA;&#xD;&#xA;    forever, do this {&#xD;&#xA;      start measure time (in milliseconds)&#xD;&#xA;      //physics part&#xD;&#xA;      add deltaX to x&#xD;&#xA;      add deltaY to y&#xD;&#xA;      if x is bigger than the screen width, assign -deltaX to deltaX&#xD;&#xA;      if y is bigger than the screen height, assign -deltaY to deltaY&#xD;&#xA;      if x is less than 0, assign -deltaX to deltaX&#xD;&#xA;      if y is less than 0, assign -deltaY to deltaY&#xD;&#xA;      &#xD;&#xA;      //paint&#xD;&#xA;      paint the ball at x, y&#xD;&#xA;      stop measuring time, assign this to workTime&#xD;&#xA;      make the thread sleep for (25 - workTime) milliseconds&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This will make the ball bounce of the windows boundaries. **It is not a game yet**, rather a physical simulation. If you write the balls physics update inside the ball class, it is easy to add several balls. Store them in a list and update and paint each one for each frame.&#xD;&#xA;&#xD;&#xA;You can add a paddle (simulate physics for it and make it controllable with the mouse or keyboard) and a game objective such as stopping the ball from reaching the left wall. If the game adds more and more balls over time, the difficulty will increase. **You have a game.**&#xD;&#xA;&#xD;&#xA;**Why sleep** for (25 - workTime) milliseconds? If you do it like this, the simulation will run at a contant pace of 40 updates and paints per second. It will be quite smooth. If you would skip the sleep part, the animation would be jerky, and take up 100% CPU. Also, the speed of the ball would depend on the speed of the machine running it. Now, the ball vertical speed is 40 * deltaY pixels per second." />
  <row Id="18599" PostHistoryTypeId="5" PostId="8995" RevisionGUID="c87a9619-df79-462f-9c1a-52840d1a4332" CreationDate="2011-02-25T22:56:14.860" UserId="1198" Comment="Fixed &quot;i&quot;, fixed &quot;,&quot;, and removed abbreviation for intro to introductory" Text="I completely do not understand how a video game can be coded.&#xD;&#xA;&#xD;&#xA;I'm a beginner programmer and only have experience writing console applications that do math and what not. I do not understand how these logical processes can make images move on the screen (video games). Obviously if I jumped into a game development book or something like that I would understand but I am currently still getting a grasp of the fundamentals of programming in general. Could anyone give a simple explanation, coding wise, on the jump between making a computer do simple math to making a computer produce amazing graphical programs such as video games? Maybe there are some introductory videos someone can point me to?" />
  <row Id="18600" PostHistoryTypeId="24" PostId="8995" RevisionGUID="c87a9619-df79-462f-9c1a-52840d1a4332" CreationDate="2011-02-25T22:56:14.860" Comment="Proposed by 1198 approved by 189 edit id of 53" />
  <row Id="18601" PostHistoryTypeId="25" PostId="9026" RevisionGUID="b0e50de3-5b1a-49aa-ab56-419aba28299a" CreationDate="2011-02-25T23:22:57.827" Comment="http://twitter.com/#!/StackGameDev/status/41276998252896256" />
  <row Id="18602" PostHistoryTypeId="2" PostId="9035" RevisionGUID="e69f87d7-5332-4213-bdee-f8f8e3c117a5" CreationDate="2011-02-26T01:20:48.487" UserId="5711" Text="I am interested in learning the class structure of Plants vs Zombies, particularly level design; for those who haven't played it - this video contains nice play-through: http://www.youtube.com/watch?v=89DfdOIJ4xw.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How would I go ahead and design the code, mostly structure &amp; classes, which allows for maximum flexibility &amp; clean development? I am familiar with data driven design concepts, and would use events to handle most of dynamic behavior.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Dissection at macro level:&#xD;&#xA;&#xD;&#xA;- (Once every Level) Load tilemap, props, etc -- basically build the map &#xD;&#xA;- (Once every Level) Camera Movement - might consider it as short cut-scene&#xD;&#xA;- (Once every Level) Show Enemies you'll face during present level  &#xD;&#xA;- (Once every Level) Unit Selection Window/Panel - selection of defensive plants&#xD;&#xA;- (Once every Level) Camera Movement - might consider it as short cut-scene&#xD;&#xA;- (Once every Level) HUD Creation - based on unit selection &#xD;&#xA;&#xD;&#xA;- (Level Loop) Enemy creation - based on types of zombies allowed&#xD;&#xA;- (Level Loop) Sun/Resource generation&#xD;&#xA;- (Level Loop) Show messages like 'huge wave of zombies coming', 'final wave'&#xD;&#xA;- (Level Loop) Other unique events - Spawn gifts, money, tombstones, etc&#xD;&#xA;&#xD;&#xA;- (Once every Level) Unlock new plant&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Potential game scripts:&#xD;&#xA;&#xD;&#xA;a) Level definitions: Level_1_1.xml, Level_1_2.xml, etc. &#xD;&#xA;&#xD;&#xA;**Level_1_1.xml :: Sample script**&#xD;&#xA;&#xD;&#xA;    &lt;map&gt;&#xD;&#xA;       &lt;tilemap&gt;tilemapFrontLawn&lt;/tilemap&gt;&#xD;&#xA;       &lt;SpawnPoints&gt; tiles where particular type of zombies (land vs water) may spawn&lt;/spawnPoints&gt;&#xD;&#xA;       &lt;props&gt; position, entity array -- lawnmower, &lt;/props&gt;&#xD;&#xA;    &lt;/map&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;zombies&gt;&#xD;&#xA;       &lt;... list of zombies who gonna attack by ids...&gt;&#xD;&#xA;    &lt;/zombies&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;plants&gt;&#xD;&#xA;       &lt;... list by plants which are available for defense by ids...&gt;&#xD;&#xA;    &lt;/plants&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;progression&gt;&#xD;&#xA;       &lt;ZombieWave name='first wave' spawnScript='zombieLightWave.lua' unlock='null'&gt;&#xD;&#xA;          &lt;startMessages time=1.5&gt;Ready&lt;/startMessages&gt;&#xD;&#xA;          &lt;endMessages time=1.5&gt;Huge wave of zombies incoming&lt;/endMessages&gt;&#xD;&#xA;       &lt;/ZombieWave&gt;&#xD;&#xA;    &lt;/progression&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;b) Entities definitions: .xmls containing zombies, plants, sun, lawnmower, coins, etc description. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Potential classes:&#xD;&#xA;&#xD;&#xA;    //LevelManager - Based on the level under play, it will load level script. Few of the //               functions it may have:&#xD;&#xA;    class LevelManager&#xD;&#xA;    {&#xD;&#xA;     public:&#xD;&#xA;       bool load(string levelFileName);&#xD;&#xA;       bool enter();&#xD;&#xA;       bool update(float deltatime);&#xD;&#xA;       bool exit();&#xD;&#xA;    &#xD;&#xA;     private:&#xD;&#xA;       LevelData* mLevelData;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // LevelData - Contains the details of level loaded by LevelManager. &#xD;&#xA;    class LevelData&#xD;&#xA;    {&#xD;&#xA;       private: &#xD;&#xA;          string file;&#xD;&#xA; &#xD;&#xA;          // array of camera,dialog,attackwaves, etc in active level&#xD;&#xA;          LevelCutSceneCamera** mArrayCutSceneCamera; &#xD;&#xA;          LevelCutSceneDialog** mArrayCutSceneDialog;&#xD;&#xA;          LevelAttackWave** mArrayAttackWave;&#xD;&#xA;&#xD;&#xA;            ....&#xD;&#xA;          // which camera,dialog,attackwave is active in level&#xD;&#xA;          uint mCursorCutSceneCamera; &#xD;&#xA;          uint mCursorCutSceneDialog;&#xD;&#xA;          uint mCursorAttackWave;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       public:&#xD;&#xA;          // based on cursor, get the next camera,dialog,attackwave,etc in active level&#xD;&#xA;          // return false/true based on failure/success&#xD;&#xA;          bool nextCutSceneCamera(LevelCutSceneCamera**);&#xD;&#xA;          bool nextCutSceneDialog(LevelCutSceneDialog**);          &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // LevelUnderPlay- LevelManager &#xD;&#xA;    class LevelUnderPlay&#xD;&#xA;    {&#xD;&#xA;       private:&#xD;&#xA;          LevelCutSceneCamera* mCutSceneCamera;&#xD;&#xA;          LevelCutSceneDialog* mCutSceneDialog;&#xD;&#xA;          LevelAttackWave* mAttackWave;&#xD;&#xA;          Entities** mSelectedPlants;&#xD;&#xA;          Entities** mAllowedZombies;&#xD;&#xA;&#xD;&#xA;          bool isCutSceneCameraActive;&#xD;&#xA;&#xD;&#xA;       public:&#xD;&#xA;          bool enter();&#xD;&#xA;          bool update(float deltatime);&#xD;&#xA;          bool exit();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am totally confused.. :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does it make sense of using class composition (have flat class hierarchy) for managing levels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is it a good idea to just add/remove/update sprites (or any drawable stuff) to current scene from LevelManager or LevelUnderPlay?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I want to make non-linear level design, how should I go ahead? Perhaps I would need a LevelProgression class, which would decide what to do based on decision tree.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any suggestions would be appreciated very much.&#xD;&#xA;&#xD;&#xA;Thank for your time,&#xD;&#xA;&#xD;&#xA;lalan" />
  <row Id="18603" PostHistoryTypeId="1" PostId="9035" RevisionGUID="e69f87d7-5332-4213-bdee-f8f8e3c117a5" CreationDate="2011-02-26T01:20:48.487" UserId="5711" Text="Code Structure / Level Design: Plants vs Zombies game level dissection" />
  <row Id="18604" PostHistoryTypeId="3" PostId="9035" RevisionGUID="e69f87d7-5332-4213-bdee-f8f8e3c117a5" CreationDate="2011-02-26T01:20:48.487" UserId="5711" Text="&lt;level-design&gt;&lt;component-based&gt;&lt;data-structure&gt;" />
  <row Id="18605" PostHistoryTypeId="2" PostId="9036" RevisionGUID="81894e30-5e40-4c0c-b187-bc01eca2a708" CreationDate="2011-02-26T01:32:43.607" UserId="3136" Text="I am looking for a library which would easily allow me to render shapes (cubes, spheres, lines, circles, etc.) in 3D3 and OpenGL if possible. I want to be able to rapidly design visual debugging tools and I am not proefficient enough in graphics rendering to do it myself (writing the low level stuff that is). The library would have to be for C/C++.&#xD;&#xA;&#xD;&#xA;I've already taken a look at the open-source 3d engine, but I feel those are too big for what I really need.&#xD;&#xA;&#xD;&#xA;Do any of you know if such library exist? If so, links would be appreciated!" />
  <row Id="18606" PostHistoryTypeId="1" PostId="9036" RevisionGUID="81894e30-5e40-4c0c-b187-bc01eca2a708" CreationDate="2011-02-26T01:32:43.607" UserId="3136" Text="3D primitive rendering library" />
  <row Id="18607" PostHistoryTypeId="3" PostId="9036" RevisionGUID="81894e30-5e40-4c0c-b187-bc01eca2a708" CreationDate="2011-02-26T01:32:43.607" UserId="3136" Text="&lt;c++&gt;&lt;opengl&gt;&lt;directx&gt;&lt;c&gt;&lt;directx9&gt;" />
  <row Id="18608" PostHistoryTypeId="2" PostId="9037" RevisionGUID="ddea37ec-61eb-44cb-b844-06f923f50206" CreationDate="2011-02-26T01:39:15.537" UserId="891" Text="**OpenGL** and **[freeglut][1]** will do what you're looking for.  Freeglut can create the spheres, cubes, cylinder, cone, donuts, teapots, etc.&#xD;&#xA;&#xD;&#xA;[http://freeglut.sourceforge.net/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeglut.sourceforge.net/" />
  <row Id="18609" PostHistoryTypeId="5" PostId="9037" RevisionGUID="7c3774dc-1cb1-4fcb-a176-be67cbd3fe37" CreationDate="2011-02-26T01:46:25.987" UserId="891" Comment="added 193 characters in body" Text="**OpenGL** and **[freeglut][1]** will do what you're looking for.  Freeglut can create the spheres, cubes, cylinder, cone, donuts, teapots, etc.&#xD;&#xA;&#xD;&#xA;&gt;GLUT (and hence freeglut) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions.&#xD;&#xA;&#xD;&#xA;[**http://freeglut.sourceforge.net/**][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeglut.sourceforge.net/" />
  <row Id="18610" PostHistoryTypeId="25" PostId="9036" RevisionGUID="8332cbd7-b730-414a-8b7d-7a7e501f395c" CreationDate="2011-02-26T02:22:58.727" Comment="http://twitter.com/#!/StackGameDev/status/41322299848261632" />
  <row Id="18611" PostHistoryTypeId="2" PostId="9038" RevisionGUID="3d3eabb8-716d-4d79-b8a8-48ab22350527" CreationDate="2011-02-26T02:34:59.263" UserId="383" Text="Developing games is a whole different story from learning programming languages. To make any `interactive applications`, you need to know (at least)&#xD;&#xA;&#xD;&#xA;- how to handle user input (mouse, keyboard, joystick, etc)&#xD;&#xA;- how to draw something on screen (this will be your first challenge unless you are making text-based-game)&#xD;&#xA;- how to play sound (game without sound? no way! :)&#xD;&#xA;&#xD;&#xA;Those three things are heavily related to OS you are developing on. You can use just plain OS API functions to do all the above things. Sometimes, they even offer better API functions specifically for multimedia applications like &quot;a video game&quot;. Windows offer `DirectX`. Other OS (like iOS) supports `OpenGL`. There are even many other libraries or tools which enables you to draw compliected 3D model with an animation by writing a few lines of code (or even without writing any code). They are the `Game Engine` like XNA, Unity, Unreal, etc. &#xD;&#xA;&#xD;&#xA;It is totally up to you what you use but you have to understand how the three things are working. Since you are now studying, I recommend that you study OS API functions especially for `multimedia related functions` without using those handy game engines, and `make a really simple game` like space invader or tetris. You will realize `the simple game` is `not simple at all` and you will know what things you need to figure out. Something like,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- how to manage game `objects` (monster, princess, candy, etc)&#xD;&#xA;- how to handle their `states` (move, jump, fly, die, etc)&#xD;&#xA;- how to let game objects `communicate` each other&#xD;&#xA;- and much much more. &#xD;&#xA;&#xD;&#xA;It will be a long journey but should be fun. Good luck! :)" />
  <row Id="18612" PostHistoryTypeId="2" PostId="9039" RevisionGUID="322b6da2-b7ac-4232-9de6-61422810f6f4" CreationDate="2011-02-26T02:35:58.213" UserId="4298" Text="This is quite similar to this question:&#xD;&#xA;http://gamedev.stackexchange.com/questions/6557/browser-based-mmos-webgl-websocket&#xD;&#xA; which had some helpful answers imho." />
  <row Id="18613" PostHistoryTypeId="5" PostId="9038" RevisionGUID="405de1d2-11e9-4bda-9bfe-abb7fc1f9873" CreationDate="2011-02-26T02:40:34.563" UserId="383" Comment="added 310 characters in body; added 128 characters in body; edited body" Text="Developing games is a whole different story from learning programming languages. To make any `interactive applications`, you need to know (at least)&#xD;&#xA;&#xD;&#xA;- how to handle user input (mouse, keyboard, joystick, etc)&#xD;&#xA;- how to draw something on screen (this will be your first challenge unless you are making text-based-game)&#xD;&#xA;- how to play sound (game without sound? no way! :)&#xD;&#xA;&#xD;&#xA;Those three things are heavily related to OS you are developing on. You can use just plain OS API functions to do all the above things. Sometimes, they even offer better API functions specifically for multimedia applications like &quot;a video game&quot;. Windows offer `DirectX`. Other OS (like iOS) supports `OpenGL`. There are even many other libraries or tools which enables you to draw complicated 3D model with an animation by writing a few lines of code (or even without writing any code). They are the `Game Engine` like XNA, Unity, Unreal, etc. &#xD;&#xA;&#xD;&#xA;It is totally up to you what you use but you have to understand how the three things are working. Since you are now studying, I recommend that you study OS API functions especially for `multimedia related functions` without using those handy game engines, and `make a really simple game` like space invader or tetris. You will realize `the simple game` is `not simple at all` and you will know what things you need to figure out. Something like,&#xD;&#xA;&#xD;&#xA;- how to manage game `objects` (monster, princess, candy, etc)&#xD;&#xA;- how to handle their `states` (move, jump, fly, die, etc)&#xD;&#xA;- how to let game objects `communicate` each other&#xD;&#xA;- and much much more. and much more. and you know what I mean.&#xD;&#xA;&#xD;&#xA;As you know more about game programming, the first three things will be getting less important and the later ones become `key` techniques for game development. That's why some people might say they are not very important or not even necessary to study. However, I still strongly suggest that you start with the first three things as it will give you strong basis for later game development life. &#xD;&#xA;&#xD;&#xA;It will be a long journey but should be fun. Good luck! :)" />
  <row Id="18614" PostHistoryTypeId="5" PostId="9038" RevisionGUID="ade397a7-d67c-4012-a759-47f7f5c19dd4" CreationDate="2011-02-26T02:45:38.180" UserId="383" Comment="added 8 characters in body; added 6 characters in body" Text="Developing games is a whole different story from learning programming languages. To make any `interactive applications`, you need to know (at least)&#xD;&#xA;&#xD;&#xA;- how to handle user `input` (mouse, keyboard, joystick, etc)&#xD;&#xA;- how to `draw` something on screen (this will be your first challenge unless you are making text-based-game)&#xD;&#xA;- how to play `sound` (game without sound? no way! :)&#xD;&#xA;&#xD;&#xA;Those three things are heavily related to OS you are developing on. You can use just plain OS API functions to do all the above things. Sometimes, they even offer better API functions specifically for multimedia applications like &quot;a video game&quot;. Windows offer `DirectX`. Other OS (like iOS) supports `OpenGL`. There are even many other libraries or tools which enables you to draw complicated 3D model with an animation by writing a few lines of code (or even without writing any code). They are the `Game Engine` like XNA, Unity, Unreal, etc. &#xD;&#xA;&#xD;&#xA;It is totally up to you what you use but you have to understand how the three things are working. Since you are now studying, I recommend that you study OS API functions especially for `multimedia related functions` without using those handy game engines, and `make a really simple game` like space invader or tetris. You will realize `the simple game` is `not simple at all` and you will know what things you need to figure out. Something like,&#xD;&#xA;&#xD;&#xA;- how to manage game `objects` (monster, princess, candy, etc)&#xD;&#xA;- how to handle their `states` (move, jump, fly, die, etc)&#xD;&#xA;- how to let game objects `communicate` each other&#xD;&#xA;- and much much more. and much more. and much... you know what I mean.&#xD;&#xA;&#xD;&#xA;As you know more about game programming, the first three things will be getting less important and the later ones become `key` techniques for game development. That's why some people might say they are not very important or not even necessary to study. However, I still strongly suggest that you start with the first three things as it will give you strong basis for later game development life. &#xD;&#xA;&#xD;&#xA;It will be a long journey but should be fun. Good luck! :)" />
  <row Id="18615" PostHistoryTypeId="25" PostId="9035" RevisionGUID="c88fb038-eaf7-4e58-bc8e-4be5bcfe0fec" CreationDate="2011-02-26T05:22:58.783" Comment="http://twitter.com/#!/StackGameDev/status/41367599002558464" />
  <row Id="18616" PostHistoryTypeId="2" PostId="9040" RevisionGUID="67025cf6-29ef-4308-9b3f-61706a2ce876" CreationDate="2011-02-26T07:25:00.427" UserId="5683" Text="There is much room for exploration in this arena.  If you're dead set on canvas+websockets, you should consider a non-RPG MMO, something like a massive puzzle game or a simple, iconographic, RTS.  &#xD;&#xA;&#xD;&#xA;Check out &quot;comet&quot; servers such as (http://cometd.org) cometd, or something that you might build with (http://github.com/mochi/mochiweb) mochiweb or (http://nodejs.org) nodejs.  And for the client side you could look into (http://www.limejs.com) limejs or the dojo.gfx utilities.  &#xD;&#xA;&#xD;&#xA;Thats as good a place as any to get started.  The technology just isn't mature, much experimentation and waiting will be required before the browser is a good place for 'professional' games.&#xD;&#xA;&#xD;&#xA;(I was only allowed to post two links because I'm new - so I swiched them all to parenthetical urls - sorry about that.)" />
  <row Id="18617" PostHistoryTypeId="25" PostId="9013" RevisionGUID="ae6151c9-fa19-4edf-baed-80f24aab2db6" CreationDate="2011-02-26T08:22:58.390" Comment="http://twitter.com/#!/StackGameDev/status/41412896210558976" />
  <row Id="18618" PostHistoryTypeId="2" PostId="9041" RevisionGUID="00d044ee-3edc-4e60-a119-a628ecca2736" CreationDate="2011-02-26T08:39:34.103" UserId="5714" Text="&gt; I have to watch the keyboard during rendering.&#xD;&#xA;&#xD;&#xA;Fullstop here. Go over your code again and rethink how stuff works. Logic and rendering should be strictly seperated. There should no situation what-so-ever arise for you to need to check the input during the rendering calls. Rendering doesn't compute input. It just works with what's being given to it." />
  <row Id="18619" PostHistoryTypeId="2" PostId="9042" RevisionGUID="ad5cb5a0-031c-42ea-a53c-3187e9fb5317" CreationDate="2011-02-26T08:51:11.583" UserId="778" Text="Check out the [skeleton animation tutorial][1] over at Rookscape. It's VB based  but the theory should be sound. Also take a look at some of the [other tutorials][2] if need be...&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rookscape.com/vbgaming/tutBD.php&#xD;&#xA;  [2]: http://www.rookscape.com/vbgaming/tutorials.php" />
  <row Id="18620" PostHistoryTypeId="2" PostId="9043" RevisionGUID="9242407b-84ba-4b5a-a9a5-05740c283bfb" CreationDate="2011-02-26T08:58:08.880" UserId="778" Text="Have you looked at the [Q3A source code][1] at all?  &#xD;&#xA;I don't know much about it's light map code other than that it is OpenGL so may answer some of your questions?&#xD;&#xA;&#xD;&#xA;I would start with `R_LoadLightmaps()` in `tr_bsp.c` of the renderer project as a pointer...&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;  [1]: ftp://ftp.idsoftware.com/idstuff/source/quake3-1.32b-source.zip" />
  <row Id="18621" PostHistoryTypeId="2" PostId="9044" RevisionGUID="a189b65b-eaf6-46af-a23d-f1be4ff70db2" CreationDate="2011-02-26T09:00:25.387" UserId="5715" Text="Phya is a &quot;physical sampling&quot; based collision audio synthesis library which can be driven by a game physics engine.  (Bullet was used in the examples) &#xD;&#xA;&#xD;&#xA;http://www.zenprobe.com/phya/&#xD;&#xA;&#xD;&#xA;Not sure what the latest is, the last site update is over year ago now.&#xD;&#xA;&#xD;&#xA;It is not so much geared to modeling resonance of air in a volume, but could perhaps be a good example of how to drive real-time audio synthesis from physics.&#xD;&#xA;&#xD;&#xA;I think this does not need to be an impossibly cpu-expensive undertaking,  The problem stated is entirely deterministic and should be achievable on modern hardware. (at least to a level suitable for an entertainment/learning product.)&#xD;&#xA;&#xD;&#xA;The question to answer is how fully do you need to simulate, and how much can you fake?  For audio just having some kind of realtime modulation of sound in a reasonably convincing manner gets you a lot without having to model acoustic vibrations down to the molecule.&#xD;&#xA;&#xD;&#xA;Maybe this helps.  Good question, btw.&#xD;&#xA;&#xD;&#xA;-j" />
  <row Id="18622" PostHistoryTypeId="2" PostId="9045" RevisionGUID="c99f3dcd-f417-4735-97c4-430a5ea50c58" CreationDate="2011-02-26T11:02:11.513" UserId="5717" Text="I develop CUDA applications on my Alienware M17x portable back-breaker, which has two discrete GTX 285M GPUs and one integrated GeForce 9400M GPU. I can currently switch between them using NVIDIA's software, but I would like the ability to do so within my applications for purposes of benchmarking and general convenience. Apparently this requires the &quot;NDA version&quot; of NVIDIA's Driver API, which I know not how to obtain. Would using this API be the only way to accomplish what I seek, and if so, how would I obtain it? A solution using Windows APIs would also be acceptable, though less preferable to one which would leverage a cross-platform API. I have created a similar thread concerning the matter on NVIDIA's forum, which is down at the time of this writing.&#xD;&#xA;&#xD;&#xA;Thanks for reading my question; it is much appreciated!" />
  <row Id="18623" PostHistoryTypeId="1" PostId="9045" RevisionGUID="c99f3dcd-f417-4735-97c4-430a5ea50c58" CreationDate="2011-02-26T11:02:11.513" UserId="5717" Text="Switching between Discrete and Integrated GPUs" />
  <row Id="18624" PostHistoryTypeId="3" PostId="9045" RevisionGUID="c99f3dcd-f417-4735-97c4-430a5ea50c58" CreationDate="2011-02-26T11:02:11.513" UserId="5717" Text="&lt;hardware&gt;&lt;gpu&gt;&lt;gpgpu&gt;" />
  <row Id="18625" PostHistoryTypeId="25" PostId="9045" RevisionGUID="760c3b4e-6e11-4a49-9a56-5da4b0984564" CreationDate="2011-02-26T11:22:58.257" Comment="http://twitter.com/#!/StackGameDev/status/41458193557225472" />
  <row Id="18626" PostHistoryTypeId="2" PostId="9046" RevisionGUID="28b59cd7-3ecc-4624-b9fb-3c3209c6189e" CreationDate="2011-02-26T11:27:50.540" UserId="4947" Text="You can also use [SFML][1]. &#xD;&#xA;&#xD;&#xA;There are differences between them. With FreeGLUT you can control OGL context, window properties, single/double buffering, multi-sampling etc. &#xD;&#xA;&#xD;&#xA;SFML is more object-oriented. You can set FPS with it, it offers you multi-threading, image loading, etc. It sets window itself (it always uses RGBA, double-buffering, depth buffer etc.) - you cann't change it, but it's all you need (you don't need to change it in most cases). &#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/" />
  <row Id="18627" PostHistoryTypeId="2" PostId="9047" RevisionGUID="f84500f7-7447-4a61-ae02-c54fef5e5c22" CreationDate="2011-02-26T13:27:17.387" UserId="3794" Text="As GLUT exists, there there is also DXUT. **DXUT** is &quot;sample framework&quot; over directx. It helps you to create window or handling user imputs (as GLUT also does) and also alows to draw primitives (box, cylinder, polygon, sphere, torus and teapot)&#xD;&#xA;&#xD;&#xA;Working and commented examples with DXUT are in Microsoft DirectX SDK.&#xD;&#xA;&#xD;&#xA; - [DirectX SDK][1] &#xD;&#xA; - [DXUT documentation][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/directx/aa937788&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee417527(v=vs.85).aspx" />
  <row Id="18628" PostHistoryTypeId="5" PostId="9013" RevisionGUID="b9721277-6ae0-440b-a8b5-d072841d311b" CreationDate="2011-02-26T13:40:45.173" UserId="20" Comment="deleted 7 characters in body" Text="I want to develop a flash game. It would draw a stick man, and edit his pose.&#xD;&#xA;&#xD;&#xA;I think what I need to learn are **bones animation** and **physics engine**.&#xD;&#xA;&#xD;&#xA;Can anyone introduce some good resources to learn both?" />
  <row Id="18629" PostHistoryTypeId="2" PostId="9048" RevisionGUID="14e732f4-55e7-40dd-9eac-085149a80279" CreationDate="2011-02-26T13:42:17.883" UserId="5718" Text="I am trying to write efficient code to render a tile based map in android. I load for each tile the corresponding bitmap (just one time) and then create the according tiles. I have designed a class to do this:&#xD;&#xA;&#xD;&#xA;    public class VertexQuad {&#xD;&#xA;	&#xD;&#xA;	private float[] mCoordArr;&#xD;&#xA;	private float[] mColArr;&#xD;&#xA;	private float[] mTexCoordArr;&#xD;&#xA;	private int mTextureName;&#xD;&#xA;	private static short mCounter = 0;&#xD;&#xA;	private short mIndex;&#xD;&#xA;&#xD;&#xA;As you can see, each tile has it's x,y location, a color array, texture coordinates and a texture name.&#xD;&#xA;Now, I want to render all my created tiles.&#xD;&#xA;&#xD;&#xA;To reduce the openGL api calls (I read somewhere that the state changes are costly and therefore I want to keep them to a minimum), I first want to hand ALL the coordinate-arrays, color-arrays and texture-coordinates over to OpenGL. After that I run two for loops. The first one iterates over the textures and binds the texture.&#xD;&#xA;The second for loop iterates over all Tiles and puts all tiles with the corresponding texture into an IndexBuffer. After the second for loop has finished, I call&#xD;&#xA;&#xD;&#xA;    gl.gl_drawElements()&#xD;&#xA;&#xD;&#xA;whith the corresponding index buffer, to draw all tiles with the texture associated. For the next texture I do the same again.&#xD;&#xA;&#xD;&#xA;Now I run into some problems:&#xD;&#xA;Allocating and filling the FloatBuffers at the start of each rendering cycle costs very much time. I just run a test, where i wanted to put 400 coordinates into a FloatBuffer which took me about 200ms.&#xD;&#xA;&#xD;&#xA;My questions now are:&#xD;&#xA;&#xD;&#xA; - Is there a better way, handling the&#xD;&#xA;   coordinate and color structures? &#xD;&#xA; - How&#xD;&#xA;   is this correctly done, this is&#xD;&#xA;   obviously not the optimal way? ;)&#xD;&#xA;&#xD;&#xA;thanks in advance,&#xD;&#xA;regards Markus&#xD;&#xA;" />
  <row Id="18630" PostHistoryTypeId="1" PostId="9048" RevisionGUID="14e732f4-55e7-40dd-9eac-085149a80279" CreationDate="2011-02-26T13:42:17.883" UserId="5718" Text="Android - Efficient way to draw tiles in OpenGL ES" />
  <row Id="18631" PostHistoryTypeId="3" PostId="9048" RevisionGUID="14e732f4-55e7-40dd-9eac-085149a80279" CreationDate="2011-02-26T13:42:17.883" UserId="5718" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;tiles&gt;" />
  <row Id="18632" PostHistoryTypeId="25" PostId="9048" RevisionGUID="e27cf2d0-3171-4281-bc35-9f0161834f5d" CreationDate="2011-02-26T14:22:58.410" Comment="http://twitter.com/#!/StackGameDev/status/41503492807860224" />
  <row Id="18633" PostHistoryTypeId="2" PostId="9049" RevisionGUID="f4547bdc-5022-4f9e-99d5-b937156fd685" CreationDate="2011-02-26T14:54:43.583" UserId="721" Text="In OpenGL ES 1.x, you can use several methods:&#xD;&#xA;&#xD;&#xA; - glDrawArrays&#xD;&#xA; - glDrawElements: TRIANGLES or TRIANGLES_STRIP (denormalized triangles)&#xD;&#xA; - VBO&#xD;&#xA; - glDrawTexfOES (you need to verify that you have this extension)&#xD;&#xA;&#xD;&#xA;glDrawTexfOES is the faster method to draw efficiently quads but it is not available on old phones." />
  <row Id="18634" PostHistoryTypeId="2" PostId="9050" RevisionGUID="74423044-fd4e-46a7-a8af-f58ad2aa6b6d" CreationDate="2011-02-26T14:55:23.147" UserId="5722" Text="I want to find out the best way of creating time based events in games. Lets talk for example about Texas Holdem Poker. Server can handle thousands of tables and in every table we have timers: turn timer, hold seat timer and so on.&#xD;&#xA;&#xD;&#xA;What is the best way of timers realization for this purpose?&#xD;&#xA;&#xD;&#xA;Is System.Timers.Timer class can handle this or it will be more reasonable to create a separate thread with sorted time queue (for example an ascending sorted list with int values which represent time in ms remained)?&#xD;&#xA;&#xD;&#xA;Thanks in advance, Valentin&#xD;&#xA;" />
  <row Id="18635" PostHistoryTypeId="1" PostId="9050" RevisionGUID="74423044-fd4e-46a7-a8af-f58ad2aa6b6d" CreationDate="2011-02-26T14:55:23.147" UserId="5722" Text="C# Timers for game development" />
  <row Id="18636" PostHistoryTypeId="3" PostId="9050" RevisionGUID="74423044-fd4e-46a7-a8af-f58ad2aa6b6d" CreationDate="2011-02-26T14:55:23.147" UserId="5722" Text="&lt;c#&gt;&lt;.net&gt;&lt;timer&gt;" />
  <row Id="18637" PostHistoryTypeId="5" PostId="9049" RevisionGUID="9df3839b-047b-4163-947a-d96f5e8fd0b7" CreationDate="2011-02-26T15:02:28.883" UserId="721" Comment="added 313 characters in body; added 35 characters in body" Text="In OpenGL ES 1.x, you can use several methods:&#xD;&#xA;&#xD;&#xA; - glDrawArrays&#xD;&#xA; - glDrawElements: TRIANGLES or TRIANGLES_STRIP (denormalized triangles)&#xD;&#xA; - VBO&#xD;&#xA; - glDrawTexfOES (you need to verify that you have this extension)&#xD;&#xA;&#xD;&#xA;glDrawTexfOES is the faster method to draw efficiently quads but it is not available on old phones. VBO is efficient for static quads.&#xD;&#xA;&#xD;&#xA;Ps: in efficient opengl es 1.x engines, you have a tool to batch drawcalls. It is recommanded to limit your drawcalls to 50.&#xD;&#xA;&#xD;&#xA;Ps 2: the FloatBuffers is very slow on android devices &lt; 2.3. The [libgdx][1] has rewritten this part to speed its engines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.badlogicgames.com/wordpress/?p=899" />
  <row Id="18638" PostHistoryTypeId="5" PostId="9049" RevisionGUID="f2e81b9d-ce92-4bce-9eaa-587970694b33" CreationDate="2011-02-26T15:10:45.680" UserId="721" Comment="added 98 characters in body" Text="In OpenGL ES 1.x, you can use several methods:&#xD;&#xA;&#xD;&#xA; - glDrawArrays&#xD;&#xA; - glDrawElements: TRIANGLES or TRIANGLES_STRIP (denormalized triangles)&#xD;&#xA; - VBO&#xD;&#xA; - glDrawTexfOES (you need to verify that you have this extension)&#xD;&#xA;&#xD;&#xA;glDrawTexfOES is the faster method to draw efficiently quads but it is not available on old phones. VBO is efficient for static quads.&#xD;&#xA;&#xD;&#xA;Ps: in efficient opengl es 1.x engines, you have a tool to batch drawcalls. It is recommanded to limit your drawcalls to 50.&#xD;&#xA;&#xD;&#xA;Ps 2: the FloatBuffers is very slow on android devices &lt; 2.3. The [libgdx][1] has rewritten this part to speed its engines. You should look [this issue][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.badlogicgames.com/wordpress/?p=899&#xD;&#xA;  [2]: http://code.google.com/p/android/issues/detail?id=8931&#xD;&#xA;" />
  <row Id="18639" PostHistoryTypeId="2" PostId="9051" RevisionGUID="f02ffdf0-2738-432a-9d3f-651f38e799de" CreationDate="2011-02-26T16:18:42.383" UserDisplayName="slcpfmmm" Text="This is how I'd do it, in general programming (not just C#)&#xD;&#xA;&#xD;&#xA;I'd have a thread to handle my timers, with an ordered queue with datetime values for all future events.&#xD;&#xA;&#xD;&#xA;Your timer thread would look like this:&#xD;&#xA;&#xD;&#xA;    while (true)&#xD;&#xA;    {&#xD;&#xA;        curr_date = time();&#xD;&#xA;        lock(queue);&#xD;&#xA;        while (queue.top.date &lt; curr_date)&#xD;&#xA;        {&#xD;&#xA;            act(queue.top); // usually very simple stuff, like alerting another thread&#xD;&#xA;            queue.pop();&#xD;&#xA;        }&#xD;&#xA;        unlock(queue);&#xD;&#xA;        thread.sleep(queue.top.date - curr_date);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In addition, any thread who wants to add a message into your timer list, should call a function like this:&#xD;&#xA;&#xD;&#xA;    lock(queue);&#xD;&#xA;    queue.insert_ordered(timer);&#xD;&#xA;    unlock(queue);&#xD;&#xA;    thread.awake();&#xD;&#xA;&#xD;&#xA;Would something like this solve your problem?" />
  <row Id="18640" PostHistoryTypeId="2" PostId="9052" RevisionGUID="f5593ab9-94d9-446e-91d4-d76f02d9f70e" CreationDate="2011-02-26T16:25:28.397" UserId="5725" Text="I've followed example from various place regarding setting OutputMerger's BlendState to enable alpha/transparent texture on mesh. The setup is as follows:&#xD;&#xA;&#xD;&#xA;    			var transParentOp = new BlendStateDescription {&#xD;&#xA;				SourceBlend = BlendOption.SourceAlpha,&#xD;&#xA;				DestinationBlend = BlendOption.InverseDestinationAlpha,&#xD;&#xA;				BlendOperation = BlendOperation.Add,&#xD;&#xA;				SourceAlphaBlend = BlendOption.Zero,&#xD;&#xA;				DestinationAlphaBlend = BlendOption.Zero,&#xD;&#xA;				AlphaBlendOperation = BlendOperation.Add,&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;I've made up a sample that display 3 mesh A, B and C, where each overlaps one another. They are drawn sequentially, A to C. Distance from camera where A is nearest and C is furthest. So, the expected output is that A see through and saw part of B and C. B will see through and saw part of C. &#xD;&#xA;&#xD;&#xA;But what I get was none of them see through in that order, but if I move C closer to the camera, then it will be semi transparent and see through A and B. B if move closer to camera will see A but not C. Sort of reverse.&#xD;&#xA;&#xD;&#xA;So it seems that I need to draw them in reverse order where furthest from camera is drawn first then nearest to camera is drawn last.&#xD;&#xA;&#xD;&#xA;Is it suppose to be done this way, or I can actually configure the blendstate so it works no matter in which order i draw them?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="18641" PostHistoryTypeId="1" PostId="9052" RevisionGUID="f5593ab9-94d9-446e-91d4-d76f02d9f70e" CreationDate="2011-02-26T16:25:28.397" UserId="5725" Text="Mesh with Alpha Texture doesn't blend properly" />
  <row Id="18642" PostHistoryTypeId="3" PostId="9052" RevisionGUID="f5593ab9-94d9-446e-91d4-d76f02d9f70e" CreationDate="2011-02-26T16:25:28.397" UserId="5725" Text="&lt;directx&gt;&lt;directx10&gt;&lt;slimdx&gt;" />
  <row Id="18643" PostHistoryTypeId="2" PostId="9053" RevisionGUID="c9ef116e-e251-4f84-bfac-6c2b57a0767e" CreationDate="2011-02-26T16:55:22.083" UserId="1101" Text="This is a *very* open-ended question and you'd be better off asking one clear top-level question and then following it up with several more focused detail questions afterwards. But I'll try and sum things up.&#xD;&#xA;&#xD;&#xA;&gt; How would I go ahead and design the code, mostly structure &amp; classes, which allows for maximum flexibility &amp; clean development?&#xD;&#xA;&#xD;&#xA;There isn't One True Way to write code. People can give you their opinions here but they will differ significantly. If you're not familiar with coding yet, then you need to start with smaller projects than this. If you are familiar with coding in other contexts, then whatever rules for good development you used before will still apply here.&#xD;&#xA;&#xD;&#xA;&gt; Potential game scripts:&#xD;&#xA;&#xD;&#xA;Note - typically a 'script' in game development refers to code written in a programming language, to perform some sort of logic. What you were describing are actually just data files.&#xD;&#xA;&#xD;&#xA;&gt; Does it make sense of using class composition (have flat class hierarchy) for managing levels.&#xD;&#xA;&#xD;&#xA;If you like. Or have a hierarchy. It makes no difference to the outcome, only to what you have to go through to make it. Great games have been written using both methods. You shouldn't be considering a component based system unless you know you need components though. The program structure should follow the requirements of the game.&#xD;&#xA;&#xD;&#xA;&gt; If I want to make non-linear level design, how should I go ahead?&#xD;&#xA;&#xD;&#xA;You have to define what you mean by &quot;non-linear level design&quot; first.&#xD;&#xA;&#xD;&#xA;The problem with most of this is not that it's confusing, but that you don't have clear specifications. Once you have clear specifications, it becomes clear what code you need. Once you know what code you need, it's obvious where most of it has to go, especially if you're familiar with good coding practices and typical design patterns.&#xD;&#xA;&#xD;&#xA;All your other questions are really just asking for opinions which will vary from person to person and nobody can give you the right answer, especially not without seeing which classes you have and what they all do - but if you had a list of classes, you would probably know what to do in the first place.&#xD;&#xA;&#xD;&#xA;For all these decisions - just pick one, and code it. If you find yourself wishing you'd done it the other way, refactor it later.&#xD;&#xA;" />
  <row Id="18644" PostHistoryTypeId="2" PostId="9054" RevisionGUID="92251b6c-acc4-4c73-83cf-49f077014c51" CreationDate="2011-02-26T16:59:14.313" UserId="1101" Text="We used a bit of Boost back at our old workplace. The main reasons for mostly avoiding it and limiting its use were:&#xD;&#xA;&#xD;&#xA;  * compile times - some of it is very slow to compile, and you end up being reluctant to have boost #includes in any of your headers&#xD;&#xA;  * complexity - it's not well known by most game developers and so makes for unreadable code&#xD;&#xA;  * performance - some of the concepts perform slowly by default, eg. shared_ptr" />
  <row Id="18645" PostHistoryTypeId="2" PostId="9055" RevisionGUID="797a9728-fc8e-4e59-bea3-6f165268f99a" CreationDate="2011-02-26T17:01:09.820" UserId="5726" Text="I would like to apply (program) the Artificial intelligence methods to create a intelligent game bots for a first person shooter game. Do you have any knowledge from where can I start to develop as a Linux user? Do you have a suggestion for an easy-to-start game for which I can develop bots easily, caring more about the result of my algorithms rather than spending a lot of time dealing with the game code? I've read some publications about the applied methods to Quake 3 (c) and Open Arena. But I couldn't find the source codes and manuals describing how to start coding( for compiling, developing ai and etc.).&#xD;&#xA;&#xD;&#xA;I appreciate your help.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="18646" PostHistoryTypeId="1" PostId="9055" RevisionGUID="797a9728-fc8e-4e59-bea3-6f165268f99a" CreationDate="2011-02-26T17:01:09.820" UserId="5726" Text="First Person Shoother game agent development" />
  <row Id="18647" PostHistoryTypeId="3" PostId="9055" RevisionGUID="797a9728-fc8e-4e59-bea3-6f165268f99a" CreationDate="2011-02-26T17:01:09.820" UserId="5726" Text="&lt;game-design&gt;&lt;linux&gt;" />
  <row Id="18648" PostHistoryTypeId="5" PostId="9049" RevisionGUID="e564cfbc-7342-4227-8214-a98d556d2c6b" CreationDate="2011-02-26T17:03:35.103" UserId="721" Comment="added 159 characters in body; added 8 characters in body; added 122 characters in body" Text="In OpenGL ES 1.x, you can use several methods:&#xD;&#xA;&#xD;&#xA; - glDrawArrays&#xD;&#xA; - glDrawElements: TRIANGLES or TRIANGLES_STRIP (denormalized triangles)&#xD;&#xA; - VBO&#xD;&#xA; - glDrawTexfOES (you need to verify that you have this extension)&#xD;&#xA;&#xD;&#xA;glDrawTexfOES is the faster method to draw efficiently quads but it is not available on old phones. VBO is efficient for static quads. If you use VBO with FloatBuffers, there is  a bug on Android 2.2 and 2.1 devices which causes slowness. Use the libgdx.so, to transfert data into VBO for performance. If you use NDK, there is no performance issues.&#xD;&#xA;&#xD;&#xA;Your question is not OpenGL ES related but OpenGL Java Wrapping issue.&#xD;&#xA;&#xD;&#xA;Ps: in efficient opengl es 1.x engines, you have a tool to batch drawcalls. It is recommanded to limit your drawcalls to 50.&#xD;&#xA;&#xD;&#xA;Ps 2: the FloatBuffers is very slow on android devices &lt; 2.3. The [libgdx][1] has rewritten this part to speed its engines. You should look [this issue][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.badlogicgames.com/wordpress/?p=899&#xD;&#xA;  [2]: http://code.google.com/p/android/issues/detail?id=8931&#xD;&#xA;" />
  <row Id="18649" PostHistoryTypeId="25" PostId="9055" RevisionGUID="5f80bddc-1ff0-4d16-bc36-8c3a932cc27e" CreationDate="2011-02-26T17:22:58.247" Comment="http://twitter.com/#!/StackGameDev/status/41548791022759936" />
  <row Id="18650" PostHistoryTypeId="2" PostId="9056" RevisionGUID="aa849776-6420-4a10-8322-7cfdf9ea4265" CreationDate="2011-02-26T17:24:55.783" UserId="5678" Text="I have a rectangular tile-based layout. It's your typical Cartesian system.&#xD;&#xA;&#xD;&#xA;I would like to have a single class that handles two lookup styles&#xD;&#xA;&#xD;&#xA; 1. Get me the set of players at position X,Y&#xD;&#xA; 2. Get me the position of player with key K&#xD;&#xA;&#xD;&#xA;My current implementation is this:&#xD;&#xA;&#xD;&#xA;    class CoordinateMap&lt;V&gt; {&#xD;&#xA;        Map&lt;Long,Set&lt;V&gt;&gt; coords2value;&#xD;&#xA;        Map&lt;V,Long&gt; value2coords;&#xD;&#xA;    &#xD;&#xA;        // convert (int x, int y) to long key - this is tested, works for all values -1bil to +1bil&#xD;&#xA;        // My map will NOT require more than 1 bil tiles from the origin :)&#xD;&#xA;        private Long keyFor(int x, int y) {&#xD;&#xA;            int kx = x + 1000000000;&#xD;&#xA;            int ky = y + 1000000000;&#xD;&#xA;            return (long)kx | (long)ky &lt;&lt; 32;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // extract the x and y from the keys&#xD;&#xA;        private int[] coordsFor(long k) {&#xD;&#xA;            int x = (int)(k &amp; 0xFFFFFFFF) - 1000000000;&#xD;&#xA;            int y = (int)((k &gt;&gt;&gt; 32) &amp; 0xFFFFFFFF) - 1000000000;&#xD;&#xA;            return new int[] { x,y };&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;From there, I proceed to have other methods that manipulate or access the two maps accordingly.&#xD;&#xA;&#xD;&#xA;My question is... **is there a better way to do this?** Sure, I've tested my class and it works fine. And sure, something inside tells me if I want to reference the data by two different keys, I need two different maps. But I can also bet I'm not the first to run into this scenario.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18651" PostHistoryTypeId="1" PostId="9056" RevisionGUID="aa849776-6420-4a10-8322-7cfdf9ea4265" CreationDate="2011-02-26T17:24:55.783" UserId="5678" Text="Most efficient way to handle coordinate maps in Java" />
  <row Id="18652" PostHistoryTypeId="3" PostId="9056" RevisionGUID="aa849776-6420-4a10-8322-7cfdf9ea4265" CreationDate="2011-02-26T17:24:55.783" UserId="5678" Text="&lt;java&gt;&lt;coordinates&gt;&lt;data-structure&gt;" />
  <row Id="18653" PostHistoryTypeId="2" PostId="9057" RevisionGUID="507965aa-2a67-4714-aba8-b20f9a58438f" CreationDate="2011-02-26T17:29:31.663" UserId="2745" Text="Although mostly from the official site, I thought it was important to mention them as they have a lot of good tutorials.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* [jMonkeyEngine wiki][2] (Important)&#xD;&#xA;* [jMonkeyEngine Forum][1]&#xD;&#xA;* [Tutorials][3]&#xD;&#xA;* [Misc tips][4]&#xD;&#xA;* [jMonkeyEngine applet][5]&#xD;&#xA;* [jMonkeyEngine2 Tutorials][6]&#xD;&#xA;* [User Guide][7]&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.org/forums-index/&#xD;&#xA;  [2]: http://jmonkeyengine.org/wiki/doku.php/jME%20Wiki&#xD;&#xA;  [3]: http://jmonkeyengine.org/wiki/doku.php/jme3#tutorials_for_beginners&#xD;&#xA;  [4]: http://jmonkeyengine.org/wiki/doku.php?id=miscellaneous_tips_collected_by_mindgamer&#xD;&#xA;  [5]: http://www.streamhead.com/tutorial-jmonkeyengine-applet-hardware-3d-in-the-browser/&#xD;&#xA;  [6]: http://jmonkeyengine.org/wiki/doku.php?id=jme2_-_flag_rush_tutorial_series&#xD;&#xA;  [7]: http://jmonkeyengine.org/wiki/doku.php?id=user_s_guide" />
  <row Id="18658" PostHistoryTypeId="2" PostId="9059" RevisionGUID="18339f77-a055-459e-bbba-a92329aa2460" CreationDate="2011-02-26T18:26:34.053" UserId="5715" Text="Absence of sound also counts.  Rather than having a negatively-toned failure sound you could play no sound if the answer is wrong, and in doing so come off as less harsh on the user who may be struggling with the subject matter.&#xD;&#xA;&#xD;&#xA;Reward them with a pleasant noise (not too loud or sharp) and give them empty air when they miss something.  Antagonizing a math test taker is not likely to help them improve much. (in my opinion)&#xD;&#xA;&#xD;&#xA;Another good place for examples of positive / negative user feedback sounds can be found by auditioning the system sound sets in a typical Windows installation.  There are some great examples of the sonic motion alluded to by other answers in this thread.  (just don't use them for anything other than reference of course.)&#xD;&#xA;&#xD;&#xA;-j&#xD;&#xA;" />
  <row Id="18659" PostHistoryTypeId="2" PostId="9060" RevisionGUID="077bafef-8cb3-4768-8feb-136c26ebe8ba" CreationDate="2011-02-26T18:28:48.620" UserId="3830" Text="Dwight - dive in and start building.  Start small, build your way up.  I.e., get a nice little sprite based game working that's talking to a back-end server first, then worry about the whole WebGL thing later.&#xD;&#xA;&#xD;&#xA;And ignore the HTML5 doubters.  See links below for some nice HTML5 demos and info on what it can do.  Also, go check out Google's App store.  There are some pretty amazing web based apps people have built that should inspire you.&#xD;&#xA;&#xD;&#xA;[http://www.chromeexperiments.com][1] - A collection of impressive tech demos from Google.  Requires Chrome, but as far as I know is written primarily to HTML5 standards.  If other browsers support the standard, they will work too.&#xD;&#xA;&#xD;&#xA;[http://www.html5rocks.com/][2] - More information on HTML5.  Includes an interactive slideshow going over features of HTML5.  &#xD;&#xA;&#xD;&#xA;  [1]: http://www.chromeexperiments.com/&#xD;&#xA;  [2]: http://www.html5rocks.com/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18660" PostHistoryTypeId="2" PostId="9061" RevisionGUID="dbda34bf-77e9-4cc2-a3ff-06415afa65d8" CreationDate="2011-02-26T18:43:15.677" UserDisplayName="user5727" Text="I haven't seen any mmo game that would have vehicles with realistic physics and that could achieve high speed, why? Is it because of network bandwidth limitations?&#xD;&#xA;SecondLife have vehicles, but physics are poor and max speed is pathetic." />
  <row Id="18661" PostHistoryTypeId="1" PostId="9061" RevisionGUID="dbda34bf-77e9-4cc2-a3ff-06415afa65d8" CreationDate="2011-02-26T18:43:15.677" UserDisplayName="user5727" Text="Is it possible to have vehicles with physics like GTA in an mmo game?" />
  <row Id="18662" PostHistoryTypeId="3" PostId="9061" RevisionGUID="dbda34bf-77e9-4cc2-a3ff-06415afa65d8" CreationDate="2011-02-26T18:43:15.677" UserDisplayName="user5727" Text="&lt;physics&gt;&lt;mmo&gt;" />
  <row Id="18663" PostHistoryTypeId="4" PostId="9055" RevisionGUID="5a46cab8-e01d-49a1-b9f8-23d4cf2e6c0b" CreationDate="2011-02-26T18:52:12.420" UserId="3830" Comment="title typo" Text="First Person Shooter game agent development" />
  <row Id="18664" PostHistoryTypeId="24" PostId="9055" RevisionGUID="5a46cab8-e01d-49a1-b9f8-23d4cf2e6c0b" CreationDate="2011-02-26T18:52:12.420" Comment="Proposed by 3830 approved by 51 edit id of 54" />
  <row Id="18668" PostHistoryTypeId="5" PostId="9040" RevisionGUID="11edfcef-d41e-4621-92c8-2a8ae30ee4e2" CreationDate="2011-02-26T19:04:19.410" UserId="370" Comment="linkified the links" Text="There is much room for exploration in this arena.  If you're dead set on canvas+websockets, you should consider a non-RPG MMO, something like a massive puzzle game or a simple, iconographic, RTS.  &#xD;&#xA;&#xD;&#xA;Check out &quot;comet&quot; servers such as [cometd][1], or something that you might build with [mochiweb][2] or [nodejs][3].  And for the client side you could look into [limejs][4] or the dojo.gfx utilities.  &#xD;&#xA;&#xD;&#xA;Thats as good a place as any to get started.  The technology just isn't mature, much experimentation and waiting will be required before the browser is a good place for 'professional' games.&#xD;&#xA;&#xD;&#xA;  [1]: http://cometd.org&#xD;&#xA;  [2]: http://github.com/mochi/mochiweb&#xD;&#xA;  [3]: http://nodejs.org&#xD;&#xA;  [4]: http://www.limejs.com" />
  <row Id="18669" PostHistoryTypeId="24" PostId="9040" RevisionGUID="11edfcef-d41e-4621-92c8-2a8ae30ee4e2" CreationDate="2011-02-26T19:04:19.410" Comment="Proposed by 370 approved by 51 edit id of 55" />
  <row Id="18670" PostHistoryTypeId="2" PostId="9062" RevisionGUID="7c348a91-f0b8-4b95-b6f6-5026ac0a268f" CreationDate="2011-02-26T19:16:15.377" UserId="4345" Text="What you want is a component handling the movement of characters (player and NPCs). It will receive from the AI component or some player component and check if the action can be initiated. This will encapsulate your movement constraints into one single component. Your AI code and player code do not have to know how swing sword is executed. The AI would have internal states e.g. Idle, Attacking, Fleeing." />
  <row Id="18671" PostHistoryTypeId="2" PostId="9063" RevisionGUID="9c7a0277-166a-4d2a-8d9a-e875a386bc71" CreationDate="2011-02-26T19:30:46.730" UserId="1156" Text="Garry's Mod is pretty much all physics. I don't think it counts as an MMO as such - though it will support 32 players per server - and that has the most realistic physics I've seen (not just vehicles). &#xD;&#xA;&#xD;&#xA;I guess that there hasn't been an MMO designed with physics in mind." />
  <row Id="18672" PostHistoryTypeId="2" PostId="9064" RevisionGUID="fa1a0c53-8812-4989-8122-2f803b826583" CreationDate="2011-02-26T19:32:15.090" UserId="4345" Text="Yes.&#xD;&#xA;&#xD;&#xA;You have to deal with network latency and syncing the game state across the network. The faster the cars move the more notable the network latency becomes. Players might crash into a wall, because their game client fails to update the game state on the server due to network issues. Which isn't an issue when players move at walk speed ;-)&#xD;&#xA;&#xD;&#xA;An MMO server has more load. A multiplayer racing game might run fine with 10 people connected, but will crash and burn if the server gets unresponsive under heavy load from hundreds of users.&#xD;&#xA;&#xD;&#xA;Second Life's vehicle physics are just badly implemented. (Is this still alive?)" />
  <row Id="18673" PostHistoryTypeId="5" PostId="9055" RevisionGUID="0bceee7a-377d-4fc0-9948-db6ebe453e6b" CreationDate="2011-02-26T20:04:51.317" UserId="962" Comment="deleted 34 characters in body" Text="I would like to apply (program) the Artificial intelligence methods to create a intelligent game bots for a first person shooter game. Do you have any knowledge from where can I start to develop as a Linux user? Do you have a suggestion for an easy-to-start game for which I can develop bots easily, caring more about the result of my algorithms rather than spending a lot of time dealing with the game code? I've read some publications about the applied methods to Quake 3 (c) and Open Arena. But I couldn't find the source codes and manuals describing how to start coding( for compiling, developing ai and etc.).&#xD;&#xA;&#xD;&#xA;I appreciate your help." />
  <row Id="18674" PostHistoryTypeId="2" PostId="9065" RevisionGUID="1b649b1f-7fbe-4bb5-a5d4-f97e8e5e7d48" CreationDate="2011-02-26T20:13:41.510" UserId="5665" Text="I'm sure you could find an XDK via Google and piracy websites, but the fact is the unsigned executables wont run on anything but an Xbox 360 development kit from Microsoft, the executables can only be signed though Microsoft, and if you found an open source version you wouldn't really be learning the actual Microsoft XDK used to program Xbox 360 games commercially. " />
  <row Id="18675" PostHistoryTypeId="25" PostId="9061" RevisionGUID="b786059a-87a0-43fd-9644-0f7e24f56a2d" CreationDate="2011-02-26T20:22:58.543" Comment="http://twitter.com/#!/StackGameDev/status/41594090822828033" />
  <row Id="18676" PostHistoryTypeId="5" PostId="8992" RevisionGUID="dc7f024f-748e-4660-808c-cced86aa67db" CreationDate="2011-02-26T20:30:45.127" UserId="5677" Comment="deleted 1 characters in body" Text="Pretty new to the whole game development scene, but I have experience in other branches of programming. Anyway, I was wondering what methods are used to implement a skill structure. I imagine a skill in itself would a class. I'm using actionscript 3 for this project btw.&#xD;&#xA;&#xD;&#xA;    	public class Skill&#xD;&#xA;	{&#xD;&#xA;		public var power:int;&#xD;&#xA;		public var delay:int;&#xD;&#xA;		public var cooldown:int;&#xD;&#xA;		&#xD;&#xA;		public function Skill(user:Mob, target:Mob) &#xD;&#xA;		{&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Each skill would extend the Skill class and add it's own functionality.&#xD;&#xA;&#xD;&#xA;    	public class Tackle extends Skill&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		public function Tackle(user:Mob, target:Mob) &#xD;&#xA;		{&#xD;&#xA;			super(user, target);&#xD;&#xA;			executeAttack();&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function executeAttack():void &#xD;&#xA;		{&#xD;&#xA;			//multiply user.strength with power etc&#xD;&#xA;			//play attack animation&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This where I get stuck. How do I termine which mobs has which skills? And which skill will they later be able to retrieve (by reaching a certain level etc).&#xD;&#xA;How does the player actually execute the skill and how is it determine if it hits. It's all very new to me so I have no idea where to begin. &#xD;&#xA;Any links would also be appreciated. &#xD;&#xA;Thanks in advance.&#xD;&#xA;" />
  <row Id="18677" PostHistoryTypeId="2" PostId="9066" RevisionGUID="ade0d603-e785-4b82-94b7-435b6a8a0948" CreationDate="2011-02-26T20:36:44.017" UserId="2798" Text="You **don't** refill buffers every frame unless it's totally necessary, because this has a great performance penalty (copying data from CPU to GPU is no trivial task).&#xD;&#xA;&#xD;&#xA;Create a VBO for each texture type, and fill it once (on map load, or whenever you want) with the data of those tiles. Then, iterate your tile texture array, set the active texture and then draw the corresponding VBO.&#xD;&#xA;&#xD;&#xA;Keep in mind that this solution is very inflexible (in case your map changes dinamically), but for static tile maps is the best solution." />
  <row Id="18678" PostHistoryTypeId="2" PostId="9067" RevisionGUID="63083270-4797-4cfe-96c9-eebe7e7d5632" CreationDate="2011-02-26T20:39:14.577" UserId="2798" Text="Yes, that's the basics of blending: you must manually sort your objects from farther to closer, so when object B is drawn and occludes A, the alpha function merges the two colors correctly. Also, disable depth writing when drawing transparent object." />
  <row Id="18679" PostHistoryTypeId="5" PostId="8993" RevisionGUID="47a7db93-72da-4e80-817c-118734ea705a" CreationDate="2011-02-26T21:41:22.073" UserId="3656" Comment="Fixed Vector.&lt;Skill&gt;" Text="There's a lot of different directions you could go with this. What kind of game are you making, and what does type Mob represent? It sounds like you need to separate your concerns more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; How do I termine which mobs has which skills?&#xD;&#xA;&#xD;&#xA;If each skill is its own class, and each skill extends the Skill class, then that leads me to think you should have a `Vector.&lt;Skill&gt;` field in the Mob class.&#xD;&#xA;&#xD;&#xA;Assuming you need to instantiate the skill for purposes of state management (like cooldowns and other things), then this Vector.&lt;Skill&gt; would contain objects which are-a Skill. To search for a specific skill, it could be useful to give Skill a property called Name which is overridden by subclasses of Skill. Then you can search through a mob's Vector.&lt;Skill&gt; looking at the name of each skill until you find the one you're looking for.&#xD;&#xA;&#xD;&#xA;A more robust solution would be to analyze your gameplay such that you don't even need to subclass Skill, and you could create entirely new skills by setting the properties of the skill class accordingly.&#xD;&#xA;&#xD;&#xA;&gt;And which skill will they later be able to retrieve (by reaching a certain level etc).&#xD;&#xA;&#xD;&#xA;This is a larger architecture question. &#xD;&#xA;&#xD;&#xA;&gt;How does the player actually execute the skill&#xD;&#xA;&#xD;&#xA;Presumably, the player is a Mob, and there's a keyboard mapping such that Attack gets called. Why do you have a separate function, executeAttack defined in the Tackle class?&#xD;&#xA;&#xD;&#xA;&gt;and how is it determine if it hits.&#xD;&#xA;&#xD;&#xA;This is something you need to decide. Read up on collision detection for checking if a point intersects a region on the screen, or find a D&amp;D rulebook and look at how the Difficult Class system works.&#xD;&#xA;&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;It sounds like you're biting off more than you can chew. Try breaking this game down into something simpler. Build individual aspects of it into smaller games, then as you learn more you will be able to assemble the bits and pieces you've learned on the way into something bigger." />
  <row Id="18680" PostHistoryTypeId="2" PostId="9068" RevisionGUID="d15f6689-f286-4277-b515-0c7924055c7a" CreationDate="2011-02-26T21:50:11.770" UserId="2710" Text="Yes and no (but mostly, no).&#xD;&#xA;&#xD;&#xA;Any MMO game has several limitations that affect its physics. The most important of these is _latency_. Latency is time it takes a client to send a request to server and receive an answer back. Even in very best circumstances, this time is around 50-100 milliseconds. In real world, it can be as high as 500 ms. This means, that whenever a players does something - like, say, turns his car's wheel - he can see the game react to it only 100-500 ms later.&#xD;&#xA;&#xD;&#xA;100 ms is actually quite a lot. Any game that has as much latency will feel unresponsive, and 500 ms feels downright unplayable. That's why game clients employ a lot of tricks to mask this latency. For example, the player's car can begin turning the moment he turns the wheel, without waiting for the server. However, these tricks only _mask_ latency, and can never actually reduce it.&#xD;&#xA;&#xD;&#xA;Suppose, for example, that we have _two_ players in cars steering simultaneously towards one another. Each client will start turning its _own_ car immediately; but the _other_ player's car will not turn - because the information of it changing course has not yet reached the client, because of latency. Both players happily steer theirs cars, and then bam! - the server notices that they actually crashed into each other. &#xD;&#xA;&#xD;&#xA;Situations like this cannot be prevented. No matter what clever prediction schemes we use, where there are other players, there's always a chance for things to go wrong. In any MMO game, about half a second that you just saw _hasn't really happened yet_, and can change in any moment. Now, in slower-paced games like traditional MMORPG's, half a second is not really that long. Characters only move maybe a meter or two during this time. However, if we're talking about fast-paced car race, half a second is a really long time! You could crash, like, three times in half a second (-8&#xD;&#xA;&#xD;&#xA;Actually, a fast-paced game can work even with these limitations. It would have some unpleasant moments, but as long as all players have good connections, it would be playable. That's how multiplayer racing games work. However, there's another MMO limitation: the N-squared update count.&#xD;&#xA;&#xD;&#xA;Imagine 10 players playing simultaneously. For them to see each other, the server has to send every player information about every other player. This means, in our example, 10x10 = 100 pieces of information to prepare and send. That's the number of players squared, hence &quot;N-squared&quot;. This number grows quite fast, and even traditional MMORPG's begin to struggle when there are lots of players in the same area. For our imaginary fast-paced game with cars, these pieces of information have to be sent much faster than in a slower game. AND they probably are bigger themselves - you have se send not only positions, but velocities, acceleration, angular velocities etc. This means that any fast multi-player game can only have a limited number of players.&#xD;&#xA;&#xD;&#xA;Both above problems _cannot_ in principle be solved by software, only masked to some extent. They can be reduced a bit by limiting number of players - so, for example, a game where fast cars are only used in instances with limited number of players is probably doable. I believe that's what APB did. But a full open-world MMO game with fast cars is just not gonna happen. Not until we have quantum-entaglement network interfaces or something." />
  <row Id="18682" PostHistoryTypeId="2" PostId="9069" RevisionGUID="7021d0d5-613b-4c59-83c9-3b47c560c4bb" CreationDate="2011-02-26T22:30:17.637" UserId="5729" Text="Many RPGs and MMOs offer a system for creating a character model, with varying levels of customization. Are there any open source libraries for this? Any libraries which can be licensed? Has anyone built anything related to this themselves?" />
  <row Id="18683" PostHistoryTypeId="1" PostId="9069" RevisionGUID="7021d0d5-613b-4c59-83c9-3b47c560c4bb" CreationDate="2011-02-26T22:30:17.637" UserId="5729" Text="What solutions are available for 3d character creation/editing in games?" />
  <row Id="18684" PostHistoryTypeId="3" PostId="9069" RevisionGUID="7021d0d5-613b-4c59-83c9-3b47c560c4bb" CreationDate="2011-02-26T22:30:17.637" UserId="5729" Text="&lt;3d&gt;&lt;character&gt;" />
  <row Id="18685" PostHistoryTypeId="2" PostId="9070" RevisionGUID="d55bf43d-cefe-4dfd-8ef3-0188a1daf011" CreationDate="2011-02-26T23:10:14.447" UserId="370" Text="You are asking the wrong question.  You're making the mistake many new game programmers make.  Games are ___not___ perfect simulations, they aren't even close.  Games simulate just enough to be fun/interesting.  Everything else is faked.&#xD;&#xA;&#xD;&#xA;Case in point:  &#xD;&#xA;World of Goo: simulates mass, tensile strength, and elasticity.  The rest is faked because it doesn't add the feel of the game.  For instance it doesn't simulate gravity.  All objects accelerate down with constant force.  Boyancy is faked.  Ballons pull up with a constant force and goo balls under water experience a constant upward force as well.  This all works great for the game.  It would however break down if you tried to make a space elevator using World of Goo's physics engine.&#xD;&#xA;&#xD;&#xA;Lets imagine a near perfect physics based sound engine.  What about environmental effects?  Is the flute in a cave or in a field.  Does the engine provide a predefined set of environments(how many?) or does it figure it out by calculating the actual physical topography(yeah right)?  Does the player have directional ears (ala human) or just ear holes (ala dolphin or alien) or multidirectional like an animal?  Is the air hot?  How humid is it.  This list can quickly get out of control.  &#xD;&#xA;&#xD;&#xA;Now assume for a moment such true physics sound engine existed.  Would you really want to use it to make a game?  How long would it take you to define the sound of flute flying through the air.  How many parameter do you have to get just right (100's?).&#xD;&#xA;&#xD;&#xA;What you should have asked is:  &#xD;&#xA;_How can I simulate the sound a flute when it flies past the player?_&#xD;&#xA;&#xD;&#xA;OpenAL can do what you want.&#xD;&#xA;&#xD;&#xA;* Directional listener&#xD;&#xA;* Directional sound sources&#xD;&#xA;* source velocities and doppler effects.&#xD;&#xA;&#xD;&#xA;I would suggest having a repeating sound effect of a spinning flute. Input the player position and the flute's position/velocity.  Skip the directional stuff for now.  &#xD;&#xA;You could record the sound that comes from each end of a flute as the air flows by and have the flute use two sound sources.  But I doubt it would be worth the effort unless the whole game mechanic revolved around thrown and spinning flutes.&#xD;&#xA;" />
  <row Id="18686" PostHistoryTypeId="25" PostId="9069" RevisionGUID="f72914e0-d839-4e5e-b705-f703579e79f5" CreationDate="2011-02-26T23:22:59.560" Comment="http://twitter.com/#!/StackGameDev/status/41639392527388672" />
  <row Id="18687" PostHistoryTypeId="2" PostId="9071" RevisionGUID="859ca68f-8982-4554-8580-d90436bfb408" CreationDate="2011-02-26T23:24:49.227" UserId="5586" Text="The book &quot;Programming Game AI by Example&quot; (by Mat Buckland) is a great way to start. and as the title says, example code/game is included." />
  <row Id="18688" PostHistoryTypeId="2" PostId="9072" RevisionGUID="5db55b94-38b9-4674-89d1-2e3abaacd8b8" CreationDate="2011-02-27T00:45:34.020" UserId="5717" Text="Have you considered using a [Hilbert R-Tree][1]? I use it for doing computation on points with CUDA on the GPU, since &quot;flattening&quot; out multidimensional data in this way preserves data locality and results in fewer cache misses.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hilbert_R-tree" />
  <row Id="18689" PostHistoryTypeId="2" PostId="9073" RevisionGUID="b3c80fe0-77f2-42be-af16-20da6db95155" CreationDate="2011-02-27T01:23:44.630" UserId="2332" Text="There is software available to perform epilepsy testing as defined by OFCOM, known as the [Harding Test][1].&#xD;&#xA;&#xD;&#xA;Unfortunately, the software seems to be commercial only and requires a data capture card for it to run, so it's not the most financially feasible solution for an indie dev. This can be found here: http://www.hardingfpa.tv/&#xD;&#xA;&#xD;&#xA;However, there is an alternative for smaller companies at http://www.hardingtest.com which has reasonable rates without needing a dedicated machine to carry out the testing for you (you just upload a video of gameplay) - £75 for under 30 minutes, which isn't too bad.&#xD;&#xA;&#xD;&#xA;A warning should be more than sufficient and covers your back should anything unfortunate arise from a user playing your game, but if you do want to get it tested, the option is there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Harding_test" />
  <row Id="18690" PostHistoryTypeId="5" PostId="9047" RevisionGUID="2da2fdf4-bd3d-488b-a5ef-f131c16bf096" CreationDate="2011-02-27T02:11:58.143" UserId="3794" Comment="corrected spelling" Text="As GLUT exists, there is also DXUT. **DXUT** is &quot;sample framework&quot; over directx. It helps you to create window or handling user imputs (as GLUT also does) and also alows to draw primitives (box, cylinder, polygon, sphere, torus and teapot)&#xD;&#xA;&#xD;&#xA;Working and commented examples of DXUT can be found Microsoft DirectX SDK.&#xD;&#xA;&#xD;&#xA; - [DirectX SDK][1] &#xD;&#xA; - [DXUT documentation][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/directx/aa937788&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee417527(v=vs.85).aspx" />
  <row Id="18691" PostHistoryTypeId="25" PostId="9056" RevisionGUID="49fa53f1-001f-42c3-9eae-3691c20593b8" CreationDate="2011-02-27T02:22:59.620" Comment="http://twitter.com/#!/StackGameDev/status/41684691132096512" />
  <row Id="18692" PostHistoryTypeId="2" PostId="9074" RevisionGUID="af4af3c4-136e-463e-9d4d-372930a34f8d" CreationDate="2011-02-27T03:03:20.100" UserId="5006" Text="For a solid general purpose software developer, what specifically is different about game development, either fundamentally or just differences in degree?&#xD;&#xA;&#xD;&#xA;I've done toy games like Tic-tac-toe, Tetris, and a brute-force sudoku solver (with UI) and I'm now embarking on a mid-sized project (mid-sized for being a single developer and not having done many games) and one thing I've found with this particular project is that separation of concerns is a lot harder since everything affects state, and every object can interact with every other object in a myriad of ways.&#xD;&#xA;&#xD;&#xA;So far I've managed to keep the code reasonably clean for my satisfaction but I find that keeping clean code in non-trivial games is a lot harder than it is for my day job.&#xD;&#xA;&#xD;&#xA;The game I'm working on is turn-based and the graphics are going to be fairly simple (web-based, mostly through DOM manipulation) so real time and 3d work aren't really applicable to me, but I'd still be interested in answers regarding those if they're interesting.  Mostly interested in general game logic though.&#xD;&#xA;&#xD;&#xA;P.S. Feel free to retag this, I'm not really sure what tags are applicable.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18693" PostHistoryTypeId="1" PostId="9074" RevisionGUID="af4af3c4-136e-463e-9d4d-372930a34f8d" CreationDate="2011-02-27T03:03:20.100" UserId="5006" Text="How is game development different from other software development?" />
  <row Id="18694" PostHistoryTypeId="3" PostId="9074" RevisionGUID="af4af3c4-136e-463e-9d4d-372930a34f8d" CreationDate="2011-02-27T03:03:20.100" UserId="5006" Text="&lt;game-design&gt;" />
  <row Id="18695" PostHistoryTypeId="2" PostId="9075" RevisionGUID="d501b591-7408-4c94-a684-0926d765f8b7" CreationDate="2011-02-27T05:04:57.190" UserId="4690" Text="A group that studied the Pokemon epilepsy phenomenon came up with the following recommendations: &#xD;&#xA;&#xD;&#xA; - Flashing images, especially those&#xD;&#xA;   with red, should not flicker faster&#xD;&#xA;   than three times per second. If the&#xD;&#xA;   image does not have red, it still&#xD;&#xA;   should not flicker faster than five&#xD;&#xA;   times per second. &#xD;&#xA; - Flashing images&#xD;&#xA;   should not be displayed for a total&#xD;&#xA;   duration of more than two seconds.&#xD;&#xA;   &#xD;&#xA; - Stripes, whirls and concentric&#xD;&#xA;   circles should not take up a large&#xD;&#xA;   part of the television screen.&#xD;&#xA;&#xD;&#xA;Note that these are just recommendations, not cut-and-dry human thresholds for epileptic triggers. If your game violates any of these guiding principles, there is a good chance it may be dangerous; however, if it doesn't, that's still no guarantee that it is safe.&#xD;&#xA;&#xD;&#xA;Sources: http://en.wikipedia.org/wiki/Denn%C5%8D_Senshi_Porygon&#xD;&#xA;http://onlinelibrary.wiley.com/doi/10.1111/j.0013-9580.2004.18903.x/abstract" />
  <row Id="18696" PostHistoryTypeId="5" PostId="9045" RevisionGUID="e2b44b29-990e-4943-87c4-91d7544e50e5" CreationDate="2011-02-27T05:17:35.420" UserId="5717" Comment="Included link to cross-post on NVIDIA forums." Text="I develop CUDA applications on my Alienware M17x portable back-breaker, which has two discrete GTX 285M GPUs and one integrated GeForce 9400M GPU. I can currently switch between them using NVIDIA's software, but I would like the ability to do so within my applications for purposes of benchmarking and general convenience. Apparently this requires the &quot;NDA version&quot; of NVIDIA's Driver API, which I know not how to obtain. Would using this API be the only way to accomplish what I seek, and if so, how would I obtain it? A solution using Windows APIs would also be acceptable, though less preferable to one which would leverage a cross-platform API. I have created a similar thread concerning the matter on NVIDIA's forum, which is down at the time of this writing.&#xD;&#xA;&#xD;&#xA;Thanks for reading my question; it is much appreciated!&#xD;&#xA;&#xD;&#xA;Edit: Here's a [link][1] to the original post I made on the NVIDIA forums - no luck on either site yet, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.nvidia.com/index.php?showtopic=194143" />
  <row Id="18697" PostHistoryTypeId="25" PostId="9074" RevisionGUID="ba1b9c08-ef0e-4326-bfeb-3354e979da11" CreationDate="2011-02-27T05:22:59.703" Comment="http://twitter.com/#!/StackGameDev/status/41729990009556992" />
  <row Id="18698" PostHistoryTypeId="2" PostId="9076" RevisionGUID="e4eaa40d-8a5a-420a-8a1c-34461ef12e5b" CreationDate="2011-02-27T05:25:47.047" UserId="8316" Text="Timer can handle it, your main concern will be memory usage with thousands of requests. &#xD;&#xA;&#xD;&#xA;A suggestion is to create an Async timer with a callback to signal the table or player of an action. The function signature is this :&#xD;&#xA;&#xD;&#xA;    Timer( TimerCallback callback, object state, uint dueTime, uint period)&#xD;&#xA;&#xD;&#xA;so instead of keeping track of the timer queue yourself and having some heavy logic, you can just add a timer with a callback to your logic, and pass th&#xD;&#xA;&#xD;&#xA;    void HandleAction (object state)&#xD;&#xA;          {&#xD;&#xA;             //Do the work here&#xD;&#xA;          }&#xD;&#xA;     &#xD;&#xA;          static void CreateTimer( )&#xD;&#xA;          {&#xD;&#xA;             Program p = new Program(); &#xD;&#xA;                &#xD;&#xA;             Timer myTimer = new Timer&#xD;&#xA;                (p.HandleAction, //method&#xD;&#xA;                   &quot;Parameter to pass to the function.&quot;, //parameter&#xD;&#xA;                   2000,   // execute this after 2 seconds&#xD;&#xA;                   1000);  // Repeat every second &#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="18699" PostHistoryTypeId="2" PostId="9077" RevisionGUID="81d97026-bea5-4bbb-bf97-e76a84fc5dbf" CreationDate="2011-02-27T06:05:39.403" UserId="4360" Text="Node.js is the answer. I've used it to develop a realtime multiplayer shooting game, and it took about 1 month from start to finish. It presented some unique challenges, such that it needed to have minimal latency, and all players must stay in sync within another for the concept to work.&#xD;&#xA;&#xD;&#xA;The client side, and server side are both written in javascript and share classes / logic between each other. That starts to count when trying to fix bugs, as you don't have to implement everything twice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The game has been up, for about 2 months, without being restarted and thousands of matches have been played. &#xD;&#xA;&#xD;&#xA;Socket.io is an implmentation of sockets and uses node.js, however it is too bloated at this point for a game. There are other websocket implementations on github for node.js and also examples of games using it." />
  <row Id="18700" PostHistoryTypeId="2" PostId="9078" RevisionGUID="be0367a8-2d35-44d2-9da2-86dd72448ba1" CreationDate="2011-02-27T06:43:00.633" UserId="5223" Text="&gt;  and one thing I've found with this particular project is that separation of concerns is a lot harder since everything affects state, and every object can interact with every other object in a myriad of ways.&#xD;&#xA;&#xD;&#xA;I think you have an answer there, there are a lots of interactions. I made a few games with XNA (C#), now im doing a mid-size game as you say, a strategy-simulation game, been working on it for almost 2 months now, and im do it alone with no help, so i must keep my code simple. One huge difference i think, is to understand and design some classes for functionality, and other for drawing, this helps and makes your program cleaner. Of course, if you are doing a game you need to have more resources, like images (2d or 3d) and music (or sounds). So there are differences, i think its harder, but its very funny." />
  <row Id="18701" PostHistoryTypeId="2" PostId="9079" RevisionGUID="0ceebaec-157d-49d1-b485-2acc8aff6438" CreationDate="2011-02-27T08:09:59.837" UserId="3793" Text="I'm primarily a game developer and not a traditional software developer, but I think there are several key differences.&#xD;&#xA;&#xD;&#xA;These are obviously several **generalizations** and not comprehensive:&lt;br&gt;&#xD;&#xA;Bigger teams. More varied backgrounds (artists, programmers, producers, with each there is even more variation). Longer development cycles. Higher standards of performance. Larger scale of projects. Bigger and more expensive risk of failure. More stressful environment.&#xD;&#xA;&#xD;&#xA;As for object interactions and laying out your architecture, you can still properly decouple systems. Your gameplay objects and behavior, will clearly have dependencies on each other and on these systems. That is the nature of the game though (pun intended), it combines all of these systems into a single, cohesive unit, and there's nothing wrong with that. It might seem so because the scale of it all is larger than you're accustomed to.&#xD;&#xA;&#xD;&#xA;Some easily identified and segregated systems?&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;Collision Detection&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Collision Response&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Physics&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Animation&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Graphics (2D and 3D)&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Artificial Intelligence&lt;/li&gt;&#xD;&#xA;&lt;li&gt;User Input&lt;/li&gt;&#xD;&#xA;&lt;li&gt;File Input/Output&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Networking&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;" />
  <row Id="18702" PostHistoryTypeId="25" PostId="9052" RevisionGUID="6217ced2-c69c-4d8e-b151-3e6e60b75b6a" CreationDate="2011-02-27T08:22:59.323" Comment="http://twitter.com/#!/StackGameDev/status/41775286999711744" />
  <row Id="18703" PostHistoryTypeId="25" PostId="9050" RevisionGUID="6fe88910-b060-447e-b46b-f6ded873ece0" CreationDate="2011-02-27T11:22:59.410" Comment="http://twitter.com/#!/StackGameDev/status/41820585986232320" />
  <row Id="18704" PostHistoryTypeId="2" PostId="9080" RevisionGUID="61fd29b9-82a7-4393-98d5-d84a09792c4d" CreationDate="2011-02-27T11:42:32.903" UserId="263" Text="As far as I know there is no way to do this from the CUDA APIs, and honestly I doubt that there is a publicly available way to do it at all. Switching the current graphics device is a deeply rooted OS thing, something that likely only the device driver itself can do. I've never heard of the device driver exposing that functionality to other software.&#xD;&#xA;&#xD;&#xA;There *might* be something buried deep in the Windows API that could do it, but I don't think a cross-platform solution exists because as far as I know switching graphics devices on the fly isn't supported in Linux at the moment. (I also have a laptop with two devices, an integrated Intel and discrete ATI FireGL, but for Linux I have to set the device specifically in the BIOS.)&#xD;&#xA;&#xD;&#xA;I think you're just to have to switch them by hand." />
  <row Id="18705" PostHistoryTypeId="2" PostId="9081" RevisionGUID="e658ba8a-349a-499b-a050-10e0406178c2" CreationDate="2011-02-27T11:58:40.820" UserDisplayName="user5736" Text="My game engine right now consists of a working singleplayer part. I'm now starting to think about how to do the multiplayer part.&#xD;&#xA;&#xD;&#xA;I have found out that many games actually don't have a real singleplayer mode, but when playing alone you are actually hosting a local server as well, and almost everything runs as if you were in multiplayer (except that the data packets can be passed over an alternate route for better performance)&#xD;&#xA;&#xD;&#xA;My engine would need major refactoring to adapt to this model. There would be three possible modes: Dedicated client, Dedicated server and Client-Server (listen mode)&#xD;&#xA;&#xD;&#xA;    * How often is the listen-server model used in the gaming industry?&#xD;&#xA;    * What are the (dis)advantages of it?&#xD;&#xA;    * What other options do I have?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18706" PostHistoryTypeId="1" PostId="9081" RevisionGUID="e658ba8a-349a-499b-a050-10e0406178c2" CreationDate="2011-02-27T11:58:40.820" UserDisplayName="user5736" Text="Game engine design: Multiplayer and listen servers" />
  <row Id="18707" PostHistoryTypeId="3" PostId="9081" RevisionGUID="e658ba8a-349a-499b-a050-10e0406178c2" CreationDate="2011-02-27T11:58:40.820" UserDisplayName="user5736" Text="&lt;engine&gt;&lt;multiplayer&gt;&lt;server&gt;" />
  <row Id="18708" PostHistoryTypeId="2" PostId="9082" RevisionGUID="9b443b62-50f6-4b90-bee8-0d492cfad57d" CreationDate="2011-02-27T12:04:26.427" UserId="263" Text="Actually doing an accurate simulation of the physics involved here would be substantially more complex (and computationally expensive) than a run-of-the-mill physics system like Havok or Bullet. A traditional physics system is optimized for rigid bodies and soft bodies, both of which are limited in their mesh complexity for speed reasons.&#xD;&#xA;&#xD;&#xA;Sound, on the other hand, is a propagation of waves through air, and the frequencies generated by something like your example are dependent on tons and tons of properties. What material it made of? What mathematical model should we use for air particles interacting with that material? If it's a tube shape, what are the dimensions of the tube? (This determines the resonant frequency.) Etc., etc.&#xD;&#xA;&#xD;&#xA;On top of all of this, you've got to run a pretty sophisticated particle simulation to model the air, as well as extracting particle motions waves which are essentially the sound waves hitting your eardrums. And let's not even mention the eardrums, because the resonance of the waves in your ear canal affects what you hear, too.&#xD;&#xA;&#xD;&#xA;All in all, this is way too much simulation for a current game to perform, especially if you have any hope of an interactive frame rate. As deft_code noted, games are rarely accurate simulations, but rather gloriously faked ones. The best way to approach this would probably be to start with a large sound sample set and start running things through a DSP until you've got a grasp of how you can impact the effect of those sounds. DSPs are definitely fast enough for real-time games, and if the sound would be a big component then it makes sense to devote a decent chunk of your frame time to sound processing.&#xD;&#xA;&#xD;&#xA;**tl;dr: Accurate simulation is probably out the question for many years to come. Great games fake it. With a large enough sample set and enough DSP tweaking you can probably fake it, too.**" />
  <row Id="18709" PostHistoryTypeId="2" PostId="9083" RevisionGUID="531fae14-75c2-4e6f-9718-39bd6cfeac7f" CreationDate="2011-02-27T13:06:48.447" UserId="2905" Text="I am looking for simple C library for Linux to load images from files into OpenGL textures. The licence should be quite liberal: zlib, bsd, mit or something. I have found Soil, however it hasn't been updated for a long time. Is there something else, or do I have to write my own?" />
  <row Id="18710" PostHistoryTypeId="1" PostId="9083" RevisionGUID="531fae14-75c2-4e6f-9718-39bd6cfeac7f" CreationDate="2011-02-27T13:06:48.447" UserId="2905" Text="Library to load images into textures, Linux, C and OpenGl." />
  <row Id="18711" PostHistoryTypeId="3" PostId="9083" RevisionGUID="531fae14-75c2-4e6f-9718-39bd6cfeac7f" CreationDate="2011-02-27T13:06:48.447" UserId="2905" Text="&lt;opengl&gt;&lt;textures&gt;&lt;c&gt;&lt;loading&gt;&lt;linux&gt;" />
  <row Id="18712" PostHistoryTypeId="2" PostId="9084" RevisionGUID="693d922c-c87e-4587-ae98-2c6eb267cac9" CreationDate="2011-02-27T13:18:19.980" UserId="4129" Text="SDL can load BMPs.  SDL_Image can load most other formats.&#xD;&#xA; &#xD;&#xA;You can then upload these `SDL_Surface`s to OpenGL.  There is an example here: http://gpwiki.org/index.php/SDL:Tutorials:Using_SDL_with_OpenGL&#xD;&#xA;&#xD;&#xA;If you are already using SDL, this is a good fit." />
  <row Id="18713" PostHistoryTypeId="5" PostId="9083" RevisionGUID="b754f1f9-5a0f-44af-a712-3b6b86820cc0" CreationDate="2011-02-27T13:32:44.820" UserId="2905" Comment="added 93 characters in body" Text="I am looking for simple, self-contained C library for Linux to load images from files into OpenGL textures. The licence should be quite liberal: zlib, bsd, mit or something. I have found Soil, however it hasn't been updated for a long time. Is there something else, or do I have to write my own?&#xD;&#xA;&#xD;&#xA;P.S.&#xD;&#xA;I use glfw. There are only deprecated functions for loading images." />
  <row Id="18714" PostHistoryTypeId="2" PostId="9085" RevisionGUID="b7a8a01a-d2d3-4bc6-a0d0-8c5a9f5697d6" CreationDate="2011-02-27T13:53:36.707" UserId="1624" Text="I'm in a multimedia class in college, and we're &quot;learning&quot; OpenGL as part of the class. I'm trying to figure out how the OpenGL camera vs. modelview works, and so I found [this][1] example. I'm trying to port the example to Python using the OpenGL bindings - it starts up OpenGL much faster, so for testing purposes it's a lot nicer - but I keep running into a stack overflow error with the glPushMatrix in this code:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;      def cube(): &#xD;&#xA;          for x in xrange(10):&#xD;&#xA;              glPushMatrix()&#xD;&#xA;              glTranslated(-positionx[x + 1] * 10, 0, -positionz[x + 1] * 10); #translate the cube&#xD;&#xA;              glutSolidCube(2); #draw the cube&#xD;&#xA;              glPopMatrix();&#xD;&#xA;&#xD;&#xA;According to [this reference][2], that happens when the matrix stack is full. &#xD;&#xA;&#xD;&#xA;So I thought, &quot;well, if it's full, let me just pop the matrix off the top of the stack, and there will be room&quot;. I modified the code to:&#xD;&#xA;&#xD;&#xA;      def cube(): &#xD;&#xA;          glPopMatrix()&#xD;&#xA;          for x in xrange(10):&#xD;&#xA;              glPushMatrix()&#xD;&#xA;              glTranslated(-positionx[x + 1] * 10, 0, -positionz[x + 1] * 10); #translate the cube&#xD;&#xA;              glutSolidCube(2); #draw the cube&#xD;&#xA;              glPopMatrix();&#xD;&#xA;&#xD;&#xA;And now I get a buffer underflow error - which apparently happens when the stack has only one matrix.&#xD;&#xA;&#xD;&#xA;So am I just waaay off base in my understanding? Or is there some way to increase the matrix stack size? &#xD;&#xA;&#xD;&#xA;Also, if anyone has some good (online) references (examples, etc.) for understanding how the camera/model matrices work together, I would sincerely appreciate them!&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;  [1]: http://www.swiftless.com/tutorials/opengl/camera2.html&#xD;&#xA;  [2]: http://pyopengl.sourceforge.net/documentation/manual/glPushMatrix.3G.xml&#xD;&#xA;" />
  <row Id="18715" PostHistoryTypeId="1" PostId="9085" RevisionGUID="b7a8a01a-d2d3-4bc6-a0d0-8c5a9f5697d6" CreationDate="2011-02-27T13:53:36.707" UserId="1624" Text="OpenGL - Stack overflow if I do, Stack underflow if I don't!" />
  <row Id="18716" PostHistoryTypeId="3" PostId="9085" RevisionGUID="b7a8a01a-d2d3-4bc6-a0d0-8c5a9f5697d6" CreationDate="2011-02-27T13:53:36.707" UserId="1624" Text="&lt;opengl&gt;&lt;python&gt;" />
  <row Id="18717" PostHistoryTypeId="2" PostId="9086" RevisionGUID="9e58b354-5bd7-4e08-aa25-6235bd3bca29" CreationDate="2011-02-27T14:07:01.900" UserId="744" Text="&lt;a href=&quot;http://www.lonesock.net/soil.html&quot;&gt;SOIL&lt;/a&gt; works great. Who cares if it hasn't been updated in a &quot;long time&quot;? That just means it's stable and well-understood.&#xD;&#xA;&#xD;&#xA;(It actually was updated in 2008, which is not long ago at all.)" />
  <row Id="18718" PostHistoryTypeId="2" PostId="9087" RevisionGUID="6f52a2ce-9a3e-4d27-9180-7357caacfbb1" CreationDate="2011-02-27T14:16:26.700" UserId="1887" Text="Check out [FreeImage][1]. It's dual-licensed, you may choose either GPL or the liberal FreeImage license. It supports far more image formats than SOIL and development is active.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeimage.sourceforge.net/" />
  <row Id="18719" PostHistoryTypeId="25" PostId="9083" RevisionGUID="2a8da6ad-7942-4514-86b7-ddd43fab44e2" CreationDate="2011-02-27T14:22:59.440" Comment="http://twitter.com/#!/StackGameDev/status/41865884620423168" />
  <row Id="18720" PostHistoryTypeId="5" PostId="9087" RevisionGUID="bb58b7d0-b9ed-43c0-96c9-ff805739ec29" CreationDate="2011-02-27T14:25:42.807" UserId="1887" Comment="added 53 characters in body" Text="Check out [FreeImage][1]. It's dual-licensed, you may choose either GPL or the liberal FreeImage license. It supports far more image formats than SOIL and development is active.&#xD;&#xA;&#xD;&#xA;Edit: I failed to notice FreeImage is C++. Sorry.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeimage.sourceforge.net/" />
  <row Id="18721" PostHistoryTypeId="12" PostId="9087" RevisionGUID="07042666-6f51-4f65-b8e4-cc28a62e6cb6" CreationDate="2011-02-27T14:26:01.420" UserId="1887" Text="[{&quot;Id&quot;:1887,&quot;DisplayName&quot;:&quot;Oskar N.&quot;}]" />
  <row Id="18722" PostHistoryTypeId="5" PostId="9083" RevisionGUID="4a2a8c62-b752-45b3-a526-425b61af8db6" CreationDate="2011-02-27T14:32:06.233" UserId="2905" Comment="added 37 characters in body" Text="I am looking for simple, self-contained C library for Linux to load images from files into OpenGL textures. The licence should be quite liberal: zlib, bsd, mit or something. I have found [SOIL](http://www.lonesock.net/soil.html), however it hasn't been updated for a long time. Is there something else, or do I have to write my own?&#xD;&#xA;&#xD;&#xA;P.S.&#xD;&#xA;I use glfw. There are only deprecated functions for loading images." />
  <row Id="18723" PostHistoryTypeId="2" PostId="9088" RevisionGUID="f1b970f3-a4d0-46cd-bc1e-da0a500c6011" CreationDate="2011-02-27T14:39:42.430" UserId="2798" Text="Have a look at [DevIL][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://openil.sourceforge.net/" />
  <row Id="18724" PostHistoryTypeId="2" PostId="9089" RevisionGUID="fbec60ed-12f8-4b2c-9383-41f461595dfc" CreationDate="2011-02-27T15:20:58.113" UserId="5678" Text="There is one major difference. In my opinion, it's the only difference that really matters.&#xD;&#xA;&#xD;&#xA;We can go over the technical details of why it's different, sure. 3D engines, particle physics, lots of different things come into play.&#xD;&#xA;&#xD;&#xA;But lots of different forms of software have strings attached. Modeling software has to do a lot of the same things. Every piece of significant software has some specialized library it has to use.&#xD;&#xA;&#xD;&#xA;So what makes GAMES different?&#xD;&#xA;&#xD;&#xA;Here it is: Software is designed to fill a business need. You want an inventory system? You can define what types of items you ahve to handle. You can define what you want for your production scheduling. You can do all that. Or if you want banking software, you can define what you want to do with it.&#xD;&#xA;&#xD;&#xA;**With games, your business need is &quot;fun&quot;. Try writing a technical specification for &quot;fun&quot;.**&#xD;&#xA;&#xD;&#xA;That, in my humble opinion as a developer, is what makes games different than regular software. You simply can't say &quot;Great! This software is now feature complete as per the client's requests!&quot; because all they want to do is have fun.&#xD;&#xA;&#xD;&#xA;That being said, you don't need 3d graphics and extravagant physics for something to be fun. Why do people still play Tetris? Its physics consist of &quot;move block down&quot; &quot;don't let block go out of bounds&quot; and &quot;stop block when it hits something&quot;, and while over the years there have been numerous versions, some with fancier graphics than others, but the bottom line is -- **it's fun!!**&#xD;&#xA;&#xD;&#xA;So if you want to be a great game developer, do not throw out what you've learned as a regular software developer. It's still very useful stuff. And @Sion is right about separating your components, just like you would in a regular piece of software. But the single most important feature you can add to your game is fun. Fun fun fun fun fun. That's why game development exists, that's what you need to make your game successful. And trust me on this **however fun it is to play, it's at least 10x as fun to make!!**&#xD;&#xA;&#xD;&#xA;Good luck with your game-dev'ing!! :D" />
  <row Id="18725" PostHistoryTypeId="5" PostId="9087" RevisionGUID="66ef2359-ac59-4bde-9480-21538ca860e0" CreationDate="2011-02-27T15:48:20.027" UserId="1887" Comment="added 238 characters in body" Text="Check out [FreeImage][1]. It's dual-licensed, you may choose either GPL or the liberal FreeImage license. It supports far more image formats than SOIL and development is active.&#xD;&#xA;&#xD;&#xA;The library itself is written in C++, but it has an ANSI C interface.&#xD;&#xA;&#xD;&#xA;From its introduction:&#xD;&#xA;&gt; Thanks to it's ANSI C interface, FreeImage is usable in many languages including C, C++, VB, C#, Delphi, Java and also in common scripting languages such as Perl, Python, PHP, TCL or Ruby.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeimage.sourceforge.net/" />
  <row Id="18726" PostHistoryTypeId="13" PostId="9087" RevisionGUID="2032b2a6-bd98-4e3b-a1e3-4e330b5c2ac3" CreationDate="2011-02-27T15:48:30.103" UserId="1887" Text="[{&quot;Id&quot;:1887,&quot;DisplayName&quot;:&quot;Oskar N.&quot;}]" />
  <row Id="18730" PostHistoryTypeId="2" PostId="9091" RevisionGUID="0d4e17d1-5462-466b-ae84-00bf5c72bc82" CreationDate="2011-02-27T16:56:25.787" UserId="5050" Text="I recently had to solve this myself for a WebGL application. I've attached the complete source code, but incase it doesn't work right off the bat for you here are some debugging tips:&#xD;&#xA;&#xD;&#xA; 1. Don't debug your unproject method in your game. If possible, try to write unit-test style tests to make it easier to isolate what is going wrong.&#xD;&#xA; 2. Be sure to print the output rays for both the near and far clipping planes.&#xD;&#xA; 3. Remember that matrix math is NOT communicative. A x C != C x A. Double check your math.&#xD;&#xA;&#xD;&#xA;Also, to reply to some comments above, you almost never want to use OpenGL's selection APIs. That helps you pick existing items, like if you were creating a menu, however it fails to perform most real-world scenarios like 3D model editing. Where you need to add geometry as a result of the click. &#xD;&#xA;&#xD;&#xA;Here is my implementation. There is nothing magic going on here. Just JavaScript and Google's Closure library.&#xD;&#xA;&#xD;&#xA;###gluUnProject###&#xD;&#xA;    /**&#xD;&#xA;     * Port of gluUnProject. Unprojects a 2D screen coordinate into the model-view&#xD;&#xA;     * coordinates.&#xD;&#xA;     * @param {Number} winX The window point for the x value.&#xD;&#xA;     * @param {Number} winY The window point for the y value.&#xD;&#xA;     * @param {Number} winZ The window point for the z value. This should range&#xD;&#xA;     *    between 0 and 1. 0 meaning the near clipping plane and 1 for the far.&#xD;&#xA;     * @param {goog.math.Matrix} modelViewMatrix The model-view matrix.&#xD;&#xA;     * @param {goog.math.Matrix} projectMatrix The projection matrix.&#xD;&#xA;     * @param {Array.&lt;Number&gt;} view the viewport coordinate array.&#xD;&#xA;     * @param {Array.&lt;Number&gt;} objPos the model point result.&#xD;&#xA;     * @return {Boolean} Whether or not the unprojection was successful.&#xD;&#xA;     */&#xD;&#xA;    octorok.math.Matrix.gluUnProject = function(winX, winY, winZ,&#xD;&#xA;    					    modelViewMatrix, projectionMatrix,&#xD;&#xA;    					    viewPort, objPos) {&#xD;&#xA;      // Compute the inverse of the perspective x model-view matrix.&#xD;&#xA;      /** @type {goog.math.Matrix} */&#xD;&#xA;      var transformMatrix =&#xD;&#xA;        projectionMatrix.multiply(modelViewMatrix).getInverse();&#xD;&#xA;    &#xD;&#xA;      // Transformation of normalized coordinates (-1 to 1).&#xD;&#xA;      /** @type {Array.&lt;Number&gt;} */&#xD;&#xA;      var inVector = [&#xD;&#xA;        (winX - viewPort[0]) / viewPort[2] * 2.0 - 1.0,&#xD;&#xA;        (winY - viewPort[1]) / viewPort[3] * 2.0 - 1.0,&#xD;&#xA;        2.0 * winZ - 1.0,&#xD;&#xA;        1.0 ];&#xD;&#xA;    &#xD;&#xA;      // Now transform that vector into object coordinates.&#xD;&#xA;      /** @type {goog.math.Matrix} */&#xD;&#xA;      // Flip 1x4 to 4x1. (Alternately use different matrix ctor.&#xD;&#xA;      var inMatrix = new goog.math.Matrix([ inVector ]).getTranspose();&#xD;&#xA;      /** @type {goog.math.Matrix} */&#xD;&#xA;      var resultMtx = transformMatrix.multiply(inMatrix);&#xD;&#xA;      /** @type {Array.&lt;Number&gt;} */&#xD;&#xA;      var resultArr = [&#xD;&#xA;        resultMtx.getValueAt(0, 0),&#xD;&#xA;        resultMtx.getValueAt(1, 0),&#xD;&#xA;        resultMtx.getValueAt(2, 0),&#xD;&#xA;        resultMtx.getValueAt(3, 0) ];&#xD;&#xA;    &#xD;&#xA;      if (resultArr[3] == 0.0) {&#xD;&#xA;        return false;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      // Invert to normalize x, y, and z values.&#xD;&#xA;      resultArr[3] = 1.0 / resultArr[3];&#xD;&#xA;    &#xD;&#xA;      objPos[0] = resultArr[0] * resultArr[3];&#xD;&#xA;      objPos[1] = resultArr[1] * resultArr[3];&#xD;&#xA;      objPos[2] = resultArr[2] * resultArr[3];&#xD;&#xA;    &#xD;&#xA;      return true;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;###Usage###&#xD;&#xA;&#xD;&#xA;      this.sys.event_mouseClicked = function(event) {&#xD;&#xA;        // Relative x and y are computed via magic by SystemModule.&#xD;&#xA;        // Should range from 0 .. viewport width/height.&#xD;&#xA;        var winX = event.relativeX;&#xD;&#xA;        var winY = event.relativeY;&#xD;&#xA;        window.console.log('Camera at [' + me.camera.position_ + ']');&#xD;&#xA;        window.console.log('Clicked [' + winX + ', ' + winY + ']');&#xD;&#xA;    &#xD;&#xA;        // viewportOriginX, viewportOriginY, viewportWidth, viewportHeight&#xD;&#xA;        var viewPort = [0, 0, event.viewPortWidth, event.viewPortHeight];&#xD;&#xA;        var objPos = [];  // out parameter.&#xD;&#xA;    &#xD;&#xA;        // The camera's model-view matrix is the result of gluLookAt.&#xD;&#xA;        var modelViewMatrix = me.camera.getCameraMatrix();&#xD;&#xA;        // The perspective matrix is the result of gluPerspective.&#xD;&#xA;        var perspectiveMatrix = pMatrix.get();&#xD;&#xA;    &#xD;&#xA;        // Ray start&#xD;&#xA;        var result1 = octorok.math.Matrix.gluUnProject(&#xD;&#xA;          winX, winY, 0.0,&#xD;&#xA;          modelViewMatrix, perspectiveMatrix,&#xD;&#xA;          viewPort, objPos);&#xD;&#xA;        window.console.log('Seg start: ' + objPos + ' (result:' + result1 + ')');&#xD;&#xA;    &#xD;&#xA;        // Ray end&#xD;&#xA;        var result2 = octorok.math.Matrix.gluUnProject(&#xD;&#xA;          winX, winY, 1.0,&#xD;&#xA;          modelViewMatrix, perspectiveMatrix,&#xD;&#xA;          viewPort, objPos);&#xD;&#xA;        window.console.log('Seg end: ' + objPos + ' (result:' + result2 + ')');&#xD;&#xA;      };&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18733" PostHistoryTypeId="2" PostId="9092" RevisionGUID="ea83816a-cb6f-4077-816e-990f40a1bbb5" CreationDate="2011-02-27T17:05:36.953" UserId="2792" Text="I use [STB Image][1] for most image loading. A small self contained no strings attached implementation of png and other file formats.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nothings.org/stb_image.c &quot;STB Image&quot;" />
  <row Id="18734" PostHistoryTypeId="2" PostId="9093" RevisionGUID="306218d3-88b1-48d3-bea3-56dc553f2966" CreationDate="2011-02-27T17:22:12.177" UserId="3644" Text="Are you sure the loop is running like so:&#xD;&#xA;&#xD;&#xA;&gt; def cube():&#xD;&#xA;&gt;&#xD;&#xA;&gt;     for x in xrange(10):&#xD;&#xA;&gt;     {&#xD;&#xA;&gt;               glPushMatrix();&#xD;&#xA;&gt;               glTranslated(-positionx[x + 1] * 10, 0, -positionz[x + 1] * 10);&#xD;&#xA;&gt;               glutSolidCube(2); #draw the cube&#xD;&#xA;&gt;               glPopMatrix();&#xD;&#xA;&gt;     }&#xD;&#xA;&#xD;&#xA;Otherwise you get a stack of unpoped matrices" />
  <row Id="18735" PostHistoryTypeId="25" PostId="9085" RevisionGUID="bd5a96d0-de59-4db6-8451-c227378650c3" CreationDate="2011-02-27T17:22:59.620" Comment="http://twitter.com/#!/StackGameDev/status/41911183741169664" />
  <row Id="18736" PostHistoryTypeId="2" PostId="9094" RevisionGUID="c2e208bc-2541-4b7c-9d2f-d7db062c0a2f" CreationDate="2011-02-27T17:56:51.513" UserId="5445" Text="I'll see if I can answer this the best I can:&#xD;&#xA;&#xD;&#xA;&gt; How often is the listen-server model used in the gaming industry?&#xD;&#xA;&#xD;&#xA;When it comes to most online games, you'll find that a large majority of games use a client-server architecture, though not always in the way you think. Take any Source game, for instance. Most will use a standard client-server with a master server architecture (to list games available), in that one person will host a dedicated server and anyone with a client can join it.&#xD;&#xA;&#xD;&#xA;However, you have some games and services, take for instance Left 4 Dead, League of Legends, and some XBox Live games, that take a slightly different approach. These all use a client-server architecture with a controlling server. The main idea here is that someone creates a dedicated server that isn't &quot;running&quot; any game. The controlling server will create a &quot;lobby&quot; of sorts, and when the game is started, the controlling server will add them to a queue, and when it is that lobby's turn, it will select a matching dedicated server (in terms of location/speed, availability, numerous factors), and assign the players to that server. Only then will the server actually &quot;run&quot; the game. It's the same idea, but a little simplified, as the client doesn't need to &quot;pick&quot; a server, only join a game and let the controlling server do the work.&#xD;&#xA;&#xD;&#xA;Of course, the biggest client-server model is the MMO model, where one or many servers runs a persistent world that handles almost all data and logic. Some of the more famous games using this model are World of Warcraft, Everquest, anything like that.&#xD;&#xA;&#xD;&#xA;So where does a listen server fit in here? To be honest, really that well, however, you will still find many games using it. For instance, most Source games allow listen servers to be created, and many XBox Live games do (it's been a while, but I believe Counter Strike did, as well as Quake 4, and many others). In general though, they seem to be frowned upon due to the advantages of the client-server model, which brings us to our next point.&#xD;&#xA;&#xD;&#xA;&gt; What are the (dis)advantages of it?&#xD;&#xA;&#xD;&#xA;First and foremost: **performance**. In a client-server model, the client will handle local changes (such as input, graphics, sounds, etc) on each cycle of the game. At the end of the cycle, it will package up relevant data (such as, did the player move? If so, where to? Where is s/he looking now? Velocity? Did they shoot? If so, information on the bullet. Etc) and send that to the server for processing. The server will take this data and determine if every thing is valid such as, is the user moving in a way that indicates hacking (more on that later), is the move valid (anything in the way?), did the bullet from player 1 hit player 2?, and more. Then the server packages this up, and sends it to the clients, which then update whatever necessary, such as adjusting health if the player was shot, kicking the player if it is determined that they are hacking, etc.&#xD;&#xA;&#xD;&#xA;A listen server, however, must deal with all of this at the same time. Since I assume you are familiar with programming, you probably realize how much power a game can rob from a computer, especially a poorly designed one. Adding on network processing, security processing, and more *as well as* the client's game. Not only that, but most servers run on fast networks, and are servers designed to withstand network traffic. If a listen server's network is slow, the entire game will suffer.&#xD;&#xA;&#xD;&#xA;Second **security**, as stated earlier, one of the main things a server will do is determine if a player is exploiting the game. You may have seen these as Punkbuster, VAC, etc. There are a very complicated set of rules that run these programs, for instance, determining the difference between a hacker, and just a very good player. It would be very bad for your game if you weren't able to catch hackers, but even worse if you executed action against a falsely accused one.&#xD;&#xA;&#xD;&#xA;A listen server will generally not be able to handle the client's game, the server processing, and the hack detection, and in most cases, detectors like Punkbuster are very hard to, if not impossible to get to run on a listen server, because it's hard for it to function correctly without the necessary processing power, as generally the game logic is prioritized over security, and if the detector is not allowed to process for one frame it may lose the data it needed to convict someone.&#xD;&#xA;&#xD;&#xA;Lastly, **gameplay**. The biggest thing about servers is that they are persistent, meaning that even if everyone leaves, the server will continue to run. This is useful if you have a popular server that doesn't have much activity in the night time, people can still join when they are ready to play and not have to wait for it to be brought back online.&#xD;&#xA;&#xD;&#xA;In a listen server, the main disadvantage is that as soon as the client hosting the listen server leaves, the game must either be transferred to another player (creating a lul in the game that can last minutes in some cases), or must end completely. This is not preferable on a big server, as the host must either stay online (wasting a slot in the server, and his/her computer power, which could also slow the game), or end the game for everyone.&#xD;&#xA;&#xD;&#xA;However, despite these problems, listen servers do have a few advantages.&#xD;&#xA;&#xD;&#xA;**Easy to set up**: Most listen servers are nothing more than hitting &quot;New game&quot; and letting people join. This is easy for people who just want to play with their friends, and don't wish to have to try to find an empty dedicated server, or play with other people.&#xD;&#xA;&#xD;&#xA;**God for testing**: If one owns a dedicated server and wishes to change it's configuration, it is generally a better idea to *test* the configuration first. The user would either have to create a backup of the dedicated server and go blindly into the changes, with the only option being to roll back if something goes wrong, create a new dedicated server to test them, of just create a simple listen server to test them. And in with point 1, these are generally easier to start up and configure.&#xD;&#xA;&#xD;&#xA;**Less resources**: In most dedicated servers, a user with the same IP cannot connect to the dedicated server (meaning, the client must either host the server, or play, they cannot do both). If the client wishes to play on his/her own server, they will usually need a second machine to host the server, or *buy or rent* a dedicated server so that they can actually play on it. A listen server requires only one machine, which may be the only thing the client can use.&#xD;&#xA;&#xD;&#xA;In either case, both have advantages and disadvantages, and you need to weigh them with what you're willing to design and implement. I believe that if you were to implement a listen server, it would get used.&#xD;&#xA;&#xD;&#xA;Lastly:&#xD;&#xA;&#xD;&#xA;&gt; What other options do I have?&#xD;&#xA;&#xD;&#xA;This is an industrial can of worms. In reality, any type of network architecture can be applied to video games. However, from what I've seen, like most internet communication, most boil down to some form of client-server model.&#xD;&#xA;&#xD;&#xA;Please let me know if I didn't answer your question, or if you need something expanded, and I'll see what I can do." />
  <row Id="18737" PostHistoryTypeId="5" PostId="9081" RevisionGUID="4546e00a-3578-47b3-b66e-934979f01322" CreationDate="2011-02-27T18:15:48.173" UserId="3289" Comment="list formatting" Text="My game engine right now consists of a working singleplayer part. I'm now starting to think about how to do the multiplayer part.&#xD;&#xA;&#xD;&#xA;I have found out that many games actually don't have a real singleplayer mode, but when playing alone you are actually hosting a local server as well, and almost everything runs as if you were in multiplayer (except that the data packets can be passed over an alternate route for better performance)&#xD;&#xA;&#xD;&#xA;My engine would need major refactoring to adapt to this model. There would be three possible modes: Dedicated client, Dedicated server and Client-Server (listen mode)&#xD;&#xA;&#xD;&#xA; * How often is the listen-server model used in the gaming industry?&#xD;&#xA; * What are the (dis)advantages of it?&#xD;&#xA; * What other options do I have?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18738" PostHistoryTypeId="24" PostId="9081" RevisionGUID="4546e00a-3578-47b3-b66e-934979f01322" CreationDate="2011-02-27T18:15:48.173" Comment="Proposed by 3289 approved by 51 edit id of 56" />
  <row Id="18745" PostHistoryTypeId="2" PostId="9098" RevisionGUID="6bdb8e50-448d-49a0-be1c-9805500c24f5" CreationDate="2011-02-27T21:10:05.947" UserId="4918" Text="I don't think game programming is any different than other application domains from the standpoint of it being harder to pick the right separation of concerns. Anytime you take your skills to a different type of application domain you are going to find that the transition isn't as smooth as you may have hoped because there's always differences. What worked in your database application has many patterns/idioms that don't work so well in your embedded app, which has many patterns/idioms that don't work so well in that real-time system which also has many patterns/idioms that don't work in game programming. However, the game programmers have the same problems when they leave their game programming domain. It's all just a matter of what you are used to.&#xD;&#xA;&#xD;&#xA;With that said, I think game programming seems harder for many people because it requires you to work with parts of the computer that most programmers never have to deal with at their real job (low-level graphics and sounds) and more applied math than many people are comfortable with and not because of separation of concerns. While there's always difficulties determining the right choice for separation of concerns, I think the difficulty with separation of concerns you are experiencing is simply moving to a new problem domain. Once you build a few applications then it'll be like anything else, you'll learn what you like and not use what you don't. " />
  <row Id="18746" PostHistoryTypeId="2" PostId="9099" RevisionGUID="d11325f6-2565-48bd-861b-f902f3075392" CreationDate="2011-02-27T21:41:09.377" UserId="5497" Text="I'm working on a hex-based boardgame-style game and have some things I'd like to incorporate to keep things engaging:&#xD;&#xA;&#xD;&#xA;-Dynamic camera. As characters move and interact with each other the displayed view will pan and zoom to frame the action.&#xD;&#xA;&#xD;&#xA;-Layered diegetic and non-diegetic audio.&#xD;&#xA;    -Diegetic (heard by the game characters as well as the players): The electronic/mechanical sounds of the combat simulator the characters are in, the sounds made by the characters as they move and use their powers, anything the characters say to each other as the game proceeds and any calls made by the scorekeeper/referee.&#xD;&#xA;    -Non-Diegetic (heard only by the players): Audio for unlocked achievements, menu navigation sounds, possibly a subtle sound made by the mouse cursor as it moves around. Announcements and color commentary made by the game announcers, and all the gamey sounds when people are killed, stunned, drop their tokens, score points, etc.&#xD;&#xA;&#xD;&#xA;-Things for players to do when it's not their turn. I have actions characters can take in response to the actions of the current player's characters.&#xD;&#xA;&#xD;&#xA;All of these things will hopefully contribute to the mood and tone of the game and keep players' attention. Although the game is turn-based, I'm hopeful that the players will remain engaged even in situations where they aren't personally involved in the action." />
  <row Id="18747" PostHistoryTypeId="6" PostId="9055" RevisionGUID="22208725-4f95-4edd-8987-a3dca509a714" CreationDate="2011-02-27T21:43:47.953" UserId="259" Comment="edited tags" Text="&lt;game-design&gt;&lt;ai&gt;&lt;linux&gt;" />
  <row Id="18748" PostHistoryTypeId="2" PostId="9100" RevisionGUID="99dab2cc-0125-44a0-bf20-f50938c9d376" CreationDate="2011-02-27T22:53:18.070" UserId="2332" Text="Looking at the Quake 3 source code probably isn't going to help you at this stage, if you're new to AI development. There is a lot of code and it can be quite easy to get overwhelmed at the sheer size of it.&#xD;&#xA;&#xD;&#xA;First of all, if you want to create an AI bot for an existing game, then that's a little bit of a legal grey area and it's a lot more difficult since you probably won't have much access to the game's API.&#xD;&#xA;&#xD;&#xA;On the other hand if you are creating a bot for a game that you currently are developing for, then this is relatively easier.&#xD;&#xA;&#xD;&#xA;First of all, sort out exactly what you want your bot to do. Get a list of requirements of what you want your bot to eventually do. Then start right at the bottom.&#xD;&#xA;&#xD;&#xA;I would probably split it up into separate tasks such as:&#xD;&#xA;&#xD;&#xA; - Movement&#xD;&#xA; - Targeting&#xD;&#xA; - Sensory system - what the bot can see and hear&#xD;&#xA; - World representation - how the bot observes and manipulates the world&#xD;&#xA; - An FSM to govern behaviour at first to keep it simple - Hunt state, Attack state, Flee state, etc&#xD;&#xA; - An algorithm to select the best weapon for the job - this can probably be simplified to always use the most powerful weapon in the bot's arsenal.&#xD;&#xA;&#xD;&#xA;In [Programming Game AI by Example][1], Buckland shows a 2D representation of a Quake-like game that contains goal-based behaviours, which is probably a lot more relevant to this kind of simulation. I'd definitely recommend getting the book as it deals with building AI from the bottom up.&#xD;&#xA;&#xD;&#xA;Just bear in mind that a good AI bot is no simple task. There is a lot of research out there currently going on trying to get the most human-like behaviour. But as long as you design it well and break the entire thing into small tasks and components, you should make good progress on it.&#xD;&#xA;&#xD;&#xA;Good luck! :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?ie=UTF8&amp;qid=1298846757&amp;sr=1-1" />
  <row Id="18749" PostHistoryTypeId="25" PostId="9081" RevisionGUID="8a837165-d0d9-442f-8c9e-2138693766ea" CreationDate="2011-02-27T23:22:59.393" Comment="http://twitter.com/#!/StackGameDev/status/42001779847725056" />
  <row Id="18750" PostHistoryTypeId="2" PostId="9101" RevisionGUID="c4ad404f-f482-4dab-8dd8-8c79c943583d" CreationDate="2011-02-27T23:29:15.647" UserDisplayName="user5750" Text="**Summary:**&#xD;&#xA;&#xD;&#xA;My 50% finished 2D sidescroller with Box2D as physics engine should have multiplayer support in the final version. However, the current code is just a singleplayer game.&#xD;&#xA;&#xD;&#xA;- What should I do now?  &#xD;&#xA;- And more important, how should I implement multiplayer and combine it with singleplayer?   &#xD;&#xA;- Is it a bad idea to code the singleplayer mode separated from multiplayer mode (like Notch did it with Minecraft)?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;The performance in singleplayer should be as good as possible (Simulating physics with using a loopback server to implement singleplayer mode would be a problem there)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Full background / questions:**&#xD;&#xA;&#xD;&#xA;I'm working on a relatively large 2D game project in C++, with physics as a core element of it. (I use Box2D for that)&#xD;&#xA;&#xD;&#xA;The finished game should have full multiplayer support, however I made the mistake that I didn't plan the networking part properly and basically worked on a singleplayer game until now.&#xD;&#xA;&#xD;&#xA;I thought that multiplayer support could be added to the almost finished singleplayer game in a relatively easy and clear way, but apparently, from what I have read this is wrong. &#xD;&#xA;&#xD;&#xA;I even read that a multiplayer game should be programmed as one from the beginning, with the singleplayer mode actually just consisting of hosting an invisible local server and connecting to it via loopback. (I found out that most FPS game engines do it that way, an example would be Source)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So here I am, with my half finished 2D sidescroller game, and I don't really know how to go on.&#xD;&#xA;&#xD;&#xA;Simply continueing to work on the singleplayer / client seems useless to me now, as I'd have to recode and refactor even more later.&#xD;&#xA;&#xD;&#xA;First, a general question to anybody who possibly found himself in a situation like this:&#xD;&#xA;&#xD;&#xA;- How should I proceed?&#xD;&#xA;&#xD;&#xA;Then, the more specific one - I have been trying to find out how I can approach the networking part for my game:&#xD;&#xA;&#xD;&#xA;**(Possible solutions:)**&#xD;&#xA;&#xD;&#xA;- Invisible / loopback server for singleplayer&#xD;&#xA;&#xD;&#xA;This would have the advantage that there basically is no difference between singleplayer and multiplayer mode. Not much additional code would be needed.&#xD;&#xA;&#xD;&#xA;A big disadvantage: Performance and other limitations in singleplayer. There would be two physics simulations running. One for the client and one for the loopback server.&#xD;&#xA;&#xD;&#xA;Even if you work around by providing a direct path for the data from the loopback server, through direct communcation by the threads for example, the singleplayer would be limited.&#xD;&#xA;&#xD;&#xA;This is a problem because people should be allowed to play around with masses of objects at once.&#xD;&#xA;&#xD;&#xA;- Separated singleplayer / Multiplayer mode&#xD;&#xA;&#xD;&#xA;There would be no server involved in singleplayer mode.&#xD;&#xA;&#xD;&#xA;I'm not really sure how this would work. But at least I think that there would be a lot of additional work, because all of the singleplayer features would have to be re-implemented or glued to multiplayer mode.&#xD;&#xA;&#xD;&#xA;- Multiplayer mode as a module for singleplayer&#xD;&#xA;&#xD;&#xA;This is merely a quick thought I had. Multiplayer could consist of a singleplayer game, with an additional networking module loaded and connected to a server, which sends and receives data and updates the singleplayer world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the retrospective, I regret not having planned the multiplayer mode earlier. I'm really stuck at this point and I hope that somebody here is able to help me!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18751" PostHistoryTypeId="1" PostId="9101" RevisionGUID="c4ad404f-f482-4dab-8dd8-8c79c943583d" CreationDate="2011-02-27T23:29:15.647" UserDisplayName="user5750" Text="Multiplayer / Networking options for a 2D game with physics" />
  <row Id="18752" PostHistoryTypeId="3" PostId="9101" RevisionGUID="c4ad404f-f482-4dab-8dd8-8c79c943583d" CreationDate="2011-02-27T23:29:15.647" UserDisplayName="user5750" Text="&lt;game-design&gt;&lt;engine&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;design-patterns&gt;" />
  <row Id="18753" PostHistoryTypeId="5" PostId="9085" RevisionGUID="0071b842-5ce9-4cce-b6bc-a8ec1710a969" CreationDate="2011-02-27T23:39:11.290" UserId="1624" Comment="added link to full code" Text="I'm in a multimedia class in college, and we're &quot;learning&quot; OpenGL as part of the class. I'm trying to figure out how the OpenGL camera vs. modelview works, and so I found [this][1] example. I'm trying to port the example to Python using the OpenGL bindings - it starts up OpenGL much faster, so for testing purposes it's a lot nicer - but I keep running into a stack overflow error with the glPushMatrix in this code:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;      def cube(): &#xD;&#xA;          for x in xrange(10):&#xD;&#xA;              glPushMatrix()&#xD;&#xA;              glTranslated(-positionx[x + 1] * 10, 0, -positionz[x + 1] * 10); #translate the cube&#xD;&#xA;              glutSolidCube(2); #draw the cube&#xD;&#xA;              glPopMatrix();&#xD;&#xA;&#xD;&#xA;According to [this reference][2], that happens when the matrix stack is full. &#xD;&#xA;&#xD;&#xA;So I thought, &quot;well, if it's full, let me just pop the matrix off the top of the stack, and there will be room&quot;. I modified the code to:&#xD;&#xA;&#xD;&#xA;      def cube(): &#xD;&#xA;          glPopMatrix()&#xD;&#xA;          for x in xrange(10):&#xD;&#xA;              glPushMatrix()&#xD;&#xA;              glTranslated(-positionx[x + 1] * 10, 0, -positionz[x + 1] * 10); #translate the cube&#xD;&#xA;              glutSolidCube(2); #draw the cube&#xD;&#xA;              glPopMatrix();&#xD;&#xA;&#xD;&#xA;And now I get a buffer underflow error - which apparently happens when the stack has only one matrix.&#xD;&#xA;&#xD;&#xA;So am I just waaay off base in my understanding? Or is there some way to increase the matrix stack size? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, if anyone has some good (online) references (examples, etc.) for understanding how the camera/model matrices work together, I would sincerely appreciate them!&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Here is the pastebin of the full code: http://pastebin.com/QXxNisuA&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swiftless.com/tutorials/opengl/camera2.html&#xD;&#xA;  [2]: http://pyopengl.sourceforge.net/documentation/manual/glPushMatrix.3G.xml&#xD;&#xA;" />
  <row Id="18755" PostHistoryTypeId="25" PostId="9101" RevisionGUID="26933cb6-2a4a-4c4e-832d-cb273f368a38" CreationDate="2011-02-28T02:22:59.233" Comment="http://twitter.com/#!/StackGameDev/status/42047077966028800" />
  <row Id="18756" PostHistoryTypeId="25" PostId="8992" RevisionGUID="93620bb5-e7d0-4ba1-870f-d5a0707cf931" CreationDate="2011-02-28T05:22:59.683" Comment="http://twitter.com/#!/StackGameDev/status/42092377640415232" />
  <row Id="18761" PostHistoryTypeId="5" PostId="9093" RevisionGUID="1b2312bc-223b-4476-8ba6-34d27005afca" CreationDate="2011-02-28T07:35:42.620" UserId="3644" Comment="added 159 characters in body; added 4 characters in body" Text="Are you sure the loop is running like so:&#xD;&#xA;&#xD;&#xA;&gt; def cube():&#xD;&#xA;&gt;&#xD;&#xA;&gt;     for x in xrange(10):&#xD;&#xA;&gt;     {&#xD;&#xA;&gt;               glPushMatrix();&#xD;&#xA;&gt;               glTranslated(-positionx[x + 1] * 10, 0, -positionz[x + 1] * 10);&#xD;&#xA;&gt;               glutSolidCube(2); #draw the cube&#xD;&#xA;&gt;               glPopMatrix();&#xD;&#xA;&gt;     }&#xD;&#xA;&#xD;&#xA;Otherwise you get a stack of unpoped matrices&#xD;&#xA;&#xD;&#xA;**EDIT:** Well, I didn't knew about indentation rules in python. My mistake.&#xD;&#xA;&#xD;&#xA;Another note - are you sure you can access X+1 index here? positionx[x + 1]&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18762" PostHistoryTypeId="25" PostId="8970" RevisionGUID="929bd9c2-cacc-4706-9626-c01d5f011398" CreationDate="2011-02-28T08:22:59.497" Comment="http://twitter.com/#!/StackGameDev/status/42137675498659840" />
  <row Id="18763" PostHistoryTypeId="2" PostId="9103" RevisionGUID="5ef719fc-aaa6-438d-aefd-5e1b37a16ab3" CreationDate="2011-02-28T09:05:30.993" UserId="4897" Text="The code in your pastebin fails to even run for me.&#xD;&#xA;&#xD;&#xA;In particular, your list indices in the display function are out of range (your list has 10 elements : python lists start at 0; you index from 0+1 to 10+1).&#xD;&#xA;&#xD;&#xA;I think you also had some globals missing in the mouse handling function but that could be from me moving code around in an attempt to at least make it look like python ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyway, with these fixes, the code shown below DOES work for me, with no signs of GL matrix stack under/overflow !&#xD;&#xA;&#xD;&#xA;    import sys&#xD;&#xA;    from math import sin, cos&#xD;&#xA;    from random import randint&#xD;&#xA;    from OpenGL.GL import *&#xD;&#xA;    from OpenGL.GLU import *&#xD;&#xA;    from OpenGL.GLUT import *&#xD;&#xA;    #angle of rotation&#xD;&#xA;    xpos= ypos= zpos= xrot= yrot= angle= lastx= lasty = 0&#xD;&#xA;    &#xD;&#xA;    #positions of the cubes&#xD;&#xA;    positionz = []&#xD;&#xA;    positionx = []&#xD;&#xA;    &#xD;&#xA;    def init():&#xD;&#xA;        global positionz, positionx&#xD;&#xA;        glEnable(GL_DEPTH_TEST) #enable the depth testing&#xD;&#xA;        glEnable(GL_LIGHTING) #enable the lighting&#xD;&#xA;        glEnable(GL_LIGHT0) #enable LIGHT0, our Diffuse Light&#xD;&#xA;        glShadeModel(GL_SMOOTH) #set the shader to smooth shader&#xD;&#xA;    &#xD;&#xA;        positionx = [randint(0, 10) for x in xrange(10)]&#xD;&#xA;        positionz = [randint(0, 10) for x in xrange(10)]&#xD;&#xA;    &#xD;&#xA;    def camera():&#xD;&#xA;        global xrot, yrot, xpos, ypos, zpos&#xD;&#xA;        glRotatef(xrot,1.0,0.0,0.0)  #rotate our camera on teh x-axis (left and right)&#xD;&#xA;        glRotatef(yrot,0.0,1.0,0.0)  #rotate our camera on the y-axis (up and down)&#xD;&#xA;        glTranslated(-xpos,-ypos,-zpos) #translate the screen to the position of our camera&#xD;&#xA;    &#xD;&#xA;    def display():&#xD;&#xA;        global angle&#xD;&#xA;        glClearColor(0.0,0.0,0.0,1.0) #clear the screen to black&#xD;&#xA;        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) #clear the color buffer and the depth buffer&#xD;&#xA;        glLoadIdentity()&#xD;&#xA;        camera()&#xD;&#xA;        for x in xrange(10):&#xD;&#xA;            glPushMatrix()&#xD;&#xA;            glTranslated(-positionx[x] * 10, 0, -positionz[x] * 10) #translate the cube&#xD;&#xA;            glutSolidCube(2) #draw the cube&#xD;&#xA;            glPopMatrix()&#xD;&#xA;        glutSwapBuffers() #swap the buffers&#xD;&#xA;        angle += angle #increase the angle&#xD;&#xA;    &#xD;&#xA;    def reshape(w, h):&#xD;&#xA;        glViewport(0, 0, w, h); #set the viewport to the current window specifications&#xD;&#xA;        glMatrixMode(GL_PROJECTION); #set the matrix to projection&#xD;&#xA;    &#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        gluPerspective(60, w / h, 1.0, 1000.0)&#xD;&#xA;        #set the perspective (angle of sight, width, height, , depth)&#xD;&#xA;        glMatrixMode(GL_MODELVIEW); #set the matrix back to model&#xD;&#xA;    &#xD;&#xA;    def keyboard (key, x, y):&#xD;&#xA;        global xrot, xpos, ypos, zpos, xrot, yrot, angle, lastx, lasty, positionz, positionx&#xD;&#xA;        if (key=='q'):&#xD;&#xA;            xrot += 1&#xD;&#xA;            if (xrot &gt;360):&#xD;&#xA;                xrot -= 360&#xD;&#xA;        if (key=='z'):&#xD;&#xA;            xrot -= 1;&#xD;&#xA;            if (xrot &lt; -360): xrot += 360&#xD;&#xA;        if (key=='w'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xrotrad = (xrot / 180 * 3.141592654)&#xD;&#xA;            xpos += float(sin(yrotrad))&#xD;&#xA;            zpos -= float(cos(yrotrad))&#xD;&#xA;            ypos -= float(sin(xrotrad))&#xD;&#xA;        if (key=='s'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xrotrad = (xrot / 180 * 3.141592654)&#xD;&#xA;            xpos -= float(sin(yrotrad))&#xD;&#xA;            zpos += float(cos(yrotrad))&#xD;&#xA;            ypos += float(sin(xrotrad))&#xD;&#xA;        if (key=='d'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xpos += float(cos(yrotrad)) * 0.2&#xD;&#xA;            zpos += float(sin(yrotrad)) * 0.2&#xD;&#xA;        if (key=='a'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xpos -= float(cos(yrotrad)) * 0.2&#xD;&#xA;            zpos -= float(sin(yrotrad)) * 0.2&#xD;&#xA;        if (key==27):&#xD;&#xA;            sys.exit(0)&#xD;&#xA;    &#xD;&#xA;    def mouseMovement(x, y):&#xD;&#xA;        global lastx, lasty, xrot, yrot&#xD;&#xA;        diffx=x-lastx #check the difference between the current x and the last x position&#xD;&#xA;        diffy=y-lasty #check the difference between the current y and the last y position&#xD;&#xA;        lastx=x #set lastx to the current x position&#xD;&#xA;        lasty=y #set lasty to the current y position&#xD;&#xA;        xrot += float(diffy) #set the xrot to xrot with the addition of the difference in the y position&#xD;&#xA;        yrot += float(diffx) #set the xrot to yrot with the addition of the difference in the x position&#xD;&#xA;    &#xD;&#xA;    glutInit()&#xD;&#xA;    glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH)&#xD;&#xA;    glutInitWindowSize(500, 500)&#xD;&#xA;    glutInitWindowPosition (100, 100)&#xD;&#xA;    glutCreateWindow(&quot;A basic OpenGL Window&quot;)&#xD;&#xA;    init()&#xD;&#xA;    glutDisplayFunc(display)&#xD;&#xA;    glutIdleFunc(display)&#xD;&#xA;    glutReshapeFunc(reshape)&#xD;&#xA;    glutPassiveMotionFunc(mouseMovement)&#xD;&#xA;    #check for mouse movement&#xD;&#xA;    glutKeyboardFunc (keyboard)&#xD;&#xA;    glutMainLoop()&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18764" PostHistoryTypeId="2" PostId="9104" RevisionGUID="8e41dd87-8aa7-454b-8813-6393082e3241" CreationDate="2011-02-28T09:07:53.223" UserId="5757" Text="&gt; Do you think it is technically possible to write a fully-fledged 3D MMO client with Browser JavaScript - WebGL for graphics, and WebSocket for Networking?&#xD;&#xA;&#xD;&#xA;Yes, absolutely. There is no reason WebGL or WebSocket technology would prevent you from making a 3D MMOG client, or any game client for that matter.&#xD;&#xA;&#xD;&#xA;&gt; Do you think future MMOs (and games generally) will wrriten with WebGL?&#xD;&#xA;&#xD;&#xA;Yes. I believe within the next five years, most 3D browser games will be written using WebGL. The reason is simple - WebGL is the only standardized 3D technology that will have implementations available in every major web browser (Chrome 9, Firefox 4, Safari 6, and Internet Explorer via Chrome Frame).&#xD;&#xA;&#xD;&#xA;&gt; Does today's JavaScript performance allow this?&#xD;&#xA;&#xD;&#xA;Yes. JavaScript performance in modern browsers has increased to the point where 3D game development is feasible. For example, see the [Three.js project][1].&#xD;&#xA;&#xD;&#xA;&gt; Let's say your development team was you as a developer, and another model creator (artist). Would you use a library like SceneJS for the game, or write straight WebGL? If you would use a library, but not SceneJS, please specify which.&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;Use a library to save time. There is no reason to write your own WebGL graphics code unless an existing library is missing features that you need. Even in that case, it would probably be more time efficient to extend the existing library.&#xD;&#xA;&#xD;&#xA;For my project, I am using [GLGE][2] as it supports many different graphics effects and is constantly being updated with new ones.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mrdoob/three.js/&#xD;&#xA;  [2]: http://www.glge.org/" />
  <row Id="18765" PostHistoryTypeId="2" PostId="9105" RevisionGUID="361d83de-48ae-4501-9119-947156ae5a8e" CreationDate="2011-02-28T09:14:00.690" UserId="5757" Text="I am currently creating a 3D first-person shooter game in the browser using WebGL. How would I implement [mouselook/free look][1] for such a game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mouselook" />
  <row Id="18766" PostHistoryTypeId="1" PostId="9105" RevisionGUID="361d83de-48ae-4501-9119-947156ae5a8e" CreationDate="2011-02-28T09:14:00.690" UserId="5757" Text="How to implement mouselook in the browser?" />
  <row Id="18767" PostHistoryTypeId="3" PostId="9105" RevisionGUID="361d83de-48ae-4501-9119-947156ae5a8e" CreationDate="2011-02-28T09:14:00.690" UserId="5757" Text="&lt;3d&gt;&lt;javascript&gt;&lt;webgl&gt;&lt;first-person-shooter&gt;&lt;browser-based-games&gt;" />
  <row Id="18768" PostHistoryTypeId="2" PostId="9106" RevisionGUID="f5cce0a2-a2c6-4a5d-9684-72478c32e2c4" CreationDate="2011-02-28T09:29:09.023" UserId="4129" Text="OpenGL can store and restore matrices on a stack using `glPushMatrix` and `glPopMatrix`.  It is very important that each push has a corresponding pop - if you push more than you pop, you get told when all the drawing is over that you are overflowing the stack.  If you pop more than you push, you get told immediately that you are underflowing the stack.  This is how OpenGL lets you localise programming errors.&#xD;&#xA;&#xD;&#xA;So ensure that all pushes everywhere have a corresponding pop.&#xD;&#xA;&#xD;&#xA;Everywhere you push, ensure there is a corresponding pop in the exit of that code block.&#xD;&#xA;&#xD;&#xA;If your code is throwing an exception (i.e. your iterating out of bounds in your array?), it may be that you need to place the pop in a finally block." />
  <row Id="18769" PostHistoryTypeId="5" PostId="9106" RevisionGUID="7e2afe66-36ea-4b75-854f-f07762fa39df" CreationDate="2011-02-28T09:35:44.090" UserId="4129" Comment="added 295 characters in body" Text="OpenGL can store and restore matrices on a stack using `glPushMatrix` and `glPopMatrix`.  It is very important that each push has a corresponding pop - if you push more than you pop, you get told when all the drawing is over that you are overflowing the stack.  If you pop more than you push, you get told immediately that you are underflowing the stack.  This is how OpenGL lets you localise programming errors.&#xD;&#xA;&#xD;&#xA;So ensure that all pushes everywhere have a corresponding pop.&#xD;&#xA;&#xD;&#xA;Everywhere you push, ensure there is a corresponding pop in the exit of that code block.&#xD;&#xA;&#xD;&#xA;If your code is throwing an exception (i.e. your iterating out of bounds in your array?), it may be that you need to place the pop in a finally block, e.g.:&#xD;&#xA;&#xD;&#xA;    def cube():&#xD;&#xA;        for x in xrange(10):&#xD;&#xA;            try:&#xD;&#xA;                glPushMatrix()&#xD;&#xA;                # draw something&#xD;&#xA;            finally:&#xD;&#xA;                glPopMatrix()&#xD;&#xA;                # I'm trusting some code further out will catch and display your actual error now&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18770" PostHistoryTypeId="2" PostId="9107" RevisionGUID="c0beda8a-ca7c-45de-99a5-b4d5c899ef46" CreationDate="2011-02-28T09:36:42.070" UserId="4241" Text="I am developing a sprite based 2D game for mobile platform(s) and I'm using OpenGL (well, actually Irrlicht) to render graphics. First I implemented sprite rendering in a simple way: every game object is rendered as a quad with its own GPU draw call, meaning that if I had 200 game objects, I made 200 draw calls per frame. Of course this was a bad choice and my game was completely CPU bound because there is a little CPU overhead assosiacted in every GPU draw call. GPU stayed idle most of the time.&#xD;&#xA;&#xD;&#xA;Now, I thought I could improve performance by collecting objects into large batches and rendering these batches with only a few draw calls. I implemented batching (so that every game object sharing the same texture is rendered in same batch) and thought that my problems are gone... only to find out that my frame rate was even lower than before. &#xD;&#xA;&#xD;&#xA;Why? Well, I have 200 (or more) game objects, and they are updated 60 times per second. Every frame I have to recalculate new position (translation and rotation) for vertices in CPU (GPU on mobile platforms does not support instancing so I can't do it there), and doing this calculation 48000 per second (200*60*4 since every sprite has 4 vertices) simply seems to be too slow.&#xD;&#xA;&#xD;&#xA;What I could do to improve performance? All game objects are moving/rotating (almost) every frame so I really have to recalculate vertex positions. Only optimization that I could think of is a look-up table for rotations so that I wouldn't have to calculate them. Would point sprites help? Any nasty hacks? Anything else?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18771" PostHistoryTypeId="1" PostId="9107" RevisionGUID="c0beda8a-ca7c-45de-99a5-b4d5c899ef46" CreationDate="2011-02-28T09:36:42.070" UserId="4241" Text="How to improve batching performance" />
  <row Id="18772" PostHistoryTypeId="3" PostId="9107" RevisionGUID="c0beda8a-ca7c-45de-99a5-b4d5c899ef46" CreationDate="2011-02-28T09:36:42.070" UserId="4241" Text="&lt;opengl&gt;&lt;sprites&gt;&lt;performance&gt;" />
  <row Id="18773" PostHistoryTypeId="2" PostId="9108" RevisionGUID="435ae44e-aac0-407c-9a26-b2b4de178042" CreationDate="2011-02-28T09:49:34.123" UserId="891" Text="If you're looking to code a FPS bot without wanting to get into the engine itself, Pogamut allows you to code just the AI bot portion for Unreal Tournament 2004.  It's more limiting than say diving into the Quake 3 or Enemy Territory code base, but it also lets you focus in on just AI. &#xD;&#xA;&#xD;&#xA;**[Pogamut 3 GameBots2004][1]**&#xD;&#xA;&#xD;&#xA;Extension of the original GameBots work done by USC which supports UT2004/ UDK/ and Defcon.  Allows an external program to control bots in game in a **Client/Server** fashion as if they were a human player.&#xD;&#xA;&#xD;&#xA;&gt; External control mechanisms can be connected to many of these games using the scripting languages, thereby providing a tool to control the in-game characters from the outside. Pogamut utilizes UnrealScript (UT2004 scripting language) in this way and also NetBeans Java platform to provide an out-of-the box development environment for AI of virtual characters inhabiting **UT2004**, **Unreal Development Kit (UDK)** and **DEFCON** worlds.&#xD;&#xA;&#xD;&#xA;*-- [Copied and Pasted from my CW Game Dev post][2]*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://diana.ms.mff.cuni.cz/main/tiki-index.php&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8920/open-source-ai-bot-interfaces" />
  <row Id="18774" PostHistoryTypeId="2" PostId="9109" RevisionGUID="636d1b5a-82d1-4e2f-93e0-dabce4ae38f1" CreationDate="2011-02-28T10:38:24.330" UserId="2755" Text="I'm currently looking for a branching dialogue editor that allows me to prepare all the dialogue, export it into an XML format that then can be parsed by Unity 3D.&#xD;&#xA;&#xD;&#xA;The only editor I found until now is [Chat Mapper](http://www.chat-mapper.com/), which is Win only. Is there something similar for Mac?&#xD;&#xA;&#xD;&#xA;Even if there is nothing for the Mac – what would be other alternatives to Chat Mapper, if any?" />
  <row Id="18775" PostHistoryTypeId="1" PostId="9109" RevisionGUID="636d1b5a-82d1-4e2f-93e0-dabce4ae38f1" CreationDate="2011-02-28T10:38:24.330" UserId="2755" Text="Are there any branching dialogue editors (preferably for Mac)?" />
  <row Id="18776" PostHistoryTypeId="3" PostId="9109" RevisionGUID="636d1b5a-82d1-4e2f-93e0-dabce4ae38f1" CreationDate="2011-02-28T10:38:24.330" UserId="2755" Text="&lt;editors&gt;&lt;macos&gt;" />
  <row Id="18777" PostHistoryTypeId="25" PostId="9107" RevisionGUID="53f7fc9e-c7e7-428b-b6a2-f99ca920c9e7" CreationDate="2011-02-28T11:23:00.103" Comment="http://twitter.com/#!/StackGameDev/status/42182976632528896" />
  <row Id="18778" PostHistoryTypeId="5" PostId="9103" RevisionGUID="76655d7e-e75c-4f4a-90aa-5e5000238d8d" CreationDate="2011-02-28T11:37:48.057" UserId="4897" Comment="added 270 characters in body" Text="*Edited to add: this isn't important for now as it will still work just fine and makes learning OpenGL easier but do note that the whole matrix stack system is deprecated in OpenGL 3.x and beyond. One possible replacement is [GLM][1].*&#xD;&#xA;&#xD;&#xA;The code in your pastebin fails to even run for me.&#xD;&#xA;&#xD;&#xA;In particular, your list indices in the display function are out of range (your list has 10 elements : python lists start at 0; you index from 0+1 to 10+1).&#xD;&#xA;&#xD;&#xA;I think you also had some globals missing in the mouse handling function but that could be from me moving code around in an attempt to at least make it look like python ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyway, with these fixes, the code shown below DOES work for me, with no signs of GL matrix stack under/overflow !&#xD;&#xA;&#xD;&#xA;    import sys&#xD;&#xA;    from math import sin, cos&#xD;&#xA;    from random import randint&#xD;&#xA;    from OpenGL.GL import *&#xD;&#xA;    from OpenGL.GLU import *&#xD;&#xA;    from OpenGL.GLUT import *&#xD;&#xA;    #angle of rotation&#xD;&#xA;    xpos= ypos= zpos= xrot= yrot= angle= lastx= lasty = 0&#xD;&#xA;    &#xD;&#xA;    #positions of the cubes&#xD;&#xA;    positionz = []&#xD;&#xA;    positionx = []&#xD;&#xA;    &#xD;&#xA;    def init():&#xD;&#xA;        global positionz, positionx&#xD;&#xA;        glEnable(GL_DEPTH_TEST) #enable the depth testing&#xD;&#xA;        glEnable(GL_LIGHTING) #enable the lighting&#xD;&#xA;        glEnable(GL_LIGHT0) #enable LIGHT0, our Diffuse Light&#xD;&#xA;        glShadeModel(GL_SMOOTH) #set the shader to smooth shader&#xD;&#xA;    &#xD;&#xA;        positionx = [randint(0, 10) for x in xrange(10)]&#xD;&#xA;        positionz = [randint(0, 10) for x in xrange(10)]&#xD;&#xA;    &#xD;&#xA;    def camera():&#xD;&#xA;        global xrot, yrot, xpos, ypos, zpos&#xD;&#xA;        glRotatef(xrot,1.0,0.0,0.0)  #rotate our camera on teh x-axis (left and right)&#xD;&#xA;        glRotatef(yrot,0.0,1.0,0.0)  #rotate our camera on the y-axis (up and down)&#xD;&#xA;        glTranslated(-xpos,-ypos,-zpos) #translate the screen to the position of our camera&#xD;&#xA;    &#xD;&#xA;    def display():&#xD;&#xA;        global angle&#xD;&#xA;        glClearColor(0.0,0.0,0.0,1.0) #clear the screen to black&#xD;&#xA;        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) #clear the color buffer and the depth buffer&#xD;&#xA;        glLoadIdentity()&#xD;&#xA;        camera()&#xD;&#xA;        for x in xrange(10):&#xD;&#xA;            glPushMatrix()&#xD;&#xA;            glTranslated(-positionx[x] * 10, 0, -positionz[x] * 10) #translate the cube&#xD;&#xA;            glutSolidCube(2) #draw the cube&#xD;&#xA;            glPopMatrix()&#xD;&#xA;        glutSwapBuffers() #swap the buffers&#xD;&#xA;        angle += angle #increase the angle&#xD;&#xA;    &#xD;&#xA;    def reshape(w, h):&#xD;&#xA;        glViewport(0, 0, w, h); #set the viewport to the current window specifications&#xD;&#xA;        glMatrixMode(GL_PROJECTION); #set the matrix to projection&#xD;&#xA;    &#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        gluPerspective(60, w / h, 1.0, 1000.0)&#xD;&#xA;        #set the perspective (angle of sight, width, height, , depth)&#xD;&#xA;        glMatrixMode(GL_MODELVIEW); #set the matrix back to model&#xD;&#xA;    &#xD;&#xA;    def keyboard (key, x, y):&#xD;&#xA;        global xrot, xpos, ypos, zpos, xrot, yrot, angle, lastx, lasty, positionz, positionx&#xD;&#xA;        if (key=='q'):&#xD;&#xA;            xrot += 1&#xD;&#xA;            if (xrot &gt;360):&#xD;&#xA;                xrot -= 360&#xD;&#xA;        if (key=='z'):&#xD;&#xA;            xrot -= 1;&#xD;&#xA;            if (xrot &lt; -360): xrot += 360&#xD;&#xA;        if (key=='w'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xrotrad = (xrot / 180 * 3.141592654)&#xD;&#xA;            xpos += float(sin(yrotrad))&#xD;&#xA;            zpos -= float(cos(yrotrad))&#xD;&#xA;            ypos -= float(sin(xrotrad))&#xD;&#xA;        if (key=='s'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xrotrad = (xrot / 180 * 3.141592654)&#xD;&#xA;            xpos -= float(sin(yrotrad))&#xD;&#xA;            zpos += float(cos(yrotrad))&#xD;&#xA;            ypos += float(sin(xrotrad))&#xD;&#xA;        if (key=='d'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xpos += float(cos(yrotrad)) * 0.2&#xD;&#xA;            zpos += float(sin(yrotrad)) * 0.2&#xD;&#xA;        if (key=='a'):&#xD;&#xA;            yrotrad = (yrot / 180 * 3.141592654)&#xD;&#xA;            xpos -= float(cos(yrotrad)) * 0.2&#xD;&#xA;            zpos -= float(sin(yrotrad)) * 0.2&#xD;&#xA;        if (key==27):&#xD;&#xA;            sys.exit(0)&#xD;&#xA;    &#xD;&#xA;    def mouseMovement(x, y):&#xD;&#xA;        global lastx, lasty, xrot, yrot&#xD;&#xA;        diffx=x-lastx #check the difference between the current x and the last x position&#xD;&#xA;        diffy=y-lasty #check the difference between the current y and the last y position&#xD;&#xA;        lastx=x #set lastx to the current x position&#xD;&#xA;        lasty=y #set lasty to the current y position&#xD;&#xA;        xrot += float(diffy) #set the xrot to xrot with the addition of the difference in the y position&#xD;&#xA;        yrot += float(diffx) #set the xrot to yrot with the addition of the difference in the x position&#xD;&#xA;    &#xD;&#xA;    glutInit()&#xD;&#xA;    glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH)&#xD;&#xA;    glutInitWindowSize(500, 500)&#xD;&#xA;    glutInitWindowPosition (100, 100)&#xD;&#xA;    glutCreateWindow(&quot;A basic OpenGL Window&quot;)&#xD;&#xA;    init()&#xD;&#xA;    glutDisplayFunc(display)&#xD;&#xA;    glutIdleFunc(display)&#xD;&#xA;    glutReshapeFunc(reshape)&#xD;&#xA;    glutPassiveMotionFunc(mouseMovement)&#xD;&#xA;    #check for mouse movement&#xD;&#xA;    glutKeyboardFunc (keyboard)&#xD;&#xA;    glutMainLoop()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/" />
  <row Id="18779" PostHistoryTypeId="2" PostId="9110" RevisionGUID="47955660-fb22-4d34-8183-f3964bf7c62f" CreationDate="2011-02-28T12:32:41.117" UserId="2798" Text="The problem resides in the amount of data you are sending to the GPU each frame. Just create a VBO for each batch and populate it once, then apply the corresponding transformation matrices (via glMultMatrix, or a shader if you are using ES 2.0) when drawing the batches. " />
  <row Id="18780" PostHistoryTypeId="2" PostId="9111" RevisionGUID="80e3aec1-f67d-4fb0-b92c-1382a366a450" CreationDate="2011-02-28T12:40:14.967" UserId="5759" Text="I'm currently develop a facebook mafia like PHP game(of course, a light weight version), here is a simplify database(MySQL) of the game&#xD;&#xA;&#xD;&#xA;    id-a           &lt;int3&gt;  &lt;for index&gt;&#xD;&#xA;    uid            &lt;chr15&gt; &lt;facebook uid&gt;&#xD;&#xA;    HP             &lt;int3&gt;  &lt;health point&gt;&#xD;&#xA;    exp            &lt;int3&gt;  &lt;experience&gt;&#xD;&#xA;    money          &lt;int3&gt;  &lt;money&gt;&#xD;&#xA;    list_inventory &lt;chr5&gt;  &lt;the inventory user hold...some special here, talk next&gt;&#xD;&#xA;    ... and 20 other fields just like reputation, num of combat...&#xD;&#xA;&#xD;&#xA;**the number next to the type is the size(byte) of the type*&#xD;&#xA;&#xD;&#xA;For the list_inventory, there have 40 inventorys in my game, (actually, I have 5 these kind of list in my database), and each user can only contain 1 qty of each inventory, therefore, I assign 5 char for this field and each bit of char as 1 item(5 char * 8 bit = 40 slot), and I will do some manipulation by PHP to extract the data from this 5 byte.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;OK, I was thinking on this, if this game contains 100,000 user, and only 10% are active, therefore, &#xD;&#xA;&#xD;&#xA;if use my method, for the space use, &#xD;&#xA;&#xD;&#xA;5 byte * 100,000 = 500 KB&#xD;&#xA;&#xD;&#xA;if I use another method, create a table user_hold_inventory, if the user have the inventory, then insert a record into this table, so, for 10,000 active user, I assume they got all item, but for other, I assume they got no item, here is the fields of the new table&#xD;&#xA;&#xD;&#xA;    id-b     &lt;int3&gt;  &lt;for index&gt;&#xD;&#xA;    id-a     &lt;int3&gt;  &lt;id of the user table&gt;&#xD;&#xA;    inv_no   &lt;int1&gt;  &lt;inventory that user hold&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for the space use,&#xD;&#xA;&#xD;&#xA;([id] (3+3) byte + [inv_no] 1 byte ) * [active user] 10,000 * [all inventory] * 40 = 2.8 MB&#xD;&#xA;&#xD;&#xA;seems method 2 have use more space, but it consume less CPU power. Please comment these 2 method or please correct me if there have another better method rather than what I think.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another question is, my database contain 26 fields, but I counted 5 of them are not change frquently, should I need to separate it on the other table or not?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So many words, thanks for reading :)" />
  <row Id="18781" PostHistoryTypeId="1" PostId="9111" RevisionGUID="80e3aec1-f67d-4fb0-b92c-1382a366a450" CreationDate="2011-02-28T12:40:14.967" UserId="5759" Text="Facebook Game database design" />
  <row Id="18782" PostHistoryTypeId="3" PostId="9111" RevisionGUID="80e3aec1-f67d-4fb0-b92c-1382a366a450" CreationDate="2011-02-28T12:40:14.967" UserId="5759" Text="&lt;databases&gt;&lt;design&gt;&lt;php&gt;" />
  <row Id="18783" PostHistoryTypeId="2" PostId="9112" RevisionGUID="a01954dd-dea6-490f-bb63-0c5e33d78d5f" CreationDate="2011-02-28T12:53:30.503" UserId="20" Text="Capture `mousemove` Events and use the `screenX` and `screenY` properties of the event object to update camera position (use the delta to the last `screenX` and `screenY` position to get the amount of movement).&#xD;&#xA;&#xD;&#xA;If you have some sort of [scenegraph][1], you could build a node-setup like the following:&#xD;&#xA;&#xD;&#xA;    CameraNode (Scene Node)&#xD;&#xA;     |&#xD;&#xA;     +- YawNode (Scene Node)&#xD;&#xA;         |&#xD;&#xA;         +- PitchNode (Scene Node)&#xD;&#xA;             |&#xD;&#xA;             +- Camera (actual Camera Object)&#xD;&#xA;&#xD;&#xA;Movement in the X-Axis rotates the YawNode and movement in the Y-Axis rotates the PitchNode. The CameraNode will be moved when the player moves.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scenegraph" />
  <row Id="18784" PostHistoryTypeId="2" PostId="9113" RevisionGUID="175f52d7-a4d9-46af-be39-21f4df833027" CreationDate="2011-02-28T14:12:10.613" UserId="5006" Text="First of all, don't skimp so much on space.  Even on shared hosting you'll get several GB of space and if you're not storing large binaries or entire books or something, CPU and memory are going to be bottlenecks before disk space is (usually).&#xD;&#xA;&#xD;&#xA;I thinking keeping int columns as small as possible is pretty old advice when disk space was more expensive than it is now.  Just use regular int, and if needed bigints (or whatever your DB's equivalent is)&#xD;&#xA;&#xD;&#xA;You'll definitely want to have a separate table for inventory, because that'll give your more flexibility.  If the items have any kind of special attributes you'll probably want the items in the DB as well (not sure from your question whether you were planning that already) that way you can do queries like, get all the items in player x's inventory that can be used while in combat, or something like that.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18785" PostHistoryTypeId="25" PostId="9111" RevisionGUID="a0c1655b-d39e-4742-a51d-3cb3dade4cfd" CreationDate="2011-02-28T14:23:00.540" Comment="http://twitter.com/#!/StackGameDev/status/42228277112352768" />
  <row Id="18786" PostHistoryTypeId="2" PostId="9114" RevisionGUID="4c3ead1e-88c1-42d3-a059-d6161c23e896" CreationDate="2011-02-28T15:30:57.050" UserId="3659" Text="if you're still looking for a solution to the timing:&#xD;&#xA;&#xD;&#xA;Read this [article][1], specifically how the class `FPSTimer` is used in the draw thread to time the drawing loop. I've used this example to write my own surfaceview-based game. It also provides a good basis for handling key event inputs. For handling touch events, you would want to override the `View.OnTouchListener` for `DOWN`, `MOVE`, and `UP` events.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://kzk9.net/b/2010/01/the-example-code-of-surfaceview-androidsdk/" />
  <row Id="18787" PostHistoryTypeId="2" PostId="9115" RevisionGUID="ff819f5a-3d5d-4994-85ba-061ed3fff421" CreationDate="2011-02-28T15:49:04.210" UserId="5399" Text="I see a number of tutorials on how to create good looking grasses when creating 3D renders but can't think how to model it for realtime/use in a game's scenery.&#xD;&#xA;&#xD;&#xA;Sure simple models with alpha cutouts can be used to create plants and trees in [really awesome scenery](http://uk.xbox360.ign.com/dor/objects/702493/the-elder-scrolls-iv-oblivion/images/e3-2005-elder-scrolls-oblivion-images-20050516054628427.html;jsessionid=2ssugrlkia8po) but what about a [lawn](http://www.shutterstock.com/pic-26213644/stock-photo--d-rendering-of-a-grass-footpath-leading-up-to-a-closed-white-door.html)?&#xD;&#xA;&#xD;&#xA;Are there any good tricks to achieve this effect?&#xD;&#xA;I tried with a simple 4 sided box and a small texture and the number of objects needed for a decent appearance made Max crawl to a halt. &#xD;&#xA;&#xD;&#xA;(I am thinking it may be possible with a shader but that is a whole other area so thought I would just ask about anyones experience with modelling it here)&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="18788" PostHistoryTypeId="1" PostId="9115" RevisionGUID="ff819f5a-3d5d-4994-85ba-061ed3fff421" CreationDate="2011-02-28T15:49:04.210" UserId="5399" Text="Modelling photo-realistic grass in realtime" />
  <row Id="18789" PostHistoryTypeId="3" PostId="9115" RevisionGUID="ff819f5a-3d5d-4994-85ba-061ed3fff421" CreationDate="2011-02-28T15:49:04.210" UserId="5399" Text="&lt;3d&gt;&lt;3d-meshes&gt;&lt;levels&gt;&lt;level-of-detail&gt;" />
  <row Id="18790" PostHistoryTypeId="2" PostId="9116" RevisionGUID="c9240895-cd12-42dd-b6d1-dc38cddb96b5" CreationDate="2011-02-28T16:06:00.373" UserId="5050" Text="It's quite simple, and just takes two things.&#xD;&#xA;&#xD;&#xA; 1. An event handler for the mouse move event.&#xD;&#xA; 2. A camera object representing your basic model-view transformation&#xD;&#xA;&#xD;&#xA;###Sample event code&#xD;&#xA;Here's some sample source code for doing the event handling. The system module (which handles all game &lt;--&gt; browser interaction) keeps track of two variables: `lastMousePosition` and `lastMouseDelta`.&#xD;&#xA;&#xD;&#xA;To track the camera with the mouse, you just need `lastMouseDelta` which is how you will know how many degrees to rotate frame-to-frame.&#xD;&#xA;&#xD;&#xA;      var canvas = /* WebGL rendering context */&#xD;&#xA;      canvas.onmousedown = function (event) { me.handleMouseDown(event); };&#xD;&#xA;      canvas.onmouseup   = function (event) { me.handleMouseUp(event);   };&#xD;&#xA;      canvas.onmousemove = function (event) { me.handleMouseMove(event); };&#xD;&#xA;&#xD;&#xA;      // snip&#xD;&#xA;      &#xD;&#xA;      engine.SystemModule.prototype.handleMouseMove = function(event) {&#xD;&#xA;        this.lastMouseDelta = [event.clientX - this.lastMousePosition[0],&#xD;&#xA;                               event.clientY - this.lastMousePosition[1]];&#xD;&#xA;        this.lastMousePosition = [event.clientX, event.clientY];&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;###Same camera movement code&#xD;&#xA;Here's some sample code for handling the camera rotation. Given the number of pixels the mouse has moved in the X or Y direction, rotate the camera by that many degrees.&#xD;&#xA;&#xD;&#xA;     /**&#xD;&#xA;       * degrees/pixel&#xD;&#xA;       * @const&#xD;&#xA;       */&#xD;&#xA;      var cameraMouseRotation = 0.5;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      // Mouse movement for camera angle.&#xD;&#xA;      if (sys.isMouseDown()) {&#xD;&#xA;        var positionChange = sys.getLastMousePositionDelta();&#xD;&#xA;        camera.rotateYDegs(cameraMouseRotation * positionChange[0]);&#xD;&#xA;        camera.rotateXDegs(-cameraMouseRotation * positionChange[1]);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;Later, when you actually go on to render your world, simply generate a model-view matrix from your camera. (Converting the camera's position, yaw, pitch, and roll into vectors you can pass to gluLookAt.) And you should be good to go." />
  <row Id="18791" PostHistoryTypeId="2" PostId="9117" RevisionGUID="f64707b9-f623-466b-afab-9584276093a3" CreationDate="2011-02-28T16:14:09.483" UserId="5763" Text="I mean: i don't think they made 4 differnet game for each platform.&#xD;&#xA;&#xD;&#xA;How they achived such huge cross-platform? (Did they use a graphic engine that already supports all of them?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="18792" PostHistoryTypeId="1" PostId="9117" RevisionGUID="f64707b9-f623-466b-afab-9584276093a3" CreationDate="2011-02-28T16:14:09.483" UserId="5763" Text="How portal 2 can be so cross-platform? (pc,osx,xbox,ps3)" />
  <row Id="18793" PostHistoryTypeId="3" PostId="9117" RevisionGUID="f64707b9-f623-466b-afab-9584276093a3" CreationDate="2011-02-28T16:14:09.483" UserId="5763" Text="&lt;cross-platform&gt;&lt;porting&gt;" />
  <row Id="18794" PostHistoryTypeId="2" PostId="9118" RevisionGUID="b07cca34-41b4-436f-b1fc-946958e7c536" CreationDate="2011-02-28T16:22:30.370" UserId="4749" Text="I would recommend having a VBO, with each vertex containing the position/rotation of each rendered object and batching based on texture like you're doing. I'm not very familiar with ogl ES, so i'm not sure which version of glsl it supports, but you might even be able to batch based on a set of textures, and store which of the 4 or so textures you are passing in you'd be using inside of the vertex. Point sprites would definitely improve you're performance because it would cut down the amount of data you are sending over drastically, and batching should never decrease performance if you are doing it correctly. Also, you could improve performance a bit by computing rotation on the shader and only passing in an int/float value into the params or inside the vertex itself. (params would be faster, just create an array for each batch and have an index into that array stored inside the vertex itself)" />
  <row Id="18795" PostHistoryTypeId="2" PostId="9119" RevisionGUID="22b48652-46e2-47b3-aaf3-71319a24002f" CreationDate="2011-02-28T16:26:52.473" UserId="2306" Text="I'm not sure what is considered the best approach, but one option would be to use instanced geometry - you provide the GPU with a 3d model and a list of places/orientations where you'd like it drawn (preferable in the form of a concatenated matrix), and the GPU will handle the rest via a custom vertex shader.&#xD;&#xA;&#xD;&#xA;Basically, you create two vertex buffers: one containing your 3D model (a blade of grass or patch of sod, for instance), and one containing a list of transformation matrices, each matrix containing the scale+rotation+translation where you'd like to render an instance of your model. (You'll need a custom vertex structure to hold the matrix - it's a vertex buffer in name only, and is just used to pass matrices to the GPU.)&#xD;&#xA;&#xD;&#xA;Then, you'll need a custom shader. The vertex shader will get called for each vertex in each stream, so for each call you'll get one vertex from your blade model, and one of the transformation matrices. The shader then transforms the blade vertex with the matrix, and returns it. My instancing shader is only about 30 lines, and mostly white space - it's surprisingly simple.&#xD;&#xA;&#xD;&#xA;One reason to pass in a model for a patch of grass rather than individual blades is that it makes it easier to cull. If you're using an octree or BSP for collision and visibility determination, you can reduce the depth of your tree by dealing with larger &quot;blocks&quot; of grass instead of smaller blades. Also, it's easy to provide a less complex/less-detailed model for a patch of grass if you detect a performance issue.&#xD;&#xA;&#xD;&#xA;There's also something called a &quot;Geometry Shader&quot; that may apply here, but I don't know anything about it other than it's relatively new and apparently (?) not supported on the xbox.&#xD;&#xA;&#xD;&#xA;[Here's a link to an XNA instancing sample.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/mesh_instancing" />
  <row Id="18796" PostHistoryTypeId="5" PostId="9119" RevisionGUID="262b1496-80c3-4b21-92dd-60578d7f7488" CreationDate="2011-02-28T16:33:29.600" UserId="2306" Comment="added 118 characters in body; deleted 52 characters in body; deleted 32 characters in body" Text="I'm not sure what is considered the best approach, but one option would be to use instanced geometry - you provide the GPU with a 3d model and a list of places/orientations where you'd like it drawn (preferable in the form of a concatenated matrix), and the GPU will handle the rest via a custom vertex shader.&#xD;&#xA;&#xD;&#xA;Basically, you create two vertex buffers: one containing your 3D model (a blade of grass or patch of sod, for instance), and one containing a list of transformation matrices, each matrix containing the scale+rotation+translation where you'd like to render an instance of your model. (You'll need a custom vertex structure to hold the matrix - it's a vertex buffer in name only, and is just used to pass matrices to the GPU.)&#xD;&#xA;&#xD;&#xA;Then, you'll need a custom shader. The vertex shader will get called for each vertex in each stream, so for each call you'll get two input parameters: one vertex from your blade model, and one of the transformation matrices. The shader then transforms the model vertex with the matrix, and returns the updated position. &#xD;&#xA;&#xD;&#xA;If you want effects like wind, etc, you can adjust the matrix for each instance and update the matrix stream.&#xD;&#xA;&#xD;&#xA;Using a model for a patch of grass rather than individual blades is makes it easier to cull. If you're using an octree or BSP for collision and visibility determination, you can reduce the depth of your tree by dealing with larger &quot;blocks&quot; of grass instead of smaller blades. Also, it's easy to provide a less complex/less-detailed model for a patch of grass if you detect a performance issue.&#xD;&#xA;&#xD;&#xA;There's also something called a &quot;Geometry Shader&quot; that may apply here, but I don't know anything about it other than it's relatively new and apparently (?) not supported on the xbox.&#xD;&#xA;&#xD;&#xA;[Here's a link to an XNA instancing sample.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/mesh_instancing" />
  <row Id="18797" PostHistoryTypeId="2" PostId="9120" RevisionGUID="a1049c31-45e1-470d-8d39-e078ea77ac23" CreationDate="2011-02-28T16:35:41.190" UserId="138" Text="They utilized their proprietary Source engine. Many game engines and libraries are cross platform, it's nothing new. Portability is typically built into most contemporary engines.&#xD;&#xA;&#xD;&#xA;The simple answer: their engine supports all of those platforms. The gameplay code isn't rewritten for each. Only necessary platform-specific systems are re-written to an API specified by the engine.&#xD;&#xA;&#xD;&#xA;Unreal is another example of a cross-platform FPS engine, as is the Infinity Ward engine. You'd be hard pressed to find a contemporary game engine that isn't cross platform." />
  <row Id="18798" PostHistoryTypeId="2" PostId="9121" RevisionGUID="c217e462-f614-4893-bb93-3a2877824310" CreationDate="2011-02-28T16:46:55.830" UserId="1629" Text="I have a game using DirectX 9, and a development station using Win 7 x64. I am still able to get access to another station with Vista x64 / dual booted with WinXP x86.&#xD;&#xA;&#xD;&#xA;I wanted to check early Z efficiency in the game and to my sadness all tools I have tried seem to be unable to perform this task:&#xD;&#xA;&#xD;&#xA;### AMD PerfStudio&#xD;&#xA;&#xD;&#xA;- AMD GPUPerfStudio 2 does not support DirectX 9 at all&#xD;&#xA;- AMD GPUPerfStudio 1.2 does not install correctly on Windows 7. When I have tweaked the MSI package (a simple OS version check adjustment was needed), it complained the drivers I have do not provide needed instrumentation. The drivers old enough to support the GPUPerfStudio would most likely not be able to operate with my Radeon 5750 card (though this is something I am not 100 % sure, I did not attempt to try any older drivers, not knowing which I should look for)&#xD;&#xA;&#xD;&#xA;### PIX&#xD;&#xA;&#xD;&#xA;PIX does not seem to contain any counters like this. It offers some ATI specific counters, but when I try to activate them, the PIX reports &quot;PIX encountered a problem while attaching to the target program.&quot;&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;I do not want to upgrade to DX 10/11 just to be able to profile the game, but it seems without the step I am somewhat locked with a toolset which is no longer supported.&#xD;&#xA; &#xD;&#xA;I see only one obvious options which would probably work, and that is using WinXP (or with a little bit of luck even Vista) station, perhaps with some older AMD card, to make sure GPUPerfStudio 1.2 works.&#xD;&#xA;&#xD;&#xA;Other than that, can anyone recommend other options how to check GPU HW counters (HiZ / EarlyZ in particular, but if others would be enabled as well, it would be a nice bonus) for a DirectX 9 game on Windows 7, preferably on AMD GPU? (If that is not possible, I would definitely prefer switching GPU to switching the OS, but before I do so I would like to know if I will not hit the same problem with nVidia again)&#xD;&#xA;" />
  <row Id="18799" PostHistoryTypeId="1" PostId="9121" RevisionGUID="c217e462-f614-4893-bb93-3a2877824310" CreationDate="2011-02-28T16:46:55.830" UserId="1629" Text="How to check Early Z efficiency on AMD GPU with Windows 7" />
  <row Id="18800" PostHistoryTypeId="3" PostId="9121" RevisionGUID="c217e462-f614-4893-bb93-3a2877824310" CreationDate="2011-02-28T16:46:55.830" UserId="1629" Text="&lt;windows&gt;&lt;directx9&gt;&lt;gpu&gt;&lt;profiling&gt;" />
  <row Id="18801" PostHistoryTypeId="2" PostId="9122" RevisionGUID="06f47375-cad5-484e-a2fd-6dd2c31fcb8b" CreationDate="2011-02-28T16:55:05.190" UserId="2306" Text="As A.A Grapsas (that's a tongue-twister) said, their underlying library/engine was created to be cross-platform.&#xD;&#xA;&#xD;&#xA;One of the reasons that things like the Unreal engine are so expensive is that they've (mostly) conquered the cross-platform challenge, allowing games based on it to run on the Xbox/PS3/Windows/etc. Since cross-platform means working with different platform-specific compilers, different target processors (X86, ARM, PowerPC, Cell, etc), different GPUs (NVidia, ATI, though this is handled quite well by the drivers these days), etc. Implementing a new engine that provides that capability is non-trivial, as is maintaining it and keeping up with new platforms, especially mobile devices. Poorly implemented code will rapidly mire a project in bugs and maintenance challenges.&#xD;&#xA;&#xD;&#xA;From a development standpoint, the key is to use a *native, compiled* language that's pretty well standardized and available on all target platforms, which today means C++. Platform-specific methods are placed in pluggable libraries, and the entire code base is compiled using each platform-native compiler. g++ is a good baseline - unfortunately, &quot;good baseline&quot; also means lowest common denominator. I'm not sure which compilers are used for the Xbox and PS3, but I'd bet that the professional Xbox kit uses Visual C++. VC is an *amazing* tool, and offers one of the best compilers and most advanced debuggine environments available in the world.&#xD;&#xA;&#xD;&#xA;If you're interested in more detail, check out [Brian Hook's book, Write Portable Code.][1] It's pretty inexpensive and an easy read. He's been around the game industry for quite awhile and, though the book doesn't focus on games per se, the advice it provides definitely applies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hookatooka.com/wpc/" />
  <row Id="18802" PostHistoryTypeId="2" PostId="9123" RevisionGUID="b0c6155a-594a-4df7-8565-95cdba2268c4" CreationDate="2011-02-28T17:07:38.963" UserId="20" Text="What you're doing here is premature optimization. Modern RDBMS can handle much more records and are optimized for speed and efficiency. &#xD;&#xA;&#xD;&#xA;There's no point in simplifying your DB-design like that, because: &#xD;&#xA;&#xD;&#xA; - You'll loose flexibility.&#xD;&#xA; - You will have to do the stuff in your code that was previously handled by the RDBMS (eg. get all inventory items as separate fields?)&#xD;&#xA; - It will needlessly obfuscate your DB-design.&#xD;&#xA;&#xD;&#xA;A lot of RDMBS can also do load balancing, so if you're really going to hit a DB performance bottleneck, you could scale up your DB servers." />
  <row Id="18803" PostHistoryTypeId="25" PostId="9117" RevisionGUID="a4ccdc3f-b034-4b58-aaea-5e94ad80a961" CreationDate="2011-02-28T17:23:00.480" Comment="http://twitter.com/#!/StackGameDev/status/42273575436161024" />
  <row Id="18805" PostHistoryTypeId="2" PostId="9125" RevisionGUID="3bc224b5-c388-4052-b4e8-7ac6755da601" CreationDate="2011-02-28T17:34:17.427" UserId="3794" Text="i would LOVE to suggest pure geometry shader based solution, but you dont know even basic vertex-fragment shaders. So no, let's stay on the ground:). I will only guide to this site:&#xD;&#xA;&#xD;&#xA;[Loopix project][1]&#xD;&#xA;&#xD;&#xA;It is great place where to grab simple vegetation models. They are very lowpoly and always only one textured, with very smart texture repeating. &#xD;&#xA;&#xD;&#xA;Use instanced rendering for sure.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.loopix-project.com/" />
  <row Id="18806" PostHistoryTypeId="5" PostId="9122" RevisionGUID="c2777e37-288f-47b9-8369-0221697c3d56" CreationDate="2011-02-28T17:37:59.537" UserId="2306" Comment="edited body" Text="As A.A Grapsas (that's a tongue-twister) said, their underlying library/engine was created to be cross-platform.&#xD;&#xA;&#xD;&#xA;One of the reasons that things like the Unreal engine are so expensive is that they've (mostly) conquered the cross-platform challenge, allowing games based on it to run on the Xbox/PS3/Windows/etc. Since cross-platform means working with different platform-specific compilers, different target processors (X86, ARM, PowerPC, Cell, etc), different GPUs (NVidia, ATI, though this is handled quite well by the drivers these days), etc. Implementing a new engine that provides that capability is non-trivial, as is maintaining it and keeping up with new platforms, especially mobile devices. Poorly implemented code will rapidly mire a project in bugs and maintenance challenges.&#xD;&#xA;&#xD;&#xA;From a development standpoint, the key is to use a *native, compiled* language that's pretty well standardized and available on all target platforms, which today means C++. Platform-specific methods are placed in pluggable libraries, and the entire code base is compiled using each platform-native compiler. g++ is a good baseline - unfortunately, &quot;good baseline&quot; also means lowest common denominator. I'm not sure which compilers are used for the Xbox and PS3, but I'd bet that the professional Xbox kit uses Visual C++. VC is an *amazing* tool, and offers one of the best compilers and most advanced debugging environments available in the world.&#xD;&#xA;&#xD;&#xA;If you're interested in more detail, check out [Brian Hook's book, Write Portable Code.][1] It's pretty inexpensive and an easy read. He's been around the game industry for quite awhile and, though the book doesn't focus on games per se, the advice it provides definitely applies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hookatooka.com/wpc/" />
  <row Id="18808" PostHistoryTypeId="2" PostId="9126" RevisionGUID="82563dba-be79-43d7-ac03-db770614862e" CreationDate="2011-02-28T19:30:48.317" UserId="318" Text="To enable both recording and rewinding, record all events (user generated, timer generated, communication generated, ...).&lt;br/&gt;&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;For each event record time of event, what was changed, previous values, new values.&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;Calculated values do not need to be recorded unless calculating is random&lt;br/&gt;&#xD;&#xA;(In these cases you can either record calculated values too, or record changes to seed after each random calculation).&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;Data saved is a list of changes.&lt;br/&gt;&#xD;&#xA;Changes can be saved in various formats (binary, xml, ...).&lt;br/&gt;&#xD;&#xA;Change consists of entity id, property name, old value, new value.&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;Make sure your system can play back these changes (access desired entity, changed desired property forward to new state or backward to old state).&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;Example:&lt;br/&gt;&#xD;&#xA;&lt;li&gt;time from start = t1, entity = player 1, property = position, changed from a to b&lt;/li&gt;&#xD;&#xA;&lt;li&gt;time from start = t1, entity = system, property = game mode, changed from c to d&lt;/li&gt;&#xD;&#xA;&lt;li&gt;time from start = t2, entity = player 2, property = state, changed from e to f&lt;/li&gt;&#xD;&#xA;&#xD;&#xA;To enable faster rewinding/fastforwarding or recording only certain time ranges,&lt;br/&gt;&#xD;&#xA;key frames are necessary - if recording all the time, every now and then save entire game state.&lt;br/&gt;&#xD;&#xA;If recording only a certain time ranges, at the beginning save the initial state." />
  <row Id="18809" PostHistoryTypeId="2" PostId="9127" RevisionGUID="1f66b57f-a9b5-45a2-86ea-71c28bc41b80" CreationDate="2011-02-28T19:32:36.423" UserId="5767" Text="I'm starting my undergraduate studies soon, but as I'm not from UK, I completly don't have idea what university should I choose.&#xD;&#xA;&#xD;&#xA;Do you know any good game programming universities?" />
  <row Id="18810" PostHistoryTypeId="1" PostId="9127" RevisionGUID="1f66b57f-a9b5-45a2-86ea-71c28bc41b80" CreationDate="2011-02-28T19:32:36.423" UserId="5767" Text="Which university shall I choose in UK? ( game programming )" />
  <row Id="18811" PostHistoryTypeId="3" PostId="9127" RevisionGUID="1f66b57f-a9b5-45a2-86ea-71c28bc41b80" CreationDate="2011-02-28T19:32:36.423" UserId="5767" Text="&lt;c++&gt;" />
  <row Id="18812" PostHistoryTypeId="2" PostId="9128" RevisionGUID="c1fa8ee1-1d5e-42a0-83e8-517f2ad92848" CreationDate="2011-02-28T19:59:02.740" UserId="5768" Text="Although not exactly the same technology you might want to check out the lightweight java game library at http://lwjgl.org/ as there seems to be a fair amount of tutorials on it. " />
  <row Id="18813" PostHistoryTypeId="2" PostId="9129" RevisionGUID="97d33709-2f7c-4885-bc39-08941dfb9168" CreationDate="2011-02-28T20:02:53.283" UserId="5768" Text="This book might be of some help to you. I believe that the company that I work for used the examples in this book even though we're not a game shop. &#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Multiplayer-Programming-Prima-Techs-Development/dp/0761532986/ref=pd_sim_b_7" />
  <row Id="18814" PostHistoryTypeId="25" PostId="9127" RevisionGUID="918a0e76-9519-4cc5-b58e-0110f3a353e7" CreationDate="2011-02-28T20:23:00.643" Comment="http://twitter.com/#!/StackGameDev/status/42318873927757824" />
  <row Id="18815" PostHistoryTypeId="2" PostId="9130" RevisionGUID="3ea35960-deb7-4fc3-8bb4-3a6c8aef6265" CreationDate="2011-02-28T20:26:48.823" UserId="-1" Text="" />
  <row Id="18816" PostHistoryTypeId="2" PostId="9131" RevisionGUID="afd41cf5-f332-4823-b2f3-e3b8575536c9" CreationDate="2011-02-28T20:26:48.823" UserId="-1" Text="" />
  <row Id="18817" PostHistoryTypeId="2" PostId="9132" RevisionGUID="4407179f-92e0-4186-9c0d-d42a6c96a4e5" CreationDate="2011-02-28T20:32:29.693" UserId="337" Text="I'm building a game with Ogre3d, I've got fog working properly with:&#xD;&#xA;`scenemanager-&gt;setFog(Ogre::FOG_LINEAR, Ogre::ColourValue( 0.23f, 0.725f, 1.0f ), 0, 18, 20 );`&#xD;&#xA;&#xD;&#xA;However I'm currently implementing a GUI system (libRocket) which is rendered on top of everything else, and this removes the fog, does anyone know how to fix this? (I'm using the default libRocket rendering system for ogre as included in the samples, but this problem also appears when using a semi-transparent overlay)." />
  <row Id="18818" PostHistoryTypeId="1" PostId="9132" RevisionGUID="4407179f-92e0-4186-9c0d-d42a6c96a4e5" CreationDate="2011-02-28T20:32:29.693" UserId="337" Text="Ogre3D Fog with overlays" />
  <row Id="18819" PostHistoryTypeId="3" PostId="9132" RevisionGUID="4407179f-92e0-4186-9c0d-d42a6c96a4e5" CreationDate="2011-02-28T20:32:29.693" UserId="337" Text="&lt;ogre&gt;" />
  <row Id="18823" PostHistoryTypeId="5" PostId="9131" RevisionGUID="78a35d11-1717-47c3-aaf8-9fa98c3a9568" CreationDate="2011-02-28T20:41:24.293" UserId="337" Comment="added 82 characters in body" Text="Ogre3D (http://www.ogre3d.org) is a multiplatform, opensource 3D rendering engine." />
  <row Id="18824" PostHistoryTypeId="24" PostId="9131" RevisionGUID="78a35d11-1717-47c3-aaf8-9fa98c3a9568" CreationDate="2011-02-28T20:41:24.293" Comment="Proposed by 337 approved by 14 edit id of 58" />
  <row Id="18825" PostHistoryTypeId="2" PostId="9134" RevisionGUID="312e06d6-3e7a-4ee8-a286-4841f7bf74e8" CreationDate="2011-02-28T20:49:03.273" UserId="5696" Text="I'm an enterprise Java programmer, however something I've been interested in and what got me into the whole programming thing was the idea of being able to create a game.&#xD;&#xA;&#xD;&#xA;Just wondering if anybody could offer any advice, or book recommendations.&#xD;&#xA;&#xD;&#xA;The side I am most interested in is game engine design and implementation. People may say &quot;ahh but plenty exist why write your own&quot; - its purely for learning purposes, seeing how things work and so on.&#xD;&#xA;&#xD;&#xA;So far I've taken a look at [LWJGL][1], but achieved nothing too serious.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lwjgl.org/" />
  <row Id="18826" PostHistoryTypeId="1" PostId="9134" RevisionGUID="312e06d6-3e7a-4ee8-a286-4841f7bf74e8" CreationDate="2011-02-28T20:49:03.273" UserId="5696" Text="Best resources to learn Game Development from a Java background?" />
  <row Id="18827" PostHistoryTypeId="3" PostId="9134" RevisionGUID="312e06d6-3e7a-4ee8-a286-4841f7bf74e8" CreationDate="2011-02-28T20:49:03.273" UserId="5696" Text="&lt;game-design&gt;&lt;engine&gt;&lt;java&gt;" />
  <row Id="18828" PostHistoryTypeId="2" PostId="9135" RevisionGUID="32ea59bf-8c2a-451f-bd01-650828b865dd" CreationDate="2011-02-28T21:17:10.457" UserId="5704" Text="The probably best reference to rendering grass: &lt;a href=&quot;http://www.kevinboulanger.net/grass.html&quot;&gt;Boulanger&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Also, since geometry shader was mentioned: &lt;a href=&quot;http://rastergrid.com/blog/2010/02/instance-culling-using-geometry-shaders/&quot;&gt;this&lt;/a&gt; techdemo has slightly inferior quality compared to K. Boulanger's technique, but it is stunning in another way since it draws crazy amounts of grass blades and does the culling via the geometry shader and transform feedback, which is a pretty cool idea." />
  <row Id="18830" PostHistoryTypeId="6" PostId="9134" RevisionGUID="47fee816-b99f-4bc3-bd5f-22d83d564e6c" CreationDate="2011-02-28T21:22:36.273" UserId="14" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;java&gt;" />
  <row Id="18831" PostHistoryTypeId="2" PostId="9136" RevisionGUID="4230f5a6-f688-4513-95b7-028e24cef831" CreationDate="2011-02-28T21:51:52.433" UserId="93" Text="A game development degree might be more fun for you to take, but if you talk to anyone in the industry that hires programmers they will all tell you that they'd rather hire a programmer with a good Computer Science, Maths or Physics degree than someone who did a game development degree. There are plenty of online resources that will help you find out which UK universities have good CS departments." />
  <row Id="18832" PostHistoryTypeId="2" PostId="9137" RevisionGUID="ac2c5a96-c172-4117-8724-18fa0fe7e987" CreationDate="2011-02-28T22:03:19.530" UserId="5232" Text="Yes I proudly -and sadly- declare that I am a complete nincompoop when it comes to Flash, and I have been fishing around the big wide web for information. The reason for this is that I have been contracted to create a game(s) for a website -the usual flash-based games caveat. Please I do not mean things like by those gaming generator websites, I mean small yet professional games- but the caveat, as always, is that impossible dream: it needs to be done all for free. The budget...well imagine it as not there.&#xD;&#xA;&#xD;&#xA;Annoyingly is that I am a game designer yes, but with a ridiculously tight deadline I haven't got much time to re-learn (ah the heady days of programming at uni) everything by the end of March, so I'd like to ask some people who know their stuff rather than keep looking at a gazillion different things.&#xD;&#xA;&#xD;&#xA;This is my understanding: with the flash sdk you can create a game, albeit you need to be pretty programming savvy. FlashDevelop helps there -yet I am not entirely sure how. Yet even FD says to use Flash for the animation/graphics.&#xD;&#xA;&#xD;&#xA;Yes its undeniably powerful but as I said there is the unattainable demand of no money. The million dollar question: what, if any, tools can I use to create a free flash game?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your time,&#xD;&#xA;&#xD;&#xA;ReaperOscuro" />
  <row Id="18833" PostHistoryTypeId="1" PostId="9137" RevisionGUID="ac2c5a96-c172-4117-8724-18fa0fe7e987" CreationDate="2011-02-28T22:03:19.530" UserId="5232" Text="Need help in determing what, if any, tools can be used to create a free Flash game" />
  <row Id="18834" PostHistoryTypeId="3" PostId="9137" RevisionGUID="ac2c5a96-c172-4117-8724-18fa0fe7e987" CreationDate="2011-02-28T22:03:19.530" UserId="5232" Text="&lt;flash&gt;" />
  <row Id="18835" PostHistoryTypeId="2" PostId="9138" RevisionGUID="349c501d-af02-4d7f-a6d5-ee63bbeecf28" CreationDate="2011-02-28T22:11:47.400" UserId="5704" Text="You mention mobile platforms which do not have instancing. But, you still do have vertex shaders, don't you?&#xD;&#xA;&#xD;&#xA;In that case, you can still do pseudo instancing, which is very fast too. Make a VBO (GL_STATIC_DRAW) with the corner points (relative to the center point of the sprite, e.g. -1/-1, 1/-1, 1/1, -1/1) and any texture coordinates you need, in it.&lt;br&gt;Then set one of the generic vertex attributes for every draw call to the centerpoint of the sprite, and draw the two triangles with the buffer bound. Inside the vertex shader, read the generic vertex attribute and add the vertex's coordinates.&#xD;&#xA;&#xD;&#xA;That will save you blocking on a data transfer for every sprite and should be much faster. The actual number of draw calls is not so terribly important, the blocking/stalling in between is." />
  <row Id="18836" PostHistoryTypeId="2" PostId="9139" RevisionGUID="c190c7e8-5fd5-4f00-9d27-a44f651370fd" CreationDate="2011-02-28T22:30:23.397" UserId="4410" Text="When I think of people I've interviewed that have done games courses, the one that sticks in my mind is [Abertay][1] (in Scotland).&#xD;&#xA;&#xD;&#xA;That said, I have to agree with U62. Doing a games course doesn't mean you'll come out the other side and fall into a job in games. I've interviewed people (and the odd lecturer) who's been on games courses from various institutions and the quality seems to vary wildly. I would expect good games &quot;people&quot; to be good no matter what course they do. I don't think many people I've interviewed and then been offered a job have come from games courses, the majority have done other courses and have a strong love of playing and writing games, with them being able to demonstrate this love via some sort of game related demo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.abertay.ac.uk/studying/find/ug/" />
  <row Id="18837" PostHistoryTypeId="2" PostId="9140" RevisionGUID="d4f3f31e-eef6-4c15-80f3-de8fad7f285a" CreationDate="2011-02-28T22:54:32.353" UserId="3794" Text="There are two types of beginners: Tho ones who wants to make game and the ones who wants to understand stuff (and make game as weel). There is nothing bad to be in the second group. I personaly like it most.&#xD;&#xA;&#xD;&#xA;This site is great learning resource. For engines, just check  out engine tag:&#xD;&#xA;http://gamedev.stackexchange.com/questions/tagged/engine&#xD;&#xA;&#xD;&#xA;Just search site for the &quot;how do i start&quot; and similar. You will find great resources and ideas of simple games for beginners.&#xD;&#xA;&#xD;&#xA;Graphics in java can be done in more ways than LWJGL:&#xD;&#xA; &#xD;&#xA; - [JOGL][1] - I recommend most. Jogl is openGL in Java. What more to say? :)&#xD;&#xA; - [Java 3D api][2]&#xD;&#xA; - [Jmonkey engine][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://java.net/projects/jogl/&#xD;&#xA;  [2]: http://java.sun.com/developer/onlineTraining/java3d/&#xD;&#xA;  [3]: http://jmonkeyengine.com/" />
  <row Id="18838" PostHistoryTypeId="2" PostId="9141" RevisionGUID="d856c40d-7dd5-45ad-bf19-e2ae0222d550" CreationDate="2011-02-28T23:12:37.870" UserId="20" Text="This [question][1] pretty much covers the software part.&#xD;&#xA;&#xD;&#xA;Then I suggest you use a framework like [Flixel][2] or [Flashpunk][3] for your game as it will allow you to: &#xD;&#xA;&#xD;&#xA; 1. Build a game rather quickly and... &#xD;&#xA; 2. Doesn't require Flash IDE to create graphics, since these engines are Bitmap based (so you could use GIMP or other image editing software to create your sprites).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/325/how-can-i-develop-flash-games-without-expensive-software&#xD;&#xA;  [2]: http://flixel.org/&#xD;&#xA;  [3]: http://flashpunk.net/" />
  <row Id="18839" PostHistoryTypeId="5" PostId="9137" RevisionGUID="9a45e49e-be12-438d-9f26-aa8f024994c8" CreationDate="2011-02-28T23:13:31.863" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="Yes I proudly -and sadly- declare that I am a complete nincompoop when it comes to Flash, and I have been fishing around the big wide web for information. The reason for this is that I have been contracted to create a game(s) for a website -the usual flash-based games caveat. Please I do not mean things like by those gaming generator websites, I mean small yet professional games- but the caveat, as always, is that impossible dream: it needs to be done all for free. The budget...well imagine it as not there.&#xD;&#xA;&#xD;&#xA;Annoyingly is that I am a game designer yes, but with a ridiculously tight deadline I haven't got much time to re-learn (ah the heady days of programming at uni) everything by the end of March, so I'd like to ask some people who know their stuff rather than keep looking at a gazillion different things.&#xD;&#xA;&#xD;&#xA;This is my understanding: with the flash sdk you can create a game, albeit you need to be pretty programming savvy. FlashDevelop helps there -yet I am not entirely sure how. Yet even FD says to use Flash for the animation/graphics.&#xD;&#xA;&#xD;&#xA;Yes its undeniably powerful but as I said there is the unattainable demand of no money. The million dollar question: what, if any, tools can I use to create a free flash game?" />
  <row Id="18840" PostHistoryTypeId="6" PostId="9137" RevisionGUID="9a45e49e-be12-438d-9f26-aa8f024994c8" CreationDate="2011-02-28T23:13:31.863" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="&lt;flash&gt;&lt;tools&gt;&lt;actionscript&gt;" />
  <row Id="18841" PostHistoryTypeId="25" PostId="9132" RevisionGUID="48d74182-3b74-4671-bd8c-860b28357ed1" CreationDate="2011-02-28T23:23:00.507" Comment="http://twitter.com/#!/StackGameDev/status/42364172268351488" />
  <row Id="18842" PostHistoryTypeId="2" PostId="9142" RevisionGUID="4989c310-e428-48fa-b8c0-3c346f7fb6fa" CreationDate="2011-03-01T00:30:01.430" UserId="721" Text="Did you use [my port of irrlicht][1] for android ? For 2d sprites on Android and iphone, i use the same tricks as you: batching. I try many solutions in OpenGL ES 1.x and 2.x:&#xD;&#xA;&#xD;&#xA; - sort by z (parallax) and by texture, do the transformations on the CPU and call glDrawArrays or glDrawElements (fastest way). Use one big texture if you can.&#xD;&#xA; - same trick with VBO, not faster because for each frame you refresh all informations. It can be useful for statics sprites.&#xD;&#xA; - use OpenGL ES 2.x and use Vertex shader to compute positions (not faster)&#xD;&#xA; - use PointSprites (not a good idea)&#xD;&#xA; - use gldrawtexoes extension...&#xD;&#xA; - use a drawcall for each sprite (slowest method)&#xD;&#xA;&#xD;&#xA;So as you, all transformations are done by the CPU for OGLES 1.x or OGLES 2.x. If you have neon instructions, you can use them to speed your computations.&#xD;&#xA;&#xD;&#xA;Ps: on iphone or android devices, i'm not CPU limited but fill rate limited. So it is very important to limit overdraw.&#xD;&#xA;&#xD;&#xA;  [1]: http://gitorious.org/irrlichtandroid/irrlichtandroid" />
  <row Id="18843" PostHistoryTypeId="5" PostId="9142" RevisionGUID="5b76346f-31b6-4b2c-ad22-9eef716eef7f" CreationDate="2011-03-01T00:47:55.690" UserId="721" Comment="added 60 characters in body" Text="Did you use [my port of irrlicht][1] for android ? For 2d sprites on Android and iphone, i use the same tricks as you: batching. I try many solutions in OpenGL ES 1.x and 2.x:&#xD;&#xA;&#xD;&#xA; - sort by z (parallax) and by texture, do the transformations on the CPU and call glDrawArrays or glDrawElements (fastest way). Use one big texture if you can.&#xD;&#xA; - same trick with VBO, not faster because for each frame you refresh all informations. It can be useful for statics sprites.&#xD;&#xA; - use OpenGL ES 2.x and use Vertex shader to compute positions (slower)&#xD;&#xA; - use PointSprites (no solution if it is not a square and too many transparent pixels kill fillrate)&#xD;&#xA; - use gldrawtexoes extension...&#xD;&#xA; - use a drawcall for each sprite (slowest method)&#xD;&#xA;&#xD;&#xA;So as you, all transformations are done by the CPU for OGLES 1.x or OGLES 2.x. If you have neon instructions, you can use them to speed your computations.&#xD;&#xA;&#xD;&#xA;Ps: on iphone or android devices, i'm not CPU limited but fill rate limited. So it is very important to limit overdraw.&#xD;&#xA;&#xD;&#xA;  [1]: http://gitorious.org/irrlichtandroid/irrlichtandroid" />
  <row Id="18844" PostHistoryTypeId="2" PostId="9143" RevisionGUID="c7edba30-886c-4f1a-9724-c49bca4f9ab8" CreationDate="2011-03-01T01:07:48.947" UserId="111" Text="Mouselook for a first person shooter will be limited without proper support of mouse capture, which is not yet solved/implemented/shipped. A discussion of standardizing this is underway, however. See [W3C Bug 9557 - Could we get Mouse Capture via Javascript?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.w3.org/Bugs/Public/show_bug.cgi?id=9557" />
  <row Id="18845" PostHistoryTypeId="2" PostId="9144" RevisionGUID="093aaa22-d511-4c29-b9c5-350fca3c9697" CreationDate="2011-03-01T01:57:06.063" UserId="5774" Text="I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font loading, etcetera. I am also using OpenGL via the FreeGLUT library in conjunction with SDL to display graphics.&#xD;&#xA;&#xD;&#xA;My method of collision detection is AABB (Axis-Aligned Bounding Box), which is really all I need to start with. What I need is an easy way to both detect which side the collision occurred on and handle the collisions properly. So, basically, if the player collides with the top of the platform, reposition him to the top; if there is a collision to the sides, reposition the player back to the side of the object; if there is a collision to the bottom, reposition the player under the platform.&#xD;&#xA;&#xD;&#xA;I have tried ***many*** different ways of doing this, such as trying to find the penetration depth and repositioning the player backwards by the penetration depth. Sadly, nothing I've tried seems to work correctly. Player movement ends up being very glitchy and repositions the player when I don't want it to. Part of the reason is probably because I feel like this is something so simple but I'm over-thinking it.&#xD;&#xA;&#xD;&#xA;If anyone thinks they can help, please take a look at the code below and help me try to improve on this if you can. I would like to refrain from using a library to handle this (as I want to learn on my own) or the something like the SAT (Separating Axis Theorem) if at all possible. Thank you in advance for your help!&#xD;&#xA;&#xD;&#xA;    void world1Level1CollisionDetection()&#xD;&#xA;    {&#xD;&#xA;    for(int i; i &lt; blocks; i++)&#xD;&#xA;    {&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==true)&#xD;&#xA;        {&#xD;&#xA;            int up = 0;&#xD;&#xA;            int left = 0;&#xD;&#xA;            int right = 0;&#xD;&#xA;            int down = 0;&#xD;&#xA;&#xD;&#xA;            if(ball.coords[0] &lt; block[i].coords[0] &amp;&amp; block[i].coords[0] &lt; ball.coords[2] &amp;&amp; ball.coords[2] &lt; block[i].coords[2])&#xD;&#xA;            {&#xD;&#xA;                left = 1;&#xD;&#xA;            }&#xD;&#xA;            if(block[i].coords[0] &lt; ball.coords[0] &amp;&amp; ball.coords[0] &lt; block[i].coords[2] &amp;&amp; block[i].coords[2] &lt; ball.coords[2])&#xD;&#xA;            {&#xD;&#xA;                right = 1;&#xD;&#xA;            }&#xD;&#xA;            if(ball.coords[1] &lt; block[i].coords[1] &amp;&amp; block[i].coords[1] &lt; ball.coords[3] &amp;&amp; ball.coords[3] &lt; block[i].coords[3])&#xD;&#xA;            {&#xD;&#xA;                up = 1;&#xD;&#xA;            }&#xD;&#xA;            if(block[i].coords[1] &lt; ball.coords[1] &amp;&amp; ball.coords[1] &lt; block[i].coords[3] &amp;&amp; block[i].coords[3] &lt; ball.coords[3])&#xD;&#xA;            {&#xD;&#xA;                down = 1;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cout &lt;&lt; left &lt;&lt; &quot;, &quot; &lt;&lt; right &lt;&lt; &quot;, &quot; &lt;&lt; up &lt;&lt; &quot;, &quot; &lt;&lt; down &lt;&lt; &quot;, &quot; &lt;&lt; endl;&#xD;&#xA;&#xD;&#xA;            if (left == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[0] - 16.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[0] - 0.0f;&#xD;&#xA;            }&#xD;&#xA;            if (right == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[2] + 0.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[2] + 16.0f;&#xD;&#xA;            }&#xD;&#xA;            if (down == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[1] = block[i].coords[3] + 0.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[3] + 16.0f;&#xD;&#xA;            }&#xD;&#xA;            if (up == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.yspeed = 0.0f;&#xD;&#xA;                ball.gravity = 0.0f;&#xD;&#xA;                ball.coords[1] = block[i].coords[1] - 16.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[1] - 0.0f;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==false)&#xD;&#xA;        {&#xD;&#xA;            ball.gravity = -0.5f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To explain what some of this code means:&#xD;&#xA;&#xD;&#xA;The blocks variable is basically an integer that is storing the amount of blocks, or platforms. I am checking all of the blocks using a for loop, and the number that the loop is currently on is represented by integer i.&#xD;&#xA;The coordinate system might seem a little weird, so that's worth explaining.&#xD;&#xA;coords[0] represents the x position (left) of the object (where it starts on the x axis).&#xD;&#xA;coords[1] represents the y position (top) of the object (where it starts on the y axis).&#xD;&#xA;coords[2] represents the width of the object plus coords[0] (right).&#xD;&#xA;coords[3] represents the height of the object plus coords[1] (bottom).&#xD;&#xA;de2dCheckCollision performs an AABB collision detection.&#xD;&#xA;Up is negative y and down is positive y, as it is in most games.&#xD;&#xA;&#xD;&#xA;Hopefully I have provided enough information for someone to help me successfully. If there is something I left out that might be crucial, let me know and I'll provide the necessary information. Finally, for anyone who can help, providing code would be very helpful and much appreciated.&#xD;&#xA;&#xD;&#xA;Thank you again for your help!" />
  <row Id="18846" PostHistoryTypeId="1" PostId="9144" RevisionGUID="093aaa22-d511-4c29-b9c5-350fca3c9697" CreationDate="2011-03-01T01:57:06.063" UserId="5774" Text="2D Platformer Collision Handling" />
  <row Id="18847" PostHistoryTypeId="3" PostId="9144" RevisionGUID="093aaa22-d511-4c29-b9c5-350fca3c9697" CreationDate="2011-03-01T01:57:06.063" UserId="5774" Text="&lt;c++&gt;&lt;opengl&gt;&lt;2d&gt;&lt;collision-detection&gt;&lt;sdl&gt;" />
  <row Id="18848" PostHistoryTypeId="25" PostId="9115" RevisionGUID="9a7e11fe-f561-477a-8f1e-32a3c7d0c682" CreationDate="2011-03-01T02:23:00.460" Comment="http://twitter.com/#!/StackGameDev/status/42409470822846464" />
  <row Id="18849" PostHistoryTypeId="2" PostId="9145" RevisionGUID="71bb6948-6fc5-4f14-80a3-c97282e8d5ab" CreationDate="2011-03-01T03:06:17.437" UserId="5775" Text="Have you considered using a [mind mapping][1] utility to help you flesh out your conversation branches?&#xD;&#xA;&#xD;&#xA;Most conversation builders seem to be tightly coupled to a specific game development engine, and there doesn't seem to be (m)any free standing alternatives.&#xD;&#xA;&#xD;&#xA;Maybe look into a visual scripter so you can test the logic/flow of conversations based on variables and choices.&#xD;&#xA;&#xD;&#xA;  [1]: http://mac.appstorm.net/roundups/graphics-roundups/9-mind-mapping-tools-for-mac/" />
  <row Id="18850" PostHistoryTypeId="2" PostId="9146" RevisionGUID="53a1e40e-6e33-4120-90c9-db59df4b35fd" CreationDate="2011-03-01T03:15:00.413" UserId="5131" Text="Head over to [JavaGaming][1] and read around. Lots of stuff there that would interest you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.java-gaming.org" />
  <row Id="18851" PostHistoryTypeId="5" PostId="9145" RevisionGUID="c7ec8295-676c-4d0c-9fe2-06846ebcbc7f" CreationDate="2011-03-01T03:15:32.267" UserId="5775" Comment="added 119 characters in body" Text="Have you considered using a mind mapping utility to help you flesh out your conversation branches? There are plenty of free and paid ones for mac&#xD;&#xA;&#xD;&#xA;Most conversation builders seem to be tightly coupled to a specific game development engine, and there doesn't seem to be (m)any free standing alternatives.&#xD;&#xA;&#xD;&#xA;Since you're looking at using Unity, look for existing Unity conversation makers, such as [ConversationMaker][2] and [Conversation Engine][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://lemuria.org/projects/wiki/UnityConversationMaker&#xD;&#xA;  [3]: http://forum.unity3d.com/threads/56860-Conversation-Engine-WIP" />
  <row Id="18857" PostHistoryTypeId="5" PostId="9113" RevisionGUID="6335588c-0d25-4ebf-9203-6c68a0aea975" CreationDate="2011-03-01T05:13:17.067" UserId="5006" Comment="added 605 characters in body" Text="First of all, don't skimp so much on space.  Even on shared hosting you'll get several GB of space and if you're not storing large binaries or entire books or something, CPU and memory are going to be bottlenecks before disk space is (usually).&#xD;&#xA;&#xD;&#xA;I thinking keeping int columns as small as possible is pretty old advice when disk space was more expensive than it is now.  Just use regular int, and if needed bigints (or whatever your DB's equivalent is)&#xD;&#xA;&#xD;&#xA;You'll definitely want to have a separate table for inventory, because that'll give your more flexibility.  If the items have any kind of special attributes you'll probably want the items in the DB as well (not sure from your question whether you were planning that already) that way you can do queries like, get all the items in player x's inventory that can be used while in combat, or something like that.&#xD;&#xA;&#xD;&#xA;Edit:  &#xD;&#xA;As far as speed goes, with this simple structure, the database is likely not going to be the thing slowing you down.  They are generally well optimized if you know how to use them properly, and it's not until you get really complex queries that performance even begins to be an issue.  According to this [accepted answer on Stack Overflow][1], 100,000 records is still considered a small database, and large isn't until around 10,000,000 to 1,000,000,000 records, so you should be good for some time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/647210/just-what-is-a-big-database/647218#647218" />
  <row Id="18861" PostHistoryTypeId="2" PostId="9149" RevisionGUID="e66269ba-e02f-49c2-8b67-8c6332ad4b1b" CreationDate="2011-03-01T07:05:06.957" UserId="5508" Text="If I understand your code correctly, you compensate for the collision by offsetting the ball by a fixed amount without affecting its velocity. The reason your ball acts jittery is that although its position is corrected based on the collision, its velocity is still aimed at the colliding object. Because of this velocity, the ball is still moving towards the colliding block, and will collide after a few frames offsetting it again.&#xD;&#xA;&#xD;&#xA;Perhaps the most simple solution to this is making sure the velocities are reset upon collision, making sure the ball will not move towards the block after being offset." />
  <row Id="18862" PostHistoryTypeId="2" PostId="9150" RevisionGUID="c1f0e1d9-33b4-4dc6-a9b8-604157ba1a40" CreationDate="2011-03-01T07:07:39.623" UserId="5778" Text="You don't show any code that's handling movement/velocity of the ball. If you don't stop/bounce the ball, then the very next frame your ball will move back into the block, and get &quot;moved&quot; back, so it'll probably get &quot;stuck&quot; on the side of the block.&#xD;&#xA;&#xD;&#xA;If this isn't it, if you can more specific on the problems and/or post more code, someone might be able to help better :-)" />
  <row Id="18863" PostHistoryTypeId="5" PostId="9140" RevisionGUID="7c6dceed-2770-4a85-ad14-891054dbc5e7" CreationDate="2011-03-01T07:18:13.433" UserId="20" Comment="corrected some small mistakes" Text="There are two types of beginners: Tho ones who want to make a game and the ones who want to understand stuff (and make a game as well). There is nothing bad to be in the second group. I personally like it most.&#xD;&#xA;&#xD;&#xA;This site is great learning resource. For engines, just check out the engine tag:&#xD;&#xA;http://gamedev.stackexchange.com/questions/tagged/engine&#xD;&#xA;&#xD;&#xA;Search the site for &quot;how do I start&quot; or similar. You will find great resources and ideas of simple games for beginners.&#xD;&#xA;&#xD;&#xA;Graphics in Java can be done in more ways than LWJGL:&#xD;&#xA; &#xD;&#xA; - [JOGL][1] - I recommend most. JOGL is OpenGL in Java. What more to say? :)&#xD;&#xA; - [Java 3D api][2]&#xD;&#xA; - [Jmonkey engine][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://java.net/projects/jogl/&#xD;&#xA;  [2]: http://java.sun.com/developer/onlineTraining/java3d/&#xD;&#xA;  [3]: http://jmonkeyengine.com/" />
  <row Id="18864" PostHistoryTypeId="17" PostId="9152" RevisionGUID="3b99a8d1-73d7-4d7e-a7fe-9fda94ef0185" CreationDate="2011-03-01T07:21:57.627" UserId="-1" Comment="from http://physics.stackexchange.com/questions/6121/converting-2d-coordinates-from-multiple-viewpoints-into-3d-coordinates/6136#6136" Text="" />
  <row Id="18865" PostHistoryTypeId="17" PostId="9153" RevisionGUID="c1468015-232b-49cc-886a-b92ae8b30eb2" CreationDate="2011-03-01T07:21:57.627" UserId="-1" Comment="from http://physics.stackexchange.com/questions/6121/converting-2d-coordinates-from-multiple-viewpoints-into-3d-coordinates/6138#6138" Text="" />
  <row Id="18866" PostHistoryTypeId="17" PostId="9154" RevisionGUID="e1025b90-21f0-4498-bf21-e856905ef872" CreationDate="2011-03-01T07:21:57.627" UserId="-1" Comment="from http://physics.stackexchange.com/questions/6121/converting-2d-coordinates-from-multiple-viewpoints-into-3d-coordinates/6142#6142" Text="" />
  <row Id="18867" PostHistoryTypeId="2" PostId="9152" RevisionGUID="00897993-417b-4cef-a28e-d088e1f1f5b4" CreationDate="2011-02-28T22:00:30.093" UserId="2512" Text="You really only need two viewpoints to locate the point.  From each viewpoint, you have a camera location and a direction; that is, you have everything you need to uniquely define a line in 3d Cartesian space.  All this amounts to is finding the intersection of two lines." />
  <row Id="18868" PostHistoryTypeId="2" PostId="9153" RevisionGUID="5ec1fb97-2dc0-4451-8b1b-60462a18ced2" CreationDate="2011-02-28T23:30:06.290" UserDisplayName="Roy Simpson" Text="It depends just how much freedom you have with this scenario. In the worst case you will need to set up some 3x3 matrices and do some coordinate transformations between different coordinate systems.&#xD;&#xA;&#xD;&#xA;However if you have control over the layout, then the simplest situation would arise if three of those five projection angles happen to be mutually perpendicular. Then each just corresponds to different planes: x-y, y-z, x-z. So if the coordinates in the x-y plane are (a,b) and in the y-z plane are (b,c) then the coordinates should be (a,b,c). Of course this means that the coordinates in the x-z plane are (a,c), as we are assuming that they are perpendicular and there is no scale change between planes. You will also be choosing origins appropriately etc.&#xD;&#xA;&#xD;&#xA;However if you have an independent coordinate system for the 3D space (X,Y,Z) then you will need to find the transformation matrix between the various coordinate systems: M(a,b,c) = (X,Y,Z).&#xD;&#xA;&#xD;&#xA;In the general case you are looking for 3 (or 5) projection 3x3 matrices $P_1$, $P_2$, $P_3$ which will have the property that $P_{i}^2 = P_i$ and they are of rank two. The 2 eigenvectors of P will correspond to the two axes of the projection plane. If you need to know more about this then a book on 3D geometry for computer modelling will be required. Some of the maths can be quite sophisticated - a subject called &quot;Geometric Algebra&quot; has recently become quite popular in this area, to assist with visualising and efficiently calculating the various formulae involved." />
  <row Id="18869" PostHistoryTypeId="2" PostId="9154" RevisionGUID="5684ecf1-c5da-4384-9454-47b70f6c2299" CreationDate="2011-03-01T00:36:52.467" UserDisplayName="Joel Rice" Text="just looking at   vision.middlebury.edu    has a bunch of stuff.&#xD;&#xA;I used to have an old text with the stereo to 3d algorithm in BASIC !&#xD;&#xA;long gone.  There is quite a bit on the web." />
  <row Id="18870" PostHistoryTypeId="2" PostId="9151" RevisionGUID="2080329a-6dd1-4968-a8b7-e072827ed559" CreationDate="2011-02-28T18:53:31.190" UserDisplayName="Kirk Smith" Text="Here's the situation.  I've got a set of 2D coordinates that specify a point on an image.  These 2D coordinates relate to an event that happened in a 3D space (video game).&#xD;&#xA;&#xD;&#xA;I have 5 images with the same event point on it, so I have 5 sets of 2D coordinates for a single 3D coordinate.  I've tried everything I can think to translate these 2D coordinates into 3D coordinates, but the math just escapes me.  I have a good estimate of the coordinates from which each image was taken, they're not perfect but they're close.&#xD;&#xA;&#xD;&#xA;I tried simplifying this and opening up Cinema 4D, a 3D modeling application.  I placed 5 cameras at the coordinates where the pictures were taken and lined up the pictures with the event points for each one and tried to find a link, but nothing was forthcoming.  I know it's a math question, but like I said, I just can't get it.  I took physics in high school 6 years ago, but we didn't deal with a whole lot of this sort of thing.&#xD;&#xA;&#xD;&#xA;Any help will be very much appreciated, I've been thinking on it for quite a while and I just can't come up with anything." />
  <row Id="18871" PostHistoryTypeId="1" PostId="9151" RevisionGUID="2080329a-6dd1-4968-a8b7-e072827ed559" CreationDate="2011-02-28T18:53:31.190" UserDisplayName="Kirk Smith" Text="Converting 2D coordinates from multiple viewpoints into 3D coordinates" />
  <row Id="18872" PostHistoryTypeId="3" PostId="9151" RevisionGUID="2080329a-6dd1-4968-a8b7-e072827ed559" CreationDate="2011-02-28T18:53:31.190" UserDisplayName="Kirk Smith" Text="&lt;untagged&gt;" />
  <row Id="18873" PostHistoryTypeId="17" PostId="9151" RevisionGUID="72f6731d-2a83-44ab-a723-321ef4731d78" CreationDate="2011-03-01T07:21:57.627" UserId="-1" Comment="from http://physics.stackexchange.com/questions/6121/converting-2d-coordinates-from-multiple-viewpoints-into-3d-coordinates" Text="" />
  <row Id="18874" PostHistoryTypeId="2" PostId="9155" RevisionGUID="292db682-2ea8-4067-b0eb-1e69bea97ae5" CreationDate="2011-03-01T07:59:02.367" UserId="5766" Text="I have only had a quick once over look at Corona and it does seem nice. Mobile platforms are quite restrictive in and of them selves so trying to knock out a game that will work in multiple platforms can be a daunting task especially if its your first.&#xD;&#xA;&#xD;&#xA;I have been in the same place as you. I was torn between different engines but finally setled on Cocos2d. Here are my core reasons:&#xD;&#xA;&#xD;&#xA; - versatility 1: it allowed me to mix native iphone views and features this includes things like gestures&#xD;&#xA; - versatility 2: you can use natice c or c++ libraries if found any suitable onces&#xD;&#xA; - Control: i had direct access to the code base so if i wanted to change anything in the engine i could also if i fixed anything i could submit it(not that i had)&#xD;&#xA; - Support: there is a big and active community behind Cocos2D&#xD;&#xA; - Complete: i can build the game and the menu all using the Cocos2D Api&#xD;&#xA; - Extras: out of the box i got other other extras like a physic engine(not that i use it but its supposed to be pretty good)&#xD;&#xA; &#xD;&#xA;2 Reasons i would stay with it:&#xD;&#xA;&#xD;&#xA; - has 3d now :)&#xD;&#xA;&#xD;&#xA; - if a 16 year old can make a iPad game of the week then surely i can ;)&#xD;&#xA;&#xD;&#xA;As for your check list as far as cocos2d is concerned &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   * needs to work on iPhone(check)&#xD;&#xA;   * I don't have much money ($400 for Unity for iPhone is probably too much. I can probably afford $99 for Corona.)(free)&#xD;&#xA;   * Graphics will be 2D(check)&#xD;&#xA;   * Physics support is not needed(well it has it if you change your mind)&#xD;&#xA;   * Ability to use particles would be nice(half check decent effects engine)&#xD;&#xA;   * Game Center support would be nice (Corona is planning to support it soon)(either way pretty easy to implement in its own right)&#xD;&#xA;   * It would be nice to be able to support Android as well if it isn't much effort. (there is a cocos2D for android but it is nothin like the iPhone one which is a good thing cause it means its tailored to the platform)&#xD;&#xA;hope that helped :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="18875" PostHistoryTypeId="2" PostId="9156" RevisionGUID="b020f6d2-bb8e-4cd9-81f6-377d9508b811" CreationDate="2011-03-01T08:03:06.483" UserId="1629" Text="It seems even nvPerfHUD is lo longer supporting DirectX 9 on Win7, but it is still supported on Vista. This is kind of surprise to me, I though the drivers for Vista / Win7 are almost identical, it would be interesting to know the reason.&#xD;&#xA;&#xD;&#xA;http://developer.nvidia.com/object/nvperfhud_home.html#features&#xD;&#xA;&#xD;&#xA;&gt;- Supports DirectX10 on Windows Vista or Windows 7&#xD;&#xA;&gt;&#xD;&#xA;&gt;- Supports DirectX 9 on Windows XP and Windows Vista&#xD;&#xA;&#xD;&#xA;The new nVidia debugging product [nSight][1] does not support DirectX 9 at all.&#xD;&#xA;&#xD;&#xA;This means the options seem to be quite limited:&#xD;&#xA;&#xD;&#xA;- use Vista (or WinXP, with nvPerfHUD upto 6.62) machine with recent nVidia card and nvPerfHUD&#xD;&#xA;- use Vista (or WinXP) machine with old ATI card and GPUPerfStudio 1.2&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nvidia.com/object/parallel-nsight.html&#xD;&#xA;" />
  <row Id="18876" PostHistoryTypeId="5" PostId="9156" RevisionGUID="d31125b8-d652-48dc-97fc-2f18a08e4500" CreationDate="2011-03-01T08:18:27.360" UserId="1629" Comment="Improved grammar" Text="Based on the [feature list][1] it seems even nvPerfHUD no longer supports DirectX 9 on Win7, but it is still supported on Vista. This is kind of surprise to me, I though the drivers for Vista / Win7 are almost identical, it would be interesting to know the reason. There is however [one post on nVidia forum][2] which mentions &quot;Windows 7 x64, NVIDIA GeForce 8600 GTS 512MB, Drivers 266.58 &amp; NVPerfHUD 6.7&quot; as a working configuration, therefore this might be just a feature list oversight:&#xD;&#xA;&#xD;&#xA;&gt;- Supports DirectX10 on Windows Vista or Windows 7&#xD;&#xA;&gt;&#xD;&#xA;&gt;- Supports DirectX 9 on Windows XP and Windows Vista&#xD;&#xA;&#xD;&#xA;The new nVidia debugging product [nSight][3] does not support DirectX 9 at all.&#xD;&#xA;&#xD;&#xA;Unless the nvPerfHUD still works with Win7 and DX 9 (can anyone confirm?), it means the options for DirectX 9 profiling seem to be quite limited:&#xD;&#xA;&#xD;&#xA;- use Vista (or WinXP, with nvPerfHUD upto 6.62) machine with recent nVidia card and nvPerfHUD&#xD;&#xA;- use Vista (or WinXP) machine with old ATI card and GPUPerfStudio 1.2&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/nvperfhud_home.html#features&#xD;&#xA;  [2]: http://developer.nvidia.com/forums/index.php?showtopic=5736&#xD;&#xA;  [3]: http://www.nvidia.com/object/parallel-nsight.html" />
  <row Id="18877" PostHistoryTypeId="2" PostId="9157" RevisionGUID="5f8f69cc-39d5-4428-9bdf-80bf4d2018a2" CreationDate="2011-03-01T08:18:48.840" UserId="4947" Text="If you have projection matrices of each image, you can use triangulation (for example [here][1]). It works for two cameras and generates one 3D point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cmp.felk.cvut.cz/cmp/courses/TDV/2010W/lectures/p06.pdf " />
  <row Id="18878" PostHistoryTypeId="25" PostId="9151" RevisionGUID="25639d92-120d-4bcf-80af-b7e8f3a4a3b9" CreationDate="2011-03-01T08:23:02.160" Comment="http://twitter.com/#!/StackGameDev/status/42500071371182080" />
  <row Id="18879" PostHistoryTypeId="2" PostId="9158" RevisionGUID="4045c20e-a22a-45de-b87c-fb58b6df033a" CreationDate="2011-03-01T08:37:57.217" UserId="3793" Text="This is a question I've never been able to find the answer to. Batching objects with similar states is a major performance gain when rendering many objects. However, I've been learned various rules when drawing objects in the game world.&#xD;&#xA;&#xD;&#xA;&lt;ol&gt;&#xD;&#xA;&lt;li&gt;Draw all opaque objects, front-to-back.&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Draw all alpha-blended objects, back-to-front.&lt;/li&gt;&#xD;&#xA;&lt;/ol&gt;&#xD;&#xA;&#xD;&#xA;Some of the major parameters to batch by, as I understand it, are textures, vertex buffers, and index buffers. It seems that, as long as you are adhering to the above two rules, there's little to be done in regards to batching.&#xD;&#xA;&#xD;&#xA;I see one possibility to batch, while still adhering to the above two rules. Opaque objects can still be drawn out of depth-order, because drawing them front-to-back is merely a fillrate optimization, meanwhile state changes may very well be far more expensive than the overdraw of drawing out of depth-order. However, non-opaque objects, those that require alpha-blending at least, *must* be drawn back-to-front in order to avoid rendering artifacts.&#xD;&#xA;&#xD;&#xA;Is the loss of the fillrate optimization for opaques worth the state batching optimization?" />
  <row Id="18880" PostHistoryTypeId="1" PostId="9158" RevisionGUID="4045c20e-a22a-45de-b87c-fb58b6df033a" CreationDate="2011-03-01T08:37:57.217" UserId="3793" Text="How can state changes be batched while adhering to opaque-front-to-back/alpha-blended-back-to-front?" />
  <row Id="18881" PostHistoryTypeId="3" PostId="9158" RevisionGUID="4045c20e-a22a-45de-b87c-fb58b6df033a" CreationDate="2011-03-01T08:37:57.217" UserId="3793" Text="&lt;rendering&gt;&lt;state&gt;" />
  <row Id="18882" PostHistoryTypeId="2" PostId="9159" RevisionGUID="f3a9d2c3-7377-4274-9e58-19d6e75a0b1e" CreationDate="2011-03-01T09:28:55.343" UserId="5119" Text="I haven't used Corona.It needs a license if you need to publish.Cocos2d on the other hand is really flexible and stable 'graphics' engine right now.&#xD;&#xA;&#xD;&#xA;I would suggest Cocos2d-x (C++ version) as objective-c version has some performance issues when your update cycle is Overloaded.This performance issues is ONLY because of the message passing System in Objective-C.&#xD;&#xA;&#xD;&#xA;As others said,You need to depend on the support of 'third party Engine' if any thing NEW comes up!But cocos2d is flexible at that moment!&#xD;&#xA;&#xD;&#xA; If you are targeting multiple platforms,Cocos2d-X is ready for that as well!&#xD;&#xA;Check this link - http://www.cocos2d-x.org/wiki/cocos2d-x/Chapter_1_-_Create_a_New_cocos2d-x_project_with_multi-platforms" />
  <row Id="18883" PostHistoryTypeId="2" PostId="9160" RevisionGUID="6b13ee7f-34fe-4dab-b6f6-1d00e98485a1" CreationDate="2011-03-01T10:39:18.820" UserId="4129" Text="http://developer.nvidia.com/docs/IO/8230/BatchBatchBatch.ppt is a great presentation by NVIDIA on batching costs.&#xD;&#xA;&#xD;&#xA;On the first slides it says that the wisdom that state changes are expensive is wrong.  Its about how many batches you have.&#xD;&#xA;&#xD;&#xA;Its not the state that goes with each batch, its the batch itself that costs.  So how might you put lots of objects into a single batch?  (slide 30 onwards...)" />
  <row Id="18884" PostHistoryTypeId="2" PostId="9161" RevisionGUID="467ba4d4-e192-473a-aaba-09bce3809866" CreationDate="2011-03-01T10:56:27.067" UserId="5781" Text="I'm somewhat surprised that nobody's mentioned this option, but if your game has a multiplayer component, you may have already done a lot of the hard work necessary for this feature.  After all, what's multiplayer but an attempt to re-play the movements of someone else at a (slightly) different time on your own computer?&#xD;&#xA;&#xD;&#xA;This also gets you the benefits of a smaller file size as a side effect, again assuming you've been working on bandwidth-friendly network code.&#xD;&#xA;&#xD;&#xA;In many ways, it combines both the &quot;be extremely deterministic&quot; and &quot;keep a record of everything&quot; options.  You'll still need determinism - if your re-play is essentially bots playing the game again in exactly the way you originally played it, whatever actions they take that can have random outcomes need to have the same outcome.&#xD;&#xA;&#xD;&#xA;The data format could be as simple as a dump of the network traffic, though I imagine it wouldn't hurt to clean it up a bit (you don't have to worry about lag on a re-play, after all).  You could re-play only a portion of the game by using the checkpoint mechanism other people have mentioned - typically a multiplayer game will send out a full state of the game update every so often anyway, so again you may have already done this work." />
  <row Id="18885" PostHistoryTypeId="2" PostId="9162" RevisionGUID="628e6775-0587-4c65-a871-a569f358813b" CreationDate="2011-03-01T11:04:00.087" UserId="3212" Text="What is the significance of Bresenhams Line of Sight algorithm in chasing and evading in games?&#xD;&#xA;&#xD;&#xA;As far as i know and implemented this algorithm calulates the straight line between two given points. However while implementing it in game development i stored the points calculated using this algorithm in an array.Then im traversing this array for chasing and evading purpose. This looks to be working good with some angles only.In an pixel based environment/tile based. &#xD;&#xA;&#xD;&#xA;What if there are some obstacles added in the paths of the two points? then this algorithm will not work right? &#xD;&#xA;&#xD;&#xA;How well can we use the Bresenhams Line algorithm in game development?" />
  <row Id="18886" PostHistoryTypeId="1" PostId="9162" RevisionGUID="628e6775-0587-4c65-a871-a569f358813b" CreationDate="2011-03-01T11:04:00.087" UserId="3212" Text="Significance of Bresenhams Line of Sight algorithm" />
  <row Id="18887" PostHistoryTypeId="3" PostId="9162" RevisionGUID="628e6775-0587-4c65-a871-a569f358813b" CreationDate="2011-03-01T11:04:00.087" UserId="3212" Text="&lt;algorithm&gt;" />
  <row Id="18888" PostHistoryTypeId="25" PostId="9162" RevisionGUID="a3e0a0e8-8723-4806-b266-9fd3a5becdb3" CreationDate="2011-03-01T11:23:04.127" Comment="http://twitter.com/#!/StackGameDev/status/42545375004983296" />
  <row Id="18889" PostHistoryTypeId="2" PostId="9163" RevisionGUID="2f7bea40-aa01-48a4-8f1a-c58fbf36afa1" CreationDate="2011-03-01T11:23:40.687" UserId="3794" Text="Bresenhams line algorithm was very useful in history (history of computer graphics), where was need of drawing lines without using floating point operations, because integer operations are faster (was faster). This is not today problem. In cpu is integrated math co-procesor (till intel 486), there is SSE unit and also GPU computes floatng points. There are not many useful usages of Bresenham today. But still. It is very interesting historicaly and it is beatiful algorithm to study.&#xD;&#xA;&#xD;&#xA; - For 2D/3D movement is best to use vectors. Check this QA to find more info:  &#xD;&#xA;http://gamedev.stackexchange.com/questions/7540/enemy-movement-in-straight-line-to-player-in-chase-game/7541#7541&#xD;&#xA; - For avoiding obstacles in path, start you study here:  &#xD;&#xA;  http://gamedev.stackexchange.com/questions/8942/moving-around-avoiding-obstacles" />
  <row Id="18890" PostHistoryTypeId="2" PostId="9164" RevisionGUID="a2908f33-8635-47a2-900b-f11a871f7c9f" CreationDate="2011-03-01T11:41:09.650" UserId="4200" Text="I'm looking at the moment to start next year and the two best choices I've seen are Abertay in Scotland and Derby in the midlands. I haven't been to see Abertay yet but as far as I've heard it has been given a LOT of money by the government to help supply the course with development kits and engines and the like, but it does not do a placement year, which I see as being worth much more than just having slightly better computers as then you get to work with other people and see how the professionals do it.&#xD;&#xA;&#xD;&#xA;Derby, however, though it has less money it still has decent facilities (about 20 PSP development kits, large dual screen monitors on each computer, up to date specs and the like) and it also aims to get all of it's students into a relevant placement after their second year for a year.&#xD;&#xA;&#xD;&#xA;Hope that helps you make a decision :)" />
  <row Id="18891" PostHistoryTypeId="2" PostId="9165" RevisionGUID="7ade7994-989d-4bff-9ade-6c88eeb55252" CreationDate="2011-03-01T12:08:46.717" UserId="1502" Text="You might want to read Christer Ericson's excellent blog post on draw call bucketing: http://realtimecollisiondetection.net/blog/?p=86&#xD;&#xA;&#xD;&#xA;Alpha blended objects will have to be draw back to front to avoid artifacts.&#xD;&#xA;&#xD;&#xA;State batching will not help with reducing the amount of alpha blended objects being rendered. &#xD;&#xA;&#xD;&#xA;If you're looking for a way to discard objects that do not visually contribute to the scene, then what you're looking for is culling.&#xD;&#xA;&#xD;&#xA;What state batching will help with is to *ensure* that your alpha blended objects are *actually* drawn last and in reverse depth-order. &#xD;&#xA;&#xD;&#xA;It will also ensure that within both your alpha and non-alpha buckets all objects are sorted so as to keep expensive state changes to a minimum (primitive, shader, texture, shader constant, etc.).&#xD;&#xA;&#xD;&#xA;As for rendering opaque objects front-to-back (with depth testing enabled): &#xD;&#xA;If your pixels are expensive to compute (read: complex pixel shaders), then not having to compute the same pixel multiple times can be an enourmous gain - which gives rise to the idea of an early depth-only rendering pass (Z-Pre-Pass).&#xD;&#xA;" />
  <row Id="18892" PostHistoryTypeId="2" PostId="9166" RevisionGUID="5a99d2c2-8bba-4edc-ae8d-0f55ae891661" CreationDate="2011-03-01T13:06:13.673" UserId="2792" Text="If you can render your opaque pass front to back then you are probably fine, but for a lot of scenes this might not be worth the processing time. What people usually to is render a Z-only pass to fill the Z-buffer, and then render opaque with optimized state changes to only render visible pixels. Transparent can then be rendered back to front.&#xD;&#xA;&#xD;&#xA;It's all up to the scene and render layout. Check performance counters before trying to optimize." />
  <row Id="18893" PostHistoryTypeId="2" PostId="9167" RevisionGUID="d6a4191c-0734-4d22-ba08-398138f5def0" CreationDate="2011-03-01T13:11:19.933" UserId="5766" Text="i have been there. we knocked out a simple flash platform ages ago as2 back in the day. i would recommend the same engine but they never updated to as3 :( but it did save a lot of time.&#xD;&#xA;&#xD;&#xA;so in short find a few game engines i listed to below take a quick look at the tutorials of each and then glance their api's. once you have found one you like batter down the hatch get the coffee brewing and go for it.&#xD;&#xA;&#xD;&#xA;http://pushbuttonengine.com/&#xD;&#xA;&#xD;&#xA;flixel(dot)org   (i am only allowed to post two links cause i am noob)&lt;tear&gt;&#xD;&#xA;&#xD;&#xA;both those engines are free.&#xD;&#xA;&#xD;&#xA;next comes creative. I would hope they at least sources you the assets are got you a designer if. Maybe you can do it your self. if not you can get assts from the link bellow double check the licence for each though its always tricky when making a commercially funded game  :)  prroz the internet you can get some cheap game assts too that are quite nice and with a few little amends they can become quite uniques if you dont mind a little pixel pushing :)&#xD;&#xA;&#xD;&#xA;http://funplosion.com/free-assets.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;as for for the development environment using the flash IDE will make bundling up the assets easier but it is not essential. the engine would normally handel most of the animations and you can bundel the assets using the free flex compiler it would just take a little more time.&#xD;&#xA;&#xD;&#xA;personally if i had any money at all after buying assets i would spend it on flash then if there was any money left after that FLash Builder and if by some miracle i had any money left i would get the FLash Builder plugin Source Mate. If you are unsure about any of these applications you could try them you can normally get 30day free trials to give them a whirl before you buy&#xD;&#xA;&#xD;&#xA;well good luck :) " />
  <row Id="18894" PostHistoryTypeId="2" PostId="9168" RevisionGUID="70857a5a-83a1-48d4-9052-704f214f7e68" CreationDate="2011-03-01T14:09:41.497" UserId="5768" Text="Try the wiki:&#xD;&#xA;&#xD;&#xA;http://jmonkeyengine.org/wiki/doku.php" />
  <row Id="18895" PostHistoryTypeId="2" PostId="9169" RevisionGUID="a56c3f91-4c6f-4eef-8870-1a4a6d0db746" CreationDate="2011-03-01T14:10:49.357" UserId="2361" Text="If I were looking at UK universities for game programming courses, I'd probably look at Essex.  After all, they have [Richard Bartle][1] there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Richard_Bartle" />
  <row Id="18896" PostHistoryTypeId="2" PostId="9170" RevisionGUID="b2367d0a-1c84-4cf5-82f8-9ed7300f5ac8" CreationDate="2011-03-01T14:15:06.033" UserId="5006" Text="Interested in both successes and failures (and semi-successes).&#xD;&#xA;&#xD;&#xA;Maybe this might be better at OnStartups but I think the game market is quite a bit different than the business market that's prevalent there (i.e. selling something that's fun instead of selling something that's useful)" />
  <row Id="18897" PostHistoryTypeId="1" PostId="9170" RevisionGUID="b2367d0a-1c84-4cf5-82f8-9ed7300f5ac8" CreationDate="2011-03-01T14:15:06.033" UserId="5006" Text="Are there any good blogs or articles on the business of indie games?" />
  <row Id="18898" PostHistoryTypeId="3" PostId="9170" RevisionGUID="b2367d0a-1c84-4cf5-82f8-9ed7300f5ac8" CreationDate="2011-03-01T14:15:06.033" UserId="5006" Text="&lt;business&gt;" />
  <row Id="18899" PostHistoryTypeId="25" PostId="9170" RevisionGUID="21c58002-36d7-4761-a942-b4546cc34248" CreationDate="2011-03-01T14:23:04.480" Comment="http://twitter.com/#!/StackGameDev/status/42590681444777984" />
  <row Id="18900" PostHistoryTypeId="2" PostId="9171" RevisionGUID="869b9907-0d18-46a5-adb5-9280c82ee69c" CreationDate="2011-03-01T14:32:33.817" UserId="5784" Text="If you're really focused on game development then a course specific to that may be right up you street. There are a lot of skills you'll learn that are specific to games development that you'll be unlikely to learn anywhere else: directx, opengl, etc. You'll also gain an understanding that there can be a lot of people involved: story writers; level designers, programmers, testers, etc. and possibly be given the chance to focus on a specific area that interests you.&#xD;&#xA;&#xD;&#xA;However it may be worth considering a more general computer science route. Although you'll miss out on the specific skills of game development, you'll arguably get a better grounding in core development and gain more general skills that you can apply to a wider range of problems. &#xD;&#xA;&#xD;&#xA;Only you can decide what you want to study. Studying either course will not limit you to working in or out of a specific industry, but it may make it more difficult to change course.&#xD;&#xA;&#xD;&#xA;With that piece of advice out of the way, onto answering your specific question:&#xD;&#xA;&#xD;&#xA;There is a broad opinion that the University of Abertay is one of the foremost institutions for studying game development in the UK. Abertay had the foresight to build and develop a top level course specializing in game development before others and it's continued to build on it.&#xD;&#xA;&#xD;&#xA;Dundee (where the university is based) has a thriving game development industry that has sprung up partly because of the courses. Games like GTA4 (amongst many others) were developed in the area. That should give you an indication of the community that's built up." />
  <row Id="18901" PostHistoryTypeId="16" PostId="9170" RevisionGUID="ee2a10f0-e0d5-43c6-b690-5b9f563dc128" CreationDate="2011-03-01T14:44:48.903" UserId="189" />
  <row Id="18902" PostHistoryTypeId="2" PostId="9172" RevisionGUID="92fd7717-c062-4d14-97d2-a098564cb33c" CreationDate="2011-03-01T14:52:54.563" UserId="2437" Text="I'm writing a roguelike where objects and floor can be made of different materials. For instance, let's say we can have a wooden chair, an iron chair, a golden chair, and so on. &#xD;&#xA;&#xD;&#xA;I've got an Object class (I know, the name is terrible), which is more or less using a composite pattern, and a Material class. Material have different important properties (noise, color...). For the time being, there are 5 different instances of materials, created at the initialization of the game.&#xD;&#xA;&#xD;&#xA;How would connect an instance of Object with one of the 5 instances of materials ? I see three simple solutions :&#xD;&#xA;&#xD;&#xA;- Using a pointer. Simple and brutal.&#xD;&#xA;- Using an integer material-id, then get the materials out of a table when engine manipulates the object for various purposes (display, attack analysis, etc.). Not very beautiful, I think, and not very flexible.&#xD;&#xA;- Using an integer material-id, then get the materials out of a std::map. A bit more flexible, but still not perfect.&#xD;&#xA;&#xD;&#xA;Do you see other possibilities ? If not, what would you choose (and why) ? Thanks in advance !" />
  <row Id="18903" PostHistoryTypeId="1" PostId="9172" RevisionGUID="92fd7717-c062-4d14-97d2-a098564cb33c" CreationDate="2011-03-01T14:52:54.563" UserId="2437" Text="Associate a texture to an object (from a data-model, not graphical point of view)." />
  <row Id="18904" PostHistoryTypeId="3" PostId="9172" RevisionGUID="92fd7717-c062-4d14-97d2-a098564cb33c" CreationDate="2011-03-01T14:52:54.563" UserId="2437" Text="&lt;c++&gt;&lt;data-structure&gt;" />
  <row Id="18905" PostHistoryTypeId="2" PostId="9173" RevisionGUID="4b019ded-1bc6-4450-841e-ccd7391f1799" CreationDate="2011-03-01T14:55:03.637" UserId="20" Text="I really like [Struct.ca][1] (Matt Rix). He was really successful with his [Trainyard][2] game and shared lots of interesting sales and marketing related facts on his blog.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://struct.ca/&#xD;&#xA;  [2]: http://www.trainyard.ca/" />
  <row Id="18906" PostHistoryTypeId="2" PostId="9174" RevisionGUID="a681577e-3a08-445e-bb61-1c7b7b28ecda" CreationDate="2011-03-01T15:03:08.547" UserId="189" Text="It seems you want new types of Materials to be able to be created at runtime. Then I don't see the problem with having a pointer to the Material of the object; it's how I would do it. Perhaps elsewhere in the program (e.g. in the factory class which creates these Object instances) you would have an array of all the Materials, to keep track of them and allow for choosing between them. Also you would need to either never delete a Material once it's created, or keep track of the references to a material so that if you want to delete the material then you reassign new materials onto all the objects which were previously using that material.&#xD;&#xA;&#xD;&#xA;The problem with the integer ID which is a position of an array, for example, is if that array is manipulated, for example if a material is deleted, then you need to either put a 'null' in that position and never use it again, or you need to loop among the objects and change their material ID when you change the array. So for example if you have three materials, and an object points to material 1, then if you delete material 1 you need to either put a null in that place, or change the object id to e.g. -1 before you allocate a new material in position 1 (or else the object is magically given a new material!).&#xD;&#xA;&#xD;&#xA;Also an std::map seems like unnecessary overhead in this case. It seems to me that you don't really need the map when you could use a pointer and reference counting as mentioned above. You could certainly use it though, keeping in mind similar downfalls such as mentioned in the previous paragraph; e.g. you still need to make sure the IDs are unique among all materials deleted or not, or else you could get objects whose materials get reassigned just because the material gets deleted and a new one gets put in with the same ID as the old one.&#xD;&#xA;&#xD;&#xA;If however Materials can't change at runtime, you could of course make an enum with the material type, and the object would have an element of that enum (or a pointer to that element; my c++ is rusty)." />
  <row Id="18907" PostHistoryTypeId="5" PostId="9127" RevisionGUID="32cde65d-8710-45f7-b39d-477d0366e8ed" CreationDate="2011-03-01T15:22:58.280" UserId="5767" Comment="added 177 characters in body" Text="I'm starting my undergraduate studies soon, but as I'm not from UK, I completly don't have idea what university should I choose.&#xD;&#xA;&#xD;&#xA;Do you know any good game programming universities?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;	&#xD;&#xA;Is it good idea to make computer science as undergraduate studies and game-programming as postgraduate one? I'm thankfull for all your replies, as they help me alot." />
  <row Id="18909" PostHistoryTypeId="2" PostId="9176" RevisionGUID="3abb27e3-f79c-44c0-b17b-ebbf4eac2a3a" CreationDate="2011-03-01T16:23:18.573" UserId="2787" Text="[Cliffski's Blog][1] is really great, he goes into all aspects of indie developement. Check it out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://positech.co.uk/cliffsblog/" />
  <row Id="18912" PostHistoryTypeId="25" PostId="9172" RevisionGUID="15430e40-0da2-459d-8497-6043ea8d9535" CreationDate="2011-03-01T17:23:06.120" Comment="http://twitter.com/#!/StackGameDev/status/42635980846542848" />
  <row Id="18913" PostHistoryTypeId="2" PostId="9178" RevisionGUID="0abc4d4d-abd5-478e-bd35-55b9cfa78a4e" CreationDate="2011-03-01T17:50:12.960" UserDisplayName="user5786" Text="From my point of view, array indices and pointers are two flavors of the same thing -- and both are simple and direct, which is good for a game.&#xD;&#xA;&#xD;&#xA;You could introduce an abstraction layer, and make this more complicated, but you have not identified any requirements to help design such a layer.&#xD;&#xA;&#xD;&#xA;In fact, as near as I can tell, you only have 5 materials, and they will not change.&#xD;&#xA;&#xD;&#xA;Anyways, I see nothing wrong with using a pointer, and I see nothing wrong with using an array index.  If you do see something wrong with either of those, I think that that means you have requirements which you have not expressed here." />
  <row Id="18914" PostHistoryTypeId="2" PostId="9179" RevisionGUID="5be287a2-6f1f-4646-98ea-303e91812b73" CreationDate="2011-03-01T17:53:15.907" UserId="1562" Text="http://gamesfromwithin.com/&#xD;&#xA;Noel Llopis' blog on iPhone and indie gamedev is top notch in every aspect.&#xD;&#xA;&#xD;&#xA;http://gbgames.com/blog/&#xD;&#xA;Reflects a lot on the technical and financial issues associated with someone's first indie title.&#xD;&#xA;&#xD;&#xA;I can highly recommend the both of them." />
  <row Id="18915" PostHistoryTypeId="2" PostId="9180" RevisionGUID="e067a3d4-2d85-421e-9e07-912ab5025494" CreationDate="2011-03-01T18:05:19.760" UserId="4200" Text="Hullo,&#xD;&#xA;&#xD;&#xA;What's the best way to have large animations in XNA 4.0? I have created a spritesheet with the sprite being 250x400 (more of an image than a sprite but hey ho) and there are approximately 45 frames in the animation. This causes problems for XNA as it says that the maximum filesize for Reach is 2048.&#xD;&#xA;&#xD;&#xA;I'd rather not change to hidef as I heard that means that your game is less compatible with some computers and systems so does anyone have any idea what the best thing I could do is? The only thing I could come up with is to have a list of textures to flick through but that's not ideal.&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Harold" />
  <row Id="18916" PostHistoryTypeId="1" PostId="9180" RevisionGUID="e067a3d4-2d85-421e-9e07-912ab5025494" CreationDate="2011-03-01T18:05:19.760" UserId="4200" Text="Best way to do large XNA animations?" />
  <row Id="18917" PostHistoryTypeId="3" PostId="9180" RevisionGUID="e067a3d4-2d85-421e-9e07-912ab5025494" CreationDate="2011-03-01T18:05:19.760" UserId="4200" Text="&lt;xna&gt;&lt;animation&gt;&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="18918" PostHistoryTypeId="5" PostId="9174" RevisionGUID="fad2b7a9-e1fb-4beb-9dc6-f50a5ddd8112" CreationDate="2011-03-01T18:06:53.020" UserId="189" Comment="added 141 characters in body" Text="It seems you want new types of Materials to be able to be created at runtime. Then I don't see the problem with having a pointer to the Material of the object; it's how I would do it. Perhaps elsewhere in the program (e.g. in the factory class which creates these Object instances) you would have an array of all the Materials, to keep track of them and allow for choosing between them. Also you would need to either never delete a Material once it's created, or keep track of the references to a material so that if you want to delete the material then you reassign new materials onto all the objects which were previously using that material. You certainly don't want to `delete` a Material in memory, only to have Objects still pointing to that memory location which is now invalid!&#xD;&#xA;&#xD;&#xA;The problem with the integer ID which is a position of an array, for example, is if that array is manipulated, for example if a material is deleted, then you need to either put a 'null' in that position and never use it again, or you need to loop among the objects and change their material ID when you change the array. So for example if you have three materials, and an object points to material 1, then if you delete material 1 you need to either put a null in that place, or change the object id to e.g. -1 before you allocate a new material in position 1 (or else the object is magically given a new material!).&#xD;&#xA;&#xD;&#xA;Also an std::map seems like unnecessary overhead in this case. It seems to me that you don't really need the map when you could use a pointer and reference counting as mentioned above. You could certainly use it though, keeping in mind similar downfalls such as mentioned in the previous paragraph; e.g. you still need to make sure the IDs are unique among all materials deleted or not, or else you could get objects whose materials get reassigned just because the material gets deleted and a new one gets put in with the same ID as the old one.&#xD;&#xA;&#xD;&#xA;If however Materials can't change at runtime, you could of course make an enum with the material type, and the object would have an element of that enum (or a pointer to that element; my c++ is rusty)." />
  <row Id="18919" PostHistoryTypeId="2" PostId="9181" RevisionGUID="8ac9bfa1-dcf2-4ea5-b94a-90a0b8c68b76" CreationDate="2011-03-01T18:48:42.573" UserId="2301" Text="Basically if you are targeting towards Direct9 then you can't use HiDef.  You could always create a smaller animation and just set the scale to a higher amount(allowing it to zoom in on the image), if its a vectors image it won't skew the image. " />
  <row Id="18920" PostHistoryTypeId="2" PostId="9182" RevisionGUID="9351b2b6-ec08-4742-835b-8f05fd76ae6f" CreationDate="2011-03-01T18:50:08.650" UserId="1477" Text="I am familiar with Unity and in the process of learning android SDK when the announcement about unity android basic came out.&#xD;&#xA;&#xD;&#xA;What would be the advantages and disadvantages of using the android SDK directly versus development using Unity Android?" />
  <row Id="18921" PostHistoryTypeId="1" PostId="9182" RevisionGUID="9351b2b6-ec08-4742-835b-8f05fd76ae6f" CreationDate="2011-03-01T18:50:08.650" UserId="1477" Text="Unity Android versus android SDK" />
  <row Id="18922" PostHistoryTypeId="3" PostId="9182" RevisionGUID="9351b2b6-ec08-4742-835b-8f05fd76ae6f" CreationDate="2011-03-01T18:50:08.650" UserId="1477" Text="&lt;android&gt;&lt;unity&gt;&lt;platform&gt;" />
  <row Id="18923" PostHistoryTypeId="2" PostId="9183" RevisionGUID="3546e975-104d-404d-b50d-1aadf1bbda24" CreationDate="2011-03-01T18:58:10.367" UserId="189" Text="Well they are completely different! The Android SDK lets you write Android apps from scratch in Java. Unity is a game creation package in which you drag-and-drop, add scripts, etc. and then hit a button to export a complete Android application.&#xD;&#xA;&#xD;&#xA;**Android SDK:**&#xD;&#xA;&#xD;&#xA; - Write the app from scratch&#xD;&#xA; - Complete control over exactly what your game does and looks like; you can do anything&#xD;&#xA; - Much more work and knowledge involved&#xD;&#xA; - Write everything in Java&#xD;&#xA;&#xD;&#xA;**Unity:**&#xD;&#xA;&#xD;&#xA; - Make a game project, import assets, arrange your scenes, etc. within the Unity interface&#xD;&#xA; - Script actions for the objects in JavaScript, C# or Boo&#xD;&#xA; - Test the game on PC and deploy to multiple platforms including Android&#xD;&#xA; - No Java needed (no Android SDK needed)&#xD;&#xA; - No control over the final app; it runs with the Unity engine and you can't for example add an extra Android `Activity` (like a 'screen') to your app, or edit it in any way except in the Unity interface&#xD;&#xA;&#xD;&#xA;Note that I don't have experience with the Android function of Unity (I do have general Unity experience though) so please correct me (or just edit this post) if the Unity category is wrong in any way." />
  <row Id="18924" PostHistoryTypeId="2" PostId="9184" RevisionGUID="55b17b62-76bf-4733-a39f-6b0e4c6e2c9c" CreationDate="2011-03-01T20:18:33.940" UserId="2063" Text="Sorry, but Ricket is wrong: Unity provides full access via API to the Android SDK, which is also required before working on Android Games with Unity:&#xD;&#xA;&#xD;&#xA;&gt; Before you can run Unity Android games&#xD;&#xA;&gt; on the actual device, you'll need to&#xD;&#xA;&gt; have your Android developer&#xD;&#xA;&gt; environment set up. This involves&#xD;&#xA;&gt; downloading and installing the Android&#xD;&#xA;&gt; SDK with the different Android&#xD;&#xA;&gt; plaforms and adding your physical&#xD;&#xA;&gt; device to your system (this is done a&#xD;&#xA;&gt; bit differently depending on whether&#xD;&#xA;&gt; you are developing on Windows or Mac).&#xD;&#xA;&gt; This setup process is explained on the&#xD;&#xA;&gt; Android developer website, and there&#xD;&#xA;&gt; may be additional information provided&#xD;&#xA;&gt; by the manufacturer of your device.&#xD;&#xA;&gt; Since this is a complex process, we've&#xD;&#xA;&gt; provided a basic outline of the tasks&#xD;&#xA;&gt; that must be completed before you can&#xD;&#xA;&gt; run code on your Android device or in&#xD;&#xA;&gt; the Android emulator. However, the&#xD;&#xA;&gt; best thing to do is follow the&#xD;&#xA;&gt; instructions step-by-step from the&#xD;&#xA;&gt; Android developer portal. Access&#xD;&#xA;&gt; Android Functionality&#xD;&#xA;&gt; &#xD;&#xA;&gt; Unity Android provides a scripting&#xD;&#xA;&gt; APIs to access various input data and&#xD;&#xA;&gt; settings. You can find out more about&#xD;&#xA;&gt; the new scripting classes on the&#xD;&#xA;&gt; Android scripting page. Exposing&#xD;&#xA;&gt; Native C, C++ or Java Code to Scripts&#xD;&#xA;&gt; &#xD;&#xA;&gt; Unity Android allows you to call&#xD;&#xA;&gt; custom functions written in C/C++&#xD;&#xA;&gt; directly (and Java indirectly) from C#&#xD;&#xA;&gt; scripts. To find out how to bind&#xD;&#xA;&gt; native functions, visit the plugins&#xD;&#xA;&gt; page.&#xD;&#xA;&#xD;&#xA;[source unity manual][1]&#xD;&#xA;&#xD;&#xA;**Unity:**&#xD;&#xA;&#xD;&#xA; - if you already have assets and more complex models&#xD;&#xA; - take advantage of many file formats&#xD;&#xA; - fast progress if you already have a design and know how the game should look like&#xD;&#xA;&#xD;&#xA;**Android SDK:**&#xD;&#xA;&#xD;&#xA; - might consider this for programming starter 2D games&#xD;&#xA; - good start up to learn android basics which experience can be taken into further developement with Unity&#xD;&#xA;&#xD;&#xA;If you want to start developing a game on a certain level of quality, and want quick success you should choose Unity over the pure SDK, because Unity gives you a lot of tools which make it easier to develop without worrying for little things.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/Manual/android-GettingStarted.html" />
  <row Id="18925" PostHistoryTypeId="25" PostId="9182" RevisionGUID="9123847c-ad1e-464e-a8bb-a78b3814dad1" CreationDate="2011-03-01T20:23:06.807" Comment="http://twitter.com/#!/StackGameDev/status/42681286371975168" />
  <row Id="18926" PostHistoryTypeId="2" PostId="9185" RevisionGUID="6bc89c3d-31e8-48ea-a288-e2f7898877db" CreationDate="2011-03-01T21:01:23.710" UserId="4662" Text="Use the pointer. You haven't identified any requirements of the system beyond that you should be able to go from Object to Material, and the pointer is the simplest and most direct approach by some way." />
  <row Id="18930" PostHistoryTypeId="5" PostId="9180" RevisionGUID="81632f3f-aa4d-4df8-b70d-3cff9a6a5e55" CreationDate="2011-03-01T21:12:38.500" UserId="962" Comment="deleted 30 characters in body" Text="What's the best way to have large animations in XNA 4.0? I have created a spritesheet with the sprite being 250x400 (more of an image than a sprite but hey ho) and there are approximately 45 frames in the animation. This causes problems for XNA as it says that the maximum filesize for Reach is 2048.&#xD;&#xA;&#xD;&#xA;I'd rather not change to hidef as I heard that means that your game is less compatible with some computers and systems so does anyone have any idea what the best thing I could do is? The only thing I could come up with is to have a list of textures to flick through but that's not ideal." />
  <row Id="18932" PostHistoryTypeId="2" PostId="9187" RevisionGUID="647d91b5-0764-48b2-b25e-20e52497495e" CreationDate="2011-03-01T21:38:00.080" UserId="5788" Text="So I have some experience programming in Java, and at the moment I am learning how to use Python.  I have read on the process of game design and such. I also have media covered, got experience with graphics and audio.  My question is geared more towards the actual tools to use for making games, developing.  I am willing to commit to a long term development cycle, as I will be doing this as a hobby.  I've heard of Flash, Gamemaker, etc.  I don't intend to create my own Game Engine, so I was looking for a platform that is extensible and easy to program with an OOP mind frame.  As a plus it would be great of said game could be played directly from a website.  TIA!" />
  <row Id="18933" PostHistoryTypeId="1" PostId="9187" RevisionGUID="647d91b5-0764-48b2-b25e-20e52497495e" CreationDate="2011-03-01T21:38:00.080" UserId="5788" Text="Beginers Guide to Development" />
  <row Id="18934" PostHistoryTypeId="3" PostId="9187" RevisionGUID="647d91b5-0764-48b2-b25e-20e52497495e" CreationDate="2011-03-01T21:38:00.080" UserId="5788" Text="&lt;programming&gt;&lt;tools&gt;&lt;hobby-development&gt;&lt;design&gt;" />
  <row Id="18935" PostHistoryTypeId="4" PostId="9187" RevisionGUID="52e19997-02ab-4021-bc95-eebecf99981b" CreationDate="2011-03-01T21:44:30.217" UserId="189" Comment="Beginners has two N's" Text="Beginners' Guide to Development" />
  <row Id="18936" PostHistoryTypeId="2" PostId="9188" RevisionGUID="9686b093-4927-41ba-a5b8-0d82e1ca327b" CreationDate="2011-03-01T21:49:43.087" UserId="189" Text="[Unity][1] is the top game development tool in the industry right now. It has a free version and has a web player so you are able to deploy to a website as you said you want to do. The scripting is in C#, JavaScript or Boo, and it is cross-platform (Windows or Mac) so it should run on your computer, whichever you have.&#xD;&#xA;&#xD;&#xA;If you want to go lower-level and take advantage of your Java skills, you could check out [JMonkeyEngine][2]. This is a Java graphics engine with some extra features that make it particularly tuned to games. It is scene-graph based, which means instead of worrying about drawing polygons on screen (or pushing them to the graphics card), you simply load meshes and manipulate the meshes in a tree structure, e.g. everything in the scene is a node in the scene graph, so child nodes inherit from their parents and so on. This might be the object-oriented aspect you're looking for.&#xD;&#xA;&#xD;&#xA;These are my recommendations to you. If you want a drag-and-drop style interface and just want to do high-level scripting, go with Unity. If you want to write your game essentially from scratch, but not too low-level, go with JMonkeyEngine.&#xD;&#xA;&#xD;&#xA;For any further information I suggest you search our site. Almost every day we get a question like this, asking how to start game development, so there are many search results. Please notice the search box in the top right corner.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://jmonkeyengine.com/" />
  <row Id="18938" PostHistoryTypeId="2" PostId="9190" RevisionGUID="5c04737a-fa20-4e3c-a3ef-2d025a630103" CreationDate="2011-03-01T22:17:06.550" UserId="962" Text="Since you wont answer my comment above I will give you a few options.&#xD;&#xA;&#xD;&#xA;1 . Use a tilesheet that spans multiple Textures.&#xD;&#xA;&#xD;&#xA;2 . Use a &#xD;&#xA;&#xD;&#xA;    List&lt;Texture2D&gt;&#xD;&#xA;&#xD;&#xA;You can make this easier by making a png sequence with BigImage0001,BigImage0001,BigImage0001....&#xD;&#xA;&#xD;&#xA;Import all of those.&#xD;&#xA;&#xD;&#xA;Make a method that takes a name, Trailing numbers, and total frames. Have it return the built list of textures.&#xD;&#xA;&#xD;&#xA;..&#xD;&#xA;&#xD;&#xA;..&#xD;&#xA;&#xD;&#xA;Use 1 if you have a lot of instances of the animation, that are playing at different frames, as it will reduce the amount of SpriteBatch calls XNA has to process.&#xD;&#xA;&#xD;&#xA;Use 2 if you have a small amount of instances, it will reduce video memory consumption, but each instance more will increase the SpriteBatch calls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18940" PostHistoryTypeId="2" PostId="9191" RevisionGUID="c9fcc297-3ae4-4834-b1fb-2494b5397f25" CreationDate="2011-03-01T22:39:44.493" UserId="1198" Text="Even if you're an experienced programmer (any level of experience), I might recommend using something like GameMaker to build a simple game, before you start building your own. Start with building a game whose rules are well defined, and on the more simple side, think TicTacToe, Pong, or something similar. This will help get you orentated to the process your going to need without getting you stuck in the actual development. This can help you get your art and asset creation workflow down pat. (For my own experience, it this has been my largest pitfall, I spent too much time programming the game and got disenchanted with the project because I hadn't formalized an art workflow for myself.)&#xD;&#xA;&#xD;&#xA;If you are not set on building your own engine AND you are willing to be language agnostic (even though you have Java, you mention GameMaker and Flash) and have thoughts of possibly going public with your game, Epic recently upped the total amount you need to make (from 5k to 50k) before the royalties kick in for using the [UDK][1]. Its big and complicated, but it has a good deal of head-room. &#xD;&#xA;&#xD;&#xA;As Ricket said, Unity is hot right now, and has a pretty low bar to entry and might be worth looking in to.&#xD;&#xA;&#xD;&#xA;If being cross-platform is not of high value to you and you would rather do some programming, I cannot recommend C# and XNA highly enough. C# has all of the good parts of Java, without all of the poor parts, like the Java implementation of Genrics, and all the goodness of DirectX in a very &quot;managed&quot; style API. TorqueX is an XNA engine, but if you see my question [here][2]: it is not highly recommended. There are other XNA based frameworks and engines that can help get you off the ground; depending on the complexity of your game, you may not need any of these engines.&#xD;&#xA;&#xD;&#xA;If you are dedicated to Python, you might want to look into [pygame][3] -- I'm not much of a python guy, so I can't commont on its ease of use, but I've heard it mentioned a lot with respect to game development in Python.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products&#xD;&#xA;  [3]: http://www.pygame.org/news.html" />
  <row Id="18941" PostHistoryTypeId="5" PostId="9191" RevisionGUID="d12c1de8-2131-4cfd-aa2f-c52b8942307d" CreationDate="2011-03-01T22:50:55.910" UserId="1198" Comment="added 99 characters in body" Text="Even if you're an experienced programmer (any level of experience), I might recommend using something like GameMaker to build a simple game, before you start building your own. Start with building a game whose rules are well defined, and on the more simple side, think TicTacToe, Pong, or something similar. This will help get you orentated to the process your going to need without getting you stuck in the actual development. This can help you get your art and asset creation workflow down pat. (For my own experience, it this has been my largest pitfall, I spent too much time programming the game and got disenchanted with the project because I hadn't formalized an art workflow for myself.)&#xD;&#xA;&#xD;&#xA;If you are not set on building your own engine (which is a good thing, get a game out there thats fun, even the best engine wont make a fun game) AND you are willing to be language agnostic (even though you have Java, you mention GameMaker and Flash) and have thoughts of possibly going public with your game, Epic recently upped the total amount you need to make (from 5k to 50k) before the royalties kick in for using the [UDK][1]. Its big and complicated, but it has a good deal of head-room. &#xD;&#xA;&#xD;&#xA;As Ricket said, Unity is hot right now, and has a pretty low bar to entry and might be worth looking in to.&#xD;&#xA;&#xD;&#xA;If being cross-platform is not of high value to you and you would rather do some programming, I cannot recommend C# and XNA highly enough. C# has all of the good parts of Java, without all of the poor parts, like the Java implementation of Genrics, and all the goodness of DirectX in a very &quot;managed&quot; style API. TorqueX is an XNA engine, but if you see my question [here][2]: it is not highly recommended. There are other XNA based frameworks and engines that can help get you off the ground; depending on the complexity of your game, you may not need any of these engines.&#xD;&#xA;&#xD;&#xA;If you are dedicated to Python, you might want to look into [pygame][3] -- I'm not much of a python guy, so I can't commont on its ease of use, but I've heard it mentioned a lot with respect to game development in Python.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2934/what-has-your-experience-been-with-torque-products&#xD;&#xA;  [3]: http://www.pygame.org/news.html" />
  <row Id="18942" PostHistoryTypeId="2" PostId="9192" RevisionGUID="034ab119-d869-48bf-ab50-6b9bd6627078" CreationDate="2011-03-01T23:00:52.847" UserId="165" Text="**[Tales of the Rampant Coyote][1]** is more design/development than business, but does at times talk about the business/economic aspects of game development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rampantgames.com/blog/" />
  <row Id="18943" PostHistoryTypeId="2" PostId="9193" RevisionGUID="fe3fa506-f90e-470d-82fb-ebc2fd464123" CreationDate="2011-03-01T23:03:45.147" UserId="5796" Text="The OO way to do it is to create each new object with a material and colour as *properties* by instance passing. For example in Python:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    class Chair(Object):&#xD;&#xA;        def __init__(self, colour, material, position):&#xD;&#xA;            self.colour = colour&#xD;&#xA;            self.material = material&#xD;&#xA;            self.position = position&#xD;&#xA;        ...&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;You would then create the object with those properties:&#xD;&#xA;&#xD;&#xA;    chairmaterial = Material(&quot;wood&quot;)&#xD;&#xA;    mychair = Chair(COLOUR_GREEN, chairmaterial, (0,0))&#xD;&#xA;&#xD;&#xA;Rendering could then just be dependent on the Chair class for shape, and the material and colour for colour and texture." />
  <row Id="18944" PostHistoryTypeId="5" PostId="9192" RevisionGUID="e9f9a375-4aeb-4deb-b76f-c65adb15f10d" CreationDate="2011-03-01T23:06:07.070" UserId="165" Comment="added 208 characters in body; added 70 characters in body" Text="  - [Tales of the Rampant Coyote][1]: more design/development than business, but does at times talk about the business/economic aspects of game development.&#xD;&#xA;&#xD;&#xA;  - [The Bottom Feeder][2]&#xD;&#xA;&#xD;&#xA;  - [Lost Garden][3]&#xD;&#xA;&#xD;&#xA;  - [Make it big in Games][4]&#xD;&#xA;&#xD;&#xA;  - [Video Games Business and Marketing][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rampantgames.com/blog/&#xD;&#xA;  [2]: http://jeff-vogel.blogspot.com/&#xD;&#xA;  [3]: http://www.lostgarden.com/&#xD;&#xA;  [4]: http://makeitbigingames.com/&#xD;&#xA;  [5]: http://vgbm.blogspot.com/" />
  <row Id="18945" PostHistoryTypeId="2" PostId="9194" RevisionGUID="874ae137-da69-4713-89b9-68a662b815a5" CreationDate="2011-03-01T23:21:04.007" UserId="350" Text="Good day everyone,&#xD;&#xA;&#xD;&#xA;By far the biggest problem that has always dawned on my when programming games is how to structure my code. It just becomes an incredible mess after a while. The reason for that is because I have no idea how different classes should interact with each other. Let's have an example.&#xD;&#xA;&#xD;&#xA;Say I have a class `Player`, a class `PlayerInput` and a class `Map`. The player class contains information as to the location of the player, whereas the player input class handles changing that location, but by first making sure it's within a walkable area from the map class. How to structure this?&#xD;&#xA;&#xD;&#xA;My usual approach is to pass those components as parameters in the constructors of the parameters that need them, like so:&#xD;&#xA;&#xD;&#xA;&gt; var map = new Map(); var player = new&#xD;&#xA;&gt; Player(); var input = new&#xD;&#xA;&gt; PlayerInput(player, map);&#xD;&#xA;&#xD;&#xA;The problem with that is that it quickly gets messy, when you add new components you have to go through your constructors and update them, and it doesn't work well if you have mirroring references:&#xD;&#xA;&#xD;&#xA;    var physics = new Physics(input); //Oops, doesn't work&#xD;&#xA;    var input = new Input(physics);&#xD;&#xA;&#xD;&#xA;So, how do you guys usually manage this?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="18946" PostHistoryTypeId="1" PostId="9194" RevisionGUID="874ae137-da69-4713-89b9-68a662b815a5" CreationDate="2011-03-01T23:21:04.007" UserId="350" Text="Managing game objects/components" />
  <row Id="18947" PostHistoryTypeId="3" PostId="9194" RevisionGUID="874ae137-da69-4713-89b9-68a662b815a5" CreationDate="2011-03-01T23:21:04.007" UserId="350" Text="&lt;engine&gt;&lt;component-based&gt;" />
  <row Id="18948" PostHistoryTypeId="2" PostId="9195" RevisionGUID="a646756b-1f97-4437-893a-f8ac43caf252" CreationDate="2011-03-01T23:23:06.917" UserId="5798" Text="Not a blog, but a subreddit: [Marveloper][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.reddit.com/r/Marveloper/" />
  <row Id="18949" PostHistoryTypeId="25" PostId="9187" RevisionGUID="e3b3e6e3-79b6-411d-aabc-33aefbfff884" CreationDate="2011-03-01T23:23:07.167" Comment="http://twitter.com/#!/StackGameDev/status/42726584993595392" />
  <row Id="18950" PostHistoryTypeId="2" PostId="9196" RevisionGUID="66af9987-b0bb-42e1-8356-70ccd3c7808f" CreationDate="2011-03-01T23:32:42.677" UserId="189" Text="In your particular example, typically one system is more &quot;important&quot; than the other, or somehow the relationship is not exactly symmetric (one relies on the other more), and that's the opportunity to do something like the following:&#xD;&#xA;&#xD;&#xA;    var physics = new Physics();&#xD;&#xA;    var input = new Input(physics);&#xD;&#xA;    physics.attachInput(input);&#xD;&#xA;&#xD;&#xA;This is not uncommon; for example in Java's Swing GUI system, the BoxLayout LayoutManager requires knowing about the component that it is laying out; so you must first initialize a component (which assumes a default LayoutManager), and then initialize a BoxLayout passing it that component, and finally do a setLayout of the BoxLayout on the component. It looks like the following (taken from this [Java documentation page][1]):&#xD;&#xA;&#xD;&#xA;    JPanel listPane = new JPanel();&#xD;&#xA;    listPane.setLayout(new BoxLayout(listPane, BoxLayout.PAGE_AXIS));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/tutorial/uiswing/layout/box.html" />
  <row Id="18951" PostHistoryTypeId="2" PostId="9197" RevisionGUID="06b859f4-8fbf-49b1-ace1-c844bb678f34" CreationDate="2011-03-01T23:54:01.120" UserId="5800" Text="Hey thanks for all the answers.  Unfortunately, I have no control over the scene.  The images have been taken from fixed points and I had to do a lot of visual comparisons to get a decent approximation of where they were taken from.&#xD;&#xA;&#xD;&#xA;Basically what happens is an event happens within the game (a kill or a death) and the event is sent to the server when the game ends.  The software behind the server takes the 3D coordinates from that event and maps it to a 2D image that you can look at and see where that kill or death happened.  Those coordinates are relative to the image, though, not the actual game space.  All I know about the images is an estimate of the coordinates where it was taken at (in game space) and the field of view (78°).  Here are the position and rotation coordinates for 3 of the images in (X, Z, Y) / (yaw, pitch):&#xD;&#xA;&#xD;&#xA;    1: (15.894, 152.263, 43.839) / (53.34, -14.61)&#xD;&#xA;    2: (27.205, 170.375, 72.500) / (0.00, -85.50)&#xD;&#xA;    3: (51.987, 184.236, 41.290) / (206.38, -14.07)&#xD;&#xA;&#xD;&#xA;And here are the coordinates that the server is calculating for those 3 points of view, remember they're relative to the image, (X, Y):&#xD;&#xA;&#xD;&#xA;    1: (322, 205)&#xD;&#xA;    2: (389, 232)&#xD;&#xA;    3: (240, 109)&#xD;&#xA;&#xD;&#xA;And finally, the actual in-game cordinates where this event happened, (X, Z, Y):&#xD;&#xA;&#xD;&#xA;    (25, 164, 039)&#xD;&#xA;&#xD;&#xA;Hopefully someone here can lend me their brain for a bit, I'm completely at a loss.&#xD;&#xA;&#xD;&#xA;Edit: Perhaps I should have used the same name I posted the original question with.  My mistake, I am the original poster." />
  <row Id="18952" PostHistoryTypeId="2" PostId="9198" RevisionGUID="6422ec50-a29b-4fc5-8130-08827dce5f3e" CreationDate="2011-03-02T00:17:29.203" UserId="5509" Text="I'm working on a 2d game and am looking to make a sprite move horizontally across the screen in XNA while oscillating vertically (basically I want the movement to look like a sin wave). Currently for movement I'm using two vectors, one for speed and one for direction. My update function for sprites just contains this:&#xD;&#xA;&#xD;&#xA;    Position += direction * speed * (float)t.ElapsedGameTime.TotalSeconds;&#xD;&#xA;&#xD;&#xA;How could I utilize this setup to create the desired movement? I'm assuming I'd call Math.Sin or Math.Cos, but I'm unsure of where to start to make this sort of thing happened. My attempt looked like this:&#xD;&#xA;&#xD;&#xA;        public override void Update(GameTime t)&#xD;&#xA;        {&#xD;&#xA;            double msElapsed = t.TotalGameTime.Milliseconds;&#xD;&#xA;            mDirection.Y = (float)Math.Sin(msElapsed);&#xD;&#xA;            if (mDirection.Y &gt;= 0)&#xD;&#xA;                mSpeed.Y = moveSpeed;&#xD;&#xA;            else&#xD;&#xA;                mSpeed.Y = -moveSpeed;&#xD;&#xA;            base.Update(t, mSpeed, mDirection);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;moveSpeed is just some constant positive integer. With this, the sprite simply just continuously moves downward until it's off screen. Can anyone give me some info on what I'm doing wrong here? I've never tried something like this so if I'm doing things completely wrong, let me know!" />
  <row Id="18953" PostHistoryTypeId="1" PostId="9198" RevisionGUID="6422ec50-a29b-4fc5-8130-08827dce5f3e" CreationDate="2011-03-02T00:17:29.203" UserId="5509" Text="Oscillating Sprite Movement in XNA" />
  <row Id="18954" PostHistoryTypeId="3" PostId="9198" RevisionGUID="6422ec50-a29b-4fc5-8130-08827dce5f3e" CreationDate="2011-03-02T00:17:29.203" UserId="5509" Text="&lt;xna&gt;&lt;sprites&gt;&lt;movement&gt;" />
  <row Id="18955" PostHistoryTypeId="5" PostId="9144" RevisionGUID="c2e62a98-a2c9-4fd5-9fe5-0f40525bceb0" CreationDate="2011-03-02T01:06:01.680" UserId="5774" Comment="added 1229 characters in body" Text="I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font loading, etcetera. I am also using OpenGL via the FreeGLUT library in conjunction with SDL to display graphics.&#xD;&#xA;&#xD;&#xA;My method of collision detection is AABB (Axis-Aligned Bounding Box), which is really all I need to start with. What I need is an easy way to both detect which side the collision occurred on and handle the collisions properly. So, basically, if the player collides with the top of the platform, reposition him to the top; if there is a collision to the sides, reposition the player back to the side of the object; if there is a collision to the bottom, reposition the player under the platform.&#xD;&#xA;&#xD;&#xA;I have tried ***many*** different ways of doing this, such as trying to find the penetration depth and repositioning the player backwards by the penetration depth. Sadly, nothing I've tried seems to work correctly. Player movement ends up being very glitchy and repositions the player when I don't want it to. Part of the reason is probably because I feel like this is something so simple but I'm over-thinking it.&#xD;&#xA;&#xD;&#xA;If anyone thinks they can help, please take a look at the code below and help me try to improve on this if you can. I would like to refrain from using a library to handle this (as I want to learn on my own) or the something like the SAT (Separating Axis Theorem) if at all possible. Thank you in advance for your help!&#xD;&#xA;&#xD;&#xA;    void world1Level1CollisionDetection()&#xD;&#xA;    {&#xD;&#xA;    for(int i; i &lt; blocks; i++)&#xD;&#xA;    {&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==true)&#xD;&#xA;        {&#xD;&#xA;            de2dObj ballPrev;&#xD;&#xA;            ballPrev.coords[0] = ball.coords[0];&#xD;&#xA;            ballPrev.coords[1] = ball.coords[1];&#xD;&#xA;            ballPrev.coords[2] = ball.coords[2];&#xD;&#xA;            ballPrev.coords[3] = ball.coords[3];&#xD;&#xA;            ballPrev.coords[0] -= ball.xspeed;&#xD;&#xA;            ballPrev.coords[1] -= ball.yspeed;&#xD;&#xA;            ballPrev.coords[2] -= ball.xspeed;&#xD;&#xA;            ballPrev.coords[3] -= ball.yspeed;&#xD;&#xA;&#xD;&#xA;            int up = 0;&#xD;&#xA;            int left = 0;&#xD;&#xA;            int right = 0;&#xD;&#xA;            int down = 0;&#xD;&#xA;&#xD;&#xA;            if (ballPrev.coords[0] &lt; block[i].coords[0] &amp;&amp; ballPrev.coords[2] &lt; block[i].coords[0] &amp;&amp; (((ball.coords[1] &lt; block[i].coords[1]) || (ball.coords[3] &lt; ball.coords[1]))  || ((ball.coords[1] &lt; block[i].coords[3]) || ball.coords[3] &lt; block[i].coords[3])))&#xD;&#xA;            {&#xD;&#xA;                left = 1;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;           if (ballPrev.coords[0] &gt; block[i].coords[2] &amp;&amp; ballPrev.coords[2] &gt; block[i].coords[2] &amp;&amp; (((ball.coords[1] &lt; block[i].coords[1]) || (ball.coords[3] &lt; ball.coords[1]))  || ((ball.coords[1] &lt; block[i].coords[3]) || (ball.coords[3] &lt; block[i].coords[3]))))&#xD;&#xA;            {&#xD;&#xA;                right = 1;&#xD;&#xA;            }&#xD;&#xA;            if(ballPrev.coords[1] &lt; block[i].coords[1] &amp;&amp; block[i].coords[1] &lt; ballPrev.coords[3] &amp;&amp; ballPrev.coords[3] &lt; block[i].coords[3])&#xD;&#xA;            {&#xD;&#xA;                up = 1;&#xD;&#xA;            }&#xD;&#xA;            if(block[i].coords[1] &lt; ballPrev.coords[1] &amp;&amp; ballPrev.coords[1] &lt; block[i].coords[3] &amp;&amp; block[i].coords[3] &lt; ballPrev.coords[3])&#xD;&#xA;            {&#xD;&#xA;                down = 1;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cout &lt;&lt; left &lt;&lt; &quot;, &quot; &lt;&lt; right &lt;&lt; &quot;, &quot; &lt;&lt; up &lt;&lt; &quot;, &quot; &lt;&lt; down &lt;&lt; &quot;, &quot; &lt;&lt; endl;&#xD;&#xA;&#xD;&#xA;            if (left == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[0] - 17.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[0] - 1.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (right == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[2] + 1.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[2] + 17.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (down == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[1] = block[i].coords[3] + 0.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[3] + 16.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (up == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.yspeed = 0.0f;&#xD;&#xA;                ball.gravity = 0.0f;&#xD;&#xA;                ball.coords[1] = block[i].coords[1] - 17.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[1] - 1.0f;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==false)&#xD;&#xA;        {&#xD;&#xA;            ball.gravity = -0.5f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;To explain what some of this code means:&#xD;&#xA;&#xD;&#xA;The blocks variable is basically an integer that is storing the amount of blocks, or platforms. I am checking all of the blocks using a for loop, and the number that the loop is currently on is represented by integer i.&#xD;&#xA;The coordinate system might seem a little weird, so that's worth explaining.&#xD;&#xA;coords[0] represents the x position (left) of the object (where it starts on the x axis).&#xD;&#xA;coords[1] represents the y position (top) of the object (where it starts on the y axis).&#xD;&#xA;coords[2] represents the width of the object plus coords[0] (right).&#xD;&#xA;coords[3] represents the height of the object plus coords[1] (bottom).&#xD;&#xA;de2dCheckCollision performs an AABB collision detection.&#xD;&#xA;Up is negative y and down is positive y, as it is in most games.&#xD;&#xA;&#xD;&#xA;Hopefully I have provided enough information for someone to help me successfully. If there is something I left out that might be crucial, let me know and I'll provide the necessary information. Finally, for anyone who can help, providing code would be very helpful and much appreciated.&#xD;&#xA;&#xD;&#xA;Thank you again for your help!&#xD;&#xA;&#xD;&#xA;**Edit**: I have updated my code with a new algorithm that checks where the ball was previously before collision. Corner cases work on that single platform correctly now, but when I have a wall of objects, I keep can really slide against it, but if I move towards the wall while sliding, I pass through it and an essentially now standing on top of a block inside the wall. Also, there is a jittering effect that happens when I am on the ground, where the ball is constantly going up and down." />
  <row Id="18956" PostHistoryTypeId="2" PostId="9199" RevisionGUID="d15418da-8f31-4c4f-9959-f4c837fc7974" CreationDate="2011-03-02T01:08:17.480" UserId="5802" Text="You need to move the sprite relative to a center point. To do this, create an offset and alter the position of Y with that offset.&#xD;&#xA;&#xD;&#xA;If your Y doesn't move, you can just store your Y:&#xD;&#xA;&#xD;&#xA;    float center = Position.Y;&#xD;&#xA;    float offset = 0; //The offset to add to your Y&#xD;&#xA;    float radius = 5; //Whatever you want your radius to be&#xD;&#xA;&#xD;&#xA;Then, in your update function, you can offset your Y by a specific amount:&#xD;&#xA;    &#xD;&#xA;    double msElapsed = t.TotalGameTime.Milliseconds;    &#xD;&#xA;    offset = (float)Math.Sin(msElapsed) * radius;   &#xD;&#xA;    Position.Y = center + offset;" />
  <row Id="18957" PostHistoryTypeId="5" PostId="9144" RevisionGUID="22fa30c8-16a8-48b3-9c49-28b8279e407d" CreationDate="2011-03-02T01:21:32.390" UserId="5774" Comment="added 642 characters in body" Text="I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font loading, etcetera. I am also using OpenGL via the FreeGLUT library in conjunction with SDL to display graphics.&#xD;&#xA;&#xD;&#xA;My method of collision detection is AABB (Axis-Aligned Bounding Box), which is really all I need to start with. What I need is an easy way to both detect which side the collision occurred on and handle the collisions properly. So, basically, if the player collides with the top of the platform, reposition him to the top; if there is a collision to the sides, reposition the player back to the side of the object; if there is a collision to the bottom, reposition the player under the platform.&#xD;&#xA;&#xD;&#xA;I have tried ***many*** different ways of doing this, such as trying to find the penetration depth and repositioning the player backwards by the penetration depth. Sadly, nothing I've tried seems to work correctly. Player movement ends up being very glitchy and repositions the player when I don't want it to. Part of the reason is probably because I feel like this is something so simple but I'm over-thinking it.&#xD;&#xA;&#xD;&#xA;If anyone thinks they can help, please take a look at the code below and help me try to improve on this if you can. I would like to refrain from using a library to handle this (as I want to learn on my own) or the something like the SAT (Separating Axis Theorem) if at all possible. Thank you in advance for your help!&#xD;&#xA;&#xD;&#xA;    void world1Level1CollisionDetection()&#xD;&#xA;    {&#xD;&#xA;    for(int i; i &lt; blocks; i++)&#xD;&#xA;    {&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==true)&#xD;&#xA;        {&#xD;&#xA;            de2dObj ballPrev;&#xD;&#xA;            ballPrev.coords[0] = ball.coords[0];&#xD;&#xA;            ballPrev.coords[1] = ball.coords[1];&#xD;&#xA;            ballPrev.coords[2] = ball.coords[2];&#xD;&#xA;            ballPrev.coords[3] = ball.coords[3];&#xD;&#xA;            ballPrev.coords[0] -= ball.xspeed;&#xD;&#xA;            ballPrev.coords[1] -= ball.yspeed;&#xD;&#xA;            ballPrev.coords[2] -= ball.xspeed;&#xD;&#xA;            ballPrev.coords[3] -= ball.yspeed;&#xD;&#xA;&#xD;&#xA;            int up = 0;&#xD;&#xA;            int left = 0;&#xD;&#xA;            int right = 0;&#xD;&#xA;            int down = 0;&#xD;&#xA;&#xD;&#xA;            //if(ball.coords[0] &lt; block[i].coords[0] &amp;&amp; block[i].coords[0] &lt; ball.coords[2] &amp;&amp; ball.coords[2] &lt; block[i].coords[2])&#xD;&#xA;            if (ballPrev.coords[0] &lt; block[i].coords[0] &amp;&amp; ballPrev.coords[2] &lt; block[i].coords[0] &amp;&amp; (((ball.coords[1] &lt; block[i].coords[1]) || (ball.coords[3] &lt; ball.coords[1]))  || ((ball.coords[1] &lt; block[i].coords[3]) || ball.coords[3] &lt; block[i].coords[3])))&#xD;&#xA;            {&#xD;&#xA;                left = 1;&#xD;&#xA;            }&#xD;&#xA;           // if(block[i].coords[0] &lt; ball.coords[0] &amp;&amp; ball.coords[0] &lt; block[i].coords[2] &amp;&amp; block[i].coords[2] &lt; ball.coords[2])&#xD;&#xA;           if (ballPrev.coords[0] &gt; block[i].coords[2] &amp;&amp; ballPrev.coords[2] &gt; block[i].coords[2] &amp;&amp; (((ball.coords[1] &lt; block[i].coords[1]) || (ball.coords[3] &lt; ball.coords[1]))  || ((ball.coords[1] &lt; block[i].coords[3]) || (ball.coords[3] &lt; block[i].coords[3]))))&#xD;&#xA;            {&#xD;&#xA;                right = 1;&#xD;&#xA;            }&#xD;&#xA;            if(ballPrev.coords[1] &lt; block[i].coords[1] &amp;&amp; block[i].coords[1] &lt; ballPrev.coords[3] &amp;&amp; ballPrev.coords[3] &lt; block[i].coords[3])// &amp;&amp; (((ballPrev.coords[0] &gt; block[i].coords[0]) || (ballPrev.coords[2] &gt; block[i].coords[0])) || ((ballPrev.coords[0] &lt; block[i].coords[2]) || (ballPrev.coords[2] &lt; block[i].coords[2]))))&#xD;&#xA;            {&#xD;&#xA;                up = 1;&#xD;&#xA;            }&#xD;&#xA;            if(block[i].coords[1] &lt; ballPrev.coords[1] &amp;&amp; ballPrev.coords[1] &lt; block[i].coords[3] &amp;&amp; block[i].coords[3] &lt; ballPrev.coords[3])// &amp;&amp; (((ballPrev.coords[0] &gt; block[i].coords[0]) || (ballPrev.coords[2] &gt; block[i].coords[0])) || ((ballPrev.coords[0] &lt; block[i].coords[2]) || (ballPrev.coords[2] &lt; block[i].coords[2]))))&#xD;&#xA;            {&#xD;&#xA;                down = 1;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cout &lt;&lt; left &lt;&lt; &quot;, &quot; &lt;&lt; right &lt;&lt; &quot;, &quot; &lt;&lt; up &lt;&lt; &quot;, &quot; &lt;&lt; down &lt;&lt; &quot;, &quot; &lt;&lt; endl;&#xD;&#xA;&#xD;&#xA;            if (left == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[0] - 18.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[0] - 2.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (right == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[2] + 2.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[2] + 18.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (down == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[1] = block[i].coords[3] + 4.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[3] + 20.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (up == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.yspeed = 0.0f;&#xD;&#xA;                ball.gravity = 0.0f;&#xD;&#xA;                ball.coords[1] = block[i].coords[1] - 17.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[1] - 1.0f;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==false)&#xD;&#xA;        {&#xD;&#xA;            ball.gravity = -0.5f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;To explain what some of this code means:&#xD;&#xA;&#xD;&#xA;The blocks variable is basically an integer that is storing the amount of blocks, or platforms. I am checking all of the blocks using a for loop, and the number that the loop is currently on is represented by integer i.&#xD;&#xA;The coordinate system might seem a little weird, so that's worth explaining.&#xD;&#xA;coords[0] represents the x position (left) of the object (where it starts on the x axis).&#xD;&#xA;coords[1] represents the y position (top) of the object (where it starts on the y axis).&#xD;&#xA;coords[2] represents the width of the object plus coords[0] (right).&#xD;&#xA;coords[3] represents the height of the object plus coords[1] (bottom).&#xD;&#xA;de2dCheckCollision performs an AABB collision detection.&#xD;&#xA;Up is negative y and down is positive y, as it is in most games.&#xD;&#xA;&#xD;&#xA;Hopefully I have provided enough information for someone to help me successfully. If there is something I left out that might be crucial, let me know and I'll provide the necessary information. Finally, for anyone who can help, providing code would be very helpful and much appreciated.&#xD;&#xA;&#xD;&#xA;Thank you again for your help!&#xD;&#xA;&#xD;&#xA;**Edit**: I have updated my code with a new algorithm that checks where the ball was previously before collision. Corner cases work on that single platform correctly now, but when I have a wall of objects, I keep can really slide against it, but if I move towards the wall while sliding, I pass through it and an essentially now standing on top of a block inside the wall. Also, there is a jittering effect that happens when I am on the ground, where the ball is constantly going up and down." />
  <row Id="18958" PostHistoryTypeId="5" PostId="9144" RevisionGUID="3b5c2abf-5a3f-4bfc-981f-fa4d8d537f42" CreationDate="2011-03-02T01:28:05.320" UserId="5774" Comment="deleted 717 characters in body" Text="I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font loading, etcetera. I am also using OpenGL via the FreeGLUT library in conjunction with SDL to display graphics.&#xD;&#xA;&#xD;&#xA;My method of collision detection is AABB (Axis-Aligned Bounding Box), which is really all I need to start with. What I need is an easy way to both detect which side the collision occurred on and handle the collisions properly. So, basically, if the player collides with the top of the platform, reposition him to the top; if there is a collision to the sides, reposition the player back to the side of the object; if there is a collision to the bottom, reposition the player under the platform.&#xD;&#xA;&#xD;&#xA;I have tried ***many*** different ways of doing this, such as trying to find the penetration depth and repositioning the player backwards by the penetration depth. Sadly, nothing I've tried seems to work correctly. Player movement ends up being very glitchy and repositions the player when I don't want it to. Part of the reason is probably because I feel like this is something so simple but I'm over-thinking it.&#xD;&#xA;&#xD;&#xA;If anyone thinks they can help, please take a look at the code below and help me try to improve on this if you can. I would like to refrain from using a library to handle this (as I want to learn on my own) or the something like the SAT (Separating Axis Theorem) if at all possible. Thank you in advance for your help!&#xD;&#xA;&#xD;&#xA;    void world1Level1CollisionDetection()&#xD;&#xA;    {&#xD;&#xA;    for(int i; i &lt; blocks; i++)&#xD;&#xA;    {&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==true)&#xD;&#xA;        {&#xD;&#xA;            de2dObj ballPrev;&#xD;&#xA;            ballPrev.coords[0] = ball.coords[0];&#xD;&#xA;            ballPrev.coords[1] = ball.coords[1];&#xD;&#xA;            ballPrev.coords[2] = ball.coords[2];&#xD;&#xA;            ballPrev.coords[3] = ball.coords[3];&#xD;&#xA;            ballPrev.coords[0] -= ball.xspeed;&#xD;&#xA;            ballPrev.coords[1] -= ball.yspeed;&#xD;&#xA;            ballPrev.coords[2] -= ball.xspeed;&#xD;&#xA;            ballPrev.coords[3] -= ball.yspeed;&#xD;&#xA;&#xD;&#xA;            int up = 0;&#xD;&#xA;            int left = 0;&#xD;&#xA;            int right = 0;&#xD;&#xA;            int down = 0;&#xD;&#xA;&#xD;&#xA;            if (ballPrev.coords[0] &lt; block[i].coords[0] &amp;&amp; ballPrev.coords[2] &lt; block[i].coords[0] &amp;&amp; (((ball.coords[1] &lt; block[i].coords[1]) || (ball.coords[3] &lt; ball.coords[1]))  || ((ball.coords[1] &lt; block[i].coords[3]) || ball.coords[3] &lt; block[i].coords[3])))&#xD;&#xA;            {&#xD;&#xA;                left = 1;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;           if (ballPrev.coords[0] &gt; block[i].coords[2] &amp;&amp; ballPrev.coords[2] &gt; block[i].coords[2] &amp;&amp; (((ball.coords[1] &lt; block[i].coords[1]) || (ball.coords[3] &lt; ball.coords[1]))  || ((ball.coords[1] &lt; block[i].coords[3]) || (ball.coords[3] &lt; block[i].coords[3]))))&#xD;&#xA;            {&#xD;&#xA;                right = 1;&#xD;&#xA;            }&#xD;&#xA;            if(ballPrev.coords[1] &lt; block[i].coords[1] &amp;&amp; block[i].coords[1] &lt; ballPrev.coords[3] &amp;&amp; ballPrev.coords[3] &lt; block[i].coords[3])&#xD;&#xA;            {&#xD;&#xA;                up = 1;&#xD;&#xA;            }&#xD;&#xA;            if(block[i].coords[1] &lt; ballPrev.coords[1] &amp;&amp; ball&#xD;&#xA;            {&#xD;&#xA;                down = 1;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cout &lt;&lt; left &lt;&lt; &quot;, &quot; &lt;&lt; right &lt;&lt; &quot;, &quot; &lt;&lt; up &lt;&lt; &quot;, &quot; &lt;&lt; down &lt;&lt; &quot;, &quot; &lt;&lt; endl;&#xD;&#xA;&#xD;&#xA;            if (left == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[0] - 18.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[0] - 2.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (right == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[0] = block[i].coords[2] + 2.0f;&#xD;&#xA;                ball.coords[2] = block[i].coords[2] + 18.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (down == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.coords[1] = block[i].coords[3] + 4.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[3] + 20.0f;&#xD;&#xA;            }&#xD;&#xA;            else if (up == 1)&#xD;&#xA;            {&#xD;&#xA;                ball.yspeed = 0.0f;&#xD;&#xA;                ball.gravity = 0.0f;&#xD;&#xA;                ball.coords[1] = block[i].coords[1] - 17.0f;&#xD;&#xA;                ball.coords[3] = block[i].coords[1] - 1.0f;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        if (de2dCheckCollision(ball,block[i],0.0f,0.0f)==false)&#xD;&#xA;        {&#xD;&#xA;            ball.gravity = -0.5f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To explain what some of this code means:&#xD;&#xA;&#xD;&#xA;The blocks variable is basically an integer that is storing the amount of blocks, or platforms. I am checking all of the blocks using a for loop, and the number that the loop is currently on is represented by integer i.&#xD;&#xA;The coordinate system might seem a little weird, so that's worth explaining.&#xD;&#xA;coords[0] represents the x position (left) of the object (where it starts on the x axis).&#xD;&#xA;coords[1] represents the y position (top) of the object (where it starts on the y axis).&#xD;&#xA;coords[2] represents the width of the object plus coords[0] (right).&#xD;&#xA;coords[3] represents the height of the object plus coords[1] (bottom).&#xD;&#xA;de2dCheckCollision performs an AABB collision detection.&#xD;&#xA;Up is negative y and down is positive y, as it is in most games.&#xD;&#xA;&#xD;&#xA;Hopefully I have provided enough information for someone to help me successfully. If there is something I left out that might be crucial, let me know and I'll provide the necessary information. Finally, for anyone who can help, providing code would be very helpful and much appreciated.&#xD;&#xA;&#xD;&#xA;Thank you again for your help!&#xD;&#xA;&#xD;&#xA;**Edit**: I have updated my code with a new algorithm that checks where the ball was previously before collision. Corner cases work on that single platform correctly now, but when I have a wall of objects, I keep can really slide against it, but if I move towards the wall while sliding, I pass through it and an essentially now standing on top of a block inside the wall. Also, there is a jittering effect that happens when I am on the ground, where the ball is constantly going up and down." />
  <row Id="18959" PostHistoryTypeId="25" PostId="9198" RevisionGUID="c9c08c90-7107-4c48-9c13-05b82924327c" CreationDate="2011-03-02T02:23:07.727" Comment="http://twitter.com/#!/StackGameDev/status/42771887645933568" />
  <row Id="18960" PostHistoryTypeId="6" PostId="9151" RevisionGUID="741bb8b8-f700-4f2d-b520-2de428181a7d" CreationDate="2011-03-02T02:34:33.883" UserId="51" Comment="edited tags" Text="&lt;coordinates&gt;" />
  <row Id="18961" PostHistoryTypeId="2" PostId="9200" RevisionGUID="15cc02d4-229f-4b9f-b23a-381162d89b51" CreationDate="2011-03-02T02:45:31.833" UserId="160" Text="No lie, architecting games (or any other simulation-style program) is harder than your average business app. When you have lots of different entities that all need to interact then in the code they'll need to, well, *interact*. Letting them do that in a maintainable way is tricky.&#xD;&#xA;&#xD;&#xA;A [component](http://gameprogrammingpatterns.com/component.html) pattern can help, but even then figuring out how to wire the components up is non-trivial.&#xD;&#xA;&#xD;&#xA;To your specific question:&#xD;&#xA;&#xD;&#xA;&gt; Say I have a class Player, a class PlayerInput and a class Map. The player class contains information as to the location of the player, whereas the player input class handles changing that location, but by first making sure it's within a walkable area from the map class. How to structure this?&#xD;&#xA;&#xD;&#xA;In this case, I generally order the dependencies by how the information flows:&#xD;&#xA;&#xD;&#xA;1. User input comes in. That defines how the player *wants* to move.&#xD;&#xA;2. The player's behavior and animation modify that to determine how it *can* move (things like preventing a jump if you're already in the air).&#xD;&#xA;3. The collision modifies that to determine how the player *does* move.&#xD;&#xA;&#xD;&#xA;So collision refers to animation which refers to user input. Any of those dependencies can be decoupled by hiding them behind an interface. So, for example, the animation system just needs to know the direction the player wants to go. It doesn't care if that's coming from user input or from something else (like AI, a replay script, or demo mode) so all it needs is an instance of some `IPlayerMovement` interface.&#xD;&#xA;&#xD;&#xA;&gt; and it doesn't work well if you have mirroring references:&#xD;&#xA;&#xD;&#xA;If you can't avoid a circular reference altogether, you can always break it by introducing an interface:&#xD;&#xA;&#xD;&#xA;    // Problematic:&#xD;&#xA;    class A {&#xD;&#xA;      A(B b) { /* ... */ }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Bad:&#xD;&#xA;    class B {&#xD;&#xA;      B(A a) { /* ... */ }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // No more cycle:&#xD;&#xA;    interface I {&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class A {&#xD;&#xA;      A(I i) { /* ... */ }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Bad:&#xD;&#xA;    class B implements I {&#xD;&#xA;      B(A a) { /* ... */ }&#xD;&#xA;    }" />
  <row Id="18962" PostHistoryTypeId="2" PostId="9201" RevisionGUID="871a855d-853a-4157-9bdc-491236c42b3f" CreationDate="2011-03-02T03:33:49.423" UserDisplayName="user5805" Text="I am making a hack n slash 3rd person game. And I want the character movements to be more dynamic not like fighting games where you have a moves list. I want to animate tons of different animations and have them &quot;Tween&quot; between each other? Because I want the controls to not be keyboard mouse. I want it to be all keyboard. that way you have up to 10 inputs (All your fingers) to blend and morph animations to create more fluid movements. In the end this will almost be similar to characters typing a phrase or string of keys rather than move forward mouse look click to melee. My question is. Has anyone done this before and would someone go about trying to tween lets say one for key on the keyboard excluding Tab, Caps, R+Shift, L+Shift, Enter, R+Ctrl, L+Ctrl, L+Alt, R+Alt, Windows Key, and Menu. So thats all the numbers, letters and punctuation keys. Thats 46 keys gives me a combination of 46P1 = 5502622159812088949850305428800254892961651752960000000000L (used Python)&#xD;&#xA;and with a minimum entry value of 2 keypresses shortening to half. This is not humanly possible to create so many inique animations in one lifetime. But I'm guessing there is a reason this hasn't been done already. &#xD;&#xA;&#xD;&#xA;Or if I just used 10 basic keys. Maybe ASDF SPACE (RIGHT HAND) 456+0 (LEFT HAND KEYPAD)&#xD;&#xA;it would give me 3,628,800 posible unique animations. " />
  <row Id="18963" PostHistoryTypeId="1" PostId="9201" RevisionGUID="871a855d-853a-4157-9bdc-491236c42b3f" CreationDate="2011-03-02T03:33:49.423" UserDisplayName="user5805" Text="Blending animations for more character movements" />
  <row Id="18964" PostHistoryTypeId="3" PostId="9201" RevisionGUID="871a855d-853a-4157-9bdc-491236c42b3f" CreationDate="2011-03-02T03:33:49.423" UserDisplayName="user5805" Text="&lt;math&gt;&lt;animation&gt;&lt;graphics-programming&gt;&lt;tweening&gt;" />
  <row Id="18965" PostHistoryTypeId="2" PostId="9202" RevisionGUID="d3c64056-b213-49da-8ba8-2ea76174dc2d" CreationDate="2011-03-02T04:40:41.920" UserId="5540" Text="Well... the reason there's a moves list is because each &quot;attack&quot; has to do SOMETHING. Limiting the options does limit the gameplay but it also limits players from being overwhelmed and it limits the chances of something obscenely overpowered sneaking in. &#xD;&#xA;&#xD;&#xA;If the &quot;something&quot; for the attack is, for example, a slash attack but one varies one degree from another then you're likely better off with a different interface, maybe like an aiming icon that's mouse based but changes the angle of attack and one or two buttons for the slash. That gives you simplicity but also variety. &#xD;&#xA;&#xD;&#xA;Anywho, as far as the animations go then **I would suggest having a discreet set of starting points or stances for the animations.** Each animation that you want to form for the attack would then only have to start from those discreet start points, and to tween between animations then you would just, at worst, have to tween between the start points. It's not quite the same pie-in-the-sky type of animation that you sound like you're describing, but it's vastly more feasible to do. " />
  <row Id="18966" PostHistoryTypeId="25" PostId="9180" RevisionGUID="7588ab3f-1695-478c-9716-5d8727229d36" CreationDate="2011-03-02T05:23:07.293" Comment="http://twitter.com/#!/StackGameDev/status/42817185856499713" />
  <row Id="18967" PostHistoryTypeId="2" PostId="9203" RevisionGUID="908a6920-ce35-4f44-87e0-428d494dc984" CreationDate="2011-03-02T05:37:24.860" UserId="5590" Text="Good question. One away around these types of interdependency on subsystems, like input, physic, rendering, etc, is to use the services &amp; singleton pattern together. Each subsystem could be modeled as a service, and the game only has one instance of that service at a time (sub system) that gets created when first called.&#xD;&#xA;&#xD;&#xA;At some point though, your going to have a chicken and egg problem if the creation of your subsystems depends on the creation of another subsystem that depends on the creation of the other.&#xD;&#xA;&#xD;&#xA;So, avoid the above circular creation problem, and also use static singletons. For example: Input.getInstance(), Physics.getInstance(). Both of those getInstance methods could create and return the subsystem on the first call, but then return the sub system on other calls (singleton pattern). So the first time Input needs the physics sub system it gets it via the singleton service call.  Read up on the Gang Of Four Design patterns for more information on those patterns.&#xD;&#xA;" />
  <row Id="18968" PostHistoryTypeId="2" PostId="9204" RevisionGUID="7ae18658-7f5c-46d8-ad4d-f4b0cea89278" CreationDate="2011-03-02T06:23:02.340" UserId="56" Text="I've read in many places that DrawableGameComponents should be saved for things like &quot;levels&quot; or some kind of managers instead of using them, for example, for characters or tiles (Like this guy says [here][1]). But I don't understand why this is so. I read [this post][2] and it made a lot of sense to me, but these are the minority. &#xD;&#xA;&#xD;&#xA;I usually wouldn't pay too much attention to things like these, but in this case I would like to know why the apparent majority believes this is not the way to go. Maybe I'm missing something.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/517783-xna-drawable-components-what-are-the-dos-and-donts/page__p__4364768#entry4364768&#xD;&#xA;  [2]: http://www.progware.org/Blog/post/XNA-Game-Development-(Decentralize).aspx" />
  <row Id="18969" PostHistoryTypeId="1" PostId="9204" RevisionGUID="7ae18658-7f5c-46d8-ad4d-f4b0cea89278" CreationDate="2011-03-02T06:23:02.340" UserId="56" Text="What are the cons of using DrawableGameComponent for every instance of a game object?" />
  <row Id="18970" PostHistoryTypeId="3" PostId="9204" RevisionGUID="7ae18658-7f5c-46d8-ad4d-f4b0cea89278" CreationDate="2011-03-02T06:23:02.340" UserId="56" Text="&lt;xna&gt;&lt;game-component&gt;" />
  <row Id="18971" PostHistoryTypeId="25" PostId="9194" RevisionGUID="7e814795-41fb-419b-b6c0-3684dc11b208" CreationDate="2011-03-02T08:23:07.333" Comment="http://twitter.com/#!/StackGameDev/status/42862484188708864" />
  <row Id="18972" PostHistoryTypeId="2" PostId="9205" RevisionGUID="cdcb8d46-aead-4a7d-bf06-1983718300ad" CreationDate="2011-03-02T09:32:41.670" UserId="5810" Text="That type of control scheme is totally useless as you will overload the players with information and at least the reaction time will suffer considerably,that is why mouse is preferable since a lot of variation can be made&#xD;&#xA;&#xD;&#xA;If you want variety in animation you don't need convoluted controls schemes, you can use either [procedural animations][1] and/or [blend multiple animations][2] togheter&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/cartwheel-3d/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=YIuMlQxpxS8" />
  <row Id="18973" PostHistoryTypeId="2" PostId="9206" RevisionGUID="bf3878cb-4cee-45fe-98e1-e9833701c4a7" CreationDate="2011-03-02T09:33:35.617" UserId="5812" Text="You might want to look into a noSQL database like mongodb if you work with PHP because of the ready made drivers and because it looks like all you have to save are statistical and property data for which you wouldn't need joins or anything more &quot;complex&quot;. &#xD;&#xA;&#xD;&#xA;If you arent sure about the size of your app you might be better off starting with a cloud solution. I know many use EC2 but im very happy with rackspace cloud servers. They are decent fast and super easy to deploy. &#xD;&#xA;We had our own Facebook app running around two years ago and maxed out around 42 million users on FB. As database storage i used redis because it is very fast (all in memory) and spread the data (simple properties similar to your data) over 20 2GB nodes and hashed the data with the flexihash algo (redis cant shard/hash) with a redundancy of four. That way i was able to scale up and down pretty easy. (Looking back at it it wasn't the smartest solution...)&#xD;&#xA;&#xD;&#xA;Just always work with intergers and use caching everwhere (memcached) and you're good. Don't worry too much about the disk space. If you have to handle a LOT of users you should be able to pay for a few more servers.&#xD;&#xA;&#xD;&#xA;A little tip for the hosting: If you want a serious hoster, you might want to look into the Softlayer special deals and ask the support if they give you a raid or double disk storage for free. When i got my first Softlayer server around 5 years ago i asked them if they could turn the RAM deal into a Disk deal and got 2x250GB. " />
  <row Id="18974" PostHistoryTypeId="2" PostId="9207" RevisionGUID="20885e31-d159-43cf-95ac-0fcfead30612" CreationDate="2011-03-02T11:13:59.797" UserId="5813" Text="this is a post detailing my search for the most enjoyable way for a hobbyist game programmer to sweeten his free time with making a game.&#xD;&#xA;&#xD;&#xA;**My requirements:**&#xD;&#xA;I looked at Flash first, I made a couple of small games but I'm doubtful of the performance. I would like to make a fairly large strategy game, with several hundred units fighting simultaneously, explosions and animations included. Also zoomable maps.&#xD;&#xA;I saw that Adobe has a new 3D API for Flash, but I don't know if that improves 2D performance aswell, I couldn't find anything related to that question on their MAX10 sessions.&#xD;&#xA;Would you say that Flash is a good technology for making large 2D games easily?&#xD;&#xA;I really like Actionscript, and I love how easy everything is in Flash. There are several engines available which make it even easier. &#xD;&#xA;&#xD;&#xA;I just do this for fun, and it would be even better if there were proper animation/particle editors available and if the engine I were to use, would be available for multiple platforms. (so more people can play my game once finished). I'd like to have it available on many mobile platforms aswell. (because I love touch input for some reason)&#xD;&#xA;&#xD;&#xA;I do know the XNA framework pretty well, but there are no good engines available for it, and it will only run on Windows, which is a huge turn off. Even bigger is, that you need to install the XNA redistributable each time you want to give the game to someone.&#xD;&#xA;If I use XNA, I would have to make all the tools myself, and I'd probably have to make them with WPF. (I'd love to make tools with Adobe AIR, but unfortunately the API's for image manipulation etc. are far worse in Flash, than they are in XNA/WPF.)&#xD;&#xA;Now, I'm aware that I could make my own engine that supports each of those platforms, but quite frankly, that would be too much work plowing through APIs. After all, I want to make a game, not an engine. &#xD;&#xA;&#xD;&#xA;So the question becomes: **Is there maybe a cross platform (free or free to develop?) engine available that I could use for 2D development?**&#xD;&#xA;I prefer: C#, Actionscript. I don't mind using c++ if the toolset is above average, but I highly doubt that there is something out there like that. Please prove me wrong :)&#xD;&#xA;So summary: I'd like to use Flash, but I don't know if it scales well enough. I'm not a scripter, I want some real APIs that I can work with inside a proper IDE.&#xD;&#xA;&#xD;&#xA;Just for information, I looked at several alternatives, I'm actually looking for a long time already. You'd help me a lot to make a decision finally.&#xD;&#xA;&#xD;&#xA;* Feature-wise the Flatredball engine would be ideal. But I tried their tools, and quite frankly, they are horrible. Absolutely unusable, I'd need to make my own for sure. I didn't look at their API, but if their tools are so bad, I'm not inclined to look further.&#xD;&#xA;&#xD;&#xA;* Unity3D. This one is quite nice, but I really *don't need 3D*, and it is quite ...a lot of work to learn. I also don't like that it is so expensive to use for different platforms and that I can only code for it through scripting. You have to buy each platform separately. The editor usability is average, the product overall is good enough for most purposes, but learning it myself would be overkill.&#xD;&#xA;&#xD;&#xA;* Shiva 3D. It looks good enough, but again: I don't really need 3D. The editor usability is a little worse than Unity3D in my opinion and it wasn't clear to me how to start programming. I think it requires C++ for coding, so that's a negative too. I want to have fun, and c# is fun ;)&#xD;&#xA;&#xD;&#xA;* SDL. Quite frankly, I'd still need to port to all those different SDL implementations. And I don't like OpenGL style programming, it's just plain ugly. And it needs c++, I know that there might be some wrappers available, but I don't like to use wrappers, because...&#xD;&#xA;&#xD;&#xA;* Irrlicht. A lot of features, but support seems to be low and it is aimed at enthusiasts. C# bindings get dropped repeatedly. I'm not an engine enthusiast, I just want to make a game. I don't see this happening with Irrlicht.&#xD;&#xA;&#xD;&#xA;* Ogre3D. Way too much work, it's just a graphics engine. Also no multiple platform support and c++.&#xD;&#xA;&#xD;&#xA;* Torque2D. Costs something to use, and I didn't hear a lot of good things about support and documentation. Also costs extra for each platform." />
  <row Id="18975" PostHistoryTypeId="1" PostId="9207" RevisionGUID="20885e31-d159-43cf-95ac-0fcfead30612" CreationDate="2011-03-02T11:13:59.797" UserId="5813" Text="Easiest, most fun way to program 2D games? Flash? XNA? Some other engine?" />
  <row Id="18976" PostHistoryTypeId="3" PostId="9207" RevisionGUID="20885e31-d159-43cf-95ac-0fcfead30612" CreationDate="2011-03-02T11:13:59.797" UserId="5813" Text="&lt;2d&gt;&lt;engine&gt;&lt;c#&gt;&lt;actionscript-3&gt;" />
  <row Id="18977" PostHistoryTypeId="25" PostId="9207" RevisionGUID="ce8f403b-c7ef-491d-bc4e-7a8d6a95a6e7" CreationDate="2011-03-02T11:23:07.723" Comment="http://twitter.com/#!/StackGameDev/status/42907783787589632" />
  <row Id="18978" PostHistoryTypeId="2" PostId="9208" RevisionGUID="74f17790-3d3e-4abe-a291-a400d67935f5" CreationDate="2011-03-02T11:40:38.243" UserId="1581" Text="I've been using [LÖVE][1] for some time now and I like it a lot. You would have to learn Lua, but it is a fun little language to learn anyway. The people at the forum are extremely helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/" />
  <row Id="18979" PostHistoryTypeId="2" PostId="9209" RevisionGUID="ca34ada4-60fe-440a-a581-42b08f04ade1" CreationDate="2011-03-02T12:33:43.200" UserId="288" Text="&quot;Game Components&quot; were a very early part of the XNA 1.0 design. They were supposed to work like controls for WinForms. The idea was that you would be able to drag-and-drop them into your game using a GUI (kind of like the bit for adding non-visual controls, like timers, etc) and set properties on them.&#xD;&#xA;&#xD;&#xA;So you could have components like maybe a Camera or a... FPS counter?... or...?&#xD;&#xA;&#xD;&#xA;You see? Unfortunately this idea doesn't really work for real-world games. The kind of components you want for a game aren't really reusable. You might have a &quot;player&quot; component, but it will be very different to every other's game's &quot;player&quot; component.&#xD;&#xA;&#xD;&#xA;I imagine it was for this reason, and for a simple lack of time, that the GUI was pulled before XNA 1.0.&#xD;&#xA;&#xD;&#xA;But the API is still usable... **Here's why you shouldn't use it:**&#xD;&#xA;&#xD;&#xA;Basically it comes down to what is easiest to write and read and debug and maintain as a game developer. Doing something like this in your loading code:&#xD;&#xA;&#xD;&#xA;    player.DrawOrder = 100;&#xD;&#xA;    enemy.DrawOrder = 200;&#xD;&#xA;&#xD;&#xA;Is much less clear than simply doing this:&#xD;&#xA;&#xD;&#xA;    virtual void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        player.Draw();&#xD;&#xA;        enemy.Draw();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Especially when, in a real-world game, you might end up with something like this:&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Viewport = cameraOne.Viewport;&#xD;&#xA;    player.Draw(cameraOne, spriteBatch);&#xD;&#xA;    enemy.Draw(cameraOne, spriteBatch);&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Viewport = cameraTwo.Viewport;&#xD;&#xA;    player.Draw(cameraTwo, spriteBatch);&#xD;&#xA;    enemy.Draw(cameraTwo, spriteBatch);&#xD;&#xA;&#xD;&#xA;(Admittedly you could share the camera and spriteBatch using the similar `Services` architecture. But that is also a bad idea for much the same reason.)&#xD;&#xA;&#xD;&#xA;This architecture - or **lack thereof** - is so much more light weight and flexible!&#xD;&#xA;&#xD;&#xA;I can easily change the draw order or add multiple viewports or add a render target effect, just by changing a few lines. To do it in the other system requires me to *think* about what all those components - spread across multiple files - are doing, and in what order.&#xD;&#xA;&#xD;&#xA;It's sort of like the difference between declarative vs imperative programming. It turns out that, for game development, imperative programming is far more preferable." />
  <row Id="18980" PostHistoryTypeId="2" PostId="9210" RevisionGUID="ba8c63cc-94a6-4212-b346-37a7a02056cf" CreationDate="2011-03-02T12:35:33.743" UserId="5815" Text="I'm working on a 3d music visualizer using Ogre3d, basically it's a spectrum analizer, a lot like the old xmms plugin:&#xD;&#xA;(http)://www.youtube.com/watch?v=_6NKBiwYN24&#xD;&#xA;&#xD;&#xA;It works well, the bars are drawn and updated, there are no framerate issues, but it crashes randomly. Sometimes it can run without problems, finish the song, other times it crashes instantly, other times the music just stops, without a crash.&#xD;&#xA;&#xD;&#xA;Here is the source code for the main class :&#xD;&#xA;&#xD;&#xA;https://github.com/balazsbela/OgreVisualizer/blob/master/src/VisualizerApplication.cpp#L221&#xD;&#xA;&#xD;&#xA;Also the crashes seem to happen less often when I display the framerate overlay from Ogre samples. Would limiting the framerate help ?&#xD;&#xA;&#xD;&#xA;The crashes are seemingly random. Is it a performance issue ?&#xD;&#xA;&#xD;&#xA;Please help me out, I'm quite lost on this one, I also posted on Ogre3d forums but I received no responses.&#xD;&#xA;&#xD;&#xA;(http)://www.ogre3d.org/forums/viewtopic.php?f=2&amp;t=63207&#xD;&#xA;&#xD;&#xA;I also tried stackoverflow: (http)://stackoverflow.com/questions/5050147/how-to-fix-ogre3d-segfault-with-std-rb-tree-insert-and-rebalance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;Backtrace:&#xD;&#xA;&#xD;&#xA;    balazsbela@darknet:~/workspace/OgreVisualizer/Release$ gdb OgreVisualizer core&#xD;&#xA;    GNU gdb (GDB) 7.2-debian&#xD;&#xA;    Copyright (C) 2010 Free Software Foundation, Inc.&#xD;&#xA;    License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;&#xD;&#xA;    This is free software: you are free to change and redistribute it.&#xD;&#xA;    There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;&#xD;&#xA;    and &quot;show warranty&quot; for details.&#xD;&#xA;    This GDB was configured as &quot;i486-linux-gnu&quot;.&#xD;&#xA;    For bug reporting instructions, please see:&#xD;&#xA;    &lt;http://www.gnu.org/software/gdb/bugs/&gt;...&#xD;&#xA;    Reading symbols from /home/balazsbela/workspace/OgreVisualizer/Release/OgreVisualizer...done.&#xD;&#xA;    [New Thread 17705]&#xD;&#xA;    [New Thread 17702]&#xD;&#xA;    [New Thread 17703]&#xD;&#xA;    [New Thread 17700]&#xD;&#xA;    Reading symbols from /usr/lib/libv4l/v4l1compat.so...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libv4l/v4l1compat.so&#xD;&#xA;    Reading symbols from /usr/local/lib/libOgreMain.so.1.7.1...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libOgreMain.so.1.7.1&#xD;&#xA;    Reading symbols from /usr/lib/libfftw3.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfftw3.so.3&#xD;&#xA;    Reading symbols from /usr/lib/libSDL_sound-1.0.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSDL_sound-1.0.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libSDL-1.2.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libSDL_mixer-1.2.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSDL_mixer-1.2.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libOIS-1.2.0.so...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libOIS-1.2.0.so&#xD;&#xA;    Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libstdc++.so.6&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libm.so.6...Reading symbols from /usr/lib/debug/lib/i686/cmov/libm-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libm.so.6&#xD;&#xA;    Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libgcc_s.so.1&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libc.so.6...Reading symbols from /usr/lib/debug/lib/i686/cmov/libc-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libc.so.6&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/i686/cmov/libpthread-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libpthread.so.0&#xD;&#xA;    Reading symbols from /usr/local/lib/libv4l1.so.0...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libv4l1.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfreetype.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libSM.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSM.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libICE.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libICE.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libX11.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXext.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXt.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXt.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXaw.so.7...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXaw.so.7&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libdl.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libdl-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libdl.so.2&#xD;&#xA;    Reading symbols from /usr/lib/libboost_thread.so.1.42.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libboost_thread.so.1.42.0&#xD;&#xA;    Reading symbols from /usr/lib/libboost_date_time.so.1.42.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libboost_date_time.so.1.42.0&#xD;&#xA;    Reading symbols from /usr/lib/libfreeimage.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfreeimage.so.3&#xD;&#xA;    Reading symbols from /usr/lib/libzzip-0.so.13...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libzzip-0.so.13&#xD;&#xA;    Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libz.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libsmpeg-0.4.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libsmpeg-0.4.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libmikmod.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libmikmod.so.2&#xD;&#xA;    Reading symbols from /usr/lib/libvorbis.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libvorbis.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libvorbisfile.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libvorbisfile.so.3&#xD;&#xA;    Reading symbols from /usr/lib/libFLAC.so.8...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libFLAC.so.8&#xD;&#xA;    Reading symbols from /usr/lib/libogg.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libogg.so.0&#xD;&#xA;    Reading symbols from /usr/lib/sse2/libspeex.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/sse2/libspeex.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libasound.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libasound.so.2&#xD;&#xA;    Reading symbols from /lib/i686/cmov/librt.so.1...Reading symbols from /usr/lib/debug/lib/i686/cmov/librt-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/librt.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libdirectfb-1.2.so.9...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libdirectfb-1.2.so.9&#xD;&#xA;    Reading symbols from /usr/lib/libfusion-1.2.so.9...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfusion-1.2.so.9&#xD;&#xA;    Reading symbols from /usr/lib/libdirect-1.2.so.9...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libdirect-1.2.so.9&#xD;&#xA;    Reading symbols from /usr/lib/libvga.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libvga.so.1&#xD;&#xA;    Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/ld-linux.so.2&#xD;&#xA;    Reading symbols from /usr/local/lib/libv4l2.so.0...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libv4l2.so.0&#xD;&#xA;    Reading symbols from /lib/libuuid.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libuuid.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libxcb.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libxcb.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXmu.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXmu.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXpm.so.4...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXpm.so.4&#xD;&#xA;    Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libjpeg.so.62&#xD;&#xA;    Reading symbols from /usr/lib/libmng.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libmng.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libopenjpeg.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libopenjpeg.so.2&#xD;&#xA;    Reading symbols from /lib/libpng12.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libpng12.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libIlmImf.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libIlmImf.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libImath.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libImath.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libHalf.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libHalf.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libIex.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libIex.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libIlmThread.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libIlmThread.so.6&#xD;&#xA;    Reading symbols from /lib/libx86.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libx86.so.1&#xD;&#xA;    Reading symbols from /usr/local/lib/libv4lconvert.so.0...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libv4lconvert.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXau.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXdmcp.so.6&#xD;&#xA;    Reading symbols from /usr/lib/liblcms.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/liblcms.so.1&#xD;&#xA;    Reading symbols from /usr/local/lib/OGRE/RenderSystem_GL.so...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/OGRE/RenderSystem_GL.so&#xD;&#xA;    Reading symbols from /usr/lib/libGLU.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libGLU.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libGL.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXrandr.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXrandr.so.2&#xD;&#xA;    Reading symbols from /usr/lib/libGLcore.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libGLcore.so.1&#xD;&#xA;    Reading symbols from /usr/lib/tls/libnvidia-tls.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/tls/libnvidia-tls.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXrender.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXrender.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXcursor.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXcursor.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXfixes.so.3&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnss_compat.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnss_compat-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnss_compat.so.2&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnsl-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnsl.so.1&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnss_nis.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnss_nis-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnss_nis.so.2&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnss_files.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnss_files-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnss_files.so.2&#xD;&#xA;    Reading symbols from /usr/lib/alsa-lib/libasound_module_rate_speexrate.so...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/alsa-lib/libasound_module_rate_speexrate.so&#xD;&#xA;    Reading symbols from /usr/lib/sse2/libspeexdsp.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/sse2/libspeexdsp.so.1&#xD;&#xA;    Core was generated by `./OgreVisualizer'.&#xD;&#xA;    Program terminated with signal 11, Segmentation fault.&#xD;&#xA;    #0  0xb6dc563d in std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&amp;) ()&#xD;&#xA;       from /usr/lib/libstdc++.so.6&#xD;&#xA;    (gdb) bt&#xD;&#xA;    #0  0xb6dc563d in std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&amp;) ()&#xD;&#xA;       from /usr/lib/libstdc++.so.6&#xD;&#xA;    #1  0xb73bb3c2 in std::_Rb_tree&lt;Ogre::Node*, Ogre::Node*, std::_Identity&lt;Ogre::Node*&gt;, std::less&lt;Ogre::Node*&gt;, Ogre::STLAllocator&lt;Ogre::Node*, Ogre::CategorisedAllocPolicy&lt;(Ogre::MemoryCategory)0&gt; &gt; &gt;::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, Ogre::Node* const&amp;) ()&#xD;&#xA;       from /usr/local/lib/libOgreMain.so.1.7.1&#xD;&#xA;    #2  0xb73b5a52 in _M_insert_unique (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false) at /usr/include/c++/4.4/bits/stl_tree.h:1182&#xD;&#xA;    #3  insert (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false) at /usr/include/c++/4.4/bits/stl_set.h:411&#xD;&#xA;    #4  Ogre::Node::requestUpdate (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false)&#xD;&#xA;        at /home/balazsbela/Downloads/ogre_src_v1-7-1/OgreMain/src/OgreNode.cpp:805&#xD;&#xA;    #5  0xb73b6a40 in Ogre::Node::needUpdate (this=0xb616aff8, forceParentUpdate=92)&#xD;&#xA;        at /home/balazsbela/Downloads/ogre_src_v1-7-1/OgreMain/src/OgreNode.cpp:789&#xD;&#xA;    #6  0xb73b5038 in Ogre::Node::setScale (this=0x1825c, scale=...) at /home/balazsbela/Downloads/ogre_src_v1-7-1/OgreMain/src/OgreNode.cpp:638&#xD;&#xA;    #7  0x0805d306 in VisualizerApplication::adjustNodes (this=0x9cd4808) at ../src/VisualizerApplication.cpp:236&#xD;&#xA;    #8  0xb6e867f0 in ?? () from /usr/lib/libSDL_mixer-1.2.so.0&#xD;&#xA;    #9  0xb6e8719a in ?? () from /usr/lib/libSDL_mixer-1.2.so.0&#xD;&#xA;    #10 0xb6ed9b0d in ?? () from /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    #11 0xb6ee185e in ?? () from /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    #12 0xb6f2e0bd in ?? () from /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    #13 0xb6bc7955 in start_thread (arg=0xb198ab70) at pthread_create.c:300&#xD;&#xA;    #14 0xb6ca6e7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130&#xD;&#xA;    (gdb) &#xD;&#xA;&#xD;&#xA;Ogre.log: (http)://pastie.org/1581790" />
  <row Id="18981" PostHistoryTypeId="1" PostId="9210" RevisionGUID="ba8c63cc-94a6-4212-b346-37a7a02056cf" CreationDate="2011-03-02T12:35:33.743" UserId="5815" Text="How to fix Ogre3d segfault with std::_Rb_tree_insert_and_rebalance ?" />
  <row Id="18982" PostHistoryTypeId="3" PostId="9210" RevisionGUID="ba8c63cc-94a6-4212-b346-37a7a02056cf" CreationDate="2011-03-02T12:35:33.743" UserId="5815" Text="&lt;c++&gt;&lt;ogre&gt;" />
  <row Id="18983" PostHistoryTypeId="2" PostId="9211" RevisionGUID="1668cf02-3347-45f4-b861-402b4c0304b7" CreationDate="2011-03-02T12:56:08.163" UserId="2073" Text="Try [SFML][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sfml-dev.org" />
  <row Id="18984" PostHistoryTypeId="2" PostId="9212" RevisionGUID="55615bad-f70d-4f3e-9bff-7d1769912d4c" CreationDate="2011-03-02T12:58:00.237" UserId="1628" Text="**tl;dr:** *What economic/computer science books would you suggest for learning about economic valuation of goods and simulations thereof?*&#xD;&#xA;&#xD;&#xA;I'm looking to create an economic model for a game based on goods created procedurally.&#xD;&#xA;&#xD;&#xA;Every natural resource and produced good would be procedurally generated, with certain goods being assigned certain uses.&#xD;&#xA;&#xD;&#xA;&gt; Fakesium might be used for the&#xD;&#xA;&gt; production of Weapon A and produced&#xD;&#xA;&gt; from Fakesium factories which use&#xD;&#xA;&gt; Dilithium and Widgets as reagents,&#xD;&#xA;&gt; where Widgets are also the product of Foo&#xD;&#xA;&gt; and Bar&#xD;&#xA;&#xD;&#xA;The problem is not creating the resources and their various production utlities - but getting the game's AI empires and merchants to correctly value the goods according to their scarcity, utility and production costs.&#xD;&#xA;&#xD;&#xA;I need to create a simulation of goods which allows the various game factions to assign a common value denominator (credits) to each resource, depending on how much its worth to that empire.&#xD;&#xA;&#xD;&#xA;I see the simulation being something like: &quot;I have a high requirement for Weapon A. Since I don't have much of Fakesium, which is needed for Weapon A - I must have a high demand for Fakesium. If I can acquire Fakesium, devalue it. If not, increase its value - and also increase demand for Dilithium and Widgets too.&quot;&#xD;&#xA;&#xD;&#xA;This is very naive - because it may be much much cheaper for the empire to simply purchase Dilithium and Widgets directly rather than purchasing Fakesium, for example. Another example is two resources might allow the creation of Weapon A (Fakesium and Lieron), so we'd need to consider that. I've been scratching my head over the problem and it keeps growing.&#xD;&#xA;&#xD;&#xA;By the time the player joins the world, I'd expect enough iterations of this process to have occurred that prices would have largely normalised - and would then only trigger rarely to compensate for major changes (eg. if the player blows up the world's only Foo mine!)&#xD;&#xA;&#xD;&#xA;Could anyone suggest resources (books, largely) which outline this style of modelling, preferably in the context of simulations? Since this problem would never occur outside fantasy worlds, I figured this is probably the most likely place to find people who have encountered similar problems and I'm sure there's people who know of good places for Games Developers to start looking at less specific economic theory too.&#xD;&#xA;&#xD;&#xA;Additionally, does anyone know of any developers with blogs whose games or research applications perform similar modelling?" />
  <row Id="18985" PostHistoryTypeId="1" PostId="9212" RevisionGUID="55615bad-f70d-4f3e-9bff-7d1769912d4c" CreationDate="2011-03-02T12:58:00.237" UserId="1628" Text="Economic modelling - Resources for valuing goods" />
  <row Id="18986" PostHistoryTypeId="3" PostId="9212" RevisionGUID="55615bad-f70d-4f3e-9bff-7d1769912d4c" CreationDate="2011-03-02T12:58:00.237" UserId="1628" Text="&lt;simulations&gt;&lt;economy&gt;&lt;goods&gt;&lt;modelling&gt;" />
  <row Id="18987" PostHistoryTypeId="25" PostId="9212" RevisionGUID="170e52b3-b415-4fb5-b5d6-441654428302" CreationDate="2011-03-02T14:23:07.397" Comment="http://twitter.com/#!/StackGameDev/status/42953081821999104" />
  <row Id="18988" PostHistoryTypeId="2" PostId="9213" RevisionGUID="977fa3cc-6cfb-41df-94ae-e819fb7ab1bc" CreationDate="2011-03-02T14:26:07.637" UserId="5813" Text="I decided to go with Flash. The new MoleHill 3D Api can be used to draw 2D sprites in 3D space a lot faster aswell. I see no reason why Flash shouldn't be fast enough for the game I described earlier. I'll have to build the tools myself, but I would have probably needed to do that anyway. Using AIR to build tools is also pretty neat in my opinion. Flash also has the widest reach with platforms, which is cool." />
  <row Id="18989" PostHistoryTypeId="2" PostId="9214" RevisionGUID="fd0ce79d-aeeb-45d4-838e-4e3285a33d1c" CreationDate="2011-03-02T14:37:21.080" UserId="5006" Text="So say you have a 2 player game, taking Chess as an example (except it's an original game with no ready-to-go AI available).  &#xD;&#xA;&#xD;&#xA;Let's say there's also a social-aspect to the meta-game, so let's say it's a Chess game on Facebook where you can challenge your friends.&#xD;&#xA;&#xD;&#xA;How important is it to have a single-player mode, knowing that an AI will need to be created (I've done minimax AI for tic tac toe, but nothing too sophisticated)?  &#xD;&#xA;&#xD;&#xA;Is it important enough that it should be in the initial launch of the game? &#xD;&#xA;&#xD;&#xA;Can it wait for a future iteration (knowing that being hosted on the web means the game can be updated at any time)?" />
  <row Id="18990" PostHistoryTypeId="1" PostId="9214" RevisionGUID="fd0ce79d-aeeb-45d4-838e-4e3285a33d1c" CreationDate="2011-03-02T14:37:21.080" UserId="5006" Text="How important is a single-player mode in a 2-player game?" />
  <row Id="18991" PostHistoryTypeId="3" PostId="9214" RevisionGUID="fd0ce79d-aeeb-45d4-838e-4e3285a33d1c" CreationDate="2011-03-02T14:37:21.080" UserId="5006" Text="&lt;ai&gt;&lt;multiplayer&gt;" />
  <row Id="18992" PostHistoryTypeId="2" PostId="9215" RevisionGUID="20db383a-9040-42c9-b87c-dc9b5dd0ebee" CreationDate="2011-03-02T14:55:51.820" UserId="2437" Text="After searching for a long time, I'm surprised this question was not asked yet. In a 2D, tiled-map game, how do you handle the map ? I'd be glad to have your point of view in any languages, though I'm more interested in C++ implementations.&#xD;&#xA;&#xD;&#xA;A 2D array, a 2D vector, a class handling a linked-list with ad hoc computing to handle coordinates, a boost::matrix... ? What solution do you use and why ?" />
  <row Id="18993" PostHistoryTypeId="1" PostId="9215" RevisionGUID="20db383a-9040-42c9-b87c-dc9b5dd0ebee" CreationDate="2011-03-02T14:55:51.820" UserId="2437" Text="Alternative to 2D array in a tiled-map structure" />
  <row Id="18994" PostHistoryTypeId="3" PostId="9215" RevisionGUID="20db383a-9040-42c9-b87c-dc9b5dd0ebee" CreationDate="2011-03-02T14:55:51.820" UserId="2437" Text="&lt;c++&gt;&lt;tiles&gt;&lt;data-structure&gt;&lt;maps&gt;" />
  <row Id="18995" PostHistoryTypeId="2" PostId="9216" RevisionGUID="ece16258-6626-4993-8261-becc6892f7f8" CreationDate="2011-03-02T14:58:11.103" UserId="5797" Text="I would skim through any Applied Calculus for Business textbooks. The examples and exercises will be helpful. You will be surprised that the business case you described happens ALL the time outside of gaming. &#xD;&#xA;Then proceed to Numerical Sciences or Management Sciences textbooks. That is where your solution eventually lies. " />
  <row Id="18996" PostHistoryTypeId="2" PostId="9217" RevisionGUID="a77a2ca2-99f9-49e1-be76-01c9a37fe7fe" CreationDate="2011-03-02T14:59:48.420" UserId="382" Text="It's going to depend on how your users are going to find opponents.&#xD;&#xA;&#xD;&#xA;If they need to pick off a friends list (say) then you need to have mechanisms for players to invite friends etc. In this case when there might not be a lot of players having an AI opponent will at least allow someone to play the game.&#xD;&#xA;&#xD;&#xA;However, if they can pick a player at random (or get assigned a player at random) then having AI is less important as (hopefully) there will be enough players on line so that someone will be able to find an opponent.&#xD;&#xA;&#xD;&#xA;Having said all that, having a computer opponent will allow players to practice the game." />
  <row Id="18998" PostHistoryTypeId="2" PostId="9219" RevisionGUID="f70c056d-6a54-4a42-b290-01168d03fe21" CreationDate="2011-03-02T15:02:03.657" UserId="5818" Text="Your should be careful launching a game that will not be able to please the user right away. Your game idea and -play could be fantastic but if your initial user base cannot get the game started because they don't have a friend sitting next to them, or because not enough players is queuing the your match making system then the user be dissatisfied. Moreover there is little chance the user will recommend the game or come back to try your game once you improve the game or add the ability to actually get into a match.&#xD;&#xA;&#xD;&#xA;So, if you're launching a MP game, then you have to make sure that it will have enough players available so that people always can get into a match. In case of a Facebook game this is not so much an issue since you have the ability to invite the users friends to the game.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="18999" PostHistoryTypeId="2" PostId="9220" RevisionGUID="99179f59-e6b3-42e1-9a3d-24deb4a2e2b9" CreationDate="2011-03-02T15:08:20.300" UserId="1929" Text="Games are hard to build. Big games are even harder to build. I've decided that to be able to make big games, I need to start building smaller games, and building up an asset base of code, assets (graphics, sounds), tools, and most importantly, game engines, so that I can eventually get there. One game at a time.&#xD;&#xA;&#xD;&#xA;Let me give an analogy. To build an MMO 3D RPG, I would approach this by building and releasing small games with increasingly more features. This could entail, for example:&#xD;&#xA;&#xD;&#xA;- A simple 2D game&#xD;&#xA;- A tile-based game&#xD;&#xA;- A game with RPG elements (items, equipment, monsters, battle)&#xD;&#xA;- A full-fledged RPG&#xD;&#xA;- A 3D RPG&#xD;&#xA;&#xD;&#xA;The problem now is if I have to change platforms or tools, I don't know **how to leverage past code-bases (and experience) to start with a mature product.**&#xD;&#xA;&#xD;&#xA;Right now, I'm writing Silverlight (FlatRedBall) games. Let's say I stick with this for ten years, and then suddenly decide to write a PS6 game, which is in a different programming language entirely.&#xD;&#xA;&#xD;&#xA;Granted, I have ten years of game-development experience (and correspondingly ten years of professional software development experience from my day job) to back me up.&#xD;&#xA;&#xD;&#xA;But I would still like *some way to transplant that 2D RPG engine into the new programming language,* or else leverage it somehow.&#xD;&#xA;&#xD;&#xA;Is this even possible? What are my options?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19000" PostHistoryTypeId="1" PostId="9220" RevisionGUID="99179f59-e6b3-42e1-9a3d-24deb4a2e2b9" CreationDate="2011-03-02T15:08:20.300" UserId="1929" Text="Leveraging Code in Ever Bigger Games" />
  <row Id="19001" PostHistoryTypeId="3" PostId="9220" RevisionGUID="99179f59-e6b3-42e1-9a3d-24deb4a2e2b9" CreationDate="2011-03-02T15:08:20.300" UserId="1929" Text="&lt;engine&gt;&lt;architecture&gt;" />
  <row Id="19002" PostHistoryTypeId="2" PostId="9221" RevisionGUID="f02997d0-8213-453f-8272-d320c4c7d84b" CreationDate="2011-03-02T15:24:38.967" UserId="4296" Text="It would depend on the style of game and map honestly.  For a relatively small rectangular tile map, I'd probably just stick with a 2d array.  If the map was very irregularly shaped (lots of empty gaps), a wrapper around linked lists that provides O(1) indexing would probably be my choice.&#xD;&#xA;&#xD;&#xA;An integer indexed array gives you a 2147483647^2 2d array.  That's pretty big, but exceeds what you'd what to load into memory.  If the map was to be large scale, another thing to look at is a quad-tree.  Each quad contains a sub-array of tiles that could be loaded/unloaded as needed to keep memory lower." />
  <row Id="19003" PostHistoryTypeId="2" PostId="9222" RevisionGUID="151a7570-06a7-4c11-b5aa-cd2a2d2816ac" CreationDate="2011-03-02T15:25:48.543" UserId="4413" Text="I'm surprised no one suggested http://PyGame.org since you already now Python.&#xD;&#xA;&#xD;&#xA;Flash/Unity will get your game on the web, though those are proprietary technologies and I would not recommend it for hobby game development - not a lot of hobbyists have the resources to learn non-free tools.&#xD;&#xA;&#xD;&#xA;If you are adventurous you might want to try any of the new html5 game engines (those will become feasible to deploy in the coming years): https://github.com/bebraw/jswiki/wiki/Game-Engines" />
  <row Id="19004" PostHistoryTypeId="5" PostId="9220" RevisionGUID="66aa5fb6-f502-4508-ac51-e490c492b6d4" CreationDate="2011-03-02T15:26:23.857" UserId="1929" Comment="added 341 characters in body" Text="**Summary:** The same way that I continually build complex engines and libraries within a single platform and technology to allow me to build increasingly bigger and better games, **how to continue this when development crosses into different platforms?** If I switch platforms, how do I leverage past code and experiences?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Games are hard to build. Big games are even harder to build. I've decided that to be able to make big games, I need to start building smaller games, and building up an asset base of code, assets (graphics, sounds), tools, and most importantly, game engines, so that I can eventually get there. One game at a time.&#xD;&#xA;&#xD;&#xA;Let me give an analogy. To build an MMO 3D RPG, I would approach this by building and releasing small games with increasingly more features. This could entail, for example:&#xD;&#xA;&#xD;&#xA;- A simple 2D game&#xD;&#xA;- A tile-based game&#xD;&#xA;- A game with RPG elements (items, equipment, monsters, battle)&#xD;&#xA;- A full-fledged RPG&#xD;&#xA;- A 3D RPG&#xD;&#xA;&#xD;&#xA;The problem now is if I have to change platforms or tools, I don't know **how to leverage past code-bases (and experience) to start with a mature product.**&#xD;&#xA;&#xD;&#xA;Right now, I'm writing Silverlight (FlatRedBall) games. Let's say I stick with this for ten years, and then suddenly decide to write a PS6 game, which is in a different programming language entirely.&#xD;&#xA;&#xD;&#xA;Granted, I have ten years of game-development experience (and correspondingly ten years of professional software development experience from my day job) to back me up.&#xD;&#xA;&#xD;&#xA;But I would still like *some way to transplant that 2D RPG engine into the new programming language,* or else leverage it somehow.&#xD;&#xA;&#xD;&#xA;Is this even possible? What are my options?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19005" PostHistoryTypeId="2" PostId="9223" RevisionGUID="be4b0fce-9126-4d2b-9cdb-a3fe6a4fc12a" CreationDate="2011-03-02T15:31:46.243" UserId="1742" Text="I'll explain what I do for a specific case of tiled maps: this is for effectively infinite maps, ones where the world is generated on demand but you need to save modifications to it:&#xD;&#xA;&#xD;&#xA;I define some cell size &quot;N&quot; and split the world up into squares/cubes &quot;NxN&quot; or &quot;NxNxN&quot;&#xD;&#xA;&#xD;&#xA;A cell will have a unique key. I generate mine by hashing or using directly the formatted string:&quot;%i,%i,%i&quot;,x,y,z (where x,y,z are the world coordinates of the start of the cell divided by N)&#xD;&#xA;&#xD;&#xA;Storing the tiles indices in arrays is straightforward as you know you have NxN tiles or NxNxN tiles. You also know how many bits your tile type takes up. Just use a linear array. It makes loading and saving/releasing the cells simpler to handle too.&#xD;&#xA;&#xD;&#xA;Any accessor merely needs to generate the key for the cell (to make sure it's loaded/generated, then get the pointer to it), then use a sub index to look inside that cell. to find the tile value at that specific point.&#xD;&#xA;&#xD;&#xA;Extracting the cell by its key, I currently use a map/dictionary as generally I process whole cells at once (wouldn't want to know how bad a hit it would be to do a dictionary lookup per tile, eek).&#xD;&#xA;&#xD;&#xA;Another point, I don't keep mobs / players in the cell data. The actively dynamic stuff needs its own system." />
  <row Id="19006" PostHistoryTypeId="2" PostId="9224" RevisionGUID="e01277e2-8986-439e-9ef8-e0abac892709" CreationDate="2011-03-02T15:38:56.347" UserId="2239" Text="If you look at how you do business systems I don't think there's much difference in this regard.&#xD;&#xA;&#xD;&#xA;Abstract and layer everything as cleanly as possible so you can reuse interfaces and libraries later on, making the games as modular as possible. Write your game code against an engine layer that isn't hardwired to run on a specific platform.&#xD;&#xA;&#xD;&#xA;Use scripting languages as much as possible and just write or add the script interpreter to each new platform, reusing script logic.&#xD;&#xA;&#xD;&#xA;Design your tools to be as generic as possible and with flexible content formats. Reuse the tools and content pipelines and only re-implement the platform specific parts." />
  <row Id="19007" PostHistoryTypeId="2" PostId="9225" RevisionGUID="fe8e6ae8-b088-425f-a4d4-6fc32aaf95ed" CreationDate="2011-03-02T15:42:14.090" UserId="5508" Text="You could try to use an interpreted language combined with some small native components for hardware specific bits. By using Python, for example, you only need to recode native language extensions that interact with the hardware directly, while sticking to the same API on the Python side. This allows you to code your game logic, asset loading and rendering once in Python and reuse them as long as you manage to get the Python interpreter and your extensions operational on the new system.&#xD;&#xA;&#xD;&#xA;All-in-all, I think that a game engine should be very hardware and language specific so it can pull off cpu or gpu intensive feats. I would want to build or buy a new engine when migrating to another language or system, so you can benefit from the optimizations they offer. &#xD;&#xA;&#xD;&#xA;You do have good options for your other systems, though:&#xD;&#xA;&#xD;&#xA;* Game logic can be written in an interpreted language that is supported by or built into the new engine&#xD;&#xA;* Assets are already pretty portable, again, as long as the engine supports them or you have converters for them&#xD;&#xA;* Tools do not need to be written in the same language as the engine is written in as long as they communicate or export in way understandable by the engine (again converters can solve this problem)&#xD;&#xA;&#xD;&#xA;The bottom line is that you will never be able to fully transplant an engine 'as-is' to a different platform or language. You always need some kind of layer or wrapper that translates the platform/language calls into engine calls and vice versa." />
  <row Id="19008" PostHistoryTypeId="2" PostId="9226" RevisionGUID="631ad442-6819-4314-a4a9-2382ba933c2b" CreationDate="2011-03-02T15:44:30.913" UserId="1742" Text="The idea that you won't be able to take libraries of code and use them again, or use them on multiple projects because the language doesn't match, or the design is partially within the implementation is consistently misjudged in games development.&#xD;&#xA;&#xD;&#xA;While developing projects across different languages, the inability to reuse source code is significant, but also inappropriate when considering the true meaning of reusability.&#xD;&#xA;&#xD;&#xA;Reusability is not concerned in reusing source files, not even in particular languages, but the ability to maintain an invenstment in information. A wealth of knowledge for the entity that owns the development IP.&#xD;&#xA;&#xD;&#xA;Copyright law has made it hard to see what resources have value in reuse, as it maintains the source as the object of it's discussion rather than the intellectual property represented by the source. The reason for this is that ideas cannot be copyrighted, so by maintaining this stance, the copyrighter keeps hold of this tenuous link to a right to withold information. Reusability across the language gap comes from being aware of the information contained within the medium it is stored. In our case, it is normally stored as source code, but the information is not the source code.&#xD;&#xA;&#xD;&#xA;With same-language ports, the source can be adapted to any project we wish to venture. However, the source is not the information. The information is the order and existence of tasks that can and will be performed on data. This view of information leads to an understanding that any reusability is an adaptation from one set of temporally coupled tasks into a new framework.&#xD;&#xA;&#xD;&#xA;So, even though you want to move from one language to another, or one platform to another, and the code doesn't appear resuable on the outside, the fact is that it contains a wealth of information in a readable form. In fact, porting between languages can often show up bugs that have been present for years." />
  <row Id="19009" PostHistoryTypeId="2" PostId="9227" RevisionGUID="62403182-ef43-4df8-a0b8-e9684e35f2b7" CreationDate="2011-03-02T16:09:23.810" UserId="744" Text="Standard C++ containers do not offer guarantees of threadsafety, and I don't think OgreNodes do either. You're probably adjusting the node at the same time Ogre is doing something with it in a different thread.&#xD;&#xA;&#xD;&#xA;You also have a double delete and leave behind a stale pointer in ~VisualizerApplication. Fix it by not making it a singleton. Just... don't use singletons. &lt;a href=&quot;http://www.google.com/search?q=singleton+sucks&quot;&gt;Ever.&lt;/a&gt;" />
  <row Id="19010" PostHistoryTypeId="5" PostId="9212" RevisionGUID="10e94991-819c-4db6-8c06-6cb8473d5d80" CreationDate="2011-03-02T16:10:38.393" UserId="744" Comment="&quot;tl;dr&quot; is the worst thing to happen to the web." Text="I'm looking to create an economic model for a game based on goods created procedurally.&#xD;&#xA;&#xD;&#xA;Every natural resource and produced good would be procedurally generated, with certain goods being assigned certain uses.&#xD;&#xA;&#xD;&#xA;&gt; Fakesium might be used for the&#xD;&#xA;&gt; production of Weapon A and produced&#xD;&#xA;&gt; from Fakesium factories which use&#xD;&#xA;&gt; Dilithium and Widgets as reagents,&#xD;&#xA;&gt; where Widgets are also the product of Foo&#xD;&#xA;&gt; and Bar&#xD;&#xA;&#xD;&#xA;The problem is not creating the resources and their various production utlities - but getting the game's AI empires and merchants to correctly value the goods according to their scarcity, utility and production costs.&#xD;&#xA;&#xD;&#xA;I need to create a simulation of goods which allows the various game factions to assign a common value denominator (credits) to each resource, depending on how much its worth to that empire.&#xD;&#xA;&#xD;&#xA;I see the simulation being something like: &quot;I have a high requirement for Weapon A. Since I don't have much of Fakesium, which is needed for Weapon A - I must have a high demand for Fakesium. If I can acquire Fakesium, devalue it. If not, increase its value - and also increase demand for Dilithium and Widgets too.&quot;&#xD;&#xA;&#xD;&#xA;This is very naive - because it may be much much cheaper for the empire to simply purchase Dilithium and Widgets directly rather than purchasing Fakesium, for example. Another example is two resources might allow the creation of Weapon A (Fakesium and Lieron), so we'd need to consider that. I've been scratching my head over the problem and it keeps growing.&#xD;&#xA;&#xD;&#xA;By the time the player joins the world, I'd expect enough iterations of this process to have occurred that prices would have largely normalised - and would then only trigger rarely to compensate for major changes (eg. if the player blows up the world's only Foo mine!)&#xD;&#xA;&#xD;&#xA;Could anyone suggest resources (books, largely) which outline this style of modelling, preferably in the context of simulations? Since this problem would never occur outside fantasy worlds, I figured this is probably the most likely place to find people who have encountered similar problems and I'm sure there's people who know of good places for Games Developers to start looking at less specific economic theory too.&#xD;&#xA;&#xD;&#xA;Additionally, does anyone know of any developers with blogs whose games or research applications perform similar modelling?" />
  <row Id="19011" PostHistoryTypeId="4" PostId="9212" RevisionGUID="10e94991-819c-4db6-8c06-6cb8473d5d80" CreationDate="2011-03-02T16:10:38.393" UserId="744" Comment="&quot;tl;dr&quot; is the worst thing to happen to the web." Text="What economic/computer science books would you suggest for learning about economic valuation of goods and simulations thereof?" />
  <row Id="19012" PostHistoryTypeId="4" PostId="9220" RevisionGUID="7ab93380-09e0-471c-9303-e425772b1787" CreationDate="2011-03-02T16:10:57.390" UserId="1929" Comment="edited title" Text="Leveraging Code Across Platforms in Ever Bigger Games" />
  <row Id="19013" PostHistoryTypeId="5" PostId="9210" RevisionGUID="15c38f20-826d-4f88-83b3-9c59f902734f" CreationDate="2011-03-02T16:30:10.580" UserId="14" Comment="deleted 38 characters in body" Text="I'm working on a 3d music visualizer using Ogre3d, basically it's a spectrum analizer, a lot like the old xmms plugin:&#xD;&#xA;http://www.youtube.com/watch?v=_6NKBiwYN24&#xD;&#xA;&#xD;&#xA;It works well, the bars are drawn and updated, there are no framerate issues, but it crashes randomly. Sometimes it can run without problems, finish the song, other times it crashes instantly, other times the music just stops, without a crash.&#xD;&#xA;&#xD;&#xA;Here is the source code for the main class :&#xD;&#xA;&#xD;&#xA;https://github.com/balazsbela/OgreVisualizer/blob/master/src/VisualizerApplication.cpp#L221&#xD;&#xA;&#xD;&#xA;Also the crashes seem to happen less often when I display the framerate overlay from Ogre samples. Would limiting the framerate help ?&#xD;&#xA;&#xD;&#xA;The crashes are seemingly random. Is it a performance issue ?&#xD;&#xA;&#xD;&#xA;Please help me out, I'm quite lost on this one, I also posted on Ogre3d forums but I received no responses.&#xD;&#xA;&#xD;&#xA;http://www.ogre3d.org/forums/viewtopic.php?f=2&amp;t=63207&#xD;&#xA;&#xD;&#xA;I also tried stackoverflow: http://stackoverflow.com/questions/5050147/how-to-fix-ogre3d-segfault-with-std-rb-tree-insert-and-rebalance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Backtrace:&#xD;&#xA;&#xD;&#xA;    balazsbela@darknet:~/workspace/OgreVisualizer/Release$ gdb OgreVisualizer core&#xD;&#xA;    GNU gdb (GDB) 7.2-debian&#xD;&#xA;    Copyright (C) 2010 Free Software Foundation, Inc.&#xD;&#xA;    License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;&#xD;&#xA;    This is free software: you are free to change and redistribute it.&#xD;&#xA;    There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;&#xD;&#xA;    and &quot;show warranty&quot; for details.&#xD;&#xA;    This GDB was configured as &quot;i486-linux-gnu&quot;.&#xD;&#xA;    For bug reporting instructions, please see:&#xD;&#xA;    &lt;http://www.gnu.org/software/gdb/bugs/&gt;...&#xD;&#xA;    Reading symbols from /home/balazsbela/workspace/OgreVisualizer/Release/OgreVisualizer...done.&#xD;&#xA;    [New Thread 17705]&#xD;&#xA;    [New Thread 17702]&#xD;&#xA;    [New Thread 17703]&#xD;&#xA;    [New Thread 17700]&#xD;&#xA;    Reading symbols from /usr/lib/libv4l/v4l1compat.so...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libv4l/v4l1compat.so&#xD;&#xA;    Reading symbols from /usr/local/lib/libOgreMain.so.1.7.1...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libOgreMain.so.1.7.1&#xD;&#xA;    Reading symbols from /usr/lib/libfftw3.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfftw3.so.3&#xD;&#xA;    Reading symbols from /usr/lib/libSDL_sound-1.0.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSDL_sound-1.0.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libSDL-1.2.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libSDL_mixer-1.2.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSDL_mixer-1.2.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libOIS-1.2.0.so...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libOIS-1.2.0.so&#xD;&#xA;    Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libstdc++.so.6&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libm.so.6...Reading symbols from /usr/lib/debug/lib/i686/cmov/libm-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libm.so.6&#xD;&#xA;    Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libgcc_s.so.1&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libc.so.6...Reading symbols from /usr/lib/debug/lib/i686/cmov/libc-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libc.so.6&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/i686/cmov/libpthread-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libpthread.so.0&#xD;&#xA;    Reading symbols from /usr/local/lib/libv4l1.so.0...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libv4l1.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfreetype.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libSM.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libSM.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libICE.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libICE.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libX11.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXext.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXt.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXt.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXaw.so.7...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXaw.so.7&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libdl.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libdl-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libdl.so.2&#xD;&#xA;    Reading symbols from /usr/lib/libboost_thread.so.1.42.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libboost_thread.so.1.42.0&#xD;&#xA;    Reading symbols from /usr/lib/libboost_date_time.so.1.42.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libboost_date_time.so.1.42.0&#xD;&#xA;    Reading symbols from /usr/lib/libfreeimage.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfreeimage.so.3&#xD;&#xA;    Reading symbols from /usr/lib/libzzip-0.so.13...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libzzip-0.so.13&#xD;&#xA;    Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libz.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libsmpeg-0.4.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libsmpeg-0.4.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libmikmod.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libmikmod.so.2&#xD;&#xA;    Reading symbols from /usr/lib/libvorbis.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libvorbis.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libvorbisfile.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libvorbisfile.so.3&#xD;&#xA;    Reading symbols from /usr/lib/libFLAC.so.8...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libFLAC.so.8&#xD;&#xA;    Reading symbols from /usr/lib/libogg.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libogg.so.0&#xD;&#xA;    Reading symbols from /usr/lib/sse2/libspeex.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/sse2/libspeex.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libasound.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libasound.so.2&#xD;&#xA;    Reading symbols from /lib/i686/cmov/librt.so.1...Reading symbols from /usr/lib/debug/lib/i686/cmov/librt-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/librt.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libdirectfb-1.2.so.9...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libdirectfb-1.2.so.9&#xD;&#xA;    Reading symbols from /usr/lib/libfusion-1.2.so.9...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libfusion-1.2.so.9&#xD;&#xA;    Reading symbols from /usr/lib/libdirect-1.2.so.9...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libdirect-1.2.so.9&#xD;&#xA;    Reading symbols from /usr/lib/libvga.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libvga.so.1&#xD;&#xA;    Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/ld-linux.so.2&#xD;&#xA;    Reading symbols from /usr/local/lib/libv4l2.so.0...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libv4l2.so.0&#xD;&#xA;    Reading symbols from /lib/libuuid.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libuuid.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libxcb.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libxcb.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXmu.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXmu.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXpm.so.4...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXpm.so.4&#xD;&#xA;    Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libjpeg.so.62&#xD;&#xA;    Reading symbols from /usr/lib/libmng.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libmng.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libopenjpeg.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libopenjpeg.so.2&#xD;&#xA;    Reading symbols from /lib/libpng12.so.0...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libpng12.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libIlmImf.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libIlmImf.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libImath.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libImath.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libHalf.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libHalf.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libIex.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libIex.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libIlmThread.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libIlmThread.so.6&#xD;&#xA;    Reading symbols from /lib/libx86.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /lib/libx86.so.1&#xD;&#xA;    Reading symbols from /usr/local/lib/libv4lconvert.so.0...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/libv4lconvert.so.0&#xD;&#xA;    Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXau.so.6&#xD;&#xA;    Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXdmcp.so.6&#xD;&#xA;    Reading symbols from /usr/lib/liblcms.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/liblcms.so.1&#xD;&#xA;    Reading symbols from /usr/local/lib/OGRE/RenderSystem_GL.so...done.&#xD;&#xA;    Loaded symbols for /usr/local/lib/OGRE/RenderSystem_GL.so&#xD;&#xA;    Reading symbols from /usr/lib/libGLU.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libGLU.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libGL.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXrandr.so.2...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXrandr.so.2&#xD;&#xA;    Reading symbols from /usr/lib/libGLcore.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libGLcore.so.1&#xD;&#xA;    Reading symbols from /usr/lib/tls/libnvidia-tls.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/tls/libnvidia-tls.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXrender.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXrender.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXcursor.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXcursor.so.1&#xD;&#xA;    Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/libXfixes.so.3&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnss_compat.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnss_compat-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnss_compat.so.2&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnsl-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnsl.so.1&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnss_nis.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnss_nis-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnss_nis.so.2&#xD;&#xA;    Reading symbols from /lib/i686/cmov/libnss_files.so.2...Reading symbols from /usr/lib/debug/lib/i686/cmov/libnss_files-2.11.2.so...done.&#xD;&#xA;    done.&#xD;&#xA;    Loaded symbols for /lib/i686/cmov/libnss_files.so.2&#xD;&#xA;    Reading symbols from /usr/lib/alsa-lib/libasound_module_rate_speexrate.so...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/alsa-lib/libasound_module_rate_speexrate.so&#xD;&#xA;    Reading symbols from /usr/lib/sse2/libspeexdsp.so.1...(no debugging symbols found)...done.&#xD;&#xA;    Loaded symbols for /usr/lib/sse2/libspeexdsp.so.1&#xD;&#xA;    Core was generated by `./OgreVisualizer'.&#xD;&#xA;    Program terminated with signal 11, Segmentation fault.&#xD;&#xA;    #0  0xb6dc563d in std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&amp;) ()&#xD;&#xA;       from /usr/lib/libstdc++.so.6&#xD;&#xA;    (gdb) bt&#xD;&#xA;    #0  0xb6dc563d in std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&amp;) ()&#xD;&#xA;       from /usr/lib/libstdc++.so.6&#xD;&#xA;    #1  0xb73bb3c2 in std::_Rb_tree&lt;Ogre::Node*, Ogre::Node*, std::_Identity&lt;Ogre::Node*&gt;, std::less&lt;Ogre::Node*&gt;, Ogre::STLAllocator&lt;Ogre::Node*, Ogre::CategorisedAllocPolicy&lt;(Ogre::MemoryCategory)0&gt; &gt; &gt;::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, Ogre::Node* const&amp;) ()&#xD;&#xA;       from /usr/local/lib/libOgreMain.so.1.7.1&#xD;&#xA;    #2  0xb73b5a52 in _M_insert_unique (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false) at /usr/include/c++/4.4/bits/stl_tree.h:1182&#xD;&#xA;    #3  insert (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false) at /usr/include/c++/4.4/bits/stl_set.h:411&#xD;&#xA;    #4  Ogre::Node::requestUpdate (this=0xb6157ea0, child=0xb616aff8, forceParentUpdate=false)&#xD;&#xA;        at /home/balazsbela/Downloads/ogre_src_v1-7-1/OgreMain/src/OgreNode.cpp:805&#xD;&#xA;    #5  0xb73b6a40 in Ogre::Node::needUpdate (this=0xb616aff8, forceParentUpdate=92)&#xD;&#xA;        at /home/balazsbela/Downloads/ogre_src_v1-7-1/OgreMain/src/OgreNode.cpp:789&#xD;&#xA;    #6  0xb73b5038 in Ogre::Node::setScale (this=0x1825c, scale=...) at /home/balazsbela/Downloads/ogre_src_v1-7-1/OgreMain/src/OgreNode.cpp:638&#xD;&#xA;    #7  0x0805d306 in VisualizerApplication::adjustNodes (this=0x9cd4808) at ../src/VisualizerApplication.cpp:236&#xD;&#xA;    #8  0xb6e867f0 in ?? () from /usr/lib/libSDL_mixer-1.2.so.0&#xD;&#xA;    #9  0xb6e8719a in ?? () from /usr/lib/libSDL_mixer-1.2.so.0&#xD;&#xA;    #10 0xb6ed9b0d in ?? () from /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    #11 0xb6ee185e in ?? () from /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    #12 0xb6f2e0bd in ?? () from /usr/lib/libSDL-1.2.so.0&#xD;&#xA;    #13 0xb6bc7955 in start_thread (arg=0xb198ab70) at pthread_create.c:300&#xD;&#xA;    #14 0xb6ca6e7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130&#xD;&#xA;    (gdb) &#xD;&#xA;&#xD;&#xA;Ogre.log: http://pastie.org/1581790" />
  <row Id="19014" PostHistoryTypeId="2" PostId="9228" RevisionGUID="d3559bf0-f6f1-4f01-838f-f112a34f9053" CreationDate="2011-03-02T16:39:39.607" UserId="4598" Text="I think this isn't possible, but I just want to check this:&#xD;&#xA;&#xD;&#xA;Is it possible to create a face in opengl that has two normals? &#xD;&#xA;&#xD;&#xA;So: I want the inside and outside of some cilinder to be drawn, but I want the lights to do as expected and not calculate it for the normal given. I was trying to do this with backface culling off, so I would have both faces, but the light was wrongly calculated of course. Is this possible, or do I have to draw an inside and an outside? So draw twice?" />
  <row Id="19015" PostHistoryTypeId="1" PostId="9228" RevisionGUID="d3559bf0-f6f1-4f01-838f-f112a34f9053" CreationDate="2011-03-02T16:39:39.607" UserId="4598" Text="Double sides face with two normals" />
  <row Id="19016" PostHistoryTypeId="3" PostId="9228" RevisionGUID="d3559bf0-f6f1-4f01-838f-f112a34f9053" CreationDate="2011-03-02T16:39:39.607" UserId="4598" Text="&lt;c++&gt;&lt;opengl&gt;&lt;culling&gt;" />
  <row Id="19017" PostHistoryTypeId="5" PostId="9201" RevisionGUID="388d0e08-836c-414b-8bfd-fbd3085d1719" CreationDate="2011-03-02T16:50:05.290" UserId="14" Comment="Tried my best." Text="I am making a hack n slash 3rd person game, and I want the character movements to be more dynamic not like fighting games where you have a moves list. &#xD;&#xA;&#xD;&#xA;I want to animate tons of different animations and have them &quot;Tween&quot; between each other. &#xD;&#xA;&#xD;&#xA;I do not want the to use the mouse for controls, I want it to be all keyboard, that way you have up to 10 inputs (All your fingers) to blend and morph animations to create more fluid movements. In the end this will almost be similar to characters typing a phrase or string of keys rather than move forward mouse look click to melee.&#xD;&#xA;&#xD;&#xA;My questions are: &#xD;&#xA;&#xD;&#xA; + Has anyone done this before?&#xD;&#xA; + How would someone go about trying to tween?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;lets say one for key on the keyboard excluding Tab, Caps, R+Shift, L+Shift, Enter, R+Ctrl, L+Ctrl, L+Alt, R+Alt, Windows Key, and Menu.&#xD;&#xA;&#xD;&#xA;So thats all the numbers, letters and punctuation keys. Thats 46 keys gives me a combination of 46P1 = 5502622159812088949850305428800254892961651752960000000000L (used Python), and with a minimum entry value of 2 keypresses shortening to half. This is not humanly possible to create so many inique animations in one lifetime. But I'm guessing there is a reason this hasn't been done already. &#xD;&#xA;&#xD;&#xA;Or if I just used 10 basic keys. Maybe ASDF SPACE (RIGHT HAND) 456+0 (LEFT HAND KEYPAD)&#xD;&#xA;it would give me 3,628,800 posible unique animations. " />
  <row Id="19018" PostHistoryTypeId="6" PostId="8691" RevisionGUID="938d0ee6-cce8-4f46-8056-491c15c26ff2" CreationDate="2011-03-02T17:04:55.137" UserId="14" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;&lt;performance&gt;&lt;logging&gt;" />
  <row Id="19019" PostHistoryTypeId="6" PostId="9212" RevisionGUID="cbba83ec-1f87-47fb-9e43-99de83ccedd6" CreationDate="2011-03-02T17:05:41.220" UserId="14" Comment="edited tags" Text="&lt;simulations&gt;&lt;economy&gt;" />
  <row Id="19020" PostHistoryTypeId="2" PostId="9229" RevisionGUID="6f0b9b68-235e-45b3-97af-26ee07190f9d" CreationDate="2011-03-02T17:18:21.560" UserId="1812" Text="What is the effort required to use a game engine such as Unreal or Unity, etc. and create an avatar customization features...complete with clothes.&#xD;&#xA;&#xD;&#xA;The user should be able to customize the body features and the clothes need to then fit onto the customized body.&#xD;&#xA;&#xD;&#xA;What is needed?&#xD;&#xA;Can you create one set of 3D models for clothes and somehow programatically have the clothes adapt to the body shape?  I.e. The same shirt model will be able to fit on a skinny person vs. someone with a big beer belly.&#xD;&#xA;&#xD;&#xA;How difficult is this? What are the steps needed to implement this avatar creation/dressing feature.&#xD;&#xA;&#xD;&#xA;I'm basically talking about something like in Rockband 3." />
  <row Id="19021" PostHistoryTypeId="1" PostId="9229" RevisionGUID="6f0b9b68-235e-45b3-97af-26ee07190f9d" CreationDate="2011-03-02T17:18:21.560" UserId="1812" Text="Avatar creation / dressing feature" />
  <row Id="19022" PostHistoryTypeId="3" PostId="9229" RevisionGUID="6f0b9b68-235e-45b3-97af-26ee07190f9d" CreationDate="2011-03-02T17:18:21.560" UserId="1812" Text="&lt;avatar&gt;" />
  <row Id="19023" PostHistoryTypeId="25" PostId="9220" RevisionGUID="7e1ab153-f184-4031-8e03-e0f68a37c11b" CreationDate="2011-03-02T17:23:07.743" Comment="http://twitter.com/#!/StackGameDev/status/42998381227950080" />
  <row Id="19024" PostHistoryTypeId="2" PostId="9230" RevisionGUID="a4ec196d-3177-43ed-b5db-1a3c48852ee7" CreationDate="2011-03-02T17:23:46.563" UserId="5797" Text="Timeline animation is fun and quick to create. As you mentioned only the image(s) in the tile changes. I would create a tile (with animation) on a the timeline and load the image(s) into it. Use frame labels and base your logic on the current frame label." />
  <row Id="19025" PostHistoryTypeId="2" PostId="9231" RevisionGUID="69d5cd2a-b051-43c1-a177-7e3b18d48475" CreationDate="2011-03-02T17:33:07.350" UserId="1829" Text="Pygame is by far my favorite. Since programming in python means you will program fast and since 2D things are fast to do, pygame will be fun..." />
  <row Id="19026" PostHistoryTypeId="5" PostId="9226" RevisionGUID="82eaba29-353e-4d2f-a93a-253011344916" CreationDate="2011-03-02T17:35:25.657" UserId="1742" Comment="added an explicit method by which you port code between languages" Text="The idea that you won't be able to take libraries of code and use them again, or use them on multiple projects because the language doesn't match, or the design is partially within the implementation is consistently misjudged in games development.&#xD;&#xA;&#xD;&#xA;While developing projects across different languages, the inability to reuse source code is significant, but also inappropriate when considering the true meaning of reusability.&#xD;&#xA;&#xD;&#xA;Reusability is not concerned in reusing source files, not even in particular languages, but the ability to maintain an invenstment in information. A wealth of knowledge for the entity that owns the development IP.&#xD;&#xA;&#xD;&#xA;Copyright law has made it hard to see what resources have value in reuse, as it maintains the source as the object of it's discussion rather than the intellectual property represented by the source. The reason for this is that ideas cannot be copyrighted, so by maintaining this stance, the copyrighter keeps hold of this tenuous link to a right to withold information. Reusability across the language gap comes from being aware of the information contained within the medium it is stored. In our case, it is normally stored as source code, but the information is not the source code.&#xD;&#xA;&#xD;&#xA;With same-language ports, the source can be adapted to any project we wish to venture. However, the source is not the information. The information is the order and existence of tasks that can and will be performed on data. This view of information leads to an understanding that any reusability is an adaptation from one set of temporally coupled tasks into a new framework.&#xD;&#xA;&#xD;&#xA;So, even though you want to move from one language to another, or one platform to another, and the code doesn't appear resuable on the outside, the fact is that it contains a wealth of information in a readable form. In fact, porting between languages can often show up bugs that have been present for years.&#xD;&#xA;&#xD;&#xA;The method by which you port the code from one language to another varies with the languages involved, but a good starting point is to load the old code into the new language as comments then, treating the old code as pseudo code, begin writing in the new language. This way, all the old bug fixes are maintained while any new ones can be quickly ported back to the old codebase if wanted/necessary." />
  <row Id="19027" PostHistoryTypeId="2" PostId="9232" RevisionGUID="910012a9-01a6-40a4-8d82-a33d17cbce7e" CreationDate="2011-03-02T17:40:09.560" UserId="5821" Text="What would be a good starting point for locating small or medium size game publishers in Japan. We have a US/EU released game that we believe will fit the Japanese market well, and are looking for companies that we could contact for possible co-publishing. " />
  <row Id="19028" PostHistoryTypeId="1" PostId="9232" RevisionGUID="910012a9-01a6-40a4-8d82-a33d17cbce7e" CreationDate="2011-03-02T17:40:09.560" UserId="5821" Text="Where can I find a list of local japanese game publishers" />
  <row Id="19029" PostHistoryTypeId="3" PostId="9232" RevisionGUID="910012a9-01a6-40a4-8d82-a33d17cbce7e" CreationDate="2011-03-02T17:40:09.560" UserId="5821" Text="&lt;publishing&gt;&lt;release&gt;" />
  <row Id="19030" PostHistoryTypeId="2" PostId="9233" RevisionGUID="3f320ac9-c167-47a9-91e6-70e1913c80d3" CreationDate="2011-03-02T17:42:10.807" UserId="3794" Text="Unless you will use custom shaders for triangle replication in geometry shader, there is no way to do this and you have to use twice more triangles.&#xD;&#xA;&#xD;&#xA;There is also another way to do it in pixel shader (which is considered to be easier than gs), **but it is buggy**. You can use `abs(n dot l)` in phong, but it will cause that the side of the triangle which should be lighted just with ambient light is also lighted with diffuse light. " />
  <row Id="19031" PostHistoryTypeId="2" PostId="9234" RevisionGUID="d350eda8-e1bc-4c27-b4b4-65bacb684de5" CreationDate="2011-03-02T17:44:15.843" UserId="2792" Text="Use gl_FrontFacing in your fragment program and set your normal to -in_normal if back facing." />
  <row Id="19032" PostHistoryTypeId="2" PostId="9235" RevisionGUID="88628022-bb02-4464-a1a3-bffe954d5895" CreationDate="2011-03-02T17:44:19.813" UserId="14" Text="Off of the top of my head, the first place I could imagine a list of that type existing is at the IGDA Japan site.&#xD;&#xA;&#xD;&#xA;http://www.igda.jp" />
  <row Id="19033" PostHistoryTypeId="2" PostId="9236" RevisionGUID="1497a531-5bb0-4d82-a816-6d389a5d8a34" CreationDate="2011-03-02T17:45:30.540" UserId="1198" Text="In a general sense, the engines like Unreal or Unity provide you a way to get your assets on the screen. They may have tools for mashing up a bunch of assets, but you still need a program like Maya, 3D Studio Max, or Blender to build the assets you're going to be mashing up.&#xD;&#xA;&#xD;&#xA;Specifically, to answer your question on effort: the effort required is probably significant, but not insurmountable. It depends on your skills and dedication. If your a programmer, building the 3D models for each of the items you want will probably be the area you spend the most effort; on the other hand, if your already adept with a 3D modeling package, and aren't much of a programmer, you'll find yourself struggling with any engine.&#xD;&#xA;&#xD;&#xA;The steps required, in my view are: (assuming you're starting from absolute zero)&#xD;&#xA;&#xD;&#xA; - Get one full-body 3D model&#xD;&#xA; - Get one full set of 3D clothing models&#xD;&#xA; - Download / Install the Unity or Unreal SDK&#xD;&#xA; - Get a working creation model&#xD;&#xA;   - Using the scripting built-in to the engine to develop an interactive system&#xD;&#xA; - Obtain all other full-body 3D models and associated clothing items&#xD;&#xA;&#xD;&#xA;Note the unordered list, most of these can happen asynchronously, though if its just you working on it, it would probably make sense the serialize the process.&#xD;&#xA;&#xD;&#xA;This is a relatively large task, that will probably require significant effort, and is probably (at least in my opinion) not a good place to start building games, I'd recommend biting off a smaller project if this is your first." />
  <row Id="19034" PostHistoryTypeId="2" PostId="9237" RevisionGUID="ff0340c0-45fa-40e7-85d1-03e4da6e6fcd" CreationDate="2011-03-02T17:55:41.327" UserId="4947" Text="You can also look [here][1]. There are publishers, developers and others.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedevmap.com/index.php?query=Japan&amp;Submit=Search" />
  <row Id="19035" PostHistoryTypeId="5" PostId="9221" RevisionGUID="54bdf2dd-a5bc-4c6a-99bd-a39c066bb2b4" CreationDate="2011-03-02T18:03:17.363" UserId="4296" Comment="For clarity, used quad-tree wrong." Text="It would depend on the style of game and map honestly.  For a relatively small rectangular tile map, I'd probably just stick with a 2d array.  If the map was very irregularly shaped (lots of empty gaps), a wrapper around linked lists that provides O(1) indexing would probably be my choice.&#xD;&#xA;&#xD;&#xA;An integer indexed array gives you a 2147483647^2 2d array.  That's pretty big, but exceeds what you'd what to load into memory.  If the map was to be large scale, another thing to look at is dividing the map into chunks.  Each chunk is fixed size and contains a sub-array of tiles that could be loaded/unloaded as needed to keep memory lower." />
  <row Id="19036" PostHistoryTypeId="5" PostId="9212" RevisionGUID="1da824a6-63d8-4bb2-8fd7-d9386337cda4" CreationDate="2011-03-02T18:06:10.403" UserId="1628" Comment="added 284 characters in body; added 184 characters in body" Text="I'm looking to create an economic model for a game based on goods created procedurally.&#xD;&#xA;&#xD;&#xA;Every natural resource and produced good would be procedurally generated, with certain goods being assigned certain uses.&#xD;&#xA;&#xD;&#xA;&gt; Fakesium might be used for the&#xD;&#xA;&gt; production of Weapon A and produced&#xD;&#xA;&gt; from Fakesium factories which use&#xD;&#xA;&gt; Dilithium and Widgets as reagents,&#xD;&#xA;&gt; where Widgets are also the product of Foo&#xD;&#xA;&gt; and Bar&#xD;&#xA;&#xD;&#xA;The problem is not creating the resources and their various production utlities - but getting the game's AI empires and merchants to correctly value the goods according to their scarcity, utility and production costs.&#xD;&#xA;&#xD;&#xA;I need to create a simulation of goods which allows the various game factions to assign a common value denominator (credits) to each resource, depending on how much its worth to that empire.&#xD;&#xA;&#xD;&#xA;I see the simulation being something like: &quot;I have a high requirement for Weapon A. Since I don't have much of Fakesium, which is needed for Weapon A - I must have a high demand for Fakesium. If I can acquire Fakesium, devalue it. If not, increase its value - and also increase demand for Dilithium and Widgets too.&quot;&#xD;&#xA;&#xD;&#xA;This is very naive - because it may be much much cheaper for the empire to simply purchase Dilithium and Widgets directly rather than purchasing Fakesium, for example. Another example is two resources might allow the creation of Weapon A (Fakesium and Lieron), so we'd need to consider that. I've been scratching my head over the problem and it keeps growing.&#xD;&#xA;&#xD;&#xA;By the time the player joins the world, I'd expect enough iterations of this process to have occurred that prices would have largely normalised - and would then only trigger rarely to compensate for major changes (eg. if the player blows up the world's only Foo mine!)&#xD;&#xA;&#xD;&#xA;Could anyone suggest resources (books, largely) which outline this style of modelling, preferably in the context of simulations? Since this problem would never occur outside fantasy worlds, I figured this is probably the most likely place to find people who have encountered similar problems and I'm sure there's people who know of good places for Games Developers to start looking at less specific economic theory too.&#xD;&#xA;&#xD;&#xA;Additionally, does anyone know of any developers with blogs whose games or research applications perform similar modelling?&#xD;&#xA;&#xD;&#xA;**EDIT**: I think I should underline that I'm not looking for optimal solutions. I'm looking to make the actors impulsive - making rudimentary decisions based on fuzzy inputs about what they care about or don't. I'm aiming to understand the problem area better not derive answers. All the textbooks I've found seem to be about real-world economics or how to solve complex theoretical problems, neither of which are terribly relevant to the actor's decision making." />
  <row Id="19037" PostHistoryTypeId="2" PostId="9238" RevisionGUID="f0dc313e-6dc1-48b6-9051-5b4ae36a50fb" CreationDate="2011-03-02T18:22:52.893" UserId="5797" Text="Bind your components to a flash.utils.Dictionary object. A Dictionary is basically an associative array. If you swap one with another, and your bindings are in place, the views will change automatically. Use can place date formatting etc information there two. &#xD;&#xA;I also introduced an unpopular and unfriendly &quot;numbered id&quot; system. This was because when you truly explore internationalization/multilingual apps, you will find that some words English translate differently depending on context (in French or Spanish it is very common)." />
  <row Id="19038" PostHistoryTypeId="5" PostId="9212" RevisionGUID="228bc3e6-570e-424d-a405-3f79ca78042b" CreationDate="2011-03-02T18:41:15.860" UserId="1628" Comment="added 21 characters in body; edited title" Text="I'm looking to create an economic model for a game based on goods created procedurally.&#xD;&#xA;&#xD;&#xA;Every natural resource and produced good would be procedurally generated, with certain goods being assigned certain uses.&#xD;&#xA;&#xD;&#xA;&gt; Fakesium might be used for the&#xD;&#xA;&gt; production of Weapon A and produced&#xD;&#xA;&gt; from Fakesium factories which use&#xD;&#xA;&gt; Dilithium and Widgets as reagents,&#xD;&#xA;&gt; where Widgets are also the product of Foo&#xD;&#xA;&gt; and Bar&#xD;&#xA;&#xD;&#xA;The problem is not creating the resources and their various production utlities - but getting the game's AI empires and merchants to (Addendum: somewhat) correctly value the goods according to their scarcity, utility and production costs.&#xD;&#xA;&#xD;&#xA;I need to create a simulation of goods which allows the various game factions to assign a common value denominator (credits) to each resource, depending on how much its worth to that empire.&#xD;&#xA;&#xD;&#xA;I see the simulation being something like: &quot;I have a high requirement for Weapon A. Since I don't have much of Fakesium, which is needed for Weapon A - I must have a high demand for Fakesium. If I can acquire Fakesium, devalue it. If not, increase its value - and also increase demand for Dilithium and Widgets too.&quot;&#xD;&#xA;&#xD;&#xA;This is very naive - because it may be much much cheaper for the empire to simply purchase Dilithium and Widgets directly rather than purchasing Fakesium, for example. Another example is two resources might allow the creation of Weapon A (Fakesium and Lieron), so we'd need to consider that. I've been scratching my head over the problem and it keeps growing.&#xD;&#xA;&#xD;&#xA;By the time the player joins the world, I'd expect enough iterations of this process to have occurred that prices would have largely normalised - and would then only trigger rarely to compensate for major changes (eg. if the player blows up the world's only Foo mine!)&#xD;&#xA;&#xD;&#xA;Could anyone suggest resources (books, largely) which outline this style of modelling, preferably in the context of simulations? Since this problem would never occur outside fantasy worlds, I figured this is probably the most likely place to find people who have encountered similar problems and I'm sure there's people who know of good places for Games Developers to start looking at less specific economic theory too.&#xD;&#xA;&#xD;&#xA;Additionally, does anyone know of any developers with blogs whose games or research applications perform similar modelling?&#xD;&#xA;&#xD;&#xA;**EDIT**: I think I should underline that I'm not looking for optimal solutions. I'm looking to make the actors impulsive - making rudimentary decisions based on fuzzy inputs about what they care about or don't. I'm aiming to understand the problem area better not derive answers. All the textbooks I've found seem to be about real-world economics or how to solve complex theoretical problems, neither of which are terribly relevant to the actor's decision making." />
  <row Id="19039" PostHistoryTypeId="4" PostId="9212" RevisionGUID="228bc3e6-570e-424d-a405-3f79ca78042b" CreationDate="2011-03-02T18:41:15.860" UserId="1628" Comment="added 21 characters in body; edited title" Text="What economic books would you suggest for learning about economic valuation of goods and simulations thereof?" />
  <row Id="19040" PostHistoryTypeId="5" PostId="9227" RevisionGUID="5edc231a-4967-4480-a660-a5313bef4db6" CreationDate="2011-03-02T18:48:21.210" UserId="744" Comment="added 8 characters in body" Text="Standard C++ containers do not offer guarantees of threadsafety, and I don't think OgreNodes do either. You're probably adjusting the node at the same time Ogre is doing something with it in a different thread.&#xD;&#xA;&#xD;&#xA;You also have a double delete and leave behind a stale pointer in ~VisualizerApplication. Fix it by not making it a singleton. Just... don't use singletons. &lt;a href=&quot;http://www.google.com/search?q=singleton+pattern+sucks&quot;&gt;Ever.&lt;/a&gt;" />
  <row Id="19041" PostHistoryTypeId="5" PostId="4564" RevisionGUID="07db00c6-4f16-41ad-b943-7243e0d31648" CreationDate="2011-03-02T19:13:44.770" UserId="2555" Comment="edited body; edited tags" Text="I'm a bit confused. The question is: when I'm developing a XNA game for Xbox (or Windows), is it possible to use DirectX (to make use of the GPU)? Or is everything getting calculated by the CPU?&#xD;&#xA;&#xD;&#xA;A quick Google search didn't gave any results of combining those two..." />
  <row Id="19042" PostHistoryTypeId="6" PostId="4564" RevisionGUID="07db00c6-4f16-41ad-b943-7243e0d31648" CreationDate="2011-03-02T19:13:44.770" UserId="2555" Comment="edited body; edited tags" Text="&lt;xna&gt;&lt;graphics&gt;&lt;directx&gt;" />
  <row Id="19043" PostHistoryTypeId="2" PostId="9239" RevisionGUID="226a5f7c-297b-42dd-964b-1c88f57f7f4f" CreationDate="2011-03-02T19:57:40.787" UserId="2469" Text="XNA uses Direct3D 9, so you can do pretty much the same things you can do with D3D9 in XNA, without having to deal with some of the lower level plumbing.&#xD;&#xA;And, as said, you can use HLSL with XNA to compute stuff on the GPU.&#xD;&#xA;&#xD;&#xA;As a rule, most (if not all) of the graphics rendering/computing is done on the GPU, and the rest is done on the CPU." />
  <row Id="19044" PostHistoryTypeId="25" PostId="9228" RevisionGUID="e7c2d81f-ab0e-4d60-b5a7-281b26392597" CreationDate="2011-03-02T20:23:07.587" Comment="http://twitter.com/#!/StackGameDev/status/43043678704508928" />
  <row Id="19045" PostHistoryTypeId="2" PostId="9240" RevisionGUID="16635d53-b05a-426d-9fb2-f8ed4f5857ea" CreationDate="2011-03-02T20:30:32.737" UserId="5824" Text="1. Since lightmaps only apply to geometry that won't move, having objects that are close to each other share atlases is sensible. It limits the number of lightmaps you need to use in any one frame. You can then load the lightmaps in the same way you load the other textures for those objects - reference count textures that are shared between multiple objects.&#xD;&#xA;&#xD;&#xA;2. The texel density of lightmaps can often be much lower than other texture maps and stil look good, especially where the lighting doesn't change much over the object. Ideally lightmap texel density would vary based on how much detail is in the texture - a smooth gradient will be approximated quite well by bilinear filtering. As doing that automatically isn't easy I'd suggest just giving the artist / designer control of the texel density for each object." />
  <row Id="19046" PostHistoryTypeId="2" PostId="9241" RevisionGUID="5bee5728-ef96-4d0f-b7ad-76baa2bf01e0" CreationDate="2011-03-02T20:49:57.813" UserId="2316" Text="Try [Cocos2d-x](http://www.cocos2d-x.org/).  It's what I'm using for [my indie game development.](http://www.strongfortress.com/blog/)&#xD;&#xA;&#xD;&#xA;It's a tried and true OpenGL (ES) platform which has sound, physics, and even a little 3D that has been out for the iPhone for a while now, and is just coming to other platforms." />
  <row Id="19047" PostHistoryTypeId="2" PostId="9242" RevisionGUID="ecb1b290-bb14-4014-b7f1-1de2461616ff" CreationDate="2011-03-02T21:10:22.103" UserId="5259" Text="So, first, please stop saying 'leverage'. Say exactly what you want to do with it (&quot;I want to run the bytecode across platforms.&quot;, &quot;I want to use my old .cs files in ten years.&quot;, &quot;I want to...&quot;, etc.). Buzzwords aren't helpful for us here.&#xD;&#xA;&#xD;&#xA;First, let me try to see if I understand your underlying questions:&#xD;&#xA;&#xD;&#xA; 1. I wrote a game or engine to do X on Y platform. How do I use this (without modification) on platform Z?&#xD;&#xA; 2. I wrote a bunch of code in language X. How do I convert it to language Y?&#xD;&#xA; 3. I want to rerelease my game or engine X for platform Z 10 years later. How does this work?&#xD;&#xA;&#xD;&#xA;All of which boils down to a better question; we'll get there in a bit.&#xD;&#xA;&#xD;&#xA;**I wrote a game or engine to do X on Y platform. How do I use this (without modification) on platform Z?**&#xD;&#xA;&#xD;&#xA;So, there are two parts to this: &quot;doing X on Z&quot;, and &quot;using on Z&quot;.&#xD;&#xA;&#xD;&#xA;You want to make sure that you are bringing something worthwhile onto the platform (&quot;doing X on Z&quot;): why port a text adventure game onto a PS6? Is there an opportunity to update the technology and game to make better use of available resources (i.e., &quot;I've got pixel shaders now, so I can move away from statically-calculated per-sector lighting in my Doom clone.&quot;, &quot;I've got hardware T&amp;L and rasterization now, so no reason to use an engine limited to raycasting wall segments&quot;)? If you are porting over code limited by old hardware, might as well ditch those limitations and start anew.&#xD;&#xA;&#xD;&#xA;&quot;But,&quot; you say,&quot;Zork is still awesome, and would be great on the PS6!&quot;.&#xD;&#xA;&#xD;&#xA;Okay, no worries, agreed. So, now the problem is how to make Zork run unchanged on a PS6 (&quot;using on Z&quot;). To run old programs, you either need to adapt the code to its new operating environment, or adapt its new operating environment to it. You made a decision writing your code, and this is what is going to be important: *did you write your code to be interpreted?*&#xD;&#xA;&#xD;&#xA;*Why yes, all of my game logic is in a custom, well-specified bytecode format running on a custom virtual machine.*&#xD;&#xA;&#xD;&#xA;Good for you, Mr. Fancypants. You saw this day coming, and you wisely wrote your language to run completely on a virtual machine (emulator). You are following in the footsteps of [Carmack][1], [Lucent/Bell Labs][2], or [Berez and Blank][3]. All you have to do to run a port is to rewrite/recompile your interpreting environment, and now you can rest assured that as long as people can write VMs for the new platform, you're tech will persist. Java or C# is a decent way of going about this as well.&#xD;&#xA;&#xD;&#xA;*Er, that's rather silly... I just wrote everything in portable C/C++, complying to all the standards and abstracting away all of the platform-specific stuff.*&#xD;&#xA;&#xD;&#xA;Alright, cool! Your diligence in proper systems engineering and abstraction is going to pay off. You just have to rewrite the platform-specific stuff, tweak the build process, and away you'll go! Sure, writing a Direct3D backend to replace your OpenGL renderer might take a month, but hey, at least it isn't the whole stack!&#xD;&#xA;&#xD;&#xA;*Um... I... uh... well, it was a lot simpler to let objects make Direct3D calls directly. I mean, it wasn't supposed to turn into this big app.*&#xD;&#xA;&#xD;&#xA;Congratulations! You're screwed!&#xD;&#xA;&#xD;&#xA;...more seriously, this is something that can be unavoidable. If you wrote your text game in QBasic, and here we are on Windows 7, you probably can't do anything to salvage it. At this point, you can't possibly adapt your application to run correctly on the new architecture/machine/operating system.&#xD;&#xA;&#xD;&#xA;So, you'll need to adapt the environment to your application (if Mohamed won't come to the mountain...). Consider: if you've got the binaries, and the assets, and you know the configuration of the machine they ran on successfully, then all you have to do is use some emulator for that environment. [This][4] [has][5] [been][6] [done][7] [before][8]. As long as you don't need to communicate with it, or reuse its routines, you'll be fine.&#xD;&#xA;&#xD;&#xA;*But... but... but what about my A-star implementation in 68000 assembler? I don't want to rewrite that!*&#xD;&#xA;&#xD;&#xA;Tough luck. That's the cost of *not thinking* about what you are going to do with your code later in life. This is why we call it software *engineering*, not software *kludging*--at least not in public.&#xD;&#xA;&#xD;&#xA;**I wrote a bunch of code in language X. How do I convert it to language Y?**&#xD;&#xA;&#xD;&#xA;One character at a time?&#xD;&#xA;Outsource it?&#xD;&#xA;sed and regex?&#xD;&#xA;&#xD;&#xA;More productively, if you wrote it in C or something similar, you might have it compiled into a library you can link with. It's okay to have something written in [Fortran][9] that you can still call from other code whose build environment knows how to digest libraries. COM objects and .dlls and all that let Visual Basic apps interact with C# code.&#xD;&#xA;&#xD;&#xA;If you have to rewrite it, and don't care about code quality, sometimes you can find a [tool][10] to do the work for you. This might not even work, but hey, you don't have to write the code yourself.&#xD;&#xA;&#xD;&#xA;If you don't mind, rewriting it in another language is a great opportunity to learn the new language, remove dead code, and rethink old algorithms that might not be optimal anymore. And because you wrote good unit-tests (right?), testing that the new code is at most as buggy as the old should be easy.&#xD;&#xA;&#xD;&#xA;**I want to rerelease my game or engine X for platform Z 10 years later. How does this work?**&#xD;&#xA;&#xD;&#xA;After reading the above, it should be obvious: write modular, well-specified code for a virtual machine, and/or properly abstract away implementation-specific functionality. If that doesn't work, ship it with an emulator.&#xD;&#xA;&#xD;&#xA;*&#xD;&#xA;&#xD;&#xA;The real question you want to ask, though, is:&#xD;&#xA;&#xD;&#xA;**How do I design software that I can keep using throughout my career?**&#xD;&#xA;&#xD;&#xA;You've got to plan out, ahead of time, what it is going to do, and how it is going to do it. You've got to hide or isolate anything that doesn't directly deal with the logic of the algorithms being implemented (no direct API calls), or decide where you stop caring about portability. You've got to be willing to *remove and rewrite deficient code*. Mostly, though, it's the same as the way you get to Carnegie Hall:&#xD;&#xA;&#xD;&#xA;Practice, man. Practice.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://icculus.org/~phaethon/q3mc/q3vm_specs.html&#xD;&#xA;  [2]: http://www.vitanuova.com/inferno/papers/dis.html&#xD;&#xA;  [3]: http://www.inform-fiction.org/zmachine/standards/z1point0/&#xD;&#xA;  [4]: http://www.virtualbox.org/&#xD;&#xA;  [5]: http://www.dosbox.com/&#xD;&#xA;  [6]: http://code.google.com/p/inferno-bin/&#xD;&#xA;  [7]: http://wiki.qemu.org/Main_Page&#xD;&#xA;  [8]: http://www.iamcal.com/misc/bf_debug/&#xD;&#xA;  [9]: http://www.netlib.org/blas/&#xD;&#xA;  [10]: http://sourceforge.net/projects/fortran2pascal/" />
  <row Id="19048" PostHistoryTypeId="4" PostId="4564" RevisionGUID="e4805a17-2fca-4ecd-a8b0-1a09daf0cda3" CreationDate="2011-03-02T21:30:52.897" UserId="3794" Comment="edited title" Text="XBOX + Xna != DirectX ?" />
  <row Id="19049" PostHistoryTypeId="2" PostId="9243" RevisionGUID="864285ba-9343-4427-9c7a-515aaf1ef9bd" CreationDate="2011-03-02T21:43:50.610" UserId="1101" Text="The question probably wasn't asked because you don't need an alternative. For me, it's:&#xD;&#xA;&#xD;&#xA;`Tile tiles[MAP_HEIGHT][MAP_WIDTH];` if the size is fixed.&#xD;&#xA;&#xD;&#xA;`std::vector&lt;Tile&gt; tiles(MAP_HEIGHT*MAP_WIDTH);` otherwise." />
  <row Id="19050" PostHistoryTypeId="2" PostId="9244" RevisionGUID="83a78959-daf5-4222-be48-3f55b62ea512" CreationDate="2011-03-02T22:02:50.327" UserId="1156" Text="One thing I've done for an RPG style map - that is, houses you can enter, dungeons, etc is have 4 main structures: a Map, an Area, a Zone, and a Tile. &#xD;&#xA;&#xD;&#xA;A Tile is obviously a tile.  &#xD;&#xA;A Zone, or a chunk, or whatever, is an area of X by Y tiles. This has a 2D array.  &#xD;&#xA;An Area is a collection of Zones. Each Area can have different Zone sizes - the overworld may use a 32x32 Zone, whereas a house may have one 10x20 Zone. These are stored in dictionaries (so I can have Zone (-3, -2)).  &#xD;&#xA;A Map is a collection of Areas, all of which are linked to each other.&#xD;&#xA;&#xD;&#xA;I felt this allowed me greater flexibility rather than having one huge map.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19051" PostHistoryTypeId="2" PostId="9245" RevisionGUID="d438574a-d172-433d-a920-81dd48f1121a" CreationDate="2011-03-02T23:06:40.310" UserId="4129" Text="I am toying with a 3D engine where the world is a mesh.&#xD;&#xA;&#xD;&#xA;I am importing some 2D maps+tilesets that have previously been made.&#xD;&#xA;&#xD;&#xA;And when I do, I convert it to a 3D mesh and put all the tiles into a single texture.&#xD;&#xA;&#xD;&#xA;This draws substantially faster.&#xD;&#xA;&#xD;&#xA;I would perhaps keep the map around in a 1D array of w*h if I had to keep it's tile concept, but my answer is that its liberating to move beyond the 2Dness.&#xD;&#xA;&#xD;&#xA;And, if you have performance problems whilst using GPU drawing, keeping the graphical representation as a single texture - with a mesh if its got variable heights - can really speed it up compared to drawing each tile individually." />
  <row Id="19052" PostHistoryTypeId="25" PostId="9215" RevisionGUID="0a0cb6f4-669b-4ea4-aeba-63fa4be5f9e6" CreationDate="2011-03-02T23:23:08.307" Comment="http://twitter.com/#!/StackGameDev/status/43088979108696064" />
  <row Id="19053" PostHistoryTypeId="2" PostId="9246" RevisionGUID="5c7b87dc-b97f-4d61-bbd3-f845d40fb4a1" CreationDate="2011-03-02T23:32:43.693" UserDisplayName="user5826" Text="***I don't know how to leverage past code-bases (and experience) to start with a mature product.***&#xD;&#xA;&#xD;&#xA;Wait, you don't know how to leverage past experience? Either you didn't mean to call yourself a moron or you shouldn't even come anywhere near an MMO.&#xD;&#xA;&#xD;&#xA;As for the code base, the above post has a great response and I can't really elaborate too much further. Code doesn't exist in a void, it has operating systems, software libraries, hardware etc. Each one of these you take for granted affects how reusable your code base is. When you actually write out your assumptions for each of these, you'll find you've got quite a few. One big killer for Flash on the iPhone for example is that there is a cursor, which doesn't exist in the touch paradigm, just as a mouse cursor makes near-zero sense in the case of a PS3. If your code makes these assumptions then taking advantage of code that has already been written will be too difficult.&#xD;&#xA;&#xD;&#xA;I'm not sure why you bother to ask how to copy code from one language to another. If you want to take advantage of old code written an another language and you know both, then hopefully it is a straightforward process. If you are a true master of the languages and the environments in which they run, you should be able to immediately tell what problems will be. For future-proofing your code, once again, document and remove as many assumptions as possible, or add ways for your code to take advantage of new environments (e.g. interface-implementation separation for things such as sound, graphics, network, etc.)&#xD;&#xA;&#xD;&#xA;Here's an easy one:&#xD;&#xA;Java -&gt; C++ code conversion. What problems would you for see? Their syntax is very similar, you can almost copy-paste it. But there is that garbage collection thing in Java though. Might want to watch out for it.&#xD;&#xA;&#xD;&#xA;Lisp -&gt; C code conversion. F*ck that. Procedural vs functional are extremely different modus operandi. Likely easier to rewrite given a functional description of what code should do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19054" PostHistoryTypeId="2" PostId="9247" RevisionGUID="8e20182e-afdf-46ec-b698-baae9ed98b15" CreationDate="2011-03-03T00:39:30.080" UserDisplayName="user5827" Text="Looking to see what the level of effort is for implementing a screen capture command into PS3 game by a mid-level PS3 game developer.&#xD;&#xA;&#xD;&#xA;Bonus for a description of what is involved in the process..." />
  <row Id="19055" PostHistoryTypeId="1" PostId="9247" RevisionGUID="8e20182e-afdf-46ec-b698-baae9ed98b15" CreationDate="2011-03-03T00:39:30.080" UserDisplayName="user5827" Text="What would be the level of effort required to implement a screencapture command on a PS3 game?" />
  <row Id="19056" PostHistoryTypeId="3" PostId="9247" RevisionGUID="8e20182e-afdf-46ec-b698-baae9ed98b15" CreationDate="2011-03-03T00:39:30.080" UserDisplayName="user5827" Text="&lt;playstation3&gt;" />
  <row Id="19057" PostHistoryTypeId="2" PostId="9248" RevisionGUID="ee7619cd-c6a4-4b06-8a54-e352be793d14" CreationDate="2011-03-03T01:41:12.683" UserId="5802" Text="Unity has an example project with this already implemented for you:&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/resources/example-projects/charactercustomization&#xD;&#xA;&#xD;&#xA;On that page it says &quot;feel free to use the code and artwork for your own Unity productions&quot;, which would likely reduce the workload significantly (since it's already done for you!)" />
  <row Id="19058" PostHistoryTypeId="2" PostId="9249" RevisionGUID="02fd3237-a9f3-4df6-8b67-afcaf1ad4946" CreationDate="2011-03-03T01:57:06.197" UserId="5802" Text="Unity has an example on their website that implements this, and the code is redistributable:&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/resources/example-projects/charactercustomization" />
  <row Id="19059" PostHistoryTypeId="25" PostId="9247" RevisionGUID="6b64d2ec-ab9a-4438-bbc7-15cae36f1953" CreationDate="2011-03-03T02:23:08.997" Comment="http://twitter.com/#!/StackGameDev/status/43134281769418752" />
  <row Id="19060" PostHistoryTypeId="25" PostId="9214" RevisionGUID="fcc3662a-e42c-49d0-a663-fcdf6b1126ac" CreationDate="2011-03-03T05:23:09.840" Comment="http://twitter.com/#!/StackGameDev/status/43179584287555584" />
  <row Id="19061" PostHistoryTypeId="2" PostId="9250" RevisionGUID="3a4df217-5c88-4a74-9b3c-03db8e82e108" CreationDate="2011-03-03T07:04:01.703" UserId="4830" Text="This sounds like an easy thing but when i considering the following&#xD;&#xA;&#xD;&#xA;- Many players&#xD;&#xA;- Some have played many games and some just started&#xD;&#xA;- Different type of statistics&#xD;&#xA;&#xD;&#xA;...on what information should the actual ranking be based on. I am planning to display the board in a UITableView so there is limited space available per player. However, I am not bound to the UITableView if there is a better solution.&#xD;&#xA;&#xD;&#xA;This is a quiz game and the information i am currently capturing per player is:&#xD;&#xA;&#xD;&#xA;- #games played totally&#xD;&#xA;- #games played per game type (current version have only one game type)&#xD;&#xA;- #questions answered&#xD;&#xA;- #correct answers&#xD;&#xA;&#xD;&#xA;Maybe i should include additional information.&#xD;&#xA;&#xD;&#xA;I have been thinking about having a leaderboard property page where the player can decide on what basis the leaderboard should display information but would like to avoid the complexity in that. However, if that is needed i will do it. &#xD;&#xA;&#xD;&#xA;Anyone that can give me some advice on how to design the presentation of this would be highly appreciated?" />
  <row Id="19062" PostHistoryTypeId="1" PostId="9250" RevisionGUID="3a4df217-5c88-4a74-9b3c-03db8e82e108" CreationDate="2011-03-03T07:04:01.703" UserId="4830" Text="How to design a leaderboard?" />
  <row Id="19063" PostHistoryTypeId="3" PostId="9250" RevisionGUID="3a4df217-5c88-4a74-9b3c-03db8e82e108" CreationDate="2011-03-03T07:04:01.703" UserId="4830" Text="&lt;iphone&gt;&lt;objective-c&gt;&lt;leaderboards&gt;" />
  <row Id="19064" PostHistoryTypeId="2" PostId="9251" RevisionGUID="fb28a7a7-3c03-427c-b5a2-c3b3834ffb41" CreationDate="2011-03-03T07:34:51.960" UserId="5766" Text="&#xD;&#xA;as far as leader board development you can get it from the gamekit &#xD;&#xA;&#xD;&#xA;check out this video: http://www.youtube.com/watch?v=JjF82OYGBq4&amp;feature=player_embedded&#xD;&#xA;&#xD;&#xA;as far as the artistic design that really depends on style of you game.&#xD;&#xA;&#xD;&#xA;hope that helps" />
  <row Id="19065" PostHistoryTypeId="25" PostId="9250" RevisionGUID="a3156b1e-f959-46b3-98b0-72743a94ebf1" CreationDate="2011-03-03T08:23:09.513" Comment="http://twitter.com/#!/StackGameDev/status/43224880791044096" />
  <row Id="19067" PostHistoryTypeId="25" PostId="9229" RevisionGUID="fd1dc38d-af44-4b06-b56a-1a40ed5d8778" CreationDate="2011-03-03T11:23:09.853" Comment="http://twitter.com/#!/StackGameDev/status/43270181178445825" />
  <row Id="19068" PostHistoryTypeId="2" PostId="9253" RevisionGUID="379565d8-fcda-4fea-8e35-21b53365aca0" CreationDate="2011-03-03T14:20:44.563" UserId="5839" Text="I'm curious. How is the development to a game console? Do I need to use some Game engine , and after, compile to this plattform?&#xD;&#xA;&#xD;&#xA;What IDE is used? Any C++ IDE?&#xD;&#xA;&#xD;&#xA;All console games are built in C++?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="19069" PostHistoryTypeId="1" PostId="9253" RevisionGUID="379565d8-fcda-4fea-8e35-21b53365aca0" CreationDate="2011-03-03T14:20:44.563" UserId="5839" Text="How to develop to game consoles (Wii, Playstation, xbox) ?" />
  <row Id="19070" PostHistoryTypeId="3" PostId="9253" RevisionGUID="379565d8-fcda-4fea-8e35-21b53365aca0" CreationDate="2011-03-03T14:20:44.563" UserId="5839" Text="&lt;game-design&gt;" />
  <row Id="19071" PostHistoryTypeId="25" PostId="9204" RevisionGUID="18b1661b-f2a8-426b-a5ea-3d8be1de8a66" CreationDate="2011-03-03T14:23:09.840" Comment="http://twitter.com/#!/StackGameDev/status/43315479737151488" />
  <row Id="19072" PostHistoryTypeId="2" PostId="9254" RevisionGUID="ca065670-d734-4a05-87c2-1884c3ded2f4" CreationDate="2011-03-03T14:54:17.987" UserId="4234" Text="I'm not much of a maths expert, so this is probably quite straight forward. I was playing a soccer flash game where you take free kicks. You provide Power, Swerve and Direction. I'm reading up on vectors and such so I can use the direction and power information to shoot the ball with the correct velocity. What I don't understand is how the 'Swerve' information is used. What formula connects the Swerve information with the Direction and Power? (This is all in 2D)&#xD;&#xA;&#xD;&#xA;Thanks for any advice." />
  <row Id="19073" PostHistoryTypeId="1" PostId="9254" RevisionGUID="ca065670-d734-4a05-87c2-1884c3ded2f4" CreationDate="2011-03-03T14:54:17.987" UserId="4234" Text="Adding 'swerve' to a direction" />
  <row Id="19074" PostHistoryTypeId="3" PostId="9254" RevisionGUID="ca065670-d734-4a05-87c2-1884c3ded2f4" CreationDate="2011-03-03T14:54:17.987" UserId="4234" Text="&lt;physics&gt;&lt;math&gt;&lt;algorithm&gt;&lt;2d-physics&gt;&lt;vector&gt;" />
  <row Id="19075" PostHistoryTypeId="2" PostId="9255" RevisionGUID="6b1d7bbf-a235-4491-90ed-4555fcdd0ced" CreationDate="2011-03-03T14:59:41.667" UserId="1477" Text="You don't have to use an existing game engine, but creating one from scratch can be a daunting Task. Right now your easier option is XNA and C# for the Xbox. XNA is free but to be able to publish your game you have to pay $99 per year fee to join microsoft's developer club. Unity3d is a game engine which also has an export to Wii option but you still need to be a licensed developer through nintendo and I don't know the costs involved with that.&#xD;&#xA;&#xD;&#xA;**resources:**&#xD;&#xA;&#xD;&#xA;[Microsoft app Hub(XNA and such)][1]&#xD;&#xA;&#xD;&#xA;[Unity3d game engine][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/&#xD;&#xA;  [2]: http://unity3d.com/" />
  <row Id="19076" PostHistoryTypeId="2" PostId="9256" RevisionGUID="2fd4d1c2-0b2e-4718-8d67-f386266ca113" CreationDate="2011-03-03T15:06:16.480" UserId="370" Text="This question focuses on the API's available on phones.&#xD;&#xA;&#xD;&#xA;I'd been planning to use OpenAL in my game for maximum portability.  It runs great on Linux so I can quickly develop the Game and leverage it's superior debugging tools.&#xD;&#xA;&#xD;&#xA;However I've recently heard that Android doesn't support OpenAL well.  Instead they've gone with a OpenSL ES library.&#xD;&#xA;&#xD;&#xA;What I'm looking for is a free Audio library that I can use with minimal custom code on iPhone, Android, and my Linux desktop.  Does such an API exists?&#xD;&#xA;&#xD;&#xA;Some extra details:&#xD;&#xA;The game is written in C++ with custom minimal front ends.  ObjC for iPhone, Java for Android, and SFML for Desktops.  I'm using OpenGL ES for portability as iPhone doesn't support the more advanced OpenGL APIs." />
  <row Id="19077" PostHistoryTypeId="1" PostId="9256" RevisionGUID="2fd4d1c2-0b2e-4718-8d67-f386266ca113" CreationDate="2011-03-03T15:06:16.480" UserId="370" Text="Which API for cross platform mobile audio?" />
  <row Id="19078" PostHistoryTypeId="3" PostId="9256" RevisionGUID="2fd4d1c2-0b2e-4718-8d67-f386266ca113" CreationDate="2011-03-03T15:06:16.480" UserId="370" Text="&lt;iphone&gt;&lt;android&gt;&lt;cross-platform&gt;&lt;audio&gt;" />
  <row Id="19079" PostHistoryTypeId="2" PostId="9257" RevisionGUID="3746c7f6-d2ee-4191-ae32-5467618b0843" CreationDate="2011-03-03T15:12:32.250" UserId="2306" Text="Pro development is almost unilaterally done in C++. If you're planning on targeting multiple platforms, this is a must since it's the only thing that's supported on every console and OS. Note: if you're new to this, I'd start with something much simpler like XNA - still very, very powerful, but it'll let you focus on your game instead of memory leaks and other neophyte C++ hurdles.&#xD;&#xA;&#xD;&#xA;Also, developing for any of the three major consoles (if you include Wii in that category) will require a dev hardware, which is difficult/impossible to obtain unless you're working with a group that has an established presence in the game industry. (Read: Gearbox, Bungee, etc.) &#xD;&#xA;&#xD;&#xA;To date, Microsoft is the only company to produce a free/very, very cheap option for independent developers to write and publish console games, and XNA is no slouch - many people are building very interesting things with XNA, and as far as I've been able to tell it's more than powerful enough to take full advantage of the current console hardware. Most of the work is done on the GPU these days, anyway, and the CPU code just coordinates things.&#xD;&#xA;&#xD;&#xA;Oh, and your XNA code will  run on Windows, as well. =)" />
  <row Id="19080" PostHistoryTypeId="2" PostId="9258" RevisionGUID="c8860d8f-cc74-4312-9c6a-7508cd47f56f" CreationDate="2011-03-03T16:08:15.963" UserId="2469" Text="If [this][1] is the kind of motion you are trying to get, all you need to do is something like this:&#xD;&#xA;&#xD;&#xA;    [pseudo clode]&#xD;&#xA;    float center_y = position.y;&#xD;&#xA;    float raduis = 10.0f;&#xD;&#xA;    float angle = 0.0f;&#xD;&#xA;&#xD;&#xA;    void update( float elapsedTime )&#xD;&#xA;    {&#xD;&#xA;        // you can use different speeds for the X and Y positions&#xD;&#xA;        // to adjust the wave as you need.&#xD;&#xA;        position.x += speed * elapsedTime;&#xD;&#xA;        position.y = center_y + Math.Sin(angle) * radius;&#xD;&#xA;        angle += speed * elapsedTime;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Essentially, what the sine function does is return a float point value in range [-1,1] based on the input angle (in radians). You can then scale that result by the radius, in the example, I scale the value by 5 given me a value in the range [-5, 5], and then all you need to do is add that value to the Y position you want the sprite to oscillate around.&#xD;&#xA;&#xD;&#xA;You can also think of the &quot;speed&quot; variable as the frequency of the wave in this line:&#xD;&#xA;&#xD;&#xA;    angle += speed * elapsedTime;&#xD;&#xA;&#xD;&#xA;The higher the speed the faster the oscillation will be. Note however that this isn't physically accurate, to make waves and have control of amplitude, frequency and other parameters is a little more &quot;complicated&quot;.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://signalsondisplay.com/test/sin.html" />
  <row Id="19081" PostHistoryTypeId="5" PostId="9256" RevisionGUID="d2ded607-9195-4a4e-92ca-2491a092ac37" CreationDate="2011-03-03T16:32:51.820" UserId="370" Comment="added 34 characters in body" Text="This question focuses on the API's available on phones.&#xD;&#xA;&#xD;&#xA;I'd been planning to use OpenAL in my game for maximum portability.  It runs great on Linux so I can quickly iterate while developing as well as leverage the desktop's superior debugging tools.&#xD;&#xA;&#xD;&#xA;However I've recently heard that Android doesn't support OpenAL well.  Instead they've gone with an OpenSL ES library.&#xD;&#xA;&#xD;&#xA;What I'm looking for is a free Audio library that I can use with minimal custom code on iPhone, Android, and my Linux desktop.  Does such a library exists?&#xD;&#xA;&#xD;&#xA;Some extra details:  &#xD;&#xA;The game is written in C++ with custom minimal front ends, e.g. ObjC for iPhone, Java for Android, and SFML for desktops.  I'm using OpenGL ES for portability as iPhone doesn't support the more advanced OpenGL APIs." />
  <row Id="19082" PostHistoryTypeId="2" PostId="9259" RevisionGUID="5d460a41-0d9e-4feb-a38a-8b46127fb7f8" CreationDate="2011-03-03T16:33:17.870" UserId="1230" Text="This was the subject of one of the [Google Ai competitions](http://csclub.uwaterloo.ca/contest/)&#xD;&#xA;&#xD;&#xA;There are some great resources from that page:&#xD;&#xA;&#xD;&#xA;- http://csclub.uwaterloo.ca/contest/xiao_strategy.php&#xD;&#xA;&#xD;&#xA;- http://www.sifflez.org/misc/tronbot/index.html&#xD;&#xA;" />
  <row Id="19083" PostHistoryTypeId="6" PostId="9253" RevisionGUID="e5738ef3-9487-49af-be92-0ad06d227229" CreationDate="2011-03-03T16:34:17.903" UserId="1156" Comment="edited tags" Text="&lt;console&gt;" />
  <row Id="19084" PostHistoryTypeId="2" PostId="9260" RevisionGUID="9e8c9133-b43e-4a70-839d-b6a4bb982ded" CreationDate="2011-03-03T16:41:15.150" UserId="1230" Text="I created a game for a 48 game competition where an A* character follows the player around a level. Because my A* implementation was slow (it couldn't run every frame) I put the interval on a three second delay. This had the unintended result of allowing the player to &quot;trick&quot; the AI for a few moments. It actually made the game more fun. &#xD;&#xA;&#xD;&#xA;Later on, I improved the performance of the A* implementation and tried running it on every frame. The game stopped being fun because the enemy would always perfectly seek the player.&#xD;&#xA;&#xD;&#xA;That was unexpected and a good learning experience." />
  <row Id="19085" PostHistoryTypeId="5" PostId="9254" RevisionGUID="17b52478-bae7-46dd-9a40-e9671ad77186" CreationDate="2011-03-03T16:45:46.133" UserId="962" Comment="deleted 34 characters in body" Text=" I'm not much of a maths expert, so this is probably quite straight forward. I was playing a soccer flash game where you take free kicks. You provide Power, Swerve and Direction. I'm reading up on vectors and such so I can use the direction and power information to shoot the ball with the correct velocity. What I don't understand is how the 'Swerve' information is used. What formula connects the Swerve information with the Direction and Power? (This is all in 2D)" />
  <row Id="19086" PostHistoryTypeId="2" PostId="9261" RevisionGUID="b8000c7c-08f5-4443-acf6-d6bb08bfaf33" CreationDate="2011-03-03T16:52:46.350" UserId="962" Text="Do you mean spin? Spin will cause the ball to swerve in the air.&#xD;&#xA;&#xD;&#xA;In a true to life simulation, you would only apply a force to a spot on the ball from a certain angle, and the speed, spin, and direction would be determined from that.&#xD;&#xA;&#xD;&#xA;In this soccer game, I am going to assume the graphics are 2d, but the view is facing the goal, and the ball graphic shrinks to provide depth.&#xD;&#xA;&#xD;&#xA;So you need some sort of z depth at least.&#xD;&#xA;&#xD;&#xA;The Swerve, or spin, causes the ball to change direction after it is hit. This allow for shots that look like they are going to end up to the right, but end up moving left.&#xD;&#xA;&#xD;&#xA;So in the game make the swerve variable a float, and have it change the X direction on the ball, or what ever direction is left and right." />
  <row Id="19087" PostHistoryTypeId="2" PostId="9262" RevisionGUID="9e1dbe1e-bd78-45c6-8afe-3dc00db47a87" CreationDate="2011-03-03T16:57:37.647" UserId="5844" Text="I am a beginner to game development and as I am used to programming in C# I decided to go for XNA. I've been playing around with it for a while and now I am learning the basics of HLSL shaders, I have noticed in the MSDN documentation that there have been some syntax changes in HLSL between DirectX 9 and DirectX 10, for example, the [Sampler type][1]&#xD;&#xA;&#xD;&#xA;Since I am having some troubles with my desktop pc, I am using my laptop which video card only supports DirectX 9.0c. Then I'm gonna have to write my shaders using the DirectX 9 syntax, right? So I am wondering, **will my HLSL shaders written using the DirectX 9 syntax work on a system running DirectX 10 (or higher)?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb509644%28VS.85%29.aspx" />
  <row Id="19088" PostHistoryTypeId="1" PostId="9262" RevisionGUID="9e1dbe1e-bd78-45c6-8afe-3dc00db47a87" CreationDate="2011-03-03T16:57:37.647" UserId="5844" Text="Compatibility between DirectX 9 and DirectX 10 shaders" />
  <row Id="19089" PostHistoryTypeId="3" PostId="9262" RevisionGUID="9e1dbe1e-bd78-45c6-8afe-3dc00db47a87" CreationDate="2011-03-03T16:57:37.647" UserId="5844" Text="&lt;xna&gt;&lt;c#&gt;&lt;directx&gt;&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="19090" PostHistoryTypeId="25" PostId="9262" RevisionGUID="a2f71c40-acee-4bdd-894a-8a544a03207a" CreationDate="2011-03-03T17:23:09.840" Comment="http://twitter.com/#!/StackGameDev/status/43360777675087872" />
  <row Id="19091" PostHistoryTypeId="2" PostId="9263" RevisionGUID="a7663f52-bda5-4f30-a0ed-4d88d300a47b" CreationDate="2011-03-03T17:38:53.597" UserId="2469" Text="XNA uses Direct3D 9 under the hood, and D3D9 only supports up to shader model 3, so (I could be wrong though) you can only use shader model 1, 2 or 3 with XNA.&#xD;&#xA;D3D9 will work on all D3D9 or higher enabled GPUs, so you can safely write some shader model 3 HLSL code for XNA.&#xD;&#xA;&#xD;&#xA;On the other hand I'm not sure about the xbox. I think the xbox supports shader model 3.0, but I'm not sure, and I think it has a few specific functionality. But in general when using XNA, if it compiles, it should run fine on PC + xbox." />
  <row Id="19092" PostHistoryTypeId="2" PostId="9264" RevisionGUID="e5d8ec03-d14c-40c6-9aaa-79364f947e64" CreationDate="2011-03-03T17:45:41.597" UserId="3545" Text="I'm personally a huge fan of [Allegro 5][1], but it is a C API. Still and all, it's a simple API that get's out of your way and provides access to:&#xD;&#xA;&#xD;&#xA; - 2D graphics (backed by OpenGL or D3D, depending upon platfom)&#xD;&#xA; - Sound&#xD;&#xA; - Fonts (including both bitmap and TTF)&#xD;&#xA; - Input (mouse &amp; keyboard)&#xD;&#xA; - PhysicsFS (file system virtualization)&#xD;&#xA; - Image loading&#xD;&#xA;&#xD;&#xA;5.1 will be adding shader support, as well.&#xD;&#xA;&#xD;&#xA;SDL 1.3 is also shaping up quite well. Sam seems to be done making the major API changes, and what is already in is pretty stable already. Still ... it's not even beta yet, and Allegro 5.0 is released.&#xD;&#xA;&#xD;&#xA;Granted, for more complex and advanced games you'd probably want to pair Allegro 5 with some sort of physics library ([Box2D][2], for example). Still, you can get a very long way, and have a pile of fun, with nothing more than what Allegro 5, the C or C++ standard library, and your own code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://allegro5.org &quot;Allegro 5&quot;&#xD;&#xA;  [2]: http://box2d.org &quot;Box2D&quot;" />
  <row Id="19093" PostHistoryTypeId="2" PostId="9265" RevisionGUID="fcfa5c85-e29a-4584-9712-3a1c694ec7ed" CreationDate="2011-03-03T17:54:34.790" UserId="118" Text="I am developing a 2D shmup (i.e. [Aero Fighters](http://en.wikipedia.org/wiki/Aero_Fighters)) and I was wondering what are the various ways to store a level. Assuming that enemies are defined in their own xml file, how would you define when an enemy spawns in the level? &#xD;&#xA;&#xD;&#xA;Would it be based on time? Updates? Distance?&#xD;&#xA;&#xD;&#xA;Currently I do this based on &quot;level time&quot; (the amount of time the level is running - pausing doesn't update the time). Here is an example (the serialization was done by XNA):&#xD;&#xA;&#xD;&#xA;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#xD;&#xA;    &lt;XnaContent xmlns:level=&quot;pekalicious.xanor.XanorContentShared.content.level&quot;&gt;&#xD;&#xA;      &lt;Asset Type=&quot;level:Level&quot;&gt;&#xD;&#xA;        &lt;Enemies&gt;&#xD;&#xA;          &lt;Enemy&gt;&#xD;&#xA;            &lt;EnemyType&gt;data/enemies/smallenemy&lt;/EnemyType&gt;&#xD;&#xA;            &lt;SpawnTime&gt;PT0S&lt;/SpawnTime&gt;&#xD;&#xA;            &lt;NumberOfSpawns&gt;60&lt;/NumberOfSpawns&gt;&#xD;&#xA;            &lt;SpawnOffset&gt;PT0.2S&lt;/SpawnOffset&gt;&#xD;&#xA;          &lt;/Enemy&gt;&#xD;&#xA;          &lt;Enemy&gt;&#xD;&#xA;            &lt;EnemyType&gt;data/enemies/secondenemy&lt;/EnemyType&gt;&#xD;&#xA;            &lt;SpawnTime&gt;PT0S&lt;/SpawnTime&gt;&#xD;&#xA;            &lt;NumberOfSpawns&gt;10&lt;/NumberOfSpawns&gt;&#xD;&#xA;            &lt;SpawnOffset&gt;PT0.5S&lt;/SpawnOffset&gt;&#xD;&#xA;          &lt;/Enemy&gt;&#xD;&#xA;          &lt;Enemy&gt;&#xD;&#xA;            &lt;EnemyType&gt;data/enemies/secondenemy&lt;/EnemyType&gt;&#xD;&#xA;            &lt;SpawnTime&gt;PT20S&lt;/SpawnTime&gt;&#xD;&#xA;            &lt;NumberOfSpawns&gt;10&lt;/NumberOfSpawns&gt;&#xD;&#xA;            &lt;SpawnOffset&gt;PT0.5S&lt;/SpawnOffset&gt;&#xD;&#xA;          &lt;/Enemy&gt;&#xD;&#xA;          &lt;Enemy&gt;&#xD;&#xA;            &lt;EnemyType&gt;data/enemies/boss1&lt;/EnemyType&gt;&#xD;&#xA;            &lt;SpawnTime&gt;PT30S&lt;/SpawnTime&gt;&#xD;&#xA;            &lt;NumberOfSpawns&gt;1&lt;/NumberOfSpawns&gt;&#xD;&#xA;            &lt;SpawnOffset&gt;PT0S&lt;/SpawnOffset&gt;&#xD;&#xA;          &lt;/Enemy&gt;&#xD;&#xA;        &lt;/Enemies&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;Each Enemy element is basically a wave of specific enemy types. The type is defined in EnemyType while SpawnTime is the &quot;level time&quot; this wave should appear. NumberOfSpawns and SpawnOffset is the number of enemies that will show up and the time it takes between each spawn respectively.&#xD;&#xA;&#xD;&#xA;This could be a good idea or there could be better ones out there. I'm not sure. I would like to see some opinions and ideas.&#xD;&#xA;&#xD;&#xA;I have two problems with this: spawning an enemy correctly and creating a level editor. The level editor thing is an entirely different problem (which I will probably post in the future :P).&#xD;&#xA;&#xD;&#xA;As for spawning correctly, the problem lies in the fact that I have a variable update time and so I need to make sure I don't miss an enemy spawn because the spawn offset is too small, or because the update took a little more time. I kinda fixed it for the most part, but it seems to me that the problem is with how I store the level.&#xD;&#xA;&#xD;&#xA;So, any ideas? Comments?&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="19094" PostHistoryTypeId="1" PostId="9265" RevisionGUID="fcfa5c85-e29a-4584-9712-3a1c694ec7ed" CreationDate="2011-03-03T17:54:34.790" UserId="118" Text="How to store a shmup level?" />
  <row Id="19095" PostHistoryTypeId="3" PostId="9265" RevisionGUID="fcfa5c85-e29a-4584-9712-3a1c694ec7ed" CreationDate="2011-03-03T17:54:34.790" UserId="118" Text="&lt;levels&gt;&lt;data&gt;&lt;xml&gt;&lt;shoot-em-up&gt;" />
  <row Id="19096" PostHistoryTypeId="2" PostId="9266" RevisionGUID="f053c3ac-11a0-47b9-8b06-f7c55c2a1d42" CreationDate="2011-03-03T18:03:44.427" UserId="653" Text="If, as AttackingHobo says, you're talking about spin, then the 'swerve' is known as the [Magnus Effect](http://en.wikipedia.org/wiki/Magnus_Effect). The ball is spinning, causing the air to travel faster on one side and slower on the other, producing a pressure difference.&#xD;&#xA;&#xD;&#xA;Basically, the force exerted on the spinning ball (from the Magnus Effect alone) at a given time would be something like this&#xD;&#xA;&#xD;&#xA;    F = k * (w x v)&#xD;&#xA;&#xD;&#xA;Where `F` is force, `w` should actually be an omega and is the rotation vector, `x` is just a cross-product operator, and `v` is the current velocity of the ball. `k` is some kind of constant factor depending on what kind of surface the ball has and so on, that one you basically have to try different values and see which fits.&#xD;&#xA;&#xD;&#xA;The `v` vector is pretty straight forward, just the direction and speed of the ball. `w` (or omega) might seem unintuitive though, the magnitude is the rate of the spin (usually radians per second, but since we're multiplying with an arbitrary constant anyway, it might as well be RPM), and the direction is the axis around which the ball is rotating. To know which way is 'up', it's easiest to take your right hand and bend your fingers, the rotation is in the direction of your finger tips, and your thumb is basically the rotation vector.&#xD;&#xA;&#xD;&#xA;In 2D, birds-eye perspective, a counter clockwise rotation would have the rotational axis pointing into your eye (away from the ground). You don't really need 3D stuff (like the cross product), buts it's easier to work the stuff out on paper and use zero one of the components (like z) to reduce the formula.&#xD;&#xA;&#xD;&#xA;Also remember Newton, `F = m*a`, but again, the `k` is arbitrary, so we can just bake the mass into it, making `a = k * (w x v)`. Where `a` is the acceleration (vector).&#xD;&#xA;&#xD;&#xA;Birds-eye again, z pointing away from the ground (into your eye), x to the right, and y up the screen.&#xD;&#xA;&#xD;&#xA;    w = s*ẑ, v = (vx, vy), a = (ax, ay)&#xD;&#xA;&#xD;&#xA;here I've used `s` as the spin (rate of rotation, positive being counter clockwise, `ẑ` denotes the unit vector in the z-direction).&#xD;&#xA;&#xD;&#xA;    ax = -k*s*vy&#xD;&#xA;    ay = k*s*vx&#xD;&#xA;&#xD;&#xA;Long rant for a simple formula, hope it helps. :)&#xD;&#xA;&#xD;&#xA;Note that back-spin will cause the ball to travel further, and top-spin will cause it to dive early, if that's something you want, you need to do the spin-vector in 3D." />
  <row Id="19097" PostHistoryTypeId="5" PostId="9266" RevisionGUID="4135bd6f-8f5c-4043-9956-1b037fc48562" CreationDate="2011-03-03T18:13:31.363" UserId="653" Comment="typo" Text="If, as AttackingHobo says, you're talking about spin, then the 'swerve' is known as the [Magnus Effect](http://en.wikipedia.org/wiki/Magnus_Effect). The ball is spinning, causing the air to travel faster on one side and slower on the other, producing a pressure difference.&#xD;&#xA;&#xD;&#xA;Basically, the force exerted on the spinning ball (from the Magnus Effect alone) at a given time would be something like this&#xD;&#xA;&#xD;&#xA;    F = k * (w x v)&#xD;&#xA;&#xD;&#xA;Where `F` is force, `w` should actually be an omega and is the rotation vector, `x` is just a cross-product operator, and `v` is the current velocity of the ball. `k` is some kind of constant factor depending on what kind of surface the ball has and so on, that one you basically have to try different values and see which fits.&#xD;&#xA;&#xD;&#xA;The `v` vector is pretty straight forward, just the direction and speed of the ball. `w` (or omega) might seem unintuitive though, the magnitude is the rate of the spin (usually radians per second, but since we're multiplying with an arbitrary constant anyway, it might as well be RPM), and the direction is the axis around which the ball is rotating. To know which way is 'up', it's easiest to take your right hand and bend your fingers, the rotation is in the direction of your finger tips, and your thumb is basically the rotation vector.&#xD;&#xA;&#xD;&#xA;In 2D, birds-eye perspective, a counter clockwise rotation would have the rotational axis pointing into your eye (away from the ground). You don't really need 3D stuff (like the cross product), buts it's easier to work the stuff out on paper and use zero all but one of the components (like z) to reduce the formula.&#xD;&#xA;&#xD;&#xA;Also remember Newton, `F = m*a`, but again, the `k` is arbitrary, so we can just bake the mass into it, making `a = k * (w x v)`. Where `a` is the acceleration (vector).&#xD;&#xA;&#xD;&#xA;Birds-eye again, z pointing away from the ground (into your eye), x to the right, and y up the screen.&#xD;&#xA;&#xD;&#xA;    w = s*ẑ, v = (vx, vy), a = (ax, ay)&#xD;&#xA;&#xD;&#xA;here I've used `s` as the spin (rate of rotation, positive being counter clockwise, `ẑ` denotes the unit vector in the z-direction).&#xD;&#xA;&#xD;&#xA;    ax = -k*s*vy&#xD;&#xA;    ay = k*s*vx&#xD;&#xA;&#xD;&#xA;Long rant for a simple formula, hope it helps. :)&#xD;&#xA;&#xD;&#xA;Note that back-spin will cause the ball to travel further, and top-spin will cause it to dive early, if that's something you want, you need to do the spin-vector in 3D." />
  <row Id="19098" PostHistoryTypeId="2" PostId="9267" RevisionGUID="86ce7fe5-11f1-429c-9145-a15cef17dc9a" CreationDate="2011-03-03T18:42:17.137" UserDisplayName="user5057" Text=" @roe above is probably the best answer. In real life it takes some amount of time for the fluid velocities to equilibrate to the motion of the ball through the air. So you could try to add some sort of time delay. My favorite is just exponential time damping. Swerve is just a some fraction of what it was the last time update, plus what you get from the  current time update.&#xD;&#xA;So use roes: formulae for instantaneous swerve accelleration (or the current contribution), and combine say .05 times that to .95 times the previous result. Start the saved value at say 0, and you won't see much bending of the flight until several time steps have passed, which is kind of like a breaking ball in baseball, by the time the batter sees the balls trajectory  deviate, it is too late to correct his swing." />
  <row Id="19099" PostHistoryTypeId="2" PostId="9268" RevisionGUID="c687eebc-51c3-403b-98cc-c49fcc561831" CreationDate="2011-03-03T19:31:50.580" UserId="659" Text="It's worth taking a look at the [Airplay SDK][1] - C++ development for iOS (and Android, and a few less significant ARM-based mobile platforms), in Visual Studio.&#xD;&#xA;&#xD;&#xA;You can do everything on a Windows PC until the final App Store submission steps, where I believe a Mac is still required.&#xD;&#xA;&#xD;&#xA;It's quite impressive. I've only done some basic tests with it so far, but I like what I'm seeing.&#xD;&#xA;&#xD;&#xA;The main down-sides appear to be no native debugging on the device (but debugging is available in an emulated ARM build on PC, and in x86 builds), and also the need to use fixed-point math, particularly if drawing anything in 3D (best for performance on cross-platform ARM apps, but does increase development/debugging time somewhat)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.airplaysdk.com" />
  <row Id="19100" PostHistoryTypeId="2" PostId="9269" RevisionGUID="f8e5a2d7-6ce2-4af2-bffe-bc7119a4bc4e" CreationDate="2011-03-03T19:53:45.397" UserId="4690" Text="One way to do this would be to base the spawn not on time but on horizontal distance traveled (assuming sidescrolling). You can store your enemy waves in a queue with a trigger distance; when your player's distance traveled is greater than the trigger distance of the object at the front of the queue, pop it from the queue and spawn it.&#xD;&#xA;&#xD;&#xA;This solution would lend itself more to integration with a graphical level editor than a time-based solution. It'd make it much easier to match up specific points along your scrolling background with when the enemies spawn." />
  <row Id="19101" PostHistoryTypeId="5" PostId="9262" RevisionGUID="50a16701-c352-4070-8f2f-8691571e7539" CreationDate="2011-03-03T20:09:00.360" UserId="962" Comment="deleted 7 characters in body" Text="I am a beginner to game development and as I am used to programming in C# I decided to go for XNA. I've been playing around with it for a while and now I am learning the basics of HLSL shaders, I have noticed in the MSDN documentation that there have been some syntax changes in HLSL between DirectX 9 and DirectX 10, for example, the [Sampler type][1]&#xD;&#xA;&#xD;&#xA;Since I am having some troubles with my desktop pc, I am using my laptop which video card only supports DirectX 9.0c. Then I'm gonna have to write my shaders using the DirectX 9 syntax, right? So I am wondering, **will my HLSL shaders written using the DirectX 9 syntax work on a system running DirectX 10 (or higher)?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb509644%28VS.85%29.aspx" />
  <row Id="19103" PostHistoryTypeId="5" PostId="9250" RevisionGUID="7787fff8-bba9-4aee-bad6-6a369b11722f" CreationDate="2011-03-03T20:15:39.140" UserId="1198" Comment="lower-case &quot;i&quot; " Text="This sounds like an easy thing but when I considering the following&#xD;&#xA;&#xD;&#xA;- Many players&#xD;&#xA;- Some have played many games and some just started&#xD;&#xA;- Different type of statistics&#xD;&#xA;&#xD;&#xA;On what information should the actual ranking be based on? I am planning to display the board in a UITableView so there is limited space available per player. However, I am not bound to the UITableView if there is a better solution.&#xD;&#xA;&#xD;&#xA;This is a quiz game and the information I am currently capturing per player is:&#xD;&#xA;&#xD;&#xA;- #games played totally&#xD;&#xA;- #games played per game type (current version have only one game type)&#xD;&#xA;- #questions answered&#xD;&#xA;- #correct answers&#xD;&#xA;&#xD;&#xA;Maybe I should include additional information.&#xD;&#xA;&#xD;&#xA;I have been thinking about having a leaderboard property page where the player can decide on what basis the leaderboard should display information but would like to avoid the complexity in that. However, if that is needed I will do it. &#xD;&#xA;&#xD;&#xA;Anyone that can give me some advice on how to design the presentation of this would be highly appreciated?" />
  <row Id="19104" PostHistoryTypeId="24" PostId="9250" RevisionGUID="7787fff8-bba9-4aee-bad6-6a369b11722f" CreationDate="2011-03-03T20:15:39.140" Comment="Proposed by 1198 approved by 14 edit id of 59" />
  <row Id="19105" PostHistoryTypeId="25" PostId="9265" RevisionGUID="6b97fdde-8f13-4d66-a73f-f7b03f374734" CreationDate="2011-03-03T20:23:09.397" Comment="http://twitter.com/#!/StackGameDev/status/43406074627375104" />
  <row Id="19106" PostHistoryTypeId="2" PostId="9271" RevisionGUID="91e3d268-7c06-4a42-82e6-e6457a174151" CreationDate="2011-03-03T20:58:14.720" UserId="154" Text="To make retail games for a console you need to become an officially licensed developer. Each console manufacturer has a slightly different process for this, but it involves showing them that your team is capable to building and completing projects. If you've never shipped anything don't expect to get past this hurdle.&#xD;&#xA;&#xD;&#xA;Once you've got a license then you'll need to purchase development hardware. The cost of the hardware is [~$10k per machine][1].  &#xD;&#xA;&#xD;&#xA;In the course of building your game you will need to get at least a distribution deal with an officially licensed publisher. You will also need to pass your game concept through each console manufacturer for approval. They each can accept or decline your title for their system.&#xD;&#xA;&#xD;&#xA;Once the game is finished you again have to submit to the console owner for final approval and then pay them to manufacture the product. Distribution to stores is then handled by your publisher. &#xD;&#xA;&#xD;&#xA;Basically the retail console space is a controlled market for established teams only.&#xD;&#xA;&#xD;&#xA;To short circuit this whole process, MS put together XNA and the Community/Indie part of XBLA. XNA requires C# and doesn't give you complete access to the hardware, but in exchange you can develop and test on retail systems, don't need a developer license, and only have to pay a small fee to distribute digitally.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.engadget.com/2007/11/19/sony-slashes-ps3-dev-kit-cost-by-half/" />
  <row Id="19107" PostHistoryTypeId="5" PostId="9253" RevisionGUID="5785acc0-3088-4970-9a8b-8176bda23fd2" CreationDate="2011-03-03T21:08:30.470" UserId="5839" Comment="added 60 characters in body" Text="I'm curious. How is the development to a game console? Do I need to use some Game engine , and after, compile to this plattform?&#xD;&#xA;&#xD;&#xA;What IDE is used? Any C++ IDE?&#xD;&#xA;&#xD;&#xA;All console games are built in C++?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;**Edited:**&#xD;&#xA;Thanks Everyone for such excellent answers!" />
  <row Id="19109" PostHistoryTypeId="2" PostId="9273" RevisionGUID="8217bec2-bafd-49b8-9f56-5faedc740997" CreationDate="2011-03-03T21:15:28.020" UserId="154" Text="The closest thing I can think of to what you are talking about is [Die by the Sword][1]. It was a hack'n'slash that didn't have any fixed moves. Instead you used either the numberpad or the mouse to directly control the weapon arm. The end result was frankly a bit difficult to control, but did have the occasional moments of brilliance particularly in multiplayer. &#xD;&#xA;&#xD;&#xA;The biggest problem here is in getting players to make the mental translation between input and what's occurring on screen. Things like the WiiMote, Move, and Kinect can shorten that mental gap between what the player and avatar are doing. Although any block attacks will continue to create a disconnect.&#xD;&#xA;&#xD;&#xA;In the more experimental spaces, other games that play with direct control of limbs as opposed to pre-recorded movements include [QWOP][2] and [Toribash][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Die_by_the_Sword&#xD;&#xA;  [2]: http://www.foddy.net/Athletics.html&#xD;&#xA;  [3]: http://www.toribash.com/" />
  <row Id="19110" PostHistoryTypeId="2" PostId="9274" RevisionGUID="f0481f23-673d-4f13-b406-c04052f6f7ad" CreationDate="2011-03-03T21:51:09.047" UserId="5358" Text="You could base the ranking on a &quot;weighted&quot; average. For instance, the number of games played would have a smaller weight in the average compared to the number of correct answers. That way you provide a general ranking based on different information.&#xD;&#xA;It's also a nice &quot;feature&quot; for the user to be able to look at rankings according to specific info." />
  <row Id="19111" PostHistoryTypeId="2" PostId="9275" RevisionGUID="80cf98db-b7ee-443a-ae98-bd4e091c4c63" CreationDate="2011-03-03T21:51:36.483" UserId="1156" Text="*[Hypothetically]* I have just finished my game engine/library/framework.   &#xD;&#xA;Now, I want to share it with people who may find it useful in their projects. Where can I advertise it to gain users?" />
  <row Id="19112" PostHistoryTypeId="1" PostId="9275" RevisionGUID="80cf98db-b7ee-443a-ae98-bd4e091c4c63" CreationDate="2011-03-03T21:51:36.483" UserId="1156" Text="Where can I advertise my engine/library/framework to attract users?" />
  <row Id="19113" PostHistoryTypeId="3" PostId="9275" RevisionGUID="80cf98db-b7ee-443a-ae98-bd4e091c4c63" CreationDate="2011-03-03T21:51:36.483" UserId="1156" Text="&lt;engine&gt;&lt;programming&gt;&lt;framework&gt;" />
  <row Id="19114" PostHistoryTypeId="5" PostId="9275" RevisionGUID="64622c21-e1bb-4e39-b707-d9085268e2c9" CreationDate="2011-03-03T21:57:58.473" UserId="1156" Comment="added 96 characters in body" Text="*[Hypothetically]* I have just finished my game engine/library/framework.   &#xD;&#xA;Now, I want to share it with people who may find it useful in their projects. Where can I advertise it to gain users?&#xD;&#xA;&#xD;&#xA;EDIT: By advertise, I mean to spread the word of its existence - not advertise it for money." />
  <row Id="19115" PostHistoryTypeId="2" PostId="9276" RevisionGUID="a9f6b3e6-fd13-4304-b521-26e0c4fbb182" CreationDate="2011-03-03T21:59:21.600" UserId="5358" Text="Social networks. It may sound a little stupid, but lots of people use them, and you are generally connected to people with the same interests as you, so it can be a good place to get a little exposure.&#xD;&#xA;&#xD;&#xA;Having a website for the engine/lib/framework may also be a good idea, it will make the project look a little more professional. Then depending on the type of project, some screenshots will allow people to see the level of quality. Some getting started tutorials will also allow users to quickly start using the projects.&#xD;&#xA;&#xD;&#xA;Message boards too can be a good place to advertise your project, and to allow for feedback too." />
  <row Id="19116" PostHistoryTypeId="2" PostId="9277" RevisionGUID="3bb49110-3fb2-40bd-b020-e82729116099" CreationDate="2011-03-03T22:24:45.580" UserId="4788" Text="does it make sense to implement the logics to do not render objects outside the viewport or should I not care about it and let the Framework do it?" />
  <row Id="19117" PostHistoryTypeId="1" PostId="9277" RevisionGUID="3bb49110-3fb2-40bd-b020-e82729116099" CreationDate="2011-03-03T22:24:45.580" UserId="4788" Text="Optimizing an XNA 2D game" />
  <row Id="19118" PostHistoryTypeId="3" PostId="9277" RevisionGUID="3bb49110-3fb2-40bd-b020-e82729116099" CreationDate="2011-03-03T22:24:45.580" UserId="4788" Text="&lt;optimization&gt;&lt;xna-4.0&gt;" />
  <row Id="19119" PostHistoryTypeId="2" PostId="9278" RevisionGUID="1ee6a4ad-f349-457f-9287-083dcc6392ea" CreationDate="2011-03-03T22:26:00.933" UserDisplayName="user5850" Text="I suggest you study the code of PowerManga as a reference. They have two kind of levels: side-scrolling (tyrian-like) levels where things are positioned at a specific distance from level start and other things are randomly generated, and &quot;still&quot; levels (à la galaga) where one wave is parsed only after the previous one has finished its pattern.&#xD;&#xA;&#xD;&#xA;Wave patterns can of course efficiently be planned by successive bezier curves (wikipedia page has a neat animation to explain that).&#xD;&#xA;&#xD;&#xA;If I can afford a final comment, I'd completely drop XML here in favour of something more expressive, easier to maintain and more useful in game programming such as a LUA script. &#xD;&#xA;&#xD;&#xA;HTH." />
  <row Id="19120" PostHistoryTypeId="2" PostId="9279" RevisionGUID="515aa025-a509-46ec-9284-343d815e6086" CreationDate="2011-03-03T22:40:07.387" UserId="1198" Text="According to the a post on the forums at MSDN, XNA framework does not do frustum culling:&#xD;&#xA;&#xD;&#xA;&gt; XNA framework will not do any frustum culling for you - it could not becuase it has no clue where anything will actually end up. All the transformations are done o nthe GPU and could be a custom shader.&#xD;&#xA;&#xD;&#xA;-- http://forums.create.msdn.com/forums/p/22763/121897.aspx&#xD;&#xA;&#xD;&#xA;This posted goes on to say, that if you have a lot of objects in your scene, it might be worth rolling your own." />
  <row Id="19121" PostHistoryTypeId="5" PostId="9277" RevisionGUID="3ce1d18b-94ef-42ab-a9c7-62ac94c4ebd1" CreationDate="2011-03-03T22:44:42.870" UserId="1198" Comment="Fixed caps, re-worded." Text="Does it make sense to implement the logic to skip rendering objects outside the viewport or should I not care about it and let the Framework do it?" />
  <row Id="19122" PostHistoryTypeId="24" PostId="9277" RevisionGUID="3ce1d18b-94ef-42ab-a9c7-62ac94c4ebd1" CreationDate="2011-03-03T22:44:42.870" Comment="Proposed by 1198 approved by 51 edit id of 60" />
  <row Id="19123" PostHistoryTypeId="6" PostId="9277" RevisionGUID="c03c49ae-cfa7-458e-989f-d9d8564e9615" CreationDate="2011-03-03T22:49:15.323" UserId="1198" Comment="edited tags" Text="&lt;xna&gt;&lt;2d&gt;&lt;optimization&gt;&lt;xna-4.0&gt;" />
  <row Id="19124" PostHistoryTypeId="2" PostId="9280" RevisionGUID="78935ac7-3734-45d8-a13a-1c4bdb3ba0b8" CreationDate="2011-03-03T22:52:11.303" UserId="5007" Text="When you plan a game, or even when you already made a game, and its time to publish, you wonder how much of your audience is covered by the game technology demands.&#xD;&#xA;&#xD;&#xA;I'm directing this essentialy to casual games, as i constantly see people having old laptops and being unable to replace them. Laptops with integrated cards whose OpenGL version doesn't even support textures larger than 1024x1024. These people may be avid gamers as well, and a reasonable share of the audience to consider giving them the chance to play casual games, once they cannot play any blockbusters.&#xD;&#xA;&#xD;&#xA;As i've seen happening, a very &quot;noticeable&quot; example is Angry Birds. It's gameplay is merely casual(i think nobody disagrees here) and still, it uses so high resolution textures that at least OpenGL 2.0 or around is needed, which blocks away a lot of people. &#xD;&#xA;&#xD;&#xA;So, the actual question is: what is a good tradeoff for this issue? Would it be better to just sacrifice the texture resolution for everyone, but have more supported hardware? Would it be better to keep the high quality and just slice the textures into smaller ones, sacrificing the performance a little bit? What else?&#xD;&#xA;&#xD;&#xA;Any ideas about this topic are welcome for discussion.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="19125" PostHistoryTypeId="1" PostId="9280" RevisionGUID="78935ac7-3734-45d8-a13a-1c4bdb3ba0b8" CreationDate="2011-03-03T22:52:11.303" UserId="5007" Text="How to cover the widest range of computers when publishing?" />
  <row Id="19126" PostHistoryTypeId="3" PostId="9280" RevisionGUID="78935ac7-3734-45d8-a13a-1c4bdb3ba0b8" CreationDate="2011-03-03T22:52:11.303" UserId="5007" Text="&lt;hardware-acceleration&gt;" />
  <row Id="19127" PostHistoryTypeId="2" PostId="9281" RevisionGUID="31e5dc33-bf90-4331-8a56-296b4fba5289" CreationDate="2011-03-03T23:10:07.043" UserId="20" Text="If it's an open source project, you might consider putting it on [SourceForge][1] and/or link it to [Ohloh][2]. People might like what you created and will (hopefully) give positive feedback/ratings on these platforms which can increase the popularity of your project. That way you might even find some developers who will help you improve the software you wrote.&#xD;&#xA;&#xD;&#xA;Having a dedicated Website for the product and maybe a Twitter feed/account won't hurt either.&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/&#xD;&#xA;  [2]: http://www.ohloh.net/" />
  <row Id="19128" PostHistoryTypeId="25" PostId="9277" RevisionGUID="ce011996-a5bc-4060-a31c-d6ce7477cf33" CreationDate="2011-03-03T23:23:09.633" Comment="http://twitter.com/#!/StackGameDev/status/43451374016540672" />
  <row Id="19129" PostHistoryTypeId="2" PostId="9282" RevisionGUID="00ba0ccc-0270-49d2-97c3-42e0972f1d25" CreationDate="2011-03-03T23:44:45.203" UserId="4410" Text="Do you want to capture the screenshot from within the game for some purpose, or from a development PC?&#xD;&#xA;&#xD;&#xA;From the development PC there are simple facilities provided, you easily use the Target Manager SDK to achieve this (you'll need to read the full description to see what else you need to set up as specifics are NDA'd).&#xD;&#xA;&#xD;&#xA;From within the game, the simplest way is to insert something after the frame has been rendered to first flush the GPU (to ensure that everything has finished being rendered before you continue). The game should have a pointer to the current frame buffer somewhere, you'll know the format of that buffer (the stride, etc), you can then do what you want, including writing it out in a format of your own choice with a little work." />
  <row Id="19130" PostHistoryTypeId="5" PostId="9280" RevisionGUID="3644cab5-04ce-4497-b2d9-c1709a6623ae" CreationDate="2011-03-03T23:51:12.127" UserId="1198" Comment="&quot;i&quot; and fixed spacing." Text="When you plan a game, or even when you already made a game, and its time to publish, you wonder how much of your audience is covered by the game technology demands.&#xD;&#xA;&#xD;&#xA;I'm directing this essentialy to casual games, as I constantly see people having old laptops and being unable to replace them. Laptops with integrated cards whose OpenGL version doesn't even support textures larger than 1024x1024. These people may be avid gamers as well, and a reasonable share of the audience to consider giving them the chance to play casual games, once they cannot play any blockbusters.&#xD;&#xA;&#xD;&#xA;As I've seen happening, a very &quot;noticeable&quot; example is Angry Birds. It's gameplay is merely casual (I think nobody disagrees here) and still, it uses so high resolution textures that at least OpenGL 2.0 or around is needed, which blocks away a lot of people. &#xD;&#xA;&#xD;&#xA;So, the actual question is: what is a good tradeoff for this issue? Would it be better to just sacrifice the texture resolution for everyone, but have more supported hardware? Would it be better to keep the high quality and just slice the textures into smaller ones, sacrificing the performance a little bit? What else?&#xD;&#xA;&#xD;&#xA;Any ideas about this topic are welcome for discussion." />
  <row Id="19131" PostHistoryTypeId="24" PostId="9280" RevisionGUID="3644cab5-04ce-4497-b2d9-c1709a6623ae" CreationDate="2011-03-03T23:51:12.127" Comment="Proposed by 1198 approved by 51 edit id of 61" />
  <row Id="19132" PostHistoryTypeId="2" PostId="9283" RevisionGUID="2227ee34-7842-4952-88c8-b5b86e9e11a0" CreationDate="2011-03-03T23:55:46.317" UserId="4410" Text="Just look at what the big games do. They have the ability to scale. Some automatically, some manually.&#xD;&#xA;&#xD;&#xA;Detect the capabilities of the platform you're trying to run on and adapt as best you can. Maybe ship with assets at different levels of detail and use the highest you can." />
  <row Id="19133" PostHistoryTypeId="2" PostId="9284" RevisionGUID="a9c3a625-b1c7-4e34-ab48-8cab5d2cc81d" CreationDate="2011-03-04T01:35:44.400" UserId="395" Text="Look at titles like World of Warcraft, do more artistically with fewer polys and shaders. My favorite example of this is the draw distance in the original Silent Hill, through the use of careful design most players barely notice the actual draw distance being so low, they are aware of it only as a game element." />
  <row Id="19134" PostHistoryTypeId="2" PostId="9285" RevisionGUID="f77fa570-a963-4b9d-a254-9078e1aceea0" CreationDate="2011-03-04T02:02:24.970" UserId="395" Text="The PS3 runs a variant of OpenGL ES (which is the same thing most mobile devices are using), though I don't know of anyone that actually uses OpenGL directly. http://www.bit-101.com/blog/?p=1861 shows how to create a screenshot an an iPhone, I wouldn't expect it to be very different." />
  <row Id="19135" PostHistoryTypeId="25" PostId="9275" RevisionGUID="6bb4cf49-0904-4136-8a41-fb9a516a681e" CreationDate="2011-03-04T02:23:09.323" Comment="http://twitter.com/#!/StackGameDev/status/43496671652478978" />
  <row Id="19139" PostHistoryTypeId="2" PostId="9287" RevisionGUID="0519bed0-a64b-4f6e-a9b4-6d145575c018" CreationDate="2011-03-04T02:39:16.553" UserId="5768" Text="Honestly I've read killer game programming in java and I couldn't absorb it. It's supposed to be the best resources but it doesn't even compile.  Start with something easy for sure though. Supposedly this book is a great place to start:&#xD;&#xA;&#xD;&#xA;http://www.brackeen.com/javagamebook/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19140" PostHistoryTypeId="2" PostId="9288" RevisionGUID="0b6fcc2c-a6b5-4aef-9b53-09624c2fbee5" CreationDate="2011-03-04T02:58:21.507" UserId="2229" Text="Dear all, this is going to be tough: I have created a game object factory that generates objects of my wish. However, I get memory leaks which I can not fix. &#xD;&#xA;&#xD;&#xA;Memory leaks are generated by **return new Object();** in the bottom part of the code sample.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	static BaseObject * CreateObjectFunc()&#xD;&#xA;	{&#xD;&#xA;		return new Object();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;How and where to delete the pointers? I wrote **bool ReleaseClassType()**. Despite the factory works well, ReleaseClassType() does not fix memory leaks.&#xD;&#xA;&#xD;&#xA;    bool ReleaseClassTypes()&#xD;&#xA;	{&#xD;&#xA;		unsigned int nRecordCount = vFactories.size();&#xD;&#xA;		for (unsigned int nLoop = 0; nLoop &lt; nRecordCount; nLoop++ )&#xD;&#xA;		{&#xD;&#xA;			// if the object exists in the container and is valid, then render it&#xD;&#xA;			if( vFactories[nLoop] != NULL) &#xD;&#xA;				delete vFactories[nLoop]();&#xD;&#xA;		}&#xD;&#xA;		return true;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Before taking a look at the code below, let me help you in that my CGameObjectFactory creates **pointers to functions** creating particular object type. The pointers are stored within vFactories vector container.&#xD;&#xA;&#xD;&#xA;I have chosen this way because I parse an object map file. I have object type IDs (integer values) which I need to translate them into real objects. Because I have over 100 different object data types, I wished to avoid continuously traversing very long Switch() statement.&#xD;&#xA;&#xD;&#xA;Therefore, to create an object, I call **vFactories[nEnumObjectTypeID]()** via CGameObjectFactory::create() to call stored function that generates desired object. &#xD;&#xA;&#xD;&#xA;The position of the appropriate function in the vFactories is identical to the nObjectTypeID, so I can use indexing to access the function.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So the question remains, **how to proceed with garbage collection and avoid reported memory leaks?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #ifndef GAMEOBJECTFACTORY_H_UNIPIXELS&#xD;&#xA;    #define GAMEOBJECTFACTORY_H_UNIPIXELS&#xD;&#xA;    &#xD;&#xA;    //#include &quot;MemoryManager.h&quot;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    template &lt;typename BaseObject&gt;&#xD;&#xA;    class CGameObjectFactory&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;    	// cleanup and release registered object data types&#xD;&#xA;    	bool ReleaseClassTypes()&#xD;&#xA;    	{&#xD;&#xA;    		unsigned int nRecordCount = vFactories.size();&#xD;&#xA;    		for (unsigned int nLoop = 0; nLoop &lt; nRecordCount; nLoop++ )&#xD;&#xA;    		{&#xD;&#xA;    			// if the object exists in the container and is valid, then render it&#xD;&#xA;    			if( vFactories[nLoop] != NULL) &#xD;&#xA;    				delete vFactories[nLoop]();&#xD;&#xA;    		}&#xD;&#xA;    		return true;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// register new object data type&#xD;&#xA;    	template &lt;typename Object&gt;&#xD;&#xA;    	bool RegisterClassType(unsigned int nObjectIDParam )&#xD;&#xA;    	{&#xD;&#xA;    		if(vFactories.size() &lt; nObjectIDParam) vFactories.resize(nObjectIDParam);&#xD;&#xA;    &#xD;&#xA;    		vFactories[nObjectIDParam] = &amp;CreateObjectFunc&lt;Object&gt;;&#xD;&#xA;    		return true;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	// create new object by calling the pointer to the appropriate type function&#xD;&#xA;    	BaseObject* create(unsigned int nObjectIDParam) const&#xD;&#xA;    	{&#xD;&#xA;    		return vFactories[nObjectIDParam]();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	// resize the vector array containing pointers to function calls&#xD;&#xA;    	bool resize(unsigned int nSizeParam)&#xD;&#xA;    	{&#xD;&#xA;    		vFactories.resize(nSizeParam);&#xD;&#xA;    		return true;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    private:&#xD;&#xA;    	//DECLARE_HEAP;&#xD;&#xA;    &#xD;&#xA;    	template &lt;typename Object&gt;&#xD;&#xA;    	static BaseObject * CreateObjectFunc()&#xD;&#xA;    	{&#xD;&#xA;    		return new Object();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	typedef BaseObject*(*factory)();&#xD;&#xA;    	std::vector&lt;factory&gt; vFactories;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    //DEFINE_HEAP_T(CGameObjectFactory, &quot;Game Object Factory&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif // GAMEOBJECTFACTORY_H_UNIPIXELS" />
  <row Id="19141" PostHistoryTypeId="1" PostId="9288" RevisionGUID="0b6fcc2c-a6b5-4aef-9b53-09624c2fbee5" CreationDate="2011-03-04T02:58:21.507" UserId="2229" Text="Game Object Factory: Fixing Memory Leaks" />
  <row Id="19142" PostHistoryTypeId="3" PostId="9288" RevisionGUID="0b6fcc2c-a6b5-4aef-9b53-09624c2fbee5" CreationDate="2011-03-04T02:58:21.507" UserId="2229" Text="&lt;c++&gt;" />
  <row Id="19143" PostHistoryTypeId="2" PostId="9289" RevisionGUID="4ce7b7cb-8198-4d61-a178-df919820f985" CreationDate="2011-03-04T03:06:16.507" UserId="288" Text="Culling is a performance optimisation. So it doesn't make sense to just do it just for the sake of it. You have to have a reason.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The GPU (not the XNA Framework) culls triangles and pixels at blindingly fast speed. Every triangle you submit must be transformed (via your vertex shader). Then it culls the ones that land off screen. Then it fills the remaining triangles, culling pixels that are off-screen. The remaining pixels are then drawn to the back buffer (via your pixel shader).&#xD;&#xA;&#xD;&#xA;(When I say &quot;then&quot; - it actually does all this in a massively parallel pipeline.)&#xD;&#xA;&#xD;&#xA;So it's very rare and unusual that you might have to cull individual triangles. To hit vertex limits you have to be drawing an absurdly large number of triangles.&#xD;&#xA;&#xD;&#xA;To hit fill-rate, texture-fetch or pixel-shading limits, you generally need to have a high depth-complexity (in which case viewport/frustum culling will not help).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;So there's usually little or no cost to having geometry off-screen.&#xD;&#xA;&#xD;&#xA;The cost - particularly in the context of drawing &quot;objects&quot; (usually 3D objects) - is actually **in submitting those objects to the GPU in the first place**. Submit too many objects and you hit your batch limit (you get a few hundred batches per frame).&#xD;&#xA;&#xD;&#xA;I recommend reading &lt;a href=&quot;http://gamedev.stackexchange.com/questions/8521/the-practical-cost-of-swapping-effects/8533#8533&quot;&gt;this answer&lt;/a&gt; and this linked &lt;a href=&quot;http://developer.nvidia.com/docs/IO/8230/BatchBatchBatch.pdf&quot;&gt;slide deck&lt;/a&gt; for an in depth description of batches.&#xD;&#xA;&#xD;&#xA;Because of this, if you implement frustum culling, you can reduce the number of batches you submit to the GPU. If you're batch limited - this can get you under the limit.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now - your question is about 2D XNA - so presumably you are using `SpriteBatch`. **This is a bit different.**&#xD;&#xA;&#xD;&#xA;It is no mistake that it is called &quot;Sprite *Batch*&quot;. What it is doing is taking the sprites you draw and doing the best it can to submit those sprites to the GPU in *as few batches as possible* by batching them together.&#xD;&#xA;&#xD;&#xA;But SpriteBatch will be forced to start a new batch if:&#xD;&#xA;&#xD;&#xA; - You draw more sprites than it can fit into a single batch (I don't know the number any more, but I think it's in the hundreds)&#xD;&#xA; - You change texture (this is why there is a sort-by-texture option)&#xD;&#xA;&#xD;&#xA;So culling is a suitable optimisation if you are running into the first one. If you are sending such a huge number of sprites that you end up with too many batches (you're probably using up bandwidth as well - but I'm pretty sure you'll hit the batch limit first). This will generally only happen if you have a truly enormous world - so you can generally get away with very simplistic, fast-but-inaccurate culling in this case.&#xD;&#xA;&#xD;&#xA;Now - If you are drawing with enough texture-swaps to take you over the batch limit, *and* lots of them are actually off-screen ***and*** culling them would get you under the batch limit. Then yes - culling is an optimisation that will work.&#xD;&#xA;&#xD;&#xA;**However** - a better optimisation to pursue in this case is to use **texture atlases** (aka: sprite sheets). This allows you to reduce the number of texture-swaps and therefore batches - *regardless* of what is on screen or off. (This is the main reason you can specify a source rectangle for your sprites.)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;(As always: this is advice on performance optimisation. So you should measure and understand your game's own performance, and what limits you are hitting, before spending effort on adding optimisations.)" />
  <row Id="19144" PostHistoryTypeId="5" PostId="9289" RevisionGUID="9c504af1-c1b4-4f3e-9baf-e065fffd700c" CreationDate="2011-03-04T03:11:22.790" UserId="288" Comment="deleted 3 characters in body" Text="Culling is a performance optimisation. So it doesn't make sense to just do it just for the sake of it. You have to have a reason.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The GPU (not the XNA Framework) culls triangles and pixels at blindingly fast speed. Every triangle you submit must be transformed (via your vertex shader). Then it culls the ones that land off screen. Then it fills the remaining triangles, culling pixels that are off-screen. The remaining pixels are then drawn to the back buffer (via your pixel shader).&#xD;&#xA;&#xD;&#xA;(When I say &quot;then&quot; - it actually does all this in a massively parallel pipeline.)&#xD;&#xA;&#xD;&#xA;So it's very rare and unusual that you might have to cull individual triangles. To hit vertex limits you have to be drawing an absurdly large number of triangles. To hit fill-rate, texture-fetch or pixel-shading limits, you generally need to have a high depth-complexity (in which case viewport/frustum culling will not help).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;So there's usually little or no cost to having geometry off-screen.&#xD;&#xA;&#xD;&#xA;The cost - particularly in the context of drawing &quot;objects&quot; (usually 3D objects) - is actually **in submitting those objects to the GPU in the first place**. Submit too many objects and you hit your batch limit (you get a few hundred batches per frame).&#xD;&#xA;&#xD;&#xA;I recommend reading &lt;a href=&quot;http://gamedev.stackexchange.com/questions/8521/the-practical-cost-of-swapping-effects/8533#8533&quot;&gt;this answer&lt;/a&gt; and this linked &lt;a href=&quot;http://developer.nvidia.com/docs/IO/8230/BatchBatchBatch.pdf&quot;&gt;slide deck&lt;/a&gt; for an in depth description of batches.&#xD;&#xA;&#xD;&#xA;Because of this, if you implement frustum culling, you can reduce the number of batches you submit to the GPU. If you're batch limited - this can get you under the limit.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now - your question is about 2D XNA - so presumably you are using `SpriteBatch`. **This is a bit different.**&#xD;&#xA;&#xD;&#xA;It is no mistake that it is called &quot;Sprite *Batch*&quot;. What it is doing is taking the sprites you draw and doing the best it can to submit those sprites to the GPU in *as few batches as possible* by batching them together.&#xD;&#xA;&#xD;&#xA;But SpriteBatch will be forced to start a new batch if:&#xD;&#xA;&#xD;&#xA; - You draw more sprites than it can fit into a single batch (I don't know the number any more, but I think it's in the hundreds)&#xD;&#xA; - You change texture (this is why there is a sort-by-texture option)&#xD;&#xA;&#xD;&#xA;So culling is a suitable optimisation if you are running into the first one. If you are sending such a huge number of sprites that you end up with too many batches (you're probably using up bandwidth as well - but I'm pretty sure you'll hit the batch limit first). This will generally only happen if you have a truly enormous world - so you can generally get away with very simplistic, fast-but-inaccurate culling in this case.&#xD;&#xA;&#xD;&#xA;Now - If you are drawing with enough texture-swaps to take you over the batch limit, *and* lots of them are actually off-screen ***and*** culling them would get you under the batch limit. Then yes - culling is an optimisation that will work.&#xD;&#xA;&#xD;&#xA;**However** - a better optimisation to pursue in this case is to use **texture atlases** (aka: sprite sheets). This allows you to reduce the number of texture-swaps and therefore batches - *regardless* of what is on screen or off. (This is the main reason you can specify a source rectangle for your sprites.)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;(As always: this is advice on performance optimisation. So you should measure and understand your game's own performance, and what limits you are hitting, before spending effort on adding optimisations.)" />
  <row Id="19149" PostHistoryTypeId="2" PostId="9292" RevisionGUID="f1a3ea8d-48a2-42d3-8cca-7655a804b8b6" CreationDate="2011-03-04T03:56:34.583" UserId="5855" Text="I asked this earlier in [this thread][1] at stackoverflow.com. One of the early comments redirected me here to gamedev.stackexchange.com, so I'm reposting here.&#xD;&#xA;&#xD;&#xA;Searching for related questions I found a number of very specific questions, but I'm afraid the specifics have proved fruitless for me and after 4 hours on Google I'm no closer than I started, so I felt reaching out to a community might be in order.&#xD;&#xA;&#xD;&#xA;First, my goal: I've never made a game before, although I've muddled over the possibility several times. I decided to finally sit down and start learning how to code games, use game engines, etc. All so that one day (hopefully soon) I'll be able to make functional (albeit simple) games. I can start adding complexity later, for now I'd be glad to have a keyboard-controlled camera moving in a 3D world with no interaction beyond that.&#xD;&#xA;&#xD;&#xA;My background: I've worked in SEVERAL programming languages ranging from PHP to C++ to Java to ASM. I'm not afraid of any challenges that come with learning the new syntax or limitations inherent in a new language. All of my past programming experience, however, has been strictly non-graphical and usually with little or extremely simple interaction during execution. I've created extensive and brilliant algorithms for solving logical and mathematical problems as well as graphing problems. However in every case input was either defined in a file, passed form an HTML form, or typed into the console. Real-time interaction with the user is something with which I have no experience.&#xD;&#xA;&#xD;&#xA;My question: Where should I start in trying to make games? Better yet- where should I start in trying to create a keyboard-navigable 3D environment? In searching online I've found several resources linking to game engines, graphics engines, and physics engines. Here's a brief summary of my experiences with a few engines I tried:&#xD;&#xA;&#xD;&#xA;Unreal SDK: The tutorial videos assume that you already have in-depth knowledge of 3D modeling, graphics engines, animations, etc. The &quot;Getting Started&quot; page offers no formal explanation of game development but jumps into how Unreal can streamline processes it assumes you're already familiar with. After downloading the SDK and launching it to see if the tools were as intuitive as they claimed, I was greeted with about 60 buttons and a blank void for my 3D modeling. Clicking on &quot;add volume&quot; (to attempt to add a basic cube) I was met with a menu of 30 options. Panicking, I closed the editor.&#xD;&#xA;&#xD;&#xA;Crystal Space: The website seemed rather informative, explaining that Crystal Space was just for graphics and the companion software, CEL, provided entity logic for making games. A demo game was provided, which was built using &quot;CELStart&quot;, their simple tool for people with no knowledge of game programming. I launched the game to see what I might look forward to creating. It froze several times, the menus were buggy, there were thousands of graphical glitches, enemies didn't respond to damage, and when I closed the game it locked up. Gave up on that engine.&#xD;&#xA;&#xD;&#xA;IrrLicht: The tutorial assumes I have Visual Studio 6.0 (I have Visual Studio 2010). Following their instructions I was unable to properly import the library into Visual Studio and unable to call any of the functions that they kept using. Manually copying header files, class files, and DLLs into my project's folder - the project failed to properly compile.&#xD;&#xA;&#xD;&#xA;Clearly I'm not off to a good start and I'm going in circles. Can someone point me in the right direction? Should I start by downloading a program like Blender and learning 3D modeling, or should I be learning how to use a graphics engine? Should I look for an all-inclusive game engine, or is it better to try and code my own game logic? If anyone has actually made their own games, I would prefer to hear how they got their start.&#xD;&#xA;&#xD;&#xA;Also- taking classes at my school is not an option. Nothing is offered.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5189399/where-to-start-with-game-development" />
  <row Id="19150" PostHistoryTypeId="1" PostId="9292" RevisionGUID="f1a3ea8d-48a2-42d3-8cca-7655a804b8b6" CreationDate="2011-03-04T03:56:34.583" UserId="5855" Text="Where to start with game development?" />
  <row Id="19151" PostHistoryTypeId="3" PostId="9292" RevisionGUID="f1a3ea8d-48a2-42d3-8cca-7655a804b8b6" CreationDate="2011-03-04T03:56:34.583" UserId="5855" Text="&lt;3d&gt;&lt;graphics&gt;" />
  <row Id="19156" PostHistoryTypeId="2" PostId="9294" RevisionGUID="49a59bea-66bd-4c5a-9fef-2ad4e6654fdb" CreationDate="2011-03-04T04:13:09.397" UserId="2778" Text="I have asked such a question when I joined GD. Here are some links that might be of interest to you which I hope will guide you toward your objective.&#xD;&#xA;&#xD;&#xA;In short, I would go with `XNA Game Studio` to get a grip on game development. Then, moving forward to what you wish to achieve as knowledge/technology. `XNA` taught me about working with sprites, and allowed me to apply some of my knowledge right from the beginning of my learning curve so that I have been able to get a grasp fast enough to understand how I should design my game to use classes while working with dependency injection and so forth. So, I'm keeping waiting no more.&#xD;&#xA;&#xD;&#xA;1. [Where to start writing games, any tutorials or the like?][1]&#xD;&#xA;2. [What are the fundamentals of game development?][2] (Interesting question, IMHO)&#xD;&#xA;3. [which is the suggested language for begining game development for a beginner][3]&#xD;&#xA;4. [Separating physics and game logic from UI code][4]&#xD;&#xA;5. [Moving my sprite in XNA using classes][5]&#xD;&#xA;&#xD;&#xA;Why XNA will you ask? Simply because of your Java background. XNA uses C# which is similar to Java on some multiple ways, and is also a simple framework to use which abstracts away the Game Loop and stuff so that you may concentrate on what is important.&#xD;&#xA;&#xD;&#xA;I really do hope this will get you starting. =)&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7657/where-to-start-writing-games-any-tutorials-or-the-like&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8995/what-are-the-fundamentals-of-game-development/8999#8999&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/8695/which-is-the-suggested-language-for-begining-game-development-for-a-beginner/8698#8698&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/8195/separating-physics-and-game-logic-from-ui-code/8198#8198&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/8055/moving-my-sprite-in-xna-using-classes/8057#8057" />
  <row Id="19157" PostHistoryTypeId="2" PostId="9295" RevisionGUID="7c8bf07e-3667-41d7-ad37-888d81275e15" CreationDate="2011-03-04T04:17:44.203" UserId="2137" Text="So being a primarily c/c++ developer, I've always thought that the only option for mobile game development for me was using iOS, which allows for c/c++ (and minimising objective C).&#xD;&#xA;&#xD;&#xA;I heard from a friend though, that android has a native development toolkit which allows for c++ code to work on android.&#xD;&#xA;&#xD;&#xA;Has anyone used this, and if so, how do you find it? I mean, will it &quot;just work&quot; like iOS, or are there more considerations that need to be taken care of due to the wide variety of android devices available?" />
  <row Id="19158" PostHistoryTypeId="1" PostId="9295" RevisionGUID="7c8bf07e-3667-41d7-ad37-888d81275e15" CreationDate="2011-03-04T04:17:44.203" UserId="2137" Text="Android game development in c++" />
  <row Id="19159" PostHistoryTypeId="3" PostId="9295" RevisionGUID="7c8bf07e-3667-41d7-ad37-888d81275e15" CreationDate="2011-03-04T04:17:44.203" UserId="2137" Text="&lt;c++&gt;&lt;android&gt;" />
  <row Id="19160" PostHistoryTypeId="5" PostId="9294" RevisionGUID="72e4ca44-2245-4958-8d7f-a0c1a2b672d7" CreationDate="2011-03-04T04:18:17.427" UserId="2778" Comment="added 4 characters in body" Text="I have asked such a question when I joined GD. Here are some links that might be of interest to you which I hope will guide you toward your objective.&#xD;&#xA;&#xD;&#xA;In short, I would go with `XNA Game Studio` to get a grip on game development. Then, moving forward to what you wish to achieve as knowledge/technology. `XNA` taught me about working with sprites, and allowed me to apply some of my knowledge right from the beginning of my learning curve so that I have been able to get a grasp fast enough to understand how I should design my game to use classes while working with dependency injection and so forth. So, I'm keeping you waiting no more.&#xD;&#xA;&#xD;&#xA;1. [Where to start writing games, any tutorials or the like?][1]&#xD;&#xA;2. [What are the fundamentals of game development?][2] (Interesting question, IMHO)&#xD;&#xA;3. [which is the suggested language for begining game development for a beginner][3]&#xD;&#xA;4. [Separating physics and game logic from UI code][4]&#xD;&#xA;5. [Moving my sprite in XNA using classes][5]&#xD;&#xA;&#xD;&#xA;Why XNA will you ask? Simply because of your Java background. XNA uses C# which is similar to Java on some multiple ways, and is also a simple framework to use which abstracts away the Game Loop and stuff so that you may concentrate on what is important.&#xD;&#xA;&#xD;&#xA;I really do hope this will get you starting. =)&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7657/where-to-start-writing-games-any-tutorials-or-the-like&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8995/what-are-the-fundamentals-of-game-development/8999#8999&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/8695/which-is-the-suggested-language-for-begining-game-development-for-a-beginner/8698#8698&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/8195/separating-physics-and-game-logic-from-ui-code/8198#8198&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/8055/moving-my-sprite-in-xna-using-classes/8057#8057" />
  <row Id="19162" PostHistoryTypeId="2" PostId="9297" RevisionGUID="0a2ddff1-56c5-4c18-952f-ae4409e4f259" CreationDate="2011-03-04T04:46:59.087" UserId="4690" Text="I'm making a [SpaceWar!][1]-esque game using XNA. I want to limit my ships to 5 active bullets at any time. I have a **Bullet** `DrawableGameComponent` and a **Ship** `DrawableGameComponent`. My **Ship** has an array of 5 **Bullet**.&#xD;&#xA;&#xD;&#xA;What is the best way to manage the **Bullet** textures? Specifically, when should I be calling `LoadTexture`? Right now, my solution is to populate the **Bullet** array in the **Ship**'s constructor, with `LoadTexture` being called in the **Bullet** constructor. The **Bullet** objects will be disabled/not visible except when they are active. Does the texture really need to be loaded once for each individual instance of the bullet object? This seems like a very processor-intensive operation.&#xD;&#xA;&#xD;&#xA;Note: This is a small-scale project, so I'm OK with not implementing a huge texture-management framework since there won't be more than half a dozen or so in the entire game. I'd still like to hear about scalable solutions for future applications, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Spacewar!" />
  <row Id="19163" PostHistoryTypeId="1" PostId="9297" RevisionGUID="0a2ddff1-56c5-4c18-952f-ae4409e4f259" CreationDate="2011-03-04T04:46:59.087" UserId="4690" Text="When should a bullet texture be loaded in XNA?" />
  <row Id="19164" PostHistoryTypeId="3" PostId="9297" RevisionGUID="0a2ddff1-56c5-4c18-952f-ae4409e4f259" CreationDate="2011-03-04T04:46:59.087" UserId="4690" Text="&lt;textures&gt;&lt;xna-4.0&gt;&lt;loading&gt;&lt;preload&gt;&lt;game-component&gt;" />
  <row Id="19166" PostHistoryTypeId="2" PostId="9298" RevisionGUID="d35cc622-0f21-4e6a-8355-e8d094fb4b24" CreationDate="2011-03-04T05:20:34.457" UserId="323" Text="&quot;It depends.&quot;&#xD;&#xA;&#xD;&#xA;On a lot of factors.&#xD;&#xA;&#xD;&#xA;First, there's the game style. If you're making Angry Birds 2 then, yeah, it would probably be in your interests to make sure it runs on everything. Your target audience may have a rather crummy computer and the larger you can cast the net, the better. Conversely, if you're making Quake 6: Gorestone Bloodbath, then you can probably get away with not running on a five-year-old platform. Your target audience wouldn't be caught dead with anything that old.&#xD;&#xA;&#xD;&#xA;Second, there's the sheer game requirements. If you're making Angry Birds *3* and your design doc requires that each individual plank of wood be able to split apart into properly-simulated splinters, then your users will have to have a good *computer*, and therefore you can probably rely on your users have a reasonably good graphics card. (Especially with the new Intel integrated graphics.) Conversely, if you're making Bejeweled 3 . . . well, you could run Bejeweled on a wristwatch, so you don't get a free pass to say &quot;yeah, we'll just require more&quot;.&#xD;&#xA;&#xD;&#xA;Finally, there's your own resources. A one-man game studio doesn't have much time to spend to make sure the game functions on absolutely everything under the sun - it may be perfectly sensible to say &quot;okay, we're going to require opengl 2.0, we'll pop up an error message that recommends updating drivers, we're just going with that.&quot; Conversely, if you're a 200-person AAA studio, you may find yourself doing compatibility tests on specific individual network cards.&#xD;&#xA;&#xD;&#xA;In the case of Angry Birds, I would personally implement a fallback to split high-res textures apart, at the cost of some efficiency, and go with that. If I found that a significant number of users were hitting the fallback and then having a bad game experience - but not *such* a bad game experience that I felt it was unsolvable - then I might spend time on a better fallback. But I'd be spending far more time making a good game than trying to eke out percentage points of potential market share. A great game that 95% of humanity can play will sell a hell of a lot more than a mediocre game that 99% of humanity can play.&#xD;&#xA;&#xD;&#xA;And finally, if you're an indie developer making artistic games, remember that the long tail is your friend. If your game is great, ten years from now people will *still* be buying it, and your &quot;OpenGL 2.0, 2gb of RAM required&quot; message will seem laughable compared to the bargain-basement 256gb RAM OpenGL 6.0 machines that Wal-Mart will be selling. I don't think this applies as much to the AAA or casual markets, though." />
  <row Id="19167" PostHistoryTypeId="25" PostId="9292" RevisionGUID="ef5f98de-e995-4bf4-a306-96316b9a5ab5" CreationDate="2011-03-04T05:23:09.557" Comment="http://twitter.com/#!/StackGameDev/status/43541970773225472" />
  <row Id="19168" PostHistoryTypeId="2" PostId="9299" RevisionGUID="af804add-e22b-4828-9d91-11894a9ddea8" CreationDate="2011-03-04T05:44:17.543" UserId="3119" Text="If the texture is always the same then you should load the texture once in the game life, for example in the Ship class once it´s LoadContent is called.&#xD;&#xA;&#xD;&#xA;***I´m not sure, but I think XNA loads the texture once, and the other calls to the load method will just use the memory loaded texture. Even if that is true, I think calling that method once is beter.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19169" PostHistoryTypeId="2" PostId="9300" RevisionGUID="c289c225-5c07-43e9-8398-260b4de4d5aa" CreationDate="2011-03-04T05:49:19.190" UserId="2158" Text="Android has supported native applications since version 1.5 through [Android NDK][1], which should cover your target audience very well. You still need a simple Android Java application that loads the native side of your application through JNI and passes forward e.g. input and render calls.&#xD;&#xA;&#xD;&#xA;There has been several versions of the NDK, but you can use the latest NDK and select the target API you want to support. Since Android version 2.3 you can do a lot more on the native side and need less Java code, but the device support for 2.3 is currently very limited.&#xD;&#xA;&#xD;&#xA;Native Android C/C++ development is a working solution at least for fullscreen games and the effort needed to port existing C/C++ OpenGL ES applications is quite small.&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/sdk/ndk/index.html" />
  <row Id="19170" PostHistoryTypeId="2" PostId="9301" RevisionGUID="8d75d8bd-135b-4789-9435-31f2261faaf5" CreationDate="2011-03-04T06:12:36.610" UserId="323" Text="The simplest texture manager has one function: GetTexture. GetTexture checks its cache for a texture. If the texture isn't cached, it loads the texture. Then it returns the texture. Kapow! Done!&#xD;&#xA;&#xD;&#xA;That is sufficient for most small-scale indie games I've seen. You just don't have enough content for this to ever be a problem.&#xD;&#xA;&#xD;&#xA;One downside is that this can result in loading hiccups during gameplay. Quick fix: just call GetTexture with all the textures you expect to use during a &quot;loading&quot; section. Another possible fix: when you &quot;load&quot; a texture, hand a functional blank texture handle back, then start loading in the data asynchronously in the background (in another thread or with asynchronous file loading calls) and fill it in once it's done. This way you avoid the load hitches, but things can look a bit weird until textures are filled in. If you want to implement this, I'd recommend a GetTextureAsync function to call when asynchronous loading is acceptable (which in my experience will be only a few places, but those places may account for the majority of the textures in your game.)&#xD;&#xA;&#xD;&#xA;Another downside is that you will, eventually, keep all the textures in your game in memory at once. This can also be easy to fix - if your game is divided into levels, just clear the entire cache between levels and reload everything. A somewhat more complex solution is to throw away textures after they've been unused for some number of seconds. This works great for large streaming worlds with unknown resources needed at each point (like MMOs - you never know what armor you're going to see next) but it does mean there's some lag between when a texture is unneeded and when the memory is actually freed.&#xD;&#xA;&#xD;&#xA;If you want a more complex texture manager, you can start having formal concepts of blocks of textures that need to be preloaded. Each level can have a texture corpus, and when you change levels, you explicitly throw away the old corpus and load in the new one. Couple this with on-demand loading for unexpected textures, and a delay for deallocating those, and you're pretty much set for quiet some time.&#xD;&#xA;&#xD;&#xA;As an example of this, in a game in a large contiguous world you might break the world into areas, then come up with a corpus for each area. Load textures for all adjacent areas to the player while throwing away textures from further away. (With refcounting, of course - if every area uses &quot;grass&quot;, then there's no reason to store multiple copies of &quot;grass&quot;.)&#xD;&#xA;&#xD;&#xA;But meanwhile, back in reality, you'll probably be just fine with GetTexture. :)" />
  <row Id="19171" PostHistoryTypeId="2" PostId="9302" RevisionGUID="342ab269-5788-481d-a484-981bf74fa092" CreationDate="2011-03-04T07:46:58.313" UserId="5859" Text="I am currently creating a browser based game, and was wondering what was the standard approach in making diverse conditions and status bonuses database wise. Currently considering two cases.&#xD;&#xA;&#xD;&#xA;Event Conditions&#xD;&#xA; 1. Needs min 1000 gold&#xD;&#xA; 2. Needs min Lv 10&#xD;&#xA; 3. Needs certain item.&#xD;&#xA; 4. Needs fulfillment of another event&#xD;&#xA;&#xD;&#xA;Status Bonus&#xD;&#xA; 1. Reduces damage by 20%&#xD;&#xA; 2. +100 attack points&#xD;&#xA; 3. Deflects certain type of attack &#xD;&#xA; &#xD;&#xA;I wish to be able to continually change these parameters during the process of production and operation, so having them hard-coded isn't bese" />
  <row Id="19172" PostHistoryTypeId="1" PostId="9302" RevisionGUID="342ab269-5788-481d-a484-981bf74fa092" CreationDate="2011-03-04T07:46:58.313" UserId="5859" Text="How to implment the database for event conditions and item bonuses for a browser based game" />
  <row Id="19173" PostHistoryTypeId="3" PostId="9302" RevisionGUID="342ab269-5788-481d-a484-981bf74fa092" CreationDate="2011-03-04T07:46:58.313" UserId="5859" Text="&lt;design-patterns&gt;&lt;databases&gt;&lt;browser-based-games&gt;" />
  <row Id="19174" PostHistoryTypeId="5" PostId="9302" RevisionGUID="350f8803-2da5-43c6-92d4-6937dd43dd91" CreationDate="2011-03-04T07:56:02.820" UserId="5859" Comment="added 1039 characters in body" Text="I am currently creating a browser based game, and was wondering what was the standard approach in making diverse conditions and status bonuses database wise. Currently considering two cases.&#xD;&#xA;&#xD;&#xA; - Event Conditions&#xD;&#xA;    1. Needs min 1000 gold&#xD;&#xA;    2. Needs min Lv 10&#xD;&#xA;    3. Needs certain item.&#xD;&#xA;    4. Needs fulfillment of another event&#xD;&#xA; - Status Bonus&#xD;&#xA;    1. Reduces damage by 20%&#xD;&#xA;    2. +100 attack points&#xD;&#xA;    3. Deflects certain type of attack&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;I wish to be able to continually change these parameters during the process of production and operation, so having them hard-coded isn't the best way.&#xD;&#xA;&#xD;&#xA;All I could come up with are the following two methods.&#xD;&#xA;&#xD;&#xA;Method 1 Create a table that contains each conditions with needed attributes&#xD;&#xA;&#xD;&#xA;Have a model named conditions with all the attributes it would need to set them&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     conditions&#xD;&#xA;       condition_type (level, money_min, money_max item, event_aquired)&#xD;&#xA;       condition_amount&#xD;&#xA;       prerequisite_condition_id&#xD;&#xA;       prerequisite_item_id&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Method 2 write it in a DSL form that could be interpreted later in the code&#xD;&#xA;&#xD;&#xA; Perhaps something like yaml, have a text area in the setting form and have the code interpret it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    condition_foo:&#xD;&#xA;      condition_type :level&#xD;&#xA;        min_level: 10&#xD;&#xA;      condition_type :item&#xD;&#xA;        item_id: 2&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;At current Method 2 looks to be more practical and flexible for future changes, trade off being that all the flex must be done on the code side.&#xD;&#xA;&#xD;&#xA;Not to sure how this is supposed to be done, is it supposed to be hard coded? separate config file? Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19175" PostHistoryTypeId="2" PostId="9303" RevisionGUID="5f4c014d-96ac-49e6-a7e4-fc5232566212" CreationDate="2011-03-04T07:58:34.927" UserId="721" Text="Android API are available through Java calls. Since 2010, Google provides the NDK (a SDK) for C/C++ developers. &#xD;&#xA;&#xD;&#xA;The NDK offers two ways:&#xD;&#xA; - for android 1.5 devices, you can load an elf library and uses it from the java application via a JNI  bridge&#xD;&#xA; - for android 2.3 devices, you can use a NativeActivity to bypass the Java Activity code.&#xD;&#xA;&#xD;&#xA;The NDK offers few C/C++ API:&#xD;&#xA;&#xD;&#xA; - a pseudo libc called bionics: many functions aren't availabled&#xD;&#xA; - a pthread library&#xD;&#xA; - OpenGL ES 1.x (&gt;Android 1.5) and OpenGL ES 2.x (Android 2.0)&#xD;&#xA; - OpenSL (limited support on Android 2.3) &#xD;&#xA;&#xD;&#xA;But many API are Java only available via JNI.&#xD;&#xA;&#xD;&#xA;NDK 5 version is the first usable for C++ developers because it offers:&#xD;&#xA;&#xD;&#xA; - RTTI&#xD;&#xA; - Exceptions supports&#xD;&#xA; - STLport&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19176" PostHistoryTypeId="5" PostId="9303" RevisionGUID="76d204eb-a95e-4f9c-9eec-8000c244dffb" CreationDate="2011-03-04T08:04:27.653" UserId="721" Comment="added 44 characters in body; added 240 characters in body" Text="Android API are available through Java calls. Since 2010, Google provides the NDK (a SDK) for C/C++ developers. &#xD;&#xA;&#xD;&#xA;The NDK offers two ways:&#xD;&#xA; - for android 1.5 devices, you can load an elf library and uses it from the java application via a JNI  bridge&#xD;&#xA; - for android 2.3 devices, you can use a NativeActivity to bypass the Java Activity code.&#xD;&#xA;&#xD;&#xA;The NDK offers few C/C++ API:&#xD;&#xA;&#xD;&#xA; - a pseudo libc called bionics: many functions aren't availabled&#xD;&#xA; - a pthread library&#xD;&#xA; - OpenGL ES 1.x (&gt;Android 1.5) and OpenGL ES 2.x (Android 2.0)&#xD;&#xA; - OpenSL (limited support on Android 2.3) &#xD;&#xA;&#xD;&#xA;But many API are Java only (also available via JNI).&#xD;&#xA;&#xD;&#xA;NDK 5 version is the first usable for C++ developers because it offers:&#xD;&#xA;&#xD;&#xA; - RTTI&#xD;&#xA; - Exceptions supports&#xD;&#xA; - STLport&#xD;&#xA; - gdb support for multi-threaded programs&#xD;&#xA;&#xD;&#xA;The most painful operation is debugging on android devices. So i develop my own multi-platform framework (OS X, Windows, Linux, iOS and Android) to debug first on desktop platform, next iOS platform (on Simulator) and Last (Android)." />
  <row Id="19177" PostHistoryTypeId="2" PostId="9304" RevisionGUID="326bfbcf-6777-42f2-be71-ed68d6b9bb2d" CreationDate="2011-03-04T08:06:32.503" UserId="5818" Text="You won't be able to store the conditions (logic-wise) in the database (unless you decide to store scripting code directly in the database). Instead you could establish a construction where each condition and bonus is associated with a unique key. You can then in turn store these keys in the database.&#xD;&#xA;&#xD;&#xA;For example to describe the event conditions required to unlock status bonus 1 you would have tables resembling the following:&#xD;&#xA;&#xD;&#xA;       [StatusBonusTable]&#xD;&#xA;     StatusID StatusBonusKey ParameterN&#xD;&#xA;       1     &quot;reduceDamage&quot;      20       &#xD;&#xA;    &#xD;&#xA;    [Event Conditions Table]&#xD;&#xA;     StatusBonusId EventConditionKey ParameterN&#xD;&#xA;         1           &quot;goldRequired&quot;      1000&#xD;&#xA;         1           &quot;levelRequired&quot;      10&#xD;&#xA;&#xD;&#xA;I would then suggest using a factory to load this data from the database and creating instances of the event condition classes passing that parameters stored in the database and likewise with the status bonuses:&#xD;&#xA;&#xD;&#xA;    if (eventConditionKey == &quot;goldRequired&quot;)&#xD;&#xA;     goldRequired = parameter[0]&#xD;&#xA;     return new GoldRequiredCondition(goldRequired);&#xD;&#xA;     " />
  <row Id="19178" PostHistoryTypeId="2" PostId="9305" RevisionGUID="10ddca0e-1d53-4974-bd2c-2b515f1a07f5" CreationDate="2011-03-04T08:07:07.843" UserId="3794" Text="You cannot use directx10 in xna. &#xD;&#xA;&#xD;&#xA;If you wish to have DX10 and DX11 features in C#, i suggest using [SlimDX][1], which is great framework over directx. It contains &quot;sample framework&quot;, similar to XNA. If you don't mind losing the xbox and win 7 phone support, slimdx is giving you more freedom and better performance than XNA. &#xD;&#xA;&#xD;&#xA; - **[SlimDX][1]**&#xD;&#xA;&#xD;&#xA;  [1]: http://slimdx.org" />
  <row Id="19179" PostHistoryTypeId="5" PostId="9303" RevisionGUID="28759d5d-8fde-49f9-9021-bff06a8c427f" CreationDate="2011-03-04T08:10:28.973" UserId="721" Comment="deleted 23 characters in body; added 2 characters in body" Text="Android APIs are Java. Since 2010, Google provides the NDK (a SDK) for C/C++ developers. &#xD;&#xA;&#xD;&#xA;The NDK offers two ways:&#xD;&#xA;&#xD;&#xA; - for android 1.5 devices, you can load an elf library and uses it from the java application via a JNI  bridge&#xD;&#xA; - for android 2.3 devices, you can use a NativeActivity to bypass the Java Activity code.&#xD;&#xA;&#xD;&#xA;The NDK offers few C/C++ API:&#xD;&#xA;&#xD;&#xA; - a pseudo libc called bionics: many functions aren't availabled&#xD;&#xA; - a pthread library&#xD;&#xA; - OpenGL ES 1.x (&gt;Android 1.5) and OpenGL ES 2.x (Android 2.0)&#xD;&#xA; - OpenSL (limited support on Android 2.3) &#xD;&#xA;&#xD;&#xA;But many API are Java only (also available via JNI).&#xD;&#xA;&#xD;&#xA;NDK 5 version is the first usable for C++ developers because it offers:&#xD;&#xA;&#xD;&#xA; - RTTI&#xD;&#xA; - Exceptions supports&#xD;&#xA; - STLport&#xD;&#xA; - gdb support for multi-threaded programs&#xD;&#xA;&#xD;&#xA;The most painful operation is debugging on android devices. So i develop my own multi-platform framework (OS X, Windows, Linux, iOS and Android) to debug first on desktop platform, next iOS platform (on Simulator) and Last (Android)." />
  <row Id="19180" PostHistoryTypeId="5" PostId="9304" RevisionGUID="6826d97b-0cae-46ca-a90b-e1898cf1a269" CreationDate="2011-03-04T08:14:06.647" UserId="5818" Comment="added 452 characters in body" Text="You won't be able to store the conditions (logic-wise) in the database (unless you decide to store scripting code directly in the database). Instead you could establish a construction where each condition and bonus is associated with a unique key. You can then in turn store these keys in the database.&#xD;&#xA;&#xD;&#xA;For example to describe the event conditions required to unlock status bonus 1 you would have tables resembling the following:&#xD;&#xA;&#xD;&#xA;       [StatusBonusTable]&#xD;&#xA;     StatusID StatusBonusKey ParameterN&#xD;&#xA;       1     &quot;reduceDamage&quot;      20       &#xD;&#xA;    &#xD;&#xA;    [Event Conditions Table]&#xD;&#xA;     StatusBonusId EventConditionKey ParameterN&#xD;&#xA;         1           &quot;goldRequired&quot;      1000&#xD;&#xA;         1           &quot;levelRequired&quot;      10&#xD;&#xA;&#xD;&#xA;I would then suggest using a factory to load this data from the database and creating instances of the event condition classes passing that parameters stored in the database and likewise with the status bonuses:&#xD;&#xA;&#xD;&#xA;    if (eventConditionKey == &quot;goldRequired&quot;)&#xD;&#xA;     goldRequired = parameter[0]&#xD;&#xA;     return new GoldRequiredCondition(goldRequired);&#xD;&#xA;     &#xD;&#xA;The advantages of using this approach is that it will not require changes to the database when you need new conditions and status bonuses. When you want a new condition or bonus the only place you will need to make changes is in your code. The disadvantage is the lack of automatic verification of the data you insert into the database. You will be able to insert keys that have no match in code, and set it's parameters to values that make no sense." />
  <row Id="19181" PostHistoryTypeId="25" PostId="9295" RevisionGUID="29e12d90-cc5a-4f83-8fc7-f8f45b5ee379" CreationDate="2011-03-04T08:23:09.867" Comment="http://twitter.com/#!/StackGameDev/status/43587270816694272" />
  <row Id="19182" PostHistoryTypeId="5" PostId="9302" RevisionGUID="3cda3e24-a203-40f0-bc47-a9db400a3511" CreationDate="2011-03-04T08:45:44.870" UserId="5859" Comment="added 72 characters in body" Text="I am currently creating a browser based game, and was wondering what was the standard approach in making diverse conditions and status bonuses database wise. Currently considering two cases.&#xD;&#xA;&#xD;&#xA; - Event Conditions&#xD;&#xA;    1. Needs min 1000 gold&#xD;&#xA;    2. Needs min Lv 10&#xD;&#xA;    3. Needs certain item.&#xD;&#xA;    4. Needs fulfillment of another event&#xD;&#xA; - Status Bonus&#xD;&#xA;    1. Reduces damage by 20%&#xD;&#xA;    2. +100 attack points&#xD;&#xA;    3. Deflects certain type of attack&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;I wish to be able to continually change these parameters during the process of production and operation, so having them hard-coded isn't the best way.&#xD;&#xA;&#xD;&#xA;All I could come up with are the following two methods.&#xD;&#xA;&#xD;&#xA;Method 1 Create a table that contains each conditions with needed attributes&#xD;&#xA;&#xD;&#xA;Have a model named conditions with all the attributes it would need to set them&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     conditions&#xD;&#xA;       condition_type (level, money_min, money_max item, event_aquired)&#xD;&#xA;       condition_amount&#xD;&#xA;       prerequisite_condition_id&#xD;&#xA;       prerequisite_item_id&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Method 2 write it in a DSL form that could be interpreted later in the code&#xD;&#xA;&#xD;&#xA; Perhaps something like yaml, have a text area in the setting form and have the code interpret it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    condition_foo:&#xD;&#xA;      condition_type :level&#xD;&#xA;        min_level: 10&#xD;&#xA;      condition_type :item&#xD;&#xA;        item_id: 2&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;At current Method 2 looks to be more practical and flexible for future changes, trade off being that all the flex must be done on the code side.&#xD;&#xA;&#xD;&#xA;Not to sure how this is supposed to be done, is it supposed to be hard coded? separate config file? Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;Added &#xD;&#xA;&#xD;&#xA;For additional info, it will be implemented with Ruby on Rails&#xD;&#xA;" />
  <row Id="19183" PostHistoryTypeId="2" PostId="9306" RevisionGUID="f6938aae-46a8-4f2a-8792-1c6b569d9cce" CreationDate="2011-03-04T09:45:23.090" UserId="5860" Text="My C++ turn-based game server (which uses database) does stand against current average amount of clients (players), so I want to expand it to multiple (more then one) amount of computers and databases where all clients still will remain within single game world (servers will must communicate with each other and use multiple databases).&#xD;&#xA;&#xD;&#xA;Is there some tutorials/books/common standards which explain how to do it in a best way?&#xD;&#xA;" />
  <row Id="19184" PostHistoryTypeId="1" PostId="9306" RevisionGUID="f6938aae-46a8-4f2a-8792-1c6b569d9cce" CreationDate="2011-03-04T09:45:23.090" UserId="5860" Text="Distributed C++ game server which use database." />
  <row Id="19185" PostHistoryTypeId="3" PostId="9306" RevisionGUID="f6938aae-46a8-4f2a-8792-1c6b569d9cce" CreationDate="2011-03-04T09:45:23.090" UserId="5860" Text="&lt;server&gt;&lt;databases&gt;" />
  <row Id="19186" PostHistoryTypeId="2" PostId="9307" RevisionGUID="e0d18429-e449-48f0-a0e0-2bb0e659fa31" CreationDate="2011-03-04T09:46:00.623" UserDisplayName="slcpfmmm" Text="If you need ideas on how to implement your replay system, search google for how to implement *undo/redo* in an application. It may be obvious to some, but maybe not to all, that undo/redo is conceptually the same as replaying for games. It is just a special case in which you can rewind, and depending on the application, seek to a specific point in time.&#xD;&#xA;&#xD;&#xA;You'll see that nobody implementing undo/redo complains about deterministic/non-deterministic, float variables, or specific CPUs." />
  <row Id="19187" PostHistoryTypeId="2" PostId="9308" RevisionGUID="f50e004a-3fd1-4fe2-a9d7-9d9129099081" CreationDate="2011-03-04T09:49:05.677" UserId="1742" Text="Always remember, who is your target audience.&#xD;&#xA;&#xD;&#xA;If your game is a new fps, you can probably start working in it assuming DX11, just because anyone that plays fps games will put up with that restriction or already have upgraded.&#xD;&#xA;&#xD;&#xA;If your game is casual, slow paced, your technology needs to be centred differently. Possibly around the idea of lowest common denominator hardware.&#xD;&#xA;&#xD;&#xA;The point is: who are you trying to sell the game to?&#xD;&#xA;&#xD;&#xA;In your question you allude to the audience being more casual gamer, in which case, find the lowest spec you are willing to work to, and then make the best game you can within those limits. Making a game that scales its graphical beauty with the spec of the machine detracts time from making your game pretty at all levels of tech. The best example I can think of is Plants Vs Zombies. There's no &quot;super graphics&quot; mode, and that's because the game was designed to be pretty without resorting to tech." />
  <row Id="19188" PostHistoryTypeId="2" PostId="9309" RevisionGUID="40082d89-8f04-4135-aedd-c51d5256a1fe" CreationDate="2011-03-04T10:22:08.537" UserId="4662" Text="You can't clean up from inside the Factory class. It's the job of whatever code called `create()` to deallocate that memory later. The &quot;cleanup&quot; you've done just allocates and then destroys a new object of each type." />
  <row Id="19189" PostHistoryTypeId="25" PostId="9297" RevisionGUID="12329a7e-c76d-4530-ba4c-953c4859c8fb" CreationDate="2011-03-04T11:23:09.260" Comment="http://twitter.com/#!/StackGameDev/status/43632566783328257" />
  <row Id="19190" PostHistoryTypeId="2" PostId="9310" RevisionGUID="c0431697-fb4e-4b44-99db-596be58cd13c" CreationDate="2011-03-04T12:14:21.573" UserId="288" Text="First of all: how you do it doesn't really matter. Just do the very *simplest thing that could possibly work*. My current favourite way is with **static** methods in each class (ie: bullet, ship), like this:&#xD;&#xA;&#xD;&#xA;    static Texture2D myTexture, myOtherTexture;&#xD;&#xA;    // Call me from Game.LoadContent:&#xD;&#xA;    public static void LoadContent(ContentManager content) { content.Load /* ...etc */ }&#xD;&#xA;&#xD;&#xA;(This is perfectly fine for simple games where you only have a single `ContentManager` instance and never call `Unload`.)&#xD;&#xA;&#xD;&#xA;Being able to toss in simple systems like this is one reason why &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9204/what-are-the-cons-of-using-drawablegamecomponent-for-every-instance-of-a-game-obj/9209#9209&quot;&gt;I don't think it's a good idea to use `DrawableGameComponent`&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;As has been mentioned a couple of times: XNA's `ContentManager` will share instances of loaded content (like textures). So after the first time you load it, subsequent loads will give you back the same texture with no cost for loading.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Anyway  - it doesn't really matter *how* you load your content. What matters (and what you are asking) is *when?*&#xD;&#xA;&#xD;&#xA;The answer to that is simple: **Load your textures when your game starts!** (Or behind loading screens or other the-game-isn't-animating screens if necessary.) If you cannot do this, the correct solution is to load your textures in a worker thread.&#xD;&#xA;&#xD;&#xA;When you load a texture (a synchronous operation - it blocks the calling thread), you take a hit pulling the data from disk, a hit to decode it, a hit to send it to the GPU, and a hit if you trigger the garbage collector (blocks all threads, and is especially bad on Xbox 360).&#xD;&#xA;&#xD;&#xA;In terms of the game loading, loading a texture is a very fast operation. In terms of the 16ms you have to calculate and render each frame at 60FPS, loading a texture is *agonisingly* slow." />
  <row Id="19191" PostHistoryTypeId="2" PostId="9311" RevisionGUID="d30648ea-054b-47f6-ab5d-b5ffc70f2856" CreationDate="2011-03-04T12:34:00.523" UserId="2755" Text="You might try [Unity 3D](http://unity3d.com/) (yeah, I know, not a *proper* game engine, some of you might argue …), but&#xD;&#xA;&#xD;&#xA;* it can be programmed in JavaScript, C# or Boo&#xD;&#xA;* it has a good tutorial over [here](http://unity3d.com/support/resources/tutorials/3d-platform-game)&#xD;&#xA;* its learning curve is not as steep&#xD;&#xA;* there is [Unity Answers](http://answers.unity3d.com/), where you find even more resources.&#xD;&#xA;&#xD;&#xA;(Disclaimer: I'm in no way related to the makers of Unity, I just use it myself and found it a great tool to learn the basics).&#xD;&#xA;&#xD;&#xA;But yeah – you set yourself up to quite some task. I'm now in my 6th semester studying game design, and I still don't feel like I scratched more than the surface. It's no wonder the industry has specialists for pretty much every facet of the process of creating a game." />
  <row Id="19192" PostHistoryTypeId="2" PostId="9312" RevisionGUID="3ec26428-05df-4a4b-b6b2-a375b76d50c1" CreationDate="2011-03-04T13:58:55.260" UserId="5006" Text="I think this is one case that would benefit from a document-database solution (i.e a &quot;NoSql&quot; database).  If you're set on using a SQL database then @Qua's answer is probably best.&#xD;&#xA;&#xD;&#xA;The 2nd method you mentioned would fit perfectly with the document model.  I'm currently looking at implementing something similar with MongoDb, which from what I've seen essentially stores and allows easy querying of JSON objects." />
  <row Id="19194" PostHistoryTypeId="5" PostId="9247" RevisionGUID="65f60006-96d1-48cb-bd7a-62964d4ad410" CreationDate="2011-03-04T14:35:59.970" UserId="14" Comment="added 1031 characters in body" Text="Looking to see what the level of effort is for implementing a screen capture command into PS3 game by a mid-level PS3 game developer.&#xD;&#xA;&#xD;&#xA;Bonus for a description of what is involved in the process...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Not sure how to get back my question since it was the first but let me clarify some things. @Nate Bross, nope I am not the actor although i've fielded calls for him on occasion&#xD;&#xA;&#xD;&#xA;@coderanger my intent was to try and speak to other PS3 developers, however coming from a web development no one in my social circle close or extended develops on the PS3. Additionally i'm interested in hearing the effort required in terms of hours so that this information can be passed on to a client. A client who has a game on the PS3 using the unreal engine. Convo with devs sometimes go something like &quot;can you implement feature a&quot; which gets a response &quot;this will take us 8 weeks and an army&quot;. Trying to be educated before the ask. I hope that helps&#xD;&#xA;&#xD;&#xA;If anyone here is a PS3 game dev and would like to respond off site so as not to break NDA that would be awesome.&#xD;&#xA;&#xD;&#xA;@Roger it would be from within the game, something that users can use. Something akin to the iphone screencap utility. No need to get fancier than that." />
  <row Id="19197" PostHistoryTypeId="2" PostId="9313" RevisionGUID="73c52505-ec35-401d-a78b-2886caaa6327" CreationDate="2011-03-04T14:38:53.947" UserId="14" Text="As your client is using the Unreal Engine, I recommend looking at the [UDN](http://udn.epicgames.com/Main/WebHome.html). Here you will find all the information you need relating to implementing features within the Unreal Engine itself. I couldn't tell you exactly what you would need to call though as a good portion of it (any link that is red) is blocked off only to licensed developers. &#xD;&#xA;&#xD;&#xA;You will need to make some sort of arrangement with your client for them to let you access their development materials." />
  <row Id="19199" PostHistoryTypeId="5" PostId="9311" RevisionGUID="d424a2dc-76be-4ca4-93ea-79c021ad04f7" CreationDate="2011-03-04T15:31:00.920" UserId="2755" Comment="Removing superfluous words." Text="You might try [Unity 3D](http://unity3d.com/), because&#xD;&#xA;&#xD;&#xA;* it can be programmed in JavaScript, C# or Boo&#xD;&#xA;* it has a good tutorial over [here](http://unity3d.com/support/resources/tutorials/3d-platform-game)&#xD;&#xA;* its learning curve is not as steep&#xD;&#xA;* there is [Unity Answers](http://answers.unity3d.com/), where you find even more resources.&#xD;&#xA;&#xD;&#xA;(Disclaimer: I'm in no way related to the makers of Unity, I just use it myself and found it a great tool to learn the basics).&#xD;&#xA;&#xD;&#xA;But yeah – you set yourself up to quite some task. I'm now in my 6th semester studying game design, and I still don't feel like I scratched more than the surface. It's no wonder the industry has specialists for pretty much every facet of the process of creating a game.&#xD;&#xA;&#xD;&#xA;**Edit:** There has been a comment about Unity being seen as not a &quot;proper&quot; game engine, that could be misunderstood as me saying that – therefore spawning the comments below. It was not my intention to suggest that Unity could not be used to do proper game design, on the contrary. I use it myself, and I like it. ;)" />
  <row Id="19200" PostHistoryTypeId="2" PostId="9314" RevisionGUID="d1082f8e-adaf-4365-90ac-10aeb13d4755" CreationDate="2011-03-04T15:46:59.093" UserId="5797" Text="I am new to developing Games and this may sound naive, but somehow having 10,000 entities or more to describe a world sounds like a lot. I would rethink the database and the patterns that place those entities in your world. The Text and Blob datatypes are saved as binary by default although they are retrieved as a string. " />
  <row Id="19201" PostHistoryTypeId="2" PostId="9315" RevisionGUID="7ed5e73e-19dd-4662-b1b3-9afae7cd3092" CreationDate="2011-03-04T15:59:52.760" UserId="1430" Text="Marking technology is going to be quite similar to marketing a game -- in fact, if you have games made with that technology, that would be a great boon to adoption. Show them off.&#xD;&#xA;&#xD;&#xA;With SlimDX, we started by hosting the project on Google Code, advertising very narrowly -- within a single community of developers (GDNet). That got us a few high level bits of feedback that we iterated on. Most importantly, though, we used the framework ourselves to build our own projects so we knew what the user experience was like and tweaked that until it was a good user experience. This includes things like making the end-user runtime installers as painless as possible, coming up with a decent documentation build, and providing at least basic &quot;getting started&quot; samples. &#xD;&#xA;&#xD;&#xA;Then we kept plugging it whenever it was relevant in forums, we started a Twitter account to watch for people mentioning it and interacting with them, and slowly built up a community around the library, at which point the community was able to take on some of the burden of mentioning it all over the place. &#xD;&#xA;&#xD;&#xA;You have to be careful when plugging your project, of course; we tended to be able to say, &quot;well, you could use XNA if X, Y and Z or you could use SlimDX if A, B and C.&quot; It helps, I think, to be honest about the advantages and disadvantages of your product.&#xD;&#xA;&#xD;&#xA;The most important thing is probably going to be establishing yourself as quick, responsive, and client-focused early on. We were able to turn around bug reports and feature requests extremely quickly in our first few months and invested a lot of time in making the framework easy to get and start using. Establishing that solid initial relationship with your early-adopters will really help propel you forward." />
  <row Id="19202" PostHistoryTypeId="2" PostId="9316" RevisionGUID="aabec216-6f5f-4d1f-a5f3-0a346f9a01ed" CreationDate="2011-03-04T16:00:01.313" UserId="5478" Text="Im using UIPanGestureRecognizer in my cocos2d game to do drag and drop of sprites. I have a row of sprites and when I drag a sprite on top of another one, the sprite underneath it and any other sprites between should shift left or right out of the way to allow space to drop the currently selected sprite. &#xD;&#xA;&#xD;&#xA;This is working ok, however, if I am too quick at dragging the sprite around the screen, this triggers another round of the UIPanGestureRecognizer's callback method, and screws up the logic, as the sprites are in-between shifting. &#xD;&#xA;&#xD;&#xA;I need a way to freeze the callback from firing, whilst the other sprites are shifting, then once they have finished moving, re-enable the callback to fire.&#xD;&#xA;&#xD;&#xA;Whats the best way to do this?" />
  <row Id="19203" PostHistoryTypeId="1" PostId="9316" RevisionGUID="aabec216-6f5f-4d1f-a5f3-0a346f9a01ed" CreationDate="2011-03-04T16:00:01.313" UserId="5478" Text="Best way to prevent UIPanGestureRecognizer from firing when moving sprites in cocos2d" />
  <row Id="19204" PostHistoryTypeId="3" PostId="9316" RevisionGUID="aabec216-6f5f-4d1f-a5f3-0a346f9a01ed" CreationDate="2011-03-04T16:00:01.313" UserId="5478" Text="&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="19205" PostHistoryTypeId="2" PostId="9317" RevisionGUID="ae193bb0-8062-45f4-8daf-a4fa44260831" CreationDate="2011-03-04T16:26:26.580" UserId="5864" Text="I have successfully used the [Android NDK][1] to port two SDL + OpenGL games to Android and found it surprisingly easy. I have a 200-line Java wrapper that creates the GL context and provides utility classes such as input, sound and image loading for the C++ code to call back. The &quot;San-Angeles&quot; sample program in the NDK is an excellent starting point.&#xD;&#xA;&#xD;&#xA;By the way, it is possible to build C/C++ programs without a line of Java, but I find it convenient to access some OS-level methods by calling back the JVM from time to time.&#xD;&#xA;&#xD;&#xA;I think if your game already compiles on Linux, you will feel at home. Out of 100+ files in my current project, only 4 have an `#ifdef ANDROID_NDK` directive (the image and sound related classes).&#xD;&#xA;&#xD;&#xA;In fact most of the time spent porting the game was because of a known [emulator bug][2] that I wasn't aware of.&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/sdk/ndk/&#xD;&#xA;  [2]: http://groups.google.com/group/android-ndk/browse_thread/thread/3731177053097c18" />
  <row Id="19206" PostHistoryTypeId="5" PostId="9119" RevisionGUID="9d699396-999c-495d-9e82-3854835fe30d" CreationDate="2011-03-04T16:55:35.150" UserId="2306" Comment="added 811 characters in body" Text="I'm not sure what is considered the best approach, but one option would be to use instanced geometry - you provide the GPU with a 3d model and a list of places/orientations where you'd like it drawn (preferable in the form of a concatenated matrix), and the GPU will handle the rest via a custom vertex shader.&#xD;&#xA;&#xD;&#xA;Basically, you create two vertex buffers: one containing your 3D model (a blade of grass or patch of sod, for instance), and one containing a list of transformation matrices, each matrix containing the scale+rotation+translation where you'd like to render an instance of your model. (You'll need a custom vertex structure to hold the matrix - it's a vertex buffer in name only, and is just used to pass matrices to the GPU.)&#xD;&#xA;&#xD;&#xA;Then, you'll need a custom shader. The vertex shader will get called for each vertex in each stream, so for each call you'll get two input parameters: one vertex from your blade model, and one of the transformation matrices. The shader then transforms the model vertex with the matrix, and returns the updated position. &#xD;&#xA;&#xD;&#xA;If you want effects like wind, etc, you can adjust the matrix for each instance and update the matrix stream.&#xD;&#xA;&#xD;&#xA;Using a model for a patch of grass rather than individual blades is makes it easier to cull. If you're using an octree or BSP for collision and visibility determination, you can reduce the depth of your tree by dealing with larger &quot;blocks&quot; of grass instead of smaller blades. Also, it's easy to provide a less complex/less-detailed model for a patch of grass if you detect a performance issue.&#xD;&#xA;&#xD;&#xA;There's also something called a &quot;Geometry Shader&quot; that may apply here, but I don't know anything about it other than it's relatively new and apparently (?) not supported on the xbox.&#xD;&#xA;&#xD;&#xA;[Here's a link to an XNA instancing sample.][1]&#xD;&#xA;&#xD;&#xA;**Update** &#xD;&#xA;&#xD;&#xA;Alternate methods: Though rendering lots of grass via instancing is significantly faster than other geometry-based methods, it can still be very expensive. [GPU Gems contains an interesting alternative using intersecting billboard clusters][2].&#xD;&#xA;&#xD;&#xA;[And, of course, there's shell rendering][3], which consists of rendering a stack of textured polys, each with a map of &quot;dots&quot; on a transparent background. Each texture has an image of a cross section of a patch of grass - think dots on a transparent background. When you render them in close proximity, the solid parts of the texture appear to be extruded and connected between the layers. Not sure how well this performs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/mesh_instancing&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems/gpugems_ch07.html&#xD;&#xA;  [3]: http://www.xnainfo.com/content.php?content=23" />
  <row Id="19207" PostHistoryTypeId="2" PostId="9318" RevisionGUID="c9620265-f166-422d-9acf-e07df6a30240" CreationDate="2011-03-04T16:57:53.863" UserId="5865" Text="I'm developing a casual Android game in which the player's success can very easily be represented by a number (I'm not more specific because I'm interested in the topic in general).&#xD;&#xA;&#xD;&#xA;Although I myself am not a highscore person at all, I was thinking of implementing a highscore for that game, but I see at least 2 problems in the classical leaderboard approach:&#xD;&#xA;&#xD;&#xA; - very soon the highscore will be dominated by hardcore players, leaving no chance for beginners, who are then frustrated. This is very severe especially in casual games.&#xD;&#xA;&#xD;&#xA; - there is no direct reward for being a loyal player who plays the game over and over again&#xD;&#xA;&#xD;&#xA;My current idea is to &quot;reset&quot; the highscore every 24 hours (for example) and each day nominate the &quot;player of the day&quot; who then gets a &quot;star&quot;.&#xD;&#xA;Then there would be some kind of meta-highscore of players with the most stars.&#xD;&#xA;&#xD;&#xA;That way even beginners might have a chance to be &quot;player of the day&quot; once and continued or repeated play is rewarded much more.&#xD;&#xA;&#xD;&#xA;The idea is still very rough and there are many problems in the details and the technical implementation but I have a feeling it is a step in the right direction.&#xD;&#xA;&#xD;&#xA;**Do you have creative and new ideas on how to implement highscores?**&#xD;&#xA;&#xD;&#xA;Which games are doing this well / what types of highscores do you find most engaging?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19208" PostHistoryTypeId="1" PostId="9318" RevisionGUID="c9620265-f166-422d-9acf-e07df6a30240" CreationDate="2011-03-04T16:57:53.863" UserId="5865" Text="How can Highscores be more meaningful and engaging?" />
  <row Id="19209" PostHistoryTypeId="3" PostId="9318" RevisionGUID="c9620265-f166-422d-9acf-e07df6a30240" CreationDate="2011-03-04T16:57:53.863" UserId="5865" Text="&lt;competition&gt;&lt;leaderboards&gt;" />
  <row Id="19210" PostHistoryTypeId="2" PostId="9319" RevisionGUID="ce50d556-2ee8-470b-af14-5cecfd778c0f" CreationDate="2011-03-04T17:13:42.153" UserId="953" Text="Posting it on a developer forum like the TIGSource forums would be useful, but you should make sure not to just drive by and spam them. People will be much more receptive if you're trying to be a member of their community and also happen to have this cool tool to help them work." />
  <row Id="19211" PostHistoryTypeId="5" PostId="9303" RevisionGUID="b54f31fe-6bf9-4032-9e43-9f3c989c5694" CreationDate="2011-03-04T17:16:04.973" UserId="721" Comment="added 446 characters in body" Text="Android APIs are Java. Since 2010, Google provides the NDK (a SDK) for C/C++ developers. &#xD;&#xA;&#xD;&#xA;The NDK offers two ways:&#xD;&#xA;&#xD;&#xA; - for android 1.5 devices, you can load an elf library and uses it from the java application via a JNI  bridge&#xD;&#xA; - for android 2.3 devices, you can use a NativeActivity to bypass the Java Activity code for Fullscreen Application.&#xD;&#xA;&#xD;&#xA;The NDK offers few C/C++ API:&#xD;&#xA;&#xD;&#xA; - a pseudo libc called bionics: many functions aren't availabled&#xD;&#xA; - a pthread library&#xD;&#xA; - OpenGL ES 1.x (&gt;Android 1.5) and OpenGL ES 2.x (Android 2.0)&#xD;&#xA; - OpenSL (limited support on Android 2.3) &#xD;&#xA;&#xD;&#xA;But many API are Java only (also available via JNI).&#xD;&#xA;&#xD;&#xA;NDK 5 version is the first usable for C++ developers because it offers:&#xD;&#xA;&#xD;&#xA; - RTTI&#xD;&#xA; - Exceptions supports&#xD;&#xA; - STLport&#xD;&#xA; - gdb support for multi-threaded programs&#xD;&#xA;&#xD;&#xA;The most painful operation is debugging on android devices. So i develop my own multi-platform framework (OS X, Windows, Linux, iOS and Android) to debug first on desktop platform, next iOS platform (on Simulator) and Last (Android).&#xD;&#xA;&#xD;&#xA;The android Emulator (not a simulator) have a poor performance and can't emulate OpenGL ES 2.x. I recommend real devices to develop.&#xD;&#xA;&#xD;&#xA;You can find many useful informations :&#xD;&#xA;&#xD;&#xA; - [input code][1]&#xD;&#xA; - [Phil hassley porting Galcon][2]  (10 articles)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ellismarkov.com/keyboard-input-with-ndk&#xD;&#xA;  [2]: http://www.philhassey.com/blog/2010/07/20/android-day-1-sdk-eclipse-ide-and-device-activation/" />
  <row Id="19212" PostHistoryTypeId="25" PostId="9316" RevisionGUID="14bdbfa2-9d6d-4b76-a0b4-ea58139bd9ad" CreationDate="2011-03-04T17:23:09.710" Comment="http://twitter.com/#!/StackGameDev/status/43723165217734656" />
  <row Id="19213" PostHistoryTypeId="2" PostId="9320" RevisionGUID="6fe76353-cdda-4be5-ac86-a788bf09b6b6" CreationDate="2011-03-04T17:27:16.233" UserId="5527" Text="As a player I would be very upset if my high score was reset. Hardcore players work hard to get that score. Taking it away would not be a nice thing.&#xD;&#xA;&#xD;&#xA;You could have a hybrid approach. Have a high score board and a daily high score board.&#xD;&#xA;&#xD;&#xA;As far as loyal players, you could add a third board for a type of overall or averaged score system. This could be a some factor of amount of time played, number of games and average/total score.&#xD;&#xA;&#xD;&#xA;Just some thoughts." />
  <row Id="19214" PostHistoryTypeId="2" PostId="9321" RevisionGUID="10c7f027-979a-4fc5-90c8-ab967d22cc84" CreationDate="2011-03-04T18:00:48.593" UserId="2301" Text="I like all time high score and daily high score board as well.  But my favourite highscores is when they match it up with my friends scores, I don't care about some guy I don't know highscore, I want to see how well I do against people I know/in my area" />
  <row Id="19215" PostHistoryTypeId="2" PostId="9322" RevisionGUID="9789c481-fb45-4b8d-aa38-6d2498c950d4" CreationDate="2011-03-04T19:02:21.007" UserId="1101" Text=" 1. Make it good.&#xD;&#xA; 2. When people ask (on forums, StackExchange, etc) which library to use for X, answer with your library.&#xD;&#xA;&#xD;&#xA;That's sufficient, I think. Word spreads quickly between developers about these things." />
  <row Id="19216" PostHistoryTypeId="2" PostId="9323" RevisionGUID="61692141-847a-4bcf-9571-dc693b6e68a2" CreationDate="2011-03-04T19:09:11.627" UserId="1101" Text="No. This is an incredibly difficult area that has not been solved yet." />
  <row Id="19217" PostHistoryTypeId="2" PostId="9324" RevisionGUID="00f3d7f0-e0ba-47e5-9a77-efd4b11b5668" CreationDate="2011-03-04T19:23:02.620" UserId="1853" Text="If you keep all scores in the database, you can filter your leaderboards by scores that were received in the last 24 hours to get the best players of the day. Analogously, you can show the best players of the week or the month, or the best players in a specific location.&#xD;&#xA;&#xD;&#xA;There is no need to reset the high-scores." />
  <row Id="19218" PostHistoryTypeId="2" PostId="9325" RevisionGUID="fc9fb592-6dd6-42fa-ae58-16ccdc6d9130" CreationDate="2011-03-04T19:32:50.740" UserId="5868" Text="ChatBlade is an MMO middleware for handling client side chat in (massively) multiplayer environments. I am looking for a royalty-free, cheaper (&lt;1k) alternative (C++ or dll preferred) that would do the same before deciding on having to spend time developing an own solution.&#xD;&#xA;&#xD;&#xA;Any help is greatly appreciated." />
  <row Id="19219" PostHistoryTypeId="1" PostId="9325" RevisionGUID="fc9fb592-6dd6-42fa-ae58-16ccdc6d9130" CreationDate="2011-03-04T19:32:50.740" UserId="5868" Text="Are there alternatives to ChatBlade similar in features?" />
  <row Id="19220" PostHistoryTypeId="3" PostId="9325" RevisionGUID="fc9fb592-6dd6-42fa-ae58-16ccdc6d9130" CreationDate="2011-03-04T19:32:50.740" UserId="5868" Text="&lt;c++&gt;&lt;mmo&gt;&lt;middleware&gt;" />
  <row Id="19221" PostHistoryTypeId="2" PostId="9326" RevisionGUID="99aeaa29-ece3-47ec-a10a-0469cbbacb02" CreationDate="2011-03-04T19:40:14.223" UserId="5869" Text="Can't you just use [XMPP][1]? It's weak for transmiting binary data in-band but you may not need this on an in-game chat.&#xD;&#xA;&#xD;&#xA;You can run [ejabberd][2] on your server and just embed a jabber client on your game. &#xD;&#xA;&#xD;&#xA;There's a list of libraries implementing XMPP [here][3]. [gloox][4] is a C++ implementation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol&#xD;&#xA;  [2]: http://www.ejabberd.im/&#xD;&#xA;  [3]: http://xmpp.org/xmpp-software/libraries/&#xD;&#xA;  [4]: http://camaya.net/gloox/" />
  <row Id="19222" PostHistoryTypeId="2" PostId="9327" RevisionGUID="e95cc103-2569-41f7-8592-2c8e74e09311" CreationDate="2011-03-04T19:50:37.600" UserId="5855" Text="Continuing from [this question][1] (new question - now unrelated)&#xD;&#xA;&#xD;&#xA;So I have a thorough background in programming already (algorithms, math, logic, graphing problems, etc.) however I've never attempted to code a game before. In fact, I've never had anything more than minimal input from a user during the execution of a program. Generally input was given from a file or passed through console, all necessary functions were performed, then the program terminated with an output. I decided to try and get in on the world of game development. From several posts I've seen around gamedev.stackexchange.com XNA seems to be a favorite, and it was recommended to me when I asked where to start.&#xD;&#xA;&#xD;&#xA;I've downloaded and installed Visual Studio 2010 along with the XNA Framework and now I can't seem to get moving in the right direction.&#xD;&#xA;&#xD;&#xA;I started out looking on Google for &quot;xna game studio tutorial&quot;, &quot;xna game development beginners&quot;, &quot;my first xna game&quot;, etc. I found lots of crap. The official &quot;Introduction to Game Studio 4.0&quot; gave me this (plus my own train of thought happily pasted on top thanks to MSPaint):&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/2w1sgvq/7&#xD;&#xA;&#xD;&#xA;The &quot;Get Additional Help&quot; link (my best guess, since there was no &quot;Continue&quot; or &quot;Next&quot; link) lead me to this page:&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/2qa0dgx/7&#xD;&#xA;&#xD;&#xA;I tried every page. The forum was the only thing that seemed helpful, however searching for &quot;beginner&quot;, &quot;newbie&quot;, &quot;getting started&quot;, &quot;first project&quot;, and similar on the forums turned up many threads with specific questions that are a bit above my level (&quot;beginner to collision detection&quot;, for instance)&#xD;&#xA;&#xD;&#xA;Disappointed I returned to the XNA Game Studio home page. Surely their own website would have some introduction, tutorial, or at least a useful link to a community. EVERYTHING on their website was about coding Windows Phone 7.... Everything.&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/10eit8i/7&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/120m9gl/7&#xD;&#xA;&#xD;&#xA;Giving up on any official documentation after a while, I went back to Google. I managed to locate [www.xnadevelopment.com][2]. The website is built around XNA Game Studio 3.0, but how different can 3.0 be from 4.0?.... Apparently different enough.&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/5d8mk9/7&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/25hflli/7&#xD;&#xA;&#xD;&#xA;Figuring that this was the correct folder, I right-clicked....&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/24o94yu/7&#xD;&#xA;&#xD;&#xA;Hmm... maybe by &quot;Add Content Reference&quot; they mean &quot;Add a reference to an existing file (content)&quot;? Let's try it (after all- it's my only option)&#xD;&#xA;&#xD;&#xA;http://tinypic.com/r/2417eqt/7&#xD;&#xA;&#xD;&#xA;At this point I gave up. I'm back. My original goal in my last question was to create a keyboard-navigable 3D world (no physics necessary, no logic or real game necessary). After my recent failures my goal has been revised. I want to display an image on the screen.&#xD;&#xA;&#xD;&#xA;Hopefully in time I'll be able to move it with the keyboard.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9292/where-to-start-with-game-development&#xD;&#xA;  [2]: http://www.xnadevelopment.com" />
  <row Id="19223" PostHistoryTypeId="1" PostId="9327" RevisionGUID="e95cc103-2569-41f7-8592-2c8e74e09311" CreationDate="2011-03-04T19:50:37.600" UserId="5855" Text="How do I import my first sprites?" />
  <row Id="19224" PostHistoryTypeId="3" PostId="9327" RevisionGUID="e95cc103-2569-41f7-8592-2c8e74e09311" CreationDate="2011-03-04T19:50:37.600" UserId="5855" Text="&lt;xna&gt;&lt;windows&gt;&lt;xna-4.0&gt;" />
  <row Id="19225" PostHistoryTypeId="2" PostId="9328" RevisionGUID="40028877-3db3-4677-b526-543631421b2a" CreationDate="2011-03-04T20:12:42.473" UserId="962" Text="[Here is a small sample from msdn on how to load and draw a simple sprite.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would wrap the Content.Load part into a Method, so you could just call a custom method like, loadTexture(&quot;textureName&quot;) that loads the texture or sets other things up as well.&#xD;&#xA;&#xD;&#xA;But that is not that helpful for a lot of sprites, or sprites with animations.&#xD;&#xA;&#xD;&#xA;To use sprites with animations, use [Sprite Sheet Packer][2] , and here is a [Sample][3] that shows how to use it in XNA. It generates a Sprite Sheet, and a txt file with a map of rectangles for each image.&#xD;&#xA;&#xD;&#xA;In my games, **I create a AssetManager, that has a Method to load a SpriteSheet texture, and uses the exported text file to group animations.** I just edited the txt file map to have the animations all grouped with no spaces under each line, and then a line break to end it and start the new one.&#xD;&#xA;&#xD;&#xA;The reasons sprite sheets are really good to use in XNA, is that for each texture that is used for drawing, **it requires an extra SpriteBatch call to the video card**, and if you have too many calls, you will have reduced performance. So if you are going to have a lot of objects being drawn at once, if they can all fit on one sprite sheet, you will have less drawing overhead. &#xD;&#xA;&#xD;&#xA;But if you have a large animation with little to no extra instances, you are going to want to import the texture as individual frames, so only each frame needs to be sent to video card, and not the entire animation when it is not being used. [Here is an answer I posted explaining how to do the large animation][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]:  http://msdn.microsoft.com/en-us/library/bb194908.aspx#Y228&#xD;&#xA;  [2]: http://spritesheetpacker.codeplex.com/&#xD;&#xA;  [3]: http://spritesheetpacker.codeplex.com/wikipage?title=Using%20Sprite%20Sheet%20Packer%20with%20XNA%20GS&amp;referringTitle=Home&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/9180/best-way-to-do-large-xna-animations/9190#9190" />
  <row Id="19226" PostHistoryTypeId="25" PostId="9327" RevisionGUID="14007fec-b3ec-4b3a-a02d-75ffbdb6acc6" CreationDate="2011-03-04T20:23:09.483" Comment="http://twitter.com/#!/StackGameDev/status/43768462895620096" />
  <row Id="19227" PostHistoryTypeId="2" PostId="9329" RevisionGUID="2f10de2b-0be4-455d-8bbb-e3d063b22ec2" CreationDate="2011-03-04T21:14:25.163" UserId="2778" Text="Having created your first XNA game project, you will get two projects created.&#xD;&#xA;&#xD;&#xA;&gt;* `MyFirstGame`&#xD;&#xA;&#xD;&#xA;This project contains:&#xD;&#xA;&#xD;&#xA;1. Game.ico;&#xD;&#xA;2. Game1.cs;&#xD;&#xA;3. GameThumbnail.png;&#xD;&#xA;4. Program.cs.&#xD;&#xA;&#xD;&#xA;A reference to your content is also available. That is refered to as the content pipeline.&#xD;&#xA;&#xD;&#xA;&gt;* `MyFirstGameContent`&#xD;&#xA;&#xD;&#xA;This projecT's content is primarily empty. You will have to add content to it, such as your sprites (images).&#xD;&#xA;&#xD;&#xA;&gt;**The Game1.cs class structure**&#xD;&#xA;&#xD;&#xA;This class inherits from the [Microsoft.Xna.Framework.Game class][1].&#xD;&#xA;&#xD;&#xA;The most important methods of this class are:&#xD;&#xA;&#xD;&#xA;1. private members;&#xD;&#xA;2. Its constructor;&#xD;&#xA;3. [protected override void `Initialize()` { }][2] ;&#xD;&#xA;4. [protected override void `LoadContent()` { }][3] ;&#xD;&#xA;5. [protected override void `Update(GameTime gameTime)` { }][4] ;&#xD;&#xA;6. [protected override void `Draw(GameTime gameTime)` { }][5] .&#xD;&#xA;&#xD;&#xA;&gt;* Private Members&#xD;&#xA;&#xD;&#xA;The default private members that are useful:&#xD;&#xA;&#xD;&#xA;    private GraphicsDeviceManager _graphics;&#xD;&#xA;    private SpriteBatch _spriteBatch; // This instance of the SpriteBatch is used to display your sprites in your game.&#xD;&#xA;    private Texture2D _sprite; // The sprite that will be displayed on the game screen.&#xD;&#xA;&#xD;&#xA;&gt;* The constructor&#xD;&#xA;&#xD;&#xA;You may here change the screen size, its resolution. When you wish to address specifically to Windows, you may even use the compiler directives:&#xD;&#xA;&#xD;&#xA;    #if WINDOWS&#xD;&#xA;        _graphics.PreferredBackBufferHeight = 400;&#xD;&#xA;        _graphics.PreferredBackBufferWidth = 640;&#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;These lines will change your game resolution to the specified values.&#xD;&#xA;&#xD;&#xA;&gt;* The `Initialize()` method&#xD;&#xA;&#xD;&#xA;You may or may not have anything to write here. Aside, if you wish to reserve some area for specific needs in your game, you may as well define your boundaries variables here.&#xD;&#xA;&#xD;&#xA;&gt;* The `LoadContent()` method&#xD;&#xA;&#xD;&#xA;This is the most important method along with the `Update()` and `Draw()` methods. This is here you will need to load your sprite.&#xD;&#xA;&#xD;&#xA;    protected override void LoadContent() {&#xD;&#xA;        // Remember those private members? They'll be used here!&#xD;&#xA;&#xD;&#xA;        _spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;        _sprite = Content.Load&lt;Texture2D&gt;(@&quot;mySpriteKey&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The System.String &quot;mySpriteKey&quot; refers to the `Asset Name` property accessed through the Properties Window of an image file.&#xD;&#xA;&#xD;&#xA;&gt;* The `Update(GameTime gameTime)` method&#xD;&#xA;&#xD;&#xA;This is used to update the state of your game and get the keys pressed by the user such as keyboard keys. That is subject for another question though. Besides, you need to master this method to make your sprite move on screen.&#xD;&#xA;&#xD;&#xA;&gt;* The `Draw(GameTime gameTime)` method&#xD;&#xA;&#xD;&#xA;This is where the sprite, loaded within the `LoadContent()` method, gets drawn on your game screen. To draw your loaded in `_sprite` private member sprite image, you need to use the `_spriteBatch` private member.&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime) {&#xD;&#xA;        GraphicsDevice.Clear(Color.CornFlowerBlue);&#xD;&#xA;&#xD;&#xA;        _spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);&#xD;&#xA;        _spriteBatch.Draw(_sprite, new Rectangle(0, 0, 100, 100), Color.White);&#xD;&#xA;        _spriteBatch.End();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt;* Okay, I've all coded the necessary, but the ` _sprite = Content.Load&lt;Texture2D&gt;(@&quot;mySpriteKey&quot;);` line complains about an invalid asset name or something, what to do?&#xD;&#xA;&#xD;&#xA;You need to add your sprite image file to your `MyFirstGameContent` project. In order to do so, &#xD;&#xA;&#xD;&#xA;1. right-click on the project name, and **Add**|**Existing Item**; then&#xD;&#xA;2. browse to your whatever image you want to display on screen; and&#xD;&#xA;3. click **[Add]** button.&#xD;&#xA;&#xD;&#xA;You should now see you image file being part of your content project. Now, &#xD;&#xA;&#xD;&#xA;1. right-click the image file, and click `Properties`; you now have to make sure that&#xD;&#xA;2. your `Asset Name` property value is the same as the string key you passed to the `Content.Load&lt;T&gt;()` method.&#xD;&#xA;&#xD;&#xA;&gt;* Some interesting links I used to learn&#xD;&#xA;&#xD;&#xA;1. [Arkanoid Nintendo NES Sprites][6];&#xD;&#xA;2. [How to make a 2D XNA Game][7];&#xD;&#xA;3. [Going Beyond: XNA Game Studio in 3D][8].&#xD;&#xA;&#xD;&#xA;Please feel free to ask any further details as I will be pleased to tell all I know and beyond. I love to share knowledge.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.initialize.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.loadcontent.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.update.aspx&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.draw.aspx&#xD;&#xA;  [6]: http://www.nesmaps.com/maps/Arkanoid/sprites/ArkanoidSprites.html&#xD;&#xA;  [7]: http://swsql.com/Tutorials/MakeXNA2D/mak_xna_2d_game_intro.htm&#xD;&#xA;  [8]: http://msdn.microsoft.com/en-us/library/bb203897(v=xnagamestudio.31).aspx" />
  <row Id="19228" PostHistoryTypeId="5" PostId="9329" RevisionGUID="5a515f22-b1fd-45eb-be8d-3822e3e6441f" CreationDate="2011-03-04T21:22:23.627" UserId="2778" Comment="added 55 characters in body; edited body" Text="Having created your first XNA game project, you will get two projects created.&#xD;&#xA;&#xD;&#xA;&gt;* **`MyFirstGame`**&#xD;&#xA;&#xD;&#xA;This project contains:&#xD;&#xA;&#xD;&#xA;1. Game.ico;&#xD;&#xA;2. Game1.cs;&#xD;&#xA;3. GameThumbnail.png;&#xD;&#xA;4. Program.cs.&#xD;&#xA;&#xD;&#xA;A reference to your content is also available. That is refered to as the content pipeline.&#xD;&#xA;&#xD;&#xA;&gt;* **`MyFirstGameContent`**&#xD;&#xA;&#xD;&#xA;This project's content is primarily empty. You will have to add content to it, such as your sprites (images).&#xD;&#xA;&#xD;&#xA;&gt;* The **`Game1.cs`** class structure&#xD;&#xA;&#xD;&#xA;This class inherits from the [Microsoft.Xna.Framework.Game class][1].&#xD;&#xA;&#xD;&#xA;The most important methods of this class are:&#xD;&#xA;&#xD;&#xA;1. private members;&#xD;&#xA;2. Its constructor;&#xD;&#xA;3. [protected override void `Initialize()` { }][2] ;&#xD;&#xA;4. [protected override void `LoadContent()` { }][3] ;&#xD;&#xA;5. [protected override void `Update(GameTime gameTime)` { }][4] ;&#xD;&#xA;6. [protected override void `Draw(GameTime gameTime)` { }][5] .&#xD;&#xA;&#xD;&#xA;&gt;* **Private Members**&#xD;&#xA;&#xD;&#xA;The default private members that are useful:&#xD;&#xA;&#xD;&#xA;    private GraphicsDeviceManager _graphics;&#xD;&#xA;    private SpriteBatch _spriteBatch; // This instance of the SpriteBatch is used to display your sprites in your game.&#xD;&#xA;    private Texture2D _sprite; // The sprite that will be displayed on the game screen.&#xD;&#xA;&#xD;&#xA;&gt;* **The constructor**&#xD;&#xA;&#xD;&#xA;You may here change the screen size, its resolution. When you wish to address specifically to Windows, you may even use the compiler directives:&#xD;&#xA;&#xD;&#xA;    #if WINDOWS&#xD;&#xA;        _graphics.PreferredBackBufferHeight = 400;&#xD;&#xA;        _graphics.PreferredBackBufferWidth = 640;&#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;These lines will change your game resolution to the specified values.&#xD;&#xA;&#xD;&#xA;&gt;* The **`Initialize()`** method&#xD;&#xA;&#xD;&#xA;You may or may not have anything to write here. Aside, if you wish to reserve some area for specific needs in your game, you may as well define your boundaries variables here.&#xD;&#xA;&#xD;&#xA;&gt;* The **`LoadContent()`** method&#xD;&#xA;&#xD;&#xA;This is the most important method along with the `Update()` and `Draw()` methods. This is here you will need to load your sprite.&#xD;&#xA;&#xD;&#xA;    protected override void LoadContent() {&#xD;&#xA;        // Remember those private members? They'll be used here!&#xD;&#xA;&#xD;&#xA;        _spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;        _sprite = Content.Load&lt;Texture2D&gt;(@&quot;mySpriteKey&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The System.String &quot;mySpriteKey&quot; refers to the `Asset Name` property accessed through the Properties Window of an image file.&#xD;&#xA;&#xD;&#xA;&gt;* The **`Update(GameTime gameTime)`** method&#xD;&#xA;&#xD;&#xA;This is used to update the state of your game and get the keys pressed by the user such as keyboard keys. That is subject for another question though. Besides, you need to master this method to make your sprite move on screen.&#xD;&#xA;&#xD;&#xA;&gt;* The **`Draw(GameTime gameTime)`** method&#xD;&#xA;&#xD;&#xA;This is where the sprite, loaded within the `LoadContent()` method, gets drawn on your game screen. To draw your loaded in `_sprite` private member sprite image, you need to use the `_spriteBatch` private member.&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime) {&#xD;&#xA;        GraphicsDevice.Clear(Color.CornFlowerBlue);&#xD;&#xA;&#xD;&#xA;        _spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);&#xD;&#xA;        _spriteBatch.Draw(_sprite, new Rectangle(0, 0, 100, 100), Color.White);&#xD;&#xA;        _spriteBatch.End();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt;* **Okay, I've all coded the necessary, but the** &#xD;&#xA;&#xD;&#xA;    _sprite = Content.Load&lt;Texture2D&gt;(@&quot;mySpriteKey&quot;);` &#xD;&#xA;&#xD;&#xA;&gt;**line complains about an invalid asset name or something, what to do?**&#xD;&#xA;&#xD;&#xA;You need to add your sprite image file to your `MyFirstGameContent` project. In order to do so, &#xD;&#xA;&#xD;&#xA;1. right-click on the project name, and **Add|Existing Item**; then&#xD;&#xA;2. browse to your whatever image you want to display on screen; and&#xD;&#xA;3. click **[Add]** button.&#xD;&#xA;&#xD;&#xA;You should now see you image file being part of your content project. Now, &#xD;&#xA;&#xD;&#xA;1. right-click the image file, and click `Properties`; you now have to make sure that&#xD;&#xA;2. your `Asset Name` property value is the same as the string key you passed to the `Content.Load&lt;T&gt;()` method.&#xD;&#xA;&#xD;&#xA;&gt;* **Some interesting links I used to learn**&#xD;&#xA;&#xD;&#xA;1. [Arkanoid Nintendo NES Sprites][6];&#xD;&#xA;2. [How to make a 2D XNA Game][7];&#xD;&#xA;3. [Going Beyond: XNA Game Studio in 3D][8].&#xD;&#xA;&#xD;&#xA;Please feel free to ask any further details as I will be pleased to tell all I know and beyond. I love to share knowledge.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.initialize.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.loadcontent.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.update.aspx&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.draw.aspx&#xD;&#xA;  [6]: http://www.nesmaps.com/maps/Arkanoid/sprites/ArkanoidSprites.html&#xD;&#xA;  [7]: http://swsql.com/Tutorials/MakeXNA2D/mak_xna_2d_game_intro.htm&#xD;&#xA;  [8]: http://msdn.microsoft.com/en-us/library/bb203897(v=xnagamestudio.31).aspx" />
  <row Id="19229" PostHistoryTypeId="2" PostId="9330" RevisionGUID="3dc72f00-5035-4cf8-a038-3c664da72d59" CreationDate="2011-03-04T21:25:51.570" UserDisplayName="user5872" Text="I want to be able to zoom in and out of the map using the scroll wheel. I want to zoom towards the cursor like google maps does but I'm completely lost on how to calculate the movements.&#xD;&#xA;&#xD;&#xA;so far, all I have is the resizing but I now need to change the map position.&#xD;&#xA;&#xD;&#xA;What I have: map x and y; map width and height; cursor x and y.&#xD;&#xA;&#xD;&#xA;Any help would be most welcome." />
  <row Id="19230" PostHistoryTypeId="1" PostId="9330" RevisionGUID="3dc72f00-5035-4cf8-a038-3c664da72d59" CreationDate="2011-03-04T21:25:51.570" UserDisplayName="user5872" Text="zoom to cursor calculation" />
  <row Id="19231" PostHistoryTypeId="3" PostId="9330" RevisionGUID="3dc72f00-5035-4cf8-a038-3c664da72d59" CreationDate="2011-03-04T21:25:51.570" UserDisplayName="user5872" Text="&lt;gui&gt;&lt;maps&gt;" />
  <row Id="19232" PostHistoryTypeId="2" PostId="9331" RevisionGUID="30fb9cc2-0b9a-43fb-ba6a-a066e1df1c46" CreationDate="2011-03-04T21:30:53.583" UserId="5864" Text="Not sure why it hasn't been mentioned yet, but I believe the best way to attract users to your engine is to write (or have someone write) a good game using it. When evaluating libraries and engines, the list and number of titles using them is always a good indicator of ease of use, versatility, support availability..." />
  <row Id="19233" PostHistoryTypeId="5" PostId="9329" RevisionGUID="14ae7def-c56b-4853-b090-0b534ec65c0e" CreationDate="2011-03-04T21:35:31.343" UserId="2778" Comment="added 3 characters in body" Text="Having created your first XNA game project, you will get two projects created.&#xD;&#xA;&#xD;&#xA;&gt;* **`MyFirstGame`**&#xD;&#xA;&#xD;&#xA;This project contains:&#xD;&#xA;&#xD;&#xA;1. Game.ico;&#xD;&#xA;2. Game1.cs;&#xD;&#xA;3. GameThumbnail.png;&#xD;&#xA;4. Program.cs.&#xD;&#xA;&#xD;&#xA;A reference to your content is also available. That is refered to as the content pipeline.&#xD;&#xA;&#xD;&#xA;&gt;* **`MyFirstGameContent`**&#xD;&#xA;&#xD;&#xA;This project's content is primarily empty. You will have to add content to it, such as your sprites (images).&#xD;&#xA;&#xD;&#xA;&gt;* The **`Game1.cs`** class structure&#xD;&#xA;&#xD;&#xA;This class inherits from the [Microsoft.Xna.Framework.Game class][1].&#xD;&#xA;&#xD;&#xA;The most important methods of this class are:&#xD;&#xA;&#xD;&#xA;1. private members;&#xD;&#xA;2. Its constructor;&#xD;&#xA;3. [protected override void `Initialize()` { }][2] ;&#xD;&#xA;4. [protected override void `LoadContent()` { }][3] ;&#xD;&#xA;5. [protected override void `Update(GameTime gameTime)` { }][4] ;&#xD;&#xA;6. [protected override void `Draw(GameTime gameTime)` { }][5] .&#xD;&#xA;&#xD;&#xA;&gt;* **Private Members**&#xD;&#xA;&#xD;&#xA;The default private members that are useful:&#xD;&#xA;&#xD;&#xA;    private GraphicsDeviceManager _graphics;&#xD;&#xA;    private SpriteBatch _spriteBatch; // This instance of the SpriteBatch is used to display your sprites in your game.&#xD;&#xA;    private Texture2D _sprite; // The sprite that will be displayed on the game screen.&#xD;&#xA;&#xD;&#xA;&gt;* **The constructor**&#xD;&#xA;&#xD;&#xA;You may here change the screen size, its resolution. When you wish to address specifically to Windows, you may even use the compiler directives:&#xD;&#xA;&#xD;&#xA;    #if WINDOWS&#xD;&#xA;        _graphics.PreferredBackBufferHeight = 400;&#xD;&#xA;        _graphics.PreferredBackBufferWidth = 640;&#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;These lines will change your game resolution to the specified values.&#xD;&#xA;&#xD;&#xA;&gt;* The **`Initialize()`** method&#xD;&#xA;&#xD;&#xA;You may or may not have anything to write here. Aside, if you wish to reserve some area for specific needs in your game, you may as well define your boundaries variables here.&#xD;&#xA;&#xD;&#xA;&gt;* The **`LoadContent()`** method&#xD;&#xA;&#xD;&#xA;This is the most important method along with the `Update()` and `Draw()` methods. This is here you will need to load your sprite.&#xD;&#xA;&#xD;&#xA;    protected override void LoadContent() {&#xD;&#xA;        // Remember those private members? They'll be used here!&#xD;&#xA;&#xD;&#xA;        _spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;        _sprite = Content.Load&lt;Texture2D&gt;(@&quot;mySpriteKey&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The System.String &quot;mySpriteKey&quot; refers to the `Asset Name` property accessed through the Properties Window of an image file.&#xD;&#xA;&#xD;&#xA;&gt;* The **`Update(GameTime gameTime)`** method&#xD;&#xA;&#xD;&#xA;This is used to update the state of your game and get the keys pressed by the user such as keyboard keys. That is subject for another question though. Besides, you need to master this method to make your sprite move on screen.&#xD;&#xA;&#xD;&#xA;&gt;* The **`Draw(GameTime gameTime)`** method&#xD;&#xA;&#xD;&#xA;This is where the sprite, loaded within the `LoadContent()` method, gets drawn on your game screen. To draw your loaded in `_sprite` private member sprite image, you need to use the `_spriteBatch` private member.&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime) {&#xD;&#xA;        GraphicsDevice.Clear(Color.CornFlowerBlue);&#xD;&#xA;&#xD;&#xA;        _spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);&#xD;&#xA;        _spriteBatch.Draw(_sprite, new Rectangle(0, 0, 100, 100), Color.White);&#xD;&#xA;        _spriteBatch.End();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt;* **Okay, I've all coded the necessary, but the** &#xD;&#xA;&#xD;&#xA;    _sprite = Content.Load&lt;Texture2D&gt;(@&quot;mySpriteKey&quot;);` &#xD;&#xA;&#xD;&#xA;&gt;**line complains about an invalid asset name or something, what to do?**&#xD;&#xA;&#xD;&#xA;You need to add your sprite image file to your `MyFirstGameContent` project. In order to do so, &#xD;&#xA;&#xD;&#xA;1. right-click on the project name, and **Add|Existing Item**; then&#xD;&#xA;2. browse to your whatever image you want to display on screen; and&#xD;&#xA;3. click **[Add]** button.&#xD;&#xA;&#xD;&#xA;You should now see you image file being part of your content project. Now, &#xD;&#xA;&#xD;&#xA;1. right-click the image file, and click `Properties`; you now have to make sure that&#xD;&#xA;2. your `Asset Name` property value is the same as the string key you passed to the `Content.Load&lt;T&gt;()` method.&#xD;&#xA;&#xD;&#xA;&gt;* **Some interesting links I've used to learn**&#xD;&#xA;&#xD;&#xA;1. [Arkanoid Nintendo NES Sprites][6];&#xD;&#xA;2. [How to make a 2D XNA Game][7];&#xD;&#xA;3. [Going Beyond: XNA Game Studio in 3D][8].&#xD;&#xA;&#xD;&#xA;Please feel free to ask any further details as I will be pleased to tell all I know and beyond. I love to share knowledge.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.initialize.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.loadcontent.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.update.aspx&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.draw.aspx&#xD;&#xA;  [6]: http://www.nesmaps.com/maps/Arkanoid/sprites/ArkanoidSprites.html&#xD;&#xA;  [7]: http://swsql.com/Tutorials/MakeXNA2D/mak_xna_2d_game_intro.htm&#xD;&#xA;  [8]: http://msdn.microsoft.com/en-us/library/bb203897(v=xnagamestudio.31).aspx" />
  <row Id="19234" PostHistoryTypeId="2" PostId="9332" RevisionGUID="566a111e-06f3-4015-a5a8-4d0e1eb863c5" CreationDate="2011-03-04T21:59:07.930" UserId="5865" Text="Perhaps the best solution is to compile this in a community wiki:&#xD;&#xA;&#xD;&#xA;**Make your Highscore more meaningful:**&#xD;&#xA;&#xD;&#xA; - integrate it with **social networks** your players are using (their friends are much more important to them than strangers)&#xD;&#xA;&#xD;&#xA; - make it **local** (because players care more about their city/country)&#xD;&#xA;&#xD;&#xA;**Make your Highscore more engaging and less frustrating**&#xD;&#xA;&#xD;&#xA; - **divide** your highscore table in **time ranges** (e.g. last 24 hours) so everyone gets a fresh chance every once in a while (*Risk:* If there's no all-time highscore, the player's scores &quot;expire&quot; or are reset it feels like taking them away)&#xD;&#xA;&#xD;&#xA; - **divide** your highscore table in **skill ranges** to only show players opponents whom they can realistically beat&#xD;&#xA;&#xD;&#xA; - **reward** other things than raw points, like **continued or repeated play**&#xD;&#xA;&#xD;&#xA; - provide **short term goals** like achievements on the way to a highscore&#xD;&#xA;&#xD;&#xA;*Feel free to add your own guidelines/tips!*" />
  <row Id="19235" PostHistoryTypeId="2" PostId="9333" RevisionGUID="19cdec43-0d6c-43bb-a96f-9abd48d5925e" CreationDate="2011-03-04T22:11:32.827" UserId="1829" Text="Well if you had problems with irrlicht, you should also try Ogre3D; it's not easier, but it may work better if you put some time into it. The important thing you have to understand are what is a framelistener, how to get the time since the last frame was displayed, and that's pretty much the only thing you have to understand if you want to make this application you are talking about.&#xD;&#xA;&#xD;&#xA;I've also had some difficulties with irrlicht, the tutorials are not very up to date, but you should have tried the samples !&#xD;&#xA;&#xD;&#xA;I also ran a lot in circles at the begining, toying with panda3d and other stuff like pygame etc. Try to focus on some game idea and implement one thing at a time.&#xD;&#xA;&#xD;&#xA;And try to remember some matric math, it will have some use in 3D !" />
  <row Id="19240" PostHistoryTypeId="5" PostId="9312" RevisionGUID="2a70bb47-9364-4054-82b8-cd7d0e15b7c1" CreationDate="2011-03-04T23:40:42.480" UserId="5006" Comment="added 334 characters in body" Text="I think this is one case that would benefit from a document-database solution (i.e a &quot;NoSql&quot; database).  &#xD;&#xA;&#xD;&#xA;If you're set on using a SQL database then @Qua's answer is probably best.&#xD;&#xA;&#xD;&#xA;The 2nd method you mentioned would fit perfectly with the document model.  I'm currently looking at implementing something similar with MongoDb, which from what I've seen essentially stores and allows easy querying of JSON objects.  See [this answer][1] for some more info.&#xD;&#xA;&#xD;&#xA;Also keep in mind, that you can have more than one type of database.  I'm using SQL for stuff that fits nicely into a relational model and Mongo for stuff that doesn't.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5316/nosql-is-it-a-valid-option-for-web-based-game/5322#5322" />
  <row Id="19241" PostHistoryTypeId="2" PostId="9335" RevisionGUID="8b1a38a1-c8c8-45a0-8d39-476edb0283d6" CreationDate="2011-03-05T00:07:05.033" UserId="4779" Text="There is a game called Zombie Cafe, for iPhone. It is 2d and has a cool concept. Developed by capcommobile.&#xD;&#xA;&#xD;&#xA;Anyway, all I want to know is what engine did they use for making it?&#xD;&#xA;I know that this kind of game could be done using pretty much any engine, but I am particularly interested in capcommobile's approach. Do you have any idea?" />
  <row Id="19242" PostHistoryTypeId="1" PostId="9335" RevisionGUID="8b1a38a1-c8c8-45a0-8d39-476edb0283d6" CreationDate="2011-03-05T00:07:05.033" UserId="4779" Text="Game engine used for iPhone Zombie Cafe?" />
  <row Id="19243" PostHistoryTypeId="3" PostId="9335" RevisionGUID="8b1a38a1-c8c8-45a0-8d39-476edb0283d6" CreationDate="2011-03-05T00:07:05.033" UserId="4779" Text="&lt;iphone&gt;" />
  <row Id="19244" PostHistoryTypeId="2" PostId="9336" RevisionGUID="f16c544f-2d87-48ea-9d83-a22953db903c" CreationDate="2011-03-05T00:12:56.353" UserId="4104" Text="Here's a few snippets of what I have so far...&#xD;&#xA;&#xD;&#xA;    void create()&#xD;&#xA;    {&#xD;&#xA;        renderer = new ImmediateModeRenderer();&#xD;&#xA;    &#xD;&#xA;        tiles = Gdx.graphics.newTexture(&#xD;&#xA;            Gdx.files.getFileHandle(&quot;res/tiles2.png&quot;, FileType.Internal),&#xD;&#xA;            TextureFilter.MipMap,&#xD;&#xA;            TextureFilter.Linear,&#xD;&#xA;            TextureWrap.ClampToEdge,&#xD;&#xA;            TextureWrap.ClampToEdge);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void render()&#xD;&#xA;    {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;        Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void renderSprite()&#xD;&#xA;    {&#xD;&#xA;        int handle = tiles.getTextureObjectHandle();&#xD;&#xA;        Gdx.gl.glBindTexture(GL.GL_TEXTURE_2D, handle);&#xD;&#xA;        Gdx.gl.glEnable(GL.GL_POINT_SPRITE);&#xD;&#xA;        Gdx.gl11.glTexEnvi(GL.GL_POINT_SPRITE, GL.GL_COORD_REPLACE, GL.GL_TRUE);&#xD;&#xA;    &#xD;&#xA;        renderer.begin(GL.GL_POINTS);&#xD;&#xA;        renderer.vertex(pos.x, pos.y, pos.z);&#xD;&#xA;        renderer.end();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`create()` is called once when the program starts, and `renderSprites()` is called for each sprite (so, `pos` is unique to each sprite) where the sprites are arranged in a sort-of 3D cube. &#xD;&#xA;&#xD;&#xA;Unfortunately though, this just renders a few white dots...&#xD;&#xA;&#xD;&#xA;![Point sprite problem][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZG41S.png&#xD;&#xA;&#xD;&#xA;I suppose that the texture isn't being bound which is why I'm getting white dots. Also, when I draw my sprites on anything other than 0 z-axis, they do not appear -- I read that I need to crease my zfar and znear, but I have no idea how to do this using libgdx (perhaps it's because I'm using ortho projection? What do I use instead?).&#xD;&#xA;&#xD;&#xA;I know that the texture is usable, since I was able to render it using a SpriteBatch, but  I guess I'm not using it properly with OpenGL." />
  <row Id="19245" PostHistoryTypeId="1" PostId="9336" RevisionGUID="f16c544f-2d87-48ea-9d83-a22953db903c" CreationDate="2011-03-05T00:12:56.353" UserId="4104" Text="How do I draw an OpenGL point sprite using libgdx for Android?" />
  <row Id="19246" PostHistoryTypeId="3" PostId="9336" RevisionGUID="f16c544f-2d87-48ea-9d83-a22953db903c" CreationDate="2011-03-05T00:12:56.353" UserId="4104" Text="&lt;opengl&gt;&lt;textures&gt;&lt;sprites&gt;" />
  <row Id="19247" PostHistoryTypeId="2" PostId="9337" RevisionGUID="40d0b818-68c6-4eff-8907-64b28eda4c9d" CreationDate="2011-03-05T00:20:25.080" UserId="5864" Text="I find OpenAL pretty convoluted for small things. What are your feature requirements? Because mine are pretty simple:&#xD;&#xA;&#xD;&#xA; - load/close samples and music&#xD;&#xA; - play/pause/stop music&#xD;&#xA; - play samples&#xD;&#xA; - dynamically change per-channel volume for each item being played&#xD;&#xA;&#xD;&#xA;If your requirements are that simple, too, I suggest you consider sticking with whatever’s more convenient on the platform, at the cost of a few `#ifdef`’s. I usually use SDL_mixer (despite its numerous shortcomings) on desktop systems, and the OS audio layer on mobile platforms.&#xD;&#xA;&#xD;&#xA;You should have a look at [ALmixer][1], which is basically SDL_mixer done right on top of OpenAL.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://playcontrol.net/opensource/ALmixer/backstory.html" />
  <row Id="19248" PostHistoryTypeId="2" PostId="9338" RevisionGUID="99822c18-86e1-40eb-bf92-be951a84bad2" CreationDate="2011-03-05T00:27:33.533" UserId="5876" Text="I sometimes disable depth buffer writing via glDepthMask(GL_FALSE) during the alpha rendering of a frame. That works perfectly fine on some GPUs (like the Motorola Droid's PowerVR), but on the HTC EVO with the Adreno GPU for example, I end up with the frame buffer being complete garbage (I see traces of the meshes I rendered somewhere, but the entire screen is mostly trashed).&#xD;&#xA;&#xD;&#xA;If I force glDepthMask to be true the entire time, everything works fine.&#xD;&#xA;&#xD;&#xA;I need glDepthMask to be off during parts of the alpha rendering. What can cause the framebuffer to get destroyed by turning the depth writing off?&#xD;&#xA;&#xD;&#xA;I do clear the depth buffer initially, and the majority of the screen has pixels rendered with depth writing turned on first before I do additional drawing with it turned off." />
  <row Id="19249" PostHistoryTypeId="1" PostId="9338" RevisionGUID="99822c18-86e1-40eb-bf92-be951a84bad2" CreationDate="2011-03-05T00:27:33.533" UserId="5876" Text="Disabling depth write trashes the frame buffer on some GPUs" />
  <row Id="19250" PostHistoryTypeId="3" PostId="9338" RevisionGUID="99822c18-86e1-40eb-bf92-be951a84bad2" CreationDate="2011-03-05T00:27:33.533" UserId="5876" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;depth-buffer&gt;" />
  <row Id="19251" PostHistoryTypeId="2" PostId="9339" RevisionGUID="a0e41a2c-606a-4221-b2ae-73d971a1ccba" CreationDate="2011-03-05T00:30:29.497" UserId="5864" Text="If you are using orthogonal projection, then chances are you called `Gdx.gl.glOrtho()` at some point. The last two arguments are your near and far distances.&#xD;&#xA;&#xD;&#xA;By the way, you should call `Gdx.gl.glClearColor()` *before* `Gdx.gl.glClear()`. It's not dramatic in your code, you will only get the first frame wrong, but be careful about similar errors." />
  <row Id="19252" PostHistoryTypeId="2" PostId="9340" RevisionGUID="82d9a19c-3fc6-4851-aadf-3a443a9dac1f" CreationDate="2011-03-05T00:34:50.627" UserId="2332" Text="Seeing as it's Capcom, it's most likely that they used a bespoke engine that they created themselves. I'm not familiar with the game itself, but with fairly few stable engines for mobile development currently out there and not many big developers using something like Unity at the minute, I would say they just made it themselves.&#xD;&#xA;&#xD;&#xA;It's Capcom, they have A LOT of code and experience, so I don't think it would be a massive challenge for them (unless the game has some crazy stuff in it, which is a challenge for anybody)." />
  <row Id="19253" PostHistoryTypeId="2" PostId="9341" RevisionGUID="a28e952c-9220-4a3b-91c0-7717debf9264" CreationDate="2011-03-05T02:19:17.027" UserId="3361" Text="Shouldn't glDisable(GL_DEPTH_TEST) disable writes to the depth buffer as well?  Maybe that fixes it for you." />
  <row Id="19254" PostHistoryTypeId="25" PostId="9335" RevisionGUID="8a367893-3651-464b-85df-96425b3d4ddf" CreationDate="2011-03-05T02:23:10.923" Comment="http://twitter.com/#!/StackGameDev/status/43859065801162752" />
  <row Id="19255" PostHistoryTypeId="2" PostId="9342" RevisionGUID="c2353537-cba0-4212-9ede-775b7aaa505c" CreationDate="2011-03-05T02:27:12.167" UserId="3361" Text="I do most of my development on OS X and for my current game project this is my target environment. However when I play games I play on Windows. As a windows gamer I am used to Alt+Tab switching from within the game to the last application that was open.&#xD;&#xA;&#xD;&#xA;On OS X I currently can't find either a game that supports that nor can I find a way to make it possible.  My current project is based on SDL 1.3 and I can see that cmd+tab is a sequence that is sent directly to my application and not intercepted by the operating system.&#xD;&#xA;&#xD;&#xA;Now my first attempt was to hide the rendering window on cmd+tab which certainly works, but has the disadvantage that a hidden OpenGL window in SDL cannot be restored when the user tabs back to the application.  First of all, there is no event fired for that or I can't find it, secondly the core problem is that when that application window is hidden, my game is still the active application, just that the window disappeared.&#xD;&#xA;&#xD;&#xA;That is incredible annoying.&#xD;&#xA;&#xD;&#xA;Any ideas how to approximate the windows / linux behavior for alt+tab?" />
  <row Id="19256" PostHistoryTypeId="1" PostId="9342" RevisionGUID="c2353537-cba0-4212-9ede-775b7aaa505c" CreationDate="2011-03-05T02:27:12.167" UserId="3361" Text="How to deal with OpenGL and Fullscreen on OS X" />
  <row Id="19257" PostHistoryTypeId="3" PostId="9342" RevisionGUID="c2353537-cba0-4212-9ede-775b7aaa505c" CreationDate="2011-03-05T02:27:12.167" UserId="3361" Text="&lt;opengl&gt;&lt;sdl&gt;&lt;macos&gt;" />
  <row Id="19261" PostHistoryTypeId="2" PostId="9344" RevisionGUID="0a2e875f-cb99-446d-b76a-88532c96f51d" CreationDate="2011-03-05T03:49:05.657" UserId="5868" Text="Assuming that your *map x* and *map y* mean the top left corner of the screen area over your map in map coordinates and *map width* and *map height* are the dimensions of your map at the actual zoom level again in map coordinates (not screen coordinates), first, calculate your zoom ratio:&#xD;&#xA;&#xD;&#xA;*zoom x* = *screen width* / *map width*;&#xD;&#xA;&#xD;&#xA;Let's assume the aspect ratio does not change - *zoom x* = *zoom y* = *zoom*;&#xD;&#xA;If you want to change the zoom to *next zoom*, first find the coords of the new screen over your map:&#xD;&#xA;&#xD;&#xA;*new map width* = *screen width* / *next zoom*&#xD;&#xA;&#xD;&#xA;*new map height* = *screen height* / *next zoom*&#xD;&#xA;&#xD;&#xA;We need to find the change in both values and distribute these depending on the mouse position on the screen. If the mouse position would be in the exact center screen position, then this change would be evenly divided between the top-bottom and left-right sides. Since the mouse is at an arbitrary position, we need to find the ratios for the height and width changes for the sides.&#xD;&#xA;&#xD;&#xA;Let's assume that the screen dimensions are *screen max width* and *screen max height*;&#xD;&#xA;The new coordinates of your screen (dimensions *new map width*:*new map height*) over your map are:&#xD;&#xA;&#xD;&#xA;*new map x* = *map x* - (*cursor x* / *screen max width* * (*new map width* - *map width*))&#xD;&#xA;&#xD;&#xA;*new map y* = *map y* - (*cursor y* / *screen max height* * (*new map height* - *map height*))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To convert any map coordinate to a screen coordinate:&#xD;&#xA;&#xD;&#xA;*screen x* = *map x* * *zoom*&#xD;&#xA;&#xD;&#xA;and to convert back:&#xD;&#xA;&#xD;&#xA;*map x* = *screen x* / *zoom*&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19262" PostHistoryTypeId="2" PostId="9345" RevisionGUID="1223039d-a9ff-4cc3-bba7-ce598572f37c" CreationDate="2011-03-05T04:05:23.427" UserId="5868" Text="Your first move should be decoupling direct database access from the game server and using a usage specific middleware to prepare data for your server (ie. XML, JSON). These would be able to handle any number of databases and more importantly be able to provide you with application specific caching options. Cache whatever you can and nag the db only when you must. Make big fetches and rarely instead of many small queries to achieve the best possible performance in your scenario.&#xD;&#xA;&#xD;&#xA;The database of your choice might also allow you to operate clusters which make it easy to expand on the available database resources and provide your results faster, but this is a subject that needs much experience and a dedicated database administrator to set up and maintain - and not quite for the indie budget either." />
  <row Id="19263" PostHistoryTypeId="2" PostId="9346" RevisionGUID="1f40b936-6533-4ce4-8df0-09f40b3ff458" CreationDate="2011-03-05T04:07:38.643" UserId="5021" Text="I want to display a 3D textured sphere, and then rotate it in one direction. The direction will never change, and the camera will never move. One way is to actually create a spherical mesh, map a texture to it, rotate the sphere, and render in 3D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My question is, is there a way to display a 2D circle, that looks like a rotating sphere, with just a 2D shader.&#xD;&#xA;&#xD;&#xA;In other words, can someone think of a trick, like mapping a texture to the circle in a particular way, to give the appearance of an in-place rotating sphere, that is always viewed from the side?" />
  <row Id="19264" PostHistoryTypeId="1" PostId="9346" RevisionGUID="1f40b936-6533-4ce4-8df0-09f40b3ff458" CreationDate="2011-03-05T04:07:38.643" UserId="5021" Text="2D shader to draw representation of rotating sphere." />
  <row Id="19265" PostHistoryTypeId="3" PostId="9346" RevisionGUID="1f40b936-6533-4ce4-8df0-09f40b3ff458" CreationDate="2011-03-05T04:07:38.643" UserId="5021" Text="&lt;math&gt;&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="19266" PostHistoryTypeId="5" PostId="9346" RevisionGUID="ee6d7c8d-fae5-4267-9b6a-d1e688d34039" CreationDate="2011-03-05T04:16:10.677" UserId="5021" Comment="added 72 characters in body" Text="I want to display a 3D textured sphere, and then rotate it in one direction. The direction will never change, and the camera will never move. One way is to actually create a spherical mesh, map a texture to it, rotate the sphere, and render in 3D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My question is, is there a way to display a 2D circle, that looks like a rotating sphere, with just a 2D shader.&#xD;&#xA;&#xD;&#xA;In other words, can someone think of a trick, like mapping a texture to the circle in a particular way, to give the appearance of an in-place rotating sphere, that is always viewed from the side?&#xD;&#xA;&#xD;&#xA;I don't need exact shader code, I'm just looking for the right idea." />
  <row Id="19267" PostHistoryTypeId="2" PostId="9347" RevisionGUID="c22812d8-084c-42e1-80a6-6453041d5316" CreationDate="2011-03-05T04:32:21.880" UserId="5006" Text="I know of at least big title game (Starcraft II) that doesn't require unique display names, so it would seem like it can work in at least some circumstance.&#xD;&#xA;&#xD;&#xA;Under what situations does allowing non-unique display names work well?  When does it not work well?&#xD;&#xA;&#xD;&#xA;Does it come down to whether or not impersonation of someone else is a problem?&#xD;&#xA;&#xD;&#xA;The reasons I believe it works for Starcraft II is that there isn't any kind of in-game trading of virtual goods and other than &quot;for kicks&quot; there isn't much incentive to impersonate someone else in the game.  There's also ladder rankings so even trying to impersonate a pro is easily detectable unless you're on a similar skill level.&#xD;&#xA;&#xD;&#xA;What are some other cases where it makes sense to specifically allow or disallow duplicate display names?&#xD;&#xA;&#xD;&#xA;(I have no idea what to tag this as.  I went with `game-design` because I needed at least 1 tag and I don't have rep to create new ones yet.)" />
  <row Id="19268" PostHistoryTypeId="1" PostId="9347" RevisionGUID="c22812d8-084c-42e1-80a6-6453041d5316" CreationDate="2011-03-05T04:32:21.880" UserId="5006" Text="Non-unique display names?" />
  <row Id="19269" PostHistoryTypeId="3" PostId="9347" RevisionGUID="c22812d8-084c-42e1-80a6-6453041d5316" CreationDate="2011-03-05T04:32:21.880" UserId="5006" Text="&lt;game-design&gt;" />
  <row Id="19270" PostHistoryTypeId="2" PostId="9348" RevisionGUID="cd57db30-b768-428f-b5f5-aaeb81d67b2f" CreationDate="2011-03-05T04:32:35.453" UserId="5868" Text="Method 2 is not bad, it is versatile, but hard to manage the logic and more importantly, not platform independent unless you use something like XML or JSON. The data still stays application dependent - that might be a problem when you want to create another (non-web based) interface for your game.&#xD;&#xA;&#xD;&#xA;Method 1 would work for an SQL database, but if you want to keep it fast when your app is under a heavy load, you might want to think again about having to join tables or do 3 consecutive queries for a single item.&#xD;&#xA;&#xD;&#xA;If you knew that you were not going to have more than 64 statuses and 64 conditions and not have any single item have more than x number of statuses and y number of conditions, then you could solve this with the bitwise comparison of two 64 bit integers and x + y numeric fields in the same record where values would be given in the order appearance as a set bit. &#xD;&#xA;&#xD;&#xA;It might not be the most beautiful solution and somewhat limited, but it's very fast if you expect the db to be hit hard. I used to operate a web based browser game with a 50k+ user base, and it taught me the usefulness of this approach." />
  <row Id="19271" PostHistoryTypeId="2" PostId="9349" RevisionGUID="9706ee76-86e1-4361-b7e5-ae0fc2726c08" CreationDate="2011-03-05T04:37:19.987" UserId="5877" Text="If you haven't worked with graphics at all.before just learning open gl or direct x is a start. I programmed my first game that way. Our company engines are in house and most systems support open gl in some form. I learned while on the job  looking through the code written before I started working. You might want to take a look at some open source projects to see how a game structure is set up and start modifying those until you feel comfortable about starting your own thing. I also suggest &quot;Game coding complete&quot; as a great reference to all the little bits of game programming you don't realize are there, like proper file structure and resource management. " />
  <row Id="19272" PostHistoryTypeId="25" PostId="9342" RevisionGUID="ffb0a839-6be4-4212-871a-fefc54c820cc" CreationDate="2011-03-05T05:23:10.510" Comment="http://twitter.com/#!/StackGameDev/status/43904362665357312" />
  <row Id="19273" PostHistoryTypeId="2" PostId="9350" RevisionGUID="d97eb2a6-2a03-49e8-8942-18f8e5a6ca11" CreationDate="2011-03-05T05:36:04.350" UserId="5705" Text="I need to find out the point inside a body, lets say a rectangular object, where the mouse was clicked on. I'm makin a game where the force will be applied depending on where the mouse was clicked on the body. Any ideas? &#xD;&#xA;&#xD;&#xA;Will `body.GetLocalPoint(b2vec2)` work?  I tried by passing the mouse coordinates when the click occurred when inside the body but if the body's position is `(400,300)` in world coordinates then for `trace(body.GetLocalPoint(new b2vec2(mouseX,mouseY)).x);` I get some value between 380 to 406 or something (eg. 401.6666666). I thought getLocalPoint will give something like `x=-10` when clicked to the left of the centre of body or `x=15` when clicked to the right.&#xD;&#xA;&#xD;&#xA;Language is As3 btw." />
  <row Id="19274" PostHistoryTypeId="1" PostId="9350" RevisionGUID="d97eb2a6-2a03-49e8-8942-18f8e5a6ca11" CreationDate="2011-03-05T05:36:04.350" UserId="5705" Text="How to get local point inside a body where mouse click occurred in box2d?" />
  <row Id="19275" PostHistoryTypeId="3" PostId="9350" RevisionGUID="d97eb2a6-2a03-49e8-8942-18f8e5a6ca11" CreationDate="2011-03-05T05:36:04.350" UserId="5705" Text="&lt;actionscript-3&gt;&lt;box2d&gt;" />
  <row Id="19277" PostHistoryTypeId="25" PostId="9318" RevisionGUID="0987ea83-8dd9-4257-aa11-c5779264113c" CreationDate="2011-03-05T08:23:10.427" Comment="http://twitter.com/#!/StackGameDev/status/43949660917874688" />
  <row Id="19280" PostHistoryTypeId="2" PostId="9351" RevisionGUID="631186e1-5ad4-4248-8f91-5ebbf021c0d9" CreationDate="2011-03-05T03:20:05.527" UserId="1633" Text="I'm working on a top down fishing game. I want to implement some physics and collision detection regarding the boat moving around the lake. I would like for be able to implement thrust from either the main motor or trolling motor, the effect of wind on the object, and the drag of the water on the object.&#xD;&#xA;&#xD;&#xA;I've been looking at the farseer physics engine, but not having any experience using a physics engine, I am not quite sure that farseer is suitable for this type of thing(Most of the demos seem to be the application of gravity to a vertical top/down type model).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Would the farseer engine be suitable? or would a different engine be more suitable?" />
  <row Id="19281" PostHistoryTypeId="1" PostId="9351" RevisionGUID="631186e1-5ad4-4248-8f91-5ebbf021c0d9" CreationDate="2011-03-05T03:20:05.527" UserId="1633" Text="Simulating an object floating on water" />
  <row Id="19282" PostHistoryTypeId="3" PostId="9351" RevisionGUID="631186e1-5ad4-4248-8f91-5ebbf021c0d9" CreationDate="2011-03-05T03:20:05.527" UserId="1633" Text="&lt;c#&gt;" />
  <row Id="19283" PostHistoryTypeId="17" PostId="9351" RevisionGUID="753f2bc9-28b1-4d82-bb40-7a7672b024bf" CreationDate="2011-03-05T08:26:12.973" UserId="-1" Comment="from http://stackoverflow.com/questions/5201425/simulating-an-object-floating-on-water" Text="" />
  <row Id="19284" PostHistoryTypeId="2" PostId="9352" RevisionGUID="7210a9a9-c470-46d5-b1db-fdc1efd66c38" CreationDate="2011-03-05T08:46:35.823" UserId="5705" Text="I got the point inside the body by passing the proper values of arguments. GetLocalPoint() needs its arguments in the correct pixel to metre ratio. Also I'm supposed to pass a world point. &#xD;&#xA;&#xD;&#xA;    m_targetX = ball.GetWorldPoint(ball.GetLocalPoint(new b2Vec2(mouseXPhys, mouseYPhys)) ).x * m_physScale;&#xD;&#xA;    m_targetY = ball.GetWorldPoint(ball.GetLocalPoint(new b2Vec2(mouseXPhys, mouseYPhys)) ).y * m_physScale;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This gives the required point inside the body in world coordinates. Donno if there's an efficient way but it is good for now.&#xD;&#xA;&#xD;&#xA;    mouseXPhys = mouseX / m_physcale;&#xD;&#xA;    mouseYPhys = mouseY / m_physcale;&#xD;&#xA;    &#xD;&#xA;    m_physcale = 30; //my pixel to metre ratio.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19285" PostHistoryTypeId="6" PostId="9351" RevisionGUID="11a272da-1016-4415-9d93-ba8193712793" CreationDate="2011-03-05T10:08:10.310" UserId="1156" Comment="edited tags" Text="&lt;c#&gt;&lt;physics&gt;&lt;collision-detection&gt;" />
  <row Id="19286" PostHistoryTypeId="2" PostId="9353" RevisionGUID="23fa0a37-bfde-41e8-8204-18db08c96f1d" CreationDate="2011-03-05T10:11:29.510" UserId="1156" Text="If you're going to be trading, interacting, or something that involves potentially meeting that person again, then unique names would be a good idea. For example, if you were playing `generic FPS` with two people called `generic name`, and you wanted to tell one to fall back, how would you say which person? If they were on different teams, you would again wonder what's going on.&#xD;&#xA;&#xD;&#xA;Impersonation isn't going to be an issue unless the game depends on some kind of ladder or ranking system. Even then, there's not going to be much point. &#xD;&#xA;&#xD;&#xA;Then again, what reason is there to have non-unique names?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19287" PostHistoryTypeId="2" PostId="9354" RevisionGUID="4e84baa6-a964-4e75-85ac-e74d61173edc" CreationDate="2011-03-05T10:12:34.953" UserId="5865" Text="One problem with non-unique names is the personating as you described it. If there's a really popular player it is likely that someone will try to impersonate him. You could prevent this or make it obvious by always displaying some kind score next to the players name, so others know if it is the &quot;real&quot; popular player.&#xD;&#xA;&#xD;&#xA;If someone is bad and tries to impersonate someone better, others will see it, if he is similarly good he won't try to impersonate because he rather wants his score with his own name.&#xD;&#xA;&#xD;&#xA;Another scenario where it would cause problems is in MMORPGs, because you would confuse the two, in the chat for example. Then again that might not be a problem if there is another property of the player that distinguishes them (like class, which is shown next to the players name or as a color of it)" />
  <row Id="19288" PostHistoryTypeId="2" PostId="9355" RevisionGUID="22a18095-7f99-4399-9138-bd3c00f7f532" CreationDate="2011-03-05T10:30:03.253" UserId="5824" Text="You might find http://www.voofoostudios.com/?p=33 useful.&#xD;&#xA;&#xD;&#xA;Note that a sphere towards the edge of the screen won't be represented in 2D by a circle - perspective will distort it a bit." />
  <row Id="19289" PostHistoryTypeId="2" PostId="9356" RevisionGUID="dd4ef5e8-7ea6-4ef8-9371-3c01207356a1" CreationDate="2011-03-05T10:37:29.073" UserId="5224" Text="Farseer physics supports all kinds of force and intertia application, so that wouldn't be a problem, I'm not 100% sure though if Farseer already supports fluid bodies (for the water) but if that's supported then it should be ok. (Also note that Farseer is a 2D physics engine)" />
  <row Id="19290" PostHistoryTypeId="2" PostId="9357" RevisionGUID="8d8f8b92-2593-4c59-8e5e-a72b95ecba83" CreationDate="2011-03-05T10:46:08.543" UserId="20" Text="I guess it's because the display-name doesn't matter that much in Starcraft 2. Even if you were about to meet a player with the same name in an online-match it wouldn't be an issue, since there are several other &quot;layers&quot; that help you distinguish players in game. One is the color of the units on screen, another one is the team the player belongs to (in 2v2 or other team matches).&#xD;&#xA;&#xD;&#xA;Impersonation is probably also a non-issue. This is most likely going to happen where there's a bad player that wants to use the name of a very good player. Nobody is going to believe that `FruitDealer` located in the bronze-league is actually the real `FruitDealer`. As soon as you're playing in the top levels, you're most likely opting for a unique name.&#xD;&#xA;&#xD;&#xA;Since the ladder is segmented into leagues and the leagues are segmented into divisions, name-clashes are also very unlikely. Maybe Blizzard even makes sure that there aren't players with the same display-name in the same division.&#xD;&#xA;&#xD;&#xA;I think the non-unique display-name can work in every game where the name isn't an important part of the virtual identity. In the case of Starcraft 2 you have an character-code (ID) or your battle.net account e-mail that can be used to find friends. The display-name is just what is shown on screen and can even be changed (a limited amount of times).&#xD;&#xA;&#xD;&#xA;You might have noticed, that the same is also true for the gamedev.SE site. You can have several users with the same name here.&#xD;&#xA;&#xD;&#xA;As soon as you have several properties that can help distinguish players and the display-name isn't used as ID, non-unique display-names can work fine. It also has the big advantage that players don't have to search hours for a display-name, because all the &quot;good&quot; ones are already taken." />
  <row Id="19291" PostHistoryTypeId="25" PostId="9351" RevisionGUID="93436c40-4baa-4b40-bb4a-67dac870f4aa" CreationDate="2011-03-05T11:23:10.657" Comment="http://twitter.com/#!/StackGameDev/status/43994960281866240" />
  <row Id="19292" PostHistoryTypeId="2" PostId="9358" RevisionGUID="405ca07c-7d15-4725-bd68-c793a3e54e39" CreationDate="2011-03-05T11:35:43.807" UserId="744" Text="In &lt;a href=&quot;http://www.champions-online.com/splash?redir=frontpage&quot;&gt;Champions Online&lt;/a&gt; and &lt;a href=&quot;http://startrekonline.com/splash?redir=frontpage&quot;&gt;Star Trek Online&lt;/a&gt; we solved this by using a two part name. The second part must be unique, but the first doesn't need to be - we show this in-game as `Display Name@account`. This also means we can put significant restrictions on the account name - for example, ASCII only, no spaces, no punctuation - and give more freedom for the display name. In-game, players see a combination of both with the account name visually muted (smaller font, darker font), and the account name display can be turned off for strict RPers. &#xD;&#xA;&#xD;&#xA;The need for this was driven mostly by Champions. Experience with City of Heroes told us that the namespace of desirable superhero names is pretty small. They all follow a similar pattern. Since naming was also the last step of creating the character, it was also very frustrating to build a character like &quot;Giant Flame&quot; only to find the name was taken, and have to go back to and make yourself either smaller or less on fire. It also encourages RPing - one supergroup (guild) in CoH had characters &quot;Duplicate Girl&quot;, &quot;DupIicate Girl&quot;, &quot;Duplicate Gir1&quot;, all with the same costume. In Champions, people can use the exact same name.&#xD;&#xA;&#xD;&#xA;Honestly, I don't know when it doesn't work well. It probably works well everywhere. Some answers have brought up issues with FPSs that need quick communication, but it seems to me that it would only become a problem if you need _quick_ and _long-term_ communication. For someone to abuse it, you need to give them enough time with you to spoof a name, and yet not enough time to explain which one you're talking about. When you say &quot;Crap, Joe's around the corner&quot;, which one you mean is usually obvious." />
  <row Id="19293" PostHistoryTypeId="5" PostId="9347" RevisionGUID="54ad674f-0eaa-436b-8cb0-ef9a05f2de24" CreationDate="2011-03-05T11:37:04.240" UserId="744" Comment="Better tags." Text="I know of at least big title game (Starcraft II) that doesn't require unique display names, so it would seem like it can work in at least some circumstance.&#xD;&#xA;&#xD;&#xA;Under what situations does allowing non-unique display names work well?  When does it not work well?&#xD;&#xA;&#xD;&#xA;Does it come down to whether or not impersonation of someone else is a problem?&#xD;&#xA;&#xD;&#xA;The reasons I believe it works for Starcraft II is that there isn't any kind of in-game trading of virtual goods and other than &quot;for kicks&quot; there isn't much incentive to impersonate someone else in the game.  There's also ladder rankings so even trying to impersonate a pro is easily detectable unless you're on a similar skill level.&#xD;&#xA;&#xD;&#xA;What are some other cases where it makes sense to specifically allow or disallow duplicate display names?" />
  <row Id="19294" PostHistoryTypeId="4" PostId="9347" RevisionGUID="54ad674f-0eaa-436b-8cb0-ef9a05f2de24" CreationDate="2011-03-05T11:37:04.240" UserId="744" Comment="Better tags." Text="What are the pros and cons of non-unique display names?" />
  <row Id="19295" PostHistoryTypeId="6" PostId="9347" RevisionGUID="54ad674f-0eaa-436b-8cb0-ef9a05f2de24" CreationDate="2011-03-05T11:37:04.240" UserId="744" Comment="Better tags." Text="&lt;multiplayer&gt;&lt;gui&gt;&lt;security&gt;" />
  <row Id="19296" PostHistoryTypeId="2" PostId="9359" RevisionGUID="1cec2d16-a26a-4803-bd82-cefc994017f0" CreationDate="2011-03-05T12:05:32.837" UserId="3793" Text="Most other answers have covered the impersonation concerns, but what I haven't seen mentioned and I think is most important is the capacity to specify a player if names can be duplicates. Which one receives `/tell DuplicateName Private information.`? All of them? What if you want to initiate some kind of remote trade? What about a friend's list? What about a mute list? What about impersonating someone just to grief/troll in chat, regardless of league/score/rank/team/whatever?&#xD;&#xA;&#xD;&#xA;Having a unique secondary name works if you want to allow duplicates, but ultimately I think that's still rather user-unfriendly. Specifying a player with a long name is annoying to most. By adding a secondary name, the total length of each player's full name increases. If you use the unique secondary name *only* for player specification, it is still user-unfriendly in that you have to refer to players by names that you usually don't associate them with because it's not on display." />
  <row Id="19297" PostHistoryTypeId="2" PostId="9360" RevisionGUID="6fdfd827-6aa1-4a4b-a9c2-44578129fc88" CreationDate="2011-03-05T13:17:56.723" UserId="20" Text="If it doesn't have to be highly accurate, you could write a simple 2D displacement-map filter (something like [this pixelbender shader][1]). Then use a 2D normal-map to achieve a spherical effect. Here's an image showing the result (above) and the normal-map (below) [[source][2]]:&#xD;&#xA;&#xD;&#xA;![2d spherical displacement][3]&#xD;&#xA;&#xD;&#xA;To give the effect of a rotating sphere, you would simply move the image (checkerboard) and mask it with a circle (or `discard` all the pixels outside the circle radius).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boostworthy.com/blog/?p=245&#xD;&#xA;  [2]: http://www.emanueleferonato.com/2007/12/03/understanding-flash-displacement-map-filter/&#xD;&#xA;  [3]: http://i.stack.imgur.com/m8IoW.jpg" />
  <row Id="19298" PostHistoryTypeId="25" PostId="9347" RevisionGUID="a79ade42-dd1c-4a68-b324-cc4a240e1a27" CreationDate="2011-03-05T14:23:10.533" Comment="http://twitter.com/#!/StackGameDev/status/44040258282729472" />
  <row Id="19299" PostHistoryTypeId="2" PostId="9361" RevisionGUID="e0eba77a-bdfd-49d3-b6c5-7d4b98d10b4e" CreationDate="2011-03-05T15:23:41.277" UserId="2853" Text="I searched a bit, but didn't find anything particularly pertinent to my problem - so please do excuse me if I missed something!&#xD;&#xA;&#xD;&#xA;A few months back I inherited the source to a fairly-popular indie game project and have been working, along with another developer, on the code-base.  We recently made our first release since taking over the development but we're a little stuck.&#xD;&#xA;&#xD;&#xA;A few users are experiencing slowdowns/lagging in the current version, as compared to the previous version, and we are not able to reproduce these issues in any of our various development environments (debug, release, different OSes, different machines, etc.).  What I'd like to know is **how can we go about implementing some form of logging/debugging mechanism into the game, that users can enable and send the reports to us for  examination?**  We're not able to distribute debug binaries using the MSVS 2010 runtimes, due to the licensing - and wouldn't want to, for a variety of reasons.&#xD;&#xA;&#xD;&#xA;We'd really like to get to the bottom of this issue, even if just to find out it's nothing to do with our code base but everything to do with their system configuration.  At the moment, we just have no leads - and the community isn't a very technically-savvy one, so we're unable to rely on 'expert' bug reports or investigations.&#xD;&#xA;&#xD;&#xA;I've seen the debug logging mechanism used in other applications and games for everything from logging simple errors to crash dumps.  We're really at a loss at this stage as to how to address these issues, having been over every commit to the repository from the previous to the current version and not finding any real issues." />
  <row Id="19300" PostHistoryTypeId="1" PostId="9361" RevisionGUID="e0eba77a-bdfd-49d3-b6c5-7d4b98d10b4e" CreationDate="2011-03-05T15:23:41.277" UserId="2853" Text="Debugging/Logging Techniques for End Users" />
  <row Id="19301" PostHistoryTypeId="3" PostId="9361" RevisionGUID="e0eba77a-bdfd-49d3-b6c5-7d4b98d10b4e" CreationDate="2011-03-05T15:23:41.277" UserId="2853" Text="&lt;c++&gt;&lt;debug&gt;" />
  <row Id="19302" PostHistoryTypeId="2" PostId="9362" RevisionGUID="76763ea2-c34c-4e63-9e1c-7d210170801a" CreationDate="2011-03-05T15:26:30.963" UserId="5882" Text="Im making a game in Java with a few other people but we are stuck on one part of it, making the collision detection. The game is an RPG and I know how to do the collision detection with the characters using Rectangles, but what I dont know how to do is the collision detection for the maps. What I mean by that is like so the character cant walk over trees or water and that stuff but using rectangles doesnt seem like the best option here.&#xD;&#xA;&#xD;&#xA;Well to explain what the game maps are gonna look like, here is an example http://i980.photobucket.com/albums/ae287/gordsmash/7-8.jpg&#xD;&#xA;&#xD;&#xA;Now I could use rectangles to get bounds and stop the player from walking over the trees and water but that would take a lot of them.&#xD;&#xA;&#xD;&#xA;But is there another easier way to prevent the player from walking over the trees and obstacles besides using Rectangles?" />
  <row Id="19303" PostHistoryTypeId="1" PostId="9362" RevisionGUID="76763ea2-c34c-4e63-9e1c-7d210170801a" CreationDate="2011-03-05T15:26:30.963" UserId="5882" Text="Collision Detection in Java for a game" />
  <row Id="19304" PostHistoryTypeId="3" PostId="9362" RevisionGUID="76763ea2-c34c-4e63-9e1c-7d210170801a" CreationDate="2011-03-05T15:26:30.963" UserId="5882" Text="&lt;java&gt;&lt;collision-detection&gt;" />
  <row Id="19305" PostHistoryTypeId="2" PostId="9363" RevisionGUID="1e031b95-7156-4a83-a5db-d97eac31090f" CreationDate="2011-03-05T16:37:00.873" UserId="5884" Text="I've recently started the same pursuit as you.  I ran into a pure java engine called [jMonkeyEngine][1] which has led me through a fantastic set of tutorials.  I don't know if it really explains game design to a massive extent but it does get you started on the graphical front.&#xD;&#xA;&#xD;&#xA;It suggests/links to tools you might use for modeling and has copy and paste-able, well-described examples to step you through putting a box on the screen to setting up the physics engine.&#xD;&#xA;&#xD;&#xA;Definitely worth a read - I had a good idea of what I was doing after only several hours.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.org/" />
  <row Id="19306" PostHistoryTypeId="5" PostId="9353" RevisionGUID="fc250937-94a9-4157-87b1-37cf9050ec36" CreationDate="2011-03-05T16:46:25.533" UserId="1156" Comment="added 7 characters in body" Text="If you're going to be trading, interacting, or something that involves potentially meeting that person again, then unique names would be a good idea. For example, if you were playing `generic FPS` with two people called `generic name`, and you wanted to tell one to fall back, how would you say which person? If they were on different teams, you would again wonder what's going on.&#xD;&#xA;&#xD;&#xA;Impersonation isn't going to be an issue unless the game depends on some kind of ladder or ranking system. Even then, there's not going to be much point. &#xD;&#xA;&#xD;&#xA;&lt;s&gt;Then again, what reason is there to have non-unique names?&lt;/s&gt;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19307" PostHistoryTypeId="2" PostId="9364" RevisionGUID="10dda5a1-ee02-4f9a-bef1-c10f5d747f27" CreationDate="2011-03-05T17:21:51.657" UserId="5771" Text="I've seen lots of questions around this area but not this exact question so apologies if this is a duplicate.&#xD;&#xA;&#xD;&#xA;I'm making a small 3d game. Well to be honest, it's just a little hobby project and likely won't turn out to be an actual game, I'll be happy to make a nice graphics demo and learn about 3d rendering and c++ design.&#xD;&#xA;&#xD;&#xA;My intent is to use *direct3d9* for rendering as I have some little experience of it, and it seems to meet my requirements. However if I've learned one thing as a programmer it's to ask &quot;*is there any conceivable reason that this component might be replaced by a different implmentation*&quot; and if the answer is yes then I need to design a proper abstraction and interface to that component. So even though I intend to implment d3d9 I need to design a 3d interface that could be implemented for d3d11, opengl...&#xD;&#xA;&#xD;&#xA;My question then is what level is it best to do this at?&#xD;&#xA;I'm thinking that an interface capable of creating and later drawing&#xD;&#xA;&#xD;&#xA; - Vertex buffers and index buffers&#xD;&#xA; - Textures&#xD;&#xA; - Vertex and Pixel &quot;shaders&quot;&#xD;&#xA; - Some representation of drawing state (blending modes etc...)&#xD;&#xA;&#xD;&#xA;In other words a fairly low level interface where my code to draw for example an animated model would use the interface to obtain abstract vertex buffers etc. I worry though that it's too low level to abstract out all the functionallity I need efficiently.&#xD;&#xA;&#xD;&#xA;The alternative is to do this at a higher level where the interface can draw objects, animations, landscapes etc, and implement them for each system. This seems like more work, but it more flexible I guess.&#xD;&#xA;&#xD;&#xA;So that's my question really, when abstracting out the drawing system, what level of interface works best?" />
  <row Id="19308" PostHistoryTypeId="1" PostId="9364" RevisionGUID="10dda5a1-ee02-4f9a-bef1-c10f5d747f27" CreationDate="2011-03-05T17:21:51.657" UserId="5771" Text="Correct level of abstraction for a 3d rendering component?" />
  <row Id="19309" PostHistoryTypeId="3" PostId="9364" RevisionGUID="10dda5a1-ee02-4f9a-bef1-c10f5d747f27" CreationDate="2011-03-05T17:21:51.657" UserId="5771" Text="&lt;c++&gt;&lt;opengl&gt;&lt;directx&gt;" />
  <row Id="19310" PostHistoryTypeId="25" PostId="9361" RevisionGUID="5b02aa3d-6638-44e2-9e92-84d6fcb97264" CreationDate="2011-03-05T17:23:10.367" Comment="http://twitter.com/#!/StackGameDev/status/44085556069666816" />
  <row Id="19311" PostHistoryTypeId="2" PostId="9365" RevisionGUID="f0280195-a16b-48e3-86ca-d6667c6462c6" CreationDate="2011-03-05T17:53:04.713" UserId="4662" Text="You can't write a low-level abstraction over this kind of thing, because the details of a shader are completely different between D3D9, 11, OGL, etc. It's simply impossible.&#xD;&#xA;&#xD;&#xA;You could check out th abstractions implemented in, say, SFML, SDL, OGRE if you want to see what other people have chosen to do for rendering abstractions." />
  <row Id="19312" PostHistoryTypeId="2" PostId="9366" RevisionGUID="d5a07ef5-65a3-43a7-b023-82ed8fc4a1b5" CreationDate="2011-03-05T17:53:43.707" UserId="51" Text="&gt;However if I've learned one thing as a programmer it's to ask &quot;is there any conceivable reason that this component might be replaced by a different implmentation&quot; and if the answer is yes then I need to design a proper abstraction and interface to that component.&#xD;&#xA;&#xD;&#xA;This isn't really answering your question, but from *my* experience as a programmer, premature generalization is just as bad as premature optimization.  You rarely gain anything and have to maintain it over the course of the project.&#xD;&#xA;&#xD;&#xA;My advice is to straight up use D3D9 client code in your project, and when you determine that you need to switch interfaces, make an interface with all the things you're currently using.  Programmers are *terrible* at predicting what they might need, doubly so in your case where you're not terribly familiar with the material, so this way you're doing the least amount of work.&#xD;&#xA;&#xD;&#xA;See also: http://c2.com/xp/YouArentGonnaNeedIt.html" />
  <row Id="19313" PostHistoryTypeId="2" PostId="9367" RevisionGUID="8ec3e6e0-0e71-4d53-9050-da2b0d20be2a" CreationDate="2011-03-05T17:54:05.883" UserId="4598" Text="I'm trying to map a brick texture on the edge of a fountain and I'm using gluDisk for that. How can I make the right coordinates for the disk? My code looks like this and I have only found a function that takes the texture along with the camera.&#xD;&#xA;&#xD;&#xA;I want the cubic texture to be alongside of the fountain, but gluDisk does a linear mapping. How do I get a circular mapping?&#xD;&#xA;&#xD;&#xA;	void Fountain::Draw()&#xD;&#xA;	{&#xD;&#xA;		glPushMatrix(); // push 1&#xD;&#xA;		this-&gt;ApplyWorldMatrixGL();&#xD;&#xA;		glEnable(GL_TEXTURE_2D); // enable texturing&#xD;&#xA;		glPushMatrix(); // push 2&#xD;&#xA;		glRotatef(90,-1,0,0); // rotate 90 for the quadric&#xD;&#xA;&#xD;&#xA;        // also drawing more here...&#xD;&#xA;&#xD;&#xA;		// stone texture&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, texIDs[0]);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);	&#xD;&#xA;&#xD;&#xA;		glPushMatrix(); // push 3&#xD;&#xA;		glTranslatef(0,0,height);&#xD;&#xA;&#xD;&#xA;		// spherical texture generation&#xD;&#xA;        // this piece of code doesn't work as I intended&#xD;&#xA;		glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);&#xD;&#xA;		glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);&#xD;&#xA;		glEnable(GL_TEXTURE_GEN_S);&#xD;&#xA;		glEnable(GL_TEXTURE_GEN_T);&#xD;&#xA;&#xD;&#xA;		GLUquadric *tub = gluNewQuadric();&#xD;&#xA;		gluQuadricTexture(tub, GL_TRUE);&#xD;&#xA;		gluDisk(tub, radius, outerR, nrVertices, nrVertices);&#xD;&#xA;		gluDeleteQuadric(tub);&#xD;&#xA;		glDisable(GL_TEXTURE_GEN_S);&#xD;&#xA;		glDisable(GL_TEXTURE_GEN_T);&#xD;&#xA;&#xD;&#xA;		glPopMatrix(); // pop 3&#xD;&#xA;        // more drawing here...&#xD;&#xA;		glPopMatrix(); // pop 2&#xD;&#xA;        // more drawing here...&#xD;&#xA;		glPopMatrix(); // pop 1&#xD;&#xA;    }" />
  <row Id="19314" PostHistoryTypeId="1" PostId="9367" RevisionGUID="8ec3e6e0-0e71-4d53-9050-da2b0d20be2a" CreationDate="2011-03-05T17:54:05.883" UserId="4598" Text="Texture mapping on gluDisk" />
  <row Id="19315" PostHistoryTypeId="3" PostId="9367" RevisionGUID="8ec3e6e0-0e71-4d53-9050-da2b0d20be2a" CreationDate="2011-03-05T17:54:05.883" UserId="4598" Text="&lt;c++&gt;&lt;opengl&gt;&lt;uvw-mapping&gt;" />
  <row Id="19316" PostHistoryTypeId="5" PostId="9367" RevisionGUID="6237679c-786c-4f8b-bb4e-89375f7a8ad4" CreationDate="2011-03-05T18:58:40.077" UserId="4598" Comment="Added a question refinement with a picture." Text="I'm trying to map a brick texture on the edge of a fountain and I'm using gluDisk for that. How can I make the right coordinates for the disk? My code looks like this and I have only found a function that takes the texture along with the camera.&#xD;&#xA;&#xD;&#xA;I want the cubic texture to be alongside of the fountain, but gluDisk does a linear mapping. How do I get a circular mapping?&#xD;&#xA;&#xD;&#xA;	void Fountain::Draw()&#xD;&#xA;	{&#xD;&#xA;		glPushMatrix(); // push 1&#xD;&#xA;		this-&gt;ApplyWorldMatrixGL();&#xD;&#xA;		glEnable(GL_TEXTURE_2D); // enable texturing&#xD;&#xA;		glPushMatrix(); // push 2&#xD;&#xA;		glRotatef(90,-1,0,0); // rotate 90 for the quadric&#xD;&#xA;&#xD;&#xA;        // also drawing more here...&#xD;&#xA;&#xD;&#xA;		// stone texture&#xD;&#xA;		glBindTexture(GL_TEXTURE_2D, texIDs[0]);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);	&#xD;&#xA;&#xD;&#xA;		glPushMatrix(); // push 3&#xD;&#xA;		glTranslatef(0,0,height);&#xD;&#xA;&#xD;&#xA;		// spherical texture generation&#xD;&#xA;        // this piece of code doesn't work as I intended&#xD;&#xA;		glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);&#xD;&#xA;		glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);&#xD;&#xA;		glEnable(GL_TEXTURE_GEN_S);&#xD;&#xA;		glEnable(GL_TEXTURE_GEN_T);&#xD;&#xA;&#xD;&#xA;		GLUquadric *tub = gluNewQuadric();&#xD;&#xA;		gluQuadricTexture(tub, GL_TRUE);&#xD;&#xA;		gluDisk(tub, radius, outerR, nrVertices, nrVertices);&#xD;&#xA;		gluDeleteQuadric(tub);&#xD;&#xA;		glDisable(GL_TEXTURE_GEN_S);&#xD;&#xA;		glDisable(GL_TEXTURE_GEN_T);&#xD;&#xA;&#xD;&#xA;		glPopMatrix(); // pop 3&#xD;&#xA;        // more drawing here...&#xD;&#xA;		glPopMatrix(); // pop 2&#xD;&#xA;        // more drawing here...&#xD;&#xA;		glPopMatrix(); // pop 1&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To refine my question a bit. This is an image of what it is at default (left) and of what I want (right). The texture should fit in the border of the disk, a lot of times. If this is possible with the texture matrix, than that's fine with me as well.&#xD;&#xA;![Left is the default texCoords, right is what I want][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AE7OS.png" />
  <row Id="19317" PostHistoryTypeId="2" PostId="9368" RevisionGUID="53125ad3-4422-4bfb-af7a-3c938dacc790" CreationDate="2011-03-05T19:44:08.910" UserId="1430" Text="It sounds like you really want to implement some kind of deployed profiling option, not logging in general (while you could use logging to surface the results of your profile data, logging in general isn't really required here because there are better ways to surface the data). &#xD;&#xA;&#xD;&#xA;The basic premise will be to have some fairly lightweight methods/objects you can call or create in your code to track timestamps and shove them into data structure, which you then serialize to disk in some form so that users can email it to you. Something like a `BeginTask` and `EndTask` function that takes some kind of task identifier -- a string, or number, or whatever. When `BeginTask` is called, you can record the current time via [a high-resolution counter][1] and store it. Then you do the same in `EndTask`, except you look for the matching `BeginTask` timestamp and compute the difference, giving you a task duration.&#xD;&#xA;&#xD;&#xA;You can store these in a tree-like structure to give yourself hierarchical profiling (which will help alleviate the issue of coming up with unique task names to match up begin/end pairs). You can also take advantages of C++ idioms such as RAII by putting the calls into the constructor/destructor of some `Profile` class, then you can simply construct one of these `Profile` instances in every function that might be time-critical and you'll get the begin/end calls automatically.&#xD;&#xA;&#xD;&#xA;You can go even further than that an enable [penter][2] and [pexit][3] hooks to call your profiler functions for *every function in your code* automatically, which is a lot less painful than retrofitting construction of `Profiler` objects everywhere. It will also catch things you might have decided &quot;couldn't be slow&quot; and thus avoided adding `Profiler` objects to. Unfortunately it's a bit more work to write proper penter/pexit hooks.&#xD;&#xA;&#xD;&#xA;Then you can save this information to disk. You could just dump it to a plain-text log file, for simplicity. I find that it's much better to dump the data into a binary format that you can parse back later with a tool on your end -- but if you're not up for writing such a tool, plain text will serve in a pinch. You'll still probably want some code to scan through the data and find the tasks that took the longest and print them outside of the regular call hierarchy, because that's what you're most likely interested in.&#xD;&#xA;&#xD;&#xA;Once you have this functionality enabled, you can have users send you their profiling logs and you can hopefully use that to see what is taking up too much time on their machines, and that might help guide your optimization efforts.&#xD;&#xA;&#xD;&#xA;We do this kind of instrumentation on our content production tools at work, and dump the statistics into a database which we use to develop daily metrics reports about task performance. Tasks that become outliers in terms of runtime, or take too long on average (especially if they're running on the UI thread) are hilighted in these reports so we know when we accidentally hurt the performance of something.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ms644904(v=vs.85).aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/c63a9b7h(v=vs.80).aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/xc11y76y(v=vs.80).aspx" />
  <row Id="19318" PostHistoryTypeId="5" PostId="9232" RevisionGUID="11571679-6c59-4700-a28f-fa7d4795dd7f" CreationDate="2011-03-05T20:03:54.743" UserId="5821" Comment="added 232 characters in body" Text="What would be a good starting point for locating small or medium size game publishers in Japan. We have a US/EU released game that we believe will fit the Japanese market well, and are looking for companies that we could contact for possible co-publishing. &#xD;&#xA;&#xD;&#xA;EDIT: So far, I've found http://www.gamebusiness.jp/directory/category.php?id=10002 and from one answer, http://www.gamedevmap.com/index.php?query=Japan&amp;Submit=Search&#xD;&#xA;&#xD;&#xA;Starting a bounty, I need as many publishers as I can get." />
  <row Id="19319" PostHistoryTypeId="2" PostId="9369" RevisionGUID="73d1d3f5-a060-4b98-bb61-96768a74612f" CreationDate="2011-03-05T20:18:06.287" UserId="1101" Text="Apologies for the length of this response!&#xD;&#xA;&#xD;&#xA;&gt; &quot;is there any conceivable reason that this component might be replaced by a different implmentation&quot; and if the answer is yes then I need to design a proper abstraction and interface to that component.&#xD;&#xA;&#xD;&#xA;&quot;Any conceivable reason&quot; is far too extreme a stance to take. Almost every function could be parameterised in some way, every module given some different strategy or policy, and every constant tweaked. If you provide an extra level of abstraction for each of these then you end up writing 2x as much code for no immediate gain, just a potential gain later if you ever require that flexibility.&#xD;&#xA;&#xD;&#xA;If you go down the route of providing interfaces so that each of these things can be a facade for one of several different options, you then have to decide how you supply these different options, including defaults, and when you try and make that as simple as the original object was you often end up with a whole extra layer on top. This can (and does) get absurd in a lot of real world 'enterprise' software - may I humbly suggest reading this satire piece which sadly hits too close to home in many cases: [Why I Hate Frameworks][1].&#xD;&#xA;&#xD;&#xA;The biggest argument against this is complexity. Let's make the (probably incorrect) assumption that a good interface exists that could apply equally well to two 3D rendering APIs, and that someone is able to describe this to you in an answer here. You would then be working to this interface, which would, due to its multi-purpose nature, undoubtedly cover elements that DX9 does not use - for example, the plethora of API extensions that are available in OpenGL but not in DirectX 9. This is an added complication that will make your code harder to understand and maintain, and slow your learning process. It's bad enough when using an existing multi-platform library such as SDL, because people are forever coming across odd functions and restrictions that exist purely to fix something on one platform, but you'd not only have to learn why that part of the interface is there but also how it may or may not interact with the parts that you are currently about to write. eg. You'd end up writing abstract objects that encapsulate aspects of OpenGL extensions that are necessary in your core rendering code, even though you have no way of using them yet.&#xD;&#xA;&#xD;&#xA;However, in future, once you are competent with how the DX9 system works, you can look into how the OpenGL system operates. You will then see how you need to adapt your existing system to make both parts work, and will do so, with the handy existence of your existing DX9 code path as an effective unit test to ensure your refactoring is correct.&#xD;&#xA;&#xD;&#xA;You are lucky in that you are working with one of the most fluid and malleable materials known to engineering - source code stored as computer data. Embrace that blessing by making changes to it when you know you need them, rather than doing them months in advance and burdening yourself in the meantime by having to write to an abstraction you aren't gaining from yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12" />
  <row Id="19320" PostHistoryTypeId="25" PostId="9364" RevisionGUID="aa754fd6-c1be-4b6f-ab56-a9f47b7dc063" CreationDate="2011-03-05T20:23:10.703" Comment="http://twitter.com/#!/StackGameDev/status/44130855811170304" />
  <row Id="19324" PostHistoryTypeId="2" PostId="9371" RevisionGUID="e9eb1716-151e-415b-ac96-fca6bd3d2a6a" CreationDate="2011-03-05T21:59:57.777" UserId="5685" Text="Your map looks like a 2D grid so why not have a boolean[][] lookup table for the map? Or even int[][] if you want different grid cell types. For smoothing movement around corners you can look up the target position and make a smoother animation, e.g. &#xD;&#xA;&#xD;&#xA;&lt;code&gt;if (movingUpRight &amp;&amp; myGrid[playerPosX + 1][playerPosY + 1] == TILE_EMPTY) {&#xD;&#xA;    /* smooth animation */}&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Judging by your question you don't need anything more complicated than that.&#xD;&#xA;&#xD;&#xA;If you do need something more fancy take a look at Recast/Detour project [1][2] but it doesn't seem to have a Java binding or port (apart from CritterAI but it's not a straight port) so far but someone's got to do the work sooner or later :) If you choose to go that route please get in touch as I plan to support it in my game at some point so we can coordinate the efforts.&#xD;&#xA;&#xD;&#xA;[1] http://code.google.com/p/recastnavigation/&#xD;&#xA;&#xD;&#xA;[2] http://digestingduck.blogspot.com/&#xD;&#xA;" />
  <row Id="19326" PostHistoryTypeId="2" PostId="9372" RevisionGUID="69b2fbb1-8c48-4bd8-a132-6542afab8e84" CreationDate="2011-03-05T22:15:33.833" UserId="4662" Text="You use something called a nav mesh. This is basically (in this simple case) a texture with just one bit for each square- collidable or not. When the player tries to move, you check the texture." />
  <row Id="19327" PostHistoryTypeId="2" PostId="9373" RevisionGUID="6a48be64-4fb1-4711-a1f8-00683745d936" CreationDate="2011-03-05T22:17:50.243" UserId="5685" Text="Hm, looks like I don't have enough reputation to post comments to responses.&#xD;&#xA;&#xD;&#xA;Both Kylotan and Tetrad gave excellent answers. What I would add is to suggest you separate rendering code from the game logic -- this will serve several purposes:&#xD;&#xA;&#xD;&#xA; - your code will be cleaner&#xD;&#xA; - it will be easier for you to make changes to your renderer without rewriting half of the game logic each time&#xD;&#xA; - eventually, providing completely different rendering modules is easier this way&#xD;&#xA;&#xD;&#xA;As an added bonus, this way you will build your abstraction gradually as you work on your project. As you say, this is a learning project so take it easy and make it simple, adding complexity and abstractions as you go instead of making grand plans as you probably lack expertise to get it right initially (as Tetrad also suggested)." />
  <row Id="19328" PostHistoryTypeId="2" PostId="9374" RevisionGUID="895cc67d-b83e-40db-8a42-d1a259f52501" CreationDate="2011-03-05T22:48:40.767" UserId="1217" Text="I'm using Unity3d iOs and am using the example joysticks that came with one of the packages. It works fine but the area the joystick moves in is a rectangle which is unintuitive for my type of game. I can figure out how to see if the distance between the center and the current point is too far but I can't figure out how to constrain it to a certain distance without interrupting the finger tracking. &#xD;&#xA;&#xD;&#xA;Here's the relevant code:&#xD;&#xA;&#xD;&#xA;    using UnityEngine;&#xD;&#xA;    using System.Collections;&#xD;&#xA;    public class Boundary &#xD;&#xA;    {&#xD;&#xA;	public Vector2 min = Vector2.zero;&#xD;&#xA;	public Vector2 max = Vector2.zero;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public class Joystick : MonoBehaviour{ &#xD;&#xA;	static private Joystick[] joysticks;					// A static collection of all joysticks&#xD;&#xA;	static private bool enumeratedJoysticks=false;&#xD;&#xA;	static private float tapTimeDelta = 0.3f;				// Time allowed between taps&#xD;&#xA;&#xD;&#xA;	public bool touchPad; 									// Is this a TouchPad?&#xD;&#xA;	public Rect touchZone;&#xD;&#xA;	public Vector2 deadZone = Vector2.zero;						// Control when position is output&#xD;&#xA;	public bool normalize = false; 							// Normalize output after the dead-zone?&#xD;&#xA;	public Vector2 position; 									// [-1, 1] in x,y&#xD;&#xA;	public int tapCount;											// Current tap count&#xD;&#xA;&#xD;&#xA;	private int lastFingerId = -1;								// Finger last used for this joystick&#xD;&#xA;	private float tapTimeWindow;							// How much time there is left for a tap to occur&#xD;&#xA;	private Vector2 fingerDownPos;&#xD;&#xA;	private float fingerDownTime;&#xD;&#xA;	private float firstDeltaTime = 0.5f;&#xD;&#xA;&#xD;&#xA;	private GUITexture gui;								// Joystick graphic&#xD;&#xA;	private Rect defaultRect;								// Default position / extents of the joystick graphic&#xD;&#xA;	private Boundary guiBoundary = new Boundary();			// Boundary for joystick graphic&#xD;&#xA;	public Vector2 guiTouchOffset;						// Offset to apply to touch input&#xD;&#xA;	private Vector2 guiCenter;							// Center of joystick&#xD;&#xA;&#xD;&#xA;	private Vector3 tmpv3;&#xD;&#xA;	private Rect tmprect;&#xD;&#xA;	private Color tmpclr;&#xD;&#xA;	&#xD;&#xA;	public float allowedDistance;&#xD;&#xA;	&#xD;&#xA;	public enum JoystickType &#xD;&#xA;	{&#xD;&#xA;		movement, rotation&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public JoystickType joystickType;&#xD;&#xA;&#xD;&#xA;	public void Start()&#xD;&#xA;	{&#xD;&#xA;		// Cache this component at startup instead of looking up every frame	&#xD;&#xA;		gui = (GUITexture) GetComponent( typeof(GUITexture) );&#xD;&#xA;		&#xD;&#xA;		// Store the default rect for the gui, so we can snap back to it&#xD;&#xA;		defaultRect = gui.pixelInset;	&#xD;&#xA;		&#xD;&#xA;		if ( touchPad )&#xD;&#xA;		{&#xD;&#xA;			// If a texture has been assigned, then use the rect ferom the gui as our touchZone&#xD;&#xA;			if ( gui.texture )&#xD;&#xA;				touchZone = gui.pixelInset;&#xD;&#xA;		}&#xD;&#xA;		else&#xD;&#xA;		{				&#xD;&#xA;			// This is an offset for touch input to match with the top left&#xD;&#xA;			// corner of the GUI&#xD;&#xA;			guiTouchOffset.x = defaultRect.width * 0.5f;&#xD;&#xA;			guiTouchOffset.y = defaultRect.height * 0.5f;&#xD;&#xA;			&#xD;&#xA;			// Cache the center of the GUI, since it doesn't change&#xD;&#xA;			guiCenter.x = defaultRect.x + guiTouchOffset.x;&#xD;&#xA;			guiCenter.y = defaultRect.y + guiTouchOffset.y;&#xD;&#xA;			&#xD;&#xA;			// Let's build the GUI boundary, so we can clamp joystick movement&#xD;&#xA;			guiBoundary.min.x = defaultRect.x - guiTouchOffset.x;&#xD;&#xA;			guiBoundary.max.x = defaultRect.x + guiTouchOffset.x;&#xD;&#xA;			guiBoundary.min.y = defaultRect.y - guiTouchOffset.y;&#xD;&#xA;			guiBoundary.max.y = defaultRect.y + guiTouchOffset.y;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void Disable()&#xD;&#xA;	{&#xD;&#xA;		gameObject.active = false;&#xD;&#xA;		enumeratedJoysticks = false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void ResetJoystick()&#xD;&#xA;	{&#xD;&#xA;		if (joystickType != JoystickType.rotation)&#xD;&#xA;		{&#xD;&#xA;			//Don't do anything if turret mode&#xD;&#xA;			// Release the finger control and set the joystick back to the default position&#xD;&#xA;			gui.pixelInset = defaultRect;&#xD;&#xA;			lastFingerId = -1;&#xD;&#xA;			position = Vector2.zero;&#xD;&#xA;			fingerDownPos = Vector2.zero;&#xD;&#xA;			&#xD;&#xA;			if ( touchPad ){&#xD;&#xA;				tmpclr	= gui.color;&#xD;&#xA;				tmpclr.a = 0.025f;&#xD;&#xA;				gui.color = tmpclr;&#xD;&#xA;			}	&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;						//gui.pixelInset = defaultRect;&#xD;&#xA;			lastFingerId = -1;&#xD;&#xA;			position = position;&#xD;&#xA;			fingerDownPos = fingerDownPos;&#xD;&#xA;			&#xD;&#xA;			if ( touchPad ){&#xD;&#xA;				tmpclr	= gui.color;&#xD;&#xA;				tmpclr.a = 0.025f;&#xD;&#xA;				gui.color = tmpclr;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public bool IsFingerDown()&#xD;&#xA;	{&#xD;&#xA;		return (lastFingerId != -1);&#xD;&#xA;	}&#xD;&#xA;		&#xD;&#xA;	public void LatchedFinger( int fingerId )&#xD;&#xA;	{&#xD;&#xA;		// If another joystick has latched this finger, then we must release it&#xD;&#xA;		if ( lastFingerId == fingerId )&#xD;&#xA;			ResetJoystick();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void Update()&#xD;&#xA;	{	&#xD;&#xA;		if ( !enumeratedJoysticks )&#xD;&#xA;		{&#xD;&#xA;			// Collect all joysticks in the game, so we can relay finger latching messages&#xD;&#xA;			joysticks = (Joystick[])  FindObjectsOfType( typeof(Joystick) );&#xD;&#xA;			enumeratedJoysticks = true;&#xD;&#xA;		}	&#xD;&#xA;		&#xD;&#xA;		//CHeck if distance is over the allowed amount&#xD;&#xA;		//Get centerPosition&#xD;&#xA;		&#xD;&#xA;		//Get current position&#xD;&#xA;		&#xD;&#xA;		//Get distance&#xD;&#xA;		&#xD;&#xA;		//If over, don't allow&#xD;&#xA;			&#xD;&#xA;		int count = iPhoneInput.touchCount;&#xD;&#xA;		&#xD;&#xA;		// Adjust the tap time window while it still available&#xD;&#xA;		if ( tapTimeWindow &gt; 0 )&#xD;&#xA;			tapTimeWindow -= Time.deltaTime;&#xD;&#xA;		else&#xD;&#xA;			tapCount = 0;&#xD;&#xA;		&#xD;&#xA;		if ( count == 0 )&#xD;&#xA;			ResetJoystick();&#xD;&#xA;		else&#xD;&#xA;		{&#xD;&#xA;			for(int i = 0;i &lt; count; i++)&#xD;&#xA;			{&#xD;&#xA;				iPhoneTouch touch = iPhoneInput.GetTouch(i);			&#xD;&#xA;				Vector2 guiTouchPos = touch.position - guiTouchOffset;&#xD;&#xA;		&#xD;&#xA;				bool shouldLatchFinger = false;&#xD;&#xA;				if ( touchPad )&#xD;&#xA;				{				&#xD;&#xA;					if ( touchZone.Contains( touch.position ) )&#xD;&#xA;						shouldLatchFinger = true;&#xD;&#xA;				}&#xD;&#xA;				else if ( gui.HitTest( touch.position ) )&#xD;&#xA;				{&#xD;&#xA;					shouldLatchFinger = true;&#xD;&#xA;				}		&#xD;&#xA;		&#xD;&#xA;				// Latch the finger if this is a new touch&#xD;&#xA;				if ( shouldLatchFinger &amp;&amp; ( lastFingerId == -1 || lastFingerId != touch.fingerId ) )&#xD;&#xA;				{&#xD;&#xA;					&#xD;&#xA;					if ( touchPad )&#xD;&#xA;					{&#xD;&#xA;						tmpclr = gui.color;&#xD;&#xA;						tmpclr.a = 0.15f;&#xD;&#xA;						gui.color = tmpclr;&#xD;&#xA;&#xD;&#xA;						lastFingerId = touch.fingerId;&#xD;&#xA;						fingerDownPos = touch.position;&#xD;&#xA;						fingerDownTime = Time.time;&#xD;&#xA;					}&#xD;&#xA;					&#xD;&#xA;					lastFingerId = touch.fingerId;&#xD;&#xA;					&#xD;&#xA;					// Accumulate taps if it is within the time window&#xD;&#xA;					if ( tapTimeWindow &gt; 0 )&#xD;&#xA;					{&#xD;&#xA;						tapCount++;&#xD;&#xA;						print(&quot;tap&quot; + tapCount.ToString());&#xD;&#xA;					}&#xD;&#xA;					else&#xD;&#xA;					{&#xD;&#xA;						tapCount = 1;&#xD;&#xA;						print(&quot;tap&quot; + tapCount.ToString());&#xD;&#xA;						//Tell gameobject that player has tapped turret joystick&#xD;&#xA;						if (joystickType == JoystickType.rotation) {&#xD;&#xA;							//TODO: Call!&#xD;&#xA;						}&#xD;&#xA;						tapTimeWindow = tapTimeDelta;&#xD;&#xA;					}&#xD;&#xA;												&#xD;&#xA;					// Tell other joysticks we've latched this finger&#xD;&#xA;					foreach ( Joystick j in joysticks )&#xD;&#xA;					{&#xD;&#xA;						if ( j != this )&#xD;&#xA;							j.LatchedFinger( touch.fingerId );&#xD;&#xA;					}						&#xD;&#xA;				}				&#xD;&#xA;		&#xD;&#xA;				if ( lastFingerId == touch.fingerId )&#xD;&#xA;				{	&#xD;&#xA;					// Override the tap count with what the iPhone SDK reports if it is greater&#xD;&#xA;					// This is a workaround, since the iPhone SDK does not currently track taps&#xD;&#xA;					// for multiple touches&#xD;&#xA;					if ( touch.tapCount &gt; tapCount )&#xD;&#xA;						tapCount = touch.tapCount;&#xD;&#xA;					&#xD;&#xA;					if ( touchPad )&#xD;&#xA;					{	&#xD;&#xA;						// For a touchpad, let's just set the position directly based on distance from initial touchdown&#xD;&#xA;						position.x = Mathf.Clamp( ( touch.position.x - fingerDownPos.x ) / ( touchZone.width / 2 ), -1, 1 );&#xD;&#xA;						position.y = Mathf.Clamp( ( touch.position.y - fingerDownPos.y ) / ( touchZone.height / 2 ), -1, 1 );&#xD;&#xA;					}&#xD;&#xA;					else&#xD;&#xA;					{					&#xD;&#xA;						// Change the location of the joystick graphic to match where the touch is&#xD;&#xA;						tmprect = gui.pixelInset; &#xD;&#xA;						tmprect.x = Mathf.Clamp( guiTouchPos.x, guiBoundary.min.x, guiBoundary.max.x );&#xD;&#xA;						tmprect.y = Mathf.Clamp( guiTouchPos.y, guiBoundary.min.y, guiBoundary.max.y );&#xD;&#xA;						&#xD;&#xA;						//Check distance&#xD;&#xA;						float distance = Vector2.Distance(new Vector2(defaultRect.x, defaultRect.y), new Vector2(tmprect.x, tmprect.y));&#xD;&#xA;						float angle = Vector2.Angle(new Vector2(defaultRect.x, defaultRect.y), new Vector2(tmprect.x, tmprect.y));&#xD;&#xA;						if (distance &lt; allowedDistance) {&#xD;&#xA;							//Ok&#xD;&#xA;							gui.pixelInset = tmprect;&#xD;&#xA;						}&#xD;&#xA;						else {&#xD;&#xA;                                                     //This is where I don't know what to do...&#xD;&#xA;						}&#xD;&#xA;&#xD;&#xA;						&#xD;&#xA;					}&#xD;&#xA;					&#xD;&#xA;					if ( touch.phase == iPhoneTouchPhase.Ended || touch.phase == iPhoneTouchPhase.Canceled )&#xD;&#xA;						ResetJoystick();					&#xD;&#xA;				}			&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		if ( !touchPad )&#xD;&#xA;		{&#xD;&#xA;			// Get a value between -1 and 1 based on the joystick graphic location&#xD;&#xA;			position.x = ( gui.pixelInset.x + guiTouchOffset.x - guiCenter.x ) / guiTouchOffset.x;&#xD;&#xA;			position.y = ( gui.pixelInset.y + guiTouchOffset.y - guiCenter.y ) / guiTouchOffset.y;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		// Adjust for dead zone	&#xD;&#xA;		float absoluteX = Mathf.Abs( position.x );&#xD;&#xA;		float absoluteY = Mathf.Abs( position.y );&#xD;&#xA;		&#xD;&#xA;		if ( absoluteX &lt; deadZone.x )&#xD;&#xA;		{&#xD;&#xA;			// Report the joystick as being at the center if it is within the dead zone&#xD;&#xA;			position.x = 0;&#xD;&#xA;		}&#xD;&#xA;		else if ( normalize )&#xD;&#xA;		{&#xD;&#xA;			// Rescale the output after taking the dead zone into account&#xD;&#xA;			position.x = Mathf.Sign( position.x ) * ( absoluteX - deadZone.x ) / ( 1 - deadZone.x );&#xD;&#xA;		}&#xD;&#xA;			&#xD;&#xA;		if ( absoluteY &lt; deadZone.y )&#xD;&#xA;		{&#xD;&#xA;			// Report the joystick as being at the center if it is within the dead zone&#xD;&#xA;			position.y = 0;&#xD;&#xA;		}&#xD;&#xA;		else if ( normalize )&#xD;&#xA;		{&#xD;&#xA;			// Rescale the output after taking the dead zone into account&#xD;&#xA;			position.y = Mathf.Sign( position.y ) * ( absoluteY - deadZone.y ) / ( 1 - deadZone.y );&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So the later portion of the code handles the updated position of the joystick thumb. This is where I'd like it to track the finger position in a direction it still is allowed to move (like if the finger is too far up and slightly to the +X I'd like to make sure the joystick is as close in X and Y as allowed within the radius)&#xD;&#xA;&#xD;&#xA;Thanks for reading!" />
  <row Id="19329" PostHistoryTypeId="1" PostId="9374" RevisionGUID="895cc67d-b83e-40db-8a42-d1a259f52501" CreationDate="2011-03-05T22:48:40.767" UserId="1217" Text="Restricting joystick within a radius of center" />
  <row Id="19330" PostHistoryTypeId="3" PostId="9374" RevisionGUID="895cc67d-b83e-40db-8a42-d1a259f52501" CreationDate="2011-03-05T22:48:40.767" UserId="1217" Text="&lt;c#&gt;&lt;unity&gt;&lt;ios&gt;&lt;joystick&gt;" />
  <row Id="19331" PostHistoryTypeId="2" PostId="9375" RevisionGUID="cd987fc8-64bd-421a-9074-6f2e862fa73c" CreationDate="2011-03-05T23:06:33.287" UserId="370" Text="The MMO terminology for &quot;remain within a single game world&quot; is _single shard_.  [EVE online][1] is the only major MMO to attempt stuffing every player into a single shard.&#xD;&#xA;&#xD;&#xA;Lucky for you they published a [very informative article][2] on how they do it.&#xD;&#xA;&#xD;&#xA;The bad news.  You cannot apply EVE online's techniques generally.  Their solutions are absolutely tailored to their particular genre and implementation.  &#xD;&#xA;_NOTE_:  For all of EVE online's super fancy single shard network they use ___one___ database.  They were unable to design a scalable, consistent, moderately real-time solution for distributed databases.&#xD;&#xA;&#xD;&#xA;Either way reading how they did it ought to help you design you own solution. Beware however, you are attempting to solve a ___very___ difficult problem.&#xD;&#xA;&#xD;&#xA;Instead of distributing your game server I would suggest explore your other avenues first.&#xD;&#xA;&#xD;&#xA;* Profile your game server.  &#xD;&#xA; * Optimize your server code to keep CPU burden down if that is a problem.&#xD;&#xA; * Optimize the communication protocol between the clients and the server to cut down on network chatter.&#xD;&#xA;* Optimize the gamer server to database communications.&#xD;&#xA; * run a query optimizer then make changes as appropriate.&#xD;&#xA; * cut down DB interaction to a bare minimum&#xD;&#xA;* Move the DB to a separate machine.  &#xD;&#xA;This often helps a ton.  Keep the DB on the same local network if possible but that ought to help your game server be a lot more peppy when it's the only thing running on the server hardware.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eveonline.com&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/4175/infinite_space_an_argument_for_.php" />
  <row Id="19332" PostHistoryTypeId="5" PostId="9375" RevisionGUID="2de51f06-2c23-4230-b6d8-2a70ff2d8a95" CreationDate="2011-03-05T23:12:26.723" UserId="370" Comment="The image seemed to be broken, switched to a hot link instead." Text="The MMO terminology for &quot;remain within a single game world&quot; is _single shard_.  [EVE online][1] is the only major MMO to attempt stuffing every player into a single shard.&#xD;&#xA;&#xD;&#xA;Lucky for you they published a [very informative article][2] on how they do it.&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://www.gamasutra.com/db_area/images/feature/4175/eve_fig1.jpg&quot; width=&quot;400&quot; &gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The bad news.  You cannot apply EVE online's techniques generally.  Their solutions are absolutely tailored to their particular genre and implementation.  &#xD;&#xA;_NOTE_:  For all of EVE online's super fancy single shard network they use ___one___ database.  They were unable to design a scalable, consistent, moderately real-time solution for distributed databases.&#xD;&#xA;&#xD;&#xA;Either way reading how they did it ought to help you design you ownr solution. Beware however, you are attempting to solve a ___very___ difficult problem.&#xD;&#xA;&#xD;&#xA;Instead of distributing your game server I would suggest explore your other avenues first.&#xD;&#xA;&#xD;&#xA;* Profile your game server.  &#xD;&#xA; * Optimize your server code to keep CPU burden down if that is a problem.&#xD;&#xA; * Optimize the communication protocol between the clients and the server to cut down on network chatter.&#xD;&#xA;* Optimize the gamer server to database communications.&#xD;&#xA; * run a query optimizer then make changes as appropriate.&#xD;&#xA; * cut down DB interaction to a bare minimum&#xD;&#xA;* Move the DB to a separate machine.  &#xD;&#xA;This often helps a ton.  Keep the DB on the same local network if possible but that ought to help your game server be a lot more peppy when it's the only thing running on the server hardware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eveonline.com&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/4175/infinite_space_an_argument_for_.php" />
  <row Id="19333" PostHistoryTypeId="25" PostId="9374" RevisionGUID="1c245197-32d5-44c1-ab70-26327c5259fa" CreationDate="2011-03-05T23:23:10.670" Comment="http://twitter.com/#!/StackGameDev/status/44176153895903232" />
  <row Id="19334" PostHistoryTypeId="2" PostId="9376" RevisionGUID="b0fdc8b8-7529-43c2-9e7b-72d4d3701815" CreationDate="2011-03-06T00:17:33.553" UserId="5824" Text="I'm not at all familiar with unity or iOS, however this sounds like a maths problem.&#xD;&#xA;&#xD;&#xA;As your positions go from -1 to +1 all you need to do is see if the distance to the point is greater than 1.0 (i.e. outside a circle) and if it is normalize it so it's on the circle. Something like:&#xD;&#xA;&#xD;&#xA;    float distance = Mathf.Sqrt(position.x * position.x + position.y * position.y);&#xD;&#xA;    if (distance &gt; 1.0f)&#xD;&#xA;    {&#xD;&#xA;        position.x /= distance;&#xD;&#xA;        position.y /= distance;&#xD;&#xA;    }" />
  <row Id="19335" PostHistoryTypeId="5" PostId="652" RevisionGUID="2696289a-e811-4a94-9fe2-9730373eebc5" CreationDate="2011-03-06T01:51:55.290" UserId="2971" Comment="fixed dead link" Text="I'd recommend Glenn Fiedler's article about robust framerate independence, &quot;[Fix Your Timestep!][1]&quot;&#xD;&#xA;&#xD;&#xA;(Less relevant to the topic at hand, but the other articles in [the series][2] are also quite good - as is everything on his site!)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/&#xD;&#xA;  [2]: http://gafferongames.com/game-physics/&#xD;&#xA;  [3]: http://gafferongames.com/networking-for-game-programmers/" />
  <row Id="19336" PostHistoryTypeId="24" PostId="652" RevisionGUID="2696289a-e811-4a94-9fe2-9730373eebc5" CreationDate="2011-03-06T01:51:55.290" Comment="Proposed by 2971 approved by 14 edit id of 62" />
  <row Id="19337" PostHistoryTypeId="25" PostId="9362" RevisionGUID="440173e2-1e5e-4626-a4d8-b49885c893a1" CreationDate="2011-03-06T02:23:10.707" Comment="http://twitter.com/#!/StackGameDev/status/44221451821268993" />
  <row Id="19338" PostHistoryTypeId="2" PostId="9377" RevisionGUID="0e81b16f-2753-4309-a8b5-b758a7e98c98" CreationDate="2011-03-06T04:04:07.533" UserId="5889" Text="I've completed my graduation in Computer Science and currently working as a Software Engineer in a software company. I was wondering if I can build my career in Game Development. If so, what should be my approach. I've a few questions:&#xD;&#xA;&#xD;&#xA;1. Which universities to apply for masters? Preferably in Canada. Scholarships available? How shall I prepare myself before applying which shall give me an edge or advantage over others?&#xD;&#xA;2. I know Java, C#, PHP etc. I dont think these languages will be needed in Game Development. In that case, what languages shall I focus on from now?&#xD;&#xA;3. How do I get some ideas about IDE/Engines/Platform of game development? I'm not talking about flash/browser games.&#xD;&#xA;4. Please suggest me anything you want as I don't know much about it so I'm most likely to miss the most important questions. Feel free to make this thread a starter guide for those interested in perusing their career in game development. Post every relevant information.&#xD;&#xA;&#xD;&#xA;Thanks in Advance." />
  <row Id="19339" PostHistoryTypeId="1" PostId="9377" RevisionGUID="0e81b16f-2753-4309-a8b5-b758a7e98c98" CreationDate="2011-03-06T04:04:07.533" UserId="5889" Text="Need guidelines for studying Game Development" />
  <row Id="19340" PostHistoryTypeId="3" PostId="9377" RevisionGUID="0e81b16f-2753-4309-a8b5-b758a7e98c98" CreationDate="2011-03-06T04:04:07.533" UserId="5889" Text="&lt;career&gt;" />
  <row Id="19341" PostHistoryTypeId="5" PostId="9377" RevisionGUID="9248c99f-d83e-48a2-b4c6-c2cd43293c92" CreationDate="2011-03-06T04:27:45.877" UserId="5889" Comment="added 230 characters in body" Text="I've completed my graduation in Computer Science and currently working as a Software Engineer in a software company. I was wondering if I can build my career in Game Development. If so, what should be my approach. I've a few questions:&#xD;&#xA;&#xD;&#xA;1. Which universities to apply for masters? Preferably in Canada. Scholarships available? How shall I prepare myself before applying which shall give me an edge or advantage over others?&#xD;&#xA;2. I know Java, C#, PHP etc. I dont think these languages will be needed in Game Development. In that case, what languages shall I focus on from now?&#xD;&#xA;3. How do I get some ideas about IDE/Engines/Platform of game development? I'm not talking about flash/browser games.&#xD;&#xA;4. Please suggest me anything you want as I don't know much about it so I'm most likely to miss the most important questions. Feel free to make this thread a starter guide for those interested in perusing their career in game development. Post every relevant information.&#xD;&#xA;&#xD;&#xA;Thanks in Advance.&#xD;&#xA;&#xD;&#xA;EDIT: I can see a lot of people suggested to build a small project/game. If so, please suggest me how do I start a small game developing (maybe a clone to some existing small games ie pacman, brick game etc) from start to end." />
  <row Id="19342" PostHistoryTypeId="25" PostId="9377" RevisionGUID="fbf42c4f-13c4-4165-8cab-5e83583630a6" CreationDate="2011-03-06T05:23:11.040" Comment="http://twitter.com/#!/StackGameDev/status/44266752158334976" />
  <row Id="19343" PostHistoryTypeId="2" PostId="9378" RevisionGUID="803ac431-93fb-40e4-83f3-e1e18dfa3e12" CreationDate="2011-03-06T06:30:33.027" UserId="3793" Text="I've tried to write an API that wraps around both D3D and OGL neatly. It's a massive undertaking, I learned. Many of their differences *can* be reconciled. For instance, loading shaders. I effectively encapsulate D3D and OGL shader code in my own format. IE: In D3D, you need to specify the shader profile, so the file itself has the shader profile written in it. When the encapsulateed shader source is handed to my API, it calls the appropriate D3D shader creation method with the appropriate shader profile and such.&#xD;&#xA;&#xD;&#xA;However, there are still plenty of differences that I haven't solved, nor might I ever, because I've decided that a higher-level abstraction is easier to design and satisfactory for my requirements. I'm currently working on something sort of similar to the D3DXEffect framework. Objects have a render-technique, which contains render passes, which have a set of render states, a set of shaders, and require certain inputs. This allows me to abstract more of the API away." />
  <row Id="19344" PostHistoryTypeId="25" PostId="9346" RevisionGUID="7696b462-5e01-4094-b240-e04229b503c8" CreationDate="2011-03-06T08:23:11.017" Comment="http://twitter.com/#!/StackGameDev/status/44312051060965376" />
  <row Id="19345" PostHistoryTypeId="2" PostId="9379" RevisionGUID="81e8c261-5acb-42cc-b9e0-a57be4c2411b" CreationDate="2011-03-06T09:36:07.630" UserId="5821" Text="1. No idea&#xD;&#xA;2. We're using all of the mentioned languages for GameDev. C++ would likely be a good addition.&#xD;&#xA;3. See e.g. [this][1] question&#xD;&#xA;4. Make a game. Finalize it, and release it. Someone applying for a gamedev job that has shown he can actually make and *finish* a game stands a lot better chance of getting a job.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4057/what-are-the-free-3d-oop-game-engines" />
  <row Id="19346" PostHistoryTypeId="2" PostId="9380" RevisionGUID="c5b20662-b843-4d75-8491-b042afb800a3" CreationDate="2011-03-06T09:56:05.897" UserId="3212" Text="For more details and proper guidelines check this out:&#xD;&#xA;&#xD;&#xA;http://www.sloperama.com/advice.html&#xD;&#xA;" />
  <row Id="19347" PostHistoryTypeId="2" PostId="9381" RevisionGUID="b92b7821-31c1-455e-bf07-4d194b51c64f" CreationDate="2011-03-06T10:58:43.383" UserId="5246" Text="I am trying to make my first Tile-game using XNA. I have no problem drawing the map layers using [TiledLib from codeplex][1], but, now I want to give sprite an (order) to move to a specific position on map, by selecting the sprite (left mouse click) and then right mouse click somewhere on the map to specify the target position. I don’t know what is the best practice to move sprite this way, considering that there may be collision objects in the direct path.&#xD;&#xA;&#xD;&#xA;what is the best practice to do this? Is there any demo covering this issue?&#xD;&#xA;&#xD;&#xA;thanks.&#xD;&#xA;&#xD;&#xA;BTW: I couldn’t upload snapshot because of my low score :(&#xD;&#xA;&#xD;&#xA;  [1]: http://tiledlib.codeplex.com/" />
  <row Id="19348" PostHistoryTypeId="1" PostId="9381" RevisionGUID="b92b7821-31c1-455e-bf07-4d194b51c64f" CreationDate="2011-03-06T10:58:43.383" UserId="5246" Text="What is the best practice to move sprites using mouse order in Tile games?" />
  <row Id="19349" PostHistoryTypeId="3" PostId="9381" RevisionGUID="b92b7821-31c1-455e-bf07-4d194b51c64f" CreationDate="2011-03-06T10:58:43.383" UserId="5246" Text="&lt;game-design&gt;&lt;best-practices&gt;&lt;tiles&gt;" />
  <row Id="19350" PostHistoryTypeId="6" PostId="9381" RevisionGUID="502b92af-d8fd-4c98-b9d7-a79aeed9d479" CreationDate="2011-03-06T11:23:08.797" UserId="5246" Comment="edited tags" Text="&lt;game-design&gt;&lt;xna&gt;&lt;best-practices&gt;&lt;tiles&gt;" />
  <row Id="19351" PostHistoryTypeId="25" PostId="9381" RevisionGUID="62b69d67-4a86-4cf2-a19c-0c8f3f3beda2" CreationDate="2011-03-06T11:23:11.570" Comment="http://twitter.com/#!/StackGameDev/status/44357351091879936" />
  <row Id="19352" PostHistoryTypeId="2" PostId="9382" RevisionGUID="dcec6bdb-a0a2-493e-9ee0-da478cf61af3" CreationDate="2011-03-06T11:28:32.930" UserId="5740" Text="I've been following a guide I found here ([http://knol.google.com/k/matrices-for-3d-applications-view-transformation][1]) on constructing a matrix that will allow me to 3D coordinates to an object's local coordinate space, and back again. I've tried to implement these two matrices using my object's look, side, up and location vectors and it seems to be working for the first three coordinates. I'm a little confused as to what I should expect for the *w* coordinate.&#xD;&#xA;&#xD;&#xA;Here are couple of examples from the print outs I've made of the matricies that are constructed. I'm passing a test vector of [9, 8, 14, 1] each time to see if I can convert both ways:&#xD;&#xA;&#xD;&#xA;Basic example:&#xD;&#xA;&#xD;&#xA;    localize matrix:&#xD;&#xA;    Matrix: 0.000000	-0.000000	1.000000	0.000000&#xD;&#xA;    		0.000000	1.000000	0.000000	0.000000&#xD;&#xA;    		1.000000	0.000000	0.000000	0.000000&#xD;&#xA;    		5.237297	-45.530716	11.021271	1.000000&#xD;&#xA;    globalize matrix:&#xD;&#xA;    Matrix: 0.000000	0.000000	1.000000	0.000000&#xD;&#xA;    		-0.000000	1.000000	0.000000	0.000000&#xD;&#xA;    		1.000000	0.000000	0.000000	0.000000&#xD;&#xA;    		-11.021271	-45.530716	-5.237297	1.000000&#xD;&#xA;    &#xD;&#xA;    test:&#xD;&#xA;    Vector4f(9.000000, 8.000000, 14.000000, 1.000000)&#xD;&#xA;    localTest:&#xD;&#xA;    Vector4f(14.000000, 8.000000, 9.000000, -161.812256)&#xD;&#xA;    worldTest:&#xD;&#xA;    Vector4f(9.000000, 8.000000, 14.000000, -727.491455)&#xD;&#xA;&#xD;&#xA;More complicated example:&#xD;&#xA;&#xD;&#xA;    localize matrix:&#xD;&#xA;    Matrix: 0.052504	-0.000689	-0.998258	0.000000&#xD;&#xA;    		0.052431	0.998260	0.002068	0.000000&#xD;&#xA;    		0.997241	-0.052486	0.052486	0.000000&#xD;&#xA;    		58.806095	2.979346	-39.396252	1.000000&#xD;&#xA;    globalize matrix:&#xD;&#xA;    Matrix: 0.052504	0.052431	0.997241	0.000000&#xD;&#xA;    		-0.000689	0.998260	-0.052486	0.000000&#xD;&#xA;    		-0.998258	0.002068	0.052486	0.000000&#xD;&#xA;    		-42.413120	5.975957	-56.419727	1.000000&#xD;&#xA;    &#xD;&#xA;    test:&#xD;&#xA;    Vector4f(9.000000, 8.000000, 14.000000, 1.000000)&#xD;&#xA;    localTest:&#xD;&#xA;    Vector4f(-13.508600, 8.486917, 9.290090, 2.542114)&#xD;&#xA;    worldTest:&#xD;&#xA;    Vector4f(9.000190, 7.993863, 13.990230, 102.057129)&#xD;&#xA;&#xD;&#xA;As you can see in the more complicated example, the coordinates after converting both ways loose some precision, but this isn't a problem. I'm just wondering how I should deal with the last (w) coordinate? Should I just set it to 1 after performing the matrix multiplication, or does it look like I've done something wrong?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help!&#xD;&#xA;&#xD;&#xA;  [1]: http://knol.google.com/k/matrices-for-3d-applications-view-transformation#" />
  <row Id="19353" PostHistoryTypeId="1" PostId="9382" RevisionGUID="dcec6bdb-a0a2-493e-9ee0-da478cf61af3" CreationDate="2011-03-06T11:28:32.930" UserId="5740" Text="Converting to and from local and world 3D coordinate spaces?" />
  <row Id="19354" PostHistoryTypeId="3" PostId="9382" RevisionGUID="dcec6bdb-a0a2-493e-9ee0-da478cf61af3" CreationDate="2011-03-06T11:28:32.930" UserId="5740" Text="&lt;3d&gt;&lt;coordinates&gt;&lt;matrix&gt;&lt;localization&gt;" />
  <row Id="19355" PostHistoryTypeId="2" PostId="9383" RevisionGUID="00cfc7f4-02e6-41b6-9ef4-027ddd348859" CreationDate="2011-03-06T11:32:26.447" UserId="1156" Text="You may want to look up the [A* pathfinding algorithm][1] and [some material explaining it][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A*_search_algorithm&#xD;&#xA;  [2]: http://www.policyalmanac.org/games/aStarTutorial.htm" />
  <row Id="19356" PostHistoryTypeId="2" PostId="9384" RevisionGUID="a13c0063-876a-491d-8a4b-d89a10eaa093" CreationDate="2011-03-06T11:39:54.690" UserId="2592" Text="I'm a web developer and I am keen to start writing my own games.&#xD;&#xA;&#xD;&#xA;For familiarity, I've chosen JavaScript and `canvas` element for now.&#xD;&#xA;&#xD;&#xA;I want to generate some terrain like that in Scorched Earth.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![Scorched Earth][1]&#xD;&#xA;&#xD;&#xA;My first attempt made me realise I couldn't just randomise the `y` value; there had to be some sanity in the peaks and troughs.&#xD;&#xA;&#xD;&#xA;I have Googled around a bit, but either I can't find something simple enough for me or I am using the wrong keywords.&#xD;&#xA;&#xD;&#xA;Can you please show me what sort of algorithm I would use to generate something in the example, keeping in mind that I am completely new to games programming (since making Breakout in 2003 with Visual Basic anyway)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/zHLQt.png" />
  <row Id="19357" PostHistoryTypeId="1" PostId="9384" RevisionGUID="a13c0063-876a-491d-8a4b-d89a10eaa093" CreationDate="2011-03-06T11:39:54.690" UserId="2592" Text="How do I generate terrain like that of Scorched Earth?" />
  <row Id="19358" PostHistoryTypeId="3" PostId="9384" RevisionGUID="a13c0063-876a-491d-8a4b-d89a10eaa093" CreationDate="2011-03-06T11:39:54.690" UserId="2592" Text="&lt;terrain-rendering&gt;" />
  <row Id="19359" PostHistoryTypeId="2" PostId="9385" RevisionGUID="ca601ef7-22b3-4d6d-aff3-4c2d12f93e1a" CreationDate="2011-03-06T11:43:31.173" UserId="5864" Text="You can perform a spherical projection in a pixel shader applied to a quad.&#xD;&#xA;&#xD;&#xA;Assume the sphere is centered in the quad and the projection is orthogonal (it becomes slightly more difficult with perspective projection but if you pass your inverse view and projection matrices within the shader you should manage to do it, too).&#xD;&#xA;&#xD;&#xA;Instead of querying the texture coordinates the usual way:&#xD;&#xA;&#xD;&#xA;    gl_FragColor = texture2D(texture, texCoord);&#xD;&#xA;&#xD;&#xA;You use `texCoord` as the final coordinates of a spherical texture mapping and retrieve the original texture coordinates by reversing the process:&#xD;&#xA;&#xD;&#xA;    float x = 2.0 * (texCoord.x - 0.5);&#xD;&#xA;    float y = 2.0 * (texCoord.y - 0.5);&#xD;&#xA;    float r = sqrt(x * x + y * y);&#xD;&#xA;&#xD;&#xA;    float r2 = asin(r);&#xD;&#xA;    float x2 = r2 / r * x;&#xD;&#xA;    float y2 = r2 / r * y;&#xD;&#xA;&#xD;&#xA;Now `x2` and `y2` are values between `-π` and `π`. You need to “scroll” the texture according to your `time` variable, and normalize your texture coordinates. For a simple rotation around the Y axis:&#xD;&#xA;&#xD;&#xA;    float x3 = mod(x2 / (4.0 * pi) + 0.5 + time, 1.0f);&#xD;&#xA;    float y3 = y2 / (2.0 * pi) + 0.5;&#xD;&#xA;&#xD;&#xA;Then finally query the texture, but only if we fall inside the sphere:&#xD;&#xA;&#xD;&#xA;    if (r &gt; 1.0)&#xD;&#xA;        gl_FragColor = texture2D(texture, vec2(x3, y3));&#xD;&#xA;    else&#xD;&#xA;        ; /* Choose something to do here */&#xD;&#xA;" />
  <row Id="19360" PostHistoryTypeId="2" PostId="9386" RevisionGUID="a2fb3869-5854-4bcd-901b-ab9758f857cd" CreationDate="2011-03-06T11:54:26.957" UserId="1156" Text="[The midpoint displacement algorithm is exactly what you want.][1]&#xD;&#xA;&#xD;&#xA;That link can generate something like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;Or like your image, depending on what parameters you use.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprogrammer.com/fractal.html&#xD;&#xA;  [2]: http://i.stack.imgur.com/XHPHn.gif" />
  <row Id="19361" PostHistoryTypeId="2" PostId="9387" RevisionGUID="8de11793-a699-41ae-a04c-9713cbf9ae83" CreationDate="2011-03-06T11:55:57.073" UserId="5902" Text="How about using [midpoint displacement](http://www.gameprogrammer.com/fractal.html) algorithm possibly followed by a slight smoothing e.g. [low pass filtering](http://en.wikipedia.org/wiki/Low-pass_filter) to remove too sharp spikes? It should result in looking something similar than your example.&#xD;&#xA;&#xD;&#xA;I believe that Scorched Earth took in account the gravity and falling dirt, that is you can't have exactly vertical lines since the dirt would fall down and create a slope." />
  <row Id="19362" PostHistoryTypeId="5" PostId="9385" RevisionGUID="6b9dfc09-7397-449d-8583-7cbd5de0e00a" CreationDate="2011-03-06T11:58:53.433" UserId="5864" Comment="avoid divisions by zero" Text="You can perform a spherical projection in a pixel shader applied to a quad.&#xD;&#xA;&#xD;&#xA;Assume the sphere is centered in the quad and the projection is orthogonal (it becomes slightly more difficult with perspective projection but if you pass your inverse view and projection matrices within the shader you should manage to do it, too).&#xD;&#xA;&#xD;&#xA;Instead of querying the texture coordinates the usual way:&#xD;&#xA;&#xD;&#xA;    gl_FragColor = texture2D(texture, texCoord);&#xD;&#xA;&#xD;&#xA;You use `texCoord` as the final coordinates of a spherical texture mapping and retrieve the original texture coordinates by reversing the process:&#xD;&#xA;&#xD;&#xA;    float x = 2.0 * (texCoord.x - 0.5);&#xD;&#xA;    float y = 2.0 * (texCoord.y - 0.5);&#xD;&#xA;    float r = sqrt(x * x + y * y);&#xD;&#xA;&#xD;&#xA;    float d = r ? asin(r) / r : 0.0;&#xD;&#xA;    float x2 = d * x;&#xD;&#xA;    float y2 = d * y;&#xD;&#xA;&#xD;&#xA;Now `x2` and `y2` are values between `-π` and `π`. You need to “scroll” the texture according to your `time` variable, and normalize your texture coordinates. For a simple rotation around the Y axis:&#xD;&#xA;&#xD;&#xA;    float x3 = mod(x2 / (4.0 * pi) + 0.5 + time, 1.0f);&#xD;&#xA;    float y3 = y2 / (2.0 * pi) + 0.5;&#xD;&#xA;&#xD;&#xA;Then finally query the texture, but only if we fall inside the sphere:&#xD;&#xA;&#xD;&#xA;    if (r &gt; 1.0)&#xD;&#xA;        gl_FragColor = texture2D(texture, vec2(x3, y3));&#xD;&#xA;    else&#xD;&#xA;        ; /* Choose something to do here */&#xD;&#xA;" />
  <row Id="19363" PostHistoryTypeId="2" PostId="9388" RevisionGUID="2c91ce63-b7d6-41fe-a0e2-bd9bc96a0394" CreationDate="2011-03-06T12:09:16.827" UserId="5740" Text="My experience of this on the Mac is that there's normally a shortcut to exit fullscreen mode into windowed mode (typically CMD+M or CMD+Return). Once you've switched into windowed mode then you can access all your applications as normal. Windowed mode also nicely allows the user to monitor their game amongst all their other apps. So I guess you could just implement this sort of functionality to your game." />
  <row Id="19364" PostHistoryTypeId="5" PostId="9387" RevisionGUID="a7dcb33e-2ef3-4609-b27b-8492b47b4959" CreationDate="2011-03-06T12:13:18.937" UserId="5902" Comment="added 47 characters in body" Text="How about using [midpoint displacement](http://www.gameprogrammer.com/fractal.html) algorithm possibly followed by a slight smoothing e.g. [low pass filtering](http://en.wikipedia.org/wiki/Low-pass_filter) to remove too sharp spikes? This approach is not the same as in Scorched Earth, but is should provide similar results.&#xD;&#xA;&#xD;&#xA;I believe that Scorched Earth simulated somehow the gravity and falling dirt. For example you can't have too steep hill because otherwise the dirt would fall down and create a less steep slope." />
  <row Id="19365" PostHistoryTypeId="5" PostId="9385" RevisionGUID="5c054842-f6b6-4262-96d6-c4c82a983ffb" CreationDate="2011-03-06T12:14:06.283" UserId="5864" Comment="typo!" Text="You can perform a spherical projection in a pixel shader applied to a quad.&#xD;&#xA;&#xD;&#xA;Assume the sphere is centered in the quad and the projection is orthogonal (it becomes slightly more difficult with perspective projection but if you pass your inverse view and projection matrices within the shader you should manage to do it, too).&#xD;&#xA;&#xD;&#xA;Instead of querying the texture coordinates the usual way:&#xD;&#xA;&#xD;&#xA;    gl_FragColor = texture2D(texture, texCoord);&#xD;&#xA;&#xD;&#xA;You use `texCoord` as the final coordinates of a spherical texture mapping and retrieve the original texture coordinates by reversing the process:&#xD;&#xA;&#xD;&#xA;    float x = 2.0 * (texCoord.x - 0.5);&#xD;&#xA;    float y = 2.0 * (texCoord.y - 0.5);&#xD;&#xA;    float r = sqrt(x * x + y * y);&#xD;&#xA;&#xD;&#xA;    float d = r ? asin(r) / r : 0.0;&#xD;&#xA;    float x2 = d * x;&#xD;&#xA;    float y2 = d * y;&#xD;&#xA;&#xD;&#xA;Now `x2` and `y2` are values between `-π` and `π`. You need to “scroll” the texture according to your `time` variable, and normalize your texture coordinates. For a simple rotation around the Y axis:&#xD;&#xA;&#xD;&#xA;    float x3 = mod(x2 / (4.0 * pi) + 0.5 + time, 1.0f);&#xD;&#xA;    float y3 = y2 / (2.0 * pi) + 0.5;&#xD;&#xA;&#xD;&#xA;Then finally query the texture, but only if we fall inside the sphere:&#xD;&#xA;&#xD;&#xA;    if (r &lt;= 1.0)&#xD;&#xA;        gl_FragColor = texture2D(texture, vec2(x3, y3));&#xD;&#xA;    else&#xD;&#xA;        ; /* Choose something to do here */&#xD;&#xA;" />
  <row Id="19366" PostHistoryTypeId="2" PostId="9389" RevisionGUID="0ad7e69a-0733-4cb3-a5fd-dcb9060c1e80" CreationDate="2011-03-06T12:17:23.097" UserId="5864" Text="It looks like you are confusing rows and columns in your matrices. The `w` coordinate should always yield `1` with the matrices you are using." />
  <row Id="19367" PostHistoryTypeId="2" PostId="9390" RevisionGUID="b86a2d07-b9ea-44b3-b6fe-98bceb588ab5" CreationDate="2011-03-06T12:32:46.920" UserId="1217" Text="To solve this I kept my code and added a parent object which got the code component instead. Then I turned the child object so that the rotation weirdness disappeared." />
  <row Id="19368" PostHistoryTypeId="6" PostId="9384" RevisionGUID="2f944481-44a4-4d60-848c-b17bc48a924a" CreationDate="2011-03-06T12:38:20.347" UserId="1156" Comment="edited tags" Text="&lt;javascript&gt;&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="19369" PostHistoryTypeId="5" PostId="9386" RevisionGUID="cde488d2-a12b-4ecf-8d6a-f1e1ce1a476f" CreationDate="2011-03-06T12:43:24.090" UserId="1156" Comment="added 99 characters in body" Text="[The midpoint displacement algorithm is exactly what you want.][1]&#xD;&#xA;&#xD;&#xA;That link can generate something like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;Or like your image, depending on what parameters you use.&#xD;&#xA;There's C source available [here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprogrammer.com/fractal.html&#xD;&#xA;  [2]: http://i.stack.imgur.com/XHPHn.gif&#xD;&#xA;  [3]: http://www.gameprogrammer.com/fractal/fractal.zip" />
  <row Id="19370" PostHistoryTypeId="5" PostId="9389" RevisionGUID="cdfefeee-35d1-4808-b465-d8881e198ed2" CreationDate="2011-03-06T13:07:14.263" UserId="5864" Comment="added 97 characters in body" Text="It looks like you are confusing rows and columns in your matrices, either in the way your load or store them, or when you perform the matrix×vector multiplication. The `w` coordinate should always yield `1` with the matrices you are using." />
  <row Id="19371" PostHistoryTypeId="5" PostId="9310" RevisionGUID="f867d6ba-6013-4bcc-81cd-52473084b120" CreationDate="2011-03-06T13:47:20.907" UserId="288" Comment="added 2090 characters in body; added 1 characters in body" Text="First of all: how you do it doesn't really matter. Just do the very *simplest thing that could possibly work*. My current favourite way is with **static** methods in each class (ie: bullet, ship), like this:&#xD;&#xA;&#xD;&#xA;    static Texture2D myTexture, myOtherTexture;&#xD;&#xA;    // Call me from Game.LoadContent:&#xD;&#xA;    public static void LoadContent(ContentManager content) { content.Load /* ...etc */ }&#xD;&#xA;&#xD;&#xA;(This is perfectly fine for simple games where you only have a single `ContentManager` instance and never call `Unload`.)&#xD;&#xA;&#xD;&#xA;Being able to toss in simple systems like this is one reason why &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9204/what-are-the-cons-of-using-drawablegamecomponent-for-every-instance-of-a-game-obj/9209#9209&quot;&gt;I don't think it's a good idea to use `DrawableGameComponent`&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;As has been mentioned a couple of times: XNA's `ContentManager` will share instances of loaded content (like textures). So after the first time you load it, subsequent loads will give you back the same texture with no cost for loading.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Anyway  - it doesn't really matter *how* you load your content. What matters (and what you are asking) is *when?*&#xD;&#xA;&#xD;&#xA;The answer to that is simple: **Load your textures when your game starts!** (Or behind loading screens or other the-game-isn't-animating screens if necessary.) If you cannot do this, the correct solution is to load your textures in a worker thread.&#xD;&#xA;&#xD;&#xA;When you load a texture (a synchronous operation - it blocks the calling thread), you take a hit pulling the data from disk, a hit to decode it, a hit to send it to the GPU, and a hit if you trigger the garbage collector (blocks all threads, and is especially bad on Xbox 360).&#xD;&#xA;&#xD;&#xA;In terms of the game loading, loading a texture is a very fast operation. In terms of the 16ms you have to calculate and render each frame at 60FPS, loading a texture is *agonisingly* slow.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Bill, in comments, asked for some resources on `ContentManager`. I am obviously biased, but I think some of my answers (including this one) contain some pretty good information and hint at some best practices:&#xD;&#xA;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/4242741/how-does-xnas-content-loadtexture2d-operate/4242832#4242832&quot;&gt;ContentManager will load things only once, no matter how many times you call Load&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/4264995/how-do-i-unload-content-from-the-content-manager/4265786#4265786&quot;&gt;ContentManager owns the resources that it loads, you can't Dispose of them yourself&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://gamedev.stackexchange.com/questions/5615/disposing-only-certain-resources-in-xna/5621#5621&quot;&gt;If you need fine-grained unloading, try using multiple ContentManagers&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/3887556/when-to-load-textures/3887727#3887727&quot;&gt;ContentManager *is* a resource manager - you don't need to create your own wrapper!&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/4173075/required-engine-side-assetts-what-to-do-with-them/4175973#4175973&quot;&gt;How to merge content for an external DLL&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/4814257/how-can-i-use-content-manager-in-console-aplication-to-load-a-new-model/4817685#4817685&quot;&gt;You can use ContentManager in console applications&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://stackoverflow.com/questions/3349711/drawablegamecomponent-xna-implementation-right-way/3349831#3349831&quot;&gt;How LoadContent works with DrawableGameComponents&lt;/a&gt; (which I &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9204/what-are-the-cons-of-using-drawablegamecomponent-for-every-instance-of-a-game-obj/9209#9209&quot;&gt;recommend avoiding&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;And one from XNA lead Shawn Hargreaves: If ContentManager doesn't suit your resource-management needs, you should &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2007/03/09/contentmanager-readasset.aspx&quot;&gt;derive from ContentManager and override Load&lt;/a&gt;. This way you can implement whatever asset tracking you like, without making ugly custom wrappers." />
  <row Id="19372" PostHistoryTypeId="6" PostId="4628" RevisionGUID="5f54f470-4105-41ba-bdd7-1794194ab1f5" CreationDate="2011-03-06T13:51:33.753" UserId="1156" Comment="edited tags" Text="&lt;procedural-generation&gt;&lt;rpg&gt;&lt;infinite&gt;&lt;roguelikes&gt;&lt;terrain&gt;" />
  <row Id="19373" PostHistoryTypeId="25" PostId="9384" RevisionGUID="85100584-a42e-4356-8b9c-5b54138f8492" CreationDate="2011-03-06T14:23:12.640" Comment="http://twitter.com/#!/StackGameDev/status/44402652376870912" />
  <row Id="19374" PostHistoryTypeId="2" PostId="9391" RevisionGUID="afbdb444-1ae2-4c8d-80d0-d3bfac2fdfb3" CreationDate="2011-03-06T15:21:47.260" UserId="5006" Text="Most game development happens with a main game loop.  Are there any good articles/blog posts/discussions about games without a game loop?  I imagine they'd mostly be web games, but I'd be interested in hearing otherwise.&#xD;&#xA;&#xD;&#xA;(As a side note, I think it's really interesting that the concept is **almost** exclusively used in gaming as far as I'm aware, perhaps that may be another question.)" />
  <row Id="19375" PostHistoryTypeId="1" PostId="9391" RevisionGUID="afbdb444-1ae2-4c8d-80d0-d3bfac2fdfb3" CreationDate="2011-03-06T15:21:47.260" UserId="5006" Text="Games without a game loop" />
  <row Id="19376" PostHistoryTypeId="3" PostId="9391" RevisionGUID="afbdb444-1ae2-4c8d-80d0-d3bfac2fdfb3" CreationDate="2011-03-06T15:21:47.260" UserId="5006" Text="&lt;gameloop&gt;" />
  <row Id="19377" PostHistoryTypeId="2" PostId="9392" RevisionGUID="51bff663-6b3f-4a23-a4a8-6a7841abf782" CreationDate="2011-03-06T15:56:38.590" UserId="5904" Text="First off, I don't think it is possible to have a game that doesn't have a loop, somewhere, unless it is absolutely trivial. A web game uses a loop, the only difference is that you aren't writing the loop, you generally just respond to events. There is still a loop happening. In a way, the distinction is immaterial anyways, you generally must repeat a sequence of code many times. If you use a loop to do so, then fine, if you use events or some other mechanism, great: the end result is that you  are repeating. A loop just seems to be the more straightforward way of repeatedly executing a block of code without overflowing your stack. ;)&#xD;&#xA;&#xD;&#xA;I can't think of any other paradigm other than event-based when there is no explicit loop, so maybe you can describe what it is you are having difficulties with or want more information about. Is it a general question of how to structure code, or how stuff gets done?&#xD;&#xA;For example, in Javascript/HTML5 I'd use a repeating timer to send an event every 1/30 of a second to signal the drawing of a new frame of animation." />
  <row Id="19378" PostHistoryTypeId="2" PostId="9393" RevisionGUID="5046d228-6189-46df-bf7d-d9e223c545fe" CreationDate="2011-03-06T16:22:26.717" UserId="5904" Text="I'm not sure I understand your diagram. Are you saying you want the image to repeat along the edge of the disk (i.e. the lines represent the borders of the image?) If so, that may produce visual artifacts that you might want to consider first.&#xD;&#xA;&#xD;&#xA;The way you've drawn it here, the image will compress near the inner part of the disk, and stretch near the outer part. The different radii of the inner/outer circle causes the arc lengths to be different. You're essentially mapping a square to a trapezoid. I would post an image, but my account is too new. Argh.&#xD;&#xA;&#xD;&#xA;I don't think GLU offers any other form of texture mapping for disks. If you want that kind of custom texture coordinates, you probably need to roll your own form of disk generation, which isn't that bad anyways. Still, you might want to reconsider using GLU for actual geometry anyways.&#xD;&#xA;" />
  <row Id="19379" PostHistoryTypeId="2" PostId="9394" RevisionGUID="b3620502-2353-436c-8230-230aa1b0c19f" CreationDate="2011-03-06T16:28:20.537" UserId="3793" Text="The only way I imagine you can avoid a game loop is recursion, which would eventually end in a stack overflow. Even if a game is event-based, there's something outside the game looping and sending those events. IE: Flash triggering tick/update/draw events. Inherently, to have more than a single frame of a game, you need to loop. That or your game is limited to a certain number of frames that are precomputed. That limits you to a rather simple game that isn't very actively... interactive." />
  <row Id="19380" PostHistoryTypeId="5" PostId="9391" RevisionGUID="21aaef80-9e6d-47f9-adf3-41cd1f60dd0e" CreationDate="2011-03-06T16:50:41.467" UserId="5006" Comment="added 246 characters in body; edited title" Text="Most game development happens with a main game loop.  Are there any good articles/blog posts/discussions about games without a game loop?  I imagine they'd mostly be web games, but I'd be interested in hearing otherwise.&#xD;&#xA;&#xD;&#xA;(As a side note, I think it's really interesting that the concept is **almost** exclusively used in gaming as far as I'm aware, perhaps that may be another question.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;I realize there's probably a redraw loop somewhere.  I guess what I really mean is a loop that you don't control.  Frames are something you as the developer are not concerned with as you're working on a higher level of abstraction.  " />
  <row Id="19381" PostHistoryTypeId="4" PostId="9391" RevisionGUID="21aaef80-9e6d-47f9-adf3-41cd1f60dd0e" CreationDate="2011-03-06T16:50:41.467" UserId="5006" Comment="added 246 characters in body; edited title" Text="Games without a(n explicit) game loop" />
  <row Id="19382" PostHistoryTypeId="2" PostId="9395" RevisionGUID="d7bbce6e-a533-4dae-bfce-1ceaee0e1d42" CreationDate="2011-03-06T16:55:22.997" UserId="1217" Text="I asked a similar question recently but now I think I know more about what I really want to know. I can answer my own question if I get to understand this bit. &#xD;&#xA;&#xD;&#xA;I have a situation where a sprite needs to be constrained within a certain boundary in 2d space. The boundary is circular so the sprite is constrained within a radius. This radius is defined as a distance from the center of a certain point. &#xD;&#xA;&#xD;&#xA;I know the position of the center point and I can track the position of the sprite. &#xD;&#xA;&#xD;&#xA;This is the code to detect the distance:&#xD;&#xA;&#xD;&#xA;    	float distance = Vector2.Distance(centerPosition, spritePosition));&#xD;&#xA;	    if (distance &gt; allowedDistance) {&#xD;&#xA;   &#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;The positions can be wherever on the grid, they are not described as in between -1 or 1. So basically the detecting code works, it only prints when the sprite is outside of it's boundary I just don't know what to do when it oversteps. Please explain any math used as I really want to understand what you're thinking to be able to elaborate on it myself." />
  <row Id="19383" PostHistoryTypeId="1" PostId="9395" RevisionGUID="d7bbce6e-a533-4dae-bfce-1ceaee0e1d42" CreationDate="2011-03-06T16:55:22.997" UserId="1217" Text="Restrict movement within a radius" />
  <row Id="19384" PostHistoryTypeId="3" PostId="9395" RevisionGUID="d7bbce6e-a533-4dae-bfce-1ceaee0e1d42" CreationDate="2011-03-06T16:55:22.997" UserId="1217" Text="&lt;c#&gt;&lt;math&gt;" />
  <row Id="19385" PostHistoryTypeId="2" PostId="9396" RevisionGUID="ccd298d3-5db2-46a9-8962-842230b19c45" CreationDate="2011-03-06T17:04:08.693" UserId="382" Text="What you need to do is reset the sprite's position back to it's greatest extent.&#xD;&#xA;&#xD;&#xA;You can do this by taking the vector from the centre to the sprites position, normalising it and then multiplying that by the allowed distance. However, that involves a square root which *may* be too slow for your game.&#xD;&#xA;&#xD;&#xA;Another approach is to limit the sprite to a box around the centre position so your test would become:&#xD;&#xA;&#xD;&#xA;    if (spritePosition.x &gt; centrePosition.x + allowedDistance)&#xD;&#xA;    {&#xD;&#xA;        spritePosition.x = centrePosition.x + allowedDistance;&#xD;&#xA;    }&#xD;&#xA;    else if (spritePosition.x &lt; centrePosition.x - allowedDistance)&#xD;&#xA;    {&#xD;&#xA;        spritePosition.x = centrePosition.x - allowedDistance;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and the same for the `y`.&#xD;&#xA;&#xD;&#xA;This doesn't give the same effect but *may* be quicker. You'd have to profile them both to see." />
  <row Id="19386" PostHistoryTypeId="5" PostId="9350" RevisionGUID="1936dea7-bc9d-4a00-b56e-a72172cde202" CreationDate="2011-03-06T17:21:35.187" UserId="5705" Comment="added 4 characters in body" Text="I need to find out the point inside a body, lets say a rectangular object, where the mouse was clicked on. I'm makin a game where the force will be applied depending on where the mouse was clicked on the body. Any ideas? &#xD;&#xA;&#xD;&#xA;Will `body.GetLocalPoint(b2vec2)` work?  I tried by passing the mouse coordinates when the click occurred when inside the body but if the body's position is `(400,300)` in world coordinates then for `trace(body.GetLocalPoint(new b2vec2(mouseX,mouseY)).x);` I get some value between 380 to 406 or something (eg. 401.6666666). I thought getLocalPoint will give something like `x=-10` when clicked to the left of the centre of body or `x=15` etc when clicked to the right.&#xD;&#xA;&#xD;&#xA;Language is As3 btw." />
  <row Id="19387" PostHistoryTypeId="5" PostId="9391" RevisionGUID="c61fcd1b-289f-475d-adcf-0243175b2a99" CreationDate="2011-03-06T17:22:35.190" UserId="5006" Comment="added 447 characters in body" Text="Most game development happens with a main game loop.  Are there any good articles/blog posts/discussions about games without a game loop?  I imagine they'd mostly be web games, but I'd be interested in hearing otherwise.&#xD;&#xA;&#xD;&#xA;(As a side note, I think it's really interesting that the concept is **almost** exclusively used in gaming as far as I'm aware, perhaps that may be another question.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;I realize there's probably a redraw loop somewhere.  I guess what I really mean is a loop that is hidden to you.  Frames are something you as the developer are not concerned with as you're working on a higher level of abstraction.  E.g. `someLootItem.moveTo(inventory, someAnimatationType)` and that will move from the loot box to your inventory using the specified animation type without the game developer having to worry about the implementation details of that animation.  &#xD;&#xA;&#xD;&#xA;Maybe that's how &quot;real&quot; games end up working, but from reading most tutorials they seem to imply a much more granular level of control is used, but that might just be an artifact of being a tutorial." />
  <row Id="19388" PostHistoryTypeId="25" PostId="9391" RevisionGUID="5426ced9-c48c-4f03-891a-988df9ba8336" CreationDate="2011-03-06T17:23:12.527" Comment="http://twitter.com/#!/StackGameDev/status/44447952877522944" />
  <row Id="19389" PostHistoryTypeId="2" PostId="9397" RevisionGUID="32fc0729-0057-4400-b187-c9db1f8c59b1" CreationDate="2011-03-06T17:27:39.257" UserId="5904" Text="So, your sprite has a rectangular shape? If so, you are effectively asking, &quot;How do I move a rectangle that intersects with a circle inside the circle so that the rectangle no longer intersects&quot;. I assume then that the rectangle is in fact smaller than your circle and the sprite position represents the center of the sprite. If it doesn't, you can convert from top-left to center by simply adding 1/2 the width, height, that is:&#xD;&#xA;&#xD;&#xA;    center.X = spritePosition.x + spriteImageSize.x/2;&#xD;&#xA;    center.Y = spritePosition.y + spriteImageSize.y/2;&#xD;&#xA;&#xD;&#xA;In that case, you need to consider the 4 points of the sprite. Check if the first one is outside, and if it is, move it so it isn't. I don't have a formal proof, but I conjecture that it is impossible for you to move a corner inside the circle such that it puts another corner outside that was previously inside. This depends strongly on the fact that the rectangle fits inside the circle.&#xD;&#xA;&#xD;&#xA;The code would be something like this:&#xD;&#xA;&#xD;&#xA;    TL = sprite.getTopLeft();&#xD;&#xA;    if(outside(TL, circle)) {&#xD;&#xA;    newPoint = moveInside(TL); //see how to move a point inside &#xD;&#xA;    delta = newPoint - TL; //figure out how much we moved&#xD;&#xA;    spritePosition += delta; //move the center of the sprite&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //repeat for TR, BL, BR -- IF YOU MOVE THE SPRITE, YOU MUST RECOMPUTE THE CORNERS! &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you don't need that level of detail and you'd rather treat the sprite as an infinitely small single point, then you simply need to detect when it is outside the circle and set it so that it is inside. See ChrisF's response on how to do that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19390" PostHistoryTypeId="2" PostId="9398" RevisionGUID="4750be5b-e2e8-43bf-85bf-a8db126c39dd" CreationDate="2011-03-06T17:28:45.893" UserId="395" Text="Panda3D is entirely event driven, so the main loop of all games written in it is implicit really (one call to a library function that doesn't return until the game ends)." />
  <row Id="19391" PostHistoryTypeId="5" PostId="9395" RevisionGUID="35837798-0823-4bf9-9291-950b211b246f" CreationDate="2011-03-06T17:40:30.243" UserId="1217" Comment="I further detailed the question" Text="I asked a similar question recently but now I think I know more about what I really want to know. I can answer my own question if I get to understand this bit. &#xD;&#xA;&#xD;&#xA;I have a situation where a sprite's center point needs to be constrained within a certain boundary in 2d space. The boundary is circular so the sprite is constrained within a radius. This radius is defined as a distance from the center of a certain point. &#xD;&#xA;&#xD;&#xA;I know the position of the center point and I can track the center position of the sprite. &#xD;&#xA;&#xD;&#xA;This is the code to detect the distance:&#xD;&#xA;&#xD;&#xA;    	float distance = Vector2.Distance(centerPosition, spritePosition));&#xD;&#xA;	    if (distance &gt; allowedDistance) {&#xD;&#xA;   &#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;The positions can be wherever on the grid, they are not described as in between -1 or 1. So basically the detecting code works, it only prints when the sprite is outside of it's boundary I just don't know what to do when it oversteps. Please explain any math used as I really want to understand what you're thinking to be able to elaborate on it myself." />
  <row Id="19392" PostHistoryTypeId="2" PostId="9399" RevisionGUID="c269cb10-7ae3-4ff9-ba48-77959764ff9a" CreationDate="2011-03-06T17:41:59.783" UserId="4901" Text="I want to know how the algorithm works in this game:&#xD;&#xA;http://www.gametrailers.com/user-movie/cloud-the-game/45068&#xD;&#xA;&#xD;&#xA;Especially how the game generates the real time cloud, and be able to merge with other clouds dynamically. &#xD;&#xA;&#xD;&#xA;I tried to google some info, but was unable to find the useful information.&#xD;&#xA;Probably because I used to wrong keywords " />
  <row Id="19393" PostHistoryTypeId="1" PostId="9399" RevisionGUID="c269cb10-7ae3-4ff9-ba48-77959764ff9a" CreationDate="2011-03-06T17:41:59.783" UserId="4901" Text="Real Time Cloud Algorithm" />
  <row Id="19394" PostHistoryTypeId="3" PostId="9399" RevisionGUID="c269cb10-7ae3-4ff9-ba48-77959764ff9a" CreationDate="2011-03-06T17:41:59.783" UserId="4901" Text="&lt;point-cloud&gt;" />
  <row Id="19395" PostHistoryTypeId="5" PostId="9396" RevisionGUID="207bd60c-16a4-4d59-b21f-bbd6dae3260b" CreationDate="2011-03-06T17:48:49.737" UserId="382" Comment="more info" Text="What you need to do is reset the sprite's position back to it's greatest extent.&#xD;&#xA;&#xD;&#xA;You can do this by taking the vector from the centre to the sprites position, normalising it and then multiplying that by the allowed distance. However, that involves a square root which *may* be too slow for your game.&#xD;&#xA;&#xD;&#xA;Another approach is to limit the sprite to a box around the centre position so your test would become:&#xD;&#xA;&#xD;&#xA;    if (spritePosition.x &gt; centrePosition.x + allowedDistance)&#xD;&#xA;    {&#xD;&#xA;        spritePosition.x = centrePosition.x + allowedDistance;&#xD;&#xA;    }&#xD;&#xA;    else if (spritePosition.x &lt; centrePosition.x - allowedDistance)&#xD;&#xA;    {&#xD;&#xA;        spritePosition.x = centrePosition.x - allowedDistance;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and the same for the `y`.&#xD;&#xA;&#xD;&#xA;**This obviously doesn't give the same effect** but *may* be quicker. You'd have to profile them both to see and also check the behaviour to see if was acceptable." />
  <row Id="19396" PostHistoryTypeId="2" PostId="9400" RevisionGUID="bfd64002-ea4b-4d43-92b7-7a4b4932974b" CreationDate="2011-03-06T17:59:02.627" UserId="5705" Text="How can top view physics games be done in box2D? One idea I have is to set the linear velocity of an object manually or to alter the linear and angular damping as my object moves over different surfaces. For example if my object is over a wet surface it'll have less linear damping and if it is over rough surface it'll have more damping. And to see if my object has fallen over an edge I'll try to use an `AABB` and check if its still inside or manually see if `object.x &gt; boundary.x` etc. Is there any better way?" />
  <row Id="19397" PostHistoryTypeId="1" PostId="9400" RevisionGUID="bfd64002-ea4b-4d43-92b7-7a4b4932974b" CreationDate="2011-03-06T17:59:02.627" UserId="5705" Text="Implementing top view physics using box2D" />
  <row Id="19398" PostHistoryTypeId="3" PostId="9400" RevisionGUID="bfd64002-ea4b-4d43-92b7-7a4b4932974b" CreationDate="2011-03-06T17:59:02.627" UserId="5705" Text="&lt;flash&gt;&lt;box2d&gt;" />
  <row Id="19399" PostHistoryTypeId="2" PostId="9401" RevisionGUID="e41e26a2-0bd1-4694-8e1a-1fe921d043c7" CreationDate="2011-03-06T18:17:39.007" UserId="3793" Text="Take the position of the object, minus the origin of the circle. This will give you a vector from the origin to the object. The length of this vector is the distance to the object. Multiply this vector by the circle's radius divided by the distance to the object. Set the object's position to the circle's origin plus this vector.&#xD;&#xA;&#xD;&#xA;Psuedo-Code:&#xD;&#xA;&#xD;&#xA;    Vector FromCircleToObject = Object.Position - Circle.Origin;&#xD;&#xA;    FromCircleToObject *= Circle.Radius / FromCircleToObject.Length;&#xD;&#xA;    Object.Position = Circle.Origin + FromCircleToObject;&#xD;&#xA;&#xD;&#xA;You can optimize this by using the vector's length squared. This saves you a square root. If you use the vector's length squared, you must use the circle's radius squared. Luckily, squaring is cheaper than square rooting, so there's still an optimization to be had." />
  <row Id="19400" PostHistoryTypeId="2" PostId="9402" RevisionGUID="74abe645-9895-46ab-886e-333eb4175a83" CreationDate="2011-03-06T18:35:41.253" UserId="744" Text="I can't speak to the details of Cloud, but clouds are usually implemented using &lt;a href=&quot;http://mrl.nyu.edu/~perlin/noise/&quot;&gt;three dimensional Perlin noise&lt;/a&gt;. From the video and my recollection, Cloud &quot;merges&quot; the clouds by just making your cloud bigger and removing the other one.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.noisemachine.com/talk1/&quot;&gt;Ken Perlin's original noise presentation&lt;/a&gt; &lt;a href=&quot;http://www.noisemachine.com/talk1/24b.html&quot;&gt;uses clouds as an example&lt;/a&gt;." />
  <row Id="19401" PostHistoryTypeId="2" PostId="9403" RevisionGUID="b988759e-33aa-4c95-8c39-2a6c8741b2ce" CreationDate="2011-03-06T18:36:08.353" UserId="5094" Text="I'm trying to create a flexible tile-based game engine to make all sorts of non-realtime puzzle games, just as Bejeweled, Civilization, Sokoban, and so on. &#xD;&#xA;&#xD;&#xA;The first approach I had was to have a 2D array of Tile objects, and then have classes inheriting from Tile that represented the game objects. Unfortunately that way I couldn't stack more game elements on the same Tile without having a 3D array.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then I did something different: I still had the 2D array of Tile objects, but every Tile object contained a List&lt;Entity&gt; where I put and different entities. This worked fine until 20 minutes ago, when I realized that it's too expensive to do many things, look at this example:&#xD;&#xA;&#xD;&#xA;I have a Wall entity. Every update I have to check the 8 adjacent Tiles, then check all of the entities in the Tile's List&lt;Entity&gt;, check if any of those entities is a Wall, then finally draw the correct sprite. (This is done to draw walls that are next to each other seamlessly)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The only solution I see now is having a 3D array, with many layers, that could suit every situation. But that way I can't stack two entities that share the same layer on the same tile. Whenever I want to do that I have to create a new layer.&#xD;&#xA;&#xD;&#xA;Is there a better solution? What would you do?" />
  <row Id="19402" PostHistoryTypeId="1" PostId="9403" RevisionGUID="b988759e-33aa-4c95-8c39-2a6c8741b2ce" CreationDate="2011-03-06T18:36:08.353" UserId="5094" Text="Designing a flexible tile-based engine" />
  <row Id="19403" PostHistoryTypeId="3" PostId="9403" RevisionGUID="b988759e-33aa-4c95-8c39-2a6c8741b2ce" CreationDate="2011-03-06T18:36:08.353" UserId="5094" Text="&lt;2d&gt;&lt;engine&gt;&lt;c#&gt;&lt;tiles&gt;&lt;performance&gt;" />
  <row Id="19404" PostHistoryTypeId="2" PostId="9404" RevisionGUID="f1c6b611-3e81-44b0-82bc-7ca548e085cc" CreationDate="2011-03-06T18:48:45.050" UserId="4234" Text="I've got a 2D projectile code sample working, but would like to extend it to 3D. How would I calculate the initial velocity of the Z-axis? At the moment, I've got:&#xD;&#xA;&#xD;&#xA;    initVel.X = (float)Math.Cos(45.0);&#xD;&#xA;    initVel.Y = (float)Math.Sin(45.0);&#xD;&#xA;&#xD;&#xA;How would I convert this to work in 3D (and add the initial velocity for the Z-axis)?&#xD;&#xA;&#xD;&#xA;In my example, X is across, Y is up down and Z is going into the screen. I also normalize the vector and multiply it by the speed.&#xD;&#xA;Thanks" />
  <row Id="19405" PostHistoryTypeId="1" PostId="9404" RevisionGUID="f1c6b611-3e81-44b0-82bc-7ca548e085cc" CreationDate="2011-03-06T18:48:45.050" UserId="4234" Text="3d trajectory - calculate initial velocity" />
  <row Id="19406" PostHistoryTypeId="3" PostId="9404" RevisionGUID="f1c6b611-3e81-44b0-82bc-7ca548e085cc" CreationDate="2011-03-06T18:48:45.050" UserId="4234" Text="&lt;3d&gt;&lt;physics&gt;&lt;math&gt;&lt;vector&gt;" />
  <row Id="19407" PostHistoryTypeId="2" PostId="9405" RevisionGUID="cb64084c-916b-4f18-b291-ddebbc3aad29" CreationDate="2011-03-06T19:07:06.023" UserId="3175" Text="double ZAdjust = Math.Cos(XZAngle);&#xD;&#xA;initVel.X = (float)(Math.Cos(XYAngle) * ZAdjust);&#xD;&#xA;initVel.Y = (float)(Math.Sin(XYAngle) * ZAdjust);&#xD;&#xA;initVel.Z = (float)Math.Sin(XZAngle);" />
  <row Id="19408" PostHistoryTypeId="5" PostId="9405" RevisionGUID="d621fcc9-e97a-4058-a835-638bb47b7c57" CreationDate="2011-03-06T19:19:26.840" UserId="1156" Comment="added 16 characters in body" Text="    double ZAdjust = Math.Cos(XZAngle);&#xD;&#xA;    initVel.X = (float)(Math.Cos(XYAngle) * ZAdjust);&#xD;&#xA;    initVel.Y = (float)(Math.Sin(XYAngle) * ZAdjust);&#xD;&#xA;    initVel.Z = (float)Math.Sin(XZAngle);" />
  <row Id="19409" PostHistoryTypeId="2" PostId="9406" RevisionGUID="9986b05c-c618-4267-93e3-9384c5a4eda3" CreationDate="2011-03-06T19:35:07.910" UserId="4508" Text="hi i have a sphere that represent the heart textured with real pics.&#xD;&#xA;it's rotating along x axis, and when user click down it has to show me the exact place he clicked on.&#xD;&#xA;Fo example he clicked on singapore and the system shoud be able to:&#xD;&#xA;&#xD;&#xA; - understand that user clicked on sphere (ok, i'll do it with unProject)&#xD;&#xA; - understand where user clicked on the sphere (ray-sphere collision?) and take in count the rotation&#xD;&#xA; - transform sphere-coordinate to some coordinate system good for some web-api service &#xD;&#xA; - ask to api (ok, this is the simpler thing for me ;-)&#xD;&#xA;&#xD;&#xA;some advice?&#xD;&#xA;" />
  <row Id="19410" PostHistoryTypeId="1" PostId="9406" RevisionGUID="9986b05c-c618-4267-93e3-9384c5a4eda3" CreationDate="2011-03-06T19:35:07.910" UserId="4508" Text="exact point oh a rotating sphere" />
  <row Id="19411" PostHistoryTypeId="3" PostId="9406" RevisionGUID="9986b05c-c618-4267-93e3-9384c5a4eda3" CreationDate="2011-03-06T19:35:07.910" UserId="4508" Text="&lt;geometry&gt;" />
  <row Id="19412" PostHistoryTypeId="25" PostId="9399" RevisionGUID="3c93ca4e-c359-4391-9bea-9c2788694cad" CreationDate="2011-03-06T20:23:13.107" Comment="http://twitter.com/#!/StackGameDev/status/44493251734024192" />
  <row Id="19413" PostHistoryTypeId="2" PostId="9407" RevisionGUID="76d89e2d-c859-46c2-9186-0d140694b084" CreationDate="2011-03-06T20:23:25.913" UserId="5907" Text="How is it possible with the standart Java2D engine to use small sprites like grafik objects?&#xD;&#xA;For those who dont know what i mean, in all those Flashgames like on Facebook they put small sprites on the screen wich react to mouseover and clicks. I tried to realize the same in Java but cant find a good method. Using Swing components they allways spread over the while bitmap file, but i only want to get a reaction from the object when the mouse is ofer a pixel thats not transparent.&#xD;&#xA;Short of checking every time if the object is below the mouse and if the mouseposition contains a transparent pixel or not (wich i believe could be prety intense in a gameloop or repaint loop) i have no idea how to implement such a thing." />
  <row Id="19414" PostHistoryTypeId="1" PostId="9407" RevisionGUID="76d89e2d-c859-46c2-9186-0d140694b084" CreationDate="2011-03-06T20:23:25.913" UserId="5907" Text="Java grafik objects like in Flashgames" />
  <row Id="19415" PostHistoryTypeId="3" PostId="9407" RevisionGUID="76d89e2d-c859-46c2-9186-0d140694b084" CreationDate="2011-03-06T20:23:25.913" UserId="5907" Text="&lt;java&gt;" />
  <row Id="19416" PostHistoryTypeId="5" PostId="9407" RevisionGUID="651bfc95-ce1a-41ba-bd48-629745cf0b10" CreationDate="2011-03-06T20:51:50.497" UserId="20" Comment="fixed some grammar" Text="How is it possible (with the standard Java2D engine) to use small sprites like graphic objects?&#xD;&#xA;&#xD;&#xA;For those who don't know what I mean, in all those Flash-games like on Facebook they put small sprites on the screen which react to mouse-over and clicks. I tried to do the same in Java but can't find a good method. Swing components always spread over the whole bitmap, but I only want to get a reaction from the object when the mouse is over a pixel that's *not* transparent.&#xD;&#xA;&#xD;&#xA;So basically checking every time if the object below the mouse contains a non-transparent pixel (which i believe could be pretty intense in a gameloop or repaint loop). I have no idea how to implement such a thing efficiently." />
  <row Id="19417" PostHistoryTypeId="4" PostId="9407" RevisionGUID="651bfc95-ce1a-41ba-bd48-629745cf0b10" CreationDate="2011-03-06T20:51:50.497" UserId="20" Comment="fixed some grammar" Text="Java graphic objects as in flashgames" />
  <row Id="19418" PostHistoryTypeId="2" PostId="9408" RevisionGUID="9867a818-3fa9-459c-936b-52b8b0610f62" CreationDate="2011-03-06T21:07:24.233" UserId="5909" Text="for very fast moving line segments or large time intervals, I believe you can still get realistic behavior in a system with constant &quot;energy&quot; without very much calculation, but I have not yet found the solution, I'm curious as to what thoughts you dismissed when you went to the &quot;change in occlusion order&quot; method." />
  <row Id="19422" PostHistoryTypeId="2" PostId="9410" RevisionGUID="f7f452a8-ca45-43a1-b5b3-7779ba8eb950" CreationDate="2011-03-06T21:29:44.690" UserId="5909" Text="Ok, I think I understand your problem and you have a few options that I can think of, the best I don't want to write the code for, but I will give a metaphor for the algorithm I am suggesting. imagine your map as colored entirely black and white, where black pixels are not allowed to be collided with and white pixels are. then imagine your hero (or any character) to be a shape cut out of that map. if any of the pixels in the shape are black, then you have collision. this is similar to what the folks above were suggesting but it does not assume that your character moves on a grid (well it does, but not the same way). some things that might help you speed this up. if your character moves one pixel at a time, then you only need to check the boundary of the shape for black pixels, if he moves two pixels at a time, you need to check two pixels in etc. and if you imagine this as boolean trues and falses instead of black and white, then collision is just everything in your test space ORed together. what's nice about this method, is that since you're only testing the boundary, you can make your collision resolution really fine and the amount of checks you have to do goes up as the square root of the number of pixels, which increases pretty slowly. Some ideas for optimization are to only check a small subset of the pixels in the border of your character since this check is going to occur very often, and this is a good approximation of the whole border.&#xD;&#xA;&#xD;&#xA;another idea, you can actually do this by drawing, and then converting the color data into boolean data. &#xD;&#xA;&#xD;&#xA;hope this helps." />
  <row Id="19425" PostHistoryTypeId="25" PostId="9395" RevisionGUID="8c594fee-9476-4e7d-96e3-2d84f963d57d" CreationDate="2011-03-06T23:23:13.467" Comment="http://twitter.com/#!/StackGameDev/status/44538554088558592" />
  <row Id="19426" PostHistoryTypeId="2" PostId="9412" RevisionGUID="182dff42-a7b5-4ae4-be61-c76257054704" CreationDate="2011-03-06T23:28:56.147" UserId="5908" Text="I'm working on a new game, and its related level editor, based on Ogre3D.&#xD;&#xA;I was thinking about how i could manage the game files, knowing that Ogre use .mesh files for models, .material for materials/texture information etc... .&#xD;&#xA;At first i thought about a common .zip folder decompressed at runtime (the same way Torchlight and Ogre samples do). But this way the game assets become a monolithic archive, loading takes time, and could be difficult to eventually patch them.&#xD;&#xA;So, let's say i have a game object named &quot;Cube&quot; i want to load in my program.&#xD;&#xA;Going for modularity, what if i create a compressed file (using zlib compression routines) named Cube.extname, containing its sub-files Cube.mesh, Cube.material and so on ?&#xD;&#xA;Are there any alternatives or should i stick with compressed objects?&#xD;&#xA;&#xD;&#xA;PS: Just to clear things, the answer is unrelated to my program code, at the moment i'm using &quot;resources.cfg&quot; pointing to the OgreSDK media directory. " />
  <row Id="19427" PostHistoryTypeId="1" PostId="9412" RevisionGUID="182dff42-a7b5-4ae4-be61-c76257054704" CreationDate="2011-03-06T23:28:56.147" UserId="5908" Text="Ogre3D : seeking advices about game files management" />
  <row Id="19428" PostHistoryTypeId="3" PostId="9412" RevisionGUID="182dff42-a7b5-4ae4-be61-c76257054704" CreationDate="2011-03-06T23:28:56.147" UserId="5908" Text="&lt;ogre&gt;&lt;file&gt;&lt;compression&gt;" />
  <row Id="19429" PostHistoryTypeId="5" PostId="9406" RevisionGUID="f1be3677-4cfe-4d47-b617-72ad3dc87086" CreationDate="2011-03-06T23:57:57.903" UserId="382" Comment="corrected spelling" Text="I have a sphere that represents the heart textured with real pictures.&#xD;&#xA;It's rotating about the x axis, and when user click down it has to show me the exact place he clicked on.&#xD;&#xA;For example if he clicked on Singapore and the system should be able to:&#xD;&#xA;&#xD;&#xA; - understand that user clicked on the sphere (OK, I'll do it with unProject)&#xD;&#xA; - understand where user clicked on the sphere (ray-sphere collision?) and take into account the rotation&#xD;&#xA; - transform sphere-coordinate to some coordinate system good for some web-api service &#xD;&#xA; - ask to api (OK, this is the simpler thing for me ;-)&#xD;&#xA;&#xD;&#xA;some advice?&#xD;&#xA;" />
  <row Id="19430" PostHistoryTypeId="24" PostId="9406" RevisionGUID="f1be3677-4cfe-4d47-b617-72ad3dc87086" CreationDate="2011-03-06T23:57:57.903" Comment="Proposed by 382 approved by 51 edit id of 63" />
  <row Id="19431" PostHistoryTypeId="2" PostId="9413" RevisionGUID="8baa8469-d028-4ad8-9ed6-7083f696d545" CreationDate="2011-03-07T00:36:40.847" UserId="1929" Text="This is not a complete answer, but use MVC (model view controller) pattern to separate out your model from your view. That makes this problem two parts:&#xD;&#xA;&#xD;&#xA;- How to model a stack of tiles&#xD;&#xA;- How do display a stack of tiles" />
  <row Id="19432" PostHistoryTypeId="25" PostId="9400" RevisionGUID="89bc4dd4-39aa-4237-8ae8-9eef5c3ceb0f" CreationDate="2011-03-07T02:23:13.397" Comment="http://twitter.com/#!/StackGameDev/status/44583852362039296" />
  <row Id="19433" PostHistoryTypeId="2" PostId="9414" RevisionGUID="27f92f95-4ce9-4848-8f4f-e7c822baa38a" CreationDate="2011-03-07T02:39:24.020" UserId="1101" Text="It's not entirely clear what you're asking. It's certainly possible for there to be no explicit game loop, eg. when the operating system essentially does your loop for you, but very little changes as far as the game is concerned.&#xD;&#xA;&#xD;&#xA;  1. Instead of calling update() in an explicit loop, you could put that function in an OnIdle handler or other Idle event callback - what exactly to use for that would be platform specific. If you have no idle events provided by your OS then you could simulate these with another thread that sets a condition each time you need to update.&#xD;&#xA;  2. Instead of polling directly for input, you respond to input events and then cache any values that you later need to poll for (eg. in the update function).&#xD;&#xA;  3. Instead of rendering directly, you might have to render in an OnPaint handler or something similar.&#xD;&#xA;&#xD;&#xA;Beyond that though there's no real difference. However, I'm not convinced that's actually what you're asking, because you seem to be asking about how complex time-based actions take place in AAA games and the like.&#xD;&#xA;&#xD;&#xA;&gt; E.g. someLootItem.moveTo(inventory, someAnimatationType) and that will move from the loot box to your inventory using the specified animation type without the game developer having to worry about the implementation details of that animation.&#xD;&#xA;&#xD;&#xA;If the 'game developer' didn't have to worry about it, someone else did. Probably the same developer, earlier in the development cycle. :) Motion over time can be handled by creating an object or system to monitor that motion. Each update() call moves the item towards the destination until it arrives, at which point the motion stops.&#xD;&#xA;&#xD;&#xA;&gt; Maybe that's how &quot;real&quot; games end up working, but from reading most tutorials they seem to imply a much more granular level of control is used, but that might just be an artifact of being a tutorial.&#xD;&#xA;&#xD;&#xA;Pretty much. A much more granular level of control *is* used, and most games *do* run frame by frame, but most gameplay code won't need to take that directly into account. If I call `walkTo(14, 15)` then there is a separate system that slices that walking behaviour up over as many frames or loop iterations as takes to reach that destination. Same thing with something trivial such as `mario.jump()`. He still moves frame by frame, but there's a physics system that runs each frame which decides exactly how to move the guy. When you type mario.jump() you don't need to worry about how jumping is implemented - but *someone* had to work it out and implement it." />
  <row Id="19434" PostHistoryTypeId="2" PostId="9415" RevisionGUID="400de8a2-2187-46d2-aee2-e29c5af4bc46" CreationDate="2011-03-07T03:18:54.920" UserId="962" Text="&gt;Are there any good articles/blog posts/discussions about games without a game loop?&#xD;&#xA;&#xD;&#xA;No. Every electronic game thats some sort of updates in real time use a game loop. The Only kind of game that wouldn't really use a game loop would be txt based game that reacts to user input only.&#xD;&#xA;&#xD;&#xA;&gt; I guess what I really mean is a loop that is hidden to you.&#xD;&#xA;&#xD;&#xA;Sure, but even though it is hidden, everything applies. Flash for example has a loop for code execution, and you cannot specifically edit the main loop, you however can use different events to trigger code, or have code on the timeline which flash executes when it hits it.&#xD;&#xA;&#xD;&#xA;&gt;. E.g. someLootItem.moveTo(inventory, someAnimatationType) and that will move from the loot box to your inventory using the specified animation type without the game developer having to worry about the implementation details of that animation.&#xD;&#xA;&#xD;&#xA;That is easily doable, but the thing is, someone has to set up that Method and set up the animation. **Game Development is not magic.**" />
  <row Id="19435" PostHistoryTypeId="2" PostId="9416" RevisionGUID="3238aa76-d36c-4ebd-b2f3-b8f9b6c31f52" CreationDate="2011-03-07T04:47:54.343" UserId="1198" Text="I agree with @Omnion. Use the list approach, but keep it sorted if performance is a problem. That is to say use a hybrid approach. Use the list as your third dimension , but only identify the first 5 items as a specific type, and anything after that is an ink own type, or a type that won't require checking multiple times per frame." />
  <row Id="19436" PostHistoryTypeId="5" PostId="9391" RevisionGUID="20dacc7a-3e65-456a-b141-d3ee91a09b4c" CreationDate="2011-03-07T05:05:35.160" UserId="5006" Comment="added 2024 characters in body; edited title" Text="Most game development happens with a main game loop.  Are there any good articles/blog posts/discussions about games without a game loop?  I imagine they'd mostly be web games, but I'd be interested in hearing otherwise.&#xD;&#xA;&#xD;&#xA;(As a side note, I think it's really interesting that the concept is **almost** exclusively used in gaming as far as I'm aware, perhaps that may be another question.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;I realize there's probably a redraw loop somewhere.  I guess what I really mean is a loop that is hidden to you.  Frames are something you as the developer are not concerned with as you're working on a higher level of abstraction.  E.g. `someLootItem.moveTo(inventory, someAnimatationType)` and that will move from the loot box to your inventory using the specified animation type without the game developer having to worry about the implementation details of that animation.  &#xD;&#xA;&#xD;&#xA;Maybe that's how &quot;real&quot; games end up working, but from reading most tutorials they seem to imply a much more granular level of control is used, but that might just be an artifact of being a tutorial.&#xD;&#xA;&#xD;&#xA;Edit2:&#xD;&#xA;I think most people are misunderstanding what I'm trying to ask, likely because I'm having trouble describing exactly what I'm trying to ask.  After some more thinking perhaps what I'm referring to is more along the lines of what I believe is referred to as &quot;scripting&quot; where you're working at a very high level and having some game engine take care of the low level details.&#xD;&#xA;&#xD;&#xA;For example, take custom maps in Starcraft II or Warcraft III.  Many of the &quot;maps&quot; have gameplay that deviates enough from the primary game that they could be considered a separate game written on the same engine.  What I'm referring to then is along those lines.  I may be wrong because I only dabbed in the Warcraft III editor, but as far as I remember no where in the map editor do you control the game loop, and yet you can create many different games out of it.  In my mind, these are games in their own right.  If you're playing DotA you don't say you're playing Warcraft III, you say you're playing DotA because that's the actual game you're playing.&#xD;&#xA;&#xD;&#xA;Such a system may impose limitations that don't exist if you're creating a game from scratch, but it greatly reduces development time because much of the &quot;hard&quot; work has already been done for you.&#xD;&#xA;&#xD;&#xA;Hopefully that clarifies what I'm asking.  Another example of what is I mean, is when you write a web app, of course it communicates through sockets and TCP.  But does the average web developer doesn't explicitly write code for connecting sockets.  They just need to know about receiving a request and sending a response.  There are unique scenarios where you do occasionally need to use raw sockets, but it's generally rare in web development.  &#xD;&#xA;&#xD;&#xA;In a similar fashion, it's very possible to write a game without directly using the game loop, even though one is used behind the scenes.  Probably not a AAA title, but there must be hundreds of smaller scale games that can and possibly are written this way.  Are there any good resources on writing these &quot;simpler&quot; games?" />
  <row Id="19437" PostHistoryTypeId="4" PostId="9391" RevisionGUID="20dacc7a-3e65-456a-b141-d3ee91a09b4c" CreationDate="2011-03-07T05:05:35.160" UserId="5006" Comment="added 2024 characters in body; edited title" Text="Games development with a game loop that's abstracted away" />
  <row Id="19438" PostHistoryTypeId="25" PostId="9403" RevisionGUID="8b6b8912-8e61-49b4-bb20-a7dd71c8928a" CreationDate="2011-03-07T05:23:13.313" Comment="http://twitter.com/#!/StackGameDev/status/44629151289835521" />
  <row Id="19439" PostHistoryTypeId="2" PostId="9417" RevisionGUID="484d2985-1757-4896-8c8e-51db8765ed9c" CreationDate="2011-03-07T05:43:36.630" UserId="5919" Text="Hey everyone I have this game that i am making in android and I have a touch screen joystick that moves the player around based on the joysticks position.  I cant figure out how to also get the player to rotate at the same angle of the joystick.  so when the joystick is to the left the players bitmap is rotated to the left as well.  Maybe someone here has some sample code I could look at here is the joysticks class that I am using.  `public class GameControls implements OnTouchListener {&#xD;&#xA;&#xD;&#xA;	public float initx =  DroidzActivity.screenWidth - 45;   //255; // 320 og 425&#xD;&#xA;	public float inity = DroidzActivity.screenHeight - 45;//425; // 480 og 267&#xD;&#xA;	public Point _touchingPoint = new Point( DroidzActivity.screenWidth - 45, DroidzActivity.screenHeight - 45);&#xD;&#xA;	public Point _pointerPosition = new Point(DroidzActivity.screenWidth - 100, DroidzActivity.screenHeight - 100); // ogx 220 ogy 150&#xD;&#xA;	private Boolean _dragging = false;&#xD;&#xA;	private boolean attackMode = false;&#xD;&#xA;&#xD;&#xA;	@Override&#xD;&#xA;	public boolean onTouch(View v, MotionEvent event) {&#xD;&#xA;&#xD;&#xA;		update(event);&#xD;&#xA;		return true;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	private MotionEvent lastEvent;&#xD;&#xA;	public boolean ControlDragged;&#xD;&#xA;	private static double angle;&#xD;&#xA;&#xD;&#xA;	public void update(MotionEvent event) {&#xD;&#xA;		if (event == null &amp;&amp; lastEvent == null) {&#xD;&#xA;			return;&#xD;&#xA;		} else if (event == null &amp;&amp; lastEvent != null) {&#xD;&#xA;			event = lastEvent;&#xD;&#xA;		} else {&#xD;&#xA;			lastEvent = event;&#xD;&#xA;		}&#xD;&#xA;		// drag drop&#xD;&#xA;		if (event.getAction() == MotionEvent.ACTION_DOWN) {&#xD;&#xA;			if ((int) event.getX() &gt; 0 &amp;&amp; (int) event.getX() &lt; 50&#xD;&#xA;					&amp;&amp; (int) event.getY() &gt; DroidzActivity.screenHeight - 160&#xD;&#xA;					&amp;&amp; (int) event.getY() &lt; DroidzActivity.screenHeight - 0) {&#xD;&#xA;				setAttackMode(true);&#xD;&#xA;			} else {&#xD;&#xA;				_dragging = true;&#xD;&#xA;			}&#xD;&#xA;		} else if (event.getAction() == MotionEvent.ACTION_UP) {&#xD;&#xA;			if(isAttackMode()){&#xD;&#xA;				setAttackMode(false);&#xD;&#xA;			}&#xD;&#xA;			_dragging = false;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if (_dragging) {&#xD;&#xA;			ControlDragged = true;&#xD;&#xA;			// get the pos&#xD;&#xA;			_touchingPoint.x = (int) event.getX();&#xD;&#xA;			_touchingPoint.y = (int) event.getY();&#xD;&#xA;		//	Log.d(&quot;GameControls&quot;, &quot;x = &quot; + _touchingPoint.x + &quot; y = &quot;&#xD;&#xA;					//+ _touchingPoint.y);&#xD;&#xA;			// bound to a box&#xD;&#xA;			if (_touchingPoint.x &lt; DroidzActivity.screenWidth - 75) { // og 400&#xD;&#xA;				_touchingPoint.x = DroidzActivity.screenWidth - 75;&#xD;&#xA;			}&#xD;&#xA;			if (_touchingPoint.x &gt; DroidzActivity.screenWidth - 15) {// og 450&#xD;&#xA;				_touchingPoint.x = DroidzActivity.screenWidth - 15;&#xD;&#xA;			}&#xD;&#xA;			if (_touchingPoint.y &lt; DroidzActivity.screenHeight - 75) {// og 240&#xD;&#xA;				_touchingPoint.y = DroidzActivity.screenHeight - 75;&#xD;&#xA;			}&#xD;&#xA;			if (_touchingPoint.y &gt; DroidzActivity.screenHeight - 15) {// og 290&#xD;&#xA;				_touchingPoint.y = DroidzActivity.screenHeight - 15;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			// get the angle&#xD;&#xA;			 setAngle(Math.atan2(_touchingPoint.y - inity,&#xD;&#xA;					_touchingPoint.x - initx) / (Math.PI / 180));&#xD;&#xA;&#xD;&#xA;			// Move the ninja in proportion to how far&#xD;&#xA;			// the joystick is dragged from its center&#xD;&#xA;			_pointerPosition.y += Math.sin(getAngle() * (Math.PI / 180))&#xD;&#xA;					* (_touchingPoint.x / 70); // og 180 70&#xD;&#xA;			_pointerPosition.x += Math.cos(getAngle() * (Math.PI / 180))&#xD;&#xA;					* (_touchingPoint.x / 70);&#xD;&#xA;			// make the pointer go thru&#xD;&#xA;			if (_pointerPosition.x &gt; DroidzActivity.screenWidth) {&#xD;&#xA;				_pointerPosition.x = 0;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if (_pointerPosition.x &lt; 0) {&#xD;&#xA;				_pointerPosition.x = DroidzActivity.screenWidth;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if (_pointerPosition.y &gt; DroidzActivity.screenHeight) {&#xD;&#xA;				_pointerPosition.y = 0;&#xD;&#xA;			}&#xD;&#xA;			if (_pointerPosition.y &lt; 0) {&#xD;&#xA;				_pointerPosition.y = DroidzActivity.screenHeight;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;		} else if (!_dragging) {&#xD;&#xA;			ControlDragged = false;&#xD;&#xA;			// Snap back to center when the joystick is released&#xD;&#xA;			_touchingPoint.x = (int) initx;&#xD;&#xA;			_touchingPoint.y = (int) inity;&#xD;&#xA;			// shaft.alpha = 0;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setAttackMode(boolean attackMode) {&#xD;&#xA;		this.attackMode = attackMode;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public boolean isAttackMode() {&#xD;&#xA;		return attackMode;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setAngle(double angle) {&#xD;&#xA;		this.angle = angle;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public static double getAngle() {&#xD;&#xA;		return angle;&#xD;&#xA;	}&#xD;&#xA;}`  I should also note that the player has animations based on when he is moving or attacking." />
  <row Id="19440" PostHistoryTypeId="1" PostId="9417" RevisionGUID="484d2985-1757-4896-8c8e-51db8765ed9c" CreationDate="2011-03-07T05:43:36.630" UserId="5919" Text="rotate player based off of joystick" />
  <row Id="19441" PostHistoryTypeId="3" PostId="9417" RevisionGUID="484d2985-1757-4896-8c8e-51db8765ed9c" CreationDate="2011-03-07T05:43:36.630" UserId="5919" Text="&lt;android&gt;&lt;rotation&gt;&lt;joystick&gt;" />
  <row Id="19442" PostHistoryTypeId="2" PostId="9418" RevisionGUID="1b59d7bf-a5df-4b20-8d0d-4242d1f8549b" CreationDate="2011-03-07T05:48:16.090" UserId="5705" Text="I've come across this a couple of times. That flash game development is not 'proper' game development when compared to XNA or even Unity. Mentioned here: &#xD;&#xA;http://gamedev.stackexchange.com/questions/9377/need-guidelines-for-studying-game-development&#xD;&#xA;&#xD;&#xA;Also here in some comments : http://gamedev.stackexchange.com/questions/9292/where-to-start-with-game-development&#xD;&#xA;&#xD;&#xA;This judgement also befalls java, according to some. Is it because in flash its so easy to draw graphics and to import and add on to the stage any element we want and also because flash needs a 'container program' to run and others don't? &#xD;&#xA;&#xD;&#xA;But flash is by far way easier to 'distribute' than any other of those mentioned above. Maybe except for iphone or android games." />
  <row Id="19443" PostHistoryTypeId="1" PostId="9418" RevisionGUID="1b59d7bf-a5df-4b20-8d0d-4242d1f8549b" CreationDate="2011-03-07T05:48:16.090" UserId="5705" Text="Is flash game development not considered 'proper' game development?" />
  <row Id="19444" PostHistoryTypeId="3" PostId="9418" RevisionGUID="1b59d7bf-a5df-4b20-8d0d-4242d1f8549b" CreationDate="2011-03-07T05:48:16.090" UserId="5705" Text="&lt;flash&gt;" />
  <row Id="19445" PostHistoryTypeId="2" PostId="9419" RevisionGUID="7b27313f-f050-412c-bdd0-c750e535b298" CreationDate="2011-03-07T08:21:39.633" UserId="51" Text="Some people, when presented with the phrase &quot;game development&quot;, assume AAA games.  Maybe even to the point of thinking console games.  And any other kinds of game making isn't worth studying or putting effort towards.&#xD;&#xA;&#xD;&#xA;Of course this is a false dichotomy.  Granted, there are very different skill sets and resources required to actually produce flash games vs. console games, but the fundamentals are the same.  &#xD;&#xA;&#xD;&#xA;Related: http://www.gamasutra.com/view/news/33363/GDC_2011_Social_Game_Developers_Direct_Their_Rage_Outward_Inward.php" />
  <row Id="19446" PostHistoryTypeId="25" PostId="9418" RevisionGUID="019c8320-c42e-47a1-9328-6249448b85d5" CreationDate="2011-03-07T08:23:13.487" Comment="http://twitter.com/#!/StackGameDev/status/44674449680769024" />
  <row Id="19447" PostHistoryTypeId="2" PostId="9420" RevisionGUID="87c844c1-db78-4ab4-a938-df3ba1913fb7" CreationDate="2011-03-07T08:48:19.780" UserId="4129" Text="Your approach looks good.  Some links for each step, assuming OpenGL:&#xD;&#xA;&#xD;&#xA; 1. [`gluUnproject`][1] the x,y of the click (flipping the y if necessary; screen coordinates for clicks are typically 0,0 is top-left of screen, whereas OpenGL 0,0 is bottom-left) for near (`0.0`) and far (`1.0`).  This gives you a line segment which is the ray projecting from your mouse cursor through the scene. (`gluUnproject` is deprecated, so you might want to copy-n-paste it into your code from [here][2].)&#xD;&#xA;&#xD;&#xA; 2. find [line-sphere intersection][3] code e.g. from [this excellent page][4].&#xD;&#xA;&#xD;&#xA; 3. inverse the rotation of the nearest intersection point to account for the sphere's rotation e.g. adapt [this][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml&#xD;&#xA;  [2]: http://www.opengl.org/wiki/GluProject_and_gluUnProject_code&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Line%E2%80%93sphere_intersection&#xD;&#xA;  [4]: http://www.realtimerendering.com/intersections.html&#xD;&#xA;  [5]: http://www.euclideanspace.com/maths/geometry/affine/aroundPoint/index.htm" />
  <row Id="19448" PostHistoryTypeId="2" PostId="9421" RevisionGUID="c617fefb-200a-4fb8-8db3-76e899bfe238" CreationDate="2011-03-07T08:58:31.020" UserId="20" Text="You can use the [atan2][1] function to get the rotation for your sprite. Just plug in the `x` and `y` offsets of your joystick (from the center of the joystick) and you'll get the angle in [radians][2]. The rotation will start at the 3 o'clock position, so if your sprite is normally pointing upwards (12 o'clock), you'll have to subtract 90 degree (or `π/2` radians).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Atan2&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Radians" />
  <row Id="19449" PostHistoryTypeId="2" PostId="9422" RevisionGUID="3218ff69-a0ff-434f-b563-a9b76ecdc816" CreationDate="2011-03-07T09:28:07.250" UserId="5837" Text="I want create online game with python, is there any framework or library to make easy many work?&#xD;&#xA;some thing define in this framework, like health or other things " />
  <row Id="19450" PostHistoryTypeId="1" PostId="9422" RevisionGUID="3218ff69-a0ff-434f-b563-a9b76ecdc816" CreationDate="2011-03-07T09:28:07.250" UserId="5837" Text="what is best online game framework ( library ) in python?" />
  <row Id="19451" PostHistoryTypeId="3" PostId="9422" RevisionGUID="3218ff69-a0ff-434f-b563-a9b76ecdc816" CreationDate="2011-03-07T09:28:07.250" UserId="5837" Text="&lt;engine&gt;&lt;python&gt;&lt;framework&gt;" />
  <row Id="19452" PostHistoryTypeId="5" PostId="9306" RevisionGUID="a4f401c2-c71a-47e8-ae51-714daa85c79d" CreationDate="2011-03-07T09:34:22.533" UserId="5860" Comment="added 4 characters in body" Text="My C++ turn-based game server (which uses database) does not stand against current average amount of clients (players), so I want to expand it to multiple (more then one) amount of computers and databases where all clients still will remain within single game world (servers will must communicate with each other and use multiple databases).&#xD;&#xA;&#xD;&#xA;Is there some tutorials/books/common standards which explain how to do it in a best way?&#xD;&#xA;" />
  <row Id="19453" PostHistoryTypeId="2" PostId="9423" RevisionGUID="5e3812f5-eacd-4e76-adfe-74ed01d059fd" CreationDate="2011-03-07T09:43:02.667" UserId="3599" Text="I've been involved in flash game creation, and it's absolutely pure game development, if done well. It has larger user base than each of the other platforms mentioned, so I would care mostly about that.&#xD;&#xA;&#xD;&#xA;&gt; This judgement also befalls java,&#xD;&#xA;&gt; according to some. Is it because in&#xD;&#xA;&gt; flash its so easy to draw graphics and&#xD;&#xA;&gt; to import and add on to the stage any&#xD;&#xA;&gt; element we want and also because flash&#xD;&#xA;&gt; needs a 'container program' to run and&#xD;&#xA;&gt; others don't?&#xD;&#xA;&#xD;&#xA;When I have worked in a team developing flash games, we did it using solely AS3 programming, the graphics production had a custom pipeline, as happens in several developments out there(so, no import into stage, and not even using the &quot;standard way&quot; of doing flash...). The result was quite eficient in performance, although if there is a difference, is indeed that matter: performance in the flash player plugin is very far from what you get by doing native binaries with other languages. Also, it's clearly something initially started/thought for just multimedia content addition, not for games from start, and suffers a lot from that. But actually, this makes developers work even harder, so saying doing flash games is not making real games, or not &quot;the real thing&quot;, etc...That would far from true.&#xD;&#xA;&#xD;&#xA;Anyway, the average earning with those games, can be way lower than getting a publishing deal in console games, etc. (unless being very lucky) And it's getting crowded. &#xD;&#xA;&#xD;&#xA;It'd be also false the same statement said about java (being it not 'propper' game development,e tc). It's more about how you deal with it, market considerations, etc.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19454" PostHistoryTypeId="5" PostId="9423" RevisionGUID="6f58e64b-6a7f-4855-95be-cb43fe5a0633" CreationDate="2011-03-07T09:48:49.510" UserId="3599" Comment="added 33 characters in body" Text="I've been involved in flash game creation, and it's absolutely pure game development, if done well. It has larger user base than each of the other platforms mentioned, so I would care mostly about that.&#xD;&#xA;&#xD;&#xA;&gt; This judgement also befalls java,&#xD;&#xA;&gt; according to some. Is it because in&#xD;&#xA;&gt; flash its so easy to draw graphics and&#xD;&#xA;&gt; to import and add on to the stage any&#xD;&#xA;&gt; element we want and also because flash&#xD;&#xA;&gt; needs a 'container program' to run and&#xD;&#xA;&gt; others don't?&#xD;&#xA;&#xD;&#xA;When I have worked in a team developing flash games, we did it using solely AS3 programming, the graphics production had a custom pipeline(we did not use the Flash editor), as happens in several developments out there(so, no import into stage, and not even using the &quot;standard way&quot; of doing flash...). The result was quite eficient in performance, although if there is a difference, is indeed that matter: performance in the flash player plugin is very far from what you get by doing native binaries with other languages. Also, it's clearly something initially started/thought for just multimedia content addition, not for games from start, and suffers a lot from that. But actually, this makes developers work even harder, so saying doing flash games is not making real games, or not &quot;the real thing&quot;, etc...That would far from true.&#xD;&#xA;&#xD;&#xA;Anyway, the average earning with those games, can be way lower than getting a publishing deal in console games, etc. (unless being very lucky) And it's getting crowded. &#xD;&#xA;&#xD;&#xA;It'd be also false the same statement said about java (being it not 'propper' game development,e tc). It's more about how you deal with it, market considerations, etc.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19455" PostHistoryTypeId="5" PostId="9417" RevisionGUID="a0c6d38a-9afe-4a36-a13f-6be9a86660f1" CreationDate="2011-03-07T10:19:49.297" UserId="5919" Comment="added 1417 characters in body" Text="Hey everyone I have this game that i am making in android and I have a touch screen joystick that moves the player around based on the joysticks position.  I cant figure out how to also get the player to rotate at the same angle of the joystick.  so when the joystick is to the left the players bitmap is rotated to the left as well.  Maybe someone here has some sample code I could look at here is the joysticks class that I am using.  `public class GameControls implements OnTouchListener {&#xD;&#xA;&#xD;&#xA;	public float initx =  DroidzActivity.screenWidth - 45;   //255; // 320 og 425&#xD;&#xA;	public float inity = DroidzActivity.screenHeight - 45;//425; // 480 og 267&#xD;&#xA;	public Point _touchingPoint = new Point( DroidzActivity.screenWidth - 45, DroidzActivity.screenHeight - 45);&#xD;&#xA;	public Point _pointerPosition = new Point(DroidzActivity.screenWidth - 100, DroidzActivity.screenHeight - 100); // ogx 220 ogy 150&#xD;&#xA;	private Boolean _dragging = false;&#xD;&#xA;	private boolean attackMode = false;&#xD;&#xA;&#xD;&#xA;	@Override&#xD;&#xA;	public boolean onTouch(View v, MotionEvent event) {&#xD;&#xA;&#xD;&#xA;		update(event);&#xD;&#xA;		return true;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	private MotionEvent lastEvent;&#xD;&#xA;	public boolean ControlDragged;&#xD;&#xA;	private static double angle;&#xD;&#xA;&#xD;&#xA;	public void update(MotionEvent event) {&#xD;&#xA;		if (event == null &amp;&amp; lastEvent == null) {&#xD;&#xA;			return;&#xD;&#xA;		} else if (event == null &amp;&amp; lastEvent != null) {&#xD;&#xA;			event = lastEvent;&#xD;&#xA;		} else {&#xD;&#xA;			lastEvent = event;&#xD;&#xA;		}&#xD;&#xA;		// drag drop&#xD;&#xA;		if (event.getAction() == MotionEvent.ACTION_DOWN) {&#xD;&#xA;			if ((int) event.getX() &gt; 0 &amp;&amp; (int) event.getX() &lt; 50&#xD;&#xA;					&amp;&amp; (int) event.getY() &gt; DroidzActivity.screenHeight - 160&#xD;&#xA;					&amp;&amp; (int) event.getY() &lt; DroidzActivity.screenHeight - 0) {&#xD;&#xA;				setAttackMode(true);&#xD;&#xA;			} else {&#xD;&#xA;				_dragging = true;&#xD;&#xA;			}&#xD;&#xA;		} else if (event.getAction() == MotionEvent.ACTION_UP) {&#xD;&#xA;			if(isAttackMode()){&#xD;&#xA;				setAttackMode(false);&#xD;&#xA;			}&#xD;&#xA;			_dragging = false;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if (_dragging) {&#xD;&#xA;			ControlDragged = true;&#xD;&#xA;			// get the pos&#xD;&#xA;			_touchingPoint.x = (int) event.getX();&#xD;&#xA;			_touchingPoint.y = (int) event.getY();&#xD;&#xA;		//	Log.d(&quot;GameControls&quot;, &quot;x = &quot; + _touchingPoint.x + &quot; y = &quot;&#xD;&#xA;					//+ _touchingPoint.y);&#xD;&#xA;			// bound to a box&#xD;&#xA;			if (_touchingPoint.x &lt; DroidzActivity.screenWidth - 75) { // og 400&#xD;&#xA;				_touchingPoint.x = DroidzActivity.screenWidth - 75;&#xD;&#xA;			}&#xD;&#xA;			if (_touchingPoint.x &gt; DroidzActivity.screenWidth - 15) {// og 450&#xD;&#xA;				_touchingPoint.x = DroidzActivity.screenWidth - 15;&#xD;&#xA;			}&#xD;&#xA;			if (_touchingPoint.y &lt; DroidzActivity.screenHeight - 75) {// og 240&#xD;&#xA;				_touchingPoint.y = DroidzActivity.screenHeight - 75;&#xD;&#xA;			}&#xD;&#xA;			if (_touchingPoint.y &gt; DroidzActivity.screenHeight - 15) {// og 290&#xD;&#xA;				_touchingPoint.y = DroidzActivity.screenHeight - 15;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			// get the angle&#xD;&#xA;			 setAngle(Math.atan2(_touchingPoint.y - inity,&#xD;&#xA;					_touchingPoint.x - initx) / (Math.PI / 180));&#xD;&#xA;&#xD;&#xA;			// Move the ninja in proportion to how far&#xD;&#xA;			// the joystick is dragged from its center&#xD;&#xA;			_pointerPosition.y += Math.sin(getAngle() * (Math.PI / 180))&#xD;&#xA;					* (_touchingPoint.x / 70); // og 180 70&#xD;&#xA;			_pointerPosition.x += Math.cos(getAngle() * (Math.PI / 180))&#xD;&#xA;					* (_touchingPoint.x / 70);&#xD;&#xA;			// make the pointer go thru&#xD;&#xA;			if (_pointerPosition.x &gt; DroidzActivity.screenWidth) {&#xD;&#xA;				_pointerPosition.x = 0;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if (_pointerPosition.x &lt; 0) {&#xD;&#xA;				_pointerPosition.x = DroidzActivity.screenWidth;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if (_pointerPosition.y &gt; DroidzActivity.screenHeight) {&#xD;&#xA;				_pointerPosition.y = 0;&#xD;&#xA;			}&#xD;&#xA;			if (_pointerPosition.y &lt; 0) {&#xD;&#xA;				_pointerPosition.y = DroidzActivity.screenHeight;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;		} else if (!_dragging) {&#xD;&#xA;			ControlDragged = false;&#xD;&#xA;			// Snap back to center when the joystick is released&#xD;&#xA;			_touchingPoint.x = (int) initx;&#xD;&#xA;			_touchingPoint.y = (int) inity;&#xD;&#xA;			// shaft.alpha = 0;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setAttackMode(boolean attackMode) {&#xD;&#xA;		this.attackMode = attackMode;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public boolean isAttackMode() {&#xD;&#xA;		return attackMode;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setAngle(double angle) {&#xD;&#xA;		this.angle = angle;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public static double getAngle() {&#xD;&#xA;		return angle;&#xD;&#xA;	}&#xD;&#xA;}`  I should also note that the player has animations based on when he is moving or attacking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;I got the angle and am rotating the sprite around in the correct angle however it rotates on the wrong spot.  My sprite is one giant bitmap that gets cut into four pieces and only one shown at a time to animate walking. here is the code I am using to rotate him right now. `	public void draw(Canvas canvas,int pointerX, int pointerY) {&#xD;&#xA;		 Matrix  m;&#xD;&#xA;		&#xD;&#xA;		if (setRotation){&#xD;&#xA;		//	canvas.save();&#xD;&#xA;		 m = new Matrix();&#xD;&#xA;		 m.reset();&#xD;&#xA;                // spriteWidth and spriteHeight are for just the current frame showed &#xD;&#xA;		//m.setTranslate(spriteWidth / 2, spriteHeight / 2);&#xD;&#xA;		 //get and set rotation for ninja based off of joystick&#xD;&#xA;		 m.preRotate((float) GameControls.getRotation());&#xD;&#xA;		 &#xD;&#xA;		//create the rotated bitmap&#xD;&#xA;		  flipedSprite = Bitmap.createBitmap(bitmap , 0, 0,bitmap.getWidth(),bitmap.getHeight() , m, true);&#xD;&#xA;		  //set new bitmap to rotated ninja&#xD;&#xA;		setBitmap(flipedSprite);&#xD;&#xA;		&#xD;&#xA;		setRotation = false;&#xD;&#xA;	//	canvas.restore(); &#xD;&#xA;		Log.d(&quot;Ninja View&quot;, &quot;angle of rotation= &quot; +(float) GameControls.getRotation());&#xD;&#xA;		}&#xD;&#xA;`   &#xD;&#xA;And then the draw method&#xD;&#xA;&#xD;&#xA;    // create the destination rectangle for the ninjas current animation frame&#xD;&#xA;    // pointerX and pointerY are from the joystick moving the ninja around&#xD;&#xA;	destRect = new Rect(pointerX, pointerY, pointerX + spriteWidth, pointerY + spriteHeight);&#xD;&#xA;&#xD;&#xA;     canvas.drawBitmap(bitmap, getSourceRect(), destRect, null);&#xD;&#xA;			        &#xD;&#xA;		" />
  <row Id="19456" PostHistoryTypeId="5" PostId="9406" RevisionGUID="a5b2c394-0895-4c00-8b73-e2091295c379" CreationDate="2011-03-07T11:01:22.367" UserId="5864" Comment="spelling fix for clarity + useless changes to bypass the system limit" Text="I have a sphere that represents the Earth textured with real pictures.&#xD;&#xA;It's rotating around the x axis, and when user click down it has to show me the exact place he clicked on.&#xD;&#xA;For example if he clicked on Singapore the system should be able to:&#xD;&#xA;&#xD;&#xA; - understand that user clicked on the sphere (OK, I'll do it with unProject)&#xD;&#xA; - understand where user clicked on the sphere (ray-sphere collision?) and take into account the rotation&#xD;&#xA; - transform sphere-coordinate to some coordinate system good for some web-api service &#xD;&#xA; - ask to api (OK, this is the simpler thing for me ;-)&#xD;&#xA;&#xD;&#xA;some advice?" />
  <row Id="19457" PostHistoryTypeId="24" PostId="9406" RevisionGUID="a5b2c394-0895-4c00-8b73-e2091295c379" CreationDate="2011-03-07T11:01:22.367" Comment="Proposed by 5864 approved by 4508 edit id of 64" />
  <row Id="19458" PostHistoryTypeId="2" PostId="9424" RevisionGUID="67dac522-97e3-443d-af3f-494609bdd690" CreationDate="2011-03-07T11:22:15.263" UserId="3794" Text="Will's answer is perfect until you want to do some displacement (which you want propably if simulating planet). &#xD;&#xA;&#xD;&#xA;In my opinion the color picking would be the best solution. It is fast to implement and works with o(log(n)) complexity (+ time to render). Every triangle on the sphere will have unique color. Render planet with only colors, no lighting in same resolution as screen. Get clicked point and at the same position as on the screen, check color. Find object with the color. Objects can be simply ordered (color is number) so binary search with log(n) complexity can be used.&#xD;&#xA;&#xD;&#xA;We used this simple and old fashion technique for our game [Save Us!][1] **with no performance loss**. So i can tell you, that it is suitable for realtime application. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=_GuvrorF60Q" />
  <row Id="19459" PostHistoryTypeId="25" PostId="9422" RevisionGUID="67dc6b29-982d-4be3-ae9b-c7dea2ab5d05" CreationDate="2011-03-07T11:23:13.417" Comment="http://twitter.com/#!/StackGameDev/status/44719748314972160" />
  <row Id="19460" PostHistoryTypeId="5" PostId="9424" RevisionGUID="e1694407-a44e-4cb7-b932-db1c7e9421e7" CreationDate="2011-03-07T11:29:05.647" UserId="3794" Comment="added 27 characters in body" Text="Will's answer is perfect until you want to do some displacement (which you want propably if simulating planet). &#xD;&#xA;&#xD;&#xA;In my opinion the color picking would be the best solution. It is fast to implement and works with o(log(n)) complexity (+ time to render). Every triangle on the sphere will have unique color. Render planet with only colors, no lighting in same resolution as screen. Get clicked point and at the same position as on the screen, check color. Find object with the color. Objects can be simply ordered (color is number) so binary search with log(n) complexity can be used.&#xD;&#xA;&#xD;&#xA;We used this simple and old fashion technique for our game [Save Us!][1] for geting areas on planet **with no performance loss**. So i can tell you, that it is suitable for realtime application. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=_GuvrorF60Q" />
  <row Id="19461" PostHistoryTypeId="4" PostId="9406" RevisionGUID="8bea0445-9d02-45d2-b09d-b05bd9a96599" CreationDate="2011-03-07T11:32:04.013" UserId="4508" Comment="edited title" Text="exact point on a rotating sphere" />
  <row Id="19462" PostHistoryTypeId="2" PostId="9425" RevisionGUID="bb2c8568-e4ea-4524-b77d-784e0962b037" CreationDate="2011-03-07T11:40:10.927" UserId="744" Text="There is not one. If you are interested in making online games in Python, I encourage you to look at &lt;a href=&quot;http://www.panda3d.org/&quot;&gt;Panda3D&lt;/a&gt;, which does have a networking interface. However, it is not nearly as high-level as you want - there is nothing like health or HP built into it." />
  <row Id="19463" PostHistoryTypeId="5" PostId="9422" RevisionGUID="facbf618-b840-43e0-b49e-713f4f8de167" CreationDate="2011-03-07T11:41:22.237" UserId="744" Comment="Grammar." Text="I want create online game with Python. Is there any framework or library to make it easier? I would like it if the framework provided things like character attributes, such as health." />
  <row Id="19464" PostHistoryTypeId="4" PostId="9422" RevisionGUID="facbf618-b840-43e0-b49e-713f4f8de167" CreationDate="2011-03-07T11:41:22.237" UserId="744" Comment="Grammar." Text="What is the best online game framework for Python?" />
  <row Id="19465" PostHistoryTypeId="2" PostId="9426" RevisionGUID="98fca5d1-ab36-45e7-b0c6-d82fe7cdcd63" CreationDate="2011-03-07T12:06:05.367" UserId="4129" Text="Open simple approach is [colour picking][1].&#xD;&#xA;&#xD;&#xA;Create two versions of your world map texture that you texture your sphere with.  The first is for the user to see, the second for the selection.  On the second, each country is drawn with a unique colour.&#xD;&#xA;&#xD;&#xA;When the user clicks, render the scene without lighting or other effects, and using this second colour-coded texture.  Don't swap-buffers - don't show this version to the user.  But then read the colour value using `glReadPixels` as in the article above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gpwiki.org/index.php/OpenGL_Selection_Using_Unique_Color_IDs" />
  <row Id="19466" PostHistoryTypeId="2" PostId="9427" RevisionGUID="62cabdf3-8cac-47e3-aafa-3c58952f7743" CreationDate="2011-03-07T12:32:06.670" UserId="5899" Text="You can have the assets of the game organized with any structure. Ogre only needs to know a parent directory or more ( this depends if you separate the assets to use on different nivels or to load at different times ), this information is written to the file &quot;resources.cfg&quot;.&#xD;&#xA;&#xD;&#xA;This is a valid approach, but package the files in a zip archive has some advantages:&#xD;&#xA;&#xD;&#xA;1. It's open format.&#xD;&#xA;2. The virtual files within a ZIP archive &quot;remember&quot; their relative path.&#xD;&#xA;3. ZIP archives may be compressed: less space&#xD;&#xA;4. ZIP archives are modular: useful for localization, for example.&#xD;&#xA;&#xD;&#xA;Obviously is faster decompress a large chunk of bytes that multiples small chunks. You should use streaming decompression and use a loading bar at first of a level.&#xD;&#xA;&#xD;&#xA;You can see more about Resource Managers at the book:&#xD;&#xA;&#xD;&#xA;Title: &quot;Game Engine Architecture&quot;  &#xD;&#xA;Author: Jason Gregory  &#xD;&#xA;Chapter: 6. Resources and the File System" />
  <row Id="19467" PostHistoryTypeId="2" PostId="9428" RevisionGUID="e0e9391f-73d9-4c1b-b1c6-89a63dc1fd1b" CreationDate="2011-03-07T12:39:30.903" UserId="4082" Text="I think Flash can be considered &quot;proper&quot; game development. The problem is that the barrier of entry to make Flash games is extremely lower than C++ games, so there are lots more shitty Tetris clones made in Flash than in C++.&#xD;&#xA;&#xD;&#xA;Put it another way, making shitty games in Flash is much easier than making them in C++, therefore there are tons of shitty Flash games, and that drives the average down.&#xD;&#xA;&#xD;&#xA;But (at least) since ActionScript 3.0 I'd argue it's possible to make games as complex than those in C++. As an exercise, I wrote a semi-automated C++ to AS3 converter, ported my whole ~150 KLOC C++ framework (used in many casual-AAA titles) to Flash, plus a game, and it run perfectly. That's scientific proof :)" />
  <row Id="19468" PostHistoryTypeId="2" PostId="9429" RevisionGUID="d4328f90-62ee-4f63-ba9a-a66180eff422" CreationDate="2011-03-07T13:03:37.517" UserId="2710" Text="Have a look at BigWorld ([www.bigworldtech.com][1]). It's not free, though, not even particularly cheap.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bigworldtech.com/index/index.php" />
  <row Id="19469" PostHistoryTypeId="2" PostId="9430" RevisionGUID="a52298ac-77b0-40e5-be30-0867f6b061a5" CreationDate="2011-03-07T13:57:57.873" UserId="5899" Text="What alternatives exist of how an agent can follow the path calculated by a path-finding algorithm?&#xD;&#xA;&#xD;&#xA;I've seen that the most easy form is go to one point and when the agent has reached this point, discard it and go to the next point.&#xD;&#xA;&#xD;&#xA;I think that this approach has problems when the game has physics with dynamic objects that can block the travel between point A and point B, then the agent is taken from his original trayectory and sometimes go to the last destiny point is not the most natural behavior.&#xD;&#xA;&#xD;&#xA;In the literature always I have read that the path is only a suggestion of where the agent has to go, but I don't know how this suggested path must be followed. &#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="19470" PostHistoryTypeId="1" PostId="9430" RevisionGUID="a52298ac-77b0-40e5-be30-0867f6b061a5" CreationDate="2011-03-07T13:57:57.873" UserId="5899" Text="What alternatives exist of how an agent can follow the path calculated by a path-finding algorithm?" />
  <row Id="19471" PostHistoryTypeId="3" PostId="9430" RevisionGUID="a52298ac-77b0-40e5-be30-0867f6b061a5" CreationDate="2011-03-07T13:57:57.873" UserId="5899" Text="&lt;ai&gt;&lt;path-finding&gt;" />
  <row Id="19472" PostHistoryTypeId="2" PostId="9431" RevisionGUID="8682a27b-112f-400c-9f63-2fd6ba3bfa56" CreationDate="2011-03-07T14:03:07.717" UserId="2710" Text="Did you actually _see_ this problem, or have you just thought it up? Because I fail to see how iterating over objects list has any noticeable effect on performance. You'd have to have hundreds of objects per tile for this to matter. Most games I can think of have 10, tops.&#xD;&#xA;&#xD;&#xA;If you _really_ have a problem, the best idea is to cache data, not change representation. In your example, wall configuration probably doesn't change every frame. Just cache correct sprite type, don't recalculate it constantly.&#xD;&#xA;&#xD;&#xA;If you want to make some crazy game that has lots of objects, and they change all the time, you can create different layers with different semantics. For example, wall layer contains only walls, no more than 1 per tile, and, say, decoration layer contains lists of objects that never change.&#xD;&#xA;&#xD;&#xA;Finally, if you want to have ultra-flexible architecture that ideally supports every possible game - tough luck, there's no such thing." />
  <row Id="19473" PostHistoryTypeId="5" PostId="9413" RevisionGUID="072106aa-82f3-41b9-a2b2-b2f795dbfbd2" CreationDate="2011-03-07T14:15:27.383" UserId="1929" Comment="added 1111 characters in body" Text="You said:&#xD;&#xA;&#xD;&#xA;&gt; I had was to have a 2D array of Tile objects, and then have classes inheriting from Tile that represented the game objects. Unfortunately that way I couldn't stack more game elements on the same Tile without having a 3D array.&#xD;&#xA;&#xD;&#xA;&gt; Then I did something different: I still had the 2D array of Tile objects, but every Tile object contained a List where I put and different entities. This worked fine until 20 minutes ago, when I realized that it's too expensive to do many things&#xD;&#xA;&#xD;&#xA;This is exactly the situation that you want to solve using the MVC (model view controller) pattern to separate out your model from your view. MVC makes this problem two parts:&#xD;&#xA;&#xD;&#xA;- How to model a stack of tiles&#xD;&#xA;- How do display a stack of tiles&#xD;&#xA;&#xD;&#xA;Instead of having a 2D array of tiles, or a 2D array of a list of tiles, your model would store a 2D array of game objects. Then your 2D array of tile classes will look at the corresponding game objects and decide how to render them.&#xD;&#xA;&#xD;&#xA;Instead of having a single Tile instance render a single game object, you can have a single Tile instance render something that looks like *a stack of objects.* This would be more efficient, and would give you clean separation of your core code logic, and how it looks.&#xD;&#xA;&#xD;&#xA;Just like walls. The logic is very trivial, but the rendering is more complex." />
  <row Id="19474" PostHistoryTypeId="2" PostId="9432" RevisionGUID="4df9dbc3-7230-4a4e-bbfd-a90ed5c93a5d" CreationDate="2011-03-07T14:19:44.023" UserId="5768" Text="I think that creating a drinking game with your friends, rules for skipping rocks, and making up a card game as kids are all game development. Game can have many definitions:&#xD;&#xA;&#xD;&#xA;# a contest with rules to determine a winner; &quot;you need four people to play this game&quot;&#xD;&#xA;# a single play of a sport or other contest; &quot;the game lasted two hours&quot;&#xD;&#xA;# an amusement or pastime; &quot;they played word games&quot;; &quot;he thought of his painting as a game that filled his empty time&quot;; &quot;his life was all fun and games&quot;&#xD;&#xA;&#xD;&#xA;source: http://www.google.ca/search?sclient=psy&amp;hl=en&amp;q=define%3A+game&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;pbx=1&#xD;&#xA;&#xD;&#xA;You don't have to be coding in C++ to be a game developer. Whomever invented chess was a game developer." />
  <row Id="19475" PostHistoryTypeId="25" PostId="9430" RevisionGUID="d5146db4-63e8-427f-9510-ce972ae93f5c" CreationDate="2011-03-07T14:23:13.147" Comment="http://twitter.com/#!/StackGameDev/status/44765046026412032" />
  <row Id="19476" PostHistoryTypeId="2" PostId="9433" RevisionGUID="234b2ba6-3272-424c-b1d3-71d19f7a80f7" CreationDate="2011-03-07T14:25:57.010" UserId="2778" Text="In my humble opinion, any game or whatever development is worthy as long as you find players/users to use your software.&#xD;&#xA;&#xD;&#xA;There are plenty of Flash games Internet-wide. In my point of view, Flash games stand for online games that can be played within a community, or else, simple single-player games that one can find amusing to play.&#xD;&#xA;&#xD;&#xA;As previously mentioned, the skill set isn't quite the same, and Flash addresses a need, while XNA, C++ and other game development technologies and platform address another.&#xD;&#xA;&#xD;&#xA;In the end, it all depends on what are the targeted objectives and kind of player you wish to target. To illustrate the idea, you wouldn't develop a game using Flash for the PS3 or the iPad, you would more considerably plan on using C++ and Objective-C respectively, because of the targeted platform, that is, if you target the Web or so, I suggest using Flash.&#xD;&#xA;&#xD;&#xA;I hope this grain of salt does help!" />
  <row Id="19477" PostHistoryTypeId="2" PostId="9434" RevisionGUID="74660456-f7fd-479d-9961-55aae184a680" CreationDate="2011-03-07T14:30:27.440" UserId="5253" Text="I first created a game on the iPhone and now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. Android way is to have 2 threads, one for rendering and one for updating. This due to some devices blocking when updating the hardware.&#xD;&#xA;My problem is that I am coming from the iPhone. When I transition, say from the Menu to the Game, I would stop the Animation (Rendering) and load up the next Manager (the Menu has a Manager and so has the Game). I could implement the same thing on Android, but I have noticed on game ports like Quake, don't do this - as far as I can tell.&#xD;&#xA;I have learnt that I cannot just dynamically add another Renderer class the the tree because I will probably get a dequeuing buffer error - which I believe to be a problem with the OpenGL ES side. So how is it done?" />
  <row Id="19478" PostHistoryTypeId="1" PostId="9434" RevisionGUID="74660456-f7fd-479d-9961-55aae184a680" CreationDate="2011-03-07T14:30:27.440" UserId="5253" Text="Game Code Design dor Rendering" />
  <row Id="19479" PostHistoryTypeId="3" PostId="9434" RevisionGUID="74660456-f7fd-479d-9961-55aae184a680" CreationDate="2011-03-07T14:30:27.440" UserId="5253" Text="&lt;c++&gt;&lt;android&gt;&lt;opengl-es&gt;&lt;rendering&gt;" />
  <row Id="19480" PostHistoryTypeId="5" PostId="9433" RevisionGUID="94f60d91-8fe4-44c9-8be6-b811bc38feb9" CreationDate="2011-03-07T14:31:24.117" UserId="2778" Comment="added 179 characters in body" Text="In my humble opinion, any game or whatever development is worthy as long as you find players/users to use your software.&#xD;&#xA;&#xD;&#xA;There are plenty of Flash games Internet-wide. In my point of view, Flash games stand for online games that can be played within a community, or else, simple single-player games that one can find amusing to play.&#xD;&#xA;&#xD;&#xA;As previously mentioned, the skill set isn't quite the same, and Flash addresses a need, while XNA, C++ and other game development technologies and platform address another. For instance, I wouldn't like to play Final Fantasy in using Flash, but some other perhaps more simple games, I don't know. Perhaps this could be pretty interesting nevertheless.&#xD;&#xA;&#xD;&#xA;In the end, it all depends on what are the targeted objectives and kind of player you wish to target. To illustrate the idea, you wouldn't develop a game using Flash for the PS3 or the iPad, you would more considerably plan on using C++ and Objective-C respectively, because of the targeted platform, that is, if you target the Web or so, I suggest using Flash.&#xD;&#xA;&#xD;&#xA;I hope this grain of salt does help!" />
  <row Id="19481" PostHistoryTypeId="2" PostId="9435" RevisionGUID="dfd16dd6-096b-4e0c-8083-54076cd406aa" CreationDate="2011-03-07T14:52:00.833" UserId="5925" Text="I have created a platform which currently has the below features, and I would greatly appreciate any ideas which I could implement! (I don't play a lot of games which is why I require help)&#xD;&#xA;&#xD;&#xA;     -- Walking/jumping/movement&#xD;&#xA;     -- player can shoot lasers&#xD;&#xA;     -- enemies also walk, fly, and shoot lasers&#xD;&#xA;     -- water (you can swim in this)&#xD;&#xA;     -- mud (slows you down on contact, and stops you from jumping)&#xD;&#xA;     -- ladders&#xD;&#xA;     -- damage when falling from a large height, unless diving into water&#xD;&#xA;     -- moving platforms&#xD;&#xA;     -- springboards (jumping on them shoot you into the air)&#xD;&#xA;     -- growing platforms (allow you to reach new places)&#xD;&#xA;     -- key and door system&#xD;&#xA;     -- gem and coin collection system&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19482" PostHistoryTypeId="1" PostId="9435" RevisionGUID="dfd16dd6-096b-4e0c-8083-54076cd406aa" CreationDate="2011-03-07T14:52:00.833" UserId="5925" Text="Platform game ideas" />
  <row Id="19483" PostHistoryTypeId="3" PostId="9435" RevisionGUID="dfd16dd6-096b-4e0c-8083-54076cd406aa" CreationDate="2011-03-07T14:52:00.833" UserId="5925" Text="&lt;game-design&gt;" />
  <row Id="19484" PostHistoryTypeId="2" PostId="9436" RevisionGUID="7ab281cd-96c2-43c9-9adf-7f896df548fd" CreationDate="2011-03-07T14:56:01.967" UserId="3149" Text="I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because:&#xD;&#xA;&#xD;&#xA; - Each particle is a point sprite in a single mesh and I can't use scene graph ability to sort transparent nodes. The system node should be properly sorted, though.&#xD;&#xA; - Particle position is computed on shader from initial velocity, acceleration and time. In order to sort the system I would have to perform all this computations on CPU, which is something I want to avoid.&#xD;&#xA; - Sorting hundreds of particles against camera position and uploading it on GPU each frame seams to be quiet heavy operation.&#xD;&#xA;&#xD;&#xA;Alpha testing seems to be fast enough on GLES 2.0 and works fine for non-transparent but &quot;masked&quot; textures. Still, it's not enough for semi-transparent particles.&#xD;&#xA;&#xD;&#xA;How would you handle this?" />
  <row Id="19485" PostHistoryTypeId="1" PostId="9436" RevisionGUID="7ab281cd-96c2-43c9-9adf-7f896df548fd" CreationDate="2011-03-07T14:56:01.967" UserId="3149" Text="Order independent transparency in particle system" />
  <row Id="19486" PostHistoryTypeId="3" PostId="9436" RevisionGUID="7ab281cd-96c2-43c9-9adf-7f896df548fd" CreationDate="2011-03-07T14:56:01.967" UserId="3149" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;particles&gt;&lt;transparency&gt;" />
  <row Id="19487" PostHistoryTypeId="5" PostId="9435" RevisionGUID="25a640cf-fc24-48eb-b21b-16db03a23a88" CreationDate="2011-03-07T14:57:39.103" UserId="20" Comment="minor spelling corrections" Text="I have created a platformer which currently has the features listed below. I would greatly appreciate any further ideas which I could implement! (I don't play a lot of games which is why I require help)&#xD;&#xA;&#xD;&#xA;     -- Walking/jumping/movement&#xD;&#xA;     -- player can shoot lasers&#xD;&#xA;     -- enemies also walk, fly, and shoot lasers&#xD;&#xA;     -- water (you can swim in this)&#xD;&#xA;     -- mud (slows you down on contact, and stops you from jumping)&#xD;&#xA;     -- ladders&#xD;&#xA;     -- damage when falling from a large height, unless falling into water&#xD;&#xA;     -- moving platforms&#xD;&#xA;     -- springboards (jumping on them shoot you into the air)&#xD;&#xA;     -- growing platforms (allow you to reach new places)&#xD;&#xA;     -- key and door system&#xD;&#xA;     -- gem and coin collection system&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19488" PostHistoryTypeId="4" PostId="9435" RevisionGUID="25a640cf-fc24-48eb-b21b-16db03a23a88" CreationDate="2011-03-07T14:57:39.103" UserId="20" Comment="minor spelling corrections" Text="Game ideas for a platformer" />
  <row Id="19489" PostHistoryTypeId="2" PostId="9437" RevisionGUID="9c5fa28e-a48a-4eff-9dcd-4f364d4bac96" CreationDate="2011-03-07T15:00:42.350" UserId="5908" Text="You could try a reduced bounding box.&#xD;&#xA;Let's say you have a 20x20 px sprite, with 2 px of transparency around the borders.&#xD;&#xA;Set up a 18x18 px bounding box, and check at the end of every buffer update if the mouse pointer coordinates are included in the bounding box coordinates. " />
  <row Id="19490" PostHistoryTypeId="2" PostId="9438" RevisionGUID="5e5ded57-c594-4d67-a6c6-775c71fa1047" CreationDate="2011-03-07T15:02:21.127" UserId="20" Text="Wow, that's already a huge list of features!&#xD;&#xA;&#xD;&#xA;Personally I'd probably invest the time to build some interesting levels instead of adding more features to the game.&#xD;&#xA;When designing the levels you could highlight the features of your game by making some of them a key-part of the level.. so you might have a level that introduces water or moving platforms etc. &#xD;&#xA;&#xD;&#xA;So instead of using all your features from level 1, you can introduce new features with upcoming levels which keeps the player motivated to discover new stuff as he moves on." />
  <row Id="19491" PostHistoryTypeId="2" PostId="9439" RevisionGUID="0d286ec8-282f-4f63-bc4d-3d078b6447a0" CreationDate="2011-03-07T15:02:06.947" UserId="3548" Text="D. My first post here ::- ), so please allow me to say a few things about myself. I'm a game developer, free Flash games to be exact. So far I only released 1 ( http://www.kongregate.com/games/Kyliathy/thunderbirdz ) , but I am working on a much better one ::- ). As a part of this new project, I had to tackle several math/physics problems. I managed to overcome most of them, also with some help from the online community (to which I humbly contribute with my SourceForge projects - https://sourceforge.net/users/echysttas ).&#xD;&#xA;&#xD;&#xA;So far, it's been only about math, but right now, I came across a problem which I feel belongs here in the Physics discussion ::- ).&#xD;&#xA;&#xD;&#xA;I have a Gun which fires a Projectile which has to hit an Enemy. The problem is that the Gun has to be automatic, i.e. - choose the angle in which it has to shoot so that the projectile hits the enemy dead in the center.&#xD;&#xA;&#xD;&#xA;It's been a looooong time since school, and The Physics is weak in me, but it's there ::- D. I've been thinking to somehow apply the `v = d/t` formula to find the time needed for the Projectile or Enemy to reach a certain point. But the problem is that I can't find the common point for both the Projectile and Enemy. Yes, I can find a certain point for the Projectile, and another for the Enemy, but I would need lots of tries to find where the point coincides, which is stupid. There has to be a way to link them together but I can't figure it out.&#xD;&#xA;&#xD;&#xA;I prepared some drawings and samples:&#xD;&#xA;&#xD;&#xA;A simple version of my Flash game, dumbed down to the basics, just some shapes:&#xD;&#xA;&#xD;&#xA;http://axonnsd.org/W/P001/MathSandBox.swf - click the mouse anywhere to fire a projectile.&#xD;&#xA;&#xD;&#xA;Or, here is an image which describes my problem:&#xD;&#xA;&#xD;&#xA;![An image which describes my problem][1]&#xD;&#xA;&#xD;&#xA;So... who has any ideas about how to find x3/y3 - thus leading me to find the angle in which the weapon has to tilt in order to fire a projectile to meet the enemy? ::- D.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vwPuB.jpg&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I think it would be clearer if I also mention that I know: the speed of both Enemy and Projectile and the Enemy travels on a straight vertical line." />
  <row Id="19492" PostHistoryTypeId="1" PostId="9439" RevisionGUID="0d286ec8-282f-4f63-bc4d-3d078b6447a0" CreationDate="2011-03-07T15:02:06.947" UserId="3548" Text="Find meeting point of 2 objects in 2D, knowing (constant) speed and slope" />
  <row Id="19493" PostHistoryTypeId="3" PostId="9439" RevisionGUID="0d286ec8-282f-4f63-bc4d-3d078b6447a0" CreationDate="2011-03-07T15:02:06.947" UserId="3548" Text="&lt;untagged&gt;" />
  <row Id="19494" PostHistoryTypeId="17" PostId="9439" RevisionGUID="7d96a16f-b5cc-4cd6-ab98-9ad77952c07d" CreationDate="2011-03-07T15:22:37.070" UserId="-1" Comment="from http://physics.stackexchange.com/questions/6477/find-meeting-point-of-2-objects-in-2d-knowing-constant-speed-and-slope" Text="" />
  <row Id="19495" PostHistoryTypeId="6" PostId="9439" RevisionGUID="782ae404-4375-4f69-9284-a1027af069de" CreationDate="2011-03-07T15:28:09.140" UserId="3548" Comment="edited tags" Text="&lt;2d-physics&gt;" />
  <row Id="19496" PostHistoryTypeId="5" PostId="9439" RevisionGUID="c8b05406-b6ee-42e1-bc3a-8d78629675f0" CreationDate="2011-03-07T15:30:29.840" UserId="20" Comment="removed introduction and lots of smileys. minor grammar fixes" Text="As a part of a new project, I had to tackle several math/physics problems. I managed to overcome most of them, also with some help from the online community (to which I humbly contribute with my SourceForge projects - https://sourceforge.net/users/echysttas ).&#xD;&#xA;&#xD;&#xA;I have a gun which fires a projectile which has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot so that the projectile hits the enemy dead in the center.&#xD;&#xA;&#xD;&#xA;It's been a looooong time since school, and my physics skills are a bit rusty, but they're there. I've been thinking to somehow apply the `v = d/t` formula to find the time needed for the projectile or enemy to reach a certain point. But the problem is that I can't find the common point for both the projectile and enemy. Yes, I can find a certain point for the projectile, and another for the enemy, but I would need lots of tries to find where the point coincides, which is stupid. There has to be a way to link them together but I can't figure it out.&#xD;&#xA;&#xD;&#xA;I prepared some drawings and samples:&#xD;&#xA;&#xD;&#xA;A simple version of my Flash game, dumbed down to the basics, just some shapes:&#xD;&#xA;&#xD;&#xA;http://axonnsd.org/W/P001/MathSandBox.swf - click the mouse anywhere to fire a projectile.&#xD;&#xA;&#xD;&#xA;Or, here is an image which describes my problem:&#xD;&#xA;&#xD;&#xA;![An image which describes my problem][1]&#xD;&#xA;&#xD;&#xA;So... who has any ideas about how to find x3/y3 - thus leading me to find the angle in which the weapon has to tilt in order to fire a projectile to meet the enemy?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vwPuB.jpg&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I think it would be clearer if I also mention that I know: the speed of both Enemy and Projectile and the Enemy travels on a straight vertical line." />
  <row Id="19497" PostHistoryTypeId="5" PostId="9439" RevisionGUID="80898514-ae1e-49b3-b38b-f17bc3529237" CreationDate="2011-03-07T15:35:50.663" UserId="20" Comment="removed first paragraph as it doesn't add to the question" Text="I have a gun which fires a projectile which has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot so that the projectile hits the enemy dead in the center.&#xD;&#xA;&#xD;&#xA;It's been a looooong time since school, and my physics skills are a bit rusty, but they're there. I've been thinking to somehow apply the `v = d/t` formula to find the time needed for the projectile or enemy to reach a certain point. But the problem is that I can't find the common point for both the projectile and enemy. Yes, I can find a certain point for the projectile, and another for the enemy, but I would need lots of tries to find where the point coincides, which is stupid. There has to be a way to link them together but I can't figure it out.&#xD;&#xA;&#xD;&#xA;I prepared some drawings and samples:&#xD;&#xA;&#xD;&#xA;A simple version of my Flash game, dumbed down to the basics, just some shapes:&#xD;&#xA;&#xD;&#xA;http://axonnsd.org/W/P001/MathSandBox.swf - click the mouse anywhere to fire a projectile.&#xD;&#xA;&#xD;&#xA;Or, here is an image which describes my problem:&#xD;&#xA;&#xD;&#xA;![An image which describes my problem][1]&#xD;&#xA;&#xD;&#xA;So... who has any ideas about how to find x3/y3 - thus leading me to find the angle in which the weapon has to tilt in order to fire a projectile to meet the enemy?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vwPuB.jpg&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I think it would be clearer if I also mention that I know: the speed of both Enemy and Projectile and the Enemy travels on a straight vertical line." />
  <row Id="19498" PostHistoryTypeId="5" PostId="9432" RevisionGUID="6e22a594-fc44-43c3-b096-b8b46c5b95bd" CreationDate="2011-03-07T15:42:17.770" UserId="20" Comment="was probably intended as list, not headings" Text="I think that creating a drinking game with your friends, rules for skipping rocks, and making up a card game as kids are all game development. Game can have many definitions:&#xD;&#xA;&#xD;&#xA; - a contest with rules to determine a winner; &quot;you need four people to play this game&quot;&#xD;&#xA; - a single play of a sport or other contest; &quot;the game lasted two hours&quot;&#xD;&#xA; - an amusement or pastime; &quot;they played word games&quot;; &quot;he thought of his painting as a game that filled his empty time&quot;; &quot;his life was all fun and games&quot;&#xD;&#xA;&#xD;&#xA;source: http://www.google.ca/search?sclient=psy&amp;hl=en&amp;q=define%3A+game&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;pbx=1&#xD;&#xA;&#xD;&#xA;You don't have to be coding in C++ to be a game developer. Whomever invented chess was a game developer." />
  <row Id="19500" PostHistoryTypeId="5" PostId="9434" RevisionGUID="4537b808-05a3-4adb-8d96-4c6094d265a6" CreationDate="2011-03-07T16:12:28.733" UserId="1430" Comment="added 14 characters in body; edited title" Text="I first created a game on the iPhone and I'm now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. The Android way is to have two threads, one for rendering and one for updating. This due to some devices blocking when updating the hardware.&#xD;&#xA;&#xD;&#xA;My problem is that I am coming from the iPhone. When I transition, say from the Menu to the Game, I would stop the Animation (Rendering) and load up the next Manager (the Menu has a Manager and so has the Game). I could implement the same thing on Android, but I have noticed on game ports like Quake, don't do this - as far as I can tell.&#xD;&#xA;&#xD;&#xA;I have learnt that I cannot just dynamically add another Renderer class the the tree because I will probably get a dequeuing buffer error - which I believe to be a problem with the OpenGL ES side. So how is it done?" />
  <row Id="19501" PostHistoryTypeId="4" PostId="9434" RevisionGUID="4537b808-05a3-4adb-8d96-4c6094d265a6" CreationDate="2011-03-07T16:12:28.733" UserId="1430" Comment="added 14 characters in body; edited title" Text="Game Code Design for Rendering" />
  <row Id="19502" PostHistoryTypeId="2" PostId="9440" RevisionGUID="ed6f7f4f-648e-435e-be0e-0477573b3fb8" CreationDate="2011-03-07T16:21:05.070" UserId="5927" Text="Game development is about creating an experience to the player, and the language of choice is merely one of the tools to help create that experience.&#xD;&#xA;&#xD;&#xA;In the beginning, games were coded in assembly because that was the only tool available.  Many big budget console and PC games embed flash for their UI (using Scaleform), because it's a better tool than C#/C++.&#xD;&#xA;&#xD;&#xA;To me, the &quot;proper&quot; game development is one that gets a good game shipped." />
  <row Id="19503" PostHistoryTypeId="2" PostId="9441" RevisionGUID="94f8f322-0c18-4b93-bf21-91cdb35c58e0" CreationDate="2011-03-07T16:26:15.767" UserId="5545" Text="Two suggestions.  First, you should resolve the sprite that each tile will be drawn with during the load of your tile map/level.  It should be easy enough to traverse the 2D array one your level is loaded and decide that a certian wall needs to be a **L** shape and another needs to be a **|** shape.&#xD;&#xA;&#xD;&#xA;Second, I would store static data related to a tile in a different place than active data.  So a tile object may have a list of objects which come and go from the tile but there is no need to traverse this to see if, e.g. we just want to know if the tile is walkable or not.&#xD;&#xA;&#xD;&#xA;This psudo code is more or less how I have approached a tile based system.  &#xD;&#xA;&#xD;&#xA;    Tile {&#xD;&#xA;      Texture tex;&#xD;&#xA;      //...other static data...&#xD;&#xA;      List currentObjects;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Tile t = Tiles[x][y];&#xD;&#xA;&#xD;&#xA;This assumes that there is static tiles in your game but that is a pretty good assumption in many tile based games where you are dealing with walls and the like." />
  <row Id="19504" PostHistoryTypeId="2" PostId="9442" RevisionGUID="e2a95214-86a9-4030-b50f-d08339683044" CreationDate="2011-03-07T16:42:59.677" UserId="2778" Text="I don't know about Flash technology, nor how the game is updated. Presuming that there can be an `Update()` method like the one encountered in XNA that is called from within the game loop, would it not be possible to simply calculate:&#xD;&#xA;&#xD;&#xA;1. the coordinates of your enemy's center, that is, (x2, y2) based on its current location;&#xD;&#xA;2. than the coordinates of the projectile's center (if needed) or only its boundaries;&#xD;&#xA;3. see if these both coordinates meet sometime, and if they do, this means your enemy's dead?&#xD;&#xA;&#xD;&#xA;Once again, I do not pretend that this is doable in Flash, I only try to help the best I can with what I know. As far as I know, Flash has a behind script capability. Now, to make sure a method would be called X times per second might be another story in Flash, I unfortunately can't say.&#xD;&#xA;&#xD;&#xA;I do hope this helped at least a little!" />
  <row Id="19505" PostHistoryTypeId="2" PostId="9443" RevisionGUID="b414a78a-f332-4e97-95d7-c5e97925511c" CreationDate="2011-03-07T16:56:15.963" UserId="2469" Text="You might want to read [this article][1]. I know it's related to DX11, but you may find some answers or useful info in there. There is also a few links to other discussion/articles about OIT.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yakiimo3d.com/2010/07/19/dx11-order-independent-transparency/" />
  <row Id="19506" PostHistoryTypeId="2" PostId="9444" RevisionGUID="a42f5869-9e2e-434f-8042-761cffffb4cf" CreationDate="2011-03-07T17:01:28.680" UserId="5899" Text="Box2D is designed to work with two-dimensional space. On a 2D platformer game we could describe our objects with a basis XY:&#xD;&#xA;&#xD;&#xA;    --------- X&#xD;&#xA;    |&#xD;&#xA;    |&#xD;&#xA;    |&#xD;&#xA;    Y&#xD;&#xA;&#xD;&#xA;In this game there is no depth, ok? If we want see this same game with a top view, our space need a third new dimension Z, to describe depth. What happens? Now we have three dimensions but Box2D is designed in two dimensions. &#xD;&#xA;&#xD;&#xA;The game can be visually two-dimensional, but the logic is three-dimensional in this case. ( top-view ).&#xD;&#xA;&#xD;&#xA;I think that will be better use another 3D physics library, or implement one yourself.&#xD;&#xA;&#xD;&#xA;I never have seen a top view game using Box2D and I would be very grateful if someone knows one." />
  <row Id="19507" PostHistoryTypeId="2" PostId="9445" RevisionGUID="f6f3d5da-f2c9-4484-a435-241c188bf79f" CreationDate="2011-03-07T17:04:12.893" UserId="2137" Text="I notice that some games I bought at one point asked me for my email address (to register an account of sorts), and from then on, every month, or everytime there are new games out by them, they send out mails to me.&#xD;&#xA;&#xD;&#xA;Ostensibly, it seems to be quite an effective way to keep your users in touch. But I suppose this would only work if you have a valid excuse for getting email address from the users (e.g for account setups).&#xD;&#xA;&#xD;&#xA;I was thinking of using incentives (such as bonus functionality in-game) to beg for user's emails, but after that, what is the easiest way to keep track of their email addresses, and to send them a mail? What software can do that for you easily?&#xD;&#xA;&#xD;&#xA;Also, is there web services for this? Not sure how much I'd trust web services not to harvest the mails instead though." />
  <row Id="19508" PostHistoryTypeId="1" PostId="9445" RevisionGUID="f6f3d5da-f2c9-4484-a435-241c188bf79f" CreationDate="2011-03-07T17:04:12.893" UserId="2137" Text="Easiest way to beg users for their emails and to put them on a mailing list." />
  <row Id="19509" PostHistoryTypeId="3" PostId="9445" RevisionGUID="f6f3d5da-f2c9-4484-a435-241c188bf79f" CreationDate="2011-03-07T17:04:12.893" UserId="2137" Text="&lt;marketing&gt;" />
  <row Id="19510" PostHistoryTypeId="2" PostId="9446" RevisionGUID="5a7cdbb9-4743-4853-9ae9-5fbc0cdbb800" CreationDate="2011-03-07T17:11:50.087" UserId="5899" Text="Power-ups like:   &#xD;&#xA;- invisibility  &#xD;&#xA;- run faster  &#xD;&#xA;- teletransporting  &#xD;&#xA;- invulnerability  &#xD;&#xA;&#xD;&#xA;Weapons:  &#xD;&#xA;- grenades  &#xD;&#xA;- turrets  &#xD;&#xA;- pistols  &#xD;&#xA;&#xD;&#xA;Atmospheric effects:  &#xD;&#xA;- Rain ( the laser doesn't work )  &#xD;&#xA;- Wind ( you walk slowly )  &#xD;&#xA;  &#xD;&#xA;Vehicles:  &#xD;&#xA;- cars  &#xD;&#xA;- tanks  " />
  <row Id="19511" PostHistoryTypeId="25" PostId="9435" RevisionGUID="bd7da2b2-7472-4e7a-9d2c-c24ac473e61f" CreationDate="2011-03-07T17:23:13.880" Comment="http://twitter.com/#!/StackGameDev/status/44810345541414912" />
  <row Id="19512" PostHistoryTypeId="2" PostId="9447" RevisionGUID="af09342b-b0fb-46a6-9ec0-03e0a8044e25" CreationDate="2011-03-07T17:34:09.217" UserId="5929" Text="I've got a projectile working perfectly using the code below:&#xD;&#xA;&#xD;&#xA;   `//initialised in loading screen&#xD;&#xA;    60 is the FPS`&#xD;&#xA;&#xD;&#xA;    gravity = new Vector3(0, -(float)9.81 / 60, 0);&#xD;&#xA;    //called every frame&#xD;&#xA;    projectilePosition += projectileVelocity;&#xD;&#xA;&#xD;&#xA;This seems to work fine but I've noticed in various projectile examples I've seen that the elapsedtime per update is taken into account. What's the difference between the two and how can I convert the above to take into account the elapsedtime? (I'm using XNA - do I use ElapsedTime.TotalSeconds or TotalMilliseconds)?&#xD;&#xA;&#xD;&#xA;Thanks for the help" />
  <row Id="19513" PostHistoryTypeId="1" PostId="9447" RevisionGUID="af09342b-b0fb-46a6-9ec0-03e0a8044e25" CreationDate="2011-03-07T17:34:09.217" UserId="5929" Text="Physics timestep questions" />
  <row Id="19514" PostHistoryTypeId="3" PostId="9447" RevisionGUID="af09342b-b0fb-46a6-9ec0-03e0a8044e25" CreationDate="2011-03-07T17:34:09.217" UserId="5929" Text="&lt;xna&gt;&lt;3d&gt;&lt;physics&gt;&lt;math&gt;&lt;fixed-timestep&gt;" />
  <row Id="19515" PostHistoryTypeId="5" PostId="9435" RevisionGUID="29102a14-2931-451f-8a41-ae6f470436cf" CreationDate="2011-03-07T17:38:28.297" UserId="5925" Comment="added 40 characters in body" Text="I have created a platformer which currently has the features listed below. I would greatly appreciate any further ideas which I could implement! (I don't play a lot of games which is why I require help)&#xD;&#xA;&#xD;&#xA;     -- Walking/jumping/movement&#xD;&#xA;     -- player can shoot lasers&#xD;&#xA;     -- enemies also walk, fly, and shoot lasers&#xD;&#xA;     -- water (you can swim in this)&#xD;&#xA;     -- mud (slows you down on contact, and stops you from jumping)&#xD;&#xA;     -- ladders&#xD;&#xA;     -- damage when falling from a large height, unless falling into water&#xD;&#xA;     -- moving platforms&#xD;&#xA;     -- springboards (jumping on them shoot you into the air)&#xD;&#xA;     -- growing platforms (allow you to reach new places)&#xD;&#xA;     -- key and door system&#xD;&#xA;     -- gem and coin collection system&#xD;&#xA;     -- teleporting&#xD;&#xA;     -- turrets&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19516" PostHistoryTypeId="2" PostId="9448" RevisionGUID="faaa2b45-aecf-482e-8270-7946e71c771f" CreationDate="2011-03-07T17:41:20.600" UserId="5925" Text="Link in a username to be the person's email.&#xD;&#xA;&#xD;&#xA;So a non-registered person can play the game but isn't able to save, but a registered person can. Maybe limiting the user to X levels if non-registered too, which would still give the user a taste for the game." />
  <row Id="19517" PostHistoryTypeId="5" PostId="9447" RevisionGUID="0720a3c1-7a6e-4b99-91a0-9d80e4facf9a" CreationDate="2011-03-07T17:42:03.480" UserId="5929" Comment="added 279 characters in body" Text="I've got a projectile working perfectly using the code below:&#xD;&#xA;&#xD;&#xA;   `//initialised in loading screen&#xD;&#xA;    60 is the FPS - projectilEposition and velocity are Vector3 types`&#xD;&#xA;&#xD;&#xA;    gravity = new Vector3(0, -(float)9.81 / 60, 0);&#xD;&#xA;    //called every frame&#xD;&#xA;    projectilePosition += projectileVelocity;&#xD;&#xA;&#xD;&#xA;This seems to work fine but I've noticed in various projectile examples I've seen that the elapsedtime per update is taken into account. What's the difference between the two and how can I convert the above to take into account the elapsedtime? (I'm using XNA - do I use ElapsedTime.TotalSeconds or TotalMilliseconds)?&#xD;&#xA;&#xD;&#xA;Edit: Forgot to add my attempt at using elapsedtime, which seemed to break the physics:&#xD;&#xA;&#xD;&#xA;    projectileVelocity.Y += -(float)((9.81 * gameTime.ElapsedGameTime.TotalSeconds * gameTime.ElapsedGameTime.TotalSeconds) * 0.5f);&#xD;&#xA;&#xD;&#xA;Thanks for the help" />
  <row Id="19518" PostHistoryTypeId="2" PostId="9449" RevisionGUID="bd921d47-0e9c-41dd-af4c-4976d27c70b8" CreationDate="2011-03-07T17:46:30.207" UserId="5925" Text="&gt; I know Java, C#, PHP etc.&#xD;&#xA;&#xD;&#xA;You can apply your knowledge of java to make a game, or your knowledge of C# with XNA if you want to do so." />
  <row Id="19519" PostHistoryTypeId="2" PostId="9450" RevisionGUID="96f872bf-5876-4a8f-ab86-37ce47aca92c" CreationDate="2011-03-07T17:56:52.970" UserId="4443" Text="What you are doing is actually the starting point of what quite a few physics packages do, and that is used a fixed time step for your updates. By dividing the value by 60 you are using a fixed time step. &#xD;&#xA;&#xD;&#xA;What using the elapsed time would do is allow that to happen even when you are Not running at 60fps. You would use the actual elapsed time instead of 1/60. &#xD;&#xA;&#xD;&#xA;As for the error to why your switching didn't work as expected is I believe because you are using TotalSeconds.. Which is probably the number of seconds your game has been running instead of the number of seconds since the last frame update. Aside from that it looks like " />
  <row Id="19520" PostHistoryTypeId="2" PostId="9451" RevisionGUID="70e6eef1-391e-4ad3-99f9-ad2b1877e9f6" CreationDate="2011-03-07T18:08:24.477" UserId="744" Text="I don't always agree with him or his conclusions, but &lt;a href=&quot;http://www.amazon.com/Permission-Marketing-Turning-Strangers-Customers/dp/0684856360/&quot;&gt;Seth Godin literally wrote the book on this, &lt;em&gt;Permission Marketing&lt;/em&gt;&lt;/a&gt;." />
  <row Id="19521" PostHistoryTypeId="5" PostId="9442" RevisionGUID="9823484e-3f98-424a-9bbe-2f7075364236" CreationDate="2011-03-07T18:08:24.703" UserId="2778" Comment="added 9 characters in body; deleted 1 characters in body" Text="&lt;hr&gt;I don't know about Flash technology, nor how the game is updated. Presuming that there can be an `Update()` method like the one encountered in XNA that is called from within the game loop, would it not be possible to simply calculate:&#xD;&#xA;&#xD;&#xA;1. the coordinates of your enemy's center, that is, (x2, y2) based on its current location;&#xD;&#xA;2. than the coordinates of the projectile's center (if needed) or only its boundaries;&#xD;&#xA;3. see if these both coordinates meet sometime, and if they do, this means your enemy's dead?&#xD;&#xA;&#xD;&#xA;Once again, I do not pretend that this is doable in Flash, I only try to help the best I can with what I know. As far as I know, Flash has a behind script capability. Now, to make sure a method would be called X times per second might be another story in Flash, I unfortunately can't say.&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;I do hope this helped at least a little!" />
  <row Id="19522" PostHistoryTypeId="2" PostId="9452" RevisionGUID="9bdf77f9-4a63-424b-bd52-c15061f8c2f7" CreationDate="2011-03-07T18:10:11.993" UserId="891" Text="![Path Following][1]  &#xD;&#xA;*image from http://www.red3d.com/cwr/steer/PathFollow.html*&#xD;&#xA;&#xD;&#xA;What you're looking for is actually a path following steering behavior.  The AI moves to a future point along the path instead of from one point to another.  A gray buffer around the path allows the AI to navigate within this region before the AI must steer to stay on the path.&#xD;&#xA;&#xD;&#xA;**Craig Reynold** has an excellent article on how this behavior works and implemented it in the **[Open Source OpenSteer][2]** library&#xD;&#xA;&#xD;&#xA;**[Path Following steering behavior][3]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/3o8yQ.png&#xD;&#xA;  [2]: http://opensteer.sourceforge.net/&#xD;&#xA;  [3]: http://www.red3d.com/cwr/steer/PathFollow.html" />
  <row Id="19523" PostHistoryTypeId="2" PostId="9453" RevisionGUID="3b2dac0d-fd88-461a-8b0a-fe34a060c9a5" CreationDate="2011-03-07T18:18:34.737" UserId="5932" Text="Is this a commercial game? &#xD;&#xA;&#xD;&#xA;I would say a really cool game idea would be a platformer where you battle other players, as magicians or something, and can add to the map and destroy objects on the map to hinder your opponent.&#xD;&#xA;&#xD;&#xA;Other than that, just make an rpg, they are the good ol' fallback with lot's of features =)" />
  <row Id="19524" PostHistoryTypeId="2" PostId="9454" RevisionGUID="fc7e3091-f375-4260-bb65-e629a6211173" CreationDate="2011-03-07T18:22:06.960" UserId="4496" Text="A lot depends on how movement is handled in your game.  If you want your agent to work at avoiding obstacles and such that may occur in real time separate from the original path finding, you may wish to perform a second layer of obstacle avoidance, using the next path node as the &quot;goal&quot;.  &#xD;&#xA;&#xD;&#xA;Methods for doing this are varied, from doing a short range path search to giving the agent &quot;sensors&quot; and having them react to what they notice in their immediate vicinity.  &#xD;&#xA;&#xD;&#xA;Any method you use will effect it's behavior of course and the recommendations as to what kind would be largely dependent on obstacle density, distance between nodes, and desired agent behavior." />
  <row Id="19525" PostHistoryTypeId="2" PostId="9455" RevisionGUID="f5ef42f4-3d63-4f1d-a9ce-31cee0db340e" CreationDate="2011-03-07T18:25:16.257" UserId="5933" Text="How different are both from each other besides the cover and year release? Which would you suggest to read?" />
  <row Id="19526" PostHistoryTypeId="1" PostId="9455" RevisionGUID="f5ef42f4-3d63-4f1d-a9ce-31cee0db340e" CreationDate="2011-03-07T18:25:16.257" UserId="5933" Text="Beginning C++ 'Through' Game Programming 3rd vs Beginning C++ Game Programming 2nd?" />
  <row Id="19527" PostHistoryTypeId="3" PostId="9455" RevisionGUID="f5ef42f4-3d63-4f1d-a9ce-31cee0db340e" CreationDate="2011-03-07T18:25:16.257" UserId="5933" Text="&lt;c++&gt;&lt;books&gt;" />
  <row Id="19529" PostHistoryTypeId="2" PostId="9457" RevisionGUID="a72e9d31-6855-49a2-9798-426fe9ca79a8" CreationDate="2011-03-07T18:49:32.030" UserId="1430" Text="In general I would get the latest edition of any book. Technical books go out of date quickly, so you generally want to maximize your investment (it's for this reason that I find many technical books to be poor purchases).&#xD;&#xA;&#xD;&#xA;That said, sometimes books will include some notes about the differences between previous editions in an introduction -- Amazon does not have a &quot;look inside&quot; option that I saw for the 3rd edition, but the 2nd edition does and it does *not* include such information about differences between the 1st and 2nd editions. So I'd be inclined to believe the 3rd edition will not either." />
  <row Id="19530" PostHistoryTypeId="2" PostId="9458" RevisionGUID="b14b6cf6-3686-47a0-848d-896b24d2b02e" CreationDate="2011-03-07T18:55:37.150" UserId="1742" Text="I've written a lot of the game, but it's singleplayer. Now we want to join up and play together.&#xD;&#xA;&#xD;&#xA;I want to host it like an MMO, but haven't got any personal ability to host (no static IPs or direct access to a reasonable router that will allow me to port forward) so I wondered if there were any free / very cheap hosting solutions for people developing games that need to develop their MMO side.&#xD;&#xA;&#xD;&#xA;In my case it's a world server for a 2D game where the world map can be changed by the players. So, GAE sounds expensive, as there would be quite a few updates per second (I heard they bill for data updates but not for download, but can't find refernce to billing anywhere on the FAQs)&#xD;&#xA;&#xD;&#xA;I'd prefer to be able to write the server in python as that's what the game is written in (with pygame), but C is fine, and maybe even better as it might prompt me to write some more performant world generator code ;)" />
  <row Id="19531" PostHistoryTypeId="1" PostId="9458" RevisionGUID="b14b6cf6-3686-47a0-848d-896b24d2b02e" CreationDate="2011-03-07T18:55:37.150" UserId="1742" Text="Python or C server hosting for indie development" />
  <row Id="19532" PostHistoryTypeId="3" PostId="9458" RevisionGUID="b14b6cf6-3686-47a0-848d-896b24d2b02e" CreationDate="2011-03-07T18:55:37.150" UserId="1742" Text="&lt;mmo&gt;&lt;server&gt;&lt;python&gt;&lt;hosting&gt;" />
  <row Id="19533" PostHistoryTypeId="5" PostId="9442" RevisionGUID="303cf873-55ae-4c9e-a82c-776341e53120" CreationDate="2011-03-07T18:58:23.143" UserId="2778" Comment="added 2448 characters in body" Text="&lt;strike&gt;I don't know about Flash technology, nor how the game is updated. Presuming that there can be an `Update()` method like the one encountered in XNA that is called from within the game loop, would it not be possible to simply calculate:&#xD;&#xA;&#xD;&#xA;1. the coordinates of your enemy's center, that is, (x2, y2) based on its current location;&#xD;&#xA;2. than the coordinates of the projectile's center (if needed) or only its boundaries;&#xD;&#xA;3. see if these both coordinates meet sometime, and if they do, this means your enemy's dead?&#xD;&#xA;&#xD;&#xA;Once again, I do not pretend that this is doable in Flash, I only try to help the best I can with what I know. As far as I know, Flash has a behind script capability. Now, to make sure a method would be called X times per second might be another story in Flash, I unfortunately can't say.&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;&gt;**EDIT #1**&#xD;&#xA;&#xD;&#xA;&gt;[...] the question is how to shoot so that the weapon hits it.&#xD;&#xA;&#xD;&#xA;Here's my guess:&#xD;&#xA;&#xD;&#xA;Let's take some arbitrary coordinates:&#xD;&#xA;&#xD;&#xA;    (X1, Y1) = (800, 600)&#xD;&#xA;    (X2, Y2) = (1000, 50)&#xD;&#xA;    (X3, Y3) = (X3, Y3) // Means these are to be determined.&#xD;&#xA;&#xD;&#xA;Since this was not mentioned, I extrapolated a constant speed for both the enemy and the projectile.&#xD;&#xA;&#xD;&#xA;    Enemy's speed:&#xD;&#xA;        Ve = d/t = 20 px/s&#xD;&#xA;&#xD;&#xA;    Projectile's speed:&#xD;&#xA;        Vp = d/t = 10 px/s&#xD;&#xA;&#xD;&#xA;Then, we have to determine when the projectile could reach the Y3 coordinate:&#xD;&#xA;&#xD;&#xA;    h = Y1 - Y3&#xD;&#xA;    h = 600 - 50&#xD;&#xA;    h = 550 px // This means that the projectile has to travel 550 px at 10 px/s to reach Y3&#xD;&#xA;&#xD;&#xA;In how much time will the projectile reach Y3?&#xD;&#xA;&#xD;&#xA;    t = 10 px/s * 550 px&#xD;&#xA;    t = 550 px / 10 px&#xD;&#xA;    t = 55 s // Then, 55s is required for the projectile to reach Y3&#xD;&#xA;&#xD;&#xA;Now, where will the enemy be in 55 seconds?&#xD;&#xA;&#xD;&#xA;    Ve = d/t = d/55s&#xD;&#xA;    20px/s = d/55s&#xD;&#xA;    d = 20px * 55s&#xD;&#xA;    d = 1100 px&#xD;&#xA;&#xD;&#xA;Now, we can determine X3 with the following formula:&#xD;&#xA;&#xD;&#xA;    X3 = X2 - d&#xD;&#xA;    X3 = 1000 - 1100&#xD;&#xA;    X3 = -100 // Remember, these are arbitrary coordinates&#xD;&#xA;&#xD;&#xA;`X3` would then be outside the visible area in this example, which doesn't matter here since the Cartesian plan includes negative coordinates. What matters most is that from this (X3,Y3) coordinate, we'll be able to find the required angle.&#xD;&#xA;&#xD;&#xA;We can now determine the size of a new right-triangle following these coordinates:&#xD;&#xA;&#xD;&#xA;    (X3, Y3) = (-100, 50)&#xD;&#xA;    (X1, Y1) = (800, 600)&#xD;&#xA;    (X3, Y1) = (-100, 600)&#xD;&#xA;&#xD;&#xA;Which allows us to find out the distance on X that the projectile needs to travel:&#xD;&#xA;&#xD;&#xA;    d = X1 - X3&#xD;&#xA;    d = 800 - (-100)&#xD;&#xA;    d = 800 + 100&#xD;&#xA;    d = 900 px&#xD;&#xA;&#xD;&#xA;And we already know the height that the projectile needs to travel on Y which is 550px. Then, we can calculate the hypotenuse according to pytaghorian theory.&#xD;&#xA;&#xD;&#xA;    sqr(a) + sqr(b) = sqr(c) // Where sqr(c) represents the sqr(hypotenuse)&#xD;&#xA;    sqr(c) = sqr(900) + sqr(550)&#xD;&#xA;    sqr(c) = 810,000 + 302,500&#xD;&#xA;    sqr(c) = 1,112,500&#xD;&#xA;    c = sqrt(1,112,500)&#xD;&#xA;    c = 1,054.75116 (rounded value)&#xD;&#xA;&#xD;&#xA;Then, we can now find the cos(A), where A is the angle which we're looking for.&#xD;&#xA;&#xD;&#xA;    cos(A) = adjacent side / hypotenuse&#xD;&#xA;    cos(A) = 900 / 1,054.75116&#xD;&#xA;    cos(A) = 0.853282 (rounded value)&#xD;&#xA;&#xD;&#xA;From cos(A) we can now determine angle A:&#xD;&#xA;&#xD;&#xA;    A = cos-1(cos(A))&#xD;&#xA;    A = cos-1(0.853282)&#xD;&#xA;    A = 31.42956561 (rounded value)&#xD;&#xA;&#xD;&#xA;I do hope this helped at least a little!" />
  <row Id="19534" PostHistoryTypeId="2" PostId="9459" RevisionGUID="7ada7680-e0ab-43cb-8b99-b3cb33fef50c" CreationDate="2011-03-07T19:10:59.100" UserId="1198" Text="You might want to look into getting an [EC2][1] instance (Micro) -- you can run basically whatever you want on them, so writing python shouldn't be a problem.&#xD;&#xA;&#xD;&#xA;The smallest Linux instance is $0.02/hr as I recall, so it shouldn't run you all that much.&#xD;&#xA;&#xD;&#xA;However, I would build and test your server code on a LAN, and only once that is working well would I start looking for external hosting options. No need to pay for an Internet server, until you have something to actually test.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aws.amazon.com/ec2/#pricing" />
  <row Id="19535" PostHistoryTypeId="5" PostId="9442" RevisionGUID="acc27b6e-ee86-4c48-b0b7-13863518d088" CreationDate="2011-03-07T19:13:48.210" UserId="2778" Comment="added 348 characters in body" Text="&lt;strike&gt;I don't know about Flash technology, nor how the game is updated. Presuming that there can be an `Update()` method like the one encountered in XNA that is called from within the game loop, would it not be possible to simply calculate:&#xD;&#xA;&#xD;&#xA;1. the coordinates of your enemy's center, that is, (x2, y2) based on its current location;&#xD;&#xA;2. than the coordinates of the projectile's center (if needed) or only its boundaries;&#xD;&#xA;3. see if these both coordinates meet sometime, and if they do, this means your enemy's dead?&#xD;&#xA;&#xD;&#xA;Once again, I do not pretend that this is doable in Flash, I only try to help the best I can with what I know. As far as I know, Flash has a behind script capability. Now, to make sure a method would be called X times per second might be another story in Flash, I unfortunately can't say.&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;&gt;**EDIT #1**&#xD;&#xA;&#xD;&#xA;&gt;[...] the question is how to shoot so that the weapon hits it.&#xD;&#xA;&#xD;&#xA;Here's my guess:&#xD;&#xA;&#xD;&#xA;Let's take some arbitrary coordinates:&#xD;&#xA;&#xD;&#xA;    (X1, Y1) = (800, 600)&#xD;&#xA;    (X2, Y2) = (1000, 50)&#xD;&#xA;    (X3, Y3) = (X3, Y3) // Means these are to be determined.&#xD;&#xA;&#xD;&#xA;Since this was not mentioned, I extrapolated a constant speed for both the enemy and the projectile.&#xD;&#xA;&#xD;&#xA;    Enemy's speed:&#xD;&#xA;        Ve = d/t = 20 px/s&#xD;&#xA;&#xD;&#xA;    Projectile's speed:&#xD;&#xA;        Vp = d/t = 10 px/s&#xD;&#xA;&#xD;&#xA;Then, we have to determine when the projectile could reach the Y3 coordinate:&#xD;&#xA;&#xD;&#xA;    h = Y1 - Y3&#xD;&#xA;    h = 600 - 50&#xD;&#xA;    h = 550 px // This means that the projectile has to travel 550 px at 10 px/s to reach Y3&#xD;&#xA;&#xD;&#xA;In how much time will the projectile reach Y3?&#xD;&#xA;&#xD;&#xA;    t = 10 px/s * 550 px&#xD;&#xA;    t = 550 px / 10 px&#xD;&#xA;    t = 55 s // Then, 55s is required for the projectile to reach Y3&#xD;&#xA;&#xD;&#xA;Now, where will the enemy be in 55 seconds?&#xD;&#xA;&#xD;&#xA;    Ve = d/t = d/55s&#xD;&#xA;    20px/s = d/55s&#xD;&#xA;    d = 20px * 55s&#xD;&#xA;    d = 1100 px&#xD;&#xA;&#xD;&#xA;Now, we can determine X3 with the following formula:&#xD;&#xA;&#xD;&#xA;    X3 = X2 - d&#xD;&#xA;    X3 = 1000 - 1100&#xD;&#xA;    X3 = -100 // Remember, these are arbitrary coordinates&#xD;&#xA;&#xD;&#xA;`X3` would then be outside the visible area in this example, which doesn't matter here since the Cartesian plan includes negative coordinates. What matters most is that from this (X3,Y3) coordinate, we'll be able to find the required angle.&#xD;&#xA;&#xD;&#xA;We can now determine the size of a new right-triangle following these coordinates:&#xD;&#xA;&#xD;&#xA;    (X3, Y3) = (-100, 50)&#xD;&#xA;    (X1, Y1) = (800, 600)&#xD;&#xA;    (X3, Y1) = (-100, 600)&#xD;&#xA;&#xD;&#xA;Which allows us to find out the distance on X that the projectile needs to travel:&#xD;&#xA;&#xD;&#xA;    d = X1 - X3&#xD;&#xA;    d = 800 - (-100)&#xD;&#xA;    d = 800 + 100&#xD;&#xA;    d = 900 px&#xD;&#xA;&#xD;&#xA;And we already know the height that the projectile needs to travel on Y which is 550px. Then, we can calculate the hypotenuse according to pytaghorian theory.&#xD;&#xA;&#xD;&#xA;    sqr(a) + sqr(b) = sqr(c) // Where sqr(c) represents the sqr(hypotenuse)&#xD;&#xA;    sqr(c) = sqr(900) + sqr(550)&#xD;&#xA;    sqr(c) = 810,000 + 302,500&#xD;&#xA;    sqr(c) = 1,112,500&#xD;&#xA;    c = sqrt(1,112,500)&#xD;&#xA;    c = 1,054.75116 (rounded value)&#xD;&#xA;&#xD;&#xA;Then, we can now find the cos(A), where A is the angle which we're looking for.&#xD;&#xA;&#xD;&#xA;    cos(A) = adjacent side / hypotenuse&#xD;&#xA;    cos(A) = 900 / 1,054.75116&#xD;&#xA;    cos(A) = 0.853282 (rounded value)&#xD;&#xA;&#xD;&#xA;From cos(A) we can now determine angle A:&#xD;&#xA;&#xD;&#xA;    A = cos-1(cos(A))&#xD;&#xA;    A = cos-1(0.853282)&#xD;&#xA;    A = 31.42956561 (rounded value)&#xD;&#xA;&#xD;&#xA;&gt;**References**&#xD;&#xA;&#xD;&#xA;1. [Triangle (Wikipedia)][1];&#xD;&#xA;2. [Finding an Angle in a Right Angled Triangle][2];&#xD;&#xA;3. [Trigonometry Calculator - Right Triangles][3].&#xD;&#xA;&#xD;&#xA;I do hope this helped at least a little!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Triangle&#xD;&#xA;  [2]: http://www.mathsisfun.com/algebra/trig-finding-angle-right-triangle.html&#xD;&#xA;  [3]: http://www.carbidedepot.com/formulas-trigright.asp" />
  <row Id="19536" PostHistoryTypeId="2" PostId="9460" RevisionGUID="1ef69721-378b-4777-a04c-dc03c74bfb4b" CreationDate="2011-03-07T19:29:09.647" UserId="5936" Text="I know a very bright little boy who excels in math, but at home he's glued to his Nintendo DS.&#xD;&#xA;&#xD;&#xA;When I asked him what he wanted to do when he grew up he said &quot;Make video games!&quot;&#xD;&#xA;&#xD;&#xA;I remember a few years there was mention of a MIT software called Scratch and thought maybe this kid can do want he wants to do.&#xD;&#xA;&#xD;&#xA;Has anyone used any of the &quot;game development&quot; for kids softwares out there? Can you recommend any?" />
  <row Id="19537" PostHistoryTypeId="1" PostId="9460" RevisionGUID="1ef69721-378b-4777-a04c-dc03c74bfb4b" CreationDate="2011-03-07T19:29:09.647" UserId="5936" Text="What are some good game development programs for kids?" />
  <row Id="19538" PostHistoryTypeId="3" PostId="9460" RevisionGUID="1ef69721-378b-4777-a04c-dc03c74bfb4b" CreationDate="2011-03-07T19:29:09.647" UserId="5936" Text="&lt;hobby-development&gt;" />
  <row Id="19539" PostHistoryTypeId="2" PostId="9461" RevisionGUID="b59ffb3b-6d65-4e01-bfaf-f948b738be94" CreationDate="2011-03-07T19:36:51.793" UserId="1156" Text="I did manage to borrow a copy of the 2nd edition a while back, and it did a good job of explaining the basics of the language. Nothing that basic will have changed with C++0x.&#xD;&#xA;&#xD;&#xA;If you want the most up-to-date copy, which will be the best, get the 3rd edition.&#xD;&#xA;&#xD;&#xA;If you're on a tight budget, get the 2nd." />
  <row Id="19540" PostHistoryTypeId="2" PostId="9462" RevisionGUID="d97ab9ac-b58d-47b7-ab4a-3e1f2f101df9" CreationDate="2011-03-07T19:38:43.053" UserId="1156" Text="[Yoyo Games' Game Maker][1] is a pretty common tool. &#xD;&#xA;&#xD;&#xA;If we're talking bright, BRIGHT kids, who have an attention span and would be committed to learning something, you may also want to try Python. [This on][2]e is definitely a good games-oriented HTML book for Python.&#xD;&#xA;&#xD;&#xA;Chances are, Game Maker will be much better suited: You can get an obvious end product.&#xD;&#xA;&#xD;&#xA;I also haven't used it or heard about it, but [Ruby for Kids - Make Games in Minutes!][3] looks promising.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com/make&#xD;&#xA;  [2]: http://inventwithpython.com/&#xD;&#xA;  [3]: http://ruby4kids.com/ruby4kids" />
  <row Id="19544" PostHistoryTypeId="2" PostId="9464" RevisionGUID="c65d3d03-e0eb-4e8e-b4d4-be4b8600bcb7" CreationDate="2011-03-07T19:51:36.413" UserId="4410" Text="Not looked at it myself, but I thought I'd mention [Kodu][1]. What works for you will depend a lot on age and how keen they are.&#xD;&#xA;&#xD;&#xA;Way back when I was a kid we had the [Shoot'Em-Up Construction Kit][2]. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fuse.microsoft.com/project/kodu.aspx&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Shoot'Em-Up_Construction_Kit" />
  <row Id="19545" PostHistoryTypeId="2" PostId="9465" RevisionGUID="83db7af1-5d91-4d81-8761-8eb53abe7df3" CreationDate="2011-03-07T20:17:41.603" UserId="3656" Text="There's also [Alice][1] from Carnegie Mellon. It's centered around teaching programming concepts through a visual interface to create 3d animations and games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.alice.org/" />
  <row Id="19546" PostHistoryTypeId="2" PostId="9466" RevisionGUID="766a2d7a-98f9-4ab9-b1a4-9ef9b1bbdec1" CreationDate="2011-03-07T20:19:01.150" UserId="5797" Text="I had looked at Scratch. It was a solid product to create animations etc. &#xD;&#xA;I am working on something to create and share games (Flash based)." />
  <row Id="19547" PostHistoryTypeId="25" PostId="9460" RevisionGUID="a2d41326-cc7d-4d57-ac09-5d3621d9930c" CreationDate="2011-03-07T20:23:13.543" Comment="http://twitter.com/#!/StackGameDev/status/44855644137852928" />
  <row Id="19548" PostHistoryTypeId="2" PostId="9467" RevisionGUID="4309e254-f62b-444a-b380-6ed2f2783e88" CreationDate="2011-03-07T20:26:10.490" UserId="395" Text="Klik n' Play. Not for sale anymore, but you can find copies online easily." />
  <row Id="19549" PostHistoryTypeId="5" PostId="9462" RevisionGUID="24f1e3e1-73b8-4975-a194-0e5945a1f415" CreationDate="2011-03-07T20:31:41.617" UserId="1156" Comment="added 81 characters in body" Text="[Yoyo Games' Game Maker][1] is a pretty common tool. &#xD;&#xA;&#xD;&#xA;If we're talking bright, BRIGHT kids, who have an attention span and would be committed to learning something, you may also want to try Python. [This on][2]e is definitely a good games-oriented HTML book for Python.&#xD;&#xA;&#xD;&#xA;Chances are, Game Maker will be much better suited: You can get an obvious end product.&#xD;&#xA;&#xD;&#xA;I also haven't used it or heard about it, but [Ruby for Kids - Make Games in Minutes!][3] looks promising.&#xD;&#xA;&#xD;&#xA;(I think I may not be a good example, but I started off with Flash aged 11. :P)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com/make&#xD;&#xA;  [2]: http://inventwithpython.com/&#xD;&#xA;  [3]: http://ruby4kids.com/ruby4kids" />
  <row Id="19550" PostHistoryTypeId="2" PostId="9468" RevisionGUID="a68a739c-5fd2-4006-97b0-8cc36eb5fdac" CreationDate="2011-03-07T20:43:01.000" UserId="1163" Text="[RPG Maker][1] was great when I was a kid. But they have come a long way since then. They have a lot of features, and even there own scripting language/environment. It is all pretty easy too, and you can have something working really quickly. Also moves a lot of the tricky stuff in game development out the way, so the kids can be more creative.&#xD;&#xA;&#xD;&#xA;You are definitely limited to what you can do by the engine, but it is a great place to start learning the concepts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rpgmakerweb.com/" />
  <row Id="19551" PostHistoryTypeId="2" PostId="9469" RevisionGUID="50692340-b665-4f6b-8aa8-f9cbe77b3956" CreationDate="2011-03-07T20:49:26.957" UserId="1812" Text="I'm trying to assess the difficulty of creating a rendering style that is more like the game Okami and the Quake mods (as shown on [this page][1]...search for 'okami','quake npr').&#xD;&#xA;&#xD;&#xA;Can a game engine such as Unity be used and programmed to achieve these kind of rendering styles?&#xD;&#xA;&#xD;&#xA;I'm doing research and am totally new to this so any insight into this would help tremendously.&#xD;&#xA;&#xD;&#xA;  [1]: http://modetwo.net/users/nachimir/vga/" />
  <row Id="19552" PostHistoryTypeId="1" PostId="9469" RevisionGUID="50692340-b665-4f6b-8aa8-f9cbe77b3956" CreationDate="2011-03-07T20:49:26.957" UserId="1812" Text="Achieving certain rendering styles" />
  <row Id="19553" PostHistoryTypeId="3" PostId="9469" RevisionGUID="50692340-b665-4f6b-8aa8-f9cbe77b3956" CreationDate="2011-03-07T20:49:26.957" UserId="1812" Text="&lt;rendering&gt;&lt;graphics-programming&gt;" />
  <row Id="19554" PostHistoryTypeId="2" PostId="9470" RevisionGUID="c0394462-18d2-4bbf-903e-59ad36e50d1a" CreationDate="2011-03-07T21:05:43.477" UserId="14" Text="Through the use of [Shaders](http://www.unifycommunity.com/wiki/index.php?title=Shaders) Unity can have a variety of rendering styles.&#xD;&#xA;&#xD;&#xA;The [Unify Community Wiki](http://www.unifycommunity.com/wiki/index.php?title=Shaders) has a variety of articles dealing with the subject of shaders, complete with source code.&#xD;&#xA;&#xD;&#xA;Creating shaders requires a Unity Pro license." />
  <row Id="19555" PostHistoryTypeId="5" PostId="9469" RevisionGUID="66aa7515-ac1e-44b2-a25f-6efc47711356" CreationDate="2011-03-07T21:06:00.967" UserId="1812" Comment="added 116 characters in body" Text="I'm trying to assess the difficulty of creating a rendering style that is more like the game Okami and the Quake mods (as shown on [this page][1]...search for 'okami','quake npr').  Here's a [better page describing the Quake rendering mod][2].&#xD;&#xA;&#xD;&#xA;Can a game engine such as Unity be used and programmed to achieve these kind of rendering styles?&#xD;&#xA;&#xD;&#xA;I'm doing research and am totally new to this so any insight into this would help tremendously.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://modetwo.net/users/nachimir/vga/&#xD;&#xA;  [2]: http://www.cs.mcgill.ca/~kwysoc/npr/stat1/" />
  <row Id="19557" PostHistoryTypeId="16" PostId="9462" RevisionGUID="35aa62eb-877d-4d05-935a-5cdfa04129e6" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19558" PostHistoryTypeId="16" PostId="9464" RevisionGUID="442e4bed-6ea0-495e-a0d1-f0ca7e23faa4" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19559" PostHistoryTypeId="16" PostId="9465" RevisionGUID="3248c81c-377a-4502-9268-6aec14d7b00d" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19560" PostHistoryTypeId="16" PostId="9466" RevisionGUID="6ebe3de9-0f3a-438a-9263-a0fb17de4576" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19561" PostHistoryTypeId="16" PostId="9467" RevisionGUID="188fd8c9-37a8-4c76-b865-5fbdde6f65b3" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19562" PostHistoryTypeId="16" PostId="9468" RevisionGUID="a8f52522-7784-43a3-9f0c-0cff6beb12da" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19563" PostHistoryTypeId="16" PostId="9460" RevisionGUID="31570313-c718-4077-87f7-f3b39c441340" CreationDate="2011-03-07T21:14:05.743" UserId="14" />
  <row Id="19564" PostHistoryTypeId="5" PostId="9470" RevisionGUID="ae46d3de-0e8b-458e-8326-25fd69bb5bf8" CreationDate="2011-03-07T21:46:26.157" UserId="14" Comment="Making the text Shader link to the Wikipedia article on the topic." Text="Through the use of [Shaders](http://en.wikipedia.org/wiki/Shader) Unity can have a variety of rendering styles.&#xD;&#xA;&#xD;&#xA;The [Unify Community Wiki](http://www.unifycommunity.com/wiki/index.php?title=Shaders) has a variety of articles dealing with the subject of shaders, complete with source code.&#xD;&#xA;&#xD;&#xA;Creating shaders requires a Unity Pro license." />
  <row Id="19565" PostHistoryTypeId="2" PostId="9471" RevisionGUID="b9b2c34a-9dbb-4a3a-a08b-37723797e914" CreationDate="2011-03-07T22:43:23.017" UserId="1742" Text="This sounds like the job for a differential equation mathematician. Try the maths stack exchange?&#xD;&#xA;&#xD;&#xA;The problem with this seems to be that the angle is dependent on the angle (or the time of impact is dependent on the time of impact)&#xD;&#xA;&#xD;&#xA;I've come across problems like this that are actually not solvable algebraically. You might find that running a binary search might be cheaper than solving properly (on development time even if not CPU time)" />
  <row Id="19566" PostHistoryTypeId="5" PostId="9471" RevisionGUID="48bdedcd-430c-4247-912f-4f4704c689e2" CreationDate="2011-03-07T22:51:40.887" UserId="1742" Comment="added 792 characters in body" Text="Searching for &quot;aim at moving target&quot;&#xD;&#xA;&#xD;&#xA;http://www.kirupa.com/forum/showthread.php?t=347334&#xD;&#xA;&#xD;&#xA;    /**&#xD;&#xA; * Shoot at a target&#xD;&#xA; * &#xD;&#xA; * @param	t	The target to be shot&#xD;&#xA; * @return		The bullet to be fired (or null if cannot hit)&#xD;&#xA; */&#xD;&#xA;public function shoot(targ:Target, bulletSpeed:Number = BULLET_SPEED):Bullet&#xD;&#xA;{&#xD;&#xA;	var dx:Number = targ.x - this.x;&#xD;&#xA;	var dy:Number = targ.y - this.y;&#xD;&#xA;	&#xD;&#xA;	var a:Number = targ.vx * targ.vx + targ.vy * targ.vy - bulletSpeed * bulletSpeed;&#xD;&#xA;	var b:Number = 2 * (targ.vx * dx + targ.vy * dy);&#xD;&#xA;	var c:Number = dx * dx + dy * dy;&#xD;&#xA;	&#xD;&#xA;	// Check we're not breaking into complex numbers&#xD;&#xA;	var q:Number = b * b - 4 * a * c;&#xD;&#xA;	if (q &lt; 0) return null;&#xD;&#xA;	&#xD;&#xA;	// The time that we will hit the target&#xD;&#xA;	var t:Number = ((a &lt; 0 ? -1 : 1)*Math.sqrt(q) - b) / (2 * a);&#xD;&#xA;	&#xD;&#xA;	// Aim for where the target will be after time t&#xD;&#xA;	dx += t * targ.vx;&#xD;&#xA;	dy += t * targ.vy;&#xD;&#xA;	var theta:Number = Math.atan2(dy, dx);&#xD;&#xA;	&#xD;&#xA;	// Fire the bullet&#xD;&#xA;	var bullet:Bullet = new Bullet();&#xD;&#xA;	bullet.target = targ;&#xD;&#xA;	bullet.hitPoint = new Point(targ.x + targ.vx * t, targ.y + targ.vy * t);&#xD;&#xA;	&#xD;&#xA;	bullet.x = this.x;&#xD;&#xA;	bullet.y = this.y;&#xD;&#xA;	bullet.vx = bulletSpeed * Math.cos(theta);&#xD;&#xA;	bullet.vy = bulletSpeed * Math.sin(theta);&#xD;&#xA;	&#xD;&#xA;	return bullet;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19567" PostHistoryTypeId="2" PostId="9472" RevisionGUID="e50d1942-3747-4f80-a6bc-86a67b80a612" CreationDate="2011-03-07T23:06:29.863" UserId="5899" Text="Here there is a tutorial of how achieve this: &#xD;&#xA;&#xD;&#xA;http://elasticimagesoftware.posterous.com/opengl-on-ipad-how-to-handle-arbitrary-device&#xD;&#xA;&#xD;&#xA;I think that this approach uses a MVC approach and is the view which makes the transformation for you ( graphics with animation included and input ).&#xD;&#xA;&#xD;&#xA;On the other hand, I remind that if you want do this rotation with programation the view doesn't rotate and you need transform the coordinates that receives from the iOS.&#xD;&#xA;&#xD;&#xA;In that book there is an example to do programatically ( with animation also ):&#xD;&#xA;&#xD;&#xA;Name: iPhone 3D Programming  &#xD;&#xA;Author: Philip Rideout&#xD;&#xA;&#xD;&#xA;I have seen the two approaches and I recommend you to use the MVC approach, because when the application starts, it's impossible know the orientation with programmation ( the first accelerometer event doesn't reach ) and the image may be inverted for the first time. With MVC you see the image in correct orientation the first time." />
  <row Id="19568" PostHistoryTypeId="25" PostId="9469" RevisionGUID="2d4aeb5e-0976-431d-a834-388447055b25" CreationDate="2011-03-07T23:23:13.757" Comment="http://twitter.com/#!/StackGameDev/status/44900941983531008" />
  <row Id="19569" PostHistoryTypeId="2" PostId="9473" RevisionGUID="a451e32e-a166-49b6-81de-b976a4d3e88a" CreationDate="2011-03-07T23:30:48.897" UserId="4234" Text="I have a particle that is hit with a force `F` at a particular position on the ball `P`. How can I calculate the angular velocity of the X,Y and Z axis? The actual rotating of the object should be fine, but it's the values of the `angular velocity (Vector3)` that I'm not sure of. Sorry I can't show any code, but I'm not really sure where to start. Thanks for any help." />
  <row Id="19570" PostHistoryTypeId="1" PostId="9473" RevisionGUID="a451e32e-a166-49b6-81de-b976a4d3e88a" CreationDate="2011-03-07T23:30:48.897" UserId="4234" Text="Angular Velocity" />
  <row Id="19571" PostHistoryTypeId="3" PostId="9473" RevisionGUID="a451e32e-a166-49b6-81de-b976a4d3e88a" CreationDate="2011-03-07T23:30:48.897" UserId="4234" Text="&lt;xna&gt;&lt;3d&gt;&lt;physics&gt;" />
  <row Id="19572" PostHistoryTypeId="2" PostId="9474" RevisionGUID="b05002e6-09e3-422a-92bb-8e38c23077e4" CreationDate="2011-03-07T23:51:10.233" UserId="5855" Text="So after running through tutorials by both Microsoft and [www.xnadevelopment.com][1] I feel very confident in my ability to get to work on my first game using the XNA Framework. I've manipulated sprites, added audio, changed game states, and even went a step further to apply the knowledge I had and figure out how to make animations and basic 2-dimensional physics (including impulses, force, acceleration, and speed calculations)&#xD;&#xA;&#xD;&#xA;But then shortly into the project I hit a curious bump that I've been unable to figure out.&#xD;&#xA;&#xD;&#xA;In wanting to implement menus, pause screens, and several different aspects of play (a &quot;pre-level&quot; prep screen, the level itself, and a screen after the level to review how well you did) I took a look at Microsoft's [Game State Management sample][2]. I understood the concept, although it was admittedly quite a lot to take in. Not wanting to recreate the entire concept by scratch (after all- what purpose would that serve?) I tried copying and pasting the sample code into my own `ScreenManager` class (as well as `InputState` and `GameScreen` classes) to try and borrow their ingenuity. When I did this, however, my project stopped compiling. I was getting the following error:&#xD;&#xA;&#xD;&#xA;&gt; The type or namespace name 'Touch' does not exist in the namespace 'Microsoft.Xna.Framework.Input' (are you missing an assembly reference?)&#xD;&#xA;&#xD;&#xA;Having read through their sample code already, I realized that this namespace and every function and class within it could be safely ripped from the code without losing functionality. It's a namespace simply for integrating with touchscreen devices (presumably Windows Phone 7, but maybe also tablets).&#xD;&#xA;&#xD;&#xA;But then I began to wonder- how come Microsoft's sample compiled but mine didn't? I copied their code exactly so there must be a setting somewhere that I need to change in Visual Studio in order to correct this. I tried creating a new project as a Windows Phone 7 game rather than a Windows game, however that only forced it to compile to a Windows Phone emulator and denied me the ability to change the resolution and other features which I clearly had the power to do in the sample code.&#xD;&#xA;&#xD;&#xA;So my question is simple - how do I properly use the namespace Microsoft.XNA.Framework.Input.Touch?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xnadevelopment.com&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="19573" PostHistoryTypeId="1" PostId="9474" RevisionGUID="b05002e6-09e3-422a-92bb-8e38c23077e4" CreationDate="2011-03-07T23:51:10.233" UserId="5855" Text="Including Microsoft.XNA.Framework.Input.Touch in a project?" />
  <row Id="19574" PostHistoryTypeId="3" PostId="9474" RevisionGUID="b05002e6-09e3-422a-92bb-8e38c23077e4" CreationDate="2011-03-07T23:51:10.233" UserId="5855" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;microsoft&gt;" />
  <row Id="19575" PostHistoryTypeId="2" PostId="9475" RevisionGUID="deb83424-3dc3-40c5-8fe2-779bc99e4894" CreationDate="2011-03-07T23:53:10.787" UserId="4586" Text="I assume you're already calculating the linear momentum change from the collision so I won't cover that. Essentially, angular momentum works in the same way as linear but with Force replaced by Torque and Mass replaced by Inertia.&#xD;&#xA;&#xD;&#xA;dv = T / I&#xD;&#xA;&#xD;&#xA;where dv is the change in angular velocity, T is the torque from the collision and I is the moment of inertia which for a sphere is&#xD;&#xA;&#xD;&#xA;I = (2/5)MR^2 (solid sphere)&#xD;&#xA;I = (2/3)MR^2 (shell)&#xD;&#xA;&#xD;&#xA;where M is the mass of the sphere and R is the radius.&#xD;&#xA;&#xD;&#xA;The torque, T, is calculated from the cross product of the force with the vector from the collision point to the center of the sphere:&#xD;&#xA;&#xD;&#xA;T = F x (P - O)&#xD;&#xA;&#xD;&#xA;where O is the center of the sphere.&#xD;&#xA;&#xD;&#xA;Putting it all together:&#xD;&#xA;&#xD;&#xA;dv = (F x (P - O)) / ((2/5)MR^2)" />
  <row Id="19576" PostHistoryTypeId="5" PostId="9434" RevisionGUID="9cab5b85-9d1d-4d9a-8f27-b5504eaf223c" CreationDate="2011-03-08T00:12:29.460" UserId="5253" Comment="specifing" Text="I first created a game on the iPhone and I'm now porting it to Android. I wrote most of the code in C++, but when it came to porting it wasn't so easy. The Android's way is to have two threads, one for rendering and one for updating - this due to some devices blocking when updating the hardware - while the iPhone's way is to have one thread to do it all.&#xD;&#xA;&#xD;&#xA;My problem is that I am coming from the iPhone. When I transition, say from the Menu to the Game, I would stop the Animation (Rendering) and load up the next Manager (the Menu has a Manager and so has the Game). I could implement the same thing on Android, but I have noticed on game ports like Quake, don't do this - as far as I can tell.&#xD;&#xA;&#xD;&#xA;What I want is someone to explain how a game like Quake can transition from the menu to the game? Does it stop rendering, load the game stuff and then start rendering again, like what I did on the iPhone? Does it load the game stuff while still rendering the menu?&#xD;&#xA;&#xD;&#xA;Interestingly, when I did try to load a Renderer class while renderering I would get a dequeuing buffer error - which I believe to be OpenGL ES. Was I just doing something wrong or is it possible to load textures and buffers, while it's rendering?&#xD;&#xA;&#xD;&#xA;Examples would be appreciated.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19579" PostHistoryTypeId="2" PostId="9478" RevisionGUID="e44b800b-95b7-4176-a5f8-28fc0d73862b" CreationDate="2011-03-08T02:08:17.913" UserId="5904" Text="Rendering on a separate thread is a common idiom.&#xD;&#xA;&#xD;&#xA;To quickly and directly answer your question about &quot;*Was I just doing something wrong or is it possible to load textures and buffers, while it's rendering?*&quot; - OpenGL ES has a rendering context bound to one thread and calling any OpenGL ES functions from any other thread is illegal. More on that in a bit.&#xD;&#xA;&#xD;&#xA;Quake is a single threaded program, and written for DOS originally. Its code is fairly specific to the game, but basically the menus are built-in and simple rendered on top of the 3D graphics (if any). It has been a while since I've read through the source, but conceptually, the game loop is this:&#xD;&#xA;&#xD;&#xA;    loop {&#xD;&#xA;    &#xD;&#xA;    update_game();&#xD;&#xA;    &#xD;&#xA;    if(menu_up)&#xD;&#xA;        draw_menu();&#xD;&#xA;    &#xD;&#xA;    draw_world();&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I think rendering on a different thread is generally good because it forces you to separate the app's logic from the presentation layer from the actual rendering code, and even on the iPhone, I suggest you use it (new iPad is dual core!). Additionally, you abstract the drawing interface from rendering API.&#xD;&#xA;&#xD;&#xA;It presents some challenges and in your case, the challenge is synchronizing the logic with the presentation. If you aren't writing a full-out game engine that is meant to be reused by both, then sharing the menu state with the renderer thread would be the most direct way. Basically something like this:&#xD;&#xA;&#xD;&#xA;    renderer_thread_loop() {&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    lock( sharedState.mutex )&#xD;&#xA;    if(sharedState.menuUp == true) {&#xD;&#xA;       draw_menu(sharedState.menuState);&#xD;&#xA;    }&#xD;&#xA;    unlock( sharedState.mutex )&#xD;&#xA;    &#xD;&#xA;    render_game();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;There are a lot of synchronization issues here, tread carefully! You can't update information the renderer is rendering!&#xD;&#xA;&#xD;&#xA;A less direct but more elegant way would be to submit stuff to the renderer to do. Each frame, some presentation layer code would queue up tasks for the renderer to do. At the end of the queue might be a &quot;swap buffers&quot; message that tells the renderer to swap buffers. In this way, the renderer runs on a separate thread but acts similar to directly calling functions like glDrawArrays(). Normally, the logic updates stuff, the presentation layer decides what to draw, and the renderer draws it.&#xD;&#xA;&#xD;&#xA;A more full example would be this:&#xD;&#xA;&#xD;&#xA;    logic() {&#xD;&#xA;      respond_to_input(); //move character, interact with menus&#xD;&#xA;      update_game(); //physics, AI, etc.&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    presentation() {&#xD;&#xA;    &#xD;&#xA;        queueBeginFrame();&#xD;&#xA;    &#xD;&#xA;        if(inMenu) {&#xD;&#xA;            queueDraw(menu);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;      &#xD;&#xA;        queueEndFrame();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    renderer() {&#xD;&#xA;    &#xD;&#xA;        while(game_not_exited) {&#xD;&#xA;        if(queue.empty() == false)&#xD;&#xA;        {&#xD;&#xA;           work = queue.fetch();&#xD;&#xA;    &#xD;&#xA;           doWork(work); //do something with the request&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19580" PostHistoryTypeId="25" PostId="9474" RevisionGUID="87b7beaf-9b0e-42a1-b2f6-42e5f4b0fbc3" CreationDate="2011-03-08T02:23:15.057" Comment="http://twitter.com/#!/StackGameDev/status/44946245273391104" />
  <row Id="19581" PostHistoryTypeId="2" PostId="9479" RevisionGUID="0990f553-6abb-436f-923d-db8118c1ce69" CreationDate="2011-03-08T02:40:30.510" UserId="5904" Text="I've used Scratch and I'd say it isn't quite so much for teaching game programming as much as teaching kids the concept of programming. It has a drag and drop interface, event-based model, fairly easy to learn (&lt; 1hr for an experienced programmer). If your kid in question wants to make stuff move on screen and do it in a way that is lower level than &quot;select a character to be your avatar&quot;, this might be useful.&#xD;&#xA;&#xD;&#xA;I think it works well for experimenting as you can make it do a lot of different things with enough tinkering." />
  <row Id="19582" PostHistoryTypeId="5" PostId="9471" RevisionGUID="b146f66f-7818-4f1d-8c29-8fac6a39b32f" CreationDate="2011-03-08T02:43:17.650" UserId="2778" Comment="Edited code sample to remove tabs so code displays correctly all along" Text="Searching for &quot;aim at moving target&quot;:&lt;br&gt;&#xD;&#xA;[Aiming and hitting a moving target][1]&#xD;&#xA;&#xD;&#xA;    /**&#xD;&#xA;    * Shoot at a target&#xD;&#xA;    * &#xD;&#xA;    * @param	t	The target to be shot&#xD;&#xA;    * @return		The bullet to be fired (or null if cannot hit)&#xD;&#xA;    */&#xD;&#xA;    public function shoot(targ:Target, bulletSpeed:Number = BULLET_SPEED):Bullet&#xD;&#xA;    {&#xD;&#xA;        var dx:Number = targ.x - this.x;&#xD;&#xA;    	var dy:Number = targ.y - this.y;&#xD;&#xA;        var a:Number = targ.vx * targ.vx + targ.vy * targ.vy - bulletSpeed * bulletSpeed;&#xD;&#xA;        var b:Number = 2 * (targ.vx * dx + targ.vy * dy);&#xD;&#xA;        var c:Number = dx * dx + dy * dy;&#xD;&#xA;	&#xD;&#xA;        // Check we're not breaking into complex numbers&#xD;&#xA;        var q:Number = b * b - 4 * a * c;&#xD;&#xA;        if (q &lt; 0) return null;&#xD;&#xA;	&#xD;&#xA;        // The time that we will hit the target&#xD;&#xA;        var t:Number = ((a &lt; 0 ? -1 : 1)*Math.sqrt(q) - b) / (2 * a);&#xD;&#xA;	&#xD;&#xA;        // Aim for where the target will be after time t&#xD;&#xA;        dx += t * targ.vx;&#xD;&#xA;        dy += t * targ.vy;&#xD;&#xA;        var theta:Number = Math.atan2(dy, dx);&#xD;&#xA;	&#xD;&#xA;        // Fire the bullet&#xD;&#xA;        var bullet:Bullet = new Bullet();&#xD;&#xA;        bullet.target = targ;&#xD;&#xA;        bullet.hitPoint = new Point(targ.x + targ.vx * t, targ.y + targ.vy * t);&#xD;&#xA;&#xD;&#xA;        bullet.x = this.x;&#xD;&#xA;        bullet.y = this.y;&#xD;&#xA;        bullet.vx = bulletSpeed * Math.cos(theta);&#xD;&#xA;        bullet.vy = bulletSpeed * Math.sin(theta);&#xD;&#xA;	&#xD;&#xA;        return bullet;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kirupa.com/forum/showthread.php?t=347334" />
  <row Id="19583" PostHistoryTypeId="24" PostId="9471" RevisionGUID="b146f66f-7818-4f1d-8c29-8fac6a39b32f" CreationDate="2011-03-08T02:43:17.650" Comment="Proposed by 2778 approved by 14 edit id of 67" />
  <row Id="19584" PostHistoryTypeId="2" PostId="9480" RevisionGUID="cfa83d16-4af7-4f28-95cc-d53ab13dbc4d" CreationDate="2011-03-08T04:15:18.207" UserId="3990" Text="Input.Touch is only available in WinPhone7 projects. You can't use it on Win7. I don't know why the XNA team decided to do this. In the beta, Input.Touch worked on Win7 just fine." />
  <row Id="19586" PostHistoryTypeId="2" PostId="9482" RevisionGUID="ed837609-5828-446f-9f22-ca57afbd2f18" CreationDate="2011-03-08T04:59:58.263" UserId="5715" Text="Interesting and strategic AI behavior.&#xD;&#xA;&#xD;&#xA;At all costs avoid the syndrome of enemies that run in a line toward the player weapon fire.  Games where the player walking backward and firing is the winning strategy undermine any other cool things you might have put in.&#xD;&#xA;&#xD;&#xA;Enemies should show some sense of self-preservation by means of: taking cover, keeping distance, holding back until sufficient numbers of team mates are available for an assault, coordinated use of different weapons systems, character support roles to heal the injured.&#xD;&#xA;&#xD;&#xA;Some degree of AI unpredictability is also helpful to keep things interesting.&#xD;&#xA;" />
  <row Id="19587" PostHistoryTypeId="2" PostId="9483" RevisionGUID="9c1fb545-5c8d-46f7-bade-6525b70aaffb" CreationDate="2011-03-08T05:00:58.640" UserId="5944" Text="  You could try to do more accurate integration. What you have is called the Euler method, and you have to use really small times steps to make it accurate. The next best method is&#xD;&#xA;to evaluate the acceleration at the beginning and end of the time step, i.e. compute the acceration at time t0, then advance at that velocity and acceleration by delta T. Then recalculate velocity/acceleration at that time step. Now take the average of the two, to advance from to to t0+dt. This is second order accurate rather than first, so errors won't accumulate nearly as fast." />
  <row Id="19588" PostHistoryTypeId="2" PostId="9484" RevisionGUID="53633bc8-edbc-420b-a032-8ad4469e2f1d" CreationDate="2011-03-08T05:16:54.357" UserId="322" Text="Your formula is wrong, as 0.5*accel*t^2 gives a change in position, not a change in velocity. What you probably want to do is this:&#xD;&#xA;&#xD;&#xA;    gravity = new Vector3(0, -9.81f, 0);&#xD;&#xA;    projectileVelocity += gravity * gameTime.ElapsedGameTime.TotalSeconds;&#xD;&#xA;    projectilePosition += projectileVelocity * gameTime.ElapsedGameTime.TotalSeconds;&#xD;&#xA;&#xD;&#xA;Note that the framerate of 60 is not needed, this will work for any framerate which is the main reason to use elapsed time in the first place." />
  <row Id="19589" PostHistoryTypeId="25" PostId="9458" RevisionGUID="791cd58a-3319-4a90-ab9e-038d3f533f8b" CreationDate="2011-03-08T05:23:15.333" Comment="http://twitter.com/#!/StackGameDev/status/44991547187544064" />
  <row Id="19590" PostHistoryTypeId="2" PostId="9485" RevisionGUID="b1840fd4-58fa-4542-af1c-e7abb4a4d86b" CreationDate="2011-03-08T06:15:43.970" UserId="953" Text="Wario Ware D.I.Y. is a game that will let your kid make simple games on his DS. I understand that it is a good gateway to more complex systems like Game Maker." />
  <row Id="19591" PostHistoryTypeId="2" PostId="9486" RevisionGUID="db1b8849-41ba-407f-80db-660185cc82c1" CreationDate="2011-03-08T06:38:55.223" UserId="5945" Text="I think you are looking for a [geodesic grid](http://en.wikipedia.org/wiki/geodesic_grid).&#xD;&#xA;Lots of people approximate the earth with a cube:&#xD;&#xA;&#xD;&#xA;![Most cartographic problems would disappear on a polyhedral Earth][1]&#xD;&#xA;&#xD;&#xA;[Carlos A. Furuti has lots of maps of earth that fold up into a cube][2]&#xD;&#xA;&#xD;&#xA;You may also be interested in the&#xD;&#xA;The [Peirce quincuncial projection](http://en.wikipedia.org/wiki/Peirce_quincuncial_projection) which maps the whole Earth to one or two squares.&#xD;&#xA;&#xD;&#xA;The icosahedron (Dymaxion map ; [&quot;What is the best way to pixelize a sphere?&quot;](http://space.mit.edu/home/tegmark/icosahedron.html) ) gives slightly less distortion, but is more complicated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/opJ2v.jpg&#xD;&#xA;  [2]: http://www.progonos.com/furuti/MapProj/Normal/ProjPoly/projPoly2.html" />
  <row Id="19592" PostHistoryTypeId="2" PostId="9487" RevisionGUID="53701384-88e2-4af1-8bca-abe380f4cd43" CreationDate="2011-03-08T06:39:19.077" UserId="2158" Text="If you assume a constant frame rate of 60, your game doesn't work with the same speed with any other frame rate. If your rendering is too slow, the physics will also slow down. Sometimes this is desirable, but usually games are running the physics with constant speed independent of the rendering frame rate.&#xD;&#xA;&#xD;&#xA;You can change your formulas to use elapsed time instead of 60, but it is very hard to do that in a way that the physics will behave the same with different time differences. For linear movement it is not a problem, but already for a parabolic trajectory or collisions this becomes hard and for more complex trajectories there is no closed form formula.&#xD;&#xA;&#xD;&#xA;The best solution usually is to use frame skipping. In this approach you take the elapsed time into account, but instead of updating the formulas you calculate how many times you need to update the physics in a row. This means that if the rendering is lagging, the physics will be updated several times per rendering frame. If the rendering is running faster than the physics should be updated, then frame skipping will skip the physics update as needed. The following code snippet does frame skpping. It assumes that the time units are in milliseconds, but it is easily adaptable to other units as well.&#xD;&#xA;&#xD;&#xA;    int TIMESTEP = 1000 / 60; // 1000 milliseconds in second, 60 Hz physics update&#xD;&#xA;    long previousTime = getTime();&#xD;&#xA;    long deltaTime = 0;&#xD;&#xA;&#xD;&#xA;    while (gameRunning) {&#xD;&#xA;        long currentTime = getTime();&#xD;&#xA;        deltaTime += currentTime - previousTime;&#xD;&#xA;        while (deltaTime &gt;= TIMESTEP) {&#xD;&#xA;            updatePhysics();&#xD;&#xA;            deltaTime -= TIMESTEP;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        render();&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="19596" PostHistoryTypeId="5" PostId="9470" RevisionGUID="53a8eacc-6173-4e80-8459-665bcd60bcd6" CreationDate="2011-03-08T06:48:32.587" UserId="14" Comment="added 51 characters in body; deleted 2 characters in body" Text="Through the use of [Shaders](http://en.wikipedia.org/wiki/Shader) Unity can have a variety of rendering styles.&#xD;&#xA;&#xD;&#xA;The [Unify Community Wiki](http://www.unifycommunity.com/wiki/index.php?title=Shaders) has a variety of articles dealing with the subject of shaders, complete with source code.&#xD;&#xA;&#xD;&#xA;Creating Post-Processing shaders such as the ones in your example requires a Unity Pro license." />
  <row Id="19597" PostHistoryTypeId="2" PostId="9488" RevisionGUID="836aff12-d5e3-41b3-82f4-9185357d2d7b" CreationDate="2011-03-08T07:12:34.090" UserId="5946" Text="CONS&#xD;&#xA;the most important thing &gt; **&quot;control you character&quot;**&#xD;&#xA;the unity &quot;**CRAP** character controller&quot; can´t be pushed by rigid bodies (moving e rotating platform,walls,etc...)&#xD;&#xA;you can only stay on top of a moving platform! &#xD;&#xA;you can´t make a 3d platform game = super mario galaxy with Unity3D.&#xD;&#xA;&#xD;&#xA;but unity fã boys don´t care because &#xD;&#xA;this fact will not prevent him from continuing to create that pile of crap iphone games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19598" PostHistoryTypeId="5" PostId="9488" RevisionGUID="27d03d0f-b388-4b29-ac07-6e55f19e3fcf" CreationDate="2011-03-08T07:27:23.070" UserId="5946" Comment="added 128 characters in body" Text="CONS&#xD;&#xA;&#xD;&#xA;the most important thing &gt; **&quot;control you character&quot;**&#xD;&#xA;&#xD;&#xA;Unity &quot;**CRAP** character controller&quot; can´t be pushed by rigid bodies (moving e rotating platforms,walls,etc...)&#xD;&#xA;&#xD;&#xA;you can &quot;ONLY&quot; stay on top of a moving platform! can you believe it?&#xD;&#xA;if you doubt it so read the documentation!&#xD;&#xA;&#xD;&#xA;you can´t make a 3d platform game = super mario galaxy &#xD;&#xA;with a lot of dynamic obstacles that interacting with it with Unity3D.&#xD;&#xA;&#xD;&#xA;but unity fanboys don´t care because &#xD;&#xA;this fact will not prevent him from continuing to create that pile of crap iphone apps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19599" PostHistoryTypeId="25" PostId="9439" RevisionGUID="0ada9037-26c1-43dc-b811-aef4c87276d0" CreationDate="2011-03-08T08:23:15.297" Comment="http://twitter.com/#!/StackGameDev/status/45036845960151041" />
  <row Id="19600" PostHistoryTypeId="2" PostId="9489" RevisionGUID="4faa9aac-9fd3-412b-910f-5a47e8236f45" CreationDate="2011-03-08T10:22:24.663" UserId="3484" Text="You could use PulpCore, a lightwight 2D framework, which will let you use sprites really easily:&#xD;&#xA;&#xD;&#xA;http://www.interactivepulp.com/pulpcore/" />
  <row Id="19601" PostHistoryTypeId="2" PostId="9490" RevisionGUID="681ce1e5-46f9-45e4-a9b6-0dbac40c38fa" CreationDate="2011-03-08T10:49:07.387" UserId="5919" Text="Hey every one I know this has probably been asked a ton of times but I just wanted to clarify if I am approaching this correctly, since I ran into some problems rotating a bitmap.  So basically I have one large bitmap that has four frames drawn on it and I only draw one at a time by looping through the bitmap by increments to animate walking. I can get the bitmap to rotate correctly when it is not moving but once the animation starts it starts to cut off alot of the image and sometimes becomes very fuzzy.  I have tried `public void draw(Canvas canvas,int pointerX, int pointerY) { Matrix m;&#xD;&#xA;&#xD;&#xA;    if (setRotation){&#xD;&#xA;    //  canvas.save();&#xD;&#xA;     m = new Matrix();&#xD;&#xA;     m.reset();&#xD;&#xA;            // spriteWidth and spriteHeight are for just the current frame showed &#xD;&#xA;             &#xD;&#xA;    m.setTranslate(spriteWidth / 2, spriteHeight / 2);&#xD;&#xA;     //get and set rotation for ninja based off of joystick&#xD;&#xA;     m.preRotate((float) GameControls.getRotation());&#xD;&#xA;&#xD;&#xA;    //create the rotated bitmap&#xD;&#xA;      flipedSprite = Bitmap.createBitmap(bitmap , 0, 0,bitmap.getWidth(),bitmap.getHeight() , m, true);&#xD;&#xA;      //set new bitmap to rotated ninja&#xD;&#xA;    setBitmap(flipedSprite);    //  canvas.restore(); &#xD;&#xA;    Log.d(&quot;Ninja View&quot;, &quot;angle of rotation= &quot; +(float) GameControls.getRotation());&#xD;&#xA;    setRotation = false;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And then the Draw Method here  &#xD;&#xA;&lt;pre&gt;      // create the destination rectangle for the ninjas current animation frame&#xD;&#xA;// pointerX and pointerY are from the joystick moving the ninja around&#xD;&#xA;destRect = new Rect(pointerX, pointerY, pointerX + spriteWidth, pointerY + spriteHeight);&#xD;&#xA;&#xD;&#xA; canvas.drawBitmap(bitmap, getSourceRect(), destRect, null);&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The animation is four frames long and gets incremented by 66 (the size of one of the frames on the bitmap) for every frame and then back to 0 at the end of the loop." />
  <row Id="19602" PostHistoryTypeId="1" PostId="9490" RevisionGUID="681ce1e5-46f9-45e4-a9b6-0dbac40c38fa" CreationDate="2011-03-08T10:49:07.387" UserId="5919" Text="Rotation of bitmap using a frame by frame animation" />
  <row Id="19603" PostHistoryTypeId="3" PostId="9490" RevisionGUID="681ce1e5-46f9-45e4-a9b6-0dbac40c38fa" CreationDate="2011-03-08T10:49:07.387" UserId="5919" Text="&lt;android&gt;&lt;animation&gt;&lt;rotation&gt;" />
  <row Id="19604" PostHistoryTypeId="2" PostId="9491" RevisionGUID="56d50910-0671-4a92-a297-698897e025fc" CreationDate="2011-03-08T11:15:57.933" UserId="5949" Text="I would definitly recommend YoYo GameMaker mentioned above.&#xD;&#xA;&#xD;&#xA;I used it 6 year ago (when I was still in high-school) to teach programming concepts for elementary school kids. This experiment worked great! Kids picked it up really fast and loved it from the day one. Many of them are still involved in scripting and hacking, so I think this time was well spent.&#xD;&#xA;&#xD;&#xA;Main advantages is would mention:&#xD;&#xA;&#xD;&#xA; - Really easy to get going (we drew simple stick figure in Paint and scanned some pencil background world from paper)&#xD;&#xA; - No scripting abstraction&#xD;&#xA; - Explains really well object oriented thinking and shows that to make things work, you really have to define everything (key events, gravity, collisions, action etc.). There is no magic in games, you can describe the world the way you want and everything is changeable." />
  <row Id="19605" PostHistoryTypeId="25" PostId="9490" RevisionGUID="1cee4394-a32e-4a5a-a9db-48c9aa2c802f" CreationDate="2011-03-08T11:23:15.557" Comment="http://twitter.com/#!/StackGameDev/status/45082144619499520" />
  <row Id="19606" PostHistoryTypeId="2" PostId="9492" RevisionGUID="be4158b6-c816-4ded-9f68-889d08eddee1" CreationDate="2011-03-08T11:28:50.230" UserId="3794" Text="Cloud rendering is hard task. But those clouds in video are just couple of &quot;cloudy&quot; particles. I don't think that that is something nice :)&#xD;&#xA;&#xD;&#xA;For nice clouds problem is not the cloud simulation, but the cloud rendering, which is impossible to handle to be photo realistic in realtime for scene with dynamic lighting. What happens in participating media like cloud is: &#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Light emission exist only when participating media emits light (like hot gas or fire) or when they are lighted (this is simalar part to normal rendering), absorption mean that light is absorbed and scattering is the biggest computational problem. Light is scattered inside the volume. Then you want to have self shadowing and shadow emmiting to the ground and opaque scene. How to do it? &#xD;&#xA;&#xD;&#xA;**Where to obtain cloud?**&#xD;&#xA;Clouds can be simulated by perlin noise. It is very common and looks nice. Perlin noise can be 4D, where 4th dimension is time to create nice dynamic clouds. If you want to specify cloud shapes: you have to do volumetrization over the desired shapes, save it as density 3D grid and multiply it with perlin.&#xD;&#xA;&#xD;&#xA;How to render it&#xD;&#xA;----------------&#xD;&#xA;**By rendering particles?**. Particle clouds are possible. It is most simple method. However, simulation of any light propagation between particles is pretty hard. It is very typical that you have to sort particles in the view direction of camera ( or in so called half-axis between camera-dir and light-dir).  This **is impossible in realtime application** unless your target platform doesn't support shader model 4 or better shader model 5 - and gpgpu computing (like cuda, openCl or direct compute) - so you could write Parallel radix sort and sort particles every frame (that will be realtime). Sorting is needed for alpha blending and also for smart shadow mapping. &#xD;&#xA;&#xD;&#xA;I'll guide you to some articles:&#xD;&#xA;&#xD;&#xA; - [smoke particles with cuda][2] - approxiation, but effective&#xD;&#xA; - [realtime rendering (with light scattering)but for static clouds][3]&#xD;&#xA; - [cloud animations][4]&#xD;&#xA;&#xD;&#xA;**By volumetric raycasting**. Volumetric raycasting means, that you have grid where you did fluid simulation (typicaly Navier-Strokes, but voxelized cloud shape is ok too). And shoot ray for every pixel through volume and integrate radiance across the ray. **This is suprisingly OK for realtime applications**. [Raycasting on wiki][5]. You don't have to have gpgpu computing. Volumetric raycasting can be done on pixel shader, because it doesn't need any synchronization between threads (rays). Having grid in 3D texture is perfect on graphics hardware, because you can benefit from native tri-linear interpolation of the texture unit. Self shadowing can be done by shooting ray from every sample to light and counting the density of light shadowing volume. This is slow. You could use some shadow mapping with transitions (like deep shadow maps). The light scattering is also not possible in realtime (with gpgpu it is).&#xD;&#xA;&#xD;&#xA;Volumetric raycasting is fast and it is easier to implment than particle sorting and work fast even on older HW.&#xD;&#xA;&#xD;&#xA;Something to study:&#xD;&#xA;&#xD;&#xA; - [Real-time volume graphics][6] - Best book about this topic. It is not completely online - you will have to buy it if you want to read it full. It has chapter especialy for game developers. &#xD;&#xA; - [Gpu-based Real-time Solid Voxelization for Volume Graphics][7] - Also great book on the topic&#xD;&#xA; - [Deep opacity maps][8] - Good for self shadowing of the clouds&#xD;&#xA; - [Fourier opacity maps][9] - Propably best method for self shadowing of multiple clouds.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RZSsT.jpg&#xD;&#xA;  [2]: http://developer.download.nvidia.com/compute/cuda/sdk/website/samples.html#smokeParticles&#xD;&#xA;  [3]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.97.2437&amp;rep=rep1&amp;type=pdf&#xD;&#xA;  [4]: http://www.ugrad.cs.ubc.ca/~cs535/presentations/clouds_slides.pdf&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Volume_ray_casting&#xD;&#xA;  [6]: http://books.google.com/books?id=lDWOu3_KGvoC&amp;printsec=frontcover&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=WRF2TYPlNZDFswa92JyJBQ&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCoQ6AEwAA#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [7]: http://books.google.com/books?id=ADOuPwAACAAJ&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=WRF2TYPlNZDFswa92JyJBQ&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=3&amp;ved=0CDYQ6AEwAg&#xD;&#xA;  [8]:  http://www.cs.tamu.edu/academics/tr/tamu-cs-tr-2007-6-1&#xD;&#xA;  [9]: http://www.google.cz/url?sa=t&amp;source=web&amp;cd=2&amp;sqi=2&amp;ved=0CCQQFjAB&amp;url=http%3A%2F%2Fwww.sci.utah.edu%2F~bavoil%2Fresearch%2Fshadows%2FFourierOpacityMapping_I3D2010.pdf&amp;ei=nhJ2TeyDJo3fsga5veiMBQ&amp;usg=AFQjCNE-H-Rty0K5maXaaau4YGBC1dZl5A&amp;sig2=p880veulO5Jmg_j9Vxu5ow" />
  <row Id="19607" PostHistoryTypeId="5" PostId="9490" RevisionGUID="55f95305-4717-4ae1-bc4d-c4ad46444fae" CreationDate="2011-03-08T13:38:21.623" UserId="2778" Comment="removed the closing &lt;pre&gt; tag that I have forgotten on the first edit." Text="Hey every one I know this has probably been asked a ton of times but I just wanted to clarify if I am approaching this correctly, since I ran into some problems rotating a bitmap.  So basically I have one large bitmap that has four frames drawn on it and I only draw one at a time by looping through the bitmap by increments to animate walking. I can get the bitmap to rotate correctly when it is not moving but once the animation starts it starts to cut off alot of the image and sometimes becomes very fuzzy.  I have tried &#xD;&#xA;&#xD;&#xA;    public void draw(Canvas canvas,int pointerX, int pointerY) { &#xD;&#xA;        Matrix m;&#xD;&#xA;&#xD;&#xA;        if (setRotation){&#xD;&#xA;        //  canvas.save();&#xD;&#xA;        m = new Matrix();&#xD;&#xA;        m.reset();&#xD;&#xA;    &#xD;&#xA;        // spriteWidth and spriteHeight are for just the current frame showed &#xD;&#xA;        m.setTranslate(spriteWidth / 2, spriteHeight / 2);&#xD;&#xA;&#xD;&#xA;        //get and set rotation for ninja based off of joystick&#xD;&#xA;        m.preRotate((float) GameControls.getRotation());&#xD;&#xA;&#xD;&#xA;        //create the rotated bitmap&#xD;&#xA;        flipedSprite = Bitmap.createBitmap(bitmap , 0, 0,bitmap.getWidth(),bitmap.getHeight() , m, true);&#xD;&#xA;        //set new bitmap to rotated ninja&#xD;&#xA;        setBitmap(flipedSprite);    //  canvas.restore(); &#xD;&#xA;        Log.d(&quot;Ninja View&quot;, &quot;angle of rotation= &quot; +(float) GameControls.getRotation());&#xD;&#xA;        setRotation = false;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And then the Draw Method here  &#xD;&#xA;&#xD;&#xA;    // create the destination rectangle for the ninjas current animation frame&#xD;&#xA;    // pointerX and pointerY are from the joystick moving the ninja around&#xD;&#xA;    destRect = new Rect(pointerX, pointerY, pointerX + spriteWidth, pointerY + spriteHeight);&#xD;&#xA;&#xD;&#xA;    canvas.drawBitmap(bitmap, getSourceRect(), destRect, null);&#xD;&#xA;&#xD;&#xA;The animation is four frames long and gets incremented by 66 (the size of one of the frames on the bitmap) for every frame and then back to 0 at the end of the loop." />
  <row Id="19608" PostHistoryTypeId="24" PostId="9490" RevisionGUID="55f95305-4717-4ae1-bc4d-c4ad46444fae" CreationDate="2011-03-08T13:38:21.623" Comment="Proposed by 2778 approved by 189 edit id of 68" />
  <row Id="19609" PostHistoryTypeId="25" PostId="9473" RevisionGUID="c9cc64f7-728b-47d8-9f64-7f6ccf2e372d" CreationDate="2011-03-08T14:23:15.347" Comment="http://twitter.com/#!/StackGameDev/status/45127442737799168" />
  <row Id="19610" PostHistoryTypeId="2" PostId="9493" RevisionGUID="1afb9bbb-dbfa-4f77-a3ae-12c286aa16ef" CreationDate="2011-03-08T14:56:50.487" UserId="4828" Text="I want to ask developers who works in small teams like 5-6 people, how can brainstorming look to do as much as possible? How brainstorming looks in your team ? I ask, beacouse I remember my previous brainstorming meeting, and I know is very hard to corrdinate it :/ We want to brainstorm about game design, game architecture and etc." />
  <row Id="19611" PostHistoryTypeId="1" PostId="9493" RevisionGUID="1afb9bbb-dbfa-4f77-a3ae-12c286aa16ef" CreationDate="2011-03-08T14:56:50.487" UserId="4828" Text="Team brainstorming" />
  <row Id="19612" PostHistoryTypeId="3" PostId="9493" RevisionGUID="1afb9bbb-dbfa-4f77-a3ae-12c286aa16ef" CreationDate="2011-03-08T14:56:50.487" UserId="4828" Text="&lt;game-design&gt;" />
  <row Id="19613" PostHistoryTypeId="2" PostId="9494" RevisionGUID="371a2cd9-cda1-42fe-baf4-1242767c45fa" CreationDate="2011-03-08T15:14:19.510" UserId="5955" Text="I have been reading the documentation for UDK about physical materials and masks.&#xD;&#xA;I have my 1bit BMP mask, and the two physical material assets I want to shoot off in the black and white channels.  &#xD;&#xA;I have applied my material to both a rigid body and to a skeletal mesh and neither apparently uses the mask.&#xD;&#xA;If I assign a regular physical material (one that doesn't use a mask) then it will work fine, but this defeats the point because it gives only one hit reaction.&#xD;&#xA;&#xD;&#xA;In the documentation it states that it is possible to extend a class on which we want to use a physical material based on the KActor class's usage.  How to do that?  Here is the quote: &quot;The following properties [ie, ImpactEffect - Particle system to spawn at the point of impact + ImpactSound - Sound to play when an impact occurs] allow you to attach sounds and effects to physical collisions. These only work on classes which support them, which at the moment is only KActor. By looking at the implementation in KActor though, you can add this functionality to other classes (or you can subclass KActor).&quot;&#xD;&#xA;&#xD;&#xA;Essentially, how to make sure a PhysicalMaterial mask actually works?  What code could be added to a skeletal mesh class perhaps, to get it going?  Any help appreciated." />
  <row Id="19614" PostHistoryTypeId="1" PostId="9494" RevisionGUID="371a2cd9-cda1-42fe-baf4-1242767c45fa" CreationDate="2011-03-08T15:14:19.510" UserId="5955" Text="UDK - How to make sure a PhysicalMaterial mask actually works?" />
  <row Id="19615" PostHistoryTypeId="3" PostId="9494" RevisionGUID="371a2cd9-cda1-42fe-baf4-1242767c45fa" CreationDate="2011-03-08T15:14:19.510" UserId="5955" Text="&lt;udk&gt;" />
  <row Id="19616" PostHistoryTypeId="2" PostId="9495" RevisionGUID="831d6899-438b-49b8-bfe0-6ae338a7491f" CreationDate="2011-03-08T15:39:37.077" UserId="5091" Text="Im developing a Flash game, and I can appreciate that the memory usage is a litle high (for a Flash game I think), let say, 100+ mbs.&#xD;&#xA;&#xD;&#xA;So, how much is too much when talking about memory usage in Flash gameS?&#xD;&#xA;&#xD;&#xA;Thx." />
  <row Id="19617" PostHistoryTypeId="1" PostId="9495" RevisionGUID="831d6899-438b-49b8-bfe0-6ae338a7491f" CreationDate="2011-03-08T15:39:37.077" UserId="5091" Text="How much is too much?" />
  <row Id="19618" PostHistoryTypeId="3" PostId="9495" RevisionGUID="831d6899-438b-49b8-bfe0-6ae338a7491f" CreationDate="2011-03-08T15:39:37.077" UserId="5091" Text="&lt;programming&gt;&lt;flash&gt;&lt;browser-based-games&gt;&lt;memory-efficiency&gt;" />
  <row Id="19619" PostHistoryTypeId="2" PostId="9496" RevisionGUID="5617d84e-9e82-487b-8426-0e9cfe1b2d51" CreationDate="2011-03-08T16:06:00.007" UserId="1198" Text="The answer depends on your target audience. Do you want people to play your flash game on their Netbook and/or their flash supporting Playbook or Android tablet? If so, then memory usage over and beyond 50 MB is likely going to be an issue. If you only expect your game to be played on tricked out gaming rigs, then taking up 100-400 MB memory is likely not going to be a problem. &#xD;&#xA;&#xD;&#xA;The issue, may be Flash's ability to address this much memory quickly. I'm not a flash developer so I don't really know, but if your game needs this much memory it probably has a lot of supporting code, which is where, even on &quot;gods-own-machine,&quot; you may run into issues." />
  <row Id="19620" PostHistoryTypeId="2" PostId="9497" RevisionGUID="a98c1a31-fd8c-4ffa-b7c9-9d53d9e2efdb" CreationDate="2011-03-08T16:08:06.417" UserId="2301" Text="According to your tags it says &quot;browser-based-games&quot; depending on the game and its complexity, I would say 100mb most likely too much, unless you are creating a large mmo style flash game(even that is very large!)&#xD;&#xA;&#xD;&#xA;There is a bunch of compression options you have for flash as well, which may shrink your game down&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;tiny: 0 - 200 KB;&#xD;&#xA;&#xD;&#xA;small: 200 - 700 KB&#xD;&#xA;&#xD;&#xA;Medium: 800 - 1400 KB&#xD;&#xA;&#xD;&#xA;Large: 1500 - 4000 KB&#xD;&#xA;&#xD;&#xA;too Large: 4000 - 9000 KB&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA; " />
  <row Id="19621" PostHistoryTypeId="2" PostId="9498" RevisionGUID="70c85613-55fd-480c-9eb0-02654a0c9156" CreationDate="2011-03-08T16:14:31.103" UserId="1430" Text="Brainstorming is sort of *supposed* to be loose and unstructured in order to facilitate a free flow of ideas. That said, it's usually possible to have an agreed-upon, firm guideline for what you're brainstorming about (game ideas, solutions to a technical problem, et cetera). Everybody should be aware of this guideline and do their part to ensure the meeting doesn't drift too far into the territory of brainstorming about things that are not germane to that guideline.&#xD;&#xA;&#xD;&#xA;During the meeting you should encourage people to both propose new ideas and to build upon ideas others have proposed. Usually you'll want to avoid criticizing ideas too much, though. One way I've seen to do this (although I've never done it myself) is to do things in two phases, where people first propose ideas by writing them on sticky notes and quietly sticking them to a whiteboard and afterwards all the ideas are discussed and built upon.&#xD;&#xA;&#xD;&#xA;Tools like whiteboards and sticky notes can be invaluable as means of expression in these sorts of sessions.&#xD;&#xA;&#xD;&#xA;Almost as important as how you run the meeting is what you do afterwards: even the most haphazard meeting will probably produce at least one reasonably actionable idea, so it's important that you have somebody dedicated to capturing all of the decent ideas and recording them in some notes somewhere.&#xD;&#xA;&#xD;&#xA;If you search Google for &quot;brainstorming meetings&quot; you get a lot of results. These two seem potentially interesting:&#xD;&#xA;&#xD;&#xA;  * http://www.scottberkun.com/essays/34-how-to-run-a-brainstorming-meeting/&#xD;&#xA;  * http://blog.brodzinski.com/2007/07/brainstorming-meetings-more-effective.html" />
  <row Id="19622" PostHistoryTypeId="5" PostId="9493" RevisionGUID="b3e87402-4ad5-4c6e-b190-23d5c9398dd3" CreationDate="2011-03-08T16:28:46.780" UserId="1430" Comment="spelling mostly" Text="I want to ask developers who works in small teams like 5-6 people, how can brainstorming look to do as much as possible? How does brainstorming look in your team ? I ask beacouse I remember my previous brainstorming meeting, and I know is very hard to coordinate it :/ We want to brainstorm about game design, game architecture, etc." />
  <row Id="19623" PostHistoryTypeId="5" PostId="9493" RevisionGUID="e59a3380-fa83-43fa-a8b5-2be440e15aff" CreationDate="2011-03-08T16:35:19.550" UserId="284" Comment="Correction of some grammar problems for clarity." Text="I want to ask developers who work in small teams, like 5-6 people, how can brainstorming accomplish as much as possible? What does brainstorming look like on your team ? I ask, because I remember my previous brainstorming meeting, and I know is very hard to co-ordinate it :/ We want to brainstorm about game design, game architecture and etc." />
  <row Id="19624" PostHistoryTypeId="24" PostId="9493" RevisionGUID="e59a3380-fa83-43fa-a8b5-2be440e15aff" CreationDate="2011-03-08T16:35:19.550" Comment="Proposed by 284 approved by 51 edit id of 69" />
  <row Id="19625" PostHistoryTypeId="5" PostId="9495" RevisionGUID="0a0e681b-88d4-435e-9072-157eea124cfe" CreationDate="2011-03-08T17:05:41.817" UserId="953" Comment="Fixed grammar and spelling, made title clearer." Text="I'm developing a Flash game, and I can appreciate that the memory usage is a little high for a Flash game (I think). Let's say 100+ MB.&#xD;&#xA;&#xD;&#xA;So how much is too much when talking about memory usage in Flash games?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="19626" PostHistoryTypeId="4" PostId="9495" RevisionGUID="0a0e681b-88d4-435e-9072-157eea124cfe" CreationDate="2011-03-08T17:05:41.817" UserId="953" Comment="Fixed grammar and spelling, made title clearer." Text="How much memory usage is too much in a Flash game?" />
  <row Id="19627" PostHistoryTypeId="5" PostId="9495" RevisionGUID="863739c3-a932-47a6-b986-0450b2129d70" CreationDate="2011-03-08T17:10:32.987" UserId="51" Comment="deleted 23 characters in body" Text="I'm developing a Flash game, and I can appreciate that the memory usage is a little high for a Flash game (I think). Let's say 100+ MB.&#xD;&#xA;&#xD;&#xA;So how much is too much when talking about memory usage in Flash games?&#xD;&#xA;" />
  <row Id="19628" PostHistoryTypeId="25" PostId="9495" RevisionGUID="70b111ab-406a-4a2b-9148-d8f58399d4dc" CreationDate="2011-03-08T17:23:15.310" Comment="http://twitter.com/#!/StackGameDev/status/45172741514596352" />
  <row Id="19629" PostHistoryTypeId="2" PostId="9499" RevisionGUID="508d9143-b042-4554-aa51-9bd0d4da97c6" CreationDate="2011-03-08T18:08:09.337" UserId="5958" Text="(Cross post from stackoverflow)&#xD;&#xA;&#xD;&#xA;I am creating a multiplayer 2D game for Mac and iOS devices. I'll be using cocso2d for graphics/game engine, however I am largely blank on what to use for multiplayer communication. Please note that I cannot use central severs e.g. SmartFox, RedDwarf, etc since I want the players to &quot;host&quot; games for others and be able to play it on their LAN, VPN or my own servers.&#xD;&#xA;&#xD;&#xA;Any pointers? I checked [lidgren](http://code.google.com/p/lidgren-network-gen3/) but it's for .NET only and hence not an option for me." />
  <row Id="19630" PostHistoryTypeId="1" PostId="9499" RevisionGUID="508d9143-b042-4554-aa51-9bd0d4da97c6" CreationDate="2011-03-08T18:08:09.337" UserId="5958" Text="Multiplayer game communication framework for mac/ios" />
  <row Id="19631" PostHistoryTypeId="3" PostId="9499" RevisionGUID="508d9143-b042-4554-aa51-9bd0d4da97c6" CreationDate="2011-03-08T18:08:09.337" UserId="5958" Text="&lt;multiplayer&gt;&lt;ios&gt;" />
  <row Id="19632" PostHistoryTypeId="2" PostId="9500" RevisionGUID="26e5b084-a78e-4d24-a783-538763cbba6c" CreationDate="2011-03-08T18:22:17.743" UserId="5959" Text="Have sophisticated adaptive programming, will travel - so to speak. I'm part of a group that developed sophisticated learning / adaptive software for robotics. The system &quot;thinks&quot; via its simulator, building and adapting code on its own; and then carries out the best solution. The software can also adapt to new situations, etc. &#xD;&#xA;http://mensnewsdaily.com/2007/05/16/robobusiness-robots-with-imagination/&#xD;&#xA;&#xD;&#xA;It's easy to imagine using it with automated game characters that will adapt to the players moves and style - the easiest example would be fighting. The more the simulated fighter fights with the human player, the more it learns to counter that players fighting skills. But there should be more.&#xD;&#xA;&#xD;&#xA;Anyone have any ideas as to how adaptive characters might be interesting in games?&#xD;&#xA;" />
  <row Id="19633" PostHistoryTypeId="1" PostId="9500" RevisionGUID="26e5b084-a78e-4d24-a783-538763cbba6c" CreationDate="2011-03-08T18:22:17.743" UserId="5959" Text="Adaptive Characters: AI Solution Needs a Problem" />
  <row Id="19634" PostHistoryTypeId="3" PostId="9500" RevisionGUID="26e5b084-a78e-4d24-a783-538763cbba6c" CreationDate="2011-03-08T18:22:17.743" UserId="5959" Text="&lt;programming&gt;&lt;android&gt;" />
  <row Id="19635" PostHistoryTypeId="5" PostId="9499" RevisionGUID="a413945d-9f9a-4893-a14a-e4887c30f4da" CreationDate="2011-03-08T18:34:04.890" UserId="5958" Comment="added 114 characters in body" Text="(Cross post from stackoverflow)&#xD;&#xA;&#xD;&#xA;I am creating a multiplayer 2D game for Mac and iOS devices. I'll be using cocso2d for graphics/game engine, however I am largely blank on what to use for multiplayer communication. Please note that I cannot use central severs e.g. SmartFox, RedDwarf, etc since I want the players to &quot;host&quot; games for others and be able to play it on their LAN, VPN or my own servers.&#xD;&#xA;&#xD;&#xA;Any pointers? I checked [lidgren](http://code.google.com/p/lidgren-network-gen3/) but it's for .NET only and hence not an option for me.&#xD;&#xA;&#xD;&#xA;EDIT: just in case it wasn't clear, the messaging has to be real time hence it's probably going to be over UDP" />
  <row Id="19636" PostHistoryTypeId="6" PostId="9500" RevisionGUID="cf907751-2617-4fea-8ac7-fc320b49ed33" CreationDate="2011-03-08T19:35:11.850" UserId="1156" Comment="edited tags" Text="&lt;programming&gt;&lt;android&gt;&lt;ai&gt;" />
  <row Id="19637" PostHistoryTypeId="6" PostId="9499" RevisionGUID="ed42aa14-b1c6-420c-a080-9f68515f2703" CreationDate="2011-03-08T19:38:05.690" UserId="1198" Comment="edited tags" Text="&lt;architecture&gt;&lt;multiplayer&gt;&lt;network&gt;&lt;ios&gt;" />
  <row Id="19638" PostHistoryTypeId="2" PostId="9501" RevisionGUID="a9a9da3a-1699-4c90-bc11-9b38ab7f04ca" CreationDate="2011-03-08T19:38:14.713" UserId="284" Text="I think that the most important aspect of brainstorming is that someone write stuff down (type it, perhaps even digital-voice-record it, for later transcription/summarization), otherwise it's easy to forget intricacies of ideas that make them good.&#xD;&#xA;&#xD;&#xA;I've had great success in using an online todo list (via http://basecamphq.com basecamp) for a continuous brainstorm.  When I come up with an idea (e.g. when I'm out at a restaurant), I write it down, stick it in my pocket, and add it to the online todo list later.  Then, when it comes time to actually code, I pick stuff from the todo list that I actually want to do and are high priority." />
  <row Id="19639" PostHistoryTypeId="2" PostId="9502" RevisionGUID="80d66240-41a7-498c-8b45-6838585883b8" CreationDate="2011-03-08T19:44:25.887" UserId="5250" Text="Is it really that expensive to check one pixel for transparency every frame?&#xD;&#xA;Of course, you only check if the cursor is within the sprites bounding box.&#xD;&#xA;&#xD;&#xA;Assuming you use BufferedImage to hold your image data, you can dom something along this (sorry, code is really not exact, look up how BufferedImage work):&#xD;&#xA;&#xD;&#xA;    image.getRaster().getPixel(x, y, array);&#xD;&#xA;    alpha = array[4]&#xD;&#xA;    if (alpha &gt; 0.5f) { ...&#xD;&#xA;&#xD;&#xA;Area can be used for operations between shapes (such as add and subtract). It's fairly easy to make a algorithm that cover an area with as few rectangles as possible (if you don't want it to have the guaranteed best solution). Cover all opaque pixels with rects and leave out the transparent ones. Use the Area class for unifying them into a single path. BUT, I think that checking the sprite for transparency is more efficient." />
  <row Id="19640" PostHistoryTypeId="2" PostId="9503" RevisionGUID="e50060c1-e2ed-47e4-8450-368c74f9238b" CreationDate="2011-03-08T19:51:52.593" UserId="1198" Text="You don't want to be hosting any games from an iOS device, so you are probably looking for something to run on OSX.&#xD;&#xA;&#xD;&#xA;I'm not sure how lidgren works or if it is Mono compatible, but the [Mono][1] project has done an excellent job of bringing .NET to OSX and Linux. I highly recommend you look into it, especially if your library of choice is .NET.&#xD;&#xA;&#xD;&#xA;The server architecture and platform don't dictate what the client must use, so having a Mono/.NET lidgren server and an iOS (Objective-C) client should be just fine; however, there is [MonoTouch][2] which brings .NET and C# to iOS, so you *could* use that if you felt like it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Main_Page&#xD;&#xA;  [2]: http://monotouch.net/" />
  <row Id="19641" PostHistoryTypeId="25" PostId="9499" RevisionGUID="78679bd0-4265-4e6f-b098-89ea0e9a7339" CreationDate="2011-03-08T20:23:15.583" Comment="http://twitter.com/#!/StackGameDev/status/45218040224288768" />
  <row Id="19642" PostHistoryTypeId="2" PostId="9504" RevisionGUID="9926fc55-4b3d-4356-87c3-b25378c2905c" CreationDate="2011-03-08T20:35:05.350" UserId="5001" Text="FWIW, I was helping out a family member complaining of a slow PC. She plays CafeWorld on facebook. Investigation lead to Firefox/the flash plugin taking up almost a gigabyte of memory usage. I thought this might have been a fluke, having experienced many browser-based memory leaks over the years, closed everything and tried it with another browser. I watched the memory usage as it slowly crawled back up to the 970~ mb mark as all the game's various assets loaded.&#xD;&#xA;&#xD;&#xA;Absurd, but I'm sure you can point at the game and say it has millions of users. (yup, just checked, 14 million monthly users, blah)" />
  <row Id="19643" PostHistoryTypeId="2" PostId="9505" RevisionGUID="43a5f359-6cea-40bb-a395-6a4ba42f883f" CreationDate="2011-03-08T21:23:24.400" UserId="5768" Text="I just ordered this book. It's looking like the most up to date resource. It's really cheap on amazon too. &#xD;&#xA;&#xD;&#xA;http://www.amazon.ca/Beginning-Java-Game-Programming/dp/1435458087/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1299619288&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;I checked out the old editions and they seem pretty solid.&#xD;&#xA;&#xD;&#xA;You might consider a framework though like LWJGL or Java Monkey Engine but definitely check out JOGL once you get a hold on the basics as it's a popular wrapper around openGL and there are tons of tutorials out there on it." />
  <row Id="19644" PostHistoryTypeId="2" PostId="9506" RevisionGUID="b684e80b-865d-41f9-a059-59c814225609" CreationDate="2011-03-08T21:31:43.723" UserId="891" Text="Take a look at Valve's director in Left 4 Dead and Left 4 Dead 2.  Using adaptive AI in this aspect may add interesting gameplay dynamics and replayability when the AI learns that there is a set predictable gameplay strategy that players tend to use or abuse.&#xD;&#xA;&#xD;&#xA;It would be interesting if AI could evolve to suit an expected gameplay time.  So scale harder if a player is blazing through a level, but scale it easier if players are having difficulties.  Gameplay valve for a fitness function, maybe someday." />
  <row Id="19645" PostHistoryTypeId="2" PostId="9507" RevisionGUID="2dbbaac9-1cf7-4c4c-bff7-a64b66a7a727" CreationDate="2011-03-08T22:17:51.887" UserId="5962" Text="I too am in the ongoing process of building a Java-based game engine.  I'd be glad to talk about my design and rationale, its known pros and cons, and share code if you're interested.  The web page is pretty outdated but it's a place to start:  [The MHFramework Project][1] is very much a work in progress.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.michaeljhenson.info/mhframework.html" />
  <row Id="19646" PostHistoryTypeId="25" PostId="9493" RevisionGUID="378f2b0d-4d9f-43c1-a130-94c141208b46" CreationDate="2011-03-08T23:23:15.360" Comment="http://twitter.com/#!/StackGameDev/status/45263338204176384" />
  <row Id="19647" PostHistoryTypeId="2" PostId="9508" RevisionGUID="ade4526f-45ee-47da-b3a4-54b54fb14bf3" CreationDate="2011-03-08T23:31:49.590" UserId="5965" Text="i sent an email to RICKET he answered my question by referring me to this fantastic&#xD;&#xA;community! he said if i should have another question to ask it here so here i go -&#xD;&#xA;&#xD;&#xA;when you set a personal best lap time in a console racing game. you have the option&#xD;&#xA;to compete against your ghost.&#xD;&#xA;&#xD;&#xA;how can this feature be available for a single player casual type game?&#xD;&#xA;&#xD;&#xA;Thank You,  " />
  <row Id="19648" PostHistoryTypeId="1" PostId="9508" RevisionGUID="ade4526f-45ee-47da-b3a4-54b54fb14bf3" CreationDate="2011-03-08T23:31:49.590" UserId="5965" Text="The best way to include your personal best ghost in a short single player game?" />
  <row Id="19649" PostHistoryTypeId="3" PostId="9508" RevisionGUID="ade4526f-45ee-47da-b3a4-54b54fb14bf3" CreationDate="2011-03-08T23:31:49.590" UserId="5965" Text="&lt;game-design&gt;" />
  <row Id="19650" PostHistoryTypeId="2" PostId="9509" RevisionGUID="f436a220-c9f0-48bb-9b75-a5b321dfb573" CreationDate="2011-03-08T23:57:31.890" UserId="2778" Text="It depends on the technology you're working with. Hence, we can't really discuss of the best way, since it might change from a technology to another. The the gross idea in my opinion would be the following:&#xD;&#xA;&#xD;&#xA;1. Use an underlying data store to persist your data (XML, Cookies, Database, CSV, other...);&#xD;&#xA;2. Work your data access to this underlying data store;&#xD;&#xA;3. You need to keep information data about the best score of a player, so an identifier is required (email, input name, else...);&#xD;&#xA;4. Associate this best score to the identifier one way or another.&#xD;&#xA;&#xD;&#xA;In short, assuming the use of a database, we could have two tables:&#xD;&#xA;&#xD;&#xA;1. Users/players data (identifier, email, etc.);&#xD;&#xA;2. Best score board information data.&#xD;&#xA;&#xD;&#xA;Then, you could save the user information along with individual scoreboard which could, if desired, contain date and time registry as to when this score has been achieved.&#xD;&#xA;&#xD;&#xA;I hope this helps and that I have correctly understood the question. Otherwise, please tell so that I may edit my answer accordingly." />
  <row Id="19651" PostHistoryTypeId="5" PostId="9508" RevisionGUID="14ca99a8-47bd-48ea-8782-61906447032c" CreationDate="2011-03-09T00:11:01.710" UserId="51" Comment="deleted 185 characters in body; edited tags" Text="When you set a personal best lap time in a console racing game, you have the option&#xD;&#xA;to compete against your ghost.&#xD;&#xA;&#xD;&#xA;How can this feature be available for a single player casual type game?&#xD;&#xA;" />
  <row Id="19652" PostHistoryTypeId="6" PostId="9508" RevisionGUID="14ca99a8-47bd-48ea-8782-61906447032c" CreationDate="2011-03-09T00:11:01.710" UserId="51" Comment="deleted 185 characters in body; edited tags" Text="&lt;architecture&gt;&lt;game-recording&gt;" />
  <row Id="19653" PostHistoryTypeId="2" PostId="9510" RevisionGUID="06b04295-f9fe-46b9-afb7-4b7dca720159" CreationDate="2011-03-09T00:40:35.393" UserId="4443" Text="Disclaimer: I have not programmed for the android.&#xD;&#xA;&#xD;&#xA;There might be two things going on here.. When rotating pretty much anything you want to do it around the center point of the object in question.. So where you are calculating the center for the current sprite shown (width and height divided by two) you may also need to include the current frame offset. The m.preRotate() may be handling this but I am not sure, and this would skew the frames aside from the initial one.&#xD;&#xA;&#xD;&#xA;Second is if you are using all 66 texels (pixels of a texture) of the frame, then when you start rotating and it does the sampling of the texture through rotation to screen pixel coordinates you will start noticing fuzzy or jagged edges. You may want to put a little padding on your animation frames or 1-2 pixels per edge so your animations are 68 or 70 texels wide. This hides the fuzzy or jagged edges by making it blend together completely transparent texels into a screen pixel.&#xD;&#xA;&#xD;&#xA;Hope this might give you some things to look into, but again, I have not programmed for an android before so I have no way to test this.. Just issues I have run into on the PSP and Zunes over the years." />
  <row Id="19654" PostHistoryTypeId="2" PostId="9511" RevisionGUID="b58b744d-54a0-46ba-b933-8c25987a4f14" CreationDate="2011-03-09T01:19:44.807" UserId="5624" Text="I've worked using maya for animation and more film orientated projects however I am also focusing on my studies on video game development (eventually want to be either programmer or some sort of TD with programming and 3D skills). Anyways, I was talking with one of my professor and we couldn't figure out why all game engines (that I know of) convert to triangles. Anyone happen to know why game engines convert to triangles compared to leaving the models as four sided polygons? Also what are the pros and cons (if any) of doing this?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;" />
  <row Id="19655" PostHistoryTypeId="1" PostId="9511" RevisionGUID="b58b744d-54a0-46ba-b933-8c25987a4f14" CreationDate="2011-03-09T01:19:44.807" UserId="5624" Text="Why do game engines convert models to triangles compared to keeping it as four side polygon" />
  <row Id="19656" PostHistoryTypeId="3" PostId="9511" RevisionGUID="b58b744d-54a0-46ba-b933-8c25987a4f14" CreationDate="2011-03-09T01:19:44.807" UserId="5624" Text="&lt;3d-engines&gt;&lt;triangles&gt;&lt;maya&gt;" />
  <row Id="19657" PostHistoryTypeId="2" PostId="9512" RevisionGUID="f9ca7958-8e0c-463b-8263-27f9ee2c1bec" CreationDate="2011-03-09T01:24:03.107" UserId="1198" Text="The bottom line, is Triangle Rasterization, which is how computers render objects to the screen. Though others say it more elquently than I:&#xD;&#xA;&#xD;&#xA;&gt;All 3D objects that we see on the computer screen are actually made of tiny little geometrical objects often called primitives. Quadrilaterals, triangles, n-gons etc. are example of primitives. We will concentrate on triangles mostly because of one main reason: **every object can be split into triangles but a triangle cannot be split into anything else than triangles.** Because of this, drawing triangles is a lot simpler than drawing polygons of higher order; less things to deal with. This is why those triangles are so commonly used in computer graphics.&#xD;&#xA;&#xD;&#xA;Emphasis mine. Source: http://www.devmaster.net/articles/software-rendering/part3.php" />
  <row Id="19658" PostHistoryTypeId="2" PostId="9513" RevisionGUID="19910ba4-5bd4-4fbd-82f2-ad1960db449f" CreationDate="2011-03-09T01:51:00.010" UserId="4082" Text="Triangles have many properties that make them easier, and therefore faster, to draw.&#xD;&#xA;&#xD;&#xA;Four points or more may not be on the same plane, but three points always are (ignoring degenerate cases). This has the interesting property that scalar values vary linearly over the surface of the triangle. Even when the triangle is projected on the screen, scalar values still vary linearly respect to x'/z and y'/z.&#xD;&#xA;&#xD;&#xA;This, in turn, means most if not all of what's needed to shade, texture map, and depth filter a triangle can be calculated using linear interpolation which can be done extremely fast in specialized hardware.&#xD;&#xA;&#xD;&#xA;tl;dr: triangles are the simplest primitive, so algorithms dealing with triangles can be heavily optimized." />
  <row Id="19659" PostHistoryTypeId="2" PostId="9514" RevisionGUID="39da9fb3-2f37-48a7-a0e3-6f56b4e71b1a" CreationDate="2011-03-09T01:54:12.967" UserId="5966" Text="I'm complete newbie on game server work.&#xD;&#xA;As I know online game server should keep some TCP or UDP connection from the user. As I (=newbie) guess, maybe huge count of socket port should be opened. So how should I configure firewall for game server? Or should I use some other special method to security?  Any advise will be appreciated." />
  <row Id="19660" PostHistoryTypeId="1" PostId="9514" RevisionGUID="39da9fb3-2f37-48a7-a0e3-6f56b4e71b1a" CreationDate="2011-03-09T01:54:12.967" UserId="5966" Text="How should I configure firewall for online game server?" />
  <row Id="19661" PostHistoryTypeId="3" PostId="9514" RevisionGUID="39da9fb3-2f37-48a7-a0e3-6f56b4e71b1a" CreationDate="2011-03-09T01:54:12.967" UserId="5966" Text="&lt;server&gt;&lt;security&gt;" />
  <row Id="19662" PostHistoryTypeId="2" PostId="9515" RevisionGUID="cb3d97da-6fe3-443d-94d9-261a65d96c66" CreationDate="2011-03-09T01:55:23.397" UserId="2029" Text="I've read two other threads here on movement:&#xD;&#xA;http://gamedev.stackexchange.com/questions/6825/time-based-movement-vs-frame-rate-based-movement, and &#xD;&#xA;http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;&#xD;&#xA;but I think I'm lacking a basic understanding of frame independent movement because I don't understand what either of those threads are talking about.&#xD;&#xA;&#xD;&#xA;I'm following along with lazyfoo's SDL tutorials and came upon the frame independent lesson. http://lazyfoo.net/SDL_tutorials/lesson32/index.php&#xD;&#xA;&#xD;&#xA;I'm not sure what the movement part of the code is trying to say but I think it's this (please correct me if I'm wrong):&#xD;&#xA;In order to have frame independent movement, we need to find out how far an object (ex. sprite) moves within a certain time frame, for example 1 second. If the dot moves at 200 pixels per second, then I need to calculate how much it moves within that second by multiplying 200 pps by 1/1000 of a second.&#xD;&#xA;&#xD;&#xA;Is that right? The lesson says:&#xD;&#xA;&#xD;&#xA;&quot;velocity in pixels per second * time since last frame in seconds.&#xD;&#xA;So if the program runs at 200 frames per second: 200 pps * 1/200 seconds = 1 pixel&quot;&#xD;&#xA;&#xD;&#xA;But...I thought we were multiplying 200 pps by 1/1000th of a second. What is this business with frames per second?&#xD;&#xA;&#xD;&#xA;I'd appreciate if someone could give me a little bit more detailed explanation as to how frame independent movement works.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="19663" PostHistoryTypeId="1" PostId="9515" RevisionGUID="cb3d97da-6fe3-443d-94d9-261a65d96c66" CreationDate="2011-03-09T01:55:23.397" UserId="2029" Text="Frame Independent Movement" />
  <row Id="19664" PostHistoryTypeId="3" PostId="9515" RevisionGUID="cb3d97da-6fe3-443d-94d9-261a65d96c66" CreationDate="2011-03-09T01:55:23.397" UserId="2029" Text="&lt;frame-rate&gt;" />
  <row Id="19665" PostHistoryTypeId="2" PostId="9516" RevisionGUID="71c193d3-3461-4d41-9135-4df84b9258b0" CreationDate="2011-03-09T02:05:07.737" UserId="154" Text="Ghosts are typically done by displaying a replay of a previous attempt. This replay is rendered with a non-collidable version of the players car so that you can't affect it. Since racing games often have a replay feature anyway this kind of comes along for free.&#xD;&#xA;&#xD;&#xA;Here is a good starting point for building a replay system:&#xD;&#xA;http://www.gamasutra.com/view/feature/2029/developing_your_own_replay_system.php&#xD;&#xA;&#xD;&#xA;Also there are a number of questions here on that topic:&#xD;&#xA;&#xD;&#xA; * http://gamedev.stackexchange.com/questions/6080/how-to-design-a-replay-system&#xD;&#xA; * http://gamedev.stackexchange.com/questions/5402/how-do-you-design-a-record-replay-system-for-a-frequently-changing-game&#xD;&#xA; * http://gamedev.stackexchange.com/questions/7098/time-control-in-a-2d-platformer&#xD;&#xA;" />
  <row Id="19666" PostHistoryTypeId="2" PostId="9517" RevisionGUID="80cc2db8-8476-4b06-bb05-2e8467c57be3" CreationDate="2011-03-09T02:19:23.600" UserId="154" Text="Here are a few things that help:&#xD;&#xA;&#xD;&#xA; * Brainstorming inherently goes slightly off topic so try to make each session about a fairly narrow topic area. Otherwise the sessions can drift into full tangent land, which is fun but not particularly productive.&#xD;&#xA; * Use a whiteboard, post-it notes or a projector to put the ideas up in front of everyone. Often a earlier idea can trigger a later one if you can see them all up in one place. Also this cuts down on the discussion recycling concepts since you can see they were already suggested.&#xD;&#xA; * When writing the ideas down try to give them a rough visual grouping. Doesn't have to be good but it will help later.&#xD;&#xA; * When you get towards the end of the session do basic pairing down. There are a few simple steps to help with this.&#xD;&#xA;&#xD;&#xA;  1. Quickly attempt to group ideas in categories, either drawing circles around them on the whiteboard or moving the post-it notes. You should have been doing a bit of this while writing them down but now you can use the help of the group to collect them into more thoughtful categories.&#xD;&#xA;  1.  Have everyone indicate their top three ideas. You'll tend to get a clustering of the more popular ideas that will have more potential than others. It's important to limit the number of votes people have in this stage as it focuses them to the stuff they think will work, not just find amusing.&#xD;&#xA;" />
  <row Id="19667" PostHistoryTypeId="25" PostId="9511" RevisionGUID="6722af43-4e4c-40d4-a0db-87ad56e04e87" CreationDate="2011-03-09T02:23:15.633" Comment="http://twitter.com/#!/StackGameDev/status/45308636645429248" />
  <row Id="19668" PostHistoryTypeId="2" PostId="9518" RevisionGUID="dd4c1e49-837c-42fb-bebb-6ee1156f5cf5" CreationDate="2011-03-09T02:38:57.967" UserId="3547" Text="Frame independent movement works by basing movement off of time. You get the amount of time that is spend since the last frame (so if there are 60 frames in one second, each frame takes 1000/60 milliseconds, if all the frames took the same amount of time) and find out how much movement that translates into. &#xD;&#xA;&#xD;&#xA;If you want your entity to move a certain amount of space for a specified unit of time (we will say 100 pixels for every second of time) then you can find out how many pixels you should move per frame by multiplying the amount of movement per second (100 pixels) by the amount of time passed in seconds (1000 / 60) in order to figure out how much movement should take place in the current frame.&#xD;&#xA;&#xD;&#xA;It works by figuring out how much movement you should perform per frame by using the amount of time elapsed and a speed that is defined with some unit of time (seconds or milliseconds are preferable)&#xD;&#xA;&#xD;&#xA;I hope that made some kind of sense to you.&#xD;&#xA;&#xD;&#xA;I want to move my guy 200 pixels to the right every second. If the current frame is run 50 milliseconds after the previous frame, then I should move my guy a fraction of the speed previously specified (which was 200 pixels).&#xD;&#xA;I should move him 50/1000th of the distance because only a 1/20th (50/1000 = 1/20) of time has passed. Therefore it would make sense to only move him 10 pixels (if 19 more frames occurred, 50 seconds apart from each other, then the total amount of movement in that second would be 200 pixels, the amount we wanted).&#xD;&#xA;&#xD;&#xA;Frames per second : This is the amount of frames that take place per second. Usually a frame rate is either how many times the game is drawn/rendered a second or how many times the game loop is completed a second." />
  <row Id="19669" PostHistoryTypeId="5" PostId="9518" RevisionGUID="bdb4e281-e4ed-4db4-b439-4faf79b4c15c" CreationDate="2011-03-09T02:56:39.900" UserId="3547" Comment="added 556 characters in body" Text="Frame independent movement works by basing movement off of time. You get the amount of time that is spend since the last frame (so if there are 60 frames in one second, each frame takes 1000/60 milliseconds, if all the frames took the same amount of time) and find out how much movement that translates into. &#xD;&#xA;&#xD;&#xA;If you want your entity to move a certain amount of space for a specified unit of time (we will say 100 pixels for every second of time) then you can find out how many pixels you should move per frame by multiplying the amount of movement per second (100 pixels) by the amount of time passed in seconds (1000 / 60) in order to figure out how much movement should take place in the current frame.&#xD;&#xA;&#xD;&#xA;It works by figuring out how much movement you should perform per frame by using the amount of time elapsed and a speed that is defined with some unit of time (seconds or milliseconds are preferable)&#xD;&#xA;&#xD;&#xA;I hope that made some kind of sense to you.&#xD;&#xA;&#xD;&#xA;I want to move my guy 200 pixels to the right every second. If the current frame is run 50 milliseconds after the previous frame, then I should move my guy a fraction of the speed previously specified (which was 200 pixels).&#xD;&#xA;I should move him 50/1000th of the distance because only a 1/20th (50/1000 = 1/20) of time has passed. Therefore it would make sense to only move him 10 pixels (if 19 more frames occurred, 50 seconds apart from each other, then the total amount of movement in that second would be 200 pixels, the amount we wanted).&#xD;&#xA;&#xD;&#xA;Frames per second : This is the amount of frames that take place per second. Usually a frame rate is either how many times the game is drawn/rendered a second or how many times the game loop is completed a second.&#xD;&#xA;&#xD;&#xA;Fixed Verse Variable Time Step : This refers to the amount of time between frames. Usually, the time between frames will not be constant. Certain systems/cores like physics will need some unit of time in order to simulate/run something. Usually, physics systems are more stable/scalable if the time step is fixed. The difference between fixed/variable time steps are in the names. Fixed time steps are what they sound like: time steps that occur at a fixed rate of time. Variable time steps are time steps that occur at varying/different rates of time." />
  <row Id="19672" PostHistoryTypeId="2" PostId="9520" RevisionGUID="69a28659-ab45-42bd-b090-42ffc374a479" CreationDate="2011-03-09T04:08:25.160" UserId="5929" Text="How can I detect the 'steepness' of a curve? For example, if the user swipes their finger across the screen in a curve, what's the best way of detecting whether the curve is almost a semi-circle, or whether it's straight? &#xD;&#xA;&#xD;&#xA;Is it also possible to extend this to possibly recognise multiple curves (e.g. a sigmoidal shape)?&#xD;&#xA;&#xD;&#xA;Thanks for any advice" />
  <row Id="19673" PostHistoryTypeId="1" PostId="9520" RevisionGUID="69a28659-ab45-42bd-b090-42ffc374a479" CreationDate="2011-03-09T04:08:25.160" UserId="5929" Text="Calculating and detecting curves" />
  <row Id="19674" PostHistoryTypeId="3" PostId="9520" RevisionGUID="69a28659-ab45-42bd-b090-42ffc374a479" CreationDate="2011-03-09T04:08:25.160" UserId="5929" Text="&lt;xna&gt;&lt;math&gt;&lt;algorithm&gt;&lt;touch&gt;" />
  <row Id="19675" PostHistoryTypeId="5" PostId="9514" RevisionGUID="baa1aeaf-6bee-4c92-b31f-6f8ce2bbe2b5" CreationDate="2011-03-09T04:41:23.663" UserId="5966" Comment="added 22 characters in body; added 1 characters in body" Text="I'm complete newbie on game server work.&#xD;&#xA;As I know, online (massively multiplay) game server should keep some TCP or UDP connection from the user. As I (=newbie) guess, maybe huge count of socket port should be opened. So how should I configure firewall for game server? Or should I use some other special method to security?  Any advise will be appreciated." />
  <row Id="19676" PostHistoryTypeId="2" PostId="9521" RevisionGUID="66fe4edd-1ee3-40c0-821f-a8d2b05149bb" CreationDate="2011-03-09T04:42:23.197" UserId="2111" Text="For the curve or straight line problem, I think I'd keep a list of the positions of old input. Then, I'd check the slope between every point (delta Y / delta X). If the slope does not change a lot, then it's probably a line. If it varies a lot, it's probably a curve. You could use a limit representing the slope difference that determines if the input is a line or a curve." />
  <row Id="19677" PostHistoryTypeId="25" PostId="9520" RevisionGUID="07c2c91d-471e-4d97-b761-fd1b526373f7" CreationDate="2011-03-09T05:23:16.563" Comment="http://twitter.com/#!/StackGameDev/status/45353938828005376" />
  <row Id="19678" PostHistoryTypeId="5" PostId="9521" RevisionGUID="c8724c39-81a3-4877-a6ef-eadaeb520489" CreationDate="2011-03-09T05:35:21.777" UserId="2111" Comment="added 1815 characters in body; deleted 80 characters in body; deleted 1 characters in body" Text="For the curve or straight line problem, I think I'd keep a list of the positions of old input. Then, I'd check the slope between every point (delta Y / delta X). If the slope does not change a lot, then it's probably a line. If it varies a lot, it's probably a curve. You could use a limit representing the slope difference that determines if the input is a line or a curve.&#xD;&#xA;&#xD;&#xA;So, if I had to implement such a functionality, I think I'd go like this:&#xD;&#xA;&#xD;&#xA;    List&lt;Vector2&gt; inputPositions = new List&lt;Vector2&gt;();//the old input positions&#xD;&#xA;&#xD;&#xA;then I'd find the slopes between every position:&#xD;&#xA;&#xD;&#xA;    float deltaY = 0f;&#xD;&#xA;    float deltaX = 0f;&#xD;&#xA;    List&lt;float&gt; slopes = new List&lt;float&gt;();&#xD;&#xA;    for (int i = 0; i &lt; inputPositions.Count - 1; ++i)//check all the positions except the last one&#xD;&#xA;    {&#xD;&#xA;        deltaY = inputPositions[i + 1].Y - inputPositions[i].Y;//next pos.Y - current.Y&#xD;&#xA;        deltaX = inputPositions[i + 1].X - inputPositions[i].X;//next pos.X - current.X&#xD;&#xA;&#xD;&#xA;        if (deltaX != 0.0f)//prevent division by 0&#xD;&#xA;        {&#xD;&#xA;            slopes.Add(deltaY / deltaX);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            //I'm not really sure about using these values, but basically it&#xD;&#xA;            //means that the movement was vertical&#xD;&#xA;            slopes.Add(deltaY &gt; 0.0f ? float.MaxValue : float.MinValue);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;then you can analyse the results to see if the slope difference was too huge.&#xD;&#xA;&#xD;&#xA;    bool IsLine(List&lt;float&gt; slopes)&#xD;&#xA;    {&#xD;&#xA;        const float IS_NOT_LINE_SLOPE_DIFF = 0.05f;//find an appropriate constant for your program&#xD;&#xA;&#xD;&#xA;        float slopeVariation = 0f;&#xD;&#xA;        for (int i = 0; i &lt; slopes.Count - 1; ++i)//check all but the last element&#xD;&#xA;        {&#xD;&#xA;            slopeVariation = slopes[i] - slopes[i + 1];&#xD;&#xA;            if (Math.Abs(slopeVariation) &gt;= IS_NOT_LINE_SLOPE_DIFF)&#xD;&#xA;                 return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You could even get the median of the slope variations to get a more general result.&#xD;&#xA;&#xD;&#xA;Sure, this isn't the cleanest and certainly not the best way to solve your problem, but that's the way I would go to do it. " />
  <row Id="19679" PostHistoryTypeId="5" PostId="9488" RevisionGUID="f413ed35-a96f-42ef-9069-8826e721d43e" CreationDate="2011-03-09T07:46:47.353" UserId="5946" Comment="deleted 3 characters in body" Text="CONS&#xD;&#xA;&#xD;&#xA;the most important thing &gt; **&quot;control you character&quot;**&#xD;&#xA;&#xD;&#xA;Unity &quot;**CRAP** character controller&quot; can´t be pushed by rigid bodies (moving e rotating platforms,walls,etc...)&#xD;&#xA;&#xD;&#xA;you can &quot;ONLY&quot; stay on top of a moving platform! can you believe it?&#xD;&#xA;if you doubt it so read the documentation!&#xD;&#xA;&#xD;&#xA;you can´t make a 3d platform game = super mario galaxy &#xD;&#xA;with a lot of dynamic obstacles that interacting with it,with Unity3D.&#xD;&#xA;&#xD;&#xA;but unity fanboys don´t care because &#xD;&#xA;this fact will not prevent him from continuing to create that pile of iphone &quot;apps&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19680" PostHistoryTypeId="2" PostId="9522" RevisionGUID="7973c9e6-cba7-4a81-844e-d42cfa9b893c" CreationDate="2011-03-09T08:08:42.267" UserId="3830" Text="Three points (a triangle) ALWAYS define a flat plane.  In other words, given any three points, you can always create a flat plane that can cut through all three points.  However the same is not true of four points.  You can have four points all on a plane, but you can also have four points that aren't on a plane.&#xD;&#xA;" />
  <row Id="19681" PostHistoryTypeId="25" PostId="9515" RevisionGUID="adca86c4-4848-41b9-b098-fcc8affc4bd2" CreationDate="2011-03-09T08:23:16.310" Comment="http://twitter.com/#!/StackGameDev/status/45399237617397760" />
  <row Id="19682" PostHistoryTypeId="2" PostId="9523" RevisionGUID="5cf3774c-8509-42b0-81b6-90651075870d" CreationDate="2011-03-09T08:49:37.540" UserId="5973" Text="I work for a school project on a rendering real time demo. Here a link to the video :[http://www.youtube.com/watch?v=Gj4vvlWuL8E][1]&#xD;&#xA;You will find a a link to the source code too if you are interrested. It has lots of shader effect, like water, shadow, parralax toon, motion blur, depth of field etc...&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=Gj4vvlWuL8E" />
  <row Id="19683" PostHistoryTypeId="2" PostId="9524" RevisionGUID="922c072a-5860-4170-91f8-22dcb98b33d0" CreationDate="2011-03-09T09:11:42.040" UserId="4513" Text="This subject, as with any optimisation problem, gets hit on a lot, but I just couldn't find what I (think) I want.&#xD;&#xA;&#xD;&#xA;A lot of tutorials, and even SO questions have similar tips; generally covering:&#xD;&#xA;&#xD;&#xA; - Use GL face culling (the OpenGL function, not the scene logic)&#xD;&#xA; - Only send 1 matrix to the GPU (projectionModelView combination), therefore decreasing the MVP calculations from per vertex to once per model (as it should be).&#xD;&#xA; - Use interleaved Vertices&#xD;&#xA; - Minimize as many GL calls as possible, batch where appropriate&#xD;&#xA;&#xD;&#xA;And possibly a few/many others. I am (for curiosity reasons) rendering 28 million triangles in my application using several vertex buffers. I have tried all the above techniques (to the best of my knowledge), and received almost no performance change.&#xD;&#xA;&#xD;&#xA;Whilst I am receiving around 40FPS in my implementation, which is by no means problematic, I am still curious as to where these optimisation 'tips' actually come into use?&#xD;&#xA;&#xD;&#xA;My CPU is idling around 20-50% during rendering, therefore I *assume* I am GPU bound for increasing performance.&#xD;&#xA;&#xD;&#xA;**Note:** I am looking into gDEBugger at the moment&#xD;&#xA;&#xD;&#xA;Cross posted at [StackOverflow][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5243411/opengl-performance-questions" />
  <row Id="19684" PostHistoryTypeId="1" PostId="9524" RevisionGUID="922c072a-5860-4170-91f8-22dcb98b33d0" CreationDate="2011-03-09T09:11:42.040" UserId="4513" Text="OpenGL Performance Questions" />
  <row Id="19685" PostHistoryTypeId="3" PostId="9524" RevisionGUID="922c072a-5860-4170-91f8-22dcb98b33d0" CreationDate="2011-03-09T09:11:42.040" UserId="4513" Text="&lt;c++&gt;&lt;opengl&gt;&lt;performance&gt;&lt;optimization&gt;&lt;sdl&gt;" />
  <row Id="19687" PostHistoryTypeId="2" PostId="9526" RevisionGUID="f1811349-eab7-41ee-8ce9-b7370b5da5e0" CreationDate="2011-03-09T09:22:54.503" UserId="5824" Text="For maximum security when configuring the firewall you want to leave open any ports that people will need to play the game, and close all others. You may also want to allow ping (ICMP) through.&#xD;&#xA;&#xD;&#xA;At the very least this will mean blocking the first 1024 ports.&#xD;&#xA;&#xD;&#xA;That should leave the only security issues that can be remotely exploited to be those in the game server itself, so that will need to be coded with security in mind.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers" />
  <row Id="19688" PostHistoryTypeId="2" PostId="9527" RevisionGUID="88474774-747b-465e-a91c-def096e59d9e" CreationDate="2011-03-09T09:42:28.337" UserId="5378" Text="I've followed a tutorial that uses the XNA 4 SkinnedEffect for my animation on that model . How can i also make a shadow for my SkinnedEffect model ? &#xD;&#xA;&#xD;&#xA;Thanks !" />
  <row Id="19689" PostHistoryTypeId="1" PostId="9527" RevisionGUID="88474774-747b-465e-a91c-def096e59d9e" CreationDate="2011-03-09T09:42:28.337" UserId="5378" Text="Create shadow for SkinnedEffect model" />
  <row Id="19690" PostHistoryTypeId="3" PostId="9527" RevisionGUID="88474774-747b-465e-a91c-def096e59d9e" CreationDate="2011-03-09T09:42:28.337" UserId="5378" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="19691" PostHistoryTypeId="2" PostId="9528" RevisionGUID="b9339206-89cb-4a32-a34d-9fb3829fab85" CreationDate="2011-03-09T09:49:21.573" UserId="5864" Text="You will probably not get any further without serious GPU profiling. gDEBugger is indeed an excellent start. However, chances are that your design is simple enough that you are indeed maximising the GPU's capabilities.&#xD;&#xA;&#xD;&#xA;I also strongly suggest you start thinking about simplifying the geometry, for instance with LODs. At the moment you have 10 to 15 times more triangles than real pixels on the screen. That doesn't make much sense to me. You should start thinking about which triangles could be merged or even completely removed." />
  <row Id="19692" PostHistoryTypeId="2" PostId="9529" RevisionGUID="3990be0e-80dc-4a7a-be7b-209bf3bd39c9" CreationDate="2011-03-09T10:02:22.133" UserId="5440" Text="as far as I know those are good optimization techniques but since new GPUs are beasts in matrix vector operations, maybe in your case you need to use more effective optimization techniques for example you may use frustum culling , dynamic level of detail ,occlusion culling, try to minimize state changes by sorting (you can also sort based on shaders ), minimize copying from/to GPU memory.  " />
  <row Id="19693" PostHistoryTypeId="2" PostId="9530" RevisionGUID="05252a4d-b2aa-495b-a591-91c3c24b4d10" CreationDate="2011-03-09T10:15:32.957" UserId="4857" Text="In frame  dynamics your code for (for instance) moving an entity would look like this:&#xD;&#xA;&#xD;&#xA;    x = x + speedPerFrame&#xD;&#xA;&#xD;&#xA;If you want to be frame-independent, it could look like this:&#xD;&#xA;&#xD;&#xA;    x = x + speedPerSecond * secondsElapsedSinceLastFrame&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19694" PostHistoryTypeId="2" PostId="9531" RevisionGUID="03f715d6-0008-4d1c-b0dd-f48102d1285b" CreationDate="2011-03-09T10:29:58.933" UserId="5864" Text="I suggest using an orientation histogram. First, collect sample points on your curve, ensuring they're far enough apart to be meaningful. Choose a minimum distance of 10 pixels, for instance.&#xD;&#xA;&#xD;&#xA;Then iterate on point triplets [A,B,C] and compute the orientation change:&#xD;&#xA;&#xD;&#xA;    v1 = (B - A).normalize();&#xD;&#xA;    v2 = C - B;&#xD;&#xA;    f = atan2(-v2.x * v1.x -v2.y * v1.y,&#xD;&#xA;              v2.x * v1.y - v2.y * v1.x);&#xD;&#xA;&#xD;&#xA;Now `f` contains the orientation difference between `BC` and `AB`. The `atan2()` here is important to avoid any division by zero.&#xD;&#xA;&#xD;&#xA;You can either compare successive orientation changes like @Jesse Emond suggested. However, computing a histogram will be more robust:&#xD;&#xA;&#xD;&#xA;    float histo[32];&#xD;&#xA;    memset(histo, 0, sizeof(histo));&#xD;&#xA;&#xD;&#xA;    /* ... */&#xD;&#xA;&#xD;&#xA;    histo[31 - (int)((M_PI - f) * (32.0 / 2.0 / M_PI))] += weight(A, B, C);&#xD;&#xA;&#xD;&#xA;(I use `M_PI - f` instead of `f + M_PI` because the `M_PI` value is inclusive and could lead to an integer overflow).&#xD;&#xA;&#xD;&#xA;`float weight(A, B, C)` is a method that computes the weight of the stroke. A simple weight function would return the length of `AC`, but you could decide to give long strokes a smaller weight.&#xD;&#xA;&#xD;&#xA;Finally, analyse the histogram. If you get most of the values around `histo[15]` and `histo[16]` it means the user did a straight line. If they are around `histo[13]` it means a large counterclockwise circle arc, `histo[18]` means a clockwise circle, `histo[11]` means a smaller circle, anything below `histo[8]` or above `histo[24]` means there was a brutal change in direction..." />
  <row Id="19695" PostHistoryTypeId="5" PostId="9531" RevisionGUID="575693a4-2707-4e85-bfb5-26319658b976" CreationDate="2011-03-09T10:45:05.707" UserId="5864" Comment="user link" Text="I suggest using an orientation histogram. First, collect sample points on your curve, ensuring they're far enough apart to be meaningful. Choose a minimum distance of 10 pixels, for instance.&#xD;&#xA;&#xD;&#xA;Then iterate on point triplets [A,B,C] and compute the orientation change:&#xD;&#xA;&#xD;&#xA;    v1 = (B - A).normalize();&#xD;&#xA;    v2 = C - B;&#xD;&#xA;    f = atan2(-v2.x * v1.x -v2.y * v1.y,&#xD;&#xA;              v2.x * v1.y - v2.y * v1.x);&#xD;&#xA;&#xD;&#xA;Now `f` contains the orientation difference between `BC` and `AB`. The `atan2()` here is important to avoid any division by zero.&#xD;&#xA;&#xD;&#xA;Now you can compare successive orientation changes like [Jesse Emond] suggested. However, computing a histogram will be more robust:&#xD;&#xA;&#xD;&#xA;    float histo[32];&#xD;&#xA;    memset(histo, 0, sizeof(histo));&#xD;&#xA;&#xD;&#xA;    /* ... */&#xD;&#xA;&#xD;&#xA;    histo[31 - (int)((M_PI - f) * (32.0 / 2.0 / M_PI))] += weight(A, B, C);&#xD;&#xA;&#xD;&#xA;(I use `M_PI - f` instead of `f + M_PI` because the `M_PI` value is inclusive and could lead to an integer overflow).&#xD;&#xA;&#xD;&#xA;`float weight(A, B, C)` is a method that computes the weight of the stroke. A simple weight function would return the length of `AC`, but you could decide to give long strokes a smaller weight.&#xD;&#xA;&#xD;&#xA;Finally, analyse the histogram. If you get most of the values around `histo[15]` and `histo[16]` it means the user did a straight line. If they are around `histo[13]` it means a large counterclockwise circle arc, `histo[18]` means a clockwise circle, `histo[11]` means a smaller circle, anything below `histo[8]` or above `histo[24]` means there was a brutal change in direction..." />
  <row Id="19696" PostHistoryTypeId="25" PostId="9524" RevisionGUID="dfc1da10-7682-4e84-930e-7a878431efc9" CreationDate="2011-03-09T11:23:16.303" Comment="http://twitter.com/#!/StackGameDev/status/45444536448712704" />
  <row Id="19697" PostHistoryTypeId="2" PostId="9532" RevisionGUID="82daafbe-ffbd-4181-a575-7303e7a3d69b" CreationDate="2011-03-09T11:36:41.517" UserId="5957" Text="There's only one way to triangulate a triangle vs. 'n - 2' ways for an n sided polygon. So, triangles are ultimately the least ambiguous way to define a polyhedral shape. Also, as other posters have indicated, there are lots of ways to accelerate triangle (rather than quad or higher) rasterization (constant z is one of my favourites). &#xD;&#xA;  Also, it's easier to optimize ray-triangle intersection tests than it is for ray-arbitrary polygon intersection tests. In fact, many operations on n-sided polygons benefit from having a triangulated representation to hand. That isn't to say that n-sided polygon representations are 'bad' - they are very useful but ultimately, you're going to want to work with triangles for many mesh operations." />
  <row Id="19698" PostHistoryTypeId="2" PostId="9533" RevisionGUID="f5d52bb2-8e23-48c5-bb41-6d77c8b6d001" CreationDate="2011-03-09T11:45:38.713" UserId="662" Text="Look into macro-optimizations.&#xD;&#xA;&#xD;&#xA;- Don't render details you don't notice anyway. Sounds obvious? Well, if your game is a spacesim, an optimization could be scaling the level of detail, where you have different models for different distances. If your game is a closed-quarters first person shooter, you can use a [BSP tree](http://en.wikipedia.org/wiki/Binary_space_partitioning) to only render the rooms that are in range. &#xD;&#xA;&#xD;&#xA;- Removing duplicate calculations. Animations can be shared and textures can be pre-blended.&#xD;&#xA;&#xD;&#xA;- Is the bottleneck in lighting? You could try reducing the number of lights or even do lighting deferred. Is the bottleneck in shader code? Try simplifying them and hardcode values." />
  <row Id="19699" PostHistoryTypeId="2" PostId="9534" RevisionGUID="3bde1a21-20a0-47cc-83ff-fbc4ea64e96c" CreationDate="2011-03-09T12:19:05.583" UserId="5957" Text="Shadows can be a thorny subject. There are many ways to create shadows in games, broadly split in to 3 techniques: &#xD;&#xA;  Stencil shadows&#xD;&#xA;  Texture space shadow maps/light maps&#xD;&#xA;  Shadow buffers&#xD;&#xA;&#xD;&#xA;Stencil shadows give hard, sharp shadow edges and use the stencil buffer and geometry extruded from every triangle (or the silhouette edges, if you can find it quick enough) of a mesh.  &lt;http://www.gamedev.net/page/resources/_//183/403/the-theory-of-stencil-shadow-volumes-r1873&gt; here's a good page describing the technique in more detail.&#xD;&#xA;&#xD;&#xA;Texture space shadow maps or light maps are typically created off-line and stored as a static texture. Generally speaking, these are not dynamic although there are some interesting techniques that can generate light maps in real-time.&#xD;&#xA;&#xD;&#xA;Finally, real-time shadow buffers are the most commonly used techniques. These methods all render the scene again in an off-screen buffer from the light's point of view, storing depth values instead of colours. This is called the 'shadow buffer'.&#xD;&#xA;&#xD;&#xA;When rendering the scene from the camera's point of view, every pixel is reverse transformed (in your shader code) into the shadow buffer's space and checked to see if the depth of the pixel being written is deeper than the depth stored in the shadow buffer. &#xD;&#xA;  So far, so good. It gets more complicated when you realise that there isn't enough resolution in the shadow buffer to give good shadows in most cases. There are many techniques to try and increase the effective resolution of your shadow buffer. These are either view space distortion techniques (Perspective, Light space perspective, Trapezoidal) or multi-shadow buffer techniques such as cascaded shadow maps &lt;http://msdn.microsoft.com/en-us/library/ee416307%28v=vs.85%29.aspx&gt;&#xD;&#xA;&#xD;&#xA;From bitter, bitter experience, I would avoid distortion techniques -they just don't work for all situations and introduce nasty biasing problems when sampling from the shadow map. You will spend months trying to sort out the fiddly edge cases whilst your boss (if you have one) becomes ever less patient.&#xD;&#xA;Use cascaded or split buffer shadow maps where the view frustum is split into smaller chunks which have their own shadow map. Then use simple bounding volumes to zoom in on shadow casters and receivers. This is the technique that 90% of games I see use.&#xD;&#xA;&#xD;&#xA;Good luck, the devil is in the details but there's lots of help out there. Hopefully this will give you the pointers you need.&#xD;&#xA;" />
  <row Id="19700" PostHistoryTypeId="2" PostId="9535" RevisionGUID="195219de-3f92-46c6-b695-909b45b8f6fc" CreationDate="2011-03-09T12:27:02.937" UserId="4308" Text="I'm using Cocos2d (0.99.5) with chipmunk physics engine. Currently I'm trying to place a body into space which is combined from few circle shapes. &#xD;&#xA;&#xD;&#xA;Let's say I have a corresponding sprite image with displays atom (nucleus + 3 electrons around it. Something [like this][1] without orbit lines). In it's simplest form - only one circle shape at the center should be enough which would detect collisions from other objects with nucleus. Now I'd like to add other circle shapes for each electron. How can I do that? &#xD;&#xA;&#xD;&#xA;Now when I add those shapes to the body and add the body into chipmunk space - the shapes (together with the body/sprite) start flickering and spinning with no recognizable pattern (or reason for that matter).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dret.net/lectures/services-spring08/img/atom-logo.png&#xD;&#xA;&#xD;&#xA;P.S. someone please tag this question with `chipmunk-physics` .)" />
  <row Id="19701" PostHistoryTypeId="1" PostId="9535" RevisionGUID="195219de-3f92-46c6-b695-909b45b8f6fc" CreationDate="2011-03-09T12:27:02.937" UserId="4308" Text="Cocos2d and Body with few collision shapes using chipmunk" />
  <row Id="19702" PostHistoryTypeId="3" PostId="9535" RevisionGUID="195219de-3f92-46c6-b695-909b45b8f6fc" CreationDate="2011-03-09T12:27:02.937" UserId="4308" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="19703" PostHistoryTypeId="2" PostId="9536" RevisionGUID="5583f589-f14a-4c2f-a2c0-5a21797d97e8" CreationDate="2011-03-09T12:36:54.733" UserId="5957" Text="A lot of what people say is a typical engine is actually more art related. Engines empower or impose restrictions on art assets but the design and execution of how things feel is largely an art issue.  Take for example the faces in Oblivion; So many people were blaming the engine for the slightly less than convincing characters. This was clearly an issue with the art, or if not that then the section of Bethesda's code that blended faces together, rather than the whole 'engine'.&#xD;&#xA;  Similarly, when people see shiny, grimy, steroid abusing space marines they'll think 'Unreal' but this is more of an art direction, rather than a facet of the underlying engine that displays that art. Even though different studios make grimy space marine games they'll often use unreal because it's been proven to be able to make that sort of game." />
  <row Id="19704" PostHistoryTypeId="2" PostId="9537" RevisionGUID="e6c59e93-6545-4251-9081-6df1730288cb" CreationDate="2011-03-09T12:44:36.020" UserId="998" Text="So in my FPS camera look code, I have something like this:&#xD;&#xA;&#xD;&#xA;    window-&gt;camera-&gt;stepYaw( getMouseDx()*speed ) ; // mouseDx is mouse change since last frame&#xD;&#xA;    window-&gt;camera-&gt;stepPitch( getMouseDy()*speed ) ;&#xD;&#xA;&#xD;&#xA;This works fine on a normal mouse. But with pen input, its very very janky and radical.&#xD;&#xA;&#xD;&#xA;How should one control an FPS camera from pen tablet input instead of traditional mouse?&#xD;&#xA;" />
  <row Id="19705" PostHistoryTypeId="1" PostId="9537" RevisionGUID="e6c59e93-6545-4251-9081-6df1730288cb" CreationDate="2011-03-09T12:44:36.020" UserId="998" Text="Pen tablet input for FPS" />
  <row Id="19706" PostHistoryTypeId="3" PostId="9537" RevisionGUID="e6c59e93-6545-4251-9081-6df1730288cb" CreationDate="2011-03-09T12:44:36.020" UserId="998" Text="&lt;input&gt;" />
  <row Id="19707" PostHistoryTypeId="2" PostId="9538" RevisionGUID="3e748faf-e4d0-4ae3-9eca-55ddfa28bcd2" CreationDate="2011-03-09T12:48:05.453" UserId="4947" Text="You can also explore some data types and traffic optimizations - you can for example use [half float][1] instead of float (if you don't need really accurate positions). If it's not enough and you want to decrease traffic, you can use [ARB_vertex_type_2_10_10_10_rev][2], which is even smaller (4 coordinates - xyzw - in 32 bits).&#xD;&#xA;&#xD;&#xA;If you have more models with few vertices (few indices), you can also use [ARB_draw_elements_base_vertex][3] (you can find some material [here][4]), you can send unsigned short or byte indices instead of unsigned int (you will save 3/4 or 1/2 of its size). &#xD;&#xA;&#xD;&#xA;If you have more VBOs and you frequently use glBindBuffer, you can use [NV_vertex_buffer_unified_memory][5] (there is also example on that site).&#xD;&#xA;&#xD;&#xA;These OpenGL extensions don't increase performance too much if you have just few vertices, but you have a lot of triangles, so it could be worth a try.&#xD;&#xA;&#xD;&#xA;There is also more such extensions, like [Vertex array range][6]. You have to search.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/registry/specs/ARB/half_float_vertex.txt&#xD;&#xA;  [2]: http://www.opengl.org/registry/specs/ARB/vertex_type_2_10_10_10_rev.txt&#xD;&#xA;  [3]: http://www.opengl.org/registry/specs/ARB/draw_elements_base_vertex.txt&#xD;&#xA;  [4]: http://www.arcsynthesis.org/gltut/Positioning/Tut05%20Optimization%20Base%20Vertex.html&#xD;&#xA;  [5]: http://www.opengl.org/registry/specs/NV/vertex_buffer_unified_memory.txt&#xD;&#xA;  [6]: http://www.opengl.org/registry/specs/NV/vertex_array_range.txt" />
  <row Id="19708" PostHistoryTypeId="2" PostId="9539" RevisionGUID="e3f0cd27-d5c8-42fe-8b4f-838c99089273" CreationDate="2011-03-09T12:57:36.253" UserId="5976" Text="I want to move a ccsprite object along a pre defined path. ( Similar to motion guide in flash) Is there any tool i can use to create this path?  &#xD;&#xA;" />
  <row Id="19709" PostHistoryTypeId="1" PostId="9539" RevisionGUID="e3f0cd27-d5c8-42fe-8b4f-838c99089273" CreationDate="2011-03-09T12:57:36.253" UserId="5976" Text="tool to create a motion path for cocos2d" />
  <row Id="19710" PostHistoryTypeId="3" PostId="9539" RevisionGUID="e3f0cd27-d5c8-42fe-8b4f-838c99089273" CreationDate="2011-03-09T12:57:36.253" UserId="5976" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="19712" PostHistoryTypeId="2" PostId="9540" RevisionGUID="7fb54b76-b8e8-4219-ae3f-e8275804ef6e" CreationDate="2011-03-09T13:03:56.963" UserId="2214" Text="I'm working on a Java web based game in my spare time (springMVC / JSPs etc), and I'm wondering what are my options for dealing with the &quot;game world&quot; or mapping element.&#xD;&#xA;&#xD;&#xA;My game will be 2d / text based, so I have no need for any OpenGL / Flash etc.&#xD;&#xA;&#xD;&#xA;My initial idea was to use Google maps and provide a custom overlay, but I want to know if there are any alternatives?&#xD;&#xA;&#xD;&#xA;For example, if I create a 2d map with all my zones, are there any libraries that will help me plot players, work out distances and so forth?&#xD;&#xA;&#xD;&#xA;Regards" />
  <row Id="19713" PostHistoryTypeId="1" PostId="9540" RevisionGUID="7fb54b76-b8e8-4219-ae3f-e8275804ef6e" CreationDate="2011-03-09T13:03:56.963" UserId="2214" Text="Are there any Java based libraries that provide game mapping features?" />
  <row Id="19714" PostHistoryTypeId="3" PostId="9540" RevisionGUID="7fb54b76-b8e8-4219-ae3f-e8275804ef6e" CreationDate="2011-03-09T13:03:56.963" UserId="2214" Text="&lt;java&gt;&lt;maps&gt;" />
  <row Id="19716" PostHistoryTypeId="2" PostId="9542" RevisionGUID="c02ff02d-e8fc-44e6-8da4-3b35424f50fc" CreationDate="2011-03-09T13:31:11.693" UserId="20" Text="Read through this [forum post][1]. &quot;Lam&quot; posted a small library to draw several curve-types (cubic and quad bezier, cubic and quad lagrange) in cocos2d. [Another post][2] describes how you can calculate the rotation of your sprite.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/forum/topic/4853&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/forum/topic/1376" />
  <row Id="19717" PostHistoryTypeId="5" PostId="9535" RevisionGUID="a4d38cd5-8b1a-4dbe-aa26-071d58243381" CreationDate="2011-03-09T13:37:43.093" UserId="20" Comment="added tags" Text="I'm using Cocos2d (0.99.5) with chipmunk physics engine. Currently I'm trying to place a body into space which is combined from few circle shapes. &#xD;&#xA;&#xD;&#xA;Let's say I have a corresponding sprite image with displays atom (nucleus + 3 electrons around it. Something [like this][1] without orbit lines). In it's simplest form - only one circle shape at the center should be enough which would detect collisions from other objects with nucleus. Now I'd like to add other circle shapes for each electron. How can I do that? &#xD;&#xA;&#xD;&#xA;Now when I add those shapes to the body and add the body into chipmunk space - the shapes (together with the body/sprite) start flickering and spinning with no recognizable pattern (or reason for that matter).&#xD;&#xA;&#xD;&#xA;  [1]: http://dret.net/lectures/services-spring08/img/atom-logo.png&#xD;&#xA;" />
  <row Id="19718" PostHistoryTypeId="6" PostId="9535" RevisionGUID="a4d38cd5-8b1a-4dbe-aa26-071d58243381" CreationDate="2011-03-09T13:37:43.093" UserId="20" Comment="added tags" Text="&lt;2d-physics&gt;&lt;cocos2d-iphone&gt;&lt;chipmunk&gt;" />
  <row Id="19719" PostHistoryTypeId="2" PostId="9543" RevisionGUID="e0013711-d286-4953-995c-bb7762afc492" CreationDate="2011-03-09T14:03:27.423" UserId="3644" Text="In essence PenTablet provides absolute coordinates for X and Y, not a relative like Mouse does. This means you can perform SetCursor(x,y) in your code - Mouse will not know a difference, and PenTablet will &quot;ignore&quot; it.&#xD;&#xA;&#xD;&#xA;Now it depends on how you compute your mouseDx. If you stick the mouse on buttonDown or just hide it? Please provide more code and I will expand my answer according to it." />
  <row Id="19720" PostHistoryTypeId="2" PostId="9544" RevisionGUID="348b14c7-3029-427c-a97b-27a603fcdcf4" CreationDate="2011-03-09T14:07:06.723" UserId="337" Text="Typically an FPS gets the relative mouse movement by locking the mouse to the center of the screen (put the cursor on center, wait a frame, get mouse position and repeat) with a tablet however you set the absolute position of the mouse and as such you can't lock the mouse.&#xD;&#xA;&#xD;&#xA;What I would do is not lock the mouse cursor but calculate the difference between the current absolute position and the previous absolute position. One caveat however is if you take the pen off and move it somewhere else (for example if you reach the edge of the tablet) this is fixable by not returning any movement if the movement is larger than *some number*.&#xD;&#xA;&#xD;&#xA;Something like this (pseudocode):&#xD;&#xA;&#xD;&#xA;    deltaX = currentX - previousX&#xD;&#xA;    previousX = currentX&#xD;&#xA;    if deltaX &gt; 20 deltaX = 0" />
  <row Id="19721" PostHistoryTypeId="25" PostId="9540" RevisionGUID="285e2719-c934-44ac-b574-b17454ef1709" CreationDate="2011-03-09T14:23:16.423" Comment="http://twitter.com/#!/StackGameDev/status/45489834525065217" />
  <row Id="19722" PostHistoryTypeId="2" PostId="9545" RevisionGUID="38783139-9de3-4e5a-bcb9-6aa804d4639d" CreationDate="2011-03-09T14:29:58.413" UserId="189" Text="From the way your question is worded, I get the impression that you think there needs to be one incoming port per player connection; this is not at all the case. Each client connects to one public port, whichever that port may be, and all communication comes in through that single listening port, even if there are thousands of players.&#xD;&#xA;&#xD;&#xA;There can of course be several ports open, but the main point is that each port can handle more than one simultaneous connection to or from it, so you need only open ports on your firewall corresponding to any ports that the game server listens on; this may be one or a few, but it should not be thousands of ports.&#xD;&#xA;&#xD;&#xA;On a low level, a &quot;port&quot; is just a number tacked onto a packet. The firewall can read it and drop the packet if it's out of your specified ranges, and the operating system obviously obeys it and hands the packet to the application listening for that port, but the network system doesn't care if two or more people send and receive packets over the same port. They're just packets, they don't somehow &quot;collide&quot; if they are of the same port." />
  <row Id="19723" PostHistoryTypeId="2" PostId="9546" RevisionGUID="ea3c7bd0-3205-4feb-803e-0db042b6069a" CreationDate="2011-03-09T14:35:35.770" UserId="5768" Text="I'm not sure if this is what you're looking for but heres a 2d map editor built in java available for free http://www.mapeditor.org/ " />
  <row Id="19724" PostHistoryTypeId="2" PostId="9547" RevisionGUID="0b273399-a591-4ee1-82ae-15e3a8556216" CreationDate="2011-03-09T14:39:09.110" UserId="5983" Text="Are there any sites that offer quality graphical assets to use in games? &#xD;&#xA;&#xD;&#xA;For instance cars / characters etc?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19725" PostHistoryTypeId="1" PostId="9547" RevisionGUID="0b273399-a591-4ee1-82ae-15e3a8556216" CreationDate="2011-03-09T14:39:09.110" UserId="5983" Text="stock/free artwork &amp; graphic assets" />
  <row Id="19726" PostHistoryTypeId="3" PostId="9547" RevisionGUID="0b273399-a591-4ee1-82ae-15e3a8556216" CreationDate="2011-03-09T14:39:09.110" UserId="5983" Text="&lt;graphics&gt;&lt;assets&gt;&lt;art&gt;" />
  <row Id="19727" PostHistoryTypeId="16" PostId="9547" RevisionGUID="580cff89-8799-428b-aa72-c193bdda9bf9" CreationDate="2011-03-09T14:57:01.883" UserId="14" />
  <row Id="19728" PostHistoryTypeId="2" PostId="9548" RevisionGUID="94345608-411b-466e-a52a-01275149f065" CreationDate="2011-03-09T15:00:44.110" UserId="5985" Text="We are developing a social gaming community called Qwazz (http://slidesha.re/f1Kfic).&#xD;&#xA;&#xD;&#xA;What are the features you are expecting from such a platform or which ones do you miss on other networks like openfeint, Plus+, etc?&#xD;&#xA;What benefits from integrating a community do you expect as a developer?&#xD;&#xA;" />
  <row Id="19729" PostHistoryTypeId="1" PostId="9548" RevisionGUID="94345608-411b-466e-a52a-01275149f065" CreationDate="2011-03-09T15:00:44.110" UserId="5985" Text="Social gaming community features ?" />
  <row Id="19730" PostHistoryTypeId="3" PostId="9548" RevisionGUID="94345608-411b-466e-a52a-01275149f065" CreationDate="2011-03-09T15:00:44.110" UserId="5985" Text="&lt;ios&gt;&lt;game-center&gt;&lt;social&gt;" />
  <row Id="19731" PostHistoryTypeId="10" PostId="9548" RevisionGUID="18611bc7-c525-4e66-a66b-3fef5e7a0c05" CreationDate="2011-03-09T15:03:14.470" UserId="14" CloseReasonId="4" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="19732" PostHistoryTypeId="5" PostId="9547" RevisionGUID="bcea0785-1e8d-4b0c-b4b1-7dfd40069faf" CreationDate="2011-03-09T15:06:33.903" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Are there any sites that offer quality graphical assets to use in games? &#xD;&#xA;&#xD;&#xA;For instance cars / characters etc?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19733" PostHistoryTypeId="10" PostId="9547" RevisionGUID="75bca648-d4ac-4c70-9910-687cf22cceaf" CreationDate="2011-03-09T15:06:33.667" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="19734" PostHistoryTypeId="5" PostId="9547" RevisionGUID="0272579c-232e-41c4-bc5d-56363d1849b2" CreationDate="2011-03-09T15:07:44.063" UserId="14" Comment="added 179 characters in body" Text="&gt; **Possible Duplicate:**  &#xD;&#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xD;&#xA;&gt; [Open-source 3D models easily usable in OGRE3D/jMonkeyEngine](http://gamedev.stackexchange.com/questions/2400/open-source-3d-models-easily-usable-in-ogre3d-jmonkeyengine)&#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;Are there any sites that offer quality graphical assets to use in games? &#xD;&#xA;&#xD;&#xA;For instance cars / characters etc?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19735" PostHistoryTypeId="5" PostId="8963" RevisionGUID="c7b2dd31-e4ac-49f2-ad61-9eadf7f43db8" CreationDate="2011-03-09T15:20:08.500" UserId="14" Comment="We can't use Wikipedia without proper attribution." Text="" />
  <row Id="19736" PostHistoryTypeId="5" PostId="8964" RevisionGUID="484cd096-2a49-493e-a27a-c8c36306a6d6" CreationDate="2011-03-09T15:20:08.533" UserId="14" Comment="We can't use Wikipedia without proper attribution." Text="iOS is an operating system for mobile devices created by Apple Inc." />
  <row Id="19737" PostHistoryTypeId="5" PostId="9515" RevisionGUID="1381a481-2f25-4e38-a27a-b43b30e0459e" CreationDate="2011-03-09T15:34:21.563" UserId="2029" Comment="added 1500 characters in body; added 4 characters in body" Text="I've read two other threads here on movement:&#xD;&#xA;http://gamedev.stackexchange.com/questions/6825/time-based-movement-vs-frame-rate-based-movement, and &#xD;&#xA;http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;&#xD;&#xA;but I think I'm lacking a basic understanding of frame independent movement because I don't understand what either of those threads are talking about.&#xD;&#xA;&#xD;&#xA;I'm following along with lazyfoo's SDL tutorials and came upon the frame independent lesson. http://lazyfoo.net/SDL_tutorials/lesson32/index.php&#xD;&#xA;&#xD;&#xA;I'm not sure what the movement part of the code is trying to say but I think it's this (please correct me if I'm wrong):&#xD;&#xA;In order to have frame independent movement, we need to find out how far an object (ex. sprite) moves within a certain time frame, for example 1 second. If the dot moves at 200 pixels per second, then I need to calculate how much it moves within that second by multiplying 200 pps by 1/1000 of a second.&#xD;&#xA;&#xD;&#xA;Is that right? The lesson says:&#xD;&#xA;&#xD;&#xA;&quot;velocity in pixels per second * time since last frame in seconds.&#xD;&#xA;So if the program runs at 200 frames per second: 200 pps * 1/200 seconds = 1 pixel&quot;&#xD;&#xA;&#xD;&#xA;But...I thought we were multiplying 200 pps by 1/1000th of a second. What is this business with frames per second?&#xD;&#xA;&#xD;&#xA;I'd appreciate if someone could give me a little bit more detailed explanation as to how frame independent movement works.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;ADDITION:&#xD;&#xA;&#xD;&#xA;    SDL_Rect posRect;&#xD;&#xA;	posRect.x = 0;&#xD;&#xA;	posRect.y = 0;&#xD;&#xA;&#xD;&#xA;	float y, yVel;&#xD;&#xA;	y = 0;&#xD;&#xA;	yVel = 0;&#xD;&#xA;&#xD;&#xA;	Uint32 startTicks = SDL_GetTicks();&#xD;&#xA;&#xD;&#xA;	bool quit = false;&#xD;&#xA;	SDL_Event gEvent;&#xD;&#xA;&#xD;&#xA;	while ( quit == false )&#xD;&#xA;	{&#xD;&#xA;		while ( SDL_PollEvent( &amp;gEvent ) )&#xD;&#xA;		{&#xD;&#xA;			if ( gEvent.type == SDL_QUIT )&#xD;&#xA;				quit = true;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if ( y &lt;= 580 )&#xD;&#xA;		{&#xD;&#xA;			yVel += DOT_VEL;&#xD;&#xA;			y += (yVel * (SDL_GetTicks() - startTicks)/1000.f);&#xD;&#xA;			posRect.y = (int)y;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		startTicks = SDL_GetTicks();&#xD;&#xA;		SDL_BlitSurface( bg, NULL, screen, NULL );&#xD;&#xA;		SDL_BlitSurface( dot, NULL, screen, &amp;posRect );&#xD;&#xA;		SDL_Flip( screen );&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;That's code that moves a dot down the screen. I think I have everything correct so far. It moves down the screen but there is a bit of an odd thing that happens that I can't explain. The dot is supposed to stay at the y=580 when it gets to greater than that y-value. However, every time I run the program, the dot will end up in a different location, meaning a little bit to a lot more than 580, so the dot is halfway or more than halfway off the screen (the dot is 20 pixels, screen dimensions 800x600). If I do something like click and hold the title-bar of the program, and then release, the dot disappears off the screen. How come it's variable each time?&#xD;&#xA;As for the titlebar problem I think it's because when I hold on to the titlebar, the timer is still running, and the time elapsed gets larger, resulting in a larger distance the dot moves in the next frame. Is that right?" />
  <row Id="19738" PostHistoryTypeId="2" PostId="9549" RevisionGUID="17084c4b-36c0-45c1-b473-9393a0da4718" CreationDate="2011-03-09T16:09:58.277" UserId="5987" Text="12000 kids already happily used this: http://www.youtube.com/watch?v=5-X-Ebh1kYA&amp;feature=channel_video_title" />
  <row Id="19739" PostHistoryTypeId="2" PostId="9550" RevisionGUID="6c8c1774-e34c-42e2-9c61-359ab7ebc3cf" CreationDate="2011-03-09T16:16:10.317" UserId="5957" Text="Feel free to ignore the hyperbolic commentary. This is a new display technology that uses lasers to ignite the very air into a little ball of plasma, creating an amazing dot matrix free floating 3D display.&#xD;&#xA;&lt;http://www.youtube.com/watch?v=KfVS-npfVuY&gt;&#xD;&#xA;" />
  <row Id="19740" PostHistoryTypeId="2" PostId="9551" RevisionGUID="5b1c4cd9-6965-4612-8ae3-b24c82beb47c" CreationDate="2011-03-09T16:34:18.733" UserId="4419" Text="I'm programming a little web strategy game. In the country map i pretend to display each country with a national color. The issue is how to render the borders in a simple and efficient way. Right now i'm planning to set a field to each tile called &quot;border&quot; with values from 0 to 8. The algorithm would check for EVERY tile is its adjacent has a different &quot;owner&quot;. If the tile is inside the territory, the border value would be 0, because would not have adjacent any tile with different owner, if not, would vary between 1 (north) clockwise to 9 (north-west) and then draw the border.&#xD;&#xA;&#xD;&#xA;I find this simple but too processor-intensive. Are there any other &quot;pro&quot; choices to render territories borders?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="19741" PostHistoryTypeId="1" PostId="9551" RevisionGUID="5b1c4cd9-6965-4612-8ae3-b24c82beb47c" CreationDate="2011-03-09T16:34:18.733" UserId="4419" Text="Drawing territories border in 2d map," />
  <row Id="19742" PostHistoryTypeId="3" PostId="9551" RevisionGUID="5b1c4cd9-6965-4612-8ae3-b24c82beb47c" CreationDate="2011-03-09T16:34:18.733" UserId="4419" Text="&lt;2d&gt;&lt;rendering&gt;&lt;maps&gt;" />
  <row Id="19743" PostHistoryTypeId="25" PostId="9547" RevisionGUID="e4fa09f5-d885-449e-a74b-ebd8261c992f" CreationDate="2011-03-09T17:23:17.463" Comment="http://twitter.com/#!/StackGameDev/status/45535135323529216" />
  <row Id="19744" PostHistoryTypeId="2" PostId="9552" RevisionGUID="842abd9e-dcce-4fc4-81a2-e9295226c123" CreationDate="2011-03-09T17:34:30.697" UserId="2491" Text="Aside from the 3D graphics, we also recognize common shared behaviors in the game engine itself.  There are a lot of little variables that go into every part of a game, and certain combinations, once set, remain a part of all games using that engine.&#xD;&#xA;&#xD;&#xA;Such variables could include: character move speed, character movement acceleration, camera pan speed, camera pan acceleration, camera pan smoothness, and so on.&#xD;&#xA;&#xD;&#xA;This is very apparent with mods or games that started as mods (hello Source engine games) because once the design is past the basics, rarely will anyone go back to tweak something like the acceleration rate of a jump.  The effect of all those little variables is that the games &quot;feel similar&quot; but in a way that's hard to pin down." />
  <row Id="19745" PostHistoryTypeId="2" PostId="9553" RevisionGUID="4dfa88a0-4845-4d1e-b410-f50fe416b7af" CreationDate="2011-03-09T17:44:34.580" UserId="1198" Text="In your map, why not just have an attribute on each tile indicating if it is a border (and if so, what edge and what color)? The benefit is that it will use less processor cycles, the drawback is that you must know at design time where the borders are.&#xD;&#xA;&#xD;&#xA;Unless you are procedurally generating your maps, this should be an easy thing to setup. Even if you are generating the map procedurally, you only need to run the processor intensive step of calculating borders one time, at design time, not every frame.&#xD;&#xA;&#xD;&#xA;If knowing at design time is not an option, you could similarly add the attributes to your tiles; and only calculate them once, upon loading the map data. That doesn't resolve the processor intensive task, but it does keep it to a minimum.&#xD;&#xA;&#xD;&#xA;In terms of the algorithm you are using, there may be more optimized way to do it, but if you can avoid making those optimizations by moving when/where the algorithm is run, I'd do that first." />
  <row Id="19746" PostHistoryTypeId="5" PostId="9551" RevisionGUID="9b0ec8dd-7dce-40e5-bb3a-1bfcd5401d62" CreationDate="2011-03-09T17:53:30.850" UserId="1198" Comment="removed comma from title" Text="I'm programming a little web strategy game. In the country map I pretend to display each country with a national color. The issue is how to render the borders in a simple and efficient way. Right now I'm planning to set a field to each tile called &quot;border&quot; with values from 0 to 8. The algorithm would check for EVERY tile is its adjacent has a different &quot;owner&quot;. If the tile is inside the territory, the border value would be 0, because would not have adjacent any tile with different owner, if not, would vary between 1 (north) clockwise to 9 (north-west) and then draw the border.&#xD;&#xA;&#xD;&#xA;I find this simple but too processor-intensive. Are there any other &quot;pro&quot; choices to render territories borders?" />
  <row Id="19747" PostHistoryTypeId="4" PostId="9551" RevisionGUID="9b0ec8dd-7dce-40e5-bb3a-1bfcd5401d62" CreationDate="2011-03-09T17:53:30.850" UserId="1198" Comment="removed comma from title" Text="Drawing territories border in 2d map" />
  <row Id="19748" PostHistoryTypeId="24" PostId="9551" RevisionGUID="9b0ec8dd-7dce-40e5-bb3a-1bfcd5401d62" CreationDate="2011-03-09T17:53:30.850" Comment="Proposed by 1198 approved by 14 edit id of 70" />
  <row Id="19749" PostHistoryTypeId="2" PostId="9554" RevisionGUID="2e44283f-a79b-4732-a105-4890536f59ee" CreationDate="2011-03-09T18:07:50.133" UserId="1198" Text="In terms of configuring your firewall for maximum security: block EVERYTHING except that which you absolutely cannot live without.&#xD;&#xA;&#xD;&#xA;In his [post][1] @Ricket makes several great points , I'd like to add a bit more background for you. You mention TCP and UDP &quot;Connections&quot; -- [TCP][2] has connections and has handshakes built into the protocol, [UDP][3] does not. For both protocols, a port must be &quot;allowed&quot; and an application must be listening on that port. Think of an IP address like a physical address, and think of the port as the apartment number -- take a web server for example, it has an IP address and listens on TCP port 80, even though the website can be viewed by hundreds or thousands of clients they all send their requests to &quot;port 80&quot; and the operating system sends those to the web server which is listening on that port.&#xD;&#xA;&#xD;&#xA;The reason some games use both UDP and TCP is because in-game, there are a variety of services being communicated with from client --&gt; server and also server --&gt; client.&#xD;&#xA;&#xD;&#xA;**GameState** is a great candidate for a UDP type of transmission, because speed is more important than getting every packet in order, loss of packets is made up for by client-side prediction.&#xD;&#xA;&#xD;&#xA;**In-Game-Chat** is a great candidate for TCP, since performance is not critical, and order of data is important.&#xD;&#xA;&#xD;&#xA;So a game might use UDP 5678 for GameState transfer, and might use TCP 5679 for chat -- in this case, you'd add these two (and only these two) exceptions in the firewall.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9514/how-should-i-configure-firewall-for-online-game-server/9545#9545&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Transmission_Control_Protocol&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/User_Datagram_Protocol" />
  <row Id="19750" PostHistoryTypeId="2" PostId="9555" RevisionGUID="27680297-88bd-468b-95b3-8160c237bc60" CreationDate="2011-03-09T18:55:04.800" UserId="5797" Text="Very interesting. Roller Coaster rides is what came to my mind. You can manipulate a 3D object riding a path in three dimensions. " />
  <row Id="19751" PostHistoryTypeId="5" PostId="9508" RevisionGUID="203ee600-c870-41a9-8d91-e37756a28056" CreationDate="2011-03-09T19:00:50.323" UserId="962" Comment="deleted 4 characters in body; edited title" Text="When you set a personal best lap time in a console racing game, you have the option&#xD;&#xA;to compete against your ghost.&#xD;&#xA;&#xD;&#xA;How can this feature be created for a single player casual type game?" />
  <row Id="19752" PostHistoryTypeId="4" PostId="9508" RevisionGUID="203ee600-c870-41a9-8d91-e37756a28056" CreationDate="2011-03-09T19:00:50.323" UserId="962" Comment="deleted 4 characters in body; edited title" Text="How to create a Ghost Replay feature in a game?" />
  <row Id="19753" PostHistoryTypeId="2" PostId="9556" RevisionGUID="8741cf54-cf86-4a68-b0f9-9e3a05a5c20b" CreationDate="2011-03-09T19:39:49.343" UserId="4129" Text="&gt; I'm programming a little web strategy game.&#xD;&#xA;&#xD;&#xA;Computing which edges to draw where and storing that info rather than finding out during drawing by looking at neighbouring cells is a good strategy.&#xD;&#xA;&#xD;&#xA;&gt; I find this simple but too processor-intensive.&#xD;&#xA;&#xD;&#xA;What are you using?  HTML tables?  A canvas?&#xD;&#xA;&#xD;&#xA;If HTML5 canvas, the key is to use [fillRect][1] instead of paths for the edges.&#xD;&#xA;&#xD;&#xA;Finally, ensure you are doing partial updates - drawing only those cells that have changed ownership or other state, and those adjacent to them, rather than redrawing the whole map for each update.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#simple-shapes-%28rectangles%29" />
  <row Id="19754" PostHistoryTypeId="25" PostId="9551" RevisionGUID="27e1353d-3e93-4679-8278-f33a91677aca" CreationDate="2011-03-09T20:23:18.877" Comment="http://twitter.com/#!/StackGameDev/status/45580441792675841" />
  <row Id="19755" PostHistoryTypeId="5" PostId="9556" RevisionGUID="8fafdbca-47bf-4c7e-9f04-d43d82d7db24" CreationDate="2011-03-09T20:44:39.857" UserId="4129" Comment="added 239 characters in body" Text="&gt; I'm programming a little web strategy game.&#xD;&#xA;&#xD;&#xA;Computing which edges to draw where and storing that info rather than finding out during drawing by looking at neighbouring cells is a good strategy.&#xD;&#xA;&#xD;&#xA;Remember, a cell can likely have borders on many sides, so [use bitwise operators][1] to store all the adjacency information in a single integer.&#xD;&#xA;&#xD;&#xA;&gt; I find this simple but too processor-intensive.&#xD;&#xA;&#xD;&#xA;What are you using?  HTML tables?  A canvas?&#xD;&#xA;&#xD;&#xA;If HTML5 canvas, the key is to use [fillRect][2] instead of paths for the edges.&#xD;&#xA;&#xD;&#xA;Finally, ensure you are doing partial updates - drawing only those cells that have changed ownership or other state, and those adjacent to them, rather than redrawing the whole map for each update.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.mozilla.org/en/JavaScript/Reference/Operators/Bitwise_Operators&#xD;&#xA;  [2]: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#simple-shapes-%28rectangles%29" />
  <row Id="19756" PostHistoryTypeId="2" PostId="9557" RevisionGUID="74c953a8-6d9b-4449-80ad-51eab49da4a8" CreationDate="2011-03-09T21:03:27.717" UserId="5380" Text="I'm a software engineer that's new to game programming so forgive me if this is a dumb question as I don't know that much about game engines.&#xD;&#xA;&#xD;&#xA;If I was building a 2D game am I better off going with an engine like Torque that looks like it's built for 2D, or would higher powered engines like Unreal, Source and Unity work better?&#xD;&#xA;&#xD;&#xA;I'm mainly asking if 2D vs 3D is a large factor in choosing an engine.&#xD;&#xA;&#xD;&#xA;For the purpose of comparison, let's eliminate variables by saying price isn't a factor (even though it probably is)." />
  <row Id="19757" PostHistoryTypeId="1" PostId="9557" RevisionGUID="74c953a8-6d9b-4449-80ad-51eab49da4a8" CreationDate="2011-03-09T21:03:27.717" UserId="5380" Text="Are high powered 3D game engines better at 2D games than engines made for 2D" />
  <row Id="19758" PostHistoryTypeId="3" PostId="9557" RevisionGUID="74c953a8-6d9b-4449-80ad-51eab49da4a8" CreationDate="2011-03-09T21:03:27.717" UserId="5380" Text="&lt;3d&gt;" />
  <row Id="19759" PostHistoryTypeId="17" PostId="9557" RevisionGUID="4d9179ef-337d-48fd-87f1-163a60d53065" CreationDate="2011-03-09T21:06:48.390" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/18002/are-high-powered-3d-game-engines-better-at-2d-games-than-engines-made-for-2d" Text="" />
  <row Id="19760" PostHistoryTypeId="6" PostId="9557" RevisionGUID="430b1dfd-eba7-4e62-b3f0-509fe81681a7" CreationDate="2011-03-09T21:11:52.067" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;3d&gt;&lt;engine&gt;" />
  <row Id="19761" PostHistoryTypeId="2" PostId="9558" RevisionGUID="9e7dd469-7721-479e-ae89-3e1471b723f3" CreationDate="2011-03-09T21:20:47.583" UserId="51" Text="There are two factors here, speed of development and speed of execution.&#xD;&#xA;&#xD;&#xA;All other things being equal, you're going to want something that's hardware accelerated.  So your &quot;2d engine' is going to be fundamentally a 3D engine, just using sprites and an orthographic projection.  With that assumption there, there isn't much fundamentally different between a &quot;2d&quot; and a &quot;3d&quot; engine.&#xD;&#xA;&#xD;&#xA;Now that being said, there are certain optimizations that you would do in a 2D engine that may or may not be built into a 3D engine.  Batching of sprites (to reduce draw call count) is probably the biggest one.  Depending on your 3D engine, this isn't terribly difficult to add.  However if you have to add it yourself it's going to add some time to development.  But in the end, in theory, there shouldn't be much of a speed difference other than additional overhead a &quot;heavier&quot; 3D engine may bring.&#xD;&#xA;&#xD;&#xA;To help aid with sprite batching, it's pretty common that 2D engines have atlasing tools built in.  Atlasing is combining a bunch of individual sprite images into one texture so you can batch more (as more things on screen are using the same material).  Again, if you have to add this to a 3D engine, or do it yourself, it's going to hurt development time.&#xD;&#xA;&#xD;&#xA;And on top of that it might be easier to do 2D physics with an engine with a 2D physics engine rather than a 3D physics engine with constraints.&#xD;&#xA;&#xD;&#xA;But on the flip side, using a robust 3D engine gives you more options.  You can have a fundamentally 2D game but not use an ortho projection.  You can do 3D particle effects.  Most 3D engines have nice skeletal animation systems and you can do interesting things with that (like attaching planes for body parts and animating a rig instead of spitting out more sprite frames).&#xD;&#xA;&#xD;&#xA;At the end of the day it's all about your needs and your resources.  &#xD;&#xA;" />
  <row Id="19762" PostHistoryTypeId="5" PostId="9557" RevisionGUID="a48c08ad-6c32-4c36-90cd-ef82120d5c77" CreationDate="2011-03-09T21:22:21.163" UserId="5380" Comment="added 132 characters in body" Text="I'm a software engineer that's new to game programming so forgive me if this is a dumb question as I don't know that much about game engines.&#xD;&#xA;&#xD;&#xA;If I was building a 2D game am I better off going with an engine like Torque that looks like it's built for 2D, or would higher powered engines like Unreal, Source and Unity work better?&#xD;&#xA;&#xD;&#xA;I'm mainly asking if 2D vs 3D is a large factor in choosing an engine.&#xD;&#xA;&#xD;&#xA;For the purpose of comparison, let's eliminate variables by saying price isn't a factor (even though it probably is).&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;I should probably also mention that the game we're developing has a lot of RTS and RPG elements regarding leveling up" />
  <row Id="19765" PostHistoryTypeId="2" PostId="9560" RevisionGUID="8594bae5-9e26-4c30-b4c3-2f6744df5d01" CreationDate="2011-03-09T21:57:01.717" UserId="2971" Text="I am playing around with drawing an SVG sprite (imported in through `[Embed]`). Depending on the coordinates of the image, sometimes it appears more crisp than others. &#xD;&#xA;&#xD;&#xA;The following image shows how at different locations is it rendered differently:&#xD;&#xA;&#xD;&#xA;![3 characters][1]&#xD;&#xA;&#xD;&#xA;([Image link][2] - You may have to download and zoom in with an image edit to see it)&#xD;&#xA;&#xD;&#xA;You'll notice that the middle sprite is more blurry than the ones on the sides. Does anyone know why this is? Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/R8eA2.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/R8eA2.png" />
  <row Id="19766" PostHistoryTypeId="1" PostId="9560" RevisionGUID="8594bae5-9e26-4c30-b4c3-2f6744df5d01" CreationDate="2011-03-09T21:57:01.717" UserId="2971" Text="Sprites are sometimes blurry in Flash" />
  <row Id="19767" PostHistoryTypeId="3" PostId="9560" RevisionGUID="8594bae5-9e26-4c30-b4c3-2f6744df5d01" CreationDate="2011-03-09T21:57:01.717" UserId="2971" Text="&lt;flash&gt;&lt;rendering&gt;&lt;sprites&gt;&lt;blur&gt;" />
  <row Id="19768" PostHistoryTypeId="2" PostId="9561" RevisionGUID="142bb303-7308-4d22-89f6-1b02a7be7a60" CreationDate="2011-03-09T22:11:51.160" UserId="5957" Text="That's your sub pixel accuracy. It's a feature, rather than a bug but it's annoying in the wrong context.  What's happening is that somewhere in the pipeline the x coordinates of your sprite are being rasterized to the screen a little off the pixel boundaries. This causes the flash renderer to interpolate between one pixel and the next, resulting in the blur you see. This actually aids animation as objects can smoothly transition from one pixel to the next but you don't want it here. &#xD;&#xA;&#xD;&#xA;You can try two things - either look at the source svg and ensure that every coordinate is integer (i.e. no fractional part) or if that doesn't work, try offsetting everything by half a texel - that'll be 0.5 * the_width_of_your_drawing_surface. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19769" PostHistoryTypeId="5" PostId="9560" RevisionGUID="f7ee20c6-6a97-4e58-b1a2-791b7f6b7b55" CreationDate="2011-03-09T22:14:24.200" UserId="2971" Comment="added 2 characters in body" Text="I am playing around with drawing an SVG sprite (imported in through `[Embed]`). Depending on the coordinates of the image, sometimes it appears more crisp than others. &#xD;&#xA;&#xD;&#xA;The following image shows how at different locations is it rendered differently:&#xD;&#xA;&#xD;&#xA;![3 characters][1]&#xD;&#xA;&#xD;&#xA;([Image link][2] - You may have to download and zoom in with an image editor to see it)&#xD;&#xA;&#xD;&#xA;You'll notice that the middle sprite is more blurry than the ones on the sides. Does anyone know why this is? Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/R8eA2.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/R8eA2.png" />
  <row Id="19770" PostHistoryTypeId="5" PostId="7374" RevisionGUID="b730adbf-911e-494e-9066-974b158b7521" CreationDate="2011-03-09T22:18:53.790" UserId="1198" Comment="fixed wording, added bulleted list" Text="I have just been reviewing in [Frenet Frame][1] math. It is an interest geometrical issue. &#xD;&#xA;&#xD;&#xA;I know that common applications are:&#xD;&#xA;&#xD;&#xA;  - camera movement belong a curve&#xD;&#xA;  - tube and ribbons surface&#xD;&#xA;&#xD;&#xA;Can someone suggest other intersting applications?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Frenet–Serret_formulas" />
  <row Id="19771" PostHistoryTypeId="24" PostId="7374" RevisionGUID="b730adbf-911e-494e-9066-974b158b7521" CreationDate="2011-03-09T22:18:53.790" Comment="Proposed by 1198 approved by -1 edit id of 71" />
  <row Id="19772" PostHistoryTypeId="5" PostId="7374" RevisionGUID="d6d11621-3dc3-44a7-9c9e-6574032df3e6" CreationDate="2011-03-09T22:18:54.103" UserId="51" Comment="deleted 5 characters in body" Text="I have just been reviewing [Frenet Frame][1] math. It is an interesting geometrical issue. &#xD;&#xA;&#xD;&#xA;I know that common applications are:&#xD;&#xA;&#xD;&#xA;  - camera movement along a curve&#xD;&#xA;  - tube and ribbons surface&#xD;&#xA;&#xD;&#xA;Can someone suggest other interesting applications?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Frenet–Serret_formulas" />
  <row Id="19773" PostHistoryTypeId="2" PostId="9562" RevisionGUID="1bf69154-71f9-419e-a47e-8c887bb21389" CreationDate="2011-03-09T22:35:10.340" UserId="20" Text="As Luther already wrote, it's how the flash renderer works. One thing that will guarantee pixel-accuracy is to turn your sprites into bitmaps and then set the [pixelSnapping][1] property to `PixelSnapping.ALWAYS`.&#xD;&#xA;&#xD;&#xA;Or try `cacheAsBitmap = true` on your vector sprites (see [here][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Bitmap.html#pixelSnapping&#xD;&#xA;  [2]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayObject.html#cacheAsBitmap" />
  <row Id="19774" PostHistoryTypeId="2" PostId="9563" RevisionGUID="86dd6f64-b5d8-40c6-884d-b91ea23e20a0" CreationDate="2011-03-09T23:07:37.293" UserId="5266" Text="How does one setup the game space for a game so that obstacles can be spawned?&#xD;&#xA;&#xD;&#xA;One example I am wondering about is doodle jump. Tile maps are limited in size and would need to change often if the user jumps a lot.&#xD;&#xA;&#xD;&#xA;How would this be done in another way than tile maps.&#xD;&#xA;&#xD;&#xA;How or what is used to create the notion of a game world where these spawned ledges/obstacles are placed as the user progresses through the stage?&#xD;&#xA;&#xD;&#xA;What is actually moving if the user jumps from ledge to ledge, what are the ledges based on in terms of the game world/space. What data structure or representation could the game use to reference and manage the spawning of these obstacles/ledges?" />
  <row Id="19775" PostHistoryTypeId="1" PostId="9563" RevisionGUID="86dd6f64-b5d8-40c6-884d-b91ea23e20a0" CreationDate="2011-03-09T23:07:37.293" UserId="5266" Text="Creating the “game space” for a game" />
  <row Id="19776" PostHistoryTypeId="3" PostId="9563" RevisionGUID="86dd6f64-b5d8-40c6-884d-b91ea23e20a0" CreationDate="2011-03-09T23:07:37.293" UserId="5266" Text="&lt;collision-detection&gt;&lt;parallaxscrolling&gt;" />
  <row Id="19777" PostHistoryTypeId="2" PostId="9564" RevisionGUID="38c192dc-26c9-4b85-850a-b862cf298372" CreationDate="2011-03-09T23:08:08.900" UserId="5998" Text="I'm looking to animate a graph layout using edges as springs and nodes as weights ( a node with more links will have a bigger weight ).&#xD;&#xA;&#xD;&#xA;I'm not capable of wrapping my head around the usage of mathematical and physics relations in my application.&#xD;&#xA;&#xD;&#xA;As far as i read, Runge Kutta 4 ( preferably ) or Verlet will be a good choice, but i have problems with understanding how they really work, and what physics equations should i apply.&#xD;&#xA;&#xD;&#xA;If i can't understand them, i can't use them.&#xD;&#xA;I'm looking for a book or a tutorial which describe the things that i need.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19778" PostHistoryTypeId="1" PostId="9564" RevisionGUID="38c192dc-26c9-4b85-850a-b862cf298372" CreationDate="2011-03-09T23:08:08.900" UserId="5998" Text="Good book or tutorial for learning how to apply integration methods" />
  <row Id="19779" PostHistoryTypeId="3" PostId="9564" RevisionGUID="38c192dc-26c9-4b85-850a-b862cf298372" CreationDate="2011-03-09T23:08:08.900" UserId="5998" Text="&lt;2d&gt;&lt;graphics&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="19780" PostHistoryTypeId="4" PostId="9563" RevisionGUID="2f486f50-7023-4fa9-b2bf-0154c6cd7b63" CreationDate="2011-03-09T23:22:00.203" UserId="5266" Comment="edited title" Text="Creating the “game space” for a 2D game" />
  <row Id="19781" PostHistoryTypeId="25" PostId="9557" RevisionGUID="4f6ca615-bef0-41e8-94a0-d8abc3188ae8" CreationDate="2011-03-09T23:23:19.640" Comment="http://twitter.com/#!/StackGameDev/status/45625743199322112" />
  <row Id="19782" PostHistoryTypeId="2" PostId="9565" RevisionGUID="0dfd9a43-81b0-4960-b25d-babc822e104b" CreationDate="2011-03-10T00:00:23.313" UserId="3020" Text="Here is an awesome introduction to the Runge Kutta 4 integration:&#xD;&#xA;&#xD;&#xA;http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;&#xD;&#xA;It starts with a brief introduction to the Euler integration basics (and why you shouldn't use it).&#xD;&#xA;&#xD;&#xA;Moreover, there are more tutorials on this page about game-physics: How to fix your timestep, physics in 3D, spring physics, and networked physics&#xD;&#xA;&#xD;&#xA;Hope it helps!" />
  <row Id="19783" PostHistoryTypeId="5" PostId="9564" RevisionGUID="97796b34-4709-4f2a-b9a1-9c842c82bd88" CreationDate="2011-03-10T00:31:01.380" UserId="1198" Comment="the letter i" Text="I'm looking to animate a graph layout using edges as springs and nodes as weights (a node with more links will have a bigger weight).&#xD;&#xA;&#xD;&#xA;I'm not capable of wrapping my head around the usage of mathematical and physics relations in my application.&#xD;&#xA;&#xD;&#xA;As far as I read, Runge Kutta 4 ( preferably ) or Verlet will be a good choice, but I have problems with understanding how they really work, and what physics equations should I apply.&#xD;&#xA;&#xD;&#xA;If I can't understand them, I can't use them. I'm looking for a book or a tutorial which describe the things that i need.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19784" PostHistoryTypeId="24" PostId="9564" RevisionGUID="97796b34-4709-4f2a-b9a1-9c842c82bd88" CreationDate="2011-03-10T00:31:01.380" Comment="Proposed by 1198 approved by -1 edit id of 72" />
  <row Id="19785" PostHistoryTypeId="5" PostId="9564" RevisionGUID="94a8cdc6-4d2d-42c7-8051-09c7e41e23e4" CreationDate="2011-03-10T00:31:01.663" UserId="51" Comment="added 2 characters in body" Text="I'm looking to animate a graph layout using edges as springs and nodes as weights (a node with more links will have a bigger weight).&#xD;&#xA;&#xD;&#xA;I'm not capable of wrapping my head around the usage of mathematical and physics relations in my application.&#xD;&#xA;&#xD;&#xA;As far as I've read, Runge Kutta 4 (preferably) or Verlet will be a good choice, but I have problems with understanding how they really work, and what physics equations I should apply.&#xD;&#xA;&#xD;&#xA;If I can't understand them, I can't use them. I'm looking for a book or a tutorial which describes the things that I need.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19786" PostHistoryTypeId="5" PostId="9563" RevisionGUID="deda8316-e94e-4195-b72d-d0626db205f4" CreationDate="2011-03-10T01:23:38.133" UserId="5266" Comment="added 85 characters in body; added 23 characters in body" Text="How does one setup the game space for a game so that obstacles can be spawned?&#xD;&#xA;&#xD;&#xA;Examples would be ice climber or the iphone doodle jump. Tile maps are limited in size and would need to change often if the user jumps a lot.&#xD;&#xA;&#xD;&#xA;How would this be done in another way than tile maps.&#xD;&#xA;&#xD;&#xA;How or what is used to create the notion of a game world where these spawned ledges/obstacles are placed as the user progresses through the stage?&#xD;&#xA;&#xD;&#xA;What is actually moving if the user jumps from ledge to ledge, what are the ledges based on in terms of the game world/space. What data structure or representation could the game use to reference and manage the spawning of these obstacles/ledges?&#xD;&#xA;&#xD;&#xA;How is a continuous environment created which creates collision objects as the user progresses? " />
  <row Id="19787" PostHistoryTypeId="2" PostId="9566" RevisionGUID="51af0341-0173-4d04-ad7e-645326523145" CreationDate="2011-03-10T01:37:34.773" UserId="5711" Text="Recently I programmed an L-system (http://en.wikipedia.org/wiki/L-system) module, It got me interested further. I am a Plants vs Zombies junkie as well, really liked the concept of Tree of Wisdom. Would love to create similar procedural art just for fun and learn more. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Question: How should I approach the process of creating an artistic tree (2d perhaps with  fixed camera/perspective) dynamically? &#xD;&#xA;&#xD;&#xA;Ideally I would like to start with a plant (only a stem with a leaf) and grow it dynamically using some influence (input/user action) over its structure. These influences may result in different type of branching, curves in branches, its spread, location of fruits, color of flowers, etc. Want it to be really full of life/spirit. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Plants vs Zombies: Tree of wisdom][1] &#xD;&#xA;It would be great to dynamically grow a similar tree, but with lot more variation and animations happening.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My Background: Student / Programmer, have used few game engines (Ogre3d, cocos2d, unity). Haven't really programmed directly using openGL, trying to fix that :). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am ready to spend considerable time, Please let me know about the APIs? and how would an expert like you would take on this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Why 2D? I think it's easier to solve the problem only considering 2 dimensions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Artistic inspirations:&#xD;&#xA;&#xD;&#xA;Only the tree, with fruits and leaves, without the shrubs at the bottom: ([link][2]) &#xD;&#xA;&#xD;&#xA;The large tree (visible branches, green leaves, flowers, fruits, etc) on the left, behind monkey: www.sitasingstheblues.com/images/06.RamHanuSitaRainReflect.jpg    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PixelJunk's Eden: (Art style inspiration).&#xD;&#xA;www.youtube.com/watch?v=PzX64KAunX0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Procedurally Generated Apple Tree using Fractals:&#xD;&#xA;www.youtube.com/watch?v=ZVyi4ykVHJM&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please let me know if it was easy for you to understand the question, I may elaborate further.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope a discussion of various approach would be helpful for everyone. You guys are awesome. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for your time.&#xD;&#xA;&#xD;&#xA;-lalan&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=Xem9SE6sh6k&amp;feature=related&#xD;&#xA;  [2]: http://www.verdanttileco.com/Tree%20of%20Life%2012x20%20inch%20Tile.jpg&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19788" PostHistoryTypeId="1" PostId="9566" RevisionGUID="51af0341-0173-4d04-ad7e-645326523145" CreationDate="2011-03-10T01:37:34.773" UserId="5711" Text="How to procedurally (create) grow an artistic (2D) tree in real-time (L-System?)." />
  <row Id="19789" PostHistoryTypeId="3" PostId="9566" RevisionGUID="51af0341-0173-4d04-ad7e-645326523145" CreationDate="2011-03-10T01:37:34.773" UserId="5711" Text="&lt;2d&gt;&lt;art&gt;&lt;procedural-generation&gt;&lt;procedural&gt;&lt;tree&gt;" />
  <row Id="19790" PostHistoryTypeId="5" PostId="9518" RevisionGUID="ed70a224-3b2b-4e1c-b809-3ed00e6c4fc0" CreationDate="2011-03-10T01:59:17.877" UserId="3547" Comment="added 876 characters in body; added 53 characters in body" Text="NOTE: All fractions are meant to be floats.&#xD;&#xA;&#xD;&#xA;Frame independent movement works by basing movement off of time. You get the amount of time that is spend since the last frame (so if there are 60 frames in one second, each frame takes 1000.0f/60.0f milliseconds, if all the frames took the same amount of time) and find out how much movement that translates into. &#xD;&#xA;&#xD;&#xA;If you want your entity to move a certain amount of space for a specified unit of time (we will say 100 pixels for every second of time) then you can find out how many pixels you should move per frame by multiplying the amount of movement per second (100 pixels) by the amount of time passed in seconds (1000 / 60) in order to figure out how much movement should take place in the current frame.&#xD;&#xA;&#xD;&#xA;It works by figuring out how much movement you should perform per frame by using the amount of time elapsed and a speed that is defined with some unit of time (seconds or milliseconds are preferable)&#xD;&#xA;&#xD;&#xA;I hope that made some kind of sense to you.&#xD;&#xA;&#xD;&#xA;I want to move my guy 200 pixels to the right every second. If the current frame is run 50 milliseconds after the previous frame, then I should move my guy a fraction of the speed previously specified (which was 200 pixels).&#xD;&#xA;I should move him 50/1000th of the distance because only a 1/20th (50/1000 = 1/20) of time has passed. Therefore it would make sense to only move him 10 pixels (if 19 more frames occurred, 50 milliseconds apart from each other, then the total amount of movement in that second would be 200 pixels, the amount we wanted).&#xD;&#xA;&#xD;&#xA;The way frame independent movement works is that frames usually occur at variable time steps (there is a different amount of time that takes place between subsequent frames). If we constantly move an entity a constant distance every frame, then the movement is based on the frame rate. If there is a lot of time between frames, the game will seem to move too slow and if there is not a lot of time between frames, the game will seem to be going to fast. (too little time between frames = a lot of frames = more movement) To overcome this, we use a speed in terms of time and keep track of the time between frames. That way we know how long it's been since we last updated the position and how much further we should move the entity. By using time we can eliminate the dependence on the frame rate and our game will look more or less the same on different frame rates.&#xD;&#xA;&#xD;&#xA;Frames per second : This is the amount of frames that take place per second. Usually a frame rate is either how many times the game is drawn/rendered a second or how many times the game loop is completed a second.&#xD;&#xA;&#xD;&#xA;Fixed Verse Variable Time Step : This refers to the amount of time between frames. Usually, the time between frames will not be constant. Certain systems/cores like physics will need some unit of time in order to simulate/run something. Usually, physics systems are more stable/scalable if the time step is fixed. The difference between fixed/variable time steps are in the names. Fixed time steps are what they sound like: time steps that occur at a fixed rate of time. Variable time steps are time steps that occur at varying/different rates of time." />
  <row Id="19791" PostHistoryTypeId="25" PostId="9566" RevisionGUID="bf395fdc-9e7b-4f35-91d6-358f78cc1113" CreationDate="2011-03-10T02:23:19.553" Comment="http://twitter.com/#!/StackGameDev/status/45671041594433537" />
  <row Id="19792" PostHistoryTypeId="2" PostId="9567" RevisionGUID="6d440f43-961e-4757-8a08-60d6ded43025" CreationDate="2011-03-10T02:29:00.250" UserDisplayName="slcpfmmm" Text="It depends on your needs. There is a widespread misconception that all 2D games can be implemented on a 3D engine by drawing sprites as textured quads, with Z=0. While this is possible, very efficient, and has very widespread use (I even use it myself most of the time), there is much more to 2D than sprites.&#xD;&#xA;&#xD;&#xA;A modern 2D engine or library should allow you to do things such as (list courtesy of wikipedia with some additions):&#xD;&#xA;&#xD;&#xA;1. Draw vector graphics (nonexistent concept in 3D)&#xD;&#xA;2. Subpixel font rendering such as ClearType (usually not supported in 3D)&#xD;&#xA;3. Per-primitive antialiasing (is usually a render state in 3D, it -can- be done, but very inefficiently)&#xD;&#xA;4. Drawing and filling commands (nonexistent concept in 3D)&#xD;&#xA;5. Solid color, linear, radial, and bitmap brushes (nonexistent concepts in 3D)&#xD;&#xA;6. Rendering to intermediate layers (layering concept is usually nonexistent in 3D, although it can be faked)&#xD;&#xA;7. Geometry operations (eg. unions, intersections, widening, outlining, etc) (nonexistent in 3D)&#xD;&#xA;&#xD;&#xA;So if you're interested in making games that make use of any of these concepts, or many other non-trivial 2D operations beyond simple spriting, and have them hardware accelerated, you should look for a 2D library or engine. I've used Direct2D, and it's really fun, and it readily works with Direct3D, so you can mix as you want.&#xD;&#xA;&#xD;&#xA;On the other hand, if you want to make a sprite-only game, you can use your choice of engine, because I find it unlikely that you're going to be pushing the limits of 3D hardware with only textured quads. Since it's really simple, I'd recommend you make it just on top of Direct3D or OpenGL, and save your engine budget for popcorn.&#xD;&#xA;&#xD;&#xA;Note that this only applies for the rendering part of your 2D game. Physics and other simulations are out of the scope of this post." />
  <row Id="19793" PostHistoryTypeId="2" PostId="9568" RevisionGUID="41964374-440b-4be4-9d99-065e98559e21" CreationDate="2011-03-10T02:59:44.860" UserDisplayName="slcpfmmm" Text="As far as my experience goes, there are two ways to implement a world space.&#xD;&#xA;&#xD;&#xA;note: *feature* means an object with which your player may collide with. A feature can be a wall, a monster, a bullet...&#xD;&#xA;&#xD;&#xA;**Per unit of space**&#xD;&#xA;Usually the choice for 2D games. You make a grid out of your world, where each square (or triangle, hexagon, or whatever you wish) can be as large as a tile, down to a single pixel (or even less if you want). A value in the grid determines how to act when the player collides with a given location (commonly 0 for no-collision and 1 for collision). Collision detection is O(1), and memory usage is O(w*h) where w and h are the width and height of your space respectively; regardless of whether or not there are features in it. Data structure is as simple as a 2-dimensional array.&#xD;&#xA;&#xD;&#xA;**Per feature**&#xD;&#xA;Usually the choice for 3D games. You have a set of features, and collision detection is performed per-feature. There are interesting data structures, such as KD-trees, that help you determine which features are likely to be in a collision with the player, so you don't have to check it for every single object. Collision detection is non-trivial, and is O(n), for n features, and memory usage is O(n) as well. Data structure is a list, tree or dictionary that lets you do lookup by x,y,z location.&#xD;&#xA;&#xD;&#xA;However, per-feature is also used in 2D (or pseudo 3D). Take for instance old shooters. Walls can be implemented as lists of line segments, which is a simple variant of the per-feature technique.&#xD;&#xA;&#xD;&#xA;Dynamic feature placement is possible with both techniques. In the first technique, you simply modify your array during execution. Set an element in the grid from 0 to 1, and bam! you have a wall where you didn't before. In the second technique, just add a feature to your features list, and you're ready to go.&#xD;&#xA;" />
  <row Id="19794" PostHistoryTypeId="2" PostId="9569" RevisionGUID="ae9f680b-2ee3-4a63-9ba7-f82066d962e0" CreationDate="2011-03-10T04:38:34.903" UserId="6005" Text="I am developing game using andengine. I need to place progressbar in my game to denote time up of game. Is it possible for placing in andengine. I have searched but i got only for android not for andengine. &#xD;&#xA;&#xD;&#xA;Can anyone please give me suggestion or articles for this issue. please its urgent." />
  <row Id="19795" PostHistoryTypeId="1" PostId="9569" RevisionGUID="ae9f680b-2ee3-4a63-9ba7-f82066d962e0" CreationDate="2011-03-10T04:38:34.903" UserId="6005" Text="how to place progressbar in andengine" />
  <row Id="19796" PostHistoryTypeId="3" PostId="9569" RevisionGUID="ae9f680b-2ee3-4a63-9ba7-f82066d962e0" CreationDate="2011-03-10T04:38:34.903" UserId="6005" Text="&lt;engine&gt;&lt;android&gt;" />
  <row Id="19797" PostHistoryTypeId="25" PostId="9560" RevisionGUID="cc34029d-7d53-4a58-bba1-6b335349218a" CreationDate="2011-03-10T05:23:19.903" Comment="http://twitter.com/#!/StackGameDev/status/45716341537247232" />
  <row Id="19798" PostHistoryTypeId="2" PostId="9570" RevisionGUID="dc59fe78-7910-4090-8cb0-15ab5c85aa09" CreationDate="2011-03-10T06:07:29.660" UserId="5888" Text="Do take a look at ABOP (Algorithmic Beauty of Plants):&#xD;&#xA;&#xD;&#xA;http://algorithmicbotany.org/papers/#abop&#xD;&#xA;&#xD;&#xA;Its free online now, and has a very in-depth view of L-systems and plants." />
  <row Id="19799" PostHistoryTypeId="2" PostId="9571" RevisionGUID="e441609c-944c-49c9-bc70-725ca40b98a2" CreationDate="2011-03-10T07:31:21.333" UserId="6008" Text="Regarding the additional question.&#xD;&#xA;&#xD;&#xA;Your point stops at different locations each time because you don't check for the boundary (y &gt; 580) when you move it.  You only stop updating it further once its past 580.  &#xD;&#xA;&#xD;&#xA;On the last frame before you cross 580 you could be starting from 579 or you could be at 570 or you could be at 100.  You also could be stepping 1 pixel forward or 1000, depending on how long the last frame took to execute. &#xD;&#xA;&#xD;&#xA;Just change your IF condition to something like this and you should be fine.&#xD;&#xA;&#xD;&#xA;    if ( y &lt;= 580 )&#xD;&#xA;    {&#xD;&#xA;        yVel += DOT_VEL;&#xD;&#xA;        y += (yVel * (SDL_GetTicks() - startTicks)/1000.f);&#xD;&#xA;        if( y &gt; 580 )&#xD;&#xA;        {&#xD;&#xA;            y = 580;&#xD;&#xA;        }&#xD;&#xA;        posRect.y = (int)y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19800" PostHistoryTypeId="5" PostId="9518" RevisionGUID="9b47793d-5d5f-4794-88f5-f7246d2928f3" CreationDate="2011-03-10T08:00:55.103" UserId="20" Comment="fixed some confusion" Text="NOTE: All fractions are meant to be floats.&#xD;&#xA;&#xD;&#xA;Frame independent movement works by basing movement off of time. You get the amount of time that is spend since the last frame (so if there are 60 frames in one second, each frame takes 1.0/60.0 seconds, if all the frames took the same amount of time) and find out how much movement that translates into. &#xD;&#xA;&#xD;&#xA;If you want your entity to move a certain amount of space for a specified unit of time (we will say 100 pixels for every second of time) then you can find out how many pixels you should move per frame by multiplying the amount of movement per second (100 pixels) by the amount of time passed in seconds (1.0/60.0) in order to figure out how much movement should take place in the current frame.&#xD;&#xA;&#xD;&#xA;It works by figuring out how much movement you should perform per frame by using the amount of time elapsed and a speed that is defined with some unit of time (seconds or milliseconds are preferable). So your calculation might look like: `movementPerSecond * (timeElapsedInMilliseconds / 1000.0)`&#xD;&#xA;&#xD;&#xA;I hope that made some kind of sense to you.&#xD;&#xA;&#xD;&#xA;I want to move my guy 200 pixels to the right every second. If the current frame is run 50 milliseconds after the previous frame, then I should move my guy a fraction of the speed previously specified (which was 200 pixels).&#xD;&#xA;I should move him 50/1000th of the distance because only a 1/20th (50/1000 = 1/20) of time has passed. Therefore it would make sense to only move him 10 pixels (if 19 more frames occurred, 50 milliseconds apart from each other, then the total amount of movement in that second would be 200 pixels, the amount we wanted).&#xD;&#xA;&#xD;&#xA;The way frame independent movement works is that frames usually occur at variable time steps (there is a different amount of time that takes place between subsequent frames). If we constantly move an entity a constant distance every frame, then the movement is based on the frame rate. If there is a lot of time between frames, the game will seem to move too slow and if there is not a lot of time between frames, the game will seem to be going to fast. (too little time between frames = a lot of frames = more movement) To overcome this, we use a speed in terms of time and keep track of the time between frames. That way we know how long it's been since we last updated the position and how much further we should move the entity. By using time we can eliminate the dependence on the frame rate and our game will look more or less the same on different frame rates.&#xD;&#xA;&#xD;&#xA;Frames per second : This is the amount of frames that take place per second. Usually a frame rate is either how many times the game is drawn/rendered a second or how many times the game loop is completed a second.&#xD;&#xA;&#xD;&#xA;Fixed Verse Variable Time Step : This refers to the amount of time between frames. Usually, the time between frames will not be constant. Certain systems/cores like physics will need some unit of time in order to simulate/run something. Usually, physics systems are more stable/scalable if the time step is fixed. The difference between fixed/variable time steps are in the names. Fixed time steps are what they sound like: time steps that occur at a fixed rate of time. Variable time steps are time steps that occur at varying/different rates of time." />
  <row Id="19801" PostHistoryTypeId="5" PostId="9566" RevisionGUID="606dcd3a-082b-4dc2-af36-7ec3f4670f4d" CreationDate="2011-03-10T08:11:03.360" UserId="20" Comment="added links; deleted 9 characters in body" Text="Recently I programmed an [L-system][1] module, It got me interested further. I am a Plants vs Zombies junkie as well, really liked the concept of Tree of Wisdom. Would love to create similar procedural art just for fun and learn more. &#xD;&#xA;&#xD;&#xA;Question: How should I approach the process of creating an artistic tree (2d perhaps with  fixed camera/perspective) dynamically? &#xD;&#xA;&#xD;&#xA;Ideally I would like to start with a plant (only a stem with a leaf) and grow it dynamically using some influence (input/user action) over its structure. These influences may result in different type of branching, curves in branches, its spread, location of fruits, color of flowers, etc. Want it to be really full of life/spirit. :)&#xD;&#xA;&#xD;&#xA;[Plants vs Zombies: Tree of wisdom][2] &#xD;&#xA;It would be great to dynamically grow a similar tree, but with lot more variation and animations happening.&#xD;&#xA;&#xD;&#xA;My Background: Student / Programmer, have used few game engines (Ogre3d, cocos2d, unity). Haven't really programmed directly using openGL, trying to fix that :). &#xD;&#xA;&#xD;&#xA;I am ready to spend considerable time, Please let me know about the APIs? and how would an expert like you would take on this problem?&#xD;&#xA;&#xD;&#xA;Why 2D? I think it's easier to solve the problem only considering 2 dimensions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Artistic inspirations:&#xD;&#xA;&#xD;&#xA;Only the [tree, with fruits and leaves, without the shrubs at the bottom][3]&#xD;&#xA;&#xD;&#xA;The [large tree][4] (visible branches, green leaves, flowers, fruits, etc) on the left, behind monkey.    &#xD;&#xA;&#xD;&#xA;[PixelJunk's Eden][5] (Art style inspiration).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Procedurally Generated Apple Tree using Fractals][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please let me know if it was easy for you to understand the question, I may elaborate further.&#xD;&#xA;&#xD;&#xA;I hope a discussion of various approach would be helpful for everyone. You guys are awesome. &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/L-system&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=Xem9SE6sh6k&amp;feature=related&#xD;&#xA;  [3]: http://www.verdanttileco.com/Tree%20of%20Life%2012x20%20inch%20Tile.jpg&#xD;&#xA;  [4]: http://www.sitasingstheblues.com/images/06.RamHanuSitaRainReflect.jpg&#xD;&#xA;  [5]: http://www.youtube.com/watch?v=PzX64KAunX0&#xD;&#xA;  [6]: http://www.youtube.com/watch?v=ZVyi4ykVHJM" />
  <row Id="19802" PostHistoryTypeId="5" PostId="9567" RevisionGUID="98c83b11-6e7e-4585-a9a6-082fb823f9ea" CreationDate="2011-03-10T08:19:02.447" UserDisplayName="slcpfmmm" Comment="Removed incorrect assertion" Text="It depends on your needs. There is a widespread misconception that all 2D games can be implemented on a 3D engine by drawing sprites as textured quads, with Z=0. While this is possible, very efficient, and has very widespread use (I even use it myself most of the time), there is much more to 2D than sprites.&#xD;&#xA;&#xD;&#xA;A modern 2D engine or library should allow you to do things such as (list courtesy of wikipedia with some additions):&#xD;&#xA;&#xD;&#xA;1. &lt;strike&gt;Draw vector graphics (nonexistent concept in 3D)&lt;/strike&gt; Procedural model generation does exist in 3D&#xD;&#xA;2. Subpixel font rendering such as ClearType (usually not supported in 3D)&#xD;&#xA;3. Per-primitive antialiasing (is usually a render state in 3D, it -can- be done, but very inefficiently)&#xD;&#xA;4. Drawing and filling commands (nonexistent concept in 3D)&#xD;&#xA;5. Solid color, linear, radial, and bitmap brushes (nonexistent concepts in 3D)&#xD;&#xA;6. Rendering to intermediate layers (layering concept is usually nonexistent in 3D, although it can be faked)&#xD;&#xA;7. Geometry operations (eg. unions, intersections, widening, outlining, etc) (nonexistent in 3D)&#xD;&#xA;&#xD;&#xA;So if you're interested in making games that make use of any of these concepts, or many other non-trivial 2D operations beyond simple spriting, and have them hardware accelerated, you should look for a 2D library or engine. I've used Direct2D, and it's really fun, and it readily works with Direct3D, so you can mix as you want.&#xD;&#xA;&#xD;&#xA;On the other hand, if you want to make a sprite-only game, you can use your choice of engine, because I find it unlikely that you're going to be pushing the limits of 3D hardware with only textured quads. Since it's really simple, I'd recommend you make it just on top of Direct3D or OpenGL, and save your engine budget for popcorn.&#xD;&#xA;&#xD;&#xA;Note that this only applies for the rendering part of your 2D game. Physics and other simulations are out of the scope of this post." />
  <row Id="19803" PostHistoryTypeId="25" PostId="9563" RevisionGUID="c191925b-8739-444f-893d-24786bb0f67d" CreationDate="2011-03-10T08:23:19.543" Comment="http://twitter.com/#!/StackGameDev/status/45761638401445888" />
  <row Id="19804" PostHistoryTypeId="2" PostId="9572" RevisionGUID="866aaf2f-d770-4a1a-8016-9cd9982ab507" CreationDate="2011-03-10T08:36:28.857" UserId="20" Text="Some ideas for your &quot;game&quot;:&#xD;&#xA;&#xD;&#xA; - Promt the user for a name for his tree first. Use that name to generate a seed for the algorithm. So every name will have it's unique tree. The seed could also influence the type of foliage and fruit of the tree.&#xD;&#xA; - You could implement some sort of &quot;tree [tamagotchi][1]&quot; where the tree grows bigger and nicer the more the user cares about it (fertilize, water, etc.)&#xD;&#xA; - Create a highscore list of the highest trees. Another idea would be to show heights and names of other users next to your tree. So you can compare your tree height directly to other users. See [this video][2] as an example. The clouds indicate the height other users have accomplished.&#xD;&#xA;&#xD;&#xA;There are lots of algorithms and papers for procedural tree generation out there ([this thread might be interesting][3]). A difficult task is to nicely blend the branches. 2D is definitely going to be easier in that regard, since you can solve that with alpha-blending.&#xD;&#xA;&#xD;&#xA;Since you're experienced with Ogre3D, Unitiy and cocos2d you can go right ahead and implement that thing (no need to start learning OpenGL now IMHO). Personally I'd choose cocos2d and release for iPad and/or iPhone, so that everybody can carry his tree around with his mobile device.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tamagotchi&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=yuJPI7PzgeU&#xD;&#xA;  [3]: http://www.gamedev.net/topic/544911-procedural-tree-generation/" />
  <row Id="19805" PostHistoryTypeId="2" PostId="9573" RevisionGUID="d32297a1-1036-4e1b-a538-cd4a9793a18b" CreationDate="2011-03-10T09:25:59.520" UserId="6009" Text="I ve been reading up some hacks on Kinect development to work around the fact that there is no official SDK from Microsoft. Even if we do manage to create a game, can we distribute it through the XBox marketplace? Or will it cause any issues?" />
  <row Id="19806" PostHistoryTypeId="1" PostId="9573" RevisionGUID="d32297a1-1036-4e1b-a538-cd4a9793a18b" CreationDate="2011-03-10T09:25:59.520" UserId="6009" Text="Can I release Kinect based games?" />
  <row Id="19807" PostHistoryTypeId="3" PostId="9573" RevisionGUID="d32297a1-1036-4e1b-a538-cd4a9793a18b" CreationDate="2011-03-10T09:25:59.520" UserId="6009" Text="&lt;xbox&gt;&lt;kinect&gt;" />
  <row Id="19808" PostHistoryTypeId="5" PostId="9567" RevisionGUID="acae49ed-c173-43ea-8666-3c04c2f40aa2" CreationDate="2011-03-10T09:44:05.190" UserDisplayName="slcpfmmm" Comment="added 37 characters in body" Text="It depends on your needs. There is a widespread misconception that all 2D games can be implemented on a 3D engine by drawing sprites as textured quads, with Z=0. While this is possible, very efficient, and has very widespread use (I even use it myself most of the time), there is much more to 2D than sprites.&#xD;&#xA;&#xD;&#xA;A modern 2D engine or library should allow you to do things such as (list courtesy of wikipedia with some additions):&#xD;&#xA;&#xD;&#xA;1. Draw vector graphics, procedural model generation does exist in 3D but procedural model generation is hardly the best tool to do 2D vector graphics&#xD;&#xA;2. Subpixel font rendering such as ClearType (usually not supported in 3D)&#xD;&#xA;3. Per-primitive antialiasing (is usually a render state in 3D, it -can- be done, but very inefficiently)&#xD;&#xA;4. Drawing and filling commands (nonexistent concept in 3D)&#xD;&#xA;5. Solid color, linear, radial, and bitmap brushes (nonexistent concepts in 3D)&#xD;&#xA;6. Rendering to intermediate layers (layering concept is usually nonexistent in 3D, although it can be faked)&#xD;&#xA;7. Geometry operations (eg. unions, intersections, widening, outlining, etc) (nonexistent in 3D)&#xD;&#xA;&#xD;&#xA;So if you're interested in making games that make use of any of these concepts, or many other non-trivial 2D operations beyond simple spriting, and have them hardware accelerated, you should look for a 2D library or engine. I've used Direct2D, and it's really fun, and it readily works with Direct3D, so you can mix as you want.&#xD;&#xA;&#xD;&#xA;On the other hand, if you want to make a sprite-only game, you can use your choice of engine, because I find it unlikely that you're going to be pushing the limits of 3D hardware with only textured quads. Since it's really simple, I'd recommend you make it just on top of Direct3D or OpenGL, and save your engine budget for popcorn.&#xD;&#xA;&#xD;&#xA;Note that this only applies for the rendering part of your 2D game. Physics and other simulations are out of the scope of this post." />
  <row Id="19809" PostHistoryTypeId="2" PostId="9574" RevisionGUID="f1a9183f-1789-4cce-88f9-9eb5e33bb654" CreationDate="2011-03-10T10:24:51.923" UserId="4129" Text="[Context-Free][1] and it's 3D counterpart [StructureSynth][2] could be an excellent basis or inspiration.&#xD;&#xA;&#xD;&#xA;Examples:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][4] [![enter image description here][5]][6] [![enter image description here][7]][8]   [etc...][9]&#xD;&#xA;&#xD;&#xA;These days you could write an online visualiser in WebGL!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.contextfreeart.org/&#xD;&#xA;  [2]: http://structuresynth.sourceforge.net/&#xD;&#xA;  [3]: http://i.stack.imgur.com/qLZ18.jpg&#xD;&#xA;  [4]: http://www.contextfreeart.org/gallery/view.php?id=2572&#xD;&#xA;  [5]: http://i.stack.imgur.com/dzUpi.jpg&#xD;&#xA;  [6]: http://www.contextfreeart.org/gallery/view.php?id=2554&#xD;&#xA;  [7]: http://i.stack.imgur.com/KiNni.jpg&#xD;&#xA;  [8]: http://www.contextfreeart.org/gallery/view.php?id=2374&#xD;&#xA;  [9]: http://www.contextfreeart.org/gallery/view.php?t=rand&amp;seed=860900912&amp;num=25" />
  <row Id="19810" PostHistoryTypeId="2" PostId="9575" RevisionGUID="1ec5b4b3-04c4-4023-89b2-04adbc522405" CreationDate="2011-03-10T10:36:22.970" UserId="4410" Text="No. Without official support they won't let you release it. The problem would be if they changed the way something worked (behind the scenes in their libraries) and you weren't going through official channels to access the Kinect, then it could break your Kinect support and it would make both of you look bad. Full blown (paid up development kit) game developers aren't allowed to access hardware by hacking around the official libraries for the same reasons. Hardware changes over time for cost-reduction and other reasons.&#xD;&#xA;&#xD;&#xA;Have you managed to find hacks to get it working with XNA for the 360? I thought most of them were PC specific and non-portable. I can't imagine it'll be that long before they release an official SDK, they've already said the PC is getting one very soon, hopefully XNA support will follow closely." />
  <row Id="19811" PostHistoryTypeId="25" PostId="9573" RevisionGUID="030ef31f-e88c-4634-a049-5e3a06f9af18" CreationDate="2011-03-10T11:23:19.503" Comment="http://twitter.com/#!/StackGameDev/status/45806936834314240" />
  <row Id="19812" PostHistoryTypeId="2" PostId="9576" RevisionGUID="8e5a6be7-745c-4bb2-a541-ef195f1d3029" CreationDate="2011-03-10T11:23:44.273" UserId="4167" Text="Microsoft have plans to release the Kinect SDK for Windows for free this Spring ([link][1]). The point to notice here though is 'Windows'. That wording suggests to me that there'll be some additional fee to realease games onto the Indie Channel on the XBLA; though they might just absorb the charge into the current one for distributing a game to the service.&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/W4hHb" />
  <row Id="19813" PostHistoryTypeId="2" PostId="9577" RevisionGUID="87d6070a-99d1-4854-b589-1c20396673ed" CreationDate="2011-03-10T12:26:47.887" UserId="5957" Text="I tried searching for 'ゲームソフト出版社' for you but couldn't find anything that looked like a conclusive list.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Dave Perry has a great site listing (or attempting to list) *all* games companies in the world. Here it is:&#xD;&#xA;&#xD;&#xA;&lt;http://www.gameindustrymap.com/map.php&gt;&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="19814" PostHistoryTypeId="25" PostId="9508" RevisionGUID="3ba1d229-38e8-4fd2-962b-ace320e9839f" CreationDate="2011-03-10T14:23:19.877" Comment="http://twitter.com/#!/StackGameDev/status/45852236810686464" />
  <row Id="19815" PostHistoryTypeId="2" PostId="9578" RevisionGUID="221b0558-ae46-460f-8f79-e6b9f44f6f21" CreationDate="2011-03-10T16:23:42.630" UserId="4104" Text="***Note:** I've already found an answer (which I will post after this question) - I was just wondering if I was doing it right, or if there is a better way.*&#xD;&#xA;&#xD;&#xA;I'm making a &quot;2.5D&quot; isometric game using OpenGL ES (JOGL). By &quot;2.5D&quot;, I mean that the world is 3D, but it is rendered using 2D isometric tiles.&#xD;&#xA;&#xD;&#xA;The original problem I had to solve was that my textures had to be rendered in order (from back to front), so that the tiles overlapped properly to create the proper effect. After some reading, I quickly realised that this is the &quot;old hat&quot; 2D approach. This became difficult to do efficiently, since the 3D world can be modified by the player (so stuff can appear anywhere in 3D space) - so it seemed logical that I take advantage of the depth buffer. This meant that I didn't have to worry about rendering stuff in the correct order.&#xD;&#xA;&#xD;&#xA;However, I faced a problem. If you use `GL_DEPTH_TEST` and `GL_BLEND` together, it creates an effect where objects are blended with the background before they are &quot;sorted&quot; by z order (meaning that you get a weird kind of overlap where the transparency should be).&#xD;&#xA;&#xD;&#xA;![transparency overlap problem][1]&#xD;&#xA;&#xD;&#xA;Here's some pseudo code that should illustrate the problem (incidentally, I'm using libgdx for Android).&#xD;&#xA;&#xD;&#xA;    create() {&#xD;&#xA;        // ...&#xD;&#xA;        // some other code here&#xD;&#xA;        // ...&#xD;&#xA;    &#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_DEPTH_TEST);&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_BLEND);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    render() {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;        Gdx.gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;    &#xD;&#xA;        // ...&#xD;&#xA;        // bind texture and create vertices&#xD;&#xA;        // ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So the question is: How do I solve the transparency overlap problem?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/MlZY6.png" />
  <row Id="19816" PostHistoryTypeId="1" PostId="9578" RevisionGUID="221b0558-ae46-460f-8f79-e6b9f44f6f21" CreationDate="2011-03-10T16:23:42.630" UserId="4104" Text="How do I use depth testing and texture transparency together in my 2.5D world?" />
  <row Id="19817" PostHistoryTypeId="3" PostId="9578" RevisionGUID="221b0558-ae46-460f-8f79-e6b9f44f6f21" CreationDate="2011-03-10T16:23:42.630" UserId="4104" Text="&lt;2d&gt;&lt;opengl&gt;&lt;opengl-es&gt;&lt;depth-buffer&gt;&lt;blending&gt;" />
  <row Id="19818" PostHistoryTypeId="2" PostId="9579" RevisionGUID="e3966450-9763-4cd9-87fc-a37e57f6e4bd" CreationDate="2011-03-10T16:25:59.693" UserId="4104" Text="*OK, so here's my solution (please comment if it can be done better)...*&#xD;&#xA;&#xD;&#xA;Turns out that I should in fact be using alpha testing (though, I discovered this by accident, so I'm not entirely sure why it works).&#xD;&#xA;&#xD;&#xA;    create() {&#xD;&#xA;        // ...&#xD;&#xA;        // some other code here&#xD;&#xA;        // ...&#xD;&#xA;    &#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_DEPTH_TEST);&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_ALPHA_TEST);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    render() {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;        Gdx.gl10.glAlphaFunc(GL10.GL_GREATER, 0);&#xD;&#xA;    &#xD;&#xA;        // ...&#xD;&#xA;        // bind texture and create vertices&#xD;&#xA;        // ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the use of `GL_ALPHA_TEST`, and `glAlphaFunc`." />
  <row Id="19819" PostHistoryTypeId="2" PostId="9580" RevisionGUID="6c2e2ecd-6a57-4686-82bd-5e9719d0f131" CreationDate="2011-03-10T16:44:00.533" UserId="5957" Text="Alpha testing is used to stop the renderer drawing pixels to any buffer, including the z buffer. Alpha blending is just a visual thing - values are still written to the zbuffer, which can result in problems like this - invisible pixels are infront of subsequently rendered pixels which means they'll fail the ztest when you draw the new pixels. This is what you can see in the image you gave, a ztest fail.&#xD;&#xA;&#xD;&#xA;Switching off z writing will also achieve the same ends but you have to ensure you draw everything int back to front order. This should be easy enough to do in your isometric game." />
  <row Id="19820" PostHistoryTypeId="25" PostId="9578" RevisionGUID="258f15d1-403e-4b31-9ad5-f1ce2ada7f57" CreationDate="2011-03-10T17:23:19.530" Comment="http://twitter.com/#!/StackGameDev/status/45897533872017408" />
  <row Id="19821" PostHistoryTypeId="2" PostId="9581" RevisionGUID="8fb275c1-178a-48ef-a751-60c610c3a5a7" CreationDate="2011-03-10T17:51:39.880" UserId="3689" Text="is there any good 3d game engine like udk but with open license that the developer dont need to be tied and with out the need to pay " />
  <row Id="19822" PostHistoryTypeId="1" PostId="9581" RevisionGUID="8fb275c1-178a-48ef-a751-60c610c3a5a7" CreationDate="2011-03-10T17:51:39.880" UserId="3689" Text="which 3d/game engine is good and open source like udk but not GPL" />
  <row Id="19823" PostHistoryTypeId="3" PostId="9581" RevisionGUID="8fb275c1-178a-48ef-a751-60c610c3a5a7" CreationDate="2011-03-10T17:51:39.880" UserId="3689" Text="&lt;3d-engines&gt;&lt;open-source&gt;" />
  <row Id="19824" PostHistoryTypeId="2" PostId="9582" RevisionGUID="f19497e9-7329-409f-bd46-f927bb8b71b0" CreationDate="2011-03-10T17:56:01.453" UserId="6019" Text="I have bad experinace in choosing Cross platform game development SDK, I did research and evaluated many SDK, and i finalized to use Airplay SDK, seems SDK has good documents and samples, so easy to jump, i developed around 60 games which deployed on android and iphone, it works fine.&#xD;&#xA;&#xD;&#xA;Now i would like to integrate ad on Airplay based games, and seems airplay don't have capability to render HTML,CSS &amp; JS (like webview), Seems it allow only to draw image but don't have HTML.&#xD;&#xA;&#xD;&#xA;So if you are thinking to develop games without ads(or if you have own image ads) then i think Airplay is fine, if you are thinking to have ad, then i suggest to not go with Airplay.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Suresh Nariya." />
  <row Id="19825" PostHistoryTypeId="2" PostId="9583" RevisionGUID="26df82b4-df06-4582-ba70-cbd91e5c3751" CreationDate="2011-03-10T18:33:51.610" UserId="2306" Text="As long as the a triangle is defined by three non-colinear vertices (read: none of the angles are exactly Pi), then the vertices define a unique plane. &#xD;&#xA;&#xD;&#xA;A quad is, of course defined by four vertices. It's perfectly possible for those vertices to be non-coplanar. In that case, your quad would really be two triangles divided by a diagonal on the quad. That's two planes, two sets of surface normals, etc.&#xD;&#xA;&#xD;&#xA;Every available modeling tool, every algorithm for texturing, lighting, etc all assume that a model is made of plane segments, and every formula we have (cross products for normal calculation is the first one we have) use the absolute minimum input dataset - three vertices define a plane, and the plane is what we need to do all of the fancy stuff. &#xD;&#xA;&#xD;&#xA;You could certainly write an engine to work with quads, but you'd find yourself ignoring the forth vertex in just about every case, except for when you (frequently) would need to make sure it's coplanar with the other three that define the quad. And, the most logical solution to the case where it is *not* coplanar would be to split the quad into two triangles. So, why not just do that to start with? &#xD;&#xA;&#xD;&#xA;What on earth would be the point of working with quads?&#xD;&#xA;&#xD;&#xA;If you want a quad, put two triangles together. " />
  <row Id="19826" PostHistoryTypeId="5" PostId="9583" RevisionGUID="6ef9e7a9-f6fc-4aba-87c4-267b00e60fb6" CreationDate="2011-03-10T18:43:24.097" UserId="2306" Comment="deleted 2 characters in body" Text="As long as the triangle is defined by three non-colinear vertices (read: none of the angles are exactly Pi), then the vertices define a unique plane. &#xD;&#xA;&#xD;&#xA;A quad is, of course defined by four vertices. It's perfectly possible for those vertices to be non-coplanar. In that case, your quad would really be two triangles divided by a diagonal on the quad. That's two planes, two sets of surface normals, etc.&#xD;&#xA;&#xD;&#xA;Every available modeling tool, every algorithm for texturing, lighting, etc all assume that a model is made of plane segments, and every formula we have (cross products for normal calculation is the first one we have) use the absolute minimum input dataset - three vertices define a plane, and the plane is what we need to do all of the fancy stuff. &#xD;&#xA;&#xD;&#xA;You could certainly write an engine to work with quads, but you'd find yourself ignoring the forth vertex in just about every case, except for when you (frequently) would need to make sure it's coplanar with the other three that define the quad. And, the most logical solution to the case where it is *not* coplanar would be to split the quad into two triangles. So, why not just do that to start with? &#xD;&#xA;&#xD;&#xA;What on earth would be the point of working with quads?&#xD;&#xA;&#xD;&#xA;If you want a quad, put two triangles together. " />
  <row Id="19827" PostHistoryTypeId="5" PostId="9582" RevisionGUID="a6f1d1a8-b49f-4961-a928-a2446e1756ff" CreationDate="2011-03-10T19:14:17.563" UserId="1198" Comment="Fixed &quot;i&quot; and dropped signature" Text="I have bad experinace in choosing Cross platform game development SDK, I did research and evaluated many SDK, and I finalized to use Airplay SDK, seems SDK has good documents and samples, so easy to jump, I developed around 60 games which deployed on android and iphone, it works fine.&#xD;&#xA;&#xD;&#xA;Now I would like to integrate ad on Airplay based games, and seems airplay don't have capability to render HTML,CSS &amp; JS (like webview), Seems it allow only to draw image but don't have HTML.&#xD;&#xA;&#xD;&#xA;So if you are thinking to develop games without ads(or if you have own image ads) then I think Airplay is fine, if you are thinking to have ad, then I suggest to not go with Airplay." />
  <row Id="19828" PostHistoryTypeId="24" PostId="9582" RevisionGUID="a6f1d1a8-b49f-4961-a928-a2446e1756ff" CreationDate="2011-03-10T19:14:17.563" Comment="Proposed by 1198 approved by 51 edit id of 73" />
  <row Id="19829" PostHistoryTypeId="5" PostId="9581" RevisionGUID="9b7cdd71-4d55-4b20-8e1c-16edf91fa35b" CreationDate="2011-03-10T19:14:43.490" UserId="1198" Comment="attempted to fix grammar and capitalization " Text="Is there any good 3D game engine like UDK, but with an open license that the developer does not need to be tied and with out the need to pay?" />
  <row Id="19830" PostHistoryTypeId="4" PostId="9581" RevisionGUID="9b7cdd71-4d55-4b20-8e1c-16edf91fa35b" CreationDate="2011-03-10T19:14:43.490" UserId="1198" Comment="attempted to fix grammar and capitalization " Text="Which 3D Game Engine is Good and Open Source like UDK but not GPL" />
  <row Id="19831" PostHistoryTypeId="24" PostId="9581" RevisionGUID="9b7cdd71-4d55-4b20-8e1c-16edf91fa35b" CreationDate="2011-03-10T19:14:43.490" Comment="Proposed by 1198 approved by 51 edit id of 74" />
  <row Id="19832" PostHistoryTypeId="2" PostId="9584" RevisionGUID="e021215c-fea8-4cdc-b738-c7e548da828d" CreationDate="2011-03-10T19:24:19.410" UserId="5899" Text="Lighting plays a fundamental role into videogames. A videogame without a good ilumination is flat and without life. I'm looking for a book that explains how must be iluminated a scene and what factors are involved in the creation of convincing worlds. " />
  <row Id="19833" PostHistoryTypeId="1" PostId="9584" RevisionGUID="e021215c-fea8-4cdc-b738-c7e548da828d" CreationDate="2011-03-10T19:24:19.410" UserId="5899" Text="Any good book on lighting in video games?" />
  <row Id="19834" PostHistoryTypeId="3" PostId="9584" RevisionGUID="e021215c-fea8-4cdc-b738-c7e548da828d" CreationDate="2011-03-10T19:24:19.410" UserId="5899" Text="&lt;books&gt;&lt;lighting&gt;" />
  <row Id="19835" PostHistoryTypeId="2" PostId="9585" RevisionGUID="b4a180ca-cb32-4268-adfa-d724f8503683" CreationDate="2011-03-10T19:36:29.383" UserId="395" Text="Panda3D is relatively nice (note: relative to most FOSS game engines, not things like UDK) and free/unencumbered, though you would need a commercial license for FMOD if you use that I think (FFTW and ARToolkit also need commercial licences if you use them, but those are more special case tools). FMOD is dirt cheap as middleware goes though. Unity isn't open really, but I don't think there are any royalty requirements on it." />
  <row Id="19836" PostHistoryTypeId="2" PostId="9586" RevisionGUID="4fb02bc9-23a5-4121-b704-4c2b7db1155b" CreationDate="2011-03-10T20:04:20.013" UserId="5543" Text="I've just started learning gamedev (in particular android EGL based) and have ran over a code from Pro Android Games 2 that looks as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; /*  * Copyright (C) 2007 Google Inc. &#xD;&#xA;&gt; *  * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); &#xD;&#xA;&gt; * you may not use this file except in compliance with the License.  * You&#xD;&#xA;&gt; may obtain a copy of the License at  *&#xD;&#xA;&gt; *      http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA;&gt; *  * Unless required by applicable law or agreed to in writing, software  *&#xD;&#xA;&gt; distributed under the License is&#xD;&#xA;&gt; distributed on an &quot;AS IS&quot; BASIS,  *&#xD;&#xA;&gt; WITHOUT WARRANTIES OR CONDITIONS OF&#xD;&#xA;&gt; ANY KIND, either express or implied. &#xD;&#xA;&gt; * See the License for the specific language governing permissions and  *&#xD;&#xA;&gt; limitations under the License.  */&#xD;&#xA;&gt; &#xD;&#xA;&gt; package opengl.scenes.cubes;&#xD;&#xA;&gt; &#xD;&#xA;&gt; import java.nio.ByteBuffer; import&#xD;&#xA;&gt; java.nio.ByteOrder; import&#xD;&#xA;&gt; java.nio.IntBuffer;&#xD;&#xA;&gt; &#xD;&#xA;&gt; import javax.microedition.khronos.opengles.GL10;&#xD;&#xA;&gt; &#xD;&#xA;&gt; public class Cube {&#xD;&#xA;&#xD;&#xA;&gt;     public Cube(){&#xD;&#xA;&#xD;&#xA;&gt;         int one = 0x10000;&#xD;&#xA;&gt;         int vertices[] = {&#xD;&#xA;&gt;                 -one, -one, -one,&#xD;&#xA;&gt;                 one, -one, -one,&#xD;&#xA;&gt;                 one,  one, -one,&#xD;&#xA;&gt;                 -one,  one, -one,&#xD;&#xA;&gt;                 -one, -one,  one,&#xD;&#xA;&gt;                 one, -one,  one,&#xD;&#xA;&gt;                 one,  one,  one,&#xD;&#xA;&gt;                 -one,  one,  one,&#xD;&#xA;&gt;         };&#xD;&#xA;&gt; &#xD;&#xA;&gt;         int colors[] = {&#xD;&#xA;&gt;                 0,    0,    0,  one,&#xD;&#xA;&gt;                 one,    0,    0,  one,&#xD;&#xA;&gt;                 one,  one,    0,  one,&#xD;&#xA;&gt;                 0,  one,    0,  one,&#xD;&#xA;&gt;                 0,    0,  one,  one,&#xD;&#xA;&gt;                 one,    0,  one,  one,&#xD;&#xA;&gt;                 one,  one,  one,  one,&#xD;&#xA;&gt;                 0,  one,  one,  one,&#xD;&#xA;&gt;         };&#xD;&#xA;&gt; &#xD;&#xA;&gt;         byte indices[] = {&#xD;&#xA;&gt;                 0, 4, 5,    0, 5, 1,&#xD;&#xA;&gt;                 1, 5, 6,    1, 6, 2,&#xD;&#xA;&gt;                 2, 6, 7,    2, 7, 3,&#xD;&#xA;&gt;                 3, 7, 4,    3, 4, 0,&#xD;&#xA;&gt;                 4, 7, 6,    4, 6, 5,&#xD;&#xA;&gt;                 3, 0, 1,    3, 1, 2&#xD;&#xA;&gt;         };&#xD;&#xA;&gt; &#xD;&#xA;&gt;         // Buffers to be passed to gl*Pointer() functions&#xD;&#xA;&gt;         // must be direct, i.e., they must be placed on the&#xD;&#xA;&gt;         // native heap where the garbage collector cannot vbb.asIntBuffer()&#xD;&#xA;&gt;         // move them.&#xD;&#xA;&gt;         //&#xD;&#xA;&gt;         // Buffers with multi-byte datatypes (e.g., short, int, float)&#xD;&#xA;&gt;         // must have their byte order set to native order&#xD;&#xA;&gt; &#xD;&#xA;&gt;         ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4);&#xD;&#xA;&gt;         vbb.order(ByteOrder.nativeOrder());&#xD;&#xA;&gt;         mVertexBuffer = vbb.asIntBuffer();&#xD;&#xA;&gt;         mVertexBuffer.put(vertices);&#xD;&#xA;&gt;         mVertexBuffer.position(0);&#xD;&#xA;&gt; &#xD;&#xA;&gt;         ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4);&#xD;&#xA;&gt;         cbb.order(ByteOrder.nativeOrder());&#xD;&#xA;&gt;         mColorBuffer = cbb.asIntBuffer();&#xD;&#xA;&gt;         mColorBuffer.put(colors);&#xD;&#xA;&gt;         mColorBuffer.position(0);&#xD;&#xA;&gt; &#xD;&#xA;&gt;         mIndexBuffer = ByteBuffer.allocateDirect(indices.length);&#xD;&#xA;&gt;         mIndexBuffer.put(indices);&#xD;&#xA;&gt;         mIndexBuffer.position(0);&#xD;&#xA;&gt;     }&#xD;&#xA;&gt; &#xD;&#xA;&gt;     public void draw(GL10 gl)&#xD;&#xA;&gt;     {&#xD;&#xA;&gt;         gl.glFrontFace(GL10.GL_CW);&#xD;&#xA;&gt;         gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer);&#xD;&#xA;&gt;         gl.glColorPointer(4, GL10.GL_FIXED, 0, mColorBuffer);&#xD;&#xA;&gt;         gl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_BYTE, mIndexBuffer);&#xD;&#xA;&gt;     }&#xD;&#xA;&gt; &#xD;&#xA;&gt;     private IntBuffer   mVertexBuffer;&#xD;&#xA;&gt;     private IntBuffer   mColorBuffer;&#xD;&#xA;&gt;     private ByteBuffer  mIndexBuffer;}&#xD;&#xA;&#xD;&#xA;So it suggests to draw a cube using triangles. My question is: can I draw the same cube using GL_TPOLYGON? If so, isn't that an easier/more understandable way to do things?" />
  <row Id="19837" PostHistoryTypeId="1" PostId="9586" RevisionGUID="4fb02bc9-23a5-4121-b704-4c2b7db1155b" CreationDate="2011-03-10T20:04:20.013" UserId="5543" Text="Can one draw a cube using different method/drawing mode?" />
  <row Id="19838" PostHistoryTypeId="3" PostId="9586" RevisionGUID="4fb02bc9-23a5-4121-b704-4c2b7db1155b" CreationDate="2011-03-10T20:04:20.013" UserId="5543" Text="&lt;3d&gt;&lt;java&gt;&lt;android&gt;&lt;opengl-es&gt;&lt;cubemap&gt;" />
  <row Id="19839" PostHistoryTypeId="25" PostId="9584" RevisionGUID="f096775c-1d0b-426c-83d2-42a9a1977ca1" CreationDate="2011-03-10T20:23:20.747" Comment="http://twitter.com/#!/StackGameDev/status/45942837652619264" />
  <row Id="19840" PostHistoryTypeId="2" PostId="9587" RevisionGUID="cd752e5f-149f-4af5-b474-e146835b94ed" CreationDate="2011-03-10T20:52:39.897" UserId="5957" Text="As mentioned in this thread: &lt;http://gamedev.stackexchange.com/questions/9511/why-do-game-engines-convert-models-to-triangles-compared-to-keeping-it-as-four-si/9532#9532&gt; triangles are what we generally use. &#xD;&#xA;&#xD;&#xA;If you want to work in quads, add some higher level code to add quads to an index buffer that then adds two triangles. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="19841" PostHistoryTypeId="2" PostId="9588" RevisionGUID="835bdd00-5fbd-402d-b10c-70154a34ed1c" CreationDate="2011-03-10T20:52:45.310" UserId="2580" Text="I've read some about component-based game design but am still having some trouble figure out how exactly you'd go about implementing it. Are there any good examples of component-based games or game engines that I could read through to get a better feel for this?" />
  <row Id="19842" PostHistoryTypeId="1" PostId="9588" RevisionGUID="835bdd00-5fbd-402d-b10c-70154a34ed1c" CreationDate="2011-03-10T20:52:45.310" UserId="2580" Text="Open source component-based game or engines?" />
  <row Id="19843" PostHistoryTypeId="3" PostId="9588" RevisionGUID="835bdd00-5fbd-402d-b10c-70154a34ed1c" CreationDate="2011-03-10T20:52:45.310" UserId="2580" Text="&lt;component-based&gt;&lt;source-code&gt;" />
  <row Id="19844" PostHistoryTypeId="2" PostId="9589" RevisionGUID="e3faed58-1098-420b-a1dc-146e3e6c3ceb" CreationDate="2011-03-10T20:59:39.250" UserId="1156" Text="Here are some resources you may like:  &#xD;&#xA;There's [this][1] amazing thread. It's not a game engine itself, but the design and discussion is great.  &#xD;&#xA;A question on [StackOverflow][2] on a very similar topic.&#xD;&#xA;&#xD;&#xA;To answer the original question, the Elephant framework in C# is precisely what you want: it has been discontinued, but [still exists here][3] for reference of implementation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/&#xD;&#xA;  [2]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design&#xD;&#xA;  [3]: http://elephant.codeplex.com/" />
  <row Id="19845" PostHistoryTypeId="2" PostId="9590" RevisionGUID="c50652db-3744-480d-a702-b9d9aa686745" CreationDate="2011-03-10T21:31:18.260" UserId="6024" Text="I'm thinking of making a MMO server, and I've been looking at how other games structure their network. One of the things I've noticed is that there's always a Login server and then the game server(s).&#xD;&#xA;&#xD;&#xA;I'm still deciding if I should do this, but I would like to hear some opinions first.&#xD;&#xA;What are the advantages of this, and how does the login server communicates with game server to handle logins?" />
  <row Id="19846" PostHistoryTypeId="1" PostId="9590" RevisionGUID="c50652db-3744-480d-a702-b9d9aa686745" CreationDate="2011-03-10T21:31:18.260" UserId="6024" Text="Should I keep login server apart from game server?" />
  <row Id="19847" PostHistoryTypeId="3" PostId="9590" RevisionGUID="c50652db-3744-480d-a702-b9d9aa686745" CreationDate="2011-03-10T21:31:18.260" UserId="6024" Text="&lt;mmo&gt;&lt;network&gt;&lt;server&gt;" />
  <row Id="19848" PostHistoryTypeId="2" PostId="9591" RevisionGUID="d3a887fe-6e9f-459f-a7f8-e08e6ef55022" CreationDate="2011-03-10T21:39:36.720" UserId="4296" Text="[This site starts into a basic implementation.][1]&#xD;&#xA;&#xD;&#xA;Most of the above is inspired by this [article at T=Machine][2]&#xD;&#xA;&#xD;&#xA;I started into a basic implementation inspired by the above two links.  I'm pretty sure I've deviated a lot from the pure theory of component systems, and there undoubtedly bugs, but it might prove useful if you're looking for some simple examples.&#xD;&#xA;&#xD;&#xA;[Bricle][3] (C#/XNA)&#xD;&#xA;&#xD;&#xA;Right now it's just loading up some basic entities, handles some events, etc.  The main locations you're looking for are the [Engine.EntitySystem folder][4] and probably the [PlayScreen][5] where entities are actually created.&#xD;&#xA;&#xD;&#xA;Creating a simple type-based component store and hiding that behind a common EntityManager was relatively straight forward.&#xD;&#xA;&#xD;&#xA;The first challenge I ran into was when individual systems might require multiple component types (ie, Physical components and InputMoveable).  To use the relational database language, I had to find a way to do a JOIN query.  For that, I made another collection type for entities built from the matching component type queries - each entity collection hooks into an OnEntityCreate event and checks if it matches.  Still some bugs there.&#xD;&#xA;&#xD;&#xA;The second challenge was actually creating a 'game object' - I called them templates.  Here I'm probably not very pure according to T=Machine's specs, but it seems to work.  Templates group together component instantiations and allow easier entity composition (ie, the Ball is Drawable and Physical). &#xD;&#xA;&#xD;&#xA;Hope that's helpful - entity/component systems can be a challenge to get through some of the initial hurdles.&#xD;&#xA;&#xD;&#xA;  [1]: http://t-machine.org/index.php/2010/05/09/entity-system-1-javaandroid/&#xD;&#xA;  [2]: http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/&#xD;&#xA;  [3]: https://bitbucket.org/leniency/bricle&#xD;&#xA;  [4]: https://bitbucket.org/leniency/bricle/src/4cd3bb34aa6f/Engine/EntitySystems/&#xD;&#xA;  [5]: https://bitbucket.org/leniency/bricle/src/4cd3bb34aa6f/Bricle/Bricle/Screens/PlayScreen.cs" />
  <row Id="19849" PostHistoryTypeId="2" PostId="9592" RevisionGUID="9ec186b4-e0e3-4e0b-b557-e0f03b0d00e2" CreationDate="2011-03-10T21:45:28.150" UserId="6021" Text="I believe this is mostly caused by the fact that login and game handling are logically more or less independent, so they're typically kept separate for better decoupling, easier maintenance and scalability. They needn't necessarily reside on different physical servers .. they can as well run as independent services on the same machine. If the traffic grows too large, the login server can easily be moved to another machine.&#xD;&#xA;&#xD;&#xA;Also, login servers are a likely attack vector so it's good to have them separate from a security point of view.&#xD;&#xA;&#xD;&#xA;Internally, different server-side services can use regular sockets to communicate with each other, be they on the same machine or on another machine in the cluster. Alternatively, a database server could be used to maintain a 'is logged in' flag for each user.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19850" PostHistoryTypeId="2" PostId="9593" RevisionGUID="38694426-19bc-4e7e-96a1-f9b58b6453fa" CreationDate="2011-03-10T22:07:26.693" UserId="2971" Text="I am working in Flash and a few things have been brought to my attention. Below is some code I have some questions on:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    addEventListener(Event.ENTER_FRAME, function(e:Event):void&#xD;&#xA;    {&#xD;&#xA;    	if (KEY_RIGHT)&#xD;&#xA;    	{&#xD;&#xA;    		// Move character right&#xD;&#xA;    	}&#xD;&#xA;        // Etc.&#xD;&#xA;    });&#xD;&#xA;    &#xD;&#xA;    stage.addEventListener(KeyboardEvent.KEY_DOWN, function(e:KeyboardEvent):void&#xD;&#xA;    {&#xD;&#xA;    	// Report key which is down&#xD;&#xA;    });&#xD;&#xA;    &#xD;&#xA;    stage.addEventListener(KeyboardEvent.KEY_UP, function(e:KeyboardEvent):void&#xD;&#xA;    {&#xD;&#xA;    	// Report key which is up&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;I have the project configured so that it has a framerate of 60 FPS. The two questions I have on this are:&#xD;&#xA;&#xD;&#xA;1. What happens when it is unable to call that function every 1/60 of a second?&#xD;&#xA;2. Is this a way of processing events that need to be limited by time? Or should it be done a different way?&#xD;&#xA;" />
  <row Id="19851" PostHistoryTypeId="1" PostId="9593" RevisionGUID="38694426-19bc-4e7e-96a1-f9b58b6453fa" CreationDate="2011-03-10T22:07:26.693" UserId="2971" Text="Flash framerate reliability" />
  <row Id="19852" PostHistoryTypeId="3" PostId="9593" RevisionGUID="38694426-19bc-4e7e-96a1-f9b58b6453fa" CreationDate="2011-03-10T22:07:26.693" UserId="2971" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;best-practices&gt;&lt;first-person-shooter&gt;&lt;frame-rate&gt;" />
  <row Id="19853" PostHistoryTypeId="2" PostId="9594" RevisionGUID="2c81c91d-469b-41c0-a249-d8dd13738d37" CreationDate="2011-03-10T22:18:35.537" UserId="450" Text="One very important aspect in MMOs development is achieving scalability and allowing for load balancing.&#xD;&#xA;&#xD;&#xA;Authentication users by checking credentials, ban status, counting recent failed logins, etc. is a task that can be done without knowing anything of the game logic or game data. So it is very easy to move that to its own server cluster.&#xD;&#xA;&#xD;&#xA;Furthermore the login servers are a well known &quot;entrance&quot; for the client to contact. After successful authentication they can dispatch the client to the appropriate server in the game server cluster. This dispatching can be done by forwarding the network connection to the right game server or telling the client to open a new connection to a right game server.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You should think about cuts of your system for distribution early on. It is very easy to run several pieces on one server. But it is quite difficult to split things that have been developed as one unit." />
  <row Id="19854" PostHistoryTypeId="6" PostId="9590" RevisionGUID="d27abf19-fcb4-486a-aaf8-5653888f67cc" CreationDate="2011-03-10T22:19:22.633" UserId="450" Comment="edited tags" Text="&lt;mmo&gt;&lt;network&gt;&lt;server&gt;&lt;scalability&gt;" />
  <row Id="19855" PostHistoryTypeId="5" PostId="9591" RevisionGUID="d210114b-2910-4f3f-9e9d-48cde4759df5" CreationDate="2011-03-10T22:21:35.717" UserId="4296" Comment="Updated links with newer changeset" Text="[This site starts into a basic implementation.][1]&#xD;&#xA;&#xD;&#xA;Most of the above is inspired by this [article at T=Machine][2]&#xD;&#xA;&#xD;&#xA;I started into a basic implementation inspired by the above two links.  I'm pretty sure I've deviated a lot from the pure theory of component systems, and there undoubtedly bugs, but it might prove useful if you're looking for some simple examples.&#xD;&#xA;&#xD;&#xA;[Bricle][3] (C#/XNA)&#xD;&#xA;&#xD;&#xA;Right now it's just loading up some basic entities, handles some events, etc.  The main locations you're looking for are the [Engine.EntitySystem folder][4] and probably the [PlayScreen][5] where entities are actually created.&#xD;&#xA;&#xD;&#xA;Creating a simple type-based component store and hiding that behind a common EntityManager was relatively straight forward.&#xD;&#xA;&#xD;&#xA;The first challenge I ran into was when individual systems might require multiple component types (ie, Physical components and InputMoveable).  To use the relational database language, I had to find a way to do a JOIN query.  For that, I made another collection type for entities built from the matching component type queries - each entity collection hooks into an OnEntityCreate event and checks if it matches.  Still some bugs there.&#xD;&#xA;&#xD;&#xA;The second challenge was actually creating a 'game object' - I called them templates.  Here I'm probably not very pure according to T=Machine's specs, but it seems to work.  Templates group together component instantiations and allow easier entity composition (ie, the Ball is Drawable and Physical). &#xD;&#xA;&#xD;&#xA;Hope that's helpful - entity/component systems can be a challenge to get through some of the initial hurdles.&#xD;&#xA;&#xD;&#xA;  [1]: http://t-machine.org/index.php/2010/05/09/entity-system-1-javaandroid/&#xD;&#xA;  [2]: http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/&#xD;&#xA;  [3]: https://bitbucket.org/leniency/bricle&#xD;&#xA;  [4]: https://bitbucket.org/leniency/bricle/src/efcfa5e543e4/Engine/EntitySystems/&#xD;&#xA;  [5]: https://bitbucket.org/leniency/bricle/src/efcfa5e543e4/Bricle/Bricle/Screens/PlayScreen.cs" />
  <row Id="19856" PostHistoryTypeId="6" PostId="9593" RevisionGUID="13dce948-1771-4b80-b8f3-a2dd4c0ad2ad" CreationDate="2011-03-10T22:32:21.807" UserId="51" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;events&gt;&lt;frame-rate&gt;" />
  <row Id="19857" PostHistoryTypeId="2" PostId="9595" RevisionGUID="8ce5a920-f196-4069-92b5-a950c2417974" CreationDate="2011-03-10T22:42:05.387" UserId="2773" Text="I have trouble to find any well-developed opensource Collectible Card Games project.&#xD;&#xA;&#xD;&#xA;Can you help me with that?&#xD;&#xA;&#xD;&#xA;I want to take one of these games and port it on mobile plarform." />
  <row Id="19858" PostHistoryTypeId="1" PostId="9595" RevisionGUID="8ce5a920-f196-4069-92b5-a950c2417974" CreationDate="2011-03-10T22:42:05.387" UserId="2773" Text="Is there any opensource CCG projects?" />
  <row Id="19859" PostHistoryTypeId="3" PostId="9595" RevisionGUID="8ce5a920-f196-4069-92b5-a950c2417974" CreationDate="2011-03-10T22:42:05.387" UserId="2773" Text="&lt;open-source&gt;" />
  <row Id="19860" PostHistoryTypeId="2" PostId="9596" RevisionGUID="e31cf5d8-f7bf-4289-b4e4-8a243aa61f01" CreationDate="2011-03-10T22:46:54.910" UserId="20" Text="**About your code:**&#xD;&#xA;I think it's funny that you use anonymous functions for event listeners, it's something I don't see that often in ActionScript (it is more common with JavaScript).&#xD;&#xA;You should be aware that you can run into some garbage-collection issues if you add event listeners like that (because you're no longer able to remove them later on). As long as your event listeners stay up during the whole execution time of your app, it isn't an issue though.&#xD;&#xA;&#xD;&#xA;**Regarding your questions:** &#xD;&#xA;&#xD;&#xA; 1. An update step can take longer to execute than 1/60 of a second, even if you specified the FPS to be 60. It just means it won't go *above* 60, but can easily drop *below* 60 FPS. You can test this yourself by adding some dummy loop in your event listener, something like: `for(var i:int = 0; i &lt; 1000000; i++){ var tmp:Number = 1000.0/20.0; }`&#xD;&#xA; 2. I don't understand what you mean by &quot;limited by time&quot;? Are you asking whether or not to use/assume a fixed or variable timestep?" />
  <row Id="19861" PostHistoryTypeId="5" PostId="9596" RevisionGUID="92d35ab6-e3ac-4d47-98ac-98f5ffa0b430" CreationDate="2011-03-10T22:52:11.927" UserId="20" Comment="added 271 characters in body" Text="**About your code:**&#xD;&#xA;I think it's funny that you use anonymous functions for event listeners, it's something I don't see that often in ActionScript (it is more common with JavaScript).&#xD;&#xA;You should be aware that you can run into some garbage-collection issues if you add event listeners like that (because you're no longer able to remove them later on). As long as your event listeners stay up during the whole execution time of your app, it isn't an issue though.&#xD;&#xA;&#xD;&#xA;**Regarding your questions:** &#xD;&#xA;&#xD;&#xA; 1. An update step can take longer to execute than 1/60 of a second, even if you specified the FPS to be 60. It just means it won't go *above* 60, but can easily drop *below* 60 FPS. You can test this yourself by adding some dummy loop in your event listener, something like: `for(var i:int = 0; i &lt; 1000000; i++){ var tmp:Number = 1000.0/20.0; }`. The Flash runtime will use as much time as required for a frame. That means it will try to run at the specified framerate, but it won't enforce it in any way (eg. stopping execution of code). An endless loop (`while(true){}`) will freeze your game on the first frame...&#xD;&#xA; 2. I don't understand what you mean by &quot;limited by time&quot;? Are you asking whether or not to use/assume a fixed or variable timestep?" />
  <row Id="19862" PostHistoryTypeId="5" PostId="9593" RevisionGUID="246afaad-6b5f-4c11-9261-077f699efe2b" CreationDate="2011-03-10T23:14:33.987" UserId="2971" Comment="added 89 characters in body" Text="I am working in Flash and a few things have been brought to my attention. Below is some code I have some questions on:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    addEventListener(Event.ENTER_FRAME, function(e:Event):void&#xD;&#xA;    {&#xD;&#xA;    	if (KEY_RIGHT)&#xD;&#xA;    	{&#xD;&#xA;    		// Move character right&#xD;&#xA;    	}&#xD;&#xA;        // Etc.&#xD;&#xA;    });&#xD;&#xA;    &#xD;&#xA;    stage.addEventListener(KeyboardEvent.KEY_DOWN, function(e:KeyboardEvent):void&#xD;&#xA;    {&#xD;&#xA;    	// Report key which is down&#xD;&#xA;    });&#xD;&#xA;    &#xD;&#xA;    stage.addEventListener(KeyboardEvent.KEY_UP, function(e:KeyboardEvent):void&#xD;&#xA;    {&#xD;&#xA;    	// Report key which is up&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;I have the project configured so that it has a framerate of 60 FPS. The two questions I have on this are:&#xD;&#xA;&#xD;&#xA;1. What happens when it is unable to call that function every 1/60 of a second?&#xD;&#xA;2. Is this a way of processing events that need to be limited by time (ex: a ball which needs to travel to the right of the screen from the left in X seconds)? Or should it be done a different way?&#xD;&#xA;" />
  <row Id="19863" PostHistoryTypeId="25" PostId="9590" RevisionGUID="fcf4f0dd-7ad7-4739-ad7d-695333cb6cbf" CreationDate="2011-03-10T23:23:25.677" Comment="http://twitter.com/#!/StackGameDev/status/45988156679528448" />
  <row Id="19864" PostHistoryTypeId="2" PostId="9597" RevisionGUID="d00afe88-a354-4ff2-b2ed-e5d0591b5944" CreationDate="2011-03-10T23:57:59.690" UserId="2773" Text="I've found nice one - [Forge card game][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/forge-card-game/" />
  <row Id="19865" PostHistoryTypeId="2" PostId="9598" RevisionGUID="2f999954-1d5a-4877-b855-499ab0bfe0ef" CreationDate="2011-03-11T00:15:53.413" UserId="3830" Text="There seems to be a lot of turnover in the game industry.  I'm curious what the average job length is for game developers." />
  <row Id="19866" PostHistoryTypeId="1" PostId="9598" RevisionGUID="2f999954-1d5a-4877-b855-499ab0bfe0ef" CreationDate="2011-03-11T00:15:53.413" UserId="3830" Text="What is the average job length in the game industry?" />
  <row Id="19867" PostHistoryTypeId="3" PostId="9598" RevisionGUID="2f999954-1d5a-4877-b855-499ab0bfe0ef" CreationDate="2011-03-11T00:15:53.413" UserId="3830" Text="&lt;career&gt;&lt;industry&gt;" />
  <row Id="19868" PostHistoryTypeId="2" PostId="9599" RevisionGUID="42552f8c-bc21-4425-84ab-1f6732a36aa9" CreationDate="2011-03-11T00:41:17.363" UserId="4443" Text="Programmers average 5 years... I am not sure about the rest of the professions as I am just a programmer :)" />
  <row Id="19869" PostHistoryTypeId="2" PostId="9600" RevisionGUID="6c05521b-347c-4ec1-bc5c-7e13a402ceb7" CreationDate="2011-03-11T01:09:06.257" UserDisplayName="slcpfmmm" Text="It is indeed possible to draw polygons using OpenGL by passing GL_POLYGON instead of GL_TRIANGLES as the first parameter of glDrawElements(). Unfortunately, this is not supported in OpenGL ES, which is the subset of OpenGL that's available for your platform.&#xD;&#xA;&#xD;&#xA;In addition to GL_POLYGON, the GL_QUADS and GL_QUAD_STRIP primitives are not supported either.&#xD;&#xA;&#xD;&#xA;Fortunately, there's nothing you can do with quads that you can't do with triangles." />
  <row Id="19870" PostHistoryTypeId="2" PostId="9601" RevisionGUID="de8972b7-0be6-4489-b469-e5a4bf937886" CreationDate="2011-03-11T01:22:29.997" UserId="2469" Text="I don't know of any books that cover that topic on it's own. However there is a chapter in [Introduction to 3D Game Programming with DirectX 10][1] that covers lighting. The code examples are HLSL as it's a DX book, but the discussion about lighting algorithms is language agnostic. It covers diffuse, specular, ambient, parallel, point and spot lighting.&#xD;&#xA;&#xD;&#xA;[Essential Mathematics for Games and Interactive Applications, Second Edition][2] also has a nice chapter on lighting.&#xD;&#xA;&#xD;&#xA;You could also read [these slides][3] published by DICE, they cover various techniques used in battle field 3, including lighting and shadows. It doesn't go in depth, but give a nice overview of some of the things getting done in the industry.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Introduction-3D-Game-Programming-DirectX/dp/1598220535&#xD;&#xA;  [2]: http://www.amazon.com/Essential-Mathematics-Interactive-Applications-Second/dp/0123742978&#xD;&#xA;  [3]: http://publications.dice.se/" />
  <row Id="19871" PostHistoryTypeId="2" PostId="9602" RevisionGUID="3a6c6e36-c50f-4741-84a6-2765e563510d" CreationDate="2011-03-11T01:47:40.703" UserId="154" Text="Average time in a job at a single company or average time in the industry before total burnout?&#xD;&#xA;&#xD;&#xA;Since the industry is project based job length tends to be directly associated with product cycles. &#xD;&#xA;&#xD;&#xA;The is often the result of the post ship layoff. Companies tend to dump staff once a project ships since they don't need a full production team for pre-production on the next project. Now the nicer companies tend to use temporary contract hires for short term production staffing needs. This lets the employee know that they likely don't have a paycheck when the project ends. However the big publishers regularly cut even full time staff once the xmas games are sent to manufacturing.&#xD;&#xA;&#xD;&#xA;The other piece is that when finishing up a title employees are more likely to look around at other options. If you've just shipped your third football title and are burned out on the genre you tend to wait until the game is done and then find another job somewhere else.&#xD;&#xA;&#xD;&#xA;While there are some devs that have spent an entire career at a single company, what is far more common is finishing 1-2 games at a developer and then moving off to another one.&#xD;&#xA;" />
  <row Id="19872" PostHistoryTypeId="25" PostId="9598" RevisionGUID="cf942cd3-a243-42fa-8684-cd96f0111f79" CreationDate="2011-03-11T02:23:25.760" Comment="http://twitter.com/#!/StackGameDev/status/46033455405998080" />
  <row Id="19873" PostHistoryTypeId="2" PostId="9603" RevisionGUID="9255253a-fd9b-487e-8ff9-e4ec926efad9" CreationDate="2011-03-11T02:55:29.430" UserId="1101" Text="If we assume that getting 4 points to be co-planar is not a problem (it is, as the others have pointed out, but bear with me) then you find that rendering an arbitrary trapezium (which is what a quadrilateral will usually look like when transformed into screen space) is not particularly different from rendering a triangle - in fact, it pretty much works out the same once you perform clipping as that can introduce extra vertices. (At least in a software model - hardware may well have a simpler brute force way of doing the clipping.)&#xD;&#xA;&#xD;&#xA;The remaining issue therefore is one of representational efficiency. - you can easily represent a square with 2 triangles, and without any extra vertices if you use a triangle strip (3 verts for the 1st triangle, then an extra vert for the 2nd triangle). On the other hand, if you try and represent a triangle with a quad, you need to use 4 vertices and have a degenerate one that is identical to another. This is not ideal in terms of efficiency." />
  <row Id="19874" PostHistoryTypeId="2" PostId="9604" RevisionGUID="9ca95232-a18b-4b54-8640-0f2aee9431d7" CreationDate="2011-03-11T03:32:15.840" UserId="6027" Text="I have several friends at Ubisoft that are working for more than 15 years now." />
  <row Id="19875" PostHistoryTypeId="5" PostId="9595" RevisionGUID="da0682d3-3782-4888-bc20-f540ff3371c3" CreationDate="2011-03-11T04:35:11.870" UserId="953" Comment="Corrected spelling and grammar." Text="I'm having trouble finding any well-developed open source Collectible Card Game projects.&#xD;&#xA;&#xD;&#xA;Can you help me with that?&#xD;&#xA;&#xD;&#xA;I want to take one of these games and port it to a mobile platform." />
  <row Id="19876" PostHistoryTypeId="4" PostId="9595" RevisionGUID="da0682d3-3782-4888-bc20-f540ff3371c3" CreationDate="2011-03-11T04:35:11.870" UserId="953" Comment="Corrected spelling and grammar." Text="Are there any open source CCG projects?" />
  <row Id="19877" PostHistoryTypeId="25" PostId="9588" RevisionGUID="a3798b13-fd39-4087-9ce6-5ff5c2dee88d" CreationDate="2011-03-11T05:23:25.717" Comment="http://twitter.com/#!/StackGameDev/status/46078753650130944" />
  <row Id="19878" PostHistoryTypeId="2" PostId="9605" RevisionGUID="19417eee-6d7e-4246-8a11-c16be23739cb" CreationDate="2011-03-11T05:59:34.983" UserId="-1" Text="" />
  <row Id="19879" PostHistoryTypeId="2" PostId="9606" RevisionGUID="f1072526-830b-4c80-aa6a-5a04db4fdf84" CreationDate="2011-03-11T05:59:34.983" UserId="-1" Text="" />
  <row Id="19880" PostHistoryTypeId="2" PostId="9607" RevisionGUID="2054780a-e69b-421a-bdb5-ebfd30c9bd45" CreationDate="2011-03-11T06:00:49.460" UserId="4432" Text="I want to move one object (dot) in circular path.&#xD;&#xA;&#xD;&#xA;By using x and y position of that object.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="19881" PostHistoryTypeId="1" PostId="9607" RevisionGUID="2054780a-e69b-421a-bdb5-ebfd30c9bd45" CreationDate="2011-03-11T06:00:49.460" UserId="4432" Text="how to move object in circular path" />
  <row Id="19882" PostHistoryTypeId="3" PostId="9607" RevisionGUID="2054780a-e69b-421a-bdb5-ebfd30c9bd45" CreationDate="2011-03-11T06:00:49.460" UserId="4432" Text="&lt;graphics&gt;" />
  <row Id="19883" PostHistoryTypeId="2" PostId="9608" RevisionGUID="cc0f9b80-5d39-4ec4-b6ac-32fbbaa573b4" CreationDate="2011-03-11T06:53:22.130" UserId="5131" Text="Seeing that your already using Java, then I suggest you head over to [JavaGaming][1] and read around. There's a lot of stuff there that would interest you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.java-gaming.org" />
  <row Id="19884" PostHistoryTypeId="2" PostId="9609" RevisionGUID="da032dbe-4015-4a81-a31e-585c5c3ba8fa" CreationDate="2011-03-11T07:27:33.283" UserId="5497" Text="Worked QA at EA Burnaby on 4 and a bit titles, call it 2.5 years. Worked QA at Radical on Scarface: TWIY, let go at end of project so about 1 year. Worked at United Front Games on True Crime: Hong Kong, let go at end of contract so 1 year." />
  <row Id="19885" PostHistoryTypeId="2" PostId="9610" RevisionGUID="413d9498-82c5-40e3-a03d-cff80a3174bd" CreationDate="2011-03-11T07:27:56.387" UserId="3644" Text="You can make it by using simple math.&#xD;&#xA;&#xD;&#xA;    X := originX + sin(angle)*Size;&#xD;&#xA;    Y := originY + cos(angle)*Size;&#xD;&#xA;&#xD;&#xA;Origin is the center of your circle.&#xD;&#xA;Size is the radius of that circle.&#xD;&#xA;Thats it." />
  <row Id="19886" PostHistoryTypeId="25" PostId="9607" RevisionGUID="1be1c049-b827-46af-90f9-f1c7b9395789" CreationDate="2011-03-11T08:23:25.857" Comment="http://twitter.com/#!/StackGameDev/status/46124052875710464" />
  <row Id="19887" PostHistoryTypeId="2" PostId="9611" RevisionGUID="10df1b4d-1a16-4802-be4d-e0456d91945b" CreationDate="2011-03-11T08:28:20.110" UserId="5957" Text="At my company there are quite a few developers who've been here more than 10 years and some for the entire length of the company. Turn over is higher at the end of projects and I think some people have itchier feet than others. Turn over is pretty low here I think - certainly I've been in this job longer than another other I've had (4 1/2 years so far)." />
  <row Id="19888" PostHistoryTypeId="2" PostId="9612" RevisionGUID="6de8d117-a561-4150-aa87-ddd26a446e3a" CreationDate="2011-03-11T08:32:26.307" UserId="1953" Text="I am going to be doing a presentation on game development to an iPhone user group in the near(ish) future. My audience are iPhone developers, but not necessarily very experienced ones, and this is meant to be an introduction.&#xD;&#xA;&#xD;&#xA;My question is, what broad topics are needed to understand game development? I acknowledge that this is fairly subjective, but I really am hoping for a comprehensive list of high-level topics that apply to a broad enough swath of games that anyone interested in the topic SHOULD know about them. I would be ecstatic with some pointers to any resources that attempt to make a list such as this this. (I have looked, but my google-fu is failing me tonight.)&#xD;&#xA;&#xD;&#xA;Here's what I have so far:&#xD;&#xA;&#xD;&#xA; - The Game Loop&#xD;&#xA;   - a sub-note about event driven games&#xD;&#xA; - 2D Animation&#xD;&#xA;   - sprites/texture maps&#xD;&#xA; - 3D Animation&#xD;&#xA;   - importance of frameworks&#xD;&#xA;   - modeling software&#xD;&#xA; - Particles and particle effects&#xD;&#xA; - hit detection&#xD;&#xA; - AI&#xD;&#xA;&#xD;&#xA;Obviously I will not be covering all these topics with any depth, more like simply defining them so that after my talk, the audience will (hopefully) be able to wrap their heads around how any given game might be developed.&#xD;&#xA;&#xD;&#xA;What am I missing?" />
  <row Id="19889" PostHistoryTypeId="1" PostId="9612" RevisionGUID="6de8d117-a561-4150-aa87-ddd26a446e3a" CreationDate="2011-03-11T08:32:26.307" UserId="1953" Text="Broad topics needed for teaching game development" />
  <row Id="19890" PostHistoryTypeId="3" PostId="9612" RevisionGUID="6de8d117-a561-4150-aa87-ddd26a446e3a" CreationDate="2011-03-11T08:32:26.307" UserId="1953" Text="&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="19891" PostHistoryTypeId="2" PostId="9613" RevisionGUID="b0d46cc0-6b5d-4257-967c-1119785a7298" CreationDate="2011-03-11T08:32:55.317" UserId="659" Text="&#xD;&#xA;My experience, in numbers:&#xD;&#xA;&#xD;&#xA; - 10.5 years (starting in summer 2000)  &#xD;&#xA; - 6 studios. 3 redundancies, a 4th looking likely.&#xD;&#xA; - 4 moves, to jobs in new towns/cities&#xD;&#xA; - 8 shipped titles (4 in the first 3 years)&#xD;&#xA; - 3 cancelled console projects&#xD;&#xA; - 8+ platforms (GBA,DS,PC,Xbox,PS2,Wii,360,PS3)&#xD;&#xA; - Team sizes ranging from 6 to over 100&#xD;&#xA;&#xD;&#xA;This is maybe a little worse than average, but not entirely unusual...  The industry has always been unstable, but in the last couple of years it's gone from bad to near-meltdown. Not sure if new hardware is going to save it this time, or just make things worse..." />
  <row Id="19892" PostHistoryTypeId="5" PostId="9596" RevisionGUID="c56452c7-cd73-4fc0-a125-b5a8309d74f1" CreationDate="2011-03-11T08:43:58.217" UserId="20" Comment="expanded on question 2" Text="**About your code:**&#xD;&#xA;I think it's funny that you use anonymous functions for event listeners, it's something I don't see that often in ActionScript (it is more common with JavaScript).&#xD;&#xA;You should be aware that you can run into some garbage-collection issues if you add event listeners like that (because you're no longer able to remove them later on). As long as your event listeners stay up during the whole execution time of your app, it isn't an issue though.&#xD;&#xA;&#xD;&#xA;**Regarding your questions:** &#xD;&#xA;&#xD;&#xA; 1. An update step can take longer to execute than 1/60 of a second, even if you specified the FPS to be 60. It just means it won't go *above* 60, but can easily drop *below* 60 FPS. You can test this yourself by adding some dummy loop in your event listener, something like: `for(var i:int = 0; i &lt; 1000000; i++){ var tmp:Number = 1000.0/20.0; }`. The Flash runtime will use as much time as required for a frame. That means it will try to run at the specified framerate, but it won't enforce it in any way (eg. stopping execution of code). An endless loop (`while(true){}`) will freeze your game on the first frame...&#xD;&#xA; 2. I don't understand what you mean by &quot;limited by time&quot;? Are you asking whether or not to use/assume a fixed or variable timestep?&#xD;&#xA;&#xD;&#xA;**Update** (regarding 2.): To make an object travel some distance in a given time, you could either use a tweening-library like [tweenlite][1] or implement it yourself like this:&#xD;&#xA;&#xD;&#xA;    // initalize this with getTimer() in your constructor or init method&#xD;&#xA;    private var _time:Number;&#xD;&#xA;   &#xD;&#xA;    // how long the sprite should be animated.. here 3.5 seconds&#xD;&#xA;    private var _duration:Number = 3.5;&#xD;&#xA;    &#xD;&#xA;    // event listener. needs to be bound to Event.ENTER_FRAME using addEventListener&#xD;&#xA;    private function handleEnterFrame(evt:Event):void {&#xD;&#xA;        var t:Number = getTimer();&#xD;&#xA;        var elapsed:Number = (t - _time) * 0.001;&#xD;&#xA;        _time = t;&#xD;&#xA;&#xD;&#xA;        _duration -= elapsed;&#xD;&#xA;        if(_duration &lt;= 0){&#xD;&#xA;             // ensure that elapsed doesn't overshoot the duration &#xD;&#xA;             elapsed += _duration;&#xD;&#xA;&#xD;&#xA;             // remove the event listener.. this will stop executing further updates&#xD;&#xA;             removeEventListener(evt.type, handleEnterFrame);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // the sprite will travel 200 pixels per second (in the x-axis)&#xD;&#xA;        // so 700 pixels in total (200 * 3.5)&#xD;&#xA;        _sprite.x += 200 * elapsed;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.greensock.com/tweenlite/" />
  <row Id="19893" PostHistoryTypeId="5" PostId="9613" RevisionGUID="285bbcbf-ec8a-4444-b544-00b851f45f96" CreationDate="2011-03-11T08:48:49.907" UserId="659" Comment="added 41 characters in body" Text="My experience, in numbers:&#xD;&#xA;&#xD;&#xA; - 10.5 years (starting in summer 2000)  &#xD;&#xA; - 6 studios. 3 redundancies, a 4th looking likely.&#xD;&#xA; - 4 moves, to jobs in new towns/cities&#xD;&#xA; - 8 shipped titles (4 in the first 3 years)&#xD;&#xA; - 3 cancelled console projects&#xD;&#xA; - 8+ platforms (GBA,DS,PC,Xbox,PS2,Wii,360,PS3)&#xD;&#xA; - Team sizes ranging from 6 to over 100&#xD;&#xA; - 1 case of severe burnout/depression...&#xD;&#xA;&#xD;&#xA;This is maybe a little worse than average, but not entirely unusual...  The industry has always been unstable, but in the last couple of years it's gone from bad to near-meltdown. Not sure if new hardware is going to save it this time, or just make things worse..." />
  <row Id="19894" PostHistoryTypeId="2" PostId="9614" RevisionGUID="c7ac721d-58ba-4156-9601-0787b31a0b8a" CreationDate="2011-03-11T09:02:04.903" UserId="659" Text="As a former WoW player, my experience was that the login server was always the weakest link in the chain.&#xD;&#xA;&#xD;&#xA;The world servers were usually impressively stable, even handling exceptional load (e.g. new expansion pack releases) quite well.&#xD;&#xA;&#xD;&#xA;But the login server(s) just never seemed to cope so well, and would frequently be down whilst the world servers were fine. (meaning that if you lose connection in a raid/dungeon, you can't get back in, but the other players are waiting for you!)&#xD;&#xA;&#xD;&#xA;And now that the WoW login system is merged into Battle.Net, Starcraft 2 can become unavailable when WoW is under heavy load (as happened for a couple of hours when Cataclysm launched)&#xD;&#xA;&#xD;&#xA;So if you're building a game that will have very large numbers of users, scalability and performance of the login system is very important, too.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19895" PostHistoryTypeId="6" PostId="9573" RevisionGUID="e4f65458-1a82-494e-8176-5001430eed88" CreationDate="2011-03-11T09:42:31.437" UserId="962" Comment="edited tags; edited body" Text="&lt;xna&gt;&lt;xbox&gt;&lt;kinect&gt;" />
  <row Id="19896" PostHistoryTypeId="5" PostId="9573" RevisionGUID="e4f65458-1a82-494e-8176-5001430eed88" CreationDate="2011-03-11T09:42:31.437" UserId="962" Comment="edited tags; edited body" Text="I've been reading up some hacks on Kinect development to work around the fact that there is no official SDK from Microsoft. Even if we do manage to create a game, can we distribute it through the XBox marketplace? Or will it cause any issues?" />
  <row Id="19897" PostHistoryTypeId="2" PostId="9615" RevisionGUID="ceb8e3aa-ae86-4195-9cc8-6b3f2f4c3030" CreationDate="2011-03-11T09:48:11.337" UserId="962" Text="Any wired Xbox 360 will work when plugged in to a computers USB slot. Windows XP SP 3, Vista, and 7 will automatically install the drivers for you.&#xD;&#xA;&#xD;&#xA;There are some wired controllers that specifically say &quot;For PC&quot; on them, but other than the packaging they are identically.&#xD;&#xA;&#xD;&#xA;It is a standard USB device, and you will not hurt the controller, or a computer you plug it into." />
  <row Id="19898" PostHistoryTypeId="2" PostId="9616" RevisionGUID="84de1469-f60f-47bd-a3f4-5b3f6647f7ee" CreationDate="2011-03-11T10:49:02.993" UserId="5862" Text="There's another trick, where you use the sin(x+a) and cos(x+a) formulas, and that allows you to compute sin(a) and cos(a) -- a being the angle by which you want to move from your current position -- only once and do simply multiplication and additions at each step.&#xD;&#xA;&#xD;&#xA;sin(x+a) = sin(x)*cos(a) + cos(x)*sin(a), iirc.&#xD;&#xA;&#xD;&#xA;Of course, that assumes constant angular velocity." />
  <row Id="19899" PostHistoryTypeId="2" PostId="9617" RevisionGUID="3e4de06d-f74a-4516-b281-fed1d8171112" CreationDate="2011-03-11T10:58:22.487" UserId="3794" Text="I understand, that you are asking for **artistic way**. Every game engine has few types of lights, at least &quot;point light&quot;, &quot;spot light&quot; and &quot;directional light&quot; (and propably ambient light). Those (without area light) can be simulated in realtime in dynamic scene and are typical lights in 3D modelers/renderers (such as Maya, Max or Blender). &#xD;&#xA;&#xD;&#xA;**Lighting for a game is no different for lighting for a CGI movie** (maybe with fewer lights). It is typical that lighting in a scene is done by people who studied movie lightening (mean real movies with human beings).&#xD;&#xA;&#xD;&#xA;There is one book which is something like a bible for 3D artist lighters:&#xD;&#xA;&#xD;&#xA; - **[Digital Lighting &amp; Rendering][1]** - It is worth reading if you are interested in this topic. Doesn't&#xD;&#xA;   matter if your scene is dynamic or&#xD;&#xA;   lighting is baked into textures&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.3drender.com/light/index.html" />
  <row Id="19901" PostHistoryTypeId="2" PostId="9619" RevisionGUID="bfd04d28-c151-4c99-b766-65876e0fcdd1" CreationDate="2011-03-11T11:12:22.063" UserId="1742" Text="It really depends on your target audience and what you want them to learn or take-away from the presentation, but I'd consider these:&#xD;&#xA;&#xD;&#xA; - Asset pipeline&#xD;&#xA;   - command line tools vs plugins&#xD;&#xA; - Audio&#xD;&#xA; - Profiles / saves&#xD;&#xA;   - autosave vs slots&#xD;&#xA; - Physics&#xD;&#xA; - Network play&#xD;&#xA;   - online play&#xD;&#xA;   - leaderboards&#xD;&#xA; - Source control&#xD;&#xA;   - importance of being able to roll back&#xD;&#xA; - Input&#xD;&#xA;   - polled vs event&#xD;&#xA;   - handling available input methods between devices&#xD;&#xA; - Degradation vs denial&#xD;&#xA;   - handling graphical differences between devices&#xD;&#xA; - Testing&#xD;&#xA;&#xD;&#xA;Possibly also:&#xD;&#xA;&#xD;&#xA; - Legal issues (music / name clashes)&#xD;&#xA; - When to make the choice to not support a device&#xD;&#xA;" />
  <row Id="19904" PostHistoryTypeId="25" PostId="9612" RevisionGUID="df409d15-29ad-4dc0-bbac-0214315b6335" CreationDate="2011-03-11T11:23:25.660" Comment="http://twitter.com/#!/StackGameDev/status/46169350436167680" />
  <row Id="19906" PostHistoryTypeId="2" PostId="9623" RevisionGUID="bf35206a-0cb4-4bf7-8e62-f8538cfe5e3d" CreationDate="2011-03-11T11:33:19.567" UserId="4538" Text="basically I have a game client that has communicate with a server for almost every action it takes, the game is in Java (using LWJGL) and right now I will start making the server.&#xD;&#xA;&#xD;&#xA;The base of the game is normally one client communicating with the server alone, but I will require later on for several clients to work together for some functionalities.&#xD;&#xA;&#xD;&#xA;I've already read how authentication server should be sepparated and I intend on doing it.&#xD;&#xA;The problem is I am completely inexperienced in this kind of server-side programming, all I've ever programmed were JSF web applications.&#xD;&#xA;&#xD;&#xA;I imagine I'll do socket connections for pretty much every game communication since HTML is very slow, but I still don't really know where to start on my server.&#xD;&#xA;&#xD;&#xA;I would appreciate reading material or guidelines on where to start, what architecture should the game server have and maybe some suggestions on frameworks that could help me getting the client-server communication.&#xD;&#xA;&#xD;&#xA;I've looked into [JNAG][1] but I have no experience with this kind of thing, so I can't really tell if it is a solid and good messaging layer.&#xD;&#xA;&#xD;&#xA;Any help is appreciated...&#xD;&#xA;Thanks !&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://kenai.com/projects/jnag/pages/OverviewOfJnag" />
  <row Id="19907" PostHistoryTypeId="1" PostId="9623" RevisionGUID="bf35206a-0cb4-4bf7-8e62-f8538cfe5e3d" CreationDate="2011-03-11T11:33:19.567" UserId="4538" Text="Server-side Architecture for Online Game" />
  <row Id="19908" PostHistoryTypeId="3" PostId="9623" RevisionGUID="bf35206a-0cb4-4bf7-8e62-f8538cfe5e3d" CreationDate="2011-03-11T11:33:19.567" UserId="4538" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;java&gt;&lt;client-server&gt;" />
  <row Id="19909" PostHistoryTypeId="5" PostId="9617" RevisionGUID="5df25673-f85f-4ab4-b397-eefa7e1aaed4" CreationDate="2011-03-11T11:41:39.320" UserId="3794" Comment="cleaning" Text="I understand, that you are asking for **artistic way**. Every game engine has few types of lights, at least &quot;point light&quot;, &quot;spot light&quot; and &quot;directional light&quot; (and propably ambient light). Those (without area light) can be simulated in realtime in dynamic scene and are typical lights in 3D modelers/renderers (such as Maya, Max or Blender). &#xD;&#xA;&#xD;&#xA;**Lighting for a game is no different for lighting for a CGI movie** (maybe with fewer lights). It is typical that lighting in a scene is done by people who studied movie lightening (mean real movies with human beings).&#xD;&#xA;&#xD;&#xA;There is one book which is something like a bible for 3D artist lighters:&#xD;&#xA;&#xD;&#xA; - **[Digital Lighting &amp; Rendering][1]** - It is worth reading if you are interested in this topic. Doesn't&#xD;&#xA;   matter if your scene is dynamic or&#xD;&#xA;   lighting is baked into textures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.3drender.com/light/index.html" />
  <row Id="19916" PostHistoryTypeId="4" PostId="3922" RevisionGUID="6315644a-9067-40db-88f2-39d58a338f70" CreationDate="2011-03-11T13:36:58.317" UserId="4462" Comment="w/out -&gt; without" Text="How do you test xbox (via PC) input without an xbox on XNA Game Studio?" />
  <row Id="19917" PostHistoryTypeId="24" PostId="3922" RevisionGUID="6315644a-9067-40db-88f2-39d58a338f70" CreationDate="2011-03-11T13:36:58.317" Comment="Proposed by 4462 approved by 189 edit id of 77" />
  <row Id="19918" PostHistoryTypeId="5" PostId="9605" RevisionGUID="f8c9f36e-a0c7-48af-b035-1adf35937af0" CreationDate="2011-03-11T13:37:59.393" UserId="450" Comment="added related  topics, linking to serverfault for high availability as there is no information on gamedev, yet" Text="A scalable system requires little hardware resources, if there are only a few users. But if the game gets popular, it will be easily adapted to run on huge server farms.&#xD;&#xA;&#xD;&#xA;This requires that the game is coded in a way which allows for load balancing. A common approach is to identify services such as (chat, friends list, authentication, world, map) that can be split onto different servers.&#xD;&#xA;&#xD;&#xA;More sophisticated approaches allow for [seamless load balancing within one type of service][1] such as a continuous world.&#xD;&#xA;&#xD;&#xA;FAQs&#xD;&#xA;-&#xD;&#xA;- [Scalability on GameDevelopment][2]&#xD;&#xA;- [Scalability on StackOverflow][3] for general software development&#xD;&#xA;- [Scalability on ServerFault][4] for hardware and operation&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Related topics&#xD;&#xA;- &#xD;&#xA;If a system is scaled up, it will get more likely that things break, both at the software and hardware level. Therefore fault isolation and high availability ([serverfault][5]) are important topics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5956/how-is-load-balancing-achieved-in-mmos/5967#5967&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/tags/scalability/faq&#xD;&#xA;  [3]: http://stackoverflow.com/tags/scalability/faq&#xD;&#xA;  [4]: http://serverfault.com/tags/scalability/faq&#xD;&#xA;  [5]: http://serverfault.com/questions/tagged/high-availability" />
  <row Id="19919" PostHistoryTypeId="24" PostId="9605" RevisionGUID="f8c9f36e-a0c7-48af-b035-1adf35937af0" CreationDate="2011-03-11T13:37:59.393" Comment="Proposed by 450 approved by 189 edit id of 75" />
  <row Id="19920" PostHistoryTypeId="5" PostId="9606" RevisionGUID="3b6c5a2b-0f9a-409b-b055-181659ab16ca" CreationDate="2011-03-11T13:40:07.627" UserId="450" Comment="added related  topics, linking to serverfault for high availability as there is no information on gamedev, yet" Text="A scalable system adepts to a crowing demand for example by a growing number of users." />
  <row Id="19921" PostHistoryTypeId="24" PostId="9606" RevisionGUID="3b6c5a2b-0f9a-409b-b055-181659ab16ca" CreationDate="2011-03-11T13:40:07.627" Comment="Proposed by 450 approved by -1 edit id of 76" />
  <row Id="19922" PostHistoryTypeId="5" PostId="9606" RevisionGUID="ab27a039-6fff-40ba-a1bc-70031a3b7bee" CreationDate="2011-03-11T13:40:07.830" UserId="189" Comment="added 170 characters in body" Text="Scalability is the ability of a system, network, or process, to handle growing amounts of work in a graceful manner, or its ability to be enlarged to accommodate that growth. A scalable system can adopt to a growing demand (e.g. a growing number of users)." />
  <row Id="19927" PostHistoryTypeId="5" PostId="9492" RevisionGUID="361a2c85-6ded-430b-9c7e-44cbb918ce85" CreationDate="2011-03-11T13:45:05.360" UserId="3794" Comment="typo" Text="Cloud rendering is hard task. But those clouds in video are just couple of &quot;cloudy&quot; particles. I don't think that that is something nice :)&#xD;&#xA;&#xD;&#xA;For nice clouds problem is not the cloud simulation, but the cloud rendering, which is impossible to handle to be photo realistic in realtime for scene with dynamic lighting. What happens in participating media like cloud is: &#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Light emission exist only when participating media emits light (like hot gas or fire) or when they are lighted (this is simalar part to normal rendering), absorption mean that light is absorbed and scattering is the biggest computational problem. Light is scattered inside the volume. Then you want to have self shadowing and shadow emmiting to the ground and opaque scene. How to do it? &#xD;&#xA;&#xD;&#xA;**Where to obtain cloud?**&#xD;&#xA;Clouds can be simulated by perlin noise. It is very common and looks nice. Perlin noise can be 4D, where 4th dimension is time to create nice dynamic clouds. If you want to specify cloud shapes: you have to do volumetrization over the desired shapes, save it as density 3D grid and multiply it with perlin.&#xD;&#xA;&#xD;&#xA;How to render it&#xD;&#xA;----------------&#xD;&#xA;**By rendering particles?**. Particle clouds are possible. It is most simple method. However, simulation of any light propagation between particles is pretty hard. It is very typical that you have to sort particles in the view direction of camera ( or in so called half-axis between camera-dir and light-dir).  This **is impossible in realtime application** unless your target platform doesn't support shader model 4 or better shader model 5 - and gpgpu computing (like cuda, openCl or direct compute) - so you could write Parallel radix sort and sort particles every frame (that will be realtime). Sorting is needed for alpha blending and also for smart shadow mapping. &#xD;&#xA;&#xD;&#xA;I'll guide you to some articles:&#xD;&#xA;&#xD;&#xA; - [smoke particles with cuda][2] - approxiation, but effective&#xD;&#xA; - [realtime rendering (with light scattering)but for static clouds][3]&#xD;&#xA; - [cloud animations][4]&#xD;&#xA;&#xD;&#xA;**By volumetric raycasting**. Volumetric raycasting means, that you have grid where you did fluid simulation (typicaly Navier-Strokes, but voxelized cloud shape is ok too). And shoot ray for every pixel through volume and integrate radiance across the ray. **This is suprisingly OK for realtime applications**. [Raycasting on wiki][5]. You don't have to have gpgpu computing. Volumetric raycasting can be done on pixel shader, because it doesn't need any synchronization between threads (rays). Having grid in 3D texture is perfect on graphics hardware, because you can benefit from native tri-linear interpolation of the texture unit. Self shadowing can be done by shooting ray from every sample to light and counting the density of light shadowing volume. This is slow. You could use some shadow mapping with transitions (like deep shadow maps). The light scattering is also not possible in realtime (with gpgpu it is).&#xD;&#xA;&#xD;&#xA;Volumetric raycasting is fast and it is easier to implement than particle sorting and work fast even on older HW.&#xD;&#xA;&#xD;&#xA;Something to study:&#xD;&#xA;&#xD;&#xA; - [Real-time volume graphics][6] - Best book about this topic. It is not completely online - you will have to buy it if you want to read it full. It has chapter especialy for game developers. &#xD;&#xA; - [Gpu-based Real-time Solid Voxelization for Volume Graphics][7] - Also great book on the topic&#xD;&#xA; - [Deep opacity maps][8] - Good for self shadowing of the clouds&#xD;&#xA; - [Fourier opacity maps][9] - Propably best method for self shadowing of multiple clouds.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RZSsT.jpg&#xD;&#xA;  [2]: http://developer.download.nvidia.com/compute/cuda/sdk/website/samples.html#smokeParticles&#xD;&#xA;  [3]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.97.2437&amp;rep=rep1&amp;type=pdf&#xD;&#xA;  [4]: http://www.ugrad.cs.ubc.ca/~cs535/presentations/clouds_slides.pdf&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Volume_ray_casting&#xD;&#xA;  [6]: http://books.google.com/books?id=lDWOu3_KGvoC&amp;printsec=frontcover&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=WRF2TYPlNZDFswa92JyJBQ&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCoQ6AEwAA#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [7]: http://books.google.com/books?id=ADOuPwAACAAJ&amp;dq=realtime+volume+graphics&amp;hl=cs&amp;ei=WRF2TYPlNZDFswa92JyJBQ&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=3&amp;ved=0CDYQ6AEwAg&#xD;&#xA;  [8]:  http://www.cs.tamu.edu/academics/tr/tamu-cs-tr-2007-6-1&#xD;&#xA;  [9]: http://www.google.cz/url?sa=t&amp;source=web&amp;cd=2&amp;sqi=2&amp;ved=0CCQQFjAB&amp;url=http%3A%2F%2Fwww.sci.utah.edu%2F~bavoil%2Fresearch%2Fshadows%2FFourierOpacityMapping_I3D2010.pdf&amp;ei=nhJ2TeyDJo3fsga5veiMBQ&amp;usg=AFQjCNE-H-Rty0K5maXaaau4YGBC1dZl5A&amp;sig2=p880veulO5Jmg_j9Vxu5ow" />
  <row Id="19929" PostHistoryTypeId="2" PostId="9624" RevisionGUID="066ce81d-4047-447c-8e90-ab89bc99d579" CreationDate="2011-03-11T14:11:16.697" UserId="5818" Text="In the process of preparing my game for networking I'm adding a layer of seperation between the physical input (mouse/keyboard) and the actual game &quot;engine&quot;/logic. All input that has any relation to the game logic is wrapped inside action objects such as `BuildBuildingAction`.&#xD;&#xA;&#xD;&#xA;I was thinking of having an action processing layer that would determine what to do with the input. This layer could then be set up to either just pass the actions locally to the game engine or send it via sockets to the network server depending on whether the game was single- or multiplayer.&#xD;&#xA;&#xD;&#xA;In network games it would make sense that the player's actions should be sent to the server, but should the game logic be pulling (polling?) the data through some sort of interface or should the action processing layer be adding the actions to an input queue in the game logic code?" />
  <row Id="19930" PostHistoryTypeId="1" PostId="9624" RevisionGUID="066ce81d-4047-447c-8e90-ab89bc99d579" CreationDate="2011-03-11T14:11:16.697" UserId="5818" Text="Push or Pull Input Data In the Game Logic?" />
  <row Id="19931" PostHistoryTypeId="3" PostId="9624" RevisionGUID="066ce81d-4047-447c-8e90-ab89bc99d579" CreationDate="2011-03-11T14:11:16.697" UserId="5818" Text="&lt;game-design&gt;&lt;network&gt;&lt;input&gt;" />
  <row Id="19932" PostHistoryTypeId="2" PostId="9625" RevisionGUID="7cdec602-9b8d-4640-ba38-98a82f157a5d" CreationDate="2011-03-11T14:16:37.767" UserId="4410" Text="Thought I'd throw [Real-time Rendering][1] out there as it covers a lot of topics, including quite a lot on different lighting techniques.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Real-time-Rendering-Tomas-Akenine-Moller/dp/1568814240/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1299852772&amp;sr=8-1" />
  <row Id="19933" PostHistoryTypeId="25" PostId="9624" RevisionGUID="41cfc52c-ea4f-4e3b-bfdd-0685a6fa4274" CreationDate="2011-03-11T14:23:25.783" Comment="http://twitter.com/#!/StackGameDev/status/46214649611431936" />
  <row Id="19934" PostHistoryTypeId="2" PostId="9626" RevisionGUID="feace5eb-98f2-4ac4-9c13-f0cd357c182b" CreationDate="2011-03-11T14:29:33.250" UserId="6032" Text="Phones using 3G networks typically (not always, but mostly) operate behind very restrictive NATs. UDP packets from the same source socket to two different destinations will typically appear from the device using two different IP addresses. This makes it very difficult to create peer to peer connections.&#xD;&#xA;&#xD;&#xA;Network conditions such as latency and packet loss are more common than home ADSL or cable connections. However if the user has a very good signal then bandwidth can be higher than ADSL or cable.&#xD;&#xA;&#xD;&#xA;You can usually use TCP and UDP. However if you're using UDP then I would recommend using a library that can cope with poor UDP performance. I've used ReplicaNet with great success on networks with poor network performance. The reliable UDP connections it uses seems to be very stable and recovers from packet loss well.&#xD;&#xA;" />
  <row Id="19935" PostHistoryTypeId="5" PostId="9603" RevisionGUID="341924b1-ef92-4379-992f-c4a932048d20" CreationDate="2011-03-11T14:32:56.147" UserId="1101" Comment="Changed 'square' to 'quad'" Text="If we assume that getting 4 points to be co-planar is not a problem (it is, as the others have pointed out, but bear with me) then you find that rendering an arbitrary trapezium (which is what a quadrilateral will usually look like when transformed into screen space) is not particularly different from rendering a triangle - in fact, it pretty much works out the same once you perform clipping as that can introduce extra vertices. (At least in a software model - hardware may well have a simpler brute force way of doing the clipping.)&#xD;&#xA;&#xD;&#xA;The remaining issue therefore is one of representational efficiency. - you can easily represent a quad with 2 triangles, and without any extra vertices if you use a triangle strip (3 verts for the 1st triangle, then an extra vert for the 2nd triangle). On the other hand, if you try and represent a triangle with a quad, you need to use 4 vertices and have a degenerate one that is identical to another. This is not ideal in terms of efficiency." />
  <row Id="19936" PostHistoryTypeId="2" PostId="9627" RevisionGUID="afd89601-eb99-44e1-99e5-2b1da0767d54" CreationDate="2011-03-11T14:36:11.547" UserId="6033" Text="I think you couple the wrong components when you do this.&#xD;&#xA;What you should do is implement a custom CCAnimate where you not only update the animation frame of your sprite but also the &quot;animation frame&quot; of your physics box. Otherwise you are coupling drawing and physics components directly." />
  <row Id="19937" PostHistoryTypeId="2" PostId="9628" RevisionGUID="3af05e1c-38a2-4533-8451-2df13640547d" CreationDate="2011-03-11T14:42:55.497" UserId="6032" Text="What type of game is it? How dynamic are the objects?&#xD;&#xA;&#xD;&#xA;If it is the type of game that waits for each player to post their turns then that kind of network model will do.&#xD;&#xA;&#xD;&#xA;But if the game is realtime players running around then it won't really do because you can't have players waiting around for the server to get all movements before allowing the  movement to be sent back." />
  <row Id="19938" PostHistoryTypeId="2" PostId="9629" RevisionGUID="d9c7d6ef-ba53-4036-aa44-84a0a091ebc1" CreationDate="2011-03-11T14:57:16.313" UserId="20" Text="You probably want to look into sockets-programming. Here's a basic [introduction][1] that will help you getting started.&#xD;&#xA;&#xD;&#xA;Or just perform a Google search for *java sockets* and you'll find plenty of material.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.oracle.com/technetwork/java/socket-140484.html" />
  <row Id="19939" PostHistoryTypeId="16" PostId="9619" RevisionGUID="c721d151-220a-4e2c-a9e7-67bdf93b94fc" CreationDate="2011-03-11T16:03:08.920" UserId="14" />
  <row Id="19940" PostHistoryTypeId="16" PostId="9612" RevisionGUID="329a6f35-aaef-4b98-936d-5a7c799ffaf9" CreationDate="2011-03-11T16:03:08.920" UserId="14" />
  <row Id="19941" PostHistoryTypeId="16" PostId="9601" RevisionGUID="d53b6782-08f1-492c-9818-ddb00efd041a" CreationDate="2011-03-11T16:06:12.490" UserId="14" />
  <row Id="19942" PostHistoryTypeId="16" PostId="9617" RevisionGUID="4d55624d-fe04-4b25-a4da-a40d2459ac79" CreationDate="2011-03-11T16:06:12.490" UserId="14" />
  <row Id="19943" PostHistoryTypeId="16" PostId="9625" RevisionGUID="94df56c5-c1d6-488d-856b-590109d154c3" CreationDate="2011-03-11T16:06:12.490" UserId="14" />
  <row Id="19944" PostHistoryTypeId="16" PostId="9584" RevisionGUID="0c5c4226-8230-492b-af99-15f0849cafae" CreationDate="2011-03-11T16:06:12.490" UserId="14" />
  <row Id="19945" PostHistoryTypeId="6" PostId="9623" RevisionGUID="9633aaea-cc23-4e19-b65d-94f75bf55cc2" CreationDate="2011-03-11T16:46:02.097" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;client-server&gt;" />
  <row Id="19946" PostHistoryTypeId="6" PostId="9624" RevisionGUID="94df97f1-f75b-4598-8686-ab2149603408" CreationDate="2011-03-11T16:46:21.020" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;network&gt;&lt;input&gt;" />
  <row Id="19947" PostHistoryTypeId="5" PostId="9336" RevisionGUID="6758347b-efff-4906-bbdf-f71011814818" CreationDate="2011-03-11T16:47:44.133" UserId="4104" Comment="added 190 characters in body" Text="&gt; ***Edit:*** Looks like I was using `GL` from the Java API, and not the OpenGL&#xD;&#xA;&gt; ES API. Incidentally, I'm using&#xD;&#xA;&gt; libgdx, which doesn't appear to&#xD;&#xA;&gt; mention GL_POINT_SPRITE anywhere!&#xD;&#xA;&#xD;&#xA;Here's a few snippets of what I have so far...&#xD;&#xA;&#xD;&#xA;    void create()&#xD;&#xA;    {&#xD;&#xA;        renderer = new ImmediateModeRenderer();&#xD;&#xA;    &#xD;&#xA;        tiles = Gdx.graphics.newTexture(&#xD;&#xA;            Gdx.files.getFileHandle(&quot;res/tiles2.png&quot;, FileType.Internal),&#xD;&#xA;            TextureFilter.MipMap,&#xD;&#xA;            TextureFilter.Linear,&#xD;&#xA;            TextureWrap.ClampToEdge,&#xD;&#xA;            TextureWrap.ClampToEdge);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void render()&#xD;&#xA;    {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;        Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void renderSprite()&#xD;&#xA;    {&#xD;&#xA;        int handle = tiles.getTextureObjectHandle();&#xD;&#xA;        Gdx.gl.glBindTexture(GL.GL_TEXTURE_2D, handle);&#xD;&#xA;        Gdx.gl.glEnable(GL.GL_POINT_SPRITE);&#xD;&#xA;        Gdx.gl11.glTexEnvi(GL.GL_POINT_SPRITE, GL.GL_COORD_REPLACE, GL.GL_TRUE);&#xD;&#xA;    &#xD;&#xA;        renderer.begin(GL.GL_POINTS);&#xD;&#xA;        renderer.vertex(pos.x, pos.y, pos.z);&#xD;&#xA;        renderer.end();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`create()` is called once when the program starts, and `renderSprites()` is called for each sprite (so, `pos` is unique to each sprite) where the sprites are arranged in a sort-of 3D cube. &#xD;&#xA;&#xD;&#xA;Unfortunately though, this just renders a few white dots...&#xD;&#xA;&#xD;&#xA;![Point sprite problem][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZG41S.png&#xD;&#xA;&#xD;&#xA;I suppose that the texture isn't being bound which is why I'm getting white dots. Also, when I draw my sprites on anything other than 0 z-axis, they do not appear -- I read that I need to crease my zfar and znear, but I have no idea how to do this using libgdx (perhaps it's because I'm using ortho projection? What do I use instead?).&#xD;&#xA;&#xD;&#xA;I know that the texture is usable, since I was able to render it using a SpriteBatch, but  I guess I'm not using it properly with OpenGL." />
  <row Id="19948" PostHistoryTypeId="25" PostId="9623" RevisionGUID="72f22bde-af60-4d25-95ea-250ea75c14ef" CreationDate="2011-03-11T17:23:25.873" Comment="http://twitter.com/#!/StackGameDev/status/46259948342083584" />
  <row Id="19949" PostHistoryTypeId="2" PostId="9630" RevisionGUID="e2ad3907-6318-41e6-9351-d08a52d17988" CreationDate="2011-03-11T17:26:11.150" UserId="5797" Text="From my experience in development, there is no right or wrong way to do things, unless there is an accepted practice in the group you work with. I have met with opposition from developers who are averse to separating out behaviors, skins etc. And I am sure they will say the same about my reservation to writing a class that includes everything under the sun. &#xD;&#xA;Remember you have to not only write it, but be able to read your code tomorrow and at a future date, debug it and possibly build on it in the next iteration. You should choose a path that works for you (and team). Picking a route that others use (and is counter-intuitive to you) will slow you down." />
  <row Id="19950" PostHistoryTypeId="5" PostId="6005" RevisionGUID="ba592df4-d531-431a-af64-5f5a4c884cbc" CreationDate="2011-03-11T17:30:23.313" UserId="1528" Comment="fixed typo" Text="So, I've read a lot *about* using FSMs to do game state management, things like what an FSM is, and using a stack or set of states for building one. I've gone through all that. But I'm stuck at writing an actual, *well-designed* implementation of an FSM for that purpose. Specifically, how does one cleanly resolve the problem of transitioning between states, (how) should a state be able to use data from other states, and so on. Does anyone have any tips on designing and writing a implementation in C++, or better yet, code examples?" />
  <row Id="19951" PostHistoryTypeId="6" PostId="6005" RevisionGUID="ba592df4-d531-431a-af64-5f5a4c884cbc" CreationDate="2011-03-11T17:30:23.313" UserId="1528" Comment="fixed typo" Text="&lt;c++&gt;&lt;architecture&gt;&lt;programming&gt;&lt;gameloop&gt;&lt;state&gt;" />
  <row Id="19952" PostHistoryTypeId="2" PostId="9631" RevisionGUID="72aa7ad8-99a1-4400-8734-a21303c42f97" CreationDate="2011-03-11T17:31:03.283" UserId="6021" Text="Assuming that your 'action processing layer' spits out data like 'move-right' or 'turn-around', I don't think that it makes any difference whether you push to a queue and read that queue or let the game poll the action processing layer repeatedly. All that happens both on client- and server-side - of course, so I don't see where the network comes in. In both cases fresh actions need to be transmitted to the server asap.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19953" PostHistoryTypeId="5" PostId="9631" RevisionGUID="679b80d6-25e6-436c-b4bd-574f9efab090" CreationDate="2011-03-11T17:37:10.813" UserId="6021" Comment="added 74 characters in body" Text="Assuming that your 'action processing layer' spits out data like 'move-right' or 'turn-around', I don't think that it makes any difference whether you push to a queue and read that queue or let the game poll the action processing layer repeatedly. All that happens both on client- and server-side since, of course, both sides need to keep track of user actions. &#xD;&#xA;&#xD;&#xA;So I don't see why this would be a network related question. In both cases fresh actions need to be transmitted to the server asap.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19954" PostHistoryTypeId="2" PostId="9632" RevisionGUID="919e7555-a154-44b1-b18f-2d857aa9f6b7" CreationDate="2011-03-11T17:47:33.287" UserId="5797" Text="As I understand the referenced series of articles on Entity Systems, your &quot;item&quot; is loaded with components. And a Component is a list of references. &#xD;&#xA;Following through with your example: AttackComponent will include references to how the &quot;item&quot; attacks; the AttackTargetComponent will include references to mechanisms to get list of targets; and so on.&#xD;&#xA;Therefore when your &quot;item&quot; attacks a target or targets - it is uses the AttackComponent and the AttackTargetComponent or triggers an external method based on the item (and its components)&#xD;&#xA;Thanks for sharing these articles. " />
  <row Id="19955" PostHistoryTypeId="2" PostId="9633" RevisionGUID="69144dea-2d01-44d5-a799-5f4ebb30d64c" CreationDate="2011-03-11T18:08:37.417" UserId="5797" Text="The question you need to ask yourself is: Is the duration of this motion related to the frame rate of the final swf? &#xD;&#xA;In the past the only to create motion was through the timeline or enterFrame making the framerate extremely crucial. Today you can create motion independent of the framerate. You will be surprised that most swfs today are set to a standard rate that works for video or audio imports on the timeline (30 fps). &#xD;&#xA;I would recommend you explore: fl.transitions.Tween. " />
  <row Id="19956" PostHistoryTypeId="5" PostId="9623" RevisionGUID="7e9609eb-a751-4fa4-8474-e9c008bd11c8" CreationDate="2011-03-11T18:33:55.250" UserId="4538" Comment="added 782 characters in body" Text="basically I have a game client that has communicate with a server for almost every action it takes, the game is in Java (using LWJGL) and right now I will start making the server.&#xD;&#xA;&#xD;&#xA;The base of the game is normally one client communicating with the server alone, but I will require later on for several clients to work together for some functionalities.&#xD;&#xA;&#xD;&#xA;I've already read how authentication server should be sepparated and I intend on doing it.&#xD;&#xA;The problem is I am completely inexperienced in this kind of server-side programming, all I've ever programmed were JSF web applications.&#xD;&#xA;&#xD;&#xA;I imagine I'll do socket connections for pretty much every game communication since HTML is very slow, but I still don't really know where to start on my server.&#xD;&#xA;&#xD;&#xA;I would appreciate reading material or guidelines on where to start, what architecture should the game server have and maybe some suggestions on frameworks that could help me getting the client-server communication.&#xD;&#xA;&#xD;&#xA;I've looked into [JNAG][1] but I have no experience with this kind of thing, so I can't really tell if it is a solid and good messaging layer.&#xD;&#xA;&#xD;&#xA;Any help is appreciated...&#xD;&#xA;Thanks !&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Just a little more information about the game. It is intended to be a very complex game with several functionalities, making some functionalities a &quot;program&quot; inside the program.&#xD;&#xA;It is not an usual game, like FPS or RPG but I intend on having a lot of users using these many different &quot;programs&quot; inside the game.&#xD;&#xA;&#xD;&#xA;If I wasn't clear enough, I'd really appreciate people that have already developed games with java client/server architecture, how they communicated, any frameworks, apis, messaging systems, etc.&#xD;&#xA;&#xD;&#xA;It is not a question of lack of knowledge of language, more a question for advice, so I don't end up creating something that works, but in the later stages will have to be rewriten for any kind of limiting reason.&#xD;&#xA;PS: sorry if my english is not perfect...&#xD;&#xA;&#xD;&#xA;  [1]: http://kenai.com/projects/jnag/pages/OverviewOfJnag" />
  <row Id="19962" PostHistoryTypeId="2" PostId="9635" RevisionGUID="19f06e34-27d1-4054-84aa-9eccc5c0ec9c" CreationDate="2011-03-11T19:24:28.257" UserId="2111" Text="I'm a making a &quot;Defend Your Castle&quot; type game, where each player has a castle and must send units to destroy the opponent's castle. It looks like this (and yeah, this is the actual game, not a quick paint drawing..):&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m65qp.png&#xD;&#xA;&#xD;&#xA;Now, I'm trying to implement the AI of the opponent, and I'd like to create 4 different AI levels: Easy, Normal, Hard and Hardcore. I've never made any &quot;serious&quot; AI before and I'd like to create a quite complete one this time.&#xD;&#xA;&#xD;&#xA;My idea is to calculate a player's &quot;power&quot; score, based on the current health of its castle and the individual &quot;power&quot; score of its units. Then, the AI would just try to keep a score close to the player's one(*Easy* would stay below it, *Normal* would stay near it and *Hard* would try to get above it). But I just don't know how to calculate a player's power score. There are just too many variables to take into account and I don't know how to properly use them to create one significant number(the power level).&#xD;&#xA;&#xD;&#xA;Could anyone help me out on this one? &#xD;&#xA;&#xD;&#xA;Here are the variables that should influence a player's power score:&#xD;&#xA;&#xD;&#xA;*Current castle health, the unit's total health, damage, speed and attack range.*&#xD;&#xA;Also, the player can have increased Income(the money bag), damage(the + Damage) and speed(the + speed)... How could I include them in the score?&#xD;&#xA;&#xD;&#xA;I'm really stuck here... Or is there an other way that I could implement AI for this type of game?&#xD;&#xA;&#xD;&#xA;Thanks for your precious time." />
  <row Id="19963" PostHistoryTypeId="1" PostId="9635" RevisionGUID="19f06e34-27d1-4054-84aa-9eccc5c0ec9c" CreationDate="2011-03-11T19:24:28.257" UserId="2111" Text="Calculating the &quot;power&quot; of a player in a &quot;Defend Your Castle&quot; type game" />
  <row Id="19964" PostHistoryTypeId="3" PostId="9635" RevisionGUID="19f06e34-27d1-4054-84aa-9eccc5c0ec9c" CreationDate="2011-03-11T19:24:28.257" UserId="2111" Text="&lt;game-design&gt;&lt;ai&gt;" />
  <row Id="19965" PostHistoryTypeId="2" PostId="9636" RevisionGUID="040a40d1-2824-4161-b411-e8d22edf9aa1" CreationDate="2011-03-11T19:39:51.237" UserId="2532" Text="I'm not positive how easy this would be to tell, but trying to find out how important each variable is is probably the place to start (if you gain 50 health, you can last 10 seconds longer; if you gain 5 damage, you can destroy 50 health 10 seconds faster; etc...). After that, trying to normalize the abilities might be worthwhile (50 health is the same as 10 speed is the same as 100 income).&#xD;&#xA;&#xD;&#xA;I imagine an easy way to find some of this is by just running simulations. Keep one player at a single level, and then start adjusting individual variables to how they scale." />
  <row Id="19966" PostHistoryTypeId="2" PostId="9637" RevisionGUID="37044338-e623-4308-aa0a-6748dfb33f25" CreationDate="2011-03-11T20:05:42.590" UserId="4104" Text="Figured out the answer, here's how you render textured point sprites, using alpha test and depth test:&#xD;&#xA;&#xD;&#xA;    create()&#xD;&#xA;    {&#xD;&#xA;        renderer = new ImmediateModeRenderer();&#xD;&#xA;    &#xD;&#xA;        tiles = Gdx.graphics.newTexture(&#xD;&#xA;            Gdx.files.internal(&quot;data/tiles2.png&quot;),&#xD;&#xA;            TextureFilter.MipMap,&#xD;&#xA;            TextureFilter.Linear,&#xD;&#xA;            TextureWrap.ClampToEdge,&#xD;&#xA;            TextureWrap.ClampToEdge);&#xD;&#xA;    &#xD;&#xA;        Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1);&#xD;&#xA;&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_TEXTURE_2D);&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_DEPTH_TEST);&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_ALPHA_TEST);&#xD;&#xA;        Gdx.gl.glEnable(GL11.GL_POINT_SPRITE_OES);&#xD;&#xA;&#xD;&#xA;        Gdx.gl10.glAlphaFunc(GL10.GL_GREATER, 0);&#xD;&#xA;&#xD;&#xA;        Gdx.gl11.glTexEnvi(&#xD;&#xA;            GL11.GL_POINT_SPRITE_OES, &#xD;&#xA;            GL11.GL_COORD_REPLACE_OES,&#xD;&#xA;            GL11.GL_TRUE);&#xD;&#xA;        &#xD;&#xA;        Gdx.gl10.glPointSize(s);&#xD;&#xA;        &#xD;&#xA;        tiles.bind();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    render() {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);&#xD;&#xA;    &#xD;&#xA;        renderer.begin(GL10.GL_POINTS);&#xD;&#xA;&#xD;&#xA;        // render 3 point sprites at various 3d points&#xD;&#xA;        renderer.vertex(-.1f, 0, -.1f);&#xD;&#xA;        renderer.vertex(0, 0, 0);&#xD;&#xA;        renderer.vertex(.1f, 0, .1f);&#xD;&#xA;&#xD;&#xA;        // ... more vertices here if needed (one for each sprite) ...&#xD;&#xA;&#xD;&#xA;        renderer.end();&#xD;&#xA;    }" />
  <row Id="19967" PostHistoryTypeId="5" PostId="9637" RevisionGUID="956b2516-f2a7-4f70-9fbb-834aa6202c6f" CreationDate="2011-03-11T20:10:54.410" UserId="4104" Comment="added 32 characters in body" Text="Figured out the answer, here's how you render textured point sprites, using alpha test and depth test:&#xD;&#xA;&#xD;&#xA;    create()&#xD;&#xA;    {&#xD;&#xA;        renderer = new ImmediateModeRenderer();&#xD;&#xA;    &#xD;&#xA;        tiles = Gdx.graphics.newTexture(&#xD;&#xA;            Gdx.files.internal(&quot;data/tiles2.png&quot;),&#xD;&#xA;            TextureFilter.MipMap,&#xD;&#xA;            TextureFilter.Linear,&#xD;&#xA;            TextureWrap.ClampToEdge,&#xD;&#xA;            TextureWrap.ClampToEdge);&#xD;&#xA;    &#xD;&#xA;        Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1);&#xD;&#xA;&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_TEXTURE_2D);&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_DEPTH_TEST);&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_ALPHA_TEST);&#xD;&#xA;        Gdx.gl.glEnable(GL11.GL_POINT_SPRITE_OES);&#xD;&#xA;&#xD;&#xA;        Gdx.gl10.glAlphaFunc(GL10.GL_GREATER, 0);&#xD;&#xA;&#xD;&#xA;        Gdx.gl11.glTexEnvi(&#xD;&#xA;            GL11.GL_POINT_SPRITE_OES, &#xD;&#xA;            GL11.GL_COORD_REPLACE_OES,&#xD;&#xA;            GL11.GL_TRUE);&#xD;&#xA;        &#xD;&#xA;        Gdx.gl10.glPointSize(s);&#xD;&#xA;        &#xD;&#xA;        tiles.bind();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    render()&#xD;&#xA;    {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;    &#xD;&#xA;        renderer.begin(GL10.GL_POINTS);&#xD;&#xA;&#xD;&#xA;        // render 3 point sprites at various 3d points&#xD;&#xA;        renderer.vertex(-.1f, 0, -.1f);&#xD;&#xA;        renderer.vertex(0, 0, 0);&#xD;&#xA;        renderer.vertex(.1f, 0, .1f);&#xD;&#xA;&#xD;&#xA;        // ... more vertices here if needed (one for each sprite) ...&#xD;&#xA;&#xD;&#xA;        renderer.end();&#xD;&#xA;    }" />
  <row Id="19968" PostHistoryTypeId="5" PostId="9336" RevisionGUID="25d214a4-b83f-4899-9519-24faa90c9a2f" CreationDate="2011-03-11T20:14:31.443" UserId="4104" Comment="deleted 28 characters in body; edited title" Text="&gt; **Edit:** I'm using the `GL` enum, which is incorrect since it's not part of OpenGL ES (see my answer). I should have used `GL10`, `GL11` or `GL20` instead.&#xD;&#xA;&#xD;&#xA;Here's a few snippets of what I have so far...&#xD;&#xA;&#xD;&#xA;    void create()&#xD;&#xA;    {&#xD;&#xA;        renderer = new ImmediateModeRenderer();&#xD;&#xA;    &#xD;&#xA;        tiles = Gdx.graphics.newTexture(&#xD;&#xA;            Gdx.files.getFileHandle(&quot;res/tiles2.png&quot;, FileType.Internal),&#xD;&#xA;            TextureFilter.MipMap,&#xD;&#xA;            TextureFilter.Linear,&#xD;&#xA;            TextureWrap.ClampToEdge,&#xD;&#xA;            TextureWrap.ClampToEdge);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void render()&#xD;&#xA;    {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;        Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void renderSprite()&#xD;&#xA;    {&#xD;&#xA;        int handle = tiles.getTextureObjectHandle();&#xD;&#xA;        Gdx.gl.glBindTexture(GL.GL_TEXTURE_2D, handle);&#xD;&#xA;        Gdx.gl.glEnable(GL.GL_POINT_SPRITE);&#xD;&#xA;        Gdx.gl11.glTexEnvi(GL.GL_POINT_SPRITE, GL.GL_COORD_REPLACE, GL.GL_TRUE);&#xD;&#xA;    &#xD;&#xA;        renderer.begin(GL.GL_POINTS);&#xD;&#xA;        renderer.vertex(pos.x, pos.y, pos.z);&#xD;&#xA;        renderer.end();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`create()` is called once when the program starts, and `renderSprites()` is called for each sprite (so, `pos` is unique to each sprite) where the sprites are arranged in a sort-of 3D cube. &#xD;&#xA;&#xD;&#xA;Unfortunately though, this just renders a few white dots...&#xD;&#xA;&#xD;&#xA;![Point sprite problem][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZG41S.png&#xD;&#xA;&#xD;&#xA;I suppose that the texture isn't being bound which is why I'm getting white dots. Also, when I draw my sprites on anything other than 0 z-axis, they do not appear -- I read that I need to crease my zfar and znear, but I have no idea how to do this using libgdx (perhaps it's because I'm using ortho projection? What do I use instead?).&#xD;&#xA;&#xD;&#xA;I know that the texture is usable, since I was able to render it using a SpriteBatch, but  I guess I'm not using it properly with OpenGL." />
  <row Id="19969" PostHistoryTypeId="4" PostId="9336" RevisionGUID="25d214a4-b83f-4899-9519-24faa90c9a2f" CreationDate="2011-03-11T20:14:31.443" UserId="4104" Comment="deleted 28 characters in body; edited title" Text="How do I draw a point sprite using OpenGL ES on Android?" />
  <row Id="19970" PostHistoryTypeId="2" PostId="9638" RevisionGUID="3f5f678b-1322-42b4-beeb-134e25161ab5" CreationDate="2011-03-11T20:14:34.373" UserId="6021" Text="First of all, I wouldn't include short-term goodies such as income or speed upgrades into account - I think players expect that these things help them for a while, not that the AI adapts immediately and gets stronger as well.&#xD;&#xA;&#xD;&#xA;And for the rest: try it out. Start with a power formula that seems reasonable to you (nimbus57' response should be a good starting point) and then develop your formula and the AI iteratively.&#xD;&#xA;&#xD;&#xA;Last but not least, try to make sure that the underlying formula cannot be exploited by the player to gain unfair advantage etc - it also shouldn't be too obvious how it works, so pull in a bit of randomness." />
  <row Id="19971" PostHistoryTypeId="2" PostId="9639" RevisionGUID="fba9cffc-7b81-4ad2-a26b-d2282bf2184c" CreationDate="2011-03-11T20:19:38.753" UserId="4104" Text="Using the libgdx framework, I've figured out how to render a texture to a point sprite. The problem is, it renders the entire texture to the point sprite, where I only want a small part of it (since it's an isometric tile image).&#xD;&#xA;&#xD;&#xA;Here's a snippet from some demo code I wrote...&#xD;&#xA;&#xD;&#xA;    create()&#xD;&#xA;    {&#xD;&#xA;        renderer = new ImmediateModeRenderer();&#xD;&#xA;    &#xD;&#xA;        tiles = Gdx.graphics.newTexture(&#xD;&#xA;            Gdx.files.internal(&quot;data/tiles2.png&quot;),&#xD;&#xA;            TextureFilter.MipMap,&#xD;&#xA;            TextureFilter.Linear,&#xD;&#xA;            TextureWrap.ClampToEdge,&#xD;&#xA;            TextureWrap.ClampToEdge);&#xD;&#xA;    &#xD;&#xA;        Gdx.gl.glClearColor(0.6f, 0.7f, 0.9f, 1);&#xD;&#xA;&#xD;&#xA;        Gdx.gl.glEnable(GL10.GL_TEXTURE_2D);&#xD;&#xA;        Gdx.gl.glEnable(GL11.GL_POINT_SPRITE_OES);&#xD;&#xA;&#xD;&#xA;        Gdx.gl11.glTexEnvi(&#xD;&#xA;            GL11.GL_POINT_SPRITE_OES, &#xD;&#xA;            GL11.GL_COORD_REPLACE_OES,&#xD;&#xA;            GL11.GL_TRUE);&#xD;&#xA;        &#xD;&#xA;        Gdx.gl10.glPointSize(s);&#xD;&#xA;        &#xD;&#xA;        tiles.bind();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    render()&#xD;&#xA;    {&#xD;&#xA;        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);&#xD;&#xA;    &#xD;&#xA;        renderer.begin(GL10.GL_POINTS);&#xD;&#xA;&#xD;&#xA;        // render 3 point sprites at various 3d points&#xD;&#xA;        renderer.vertex(-.1f, 0, -.1f);&#xD;&#xA;        renderer.vertex(0, 0, 0);&#xD;&#xA;        renderer.vertex(.1f, 0, .1f);&#xD;&#xA;&#xD;&#xA;        // ... more vertices here if needed (one for each sprite) ...&#xD;&#xA;&#xD;&#xA;        renderer.end();&#xD;&#xA;    }" />
  <row Id="19972" PostHistoryTypeId="1" PostId="9639" RevisionGUID="fba9cffc-7b81-4ad2-a26b-d2282bf2184c" CreationDate="2011-03-11T20:19:38.753" UserId="4104" Text="How do I render only part of a texture to a point sprite in OpenGL ES for Android?" />
  <row Id="19973" PostHistoryTypeId="3" PostId="9639" RevisionGUID="fba9cffc-7b81-4ad2-a26b-d2282bf2184c" CreationDate="2011-03-11T20:19:38.753" UserId="4104" Text="&lt;opengl-es&gt;&lt;textures&gt;" />
  <row Id="19974" PostHistoryTypeId="25" PostId="9635" RevisionGUID="d8858cb9-ca42-486e-9fd5-8bec8be922b2" CreationDate="2011-03-11T20:23:25.577" Comment="http://twitter.com/#!/StackGameDev/status/46305245495689216" />
  <row Id="19975" PostHistoryTypeId="2" PostId="9640" RevisionGUID="319699b4-237c-4e98-abe4-deadd3e33d06" CreationDate="2011-03-11T20:44:47.953" UserId="1101" Text="Personally I don't think there are any *good* examples, largely because the definition of a &quot;component-based system&quot; for games is so loosely defined that it can mean next to nothing.&#xD;&#xA;&#xD;&#xA;You might find some of the discussion in this answer helpful: http://gamedev.stackexchange.com/questions/8089/how-to-implement-a-component-based-system-for-items-in-a-web-game/&#xD;&#xA;&#xD;&#xA;On the whole though, the approach is simply to change any sort of GameObject or Actor from a large class that handles all behaviour into a simpler class that holds objects that perform behaviour. I think that working through this yourself and making different components that suit your game will often be the best way to proceed." />
  <row Id="19976" PostHistoryTypeId="2" PostId="9641" RevisionGUID="ea44133a-7e22-4ca9-8ae5-2dac011f3f81" CreationDate="2011-03-11T21:03:58.293" UserId="6040" Text="I have only played freeciv, but here are a few suggestions:&#xD;&#xA;&#xD;&#xA;Remove the &quot;bonus&quot; production square every city gets.  Without that bonus production square, four cities of size 1 will have as many production squares as a size 4 city. (Today the four small cities will have a total of 8 production squares vs 5 such for the size 4 city).&#xD;&#xA;&#xD;&#xA;Make city growth linear so it costs as much food to get from size 10 to 11 as it takes to get from size 1 to 2.  *Also* allow for a city that produces enough food to grow several sizes in one turn.&#xD;&#xA;&#xD;&#xA;Allow a big city with a lot of production capacity to produce multiple items from it's production list.&#xD;&#xA;&#xD;&#xA;I think the above would go a long way to even out ICS vs non-ICS but I then have a final suggestion which is a direct punishment of ICS: Tweak city walls, coastal battery and SAM batteries so they get a relatively weak defense bonus when the city is small and a relatively strong defense bonus when it is large enough.  But that is *really* going for a deliberate punishment of ICS...&#xD;&#xA;&#xD;&#xA;The above changes might come with an interesting price though, that growth of a city suddenly &quot;runs amok&quot; and it suddenly in one turn leaps from peaceful to severe civil disorder.  Of course, careful planning of buildings might aleviate that to some extent." />
  <row Id="19977" PostHistoryTypeId="2" PostId="9642" RevisionGUID="3559c470-0929-4acf-b6f8-f9d83d61db75" CreationDate="2011-03-11T21:28:07.930" UserId="1199" Text="In the game state management example at [the App Hub][1], they say that if you want to use components in the example you can extend the GameScreen to host other components inside itself. &#xD;&#xA;&#xD;&#xA;I'm having a very hard time trying to tie this up. &#xD;&#xA;I tried extending the GameScreen class by adding a public property of `public List&lt;DrawableGameCompnent&gt; components { get; set; }` and then add my components to that list when I initialize the current screen as well as looping over the components in the LoadContent, Update and Draw methods. However, this doesn't feel like the correct way to go - mainly because it doesn't work when I get to the implementation of my GameplayScreen.&#xD;&#xA;&#xD;&#xA;Any thoughts?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="19978" PostHistoryTypeId="1" PostId="9642" RevisionGUID="3559c470-0929-4acf-b6f8-f9d83d61db75" CreationDate="2011-03-11T21:28:07.930" UserId="1199" Text="Using components in the XNA Game State Management example?" />
  <row Id="19979" PostHistoryTypeId="3" PostId="9642" RevisionGUID="3559c470-0929-4acf-b6f8-f9d83d61db75" CreationDate="2011-03-11T21:28:07.930" UserId="1199" Text="&lt;xna&gt;&lt;component-based&gt;&lt;fsm&gt;" />
  <row Id="19980" PostHistoryTypeId="2" PostId="9643" RevisionGUID="94a7ee2d-5da2-4b3a-9dce-274633d4c3b8" CreationDate="2011-03-11T21:34:16.147" UserId="6040" Text="Try to keep your projects small, even if the result is &quot;unintrestingly simple&quot; games.  The code from those projects can then be reused or extended, resulting in more interesting projects. If you are impatient to get something finished soon, work *extra* hard on getting the game idea simple and stripped of everything but the really bare essentials.&#xD;&#xA;&#xD;&#xA;I have been fighting with this as a hobby game developer myself.  Having a family with kids, fairly bad discipline, and a bad habit just like everyone else to want to do *everything* at *once* (which seem to plague not just hobbyist game development but *all* software development), I find it hard to get any of my games created.  So the years goes on but in this matter, time is on our side as I see it because:&#xD;&#xA;&#xD;&#xA; 1. I develop software for a living, and some of the things learned from that job is usable when developing games.  As the years goes on, my skills toolbox increases.  This is true also for hobby programmers &quot;cranking out unintresting simple games&quot; for the sake of exercising his/her programming skills.&#xD;&#xA; 2. The computer industry (hardware and software) moves on as well, so what was a dreadfully complex task in the 1980ies and 1990ies or even a few years ago might today be taken care of by some proven and reliable library someone else wrote.  As hardware gets more powerful and cheaper over time, more high level tools, libraries and programming languages becomes an option when developing games.&#xD;&#xA; 3. I mature over these years as well (at least I hope so) and manage to restrain myself more and more to remove as much as possible from the game I try to create.  I can imagine many programmers share that experience, that over time, it is easier to adhere to &quot;keep it simple, stupid&quot;.&#xD;&#xA;&#xD;&#xA;In my case, in any year, all these three factors will converge to the point I actually manage to write some playable incarnation of some of my ideas.  For you Kragen, that point might already have been reached, if you manage to pick a simple enough game idea to write.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;" />
  <row Id="19981" PostHistoryTypeId="2" PostId="9644" RevisionGUID="78e6f927-d2d4-4e34-952a-5dbf6b66bac9" CreationDate="2011-03-11T21:35:11.460" UserId="5932" Text="Hey all, I'm making a simple side-scrolling game, and I would appreciate some input!&#xD;&#xA;&#xD;&#xA;My collision detection system is a simple bounding box detection, so it's really easy to implement. However my collision resolution is *ridiculous*! Currently I have a little formula like this:&#xD;&#xA;&#xD;&#xA;    if (colliding(firstObject,secondObject))  &#xD;&#xA;      firstObject.resolve_collision(yAxisOffset);&#xD;&#xA;    if (colliding(firstObject,secondObject))&#xD;&#xA;      firstObject.resolve_collision(xAxisOffset);&#xD;&#xA;&#xD;&#xA;where yAxisOffset is only set if the first object's previous y position was outside the second object's collision frame, respectively xAxisOffset as well.&#xD;&#xA;&#xD;&#xA;Now this is working great, in general. However there is a single problem. When I have a stack of objects and I push the first object against that stack, the first object get's &quot;stuck,&quot; on the stack. What's I think is happening is the object's collision system checks and resolves for collisions based on creation time, so If I check one axis, then the other, the object will &quot;sink&quot; object directly along the checking axis. &#xD;&#xA;&#xD;&#xA;This sinking action causes the collision detection routine to think there's a gap between our position and the other object's position, and when I finally check the object that I've already sunk into, my object's position is resolved to it's original position...&#xD;&#xA;&#xD;&#xA;All this is great, and I'm sure if I bang my head against a wall long enough i'll come up with a working algorithm, but I'd rather not =). So what in the heck do you think I should do? How could I change my collision resolution system to fix this?&#xD;&#xA;&#xD;&#xA;[Here's the program](http://ifile.it/tn1ud07) (temporary link, not sure how long it'll last)&#xD;&#xA;(notes: arrow keys to navigate, click to drop block, x to jump)&#xD;&#xA;&#xD;&#xA;I'd appreciate any help you can offer!" />
  <row Id="19982" PostHistoryTypeId="1" PostId="9644" RevisionGUID="78e6f927-d2d4-4e34-952a-5dbf6b66bac9" CreationDate="2011-03-11T21:35:11.460" UserId="5932" Text="Collision Resolution" />
  <row Id="19983" PostHistoryTypeId="3" PostId="9644" RevisionGUID="78e6f927-d2d4-4e34-952a-5dbf6b66bac9" CreationDate="2011-03-11T21:35:11.460" UserId="5932" Text="&lt;game-design&gt;&lt;c++&gt;&lt;programming&gt;&lt;collision-detection&gt;&lt;sdl&gt;" />
  <row Id="19984" PostHistoryTypeId="2" PostId="9645" RevisionGUID="918b68e4-a36b-4215-9137-ce2af19293bb" CreationDate="2011-03-11T21:45:58.207" UserId="5932" Text="Well You can always do what I did, however poorly implemented it was on my part, I have a simple method in my &quot;being&quot; class called update_prev_pos(), which does just that, it stores your current position in a struct to look at later. In my collision resolution function I look at the position of the side in question. If the side was previously outside of the object, then that side must be corrected.&#xD;&#xA;&#xD;&#xA;I'm using a two pass method to check and resolve collisions. What I would recommend doing is checking all x-axis collisions, then all y-axis collisions, That way you won't get stuck on objects you shouldn't. happy colliding =)" />
  <row Id="19985" PostHistoryTypeId="2" PostId="9646" RevisionGUID="d9fcb0f9-4829-40a3-8f08-35d2df039723" CreationDate="2011-03-11T21:58:03.423" UserId="5641" Text="So, this seems odd to me. I upload a large buffer of vertices, then every frame I call glBindbuffer and then the appropriate gl*Pointer functions with offsets into the buffer, then I use glDrawArrays to draw all of my triangles.&#xD;&#xA;&#xD;&#xA;I'm only drawing about 100K triangles, however I'm getting about 15FPS.&#xD;&#xA;&#xD;&#xA;This is where it gets weird, if I change it to not call glBindBuffer, then change the gl*Pointer calls to be actual pointers into the array I have in system memory, and then call glDrawArrays the same, my framerate jumps up to about 50FPS.&#xD;&#xA;&#xD;&#xA;Any idea what I weird thing I could be doing that would cause this? Did I maybe forget to call glEnable(GL_ALLOW_VBOS_TO_RUN_FAST) or something?" />
  <row Id="19986" PostHistoryTypeId="1" PostId="9646" RevisionGUID="d9fcb0f9-4829-40a3-8f08-35d2df039723" CreationDate="2011-03-11T21:58:03.423" UserId="5641" Text="OpenGL VBOs are slower then glDrawArrays." />
  <row Id="19987" PostHistoryTypeId="3" PostId="9646" RevisionGUID="d9fcb0f9-4829-40a3-8f08-35d2df039723" CreationDate="2011-03-11T21:58:03.423" UserId="5641" Text="&lt;opengl&gt;&lt;performance&gt;&lt;optimization&gt;" />
  <row Id="19988" PostHistoryTypeId="2" PostId="9647" RevisionGUID="e30a4427-75e9-42fa-b792-83a6b674b472" CreationDate="2011-03-11T22:02:18.727" UserId="5440" Text="I was wondering why most game and graphics engines prefer to make geometry/mesh class only as a leaf in the scene hierarchy; more precisely they are not allowed to have children. so what are the pros. and cons of making it able to have children from performance and software design point of view? " />
  <row Id="19989" PostHistoryTypeId="1" PostId="9647" RevisionGUID="e30a4427-75e9-42fa-b792-83a6b674b472" CreationDate="2011-03-11T22:02:18.727" UserId="5440" Text="pros and cons of making geometry not only leaf in scene heirarchy" />
  <row Id="19990" PostHistoryTypeId="3" PostId="9647" RevisionGUID="e30a4427-75e9-42fa-b792-83a6b674b472" CreationDate="2011-03-11T22:02:18.727" UserId="5440" Text="&lt;3d-engines&gt;&lt;scene-graph&gt;" />
  <row Id="19991" PostHistoryTypeId="2" PostId="9648" RevisionGUID="e1babb87-32b9-4e79-91d2-c2364f8cb37f" CreationDate="2011-03-11T22:14:33.070" UserId="5440" Text="I think its a code specific problem not problem with VBOs.. &#xD;&#xA;-make sure you are not copying VBOs every time.&#xD;&#xA;-make sure you are not misusing VBOs functions (I think there is a small difference between using VBOs in openGL 3.0 and previous versions).&#xD;&#xA;-make sure that openGL is not generating an Error.&#xD;&#xA;-debug your openGL code using gDebugger.  " />
  <row Id="19992" PostHistoryTypeId="2" PostId="9649" RevisionGUID="3ed7f140-c56b-4840-a7cb-873ec5dd684a" CreationDate="2011-03-11T22:19:24.607" UserId="5957" Text="It really depends the heirarchy is the only structure you're using. I often use a tree-like structure for logical seperation of scene elements but I use other structures, such as BSP trees, quad trees and the like to store instance batches. That's the important bit for performance: How quickly can you determine which batches of instances to render together.  If you've got some logical heirachy someplace else it won't have any impact on performance (other than extra memory use) but it's important to have quick access to potentially visible sets of data in a form that is graphics card and cache friendly." />
  <row Id="19993" PostHistoryTypeId="2" PostId="9650" RevisionGUID="d6065d42-dd18-4299-a30a-353d8fc662c2" CreationDate="2011-03-11T22:29:30.040" UserId="4296" Text="DrawableGameComponent takes the Game object on instantiation and will try to add that object to your base game's list of drawable components - this isn't what you want as it will attempt to draw/update those entities regardless of what screen is active.  Screens should implement their own internal list of things to draw and update.&#xD;&#xA;&#xD;&#xA;You'll want to implement your own, simplified version of DrawableGameComponent that doesn't rely on adding itself to the base game component list.&#xD;&#xA;&#xD;&#xA;In the XNA Framework are these two interfaces that may help:&#xD;&#xA;&#xD;&#xA;[IDrawable][1],&#xD;&#xA;[IUpdateable][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.idrawable_members.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.iupdateable_members.aspx&#xD;&#xA;&#xD;&#xA;Your own component classes would implement one or both of these then, and you might want to implement a collection manager to handle them." />
  <row Id="19994" PostHistoryTypeId="2" PostId="9651" RevisionGUID="b07e7390-da71-4b2b-bf23-9d8d1493a636" CreationDate="2011-03-11T22:29:42.147" UserId="5899" Text="I quote the Ogre justification, from the book &quot;Pro Ogre 3D Programming&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The decision to decouple the scene graph from the scene contents was probably one of the most brilliant, yet underappreciated, design features in the entire Ogre project. This is such a simple design to understand, yet one of the hardest to comprehend for those used to more “traditional” scene graph designs.&#xD;&#xA;Traditional designs (as used in many commercial and open source 3D engines) typically couple the scene contents and the scene graph in an inheritance hierarchy that forces the subclassing of content classes as types of scene nodes. This turns out to be an incredibly poor design decision in the long run, as it makes it virtually impossible to change graph algorithms later, without forcing a lot of code changes at the leaf-node level if the base node interfaces change at all (and they usually do). Furthermore, this “all nodes derive from a common node type” design is, in the long run, inherently inflexible and nonextensible (at least from a main- tenance standpoint): functionality invariably is forced up the inheritance hierarchy to the root nodes, and myriad subclasses are required, and typically end up as minor adjustments to base functionality. This is, at the very least, a poor object-oriented design practice, and those who adopt this design philosophy almost always end up wishing they had done it a different way in the beginning.&#xD;&#xA;Ogre did. First of all, Ogre operates on its scene graph(s) at an interface level; Ogre makes no assumption as to what sort of graph algorithm is implemented. Instead, Ogre operates on the scene graph only through its signature (its methods, in other words) and is completely igno- rant of the underlying graph algorithm implementation. Second, Ogre’s scene graph interface is concerned only with the graph structure. Nodes do not contain any inherent content access or management functionality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="19995" PostHistoryTypeId="2" PostId="9652" RevisionGUID="c3bcb0d4-cd37-46fe-a579-93369b0f5ee1" CreationDate="2011-03-11T22:36:53.483" UserId="6042" Text="A triangle is the simplest primitive that can be described ***in isolation*** because it has three points, fewer than which do not describe a surface in 3D.&#xD;&#xA;&#xD;&#xA;Because a triangle can be considered in isolation, it is possible to make a piece of code or silicon that is capable of rendering only a single triangle, which via the power of repetition can render any surface at all.&#xD;&#xA;&#xD;&#xA;Therefore, the first computer system which succeeded at rendering &quot;any surface at all&quot; naturally did so by rendering many triangles independently.&#xD;&#xA;&#xD;&#xA;If one thinks of triangles and quads as &quot;primitives&quot; (i.e. as completely isolated bits of geometry with no context) the triangle is the more primitive, and so it will tend to &quot;win.&quot;&#xD;&#xA;&#xD;&#xA;However, once entertainment-grade computers exceeded a certain level of sophistication in the 1980s, the simplicity of considering &quot;primitives&quot; in isolation became less important. This is when movies adopted &quot;quads,&quot; which is a misnomer because it refers to 2D grids of points in 3D space, and not isolated quadrilaterals without context.&#xD;&#xA;&#xD;&#xA;The same shift from triangles to &quot;quads&quot; has not happened yet in the realm of interactive entertainment, but it is likely to happen, fairly soon, and for the same reasons it happened in the movie business." />
  <row Id="19996" PostHistoryTypeId="5" PostId="9652" RevisionGUID="2a3c26ad-046a-4edd-b654-91165e5be4e2" CreationDate="2011-03-11T22:45:32.387" UserId="6042" Comment="added 183 characters in body" Text="A triangle is the simplest primitive that can be described ***in isolation*** because it has three points, fewer than which do not describe a surface in 3D.&#xD;&#xA;&#xD;&#xA;Because a triangle can be considered in isolation, it is possible to make a piece of code or silicon that is capable of rendering only a single triangle, which via the power of repetition can render any surface at all.&#xD;&#xA;&#xD;&#xA;Therefore, the first computer system which succeeded at rendering &quot;any surface at all&quot; naturally did so by rendering many triangles independently.&#xD;&#xA;&#xD;&#xA;If one thinks of triangles and quads as &quot;primitives&quot; (i.e. as completely isolated bits of geometry with no context) the triangle is the more primitive, and so it will tend to &quot;win.&quot;&#xD;&#xA;&#xD;&#xA;However, once entertainment-grade computers exceeded a certain level of sophistication in the 1980s, the simplicity of considering &quot;primitives&quot; in isolation became less important. If graphics are to be mass-produced, then economies of scale favor processing groups of related vertices, much as they favor assembling a hundred near-identical cars at once.&#xD;&#xA;&#xD;&#xA;This is why in the 1980s, movies adopted the &quot;quad,&quot; which is a misnomer because it refers to a 2D grid of vertices in 3D space, and not an isolated quadrilateral.&#xD;&#xA;&#xD;&#xA;The same shift from triangles to &quot;quads&quot; has not happened yet in the realm of interactive entertainment, but it is likely to happen, fairly soon, and for the same reasons it happened in the movie business." />
  <row Id="19997" PostHistoryTypeId="5" PostId="9650" RevisionGUID="3de5143c-eccc-4c81-868f-eef858b0bb20" CreationDate="2011-03-11T22:46:15.407" UserId="4296" Comment="clarity" Text="DrawableGameComponent takes the Game object on instantiation and will try to add that object to your base game's list of drawable components - this isn't what you want as it will attempt to draw/update those entities regardless of what screen is active.  Screens should implement their own internal list of things to draw and update.&#xD;&#xA;&#xD;&#xA;DrawableGameComponent's are useful for global things like the screen manager and an input manager, not for something like a player or unit class.&#xD;&#xA;&#xD;&#xA;For screen specific entities, you'll want to implement your own, simplified version of DrawableGameComponent that doesn't rely on adding itself to the base game component list.&#xD;&#xA;&#xD;&#xA;In the XNA Framework are these two interfaces that may help:&#xD;&#xA;&#xD;&#xA;[IDrawable][1],&#xD;&#xA;[IUpdateable][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.idrawable_members.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.iupdateable_members.aspx&#xD;&#xA;&#xD;&#xA;Your own screen component classes would implement one or both of these then, and you might want to implement a collection manager to handle them." />
  <row Id="19998" PostHistoryTypeId="2" PostId="9653" RevisionGUID="74617959-70d1-4571-8dea-3ca019070b69" CreationDate="2011-03-11T22:54:26.557" UserId="5704" Text="glBindBuffer is expensive, but not so much that you can expect a noticeable impact from a single bind (or several dozen of them, for that matter).&#xD;&#xA;&#xD;&#xA;Did you check that you have the right usage flags when creating the buffer storage with glBufferData? For your scenario, GL_STATIC_DRAW is the ALLOW_IT_TO_RUN_FAST flag. If you accidentially use the wrong flags, it might do silly things with your buffer.&#xD;&#xA;&#xD;&#xA;I've seen performance drop of nearly two full frames worth on a readback into a PBO once only because I used the wrong flags. When you get that one wrong, it is a &quot;wtf, this cannot possibly take 30 ms???&quot; experience." />
  <row Id="19999" PostHistoryTypeId="5" PostId="9651" RevisionGUID="ccf1467c-f9c8-47e3-a5de-40c20668eaaf" CreationDate="2011-03-11T23:02:11.200" UserId="20" Comment="formatted quote as a quote" Text="I quote the Ogre justification, from the book &quot;Pro Ogre 3D Programming&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; The decision to decouple the scene&#xD;&#xA;&gt; graph from the scene contents was&#xD;&#xA;&gt; probably one of the most brilliant,&#xD;&#xA;&gt; yet underappreciated, design features&#xD;&#xA;&gt; in the entire Ogre project. This is&#xD;&#xA;&gt; such a simple design to understand,&#xD;&#xA;&gt; yet one of the hardest to comprehend&#xD;&#xA;&gt; for those used to more “traditional”&#xD;&#xA;&gt; scene graph designs. Traditional&#xD;&#xA;&gt; designs (as used in many commercial&#xD;&#xA;&gt; and open source 3D engines) typically&#xD;&#xA;&gt; couple the scene contents and the&#xD;&#xA;&gt; scene graph in an inheritance&#xD;&#xA;&gt; hierarchy that forces the subclassing&#xD;&#xA;&gt; of content classes as types of scene&#xD;&#xA;&gt; nodes. This turns out to be an&#xD;&#xA;&gt; incredibly poor design decision in the&#xD;&#xA;&gt; long run, as it makes it virtually&#xD;&#xA;&gt; impossible to change graph algorithms&#xD;&#xA;&gt; later, without forcing a lot of code&#xD;&#xA;&gt; changes at the leaf-node level if the&#xD;&#xA;&gt; base node interfaces change at all&#xD;&#xA;&gt; (and they usually do). Furthermore,&#xD;&#xA;&gt; this “all nodes derive from a common&#xD;&#xA;&gt; node type” design is, in the long run,&#xD;&#xA;&gt; inherently inflexible and&#xD;&#xA;&gt; nonextensible (at least from a main-&#xD;&#xA;&gt; tenance standpoint): functionality&#xD;&#xA;&gt; invariably is forced up the&#xD;&#xA;&gt; inheritance hierarchy to the root&#xD;&#xA;&gt; nodes, and myriad subclasses are&#xD;&#xA;&gt; required, and typically end up as&#xD;&#xA;&gt; minor adjustments to base&#xD;&#xA;&gt; functionality. This is, at the very&#xD;&#xA;&gt; least, a poor object-oriented design&#xD;&#xA;&gt; practice, and those who adopt this&#xD;&#xA;&gt; design philosophy almost always end up&#xD;&#xA;&gt; wishing they had done it a different&#xD;&#xA;&gt; way in the beginning. Ogre did. First&#xD;&#xA;&gt; of all, Ogre operates on its scene&#xD;&#xA;&gt; graph(s) at an interface level; Ogre&#xD;&#xA;&gt; makes no assumption as to what sort of&#xD;&#xA;&gt; graph algorithm is implemented.&#xD;&#xA;&gt; Instead, Ogre operates on the scene&#xD;&#xA;&gt; graph only through its signature (its&#xD;&#xA;&gt; methods, in other words) and is&#xD;&#xA;&gt; completely igno- rant of the&#xD;&#xA;&gt; underlying graph algorithm&#xD;&#xA;&gt; implementation. Second, Ogre’s scene&#xD;&#xA;&gt; graph interface is concerned only with&#xD;&#xA;&gt; the graph structure. Nodes do not&#xD;&#xA;&gt; contain any inherent content access or&#xD;&#xA;&gt; management functionality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20000" PostHistoryTypeId="25" PostId="9647" RevisionGUID="291106c7-a4c2-4c89-bad8-e3fb78742a4e" CreationDate="2011-03-11T23:23:25.843" Comment="http://twitter.com/#!/StackGameDev/status/46350544880664576" />
  <row Id="20001" PostHistoryTypeId="2" PostId="9654" RevisionGUID="4531a720-b93e-42b8-9b4b-6899769254df" CreationDate="2011-03-11T23:35:59.577" UserId="5899" Text="What prefer a game developer company? A developer with experience in UDK engine ? or,  a developer with projects made entirely in c++ with a graphics engine like Ogre3D?&#xD;&#xA;&#xD;&#xA;I think that a coder can demonstrate better his abilities with games made in c++, because it requires a knowledge deeper in many fields. However, currently there is a lot of companies that develop his games with UDK. Now I don't know if is better specialize in a game engine like UDK." />
  <row Id="20002" PostHistoryTypeId="1" PostId="9654" RevisionGUID="4531a720-b93e-42b8-9b4b-6899769254df" CreationDate="2011-03-11T23:35:59.577" UserId="5899" Text="What prefer a game developer company? UDK experience or c++ game projects?" />
  <row Id="20003" PostHistoryTypeId="3" PostId="9654" RevisionGUID="4531a720-b93e-42b8-9b4b-6899769254df" CreationDate="2011-03-11T23:35:59.577" UserId="5899" Text="&lt;c++&gt;&lt;udk&gt;" />
  <row Id="20004" PostHistoryTypeId="2" PostId="9655" RevisionGUID="f4b531bf-6cc3-46ed-a4c6-e0184efc3a9d" CreationDate="2011-03-12T00:05:50.570" UserId="6044" Text="The Garden of Eden creation kit for FallOut 3 is pretty cool.&#xD;&#xA;&#xD;&#xA;http://fallout.bethsoft.com/eng/downloads/geck.html" />
  <row Id="20005" PostHistoryTypeId="2" PostId="9656" RevisionGUID="48108c2f-96d2-4fc7-98b7-fd490d063199" CreationDate="2011-03-12T00:24:40.567" UserId="2332" Text="Depends on the job spec, if the company have set out the requirements for proficiency in C++, then you're gonna want to have some decent C++ projects in your portfolio that you can show off.&#xD;&#xA;&#xD;&#xA;If they specifically ask for UnrealScript examples, then you'll want to have some UDK samples to show off.&#xD;&#xA;&#xD;&#xA;It really depends on the games company, what they're after, what the role is, etc.&#xD;&#xA;&#xD;&#xA;At the end of the day, it comes down to experience. Whilst it is very good for a programmer to be competent in many different technologies (and desirable in some cases), if you're looking at a specialist role I'd expect the potential candidate to focus more of their submitted portfolio to the specialism (for example, if you're applying for an AI role, I wouldn't really expect a whole portfolio full of awesome physics demos).&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;Ray" />
  <row Id="20006" PostHistoryTypeId="2" PostId="9657" RevisionGUID="f3ba241e-6ef8-4c67-b957-1fdb0db334f3" CreationDate="2011-03-12T00:25:35.487" UserId="3794" Text="It depends. But for developer should mostly present as much skills as possible. So yeah for c++ and UDK. But in my opinion, much better is have your own litle graphics engine in opengl or directx..." />
  <row Id="20007" PostHistoryTypeId="2" PostId="9658" RevisionGUID="6b3978b0-dd45-4f7a-baaa-30822a482e9a" CreationDate="2011-03-12T01:36:32.180" UserId="1430" Text="&gt; What prefer a game developer company?&#xD;&#xA;&gt; A developer with experience in UDK&#xD;&#xA;&gt; engine ? or, a developer with projects&#xD;&#xA;&gt; made entirely in c++ with a graphics&#xD;&#xA;&gt; engine like Ogre3D?&#xD;&#xA;&#xD;&#xA;Too hard to say. Both skills are good to have, whether or not a company will prefer one over the other depends on what position(s) and skill set(s) they are looking for currently.&#xD;&#xA;&#xD;&#xA;&gt; I think that a coder can demonstrate&#xD;&#xA;&gt; better his abilities with games made&#xD;&#xA;&gt; in c++, because it requires a&#xD;&#xA;&gt; knowledge deeper in many fields.&#xD;&#xA;&#xD;&#xA;I would challenge this assertion. A game made in C++ demonstrates the developers C++ skills more than a game made in some other fashion, but just because something was written in C++ does not mean it better demonstrates a developer's overall ability, nor does it necessarily demonstrate deeper knowledge about anything." />
  <row Id="20008" PostHistoryTypeId="25" PostId="9642" RevisionGUID="90b2ca41-00a6-4d35-8f5e-37e52d45fd1d" CreationDate="2011-03-12T02:23:27.163" Comment="http://twitter.com/#!/StackGameDev/status/46395848329924608" />
  <row Id="20009" PostHistoryTypeId="2" PostId="9659" RevisionGUID="43297a47-071b-4316-9f60-5d14feaeb371" CreationDate="2011-03-12T02:31:00.323" UserId="6049" Text="Yes, I know, the best way to make an indie game is to learn to code. I've got some scripting experience, but I want to do worldbuilding with already-existing tools (and communities surrounding those tools), and I've been really impressed with games like An Untitled Story that were made with pre-packaged toolsets at their core, like Game Maker. :)&#xD;&#xA;&#xD;&#xA;So I'm planning to make my game using either Game Maker or something like it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The basic parameters of my planned game:&#xD;&#xA;&#xD;&#xA;-2D platformer.&#xD;&#xA;-Physics/speed akin to Sonic the Hedgehog.&#xD;&#xA;-Large, non-linear world, flowing as seamlessly as possible -- think Super Metroid, but without the forced screen transitions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first two points have me leaning toward Game Maker -- Plenty of 2D platformers have been made with it, and there are serviceable, openly available Sonic-the-Hedgehog-style physics engines for it that could be adapted to my needs with minimal muss and fuss.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But the third makes me antsy -- from what limited information I hear, Game Maker has problems with large levels/boards/screens/whateveryoucallthem, thus necessitating transitions between screens.&#xD;&#xA;&#xD;&#xA;I want to avoid that if at all possible -- it would, I believe, fundamentally alter the flow of the game.  I understand that generally speaking, the more you have loaded into memory the more things are going to chug (especially for a one-size-fits-all game development platform that isn't a model of efficient coding), but I'm hoping there are systems that can un-load objects that are sufficiently far offscreen and thus better produce seamlessness.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any thoughts, people? :)  The sooner I can get a basic pre-fab physics engine and world-building program up and running, the sooner I can start prototyping areas and generally tooling around.  Should I be looking at Game Maker, or elsewhere?&#xD;&#xA;&#xD;&#xA;(My current plan is to more-or-less build the game prototype-style, then worry about art and sound at the very end once the damn thing is playable.)" />
  <row Id="20010" PostHistoryTypeId="1" PostId="9659" RevisionGUID="43297a47-071b-4316-9f60-5d14feaeb371" CreationDate="2011-03-12T02:31:00.323" UserId="6049" Text="What's a good Game development platform for a platformer game with these characteristics?" />
  <row Id="20011" PostHistoryTypeId="3" PostId="9659" RevisionGUID="43297a47-071b-4316-9f60-5d14feaeb371" CreationDate="2011-03-12T02:31:00.323" UserId="6049" Text="&lt;engine&gt;" />
  <row Id="20012" PostHistoryTypeId="2" PostId="9660" RevisionGUID="f100b010-f4ab-4597-b95b-62022c24c1a9" CreationDate="2011-03-12T03:46:38.743" UserId="6047" Text="I'm working on an RPG of sorts where the character has a &quot;day job&quot; that determines how much money they make each time the day cycles and other things like that.&#xD;&#xA;&#xD;&#xA;Are there any legality issues with using the names of Companies like &quot;Barnes &amp; Noble&quot; or even &quot;Apple&quot;?" />
  <row Id="20013" PostHistoryTypeId="1" PostId="9660" RevisionGUID="f100b010-f4ab-4597-b95b-62022c24c1a9" CreationDate="2011-03-12T03:46:38.743" UserId="6047" Text="Are there legality issues using a company's name in a game?" />
  <row Id="20014" PostHistoryTypeId="3" PostId="9660" RevisionGUID="f100b010-f4ab-4597-b95b-62022c24c1a9" CreationDate="2011-03-12T03:46:38.743" UserId="6047" Text="&lt;legal&gt;" />
  <row Id="20015" PostHistoryTypeId="2" PostId="9661" RevisionGUID="250287c1-73df-459a-aa48-86855e31c148" CreationDate="2011-03-12T04:08:38.227" UserId="1430" Text="I am not a lawyer.&#xD;&#xA;&#xD;&#xA;But almost certainly the answer is &quot;yes.&quot;&#xD;&#xA;&#xD;&#xA;[&quot;Apple&quot; is a registered US trademark of Apple, Inc.][1] for example (and presumably so is Barnes &amp; Noble and the names of almost any other major company you can think of), and many companies may have trade or service marks registered in other countries as well. Usage of those marks is subject the constraints of the relevant trademark law. In some cases, depending on what you want to use, there may be copyright issues involved as well.&#xD;&#xA;&#xD;&#xA;See [here][2] and [here][3] for more information US patent, trademark and copyright law.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.apple.com/legal/trademark/appletmlist.html&#xD;&#xA;  [2]: http://www.uspto.gov&#xD;&#xA;  [3]: http://www.copyright.gov/" />
  <row Id="20016" PostHistoryTypeId="5" PostId="9660" RevisionGUID="fd98fc01-efff-4f4e-a685-ef5e6decdbff" CreationDate="2011-03-12T04:09:08.617" UserId="1430" Comment="edited body" Text="I'm working on an RPG of sorts where the character has a &quot;day job&quot; that determines how much money they make each time the day cycles and other things like that.&#xD;&#xA;&#xD;&#xA;Are there any legality issues with using the names of companies like &quot;Barnes &amp; Noble&quot; or even &quot;Apple&quot;?" />
  <row Id="20017" PostHistoryTypeId="2" PostId="9662" RevisionGUID="08d13482-ee00-460f-aaed-43ce2ae7f68c" CreationDate="2011-03-12T04:13:22.977" UserId="5818" Text="That depends. Wikipedia has an excellent quote&#xD;&#xA;&#xD;&#xA;&gt; The owner of a registered trademark&#xD;&#xA;&gt; may commence legal proceedings for&#xD;&#xA;&gt; trademark infringement to prevent&#xD;&#xA;&gt; unauthorized use of that trademark.&#xD;&#xA;&gt; However, registration is not required.&#xD;&#xA;&gt; The owner of a common law trademark&#xD;&#xA;&gt; may also file suit, but an&#xD;&#xA;&gt; unregistered mark may be protectable&#xD;&#xA;&gt; only within the geographical area&#xD;&#xA;&gt; within which it has been used or in&#xD;&#xA;&gt; geographical areas into which it may&#xD;&#xA;&gt; be reasonably expected to expand.&#xD;&#xA;&gt; (http://en.wikipedia.org/wiki/Trademark)&#xD;&#xA;&#xD;&#xA;This entails that even though the company name it isn't a registered trademark you can still get sued - even if you did not publish your game in the country where the company resides!" />
  <row Id="20018" PostHistoryTypeId="2" PostId="9663" RevisionGUID="cc9651ee-8ca4-4c42-919c-eacdc895ba3c" CreationDate="2011-03-12T05:08:32.593" UserId="51" Text="A good coder is a good coder regardless of their specific background.  It's really just a matter of how much time the company is willing to spend on training/learning for a new coder to become familiar with whatever tech they're working on.  &#xD;&#xA;&#xD;&#xA;Some companies hire to fill positions.  In that case if you have experience in X and they're looking for somebody who can do X, you'll be bumped to closer to the top of the queue.  Other companies look for targets of opportunity and realize that learning new software and languages is easy for any mid/senior programmer worth his salt and would fit in with the company for other reasons (i.e. culture).  It depends.&#xD;&#xA;&#xD;&#xA;That being said, not having any C++ experience can be a red flag companies doing at least some C++ work, as &quot;getting pointers&quot; is pretty fundamental.&#xD;&#xA;" />
  <row Id="20019" PostHistoryTypeId="25" PostId="9660" RevisionGUID="ba3c7a0c-21ae-4452-b814-3bd1a0569518" CreationDate="2011-03-12T05:23:27.993" Comment="http://twitter.com/#!/StackGameDev/status/46441151229726720" />
  <row Id="20020" PostHistoryTypeId="2" PostId="9664" RevisionGUID="ea20fffa-dbb7-447b-854b-769f5ebe60ce" CreationDate="2011-03-12T05:32:30.560" UserId="5599" Text="Companies that use a game engine like UDK also have programmers that write c++ code (and/or other languages). So learning either one is equally valid and relevant to get into the game industry.&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;The important thing here is for you to **find out what you really love doing and then do it**.&#xD;&#xA;&#xD;&#xA;When you work on something that you really enjoy doing, you will probably produce your best work, and this will give you the best chance of convincing the company that you are worth hiring, regardless of what technology you decided to learn and implement.&#xD;&#xA;&#xD;&#xA;If you don't yet know what motivates you to make games, the best way to find out is to experiment.&lt;br/&gt;&#xD;&#xA;Try a small project with UDK. See how you like UnreaScript and programming game logic.&lt;br/&gt;&#xD;&#xA;Find some examples in c++ and try them out, maybe physics, or graphics or even a small tool that converts data from one format to another.&lt;br/&gt;&#xD;&#xA;You don't even have to settle on one technology or one area of expertise, in fact the more skills you have the better, especially early on in your career.&#xD;&#xA;&#xD;&#xA;There are many different programming roles in a game developer. They are all needed to make the game. Find out which one you want to be.&#xD;&#xA;" />
  <row Id="20021" PostHistoryTypeId="2" PostId="9665" RevisionGUID="12f93565-b9a0-46e9-809f-8f0872a8b765" CreationDate="2011-03-12T05:59:50.113" UserId="5599" Text="I'm not sure I understand the problem, but looking at your code above you resolve collision by only moving the first object away. What if in certain conditions, it's the second object that needs to move away and not the first?&#xD;&#xA;&#xD;&#xA;You might want to try resolving the collision by moving both objects away from each other at the same time by half of the offset, or even better by an amount proportional to their weight or size, this way a big box will only move a little bit while a small box will move a lot.&#xD;&#xA;&#xD;&#xA;If you have several objects to resolve (as you mention a stack), you need to find a solution that works for all objects at the same time and not just for 2 at a time.&#xD;&#xA;&#xD;&#xA;If you want a very good/accurate solution I recommend you get a good book on physics/collision for games and try something from there. This will probably take some time to implement and some of those system are quite hard to understand. Maybe also overkill for a simple game.&#xD;&#xA;&#xD;&#xA;One thing you could probably try now is to iterate through your resolution code a few times every frame between all the object. Every iteration will move each object away a little bit and hopefully find a good solution in very few iterations. Of course you might never find a solution this way and it might become too expensive to iterate many times in a single frame. Might be worth a try though." />
  <row Id="20022" PostHistoryTypeId="2" PostId="9666" RevisionGUID="e3e33289-6061-4386-ad59-316b4952fa83" CreationDate="2011-03-12T06:04:43.433" UserId="458" Text="Generally you want to be very careful with this. There's a few reasons why adaptive AI is rare in fighting games:&#xD;&#xA;&#xD;&#xA; * Algorithms are significantly more complicated, so the added gameplay must be worth the extra effort, and usually it isn't.&#xD;&#xA; * Having an adaptive AI makes it much harder to have discrete difficulty levels, which removes a lot of the thrill of winning.&#xD;&#xA; * For console games, memory is always bounded (this is one of the TRC/TCR requirements), but genetic algorithms grow unbounded the more experience they get... which basically means you have to force the AI to start &quot;forgetting&quot; things eventually.&#xD;&#xA; * At the end of the day, creating a genetic algorithm is more fun than playing against it. Remember, from a game design perspective, the point of an AI is not to beat the player, but to allow the player to have fun (which generally means &quot;put up a good fight then lose&quot;). An AI that just gets better and better forever eventually sucks the fun out of the game; an AI that adapts to the player by getting better OR worse just makes the player feel like no matter what they do, they never get any better at playing against the AI because it'll always just increase its difficulty to match them, so there's no feeling of 'fiero' mastery." />
  <row Id="20023" PostHistoryTypeId="2" PostId="9667" RevisionGUID="c6beaae9-33f9-4a0d-a32e-f3d568b62ca3" CreationDate="2011-03-12T06:15:33.330" UserId="458" Text="I think you'll find two types of attitudes that would say Flash isn't &quot;real&quot; development.&#xD;&#xA;&#xD;&#xA;First is from hardcore (C++ or similar) programmers, saying that ActionScript is scripting rather than &quot;real&quot; programming, because it abstracts away so much and as a result has a bit less power, and lets you get away with understanding less about how to program properly. I would tend to say this is true to the extent that &quot;scripting&quot; and &quot;programming&quot; are two related but different skill sets, so it's important to make the distinction between them, even if we leave the snobbery out of it.&#xD;&#xA;&#xD;&#xA;Second is when looking at AAA game development aimed towards the &quot;core&quot; market as the &quot;real&quot; industry, and everything else as peripheral. This is an old attitude that derides not only indie and small-scale development but also casual games, serious games, social media games, smartphone/mobile games, and so on as somehow being on the outside. I think this attitude is slowly changing, in particular with the massive success of some Facebook games (like it or hate it, FarmVille has more players than any console game out there) and the number of game industry veterans that are transitioning to that space, Flash is getting a lot of use by people who formerly only worked in C++.&#xD;&#xA;&#xD;&#xA;Personally, I think Flash is just as valid as anything else (heck, I've even seen some mighty impressive Game Maker games) so I wouldn't write off any game as &quot;not proper&quot; just because of its development platform. But I write this response so you can get a sense of where this attitude is coming from, so you can take those comments in context." />
  <row Id="20024" PostHistoryTypeId="2" PostId="9668" RevisionGUID="fa0789d5-ffd6-4a06-861a-67a1dd757b0b" CreationDate="2011-03-12T06:27:22.417" UserId="4513" Text="Google has failed me, I could not find anything informative. So perhaps GameDev can :).&#xD;&#xA;&#xD;&#xA; - What are 3D textures?&#xD;&#xA; - When are they&#xD;&#xA;   used?&#xD;&#xA; - Performance costs?&#xD;&#xA; - How are they stored?&#xD;&#xA;&#xD;&#xA;I have many vague ideas, but no 'definitive' definition." />
  <row Id="20025" PostHistoryTypeId="1" PostId="9668" RevisionGUID="fa0789d5-ffd6-4a06-861a-67a1dd757b0b" CreationDate="2011-03-12T06:27:22.417" UserId="4513" Text="3D Textures - What are they" />
  <row Id="20026" PostHistoryTypeId="3" PostId="9668" RevisionGUID="fa0789d5-ffd6-4a06-861a-67a1dd757b0b" CreationDate="2011-03-12T06:27:22.417" UserId="4513" Text="&lt;3d&gt;&lt;textures&gt;" />
  <row Id="20027" PostHistoryTypeId="2" PostId="9669" RevisionGUID="2628c46a-7f96-4c73-964e-e7838e4478ba" CreationDate="2011-03-12T06:31:20.400" UserId="5932" Text="How much work are you willing to apply to your project? &#xD;&#xA;&#xD;&#xA;Would you like to learn a programming language?&#xD;&#xA;&#xD;&#xA;How familiar are you with simple game dynamics?&#xD;&#xA;&#xD;&#xA;While mine have problems, you can take a look at what I've done in c++/SDL  &#xD;&#xA;&#xD;&#xA;[OLD](http://sourceforge.net/projects/ultiscroll/)  &#xD;&#xA;[NEW(er)](http://ifile.it/tn1ud07)  &#xD;&#xA;&#xD;&#xA;Maybe you would like to take a more in depth look, if you need more info, you can always email ultifinitus@gmail.com =)" />
  <row Id="20031" PostHistoryTypeId="2" PostId="9671" RevisionGUID="8030f8b0-458e-4b37-a943-2be7bf170a7b" CreationDate="2011-03-12T07:22:53.150" UserId="5957" Text="I think that the skills involved in flash game development are real enough - ActionScript is an imperative programming language like any other and the logic skills required are the same. The fact that flash has a very nice vector graphics editor as part of the framework means it's much easier to get things running on screen than in another language that has more choice about how to display graphics.&#xD;&#xA; &#xD;&#xA; Many great games have already been written in flash so why do some people think it's not 'proper' development? My take on it is cost: so many flash games are given away for free based on the perception that people won't pay for a game based in a browser. No matter if you and/or your team spent a week or a year developing the game, if you give it away there's a lot of people who will take that as meaning it is worthless.&#xD;&#xA;  &#xD;&#xA;This is an error of judgement on their part but unfortunately this is the way many people view the world, lacking the expertise to meaningful value judgements regarding things they do not fully understand.&#xD;&#xA;&#xD;&#xA; So, make good flash games and figure out how to make money out of them and people who don't understand what you do will start to respect you for it.&#xD;&#xA;&#xD;&#xA;I think its important that we don't undervalue the work we do." />
  <row Id="20032" PostHistoryTypeId="5" PostId="9671" RevisionGUID="345b859b-ed20-4927-ba3f-f767d0ee8dca" CreationDate="2011-03-12T07:41:33.680" UserId="5957" Comment="added 888 characters in body" Text="I think that the skills involved in flash game development are real enough - ActionScript is an imperative programming language like any other and the logic skills required are the same. The fact that flash has a very nice vector graphics editor as part of the framework means it's much easier to get things running on screen than in another language that has more choice about how to display graphics.&#xD;&#xA;  When you use flash (or Unity or whatever else) you are sacrificing control for ease of development. In truth, all developers do this whether internally or externally - not everybody is involved in writing the innards of the graphics engine or working out how to effectively parallelise code over heterogeneous processors.  Also, flash graphics are usually simpler for artists to create - they don't have to create complex maps for multiple levels of sub surface scattering or crank out zbrush for megabytes of normal maps. That said, making things look good with only gradients is also a  hard skill. Many flash games don't succeed in making things look good with gradients.&#xD;&#xA; &#xD;&#xA; Many great games have already been written in flash so why do some people think it's not 'proper' development? My take on it is cost: so many flash games are given away for free based on the perception that people won't pay for a game based in a browser. No matter if you and/or your team spent a week or a year developing the game, if you give it away there's a lot of people who will take that as meaning it is worthless.&#xD;&#xA;  &#xD;&#xA;This is an error of judgement on their part but unfortunately this is the way many people view the world, lacking the expertise to meaningful value judgements regarding things they do not fully understand.&#xD;&#xA;&#xD;&#xA; So, make good flash games and figure out how to make money out of them and people who don't understand what you do will start to respect you for it.&#xD;&#xA;&#xD;&#xA;I think its important that we don't undervalue the work we do - I would like to continue making money from creating games and then selling them to people who want to play them, rather than creating games and getting paid a pittance by an advertising agency (if I'm lucky)." />
  <row Id="20033" PostHistoryTypeId="2" PostId="9672" RevisionGUID="4a350981-444e-4ea4-9928-68a324ab6ecb" CreationDate="2011-03-12T07:51:36.760" UserId="5957" Text="3D textures or 'Volume textures' are a series of normal textures arranged as slices, like a deck of cards. These are used in volumetric rendering which often takes real work data such as CT scans and then manipulates them. In games and graphics it's sometimes for volumetric effects like smoke where you trade the flexibility of a particles system for the fixed cost and easy (and easily parallelisable) calculation of a volume texture. It's really easy in a volume texture to find the nearest neighbours but this can be a problem is a more traditional particle system made up of loose points.&#xD;&#xA;&#xD;&#xA;Also, some complex object benefit from using volume textures, such as grass:&#xD;&#xA;&#xD;&#xA;&lt;http://www.youtube.com/watch?v=iX2TylpqI7Q &gt;&#xD;&#xA;&#xD;&#xA;Nvidia's smoke in a box is a great example:&#xD;&#xA;&#xD;&#xA;&lt;http://www.youtube.com/watch?v=9AS4xV-CK14&gt;&#xD;&#xA;&#xD;&#xA;Also, rendering light scattering is easier when you have a volume to render through&#xD;&#xA;" />
  <row Id="20034" PostHistoryTypeId="2" PostId="9673" RevisionGUID="66ea1ffe-fae9-4c11-b80d-afab922dfc92" CreationDate="2011-03-12T07:55:05.057" UserId="5957" Text="I'd say C++ as it is a more general skill. UDK is written in C++ as are many game engines. Code your own little engine in C++ and you'll learn skills that are relevant everywhere. And then learn how to use the UDK as well." />
  <row Id="20035" PostHistoryTypeId="2" PostId="9674" RevisionGUID="616a6863-2fa9-46b9-98a7-2ed46d2ea7e6" CreationDate="2011-03-12T08:10:32.857" UserId="3794" Text="3D texture works like regular texture. But it is truly 3D. 2D textures has UV coords, 3D has UVW (you had to use them propably). Texture coords are unit cube (0 - 1, 0 - 1, 0 - 1).&#xD;&#xA;&#xD;&#xA;**Usage**:&#xD;&#xA;&#xD;&#xA;  - volumetric effects in games (fire, smoke, light rays, realistic fog)&#xD;&#xA;  - caching light for realtime globl illumination ([CryEngine][1] for example)&#xD;&#xA;  - scientific (MRI, CT scans are saved into volumes)&#xD;&#xA;&#xD;&#xA;**Performance**:  &#xD;&#xA;Same as regular texture - super fast (fastest memory acces in gpu). Cached for threads and optimized for the situation when near threads (pixel shaders) are looking for near values.&#xD;&#xA;&#xD;&#xA;Can be read as Point or used linear sampling (native tri-linear interpolation. Eq bi-linear interpolation in 2D texture).&#xD;&#xA;&#xD;&#xA;They are stored in memory like a array of 2D textures.&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=Pq39Xb7OdH8&#xD;&#xA;  [2]: http://i.stack.imgur.com/mLWdJ.png" />
  <row Id="20036" PostHistoryTypeId="5" PostId="9674" RevisionGUID="d4a37285-f12c-43ca-9cfb-f507d3ae7d12" CreationDate="2011-03-12T08:18:49.807" UserId="3794" Comment="added 29 characters in body" Text="3D texture works like regular texture. But it is truly 3D. 2D textures has UV coords, 3D has UVW (you had to use them propably). Texture coords are unit cube (0 - 1, 0 - 1, 0 - 1).&#xD;&#xA;&#xD;&#xA;**Usage**:&#xD;&#xA;&#xD;&#xA;  - volumetric effects in games (fire, smoke, light rays, realistic fog)&#xD;&#xA;  - caching light for realtime global illumination ([CryEngine][1] for example)&#xD;&#xA;  - scientific (MRI, CT scans are saved into volumes)&#xD;&#xA;&#xD;&#xA;**Performance**:  &#xD;&#xA;Same as regular texture - super fast (fastest memory access in gpu). Cached for threads and optimized for the situation when near threads (pixel shaders) are looking for near values.&#xD;&#xA;&#xD;&#xA;Can be read as point or used linear sampling (native tri-linear interpolation. Eq bi-linear interpolation in 2D texture).&#xD;&#xA;&#xD;&#xA;They are stored in memory like a array of 2D textures.&#xD;&#xA;  &#xD;&#xA;Mipmapping on 3D texture:  &#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=Pq39Xb7OdH8&#xD;&#xA;  [2]: http://i.stack.imgur.com/mLWdJ.png" />
  <row Id="20037" PostHistoryTypeId="25" PostId="9668" RevisionGUID="f1c0c9fa-0eca-4820-aeec-d04bf0cb9921" CreationDate="2011-03-12T08:23:27.713" Comment="http://twitter.com/#!/StackGameDev/status/46486448815341568" />
  <row Id="20038" PostHistoryTypeId="5" PostId="9671" RevisionGUID="78f122f1-7aaa-45e6-9816-4f703c3113e5" CreationDate="2011-03-12T08:34:35.833" UserId="5957" Comment="added 5 characters in body" Text="I think that the skills involved in flash game development are real enough - ActionScript is an imperative programming language like any other and the logic skills required are the same. The fact that flash has a very nice vector graphics editor as part of the framework means it's much easier to get things running on screen than in another language that has more choice about how to display graphics.&#xD;&#xA;  When you use flash (or Unity or whatever else) you are sacrificing control for ease of development. In truth, all developers do this whether internally or externally - not everybody is involved in writing the innards of the graphics engine or working out how to effectively parallelise code over heterogeneous processors.  Also, flash graphics are usually simpler for artists to create - they don't have to create complex maps for multiple levels of sub surface scattering or crank out zbrush for megabytes of normal maps. That said, making things look good with only gradients is also a  hard skill. Many flash games don't succeed in making things look good with gradients.&#xD;&#xA; &#xD;&#xA; Many great games have already been written in flash so why do some people think it's not 'proper' development? My take on it is cost: so many flash games are given away for free based on the perception that people won't pay for a game based in a browser. No matter if you and/or your team spent a week or a year developing the game, if you give it away there's a lot of people who will take that as meaning it is worthless.&#xD;&#xA;  &#xD;&#xA;This is an error of judgement on their part but unfortunately this is the way many people view the world, lacking the expertise to form meaningful value judgements regarding things they do not fully understand.&#xD;&#xA;&#xD;&#xA; So, make good flash games and figure out how to make money out of them and people who don't understand what you do will start to respect you for it.&#xD;&#xA;&#xD;&#xA;I think its important that we don't undervalue the work we do - I would like to continue making money from creating games and then selling them to people who want to play them, rather than creating games and getting paid a pittance by an advertising agency (if I'm lucky)." />
  <row Id="20039" PostHistoryTypeId="5" PostId="9654" RevisionGUID="3ff10fa2-c7f6-427c-9d27-151bb97d5f7a" CreationDate="2011-03-12T09:32:33.730" UserId="1156" Comment="added 9 characters in body; edited title" Text="Which would a game development company prefer? A developer with experience in UDK engine ? or,  a developer with projects made entirely in c++ with a graphics engine like Ogre3D?&#xD;&#xA;&#xD;&#xA;I think that a coder can demonstrate better his abilities with games made in c++, because it requires a knowledge deeper in many fields. However, currently there is a lot of companies that develop his games with UDK. Now I don't know if is better specialize in a game engine like UDK." />
  <row Id="20040" PostHistoryTypeId="4" PostId="9654" RevisionGUID="3ff10fa2-c7f6-427c-9d27-151bb97d5f7a" CreationDate="2011-03-12T09:32:33.730" UserId="1156" Comment="added 9 characters in body; edited title" Text="Which would a game development company prefer; UDK experience or C++ game projects?" />
  <row Id="20041" PostHistoryTypeId="2" PostId="9675" RevisionGUID="1ffad559-a460-4943-a54d-d09718bc4b1f" CreationDate="2011-03-12T10:20:47.333" UserId="6053" Text="I am starting some tests for building a game on the android program.&#xD;&#xA;So far everything is working and seems nice.&#xD;&#xA;&#xD;&#xA;However I do not understand how to make sure my game looks correct on all phones as the all will have slightly different screen ratios (and even very different on some odd phones)&#xD;&#xA; What I am doing right now is making a view frustrum ( could also be ortho ) which I set to go from -ratio to +ratio ( as I have seen on many examples) however this causes my test shape to be stretched and sometimes cut off by the edge of the screen. &#xD;&#xA;&#xD;&#xA;I am tilting my phone to landscape to do my tests ( a bit extreame)  but it should still render correctly if I have dome things right.&#xD;&#xA;&#xD;&#xA;Should I be scaling by some ratio before drawing or something?&#xD;&#xA;&#xD;&#xA;An example would be greatly apriciated&#xD;&#xA;&#xD;&#xA;PS&#xD;&#xA;I am doing a 2d game " />
  <row Id="20042" PostHistoryTypeId="1" PostId="9675" RevisionGUID="1ffad559-a460-4943-a54d-d09718bc4b1f" CreationDate="2011-03-12T10:20:47.333" UserId="6053" Text="building a game for different resoulution phones" />
  <row Id="20043" PostHistoryTypeId="3" PostId="9675" RevisionGUID="1ffad559-a460-4943-a54d-d09718bc4b1f" CreationDate="2011-03-12T10:20:47.333" UserId="6053" Text="&lt;math&gt;&lt;android&gt;&lt;opengl-es&gt;&lt;rendering&gt;&lt;resolution&gt;" />
  <row Id="20044" PostHistoryTypeId="2" PostId="9676" RevisionGUID="7f69e286-5b42-424e-8172-2ec72ea38382" CreationDate="2011-03-12T10:52:47.553" UserId="1199" Text="So what I did was that I made my `SpriteManager` derive from `DrawableGameComponent` and in the `LoadContent` of my `GameScreen` I add it to my game's components list with the `Game.Components.Add()` call and set its `Enable` and `Visible` settings like I want them. &#xD;&#xA;&#xD;&#xA;Then I handle the `Enable` &amp; `Visible` properties of my SpriteManager manually inside the `GameScreen` class so that if I bring up another screen I can turn the update or draw calls off. &#xD;&#xA;&#xD;&#xA;Like Leniency said, `DrawableGameComponents` are global and will continue to draw on top of everything, so it has to be taken care of manually. I don't know if this is a good way to go but it seems to work. &#xD;&#xA;&#xD;&#xA;I don't understand how I can make use of the `IUpdateable` and `IDrawable` interfaces.. " />
  <row Id="20045" PostHistoryTypeId="2" PostId="9677" RevisionGUID="100595e2-3222-4e1b-840e-0d0566423da9" CreationDate="2011-03-12T11:01:40.940" UserId="5275" Text="I've come across a problem with the collision detection code in the platformer starter kit for xna.It will send up the impassible flag on the x axis despite being nowhere near a wall in either direction on the x axis, could someone could tell me why this happens ? " />
  <row Id="20046" PostHistoryTypeId="1" PostId="9677" RevisionGUID="100595e2-3222-4e1b-840e-0d0566423da9" CreationDate="2011-03-12T11:01:40.940" UserId="5275" Text="x axis detection issues platformer starter kit" />
  <row Id="20047" PostHistoryTypeId="3" PostId="9677" RevisionGUID="100595e2-3222-4e1b-840e-0d0566423da9" CreationDate="2011-03-12T11:01:40.940" UserId="5275" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="20048" PostHistoryTypeId="2" PostId="9678" RevisionGUID="2570d2ef-6f26-471c-af08-e55fe66b39b6" CreationDate="2011-03-12T11:19:45.810" UserId="6054" Text="I'm not experienced in GameDev questions, but as a programmer. In the language Scala, you can have scalable multi-tasking with Actors, very stable, as I hear. You can even habe hundreds of thousands of them running at once without a problem.&#xD;&#xA;&#xD;&#xA;So I thought, maybe you can use these as a base class for 2D-Sprites, to break out of the game-loop thing that requires to go through all the sprites and move them. They'd basically move themselves, event-driven.&#xD;&#xA;&#xD;&#xA;Would that make sense for a game? Having it multitasked like that? After all, it will run on the JVM, though that should not be much of a problem nowadays." />
  <row Id="20049" PostHistoryTypeId="1" PostId="9678" RevisionGUID="2570d2ef-6f26-471c-af08-e55fe66b39b6" CreationDate="2011-03-12T11:19:45.810" UserId="6054" Text="Sprites as Actors" />
  <row Id="20050" PostHistoryTypeId="3" PostId="9678" RevisionGUID="2570d2ef-6f26-471c-af08-e55fe66b39b6" CreationDate="2011-03-12T11:19:45.810" UserId="6054" Text="&lt;java&gt;&lt;sprites&gt;&lt;multithreading&gt;" />
  <row Id="20051" PostHistoryTypeId="25" PostId="9675" RevisionGUID="ff0deb31-d07a-4095-953e-c3b61a27325d" CreationDate="2011-03-12T11:23:27.660" Comment="http://twitter.com/#!/StackGameDev/status/46531746774257665" />
  <row Id="20052" PostHistoryTypeId="5" PostId="9677" RevisionGUID="07b91511-3ec6-4d53-b3f1-f8b364432467" CreationDate="2011-03-12T11:43:44.867" UserId="5275" Comment="added 3626 characters in body; added 91 characters in body" Text="I've come across a problem with the collision detection code in the platformer starter kit for xna.It will send up the impassible flag on the x axis despite being nowhere near a wall in either direction on the x axis, could someone could tell me why this happens ? &#xD;&#xA;&#xD;&#xA;Here is the collision method.&#xD;&#xA;&#xD;&#xA;      /// &lt;summary&gt;&#xD;&#xA;        /// Detects and resolves all collisions between the player and his neighboring&#xD;&#xA;        /// tiles. When a collision is detected, the player is pushed away along one&#xD;&#xA;        /// axis to prevent overlapping. There is some special logic for the Y axis to&#xD;&#xA;        /// handle platforms which behave differently depending on direction of movement.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        private void HandleCollisions()&#xD;&#xA;        {&#xD;&#xA;            // Get the player's bounding rectangle and find neighboring tiles.&#xD;&#xA;            Rectangle bounds = BoundingRectangle;&#xD;&#xA;            int leftTile = (int)Math.Floor((float)bounds.Left / Tile.Width);&#xD;&#xA;            int rightTile = (int)Math.Ceiling(((float)bounds.Right / Tile.Width)) - 1;&#xD;&#xA;            int topTile = (int)Math.Floor((float)bounds.Top / Tile.Height);&#xD;&#xA;            int bottomTile = (int)Math.Ceiling(((float)bounds.Bottom / Tile.Height)) - 1;&#xD;&#xA;&#xD;&#xA;            // Reset flag to search for ground collision.&#xD;&#xA;            isOnGround = false;&#xD;&#xA;&#xD;&#xA;            // For each potentially colliding tile,&#xD;&#xA;            for (int y = topTile; y &lt;= bottomTile; ++y)&#xD;&#xA;            {&#xD;&#xA;                for (int x = leftTile; x &lt;= rightTile; ++x)&#xD;&#xA;                {&#xD;&#xA;                    // If this tile is collidable,&#xD;&#xA;                    TileCollision collision = Level.GetCollision(x, y);&#xD;&#xA;                    if (collision != TileCollision.Passable)&#xD;&#xA;                    {&#xD;&#xA;                        // Determine collision depth (with direction) and magnitude.&#xD;&#xA;                        Rectangle tileBounds = Level.GetBounds(x, y);&#xD;&#xA;                        Vector2 depth = RectangleExtensions.GetIntersectionDepth(bounds, tileBounds);&#xD;&#xA;                        if (depth != Vector2.Zero)&#xD;&#xA;                        {&#xD;&#xA;                            float absDepthX = Math.Abs(depth.X);&#xD;&#xA;                            float absDepthY = Math.Abs(depth.Y);&#xD;&#xA;&#xD;&#xA;                            // Resolve the collision along the shallow axis.&#xD;&#xA;                            if (absDepthY &lt; absDepthX || collision == TileCollision.Platform)&#xD;&#xA;                            {&#xD;&#xA;                                // If we crossed the top of a tile, we are on the ground.&#xD;&#xA;                                if (previousBottom &lt;= tileBounds.Top)&#xD;&#xA;                                    isOnGround = true;&#xD;&#xA;&#xD;&#xA;                                // Ignore platforms, unless we are on the ground.&#xD;&#xA;                                if (collision == TileCollision.Impassable || IsOnGround)&#xD;&#xA;                                {&#xD;&#xA;                                    // Resolve the collision along the Y axis.&#xD;&#xA;                                    Position = new Vector2(Position.X, Position.Y + depth.Y);&#xD;&#xA;&#xD;&#xA;                                    // Perform further collisions with the new bounds.&#xD;&#xA;                                    bounds = BoundingRectangle;&#xD;&#xA;                                }&#xD;&#xA;                            }&#xD;&#xA;                           //This is the section which deals with collision on the x-axis&#xD;&#xA;                            else if (collision == TileCollision.Impassable) // Ignore platforms.&#xD;&#xA;                            {&#xD;&#xA;                                // Resolve the collision along the X axis.&#xD;&#xA;                                Position = new Vector2(Position.X + depth.X, Position.Y);&#xD;&#xA;&#xD;&#xA;                                // Perform further collisions with the new bounds.&#xD;&#xA;                                bounds = BoundingRectangle;&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // Save the new bounds bottom.&#xD;&#xA;            previousBottom = bounds.Bottom;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20053" PostHistoryTypeId="2" PostId="9679" RevisionGUID="e6c8a335-261b-426d-ba95-50f10dc2a63e" CreationDate="2011-03-12T11:44:10.590" UserId="4215" Text="In short: &quot;Yes!&quot;&#xD;&#xA;&#xD;&#xA;In medium-length: &quot;Don't do that!&quot;&#xD;&#xA;&#xD;&#xA;In long form:&#xD;&#xA;&#xD;&#xA;There are at least several issues with legal ramifications that you should consider:&#xD;&#xA;&#xD;&#xA;- **[Unauthorised use of trademarked - or otherwise protected - names](http://en.wikipedia.org/wiki/Trademark_infringement)**: There are companies that sue for such use as a matter of principle, in order to protect their trademarks - in some countries they are actually required to do so, lest they set a precedent. While there *are* fair use clauses in the laws of most countries and you *may* win a court case, such companies can throw what - to most people - is unbelievable amounts of money to their lawyers and cause you *lots* of trouble just by suing. Can you compete with that?&#xD;&#xA;&#xD;&#xA;- **[Offensive use of their names](http://en.wikipedia.org/wiki/Defamation)**: The trademark law is usually more tight and companies prefer suing for trademark infringement, but should they chose so, they can also sue for offensive use of their names. For example, if in your game a character working in company X is routinely overworked and harassed by the superiors, the company might find grounds to sue for defamation.&#xD;&#xA;&#xD;&#xA;- **[Embedded advertising](http://en.wikipedia.org/wiki/Product_placement)**: In some countries you are not allowed to do anything that might be received as covert advertising, sometimes depending on the target group of your own product. For example, you may not be allowed to have *any* Real-Life products or companies in a game inteded for young children.&#xD;&#xA;&#xD;&#xA;That said, I am not a lawyer, and you should probably ask one with expertise on trademark and related issues for an answer with more weight.&#xD;&#xA;&#xD;&#xA;Or you could just avoid using such names in your game. Keep in mind that paraphrased names or photographic descriptions can also get you into trouble in some cases - for example having a software company named &quot;Minisoft&quot; and presided by &quot;Gill Bates&quot; is pretty obvious.&#xD;&#xA;" />
  <row Id="20054" PostHistoryTypeId="2" PostId="9680" RevisionGUID="33352cbd-f717-4c8f-bfc9-caa3d23743db" CreationDate="2011-03-12T11:54:13.353" UserId="6053" Text="I need to triangulated a polygon for rendering in opengl es on android ( no glu triangulation available)&#xD;&#xA; Is there an already known algorithm for this?  The polygon can be convex or concave (with no holes)&#xD;&#xA;&#xD;&#xA;Thanks, Jason " />
  <row Id="20055" PostHistoryTypeId="1" PostId="9680" RevisionGUID="33352cbd-f717-4c8f-bfc9-caa3d23743db" CreationDate="2011-03-12T11:54:13.353" UserId="6053" Text="polygon triangulation algorithm" />
  <row Id="20056" PostHistoryTypeId="3" PostId="9680" RevisionGUID="33352cbd-f717-4c8f-bfc9-caa3d23743db" CreationDate="2011-03-12T11:54:13.353" UserId="6053" Text="&lt;algorithm&gt;&lt;opengl-es&gt;&lt;rendering&gt;" />
  <row Id="20057" PostHistoryTypeId="2" PostId="9681" RevisionGUID="9ada5578-32d9-4c1e-9a59-4fe3283df626" CreationDate="2011-03-12T11:58:50.807" UserId="6040" Text="Of course flash game is proper game development.  If you are skilled and dedicated, it doesn't really *matter* what you use for developing your game, it is *still* proper game development.  Enough talent and hard work will even make developing a game based only on sticks and stones on a back yard to be proper game development.&#xD;&#xA;&#xD;&#xA;These kinds of discussions emerges in all kinds of areas and professions be it music, art, software development etc.  People defend the value of what they do (be it C++ game development) by trying to attach &quot;not proper&quot;, &quot;not real&quot;, &quot;not valuable&quot; to other things (be it flash game development) they feel is competing for attention, credebility and other kinds of rewards.&#xD;&#xA;&#xD;&#xA;Maybe I'm a cynical and oversimplify things but I think this kind of elitism is 1.) a resistance against large scale systematical changes in whatever industry you are part of and 2.) an attempt to maintain your own value in relative terms not by increasing the value of your own efforts but by decreasing the (perceived) value of other people's efforts.&#xD;&#xA;&#xD;&#xA;Maybe elitism in rare cases actually is a matter of really trying to preserve some sort of valuable knowledge and competence, but from my anectdotal experience this is seldom the case.  Elitism usually serves the purpose of protecting some person or group's interest at the expense of the larger community, as I see it. &#xD;&#xA;&#xD;&#xA;(Just compare it with the discussions some IT professionals had in the beginning of the 1990ies when they were worried by the fact that web browsers allowed people *without* &quot;proper&quot; IT skills to efficiently access information on the internet)" />
  <row Id="20058" PostHistoryTypeId="2" PostId="9682" RevisionGUID="e5e8496d-ba51-40f2-afbc-d5b62576d44a" CreationDate="2011-03-12T12:07:17.490" UserId="5957" Text="The ratio you're referring to is called the 'aspect ratio'. It is usually calculated as the&#xD;&#xA;'width / height' (although if you arranged your viewport differently that could be 'height / width')&#xD;&#xA;&#xD;&#xA;Remember to cast the divisor to a float! &#xD;&#xA;&#xD;&#xA;    float aspect_ratio = width / (float) height;&#xD;&#xA;&#xD;&#xA;HTH" />
  <row Id="20059" PostHistoryTypeId="5" PostId="9676" RevisionGUID="d884d777-4817-4fdc-bbd0-4662f7abf3d6" CreationDate="2011-03-12T12:17:54.923" UserId="1199" Comment="added 4 characters in body" Text="So what I did was that I made my `SpriteManager` derive from `DrawableGameComponent` and in the `LoadContent` of my `GameScreen` I add it to my game's components list with the `Game.Components.Add()` call and set its `Enable` and `Visible` settings like I want them. &#xD;&#xA;&#xD;&#xA;Then I handle the `Enable` &amp; `Visible` properties of my SpriteManager manually inside the `GameScreen` class so that if I bring up another screen I can turn the update or draw calls off. &#xD;&#xA;&#xD;&#xA;Like Leniency said, `DrawableGameComponents` are global and will continue to draw on top of everything, so it has to be taken care of manually. I don't know if this is a good way to go but it seems to work. &#xD;&#xA;&#xD;&#xA;Though, I don't understand how to make use of the `IUpdateable` and `IDrawable` interfaces. " />
  <row Id="20060" PostHistoryTypeId="2" PostId="9683" RevisionGUID="1b36e41d-3fa3-466a-bd9a-fc662f4fb392" CreationDate="2011-03-12T12:29:13.953" UserId="20" Text="There are several algorithms out there. One of the most commonly used algorithm is the [ear clipping algorithm][1]. Here's a [page][2] with some more detail about this triangulation algorithm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Polygon_triangulation#Ear_clipping_method&#xD;&#xA;  [2]: http://cgm.cs.mcgill.ca/~godfried/teaching/cg-projects/97/Ian/cutting_ears.html" />
  <row Id="20061" PostHistoryTypeId="5" PostId="9680" RevisionGUID="4c925168-a706-404a-92ee-20a5fd1a5cdf" CreationDate="2011-03-12T12:29:46.793" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I need to triangulated a polygon for rendering in opengl es on android ( no glu triangulation available)&#xD;&#xA; Is there an already known algorithm for this?  The polygon can be convex or concave (with no holes)&#xD;&#xA;" />
  <row Id="20062" PostHistoryTypeId="6" PostId="9680" RevisionGUID="4c925168-a706-404a-92ee-20a5fd1a5cdf" CreationDate="2011-03-12T12:29:46.793" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="&lt;algorithm&gt;&lt;opengl-es&gt;&lt;rendering&gt;&lt;triangles&gt;" />
  <row Id="20063" PostHistoryTypeId="2" PostId="9684" RevisionGUID="babfe25c-8ec7-4990-82b3-92f5d6894f9f" CreationDate="2011-03-12T13:30:11.797" UserId="6055" Text="So far i've been trying to make a RTS in pygame but, i feel like 2d is not enough and pygame has me do a lot of stuff that i would not like doing. What i would like doing is working on the AI gameplay and such and not worying too much about how to display stuff,physics and the like too much.&#xD;&#xA;&#xD;&#xA;So far Unity has boo which is supposed to be similar to python i wonder if that could work. How similar is it to python should i use this?&#xD;&#xA;Other options as far as i can see are ogre3d python bindings and UDK.&#xD;&#xA;&#xD;&#xA;Which would best suit my needs?" />
  <row Id="20064" PostHistoryTypeId="1" PostId="9684" RevisionGUID="babfe25c-8ec7-4990-82b3-92f5d6894f9f" CreationDate="2011-03-12T13:30:11.797" UserId="6055" Text="Help me choose an engine" />
  <row Id="20065" PostHistoryTypeId="3" PostId="9684" RevisionGUID="babfe25c-8ec7-4990-82b3-92f5d6894f9f" CreationDate="2011-03-12T13:30:11.797" UserId="6055" Text="&lt;engine&gt;&lt;python&gt;&lt;rts&gt;" />
  <row Id="20066" PostHistoryTypeId="2" PostId="9685" RevisionGUID="88931da6-1ec6-40c9-a083-815f10590fc1" CreationDate="2011-03-12T13:55:23.487" UserId="6032" Text="I've used ReplicaNet http://www.replicanet.com with three different iOS devices connected to the same game. You need to know how to have bindings to C++ but the source compiled without needing many changes for what I wanted. It seems to be the best performing library for mobile devices out there at the moment. It is also well worth talking to the ReplicaNet guys about an indie license if you're short of cash." />
  <row Id="20067" PostHistoryTypeId="2" PostId="9686" RevisionGUID="2418fe44-9084-4696-8f2e-9ca410b894a3" CreationDate="2011-03-12T14:21:58.130" UserId="1156" Text="It sounds like what you want is to just do the actual meat of your game. To use the smallest amount of boilerplate, I would use Unity.&#xD;&#xA;&#xD;&#xA;Boo seems a mixture of C# and Python, to me. It shouldn't be difficult to pick up (and there's always Javascript too).&#xD;&#xA;&#xD;&#xA;If you don't want to go to Unity or UDK or another editor-type program, there is this question [about RTS engines (though this is C++)][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7602/rts-engine-or-dota-like-game" />
  <row Id="20068" PostHistoryTypeId="2" PostId="9687" RevisionGUID="b5a54be3-b6f4-4f79-926f-e50dfe12de94" CreationDate="2011-03-12T14:23:17.180" UserId="2332" Text="First of all, if you don't want to worry about other aspects EXCEPT graphics (physics, etc), forget about using Ogre. It's a graphics engine, not a *game* engine.&#xD;&#xA;&#xD;&#xA;Unity has all of the aspects that you want already in there and can offer you a quick turnaround time.&#xD;&#xA;&#xD;&#xA;The UDK is a good one, but it does involve a bit more work to get up and running before you can focus on the AI and gameplay aspects.&#xD;&#xA;&#xD;&#xA;If your aim is to get something up and running in a very short amount of time, go for Unity. If you don't like Boo (which personally I have no experience in whatsoever), you can always use the C# and/or Javascript alternatives." />
  <row Id="20069" PostHistoryTypeId="25" PostId="9680" RevisionGUID="a9508fdd-7b07-4fda-96b3-7ad49648441e" CreationDate="2011-03-12T14:23:27.847" Comment="http://twitter.com/#!/StackGameDev/status/46577046243119104" />
  <row Id="20070" PostHistoryTypeId="2" PostId="9688" RevisionGUID="8eb9fad9-bb10-49ac-b392-222e373748f2" CreationDate="2011-03-12T15:24:23.667" UserId="4513" Text="To quote the best answer given on [StackOverflow by datenwolf.][1] &#xD;&#xA;&#xD;&#xA;&gt; 8MB of vertex data is quite a lot for a single model. I'm pretty sure this model could be split into individual meshes. Good places for splitting a mesh are sharp edges, since vertices along these edges have different normal vectors are thus not identical and cannot be shared.&#xD;&#xA;&#xD;&#xA;&gt; However more important than the VBO size is the size of the render batch passed to glDrawElements (or glDrawArrays). In my experience the optimal size for render batches are between 100 to 2000 triangles, before cache pressure kicks in. But you should measure that on your system yourself.&#xD;&#xA;&#xD;&#xA;&gt;In most OpenGL applications each distinct &quot;object&quot; visible has some between 100 to 3000 vertices. Complex models are broken down into parts. E.g. it makes little sense to send a complex character model as whole, since that would require all the skeletal and facial animation shaders to be processed on the whole mesh. At least in the games I contributed we've split characters into each leg, each arm and hands. The head portion is split into neck and back of the head; the whole facial area is a complete own mesh, but does not contain the eyes, jaw and tounge, those are animated separately&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5062625/multiple-vertex-buffers-per-mesh/5065195#5065195" />
  <row Id="20071" PostHistoryTypeId="2" PostId="9689" RevisionGUID="844d85a8-1869-41c7-8c9c-3945c718c30c" CreationDate="2011-03-12T15:36:57.457" UserId="5006" Text="From a high-level perspective there's only a handful of options, depending on which is more important, maintaining a consistent aspect ratio, or ensuring that no one to see more than someone else just because they have a wider or taller screen.&#xD;&#xA;&#xD;&#xA;Your options are:&#xD;&#xA;&#xD;&#xA;  1. Cropping the parts that don't fit.&#xD;&#xA;  2. Stretching the screen to fit, which has the issue you're seeing of stretched images.&#xD;&#xA;  3. &quot;[Letterboxing][1]&quot; which maintains both aspect ratio and ensures that no player sees more than any other player because of their screen size, &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Letterbox" />
  <row Id="20072" PostHistoryTypeId="2" PostId="9690" RevisionGUID="56918955-9c33-4b47-976f-a163e390a3aa" CreationDate="2011-03-12T15:53:38.030" UserId="6057" Text="see www.springrts.com, it is a good engine with a lot of games runing over it (that means a lot of examples), it is open source and written in C/C++ with LUA over it." />
  <row Id="20073" PostHistoryTypeId="5" PostId="9690" RevisionGUID="06fa2e08-b043-43a4-97c5-eeeaffa3180f" CreationDate="2011-03-12T15:54:38.080" UserId="1156" Comment="added 35 characters in body" Text="see [Spring RTS][1], it is a good engine with a lot of games runing over it (that means a lot of examples), it is open source and written in C/C++ with LUA over it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.springrts.com" />
  <row Id="20074" PostHistoryTypeId="25" PostId="9684" RevisionGUID="65983640-c83b-4d54-8656-191ac4795d7b" CreationDate="2011-03-12T17:23:28.020" Comment="http://twitter.com/#!/StackGameDev/status/46622345560981504" />
  <row Id="20075" PostHistoryTypeId="2" PostId="9691" RevisionGUID="315c4e74-ded5-42a4-9bbd-0231a61677d8" CreationDate="2011-03-12T18:10:21.540" UserId="6061" Text="Go on with Havok boy, it's the number one in the world if you want to blend ragdoll with animations, it's well documented, performing, and has so many features that a life is not enough for discovering them all.&#xD;&#xA;&#xD;&#xA;Regarding the license now it's totally free of charge on the PC platform, even for commercial projects.&#xD;&#xA;&#xD;&#xA;Of course we are talking only about havok physics and animation, because you would have to pay for cloth, ai, behavior, script and destruction." />
  <row Id="20076" PostHistoryTypeId="2" PostId="9692" RevisionGUID="ddf3c34d-59f4-4ae2-a656-e97a10f5646e" CreationDate="2011-03-12T18:10:52.180" UserId="6059" Text="Suppose I have a `SquareObject` class, which implements `IDrawable`, an interface which contains the method `void Draw()`. I want to separate drawing logic itself from the game core engine. &#xD;&#xA;&#xD;&#xA;My main idea is to create a static class which is responsible to dispatch actions to the graphic engine. &#xD;&#xA;&#xD;&#xA;    public static class DrawDispatcher&lt;T&gt;&#xD;&#xA;    {&#xD;&#xA;        private static Action&lt;T&gt; DrawAction = new Action&lt;T&gt;((ObjectToDraw)=&gt;{});&#xD;&#xA;        public static void SetDrawAction(Action&lt;T&gt; action)&#xD;&#xA;        {&#xD;&#xA;            DrawAction = action;&#xD;&#xA;        }&#xD;&#xA;        public static void Dispatch(this T Obj)&#xD;&#xA;        {&#xD;&#xA;            DrawAction(Obj);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public static class Extensions&#xD;&#xA;    {&#xD;&#xA;        public static void DispatchDraw&lt;T&gt;(this object Obj)&#xD;&#xA;        {&#xD;&#xA;            DrawDispatcher&lt;T&gt;.DispatchDraw((T)Obj);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then, on the core side:&#xD;&#xA;&#xD;&#xA;    public class SquareObject: GameObject, IDrawable&#xD;&#xA;    {&#xD;&#xA;        #region Interface&#xD;&#xA;        public void Draw()&#xD;&#xA;        {&#xD;&#xA;            this.DispatchDraw&lt;SquareObject&gt;();&#xD;&#xA;        }&#xD;&#xA;        #endregion&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And on the graphics side:&#xD;&#xA;&#xD;&#xA;    public static class SquareRender{&#xD;&#xA;        //stuff here&#xD;&#xA;        public static void Initialize(){&#xD;&#xA;            DrawDispatcher&lt;SquareObject&gt;.SetDrawAction((Square)=&gt;{//my square rendering logic});&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Do this &quot;pattern&quot; follow best practices?&#xD;&#xA;&#xD;&#xA;And a plus, I could easily change the render scheme of each object by changing the DispatchDraw parameter, as in:&#xD;&#xA;&#xD;&#xA;    public class SuperSquareObject: GameObject, IDrawable&#xD;&#xA;    {&#xD;&#xA;        #region Interface&#xD;&#xA;        public void Draw()&#xD;&#xA;        {&#xD;&#xA;            this.DispatchDraw&lt;SquareObject&gt;();&#xD;&#xA;        }&#xD;&#xA;        #endregion&#xD;&#xA;    }&#xD;&#xA;    public class RedSquareObject: GameObject, IDrawable&#xD;&#xA;    {&#xD;&#xA;        #region Interface&#xD;&#xA;        public void Draw()&#xD;&#xA;        {&#xD;&#xA;            this.DispatchDraw&lt;RedSquareObject&gt;();&#xD;&#xA;        }&#xD;&#xA;        #endregion&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`RedSquareObject` would have its own render method, but `SuperSquareObject` would render as a normal `SquareObject`&#xD;&#xA;&#xD;&#xA;I'm just asking because i do not want to reinvent the wheel, and there may be a design pattern similar (and better) to this that I may be not acknowledged of.&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="20077" PostHistoryTypeId="1" PostId="9692" RevisionGUID="ddf3c34d-59f4-4ae2-a656-e97a10f5646e" CreationDate="2011-03-12T18:10:52.180" UserId="6059" Text="Question about separating game core engine from game graphics engine..." />
  <row Id="20078" PostHistoryTypeId="3" PostId="9692" RevisionGUID="ddf3c34d-59f4-4ae2-a656-e97a10f5646e" CreationDate="2011-03-12T18:10:52.180" UserId="6059" Text="&lt;engine&gt;&lt;best-practices&gt;&lt;graphics-programming&gt;&lt;logic&gt;" />
  <row Id="20079" PostHistoryTypeId="2" PostId="9693" RevisionGUID="e321e52d-5d4b-4660-8c8d-19e52450ee7a" CreationDate="2011-03-12T19:05:57.473" UserId="6062" Text="I'm programming a 3D game (using C++ and OpenGL), and I have a few 3D objects in the scene, we can say they are boxes for this example. I want to let the player click on those boxes to select them (ie. they might change color) with the typical restriction like if more than one box is located where the user clicked, only the one closest to the camera would get selected.&#xD;&#xA;&#xD;&#xA;What would be the best way to do this? The fact that these objects go through several transforms before getting to window coordinates is what makes this a bit tricky.&#xD;&#xA;&#xD;&#xA;One approach I thought about was that if the player clicks on the screen, I could normalize the x,y coordinates of mouse click and then transform the bounding box coordinates of the objects into clip-space so that I could compare then to the normalized mouse coordinates. I guess I could then do some sort of ray-box collision test to see if any objects lie as the path of the mouse click. I'm afraid I might be over complicating it. Any better methods out there?" />
  <row Id="20080" PostHistoryTypeId="1" PostId="9693" RevisionGUID="e321e52d-5d4b-4660-8c8d-19e52450ee7a" CreationDate="2011-03-12T19:05:57.473" UserId="6062" Text="What's a good way to check that a player has clicked on an object in a 3D game?" />
  <row Id="20081" PostHistoryTypeId="3" PostId="9693" RevisionGUID="e321e52d-5d4b-4660-8c8d-19e52450ee7a" CreationDate="2011-03-12T19:05:57.473" UserId="6062" Text="&lt;c++&gt;&lt;3d&gt;&lt;input&gt;" />
  <row Id="20082" PostHistoryTypeId="2" PostId="9694" RevisionGUID="44d9bd33-042f-4e2b-8924-99b19c17f2bf" CreationDate="2011-03-12T19:10:03.317" UserId="4268" Text="Well, i'm not that much of a programmer either, but i don't see any problem on your proposal, i didn't even think in such way of developing actors.&#xD;&#xA;&#xD;&#xA;It may be quite of a challenge, since the IA has to be very accurate, to avoid unespected behavior, but besides that, i see it's quite a good proposal" />
  <row Id="20083" PostHistoryTypeId="2" PostId="9695" RevisionGUID="66685e99-32bd-49c9-9321-949a28421313" CreationDate="2011-03-12T19:11:27.760" UserId="962" Text="I don't think dispatching events is the best way to do this. If you have a high amount of draw calls the event dispatching and listeners.&#xD;&#xA;&#xD;&#xA;Also you might want to look what classes you have, because you don't need a class for each color of square, or even if there are more properties. You could be able to just store the color or other information in a variables on each instance instead of having a lot of classes for really similar objects.&#xD;&#xA;&#xD;&#xA;For the drawing, you can just set up either a static or non static function in the class that has the Update. So you will have an Update() and a Draw() method in one class. In the main game's Update method, call the Update() method on the instance(s) that need to be updated. Depending on your logic, if there is enough time left over, you then call the Draw() method. &#xD;&#xA;&#xD;&#xA;Make sure that the game doesn't require the Draw() method to run exactly at your refresh rate. If the game cannot keep up, it is best to skip Drawing for that frame, so the game will have more time to run the next step in the simulation." />
  <row Id="20084" PostHistoryTypeId="2" PostId="9696" RevisionGUID="09a2cfaa-1ba3-4f64-b4f0-1f66d8762bb3" CreationDate="2011-03-12T19:15:14.533" UserId="2710" Text="Unfortunately, I'm not aware of any (good) online resources or books on this topic. And I don't know Java. However, seeing that there are no answers yet, I'll share a few tips from personal experience.&#xD;&#xA;&#xD;&#xA;First off, you need a _fast and reliable_ RPC, or at least message queue, mechanism. This is what shall be used for both client-server and server-server communication. I don't know if there are any ready-made solutions for Java. With .NET we'd always made our own custom one, as this mechanism is really important. Most commonly a lightweight binary message protocol over TCP is used, but other options may be better depending on the type of game. A turn-based strategy might be better with XML or SOAP, and a fast-paced shooter may warrant UDP.&#xD;&#xA;&#xD;&#xA;The absolute minimum for messaging system is the ability to reliably invoke remote actions, _while guaranteeing their order_. A really helpful addition is support for request-answer pattern, where a remote action may return some kind of result to its initiator. This is not required, but can make your life much easier.&#xD;&#xA;&#xD;&#xA;Once you have your messaging, think about partitioning your server. Most probably, a single server machine will not be enough to host the game for all players. You need to carefully consider what tasks can be independent of each other, and thus can be delegated to different servers. Authentication and login is the most obvious candidate for this partitioning. Among others are statistic and rating calculations, database communication (a server to act a specialized DB cache). The problem with MMO games, as opposed to web apps, is that they tend to be highly stateful, with lots of data needed for each player. And most operations require access to all, or almost all, of this data.&#xD;&#xA;&#xD;&#xA;Even if you use a single server, you pretty much have to take advantage of multiple processors. Any MMO server is a highly concurrent program (our current server has about 30 concurrent threads). To have any hope of solving synchronization problems, you have to _isolate_ different threads. Like different servers, they'll have their own data, and will communicate using some kind of message-passing interface. Possibly even the same RPC that you network uses, if it's fast enough.&#xD;&#xA;&#xD;&#xA;Then you have your database. MMO players usually do a lot of things and generate a lot of chages to the game world, that have to be saved in the database. All the servers I worked with did not save these immediately - instead, changes were accumulated in memory and then saved in bulk every 5 minutes or so. This allows the game to progress more smoothly, at the cost of possible delay when writing takes place. This delay is the main reason to have a separate machine for database communication.&#xD;&#xA;&#xD;&#xA;Usually MMO games use relational databases as their data backend, but I believe that NoSQL databases might be better. Usually, you have a bunch of data in your DB for each character, load it all when said character logs in, and very rarely, if ever, do any complex queries. This mode of operation seems to be the forte of NoSQL. That said, I've yet to use a NoSQL DB with an actual MMO server, so I might be wrong here.&#xD;&#xA;&#xD;&#xA;Another database-related thing I want to warn you about is this. Many developers, especially early in production cycle, are tempted to store &quot;game-design&quot; data in a DB. I'm talking about things like items' and NPCs' parameters, abilities, and other stuff like that. Don't do that. These things are actually static data that does not change unless there's a server update; and this data is always needed by the server. Normally, you won't be doing any queries against it except a `SELECT * ...` at server startup. Thus, you don't actually need a database, and having these things in a DB has a lot of drawbacks. For one, you can't put a database under source control.&#xD;&#xA;&#xD;&#xA;These are three main components for a MMO server architecture: network communication, logic partitioning and database access. All logic using these three is probably very game-dependent. I might have some more advice if you ask more specific questions and tell us more about the game." />
  <row Id="20085" PostHistoryTypeId="2" PostId="9697" RevisionGUID="cf5c13dd-0819-47ba-9e5b-c1430c1ad6f4" CreationDate="2011-03-12T19:41:39.533" UserId="4662" Text="Usually, the mouse click co-ordinates are unprojected into world space, and then a ray intersection is performed. There are samples in the DirectX SDK but I wouldn't know where to find one for OGL." />
  <row Id="20086" PostHistoryTypeId="2" PostId="9698" RevisionGUID="0193c4e4-c655-46a3-af29-8ec3b935b0eb" CreationDate="2011-03-12T20:21:24.057" UserId="5275" Text="I changed &#xD;&#xA;&#xD;&#xA;if (absDepthY &lt; absDepthX || collision == TileCollision.Platform)&#xD;&#xA;&#xD;&#xA;to &#xD;&#xA;&#xD;&#xA;if (absDepthY &lt;= absDepthX || collision == TileCollision.Platform)" />
  <row Id="20087" PostHistoryTypeId="2" PostId="9699" RevisionGUID="05596090-2942-45b1-9fb1-c80df8316c57" CreationDate="2011-03-12T20:22:35.030" UserId="5957" Text="First off you need to convert your mouse coordinate to a ray (a position and direction vector combo).  This process is called 'un-projection' and the way I do it is to take the mouse x/y coordinate, convert it into screen space (-1 to +1 in both axes) by adding half the dimensions of the screen and then dividing by the screen dimensions and then construct two points (x, y, z, w):&#xD;&#xA;  p(xi, yi, 0, 1)&#xD;&#xA;  p1(xi, yi, 1, 1)&#xD;&#xA;&#xD;&#xA;where xi and yi are screen space coordinate points (-1 to +1 rather than 0 to 'pixel_size_of_display')&#xD;&#xA;now multiply these by the **inverse** of the projection matrix and then divide the x,y,z components by the final 'w' component that you get after the matrix multiplication, i.e:&#xD;&#xA;&#xD;&#xA;p.x = p.x / p.w;&#xD;&#xA;p.y = p.y / p.w;&#xD;&#xA;p.z = p.z / p.w;&#xD;&#xA;&#xD;&#xA;You should now have two points: p and p1. Your ray will be formed from the point 'p' and the normalized vector between 'p' and 'p1'.&#xD;&#xA;&#xD;&#xA;Finally, rotate the whole ray by the **inverse** of the **view** matrix and you have a ray that you can use to intersect with any primitive in the scene.&#xD;&#xA;&#xD;&#xA;Test that it works by drawing the ray and constructing a new view of the scene from a different angle - this is pretty essential if you're testing visibility or intersection code anyway.&#xD;&#xA;&#xD;&#xA; Next, Look up ray/sphere and ray/aabb intersection algorithms. I'd list ray/sphere here but this post is getting a bit long! Ray/Sphere intersections are quicker than ray/box intersections and generally I do a ray/sphere before final checking of a ray/box or ray/polygon mesh.&#xD;&#xA;" />
  <row Id="20088" PostHistoryTypeId="25" PostId="9693" RevisionGUID="cc08ca6e-d818-4a44-8269-b301eb317563" CreationDate="2011-03-12T20:23:27.687" Comment="http://twitter.com/#!/StackGameDev/status/46667642290970624" />
  <row Id="20089" PostHistoryTypeId="5" PostId="9650" RevisionGUID="d27d9796-e7f3-42f7-b8f1-ccadb6946877" CreationDate="2011-03-12T20:24:58.013" UserId="4296" Comment="Wall of code!; added 161 characters in body; added 1 characters in body" Text="DrawableGameComponent takes the Game object on instantiation and will try to add that object to your base game's list of drawable components - this isn't what you want as it will attempt to draw/update those entities regardless of what screen is active.  Screens should implement their own internal list of things to draw and update.&#xD;&#xA;&#xD;&#xA;DrawableGameComponent's are useful for global things like the screen manager and an input manager, not for something like a player or unit class.&#xD;&#xA;&#xD;&#xA;For screen specific entities, you'll want to implement your own, simplified version of DrawableGameComponent that doesn't rely on adding itself to the base game component list.&#xD;&#xA;&#xD;&#xA;In the XNA Framework are these two interfaces that may help:&#xD;&#xA;&#xD;&#xA;[IDrawable][1], [IUpdateable][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.idrawable_members.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.iupdateable_members.aspx&#xD;&#xA;&#xD;&#xA;Your own screen component classes would implement one or both of these then, and you might want to implement a collection manager to handle them.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Imagine each screen as an independent island.  As much as possible, a screen should be self-contained without requiring resources from another screen, but able to create new screens.  They can make use of some global resources, but shouldn't manipulate them (except removing themselves from the GameScreenManager).  Personally I'd give each and every screen their own SpriteManager as a GameScreenComponent.  The GameScreenComponents only ever update when the screen does.&#xD;&#xA;&#xD;&#xA;Wall of psuedo-ish code.  I stripped down the AppHub example - figured it would be easier to add things in as I need functionality rather than start with a giant codebase - easier to learn that way for me.&#xD;&#xA;&#xD;&#xA;    class MyGame : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        GameScreenManager _gameScreens;&#xD;&#xA;&#xD;&#xA;        // I make this static, seems easier?  Mine doesn't do much &#xD;&#xA;        // other than provide some helpers and shortcuts&#xD;&#xA;        static InputManager _input;     &#xD;&#xA;        public static InputManager Input { get { return _input } }&#xD;&#xA;&#xD;&#xA;        public void MyGame()&#xD;&#xA;        {&#xD;&#xA;            // ... graphics initialization ...&#xD;&#xA;            _gamescreens = new GameScreenManager();&#xD;&#xA;            _gameScreens.Push(new MenuScreen(_gameScreens, _graphicsDevice));&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameScreenManager : Microsoft.Xna.Framework.DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;        LinkedList&lt;GameScreen&gt; _screens;  // Not a 'stack', but we can use it as such&#xD;&#xA;&#xD;&#xA;        public void Push(GameScreen screen)&#xD;&#xA;        {&#xD;&#xA;            _screens.AddFirst(screen);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Pop(GameScreen screen)&#xD;&#xA;        {&#xD;&#xA;            _screens.RemoveFirst(screen);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // ... Update is the same as draw... just updating() ...&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Draw the stack of game states&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public override void Draw(GameTime time)&#xD;&#xA;        {&#xD;&#xA;            // Here we just draw the top node, then recursively step down while&#xD;&#xA;            // the screen is not BlockDraw.  This lets a screen hide or partially&#xD;&#xA;            // let anything below it display (ie, a PauseScreen only partially&#xD;&#xA;            // hides the GamePlayScreen&#xD;&#xA;            _Draw(_screens.First, time);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Recursively draw the game state stack&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        private void _Draw(LinkedListNode&lt;Screen&gt; node, GameTime time)&#xD;&#xA;        {&#xD;&#xA;            node.Value.Draw(time);&#xD;&#xA;                    &#xD;&#xA;            // Only draw the screen below if the current one is not blocking&#xD;&#xA;            if (!node.Value.BlockDraw)&#xD;&#xA;               _Draw(node.Next, time);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    abstract class Screen&#xD;&#xA;    {&#xD;&#xA;        // Game Screen Components (UnitManager, Lights, Sound, Player, etc...)&#xD;&#xA;        protected GameScreenComponentManager _components;&#xD;&#xA;&#xD;&#xA;        // Block updates to screens below.   Override in child classes if different&#xD;&#xA;        public virtual bool BlockUpdate { get { retrun true; } }&#xD;&#xA;&#xD;&#xA;        // Block draws to screens below.  Override in child classes if different&#xD;&#xA;        public virtual bool BlockDraw { get { retrun true; } }&#xD;&#xA;&#xD;&#xA;        // In the screen constructor create its own SpriteBatch, it's &#xD;&#xA;        // own SoundManager to handle playing sounds, it's own Player class, etc.&#xD;&#xA;        // In this way, levels get easier too - each level is it's own screen.&#xD;&#xA;        // OnLevelFinish just instantiates the next, pops the current from the manager,&#xD;&#xA;        // and pushes on the new one.&#xD;&#xA;        public Screen(GameScreenManager _screenManager, GraphicsDevice device, ...Other Dependancies...)&#xD;&#xA;        { }&#xD;&#xA;&#xD;&#xA;        public abstract void Initialize();&#xD;&#xA;        public abstract void Update(GameTime time);&#xD;&#xA;        public abstract void Draw(GameTime time);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So this is a simplified outline of the key parts.&#xD;&#xA;&#xD;&#xA;GameScreens can create and push new screens onto the stack, and also remove themselves.  Ie, then Menu Screen can push on a Settings Screen or a GamePlayScreen.&#xD;&#xA;&#xD;&#xA;As commented, screens manage their own resources and are passed the dependencies needed to create these resources (or, register some dependencies in the service locator and just pass that into each screen).  You can even create a new XNA ContentManager for each screen - leave one accessible back down in the Game for shared assets (but only a few).  That way, when a screen is removed, in it's Dispose it releases only that screen's loaded assets." />
  <row Id="20090" PostHistoryTypeId="6" PostId="9677" RevisionGUID="fa798f22-476d-4a84-ac28-09485411dfdf" CreationDate="2011-03-12T20:30:34.017" UserId="5818" Comment="Added collision tag" Text="&lt;xna&gt;&lt;c#&gt;&lt;collision-detection&gt;" />
  <row Id="20091" PostHistoryTypeId="24" PostId="9677" RevisionGUID="fa798f22-476d-4a84-ac28-09485411dfdf" CreationDate="2011-03-12T20:30:34.017" Comment="Proposed by 5818 approved by 14 edit id of 78" />
  <row Id="20092" PostHistoryTypeId="5" PostId="9650" RevisionGUID="3c995f27-46f1-4655-9778-74f9d7e16776" CreationDate="2011-03-12T20:33:44.027" UserId="4296" Comment="added 119 characters in body" Text="DrawableGameComponent takes the Game object on instantiation and will try to add that object to your base game's list of drawable components - this isn't what you want as it will attempt to draw/update those entities regardless of what screen is active.  Screens should implement their own internal list of things to draw and update.&#xD;&#xA;&#xD;&#xA;DrawableGameComponent's are useful for global things like the screen manager and an input manager, not for something like a player or unit class.&#xD;&#xA;&#xD;&#xA;For screen specific entities, you'll want to implement your own, simplified version of DrawableGameComponent that doesn't rely on adding itself to the base game component list.&#xD;&#xA;&#xD;&#xA;In the XNA Framework are these two interfaces that may help:&#xD;&#xA;&#xD;&#xA;[IDrawable][1], [IUpdateable][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.idrawable_members.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.iupdateable_members.aspx&#xD;&#xA;&#xD;&#xA;Your own screen component classes would implement one or both of these then, and you might want to implement a collection manager to handle them.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Imagine each screen as an independent island.  As much as possible, a screen should be self-contained without requiring resources from another screen, but able to create new screens.  They can make use of some global resources, but shouldn't manipulate them (except removing themselves from the GameScreenManager).  Personally I'd give each and every screen their own SpriteManager as a GameScreenComponent.  The GameScreenComponents only ever update when the screen does.&#xD;&#xA;&#xD;&#xA;Wall of psuedo-ish code.  I stripped down the AppHub example - figured it would be easier to add things in as I need functionality rather than start with a giant codebase - easier to learn that way for me.&#xD;&#xA;&#xD;&#xA;    class MyGame : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        GameScreenManager _gameScreens;&#xD;&#xA;&#xD;&#xA;        // I make this static, seems easier?  Mine doesn't do much &#xD;&#xA;        // other than provide some helpers and shortcuts&#xD;&#xA;        static InputManager _input;     &#xD;&#xA;        public static InputManager Input { get { return _input } }&#xD;&#xA;&#xD;&#xA;        public void MyGame()&#xD;&#xA;        {&#xD;&#xA;            // ... graphics initialization ...&#xD;&#xA;            _gamescreens = new GameScreenManager();&#xD;&#xA;            _gameScreens.Push(new MenuScreen(_gameScreens, _graphicsDevice));&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameScreenManager : Microsoft.Xna.Framework.DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;        LinkedList&lt;GameScreen&gt; _screens;  // Not a 'stack', but we can use it as such&#xD;&#xA;&#xD;&#xA;        public void Push(GameScreen screen)&#xD;&#xA;        {&#xD;&#xA;            _screens.AddFirst(screen);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Pop(GameScreen screen)&#xD;&#xA;        {&#xD;&#xA;            _screens.RemoveFirst(screen);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // ... Update is the same as draw... just updating() ...&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Draw the stack of game states&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public override void Draw(GameTime time)&#xD;&#xA;        {&#xD;&#xA;            // Here we just draw the top node, then recursively step down while&#xD;&#xA;            // the screen is not BlockDraw.  This lets a screen hide or partially&#xD;&#xA;            // let anything below it display (ie, a PauseScreen only partially&#xD;&#xA;            // hides the GamePlayScreen&#xD;&#xA;            _Draw(_screens.First, time);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Recursively draw the game state stack&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        private void _Draw(LinkedListNode&lt;Screen&gt; node, GameTime time)&#xD;&#xA;        {&#xD;&#xA;            node.Value.Draw(time);&#xD;&#xA;                    &#xD;&#xA;            // Only draw the screen below if the current one is not blocking&#xD;&#xA;            if (!node.Value.BlockDraw)&#xD;&#xA;               _Draw(node.Next, time);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    abstract class Screen&#xD;&#xA;    {&#xD;&#xA;        // Game Screen Components (UnitManager, Lights, Sound, Cameras, Player, etc...)&#xD;&#xA;        // These ones can implement IUpdateable and IDrawable, and the manager here&#xD;&#xA;        // handles that&#xD;&#xA;        protected GameScreenComponentManager _components;&#xD;&#xA;&#xD;&#xA;        // Block updates to screens below.   Override in child classes if different&#xD;&#xA;        public virtual bool BlockUpdate { get { retrun true; } }&#xD;&#xA;&#xD;&#xA;        // Block draws to screens below.  Override in child classes if different&#xD;&#xA;        public virtual bool BlockDraw { get { retrun true; } }&#xD;&#xA;&#xD;&#xA;        // In the screen constructor create its own SpriteBatch, it's &#xD;&#xA;        // own SoundManager to handle playing sounds, it's own Player class, etc.&#xD;&#xA;        // In this way, levels get easier too - each level is it's own screen.&#xD;&#xA;        // OnLevelFinish just instantiates the next, pops the current from the manager,&#xD;&#xA;        // and pushes on the new one.&#xD;&#xA;        public Screen(GameScreenManager _screenManager, GraphicsDevice device, ...Other Dependancies...)&#xD;&#xA;        { }&#xD;&#xA;&#xD;&#xA;        public abstract void Initialize();&#xD;&#xA;        public abstract void Update(GameTime time);&#xD;&#xA;        public abstract void Draw(GameTime time);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So this is a simplified outline of the key parts.&#xD;&#xA;&#xD;&#xA;GameScreens can create and push new screens onto the stack, and also remove themselves.  Ie, then Menu Screen can push on a Settings Screen or a GamePlayScreen.&#xD;&#xA;&#xD;&#xA;As commented, screens manage their own resources and are passed the dependencies needed to create these resources (or, register some dependencies in the service locator and just pass that into each screen).  You can even create a new XNA ContentManager for each screen - leave one accessible back down in the Game for shared assets (but only a few).  That way, when a screen is removed, in it's Dispose it releases only that screen's loaded assets." />
  <row Id="20093" PostHistoryTypeId="2" PostId="9700" RevisionGUID="822be27f-604d-4eb1-aa0d-d71da4d79903" CreationDate="2011-03-12T21:16:18.967" UserId="5685" Text="Depends if you need this to be 100% accurate or not. If you want perfect accuracy then you have two answers already. However, if you want it fast and simple but less accurate you can project each object's bounding box on the screen and check if the mouse click is within it. Object's distance from the camera will be the third component of a projected vertex. You can perform the usual optimisations and this method is essentially free if you're already drawing some sort of selection box around objects your camera points at." />
  <row Id="20094" PostHistoryTypeId="2" PostId="9701" RevisionGUID="5ec2f642-699d-4cff-b8ee-065918211f7e" CreationDate="2011-03-12T21:19:56.247" UserId="6053" Text="I was  just wondering after noticing that moblox was.built with irrlicht if there is an android port of it?  Or did the dev make his own port from scratch?&#xD;&#xA;&#xD;&#xA;From my research I noticed a port project on github but it seems far from ready.-" />
  <row Id="20095" PostHistoryTypeId="1" PostId="9701" RevisionGUID="5ec2f642-699d-4cff-b8ee-065918211f7e" CreationDate="2011-03-12T21:19:56.247" UserId="6053" Text="irrlicht for android" />
  <row Id="20096" PostHistoryTypeId="3" PostId="9701" RevisionGUID="5ec2f642-699d-4cff-b8ee-065918211f7e" CreationDate="2011-03-12T21:19:56.247" UserId="6053" Text="&lt;engine&gt;&lt;android&gt;&lt;opengl-es&gt;&lt;3d-engines&gt;" />
  <row Id="20097" PostHistoryTypeId="2" PostId="9702" RevisionGUID="fa3a9f98-ab3d-4ba0-aa7d-2ffa80ea4302" CreationDate="2011-03-12T21:34:31.977" UserId="3656" Text="That's a cool approach to thinking about updating your game objects. I don't know Scala, but I say give it a shot and see how it turns out, and even better post your results!&#xD;&#xA;&#xD;&#xA;The main questions that spring to my mind are: How do you manage how frequently some game objects update versus others? Will you need to worry about the sprite actors taking up too many cycles such that rendering system doesn't have time to draw a frame every 1/60th|30th|24th of a second?&#xD;&#xA;&#xD;&#xA;Another thing to consider is how this will affect resolution of player vs. AI interactions that rely on the order of a sequence of very quick events. Depending on the type of game, this &lt;strike&gt;may not&lt;/strike&gt; probably won't matter much." />
  <row Id="20099" PostHistoryTypeId="2" PostId="9704" RevisionGUID="aded3000-248d-4b0c-98f2-0bc1525d7606" CreationDate="2011-03-12T22:01:13.280" UserId="4360" Text="Currently I am working on a project in which I generate geometry based on the players movement. A glorified very long trail, composed of quads.&#xD;&#xA;&#xD;&#xA;I am doing this by storing a STD::Vector, and removing the oldest verticies once enough exist, and then calling glDrawArrays.&#xD;&#xA;&#xD;&#xA;I am interested in switching to a shader based model, usually examples I see the VBO is generated at start and then that's basically it. What is the best route to go about creating geometry in real time, using shader / VBO approach" />
  <row Id="20100" PostHistoryTypeId="1" PostId="9704" RevisionGUID="aded3000-248d-4b0c-98f2-0bc1525d7606" CreationDate="2011-03-12T22:01:13.280" UserId="4360" Text="Generating geometry when using VBO" />
  <row Id="20101" PostHistoryTypeId="3" PostId="9704" RevisionGUID="aded3000-248d-4b0c-98f2-0bc1525d7606" CreationDate="2011-03-12T22:01:13.280" UserId="4360" Text="&lt;opengl&gt;&lt;geometry&gt;&lt;vertex-arrays&gt;" />
  <row Id="20102" PostHistoryTypeId="2" PostId="9705" RevisionGUID="7ef65451-b0b8-411d-9cca-41b4c639b9e3" CreationDate="2011-03-12T22:31:04.130" UserId="2998" Text="I need a way to draw resolution independent text in my game. That is, I need to be able to zoom in on text and never see pixel artifacts.&#xD;&#xA;&#xD;&#xA;Can anyone make any suggestions on how I could go about it?" />
  <row Id="20103" PostHistoryTypeId="1" PostId="9705" RevisionGUID="7ef65451-b0b8-411d-9cca-41b4c639b9e3" CreationDate="2011-03-12T22:31:04.130" UserId="2998" Text="Rendering Resolution Independent Text" />
  <row Id="20104" PostHistoryTypeId="3" PostId="9705" RevisionGUID="7ef65451-b0b8-411d-9cca-41b4c639b9e3" CreationDate="2011-03-12T22:31:04.130" UserId="2998" Text="&lt;xna&gt;&lt;2d&gt;&lt;3d&gt;&lt;text&gt;" />
  <row Id="20105" PostHistoryTypeId="25" PostId="9705" RevisionGUID="e32d0eae-842c-4cc6-b19d-4581d73cf447" CreationDate="2011-03-12T23:23:27.780" Comment="http://twitter.com/#!/StackGameDev/status/46712940933550080" />
  <row Id="20106" PostHistoryTypeId="2" PostId="9706" RevisionGUID="a4821331-7e90-487f-a84c-2466b222ac80" CreationDate="2011-03-13T00:15:27.023" UserId="1101" Text="The best practice for separating the game logic from game rendering is to have separate objects for the logic and the renderable, instead of having one large object that performs both tasks. The renderable object has a reference to the logic object so that it can update its state (eg. animations, positions).&#xD;&#xA;&#xD;&#xA;Once you make that separation, most of these issues above disappear, and you don't have to worry about complicated observer patterns or event dispatch." />
  <row Id="20107" PostHistoryTypeId="2" PostId="9707" RevisionGUID="4ceaea31-a9b3-4848-9eaa-29e19d5cdf7f" CreationDate="2011-03-13T01:24:02.590" UserId="5824" Text="You'll need to build your font characters out of a combination of curves and lines, which you then convert to geometry with a suitable level of detail at runtime.&#xD;&#xA;&#xD;&#xA;Fortunately most fonts are already built from bezier curves. To get the curve data you just need to use the standard Windows [GetGlyphOutline()][1] function to extract them.&#xD;&#xA;&#xD;&#xA;I'm not sure if you can get that curve data from C# without PInvoke.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd144891%28v=vs.85%29.aspx" />
  <row Id="20108" PostHistoryTypeId="25" PostId="9692" RevisionGUID="c12e188d-3401-4c53-b8fb-0d910a9f9c1c" CreationDate="2011-03-13T02:23:27.767" Comment="http://twitter.com/#!/StackGameDev/status/46758239894900736" />
  <row Id="20109" PostHistoryTypeId="5" PostId="9659" RevisionGUID="5a72407b-552a-440d-b92d-084b05a1eb9c" CreationDate="2011-03-13T02:40:51.650" UserId="14" Comment="added 924 characters in body" Text="Yes, I know, the best way to make an indie game is to learn to code. I've got some scripting experience, but I want to do worldbuilding with already-existing tools (and communities surrounding those tools), and I've been really impressed with games like An Untitled Story that were made with pre-packaged toolsets at their core, like Game Maker. :)&#xD;&#xA;&#xD;&#xA;So I'm planning to make my game using either Game Maker or something like it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The basic parameters of my planned game:&#xD;&#xA;&#xD;&#xA;-2D platformer.&#xD;&#xA;-Physics/speed akin to Sonic the Hedgehog.&#xD;&#xA;-Large, non-linear world, flowing as seamlessly as possible -- think Super Metroid, but without the forced screen transitions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first two points have me leaning toward Game Maker -- Plenty of 2D platformers have been made with it, and there are serviceable, openly available Sonic-the-Hedgehog-style physics engines for it that could be adapted to my needs with minimal muss and fuss.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But the third makes me antsy -- from what limited information I hear, Game Maker has problems with large levels/boards/screens/whateveryoucallthem, thus necessitating transitions between screens.&#xD;&#xA;&#xD;&#xA;I want to avoid that if at all possible -- it would, I believe, fundamentally alter the flow of the game.  I understand that generally speaking, the more you have loaded into memory the more things are going to chug (especially for a one-size-fits-all game development platform that isn't a model of efficient coding), but I'm hoping there are systems that can un-load objects that are sufficiently far offscreen and thus better produce seamlessness.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any thoughts, people? :)  The sooner I can get a basic pre-fab physics engine and world-building program up and running, the sooner I can start prototyping areas and generally tooling around.  Should I be looking at Game Maker, or elsewhere?&#xD;&#xA;&#xD;&#xA;(My current plan is to more-or-less build the game prototype-style, then worry about art and sound at the very end once the damn thing is playable.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT/RESPONSE**&#xD;&#xA;&#xD;&#xA;To ultifinitus: I might pick up C# for a separate project.&#xD;&#xA;&#xD;&#xA;I'm familiar with game dynamics and game design from past projects (Projects that used OOP scripting languages).&#xD;&#xA;&#xD;&#xA;The amount of work I'm willing to put into my project is directly proportional to what I can do with what's already out there.&#xD;&#xA;&#xD;&#xA;This is where a system like Game Maker appeals to me. :) I've then got the level editor, the physics, etc. all more-or-less taken care of, and the software has a giant enthusiast community that provides various modules, advice, etc.&#xD;&#xA;&#xD;&#xA;If I can get most of my game done that way, then once I've got a functional prototype I can happily shell out the cash to pay artists to make the game actually look like something worth a damn.&#xD;&#xA;&#xD;&#xA;This is why I'm looking for something like Game Maker. I'm just wondering if Game Maker (or another such system) is the most suitable for what I want to do." />
  <row Id="20111" PostHistoryTypeId="2" PostId="9708" RevisionGUID="aeacdde2-132f-47aa-b23c-27732e91e47b" CreationDate="2011-03-13T03:41:43.820" UserId="6067" Text="Is there one resource that tracks and lists games in development, similar to what IMDb Pro does for films in development? MobyGames is good for post-mortem, who did what, but what about a resource that gives you intel on what games are in production?" />
  <row Id="20112" PostHistoryTypeId="1" PostId="9708" RevisionGUID="aeacdde2-132f-47aa-b23c-27732e91e47b" CreationDate="2011-03-13T03:41:43.820" UserId="6067" Text="A game community equivalent to IMDb Pro?" />
  <row Id="20113" PostHistoryTypeId="3" PostId="9708" RevisionGUID="aeacdde2-132f-47aa-b23c-27732e91e47b" CreationDate="2011-03-13T03:41:43.820" UserId="6067" Text="&lt;music&gt;&lt;publishing&gt;&lt;intellectual-property&gt;" />
  <row Id="20114" PostHistoryTypeId="2" PostId="9709" RevisionGUID="20598c88-92cb-42ff-b6c9-ced90f18fca2" CreationDate="2011-03-13T04:11:02.880" UserId="14" Text="While I doubt you will find anything that lists games that are in production stages. (The Industry usually remains a bit more tight-lipped about such things than the film industry does)&#xD;&#xA;&#xD;&#xA;The rest of what you are looking for is handled relatively nicely by [MobyGames](http://www.mobygames.com/)&#xD;&#xA;&#xD;&#xA;EDIT: Almost forgot, [GiantBomb](http://www.giantbomb.com) Also has the same sort of Data." />
  <row Id="20115" PostHistoryTypeId="2" PostId="9710" RevisionGUID="0f38edec-9cf7-44c0-9d6d-3f5266df87b6" CreationDate="2011-03-13T04:51:10.357" UserId="1929" Text="I've been writing games for around 10 years now (from QBasic to C# and everything in-between). I need to start stretching my skills into different areas. **What are other, surprising topics I should read up on?**&#xD;&#xA;&#xD;&#xA;Expected topics would include the usual suspects:&#xD;&#xA;&#xD;&#xA; - Programming language of your choice&#xD;&#xA; - Scripting language&#xD;&#xA; - Source control&#xD;&#xA; - Project management (or Agile)&#xD;&#xA; - Graphics API&#xD;&#xA; - Maybe some AI (A* path-finding?)&#xD;&#xA; - Physics (projectile physics)&#xD;&#xA; - Unit testing (automated testing)&#xD;&#xA;&#xD;&#xA;I'm looking for more *esoteric* topics; things that you don't expect to need to know, but if you *do* know them, they make a difference. This could include things like:&#xD;&#xA;&#xD;&#xA; - Art skills (drawing, lighting, colouring, layout, etc.)&#xD;&#xA; - Natural language processing&#xD;&#xA; - The physics of sound (sound-waves, doppler effect, etc.) &#xD;&#xA;&#xD;&#xA;Personally, I feel that having technical art skills (eg. can make decent art-work if you can only come up with ideas; or, following Photoshop/GIMP tutorials) was the most beneficial for me.&#xD;&#xA;&#xD;&#xA;This is *not intended to be an open-ended question*; I'm looking for specific skills that helped you and you expect will continue to benefit you in the short- and long-term." />
  <row Id="20116" PostHistoryTypeId="1" PostId="9710" RevisionGUID="0f38edec-9cf7-44c0-9d6d-3f5266df87b6" CreationDate="2011-03-13T04:51:10.357" UserId="1929" Text="Non-Obvious Topics to Learn for Game Development" />
  <row Id="20117" PostHistoryTypeId="3" PostId="9710" RevisionGUID="0f38edec-9cf7-44c0-9d6d-3f5266df87b6" CreationDate="2011-03-13T04:51:10.357" UserId="1929" Text="&lt;learning&gt;" />
  <row Id="20118" PostHistoryTypeId="25" PostId="9710" RevisionGUID="02910c06-d011-4569-b2bd-6b1d86104f9f" CreationDate="2011-03-13T05:23:27.800" Comment="http://twitter.com/#!/StackGameDev/status/46803537279205376" />
  <row Id="20119" PostHistoryTypeId="2" PostId="9711" RevisionGUID="3a32b842-78f5-4d56-a522-029fcdb89974" CreationDate="2011-03-13T06:20:57.860" UserId="395" Text="Having a firm grasp of world mythology and religious iconography is always good for game design. HCI and other bits of human factors psych are important just about everywhere. Being able to think like an engineer and deconstruct complex systems into smaller units is useful not just as a programmer, but also when trying to see how other games are built. Game developers tend to be a very diverse bunch, so almost any field of expertise can be used to make better games." />
  <row Id="20120" PostHistoryTypeId="2" PostId="9712" RevisionGUID="4a33244e-5ed0-45a7-9074-d7dcf0c5825b" CreationDate="2011-03-13T06:29:03.377" UserId="4296" Text="**Story Telling** - people and critics always say story is important in games.  It's often added as an addendum to a list of things your game should have, but actually implementing a compelling narrative in a game is hard.  Games narratives get put into the context of literature or movies often, yet they fundamentally function differently and there is a lot of interesting discussion around about how to even talk about game narrative on its own terms.  This gets even more abstract for games that don't use 'characters' or are basically an assembly of mechanics.&#xD;&#xA;&#xD;&#xA;Given all that, literary and film analysis can be useful to be able to phrase intent.&#xD;&#xA;&#xD;&#xA;**Marketing** - so you've actually finished a game (haha, as if).  Now what?  We hear about Minecraft or Angry Birds, but the business side of actually promoting and distributing our game is, for many of us, a giant black box.  XNA? Sure, put it on XBLIG, but what else can be done to promote it?&#xD;&#xA;&#xD;&#xA;**Psychiatry** - Specifically, how do we learn?  How can you teach game mechanics through game play so that people aren't totally lost by your esoteric opus on time manipulation?&#xD;&#xA;&#xD;&#xA;**Graphic Design** - Sure we all know that using Papyrus or Comic Sans is bad, but creating a well designed menus system or UI requires skill.  This is only partially a subset of art skills, not necessarily an complete subset - some people can be good designers without being able to draw well.&#xD;&#xA;" />
  <row Id="20121" PostHistoryTypeId="5" PostId="9695" RevisionGUID="c477aef0-90d5-4472-ba06-59b4fc2cca7e" CreationDate="2011-03-13T07:47:48.617" UserId="962" Comment="added 28 characters in body" Text="I don't think dispatching events is the best way to do this. If you have a high amount of draw calls the event dispatching and listeners will have a lot of overhead.&#xD;&#xA;&#xD;&#xA;Also you might want to look what classes you have, because you don't need a class for each color of square, or even if there are more properties. You could be able to just store the color or other information in a variables on each instance instead of having a lot of classes for really similar objects.&#xD;&#xA;&#xD;&#xA;For the drawing, you can just set up either a static or non static function in the class that has the Update. So you will have an Update() and a Draw() method in one class. In the main game's Update method, call the Update() method on the instance(s) that need to be updated. Depending on your logic, if there is enough time left over, you then call the Draw() method. &#xD;&#xA;&#xD;&#xA;Make sure that the game doesn't require the Draw() method to run exactly at your refresh rate. If the game cannot keep up, it is best to skip Drawing for that frame, so the game will have more time to run the next step in the simulation." />
  <row Id="20122" PostHistoryTypeId="25" PostId="9678" RevisionGUID="02fcd0aa-a9fc-4849-a9c4-7fc87c597238" CreationDate="2011-03-13T08:23:27.833" Comment="http://twitter.com/#!/StackGameDev/status/46848837029076992" />
  <row Id="20123" PostHistoryTypeId="2" PostId="9713" RevisionGUID="99d32eed-6456-45be-b67f-d25ef7d2ae68" CreationDate="2011-03-13T08:49:50.023" UserId="5957" Text="You might want to take a look at freetype. I've no idea if it's available on your platform or if the licence is applicable but it's a rather excellent open source library for rendering true-type and other vector fonts. &#xD;&#xA;  I believe they had to do some clever lawyer dodging code in order to get fonts to render in an aesthetically pleasing way. The true type way involves byte codes on curves to provide hints to the renderer so that important font features (such as verticals and serifs) don't get blurred away as they would using standard naive anti-aliasing. That technique has a patent on it so the freetype people had to come up with something else that did the job and didn't invoke the terrible lawyer-beast of (I think) Apple.&#xD;&#xA;  Anyway, pogramming legal aside aside, try looking into freetype &lt;http://freetype.sourceforge.net/index2.html&gt;" />
  <row Id="20124" PostHistoryTypeId="2" PostId="9714" RevisionGUID="2cb5f8e3-1ae9-4b7d-a278-c35d4321adae" CreationDate="2011-03-13T09:20:54.167" UserId="5919" Text="Today I am trying to make it so if I hit the enemy then the enemy well be knocked backwards in the direction the sprite is facing. I am rotating the sprite around 360 degrees using a joystick on the screen and wanted to know the best practice or ways to accomplish this.  I have come up with a few ideas but none of them make use of the sprites angle he is facing just a check to see if I hit the bottom then move him upward and so forth. I am just stumped on how to apply the sprites angle to the enemies x and y coordinate and move him accordingly.     Has anyone tried this and have suggestions or things to look for? &#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20125" PostHistoryTypeId="1" PostId="9714" RevisionGUID="2cb5f8e3-1ae9-4b7d-a278-c35d4321adae" CreationDate="2011-03-13T09:20:54.167" UserId="5919" Text="Knockback enemy based off of direction sprite is facing" />
  <row Id="20126" PostHistoryTypeId="3" PostId="9714" RevisionGUID="2cb5f8e3-1ae9-4b7d-a278-c35d4321adae" CreationDate="2011-03-13T09:20:54.167" UserId="5919" Text="&lt;android&gt;" />
  <row Id="20127" PostHistoryTypeId="2" PostId="9715" RevisionGUID="6c6a7912-2043-4ad5-9008-0cd3251ec7fb" CreationDate="2011-03-13T09:47:07.370" UserId="721" Text="I'm a developper of [Iopixel][1] (formely Ellismarkov). For moblox, we use my own port of [Irrlicht for Android][2] for code base but we rewrite parts of Irrlicht for better performance and better iOS/Android compatibility:&#xD;&#xA;&#xD;&#xA; - OpenGL ES Save/Load contexts&#xD;&#xA; - Texture management&#xD;&#xA; - many changes in driver API with two drivers&#xD;&#xA;   - OpenGL 3.x for Desktop (used for tests)&#xD;&#xA;   - OpenGL ES 2.x (Android, iOS)&#xD;&#xA;&#xD;&#xA;I tried to backport modifications but it is now two distincts Pipeline.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iopixel.com&#xD;&#xA;  [2]: http://gitorious.org/irrlichtandroid/irrlichtandroid" />
  <row Id="20128" PostHistoryTypeId="5" PostId="9715" RevisionGUID="9c11ae03-ef3e-4625-a1ad-a83ebeb292dd" CreationDate="2011-03-13T09:54:02.280" UserId="721" Comment="added 219 characters in body" Text="I'm a developper of [Iopixel][1] (formely Ellismarkov). For moblox, we use my own port of [Irrlicht for Android][2] for code base but we rewrite parts of Irrlicht for better performance and better iOS/Android compatibility:&#xD;&#xA;&#xD;&#xA; - OpenGL ES Save/Load contexts&#xD;&#xA; - Texture management&#xD;&#xA; - many changes in driver API with two drivers&#xD;&#xA;   - OpenGL 3.x for Desktop (used for tests)&#xD;&#xA;   - OpenGL ES 2.x (Android, iOS)&#xD;&#xA;&#xD;&#xA;I tried to backport modifications but it is now two distincts Pipelines. My port of Irrlicht is not complete but usable. Other developers have used it on market.&#xD;&#xA;&#xD;&#xA;As i said to Irrlicht developers, it will be better to use NativeActivity for an official port (available with 2.3 devices). &#xD;&#xA;&#xD;&#xA;  [1]: http://www.iopixel.com&#xD;&#xA;  [2]: http://gitorious.org/irrlichtandroid/irrlichtandroid" />
  <row Id="20129" PostHistoryTypeId="2" PostId="9716" RevisionGUID="f3e40f06-78cb-460a-b263-cd440e6520db" CreationDate="2011-03-13T09:57:59.470" UserId="744" Text="There's three common ways to do it. It's not really about eliminating artifacts entirely - which is impossible, unless you have unlimited memory or processor time - but rather how to minimize them in a way that fits with your existing code and target platforms.&#xD;&#xA;&#xD;&#xA;First, just use your font rasterizer - usually FreeType - to rasterize the font at the size you want as you zoom in. This will look great in screenshots, but it is incredibly slow. You can solve the slowness by caching sizes, but then it becomes incredibly memory-hungry. It also does not look great in motion, because making glyphs look good for static display requires scaling them non-uniformly. Still, it's an option if you are on a platform with enough memory (like a PC) and your scales are bounded to some small range, like 10px to 30px. This method also does not admit a lot of eye-candy by itself.&#xD;&#xA;&#xD;&#xA;Second, you can store your text as a mesh. Some libraries exist to do this, &lt;a href=&quot;http://gltt.sourceforge.net/&quot;&gt;like GLTT&lt;/a&gt;, or you could write your own. Now you no longer have pixel artifacts, but you will have polygonal artifacts if you zoom in very close - just like any other mesh in a 3D game. Mesh text admits a lot of eye candy since vertex shaders can be applied and the mesh can be interleaved with any other world drawing you do. It is reasonably light on memory and CPU, and easy to measure the cost of since it's just a standard mesh. It can be a pain to integrate into a normal sprite-based 2D rendering pipeline.&#xD;&#xA;&#xD;&#xA;Third, you can use &lt;a href=&quot;http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf&quot;&gt;distance fields in combination with a pixel shader&lt;/a&gt;. This is a relatively new technique that is currently popular, using simple shader to sample a premade texture and the &quot;free&quot; bilinear filtering on your video card to scale up glyphs cleanly. It uses little and easily-predictable memory compared to other methods - a 0.5MB to 1MB texture per character set per font. It fits nicely into sprite-based rendering pipelines because it is sprite-based; each glyph is still a textured quad. It does produce pixel artifacts, but very few compared to other methods that scale textures. There is also a fixed-function fallback if pixel shaders are unavailable, but the text ends up very aliased. Because the sampling is done in a pixel shader it admits some eye candy, like outlining and shadowing, for cheap." />
  <row Id="20130" PostHistoryTypeId="5" PostId="9712" RevisionGUID="73a069c5-6282-4ad0-980f-e55dad45177a" CreationDate="2011-03-13T09:59:42.137" UserId="744" Comment="Psychology is the study of (among other things) how we learn; psychiatry is the identification and treatment of mental disorders." Text="**Story Telling** - people and critics always say story is important in games.  It's often added as an addendum to a list of things your game should have, but actually implementing a compelling narrative in a game is hard.  Games narratives get put into the context of literature or movies often, yet they fundamentally function differently and there is a lot of interesting discussion around about how to even talk about game narrative on its own terms.  This gets even more abstract for games that don't use 'characters' or are basically an assembly of mechanics.&#xD;&#xA;&#xD;&#xA;Given all that, literary and film analysis can be useful to be able to phrase intent.&#xD;&#xA;&#xD;&#xA;**Marketing** - so you've actually finished a game (haha, as if).  Now what?  We hear about Minecraft or Angry Birds, but the business side of actually promoting and distributing our game is, for many of us, a giant black box.  XNA? Sure, put it on XBLIG, but what else can be done to promote it?&#xD;&#xA;&#xD;&#xA;**Psychology** - Specifically, how do we learn?  How can you teach game mechanics through game play so that people aren't totally lost by your esoteric opus on time manipulation?&#xD;&#xA;&#xD;&#xA;**Graphic Design** - Sure we all know that using Papyrus or Comic Sans is bad, but creating a well designed menus system or UI requires skill.  This is only partially a subset of art skills, not necessarily an complete subset - some people can be good designers without being able to draw well.&#xD;&#xA;" />
  <row Id="20131" PostHistoryTypeId="2" PostId="9717" RevisionGUID="943c6e51-1cd5-42ef-80bc-fa272cb0e281" CreationDate="2011-03-13T10:02:14.313" UserId="721" Text="With OpenGL ES 1.x, i gess there is no solution. With OpenGL ES 2.x, you can use gl_PointCoord in fragment shader to select a part of your texture." />
  <row Id="20132" PostHistoryTypeId="2" PostId="9718" RevisionGUID="a2eb2e85-13d0-4dcf-b903-fe7372e87de4" CreationDate="2011-03-13T10:03:36.217" UserId="5497" Text="I have a strategy game in a similar situation: superhumans with a diverse array of powers. I'm not explicitly planning on expanding the character list, but it's an obvious way to expand on the game if it's well-received.&#xD;&#xA;&#xD;&#xA;The term I've used to describe the game rules is &quot;exception-based&quot;, which I'm pretty sure I've heard elsewhere in reference to M:tG. Powers mostly operate by acting as exceptions to a set of common rules rather than by introducing new rules. Where new rules are introduced, they are typically coupled directly to the powered character itself.&#xD;&#xA;&#xD;&#xA;My game is neither finished nor released, yet. That said, here's what I've applied to balancing so far:&#xD;&#xA;&#xD;&#xA;K.I.S.S. - Each power has just one effect, expressed as simply and concretely as possible. As the powers are themselves exceptions, I keep them free of exceptions and special cases. Where characters interact, it is always clear whether their powers interact or not and if so, which one dominates. I created a large spreadsheet comparing each power to each other to map out unclear interactions. Although this design work wasn't really 'balancing', keeping things clear let me identify different ways of grouping the powers to look for common issues and solutions.&#xD;&#xA;&#xD;&#xA;Exceptions to what? - Every character is modeled on a base set of attributes and actions. Together the basic attributes and actions define what I call a 'pawn-level' character. When characters lose their powers, they still have this to fall back on. Also, given the limited focus of the powers, any given character is 90% pawn-level outside of their specialty. Regardless of how powerful a character is, each one has at least one pawn-level Achilles heel.&#xD;&#xA;&#xD;&#xA;90% Dominance - The KISS and pawn-level aspects come together to create my 90% Dominance plan. Each power exception maps to one or more of the pawn-level Achilles heel aspects. Given the distribution of powers, this means that each character can dominate 90% of the other characters within their own area of expertise. In many cases this also limited the number of powers that needed to be balanced against each it: only a subset of all the powers would interact with it. Only a subset of *those* interactions didn't have a clearly dominant power. With around 100 unique powers, each one required direct balancing against around 5 others.&#xD;&#xA;&#xD;&#xA;The game is designed about as far as it can be without a lot more playtesting. Playtesting is super important, especially for a game with as many combinations of things as mine (and yours from the sound of it) has. There is no degree of solo designing and balancing I can do that doesn't show up all sorts of inadequacies once people actually play it.&#xD;&#xA;&#xD;&#xA;Leaving you with a link to a site I haven't seen linked-to around here yet. [Balancing Multiplayer Games, Part 3: Fairness][1] by David Sirlin. There's plenty of useful info there, but be warned that he is dogmatically committed to the idea of Playing To Win (might not seem like something worth warning about, but just keep it in mind).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sirlin.net/articles/balancing-multiplayer-games-part-3-fairness.html" />
  <row Id="20133" PostHistoryTypeId="5" PostId="9717" RevisionGUID="8d7a3143-56b2-4d3b-b997-a59c81e0a76a" CreationDate="2011-03-13T10:10:15.133" UserId="721" Comment="added 481 characters in body" Text="With OpenGL ES 1.x, i gess there is no solution. With OpenGL ES 2.x, you can use gl_PointCoord in fragment shader to select a part of your texture.&#xD;&#xA;&#xD;&#xA;A typical PointSprite Fragment shader:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #ifdef GL_ES&#xD;&#xA;    precision highp float;&#xD;&#xA;    #endif &#xD;&#xA;    uniform sampler2D tex0;&#xD;&#xA;    &#xD;&#xA;    void main() &#xD;&#xA;    {&#xD;&#xA;        gl_FragColor = texture2D(tex0, gl_PointCoord);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So, you can modify it for 16 square textures in one texture:&#xD;&#xA;&#xD;&#xA;        gl_FragColor = texture2D(tex0, gl_PointCoord*0.25+displacement);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One last word, if you are developing for mobile devices, keep you fragment very short and don't use branch." />
  <row Id="20134" PostHistoryTypeId="2" PostId="9719" RevisionGUID="f9fe8d10-d693-4716-9388-6f7a7a1eddd3" CreationDate="2011-03-13T10:14:18.893" UserId="6032" Text="Have a look at http://www.airplaysdk.com/&#xD;&#xA;It lets you write native C++ for several platforms at the same time." />
  <row Id="20135" PostHistoryTypeId="2" PostId="9720" RevisionGUID="61c9ce37-d64a-4980-bc84-7d05107fe00b" CreationDate="2011-03-13T10:53:26.593" UserId="4410" Text="You'll need to turn the angle of rotation into a 2d vector which represents the direction the sprite is facing. You can then add or subtract this 2d vector onto the sprites position to move it forward or backwards in the direction it's facing.&#xD;&#xA;&#xD;&#xA;You can generate the vector with something as simple as using cos() and sin() for the X and Y components of this vector. (you'll need to ensure you don't mix degrees and radians when passing into these functions - plus ensure that when the angle is Zero that your sprite is facing directly right, although you could fix this by adding a constant onto the angle passed into cos/sin to adjust for any rotation that exists in the sprite)." />
  <row Id="20136" PostHistoryTypeId="2" PostId="9721" RevisionGUID="73aa9d26-10c6-4b00-af50-4f467e9566aa" CreationDate="2011-03-13T11:18:58.540" UserId="1156" Text="**History** - So many successful games are based off of either true history, or adapations of it. Some of the Call of Duty series, and the Assassin's Creed series come to mind.&#xD;&#xA;&#xD;&#xA;**Common sense** -  Yes, having something completely which implements perfectly realistic sound waves travelling through the air is nice and all that, but the user is going to struggle to see the difference. Oh, and run the game on a PC with less than a dozen GHz worth of processor power.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20137" PostHistoryTypeId="25" PostId="9714" RevisionGUID="ca52ce83-2f8b-4d74-9bec-68eaea003884" CreationDate="2011-03-13T11:23:27.850" Comment="http://twitter.com/#!/StackGameDev/status/46894135726194688" />
  <row Id="20138" PostHistoryTypeId="2" PostId="9722" RevisionGUID="333eb28b-a854-4bff-a019-5490de16ce3b" CreationDate="2011-03-13T11:51:42.130" UserId="6070" Text="This was originally a forum post so I hope you guys don't mind it being 2 questions in one.&#xD;&#xA;&#xD;&#xA;I am making a game and I got some basic physics implemented. I have 2 problems, 1 with particles being drawn in the wrong place and one with going through walls while jumping in corners.&#xD;&#xA;&#xD;&#xA;Skip over to about 15 sec&#xD;&#xA;video showing the 2 problems : http://youtube.com/watch?v=Tm9nfWsWfiM&#xD;&#xA;&#xD;&#xA;So the problem with the particles seems to be coming from the removal, as soon as I remove that piece of code it instantly works, but there shouldn't be a problem since they shouldn't even draw when their energy gets to 0 (and then they get removed)&#xD;&#xA;&#xD;&#xA;So my first question is, how are these particles getting warped all over the screen ?&#xD;&#xA;&#xD;&#xA;Relevant code :&#xD;&#xA;&#xD;&#xA;Particle class :&#xD;&#xA;&#xD;&#xA;    class Particle&#xD;&#xA;    {&#xD;&#xA;        //Physics&#xD;&#xA;        public Vector2 position = new Vector2(0,0);&#xD;&#xA;        public float direction = 180;&#xD;&#xA;        public float speed = 100;&#xD;&#xA;        public float energy = 1;&#xD;&#xA;        protected float startEnergy = 1;&#xD;&#xA;&#xD;&#xA;        //Visual&#xD;&#xA;        public Sprite sprite;&#xD;&#xA;        public float rotation = 0;&#xD;&#xA;        public float scale = 1;&#xD;&#xA;        public byte alpha = 255;&#xD;&#xA;        public BlendMode blendMode&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return sprite.BlendMode;&#xD;&#xA;            }&#xD;&#xA;            set&#xD;&#xA;            {&#xD;&#xA;                sprite.BlendMode = value;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Particle()&#xD;&#xA;        {  &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public virtual void Think(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            if (energy - frameTime &lt; 0)&#xD;&#xA;                energy = 0;&#xD;&#xA;            else&#xD;&#xA;                energy -= frameTime;&#xD;&#xA;&#xD;&#xA;            position += new Vector2((float)Math.Cos(MathHelper.DegToRad(direction)), (float)Math.Sin(MathHelper.DegToRad(direction))) * speed * frameTime;&#xD;&#xA;            alpha = (byte)(255 * energy / startEnergy);&#xD;&#xA;            sprite.Rotation = rotation;&#xD;&#xA;            sprite.Position = position;&#xD;&#xA;            sprite.Color = new Color(sprite.Color.R, sprite.Color.G, sprite.Color.B, alpha);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public virtual void Draw(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            if (energy &gt; 0)&#xD;&#xA;            {&#xD;&#xA;                World.camera.DrawSprite(sprite);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    // Basic particle implementation&#xD;&#xA;        class BasicSprite : Particle&#xD;&#xA;        {&#xD;&#xA;            public BasicSprite(Sprite _sprite)&#xD;&#xA;            {&#xD;&#xA;                sprite = _sprite;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Emitter : &#xD;&#xA;&#xD;&#xA;        class Emitter&#xD;&#xA;    {&#xD;&#xA;        protected static Random rand = new Random();&#xD;&#xA;        protected List&lt;Particle&gt; particles = new List&lt;Particle&gt;();&#xD;&#xA;&#xD;&#xA;        public BaseEntity target = null;&#xD;&#xA;        public Vector2 position = new Vector2(0, 0);&#xD;&#xA;        public bool Active = true;&#xD;&#xA;        public float timeAlive = 0;&#xD;&#xA;        public int particleCount = 0;&#xD;&#xA;        public int ParticlesPerSeccond&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return (int)(1 / particleSpawnTime);&#xD;&#xA;            }&#xD;&#xA;            set&#xD;&#xA;            {&#xD;&#xA;                particleSpawnTime = 1 / (float)value;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        public float dieTime = float.MaxValue;&#xD;&#xA;&#xD;&#xA;        float particleSpawnTime = 0.05f;&#xD;&#xA;        float spawnTime = 0;&#xD;&#xA;&#xD;&#xA;        public Emitter()&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public virtual void Think(float frametime)&#xD;&#xA;        {&#xD;&#xA;                spawnTime += frametime;&#xD;&#xA;&#xD;&#xA;                if (dieTime != float.MaxValue)&#xD;&#xA;                {&#xD;&#xA;                    timeAlive += frametime;&#xD;&#xA;                    if (timeAlive &gt;= dieTime)&#xD;&#xA;                        Active = false;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (Active)&#xD;&#xA;                {&#xD;&#xA;&#xD;&#xA;                    if (target != null)&#xD;&#xA;                        position = target.Position;&#xD;&#xA;&#xD;&#xA;                    while (spawnTime &gt; particleSpawnTime)&#xD;&#xA;                    {&#xD;&#xA;                        spawnTime -= particleSpawnTime;&#xD;&#xA;                        AddParticle();&#xD;&#xA;                        particleCount++;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;                for (int i = 0; i &lt; particles.Count; i++)&#xD;&#xA;                {&#xD;&#xA;                    particles[i].Think(frametime);&#xD;&#xA;                    if (particles[i].energy &lt;= 0)&#xD;&#xA;                    {&#xD;&#xA;                        particles.Remove(particles[i]); // As soon as this is removed, it works&#xD;&#xA;                        particleCount--;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public virtual void AddParticle()&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public virtual void Draw(float frametime)&#xD;&#xA;        {&#xD;&#xA;            foreach (Particle particle in particles)&#xD;&#xA;            {&#xD;&#xA;                particle.Draw(frametime);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    class BloodEmitter : Emitter&#xD;&#xA;    {&#xD;&#xA;        Image image;&#xD;&#xA;&#xD;&#xA;        public BloodEmitter()&#xD;&#xA;        {&#xD;&#xA;            image = new Image(@&quot;Content/Particles/TinyCircle.png&quot;);&#xD;&#xA;            image.CreateMaskFromColor(new Color(255, 0, 255, 255));&#xD;&#xA;            this.dieTime = 0.5f;&#xD;&#xA;            this.ParticlesPerSeccond = 100;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public override void AddParticle()&#xD;&#xA;        {&#xD;&#xA;            Sprite sprite = new Sprite(image);&#xD;&#xA;            sprite.Color = new Color((byte)(rand.NextDouble() * 255), (byte)(rand.NextDouble() * 255), (byte)(rand.NextDouble() * 255));&#xD;&#xA;&#xD;&#xA;            BasicSprite particle = new BasicSprite(sprite);&#xD;&#xA;            particle.direction = (float)rand.NextDouble() * 360;&#xD;&#xA;            particle.position = position;&#xD;&#xA;            particle.blendMode = BlendMode.Alpha;&#xD;&#xA;            particles.Add(particle);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The seccond problem is the physics problem, for some reason I can get through the right bottom corner while jumping. I think this is coming from me switching animations but I thought I made it compensate for that.&#xD;&#xA;&#xD;&#xA;Relevant code :&#xD;&#xA;PhysicsEntity :&#xD;&#xA;&#xD;&#xA;        class PhysicsEntity : BaseEntity&#xD;&#xA;    {&#xD;&#xA;        // Horizontal movement constants&#xD;&#xA;        protected const float maxHorizontalSpeed = 1000;&#xD;&#xA;        protected const float horizontalAcceleration = 15;&#xD;&#xA;        protected const float horizontalDragAir = 0.95f;&#xD;&#xA;        protected const float horizontalDragGround = 0.95f;&#xD;&#xA;&#xD;&#xA;        // Vertical movement constants&#xD;&#xA;        protected const float maxVerticalSpeed = 1000;&#xD;&#xA;        protected const float verticalAcceleration = 20;&#xD;&#xA;&#xD;&#xA;        // Everything needed for movement and correct animations&#xD;&#xA;        protected float movement = 0;&#xD;&#xA;        protected bool onGround = false;&#xD;&#xA;        protected Vector2 Velocity = new Vector2(0, 0);&#xD;&#xA;        protected float maxSpeed = 0;&#xD;&#xA;        float lastThink = 0;&#xD;&#xA;        float thinkTime = 1f/60f;&#xD;&#xA;&#xD;&#xA;        public PhysicsEntity(Vector2 position, Sprite sprite) :&#xD;&#xA;            base(position, sprite)&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public override void Draw(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            base.Draw(frameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public override void Think(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            CalculateMovement(frameTime);&#xD;&#xA;            base.Think(frameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        protected void CalculateMovement(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            lastThink += frameTime;&#xD;&#xA;&#xD;&#xA;            while (lastThink &gt; thinkTime)&#xD;&#xA;            {&#xD;&#xA;                onGround = false;&#xD;&#xA;&#xD;&#xA;                Velocity.X = MathHelper.Clamp(Velocity.X + horizontalAcceleration * movement, -maxHorizontalSpeed, maxHorizontalSpeed);&#xD;&#xA;                if (onGround)&#xD;&#xA;                    Velocity.X *= horizontalDragGround;&#xD;&#xA;                else&#xD;&#xA;                    Velocity.X *= horizontalDragAir;&#xD;&#xA;&#xD;&#xA;                if (maxSpeed &lt; Velocity.X)&#xD;&#xA;                    maxSpeed = Velocity.X;&#xD;&#xA;&#xD;&#xA;                Velocity.Y = MathHelper.Clamp(Velocity.Y + verticalAcceleration, -maxVerticalSpeed, maxVerticalSpeed);&#xD;&#xA;&#xD;&#xA;                lastThink -= thinkTime;&#xD;&#xA;                DoCollisions(thinkTime);&#xD;&#xA;                DoAnimations(thinkTime);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        public virtual void DoAnimations(float frameTime)&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;        public void DoCollisions(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            Position.Y += Velocity.Y * frameTime;&#xD;&#xA;            Vector2 tileCollision = GetTileCollision();&#xD;&#xA;            if (tileCollision.X != -1 || tileCollision.Y != -1)&#xD;&#xA;            {&#xD;&#xA;                Vector2 collisionDepth = CollisionRectangle.DepthIntersection(&#xD;&#xA;                    new Rectangle(&#xD;&#xA;                        tileCollision.X * World.tileEngine.TileWidth,&#xD;&#xA;                        tileCollision.Y * World.tileEngine.TileHeight,&#xD;&#xA;                        World.tileEngine.TileWidth,&#xD;&#xA;                        World.tileEngine.TileHeight&#xD;&#xA;                    )&#xD;&#xA;                );&#xD;&#xA;                Position.Y += collisionDepth.Y;&#xD;&#xA;                if (collisionDepth.Y &lt; 0)&#xD;&#xA;                    onGround = true;&#xD;&#xA;&#xD;&#xA;                Velocity.Y = 0;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            Position.X += Velocity.X * frameTime;&#xD;&#xA;            tileCollision = GetTileCollision();&#xD;&#xA;            if (tileCollision.X != -1 || tileCollision.Y != -1)&#xD;&#xA;            {&#xD;&#xA;                Vector2 collisionDepth = CollisionRectangle.DepthIntersection(&#xD;&#xA;                    new Rectangle(&#xD;&#xA;                        tileCollision.X * World.tileEngine.TileWidth,&#xD;&#xA;                        tileCollision.Y * World.tileEngine.TileHeight,&#xD;&#xA;                        World.tileEngine.TileWidth,&#xD;&#xA;                        World.tileEngine.TileHeight&#xD;&#xA;                    )&#xD;&#xA;                );&#xD;&#xA;                Position.X += collisionDepth.X;&#xD;&#xA;                Velocity.X = 0;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        public void DoCollisions(Vector2 difference)&#xD;&#xA;        {&#xD;&#xA;            CollisionRectangle.Y = Position.Y - difference.Y;&#xD;&#xA;            CollisionRectangle.Height += difference.Y;&#xD;&#xA;            Vector2 tileCollision = GetTileCollision();&#xD;&#xA;            if (tileCollision.X != -1 || tileCollision.Y != -1)&#xD;&#xA;            {&#xD;&#xA;                Vector2 collisionDepth = CollisionRectangle.DepthIntersection(&#xD;&#xA;                    new Rectangle(&#xD;&#xA;                        tileCollision.X * World.tileEngine.TileWidth,&#xD;&#xA;                        tileCollision.Y * World.tileEngine.TileHeight,&#xD;&#xA;                        World.tileEngine.TileWidth,&#xD;&#xA;                        World.tileEngine.TileHeight&#xD;&#xA;                    )&#xD;&#xA;                );&#xD;&#xA;                Position.Y += collisionDepth.Y;&#xD;&#xA;                if (collisionDepth.Y &lt; 0)&#xD;&#xA;                    onGround = true;&#xD;&#xA;&#xD;&#xA;                Velocity.Y = 0;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            CollisionRectangle.X = Position.X - difference.X;&#xD;&#xA;            CollisionRectangle.Width += difference.X;&#xD;&#xA;            tileCollision = GetTileCollision();&#xD;&#xA;            if (tileCollision.X != -1 || tileCollision.Y != -1)&#xD;&#xA;            {&#xD;&#xA;                Vector2 collisionDepth = CollisionRectangle.DepthIntersection(&#xD;&#xA;                    new Rectangle(&#xD;&#xA;                        tileCollision.X * World.tileEngine.TileWidth,&#xD;&#xA;                        tileCollision.Y * World.tileEngine.TileHeight,&#xD;&#xA;                        World.tileEngine.TileWidth,&#xD;&#xA;                        World.tileEngine.TileHeight&#xD;&#xA;                    )&#xD;&#xA;                );&#xD;&#xA;                Position.X += collisionDepth.X;&#xD;&#xA;                Velocity.X = 0;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        Vector2 GetTileCollision()&#xD;&#xA;        {&#xD;&#xA;            int topLeftTileX = (int)(CollisionRectangle.TopLeft.X / World.tileEngine.TileWidth);&#xD;&#xA;            int topLeftTileY = (int)(CollisionRectangle.TopLeft.Y / World.tileEngine.TileHeight);&#xD;&#xA;            int BottomRightTileX = (int)(CollisionRectangle.DownRight.X / World.tileEngine.TileWidth);&#xD;&#xA;            int BottomRightTileY = (int)(CollisionRectangle.DownRight.Y / World.tileEngine.TileHeight);&#xD;&#xA;&#xD;&#xA;            if (CollisionRectangle.DownRight.Y % World.tileEngine.TileHeight == 0) // If your exactly against the tile don't count that as being inside the tile&#xD;&#xA;                BottomRightTileY -= 1;&#xD;&#xA;            if (CollisionRectangle.DownRight.X % World.tileEngine.TileWidth == 0) // If your exactly against the tile don't count that as being inside the tile&#xD;&#xA;                BottomRightTileX -= 1;&#xD;&#xA;&#xD;&#xA;            for (int i = topLeftTileX; i &lt;= BottomRightTileX; i++)&#xD;&#xA;            {&#xD;&#xA;                for (int j = topLeftTileY; j &lt;= BottomRightTileY; j++)&#xD;&#xA;                {&#xD;&#xA;                    if (World.tileEngine.TileIsSolid(i, j))&#xD;&#xA;                    {&#xD;&#xA;                        return new Vector2(i, j);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            return new Vector2(-1, -1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Player :&#xD;&#xA;&#xD;&#xA;       enum State&#xD;&#xA;    {&#xD;&#xA;        Standing,&#xD;&#xA;        Running,&#xD;&#xA;        Jumping,&#xD;&#xA;        Falling,&#xD;&#xA;        Sliding,&#xD;&#xA;        WallSlide&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Player : PhysicsEntity&#xD;&#xA;    {&#xD;&#xA;        private State state&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return currentState;&#xD;&#xA;            }&#xD;&#xA;            set&#xD;&#xA;            {&#xD;&#xA;                if (currentState != value)&#xD;&#xA;                {&#xD;&#xA;                    currentState = value;&#xD;&#xA;                    animationChanged = true;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private State currentState = State.Standing;&#xD;&#xA;        private BasicEmitter basicEmitter = new BasicEmitter();&#xD;&#xA;        public bool flipped;&#xD;&#xA;        public bool animationChanged = false;&#xD;&#xA;&#xD;&#xA;        protected const float jumpPower = 600;&#xD;&#xA;&#xD;&#xA;        AnimationManager animationManager;&#xD;&#xA;        Rectangle DrawRectangle;&#xD;&#xA;        public override Rectangle CollisionRectangle&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return new Rectangle(&#xD;&#xA;                    Position.X - DrawRectangle.Width / 2f,&#xD;&#xA;                    Position.Y - DrawRectangle.Height / 2f,&#xD;&#xA;                    DrawRectangle.Width,&#xD;&#xA;                    DrawRectangle.Height&#xD;&#xA;                );&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public Player(Vector2 position, Sprite sprite) :&#xD;&#xA;            base(position, sprite)&#xD;&#xA;        {&#xD;&#xA;            // Only posted the relevant bit&#xD;&#xA;            DrawRectangle = animationManager.currentAnimation.drawingRectangle;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public override void Draw(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            World.camera.DrawSprite(&#xD;&#xA;                Sprite, &#xD;&#xA;                Position + new Vector2(DrawRectangle.X, DrawRectangle.Y),&#xD;&#xA;                animationManager.currentAnimation.drawingRectangle&#xD;&#xA;            );&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public override void Think(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            //I only posted the relevant stuff&#xD;&#xA;            if (animationChanged)  &#xD;&#xA;            {&#xD;&#xA;                // if the animation has changed make sure we compensate for the change in with and height&#xD;&#xA;                animationChanged = false;&#xD;&#xA;                DoCollisions(animationManager.getSizeDifference());&#xD;&#xA;            }&#xD;&#xA;            DoCustomMovement();&#xD;&#xA;            base.Think(frameTime);&#xD;&#xA;            if (!onGround &amp;&amp; Velocity.Y &gt; 0)&#xD;&#xA;            {&#xD;&#xA;                state = State.Falling;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        void DoCustomMovement()&#xD;&#xA;        {&#xD;&#xA;            if (onGround)&#xD;&#xA;            {&#xD;&#xA;                if (World.renderWindow.Input.IsKeyDown(KeyCode.W))&#xD;&#xA;                {&#xD;&#xA;                    Velocity.Y = -jumpPower;&#xD;&#xA;                    state = State.Jumping;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        public override void DoAnimations(float frameTime)&#xD;&#xA;        {&#xD;&#xA;            string stateName = Enum.GetName(typeof(State), state);&#xD;&#xA;&#xD;&#xA;            if (!animationManager.currentAnimationIs(stateName))&#xD;&#xA;            {&#xD;&#xA;                animationManager.PlayAnimation(stateName);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            animationManager.Think(frameTime);&#xD;&#xA;&#xD;&#xA;            DrawRectangle = animationManager.currentAnimation.drawingRectangle;&#xD;&#xA;            Sprite.Center = new Vector2(&#xD;&#xA;                DrawRectangle.X + DrawRectangle.Width / 2,&#xD;&#xA;                DrawRectangle.Y + DrawRectangle.Height / 2&#xD;&#xA;            );&#xD;&#xA;            Sprite.FlipX(flipped);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;So why am I warping through walls ?&#xD;&#xA;&#xD;&#xA;I have given this some thought but I just can't seem to find out why this is happening.&#xD;&#xA;&#xD;&#xA;Full source if needed :&#xD;&#xA;source : http://www.mediafire.com/?rc7ddo09gnr68zd (download link)&#xD;&#xA;" />
  <row Id="20139" PostHistoryTypeId="1" PostId="9722" RevisionGUID="333eb28b-a854-4bff-a019-5490de16ce3b" CreationDate="2011-03-13T11:51:42.130" UserId="6070" Text="Particle and Physics problem." />
  <row Id="20140" PostHistoryTypeId="3" PostId="9722" RevisionGUID="333eb28b-a854-4bff-a019-5490de16ce3b" CreationDate="2011-03-13T11:51:42.130" UserId="6070" Text="&lt;c#&gt;&lt;physics&gt;&lt;animation&gt;&lt;debug&gt;" />
  <row Id="20141" PostHistoryTypeId="2" PostId="9723" RevisionGUID="1bdb2dfa-c4f4-4527-9ff3-ba2e7f22e45c" CreationDate="2011-03-13T12:22:25.113" UserId="5998" Text="I'm looking for this great paper about Verlet integration: http://www.teknikus.dk/tj/gdc2001.htm&#xD;&#xA;&#xD;&#xA;I've found this link on many websites, forums, blogs, everyone is recommending it ! &#xD;&#xA;&#xD;&#xA;The website is down for more than one week." />
  <row Id="20142" PostHistoryTypeId="1" PostId="9723" RevisionGUID="1bdb2dfa-c4f4-4527-9ff3-ba2e7f22e45c" CreationDate="2011-03-13T12:22:25.113" UserId="5998" Text="I'm looking for a paper from Teknikus.dk" />
  <row Id="20143" PostHistoryTypeId="3" PostId="9723" RevisionGUID="1bdb2dfa-c4f4-4527-9ff3-ba2e7f22e45c" CreationDate="2011-03-13T12:22:25.113" UserId="5998" Text="&lt;physics&gt;&lt;graphics-programming&gt;&lt;graphic-effects&gt;" />
  <row Id="20144" PostHistoryTypeId="2" PostId="9724" RevisionGUID="874eccfc-1075-49c9-bba4-96d9fafa8baa" CreationDate="2011-03-13T12:34:03.393" UserId="1156" Text="The [Wayback Machine][1] to the rescue!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://replay.waybackmachine.org/20080704130418/http://www.teknikus.dk/tj/gdc2001.htm" />
  <row Id="20145" PostHistoryTypeId="25" PostId="9723" RevisionGUID="66a1232b-a798-4b8c-ad90-cb7c4bfb3f94" CreationDate="2011-03-13T14:23:27.740" Comment="http://twitter.com/#!/StackGameDev/status/46939433378922497" />
  <row Id="20146" PostHistoryTypeId="2" PostId="9725" RevisionGUID="2e2825a9-6c76-443b-b7ac-ada00200498a" CreationDate="2011-03-13T15:11:07.723" UserId="6073" Text="I'm starting to learn OpenGL by creating a pure 2D game.&#xD;&#xA;&#xD;&#xA;I have to decide on the format of the Vertices. Do I need a normal component? Or is this for a 2d component not needed?&#xD;&#xA;&#xD;&#xA;My gut feeling says I won't need it since everything is flat. But perhaps I need it for some shader or other thing I don't see yet.&#xD;&#xA;" />
  <row Id="20147" PostHistoryTypeId="1" PostId="9725" RevisionGUID="2e2825a9-6c76-443b-b7ac-ada00200498a" CreationDate="2011-03-13T15:11:07.723" UserId="6073" Text="Does one need normals for a strictly 2d Game?" />
  <row Id="20148" PostHistoryTypeId="3" PostId="9725" RevisionGUID="2e2825a9-6c76-443b-b7ac-ada00200498a" CreationDate="2011-03-13T15:11:07.723" UserId="6073" Text="&lt;opengl&gt;&lt;2d&gt;&lt;normals&gt;" />
  <row Id="20149" PostHistoryTypeId="2" PostId="9726" RevisionGUID="ba5559ec-45be-46bb-b23c-9a9bd90e6b84" CreationDate="2011-03-13T15:31:52.080" UserId="5957" Text="Strictly speaking, the normal component will be ignored if you've turned off lighting. If you're able to write your own shaders in whatever language/toolkit you're using then you can make absolutely sure they're not used.&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="20150" PostHistoryTypeId="2" PostId="9727" RevisionGUID="c40419a0-8019-4c11-a1af-9f721bd79482" CreationDate="2011-03-13T16:20:20.867" UserId="1217" Text="**Immersion**&#xD;&#xA;Is actually a term still being defined and discovered. What makes us immersed? Why do some people get easily immersed while others won't even flinch when playing Dead Space 2 in a dark room with loud sounds? &#xD;&#xA;&#xD;&#xA;This subject alone has helped me a lot as it involves many psychological aspects that are great to have in mind when designing and developing games. &#xD;&#xA;&#xD;&#xA; - **What in your game will actually** *move* **your player emotionally?** Make use of narrative immersion!&#xD;&#xA; &#xD;&#xA; - How can you make your player stay in his or her immersion &quot;bubble&quot;? Make use of tactile immersion!&#xD;&#xA; - What will make your player focused and think of nothing but the current challenge in your game? Make use of strategic immersion!&#xD;&#xA;&#xD;&#xA;Check out these links for more interesting insights in to the subject: &#xD;&#xA;&#xD;&#xA;[Wikipedia article][1]&#xD;&#xA;&#xD;&#xA;[Oldie but goldie][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Immersion_%28virtual_reality%29 &#xD;&#xA;  [2]: http://portal.acm.org/citation.cfm?id=517387" />
  <row Id="20151" PostHistoryTypeId="2" PostId="9728" RevisionGUID="eb203c55-7178-404a-93a4-d400cbe59aa4" CreationDate="2011-03-13T16:21:39.247" UserId="634" Text="@The Communist Duck already posted a Wayback Machine link, but here's [another version of the article][1] that appeared on Gamasutra.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/resource_guide/20030121/jacobson_pfv.htm" />
  <row Id="20152" PostHistoryTypeId="2" PostId="9729" RevisionGUID="a4197b81-2318-4691-923e-29b5564fdd05" CreationDate="2011-03-13T16:28:59.333" UserId="5899" Text="There are some algorithms and implementation of polygon triangulation on these books:&#xD;&#xA;&#xD;&#xA;- Computational Geometry: Algorithms and Applications. Chapter 3: Polygon Triangulation.&#xD;&#xA;- Computational Geometry in C. Chapter 1: Polygon Triangulation." />
  <row Id="20153" PostHistoryTypeId="2" PostId="9730" RevisionGUID="72d794ab-aed5-4f63-887f-dc286cddf915" CreationDate="2011-03-13T16:29:00.457" UserId="5021" Text="If you are drawing your triangles in a 3D space, and then viewing everything from the side to make it look 2D, then you'll need normals in order to be able to draw lights over top of your quads.&#xD;&#xA;&#xD;&#xA;If you don't light anything, then you won't need normals.&#xD;&#xA;&#xD;&#xA;My recommendation since you're asking this question, is to omit normals for now, regardless of what your plans are later. It won't be hard to add them later if you need them." />
  <row Id="20154" PostHistoryTypeId="2" PostId="9731" RevisionGUID="d8558f58-ec94-401e-888c-142e9ee45f6b" CreationDate="2011-03-13T16:34:15.233" UserId="4662" Text="You don't need normals unless you're doing lighting simulations. They're fairly trivial to add in once you need them, compared to the actual difficulty of writing lighting shaders." />
  <row Id="20156" PostHistoryTypeId="5" PostId="9730" RevisionGUID="55748553-dc89-458f-81f0-193dc5aefbbe" CreationDate="2011-03-13T16:41:54.923" UserId="5021" Comment="added 36 characters in body" Text="If you are drawing your triangles in a 3D space, and then viewing everything from the side to make it look 2D (which is what you should be doing), then you'll need normals in order to be able to draw lights over top of your quads.&#xD;&#xA;&#xD;&#xA;If you don't light anything, then you won't need normals.&#xD;&#xA;&#xD;&#xA;My recommendation since you're asking this question, is to omit normals for now, regardless of what your plans are later. It won't be hard to add them later if you need them." />
  <row Id="20157" PostHistoryTypeId="25" PostId="9725" RevisionGUID="04025299-5397-4947-bc61-a83994849cdb" CreationDate="2011-03-13T17:23:27.850" Comment="http://twitter.com/#!/StackGameDev/status/46984732524818432" />
  <row Id="20158" PostHistoryTypeId="2" PostId="9733" RevisionGUID="1322398a-4857-450f-9075-ad2b653cc292" CreationDate="2011-03-13T17:23:37.713" UserId="5551" Text="Does one *need* normals for a 2D game? No. You don't even need normals for a 3D game if you're not going to bother with lighting. However, normals and lighting very much can apply to 2D games. You just go about it in a different way. Rather than explicitly defining a 3D normal vector that aligns with your vertex, you can define a [normal map][1] that lines up with your 2D graphics. This lets you have incredibly epic lighting [even in a 2D game][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Normal_mapping&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=Xmn6zhDJGLE" />
  <row Id="20159" PostHistoryTypeId="2" PostId="9734" RevisionGUID="df55e82e-0a6b-44ee-823f-48954f9b54f1" CreationDate="2011-03-13T18:44:49.497" UserId="4410" Text="2 things that might be up.&#xD;&#xA;&#xD;&#xA;1) When you remove the particles, that loop is going to skip the &quot;next&quot; particle after one that's been removed in the loop that processes them. This is because you iterate through the list using &quot;i&quot;, but during that loop you also remove items from the array, shifting future entries down, but then also increment &quot;i&quot; which then skips what was effectively the one after the one you just deleted (that's now in our slot).&#xD;&#xA;&#xD;&#xA;2) I might have missed it, but I didn't see the code when I had a quick look above that handled the actual &quot;how far inside a block&quot; test. What I'm wondering is that based off the depth inside you decide which way to push the colliding object out. You don't seem to take into consideration the velocity of the player at the time (i.e. was he moving down and is now colliding) which you could then also use to judge if he should be pushed back upwards when colliding. Instead I'm guessing you decide which direction to move the player based on which edge it's closest to of the tile. If the player is moving fast enough then you might get so far inside a tile that you think he should be pushed out the bottom." />
  <row Id="20160" PostHistoryTypeId="2" PostId="9735" RevisionGUID="615c4705-7b01-4094-add5-c382cc8bbed0" CreationDate="2011-03-13T19:06:52.993" UserId="160" Text="Your particle problem is because you're removing elements while looping by index. Unless you adjust the index when you remove, you'll skip over a particle the next time the loop comes around.&#xD;&#xA;&#xD;&#xA;Let's say you have particles `[a, b, c, d]`. The loop will do this:&#xD;&#xA;&#xD;&#xA;1. Set `i` to 0.&#xD;&#xA;2. Update `particles[0]`&#xD;&#xA;3. Check it's energy. Let's say it's less than zero now.&#xD;&#xA;4. Remove `particles[0]`. This shifts `[b, c, d]` up so that `b` is now at index zero.&#xD;&#xA;5. Loop around and increment `i` to 1.&#xD;&#xA;6. Update `particles[1]`. This is now *c* and not *b*. So we skip *b* entirely which is your bug.&#xD;&#xA;&#xD;&#xA;A simple fix is:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; particles.Count; i++)&#xD;&#xA;    {&#xD;&#xA;        particles[i].Think(frametime);&#xD;&#xA;        if (particles[i].energy &lt;= 0)&#xD;&#xA;        {&#xD;&#xA;            particles.Remove(particles[i]);&#xD;&#xA;            i--; // &lt;-- Shift the index up too since the particles have shifted.&#xD;&#xA;            particleCount--;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`Remove()` can do a lot of work, though (it's `O(n)`). If you want something more efficient, do all of the removes in one step like this:&#xD;&#xA;&#xD;&#xA;    // First update all of the particles.&#xD;&#xA;    for (int i = 0; i &lt; particles.Count; i++)&#xD;&#xA;    {&#xD;&#xA;        particles[i].Think(frametime);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Now remove all of the dead ones in one pass by overwriting them with&#xD;&#xA;    // the remaining lives ones.&#xD;&#xA;    int dest = 0;&#xD;&#xA;    for (int i = 0; i &lt; particles.Count; i++)&#xD;&#xA;    {&#xD;&#xA;        if (particles[i].energy &gt; 0)&#xD;&#xA;        {&#xD;&#xA;            particles[dest] = particles[i];&#xD;&#xA;            dest++;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Now trim the excess off the end.&#xD;&#xA;    particles.RemoveRange(dest, particles.Count - dest);&#xD;&#xA;&#xD;&#xA;Also, you don't need `particleCount`. Lists already know their size.&#xD;&#xA;&#xD;&#xA;I'll leave your other question to others to answer. :)" />
  <row Id="20161" PostHistoryTypeId="2" PostId="9736" RevisionGUID="71c0d8c0-1357-4648-9b1f-9f5e09783456" CreationDate="2011-03-13T19:10:52.870" UserId="4413" Text="Do a remake!&#xD;&#xA;&#xD;&#xA;Pick a simple game you enojoy from the 80s/90s and give it some interface love, turn it into something shiny again.&#xD;&#xA;&#xD;&#xA;http://abandonia.com" />
  <row Id="20162" PostHistoryTypeId="5" PostId="9641" RevisionGUID="7343fca8-2fb3-4b00-a05a-c85073e0b615" CreationDate="2011-03-13T20:14:30.583" UserId="6040" Comment="Fixed an unclear meaning. The perils of sloppy proofreading." Text="I have only played freeciv, but here are a few suggestions:&#xD;&#xA;&#xD;&#xA;Remove the &quot;bonus&quot; production square every city gets.  Without that bonus production square, four cities of size 1 will have as many production squares as a size 4 city. (Today the four small cities will have a total of 8 production squares vs 5 such for the size 4 city).&#xD;&#xA;&#xD;&#xA;Make city growth linear so it costs as much food to get from size 10 to 11 as it takes to get from size 1 to 2.  *Also* allow for a city that produces enough food to grow several sizes in one turn.&#xD;&#xA;&#xD;&#xA;Allow a big city with a lot of production capacity to produce multiple items from it's production list during one turn.&#xD;&#xA;&#xD;&#xA;I think the above would go a long way to even out ICS vs non-ICS but I then have a final suggestion which is a direct punishment of ICS: Tweak city walls, coastal battery and SAM batteries so they get a relatively weak defense bonus when the city is small and a relatively strong defense bonus when it is large enough.  But that is *really* going for a deliberate punishment of ICS...&#xD;&#xA;&#xD;&#xA;The above changes might come with an interesting price though, that growth of a city suddenly &quot;runs amok&quot; and it suddenly in one turn leaps from peaceful to severe civil disorder.  Of course, careful planning of buildings might aleviate that to some extent." />
  <row Id="20163" PostHistoryTypeId="25" PostId="9722" RevisionGUID="fab2a95e-37e1-4217-897b-2768cf0ba920" CreationDate="2011-03-13T20:23:27.900" Comment="http://twitter.com/#!/StackGameDev/status/47030031100293121" />
  <row Id="20164" PostHistoryTypeId="2" PostId="9737" RevisionGUID="17162a29-4dd9-4331-8836-8d5eb7443d93" CreationDate="2011-03-13T21:08:20.473" UserId="5677" Text="I've been busy trying to create a level editor for a tile based game i'm working on. It's all going pretty fine, the only thing i'm having trouble with is creating a simple event system. &#xD;&#xA;&#xD;&#xA;Let's say the player steps on a particulair tile that had the action &quot;teleport&quot; assigned to it in the editor. The teleport string is saved in the tile object as a variable. When creating the tilegrid an actionmanager class scans the action variable and assigns actions to the variable.&#xD;&#xA;&#xD;&#xA;    	public static class ActionManager&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		public static function ParseTileAction(tile:Tile) {&#xD;&#xA;			&#xD;&#xA;			switch(tile.action) {&#xD;&#xA;				&#xD;&#xA;				case &quot;TELEPORT&quot;:&#xD;&#xA;				&#xD;&#xA;				//assign action here&#xD;&#xA;				&#xD;&#xA;				break;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now this is an collision event, so I guess I should also provide an object to colide with the tile. But what if it would have to count for collision with all objects in the world? Also, checking for collisions in the actionmanager class doesn't seem very efficient. &#xD;&#xA;&#xD;&#xA;Am I even on the right track here?&#xD;&#xA;I'm new to game design so I could be completly off track.&#xD;&#xA;Any tips on how handeling and creating events using an editor is usually done would be great. The main problem i'm having is the &#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20165" PostHistoryTypeId="1" PostId="9737" RevisionGUID="17162a29-4dd9-4331-8836-8d5eb7443d93" CreationDate="2011-03-13T21:08:20.473" UserId="5677" Text="Level editor event system, how to translate event to game action" />
  <row Id="20166" PostHistoryTypeId="3" PostId="9737" RevisionGUID="17162a29-4dd9-4331-8836-8d5eb7443d93" CreationDate="2011-03-13T21:08:20.473" UserId="5677" Text="&lt;actionscript-3&gt;&lt;events&gt;&lt;map-editor&gt;" />
  <row Id="20167" PostHistoryTypeId="2" PostId="9738" RevisionGUID="cb5c750d-b803-4e1f-8792-d2768798a7cd" CreationDate="2011-03-13T21:29:05.267" UserId="5740" Text="I'm trying to find the points on two lines where the two lines are the closest. I've implemented the following method (Points and Vectors are as you'd expect, and a Line consists of a Point on the line and a non-normalized direction Vector from that point):&#xD;&#xA;&#xD;&#xA;    void CDClosestPointsOnTwoLines(Line line1, Line line2, Point* closestPoints)&#xD;&#xA;    {&#xD;&#xA;        closestPoints[0] = line1.pointOnLine;&#xD;&#xA;        closestPoints[1] = line2.pointOnLine;&#xD;&#xA;	&#xD;&#xA;        Vector d1 = line1.direction;&#xD;&#xA;        Vector d2 = line2.direction;&#xD;&#xA;	&#xD;&#xA;        float a = d1.dot(d1);&#xD;&#xA;        float b = d1.dot(d2);&#xD;&#xA;        float e = d2.dot(d2);&#xD;&#xA;	&#xD;&#xA;        float d = a*e - b*b;&#xD;&#xA;        if (d != 0) // If the two lines are not parallel.&#xD;&#xA;        {&#xD;&#xA;            Vector r = Vector(line1.pointOnLine) - Vector(line2.pointOnLine);&#xD;&#xA;            float c = d1.dot(r);&#xD;&#xA;            float f = d2.dot(r);&#xD;&#xA;&#xD;&#xA;            float s = (b*f - c*e) / d;&#xD;&#xA;            float t = (a*f - b*c) / d;&#xD;&#xA;            closestPoints[0] = line1.positionOnLine(s);&#xD;&#xA;            closestPoints[1] = line2.positionOnLine(t);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            printf(&quot;Lines were parallel.\n&quot;);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm using OpenGL to draw three lines that move around the world, the third of which should be the line that most closely connects the other two lines, the two end points of which are calculated using this function.&#xD;&#xA;&#xD;&#xA;The problem is that the first point of closestPoints after this function is called will lie on line1, but the second point won't lie on line2, let alone at the closest point on line2! I've checked over the function many times but I can't see where the mistake in my implementation is. I've checked my dot product function, scalar multiplication, subtraction, positionOnLine() etc. etc. So my assumption is that the problem is within this method implementation.&#xD;&#xA;&#xD;&#xA;If it helps to find the answer, this is function supposed to be an implementation of section 5.1.8 from ['Real-Time Collision Detection' by Christer Ericson][1].&#xD;&#xA;&#xD;&#xA;Many thanks for any help!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323" />
  <row Id="20168" PostHistoryTypeId="1" PostId="9738" RevisionGUID="cb5c750d-b803-4e1f-8792-d2768798a7cd" CreationDate="2011-03-13T21:29:05.267" UserId="5740" Text="Points on lines where the two lines are the closest together" />
  <row Id="20169" PostHistoryTypeId="3" PostId="9738" RevisionGUID="cb5c750d-b803-4e1f-8792-d2768798a7cd" CreationDate="2011-03-13T21:29:05.267" UserId="5740" Text="&lt;collision-detection&gt;&lt;vector&gt;&lt;linear-algebra&gt;" />
  <row Id="20170" PostHistoryTypeId="2" PostId="9739" RevisionGUID="6683554e-fb4c-4ef9-8ed4-f4278a0f88aa" CreationDate="2011-03-13T21:35:40.590" UserId="5932" Text="Figured it out!!!!!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's the new method:  &#xD;&#xA;first, I add an object that I wish to check collisions, with my add_message_to_collision_queue(); function. I then invoke my handle_collisions() method:&#xD;&#xA;&#xD;&#xA;    bool player::handle_collisions() {&#xD;&#xA;    collisions tcol;&#xD;&#xA;&#xD;&#xA;    bool did_handle = false;&#xD;&#xA;    for (int temp = 0; temp &lt; collideQueue.size(); temp++) {&#xD;&#xA;&#xD;&#xA;    tcol = get_collision(prevPos.x,y,get_img()-&gt;get_width(),get_img()-&gt;get_height(),&#xD;&#xA;                         collideQueue[temp]-&gt;get_position().x,collideQueue[temp]-&gt;get_position().y,&#xD;&#xA;                         collideQueue[temp]-&gt;get_img()-&gt;get_width(),collideQueue[temp]-&gt;get_img()-&gt;get_height());&#xD;&#xA;&#xD;&#xA;    if (prevPos.y &gt;= collideQueue[temp]-&gt;get_prev_pos().y + collideQueue[temp]-&gt;get_img()-&gt;get_height())&#xD;&#xA;      if (tcol.top &gt; 0) {&#xD;&#xA;        add_pos(0,tcol.top);&#xD;&#xA;        set_vel(get_vel().x,collideQueue[temp]-&gt;get_vel().y);&#xD;&#xA;        did_handle = true;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;    if (prevPos.y + get_img()-&gt;get_height() &lt;= collideQueue[temp]-&gt;get_prev_pos().y)&#xD;&#xA;      if (tcol.bottom &gt; 0) {&#xD;&#xA;        add_pos(0,-tcol.bottom);&#xD;&#xA;        set_vel(get_vel().x,collideQueue[temp]-&gt;get_vel().y);&#xD;&#xA;        ableToJump = true;&#xD;&#xA;        did_handle = true;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (int temp = 0; temp &lt; collideQueue.size(); temp++) {&#xD;&#xA;    tcol = get_collision(x,y,get_img()-&gt;get_width(),get_img()-&gt;get_height(),&#xD;&#xA;                         collideQueue[temp]-&gt;get_position().x,collideQueue[temp]-&gt;get_position().y,&#xD;&#xA;                        collideQueue[temp]-&gt;get_img()-&gt;get_width(),collideQueue[temp]-&gt;get_img()-&gt;get_height());&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      if (prevPos.x + get_img()-&gt;get_width() &lt;= collideQueue[temp]-&gt;get_prev_pos().x)&#xD;&#xA;        if (tcol.left &gt; 0) {&#xD;&#xA;          cout &lt;&lt; &quot;\nleft&quot;;&#xD;&#xA;          add_pos(-tcol.left,0);&#xD;&#xA;          set_vel(collideQueue[temp]-&gt;get_vel().x,get_vel().y);&#xD;&#xA;          did_handle = true;&#xD;&#xA;        }&#xD;&#xA;      if (prevPos.x &gt;= collideQueue[temp]-&gt;get_prev_pos().x + collideQueue[temp]-&gt;get_img()-&gt;get_width())&#xD;&#xA;        if (tcol.right &gt; 0) {&#xD;&#xA;          cout &lt;&lt; &quot;\nright&quot;;&#xD;&#xA;          add_pos(tcol.right,0);&#xD;&#xA;          set_vel(collideQueue[temp]-&gt;get_vel().x,get_vel().y);&#xD;&#xA;          did_handle = true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    return did_handle;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;then I clear the queue. pretty easy, and it works *perfectly*!!&#xD;&#xA;" />
  <row Id="20173" PostHistoryTypeId="2" PostId="9741" RevisionGUID="223e4ea6-1183-47f5-83c9-2ec46bc556d4" CreationDate="2011-03-13T22:47:35.787" UserId="1199" Text="How can I determine which of the sides on a Rectangle that was hit by another Rectangle (or Circle if that's easier)? &#xD;&#xA;&#xD;&#xA;I originally tried creating 8 subrectangles for my main rectangle - one for each side and corner - with the appropriate length and width of one pixel. This didn't work out very well though, to my understanding it was thwarted by the speed and update frequency... &#xD;&#xA;&#xD;&#xA;Any thoughts?" />
  <row Id="20174" PostHistoryTypeId="1" PostId="9741" RevisionGUID="223e4ea6-1183-47f5-83c9-2ec46bc556d4" CreationDate="2011-03-13T22:47:35.787" UserId="1199" Text="Side detection on Rectangle collision detection?" />
  <row Id="20175" PostHistoryTypeId="3" PostId="9741" RevisionGUID="223e4ea6-1183-47f5-83c9-2ec46bc556d4" CreationDate="2011-03-13T22:47:35.787" UserId="1199" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="20176" PostHistoryTypeId="2" PostId="9742" RevisionGUID="505e8869-9488-4164-8b3e-fdcf4da0fb05" CreationDate="2011-03-13T22:49:43.257" UserId="1929" Text="Compare the X and Y coordinates of both rectangles. Apart from strange cases (like one rectangle being submerged entirely in another, or one rectangle being a super-set of the other) these should be sufficient to tell you.&#xD;&#xA;&#xD;&#xA;If you have the middle-point of the two shapes, that might also be an easier way to tell the relative positioning of the two objects." />
  <row Id="20177" PostHistoryTypeId="2" PostId="9743" RevisionGUID="52ea66b9-5c17-4503-b485-739f1100b36d" CreationDate="2011-03-13T23:03:09.050" UserId="5267" Text="Its not easy to answer this question, without having more information on your game. The answer from wkerslake works as long as the current playthrough with the ghost can not affect the determinism of the recorded ghost data. If the recorded data is a single car time trial in a static environment, you should be alright using that technique.&#xD;&#xA;&#xD;&#xA;However in many games with ghost playback, such as Super Meat Boy, the position of the player can change the state of the level and AI. Clearly, you can't have the ghost affecting the world and AI, so it might be better to just record position + animation changes (and anything else visible) every frame for the main player. During playback, just render the ghost at the current location and animation frame without having it be in the world. This allows you to playback a ghost and not have the current player affect it." />
  <row Id="20178" PostHistoryTypeId="25" PostId="9738" RevisionGUID="4e9192b7-8e49-49f3-a64d-3951507914f6" CreationDate="2011-03-13T23:23:27.660" Comment="http://twitter.com/#!/StackGameDev/status/47075328589434881" />
  <row Id="20180" PostHistoryTypeId="2" PostId="9744" RevisionGUID="11552d3c-a81e-442e-a984-2a9f044696fa" CreationDate="2011-03-13T23:42:45.380" UserId="5899" Text="I've tested your code on a little program with OpenGL on a 2D space and the algorithm seems correct.&#xD;&#xA;&#xD;&#xA;You says that direction is a non-normalized vector. Review that the method positionOnLine uses a normalized vector to do his calculations. I've used:&#xD;&#xA;&#xD;&#xA;    Vector2Df positionOnLine( float d )&#xD;&#xA;    {&#xD;&#xA;        // where m_direction is a normalized vector&#xD;&#xA;        return m_point + m_direction * d; &#xD;&#xA;    }" />
  <row Id="20181" PostHistoryTypeId="2" PostId="9745" RevisionGUID="1dd7cfd6-bcfd-4209-8bf6-d128283ae99f" CreationDate="2011-03-14T00:24:31.397" UserId="3547" Text="I'm not really familiar with action script, but it looks pretty familiar to C# and I think I understand your question/dilemma.&#xD;&#xA;&#xD;&#xA;It might be beneficial to have certain triggers (like when a player steps on the tile or when anything steps on the tile). These triggers could be part of a tile or possibly part of a map.&#xD;&#xA;&#xD;&#xA;Then you assign actions to do to when these triggers fire/occur. &#xD;&#xA;&#xD;&#xA;Basically, this event system is split into two parts. One part (the trigger) alerts the action to be executed. The second part actually executes the action and possibly checks for extra conditions.&#xD;&#xA;&#xD;&#xA;If you did this then your map editor would be able to assign triggers to a tile (or a map). Then you could specify an action to execute for that specific trigger. So your trigger for the teleport tile would do the collision check (or hook into some physics/collision system in order to be notified when a collision occurred with the tile) and then fire off the teleport action.&#xD;&#xA;&#xD;&#xA;PS: I would consider having the action being specified with more than just a string (or at least a string that can also have arguments in it). How would you specify where that tile teleports the player if the string has to be &quot;TELEPORT&quot;. Just some food for thought." />
  <row Id="20182" PostHistoryTypeId="2" PostId="9746" RevisionGUID="a20de794-5749-4971-8115-8b5ba53efe75" CreationDate="2011-03-14T00:27:53.063" UserId="5932" Text="Gosh I find myself referring to my code a lot =D&#xD;&#xA;&#xD;&#xA;What I do is check your previous position, to see if it was previously outside of the rectangle, this works flawlessly in my game engine =)&#xD;&#xA;&#xD;&#xA;to get the previous position I use an update method, which I call once a frame." />
  <row Id="20183" PostHistoryTypeId="5" PostId="9745" RevisionGUID="520fc464-4299-4bd2-ac02-61301f676c0c" CreationDate="2011-03-14T00:37:24.210" UserId="3547" Comment="added 67 characters in body; added 53 characters in body" Text="I'm not really familiar with action script, but it looks pretty familiar to C# and I think I understand your question/dilemma.&#xD;&#xA;&#xD;&#xA;It might be beneficial to have certain triggers (like when a player steps on the tile or when anything steps on the tile). These triggers could be part of a tile or possibly part of a map.&#xD;&#xA;&#xD;&#xA;Then you assign actions to do to when these triggers fire/occur. &#xD;&#xA;&#xD;&#xA;Basically, this event system is split into two parts. One part (the trigger) alerts the action to be executed. The second part actually executes the action and possibly checks for extra conditions.&#xD;&#xA;&#xD;&#xA;If you did this then your map editor would be able to assign triggers to a tile (or a map). Then you could specify an action to execute for that specific trigger. So your trigger for the teleport tile would do the collision check (or hook into some physics/collision system in order to be notified when a collision occurred with the tile) and then fire off the teleport action.&#xD;&#xA;&#xD;&#xA;PS: I would consider having the action being specified with more than just a string (or at least a string that can also have arguments in it). How would you specify where that tile teleports the player if the string has to be &quot;TELEPORT&quot;. Just some food for thought.&#xD;&#xA;&#xD;&#xA;Also, part of your question (near the end) seems to be missing? &quot;The main problem i'm having is the [missing part?]&quot;" />
  <row Id="20184" PostHistoryTypeId="2" PostId="9747" RevisionGUID="bec363ef-85bd-4660-bc85-ba33c327c8b2" CreationDate="2011-03-14T01:51:58.530" UserId="5768" Text="Slick2d supports the map editor I just linked." />
  <row Id="20185" PostHistoryTypeId="5" PostId="9743" RevisionGUID="f89cb71e-065c-43f5-ad42-fd535d33f0c5" CreationDate="2011-03-14T01:53:04.953" UserId="5267" Comment="deleted 1 characters in body" Text="Its not easy to answer this question without having more information on your game. The answer from wkerslake works as long as the current playthrough with the ghost can not affect the determinism of the recorded ghost data. If the recorded data is a single car time trial in a static environment, you should be alright using that technique.&#xD;&#xA;&#xD;&#xA;However in many games with ghost playback, such as Super Meat Boy, the position of the player can change the state of the level and AI. Clearly, you can't have the ghost affecting the world and AI, so it might be better to just record position + animation changes (and anything else visible) every frame for the main player. During playback, just render the ghost at the current location and animation frame without having it be in the world. This allows you to playback a ghost and not have the current player affect it." />
  <row Id="20186" PostHistoryTypeId="25" PostId="9737" RevisionGUID="b78be8dc-419b-4de4-8128-d3c1ce8602cc" CreationDate="2011-03-14T02:23:27.830" Comment="http://twitter.com/#!/StackGameDev/status/47120627714359297" />
  <row Id="20187" PostHistoryTypeId="2" PostId="9748" RevisionGUID="54c0fd53-7693-4db6-b925-6bba375f257e" CreationDate="2011-03-14T03:16:35.840" UserId="5413" Text="I've read forum threads and questions and I done just about everything. I need to know what am I  screwing up here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's the code in the constructor.&#xD;&#xA;&#xD;&#xA;    Content.RootDirectory = &quot;GameStateContent&quot;;&#xD;&#xA;    //Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;&#xD;&#xA;And this is in the LoadContent method&#xD;&#xA;&#xD;&#xA;     menu = this.Content.Load&lt;Texture2D&gt;(&quot;mainmenu&quot;);&#xD;&#xA;&#xD;&#xA;And here's the image screen shot of the folder structure.&#xD;&#xA;http://i.stack.imgur.com/HnndE.png&#xD;&#xA;&#xD;&#xA;Any helps on this?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="20188" PostHistoryTypeId="1" PostId="9748" RevisionGUID="54c0fd53-7693-4db6-b925-6bba375f257e" CreationDate="2011-03-14T03:16:35.840" UserId="5413" Text="XNA - Am I screwing up the LoadContent for Texture2D?" />
  <row Id="20189" PostHistoryTypeId="3" PostId="9748" RevisionGUID="54c0fd53-7693-4db6-b925-6bba375f257e" CreationDate="2011-03-14T03:16:35.840" UserId="5413" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="20193" PostHistoryTypeId="2" PostId="9750" RevisionGUID="a4b4b9a6-219e-4103-b436-91b85dc49cd6" CreationDate="2011-03-14T04:38:59.607" UserId="189" Text="Your images still need to go in the Content folder of your content project; and they have the same names as images in your GameState project, so I presume there will be a conflict there and you'll need to remove or rename one set of the images. I don't think you need to modify Content.RootDirectory, but you do need to make sure your GameState project references your GameStateContent project. [Instructions here.][1]&#xD;&#xA;&#xD;&#xA;If I may ask, why do you need the separate content project?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff434572.aspx" />
  <row Id="20196" PostHistoryTypeId="2" PostId="9751" RevisionGUID="771492fd-3ecc-4c6f-87dc-4680e5a8a42d" CreationDate="2011-03-14T04:55:01.363" UserId="2111" Text="My question is relatively hard to explain(for me, at least), so I'll go one step at a time and just tell me in the comments if it's not clear enough.&#xD;&#xA;&#xD;&#xA;So I'm making a &quot;Defend Your Castle&quot; type 2D game, where two players own a castle and create units that will move horizontally to try to destroy the opponent's base. Here's a screenshot of the game:&#xD;&#xA;&#xD;&#xA;![][1]&#xD;&#xA;&#xD;&#xA;The distance between both castles is much bigger in a real game though, bigger than the screen's width actually. &#xD;&#xA;&#xD;&#xA;Because the distance is bigger than the screen's width, I had to implement a simple 2D camera: `Camera2D`, which only holds a Location Vector2 (and I always make sure this camera is within the field area). &#xD;&#xA;&#xD;&#xA;Then, I just move all the game elements(castles, units, health bars) by that location, so that if a unit is at (5, 0), and the camera's location is (5, 0), then the unit's position will be moved by 5 units to the left, making it (0, 0) on the screen.&#xD;&#xA;&#xD;&#xA;At first, I simply used a static background with mountains and clouds(yeah, those are supposed to be mountains and clouds). Obviously, this looked awful: when you moved the camera, the background would stay immobile. &#xD;&#xA;&#xD;&#xA;Instead, I'd like to make a moving background, kind of a &quot;scrolling&quot; one. But rather than making a background with the same width as the distance between the castles, I'd like to make one that is a little bit smaller(but still bigger than the screen's width). I thought this would create an effect of &quot;distance&quot; with the background(but it might just look awful, too).&#xD;&#xA;&#xD;&#xA;Here's the background I'm testing with:&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I tried different ways, but none of them seems to work. I tried this:&#xD;&#xA;&#xD;&#xA;    float backgroundFieldRatio = BackgroundTexture.Width / fieldWidth;//find the ratio between the background and the field.&#xD;&#xA;    float backgroundPositionX = -cam.Location.X * backgroundFieldRatio;//move the background to the left&#xD;&#xA;&#xD;&#xA;When I run this with `fieldWith = 1600`, `BackgroundTexture.Width = 1500` and while looking at the rightmost area, the background is offset to the left by a too big amount, and we can see the black clear color in the back, as you can see here:&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;I hope I explained properly what I'm trying to achieve.&#xD;&#xA;&#xD;&#xA;Thank you for your time.&#xD;&#xA;&#xD;&#xA;*Note: I didn't know what to look for on Google, so I thought I'd ask here.*&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Td2NG.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/AvgOa.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/ICdcJ.png" />
  <row Id="20197" PostHistoryTypeId="1" PostId="9751" RevisionGUID="771492fd-3ecc-4c6f-87dc-4680e5a8a42d" CreationDate="2011-03-14T04:55:01.363" UserId="2111" Text="XNA - Moving Background Calculations" />
  <row Id="20198" PostHistoryTypeId="3" PostId="9751" RevisionGUID="771492fd-3ecc-4c6f-87dc-4680e5a8a42d" CreationDate="2011-03-14T04:55:01.363" UserId="2111" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;" />
  <row Id="20199" PostHistoryTypeId="2" PostId="9752" RevisionGUID="8fb1e723-7770-4ddd-8e97-dc54431223ee" CreationDate="2011-03-14T05:10:26.737" UserId="5932" Text="Sounds like you are indeed talking about parallax scrolling. &#xD;&#xA;&#xD;&#xA;(it's not c# or XNA, but the skills are transferable)  &#xD;&#xA;You can read up on some simple scrolling backgrounds in an sdl tutorial actually  &#xD;&#xA;http://lazyfoo.net/SDL_tutorials/lesson22/index.php&#xD;&#xA;&#xD;&#xA;(one of my all time favorite tutorials)&#xD;&#xA;&#xD;&#xA;Then you can make multiple layers, and move them relative to the camera's position." />
  <row Id="20200" PostHistoryTypeId="25" PostId="9748" RevisionGUID="30618a7f-7ad6-4c6a-9bac-d17ce0f0915b" CreationDate="2011-03-14T05:23:27.770" Comment="http://twitter.com/#!/StackGameDev/status/47165926306615296" />
  <row Id="20201" PostHistoryTypeId="2" PostId="9753" RevisionGUID="c25123dd-b727-43ba-9f65-abf0d0bc77b7" CreationDate="2011-03-14T05:45:06.253" UserId="288" Text="Your problem is that you are changing the root directory to the wrong thing!&#xD;&#xA;&#xD;&#xA;Based on your screenshot, your content project is called &quot;GameStateContent&quot;, and using the default template will be created in a directory called &quot;GameStateContent&quot;, next to which Visual Studio will copy all the content files you drag onto that content project (if they are not there already).&#xD;&#xA;&#xD;&#xA;But the **output directory** (the thing in brackets, in Solution Explorer) is still &quot;Content&quot;. This is where the content project outputs the XNB files that it builds from your input files. So if you tell XNA that the content root directory is &quot;GameStateContent&quot; then it will be looking in the wrong place!&#xD;&#xA;&#xD;&#xA;If you click the project and press F4 to bring up the properties window, you can change the root directory.&#xD;&#xA;&#xD;&#xA;The `ContentManager` in XNA basically looks for XNB files in the directory you specify, next to the game executable. You can go in and look at that directory in your project output directory. It will probably be:&#xD;&#xA;&#xD;&#xA;`GameState\bin\x86\Debug\Content`&#xD;&#xA;&#xD;&#xA;Go in and have a look for it, check it has the right name and contains the right XNB files.&#xD;&#xA;&#xD;&#xA;I don't understand why your *game* project has a &quot;Content&quot; directory (or bin and obj, for that matter). Or why there's another &quot;Content&quot; directory in your GameStateContent project. You can probably safely remove those." />
  <row Id="20202" PostHistoryTypeId="2" PostId="9754" RevisionGUID="1c3a096d-0540-49b5-a684-c6f69ddb464d" CreationDate="2011-03-14T05:58:03.667" UserId="5759" Text="I just developed a facebook game(mifia like), but the graphic I make is not good, because it is reference with some existing photo, trace with AI, and coloring it. &#xD;&#xA;&#xD;&#xA;Therefore, I invite my friend to join me, he is a graphic designer, own a company with his friend (I know both of them), for the share, I expect at least 70% for me, and at most 30% for them (both of them want to join).&#xD;&#xA;&#xD;&#xA;Therefore, they give me a counter offer, 60% for me and 40% for them, of course, I think it is unacceptable because they only build the image in part time, and all the other work just like coding, webhosting...etc, is I do in full time. Why they said they worth 40% is that they will make a good graphic, they can provide a advertise channel(on local magazine), etc... Actually, I don't think the game need advertisement on local magazine because the game is not target for local...&#xD;&#xA;&#xD;&#xA;Please give me some comments on this issue, or can anyone share the experience on this.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20203" PostHistoryTypeId="1" PostId="9754" RevisionGUID="1c3a096d-0540-49b5-a684-c6f69ddb464d" CreationDate="2011-03-14T05:58:03.667" UserId="5759" Text="share distribution question" />
  <row Id="20204" PostHistoryTypeId="3" PostId="9754" RevisionGUID="1c3a096d-0540-49b5-a684-c6f69ddb464d" CreationDate="2011-03-14T05:58:03.667" UserId="5759" Text="&lt;game-design&gt;&lt;distribution&gt;" />
  <row Id="20205" PostHistoryTypeId="2" PostId="9755" RevisionGUID="bfade0bc-1387-4ee1-9b8b-fb6e579308d0" CreationDate="2011-03-14T06:19:36.643" UserId="288" Text="First of all, you've got a bit of a maths problem:&#xD;&#xA;&#xD;&#xA;I can't be entirely sure from the code you've posted, but if `fieldWidth` is an `int` and not a `float`, then your `backgroundFieldRatio` will not be set correctly (you are dividing two integers and getting an integer result). **It will be set to `0.0f`**. Based on the results you are getting, I suspect this is the case.&#xD;&#xA;&#xD;&#xA;Second of all, the way you are setting your object positions based on the camera is quite ugly.&#xD;&#xA;&#xD;&#xA;Basically when you do parallax scrolling you have multiple 2D &quot;cameras&quot;. You should set your camera position to *target* somewhere in world space&#xD;&#xA;&#xD;&#xA;    Vector2 cameraTarget;&#xD;&#xA;&#xD;&#xA;You can have your parallax camera as:&#xD;&#xA;&#xD;&#xA;    float ratio = 0.9f;&#xD;&#xA;    Vector2 parallaxCameraTarget = cameraTarget * ratio;&#xD;&#xA;&#xD;&#xA;Then just draw your parallax scene first using the parallax camera, and then draw your main scene on top using the main camera.&#xD;&#xA;&#xD;&#xA;Now, **don't draw sprites like this:**&#xD;&#xA;&#xD;&#xA;    sb.Draw(texture, position - cameraTarget, Color.White); // BAD!&#xD;&#xA;&#xD;&#xA;What you should do is create a translation matrix in your `Begin` call and simply draw all your sprites in World Space:&#xD;&#xA;&#xD;&#xA;    Matrix camera = Matrix.CreateTranslation(-cameraTarget.X, -cameraTarget.Y, 0f);&#xD;&#xA;    sb.Begin(SpriteSortMode.Deferred, null, null, null, null, camera);&#xD;&#xA;&#xD;&#xA;    sb.Draw(texture, position, Color.White);&#xD;&#xA;&#xD;&#xA;That way you can modify how your camera works without having to adjust every single `Draw` call!" />
  <row Id="20206" PostHistoryTypeId="5" PostId="9753" RevisionGUID="b626f9c4-c561-47a2-905f-1352450c46f0" CreationDate="2011-03-14T06:24:53.893" UserId="288" Comment="added 171 characters in body" Text="Your problem is that you are changing the root directory to the wrong thing!&#xD;&#xA;&#xD;&#xA;Based on your screenshot, your content project is called &quot;GameStateContent&quot;, and using the default template will be created in a directory called &quot;GameStateContent&quot;. That is the directory to which Visual Studio will copy all the content files you drag onto that content project (if they are not there already).&#xD;&#xA;&#xD;&#xA;But the **output directory** (the thing in brackets, in Solution Explorer) is still &quot;Content&quot;. This is where the content project outputs the XNB files that it builds from your input files. So if you tell XNA that the content root directory is &quot;GameStateContent&quot; then it will be looking in the wrong place!&#xD;&#xA;&#xD;&#xA;If you click the project and press F4 to bring up the properties window, you can change the root directory.&#xD;&#xA;&#xD;&#xA;The `ContentManager` in XNA basically looks for XNB files in the directory you specify, next to the game executable. You can go in and look at that directory in your project output directory. It will probably be:&#xD;&#xA;&#xD;&#xA;`GameState\bin\x86\Debug\Content`&#xD;&#xA;&#xD;&#xA;Go in and have a look for it, check it has the right name and contains the right XNB files.&#xD;&#xA;&#xD;&#xA;I don't understand why your *game* project has a &quot;Content&quot; directory (or bin and obj, for that matter). Or why there's another &quot;Content&quot; directory in your GameStateContent project. You can probably safely remove those.&#xD;&#xA;&#xD;&#xA;Providing you haven't made any other strange changes, you should be able to simply set:&#xD;&#xA;&#xD;&#xA;    Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;&#xD;&#xA;and have it work." />
  <row Id="20208" PostHistoryTypeId="2" PostId="9756" RevisionGUID="bf5066a6-a405-425f-8c3a-01a5de393d24" CreationDate="2011-03-14T07:19:46.377" UserId="2792" Text="There are a couple of ways to reduce data. First see if you can drop from float to some other format. Can you use 16bit integers for position and store a scale per mesh? Can you compress normals? Two floats might work, or two integers, or use a format like GL_INT_2_10_10_10_REV. Compress other vertex data in similar fashion.&#xD;&#xA;&#xD;&#xA;How do you render your data? Triangles? Try using triangle strips and reuse vertex data as much as possible. Use primitive restart if you cannot render your whole mesh in one strip. Use something like [NVidia Mesh Tools][1] to generate this data.&#xD;&#xA;&#xD;&#xA;At least something to start with. =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/nvidia-mesh-tools/" />
  <row Id="20209" PostHistoryTypeId="2" PostId="9757" RevisionGUID="3be8a5f2-ee7e-4eb1-bcb3-e8ac3daf9cf7" CreationDate="2011-03-14T08:02:48.120" UserId="20" Text="The solution to your problem is actually quite simple. Instead of calculating the ratio, you calculate the possible movement-distances for camera and background and interpolate them.&#xD;&#xA;&#xD;&#xA;For the background this is going to be: `bgMovement = fieldWidth - backgroundWidth` (results in 100)&#xD;&#xA;&#xD;&#xA;For the camera it's `camMovement = fieldWidth - viewPortWidth`.&#xD;&#xA;&#xD;&#xA;Assuming that the camera x-coordinate is at the left, your background position would be:&#xD;&#xA;&#xD;&#xA;`background.X = -cam.X + (bgMovement / camMovement * cam.X)`" />
  <row Id="20210" PostHistoryTypeId="5" PostId="9754" RevisionGUID="eb252495-91ce-4df0-9852-f7b59bf7a5d2" CreationDate="2011-03-14T08:05:28.130" UserId="5759" Comment="added 95 characters in body; added 21 characters in body" Text="I just developed a facebook game(mifia like), but the graphic I make is not good, because it is reference with some existing photo, trace with AI, and coloring it. &#xD;&#xA;&#xD;&#xA;Therefore, I invite my friend to join me, he is a graphic designer, own a company with his friend (I know both of them), for the share, I expect at least 70% for me, and at most 30% for them (both of them want to join).&#xD;&#xA;&#xD;&#xA;Therefore, they give me a counter offer, 60% for me and 40% for them, of course, I feel their counter offer is unacceptable because they only build the image in part time, and all the other work just like coding, webhosting...etc, is what I do in full time. Why they said they worth 40% is that they will make a good graphic, they can provide a advertise channel(on local magazine), etc... Actually, I don't think the game need advertisement on local magazine because the game is not target for local...&#xD;&#xA;&#xD;&#xA;Please give me some comments on this issue(is the share fair? what is the importance of the image of the game, is it worth more than 30%), or can anyone share the experience on this.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20211" PostHistoryTypeId="5" PostId="9757" RevisionGUID="378b185c-0a12-4f13-ba6e-06bc9335134c" CreationDate="2011-03-14T08:19:11.610" UserId="20" Comment="added 48 characters in body" Text="The solution to your problem is actually quite simple. Instead of calculating the ratio, you calculate the possible movement-distances for camera and background and interpolate them.&#xD;&#xA;&#xD;&#xA;For the background this is going to be: `bgMovement = fieldWidth - backgroundWidth` (results in 100)&#xD;&#xA;&#xD;&#xA;For the camera it's `camMovement = fieldWidth - viewPortWidth`.&#xD;&#xA;&#xD;&#xA;Assuming that the camera x-coordinate is at the left, your background position would be:&#xD;&#xA;&#xD;&#xA;`background.X = -cam.X + (bgMovement / camMovement * cam.X)` (assuming cam.X goes from `0` to `camMovement`)" />
  <row Id="20212" PostHistoryTypeId="25" PostId="9754" RevisionGUID="babf7d0e-1e4f-4eca-b87a-4f4fb167d61f" CreationDate="2011-03-14T08:23:27.693" Comment="http://twitter.com/#!/StackGameDev/status/47211224198426624" />
  <row Id="20213" PostHistoryTypeId="6" PostId="9754" RevisionGUID="4ee73734-28d8-4799-a76e-9cf68adbaa06" CreationDate="2011-03-14T08:35:04.943" UserId="51" Comment="edited tags; deleted 23 characters in body" Text="&lt;business&gt;" />
  <row Id="20214" PostHistoryTypeId="2" PostId="9758" RevisionGUID="8d76101a-62df-4762-a344-bb5d895dc9fb" CreationDate="2011-03-14T08:36:43.240" UserId="51" Text="Share percentages and negotiations are something you're going to have to work out with your partners.&#xD;&#xA;&#xD;&#xA;That said, this related question might help: http://gamedev.stackexchange.com/questions/2555/splitting-profit-equal-share-vs-equity-investment-work-money-spent-share" />
  <row Id="20215" PostHistoryTypeId="5" PostId="9754" RevisionGUID="4ee73734-28d8-4799-a76e-9cf68adbaa06" CreationDate="2011-03-14T08:35:04.943" UserId="51" Comment="edited tags; deleted 23 characters in body" Text="I just developed a facebook game(mifia like), but the graphics I made are not good, because it is reference with some existing photo, trace with AI, and coloring it. &#xD;&#xA;&#xD;&#xA;Therefore, I invited my friend to join me, he is a graphic designer, owns a company with his friend (I know both of them), for the shares, I expect at least 70% for me, and at most 30% for them (both of them want to join).&#xD;&#xA;&#xD;&#xA;Therefore, they give me a counter offer, 60% for me and 40% for them, of course, I feel their counter offer is unacceptable because they only build the image in part time, and all the other work just like coding, webhosting...etc, is what I do in full time. Why they said they worth 40% is that they will make a good graphic, they can provide a advertise channel(on local magazine), etc... Actually, I don't think the game need advertisement on local magazine because the game is not target for local...&#xD;&#xA;&#xD;&#xA;Please give me some comments on this issue (is the share fair? what is the importance of the image of the game, is it worth more than 30%), or can anyone share the experience on this." />
  <row Id="20216" PostHistoryTypeId="2" PostId="9759" RevisionGUID="166f0cca-7913-4297-a94b-ebce45e7c29a" CreationDate="2011-03-14T09:01:45.317" UserId="3794" Text="It works like this: more share you have -&gt; you more work for the company (idealy, doesnt have to). If they are good designers they could really help you in making beutiful design (and that matters). If they have design company, they propably know something about marketing (maybe more than you, if you are programmer). Thats something to consider if they could bring something good (and unique you dont have) to the project. If it is true, than 40% is not that bad. It should motivate them. And you still hava majority 60%.&#xD;&#xA;&#xD;&#xA;And for the last. It is little typical to ask for bigger share and see what happens. Maybe they will be ok with 30%." />
  <row Id="20217" PostHistoryTypeId="5" PostId="9757" RevisionGUID="65fe1491-1251-4500-b5f4-89987ddd7b10" CreationDate="2011-03-14T09:12:06.270" UserId="20" Comment="added alternate way of caluclating movement; added 54 characters in body" Text="The solution to your problem is actually quite simple. Instead of calculating the ratio, you calculate the possible movement-distances for camera and background and interpolate them.&#xD;&#xA;&#xD;&#xA;For the background this is going to be: `bgMovement = fieldWidth - backgroundWidth` (results in 100)&#xD;&#xA;&#xD;&#xA;For the camera it's `camMovement = fieldWidth - viewPortWidth`.&#xD;&#xA;&#xD;&#xA;Assuming that the camera x-coordinate is at the left, your background position would be:&#xD;&#xA;&#xD;&#xA;`background.X = -cam.X + (bgMovement / camMovement * cam.X)` (assuming `cam.X` goes from `0` to `camMovement`)&#xD;&#xA;&#xD;&#xA;**Update:** If you want to stick with the `backgroundFieldRatio` (which is probably more intuitive) you can calculate it like this:&#xD;&#xA;&#xD;&#xA;`backgroundFieldRatio = (backgroundWidth - viewPortWidth) / (fieldWidth - viewPortWidth);`&#xD;&#xA;&#xD;&#xA;This should give you the proper movement ratio to plug into your code (or the one proposed by Andrew Russell in his answer)." />
  <row Id="20218" PostHistoryTypeId="2" PostId="9760" RevisionGUID="41e3047f-d0b3-4226-b96a-16719b33f677" CreationDate="2011-03-14T09:17:17.260" UserId="5440" Text="even though this can be application bound and depends on how much you generate geometry and how dynamic your application is , there is a general rules you can follow. &#xD;&#xA;&#xD;&#xA;specify how your VBOs will be used. &#xD;&#xA;&quot;Static&quot; means the data in VBO will not be changed (specified once and used many times), &quot;dynamic&quot; means the data will be changed frequently (specified and used repeatedly), and &quot;stream&quot; means the data will be changed every frame (specified once and used once). &quot;Draw&quot;&#xD;&#xA;so in your case they should be dynamic.&#xD;&#xA;&#xD;&#xA;update your existing VBOs using &#xD;&#xA;void glBufferSubData(GLenum target, GLint offset, GLsizei size, void* data)&#xD;&#xA;glMapBufferARB() , glUnMapBufferARB().&#xD;&#xA;&#xD;&#xA;about using STD::Vector I think this can hurt performance if you add and remove a lot of objects.&#xD;&#xA;try to specify a vector with predefined quantity to minimize memory copy.&#xD;&#xA;&#xD;&#xA;as for shaders I don't think this makes any difference as long as you track transformation matrices (player position, rotation.) &#xD;&#xA;&#xD;&#xA;for more on VBOs refer to http://www.songho.ca/opengl/gl_vbo.html" />
  <row Id="20219" PostHistoryTypeId="5" PostId="9714" RevisionGUID="feae0e04-5289-47c0-a20b-81542375c566" CreationDate="2011-03-14T10:14:23.260" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;, tiny spelling fix" Text="Today I am trying to make it so if I hit the enemy then the enemy will be knocked backwards in the direction the sprite is facing. I am rotating the sprite around 360 degrees using a joystick on the screen and wanted to know the best practice or ways to accomplish this.  I have come up with a few ideas but none of them make use of the sprites angle he is facing just a check to see if I hit the bottom then move him upward and so forth. I am just stumped on how to apply the sprites angle to the enemies x and y coordinate and move him accordingly. Has anyone tried this and have suggestions or things to look for? &#xD;&#xA;" />
  <row Id="20220" PostHistoryTypeId="2" PostId="9761" RevisionGUID="aae73fad-523f-4714-b6e6-6c7365b2159c" CreationDate="2011-03-14T10:17:08.127" UserId="6070" Text="So I am working on a platformer game which includes music with beat detection. I am currently using a simple if the energy that is stored in the history buffer is smaller then the current energy there is a beat. The problem with this is that ofcourse if you use songs like rock songs where you have a pretty steady amplitude this isn't going to work.&#xD;&#xA;&#xD;&#xA;So I looked further and found algorithms splitting the sound into multiple bands using FFT. I then found this : http://en.literateprograms.org/Cooley-Tukey_FFT_algorithm_(C)&#xD;&#xA;&#xD;&#xA;The only problem I'm having is that I am quite new to audio and I have no idea how to use that to split the signal up into multiple signals.&#xD;&#xA;&#xD;&#xA;So my question is : &#xD;&#xA;&#xD;&#xA;How do you use a FFT to split a signal into multiple bands ?&#xD;&#xA;&#xD;&#xA;Also for the guys interested, this is my algorithm in c# :&#xD;&#xA;&#xD;&#xA;    // C = threshold, N = size of history buffer / 1024&#xD;&#xA;        public void PlaceBeatMarkers(float C, int N)&#xD;&#xA;        {&#xD;&#xA;            List&lt;float&gt; instantEnergyList = new List&lt;float&gt;();&#xD;&#xA;            short[] samples = soundData.Samples;&#xD;&#xA;&#xD;&#xA;            float timePerSample = 1 / (float)soundData.SampleRate;&#xD;&#xA;            int sampleIndex = 0;&#xD;&#xA;            int nextSamples = 1024;&#xD;&#xA;&#xD;&#xA;            // Calculate instant energy for every 1024 samples.&#xD;&#xA;            while (sampleIndex + nextSamples &lt; samples.Length)&#xD;&#xA;            {&#xD;&#xA;&#xD;&#xA;                float instantEnergy = 0;&#xD;&#xA;&#xD;&#xA;                for (int i = 0; i &lt; nextSamples; i++)&#xD;&#xA;                {&#xD;&#xA;                    instantEnergy += Math.Abs((float)samples[sampleIndex + i]);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                instantEnergy /= nextSamples;&#xD;&#xA;                instantEnergyList.Add(instantEnergy);&#xD;&#xA;&#xD;&#xA;                if(sampleIndex + nextSamples &gt;= samples.Length)&#xD;&#xA;                    nextSamples = samples.Length - sampleIndex - 1;&#xD;&#xA;&#xD;&#xA;                sampleIndex += nextSamples;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;            int index = N;&#xD;&#xA;            int numInBuffer = index;&#xD;&#xA;            float historyBuffer = 0;&#xD;&#xA;&#xD;&#xA;            //Fill the history buffer with n * instant energy&#xD;&#xA;            for (int i = 0; i &lt; index; i++)&#xD;&#xA;            {&#xD;&#xA;                historyBuffer += instantEnergyList[i];&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // If instantEnergy / samples in buffer &lt; instantEnergy for the next sample then add beatmarker.&#xD;&#xA;            while (index + 1 &lt; instantEnergyList.Count)&#xD;&#xA;            {&#xD;&#xA;                if(instantEnergyList[index + 1] &gt; (historyBuffer / numInBuffer) * C)&#xD;&#xA;                    beatMarkers.Add((index + 1) * 1024 * timePerSample); &#xD;&#xA;                historyBuffer -= instantEnergyList[index - numInBuffer];&#xD;&#xA;                historyBuffer += instantEnergyList[index + 1];&#xD;&#xA;                index++;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20221" PostHistoryTypeId="1" PostId="9761" RevisionGUID="aae73fad-523f-4714-b6e6-6c7365b2159c" CreationDate="2011-03-14T10:17:08.127" UserId="6070" Text="Beat detection and FFT" />
  <row Id="20222" PostHistoryTypeId="3" PostId="9761" RevisionGUID="aae73fad-523f-4714-b6e6-6c7365b2159c" CreationDate="2011-03-14T10:17:08.127" UserId="6070" Text="&lt;game-design&gt;&lt;c#&gt;&lt;programming&gt;&lt;algorithm&gt;&lt;audio&gt;" />
  <row Id="20223" PostHistoryTypeId="2" PostId="9762" RevisionGUID="6d946017-7b6b-4c2d-86fd-463b6ff68fe8" CreationDate="2011-03-14T10:27:03.193" UserId="4264" Text="Here's what I would do.&#xD;&#xA;&#xD;&#xA;Step 1: Don't sort. Just do it. See if it's a problem. Most likely isn't.&#xD;&#xA;&#xD;&#xA;Step 2: Limit particles into such that do not really need sorting, such as:&#xD;&#xA;&#xD;&#xA; - Just solids (with possibly alpha-to-coverage edges)&#xD;&#xA;   - let zbuffer take care of the sorting.&#xD;&#xA;&#xD;&#xA; - Just additive bits&#xD;&#xA;   - a+b = b+a, so order doesn't matter&#xD;&#xA;&#xD;&#xA;Step 3: if more is needed, split particle rendering into bits that have to be in front and the rest, and perform rendering in several passes (could fix complex smoke, for instance)&#xD;&#xA;&#xD;&#xA;Step 4: if more is still needed, or if you need a general solution, one thing that comes to mind would be to use MRTs to get a very rough N bucket sorting done; render the particles into N output surfaces and compose them in a separate pass.&#xD;&#xA;&#xD;&#xA;Anything further would require more information about your specific use case. But I'm pretty sure you don't really need order independency after all. Just use enough particles in random enough and it'll be ok =)" />
  <row Id="20224" PostHistoryTypeId="25" PostId="9761" RevisionGUID="0efe7f56-53af-48b5-a570-dfd321e2c0d8" CreationDate="2011-03-14T11:23:27.803" Comment="http://twitter.com/#!/StackGameDev/status/47256522543218688" />
  <row Id="20225" PostHistoryTypeId="2" PostId="9763" RevisionGUID="35c6dd90-5c63-461c-8733-3129886d75fe" CreationDate="2011-03-14T12:19:10.660" UserId="4830" Text="I am coming close to finish my first iPhone game ever, as a matter of fact also my first programming experience ever, which is a quiz game. I have all the functionality i want and is currently polishing it both from a code point of view as well as looking at the GUI.&#xD;&#xA;&#xD;&#xA;My initial idea was not to use any specific graphics but rather focus on the game experience and simplicity and by that only using background color, orange, and white text as well as buttons. The design is based on that all ages, from learning to read, should be able to host and play this game.&#xD;&#xA;&#xD;&#xA;However, as i am now getting close to the finish line i am starting to think what is needed from a GUI point of view. &#xD;&#xA;&#xD;&#xA;I would like to ask for some advice what to think about when designing a GUI. Is it considered OK without any 'fancy' graphics, what is the risk without it etc.?   &#xD;&#xA;&#xD;&#xA;Also, what colors goes well together if i choose to use a simple GUI. I am thinking about color blindness etc.&#xD;&#xA;&#xD;&#xA;In other words how do i design a good and effective GUI for a simple game as mine?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="20226" PostHistoryTypeId="1" PostId="9763" RevisionGUID="35c6dd90-5c63-461c-8733-3129886d75fe" CreationDate="2011-03-14T12:19:10.660" UserId="4830" Text="What to think about designing a simple GUI for a quiz game" />
  <row Id="20227" PostHistoryTypeId="3" PostId="9763" RevisionGUID="35c6dd90-5c63-461c-8733-3129886d75fe" CreationDate="2011-03-14T12:19:10.660" UserId="4830" Text="&lt;iphone&gt;&lt;ui-design&gt;" />
  <row Id="20228" PostHistoryTypeId="5" PostId="9648" RevisionGUID="d227adf3-db9c-46d9-adcd-371fb2329d03" CreationDate="2011-03-14T13:01:53.287" UserId="4264" Comment="fixed bullet list" Text="I think its a code specific problem not problem with VBOs.. &#xD;&#xA;&#xD;&#xA;- make sure you are not copying VBOs every time.&#xD;&#xA;- make sure you are not misusing VBOs functions (I think there is a small difference between using VBOs in openGL 3.0 and previous versions).&#xD;&#xA;- make sure that openGL is not generating an Error.&#xD;&#xA;- debug your openGL code using gDebugger.  " />
  <row Id="20229" PostHistoryTypeId="24" PostId="9648" RevisionGUID="d227adf3-db9c-46d9-adcd-371fb2329d03" CreationDate="2011-03-14T13:01:53.287" Comment="Proposed by 4264 approved by 189 edit id of 79" />
  <row Id="20230" PostHistoryTypeId="4" PostId="9763" RevisionGUID="02e37ae8-d2c8-4b90-8f29-a45ee5f68091" CreationDate="2011-03-14T13:13:03.467" UserId="4830" Comment="edited title" Text="What to think about when designing a simple GUI for a quiz game" />
  <row Id="20231" PostHistoryTypeId="2" PostId="9764" RevisionGUID="69db52eb-2720-4382-8125-8a3b12aadef0" CreationDate="2011-03-14T13:44:51.350" UserId="6070" Text="I would also keep the design simple, if you are trying to make it too fancy you might end up making it feel messy.&#xD;&#xA;&#xD;&#xA;For the colors I would suggest this site : http://kuler.adobe.com/&#xD;&#xA;&#xD;&#xA;Make sure your menu is straight forward and simple too use. &#xD;&#xA;To avoid color blindness issues try not too use colors like green and red together, try looking at this for the exact schemes : http://en.wikipedia.org/wiki/Color_blindness&#xD;&#xA;&#xD;&#xA;Good luck ! " />
  <row Id="20232" PostHistoryTypeId="2" PostId="9765" RevisionGUID="6832af22-c233-4e86-a3c0-fd9bd2eeece1" CreationDate="2011-03-14T13:51:29.253" UserId="6099" Text="Chaps,&#xD;&#xA;&#xD;&#xA;It is certainly possible (and common) to host DrawableGameComponents 'inside' other classes. Your container class can call their Initialize, Update and Draw methods directly (as described in Zolomon's first post I think). &#xD;&#xA;&#xD;&#xA;It is *not* the case that DrawableGameComponents automatically add themselves to the Game component collection unless you do this explicitly. Some people choose to do this in derived classes immediately on creation, but it is not required.&#xD;&#xA;&#xD;&#xA;This leads, therefore, an alternative approach to GameScreen containment whereby you can maintain the list of child DrawableGameComponents inside the GameScreen class and simply add and remove them from the main Game.Components collection as the screen is activated and deactivated.&#xD;&#xA;&#xD;&#xA;This is the approach used to some extent in the AppHub Ninja game sample (which uses an updated version of the original gamestate classes I think).&#xD;&#xA;&#xD;&#xA;Hope this info is useful." />
  <row Id="20233" PostHistoryTypeId="2" PostId="9766" RevisionGUID="1ef86fed-30ed-4da7-a0c7-f4f5764e624b" CreationDate="2011-03-14T13:55:19.467" UserId="4569" Text="I want to make a multiplayer browser-based game. The nice thing about using an applet is that I can make the client and the server in the same language (java/closure/scala/etc). I know there's html5 and javascript, but server side javascript isn't as mature as the jvm platform and browser support is still kind of flaky.&#xD;&#xA;&#xD;&#xA;Applets don't seem to be widely used (except for Runescape), but is there a reason they're unsuitable or is it just because of the bad reputation they developed in their infancy?" />
  <row Id="20234" PostHistoryTypeId="1" PostId="9766" RevisionGUID="1ef86fed-30ed-4da7-a0c7-f4f5764e624b" CreationDate="2011-03-14T13:55:19.467" UserId="4569" Text="Is there a good reason I shouldn't use a java applet for a game?" />
  <row Id="20235" PostHistoryTypeId="3" PostId="9766" RevisionGUID="1ef86fed-30ed-4da7-a0c7-f4f5764e624b" CreationDate="2011-03-14T13:55:19.467" UserId="4569" Text="&lt;java&gt;&lt;web&gt;" />
  <row Id="20236" PostHistoryTypeId="2" PostId="9767" RevisionGUID="4e799aef-9acd-4da0-9fa6-c8ef49aece32" CreationDate="2011-03-14T14:05:40.207" UserId="189" Text="They are obviously not unsuited for it, as demonstrated by [RuneScape][1] and [Minecraft][2] and other smaller Java applet games. There are also libraries for hardware-accelerated 3D graphics ([LWJGL][3], [JOGL][4]). It's just not a popular language in the game development community.&#xD;&#xA;&#xD;&#xA;You do have to consider your supported platforms though. Windows and Linux have great Java plugins, Mac has a decent one (only works at full speed in Safari in my experience), but obviously platforms such as the iPad and Google's Chrome OS would be completely missed because they do not, and probably will not ever, have the Java VM on them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.runescape.com&#xD;&#xA;  [2]: http://www.minecraft.net&#xD;&#xA;  [3]: http://www.lwjgl.org/&#xD;&#xA;  [4]: http://www.jogamp.org/jogl/" />
  <row Id="20237" PostHistoryTypeId="25" PostId="9766" RevisionGUID="113f9aae-e764-4dd1-99f8-140d9f8ced6e" CreationDate="2011-03-14T14:23:28.210" Comment="http://twitter.com/#!/StackGameDev/status/47301823467487232" />
  <row Id="20238" PostHistoryTypeId="2" PostId="9768" RevisionGUID="bc9fd1a2-09b1-4eff-bf8d-fe08689c256c" CreationDate="2011-03-14T15:38:31.403" UserId="953" Text="If you're planning for the game to be freeware or are prepared to handle making money from it all by yourself, Java's fine. However, it doesn't have an established, wide-spread game sponsorship model like Flash does, so making cash would be a bit harder." />
  <row Id="20239" PostHistoryTypeId="2" PostId="9769" RevisionGUID="400e3ffb-58a3-4118-989f-08a6c63fa853" CreationDate="2011-03-14T15:55:17.070" UserId="252" Text="I haven't done this or read much about it myself, but my first shot is something like this:&#xD;&#xA;&#xD;&#xA;First of all, you'll need to apply a window function to get a time dependent spectrum with the FFT. The beat usually lies in the lower frequencies, so apply _another_ FFT with a bigger time window on the intensities of some of these frequencies (for simplicity start with only 1 at e.g. 100 Hz and see if that is reliable enough). Find the peak in this spectrum and that frequency is a guess for the beat." />
  <row Id="20240" PostHistoryTypeId="2" PostId="9770" RevisionGUID="4755aba1-c23e-4ad1-b5fb-d963d9f473e4" CreationDate="2011-03-14T16:38:20.807" UserId="5957" Text="I use Java to write games and I've used C++ to write games and have found Java to be fine so long as you remain mindful of what Java's strengths and weaknesses are.&#xD;&#xA;  The big two advantages for me, programming in Java are speed of development and deployability/portability. &#xD;&#xA;  Compile times are much faster than in VC++ (can't speak for XCode or Clang yet) which means I can iron out problems much quicker. Also, as Eclipse is compiling constantly, I make fewer typo type errors. I've never written a piece of C++ code that 'just works' on another system or compiler. In Java, this is the norm.&#xD;&#xA;&#xD;&#xA;On the other hand, Java has some major draw backs. Efficiency is often sited as a reason not to use Java but I've found that as long as you code in a certain way, Java can perform quite well. The trouble is, the certain way you have to code goes against what a lot of Java folk would consider good design.  &#xD;&#xA;  At Java's heart is the 'garbage collector', it's memory management system. When writing efficient code, you want to avoid making dynamic allocations every frame in any language and this is particularly true of Java. If you set the garbage collector off due to sloppy new'ing then you can kiss smooth frame rates good bye.&#xD;&#xA;  Secondly (and most annoyingly) Java does not support 1st class user data types. Every user data type in Java is instantiated essentially as a pointer to a class, allocated on the heap. This is awful for cache concurrency that you can't have things like an array of Vector3 objects and have those concurrent in memory - you can have an array of Vector3 pointers but that's not the same thing at all. Generally you have to use offsets into large arrays of primitive types instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20241" PostHistoryTypeId="2" PostId="9771" RevisionGUID="8dda0a8c-7649-4d2e-9198-7844f0f305c9" CreationDate="2011-03-14T17:16:33.333" UserId="1929" Text="I hate to say it, but a good (or bad) UI can make (or break) your application. If possible, get a group of beta-testers together (your friends who all have iPhones?), give them a free copy of your game, and drill them about the UI.&#xD;&#xA;&#xD;&#xA;Assuming you have more than one person who's willing to do this, you can easily see trends in good (and bad).&#xD;&#xA;&#xD;&#xA;Beyond that, I would **pick up a book or two about usability;** that's more important than GUI, imo. If you have a great, usable UI (albeit not sparklingly beautiful), people will like your game. But if you have amazing graphics and poor usability, people will put your game down quickly.&#xD;&#xA;&#xD;&#xA;As for colour-blindness, just don't put red on a green background (or vice versa) and you're good to go. If people who are colour-blind are playing your game (and complaining), that's a great sign that you're getting lots of users." />
  <row Id="20242" PostHistoryTypeId="5" PostId="9650" RevisionGUID="1b731141-0c32-410d-a0e8-f7f5c6c2d978" CreationDate="2011-03-14T17:17:39.690" UserId="4296" Comment="Added back in the wall of code to help illustrate and comment" Text="Edit: I was way off track and rethought my answer.&#xD;&#xA;&#xD;&#xA;You're on the right track with each screen having a collection of components.  In fact, there's a class just for that:&#xD;&#xA;&#xD;&#xA;[GameComponentCollection][1]&#xD;&#xA;&#xD;&#xA;Each screen can implement their own list the same as Game does.  The screens shouldn't need to manipulate very much in other screens or the base game - they should be relatively confined. Things like Units, Map, Player, Lights, Cameras, Physics, Timers - they all go in the screen component collection.&#xD;&#xA;&#xD;&#xA;Stuff in the Game.Components list are usually global functionality - ScreenManager, Input, Settings - things that get read from but not manipulated.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gamecomponentcollection.aspx&#xD;&#xA;&#xD;&#xA;Wall of psuedo-ish code.  I stripped down the AppHub example - figured it would be easier to add things in as I need functionality rather than start with a giant codebase - easier to learn that way for me.&#xD;&#xA;&#xD;&#xA;    class MyGame : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        GameScreenManager _gameScreens;&#xD;&#xA;&#xD;&#xA;        // I make this static, seems easier?  Mine doesn't do much &#xD;&#xA;        // other than provide some helpers and shortcuts&#xD;&#xA;        static InputManager _input;     &#xD;&#xA;        public static InputManager Input { get { return _input } }&#xD;&#xA;&#xD;&#xA;        public void MyGame()&#xD;&#xA;        {&#xD;&#xA;            // ... graphics initialization ...&#xD;&#xA;            _gamescreens = new GameScreenManager();&#xD;&#xA;            _gameScreens.Push(new MenuScreen(_gameScreens, _graphicsDevice));&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameScreenManager : Microsoft.Xna.Framework.DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;        LinkedList&lt;GameScreen&gt; _screens;  // Not a 'stack', but we can use it as such&#xD;&#xA;&#xD;&#xA;        public void Push(GameScreen screen)&#xD;&#xA;        {&#xD;&#xA;            _screens.AddFirst(screen);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Pop(GameScreen screen)&#xD;&#xA;        {&#xD;&#xA;            _screens.RemoveFirst(screen);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // ... Update is the same as draw... just updating() ...&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Draw the stack of game states&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public override void Draw(GameTime time)&#xD;&#xA;        {&#xD;&#xA;            // Here we just draw the top node, then recursively step down while&#xD;&#xA;            // the screen is not BlockDraw.  This lets a screen hide or partially&#xD;&#xA;            // let anything below it display (ie, a PauseScreen only partially&#xD;&#xA;            // hides the GamePlayScreen&#xD;&#xA;            _Draw(_screens.First, time);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Recursively draw the game state stack&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        private void _Draw(LinkedListNode&lt;Screen&gt; node, GameTime time)&#xD;&#xA;        {&#xD;&#xA;            node.Value.Draw(time);&#xD;&#xA;                    &#xD;&#xA;            // Only draw the screen below if the current one is not blocking&#xD;&#xA;            if (!node.Value.BlockDraw)&#xD;&#xA;               _Draw(node.Next, time);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    abstract class Screen&#xD;&#xA;    {&#xD;&#xA;        // Game Screen Components (UnitManager, Lights, Sound, Cameras, Player, etc...)&#xD;&#xA;        // These ones can implement IUpdateable and IDrawable, and the manager here&#xD;&#xA;        // handles that&#xD;&#xA;        // This could easily be GameComponentCollection instead - I just wrote my own&#xD;&#xA;        // as I wanted to change a few things in it.&#xD;&#xA;        protected GameScreenComponentManager _components;&#xD;&#xA;&#xD;&#xA;        // Block updates to screens below.   Override in child classes if different&#xD;&#xA;        public virtual bool BlockUpdate { get { retrun true; } }&#xD;&#xA;&#xD;&#xA;        // Block draws to screens below.  Override in child classes if different&#xD;&#xA;        public virtual bool BlockDraw { get { retrun true; } }&#xD;&#xA;&#xD;&#xA;        // In the screen constructor create its own SpriteBatch, it's &#xD;&#xA;        // own SoundManager to handle playing sounds, it's own Player class, etc.&#xD;&#xA;        // In this way, levels get easier too - each level is it's own screen.&#xD;&#xA;        // OnLevelFinish just instantiates the next, pops the current from the manager,&#xD;&#xA;        // and pushes on the new one.&#xD;&#xA;        public Screen(GameScreenManager _screenManager, GraphicsDevice device, ...Other Dependancies...)&#xD;&#xA;        { }&#xD;&#xA;&#xD;&#xA;        public abstract void Initialize();&#xD;&#xA;        public abstract void Update(GameTime time);&#xD;&#xA;        public abstract void Draw(GameTime time);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So this is a simplified outline of the key parts.&#xD;&#xA;&#xD;&#xA;GameScreens can create and push new screens onto the stack, and also remove themselves.  Ie, then Menu Screen can push on a Settings Screen or a GamePlayScreen.&#xD;&#xA;&#xD;&#xA;As commented, screens manage their own resources and are passed the dependencies needed to create these resources (or, register some dependencies in the service locator and just pass that into each screen).  You can even create a new XNA ContentManager for each screen - leave one accessible back down in the Game for shared assets (but only a few).  That way, when a screen is removed, in it's Dispose it releases only that screen's loaded assets." />
  <row Id="20243" PostHistoryTypeId="2" PostId="9772" RevisionGUID="14dacd43-4b5f-41f5-be4f-5d55d5c12c2a" CreationDate="2011-03-14T17:18:01.197" UserId="6101" Text="I wish to do a turn based multiplayer game like Words with friends on the iphone. I would like to know the approach for the implementation to allow the user to continue games that are currently still active even after a couple of days. Is this even possible using Game Center?" />
  <row Id="20244" PostHistoryTypeId="1" PostId="9772" RevisionGUID="14dacd43-4b5f-41f5-be4f-5d55d5c12c2a" CreationDate="2011-03-14T17:18:01.197" UserId="6101" Text="How do I allow a player to manager several games at once with different players using game center?" />
  <row Id="20245" PostHistoryTypeId="3" PostId="9772" RevisionGUID="14dacd43-4b5f-41f5-be4f-5d55d5c12c2a" CreationDate="2011-03-14T17:18:01.197" UserId="6101" Text="&lt;iphone&gt;&lt;turn-based&gt;&lt;game-center&gt;" />
  <row Id="20246" PostHistoryTypeId="25" PostId="9772" RevisionGUID="92c7e938-a9a3-43c3-8895-058d54c773be" CreationDate="2011-03-14T17:23:27.610" Comment="http://twitter.com/#!/StackGameDev/status/47347119220207616" />
  <row Id="20247" PostHistoryTypeId="2" PostId="9773" RevisionGUID="d672024d-e96a-4572-8302-888e3d95cb55" CreationDate="2011-03-14T19:15:06.667" UserId="764" Text="Nothing wrong with Java applets for a web game. I wrote an open source roguelike game ([Tyrant][1]) in Java and it works very well as an applet. &#xD;&#xA;&#xD;&#xA;Some big plus points of Java in my experience:&#xD;&#xA;&#xD;&#xA; - Portability is excellent - given the complexity of Tyrant, it was pretty impressive  that I managed to get exactly the same compiled code to run well on Windows, Mac and Linux. &#xD;&#xA;&#xD;&#xA; - You don't have to worry about browser quirks.&#xD;&#xA;&#xD;&#xA; - With a bit of cleverness, you can make the same code run both as an applet or as a standalone desktop application&#xD;&#xA;&#xD;&#xA; - Performance is great assuming a modern JVM.&#xD;&#xA;&#xD;&#xA; - All the usual plus points of Java in terms of great array of open source libraries/APIs etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Just be aware of the following:&#xD;&#xA;&#xD;&#xA; - You'll need to sign your applet / get privileged permissions if you want to do things like store data on the local filesystem or access native libraries. This can be a barrier to some users.&#xD;&#xA;&#xD;&#xA; - Startup time tends to be a bit slower than Flash or JavaScript. On the other hand, performance is better once the JVM is up and running......&#xD;&#xA;&#xD;&#xA; - Java is a garbage collected language, so it does have very slight GC pauses on occasion. Not really a problem for casual games, but might be an issue for high performance 3D titles where you're trying to maintain a constant 120 FPs framerate......&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/tyrant/" />
  <row Id="20249" PostHistoryTypeId="2" PostId="9774" RevisionGUID="487a3d54-99ac-41a2-a261-bd1d09fde8b9" CreationDate="2011-03-14T20:06:36.760" UserId="962" Text="How can I create sound emmiters that pan and change volume based on distance from the player in a 2D game?" />
  <row Id="20250" PostHistoryTypeId="1" PostId="9774" RevisionGUID="487a3d54-99ac-41a2-a261-bd1d09fde8b9" CreationDate="2011-03-14T20:06:36.760" UserId="962" Text="Sound emmiters with panning and volume in 2D" />
  <row Id="20251" PostHistoryTypeId="3" PostId="9774" RevisionGUID="487a3d54-99ac-41a2-a261-bd1d09fde8b9" CreationDate="2011-03-14T20:06:36.760" UserId="962" Text="&lt;xna&gt;&lt;audio&gt;" />
  <row Id="20252" PostHistoryTypeId="2" PostId="9775" RevisionGUID="e4192117-f0a7-464f-8f71-f6740cbdf3c8" CreationDate="2011-03-14T20:13:48.250" UserId="1156" Text="There is a [3D audio example][1] on XNA's app hub.&#xD;&#xA; I'm pretty sure you can take the same concept for 2D.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/3d_audio" />
  <row Id="20253" PostHistoryTypeId="5" PostId="9773" RevisionGUID="455c4a61-eb44-4b12-99a5-29847fe6b869" CreationDate="2011-03-14T20:17:49.647" UserId="764" Comment="added 41 characters in body" Text="Nothing wrong with Java applets for a web game. I wrote an open source roguelike game ([Tyrant][1]) in Java and it works very well as an applet. &#xD;&#xA;&#xD;&#xA;Some big plus points of Java in my experience:&#xD;&#xA;&#xD;&#xA; - Portability is excellent - given the complexity of Tyrant, it was pretty impressive  that I managed to get exactly the same compiled code to run well on Windows, Mac and Linux. &#xD;&#xA;&#xD;&#xA; - You don't have to worry about browser quirks.&#xD;&#xA;&#xD;&#xA; - With a bit of cleverness, you can make the same code run both as an applet or as a standalone desktop application&#xD;&#xA;&#xD;&#xA; - Performance is great assuming a modern JVM.&#xD;&#xA;&#xD;&#xA; - All the usual plus points of Java in terms of great array of open source libraries/APIs etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Just be aware of the following:&#xD;&#xA;&#xD;&#xA; - You'll need to sign your applet / get privileged permissions if you want to do things like store data on the local filesystem or access native libraries. This can be a barrier to some users.&#xD;&#xA;&#xD;&#xA; - Startup time tends to be a bit slower than Flash or JavaScript. On the other hand, performance is better once the JVM is up and running......&#xD;&#xA;&#xD;&#xA; - Java is a garbage collected language, so it does have very slight GC pauses on occasion. Not really a problem for casual / roleplaying / strategy games, but might be an issue for high performance 3D FPS titles where you're trying to maintain a constant jitter-free 120 FPs framerate......&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/tyrant/" />
  <row Id="20254" PostHistoryTypeId="25" PostId="9774" RevisionGUID="5094845a-b865-44d9-b98d-258f28a74d12" CreationDate="2011-03-14T20:23:27.737" Comment="http://twitter.com/#!/StackGameDev/status/47392418504519680" />
  <row Id="20255" PostHistoryTypeId="2" PostId="9776" RevisionGUID="9dbcd30b-9d1b-44b0-9c3d-352e0f080eaa" CreationDate="2011-03-14T22:16:21.600" UserId="5932" Text="I would implement that functionality on your server, and have your data stored temporarily (the stuff that you know won't change) on the iPhone itself.&#xD;&#xA;&#xD;&#xA;(edit) whoah, do you even have a server when you use game center?" />
  <row Id="20256" PostHistoryTypeId="2" PostId="9777" RevisionGUID="1f548857-4026-4721-824f-c44f1f0a5e81" CreationDate="2011-03-14T22:25:09.673" UserId="5824" Text="All that you need to do is store the game state somewhere persistent where all the players can get at it. For example in a database accessed via a web server. That server could also process each players turns on the game if you want it to (this helps prevent cheating). You can then easily control how long it stores the game state for. For example it would appear words with friends simply allows a maximum of 20 in progress games per player, and the game state is probably no more than a few hundred bytes per game so the storage requirements on the server would be quite small.&#xD;&#xA;&#xD;&#xA;I'm not certain about Game Center, but a quick look suggests that as long as your game can get at the User ID of the player that's all you'd need to track the game in your database." />
  <row Id="20257" PostHistoryTypeId="2" PostId="9778" RevisionGUID="9cfba5b4-bda5-428e-a604-6d93e6e581fe" CreationDate="2011-03-14T22:36:18.653" UserId="2708" Text="I'm debating myself about memory allocation on iOS. I write most of my code in C++ and I really like using ObjectPools, FreeLists, etc. In order to pre-allocate a lot of the stuff that I'll be constantly &quot;alloc/dealloc&quot; during the course of my game, ( like particles, game entities, etc ).&#xD;&#xA;&#xD;&#xA;Still on iOS, it's not like we are developing for a console like PSP, where I can know for fact that I'll get a fixed amount of memory. iOS , will issue &quot;memory warnings&quot; when the system needs memory.&#xD;&#xA;&#xD;&#xA;Does anyone have some suggestions about this ? Is it too serious since the new iPod touch/iPhone 4 are carrying more RAM ? or it's still a big concern ? &#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="20258" PostHistoryTypeId="1" PostId="9778" RevisionGUID="9cfba5b4-bda5-428e-a604-6d93e6e581fe" CreationDate="2011-03-14T22:36:18.653" UserId="2708" Text="Best memory allocation strategy for iOS ?" />
  <row Id="20259" PostHistoryTypeId="3" PostId="9778" RevisionGUID="9cfba5b4-bda5-428e-a604-6d93e6e581fe" CreationDate="2011-03-14T22:36:18.653" UserId="2708" Text="&lt;ios&gt;&lt;memory-efficiency&gt;" />
  <row Id="20260" PostHistoryTypeId="5" PostId="9744" RevisionGUID="998d64b0-8d85-4456-a48f-6388f4b0f2b0" CreationDate="2011-03-14T23:10:29.603" UserId="5899" Comment="added 642 characters in body; added 7 characters in body; added 5 characters in body" Text="I've tested your code on a little program with OpenGL on a 2D space and the algorithm seems correct.&#xD;&#xA;&#xD;&#xA;You says that direction is a non-normalized vector. Review that the method positionOnLine uses a normalized vector to do his calculations. I've used:&#xD;&#xA;&#xD;&#xA;    Vector2Df positionOnLine( float d )&#xD;&#xA;    {&#xD;&#xA;        // where m_direction is a normalized vector&#xD;&#xA;        return m_point + m_direction * d; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;More code:&#xD;&#xA;&#xD;&#xA;My code is like this:&#xD;&#xA;&#xD;&#xA;    struct Line&#xD;&#xA;    {&#xD;&#xA;        Line( const Vector2Df&amp; p, const Vector2Df&amp; d )&#xD;&#xA;            : m_point( p )&#xD;&#xA;            , m_direction( d )&#xD;&#xA;        {&#xD;&#xA;            m_direction.normalize();&#xD;&#xA;        }&#xD;&#xA;	&#xD;&#xA;        Vector2Df positionOnLine( float d )&#xD;&#xA;        {&#xD;&#xA;            return m_point + m_direction * d;&#xD;&#xA;        }&#xD;&#xA;	&#xD;&#xA;        Vector2Df	m_point;&#xD;&#xA;        Vector2Df	m_direction;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Lines creation&#xD;&#xA;    Vector2Df v1( 0.f, 0.f );&#xD;&#xA;    Vector2Df v2( 100.f, 100.f );&#xD;&#xA;	&#xD;&#xA;    Vector2Df v3( 10.f, 0.f );&#xD;&#xA;    Vector2Df v4( 100.f, 110.f );&#xD;&#xA;&#xD;&#xA;    Line l1( v1, v2 - v1 );&#xD;&#xA;    Line l2( v3, v4 - v3 );&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20261" PostHistoryTypeId="25" PostId="9778" RevisionGUID="0d201f6f-6aac-4d82-8b8d-08cf58be086c" CreationDate="2011-03-14T23:23:27.847" Comment="http://twitter.com/#!/StackGameDev/status/47437717549756416" />
  <row Id="20262" PostHistoryTypeId="2" PostId="9779" RevisionGUID="2afdd5a1-7565-4efe-8780-b4a4c5d80723" CreationDate="2011-03-15T00:07:38.957" UserId="6107" Text="I agree with Concept3d, you don't really want to be using a vector to store this data.  If I was going to be setting this up with VBOs I would just allocate off a large static chunk of memory.  This allows you to setup the VBO once, then just update the data as you add verts.&#xD;&#xA;&#xD;&#xA;I would keep track of the how many verts were in the buffer using an outside variable.  Then you could easily memcpy new verts on to the end of the buffer and use shift operators to removes old verts form the front of the buffer.&#xD;&#xA;&#xD;&#xA;As Concept said you will want to use a Dynamic VBO which will need to be uploaded into RAM every time it changes.  Just make sure you pass the correct number of verts to you Draw call and not the size of the VBO, as it could be partially full." />
  <row Id="20263" PostHistoryTypeId="2" PostId="9780" RevisionGUID="57e89514-45e5-4d6c-a4b6-cab9b7033ce9" CreationDate="2011-03-15T00:58:45.317" UserId="656" Text="Use your common memory management sense. Use pools/freelists for things that are frequently allocated and deallocated (i.e. particles), free memory blocks that aren't in use. However, don't try to preallocate large chunks of memory upfront. iOS doesn't guarantee memory nor does it swap, so any memory you have allocated is taking resources away from the system and other apps. If the system cannot get enough memory because your application is hogging all of it, then it will resort to killing your app. You should handle the applicationDidReceiveMemoryWarning for what it was designed for by deallocating as much memory as possible. Although iPhone 4 has lots of memory, but with all the multitasking features and the way people tend to use them, you may actually have less memory than you think.&#xD;&#xA;&#xD;&#xA;(Also, don't forget to profile your app to see whether memory allocation is a bottleneck!)" />
  <row Id="20264" PostHistoryTypeId="25" PostId="9751" RevisionGUID="1ae030b9-1602-46c9-a246-7f439fd4c3ed" CreationDate="2011-03-15T02:23:27.767" Comment="http://twitter.com/#!/StackGameDev/status/47483015294754816" />
  <row Id="20265" PostHistoryTypeId="2" PostId="9781" RevisionGUID="a00a25c2-8ebc-4b98-bc0a-1d354a2ed4fd" CreationDate="2011-03-15T02:25:43.427" UserId="2132" Text="Suppose I have a game where there are several predefined constants and charts (a XP chart, cost of goods and so on). Those could be defined at runtime, or load from files at start-up. The question is how should those logic routines access the constants and charts? &#xD;&#xA;&#xD;&#xA;For example, I could try using global variables, but that cause all classes relying on the variables to  be tightly coupled with them." />
  <row Id="20266" PostHistoryTypeId="1" PostId="9781" RevisionGUID="a00a25c2-8ebc-4b98-bc0a-1d354a2ed4fd" CreationDate="2011-03-15T02:25:43.427" UserId="2132" Text="Making game constants/tables available to game logic classes/routines in a modular manner" />
  <row Id="20267" PostHistoryTypeId="3" PostId="9781" RevisionGUID="a00a25c2-8ebc-4b98-bc0a-1d354a2ed4fd" CreationDate="2011-03-15T02:25:43.427" UserId="2132" Text="&lt;programming&gt;" />
  <row Id="20268" PostHistoryTypeId="2" PostId="9782" RevisionGUID="50f94d72-f96b-4a26-b3c8-b18fb8efa6af" CreationDate="2011-03-15T02:51:48.150" UserId="288" Text="Use `SoundEffect.CreateInstance();` to get a `SoundEffectInstance` of your chosen sound effect.&#xD;&#xA;&#xD;&#xA;You can then `Play()` that instance while modifying its `Volume` and `Pan` properties.&#xD;&#xA;&#xD;&#xA;Or, if it's a short, one-shot sound effect, you can simply use `SoundEffect.Play(volume, pitch, pan);` to play it at your chosen volume and panning.&#xD;&#xA;&#xD;&#xA;Here is some code that I have used in the past to set the volume and panning of a `SoundEffectInstance` based on the emitting object's position and the camera:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	public bool SetSoundForCamera(SoundEffectInstance sound, Vector2 position, float baseVolume)&#xD;&#xA;	{&#xD;&#xA;		Vector2 screenDistance = (position-cameraCenter) / cameraHalfSize;&#xD;&#xA;		float fade = MathHelper.Clamp(2f - screenDistance.Length(), 0, 1);&#xD;&#xA;		sound.Volume = fade * fade * baseVolume;&#xD;&#xA;		sound.Pan = MathHelper.Clamp(screenDistance.X, -1, 1);&#xD;&#xA;		return fade &gt; 0;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;For a `SoundEffectInstance`, simply call that each frame while the sound is playing. You could extract the maths and use it for one-shot sounds as well.&#xD;&#xA;&#xD;&#xA;Of course, for a 2D game, how quickly you pan and how quickly you fade out sounds as they go off screen will depend on your game. You should modify the maths to suit your own game's mood." />
  <row Id="20269" PostHistoryTypeId="2" PostId="9783" RevisionGUID="cb2ffaae-e6e8-4727-8bfa-d4bfac48a629" CreationDate="2011-03-15T03:52:44.357" UserId="5916" Text="Well if you were using Java then I would reccomend putting your data in XML files and using something like JAXB or simple-xml in order to get the data that you want in the right objects." />
  <row Id="20270" PostHistoryTypeId="2" PostId="9784" RevisionGUID="bb645682-fbd5-47d8-a56f-f64af0ea8391" CreationDate="2011-03-15T03:54:18.363" UserId="5774" Text="Thanks for all of the help, guys, and sorry for the late response.&#xD;&#xA;&#xD;&#xA;I have taken all of these ideas into consideration, and they are helped me fix the issue. If anyone is curious to know how I solved the original and full problem, look [here][1] on Stack Overflow for the full answer (including explanations on handling collision more properly). The person who answered my question was really generous and provided a diagram, so that should help those who also have this problem.&#xD;&#xA;&#xD;&#xA;Again, thanks to everyone who answered for all of your help! I appreciate it very much!&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5149548/2d-platformer-collision-handling" />
  <row Id="20271" PostHistoryTypeId="5" PostId="9784" RevisionGUID="91d9977d-fd64-41ab-a379-a467470c0488" CreationDate="2011-03-15T04:21:53.630" UserId="5774" Comment="added 199 characters in body" Text="Thanks for all of the help, guys, and sorry for the late response.&#xD;&#xA;&#xD;&#xA;I have taken all of these ideas into consideration, and they are helped me fix the issue. If anyone is curious to know how I solved the original and full problem, look [here][1] on Stack Overflow for the full answer (including explanations on handling collision more properly). The person who answered my question was really generous and provided a diagram, so that should help those who also have this problem.&#xD;&#xA;&#xD;&#xA;Again, thanks to everyone who answered for all of your help! I appreciate it very much!&#xD;&#xA;&#xD;&#xA;**Note**: I'd upvote the contributors, but, unfortunately, I don't have enough reputation to do so. I will do this when I get enough. I really do appreciate everyone's help, though. Thanks again!&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5149548/2d-platformer-collision-handling" />
  <row Id="20272" PostHistoryTypeId="5" PostId="9784" RevisionGUID="cc2058e0-def8-426e-ad39-0215867f51a3" CreationDate="2011-03-15T04:33:47.427" UserId="5774" Comment="added 134 characters in body; added 1 characters in body" Text="Thanks for all of the help, guys, and sorry for the late response.&#xD;&#xA;&#xD;&#xA;I have taken all of these ideas into consideration, and they are helped me fix the issue. If anyone is curious to know how I solved the original and full problem, look [here][1] on Stack Overflow for the full answer (including explanations on handling collision more properly). The person who answered my question was really generous and provided a diagram, so that should help those who also have this problem.&#xD;&#xA;&#xD;&#xA;Again, thanks to everyone who answered for all of your help! I appreciate it very much!&#xD;&#xA;&#xD;&#xA;**Note**: I'd upvote the contributors, but, unfortunately, I don't have enough reputation to do so. I will do this when I get enough.&#xD;&#xA;Thanks to the following people for helping me with this problem:&#xD;&#xA;&#xD;&#xA; - DanTup - Danny Tuppeny&#xD;&#xA; - bummzack&#xD;&#xA; - ghostonline&#xD;&#xA; - ultifinitus&#xD;&#xA;&#xD;&#xA;I really do appreciate everyone's help. Thanks again!&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5149548/2d-platformer-collision-handling" />
  <row Id="20273" PostHistoryTypeId="5" PostId="9784" RevisionGUID="a3d8c3dc-7a1b-4e56-b166-09f1d88b12e6" CreationDate="2011-03-15T04:49:02.950" UserId="5774" Comment="deleted 253 characters in body" Text="Thanks for all of the help, guys, and sorry for the late response.&#xD;&#xA;&#xD;&#xA;I have taken all of these ideas into consideration, and they are helped me fix the issue. If anyone is curious to know how I solved the original and full problem, look [here][1] on Stack Overflow for the full answer (including explanations on handling collision more properly). The person who answered my question was really generous and provided a diagram, so that should help those who also have this problem.&#xD;&#xA;&#xD;&#xA;Thanks to the following people for helping me with this problem:&#xD;&#xA;&#xD;&#xA; - DanTup - Danny Tuppeny&#xD;&#xA; - bummzack&#xD;&#xA; - ghostonline&#xD;&#xA; - ultifinitus&#xD;&#xA;&#xD;&#xA;I appreciate it very much!&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5149548/2d-platformer-collision-handling" />
  <row Id="20274" PostHistoryTypeId="25" PostId="9781" RevisionGUID="a1c44104-87f7-428c-85b6-f7a3c239bb31" CreationDate="2011-03-15T05:23:27.970" Comment="http://twitter.com/#!/StackGameDev/status/47528314822332416" />
  <row Id="20275" PostHistoryTypeId="5" PostId="9778" RevisionGUID="671e3287-dc41-485e-806a-9466e6786842" CreationDate="2011-03-15T07:19:06.840" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I'm debating myself about memory allocation on iOS. I write most of my code in C++ and I really like using ObjectPools, FreeLists, etc. In order to pre-allocate a lot of the stuff that I'll be constantly &quot;alloc/dealloc&quot; during the course of my game, ( like particles, game entities, etc ).&#xD;&#xA;&#xD;&#xA;Still on iOS, it's not like we are developing for a console like PSP, where I can know for fact that I'll get a fixed amount of memory. iOS , will issue &quot;memory warnings&quot; when the system needs memory.&#xD;&#xA;&#xD;&#xA;Does anyone have some suggestions about this ? Is it too serious since the new iPod touch/iPhone 4 are carrying more RAM ? or it's still a big concern? " />
  <row Id="20276" PostHistoryTypeId="2" PostId="9785" RevisionGUID="9b47c2c8-af56-4b21-9022-40dbc88d8378" CreationDate="2011-03-15T07:36:16.283" UserId="4264" Text="Only you know whether you'll need normals in a 2d game. They may make sense - DOOM, for instance, had normals even though it was a 2d game (yes yes, it looked pretty 3d, but technically it was still a 2d game).&#xD;&#xA;&#xD;&#xA;One good reason for having normals in a 2d game would be to be able to check whether you're inside or outside some shape. It may also accelerate wall collision response (knowing the direction to push objects out of the wall).&#xD;&#xA;&#xD;&#xA;There's no reason to give the normals to OpenGL or whatever rendering package you use if it doesn't need it for anything (like the lighting pretty much everyone else has pointed out)." />
  <row Id="20277" PostHistoryTypeId="6" PostId="9708" RevisionGUID="fc9579cc-ad26-4f7f-bf54-c5c79609600b" CreationDate="2011-03-15T07:50:34.960" UserId="4264" Comment="edited tags" Text="&lt;business&gt;&lt;publishing&gt;&lt;intellectual-property&gt;" />
  <row Id="20278" PostHistoryTypeId="25" PostId="9763" RevisionGUID="a12b0ffa-36d7-4ff7-ac7e-5284b4bb245c" CreationDate="2011-03-15T08:23:27.940" Comment="http://twitter.com/#!/StackGameDev/status/47573613339090944" />
  <row Id="20279" PostHistoryTypeId="2" PostId="9786" RevisionGUID="d3fa2f3b-6eeb-4f7f-9fd9-ef837f9fa7e3" CreationDate="2011-03-15T09:24:15.093" UserId="364" Text="Do you know http://tvtropes.org ? &#xD;&#xA;&#xD;&#xA;It's a kind of wiki/database with scenaristic tropes, patterns that you can find in tones of stories, in tv shows, games, books, etc.&#xD;&#xA;&#xD;&#xA;Each trope/pattern have a (funny) name and there are references to where it appears, and the other way arround : each book/game/etc. have a list of tropes that it contains.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm looking for an equivalent but for game mechanics patterns, something like &quot;Death is definitive&quot;, &quot;Perfect physical control (no inertia)&quot;, &quot;Excell table gameplay&quot;, etc.&#xD;&#xA;&#xD;&#xA;I think it would be really useful. I can't find an equivalent for game mechanics (tvtrope is oriented to scenario, not game mechanics).&#xD;&#xA;&#xD;&#xA;Do you know any?" />
  <row Id="20280" PostHistoryTypeId="1" PostId="9786" RevisionGUID="d3fa2f3b-6eeb-4f7f-9fd9-ef837f9fa7e3" CreationDate="2011-03-15T09:24:15.093" UserId="364" Text="Game mechanics patterns database?" />
  <row Id="20281" PostHistoryTypeId="3" PostId="9786" RevisionGUID="d3fa2f3b-6eeb-4f7f-9fd9-ef837f9fa7e3" CreationDate="2011-03-15T09:24:15.093" UserId="364" Text="&lt;game-mechanics&gt;&lt;pattern&gt;" />
  <row Id="20282" PostHistoryTypeId="2" PostId="9787" RevisionGUID="26a802cc-5d71-4028-a496-05c3e2a7fb7c" CreationDate="2011-03-15T09:36:32.920" UserId="4264" Text="Noah Falstein's 400 project is pretty much the closest I can think of: &#xD;&#xA;&#xD;&#xA;http://www.theinspiracy.com/400_project.htm &#xD;&#xA;&#xD;&#xA;The master list is here: http://www.theinspiracy.com/Current%20Rules%20Master%20List.htm" />
  <row Id="20283" PostHistoryTypeId="2" PostId="9788" RevisionGUID="494eda04-d07c-4278-8a35-eec3b43dfdc7" CreationDate="2011-03-15T10:06:12.443" UserId="4984" Text="I developed a two-player iPhone board game. Computer players (AI) can either be local (in the game code) or remote running on a server. In the 2nd case, both client and server code are coded in Lua. On the server the actual AI code is separate from the TCP socket code and coroutine code (which spawns a separate instance of AI for each connecting client).&#xD;&#xA;&#xD;&#xA;I want to be able to further isolate the AI code so that that part can be a module coded by anyone in their language of choice. How can I do this? What tecniques/technology would enable communication between the Lua TCP socket/coroutine code and the AI module?" />
  <row Id="20284" PostHistoryTypeId="1" PostId="9788" RevisionGUID="494eda04-d07c-4278-8a35-eec3b43dfdc7" CreationDate="2011-03-15T10:06:12.443" UserId="4984" Text="How would you code an AI engine to allow communication in any programming language?" />
  <row Id="20285" PostHistoryTypeId="3" PostId="9788" RevisionGUID="494eda04-d07c-4278-8a35-eec3b43dfdc7" CreationDate="2011-03-15T10:06:12.443" UserId="4984" Text="&lt;game-design&gt;&lt;ai&gt;&lt;lua&gt;" />
  <row Id="20286" PostHistoryTypeId="2" PostId="9789" RevisionGUID="a9478a0b-0fbb-4525-901e-26cddfd3c98d" CreationDate="2011-03-15T10:51:06.123" UserId="6099" Text="I found this to be quite a thorny problem recently. I have a fully working Box-Sphere system up and running now though.&#xD;&#xA;&#xD;&#xA;My solution was to represent my rectangle as 4 planes. I test the sphere centre's distance from each plane and compare this to the sphere radius to see if there is an intersection (you do this with the framework Plane.DotCoordinate method). At the same time I count how many distances are positive - this is effectively a check to see if the point is in front of each plane. Finally I accumulate the the normals &amp; distances of the intersecting planes to make a single composite 'collision vector' to deal with edge and corner collisions with multiple planes.&#xD;&#xA;&#xD;&#xA;Once you have these 3 bits of info you can check a few things:&#xD;&#xA;&#xD;&#xA;1) If you are in front of *none* of the planes, definitely a collision and just check to see which one is intersecting to find which side was hit.&#xD;&#xA;&#xD;&#xA;1b) In front of *no* planes, but no intersections - complete containment. This is the worst case and I cast back a ray along the objects velocity vector to see which side it hit on its way in.&#xD;&#xA;&#xD;&#xA;2) In front of the same number of planes as there are intersections. This maybe a collision, but only if the intersection distance along the collision vector is less than the sphere radius. This case actually deals with face, edge and corner collisions (1, 2 or 3+ planes) in one go. &#xD;&#xA;&#xD;&#xA;I hope you can follow such a long-description, but the logic is probably more important than the code.&#xD;&#xA;&#xD;&#xA;Plus, a major upside of this this approach is it is trivially generalisable to 3D and you can add as many planes as you like to define the collision volume - provided your shape always remains convex. This technique is a version of the pattern often called Discrete Orientated Polytopes - or DOP if you want to look it up in the literature I think.&#xD;&#xA;&#xD;&#xA;By coincidence, I am presenting online on Wed 24 March on this very topic for Microsoft UK Tech Days. [If you want to see the system in action, see some slides detailing the process above, or ask questions then you can register here.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032479735" />
  <row Id="20287" PostHistoryTypeId="25" PostId="9788" RevisionGUID="291889ca-ed1a-45f3-aa5a-578b8556e29b" CreationDate="2011-03-15T11:23:27.827" Comment="http://twitter.com/#!/StackGameDev/status/47618910396235776" />
  <row Id="20289" PostHistoryTypeId="2" PostId="9790" RevisionGUID="a4573cd1-d705-43d7-b95a-6e610a9c0b83" CreationDate="2011-03-15T11:32:19.240" UserId="5660" Text="What sort of game is it? If you have a top-down perspective, normals might come in handy for strafing movement of your characters (you know, shifting position along the *normal* of the direction the character is facing)&#xD;&#xA;&#xD;&#xA;Normals are also useful for quite a range of steering behaviours. But a link says more than thousand words: http://www.red3d.com/cwr/steer&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20290" PostHistoryTypeId="2" PostId="9791" RevisionGUID="ff1f2f9b-3610-4944-83cd-84f83889f6bb" CreationDate="2011-03-15T11:33:03.717" UserId="2091" Text="Well, if your input signal is real (as in, each sample is a real number), the spectrum will be symmetric and complex.  Exploiting the symmetry, usually FFT algorithms pack the result by giving you back only the positive half of the spectrum.  The real part of each band is in the even samples and the imaginary part in the odd samples.  Or sometimes the real parts are packed together in the first half of the response and the imaginary parts in the second half.&#xD;&#xA;&#xD;&#xA;In formulas, if X[k] = FFT( x[n] ), you give it a vector i[n] = x[n] , and get an output o[m], then&#xD;&#xA;&#xD;&#xA;    X[k] = o[2k] + j·o[2k+1]&#xD;&#xA;&#xD;&#xA;(although sometimes you get X[k] = o[k] + j·o[k+K/2], where K is the length of your window, 1024 in your example).  By the way, j is the imaginary unit, sqrt(-1).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The magnitude of a band is computed as the root of the product of this band with its complex conjugate:&#xD;&#xA;&#xD;&#xA;    |X[k]| = sqrt( X[k] · X[k]* )&#xD;&#xA;&#xD;&#xA;And the energy is defined as the square of the magnitude.&#xD;&#xA;&#xD;&#xA;If we call a = o[2k] and b = o[2k+1], we get&#xD;&#xA;&#xD;&#xA;    X[k] = a + j·b&#xD;&#xA;&#xD;&#xA;therefore&#xD;&#xA;&#xD;&#xA;    E[k] = |X[k]|^2 = (a+j·b)·(a-j·b) = a·a + b·b&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Unrolling the whole thing, if you got o[m] as output from the FFT algorithm, the energy in the band k is:&#xD;&#xA;&#xD;&#xA;    E[k] = o[2k] · o[2k] + o[2k+1] · o[2k+1]&#xD;&#xA;&#xD;&#xA;(Note: I used the symbol · to indicate multiplication instead of the usual * in order to avoid confusion with the conjugation operator)&#xD;&#xA;&#xD;&#xA;The frequency of the band k, assuming a sampling frequency of 44.1Khz and a window of 1024 samples, is&#xD;&#xA;&#xD;&#xA;    freq(k) = k / 1024 * 44100 [Hz]&#xD;&#xA;&#xD;&#xA;So, for example, your first band k=0 represents 0 Hz, k=1 is 43 Hz, and the last one k=511 is 22KHz (the Nyquist frequency).&#xD;&#xA;&#xD;&#xA;I hope this answers your question about how do you get the energy of the signal per band using the FFT." />
  <row Id="20291" PostHistoryTypeId="2" PostId="9792" RevisionGUID="fdf24e7b-dd55-4b3d-a0d9-97b81225b03b" CreationDate="2011-03-15T12:52:21.363" UserId="4513" Text="Alas, I have searched, and have found no definitive answer.&#xD;&#xA;&#xD;&#xA;When would you normalize the vertex data in OpenGL using the following command:&#xD;&#xA;&#xD;&#xA;    glVertexAttribPointer(index, size, type, normalize, stride, pointer);&#xD;&#xA;&#xD;&#xA;I.e when would `normalize == GL_TRUE`; what situations, and why would you choose to let the GPU do the calculations instead of preprocessing it?&#xD;&#xA;All examples I have ever seen, have this set to GL_FALSE; and I cannot personally see a use for it. But Khronos aren't stupid, so it must be there for something useful (and probably common)." />
  <row Id="20292" PostHistoryTypeId="1" PostId="9792" RevisionGUID="fdf24e7b-dd55-4b3d-a0d9-97b81225b03b" CreationDate="2011-03-15T12:52:21.363" UserId="4513" Text="OpenGL Vertex Attributes - Normalisation" />
  <row Id="20293" PostHistoryTypeId="3" PostId="9792" RevisionGUID="fdf24e7b-dd55-4b3d-a0d9-97b81225b03b" CreationDate="2011-03-15T12:52:21.363" UserId="4513" Text="&lt;opengl&gt;" />
  <row Id="20294" PostHistoryTypeId="2" PostId="9793" RevisionGUID="3e0a5e07-6be3-4ce2-b748-2fac5ad7de2d" CreationDate="2011-03-15T13:22:36.257" UserId="3149" Text="Imagine you have a mesh with high-precision normals and another mesh with low. With attribute normalization you can use the same shader but pack the second mesh's nomrlas in bytes." />
  <row Id="20295" PostHistoryTypeId="2" PostId="9794" RevisionGUID="d68c219a-37a9-4609-93f6-8393300144fe" CreationDate="2011-03-15T13:37:59.297" UserId="4688" Text="Here is a great read about beat detection in games. &#xD;&#xA;&#xD;&#xA;http://www.badlogicgames.com/wordpress/?p=99&#xD;&#xA;&#xD;&#xA;It's a part of a 8 part blog series on the matter.&#xD;&#xA;&#xD;&#xA;http://www.badlogicgames.com/wordpress/?category_name=onset-detection-tutorial" />
  <row Id="20296" PostHistoryTypeId="5" PostId="9793" RevisionGUID="afdbb060-a083-4a45-beba-c4ab88ed1e4b" CreationDate="2011-03-15T13:46:41.493" UserId="3149" Comment="edited body" Text="Imagine you have a mesh with high-precision normals and another mesh with low. With attribute normalization you can use the same shader but pack the second mesh's normals in bytes." />
  <row Id="20297" PostHistoryTypeId="2" PostId="9795" RevisionGUID="e09c839e-4b0b-4d64-80fa-861cb2d0ea4d" CreationDate="2011-03-15T13:50:16.820" UserId="4264" Text="The &quot;normalized&quot; parameter affects the use of fixed point values.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml&quot;&gt;This doc&lt;/a&gt; says the parameter &quot;Specifies whether fixed-point data values should be normalized (GL_TRUE) or converted directly as fixed-point values (GL_FALSE) when they are accessed.&quot;&#xD;&#xA;&#xD;&#xA;Further, &lt;a href=&quot;http://www.opengl.org/sdk/docs/man3/xhtml/glVertexAttribPointer.xml&quot;&gt;this one&lt;/a&gt; states &quot;For glVertexAttribPointer, if normalized is set to GL_TRUE, it indicates that values stored in an integer format are to be mapped to the range [-1,1] (for signed values) or [0,1] (for unsigned values) when they are accessed and converted to floating point. Otherwise, values will be converted to floats directly without normalization.&quot;&#xD;&#xA;&#xD;&#xA;In summary, if you're not using fixed point values, you don't need to care. If you do, this flag controls whether (for example) byte value 128 should be 0.5 or 128.0." />
  <row Id="20298" PostHistoryTypeId="2" PostId="9796" RevisionGUID="d80739e7-0c63-4569-a3a1-03eb0f94fcdd" CreationDate="2011-03-15T14:21:04.203" UserId="5167" Text="I'm looking for a way to represent a dynamic transform hierarchy (i.e. one where nodes can be inserted and removed arbitrarily) that's a bit more efficient than using a standard tree of pointers . I saw the answers to this question ( http://gamedev.stackexchange.com/questions/3504/efficient-structure-for-representing-a-transform-hierarchy ), but as far as I can determine the tree-as-array approach only works for static hierarchies or dynamic ones where nodes have a fixed number of children (both deal-breakers for me). I'm probably wrong about that but could anyone point out how? If I'm not wrong are there other alternatives that work for dynamic hierarchies?" />
  <row Id="20299" PostHistoryTypeId="1" PostId="9796" RevisionGUID="d80739e7-0c63-4569-a3a1-03eb0f94fcdd" CreationDate="2011-03-15T14:21:04.203" UserId="5167" Text="Efficiently representing a dynamic transform hierarchy" />
  <row Id="20300" PostHistoryTypeId="3" PostId="9796" RevisionGUID="d80739e7-0c63-4569-a3a1-03eb0f94fcdd" CreationDate="2011-03-15T14:21:04.203" UserId="5167" Text="&lt;efficiency&gt;&lt;tree&gt;" />
  <row Id="20301" PostHistoryTypeId="25" PostId="9796" RevisionGUID="08c79d4c-2f37-43b5-b51d-cd35b989b23e" CreationDate="2011-03-15T14:23:27.843" Comment="http://twitter.com/#!/StackGameDev/status/47664209055596544" />
  <row Id="20302" PostHistoryTypeId="2" PostId="9797" RevisionGUID="3652b862-b54a-4af4-9a22-b54eb5b23599" CreationDate="2011-03-15T14:25:30.283" UserId="6053" Text="I am building a phone application which will display a shape on screen. The shape should look the same on different screen sizes.  I. Decided the best way to do this is to show more of the background on larger screen keeping the shapes proportion the same on all screens. &#xD;&#xA;&#xD;&#xA;My problem is I am not sure how to achieve this, I can query the screen size at runtime and calculate how different it is from the six is designed for but I am not sure what to do with this value. &#xD;&#xA;What kind of projection should I use for my orthographic matrix an hour will I display more on larger screens and not loose information on smaller screens? &#xD;&#xA;&#xD;&#xA;Thanks, Jason. " />
  <row Id="20303" PostHistoryTypeId="1" PostId="9797" RevisionGUID="3652b862-b54a-4af4-9a22-b54eb5b23599" CreationDate="2011-03-15T14:25:30.283" UserId="6053" Text="Projecting onto different size screens by cropping" />
  <row Id="20304" PostHistoryTypeId="3" PostId="9797" RevisionGUID="3652b862-b54a-4af4-9a22-b54eb5b23599" CreationDate="2011-03-15T14:25:30.283" UserId="6053" Text="&lt;opengl&gt;&lt;math&gt;&lt;matrix&gt;" />
  <row Id="20305" PostHistoryTypeId="2" PostId="9798" RevisionGUID="cabd6c0d-a133-4dde-918a-5d338c0e4910" CreationDate="2011-03-15T14:41:10.423" UserId="1929" Text="I created an awesome rogue-like game in Ruby. For the GUI, I used NCurses. Since I'm using FlatRedBall as my engine of choice for Silverlight game development, I want to port this game over.&#xD;&#xA;&#xD;&#xA;**What is the best way to efficiently doing this, and what are the pitfalls I should expect?**&#xD;&#xA;&#xD;&#xA;For example, Ruby is object-oriented, like C#, and I should be able to just convert (rewrite) classes one by one. However, I will run into issues like:&#xD;&#xA;&#xD;&#xA;- NCurses API. I need to possibly create my own notions of a &quot;Window&quot;, or else rewrite GUI code. It's one class, but it's BIG.&#xD;&#xA;- Mix-Ins. These are essentially aspect-oriented development. There are a couple of solutions in .NET, like dynamic classes.&#xD;&#xA;&#xD;&#xA;What else? Also, I should mention that I want to create a **C# application** out of this. As much as possible, I'll dump reusable and helper code, algorithms, etc. into separate projects and generate reusable DLLs." />
  <row Id="20306" PostHistoryTypeId="1" PostId="9798" RevisionGUID="cabd6c0d-a133-4dde-918a-5d338c0e4910" CreationDate="2011-03-15T14:41:10.423" UserId="1929" Text="Porting Ruby Rogue-Like to .NET and FlatRedBall" />
  <row Id="20307" PostHistoryTypeId="3" PostId="9798" RevisionGUID="cabd6c0d-a133-4dde-918a-5d338c0e4910" CreationDate="2011-03-15T14:41:10.423" UserId="1929" Text="&lt;c#&gt;&lt;ruby&gt;" />
  <row Id="20308" PostHistoryTypeId="4" PostId="9798" RevisionGUID="caec6fc0-bfb8-4cd5-bff1-a687f0c48d81" CreationDate="2011-03-15T14:59:11.603" UserId="1929" Comment="edited title" Text="Porting Ruby/NCruses Rogue-Like to .NET and FlatRedBall" />
  <row Id="20309" PostHistoryTypeId="2" PostId="9799" RevisionGUID="fa8c76a1-adab-499d-8bd5-f271a1c31e4e" CreationDate="2011-03-15T15:20:31.650" UserId="6114" Text="You will find an example (with source) of latency-proof networked physics here: http://gafferongames.com/2010/03/11/gdc-2010-networked-physics-slides-demo/&#xD;&#xA;&#xD;&#xA;But first, focus on the gameplay of your multiplayer mode.&#xD;&#xA;If it is competitive and cheating (through reverse-engineering or packet tampering) is an issue, the proposed solution might not fit your needs.&#xD;&#xA;&#xD;&#xA;Let's say your multiplayer mode is cooperative. For your singleplayer mode. I would just run the same game engine, but with the network features disabled, so that the world would not be populated with any other player characters. You would also probably want to load specific data for the multiplayer mode, to adjust the content to the number of players." />
  <row Id="20310" PostHistoryTypeId="2" PostId="9800" RevisionGUID="0ba4824a-ad47-4c20-a601-f7ccb1b54635" CreationDate="2011-03-15T15:23:06.420" UserId="1430" Text="While directly porting the classes, et cetera, over is possible, the biggest issue to be aware of (when discussing the problem at such as a high level as you are) is the different semantics for various operations and paradigms between two languages. &#xD;&#xA;&#xD;&#xA;It doesn't look like you have much selection in terms of NCurses APIs for .NET (I found [this][1], but it looked Mono-focused and thus may not meet your needs. So it sounds like you may need to rewrite that aspect of your program. [System.Console][2] has a few features that may be useful, but likely is not robust enough to replace a curses-based UI unless you were using very simple stuff.&#xD;&#xA;&#xD;&#xA;I would be careful with porting your mix-ins. There are frameworks for aspect-oriented programming in C#, but they are generally extremely heavyweight and probably not suitable for games. Hand-rolled dynamic class generation is an option, but is still likely going to be more work than it's worth for the features and behavior you're likely getting from your mix-ins. It may be best simply to port these features as individualized objects that you aggregate inside other classes and defer to.&#xD;&#xA;&#xD;&#xA;It's hard to provide much more direction without knowing more about specific technologies and techniques you employ in your game.&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/ncursessharp/&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/system.console.aspx" />
  <row Id="20311" PostHistoryTypeId="2" PostId="9801" RevisionGUID="ee5471c8-3c6c-4eec-b412-fa37409248e2" CreationDate="2011-03-15T16:33:10.307" UserId="1156" Text="There is the absolutely great [libtcod][1] you could try. Basically, it is a console emulator/Curses type console. In more detail, it is a fully fledged rogue library (i.e. dungeon generation, FoV calculation, heightmap generation..which may be useful?). It is written in C/C++, but it has wrappers for C# (and the documentation is great for all of its supported languages).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://doryen.eptalys.net/libtcod/" />
  <row Id="20312" PostHistoryTypeId="6" PostId="9798" RevisionGUID="93905311-82d6-4e83-9d8f-85a45ed8b9d1" CreationDate="2011-03-15T16:34:17.030" UserId="1156" Comment="edited tags" Text="&lt;c#&gt;&lt;roguelikes&gt;&lt;ruby&gt;" />
  <row Id="20313" PostHistoryTypeId="5" PostId="9798" RevisionGUID="46067736-16a1-4e12-9c1b-cc92d3654492" CreationDate="2011-03-15T16:41:31.780" UserId="1929" Comment="added 200 characters in body; added 64 characters in body" Text="I created an [awesome rogue-like game][1] in Ruby. For the GUI, I used NCurses. Since I'm using FlatRedBall as my engine of choice for Silverlight game development, I want to port this game over.&#xD;&#xA;&#xD;&#xA;**What is the best way to efficiently doing this, and what are the pitfalls I should expect?**&#xD;&#xA;&#xD;&#xA;For example, Ruby is object-oriented, like C#, and I should be able to just convert (rewrite) classes one by one. However, I will run into issues like:&#xD;&#xA;&#xD;&#xA;- NCurses API. I need to possibly create my own notions of a &quot;Window&quot;, or else rewrite GUI code. It's one class, but it's BIG.&#xD;&#xA;- Mix-Ins. These are essentially aspect-oriented development. There are a couple of solutions in .NET, like dynamic classes.&#xD;&#xA;&#xD;&#xA;What else? Also, I should mention that I want to create a **FlatSilverBall (C#) application** out of this. That is to say, I will be using the FlatRedBall 2D engine as my foundation. I *am not interested in Curses,* or any other variation that will allow me to make a console-type game.&#xD;&#xA;&#xD;&#xA;As much as possible, I'll dump reusable and helper code, algorithms, etc. into separate projects and generate reusable DLLs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.railsrocket.com/plainrl-10-released" />
  <row Id="20314" PostHistoryTypeId="2" PostId="9802" RevisionGUID="feff9efd-c458-45b3-a1e6-8b65bbe4a09c" CreationDate="2011-03-15T16:50:44.750" UserId="1929" Text="I'm interested in dabbling in Nintendo DS, 3DS, or GBA development. I would like to know what my (legal) options for development tools and IDEs are.&#xD;&#xA;&#xD;&#xA;In particular, I would not consider moving in this direction unless I can find:&#xD;&#xA;&#xD;&#xA;- A programming language that has managed memory (garbage collection)&#xD;&#xA;- A unit testing tool akin to JUnit, NUnit, etc. for unit tests&#xD;&#xA;&#xD;&#xA;I would also prefer if other tools exist, like code-coverage, etc. for that platform. But the main thing is managed memory and unit testing.&#xD;&#xA;&#xD;&#xA;What options are out there?" />
  <row Id="20315" PostHistoryTypeId="1" PostId="9802" RevisionGUID="feff9efd-c458-45b3-a1e6-8b65bbe4a09c" CreationDate="2011-03-15T16:50:44.750" UserId="1929" Text="Platform for DS/Gameboy Dev - Managed Memory, Tools, and Unit Testing" />
  <row Id="20316" PostHistoryTypeId="3" PostId="9802" RevisionGUID="feff9efd-c458-45b3-a1e6-8b65bbe4a09c" CreationDate="2011-03-15T16:50:44.750" UserId="1929" Text="&lt;tools&gt;&lt;nintendo&gt;&lt;ide&gt;" />
  <row Id="20317" PostHistoryTypeId="2" PostId="9803" RevisionGUID="0355c1c0-609c-45a9-9c60-70d95d9693bd" CreationDate="2011-03-15T16:57:49.000" UserId="891" Text="A socket based messaging scheme can be used to allow any arbitrary language to interact with the AI.  You could use binary based messages, xml, text, etc.  Just clearly define what the message format is and what messages you will send and receive.&#xD;&#xA;&#xD;&#xA;This technique works relatively well for light to modest communication handling.  There is a latency penalty associated with it of course, but since your game is a board game style it doesn't have to run in real-time." />
  <row Id="20318" PostHistoryTypeId="25" PostId="9802" RevisionGUID="008c4a78-93f5-4dfe-b4ee-1fe62b8edde0" CreationDate="2011-03-15T17:23:28.140" Comment="http://twitter.com/#!/StackGameDev/status/47709509518508032" />
  <row Id="20320" PostHistoryTypeId="2" PostId="9805" RevisionGUID="d14feef4-8cd8-4c13-a331-f4b453881eeb" CreationDate="2011-03-15T17:42:02.243" UserId="1156" Text="Your legal options? None short of getting a Nintendo dev license. And I doubt that's going to happen.&#xD;&#xA;&#xD;&#xA;Unit testing, managed code? I seriously doubt that. AFAICS, you need to code it in assembly, or native C/C++. I feel some C++ unit testing framework will probably work though..maybe not for the DS specific bits.&#xD;&#xA;&#xD;&#xA;For actual development, the one that came up a lot from Google was [DevKitPro][1]. Tutorials are available [here][2]. (Though the library doesn't seem well documented.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://devkitpro.org/&#xD;&#xA;  [2]: http://double.co.nz/nintendo_ds/" />
  <row Id="20321" PostHistoryTypeId="2" PostId="9806" RevisionGUID="160ccaf8-f36d-4bd5-959f-9d6c6e36efa6" CreationDate="2011-03-15T18:00:04.397" UserId="4662" Text="For any language X, you can't know what interop feature it does or does not have- no language is expected to provide any interoperation features. The most reliable is C-style, as that is (almost certainly) what your OS uses, although this doesn't mean that the language actually exposes it.&#xD;&#xA;&#xD;&#xA;Perhaps the most independent would be using a named pipe provided by the OS and sending through say, XML messages. However, this is a tad extreme- most encapsulation schemes stop short of encapsulating the authoring language." />
  <row Id="20323" PostHistoryTypeId="2" PostId="9807" RevisionGUID="c7a4b534-0512-466b-8116-8b7a739b2b14" CreationDate="2011-03-15T18:24:01.467" UserId="1198" Text="It really depends upon what type (and quantity/size) of data you're talking about. If it is a small bit of data that can be safely kept in memory for the duration of execution, something like a static class would be my recommendation.&#xD;&#xA;&#xD;&#xA;    public static class Constants&#xD;&#xA;    {&#xD;&#xA;        public static int[] Levels = { 0, 100, 200, 400, 800, 1600, 3200, 6400 }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This way, the experience required to get to Level X is `Constatns.Levels[X - 1];` and accessing other data is easy as well, if you need a collection of Items, you can add it here too, if your Items data is too large to store in memory, you can also implement caching logic within the static class.&#xD;&#xA;&#xD;&#xA;Making it static keeps a single copy in memory, and ensures that every client of this class is getting the same data.&#xD;&#xA;&#xD;&#xA;While this does &quot;tightly couple&quot; your classes together, tight coupling is not a bad thing if the design really needs it, which in the case of Item stats and XP charts, it is, IMHO, reasonable to tightly couple these. I always try to keep it simple, until something forces it to be complicated." />
  <row Id="20324" PostHistoryTypeId="2" PostId="9808" RevisionGUID="1ace25e1-bbcf-4843-aba9-cd1bd77248bd" CreationDate="2011-03-15T18:26:10.590" UserId="4662" Text="Create an object to represent each piece and pass that object in to functions that need it. This is no different to any other data- you pass it around." />
  <row Id="20325" PostHistoryTypeId="2" PostId="9809" RevisionGUID="5d3f3539-f3bc-4a5f-8b0b-19723237eee9" CreationDate="2011-03-15T19:30:25.377" UserId="1198" Text="I think that the positives of a local loop back server, far out weigh the negatives. The amount of code reduction is extremely valuable, in my opinion. &#xD;&#xA;&#xD;&#xA;With regard to running redundant physics simulations, you should look into server ticks, Valve has a great writeup on it [here][1]. In a local server environment, you maybe able to remove the &quot;client simulation&quot; and simply send full-world updates, in a local-only situation to avoid the redundant physics simulations since you'll have plenty of bandwidth.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking" />
  <row Id="20326" PostHistoryTypeId="5" PostId="9797" RevisionGUID="74a7b163-0264-435f-9572-3efbc0a3f629" CreationDate="2011-03-15T19:53:17.483" UserId="6053" Comment="added 106 characters in body" Text="I am building a phone application which will display a shape on screen. The shape should look the same on different screen sizes. I Decided the best way to do this is to show more of the background on larger screen keeping the shapes proportion the same on all screens.  &#xD;&#xA;&#xD;&#xA;My problem is I am not sure how to achieve this, I can query the screen size at runtime and calculate how different it is from the six is designed for but I am not sure what to do with this value.  &#xD;&#xA;What kind of projection should I use for my orthographic matrix an hour will I display more on larger screens and not loose information on smaller screens? &#xD;&#xA;&#xD;&#xA;EDIT: Here is an image to help illustrate what I mean -  &#xD;&#xA;&#xD;&#xA;http://img863.imageshack.us/f/shapes.png/&#xD;&#xA;&#xD;&#xA;Thanks, Jason. " />
  <row Id="20327" PostHistoryTypeId="2" PostId="9810" RevisionGUID="2d4157b8-d51f-4bc1-a857-2d290b581e78" CreationDate="2011-03-15T19:58:15.247" UserId="189" Text="What are a level designer's roles in the development of a game, what are an environment artist's, and how do they compare? Are they overlapping roles? Does a game development team typically have both roles?" />
  <row Id="20328" PostHistoryTypeId="1" PostId="9810" RevisionGUID="2d4157b8-d51f-4bc1-a857-2d290b581e78" CreationDate="2011-03-15T19:58:15.247" UserId="189" Text="What is the difference between a level designer and an environment artist?" />
  <row Id="20329" PostHistoryTypeId="3" PostId="9810" RevisionGUID="2d4157b8-d51f-4bc1-a857-2d290b581e78" CreationDate="2011-03-15T19:58:15.247" UserId="189" Text="&lt;jobs&gt;" />
  <row Id="20330" PostHistoryTypeId="25" PostId="9810" RevisionGUID="9448d743-cc51-49ec-9b98-b9cfe000b121" CreationDate="2011-03-15T20:23:27.847" Comment="http://twitter.com/#!/StackGameDev/status/47754806529490944" />
  <row Id="20331" PostHistoryTypeId="2" PostId="9811" RevisionGUID="528fb6bc-8b84-4b18-a1ef-4269be11b0bc" CreationDate="2011-03-15T20:30:31.740" UserId="2491" Text="As I see it, you have a few options:&#xD;&#xA;&#xD;&#xA;1. Port to IronRuby, build your ruby code as a .NET library, then rewrite the engine links in C# or IronRuby.  If your game's logic is already all in Ruby, no reason not to try and preserve it as a library and then write new code to interface with it.&#xD;&#xA;&#xD;&#xA;2. Do a rewrite.  This is probably how I would approach it.  C# is not Ruby, and trying to do a direct port is likely to result in frustrations.  Better to adapt what algorithms and structure you can, and then rewrite in C# so you can approach problems &quot;the C# way&quot; instead of trying to adapt a Ruby methodology to a different language." />
  <row Id="20332" PostHistoryTypeId="5" PostId="8608" RevisionGUID="b8992b62-a385-4deb-a104-0d39ee594f31" CreationDate="2011-03-15T20:38:01.657" UserId="1198" Comment="Fixed caps on &quot;i&quot; and spacing around punctuation." Text="Can anyone direct me to a site where I can download a free 3D model with a skeleton so I can practice using them in the XNA environment untill I'll make my own models? &#xD;&#xA;&#xD;&#xA;If the model is human-ish (2 legs , 2 hands and stands up) that would be great!" />
  <row Id="20333" PostHistoryTypeId="24" PostId="8608" RevisionGUID="b8992b62-a385-4deb-a104-0d39ee594f31" CreationDate="2011-03-15T20:38:01.657" Comment="Proposed by 1198 approved by 51 edit id of 80" />
  <row Id="20334" PostHistoryTypeId="2" PostId="9812" RevisionGUID="5db31f68-d5de-4658-8a94-9455798c5ac9" CreationDate="2011-03-15T20:55:12.827" UserId="51" Text="It depends on the studio.  There are two fundamental camps.  The terms are ones I've used, but probably aren't common elsewhere.&#xD;&#xA;&#xD;&#xA;&quot;Dallas-style&quot; level designers typically do everything, typically using some kind of engine that has heavy brush editing (i.e. quake based).  Usually from layout, texturing, placing props, lighting, NPC placement, scripting, etc.  &quot;Environment artist&quot; isn't really a position that exists.  Usually the art department are involved with making textures, ancillary props, skyboxes, and occasionally some integrated hero props (that are usually first roughed out with brushes and then exported into a format where the artist can make something over top of it in something like Max).  You'll occasionally do things like paintovers from concept artists to give the LDs some artistic inspiration for the final art passes.  The LD is primarily the one responsible for maintaining performance.  A lot time this is with older engines that require a bit more care and technical knowledge because these engines are portal based.&#xD;&#xA;&#xD;&#xA;&quot;California-style&quot; level designers mostly do layout and scripting only.  This is more common with engines that are based around art tools (i.e. the LDs are also using Max).  After gameplay is proved out, the environment artists go in and do the rest.  Texturing, props, particles, sometimes lighting, and pretty much anything that isn't gameplay specific is done by the artists.  They usually work pretty close with the concept artists.  The artists have a good amount of responsibility with performance in this mode as well, usually in the form of &quot;keep this number in the green&quot; for a given scene.  &#xD;&#xA;&#xD;&#xA;Fortunately, &quot;Dallas style&quot; level designing seems to be going away.  Splitting up responsibilities means that you aren't putting as much on the shoulders of the LDs.  Plus you have a higher theoretical artistic bar if your artists are the ones doing the &quot;arting up&quot;.  &#xD;&#xA;&#xD;&#xA;Why is &quot;Dallas style&quot; still popular at all?  Mainly due to the engines being used.  Artists generally are averse to learning LD tools.  They can be very comfortable with Max/Maya, but trying to get a not-very-technical artist to use something like Radiant can be a bit of a disaster.  Some studios have solved this as a culture issue.&#xD;&#xA;" />
  <row Id="20335" PostHistoryTypeId="2" PostId="9813" RevisionGUID="41f8c3b4-403f-49a6-81cf-2cec97372f9a" CreationDate="2011-03-15T20:56:58.153" UserId="4513" Text="An environment artist would focus on building the ambient nature of the world, ideally intended to immerse the player.&#xD;&#xA;This would probably range from the colours of the sunset, to the placement of non-gameplay oriented objects.&#xD;&#xA;A level designer would be implementing the placement of Ai, vehicles and necessary game objects.&#xD;&#xA;&#xD;&#xA;If you think of a game such as Crysis, an environment artist would likely design the world in an artistic sense, then revise it based on changes made by the level designer after.&#xD;&#xA;&#xD;&#xA;Contrary to what CommunistDuck mentioned, world objects such as doors and plants would probably be done by a 3d artist." />
  <row Id="20336" PostHistoryTypeId="2" PostId="9814" RevisionGUID="aaf22e8b-c0e7-4260-90af-4a163358acf1" CreationDate="2011-03-15T21:30:36.010" UserId="1510" Text="i would like to start developing my own shaders within unity. &#xD;&#xA;for starting i would like to do a screen spaced blur. &#xD;&#xA;&#xD;&#xA;are there any good tutorials to learn shader development besides the official unity documentation, which i find a bit hard to understand.&#xD;&#xA;&#xD;&#xA;thanks!" />
  <row Id="20337" PostHistoryTypeId="1" PostId="9814" RevisionGUID="aaf22e8b-c0e7-4260-90af-4a163358acf1" CreationDate="2011-03-15T21:30:36.010" UserId="1510" Text="shader tutorial for unity" />
  <row Id="20338" PostHistoryTypeId="3" PostId="9814" RevisionGUID="aaf22e8b-c0e7-4260-90af-4a163358acf1" CreationDate="2011-03-15T21:30:36.010" UserId="1510" Text="&lt;unity&gt;" />
  <row Id="20339" PostHistoryTypeId="5" PostId="9791" RevisionGUID="4ce87d28-d0e4-470d-b174-dc04a00d9ecc" CreationDate="2011-03-15T21:36:16.083" UserId="2091" Comment="added 1619 characters in body" Text="Well, if your input signal is real (as in, each sample is a real number), the spectrum will be symmetric and complex.  Exploiting the symmetry, usually FFT algorithms pack the result by giving you back only the positive half of the spectrum.  The real part of each band is in the even samples and the imaginary part in the odd samples.  Or sometimes the real parts are packed together in the first half of the response and the imaginary parts in the second half.&#xD;&#xA;&#xD;&#xA;In formulas, if X[k] = FFT( x[n] ), you give it a vector i[n] = x[n] , and get an output o[m], then&#xD;&#xA;&#xD;&#xA;    X[k] = o[2k] + j·o[2k+1]&#xD;&#xA;&#xD;&#xA;(although sometimes you get X[k] = o[k] + j·o[k+K/2], where K is the length of your window, 1024 in your example).  By the way, j is the imaginary unit, sqrt(-1).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The magnitude of a band is computed as the root of the product of this band with its complex conjugate:&#xD;&#xA;&#xD;&#xA;    |X[k]| = sqrt( X[k] · X[k]* )&#xD;&#xA;&#xD;&#xA;And the energy is defined as the square of the magnitude.&#xD;&#xA;&#xD;&#xA;If we call a = o[2k] and b = o[2k+1], we get&#xD;&#xA;&#xD;&#xA;    X[k] = a + j·b&#xD;&#xA;&#xD;&#xA;therefore&#xD;&#xA;&#xD;&#xA;    E[k] = |X[k]|^2 = (a+j·b)·(a-j·b) = a·a + b·b&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Unrolling the whole thing, if you got o[m] as output from the FFT algorithm, the energy in the band k is:&#xD;&#xA;&#xD;&#xA;    E[k] = o[2k] · o[2k] + o[2k+1] · o[2k+1]&#xD;&#xA;&#xD;&#xA;(Note: I used the symbol · to indicate multiplication instead of the usual * in order to avoid confusion with the conjugation operator)&#xD;&#xA;&#xD;&#xA;The frequency of the band k, assuming a sampling frequency of 44.1Khz and a window of 1024 samples, is&#xD;&#xA;&#xD;&#xA;    freq(k) = k / 1024 * 44100 [Hz]&#xD;&#xA;&#xD;&#xA;So, for example, your first band k=0 represents 0 Hz, k=1 is 43 Hz, and the last one k=511 is 22KHz (the Nyquist frequency).&#xD;&#xA;&#xD;&#xA;I hope this answers your question about how do you get the energy of the signal per band using the FFT.&#xD;&#xA;&#xD;&#xA;**Addendum**: Answering your question in the comment, and assuming you are using the code from the link you posted in the question (The Cooley-Tukey algorithm in C):&#xD;&#xA;Let's say you have your input data as a vector of short ints:&#xD;&#xA;&#xD;&#xA;    // len is 1024 in this example.  It MUST be a power of 2&#xD;&#xA;    // centerFreq is given in Hz, for example 43.0&#xD;&#xA;    double EnergyForBand( short *input, int len, double centerFreq)&#xD;&#xA;    {&#xD;&#xA;      int i;&#xD;&#xA;      int band;&#xD;&#xA;      complex *xin;&#xD;&#xA;      complex *xout;&#xD;&#xA;      double magnitude;&#xD;&#xA;      double samplingFreq = 44100.0; &#xD;&#xA;    &#xD;&#xA;      // 1. Get the input as a vector of complex samples&#xD;&#xA;      xin = (complex *)malloc(sizeof(struct complex_t) * N);&#xD;&#xA;    &#xD;&#xA;      for (i=0;i&lt;len;i++) {&#xD;&#xA;        xin[i].re = (double)input[i];&#xD;&#xA;        xin[i].im = 0;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      // 2. Transform the signal&#xD;&#xA;      xout = FFT_simple(xin, len);&#xD;&#xA;    &#xD;&#xA;      // 3. Find the band (it might be better to use round rather than floor)&#xD;&#xA;      band = (int) floor(centerFreq * len / samplingFreq); &#xD;&#xA;    &#xD;&#xA;      // 4. Get the magnitude&#xD;&#xA;      magnitude = complex_magnitude( xout[band] );&#xD;&#xA;&#xD;&#xA;      // 5. Don't leak memory&#xD;&#xA;      free( xin );&#xD;&#xA;      free( xout );&#xD;&#xA;&#xD;&#xA;      // 6. Return energy&#xD;&#xA;      return magnitude * magnitude;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My C is a bit rusty (I am mostly coding in C++ nowadays), but I hope I didn´t make any big mistake with this code.  Of course if you were interested in the energy of other bands it makes no sense to transform the whole window for each of them, that would be a waste of CPU time.  In that case do the transformation once and get all the values you need from xout." />
  <row Id="20340" PostHistoryTypeId="2" PostId="9815" RevisionGUID="4d359bc2-fab0-459d-b86d-0b8f7781b6e0" CreationDate="2011-03-15T22:02:55.373" UserId="3794" Text="Our studio has entry test for animators and it is human 3D model with bones. It is rigged maya scene. You are allowed to use it for non comercial purposes.&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - [download model][2]&#xD;&#xA; - [whole page][3] (in czech language)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/y65TT.jpg&#xD;&#xA;  [2]: http://www.aaa-studio.cz/povesti/3ddata/LowPoly_RIG.zip&#xD;&#xA;  [3]: http://www.aaa-studio.cz/povesti/pripojit.php" />
  <row Id="20341" PostHistoryTypeId="25" PostId="9814" RevisionGUID="39ff1152-b082-48db-bcb8-605f939ef0e5" CreationDate="2011-03-15T23:23:27.800" Comment="http://twitter.com/#!/StackGameDev/status/47800105046253568" />
  <row Id="20342" PostHistoryTypeId="2" PostId="9816" RevisionGUID="6940100b-ac15-43b1-9891-5c229ff9a604" CreationDate="2011-03-15T23:41:52.380" UserId="5267" Text="Ironically, TvTropes.org has the thing you're looking for!&#xD;&#xA;&#xD;&#xA;[Videogame Tropes][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tvtropes.org/pmwiki/pmwiki.php/Main/VideogameTropes" />
  <row Id="20343" PostHistoryTypeId="12" PostId="9816" RevisionGUID="99dba62e-e17a-4b4e-9914-c52017fa2ce2" CreationDate="2011-03-15T23:43:22.987" UserId="5267" Text="[{&quot;Id&quot;:5267,&quot;DisplayName&quot;:&quot;Lathentar&quot;}]" />
  <row Id="20344" PostHistoryTypeId="13" PostId="9816" RevisionGUID="a3fc50f5-433f-4a98-ad18-827dec61030f" CreationDate="2011-03-15T23:46:38.083" UserId="5267" Text="[{&quot;Id&quot;:5267,&quot;DisplayName&quot;:&quot;Lathentar&quot;}]" />
  <row Id="20345" PostHistoryTypeId="5" PostId="9816" RevisionGUID="afd66fba-b62f-4e4b-9218-579d4a3c3c29" CreationDate="2011-03-15T23:47:40.080" UserId="5267" Comment="added 71 characters in body; edited body" Text="I know you disregarded tvTropes in your question, but they have a page for video games with a section for common gameplay tropes.&#xD;&#xA;&#xD;&#xA;[Videogame Tropes][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tvtropes.org/pmwiki/pmwiki.php/Main/VideogameTropes" />
  <row Id="20346" PostHistoryTypeId="2" PostId="9817" RevisionGUID="cfd492ba-a835-481e-8495-af45211e17f8" CreationDate="2011-03-16T00:07:34.953" UserId="2962" Text="Ernest Adams' [No Twinkie database][1]. It's a collection of game design anti-patterns.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designersnotebook.com/Design_Resources/No_Twinkie_Database/no_twinkie_database.htm" />
  <row Id="20347" PostHistoryTypeId="2" PostId="9818" RevisionGUID="2f9f06b1-7837-48c5-997e-39739dd86fab" CreationDate="2011-03-16T00:38:46.687" UserId="5167" Text="To tack on a note to 5ound's answer: pay attention to the level of the memory warning. Prior to iOS 3.2 there was no way to distinguish between warnings of different severity (i.e. is the OS just sitting on a bunch of UIImages it can clear or is there really no memory left?). in 3.2 onwards you can check the level of the memory warning to determine how to react. In my experience level 1 warnings are constant, unavoidable and largely meaningless, so I wouldn't take drastic action in response to them. Although level 2 warnings are not necessarily a sign of impending doom you should probably take them seriously and start clearing any caches you can, etc.&#xD;&#xA;&#xD;&#xA;There's a good discussion of the different level's here: http://stackoverflow.com/questions/2915247/iphone-os-memory-warnings-what-do-the-different-levels-mean&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;P.S. - This is more of a comment to 5ound's answer but I don't have enough rep to comment so this was my only option..." />
  <row Id="20351" PostHistoryTypeId="2" PostId="9820" RevisionGUID="5e6077b1-a223-446b-8899-46edc4ab9b14" CreationDate="2011-03-16T01:46:51.380" UserId="3198" Text="GBA and DS dev is **not** open to individuals, neither the software or the hardware used in development can be acquired unless you are an employee of an established game development company.&#xD;&#xA;&#xD;&#xA;That being said, there was a fairly good homebrew GBA dev community back in the day, and I think it has carried on into the DS somewhat.&#xD;&#xA;&#xD;&#xA;Check out [http://gbadev.org][1], they have a lot of good info on what it takes to make a GBA game.&#xD;&#xA;&#xD;&#xA;Personally, my first game before getting into the industry was a homebrew GBA demo. I had about 6 months of programming experience after reading a book on C++(which I didn't finish) and I was able to make a small demo, so it's certainly doable with the rights tools.&#xD;&#xA;&#xD;&#xA;As I recall, used [VBA][2], [tonc's awesome tutorials][3] and [Programmer's Notepad][4] with GCC(info at tonc) to make my little demo in C++. It was a great learning experience and really not terrible difficult for someone who's coded before.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gbadev.org&#xD;&#xA;  [2]: http://vba.ngemu.com/&#xD;&#xA;  [3]: http://www.coranac.com/tonc/text/&#xD;&#xA;  [4]: http://www.pnotepad.org/" />
  <row Id="20352" PostHistoryTypeId="2" PostId="9821" RevisionGUID="762f7194-6f6f-491a-99ef-115788e06abb" CreationDate="2011-03-16T02:11:36.090" UserId="160" Text="Don't let the lack of memory management scare you off. A rudimentary smart pointer class is [surprisingly easy](https://bitbucket.org/munificent/finch/src/a023174c4681/src/Base/Ref.h) to create on your own, and there are lots of other easy ways to simplify managing your memory:&#xD;&#xA;&#xD;&#xA;* Use static objects for things that you need one or a fixed number of.&#xD;&#xA;* Use [object pools](http://gameprogrammingpatterns.com/object-pool.html) for objects you need to create and destroy dynamically and whose lifetime you don't know.&#xD;&#xA;* For transient objects (things that you don't need for more than a frame) a simple per-frame allocator (similar to [auto release pools](http://www.codeproject.com/KB/cpp/memreleasepool.aspx) in Objective-C) will work well.&#xD;&#xA;&#xD;&#xA;If you want to code for the GBA or DS that implies to me that you *do* want to go a bit lower-level than the average Flash game, and memory management is part of that. Give it a try and you may find it's not as bad as you feared." />
  <row Id="20353" PostHistoryTypeId="2" PostId="9822" RevisionGUID="220bbcc9-05c3-4c25-8ba4-b6dab9bdd14e" CreationDate="2011-03-16T02:12:31.537" UserId="5527" Text="I'm looking more for high level role such as producer/manager of the group making the tools for a content pipeline. This would be for a large AAA studio.&#xD;&#xA;&#xD;&#xA;Also what kinds of tools are they creating?&#xD;&#xA;" />
  <row Id="20354" PostHistoryTypeId="1" PostId="9822" RevisionGUID="220bbcc9-05c3-4c25-8ba4-b6dab9bdd14e" CreationDate="2011-03-16T02:12:31.537" UserId="5527" Text="What kind of skills are required to work in a content pipeline department in a high level role" />
  <row Id="20355" PostHistoryTypeId="3" PostId="9822" RevisionGUID="220bbcc9-05c3-4c25-8ba4-b6dab9bdd14e" CreationDate="2011-03-16T02:12:31.537" UserId="5527" Text="&lt;architecture&gt;&lt;tools&gt;&lt;textures&gt;&lt;pipeline&gt;" />
  <row Id="20357" PostHistoryTypeId="2" PostId="9823" RevisionGUID="3e404c38-78c1-4268-a42c-b6021f085db0" CreationDate="2011-03-16T02:31:10.107" UserId="160" Text="&gt; Mix-Ins. These are essentially aspect-oriented development. There are a couple of solutions in .NET, like dynamic classes.&#xD;&#xA;&#xD;&#xA;Mixins are definitely *not* like AOP. You can get much of the benefit of mixins in C# using interfaces and extension methods. For example, here's a mixin and a class that includes it in your code:&#xD;&#xA;&#xD;&#xA;    # Defines functionality that any class that mixes it in can have:&#xD;&#xA;    module ValuableObject&#xD;&#xA;      def effective_cost&#xD;&#xA;        raw = self.cost # Implicit requirement on mixing-in class.&#xD;&#xA;        if raw &lt; 10000&#xD;&#xA;          return raw&#xD;&#xA;        elsif (raw &gt;= 10000 &amp;&amp; raw &lt; 1000000)&#xD;&#xA;          return &quot;#{raw.to_s[0 ... -3]}k&quot;&#xD;&#xA;        else&#xD;&#xA;          return &quot;#{raw.to_s[0 ... -6]}m&quot;&#xD;&#xA;        end&#xD;&#xA;      end&#xD;&#xA;    end&#xD;&#xA;    &#xD;&#xA;    # Class that mixes it in:&#xD;&#xA;    class Weapon &lt; Item&#xD;&#xA;      require &quot;classes/modules/ValuableObject&quot;&#xD;&#xA;      include ValuableObject&#xD;&#xA;      &#xD;&#xA;      attr_accessor :cost&#xD;&#xA;&#xD;&#xA;      # More stuff...&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;That translates directly to C# like this:&#xD;&#xA;&#xD;&#xA;    // Makes mixin's requirements on host class explicit:&#xD;&#xA;    interface IValuable&#xD;&#xA;    {&#xD;&#xA;        int Cost { get; }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Any class that implements IValuable will mix in these methods:&#xD;&#xA;    public static class ValuableExtensions&#xD;&#xA;    {&#xD;&#xA;        public static string GetEffectiveCost(this IValuable valuable)&#xD;&#xA;        {&#xD;&#xA;            var raw = valuable.Cost;&#xD;&#xA;            if (raw &lt; 10000) return raw;&#xD;&#xA;            else if (raw &gt;= 10000 &amp;&amp; raw &lt; 1000000) return (raw / 10000) + &quot;k&quot;;&#xD;&#xA;            else return (raw / 1000000) + &quot;m&quot;;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Class that mixes in:&#xD;&#xA;    public class Weapon : Item, IValuable&#xD;&#xA;    {&#xD;&#xA;        public int Cost { get; set; }&#xD;&#xA;        &#xD;&#xA;        // More stuff...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With that, you can then do:&#xD;&#xA;&#xD;&#xA;    var weapon = new Weapon();&#xD;&#xA;    weapon.GetEffectiveCost();&#xD;&#xA;&#xD;&#xA;Don't reach for dynamism unless you're actually doing something dynamic." />
  <row Id="20358" PostHistoryTypeId="5" PostId="9771" RevisionGUID="ce79c478-058e-4a96-b79d-ecde7818d5dc" CreationDate="2011-03-16T03:03:32.027" UserId="1929" Comment="added 273 characters in body" Text="I hate to say it, but a good (or bad) UI can make (or break) your application. If possible, get a group of beta-testers together (your friends who all have iPhones?), give them a free copy of your game, and drill them about the UI.&#xD;&#xA;&#xD;&#xA;Assuming you have more than one person who's willing to do this, you can easily see trends in good (and bad).&#xD;&#xA;&#xD;&#xA;Beyond that, I would **pick up a book or two about usability;** that's more important than GUI, imo. If you have a great, usable UI (albeit not sparklingly beautiful), people will like your game. But if you have amazing graphics and poor usability, people will put your game down quickly.&#xD;&#xA;&#xD;&#xA;As for colour-blindness, just don't put red on a green background (or vice versa) and you're good to go. If people who are colour-blind are playing your game (and complaining), that's a great sign that you're getting lots of users.&#xD;&#xA;&#xD;&#xA;**Edit:** some materials that might be useful:&#xD;&#xA;- [Dive into Accessibility][1] (30 day accessibility &quot;course&quot;), i.e. usability for disabilities&#xD;&#xA;&#xD;&#xA;There's a book I read, but I can't find it; try googling for good resources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://diveintoaccessibility.org/" />
  <row Id="20359" PostHistoryTypeId="5" PostId="9820" RevisionGUID="7cea8638-327a-46c1-b25f-3c2b7c9e44e8" CreationDate="2011-03-16T04:51:48.683" UserId="3198" Comment="added 2 characters in body" Text="GBA and DS dev is **not** open to individuals, neither the software or the hardware used in development can be acquired unless you are an employee of an established game development company.&#xD;&#xA;&#xD;&#xA;That being said, there was a fairly good homebrew GBA dev community back in the day, and I think it has carried on into the DS somewhat.&#xD;&#xA;&#xD;&#xA;Check out [http://gbadev.org][1], they have a lot of good info on what it takes to make a GBA game.&#xD;&#xA;&#xD;&#xA;Personally, my first game before getting into the industry was a homebrew GBA demo. I had about 6 months of programming experience after reading a book on C++(which I didn't finish) and I was able to make a small demo, so it's certainly doable with the rights tools.&#xD;&#xA;&#xD;&#xA;As I recall, I used [VBA][2], [tonc's awesome tutorials][3] and [Programmer's Notepad][4] with GCC(info at tonc) to make my little demo in C++. It was a great learning experience and really not terrible difficult for someone who's coded before.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gbadev.org&#xD;&#xA;  [2]: http://vba.ngemu.com/&#xD;&#xA;  [3]: http://www.coranac.com/tonc/text/&#xD;&#xA;  [4]: http://www.pnotepad.org/" />
  <row Id="20360" PostHistoryTypeId="2" PostId="9824" RevisionGUID="0636a4fc-ae3c-49cf-97ce-0c49723d4ebd" CreationDate="2011-03-16T05:09:28.000" UserId="5925" Text="I have added an interface to input cheats, and of course the backend of this. &#xD;&#xA;Current cheats include:&#xD;&#xA;&#xD;&#xA;    unlimited health&#xD;&#xA;    unlimited time&#xD;&#xA;    faster movement&#xD;&#xA;    no need to use keys (i have a door/key system)&#xD;&#xA;    triple firing lasers (normally there is only one)&#xD;&#xA;    grenades (changes your weapon to grenades)&#xD;&#xA;&#xD;&#xA;But the question is, how will i tell the user the cheat codes? Normally cheats would be sold by the programmer, but this isn't that sort of game currently!&#xD;&#xA;&#xD;&#xA;Any advice would be appreciated, thanks" />
  <row Id="20361" PostHistoryTypeId="1" PostId="9824" RevisionGUID="0636a4fc-ae3c-49cf-97ce-0c49723d4ebd" CreationDate="2011-03-16T05:09:28.000" UserId="5925" Text="Cheat implementation" />
  <row Id="20362" PostHistoryTypeId="3" PostId="9824" RevisionGUID="0636a4fc-ae3c-49cf-97ce-0c49723d4ebd" CreationDate="2011-03-16T05:09:28.000" UserId="5925" Text="&lt;fun&gt;" />
  <row Id="20363" PostHistoryTypeId="2" PostId="9825" RevisionGUID="13755ea5-87f5-4d74-a32d-a9105dc77c03" CreationDate="2011-03-16T05:12:25.943" UserId="2100" Text="There is an open-source XNA project which is an excellent library and implementation of 2D lighting that happens to be compatible with XNA 4.0's Reach profile - [Krypton XNA][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://krypton.codeplex.com/" />
  <row Id="20364" PostHistoryTypeId="2" PostId="9826" RevisionGUID="a7f18360-aa51-4f1e-a6e4-206b11fffd50" CreationDate="2011-03-16T05:19:14.060" UserId="962" Text="Put a cheats menu in the pause menu.&#xD;&#xA;------------------------------------&#xD;&#xA;&#xD;&#xA;Before you allow the cheats to be used, warn the user that his current game/score will be invalidated if he wants to continue and use the cheat, but only warn for the first time in a session if they are using a cheat, so if they use one they can use the others with impunity.&#xD;&#xA;&#xD;&#xA;Allow a user to unlock them somehow by playing through content of the game.&#xD;&#xA;----------------------------------------&#xD;&#xA;If you want to give them the codes you can either have the cheat code number be reviled to them if they reach a certain part of the game or reach a certain score, or unlock a certain achievement. Alternatively you can have the user just unlock it from the menu when reaches whatever criteria you set for it." />
  <row Id="20365" PostHistoryTypeId="5" PostId="9824" RevisionGUID="252c1448-0f26-4cfa-9097-8b8c74aa721b" CreationDate="2011-03-16T05:20:15.760" UserId="962" Comment="deleted 50 characters in body" Text="I have added an interface to input cheats, and of course the backend of this. &#xD;&#xA;Current cheats include:&#xD;&#xA;&#xD;&#xA;    unlimited health&#xD;&#xA;    unlimited time&#xD;&#xA;    faster movement&#xD;&#xA;    no need to use keys (i have a door/key system)&#xD;&#xA;    triple firing lasers (normally there is only one)&#xD;&#xA;    grenades (changes your weapon to grenades)&#xD;&#xA;&#xD;&#xA;But the question is, how will i tell the user the cheat codes? Normally cheats would be sold by the programmer, but this isn't that sort of game currently!" />
  <row Id="20366" PostHistoryTypeId="2" PostId="9827" RevisionGUID="1fe435a0-ded1-4c1e-832b-720866386368" CreationDate="2011-03-16T05:21:28.690" UserId="4264" Text="Having glDepthMask disabled during flip may cause the problem. Probably a driver issue; best to update the drivers (i.e, get a new ROM) at some point, but as a workaround keep it turned on as much as possible." />
  <row Id="20367" PostHistoryTypeId="25" PostId="9824" RevisionGUID="6d34c510-b2a3-4cef-828f-83926e4f528e" CreationDate="2011-03-16T05:23:28.617" Comment="http://twitter.com/#!/StackGameDev/status/47890705263243266" />
  <row Id="20368" PostHistoryTypeId="2" PostId="9828" RevisionGUID="3d985e8f-2a38-45f3-8eb7-49f913be5d40" CreationDate="2011-03-16T05:23:39.530" UserId="4264" Text="Well.. judging from the discussion, I'd say if the changes are frequent, the tree model wins; if changes are infrequent, the array model wins (it's ok to rebuild the array if it's rare).. &#xD;&#xA;&#xD;&#xA;In a real-world case some hybrid might be the optimal, leaving most of the hierarchy static while other parts are dynamic. &#xD;&#xA;&#xD;&#xA;I didn't post this as an answer before though, as someone might have actual experience on the matter, instead of just pondering on it on an algorithmic level. In any case, I'd look into this only after it's found to be an issue." />
  <row Id="20369" PostHistoryTypeId="5" PostId="9827" RevisionGUID="f855996e-8e2c-44fb-978b-fa3c9d56f846" CreationDate="2011-03-16T05:27:08.500" UserId="4264" Comment="added 101 characters in body" Text="Having glDepthMask disabled during flip may cause the problem. Probably a driver issue; best to update the drivers (i.e, get a new ROM) at some point, but as a workaround keep it turned on as much as possible.&#xD;&#xA;&#xD;&#xA;EDIT: actually, glDepthMask seems to affect glClear, so this may not be a driver issue after all." />
  <row Id="20370" PostHistoryTypeId="5" PostId="9827" RevisionGUID="2aa3f918-a5ab-4ddd-9b05-9b14398c2c87" CreationDate="2011-03-16T05:32:15.263" UserId="4264" Comment="added 99 characters in body" Text="Having glDepthMask disabled during flip may cause the problem. Probably a driver issue; best to update the drivers (i.e, get a new ROM) at some point, but as a workaround keep it turned on as much as possible.&#xD;&#xA;&#xD;&#xA;EDIT: actually, &lt;a href=&quot;http://stackoverflow.com/questions/4531508/c-opengl-z-buffer-prepass/4533909#4533909&quot;&gt;glDepthMask seems to affect glClear&lt;/a&gt;, so this may not be a driver issue after all." />
  <row Id="20371" PostHistoryTypeId="2" PostId="9829" RevisionGUID="d2460eee-ca91-4bdc-a439-56c052251925" CreationDate="2011-03-16T05:41:59.913" UserId="5932" Text="Well When I play games I absolutely hate the opportunity to cheat until I've played the whole way through. Because I'll get frustrated with one part and want to skip it, so I'll revert to cheats, but it will make the whole game horribly boring! &#xD;&#xA;&#xD;&#xA;What I'd do is have the player run through at least once before enabling cheats. Then once you do, enable them all, because it really should open up the game, make it a sand box of sorts." />
  <row Id="20372" PostHistoryTypeId="2" PostId="9830" RevisionGUID="15578962-f289-4c27-9845-9e31cd107c87" CreationDate="2011-03-16T07:43:42.833" UserId="2792" Text="One quite efficient representation is an array of matrices combined with an array of parent indices. If you keep things sorted, an updates is just a loop over the array. See [Practical Examples in Data Oriented Design][1] by the BitSquid guys. You might not need to resort that much depending of your change patterns.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.google.com/present/view?id=0AYqySQy4JUK1ZGNzNnZmNWpfMzJkaG5yM3pjZA&amp;hl=en" />
  <row Id="20373" PostHistoryTypeId="25" PostId="9798" RevisionGUID="1e0e9325-5c20-4043-b2f7-e338df3a35fd" CreationDate="2011-03-16T08:23:28.743" Comment="http://twitter.com/#!/StackGameDev/status/47936004321062912" />
  <row Id="20374" PostHistoryTypeId="5" PostId="9830" RevisionGUID="5a64277e-12f2-421d-beac-36fc1cb9e129" CreationDate="2011-03-16T08:55:53.630" UserId="2792" Comment="added 1 characters in body" Text="One quite efficient representation is an array of matrices combined with an array of parent indices. If you keep things sorted, and updates is just a loop over the array. See [Practical Examples in Data Oriented Design][1] by the BitSquid guys. You might not need to resort that much depending of your change patterns.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.google.com/present/view?id=0AYqySQy4JUK1ZGNzNnZmNWpfMzJkaG5yM3pjZA&amp;hl=en" />
  <row Id="20375" PostHistoryTypeId="5" PostId="9791" RevisionGUID="0e8cea67-e3f9-4dd5-b77e-5c26ffe10211" CreationDate="2011-03-16T09:01:23.317" UserId="2091" Comment="deleted 12 characters in body; added 2 characters in body" Text="Well, if your input signal is real (as in, each sample is a real number), the spectrum will be symmetric and complex.  Exploiting the symmetry, usually FFT algorithms pack the result by giving you back only the positive half of the spectrum.  The real part of each band is in the even samples and the imaginary part in the odd samples.  Or sometimes the real parts are packed together in the first half of the response and the imaginary parts in the second half.&#xD;&#xA;&#xD;&#xA;In formulas, if X[k] = FFT( x[n] ), you give it a vector i[n] = x[n] , and get an output o[m], then&#xD;&#xA;&#xD;&#xA;    X[k] = o[2k] + j·o[2k+1]&#xD;&#xA;&#xD;&#xA;(although sometimes you get X[k] = o[k] + j·o[k+K/2], where K is the length of your window, 1024 in your example).  By the way, j is the imaginary unit, sqrt(-1).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The magnitude of a band is computed as the root of the product of this band with its complex conjugate:&#xD;&#xA;&#xD;&#xA;    |X[k]| = sqrt( X[k] · X[k]* )&#xD;&#xA;&#xD;&#xA;And the energy is defined as the square of the magnitude.&#xD;&#xA;&#xD;&#xA;If we call a = o[2k] and b = o[2k+1], we get&#xD;&#xA;&#xD;&#xA;    X[k] = a + j·b&#xD;&#xA;&#xD;&#xA;therefore&#xD;&#xA;&#xD;&#xA;    E[k] = |X[k]|^2 = (a+j·b)·(a-j·b) = a·a + b·b&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Unrolling the whole thing, if you got o[m] as output from the FFT algorithm, the energy in the band k is:&#xD;&#xA;&#xD;&#xA;    E[k] = o[2k] · o[2k] + o[2k+1] · o[2k+1]&#xD;&#xA;&#xD;&#xA;(Note: I used the symbol · to indicate multiplication instead of the usual * in order to avoid confusion with the conjugation operator)&#xD;&#xA;&#xD;&#xA;The frequency of the band k, assuming a sampling frequency of 44.1Khz and a window of 1024 samples, is&#xD;&#xA;&#xD;&#xA;    freq(k) = k / 1024 * 44100 [Hz]&#xD;&#xA;&#xD;&#xA;So, for example, your first band k=0 represents 0 Hz, k=1 is 43 Hz, and the last one k=511 is 22KHz (the Nyquist frequency).&#xD;&#xA;&#xD;&#xA;I hope this answers your question about how do you get the energy of the signal per band using the FFT.&#xD;&#xA;&#xD;&#xA;**Addendum**: Answering your question in the comment, and assuming you are using the code from the link you posted in the question (The Cooley-Tukey algorithm in C):&#xD;&#xA;Let's say you have your input data as a vector of short ints:&#xD;&#xA;&#xD;&#xA;    // len is 1024 in this example.  It MUST be a power of 2&#xD;&#xA;    // centerFreq is given in Hz, for example 43.0&#xD;&#xA;    double EnergyForBand( short *input, int len, double centerFreq)&#xD;&#xA;    {&#xD;&#xA;      int i;&#xD;&#xA;      int band;&#xD;&#xA;      complex *xin;&#xD;&#xA;      complex *xout;&#xD;&#xA;      double magnitude;&#xD;&#xA;      double samplingFreq = 44100.0; &#xD;&#xA;    &#xD;&#xA;      // 1. Get the input as a vector of complex samples&#xD;&#xA;      xin = (complex *)malloc(sizeof(struct complex_t) * len);&#xD;&#xA;    &#xD;&#xA;      for (i=0;i&lt;len;i++) {&#xD;&#xA;        xin[i].re = (double)input[i];&#xD;&#xA;        xin[i].im = 0;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      // 2. Transform the signal&#xD;&#xA;      xout = FFT_simple(xin, len);&#xD;&#xA;    &#xD;&#xA;      // 3. Find the band ( Note: floor(x+0.5) = round(x) )&#xD;&#xA;      band = (int) floor(centerFreq * len / samplingFreq + 0.5); &#xD;&#xA;    &#xD;&#xA;      // 4. Get the magnitude&#xD;&#xA;      magnitude = complex_magnitude( xout[band] );&#xD;&#xA;&#xD;&#xA;      // 5. Don't leak memory&#xD;&#xA;      free( xin );&#xD;&#xA;      free( xout );&#xD;&#xA;&#xD;&#xA;      // 6. Return energy&#xD;&#xA;      return magnitude * magnitude;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My C is a bit rusty (I am mostly coding in C++ nowadays), but I hope I didn´t make any big mistake with this code.  Of course if you were interested in the energy of other bands it makes no sense to transform the whole window for each of them, that would be a waste of CPU time.  In that case do the transformation once and get all the values you need from xout." />
  <row Id="20376" PostHistoryTypeId="2" PostId="9831" RevisionGUID="a44b2b8c-0a0e-41a3-bbd4-3f3610c53e1c" CreationDate="2011-03-16T09:07:01.670" UserId="5824" Text="I'd expect the primary requirement would be experience, if not specifically of the role you want at least some relevant game development / management experience. Have you tried looking around for available positions and seeing what skills they say are important?&#xD;&#xA;&#xD;&#xA;Tools could be anything from basic texture converters to complex game editors that let the designers create the game like the [Unreal Editor][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unrealengine.com/features/editor/" />
  <row Id="20377" PostHistoryTypeId="25" PostId="9822" RevisionGUID="cb17342f-9d07-42c8-bbd8-e6801288a4cb" CreationDate="2011-03-16T11:23:29.057" Comment="http://twitter.com/#!/StackGameDev/status/47981304314216448" />
  <row Id="20378" PostHistoryTypeId="2" PostId="9832" RevisionGUID="c260873b-d5f4-4d84-bc48-53756cf4ef1f" CreationDate="2011-03-16T12:35:15.030" UserId="1929" Text="I'm assuming we're talking about desktop games -- something the player downloads and runs on their local computer. Many are the memory editors that allow you to detect and freeze values, like your player's health.&#xD;&#xA;&#xD;&#xA;How do you prevent cheating? What strategies are effective to combat this kind of cheating?&#xD;&#xA;&#xD;&#xA;I'm looking for some good ones. Two I use that are mediocre are:&#xD;&#xA;&#xD;&#xA;- Displaying values as a percentage instead of the number (eg. 46/50 = 92% health)&#xD;&#xA;- A low-level class that holds values in an array and moves them with each change" />
  <row Id="20379" PostHistoryTypeId="1" PostId="9832" RevisionGUID="c260873b-d5f4-4d84-bc48-53756cf4ef1f" CreationDate="2011-03-16T12:35:15.030" UserId="1929" Text="Strategies to Defeat Memory Editors for Cheating - Desktop Games" />
  <row Id="20380" PostHistoryTypeId="3" PostId="9832" RevisionGUID="c260873b-d5f4-4d84-bc48-53756cf4ef1f" CreationDate="2011-03-16T12:35:15.030" UserId="1929" Text="&lt;anti-cheat&gt;" />
  <row Id="20381" PostHistoryTypeId="2" PostId="9833" RevisionGUID="4b2c2ee1-caaa-4bdc-9afe-d8ab72886fec" CreationDate="2011-03-16T12:53:32.847" UserId="789" Text="You should definetely make a class for XP, which contains the chart and methods for chart lookup (e.g. `getRequiredXP(int level)`). Modifying the implementations of the class' methods afterwards is easy and doesn't require any modifications in coupled classes.&#xD;&#xA;&#xD;&#xA;Same for other charts. When only the classes are coupled you can always modify the implementations of the methods easily (e.g. chance the way the XP is calculated). If you need many different implementations for XP class then you should make an interface for the class and make sure all coupled classes use the methods in the interface.&#xD;&#xA;&#xD;&#xA;As you said, the public variables are bad and should be avoided, since the variables are very likely to be used in many places in code." />
  <row Id="20382" PostHistoryTypeId="5" PostId="9833" RevisionGUID="33f6d132-6c80-4f05-ac4e-7bdd8b634f5c" CreationDate="2011-03-16T13:01:46.287" UserId="789" Comment="added 36 characters in body; added 260 characters in body" Text="You should definetely make a class for XP, which contains the chart and methods for chart lookup (e.g. `getRequiredXP(int level)`). Modifying the implementations of the class' methods afterwards is easy and doesn't require any modifications in the coupled classes (which is a very huge benefit!). &#xD;&#xA;&#xD;&#xA;How you access the charts inside the methods is irrelevant for the design, since it can be changed later to suit your taste (if you change your mind). Any array inside the class is suitable as long as it won't be accessed directly, only through a method).&#xD;&#xA;&#xD;&#xA;Same for other charts. When only the classes are coupled you can always modify the implementations of the methods easily (e.g. chance the way the XP is calculated). If you need many different implementations for XP class then you should make an interface for the class and make sure all coupled classes use the methods in the interface.&#xD;&#xA;&#xD;&#xA;As you said, the public variables are bad and should be avoided, since the variables are very likely to be used in many places in code." />
  <row Id="20383" PostHistoryTypeId="2" PostId="9834" RevisionGUID="b061edba-b8ed-447c-a93e-722b9531fe58" CreationDate="2011-03-16T13:11:37.060" UserId="6126" Text="I am currently making a game that I was originally planning to sell. It is a simple 2D arcade style game for the PC. I've seen many indie games become popular and generate revenue from advertisements, but the game itself remains free. I need some advice on whether or not I should sell my game, release it for free with advertisements, or ask for donations and keep the game free.&#xD;&#xA;&#xD;&#xA;I feel that my game is fun, but of course the graphics aren't tip top because I am a programmer, not an artist. I just take screenshots of 3D models I get from Turbosquid and crop around it to make a sprite. Also, and I could be very wrong about this, it seems that there are more legal issues surrounding selling a game than making it free and generating revenue from advertisement, or asking for donations. If I am wrong, someone please correct me.&#xD;&#xA;&#xD;&#xA;Also, I am very interested in generating some revenue for my work, but that isn't at the very top of my list. I am in my last year of high school, soon to be going to college, and I am going to major in computer science/software engineering. So I am trying to gain some preliminary experience at home by coding stuff every day. One way of getting this experience is by making this game.&#xD;&#xA;&#xD;&#xA;So what do you think? What route should I take? What has worked well with other indie games?&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20384" PostHistoryTypeId="1" PostId="9834" RevisionGUID="b061edba-b8ed-447c-a93e-722b9531fe58" CreationDate="2011-03-16T13:11:37.060" UserId="6126" Text="Too sell or give for free" />
  <row Id="20385" PostHistoryTypeId="3" PostId="9834" RevisionGUID="b061edba-b8ed-447c-a93e-722b9531fe58" CreationDate="2011-03-16T13:11:37.060" UserId="6126" Text="&lt;marketing&gt;&lt;game-industry&gt;&lt;indie&gt;&lt;revenue&gt;" />
  <row Id="20387" PostHistoryTypeId="2" PostId="9835" RevisionGUID="da12959b-728d-4e2f-9351-9c4547ce02e1" CreationDate="2011-03-16T13:21:58.750" UserId="789" Text="Giant Bomb's [list of video game consepts][1] (wiki-system, so anyone can edit) has many game mechanics listed and even lists which games have the mechanic.&#xD;&#xA;&#xD;&#xA;Some game mechanics have a long description page like [moral decisions][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.giantbomb.com/concepts/&#xD;&#xA;  [2]: http://www.giantbomb.com/moral-decisions/92-93/" />
  <row Id="20388" PostHistoryTypeId="2" PostId="9836" RevisionGUID="31bf177f-e6a6-4a7b-a96a-0ec22da82471" CreationDate="2011-03-16T13:33:49.233" UserId="6021" Text="Considerung how many such arcade games there are, I'd give it away for free. If the people like it, they'll probably buy add-ons, a second part or donate money (although you won't get rich with the latter …).&#xD;&#xA;&#xD;&#xA;If you want to keep the Ad-route open, make sure you add an automatic update check or something like that - if you feel you have enough users to start, you can always enable/add this feature ;-)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20389" PostHistoryTypeId="2" PostId="9837" RevisionGUID="eb69f5d9-46f6-4956-8884-68187c2684db" CreationDate="2011-03-16T13:39:06.683" UserId="6021" Text="Put them in the **manual** and tell users to be careful. Unless you feature online highscores, it's absolutely the responsibility of the user not to cheat unless they have good reasons to do so (i.e. workaround a bug, played through the game 1000 times but don't want to play the first levels again each time, ...).&#xD;&#xA;&#xD;&#xA;Many games keep cheats totally disabled by default and a INI hack is needed to enable them. That would be a useful way to protect users from themselves and their desire to cheat without thinking (assuming their is something like that ...)." />
  <row Id="20390" PostHistoryTypeId="2" PostId="9838" RevisionGUID="4d9354b9-95d4-422f-ace3-4436083062a2" CreationDate="2011-03-16T13:39:45.550" UserId="789" Text="Unless your game can compete with commercial games you probably won't make much money by selling the game. People bying games are more often comparing games to each other and visual appeal does a lot.&#xD;&#xA;&#xD;&#xA;Nick Gravelyn shares some insight in his [blog][1] and says that ads were more profitable for him.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://theoneswiththelight.com/2011/my-results-with-ad-revenue-for-wp7-games/" />
  <row Id="20391" PostHistoryTypeId="2" PostId="9839" RevisionGUID="5f8634b7-814f-4ed9-8479-af0951605504" CreationDate="2011-03-16T14:00:14.690" UserId="3656" Text="Are you looking to have a text-based interface like typical roguelikes? If so, isn't the most obvious approach to store chars in a 2d array or other structure? Then you can concat each char to 1 single string (with newlines where appropriate) and draw that each frame with `SpriteBatch.DrawString()`, then when the player moves update the structure, concat the elements, and start drawing *that* string each frame? I've got a feeling your display code will end up a lot simpler (or at least more straightforward) for the same relative results.&#xD;&#xA;&#xD;&#xA;Or if you're looking to ditch ASCII, just use a tile engine.&#xD;&#xA;&#xD;&#xA;Either way, you essentially just need to replace the visual component of your game, right? I've got a feeling you may be able to whittle down your Window code since you'll no longer be dealing with Curses. Take this as an opportunity to cut/rewrite parts of the code, since though some techniques might make sense in Ruby may be a pain to manage in C# or vice versa." />
  <row Id="20392" PostHistoryTypeId="12" PostId="1624" RevisionGUID="11943df1-481f-4dc0-b15a-2ae9169e2067" CreationDate="2011-03-16T14:12:01.983" UserId="450" Text="[{&quot;Id&quot;:450,&quot;DisplayName&quot;:&quot;nhnb&quot;}]" />
  <row Id="20393" PostHistoryTypeId="13" PostId="1624" RevisionGUID="7b4a24e2-30e5-4627-af82-eabdd87b1fa8" CreationDate="2011-03-16T14:14:07.893" UserId="450" Text="[{&quot;Id&quot;:450,&quot;DisplayName&quot;:&quot;nhnb&quot;}]" />
  <row Id="20394" PostHistoryTypeId="25" PostId="9834" RevisionGUID="b84e8cce-9c69-4331-9278-7f5bac9d402b" CreationDate="2011-03-16T14:23:28.697" Comment="http://twitter.com/#!/StackGameDev/status/48026600889008128" />
  <row Id="20395" PostHistoryTypeId="2" PostId="9840" RevisionGUID="50dbdc6f-b461-4fc5-8e64-e0c8f1d5fe37" CreationDate="2011-03-16T14:30:07.053" UserId="6011" Text="It is possible to make a multiplayer browser based game using cocos2d-javascript + node.js? If so, is there any tutorial about that?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="20396" PostHistoryTypeId="1" PostId="9840" RevisionGUID="50dbdc6f-b461-4fc5-8e64-e0c8f1d5fe37" CreationDate="2011-03-16T14:30:07.053" UserId="6011" Text="Multiplayer game with Cocos2d-Javascript and Node.js" />
  <row Id="20397" PostHistoryTypeId="3" PostId="9840" RevisionGUID="50dbdc6f-b461-4fc5-8e64-e0c8f1d5fe37" CreationDate="2011-03-16T14:30:07.053" UserId="6011" Text="&lt;multiplayer&gt;&lt;javascript&gt;&lt;cocos2d&gt;&lt;websocket&gt;&lt;node.js&gt;" />
  <row Id="20398" PostHistoryTypeId="2" PostId="9841" RevisionGUID="908ec69e-08d0-43d0-8f62-cd1febb8f2c7" CreationDate="2011-03-16T14:31:20.083" UserId="20" Text="A creative way to tell the users about possible cheat-codes would be to hide them somewhere in the game content.&#xD;&#xA;&#xD;&#xA;Examples:&#xD;&#xA;&#xD;&#xA; - A wizard you meet in a side-quest tells you about his secret *spell of haste* which goes like this: *Right, Right, B &amp; A*.&#xD;&#xA; - Somewhere in the game you see a graffiti on the wall: *Down, Down, Up, B = No Key*.&#xD;&#xA; - Hide a cheat-code in secret areas of a level.&#xD;&#xA; - Unlock/show cheat-codes to the user when he achieves a special score or some other achievement that is hard to get.&#xD;&#xA;&#xD;&#xA;It's up to you to make some of the cheat-codes really easy to find or almost impossible to discover.&#xD;&#xA;&#xD;&#xA;As other have said: People that use a cheat-code should probably be excluded from any competition where they get an unfair advantage due to cheating (highscores?). A hint/warning next to the &quot;cheat-input-field&quot; should probably be good enough." />
  <row Id="20399" PostHistoryTypeId="5" PostId="9840" RevisionGUID="ae47b629-9f92-4fd7-923b-c4dc979694ab" CreationDate="2011-03-16T14:32:10.080" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="It is possible to make a multiplayer browser based game using cocos2d-javascript + node.js? If so, is there any tutorial about that?" />
  <row Id="20400" PostHistoryTypeId="2" PostId="9842" RevisionGUID="4ef29ba7-d52a-444a-8e3d-6e536322c3a4" CreationDate="2011-03-16T14:48:01.560" UserId="20" Text="Another possibility (for integer values) is to have a second member-variable which holds a bitwise complement of an existing variable.&#xD;&#xA;&#xD;&#xA;So imagine you got `health`, you would also have `healthComplement`. Your implementation could look like this:&#xD;&#xA;&#xD;&#xA;    // setter sets value and complement&#xD;&#xA;    void setHealth(int value){&#xD;&#xA;        health = value;&#xD;&#xA;        healthComplement = ~value;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // getter checks if value was changed outside of the setter&#xD;&#xA;    int getHealth(){&#xD;&#xA;        if(value != ~healthComplement){&#xD;&#xA;            // launch some cheat-counter-measure, like crashing the game?&#xD;&#xA;            exit;&#xD;&#xA;        }&#xD;&#xA;        return health;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Somebody who wants to cheat would have to set health and healthComplement correctly, otherwise the game would crash.&#xD;&#xA;&#xD;&#xA;**I think it's kinda pointless to try to prevent stuff like this. People have successfully created hacks/cheats for much more complex stuff and it just needlessly obfuscates your code or makes your game perform worse.**" />
  <row Id="20401" PostHistoryTypeId="5" PostId="9818" RevisionGUID="4adca5ca-93c0-412e-a9e6-dd986446d1ca" CreationDate="2011-03-16T14:56:25.067" UserId="5167" Comment="minor grammar fix" Text="To tack on a note to 5ound's answer: pay attention to the level of the memory warning. Prior to iOS 3.2 there was no way to distinguish between warnings of different severity (i.e. is the OS just sitting on a bunch of UIImages it can clear or is there really no memory left?). in 3.2 onwards you can check the level of the memory warning to determine how to react. In my experience level 1 warnings are constant, unavoidable and largely meaningless, so I wouldn't take drastic action in response to them. Although level 2 warnings are not necessarily a sign of impending doom you should probably take them seriously and start clearing any caches you can, etc.&#xD;&#xA;&#xD;&#xA;There's a good discussion of the different levels here: http://stackoverflow.com/questions/2915247/iphone-os-memory-warnings-what-do-the-different-levels-mean&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;P.S. - This is more of a comment to 5ound's answer but I don't have enough rep to comment so this was my only option..." />
  <row Id="20402" PostHistoryTypeId="2" PostId="9843" RevisionGUID="97bf4f7f-19bd-4647-ace3-05fbc6f7320e" CreationDate="2011-03-16T15:07:52.060" UserId="4264" Text="Here's one scheme I came up with when someone was asking for it on some board long ago. Using percentages or doubled variables doesn't really work, as you can search for &quot;any&quot; values and freeze them.&#xD;&#xA;&#xD;&#xA;Instead, make a monster of a data type.&#xD;&#xA;&#xD;&#xA;Basically, store your important values as a structure with:&#xD;&#xA; &#xD;&#xA;  - 32 pointers to bits&#xD;&#xA;  - For quick reading, have the struct include the current value as a plain int too&#xD;&#xA;&#xD;&#xA;For manipulation, collect the current value from the separately-allocated bits (which can be true/false ints), change the value, and then store them back.&#xD;&#xA;&#xD;&#xA;Here's the nasty bit: every time you manipulate the value, free and allocate the bits again. Allocation should happen **in random order**, so the data jumps around in memory and can't be easily frozen.&#xD;&#xA;&#xD;&#xA;Additional safeguards would be to store checksums of the values (as well as the &quot;plain&quot; int) and compare these during the manipulation calls too. If mismatch is found, do something subtle, like remove a random key needed to unlock doors to progress in the game." />
  <row Id="20403" PostHistoryTypeId="2" PostId="9844" RevisionGUID="69440a23-3364-4343-901b-62afc59f1031" CreationDate="2011-03-16T15:32:42.990" UserId="1101" Text="If you have to ask what kind of tools they are creating, then you won't be able to go straight into a job like that. That's if such a group exists, of course - not everywhere has dedicated tooling departments, and even if they do, they don't necessarily have a separate manager for that department (since most of the technology will be shared with the game developers).&#xD;&#xA;&#xD;&#xA;I would expect the typical route into such a role would be to start as a tools programmer and be promoted up to a supervisory position." />
  <row Id="20404" PostHistoryTypeId="2" PostId="9845" RevisionGUID="b347d242-62cc-4e81-8868-cfcd569b67f1" CreationDate="2011-03-16T15:47:09.737" UserId="1560" Text="I am new to box2d, I have set gravity to 10. How to make an object fly in space even though the gravity is 10. What are the properties i need to set to make object fly? Is there any different approach? &#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20405" PostHistoryTypeId="1" PostId="9845" RevisionGUID="b347d242-62cc-4e81-8868-cfcd569b67f1" CreationDate="2011-03-16T15:47:09.737" UserId="1560" Text="How to make bird to fly using box2d" />
  <row Id="20406" PostHistoryTypeId="3" PostId="9845" RevisionGUID="b347d242-62cc-4e81-8868-cfcd569b67f1" CreationDate="2011-03-16T15:47:09.737" UserId="1560" Text="&lt;physics&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="20407" PostHistoryTypeId="2" PostId="9846" RevisionGUID="e5163df2-51bf-42e0-a710-c62f2207fb57" CreationDate="2011-03-16T15:47:14.443" UserId="1430" Text="Production management or technical management skills, or both, depending -- and experience.&#xD;&#xA;&#xD;&#xA;Some studios don't clearly differentiate between **production** (in this context I mean the scheduling and pipelining of tasks across each internal team, assisting in bug triage and balancing, ensuring all team dependencies are satisfied, that your schedule is accurate and that you are trending towards ship) management and **technical** management (which I mean to be more about the architecture of the in-code systems that implement the tools), and so you'll probably need both, or at least to be focusing on whichever one of those interests you more. That kind of role is almost always sourced internally, though (i.e., by promoting existing programmers or producers) so your best bet is to get an entry level position in the approximate area you're interested in and work your way up.&#xD;&#xA;&#xD;&#xA;Studios with dedicated tools teams generally have those teams because they require tools that are unique to their product's production goals, and so they're usually not building the same thing except in very general terms -- usually tools revolve around asset/content creation, management, and tracking. Especially with large, AAA titles tracking/reporting/metrics concerning content and content production can be extremely important due to the shear volume of data." />
  <row Id="20408" PostHistoryTypeId="2" PostId="9847" RevisionGUID="37e99e40-7719-460d-a853-936aa5de0af8" CreationDate="2011-03-16T16:00:10.330" UserId="1430" Text="It sounds like you essentially want to have specific objects ignore gravity, is that correct? Since gravity is a property of the world object, it looks like the way to do this is to either&#xD;&#xA;&#xD;&#xA;  1. Disable gravity entirely, and then manually apply gravity to every object you want to have it (ignoring the objects you don't want to be affected by gravity), or&#xD;&#xA;  2. Apply a force that counteracts the force of gravity every frame to the objects you want to appear to be unaffected by gravity.&#xD;&#xA;&#xD;&#xA;You also may be able to use a `b2_kinematicBody` instead of `b2_dynamicBody` if you don't need your &quot;flying&quot; objects to respond to any forces whatsoever. This may or may not be appropriate for your needs." />
  <row Id="20409" PostHistoryTypeId="2" PostId="9848" RevisionGUID="dedb79a7-a138-4260-9f74-58bafb6c8fb8" CreationDate="2011-03-16T16:17:03.163" UserId="5797" Text="I recommend using one globally accessible class - lets call it Dictionary (using flash terminology). The Dictionary is basically a list of name-value pairs (data, rules, constants) you want accessible throughout your application. Using the name (string) other classes will be able to retrieve the values (numbers, string, classes etc) which are interfaced into your code. So your implementation is basically IOC except the instantiation has been previously done in the Dictionary. &#xD;&#xA;You can also listen to changes to the Dictionary, etc. " />
  <row Id="20410" PostHistoryTypeId="25" PostId="9832" RevisionGUID="ce337d9f-aa69-4bb6-9cc4-196ef6290b1d" CreationDate="2011-03-16T17:23:28.683" Comment="http://twitter.com/#!/StackGameDev/status/48071899590307840" />
  <row Id="20411" PostHistoryTypeId="2" PostId="9849" RevisionGUID="0b2d6f8f-8959-488a-81af-101399f4ee8b" CreationDate="2011-03-16T17:26:56.993" UserId="3081" Text="Consider scaling your shape so that it's as large as possible while still fitting within the target viewport.  In order to do this, you need to consider the ratios between the widths and the heights.&#xD;&#xA;&#xD;&#xA;    float width_ratio = target_width / source_width;&#xD;&#xA;    float height_ratio = target_height / source_height;&#xD;&#xA;    float scale = Math.Min(width_ratio, height_ratio);" />
  <row Id="20412" PostHistoryTypeId="6" PostId="249" RevisionGUID="550e5ba0-5c2d-48bb-98c3-1438d465e4dc" CreationDate="2011-03-16T18:00:39.477" UserId="962" Comment="edited tags" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;books&gt;&lt;tutorials&gt;&lt;scalability&gt;" />
  <row Id="20413" PostHistoryTypeId="2" PostId="9850" RevisionGUID="fb768293-dbac-40ab-84fd-c8fe79e7a7b5" CreationDate="2011-03-16T18:25:26.617" UserId="6103" Text="&gt; JavaScript has a class-free object system in which objects inherit properties directly from other objects.  This is really powerful, but it is unfamiliar to classically trained programmers. If you attempt to apply classical design patterns directly to JavaScript, you will be frustrated. But if you learn to work with JavaScript's prototypal nature, your efforts will be rewarded.   &#xD;&#xA;&gt; ...   &#xD;&#xA;&gt; It is Lisp in C's clothing.&#xD;&#xA;&#xD;&#xA;&gt; -[Douglas Crockford][1]&#xD;&#xA;&#xD;&#xA;What does this mean for a game developer working with canvas and HTML5?  I've been looking over [this question][2] on useful design patterns in gaming, but prototypal inheritance is very different than classical inheritance, and there are surely differences in the best way to apply some of these common patterns.&#xD;&#xA;&#xD;&#xA;For example, classical inheritance allows us to create a `moveableEntity` class, and extend that with any classes that move in our game world (`player`, `monster`, `bullet`, etc.). Sure, you can strongarm JavaScript to work that way, but in doing so, you are kind of fighting against its nature.  Is there a better approach to this sort of problem when we have prototypal inheritance at our fingertips?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/4157/what-are-some-programming-design-patterns-that-are-useful-in-game-development" />
  <row Id="20414" PostHistoryTypeId="1" PostId="9850" RevisionGUID="fb768293-dbac-40ab-84fd-c8fe79e7a7b5" CreationDate="2011-03-16T18:25:26.617" UserId="6103" Text="Capitalizing on JavaScript's prototypal inheritance" />
  <row Id="20415" PostHistoryTypeId="3" PostId="9850" RevisionGUID="fb768293-dbac-40ab-84fd-c8fe79e7a7b5" CreationDate="2011-03-16T18:25:26.617" UserId="6103" Text="&lt;javascript&gt;&lt;html5&gt;&lt;design-patterns&gt;" />
  <row Id="20416" PostHistoryTypeId="5" PostId="9737" RevisionGUID="25b513fa-4f18-4347-9a44-e9cdbf4397c5" CreationDate="2011-03-16T18:56:38.087" UserId="5677" Comment="added 71 characters in body" Text="I've been busy trying to create a level editor for a tile based game i'm working on. It's all going pretty fine, the only thing i'm having trouble with is creating a simple event system. &#xD;&#xA;&#xD;&#xA;Let's say the player steps on a particulair tile that had the action &quot;teleport&quot; assigned to it in the editor. The teleport string is saved in the tile object as a variable. When creating the tilegrid an actionmanager class scans the action variable and assigns actions to the variable.&#xD;&#xA;&#xD;&#xA;    	public static class ActionManager&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;		public static function ParseTileAction(tile:Tile) {&#xD;&#xA;			&#xD;&#xA;			switch(tile.action) {&#xD;&#xA;				&#xD;&#xA;				case &quot;TELEPORT&quot;:&#xD;&#xA;				&#xD;&#xA;				//assign action here&#xD;&#xA;				&#xD;&#xA;				break;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now this is an collision event, so I guess I should also provide an object to colide with the tile. But what if it would have to count for collision with all objects in the world? Also, checking for collisions in the actionmanager class doesn't seem very efficient. &#xD;&#xA;&#xD;&#xA;Am I even on the right track here?&#xD;&#xA;I'm new to game design so I could be completly off track.&#xD;&#xA;Any tips on how handeling and creating events using an editor is usually done would be great. The main problem i'm having is and efficient way to read out and react to the given actions in the editor.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="20417" PostHistoryTypeId="5" PostId="9849" RevisionGUID="ae88cc0b-6815-4603-a564-993a8705d24f" CreationDate="2011-03-16T19:00:41.567" UserId="3081" Comment="added 293 characters in body" Text="Consider scaling your shape so that it's as large as possible while still fitting within the target viewport.  In order to do this, you need to consider the ratios between the widths and the heights.&#xD;&#xA;&#xD;&#xA;    float width_ratio = target_width / source_width;&#xD;&#xA;    float height_ratio = target_height / source_height;&#xD;&#xA;    float scale = Math.Min(width_ratio, height_ratio);&#xD;&#xA;&#xD;&#xA;Edit: Once you've scaled your shape, its coordinate system lines up with that of the screen.  In order to center the shape on the screen, you need to translate it by `(target_width - source_width) / 2` or `(target_height - source_height) / 2`, depending on which dimension has extra space." />
  <row Id="20418" PostHistoryTypeId="2" PostId="9851" RevisionGUID="7da9b0e4-4969-49d9-bb46-9e5aa00dd30d" CreationDate="2011-03-16T19:33:17.197" UserId="4327" Text="How about you store the health complemented with a random value generated each time you store it.  This would at least defeat the simple mechanism of searching for increasing/decreasing values in memory to find the health.&#xD;&#xA;&#xD;&#xA;    class Player&#xD;&#xA;    {&#xD;&#xA;      int m_Health;&#xD;&#xA;      int m_RandomHealth;&#xD;&#xA;      Random m_Rnd = new Random();&#xD;&#xA;&#xD;&#xA;      public int Health {&#xD;&#xA;        get&#xD;&#xA;        {&#xD;&#xA;          return m_Health ^ m_RandomHealth;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        set&#xD;&#xA;        {&#xD;&#xA;          m_RandomHealth = m_Rnd.Next();&#xD;&#xA;          m_Health = value ^ m_RandomHealth;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="20419" PostHistoryTypeId="2" PostId="9852" RevisionGUID="0de69dff-a451-42c8-ab3b-a196e70ec461" CreationDate="2011-03-16T20:07:39.227" UserId="6131" Text="There is also a research [article][1] from Microsoft Research by Loop and Blinn, on rendering resolution independent curves using shaders. It suggests using the presented technique to render TrueType text in a resolution independent fashion.&#xD;&#xA;&#xD;&#xA;[1]: http://research.microsoft.com/en-us/um/people/cloop/loopblinn05.pdf&#xD;&#xA;" />
  <row Id="20420" PostHistoryTypeId="5" PostId="9832" RevisionGUID="6cef21e8-574b-4d74-a05f-05052e361ebd" CreationDate="2011-03-16T20:17:44.040" UserId="1929" Comment="added 200 characters in body; added 171 characters in body" Text="I'm assuming we're talking about desktop games -- something the player downloads and runs on their local computer. Many are the memory editors that allow you to detect and freeze values, like your player's health.&#xD;&#xA;&#xD;&#xA;How do you prevent **cheating via memory-modifiation?** What strategies are effective to combat this kind of cheating?&#xD;&#xA;&#xD;&#xA;For reference, I know that players can:&#xD;&#xA;- Search for something by value or range&#xD;&#xA;- Search for something that changed value&#xD;&#xA;- Set memory values&#xD;&#xA;- Freeze memory values&#xD;&#xA;&#xD;&#xA;I'm looking for some good ones. Two I use that are mediocre are:&#xD;&#xA;&#xD;&#xA;- Displaying values as a percentage instead of the number (eg. 46/50 = 92% health)&#xD;&#xA;- A low-level class that holds values in an array and moves them with each change. (For example, instead of an int, I have a class that's an array of ints, and whenever the value changes, I use a different, randomly-chosen array item to hold the value)" />
  <row Id="20421" PostHistoryTypeId="2" PostId="9853" RevisionGUID="4d4d8a7b-e7b9-401d-868f-d385673b9c5d" CreationDate="2011-03-16T20:19:41.573" UserId="802" Text="I am working on a XNA game where we have defined that 1 XNA unit equals to 1 meter. Then, I set meters as system unit in 3DS Max and set to meters the units in the FBX exporter. However, when I export my models, they are much bigger in the game. Am I missing something? What should I do to avoid problems with my units?" />
  <row Id="20422" PostHistoryTypeId="1" PostId="9853" RevisionGUID="4d4d8a7b-e7b9-401d-868f-d385673b9c5d" CreationDate="2011-03-16T20:19:41.573" UserId="802" Text="Units issue when exporting from 3DS Max to XNA" />
  <row Id="20423" PostHistoryTypeId="3" PostId="9853" RevisionGUID="4d4d8a7b-e7b9-401d-868f-d385673b9c5d" CreationDate="2011-03-16T20:19:41.573" UserId="802" Text="&lt;xna&gt;&lt;3dsmax&gt;" />
  <row Id="20424" PostHistoryTypeId="25" PostId="9853" RevisionGUID="ff727292-3bed-4d14-b5ea-10797dd1446f" CreationDate="2011-03-16T20:23:28.870" Comment="http://twitter.com/#!/StackGameDev/status/48117199050776576" />
  <row Id="20425" PostHistoryTypeId="2" PostId="9854" RevisionGUID="604b00ee-2905-41a1-8598-67b29ceadd71" CreationDate="2011-03-16T20:38:20.010" UserId="4296" Text="Looking through [this page][1], it seems that there are a few things that might be happening.  The XNA FBX importer isn't reading the units correctly and is thinking meters is centimeters.  Or, the model has a scaled parent bone that is throwing things off.  I don't have Max in front of me at the moment to test this.&#xD;&#xA;&#xD;&#xA;Personally, I'd start with creating a 1m^2 square in Max, then open it up in the content pipeline to see what units are being exported.  Then maybe again in game to see if the importer was messing up the units.  Maybe knowing what the exact scale difference was would give some insight.&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.create.msdn.com/forums/t/6909.aspx" />
  <row Id="20426" PostHistoryTypeId="2" PostId="9855" RevisionGUID="d33ee9e9-e77b-469f-b44d-c8c169ed7699" CreationDate="2011-03-16T20:48:01.223" UserId="5797" Text="Action/Result is a function of a bunch of variables e.g. f(x,y,z ... )&#xD;&#xA;&#xD;&#xA;First, establish what the x, y, z etc are and then what the resulting action will be. Think of x, y, z as tile (its position, state etc.), current level, current environment variables etc. Then decide who will act on the action. Will it be the tile or a controller OR both? Once you have answered the first two questions, you will know what variables/values you need to send back to the tile or send to a controller. &#xD;&#xA;" />
  <row Id="20427" PostHistoryTypeId="5" PostId="9853" RevisionGUID="7540c77b-05d7-4654-b360-f596ce841af8" CreationDate="2011-03-16T20:48:05.493" UserId="802" Comment="added 227 characters in body" Text="I am working on a XNA game where we have defined that 1 XNA unit equals to 1 meter. Then, I set meters as system unit in 3DS Max and set to meters the units in the FBX exporter. However, when I export my models, they are much bigger in the game. Am I missing something? What should I do to avoid problems with my units?&#xD;&#xA;&#xD;&#xA;Investigating the FBX file, I noticed that I it has two values called UnitScaleFactor and OriginalUnitScaleFactor. They both are 100 when I export the files... And if I manually change UnitScaleFactor to 1, it works fine :S" />
  <row Id="20428" PostHistoryTypeId="2" PostId="9856" RevisionGUID="d7502673-d248-4f26-8b52-9bfab34e1231" CreationDate="2011-03-16T21:37:14.580" UserId="4604" Text="One possible option I think might work (I'm not too familiar with these cheating tools): don't hide it.  Perform your operations and expect certain results.  After the operation (possibly next frame), check to ensure that the results are as you expect them to be.  If you subtract health and then verify it, only to find health never changed, you can be pretty sure (provided you don't have some obscure bug) that it was locked.&#xD;&#xA;&#xD;&#xA;If you detect cheating, you are now free to change the rules of the game as you see fit for maximum griefing, if that is your intent.  If your intent is to ignore the cheating and have the game continue to work, reallocate the health elsewhere in memory and change your pointers so that the new value gets used and the old is ignored.  Repeat ad infinitum." />
  <row Id="20429" PostHistoryTypeId="2" PostId="9857" RevisionGUID="706f1ef3-515f-4894-af5d-b1b887bc7ce6" CreationDate="2011-03-16T21:44:22.697" UserId="4662" Text="Creating an AABB is simple. But, if the model has become rotated, how do you update the AABB to become accurate? Or is the AABB supposed to be in local space?" />
  <row Id="20430" PostHistoryTypeId="1" PostId="9857" RevisionGUID="706f1ef3-515f-4894-af5d-b1b887bc7ce6" CreationDate="2011-03-16T21:44:22.697" UserId="4662" Text="Axis-Aligned Bounding Box- once rotated" />
  <row Id="20431" PostHistoryTypeId="3" PostId="9857" RevisionGUID="706f1ef3-515f-4894-af5d-b1b887bc7ce6" CreationDate="2011-03-16T21:44:22.697" UserId="4662" Text="&lt;c++&gt;&lt;collision-detection&gt;" />
  <row Id="20432" PostHistoryTypeId="2" PostId="9858" RevisionGUID="71ac8af5-4236-41a3-85a3-e5f16097ff84" CreationDate="2011-03-16T21:45:44.787" UserId="6135" Text="I came across [this document][1] listing the technical certification requirements from March 2009, but I haven't been able to track down anything more up-to-date, nor have I been able to find the &quot;terminology list&quot; that the document refers to.&#xD;&#xA;&#xD;&#xA;Is there a current version that is available to non-developers like myself?&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.csdn.net/baozi3026/archive/2009/06/16/4272761.aspx" />
  <row Id="20433" PostHistoryTypeId="1" PostId="9858" RevisionGUID="71ac8af5-4236-41a3-85a3-e5f16097ff84" CreationDate="2011-03-16T21:45:44.787" UserId="6135" Text="What are the technical certification requirements for the Xbox 360?" />
  <row Id="20434" PostHistoryTypeId="3" PostId="9858" RevisionGUID="71ac8af5-4236-41a3-85a3-e5f16097ff84" CreationDate="2011-03-16T21:45:44.787" UserId="6135" Text="&lt;xbox360&gt;&lt;microsoft&gt;" />
  <row Id="20435" PostHistoryTypeId="2" PostId="9859" RevisionGUID="ced44262-643a-4259-bf05-a1d60a12496a" CreationDate="2011-03-16T21:52:08.870" UserId="744" Text="The official up-to-date TCR document comes with the Xbox Development Kit from Microsoft. Any licensed developer copying it online would be in violation of the license terms of the XDK.&#xD;&#xA;&#xD;&#xA;It is possible that Microsoft has published it elsewhere, or that they have given some other developers or journalists a separate license to publish it. But I think that's unlikely. Most of the requirements, as you can see in the linked document (which was probably posted infringingly), are fairly boring." />
  <row Id="20436" PostHistoryTypeId="2" PostId="9860" RevisionGUID="1eb2d0b1-982b-401c-8c40-65c8f7705f51" CreationDate="2011-03-16T21:53:10.423" UserId="5740" Text="I'm having trouble with unaligned collision avoidance for what I think is a rare case. I have set two objects to move towards each other but with a slight offset, so one of the objects is moving slightly upwards, and one of the objects is moving slightly downwards.&#xD;&#xA;&#xD;&#xA;In my unaligned collision avoidance steering algorithm I'm finding the points on the object's forward line and the other object's forward line where these two lines are the closest. If these closest points are within a collision avoidance distance, and if the distance between them is smaller than the two radii of the two object's bounding spheres, then the objects should steer away in the appropriate direction.&#xD;&#xA;&#xD;&#xA;The problem is that for my case, the closest points on the lines are calculated to be really far away from the actual collision point. This is because the two forward lines for each object are moving away from each other as the objects pass. The problem is that because of this, no steering takes place, and the two objects partially collide.&#xD;&#xA;&#xD;&#xA;![Screenshot of object forward lines.][1]&#xD;&#xA;&#xD;&#xA;Does anyone have any suggestions as to how I can correctly calculate the point of collision? Perhaps by somehow taking into account the size of the two objects?&#xD;&#xA;&#xD;&#xA;Thanks very much for reading and for any help! :)&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/0ohvq.png" />
  <row Id="20437" PostHistoryTypeId="1" PostId="9860" RevisionGUID="1eb2d0b1-982b-401c-8c40-65c8f7705f51" CreationDate="2011-03-16T21:53:10.423" UserId="5740" Text="Moving objects colliding when using unalligned collision avoidance (steering)" />
  <row Id="20438" PostHistoryTypeId="3" PostId="9860" RevisionGUID="1eb2d0b1-982b-401c-8c40-65c8f7705f51" CreationDate="2011-03-16T21:53:10.423" UserId="5740" Text="&lt;collision-detection&gt;&lt;vector&gt;&lt;movement&gt;&lt;linear-algebra&gt;" />
  <row Id="20439" PostHistoryTypeId="5" PostId="9857" RevisionGUID="c943ec5f-9f63-4a50-a76f-b6fc2fec0ee1" CreationDate="2011-03-16T21:59:11.627" UserId="962" Comment="added 3 characters in body" Text="Creating an AABB is simple. But, if the 3d model has become rotated, how do you update the AABB to become accurate? Or is the AABB supposed to be in local space?" />
  <row Id="20440" PostHistoryTypeId="2" PostId="9861" RevisionGUID="b124a324-2067-4a7b-bb57-3f8d32688b94" CreationDate="2011-03-16T22:05:04.383" UserId="962" Text="Axis Aligned Bounding Box means the box itself is always on the same orientation. &#xD;&#xA;&#xD;&#xA;To update the AABB you will need to recreate it each time the model rotates, and move it if the models positions changes.&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;The box will change shape and size depending on the rotation and the model you use.&#xD;&#xA;&#xD;&#xA;If you want to have a rotating collision box than that matches up with the model, then that is completely different than an AABB, and you will need to look into the physics of your engine for that." />
  <row Id="20441" PostHistoryTypeId="5" PostId="9860" RevisionGUID="3c110530-7602-49e4-80bc-474a01fd84da" CreationDate="2011-03-16T22:07:24.617" UserId="962" Comment="deleted 66 characters in body" Text="I'm having trouble with unaligned collision avoidance for what I think is a rare case. I have set two objects to move towards each other but with a slight offset, so one of the objects is moving slightly upwards, and one of the objects is moving slightly downwards.&#xD;&#xA;&#xD;&#xA;In my unaligned collision avoidance steering algorithm I'm finding the points on the object's forward line and the other object's forward line where these two lines are the closest. If these closest points are within a collision avoidance distance, and if the distance between them is smaller than the two radii of the two object's bounding spheres, then the objects should steer away in the appropriate direction.&#xD;&#xA;&#xD;&#xA;The problem is that for my case, the closest points on the lines are calculated to be really far away from the actual collision point. This is because the two forward lines for each object are moving away from each other as the objects pass. The problem is that because of this, no steering takes place, and the two objects partially collide.&#xD;&#xA;&#xD;&#xA;![Screenshot of object forward lines.][1]&#xD;&#xA;&#xD;&#xA;Does anyone have any suggestions as to how I can correctly calculate the point of collision? Perhaps by somehow taking into account the size of the two objects?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/0ohvq.png" />
  <row Id="20442" PostHistoryTypeId="2" PostId="9862" RevisionGUID="d617b344-93fd-40b3-a2c5-649c6e32d334" CreationDate="2011-03-16T22:17:24.870" UserId="744" Text="To get decent performance out of JavaScript with modern JS engines one needs to write code that mirrors common structural typing or duck typing patterns. Structural typing is more powerful than providing types only by inheritance but does not really change the design patterns used by games.&#xD;&#xA;&#xD;&#xA;As an example, in C++ or Java, where one usually types by inheritance, one usually has deep type hierarchies with several interfaces / virtual classes in order to implement MVC. But games shy away from this kind of design pattern already because it doesn't really help model the kind of data games deal with.&#xD;&#xA;&#xD;&#xA;The patterns one does find most useful in game design, like context objects, components, flyweight, or strategy, do not tend to use complicated inheritance hierarchies in the first place, even when implemented in languages like C++. Components involve a single virtual class (at most). Flyweight usually uses C++'s (awkward) structural typing via templates. Strategy often uses some form of type erasure for performance or programmer sanity.&#xD;&#xA;&#xD;&#xA;The one exception to this is the prototype pattern itself, which is often found in some form in games, especially for designer-driven data. Using JavaScript makes this pattern trivial. But it is not a particularly difficult pattern to implement, at least poorly, in any language that supports associative data structures. Using JS would let you use it more because you can leverage the underlying engine's optimizer. But I'm not sure if that would really change the way one programs - a naive prototype pattern is already in plenty of places in plenty of games despite its often poor performance." />
  <row Id="20443" PostHistoryTypeId="2" PostId="9863" RevisionGUID="9363942a-5b0e-45de-8b42-384b1a6e4123" CreationDate="2011-03-16T22:18:34.933" UserId="962" Text="You don't want to find the closest point. &#xD;&#xA;&#xD;&#xA;You want to find the point on the lines where the distance is equal to the combined radii of both spheres.&#xD;&#xA;----------------------------------------" />
  <row Id="20444" PostHistoryTypeId="5" PostId="9833" RevisionGUID="d5a13568-6f75-41b5-839d-3ff4847cc7c5" CreationDate="2011-03-16T22:26:02.100" UserId="789" Comment="added 35 characters in body" Text="You should definetely make a class for XP, which contains the chart and methods for chart lookup (e.g. `getRequiredXP(int level)`). Modifying the implementations of the class' methods afterwards is easy and doesn't require any modifications in the coupled classes (which is a very huge benefit!). &#xD;&#xA;&#xD;&#xA;How you access the charts inside the methods is irrelevant for the design, since it can be changed later to suit your taste (if you change your mind). Any array inside the class is suitable as long as it won't be accessed directly, only through a method.&#xD;&#xA;&#xD;&#xA;Same for other charts. When only the classes are coupled you can always modify the implementations of the methods easily (e.g. chance the way the XP is calculated). If you need many different implementations for XP class then you should make an interface for the class and make sure all coupled classes use the methods in the interface.&#xD;&#xA;&#xD;&#xA;As you said, the public variables are bad and should be avoided, since the variables are very likely to be used in many places in code and making any changes is bug prone." />
  <row Id="20445" PostHistoryTypeId="5" PostId="9838" RevisionGUID="25a04db9-2068-4ad7-94d1-4544c40fa0ac" CreationDate="2011-03-16T22:38:00.283" UserId="789" Comment="added 252 characters in body" Text="Unless your game can compete with commercial games (like [Magicka][1], $10) you probably won't make much money by selling the game. People bying games are more often comparing games to each other and visual appeal does a lot. Also, small price games aren't very great sellers on PC, because handling payment is trickier.&#xD;&#xA;&#xD;&#xA;Nick Gravelyn shares some insight about low price mobile games in his [blog][2] and says that ads were more profitable for him. I wouldn't think selling games on PC would be easier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/app/42910/&#xD;&#xA;  [2]: http://theoneswiththelight.com/2011/my-results-with-ad-revenue-for-wp7-games/" />
  <row Id="20446" PostHistoryTypeId="2" PostId="9864" RevisionGUID="5efd9338-4ae7-45f2-8891-2e1c5515ef87" CreationDate="2011-03-16T22:45:23.647" UserId="5864" Text="Any attempts at mere obfuscation are bound to fail in theory, but in practice you just need to make it hard enough to break that the challenge becomes less fun than succeeding at the game. I don’t know what your game is, so I won’t risk suggesting data obfuscation methods, even less as I believe they’re pointless.&#xD;&#xA;&#xD;&#xA;That said, and you will probably not be fond of it, I believe you are looking for *memory curtaining*, which is a [Trusted Computing][1] concept.&#xD;&#xA;&#xD;&#xA; [1]: http://en.wikipedia.org/wiki/Trusted_Computing" />
  <row Id="20447" PostHistoryTypeId="25" PostId="9858" RevisionGUID="d2623e9e-575d-4fe7-8e3f-62f3e9315c87" CreationDate="2011-03-16T23:23:28.657" Comment="http://twitter.com/#!/StackGameDev/status/48162496380547072" />
  <row Id="20448" PostHistoryTypeId="5" PostId="9861" RevisionGUID="bbab297f-e1c3-4849-a16c-3347bcb5a2c2" CreationDate="2011-03-16T23:23:34.113" UserId="962" Comment="added 732 characters in body" Text="Axis Aligned Bounding Box means the box itself is always on the same orientation. &#xD;&#xA;&#xD;&#xA;To update the AABB you will need to recreate it each time the model rotates, and move it if the models positions changes.&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;The box will change shape and size depending on the rotation and the model you use.&#xD;&#xA;&#xD;&#xA;If you want to have a rotating collision box than that matches up with the model, then that is completely different than an AABB, and you will need to look into the physics of your engine for that.&#xD;&#xA;&#xD;&#xA;**Edit: If you want to update the AABB quickly, but with less accuracy, just pass the points of the original bounding box instead of the entire model, the bounding box won't be perfectly tight, but it is guaranteed to have the entire model inside of it. [Here is an article describing how to achieve this.][1]**&#xD;&#xA;&#xD;&#xA;**One thing I would like to add that is not in the article would be to create a few fully calculated bounding boxes at 10 rotations, and when recalculating, use the bounding box that is closest to the current rotation, that should improve the tightness of the bounding box a lot without creating that much more overhead.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3426/when_two_hearts_collide_.php?page=1" />
  <row Id="20449" PostHistoryTypeId="2" PostId="9865" RevisionGUID="325564b5-783a-4f23-93e3-bbe9104d5254" CreationDate="2011-03-17T01:42:38.440" UserId="6138" Text="Jessy did a complete set of Unity iOS Shader tutorials:&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/user/JessyUV#grid/user/31F6A116DCCC9F61" />
  <row Id="20450" PostHistoryTypeId="5" PostId="9861" RevisionGUID="5e249721-8dea-4366-979c-08f524253bf0" CreationDate="2011-03-17T02:07:33.597" UserId="962" Comment="deleted 35 characters in body" Text="Axis Aligned Bounding Box means the box itself is always on the same orientation. &#xD;&#xA;&#xD;&#xA;**To update the AABB you will need to recreate it each time the model rotates, and move it if the models positions changes.**&#xD;&#xA;&#xD;&#xA;The box will change shape and size depending on the rotation and the model you use.&#xD;&#xA;&#xD;&#xA;If you want to have a rotating collision box than that matches up with the model, then that is completely different than an AABB, and you will need to look into the physics of your engine for that.&#xD;&#xA;&#xD;&#xA;Edit: &#xD;&#xA;&#xD;&#xA;**If you want to update the AABB quickly, but with less accuracy, just pass the points of the original bounding box instead of the entire model**. &#xD;&#xA;&#xD;&#xA;The bounding box won't be perfectly tight, but it is guaranteed to have the entire model inside of it. [Here is an article describing how to achieve this.][1]&#xD;&#xA;&#xD;&#xA;One thing I would like to add that is not in the article would be to create a few fully calculated bounding boxes at 10 rotations and when recalculating, use the bounding box that is closest to the current rotation, that should improve the tightness of the bounding box a lot without creating that much more overhead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3426/when_two_hearts_collide_.php?page=1" />
  <row Id="20451" PostHistoryTypeId="2" PostId="9866" RevisionGUID="488a211d-a4d9-478e-8b1e-9b3ad0e483b9" CreationDate="2011-03-17T02:16:07.073" UserId="545" Text="Write a ring 0 driver that hooks SSDT and logs / blocks when ReadProcessMemory / WriteProcessMemory is called on your application.  It'd be better to just log so you can slowly change their game behavior over time rather than just crash." />
  <row Id="20452" PostHistoryTypeId="25" PostId="9857" RevisionGUID="ec356c25-fbe3-466d-8cb9-fbbd3dfdbf0b" CreationDate="2011-03-17T02:23:28.813" Comment="http://twitter.com/#!/StackGameDev/status/48207795664846850" />
  <row Id="20454" PostHistoryTypeId="4" PostId="9834" RevisionGUID="f72969e3-e831-4abb-a01f-a53f893e9637" CreationDate="2011-03-17T02:46:53.097" UserId="189" Comment="edited title" Text="To sell or give for free" />
  <row Id="20455" PostHistoryTypeId="2" PostId="9867" RevisionGUID="f9935c3d-e34c-4996-a602-e41dc2b79787" CreationDate="2011-03-17T04:38:54.320" UserId="6137" Text="I'm doing this kind of thing with [bullet][1], but the same technique could be used with any physics engine. Buoyancy is modelled by attaching imaginary floats to the body which simply apply a force acording to their depth below the surface at discrete points.&#xD;&#xA;&#xD;&#xA;In the timestep the each float tests the water level at their position, then applies a force to the boat's rigid body at their position relative to the boat. I imagine each float as a cylinder which is always vertical, regardles of the orientation of the boat. The force is proportional to how deeply immersed they are, up to a maximum defined by their volume.&#xD;&#xA;&#xD;&#xA;At the moment the boat has just 4 floats - bow, stern, port &amp; starboard. I manually set their volumes to provide enough force to counteract gravity, and then adjust the positions and cylinder lengths to tweak the way the boat moves. I've got a vague idea to generate the floats by packing cylinders into the rigid body volume somehow, but that's something for the future. &#xD;&#xA;&#xD;&#xA;A short demo of a boat sailing through waves is [here on youtube][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bulletphysics.org&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=kFXe7R_U4oM" />
  <row Id="20456" PostHistoryTypeId="6" PostId="9814" RevisionGUID="35697bf5-1857-487c-a7cc-c2c2a1d6324f" CreationDate="2011-03-17T05:19:40.040" UserId="51" Comment="edited tags; deleted 15 characters in body" Text="&lt;unity&gt;&lt;shaders&gt;&lt;tutorials&gt;" />
  <row Id="20457" PostHistoryTypeId="5" PostId="9814" RevisionGUID="35697bf5-1857-487c-a7cc-c2c2a1d6324f" CreationDate="2011-03-17T05:19:40.040" UserId="51" Comment="edited tags; deleted 15 characters in body" Text="I would like to start developing my own shaders within unity. &#xD;&#xA;&#xD;&#xA;For starters I would like to do a screen spaced blur. &#xD;&#xA;&#xD;&#xA;Are there any good tutorials to learn shader development besides the official unity documentation, which i find a bit hard to understand?&#xD;&#xA;" />
  <row Id="20458" PostHistoryTypeId="25" PostId="9850" RevisionGUID="ec414327-8159-40d0-8d7e-4a59a9e61375" CreationDate="2011-03-17T05:23:29.250" Comment="http://twitter.com/#!/StackGameDev/status/48253096073244672" />
  <row Id="20459" PostHistoryTypeId="2" PostId="9868" RevisionGUID="b683c078-9858-4b0e-883e-d79885f0b880" CreationDate="2011-03-17T06:19:34.757" UserId="4129" Text="From [wikipedia][1]:&#xD;&#xA;&#xD;&#xA;&gt; A bounding box is a cuboid, or in 2-D a rectangle, containing the object. In dynamical simulation, bounding boxes are preferred to other shapes of bounding volume such as bounding spheres or cylinders **for objects that are roughly cuboid in shape** when the intersection test needs to be fairly accurate. The benefit is obvious, for example, for objects that rest upon other, such as a car resting on the ground: a bounding sphere would show the car as possibly intersecting with the ground, which then would need to be rejected by a more expensive test of the actual model of the car; a bounding box immediately shows the car as not intersecting with the ground, saving the more expensive test.&#xD;&#xA;&#xD;&#xA;If your model can be at any rotation, perhaps a bounding sphere is in fact a better bounding volume to be using?  Bounding spheres are typically cheaper checks and many systems use several bounding volumes in preference order e.g. always check sphere, if that passes then check AABB, if that passes then ...&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bounding_volume" />
  <row Id="20460" PostHistoryTypeId="2" PostId="9869" RevisionGUID="8a73bdf1-3abc-4ffd-a749-d2b88713eac1" CreationDate="2011-03-17T06:38:46.947" UserId="160" Text="If you really dig into the semantics, you'll find that JavaScript is actually a bit closer to most class-based languages than a &quot;real&quot; prototypal language like Self. The way `new` works, you almost always create an object that contains state in its own fields and methods in the fields of its prototype. Squint your eyes and that's a class.&#xD;&#xA;&#xD;&#xA;To really be prototypal, there'd be no `new`. You be cloning objects and doing differential inheritance.&#xD;&#xA;&#xD;&#xA;So, don't really worry too much about JavaScript's half-prototypal nature. Just understand three pieces:&#xD;&#xA;&#xD;&#xA;1. Most of the time, your objects will essentially be instances of a &quot;class&quot; where the constructor defines its fields and the functions on the constructors `prototype` define the method.&#xD;&#xA;&#xD;&#xA;2. If you want familiar Java/C#-style single inheritance you can get that by chaining prototypes. Most JS frameworks out there (Closure, dojo, etc.) have some nice helper methods for wiring it up.&#xD;&#xA;&#xD;&#xA;3. You can add methods to any &quot;class&quot; at any time. Feel free to mix in functions onto which ever prototypes need them. You don't always need to set up an inheritance chain and a complex hierarchy. If you have ten classes that need the same method, you can always imperatively add it to those ten classes." />
  <row Id="20461" PostHistoryTypeId="2" PostId="9870" RevisionGUID="a4f9d47c-c448-4728-bd02-d34a2ceb7504" CreationDate="2011-03-17T07:07:47.243" UserId="5876" Text="Is there a command line tool that can convert PNG and JPG files to ATITC compressed files?&#xD;&#xA;&#xD;&#xA;I have my own export pipeline that converts all textures to PVRTC, ATITC, and DXT, so I have no use for a GUI-based tool like the Compressonator. Also, I'm running on Linux (although Wine might be able to handle simple conversion tools).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20462" PostHistoryTypeId="1" PostId="9870" RevisionGUID="a4f9d47c-c448-4728-bd02-d34a2ceb7504" CreationDate="2011-03-17T07:07:47.243" UserId="5876" Text="Is there a command line ATI compression tool?" />
  <row Id="20463" PostHistoryTypeId="3" PostId="9870" RevisionGUID="a4f9d47c-c448-4728-bd02-d34a2ceb7504" CreationDate="2011-03-17T07:07:47.243" UserId="5876" Text="&lt;tools&gt;&lt;textures&gt;&lt;compression&gt;" />
  <row Id="20464" PostHistoryTypeId="5" PostId="9870" RevisionGUID="fd39470b-98e1-4a26-9d80-ab1e36a096bb" CreationDate="2011-03-17T07:15:27.110" UserId="5876" Comment="Let's be more specific. This is about textures." Text="Is there a command line tool that can convert PNG and JPG files to ATITC compressed textures?&#xD;&#xA;&#xD;&#xA;I have my own export pipeline that converts all textures to PVRTC, ATITC, and DXT, so I have no use for a GUI-based tool like the Compressonator. Also, I'm running on Linux (although Wine might be able to handle simple conversion tools).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20465" PostHistoryTypeId="4" PostId="9870" RevisionGUID="fd39470b-98e1-4a26-9d80-ab1e36a096bb" CreationDate="2011-03-17T07:15:27.110" UserId="5876" Comment="Let's be more specific. This is about textures." Text="Is there a command line ATI texture compression tool?" />
  <row Id="20466" PostHistoryTypeId="2" PostId="9871" RevisionGUID="520ecc41-84fb-44cd-b18d-956fbdb72084" CreationDate="2011-03-17T07:37:22.433" UserId="4264" Text="Compressonator can be used through the command line.&#xD;&#xA;&#xD;&#xA;    TheCompressonator &lt;-command&gt; [options]&#xD;&#xA;    Commands:&#xD;&#xA;      help     - display help&#xD;&#xA;      convert  - convert image type to another, or compress&#xD;&#xA;      diff     - compare textures&#xD;&#xA;      plugins  - get list of plugins and their options" />
  <row Id="20467" PostHistoryTypeId="2" PostId="9872" RevisionGUID="e7589df3-af9d-4d34-b0ac-f73bc72716ba" CreationDate="2011-03-17T08:02:13.740" UserId="6143" Text="i am going to start a chess like board game. and for that i have reviewed a number to things available.&#xD;&#xA;&#xD;&#xA;one is http://www.mapeditor.org/ , using which you can create a grid base games.&#xD;&#xA;&#xD;&#xA;another option is geekgameboard for iphone available at http://mooseyard.lighthouseapp.com/projects/23201-geekgameboard&#xD;&#xA;&#xD;&#xA;now i want your expert opinion that would it be better to make a game in cocos2d using the first option or the second option? both looks promising to me and give good control over board design.&#xD;&#xA;&#xD;&#xA;ps: sorry for duplicates, i found about the http://gamedev.stackexchange.com/ lately after posting it on stackexchange. so i am just posting it here again as i feel its more relevant board. " />
  <row Id="20468" PostHistoryTypeId="1" PostId="9872" RevisionGUID="e7589df3-af9d-4d34-b0ac-f73bc72716ba" CreationDate="2011-03-17T08:02:13.740" UserId="6143" Text="Board Game Design in Cocos2d" />
  <row Id="20469" PostHistoryTypeId="3" PostId="9872" RevisionGUID="e7589df3-af9d-4d34-b0ac-f73bc72716ba" CreationDate="2011-03-17T08:02:13.740" UserId="6143" Text="&lt;game-design&gt;&lt;cocos2d-iphone&gt;&lt;framework&gt;" />
  <row Id="20470" PostHistoryTypeId="5" PostId="9843" RevisionGUID="52807cdf-b822-4c88-8dc6-95a03a9e6f9f" CreationDate="2011-03-17T08:13:38.860" UserId="4264" Comment="added 110 characters in body" Text="Here's one scheme I came up with when someone was asking for it on some board long ago. Using percentages or doubled variables doesn't really work, as you can search for &quot;any&quot; values and freeze them.&#xD;&#xA;&#xD;&#xA;Instead, make a monster of a data type.&#xD;&#xA;&#xD;&#xA;Basically, store your important values as a structure with:&#xD;&#xA; &#xD;&#xA;  - 32 pointers to bits&#xD;&#xA;  - For quick reading, have the struct include the current value as a plain int too&#xD;&#xA;&#xD;&#xA;For manipulation, collect the current value from the separately-allocated bits (which can be true/false ints), change the value, and then store them back.&#xD;&#xA;&#xD;&#xA;Here's the nasty bit: every time you manipulate the value, free and allocate the bits again. Allocation should happen **in random order**, so the data jumps around in memory and can't be easily frozen.&#xD;&#xA;&#xD;&#xA;Additional safeguards would be to store checksums of the values (as well as the &quot;plain&quot; int) and compare these during the manipulation calls too. If mismatch is found, do something subtle, like remove a random key needed to unlock doors to progress in the game.&#xD;&#xA;&#xD;&#xA;**Edit:** For further memory movement, make sure you allocate the new &quot;bits&quot; before freeing the old ones. " />
  <row Id="20471" PostHistoryTypeId="2" PostId="9873" RevisionGUID="e0ff1262-9862-4b93-8b71-9ab9ce5ccab4" CreationDate="2011-03-17T08:16:40.290" UserId="20" Text="I wouldn't use a tile-editor for a game like chess. The board is really simple and you can easily draw it without the help of a tile-editoe. These maps make much more sense if you have a large world/board with lots of different tiles.&#xD;&#xA;&#xD;&#xA;I don't know the GeekGameBoard you linked to, but it looks like it's a framework for card and board-games, so this seems much more suited for your task. It seems like this framework provides several UI elements, so you'll probably either choose GeekGameBoard *or* Cocos2d. Mixing the two would most likely force you to rewrite/refactor a lot of the GeekGameBoard code (which might be more work than starting your game-code from scratch)." />
  <row Id="20472" PostHistoryTypeId="25" PostId="9872" RevisionGUID="9aaaf6a9-b110-44f7-8d32-4a940e6af205" CreationDate="2011-03-17T08:23:28.557" Comment="http://twitter.com/#!/StackGameDev/status/48298391343607808" />
  <row Id="20473" PostHistoryTypeId="2" PostId="9874" RevisionGUID="14a795ce-3788-4077-aa27-07e26a45d7b0" CreationDate="2011-03-17T08:26:50.877" UserId="2401" Text="How this kind of effects are technically implemented using OpenGL ES? Are they performing simulation on GPU (using Shaders) or CPU while using some smart vertex positioning and texturing? Why it appears so fast (in terms of performance)?&#xD;&#xA;&#xD;&#xA;You might check the video of that app here: http://www.youtube.com/watch?v=F4KOk6QP6kQ" />
  <row Id="20474" PostHistoryTypeId="1" PostId="9874" RevisionGUID="14a795ce-3788-4077-aa27-07e26a45d7b0" CreationDate="2011-03-17T08:26:50.877" UserId="2401" Text="How effects found in &quot;Autodesk Fluid FX&quot; are implemented using OpenGL ES?" />
  <row Id="20475" PostHistoryTypeId="3" PostId="9874" RevisionGUID="14a795ce-3788-4077-aa27-07e26a45d7b0" CreationDate="2011-03-17T08:26:50.877" UserId="2401" Text="&lt;opengl-es&gt;&lt;graphic-effects&gt;" />
  <row Id="20476" PostHistoryTypeId="5" PostId="9872" RevisionGUID="cd2ea83e-c83c-47a7-a596-2f07d2f5b129" CreationDate="2011-03-17T08:38:49.263" UserId="20" Comment="capitalization, minor fixes" Text="I am going to start a chess like board game. And for that I have reviewed a number of things available.&#xD;&#xA;&#xD;&#xA;One is http://www.mapeditor.org/, using which you can create a grid base games.&#xD;&#xA;&#xD;&#xA;Another option is geekgameboard for iphone available at http://mooseyard.lighthouseapp.com/projects/23201-geekgameboard&#xD;&#xA;&#xD;&#xA;Now I want your expert opinion on what would be better to make a game in cocos2d, using the first option or the second option? Both looks promising to me and give good control over board design.&#xD;&#xA;&#xD;&#xA;PS: Sorry for duplicates, I found about the http://gamedev.stackexchange.com/ lately after posting it on stackexchange. So I am just posting it here again as I feel this is a more relevant board. " />
  <row Id="20477" PostHistoryTypeId="2" PostId="9875" RevisionGUID="ce37ed0e-4a37-49b8-a7f2-de5115e7bf27" CreationDate="2011-03-17T08:41:23.080" UserId="4264" Text="You can do that with either fragment shaders or a grid of textures. With fragment shaders you get more precision.&#xD;&#xA;&#xD;&#xA;The basic idea is that you have some kind of transformation and then you recursively apply it to the same data - meaning you store the results of the last frame and then apply the same transformation to it again.&#xD;&#xA;&#xD;&#xA;As an example you might divide the screen to 24x24 quads, and then jitter the vertices a few pixels. Applying this transformation to the data will cause the pixels to flow a bit. &#xD;&#xA;&#xD;&#xA;Add a smoothing pass and voilá - fluid fx." />
  <row Id="20478" PostHistoryTypeId="2" PostId="9876" RevisionGUID="042e36f7-963a-4183-ac71-0cc739c02f41" CreationDate="2011-03-17T09:32:09.447" UserId="2091" Text="Although I made the first comment questioning the point of degrading the experience of a portion of your audience for no apparent gain, I still find it an interesting question in terms of technical challenge.&#xD;&#xA;&#xD;&#xA;I just had this idea: What cheaters do is find values that change and freeze them.  The search would then happen only between deaths or events that changed the player's health.  Moreover, the cheater could be refining the search by filtering out what changed when he was &quot;not dying&quot;.  &#xD;&#xA;&#xD;&#xA;What if the &quot;health&quot; counter is changing the whole time?  Make it a pointer and reallocate it every frame or every N frames if the performance hit is too big.  Or XOR it with a random value that changes every frame (XORing again back against the same random number for decrypting before encrypting with a new random value).&#xD;&#xA;&#xD;&#xA;If you have other in-game data also changing the whole time (including x and y positions of the player character, or the time counter), that might make it harder to find out which of all the changing data is the health, and freezing the whole game state is a no-go for the cheater.  &#xD;&#xA;&#xD;&#xA;For further mislead, you can actually store the health in a plain write-only variable meant as a honeypot.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20479" PostHistoryTypeId="2" PostId="9877" RevisionGUID="dd8cd04c-0539-4950-95b0-adb5ce3a067b" CreationDate="2011-03-17T09:52:59.937" UserId="6143" Text="There are only 2 books available on cocos2d, i think&#xD;&#xA;&#xD;&#xA;https://www.packtpub.com/cocos2d-games-for-iphone-0-99-beginners-guide/book&#xD;&#xA;http://apress.com/book/view/1430233036&#xD;&#xA;&#xD;&#xA;from which i recommend the second one &quot;Learn iPhone and iPad Cocos2D Game Development&quot;.&#xD;&#xA;its very well written and a nice introduction to the topic. Autor has described very useful insights using his experience with tools and tips to make a iphone games.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20480" PostHistoryTypeId="5" PostId="9876" RevisionGUID="4022ceb4-70d4-43fa-a73d-e76deba39662" CreationDate="2011-03-17T09:56:46.030" UserId="2091" Comment="deleted 1 characters in body; deleted 12 characters in body" Text="Although I made the first comment questioning the point of degrading the experience of a portion of your audience for no apparent gain, I still find it an interesting question from a technical point of view.&#xD;&#xA;&#xD;&#xA;I just had this idea: What cheaters do is find values that change and freeze them.  The search would then happen only between deaths or events that changed the player's health.  Moreover, the cheater could be refining the search by filtering out what changed when he was &quot;not dying&quot;.  &#xD;&#xA;&#xD;&#xA;What if the &quot;health&quot; counter is changing the whole time?  Make it a pointer and reallocate it every frame or every N frames if the performance hit is too big.  Or XOR it with a random value that changes every frame (XORing again against the same value for decrypting before encrypting with a new random value).&#xD;&#xA;&#xD;&#xA;If you have other in-game data also changing the whole time (including x and y positions of the player character, or the time counter), that might make it harder to find out which of all the changing data is the health. And freezing the whole game state is a no-go for the cheater.  &#xD;&#xA;&#xD;&#xA;For further mislead, you can actually store the health in a plain write-only variable meant as a honey pot.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20481" PostHistoryTypeId="5" PostId="9875" RevisionGUID="d39347d6-6947-4bf1-bb22-63b25d29843f" CreationDate="2011-03-17T10:25:35.330" UserId="4264" Comment="added 191 characters in body; added 119 characters in body" Text="You can do that with either fragment shaders or a grid of textures. With fragment shaders you get more precision.&#xD;&#xA;&#xD;&#xA;The basic idea is that you have some kind of transformation and then you recursively apply it to the same data - meaning you store the results of the last frame and then apply the same transformation to it again.&#xD;&#xA;&#xD;&#xA;As an example you might divide the screen to 24x24 quads, and then jitter the vertices a few pixels. Applying this transformation to the data will cause the pixels to flow a bit. &#xD;&#xA;&#xD;&#xA;Add a smoothing pass and voilá - fluid fx.&#xD;&#xA;&#xD;&#xA;**edit**&#xD;&#xA;&#xD;&#xA;Here's a quick simulation of this done in photoshop; few frames with the &quot;waves&quot; filter applied and re-applied:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://personal.inet.fi/koti/sol/rec_waves.png&quot;&gt;&#xD;&#xA;&#xD;&#xA;note that it's the exact same filter applied to the previous result, not new parameters applied to the first frame.&#xD;&#xA;" />
  <row Id="20482" PostHistoryTypeId="5" PostId="9873" RevisionGUID="dcca471e-c60f-4125-98de-1284ec484756" CreationDate="2011-03-17T10:47:35.157" UserId="20" Comment="edited body" Text="I wouldn't use a tile-editor for a game like chess. The board is really simple and you can easily draw it without the help of a tile-editor. These maps make much more sense if you have a large world/board with lots of different tiles.&#xD;&#xA;&#xD;&#xA;I don't know the GeekGameBoard you linked to, but it looks like it's a framework for card and board-games, so this seems much more suited for your task. It seems like this framework provides several UI elements, so you'll probably either choose GeekGameBoard *or* Cocos2d. Mixing the two would most likely force you to rewrite/refactor a lot of the GeekGameBoard code (which might be more work than starting your game-code from scratch)." />
  <row Id="20483" PostHistoryTypeId="25" PostId="9874" RevisionGUID="be0748e2-56b9-46ab-9ed5-e6c71396ed7e" CreationDate="2011-03-17T11:23:28.857" Comment="http://twitter.com/#!/StackGameDev/status/48343691177361408" />
  <row Id="20484" PostHistoryTypeId="2" PostId="9878" RevisionGUID="bbb97a93-7c6b-48e6-bb27-bb9f111b31ac" CreationDate="2011-03-17T12:00:51.727" UserId="5899" Text="I don't know how to achieve this with luaplus, but I have been using luabind and the behavior that you explains is very easy to program.&#xD;&#xA;&#xD;&#xA;http://www.rasterbar.com/products/luabind.html&#xD;&#xA;&#xD;&#xA;In my experience, LUA has incremented the workflow efficiency, especially on things like AI and things that change a lot in development.&#xD;&#xA;&#xD;&#xA;For example, you could reprogram the AI on the fly, with the game in execution, reload the AI and see the changes. All this without recompile or launch the game again." />
  <row Id="20485" PostHistoryTypeId="5" PostId="9843" RevisionGUID="a87c0a37-7a4f-404a-8461-d9e978777992" CreationDate="2011-03-17T12:21:14.660" UserId="4264" Comment="added 235 characters in body" Text="Here's one scheme I came up with when someone was asking for it on some board long ago. Using percentages or doubled variables doesn't really work, as you can search for &quot;any&quot; values and freeze them.&#xD;&#xA;&#xD;&#xA;Instead, make a monster of a data type.&#xD;&#xA;&#xD;&#xA;Basically, store your important values as a structure with:&#xD;&#xA; &#xD;&#xA;  - 32 pointers to bits&#xD;&#xA;  - For quick reading, have the struct include the current value as a plain int too&#xD;&#xA;&#xD;&#xA;For manipulation, collect the current value from the separately-allocated bits (which can be true/false ints), change the value, and then store them back.&#xD;&#xA;&#xD;&#xA;Here's the nasty bit: every time you manipulate the value, free and allocate the bits again. Allocation should happen **in random order**, so the data jumps around in memory and can't be easily frozen.&#xD;&#xA;&#xD;&#xA;Additional safeguards would be to store checksums of the values (as well as the &quot;plain&quot; int) and compare these during the manipulation calls too. If mismatch is found, do something subtle, like remove a random key needed to unlock doors to progress in the game.&#xD;&#xA;&#xD;&#xA;**Edit:** For further memory movement, make sure you allocate the new &quot;bits&quot; before freeing the old ones. &#xD;&#xA;&#xD;&#xA;**Edit:** For multiplayer games, it's also possible to serialize the data structure, compress it, and send it over the network. Not the most efficient use of the network, but definitely harder to figure out through packet sniffing." />
  <row Id="20486" PostHistoryTypeId="2" PostId="9879" RevisionGUID="8480c867-e563-414e-8286-4e2d1bcfb328" CreationDate="2011-03-17T13:23:15.153" UserId="4688" Text="Due to your young age, i would give it for free and build a reputations for your self." />
  <row Id="20487" PostHistoryTypeId="5" PostId="9876" RevisionGUID="4f28b19c-a80e-4a86-a131-7c8ff15ff078" CreationDate="2011-03-17T13:32:50.490" UserId="2091" Comment="added 1200 characters in body" Text="Although I made the first comment questioning the point of degrading the experience of a portion of your audience for no apparent gain, I still find it an interesting question from a technical point of view.&#xD;&#xA;&#xD;&#xA;I just had this idea: What cheaters do is find values that change and freeze them.  The search would then happen only between deaths or events that changed the player's health.  Moreover, the cheater could be refining the search by filtering out what changed when he was &quot;not dying&quot;.  &#xD;&#xA;&#xD;&#xA;What if the &quot;health&quot; counter is changing the whole time?  Make it a pointer and reallocate it every frame or every N frames if the performance hit is too big.  Or XOR it with a random value that changes every frame (XORing again against the same value for decrypting before encrypting with a new random value).&#xD;&#xA;&#xD;&#xA;If you have other in-game data also changing the whole time (including x and y positions of the player character, or the time counter), that might make it harder to find out which of all the changing data is the health. And freezing the whole game state is a no-go for the cheater.  &#xD;&#xA;&#xD;&#xA;For further mislead, you can actually store the health in a plain write-only variable meant as a honey pot.&#xD;&#xA;&#xD;&#xA;**Edit**:&#xD;&#xA;&#xD;&#xA;Still, the cheater might try to find which of the variables that is changing the whole time is the one to freeze through trial and error.  A possible solution would be to couple the variables together.  &#xD;&#xA;&#xD;&#xA;An example:&#xD;&#xA;&#xD;&#xA;Instead of storing health (h) and position (x), you store them in two variables a and b, from which you can retrieve the values later:&#xD;&#xA;&#xD;&#xA;    a = x+h; b = x-h&#xD;&#xA;    x = (a+b)/2; h = (a-b)/2&#xD;&#xA;&#xD;&#xA;This way, if the cheater freezes only one of them and then moves the character, the position is affected and, depending on which one was frozen, h goes negative (instant death).  You can switch between the above formulas and:&#xD;&#xA;&#xD;&#xA;    a = x-h; b = x+h&#xD;&#xA;    x = (a+b)/2; h = (b-a)/2&#xD;&#xA;&#xD;&#xA;In consecutive frames, and you guarantee that in at most 2 frames after either one of the variables have been frozen health will turn 0 the moment x changes.  Remember that you are storing only a and b.  Combine this with the continuous XOR as mentioned above.  The result is a collection of variables that are changing every frame to seemingly random values, and freezing any single one or a subset of them only produces undesired side effects in the game, instant death being one of them." />
  <row Id="20488" PostHistoryTypeId="5" PostId="9875" RevisionGUID="ed30cf4d-24d8-4a7c-8173-3a49e32cf408" CreationDate="2011-03-17T13:33:27.547" UserId="4264" Comment="added 148 characters in body" Text="You can do that with either fragment shaders or a grid of textures. With fragment shaders you get more precision.&#xD;&#xA;&#xD;&#xA;The basic idea is that you have some kind of transformation and then you recursively apply it to the same data - meaning you store the results of the last frame and then apply the same transformation to it again.&#xD;&#xA;&#xD;&#xA;As an example you might divide the screen to 24x24 quads, and then jitter the vertices a few pixels. Applying this transformation to the data will cause the pixels to flow a bit. &#xD;&#xA;&#xD;&#xA;Add a smoothing pass and voilá - fluid fx.&#xD;&#xA;&#xD;&#xA;**edit**&#xD;&#xA;&#xD;&#xA;Here's a quick simulation of this done in photoshop; few frames with the &quot;waves&quot; filter applied and re-applied:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://personal.inet.fi/koti/sol/rec_waves.png&quot;&gt;&#xD;&#xA;&#xD;&#xA;note that it's the exact same filter applied to the previous result, not new parameters applied to the first frame.&#xD;&#xA;&#xD;&#xA;**edit** why it appears so fast is due to this simplicity - it's just rendering the whole screen once, using the last frame as the source texture." />
  <row Id="20489" PostHistoryTypeId="5" PostId="9874" RevisionGUID="ea3ea596-def6-413b-a16b-2cfe2dc05a91" CreationDate="2011-03-17T13:58:03.063" UserId="2401" Comment="added 101 characters in body" Text="How this kind of effects are technically implemented using OpenGL ES? Are they performing simulation on GPU (using Shaders) or CPU while using some smart vertex positioning and texturing? Why it appears so fast (in terms of performance)?&#xD;&#xA;&#xD;&#xA;You might check the video of that app here: http://www.youtube.com/watch?v=F4KOk6QP6kQ&#xD;&#xA;&#xD;&#xA;**edit**&#xD;&#xA;&#xD;&#xA;Here is the presentation for the app: http://www.futuregameon.com/FGO2010_JosStam.pdf" />
  <row Id="20490" PostHistoryTypeId="2" PostId="9880" RevisionGUID="8a731b1b-431a-428a-9574-0170f025a55a" CreationDate="2011-03-17T14:07:29.947" UserId="6151" Text="tolua++ uses all the metatable features to allow a very straightforward manipulation of your c++ types in lua.&#xD;&#xA;&#xD;&#xA;For example, this declaration :&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;// tolua_begin&#xD;&#xA;class SomeCppClass&#xD;&#xA;{&#xD;&#xA;public:&#xD;&#xA;   SomeCppClass();&#xD;&#xA;   ~SomeCppClass();&#xD;&#xA;&#xD;&#xA;   int some_field;&#xD;&#xA;   void some_method();&#xD;&#xA;};&#xD;&#xA;// tolua_end&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Will automatically generate the lua bindings to allow this lua scipt :&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;#!lua&#xD;&#xA;-- obj1 must be deleted manually&#xD;&#xA;local obj1 = SomeCppClass:new() &#xD;&#xA;-- obj1 will be automatically garbage collected &#xD;&#xA;local obj2 = SomeCppClass:new_local()&#xD;&#xA;&#xD;&#xA;obj1.some_field = 3 -- direct access to &quot;some_field&quot;&#xD;&#xA;obj2:some_method() -- direct call to &quot;some_method&quot;&#xD;&#xA;&#xD;&#xA;obj1:delete()&#xD;&#xA;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;The advantage of this technique is that your lua code will ve very consistent with the relying C++ code. See http://www.codenix.com/~tolua/tolua++.html" />
  <row Id="20491" PostHistoryTypeId="25" PostId="9870" RevisionGUID="1437571d-23b7-4a2c-9313-d557c9e924fa" CreationDate="2011-03-17T14:23:30.713" Comment="http://twitter.com/#!/StackGameDev/status/48388997441011712" />
  <row Id="20492" PostHistoryTypeId="5" PostId="8994" RevisionGUID="1fe9430a-6f02-4181-a938-f41f60f7769c" CreationDate="2011-03-17T15:26:58.667" UserId="1430" Comment="captialization; edited title" Text="I've implemented LuaPlus in my engine eventmanager successfully and really like the flexibility I gained. But I'm still not exactly where I want to be, because I can't link my c++ classes to a Lua class.&#xD;&#xA;&#xD;&#xA;For example, I have a Actor class in C++, and I want to be able to create the same class in Lua and gain access to members with LuaPlus, but I can't figure how I can achieve that.&#xD;&#xA;&#xD;&#xA;Is this actually LuaPlus built-in functionality, or do I have to write my own interface that exchanges data tables between C++ and Lua?&#xD;&#xA;&#xD;&#xA;My current approach would be to fire an event in Lua that creates an new actor class in C++ code, and transfer its ID and the data I need to back to Lua. When I modify the data I send the modifications back to C++ code again, but I actually thought there's something in LuaPlus that exposes this functionality already." />
  <row Id="20493" PostHistoryTypeId="4" PostId="8994" RevisionGUID="1fe9430a-6f02-4181-a938-f41f60f7769c" CreationDate="2011-03-17T15:26:58.667" UserId="1430" Comment="captialization; edited title" Text="Accessing C++ class members with LuaPlus" />
  <row Id="20494" PostHistoryTypeId="5" PostId="9875" RevisionGUID="d377060f-ade3-44c6-87bc-f17dfede7d3f" CreationDate="2011-03-17T15:48:27.307" UserId="4264" Comment="added 368 characters in body" Text="You can do that with either fragment shaders or a grid of textures. With fragment shaders you get more precision.&#xD;&#xA;&#xD;&#xA;The basic idea is that you have some kind of transformation and then you recursively apply it to the same data - meaning you store the results of the last frame and then apply the same transformation to it again.&#xD;&#xA;&#xD;&#xA;As an example you might divide the screen to 24x24 quads, and then jitter the vertices a few pixels. Applying this transformation to the data will cause the pixels to flow a bit. &#xD;&#xA;&#xD;&#xA;Add a smoothing pass and voilá - fluid fx.&#xD;&#xA;&#xD;&#xA;**edit**&#xD;&#xA;&#xD;&#xA;Here's a quick simulation of this done in photoshop; few frames with the &quot;waves&quot; filter applied and re-applied:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://personal.inet.fi/koti/sol/rec_waves.png&quot;&gt;&#xD;&#xA;&#xD;&#xA;note that it's the exact same filter applied to the previous result, not new parameters applied to the first frame.&#xD;&#xA;&#xD;&#xA;**edit** why it appears so fast is due to this simplicity - it's just rendering the whole screen once, using the last frame as the source texture.&#xD;&#xA;&#xD;&#xA;**edit** Browsing through the presentation, yes, it does seem it's based on &quot;real&quot; fluid simulation, but the result is pretty much the same - rendering the whole screen, using the previous frame as source texture, offsetting using an offset texture which contains the motion vectors. Calculating said motion vectors is another matter, but can even be done offline." />
  <row Id="20495" PostHistoryTypeId="5" PostId="9119" RevisionGUID="ac09b02b-5a53-4224-9868-906207aac22c" CreationDate="2011-03-17T15:53:56.050" UserId="2306" Comment="added 166 characters in body" Text="I'm not sure what is considered the best approach, but one option would be to use instanced geometry - you provide the GPU with a 3d model and a list of places/orientations where you'd like it drawn (preferable in the form of a concatenated matrix), and the GPU will handle the rest via a custom vertex shader.&#xD;&#xA;&#xD;&#xA;Basically, you create two vertex buffers: one containing your 3D model (a blade of grass or patch of sod, for instance), and one containing a list of transformation matrices, each matrix containing the scale+rotation+translation where you'd like to render an instance of your model. (You'll need a custom vertex structure to hold the matrix - it's a vertex buffer in name only, and is just used to pass matrices to the GPU.)&#xD;&#xA;&#xD;&#xA;Then, you'll need a custom shader. The vertex shader will get called for each vertex in each stream, so for each call you'll get two input parameters: one vertex from your blade model, and one of the transformation matrices. The shader then transforms the model vertex with the matrix, and returns the updated position. &#xD;&#xA;&#xD;&#xA;If you want effects like wind, etc, you can adjust the matrix for each instance and update the matrix stream.&#xD;&#xA;&#xD;&#xA;Using a model for a patch of grass rather than individual blades is makes it easier to cull. If you're using an octree or BSP for collision and visibility determination, you can reduce the depth of your tree by dealing with larger &quot;blocks&quot; of grass instead of smaller blades. Also, it's easy to provide a less complex/less-detailed model for a patch of grass if you detect a performance issue.&#xD;&#xA;&#xD;&#xA;There's also something called a &quot;Geometry Shader&quot; that may apply here, but I don't know anything about it other than it's relatively new and apparently (?) not supported on the xbox.&#xD;&#xA;&#xD;&#xA;[Here's a link to an XNA instancing sample.][1]&#xD;&#xA;&#xD;&#xA;**Update** &#xD;&#xA;&#xD;&#xA;Alternate methods: Though rendering lots of grass via instancing is significantly faster than other geometry-based methods, it can still be very expensive. [GPU Gems contains an interesting alternative using intersecting billboard clusters][2].&#xD;&#xA;&#xD;&#xA;[And, of course, there's shell rendering][3], which consists of rendering a stack of textured polys, each with a map of &quot;dots&quot; on a transparent background. Each texture has an image of a cross section of a patch of grass - think dots on a transparent background. When you render them in close proximity, the solid parts of the texture appear to be extruded and connected between the layers. Not sure how well this performs.&#xD;&#xA;&#xD;&#xA;**Update 2**&#xD;&#xA;&#xD;&#xA;[I hadn't noticed that the XNA billboard sample is a grass simulation][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/mesh_instancing&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems/gpugems_ch07.html&#xD;&#xA;  [3]: http://www.xnainfo.com/content.php?content=23&#xD;&#xA;  [4]: http://create.msdn.com/en-US/education/catalog/sample/billboard" />
  <row Id="20496" PostHistoryTypeId="2" PostId="9881" RevisionGUID="dd4415a2-b39e-4245-b6ad-2c2d759825bb" CreationDate="2011-03-17T16:10:07.003" UserId="6070" Text="I made this soundanalyzer class to detect beats in songs :&#xD;&#xA;&#xD;&#xA;// put it on pastebin for the big size, will put it here if people rather want that.&#xD;&#xA;pastebin.com/8PdgZPP3&#xD;&#xA;&#xD;&#xA;but for some reason its only detecting beats from 637 sec to around 641(sec) and I have no idea why. I know the beats are being inserted from multiple bands since I am finding duplicates and it seems as its assigning a beat to each instant energy value in between those values.&#xD;&#xA;&#xD;&#xA;Its modeled after this : http://www.flipcode.com/misc/BeatDetectionAlgorithms.pdf&#xD;&#xA;&#xD;&#xA;So why won't the beats properly register ?" />
  <row Id="20497" PostHistoryTypeId="1" PostId="9881" RevisionGUID="dd4415a2-b39e-4245-b6ad-2c2d759825bb" CreationDate="2011-03-17T16:10:07.003" UserId="6070" Text="Beat detection, weird detection" />
  <row Id="20498" PostHistoryTypeId="3" PostId="9881" RevisionGUID="dd4415a2-b39e-4245-b6ad-2c2d759825bb" CreationDate="2011-03-17T16:10:07.003" UserId="6070" Text="&lt;c#&gt;&lt;programming&gt;&lt;audio&gt;&lt;debug&gt;" />
  <row Id="20499" PostHistoryTypeId="5" PostId="9881" RevisionGUID="05feb2ce-7b02-452f-88cd-9c2ae7e827ff" CreationDate="2011-03-17T16:29:30.777" UserId="1198" Comment="put code in from paste-bin removed external link to pastebin" Text="I made this soundanalyzer class to detect beats in songs :&#xD;&#xA;&#xD;&#xA;    class SoundAnalyzer&#xD;&#xA;    {&#xD;&#xA;        public SoundBuffer soundData;&#xD;&#xA;        public Sound sound;&#xD;&#xA;        public List&lt;double&gt; beatMarkers = new List&lt;double&gt;();&#xD;&#xA;&#xD;&#xA;        public SoundAnalyzer(string path)&#xD;&#xA;        {&#xD;&#xA;            soundData = new SoundBuffer(path);&#xD;&#xA;            sound = new Sound(soundData);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // C = threshold, N = size of history buffer / 1024  B = bands&#xD;&#xA;        public void PlaceBeatMarkers(float C, int N, int B)&#xD;&#xA;        {&#xD;&#xA;            List&lt;double&gt;[] instantEnergyList = new List&lt;double&gt;[B];&#xD;&#xA;            GetEnergyList(B, ref instantEnergyList);&#xD;&#xA;            for (int i = 0; i &lt; B; i++)&#xD;&#xA;            {&#xD;&#xA;                PlaceMarkers(instantEnergyList[i], N, C);&#xD;&#xA;            }&#xD;&#xA;            beatMarkers.Sort();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private short[] getRange(int begin, int end, short[] array)&#xD;&#xA;        {&#xD;&#xA;            short[] result = new short[end - begin];&#xD;&#xA;            for (int i = 0; i &lt; end - begin; i++)&#xD;&#xA;            {&#xD;&#xA;                result[i] = array[begin + i];&#xD;&#xA;            }&#xD;&#xA;            return result;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // get a array of with a list of energy for each band&#xD;&#xA;        private void GetEnergyList(int B, ref List&lt;double&gt;[] instantEnergyList)&#xD;&#xA;        {&#xD;&#xA;            for (int i = 0; i &lt; B; i++)&#xD;&#xA;            {&#xD;&#xA;                instantEnergyList[i] = new List&lt;double&gt;();&#xD;&#xA;            }&#xD;&#xA;            short[] samples = soundData.Samples;&#xD;&#xA;&#xD;&#xA;            float timePerSample = 1 / (float)soundData.SampleRate;&#xD;&#xA;            int sampleIndex = 0;&#xD;&#xA;            int nextSamples = 1024;&#xD;&#xA;            int samplesPerBand = nextSamples / B;&#xD;&#xA;&#xD;&#xA;            // for the whole song&#xD;&#xA;            while (sampleIndex + nextSamples &lt; samples.Length)&#xD;&#xA;            {&#xD;&#xA;                complex[] FFT = FastFourier.Calculate(getRange(sampleIndex, nextSamples + sampleIndex, samples));&#xD;&#xA;                // foreach band&#xD;&#xA;                for (int i = 0; i &lt; B; i++)&#xD;&#xA;                {&#xD;&#xA;                    double energy = 0;&#xD;&#xA;                    for (int j = 0; j &lt; samplesPerBand; j++)&#xD;&#xA;                        energy += FFT[i * samplesPerBand + j].GetMagnitude();&#xD;&#xA;&#xD;&#xA;                    energy /= samplesPerBand;&#xD;&#xA;                    instantEnergyList[i].Add(energy);&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (sampleIndex + nextSamples &gt;= samples.Length)&#xD;&#xA;                    nextSamples = samples.Length - sampleIndex - 1;&#xD;&#xA;                sampleIndex += nextSamples;&#xD;&#xA;                samplesPerBand = nextSamples / B;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // place the actual markers&#xD;&#xA;        private void PlaceMarkers(List&lt;double&gt; instantEnergyList, int N, float C)&#xD;&#xA;        {&#xD;&#xA;            double timePerSample = 1 / (double)soundData.SampleRate;&#xD;&#xA;            int index = N;&#xD;&#xA;            int numInBuffer = index;&#xD;&#xA;            double historyBuffer = 0;&#xD;&#xA;&#xD;&#xA;            //Fill the history buffer with n * instant energy&#xD;&#xA;            for (int i = 0; i &lt; index; i++)&#xD;&#xA;            {&#xD;&#xA;                historyBuffer += instantEnergyList[i];&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // If instantEnergy / samples in buffer &lt; instantEnergy for the next sample then add beatmarker.&#xD;&#xA;            while (index + 1 &lt; instantEnergyList.Count)&#xD;&#xA;            {&#xD;&#xA;                if(instantEnergyList[index + 1] &gt; (historyBuffer / numInBuffer) * C)&#xD;&#xA;                    beatMarkers.Add((index + 1) * 1024 * timePerSample); &#xD;&#xA;                historyBuffer -= instantEnergyList[index - numInBuffer];&#xD;&#xA;                historyBuffer += instantEnergyList[index + 1];&#xD;&#xA;                index++;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But for some reason its only detecting beats from 637 sec to around 641(sec) and I have no idea why. I know the beats are being inserted from multiple bands since I am finding duplicates and it seems as its assigning a beat to each instant energy value in between those values.&#xD;&#xA;&#xD;&#xA;Its modeled after this: http://www.flipcode.com/misc/BeatDetectionAlgorithms.pdf&#xD;&#xA;&#xD;&#xA;So why won't the beats properly register?" />
  <row Id="20500" PostHistoryTypeId="24" PostId="9881" RevisionGUID="05feb2ce-7b02-452f-88cd-9c2ae7e827ff" CreationDate="2011-03-17T16:29:30.777" Comment="Proposed by 1198 approved by 51 edit id of 81" />
  <row Id="20501" PostHistoryTypeId="2" PostId="9882" RevisionGUID="5615decd-1510-4eb2-9441-e1785c59dad9" CreationDate="2011-03-17T16:30:20.860" UserId="1198" Text="I'd recommend you check into http://nodejs.org/ and https://github.com/joyent/node/wiki/ for informatio on what you can do with node.js.&#xD;&#xA;&#xD;&#xA;cocos2d-javascript has a tutorials section on their website: http://cocos2d-javascript.org/tutorials/&#xD;&#xA;&#xD;&#xA;Without significantly more detail, there isn't much more I can recommend you look at." />
  <row Id="20502" PostHistoryTypeId="2" PostId="9883" RevisionGUID="ece4b6d3-9dda-4eae-ade1-ad1d96dcfa8e" CreationDate="2011-03-17T16:46:00.397" UserId="3794" Text="For fluids you don't need big resolution as the screen is. 2D (or 3D fluids) can be done in 1/2 without quality loss and 1/4 without significant quality loss. That is if linear interpolation is used(linear texture sampling). If cubic interpolation is implemented, you can go for even lower resolutions.&#xD;&#xA;&#xD;&#xA;Stable fluids can be computed on the CPU in interactive rates. It is todays' fashion to put everything on the gpu (and i love it), but 2D fluids can be very nicely handled on CPU. Autodesk maya fluid solver is single threaded (as whole maya (!)) and can handle aprox. 15*15*15 (3375) 3D fluids at realtime on todays CPU. So i'm not afraid about performance on any mobile platform if the simulation is only 2D.&#xD;&#xA;&#xD;&#xA;**How is this done?**  &#xD;&#xA;*First smoke:*   &#xD;&#xA;Density and speed is simulated. Is you can see in slides you posted. Navier-Strokes equations can do the job. They can be quite simple or very complex (like Maya, where you can simulate density,temperature,pressure and fuel, with tons of setups). If you simulate only density and speed - you will get two 2D arrays. Speed (array of 2D vectors) and density (array of scalar). By rendering density as fullscreen texture you can get nice smoke (remember thay you can have 1/2 screen resolution without quality loss). I also suggest to use some simple &quot;Transfer function&quot;. It mean that value from density doesn't just move with opacity, but it can lookup in the color. &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;*And for the floating pictures:*&#xD;&#xA;You will do what Jari Komppa said. Every frame has input picture texture and for every pixel you read value from `(pixelPosition - SpeedVector)`. Speed vectors can be loaded as textures (red, green = x,y).&#xD;&#xA;Density still has to be simulated (even if it is not displayed) to have correct speed vectors.&#xD;&#xA;&#xD;&#xA;For fluid simulation on the gpu check this [link][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/XEkJz.jpg&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html" />
  <row Id="20503" PostHistoryTypeId="5" PostId="7465" RevisionGUID="dc37842d-71f0-46da-bed4-3ae900d6ad77" CreationDate="2011-03-17T16:57:18.247" UserId="1430" Comment="edited body; edited tags; edited title" Text="I'm an experienced programmer that recently got into iOS development by working through the big nerd ranch book by Aaron Hillegass and Joe Conway. I loved the way the book was structured in terms of typing in the code and doing the challenges.&#xD;&#xA;&#xD;&#xA;I'm interested in learning more about iOS gaming and cocos2d, but am a complete newbie in terms of game development/design. There are [a number of books on amazon on cocos2d][1], can anyone recommend one in particular?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=cocos2d&amp;x=0&amp;y=0" />
  <row Id="20504" PostHistoryTypeId="4" PostId="7465" RevisionGUID="dc37842d-71f0-46da-bed4-3ae900d6ad77" CreationDate="2011-03-17T16:57:18.247" UserId="1430" Comment="edited body; edited tags; edited title" Text="Recommended book for cocos2d?" />
  <row Id="20505" PostHistoryTypeId="6" PostId="7465" RevisionGUID="dc37842d-71f0-46da-bed4-3ae900d6ad77" CreationDate="2011-03-17T16:57:18.247" UserId="1430" Comment="edited body; edited tags; edited title" Text="&lt;cocos2d-iphone&gt;&lt;books&gt;" />
  <row Id="20506" PostHistoryTypeId="2" PostId="9884" RevisionGUID="e8af4e18-5fdf-418e-a9e9-340e4c8a37f1" CreationDate="2011-03-17T17:05:15.977" UserId="1430" Text="I would recommend wandering down to your local Large Chain Bookstore (Borders, Barnes &amp; Noble, et cetera) and see if they have a copy of any of the books you are interested in. That way you can peruse them for yourself and hopefully get a better idea of whether or not a particular book would be good for you and your particular learning style. Amazon's &quot;Look Inside&quot; feature, if available for the books in question, may also allow you to do this to some extent.&#xD;&#xA;&#xD;&#xA;Personally, I'd be very cautious about buying a book that focuses on a specific API, largely because such books tend to go out of date relatively quickly and thus I don't see them to be as strong of an investment. I would thus suggest that you take a good look at all the freely-available online reference and educational material for cocos2d and game development in general (if you have not already, of course) and see if that is suitable enough for you. &#xD;&#xA;&#xD;&#xA;All of that having been said, I'm generally a fan of the O'Rielly books, however both of their iPhone books seem relatively old at this point. The Apress books have looked promising when I browsed them in stores, so that would be my secondary suggestion (the caveat being that I have not reviewed any of those books in detail and am basing this recommendation on my experience with the quality of the publisher's other material and quick flip-throughs of the books)." />
  <row Id="20510" PostHistoryTypeId="25" PostId="9881" RevisionGUID="5f6a323f-ecf5-457c-9e70-5e295debe263" CreationDate="2011-03-17T17:23:30.560" Comment="http://twitter.com/#!/StackGameDev/status/48434295114711040" />
  <row Id="20512" PostHistoryTypeId="2" PostId="9886" RevisionGUID="6715c388-0adb-4406-b59d-7f9c365e40f0" CreationDate="2011-03-17T18:28:52.673" UserId="6158" Text="You can set the enabled property to NO, which will disable that gesture recognizer, until you re-enable it.  If for some reason the recognizer is disabled while in the process of firing, it'll transition to its canceled state prior to being disabled." />
  <row Id="20513" PostHistoryTypeId="16" PostId="7496" RevisionGUID="67acc778-d03b-4dcd-a520-361fab2fcdb6" CreationDate="2011-03-17T18:46:37.417" UserId="51" />
  <row Id="20514" PostHistoryTypeId="16" PostId="9877" RevisionGUID="ec86b36d-ef84-4529-a7f7-fb800c3ff724" CreationDate="2011-03-17T18:46:37.417" UserId="51" />
  <row Id="20515" PostHistoryTypeId="16" PostId="9884" RevisionGUID="bcd426e0-a619-418a-8ffd-c05d85b191de" CreationDate="2011-03-17T18:46:37.417" UserId="51" />
  <row Id="20516" PostHistoryTypeId="16" PostId="7465" RevisionGUID="60cade8d-e9c4-42e5-a6d4-c2c19ae47e5e" CreationDate="2011-03-17T18:46:37.417" UserId="51" />
  <row Id="20517" PostHistoryTypeId="5" PostId="9883" RevisionGUID="03185133-1cb1-4101-98d1-78388f911849" CreationDate="2011-03-17T19:26:03.950" UserId="3794" Comment="edited body" Text="For fluids you don't need big resolution as the screen is. 2D (or 3D fluids) can be done in 1/2 without quality loss and 1/4 without significant quality loss. That is if linear interpolation is used(linear texture sampling). If cubic interpolation is implemented, you can go for even lower resolutions.&#xD;&#xA;&#xD;&#xA;Stable fluids can be computed on the CPU in interactive rates. It is todays' fashion to put everything on the gpu (and i love it), but 2D fluids can be very nicely handled on CPU. Autodesk maya fluid solver is single threaded (as whole maya (!)) and can handle aprox. 15*15*15 (3375) 3D fluids at realtime on todays CPU. So i'm not afraid about performance on any mobile platform if the simulation is only 2D.&#xD;&#xA;&#xD;&#xA;**How is this done?**  &#xD;&#xA;*First smoke:*   &#xD;&#xA;Density and speed is simulated. As you can see in slides you posted. Navier-Strokes equations can do the job. They can be quite simple or very complex (like Maya, where you can simulate density,temperature,pressure and fuel, with tons of setups). If you simulate only density and speed - you will get two 2D arrays. Speed (array of 2D vectors) and density (array of scalar). By rendering density as fullscreen texture you can get nice smoke (remember thay you can have 1/2 screen resolution without quality loss). I also suggest to use some simple &quot;Transfer function&quot;. It mean that value from density doesn't just move with opacity, but it can lookup in the color. &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;*And for the floating pictures:*&#xD;&#xA;You will do what Jari Komppa said. Every frame has input picture texture and for every pixel you read value from `(pixelPosition - SpeedVector)`. Speed vectors can be loaded as textures (red, green = x,y).&#xD;&#xA;Density still has to be simulated (even if it is not displayed) to have correct speed vectors.&#xD;&#xA;&#xD;&#xA;For fluid simulation on the gpu check this [link][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/XEkJz.jpg&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html" />
  <row Id="20518" PostHistoryTypeId="5" PostId="9863" RevisionGUID="31477e60-bee1-46de-8e93-0d9a2c73ca6d" CreationDate="2011-03-17T19:35:05.473" UserId="962" Comment="deleted 40 characters in body" Text="You don't want to find the closest point. &#xD;&#xA;&#xD;&#xA;You want to find the point on the lines where the distance is equal to the combined radii of both spheres.&#xD;&#xA;" />
  <row Id="20519" PostHistoryTypeId="2" PostId="9887" RevisionGUID="3cff7071-a4c9-48de-ac08-2e3e86c97573" CreationDate="2011-03-17T20:15:25.560" UserId="4585" Text="If I'm understanding your question correctly you can simply just use a Sphere vs Sphere intersection test, like AttackingHobo has suggested.&#xD;&#xA;&#xD;&#xA;The math to do such a test is as follows (correct me if I'm wrong, it's been awhile). Also, this is considering that your spheres have a center and a radius variable each.&#xD;&#xA;&#xD;&#xA;The formula for checking goes something like this:&#xD;&#xA;&#xD;&#xA;    distanceOfSpheres &lt;= sumOfRadii^2&#xD;&#xA;&#xD;&#xA;You have a sphere vs sphere intersection. This is pretty simple, let's see what it looks like in code!&#xD;&#xA;&#xD;&#xA;    bool sphereIntersectTest(BoundingSphere* s1, BoundingSphere* s2)&#xD;&#xA;    {&#xD;&#xA;       Vector3 distance;&#xD;&#xA;       &#xD;&#xA;       // Get the distance between each sphere, center is a Vector3 type&#xD;&#xA;       distance = (s1-&gt;center - s2-&gt; center);&#xD;&#xA;&#xD;&#xA;       // Determine the sum of both radii&#xD;&#xA;       float radii = (s1-&gt;radius + s2-&gt;radius);&#xD;&#xA;&#xD;&#xA;       // Determine if we have an intersection&#xD;&#xA;       if (distance.length &lt;= (radii * radii))&#xD;&#xA;          return true;&#xD;&#xA;       else&#xD;&#xA;          return false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Again, I think that this is the correct answer you may be looking for. If anyone knows that this is wrong please correct me, since it has been a while since I've done this math." />
  <row Id="20521" PostHistoryTypeId="2" PostId="9888" RevisionGUID="ffc97110-997c-44cb-97b2-76c8402f5335" CreationDate="2011-03-17T20:33:24.173" UserId="6161" Text="I say Mobile Lua rules, still experimental but open source and already looking good!&#xD;&#xA;&#xD;&#xA;http://mobilelua.googlecode.com&#xD;&#xA;&#xD;&#xA;best&#xD;&#xA;&#xD;&#xA;Axl&#xD;&#xA;" />
  <row Id="20522" PostHistoryTypeId="2" PostId="9889" RevisionGUID="a4834666-1954-4246-978c-262a352ae0ed" CreationDate="2011-03-17T20:37:36.870" UserId="1163" Text="This is by far the best ball to ball collision detection article I have come across.&#xD;&#xA;&#xD;&#xA;[Pool Hall Lessons: Fast, Accurate Collision Detection Between Circles or Spheres][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php" />
  <row Id="20523" PostHistoryTypeId="5" PostId="9879" RevisionGUID="f0c2a804-7ab0-4c60-bade-f5701ef3306d" CreationDate="2011-03-17T20:47:21.633" UserId="4688" Comment="grammar" Text="Due to your young age, i would give it for free and build a reputation for your self." />
  <row Id="20524" PostHistoryTypeId="2" PostId="9890" RevisionGUID="a337e343-9843-4bbf-8be9-947dfb7a6d16" CreationDate="2011-03-17T20:50:04.720" UserId="2100" Text="I recently deployed an applet that seems to require Java 6 Update 24. I assume the reason for this requirement is the matching JDK version I used to create the applet (I am new to Java).&#xD;&#xA;&#xD;&#xA;The fact that my applet requires a Java download/update for users who already have some version of Java installed is a big concern for me; the applets I'm creating slip into a web comic, so it's very disruptive. Having used the most recent version of Java, it seems as though I am able to assume that most of the readers I get will have to update Java to continue reading/playing.&#xD;&#xA;&#xD;&#xA;Is there a best practice concerning which version of Java to use to make the process of using an applet easy for end-users? Any reading material on this would be very helpful. Should I be using an older version of Java if I don't require new features? I am using Slick for 2D games." />
  <row Id="20525" PostHistoryTypeId="1" PostId="9890" RevisionGUID="a337e343-9843-4bbf-8be9-947dfb7a6d16" CreationDate="2011-03-17T20:50:04.720" UserId="2100" Text="What version of Java should I target for applets?" />
  <row Id="20526" PostHistoryTypeId="3" PostId="9890" RevisionGUID="a337e343-9843-4bbf-8be9-947dfb7a6d16" CreationDate="2011-03-17T20:50:04.720" UserId="2100" Text="&lt;java&gt;&lt;web&gt;&lt;slick&gt;&lt;applet&gt;" />
  <row Id="20527" PostHistoryTypeId="2" PostId="9891" RevisionGUID="5ea0c99a-e92d-4508-94f7-0a1df076a8b6" CreationDate="2011-03-17T20:56:14.460" UserId="6066" Text="Giving it for free would like you said, keep you from most legal obligations but if you put a very prominent donate button next to the download link I would guess many people that like the game would come back and make a donation.  If you really wanted to you could even put a non-obtrusive donate button somewhere in the game that would open up a web browser.  The most important thing though is to not have the donate buttons become annoying.&#xD;&#xA;&#xD;&#xA;Alternatively you could go for an Android market style approach where most of the game is free, but a purchased version has a couple more features that reward those that donate." />
  <row Id="20528" PostHistoryTypeId="2" PostId="9892" RevisionGUID="175de627-2f16-4bb1-95e2-0ca261a32e46" CreationDate="2011-03-17T21:29:47.067" UserId="5527" Text="Just guessing, haven't worked with FBX and been awhile since I used 3d Max but I work with a number of autodesk products and then generally use the same concepts for unit conversions.&#xD;&#xA;&#xD;&#xA;The UnitScaleFactor is used to translate the unit definition in the source (3D Max) file to the target (XNA) unit definition.&#xD;&#xA;&#xD;&#xA;So when the translation happens, the original unit amount is multiplied by the UnitScaleFactor to determine the correct size in the target. I would guess it should be 1 for your application since your unit definitions are the same in the source and target.&#xD;&#xA;&#xD;&#xA;You could, for example, define you units in 3D Max to 1 unit = 1 mm and UnitScaleFactor to 25.4 and your XNA would get the model in inches.&#xD;&#xA;&#xD;&#xA;Again, just a guess." />
  <row Id="20529" PostHistoryTypeId="2" PostId="9893" RevisionGUID="dd7da2c0-3d5d-48d3-a692-0df8a812a953" CreationDate="2011-03-17T21:36:27.753" UserId="6117" Text="I'm looking to create a multiplayer top down shooter. While i've read about different topics, i can see them i've got some real challenges ahead, but i'm all up for it. &#xD;&#xA;&#xD;&#xA;One thing i can't understand is how am i supposed to be protecting the game from people who try to create bots?&#xD;&#xA;&#xD;&#xA;What i mean is, as far as i understand, it's impossible to protect the network traffic in a way that players won't be able to create programs that listen to what's going on and understand it.&#xD;&#xA;&#xD;&#xA;So what worries me is that people can create bots that listen to the current location of rival players, and send communication that mimic as if the player is shooting in the exact &quot;perfect&quot; location to win that match.&#xD;&#xA;&#xD;&#xA;So what kind of techniques are used to protect real time games from such bots?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also i'd like to mention that i've tried searching for discussions (as this sounds like something many people struggle with), but couldn't find anything about it specifically, only as a part of broader questions about networking in real time games. If i should have looked harder feel free to put me in my place :)&#xD;&#xA;&#xD;&#xA;Thanks alot!" />
  <row Id="20530" PostHistoryTypeId="1" PostId="9893" RevisionGUID="dd7da2c0-3d5d-48d3-a692-0df8a812a953" CreationDate="2011-03-17T21:36:27.753" UserId="6117" Text="How to protect your real time online shooter from potential bots" />
  <row Id="20531" PostHistoryTypeId="3" PostId="9893" RevisionGUID="dd7da2c0-3d5d-48d3-a692-0df8a812a953" CreationDate="2011-03-17T21:36:27.753" UserId="6117" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;security&gt;" />
  <row Id="20532" PostHistoryTypeId="2" PostId="9894" RevisionGUID="a034ae90-cd87-4573-b0d4-3d6a3fc5ad00" CreationDate="2011-03-17T21:43:06.703" UserId="450" Text="Normally the main compatibility issues are between major versions. If you compile for Java 6, it will not run on Java 5 but throw an [java.lang.UnsupportedClassVersionError][1].&#xD;&#xA;&#xD;&#xA;So a program complied on Java 6 Update 24 is supposed to work on lower versions of Java 6. But there is a small risk that you invoke a method that was added in a minor release, resulting in a [java.lang.IncompatibleClassChangeError][2] or one of its subclasses. The chance for this to happen is really small, usually you get away without explicitly testing older versions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Stendhal][3] targets Java 6, but tries to be mostly compatible with Java 5. Over the last year the number of users with Java 5 has decreased a lot. I think that is because of the huge improvements Sun made to the automatic update of Java. It is now around 0.1% for us, so we are considering dropping support for Java 5 completely.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/6/docs/api/java/lang/UnsupportedClassVersionError.html&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/lang/ClassFormatError.html&#xD;&#xA;  [3]: http://stendhalgame.org" />
  <row Id="20533" PostHistoryTypeId="2" PostId="9895" RevisionGUID="e0131680-9613-4340-bcc2-4cc189d26b8e" CreationDate="2011-03-17T22:07:06.520" UserId="4410" Text="I wouldn't expect any of the big players to talk about what they do to protect their games. The less people know about what they're doing, the harder it is for people to work around it. I think part of what Steam does is look for certain applications running that are on a black list.&#xD;&#xA;&#xD;&#xA;Personally I'd try and encrypt and obfuscate communication as much as possible between communicating machines, it might be worth reading up on the way https/ssl works to get some ideas. If the hosts were to generate a random public/private keys and only send the public part out to other clients then something wouldn't easily be able to intercept and change the contents of the packages being sent, although if you have access to the client machine then nothing is completely secure.&#xD;&#xA;&#xD;&#xA;You'll also need to ensure that the client exe isn't tampered with." />
  <row Id="20534" PostHistoryTypeId="25" PostId="9893" RevisionGUID="a4106750-b37d-4d59-8017-e9a555f0868e" CreationDate="2011-03-17T23:23:32.060" Comment="http://twitter.com/#!/StackGameDev/status/48524898380939264" />
  <row Id="20535" PostHistoryTypeId="5" PostId="9893" RevisionGUID="69dddb67-dd33-4306-a85a-694940a65bd5" CreationDate="2011-03-18T00:47:12.813" UserId="1198" Comment="fixed &quot;i&quot;, removed thanks signiture" Text="I'm looking to create a multiplayer top down shooter. While I've read about different topics, I can see them I've got some real challenges ahead, but I'm all up for it. &#xD;&#xA;&#xD;&#xA;One thing I can't understand is how am I supposed to be protecting the game from people who try to create bots?&#xD;&#xA;&#xD;&#xA;What I mean is, as far as I understand, it's impossible to protect the network traffic in a way that players won't be able to create programs that listen to what's going on and understand it.&#xD;&#xA;&#xD;&#xA;So what worries me is that people can create bots that listen to the current location of rival players, and send communication that mimic as if the player is shooting in the exact &quot;perfect&quot; location to win that match.&#xD;&#xA;&#xD;&#xA;So what kind of techniques are used to protect real time games from such bots?&#xD;&#xA;&#xD;&#xA;Also I'd like to mention that I've tried searching for discussions (as this sounds like something many people struggle with), but couldn't find anything about it specifically, only as a part of broader questions about networking in real time games. If I should have looked harder feel free to put me in my place :)" />
  <row Id="20536" PostHistoryTypeId="24" PostId="9893" RevisionGUID="69dddb67-dd33-4306-a85a-694940a65bd5" CreationDate="2011-03-18T00:47:12.813" Comment="Proposed by 1198 approved by 51 edit id of 82" />
  <row Id="20537" PostHistoryTypeId="25" PostId="9890" RevisionGUID="31d4d5dc-3327-4823-8c65-c47fbdcb09d4" CreationDate="2011-03-18T02:23:31.643" Comment="http://twitter.com/#!/StackGameDev/status/48570195152879617" />
  <row Id="20538" PostHistoryTypeId="2" PostId="9896" RevisionGUID="3a9c2cc9-c8fe-41cb-872d-acfeaaccf6d8" CreationDate="2011-03-18T03:14:06.327" UserId="6103" Text="I'm putting together a simple 2d tile-based game.  I'm finding myself spinning circles on some design decisions, and I think I'm in danger of over-engineering.  After all, the game is simple enough that I had a working prototype inside of four hours with fewer than ten classes, it just wasn't scalable or flexible enough for a polished game.&#xD;&#xA;&#xD;&#xA;My question is about how to structure flow of control between game entity objects and their rendering objects.  Should each renderer have a reference to their entity or vice-versa?  Or both?  Should the entity be in control of calling the `render()` method, or be completely oblivious?&#xD;&#xA;&#xD;&#xA;I know there are several valid approaches here, but I'm kind of feeling decision paralysis.  What are the pros and cons of each approach?" />
  <row Id="20539" PostHistoryTypeId="1" PostId="9896" RevisionGUID="3a9c2cc9-c8fe-41cb-872d-acfeaaccf6d8" CreationDate="2011-03-18T03:14:06.327" UserId="6103" Text="Game world entities and their rendering objects" />
  <row Id="20540" PostHistoryTypeId="3" PostId="9896" RevisionGUID="3a9c2cc9-c8fe-41cb-872d-acfeaaccf6d8" CreationDate="2011-03-18T03:14:06.327" UserId="6103" Text="&lt;architecture&gt;&lt;rendering&gt;" />
  <row Id="20541" PostHistoryTypeId="4" PostId="9896" RevisionGUID="5934c197-daaa-46c6-be81-2e17372a941c" CreationDate="2011-03-18T03:32:45.717" UserId="6103" Comment="clarifying title a bit" Text="Structuring game world entities and their rendering objects" />
  <row Id="20542" PostHistoryTypeId="2" PostId="9897" RevisionGUID="d3b8ab87-0a02-479c-978c-cef343d794c3" CreationDate="2011-03-18T04:39:12.243" UserId="6165" Text="&#xD;&#xA;I like to become game developer.. i already worked as web developer for past 1 year . there i used php ,jquery,mysql and some frame work also .It's little boring now same thing again and again .So i start to learn android  application development .&#xD;&#xA;&#xD;&#xA;my question is :&#xD;&#xA;&#xD;&#xA; 1. if want to become a game developer  &#xD;&#xA;    what skills should i have (like&#xD;&#xA;    java,c++,etc) ?&#xD;&#xA;&#xD;&#xA; 2. Where can i get good tutorials(online) ?&#xD;&#xA;    &#xD;&#xA; 3. is previous knowledge will help  me ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please clarify me !&#xD;&#xA;&#xD;&#xA;     &#xD;&#xA;&#xD;&#xA;  " />
  <row Id="20543" PostHistoryTypeId="1" PostId="9897" RevisionGUID="d3b8ab87-0a02-479c-978c-cef343d794c3" CreationDate="2011-03-18T04:39:12.243" UserId="6165" Text="how can i prepare myself to become game developer" />
  <row Id="20544" PostHistoryTypeId="3" PostId="9897" RevisionGUID="d3b8ab87-0a02-479c-978c-cef343d794c3" CreationDate="2011-03-18T04:39:12.243" UserId="6165" Text="&lt;programming&gt;&lt;game-industry&gt;&lt;language-choice&gt;" />
  <row Id="20545" PostHistoryTypeId="2" PostId="9898" RevisionGUID="02368c83-d76f-4bab-bd0a-450141097480" CreationDate="2011-03-18T05:15:29.493" UserId="1198" Text="To answer your questions, with an Android flavor:&#xD;&#xA;&#xD;&#xA; 1. Knowledge of C++ will not hurt you, my theory is the more languages you know, the better, period. To develop for Android specifically, Java is important, since even with the NDK, you must use some Java.&#xD;&#xA; 2. This really is dependent on what you're looking for, specifically for Android, the article [here][1], has a lot of good getting started information.&#xD;&#xA; 3. Yes, good games will incorporate all kinds of knowledge. Strong math (trig,linera algebra, etc) is helpful. Your mysql experience will be useful for persiting game state to database, though Android uses [SQLite][2].&#xD;&#xA;&#xD;&#xA;All that said though, there are several similar type questions on this site, which are geared toward starting game development, which you should check out:&#xD;&#xA;&#xD;&#xA; 1. http://gamedev.stackexchange.com/questions/4011/getting-started-questions&#xD;&#xA; 2. http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games&#xD;&#xA; 3. http://gamedev.stackexchange.com/questions/3401/how-do-i-get-started-making-android-games&#xD;&#xA; 4. http://gamedev.stackexchange.com/questions/765/what-things-should-an-indie-game-developer-never-do&#xD;&#xA; 5. http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rbgrn.net/content/54-getting-started-android-game-development&#xD;&#xA;  [2]: http://developer.android.com/reference/android/database/sqlite/package-summary.html" />
  <row Id="20546" PostHistoryTypeId="2" PostId="9899" RevisionGUID="97547ad7-28ea-45c6-b91d-b847f00b5c03" CreationDate="2011-03-18T05:19:19.027" UserId="3212" Text="I would ask you to refer [this][1] site. It is the ultimate reference and eye opener for anyone who would like to become a game developer. Let us know if it is helpful to you. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sloperama.com/advice.html" />
  <row Id="20547" PostHistoryTypeId="25" PostId="9897" RevisionGUID="6fee4cef-5810-47ed-9588-ac5820257f5a" CreationDate="2011-03-18T05:23:31.720" Comment="http://twitter.com/#!/StackGameDev/status/48615494009364480" />
  <row Id="20548" PostHistoryTypeId="25" PostId="9896" RevisionGUID="15810638-f07f-4c0c-94ee-c8cdf3c9137e" CreationDate="2011-03-18T08:23:32.050" Comment="http://twitter.com/#!/StackGameDev/status/48660793704714240" />
  <row Id="20549" PostHistoryTypeId="2" PostId="9900" RevisionGUID="41ea7458-322d-43f5-838d-165d3dba450b" CreationDate="2011-03-18T08:36:06.673" UserId="2710" Text="There are two approaches to countering bots. They are client-side protection and server-side analysis. &#xD;&#xA;&#xD;&#xA;Client-side protection is the most obvious approach - brute force, in a sense. You make all efforts to ensure that the game client is fully legitimate, has not been tampered with, and no other programs affect it. Now this is a difficult problem, and impossible to fully solve. But many games try, and have some success with this method. I know there exist some ready-made solutions for client protection, and suggest you look for them. Implementing one yourself is a daunting task.&#xD;&#xA;&#xD;&#xA;In addition to being less then 100% effective, client-side protection has the drawback of being extremely annoying for your players. Usually it implies things like disabling alt-tab task switching, antivirus programs, etc.&#xD;&#xA;&#xD;&#xA;Server-side analysis is less intrusive. In this approach, you have some server code that analyses patterns in players' behavior. Most often, bots play demonstrably different. For example, human players have varying time between actions (such as shooting), and this time obeys a bell-curve distribution. Primitive bots will have constant time, or distributed evenly over some interval. Fun fact: using this method, we once caught a player with a _mechanical_ bot - a clever device that pushed buttons on his physical keyboard. Needless to say, not amount of client protection can catch _that_. Still, this analysis is not perfect. More advanced bots will fool your systems, and the more checks you implement, the more advanced bots would become.&#xD;&#xA;&#xD;&#xA;For best protection, you can combine both these methods. Client protection will make it harder to develop bots, and server analysis will stop simple bots that were developed quickly. But whatever you do, you can never stop bots entirely. Well, unless you send your representatives to players' homes, to supervise their playing and report violations. (Which is not unheard of, by the way. I've definitely read a story about online poker company sending people to a very successful player's home, to confirm he was playing legitimately. But I can't seem to find it now.)&#xD;&#xA;&#xD;&#xA;There are two more dubious recommendations for fighting bots. One, encrypt your network traffic. I don't think this is gonna work. With your client in the hands of an enemy, traffic can be and will be decrypted... or you own client will be used for encryption. On the other hand, encryption adds lag, and that is really bad for a &quot;real-time shooter&quot;. Second recommendation is &quot;just design your game around this&quot;. While this seems like a sound idea, I've yet to see a single game that managed this." />
  <row Id="20550" PostHistoryTypeId="2" PostId="9901" RevisionGUID="da9e058b-5a84-4e8b-af56-2db5d3c0d549" CreationDate="2011-03-18T09:48:49.390" UserId="4308" Text="How should I go about implementing &quot;natural&quot; magnet on a certain body in chipmunk space? Context is of simple bodies lying in the space (think chessboard). When one of the figures is activated as a magnet - others should start moving towards it.&#xD;&#xA;&#xD;&#xA;Currently I'm applying force (`cpBodyApplyForce`)to the other figures with vector calculated towards the activated figure. However this doesn't really feel &quot;natural&quot;. Are there any known algorithms for imitating magnets?" />
  <row Id="20551" PostHistoryTypeId="1" PostId="9901" RevisionGUID="da9e058b-5a84-4e8b-af56-2db5d3c0d549" CreationDate="2011-03-18T09:48:49.390" UserId="4308" Text="Pseudo-magnet implementation with chipmunk" />
  <row Id="20552" PostHistoryTypeId="3" PostId="9901" RevisionGUID="da9e058b-5a84-4e8b-af56-2db5d3c0d549" CreationDate="2011-03-18T09:48:49.390" UserId="4308" Text="&lt;2d-physics&gt;&lt;chipmunk&gt;" />
  <row Id="20553" PostHistoryTypeId="2" PostId="9902" RevisionGUID="955db790-2c58-427c-80a4-c749533bf446" CreationDate="2011-03-18T10:00:21.920" UserId="5973" Text="I would recommend using this method : [Motion Blur as a Post-Processing Effect][1]&#xD;&#xA;&#xD;&#xA;Very simple to implement, it's the one I used in my glsl demo Ruin island [[link]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=Gj4vvlWuL8E" />
  <row Id="20554" PostHistoryTypeId="2" PostId="9903" RevisionGUID="5496e2e2-6916-4b10-b9df-1ab568521ce2" CreationDate="2011-03-18T10:12:52.460" UserId="6169" Text="Theoretically, if you don't want to require anyone to download a new JVM if they already have one, you must target Java 1.0.&#xD;&#xA;Realistically, you can probably expect most if not all of your visitors to have a 1.4 JVM at least, a 1.5 or newer most likely.&#xD;&#xA;&#xD;&#xA;btw. if you compiled with 1.6.0_24 it would run fine on any 1.6 JVM, not require a JVM update.&#xD;&#xA;&#xD;&#xA;Personally, I'd not bother targeting a 1.4 or earlier JVM any longer. Those are out of support by Oracle (formerly Sun), and users should upgrade anyway (and will be forced to when visiting some other website if not yours that uses applets).&#xD;&#xA;" />
  <row Id="20555" PostHistoryTypeId="2" PostId="9904" RevisionGUID="d00cbed1-a480-49ef-b987-193c94aac83a" CreationDate="2011-03-18T10:17:44.237" UserId="6169" Text="Tank sleep. If you thought 60 hour workweeks were bad before, they'll be distant memories of the easy times pretty soon.&#xD;&#xA;&#xD;&#xA;Also, define &quot;game developer&quot;. The majority of any programming job is grunt work, programming the bread and butter stuff.&#xD;&#xA;The job &quot;game developer&quot; might appear glamorous to you from a distance, but it's just another programming job (you sound like a junior programmer).&#xD;&#xA;The only difference is that you're programming what happens to a sprite moving across a screen rather than an algorithm to calculate some business data." />
  <row Id="20556" PostHistoryTypeId="2" PostId="9905" RevisionGUID="5e52a984-349b-43fa-844e-121e0e77dbac" CreationDate="2011-03-18T10:26:56.083" UserId="744" Text="It's been a while since I did magnets, but I believe that &lt;a href=&quot;http://en.wikipedia.org/wiki/Force_between_magnets#Force_between_two_magnetic_poles&quot;&gt;the equation you want is the naive model of the force between two poles&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;    def force(a, b):&#xD;&#xA;        magnitude = a.magnitude * b.magnitude&#xD;&#xA;        separation_sq = distance_squared(a.position, b.position)&#xD;&#xA;        return (permeability * magnitude) / (4 * pi * separation_sq)&#xD;&#xA;&#xD;&#xA;For your purposes, you can probably fix `permeability` at 4 * pi and tweak only the per-object magnitudes to get the feel you want, simplifying the equation:&#xD;&#xA;&#xD;&#xA;    def force(a, b):&#xD;&#xA;        magnitude = a.magnitude * b.magnitude&#xD;&#xA;        separation_sq = distance_squared(a.position, b.position)&#xD;&#xA;        return magnitude / separation_sq&#xD;&#xA;&#xD;&#xA;The important part is that the force varies inversely with the square of the distance between the objects." />
  <row Id="20557" PostHistoryTypeId="2" PostId="9906" RevisionGUID="040bdf20-6e40-4f28-b9fd-93046029f0ab" CreationDate="2011-03-18T10:45:02.310" UserId="6169" Text="And ask yourself the all important question of whether it's worth the trouble.&#xD;&#xA;Cheaters and botters can do 2 things:&#xD;&#xA;&#xD;&#xA; 1. destroy the game for themselves. They can't play without the bot, they quickly loose interest and leave because it's no fun.&#xD;&#xA; 2. destroy the game for others. They become overly powerful through their bot, thus costing you customers. This is usually accompanied by a single player controlling multiple bots from the same physical computer (or uses far more computers than a single player can be expected to control manually).&#xD;&#xA;&#xD;&#xA;The two aren't mutually exclusive of course.&#xD;&#xA;&#xD;&#xA;Usually then the biggest problem is 3+ (as a human being can with training use 2 keyboards or other input devices at the same time, but not more as he only has 2 hands) clients from the same or closely related ip addresses (or MAC addresses) acting in direct unison, executing commands within milliseconds of each other.&#xD;&#xA;So if you detect say 5 clients originating from the same ip address all giving commands at an abnormally high rate and at abnormally close coordination, you likely have found your botter.&#xD;&#xA;Usually this'll be most damaging in pvp scenarios where this bot army can dominate an engagement against a similar number of human controlled toons due to its higher coordination and speed.&#xD;&#xA;In pve scenarios, typically there's limited damage to the game (except in that it allows one person to train multiple toons to high levels more quickly, a typical characteristic of powerleveller companies, a constant scourge in the mmo industry)." />
  <row Id="20558" PostHistoryTypeId="2" PostId="9907" RevisionGUID="783f11b6-4ef1-4eff-bf6c-576b16533782" CreationDate="2011-03-18T11:01:01.343" UserId="6169" Text="Why would you prevent players from cheating themselves (which cheating in a single player game amounts to)?&#xD;&#xA;In a multiplayer environment, it's the server's task to detect unnatural changes and counter them (typically by either ignoring the input or blocking the culprit out from the server completely), but in a single player environment there's nothing happening except the cheater is doing himself a disservice.&#xD;&#xA;&#xD;&#xA;IOW, unless you're creating a multiplayer game it's a waste of money, and if you are you're thinking of hardening the wrong place." />
  <row Id="20559" PostHistoryTypeId="25" PostId="9901" RevisionGUID="1e86dfed-5787-48ad-a6f0-c49757f55480" CreationDate="2011-03-18T11:23:31.490" Comment="http://twitter.com/#!/StackGameDev/status/48706090006888448" />
  <row Id="20560" PostHistoryTypeId="2" PostId="9908" RevisionGUID="358f8ecc-0a47-4308-8813-6a85ea852491" CreationDate="2011-03-18T12:32:07.957" UserId="5983" Text="I am thinking of the best way to structure my project and was thought a MVC style pattern would be appropriate. Would it be appropriate to call the Controller the Game Engine?&#xD;&#xA;&#xD;&#xA;Are there any standardised patterns recommended for simple game development? &#xD;&#xA;&#xD;&#xA;Model&#xD;&#xA;&#xD;&#xA; - Data: Level Design, Chat feeds, etc&#xD;&#xA; - Game Status: Player status, Enemy status, World Status etc etc.&#xD;&#xA;&#xD;&#xA;View&#xD;&#xA;&#xD;&#xA; - 3D: Gameplay&#xD;&#xA; - 2D: UI etc&#xD;&#xA;&#xD;&#xA;Game Engine:&#xD;&#xA;&#xD;&#xA; - Player Input&#xD;&#xA; - UI Input&#xD;&#xA; - Physics&#xD;&#xA; - Collisions&#xD;&#xA; - AI&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20561" PostHistoryTypeId="1" PostId="9908" RevisionGUID="358f8ecc-0a47-4308-8813-6a85ea852491" CreationDate="2011-03-18T12:32:07.957" UserId="5983" Text="Model - View - Game Engine ? patterns for game development?" />
  <row Id="20562" PostHistoryTypeId="3" PostId="9908" RevisionGUID="358f8ecc-0a47-4308-8813-6a85ea852491" CreationDate="2011-03-18T12:32:07.957" UserId="5983" Text="&lt;best-practices&gt;&lt;design-patterns&gt;&lt;framework&gt;" />
  <row Id="20563" PostHistoryTypeId="2" PostId="9909" RevisionGUID="1f217623-fc6d-4038-88be-398f41bc1331" CreationDate="2011-03-18T12:53:59.427" UserId="1829" Text="I'm in this private school right now, and apart from my progressive stoppage of anti-depressants, I'm having an hard time focusing on what the school wants me to do.&#xD;&#xA;&#xD;&#xA;The school has a professional contract for a game we have to do with Unity. I don't really learn anything new while using unity, so I don't like using it.&#xD;&#xA;&#xD;&#xA;We recently learned how to use DirectX, and we have to do some sort of Gradius-precursor clone (Parsec) with directX, in 3D: this annoys me, and I'm currently learning to use Ogre3D by myself by making some game.&#xD;&#xA;&#xD;&#xA;The teacher is an engineer, and all of us won't be engineers.&#xD;&#xA;&#xD;&#xA;How would you teach game programming ?" />
  <row Id="20564" PostHistoryTypeId="1" PostId="9909" RevisionGUID="1f217623-fc6d-4038-88be-398f41bc1331" CreationDate="2011-03-18T12:53:59.427" UserId="1829" Text="How to teach game programming at school ?" />
  <row Id="20565" PostHistoryTypeId="3" PostId="9909" RevisionGUID="1f217623-fc6d-4038-88be-398f41bc1331" CreationDate="2011-03-18T12:53:59.427" UserId="1829" Text="&lt;learning&gt;" />
  <row Id="20566" PostHistoryTypeId="2" PostId="9910" RevisionGUID="9c73e08a-8ed4-4035-ad7f-0308de7a65af" CreationDate="2011-03-18T12:55:20.660" UserId="659" Text="Research the known cheating tools - and frequently check whether any of the most common ones are detected running (check process names?)&#xD;&#xA;&#xD;&#xA;If any are detected, let the player cheat (if offline, it's harmless), but make sure no scores/acheivements will be posted to any online leaderboard/acheivement system - just make it silently fail?&#xD;&#xA;&#xD;&#xA;Won't stop more determined hackers, but will reduce the chance of more casual cheats messing up your leaderboards.&#xD;&#xA;&#xD;&#xA;(Might annoy coders that have dev tools open and minimized for legit purposes and are taking a gaming break, though...)" />
  <row Id="20567" PostHistoryTypeId="5" PostId="9897" RevisionGUID="2bf2523d-da5b-4e4e-98c6-68f88b6703c2" CreationDate="2011-03-18T13:07:23.497" UserId="1198" Comment="Tried to make it readable, fixed &quot;i&quot;" Text="I like to become game developer.. I already work as web developer for the past year. There I used php, jQuery, mysql and some framework also. It's little boring now same thing again and again. So I start to learn Android application development.&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA;&#xD;&#xA; 1. If want to become a game developer  &#xD;&#xA;    what skills should I have (like&#xD;&#xA;    java, c++, etc) ?&#xD;&#xA;&#xD;&#xA; 2. Where can I get good tutorials (online)?&#xD;&#xA;    &#xD;&#xA; 3. Is previous knowledge will help me?&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;  " />
  <row Id="20568" PostHistoryTypeId="4" PostId="9897" RevisionGUID="2bf2523d-da5b-4e4e-98c6-68f88b6703c2" CreationDate="2011-03-18T13:07:23.497" UserId="1198" Comment="Tried to make it readable, fixed &quot;i&quot;" Text="How can I prepare myself to become game developer" />
  <row Id="20569" PostHistoryTypeId="24" PostId="9897" RevisionGUID="2bf2523d-da5b-4e4e-98c6-68f88b6703c2" CreationDate="2011-03-18T13:07:23.497" Comment="Proposed by 1198 approved by 189 edit id of 83" />
  <row Id="20570" PostHistoryTypeId="5" PostId="9908" RevisionGUID="fbe1bbd1-bf78-47e4-98f2-5b117036b15d" CreationDate="2011-03-18T13:18:54.620" UserId="5983" Comment="added 64 characters in body; edited title" Text="I am thinking of the best way to structure my project and was thought a MVC style pattern would be appropriate. Would be correct having the model handle the majority and basically being the game engine?&#xD;&#xA;&#xD;&#xA;Are there any standardised patterns recommended for simple game development? &#xD;&#xA;&#xD;&#xA;Model / Game Engine&#xD;&#xA;&#xD;&#xA; - Data: Level Design, Chat feeds, etc&#xD;&#xA; - Game Status: Player status, Enemy status, World Status etc etc.&#xD;&#xA; - Engine: Physics, Collisions, AI&#xD;&#xA;&#xD;&#xA;View&#xD;&#xA;&#xD;&#xA; - 3D: Gameplay, Camera, Rendering...&#xD;&#xA; - 2D: UI etc&#xD;&#xA;&#xD;&#xA;Controller:&#xD;&#xA;&#xD;&#xA; - Player Input&#xD;&#xA; - UI Input&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20571" PostHistoryTypeId="4" PostId="9908" RevisionGUID="fbe1bbd1-bf78-47e4-98f2-5b117036b15d" CreationDate="2011-03-18T13:18:54.620" UserId="5983" Comment="added 64 characters in body; edited title" Text="MVC? patterns for game development?" />
  <row Id="20572" PostHistoryTypeId="25" PostId="9908" RevisionGUID="5d269cdf-a5a6-497a-b1f4-6b2e32983e79" CreationDate="2011-03-18T14:23:31.880" Comment="http://twitter.com/#!/StackGameDev/status/48751390075527168" />
  <row Id="20573" PostHistoryTypeId="2" PostId="9911" RevisionGUID="630f6be0-4801-4552-9caf-384c19189280" CreationDate="2011-03-18T14:43:06.870" UserId="189" Text="The big problem is that many people don't enjoy programming enough to warrant learning to use DirectX or OpenGL. Also you shouldn't (always) reinvent the wheel; even when using something like Ogre3D, you're a long way from having the basics of Unity implemented. It's easier to start with Unity and introduce them to Unity scripting, and they will have more fun with it.&#xD;&#xA;&#xD;&#xA;I am of the opinion that something like Unity or Game Maker should be taught first. Game programming is basically segregated into several sub-categories: game scripting (possibly including AI scripting), engine programming, tools programming. The easiest and most fun of these is game scripting, which would be what you do in Unity, Game Maker, etc.&#xD;&#xA;&#xD;&#xA;You are obviously more interested in engine programming (or just low-level game development, whatever category that fits in - all of them?) but I don't believe that's the universal way to teach game programming.&#xD;&#xA;&#xD;&#xA;So to directly answer your question, **teach game programming by starting with game scripting in an existing engine and toolkit such as Unity, because this will appeal to the most people. Those that want to dive deeper (lower-level) can then be introduced to DirectX/OpenGL/Ogre3D.**" />
  <row Id="20574" PostHistoryTypeId="2" PostId="9912" RevisionGUID="d65c31fb-db12-4ce7-970a-91460e5e0256" CreationDate="2011-03-18T15:25:29.877" UserId="5768" Text="Java se6 has been around for a while but there are very few resources on it so if you can develop for java five with books like killer game programming in java and developing games in java then you should be fine as they're written for java se5 and considered best in their fields.&#xD;&#xA;&#xD;&#xA;Also, if you're using slick2d I think most of it will work with java 5 without any interactions so I would say aim for java 5.&#xD;&#xA;&#xD;&#xA;Another thing to consider is that java updates automatically and if the user has java 4+ they would have upgraded to java 6." />
  <row Id="20575" PostHistoryTypeId="2" PostId="9913" RevisionGUID="2bcbb101-ca03-4e4f-ab18-15a1e8900af9" CreationDate="2011-03-18T15:29:24.913" UserId="5768" Text="If you're looking for best practice then you should check out some of the generic massively multiplayer games books." />
  <row Id="20576" PostHistoryTypeId="2" PostId="9914" RevisionGUID="358c3c2e-f64e-429d-993e-e058ab1b1ac2" CreationDate="2011-03-18T15:31:31.727" UserId="6172" Text="Design your game so that team work and actual intelligent decisions are more important than being able to aim perfectly.  It becomes exponentially harder to make decent bots." />
  <row Id="20577" PostHistoryTypeId="5" PostId="9908" RevisionGUID="6953de34-0d25-4ceb-9ded-62870705ec8c" CreationDate="2011-03-18T15:52:09.433" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [MVC-like compartmentalization in games?](http://gamedev.stackexchange.com/questions/5372/mvc-like-compartmentalization-in-games)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am thinking of the best way to structure my project and was thought a MVC style pattern would be appropriate. Would be correct having the model handle the majority and basically being the game engine?&#xD;&#xA;&#xD;&#xA;Are there any standardised patterns recommended for simple game development? &#xD;&#xA;&#xD;&#xA;Model / Game Engine&#xD;&#xA;&#xD;&#xA; - Data: Level Design, Chat feeds, etc&#xD;&#xA; - Game Status: Player status, Enemy status, World Status etc etc.&#xD;&#xA; - Engine: Physics, Collisions, AI&#xD;&#xA;&#xD;&#xA;View&#xD;&#xA;&#xD;&#xA; - 3D: Gameplay, Camera, Rendering...&#xD;&#xA; - 2D: UI etc&#xD;&#xA;&#xD;&#xA;Controller:&#xD;&#xA;&#xD;&#xA; - Player Input&#xD;&#xA; - UI Input&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20578" PostHistoryTypeId="10" PostId="9908" RevisionGUID="b8e3fcc8-507e-48ca-a049-47e372bd4558" CreationDate="2011-03-18T15:52:09.340" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="20579" PostHistoryTypeId="2" PostId="9915" RevisionGUID="aa74bade-b415-4e3e-9599-8cb3481b99d4" CreationDate="2011-03-18T15:56:12.633" UserId="1430" Text="Assuming your &quot;game entity&quot; is a thing full of all sorts of game-specific bits (like health or a set of weapons or whatever), I would prefer an approach where the game entities know nothing about the renderer, as well as the other way around. Instead, you have a higher level bit of code in your primary loop which knows about both subsystems collect together all the game entities and create a bunch of render objects (or reuse cached ones, etc) based on the properties of the game objects. You then submit this list of render objects to the renderer itself. At its purest form this might look like:&#xD;&#xA;&#xD;&#xA;    while(!finishedPlayingTheGame) {&#xD;&#xA;      GatherInput();&#xD;&#xA;      &#xD;&#xA;      // In practice this may do culling based on the collision world or whatnot&#xD;&#xA;      // to remove objects that shouldn't be seen according to the game logic.&#xD;&#xA;      List&lt;GameObject&gt; gameObjects = UpdateGameObjects();&#xD;&#xA;&#xD;&#xA;      List&lt;RenderObject&gt; renderObjects = CreateRenderObjectDescriptions(gameObjects);&#xD;&#xA;      renderer.Enqueue(renderObjects)&#xD;&#xA;      renderer.Draw()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;An advantage to this approach is a much higher isolation between the game and render logic; the disadvantage is the extra post-processing of the game objects into render descriptions. &#xD;&#xA;&#xD;&#xA;In practice, you can alleviate the algorithmic overhead of that second processing pass by pushing the creation/configuration of a render object for a given game object into the loop that iterates the game objects and updates them. This typically doesn't introduce that much coupling between the logic and render subsystems.&#xD;&#xA;&#xD;&#xA;If you are taking a component-focused approach that supports extensible aggregation of behavior into game objects, you can have the renderer publish a component that can be attached to each game object that configures its render object. This can allow for more extensible customization (via, for example, scripts -- which is probably overkill for this project).&#xD;&#xA;&#xD;&#xA;What I think you should *not* do is directly have game objects a &quot;render myself&quot; method, because I think this creates scalability problems in terms of reconfiguring rendering techniques and styles (it can be much harder to have different classes of object share render configuration code this way). Plus it tightly couples the two subsystems and creates additional responsibilities for the game object interface (interfaces should ideally have one responsibility)." />
  <row Id="20580" PostHistoryTypeId="2" PostId="9916" RevisionGUID="f2d690df-c50e-460b-9fe1-423e59efcd8b" CreationDate="2011-03-18T16:22:01.743" UserId="6173" Text="I'm new to games programming and am wondering what tactics do games use to load and update displays. Does a game initialise the whole map, every entity and object? Or, what methods do games use to decide whether something should be somewhere when the camera moves within view." />
  <row Id="20581" PostHistoryTypeId="1" PostId="9916" RevisionGUID="f2d690df-c50e-460b-9fe1-423e59efcd8b" CreationDate="2011-03-18T16:22:01.743" UserId="6173" Text="What is the general strategy to load and update game data(entities/map)." />
  <row Id="20582" PostHistoryTypeId="3" PostId="9916" RevisionGUID="f2d690df-c50e-460b-9fe1-423e59efcd8b" CreationDate="2011-03-18T16:22:01.743" UserId="6173" Text="&lt;opengl&gt;" />
  <row Id="20585" PostHistoryTypeId="5" PostId="9916" RevisionGUID="b02f2066-d8ad-49b3-87a6-b04bfc495057" CreationDate="2011-03-18T16:38:15.223" UserId="6173" Comment="deleted 104 characters in body" Text="I'm new to games programming and am wondering what tactics games use to pre-load entity and map data. Will a game initialise with the fundamental map data stored in memory?" />
  <row Id="20586" PostHistoryTypeId="6" PostId="9916" RevisionGUID="a465e12f-2292-4f15-82bb-4ad2f5e943db" CreationDate="2011-03-18T16:40:33.853" UserId="1156" Comment="edited tags" Text="&lt;loading&gt;&lt;maps&gt;&lt;data&gt;" />
  <row Id="20587" PostHistoryTypeId="4" PostId="9916" RevisionGUID="d473afe2-9054-41bc-be75-fb9b9bc84cbd" CreationDate="2011-03-18T16:41:21.243" UserId="6173" Comment="edited title" Text="What is the general strategy to pre-load game data(entities/map)." />
  <row Id="20588" PostHistoryTypeId="2" PostId="9918" RevisionGUID="021a37f7-2d5b-40d3-b2ca-f5360002b49d" CreationDate="2011-03-18T16:52:02.183" UserId="1198" Text="I'd say this really depends on what type of game you're making, but some general points.&#xD;&#xA;&#xD;&#xA; 1. Only load what you absolutly need, immediatly, or you **know** you'll need soon&#xD;&#xA; 2. Only remove things from memory when you absolutly know you wont need them again AND you need to load something that fits constraints of #1 AND you've reached your memory limit&#xD;&#xA; 3. A general understanding of Paging and Virtual Memory of Operating Systems can be applied to games in terms of when to remove data from memory -- that is to say, those ideas can be applied to game systems because many games have &quot;OS like&quot; requirements (fast, direct access to memory, input, and network devices)" />
  <row Id="20589" PostHistoryTypeId="2" PostId="9919" RevisionGUID="a53784ff-cc10-4040-912e-3edba2944786" CreationDate="2011-03-18T17:07:31.887" UserId="6174" Text="In Unity 3D, the easiest way is to have the first person controller. Usually the character has to jump up if the step height is higher than the step offset. But another way to do it is add a box collider and rotate it so that the character can skim the stairs easily, as if it were a ramp." />
  <row Id="20590" PostHistoryTypeId="25" PostId="9916" RevisionGUID="3f474699-52bf-42bf-91b8-8e2d27414bca" CreationDate="2011-03-18T17:23:32.817" Comment="http://twitter.com/#!/StackGameDev/status/48796692753027072" />
  <row Id="20591" PostHistoryTypeId="2" PostId="9920" RevisionGUID="e347f2e8-5b10-46dd-958b-73bcb6e1dd50" CreationDate="2011-03-18T17:27:03.537" UserId="4947" Text="I am looking for some books, articles or tutorials about graphics architecture and graphics pipeline optimizations. It shouldn't be too old (2008 or newer) - the newer, the better. &#xD;&#xA;&#xD;&#xA;I have found something in [Optimising the Graphics Pipeline, NVIDIA, Koji Ashida] - too old, [Real-time rendering, Akenine Moller], [OpenGL Bindless Extensions, NVIDIA, Jeff Bolz], [Efficient multifragment effects on graphics processing units, Louis Frederic Bavoil] and some internet discussions. But there is not too much information and I want to read more.&#xD;&#xA;&#xD;&#xA;It should contain something about application, driver, memory and shader units communication and data transfers. About vertices and attributes. Also pre and post T&amp;L cache (if they still exist in nowadays architectures) etc. I don't need anything about textures, frame buffers and rasterization.&#xD;&#xA;&#xD;&#xA;It can also be about OpenGL (not about DirecX) and optimizing extensions (not old extensions like VBOs, but newer like vertex_buffer_unified_memory).&#xD;&#xA;&#xD;&#xA;Thanks to all, who will help." />
  <row Id="20592" PostHistoryTypeId="1" PostId="9920" RevisionGUID="e347f2e8-5b10-46dd-958b-73bcb6e1dd50" CreationDate="2011-03-18T17:27:03.537" UserId="4947" Text="Looking for literature about graphics pipeline optimization" />
  <row Id="20593" PostHistoryTypeId="3" PostId="9920" RevisionGUID="e347f2e8-5b10-46dd-958b-73bcb6e1dd50" CreationDate="2011-03-18T17:27:03.537" UserId="4947" Text="&lt;opengl&gt;&lt;architecture&gt;&lt;graphics&gt;&lt;optimization&gt;&lt;pipeline&gt;" />
  <row Id="20594" PostHistoryTypeId="2" PostId="9921" RevisionGUID="2c225fa9-ac70-4ffc-b91a-9c25c7bf1b1a" CreationDate="2011-03-18T17:31:16.507" UserId="2913" Text="I am currently developing a Flash game and am planning on a large amount of graphics and audio assets, which has led to some questions about Flash game size.&#xD;&#xA;&#xD;&#xA; 1. By looking at some of the popular games on [NG][1], there seem to be many in the 5-10Mb and a few in the 10-25Mb range. I was wondering if anyone knew of other notable large-scale games and what their sizes were, and if there have been any cases of games being disadvantaged because of their size.&#xD;&#xA; 2. What is a common distribution of game size between code, graphics and audio? I know this can vary strongly, but I would like to hear your thoughts on an average case for a high-quality game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.newgrounds.com/portal/" />
  <row Id="20595" PostHistoryTypeId="1" PostId="9921" RevisionGUID="2c225fa9-ac70-4ffc-b91a-9c25c7bf1b1a" CreationDate="2011-03-18T17:31:16.507" UserId="2913" Text="Flash game size and distribution between asset types" />
  <row Id="20596" PostHistoryTypeId="3" PostId="9921" RevisionGUID="2c225fa9-ac70-4ffc-b91a-9c25c7bf1b1a" CreationDate="2011-03-18T17:31:16.507" UserId="2913" Text="&lt;graphics&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;audio&gt;&lt;source-code&gt;" />
  <row Id="20597" PostHistoryTypeId="2" PostId="9922" RevisionGUID="bd78ea09-5a85-462a-a152-d79db44ecf22" CreationDate="2011-03-18T17:35:35.230" UserId="6175" Text="I am a 19 year old who has always been interested in video &amp; computer games. I developed the interested for game programming about three months ago and started researching on the profession. The only degrees always suggested on the internet and in books are those of computer science, physics, mathematics, &amp; game development. BSc Information Technology has been my major for the past two years; and even though my university teaches we the I.T. students computer programming (in c++, c#, java) and offers us the opportunity to undertake some computer science courses of our choice in addition to the regular I.T. courses, I am feeling insecure about my prospects in getting into the profession. My question is: Will a game development company hire me if I exhibit good math, physics and game programming skills with an I.T. degree? If NO, will I have to obtain an MSc in a much more related course." />
  <row Id="20598" PostHistoryTypeId="1" PostId="9922" RevisionGUID="bd78ea09-5a85-462a-a152-d79db44ecf22" CreationDate="2011-03-18T17:35:35.230" UserId="6175" Text="I.T. degree for game programming?" />
  <row Id="20599" PostHistoryTypeId="3" PostId="9922" RevisionGUID="bd78ea09-5a85-462a-a152-d79db44ecf22" CreationDate="2011-03-18T17:35:35.230" UserId="6175" Text="&lt;education&gt;" />
  <row Id="20600" PostHistoryTypeId="2" PostId="9923" RevisionGUID="86417c71-c55b-4d18-b436-8141f241ba31" CreationDate="2011-03-18T17:47:30.973" UserId="2332" Text="Short answer, yes.&#xD;&#xA;&#xD;&#xA;Long answer:  &#xD;&#xA;Computer Science degrees do have an advantage over I.T. degrees to a certain extent, since they teach more about data structures, algorithms, time and memory complexity, etc. However, if you spend enough time working on these yourself, then you'll be fine. The main thing to work on is your coding ability. Make a demo, work on your portfolio and brush up your maths. As long as you've got the skills necessary for whichever job you're applying for, the degree that you do doesn't really matter.&#xD;&#xA;&#xD;&#xA;It could also potentially show that you're willing to go above and beyond since most of this will probably be done in your own time. If you do have the opportunity to take some data structures, algorithms or programming classes, by all means take it :)&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="20601" PostHistoryTypeId="2" PostId="9924" RevisionGUID="5049ccdb-3585-474e-853d-d3baedd76232" CreationDate="2011-03-18T17:53:23.400" UserId="554" Text="I'm looking for a fast opensource C++ math-library for my game engine&#xD;&#xA;with the following features:&#xD;&#xA;&#xD;&#xA; - fast (sse?)&#xD;&#xA; - vectors &#xD;&#xA; - matrices &#xD;&#xA; - quaternions&#xD;&#xA;&#xD;&#xA;suitable for both opengl and directx" />
  <row Id="20602" PostHistoryTypeId="1" PostId="9924" RevisionGUID="5049ccdb-3585-474e-853d-d3baedd76232" CreationDate="2011-03-18T17:53:23.400" UserId="554" Text="Best C++ Math Library for Game Engine?" />
  <row Id="20603" PostHistoryTypeId="3" PostId="9924" RevisionGUID="5049ccdb-3585-474e-853d-d3baedd76232" CreationDate="2011-03-18T17:53:23.400" UserId="554" Text="&lt;c++&gt;&lt;math&gt;" />
  <row Id="20604" PostHistoryTypeId="2" PostId="9925" RevisionGUID="e7e6f3f2-e241-429d-8fe6-bbd6a70630ed" CreationDate="2011-03-18T17:54:58.063" UserId="1156" Text="A short answer, based purely off what I've read here/logical thought:&#xD;&#xA;&#xD;&#xA;As long as your portfolio is of good quality and you can prove your worth in a programming environment (and don't need tons of sleep ;) ), you should be fine. However, be warned your application may be skipped over because you would appear as an IT student rather than a CS student, and they could assume you lack the ability (and you just think programming would be cool)." />
  <row Id="20605" PostHistoryTypeId="2" PostId="9926" RevisionGUID="f1f72a49-428c-4b53-84f8-ee37f1ba1149" CreationDate="2011-03-18T17:57:25.267" UserId="1156" Text="These are all free.&#xD;&#xA;&#xD;&#xA;[GPU Gems 1][1]  &#xD;&#xA;[GPU Gems 2][2]  &#xD;&#xA;[GPU Gems 3][3]  &#xD;&#xA;&#xD;&#xA;[The Graphics Programming Black Book][4]  &#xD;&#xA;[ShaderX][5]&#xD;&#xA;&#xD;&#xA;EDIT: I misread your question. I feel the most useful one here will be the Black Book, though you might find some use in the others.&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems/gpugems_part01.html&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems2/gpugems2_part01.html&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems3/gpugems3_part01.html&#xD;&#xA;  [4]: http://www.gamedev.net/reference/articles/article1698.asp&#xD;&#xA;  [5]: http://tog.acm.org/resources/shaderx/" />
  <row Id="20606" PostHistoryTypeId="2" PostId="9927" RevisionGUID="ffd86de6-00dd-4ea7-9dcf-83e969eaf30c" CreationDate="2011-03-18T18:07:23.107" UserId="4828" Text="Maybe CML http://www.cmldev.net/" />
  <row Id="20607" PostHistoryTypeId="2" PostId="9928" RevisionGUID="7777bdfd-76bd-448f-8a64-c9da46f052e5" CreationDate="2011-03-18T18:18:46.077" UserId="5540" Text="If you're in it for the thrill of programming then you would probably not have many issues with an IT degree over a CS degree, as the places where you would find the best work environment wouldn't be the same places that would pass over you because you don't have a CS degree.&#xD;&#xA;&#xD;&#xA;At least I'm hoping that's the case when I graduate with my IT degree..." />
  <row Id="20608" PostHistoryTypeId="2" PostId="9929" RevisionGUID="f37bd5b8-8737-4f51-bcce-cf15b65668b2" CreationDate="2011-03-18T18:36:24.610" UserId="5259" Text="Or, for speed, http://sourceforge.net/projects/simdx86/." />
  <row Id="20609" PostHistoryTypeId="2" PostId="9930" RevisionGUID="2cd92896-4609-4c29-82f7-869bc4523319" CreationDate="2011-03-18T18:37:50.513" UserId="1694" Text="I am a newbie in 3d game development and I am trying to make a real-time strategy game. I am struggling with the camera currently as I am unable to make it look like they do in RTS games.&#xD;&#xA;&#xD;&#xA;Here is my Camera.cs class&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Text;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    &#xD;&#xA;    namespace BB&#xD;&#xA;    {&#xD;&#xA;    	public class Camera : Microsoft.Xna.Framework.GameComponent&#xD;&#xA;    	{&#xD;&#xA;            public Matrix view;&#xD;&#xA;            public Matrix projection;&#xD;&#xA;            protected Game game;&#xD;&#xA;            KeyboardState currentKeyboardState;&#xD;&#xA;            Vector3 cameraPosition = new Vector3(600.0f, 0.0f, 600.0f);&#xD;&#xA;            Vector3 cameraForward = new Vector3(0, -0.4472136f, -0.8944272f);&#xD;&#xA;            BoundingFrustum cameraFrustum = new BoundingFrustum(Matrix.Identity);&#xD;&#xA;    &#xD;&#xA;            // Light direction&#xD;&#xA;            Vector3 lightDir = new Vector3(-0.3333333f, 0.6666667f, 0.6666667f);&#xD;&#xA;    &#xD;&#xA;    		public Camera(Game game) : base(game)&#xD;&#xA;    		{&#xD;&#xA;                this.game = game;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		public override void Initialize()&#xD;&#xA;    		{&#xD;&#xA;    			this.view = Matrix.CreateLookAt(this.cameraPosition, this.cameraPosition + this.cameraForward, Vector3.Up);&#xD;&#xA;    			this.projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, this.game.renderer.aspectRatio, 1, 10000);&#xD;&#xA;    &#xD;&#xA;    			base.Initialize();&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;            /* Handles the user input&#xD;&#xA;             * @ param   GameTime gameTime&#xD;&#xA;             */&#xD;&#xA;            private void HandleInput(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                float time = (float)gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    &#xD;&#xA;                currentKeyboardState = Keyboard.GetState();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            void UpdateCamera(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                float time = (float)gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    &#xD;&#xA;                // Check for input to rotate the camera.&#xD;&#xA;                float pitch = 0.0f;&#xD;&#xA;    			float turn = 0.0f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Up))&#xD;&#xA;                    pitch += time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Down))&#xD;&#xA;                    pitch -= time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Left))&#xD;&#xA;                    turn += time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Right))&#xD;&#xA;                    turn -= time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                Vector3 cameraRight = Vector3.Cross(Vector3.Up, cameraForward);&#xD;&#xA;                Vector3 flatFront = Vector3.Cross(cameraRight, Vector3.Up);&#xD;&#xA;    &#xD;&#xA;                Matrix pitchMatrix = Matrix.CreateFromAxisAngle(cameraRight, pitch);&#xD;&#xA;                Matrix turnMatrix = Matrix.CreateFromAxisAngle(Vector3.Up, turn);&#xD;&#xA;    &#xD;&#xA;                Vector3 tiltedFront = Vector3.TransformNormal(cameraForward, pitchMatrix * turnMatrix);&#xD;&#xA;    &#xD;&#xA;                // Check angle so we cant flip over&#xD;&#xA;                if (Vector3.Dot(tiltedFront, flatFront) &gt; 0.001f)&#xD;&#xA;                {&#xD;&#xA;                    cameraForward = Vector3.Normalize(tiltedFront);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                // Check for input to move the camera around.&#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.W))&#xD;&#xA;                    cameraPosition += cameraForward * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.S))&#xD;&#xA;                    cameraPosition -= cameraForward * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.A))&#xD;&#xA;                    cameraPosition += cameraRight * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.D))&#xD;&#xA;                    cameraPosition -= cameraRight * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.R))&#xD;&#xA;                {&#xD;&#xA;                    cameraPosition = new Vector3(0, 50, 50);&#xD;&#xA;                    cameraForward = new Vector3(0, 0, -1);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                cameraForward.Normalize();&#xD;&#xA;    &#xD;&#xA;                // Create the new view matrix&#xD;&#xA;                view = Matrix.CreateLookAt(cameraPosition, cameraPosition + cameraForward, Vector3.Up);&#xD;&#xA;    &#xD;&#xA;                // Set the new frustum value&#xD;&#xA;                cameraFrustum.Matrix = view * projection;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public override void Update(Microsoft.Xna.Framework.GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                HandleInput(gameTime);&#xD;&#xA;                UpdateCamera(gameTime);&#xD;&#xA;            }&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem is that the initial view is looking in a horizontal direction. I would like to have an RTS like top down view (but with a slight pitch). Can you help me out?" />
  <row Id="20610" PostHistoryTypeId="1" PostId="9930" RevisionGUID="2cd92896-4609-4c29-82f7-869bc4523319" CreationDate="2011-03-18T18:37:50.513" UserId="1694" Text="Help me get my 3D camera to look like the ones in RTS" />
  <row Id="20611" PostHistoryTypeId="3" PostId="9930" RevisionGUID="2cd92896-4609-4c29-82f7-869bc4523319" CreationDate="2011-03-18T18:37:50.513" UserId="1694" Text="&lt;xna&gt;&lt;camera&gt;&lt;rts&gt;" />
  <row Id="20612" PostHistoryTypeId="2" PostId="9931" RevisionGUID="7908db52-e087-42c9-b433-c5a22cb24b7d" CreationDate="2011-03-18T18:40:41.533" UserId="1562" Text="Short:&#xD;&#xA;Do triangle strips and Tangent Space Normal mapping go together?&#xD;&#xA;&#xD;&#xA;According to quite a lot of tutorials on bump mapping, it seems common practice to derive tangent space matrices in a vertex program and transform the light direction vector(s) to tangent space and then pass them on to a fragment program.&#xD;&#xA;However, if one was using triangle strips or index buffers, it is a given that the vertex buffer contains vertices that sit at border edges and would thus require more than one normal to derive tangent space matrices to interpolate between in fragment programs.&#xD;&#xA;&#xD;&#xA;Is there any reasonable way to not have duplicate vertices in your buffer and still use tangent space normal mapping?&#xD;&#xA;&#xD;&#xA;Which one do you think is better: Having normal and tangent encoded in the assets and just optimize the geometry handling to alleviate the cost of duplicate vertices or using triangle strips and computing normals/tangents completely at run time?&#xD;&#xA;&#xD;&#xA;Thinking about it, the more reasonable answer seems to be the first one, but why might my professor still be fussing about triangle strips when it seems so obvious?" />
  <row Id="20613" PostHistoryTypeId="1" PostId="9931" RevisionGUID="7908db52-e087-42c9-b433-c5a22cb24b7d" CreationDate="2011-03-18T18:40:41.533" UserId="1562" Text="Triangle Strips and Tangent Space Normal Mapping" />
  <row Id="20614" PostHistoryTypeId="3" PostId="9931" RevisionGUID="7908db52-e087-42c9-b433-c5a22cb24b7d" CreationDate="2011-03-18T18:40:41.533" UserId="1562" Text="&lt;graphics-programming&gt;&lt;normals&gt;&lt;efficiency&gt;" />
  <row Id="20615" PostHistoryTypeId="2" PostId="9932" RevisionGUID="124486c1-9ca6-4b97-9d2f-069bda164118" CreationDate="2011-03-18T18:43:43.283" UserId="4947" Text="I think that problem is in your view matrix. The third parameter is so called &quot;up vector&quot;. You should maybe se it to Vector3.Forward. Or you can calculate it as  this.cameraForward.cross(Vector3.right) - I don't know, if XNA syntax is like this, but there should be cross product of vector cameraForward and vector pointing to the right (or left)." />
  <row Id="20619" PostHistoryTypeId="2" PostId="9933" RevisionGUID="915e05dc-64ff-43a2-80fc-4d763335cca0" CreationDate="2011-03-18T19:01:25.937" UserId="1694" Text="I am new to 3d development and I have this idea of having the game world like our globe is - a ball. So, there would be no corners in the map and the game is top-down RTS game. I would like the camera to go on and on and never stop even though you are moving the camera to the same direction all the time.&#xD;&#xA;&#xD;&#xA;I am not sure if this is even possible, but I would really like to build a globe-like map without borders. Can this be done, and how exactly? I am using XNA, C# and DirectX. Any tutorials or links or help is greatly appreciated!" />
  <row Id="20620" PostHistoryTypeId="1" PostId="9933" RevisionGUID="915e05dc-64ff-43a2-80fc-4d763335cca0" CreationDate="2011-03-18T19:01:25.937" UserId="1694" Text="How would I go about implementing a globe-like &quot;ballish&quot; map?" />
  <row Id="20621" PostHistoryTypeId="3" PostId="9933" RevisionGUID="915e05dc-64ff-43a2-80fc-4d763335cca0" CreationDate="2011-03-18T19:01:25.937" UserId="1694" Text="&lt;xna&gt;&lt;c#&gt;&lt;graphics-programming&gt;&lt;maps&gt;&lt;heightmap&gt;" />
  <row Id="20622" PostHistoryTypeId="2" PostId="9934" RevisionGUID="4be8efd0-375a-4e8e-9431-0afbdc9da1e2" CreationDate="2011-03-18T19:02:21.350" UserId="744" Text="&lt;a href=&quot;http://code.google.com/p/bullet/source/browse/#svn%2Ftrunk%2Fsrc%2Fvectormath&quot;&gt;Sony's vectormath library, used as part of Bullet Physics&lt;/a&gt;, meets all your requirements. Some work is involved to separate it from Bullet, but nothing serious - it doesn't depend on bullet, just that no one ever packaged it officially apart from it.&#xD;&#xA;&#xD;&#xA;The version currently in the bullet tree supports SSE optimizations, and has a C++ interface.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/Extras/vectormathlibrary/include/vectormath/&quot;&gt;An older version (probably now unsupported) also supports SOA formats, and a pure C interface.&lt;/a&gt;&#xD;&#xA;" />
  <row Id="20623" PostHistoryTypeId="2" PostId="9935" RevisionGUID="69269378-11d3-4974-bac9-256cc591fe6f" CreationDate="2011-03-18T19:13:31.217" UserId="138" Text="As stated, the short answer is yes.&#xD;&#xA;&#xD;&#xA;The long answer:&#xD;&#xA;I've been in charge of hiring for game programmers, been an interviewer, etc. and can say that degree really doesn't matter. I've worked with electrical engineers, people without any degree, and plenty of computer science guys.&#xD;&#xA;&#xD;&#xA;That being said, you're still going to have to be spectacular. Personally, when I interview, I dig into algorithmic complexity, optimization, and continually probe until I find a topic the candidate doesn't know and, at that point, have them figure it out. So, you may have some catching up to do.&#xD;&#xA;&#xD;&#xA;Remember, it's not just about knowledge. It's about thought process, as well. You need to be able to solve problems, even when they are completely out of your realm of comfort.&#xD;&#xA;&#xD;&#xA;Read this [blog pos][1]t. If you're afraid of what it's saying, challenge that fear with knowledge. You're going to need to know everything to get a solid job. You'll need to know more than this, as I'll expect you to know everything here AND as much related to games.&#xD;&#xA;&#xD;&#xA;Write games. When I get a resume from someone who hasn't even built a side project game, I typically chuck it. I know that sounds harsh; but, I need someone who'll understand what I'm talking about when/if things are on fire. In games, there's very little time for hand holding.&#xD;&#xA;&#xD;&#xA;Write a lot of games. You're going to need to learn about collision, scene graphs, space partitioning, networking, etc. Build games (start small) that let you understand these.&#xD;&#xA;&#xD;&#xA;Write games with other people. You're going to need to fail, and hard. The fastest way to fail is to add more people to your team. If you can overcome these challenges, you'll learn a lot. I need people who can work with artists, designers, other engineers, and executives.&#xD;&#xA;&#xD;&#xA;I hope that helps :)&#xD;&#xA;&#xD;&#xA;  [1]: http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html" />
  <row Id="20624" PostHistoryTypeId="5" PostId="9845" RevisionGUID="0b248e08-9287-4543-bca0-b96537c2dad3" CreationDate="2011-03-18T19:25:12.913" UserId="1198" Comment="fixed &quot;i&quot; removed thanks sig" Text="I am new to Box2D, I have set gravity to 10. How to make an object fly in space even though the gravity is 10. What are the properties I need to set to make object fly? Is there any different approach? " />
  <row Id="20625" PostHistoryTypeId="24" PostId="9845" RevisionGUID="0b248e08-9287-4543-bca0-b96537c2dad3" CreationDate="2011-03-18T19:25:12.913" Comment="Proposed by 1198 approved by 14 edit id of 84" />
  <row Id="20626" PostHistoryTypeId="5" PostId="9920" RevisionGUID="4ac6bffd-2271-455c-a2b7-b4725718dd7c" CreationDate="2011-03-18T19:25:15.410" UserId="1198" Comment="dropped the thanks sig" Text="I am looking for some books, articles or tutorials about graphics architecture and graphics pipeline optimizations. It shouldn't be too old (2008 or newer) - the newer, the better. &#xD;&#xA;&#xD;&#xA;I have found something in [Optimising the Graphics Pipeline, NVIDIA, Koji Ashida] - too old, [Real-time rendering, Akenine Moller], [OpenGL Bindless Extensions, NVIDIA, Jeff Bolz], [Efficient multifragment effects on graphics processing units, Louis Frederic Bavoil] and some internet discussions. But there is not too much information and I want to read more.&#xD;&#xA;&#xD;&#xA;It should contain something about application, driver, memory and shader units communication and data transfers. About vertices and attributes. Also pre and post T&amp;L cache (if they still exist in nowadays architectures) etc. I don't need anything about textures, frame buffers and rasterization.&#xD;&#xA;&#xD;&#xA;It can also be about OpenGL (not about DirecX) and optimizing extensions (not old extensions like VBOs, but newer like vertex_buffer_unified_memory)." />
  <row Id="20627" PostHistoryTypeId="24" PostId="9920" RevisionGUID="4ac6bffd-2271-455c-a2b7-b4725718dd7c" CreationDate="2011-03-18T19:25:15.410" Comment="Proposed by 1198 approved by 14 edit id of 86" />
  <row Id="20628" PostHistoryTypeId="5" PostId="9888" RevisionGUID="08ca9a42-177a-41e8-ab08-5c3effae3452" CreationDate="2011-03-18T19:25:26.613" UserId="1198" Comment="dropped sig and made link text" Text="I say [Mobile Lua][1] rules, still experimental but open source and already looking good!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mobilelua.googlecode.com" />
  <row Id="20629" PostHistoryTypeId="24" PostId="9888" RevisionGUID="08ca9a42-177a-41e8-ab08-5c3effae3452" CreationDate="2011-03-18T19:25:26.613" Comment="Proposed by 1198 approved by 14 edit id of 87" />
  <row Id="20630" PostHistoryTypeId="5" PostId="9930" RevisionGUID="d3ed9135-4c14-4e08-b53f-2abf4358bf44" CreationDate="2011-03-18T19:25:38.530" UserId="1198" Comment="fixed caps on 3D and removed greeting" Text="I am a newbie in 3D game development and I am trying to make a real-time strategy game. I am struggling with the camera currently as I am unable to make it look like they do in RTS games.&#xD;&#xA;&#xD;&#xA;Here is my Camera.cs class&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Text;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    &#xD;&#xA;    namespace BB&#xD;&#xA;    {&#xD;&#xA;    	public class Camera : Microsoft.Xna.Framework.GameComponent&#xD;&#xA;    	{&#xD;&#xA;            public Matrix view;&#xD;&#xA;            public Matrix projection;&#xD;&#xA;            protected Game game;&#xD;&#xA;            KeyboardState currentKeyboardState;&#xD;&#xA;            Vector3 cameraPosition = new Vector3(600.0f, 0.0f, 600.0f);&#xD;&#xA;            Vector3 cameraForward = new Vector3(0, -0.4472136f, -0.8944272f);&#xD;&#xA;            BoundingFrustum cameraFrustum = new BoundingFrustum(Matrix.Identity);&#xD;&#xA;    &#xD;&#xA;            // Light direction&#xD;&#xA;            Vector3 lightDir = new Vector3(-0.3333333f, 0.6666667f, 0.6666667f);&#xD;&#xA;    &#xD;&#xA;    		public Camera(Game game) : base(game)&#xD;&#xA;    		{&#xD;&#xA;                this.game = game;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		public override void Initialize()&#xD;&#xA;    		{&#xD;&#xA;    			this.view = Matrix.CreateLookAt(this.cameraPosition, this.cameraPosition + this.cameraForward, Vector3.Up);&#xD;&#xA;    			this.projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, this.game.renderer.aspectRatio, 1, 10000);&#xD;&#xA;    &#xD;&#xA;    			base.Initialize();&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;            /* Handles the user input&#xD;&#xA;             * @ param   GameTime gameTime&#xD;&#xA;             */&#xD;&#xA;            private void HandleInput(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                float time = (float)gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    &#xD;&#xA;                currentKeyboardState = Keyboard.GetState();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            void UpdateCamera(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                float time = (float)gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    &#xD;&#xA;                // Check for input to rotate the camera.&#xD;&#xA;                float pitch = 0.0f;&#xD;&#xA;    			float turn = 0.0f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Up))&#xD;&#xA;                    pitch += time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Down))&#xD;&#xA;                    pitch -= time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Left))&#xD;&#xA;                    turn += time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.Right))&#xD;&#xA;                    turn -= time * 0.001f;&#xD;&#xA;    &#xD;&#xA;                Vector3 cameraRight = Vector3.Cross(Vector3.Up, cameraForward);&#xD;&#xA;                Vector3 flatFront = Vector3.Cross(cameraRight, Vector3.Up);&#xD;&#xA;    &#xD;&#xA;                Matrix pitchMatrix = Matrix.CreateFromAxisAngle(cameraRight, pitch);&#xD;&#xA;                Matrix turnMatrix = Matrix.CreateFromAxisAngle(Vector3.Up, turn);&#xD;&#xA;    &#xD;&#xA;                Vector3 tiltedFront = Vector3.TransformNormal(cameraForward, pitchMatrix * turnMatrix);&#xD;&#xA;    &#xD;&#xA;                // Check angle so we cant flip over&#xD;&#xA;                if (Vector3.Dot(tiltedFront, flatFront) &gt; 0.001f)&#xD;&#xA;                {&#xD;&#xA;                    cameraForward = Vector3.Normalize(tiltedFront);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                // Check for input to move the camera around.&#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.W))&#xD;&#xA;                    cameraPosition += cameraForward * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.S))&#xD;&#xA;                    cameraPosition -= cameraForward * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.A))&#xD;&#xA;                    cameraPosition += cameraRight * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.D))&#xD;&#xA;                    cameraPosition -= cameraRight * time * 0.4f;&#xD;&#xA;    &#xD;&#xA;                if (currentKeyboardState.IsKeyDown(Keys.R))&#xD;&#xA;                {&#xD;&#xA;                    cameraPosition = new Vector3(0, 50, 50);&#xD;&#xA;                    cameraForward = new Vector3(0, 0, -1);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                cameraForward.Normalize();&#xD;&#xA;    &#xD;&#xA;                // Create the new view matrix&#xD;&#xA;                view = Matrix.CreateLookAt(cameraPosition, cameraPosition + cameraForward, Vector3.Up);&#xD;&#xA;    &#xD;&#xA;                // Set the new frustum value&#xD;&#xA;                cameraFrustum.Matrix = view * projection;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public override void Update(Microsoft.Xna.Framework.GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                HandleInput(gameTime);&#xD;&#xA;                UpdateCamera(gameTime);&#xD;&#xA;            }&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem is that the initial view is looking in a horizontal direction. I would like to have an RTS like top down view (but with a slight pitch). Can you help me out?" />
  <row Id="20631" PostHistoryTypeId="24" PostId="9930" RevisionGUID="d3ed9135-4c14-4e08-b53f-2abf4358bf44" CreationDate="2011-03-18T19:25:38.530" Comment="Proposed by 1198 approved by 14 edit id of 85" />
  <row Id="20632" PostHistoryTypeId="2" PostId="9936" RevisionGUID="77450be0-482b-4765-bde4-4f77ec55d104" CreationDate="2011-03-18T19:43:00.077" UserId="5705" Text="When we draw any object in flash and convert it into a movieclip or a sprite, how is it stored or represented in flash. I know in vector art it is stored or represented as line segments using formulae. Is there any way to get the vertices of the shape that was drawn?&#xD;&#xA;&#xD;&#xA;For example, lets say a simple rectangle is drawn and is converted to a movieclip. Is there anyway to obtain the vertices and the line segments from the sprite? So that its shape is obtained. Enough information should be obtained so that the shape can be replicated. That's the key - replication.&#xD;&#xA;&#xD;&#xA;In simple terms, where does flash store information about a shape that has been drawn so that we can obtain it and attempt to replicate the shape ourselves?" />
  <row Id="20633" PostHistoryTypeId="1" PostId="9936" RevisionGUID="77450be0-482b-4765-bde4-4f77ec55d104" CreationDate="2011-03-18T19:43:00.077" UserId="5705" Text="How does flash store (represent) movieclips and sprites?" />
  <row Id="20634" PostHistoryTypeId="3" PostId="9936" RevisionGUID="77450be0-482b-4765-bde4-4f77ec55d104" CreationDate="2011-03-18T19:43:00.077" UserId="5705" Text="&lt;architecture&gt;&lt;flash&gt;" />
  <row Id="20636" PostHistoryTypeId="2" PostId="9938" RevisionGUID="1cda3dd7-1af0-45a8-83a3-58c4d5cb9bc2" CreationDate="2011-03-18T20:09:06.803" UserId="5899" Text="&quot;Flash&quot; store all the information of the film or videogame into a own format. The data is stored in a vectorial format, this is a format that has a math definition. This is the main diference with bitmaps, because you can scale the image without data loss.&#xD;&#xA;&#xD;&#xA;You can access to the .swf file, here is the specification http://www.adobe.com/devnet/swf.html, and parse the movieclips, shapes, coordinates, etc. Because .swf format is very large you can use the code of SWFRIP project at http://sourceforge.net/projects/swfrip/ and see how you can parse a .swf file.&#xD;&#xA;&#xD;&#xA;With a little patience you can obtain the data that you want." />
  <row Id="20637" PostHistoryTypeId="25" PostId="9936" RevisionGUID="051d1580-277d-4016-b06d-15321bf1cea0" CreationDate="2011-03-18T20:23:32.737" Comment="http://twitter.com/#!/StackGameDev/status/48841990619664384" />
  <row Id="20638" PostHistoryTypeId="2" PostId="9939" RevisionGUID="f2cfc543-92d1-41e6-9e28-4e7542b8799e" CreationDate="2011-03-18T20:34:22.513" UserId="1562" Text="XNA Math might be for you. It's a header only C++ math library that is distributed with the latest DirectX SDK and uses SSE intrinsics. I can't talk much about its performance but from what I read about it, it seems to be pretty decent.&#xD;&#xA;&#xD;&#xA;[XNA Math Reference][1]&#xD;&#xA;&#xD;&#xA;[XNA Math programming guide][2]&#xD;&#xA;&#xD;&#xA;[DX SDK download][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee415574%28VS.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee415571%28VS.85%29.aspx&#xD;&#xA;  [3]: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba" />
  <row Id="20639" PostHistoryTypeId="5" PostId="9933" RevisionGUID="3ce9a3f3-5079-48d3-a172-5c762de9c2f3" CreationDate="2011-03-18T20:37:17.203" UserId="1198" Comment="Removed greeting, fixed caps on 3D" Text="I am new to 3D development and I have this idea of having the game world like our globe is - a ball. So, there would be no corners in the map and the game is top-down RTS game. I would like the camera to go on and on and never stop even though you are moving the camera to the same direction all the time.&#xD;&#xA;&#xD;&#xA;I am not sure if this is even possible, but I would really like to build a globe-like map without borders. Can this be done, and how exactly? I am using XNA, C#, and DirectX. Any tutorials or links or help is greatly appreciated!" />
  <row Id="20640" PostHistoryTypeId="24" PostId="9933" RevisionGUID="3ce9a3f3-5079-48d3-a172-5c762de9c2f3" CreationDate="2011-03-18T20:37:17.203" Comment="Proposed by 1198 approved by 14 edit id of 88" />
  <row Id="20641" PostHistoryTypeId="2" PostId="9940" RevisionGUID="002a36d8-8daa-4cda-889a-29b3e6b24342" CreationDate="2011-03-18T20:42:10.133" UserId="1198" Text="Might I ask, do you really need a globe? Is your world small enough that the curvature would be visible? Why not approximate the globe with a bunch of rectangles? It will make your life easier, and presuming your world is large enough and if implemented well, can give the illusion of a fully connected world to boot.&#xD;&#xA;&#xD;&#xA;Think of some games which have large open worlds, for the most part, they consist of &quot;zones&quot; where each &quot;zone&quot; borders other &quot;zones.&quot; There is typically ocean surrounding groups of these &quot;zones&quot; which the player cannot manually cross, but the player is free to walk from zone to zone without restriction. For example, think of WoW's two continents and the dividing ocean." />
  <row Id="20642" PostHistoryTypeId="2" PostId="9941" RevisionGUID="f6e7b3ca-8ce3-4d0c-8308-992c5092b5cc" CreationDate="2011-03-18T21:12:36.127" UserId="2773" Text="I am developing a game for a mobile platform and I want to integrate it with either **Scoreloop** or **Openfeint**.&#xD;&#xA;&#xD;&#xA;So my question is which of the platforms has better SDK (by that I mean that its has better tools to implement achievements and global leader board and other things) and more features?&#xD;&#xA;&#xD;&#xA;Which of those has larger user base?" />
  <row Id="20643" PostHistoryTypeId="1" PostId="9941" RevisionGUID="f6e7b3ca-8ce3-4d0c-8308-992c5092b5cc" CreationDate="2011-03-18T21:12:36.127" UserId="2773" Text="What are pros and cons of different social gaming networks from developers point of view?" />
  <row Id="20644" PostHistoryTypeId="3" PostId="9941" RevisionGUID="f6e7b3ca-8ce3-4d0c-8308-992c5092b5cc" CreationDate="2011-03-18T21:12:36.127" UserId="2773" Text="&lt;mobile&gt;&lt;social&gt;" />
  <row Id="20645" PostHistoryTypeId="2" PostId="9942" RevisionGUID="26f820e1-90ff-4414-9f58-f2ad8e252cdd" CreationDate="2011-03-18T21:25:46.430" UserId="2919" Text="Try [Eigen][1] -- fast, expression templates, vectorized, easy to use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://eigen.tuxfamily.org/index.php?title=Main_Page" />
  <row Id="20646" PostHistoryTypeId="2" PostId="9943" RevisionGUID="c7831f32-2d8e-4aaf-94da-b38b177a41be" CreationDate="2011-03-18T21:32:37.157" UserId="4296" Text="Yes, it's very possible.  I found though that making a true orbital camera was rather confusing.  It was better to leave the Y (Up) axis locked and stop the camera at the poles.  Otherwise it was easy to get disoriented.  Google around for orbit cameras.  Back when I was working on something like this, [dhpoware's sample was useful][1].  [This old one][2] might be useful too.&#xD;&#xA;&#xD;&#xA;For the 3d Mesh, look into subdividing icosahedrons (sometimes called a geosphere).  They give you a relatively uniform triangle size for texturing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dhpoware.com/demos/xnaCamera.html&#xD;&#xA;  [2]: http://forums.create.msdn.com/forums/p/2188/10897.aspx#10897" />
  <row Id="20647" PostHistoryTypeId="4" PostId="9941" RevisionGUID="9f470eef-c151-4c36-8f2e-e6bd948b60ea" CreationDate="2011-03-18T21:33:27.093" UserId="2773" Comment="edited title" Text="What are pros and cons of different social gaming networks from developer's point of view?" />
  <row Id="20648" PostHistoryTypeId="2" PostId="9944" RevisionGUID="d971af30-81a6-44c8-9f20-d3cefa24de56" CreationDate="2011-03-18T22:42:34.023" UserId="2787" Text="We use [OpenGL Mathematics][1]&#xD;&#xA;&#xD;&#xA;Even though the name implies it's just for OpenGL I see no reason it wouldn't work for DirectX. It's a header only library, easy to use and is very actively updated.&#xD;&#xA;&#xD;&#xA;Check it out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/ &quot;GLM&quot;" />
  <row Id="20649" PostHistoryTypeId="25" PostId="9941" RevisionGUID="24251026-bcbd-4836-b7de-24f1480869ac" CreationDate="2011-03-18T23:23:32.770" Comment="http://twitter.com/#!/StackGameDev/status/48887289383895040" />
  <row Id="20650" PostHistoryTypeId="2" PostId="9945" RevisionGUID="b1965a70-ff1a-4b5d-88a2-ace62a704042" CreationDate="2011-03-18T23:33:42.677" UserId="6178" Text="I've been reading Koen Witters [detailed article][1] about different game loop solutions but I'm having some problems implementing the last one with GLUT, which is the recommended one.&#xD;&#xA;&#xD;&#xA;After reading a couple of articles, tutorials and code from other people on how to achieve a constant game speed, I think that what I currently have implemented (I'll post the code below) is what Koen Witters called *Game Speed dependent on Variable FPS*, the second on his article.&#xD;&#xA;&#xD;&#xA;First, through my searching experience, there's a couple of people that probably have the knowledge to help out on this but don't know what GLUT is and I'm going to try and explain (feel free to correct me) the relevant functions for my problem of this OpenGL toolkit. Skip this section if you know what GLUT is and how to play with it.&#xD;&#xA;&#xD;&#xA;**GLUT Toolkit:**&#xD;&#xA;&#xD;&#xA; - GLUT is an OpenGL toolkit and helps with common tasks in OpenGL.&#xD;&#xA; - The `glutDisplayFunc(renderScene)` takes a pointer to a `renderScene()` function callback, which will be responsible for rendering everything. The `renderScene()` function will only be called once after the callback registration.&#xD;&#xA; - The `glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0)` takes the number of milliseconds to pass before calling the callback `processAnimationTimer()`. The last argument is just a value to pass to the timer callback. The `processAnimationTimer()` will not be called each `TIMER_MILLISECONDS` but just once.&#xD;&#xA; - The `glutPostRedisplay()` function requests GLUT to render a new frame so we need call this every time we change something in the scene.&#xD;&#xA; - The `glutIdleFunc(renderScene)` could be used to register a callback to `renderScene()` (this does not make `glutDisplayFunc()` irrelevant) but this function should be avoided because the idle callback is continuously called when events are not being received, increasing the CPU load.&#xD;&#xA; - The `glutGet(GLUT_ELAPSED_TIME)` function returns the number of milliseconds since `glutInit` was called (or first call to `glutGet(GLUT_ELAPSED_TIME)`). That's the timer we have with GLUT. I know there are better alternatives for high resolution timers, but let's keep with this one for now.&#xD;&#xA;&#xD;&#xA;I think this is enough information on how GLUT renders frames so people that didn't know about it could also pitch in this question to try and help if they fell like it.&#xD;&#xA;&#xD;&#xA;**Current Implementation:**&#xD;&#xA;&#xD;&#xA;Now, I'm not sure I have correctly implemented the second solution proposed by Koen, *Game Speed dependent on Variable FPS*. The relevant code for that goes like this:&#xD;&#xA;&#xD;&#xA;    #define TICKS_PER_SECOND 30&#xD;&#xA;    #define MOVEMENT_SPEED 2.0f&#xD;&#xA;    &#xD;&#xA;    const int TIMER_MILLISECONDS = 1000 / TICKS_PER_SECOND;&#xD;&#xA;    &#xD;&#xA;    int previousTime;&#xD;&#xA;    int currentTime;&#xD;&#xA;    int elapsedTime;&#xD;&#xA;&#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Setup the camera position and looking point&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	// Do all drawing below...&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void processAnimationTimer(int value) {&#xD;&#xA;    	// setups the timer to be called again&#xD;&#xA;    	glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0);&#xD;&#xA;    &#xD;&#xA;    	// Get the time when the previous frame was rendered&#xD;&#xA;    	previousTime = currentTime;&#xD;&#xA;    &#xD;&#xA;    	// Get the current time (in milliseconds) and calculate the elapsed time&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    	elapsedTime = currentTime - previousTime;&#xD;&#xA;    &#xD;&#xA;    	/* Multiply the camera direction vector by constant speed then by the&#xD;&#xA;    	   elapsed time (in seconds) and then move the camera */&#xD;&#xA;    	SceneCamera.Move(cameraDirection * MOVEMENT_SPEED * (elapsedTime / 1000.0f));&#xD;&#xA;    &#xD;&#xA;    	// Requests to render a new frame (this will call my renderScene() once)&#xD;&#xA;    	glutPostRedisplay();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(int argc, char **argv) {&#xD;&#xA;    	glutInit(&amp;argc, argv);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	glutDisplayFunc(renderScene);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Setup the timer to be called one first time&#xD;&#xA;    	glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0);&#xD;&#xA;    	// Read the current time since glutInit was called&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    &#xD;&#xA;    	glutMainLoop();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This implementation doesn't fell right. It works in the sense that helps the game speed to be constant dependent on the FPS. So that moving from point A to point B takes the same time no matter the high/low framerate. However, I believe I'm limiting the game framerate with this approach. Each frame will only be rendered when the time callback is called, that means the framerate will be roughly around `TICKS_PER_SECOND` frames per second. This doesn't feel right, you shouldn't limit your powerful hardware, it's wrong. It's my understanding though, that I still need to calculate the `elapsedTime`. Just because I'm telling GLUT to call the timer callback every `TIMER_MILLISECONDS`, it doesn't mean it will always do that on time.&#xD;&#xA;&#xD;&#xA;I'm not sure how can I fix this and to be completely honest, I have no idea what is the game loop in GLUT, you know, the `while( game_is_running )` loop in Koen's article. But it's my understanding that GLUT is *event-driven* and that game loop starts when I call `glutMainLoop()` (which never returns), yes?&#xD;&#xA;&#xD;&#xA;I thought I could register an idle callback with `glutIdleFunc()` and use that as replacement of `glutTimerFunc()`, only rendering when necessary (instead of all the time as usual) but when I tested this with an empty callback (like `void gameLoop() {}`) and it was basically doing nothing, only a black screen, the CPU spiked to 25% and remained there until I killed the game and it went back to normal. So I don't think that's the path to follow.&#xD;&#xA;&#xD;&#xA;Using `glutTimerFunc()` is definitely not a good approach to perform all movements/animations based on that, as I'm limiting my game to a constant FPS, not cool. Or maybe I'm using it wrong and my implementation is not right?&#xD;&#xA;&#xD;&#xA;How exactly can I have a constant game speed with variable FPS? More exactly, how do I correctly implement Koen's *Constant Game Speed with Maximum FPS* solution (the fourth one on his article) with GLUT? Maybe this is not possible at all with GLUT? If not, what are my alternatives? **What is the best approach to this problem (constant game speed) with GLUT?**&#xD;&#xA;&#xD;&#xA;*I originally posted this question on Stack Overflow before being pointed out about this site. The following is a different approach I tried after creating the question in SO, so I'm posting it here too.*&#xD;&#xA;&#xD;&#xA;**Another Approach:**&#xD;&#xA;&#xD;&#xA;I've been experimenting and here's what I was able to achieve now. Instead of calculating the elapsed time on a timed function (which limits my game's framerate) I'm now doing it in `renderScene()`. Whenever changes to the scene happen I call `glutPostRedisplay()` (ie: camera moving, some object animation, etc...) which will make a call to `renderScene()`. I can use the elapsed time in this function to move my camera for instance.&#xD;&#xA;&#xD;&#xA;My code has now turned into this:&#xD;&#xA;&#xD;&#xA;    int previousTime;&#xD;&#xA;    int currentTime;&#xD;&#xA;    int elapsedTime;&#xD;&#xA;    &#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Setup the camera position and looking point&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	// Do all drawing below...&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Get the time when the previous frame was rendered&#xD;&#xA;    	previousTime = currentTime;&#xD;&#xA;    &#xD;&#xA;    	// Get the current time (in milliseconds) and calculate the elapsed time&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    	elapsedTime = currentTime - previousTime;&#xD;&#xA;    &#xD;&#xA;    	/* Multiply the camera direction vector by constant speed then by the&#xD;&#xA;           elapsed time (in seconds) and then move the camera */&#xD;&#xA;    	SceneCamera.Move(cameraDirection * MOVEMENT_SPEED * (elapsedTime / 1000.0f));&#xD;&#xA;    &#xD;&#xA;    	// Setup the camera position and looking point&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	// All drawing code goes inside this function&#xD;&#xA;    	drawCompleteScene();&#xD;&#xA;    &#xD;&#xA;    	glutSwapBuffers();&#xD;&#xA;    &#xD;&#xA;    	/* Redraw the frame ONLY if the user is moving the camera&#xD;&#xA;    	   (similar code will be needed to redraw the frame for other events) */&#xD;&#xA;    	if(!IsTupleEmpty(cameraDirection)) {&#xD;&#xA;    		glutPostRedisplay();&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(int argc, char **argv) {&#xD;&#xA;    	glutInit(&amp;argc, argv);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	glutDisplayFunc(renderScene);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    &#xD;&#xA;    	glutMainLoop();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Conclusion, it's working, or so it seems. If I don't move the camera, the CPU usage is low, nothing is being rendered (for testing purposes I only have a grid extending for 4000.0f, while zFar is set to 1000.0f). When I start moving the camera the scene starts redrawing itself. If I keep pressing the move keys, the CPU usage will increase; this is normal behavior. It drops back when I stop moving.&#xD;&#xA;&#xD;&#xA;Unless I'm missing something, it seems like a good approach for now. I did find [this interesting article][2] on iDevGames and this implementation is probably affected by the problem described on that article. What's your thoughts on that?&#xD;&#xA;&#xD;&#xA;Please note that I'm just doing this for fun, I have no intentions of creating some game to distribute or something like that, not in the near future at least. If I did, I would probably go with something else besides GLUT. But since I'm using GLUT, and other than the problem described on iDevGames, do you think this latest implementation is sufficient for GLUT? The only real issue I can think of right now is that I'll need to keep calling `glutPostRedisplay()` every time the scene changes something and keep calling it until there's nothing new to redraw. A little complexity added to the code for a better cause, I think.&#xD;&#xA;&#xD;&#xA;What do you think?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.koonsolo.com/news/dewitters-gameloop/&#xD;&#xA;  [2]: http://www.idevgames.com/articles/timebasedanimation" />
  <row Id="20651" PostHistoryTypeId="1" PostId="9945" RevisionGUID="b1965a70-ff1a-4b5d-88a2-ace62a704042" CreationDate="2011-03-18T23:33:42.677" UserId="6178" Text="Constant game speed independant of variable FPS in OpenGL with GLUT?" />
  <row Id="20652" PostHistoryTypeId="3" PostId="9945" RevisionGUID="b1965a70-ff1a-4b5d-88a2-ace62a704042" CreationDate="2011-03-18T23:33:42.677" UserId="6178" Text="&lt;opengl&gt;&lt;c&gt;&lt;gameloop&gt;&lt;frame-rate&gt;&lt;glut&gt;" />
  <row Id="20653" PostHistoryTypeId="4" PostId="9945" RevisionGUID="b328f051-c29d-4f05-b8b4-3a7b8ec2bb42" CreationDate="2011-03-18T23:48:38.387" UserId="6178" Comment="fixed typo" Text="Constant game speed independent of variable FPS in OpenGL with GLUT?" />
  <row Id="20655" PostHistoryTypeId="2" PostId="9946" RevisionGUID="6d0bc997-c64c-4d21-bb2e-536f02d43717" CreationDate="2011-03-19T00:03:56.480" UserId="5932" Text="Hey! I've been working on a game in c++ for about a week and a half, and I've been using SDL. However, my current engine only needs the following from whatever library I use:&#xD;&#xA;&#xD;&#xA;enable double buffering&#xD;&#xA;load an image from path into something that I can apply to the screen&#xD;&#xA;apply an image to the screen with a certain x,y&#xD;&#xA;enable transparency on an image&#xD;&#xA;(possibly) image clipping, for sprite sheets.&#xD;&#xA;&#xD;&#xA;I am *fairly sure* that SFML has all of this functionality, I'm just not positive. Will someone confirm my suspicions?&#xD;&#xA;&#xD;&#xA;Also I have one or two questions regarding SFML itself. Do I have to do anything to enable hardware accelerated rendering? How quick is SFML at blending alpha values?&#xD;&#xA;&#xD;&#xA;(sorry for the less than intelligent question!)" />
  <row Id="20656" PostHistoryTypeId="1" PostId="9946" RevisionGUID="6d0bc997-c64c-4d21-bb2e-536f02d43717" CreationDate="2011-03-19T00:03:56.480" UserId="5932" Text="SDL to SFML simple question" />
  <row Id="20657" PostHistoryTypeId="3" PostId="9946" RevisionGUID="6d0bc997-c64c-4d21-bb2e-536f02d43717" CreationDate="2011-03-19T00:03:56.480" UserId="5932" Text="&lt;game-design&gt;&lt;programming&gt;&lt;sdl&gt;&lt;sfml&gt;" />
  <row Id="20658" PostHistoryTypeId="5" PostId="9946" RevisionGUID="598a325a-b820-4822-8acb-78868cf1f830" CreationDate="2011-03-19T00:31:49.483" UserId="51" Comment="deleted 44 characters in body; edited tags" Text="I've been working on a game in c++ for about a week and a half, and I've been using SDL. However, my current engine only needs the following from whatever library I use:&#xD;&#xA;&#xD;&#xA;* enable double buffering&#xD;&#xA;* load an image from path into something that I can apply to the screen&#xD;&#xA;* apply an image to the screen with a certain x,y&#xD;&#xA;* enable transparency on an image&#xD;&#xA;* (possibly) image clipping, for sprite sheets.&#xD;&#xA;&#xD;&#xA;I am *fairly sure* that SFML has all of this functionality, I'm just not positive. Will someone confirm my suspicions?&#xD;&#xA;&#xD;&#xA;Also I have one or two questions regarding SFML itself. Do I have to do anything to enable hardware accelerated rendering? How quick is SFML at blending alpha values?&#xD;&#xA;" />
  <row Id="20659" PostHistoryTypeId="6" PostId="9946" RevisionGUID="598a325a-b820-4822-8acb-78868cf1f830" CreationDate="2011-03-19T00:31:49.483" UserId="51" Comment="deleted 44 characters in body; edited tags" Text="&lt;programming&gt;&lt;sdl&gt;&lt;sfml&gt;" />
  <row Id="20660" PostHistoryTypeId="2" PostId="9947" RevisionGUID="448e6ca5-155c-42c0-b572-826eddcaa32a" CreationDate="2011-03-19T00:32:09.060" UserId="6180" Text="hey, i want to know if my rough traffic estimations are right, it would be for a pretty simple realtime flashgame in the style of haxball (but not as a soccer game) heres a video of it http://www.youtube.com/watch?v=z_xBdFg1RcI&#xD;&#xA;&#xD;&#xA;So here comes my estimation, i dont know if they are realistic! i hope someone can help me.&#xD;&#xA;&#xD;&#xA;consider the packet attached as a typical one sent every 200ms, its 148bytes + 64 bytes of header will make around a 200bytes packet. The server will receive 200bytes x 6 players x 5 times a sec=6000bytes/s=5.85Kbytes/s=46.9kbit/s plus he has to send all back to the players, so at this point are 94Kbit/s.The server received all the information, perform the definitive calculation and send the new position to all players, in a bigger packet of around 900bytes that have to be delivered to the others 6, which makes 900bytes x 6 players x 5 times a sec=27000bytes/s=26Kbytes/s=210kbit/s. overall that would be 26kbyte per second. thats like 130mb traffic per hour for a 6player room. but somehow i think the numbers are too high? that would be really much traffic for such a simple game.&#xD;&#xA;&#xD;&#xA;did i calculate something wrong?" />
  <row Id="20661" PostHistoryTypeId="1" PostId="9947" RevisionGUID="448e6ca5-155c-42c0-b572-826eddcaa32a" CreationDate="2011-03-19T00:32:09.060" UserId="6180" Text="Traffic estimation for a multiplayer flash game" />
  <row Id="20662" PostHistoryTypeId="3" PostId="9947" RevisionGUID="448e6ca5-155c-42c0-b572-826eddcaa32a" CreationDate="2011-03-19T00:32:09.060" UserId="6180" Text="&lt;flash&gt;&lt;game-mechanics&gt;&lt;server&gt;" />
  <row Id="20663" PostHistoryTypeId="2" PostId="9948" RevisionGUID="df633918-6226-49de-8257-9662409646ea" CreationDate="2011-03-19T00:40:38.347" UserId="4947" Text="I think, SFML is library, which gives you power to use OpenGL. So hardware rendering is self-evidence. And it's fast with blending - you can write your own shader and do blending by yourself.&#xD;&#xA;&#xD;&#xA;I also think, double buffering is enabled in default in SFML.&#xD;&#xA;&#xD;&#xA;Apply image to screen can be done by drawing a rectangle with texture ;)&#xD;&#xA;&#xD;&#xA;Transparency can be also enabled (blending).&#xD;&#xA;&#xD;&#xA;I don't have experience with SFML and images, so I don't know nothing about this second. And I don't understand the last point (image clipping)." />
  <row Id="20664" PostHistoryTypeId="2" PostId="9949" RevisionGUID="075b72f7-6057-40c0-b801-952235dbe709" CreationDate="2011-03-19T01:00:53.830" UserId="2913" Text="At the GGJ '11 in Berlin one team developed a game using a globus that was freely rotateable. &#xD;&#xA;&#xD;&#xA;They made the game and the entire source available. It was made in C# and even XNA if I am not mistaken, so this might be a good reference for you.&#xD;&#xA;&#xD;&#xA;[Check it out here][1]. The download link is beneath the group's picture.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://globalgamejam.org/2011/human-era" />
  <row Id="20665" PostHistoryTypeId="25" PostId="9924" RevisionGUID="f1e1b902-d1e9-49cf-b1cd-d6cc9e97f474" CreationDate="2011-03-19T02:23:32.990" Comment="http://twitter.com/#!/StackGameDev/status/48932588919865344" />
  <row Id="20666" PostHistoryTypeId="2" PostId="9950" RevisionGUID="958e1c43-1d76-4a0b-b21d-383baf6c9f8f" CreationDate="2011-03-19T02:38:26.847" UserId="3656" Text="I haven't used SDL, and very little SFML, but the consensus I get is SFML is like SDL, but hardware accelerated and object-oriented.&#xD;&#xA;&#xD;&#xA;A quick google of your points gave me the following:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&gt; - enable double buffering&#xD;&#xA;&#xD;&#xA;- [VSync or Double Buffering in SFML][1]  &#xD;&#xA;&#xD;&#xA;&gt; - load an image from path into something that I can apply to the screen&#xD;&#xA;&gt; - apply an image to the screen with a certain x,y&#xD;&#xA;&#xD;&#xA;-  [Tutorial: Graphics - Displaying a Sprite][2]&#xD;&#xA;&#xD;&#xA;&gt; - enable transparency on an image&#xD;&#xA;&#xD;&#xA;- [Sprite Opacity][3]&#xD;&#xA;&#xD;&#xA;&gt; - (possibly) image clipping, for sprite sheets.&#xD;&#xA;&#xD;&#xA;- [sf::Sprite][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/forum/viewtopic.php?t=225&amp;sid=e2e62cad6b59beaf08b1c57d4f9d335d&#xD;&#xA;  [2]: http://www.sfml-dev.org/tutorials/1.4/graphics-sprite.php&#xD;&#xA;  [3]: http://www.sfml-dev.org/forum/viewtopic.php?t=378&amp;sid=a0ee04b5b5e7efbcee4b1935c5861a3c&#xD;&#xA;  [4]: http://www.sfml-dev.org/documentation/1.3/classsf_1_1Sprite.htm#54bf1e6b425c40b00dd544a9c4fb77df" />
  <row Id="20667" PostHistoryTypeId="25" PostId="9922" RevisionGUID="d771bab1-f98a-4a2b-9bd5-9ac1ffe4d455" CreationDate="2011-03-19T05:23:32.453" Comment="http://twitter.com/#!/StackGameDev/status/48977884991332352" />
  <row Id="20668" PostHistoryTypeId="2" PostId="9951" RevisionGUID="07e923e7-5edf-4646-aa5e-fa8b3f9819a2" CreationDate="2011-03-19T06:35:39.487" UserId="2029" Text="SFML has all those features you listed I believe. SFML is more object-oriented, while SDL is C-style. SFML does have some extra functions like rotating images, and I think scaling them.&#xD;&#xA;&#xD;&#xA;Now, this is just an educated guess, but I've heard of hardware surfaces and hardware accelerated surfaces, but reading this article: http://linuxdevcenter.com/pub/a/linux/2003/08/07/sdl_anim.html, it seems that if the two terms mean the same thing, then SFML may not really have an advantage over SDL in terms of blitting speed or blending alpha values." />
  <row Id="20669" PostHistoryTypeId="2" PostId="9952" RevisionGUID="64c8544a-d4ef-4915-b95c-d2306288bbec" CreationDate="2011-03-19T08:09:18.517" UserId="2437" Text="The lesser your entites know, the best. Do not assume your game &quot;is simple&quot;. You may want to modify, improve, update it and then a not-too-bad design will help. &#xD;&#xA;&#xD;&#xA;You can use a bus strategy : create an interface Bus. It will be able to register :&#xD;&#xA;&#xD;&#xA;- Id of the image to display;&#xD;&#xA;- If necessary, size of the image to display;&#xD;&#xA;- x &amp; y coordinates.&#xD;&#xA;&#xD;&#xA;So that would be a very simple function :&#xD;&#xA;&#xD;&#xA;    void addReference(int idimage, uint width, uint height, int x, int y);&#xD;&#xA;&#xD;&#xA;Then, the main loop will pass a reference to a Bus implementation to every entities. So your entites will need to know the interface (you can do it with an event system too, but it's not that different), but not the implementation, that's not too much a price to pay. &#xD;&#xA;This design has one quality : you can do many things with it.&#xD;&#xA;&#xD;&#xA;1°) Display as it comes : immediately after addReference, display the entity. It's what I'm using for my Roguelike, because I do not need more.&#xD;&#xA;&#xD;&#xA;2°) Wait for the full references (so you'll need to create a special object to store only display references - the logic being close to a reference system) and have rules for the display stored in the bus class.&#xD;&#xA;&#xD;&#xA;3°) Store the references received, and check if there was any change (you might want to add an entity identity number for this), so you'll only display what changes.&#xD;&#xA;&#xD;&#xA;You can have the bus do the rendering, or just be a pipeline for another class. Note that you'll have to implement a camera logic somewhere. " />
  <row Id="20670" PostHistoryTypeId="25" PostId="9933" RevisionGUID="a75bd1b7-8dbc-4685-8e88-733137307890" CreationDate="2011-03-19T08:23:32.673" Comment="http://twitter.com/#!/StackGameDev/status/49023184493748224" />
  <row Id="20671" PostHistoryTypeId="2" PostId="9953" RevisionGUID="033d7a46-d137-44e5-93ac-7829b34a1e99" CreationDate="2011-03-19T08:32:51.197" UserId="6122" Text="I want to make games like this.&#xD;&#xA;&#xD;&#xA;http://www.fantasy-mmorpg.com/&#xD;&#xA;&#xD;&#xA;simple 2d graphics but using Red Dwarf server on the background.&#xD;&#xA;&#xD;&#xA;what flash game engine should I use ?" />
  <row Id="20672" PostHistoryTypeId="1" PostId="9953" RevisionGUID="033d7a46-d137-44e5-93ac-7829b34a1e99" CreationDate="2011-03-19T08:32:51.197" UserId="6122" Text="how do I make flash mmorpg?" />
  <row Id="20673" PostHistoryTypeId="3" PostId="9953" RevisionGUID="033d7a46-d137-44e5-93ac-7829b34a1e99" CreationDate="2011-03-19T08:32:51.197" UserId="6122" Text="&lt;mmo&gt;" />
  <row Id="20674" PostHistoryTypeId="2" PostId="9954" RevisionGUID="dc425775-0ce0-4355-b9c3-4f2631663b21" CreationDate="2011-03-19T08:48:28.860" UserId="5919" Text="I was wondering if anyone had any ideas on how to get per pixel collision detection for the android.  I saw that the andEngine has great collision detection on rotation as well but couldn't see where the actual detection happened per pixel.  Also noticed a couple solutions for java, could these be replicated for use with the Android SDK?  &#xD;&#xA;&#xD;&#xA;Maybe someone here has a clean piece of code I could look at to help understand what is going on with per pixel detection and also why when rotating it is a different process.&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="20675" PostHistoryTypeId="1" PostId="9954" RevisionGUID="dc425775-0ce0-4355-b9c3-4f2631663b21" CreationDate="2011-03-19T08:48:28.860" UserId="5919" Text="per pixel based collision detection." />
  <row Id="20676" PostHistoryTypeId="3" PostId="9954" RevisionGUID="dc425775-0ce0-4355-b9c3-4f2631663b21" CreationDate="2011-03-19T08:48:28.860" UserId="5919" Text="&lt;android&gt;&lt;collision-detection&gt;&lt;rotation&gt;" />
  <row Id="20677" PostHistoryTypeId="2" PostId="9955" RevisionGUID="158aa0d6-b2ed-4250-8233-fe8c96262d27" CreationDate="2011-03-19T08:51:20.213" UserId="1156" Text="You seem to be under the opinion that an engine will allow you to make an MMORPG straight away. [Read this][1], and rethink your idea.&#xD;&#xA;&#xD;&#xA;You could probably use Flixel or FlashPunk for the engine itself. Then have fun spending a few years dealing with the networking and all the content you need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/90/why-is-it-so-hard-to-develop-a-mmo" />
  <row Id="20678" PostHistoryTypeId="5" PostId="9954" RevisionGUID="a8ce5e90-87a2-4627-8d37-db221aec61de" CreationDate="2011-03-19T08:51:37.433" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I was wondering if anyone had any ideas on how to get per pixel collision detection for the android.  I saw that the andEngine has great collision detection on rotation as well but couldn't see where the actual detection happened per pixel. Also noticed a couple solutions for java, could these be replicated for use with the Android SDK?  &#xD;&#xA;&#xD;&#xA;Maybe someone here has a clean piece of code I could look at to help understand what is going on with per pixel detection and also why when rotating it is a different process." />
  <row Id="20679" PostHistoryTypeId="2" PostId="9956" RevisionGUID="5b5fd915-43c7-4bdb-83a4-743452a9e775" CreationDate="2011-03-19T09:12:09.103" UserId="4947" Text="I haven't read those articles you linked, but whenever I want to implement constant game speed, I call elapsedTime dependent code in my render function. Just like you in your second solution. And I think it's really sufficient for this purpose. " />
  <row Id="20680" PostHistoryTypeId="2" PostId="9957" RevisionGUID="fb4cf6c9-a701-4350-832a-63b02b4faf1b" CreationDate="2011-03-19T09:12:49.307" UserId="450" Text="&gt; That would be really much traffic for such a simple game.&#xD;&#xA;&#xD;&#xA;The problem your type of game faces is that it needs to be extremely responsive. On first glance World of Warcraft may look like a highly complex game, but there is far less information that needs to be transfered to the client and status updates can be a lot less frequent. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The math look correct to me, but Kibibytes (1024) are only used for RAM, [network traffic is described using normal Kilobytes][1] (1000).&#xD;&#xA;&#xD;&#xA;You said that the server has to sent the package from the clients back to each one. That's probably the first thing you can optimize by just removing this step. The client should know what he told the server so there is no need to sent this information back to it.&#xD;&#xA;&#xD;&#xA;48,000b/s upstream + 216,000b/s downstream = 264,000b/s in sum. That is 120 MB/h.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another optimization is to only sent information from the client to the server, when the user does some action such as pressing or releasing an arrow key.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;900bytes per status update seems large. Without knowing details, I'd expect &#xD;&#xA;&#xD;&#xA;    package_header + message_type + 7 * (position + vector)&#xD;&#xA;    64             + 1            + 7 * (2*4      + 2*4) = 177 bytes&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_prefix" />
  <row Id="20681" PostHistoryTypeId="5" PostId="4773" RevisionGUID="d7a51d0f-5a9a-4433-8e38-c172fd76253d" CreationDate="2011-03-19T09:27:59.417" UserId="450" Comment="deleted 1 characters in body" Text="I'd suggest to keep things apart.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In Stendhal which is a 2D MORPG written in Java, we did the following things and it works out pretty fine:&#xD;&#xA;&#xD;&#xA;- The client uses a fast loop for drawing. It does smooth animation and some predictions to minimize lag.&#xD;&#xA;- The server uses a loop to process all the game logic. In our case it can be a lot slower than the drawing loop. While the clients make some predictions, the server always wins.&#xD;&#xA;&#xD;&#xA;Communication between client and server is done using actions and perceptions:&#xD;&#xA;&#xD;&#xA;- *Actions* done by the users like &quot;move up&quot; are sent to the server when they occur. The server queues them up and processes them in its own loop.&#xD;&#xA;- *Perceptions* are sent from the server to the client to update their view of the world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We did some &quot;tricks&quot; to gain additional performance:&#xD;&#xA;&#xD;&#xA; - We have two kinds of perception messages: A full one used on login and players joining a zone. And incremental updates used after that. This saves a lot of network bandwidth.&#xD;&#xA; - We split perception messages into a public and a private part: All players in the same zone share the same public part so we save processing time because serialisation turned out to be a bottle neck on Java (not JavaScript)." />
  <row Id="20682" PostHistoryTypeId="2" PostId="9958" RevisionGUID="6601d8f0-af0b-45f6-8ae0-402af77b1628" CreationDate="2011-03-19T10:43:02.013" UserId="20" Text="If I interpreted your comment correctly, you want to:&#xD;&#xA;*Have arbitrarily shaped sprites in Flash and automatically extract the shape of these sprites to use it as collision shapes in Box2d*&#xD;&#xA;&#xD;&#xA;Usually, collision shapes are much simpler shapes than the graphical asset they represent (performance). A highly detailed 3d Model can be represented just by a chamfered cylinder.&#xD;&#xA;&#xD;&#xA;Some physic-bodies can be created automatically by algorithms, but it's also common practice to draw/model them manually. Unless you have a huge amount of different shaped sprites, it's most likely not worthwhile to implement an algorithm that extracts shapes for you.&#xD;&#xA;&#xD;&#xA;If you have a look at the following image, you can see that a very complex shape can be represented by some circles and simple polygons (must be convex!). Drawing these shapes manually is (most likely) going to be superior to any algorithm you can come up with.&#xD;&#xA;&#xD;&#xA;![collision shapes][1]&#xD;&#xA;&#xD;&#xA;You could draw these shapes in a vector tool like Illustrator or Inkscape and export them to SVG, which can easily be parsed. Or use Flash and export the shapes as FXG, which is also a format that can easily be parsed.&#xD;&#xA;&#xD;&#xA;If I haven't convinced you yet, and you really want to programmatically create the shapes from your sprites, here are two approaches that might work.&#xD;&#xA;&#xD;&#xA; 1. Render the sprite to a bitmap (using [BitmapData.draw][2]) and perform vectorization on the alpha-channel. If the resulting shape is concave, triangulate it.&#xD;&#xA; 2. Use the [as3swf][3] library to parse an existing SWF file in flash. You can extract shape-information from there. Your main problem here is going to be: Finding the shape(s) that form the outline of your object. Convert this shape into convex polygons.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/efyGu.png&#xD;&#xA;  [2]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#draw%28%29&#xD;&#xA;  [3]: https://github.com/claus/as3swf/wiki" />
  <row Id="20683" PostHistoryTypeId="2" PostId="9959" RevisionGUID="880daf4f-9c94-40c6-b3ca-b2816d87c789" CreationDate="2011-03-19T11:16:53.573" UserId="4264" Text="First off, you shouldn't be using GLUT for anything but testing. As far as I know, GLUT was never meant for application development. I recommend picking up SDL or SFML instead.&#xD;&#xA;&#xD;&#xA;That said, implementing framerate-independent rendering is relatively simple.&#xD;&#xA;&#xD;&#xA;    // global gLastTick contains the last processed tick (ms)&#xD;&#xA;    &#xD;&#xA;    // game loop&#xD;&#xA;    int tick = getCurrentTickSomeWay();&#xD;&#xA;    if (tick &lt; gLastTick)&#xD;&#xA;    {&#xD;&#xA;      // Going too fast&#xD;&#xA;      sleep(1); // or however sleep is implemented in your framework&#xD;&#xA;      return;   // go another round&#xD;&#xA;    }&#xD;&#xA;    // Here's how the magic is done&#xD;&#xA;    while (tick &gt; gLastTick)&#xD;&#xA;    {&#xD;&#xA;      // Update game physics&#xD;&#xA;      update();&#xD;&#xA;      gLastTick += 1000 / DESIRED_PHYSICS_FPS;&#xD;&#xA;    }&#xD;&#xA;    // Now we're ready to render&#xD;&#xA;    render();&#xD;&#xA;    // and swap&#xD;&#xA;    swap(); // again, however that's done in your framework&#xD;&#xA;&#xD;&#xA;Caveats:&#xD;&#xA;&#xD;&#xA;1. If your game does not get updates for a while for some reason (break in debugger, machine goes to sleep, etc), delta between tick and gLastTick can grow rather large, so adding a safeguard &quot;if (tick - gLastTick &gt; 1000) gLastTick = tick;&quot; may be useful.&#xD;&#xA;&#xD;&#xA;2. If update() takes about as much or more time than (1000 / DESIRED_PHYSICS_FPS) ms, the game will grind to a halt. This is mostly relevant for heavy / complex physics cases (like trying to collide 10000 objects. Yes, I tried. It's heavy).&#xD;&#xA;&#xD;&#xA;3. User input is still dependent on framerate, so if framerate drops below ~20fps, depending on your game, the game may become difficult to control." />
  <row Id="20684" PostHistoryTypeId="5" PostId="9959" RevisionGUID="548ad7f3-8365-4834-b948-bf4c720180af" CreationDate="2011-03-19T11:23:00.840" UserId="4264" Comment="added 76 characters in body" Text="First off, you shouldn't be using GLUT for anything but testing. As far as I know, GLUT was never meant for application development. I recommend picking up &lt;a href=&quot;http://www.libsdl.org/&quot;&gt;SDL&lt;/a&gt; or &lt;a href=&quot;http://www.sfml-dev.org/&quot;&gt;SFML&lt;/a&gt; instead.&#xD;&#xA;&#xD;&#xA;That said, implementing framerate-independent rendering is relatively simple.&#xD;&#xA;&#xD;&#xA;    // global gLastTick contains the last processed tick (ms)&#xD;&#xA;    &#xD;&#xA;    // game loop&#xD;&#xA;    int tick = getCurrentTickSomeWay();&#xD;&#xA;    if (tick &lt; gLastTick)&#xD;&#xA;    {&#xD;&#xA;      // Going too fast&#xD;&#xA;      sleep(1); // or however sleep is implemented in your framework&#xD;&#xA;      return;   // go another round&#xD;&#xA;    }&#xD;&#xA;    // Here's how the magic is done&#xD;&#xA;    while (tick &gt; gLastTick)&#xD;&#xA;    {&#xD;&#xA;      // Update game physics&#xD;&#xA;      update();&#xD;&#xA;      gLastTick += 1000 / DESIRED_PHYSICS_FPS;&#xD;&#xA;    }&#xD;&#xA;    // Now we're ready to render&#xD;&#xA;    render();&#xD;&#xA;    // and swap&#xD;&#xA;    swap(); // again, however that's done in your framework&#xD;&#xA;&#xD;&#xA;Caveats:&#xD;&#xA;&#xD;&#xA;1. If your game does not get updates for a while for some reason (break in debugger, machine goes to sleep, etc), delta between tick and gLastTick can grow rather large, so adding a safeguard &quot;if (tick - gLastTick &gt; 1000) gLastTick = tick;&quot; may be useful.&#xD;&#xA;&#xD;&#xA;2. If update() takes about as much or more time than (1000 / DESIRED_PHYSICS_FPS) ms, the game will grind to a halt. This is mostly relevant for heavy / complex physics cases (like trying to collide 10000 objects. Yes, I tried. It's heavy).&#xD;&#xA;&#xD;&#xA;3. User input is still dependent on framerate, so if framerate drops below ~20fps, depending on your game, the game may become difficult to control." />
  <row Id="20685" PostHistoryTypeId="25" PostId="9954" RevisionGUID="c152c1c5-944a-4cf4-9155-4f09753b8d04" CreationDate="2011-03-19T11:23:32.860" Comment="http://twitter.com/#!/StackGameDev/status/49068483744505856" />
  <row Id="20686" PostHistoryTypeId="2" PostId="9960" RevisionGUID="1bbfa13e-f9e2-4579-b8bd-5fb128f52df8" CreationDate="2011-03-19T12:37:48.463" UserId="6183" Text="Considering Java 6 was released in December of 2006 and runs on just about every major operating system I would target that. Considering Java 6 doesn't really add any language features over Java 5 you could go back, if you aren't using any Java 6 features. However considering Sun stopped supporting Java 5 in November 2009 and thus support for Windows 9x I wouldn't write for it.&#xD;&#xA;&#xD;&#xA;Forcing your users have at least Java 6 has other benefits as well as it:&#xD;&#xA;&#xD;&#xA; - Guarantees your users aren't experiencing performance degradation due to using outdated libraries.&#xD;&#xA; - Reduces the number of JVMs you need to support. I've worked on projects that fail due to incompatibilities between minor versions. It's rare, but sucks when it happens. Thus it's better to target the version you are developing on or better and politely ask the user upgrade than it is to have your application crash outright because you didn't test version 1.5 Update 6.&#xD;&#xA; - Improvements to your coding style and standards. Stylistically Java has one of the slickest enum implementations ever, but you need to use at least version 1.5 to get access to it. &#xD;&#xA; - Eliminate your chances of implementing a deprecated feature. (There aren't many but they do exist.)&#xD;&#xA; - Ease your upgrade path to 1.7 which has some long overdue features.&#xD;&#xA; - Some older JVMs have security issues. Forcing your user's to upgrade helps protect them against malicious programs, written by other people of course.&#xD;&#xA;&#xD;&#xA;There are plenty of other reasons to force users to have 1.6, but without knowing your specific requirements it would take me days to list them. In the end though their is little reason to target older Java versions unless you specifically have to." />
  <row Id="20687" PostHistoryTypeId="5" PostId="9939" RevisionGUID="ccd881f9-c286-4ba8-b372-69908f788465" CreationDate="2011-03-19T12:58:35.363" UserId="1562" Comment="Added licensing (non-)details" Text="XNA Math might be for you. It's a header only C++ math library that is distributed with the latest DirectX SDK and uses SSE intrinsics. I can't talk much about its performance but from what I read about it, it seems to be pretty decent.&#xD;&#xA;&#xD;&#xA;[XNA Math Reference][1]&#xD;&#xA;&#xD;&#xA;[XNA Math programming guide][2]&#xD;&#xA;&#xD;&#xA;[DX SDK download][3]&#xD;&#xA;&#xD;&#xA;EDIT: I'm also not sure about the licensing terms. The DX SDK Eula states that &quot;Distributable Code&quot; may not be &#xD;&#xA;&#xD;&#xA;&gt; &quot;run on a platform other than the Windows, Xbox and Windows Mobile platforms;&quot;&#xD;&#xA;&#xD;&#xA;I'm not entirely sure whether this applies for xna math as only sample and utility code is explicitly marked as &quot;Distributable Code&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ee415574%28VS.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee415571%28VS.85%29.aspx&#xD;&#xA;  [3]: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba" />
  <row Id="20688" PostHistoryTypeId="5" PostId="9945" RevisionGUID="47d700b1-41b1-473f-8c08-b232bea0a987" CreationDate="2011-03-19T14:02:32.787" UserId="6178" Comment="extra code removed" Text="I've been reading Koen Witters [detailed article][1] about different game loop solutions but I'm having some problems implementing the last one with GLUT, which is the recommended one.&#xD;&#xA;&#xD;&#xA;After reading a couple of articles, tutorials and code from other people on how to achieve a constant game speed, I think that what I currently have implemented (I'll post the code below) is what Koen Witters called *Game Speed dependent on Variable FPS*, the second on his article.&#xD;&#xA;&#xD;&#xA;First, through my searching experience, there's a couple of people that probably have the knowledge to help out on this but don't know what GLUT is and I'm going to try and explain (feel free to correct me) the relevant functions for my problem of this OpenGL toolkit. Skip this section if you know what GLUT is and how to play with it.&#xD;&#xA;&#xD;&#xA;**GLUT Toolkit:**&#xD;&#xA;&#xD;&#xA; - GLUT is an OpenGL toolkit and helps with common tasks in OpenGL.&#xD;&#xA; - The `glutDisplayFunc(renderScene)` takes a pointer to a `renderScene()` function callback, which will be responsible for rendering everything. The `renderScene()` function will only be called once after the callback registration.&#xD;&#xA; - The `glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0)` takes the number of milliseconds to pass before calling the callback `processAnimationTimer()`. The last argument is just a value to pass to the timer callback. The `processAnimationTimer()` will not be called each `TIMER_MILLISECONDS` but just once.&#xD;&#xA; - The `glutPostRedisplay()` function requests GLUT to render a new frame so we need call this every time we change something in the scene.&#xD;&#xA; - The `glutIdleFunc(renderScene)` could be used to register a callback to `renderScene()` (this does not make `glutDisplayFunc()` irrelevant) but this function should be avoided because the idle callback is continuously called when events are not being received, increasing the CPU load.&#xD;&#xA; - The `glutGet(GLUT_ELAPSED_TIME)` function returns the number of milliseconds since `glutInit` was called (or first call to `glutGet(GLUT_ELAPSED_TIME)`). That's the timer we have with GLUT. I know there are better alternatives for high resolution timers, but let's keep with this one for now.&#xD;&#xA;&#xD;&#xA;I think this is enough information on how GLUT renders frames so people that didn't know about it could also pitch in this question to try and help if they fell like it.&#xD;&#xA;&#xD;&#xA;**Current Implementation:**&#xD;&#xA;&#xD;&#xA;Now, I'm not sure I have correctly implemented the second solution proposed by Koen, *Game Speed dependent on Variable FPS*. The relevant code for that goes like this:&#xD;&#xA;&#xD;&#xA;    #define TICKS_PER_SECOND 30&#xD;&#xA;    #define MOVEMENT_SPEED 2.0f&#xD;&#xA;    &#xD;&#xA;    const int TIMER_MILLISECONDS = 1000 / TICKS_PER_SECOND;&#xD;&#xA;    &#xD;&#xA;    int previousTime;&#xD;&#xA;    int currentTime;&#xD;&#xA;    int elapsedTime;&#xD;&#xA;&#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Setup the camera position and looking point&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	// Do all drawing below...&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void processAnimationTimer(int value) {&#xD;&#xA;    	// setups the timer to be called again&#xD;&#xA;    	glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0);&#xD;&#xA;    &#xD;&#xA;    	// Get the time when the previous frame was rendered&#xD;&#xA;    	previousTime = currentTime;&#xD;&#xA;    &#xD;&#xA;    	// Get the current time (in milliseconds) and calculate the elapsed time&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    	elapsedTime = currentTime - previousTime;&#xD;&#xA;    &#xD;&#xA;    	/* Multiply the camera direction vector by constant speed then by the&#xD;&#xA;    	   elapsed time (in seconds) and then move the camera */&#xD;&#xA;    	SceneCamera.Move(cameraDirection * MOVEMENT_SPEED * (elapsedTime / 1000.0f));&#xD;&#xA;    &#xD;&#xA;    	// Requests to render a new frame (this will call my renderScene() once)&#xD;&#xA;    	glutPostRedisplay();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(int argc, char **argv) {&#xD;&#xA;    	glutInit(&amp;argc, argv);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	glutDisplayFunc(renderScene);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Setup the timer to be called one first time&#xD;&#xA;    	glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0);&#xD;&#xA;    	// Read the current time since glutInit was called&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    &#xD;&#xA;    	glutMainLoop();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This implementation doesn't fell right. It works in the sense that helps the game speed to be constant dependent on the FPS. So that moving from point A to point B takes the same time no matter the high/low framerate. However, I believe I'm limiting the game framerate with this approach. Each frame will only be rendered when the time callback is called, that means the framerate will be roughly around `TICKS_PER_SECOND` frames per second. This doesn't feel right, you shouldn't limit your powerful hardware, it's wrong. It's my understanding though, that I still need to calculate the `elapsedTime`. Just because I'm telling GLUT to call the timer callback every `TIMER_MILLISECONDS`, it doesn't mean it will always do that on time.&#xD;&#xA;&#xD;&#xA;I'm not sure how can I fix this and to be completely honest, I have no idea what is the game loop in GLUT, you know, the `while( game_is_running )` loop in Koen's article. But it's my understanding that GLUT is *event-driven* and that game loop starts when I call `glutMainLoop()` (which never returns), yes?&#xD;&#xA;&#xD;&#xA;I thought I could register an idle callback with `glutIdleFunc()` and use that as replacement of `glutTimerFunc()`, only rendering when necessary (instead of all the time as usual) but when I tested this with an empty callback (like `void gameLoop() {}`) and it was basically doing nothing, only a black screen, the CPU spiked to 25% and remained there until I killed the game and it went back to normal. So I don't think that's the path to follow.&#xD;&#xA;&#xD;&#xA;Using `glutTimerFunc()` is definitely not a good approach to perform all movements/animations based on that, as I'm limiting my game to a constant FPS, not cool. Or maybe I'm using it wrong and my implementation is not right?&#xD;&#xA;&#xD;&#xA;How exactly can I have a constant game speed with variable FPS? More exactly, how do I correctly implement Koen's *Constant Game Speed with Maximum FPS* solution (the fourth one on his article) with GLUT? Maybe this is not possible at all with GLUT? If not, what are my alternatives? **What is the best approach to this problem (constant game speed) with GLUT?**&#xD;&#xA;&#xD;&#xA;*I originally posted this question on Stack Overflow before being pointed out about this site. The following is a different approach I tried after creating the question in SO, so I'm posting it here too.*&#xD;&#xA;&#xD;&#xA;**Another Approach:**&#xD;&#xA;&#xD;&#xA;I've been experimenting and here's what I was able to achieve now. Instead of calculating the elapsed time on a timed function (which limits my game's framerate) I'm now doing it in `renderScene()`. Whenever changes to the scene happen I call `glutPostRedisplay()` (ie: camera moving, some object animation, etc...) which will make a call to `renderScene()`. I can use the elapsed time in this function to move my camera for instance.&#xD;&#xA;&#xD;&#xA;My code has now turned into this:&#xD;&#xA;&#xD;&#xA;    int previousTime;&#xD;&#xA;    int currentTime;&#xD;&#xA;    int elapsedTime;&#xD;&#xA;    &#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	// Get the time when the previous frame was rendered&#xD;&#xA;    	previousTime = currentTime;&#xD;&#xA;    &#xD;&#xA;    	// Get the current time (in milliseconds) and calculate the elapsed time&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    	elapsedTime = currentTime - previousTime;&#xD;&#xA;    &#xD;&#xA;    	/* Multiply the camera direction vector by constant speed then by the&#xD;&#xA;           elapsed time (in seconds) and then move the camera */&#xD;&#xA;    	SceneCamera.Move(cameraDirection * MOVEMENT_SPEED * (elapsedTime / 1000.0f));&#xD;&#xA;    &#xD;&#xA;    	// Setup the camera position and looking point&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	// All drawing code goes inside this function&#xD;&#xA;    	drawCompleteScene();&#xD;&#xA;    &#xD;&#xA;    	glutSwapBuffers();&#xD;&#xA;    &#xD;&#xA;    	/* Redraw the frame ONLY if the user is moving the camera&#xD;&#xA;    	   (similar code will be needed to redraw the frame for other events) */&#xD;&#xA;    	if(!IsTupleEmpty(cameraDirection)) {&#xD;&#xA;    		glutPostRedisplay();&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(int argc, char **argv) {&#xD;&#xA;    	glutInit(&amp;argc, argv);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	glutDisplayFunc(renderScene);&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    &#xD;&#xA;    	glutMainLoop();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Conclusion, it's working, or so it seems. If I don't move the camera, the CPU usage is low, nothing is being rendered (for testing purposes I only have a grid extending for 4000.0f, while zFar is set to 1000.0f). When I start moving the camera the scene starts redrawing itself. If I keep pressing the move keys, the CPU usage will increase; this is normal behavior. It drops back when I stop moving.&#xD;&#xA;&#xD;&#xA;Unless I'm missing something, it seems like a good approach for now. I did find [this interesting article][2] on iDevGames and this implementation is probably affected by the problem described on that article. What's your thoughts on that?&#xD;&#xA;&#xD;&#xA;Please note that I'm just doing this for fun, I have no intentions of creating some game to distribute or something like that, not in the near future at least. If I did, I would probably go with something else besides GLUT. But since I'm using GLUT, and other than the problem described on iDevGames, do you think this latest implementation is sufficient for GLUT? The only real issue I can think of right now is that I'll need to keep calling `glutPostRedisplay()` every time the scene changes something and keep calling it until there's nothing new to redraw. A little complexity added to the code for a better cause, I think.&#xD;&#xA;&#xD;&#xA;What do you think?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.koonsolo.com/news/dewitters-gameloop/&#xD;&#xA;  [2]: http://www.idevgames.com/articles/timebasedanimation" />
  <row Id="20689" PostHistoryTypeId="25" PostId="9946" RevisionGUID="5151db4b-8cfa-4ee2-bd8f-2544c9d164a6" CreationDate="2011-03-19T14:23:32.747" Comment="http://twitter.com/#!/StackGameDev/status/49113781581787136" />
  <row Id="20690" PostHistoryTypeId="2" PostId="9961" RevisionGUID="c90e7ee4-3db6-422c-b0f1-23b14d67eb71" CreationDate="2011-03-19T14:49:42.150" UserId="6037" Text="I'm looking into building a cross-platform opensource 2D RPG style game engine for [ChaiScript](http://www.chaiscript.com). &#xD;&#xA;&#xD;&#xA;I want to be able to do all of the graphics with SVG and need joystick input. I also need the libraries I use to be opensource and compatible with the BSD license.&#xD;&#xA;&#xD;&#xA;I'm familiar with [allegro](http://alleg.sourceforge.net/), [ClanLib](http://clanlib.org), and [SDL](http://www.libsdl.org/). As far as I can tell, none of these libraries have built in or obvious integration for SVG. Also, I'm aware of the previous conversations on this site regarding Qt for SVG game development. &#xD;&#xA;&#xD;&#xA;I'm hoping to avoid Qt because of the size and complexity of making it a requirement. Also, Qt does not seem to have joystick input support, which would require that SDL or some other library also be used.&#xD;&#xA;&#xD;&#xA;So my question can be summed up as this:&#xD;&#xA;&#xD;&#xA; * What is the best way to get SVG and joystick support in a 2D C++ library while minimizing dependencies as much as possible (preferably avoiding Qt altogether)?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20691" PostHistoryTypeId="1" PostId="9961" RevisionGUID="c90e7ee4-3db6-422c-b0f1-23b14d67eb71" CreationDate="2011-03-19T14:49:42.150" UserId="6037" Text="C++ Game Library for SVG Based Game" />
  <row Id="20692" PostHistoryTypeId="3" PostId="9961" RevisionGUID="c90e7ee4-3db6-422c-b0f1-23b14d67eb71" CreationDate="2011-03-19T14:49:42.150" UserId="6037" Text="&lt;c++&gt;&lt;svg&gt;&lt;joystick&gt;" />
  <row Id="20693" PostHistoryTypeId="16" PostId="9927" RevisionGUID="319f4a10-4c31-4f7e-a2d8-6211ea65c1db" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20694" PostHistoryTypeId="16" PostId="9929" RevisionGUID="da3a238e-e7f5-43bf-9610-8cbdf0d3d3b5" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20695" PostHistoryTypeId="16" PostId="9934" RevisionGUID="8a427212-fba3-472d-b9aa-e70ec20f4300" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20696" PostHistoryTypeId="16" PostId="9939" RevisionGUID="e75dee4f-c6f9-426c-b750-97878da764c1" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20697" PostHistoryTypeId="16" PostId="9942" RevisionGUID="035632f9-a7c7-46f2-a958-bdcd8fc85f4d" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20698" PostHistoryTypeId="16" PostId="9944" RevisionGUID="006f8e95-463f-4818-b10b-75689e8481f0" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20699" PostHistoryTypeId="16" PostId="9924" RevisionGUID="bd941aa0-43f3-4fc3-980e-be297b32d4d0" CreationDate="2011-03-19T15:13:23.963" UserId="14" />
  <row Id="20700" PostHistoryTypeId="2" PostId="9962" RevisionGUID="68ab4e4f-9507-48ac-baba-0554e0a44e83" CreationDate="2011-03-19T16:28:35.710" UserId="6186" Text="In the main menu of my game i have several animations that pause in specific frames. &#xD;&#xA;&#xD;&#xA;I made the sprite sheets for the different layers, but then i found out that the sprite sheet has to be smaller than 2048 pixels. My sprite sheet is 14400 pixels with 18 frames...&#xD;&#xA;&#xD;&#xA;How can i play these large animations? i tried video playback but i couldnt find a way to do this..&#xD;&#xA;&#xD;&#xA;any help would be appreciated.&#xD;&#xA;&#xD;&#xA;~ apprentice." />
  <row Id="20701" PostHistoryTypeId="1" PostId="9962" RevisionGUID="68ab4e4f-9507-48ac-baba-0554e0a44e83" CreationDate="2011-03-19T16:28:35.710" UserId="6186" Text="Xna - How do you animate large spritesheets?" />
  <row Id="20702" PostHistoryTypeId="3" PostId="9962" RevisionGUID="68ab4e4f-9507-48ac-baba-0554e0a44e83" CreationDate="2011-03-19T16:28:35.710" UserId="6186" Text="&lt;xna&gt;" />
  <row Id="20703" PostHistoryTypeId="2" PostId="9963" RevisionGUID="3d0d9bb3-858c-4fba-9546-3474c305e447" CreationDate="2011-03-19T16:43:14.073" UserId="5864" Text="Whether you go with the torus option or not, you will need to do some wrap around, which will be the root of all the problems you will need to solve. However, they’ll be easier to address on a torus.&#xD;&#xA;&#xD;&#xA;The idea is that your world is a grid that repeats itself along both the X and Y axes.&#xD;&#xA;&#xD;&#xA;### Position wrap around ###&#xD;&#xA;&#xD;&#xA;When an object’s X or Y position goes over 1.0f (or whatever the world size is), it wraps around to 0.0f. Where you generally do computations such as:&#xD;&#xA;&#xD;&#xA;    position += velocity * time;&#xD;&#xA;&#xD;&#xA;You add wrap around logic:&#xD;&#xA;&#xD;&#xA;    position += velocity * time;&#xD;&#xA;    if (position.x &gt;= 1.0f) position.x -= 1.0f;&#xD;&#xA;    else if (position.x &lt; 0.0f) position.x += 1.0f;&#xD;&#xA;    if (position.y &gt;= 1.0f) position.y -= 1.0f;&#xD;&#xA;    else if (position.y &lt; 0.0f) position.y += 1.0f;&#xD;&#xA;&#xD;&#xA;Or, avoiding tests and securely handling the large velocity cases:&#xD;&#xA;&#xD;&#xA;    position += velocity * time;&#xD;&#xA;    position.x -= floorf(position.x);&#xD;&#xA;    position.y -= floorf(position.y);&#xD;&#xA;&#xD;&#xA;Having `1.0f` as the world size allows you to use `floorf()`, `roundf()` etc. immediately. Otherwise, you will need to use constructs such as `WORLD_SIZE * floorf(value * (1.0f / WORLD_SIZE))` instead.&#xD;&#xA;&#xD;&#xA;### Distance computation ###&#xD;&#xA;&#xD;&#xA;Computing distances changes, too. If you have two objects and one of them has `position.x = 0.1f` and the other has `position.y = 0.9f` then the distance is `0.2f`, not `0.8f`. So instead of the following distance function:&#xD;&#xA;&#xD;&#xA;    float distance(vec2 p1, vec2 p2)&#xD;&#xA;    {&#xD;&#xA;        vec2 d = p2 - p1;&#xD;&#xA;        return sqrtf(d.x * d.x + d.y * d.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You need to account for wrap around:&#xD;&#xA;&#xD;&#xA;    float distance(vec2 p1, vec2 p2)&#xD;&#xA;    {&#xD;&#xA;        vec2 d = p2 - p1;&#xD;&#xA;        d.x -= roundf(d.x);&#xD;&#xA;        d.y -= roundf(d.y);&#xD;&#xA;        return sqrtf(d.x * d.x + d.y * d.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;### Rendering ###&#xD;&#xA;&#xD;&#xA;Rendering will be tricky, too. You have several possibilities:&#xD;&#xA;&#xD;&#xA; - when the camera reaches `0.0f` or `1.0f`, render the necessary parts from the other side of the map translated by combinations of `(1.0f, 0.0f)` or `(0.0f, 1.0f)`.&#xD;&#xA; - always leave the camera at `(0.5f, 0.5f)` and move the whole world instead of the camera at each frame&#xD;&#xA;&#xD;&#xA;These are fundamentally the same, but the way you see it will dictate your data structures. The best strategy here will probably depend on the culling mechanism you have.&#xD;&#xA;&#xD;&#xA;**Edit**: sorry, I didn’t realise this was XNA. You will need to replace `roundf` and others with the equivalent `Math.Round()` etc.&#xD;&#xA;" />
  <row Id="20704" PostHistoryTypeId="5" PostId="9962" RevisionGUID="3a07efc9-6adc-47e5-b10c-f07612170a12" CreationDate="2011-03-19T17:02:20.860" UserId="51" Comment="deleted 49 characters in body; edited tags" Text="In the main menu of my game I have several animations that pause in specific frames. &#xD;&#xA;&#xD;&#xA;I made the sprite sheets for the different layers, but then I found out that the sprite sheet has to be smaller than 2048 pixels. My sprite sheet is 14400 pixels with 18 frames...&#xD;&#xA;&#xD;&#xA;How can I play these large animations? I tried video playback but I couldn't find a way to do this..." />
  <row Id="20705" PostHistoryTypeId="6" PostId="9962" RevisionGUID="3a07efc9-6adc-47e5-b10c-f07612170a12" CreationDate="2011-03-19T17:02:20.860" UserId="51" Comment="deleted 49 characters in body; edited tags" Text="&lt;xna&gt;&lt;animation&gt;&lt;spritesheet&gt;" />
  <row Id="20706" PostHistoryTypeId="25" PostId="9961" RevisionGUID="45aac54a-3500-4155-9a16-f1ac9a40eb6e" CreationDate="2011-03-19T17:23:32.783" Comment="http://twitter.com/#!/StackGameDev/status/49159079851081731" />
  <row Id="20707" PostHistoryTypeId="4" PostId="9962" RevisionGUID="9c8bf438-37c9-4c47-a63f-0cb7ee52e593" CreationDate="2011-03-19T17:33:31.910" UserId="962" Comment="edited title" Text="Xna - How do you use large animations for a menu" />
  <row Id="20708" PostHistoryTypeId="2" PostId="9964" RevisionGUID="b1820815-a4c0-4383-ac8b-fd476ec68f02" CreationDate="2011-03-19T17:48:49.577" UserId="5824" Text="You could always put each frame on a separate texture, and change the texture on your sprite to animate it." />
  <row Id="20709" PostHistoryTypeId="2" PostId="9965" RevisionGUID="13650fac-da46-4277-813f-fd6474beb985" CreationDate="2011-03-19T17:53:43.607" UserId="1694" Text="I have this irritating problem in XNA that I have spent my Saturday with:&#xD;&#xA;&#xD;&#xA;&gt;  Cannot find ContentTypeReader&#xD;&#xA;&gt; BB.HeightMapInfoReader, BB,&#xD;&#xA;&gt; Version=1.0.0.0, Culture=neutral.&#xD;&#xA;&#xD;&#xA;It throws me that when I do (within the game assembly's Renderer.cs class):&#xD;&#xA;&#xD;&#xA;    this.terrain = this.game.Content.Load&lt;Model&gt;(&quot;heightmap&quot;);&#xD;&#xA;&#xD;&#xA;There is a heightmap.bmp and I don't think there's anything wrong with it, because I used it in a previous version which I switched to this new better system.&#xD;&#xA;&#xD;&#xA;So, I have a `GeneratedGeometryPipeline` assembly that has these classes: `HeightMapInfoContent`, `HeightMapInfoWriter`, `TerrainProcessor`. The `GeneratedGeometryPipeline` assembly does not reference any other assemblies under the solution.&#xD;&#xA;&#xD;&#xA;Then I have the game assembly that neither references any other solution assemblies and has these classes: `HeightMapInfo`, `HeightMapInfoReader`.&#xD;&#xA;&#xD;&#xA;All game assembly classes are under namespace `BB` and the `GeneratedGeometryPipeline` classes are under the namespace `GeneratedGeometryPipeline`.&#xD;&#xA;&#xD;&#xA;I do not understand why it does not find it. Here's some code from the `GeneratedGeometryPipeline.HeightMapInfoWriter`:&#xD;&#xA;&#xD;&#xA;     /// &lt;summary&gt;&#xD;&#xA;        /// A TypeWriter for HeightMapInfo, which tells the content pipeline how to save the&#xD;&#xA;        /// data in HeightMapInfo. This class should match HeightMapInfoReader: whatever the&#xD;&#xA;        /// writer writes, the reader should read.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        [ContentTypeWriter]&#xD;&#xA;        public class HeightMapInfoWriter : ContentTypeWriter&lt;HeightMapInfoContent&gt;&#xD;&#xA;        {&#xD;&#xA;            protected override void Write(ContentWriter output, HeightMapInfoContent value)&#xD;&#xA;            {&#xD;&#xA;                output.Write(value.TerrainScale);&#xD;&#xA;    &#xD;&#xA;                output.Write(value.Height.GetLength(0));&#xD;&#xA;                output.Write(value.Height.GetLength(1));&#xD;&#xA;                foreach (float height in value.Height)&#xD;&#xA;                {&#xD;&#xA;                    output.Write(height);&#xD;&#xA;                }&#xD;&#xA;                foreach (Vector3 normal in value.Normals)&#xD;&#xA;                {&#xD;&#xA;                    output.Write(normal);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Tells the content pipeline what CLR type the&#xD;&#xA;            /// data will be loaded into at runtime.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            public override string GetRuntimeType(TargetPlatform targetPlatform)&#xD;&#xA;            {&#xD;&#xA;                return &quot;BB.HeightMapInfo, BB, Version=1.0.0.0, Culture=neutral&quot;;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Tells the content pipeline what worker type&#xD;&#xA;            /// will be used to load the data.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            public override string GetRuntimeReader(TargetPlatform targetPlatform)&#xD;&#xA;            {&#xD;&#xA;                return &quot;BB.HeightMapInfoReader, BB, Version=1.0.0.0, Culture=neutral&quot;;&#xD;&#xA;            }&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;Can someone help me out?" />
  <row Id="20710" PostHistoryTypeId="1" PostId="9965" RevisionGUID="13650fac-da46-4277-813f-fd6474beb985" CreationDate="2011-03-19T17:53:43.607" UserId="1694" Text="Help with &quot;Cannot find ContentTypeReader BB.HeightMapInfoReader, BB, Version=1.0.0.0, Culture=neutral.&quot; needed" />
  <row Id="20711" PostHistoryTypeId="3" PostId="9965" RevisionGUID="13650fac-da46-4277-813f-fd6474beb985" CreationDate="2011-03-19T17:53:43.607" UserId="1694" Text="&lt;xna&gt;&lt;c#&gt;&lt;terrain-rendering&gt;&lt;pipeline&gt;" />
  <row Id="20712" PostHistoryTypeId="2" PostId="9966" RevisionGUID="06657038-9b44-4b80-9dd0-5907ec345fbb" CreationDate="2011-03-19T18:05:54.790" UserId="6187" Text="I am using cocos2d to develop iPhone game, however, it is just an 2d engine and developer is too flexible to use them - i.e. codes tends to be unmanageable.&#xD;&#xA;&#xD;&#xA;Are there any more high level framework for game development, perfer using cocos2d?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="20713" PostHistoryTypeId="1" PostId="9966" RevisionGUID="06657038-9b44-4b80-9dd0-5907ec345fbb" CreationDate="2011-03-19T18:05:54.790" UserId="6187" Text="iPhone Game framework on top of cocos2d?" />
  <row Id="20714" PostHistoryTypeId="3" PostId="9966" RevisionGUID="06657038-9b44-4b80-9dd0-5907ec345fbb" CreationDate="2011-03-19T18:05:54.790" UserId="6187" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;framework&gt;" />
  <row Id="20715" PostHistoryTypeId="2" PostId="9967" RevisionGUID="da4e8f23-20f3-455b-bb25-ef22fabf38b1" CreationDate="2011-03-19T18:15:30.500" UserId="962" Text="**Don't make a sprite sheet.**&#xD;&#xA;&#xD;&#xA;You are going to want to just create a &#xD;&#xA;&#xD;&#xA;    List&lt;Texture2D&gt; &#xD;&#xA;&#xD;&#xA;with each frame of animation inside. It will be much more efficient on video memory usage, as you are only passing each frame of animation when the video card needs it, instead of loading everything in at once when you at most will be displaying one frame at a time.&#xD;&#xA;&#xD;&#xA;Save all the animation as a png sequence inside a folder of the same name. (bigBG/bigBG0001,bigBG/bigBG0002.....)&#xD;&#xA;&#xD;&#xA;Create a method that all you have to pass is the name of the folder, and have it make a sprite and add it to a &#xD;&#xA;&#xD;&#xA;    List&lt;Texture2D&gt;&#xD;&#xA;&#xD;&#xA; for each file in the folder.&#xD;&#xA;&#xD;&#xA;To get how many files are in the folder, use:&#xD;&#xA;&#xD;&#xA;    int count = Directory.GetFiles(&quot;Content/&quot;+path,&quot;*&quot;,SearchOption.TopDirectoryOnly).&#xD;&#xA;&#xD;&#xA;Create a loop that goes through all the files with the *count* as the max.&#xD;&#xA;&#xD;&#xA;You are going to need to make your method aware of how many spaces for the numbers there are and **pass that and the increment number of the loop** to a method like this.&#xD;&#xA;&#xD;&#xA;    internal static string fillZeroes(int num, int spaces)&#xD;&#xA;        {&#xD;&#xA;            string str = num.ToString();&#xD;&#xA;            for (int i = str.Count(); i &lt; spaces; i++)&#xD;&#xA;            {&#xD;&#xA;                str = &quot;0&quot; + str;&#xD;&#xA;            }&#xD;&#xA;            return str;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then you can use:&#xD;&#xA;&#xD;&#xA;    texture = rr.g.Content.Load&lt;Texture2D&gt;(path + name+ num);&#xD;&#xA;&#xD;&#xA;Add it to your List&lt;Texture2D&gt; and the loop restarts, after the loop is done, you are going to want to return the finished list.&#xD;&#xA;&#xD;&#xA;You can can now draw any frame of the animation by using:&#xD;&#xA;&#xD;&#xA;    Texture2D texture = spriteListMenu[frameNumber];&#xD;&#xA;&#xD;&#xA;and pass that texture to your spritebatch.draw " />
  <row Id="20716" PostHistoryTypeId="2" PostId="9968" RevisionGUID="69b500b4-9ed8-4a2b-a96e-145267ef626b" CreationDate="2011-03-19T18:34:18.843" UserId="20" Text="There are alternatives like [Unity3D][1], [Corona][2] or [UDK][3], but nothing (I know of) that builds on top of Cocos2D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://www.anscamobile.com/corona/&#xD;&#xA;  [3]: http://www.udk.com/" />
  <row Id="20717" PostHistoryTypeId="2" PostId="9969" RevisionGUID="603ec123-5fdd-4cd9-9b7c-d5f4ec76ecd8" CreationDate="2011-03-19T19:17:58.027" UserId="6188" Text="I'm trying to make a simple 2D animation file format. It'll be very rudimentary: only an XML file containing some parameters (such as frame duration) and metadata, and some images, each representing a frame.&#xD;&#xA;&#xD;&#xA;I'd like to have the whole animation (frames and XML document) packed in a single file. How do you suggest I do that? What libraries are there that would allow easy access to the files inside the animation file itself?&#xD;&#xA;&#xD;&#xA;The language I'm using is C++ and the platform is Windows, but I'd rather not use a platform dependent library, if possible." />
  <row Id="20718" PostHistoryTypeId="1" PostId="9969" RevisionGUID="603ec123-5fdd-4cd9-9b7c-d5f4ec76ecd8" CreationDate="2011-03-19T19:17:58.027" UserId="6188" Text="Animation file format" />
  <row Id="20719" PostHistoryTypeId="3" PostId="9969" RevisionGUID="603ec123-5fdd-4cd9-9b7c-d5f4ec76ecd8" CreationDate="2011-03-19T19:17:58.027" UserId="6188" Text="&lt;c++&gt;&lt;animation&gt;&lt;file-format&gt;" />
  <row Id="20720" PostHistoryTypeId="2" PostId="9970" RevisionGUID="b88cd928-1d3f-4914-802b-b2e7d08b0270" CreationDate="2011-03-19T19:21:25.837" UserId="5540" Text="I know this question has already been answered, but especially with the recent release of the elastic beanstalk, Amazon's Web Services are another alternative. " />
  <row Id="20721" PostHistoryTypeId="2" PostId="9971" RevisionGUID="dd5b91bb-f1c4-44b1-b21a-1ba925bc27c0" CreationDate="2011-03-19T19:42:53.447" UserId="373" Text="I'm trying to add networking functionality to my game. I want any user to be able to host the game, and anyone to be able to connect as a client. The client sends info to the host about their player's position, etc. When the host receives a message, it validates it and then broadcasts it to its other clients. I will primarily be dealing with UDP, but will also need TCP for chat &amp; lobby stuff.&#xD;&#xA;&#xD;&#xA;The problem is that I can't seem to get a packet sent from the client to the host or the other way around without enabling port forwarding on my router. But I don't think this is necessary. I believe the reason I need port forwarding is because I want to send a packet from 1 computer on a LAN to another computer on a different LAN, but neither of them have a global ip address since they're in a LAN. So really, I can only send packets targeting the other network's router, which must forward it on to the machine I want to reach. So how can I do this without port forwarding? Somehow a web server can communicate with my computer, which doesn't have a global ip, without port forwarding. And I've played plenty of multi-player games that don't require me to enable port forwarding. So it must be possible.&#xD;&#xA;&#xD;&#xA;Btw, I'm using SDL_Net. I don't think this will change anything though." />
  <row Id="20722" PostHistoryTypeId="1" PostId="9971" RevisionGUID="dd5b91bb-f1c4-44b1-b21a-1ba925bc27c0" CreationDate="2011-03-19T19:42:53.447" UserId="373" Text="networking without port forwarding" />
  <row Id="20723" PostHistoryTypeId="3" PostId="9971" RevisionGUID="dd5b91bb-f1c4-44b1-b21a-1ba925bc27c0" CreationDate="2011-03-19T19:42:53.447" UserId="373" Text="&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="20724" PostHistoryTypeId="2" PostId="9972" RevisionGUID="610967e1-a768-4a95-8707-e4496a3e6c94" CreationDate="2011-03-19T20:02:57.607" UserId="744" Text="&gt; Somehow a web server can communicate with my computer, which doesn't have a global ip, without port forwarding&#xD;&#xA;&#xD;&#xA;Importantly, the web server itself has a global IP/port pair, that uniquely identifies it. Your computer connects to the web server, which sends the information back along the same channel.&#xD;&#xA;&#xD;&#xA;This technique is obviously not available if both sides are behind some kind of NAT, as is the common case for peer-to-peer games. So instead, you need to trick the NAT.&#xD;&#xA;&#xD;&#xA;The technique you are looking for is called &lt;a href=&quot;http://en.wikipedia.org/wiki/Hole_punching&quot;&gt;hole punching or punch-through&lt;/a&gt;, in particular &lt;a href=&quot;http://en.wikipedia.org/wiki/UDP_hole_punching&quot;&gt;UDP hole punching&lt;/a&gt; or &lt;a href=&quot;http://en.wikipedia.org/wiki/TCP_hole_punching&quot;&gt;TCP hole punching&lt;/a&gt;. In this case both clients connect to a global server, which in turn tells them how to connect to each other, through the &quot;hole punched&quot; in the firewall by the existing connection.&#xD;&#xA;&#xD;&#xA;Hole punching does require a public server with a global IP/port to handle the initial connection and hand-off, but the bandwidth / processing requirements are minuscule. If you have a global lobby server, it should be able to handle it easily." />
  <row Id="20725" PostHistoryTypeId="2" PostId="9973" RevisionGUID="d50f406d-751a-4001-b55b-62ee5d6f218b" CreationDate="2011-03-19T20:15:58.833" UserId="450" Text="Many to one NAT (many computers with private addresses behind one public address) works like this: The router keeps track of outbound packets and when an answer is received it can send it to the internal computer which sent the original request. So this works fine, if you visit a website with a public ip-address.&#xD;&#xA;&#xD;&#xA;It is, however, not possible to send an initial packet from the outside to one specific computer on the inside, unless a forwarding rule is defined on the router: There is no way to address a specific computer and the router does not have information in his connection table because it is not an reply.&#xD;&#xA;&#xD;&#xA;Skype made a technique popular that is called [firewall hole punching][1]: A server with a public address is contacted by the clients. Then it sends an answer back to client A telling it to send udp packages to the router of client B on a port it expect the router of client B to use as source port for the next outbound packet. And it tells client B to send a packet to the router to client A on a port it expects the router of A to use as source port for its next outbound packet. If the prediction is correct, A and B can now talk directly which each other.&#xD;&#xA;&#xD;&#xA;Firewall hole punching requires a server with a public ip address to act as a moderator. And it requires a lot of knowledge about the implementations of common NAT router to predict the outbound source ports correctly. Although there are [open source implementations][2] available, you should try to avoid this technique because it is unreliable and causes lots of headache. Skye falls back to using the server with the public ip address to relay all packets if the predictions fail.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/UDP_hole_punching&#xD;&#xA;  [2]: http://linide.sourceforge.net/nat-traverse/" />
  <row Id="20726" PostHistoryTypeId="25" PostId="9971" RevisionGUID="ac3328a9-026b-4cdd-8eea-26b355b1706d" CreationDate="2011-03-19T20:23:32.847" Comment="http://twitter.com/#!/StackGameDev/status/49204379236052992" />
  <row Id="20727" PostHistoryTypeId="2" PostId="9974" RevisionGUID="b56ca62f-821e-43fe-9085-d6602dc87be2" CreationDate="2011-03-19T20:47:10.117" UserId="5259" Text="I'd suggest packing them into a simple .zip archive; there are several libraries out there (a good one using the minizip function of ZLib is discussed [here][1]). That way, you'll have an XML file uncluttered with other embedded information, and then all the graphics resources out in their own files inside the archive. This might also allow for better compression of the binary data (very unsure about this).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/267455/c-cross-platform-zlib-simplifer-wrapper" />
  <row Id="20728" PostHistoryTypeId="5" PostId="9967" RevisionGUID="a30ddb20-0421-4722-8c6b-354747461c48" CreationDate="2011-03-19T21:13:09.517" UserId="962" Comment="added 110 characters in body" Text="**Don't make a sprite sheet.**&#xD;&#xA;&#xD;&#xA;You are going to want to just create a &#xD;&#xA;&#xD;&#xA;    List&lt;Texture2D&gt; &#xD;&#xA;&#xD;&#xA;with each frame of animation inside. It will be much more efficient on video memory usage, as you are only passing each frame of animation when the video card needs it, instead of loading everything in at once when you at most will be displaying one frame at a time.&#xD;&#xA;&#xD;&#xA;Save all the animation as a png sequence inside a folder of the same name. (bigBG/bigBG0001,bigBG/bigBG0002.....)&#xD;&#xA;&#xD;&#xA;Create a method that all you have to pass is the name of the folder, and have it make a sprite and add it to a &#xD;&#xA;&#xD;&#xA;    List&lt;Texture2D&gt;&#xD;&#xA;&#xD;&#xA; for each file in the folder.&#xD;&#xA;&#xD;&#xA;To get how many files are in the folder, use:&#xD;&#xA;&#xD;&#xA;    int count = Directory.GetFiles(&quot;Content/&quot;+path,&quot;*&quot;,SearchOption.TopDirectoryOnly).&#xD;&#xA;&#xD;&#xA;That line references System.IO so on the top of the file in which you use this add&#xD;&#xA;&#xD;&#xA;    using System.IO;&#xD;&#xA;&#xD;&#xA;Create a loop that goes through all the files with the *count* as the max.&#xD;&#xA;&#xD;&#xA;You are going to need to make your method aware of how many spaces for the numbers there are and **pass that and the increment number of the loop** to a method like this.&#xD;&#xA;&#xD;&#xA;    internal static string fillZeroes(int num, int spaces)&#xD;&#xA;        {&#xD;&#xA;            string str = num.ToString();&#xD;&#xA;            for (int i = str.Count(); i &lt; spaces; i++)&#xD;&#xA;            {&#xD;&#xA;                str = &quot;0&quot; + str;&#xD;&#xA;            }&#xD;&#xA;            return str;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then you can use:&#xD;&#xA;&#xD;&#xA;    texture = rr.g.Content.Load&lt;Texture2D&gt;(path + name+ num);&#xD;&#xA;&#xD;&#xA;Add it to your List&lt;Texture2D&gt; and the loop restarts, after the loop is done, you are going to want to return the finished list.&#xD;&#xA;&#xD;&#xA;You can can now draw any frame of the animation by using:&#xD;&#xA;&#xD;&#xA;    Texture2D texture = spriteListMenu[frameNumber];&#xD;&#xA;&#xD;&#xA;and pass that texture to your spritebatch.draw " />
  <row Id="20732" PostHistoryTypeId="2" PostId="9976" RevisionGUID="833069a4-86a6-4fcf-a256-97d9ccc1dcfe" CreationDate="2011-03-19T21:33:46.520" UserId="1694" Text="I am in a need of implementing something we see in RTS games: team colors. Basically, I am looking for a way to colorize certain parts of a model. How would I achieve this? I have no idea where to even begin. Do I need to make some adjustments to the 3d model first?" />
  <row Id="20733" PostHistoryTypeId="1" PostId="9976" RevisionGUID="833069a4-86a6-4fcf-a256-97d9ccc1dcfe" CreationDate="2011-03-19T21:33:46.520" UserId="1694" Text="How to colorize certain parts of a model - like RTS games have those team colors?" />
  <row Id="20734" PostHistoryTypeId="3" PostId="9976" RevisionGUID="833069a4-86a6-4fcf-a256-97d9ccc1dcfe" CreationDate="2011-03-19T21:33:46.520" UserId="1694" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="20735" PostHistoryTypeId="2" PostId="9977" RevisionGUID="fd354037-ee2a-4c64-90c5-cd06821fce17" CreationDate="2011-03-19T21:53:39.933" UserId="6024" Text="I'm making a game that uses a map which have tiles, corners and borders. Here's a graphical representation:&#xD;&#xA;&#xD;&#xA;![Tiles, Borders and Corners](http://img543.imageshack.us/img543/2180/tileso.png)  &#xD;&#xA;  &#xD;&#xA;I've managed to store tiles and corners in memory but I'm having troubles to get borders structured.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For the tiles, I have a [Map Width * Map Height] sized array. For corners I have [(Map Width + 1) * (Map Height + 1)] sized array.&#xD;&#xA;I've already made up the math needed to access corners from a tile, but I can't figure out how to store and access the borders from a single array.  &#xD;&#xA;  &#xD;&#xA;Tiles store the type (and other game logic variables) and via the array index I can get the X, Y. Via this tile position it is possible to get the array index of the corners (which store the Z index).  &#xD;&#xA;The borders will store a game object and accessing corners from only border info would be also required.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If someone even has a better way to store these for better memory and performance I would gladly accept that." />
  <row Id="20736" PostHistoryTypeId="1" PostId="9977" RevisionGUID="fd354037-ee2a-4c64-90c5-cd06821fce17" CreationDate="2011-03-19T21:53:39.933" UserId="6024" Text="Arrays for a heightmap tile-based map" />
  <row Id="20737" PostHistoryTypeId="3" PostId="9977" RevisionGUID="fd354037-ee2a-4c64-90c5-cd06821fce17" CreationDate="2011-03-19T21:53:39.933" UserId="6024" Text="&lt;math&gt;&lt;tiles&gt;&lt;heightmap&gt;" />
  <row Id="20738" PostHistoryTypeId="2" PostId="9978" RevisionGUID="4175a5d7-6dfa-4148-8bd0-5e1ec56d9913" CreationDate="2011-03-19T21:55:39.027" UserId="382" Text="One technique is to have two sets of textures for each model - one red, the other blue. Then depending on which team the character is assigned to you apply that texture set.&#xD;&#xA;&#xD;&#xA;Obviously this only works if you have just two teams. While you might get away with it for more than two it starts to get inefficient.&#xD;&#xA;&#xD;&#xA;Another way is to blend two textures - the first being the base texture for the model, the second being a coloured overlay which you could generate at runtime.&#xD;&#xA;&#xD;&#xA;A third way could be to change the colour of the base model and have no textures (or partially transparent textures) over those parts of the model that you want to show the team colours." />
  <row Id="20739" PostHistoryTypeId="2" PostId="9979" RevisionGUID="837f01b2-4b33-4c6a-9bea-691f613fd80c" CreationDate="2011-03-19T22:20:55.990" UserId="6021" Text="&gt;&gt; The borders will store a game object and accessing corners from only border info would be also required.&#xD;&#xA;&#xD;&#xA;Keep a pointer/a reference to the corners in the border object? Do the same for tiles and borders?&#xD;&#xA;&#xD;&#xA;Maintaining such a linear array of borders is definitely doable - you just need to separate vertical and horizontal borders. Then you can take all the borders of one direction and order them according to their x,y coordinates (it doesn't matter which axis is considered first), then simple integer algebra can be used to find the borders corresponding to a tile at coordinates (x,y). *But still, I think you're on the wrong track. Consider using direct links between corresponding objects, as I noted above.*" />
  <row Id="20741" PostHistoryTypeId="2" PostId="9980" RevisionGUID="ee4393f8-4509-4709-9ab8-ef6b5c5b29ae" CreationDate="2011-03-19T22:39:17.440" UserId="6190" Text="Google Talk uses [libjingle][1] to achieve the same thing.&#xD;&#xA;&#xD;&#xA;Other [libraries][2] for ICE/STUN/TURN include PJNATH and libnice&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/apis/talk/libjingle/index.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Interactive_Connectivity_Establishment#External_links" />
  <row Id="20742" PostHistoryTypeId="2" PostId="9981" RevisionGUID="016e6dae-3a6d-4ef1-a7ca-b98ff0a8a406" CreationDate="2011-03-19T22:50:52.507" UserId="6191" Text="The way I would do this is based on the texture maps you are applying to the units. For most stuff you would have some regions that need to be tinted and some that do not. So for example, you might have a normal tank but you want to just change the color of some flags.&#xD;&#xA;&#xD;&#xA;If you paint the texture as if the colored regions are grayscale you can then use the alpha channel to designate which regions need to be colorized. &#xD;&#xA;&#xD;&#xA;So in your shader you could go (for the most simple way):&#xD;&#xA;&#xD;&#xA;    float3 finalColor;&#xD;&#xA;    if (colorFromTex.a &gt; 0)&#xD;&#xA;     finalColor = colorFromTex.rgb;&#xD;&#xA;    else&#xD;&#xA;     finalColor = colorFromTex.rgb*myTintColor.rgb;&#xD;&#xA;&#xD;&#xA;That's not optimal though since you will a have a hard transition and have a branch in your shader. Instead it's better to go:&#xD;&#xA;&#xD;&#xA;    float3 finalColor = lerp(colorFromTex.rgb, &#xD;&#xA;        colorFromTex.rgb*myTintColor.rgb, colorFromTex.a);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20743" PostHistoryTypeId="5" PostId="9977" RevisionGUID="6cc12ddd-b47c-436c-8476-19a35cbd1ef5" CreationDate="2011-03-19T22:52:24.907" UserId="6024" Comment="added 37 characters in body" Text="I'm making a game that uses a map which have tiles, corners and borders. Here's a graphical representation:&#xD;&#xA;&#xD;&#xA;![Tiles, Borders and Corners](http://img543.imageshack.us/img543/2180/tileso.png)  &#xD;&#xA;  &#xD;&#xA;I've managed to store tiles and corners in memory but I'm having troubles to get borders structured.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For the tiles, I have a [Map Width * Map Height] sized array. For corners I have [(Map Width + 1) * (Map Height + 1)] sized array.&#xD;&#xA;I've already made up the math needed to access corners from a tile, but I can't figure out how to store and access the borders from a single array.  &#xD;&#xA;  &#xD;&#xA;Tiles store the type (and other game logic variables) and via the array index I can get the X, Y. Via this tile position it is possible to get the array index of the corners (which store the Z index).  &#xD;&#xA;The borders will store a game object and accessing corners from only border info would be also required.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If someone even has a better way to store these for better memory and performance I would gladly accept that.&#xD;&#xA;&#xD;&#xA;EDIT: Using in C# and Javascript." />
  <row Id="20744" PostHistoryTypeId="2" PostId="9982" RevisionGUID="6b1e07f9-bffb-4935-a97a-0c29f277a46f" CreationDate="2011-03-19T22:53:19.673" UserId="2063" Text="My technique would be:&#xD;&#xA;Having 2 textures: one main texture, one second texture overlaying the main but only the parts you want to be colored.&#xD;&#xA;Change the second texture's color as you want to." />
  <row Id="20745" PostHistoryTypeId="2" PostId="9983" RevisionGUID="5fc28a8e-cf7e-4967-9a34-f7e240dff7d4" CreationDate="2011-03-19T23:02:45.570" UserId="6190" Text="I don't see any reason why you couldn't use SDL or another input library with a 2D graphics library like [libcairo][1].&#xD;&#xA;&#xD;&#xA;As for ChaiScript, have you heard of [Lua][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cairographics.org/&#xD;&#xA;  [2]: http://lua.org" />
  <row Id="20748" PostHistoryTypeId="25" PostId="9976" RevisionGUID="01908859-5ca1-462e-a827-de37329fb1fb" CreationDate="2011-03-19T23:23:32.957" Comment="http://twitter.com/#!/StackGameDev/status/49249677509529600" />
  <row Id="20749" PostHistoryTypeId="2" PostId="9985" RevisionGUID="71e04cd9-1d00-4120-bd30-f85bcea96c51" CreationDate="2011-03-20T01:20:36.760" UserId="853" Text="I'm a software engineering student with a focus on game development and am wondering how big of a part does requirement analysis play a part in game development? &#xD;&#xA;&#xD;&#xA;I'm asking because there is a class being offered I could take that is all about requirements analysis. Here is a description:&#xD;&#xA;&#xD;&#xA; An in-depth study of current research and practice in requirements elicitation, requirements, analysis, requirements specification,requirements verification and validation, and requirements management.&#xD;&#xA;&#xD;&#xA;Would this type of knowledge be useful for an independent game developer?" />
  <row Id="20750" PostHistoryTypeId="1" PostId="9985" RevisionGUID="71e04cd9-1d00-4120-bd30-f85bcea96c51" CreationDate="2011-03-20T01:20:36.760" UserId="853" Text="Requirements Analysis in Game Development?" />
  <row Id="20751" PostHistoryTypeId="3" PostId="9985" RevisionGUID="71e04cd9-1d00-4120-bd30-f85bcea96c51" CreationDate="2011-03-20T01:20:36.760" UserId="853" Text="&lt;programming&gt;" />
  <row Id="20752" PostHistoryTypeId="2" PostId="9986" RevisionGUID="33db6a86-67de-4898-9e63-a315ed31ca66" CreationDate="2011-03-20T02:06:01.847" UserId="6190" Text="You can actually write your entire game in Lua and avoid Java/ObjectiveC/C/C++ altogether.&#xD;&#xA;&#xD;&#xA;For cross platform development use [Corona][1]. Its free to use until you plan to ship to the App Store or Android Marketplace.&#xD;&#xA;&#xD;&#xA;If you want to target the iPhone/Pad/Touch take a look at [wax][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Just as a side note @Sean Edwards: I've been involved in shipping five titles targeting Nintendo DS, Wii, Sony PSP, and Xbox360, all of which used the same engine and were scripted in Lua. Its widely used on consoles and mobiles.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.anscamobile.com/corona/&#xD;&#xA;  [2]: https://github.com/probablycorey/wax" />
  <row Id="20753" PostHistoryTypeId="25" PostId="9962" RevisionGUID="5e67020d-c2dd-4379-a997-8184099a033e" CreationDate="2011-03-20T02:23:33.387" Comment="http://twitter.com/#!/StackGameDev/status/49294978173763585" />
  <row Id="20754" PostHistoryTypeId="2" PostId="9987" RevisionGUID="2e24f11c-f1ad-4812-ac0a-3a4f425aaccc" CreationDate="2011-03-20T02:26:07.673" UserId="5687" Text="Some background: I'm poking at a set of puzzles along the lines of Rush Hour/Sokoban/etc; for want of a better description, call them 'motion planning' puzzles - the player has to figure out the correct sequence of moves to achieve a particular configuration.  (It's the sort of puzzle that's generically PSPACE-complete if that actually helps anyone's mental image).&#xD;&#xA;&#xD;&#xA;While I have a few straightforward 'building blocks' that I can use for puzzle crafting and I have a few basic examples put together, I'm trying to figure out how to avoid too much sameness over a large swath of these kinds of puzzles, and I'm also trying to figure out how to make puzzles that have more of a feel of logical solution than trial-and-error.  Does anyone know of good resources out there for designing instances of this sort of puzzle once the core puzzle rules are in place?  Most of what I've found on puzzle design only covers creating the puzzle rules, not building interesting puzzles out of a set of rules.&#xD;&#xA;" />
  <row Id="20755" PostHistoryTypeId="1" PostId="9987" RevisionGUID="2e24f11c-f1ad-4812-ac0a-3a4f425aaccc" CreationDate="2011-03-20T02:26:07.673" UserId="5687" Text="Are there any resources for motion-planning puzzle design?" />
  <row Id="20756" PostHistoryTypeId="3" PostId="9987" RevisionGUID="2e24f11c-f1ad-4812-ac0a-3a4f425aaccc" CreationDate="2011-03-20T02:26:07.673" UserId="5687" Text="&lt;design&gt;&lt;puzzle&gt;" />
  <row Id="20757" PostHistoryTypeId="2" PostId="9988" RevisionGUID="4781e66d-5325-4ae9-b1b6-e69fe4a326b5" CreationDate="2011-03-20T02:31:13.453" UserId="6194" Text="I think you might wanna try **Unity3D**. I haven't dive in it much, but I knew that Unity comes with level editor (and it's 3D, by the way). Game programming is done using javascript (CMIIW). Another good thing about unity is that it can be played in browser (provided you have the unity player), so your game can reach players easily. **Kongregate** hosts unity games, you may want to check them out.&#xD;&#xA;&#xD;&#xA;Other platform that I'd like to suggest is Flash (using ActionScript 3.0, to be specific). I believe flash can make your game up and running quickly. It doesn't have native level editor (it's not even a game engine anyway), but there are ways like [this][3] to do just that. Physics are mainly done using third party library called **Box2D**, and there is also [box2d game level editor][5] available to use. There are also frameworks that builds on top of AS3, such as **flixel** and **flashpunk**, that helps a lot when developing 2D platformer game.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;  [3]: http://gamedev.michaeljameswilliams.com/2009/06/01/use-flash-ide-as-level-editor/&#xD;&#xA;  [5]: http://www.sideroller.com/wck/" />
  <row Id="20758" PostHistoryTypeId="2" PostId="9989" RevisionGUID="5ffd1d7c-63af-430a-aa84-8e564dda77b5" CreationDate="2011-03-20T02:34:57.973" UserId="6190" Text="Skip it.&#xD;&#xA;&#xD;&#xA;What area of Game Development are you interested in going into? I'm assuming Programmer but...&#xD;&#xA;&#xD;&#xA;Designer: They write a lot. A whole lot. There is usually a design document which communicates the designers vision but for everyone else except the producer or publisher you'll normally get the information from the designer themselves.&#xD;&#xA;&#xD;&#xA;Programmer: The lead determines the technical requirements which will depend hugely on the platform and the asset pipeline. You'll learn how to do this as you work with your lead on the job.&#xD;&#xA;&#xD;&#xA;Artist: Again its the lead artist along with the lead programmer who usually set the requirements for art assets. Learn on the job.&#xD;&#xA;&#xD;&#xA;Requirements analysis, like the course they will most likely be teaching, is useful for big corporations trying to justify spending money and for outsourcing. And its often done by someone who once coded and has possibly since forgotten. *stab*&#xD;&#xA;&#xD;&#xA;If you plan to go indie take a business/accounting/management subject. You'll need it to survive and not get screwed. Good Luck." />
  <row Id="20759" PostHistoryTypeId="2" PostId="9990" RevisionGUID="ff31bd8c-a05e-4012-93b8-15ea5afc3fc5" CreationDate="2011-03-20T03:02:53.647" UserId="6194" Text="From what I know, pixel perfect collision detection is done this way :&#xD;&#xA;&#xD;&#xA; - Convert two checked objects coordinate into world coordinate&#xD;&#xA; - Get their bounding box, check for intersection&#xD;&#xA; - if intersection occurs, check every pixel from both objects inside the intersection&#xD;&#xA; - if both objects have non-alpha pixels in the same location inside the intersection, then collision is confirmed.&#xD;&#xA;&#xD;&#xA;Sorry, I have no code to share, since I haven't write one in java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But most of the time my game objects doesn't need pixel perfect collision detection. If it is complex enough, I use multiple bounding boxes (circles, usually) to represent the object." />
  <row Id="20760" PostHistoryTypeId="2" PostId="9991" RevisionGUID="d6073158-9b22-4fa5-a57a-327e25758aea" CreationDate="2011-03-20T03:42:36.763" UserId="6198" Text="It seems to me that most of these types of puzzles can be related to solving an over-constrained system of equations that happens to have a solution.  I'm not sure if that makes sense, but if you can somehow relate your rules to a system of equations, then build &quot;solutions&quot; from what you know the answer to be, it might lead to interesting problems.  It also means that the puzzles are entirely mathematical and not &quot;motion-like&quot; at all.  Just a bunch of  static equations :-)&#xD;&#xA;&#xD;&#xA;Another way of looking at it is considering that the simpler types of these puzzles have direct solutions --- that is, move a piece, then another, then another &amp; then it's solved!, but the more complicated ones can force you down a path that doesn't seem obvious at first.  Start from the final solution and applying your rules in reverse to complicate the initial conditions will also help.  Looking at each rule application as a branch on a tree or graph, the interesting puzzles are very dense with only one or two paths that lead to solutions instead of many paths that lead to solutions.&#xD;&#xA;&#xD;&#xA;I hope that helps,&#xD;&#xA;&#xD;&#xA;Lee." />
  <row Id="20761" PostHistoryTypeId="25" PostId="9977" RevisionGUID="9a62db56-7752-46b8-afa6-451fa897646f" CreationDate="2011-03-20T05:23:33.933" Comment="http://twitter.com/#!/StackGameDev/status/49340279119024128" />
  <row Id="20762" PostHistoryTypeId="2" PostId="9992" RevisionGUID="0633e0af-ab75-45d2-9bdd-e31939805b60" CreationDate="2011-03-20T06:35:50.447" UserId="2710" Text="Look closely at your own illustration. What you've drawn here is a **single two-dimensional array**. Make an array of size `[MapWidth*2+1, MapHeight*2+1]` and store everything there. Elements where both coordinates are even will hold corners, where both coordinates are odd will hold tiles, and the rest will hold borders. You'd have to have a common base class for them, but I don't think that's a problem.&#xD;&#xA;&#xD;&#xA;Of course, this is a little unintuitive, but adding a wrapper object around this array will solve it." />
  <row Id="20763" PostHistoryTypeId="5" PostId="9985" RevisionGUID="0010a719-e415-4c1a-8561-234091c1a703" CreationDate="2011-03-20T06:49:49.107" UserId="1198" Comment="quote and wording" Text="I'm a software engineering student with a focus on game development and am wondering how big of a part does requirement analysis play a part in game development? &#xD;&#xA;&#xD;&#xA;I'm asking because there is a class being offered and I could take it. It is all about requirements analysis. Here is a description:&#xD;&#xA;&#xD;&#xA;&gt;An in-depth study of current research and practice in requirements elicitation, requirements, analysis, requirements specification,requirements verification and validation, and requirements management.&#xD;&#xA;&#xD;&#xA;Would this type of knowledge be useful for an independent game developer?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20764" PostHistoryTypeId="24" PostId="9985" RevisionGUID="0010a719-e415-4c1a-8561-234091c1a703" CreationDate="2011-03-20T06:49:49.107" Comment="Proposed by 1198 approved by 51 edit id of 89" />
  <row Id="20765" PostHistoryTypeId="2" PostId="9993" RevisionGUID="13980e3c-7fd7-4d31-bacb-100a94085bfc" CreationDate="2011-03-20T06:59:30.547" UserId="6122" Text="What does it mean to bake lightmap ? I heard this in Unity3d, and again found this LightUp plugin for sketchup that bakes lightmap.&#xD;&#xA;&#xD;&#xA;From what I observe, the lightmap baked gives the 3d object a much more realistic feel. Is the purpose of baking light on object to give that cg animation look you see on pre-rendered animations?" />
  <row Id="20766" PostHistoryTypeId="1" PostId="9993" RevisionGUID="13980e3c-7fd7-4d31-bacb-100a94085bfc" CreationDate="2011-03-20T06:59:30.547" UserId="6122" Text="what is it mean to &quot;bake light&quot; ?" />
  <row Id="20767" PostHistoryTypeId="3" PostId="9993" RevisionGUID="13980e3c-7fd7-4d31-bacb-100a94085bfc" CreationDate="2011-03-20T06:59:30.547" UserId="6122" Text="&lt;lighting&gt;" />
  <row Id="20768" PostHistoryTypeId="2" PostId="9994" RevisionGUID="23db5881-deb2-40c3-89f2-f4c00a92f16f" CreationDate="2011-03-20T07:12:02.660" UserId="189" Text="When you have a static (non-moving) light in a game, you have two options for rendering this light. You could render it the same as a dynamic light; that is, feed it through the shader pipeline which will calculate its effect on everything around it, every frame, on its way to the screen. This is obviously pretty expensive. Or, an editor can bake the light into the scene.&#xD;&#xA;&#xD;&#xA;What I've always thought of baking was perhaps a more simple version: basically the editor just takes the textures of everything around the light, calculates the effect of the light on those textures (brightens them, perhaps colors them, shadows, etc.), and saves them as replacement textures to use. So all the textures around the &quot;light&quot; look like they have a light cast on them, but at runtime there actually isn't a light from a calculation standpoint; it's an optical illusion, essentially.&#xD;&#xA;&#xD;&#xA;Unity, however, seems to be generating a [lightmap][1]. This is similar to the above notion, but the baked lighting is kept separately instead of modifying the underlying texture, and I assume a shader merges the two at runtime. This would have the advantage of keeping the advantage of tiled textures (i.e. low memory usage), since they wouldn't have the light baked right into them therefore they could remain tiled, and the shader would be very lightweight, especially compared to treating the light as dynamic.&#xD;&#xA;&#xD;&#xA;A light obviously needs to be static for this to work; that is, you can't move it during gameplay, because the light has been baked into the textures. Also, any dynamic objects in the room (such as the player character) won't have the light shining on them so there needs to be some sort of exception, where the light is rendered for dynamic objects but not (re-)rendered on the static scenery.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Lightmap" />
  <row Id="20769" PostHistoryTypeId="25" PostId="9993" RevisionGUID="a37b9d38-6954-464b-af35-0c551d8424cc" CreationDate="2011-03-20T08:23:33.477" Comment="http://twitter.com/#!/StackGameDev/status/49385575681241088" />
  <row Id="20770" PostHistoryTypeId="2" PostId="9995" RevisionGUID="3efda5f8-1e42-40fb-89d4-01d07fc44dbc" CreationDate="2011-03-20T08:29:03.740" UserId="957" Text="One incredibly simple thing to do is use &lt;a href=&quot;http://pypi.python.org/pypi/psyco/1.6&quot;&gt;psyco&lt;/a&gt;. I don't know how much it will help, but since all it requires is&#xD;&#xA;&#xD;&#xA;     import psyco&#xD;&#xA;     psyco.full()&#xD;&#xA;&#xD;&#xA;to start running, you may as well give it a try." />
  <row Id="20771" PostHistoryTypeId="2" PostId="9996" RevisionGUID="b5229569-57f9-4f59-93bd-4c030d9af9ac" CreationDate="2011-03-20T08:47:49.923" UserId="962" Text="You might want to check out XNA. There is a lot of resources online showing how to create games in XNA, and there are a lot of people on here who know a good deal about XNA, C# and .NET.&#xD;&#xA;&#xD;&#xA;You might have to step outside of your comfort zone of game maker, but if you really want large levels with good performance, you are going to want real language, and proper GPU acceleration.&#xD;&#xA;&#xD;&#xA;XNA is much more suited to create 2D games than Unity, but XNA excels at 3D games as well. XNA is completely free and has no limitations, while Unity is free, but for some of the more desired features like color correction and other post processing, you would have to buy the full version which is not cheap.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20772" PostHistoryTypeId="2" PostId="9997" RevisionGUID="49171997-c282-4b9e-ba36-ec7e2568c946" CreationDate="2011-03-20T11:09:31.897" UserId="6201" Text="Its simply how you make the player feel he/she's inside the game by just listening to the music. The composer should know how to deliver the music depending on the environment and situation the scene offers." />
  <row Id="20773" PostHistoryTypeId="6" PostId="9977" RevisionGUID="ce967cde-5a0a-4f2f-8e1c-2d01f72ff5ee" CreationDate="2011-03-20T11:21:07.987" UserId="1156" Comment="edited tags" Text="&lt;c#&gt;&lt;math&gt;&lt;tiles&gt;&lt;javascript&gt;&lt;heightmap&gt;" />
  <row Id="20774" PostHistoryTypeId="6" PostId="9985" RevisionGUID="f005eb87-ee0f-42ec-a103-9b94a6902d21" CreationDate="2011-03-20T11:22:04.087" UserId="1156" Comment="edited tags" Text="&lt;programming&gt;&lt;education&gt;&lt;indie&gt;" />
  <row Id="20775" PostHistoryTypeId="25" PostId="9985" RevisionGUID="64421655-6e4e-40fc-8538-ec191c2e1b14" CreationDate="2011-03-20T11:23:33.663" Comment="http://twitter.com/#!/StackGameDev/status/49430874986528768" />
  <row Id="20776" PostHistoryTypeId="2" PostId="9998" RevisionGUID="e09ab307-4f57-4d4e-ad51-25e510bcdbe3" CreationDate="2011-03-20T11:33:52.757" UserId="6202" Text="Any recommendations for a good isometric game engine that is also free?&#xD;&#xA;&#xD;&#xA;1. Should be possible to develop entirely using freely available tools (meaning: no Flash, and no I don't want to learn haXe...)&#xD;&#xA;2. Works-in-a-browser is a plus, but not required.&#xD;&#xA;3. Support for 32-bit images is required!&#xD;&#xA;4. Good performance.&#xD;&#xA;5. Excellent documentation.&#xD;&#xA;&#xD;&#xA;I have looked at FIFE but it is still too unfinished, and the documentation sucks!&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="20777" PostHistoryTypeId="1" PostId="9998" RevisionGUID="e09ab307-4f57-4d4e-ad51-25e510bcdbe3" CreationDate="2011-03-20T11:33:52.757" UserId="6202" Text="Good, free isometric game engine?" />
  <row Id="20778" PostHistoryTypeId="3" PostId="9998" RevisionGUID="e09ab307-4f57-4d4e-ad51-25e510bcdbe3" CreationDate="2011-03-20T11:33:52.757" UserId="6202" Text="&lt;engine&gt;&lt;isometric&gt;" />
  <row Id="20779" PostHistoryTypeId="2" PostId="9999" RevisionGUID="e7642559-538e-42e2-a631-da883db1c090" CreationDate="2011-03-20T11:40:12.833" UserId="1101" Text="It's correct that Pygame does not use the 3D acceleration capabilities of your video card. This is because it is based on SDL which has the same limitation. One alternative is to rewrite your game in a system like [pyglet][1] which *does* natively support OpenGL accelerated sprites, to find a similar library for graphics only, or to write the OpenGL code yourself for this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pyglet.org/" />
  <row Id="20780" PostHistoryTypeId="2" PostId="10000" RevisionGUID="d800ebe8-949d-4e66-9584-27dd93ec3a9c" CreationDate="2011-03-20T13:02:15.080" UserId="6194" Text="I have created games using [as3isolib][1] and it works really great for me. It is library for actionscript 3.0 (flash), and as bummzack said in comment, you can develop flash games using only free tools.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/as3isolib/" />
  <row Id="20781" PostHistoryTypeId="2" PostId="10001" RevisionGUID="87596a6c-89e8-4859-bfb0-0eeb219d114f" CreationDate="2011-03-20T13:09:51.247" UserId="1156" Text="There's always [Unity3D][1] for everything. ;D&#xD;&#xA;It supports browsers, performs excellently, and has good documentation. You could use the orthographic camera for isometric easily.&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="20782" PostHistoryTypeId="2" PostId="10002" RevisionGUID="95ecff98-0aaa-439c-85bb-292fe4fd62b7" CreationDate="2011-03-20T13:10:43.057" UserId="6203" Text="Hey everyone, could someone help me out on this question?&#xD;&#xA;When I am trying to texture objects in maya (for example a barrel) I want to texture it with a brush. When I try to use the 3D painting tool it al gets black even when I have a image file selected. Also the resolution is very very low of the models and textures in maya, though the texture image is very high quality. Can someone please help me? Thanks so much for helping." />
  <row Id="20783" PostHistoryTypeId="1" PostId="10002" RevisionGUID="95ecff98-0aaa-439c-85bb-292fe4fd62b7" CreationDate="2011-03-20T13:10:43.057" UserId="6203" Text="3D Paint tool in Maya" />
  <row Id="20784" PostHistoryTypeId="3" PostId="10002" RevisionGUID="95ecff98-0aaa-439c-85bb-292fe4fd62b7" CreationDate="2011-03-20T13:10:43.057" UserId="6203" Text="&lt;tools&gt;&lt;textures&gt;&lt;objects&gt;&lt;maya&gt;" />
  <row Id="20785" PostHistoryTypeId="25" PostId="9998" RevisionGUID="e15832a6-ac0c-411a-8df7-2b0e3be3ed17" CreationDate="2011-03-20T14:23:34.210" Comment="http://twitter.com/#!/StackGameDev/status/49476174602174464" />
  <row Id="20786" PostHistoryTypeId="2" PostId="10003" RevisionGUID="347d300a-9d95-4440-ab18-903982aefb20" CreationDate="2011-03-20T16:57:52.850" UserId="6188" Text="I'm trying to write the graphics module of my engine. That is, this part of the code only provides an interface through which to load images, fonts, etc and draw them on the screen. It is also a wrapper for the library I'm using (SDL in this case).&#xD;&#xA;&#xD;&#xA;Here are the interfaces for my `Image`, `Font` and `GraphicsRenderer` classes. Please tell me if I'm going the right way. &#xD;&#xA;&#xD;&#xA;**Image**&#xD;&#xA;&#xD;&#xA;	class Image&#xD;&#xA;	{&#xD;&#xA;	  public:&#xD;&#xA;		Image();&#xD;&#xA;		Image(const Image&amp; other);&#xD;&#xA;		Image(const char* file);&#xD;&#xA;		~Image();&#xD;&#xA;&#xD;&#xA;		bool load(const char* file);&#xD;&#xA;		void free();&#xD;&#xA;		bool isLoaded() const;&#xD;&#xA;&#xD;&#xA;		Image&amp; operator=(const Image&amp; other);&#xD;&#xA;&#xD;&#xA;	  private:&#xD;&#xA;		friend class GraphicsRenderer;&#xD;&#xA;		void* data_;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;**Font**&#xD;&#xA;&#xD;&#xA;	class Font&#xD;&#xA;	{&#xD;&#xA;	  public:&#xD;&#xA;		Font();&#xD;&#xA;		Font(const Font&amp; other);&#xD;&#xA;		Font(const char* file, int ptsize);&#xD;&#xA;		~Font();&#xD;&#xA;&#xD;&#xA;		void load(const char* file, int ptsize);&#xD;&#xA;		void free();&#xD;&#xA;		bool isLoaded() const;&#xD;&#xA;&#xD;&#xA;		Font&amp; operator=(const Font&amp; other);&#xD;&#xA;&#xD;&#xA;	  private:&#xD;&#xA;		friend class GraphicsRenderer;&#xD;&#xA;		void* data_;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;**GrapphicsRenderer**&#xD;&#xA;&#xD;&#xA;	class GraphicsRenderer&#xD;&#xA;	{&#xD;&#xA;	  public:&#xD;&#xA;		static GraphicsRenderer* Instance();&#xD;&#xA;&#xD;&#xA;		void blitImage(const Image&amp; img, int x, int y);&#xD;&#xA;		void blitText(const char* string, const Font&amp; font, int x, int y);&#xD;&#xA;		void render();&#xD;&#xA;&#xD;&#xA;	  protected:&#xD;&#xA;		GraphicsRenderer();&#xD;&#xA;		GraphicsRenderer(const GraphicsRenderer&amp; other);&#xD;&#xA;		GraphicsRenderer&amp; operator=(const GraphicsRenderer&amp; other);&#xD;&#xA;		~GraphicsRenderer();&#xD;&#xA;&#xD;&#xA;	  private:&#xD;&#xA;		void* screen_;&#xD;&#xA;&#xD;&#xA;		bool initialize();&#xD;&#xA;		void finalize();&#xD;&#xA;	};" />
  <row Id="20787" PostHistoryTypeId="1" PostId="10003" RevisionGUID="347d300a-9d95-4440-ab18-903982aefb20" CreationDate="2011-03-20T16:57:52.850" UserId="6188" Text="Graphics module: Am I going the right way?" />
  <row Id="20788" PostHistoryTypeId="3" PostId="10003" RevisionGUID="347d300a-9d95-4440-ab18-903982aefb20" CreationDate="2011-03-20T16:57:52.850" UserId="6188" Text="&lt;game-design&gt;&lt;c++&gt;&lt;sdl&gt;" />
  <row Id="20789" PostHistoryTypeId="2" PostId="10004" RevisionGUID="6be0b64b-294b-4ea4-8790-10ceea287b8e" CreationDate="2011-03-20T17:20:46.847" UserId="4662" Text="Singleton = BAD, remove immediately. Fonts and Images should not have a `free()` function, that should be the job of the destructor. The `GraphicsRenderer` should not offer those `Blit` functions, they should be functions of the Font/Image, and those classes should be created by the GraphicsRenderer class. Finally, for encapsulation, use inheritance, not PIMPL." />
  <row Id="20790" PostHistoryTypeId="25" PostId="10003" RevisionGUID="29298d6d-55a2-4201-bafc-1d39e32f78b2" CreationDate="2011-03-20T17:23:33.733" Comment="http://twitter.com/#!/StackGameDev/status/49521472506564608" />
  <row Id="20791" PostHistoryTypeId="5" PostId="10004" RevisionGUID="63f49d11-07ea-453d-9cd0-eb30b09d9337" CreationDate="2011-03-20T17:29:48.457" UserId="4662" Comment="added 2456 characters in body; deleted 768 characters in body; added 5 characters in body" Text="Singleton = BAD, remove immediately. Fonts and Images should not have a `free()` function, that should be the job of the destructor. The `GraphicsRenderer` should not offer those `Blit` functions, you should offer object-orientated classes which will provide a position for each sprite, and the actual rendering automatically managed by the GraphicsRenderer. Finally, for encapsulation, use inheritance, not PIMPL, and *definitely* do not use a void*, use a strongly typed opaque pointer.&#xD;&#xA;&#xD;&#xA;Here are some excerpts from my own design, although I've used compile-time switching and not run-time inheritance.&#xD;&#xA;&#xD;&#xA;    class D3D9Render &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        std::shared_ptr&lt;D3D9Font&gt; CreateFont();&#xD;&#xA;    };&#xD;&#xA;    class D3D9Font &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        // PUBLIC INTERFACE ---------------------------------------------------&#xD;&#xA;        std::unique_ptr&lt;D3D9Text&gt; CreateText();&#xD;&#xA;&#xD;&#xA;        int Height();&#xD;&#xA;        D3D9Font* Height(char newheight);&#xD;&#xA;        D3D9Font(D3D9Render&amp; ref);&#xD;&#xA;&#xD;&#xA;        int Width();&#xD;&#xA;        D3D9Font* Width(char newwidth);&#xD;&#xA;        int Weight();&#xD;&#xA;        D3D9Font* Weight(short newweight);&#xD;&#xA;        bool Italic();&#xD;&#xA;        D3D9Font* Italic(bool newitalic);&#xD;&#xA;        string Font();&#xD;&#xA;        D3D9Font* Font(string str);&#xD;&#xA;        D3D9Font* CommitChanges();&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    class D3D9Text &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;&#xD;&#xA;        // PUBLIC INTERFACE ---------------------------------------------------&#xD;&#xA;        D3D9Text* Text(string str);&#xD;&#xA;        D3D9Text* PositionSizeX(short newx, short newxsize);&#xD;&#xA;        D3D9Text* PositionSizeY(short newy, short newysize);&#xD;&#xA;        D3D9Text* Font(std::shared_ptr&lt;D3D9Font&gt; ref);&#xD;&#xA;        D3D9Text* Colour(unsigned int newcolour);&#xD;&#xA;        string Text();&#xD;&#xA;        int PositionX();&#xD;&#xA;        int PositionY();&#xD;&#xA;        int SizeX();&#xD;&#xA;        int SizeY();&#xD;&#xA;        std::shared_ptr&lt;D3D9Font&gt; Font();&#xD;&#xA;        unsigned int Colour();&#xD;&#xA;        D3D9Text* CommitChanges();&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Here, the memory is managed for you- all ownership is managed via smart pointing, and the interface is completely object orientated." />
  <row Id="20792" PostHistoryTypeId="5" PostId="10004" RevisionGUID="0c116ac4-adaa-463c-96b2-9661f262efc6" CreationDate="2011-03-20T17:37:30.697" UserId="4662" Comment="added 4 characters in body" Text="Singleton = BAD, remove immediately. Fonts and Images should not have a `free()` function, that should be the job of the destructor. The `GraphicsRenderer` should not offer those `Blit` functions, you should offer object-orientated classes which will provide a position for each end result, and the actual rendering automatically managed by the GraphicsRenderer. Finally, for encapsulation, use inheritance, not PIMPL, and *definitely* do not use a void*, use a strongly typed opaque pointer.&#xD;&#xA;&#xD;&#xA;Here are some excerpts from my own design, although I've used compile-time switching and not run-time inheritance.&#xD;&#xA;&#xD;&#xA;    class D3D9Render &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        std::shared_ptr&lt;D3D9Font&gt; CreateFont();&#xD;&#xA;    };&#xD;&#xA;    class D3D9Font &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        // PUBLIC INTERFACE ---------------------------------------------------&#xD;&#xA;        std::unique_ptr&lt;D3D9Text&gt; CreateText();&#xD;&#xA;&#xD;&#xA;        int Height();&#xD;&#xA;        D3D9Font* Height(char newheight);&#xD;&#xA;        D3D9Font(D3D9Render&amp; ref);&#xD;&#xA;&#xD;&#xA;        int Width();&#xD;&#xA;        D3D9Font* Width(char newwidth);&#xD;&#xA;        int Weight();&#xD;&#xA;        D3D9Font* Weight(short newweight);&#xD;&#xA;        bool Italic();&#xD;&#xA;        D3D9Font* Italic(bool newitalic);&#xD;&#xA;        string Font();&#xD;&#xA;        D3D9Font* Font(string str);&#xD;&#xA;        D3D9Font* CommitChanges();&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    class D3D9Text &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;&#xD;&#xA;        // PUBLIC INTERFACE ---------------------------------------------------&#xD;&#xA;        D3D9Text* Text(string str);&#xD;&#xA;        D3D9Text* PositionSizeX(short newx, short newxsize);&#xD;&#xA;        D3D9Text* PositionSizeY(short newy, short newysize);&#xD;&#xA;        D3D9Text* Font(std::shared_ptr&lt;D3D9Font&gt; ref);&#xD;&#xA;        D3D9Text* Colour(unsigned int newcolour);&#xD;&#xA;        string Text();&#xD;&#xA;        int PositionX();&#xD;&#xA;        int PositionY();&#xD;&#xA;        int SizeX();&#xD;&#xA;        int SizeY();&#xD;&#xA;        std::shared_ptr&lt;D3D9Font&gt; Font();&#xD;&#xA;        unsigned int Colour();&#xD;&#xA;        D3D9Text* CommitChanges();&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Here, the memory is managed for you- all ownership is managed via smart pointing, and the interface is completely object orientated." />
  <row Id="20793" PostHistoryTypeId="2" PostId="10005" RevisionGUID="3bef8cb5-f00b-4dfe-9b66-759f5fe994c5" CreationDate="2011-03-20T17:38:25.713" UserId="1156" Text="First things I can spot:&#xD;&#xA;&#xD;&#xA; - Singletons are very very bad, usually. It's not 'Hm, do I only want one of these?' but more 'Hm, will more than one of these break the program?'.&#xD;&#xA; - void* pointers are also rather risky. Why do you need one? Bad design somewhere.&#xD;&#xA; - `Font` and `Image` seem to be closely related. Maybe you could take some of the functionality up the hierachy to a `Renderable`.&#xD;&#xA; - I think this is me, but any reason why you're using `const char*` over `std::string`?" />
  <row Id="20794" PostHistoryTypeId="17" PostId="10007" RevisionGUID="2a23ee5a-b746-4704-aa25-f7a29105c40a" CreationDate="2011-03-20T17:40:16.060" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/60065/can-you-share-some-urls-for-tutorials-that-demonstrate-programming-basic-game-log/60067#60067" Text="" />
  <row Id="20795" PostHistoryTypeId="2" PostId="10007" RevisionGUID="41a78bfd-9c39-4e5e-bf49-a2e4d7d4b31c" CreationDate="2011-03-20T03:08:54.543" UserDisplayName="Kenneth" Text="Suggestions for topics to research:&#xD;&#xA;&#xD;&#xA;1. Machine Learning (this involves the program in some way being able to modify certain things to somehow &quot;improve&quot; its performance based on supplied information or &quot;learned&quot; information)&#xD;&#xA;2. Search Algorithms such as: A*, AO*, Best First Search&#xD;&#xA;3. Problem Reduction Strategies (includes eliminating bad search options and using heuristics)" />
  <row Id="20796" PostHistoryTypeId="2" PostId="10006" RevisionGUID="38e23846-cf85-48b6-92c2-184a1a4736c7" CreationDate="2011-03-20T03:01:12.853" UserDisplayName="hal10001" Text="I'm really looking for some of the basic concepts to get started, like decision trees and some discussion around aspects of AI and what to consider. A tower defense game would be a good example (but without the graphics). I really just want the code behind the scenes that manages game play. I'm not really interested in 3D rendering, etc." />
  <row Id="20797" PostHistoryTypeId="1" PostId="10006" RevisionGUID="38e23846-cf85-48b6-92c2-184a1a4736c7" CreationDate="2011-03-20T03:01:12.853" UserDisplayName="hal10001" Text="Can you share some URLs for tutorials that demonstrate programming basic game logic?" />
  <row Id="20798" PostHistoryTypeId="3" PostId="10006" RevisionGUID="38e23846-cf85-48b6-92c2-184a1a4736c7" CreationDate="2011-03-20T03:01:12.853" UserDisplayName="hal10001" Text="&lt;tutorials&gt;" />
  <row Id="20799" PostHistoryTypeId="17" PostId="10006" RevisionGUID="6cdc9458-51c5-4f46-8c57-fe1e53dcf06a" CreationDate="2011-03-20T17:40:16.060" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/60065/can-you-share-some-urls-for-tutorials-that-demonstrate-programming-basic-game-log" Text="" />
  <row Id="20800" PostHistoryTypeId="2" PostId="10008" RevisionGUID="622e4c0c-239f-45f4-bc25-294dfe715c35" CreationDate="2011-03-20T18:09:21.103" UserId="5768" Text="I'd say hide it. Then it's loaded and you can just call it whenever. If you're changing accounts then why load another copy, right? It's pretty lightweight though, I bet, so use whichever is easiest for now." />
  <row Id="20801" PostHistoryTypeId="2" PostId="10009" RevisionGUID="811d1ac7-a69b-472d-aa89-ef59774cc39c" CreationDate="2011-03-20T19:18:52.150" UserId="5768" Text="It's JBullet in my opinion, more noise about it means better documentation, more growth, etc. I'm using JBullet and I've had no issues." />
  <row Id="20802" PostHistoryTypeId="25" PostId="10002" RevisionGUID="ab3dfc15-7957-415a-9d7e-9469186066c6" CreationDate="2011-03-20T20:23:33.793" Comment="http://twitter.com/#!/StackGameDev/status/49566771006537728" />
  <row Id="20803" PostHistoryTypeId="2" PostId="10010" RevisionGUID="d1634297-524a-4f5f-95b0-eecd6a2d2e9e" CreationDate="2011-03-20T20:26:48.067" UserId="6210" Text="The thing that itches most for me is the `void *` 'abuse'.&#xD;&#xA;&#xD;&#xA;&gt; Void-pointer: I don't need it. It's a way for me to limit the number of files that include SDL.h (void* data_ is just an SDL_Surface* cast to void*)&#xD;&#xA;&#xD;&#xA;Well, you could avoid inclusion (which I approve BTW) by forward declarating it somewhere convenient for you." />
  <row Id="20804" PostHistoryTypeId="6" PostId="10006" RevisionGUID="bf677a84-8314-41b7-9da7-ef6d0092e7c6" CreationDate="2011-03-20T21:49:12.897" UserId="51" Comment="edited tags" Text="&lt;programming&gt;&lt;tutorials&gt;&lt;logic&gt;" />
  <row Id="20805" PostHistoryTypeId="2" PostId="10011" RevisionGUID="a5b85bac-c936-4354-8aee-c67b0025bf69" CreationDate="2011-03-20T21:50:03.237" UserId="769" Text="If you only need 2D physics (Bullet is 3D) you can use [the Java port of Box2D][1], which works very nicely, is well documented and is used throughout the world.&#xD;&#xA;&#xD;&#xA;You can go for the stable 2.0 port, which is rather old now, or the in development 2.1 port, which I use and find to be working well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jbox2d.org/" />
  <row Id="20806" PostHistoryTypeId="2" PostId="10012" RevisionGUID="3bce55e3-e251-4090-9ac2-bd79e1553bcb" CreationDate="2011-03-20T21:57:42.413" UserId="5196" Text="Remember that many (most?) Android devices don't allow true multitouch; on those phones, once the user is using one finger on your virtual dpad and press elsewhere on the screen at the same time you're going to get random positions sent to your app from the phone and there's nothing you can do about it.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20807" PostHistoryTypeId="2" PostId="10013" RevisionGUID="9ececa5a-7c08-4982-af8c-a4afa406e1f2" CreationDate="2011-03-20T22:45:30.110" UserId="6214" Text="I'm not interested in rendering engines or level design, but I'm very interested in programming the AI that drives all of the characteristics of game play. I'm thinking of how the d20 system drives the rules behind D&amp;D games. Is there a person that programs that logic, and is it possible to program almost all of an API without ever touching a graphic's engine? I'm a software engineer by trade (Java with some C# experience), so I'm looking to use those programming skills." />
  <row Id="20808" PostHistoryTypeId="1" PostId="10013" RevisionGUID="9ececa5a-7c08-4982-af8c-a4afa406e1f2" CreationDate="2011-03-20T22:45:30.110" UserId="6214" Text="Is it possible to program the entire logic and flow of a game without ever touching a graphic's engine?" />
  <row Id="20809" PostHistoryTypeId="3" PostId="10013" RevisionGUID="9ececa5a-7c08-4982-af8c-a4afa406e1f2" CreationDate="2011-03-20T22:45:30.110" UserId="6214" Text="&lt;programming&gt;&lt;ai&gt;" />
  <row Id="20810" PostHistoryTypeId="2" PostId="10014" RevisionGUID="61192f93-426a-4a52-b366-b5db9bded897" CreationDate="2011-03-20T23:00:13.487" UserId="5899" Text="Yes,&#xD;&#xA;&#xD;&#xA;a game engine is made of lots subsystems. Graphics Engine, AI Engine, the input system, the sound system, a game editor and many more.&#xD;&#xA;&#xD;&#xA;A game is composed by a game engine ( and for small games it's not a need ) and much content: textures, levels, 3d models, sounds, and GAME LOGIC, yes, the game logic is a content.&#xD;&#xA;&#xD;&#xA;You can made a game without a engine, or with a engine with only two or three subsystems. A game without graphics, only on text mode. On a great company, small groups are dedicated only a part of the game. ( AI scripting, lighting, network, etc..)" />
  <row Id="20811" PostHistoryTypeId="2" PostId="10015" RevisionGUID="3f1c5f86-32f8-4580-91ba-4bd390a7673b" CreationDate="2011-03-20T23:06:06.833" UserId="962" Text="Yes&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;It is possible to program games without touching a graphics or rendering engine. But it will limit you to text based games. Some good examples of these games would be nethack, dwarf fortress, and online MUDS(multi-user-dungeons). &#xD;&#xA;&#xD;&#xA;If you want to make a game with graphics, I suggest you join a team where you can program logic and AI without having to know to much about graphics." />
  <row Id="20812" PostHistoryTypeId="2" PostId="10016" RevisionGUID="d51e97ed-3e21-4dd8-a0c2-2df0806c27bd" CreationDate="2011-03-20T23:21:57.493" UserId="4835" Text="Yes, I think you can. Although you should know that usually the AI system communicates with the animation system to manage character movement and actions.&#xD;&#xA;&#xD;&#xA;It really depends on the game you're going to implement." />
  <row Id="20813" PostHistoryTypeId="25" PostId="10013" RevisionGUID="3541074a-6a39-422c-8490-1d4810019942" CreationDate="2011-03-20T23:23:34.013" Comment="http://twitter.com/#!/StackGameDev/status/49612070496382976" />
  <row Id="20814" PostHistoryTypeId="2" PostId="10017" RevisionGUID="07d82e7a-ecd5-4d24-ad22-a94b781d0e86" CreationDate="2011-03-20T23:35:59.583" UserId="6213" Text="I'm just doing some research before embarking on rendering a 3D map inside a wpf app. I've never delved into 3D before, and hence the question..&#xD;&#xA;&#xD;&#xA;I have map data (in several formats, and many files) which I need to render - probably in a wpf `viewport3D`. All the map data is in 2D, but I can add a height-map and convert to 3D. This data can be altered (updated) by the user without my knowledge, but a bit of data-crunching can be done before application start, so it doesn't need to be __entirely__ realtime.&#xD;&#xA;&#xD;&#xA;I've googled around but can't find a framework for how to represent my world. Do I write a terrain-tile stream server to handle requests from the viewport about which area to display?&#xD;&#xA;Do I create a collossal map, and hope it fits into memory?&#xD;&#xA;&#xD;&#xA;Are there tutorials about how to deliver large terrains for rendering? Most of them seem to be about building a world inside an editor..&#xD;&#xA;&#xD;&#xA;My world could be about 1000km * 1000km, with roads, parks, forests, power lines, street addresses (etc) - it's going to be a fair bit of data..&#xD;&#xA;&#xD;&#xA;Thanks - I'm looking forward to getting into this project.." />
  <row Id="20815" PostHistoryTypeId="1" PostId="10017" RevisionGUID="07d82e7a-ecd5-4d24-ad22-a94b781d0e86" CreationDate="2011-03-20T23:35:59.583" UserId="6213" Text="(real) 3d map rendering in wpf without an engine - how to handle the map data?" />
  <row Id="20816" PostHistoryTypeId="3" PostId="10017" RevisionGUID="07d82e7a-ecd5-4d24-ad22-a94b781d0e86" CreationDate="2011-03-20T23:35:59.583" UserId="6213" Text="&lt;algorithm&gt;&lt;directx&gt;&lt;terrain-rendering&gt;&lt;data-structure&gt;&lt;wpf&gt;" />
  <row Id="20817" PostHistoryTypeId="2" PostId="10018" RevisionGUID="f0280ec8-3449-46e6-97b4-b4c98d5637da" CreationDate="2011-03-20T23:36:54.767" UserId="3599" Text="Trying to help here, but need more info. &#xD;&#xA;&#xD;&#xA;This is a typical problem, but causes can be several. &#xD;&#xA;&#xD;&#xA; 1. Are you sure Uv mapping is done? The size of the texture wont help if the UV mapping is badly set, so it could be just mapping a small piece of the texture, and that is why it shows so big pixels. Check that the UV mapping is good and correct, first of all. A good uvmapping is absolutely key in texturing. 3D Painting is cool, but a good uvmapping and old school 2d painting and editing, will give a lot of control and precission. I use 3D painting mostly for seams, for organic models, etc. IMHo it's usually a combined method.&#xD;&#xA;&#xD;&#xA; 2. Is not clear to me if you see all black or something at low resolution, reading the question... I don't know in Maya, as I don't use it, (but used other packages for years, 3D is similar in the end...) but often the full black can be no actual UV Mapping done, inverted normals (all 3D packages have fast tools to flip or fix them), the UVs are wrong, and the texture has black lines or areas in it, and it's just covering all model with a black part detail (wrong scaled UVs, often). &#xD;&#xA;&#xD;&#xA; 3. Some packages will show a black render when you just did not create a material for it. (Again, I only handled Maya in some teams for handling assets, I'm a Max and Bledner user, mostly)Or did not asigned well the texture, UVs aren't there as I mention, etc. Sometimes simply you have not any lights and for that specific viewing or render, it does not do automatic open gl lighting: needs one light there.&#xD;&#xA;&#xD;&#xA; 4. In some packages, in viewport always low resolution textures are shown per software preferences, so to get best performance. These days I think this habit is dissapearing. If that happens, is a matter to go to preferences, and put viewport texture resolutions a bit higher.&#xD;&#xA;&#xD;&#xA;So, summarizing solutions:&#xD;&#xA;&#xD;&#xA; - Check your UV mapping.&#xD;&#xA; - Check normals.Flip them and/or fix them, to see if it gets fixed.&#xD;&#xA; - Check how you created the material and asigned the texture.&#xD;&#xA; - Check if it's a lighting matter in the way you are wanting to display/render it.&#xD;&#xA; - Related to all this, might be good to see if at preferences are correct in stuff related to these matters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20818" PostHistoryTypeId="2" PostId="10019" RevisionGUID="76ba461c-7a07-427d-b410-3c0f2460235e" CreationDate="2011-03-20T23:40:24.437" UserId="118" Text="Are you interested in creating a **new** game, or just trying to implement various AI techniques? In the second case, there are many video games that offer APIs to interact with the game. For example, you could create a bot for StarCraft using [BWAPI](http://code.google.com/p/bwapi/)." />
  <row Id="20819" PostHistoryTypeId="5" PostId="10018" RevisionGUID="4a463b8f-b69b-4d91-9474-1d8b939d86e1" CreationDate="2011-03-20T23:43:08.117" UserId="3599" Comment="edited body; deleted 2 characters in body; added 2 characters in body; edited body; edited body; added 3 characters in body; deleted 1 characters in body" Text="Trying to help here, but need more info. &#xD;&#xA;&#xD;&#xA;This is a typical problem, but causes can be several. &#xD;&#xA;&#xD;&#xA; 1. Are you sure Uv mapping is done? The size of the texture wont help if the UV mapping is badly set, so it could be just mapping a small piece of the texture, and that is why it shows so big pixels. Check that the UV mapping is good and correct, first of all. A good uvmapping is absolutely key in texturing. 3D Painting is cool, but a good uvmapping and old school 2d painting and editing, will give a lot of control and precission. I use 3D painting mostly for seams, for organic models, etc. IMHo it's usually a combined method.&#xD;&#xA;&#xD;&#xA; 2. Is not clear to me if you see all black or something at low resolution, reading the question... I don't know in Maya, as I don't use it, (but used other packages for years, 3D is similar in the end...) but often the full black can be no actual UV Mapping done, inverted normals (all 3D packages have fast tools to flip or fix them), the UVs are wrong, and the texture has black lines or areas in it, and it's just covering all model with a black part detail (wrong scaled UVs, often). &#xD;&#xA;&#xD;&#xA; 3. Some packages will show a black render when you just did not create a material for it. (Again, I only handled Maya in some teams for handling assets, I'm a Max and Blender user, mostly)Or did not asign well the texture, UVs aren't there as I mention, etc. Sometimes simply you have not any lights and for that specific viewing or render, it does not do automatic open gl lighting: needs one light there.&#xD;&#xA;&#xD;&#xA; 4. In some packages, in viewport, always low resolution textures are shown, per software preferences, so to get best performance. These days I think this habit is dissapearing. If that happens, is a matter of going to preferences, and put viewport texture resolution a bit higher.&#xD;&#xA;&#xD;&#xA;So, summarizing solutions:&#xD;&#xA;&#xD;&#xA; - Check your UV mapping.&#xD;&#xA; - Check normals.Flip them and/or fix them, to see if it gets fixed.&#xD;&#xA; - Check how you created the material and asigned the texture.&#xD;&#xA; - Check if it's a lighting matter in the way you are wanting to display/render it.&#xD;&#xA; - Related to all this, might be good to see if at preferences are correct in stuff related to these matters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20820" PostHistoryTypeId="2" PostId="10020" RevisionGUID="9be62071-a6ab-40a2-92d9-08e069466402" CreationDate="2011-03-20T23:53:29.697" UserId="3599" Text="A very high quality game might be even bigger, if it's so good, and the promotion is good, as people might wait a little if the promise is really good. &#xD;&#xA;&#xD;&#xA;What I checked in its day was 10megs game can do quite well. IMHO 2mb games have better chances to have less problems in some portals, etc. And obviously, the waiting time can make a gamer go away. If the promo efforts were succesful, there might be an strong interest in playing it, so the MBs wont be so important. I personally wouldn't go past the 10 MB, but that's me. IMHO, a very high quality game, if it is actually so, generates quite more money than the average simple flash game. So, if doable in reality by the developer, might be the best bet for a more solid solution than small games..." />
  <row Id="20821" PostHistoryTypeId="2" PostId="10021" RevisionGUID="6191a4ce-9e54-4ac3-82a7-8ed6a171e642" CreationDate="2011-03-21T00:01:00.777" UserId="4410" Text="In addition to the other answer, you could speed up the per pixel solution using an octree to have a hierachical approach to being able to quickly reject completely transparent pixels (or regions). It would work best if there were large areas of non-collidable regions of pixels which could be quickly ignored.&#xD;&#xA;&#xD;&#xA;You could also have a hierachy of collision primitives, a basic encompassing circle around the whole object, which if colliding you could then drop down to the next level of primitives which could be a number of more accurately placed circles, etc, which more accurately follows the outline of the object. You could in theory allow this to recurse as much as possible, the hierarchy allowing for early outs if a collision isn't detected at a higher level." />
  <row Id="20822" PostHistoryTypeId="2" PostId="10022" RevisionGUID="67366179-0393-4644-b58f-97a55d5c9df8" CreationDate="2011-03-21T00:04:22.320" UserId="6122" Text="I am overloaded with all these new terms I have to learn about 3d graphics like lightmaps, bumpmaps, real-time radiosity, luxrender (is there a site where I can learn about all these techniques?).&#xD;&#xA;&#xD;&#xA;Realtime gameplay graphics are almost better than prerendered 3d graphic or animation from 10 years ago. At this rate, is photorealistic video games on the horizon? (crysis 2 on pc for ex). &#xD;&#xA;&#xD;&#xA;I'm not sure if you can understand this question but for example, when Final Fantasy 7's prerendered backgrounds wowed me, almost 14 years ago, today real-time game graphics are almost better than that. " />
  <row Id="20823" PostHistoryTypeId="1" PostId="10022" RevisionGUID="67366179-0393-4644-b58f-97a55d5c9df8" CreationDate="2011-03-21T00:04:22.320" UserId="6122" Text="how long before realtime 3d graphics reach pre-rendered cg likeness? photorealism?" />
  <row Id="20824" PostHistoryTypeId="3" PostId="10022" RevisionGUID="67366179-0393-4644-b58f-97a55d5c9df8" CreationDate="2011-03-21T00:04:22.320" UserId="6122" Text="&lt;3d-engines&gt;" />
  <row Id="20825" PostHistoryTypeId="2" PostId="10023" RevisionGUID="272f873c-6dbf-414a-917c-7a39dd6fc098" CreationDate="2011-03-21T00:17:37.260" UserId="5413" Text="If someone has the time I wanted to know if you would be willing to check out my solution file here: http://elvis.rowan.edu/~majeko02/AwesomeShip.zip&#xD;&#xA;&#xD;&#xA;I followed the XNA GameStateManagement on AppHub, but nothing comes up from me. and I haven't the clue why.&#xD;&#xA;&#xD;&#xA;I believe I done everything correctly and verified it as well.&#xD;&#xA;&#xD;&#xA;I wanted to know if someone has the time could they check it out?&#xD;&#xA;&#xD;&#xA;Download link here: http://elvis.rowan.edu/~majeko02/AwesomeShip.zip&#xD;&#xA;&#xD;&#xA;I am racking my brain trying to figure out why it doesn't work.&#xD;&#xA;&#xD;&#xA;Any help, is greatly appreciated. " />
  <row Id="20826" PostHistoryTypeId="1" PostId="10023" RevisionGUID="272f873c-6dbf-414a-917c-7a39dd6fc098" CreationDate="2011-03-21T00:17:37.260" UserId="5413" Text="Followed the XNA GameStateManagement sln, but my doesn't work. What am I doing wrong?" />
  <row Id="20827" PostHistoryTypeId="3" PostId="10023" RevisionGUID="272f873c-6dbf-414a-917c-7a39dd6fc098" CreationDate="2011-03-21T00:17:37.260" UserId="5413" Text="&lt;xna&gt;&lt;c#&gt;&lt;state&gt;&lt;management&gt;" />
  <row Id="20828" PostHistoryTypeId="2" PostId="10024" RevisionGUID="fca89ca1-76e9-4e52-aa11-8e7039c08e7f" CreationDate="2011-03-21T00:53:29.423" UserId="6215" Text="I'm interested in evaluating the different ways that the netcode can &quot;hook into&quot; a game engine. I am designing a multiplayer game now, and so far I have determined that I need to (at the very least) have a separate thread to handle the network sockets, distinct from the rest of the engine which handles the graphics loop and scripting. &#xD;&#xA;&#xD;&#xA;I did have one potential way to make a networked game entirely single-threaded, which is to have it check the network after rendering each frame, using non-blocking sockets. However this is clearly not optimal because the time it takes to render a frame is added to the network lag: Messages arriving over the network must wait until the current frame render (and game logic) completes. But, at least this way the gameplay would still remain smooth, more or less. &#xD;&#xA;&#xD;&#xA;Having a separate thread for networking allows the game to be completely responsive to the network, for instance it can send back an ACK packet instantly upon receipt of a state update from the server. But I'm a little confused about the best way to communicate between the game code and the network code. The networking thread will push the received packet to a queue, and the game thread will read from the queue at the appropriate time during its loop, so we haven't gotten rid of this up-to-one-frame delay. &#xD;&#xA;&#xD;&#xA;Also, it seems like I would want the thread which handles the sending of packets to be separate from the one that is checking for packets coming down the pipe, because it wouldn't be able to send one off while it is in the middle of checking if there are incoming messages. I am thinking about the functionality of `select` or similar. &#xD;&#xA;&#xD;&#xA;I guess my question is, what's the best way to design the game for the best network responsiveness? Clearly the client should send user input as soon as possible to the server, so I could have net-send code come immediately after the event processing loop, both inside of the game loop. Does this make any sense?" />
  <row Id="20829" PostHistoryTypeId="1" PostId="10024" RevisionGUID="fca89ca1-76e9-4e52-aa11-8e7039c08e7f" CreationDate="2011-03-21T00:53:29.423" UserId="6215" Text="How to handle netcode?" />
  <row Id="20830" PostHistoryTypeId="3" PostId="10024" RevisionGUID="fca89ca1-76e9-4e52-aa11-8e7039c08e7f" CreationDate="2011-03-21T00:53:29.423" UserId="6215" Text="&lt;game-design&gt;&lt;c++&gt;&lt;architecture&gt;&lt;network&gt;" />
  <row Id="20831" PostHistoryTypeId="2" PostId="10025" RevisionGUID="e7632225-869f-4da3-8536-bf96e2022d7b" CreationDate="2011-03-21T01:14:28.953" UserId="6216" Text="I'm looking for a shader or sample that does a electricity or lines-of-force&lt;br&gt;&#xD;&#xA;effect between two points. &lt;br&gt;&#xD;&#xA;I'm using XNA 3.1.&lt;br&gt;&#xD;&#xA;Thanks,&lt;br&gt;&#xD;&#xA;SW" />
  <row Id="20832" PostHistoryTypeId="1" PostId="10025" RevisionGUID="e7632225-869f-4da3-8536-bf96e2022d7b" CreationDate="2011-03-21T01:14:28.953" UserId="6216" Text="Electricity effect using XNA and Shaders" />
  <row Id="20833" PostHistoryTypeId="3" PostId="10025" RevisionGUID="e7632225-869f-4da3-8536-bf96e2022d7b" CreationDate="2011-03-21T01:14:28.953" UserId="6216" Text="&lt;xna&gt;&lt;hlsl&gt;&lt;effects&gt;" />
  <row Id="20834" PostHistoryTypeId="2" PostId="10026" RevisionGUID="f75b8d72-b2ff-42f5-add0-8fe95d923479" CreationDate="2011-03-21T01:15:27.330" UserId="2332" Text="You're getting stuck in an infinite loop in your ScreenManager.Update() function.&#xD;&#xA;&#xD;&#xA;    while(screensToUpdate.Count &gt; 0)&#xD;&#xA;    {&#xD;&#xA;    	GameScreen screen = screensToUpdate[screensToUpdate.Count - 1];&#xD;&#xA;    	if(screen.ScreenState == ScreenState.TransitionOn || screen.ScreenState == ScreenState.Active)&#xD;&#xA;    	{&#xD;&#xA;    		if(!otherScreenHasFocus)&#xD;&#xA;    		{&#xD;&#xA;    			//screen.HandleInput(input);&#xD;&#xA;    			otherScreenHasFocus = true;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		if(!screen.IsPopUpMessage)&#xD;&#xA;    		{&#xD;&#xA;    			coveredByOtherScreen = true;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You're not reducing the screensToUpdate.Count and therefore it's always greater than 0.&#xD;&#xA;&#xD;&#xA;EDIT:  &#xD;&#xA;I forgot to mention, if you had just stepped through the code you would have quickly found the issue. Use the debugger often and set lots of breakpoints :)&#xD;&#xA;&#xD;&#xA;EDIT 2:  &#xD;&#xA;Just noticed the line&#xD;&#xA;&#xD;&#xA;    GameScreen screen = screensToUpdate[screensToUpdate.Count - 1];&#xD;&#xA;&#xD;&#xA;This will cause you issues as well as it's only ever going to update the last screen in your screensToUpdate collection." />
  <row Id="20835" PostHistoryTypeId="5" PostId="9954" RevisionGUID="b8a56769-97dd-4269-9919-f9e947f8ce8f" CreationDate="2011-03-21T01:42:39.647" UserId="5919" Comment="added 689 characters in body" Text="I was wondering if anyone had any ideas on how to get per pixel collision detection for the android.  I saw that the andEngine has great collision detection on rotation as well but couldn't see where the actual detection happened per pixel. Also noticed a couple solutions for java, could these be replicated for use with the Android SDK?  &#xD;&#xA;&#xD;&#xA;Maybe someone here has a clean piece of code I could look at to help understand what is going on with per pixel detection and also why when rotating it is a different process.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Here is something I am working with right now. &#xD;&#xA;&lt;pre&gt;public void getBitmapData(Bitmap bitmap1, Bitmap bitmap2){&#xD;&#xA;	 int[] bitmap1Pixels;&#xD;&#xA;	 int[] bitmap2Pixels;&#xD;&#xA;	  &#xD;&#xA;	    int bitmap1Height = bitmap1.getHeight();&#xD;&#xA;	    int bitmap1Width = bitmap1.getWidth();&#xD;&#xA;	    int bitmap2Height = bitmap2.getHeight();&#xD;&#xA;	    int bitmap2Width = bitmap2.getWidth();&#xD;&#xA;	    bitmap1Pixels = new int[bitmap1Height * bitmap1Width];&#xD;&#xA;	    bitmap2Pixels = new int[bitmap2Height * bitmap2Width];&#xD;&#xA;&#xD;&#xA;	    bitmap1.getPixels(bitmap1Pixels, 0, bitmap1Width, 1, 1, bitmap1Width - 1, bitmap1Height - 1); &#xD;&#xA;	    bitmap2.getPixels(bitmap2Pixels, 0, bitmap2Width, 1, 1, bitmap2Width - 1, bitmap2Height - 1); &#xD;&#xA;}" />
  <row Id="20836" PostHistoryTypeId="6" PostId="10024" RevisionGUID="54243767-cd3e-4bf0-85c3-6fcaa881981c" CreationDate="2011-03-21T02:02:22.623" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;network&gt;" />
  <row Id="20837" PostHistoryTypeId="6" PostId="10003" RevisionGUID="b51ec6a2-005b-4eb0-9f00-91f168ce51d8" CreationDate="2011-03-21T02:03:28.287" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;&lt;sdl&gt;" />
  <row Id="20838" PostHistoryTypeId="25" PostId="10023" RevisionGUID="82314854-79b4-4629-aef3-18f05e8343b7" CreationDate="2011-03-21T02:23:33.657" Comment="http://twitter.com/#!/StackGameDev/status/49657367721295872" />
  <row Id="20839" PostHistoryTypeId="2" PostId="10027" RevisionGUID="8c7f01dc-678b-4f2d-8f5b-b1d2c36eee80" CreationDate="2011-03-21T02:32:41.367" UserId="2787" Text="Photorealism is about way more than just 3d graphics, you have to take into account so many things to truly make the player believe they are in the game. Animations, environment, sound/music are just a few of the things to make it believable. &#xD;&#xA;I find it really interesting how we keep seeing the great looking graphics games and saying how close they are to photorealism, but there is always something our eyes can pick out to determine that it really isn't. The closer we get to photorealism, the more diminishing returns we will have. For example, when you look at Far Cry at the time most people that it was incredibly close to photorealism, but there were details that the players could always find, the same thing happened when Crysis came out, etc. The technology is obviously increasing at a rapid pace, but to be honest I don't think we'll see anything that we view as 'photorealistic' for another few decades. And even then I firmly believe players will be able to determine small nuances in the graphics that will leave them asking, how long before realtime 3d graphics reach photorealism?" />
  <row Id="20840" PostHistoryTypeId="2" PostId="10028" RevisionGUID="18af4a7a-44ee-44a3-86e0-611981f7ed04" CreationDate="2011-03-21T02:44:31.090" UserId="1101" Text="&gt; I need to (at the very least) have a separate thread to handle the network sockets&#xD;&#xA;&#xD;&#xA;No you don't.&#xD;&#xA;&#xD;&#xA;&gt; I did have one potential way to make a networked game entirely single-threaded, which is to have it check the network after rendering each frame, using non-blocking sockets. However this is clearly not optimal because the time it takes to render a frame is added to the network lag:&#xD;&#xA;&#xD;&#xA;Doesn't necessarily matter. When does your logic update? There's little point getting data off the network if you can't do anything with it yet. Similarly there's little point responding if you have nothing to say yet.&#xD;&#xA;&#xD;&#xA;&gt; for instance it can send back an ACK packet instantly upon receipt of a state update from the server. &#xD;&#xA;&#xD;&#xA;If your game is so fast-paced that waiting for the next frame to be rendered is a significant delay, then it's going to be sending enough data that you don't need to send separate ACK packets - just include ACK values inside your normal data payloads, if you need them at all.&#xD;&#xA;&#xD;&#xA;For most networked games, it's perfectly possible to have a game loop like this:&#xD;&#xA;&#xD;&#xA;    while 1:&#xD;&#xA;        read_network_messages()&#xD;&#xA;        read_local_input()&#xD;&#xA;        update_world()&#xD;&#xA;        send_network_updates()&#xD;&#xA;        render_world()&#xD;&#xA;&#xD;&#xA;You can decouple updates from rendering, which is highly recommended, but everything else can pretty much stay that simple unless you have a specific need. Exactly what kind of game are you making?" />
  <row Id="20841" PostHistoryTypeId="2" PostId="10029" RevisionGUID="42928fbf-0553-4a2e-95f6-20429f2af737" CreationDate="2011-03-21T03:17:30.440" UserId="953" Text="Requirements analysis will be incredibly useful, whether you're an independent developer or you work for a big company. Requirements analysis lets you break down your project into manageable chunks. It lets you estimate the time your project will take, and weigh the value of a feature against your desired development schedule and required effort. &#xD;&#xA;&#xD;&#xA;If you're in a larger indie game company, it will help you work together with other developers and content producers to make sure everyone's always got something to do and you can meet your development targets. If you're working for a big corporation, learning requirements analysis will make you one of the few developers at the meeting who can actually give a realistic time estimate for a feature instead of just pulling a number out of your ass.&#xD;&#xA;&#xD;&#xA;In addition to all that, requirements validation could include things like unit testing and verification of features, which is invaluable for a developer without a large QA department at his back." />
  <row Id="20842" PostHistoryTypeId="2" PostId="10030" RevisionGUID="74177304-f9fc-4c10-acde-fc8c950e4a88" CreationDate="2011-03-21T04:25:54.607" UserId="6122" Text="For 2d sprite games I can understand that sprites move on X and Y axis. However for 3d games, how do game engines calculate how to render a 3d environment on a flat 2d computer monitor?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20843" PostHistoryTypeId="1" PostId="10030" RevisionGUID="74177304-f9fc-4c10-acde-fc8c950e4a88" CreationDate="2011-03-21T04:25:54.607" UserId="6122" Text="How do 3d game engine's render 3d environments to 2d screen?" />
  <row Id="20844" PostHistoryTypeId="3" PostId="10030" RevisionGUID="74177304-f9fc-4c10-acde-fc8c950e4a88" CreationDate="2011-03-21T04:25:54.607" UserId="6122" Text="&lt;3d-engines&gt;" />
  <row Id="20845" PostHistoryTypeId="2" PostId="10031" RevisionGUID="ff7351be-5e92-49ed-8877-69f00519a063" CreationDate="2011-03-21T05:21:26.327" UserId="18" Text="It's similar to how you can capture 2D pictures of our world on camera. The 3D environment is described in terms of X, Y, and Z coordinates, but ultimately you need to map that to a 2D screen with only X and Y axis. This is done by [projection](http://en.wikipedia.org/wiki/3D_projection), where each 3D point is projected onto a 2D view plane.&#xD;&#xA;&#xD;&#xA;To put it simply, you can imagine projection lines going from the virtual camera in 3D space to each 3D point by passing through the view plane. The point where a projection line intersects the 2D plane is the projection of the 3D point. In orthographic projection these projection lines are all parallel; the distance between the object and the camera doesn't make any difference for the projected shape. This type of projection isn't realistic but is useful in certain instances such as drawing 2D graphics using a 3D engine (the HUD for example). The other type of projection is perspective projection where these lines converge making more distant objects appear smaller and giving more realistic results. This page has some [figures](http://www.tpub.com/content/engineering/14069/css/14069_154.htm) that could help you visualize the process.&#xD;&#xA;&#xD;&#xA;Projection is one of several transformation objects undergo in the [graphics pipeline](http://en.wikipedia.org/wiki/Graphics_pipeline), and is usually done using a [projection matrix](http://www.songho.ca/opengl/gl_projectionmatrix.html). Note that although projection implies discarding the Z coordinate, in reality a transformed Z value is still used a measure of screen depth so that we can tell which objects are visible and which ones are occluded by other objects. This is known as [z-buffering](http://en.wikipedia.org/wiki/Z-buffering)." />
  <row Id="20846" PostHistoryTypeId="25" PostId="10030" RevisionGUID="9bf8ba8b-a662-48c0-b015-3419bb88134f" CreationDate="2011-03-21T05:23:33.673" Comment="http://twitter.com/#!/StackGameDev/status/49702665898295296" />
  <row Id="20847" PostHistoryTypeId="2" PostId="10032" RevisionGUID="4da74feb-8d8a-4168-9594-615f46266718" CreationDate="2011-03-21T07:17:43.120" UserId="2437" Text="I'm a bit bothered by the &quot;load&quot; method, which breaks the Single-Responsibilty Principle (by the way, to the Communist Duck, I guess this is why he's using a const char*, because the SDL loading image function, coded in C, do not take a std::string). It shouldn't be an Image class' job to load itself, for at least two reasons :&#xD;&#xA;&#xD;&#xA;- If you intend to optimize your memory use, you'll want to have specialized classes for loading resources.&#xD;&#xA;- You'll handle exceptions more easily with a dedicated class.&#xD;&#xA;" />
  <row Id="20848" PostHistoryTypeId="2" PostId="10033" RevisionGUID="4c74eb37-d7b0-4d66-b9ce-180fcf315147" CreationDate="2011-03-21T07:31:43.490" UserId="5440" Text="Download RenderMonkey has samples for image based effects including spark and electricity." />
  <row Id="20850" PostHistoryTypeId="5" PostId="10025" RevisionGUID="a65abdc7-2409-4476-90e1-f978e192a4a7" CreationDate="2011-03-21T07:40:41.357" UserId="20" Comment="removed &lt;br&gt; and greetings" Text="I'm looking for a shader or sample that does a electricity or lines-of-force effect between two points.&#xD;&#xA;I'm using XNA 3.1." />
  <row Id="20851" PostHistoryTypeId="25" PostId="10024" RevisionGUID="39d71124-5b8c-4df5-a692-c23aaa58bdff" CreationDate="2011-03-21T08:23:34.143" Comment="http://twitter.com/#!/StackGameDev/status/49747966323474432" />
  <row Id="20855" PostHistoryTypeId="5" PostId="10017" RevisionGUID="11593cf6-7f87-4526-8057-530e0c729351" CreationDate="2011-03-21T11:13:22.933" UserId="6213" Comment="added (rough!) specs of client machines" Text="I'm just doing some research before embarking on rendering a 3D map inside a wpf app. I've never delved into 3D before, and hence the question..&#xD;&#xA;&#xD;&#xA;I have map data (in several formats, and many files) which I need to render - probably in a wpf `viewport3D`. All the map data is in 2D, but I can add a height-map and convert to 3D. This data can be altered (updated) by the user without my knowledge, but a bit of data-crunching can be done before application start, so it doesn't need to be __entirely__ realtime.&#xD;&#xA;&#xD;&#xA;I've googled around but can't find a framework for how to represent my world. Do I write a terrain-tile stream server to handle requests from the viewport about which area to display?&#xD;&#xA;Do I create a collossal map, and hope it fits into memory?&#xD;&#xA;&#xD;&#xA;Are there tutorials about how to deliver large terrains for rendering? Most of them seem to be about building a world inside an editor..&#xD;&#xA;&#xD;&#xA;My world could be about 1000km * 1000km, with roads, parks, forests, power lines, street addresses (etc) - it's going to be a fair bit of data..&#xD;&#xA;&#xD;&#xA;The machines that this software has to run on are ruggedized laptops - so not terribly fast (Core 2 duo?) and probably without DX10, but we can insist on heaps of RAM and HDD (SSD?).&#xD;&#xA;&#xD;&#xA;Thanks - I'm looking forward to getting into this project.." />
  <row Id="20857" PostHistoryTypeId="2" PostId="10036" RevisionGUID="dc8179a9-f9eb-44c9-aad3-7ef7d1434755" CreationDate="2011-03-21T11:44:14.890" UserId="3794" Text="I'm not sure if this fits to your picture of &quot;electricity effect&quot;:  &#xD;&#xA;[video][1] and [article about it][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://video&#xD;&#xA;  [2]: http://drilian.com/2009/02/25/lightning-bolts/" />
  <row Id="20858" PostHistoryTypeId="2" PostId="10037" RevisionGUID="53afcf8a-2f3e-448d-b228-947fbf8cfd9a" CreationDate="2011-03-21T13:37:12.527" UserId="2117" Text="To be fair, the linked Python Octree was posted in 2006, so Python-Ogre may very well have exposed the Octree class by now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, looking through the Ogre sources, I can see two Octree implementations: one in `Plugins/OctreeSceneManager/OgreOctree.h` and one in `Plugins/OctreeZone/OgreOctreeZoneOctree.h`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you point me at the one you're needing exposed, I'll put it on my todo list for my own, hand-written Python wrapper (it's available on bitbucket, linked in my profile.)&#xD;&#xA;&#xD;&#xA;Anyway, good luck. :D" />
  <row Id="20859" PostHistoryTypeId="25" PostId="10017" RevisionGUID="efdc09bb-901b-47a3-a46b-fa43a5d06b6c" CreationDate="2011-03-21T14:23:33.960" Comment="http://twitter.com/#!/StackGameDev/status/49838562300018688" />
  <row Id="20860" PostHistoryTypeId="2" PostId="10038" RevisionGUID="8227b1ac-0b2b-4fc0-9966-8273bbf2a34c" CreationDate="2011-03-21T14:24:09.907" UserId="4662" Text="&gt; However this is clearly not optimal&#xD;&#xA;&gt; because the time it takes to render a&#xD;&#xA;&gt; frame is added to the network lag:&#xD;&#xA;&gt; Messages arriving over the network&#xD;&#xA;&gt; must wait until the current frame&#xD;&#xA;&gt; render (and game logic) completes.&#xD;&#xA;&#xD;&#xA;That's not true at all. The message goes over the network *while* the receiver renders the current frame. The network lag is clamped to a whole number of frames on the client side; yes- but if the client has so few FPS that this is a big deal, then they have bigger problems." />
  <row Id="20861" PostHistoryTypeId="5" PostId="9998" RevisionGUID="4a426f81-803e-49fa-bbd1-28e572cc408b" CreationDate="2011-03-21T14:36:29.403" UserId="4308" Comment="removed gratitude" Text="Any recommendations for a good isometric game engine that is also free?&#xD;&#xA;&#xD;&#xA;1. Should be possible to develop entirely using freely available tools (meaning: no Flash, and no I don't want to learn haXe...)&#xD;&#xA;2. Works-in-a-browser is a plus, but not required.&#xD;&#xA;3. Support for 32-bit images is required!&#xD;&#xA;4. Good performance.&#xD;&#xA;5. Excellent documentation.&#xD;&#xA;&#xD;&#xA;I have looked at FIFE but it is still too unfinished, and the documentation sucks!" />
  <row Id="20862" PostHistoryTypeId="24" PostId="9998" RevisionGUID="4a426f81-803e-49fa-bbd1-28e572cc408b" CreationDate="2011-03-21T14:36:29.403" Comment="Proposed by 4308 approved by 51 edit id of 90" />
  <row Id="20863" PostHistoryTypeId="6" PostId="2770" RevisionGUID="f8f4ea54-485a-4431-8588-654872948327" CreationDate="2011-03-21T14:36:42.557" UserId="3588" Comment="Will a simple retag pass? Let's see. At any rate, the author wanted this tag in the first place. ♪" Text="&lt;ai&gt;&lt;shoot-em-up&gt;" />
  <row Id="20864" PostHistoryTypeId="24" PostId="2770" RevisionGUID="f8f4ea54-485a-4431-8588-654872948327" CreationDate="2011-03-21T14:36:42.557" Comment="Proposed by 3588 approved by 51 edit id of 91" />
  <row Id="20868" PostHistoryTypeId="5" PostId="9987" RevisionGUID="a4e99fa1-172d-4277-bb82-4e85fb616afb" CreationDate="2011-03-21T15:56:23.380" UserId="5687" Comment="expanded on PSPACE-completeness a bit" Text="Some background: I'm poking at a set of puzzles along the lines of Rush Hour/Sokoban/etc; for want of a better description, call them 'motion planning' puzzles - the player has to figure out the correct sequence of moves to achieve a particular configuration.  (One characteristic of the sort of puzzle I'm thinking of is that they're generically PSPACE-complete; they're not necessarily in NP because the optimal sequence of moves isn't necessarily polynomial in the input size, so we can't guarantee that a solution can be verified in polynomial time).&#xD;&#xA;&#xD;&#xA;While I have a few straightforward 'building blocks' that I can use for puzzle crafting and I have a few basic examples put together, I'm trying to figure out how to avoid too much sameness over a large swath of these kinds of puzzles, and I'm also trying to figure out how to make puzzles that have more of a feel of logical solution than trial-and-error.  Does anyone know of good resources out there for designing instances of this sort of puzzle once the core puzzle rules are in place?  Most of what I've found on puzzle design only covers creating the puzzle rules, not building interesting puzzles out of a set of rules.&#xD;&#xA;" />
  <row Id="20869" PostHistoryTypeId="2" PostId="10039" RevisionGUID="3b491b88-f91d-4108-ae8b-85496bfe616e" CreationDate="2011-03-21T16:01:37.307" UserId="1352" Text="Not exactly evolution in the sense you mentioned but still interesting:&#xD;&#xA;&#xD;&#xA;In both of the Left 4 Dead games by valve there is an AI director that adapts the level based on how the players behave.&#xD;&#xA;&#xD;&#xA;&quot;The Director places enemies and items in varying positions and quantities based upon each player's current situation, status, skill and location&quot; - http://en.wikipedia.org/wiki/Left_4_Dead#AI_Director" />
  <row Id="20870" PostHistoryTypeId="2" PostId="10040" RevisionGUID="60a2eae1-65f7-4cf0-8219-6c55a9668d17" CreationDate="2011-03-21T16:03:47.290" UserId="5259" Text="**On Interfaces (in general)**&#xD;&#xA;&#xD;&#xA;So, you asked for us to review your designs for interfaces.&#xD;&#xA;&#xD;&#xA;You didn't give us interfaces, you gave us full class declarations. If these were *interfaces*, I would expect to see something like:&#xD;&#xA;&#xD;&#xA;    virtual bool load file(const char* file) = 0;&#xD;&#xA;&#xD;&#xA;*That*, in C++, is an interface. I can override it in a subclass that implements functionality (in fact, I must!). If you are writing an interface, you are enforcing policy, and the above is how you do this.&#xD;&#xA;&#xD;&#xA;Half of the complaints about usage of *void ** in the other answers would've been avoided if you had just exposed the interface functions, and kept the member variables hidden (as they should be, in an *interface* class).&#xD;&#xA;&#xD;&#xA;Rawr.&#xD;&#xA;&#xD;&#xA;**On Interfaces (yours)**&#xD;&#xA;&#xD;&#xA;*Image: Copying*&#xD;&#xA;&#xD;&#xA;You've got a copy constructor, and an equals operator. The issue I see here is that there is no good way of preventing the user from making silly extraneous copies of images.&#xD;&#xA;&#xD;&#xA;For you, using SDL_surfaces, **this is a big issue**. Without meaning to be offensive, I'm willing to bet that you haven't considered what happens when you free an Image that is a duplicate of another image. I'm further willing to bet that you hadn't planned on handling full deep copying of the SDL_surface, and so in the aforementioned case you are likely to free an Image, and then your other copies of it will explode, killing everyone you love.&#xD;&#xA;&#xD;&#xA;Solution: NO COPIES. Don't do it, don't allow it. Use a factory or a C-style loader function to create new instances of an Image, and use those instead of allowing copying or equals assignments. Alternately, completely figure out how to deep-copy an SDL_image (not super hard, but annoying).&#xD;&#xA;&#xD;&#xA;*Image: manipulation*&#xD;&#xA;&#xD;&#xA;How do I change your images once I've loaded them? According to your interface, I don't. Still, are you sure that is a good idea? How do I find out the bit-depth of an image? Its height? Width? Color space?&#xD;&#xA;&#xD;&#xA;*Font*&#xD;&#xA;&#xD;&#xA;How do I draw with this font? How do I get its name? How do I prevent the copying issues I complained about above? How do I set its color? Kerning? What about Unicode support?&#xD;&#xA;&#xD;&#xA;*Renderer: General*&#xD;&#xA;&#xD;&#xA;So, I notice you have a couple of blit*() functions, and also a render() function. This seems to imply that you want users to be able to queue up a bunch of blitting operations, and then flush them all to screen at once using the render() call.&#xD;&#xA;&#xD;&#xA;That's fine; in fact, that's how my group's engine tech handles it too. :)&#xD;&#xA;&#xD;&#xA;The use of a singleton here is acceptable, mostly because you seem to want to be letting the renderer have complete control of drawing things. If there is only one instance of it (as there probably should be), this won't hurt anything. Not what we do, but hey, it's a matter of taste.&#xD;&#xA;&#xD;&#xA;There are a couple of big issues I see here, though.&#xD;&#xA;&#xD;&#xA;**Renderer: Transformations**&#xD;&#xA;&#xD;&#xA;You seem to be working only in 2D. That's fine. BUT...&#xD;&#xA;&#xD;&#xA;How do you handle things like rotating an image when you draw it? Scaling it? You need full support for something called [affine transformations][1]. This allows you to easily rotate, scale, translate, skew, and otherwise frob in a pretty fashion images.&#xD;&#xA;&#xD;&#xA;This needs to be supported (somehow) for both text and images.&#xD;&#xA;&#xD;&#xA;**Renderer: Coloring and Blending**&#xD;&#xA;&#xD;&#xA;I want to be able to blend colors onto my images, and set the colors for my text. You should expose this.&#xD;&#xA;&#xD;&#xA;I also want to be able to do things like blend images when blitting, so I can do things like translucent ghosts or smoke or fire.&#xD;&#xA;&#xD;&#xA;**How to save yourself the trouble**&#xD;&#xA;&#xD;&#xA;Use [SFML][2]. It's got better design for, well, pretty much everything over SDL. They've already done what you are trying to do here. At the very least, look at how they've spec'ed their interfaces, and how they've designed their class hierarchy.&#xD;&#xA;&#xD;&#xA;Also note that they address the issue of transforms I pointed out earlier in their Drawable class. And coloring. And blending.&#xD;&#xA;&#xD;&#xA;They've got good tutorials and documentation, so it might be worth your time to fiddle with it a bit and get a feel for what your code should be able to accomplish.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.willamette.edu/~gorr/classes/GeneralGraphics/Transforms/transforms2d.htm&#xD;&#xA;  [2]: http://www.sfml-dev.org/documentation/1.6/annotated.htm" />
  <row Id="20871" PostHistoryTypeId="2" PostId="10041" RevisionGUID="95c818b9-7262-455d-9c19-01037f78ca58" CreationDate="2011-03-21T16:38:52.603" UserId="1101" Text="For the most part it's easy to generate these puzzles by starting at the solution and iteratively choosing objects to move or mutate until you reach a suitable start point. The player then has to perform the same steps (or equivalent) in reverse order, and the more steps you used, the harder it is likely to be for them to solve it.&#xD;&#xA;&#xD;&#xA;I'm not sure it would be practical to have any way of auto-generating puzzles that rely on different classes of sub-problem however; that would probably require a human mind to identify these areas and exploit them." />
  <row Id="20872" PostHistoryTypeId="2" PostId="10042" RevisionGUID="8f3ce75e-a219-4ef4-a543-0a7ec0be8077" CreationDate="2011-03-21T16:45:16.377" UserId="1101" Text="I think this class will have between zero and very little relevance to game development. Certainly the semi-formal or formal methods you mention do not get used in my experience.&#xD;&#xA;&#xD;&#xA;Games typically have incredibly fluid requirements, and even if it were possible to invest time and best practices into gathering requirements, much of what you'd end up with are meaningless and vague terms referring to fun, addiction, immersion, and so on. Very rarely will you have very clearly defined deliverables because, as much as we like to pretend making software is engineering, it's actually more of a craft, given the variety of different ways that programmers can express themselves. This goes double for games." />
  <row Id="20873" PostHistoryTypeId="2" PostId="10043" RevisionGUID="af148d25-96eb-4641-ae72-c692fd4e9463" CreationDate="2011-03-21T16:52:19.947" UserId="5904" Text="IMO, use messaging for any communication between the network subsystem and game engine, and for that matter between any two subsystems. Inter-subsystem messaging can be a simple as a blob of data passed by pointer using std::list.&#xD;&#xA;&#xD;&#xA;Simply have an outgoing messages queue and a reference to the game engine in the network subsystem. The game can dump messages it wants sent into the outgoing queue and have them automagically sent, or perhaps when some function like &quot;flushMessages()&quot; is called. If the game engine had one large, shared message queue, then all subsystems that needed to send messages (logic, AI, physics, network, etc.) can all dump messages into it where the main game loop can then read all of the messages and then act accordingly.&#xD;&#xA;&#xD;&#xA;I would say that running the sockets on another thread is fine, though not required. The only problem with this design is that it is generally asynchronous (you don't know precisely when the packets are being sent) and that can make it hard to debug and making timing related issues appear/disappear randomly. Still, if done properly, neither of these should be a problem.&#xD;&#xA;&#xD;&#xA;From a higher level, I'd say separate networking from the game engine itself. The game engine doesn't care about sockets or buffers, it cares about events. Events are things such as &quot;Player X fired a shot&quot; &quot;An explosion at game T happened&quot;. These can be interpreted by the game engine directly. Where they are generated from (a script, a client's action, an AI player, etc) doesn't matter.&#xD;&#xA;&#xD;&#xA;If you treat your network subsystem as a means of sending/receiving events, then you get a number of advantages over just calling recv() on a socket.&#xD;&#xA;&#xD;&#xA;You could optimize bandwidth, for example, by taking 50 small messages (1-32 bytes in length) and have the network subsystem package them into one large packet and send it. Maybe it could compress them before sending if that was a big deal. On the other end, the code could uncompress/unpackage the large packet into 50 discrete events again for the game engine to read. This can all happen transparently.&#xD;&#xA;&#xD;&#xA;Other cool things include single player game mode that reuses your network code by having a pure client + a pure server running on the same machine communicating via messaging in shared memory space. Then, if your single player game operates properly, a remote client (i.e. true multiplayer) would operate as well. Additionally, it forces you to consider ahead of time what data is needed by the client since your single player game would either look right or be totally wrong. Mix and match, run a server AND be a client in a multiplayer game -- it all works just as easily.&#xD;&#xA;" />
  <row Id="20874" PostHistoryTypeId="5" PostId="10043" RevisionGUID="babe840f-2a74-46e9-a502-a741c685c39e" CreationDate="2011-03-21T17:04:45.520" UserId="5904" Comment="added 836 characters in body" Text="Ignore responsiveness. On a LAN, ping is insignificant. On the internet, 60-100ms round-trip is a blessing. Pray to the lag gods that you don't get spikes of &gt; 3K. Your software would have to run at very low number of updates/sec for this to be a problem. If you shoot for 25 updates/sec, then you've got 40ms max time between when you receive a packet and act on it. And that is the single-threaded case...&#xD;&#xA;&#xD;&#xA;Design your system for flexibility and correctness. Here is my idea on how to hook a network subsystem into game code: Messaging. The solution to a lot of problems can be &quot;messaging&quot;. I think messaging cured cancer in lab rats once. Messaging saves me $200 or more on my car insurance. But seriously, messaging is probably the best way to attach any subsystem to game code while still maintaining two independent subsystems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Use messaging for any communication between the network subsystem and game engine, and for that matter between any two subsystems. Inter-subsystem messaging can be a simple as a blob of data passed by pointer using std::list.&#xD;&#xA;&#xD;&#xA;Simply have an outgoing messages queue and a reference to the game engine in the network subsystem. The game can dump messages it wants sent into the outgoing queue and have them automagically sent, or perhaps when some function like &quot;flushMessages()&quot; is called. If the game engine had one large, shared message queue, then all subsystems that needed to send messages (logic, AI, physics, network, etc.) can all dump messages into it where the main game loop can then read all of the messages and then act accordingly.&#xD;&#xA;&#xD;&#xA;I would say that running the sockets on another thread is fine, though not required. The only problem with this design is that it is generally asynchronous (you don't know precisely when the packets are being sent) and that can make it hard to debug and making timing related issues appear/disappear randomly. Still, if done properly, neither of these should be a problem.&#xD;&#xA;&#xD;&#xA;From a higher level, I'd say separate networking from the game engine itself. The game engine doesn't care about sockets or buffers, it cares about events. Events are things such as &quot;Player X fired a shot&quot; &quot;An explosion at game T happened&quot;. These can be interpreted by the game engine directly. Where they are generated from (a script, a client's action, an AI player, etc) doesn't matter.&#xD;&#xA;&#xD;&#xA;If you treat your network subsystem as a means of sending/receiving events, then you get a number of advantages over just calling recv() on a socket.&#xD;&#xA;&#xD;&#xA;You could optimize bandwidth, for example, by taking 50 small messages (1-32 bytes in length) and have the network subsystem package them into one large packet and send it. Maybe it could compress them before sending if that was a big deal. On the other end, the code could uncompress/unpackage the large packet into 50 discrete events again for the game engine to read. This can all happen transparently.&#xD;&#xA;&#xD;&#xA;Other cool things include single player game mode that reuses your network code by having a pure client + a pure server running on the same machine communicating via messaging in shared memory space. Then, if your single player game operates properly, a remote client (i.e. true multiplayer) would operate as well. Additionally, it forces you to consider ahead of time what data is needed by the client since your single player game would either look right or be totally wrong. Mix and match, run a server AND be a client in a multiplayer game -- it all works just as easily.&#xD;&#xA;" />
  <row Id="20875" PostHistoryTypeId="2" PostId="10044" RevisionGUID="5375e3e1-af03-4374-84e8-61b12af5ed2a" CreationDate="2011-03-21T17:11:19.133" UserId="1883" Text="When creating your own model for a weapon, say the M4 carbine, and using the model in your game. Do you need a license to use it commercially?&#xD;&#xA;I know that racing games like GT5 has a license for each and every car, but the same apply for weapons?" />
  <row Id="20876" PostHistoryTypeId="1" PostId="10044" RevisionGUID="5375e3e1-af03-4374-84e8-61b12af5ed2a" CreationDate="2011-03-21T17:11:19.133" UserId="1883" Text="Do you need a license for weapon models?" />
  <row Id="20877" PostHistoryTypeId="3" PostId="10044" RevisionGUID="5375e3e1-af03-4374-84e8-61b12af5ed2a" CreationDate="2011-03-21T17:11:19.133" UserId="1883" Text="&lt;licensing&gt;" />
  <row Id="20878" PostHistoryTypeId="2" PostId="10045" RevisionGUID="2e062518-070c-44ae-977e-8f38d3c66249" CreationDate="2011-03-21T17:19:16.477" UserId="370" Text="Network communications should be batched.  You should strive for a single packet sent each game tick (which is often when a frame is rendered but really should be independent).&#xD;&#xA;&#xD;&#xA;Your game entities talk with the network subsystem (NSS).  The NSS batches up messages, ACKs, etc and sends a few (hopefully one) optimally sized UDP packets (~1500 bytes usually).  The NSS emulates packets, channels, priorities, resend, etc while only sending single UDP packets.&#xD;&#xA;&#xD;&#xA;Read through the [gaffer on games' tutorial][1] or just use [ENet][2] which implements many of Glenn Fiedler's ideas.&#xD;&#xA;&#xD;&#xA;*Or* you can just use TCP if your game doesn't need twitch reactions.  Then all the batching, resends, and ACK problems go away.  You'd still want an NSS to manage bandwidth and channels, however.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/networking-for-game-programmers/&#xD;&#xA;  [2]: http://enet.bespin.org/" />
  <row Id="20879" PostHistoryTypeId="2" PostId="10046" RevisionGUID="35f8b721-bd48-4f5f-99f8-c9a1a75fdf3a" CreationDate="2011-03-21T17:21:24.430" UserId="138" Text="If you plan on releasing your game commercially, you will need to seek permission from each firearm's manufacturer for using its name and likeness. This is just from my experience in FPS development. I'm a programmer. Not a lawyer :)" />
  <row Id="20880" PostHistoryTypeId="25" PostId="10044" RevisionGUID="35066ec1-4923-4004-a711-a581cdaed974" CreationDate="2011-03-21T17:23:34.257" Comment="http://twitter.com/#!/StackGameDev/status/49883862456741888" />
  <row Id="20881" PostHistoryTypeId="2" PostId="10047" RevisionGUID="394029a3-ca40-4955-b8aa-f66c9db0cca1" CreationDate="2011-03-21T17:35:10.470" UserId="5904" Text="To create an atlas (without scaling the lightmaps), create an image that is, say 2x larger than your lightmap on each edge. Then you've got a 2x2 grid of lightmaps. Dump the lightmaps into it, and adjust the texture coordinates based upon which lightmap they came from. To directly answer your question, yes -- group close objects in the same lightmap. If you reverse the situation (have far away objects in the same lightmap) then you introduce performance problems almost immediately and unnecessarily.&#xD;&#xA;&#xD;&#xA;Resolution is actually much less of a problem for lightmaps since it provides only subtle detail rather than the actual high frequency visual information such as bricks/concrete. &#xD;&#xA;&#xD;&#xA;Scaling: don't scale things outside of the editor after generating lightmaps. Generally, you only generate lightmaps for static geometry anyways, so I don't know why you'd want to scale it. If it must be scalable, then you need some other [dynamic] solution since scaling a model can entirely change where shadows would normally occur in the lightmap generation process. In other words, it will look not just &quot;pixely&quot; or &quot;blurry&quot;, but straight up wrong.&#xD;&#xA;&#xD;&#xA;Any lightmap generation program that isn't brain dead should use area of the triangle as a way of generation &quot;priority&quot; for texel space. For example, if you had 4 triangles in your scene that had 2500, 300, 500, and 200 units of area, you'd expect the triangle with 2500 area to have more texel space in the lightmap allocated for it compared to the others, since increased resolution will actually be visible in the larger triangle." />
  <row Id="20882" PostHistoryTypeId="2" PostId="10048" RevisionGUID="ffc56c39-2e24-47f1-bd9e-2ae6993b0289" CreationDate="2011-03-21T17:47:06.513" UserId="1430" Text="**I am not a lawyer and you should consult one for real, accurate legal advice.**&#xD;&#xA;&#xD;&#xA;The name and design are likely trademarked (you can see [here][1] for example that there have been trademark issues with the M4 in the past; other guns will likely have similar issues). In that case you will be unable to use the name or design without approval -- commercial product or no.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/M4_carbine#Trademark_issues" />
  <row Id="20883" PostHistoryTypeId="2" PostId="10049" RevisionGUID="dc549105-0d50-42c9-bde7-e571add1b1be" CreationDate="2011-03-21T18:31:23.357" UserId="370" Text="Imagine a 1 on 1 (not teams) competition between AI bots, like the [Google AI Challenge][1].  The various bots are assigned an ELO rating based on the outcome of the various versus matches.  The reason I specify AI bots as they can compete 24/7 without regard for player fatigue, geolocation, etc.&#xD;&#xA;&#xD;&#xA;Given limited server resources only so many bouts can be run per day.  I'm looking for a heuristic (or an optimal algorithm) to choose which two bots should compete next.&#xD;&#xA;&#xD;&#xA;All the past competitions have been tracked.  By this I mean that the algorithm has more to work with than just the ELO ratings.&#xD;&#xA;&#xD;&#xA;The use cases I'm partitularly interested in:&#xD;&#xA;&#xD;&#xA;* The competition has been pairing randomly for while and now I want to make intelligent pairing decision.&#xD;&#xA;* The Elo rating have stabilized and a bot is updated.&#xD;&#xA;* The Elo ratings have stabilized and new bot is introduced to the competition.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ai-contest.com/" />
  <row Id="20884" PostHistoryTypeId="1" PostId="10049" RevisionGUID="dc549105-0d50-42c9-bde7-e571add1b1be" CreationDate="2011-03-21T18:31:23.357" UserId="370" Text="Pairing algorithm for the Elo rating system." />
  <row Id="20885" PostHistoryTypeId="3" PostId="10049" RevisionGUID="dc549105-0d50-42c9-bde7-e571add1b1be" CreationDate="2011-03-21T18:31:23.357" UserId="370" Text="&lt;elo&gt;&lt;versus-ranking&gt;" />
  <row Id="20886" PostHistoryTypeId="2" PostId="10050" RevisionGUID="3d49c42f-21d8-4b89-a53b-9f1b92f30068" CreationDate="2011-03-21T19:02:01.830" UserId="1379" Text="I've been looking up tutorials for UnrealScript, but I'm very confused by what I find.&#xD;&#xA;&#xD;&#xA;All tutorials seem to use Visual Studio and nFringe for the coding, plus the UDK editor for the maps.&#xD;&#xA;&#xD;&#xA;Every tutorial I've come across seems to assume I want to either modify UT2004 or edit physics. This is not the case. I plan on making some custom maps in UDK with no textures or anything, and script some events for those maps. Lights turning on and off. Doors opening and closing. Walls shifting. That kind of stuff.&#xD;&#xA;&#xD;&#xA;As such, the tutorials I've found are confusing and take up a lot of time and configuration I don't understand. Can someone get me on the right path for what I'm trying to do here?" />
  <row Id="20887" PostHistoryTypeId="1" PostId="10050" RevisionGUID="3d49c42f-21d8-4b89-a53b-9f1b92f30068" CreationDate="2011-03-21T19:02:01.830" UserId="1379" Text="Unrealscript tutorials for self-made maps" />
  <row Id="20888" PostHistoryTypeId="3" PostId="10050" RevisionGUID="3d49c42f-21d8-4b89-a53b-9f1b92f30068" CreationDate="2011-03-21T19:02:01.830" UserId="1379" Text="&lt;unreal&gt;" />
  <row Id="20889" PostHistoryTypeId="2" PostId="10051" RevisionGUID="f15437ad-b08e-46f3-91fe-cebecc010b3b" CreationDate="2011-03-21T19:10:45.797" UserId="4662" Text="Requirements analysis is much more aimed at corporate software, with formal communication channels and that kind of thing, little to none of which will exist for an indie developer. It's not very useful for games because many requirements cannot be formally tested or verified. If you have a toolbar and you say, &quot;Clicking this button should drop down a menu with XYZ on it&quot;, then you can pay someone virtually nothing to click the button and see what happens. Is your game fun? That's a whole different kettle of fish.&#xD;&#xA;&#xD;&#xA;RA can be useful for determining if the game functions; but when it comes to things like balance, replayability and other factors that determine the ultimate fun factor of the game, then it's difficult or impossible to test them. So ultimately, it depends on whether or not you're going for an excellent implementation of an existing idea; or whether or not you're looking for success in novel gameplay." />
  <row Id="20890" PostHistoryTypeId="6" PostId="10050" RevisionGUID="8593a353-c3eb-4785-aa0f-05fc0b024e58" CreationDate="2011-03-21T19:16:15.610" UserId="1156" Comment="edited tags" Text="&lt;tutorials&gt;&lt;udk&gt;" />
  <row Id="20891" PostHistoryTypeId="2" PostId="10052" RevisionGUID="6ba872de-38d3-40fb-b940-7acb5899b71a" CreationDate="2011-03-21T19:34:07.530" UserId="138" Text="&gt; Is there a person that programs that&#xD;&#xA;&gt; logic, and is it possible to program&#xD;&#xA;&gt; almost all of an API without ever&#xD;&#xA;&gt; touching a graphic's engine? I'm a&#xD;&#xA;&gt; software engineer by trade (Java with&#xD;&#xA;&gt; some C# experience), so I'm looking to&#xD;&#xA;&gt; use those programming skills.&#xD;&#xA;&#xD;&#xA;Definitely. Gameplay programmers often never touch actual rendering code. We're a few layers separated (dealing with actors and controllers and such). That being said, as a gameplay programmer on triple-A FPS's, I found myself frequently working with animation code.&#xD;&#xA;&#xD;&#xA;And, you still have to know your math and, depending on the platform, understand what's happening under the covers with the decisions you make.&#xD;&#xA;&#xD;&#xA;Your mileage will vary depending on the technology and company; but, generally, you're talking about gameplay or AI programming." />
  <row Id="20892" PostHistoryTypeId="2" PostId="10053" RevisionGUID="255a2a1e-3c01-418a-ba10-df8072b7fda3" CreationDate="2011-03-21T19:52:07.327" UserId="51" Text="Level scripting is generally done through Kismet, not through Unrealscript.  Kismet is their visual scripting language that ties triggers/entities together and so forth.&#xD;&#xA;&#xD;&#xA;http://udn.epicgames.com/Three/KismetUserGuide.html" />
  <row Id="20893" PostHistoryTypeId="2" PostId="10054" RevisionGUID="e2d9c104-a9d0-472d-9ab6-1fdddcbdb5e7" CreationDate="2011-03-21T20:04:17.260" UserId="5797" Text="If you make me wait for something, it had better be worth it. And despite the gains over the years in internet speed, that principle still holds true. You need to put your idea and definition of &quot;quality&quot; aside and think of it from the user's perspective. What is a high-quality game?&#xD;&#xA;Lets assume that means your game will be RICH almost SUPER RICH with sound, video and the works. Here are some tips:&#xD;&#xA;&#xD;&#xA;Balance your game story or how the user will progress through the game and chart out when specific assets are needed. Downloading in the background is possible. You can store  or cache it and use it when required.&#xD;&#xA;&#xD;&#xA;Make use of runtime shared library framework. I assume Flash will work very much like Flex (haven't used it recently). The one thing you need to make sure is that your libraries are not interdependent. That would require your entire code base to be downloaded at start time instead of on demand. &#xD;&#xA;&#xD;&#xA;Use IOC extensively. Use of string references in your code eliminate tight coupling with assets. That will allow you to create smaller, lighter libraries and hence reduced wait time at the start.&#xD;&#xA;" />
  <row Id="20894" PostHistoryTypeId="5" PostId="10036" RevisionGUID="e085b9b1-637e-4b40-8414-ccfc9edcc23c" CreationDate="2011-03-21T20:10:38.073" UserId="3794" Comment="added 30 characters in body" Text="I'm not sure if this fits to your picture of &quot;electricity effect&quot;:  &#xD;&#xA;[video][1] and [article about it][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=5UMOXGPdWe4&#xD;&#xA;  [2]: http://drilian.com/2009/02/25/lightning-bolts/" />
  <row Id="20900" PostHistoryTypeId="25" PostId="10049" RevisionGUID="bf8fba03-fe29-4b95-9b1c-8dd9e4abb3dd" CreationDate="2011-03-21T20:23:34.087" Comment="http://twitter.com/#!/StackGameDev/status/49929160361127936" />
  <row Id="20902" PostHistoryTypeId="2" PostId="10057" RevisionGUID="9e91af58-5edc-4bd3-ba58-a22a243e7ad6" CreationDate="2011-03-21T20:32:16.447" UserId="5797" Text="Language and words are extremely important in programming. And your &quot;situation&quot; is the result of their misuse in abstracting classes. &#xD;&#xA;You need to determine which of the two are happening here.&#xD;&#xA;Reading 1: Mobs have Skills i.e. TacklingSkill etc. and when a target approaches it, the mob uses a Skill of choice?&#xD;&#xA;Reading 2: Actions like Tackle take place between two Mobs when they interact, collide etc.&#xD;&#xA;&#xD;&#xA;Solution: I think you know what you want. Just rethink the names and your structure will derive itself from it. Use simple, straightforward and descriptive words. Do not mix concepts (i.e. actions with what creates them or what they result in or what is required for them)." />
  <row Id="20903" PostHistoryTypeId="2" PostId="10058" RevisionGUID="ad0ca8b6-f3e3-4754-9408-3a0343012ce7" CreationDate="2011-03-21T20:55:01.860" UserId="6230" Text="It is possible.&#xD;&#xA;&#xD;&#xA;Microsoft recently released Kodu.&#xD;&#xA;&#xD;&#xA;You should watch the series of videos made on Kodu." />
  <row Id="20904" PostHistoryTypeId="2" PostId="10059" RevisionGUID="887baba4-fa66-4a3e-88bf-bfc89e0c51c3" CreationDate="2011-03-21T20:30:22.880" UserDisplayName="Adelino" Text="which is the best game engine 2D for iOS? But i really need a game engine that allow me to modify the game code because i need to control the multi touch events. I have a framework that detect with is the gesture that the player make and i need to test this framework of gesture recognizer in a game, so i have to be the freedom to change the game code. I don't want anything like GameSalad that you can't control anything.&#xD;&#xA;&#xD;&#xA;Thnx in advance&#xD;&#xA;" />
  <row Id="20905" PostHistoryTypeId="1" PostId="10059" RevisionGUID="887baba4-fa66-4a3e-88bf-bfc89e0c51c3" CreationDate="2011-03-21T20:30:22.880" UserDisplayName="Adelino" Text="Best game engine 2D for iOS" />
  <row Id="20906" PostHistoryTypeId="3" PostId="10059" RevisionGUID="887baba4-fa66-4a3e-88bf-bfc89e0c51c3" CreationDate="2011-03-21T20:30:22.880" UserDisplayName="Adelino" Text="&lt;iphone&gt;&lt;ipad&gt;&lt;ios&gt;" />
  <row Id="20907" PostHistoryTypeId="17" PostId="10059" RevisionGUID="32e3af32-0954-4f7d-adf9-752d1ac25989" CreationDate="2011-03-21T21:01:17.610" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/18715/best-game-engine-2d-for-ios" Text="" />
  <row Id="20912" PostHistoryTypeId="5" PostId="10059" RevisionGUID="7136cee2-c245-4ab1-9b84-150153a27872" CreationDate="2011-03-21T21:10:57.070" UserId="1430" Comment="grammar, etc. tags." Text="which is the best 2D game enginefor iOS?&#xD;&#xA;&#xD;&#xA;I really need a game engine that allows me to modify the game code because I need to control the multi-touch events. I have a framework that detects the gesture that the player makes and I need to test this gesture recognizer in a game, so I have to have the freedom to change the game code. I don't want anything like GameSalad where you can't control anything.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;" />
  <row Id="20913" PostHistoryTypeId="6" PostId="10059" RevisionGUID="7136cee2-c245-4ab1-9b84-150153a27872" CreationDate="2011-03-21T21:10:57.070" UserId="1430" Comment="grammar, etc. tags." Text="&lt;engine&gt;&lt;ios&gt;" />
  <row Id="20914" PostHistoryTypeId="5" PostId="10003" RevisionGUID="d901db35-c812-427a-ae31-5ee3f18c32d0" CreationDate="2011-03-21T21:18:11.990" UserId="6188" Comment="Added some details" Text="I'm trying to write the graphics module of my engine. That is, this part of the code only provides an interface through which to load images, fonts, etc and draw them on the screen. It is also a wrapper for the library I'm using (SDL in this case).&#xD;&#xA;&#xD;&#xA;Here are the interfaces for my `Image`, `Font` and `GraphicsRenderer` classes. Please tell me if I'm going the right way. &#xD;&#xA;&#xD;&#xA;**Image**&#xD;&#xA;&#xD;&#xA;	class Image&#xD;&#xA;	{&#xD;&#xA;	  public:&#xD;&#xA;		Image();&#xD;&#xA;		Image(const Image&amp; other);&#xD;&#xA;		Image(const char* file);&#xD;&#xA;		~Image();&#xD;&#xA;&#xD;&#xA;		bool load(const char* file);&#xD;&#xA;		void free();&#xD;&#xA;		bool isLoaded() const;&#xD;&#xA;&#xD;&#xA;		Image&amp; operator=(const Image&amp; other);&#xD;&#xA;&#xD;&#xA;	  private:&#xD;&#xA;		friend class GraphicsRenderer;&#xD;&#xA;		void* data_;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;**Font**&#xD;&#xA;&#xD;&#xA;	class Font&#xD;&#xA;	{&#xD;&#xA;	  public:&#xD;&#xA;		Font();&#xD;&#xA;		Font(const Font&amp; other);&#xD;&#xA;		Font(const char* file, int ptsize);&#xD;&#xA;		~Font();&#xD;&#xA;&#xD;&#xA;		void load(const char* file, int ptsize);&#xD;&#xA;		void free();&#xD;&#xA;		bool isLoaded() const;&#xD;&#xA;&#xD;&#xA;		Font&amp; operator=(const Font&amp; other);&#xD;&#xA;&#xD;&#xA;	  private:&#xD;&#xA;		friend class GraphicsRenderer;&#xD;&#xA;		void* data_;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;**GrapphicsRenderer**&#xD;&#xA;&#xD;&#xA;	class GraphicsRenderer&#xD;&#xA;	{&#xD;&#xA;	  public:&#xD;&#xA;		static GraphicsRenderer* Instance();&#xD;&#xA;&#xD;&#xA;		void blitImage(const Image&amp; img, int x, int y);&#xD;&#xA;		void blitText(const char* string, const Font&amp; font, int x, int y);&#xD;&#xA;		void render();&#xD;&#xA;&#xD;&#xA;	  protected:&#xD;&#xA;		GraphicsRenderer();&#xD;&#xA;		GraphicsRenderer(const GraphicsRenderer&amp; other);&#xD;&#xA;		GraphicsRenderer&amp; operator=(const GraphicsRenderer&amp; other);&#xD;&#xA;		~GraphicsRenderer();&#xD;&#xA;&#xD;&#xA;	  private:&#xD;&#xA;		void* screen_;&#xD;&#xA;&#xD;&#xA;		bool initialize();&#xD;&#xA;		void finalize();&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;**Edit:** Some changes to the code and more details.&#xD;&#xA;&#xD;&#xA;Per some of the discussions here I decided to replace my use of `void*` with something like this:&#xD;&#xA;&#xD;&#xA;    class Image&#xD;&#xA;    {&#xD;&#xA;      private:&#xD;&#xA;        struct ImageData;&#xD;&#xA;        std::shared_ptr&lt;ImageData&gt; data_;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;(Obviously I'll do the same thing for the `Font` class.)&#xD;&#xA;&#xD;&#xA;I should also mention hat these are not my final, complete classes. I only show here the basic functionality (loading and rendering). Instead of telling me what functionality you think I might need to add (rotating images, skewing, scaling, etc) just concentrate on reviewing what I already have. I'll try to defend my choices it I can, or change my approach if I cannot. " />
  <row Id="20915" PostHistoryTypeId="2" PostId="10060" RevisionGUID="e7bd8c93-78bb-40ea-baf3-c84b6ef4fb84" CreationDate="2011-03-21T21:40:26.890" UserId="5021" Text="I'm writing a game for the xbox360 using XNA.&#xD;&#xA;I would like to draw several models with a single DrawInstancedPrimitives call. Each model will use a different texture.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To do this, I would like to create a sampler array, and select which sampler to use in the array from a value passed into the shader from the instance vertex buffer.&#xD;&#xA;&#xD;&#xA;So the shader code might look like:&#xD;&#xA;&#xD;&#xA;    void InstancingVertexShader(..., in float4x4 data : TEXCOORD0)&#xD;&#xA;    {&#xD;&#xA;        output.TextureIndex = data._m00&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void InstancingPixelShader(...)&#xD;&#xA;    {&#xD;&#xA;        color = tex2Dlod(samplers[input.TextureIndex]);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Before I start trying to implement that, my question is:&#xD;&#xA;&#xD;&#xA;Is it possible to do that, or will the HLSL complain?&#xD;&#xA;&#xD;&#xA;Are there any cons to this method that I should know about?" />
  <row Id="20916" PostHistoryTypeId="1" PostId="10060" RevisionGUID="e7bd8c93-78bb-40ea-baf3-c84b6ef4fb84" CreationDate="2011-03-21T21:40:26.890" UserId="5021" Text="HLSL: Using instance float input to select texture index, possible?" />
  <row Id="20917" PostHistoryTypeId="3" PostId="10060" RevisionGUID="e7bd8c93-78bb-40ea-baf3-c84b6ef4fb84" CreationDate="2011-03-21T21:40:26.890" UserId="5021" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;hlsl&gt;" />
  <row Id="20918" PostHistoryTypeId="2" PostId="10061" RevisionGUID="81b8e33d-5618-48b4-86ef-59fa7433ca08" CreationDate="2011-03-21T22:51:39.220" UserId="5378" Text="How can i achieve transparency and shadowing for a model in XNA ? Do you have a good tutorial ? &#xD;&#xA;&#xD;&#xA;For the shadow i can manage the effect but how can i implement the transparency also ? Do i have to use the pass in effects ? And if so, how can i make an object transparent ?" />
  <row Id="20919" PostHistoryTypeId="1" PostId="10061" RevisionGUID="81b8e33d-5618-48b4-86ef-59fa7433ca08" CreationDate="2011-03-21T22:51:39.220" UserId="5378" Text="achieve transparent object" />
  <row Id="20920" PostHistoryTypeId="3" PostId="10061" RevisionGUID="81b8e33d-5618-48b4-86ef-59fa7433ca08" CreationDate="2011-03-21T22:51:39.220" UserId="5378" Text="&lt;xna&gt;&lt;effects&gt;" />
  <row Id="20921" PostHistoryTypeId="2" PostId="10062" RevisionGUID="eb09ef9c-a93e-41d4-b867-5f1ebe0795f6" CreationDate="2011-03-21T23:11:28.883" UserId="4410" Text="With 3D textures you could use the 'w' component of the 3D texture co-ordinates to select a different texture to sample from.&#xD;&#xA;&#xD;&#xA;What are you trying to achieve? Are you making big savings by rendering all 3 with a single call? You could also use a texture page/atlas to have all 3 textures in one larger texture (maybe with a little wastage) and then have the 3 set's of UV's pick the correct texture out of the right part of the image." />
  <row Id="20922" PostHistoryTypeId="25" PostId="10060" RevisionGUID="d149f4d0-b6dd-41ba-86ac-1b3725e1e510" CreationDate="2011-03-21T23:23:33.773" Comment="http://twitter.com/#!/StackGameDev/status/49974456881397761" />
  <row Id="20923" PostHistoryTypeId="5" PostId="9985" RevisionGUID="2fd4cf26-7cca-4de5-add0-eb1fa8f2c0a3" CreationDate="2011-03-21T23:39:15.650" UserId="853" Comment="added 95 characters in body" Text="I'm a software engineering student with a focus on game development and am wondering how big of a part does requirement analysis play a part in game development? &#xD;&#xA;&#xD;&#xA;I'm asking because there is a class being offered and I could take it. It is all about requirements analysis. Here is a description:&#xD;&#xA;&#xD;&#xA;&gt;An in-depth study of current research and practice in requirements elicitation, requirements, analysis, requirements specification,requirements verification and validation, and requirements management.&#xD;&#xA;&#xD;&#xA;Would this type of knowledge be useful for an independent game developer?&#xD;&#xA;&#xD;&#xA;The alternatives would be to take artificial intelligence or a software architecture class!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20924" PostHistoryTypeId="2" PostId="10063" RevisionGUID="ee00975d-fc46-43a0-876a-3ca041dd00fe" CreationDate="2011-03-22T00:00:27.887" UserId="457" Text="I'm using the cocos2d and based on your requirements, it seems a good choice. It has support from various tools and is open source withe a liberal license." />
  <row Id="20925" PostHistoryTypeId="2" PostId="10064" RevisionGUID="3cbc0da6-0e02-4285-b6d0-4e52fc8ebbe1" CreationDate="2011-03-22T00:01:31.980" UserId="6237" Text="So what happens if we have player A and B trying to hit eachother in the same update() cycle? Suppose the Update() for player A happens to occur before the Update() for player B in Cycle 1 (or tick, or whatever you call it). There's two scenario's I can think of:&#xD;&#xA;&#xD;&#xA;1. Immediate processing through a message:&#xD;&#xA;&#xD;&#xA;- player A.Update() sees the player wants to hit B, player B gets a message notifying the damage.&#xD;&#xA;- player B.HandleMessage() updates the hitpoints for player B (he dies)&#xD;&#xA;- player B.Update() sees player B is dead.. he can't attack player A&#xD;&#xA;&#xD;&#xA;This is unfair, player A and B should hit eachother, player B died before hitting A just because that entity/gameobject got update() later.&#xD;&#xA;&#xD;&#xA;2. Queueing the message&#xD;&#xA;&#xD;&#xA;- Player A.Update() sees the player wants to hit B, player B gets a message notifying the damage and stores it in a queue&#xD;&#xA;- Player A.Update() checks its queue, it's empty&#xD;&#xA;- player B.Update() first checks for moves so player B send a message to player A with damage aswell&#xD;&#xA;- player B.Update() also handles messages in the queue, processes the damage from player A&#xD;&#xA;- New cycle (2): Player A wants to drink a health potion so Player A.Update() is called and the move is processed&#xD;&#xA;- Player A.Update() checks the message queue and processes damage from player B&#xD;&#xA;&#xD;&#xA;Again this is unfair.. player A is supposed to take the hitpoints in the same turn/cycle/tick!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20926" PostHistoryTypeId="25" PostId="10050" RevisionGUID="363d7449-a658-4f20-936b-a9ec87db7717" CreationDate="2011-03-22T02:23:33.837" Comment="http://twitter.com/#!/StackGameDev/status/50019756002119680" />
  <row Id="20927" PostHistoryTypeId="2" PostId="10065" RevisionGUID="111a2c06-dcc4-49c8-bf53-d68f562fa318" CreationDate="2011-03-22T02:36:46.573" UserId="982" Text="I figure this is a Game Development question as this is a sound generation tool made specifically for games (in particular, Ludum Dare games). &#xD;&#xA;&#xD;&#xA;I have a basic understanding of how sound works, with the changing amplitudes causing changes in pressure to produce sound. What I wonder though is how you go about making sounds through programming, and more specifically how [sfxr][1] does it. My approach would be to have an array of values representing each amplitude and then some how send it to the speakers. But how do you do that? Are there libraries that sfxr uses?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.drpetter.se/project_sfxr.html" />
  <row Id="20928" PostHistoryTypeId="1" PostId="10065" RevisionGUID="111a2c06-dcc4-49c8-bf53-d68f562fa318" CreationDate="2011-03-22T02:36:46.573" UserId="982" Text="How was sfxr made?" />
  <row Id="20929" PostHistoryTypeId="3" PostId="10065" RevisionGUID="111a2c06-dcc4-49c8-bf53-d68f562fa318" CreationDate="2011-03-22T02:36:46.573" UserId="982" Text="&lt;audio&gt;&lt;sound&gt;&lt;sound-effects&gt;&lt;sfxr&gt;" />
  <row Id="20931" PostHistoryTypeId="25" PostId="10065" RevisionGUID="459343b6-43bd-47f5-99e6-bcb01ff1c156" CreationDate="2011-03-22T05:23:34.027" Comment="http://twitter.com/#!/StackGameDev/status/50065055517122560" />
  <row Id="20932" PostHistoryTypeId="2" PostId="10067" RevisionGUID="c9096397-e1bf-4ba6-af96-2be8db295d41" CreationDate="2011-03-22T05:44:23.283" UserId="6190" Text="I don't think anyone can give you a definitive answer to this one.&#xD;&#xA;&#xD;&#xA;You need to way up a number of factors and rate them based on your projects requirements.&#xD;&#xA;&#xD;&#xA; - Licence terms: Are you required to link/mention the provider?&#xD;&#xA; - Features: leader boards weekly/monthly/etc, achievements, matchmaking, etc.&#xD;&#xA; - Platform availability: iOS, Android, WinPhone7, and Web&#xD;&#xA; - Service Performance: Do they place any limit on you that could affect the responsiveness of your game&#xD;&#xA;&#xD;&#xA;If you can't choose sign up with both and see how easy it is to work with either of them." />
  <row Id="20934" PostHistoryTypeId="2" PostId="10068" RevisionGUID="6310869b-7aa0-4393-b72d-4d0fd7dc74d6" CreationDate="2011-03-22T06:52:26.330" UserId="4264" Text="Instead of beziers, you probably want b-splines or catmull-rom splines.&#xD;&#xA;&#xD;&#xA;    float bspline(float t, float p0, float p1, float p2, float p3)&#xD;&#xA;    {&#xD;&#xA;      float it = 1.0f - t;&#xD;&#xA;&#xD;&#xA;      float b0 = it*it*it * (1.0f / 6.0f);&#xD;&#xA;      float b1 = (3*t*t*t - 6*t*t +4) * (1.0f / 6.0f);&#xD;&#xA;      float b2 = (-3*t*t*t +3*t*t + 3*t + 1) * (1.0f / 6.0f);&#xD;&#xA;      float b3 =  t*t*t * (1.0f / 6.0f);&#xD;&#xA;&#xD;&#xA;      return     &#xD;&#xA;        b0*p0 +&#xD;&#xA;        b1*p1 +&#xD;&#xA;        b2*p2 +&#xD;&#xA;        b3*p3;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float catmullrom(float t, float p0, float p1, float p2, float p3)&#xD;&#xA;    {&#xD;&#xA;      return 0.5f * (&#xD;&#xA;              (2 * p1) +&#xD;&#xA;              (-p0 + p2) * t +&#xD;&#xA;              (2 * p0 - 5 * p1 + 4 * p2 - p3) * t * t +&#xD;&#xA;              (-p0 + 3 * p1 - 3 * p2 + p3) * t * t * t&#xD;&#xA;              );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Usage: t ranges from 0 to 1, where the value interpolates the spline between two control points, and the floats p0, p1, p2 and p3 are represent the control points (previous, current, next, and the following). To interpolate n-dimensional curves, just call the functions once per axis.&#xD;&#xA;&#xD;&#xA;The practical difference between bsplines and catmull-rom is basically that catmull-rom goes through all control points while bsplines are more smooth.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20935" PostHistoryTypeId="2" PostId="10069" RevisionGUID="115150cc-d8e7-4390-af67-65c32f3d35bf" CreationDate="2011-03-22T07:14:03.127" UserId="6243" Text="Simple postrendered raytraced reflection of scene will to change the realtime cg." />
  <row Id="20937" PostHistoryTypeId="2" PostId="10071" RevisionGUID="beaa0194-83c6-4e16-b18d-11670a312a01" CreationDate="2011-03-22T07:23:49.423" UserId="4264" Text="The &quot;classic&quot; per pixel collision system assumes that you're not rotating anything, or the rotations of your sprites are fixed.&#xD;&#xA;&#xD;&#xA;Next, make bit masks of your sprites. If your sprites are 32x32 pixels, this is pretty simple, as one sprite consts of 32 32-bit words. If the sprites are wider, things get a bit more complicated.&#xD;&#xA;&#xD;&#xA;    ...xx...    ...++...&#xD;&#xA;    ..xxxx..    ...++...&#xD;&#xA;    .xxxxxx.    ++++++++&#xD;&#xA;    xxx..xxx    ...++...&#xD;&#xA;    .x....x.    ...++...&#xD;&#xA;&#xD;&#xA;To check the collision, first do a aabb collision check, and if the boxes overlap, calculate y difference to know which scanlines to compare, and x difference to calculate the shifts required to make the bitmaps overlap.&#xD;&#xA;&#xD;&#xA;The actual check is just an AND operation.&#xD;&#xA;&#xD;&#xA;    ...xx...    &#xD;&#xA;    ..xxxx..    &#xD;&#xA;    .xxxxxx..++...&#xD;&#xA;    xxx..xxx.++...&#xD;&#xA;    .x....*+++++++&#xD;&#xA;          ...++...&#xD;&#xA;          ...++...&#xD;&#xA;&#xD;&#xA;If the sprite(s) are bigger than 32x32 pixels, the easiest (but not the most performant) way to solve the collision check is to handle them as groups of 32x32 pixel sprites.&#xD;&#xA;&#xD;&#xA;If you're using OpenGL to rotate your sprites, this technique is naturally out. Rasterizing the rotated sprite(s) and doing pixel-by-pixel checking is probably (but not necessarily) prohibitively slow. If you're going that route, no need to hassle with bits, as you'll have to wade through so much data in any case." />
  <row Id="20938" PostHistoryTypeId="2" PostId="10072" RevisionGUID="f8ba17df-ac8f-4b2d-be30-fbdba8646997" CreationDate="2011-03-22T07:23:49.750" UserId="4241" Text="This is posted as an answer because I don't have enough reputation to write a comment.&#xD;&#xA;&#xD;&#xA;You mention that you cannot use texture atlas because then you can't use mipmapping. This is not true. Just generate the mipmap chain for texture atlas yourself (for example by generating mipmaps for individual textures first and then combining them into one big texture dynamically; this is relatively easy because Texture2D generated mipmaps automatically). In shader you can use tex2Dlod, tex2Dgrad, ddx and ddy functions to calculate preferred mipmap level.&#xD;&#xA;&#xD;&#xA;Also, you could take a look about hardware instancing which is obviously available also on Xbox ([http://dotnetkicks.com/csharp/Hardware_Instancing_in_XNA_on_the_XBOX_360][1])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dotnetkicks.com/csharp/Hardware_Instancing_in_XNA_on_the_XBOX_360" />
  <row Id="20939" PostHistoryTypeId="2" PostId="10073" RevisionGUID="466a01df-b164-497b-95ed-3aa31bc85713" CreationDate="2011-03-22T08:15:12.470" UserId="288" Text="Practical answer: **No** (in SM 3.0; apparently you can in SM 4.0, but I haven't checked.)&#xD;&#xA;&#xD;&#xA;Technically the answer is yes, as it is legal HLSL. But if the sampler index cannot be determined at *compile* time, then compilation will fail because there is no way to express this as a GPU instruction.&#xD;&#xA;&#xD;&#xA;So, **you can only select a sampler by index if that index is constant at compile time**.&#xD;&#xA;&#xD;&#xA;Of course you can achieve a similar effect to indexing by using dynamic branching or simply doing multiple reads and selecting one. But this is only a good idea if you have *lots* of texture bandwidth to spare.&#xD;&#xA;&#xD;&#xA;The best solution is probably a texture atlas. You can create your own mipmaps, if that is a concern.&#xD;&#xA;&#xD;&#xA;(&lt;a href=&quot;http://www.gamedev.net/topic/536793-sampler-arrays-in-hlsl---shader-model-30/&quot;&gt;Here is a thread on GameDev.net that is the same as your question&lt;/a&gt;.)" />
  <row Id="20940" PostHistoryTypeId="25" PostId="10061" RevisionGUID="1e1251d2-6ff6-4882-b18f-25a611f23d67" CreationDate="2011-03-22T08:23:33.900" Comment="http://twitter.com/#!/StackGameDev/status/50110353136287744" />
  <row Id="20941" PostHistoryTypeId="2" PostId="10074" RevisionGUID="a3dff7e6-1c3d-4dfe-8ce8-f9c2c9ee7bd8" CreationDate="2011-03-22T08:38:07.177" UserId="4129" Text="You can obviously avoid unnecessary computation by doing rectangle-intersection first.&#xD;&#xA;&#xD;&#xA;Say you really want per-pixel intersection, however.&#xD;&#xA;&#xD;&#xA;You could create a 1-bit 'hit' mask for all sprites and do an bitwise &amp; op on the overlap.  However, for large overlap this can be *very* expensive.&#xD;&#xA;&#xD;&#xA;An approach that worked very well back in the platform game era - and which would work equally well on phones today - is to **[run-length-encode (RLE)][1]** your hit masks.  This may also reduce storage.&#xD;&#xA;&#xD;&#xA;If your hit mask is a list of RLE-encoded scan-lines you can cheaply do intersection by walking these encoded lines.&#xD;&#xA;&#xD;&#xA;I've seen DOS games that go so far as to special-case right-sided intersections and walk those scan-lines backwards!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Run-length_encoding" />
  <row Id="20942" PostHistoryTypeId="2" PostId="10075" RevisionGUID="4ab4e60e-942b-4156-8789-02479290ec7e" CreationDate="2011-03-22T08:59:54.443" UserId="6244" Text="I just started the developpement of an XNA game and I'm asking myself if it wouldn't be better to use an open-source alternative since I absolutely want to keep the complete control over my game. I need to be able to sell it to whoever I want, using the media I want.&#xD;&#xA;&#xD;&#xA;Based on the XNA license and all that sort of legal stuff, I am allowed to sell an XNA game on my own, or am I forced to sell it through Xbox Live Marketplace?&#xD;&#xA;&#xD;&#xA;I'd like to see some reliable reference with your answer. Thanks!" />
  <row Id="20943" PostHistoryTypeId="1" PostId="10075" RevisionGUID="4ab4e60e-942b-4156-8789-02479290ec7e" CreationDate="2011-03-22T08:59:54.443" UserId="6244" Text="Am I allowed to sell an XNA game by myself?" />
  <row Id="20944" PostHistoryTypeId="3" PostId="10075" RevisionGUID="4ab4e60e-942b-4156-8789-02479290ec7e" CreationDate="2011-03-22T08:59:54.443" UserId="6244" Text="&lt;xna&gt;&lt;legal&gt;" />
  <row Id="20945" PostHistoryTypeId="2" PostId="10076" RevisionGUID="9f56e77b-616e-4c81-bebb-efe9926cd58b" CreationDate="2011-03-22T09:06:28.727" UserId="6245" Text="We have been working on a multi-player platform that you might find interesting. You can see our project at [www.16cubes.com][1] -- we are providing a simple javascript layer to do peer to peer communication. It is somewhat based on the Comet principle, and we have plans to move to using websockets as it becomes a bit more standardized. On the other hand, we are providing some features off the shelf .. like automatic opponent matching, game chat, facebook friends one-click invitation etc. &#xD;&#xA;&#xD;&#xA;We have a demo tic-tac-toe, you can probably get a better idea if you see it. And yes, you can play anonymously too. No registration required, if you don't want. There's less than 10 javascript API's you need to code against, and its available at [www.16cubes.com/documentation][2]&#xD;&#xA;&#xD;&#xA;We are actively looking for feedback, so let us know both good and bad&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.16cubes.com&#xD;&#xA;  [2]: http://www.16cubes.com/documentation" />
  <row Id="20946" PostHistoryTypeId="2" PostId="10077" RevisionGUID="1f9d4d6a-6440-4df8-8a13-8ebdb3acec45" CreationDate="2011-03-22T09:20:37.623" UserId="6245" Text="I think if you make your game multi-player, which entails keeping your game logic in the server you would probably make it at least less appealing to steal. You can't trust the client really. As someone has already mentioned, there are tools for even compiled languages like Java and Flash, that can reverse engineer the text of the code from the byte code. &#xD;&#xA;" />
  <row Id="20947" PostHistoryTypeId="2" PostId="10078" RevisionGUID="8c357eed-48c6-406c-a888-106a4c753ea8" CreationDate="2011-03-22T09:25:59.187" UserId="2091" Text="Well, you usually don't have to go low level and transport the audio data to the speakers.  The operating system has an interface for that (be it [ALSA][1], [DirectSound][2], [CoreAudio][3], etc).  Using that library, you just have to periodically give it a block of samples of a fixed length (for example, 512 samples).  The sound library stores that array in an internal buffer and plays it.  &#xD;&#xA;&#xD;&#xA;If your block is, for example, 512 samples long, and the sampling frequency is 44.1Khz, this means that you have 512/44100 = 11 milliseconds to generate the next block of 512 samples.  If you take longer to update, usually the old block is replayed again (the sound doesn't stop).  That sounds like a broken CD, very annoying.  You don't want that.  I guess what sfxr does is store the whole wave and just copy the relevant chunk to memory, that operation takes virtually nothing.&#xD;&#xA;&#xD;&#xA;On top of that, there are other libraries that provide an abstracted API and &quot;talk&quot; to the operating system's sound architecture.  This way you that you can easily write multiplatform applications without having to adapt your sound code to each system.  Examples of them are [fmod][4], [OpenAL][5], [SDL][6], [PortAudio][7], and a long etcetera.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/DirectSound&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Core_Audio&#xD;&#xA;  [4]: http://www.fmod.org/&#xD;&#xA;  [5]: http://connect.creativelabs.com/openal/default.aspx&#xD;&#xA;  [6]: http://www.libsdl.org/&#xD;&#xA;  [7]: http://www.portaudio.com/" />
  <row Id="20948" PostHistoryTypeId="2" PostId="10079" RevisionGUID="c988b04f-9b45-4513-aefe-40144fa596b6" CreationDate="2011-03-22T09:26:40.907" UserId="5224" Text="Yes you can sell it by yourself, XNA inhibits no restrictions like that whatsoever. However you can't package the XNA framework installer into your installer, you will have to ask people to download it separately.&#xD;&#xA;&#xD;&#xA;Edit: on the PC that is, there is no way to bypass the Xbox and WP7 stores." />
  <row Id="20949" PostHistoryTypeId="2" PostId="10080" RevisionGUID="b7fef9fc-55a8-44f4-b8da-71f85efb66ac" CreationDate="2011-03-22T09:29:53.960" UserId="6245" Text="We heard you! Long story short, we demoed our platform at the SV IGDA event at Google the other day, and somebody was mentioning that they have seen posts here on the forum about this problem.&#xD;&#xA;&#xD;&#xA;We have been working on a multi-player platform that you might find interesting. You can see our project at [www.16cubes.com][1] -- we are providing a simple javascript layer to do peer to peer communication. It is somewhat based on the Comet principle, and we have plans to move to using websockets as it becomes a bit more standardized. On the other hand, we are providing some features off the shelf .. like automatic opponent matching, game chat, facebook friends one-click invitation etc.&#xD;&#xA;&#xD;&#xA;We have a demo tic-tac-toe, you can probably get a better idea if you see it. And yes, you can play anonymously too. No registration required, if you don't want. There's less than 10 javascript API's you need to code against, and its available at [www.16cubes.com/documentation][2]&#xD;&#xA;&#xD;&#xA;We are actively looking for feedback, so let us know both good and bad &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.16cubes.com&#xD;&#xA;  [2]: http://www.16cubes.com/documentation" />
  <row Id="20950" PostHistoryTypeId="5" PostId="9957" RevisionGUID="b3b74191-e8ad-463c-8f1a-9a848cadf68f" CreationDate="2011-03-22T09:54:40.403" UserId="450" Comment="added 4 characters in body" Text="&gt; That would be really much traffic for such a simple game.&#xD;&#xA;&#xD;&#xA;The problem, your type of game faces, is that it needs to be extremely responsive. On first glance World of Warcraft may look like a highly complex game, but there is far less information that needs to be transferred to the client and status updates can be a lot less frequent. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The math look correct to me, but Kibibytes (1024) are only used for RAM, [network traffic is described using normal Kilobytes][1] (1000).&#xD;&#xA;&#xD;&#xA;You said that the server has to sent the package from the clients back to each one. That's probably the first thing you can optimize by just removing this step. The client should know what he told the server so there is no need to sent this information back to it.&#xD;&#xA;&#xD;&#xA;48,000b/s upstream + 216,000b/s downstream = 264,000b/s in sum. That is 120 MB/h.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another optimization is to only sent information from the client to the server, when the user does some action such as pressing or releasing an arrow key.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;900 bytes per status update seems large. Without knowing details, I'd expect &#xD;&#xA;&#xD;&#xA;    package_header + message_type + 7 * (position + vector)&#xD;&#xA;    64             + 1            + 7 * (2*4      + 2*4) = 177 bytes&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_prefix" />
  <row Id="20951" PostHistoryTypeId="2" PostId="10081" RevisionGUID="4225d03e-2f31-44f2-925c-2d4187ed10f9" CreationDate="2011-03-22T09:55:07.143" UserId="6210" Text="I couldn't find easy 'official' reference on the subject, but I can provide indirect evidence. &#xD;&#xA;&#xD;&#xA;There are currently several XNA games on sale on Steam, which is not related to Microsoft in any way, see for instance Beat Hazard: [on Steam store][1] and [on XBox Live Indy Games][2].&#xD;&#xA;&#xD;&#xA;There are parts of XNA that are off-limits though. You can't use most of the online functionality on the PC, as it is related to XBox Live and using MS's dedicated servers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/app/49600/?snr=1_7_7_151_150_1&#xD;&#xA;  [2]: http://marketplace.xbox.com/fr-FR/Product/Beat-Hazard/66acd000-77fe-1000-9115-d80258550355?cid=search" />
  <row Id="20954" PostHistoryTypeId="2" PostId="10082" RevisionGUID="c10c7196-4aec-4f12-9a61-6be94b4749be" CreationDate="2011-03-22T10:37:12.863" UserId="3656" Text="I started writing this answer, and it just got longer and longer, so this will be the verbose answer, so take from it what you will. Like CeeJay said though, you don't need to worry about this stuff typically. Especially so if you can use an API like FMOD, Wwise, or XACT that lets your sound designer hook everything up themselves so that you're not saying &quot;play this.wav&quot; but instead &quot;trigger the 'PlayExplosionSound' event&quot; you'll have a much easier time integrating sound into your game.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;SFXR works by building some fundamental sound generators and offers the parameters you see in the GUI. Both XNA and ActionScript 3 have recently provided a way to directly pass samples to the underlying mixing engine on-the-fly. XNA could already define static sample buffers (looks like XNASfxrSynth uses this), but now you can have a [DynamicSoundEffectInstance][1] fire an event requesting you to feed it a sample buffer. This greatly reduces your memory footprint for continuously generated audio signals. You could technically write your own mixing engine as well, just have a single master sound instance to which all your sample buffers are sent for mixing.&#xD;&#xA;&#xD;&#xA;A general example of making a sine wave generator can be found in [Adobe's documentation][2] for their new sampleDataEvent event in the Sound class. It's really just about knowing how digital audio works and constructing the correct sample buffers to get the sound you want. Also, look at [Andre Michelle's][3] site for more awesome advanced audio processing in Flash.&#xD;&#xA;&#xD;&#xA;Like CeeJay said, audio data typically has an associated sampling frequency (usually 44.1kHz or 48kHz--Battlefield Bad Company uses 48 to achieve high fidelity playback when you've got a good 5.1 system hooked up). When working with digital audio, you have to worry about something called the Nyquist frequency. Basically, the highest frequency you can represent in an audio signal is half of your sampling frequency. The reason why 44.1kHz and 48kHz are the most common sampling frequencies is that the range of human hearing is roughly 0 to 20kHz. Thus 44.1kHz and 48kHz do a pretty good job at reconstructing a high fidelity sound on most consumer's systems.&#xD;&#xA;&#xD;&#xA;It also has a bit depth, which is typically 16 for the final mix. This means that you have 16 bits to represent the amplitude of each sample, -32768 to 32767. This translates roughly to having a volume range of 96 dB to work with. The standard intensity limit for sound in a movie theater is 85 dB SPL (the SPL bit is a way to standardize the loudness, since the decibel system is relative), so 16 bits work really well for a final mix on most consumer's systems.&#xD;&#xA;&#xD;&#xA;Often a game will do some internal mixing using 32 bit floating point values and then convert to 16 bit before pushing to the sound card. The reason for this is the same reason you will record in 24 bit with a 96kHz sampling frequency. When you start manipulating sound, you want as much headroom as you can get. Digital audio effects can sometimes introduce cool new high frequency signals that then get manipulated further down the signal chain and have an affect on the final output. These may get cut off when you mix down to 16 bit, 48/44.1k, but you will have preserved all the data along the way. It's like keeping a copy of your high-res .PSD file that just gets re-exported every time you need to alter an art asset. Except this is all happening in real-time in the audio engine.&#xD;&#xA;&#xD;&#xA;If you want to read more about the lower level concepts of audio programming, I recommend looking at [The Audio Programming Book][4] by Richard Boulanger &amp; Victor Lazzarini. I just received my copy a few weeks ago, and it does a great job at easing you into the concepts of audio programming (the introductory C chapter's kind of a tedious though since there's important concepts in it you can't miss, but you also have to sit through explanations of pointer arithmetic).&#xD;&#xA;&#xD;&#xA;Another good book is [Who Is Fourier?][5]. It assumes little math background and covers the basics of the Fourier transform and general wave theory in the context of language researchers trying to study speech patterns. Kind of has the kiddie introductory Japanese language textbook feel with cute hand-drawn characters, but at the same time it's talking about Riemann sums by the second chapter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.dynamicsoundeffectinstance.aspx&#xD;&#xA;  [2]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html#includeExamplesSummary&#xD;&#xA;  [3]: http://www.andre-michelle.com/&#xD;&#xA;  [4]: http://www.amazon.com/Audio-Programming-Book-Richard-Boulanger/dp/0262014467&#xD;&#xA;  [5]: http://www.amazon.com/Who-Fourier-Mathematical-Transnational-College/dp/0964350408" />
  <row Id="20955" PostHistoryTypeId="2" PostId="10083" RevisionGUID="8b77429e-ae34-403a-b78f-dd234cfd974c" CreationDate="2011-03-22T11:05:52.657" UserId="4264" Text="When I was a kid, everything had a speech synthesizer in it, more or less. A couple years back I started to wonder where the technology is going after all these years, and after some research found that it's going nowhere. Storage has increased, making concatenative synthesis more life-like, but little else has improved.&#xD;&#xA;&#xD;&#xA;Text to speech seems to be the primary research field. Most books I've found of the subject of speech synthesis skim on the actual voice generation and then spend hundreds of pages on text to speech.&#xD;&#xA;&#xD;&#xA;**I'm not interested in text to speech as such, but more on the voice generation.** Yet, I haven't found a single book with good, practical explanation of this. Concatenative synthesis is simple to grasp, but formant is the one I'd like more information about. (The third method, physical modelling, would be a plus, but not all that interesting).&#xD;&#xA;&#xD;&#xA;What makes this game specific is that I'd love to make a tool that lets low budget/downloadable games have speech, without having to go out to get actual voice actors and having to store hundreds of megs of oggs with the game. Since the author is in complete control of the voice editing before release, text to speech is less important; what's more important is the voice synthesis.&#xD;&#xA;&#xD;&#xA;So, anyone know any good books about this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20956" PostHistoryTypeId="1" PostId="10083" RevisionGUID="8b77429e-ae34-403a-b78f-dd234cfd974c" CreationDate="2011-03-22T11:05:52.657" UserId="4264" Text="Speech synthesis book?" />
  <row Id="20957" PostHistoryTypeId="3" PostId="10083" RevisionGUID="8b77429e-ae34-403a-b78f-dd234cfd974c" CreationDate="2011-03-22T11:05:52.657" UserId="4264" Text="&lt;tools&gt;&lt;audio&gt;&lt;books&gt;&lt;sound&gt;&lt;voice&gt;" />
  <row Id="20958" PostHistoryTypeId="2" PostId="10084" RevisionGUID="49d37a61-a2fe-4bbc-ab9b-8ad22538275f" CreationDate="2011-03-22T11:14:27.387" UserId="3794" Text="For transparenty objects you have to define alpha to you color or texture and enable alpha blending in you render state: [link to msdn][1]&#xD;&#xA;&#xD;&#xA;Transparent objects have to be always rendered after opaque scene. If you have only one object, than you dont have problem.&#xD;&#xA;&#xD;&#xA;If you have more objects, than there is problem to solve. Alpha blending is not comutative, so objects have to be sorted in a distance from actual camera position. Order independent methods exists. Original [Depth peeling][2] or [dual depth peeling][3] is mostly use on HW without sm5 (shader model 5 - dx11). &#xD;&#xA;&#xD;&#xA;Shadows for transparent object are really not trivial task. First study shadow mapping. And once you be solid rock in it, than start investigate transparent shadows (take it only as recomandation). [Wikipedia][4] has surprisingly good article about it. [Riemer's][5] XNA tutorial series contaons also very good shadow map tutorial. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.renderstate.alphablendenable%28v=xnagamestudio.31%29.aspx&#xD;&#xA;  [2]: http://developer.nvidia.com/object/Interactive_Order_Transparency.html&#xD;&#xA;  [3]: http://developer.download.nvidia.com/SDK/10/opengl/src/dual_depth_peeling/doc/DualDepthPeeling.pdf&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Shadow_mapping&#xD;&#xA;  [5]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php" />
  <row Id="20959" PostHistoryTypeId="25" PostId="10075" RevisionGUID="97291b94-dfe5-4a4d-9951-2fdac57bfcab" CreationDate="2011-03-22T11:23:34.273" Comment="http://twitter.com/#!/StackGameDev/status/50155653435633664" />
  <row Id="20960" PostHistoryTypeId="2" PostId="10085" RevisionGUID="b4bfdde2-23b7-4691-892b-fa5e8c90d021" CreationDate="2011-03-22T11:58:22.620" UserId="3656" Text="I can't recommend any specific books on speech, but you might want to look at [Festvox][1], CMU's open source speech synthesis library, as a starting point.&#xD;&#xA;&#xD;&#xA;Awesome idea though, if you can produce voices near the same quality as Nuance or A Capella and be indie-friendly, that would be a huge opportunity for you and a great benefit to indie devs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://festvox.org/" />
  <row Id="20961" PostHistoryTypeId="5" PostId="10067" RevisionGUID="abba0ee0-6033-441f-b22f-373943bc6eb9" CreationDate="2011-03-22T13:02:16.050" UserId="4200" Comment="Pesky homophones" Text="I don't think anyone can give you a definitive answer to this one.&#xD;&#xA;&#xD;&#xA;You need to weigh up a number of factors and rate them based on your projects requirements.&#xD;&#xA;&#xD;&#xA; - Licence terms: Are you required to link/mention the provider?&#xD;&#xA; - Features: leader boards weekly/monthly/etc, achievements, matchmaking, etc.&#xD;&#xA; - Platform availability: iOS, Android, WinPhone7, and Web&#xD;&#xA; - Service Performance: Do they place any limit on you that could affect the responsiveness of your game&#xD;&#xA;&#xD;&#xA;If you can't choose sign up with both and see how easy it is to work with either of them." />
  <row Id="20962" PostHistoryTypeId="24" PostId="10067" RevisionGUID="abba0ee0-6033-441f-b22f-373943bc6eb9" CreationDate="2011-03-22T13:02:16.050" Comment="Proposed by 4200 approved by 14 edit id of 92" />
  <row Id="20963" PostHistoryTypeId="2" PostId="10086" RevisionGUID="a45689e0-605e-4b1e-b211-b20137ab7feb" CreationDate="2011-03-22T14:19:24.590" UserId="288" Text="&lt;a href=&quot;http://gamedev.stackexchange.com/questions/426/feasibility-of-an-xna-game-on-pc/462#462&quot;&gt;Check out this answer here&lt;/a&gt;. The simple answer is: **Yes**.&#xD;&#xA;&#xD;&#xA;The networking stuff that uses &quot;Games for Windows Live&quot; does not work on Windows without Microsoft's blessing. But you can always just use the plain ol' networking stuff in the .NET Framework.&#xD;&#xA;&#xD;&#xA;You cannot distribute XNA Game Studio (the Visual Studio bit) - this affects the Content Pipeline APIs for building content. This means, if you have a level editor for example, your users will have to manually install XNA GS.&#xD;&#xA;&#xD;&#xA;The XNA Framework runtime, on the other hand, *is* &lt;a href=&quot;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a88c6dec-aeae-42cd-a108-d35c013c3b97&quot;&gt;redistributable&lt;/a&gt;." />
  <row Id="20964" PostHistoryTypeId="5" PostId="462" RevisionGUID="c244b82d-1cf1-4928-b5e2-017addc2853f" CreationDate="2011-03-22T14:22:47.177" UserId="288" Comment="added 61 characters in body" Text="I don't have any stats to compare the differences between XNA and non-XNA game sales - I'd suggest that data is impossible to come by - but I imagine it would show there is no difference for equivalent games. So let me answer your question with a run through of the major issues specific to distribution of XNA games on PC (particularly online):&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;First of all: For an XNA game to run the system needs to have installed: the XNA Framework, and the .NET Framework.&#xD;&#xA;&#xD;&#xA;The XNA Framework is a fairly small download, easy to install, but will requires admin privileges - so will cause a UAC prompt as well as a EULA prompt. The framework is not upwards or downwards compatible - but can be installed side-by-side. (ie: a XNA 3.1 game needs XNA 3.1 and won't run on XNA 4.0).&#xD;&#xA;&#xD;&#xA;The .NET Framework 2.0 is bundled on Vista and above, so I recommend targeting that (Project Properties -&gt; Target Framework). [UPDATE: XNA 4 requires .NET 4, so this won't work any more]&#xD;&#xA;&#xD;&#xA;The .NET 3.5 installation is very, very slow - I recommend avoiding it. I'm not sure about the full 4.0 installation, but the 4.0 Client Profile install is fast enough if you need newer .NET features (you probably don't - you can still use [lambdas][1] and [extension methods][2] in .NET 2.0).&#xD;&#xA;&#xD;&#xA;A .NET Framework install will of course cause a UAC and EULA prompt. It can also cause a reboot.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Currently the &quot;standard&quot; way to distribute XNA games is with ClickOnce. You can do an online install - the downside is that your user gets a small &quot;bootstrap&quot; installer executable that pulls all the loose game files from your website. Alternately you can just distribute all those loose files and the installer in a zip. Neither of these is a self-contained executable file like users expect from most games.&#xD;&#xA;&#xD;&#xA;A major pain of ClickOnce is that it will display several warnings about downloading unsigned software, which can look quite scary.&#xD;&#xA;&#xD;&#xA;Another other downside of ClickOnce is that you don't have much control over things like, for example, what start menu entries you have.&#xD;&#xA;&#xD;&#xA;The upside to using ClickOnce is that it's very easy to set up, and it will automatically download and install the required frameworks from Microsoft's website.&#xD;&#xA;&#xD;&#xA;I am under the impression that these issues with ClickOnce can be solved by using an MSI instead - and it can still automatically download and install the required frameworks. I'm afraid I don't have specific instructions for this on hand.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you do your own installation, or no installation at all, you need to be aware that your game executable will crash with an extremely unhelpful error message if the required frameworks are missing!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Oh, and your install might be a bit bigger (or a lot, if you include frameworks). If you're using XNA's built in content stuff (and why not, it's there and it's easy) your user might have more to download because the files aren't compressed as well as they might be if you handled it yourself (especially audio).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That's about it. Once the game is installed you're in pretty much an identical situation to any other game using native DirectX (ie: most of them).&#xD;&#xA;&#xD;&#xA;(If you're doing something like CD-ROM distribution, instead of online distribution, you may face some of the same issues I described - but you can put everything that would otherwise need to be to be downloaded onto your CD instead, including the required frameworks.)&#xD;&#xA;&#xD;&#xA;If you're doing downloadable shareware you're basically trying to get users along a chain from finding out about your software, to playing the demo, to buying the full game. The downside of XNA is that it makes the installation step in this chain a bit harder to polish - but it's still possible.&#xD;&#xA;&#xD;&#xA;(IMO the upside of easier development and XBox compatibility is well worth it.)&#xD;&#xA;&#xD;&#xA;So to bring this back around to your question: using XNA might make a tiny difference - but not enough that it matters. So any stats you find about PC game sales should be applicable to XNA games on PC.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.danielmoth.com/Blog/using-c-30-from-net-20.aspx&#xD;&#xA;  [2]: http://www.danielmoth.com/Blog/Using-Extension-Methods-In-Fx-20-Projects.aspx" />
  <row Id="20965" PostHistoryTypeId="25" PostId="10083" RevisionGUID="b4f994d3-9d8f-439e-a54b-c49fbd22bdf4" CreationDate="2011-03-22T14:23:34.370" Comment="http://twitter.com/#!/StackGameDev/status/50200951486816256" />
  <row Id="20966" PostHistoryTypeId="2" PostId="10087" RevisionGUID="77b9c02f-ecf6-44fb-aa08-5f5a329b9d80" CreationDate="2011-03-22T14:24:34.637" UserId="6249" Text="I have recently purchased this asset from the3dstudio.com:&#xD;&#xA;&#xD;&#xA;http://www.the3dstudio.com/product_details.aspx?id_product=193089&#xD;&#xA;&#xD;&#xA;It has a corrupt .3ds file available, and a .max (as well as what appears to be a broken .dfx and a textureless and animation-less .obj).&#xD;&#xA;&#xD;&#xA;I wrote the site administrator, who attempted to make me a new .3ds file from his master copy (I'm assuming the working .max file) but said:&#xD;&#xA;&#xD;&#xA;&quot;The .3ds export doesn't seem to be completed so normally we would just re-export it but I can't get a good export on this model. Only the low-poly control mesh wants to export so I emailed the author to see if they can get us a better file and will let you know as soon as they reply.&#xD;&#xA;&#xD;&#xA;&quot;With any non-max format you will not have any rigging in the model as common formats (3ds, dxf, obj, etc) do not support things like rigging (which are program specific) so any export to 3DS (and thus C4D) would just be the geometry, textures, and basic materials.&quot;&#xD;&#xA;&#xD;&#xA;So it was my understanding based on my very limited knowledge and this e-mail I got that none of the formats that I'd be able to get into Cinema 4D would be able to carry animation data. Then I saw this Elance job posting:&#xD;&#xA;&#xD;&#xA;http://www.elance.com/j/convert-3d-studio-max-animation-cinema-4d/19612175/&#xD;&#xA;&#xD;&#xA;Now obviously that's not, like, internet canon: I realize just because there was a listing on some site somewhere that made it seem like it was possible doesn't make it true. But it looks like that team in India was willing to do it for sixty bucks, which makes it hard to believe it could be that in-depth of a process. But maybe that's my naïveté about either 3D or American to Indian currency conversion rates or both.&#xD;&#xA;&#xD;&#xA;So, is this possible?" />
  <row Id="20967" PostHistoryTypeId="1" PostId="10087" RevisionGUID="77b9c02f-ecf6-44fb-aa08-5f5a329b9d80" CreationDate="2011-03-22T14:24:34.637" UserId="6249" Text="How can I convert a 3ds Max .max to a Cinema 4D .c4d and maintain the animation?" />
  <row Id="20968" PostHistoryTypeId="3" PostId="10087" RevisionGUID="77b9c02f-ecf6-44fb-aa08-5f5a329b9d80" CreationDate="2011-03-22T14:24:34.637" UserId="6249" Text="&lt;3d&gt;&lt;animation&gt;&lt;3dsmax&gt;&lt;models&gt;&lt;cinema-4d&gt;" />
  <row Id="20969" PostHistoryTypeId="5" PostId="10078" RevisionGUID="f2b7da06-8285-42d5-b697-a26fdd31bdaf" CreationDate="2011-03-22T15:34:22.227" UserId="2091" Comment="added 628 characters in body" Text="Well, you usually don't have to go low level and transport the audio data to the speakers.  The operating system has an interface for that (be it [ALSA][1], [DirectSound][2], [CoreAudio][3], etc).  Using that library, you just have to periodically give it a block of samples of a fixed length (for example, 512 samples).  The sound library stores that array in an internal buffer and plays it.  &#xD;&#xA;&#xD;&#xA;If your block is, for example, 512 samples long, and the sampling frequency is 44.1Khz, this means that you have 512/44100 = 11 milliseconds to generate the next block of 512 samples.  If you take longer to update, usually the old block is replayed again (the sound doesn't stop).  That sounds like a broken CD, very annoying.  You don't want that.  I guess what sfxr does is store the whole wave and just copy the relevant chunk to memory, that operation takes virtually nothing.&#xD;&#xA;&#xD;&#xA;On top of that, there are other libraries that provide an abstracted API and &quot;talk&quot; to the operating system's sound architecture.  This way you can easily write multiplatform applications without having to adapt your sound code to each system.  Examples of them are [fmod][4], [OpenAL][5], [SDL][6], [PortAudio][7], and a long etcetera.&#xD;&#xA;&#xD;&#xA;**Update**: &#xD;&#xA;&#xD;&#xA;**sfxr** uses **PortAudio** for its Windows version and **SDL** for the other platforms.  If you look at the very end of *main.cpp*, you will see how these engines are initialized. PortAudio is passed pointer to a function called *AudioCallback*, and SDL is passed a pointer to *SDLAudioCallback*.  You can see that what these functions do is to process a block of 512 samples and copy it to the output buffer.  The processing itself is done in a rather complex function called *SynthSample*, which is the one that produces the desired output samples for a block given all the internal parameters of sfxr's synthesiser.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/DirectSound&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Core_Audio&#xD;&#xA;  [4]: http://www.fmod.org/&#xD;&#xA;  [5]: http://connect.creativelabs.com/openal/default.aspx&#xD;&#xA;  [6]: http://www.libsdl.org/&#xD;&#xA;  [7]: http://www.portaudio.com/" />
  <row Id="20977" PostHistoryTypeId="25" PostId="10087" RevisionGUID="654f45e6-f23d-4f3a-94a2-ba3e1131aa81" CreationDate="2011-03-22T17:23:33.700" Comment="http://twitter.com/#!/StackGameDev/status/50246247759613952" />
  <row Id="20979" PostHistoryTypeId="2" PostId="10090" RevisionGUID="9ca87220-30e3-466e-8d23-2d92119d1645" CreationDate="2011-03-22T19:22:35.373" UserId="3327" Text="I have recently been invited to do some volunteer playtesting for a pretty well known developer. They made it very clear that it was on a volunteer basis only. It's not a job and I won't be getting paid. What should I expect? What kind of input are they going to be looking for from me? What tips do you have for doing the playtesting well? What should I do to ensure I'll be invited back? Have you or anyone you know done something similar to this before?&#xD;&#xA;&#xD;&#xA;Also, although this is unlikely (at best) to turn into a job, what tips do you have for possibly getting my foot in the door at the company? I am happy to just be able to participate, but I would love to be able to make some good connections since I plan on building a career in the game industry. Thanks in advance." />
  <row Id="20980" PostHistoryTypeId="1" PostId="10090" RevisionGUID="9ca87220-30e3-466e-8d23-2d92119d1645" CreationDate="2011-03-22T19:22:35.373" UserId="3327" Text="What should I expect from volunteer playtesting?" />
  <row Id="20981" PostHistoryTypeId="3" PostId="10090" RevisionGUID="9ca87220-30e3-466e-8d23-2d92119d1645" CreationDate="2011-03-22T19:22:35.373" UserId="3327" Text="&lt;career&gt;&lt;playtesting&gt;" />
  <row Id="20982" PostHistoryTypeId="2" PostId="10091" RevisionGUID="d1619a46-049d-41e1-bfc6-df0c6e09b0ec" CreationDate="2011-03-22T19:36:44.160" UserId="51" Text="Volunteer playtesting is usually just a few hours of watching you over your shoulder (or at the really fancy places, through cameras and one way mirrors) to see what you do when you're exposed to something you haven't seen before so they can see where frustrations lie or what you're inclined to do given a certain situation.  They might ask you to fill out a questionnaire afterwards, but it isn't as useful as just watching you go through the game.  Or at least that's what it should be.  Related question from the opposite angle: http://gamedev.stackexchange.com/questions/1993/how-do-you-get-useful-data-from-playtesters&#xD;&#xA;&#xD;&#xA;At the larger companies you probably won't be meeting anybody that has any say in hiring or any hand in development; they usually have dedicated focus testing people taking notes.  Smaller companies have the designers and leads there to watch.  &#xD;&#xA;&#xD;&#xA;It's like anything else, you might make a contact if you come across as somebody who knows their stuff and aren't a complete idiot.  But don't go into a company and say &quot;I have a great idea for a game&quot; because they're not going to listen to you." />
  <row Id="20983" PostHistoryTypeId="25" PostId="10090" RevisionGUID="d0f28d12-b07d-492a-bd50-20de2adfef1e" CreationDate="2011-03-22T20:23:34.027" Comment="http://twitter.com/#!/StackGameDev/status/50291547798900736" />
  <row Id="20984" PostHistoryTypeId="2" PostId="10092" RevisionGUID="fc4af17f-c93f-476a-92be-01019a997669" CreationDate="2011-03-22T22:44:59.047" UserId="1881" Text="i've created this small code generator to create motion code from a curve drawing:&#xD;&#xA;http://hezicohen.com/stv_beta/curveEditor.html" />
  <row Id="20985" PostHistoryTypeId="2" PostId="10093" RevisionGUID="e1d053d9-9f1c-445f-87bd-be9a6798127a" CreationDate="2011-03-22T22:45:23.720" UserId="743" Text="Is there a recommended way to write reuseable components for pygame? Simple example would be a FPS counter. Should I write a class which has an init, update and draw method and call them from inside a game loop?" />
  <row Id="20986" PostHistoryTypeId="1" PostId="10093" RevisionGUID="e1d053d9-9f1c-445f-87bd-be9a6798127a" CreationDate="2011-03-22T22:45:23.720" UserId="743" Text="How to write reuseable components for pygame" />
  <row Id="20987" PostHistoryTypeId="3" PostId="10093" RevisionGUID="e1d053d9-9f1c-445f-87bd-be9a6798127a" CreationDate="2011-03-22T22:45:23.720" UserId="743" Text="&lt;python&gt;&lt;component-based&gt;&lt;pygame&gt;" />
  <row Id="20988" PostHistoryTypeId="2" PostId="10094" RevisionGUID="0a43b792-e8ae-47d9-8173-ab7432d8b411" CreationDate="2011-03-22T23:12:18.833" UserId="395" Text="That would be pretty normal, pass the frame delta to update and pass in a destination surface to draw (which will normally be the screen)." />
  <row Id="20989" PostHistoryTypeId="25" PostId="10093" RevisionGUID="196e01fd-b535-4b56-abfd-17ca37cbaa00" CreationDate="2011-03-22T23:23:34.617" Comment="http://twitter.com/#!/StackGameDev/status/50336849109057536" />
  <row Id="20990" PostHistoryTypeId="2" PostId="10095" RevisionGUID="ad10fda4-ba53-40f5-a960-1c103149df9d" CreationDate="2011-03-23T00:39:07.923" UserId="5263" Text="I'm looking for good sources to outsource virtually every aspect of an iPhone game:&#xD;&#xA;&#xD;&#xA;Writing&#xD;&#xA;Graphics&#xD;&#xA;Programming&#xD;&#xA;&#xD;&#xA;I have a good amount of programming experience so putting everything together should not be a problem.&#xD;&#xA;&#xD;&#xA;What are some reputable sources for outsourcing this kind of development?&#xD;&#xA;Is it feasible to approach game development from this angle?" />
  <row Id="20991" PostHistoryTypeId="1" PostId="10095" RevisionGUID="ad10fda4-ba53-40f5-a960-1c103149df9d" CreationDate="2011-03-23T00:39:07.923" UserId="5263" Text="Outsourcing iPhone Game Development" />
  <row Id="20992" PostHistoryTypeId="3" PostId="10095" RevisionGUID="ad10fda4-ba53-40f5-a960-1c103149df9d" CreationDate="2011-03-23T00:39:07.923" UserId="5263" Text="&lt;outsourcing&gt;" />
  <row Id="20996" PostHistoryTypeId="2" PostId="10097" RevisionGUID="6ef3c6fc-2263-461c-90bd-e98fa999a89b" CreationDate="2011-03-23T00:44:42.050" UserId="6257" Text="Given a object which may move forward, backward, left and right at a given X,Y point. How to efficiently direct the object to a X,Y point using the given movement mechanics in the most efficient and human natural way.&#xD;&#xA;&#xD;&#xA;The object is available for movement in real time, you may tell them to &quot;startMoving|Direction|()&quot; and &quot;stopMoving|Direction|()&quot; to any heading of 360 degrees. Though as a additional twist and the part I am having trouble with, is the facing of the object is never known, only its current location is known, so the algorithm must &quot;detect&quot; direction. The location of the object is updated in a separate thread in 500-1second intervals. A &quot;Request&quot; to update the location within the algorithm made be made at any point, but it is not immediately available and the algorithm must keep that in consideration. Doing something like requestAndWaitForCoordUpdate() is perfectly acceptable, however likely not needed.&#xD;&#xA;&#xD;&#xA;In addition, no obstacles appear, it can be assumed you are on a MOSTLY open plane, stray to far from the direct straight line between the paths and you may run into obstacles. It is safe to assume that 1/4th the distance between a target and source, should be available in width on a given direct path.&#xD;&#xA;&#xD;&#xA;I would also mention I am not sure A* applys in this scenario, if it does I am unsure how to implement it given the constraints. The only real variable here is the facing of the object.&#xD;&#xA;&#xD;&#xA;Here is some example code:&#xD;&#xA;&#xD;&#xA;    public int[] currentCoords;&#xD;&#xA;    public void movement() {&#xD;&#xA;      currentCoords[0] = 1005; // starting y coord&#xD;&#xA;      currentCoords[1] = 1007; // starting x coord&#xD;&#xA;      moveTo(1050, 1025);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public void moveTo(int x, int y) {&#xD;&#xA;      ... how?&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public void threadUpdatingCoords() {&#xD;&#xA;       ... periodically check for source coord updates&#xD;&#xA;       ... between 200ms and 1000ms apart.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="20997" PostHistoryTypeId="1" PostId="10097" RevisionGUID="6ef3c6fc-2263-461c-90bd-e98fa999a89b" CreationDate="2011-03-23T00:44:42.050" UserId="6257" Text="C# Pathing algorithm for moving a object from point(X, Y) to point(X, Y)" />
  <row Id="20998" PostHistoryTypeId="3" PostId="10097" RevisionGUID="6ef3c6fc-2263-461c-90bd-e98fa999a89b" CreationDate="2011-03-23T00:44:42.050" UserId="6257" Text="&lt;c#&gt;&lt;algorithm&gt;" />
  <row Id="21002" PostHistoryTypeId="18" PostId="10095" RevisionGUID="6188e740-8b66-4816-bce9-d025c8b63ab8" CreationDate="2011-03-23T00:55:41.617" UserId="14" Comment="from http://gamedev.stackexchange.com/questions/10096/outsourcing-iphone-game-development" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="21004" PostHistoryTypeId="2" PostId="10098" RevisionGUID="186d1560-94a7-4cdf-9088-8875b8b50c9a" CreationDate="2011-03-23T01:11:03.267" UserId="5266" Text="Where is a good place to start with learning how to program custom coordinate systems in a 3d environment?&#xD;&#xA;&#xD;&#xA;Are there any good books on he topic of gaming coordinate systems? I would like to build a real life data structure based on techniques used for game programming." />
  <row Id="21005" PostHistoryTypeId="1" PostId="10098" RevisionGUID="186d1560-94a7-4cdf-9088-8875b8b50c9a" CreationDate="2011-03-23T01:11:03.267" UserId="5266" Text="Starting off with coordinate systems" />
  <row Id="21006" PostHistoryTypeId="3" PostId="10098" RevisionGUID="186d1560-94a7-4cdf-9088-8875b8b50c9a" CreationDate="2011-03-23T01:11:03.267" UserId="5266" Text="&lt;3d&gt;&lt;coordinates&gt;" />
  <row Id="21008" PostHistoryTypeId="25" PostId="10098" RevisionGUID="17d4d43d-527b-4c57-85a9-8c1cb5d22e8d" CreationDate="2011-03-23T02:23:35.370" Comment="http://twitter.com/#!/StackGameDev/status/50382149941071872" />
  <row Id="21009" PostHistoryTypeId="2" PostId="10099" RevisionGUID="d6107963-b2ee-401f-bb00-6993350a7dd5" CreationDate="2011-03-23T02:37:25.997" UserId="5818" Text="I suggest the first thing you do is move the object straight ahead for a short duration. Now you will know the original position as well as it's new position. From the knowledge of these you will be able to calculate the rotation of the object.&#xD;&#xA;&#xD;&#xA;Once the rotation of the object, all you have to do is to offset the rotation so it points towards the goal location and start moving until you reach it.&#xD;&#xA;&#xD;&#xA;For additional information such as ETA you could compute the speed of object while it's moving. " />
  <row Id="21010" PostHistoryTypeId="2" PostId="10100" RevisionGUID="22cb3a40-36a7-414d-98ed-1e95b47266fd" CreationDate="2011-03-23T02:44:18.407" UserId="6178" Text="I perfectly understand that GLUT is limited and the following problem can't probably be solved with OpenGL/GLUT, but since I don't know exactly if it can or not, I better just ask. Maybe I'm doing something wrong or forgetting something important. Or probably not and GLUT doesn't get better than this.&#xD;&#xA;&#xD;&#xA;My problem is that I can't trap the mouse inside the window. Well, actually, I can, the code below does just that. I trap the mouse inside the window and I can use the mouse freely to rotate the world. The problem? If I move the mouse too fast I can get way from window prison.&#xD;&#xA;&#xD;&#xA;Is there a way around this with OpenGL/GLUT or the only option is another library or make some calls to the Windows API directly? Enough words, here's my current code:&#xD;&#xA;&#xD;&#xA;    void processPassiveMouseMotion(int x, int y) {&#xD;&#xA;    	static int centerX = glutGet(GLUT_WINDOW_WIDTH) / 2;&#xD;&#xA;    	static int centerY = glutGet(GLUT_WINDOW_HEIGHT) / 2;&#xD;&#xA;    &#xD;&#xA;    	CameraAngle.x = -1.0f * (y - centerY);&#xD;&#xA;    	CameraAngle.y = -1.0f * (x - centerX);&#xD;&#xA;    &#xD;&#xA;    	if(CameraAngle.x != 0.0f || CameraAngle.y != 0.0f) {&#xD;&#xA;    		SceneCamera.Rotate(CameraAngle);&#xD;&#xA;    		glutPostRedisplay();&#xD;&#xA;    &#xD;&#xA;    		glutWarpPointer(centerX, centerY);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    glutPassiveMotionFunc(processPassiveMouseMotion);" />
  <row Id="21011" PostHistoryTypeId="1" PostId="10100" RevisionGUID="22cb3a40-36a7-414d-98ed-1e95b47266fd" CreationDate="2011-03-23T02:44:18.407" UserId="6178" Text="Trapping mouse inside window in OpenGL with GLUT?" />
  <row Id="21012" PostHistoryTypeId="3" PostId="10100" RevisionGUID="22cb3a40-36a7-414d-98ed-1e95b47266fd" CreationDate="2011-03-23T02:44:18.407" UserId="6178" Text="&lt;opengl&gt;&lt;windows&gt;&lt;glut&gt;" />
  <row Id="21013" PostHistoryTypeId="5" PostId="10099" RevisionGUID="a7d25eea-c355-418f-9024-252bdaf18e1f" CreationDate="2011-03-23T02:46:43.647" UserId="5818" Comment="more specific calculations" Text="I suggest the first thing you do is move the object straight ahead for a short duration. Now you will know the original position as well as it's new position. From the knowledge of these you will be able to calculate the rotation of the object.&#xD;&#xA;&#xD;&#xA;    originalPosition = (3 ; 2)&#xD;&#xA;    newPosition = (3.5 ; 1.7)&#xD;&#xA;    offset = (newPosition - originalPosition) = (0.5 ; -0.3)&#xD;&#xA;    offsetLength = sqrt(0.5^2-0.3^2) = 0.583&#xD;&#xA;    currentDirection = Normalize(offset) = (0.5 / 0.583 ; -0.3 / 0.583) =(0.857 ; -0.515) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Once the current direction is known, all you have to do is to offset the direction so it points towards the goal location and start moving until you reach it.&#xD;&#xA;&#xD;&#xA;For additional information such as ETA you could compute the speed of object while it's moving. " />
  <row Id="21014" PostHistoryTypeId="2" PostId="10101" RevisionGUID="bb498aed-09ec-4d49-9437-da25ae819d2e" CreationDate="2011-03-23T04:48:53.017" UserId="6258" Text="Actually there may be very little data transfer, it depends on the protocol you use. A TCP based protocol will ensure reliability and consistency amongst the data transfer but will have high latency and cost bandwidth charges. But using UDP the 2 players will exchange data primarily amongst themselves and the server will most likely be the super group handling ip allocation, In which case the packets aren't costing you money. If you want to make a realtime game, use UDP (but you need to program in game logic to best prevent hacking or cheating since the packets sent is amongst users)" />
  <row Id="21015" PostHistoryTypeId="2" PostId="10102" RevisionGUID="8b26ea47-259e-411e-9868-47ac2c6befc3" CreationDate="2011-03-23T04:57:24.850" UserId="5599" Text="Books about Game Engine development usually have chapters/sections on coordinate systems:&#xD;&#xA;&#xD;&#xA;[Game Coding Complete][1] (Chapter 13)  &#xD;&#xA;[Game Engine Architecture][2] (Chapter 4)  &#xD;&#xA;[3D Game Engine Design][3] (Chapter 2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://amzn.com/1584506806&#xD;&#xA;  [2]: http://amzn.com/1568814135&#xD;&#xA;  [3]: http://amzn.com/0122290631" />
  <row Id="21016" PostHistoryTypeId="25" PostId="10100" RevisionGUID="b2cccdbc-46fc-4404-856e-87c95dd01052" CreationDate="2011-03-23T05:23:35.873" Comment="http://twitter.com/#!/StackGameDev/status/50427450655645696" />
  <row Id="21017" PostHistoryTypeId="2" PostId="10103" RevisionGUID="1dfadcb3-8c4e-4fd9-b28a-688a4794f054" CreationDate="2011-03-23T06:11:21.760" UserId="4264" Text="With a quick search through the &lt;a href=&quot;http://www.cs.arizona.edu/classes/cs433/spring02/opengl/docs/glut-3.spec.pdf&quot;&gt;GLUT spec&lt;/a&gt;, GLUT does not seem to have mouse capture capabilities. The best you can do (like you seem to be doing) is to warp the cursor to the center and hope the user isn't fast enough (or isn't using a tablet) =)&#xD;&#xA;&#xD;&#xA;Or, you could switch to &lt;a href=&quot;http://www.libsd.org&quot;&gt;SDL&lt;/a&gt; or &lt;a href=&quot;http://www.sfml-dev.org/&quot;&gt;SFML&lt;/a&gt;, as GLUT is only designed for testing, not &quot;real&quot; software." />
  <row Id="21018" PostHistoryTypeId="2" PostId="10104" RevisionGUID="0e68264e-b7b6-4888-84dd-971a05dd30f8" CreationDate="2011-03-23T06:17:25.327" UserId="4264" Text="    &quot;What should I do to ensure I'll be invited back?&quot;&#xD;&#xA;&#xD;&#xA;Nothing special, really, but this depends of the company. This might be &quot;napkin testing&quot;, where they only rate initial reactions, and after you've seen the game once, you're useless as a tester.&#xD;&#xA;&#xD;&#xA;Since it really does depend on the company and their methods, they may interview you afterwards (or even during), so give useful feedback. Don't be a fanboy, or over-critical; just try to be honest.&#xD;&#xA;&#xD;&#xA;Or well, there's one way to _ensure_ you'll be invited back. Just bring a couple million dollars.. =)" />
  <row Id="21019" PostHistoryTypeId="2" PostId="10105" RevisionGUID="422aa6c4-0752-4e2f-8268-4612ed378b59" CreationDate="2011-03-23T06:54:04.507" UserId="323" Text="To the best of my knowledge this is Windows-API specific - this functionality doesn't even exist on all platforms. If you want to [dig through my code][1] you can find a working Windows implementation (LockMouseCursor is the entry point into the OS module, ClipCursor is the actual Windows function that does the trapping, but there's some niceties surrounding that function - it shouldn't be too tough to decipher.)&#xD;&#xA;&#xD;&#xA;I also have a [Linux implementation][2] in pure X (again, start with LockMouseCursor) but I've never found a usable OSX API for it. If you end up needing one or coming up with one, check my [Stackoverflow question][3] on the matter :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/zorbathut/glop/blob/master/Glop/OsWin32.cpp&#xD;&#xA;  [2]: https://github.com/zorbathut/glop/blob/master/Glop/OsLinux.cpp&#xD;&#xA;  [3]: http://stackoverflow.com/questions/4642863/how-can-i-lock-the-cursor-to-the-inside-of-a-window-on-mac-os-x" />
  <row Id="21020" PostHistoryTypeId="25" PostId="10097" RevisionGUID="ad2f634f-309d-4694-9384-d25f4683c207" CreationDate="2011-03-23T08:23:35.800" Comment="http://twitter.com/#!/StackGameDev/status/50472748715220992" />
  <row Id="21021" PostHistoryTypeId="2" PostId="10106" RevisionGUID="9a40158e-54e5-4876-b35d-bfaa62512e35" CreationDate="2011-03-23T09:49:50.757" UserId="1628" Text="**Not a lawyer...**&#xD;&#xA;&#xD;&#xA;There are multiple fair use elements which serve as a defense in this scenario, in particular 'Purpose and character' in US law. In my interpretation it would be almost impossible to prosecute given the degree to which these defenses stand." />
  <row Id="21022" PostHistoryTypeId="2" PostId="10107" RevisionGUID="a74c1f8f-feba-49b3-8966-4ca6a9da6f46" CreationDate="2011-03-23T10:00:33.990" UserId="6263" Text="Full up to date LWJGL instructions and tutorials can be found on the LWJGL Wiki http://wiki.lwjgl.org/ this includes how to set it up with Eclipse, Netbeans, etc and has tutorials that cover the basics of LWJGL." />
  <row Id="21023" PostHistoryTypeId="2" PostId="10108" RevisionGUID="0dd960b8-850f-462b-be4b-38a08568f2c8" CreationDate="2011-03-23T10:49:00.863" UserId="5660" Text="I'm not sure if there's a recommended way, as such, for writing components but I often reuse buttons and other stuff for the game and pause menu which are initialized with Surfaces for mouse-states (hover, mouse-down, etc) and a function for click-events.&#xD;&#xA;&#xD;&#xA;And of course, I have a vector class that I reuse all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You definitely don't really need a module for basic timing and fps calculation though. Pygame's Clock-class is ideal for that. You just create a clock-object, call tick() once per frame and it returns the delta-time and keeps track of fps for you:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def main_loop():&#xD;&#xA;        clock = pygame.time.Clock()     &#xD;&#xA;        counter = 0&#xD;&#xA;    &#xD;&#xA;        while game_is_running:          &#xD;&#xA;            handle_events()&#xD;&#xA;    &#xD;&#xA;            lapse = clock.tick()        &#xD;&#xA;            update_physics_and_stuff(lapse * BASE_SPEED_FACTOR)&#xD;&#xA;            render()&#xD;&#xA;            &#xD;&#xA;            # once every second, display the fps&#xD;&#xA;            counter += lapse           &#xD;&#xA;            if counter &gt; 1000:&#xD;&#xA;                pygame.display.set_caption('fps: %s' % clock.get_fps())&#xD;&#xA;                counter = 0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21024" PostHistoryTypeId="5" PostId="10108" RevisionGUID="252327a6-e881-405e-b347-7bcf078eafbd" CreationDate="2011-03-23T10:54:59.660" UserId="5660" Comment="added 3 characters in body" Text="I'm not sure if there's a recommended way, as such, for writing components but I often reuse buttons and other stuff for the game and pause menu which are initialized with Surfaces for mouse-states (hover, mouse-down, etc) and a function for click-events.&#xD;&#xA;&#xD;&#xA;And of course, I have a vector class that I reuse all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You definitely don't really need a module for basic timing and fps calculation though. Pygame's Clock-class is ideal for that. You just create a clock-object, call tick() once per frame and it returns the delta-time and keeps track of fps for you:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def main_loop():&#xD;&#xA;        clock = pygame.time.Clock()     &#xD;&#xA;        counter = 0&#xD;&#xA;    &#xD;&#xA;        while game_is_running:          &#xD;&#xA;            handle_events()&#xD;&#xA;    &#xD;&#xA;            lapse = clock.tick()        &#xD;&#xA;            update_physics_and_stuff(lapse * BASE_SPEED_FACTOR)&#xD;&#xA;            render()&#xD;&#xA;            &#xD;&#xA;            # once every second, display the fps&#xD;&#xA;            counter += lapse           &#xD;&#xA;            if counter &gt; 1000:&#xD;&#xA;                pygame.display.set_caption('fps: %1.2f' % clock.get_fps())&#xD;&#xA;                counter = 0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21025" PostHistoryTypeId="25" PostId="10095" RevisionGUID="806c58b7-35b0-4d05-877d-5b68680bb8e2" CreationDate="2011-03-23T11:23:35.647" Comment="http://twitter.com/#!/StackGameDev/status/50518046665744384" />
  <row Id="21026" PostHistoryTypeId="2" PostId="10109" RevisionGUID="0770d3fe-8020-4881-afce-36ce85a15877" CreationDate="2011-03-23T13:07:11.660" UserId="6267" Text="I want to create a flat universe, where at first the whole universe is blank. &#xD;&#xA;&#xD;&#xA;That would be represented by a parallax scrolling nebula background image.&#xD;&#xA;&#xD;&#xA;What I want to do is represent the planets as disc shaped objects in the universe. &#xD;&#xA;They can be of various sizes.&#xD;&#xA;&#xD;&#xA;The inside of the discs will consist of a landmass, then outside that will be a body of water and after that air.&#xD;&#xA;&#xD;&#xA;what would be the best way to go about creating those tiles procedurally as for example the air would consist of various gases and the land of various minerals and resources.&#xD;&#xA;&#xD;&#xA;My first thought is to create texture images and then stamp out the circles out of those textures, but problem is that those textures would have to wrap horizontal and vertically. Is there a fully procedural way of doing this?" />
  <row Id="21027" PostHistoryTypeId="1" PostId="10109" RevisionGUID="0770d3fe-8020-4881-afce-36ce85a15877" CreationDate="2011-03-23T13:07:11.660" UserId="6267" Text="2d Procedural universe generation" />
  <row Id="21028" PostHistoryTypeId="3" PostId="10109" RevisionGUID="0770d3fe-8020-4881-afce-36ce85a15877" CreationDate="2011-03-23T13:07:11.660" UserId="6267" Text="&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="21029" PostHistoryTypeId="2" PostId="10110" RevisionGUID="688487a7-a0cb-4ae3-80fb-61c0fb74c2dd" CreationDate="2011-03-23T13:40:13.687" UserId="1143" Text="I don't think you do need a license for several reasons, but I'm not a lawyer.&#xD;&#xA;&#xD;&#xA;1. Trademarks are not copyrights or patents. Trademarks are designed to protect consumers. The idea being that a trademarked M4 carbine, for example, is made by Colt Defense (or someone they have licensed to build them) and not by some other company making cheaper versions. The OEM can stop the cheaper company from calling its product an M4 but can't stop it from making the copies. Stopping manfuacturing can only be done through patents. Recently, there has been a dispute between Ford and the Ferari F1 racing team over the name F150. Although the two vehicles could never be confused, this was done primarily to keep hold of the trademark, not enforcing the trademark is one way of losing ownership of the trademark.&#xD;&#xA;&#xD;&#xA;2. There are many other things that appear in video games that have trademarks, are they all licensed? Why should the M4 be special?&#xD;&#xA;&#xD;&#xA;3. Do other media pay licenses to use the trademark. For example, if a James Bond novel had a description of someone hold an M4, would that require a license?&#xD;&#xA;&#xD;&#xA;4. You are not selling a gun. Trademarks can only be enforced against similar products. A game is not a gun, in the same way it's not a drink, shop, car, etc.&#xD;&#xA;&#xD;&#xA;5. In the USA, you can claim the First Amendment (free speech) and fair use.&#xD;&#xA;&#xD;&#xA;As for games like GT5, they are probably not licensing the trademark, and probably couldn't license it as they aren't building cars. They are probably licensing the copyright on the names and logos." />
  <row Id="21030" PostHistoryTypeId="2" PostId="10111" RevisionGUID="4c692fe5-9a60-44a1-b916-cf8cd2c0a266" CreationDate="2011-03-23T13:45:06.493" UserId="6032" Text="Don't completely &quot;ignore responsiveness&quot;.&#xD;&#xA;There is little to gain from adding another 40ms latency to already delayed packets. If you're adding a couple of frames (at 60fps) then you're delaying the processing of a position update another couple of frames. It is better to accept packets quickly and process them quickly so you're improving the accuracy of the simulation.&#xD;&#xA;&#xD;&#xA;I've had great success optimising bandwidth by thinking about the minimum state information needed to represent what is visible on the screen. Then looking at each bit of data and choosing a model for it. Position information can be expressed as delta values over time. You can either use your own statistical models for this and spend ages debugging them, or you can use a library to help you out. I prefer to use this library's floating point model [DataBlock_Predict_Float][1]&#xD;&#xA;It makes it really easy to optimise the bandwidth used for the game scene graph.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.replicanet.com/assets/docs/Main/html/classRNReplicaNet_1_1DataBlock__Predict__Float.html" />
  <row Id="21031" PostHistoryTypeId="2" PostId="10112" RevisionGUID="6ae2b31f-c85e-46a3-ab8e-5ff30df3db81" CreationDate="2011-03-23T14:19:06.913" UserId="6268" Text="UDK is not UE3. AAA games are made with UE3, casual games are made with UDK. So your first question should be: which is my target company type? Nothing is going to get big paying 25% of its revenue in licensing, there are no examples yet, and I very much doubt there will be outside the occasional lucky single-developper AppStore hit (do not confuse with the huge success list of UE3, which has a different licensing scheme, but will likely require much more C++ knowledge if you're hired to work with it).&#xD;&#xA;&#xD;&#xA;C++ knwoledge is universal and can get you a job working on the F35, for a global company for consumer electronics, in a hospital... UDK is getting you nowhere at all, except where it excels, which is a niche however interesting it may be for you at this time in your life. Are you that sure you want that bad to work for a (likely small) game company forever, when the game industry has changed so much in so little time?&#xD;&#xA;&#xD;&#xA;Finally, C++ has been around for a long time, is there to stay under different incarnations (you'll be a lot more efficient learning C# from C++ than from UDK script), whereas UDK script is very very good at one thing: language support for asynchronous events. Essential in some environments, but talk about a hard-to-sell skill!" />
  <row Id="21032" PostHistoryTypeId="25" PostId="10109" RevisionGUID="c2141401-3434-4731-b811-3d446bd1ff69" CreationDate="2011-03-23T14:23:35.837" Comment="http://twitter.com/#!/StackGameDev/status/50563345895530496" />
  <row Id="21033" PostHistoryTypeId="2" PostId="10113" RevisionGUID="456918ba-8f4b-412e-a8b9-a665d8e021ee" CreationDate="2011-03-23T15:32:54.980" UserId="1430" Text="Procedural textures, particularly noise-based ones, can be made to tile. See [this thread][1] at GDNet for some discussion, as well as [this][2] journal entry. There's also [this link][3], which sounds interesting although I can't speak for its veracity.&#xD;&#xA;&#xD;&#xA;As for procedurally generating the world, there's [this article][4] written by the guy developing Infinity. His system is 3D but you could probably adapt the techniques easily enough.&#xD;&#xA;&#xD;&#xA;There's a whole [wiki on procedural content generation][5], too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/480446-seamless-tiling-perlin-noise/&#xD;&#xA;  [2]: http://archive.gamedev.net/community/forums/mod/journal/journal.asp?jn=339903&amp;reply_id=3089065&#xD;&#xA;  [3]: http://opengameart.org/forumtopic/seamlessly-tiled-procedural-texture-generation&#xD;&#xA;  [4]: http://www.infinity-universe.com/Infinity/index.php?option=com_content&amp;task=view&amp;id=106&amp;Itemid=27&#xD;&#xA;  [5]: http://pcg.wikidot.com/" />
  <row Id="21035" PostHistoryTypeId="2" PostId="10115" RevisionGUID="086f40ce-8483-49f7-9665-717fbc5ebbd6" CreationDate="2011-03-23T15:51:08.230" UserId="1562" Text="I didn't have the time to actually read the entire thing, but judging by the synopsis, this might be for you:&#xD;&#xA;&#xD;&#xA;There's a sample in the nVidia Direct3D SDK 10.5 that is described as follows:&#xD;&#xA;&#xD;&#xA;&gt; This sample is a simple example using Texture Arrays in DX10. It uses a texture array as a palette of terrain textures to render a terrain mesh with many textures in a single draw call. A similar effect in previous APIs would require a texture atlas or multiple draw calls.&#xD;&#xA;&#xD;&#xA;[nVidia D3D SDK 10.5 samples page][1] (it's at the bottom of the page)&#xD;&#xA;&#xD;&#xA;[nVidia White Paper on Texture Arrays and Terrain Rendering][2]&#xD;&#xA;&#xD;&#xA;[nVidia Demo Project Download][3]&#xD;&#xA;&#xD;&#xA;I'm aware this is a) not directly regarding XNA and b) possibly not quite what you want but maybe you can gain get a hold of further leads there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.download.nvidia.com/SDK/10.5/direct3d/samples.html#SoftShadows&#xD;&#xA;  [2]: http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/TextureArrayTerrain/doc/TextureArrayTerrain.pdf&#xD;&#xA;  [3]: http://developer.download.nvidia.com/SDK/10.5/Samples/TextureArrayTerrain.zip" />
  <row Id="21036" PostHistoryTypeId="2" PostId="10116" RevisionGUID="8dbb8203-f759-4b66-a34d-dceb1253b702" CreationDate="2011-03-23T15:57:17.917" UserId="1430" Text="The way you have phrased your question implies to me that you intend to break up each subcomponent of the game and farm that out to an individual outsourcing entity (somebody gets the graphics, somebody gets the physics, somebody else gets the audio, et cetera). That seems fraught with peril -- you will need to spend an inordinate amount of time making extremely clear, detailed requirement and design specifications to give to each outsourcing entity in order to have a prayer of integrating everything without doing significant reworking on your own -- thus wasting money and probably defeating the purpose of outsourcing anyhow.&#xD;&#xA;&#xD;&#xA;It's more feasible to essentially pay a single somebody to develop the entire game. **You can find outsourcing companies [via Google][1], unfortunately I don't know of a reputable directory of such companies.** You *might* have some luck at the [Help Wanted forum on GDNet][2], although I wouldn't hold my breath.&#xD;&#xA;&#xD;&#xA;You may be able to handle outsourcing every component individually if you do them one at a time, and you write the core game yourself (basically providing a design and hooks for a rendering API, and having somebody else fill it out, et cetera). &#xD;&#xA;&#xD;&#xA;I feel like you're vastly underestimating the amount of iteration and clean up that is going to go into outsourcing code development, and when you add that to the cost (because you'll get what you pay for) **I'd be willing to bet that outsourcing that much of the game's development is not financially viable** for indie game development. If you were a large studio, perhaps the overhead would be amortized a bit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=outsourcing+game+development&#xD;&#xA;  [2]: http://www.gamedev.net/forum/8-help-wanted/" />
  <row Id="21038" PostHistoryTypeId="2" PostId="10117" RevisionGUID="5ff1bbfc-412c-4e57-825e-6472674a9920" CreationDate="2011-03-23T16:08:51.523" UserId="5527" Text="Also see http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/ . It's about the math used in coordinate systems for games. Has explanations for creating user coordinate systems and matrix transformations.&#xD;&#xA;&#xD;&#xA;It should be helpful" />
  <row Id="21039" PostHistoryTypeId="2" PostId="10118" RevisionGUID="a16b16f3-d2b1-4ed3-9b47-08e926875d8b" CreationDate="2011-03-23T17:14:02.527" UserId="1156" Text="I can greatly recommend [this book][1]. It covers 3D coordinate systems in great detail (and is not a pain to read).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119/ref=pd_sim_b_3" />
  <row Id="21040" PostHistoryTypeId="25" PostId="10025" RevisionGUID="f0672ad1-4f59-49cf-9756-3fdcd584d8c9" CreationDate="2011-03-23T17:23:35.763" Comment="http://twitter.com/#!/StackGameDev/status/50608644227727360" />
  <row Id="21041" PostHistoryTypeId="2" PostId="10119" RevisionGUID="e037e211-e455-400e-b6eb-55fa17d91a26" CreationDate="2011-03-23T18:58:55.250" UserId="5599" Text="It sounds like there are several problems you need to solve so I would try to approach each problem at a time and slowly make my way to a working solution.&#xD;&#xA;&#xD;&#xA;You said you don't have experience with 3D. There is this great tutorial that shows you how to [render 3D shapes in WPF][1].  &#xD;&#xA;This will get you started with 3D and WPF, and it even shows you how to display a small terrain so you'll get a good idea of the type of data structure you need to store your terrain data.  &#xD;&#xA;Once you have the basic data structure you should be able to extrapolate how much memory your large terrains are likely to take up.&#xD;&#xA;&#xD;&#xA;As for handling streaming terrain data you might want to pick up a good book on Game Engine development that addresses this topic.  &#xD;&#xA;For example [Game Engine Architecture][2] has a section (14.4) about this.&#xD;&#xA;&#xD;&#xA;  [1]: http://kindohm.com/technical/WPF3DTutorial.htm&#xD;&#xA;  [2]: http://amzn.com/1568814135" />
  <row Id="21042" PostHistoryTypeId="2" PostId="10120" RevisionGUID="b7014763-c620-4cb1-85b6-398631eea557" CreationDate="2011-03-23T20:23:16.477" UserId="6272" Text="I have created a couple of games in Flash/AS3 and am playing with programming a flash-based multiplayer (possibly mmo?) game where the application will communicate with a server over a socket connection.&#xD;&#xA;&#xD;&#xA;Obviously I need some form of authentication (username and password) but what other security precautions do I  need to explore to prevent cheating?&#xD;&#xA;" />
  <row Id="21043" PostHistoryTypeId="1" PostId="10120" RevisionGUID="b7014763-c620-4cb1-85b6-398631eea557" CreationDate="2011-03-23T20:23:16.477" UserId="6272" Text="Required Security Precautions for Flash / AS3 Multiplayer Game" />
  <row Id="21044" PostHistoryTypeId="3" PostId="10120" RevisionGUID="b7014763-c620-4cb1-85b6-398631eea557" CreationDate="2011-03-23T20:23:16.477" UserId="6272" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;multiplayer&gt;&lt;security&gt;&lt;websocket&gt;" />
  <row Id="21045" PostHistoryTypeId="25" PostId="9987" RevisionGUID="aa42f1c5-5084-4bb1-ad75-da370ac41682" CreationDate="2011-03-23T20:23:36.070" Comment="http://twitter.com/#!/StackGameDev/status/50653943897915393" />
  <row Id="21046" PostHistoryTypeId="2" PostId="10121" RevisionGUID="7ecc4f17-2fec-4e22-a6ce-5e6b82670bb1" CreationDate="2011-03-23T22:06:32.973" UserId="395" Text="Verify all user input on the server and make sure that it is legal. There are a lot of similar questions if you just search on here for cheating." />
  <row Id="21047" PostHistoryTypeId="5" PostId="10049" RevisionGUID="44f48916-79de-4f82-b3e0-d879c8a68602" CreationDate="2011-03-23T22:16:54.710" UserId="370" Comment="clarify" Text="Imagine a 1 on 1 (not teams) competition between AI bots, like the [Google AI Challenge][1].  The various bots are assigned an ELO rating based on the outcome of the various versus matches.  The reason I specify AI bots as they can compete 24/7 without regard for player fatigue, geolocation, etc.&#xD;&#xA;&#xD;&#xA;Given limited server resources only so many bouts can be run per day.  I'm looking for a heuristic (or an optimal algorithm) to choose which two bots should compete next.&#xD;&#xA;&#xD;&#xA;All the past competitions have been tracked.  By this I mean that the algorithm has more to work with than just the ELO ratings.&#xD;&#xA;&#xD;&#xA;The use cases I'm partitularly interested in:&#xD;&#xA;&#xD;&#xA;* The competition has been pairing randomly for while and now I want to make intelligent pairing decision.&#xD;&#xA;* The Elo rating have stabilized and a bot is updated.&#xD;&#xA;* The Elo ratings have stabilized and new bot is introduced to the competition.&#xD;&#xA;&#xD;&#xA;**Update:**  &#xD;&#xA;I need to clarify.  I'm not looking for an algorithm that will provide fair matches.  I'm looking for an algorithm that will find matches most likely to update the Elo ratings of the bots to their *&quot;true&quot;* ratings with the least number of matches.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ai-contest.com/" />
  <row Id="21048" PostHistoryTypeId="2" PostId="10122" RevisionGUID="fedbeeae-8fcd-4f8b-9378-6903e84b0906" CreationDate="2011-03-23T22:23:23.177" UserId="5844" Text="Hey, hello. I am learning a little of WebGL (OpenGL ES 2.0) through the http://learningwebgl.com tutorials, but it uses a third party library to create the View, Projection and transformation matrices (glutils.js). Well, I don't really like the idea of depending on a non standart library, so I am trying to learn how to create these matrices by myself.&#xD;&#xA;&#xD;&#xA;I've already managed to understand most of it, and although I can't really tell why these matrices work if someone asks me, at least I know how to build them when I need to. Now I have my own lib to work with 4x4 matrices. I can create translation, scale, rotation and the lookAt matrix, but, I am having a hard time finding out how to create the perspective matrix. Anyone could help me out?&#xD;&#xA;&#xD;&#xA;Here is my lib: http://pastebin.com/csMi9GuC" />
  <row Id="21049" PostHistoryTypeId="1" PostId="10122" RevisionGUID="fedbeeae-8fcd-4f8b-9378-6903e84b0906" CreationDate="2011-03-23T22:23:23.177" UserId="5844" Text="How to create a perspective field of view matrix?" />
  <row Id="21050" PostHistoryTypeId="3" PostId="10122" RevisionGUID="fedbeeae-8fcd-4f8b-9378-6903e84b0906" CreationDate="2011-03-23T22:23:23.177" UserId="5844" Text="&lt;opengl&gt;&lt;math&gt;&lt;opengl-es&gt;&lt;matrix&gt;&lt;webgl&gt;" />
  <row Id="21051" PostHistoryTypeId="5" PostId="10122" RevisionGUID="a7e08295-8252-4b9c-a839-d60633acd45f" CreationDate="2011-03-23T22:36:31.793" UserId="5844" Comment="edited body" Text="Hey, hello. I am learning a little of WebGL (OpenGL ES 2.0) through the http://learningwebgl.com tutorials, but it uses a third party library to create the View, Projection and transformation matrices (glutils.js). Well, I don't really like the idea of depending on a non standard library, so I am trying to learn how to create these matrices by myself.&#xD;&#xA;&#xD;&#xA;I've already managed to understand most of it, and although I can't really tell why these matrices work if someone asks me, at least I know how to build them when I need to. Now I have my own lib to work with 4x4 matrices. I can create translation, scale, rotation and the lookAt matrix, but, I am having a hard time finding out how to create the perspective matrix. Anyone could help me out?&#xD;&#xA;&#xD;&#xA;Here is my lib: http://pastebin.com/csMi9GuC" />
  <row Id="21052" PostHistoryTypeId="2" PostId="10123" RevisionGUID="22490765-e753-40db-9f11-ec20d50bf568" CreationDate="2011-03-23T22:38:31.153" UserId="3794" Text="Very well. That is fine approach. Sadly lots of game programmers do not understand their matrices, so don't worry about it now. Personally i use directx documentation as my personal reference if i'm not sure.&#xD;&#xA;&#xD;&#xA;There is [perspective matrix][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb205351%28v=vs.85%29.aspx" />
  <row Id="21053" PostHistoryTypeId="2" PostId="10124" RevisionGUID="0ee519de-bf87-4fca-a981-da96e941679d" CreationDate="2011-03-23T23:22:13.773" UserId="539" Text="To solve this problem in a game I'm working on I adopted the Model View ViewModel design. I had the following architecture:&#xD;&#xA;&#xD;&#xA;    class BoardModel {&#xD;&#xA;        int Columns = 4;&#xD;&#xA;        int Rows = 4;&#xD;&#xA;        SquareModel[] squares;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class SquareModel {&#xD;&#xA;        int Column;&#xD;&#xA;        int Row;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class SquareViewModel {&#xD;&#xA;        float X;&#xD;&#xA;        float Y;&#xD;&#xA;        float Width;&#xD;&#xA;        float Height;&#xD;&#xA;        SquareModel model;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class SquareView {&#xD;&#xA;        Texture texture;&#xD;&#xA;        Draw(SquareViewModel square);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Notice that the `SquareModel` isn't aware of its position on the screen or its dimensions. When switching resolutions or platforms it is sufficient to change the dimensions in the `SquareViewModel` and the texture used by the `SquareView`." />
  <row Id="21054" PostHistoryTypeId="25" PostId="10122" RevisionGUID="44d3efed-962c-4d5c-a4ed-4cadb0e33c03" CreationDate="2011-03-23T23:23:36.080" Comment="http://twitter.com/#!/StackGameDev/status/50699241324163072" />
  <row Id="21055" PostHistoryTypeId="2" PostId="10125" RevisionGUID="bd326c64-9e2b-4b08-a4ac-3d1fce83c6d3" CreationDate="2011-03-24T00:28:45.013" UserId="6276" Text="It may be some stupid to say this but anyway: Aren't you looking for a scriptable game engine?&#xD;&#xA;&#xD;&#xA;This way all internal aspects of the application will be handled by the engine itself and you can just join the parts (art, AI, levels) that you can generate on your own or, it seems more convenient for you, contract with someone else.&#xD;&#xA;&#xD;&#xA;If all the outsourced parts work on the same toolbox and you establish a reobust set of specifications I think this could be, if not easy, at least not impossible.&#xD;&#xA;&#xD;&#xA;Also if, as you mentioned, you have programming experience it should be quite easy for you to work over an engine.&#xD;&#xA;&#xD;&#xA;As an example I would point you to the omnipresent [UDK][1].&#xD;&#xA;&#xD;&#xA;Hope this can help you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/" />
  <row Id="21056" PostHistoryTypeId="2" PostId="10126" RevisionGUID="a7f67b40-4bed-4393-8837-9fd0cf1c4ab2" CreationDate="2011-03-24T01:26:55.247" UserId="6277" Text="I am a self taught programmer, so i do not know the proper ways to do things. I have made simple games like asteroids and snake, but in those games, you can easily modify the variables within the keyevent functions. Here is how i did it in my simple Asteroids game:&#xD;&#xA;&#xD;&#xA;    /*&#xD;&#xA;    * key listener events&#xD;&#xA;    */&#xD;&#xA;    public void keyReleased(KeyEvent k){&#xD;&#xA;        int keyCode = k.getKeyCode();&#xD;&#xA;&#xD;&#xA;        switch(keyCode){&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_LEFT:&#xD;&#xA;                turnLeft = false;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_RIGHT:&#xD;&#xA;                turnRight = false;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_UP:&#xD;&#xA;                accel = false;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_1:&#xD;&#xA;                cls = true;&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_ENTER:&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_SPACE:&#xD;&#xA;                fire = false;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    public void keyTyped(KeyEvent K){}&#xD;&#xA;    public void keyPressed(KeyEvent k){&#xD;&#xA;        int keyCode = k.getKeyCode();&#xD;&#xA;&#xD;&#xA;        switch(keyCode){&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_LEFT:&#xD;&#xA;                turnLeft = true;&#xD;&#xA;                break;&#xD;&#xA; &#xD;&#xA;            case KeyEvent.VK_RIGHT:&#xD;&#xA;                turnRight = true;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_UP:&#xD;&#xA;                accel = true;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_1:&#xD;&#xA;                cls = false;&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_ENTER:&#xD;&#xA;                clearAllBullets();&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_SPACE:&#xD;&#xA;                fire = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If i were to make a more advanced game (with a main menu, options, main game, ect.) How should i do the key/mouse input?&#xD;&#xA;&#xD;&#xA;Also, if i were to go into the single-player, should i put all of the gameplay code into one class? Is there a way to put the single player code into a separate class and somehow have the key input still modify the variables and such?&#xD;&#xA;&#xD;&#xA;Thank you for your time!&#xD;&#xA;&#xD;&#xA;P.S. Any links or source is extremely appreciated. :D" />
  <row Id="21057" PostHistoryTypeId="1" PostId="10126" RevisionGUID="a7f67b40-4bed-4393-8837-9fd0cf1c4ab2" CreationDate="2011-03-24T01:26:55.247" UserId="6277" Text="How should i have the key/mouse input in an advanced java game?" />
  <row Id="21058" PostHistoryTypeId="3" PostId="10126" RevisionGUID="a7f67b40-4bed-4393-8837-9fd0cf1c4ab2" CreationDate="2011-03-24T01:26:55.247" UserId="6277" Text="&lt;game-design&gt;&lt;java&gt;&lt;input&gt;" />
  <row Id="21059" PostHistoryTypeId="25" PostId="10120" RevisionGUID="00825acd-ee97-4cb5-9808-5a93fe99839f" CreationDate="2011-03-24T02:23:36.897" Comment="http://twitter.com/#!/StackGameDev/status/50744544110706688" />
  <row Id="21064" PostHistoryTypeId="2" PostId="10128" RevisionGUID="23204ba2-0a08-41e4-9782-f70ca06d8680" CreationDate="2011-03-24T03:54:09.067" UserId="5021" Text="I have a shader that computes lighting for each light.&#xD;&#xA;&#xD;&#xA;    PointLight PointLights[10];&#xD;&#xA;&#xD;&#xA;    uniform const float NumPointLights;&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; NumPointLights; i++)&#xD;&#xA;    {&#xD;&#xA;	lightVec = PointLights[i].Position - pos;&#xD;&#xA;	lightDist = length(lightVec);&#xD;&#xA;        // Do other stuff with light here, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If I set NumPointLights to 2, the loop still iterates 10 times, and discards the result of the last 8 iterations.&#xD;&#xA;&#xD;&#xA;Should I set a compiler flag that will permit the loop to actually loop only 8 times, or should I make 10 shaders, a shader for each number of lights that can be rendered?&#xD;&#xA;&#xD;&#xA;On some small pieces of geometry I occaisionally need 10 lights. 90% of the time I only need 1-2 lights. How do I proceed?" />
  <row Id="21065" PostHistoryTypeId="1" PostId="10128" RevisionGUID="23204ba2-0a08-41e4-9782-f70ca06d8680" CreationDate="2011-03-24T03:54:09.067" UserId="5021" Text="Different number of lights =&gt; different shader." />
  <row Id="21066" PostHistoryTypeId="3" PostId="10128" RevisionGUID="23204ba2-0a08-41e4-9782-f70ca06d8680" CreationDate="2011-03-24T03:54:09.067" UserId="5021" Text="&lt;xna&gt;&lt;shaders&gt;&lt;xbox360&gt;&lt;hlsl&gt;&lt;directx9&gt;" />
  <row Id="21069" PostHistoryTypeId="2" PostId="10129" RevisionGUID="c1a22009-ddc4-4135-bd75-2e541cb1aedf" CreationDate="2011-03-24T06:03:38.133" UserId="2778" Text="I am no expert, and I nevertheless suggest separating both the controls and the business/game/menu (name it) logic.&#xD;&#xA;&#xD;&#xA;I have already answered a similar question in regards to giving directions to a Snake in a game designed with classes. Java being an object-oriented language, I guess you are able to write adequate classes and stuff. Then, when you have written your object class, if it is so that your object needs to react to some keys and mouse clicks, I would go with a Controller class that knows what is currently displayed on screen, then tell this object what it should do depending on the key that has been pressed or the region that has been clicked.&#xD;&#xA;&#xD;&#xA;Here's the link to the question I told you about which I answered about separating the controls from the object logic. It also includes a code sample which illustrates my thought.&lt;br&gt;&#xD;&#xA;&#xD;&#xA;[Moving my sprite in XNA using classes][1]&lt;br&gt;&#xD;&#xA;&#xD;&#xA;&gt;(*Unfortunately, none of the answer was yet accepted by the OP, so we don't know for sure whether it solved his concerns. Besides, I'm always designing this way and found no trouble by doing so so far.*)&#xD;&#xA;&#xD;&#xA;Now I know, it's tagged XNA. The idea or design is a higher architecture level than the technology that is used, so this design could be simply adapted to Java syntax. The general idea remains the same. =)&#xD;&#xA;&#xD;&#xA;I do hope this helps! I'll be glad to help further when I can, just ask! =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8055/moving-my-sprite-in-xna-using-classes/8057#8057" />
  <row Id="21070" PostHistoryTypeId="2" PostId="10130" RevisionGUID="6dea4a4c-5a16-49c2-869d-8b05367c0ce1" CreationDate="2011-03-24T06:35:20.403" UserId="288" Text="Ah performance optimisation! The first question is, of course, what are you limited by? Are you pixel-shader limited? &#xD;&#xA;&#xD;&#xA;If you are, then obviously you should spend some time on this. If you are not, then simply calculate 10 lights and be done with it.&#xD;&#xA;&#xD;&#xA;What I would probably do is implement just two shaders. One that calculates 3 lights (which is fairly traditional), and one that can do an arbitrary number of lights. That way you can work on optimising 90% of your scene, without losing the ability to do fancy lighting in special cases.&#xD;&#xA;&#xD;&#xA;Also, you might find &lt;a href=&quot;http://stackoverflow.com/questions/5340237/how-much-performance-do-conditionals-and-unused-samplers-textures-add-to-sm2-3-pi/5362006#5362006&quot;&gt;my answer here about HLSL conditionals&lt;/a&gt; interesting. How are you determining that it is iterating 10 times?&#xD;&#xA;&#xD;&#xA;Also, here are &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/04/28/new-built-in-effects-in-xna-game-studio-4-0.aspx&quot;&gt;three&lt;/a&gt; &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/04/25/basiceffect-optimizations-in-xna-game-studio-4-0.aspx&quot;&gt;more&lt;/a&gt; &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2007/04/09/the-standard-lighting-rig.aspx&quot;&gt;resources&lt;/a&gt; that are somewhat related." />
  <row Id="21071" PostHistoryTypeId="25" PostId="10128" RevisionGUID="0e90d39c-fba6-4653-b112-b83019c3dc2d" CreationDate="2011-03-24T08:23:36.677" Comment="http://twitter.com/#!/StackGameDev/status/50835140129198081" />
  <row Id="21072" PostHistoryTypeId="2" PostId="10131" RevisionGUID="d2d731f4-5c27-412f-9f78-d4e9e0a1e817" CreationDate="2011-03-24T08:31:51.063" UserId="101" Text="More generally, the problem you're referring to is known as &quot;combinatorial shader explosion.&quot; The common solutions, as far as I'm aware, basically fall into two main approaches:&#xD;&#xA;&#xD;&#xA; 1. So-called &quot;Ubershaders&quot;&#xD;&#xA; 2. Code generators&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;Ubershaders&lt;/h1&gt;&#xD;&#xA;The term ubershader refers to a shader which has conditional code to handle an extremely large number of permutations with regard to feature support. Likely candidates include variations on light counts/types, animation (number of bones? Dual quaternion skinning?), vertex formats, shadow map sampling and more. Because dynamic branching in shaders both pushes shader limits, and is not particularly performant, these variations are usually controlled by preprocessor directives, varying the values of preprocesor definitions (e.g. #define USE_PCF_SHADOW_FILTERING 1, #define NUM_PCF_SAMPLES 16, etc).&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;Code generators&lt;/h1&gt;&#xD;&#xA;Code generators, on the other hand, actually assemble the body of the shader from the ground up. An example of such an approach would be Shawn Hargreaves' [shader fragment][1] system.&#xD;&#xA;&#xD;&#xA;Both have their pros and cons, and both are very complex to manage. Importantly, you need to know ahead of time which shader combinations your engine is going to potentially require, or you'll end up compiling them on-the-fly; this is obviously undesirable, because if you don't have the shader handy, compilation takes a considerable amount of time.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;Bonus: Deferred rendering&lt;/h1&gt;&#xD;&#xA;You should also be aware that, in the case of light and shadow complexity specifically, deferred rendering approaches also help cut down on shader permutations.&#xD;&#xA;&#xD;&#xA;Imagine the following simple approach (expressed in pseudo-code):&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;for ( each mesh )&#xD;&#xA;{&#xD;&#xA;  draw mesh with ambient lighting only;&#xD;&#xA;  for ( each light )&#xD;&#xA;  {&#xD;&#xA;    additively blend single light's diffuse + specular contributions \&#xD;&#xA;      for this mesh into frame buffer;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Now your shader only needs to handle one light, and you invoke it as many times as necessary. Unfortunately, this naive approach does not scale very well in terms of performance &amp;mdash; with deferred shading, you draw each mesh only once, and then draw each light only once.&#xD;&#xA;&#xD;&#xA;An in-depth explanation of deferred shading is beyond the scope of this answer, but you can start looking [here][2] for more info.&#xD;&#xA;&#xD;&#xA;It's similarly possible to calculate shadows in a &quot;deferred&quot; manner, which is much simpler, and plays nicely with traditional (&quot;forward&quot;) rendering &amp;mdash; you don't need deferred shading to implement deferred shadows.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.talula.demon.co.uk/hlsl_fragments/hlsl_fragments.html &quot;Generating Shaders From HLSL Fragments&quot;&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/74/what-is-deferred-rendering &quot;What is deferred rendering? - Game Development - Stack Exchange&quot;" />
  <row Id="21073" PostHistoryTypeId="5" PostId="10131" RevisionGUID="a6a234c1-cf40-40b8-8962-3d79883191df" CreationDate="2011-03-24T08:47:34.643" UserId="101" Comment="added 575 characters in body; added 6 characters in body" Text="Your dilemma hints at a larger problem that's well-known to the graphics programming community, commonly referred to as &quot;combinatorial shader explosion.&quot; As the name implies, it's usually considered in the context of very large numbers of shader permutations, but the basic principle is the same. Solutions geared toward solving the overarching problem are **industrial-strength**, and as far as I'm aware, can be categorized into two main approaches:&#xD;&#xA;&#xD;&#xA; 1. So-called &quot;Ubershaders&quot;&#xD;&#xA; 2. Code generators&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;Ubershaders&lt;/h1&gt;&#xD;&#xA;The term ubershader refers to a shader which has conditional code to handle an extremely large number of permutations with regard to feature support. Likely candidates include variations on light counts/types, animation (number of bones? Dual quaternion skinning?), vertex formats, shadow map sampling and more. Because dynamic branching in shaders both pushes shader limits, and is not particularly performant, these variations are usually controlled by preprocessor directives, varying the values of preprocessor definitions (e.g. #define USE_PCF_SHADOW_FILTERING 1, #define NUM_PCF_SAMPLES 16, etc).&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;Code generators&lt;/h1&gt;&#xD;&#xA;Code generators, on the other hand, actually assemble the body of the shader from the ground up. An example of such an approach would be Shawn Hargreaves' [shader fragment][1] system.&#xD;&#xA;&#xD;&#xA;As Shawn mentions in his article:&#xD;&#xA;&#xD;&#xA;&gt; If you have five, ten, or even fifty shaders, this system is probably not for you. If you have thousands, however, automation is your friend.&#xD;&#xA;&#xD;&#xA;I would say this advice applies to ubershaders as well.&#xD;&#xA;&#xD;&#xA;As I mentioned above, these solutions are industrial-strength. Both have their pros and cons, and both are very complex to manage. Importantly, you need to know ahead of time which shader combinations your engine is going to potentially require, or you'll end up compiling them on-the-fly; this is obviously undesirable, because if you don't have the shader handy, compilation takes a considerable amount of time.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&lt;h1&gt;Bonus: Deferred rendering&lt;/h1&gt;&#xD;&#xA;You should also be aware that, in the case of light and shadow complexity specifically, deferred rendering approaches also help cut down on shader permutations.&#xD;&#xA;&#xD;&#xA;Imagine the following simple approach (expressed in pseudo-code):&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;for ( each mesh )&#xD;&#xA;{&#xD;&#xA;  draw mesh with ambient lighting only;&#xD;&#xA;  for ( each light )&#xD;&#xA;  {&#xD;&#xA;    additively blend single light's diffuse + specular contributions \&#xD;&#xA;      for this mesh into frame buffer;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Now your shader only needs to handle one light, and you invoke it as many times as necessary. Unfortunately, this naive approach does not scale very well in terms of performance &amp;mdash; with deferred shading, you draw each mesh only once, and then draw each light only once.&#xD;&#xA;&#xD;&#xA;An in-depth explanation of deferred shading is beyond the scope of this answer, but you can start looking [here][2] for more info.&#xD;&#xA;&#xD;&#xA;It's similarly possible to calculate shadows in a &quot;deferred&quot; manner, which is much simpler, and plays nicely with traditional (&quot;forward&quot;) rendering &amp;mdash; you don't need deferred shading to implement deferred shadows.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.talula.demon.co.uk/hlsl_fragments/hlsl_fragments.html &quot;Generating Shaders From HLSL Fragments&quot;&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/74/what-is-deferred-rendering &quot;What is deferred rendering? - Game Development - Stack Exchange&quot;" />
  <row Id="21074" PostHistoryTypeId="25" PostId="10126" RevisionGUID="18aa9f8d-c4f9-4174-8663-5f54e7ff6c9a" CreationDate="2011-03-24T11:23:36.680" Comment="http://twitter.com/#!/StackGameDev/status/50880438134247424" />
  <row Id="21075" PostHistoryTypeId="2" PostId="10132" RevisionGUID="66725fc4-408c-4f1a-bbd9-9e667842056b" CreationDate="2011-03-24T12:36:27.793" UserId="2943" Text="I'm starting with GLSL shader programming and have been looking into [RenderMonkey][1]. Sadly, AMD no longer supports it. Why? Is there a successor to it? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.amd.com/archive/gpu/rendermonkey/pages/default.aspx" />
  <row Id="21076" PostHistoryTypeId="1" PostId="10132" RevisionGUID="66725fc4-408c-4f1a-bbd9-9e667842056b" CreationDate="2011-03-24T12:36:27.793" UserId="2943" Text="Is there a successor to RenderMonkey?" />
  <row Id="21077" PostHistoryTypeId="3" PostId="10132" RevisionGUID="66725fc4-408c-4f1a-bbd9-9e667842056b" CreationDate="2011-03-24T12:36:27.793" UserId="2943" Text="&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="21078" PostHistoryTypeId="2" PostId="10133" RevisionGUID="17473312-fdd1-4ddf-8bde-3ac145fd7c4c" CreationDate="2011-03-24T13:40:57.623" UserId="3599" Text="Cinema 4d [seems to support][1] FBX format. Even the cheapest C4D. You might be using a very old Cinema, thugh. Check if you can import FBX.&#xD;&#xA;&#xD;&#xA;FBX is a format that does support perfectly bones, weights, animation. So, all you need to do is get someone that opens in Max that *.max file you have, and export as FBX. Then you could import into your Cinema4D, and have it ready.&#xD;&#xA;&#xD;&#xA;This is not 100% safe path, in the sense that always there can be issues, that is, when importing an FBX file into any package. But it should wor with some settings tweaking: FBX is a format thought for exchange.&#xD;&#xA;&#xD;&#xA;So, possible solutions (go with whichever bellow, but I'd go trying in the listed order...):&#xD;&#xA;&#xD;&#xA;- Ask the The3DStudio crew, which have fame to be eficient and serious, to export for you in FBX format (considering the initial corrupt *.3ds file problem, might be a kind detail...though dunno if is legally allowed by the file author) , is easy for them and would have use very little time unless appears some big issue.&#xD;&#xA;&#xD;&#xA;- Have one friend having a Max license open the max file and simply got to menu, export fbx (it comes by default, needs no plugin) &#xD;&#xA;&#xD;&#xA;- Have those guys from elance take care as well of the C4D import, so you might ensure no issues, if they know their stuff.&#xD;&#xA;&#xD;&#xA;Note: Sometimes is not enough to play with FBX i/o settings, and you need to try a pair of FBX versions, usually 5.x or 6.x. I don't know which is the current number. I tested to be safer to export in default Max FBX, the one that comes included, than installing as a plugin. Anyway, sometimes older versions work better with older packages.&#xD;&#xA;&#xD;&#xA;About the 60$ of the third option, I guess they charge that for in case some issue arises, as the actual thing is open, export, import. Just that there might be fixing involved. Sometimes really easy ones, other times can even make it impossible, depending on package versions, status of original file, etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.maxon.net/es/products/general-information/general-information/product-comparison.html" />
  <row Id="21079" PostHistoryTypeId="2" PostId="10134" RevisionGUID="8443aef3-9faf-462d-8166-d60cbe66a5b5" CreationDate="2011-03-24T14:18:31.483" UserId="-1" Text="" />
  <row Id="21080" PostHistoryTypeId="2" PostId="10135" RevisionGUID="a9c2893c-0c8a-4fbc-8d23-bc83b3156941" CreationDate="2011-03-24T14:18:31.483" UserId="-1" Text="" />
  <row Id="21081" PostHistoryTypeId="25" PostId="10132" RevisionGUID="152567ca-2baa-4a79-988c-288ef4857b8a" CreationDate="2011-03-24T14:23:37.820" Comment="http://twitter.com/#!/StackGameDev/status/50925740794970112" />
  <row Id="21082" PostHistoryTypeId="5" PostId="10135" RevisionGUID="2b0eeb92-2d60-4f7c-9723-b147c6bb2b08" CreationDate="2011-03-24T14:27:12.317" UserId="6286" Comment="added 89 characters in body" Text="Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones." />
  <row Id="21083" PostHistoryTypeId="24" PostId="10135" RevisionGUID="2b0eeb92-2d60-4f7c-9723-b147c6bb2b08" CreationDate="2011-03-24T14:27:12.317" Comment="Proposed by 6286 approved by 189 edit id of 94" />
  <row Id="21084" PostHistoryTypeId="5" PostId="10134" RevisionGUID="f5d2da62-2cbe-40b2-b720-7437b9c01970" CreationDate="2011-03-24T14:27:14.707" UserId="6286" Comment="added 726 characters in body" Text="OpenGL for Embedded Systems (OpenGL ES) is a subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones, PDAs, and video game consoles. OpenGL ES is managed by the not-for-profit technology consortium, the Khronos Group, Inc.&#xD;&#xA;&#xD;&#xA;Last version is OpenGL ES 2.0, publicly released in March 2007. It eliminates most of the fixed-function rendering pipeline in favor of a programmable one. Almost all rendering features of the transform and lighting pipelines, such as the specification of materials and light parameters formerly specified by the fixed-function API, are replaced by shaders written by the graphics programmer. As a result, OpenGL ES 2.0 is not backwards compatible with OpenGL ES 1.1." />
  <row Id="21085" PostHistoryTypeId="24" PostId="10134" RevisionGUID="f5d2da62-2cbe-40b2-b720-7437b9c01970" CreationDate="2011-03-24T14:27:14.707" Comment="Proposed by 6286 approved by 189 edit id of 93" />
  <row Id="21086" PostHistoryTypeId="2" PostId="10136" RevisionGUID="8f327047-751e-48b1-8717-077a05b93f82" CreationDate="2011-03-24T14:50:00.123" UserId="-1" Text="" />
  <row Id="21087" PostHistoryTypeId="2" PostId="10137" RevisionGUID="c19b2969-e311-44ab-8187-a02e25dcf5c7" CreationDate="2011-03-24T14:50:00.123" UserId="-1" Text="" />
  <row Id="21088" PostHistoryTypeId="5" PostId="10048" RevisionGUID="a64ec984-4b2c-4423-a7e0-b2515161cb47" CreationDate="2011-03-24T15:06:56.123" UserId="1430" Comment="added 667 characters in body" Text="**I am not a lawyer and you should consult one for real, accurate legal advice.**&#xD;&#xA;&#xD;&#xA;The name and design are likely trademarked (you can see [here][1] for example that there have been trademark issues with the M4 in the past; other guns will likely have similar issues).&#xD;&#xA;&#xD;&#xA;EDIT: It is possible that as far as a trademark is concerned I may have been misinterpreting things, and it may be okay depending on your circumstances. However, you will still potentially need to worry about other intellectual property restrictions (such as any copyrights held in relation to the item in question) which do apply regardless of whether or not your product is commercially available.&#xD;&#xA;&#xD;&#xA;At the end of the day, if you violate somebody's intellectual property laws and they call you on it you can be in a world of hurt so it's best to get real legal advice because the risk is pretty severe. There's [a good set of articles on intellectual property issues by a Real Lawyer here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/M4_carbine#Trademark_issues&#xD;&#xA;  [2]: http://underdevelopmentlaw.com/category/intellectual-property/" />
  <row Id="21089" PostHistoryTypeId="2" PostId="10138" RevisionGUID="afa43439-0000-4f91-9504-6b6ad5e7192c" CreationDate="2011-03-24T15:11:41.090" UserId="5640" Text="Basically, I'm looking for a good, 2D game engine to build a platformer/contra-like shooter on to bolster (and when I say bolster, I really mean start) my portfolio. &#xD;&#xA;&#xD;&#xA;I use the words &quot;right now&quot; in the title because I've read through some questions, and I don't really want to use anything like Java's game API for mobile phones from 2003. (Also, XNA is out of the question as I'm already working on a larger scale project in it.)&#xD;&#xA;&#xD;&#xA;I'm fairly competent in Java, and have a basic understanding of other languages like C# and Python, but I'm totally unopposed to learning a new language while learning the engine (within reason).&#xD;&#xA;&#xD;&#xA;The engine doesn't have to be super powerful, just free and simple enough that someone of my skill level (3rd year CS major) can get a nice horizontal slice out without too many bumps along the way." />
  <row Id="21090" PostHistoryTypeId="1" PostId="10138" RevisionGUID="afa43439-0000-4f91-9504-6b6ad5e7192c" CreationDate="2011-03-24T15:11:41.090" UserId="5640" Text="What's a good 2D game engine to work on right now?" />
  <row Id="21091" PostHistoryTypeId="3" PostId="10138" RevisionGUID="afa43439-0000-4f91-9504-6b6ad5e7192c" CreationDate="2011-03-24T15:11:41.090" UserId="5640" Text="&lt;game-design&gt;&lt;2d&gt;&lt;engine&gt;" />
  <row Id="21092" PostHistoryTypeId="2" PostId="10139" RevisionGUID="446b0a1e-029c-4366-b607-5f8b5e0b0227" CreationDate="2011-03-24T15:44:22.220" UserId="1430" Text="There's a [ton of links if you ask Google about it][1], but most of them are things that seem relatively unheard of. I have used one of the top results, [Love][2], for a little while and found it pretty quick to get up and running with. It uses Lua.&#xD;&#xA;&#xD;&#xA;There's also [Torque 2D][3], which I've heard decent things about (it is non-free, which I know you mentioned, but it is also relatively cheap, so...). [cocos2d][4] is quite popular for the iPhone.&#xD;&#xA;&#xD;&#xA;You also have the option of using Unity or Ogre or Irrlicht or any of the other available 3D game/graphics engines to simulate a 2D space, but that may involve more extra work than you want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=2d%20game%20engine&#xD;&#xA;  [2]: http://love2d.org/&#xD;&#xA;  [3]: http://www.garagegames.com/products/torque-2d&#xD;&#xA;  [4]: http://www.cocos2d-iphone.org/" />
  <row Id="21093" PostHistoryTypeId="2" PostId="10140" RevisionGUID="e6112669-23e4-401b-b8ca-4279f72fd2ab" CreationDate="2011-03-24T16:03:53.473" UserId="1430" Text="*The bulk of this answer is going to be a response to the &quot;Why?&quot; part of your question, alas.*&#xD;&#xA;&#xD;&#xA;Well, there's [FX Composer][1], from NVIDIA, which is a similar product -- it doesn't support GLSL but the languages it does support are quite similar. But it was last updated in 2009 and I know of no plans to update it further. Most high-end 3D modelling packages have material construction tools in them as well, which may or may not support GLSL.&#xD;&#xA;&#xD;&#xA;I think the reason you see these products reaching end-of-life (and nothing coming out to replace them) is that **the direction that shader development has taken doesn't lend itself well to generalized IDEs** like this.&#xD;&#xA;&#xD;&#xA;Even back when we just had vertex and pixel shaders, there tended to be a strong coupling between the game/engine-side data formats (and how that data is processed) and the shader input layouts and operations programmed within the shaders -- at least for the more interesting, complex effects.&#xD;&#xA;&#xD;&#xA;Consider water-related effects, for example, which often involve deforming the geometry slightly in response to sums of sine waves (in addition to running a computation that sums similar waves into a texture to be bound to the pipeline as a bump map), as well as needing framebuffer copy textures to bind in order to simulation reflection, and so on. Most of that data comes from the CPU, and isn't built in to the shader itself.&#xD;&#xA;&#xD;&#xA;As the nature of that coupling increased (due to increases in parallelism on the CPU side, allowing us to balance the interesting computations more evenly between CPU and GPU), it got harder and harder to design a general-purpose shader IDE because that IDE also has to have a way to script and replicate the data pipeline that a game is going to send to shader -- essentially it needed to be a plugin to an engine. **As we added extra programmable stages to the pipeline -- geometry shaders, hull shaders, et cetera -- this only compounded the issue.**&#xD;&#xA;&#xD;&#xA;D3D tried to alleviate the problem with [SAS][2], but I don't think that ever really caught on and it certainly hasn't scaled with advances in GPU technology.&#xD;&#xA;&#xD;&#xA;**As a result, specialized in-house or in-engine tools for building shaders evolved, and tools like FX Composer and RenderMonkey fell into disuse** and were ultimately abandoned.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/object/fx_composer_home.html&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb173004%28v=vs.85%29.aspx" />
  <row Id="21094" PostHistoryTypeId="5" PostId="10125" RevisionGUID="b6c86031-1774-465d-9160-ba6b7eee1228" CreationDate="2011-03-24T16:09:03.487" UserId="1430" Comment="added 3 characters in body" Text="It may be some stupid to say this, but anyway: aren't you looking for a scriptable game engine?&#xD;&#xA;&#xD;&#xA;This way all internal aspects of the application will be handled by the engine itself and you can just join the parts (art, AI, levels) that you can generate on your own or, if it seems more convenient for you, contract with someone else.&#xD;&#xA;&#xD;&#xA;If all the outsourced parts work on the same toolbox and you establish a robust set of specifications I think this could be, if not easy, at least not impossible.&#xD;&#xA;&#xD;&#xA;Also if, as you mentioned, you have programming experience it should be quite easy for you to work over an engine.&#xD;&#xA;&#xD;&#xA;As an example I would point you to the omnipresent [UDK][1].&#xD;&#xA;&#xD;&#xA;Hope this can help you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/" />
  <row Id="21095" PostHistoryTypeId="2" PostId="10141" RevisionGUID="79d7193f-201f-4ba8-bed3-e8d615c43a14" CreationDate="2011-03-24T16:31:11.507" UserId="1101" Text="Given a normal Elo system, such a thing probably doesn't exist. It varies the scores based on the difference between an expected score and the actual score, so you can see that if you pair up people of equal skill, they're likely to draw (or have a 50% chance of winning) so the scores won't change, and if you pair up complete opposites, the veteran will almost always beat the novice (as expected) so the scores won't change there either.&#xD;&#xA;&#xD;&#xA;The only thing that is likely to make one Elo score less accurate than another is having played fewer bouts. This means you will want them to play more. You don't have any information yet as to their actual skill level so the important thing is to get them to enter bouts and start to establish that level.&#xD;&#xA;&#xD;&#xA;So, under these conditions, I'd just opt for ensuring that bots play as many different bots as possible, picking any bot they haven't competed against before, and favouring the selection of bots who haven't played much. New bots joining the system should be favoured in order to quickly establish their approximate levels." />
  <row Id="21096" PostHistoryTypeId="2" PostId="10142" RevisionGUID="4099682b-42d3-42ff-99e0-4be6ba8cb8a4" CreationDate="2011-03-24T16:36:14.230" UserId="3656" Text="Will's answer shows you what is probably the most flexible and straightforward, and I'd recommend it if what you need is straight-ahead input polling.&#xD;&#xA;&#xD;&#xA;But, if you need an easy way to check for different combinations of button presses while avoiding massive amounts of switch and if statements, you can use bit flag enums.&#xD;&#xA;&#xD;&#xA;I dunno what you know about bit vectors, so here's an overview: Basically, you have an enum class that represents all possible keys. Each enum should have a value that corresponds to a bit in an integer. (ie: 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0011, 0x0012, 0x0014, etc). ([Link][1] for doing this in Java).&#xD;&#xA;&#xD;&#xA;Now, since you can pass around information about up to 32 (or 64 if you use longs) keys, you can have a hash table that associates bit vectors (int or long) with objects falling some sort of KeyComboCallback interface, which just contains a single method call, Do(), that gets called when the associated combination of keys are pressed.&#xD;&#xA;&#xD;&#xA;Now when you instantiate/initialize your player object or your menu object, you can make a call to some sort of input manager and pass it all the key combination bit vectors you want and associate them with anonymous inner classes.&#xD;&#xA;&#xD;&#xA;This is really quick &amp; convenient in C++ and C#, but Java enums are special, so you may find it more convenient to create a KeyCombination class or something that will store all of this information without worrying about enums. But the idea is still the same. I'm using this in an XNA game, and I like the facility a lot. You can also use it to separate input regions, which is useful for comparing different parts of the keyboard or gamepad independently (might be useful for two players on one keyboard).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/1.5.0/docs/guide/language/enums.html" />
  <row Id="21097" PostHistoryTypeId="5" PostId="10142" RevisionGUID="89c7e44c-1846-4a71-a93d-a1cda2329ceb" CreationDate="2011-03-24T16:42:54.413" UserId="3656" Comment="added code example; added 15 characters in body; deleted 79 characters in body; deleted 10 characters in body; deleted 2 characters in body" Text="Will's answer shows you what is probably the most flexible and straightforward, and I'd recommend it if what you need is straight-ahead input polling.&#xD;&#xA;&#xD;&#xA;But, if you need an easy way to check for different combinations of button presses while avoiding massive amounts of switch and if statements, you can use bit flag enums.&#xD;&#xA;&#xD;&#xA;I dunno what you know about bit vectors, so here's an overview: Basically, you have an enum class that represents all possible keys. Each enum should have a value that corresponds to a bit in an integer. (ie: 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0011, 0x0012, 0x0014, etc). ([Link][1] for doing this in Java).&#xD;&#xA;&#xD;&#xA;Now, since you can pass around information about up to 32 (or 64 if you use longs) keys, you can have a hash table that associates bit vectors (int or long) with objects falling some sort of KeyComboCallback interface, which just contains a single method call, Do(), that gets called when the associated combination of keys are pressed.&#xD;&#xA;&#xD;&#xA;Now when you instantiate/initialize your player object or your menu object, you can make a call to some sort of input manager and pass it all the key combination bit vectors you want and associate them with anonymous inner classes.&#xD;&#xA;&#xD;&#xA;    // ... in your init code for Player&#xD;&#xA;    &#xD;&#xA;    InputManager.map(&#xD;&#xA;    	KeyMap.A.val() | KeyMap.B.val() | KeyMap.C.val(), &#xD;&#xA;    	new KeyComboCallback(KeyMap keys) {&#xD;&#xA;    		this.DoCrazyAwesomeComboAttack();&#xD;&#xA;    	});&#xD;&#xA;    &#xD;&#xA;    // ...  continue init&#xD;&#xA;&#xD;&#xA;This is really quick &amp; convenient in C++ and C#, but Java enums are special, so you may find it more convenient to create a KeyCombination class or something that will store all of this information without worrying about enums. But the idea is still the same. I'm using this in an XNA game, and I like the facility a lot. You can also use it to separate input regions, which is useful for comparing different parts of the keyboard or gamepad independently (might be useful for two players on one keyboard).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/1.5.0/docs/guide/language/enums.html" />
  <row Id="21098" PostHistoryTypeId="4" PostId="10138" RevisionGUID="5da34e9a-cdb3-4280-ae7b-01dc95407ee9" CreationDate="2011-03-24T17:02:14.490" UserId="5640" Comment="edited title" Text="What's a good 2D game engine or framework to work on right now?" />
  <row Id="21099" PostHistoryTypeId="2" PostId="10143" RevisionGUID="88216cd0-b377-4704-8a38-8317d4fc4c11" CreationDate="2011-03-24T17:13:59.020" UserId="-1" Text="" />
  <row Id="21100" PostHistoryTypeId="2" PostId="10144" RevisionGUID="371e443d-49a6-4c99-978a-c96baf9bda78" CreationDate="2011-03-24T17:13:59.020" UserId="-1" Text="" />
  <row Id="21101" PostHistoryTypeId="2" PostId="10145" RevisionGUID="ec916d76-dcdb-4282-b6ed-d289700e61c7" CreationDate="2011-03-24T17:14:44.090" UserId="6117" Text="Most of the question is in the title.&#xD;&#xA;&#xD;&#xA;Basically, i'm starting to develop a 2d multiplayer action game. The client is (probably) going to be in XNA, and i thought I'd ask here about whether it's a good idea to use C# for server side development as well.&#xD;&#xA;&#xD;&#xA;I guess the fact that the language is managed is not something problematic as Java is being used in even MMO game servers (correct me if i'm wrong), so are there any reasons to avoid C# for this purpose? I need it to be fast and responsive, to communicate over TCP, to chat with an SQL server. And if there is no reason to avoid C#, how would i deploy such a web server, would it be a .NET EXE running on the server machine?" />
  <row Id="21102" PostHistoryTypeId="1" PostId="10145" RevisionGUID="ec916d76-dcdb-4282-b6ed-d289700e61c7" CreationDate="2011-03-24T17:14:44.090" UserId="6117" Text="c# for a real-time game server" />
  <row Id="21103" PostHistoryTypeId="3" PostId="10145" RevisionGUID="ec916d76-dcdb-4282-b6ed-d289700e61c7" CreationDate="2011-03-24T17:14:44.090" UserId="6117" Text="&lt;c#&gt;&lt;server&gt;" />
  <row Id="21104" PostHistoryTypeId="25" PostId="10138" RevisionGUID="945974f5-4d41-4440-bffa-433592d43a31" CreationDate="2011-03-24T17:23:37.840" Comment="http://twitter.com/#!/StackGameDev/status/50971040830062593" />
  <row Id="21105" PostHistoryTypeId="5" PostId="10142" RevisionGUID="930c335e-6c4d-4f22-ba3f-1bc2ed596247" CreationDate="2011-03-24T17:37:39.543" UserId="3656" Comment="fixed java syntax" Text="Will's answer shows you what is probably the most flexible and straightforward, and I'd recommend it if what you need is straight-ahead input polling.&#xD;&#xA;&#xD;&#xA;But, if you need an easy way to check for different combinations of button presses while avoiding massive amounts of switch and if statements, you can use bit flag enums.&#xD;&#xA;&#xD;&#xA;I dunno what you know about bit vectors, so here's an overview: Basically, you have an enum class that represents all possible keys. Each enum should have a value that corresponds to a bit in an integer. (ie: 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0011, 0x0012, 0x0014, etc). ([Link][1] for doing this in Java).&#xD;&#xA;&#xD;&#xA;Now, since you can pass around information about up to 32 (or 64 if you use longs) keys, you can have a hash table that associates bit vectors (int or long) with objects falling some sort of KeyComboCallback interface, which just contains a single method call, Do(), that gets called when the associated combination of keys are pressed.&#xD;&#xA;&#xD;&#xA;Now when you instantiate/initialize your player object or your menu object, you can make a call to some sort of input manager and pass it all the key combination bit vectors you want and associate them with anonymous inner classes.&#xD;&#xA;&#xD;&#xA;    // ... in your init code for Player&#xD;&#xA;    &#xD;&#xA;    InputManager.map(&#xD;&#xA;    	KeyMap.A.val() | KeyMap.B.val() | KeyMap.C.val(), &#xD;&#xA;        new KeyComboCallback(KeyMap keys) {&#xD;&#xA;            public void Do() {&#xD;&#xA;       	       this.DoCrazyAwesomeComboAttack();&#xD;&#xA;            }&#xD;&#xA;        });&#xD;&#xA;    &#xD;&#xA;    // ...  continue init&#xD;&#xA;&#xD;&#xA;This is really quick &amp; convenient in C++ and C#, but Java enums are special, so you may find it more convenient to create a KeyCombination class or something that will store all of this information without worrying about enums. But the idea is still the same. I'm using this in an XNA game, and I like the facility a lot. You can also use it to separate input regions, which is useful for comparing different parts of the keyboard or gamepad independently (might be useful for two players on one keyboard).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/1.5.0/docs/guide/language/enums.html" />
  <row Id="21107" PostHistoryTypeId="5" PostId="10145" RevisionGUID="fd6ff5c2-dd2d-4131-881b-69ae073c0b99" CreationDate="2011-03-24T17:53:51.473" UserId="1430" Comment="edited body; edited title" Text="Most of the question is in the title.&#xD;&#xA;&#xD;&#xA;Basically, I'm starting to develop a 2D multiplayer action game. The client is (probably) going to be in XNA, and I thought I'd ask here about whether it's a good idea to use C# for server side development as well.&#xD;&#xA;&#xD;&#xA;I guess the fact that the language is managed is not something problematic as Java is being used in even MMO game servers (correct me if I'm wrong), so are there any reasons to avoid C# for this purpose? I need it to be fast and responsive, to communicate over TCP, to chat with an SQL server. And if there is no reason to avoid C#, how would I deploy such a web server, would it be a .NET EXE running on the server machine?" />
  <row Id="21108" PostHistoryTypeId="4" PostId="10145" RevisionGUID="fd6ff5c2-dd2d-4131-881b-69ae073c0b99" CreationDate="2011-03-24T17:53:51.473" UserId="1430" Comment="edited body; edited title" Text="Is C# viable for a real-time game server?" />
  <row Id="21109" PostHistoryTypeId="2" PostId="10146" RevisionGUID="33af876b-4162-4657-8b9d-a821d7389335" CreationDate="2011-03-24T17:59:47.397" UserId="1430" Text="Sure, you can use C#.&#xD;&#xA;&#xD;&#xA;One of the bigger issues to be aware of in terms of performance in C# or other .NET ecosystems is the GC -- [the .NET framework provides several flavors of GC][1], including a &quot;server&quot; GC, that are worth learning about. Intelligently managing memory (for example, by pooling) is still a good technique even in a managed environment.&#xD;&#xA;&#xD;&#xA;There are several robust APIs for interacting with SQL, communicating via TCP, et cetera in C#, either as part of the base framework or via third-parties, so you should have no trouble there. &#xD;&#xA;&#xD;&#xA;You can utilize ASP.NET or similar if you really want your server to be web-based; if you just want to run a process and listen for TCP connections you can just deploy an .exe and the appropriate dependencies to the server machine, open up the appropriate ports, and run the .exe.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/maoni/archive/2004/09/25/234273.aspx" />
  <row Id="21110" PostHistoryTypeId="2" PostId="10147" RevisionGUID="58a412f9-306e-45e8-856d-fa46229a13a6" CreationDate="2011-03-24T18:00:15.527" UserId="189" Text="I think it's a great idea. The language is certainly capable of it, and especially if it's what you know, don't spend a bunch of time learning a new language just because it's &quot;faster&quot;. The real bottleneck of your server will be network latency; an extra millisecond or two because you used C# instead of C++ won't make a difference." />
  <row Id="21111" PostHistoryTypeId="5" PostId="10144" RevisionGUID="b6f85c32-2bdb-41ff-95cf-d8323cb3392d" CreationDate="2011-03-24T18:01:36.693" UserId="3588" Comment="added 84 characters in body" Text="The design and/or logic of how an in-game entity makes decisions about its behavior." />
  <row Id="21112" PostHistoryTypeId="24" PostId="10144" RevisionGUID="b6f85c32-2bdb-41ff-95cf-d8323cb3392d" CreationDate="2011-03-24T18:01:36.693" Comment="Proposed by 3588 approved by 189 edit id of 97" />
  <row Id="21113" PostHistoryTypeId="5" PostId="10143" RevisionGUID="48754871-ffc2-4396-8524-e969846eb3b3" CreationDate="2011-03-24T18:01:38.503" UserId="3588" Comment="added 337 characters in body" Text="Question dealing with the logic of Computer players in multiplayer games or otherwise non-playable characters fall under the purview of this tag.&#xD;&#xA;&#xD;&#xA;Examples of applications include:&#xD;&#xA;&#xD;&#xA; - [tag:path-finding]&#xD;&#xA; - Resource allocation and usage&#xD;&#xA; - Response measures to different circumstances&#xD;&#xA; - Complexity and randomness in AI algorithms" />
  <row Id="21114" PostHistoryTypeId="24" PostId="10143" RevisionGUID="48754871-ffc2-4396-8524-e969846eb3b3" CreationDate="2011-03-24T18:01:38.503" Comment="Proposed by 3588 approved by 189 edit id of 96" />
  <row Id="21115" PostHistoryTypeId="2" PostId="10148" RevisionGUID="d9e212f5-6236-4fa3-b9d9-c3cdc6db9218" CreationDate="2011-03-24T18:26:52.060" UserId="6292" Text="Lets say I set 2 render targets:&#xD;&#xA;&#xD;&#xA;device.SetRenderTargets(color, depth);&#xD;&#xA;&#xD;&#xA;And then half my draw code only outputs color and not depth. This works fine on the PC and produces the expected results however I feel like this might be an issue on the Xbox.&#xD;&#xA;&#xD;&#xA;Are there any issues I should be aware of when using MRT while only outputing to one render target?&#xD;&#xA;" />
  <row Id="21116" PostHistoryTypeId="1" PostId="10148" RevisionGUID="d9e212f5-6236-4fa3-b9d9-c3cdc6db9218" CreationDate="2011-03-24T18:26:52.060" UserId="6292" Text="Are there any issues with not drawing to all render targets when using MRT?" />
  <row Id="21117" PostHistoryTypeId="3" PostId="10148" RevisionGUID="d9e212f5-6236-4fa3-b9d9-c3cdc6db9218" CreationDate="2011-03-24T18:26:52.060" UserId="6292" Text="&lt;xna&gt;&lt;graphics&gt;&lt;rendering&gt;&lt;graphics-programming&gt;&lt;xna-4.0&gt;" />
  <row Id="21118" PostHistoryTypeId="2" PostId="10149" RevisionGUID="77324c62-c9b2-4822-a14c-c185305c397c" CreationDate="2011-03-24T18:43:13.013" UserId="5708" Text="Speaking as a programmer (to be more specific than 'developer') at a company that has used UE3 for multiple projects, I can emphatically say that we would consider C++ knowledge essential, and a candidate with experience in the UDK but no C++ coding knowledge would almost certainly not be considered for a programming position.&#xD;&#xA;&#xD;&#xA;To expand on this a bit: while we were using the Unreal Engine for our titles, only a small fraction of the game was written in UnrealScript, for a plethora of reasons that I won't get into here.  Meanwhile, the implicit consideration was that coders with solid C++ knowledge could pick up UnrealScript relatively straightforwardly (indeed, I don't think more than one or two people on the devteam had any experience with it before starting the project), whereas someone whose only skills were Unrealscript would likely have a harder time learning all the ins and outs of C++ and a larger codebase.  Since programmers needed to be able to shift specific roles over the course of a project and slot in as needed (particularly during bug crunches), carrying UnrealScript-specific programmers would make next to no sense for us.&#xD;&#xA;&#xD;&#xA;I don't know if the calculation of what can be more easily learned would be the same for other companies, but I do know that we weren't the only UE3 developer to almost completely forgo UnrealScript; and more to the point, there are far more developers out there who _aren't_ using UE3 than who are (and any way you slice it, virtually all of the studios using UE3 are also using C++) - so if the question is 'what skill is more likely to make me employable as a programmer in the games industry?' then the answer is C++ hands-down." />
  <row Id="21119" PostHistoryTypeId="2" PostId="10150" RevisionGUID="32d335ea-d94a-41ba-ad91-170efad41bbb" CreationDate="2011-03-24T18:55:49.153" UserId="5527" Text="FlatRadBall www.flatredball.com would be an example of an 'engine' based on xna. &#xD;&#xA;&#xD;&#xA;Hmm...wanted to add a comment to the OP but couldn't...maybe i don't have the rep yet." />
  <row Id="21120" PostHistoryTypeId="25" PostId="10145" RevisionGUID="9910ee1e-5089-45af-95a7-25a6ec7821c3" CreationDate="2011-03-24T20:23:37.800" Comment="http://twitter.com/#!/StackGameDev/status/51016339116146688" />
  <row Id="21121" PostHistoryTypeId="2" PostId="10151" RevisionGUID="912f588c-6c85-4d12-91e0-93fcf0286258" CreationDate="2011-03-24T20:39:19.447" UserId="5399" Text="I know this was asked a while back but i've spent some time on this for my own project so in case anyone else wants to know here are the results of my experiments (assuming you are thinking of skinned characters):&#xD;&#xA;&#xD;&#xA;**On Licensing**  &#xD;&#xA;Daz is venturing (tentatively) into the 3d assest market and as such their new EULA does permit use of their models (&amp; derived) in computer games with a couple of restrictions:&#xD;&#xA;&#xD;&#xA;&gt; SUMMARY: &#xD;&#xA;&gt; &#xD;&#xA;&gt; Summary of section 5 – INCORPORATION&#xD;&#xA;&gt; OF 3D MODEL(S) INTO OTHER WORKS &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may use the 3D content/models or&#xD;&#xA;&gt; derivatives thereof when embedded in a&#xD;&#xA;&gt; single game or other project if you&#xD;&#xA;&gt; have purchased the “single-use”&#xD;&#xA;&gt; license. By purchasing the&#xD;&#xA;&gt; “multiple-use” license, you may use&#xD;&#xA;&gt; the content/models or derivatives&#xD;&#xA;&gt; thereof when embedded in the number of&#xD;&#xA;&gt; games or projects authorized by the&#xD;&#xA;&gt; multiple-use license. &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may publish, market, distribute,&#xD;&#xA;&gt; transfer or sell any games or projects&#xD;&#xA;&gt; that contain DAZ content/models as&#xD;&#xA;&gt; long as the DAZ content/models are not&#xD;&#xA;&gt; accessible to end users in their&#xD;&#xA;&gt; native formats and are protected by&#xD;&#xA;&gt; asset protection technology,&#xD;&#xA;&gt; encryption or whatever means necessary&#xD;&#xA;&gt; to protect them from theft or&#xD;&#xA;&gt; copyright infringement.&#xD;&#xA;&#xD;&#xA;([https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula][1])&#xD;&#xA;&#xD;&#xA;In regards to open source projects I am not sure (I emailed and haven't had a response yet).&#xD;&#xA;Bear in mind however that most of the content sold in Daz's store and in other marketplaces like Renderosity have their own licenses.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**File Formats**  &#xD;&#xA;Daz Studio is free and can import/export OBJ and COLLADA files as standard. Plugins can be purchased to export to CR2 (Poser Characters) and FBX.&#xD;&#xA;&#xD;&#xA;In my experience OBJ transports fine between 3DS Max &amp; Daz Studio but the associated MTL material files do not; I am not sure whether this is due to Daz or Max (probably a bit of both). The problems can be resolved easily with a text editor - but it is still another stage in your pipeline no matter how small.&#xD;&#xA;&#xD;&#xA;An important point to consider is rigging. As opposed to vertex weighting, Daz models consist of many distinct poly groups which correspond to bones. These groups deform with respect to a single bone based on spherical falloff zones defined for each axis of rotation.&#xD;&#xA;(I think this is used to maintain compatibility with Poser; certainly i've seen posts on their forums of people saying vertex weighting would be easier when creating clothing)&#xD;&#xA;&#xD;&#xA;The OBJ format does not support vertex weights, or skeletons (though I suppose you may be able to pack one in with something like empty poly groups, I doubt it would be pretty).&#xD;&#xA;&#xD;&#xA;Daz can convert these falloff zones to vertex weights when exporting to FBX and the results are pretty good - I'm sure a modeller could do better if they were working with vertex weighting natively but its unlikely you'll notice unless the limbs are at extremes.&#xD;&#xA;&#xD;&#xA;Poser CR2 files support the poly group rigging but are horrifically complex. Check out Kuroyume's CR2 spec (http://www.kuroyumes-developmentzone.com/poser/poserfilespec/products_poser_cr2.html) to see what I mean.  &#xD;&#xA;CR2 files make liberal use of external references so you will need to process OBJs in full to support CR2s. Further that spec is for an older format. The latest version (8 I believe) had about 5 new sections when I tried to import it using the CR2 importer I've been working on.&#xD;&#xA;&#xD;&#xA;I haven't seen any open source CR2 importers you could modify easily for your project - it looks as if usually people start on one then give up halfway through and writing one myself I can see why!   &#xD;&#xA;&#xD;&#xA;**Performance**  &#xD;&#xA;Daz models are very high poly but I dont think this is as much of an issue as people make out. Daz has 'Decimator', a plugin which can reduce the poly count, though I don't even use it on the Daz models I use in my XNA project as they render perfectly fast; the count is about ~130,000 polys for V4 (base female human model).&#xD;&#xA;&#xD;&#xA;Whats more of a concern is the textures.&#xD;&#xA;&#xD;&#xA;1. They are very large (esp. third party products), so you will need to resize them in the pipeline depending on your engine/api.&#xD;&#xA;&#xD;&#xA;2. They are numerous. (I'm talking 3 different textures for the EYE!)&#xD;&#xA;&#xD;&#xA;3. Most importantly the materials have all sorts of 'odd' configurations - things like bump and transparency maps with no diffuse map. Its not that they are hard to support, its that there are so many different combinations you either need a very comprehensive importer or very comprehensive shader and model class.  &#xD;&#xA;My importer combines the trans and diffuse maps (creating if necessary), and adds vertex colour and normal data if missing - as a result I pack alot of 'white' structures into the resultant file but I only need 4 shaders.&#xD;&#xA;&#xD;&#xA;**Alpha Sorting**  &#xD;&#xA;Daz models (like probably most organic models) makes liberal use of transparency maps; further the nature of the models prohibits depth sorting before drawing.&#xD;&#xA;&#xD;&#xA;Let me pose a question: When you model an eye, do you surround the completed model eye with an extraneous sphere that has a solid diffuse colour (no map) but a transparency map that turns it invisible? So when the unsuspecting prospective game developer loads up the model the eyes appear black from the outside while from the inside are textured fine? Daz does. (Its to create the glossy wet sheen effect - turn the opacity setting of the material 7_EyeSurface down to 0 on the default V4 to see what I mean)&#xD;&#xA;&#xD;&#xA;I use 2-pass alpha sorting which is best for the 'cutout' transparency maps (which is what Daz models use it for mostly). This is built right into my model base class and engine from the start.&#xD;&#xA;&#xD;&#xA;**Customizing the character**  &#xD;&#xA;Clothes don't have to have a loose fit to deform properly once exported with bone weights, but beware that those ~90,000+ polys they are obscuring will still be there.&#xD;&#xA;&#xD;&#xA;**Animation**  &#xD;&#xA;FBX supports animation (in theory). Daz does have a keyframe animation editor but its a little 'light' and not easy to use. Daz also has plugins such as AniMate Lite which allow you to drag and drop animation segments into a timeline and then bake the keyframes into an animation to be exported.&#xD;&#xA;&#xD;&#xA;I've found extracting animations from FBX to be a little hit and miss, especically when baked from AniMate. For example, the walking animation 'block' will acctually move the model in model space so you couldn't simply pop that into the timeline, bake, export and then move your character around in time with it in an FPS.&#xD;&#xA;&#xD;&#xA;Further I've found that sometimes the exported animation causes the mesh, or a prop, to deform incorrectly; and since FBX files are accessed with an Autodesk SDK as opposed to with a custom importer like most formats its not trivial to look inside and see where the problem lies. (On the plus side I've worked out where the Dead Space developers got the ideas for all their monsters.)&#xD;&#xA;&#xD;&#xA;**To Summarise**  &#xD;&#xA;&#xD;&#xA; 1. If you want to use Daz models you&#xD;&#xA;    will need the FBX exporter because&#xD;&#xA;    OBJ is not comprehensive enough and&#xD;&#xA;    CR2s are too complex to import, and&#xD;&#xA;    even if you did your shader would&#xD;&#xA;    need to support a new type of&#xD;&#xA;    rigging*.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA; 2. Do not be concerned with poly counts&#xD;&#xA;    or texture sizes until you need to&#xD;&#xA;    be. Textures can be resized (and&#xD;&#xA;    also combined into one texture for&#xD;&#xA;    the whole character using Daz's&#xD;&#xA;    Texture Atlas) and Daz has plugins&#xD;&#xA;    for reducing poly counts IF you need&#xD;&#xA;    them.&#xD;&#xA;    &#xD;&#xA;   &#xD;&#xA; 3. Do be aware that the models will&#xD;&#xA;    have quirks that a game artist would&#xD;&#xA;    never dream of putting in - 3x&#xD;&#xA;    texture for 1x eye and 'specular&#xD;&#xA;    surface sphere' for example.&#xD;&#xA;&#xD;&#xA;I think Daz models are a super resource, esp. for hobbyist developers, but to be used seriously they would be best utilized _as_ a resource as opposed to a complete asset - design your characters, clothe them, then cull unseen polys, bake and animate in the modeller of your choice. &#xD;&#xA;Also, while Studio itself is free, to create and equip characters to a resonable standard, and export them in useful formats, you will need ~£70-100 worth of content and plugins minimum.&#xD;&#xA;&#xD;&#xA;*Not saying that would be prohibitively hard though - maybe have say a single 'vertex distance' plugged in by the importer as opposed to four vertex weights, and set the falloff zones &amp; transform shader wide for each poly group (geometry segment).&#xD;&#xA;&#xD;&#xA;  [1]: https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula" />
  <row Id="21122" PostHistoryTypeId="2" PostId="10152" RevisionGUID="5cc0cccf-ab9a-408a-b61d-28c614051671" CreationDate="2011-03-24T21:06:04.507" UserId="6296" Text="Slick2D http://slick.cokeandcode.com/ is great for Java with some great Toolings available. Have a look at the [Feature List][1].&#xD;&#xA;&#xD;&#xA;The tooling includes: FontEditor, Tiled Map Editor, Sprite/Animation Manager. Additionaly there is support for Phys2D a Java Based Physics Engine. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;They are currently working on an easy way to port Slick based games to Android.&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/static.php?page=features" />
  <row Id="21123" PostHistoryTypeId="2" PostId="10153" RevisionGUID="f0401398-1710-49f1-86dc-bc7b73785441" CreationDate="2011-03-24T21:31:46.897" UserId="51" Text="" />
  <row Id="21124" PostHistoryTypeId="2" PostId="10154" RevisionGUID="a6548cae-fcdc-44a9-96f3-fba1d84ddf1c" CreationDate="2011-03-24T21:31:46.897" UserId="51" Text="game-design is the soft art of designing mechanisms for players.  This is not to be used for programming questions about the &quot;design&quot; of features, engines, etc." />
  <row Id="21125" PostHistoryTypeId="2" PostId="10155" RevisionGUID="73941f7d-f189-40c2-b5c1-4f996b0fcd01" CreationDate="2011-03-24T21:32:52.107" UserId="51" Text="" />
  <row Id="21126" PostHistoryTypeId="2" PostId="10156" RevisionGUID="825f6fea-8cde-4c98-9c2a-43aec8b9856d" CreationDate="2011-03-24T21:32:52.107" UserId="51" Text="a meta tag and should be avoided" />
  <row Id="21127" PostHistoryTypeId="2" PostId="10157" RevisionGUID="ecce5f5b-7a36-4198-9ab7-7b33c36891ae" CreationDate="2011-03-24T21:35:18.173" UserId="51" Text="For reference, see [UDK.com][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/" />
  <row Id="21128" PostHistoryTypeId="2" PostId="10158" RevisionGUID="a3a2c712-242e-4c66-8acd-b8a896696b73" CreationDate="2011-03-24T21:35:18.173" UserId="51" Text="Unreal Development Kit - a version of Unreal Engine 3 that can be used to make games for PC and iOS.  Licensing is done on a back-end-only basis." />
  <row Id="21129" PostHistoryTypeId="6" PostId="10126" RevisionGUID="98d31495-9c63-4843-8c19-d284c62afc08" CreationDate="2011-03-24T21:35:58.207" UserId="51" Comment="edited tags; deleted 84 characters in body" Text="&lt;java&gt;&lt;input&gt;" />
  <row Id="21130" PostHistoryTypeId="5" PostId="10126" RevisionGUID="98d31495-9c63-4843-8c19-d284c62afc08" CreationDate="2011-03-24T21:35:58.207" UserId="51" Comment="edited tags; deleted 84 characters in body" Text="I am a self taught programmer, so I do not know the proper ways to do things. I have made simple games like asteroids and snake, but in those games, you can easily modify the variables within the keyevent functions. Here is how I did it in my simple Asteroids game:&#xD;&#xA;&#xD;&#xA;    /*&#xD;&#xA;    * key listener events&#xD;&#xA;    */&#xD;&#xA;    public void keyReleased(KeyEvent k){&#xD;&#xA;        int keyCode = k.getKeyCode();&#xD;&#xA;&#xD;&#xA;        switch(keyCode){&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_LEFT:&#xD;&#xA;                turnLeft = false;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_RIGHT:&#xD;&#xA;                turnRight = false;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_UP:&#xD;&#xA;                accel = false;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_1:&#xD;&#xA;                cls = true;&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_ENTER:&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_SPACE:&#xD;&#xA;                fire = false;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    public void keyTyped(KeyEvent K){}&#xD;&#xA;    public void keyPressed(KeyEvent k){&#xD;&#xA;        int keyCode = k.getKeyCode();&#xD;&#xA;&#xD;&#xA;        switch(keyCode){&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_LEFT:&#xD;&#xA;                turnLeft = true;&#xD;&#xA;                break;&#xD;&#xA; &#xD;&#xA;            case KeyEvent.VK_RIGHT:&#xD;&#xA;                turnRight = true;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_UP:&#xD;&#xA;                accel = true;&#xD;&#xA;                break;&#xD;&#xA;&#xD;&#xA;            case KeyEvent.VK_1:&#xD;&#xA;                cls = false;&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_ENTER:&#xD;&#xA;                clearAllBullets();&#xD;&#xA;                break;&#xD;&#xA;            case KeyEvent.VK_SPACE:&#xD;&#xA;                fire = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If I were to make a more advanced game (with a main menu, options, main game, etc.), how should I do the key/mouse input?&#xD;&#xA;&#xD;&#xA;Also, if I were to go into the single-player, should i put all of the gameplay code into one class? Is there a way to put the single player code into a separate class and somehow have the key input still modify the variables and such?" />
  <row Id="21131" PostHistoryTypeId="6" PostId="10138" RevisionGUID="ad4a0789-fa04-4746-a57e-0c6d82107836" CreationDate="2011-03-24T21:37:12.230" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;engine&gt;" />
  <row Id="21132" PostHistoryTypeId="5" PostId="10153" RevisionGUID="8d338927-8541-4c0c-b5c3-300154bcc0e9" CreationDate="2011-03-24T21:40:00.090" UserId="51" Comment="added 59 characters in body" Text="For programming questions, consider the `architecture` tag." />
  <row Id="21133" PostHistoryTypeId="2" PostId="10159" RevisionGUID="281ce274-2f23-4621-965e-df59ea9cb528" CreationDate="2011-03-24T21:46:55.250" UserId="2787" Text="One 'disadvantage' would be that with C# if you want to use it on multiple platforms you have to be very careful to make sure that your code will work with mono. If all you care about is running it on a single platform and windows is that platform, then you should have no problems as others have mentioned." />
  <row Id="21135" PostHistoryTypeId="25" PostId="10148" RevisionGUID="0ba5b43e-042b-47ac-bbd9-fc85bbc28477" CreationDate="2011-03-24T23:23:38.470" Comment="http://twitter.com/#!/StackGameDev/status/51061639478382592" />
  <row Id="21136" PostHistoryTypeId="2" PostId="10161" RevisionGUID="6905f69f-6b21-4df6-9204-392258cca67e" CreationDate="2011-03-25T00:31:11.963" UserId="5846" Text="a big one for flash dev is to never compile any secret into the source, because a decompiler can pull it out pretty easily. so any authentication that you need to do should be session based, and not hard coded into the game. &#xD;&#xA;&#xD;&#xA;other than that it's pretty much the same as web site security, use a session, only send a passphrase over https, etc." />
  <row Id="21137" PostHistoryTypeId="5" PostId="10150" RevisionGUID="647840f3-a789-464e-93eb-0a86fda5e603" CreationDate="2011-03-25T01:32:00.460" UserId="5527" Comment="edited body" Text="FlatRedBall www.flatredball.com would be an example of an 'engine' based on xna. &#xD;&#xA;&#xD;&#xA;Hmm...wanted to add a comment to the OP but couldn't...maybe i don't have the rep yet." />
  <row Id="21138" PostHistoryTypeId="2" PostId="10162" RevisionGUID="65e62e7e-43ed-4321-b539-bbd1cdacf5f0" CreationDate="2011-03-25T01:52:29.350" UserId="6067" Text="Is it possible to implement music/SFX in game made using JMonkey?  If yes, how did you do it?  What did you use?" />
  <row Id="21139" PostHistoryTypeId="1" PostId="10162" RevisionGUID="65e62e7e-43ed-4321-b539-bbd1cdacf5f0" CreationDate="2011-03-25T01:52:29.350" UserId="6067" Text="Implementing audio for a game made using JMonkey?" />
  <row Id="21140" PostHistoryTypeId="3" PostId="10162" RevisionGUID="65e62e7e-43ed-4321-b539-bbd1cdacf5f0" CreationDate="2011-03-25T01:52:29.350" UserId="6067" Text="&lt;audio&gt;" />
  <row Id="21141" PostHistoryTypeId="2" PostId="10163" RevisionGUID="e01d041d-a3f6-4268-9bb0-8d0bff5c961d" CreationDate="2011-03-25T02:02:25.487" UserDisplayName="slcpfmmm" Text="If it's okay for you to deploy on Windows, I'd strongly recommend it, especially since your client is C#.&#xD;&#xA;&#xD;&#xA;Don't underestimate game server development though. Even making a simple chat-only concurrent server is no trivial task, and you'll soon have lots of questions regarding concurrency, locking, performance, etc.&#xD;&#xA;&#xD;&#xA;Just as a starting point, I'd like you to take a look at this page that broadly explains how to do concurrent socket programming in several platforms:&#xD;&#xA;&#xD;&#xA;http://geekswithblogs.net/quension/archive/2006/06/30/83760.aspx&#xD;&#xA;&#xD;&#xA;If you're really serious about it, I'd recommend you thoroughly study Stevens' Unix Network Programming. It's focused on C sockets on Unix, but the principles are the same for every other platform, including .net." />
  <row Id="21142" PostHistoryTypeId="5" PostId="10163" RevisionGUID="c39616a0-d592-451f-9d15-b34a3103cb98" CreationDate="2011-03-25T02:07:45.920" UserDisplayName="slcpfmmm" Comment="added 332 characters in body" Text="If it's okay for you to deploy on Windows, I'd strongly recommend it, especially since your client is C#.&#xD;&#xA;&#xD;&#xA;Don't underestimate game server development though. Even making a simple chat-only concurrent server is no trivial task, and you'll soon have lots of questions regarding concurrency, locking, performance, etc.&#xD;&#xA;&#xD;&#xA;Just as a starting point, I'd like you to take a look at this page that broadly explains how to do concurrent socket programming in several platforms:&#xD;&#xA;&#xD;&#xA;http://geekswithblogs.net/quension/archive/2006/06/30/83760.aspx&#xD;&#xA;&#xD;&#xA;If you're really serious about it, I'd recommend you thoroughly study Stevens' Unix Network Programming. It's focused on C sockets on Unix, but the principles are the same for every other platform, including .net.&#xD;&#xA;&#xD;&#xA;Edit: This is another great resource, focused on scalability and performance for concurrent servers in .net. It's no longer available, but our friends at the wayback machine have a copy of it.&#xD;&#xA;&#xD;&#xA;http://replay.waybackmachine.org/20080405220143/http://www.coversant.net/dotnetnuke/Coversant/Blogs/tabid/88/EntryID/10/Default.aspx" />
  <row Id="21143" PostHistoryTypeId="2" PostId="10164" RevisionGUID="17d73f6f-0ea2-4514-9d82-b8f98ff2b7e0" CreationDate="2011-03-25T02:22:39.503" UserId="5991" Text="I am a programmer at a game company and I would simply not consider someone who didn't have C++ experience; C++ programming is just too much of a pain to expect someone to totally pick it up on the job (and we don't even go that nuts using its more advanced features). However I would value someone with both C++ and UDK experience over someone with only C++ experience. So my advice would be to pursue your UDK interest if you have it, but don't neglect your baseline C/C++ skills." />
  <row Id="21144" PostHistoryTypeId="25" PostId="10162" RevisionGUID="720ca7ea-415e-44ab-9eeb-d284bbfd5ded" CreationDate="2011-03-25T02:23:38.857" Comment="http://twitter.com/#!/StackGameDev/status/51106940562059264" />
  <row Id="21146" PostHistoryTypeId="5" PostId="10128" RevisionGUID="d2ae9b5d-03ac-4de6-8a21-4da68b3ee35b" CreationDate="2011-03-25T02:27:30.053" UserId="5021" Comment="added 409 characters in body; deleted 20 characters in body" Text="I have a shader that computes lighting for each light.&#xD;&#xA;&#xD;&#xA;    PointLight PointLights[10];&#xD;&#xA;&#xD;&#xA;    uniform const float NumPointLights;&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; NumPointLights; i++)&#xD;&#xA;    {&#xD;&#xA;	lightVec = PointLights[i].Position - pos;&#xD;&#xA;	lightDist = length(lightVec);&#xD;&#xA;        // Do other stuff with light here, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If I set NumPointLights to 2, the loop still iterates 10 times, and discards the result of the last 8 iterations.&#xD;&#xA;&#xD;&#xA;Should I set a compiler flag that will permit the loop to actually loop only 8 times, or should I make 10 shaders, a shader for each number of lights that can be rendered?&#xD;&#xA;&#xD;&#xA;On some small pieces of geometry I occaisionally need 10 lights. 90% of the time I only need 1-2 lights. How do I proceed?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;I'm still not sure why, and if someone can explain why I'll accept their answer, but recompiling my code just now generated a shader that now does not loop all 10 times anymore, and in fact loops the number of times that is specified by NumPointLights.&#xD;&#xA;&#xD;&#xA;Summary: I don't really have to make multiple shaders, the code now runs the loop a limited number of times as wanted." />
  <row Id="21147" PostHistoryTypeId="2" PostId="10165" RevisionGUID="6b25e3f6-2122-432c-8f18-f35a2b79efe9" CreationDate="2011-03-25T02:34:13.417" UserId="5021" Text="If I have a Model that is drawn with a different effect occasionally, what is the typical approach to this?&#xD;&#xA;&#xD;&#xA;Models have effects stored in each of their meshes, and you seem to be forced to use those.&#xD;&#xA;&#xD;&#xA;Typically this is done:&#xD;&#xA;&#xD;&#xA;    foreach (ModelMesh mesh in model.Meshes)&#xD;&#xA;    {&#xD;&#xA;        foreach (Effect effect in mesh.Effects)&#xD;&#xA;        {&#xD;&#xA;            effect.Parameters[&quot;World&quot;].SetValue(world);&#xD;&#xA;            // Other stuff related to this specific effect is done here.&#xD;&#xA;        }&#xD;&#xA;        mesh.Draw();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to be able to do this:&#xD;&#xA;&#xD;&#xA;    foreach (ModelMesh mesh in model.Meshes)&#xD;&#xA;    {&#xD;&#xA;        myEffect.CurrentTechnique.Passes[0].Apply();&#xD;&#xA;        mesh.Draw(); // Mesh will be drawn with &quot;myEffect&quot;.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;What are our options?" />
  <row Id="21148" PostHistoryTypeId="1" PostId="10165" RevisionGUID="6b25e3f6-2122-432c-8f18-f35a2b79efe9" CreationDate="2011-03-25T02:34:13.417" UserId="5021" Text="Custom effects on Model in XNA." />
  <row Id="21149" PostHistoryTypeId="3" PostId="10165" RevisionGUID="6b25e3f6-2122-432c-8f18-f35a2b79efe9" CreationDate="2011-03-25T02:34:13.417" UserId="5021" Text="&lt;xna-4.0&gt;" />
  <row Id="21150" PostHistoryTypeId="25" PostId="10165" RevisionGUID="a035c7f5-84e1-415f-a5f7-3ce488cfe7e4" CreationDate="2011-03-25T05:23:38.493" Comment="http://twitter.com/#!/StackGameDev/status/51152237497556992" />
  <row Id="21151" PostHistoryTypeId="6" PostId="10165" RevisionGUID="5cc86119-dfb5-4a44-8139-ff01799c0725" CreationDate="2011-03-25T05:44:23.770" UserId="4209" Comment="added xna tag" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="21152" PostHistoryTypeId="24" PostId="10165" RevisionGUID="5cc86119-dfb5-4a44-8139-ff01799c0725" CreationDate="2011-03-25T05:44:23.770" Comment="Proposed by 4209 approved by 14 edit id of 98" />
  <row Id="21153" PostHistoryTypeId="2" PostId="10166" RevisionGUID="4af075a2-9934-4cb4-bde3-aae201f4c556" CreationDate="2011-03-25T08:03:09.403" UserId="2710" Text="Not only viable, but really good, in my experience. I've developed several MMO servers using C#, and I must say I never regretted the choice of language and platform.&#xD;&#xA;&#xD;&#xA;There are lots of great libraries and tools for C# and .NET in general - network, logging, O/R mapping, etc. And, compared to Java C# is more expressive and less verbose (some people might argue about this, though..)&#xD;&#xA;&#xD;&#xA;The GC &quot;overhead&quot; that scares some people is not really an issue, unless you happen to abuse it with billions of allocations per second. As an example, our current server allocates up to 50 mb/second under heavy load, and GC does not introduce any noticeable lag. We did have to use object pooling in strategic places, though - most importantly, objects representing network packets are pooled and not garbage-collected. Still, even with pooling turned off, GC is not the biggest problem.&#xD;&#xA;&#xD;&#xA;As an example of how cool C# is, this is what we recently implemented. Our server runs several WCF services, that the game client uses for non-time-critical tasks, and we also use them for server administration. It turns out, it's very easy to make a WCF service to simply return our game objects to the caller. So we did just that, then made a little plugin to LINQPad that connects to our server - and now we can run queries like&#xD;&#xA;&#xD;&#xA;    from character in Service.GetOnlineCharacters()&#xD;&#xA;    where character.LocationManager.LocationId==5 &amp;&amp; character.Attributes.Level&lt;10&#xD;&#xA;    select new { character.Id, character.Nick }&#xD;&#xA;&#xD;&#xA;On a live server, no less! I don't think you can do this with any other platform. Not in couple day's work, at least." />
  <row Id="21154" PostHistoryTypeId="25" PostId="9654" RevisionGUID="67927f32-afe9-421d-b994-22b1f9cc31ed" CreationDate="2011-03-25T08:23:38.823" Comment="http://twitter.com/#!/StackGameDev/status/51197537478119424" />
  <row Id="21155" PostHistoryTypeId="5" PostId="10133" RevisionGUID="c50f2483-2480-4d2e-ae06-c912e14eb446" CreationDate="2011-03-25T09:20:52.173" UserId="3599" Comment="added 1 characters in body" Text="Cinema 4d [seems to support][1] FBX format. Even the cheapest C4D. You might be using a very old Cinema, thugh. Check if you can import FBX.&#xD;&#xA;&#xD;&#xA;FBX is a format that does support perfectly bones, weights, animation. So, all you need to do is get someone that opens in Max that *.max file you have, and export as FBX. Then you could import into your Cinema4D, and have it ready.&#xD;&#xA;&#xD;&#xA;This is not 100% safe path, in the sense that always there can be issues, that is, when importing an FBX file into any package. But it should work with some settings tweaking: FBX is a format thought for exchange.&#xD;&#xA;&#xD;&#xA;So, possible solutions (go with whichever bellow, but I'd go trying in the listed order...):&#xD;&#xA;&#xD;&#xA;- Ask the The3DStudio crew, which have fame to be eficient and serious, to export for you in FBX format (considering the initial corrupt *.3ds file problem, might be a kind detail...though dunno if is legally allowed by the file author) , is easy for them and would have use very little time unless appears some big issue.&#xD;&#xA;&#xD;&#xA;- Have one friend having a Max license open the max file and simply got to menu, export fbx (it comes by default, needs no plugin) &#xD;&#xA;&#xD;&#xA;- Have those guys from elance take care as well of the C4D import, so you might ensure no issues, if they know their stuff.&#xD;&#xA;&#xD;&#xA;Note: Sometimes is not enough to play with FBX i/o settings, and you need to try a pair of FBX versions, usually 5.x or 6.x. I don't know which is the current number. I tested to be safer to export in default Max FBX, the one that comes included, than installing as a plugin. Anyway, sometimes older versions work better with older packages.&#xD;&#xA;&#xD;&#xA;About the 60$ of the third option, I guess they charge that for in case some issue arises, as the actual thing is open, export, import. Just that there might be fixing involved. Sometimes really easy ones, other times can even make it impossible, depending on package versions, status of original file, etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.maxon.net/es/products/general-information/general-information/product-comparison.html" />
  <row Id="21156" PostHistoryTypeId="2" PostId="10167" RevisionGUID="b45dc790-5eee-4f67-9d5b-71a03d3c370a" CreationDate="2011-03-25T10:19:45.853" UserId="5705" Text="After almost a week of trying to set up red5 to start adding the multiplayer component to my game I finally got `NetConnection.Connect.Success` :) my flash client connected with the server.&#xD;&#xA;&#xD;&#xA;Red5 is supposed to be good but it has very poor documentation and poor and outdated tutorials. Most tutorials are no later than 2007. It makes life extremely hard for java newbies, since there are many complications that arise in the configuration files and the wars and Spring and beans and stuff. These are the best of the lot among tutorials and documentation that I could find. Hope this helps someone. &#xD;&#xA;&#xD;&#xA;http://dl.fancycode.com/red5/api/overview-summary.html&#xD;&#xA;&#xD;&#xA;http://www.actionscript.org/resources/articles/615/1/Getting-started-with-red5-server/Page1.html&#xD;&#xA;&#xD;&#xA;http://sunil-gupta.blogspot.com/2008/03/red5-offline-resources-download-pdfs.html&#xD;&#xA;&#xD;&#xA;http://www.technogumbo.com/tutorials/Red5-Media-Server-Development-Setup-Tutorial/Red5-Media-Server-Development-Setup-Tutorial.php&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/dominickaccattato&#xD;&#xA;&#xD;&#xA;http://www.red5guide.com/&#xD;&#xA;&#xD;&#xA;There are no books on Red5 and their own site has poor content that one might consider it a joke compared to the likes of Electroserver or SmarFox.(Book abt electroserver: http://www.amazon.com/ActionScript-Multiplayer-Games-Virtual-Worlds/dp/0321643364) But then its open source and we have to be understanding.&#xD;&#xA;&#xD;&#xA;If anyone has any more tutorials please do mention. I wonder how tough it would've been for someone who has actually deployed Red5 in production." />
  <row Id="21157" PostHistoryTypeId="1" PostId="10167" RevisionGUID="b45dc790-5eee-4f67-9d5b-71a03d3c370a" CreationDate="2011-03-25T10:19:45.853" UserId="5705" Text="Ordeal with Red5..." />
  <row Id="21158" PostHistoryTypeId="3" PostId="10167" RevisionGUID="b45dc790-5eee-4f67-9d5b-71a03d3c370a" CreationDate="2011-03-25T10:19:45.853" UserId="5705" Text="&lt;flash&gt;&lt;multiplayer&gt;" />
  <row Id="21159" PostHistoryTypeId="5" PostId="10167" RevisionGUID="ebd4dc13-4196-41c5-9713-789ad7850329" CreationDate="2011-03-25T10:30:10.757" UserId="5705" Comment="added 106 characters in body" Text="After almost a week of trying to set up red5 to start adding the multiplayer component to my game I finally got `NetConnection.Connect.Success` :) my flash client connected with the server.&#xD;&#xA;&#xD;&#xA;Red5 is supposed to be good but it has very poor documentation and poor and outdated tutorials. Most tutorials are no later than 2007. It makes life extremely hard for java newbies, since there are many complications that arise in the configuration files and the wars and Spring and beans and stuff. These are the best of the lot among tutorials and documentation that I could find. Hope this helps someone. &#xD;&#xA;&#xD;&#xA;http://dl.fancycode.com/red5/api/overview-summary.html&#xD;&#xA;&#xD;&#xA;http://www.actionscript.org/resources/articles/615/1/Getting-started-with-red5-server/Page1.html&#xD;&#xA;&#xD;&#xA;http://sunil-gupta.blogspot.com/2008/03/red5-offline-resources-download-pdfs.html&#xD;&#xA;&#xD;&#xA;http://www.technogumbo.com/tutorials/Red5-Media-Server-Development-Setup-Tutorial/Red5-Media-Server-Development-Setup-Tutorial.php&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/dominickaccattato&#xD;&#xA;&#xD;&#xA;http://www.red5guide.com/&#xD;&#xA;&#xD;&#xA;And don't forget to visit their updates page for bug fixes: http://code.google.com/p/red5/updates/list&#xD;&#xA;&#xD;&#xA;There are no books on Red5 and their own site has poor content that one might consider it a joke compared to the likes of Electroserver or SmarFox.(Book abt electroserver: http://www.amazon.com/ActionScript-Multiplayer-Games-Virtual-Worlds/dp/0321643364) But then its open source and we have to be understanding.&#xD;&#xA;&#xD;&#xA;If anyone has any more tutorials please do mention. I wonder how tough it would've been for someone who has actually deployed Red5 in production." />
  <row Id="21160" PostHistoryTypeId="2" PostId="10168" RevisionGUID="24246519-fd20-4084-becd-939adf32e675" CreationDate="2011-03-25T10:56:01.540" UserId="1199" Text="I have written a windows based game in XNA. I wish to release it for free but I would also like to monetize it in some way. What are my options? &#xD;&#xA;&#xD;&#xA;Possible ways:  &#xD;&#xA;---&#xD;&#xA;* Ads - what current libraries/services can I use?&#xD;&#xA;* Donations - PayPal, what else?&#xD;&#xA;* MicroTransactions - what current libraries/services can I use?" />
  <row Id="21161" PostHistoryTypeId="1" PostId="10168" RevisionGUID="24246519-fd20-4084-becd-939adf32e675" CreationDate="2011-03-25T10:56:01.540" UserId="1199" Text="How to monetize a free XNA game?" />
  <row Id="21162" PostHistoryTypeId="3" PostId="10168" RevisionGUID="24246519-fd20-4084-becd-939adf32e675" CreationDate="2011-03-25T10:56:01.540" UserId="1199" Text="&lt;xna&gt;&lt;monetization&gt;" />
  <row Id="21163" PostHistoryTypeId="2" PostId="10169" RevisionGUID="62b73ee0-298d-4064-a2b2-56f76480cd97" CreationDate="2011-03-25T11:17:36.543" UserId="6096" Text="I've used Torque products for years now I would defiantly recommend them. The company did go into administration but has come back to life recently with quite a few updates to the product lines. Definitely worth downloading the trial version and taking a look." />
  <row Id="21164" PostHistoryTypeId="25" PostId="10167" RevisionGUID="992278e3-0341-4f1c-827f-8870b49e2199" CreationDate="2011-03-25T11:23:38.667" Comment="http://twitter.com/#!/StackGameDev/status/51242835525115904" />
  <row Id="21165" PostHistoryTypeId="2" PostId="10170" RevisionGUID="687c1add-af6d-4302-aab0-9aa769f0a6f4" CreationDate="2011-03-25T11:30:08.927" UserId="5162" Text="I am developing a game in Java. 2D Fighter, Kind of like the 2d flash game Raze([http://armorgames.com/play/5395/raze][1]). I currently am using the Slick 2D game library and am researching how to structure my levels. I am currently stuck on the problem of the level format(e.g. file format). How do you structure a 2d level with collisions etc.?&#xD;&#xA;&#xD;&#xA;Level Notes: Will go up down left right&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**NOTE: New to gamedev**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://armorgames.com/play/5395/raze" />
  <row Id="21166" PostHistoryTypeId="1" PostId="10170" RevisionGUID="687c1add-af6d-4302-aab0-9aa769f0a6f4" CreationDate="2011-03-25T11:30:08.927" UserId="5162" Text="How do you structure a 2d level format with collisions etc. in Java(Slick 2d)?" />
  <row Id="21167" PostHistoryTypeId="3" PostId="10170" RevisionGUID="687c1add-af6d-4302-aab0-9aa769f0a6f4" CreationDate="2011-03-25T11:30:08.927" UserId="5162" Text="&lt;2d&gt;&lt;java&gt;&lt;level-design&gt;&lt;file-format&gt;&lt;slick&gt;" />
  <row Id="21168" PostHistoryTypeId="2" PostId="10171" RevisionGUID="97a28dc7-9182-4671-bdb4-ae22156c1622" CreationDate="2011-03-25T11:36:39.733" UserId="5810" Text="Recording the keyboard input might not be that useful in your case.&#xD;&#xA;You can however generate a spline with a timeline.&#xD;&#xA;You can even rewind time if your tricky with the forces that you need to apply&#xD;&#xA;" />
  <row Id="21169" PostHistoryTypeId="2" PostId="10172" RevisionGUID="bf35744b-181e-468b-a40e-cd83c2e63e7d" CreationDate="2011-03-25T12:17:17.653" UserId="5810" Text="You don't have to design your own characters as some characters already exists, you just have to find them, you can even substitute a character with boxes when your prototyping the gameplay until you find a partner.&#xD;&#xA;&#xD;&#xA;However Level Design is a different beast altogether even if they are just boxes it can make or break the gameplay and are intrinsically linked to the game design." />
  <row Id="21170" PostHistoryTypeId="5" PostId="10168" RevisionGUID="bfeda964-4381-4902-8aee-374a35fa8d40" CreationDate="2011-03-25T13:27:01.660" UserId="1199" Comment="added 8 characters in body" Text="I have written a windows based game in XNA. I wish to release it for free but I would also like to monetize it in some way. What are my options? &#xD;&#xA;&#xD;&#xA;Possible ways:  &#xD;&#xA;---&#xD;&#xA;* Ads - what current libraries/services are available?&#xD;&#xA;* Donations - PayPal, what else?&#xD;&#xA;* MicroTransactions - what current libraries/services are available?" />
  <row Id="21171" PostHistoryTypeId="2" PostId="10173" RevisionGUID="8a90dc64-4258-42c2-b574-ad059b52eb20" CreationDate="2011-03-25T13:38:45.243" UserId="382" Text="* Paid for extensions/add ons.&#xD;&#xA;&#xD;&#xA;I wouldn't necessarily buy these, but having these *might* be an option. It would depend on the game. You wouldn't want someone whose paid for an add on having a competitive advantage in an online game.&#xD;&#xA;&#xD;&#xA;* Licensing for other developers to write extensions/add ons.&#xD;&#xA;&#xD;&#xA;This would be a risky strategy though as if they didn't have a mechanism to recoup their outlay why would they develop anything for your game." />
  <row Id="21172" PostHistoryTypeId="2" PostId="10174" RevisionGUID="571cc41b-1d77-4dc4-a57a-6544da422418" CreationDate="2011-03-25T13:43:12.333" UserId="5810" Text="Are there any resources and documentation on how current MMOs handle the action and movement data from the compression to the handling on the client?&#xD;&#xA;Any resources for movement prediction algorithms?&#xD;&#xA;&#xD;&#xA;I'm especially interested in those that have wsad movement and focus on keeping latency low&#xD;&#xA;Also what is the packet rate and size for different types of MMOs(network wise)?&#xD;&#xA;&#xD;&#xA;Is there a way to scale the packet rate or outright disable some packets if the player can't reach or in the later case see them?" />
  <row Id="21173" PostHistoryTypeId="1" PostId="10174" RevisionGUID="571cc41b-1d77-4dc4-a57a-6544da422418" CreationDate="2011-03-25T13:43:12.333" UserId="5810" Text="MMO techniques, algorithms and resources for keeping bandwidth low?" />
  <row Id="21174" PostHistoryTypeId="3" PostId="10174" RevisionGUID="571cc41b-1d77-4dc4-a57a-6544da422418" CreationDate="2011-03-25T13:43:12.333" UserId="5810" Text="&lt;mmo&gt;&lt;network&gt;&lt;scalability&gt;" />
  <row Id="21175" PostHistoryTypeId="2" PostId="10175" RevisionGUID="d6d404a4-10fd-4fe3-8963-424194e45e1e" CreationDate="2011-03-25T04:28:54.147" UserDisplayName="justin" Text="I intend to develop a social game on flash like farmville. I have got a problem in event time handling though. &#xD;&#xA;For Example, if I breed a horse in game and I don't feed it every hour then its health points will decrease. If I log out of the game for 3 days, when I log in again the horse will be dead. I was thinking I would save the last time the user fed the horse in a database, then when the user logs in again I will compare the current time with the time stored in the database. &#xD;&#xA;&#xD;&#xA;The problem is, I think this is not an efficient way of doing it. Can anyone show me a more efficient way of doing that? &#xD;&#xA;&#xD;&#xA;I'd appreciate anyone who could show me a way." />
  <row Id="21176" PostHistoryTypeId="1" PostId="10175" RevisionGUID="d6d404a4-10fd-4fe3-8963-424194e45e1e" CreationDate="2011-03-25T04:28:54.147" UserDisplayName="justin" Text="How do I store and handle time in social game?" />
  <row Id="21177" PostHistoryTypeId="3" PostId="10175" RevisionGUID="d6d404a4-10fd-4fe3-8963-424194e45e1e" CreationDate="2011-03-25T04:28:54.147" UserDisplayName="justin" Text="&lt;flash&gt;" />
  <row Id="21178" PostHistoryTypeId="17" PostId="10175" RevisionGUID="b6220717-3587-4a68-b6d7-9a441ea3f69f" CreationDate="2011-03-25T13:47:50.227" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/61778/how-do-i-store-and-handle-time-in-social-game" Text="" />
  <row Id="21179" PostHistoryTypeId="2" PostId="10176" RevisionGUID="6040f8ff-8f64-485a-9aa0-840c78f70613" CreationDate="2011-03-25T13:50:26.513" UserId="5224" Text="On WP7 a lot of developers are having the best results by using ads in their games, just show an add on loading screens (that's not too intrusive)." />
  <row Id="21180" PostHistoryTypeId="2" PostId="10177" RevisionGUID="995de272-659a-4bdc-ab82-34803a4105e9" CreationDate="2011-03-25T13:56:20.657" UserId="5266" Text="I have used tilemaps .TMX files using cocos2d and objective c.&#xD;&#xA;&#xD;&#xA;How are tilemaps used in C? Are there libraries available or where is a good place to start for using tilemaps in C?&#xD;&#xA;&#xD;&#xA;I would like to create a tilemap using a tool. if this is supported by a library in C and then read each tiles layer.&#xD;&#xA;&#xD;&#xA;How is this done in C?" />
  <row Id="21181" PostHistoryTypeId="1" PostId="10177" RevisionGUID="995de272-659a-4bdc-ab82-34803a4105e9" CreationDate="2011-03-25T13:56:20.657" UserId="5266" Text="Using Tilemaps in C" />
  <row Id="21182" PostHistoryTypeId="3" PostId="10177" RevisionGUID="995de272-659a-4bdc-ab82-34803a4105e9" CreationDate="2011-03-25T13:56:20.657" UserId="5266" Text="&lt;tiles&gt;&lt;maps&gt;&lt;c&gt;" />
  <row Id="21183" PostHistoryTypeId="2" PostId="10178" RevisionGUID="7113b5db-2c3e-4468-bbeb-ddd47a2442ad" CreationDate="2011-03-25T14:13:15.777" UserId="5899" Text="I've used &quot;Tiled Map Editor&quot; http://www.mapeditor.org/ for a iPhone game with good results. Our engine was made in house, but Tiled has his own format file that you can parse easily or you can append a custom format.&#xD;&#xA;&#xD;&#xA;Tile supports layer, metaobjects to place the positions of objects in the game or anything else. It's multiplatform and free.&#xD;&#xA;&#xD;&#xA;You provide an image with all tiles. Each tile is represented by a number. When you draw the map in the editor, the output is a matrix with the numbers that represents the tiles, with this identifiers you can put the tiles in your game in the correct order.  " />
  <row Id="21184" PostHistoryTypeId="25" PostId="10177" RevisionGUID="61efc637-1295-4f5f-8e03-c96a78aa8156" CreationDate="2011-03-25T14:23:38.930" Comment="http://twitter.com/#!/StackGameDev/status/51288134629081089" />
  <row Id="21185" PostHistoryTypeId="2" PostId="10179" RevisionGUID="4bc14df9-e34d-493f-99cb-16fc4566e00b" CreationDate="2011-03-25T14:23:53.530" UserId="6102" Text="If I am understanding your question right, while the user is logged in and playing, time moves in normal, real-time fashion.  If that is the case, you could rely on a wrapped time source where you can manipulate the current reference point in time. &#xD;&#xA;&#xD;&#xA;I know your question specifically mentions Flash and my code example here is in Java, but I believe it should be easily adaptable for your needs:&#xD;&#xA;&#xD;&#xA;      public class TimeSource {&#xD;&#xA;        private static Long staticStart = System.currentTimeMillis();&#xD;&#xA;        private static Long fixPoint = System.currentTimeMillis();&#xD;&#xA;    &#xD;&#xA;        public static void setCurrentTimeMillis(Long currentTimeMillis) {&#xD;&#xA;            staticStart = System.currentTimeMillis();&#xD;&#xA;            fixPoint = currentTimeMillis;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        public static Long getCurrentTimeMillis() {&#xD;&#xA;            Long offset = System.currentTimeMillis() - staticStart;&#xD;&#xA;            return fixPoint + offset;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Basically when the application starts up, we initialize to the current time in millis.  However, if we set an alternate time as our &quot;current&quot; then the offset is calculated and used to generate the time whenever it is requested.  &#xD;&#xA;&#xD;&#xA;In the case of your game, you can set the current time to 0 when the game is very first initialized for a new user.  Then, time will proceed as normal during play.  When the user ends their session, you can store the current game time and restore that when the user logs in again.  &#xD;&#xA;&#xD;&#xA;Now all of your elapsed time logic can be based just on in-game time.&#xD;&#xA;" />
  <row Id="21186" PostHistoryTypeId="2" PostId="10180" RevisionGUID="86c25ef3-898a-4e6d-b2ab-f681b85d454f" CreationDate="2011-03-25T14:28:47.450" UserId="6310" Text="I have read whole tutorial section on sfml-dev.org and have some question.&#xD;&#xA;&#xD;&#xA;What are exactly views and how to use them ?&#xD;&#xA;&#xD;&#xA;Should I render things in views or in renderwindow ?" />
  <row Id="21187" PostHistoryTypeId="1" PostId="10180" RevisionGUID="86c25ef3-898a-4e6d-b2ab-f681b85d454f" CreationDate="2011-03-25T14:28:47.450" UserId="6310" Text="Theoretic question about rendering in sfml and in general" />
  <row Id="21188" PostHistoryTypeId="3" PostId="10180" RevisionGUID="86c25ef3-898a-4e6d-b2ab-f681b85d454f" CreationDate="2011-03-25T14:28:47.450" UserId="6310" Text="&lt;c++&gt;&lt;game-mechanics&gt;&lt;sfml&gt;" />
  <row Id="21189" PostHistoryTypeId="5" PostId="10151" RevisionGUID="4819dbdd-6027-4a99-afe8-a73d9d497d95" CreationDate="2011-03-25T14:29:37.140" UserId="5399" Comment="added 6 characters in body" Text="I know this was asked a while back but i've spent some time on this for my own project so in case anyone else wants to know here are the results of my experiments (assuming you are thinking of skinned characters):&#xD;&#xA;&#xD;&#xA;**On Licensing**  &#xD;&#xA;Daz is venturing (tentatively) into the 3d assest market and as such their new EULA does permit use of their models (&amp; derived) in computer games with a couple of restrictions:&#xD;&#xA;&#xD;&#xA;&gt; SUMMARY: &#xD;&#xA;&gt; &#xD;&#xA;&gt; Summary of section 5 – INCORPORATION&#xD;&#xA;&gt; OF 3D MODEL(S) INTO OTHER WORKS &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may use the 3D content/models or&#xD;&#xA;&gt; derivatives thereof when embedded in a&#xD;&#xA;&gt; single game or other project if you&#xD;&#xA;&gt; have purchased the “single-use”&#xD;&#xA;&gt; license. By purchasing the&#xD;&#xA;&gt; “multiple-use” license, you may use&#xD;&#xA;&gt; the content/models or derivatives&#xD;&#xA;&gt; thereof when embedded in the number of&#xD;&#xA;&gt; games or projects authorized by the&#xD;&#xA;&gt; multiple-use license. &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may publish, market, distribute,&#xD;&#xA;&gt; transfer or sell any games or projects&#xD;&#xA;&gt; that contain DAZ content/models as&#xD;&#xA;&gt; long as the DAZ content/models are not&#xD;&#xA;&gt; accessible to end users in their&#xD;&#xA;&gt; native formats and are protected by&#xD;&#xA;&gt; asset protection technology,&#xD;&#xA;&gt; encryption or whatever means necessary&#xD;&#xA;&gt; to protect them from theft or&#xD;&#xA;&gt; copyright infringement.&#xD;&#xA;&#xD;&#xA;([https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula][1])&#xD;&#xA;&#xD;&#xA;In regards to open source projects I am not sure (I emailed and haven't had a response yet).&#xD;&#xA;Bear in mind however that most of the content sold in Daz's store and in other marketplaces like Renderosity have their own licenses.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**File Formats**  &#xD;&#xA;Daz Studio is free and can import/export OBJ and COLLADA files as standard. Plugins can be purchased to export to CR2 (Poser Characters) and FBX.&#xD;&#xA;&#xD;&#xA;In my experience OBJ transports fine between 3DS Max &amp; Daz Studio but the associated MTL material files do not; I am not sure whether this is due to Daz or Max (probably a bit of both). The problems can be resolved easily with a text editor - but it is still another stage in your pipeline no matter how small.&#xD;&#xA;&#xD;&#xA;An important point to consider is rigging. As opposed to vertex weighting, Daz models consist of many distinct poly groups which correspond to bones. These groups deform with respect to a single bone based on spherical falloff zones defined for each axis of rotation.&#xD;&#xA;(I think this is used to maintain compatibility with Poser; certainly i've seen posts on their forums of people saying vertex weighting would be easier when creating clothing)&#xD;&#xA;&#xD;&#xA;The OBJ format does not support vertex weights, or skeletons (though I suppose you may be able to pack one in with something like empty poly groups, I doubt it would be pretty).&#xD;&#xA;&#xD;&#xA;Daz can convert these falloff zones to vertex weights when exporting to FBX and the results are pretty good - I'm sure a modeller could do better if they were working with vertex weighting natively but its unlikely you'll notice unless the limbs are at extremes.&#xD;&#xA;&#xD;&#xA;Poser CR2 files support the poly group rigging but are horrifically complex. Check out Kuroyume's CR2 spec (http://www.kuroyumes-developmentzone.com/poser/poserfilespec/products_poser_cr2.html) to see what I mean.  &#xD;&#xA;CR2 files make liberal use of external references so you will need to process OBJs in full to support CR2s. Further that spec is for an older format. The latest version (8 I believe) had about 5 new sections when I tried to import it using the CR2 importer I've been working on.&#xD;&#xA;&#xD;&#xA;I haven't seen any open source CR2 importers you could modify easily for your project - it looks as if usually people start on one then give up halfway through and writing one myself I can see why!   &#xD;&#xA;&#xD;&#xA;**Performance**  &#xD;&#xA;Daz models are very high poly but I dont think this is as much of an issue as people make out. Daz has 'Decimator', a plugin which can reduce the poly count, though I don't even use it on the Daz models I use in my XNA project as they render perfectly fast; the count is about ~130,000 polys for V4 (base female human model).&#xD;&#xA;&#xD;&#xA;Whats more of a concern is the textures.&#xD;&#xA;&#xD;&#xA;1. They are very large (esp. third party products), so you will need to resize them in the pipeline depending on your engine/api.&#xD;&#xA;&#xD;&#xA;2. They are numerous. (I'm talking 3 different textures for the EYE!)&#xD;&#xA;&#xD;&#xA;3. Most importantly the materials have all sorts of 'odd' configurations - things like bump and transparency maps with no diffuse map. Its not that they are hard to support, its that there are so many different combinations you either need a very comprehensive importer or very comprehensive shader set and model class.  &#xD;&#xA;My importer combines the trans and diffuse maps (creating if necessary), and adds vertex colour and normal data if missing - as a result I pack alot of 'white' structures into the resultant file but I only need 4 shaders.&#xD;&#xA;&#xD;&#xA;**Alpha Sorting**  &#xD;&#xA;Daz models (like probably most organic models) makes liberal use of transparency maps; further the nature of the models prohibits depth sorting before drawing.&#xD;&#xA;&#xD;&#xA;Let me pose a question: When you model an eye, do you surround the completed model eye with an extraneous sphere that has a solid diffuse colour (no map) but a transparency map that turns it invisible? So when the unsuspecting prospective game developer loads up the model the eyes appear black from the outside while from the inside are textured fine? Daz does. (Its to create the glossy wet sheen effect - turn the opacity setting of the material 7_EyeSurface down to 0 on the default V4 to see what I mean)&#xD;&#xA;&#xD;&#xA;I use 2-pass alpha sorting which is best for the 'cutout' transparency maps (which is what Daz models use it for mostly). This is built right into my model base class and engine from the start.&#xD;&#xA;&#xD;&#xA;**Customizing the character**  &#xD;&#xA;Clothes don't have to have a loose fit to deform properly once exported with bone weights, but beware that those ~90,000+ polys they are obscuring will still be there.&#xD;&#xA;&#xD;&#xA;**Animation**  &#xD;&#xA;FBX supports animation (in theory). Daz does have a keyframe animation editor but its a little 'light' and not easy to use. Daz also has plugins such as AniMate Lite which allow you to drag and drop animation segments into a timeline and then bake the keyframes into an animation to be exported.&#xD;&#xA;&#xD;&#xA;I've found extracting animations from FBX to be a little hit and miss, especically when baked from AniMate. For example, the walking animation 'block' will acctually move the model in model space so you couldn't simply pop that into the timeline, bake, export and then move your character around in time with it in an FPS.&#xD;&#xA;&#xD;&#xA;Further I've found that sometimes the exported animation causes the mesh, or a prop, to deform incorrectly; and since FBX files are accessed with an Autodesk SDK as opposed to with a custom importer like most formats its not trivial to look inside and see where the problem lies. (On the plus side I've worked out where the Dead Space developers got the ideas for all their monsters.)&#xD;&#xA;&#xD;&#xA;**To Summarise**  &#xD;&#xA;&#xD;&#xA; 1. If you want to use Daz models you&#xD;&#xA;    will need the FBX exporter because&#xD;&#xA;    OBJ is not comprehensive enough and&#xD;&#xA;    CR2s are too complex to import, and&#xD;&#xA;    even if you did your shader would&#xD;&#xA;    need to support a new type of&#xD;&#xA;    rigging*.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA; 2. Do not be concerned with poly counts&#xD;&#xA;    or texture sizes until you need to&#xD;&#xA;    be. Textures can be resized (and&#xD;&#xA;    also combined into one texture for&#xD;&#xA;    the whole character using Daz's&#xD;&#xA;    Texture Atlas) and Daz has plugins&#xD;&#xA;    for reducing poly counts IF you need&#xD;&#xA;    them.&#xD;&#xA;    &#xD;&#xA;   &#xD;&#xA; 3. Do be aware that the models will&#xD;&#xA;    have quirks that a game artist would&#xD;&#xA;    never dream of putting in - 3x&#xD;&#xA;    texture for 1x eye and 'specular&#xD;&#xA;    surface sphere' for example.&#xD;&#xA;&#xD;&#xA;I think Daz models are a super resource, esp. for hobbyist developers, but to be used seriously they would be best utilized _as_ a resource as opposed to a complete asset - design your characters, clothe them, _then_ cull unseen polys, bake and animate in the modeller of your choice. &#xD;&#xA;Also, while Studio itself is free, to create and equip characters to a resonable standard, and export them in useful formats, you will need ~£70-100 worth of content and plugins minimum.&#xD;&#xA;&#xD;&#xA;*Not saying that would be prohibitively hard though - maybe have say a single 'vertex distance' plugged in by the importer as opposed to four vertex weights, and set the falloff zones &amp; transform shader wide for each poly group (geometry segment).&#xD;&#xA;&#xD;&#xA;  [1]: https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula" />
  <row Id="21190" PostHistoryTypeId="2" PostId="10181" RevisionGUID="c0893d0f-1805-4f62-a480-3b44116e5048" CreationDate="2011-03-25T14:42:01.727" UserId="2469" Text="Views in SFML, like it says in the docs, are like 2D cameras. Essentially it represents what you would see through a camera and allows you to zoom in or out and to scroll in any direction easily. Doing this with a RenderWindow would mean that in order to zoom in, you would need move/scale every sprite. Same thing for scrolling, you would need to move every sprite on screen depending on the scroll direction.&#xD;&#xA;&#xD;&#xA;On the other hand I have used sfml once, to make a multiplayer 2D shooter. I didn't use views at all when doing all the rendering. Everything was drawn directly to the RenderWindow and I had no performance problems or anything else." />
  <row Id="21191" PostHistoryTypeId="2" PostId="10182" RevisionGUID="0591bbcd-43c7-4d0d-88d9-47d08b8556a2" CreationDate="2011-03-25T14:50:07.490" UserId="6067" Text="Anyone have experience Integrating sounds in Inferno using Wwise?" />
  <row Id="21192" PostHistoryTypeId="1" PostId="10182" RevisionGUID="0591bbcd-43c7-4d0d-88d9-47d08b8556a2" CreationDate="2011-03-25T14:50:07.490" UserId="6067" Text="Anyone have experience Integrating sounds in Inferno using Wwise?" />
  <row Id="21193" PostHistoryTypeId="3" PostId="10182" RevisionGUID="0591bbcd-43c7-4d0d-88d9-47d08b8556a2" CreationDate="2011-03-25T14:50:07.490" UserId="6067" Text="&lt;audio&gt;&lt;wwise&gt;" />
  <row Id="21194" PostHistoryTypeId="2" PostId="10183" RevisionGUID="d203d7c0-9036-4a64-a861-10a882bc7e62" CreationDate="2011-03-25T14:59:59.787" UserId="-1" Text="" />
  <row Id="21195" PostHistoryTypeId="2" PostId="10184" RevisionGUID="18aa1f8e-1cec-4818-a001-df7fbf4f17b8" CreationDate="2011-03-25T14:59:59.787" UserId="-1" Text="" />
  <row Id="21196" PostHistoryTypeId="2" PostId="10185" RevisionGUID="fb461494-16c5-43bd-bae6-77050171323d" CreationDate="2011-03-25T15:19:50.300" UserId="-1" Text="" />
  <row Id="21197" PostHistoryTypeId="2" PostId="10186" RevisionGUID="631816e4-ad53-4536-aa80-4b8e87a6b5ef" CreationDate="2011-03-25T15:19:50.300" UserId="-1" Text="" />
  <row Id="21198" PostHistoryTypeId="5" PostId="10186" RevisionGUID="59d9723a-2540-41eb-8c01-8e64aa1052ae" CreationDate="2011-03-25T15:32:05.500" UserId="3588" Comment="added 108 characters in body" Text="Methods used to map out a path of travel from one point to another, typically avoiding obstacles in the way." />
  <row Id="21199" PostHistoryTypeId="24" PostId="10186" RevisionGUID="59d9723a-2540-41eb-8c01-8e64aa1052ae" CreationDate="2011-03-25T15:32:05.500" Comment="Proposed by 3588 approved by 51 edit id of 102" />
  <row Id="21200" PostHistoryTypeId="5" PostId="10185" RevisionGUID="49a7b87a-f732-4b97-9b22-eb11fdc1f972" CreationDate="2011-03-25T15:32:17.840" UserId="3588" Comment="added 489 characters in body" Text="This is a specific subset of [tag:ai] which deals with how an entity determines the proper route from point A to point B.&#xD;&#xA;&#xD;&#xA;In its simplest essence, it is the ability of an NPC to realize that there is a door next to them, rather than just ram head-first into the wall when trying to reach the next room. Complexity is introduced by factoring in the different kinds of obstacles, and what factors (time, safety, impressiveness) that the entity uses to pick from multiple applicable paths." />
  <row Id="21201" PostHistoryTypeId="24" PostId="10185" RevisionGUID="49a7b87a-f732-4b97-9b22-eb11fdc1f972" CreationDate="2011-03-25T15:32:17.840" Comment="Proposed by 3588 approved by 51 edit id of 101" />
  <row Id="21202" PostHistoryTypeId="5" PostId="10184" RevisionGUID="2b9fb89c-677e-42cc-96a9-c82a82c70fa3" CreationDate="2011-03-25T15:32:22.787" UserId="3588" Comment="added 102 characters in body" Text="The determination of whether or not two or more entities make contact with each other during gameplay." />
  <row Id="21203" PostHistoryTypeId="24" PostId="10184" RevisionGUID="2b9fb89c-677e-42cc-96a9-c82a82c70fa3" CreationDate="2011-03-25T15:32:22.787" Comment="Proposed by 3588 approved by 51 edit id of 100" />
  <row Id="21204" PostHistoryTypeId="5" PostId="10183" RevisionGUID="f308ba47-3a91-4cc1-afb1-408d0cfe482a" CreationDate="2011-03-25T15:32:25.220" UserId="3588" Comment="added 346 characters in body" Text="Questions about how to implement collision detection or dealing with specific implementations and scenarios which complicate the process fall under the purview of this tag. &#xD;&#xA;&#xD;&#xA;This includes questions about methods to assist in developing a collision detection system, such as how to determine the points of shortest distance between two objects." />
  <row Id="21205" PostHistoryTypeId="24" PostId="10183" RevisionGUID="f308ba47-3a91-4cc1-afb1-408d0cfe482a" CreationDate="2011-03-25T15:32:25.220" Comment="Proposed by 3588 approved by 51 edit id of 99" />
  <row Id="21206" PostHistoryTypeId="5" PostId="10153" RevisionGUID="d65b03ac-88ad-4aff-af02-a022a71486a5" CreationDate="2011-03-25T15:32:53.877" UserId="51" Comment="added 4 characters in body" Text="For programming questions, consider the [tag:architecture] tag." />
  <row Id="21207" PostHistoryTypeId="2" PostId="10187" RevisionGUID="64ce769b-ea22-4e7a-9ee0-23d4baaa70dd" CreationDate="2011-03-25T15:39:40.647" UserId="1430" Text="Well, there's [this book][1] -- which is a bit old now, and I've never really read it, but it's from a reputable publisher. I also found [this one][2], which is newer, but I've never heard of before. Both claim to cover MMO (or at least online) game development issues; that said, client-side prediction is more or less the same regardless of the scale of your concurrent player base, and [Google has plenty of information about it][3].&#xD;&#xA;&#xD;&#xA;It's important to realize that from a practical perspective it's rather hard for an indie/hobby developer to put together a game that will be popular enough to even garner enough players [to achieve a theoretical peak concurrency high enough to be considered &quot;massive.&quot;][4] But the techniques can still be educational to research.&#xD;&#xA;&#xD;&#xA;There are two major classifications of things you can do: &#xD;&#xA;&#xD;&#xA;* Be aggressive about sending only the minimal amount of data to the minimal set of clients that need it.&#xD;&#xA;* Design a game that doesn't give players incentive to clump up too much, helping you keep the &quot;set of clients that need&quot; things small in general.&#xD;&#xA;&#xD;&#xA;The second one is really a game design and social manipulation problem -- it's especially tricky because multiplayer games are naturally social, that's part of their appeal, so you don't want to discourage clusters of players too much. On the other hand, a game where everybody in the world is spawn-camping the one guy who drops the best loot in the game is going to be hard to scale.&#xD;&#xA;&#xD;&#xA;For the first option you could consider doing tiered messaging -- there are some things about other players that are always important to know, such as positions. But other things, such as health, may not be as important for objects that the current player cannot see yet, so you gate what you send to that player based on the relative distance of all other entities in his vicinity -- this is essentially throttling the data you send, as you mentioned in the last bit of your question, as well as filtering it.&#xD;&#xA;&#xD;&#xA;Very large scale multiplayer architectures will also buffer reports that don't need to have immediate action taken on them. Character save messages sent to the server can be done in deltas, with full updates only at critical points, and these updates can be buffered up on a throttling server so that they are send to the server that actually holds the character data in a steady, periodic fashion -- as your player base scales, you have to worry about optimizing disk IO as well as network traffic. You don't want to cause your character database to thrash.&#xD;&#xA;&#xD;&#xA;The packet rate and size differs widely from game to game, just as it would for non-MMO games. It's really a very requirements-specific thing and there aren't generalized standards. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Massively-Multiplayer-Game-Development/dp/1584502436/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1301066208&amp;sr=8-3&#xD;&#xA;  [2]: http://www.amazon.com/Game-Development-Essentials-Online/dp/1418052671/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1301066208&amp;sr=8-1&#xD;&#xA;  [3]: http://www.google.com/search?q=client-side%20prediction&#xD;&#xA;  [4]: http://scientificninja.com/blog/m-is-for-massive" />
  <row Id="21208" PostHistoryTypeId="2" PostId="10188" RevisionGUID="41634676-2722-4e5f-aa69-72ba21237a0f" CreationDate="2011-03-25T15:55:13.420" UserId="-1" Text="" />
  <row Id="21209" PostHistoryTypeId="2" PostId="10189" RevisionGUID="700048fb-c45c-461c-b820-7dc4d7a290ec" CreationDate="2011-03-25T15:55:13.420" UserId="-1" Text="" />
  <row Id="21210" PostHistoryTypeId="5" PostId="10188" RevisionGUID="bcedf664-ed54-4ab5-a211-d61e7c008323" CreationDate="2011-03-25T16:14:57.147" UserId="3588" Comment="added 821 characters in body" Text="In most cases, a question about programming or code is a lot easier to answer if there is a specified language or provided code sample. This makes it easier for the answers to analyze particular issues that the question author will specifically run into, and provide answers that can be directly used. &#xD;&#xA;&#xD;&#xA;Sometimes, though, a question will be about algorithms in general, or when the question is more about the theory and design rather than the specific code constructs. This tag is appropriate for these scenarios where the language used is not as important as the fundamentals of design gotten from the answers.&#xD;&#xA;&#xD;&#xA;If the question is language-agnostic by virtue of not dealing at all with programming or coding, please do not use this tag and instead tag according to the domain that your question actually belongs to." />
  <row Id="21211" PostHistoryTypeId="24" PostId="10188" RevisionGUID="bcedf664-ed54-4ab5-a211-d61e7c008323" CreationDate="2011-03-25T16:14:57.147" Comment="Proposed by 3588 approved by 14 edit id of 103" />
  <row Id="21212" PostHistoryTypeId="5" PostId="10189" RevisionGUID="e90e6807-4a65-4199-81b5-7bde72f04540" CreationDate="2011-03-25T16:14:57.943" UserId="3588" Comment="added 161 characters in body" Text="For when the programming language used in the game's development is not important to the answer of the question, and that this fact is important to the question." />
  <row Id="21213" PostHistoryTypeId="24" PostId="10189" RevisionGUID="e90e6807-4a65-4199-81b5-7bde72f04540" CreationDate="2011-03-25T16:14:57.943" Comment="Proposed by 3588 approved by 14 edit id of 104" />
  <row Id="21214" PostHistoryTypeId="2" PostId="10190" RevisionGUID="bbc2e6c1-dbd0-4a3b-babc-fa83319b0a0b" CreationDate="2011-03-25T16:57:43.257" UserId="395" Text="In addition to the above answer, read up on TCP_NODELAY and how window scaling operates. Understanding the details of TCP (and yes, you want to use TCP not UDP unless the prospect of handling differential updates arriving out of order sounds fun to you) and retransmission is critical for latency control." />
  <row Id="21215" PostHistoryTypeId="2" PostId="10191" RevisionGUID="55ec7356-a7de-425d-b965-49ca21d4649b" CreationDate="2011-03-25T16:59:03.557" UserId="6314" Text="can anybody plz help me out in learning 2D game development using openGL in Dev c++ ??" />
  <row Id="21216" PostHistoryTypeId="1" PostId="10191" RevisionGUID="55ec7356-a7de-425d-b965-49ca21d4649b" CreationDate="2011-03-25T16:59:03.557" UserId="6314" Text="2d games development using opengl" />
  <row Id="21217" PostHistoryTypeId="3" PostId="10191" RevisionGUID="55ec7356-a7de-425d-b965-49ca21d4649b" CreationDate="2011-03-25T16:59:03.557" UserId="6314" Text="&lt;opengl&gt;" />
  <row Id="21218" PostHistoryTypeId="25" PostId="10174" RevisionGUID="1c837e8c-7505-4485-8094-46b75fb74b1e" CreationDate="2011-03-25T17:23:39.320" Comment="http://twitter.com/#!/StackGameDev/status/51333435024883712" />
  <row Id="21219" PostHistoryTypeId="2" PostId="10192" RevisionGUID="74dfb7db-a103-4bba-a3ee-e8bb6e9db475" CreationDate="2011-03-25T17:58:24.157" UserId="6316" Text="&lt;a href=&quot;http://nehe.gamedev.net&quot;&gt;NeHe&lt;/a&gt; and &lt;a href=&quot;http://www.lighthouse3d.com&quot;&gt;Lighthouse3d&lt;/a&gt; are great resources for getting started with OpenGL.  There are also loads of books out there on this topic.  Hopefully, these resources can get you up and running." />
  <row Id="21220" PostHistoryTypeId="2" PostId="10193" RevisionGUID="b741a177-747e-43f7-b6b4-3976eba2030a" CreationDate="2011-03-25T18:17:17.840" UserId="4777" Text="Using XNA it's pretty easier to loop through a sprite sheet, I tell it how many rows and how many columns it has and I have a method that loops through the whole set. &#xD;&#xA;&#xD;&#xA;I usually use this method in my sprite class, but I have a sprite sheet that has a odd number of sprites, and does not use the entire last line.  Any ideas on how to do this?&#xD;&#xA;&#xD;&#xA;for example: I have 3 rows of 6 columns, but on the last row I only have 3 sprites.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="21221" PostHistoryTypeId="1" PostId="10193" RevisionGUID="b741a177-747e-43f7-b6b4-3976eba2030a" CreationDate="2011-03-25T18:17:17.840" UserId="4777" Text="using odd number of sprites in multi-row spriteSheet?" />
  <row Id="21222" PostHistoryTypeId="3" PostId="10193" RevisionGUID="b741a177-747e-43f7-b6b4-3976eba2030a" CreationDate="2011-03-25T18:17:17.840" UserId="4777" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;spritesheet&gt;" />
  <row Id="21223" PostHistoryTypeId="2" PostId="10194" RevisionGUID="f9a4ddd2-a8c8-427e-8396-62cf6c5b7624" CreationDate="2011-03-25T18:57:27.997" UserId="6318" Text="Shawn Hargreaves outlines the two options for changing which effect is used when rendering a model on his blog at http://blogs.msdn.com/b/shawnhar/archive/2006/12/07/rendering-a-model-with-a-custom-effect.aspx. &#xD;&#xA;&#xD;&#xA;The first option is purely a run-time option: iterate over all of the model.MeshParts and directly modify the ModelMeshPart.Effect property to the new effect. I haven't tried this but I would expect it to work.&#xD;&#xA;&#xD;&#xA;The second, and more flexible option, is to use your own custom ModelProcessor to modify the effect that is compiled into each model. If you take this approach you can write your own Effect which has several techniques, each with different shaders, Switching shaders at run-time is then just a matter of changing which technique each effect in the model will use.&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;foreach (ModelMesh mesh in model.Meshes)&#xD;&#xA;{&#xD;&#xA;    foreach (Effect effect in mesh.Effects)&#xD;&#xA;    {&#xD;&#xA;        effect.CurrentTechnique = effect.Techniques[&quot;CreateShadowMap&quot;];&#xD;&#xA;        // Other stuff related to this specific effect is done here.&#xD;&#xA;    }&#xD;&#xA;    mesh.Draw();&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;foreach (ModelMesh mesh in model.Meshes)&#xD;&#xA;{&#xD;&#xA;    foreach (Effect effect in mesh.Effects)&#xD;&#xA;    {&#xD;&#xA;        effect.CurrentTechnique = effect.Techniques[&quot;DrawWithShadowMap&quot;];&#xD;&#xA;        // Other stuff related to this specific effect is done here.&#xD;&#xA;    }&#xD;&#xA;    mesh.Draw();&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="21224" PostHistoryTypeId="6" PostId="10165" RevisionGUID="ea96903a-b2e6-447c-aecb-5edefeb709b2" CreationDate="2011-03-25T19:20:00.577" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;models&gt;&lt;effects&gt;" />
  <row Id="21225" PostHistoryTypeId="2" PostId="10195" RevisionGUID="2adfbb5d-d33e-4e1e-8586-53a972836907" CreationDate="2011-03-25T19:20:27.433" UserId="1829" Text="I need to compute the &quot;gravity center&quot; of a mesh, some kind of barycenter, and then find the farest vertices to compute a bounding sphere.&#xD;&#xA;&#xD;&#xA;Here is what I have for the moment:&#xD;&#xA;&#xD;&#xA;	D3DXVECTOR3 result(0,0,0);&#xD;&#xA;	int num = mesh -&gt; GetNumVertices();&#xD;&#xA;	LPDIRECT3DVERTEXBUFFER9 vertexBuffer;&#xD;&#xA;	mesh -&gt; GetVertexBuffer((*vertexBuffer));&#xD;&#xA;	void* rawData;&#xD;&#xA;	vertexBuffer -&gt; Lock(0, mesh-&gt;GetNumBytesPerVertex() * mesh-&gt;GetNumVertices(), &amp;rawData, D3DLOCK_READONLY);&#xD;&#xA;	D3DVERTEXELEMENT9 decl;//[MAXD3DDECLLENGTH];&#xD;&#xA;	UINT numElements;&#xD;&#xA;	mesh -&gt; GetDeclaration();&#xD;&#xA;	mesh -&gt; GetFVF();&#xD;&#xA;&#xD;&#xA;Apparently I need to cast the rawdata pointer, but I don't know what to do next..." />
  <row Id="21226" PostHistoryTypeId="1" PostId="10195" RevisionGUID="2adfbb5d-d33e-4e1e-8586-53a972836907" CreationDate="2011-03-25T19:20:27.433" UserId="1829" Text="Loop through a loaded .x file's vertices" />
  <row Id="21227" PostHistoryTypeId="3" PostId="10195" RevisionGUID="2adfbb5d-d33e-4e1e-8586-53a972836907" CreationDate="2011-03-25T19:20:27.433" UserId="1829" Text="&lt;directx&gt;" />
  <row Id="21228" PostHistoryTypeId="2" PostId="10196" RevisionGUID="0a8d3d0c-ddab-4122-8258-81fafb08fae0" CreationDate="2011-03-25T19:24:10.463" UserId="51" Text="I haven't used XNA, but when I've used sprite sheets in the past, part of the meta data associated with that sprite sheet is the number of frames on it.  Usually if that number is '0' I just compute it to be the width * height, but if it's non-zero I use that and assume that the last sprites are blank.&#xD;&#xA;" />
  <row Id="21229" PostHistoryTypeId="10" PostId="10191" RevisionGUID="51d0b16a-b275-40e8-b7e5-94c97e956d43" CreationDate="2011-03-25T19:24:32.850" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="21230" PostHistoryTypeId="2" PostId="10197" RevisionGUID="3dbcaf13-a61a-4d7a-ae84-132a58d674df" CreationDate="2011-03-25T19:39:18.860" UserId="1430" Text="*Are you asking how to compute the &quot;center&quot; or how to get the points with which to do so? I'll assume -- and answer for -- the latter:*&#xD;&#xA;&#xD;&#xA;Once you have the buffer pointer itself, and information about the format of the vertices within and the number of vertices (it appears from your code snippet that you have all of this already), you use the format information to determine where the positional data is for each vertex.&#xD;&#xA;&#xD;&#xA;In general this involves iterating the elements of the vertex declaration, updating a byte offset until you reach the element representing the position. However in practice, the position is almost always at offset 0 from the start of a vertex so you may not need to be so pedantic.&#xD;&#xA;&#xD;&#xA;Once you have that offset, initialize a cursor pointer to (start of buffer + that offset) and read the next few bytes of data, which will be either XYZ or XYZW floating point values, depending on the format of your buffer. Then increment the cursor pointer by the number of bytes in each vertex (including stride, if it exists) to get to the positional data for the *next* vertex. Repeat until you've read all the positional data.&#xD;&#xA;&#xD;&#xA;You can save off all this positional data into a container (like a `std::vector`) and process it after the fact, or you can run your algorithm as you do the extraction, if appropriate." />
  <row Id="21231" PostHistoryTypeId="25" PostId="10195" RevisionGUID="851c0e37-fd6b-460e-a413-4fd16c0b2b41" CreationDate="2011-03-25T20:23:38.790" Comment="http://twitter.com/#!/StackGameDev/status/51378731436089344" />
  <row Id="21236" PostHistoryTypeId="2" PostId="10199" RevisionGUID="4736b6eb-ec7e-47c1-b6d7-561a60d0752e" CreationDate="2011-03-25T21:49:17.893" UserId="2469" Text="I'm trying to find a way of setting any kind of material class on any kind of primitive class (all the material classes have a base material class, same goes for the primitive classes).&#xD;&#xA;&#xD;&#xA;What I mean by that, is, I'm looking for a way to do something like this:&#xD;&#xA;&#xD;&#xA;    Cube a = Cube( ColorMaterial( COLOR_RED ) );&#xD;&#xA;    Cube b = Cube( TexturedMaterial( ambienTex, diffuseTex, specularTex ) );&#xD;&#xA;&#xD;&#xA;Ok, so that looks pretty easy, but I've got a few problems.&#xD;&#xA;First of all, inside my Cube class I've got a function in which I build the cube's geometry, as such:&#xD;&#xA;&#xD;&#xA;    VertexPositionColor vertices[36] =  { VertexPositionColor( pos, color ), ... }&#xD;&#xA;&#xD;&#xA;Because of this, I can't just pass any type of material to my primitive class, because that would mean that the function that builds the geometry would need to be able to change the type of vertex it uses.&#xD;&#xA;I can't use templates either, because, even though it would solve the type issue, different vertex types are not constructed the same way.&#xD;&#xA;&#xD;&#xA;So, is there any way of associating a material to a primitive in DX11 ? " />
  <row Id="21237" PostHistoryTypeId="1" PostId="10199" RevisionGUID="4736b6eb-ec7e-47c1-b6d7-561a60d0752e" CreationDate="2011-03-25T21:49:17.893" UserId="2469" Text="Associating materials and primitive" />
  <row Id="21238" PostHistoryTypeId="3" PostId="10199" RevisionGUID="4736b6eb-ec7e-47c1-b6d7-561a60d0752e" CreationDate="2011-03-25T21:49:17.893" UserId="2469" Text="&lt;c++&gt;&lt;architecture&gt;&lt;graphics-programming&gt;&lt;directx11&gt;" />
  <row Id="21239" PostHistoryTypeId="2" PostId="10200" RevisionGUID="9cb351cb-ee32-4e97-9759-f4a418892cd9" CreationDate="2011-03-25T21:50:15.580" UserId="-1" Text="" />
  <row Id="21240" PostHistoryTypeId="2" PostId="10201" RevisionGUID="d0fbb41d-7014-4cf8-bdbc-c37fb3eeb03e" CreationDate="2011-03-25T21:50:15.580" UserId="-1" Text="" />
  <row Id="21241" PostHistoryTypeId="5" PostId="10200" RevisionGUID="d3e7e80b-bf32-4d17-b2d3-6c91f448b9ac" CreationDate="2011-03-25T23:05:07.780" UserId="3588" Comment="added 681 characters in body" Text="Often synonymous with &quot;random generation&quot;, procedural generation is the usage of calculations and algorithms to create content, rather than referring to preset data. The typical reason is to generate content mid-gameplay, which makes for a more unpredictable and unique experience in multiple playthroughs. Common elements that are subject to procedural generation in games include item attributes, enemy abilities, and level layouts.&#xD;&#xA;&#xD;&#xA;Procedural generation specifically refers to the usage of algorithms to generate content, it is not necessary to be random. Pseudo-random generators with fixed seeds can be considered procedural generation despite producing identical results. " />
  <row Id="21242" PostHistoryTypeId="24" PostId="10200" RevisionGUID="d3e7e80b-bf32-4d17-b2d3-6c91f448b9ac" CreationDate="2011-03-25T23:05:07.780" Comment="Proposed by 3588 approved by 14 edit id of 105" />
  <row Id="21243" PostHistoryTypeId="5" PostId="10201" RevisionGUID="018607b2-efe4-49cd-94b3-0c375d7eef05" CreationDate="2011-03-25T23:05:10.040" UserId="3588" Comment="added 128 characters in body" Text="The algorithmic generation of content in the middle of gameplay, as oppose to the manual placement of preset content and assets." />
  <row Id="21244" PostHistoryTypeId="24" PostId="10201" RevisionGUID="018607b2-efe4-49cd-94b3-0c375d7eef05" CreationDate="2011-03-25T23:05:10.040" Comment="Proposed by 3588 approved by 14 edit id of 106" />
  <row Id="21245" PostHistoryTypeId="2" PostId="10202" RevisionGUID="5a01eb78-f17c-45f4-91f5-73a8b7ed62a6" CreationDate="2011-03-25T23:11:14.640" UserId="5677" Text="First of all, I've only been writing my own game logic for a short while, so I apologize if this might seem straight forward. &#xD;&#xA;&#xD;&#xA;I've been reading a lot about quad trees and grid based collision detection. I understand the logic - basically don't check for collision unless objects are near basically. But it never is mentioned how the actually execute this. &#xD;&#xA;&#xD;&#xA;I have a couple of possibile methods in my head but am not sure which is best&#xD;&#xA;&#xD;&#xA;**General collision test - no optimisation**&#xD;&#xA;&#xD;&#xA;    for(var i:int = 0; i &lt; objects.length; i++){&#xD;&#xA;			//find object A&#xD;&#xA;			var objectA = objects[i];&#xD;&#xA;			&#xD;&#xA;			for(var j:int = i + 1; j &lt; objects.length; j++){&#xD;&#xA;				//find object B&#xD;&#xA;				var objectB = objects[j];&#xD;&#xA;				&#xD;&#xA;				if(objectA.collidesWith(objectB){&#xD;&#xA;				   &#xD;&#xA;				   //handle collision logic&#xD;&#xA;				  }&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;**Check neighbours**&#xD;&#xA;But what if we want to optimise the collisions to only check objects that are near. Do we still run through all the objects, or do we create an array with near objects to check through?&#xD;&#xA;&#xD;&#xA;Method1:&#xD;&#xA;&#xD;&#xA;    var objects:Array = new Array();&#xD;&#xA;		var neighbours:Array = new Array();&#xD;&#xA;&#xD;&#xA;		for(var i:int = 0; i &lt; objects.length; i++){&#xD;&#xA;			//find object A&#xD;&#xA;			var objectA = objects[i];&#xD;&#xA;			&#xD;&#xA;			for(var j:int = i + 1; j &lt; objects.length; j++){&#xD;&#xA;				//find object B&#xD;&#xA;				var objectB = objects[j];&#xD;&#xA;				&#xD;&#xA;				if(objectA.isNear(objectB){&#xD;&#xA;				   &#xD;&#xA;				   neighbours.push(objectA, objectB);&#xD;&#xA;				  }&#xD;&#xA;			}&#xD;&#xA;				&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		//somewhere else&#xD;&#xA;		for(i:int = 0; i &lt; neighbours.length; i++){&#xD;&#xA;			//only check neighbours&#xD;&#xA;			&#xD;&#xA;			for(j:int = i + 1; j &lt; neighbours.length; j++){&#xD;&#xA;				&#xD;&#xA;				if(objectA.collidesWith(objectB){&#xD;&#xA;				   &#xD;&#xA;				   //handle collision logic&#xD;&#xA;				  }&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;The other possibillity is that we still loop through everything but check if the objects are near before testing the collision.&#xD;&#xA;&#xD;&#xA;Method2:&#xD;&#xA;&#xD;&#xA;    for(var i:int = 0; i &lt; objects.length; i++){&#xD;&#xA;			//find object A&#xD;&#xA;			var objectA = objects[i];&#xD;&#xA;			&#xD;&#xA;			for(var j:int = i + 1; j &lt; objects.length; j++){&#xD;&#xA;				//find object B&#xD;&#xA;				var objectB = objects[j];&#xD;&#xA;				&#xD;&#xA;				if(objectA.isNear(objectB){&#xD;&#xA;				   //they are near - check collision!&#xD;&#xA;				   if(objectA.collidesWith(objectB){&#xD;&#xA;				   &#xD;&#xA;				   //handle collision logic&#xD;&#xA;				  }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;				&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I always try to look at the real world as an example. If I wanted to compare items with the same colour it would seem illogical to check every entire item even if they don't match colour (Method 2, check each item).&#xD;&#xA;I would probably collect the items with the same colour (objects that are near each other) and check those (method 1), instead of checking everything.&#xD;&#xA;&#xD;&#xA;This isn't an appropiate comparison since the items in collision checking are constantly moving so the order gets mixed up. That whats confusing me.&#xD;&#xA;&#xD;&#xA;***Would it be more efficient to check each item, thus removing the strain of keep generating an array of neighbours.***&#xD;&#xA;&#xD;&#xA;***Or is it more efficient to find neighbours thus not having to loop through so many objects to check the collision?***&#xD;&#xA;&#xD;&#xA;I've been thinking of a tower defense game where the tower needs to detect objects if objects are in range before it shoots at it. And it just seems silly to check all items while at some times there won't be any objects near at all.&#xD;&#xA;&#xD;&#xA;I apologize for the long post, always having trouble explaining myself!" />
  <row Id="21246" PostHistoryTypeId="1" PostId="10202" RevisionGUID="5a01eb78-f17c-45f4-91f5-73a8b7ed62a6" CreationDate="2011-03-25T23:11:14.640" UserId="5677" Text="Quad trees/grid based collision - putting logic into action" />
  <row Id="21247" PostHistoryTypeId="3" PostId="10202" RevisionGUID="5a01eb78-f17c-45f4-91f5-73a8b7ed62a6" CreationDate="2011-03-25T23:11:14.640" UserId="5677" Text="&lt;collision-detection&gt;&lt;efficiency&gt;" />
  <row Id="21248" PostHistoryTypeId="25" PostId="10202" RevisionGUID="68e7571f-0f3e-4e74-9886-e8011b62752c" CreationDate="2011-03-25T23:23:38.980" Comment="http://twitter.com/#!/StackGameDev/status/51424030200307712" />
  <row Id="21249" PostHistoryTypeId="2" PostId="10203" RevisionGUID="476d5638-1b23-4237-9500-53864f362e43" CreationDate="2011-03-25T23:30:14.320" UserId="-1" Text="" />
  <row Id="21250" PostHistoryTypeId="2" PostId="10204" RevisionGUID="ea1c2968-060a-49a3-bb6f-afd2b48f8055" CreationDate="2011-03-25T23:30:14.320" UserId="-1" Text="" />
  <row Id="21251" PostHistoryTypeId="5" PostId="10202" RevisionGUID="4e3b42f8-301b-4d20-85ff-0ce5cb23c776" CreationDate="2011-03-25T23:33:37.587" UserId="5677" Comment="added 805 characters in body" Text="First of all, I've only been writing my own game logic for a short while, so I apologize if this might seem straight forward. &#xD;&#xA;&#xD;&#xA;I've been reading a lot about quad trees and grid based collision detection. I understand the logic - basically don't check for collision unless objects are near basically. But it never is mentioned how the actually execute this. &#xD;&#xA;&#xD;&#xA;I have a couple of possibile methods in my head but am not sure which is best&#xD;&#xA;&#xD;&#xA;**General collision test - no optimisation**&#xD;&#xA;&#xD;&#xA;    for(var i:int = 0; i &lt; objects.length; i++){&#xD;&#xA;			//find object A&#xD;&#xA;			var objectA = objects[i];&#xD;&#xA;			&#xD;&#xA;			for(var j:int = i + 1; j &lt; objects.length; j++){&#xD;&#xA;				//find object B&#xD;&#xA;				var objectB = objects[j];&#xD;&#xA;				&#xD;&#xA;				if(objectA.collidesWith(objectB){&#xD;&#xA;				   &#xD;&#xA;				   //handle collision logic&#xD;&#xA;				  }&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;**store neighbours (method 1)**&#xD;&#xA;But what if we want to optimise the collisions to only check objects that are near. Do we still run through all the objects, or do we create an array with near objects to check through?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var objects:Array = new Array();&#xD;&#xA;		var neighbours:Array = new Array();&#xD;&#xA;&#xD;&#xA;		for(var i:int = 0; i &lt; objects.length; i++){&#xD;&#xA;			//find object A&#xD;&#xA;			var objectA = objects[i];&#xD;&#xA;			&#xD;&#xA;			for(var j:int = i + 1; j &lt; objects.length; j++){&#xD;&#xA;				//find object B&#xD;&#xA;				var objectB = objects[j];&#xD;&#xA;				&#xD;&#xA;				if(objectA.isNear(objectB){&#xD;&#xA;				   &#xD;&#xA;				   neighbours.push(objectA, objectB);&#xD;&#xA;				  }&#xD;&#xA;			}&#xD;&#xA;				&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		//somewhere else&#xD;&#xA;		for(i:int = 0; i &lt; neighbours.length; i++){&#xD;&#xA;			//only check neighbours&#xD;&#xA;			&#xD;&#xA;			for(j:int = i + 1; j &lt; neighbours.length; j++){&#xD;&#xA;				&#xD;&#xA;				if(objectA.collidesWith(objectB){&#xD;&#xA;				   &#xD;&#xA;				   //handle collision logic&#xD;&#xA;				  }&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;**loop all objects but only check neighbours for collision (method 3)**&#xD;&#xA;The other possibillity is that we still loop through everything but check if the objects are near before testing the collision.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    for(var i:int = 0; i &lt; objects.length; i++){&#xD;&#xA;			//find object A&#xD;&#xA;			var objectA = objects[i];&#xD;&#xA;			&#xD;&#xA;			for(var j:int = i + 1; j &lt; objects.length; j++){&#xD;&#xA;				//find object B&#xD;&#xA;				var objectB = objects[j];&#xD;&#xA;				&#xD;&#xA;				if(objectA.isNear(objectB){&#xD;&#xA;				   //they are near - check collision!&#xD;&#xA;				   if(objectA.collidesWith(objectB){&#xD;&#xA;				   &#xD;&#xA;				   //handle collision logic&#xD;&#xA;				  }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;				&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;**Store objects in tile data (method 3)**&#xD;&#xA;Using a tile based sytem allow for another option; Store the objects that are on a specific tile in the tile data itself. Check to see on which tile the object is the surrounding tiles contain any objects it could collide with:&#xD;&#xA;&#xD;&#xA;    var ObjectA;&#xD;&#xA;    &#xD;&#xA;    for(var i:int = 0; i &lt; 4; i ++){&#xD;&#xA;    //check 4 surrounding tiles from object A&#xD;&#xA;    &#xD;&#xA;       if(Object.currentTile + surroundingTile[i] CONTAINS collidable object){&#xD;&#xA;       //check collision!&#xD;&#xA;        if(objectA.collidesWith(surroundingTile.object){&#xD;&#xA;    				   &#xD;&#xA;    	//handle collision logic&#xD;&#xA;    	 }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I always try to look at the real world as an example. If I wanted to compare items with the same colour it would seem illogical to check every entire item even if they don't match colour (Method 2, check each item).&#xD;&#xA;I would probably collect the items with the same colour (objects that are near each other) and check those (method 1), instead of checking everything.&#xD;&#xA;&#xD;&#xA;This isn't an appropiate comparison since the items in collision checking are constantly moving so the order gets mixed up. That whats confusing me.&#xD;&#xA;&#xD;&#xA;***Would it be more efficient to check each item, thus removing the strain of keep generating an array of neighbours.***&#xD;&#xA;&#xD;&#xA;***Or is it more efficient to find neighbours thus not having to loop through so many objects to check the collision?***&#xD;&#xA;&#xD;&#xA;***Keep changing the data on each tile seems very intensive aswell, so i'm not sure if that a good idea..***&#xD;&#xA;&#xD;&#xA;I've been thinking of a tower defense game where the tower needs to detect objects if objects are in range before it shoots at it. And it just seems silly to check all items while at some times there won't be any objects near at all.&#xD;&#xA;&#xD;&#xA;I apologize for the long post, always having trouble explaining myself!&#xD;&#xA;" />
  <row Id="21252" PostHistoryTypeId="2" PostId="10205" RevisionGUID="74015db1-d27a-4b85-b33a-ee61780cc17d" CreationDate="2011-03-25T23:36:32.773" UserId="-1" Text="" />
  <row Id="21253" PostHistoryTypeId="2" PostId="10206" RevisionGUID="afa99f65-1424-47e2-89c9-7891baaeb7b7" CreationDate="2011-03-25T23:36:32.773" UserId="-1" Text="" />
  <row Id="21254" PostHistoryTypeId="2" PostId="10207" RevisionGUID="6318526a-bfe3-4a37-872b-62bc2d6902e5" CreationDate="2011-03-25T23:57:47.657" UserId="6321" Text="Lets say that you want to rotate simple cube around fixed point in center.&#xD;&#xA;&#xD;&#xA;Is it possible to use such coordinate system, that you need to use only sine and cosine in order to rotate?&#xD;&#xA;&#xD;&#xA;I have done some 3d stuff in VHDL, but i screwed whith coordinate system and is not working correct. I need to make rotation that works in at least two axes." />
  <row Id="21255" PostHistoryTypeId="1" PostId="10207" RevisionGUID="6318526a-bfe3-4a37-872b-62bc2d6902e5" CreationDate="2011-03-25T23:57:47.657" UserId="6321" Text="Rotating coordinate system" />
  <row Id="21256" PostHistoryTypeId="3" PostId="10207" RevisionGUID="6318526a-bfe3-4a37-872b-62bc2d6902e5" CreationDate="2011-03-25T23:57:47.657" UserId="6321" Text="&lt;3d&gt;&lt;coordinates&gt;&lt;geometry&gt;&lt;rotation&gt;" />
  <row Id="21257" PostHistoryTypeId="2" PostId="10208" RevisionGUID="f1f602ed-b2d6-49e6-a2de-caefc47d3078" CreationDate="2011-03-26T00:25:32.050" UserId="4443" Text="Hope this helps, but order of operations are important when rotating. You will want to move the object's rotation point to the origin coordinates, rotate it around as many axises as you want, then translate it back into place. That way it will be rotated around that point (its center for example) instead of its position around the origin of the coordinates you are within.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="21258" PostHistoryTypeId="2" PostId="10209" RevisionGUID="5469851b-ca65-4b9e-89df-b6d87a05f682" CreationDate="2011-03-26T00:49:47.230" UserId="6302" Text="I don't know of a book, but [Vocaloid][1] music is becoming very popular right now.  You add in lyrics and melody and it can synthesize a singer.  This is how it's possible:&#xD;&#xA;&gt;  It uses synthesizing technology with specially recorded vocals of voice actors or singers.&#xD;&#xA;&#xD;&#xA;Pure synthesis of a voice may not be a reality yet, but reassembling recorded sounds with manipulation is a possibility.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Vocaloid" />
  <row Id="21259" PostHistoryTypeId="5" PostId="10206" RevisionGUID="e69d1749-31d6-4c59-aaec-a486d87ae66c" CreationDate="2011-03-26T02:18:09.173" UserId="450" Comment="added 125 characters in body" Text="HTML 5 refers to new web technologies such as high performance JavaScript engines, canvas 2D and WebGL, video and audio tags." />
  <row Id="21260" PostHistoryTypeId="24" PostId="10206" RevisionGUID="e69d1749-31d6-4c59-aaec-a486d87ae66c" CreationDate="2011-03-26T02:18:09.173" Comment="Proposed by 450 approved by 51 edit id of 109" />
  <row Id="21261" PostHistoryTypeId="5" PostId="10204" RevisionGUID="0fdfeeb6-c788-4fbd-a2fa-e9135cbf8f7f" CreationDate="2011-03-26T02:18:12.090" UserId="450" Comment="added 32 characters in body" Text="Massive Multiplayer Online game." />
  <row Id="21262" PostHistoryTypeId="24" PostId="10204" RevisionGUID="0fdfeeb6-c788-4fbd-a2fa-e9135cbf8f7f" CreationDate="2011-03-26T02:18:12.090" Comment="Proposed by 450 approved by 51 edit id of 107" />
  <row Id="21263" PostHistoryTypeId="5" PostId="10203" RevisionGUID="1af147ec-3cdc-4eef-828b-f6367a7677eb" CreationDate="2011-03-26T02:18:14.710" UserId="450" Comment="added 207 characters in body" Text="Massive Multiplayer Online games are games that allow hundreds or thousands of people to play together over the Internet. The most common form of MMOs are online role playing games such as World of Warcraft." />
  <row Id="21264" PostHistoryTypeId="24" PostId="10203" RevisionGUID="1af147ec-3cdc-4eef-828b-f6367a7677eb" CreationDate="2011-03-26T02:18:14.710" Comment="Proposed by 450 approved by 51 edit id of 108" />
  <row Id="21265" PostHistoryTypeId="25" PostId="10207" RevisionGUID="d5c84a1a-e61c-47c1-b0ee-9bbd2c73431e" CreationDate="2011-03-26T02:23:39.403" Comment="http://twitter.com/#!/StackGameDev/status/51469330835193856" />
  <row Id="21266" PostHistoryTypeId="2" PostId="10210" RevisionGUID="c62cef8b-106e-490b-a954-4ebc14d0a94b" CreationDate="2011-03-26T03:58:28.963" UserId="1430" Text="The first problem I see here is that you have a &quot;cube&quot; class. You really shouldn't -- within the domain of a rendering system, what about a cube is different from a sphere, in terms of type or interface? Since rendering interfaces should not be responsible for non-rendering task (such as collision, et cetera) then the answer is really that there's *nothing* different.&#xD;&#xA;&#xD;&#xA;On the whole, the only difference between a cube and a sphere is the data (the actual vertex elements), which can be abstracted. Instead of `Cube`, you should have a `Geometry` class. This class would contains two important pieces of data:&#xD;&#xA;&#xD;&#xA;* A list (more accurately, an array or vector) of vertices.&#xD;&#xA;* Information describing the format of an individual vertex.&#xD;&#xA;&#xD;&#xA;The vertex format can be as simple or complex as you need -- you can simply decide to pre-define a set of vertex formats your game will use ({position, color}; {position, color, normal, texture coordinates}; et cetera) and represent the format as enumerated type. At the other end of the spectrum you can implement a free-form `VertexFormat` object that allows specification of arbitrary vertex element semantics at arbitrary byte offsets within a vertex. &#xD;&#xA;&#xD;&#xA;The actual vertex data should be represented as an `unsigned char*` and you can cast to an appropriate vertex format structure if needed, based on the vertex format enumeration. This allows you to store any shape/mesh in any vertex format without having to create subclasses -- having to create those subclasses is actually a design and maintainability problem. &#xD;&#xA;&#xD;&#xA;Once you have this in place, it should be pretty straightforward to then add a `Material*` to the `Geometry` class. If you give the `Material` class a vertex format as well, you can even enforce correct bindings between materials and geometry: you can raise errors when you try to assign a material whose shader requires {position, color, normal} to a geometry object that only has {position, color} for example.&#xD;&#xA;&#xD;&#xA;This also allows you to externalize data definitions and thus make your APIs more data-driven. You can now construct `Geometry` objects with arbitrary collections of vertices. In terms of that API you can then implement another interface ([it should be separate from `Geometry`][1]) that loads vertex lists from a data file format of your choice, or an interface that generates a list of vertices that form a cube, or sphere, or whatever other procedural primitive you'd like, with whatever vertex properties you desire.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.objectmentor.com/resources/articles/srp.pdf" />
  <row Id="21267" PostHistoryTypeId="6" PostId="10199" RevisionGUID="16622bcb-6040-4ef3-937f-4884602cdb44" CreationDate="2011-03-26T03:58:50.007" UserId="1430" Comment="remove references to DX11 (and tags) since it's not really relevant" Text="&lt;architecture&gt;&lt;graphics-programming&gt;" />
  <row Id="21268" PostHistoryTypeId="5" PostId="10199" RevisionGUID="16622bcb-6040-4ef3-937f-4884602cdb44" CreationDate="2011-03-26T03:58:50.007" UserId="1430" Comment="remove references to DX11 (and tags) since it's not really relevant" Text="I'm trying to find a way of setting any kind of material class on any kind of primitive class (all the material classes have a base material class, same goes for the primitive classes).&#xD;&#xA;&#xD;&#xA;What I mean by that, is, I'm looking for a way to do something like this:&#xD;&#xA;&#xD;&#xA;    Cube a = Cube( ColorMaterial( COLOR_RED ) );&#xD;&#xA;    Cube b = Cube( TexturedMaterial( ambienTex, diffuseTex, specularTex ) );&#xD;&#xA;&#xD;&#xA;Ok, so that looks pretty easy, but I've got a few problems.&#xD;&#xA;First of all, inside my Cube class I've got a function in which I build the cube's geometry, as such:&#xD;&#xA;&#xD;&#xA;    VertexPositionColor vertices[36] =  { VertexPositionColor( pos, color ), ... }&#xD;&#xA;&#xD;&#xA;Because of this, I can't just pass any type of material to my primitive class, because that would mean that the function that builds the geometry would need to be able to change the type of vertex it uses.&#xD;&#xA;I can't use templates either, because, even though it would solve the type issue, different vertex types are not constructed the same way.&#xD;&#xA;&#xD;&#xA;So, is there any way of associating a material to a primitive? " />
  <row Id="21269" PostHistoryTypeId="2" PostId="10211" RevisionGUID="2aaf8ec0-ecd4-4a02-82a2-6b98d80fda34" CreationDate="2011-03-26T04:03:45.743" UserId="288" Text="You're telling it how many rows and columns it has. Simply also tell it how many sprites it has on it. Therefore allowing you to skip over the final sprites as you loop.&#xD;&#xA;&#xD;&#xA;(I assume you know how to index rows and columns with `\` and `%`? If not then this will tell you.)&#xD;&#xA;&#xD;&#xA;So for something like this:&#xD;&#xA;&#xD;&#xA;    const int rowCount = 3;&#xD;&#xA;    const int columnCount = 6;&#xD;&#xA;    for(int i = 0; i &lt; rowCount * columnCount; ++i)&#xD;&#xA;    {&#xD;&#xA;        int row = i / columnCount;&#xD;&#xA;        int column = i % columnCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Simply change it to something like this:&#xD;&#xA;&#xD;&#xA;    const int rowCount = 3;&#xD;&#xA;    const int columnCount = 6;&#xD;&#xA;    const int spriteCount = 15;&#xD;&#xA;    for(int i = 0; i &lt; spriteCount; ++i)&#xD;&#xA;    {&#xD;&#xA;        int row = i / columnCount;&#xD;&#xA;        int column = i % columnCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(And then, obviously, you're generating rectangles like this)&#xD;&#xA;&#xD;&#xA;    Rectangle sourceRectangle = new Rectangle(column * width, row * height, width, height);" />
  <row Id="21270" PostHistoryTypeId="5" PostId="10211" RevisionGUID="94a8e444-2434-445b-a62e-a1d5c4fc63b7" CreationDate="2011-03-26T04:10:41.743" UserId="288" Comment="added 91 characters in body; edited body" Text="You're telling it how many rows and columns it has. Simply also tell it how many sprites it has on it. Therefore allowing you to skip over the final sprites as you loop.&#xD;&#xA;&#xD;&#xA;(I assume you know how to index rows and columns with `/` and `%`? If not then this will tell you.)&#xD;&#xA;&#xD;&#xA;So for something like this:&#xD;&#xA;&#xD;&#xA;    const int rowCount = 3;&#xD;&#xA;    const int columnCount = 6;&#xD;&#xA;    for(int i = 0; i &lt; rowCount * columnCount; ++i)&#xD;&#xA;    {&#xD;&#xA;        int row = i / columnCount;&#xD;&#xA;        int column = i % columnCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Simply change it to something like this:&#xD;&#xA;&#xD;&#xA;    const int rowCount = 3;&#xD;&#xA;    const int columnCount = 6;&#xD;&#xA;    const int spriteCount = 15;&#xD;&#xA;    for(int i = 0; i &lt; spriteCount; ++i)&#xD;&#xA;    {&#xD;&#xA;        int row = i / columnCount;&#xD;&#xA;        int column = i % columnCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(And then, obviously, you're generating rectangles like this)&#xD;&#xA;&#xD;&#xA;    int width = texture.Width / columnCount;&#xD;&#xA;    int height = texture.Height / rowCount;&#xD;&#xA;    Rectangle sourceRectangle = new Rectangle(column * width, row * height, width, height);" />
  <row Id="21271" PostHistoryTypeId="2" PostId="10212" RevisionGUID="99b08f4a-f175-4561-aac9-a9dda0bc1465" CreationDate="2011-03-26T04:13:35.360" UserId="4779" Text="If I develop a game that is essentially pretty much Pokemon (you're a trainer, you catch &quot;monsters&quot; and put them to fight and level up etc), and I do the next things:&#xD;&#xA;&#xD;&#xA; - I'm a trainer with a 6-&quot;Monsters&quot; party.&#xD;&#xA; - Mechanics like the PC, Gym Leaders and &quot;tall grass&quot; will be used.&#xD;&#xA; - I will throw an &quot;ball&quot; to catch the weakened &quot;monster&quot;.&#xD;&#xA; - I will use common item names, like &quot;potion&quot;, &quot;high potion&quot;.&#xD;&#xA; - The battles are almost the same as Pokemon in terms of mechanics (four moves, elements, critical, evasion etc)&#xD;&#xA; - I will NOT use Pokemon names nor graphics... artwork is mine.&#xD;&#xA; - Some of the attack names will match Pokemon attack names. I think it is okay, like &quot;ember&quot;. Come on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With all these points, I shouldn't run into copyright issues or anything right? Even if the game feels a lot like Pokemon itself?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21272" PostHistoryTypeId="1" PostId="10212" RevisionGUID="99b08f4a-f175-4561-aac9-a9dda0bc1465" CreationDate="2011-03-26T04:13:35.360" UserId="4779" Text="Copyright: Pokemon question." />
  <row Id="21273" PostHistoryTypeId="3" PostId="10212" RevisionGUID="99b08f4a-f175-4561-aac9-a9dda0bc1465" CreationDate="2011-03-26T04:13:35.360" UserId="4779" Text="&lt;copyright&gt;" />
  <row Id="21274" PostHistoryTypeId="2" PostId="10213" RevisionGUID="4718de9e-c454-4184-9173-ae336e528f35" CreationDate="2011-03-26T04:18:30.943" UserId="395" Text="This is probably close enough that you should consult a lawyer, not ask on a forum like this. Copyright only covers tangible works for the most part, but that doesn't mean this isn't a trademark or other IP issue. Really if you are having doubts, that usually means you have crossed a line already." />
  <row Id="21275" PostHistoryTypeId="2" PostId="10214" RevisionGUID="7aedd143-5c92-486b-9f4a-b02a80ceb9e9" CreationDate="2011-03-26T05:03:53.040" UserId="323" Text="First, I am not a lawyer, this is not legal advice, if you follow my advice and get sued then it's your fault not mine.&#xD;&#xA;&#xD;&#xA;That said, you've talked about &quot;copyright issues&quot;. I'm going to break this down into two questions:&#xD;&#xA;&#xD;&#xA;1) If I get sued for copyright infringement, will I win?&#xD;&#xA;&#xD;&#xA;Probably! Game mechanics can't be copyrighted, so you're safe there. If &quot;potion&quot; isn't officially in the public domain then it's only one court case away from being so. &quot;Ember&quot; should be reasonably easy to defend - I know that ability name is used elsewhere. The &quot;ball&quot; is probably the sketchiest thing you've got, and if you just change the ball you're probably gold.&#xD;&#xA;&#xD;&#xA;2) Will I get sued?&#xD;&#xA;&#xD;&#xA;Maybe.&#xD;&#xA;&#xD;&#xA;Unless you have a nice big legal war chest to rely on, getting sued is almost as bad as losing. You can't hope to match Nintendo's legal funds. It will not happen. You'll go to court, and you'll probably blow thousands of dollars *just on prep work*. And then even, if you win, there's no way you're getting that money back without a second court case - more money, and you're not even guaranteed to win that one.&#xD;&#xA;&#xD;&#xA;So, as I see it, you have two realistic approaches ahead of you.&#xD;&#xA;&#xD;&#xA;First, you can change things up enough so it's not as sketchy. Give your game a feeling of its own, not one copied from Pokemon. Don't use &quot;gym trainer&quot; and &quot;tall grass&quot;, invent stuff. Instead of four abilities, use six. Give your PC a seven-monster party, and do something new with the monsters. Throw out two thirds of the Pokemon elements and make your own. (You're probably safe with &quot;fire&quot;, but if you have &quot;psychic&quot;, &quot;bug&quot;, &quot;rock&quot;, and &quot;ghost&quot;, people will look at you a bit odd.) &quot;Inspired by Pokemon&quot; is safe. &quot;Exact copy of Pokemon&quot; isn't safe.&#xD;&#xA;&#xD;&#xA;Alternatively: get legal counsel, get legal insurance, *and* form an official company to get at least a slight hint of the corporate veil going on. It'll cost you money, but it'll be a lot cheaper than being sued into oblivion by Nintendo, who will probably cheerfully drop the suit the instant you sign over all your intellectual property to them, and not a moment before.&#xD;&#xA;&#xD;&#xA;Again, not a lawyer, not legal advice, get a lawyer." />
  <row Id="21276" PostHistoryTypeId="25" PostId="10212" RevisionGUID="08e1c889-d51c-4c17-9ca6-101863c66910" CreationDate="2011-03-26T05:23:38.763" Comment="http://twitter.com/#!/StackGameDev/status/51514626793410560" />
  <row Id="21277" PostHistoryTypeId="2" PostId="10215" RevisionGUID="498151a0-6aeb-45ec-b3c3-908d3f23187f" CreationDate="2011-03-26T06:41:01.553" UserId="2933" Text="Basically I'm trying to export a model in fbx format through the XNA content processor and I'm finding that the model itself is getting modified and being shifted slightly to the right and being scaled down a bit too. I am certain the FBX file being exported by 3D Studio Max is properly alligned at the center and of a larger scale.&#xD;&#xA;&#xD;&#xA;If I export an FBX file with more than one mesh in it the exporter seems to work fine, so not sure what's up with that either..." />
  <row Id="21278" PostHistoryTypeId="1" PostId="10215" RevisionGUID="498151a0-6aeb-45ec-b3c3-908d3f23187f" CreationDate="2011-03-26T06:41:01.553" UserId="2933" Text="Does XNAs content pipeline dos omething horrible to my FBX files?" />
  <row Id="21279" PostHistoryTypeId="3" PostId="10215" RevisionGUID="498151a0-6aeb-45ec-b3c3-908d3f23187f" CreationDate="2011-03-26T06:41:01.553" UserId="2933" Text="&lt;xna&gt;" />
  <row Id="21280" PostHistoryTypeId="25" PostId="10215" RevisionGUID="bd90305d-7259-4967-bbb0-96b6ded7d15f" CreationDate="2011-03-26T08:23:38.903" Comment="http://twitter.com/#!/StackGameDev/status/51559925507297280" />
  <row Id="21281" PostHistoryTypeId="2" PostId="10216" RevisionGUID="bba306b9-d569-495b-8751-f04a9ec92c7d" CreationDate="2011-03-26T09:23:18.583" UserId="2188" Text="Why bother?&#xD;&#xA;&#xD;&#xA;It's pointless to clone a game widespread such as that one: doing so you automatically give away any change of success for your game!&#xD;&#xA;&#xD;&#xA;You risk getting sued to build something that will be worthless anyway? Why, lol, that's nonsense!&#xD;&#xA;&#xD;&#xA;You'd better focus on actually creating something original instead." />
  <row Id="21282" PostHistoryTypeId="2" PostId="10217" RevisionGUID="a0c10faf-7564-48d2-aea3-703984ef3ec1" CreationDate="2011-03-26T09:27:23.043" UserId="5459" Text="Can you give me hint to any good SkyBox example in OpenGL ES 2.0? I have found only OpenGL and does not work for me.&#xD;&#xA;I am doing it this way:&#xD;&#xA;Initialization:&#xD;&#xA;&#xD;&#xA;    glUseProgram(m_programSkyBox.Program);&#xD;&#xA;    glGenBuffers(1, &amp;skyBoxVertexBuffer);&#xD;&#xA;	glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    float vertices[24] = {	&#xD;&#xA;		-1.0, -1.0,  1.0,&#xD;&#xA;        1.0, -1.0,  1.0,&#xD;&#xA;        -1.0,  1.0,  1.0,&#xD;&#xA;        1.0,  1.0,  1.0,&#xD;&#xA;        -1.0, -1.0, -1.0,&#xD;&#xA;        1.0, -1.0, -1.0,&#xD;&#xA;        -1.0,  1.0, -1.0,&#xD;&#xA;        1.0,  1.0, -1.0,&#xD;&#xA;	};&#xD;&#xA;    &#xD;&#xA;	glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);&#xD;&#xA;    &#xD;&#xA;    glGenBuffers(1, &amp;skyBoxIndexBuffer);&#xD;&#xA;	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};&#xD;&#xA;	glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW);&#xD;&#xA;Drawing the skybox:&#xD;&#xA;&#xD;&#xA;    glClearColor(0.5f, 0.5f, 0.5f, 1);&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;    glUseProgram(m_programSkyBox.Program);&#xD;&#xA;    &#xD;&#xA;    glDisable(GL_DEPTH_TEST);	// skybox should be drawn behind anything else&#xD;&#xA;    glBindTexture(GL_TEXTURE_CUBE_MAP, m_textures.Cubemap);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;	glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer);&#xD;&#xA;    glVertexAttribPointer(m_programSkyBox.Attributes.Position, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);&#xD;&#xA;    glEnableVertexAttribArray(m_programSkyBox.Attributes.Position);&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, 0);&#xD;&#xA;    &#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer);&#xD;&#xA;	glDrawElements(GL_TRIANGLE_STRIP, 14, GL_UNSIGNED_BYTE, 0);&#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);&#xD;&#xA;	glEnable(GL_DEPTH_TEST);&#xD;&#xA;Texture loading is working. Shader is correctly compiled and looks like this:&#xD;&#xA;Vertex shader:&#xD;&#xA;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec3 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;       texCoord.xyz = position.xyz;&#xD;&#xA;    }&#xD;&#xA;Fragment shader:&#xD;&#xA;&#xD;&#xA;    uniform samplerCube Sampler;&#xD;&#xA;     &#xD;&#xA;    varying mediump vec3 texCoord;&#xD;&#xA;                                                    &#xD;&#xA;     void main() {&#xD;&#xA;         mediump vec3 cube = vec3(textureCube(Sampler, texCoord.xyz));&#xD;&#xA;         gl_FragColor = vec4(cube, 1.0);&#xD;&#xA;     }&#xD;&#xA;But I cant get cube visible. Am I doing anything wrong?&#xD;&#xA;Thank you" />
  <row Id="21283" PostHistoryTypeId="1" PostId="10217" RevisionGUID="a0c10faf-7564-48d2-aea3-703984ef3ec1" CreationDate="2011-03-26T09:27:23.043" UserId="5459" Text="HOWTO create OpenGL ES 2.0 SkyBox?" />
  <row Id="21284" PostHistoryTypeId="3" PostId="10217" RevisionGUID="a0c10faf-7564-48d2-aea3-703984ef3ec1" CreationDate="2011-03-26T09:27:23.043" UserId="5459" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;textures&gt;&lt;shaders&gt;&lt;cubemap&gt;" />
  <row Id="21285" PostHistoryTypeId="4" PostId="10215" RevisionGUID="34cc0b68-4adc-4b8d-9aff-91f8112342ac" CreationDate="2011-03-26T09:34:53.643" UserId="962" Comment="edited title; edited title" Text="Does XNA's content pipeline alter my FBX files?" />
  <row Id="21286" PostHistoryTypeId="25" PostId="10217" RevisionGUID="3ed3949c-149c-4231-9e7e-edeb3c036fc2" CreationDate="2011-03-26T11:23:39.807" Comment="http://twitter.com/#!/StackGameDev/status/51605227996065792" />
  <row Id="21287" PostHistoryTypeId="5" PostId="10215" RevisionGUID="fe17aae3-c38a-49b5-add7-e81f0d40005a" CreationDate="2011-03-26T11:41:05.753" UserId="2933" Comment="added 241 characters in body" Text="Basically I'm trying to export a model in fbx format through the XNA content processor and I'm finding that the model itself is getting modified and being shifted slightly to the right and being scaled down a bit too. I am certain the FBX file being exported by 3D Studio Max is properly alligned at the center and of a larger scale.&#xD;&#xA;&#xD;&#xA;If I export an FBX file with more than one mesh in it the exporter seems to work fine, so not sure what's up with that either...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Just found that no matter what rotation/orientation I give a model XNAs content exporter seems to reset it to an identity matrix. i.e. I create a long box and give it an angle of 20degrees, XNA resets it to 0 degrees when I draw it..." />
  <row Id="21288" PostHistoryTypeId="6" PostId="10212" RevisionGUID="36997d08-30bb-4198-82cb-493a0f4e9285" CreationDate="2011-03-26T11:50:04.653" UserId="450" Comment="edited tags" Text="&lt;legal&gt;&lt;copyright&gt;" />
  <row Id="21289" PostHistoryTypeId="5" PostId="10215" RevisionGUID="51e0a2e5-e693-4560-aee4-42e216296552" CreationDate="2011-03-26T12:19:02.210" UserId="2933" Comment="added 555 characters in body" Text="Basically I'm trying to export a model in fbx format through the XNA content processor and I'm finding that the model itself is getting modified and being shifted slightly to the right and being scaled down a bit too. I am certain the FBX file being exported by 3D Studio Max is properly alligned at the center and of a larger scale.&#xD;&#xA;&#xD;&#xA;If I export an FBX file with more than one mesh in it the exporter seems to work fine, so not sure what's up with that either...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Just found that no matter what rotation/orientation I give a model XNAs content exporter seems to reset it to an identity matrix. i.e. I create a long box and give it an angle of 20degrees, XNA resets it to 0 degrees when I draw it...&#xD;&#xA;&#xD;&#xA;THis is as it appears in 3D StudioMax: http://i.stack.imgur.com/e0oW4.png&#xD;&#xA;&#xD;&#xA;This is how it appears in XNA: http://i.stack.imgur.com/1vOcx.png&#xD;&#xA;&#xD;&#xA;Both are being viewed from the same angle and direction but varying distances.&#xD;&#xA;&#xD;&#xA;Now what is really odd is if I create another mesh in max, say a box, and export that (along with the original model), it works fine: http://i.stack.imgur.com/SIDg9.png&#xD;&#xA;&#xD;&#xA;So long as there is more than one mesh in the fbx model it draws fine, if there is less its orientation which I applied to it in 3D studio max is removed when I draw it." />
  <row Id="21290" PostHistoryTypeId="2" PostId="10218" RevisionGUID="09108570-f9a1-44e5-bca8-49961fb43934" CreationDate="2011-03-26T12:40:44.857" UserId="1923" Text="I haven't had this problem with max &amp; FBX. Are you sure your camera position is equivalent?&#xD;&#xA;&#xD;&#xA;Are you still using the transforms even though you only have one mesh? (I'm talking about the myModel.CopyAbsoluteTransformsTo(). And using those transforms in the effect.World property.) Often people will skip this if there is only one mesh but if you do skip it, it can produce a problem like what you are experiencing.&#xD;&#xA;&#xD;&#xA;Scale is tricky to get right. It is a combo of setting units properly in max &amp; the exporter. I often simply open the imported FBX in my favorite editor (usually in VS after importing to the project) and scrolling down to the bottom where is sets 'GlobalScaleFactor' and manually setting it there." />
  <row Id="21291" PostHistoryTypeId="5" PostId="10215" RevisionGUID="c3bd2688-052c-41e0-a2eb-d418b75692a4" CreationDate="2011-03-26T12:42:17.773" UserId="2933" Comment="added 960 characters in body" Text="Basically I'm trying to export a model in fbx format through the XNA content processor and I'm finding that the model itself is getting modified and being shifted slightly to the right and being scaled down a bit too. I am certain the FBX file being exported by 3D Studio Max is properly alligned at the center and of a larger scale.&#xD;&#xA;&#xD;&#xA;If I export an FBX file with more than one mesh in it the exporter seems to work fine, so not sure what's up with that either...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Just found that no matter what rotation/orientation I give a model XNAs content exporter seems to reset it to an identity matrix. i.e. I create a long box and give it an angle of 20degrees, XNA resets it to 0 degrees when I draw it...&#xD;&#xA;&#xD;&#xA;THis is as it appears in 3D StudioMax: http://i.stack.imgur.com/e0oW4.png&#xD;&#xA;&#xD;&#xA;This is how it appears in XNA: http://i.stack.imgur.com/1vOcx.png&#xD;&#xA;&#xD;&#xA;Both are being viewed from the same angle and direction but varying distances.&#xD;&#xA;&#xD;&#xA;Now what is really odd is if I create another mesh in max, say a box, and export that (along with the original model), it works fine: http://i.stack.imgur.com/SIDg9.png&#xD;&#xA;&#xD;&#xA;So long as there is more than one mesh in the fbx model it draws fine, if there is less its orientation which I applied to it in 3D studio max is removed when I draw it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's my code for drwaing the mesh:&#xD;&#xA;&#xD;&#xA;&gt; model.CopyAbsoluteBoneTransformsTo(boneTransforms);&#xD;&#xA;&gt; foreach (ModelMesh mesh in&#xD;&#xA;&gt; model.Meshes) { foreach (BasicEffect&#xD;&#xA;&gt; effect in mesh.Effects) { effect.World&#xD;&#xA;&gt; = boneTransforms[mesh.ParentBone.Index];&#xD;&#xA;&gt; Vector3 cameraPosition =&#xD;&#xA;&gt; Camera.Get.Position;// new Vector3(0,&#xD;&#xA;&gt; 0, 0); //cameraPosition.X =&#xD;&#xA;&gt; -Camera.Get.PosX; //cameraPosition.Y = Camera.Get.PosY; effect.View =&#xD;&#xA;&gt; Camera.Get.View;//&#xD;&#xA;&gt; Matrix.CreateLookAt(cameraPosition,&#xD;&#xA;&gt; cameraPosition + Camera.Get.LookDir,&#xD;&#xA;&gt; Camera.Get.Up);&#xD;&#xA;&gt; &#xD;&#xA;&gt; effect.Projection =&#xD;&#xA;&gt; Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,&#xD;&#xA;&gt; BaseGame.Get.GraphicsDevice.Viewport.AspectRatio,&#xD;&#xA;&gt; 0.01f, 1000000); //Matrix.CreateOrthographic(800 / 1,&#xD;&#xA;&gt; 480 / 1, 0, 1000000);&#xD;&#xA;&gt; &#xD;&#xA;&gt; //effect.TextureEnabled = true;&#xD;&#xA;&gt; effect.LightingEnabled = true;&#xD;&#xA;&gt; effect.PreferPerPixelLighting = true;&#xD;&#xA;&gt; //effect.SpecularColor = new&#xD;&#xA;&gt; Vector3(1, 0, 0); }&#xD;&#xA;&gt; &#xD;&#xA;&gt; mesh.Draw(); }" />
  <row Id="21292" PostHistoryTypeId="5" PostId="10218" RevisionGUID="0957c772-d63d-4488-8f17-efafca0da576" CreationDate="2011-03-26T12:47:54.497" UserId="1923" Comment="added 2 characters in body" Text="I haven't had this problem with max &amp; FBX. Are you sure your camera positions are equivalent?&#xD;&#xA;&#xD;&#xA;Are you still using the transforms even though you only have one mesh? (I'm talking about the myModel.CopyAbsoluteTransformsTo(). And using those transforms in the effect.World property.) Often people will skip this if there is only one mesh but if you do skip it, it can produce a problem like what you are experiencing.&#xD;&#xA;&#xD;&#xA;Scale is tricky to get right. It is a combo of setting units properly in max &amp; the exporter. I often simply open the imported FBX in my favorite editor (usually in VS after importing to the project) and scrolling down to the bottom where is sets 'GlobalScaleFactor' and manually setting it there." />
  <row Id="21297" PostHistoryTypeId="2" PostId="10220" RevisionGUID="ecb5df77-92d4-41e2-9c2b-5f62c41594c6" CreationDate="2011-03-26T14:20:45.083" UserId="5810" Text="Cube 2 is an engine similar to quake engines that is under zlib&#xD;&#xA;(soon CubeCreate will be released with lua scripting based on Cube2)&#xD;&#xA;&#xD;&#xA;There is also the more general Panda3d, Ardor3D, jMonkeyEngine.&#xD;&#xA;As well as a handful of 2d engines you can use without a problem&#xD;&#xA;&#xD;&#xA;However there is nothing close yet to Unity, UDK or Source yet" />
  <row Id="21298" PostHistoryTypeId="25" PostId="10193" RevisionGUID="b76da60a-33a0-4050-afe7-4683b28ac50e" CreationDate="2011-03-26T14:23:39.683" Comment="http://twitter.com/#!/StackGameDev/status/51650526034665472" />
  <row Id="21299" PostHistoryTypeId="2" PostId="10221" RevisionGUID="9eb05566-970e-4b16-8fbf-caec39d1fa1c" CreationDate="2011-03-26T14:38:24.913" UserId="5810" Text=" - [Enet](http://enet.bespin.org/) For your networking needs&#xD;&#xA; - [ODE](http://opende.sourceforge.net/wiki/index.php/Main_Page) For physical needs&#xD;&#xA; - [Cartwheel3d](http://code.google.com/p/cartwheel-3d/) Physics animation...&#xD;&#xA; - [Animation system](http://www.ogre3d.org/forums/viewtopic.php?t=45260) Ogre3d based animation blending framework" />
  <row Id="21300" PostHistoryTypeId="2" PostId="10222" RevisionGUID="76a4b0cf-c7c0-42b0-bb62-a270c14cdef0" CreationDate="2011-03-26T14:46:54.843" UserId="6331" Text="I haven't seen many books on Cocos2d, so I'm curious about the statement that there are &quot;quite a few&quot;. Please share your list.&#xD;&#xA;&#xD;&#xA;The book &quot;Learn iPhone and iPad cocos2d Game Development&quot; is available on Safari Books Online, if you happen to be a member, but I don't recommend it. As previously said, the book is easy to read and includes the author's best practices. On the downside, the writing style is perhaps too casual, the book is already dated with respect to the current version of cocos2d and it's I found it difficult to apply supplied code directly into my projects. I've been more successful using the tutorials on the Cocos2d website than with the book. The book also glosses over some topics, such as sound.&#xD;&#xA;&#xD;&#xA;But since there are so few books on Cocos2d and there are at least two recommendations for this book, I suggest you try out the book in combination with tutorials on the product websites (Cocos2d, SneakyInput, etc), googling for specific information and of course asking questions here on Game Development - Stack Exchange. The book will give you a good idea on how things are supposed to work and you can use the web as a supplement.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21301" PostHistoryTypeId="2" PostId="10223" RevisionGUID="ded15baf-5beb-491b-bbd9-059f8068d406" CreationDate="2011-03-26T15:11:47.817" UserId="5810" Text="To understand what you can sell you first need to understand what your game consist of and&#xD;&#xA;it breaks down to the game engine, client/server engine, art assets, rule/value/balance assets.&#xD;&#xA;&#xD;&#xA;So if you want to open source the game and still sell something you have to chose from the above one or more to keep. &#xD;&#xA;&#xD;&#xA;Additionally you can also sell the &quot;service&quot; whether it is access in multiplayer games or in game items and so on.&#xD;&#xA;&#xD;&#xA;You can also go the donation way based on the promise that you will keep evolving the game." />
  <row Id="21302" PostHistoryTypeId="2" PostId="10224" RevisionGUID="486760c7-5b76-4a26-8c8e-a61cbcd573bb" CreationDate="2011-03-26T15:18:27.000" UserId="5824" Text="Your main priority should be assuming the client talking to your server isn't your flash code, but a program written specifically to try and break the server. [Fuzzing][1] is a common technique to try and find this sort of issue.&#xD;&#xA;&#xD;&#xA;There's also the possibility of a client that instead of trying to break the server it will try to let a real player cheat or automate gameplay completely. This is significantly more complicated to detect and prevent.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Fuzz_testing" />
  <row Id="21303" PostHistoryTypeId="2" PostId="10225" RevisionGUID="1c899c85-e17c-470e-b359-f79c8910399c" CreationDate="2011-03-26T15:29:19.800" UserId="5810" Text="http://wtactics.org/ Has nice card art assets already" />
  <row Id="21304" PostHistoryTypeId="5" PostId="10215" RevisionGUID="f5a02dc2-89e0-43c7-aa5f-eeaca4d7f64a" CreationDate="2011-03-26T16:42:45.750" UserId="2778" Comment="Edited code sample to bring it from a blockquote to a real code sample." Text="Basically I'm trying to export a model in fbx format through the XNA content processor and I'm finding that the model itself is getting modified and being shifted slightly to the right and being scaled down a bit too. I am certain the FBX file being exported by 3D Studio Max is properly alligned at the center and of a larger scale.&#xD;&#xA;&#xD;&#xA;If I export an FBX file with more than one mesh in it the exporter seems to work fine, so not sure what's up with that either...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Just found that no matter what rotation/orientation I give a model XNAs content exporter seems to reset it to an identity matrix. i.e. I create a long box and give it an angle of 20degrees, XNA resets it to 0 degrees when I draw it...&#xD;&#xA;&#xD;&#xA;THis is as it appears in 3D StudioMax: http://i.stack.imgur.com/e0oW4.png&#xD;&#xA;&#xD;&#xA;This is how it appears in XNA: http://i.stack.imgur.com/1vOcx.png&#xD;&#xA;&#xD;&#xA;Both are being viewed from the same angle and direction but varying distances.&#xD;&#xA;&#xD;&#xA;Now what is really odd is if I create another mesh in max, say a box, and export that (along with the original model), it works fine: http://i.stack.imgur.com/SIDg9.png&#xD;&#xA;&#xD;&#xA;So long as there is more than one mesh in the fbx model it draws fine, if there is less its orientation which I applied to it in 3D studio max is removed when I draw it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's my code for drwaing the mesh:&#xD;&#xA;&#xD;&#xA;    model.CopyAbsoluteBoneTransformsTo(boneTransforms);&#xD;&#xA;    foreach (ModelMesh mesh in model.Meshes) { &#xD;&#xA;        foreach (BasicEffect effect in mesh.Effects) { &#xD;&#xA;            effect.World = boneTransforms[mesh.ParentBone.Index];&#xD;&#xA;            Vector3 cameraPosition = Camera.Get.Position; // new Vector3(0, 0, 0);     &#xD;&#xA;            //cameraPosition.X = -Camera.Get.PosX; &#xD;&#xA;            //cameraPosition.Y = Camera.Get.PosY; &#xD;&#xA;            effect.View = Camera.Get.View;&#xD;&#xA;            // Matrix.CreateLookAt(cameraPosition, cameraPosition + Camera.Get.LookDir,&#xD;&#xA;    Camera.Get.Up);&#xD;&#xA;    &#xD;&#xA;            effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4&#xD;&#xA;                , BaseGame.Get.GraphicsDevice.Viewport.AspectRatio&#xD;&#xA;                , 0.01f, 1000000); &#xD;&#xA;            //Matrix.CreateOrthographic(800 / 1, 480 / 1, 0, 1000000);&#xD;&#xA;    &#xD;&#xA;            //effect.TextureEnabled = true;&#xD;&#xA;            effect.LightingEnabled = true;&#xD;&#xA;            effect.PreferPerPixelLighting = true;  &#xD;&#xA;            //effect.SpecularColor = new Vector3(1, 0, 0); &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        mesh.Draw(); &#xD;&#xA;    }" />
  <row Id="21305" PostHistoryTypeId="24" PostId="10215" RevisionGUID="f5a02dc2-89e0-43c7-aa5f-eeaca4d7f64a" CreationDate="2011-03-26T16:42:45.750" Comment="Proposed by 2778 approved by 51 edit id of 110" />
  <row Id="21306" PostHistoryTypeId="25" PostId="10168" RevisionGUID="0ca32c34-86b7-40a1-8aba-1c133897b6db" CreationDate="2011-03-26T17:23:40.437" Comment="http://twitter.com/#!/StackGameDev/status/51695826786975744" />
  <row Id="21309" PostHistoryTypeId="2" PostId="10226" RevisionGUID="e8d2f764-3b05-4010-aa1a-c254a533f935" CreationDate="2011-03-26T18:03:38.153" UserId="5810" Text="IF you have a good game engine available you don't have to focus on the graphics part and let the engine handle it." />
  <row Id="21310" PostHistoryTypeId="2" PostId="10227" RevisionGUID="fbfa44bd-689c-4380-92c2-a1f714df4d92" CreationDate="2011-03-26T18:56:26.940" UserId="6302" Text="I think the great thing about this approach, which I have done myself, is that you are free to reuse your &quot;rules engine&quot; after you complete it.&#xD;&#xA;&#xD;&#xA;This gave me a chance to apply it to many different engines/renderers. I just layer the UI on top and can easily create (almost) completely different games.  I could make one a 2d sidescroller using sprites, another a 3d dungeon, another a isometric rotating map." />
  <row Id="21311" PostHistoryTypeId="2" PostId="10228" RevisionGUID="b0724f54-8dfa-43de-b2b4-303b360a2e21" CreationDate="2011-03-26T19:02:30.387" UserId="118" Text="Here is a list of tools I found just today:&#xD;&#xA;&#xD;&#xA; - [Tiled Map Editor](http://www.mapeditor.org/)&#xD;&#xA; - [Pyro Particle Editor](http://pyro.fenomen-games.com/)&#xD;&#xA; - [Image Packer](http://homepage.ntlworld.com/config/imagepacker/)" />
  <row Id="21312" PostHistoryTypeId="5" PostId="10210" RevisionGUID="db1d7907-e0bf-4d26-bbf8-3d26c3176588" CreationDate="2011-03-26T20:04:25.913" UserId="1430" Comment="added 2741 characters in body" Text="The first problem I see here is that you have a &quot;cube&quot; class. You really shouldn't -- within the domain of a rendering system, what about a cube is different from a sphere, in terms of type or interface? Since rendering interfaces should not be responsible for non-rendering task (such as collision, et cetera) then the answer is really that there's *nothing* different.&#xD;&#xA;&#xD;&#xA;On the whole, the only difference between a cube and a sphere is the data (the actual vertex elements), which can be abstracted. Instead of `Cube`, you should have a `Geometry` class. This class would contains two important pieces of data:&#xD;&#xA;&#xD;&#xA;* A list (more accurately, an array or vector) of vertices.&#xD;&#xA;* Information describing the format of an individual vertex.&#xD;&#xA;&#xD;&#xA;The vertex format can be as simple or complex as you need -- you can simply decide to pre-define a set of vertex formats your game will use ({position, color}; {position, color, normal, texture coordinates}; et cetera) and represent the format as enumerated type. At the other end of the spectrum you can implement a free-form `VertexFormat` object that allows specification of arbitrary vertex element semantics at arbitrary byte offsets within a vertex. &#xD;&#xA;&#xD;&#xA;The actual vertex data should be represented as an `unsigned char*` and you can cast to an appropriate vertex format structure if needed, based on the vertex format enumeration. This allows you to store any shape/mesh in any vertex format without having to create subclasses -- having to create those subclasses is actually a design and maintainability problem. &#xD;&#xA;&#xD;&#xA;Once you have this in place, it should be pretty straightforward to then add a `Material*` to the `Geometry` class. If you give the `Material` class a vertex format as well, you can even enforce correct bindings between materials and geometry: you can raise errors when you try to assign a material whose shader requires {position, color, normal} to a geometry object that only has {position, color} for example.&#xD;&#xA;&#xD;&#xA;This also allows you to externalize data definitions and thus make your APIs more data-driven. You can now construct `Geometry` objects with arbitrary collections of vertices. In terms of that API you can then implement another interface ([it should be separate from `Geometry`][1]) that loads vertex lists from a data file format of your choice, or an interface that generates a list of vertices that form a cube, or sphere, or whatever other procedural primitive you'd like, with whatever vertex properties you desire.&#xD;&#xA;&#xD;&#xA;EDIT: A clarification on some ways you can handle vertex formats:&#xD;&#xA;The `Geometry` object should accept and store only raw, untyped bytes of vertex data. You can work directly with these raw bytes, although I do understand the appeal of having a 'vertex structure' type that represents an individual vertex for ease of manipulation. In order to be useful that type must perforce be a POD (or you couldn't send arrays of them to the GPU anyhow), and so it is sane to be casting between the raw bytes and the vertex structure, provided the data in the bytes does actually match up to the structure's schema. You could thus provide an interface to the vertex data in the geometry object like:&#xD;&#xA;&#xD;&#xA;    template&lt; typename VERTEX_STRUCTURE &gt;&#xD;&#xA;    VERTEX_STRUCTURE* GetVertexData() {&#xD;&#xA;      // Assume 'vertices' is an unsigned char* instance member.&#xD;&#xA;      return reinterpret_cast&lt;VERTEX_STRUCTURE*&gt;(vertices);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You still need to know the appropriate format at compile time when you call this method, but that's usually not a problem because you are going to be directly manipulating the individual properties of the vertices when you call this (usually) so you'll know anyhow.&#xD;&#xA;&#xD;&#xA;But if that's still a problem you can even manipulate the raw bytes directly according to the vertex format at runtime. Assuming you have a series of memory IO routines that allow you to write arbitrary primitive types (ints, floats, et cetera) into arbitrary byte buffers, and you have something that can query a vertex format object for information about whether or not that format contains normals or colors or whatever, you could write to an arbitrary format buffer like this:&#xD;&#xA;&#xD;&#xA;    unsigned char* buffer = /* get raw buffer from Geometry object */&#xD;&#xA;    VertexFormat format = /* get format description from Geometry object */&#xD;&#xA;&#xD;&#xA;    // WriteToBuffer() writes the provided value, advances the buffer pointer&#xD;&#xA;    // by an appropriate size and returns that updated pointer, allowing for us&#xD;&#xA;    // to do sequential writes. It's a relatively easy thing to implement.    &#xD;&#xA;    buffer = WriteToBuffer(buffer, x);&#xD;&#xA;    buffer = WriteToBuffer(buffer, y);&#xD;&#xA;    buffer = WriteToBuffer(buffer, z);&#xD;&#xA;&#xD;&#xA;    if(format.HasNormals()) {&#xD;&#xA;      buffer = WriteToBuffer(buffer, normal.x);&#xD;&#xA;      buffer = WriteToBuffer(buffer, normal.y);&#xD;&#xA;      buffer = WriteToBuffer(buffer, normal.z);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    if(format.HasColor()) {&#xD;&#xA;      buffer = WriteToBuffer(buffer, color);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Et cetera.&#xD;&#xA;&#xD;&#xA;This latter technique would be useful in code that generated a vertex buffer for a sphere procedurally, for example: you could pass that code information about what types of vertex properties you wanted your generated sphere to include, and generate them at runtime.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.objectmentor.com/resources/articles/srp.pdf" />
  <row Id="21313" PostHistoryTypeId="25" PostId="10199" RevisionGUID="2480065d-4842-4211-9502-95e052bb8c7b" CreationDate="2011-03-26T20:23:40.653" Comment="http://twitter.com/#!/StackGameDev/status/51741125454737408" />
  <row Id="21314" PostHistoryTypeId="2" PostId="10229" RevisionGUID="581ebe1e-f623-48b2-8306-2b12829c6b2c" CreationDate="2011-03-26T21:30:30.990" UserId="6340" Text="This question might seem a bit vague but it is hard to formulate properly. I will try as best as I can. So here goes...&#xD;&#xA;&#xD;&#xA;For many years I have been trying to create games but I haven't managed to finish even a single one. The main reason, among others, was that the game creation process lacked focus. There never was a concrete vision of what I was trying to create.&#xD;&#xA;&#xD;&#xA;Now I realize that I would usually want to create a game that was similar to some other that I recently played and liked. It seems like there are many games I would like to make but there is none that I would see as THE game I want to make (or one of THE games).&#xD;&#xA;&#xD;&#xA;I really want to create something that I (and hopefully, others too) like and can be proud of. But I'm having a hard to discovering what it is. It doesn't have to be big, graphically awesome or anything like that. It should simply be something I really enjoy and am motivated to create.&#xD;&#xA;&#xD;&#xA;So, has anyone else here had the same or similar problem? Have you found a way to overcome it? Have you discovered &quot;YOUR&quot; game?&#xD;&#xA;&#xD;&#xA;If so, what was different about it from other games you tried creating?" />
  <row Id="21315" PostHistoryTypeId="1" PostId="10229" RevisionGUID="581ebe1e-f623-48b2-8306-2b12829c6b2c" CreationDate="2011-03-26T21:30:30.990" UserId="6340" Text="What was the game project that felt like &quot;YOUR&quot; game?" />
  <row Id="21316" PostHistoryTypeId="3" PostId="10229" RevisionGUID="581ebe1e-f623-48b2-8306-2b12829c6b2c" CreationDate="2011-03-26T21:30:30.990" UserId="6340" Text="&lt;motivation&gt;" />
  <row Id="21317" PostHistoryTypeId="5" PostId="10228" RevisionGUID="95e7489b-e574-4898-8eb9-cfc3fb2f503f" CreationDate="2011-03-26T21:44:26.990" UserId="118" Comment="added 63 characters in body" Text="Here is a list of tools I found just today:&#xD;&#xA;&#xD;&#xA; - [Tiled Map Editor](http://www.mapeditor.org/)&#xD;&#xA; - [Pyro Particle Editor](http://pyro.fenomen-games.com/)&#xD;&#xA; - [Image Packer](http://homepage.ntlworld.com/config/imagepacker/)&#xD;&#xA; - [BulletML](http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/)" />
  <row Id="21318" PostHistoryTypeId="2" PostId="10230" RevisionGUID="f8e6f691-833b-4f84-a8ef-da815745bc57" CreationDate="2011-03-26T22:13:54.680" UserId="6341" Text="I'm building a 3D tic-tac-toe game and this is what I've implemented so far:&#xD;&#xA;&#xD;&#xA; - 3D renderer with texture mapping&#xD;&#xA; - Playing against the computer&#xD;&#xA; - Playing online (multiplayer)&#xD;&#xA;&#xD;&#xA;Now I'm a little lost what I could add. Obviously, tic-tac-toe isn't that exciting or advanced, but I just miss something to salt it a little bit.&#xD;&#xA;&#xD;&#xA;Therefore, could anyone please suggest some ideas that would be worth implementing?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="21319" PostHistoryTypeId="1" PostId="10230" RevisionGUID="f8e6f691-833b-4f84-a8ef-da815745bc57" CreationDate="2011-03-26T22:13:54.680" UserId="6341" Text="Ideas for extending tic-tac-toe game?" />
  <row Id="21320" PostHistoryTypeId="3" PostId="10230" RevisionGUID="f8e6f691-833b-4f84-a8ef-da815745bc57" CreationDate="2011-03-26T22:13:54.680" UserId="6341" Text="&lt;rendering&gt;&lt;online&gt;" />
  <row Id="21321" PostHistoryTypeId="2" PostId="10231" RevisionGUID="a5f01a4e-2d5a-4c5d-8ac1-b2b867a1ec3b" CreationDate="2011-03-26T22:17:56.113" UserId="5139" Text="I'm now working with two guys for making our first pc indie game and we decide to use cocos2d+pybox2d ( yeah , 2d python game :) ). We decide this based on what i seen in cocos2d iphone games , but i don't get very clear if cocos2d-iphone is just a porting with just a little more features or is far more better than cocos2d for pc. &#xD;&#xA;If you can get me out of this dilemma it would be great. I just want to be sure that i'm on the right track ( and also i want to porting this game for android and iphone if it got success in pc , but first my lovely pc :P )&#xD;&#xA;&#xD;&#xA;PD: For the maps we will use Tiled , so is totally compatible with cocos2d ( any of both cases i think... )" />
  <row Id="21322" PostHistoryTypeId="1" PostId="10231" RevisionGUID="a5f01a4e-2d5a-4c5d-8ac1-b2b867a1ec3b" CreationDate="2011-03-26T22:17:56.113" UserId="5139" Text="Cocos2d+pybox2d vs Cocos2d-Iphone" />
  <row Id="21323" PostHistoryTypeId="3" PostId="10231" RevisionGUID="a5f01a4e-2d5a-4c5d-8ac1-b2b867a1ec3b" CreationDate="2011-03-26T22:17:56.113" UserId="5139" Text="&lt;cocos2d-iphone&gt;&lt;box2d&gt;&lt;python&gt;&lt;cocos2d&gt;&lt;tiles&gt;" />
  <row Id="21324" PostHistoryTypeId="2" PostId="10232" RevisionGUID="7d1eb004-0d02-4279-bdee-a4cb630a8c8d" CreationDate="2011-03-26T22:40:20.443" UserId="2708" Text="Hey there, I think cocos2d-iphone is far more than cocos2d for the PC. Some design decisions are the same, like using a SceneGraph, and they share some class names, but I would bet that cocos2d-iphone has far more work behind it than cocos2d in PC. I would recommend you to use [cocos2d-x][1] maybe? (C++ port of Cocos, which has cross-platform as the main feature )&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-x.org/" />
  <row Id="21325" PostHistoryTypeId="2" PostId="10233" RevisionGUID="64c0b2b0-9357-422b-a2c5-92e37c99c352" CreationDate="2011-03-26T22:53:55.267" UserId="619" Text="It took me dozens of failed projects before I started actually managing to finish and release games. This is my two cents on how to finish a game:&#xD;&#xA;&#xD;&#xA;- Draft then polish. Instead of trying to make a game from &quot;start to finish&quot;, start by developing a complete game that is a very rough representation of the final product. Use as much stand-in stuff as possible. Then polish it over and over until it feels done. This is analogous to a painter drawing a sketch, and painting over it later.&#xD;&#xA;- Further to the previous point, the most important thing is for the game to become &quot;fun&quot; as soon as possible. If a game isn't going to be fun, it's better that you discover that sooner than later.&#xD;&#xA;- Talk about your project with others often. Stick to a strict blogging schedule, perhaps one per week with a screenshot demonstrating something new.&#xD;&#xA;- Do short release schedules (&quot;Milestones&quot;) perhaps every other month or so, to gather feedback to guide development of the game.&#xD;&#xA;- Keep a to-do list for the project that has as many items as possible, split up by milestone. A to-do list isn't really complete unless it lists everything that needs to be done for the game to be complete. Deal with bugs first to keep the source code from deteriorating. &#xD;&#xA;&#xD;&#xA;As for the vision, that's a difficult one to answer. I think any vision for a game project is fine as long as it's something that the developer would play if someone else made it." />
  <row Id="21326" PostHistoryTypeId="16" PostId="10229" RevisionGUID="2be0a5ef-d147-4713-a95d-24c2a8408cb2" CreationDate="2011-03-26T22:56:45.363" UserId="14" />
  <row Id="21327" PostHistoryTypeId="16" PostId="10233" RevisionGUID="d431b5e2-0cec-4775-806e-f4e6ee16297b" CreationDate="2011-03-26T22:56:45.363" UserId="14" />
  <row Id="21328" PostHistoryTypeId="2" PostId="10234" RevisionGUID="33318902-94b2-432e-a642-edaece697d0a" CreationDate="2011-03-26T23:20:11.437" UserId="2111" Text="I personally give up easily on projects, so I found out something that keeps me interested throughout the whole development process. &#xD;&#xA;&#xD;&#xA;I start out really small, like drawing a character to the screen. Then, I try to make it a little more interactive by accepting input to move that character. After that, I just add small functionalities that, in the long run, really makes you feel like you're making progress.&#xD;&#xA;&#xD;&#xA;As for making &quot;YOUR&quot; game, I'd say start out by making &quot;clones&quot; of classic games(like Pong or whatever) and adding a little something that makes it different(why not 4 players Free For All Pong? :) ). The more &quot;clones&quot; you'll make, the better you'll get. Eventually you'll just get a really good feel of what game you want to make, and that game will be YOUR game.&#xD;&#xA;&#xD;&#xA;For more tips on staying motivated, see this question:&#xD;&#xA; &quot; http://gamedev.stackexchange.com/questions/85/how-can-i-effectively-manage-a-hobby-game-project &quot;" />
  <row Id="21329" PostHistoryTypeId="25" PostId="10230" RevisionGUID="f377e328-6fd1-4c67-bb3c-c70cd17cd5c2" CreationDate="2011-03-26T23:23:40.890" Comment="http://twitter.com/#!/StackGameDev/status/51786425905057793" />
  <row Id="21330" PostHistoryTypeId="2" PostId="10235" RevisionGUID="c4116339-f977-4ab3-8850-205b68161283" CreationDate="2011-03-26T23:24:57.520" UserId="2111" Text="You could add more visual effects to the game to make it visually appealing (especially when a player wins. I personally don't like the classic &quot;You won!&quot; text, I prefer fireworks and fire all over the screen, but maybe that's just me)" />
  <row Id="21331" PostHistoryTypeId="2" PostId="10236" RevisionGUID="7682bd14-00e3-4607-aeb0-7774396e12b2" CreationDate="2011-03-27T00:05:22.803" UserId="4508" Text="i'm doing a simple game/application with some minimal 2d graphics: png textures and ploygons with standard glVertex calls&#xD;&#xA;&#xD;&#xA;my setting:&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluOrtho2D(0, w, 0, h);&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;    glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA );&#xD;&#xA;&#xD;&#xA;if i render any texture with glCallList i no more visualize plygons! what could it be? i'm stucking with some combinations of glBlendFunc but i'm getting nothing goos..  " />
  <row Id="21332" PostHistoryTypeId="1" PostId="10236" RevisionGUID="7682bd14-00e3-4607-aeb0-7774396e12b2" CreationDate="2011-03-27T00:05:22.803" UserId="4508" Text="blending alpha textures in gluOrtho2D" />
  <row Id="21333" PostHistoryTypeId="3" PostId="10236" RevisionGUID="7682bd14-00e3-4607-aeb0-7774396e12b2" CreationDate="2011-03-27T00:05:22.803" UserId="4508" Text="&lt;opengl&gt;&lt;2d&gt;&lt;textures&gt;&lt;blending&gt;" />
  <row Id="21334" PostHistoryTypeId="2" PostId="10237" RevisionGUID="8d3e6c18-6fea-42bb-93fb-68b2cfb35a1a" CreationDate="2011-03-27T00:38:55.227" UserId="6344" Text="I'm not asking for code or anything, just some advice on what to google, because I have no idea what to call this process.&#xD;&#xA;&#xD;&#xA;I made a video player (with full controls) with python and DirectX and would like to just simply import the rendering of the display into a c++ DirectX fullscreen app. That way, it can be customizable to the user.  Any advice is greatly appreciated." />
  <row Id="21335" PostHistoryTypeId="1" PostId="10237" RevisionGUID="8d3e6c18-6fea-42bb-93fb-68b2cfb35a1a" CreationDate="2011-03-27T00:38:55.227" UserId="6344" Text="Importing python DirectX into c++ DirectX program" />
  <row Id="21336" PostHistoryTypeId="3" PostId="10237" RevisionGUID="8d3e6c18-6fea-42bb-93fb-68b2cfb35a1a" CreationDate="2011-03-27T00:38:55.227" UserId="6344" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="21337" PostHistoryTypeId="2" PostId="10238" RevisionGUID="16587f52-edb5-42f7-83ab-0cff535cd6e1" CreationDate="2011-03-27T01:20:06.497" UserId="5413" Text="Right now I am using the Picturebox class to do it, and it not really working all that well. I've created the loop&#xD;&#xA;&#xD;&#xA;    PictureBox[,] squares = new PictureBox[10,10];&#xD;&#xA;            for (int i = 0; i &lt; 10; i++)&#xD;&#xA;            {&#xD;&#xA;                for (int j = 0; j &lt; 10; j++)&#xD;&#xA;                {&#xD;&#xA;                    squares[i, j] = new PictureBox();&#xD;&#xA;                    squares[i,j].Image = Chess.Properties.Resources.square;&#xD;&#xA;                    squares[i, j].BackColor = Color.Transparent;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; 10; i++)&#xD;&#xA;            {&#xD;&#xA;                for(int j = 0; j &lt; 10; j++)&#xD;&#xA;                {&#xD;&#xA;                    squares[i, j].Location = new Point(i * 30, j * 30);&#xD;&#xA;                    this.Controls.Add(squares[i, j]);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Alright it's supposed to create a 10x10, and I added the image into the Resource. So that's how I set up the loop. &#xD;&#xA;&#xD;&#xA;Each square is 20x20 pixels, and I loop by column. I thought it would work, but all I get is 6 images and the size just gets smaller.&#xD;&#xA;&#xD;&#xA;Am I missing something? Or any good alternatives in creating a checkerboard with out pictureboxes? Any thing with a MouseLeave, MouseHover, MouseClick, events I can use.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="21338" PostHistoryTypeId="1" PostId="10238" RevisionGUID="16587f52-edb5-42f7-83ab-0cff535cd6e1" CreationDate="2011-03-27T01:20:06.497" UserId="5413" Text="Creating a checker board in C# winform" />
  <row Id="21339" PostHistoryTypeId="3" PostId="10238" RevisionGUID="16587f52-edb5-42f7-83ab-0cff535cd6e1" CreationDate="2011-03-27T01:20:06.497" UserId="5413" Text="&lt;c#&gt;&lt;gui&gt;" />
  <row Id="21340" PostHistoryTypeId="25" PostId="10229" RevisionGUID="945099c5-9e19-4c6b-a884-8dc13f996353" CreationDate="2011-03-27T02:23:41.083" Comment="http://twitter.com/#!/StackGameDev/status/51831725428457472" />
  <row Id="21341" PostHistoryTypeId="2" PostId="10239" RevisionGUID="f3a8b959-ffcc-4f5e-9667-5cf9abbfd7a4" CreationDate="2011-03-27T02:49:23.073" UserId="1929" Text="Make it 3d. 3d Tic-Tac-Toe is played on three 3x3 grids. You can win on any single board, or across boards (eg. top-left square in every board; or top-left, center-middle, and bottom-right across the three boards.&#xD;&#xA;&#xD;&#xA;Some win conditions:&#xD;&#xA;&#xD;&#xA;    x.. ... ...&#xD;&#xA;    .x. ... ...&#xD;&#xA;    ..x ... ...&#xD;&#xA;&#xD;&#xA;(Winning on a single board)&#xD;&#xA;&#xD;&#xA;    x.. x.. x..&#xD;&#xA;    ... ... ...&#xD;&#xA;    ... ... ...&#xD;&#xA;&#xD;&#xA;(Same location across three levels)&#xD;&#xA;    &#xD;&#xA;    x.. .x. ..x&#xD;&#xA;    ... ... ... &#xD;&#xA;    ... ... ...&#xD;&#xA;    &#xD;&#xA;(Same row across three levels)&#xD;&#xA;&#xD;&#xA;    x.. ... ...&#xD;&#xA;    ... x.. ...&#xD;&#xA;    ... ... x..&#xD;&#xA;&#xD;&#xA;(Same column across three levels)&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;" />
  <row Id="21342" PostHistoryTypeId="2" PostId="10240" RevisionGUID="559ae310-5824-4b14-a937-c43fa291cfd9" CreationDate="2011-03-27T03:42:39.877" UserId="3081" Text="If you're just doing basic drawing, you can create a single control (perhaps a UserControl subclass) and override the `OnPaint()` method.  See http://www.geekpedia.com/tutorial50_Drawing-with-Csharp.html for a sample tutorial.  You'll also be able to override the various methods pertinent for mouse-handling." />
  <row Id="21343" PostHistoryTypeId="5" PostId="10238" RevisionGUID="2e3e371c-0f2b-46ea-a42b-55ac7d7801e4" CreationDate="2011-03-27T04:35:32.860" UserId="1430" Comment="deleted 17 characters in body" Text="I am using the PictureBox class to create a checkerboard, and it not really working all that well. I've created the loop:&#xD;&#xA;&#xD;&#xA;    PictureBox[,] squares = new PictureBox[10,10];&#xD;&#xA;            for (int i = 0; i &lt; 10; i++)&#xD;&#xA;            {&#xD;&#xA;                for (int j = 0; j &lt; 10; j++)&#xD;&#xA;                {&#xD;&#xA;                    squares[i, j] = new PictureBox();&#xD;&#xA;                    squares[i,j].Image = Chess.Properties.Resources.square;&#xD;&#xA;                    squares[i, j].BackColor = Color.Transparent;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; 10; i++)&#xD;&#xA;            {&#xD;&#xA;                for(int j = 0; j &lt; 10; j++)&#xD;&#xA;                {&#xD;&#xA;                    squares[i, j].Location = new Point(i * 30, j * 30);&#xD;&#xA;                    this.Controls.Add(squares[i, j]);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;It's supposed to create a 10x10 grid, and I added the image into the application resources. Each square is 20x20 pixels, and I loop by column. I thought it would work, but all I get is 6 images and the size just gets smaller.&#xD;&#xA;&#xD;&#xA;Am I missing something? Or any good alternatives in creating a checkerboard without using PictureBox? Any thing with a MouseLeave, MouseHover, MouseClick, events I can use.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="21344" PostHistoryTypeId="25" PostId="10238" RevisionGUID="77fbb544-66cf-4633-b435-3ddebaa83579" CreationDate="2011-03-27T05:23:41.367" Comment="http://twitter.com/#!/StackGameDev/status/51877025320935424" />
  <row Id="21345" PostHistoryTypeId="2" PostId="10241" RevisionGUID="75a14c12-2af5-4255-b816-09389942e45c" CreationDate="2011-03-27T07:38:28.470" UserId="5020" Text="There's nothing wrong with making a variant on someone else's game, but I think there's a difference between making a variant and &quot;fixing&quot; it. If you play the game and think &quot;I like this, but I wonder whether XYZ would improve it&quot; then you're driven only by curiosity - which can be a powerful motivator, but not for everyone. If you play the game and think &quot;I like this, but XYZ would make it far better&quot; then I think that's a much better motivator. So try looking for games which have one obvious flaw which has somehow escaped the developer.&#xD;&#xA;&#xD;&#xA;The simple solution to keeping your motivation going is to start with a short deadline. There are a number of game development contests which take place over a single weekend or a single week. At the end of that you won't have a polished game, but you can have something which is finished for some value of finished. You'll either be burnt out or have the momentum to keep polishing. Ludum Dare is one such contest I know of, but there are others. (Found [a list](http://www.mcfunkypants.com/2010/game-jams-aplenty/) while Googling)." />
  <row Id="21346" PostHistoryTypeId="5" PostId="10236" RevisionGUID="a01597f8-9564-47c7-9a10-40b35ba35f68" CreationDate="2011-03-27T08:15:57.833" UserId="4508" Comment="added 770 characters in body; added 44 characters in body" Text="i'm doing a simple game/application with some minimal 2d graphics: png textures and ploygons with standard glVertex calls&#xD;&#xA;&#xD;&#xA;my setting:&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluOrtho2D(0, w, 0, h);&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;    glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA );&#xD;&#xA;&#xD;&#xA;code for textures:&#xD;&#xA;&#xD;&#xA;    texture = glGenTextures(1)&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, texture)&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)&#xD;&#xA;    glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA,     GL_UNSIGNED_BYTE, textureData )&#xD;&#xA;    newList = glGenLists(1)&#xD;&#xA;    glNewList(newList,GL_COMPILE);&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, texture)&#xD;&#xA;    glBegin(GL_QUADS)&#xD;&#xA;    glTexCoord2f(0, 0); glVertex2f(0, 0)&#xD;&#xA;    glTexCoord2f(0, 1); glVertex2f(0, height)&#xD;&#xA;    glTexCoord2f(1, 1); glVertex2f( width,  height)&#xD;&#xA;    glTexCoord2f(1, 0); glVertex2f(width, 0)&#xD;&#xA;    glEnd()&#xD;&#xA;    glEndList()&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    glCallList(newList)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i've found this code here: http://disruption.ca/gutil/introduction.html&#xD;&#xA;&#xD;&#xA;if i render any texture with glCallList i no more visualize plygons! what could it be? i'm stucking with some combinations of glBlendFunc but i'm getting nothing goos..  " />
  <row Id="21347" PostHistoryTypeId="2" PostId="10242" RevisionGUID="baa17f4a-eadf-477d-8ea7-b7144368cff0" CreationDate="2011-03-27T08:22:13.957" UserId="1047" Text="I would like to play around with games that use scripting to see how much easier it makes development. What --simple-- C++ or .NET game may i download and play with using a scripting language. I dont really care which scripting language it is.&#xD;&#xA;" />
  <row Id="21348" PostHistoryTypeId="1" PostId="10242" RevisionGUID="baa17f4a-eadf-477d-8ea7-b7144368cff0" CreationDate="2011-03-27T08:22:13.957" UserId="1047" Text="Is there a simple C++/.NET game with scripting?" />
  <row Id="21349" PostHistoryTypeId="3" PostId="10242" RevisionGUID="baa17f4a-eadf-477d-8ea7-b7144368cff0" CreationDate="2011-03-27T08:22:13.957" UserId="1047" Text="&lt;scripting&gt;" />
  <row Id="21350" PostHistoryTypeId="25" PostId="10236" RevisionGUID="6507d275-460e-4160-b6ad-a393f2fda2ad" CreationDate="2011-03-27T08:23:40.540" Comment="http://twitter.com/#!/StackGameDev/status/51922320545165312" />
  <row Id="21351" PostHistoryTypeId="5" PostId="10228" RevisionGUID="e107827c-d1a1-4780-9249-20b4f60c8d42" CreationDate="2011-03-27T08:34:51.533" UserId="744" Comment="Remove non-open-source tools. Again." Text="Here is a list of tools I found just today:&#xD;&#xA;&#xD;&#xA; - [Tiled Map Editor](http://www.mapeditor.org/)&#xD;&#xA; - [BulletML](http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/)" />
  <row Id="21352" PostHistoryTypeId="2" PostId="10243" RevisionGUID="d507baef-cd07-4b57-932b-7c820820505f" CreationDate="2011-03-27T09:39:36.467" UserId="1156" Text="You need some kind of Python-C++ bindings.&#xD;&#xA;&#xD;&#xA;There's a few options:&#xD;&#xA;&#xD;&#xA; - [The raw Python API (in C)][1]  &#xD;&#xA;  &#xD;&#xA; - [Boost.Python][2] (probably the   &#xD;&#xA;   easiest to use)&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.python.org/extending/extending.html&#xD;&#xA;  [2]: http://www.boost.org/doc/libs/1_46_1/libs/python/doc/" />
  <row Id="21353" PostHistoryTypeId="2" PostId="10244" RevisionGUID="1488a742-b7ae-4b7c-8967-15ba573cd527" CreationDate="2011-03-27T10:30:23.023" UserId="6190" Text="Lots of games use scripting which allows for not only modding but the creation of completely different games.&#xD;&#xA;&#xD;&#xA;Your welcome to purchase [Puzzle Quest 2][1] (or any Infinite Interactive game) and see just how easy it is to script with [Lua][2]. Pretty much everything you can do is already in there in the existing scripts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/app/47540/&#xD;&#xA;  [2]: http://www.lua.org/manual/5.1/manual.html" />
  <row Id="21354" PostHistoryTypeId="2" PostId="10245" RevisionGUID="8b64090d-b6be-4970-b10b-e35833dc1501" CreationDate="2011-03-27T11:10:23.943" UserId="1929" Text="Kind of a crazy second answer here ... you can always convert it into a full-fledged strategy game. Just turn tic-tac-toe pieces into, say, Orcs or something exotic, and start building it up from there ...&#xD;&#xA;&#xD;&#xA;I know, it's weird, but you already have an established board with game mechanics. Start by adding pieces that modify the existing behavior (eg. enemy can't be placed diagonally adjacent to a certain type of tile, say) and build it from there." />
  <row Id="21355" PostHistoryTypeId="5" PostId="10239" RevisionGUID="8a35d89b-590d-443d-ab5a-42e3fc64faaa" CreationDate="2011-03-27T11:11:29.027" UserId="1929" Comment="added 59 characters in body" Text="Make it 3d. 3d Tic-Tac-Toe is played on three 3x3 grids. You can win on any single board, or across boards (eg. top-left square in every board; or top-left, center-middle, and bottom-right across the three boards.&#xD;&#xA;&#xD;&#xA;Some win conditions:&#xD;&#xA;&#xD;&#xA;    x.. ... ...&#xD;&#xA;    .x. ... ...&#xD;&#xA;    ..x ... ...&#xD;&#xA;&#xD;&#xA;(Winning on a single board)&#xD;&#xA;&#xD;&#xA;    x.. x.. x..&#xD;&#xA;    ... ... ...&#xD;&#xA;    ... ... ...&#xD;&#xA;&#xD;&#xA;(Same location across three levels)&#xD;&#xA;    &#xD;&#xA;    x.. .x. ..x&#xD;&#xA;    ... ... ... &#xD;&#xA;    ... ... ...&#xD;&#xA;    &#xD;&#xA;(Same row across three levels)&#xD;&#xA;&#xD;&#xA;    x.. ... ...&#xD;&#xA;    ... x.. ...&#xD;&#xA;    ... ... x..&#xD;&#xA;&#xD;&#xA;(Same column across three levels)&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;**Edit:** You could also make it a 4x4, connect-four style." />
  <row Id="21356" PostHistoryTypeId="25" PostId="10242" RevisionGUID="f4f6cd1f-0f18-48f8-91cd-b0751f0a21de" CreationDate="2011-03-27T11:23:40.890" Comment="http://twitter.com/#!/StackGameDev/status/51967620165013505" />
  <row Id="21357" PostHistoryTypeId="5" PostId="10245" RevisionGUID="6d087d32-07b3-4f12-8807-010ca2f0f349" CreationDate="2011-03-27T11:31:04.597" UserId="1929" Comment="added 108 characters in body" Text="Kind of a crazy second answer here ... you can always convert it into a full-fledged strategy game. Just turn tic-tac-toe pieces into, say, Orcs or something exotic, and start building it up from there ...&#xD;&#xA;&#xD;&#xA;I know, it's weird, but you already have an established board with game mechanics. Start by adding pieces that modify the existing behavior (eg. enemy can't be placed diagonally adjacent to a certain type of unit, say) and build it from there.&#xD;&#xA;&#xD;&#xA;You can slowly expand functionality, board-size, and rules for winning (eg. wiping out all enemy units)." />
  <row Id="21358" PostHistoryTypeId="2" PostId="10246" RevisionGUID="dc873be9-dd12-404e-96ab-b7f19fba5f0b" CreationDate="2011-03-27T11:44:09.460" UserId="6312" Text="I want to import a skinned and animated character model built with bender into an android game. The animations can be: idle, walk, run ...etc&#xD;&#xA;&#xD;&#xA;I've seen a related question but it's only about importing a static model: http://stackoverflow.com/questions/204363/is-there-a-way-to-import-a-3d-model-into-android&#xD;&#xA;&#xD;&#xA;But I don't see how to import a set of animation with tweened frames.&#xD;&#xA;&#xD;&#xA;Any ideas, resources or tutorials about how this can be achieved ?" />
  <row Id="21359" PostHistoryTypeId="1" PostId="10246" RevisionGUID="dc873be9-dd12-404e-96ab-b7f19fba5f0b" CreationDate="2011-03-27T11:44:09.460" UserId="6312" Text="Import a 3D animation into an android game" />
  <row Id="21360" PostHistoryTypeId="3" PostId="10246" RevisionGUID="dc873be9-dd12-404e-96ab-b7f19fba5f0b" CreationDate="2011-03-27T11:44:09.460" UserId="6312" Text="&lt;3d&gt;&lt;android&gt;&lt;animation&gt;" />
  <row Id="21362" PostHistoryTypeId="5" PostId="10128" RevisionGUID="efa90448-90ff-42a8-ab52-2447084baabf" CreationDate="2011-03-27T12:31:37.553" UserId="5021" Comment="deleted 389 characters in body" Text="I have a shader that computes lighting for each light.&#xD;&#xA;&#xD;&#xA;    PointLight PointLights[10];&#xD;&#xA;&#xD;&#xA;    uniform const float NumPointLights;&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; NumPointLights; i++)&#xD;&#xA;    {&#xD;&#xA;	lightVec = PointLights[i].Position - pos;&#xD;&#xA;	lightDist = length(lightVec);&#xD;&#xA;        // Do other stuff with light here, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If I set NumPointLights to 2, the loop still iterates 10 times, and discards the result of the last 8 iterations.&#xD;&#xA;&#xD;&#xA;Should I set a compiler flag that will permit the loop to actually loop only 8 times, or should I make 10 shaders, a shader for each number of lights that can be rendered?&#xD;&#xA;&#xD;&#xA;On some small pieces of geometry I occaisionally need 10 lights. 90% of the time I only need 1-2 lights. How do I proceed?" />
  <row Id="21363" PostHistoryTypeId="2" PostId="10247" RevisionGUID="f3f155ca-58d3-4233-a431-6b5a572b7065" CreationDate="2011-03-27T12:48:31.430" UserId="2776" Text="Do you know real titles of MMOs where server engine is based on .Net?&#xD;&#xA;&#xD;&#xA;Thank you!!!;)" />
  <row Id="21364" PostHistoryTypeId="1" PostId="10247" RevisionGUID="f3f155ca-58d3-4233-a431-6b5a572b7065" CreationDate="2011-03-27T12:48:31.430" UserId="2776" Text="MMOs based on .Net?" />
  <row Id="21365" PostHistoryTypeId="3" PostId="10247" RevisionGUID="f3f155ca-58d3-4233-a431-6b5a572b7065" CreationDate="2011-03-27T12:48:31.430" UserId="2776" Text="&lt;engine&gt;&lt;c#&gt;&lt;mmo&gt;&lt;.net&gt;" />
  <row Id="21366" PostHistoryTypeId="5" PostId="10247" RevisionGUID="ee102802-23f7-4ff8-b2ab-dff9f9b394e4" CreationDate="2011-03-27T13:13:14.103" UserId="1156" Comment="deleted 20 characters in body; edited tags" Text="Are there any real MMOs where the server engine is based on .Net?&#xD;&#xA;" />
  <row Id="21367" PostHistoryTypeId="6" PostId="10247" RevisionGUID="ee102802-23f7-4ff8-b2ab-dff9f9b394e4" CreationDate="2011-03-27T13:13:14.103" UserId="1156" Comment="deleted 20 characters in body; edited tags" Text="&lt;engine&gt;&lt;c#&gt;&lt;mmo&gt;&lt;server&gt;&lt;.net&gt;" />
  <row Id="21368" PostHistoryTypeId="6" PostId="10237" RevisionGUID="9634db3f-ddb1-4da5-926e-918d8f6b4c73" CreationDate="2011-03-27T13:16:20.370" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;directx&gt;&lt;python&gt;" />
  <row Id="21369" PostHistoryTypeId="2" PostId="10248" RevisionGUID="f2a4e681-19cf-4fab-8a63-33a4f605dde9" CreationDate="2011-03-27T13:42:54.473" UserId="6351" Text="So, the standard way to transform vertices and then pass to the fragment shader in GLSL is something like this:&#xD;&#xA;&#xD;&#xA;    uniform mat4 u_modelview;&#xD;&#xA;    attribute vec4 a_position;&#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;    	gl_Position = u_modelview * a_position;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However, I am working in 2D so there is redundancy in the 4x4 matrix. Would it be more efficient for me to do this?&#xD;&#xA;&#xD;&#xA;    uniform mat3 u_modelview;&#xD;&#xA;    attribute vec3 a_position;&#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;    	gl_Position = vec4(u_modelview * a_position, 1.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;gl_Position requires a 4 component vector so an extra operation is required at output. However the matrix multiplication is for 9 elements instead of 16. Can I do any better?" />
  <row Id="21370" PostHistoryTypeId="1" PostId="10248" RevisionGUID="f2a4e681-19cf-4fab-8a63-33a4f605dde9" CreationDate="2011-03-27T13:42:54.473" UserId="6351" Text="Optimising the modelview transformation in GLSL for 2D" />
  <row Id="21371" PostHistoryTypeId="3" PostId="10248" RevisionGUID="f2a4e681-19cf-4fab-8a63-33a4f605dde9" CreationDate="2011-03-27T13:42:54.473" UserId="6351" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="21372" PostHistoryTypeId="2" PostId="10249" RevisionGUID="696c9ff2-c9cf-4ada-922f-96022e45cd46" CreationDate="2011-03-27T13:58:23.883" UserId="6352" Text="I'd like to make game, where one part is managing planet (building cities, factories, roads, etc.) but I'd like to avoid 3D - only what I want is nice 2d. But if I represent planet's surface as a grid, it will be strange to move near poles (if I go up, I won't appear in the bottom of the map, but in the top - only in different place) and it will be hard to have nice terrain (poles will be stretched). Do you have any ideas how to do that?" />
  <row Id="21373" PostHistoryTypeId="1" PostId="10249" RevisionGUID="696c9ff2-c9cf-4ada-922f-96022e45cd46" CreationDate="2011-03-27T13:58:23.883" UserId="6352" Text="Represent planet surface in 2d" />
  <row Id="21374" PostHistoryTypeId="3" PostId="10249" RevisionGUID="696c9ff2-c9cf-4ada-922f-96022e45cd46" CreationDate="2011-03-27T13:58:23.883" UserId="6352" Text="&lt;2d&gt;&lt;maps&gt;" />
  <row Id="21375" PostHistoryTypeId="2" PostId="10250" RevisionGUID="b947165c-c956-4902-b0f4-2be6c7124f3b" CreationDate="2011-03-27T14:06:15.477" UserId="5957" Text="You need to look up the file format for your animated mesh and decipher it. So, you'll need a framework capable of rendering a skinned mesh; you may have to do weighted mesh transformations in software, yourself, unless you're able to use vertex shaders in your version of OpenGL ES.&#xD;&#xA;&#xD;&#xA;  Next, you'll need to be able to load the mesh, the skeleton and the animation. This is probably a binary file format so you'll need:&#xD;&#xA;&#xD;&#xA; 1. The file format(s) in question, showing you the byte offsets of all data members and other relevant information.&#xD;&#xA; 2. You'll need to load your files, possibly using 'DataInputStream' if they're binary. Make sure the 'endianness' of the data matches your system, you may have to swap bytes around if the data has a different order to the platform you're working on.&#xD;&#xA; 3. Skin your weighted mesh - i.e. either in a vertex shader or on the CPU, go through each vertex and blend the position according to the vertex weights and the matrices that they refer to.&#xD;&#xA; 4. Profit!&#xD;&#xA;&#xD;&#xA;I'm not sure how much of that made sense because I don't know what you don't know. You could try giving a bit more information such as the file formats for your data and if you're using a 3rd party 3D engine or writing your own.&#xD;&#xA;&#xD;&#xA;HTH." />
  <row Id="21376" PostHistoryTypeId="25" PostId="10247" RevisionGUID="064c0754-201f-4f88-941b-5e35b599bbd2" CreationDate="2011-03-27T14:23:41.593" Comment="http://twitter.com/#!/StackGameDev/status/52012920355299328" />
  <row Id="21377" PostHistoryTypeId="2" PostId="10251" RevisionGUID="5f7b9edd-7f49-4d38-9f85-739e717265b1" CreationDate="2011-03-27T14:35:49.380" UserId="3644" Text="Games should no be realistic, you can always cut some corners if it makes the game better. Take a look at Ascendancy for example: http://www.abandonia.com/files/games/221/Ascendancy_5.png &#xD;&#xA;&#xD;&#xA;You can loop the 2D terrain from left to right and from bottom to top. Like a Civilization map does.&#xD;&#xA;&#xD;&#xA;Another option would be to make &quot;unwalkable&quot; polar caps, like we have here on Earth ;-) They will hide the areas of stretched grid." />
  <row Id="21378" PostHistoryTypeId="2" PostId="10252" RevisionGUID="b2debe29-0318-474d-8940-f8fdbc8862c1" CreationDate="2011-03-27T15:07:49.730" UserId="5685" Text="For converting animated models from Blender to M3G you can use Liquidiser (http://code.google.com/p/liquidiser/). As for reading -- I'm not aware of any publicly available library that would allow you to import .m3g files but I do have a library which can do that.&#xD;&#xA;&#xD;&#xA;I wouldn't mind making it public as it does what it's supposed to do (read, process and render models, including tweened animations) but at the moment it's not optimised as I'm still developing the game that uses it and performance hasn't been a priority yet. If you're interested in cooperation please get in touch at max.&amp;lt;my-stackexchange-nick&amp;gt;@gmail.com&#xD;&#xA;" />
  <row Id="21379" PostHistoryTypeId="2" PostId="10253" RevisionGUID="17dad188-f9e0-4a5f-bff9-501ceabad7c4" CreationDate="2011-03-27T15:38:39.983" UserId="4345" Text="You need to reduce the count of actual collision checks. Yeah obvious I know. So lets elaborate on this:&#xD;&#xA;&#xD;&#xA;Your first collision check algorithm without any optimization: how many checks will it do in one run?&#xD;&#xA;If n is the count of objects, this will be around n*(n-1) checks. For a lot of objects (&gt;100) this will be horribly slow.&#xD;&#xA;&#xD;&#xA;Your neighbor checking method will not be much faster. If your objects aren't static and move around a lot, you will need to build these neighbors list for each object everytime in your game loop.&#xD;&#xA;This is actually worse than the first algorithm since you're doing n*(n-1) to build the neighbour list and then check for each object if it collides with one of its neighbours.&#xD;&#xA;&#xD;&#xA;You need to partition your game space.&#xD;&#xA;Lets say your game space is 400x400 pixels wide. Your can partition this into 4 sub-space each 200x200 in size and check for each object into which of the sub-spaces it belongs (one object can be inside more than one sub-space). Then you will only need to check if the objects in each subspace collides with other object in the same sub-space.&#xD;&#xA;&#xD;&#xA;So the runtime cost will be: n for building the 4 sub-space list + (n/4)*((n-1)/4) which is a lot better than the previous runtime cost.&#xD;&#xA;This can be cut down further by making the sub-spaces smaller (e.g. 50x50).&#xD;&#xA;&#xD;&#xA;So our algorithm now looks something like this:&#xD;&#xA;&#xD;&#xA;    for each (object in objects)&#xD;&#xA;      check into which subspace the object belongs&#xD;&#xA;&#xD;&#xA;    for each (subspace in subspaces)&#xD;&#xA;      for each (object in subspace)&#xD;&#xA;        check object for collision with other objects in same subspace&#xD;&#xA;&#xD;&#xA;This is somewhat similar to your tile data idea. But the subspaces do not need to be the same size as the tiles.&#xD;&#xA;&#xD;&#xA;We can do one last step to optimize this further using a quadtree. Let k be the count of subspaces. To build the spaces object lists we are doing k*n checks, leading to a lot of checks if your game world gets large.&#xD;&#xA;&#xD;&#xA;To cut this cost down we use a quadtree. A quadtree is another way to partition our game space. Instead of dividing our 400x400 space into 64 50x50 subspaces and checking for each object in which of the 64 subspaces it currently is, the game space is divide into 4 subspaces half the size of the game space (200x200), which in turn are divide into smaller subspaces (100x100), which in turn are divided again into 50x50 subspaces. This is our quadtree.&#xD;&#xA;&#xD;&#xA;Now if we want to know into which 50x50 subspace an object belongs we check into which of the 200x200 subspaces it belongs. Then we go one level deeper in our quadtree and check against the 4 100x100 subspaces which are inside the 200x200 subspace we just found. This is repeated until we know into which 50x50 subspace the object belongs. So how many checks were now necessary? 4 for each level of the the quadtree (Remember an object can be on the edge of two subspaces). So we need 4*3 checks to assign an object to the correct 50x50 subspace. A lot better than 64 checks.&#xD;&#xA;&#xD;&#xA;So our quadtree algorithm needs 4*3*n checks to build the subspace lists and then something like k*(n/k) checks to check the collisions of each object." />
  <row Id="21380" PostHistoryTypeId="2" PostId="10254" RevisionGUID="e7992bda-510c-40ed-8c89-ecf2c285b3da" CreationDate="2011-03-27T15:40:03.187" UserId="6354" Text="I have created a view (derived from UIScrollView) where the cells are drawn and zoom occurs. Everything is drawn with OpenGL ES 1.1. Zoom is specified by adding of a calculated new distance which is passed by fingers (sliding apart or moving together), which is multiplied by a constant coefficient:&#xD;&#xA;&#xD;&#xA;    fNewZoom += fDistance * fCoef;&#xD;&#xA;&#xD;&#xA;fDistance may have negative value at minimization&#xD;&#xA;&#xD;&#xA;There are 4 arrays of cells, each array contains cells with definite size. At zooming the most optimal cells by size are chosen for drawing and are drawn with the OpenGL ES 1.1. The initialization of all four textures takes place at the start while initialization of the drawing view.&#xD;&#xA;&#xD;&#xA;Initialization of the view:&#xD;&#xA;&#xD;&#xA;    + (Class) layerClass&#xD;&#xA;    {&#xD;&#xA;        return [CAEAGLLayer class];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (id)initWithCoder:(NSCoder*)coder&#xD;&#xA;    {&#xD;&#xA;        if((self = [super initWithCoder:coder])) &#xD;&#xA;        {&#xD;&#xA;            CAEAGLLayer *eaglLayer = (CAEAGLLayer*) self.layer;&#xD;&#xA;    &#xD;&#xA;            eaglLayer.opaque = NO;&#xD;&#xA;            eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:&#xD;&#xA;                                            [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];&#xD;&#xA;    &#xD;&#xA;            m_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];&#xD;&#xA;            if(!m_context || ![EAGLContext setCurrentContext:m_context] || ![self createFramebuffer]) &#xD;&#xA;            {&#xD;&#xA;                [self release];&#xD;&#xA;                return nil;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            [self InitGLTextures];&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return self;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Drawing specifically in function &quot;- (void)drawView&quot;:&#xD;&#xA;    &#xD;&#xA;    - (void)layoutSubviews&#xD;&#xA;    {&#xD;&#xA;        [self InvalidateView];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)InvalidateView&#xD;&#xA;    {   &#xD;&#xA;        [EAGLContext setCurrentContext:m_context];&#xD;&#xA;        [self destroyFramebuffer];&#xD;&#xA;        [self createFramebuffer];&#xD;&#xA;        [self drawView];             //drawing view&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (BOOL)createFramebuffer&#xD;&#xA;    {&#xD;&#xA;        glGenFramebuffersOES(1, &amp;m_viewFramebuffer);&#xD;&#xA;        glGenRenderbuffersOES(1, &amp;m_viewRenderbuffer);&#xD;&#xA;    &#xD;&#xA;        glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_viewFramebuffer);&#xD;&#xA;        glBindRenderbufferOES(GL_RENDERBUFFER_OES, m_viewRenderbuffer);&#xD;&#xA;        [m_context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(id&lt;EAGLDrawable&gt;)self.layer];&#xD;&#xA;        glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, m_viewRenderbuffer);&#xD;&#xA;    &#xD;&#xA;        glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &amp;m_nBackingWidth);&#xD;&#xA;        glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &amp;m_nBackingHeight);&#xD;&#xA;    &#xD;&#xA;        if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) &#xD;&#xA;        {&#xD;&#xA;            NSLog(@&quot;failed to make complete framebuffer object %x&quot;, glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));&#xD;&#xA;            return NO;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return YES;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)destroyFramebuffer&#xD;&#xA;    {&#xD;&#xA;        glDeleteFramebuffersOES(1, &amp;m_viewFramebuffer);&#xD;&#xA;        m_viewFramebuffer = nil;&#xD;&#xA;        glDeleteRenderbuffersOES(1, &amp;m_viewRenderbuffer);&#xD;&#xA;        m_viewRenderbuffer = nil;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //TEST DRAWING VIEW !!!!&#xD;&#xA;    - (void)drawView&#xD;&#xA;    {&#xD;&#xA;        const int       nClues = 3; // = 900&#xD;&#xA;        const ImgElDimensionsF  cellDimensions = _skinMgr.GetCellInfo();&#xD;&#xA;        const CGPoint       offset = [self contentOffset];&#xD;&#xA;    &#xD;&#xA;        float   fDrawX = 0;&#xD;&#xA;        float   fDrawY = 0;&#xD;&#xA;        int nCount1 = 1;    &#xD;&#xA;    &#xD;&#xA;        [self BeginDrawing];&#xD;&#xA;        //&#xD;&#xA;        for (int nRow = 0; nRow &lt; nClues; nRow++)&#xD;&#xA;        {&#xD;&#xA;            for (int nColl = 0; nColl &lt; nClues; nColl++)&#xD;&#xA;            {&#xD;&#xA;                [self AddNewCellType:imgCellTypeSelectedEmpty PosX:fDrawX PosY:fDrawY];&#xD;&#xA;                fDrawX += cellDimensions.fWidth;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            fDrawX = 0;&#xD;&#xA;            fDrawY += cellDimensions.fHeight;&#xD;&#xA;        }&#xD;&#xA;        //&#xD;&#xA;        [self EndDrawing];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;functions used for drawing:&#xD;&#xA;&#xD;&#xA;    - (void)BeginDrawing&#xD;&#xA;    {&#xD;&#xA;        m_pCellTextureArr = _skinMgr.GL_GetProperlyCellTextInfo();&#xD;&#xA;    &#xD;&#xA;        glViewport(0, 0, m_nBackingWidth, m_nBackingHeight);&#xD;&#xA;        glMatrixMode(GL_PROJECTION);&#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        glOrthof(0.0f, (GLfloat)m_nBackingWidth, 0.0f, (GLfloat)m_nBackingHeight, 0.0f, 1.0f);&#xD;&#xA;        glMatrixMode(GL_MODELVIEW);&#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        // Clears the view with black&#xD;&#xA;        glClearColor(0.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // Make sure that you are drawing to the current context&#xD;&#xA;        [EAGLContext setCurrentContext:m_context];&#xD;&#xA;        glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_viewFramebuffer);&#xD;&#xA;        glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;        //correct matrix pos&#xD;&#xA;        glTranslatef(0, (CGFloat)m_nBackingHeight, 0);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    - (void)EndDrawing&#xD;&#xA;    {&#xD;&#xA;        ImgSize curImgSize = _skinMgr.GetCurrentImgSize();&#xD;&#xA;    &#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, m_cellsTextureArr[curImgSize]);&#xD;&#xA;        glEnable(GL_TEXTURE_2D);&#xD;&#xA;        glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;        glEnable(GL_BLEND); &#xD;&#xA;    &#xD;&#xA;        //if back cells was added&#xD;&#xA;        if (m_nCurAddBackCell &gt; 0)&#xD;&#xA;        {&#xD;&#xA;            glVertexPointer(2, GL_FLOAT, 0, m_spriteVerticesBack);&#xD;&#xA;            glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;            glTexCoordPointer(2, GL_FLOAT, 0, m_spriteTexcoordsBack);&#xD;&#xA;            glEnable(GL_TEXTURE_2D);&#xD;&#xA;            glEnableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA;            glDrawArrays(GL_TRIANGLES, 0, POINTS_PER_CELL * m_nCurAddBackCell);&#xD;&#xA;            glDisableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;            glDisableClientState(GL_TEXTURE_COORD_ARRAY);&#xD;&#xA;            //&#xD;&#xA;            m_nCurAddBackCell = 0;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With the help of this function the coordinate array of texture vertices for drawing is formed where m_spriteVerticesBack and m_spriteTexcoordsBack are dynamic arrays, seleсted by means of &quot;new&quot; function (m_spriteVerticesBack = new float[MAX_COUNT_CELLS * 12] )&#xD;&#xA;&#xD;&#xA;    - (BOOL)AddNewCellType:(ImgCellType)cellType PosX:(float)posX PosY:(float)posY&#xD;&#xA;    {&#xD;&#xA;        ImgElDimensionsF    cellDimensions = _skinMgr.GL_GetCurrerntCellDimensions(cellType);&#xD;&#xA;        ImgTextureInfoF     imgCellInfo = m_pCellTextureArr[cellType];&#xD;&#xA;    &#xD;&#xA;        if (m_nCurAddBackCell &gt;= m_nMaxCountBackCell)&#xD;&#xA;            return FALSE;&#xD;&#xA;    &#xD;&#xA;        const int idx = m_nCurAddBackCell * ELEMENTS_PER_CELL;&#xD;&#xA;        //////////&#xD;&#xA;        //*-------&#xD;&#xA;        //|  3--4&#xD;&#xA;        //|  |  |&#xD;&#xA;        //|  1--2&#xD;&#xA;        //*&#xD;&#xA;        // 1X&#xD;&#xA;        m_spriteVerticesBack[idx + 0] = posX;&#xD;&#xA;        // 1Y&#xD;&#xA;        m_spriteVerticesBack[idx + 1] =  -posY - cellDimensions.fHeight;&#xD;&#xA;        // 2X&#xD;&#xA;        m_spriteVerticesBack[idx + 2] = posX + cellDimensions.fWidth;&#xD;&#xA;        // 3Y&#xD;&#xA;        m_spriteVerticesBack[idx + 3] = -posY - cellDimensions.fHeight;&#xD;&#xA;        // 3X&#xD;&#xA;        m_spriteVerticesBack[idx + 4] = posX;&#xD;&#xA;        // 3Y&#xD;&#xA;        m_spriteVerticesBack[idx + 5] = -posY;&#xD;&#xA;        // 2X &#xD;&#xA;        m_spriteVerticesBack[idx + 6] = posX + cellDimensions.fWidth;&#xD;&#xA;        // 3Y&#xD;&#xA;        m_spriteVerticesBack[idx + 7] = -posY - cellDimensions.fHeight;&#xD;&#xA;        // 3X&#xD;&#xA;        m_spriteVerticesBack[idx + 8] = posX;&#xD;&#xA;        // 3Y&#xD;&#xA;        m_spriteVerticesBack[idx + 9] = -posY;  &#xD;&#xA;        // 4X&#xD;&#xA;        m_spriteVerticesBack[idx + 10] = posX + cellDimensions.fWidth;&#xD;&#xA;        // 4Y&#xD;&#xA;        m_spriteVerticesBack[idx + 11] = -posY;&#xD;&#xA;    &#xD;&#xA;        //////////&#xD;&#xA;        //1--2&#xD;&#xA;        //|  |&#xD;&#xA;        //3--4&#xD;&#xA;        //&#xD;&#xA;        // 1X&#xD;&#xA;        m_spriteTexcoordsBack[idx + 0] = imgCellInfo.fX;&#xD;&#xA;        // 1Y&#xD;&#xA;        m_spriteTexcoordsBack[idx + 1] = imgCellInfo.fY + imgCellInfo.fHeight;&#xD;&#xA;        // 2X&#xD;&#xA;        m_spriteTexcoordsBack[idx + 2] = imgCellInfo.fX + imgCellInfo.fWidth;&#xD;&#xA;        // 2Y&#xD;&#xA;        m_spriteTexcoordsBack[idx + 3] = imgCellInfo.fY + imgCellInfo.fHeight;&#xD;&#xA;        // 3X&#xD;&#xA;        m_spriteTexcoordsBack[idx + 4] = imgCellInfo.fX;&#xD;&#xA;        // 3Y&#xD;&#xA;        m_spriteTexcoordsBack[idx + 5] = imgCellInfo.fY;&#xD;&#xA;        // 2X&#xD;&#xA;        m_spriteTexcoordsBack[idx + 6] = imgCellInfo.fX + imgCellInfo.fWidth;&#xD;&#xA;        // 2Y&#xD;&#xA;        m_spriteTexcoordsBack[idx + 7] = imgCellInfo.fY + imgCellInfo.fHeight;&#xD;&#xA;        // 3X&#xD;&#xA;        m_spriteTexcoordsBack[idx + 8] = imgCellInfo.fX;&#xD;&#xA;        // 3Y&#xD;&#xA;        m_spriteTexcoordsBack[idx + 9] = imgCellInfo.fY;&#xD;&#xA;        // 4X&#xD;&#xA;        m_spriteTexcoordsBack[idx + 10] = imgCellInfo.fX + imgCellInfo.fWidth;&#xD;&#xA;        // 4Y&#xD;&#xA;        m_spriteTexcoordsBack[idx + 11] = imgCellInfo.fY;&#xD;&#xA;        //&#xD;&#xA;        m_nCurAddBackCell++;&#xD;&#xA;        return TRUE;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem is that indifferently how many cells I draw - 9 (field size 3 х 3) or 900 (field size 30 х 30), the speed of drawing at zoom on (iPhone 2G) is the same!!! What decelerates drawing? Drawing is performed like jerking. What was my mistake? What have I omited? I want the increment or minimization to become gradually, how can I achieve that?" />
  <row Id="21381" PostHistoryTypeId="1" PostId="10254" RevisionGUID="e7992bda-510c-40ed-8c89-ecf2c285b3da" CreationDate="2011-03-27T15:40:03.187" UserId="6354" Text="OpenGL ES 1.1 strange slow drawing by zooming on iPhone" />
  <row Id="21382" PostHistoryTypeId="3" PostId="10254" RevisionGUID="e7992bda-510c-40ed-8c89-ecf2c285b3da" CreationDate="2011-03-27T15:40:03.187" UserId="6354" Text="&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="21383" PostHistoryTypeId="2" PostId="10255" RevisionGUID="bb88e50d-54bc-49c9-9378-9d9a80389d33" CreationDate="2011-03-27T16:25:48.560" UserId="51" Text="&lt;a href=&quot;http://www.exitgames.com/References&quot;&gt;Photon Socket Server&lt;/a&gt; is a middleware provider which is using C++ as the underlying framework but the bulk of the logic (i.e. what you have access to) is using .NET." />
  <row Id="21384" PostHistoryTypeId="2" PostId="10256" RevisionGUID="05df6094-b4c2-42c8-a597-7b46bda08af3" CreationDate="2011-03-27T16:49:41.060" UserId="5899" Text="I have tested the example2a and it worked without changes.&#xD;&#xA;These are the files that I have used:&#xD;&#xA;&#xD;&#xA;gutil.py:&#xD;&#xA;&#xD;&#xA;    import pygame&#xD;&#xA;&#xD;&#xA;    from OpenGL.GL import *&#xD;&#xA;    from OpenGL.GLU import *&#xD;&#xA;&#xD;&#xA;    def initializeDisplay( w, h ):&#xD;&#xA;        pygame.display.set_mode((w,h),pygame.OPENGL|pygame.DOUBLEBUF)&#xD;&#xA;&#xD;&#xA;        glClearColor( 0.0, 0.0, 0.0, 1.0 )&#xD;&#xA;        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )&#xD;&#xA;&#xD;&#xA;        glMatrixMode( GL_PROJECTION );&#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        gluOrtho2D( 0, w, 0, h );&#xD;&#xA;        glMatrixMode( GL_MODELVIEW );&#xD;&#xA;&#xD;&#xA;        #set up texturing&#xD;&#xA;        glEnable( GL_TEXTURE_2D )&#xD;&#xA;        glEnable( GL_BLEND )&#xD;&#xA;        glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA )&#xD;&#xA;&#xD;&#xA;    def loadImage( image ):&#xD;&#xA;        textureSurface = pygame.image.load( image )&#xD;&#xA;	&#xD;&#xA;        textureData = pygame.image.tostring( textureSurface, &quot;RGBA&quot;, 1 )&#xD;&#xA;	&#xD;&#xA;        width = textureSurface.get_width()&#xD;&#xA;        height = textureSurface.get_height()&#xD;&#xA;&#xD;&#xA;        texture = glGenTextures(1)&#xD;&#xA;        glBindTexture( GL_TEXTURE_2D, texture )&#xD;&#xA;        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR )&#xD;&#xA;        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR )&#xD;&#xA;        glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData )&#xD;&#xA;&#xD;&#xA;        return texture, width, height&#xD;&#xA;&#xD;&#xA;    def delTexture( texture ):&#xD;&#xA;        glDeleteTextures( texture )&#xD;&#xA;&#xD;&#xA;    def createTexDL(texture, width, height):&#xD;&#xA;        newList = glGenLists(1)&#xD;&#xA;        glNewList(newList,GL_COMPILE);&#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, texture)&#xD;&#xA;        glBegin(GL_QUADS)&#xD;&#xA;        glTexCoord2f(0, 0); glVertex2f(0, 0)    # Bottom Left Of The Texture and Quad&#xD;&#xA;        glTexCoord2f(0, 1); glVertex2f(0, height)    # Top Left Of The Texture and Quad&#xD;&#xA;        glTexCoord2f(1, 1); glVertex2f( width,  height)    # Top Right Of The Texture and Quad&#xD;&#xA;        glTexCoord2f(1, 0); glVertex2f(width, 0)    # Bottom Right Of The Texture and Quad&#xD;&#xA;        glEnd()&#xD;&#xA;        glEndList()&#xD;&#xA;&#xD;&#xA;        return newList&#xD;&#xA;&#xD;&#xA;    def delDL(list):&#xD;&#xA;        glDeleteLists(list, 1)&#xD;&#xA;&#xD;&#xA;example2a.py:&#xD;&#xA;&#xD;&#xA;    import gutil&#xD;&#xA;    import pygame&#xD;&#xA;    from pygame.locals import *&#xD;&#xA;    from OpenGL.GL import *&#xD;&#xA;&#xD;&#xA;    def main():&#xD;&#xA;        pygame.init()&#xD;&#xA;        gutil.initializeDisplay(800, 600)&#xD;&#xA;&#xD;&#xA;        glColor4f(1.0,1.0,1.0,1.0)&#xD;&#xA;&#xD;&#xA;        done = False&#xD;&#xA;&#xD;&#xA;        cowTex, w, h = gutil.loadImage('put here a correct file path to a png file')&#xD;&#xA;        cow = gutil.createTexDL(cowTex, w, h)&#xD;&#xA;        alienTex, w, h = gutil.loadImage('put here a correct file path to a png file')&#xD;&#xA;        alien = gutil.createTexDL(alienTex, w, h)&#xD;&#xA;&#xD;&#xA;        while not done:&#xD;&#xA;            glLoadIdentity()&#xD;&#xA;            # I've changed this position&#xD;&#xA;            glTranslatef(0, 0, 0)&#xD;&#xA;            glCallList(cow)&#xD;&#xA;            glTranslatef(400, 400, 0)&#xD;&#xA;            glCallList(alien)&#xD;&#xA;&#xD;&#xA;            pygame.display.flip()&#xD;&#xA;&#xD;&#xA;            eventlist = pygame.event.get()&#xD;&#xA;            for event in eventlist:&#xD;&#xA;                if event.type == QUIT \&#xD;&#xA;                    or event.type == KEYDOWN and event.key == K_ESCAPE:&#xD;&#xA;                        done = True&#xD;&#xA;&#xD;&#xA;    if __name__ == '__main__':&#xD;&#xA;        main()&#xD;&#xA;&#xD;&#xA;Review that your code is exactly the same. Put extreme caution in the identation. If copy and past the code below, convert the spaces into tab. If you try this and have a problem you can write a comment." />
  <row Id="21385" PostHistoryTypeId="2" PostId="10257" RevisionGUID="7ad42ee6-8b72-4f12-b250-a7625cd3dcae" CreationDate="2011-03-27T16:57:11.793" UserId="6341" Text="What I'm using for multiplayer is HTML5 WebSocket as the client (HTML/JavaScript) and the Nugget WebSocket server in C#.&#xD;&#xA;&#xD;&#xA;I built a simple wrapper so that packages of data (basically key-value dictionary) can be sent and interpreted.&#xD;&#xA;&#xD;&#xA;The server then stores the appropriate data using the local MySQL server. This all seems fast and efficient. Most of all, it's extremely exciting! I can just play with my family on my local network, and probably even with someone on the other side of the world (though I haven't tested this...).&#xD;&#xA;&#xD;&#xA;So, for the Nugget server please refer to [this website][1]. For more information about HTML5 WebSockets, [see here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nugget.codeplex.com/&#xD;&#xA;  [2]: http://www.google.nl/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CB0QFjAA&amp;url=http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/&amp;ei=IGyPTZObH46YOpXS6KAC&amp;usg=AFQjCNFI9A-BwYiD0kwyRAEEr61qFFKSRQ" />
  <row Id="21386" PostHistoryTypeId="2" PostId="10258" RevisionGUID="817baf18-9913-4bf9-bea6-6228635c4bb5" CreationDate="2011-03-27T17:01:29.427" UserId="5459" Text="My fault, I have found the problem. I have not &quot;create&quot; vertex in vertex shader. It should looks this way:&#xD;&#xA;&#xD;&#xA;    uniform mat4 projectionMatrix;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec4 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;       texCoord = projectionMatrix * position;&#xD;&#xA;        gl_Position = texCoord;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I have added line:&#xD;&#xA;&#xD;&#xA;    gl_Position = texCoord;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21387" PostHistoryTypeId="6" PostId="10230" RevisionGUID="b78b0268-9af6-4b4f-a84c-35ecface5fa8" CreationDate="2011-03-27T17:01:51.650" UserId="6341" Comment="edited tags" Text="&lt;engine&gt;&lt;graphics&gt;&lt;rendering&gt;&lt;3d-engines&gt;&lt;online&gt;" />
  <row Id="21388" PostHistoryTypeId="25" PostId="10249" RevisionGUID="0a9ea135-e9df-4cb9-b076-5795eb22039a" CreationDate="2011-03-27T17:23:42.293" Comment="http://twitter.com/#!/StackGameDev/status/52058220272959489" />
  <row Id="21389" PostHistoryTypeId="5" PostId="10217" RevisionGUID="bf36a00e-5df7-4692-84e0-efd3df78be8d" CreationDate="2011-03-27T18:04:35.707" UserId="1430" Comment="deleted 1 characters in body; edited title" Text="Can you give me hint to any good sky box example in OpenGL ES 2.0? I have found only OpenGL and does not work for me.&#xD;&#xA;I am doing it this way:&#xD;&#xA;Initialization:&#xD;&#xA;&#xD;&#xA;    glUseProgram(m_programSkyBox.Program);&#xD;&#xA;    glGenBuffers(1, &amp;skyBoxVertexBuffer);&#xD;&#xA;	glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    float vertices[24] = {	&#xD;&#xA;		-1.0, -1.0,  1.0,&#xD;&#xA;        1.0, -1.0,  1.0,&#xD;&#xA;        -1.0,  1.0,  1.0,&#xD;&#xA;        1.0,  1.0,  1.0,&#xD;&#xA;        -1.0, -1.0, -1.0,&#xD;&#xA;        1.0, -1.0, -1.0,&#xD;&#xA;        -1.0,  1.0, -1.0,&#xD;&#xA;        1.0,  1.0, -1.0,&#xD;&#xA;	};&#xD;&#xA;    &#xD;&#xA;	glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);&#xD;&#xA;    &#xD;&#xA;    glGenBuffers(1, &amp;skyBoxIndexBuffer);&#xD;&#xA;	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};&#xD;&#xA;	glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW);&#xD;&#xA;Drawing the skybox:&#xD;&#xA;&#xD;&#xA;    glClearColor(0.5f, 0.5f, 0.5f, 1);&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;    glUseProgram(m_programSkyBox.Program);&#xD;&#xA;    &#xD;&#xA;    glDisable(GL_DEPTH_TEST);	// skybox should be drawn behind anything else&#xD;&#xA;    glBindTexture(GL_TEXTURE_CUBE_MAP, m_textures.Cubemap);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;	glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer);&#xD;&#xA;    glVertexAttribPointer(m_programSkyBox.Attributes.Position, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);&#xD;&#xA;    glEnableVertexAttribArray(m_programSkyBox.Attributes.Position);&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, 0);&#xD;&#xA;    &#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyBoxIndexBuffer);&#xD;&#xA;	glDrawElements(GL_TRIANGLE_STRIP, 14, GL_UNSIGNED_BYTE, 0);&#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);&#xD;&#xA;	glEnable(GL_DEPTH_TEST);&#xD;&#xA;Texture loading is working. Shader is correctly compiled and looks like this:&#xD;&#xA;Vertex shader:&#xD;&#xA;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec3 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;       texCoord.xyz = position.xyz;&#xD;&#xA;    }&#xD;&#xA;Fragment shader:&#xD;&#xA;&#xD;&#xA;    uniform samplerCube Sampler;&#xD;&#xA;     &#xD;&#xA;    varying mediump vec3 texCoord;&#xD;&#xA;                                                    &#xD;&#xA;     void main() {&#xD;&#xA;         mediump vec3 cube = vec3(textureCube(Sampler, texCoord.xyz));&#xD;&#xA;         gl_FragColor = vec4(cube, 1.0);&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;But I can't get the cube visible. Am I doing anything wrong?&#xD;&#xA;" />
  <row Id="21390" PostHistoryTypeId="4" PostId="10217" RevisionGUID="bf36a00e-5df7-4692-84e0-efd3df78be8d" CreationDate="2011-03-27T18:04:35.707" UserId="1430" Comment="deleted 1 characters in body; edited title" Text="How do I create a sky box with OpenGL ES 2.0?" />
  <row Id="21391" PostHistoryTypeId="5" PostId="10256" RevisionGUID="eae47ce2-9d36-4f19-9d9d-086d9c1c548f" CreationDate="2011-03-27T18:27:37.327" UserId="5899" Comment="  ; added 7 characters in body" Text="I have tested the example2a and it worked without changes.&#xD;&#xA;These are the files that I have used:&#xD;&#xA;&#xD;&#xA;gutil.py:&#xD;&#xA;&#xD;&#xA;    import pygame&#xD;&#xA;&#xD;&#xA;    from OpenGL.GL import *&#xD;&#xA;    from OpenGL.GLU import *&#xD;&#xA;&#xD;&#xA;    def initializeDisplay( w, h ):&#xD;&#xA;        pygame.display.set_mode((w,h),pygame.OPENGL|pygame.DOUBLEBUF)&#xD;&#xA;&#xD;&#xA;        glClearColor( 0.0, 0.0, 0.0, 1.0 )&#xD;&#xA;        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )&#xD;&#xA;&#xD;&#xA;        glMatrixMode( GL_PROJECTION );&#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        gluOrtho2D( 0, w, 0, h );&#xD;&#xA;        glMatrixMode( GL_MODELVIEW );&#xD;&#xA;&#xD;&#xA;        #set up texturing&#xD;&#xA;        glEnable( GL_TEXTURE_2D )&#xD;&#xA;        glEnable( GL_BLEND )&#xD;&#xA;        glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA )&#xD;&#xA;&#xD;&#xA;    def loadImage( image ):&#xD;&#xA;        textureSurface = pygame.image.load( image )&#xD;&#xA;	&#xD;&#xA;        textureData = pygame.image.tostring( textureSurface, &quot;RGBA&quot;, 1 )&#xD;&#xA;	&#xD;&#xA;        width = textureSurface.get_width()&#xD;&#xA;        height = textureSurface.get_height()&#xD;&#xA;&#xD;&#xA;        texture = glGenTextures(1)&#xD;&#xA;        glBindTexture( GL_TEXTURE_2D, texture )&#xD;&#xA;        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR )&#xD;&#xA;        glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR )&#xD;&#xA;        glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData )&#xD;&#xA;&#xD;&#xA;        return texture, width, height&#xD;&#xA;&#xD;&#xA;    def delTexture( texture ):&#xD;&#xA;        glDeleteTextures( texture )&#xD;&#xA;&#xD;&#xA;    def createTexDL(texture, width, height):&#xD;&#xA;        newList = glGenLists(1)&#xD;&#xA;        glNewList(newList,GL_COMPILE);&#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, texture)&#xD;&#xA;        glBegin(GL_QUADS)&#xD;&#xA;        glTexCoord2f(0, 0); glVertex2f(0, 0)    # Bottom Left Of The Texture and Quad&#xD;&#xA;        glTexCoord2f(0, 1); glVertex2f(0, height)    # Top Left Of The Texture and Quad&#xD;&#xA;        glTexCoord2f(1, 1); glVertex2f( width,  height)    # Top Right Of The Texture and Quad&#xD;&#xA;        glTexCoord2f(1, 0); glVertex2f(width, 0)    # Bottom Right Of The Texture and Quad&#xD;&#xA;        glEnd()&#xD;&#xA;        glEndList()&#xD;&#xA;&#xD;&#xA;        return newList&#xD;&#xA;&#xD;&#xA;    def delDL(list):&#xD;&#xA;        glDeleteLists(list, 1)&#xD;&#xA;&#xD;&#xA;example2a.py:&#xD;&#xA;&#xD;&#xA;    import gutil&#xD;&#xA;    import pygame&#xD;&#xA;    from pygame.locals import *&#xD;&#xA;    from OpenGL.GL import *&#xD;&#xA;&#xD;&#xA;    def main():&#xD;&#xA;        pygame.init()&#xD;&#xA;        gutil.initializeDisplay(800, 600)&#xD;&#xA;&#xD;&#xA;        glColor4f(1.0,1.0,1.0,1.0)&#xD;&#xA;&#xD;&#xA;        done = False&#xD;&#xA;&#xD;&#xA;        cowTex, w, h = gutil.loadImage('put here a correct file path to a png file')&#xD;&#xA;        cow = gutil.createTexDL(cowTex, w, h)&#xD;&#xA;        alienTex, w, h = gutil.loadImage('put here a correct file path to a png file')&#xD;&#xA;        alien = gutil.createTexDL(alienTex, w, h)&#xD;&#xA;&#xD;&#xA;        while not done:&#xD;&#xA;	&#xD;&#xA;            glColor4f(1.0,1.0,1.0,1.0)&#xD;&#xA;	&#xD;&#xA;            glEnable( GL_TEXTURE_2D ) # enable texture&#xD;&#xA;            glLoadIdentity()&#xD;&#xA;            glTranslatef(0, 0, 0)&#xD;&#xA;            glCallList(cow)&#xD;&#xA;            glTranslatef(400, 400, 0)&#xD;&#xA;            glCallList(alien)&#xD;&#xA;            glDisable( GL_TEXTURE_2D ) # disable texture&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;            glLoadIdentity();  # reset the MODEL_VIEW matrix&#xD;&#xA;            &#xD;&#xA;            glColor3f( 1.0, 0.0, 0.0 ) # set color to red&#xD;&#xA;            glBegin( GL_TRIANGLES )&#xD;&#xA;            glVertex2i( 0, 0 )&#xD;&#xA;            glVertex2i( 100, 0 )&#xD;&#xA;            glVertex2i( 100, 100 )&#xD;&#xA;            glEnd()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            pygame.display.flip()&#xD;&#xA;&#xD;&#xA;            eventlist = pygame.event.get()&#xD;&#xA;            for event in eventlist:&#xD;&#xA;                if event.type == QUIT \&#xD;&#xA;                    or event.type == KEYDOWN and event.key == K_ESCAPE:&#xD;&#xA;                        done = True&#xD;&#xA;&#xD;&#xA;    if __name__ == '__main__':&#xD;&#xA;        main()&#xD;&#xA;&#xD;&#xA;Review that your code is exactly the same. Put extreme caution in the identation. If copy and past the code below, convert the spaces into tab. If you try this and have a problem you can write a comment." />
  <row Id="21392" PostHistoryTypeId="2" PostId="10259" RevisionGUID="8054992d-6592-46d0-83a6-c636ddc222b5" CreationDate="2011-03-27T18:44:36.437" UserId="3794" Text="If something works that doesn't mean that it is correct. And your solution is not correct.&#xD;&#xA;&#xD;&#xA;You propably want to send View matrix (which defines camera position), because why to have skybox if you can't look around? And propably also world matrix to add some scale. Personally i like using vertex position as texture coordinate if you know what you are doing. How does it should look:&#xD;&#xA;&#xD;&#xA;    uniform mat4 projectionMatrix;&#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec4 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;&#xD;&#xA;       texCoord = position; &#xD;&#xA;       gl_Position = modelViewMatrix * projectionMatrix * position; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`gl_Position` should contain 3D position converted to the 2D screen space. Thats what modelViewProjection does. And `texCoord` should be texture position on a vertex, which is usualy does not change with vertex's position on a screen, so no multiplication with any matrices. (Maybe there are some cases when it has sense to multiply texture coord with projection matrix, but sky box is definitevely not one of them).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21393" PostHistoryTypeId="2" PostId="10260" RevisionGUID="564e3090-09d0-438a-9481-bdb32d0671f2" CreationDate="2011-03-27T19:10:50.860" UserId="3794" Text="This is correct way how to save few bits. As it is correct it is also little bit useless. GPU is highly optimized for 3D algebra and can do matrix-vector multiplication pretty fast. Same fast in 2D or 3D. This would be slightly faster on CPU, but not on GPU. &#xD;&#xA;&#xD;&#xA;But it is ok and smart also. Just try to keep your eye on real problems like correct memory usage (textures, vertex buffers) and algorithms. Not on &quot;micro optimizations&quot;.&#xD;&#xA;&#xD;&#xA;And no, you can't make it better." />
  <row Id="21394" PostHistoryTypeId="5" PostId="10259" RevisionGUID="a76281b1-bdd5-4145-9992-c55b8309fde7" CreationDate="2011-03-27T19:22:11.913" UserId="3794" Comment="added 3 characters in body" Text="If something works that doesn't mean that it is correct. And your solution is not correct.&#xD;&#xA;&#xD;&#xA;You propably want to send View matrix (which defines camera position), because why to have skybox if you can't look around? And propably also world matrix to add some scale. Personally i like using vertex position as texture coordinate if you know what you are doing. This is how it should look:&#xD;&#xA;&#xD;&#xA;    uniform mat4 projectionMatrix;&#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec4 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;&#xD;&#xA;       texCoord = position; &#xD;&#xA;       gl_Position = modelViewMatrix * projectionMatrix * position; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`gl_Position` should contain 3D position converted to the 2D screen space. Thats what modelViewProjection does. And `texCoord` should be texture position on a vertex, which is usualy does not change with vertex's position on a screen, so no multiplication with any matrices. (Maybe there are some cases when it has sense to multiply texture coord with projection matrix, but sky box is definitevely not one of them).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21395" PostHistoryTypeId="5" PostId="10259" RevisionGUID="99d3f916-4d7a-4398-afaf-f9a9b7fcd65f" CreationDate="2011-03-27T19:29:18.147" UserId="3794" Comment="deleted 96 characters in body" Text="You propably want to send View matrix (which defines camera position), because why to have skybox if you can't look around? And propably also world matrix to add some scale. Personally i like using vertex position as texture coordinate if you know what you are doing. This is how it should look:&#xD;&#xA;&#xD;&#xA;    uniform mat4 projectionMatrix;&#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec4 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;&#xD;&#xA;       texCoord = position; &#xD;&#xA;       gl_Position = modelViewMatrix * projectionMatrix * position; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`gl_Position` should contain 3D position converted to the 2D screen space. Thats what modelViewProjection does. And `texCoord` should be texture position on a vertex, which usualy does not changes with vertex's position on a screen, so no multiplication with any matrices. (Maybe there are some cases when it has sense to multiply texture coord with projection matrix, but sky box is definitevely not one of them).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21396" PostHistoryTypeId="25" PostId="10248" RevisionGUID="a08337a1-c052-4958-b564-d73444975368" CreationDate="2011-03-27T20:23:42.933" Comment="http://twitter.com/#!/StackGameDev/status/52103524179394560" />
  <row Id="21397" PostHistoryTypeId="2" PostId="10261" RevisionGUID="c557735c-a497-41a1-abd9-bcb4d676c789" CreationDate="2011-03-27T20:46:33.600" UserId="6359" Text="I am writing a game for android. We have an orthographic view setup, but the characters (ships, projectiles, etc). The enemies / characters will be able to rotate about the x axis. The problem is that I want to do the collision detection as if it were in 2d using sprites, meaning that if i have a ship with a top down view of&#xD;&#xA;&#xD;&#xA;    ---------&#xD;&#xA;    --------------&#xD;&#xA;    -----------------&#xD;&#xA;    --------------&#xD;&#xA;    ---------&#xD;&#xA;&#xD;&#xA;it might rotate to look like&#xD;&#xA;&#xD;&#xA;    -----&#xD;&#xA;    --------------&#xD;&#xA;    ---&#xD;&#xA;&#xD;&#xA;and i want to do all of the collisions based off of the appearance of a top down view. I was originally thinking of using glReadPixels, until I read that was unbelievably slow. Then I was thinking about using pre-rendered bitmaps, but that seems like a pain and not very great since some of our ships won't be 'normal' enough to just say &quot;Have a bitmap for every 45 degrees of rotation about the X&quot;. Does anyone have any suggestions?" />
  <row Id="21398" PostHistoryTypeId="1" PostId="10261" RevisionGUID="c557735c-a497-41a1-abd9-bcb4d676c789" CreationDate="2011-03-27T20:46:33.600" UserId="6359" Text="Android collision detection of a 3d object based on a 2d projection" />
  <row Id="21399" PostHistoryTypeId="3" PostId="10261" RevisionGUID="c557735c-a497-41a1-abd9-bcb4d676c789" CreationDate="2011-03-27T20:46:33.600" UserId="6359" Text="&lt;2d&gt;&lt;3d&gt;&lt;android&gt;&lt;collision-detection&gt;" />
  <row Id="21400" PostHistoryTypeId="25" PostId="10261" RevisionGUID="ee63fdda-afc3-49a0-9d08-9c06b418b489" CreationDate="2011-03-27T23:23:42.900" Comment="http://twitter.com/#!/StackGameDev/status/52148822683557888" />
  <row Id="21401" PostHistoryTypeId="2" PostId="10262" RevisionGUID="ae1d263a-18b6-429e-81ad-cd71e2947c89" CreationDate="2011-03-27T23:33:44.020" UserId="5021" Text="The moon is drawn with two draw calls, but both draw wrong on the xbox so I'm just displaying one draw for simplicity.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is how the moon should look on the PC:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;How it looks on the XBOX:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The texture flickers, disappears, looks like a gradient from bottom to top, lines run through it, and so on as the camera moves around. For example after moving the camera slightly it looks like this:&#xD;&#xA;http://olhovsky.com/xna/xbox_moon2.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public void Draw(Camera cam) &#xD;&#xA;    { &#xD;&#xA;        GraphicsDevice gd = Game3.GDM.GraphicsDevice; &#xD;&#xA;     &#xD;&#xA;        Vector3 position = Position + cam.Position; &#xD;&#xA;        Matrix world = Matrix.CreateScale(2.0f); &#xD;&#xA;        world *= Matrix.CreateConstrainedBillboard( &#xD;&#xA;        position, cam.Position, Vector3.Down, cam.Forward, null); &#xD;&#xA;     &#xD;&#xA;        _moonEffect2.Parameters[&quot;World&quot;].SetValue(world); &#xD;&#xA;        _moonEffect2.Parameters[&quot;View&quot;].SetValue(cam.View); &#xD;&#xA;        _moonEffect2.Parameters[&quot;Projection&quot;].SetValue(cam.Projection); &#xD;&#xA;     &#xD;&#xA;        // Draw blended part of moon only. &#xD;&#xA;        _moonEffect2.Parameters[&quot;AlphaTestDirection&quot;].SetValue(-1); &#xD;&#xA;        gd.BlendState = BlendState.AlphaBlend; &#xD;&#xA;        gd.RasterizerState = RasterizerState.CullNone; &#xD;&#xA;        gd.DepthStencilState = DepthStencilState.DepthRead; &#xD;&#xA;        ScreenQuadDraw.DrawQuad(_moonQuad, _moonEffect2); &#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the shader used, nothing complicated here:&#xD;&#xA;http://www.olhovsky.com/xna/Moon.fx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone know why the texture is not being displayed properly on the xbox? Is there another state I should be setting perhaps?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/t9C7c.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/L7Zi5.png" />
  <row Id="21402" PostHistoryTypeId="1" PostId="10262" RevisionGUID="ae1d263a-18b6-429e-81ad-cd71e2947c89" CreationDate="2011-03-27T23:33:44.020" UserId="5021" Text="Billboard draws fine on PC, not on XBOX." />
  <row Id="21403" PostHistoryTypeId="3" PostId="10262" RevisionGUID="ae1d263a-18b6-429e-81ad-cd71e2947c89" CreationDate="2011-03-27T23:33:44.020" UserId="5021" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="21404" PostHistoryTypeId="2" PostId="10263" RevisionGUID="90d283b8-4f6a-46da-9e00-4367ac67c92c" CreationDate="2011-03-28T01:06:32.490" UserId="4497" Text="I don't know of any commercial MMOs off the top of my head, but the [NetGore][1] Engine, the successor to the powerful [vbGore][2] Engine. NetGore is currently in very active development with a growing community.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.netgore.com/&#xD;&#xA;  [2]: http://www.vbgore.com/Main_Page" />
  <row Id="21405" PostHistoryTypeId="2" PostId="10264" RevisionGUID="a80e3dcc-6047-44c4-b976-5aa4669e24f3" CreationDate="2011-03-28T01:16:29.333" UserId="6363" Text="How different is Programmer Analyst from Game Programmer? &#xD;&#xA;I took the first one as my major but want to go with game development industry.&#xD;&#xA;Is it possible to transition from one to another?&#xD;&#xA;&#xD;&#xA;EDIT: There is a single class about game development in this major" />
  <row Id="21406" PostHistoryTypeId="1" PostId="10264" RevisionGUID="a80e3dcc-6047-44c4-b976-5aa4669e24f3" CreationDate="2011-03-28T01:16:29.333" UserId="6363" Text="Took one major now want to be in different industryssT" />
  <row Id="21407" PostHistoryTypeId="3" PostId="10264" RevisionGUID="a80e3dcc-6047-44c4-b976-5aa4669e24f3" CreationDate="2011-03-28T01:16:29.333" UserId="6363" Text="&lt;programming&gt;" />
  <row Id="21408" PostHistoryTypeId="2" PostId="10265" RevisionGUID="e565d343-67e5-4916-a57d-c31a61389817" CreationDate="2011-03-28T02:20:29.617" UserId="4662" Text="The GPU in an Xbox 360 is 240 billion flops, and it's a joke compared to modern desktop GPUs. You're not going to make any significant difference at all by spending 7 less flops in a shader. This is especially true if the GPU implements SIMD for 4 floats, which would make it nothing. This is not the right place to be spending time looking for optimizations." />
  <row Id="21409" PostHistoryTypeId="25" PostId="10262" RevisionGUID="6909a071-665f-46e7-881a-dcaf4ec531ba" CreationDate="2011-03-28T02:23:42.543" Comment="http://twitter.com/#!/StackGameDev/status/52194119837155328" />
  <row Id="21410" PostHistoryTypeId="5" PostId="10265" RevisionGUID="522da98b-1266-4af1-aefe-82e395a00939" CreationDate="2011-03-28T02:25:32.827" UserId="4662" Comment="added 89 characters in body" Text="The GPU in an Xbox 360 is 240 billion flops, and it's a joke compared to modern desktop GPUs. You're not going to make any significant difference at all by spending 7 less flops in a shader. This is especially true if the GPU implements SIMD for 4 floats, which it almost certainly will because 4x4 matrices are by far and away the most common, which would make it nothing. This is not the right place to be spending time looking for optimizations." />
  <row Id="21411" PostHistoryTypeId="2" PostId="10266" RevisionGUID="ca6c3785-7b0e-4fd0-bf5e-3e94f50aeb72" CreationDate="2011-03-28T02:59:18.347" UserId="6368" Text="Thanks for your replies. I have an idea that I will store info of time in files. Everyboy have a separate file store their &quot;last-times&quot;. How do you think about that? would reading file speed is faster than call in database?" />
  <row Id="21412" PostHistoryTypeId="2" PostId="10267" RevisionGUID="b18d6a3d-703e-43b6-8d1d-cb8105d6252d" CreationDate="2011-03-28T03:04:50.450" UserId="6367" Text="I have heard of many plugins/browser technologies that are useful for games, but I didn't dive into any of them yet because I've assumed that omni-support wasn't quite there.  By omni-support, I mean all browsers and all OSs.&#xD;&#xA;&#xD;&#xA;Since we've recently had many new game-specific plugins pop up (e.g. Unity), new web standards pop up (e.g. WebGL), and existing standards gain better support in IE (e.g. SVG), I'm wondering if this has changed.&#xD;&#xA;&#xD;&#xA;There are three fundamental requirements I see to making immersive games:&#xD;&#xA;&#xD;&#xA;- Solid mid-to-low level video/audio support (2D and 3D are both interesting)&#xD;&#xA;- Mouse capture&#xD;&#xA;- Full screen&#xD;&#xA;&#xD;&#xA;Are there technologies out there that support all three of these, that are cross-platform and cross-browser (including all the big browsers)?&#xD;&#xA;&#xD;&#xA;Standardized solutions are preferrable, but plugin-based solutions are okay, as long as they support free or very cheap development." />
  <row Id="21413" PostHistoryTypeId="1" PostId="10267" RevisionGUID="b18d6a3d-703e-43b6-8d1d-cb8105d6252d" CreationDate="2011-03-28T03:04:50.450" UserId="6367" Text="Cross-browser cross-platform web support for immersive/non-casual games" />
  <row Id="21414" PostHistoryTypeId="3" PostId="10267" RevisionGUID="b18d6a3d-703e-43b6-8d1d-cb8105d6252d" CreationDate="2011-03-28T03:04:50.450" UserId="6367" Text="&lt;browser-based-games&gt;&lt;hardware-acceleration&gt;" />
  <row Id="21415" PostHistoryTypeId="5" PostId="10266" RevisionGUID="fc474f0a-5a35-474b-b02b-3596e78739b5" CreationDate="2011-03-28T03:10:52.253" UserId="6368" Comment="added 12 characters in body" Text="Thanks for your replies. I have an idea that I will store info of time in files. Everyboy have a separate file store their &quot;last-times&quot;. How do you think about that? would reading and writing file speed is faster than call in database?" />
  <row Id="21416" PostHistoryTypeId="2" PostId="10268" RevisionGUID="f7cf012a-a24a-4739-8e02-5dcdb3f59974" CreationDate="2011-03-28T03:14:38.180" UserId="51" Text="Unity is still your best bet.  It works in Chrome/IE/Firefox/Safari and on Mac and PC.  They're playing around with a &lt;a href=&quot;http://blogs.unity3d.com/2011/03/24/ninjacamp-iii-foxes-and-penguins-unite/&quot;&gt;linux port&lt;/a&gt;, but I wouldn't expect to see that be live for quite some time.&#xD;&#xA;&#xD;&#xA;Unfortunately the so-called open standards just aren't there yet in terms of implementation.  &#xD;&#xA;&#xD;&#xA;Pretty soon &lt;a href=&quot;http://labs.adobe.com/technologies/flashplatformruntimes/incubator/features/molehill.html&quot;&gt;Adobe Molehill&lt;/a&gt; will be a lot more pervasive if you're looking for 3D rendering in a browser. If you're just looking for sheer install base, this will be the most applicable.  Then again, Unity is working on &lt;a href=&quot;http://blogs.unity3d.com/2011/02/27/unity-flash-3d-on-the-web/&quot;&gt;exporting to that platform&lt;/a&gt; as well.&#xD;&#xA;&#xD;&#xA;Unity does a pretty good job of supporting all sorts of old video cards (even pre-DX7 hardware), it has 3D audio, and of course it can go fullscreen.  I don't know what specifically you mean by &quot;mouse capture&quot; but you can do FPS style controls with it." />
  <row Id="21417" PostHistoryTypeId="5" PostId="10267" RevisionGUID="d03ddbb2-c222-40e2-a985-721c4631fd73" CreationDate="2011-03-28T03:28:42.660" UserId="6367" Comment="added 255 characters in body" Text="I have heard of many plugins/browser technologies that are useful for games, but I didn't dive into any of them yet because I've assumed that omni-support wasn't quite there.  By omni-support, I mean all browsers and all OSs.&#xD;&#xA;&#xD;&#xA;Since we've recently had many new game-specific plugins pop up (e.g. Unity), new web standards pop up (e.g. WebGL), and existing standards gain better support in IE (e.g. SVG), I'm wondering if this has changed.&#xD;&#xA;&#xD;&#xA;There are three fundamental requirements I see to making immersive games:&#xD;&#xA;&#xD;&#xA;- Solid mid-to-low level video/audio support (2D and 3D are both interesting)&#xD;&#xA;- Mouse capture&#xD;&#xA;- Full screen&#xD;&#xA;&#xD;&#xA;Are there technologies out there that support all three of these, that are cross-platform and cross-browser (including all the big browsers)?&#xD;&#xA;&#xD;&#xA;Standardized solutions are preferrable, but plugin-based solutions are okay, as long as they support free or very cheap development.&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;I realize I posed my question as &quot;are there any such technologies&quot;.  I'm actually interested in all such technologies.  If there is only one, it may still be useful to list other technologies, what they lack, and when they might get there." />
  <row Id="21418" PostHistoryTypeId="2" PostId="10269" RevisionGUID="ec36e80c-0a6e-416b-9fa1-fad88b5a3531" CreationDate="2011-03-28T03:57:01.120" UserId="6214" Text="Let's say I am in a battle with four trolls, and I have the highest initiative, so I attack first. Should I randomly choose a troll to attack? Proximity to each troll does not matter (it is not a factor in the algorithm). I remember playing an older RPG (I think one of the Final Fantasy games on N64), and the attacks appeared random. You might have one troll that never gets hit, or you might have one that always gets hit. Is there an acceptable standard?" />
  <row Id="21419" PostHistoryTypeId="1" PostId="10269" RevisionGUID="ec36e80c-0a6e-416b-9fa1-fad88b5a3531" CreationDate="2011-03-28T03:57:01.120" UserId="6214" Text="What NPC gets attacked first when attacking an NPC party in an RPG?" />
  <row Id="21420" PostHistoryTypeId="3" PostId="10269" RevisionGUID="ec36e80c-0a6e-416b-9fa1-fad88b5a3531" CreationDate="2011-03-28T03:57:01.120" UserId="6214" Text="&lt;character&gt;&lt;rpg&gt;" />
  <row Id="21421" PostHistoryTypeId="2" PostId="10270" RevisionGUID="db98234e-953e-4b80-90b7-572cd465cdc6" CreationDate="2011-03-28T05:22:36.173" UserId="4662" Text="If you don't have a good reason for otherwise, then the player always chooses." />
  <row Id="21422" PostHistoryTypeId="25" PostId="10267" RevisionGUID="dd8b9118-4033-4cd1-8a80-07bdd63cd6dc" CreationDate="2011-03-28T05:23:42.943" Comment="http://twitter.com/#!/StackGameDev/status/52239419557675008" />
  <row Id="21423" PostHistoryTypeId="2" PostId="10271" RevisionGUID="f92e7d51-5cb5-4418-a468-074a924a2369" CreationDate="2011-03-28T06:21:45.350" UserId="2710" Text="Sorry, those are Russian games, but I assure you they're very real MMOs and have servers made with .NET. I worked on these servers myself, in fact (-8&#xD;&#xA;&#xD;&#xA;[Arena Online][1]&#xD;&#xA;&#xD;&#xA;[Elements of war][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://arena.ru&#xD;&#xA;  [2]: http://www.elements-of-war.com/" />
  <row Id="21424" PostHistoryTypeId="2" PostId="10272" RevisionGUID="a53c3fcd-516f-414c-900d-3b8f1f5eb280" CreationDate="2011-03-28T07:00:33.477" UserId="1610" Text="The biggest troll or the most dangerous one." />
  <row Id="21425" PostHistoryTypeId="2" PostId="10273" RevisionGUID="135f9414-5be3-4fa9-acf1-d357918a4a9b" CreationDate="2011-03-28T07:21:37.257" UserId="1562" Text="Even though it's not directly what you were asking for, there already is a question regarding games that utilize scripting. Some of them might be options for you as well, notably [LÖVE][1] (Engine)&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/4922/game-engine-with-good-lua-entity-creation-management&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://love2d.org/" />
  <row Id="21426" PostHistoryTypeId="2" PostId="10274" RevisionGUID="40f095f1-218e-44a9-ac12-22af185b439c" CreationDate="2011-03-28T07:32:15.553" UserId="3644" Text="OpenGL is a state machine, whenever you set it to a state you need to revert that state after you've used it. You have set current texture to be &quot;texture&quot;, once you've called the list you need to restore the 0 texture (no texture state).&#xD;&#xA;&#xD;&#xA;Textures aren't stored with display lists, so there's no need to bind them when making lists.&#xD;&#xA;&#xD;&#xA;Your code should look like so:&#xD;&#xA;&#xD;&#xA;    //Create lists and fill them up&#xD;&#xA;    glNewList(newList,GL_COMPILE)&#xD;&#xA;    glBegin(GL_QUADS)&#xD;&#xA;    glTexCoord2f(0, 0); glVertex2f(0, 0)&#xD;&#xA;    .....&#xD;&#xA;    glTexCoord2f(1, 0); glVertex2f(width, 0)&#xD;&#xA;    glEnd()&#xD;&#xA;    glEndList()&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;    &#xD;&#xA;    //Bind texture and call the list&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, texture)&#xD;&#xA;    glCallList(newList)&#xD;&#xA;&#xD;&#xA;    //Bind another texture and call another list&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, texture2)&#xD;&#xA;    glCallList(newList2)&#xD;&#xA;&#xD;&#xA;    //UnBind texture&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, 0)&#xD;&#xA;&#xD;&#xA;    //Render any other untextured polygons/triangles in any fashion (Call lists, begin/end)&#xD;&#xA;&#xD;&#xA;The reason why you had your polygons invisible most probably is that your texture is black/transparent at 0;0 coordinates. And when you draw your polygons they had been using 0;0 texture coords (default)." />
  <row Id="21427" PostHistoryTypeId="25" PostId="10269" RevisionGUID="64f80f67-fd3e-4158-ba21-5720050a7d8a" CreationDate="2011-03-28T08:23:43.163" Comment="http://twitter.com/#!/StackGameDev/status/52284719064285184" />
  <row Id="21428" PostHistoryTypeId="2" PostId="10275" RevisionGUID="1ed34530-3dd0-4437-959d-8b6cf58e1f37" CreationDate="2011-03-28T11:01:50.093" UserId="789" Text="[RunUO][1] and [SunUO][2] are free Ultima Online servers. Ultima Online client can be downloaded for free.&#xD;&#xA;&#xD;&#xA;&gt; SunUO is a free Ultima Online server for Linux/Mono and Windows.NET, based on RunUO. Ultima Online is a commercial MMORPG by Origin / Electronic Arts. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://runuo.com/home/&#xD;&#xA;  [2]: http://www.sunuo.org/" />
  <row Id="21429" PostHistoryTypeId="2" PostId="10276" RevisionGUID="fb69a9a5-6675-4e08-803f-99b691aa7347" CreationDate="2011-03-28T11:09:42.413" UserId="6374" Text="Moo&#xD;&#xA;&#xD;&#xA;The first bone in the model contains the orientation the object had at time of export in 3dsmax. Doing a matrix transform using this bone (to the left of world matrix, matrix multiplication order matters) should orient your model correctly. Eg. If your model's rotation is set to Quaternion.Identity (no rotation) and you transform via first bone, your model should appear with same orientation as you see in 3dsmax.&#xD;&#xA;&#xD;&#xA;^^ I found that out the painful way after wondering the same thing, why my models kept showing up backwards...&#xD;&#xA;&#xD;&#xA;(3dsmax 2010, exporting as fbx version 200900)&#xD;&#xA;&#xD;&#xA;See this snippet from my draw method:&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;Matrix[] modelTransform = new Matrix[gameobject.TexturedModel.Model.Bones.Count];&#xD;&#xA;                gameobject.TexturedModel.Model.CopyAbsoluteBoneTransformsTo(modelTransform);&#xD;&#xA;&#xD;&#xA;                Matrix worldMatrix = Matrix.CreateFromQuaternion(gameobject.Rotation) * Matrix.CreateScale(mGlobalScale * gameobject.Scale) * Matrix.CreateTranslation(gameobject.Position);&#xD;&#xA;&#xD;&#xA;                foreach (ModelMesh mesh in gameobject.TexturedModel.Model.Meshes)&#xD;&#xA;                {&#xD;&#xA;                    foreach (BasicEffect effect in mesh.Effects)&#xD;&#xA;                    {&#xD;&#xA;                        if (gameobject.TexturedModel.UseTexture) //override the default texture&#xD;&#xA;                        {&#xD;&#xA;                            effect.Texture = gameobject.TexturedModel.Texture;&#xD;&#xA;                        }&#xD;&#xA;&#xD;&#xA;                        effect.EnableDefaultLighting();&#xD;&#xA;&#xD;&#xA;                        effect.PreferPerPixelLighting = true;&#xD;&#xA;&#xD;&#xA;                        //effect.World = worldMatrix;            &#xD;&#xA;                        effect.World = modelTransform[mesh.ParentBone.Index] * worldMatrix;&#xD;&#xA;&#xD;&#xA;                        effect.Projection = projectionMatrix;&#xD;&#xA;                        effect.View = viewMatrix;&#xD;&#xA;                    }&#xD;&#xA;                    mesh.Draw();&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                //if (gameobject is CompoundUnit)&#xD;&#xA;                //{&#xD;&#xA;                //    ((CompoundUnit)gameobject).ChildObjects.ForEach(child =&gt; DrawGameObject(child));&#xD;&#xA;                //}" />
  <row Id="21430" PostHistoryTypeId="25" PostId="10264" RevisionGUID="557a3468-b996-4689-878e-56440d1e38ed" CreationDate="2011-03-28T11:23:42.773" Comment="http://twitter.com/#!/StackGameDev/status/52330016012369920" />
  <row Id="21431" PostHistoryTypeId="2" PostId="10277" RevisionGUID="d291596c-4d14-421d-ba58-f7da6b0f41e1" CreationDate="2011-03-28T11:24:25.213" UserId="6341" Text="I basically want my camera in 3D move automatically. Currently, I have linear movement which is rather dumb, so I'd like to do a bouncing movement.&#xD;&#xA;&#xD;&#xA;However, what is a good equation for bouncing? I mean, for a circle you can do `y = sqrt(1 - x^2)`, but if I were to have a bouncing graph, what would the corresponding formula be? I guess it's something with `abs` as it has to 'bounce'. Something like (I made this up with Paint):&#xD;&#xA;![bouncing graph][1]&#xD;&#xA;&#xD;&#xA;What is a good equation that results in such a graph? The transformations I can do myself I guess, but I'm just looking for the *kind* of equation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/esvZo.png" />
  <row Id="21432" PostHistoryTypeId="1" PostId="10277" RevisionGUID="d291596c-4d14-421d-ba58-f7da6b0f41e1" CreationDate="2011-03-28T11:24:25.213" UserId="6341" Text="Equation for bouncing graph?" />
  <row Id="21433" PostHistoryTypeId="3" PostId="10277" RevisionGUID="d291596c-4d14-421d-ba58-f7da6b0f41e1" CreationDate="2011-03-28T11:24:25.213" UserId="6341" Text="&lt;3d&gt;&lt;math&gt;&lt;camera&gt;&lt;movement&gt;" />
  <row Id="21434" PostHistoryTypeId="2" PostId="10278" RevisionGUID="99ba10e5-0f52-411e-98ab-714f2dcf4619" CreationDate="2011-03-28T12:38:28.217" UserId="6284" Text="Instead of providing a direct answer I want to point you in the right direction. If you google for AI for moving entities you will find algorithms using variables like speed, mass, velocity and accerelation. If you add the gravitational force into the equation you should get realistic behaviour. &#xD;&#xA;&#xD;&#xA;As stated in one of the comments to your questions it is not that complicated.&#xD;&#xA;&#xD;&#xA;I recommend [Programming game AI by example][1] which I found very helpful. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?ie=UTF8&amp;qid=1301315729&amp;sr=8-1" />
  <row Id="21435" PostHistoryTypeId="2" PostId="10279" RevisionGUID="d051ea79-bd77-4d50-ad8f-a6856a895bce" CreationDate="2011-03-28T14:05:32.013" UserId="1923" Text="Using a graphical equation will not help you apply natural looking accelerations to the system. You may be surprised to find how easy it would be to simply use basic Newtonian equations here. Give the object a little mass and momentum and let the force of gravity and Newton handle the accelerations &amp; position changes. It's far easier than you may think&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21436" PostHistoryTypeId="2" PostId="10280" RevisionGUID="5905b003-1a0b-4fc5-9db0-a1c12137a550" CreationDate="2011-03-28T14:07:11.190" UserId="6307" Text="Let's say I have an xml file which looks like this&#xD;&#xA;&#xD;&#xA;    &lt;Weapons&gt;&#xD;&#xA;     &lt;Weapon&gt;&#xD;&#xA;      &lt;Name&gt;Pistol&lt;/Name&gt;&#xD;&#xA;      ...&#xD;&#xA;     &lt;/Weapon&gt;&#xD;&#xA;     &lt;Weapon&gt;&#xD;&#xA;      &lt;Name&gt;MachineGun&lt;/Name&gt;&#xD;&#xA;      ...&#xD;&#xA;     &lt;/Weapon&gt;&#xD;&#xA;    &lt;/Weapons&gt;&#xD;&#xA;&#xD;&#xA;Would it be possible to use a custom importer/writer/reader to create two files, Pistol.xnb and MachineGun.xnb which I can load individually with Content&lt;MY_TYPE&gt;.Load()?&#xD;&#xA;&#xD;&#xA;While writing this I realized I could just import a Weapon[] list and split them up with a helper, but I'm still wondering if this is possible?&#xD;&#xA;" />
  <row Id="21437" PostHistoryTypeId="1" PostId="10280" RevisionGUID="5905b003-1a0b-4fc5-9db0-a1c12137a550" CreationDate="2011-03-28T14:07:11.190" UserId="6307" Text="Can XNA Content Pipeline split one content file into several .xnb?" />
  <row Id="21438" PostHistoryTypeId="3" PostId="10280" RevisionGUID="5905b003-1a0b-4fc5-9db0-a1c12137a550" CreationDate="2011-03-28T14:07:11.190" UserId="6307" Text="&lt;xna&gt;" />
  <row Id="21439" PostHistoryTypeId="25" PostId="10277" RevisionGUID="b8d58c4b-5d2d-4563-b448-f457607b746e" CreationDate="2011-03-28T14:23:43.057" Comment="http://twitter.com/#!/StackGameDev/status/52375315426713600" />
  <row Id="21440" PostHistoryTypeId="5" PostId="10278" RevisionGUID="69192b45-f499-4b1d-95d8-b630592358f3" CreationDate="2011-03-28T14:25:24.630" UserId="6284" Comment="added 159 characters in body" Text="Instead of providing a direct answer I want to point you in the right direction. If you google for AI for moving entities you will find algorithms using variables like speed, mass, velocity and accerelation. If you add the gravitational force into the equation you should get realistic behaviour. &#xD;&#xA;&#xD;&#xA;As stated in one of the comments to your questions it is not that complicated.&#xD;&#xA;&#xD;&#xA;I recommend [Programming game AI by example][1] which I found very helpful. &#xD;&#xA;&#xD;&#xA;I also found [this link][2] explaining the forces involved for a bouncing ball.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?ie=UTF8&amp;qid=1301315729&amp;sr=8-1&#xD;&#xA;  [2]: http://answers.yahoo.com/question/index?qid=20081025084648AAyueGw" />
  <row Id="21441" PostHistoryTypeId="2" PostId="10281" RevisionGUID="9efd3f77-5ee6-45bb-a149-c409b1723600" CreationDate="2011-03-28T14:26:29.420" UserId="6377" Text="Two options right now (besides roll-your-own)&#xD;&#xA;&#xD;&#xA;OpenFeint is in alpha/beta for WP7 (so Silverlight/XNA would be available too). However the signup hasn't progressed beyond an email saying it's coming soon.&#xD;&#xA;&#xD;&#xA;OpenXLive is an open version of the XBL leaderboard system. It looks like it's XNA but there are tutorials for Silverlight as well so you can use both.&#xD;&#xA;&#xD;&#xA;Both systems have leaderboards, achievements, etc. but at the time of this answer only OpenXLive is actually usable.&#xD;&#xA;&#xD;&#xA;OpenXLive:&#xD;&#xA;http://www.openxlive.com/&#xD;&#xA;&#xD;&#xA;OpenFeint:&#xD;&#xA;http://www.openfeint.com/&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="21442" PostHistoryTypeId="2" PostId="10282" RevisionGUID="91b07a15-86b1-4e66-a332-1b49218b0edf" CreationDate="2011-03-28T14:43:56.367" UserId="6169" Text="Having such restrictions on your players would get extremely annoying for them very quickly.&#xD;&#xA;You're effectively forcing them to be online and playing your game nearly 24/7.&#xD;&#xA;&#xD;&#xA;What will happen when a user can't log on for a few days because they're on a vacation? All their animals and plants would die, there might be other disasters.&#xD;&#xA;Not very userfriendly.&#xD;&#xA;&#xD;&#xA;Better to stop the timer when the user logs off, and start it again when he next logs on. Effectively their farm only exists when they're on the server (except of course that noone can buy land on its area, if you're working with such a system)." />
  <row Id="21443" PostHistoryTypeId="2" PostId="10283" RevisionGUID="8b4148c5-4bee-4a98-b650-db180ad3caef" CreationDate="2011-03-28T15:04:19.540" UserId="288" Text="Basically: **No**.&#xD;&#xA;&#xD;&#xA;The content pipeline transforms a single input file into a single output file. It can also do a single input file plus dependencies, into a single output file. And you can also trigger building of other files into assets.&#xD;&#xA;&#xD;&#xA;But it cannot generate multiple outputs from a single file.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://forums.create.msdn.com/forums/p/13638/71547.aspx&quot;&gt;This thread&lt;/a&gt; on the App Hub forums explains it in more detail. (And may have some ideas for work-arounds.)" />
  <row Id="21444" PostHistoryTypeId="2" PostId="10284" RevisionGUID="bfffa5fd-e30f-4f7f-91ea-e16a360dfd6f" CreationDate="2011-03-28T15:12:50.563" UserId="-1" Text="" />
  <row Id="21445" PostHistoryTypeId="2" PostId="10285" RevisionGUID="287e0f99-a1e5-4053-afed-4de488087f48" CreationDate="2011-03-28T15:12:50.563" UserId="-1" Text="" />
  <row Id="21446" PostHistoryTypeId="2" PostId="10286" RevisionGUID="25dbcd79-ff85-4c77-a1f3-7981d10728cd" CreationDate="2011-03-28T15:19:18.827" UserId="2332" Text="If you want bouncing then look into the [Coefficient of Restitution][1]. It's a value between 0 and 1 that represents the &quot;bounciness&quot; of the camera. A value of 0 means that no bouncing will occur when the object collides with the ground, and 1 means that the camera will bounce back up to it's original height after it has collided with the ground (in this scenario anyway).&#xD;&#xA;&#xD;&#xA;The easiest way to implement it is to give your camera an initial velocity vector (call it u) and you want to find the final velocity vector after the camera has collided (lets call this v). Lets call the CoR e.&#xD;&#xA;&#xD;&#xA;e = v / u  &#xD;&#xA;&#xD;&#xA;So all you need to do is multiply your initial velocity by the coefficient, negate this velocity (for it to travel in the opposite direction) and voila, you have your final velocity and if you keep doing this for every time it collides, you have your bouncing motion. This is assuming you have a flat plane that you want to bounce against, if you have a complex mesh you're colliding against, then instead of negating the vector, simply multiply it by the normal of the polygon you collide with (which is essentially what negation does on a flat plane).&#xD;&#xA;&#xD;&#xA;Use some sort of position update function (Euler, Verlet or even RK4 - see [this link][2]) and it will make this task a lot easier.&#xD;&#xA;&#xD;&#xA;Hope that helps (and I hope my maths isn't too far off :P)&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Coefficient_of_restitution&#xD;&#xA;  [2]: http://codeflow.org/entries/2010/aug/28/integration-by-example-euler-vs-verlet-vs-runge-kutta/" />
  <row Id="21447" PostHistoryTypeId="2" PostId="10287" RevisionGUID="3cd73bff-4bc4-4bf9-9914-dee7589da243" CreationDate="2011-03-28T15:23:45.033" UserId="-1" Text="" />
  <row Id="21448" PostHistoryTypeId="2" PostId="10288" RevisionGUID="c1c1784d-e1a0-4125-9987-d8d01008610b" CreationDate="2011-03-28T15:23:45.033" UserId="-1" Text="" />
  <row Id="21449" PostHistoryTypeId="2" PostId="10289" RevisionGUID="8818d04a-5be7-407f-912d-5f4802c5c97d" CreationDate="2011-03-28T15:34:23.183" UserId="-1" Text="" />
  <row Id="21450" PostHistoryTypeId="2" PostId="10290" RevisionGUID="4e293543-f8cc-4e13-9fbe-4ad180b2dfb4" CreationDate="2011-03-28T15:34:23.183" UserId="-1" Text="" />
  <row Id="21451" PostHistoryTypeId="2" PostId="10291" RevisionGUID="ae269c54-39ac-4081-a1ef-ad2e15493542" CreationDate="2011-03-28T15:39:50.517" UserId="2798" Text="Yes, you can.&#xD;&#xA;&#xD;&#xA;With the dependency system, you can call&#xD;&#xA;&#xD;&#xA;    ContentProcessorContext.BuildAsset&#xD;&#xA;    ContentProcessorContext.BuildAndLoadAsset&#xD;&#xA;&#xD;&#xA;to make the Content Pipeline build whichever asset you want, and get the external reference to that file. Keep in mind that this isn't very flexible, and all the assets built this way will have the name of the original asset plus &quot;_0&quot;, &quot;_1&quot;, etc. to mark them as dependent from the original.&#xD;&#xA;&#xD;&#xA;Also, ContentProcessorContext is an abstract class and you can inherit from it and extend with the functionality you want. So, when you are compiling your specific asset, create a new instance of your custom processor context and let it do its own magic.&#xD;&#xA;&#xD;&#xA;Keep in mind that this requires a very advanced knowledge of the XNA pipeline and will be too much effort if you are a beginner.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21452" PostHistoryTypeId="5" PostId="10288" RevisionGUID="a785aaa7-720c-4d03-a1c9-d541fcc9e18e" CreationDate="2011-03-28T16:02:47.727" UserId="3588" Comment="added 59 characters in body" Text="The circular movement of an object around a specific axis. " />
  <row Id="21453" PostHistoryTypeId="24" PostId="10288" RevisionGUID="a785aaa7-720c-4d03-a1c9-d541fcc9e18e" CreationDate="2011-03-28T16:02:47.727" Comment="Proposed by 3588 approved by 51 edit id of 114" />
  <row Id="21454" PostHistoryTypeId="5" PostId="10287" RevisionGUID="0113a9ae-153c-4501-baa7-e695d95cfc9f" CreationDate="2011-03-28T16:02:50.660" UserId="3588" Comment="added 605 characters in body" Text="One of the primary forms of movement transformation on an object in space, alongside translation and reflection. &#xD;&#xA;&#xD;&#xA;In games, especially 2D games, rotation can provide a lot of complexity in comparison to translation and reflection. For example, in collision detection, rotation does not guarantee the same borders and hitbox that are preserved in the other methods. Questions under the purview of this tag include all manner of scenarios dealing with the consequences of rotating an object in space.&#xD;&#xA;&#xD;&#xA;Not to be confused with other definitions of rotation, such as &quot;rotating through a roster of units&quot;." />
  <row Id="21455" PostHistoryTypeId="24" PostId="10287" RevisionGUID="0113a9ae-153c-4501-baa7-e695d95cfc9f" CreationDate="2011-03-28T16:02:50.660" Comment="Proposed by 3588 approved by 51 edit id of 113" />
  <row Id="21456" PostHistoryTypeId="5" PostId="10285" RevisionGUID="98453e39-ee69-46ab-8599-3c0f437e6f49" CreationDate="2011-03-28T16:02:55.403" UserId="3588" Comment="added 77 characters in body" Text="Algorithms or methods to produce events or behavior that is random in nature." />
  <row Id="21457" PostHistoryTypeId="24" PostId="10285" RevisionGUID="98453e39-ee69-46ab-8599-3c0f437e6f49" CreationDate="2011-03-28T16:02:55.403" Comment="Proposed by 3588 approved by 51 edit id of 112" />
  <row Id="21458" PostHistoryTypeId="5" PostId="10284" RevisionGUID="f43e7bbc-246a-40a3-8918-1c7515d7d866" CreationDate="2011-03-28T16:02:59.630" UserId="3588" Comment="added 551 characters in body" Text="&lt;sup&gt;Not to be confused with the [Super User moderator](http://superuser.com/users/307/random), no matter how appropriate.&lt;/sup&gt;  &#xD;&#xA;Random variance is a very common component of many games. From calculating the amount of damage dealt, to determining what opponents will be faced, to constructing entire dungeons through procedural generation, randomness is a spice that creates variety in a playing experience.&#xD;&#xA;&#xD;&#xA;There are many ways to apply random calculations to a game, and the level of emphasis can greatly alter how strategy and gameplay evolve." />
  <row Id="21459" PostHistoryTypeId="24" PostId="10284" RevisionGUID="f43e7bbc-246a-40a3-8918-1c7515d7d866" CreationDate="2011-03-28T16:02:59.630" Comment="Proposed by 3588 approved by 51 edit id of 111" />
  <row Id="21460" PostHistoryTypeId="5" PostId="10290" RevisionGUID="3020fcc6-e9f3-457b-afe2-4082b2972783" CreationDate="2011-03-28T16:03:02.813" UserId="3588" Comment="added 125 characters in body" Text="A simple term for &quot;translation&quot;, the change of position of an entity typically on the route of going from point A to point B." />
  <row Id="21461" PostHistoryTypeId="24" PostId="10290" RevisionGUID="3020fcc6-e9f3-457b-afe2-4082b2972783" CreationDate="2011-03-28T16:03:02.813" Comment="Proposed by 3588 approved by 51 edit id of 116" />
  <row Id="21462" PostHistoryTypeId="5" PostId="10289" RevisionGUID="8474ed34-b165-4f0a-a4fc-97bd88f6bcdd" CreationDate="2011-03-28T16:03:05.670" UserId="3588" Comment="added 421 characters in body" Text="Questions in this tag deal with how in-game entities move about in the world, such as:&#xD;&#xA;&#xD;&#xA; - How to track the movement of an entity&#xD;&#xA; - How to plot out complex and patterned forms of movement (like a sin wave)&#xD;&#xA; - Altering the method of movement to emphasize or de-emphasize realism.&#xD;&#xA;&#xD;&#xA;This is only about movement with respect to positional change. For body movement of an entity, like walking legs, see [tag:animation]." />
  <row Id="21463" PostHistoryTypeId="24" PostId="10289" RevisionGUID="8474ed34-b165-4f0a-a4fc-97bd88f6bcdd" CreationDate="2011-03-28T16:03:05.670" Comment="Proposed by 3588 approved by 51 edit id of 115" />
  <row Id="21464" PostHistoryTypeId="6" PostId="10280" RevisionGUID="edb14800-ad52-4acd-ab32-8bc0815c911f" CreationDate="2011-03-28T16:03:10.177" UserId="3588" Comment="Added tags ♪" Text="&lt;xna&gt;&lt;pipeline&gt;&lt;xml&gt;" />
  <row Id="21465" PostHistoryTypeId="24" PostId="10280" RevisionGUID="edb14800-ad52-4acd-ab32-8bc0815c911f" CreationDate="2011-03-28T16:03:10.177" Comment="Proposed by 3588 approved by 51 edit id of 117" />
  <row Id="21466" PostHistoryTypeId="6" PostId="10215" RevisionGUID="dfdf91a8-f019-43ec-98aa-18a25949d8e8" CreationDate="2011-03-28T16:03:14.950" UserId="3588" Comment="Added tags. I considered adding the 3DSMax tag, but held back because I don't think FBX is exclusive to 3DSMax. If you think it should go, though, please feel free to improve this edit and add it. ♪" Text="&lt;xna&gt;&lt;pipeline&gt;" />
  <row Id="21467" PostHistoryTypeId="24" PostId="10215" RevisionGUID="dfdf91a8-f019-43ec-98aa-18a25949d8e8" CreationDate="2011-03-28T16:03:14.950" Comment="Proposed by 3588 approved by 51 edit id of 118" />
  <row Id="21468" PostHistoryTypeId="2" PostId="10292" RevisionGUID="372d1249-1b6b-48cc-a563-9a7ce218c3cd" CreationDate="2011-03-28T16:28:19.927" UserId="3175" Text="I have no idea of the server side but the DDO client throws exceptions that look like .net when it crashes." />
  <row Id="21469" PostHistoryTypeId="2" PostId="10293" RevisionGUID="3b9d1e1a-34bc-4025-8359-68b769895f01" CreationDate="2011-03-28T16:58:39.117" UserId="-1" Text="" />
  <row Id="21470" PostHistoryTypeId="2" PostId="10294" RevisionGUID="6136aba6-7ebf-4bbb-9b85-2ee87b76422b" CreationDate="2011-03-28T16:58:39.117" UserId="-1" Text="" />
  <row Id="21471" PostHistoryTypeId="5" PostId="10294" RevisionGUID="197cc907-3c6b-4871-90d2-c346c9e2c7cb" CreationDate="2011-03-28T17:16:05.217" UserId="3588" Comment="added 97 characters in body" Text="The creation and layout of the individual rooms/stages/sections in which the game takes place in." />
  <row Id="21472" PostHistoryTypeId="24" PostId="10294" RevisionGUID="197cc907-3c6b-4871-90d2-c346c9e2c7cb" CreationDate="2011-03-28T17:16:05.217" Comment="Proposed by 3588 approved by 51 edit id of 120" />
  <row Id="21473" PostHistoryTypeId="5" PostId="10293" RevisionGUID="a269e838-a2b1-4b9b-a0dd-19b8ed3d4e1e" CreationDate="2011-03-28T17:16:08.057" UserId="3588" Comment="added 399 characters in body" Text="This tag can apply whether the stages are discretely disconnected, if they join together to form one giant connected map, or if the game takes place in just one giant (but complicated) room/area.&#xD;&#xA;&#xD;&#xA;Level design problems often involve storing and reading the data for individual levels, methods in how to generate or assist in the construction of levels, and elements of the appearance of the level." />
  <row Id="21474" PostHistoryTypeId="24" PostId="10293" RevisionGUID="a269e838-a2b1-4b9b-a0dd-19b8ed3d4e1e" CreationDate="2011-03-28T17:16:08.057" Comment="Proposed by 3588 approved by 51 edit id of 119" />
  <row Id="21475" PostHistoryTypeId="2" PostId="10295" RevisionGUID="4d205338-0de4-4bba-98df-e37de9a9fe2a" CreationDate="2011-03-28T17:20:29.780" UserId="20" Text="I'd look into a physics engine like [Box2D][1] or [Nape][2]. These engines come with several different joints you can use to animate lots of different stuff. Here's an [example of the different joints/constraints][3] possible.&#xD;&#xA;&#xD;&#xA;On the Box2D (for Flash) homepage you'll also find a Ragdoll example which probably comes really close to what you're trying to achieve. Maybe you could take the [ragdoll-example code][4] as a starting point for your own modifications?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2dflash.org/&#xD;&#xA;  [2]: http://code.google.com/p/nape/&#xD;&#xA;  [3]: http://www.newgrounds.com/dump/item/9a2d2f8c69ad6af45e6535c2c1e2f320&#xD;&#xA;  [4]: http://box2dflash.svn.sourceforge.net/viewvc/box2dflash/Examples/TestBed/TestRagdoll.as?revision=158&amp;view=markup" />
  <row Id="21476" PostHistoryTypeId="25" PostId="10280" RevisionGUID="c1c62755-43e6-421a-a962-f8c39fcfa7df" CreationDate="2011-03-28T17:23:42.853" Comment="http://twitter.com/#!/StackGameDev/status/52420613423374336" />
  <row Id="21477" PostHistoryTypeId="2" PostId="10296" RevisionGUID="141bac71-b693-4ae6-aa53-1d254d8903e0" CreationDate="2011-03-28T17:30:52.557" UserId="5771" Text="I've done a reasonable number of small hobby projects using directx9 but it's time to move to directx11 now.&#xD;&#xA;&#xD;&#xA;I have Frank Luna'a book  on 3d programming using DirectX10 but nothing on directx11. I belive they are pretty similar though, but was wondering if anyone could enumerate the main differences at a code level I'll need (or point to an existing source).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21478" PostHistoryTypeId="1" PostId="10296" RevisionGUID="141bac71-b693-4ae6-aa53-1d254d8903e0" CreationDate="2011-03-28T17:30:52.557" UserId="5771" Text="Moving from directx10 to directx11" />
  <row Id="21479" PostHistoryTypeId="3" PostId="10296" RevisionGUID="141bac71-b693-4ae6-aa53-1d254d8903e0" CreationDate="2011-03-28T17:30:52.557" UserId="5771" Text="&lt;directx&gt;" />
  <row Id="21480" PostHistoryTypeId="2" PostId="10297" RevisionGUID="89bde989-d0e7-492c-8246-8f16352ff4e9" CreationDate="2011-03-28T17:36:24.683" UserId="3794" Text="There will be no need to change. Directx11 only adds new features. You will just changing numbers from ID3D10 to ID3D11 etc." />
  <row Id="21481" PostHistoryTypeId="2" PostId="10298" RevisionGUID="e3be6d4b-341a-4392-a921-08fb21273d09" CreationDate="2011-03-28T17:41:03.983" UserId="2469" Text="I think the main difference is that, in DX11 the DXFont is gone, other than that it's pretty much as notabene said. You should be fine with that DX10 book. I used that one when moving to DX11 and I had no problems. You will need to go and look at the msdn from time to time though, there are some minor differences in the API a some places IIRC." />
  <row Id="21482" PostHistoryTypeId="5" PostId="10297" RevisionGUID="08134046-b590-4294-8d52-50eaf26920cf" CreationDate="2011-03-28T17:41:48.157" UserId="3794" Comment="added 315 characters in body" Text="There will be no need to change. Directx11 only adds new features. You will just changing numbers from ID3D10 to ID3D11 etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;DirectX11 adds (if not talking about hyped HW tessalation) Direct Compute: API for the GPGPU, with excelent connection to the graphics pipe line (i cant say this about CUDA, or openCL). And possibility of multiple RW textures and buffers on a pixel shader, which opens lots of new possibilities." />
  <row Id="21483" PostHistoryTypeId="2" PostId="10299" RevisionGUID="4e007a90-1e83-4dd7-8fa6-06b02a68cd38" CreationDate="2011-03-28T17:56:42.853" UserId="1430" Text="The SDK documentation has [a section on migrating to 11][1] that covers coming from both 9 and 10. There's also the [D3D11 features page][2].&#xD;&#xA;&#xD;&#xA;One of the single biggest changes in terms of API shape between 10 and 11 is that 11 moves a bunch of methods from the device itself to a new interface called a device context (`ID3D11DeviceContext` specifically), in order to support the new multi-threading features.&#xD;&#xA;&#xD;&#xA;Once you are aware of the change, though, it's quite easy to adapt to: where you would have in 10 called &quot;`someDevice-&gt;Draw()`&quot; you will instead [get the immediate context for the device][3] and call &quot;`immediateContext-&gt;Draw()`.&quot;&#xD;&#xA;&#xD;&#xA;The other big change is that the Effects API is pulled out of core and made an independent source distribution you must compile and link yourself. You may also notice some D3DX interfaces and functions that have been deprecated or removed.&#xD;&#xA;&#xD;&#xA;Beyond that, there are a handful of new parameters to some functions and a handful of extra fields in structures, et cetera. For example, the [buffer description object in 11][4] has an extra `StructureByteStride` field that [isn't in 10][5], and device creation involves passing [feature level][6] information. Plus there are the obvious and aforementioned changes in interface names (10s replaced with 11s).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476190%28v=VS.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ff476342%28v=VS.85%29.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/ff476529%28v=VS.85%29.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/ff476092%28v=VS.85%29.aspx&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/bb204896%28v=vs.85%29.aspx&#xD;&#xA;  [6]: http://msdn.microsoft.com/en-us/library/ff476876%28v=vs.85%29.aspx" />
  <row Id="21484" PostHistoryTypeId="2" PostId="10300" RevisionGUID="d9466bd5-1b60-4493-8e2b-ea21e72fea5f" CreationDate="2011-03-28T18:04:47.467" UserId="-1" Text="" />
  <row Id="21485" PostHistoryTypeId="2" PostId="10301" RevisionGUID="41358b01-d527-483f-a503-f742c88c3223" CreationDate="2011-03-28T18:04:47.467" UserId="-1" Text="" />
  <row Id="21486" PostHistoryTypeId="5" PostId="10090" RevisionGUID="fada45bc-14b7-4c3b-86fb-748dc8d17151" CreationDate="2011-03-28T18:15:03.963" UserId="3327" Comment="added an update, de facto." Text="I have recently been invited to do some volunteer playtesting for a pretty well known developer. They made it very clear that it was on a volunteer basis only. It's not a job and I won't be getting paid. What should I expect? What kind of input are they going to be looking for from me? What tips do you have for doing the playtesting well? What should I do to ensure I'll be invited back? Have you or anyone you know done something similar to this before?&#xD;&#xA;&#xD;&#xA;Also, although this is unlikely (at best) to turn into a job, what tips do you have for possibly getting my foot in the door at the company? I am happy to just be able to participate, but I would love to be able to make some good connections since I plan on building a career in the game industry. Thanks in advance.&#xD;&#xA;&#xD;&#xA;Update:  &#xD;&#xA;I've been invited back to be part of a regular test group for the same game. We went over some UI designs and filled out a survey on what we thought of them and how well we understood them. Then we had a video taped Q&amp;A session with the QA supervisor and some of the developers. We discussed the designs we critiqued in the survey and elaborated more on what we thought of them. Finally, before leaving, we played a few rounds of one of the test builds of the game, just for fun. It was a great experience and from what I observed about the offices and the general work atmosphere, I'm even more sure I've made the right career choice for myself, personally.  &#xD;&#xA;I've accepted an answer to this question, but I'm still open to hearing about experiences from other people who have been involved in volunteer playtesting!" />
  <row Id="21487" PostHistoryTypeId="5" PostId="10251" RevisionGUID="2fac4458-267f-454f-b468-82fe992fce50" CreationDate="2011-03-28T18:31:02.920" UserId="3644" Comment="added 1 characters in body" Text="Games should not be realistic, you can always cut some corners if it makes the game better. Take a look at Ascendancy for example: http://www.abandonia.com/files/games/221/Ascendancy_5.png &#xD;&#xA;&#xD;&#xA;You can loop the 2D terrain from left to right and from bottom to top. Like a Civilization map does.&#xD;&#xA;&#xD;&#xA;Another option would be to make &quot;unwalkable&quot; polar caps, like we have here on Earth ;-) They will hide the areas of stretched grid." />
  <row Id="21488" PostHistoryTypeId="5" PostId="10300" RevisionGUID="4b47b9e7-4a62-496d-9b84-e3ab76d8008d" CreationDate="2011-03-28T18:33:50.797" UserId="3588" Comment="added 530 characters in body" Text="Especially in regulated games with leaderboards, a game developer may want to ensure that a player cannot use methods, such as tampering with otherwise inaccessible game state data or automating macro actions, to gain an advantage in a game. Due to these actions not following the general rules of gameplay that a standard player abides by, they may be considered unfair and unsporting.&#xD;&#xA;&#xD;&#xA;This tag is for developing systems to detect and counter cheating in a game. It may help to specify the kinds of cheating that are expected." />
  <row Id="21489" PostHistoryTypeId="24" PostId="10300" RevisionGUID="4b47b9e7-4a62-496d-9b84-e3ab76d8008d" CreationDate="2011-03-28T18:33:50.797" Comment="Proposed by 3588 approved by 14 edit id of 121" />
  <row Id="21490" PostHistoryTypeId="5" PostId="10301" RevisionGUID="d5006c86-fb1b-4fe9-a00e-57533f289550" CreationDate="2011-03-28T18:33:53.107" UserId="3588" Comment="added 80 characters in body" Text="Methods employed by the developer to discourage or prevent cheating in the game." />
  <row Id="21491" PostHistoryTypeId="24" PostId="10301" RevisionGUID="d5006c86-fb1b-4fe9-a00e-57533f289550" CreationDate="2011-03-28T18:33:53.107" Comment="Proposed by 3588 approved by 14 edit id of 122" />
  <row Id="21492" PostHistoryTypeId="2" PostId="10302" RevisionGUID="696e2e00-18d3-41be-84e0-6ce41fe5f699" CreationDate="2011-03-28T18:37:27.470" UserId="3644" Text="You could solve an equation to see which strategy is the best.&#xD;&#xA;&#xD;&#xA;There are 4 trolls and they all are different. Each one does N damage per second and takes T time to kill. In said example you have 24 possible killing sequences (1-2-3-4, 1-2-4-3, 1-3-4-2, etc..) you can estimate/compute all of them in under 1ms and choose/suggest the best strategy for the player. &#xD;&#xA;&#xD;&#xA;Of course it would be nice if player could choose any one he likes to be killed first instead :)" />
  <row Id="21493" PostHistoryTypeId="2" PostId="10303" RevisionGUID="7c8092ce-401c-44a3-b4cb-46eaa59fa960" CreationDate="2011-03-28T18:54:06.100" UserId="1156" Text="From a realistic-y type PoV:&#xD;&#xA;&#xD;&#xA;The heroes aren't really going to know 'oh look, this troll is the most damaged' or 'this one is the largest threat' too much. Mostly since they'll be avoiding getting hit. They're going to attack whatever is closest to them. As such, I would say in  the situation like this (H for Hero, E for Enemy)&#xD;&#xA;&#xD;&#xA;&gt;       E1   &#xD;&#xA;&gt; H1   E2&#xD;&#xA;&gt; &#xD;&#xA;&gt; H2   E3  &#xD;&#xA;&gt;      E4 H3&#xD;&#xA;&gt; &#xD;&#xA;&gt;       E5&#xD;&#xA;&#xD;&#xA;H1 will go for E2, H2 for E3, H3 for E4. &#xD;&#xA;&#xD;&#xA;The other option is totally random, or let the player choose. It's probably easiest to let the player choose to avoid 'whoops, accidentally didn't kill the boss who had 3hp left oh look I am dead'." />
  <row Id="21494" PostHistoryTypeId="2" PostId="10304" RevisionGUID="ec83cdca-6d82-4079-b7d9-ba28e701c172" CreationDate="2011-03-28T19:12:33.577" UserId="6341" Text="I'm looking for a website which contains sounds for use in a game. I have found several websites with WAV/MP3 sound snippets but most of the sounds are not appropriate for a game.&#xD;&#xA;&#xD;&#xA;Specifically, what I'm looking for is a website with sounds like:&#xD;&#xA;&#xD;&#xA; - background sounds for in a game&#xD;&#xA; - sounds when you win (e.g. fireworks / simple tune)&#xD;&#xA; - click sounds when you do something generic in the game&#xD;&#xA;&#xD;&#xA;I came across [this website][1]. The background midi's on the bottom are interesting but is there something similar on a website dedicated to game sounds?&#xD;&#xA;&#xD;&#xA;Lastly, I actually need it to be available free of charge.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.talkingwav.com/ringtones_videos.html" />
  <row Id="21495" PostHistoryTypeId="1" PostId="10304" RevisionGUID="ec83cdca-6d82-4079-b7d9-ba28e701c172" CreationDate="2011-03-28T19:12:33.577" UserId="6341" Text="What's a site for game sounds?" />
  <row Id="21496" PostHistoryTypeId="3" PostId="10304" RevisionGUID="ec83cdca-6d82-4079-b7d9-ba28e701c172" CreationDate="2011-03-28T19:12:33.577" UserId="6341" Text="&lt;engine&gt;&lt;sound&gt;&lt;sound-effects&gt;" />
  <row Id="21497" PostHistoryTypeId="2" PostId="10305" RevisionGUID="f78152c7-d9da-4cc4-b709-dc7cd0c2e34d" CreationDate="2011-03-28T19:26:23.090" UserId="2532" Text="There are a bunch of different ways to solve this problem, as others have said. This ranges from a completely random choice to completely player chosen.&#xD;&#xA;&#xD;&#xA;One game that has the style of semi-randomness that you were talking about was Ogre Battle 64. All attacks were done without player choice, but you could direct how you wanted your squad to act. The options were autonomous (pretty much completely random), target weakest (try to kill the enemy with the weakest health), target strongest (slowly weaken the opposing squad), or target leader (without a leader, the squad tries to run back to their base).&#xD;&#xA;&#xD;&#xA;The kind of system you want depends on the kind of game you are making. The typical Final Fantasy game is not based around large scale strategy, but are more based on the individual tactics of a single fight; allowing for almost complete player choice tends to be the best bet for this style. In a squad based game, like Ogre Battle, you may want to make the player focus more on the strategy, such as where the squads are placed on the map, or which enemies to kill or weaken first." />
  <row Id="21498" PostHistoryTypeId="2" PostId="10306" RevisionGUID="d45c0aa5-2767-4184-98ec-7ad23ca310e8" CreationDate="2011-03-28T19:32:05.603" UserId="6117" Text="Depends on how smart you want the decision to be, which is a gameplay design decision - do i want a fluid gameplay where your AI party members automatically pick the correct things to hit on the head so that the player can just do his thing and keep hacking and slashing without being interrupted, or do i want &quot;dumb&quot; party members so that the player has to use his head and make all strategical decisions (maybe even after pausing the game)?&#xD;&#xA;&#xD;&#xA;In Dragon Age (might have been done before so don't kill me) for example they've let the player pre-script the behavior of his party members and tell them how to &quot;automatically&quot; make that decision (and others as well).&#xD;&#xA;&#xD;&#xA;About the AI picking which one to start striking first - are they all identical and distance doesn't matter? In that case i don't see why not pick a random one. Otherwise some things to take into consideration are which one would be the fastest to kill (least armored, smallest health buffer, already damaged)? Which one deals the most damage? Which one has an ability to heal it's allies? Which one has misc abilities that might be a threat - such as temporary disabling your friendly characters and debuffing them. Make some sort of a score system for all those, the one with the highest score wins." />
  <row Id="21499" PostHistoryTypeId="5" PostId="10306" RevisionGUID="b837f081-9f58-4afe-9b13-0148ee174c8d" CreationDate="2011-03-28T19:41:22.443" UserId="6117" Comment="added 73 characters in body" Text="Depends on how smart you want the decision to be, which is a gameplay design decision - do i want a fluid gameplay where your AI party members automatically pick the correct things to hit on the head so that the player can just do his thing and keep hacking and slashing without being interrupted, or do i want &quot;dumb&quot; party members so that the player has to use his head and make all strategical decisions (maybe even after pausing the game)?&#xD;&#xA;&#xD;&#xA;In Dragon Age (might have been done before so don't kill me) for example they've let the player pre-script the behavior of his party members and tell them how to &quot;automatically&quot; make that decision (and others as well).&#xD;&#xA;&#xD;&#xA;About the AI picking which one to start striking first - are they all identical and distance doesn't matter? In that case i don't see why not pick a random one. Otherwise some things to take into consideration are which one would be the fastest to kill (least armored, smallest health buffer, already damaged)? Which one deals the most damage? Which one has an ability to heal it's allies? Which one has misc abilities that might be a threat - such as temporary disabling your friendly characters and debuffing them. Based on those and other factors you should make some sort of a score system, you check which troll gets the highest score, and this one gets attacked first." />
  <row Id="21500" PostHistoryTypeId="2" PostId="10307" RevisionGUID="3f12be29-08ce-4145-beaa-05dc93a5a7b6" CreationDate="2011-03-28T19:42:56.450" UserId="20" Text="If your movement should look a lot like your graph, you could make use of a bounce easing equation like this one ([source][1]):&#xD;&#xA;&#xD;&#xA;    // BOUNCE EASING: exponentially decaying parabolic bounce&#xD;&#xA;    easeOutBounce = function (t, b, c, d) {&#xD;&#xA;        if ((t/=d) &lt; (1/2.75)) {&#xD;&#xA;            return c*(7.5625*t*t) + b;&#xD;&#xA;        } else if (t &lt; (2/2.75)) {&#xD;&#xA;            return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;&#xD;&#xA;        } else if (t &lt; (2.5/2.75)) {&#xD;&#xA;            return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;&#xD;&#xA;        } else {&#xD;&#xA;            return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    easeInBounce = function (t, b, c, d) {&#xD;&#xA;        return c - Math.easeOutBounce (d-t, 0, c, d) + b;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The movement would look in this graph (easeIn):&#xD;&#xA;![bounce ease in][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.robertpenner.com/easing/&#xD;&#xA;  [2]: http://i.stack.imgur.com/DniMl.png" />
  <row Id="21501" PostHistoryTypeId="2" PostId="10308" RevisionGUID="2ac6a2ca-b15d-4f9d-9948-1a33526b2436" CreationDate="2011-03-28T19:44:52.950" UserId="5899" Text="[Freesound][1] is a good website to find sounds for a game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.freesound.org/" />
  <row Id="21502" PostHistoryTypeId="2" PostId="10309" RevisionGUID="a1492626-2aa5-4506-807a-346515b1be35" CreationDate="2011-03-28T20:11:00.400" UserId="395" Text="http://www.bfxr.net/ is excellent for making this kind of thing." />
  <row Id="21503" PostHistoryTypeId="25" PostId="10304" RevisionGUID="fa26a941-b0d7-474e-aece-cfa48d555e97" CreationDate="2011-03-28T21:00:01.903" Comment="http://twitter.com/#!/StackGameDev/status/52475050191896576" />
  <row Id="21504" PostHistoryTypeId="2" PostId="10310" RevisionGUID="3cd7883e-f774-4391-aee0-4bc7b30b560b" CreationDate="2011-03-28T21:25:08.183" UserId="6383" Text="I'm currently making a 2D Worm-clone in XNA, and have regrets about the way I've made my camera. I declare my camera in my Main class and the camera follows the player. In my draw I then begin my spritebatch using my camera transformations.&#xD;&#xA;&#xD;&#xA;The problem is, EVERYTHING needs to be drawn in Main because they need to be drawn under the camera transformations (unless I send the camera to each classes constructor). &#xD;&#xA;&#xD;&#xA;My question is, is there a way to make it so the Camera is basically global over my whole program, everything is &quot;by default&quot; affected by it? Or at least so it's not only in Main and I can have things that draw themselves.&#xD;&#xA;&#xD;&#xA;I've searched for tutorials, but they all explain how to make the camera and to implement it in one draw function, not over a whole program with many different entities." />
  <row Id="21505" PostHistoryTypeId="1" PostId="10310" RevisionGUID="3cd7883e-f774-4391-aee0-4bc7b30b560b" CreationDate="2011-03-28T21:25:08.183" UserId="6383" Text="2D XNA game Camera issue" />
  <row Id="21506" PostHistoryTypeId="3" PostId="10310" RevisionGUID="3cd7883e-f774-4391-aee0-4bc7b30b560b" CreationDate="2011-03-28T21:25:08.183" UserId="6383" Text="&lt;xna&gt;&lt;c#&gt;&lt;camera&gt;" />
  <row Id="21510" PostHistoryTypeId="2" PostId="10312" RevisionGUID="5b2027ea-f469-459c-9d54-796f6c9e2e1b" CreationDate="2011-03-28T21:30:30.020" UserId="6381" Text="You could also have people donate/pay for you to work on new features once the game has a following. For instance, if a group of users really want the ability to ride horses in your game, members would donate money to have you put that at the top of the priority list." />
  <row Id="21511" PostHistoryTypeId="5" PostId="10304" RevisionGUID="486875a7-542a-474f-93d3-fd421b7ac7e9" CreationDate="2011-03-28T21:30:31.867" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sounds for my game?](http://gamedev.stackexchange.com/questions/8/where-can-i-find-free-sounds-for-my-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I'm looking for a website which contains sounds for use in a game. I have found several websites with WAV/MP3 sound snippets but most of the sounds are not appropriate for a game.&#xD;&#xA;&#xD;&#xA;Specifically, what I'm looking for is a website with sounds like:&#xD;&#xA;&#xD;&#xA; - background sounds for in a game&#xD;&#xA; - sounds when you win (e.g. fireworks / simple tune)&#xD;&#xA; - click sounds when you do something generic in the game&#xD;&#xA;&#xD;&#xA;I came across [this website][1]. The background midi's on the bottom are interesting but is there something similar on a website dedicated to game sounds?&#xD;&#xA;&#xD;&#xA;Lastly, I actually need it to be available free of charge.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.talkingwav.com/ringtones_videos.html" />
  <row Id="21512" PostHistoryTypeId="10" PostId="10304" RevisionGUID="c89ed6bd-d6a4-4bc7-9baa-11e913ce259e" CreationDate="2011-03-28T21:30:31.617" UserId="189" CloseReasonId="1" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="21513" PostHistoryTypeId="2" PostId="10313" RevisionGUID="6f5490d5-5615-462a-af10-4c7fb4a206f9" CreationDate="2011-03-28T21:31:34.667" UserId="5259" Text="Section 2 of [this paper][1] has some interesting notes on hierarchical triangle models, but you might find more immediately useful material looking at [geodesic grids][2]. You need to supply the connectivity information, but that will get you to a good approximation of a sphere.&#xD;&#xA;&#xD;&#xA;As Krom pointed out, you certainly can setup your own system for connections, allowing for colonization of weird extra-dimensional spaces at the most weird, or simpler structures such as a Halo-ish ring world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: ftp://ftp.research.microsoft.com/pub/tr/tr-2005-123.pdf&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Geodesic_grid" />
  <row Id="21515" PostHistoryTypeId="18" PostId="10304" RevisionGUID="35be3bc6-1c45-4737-86eb-80449e52deb2" CreationDate="2011-03-28T21:36:48.033" UserId="51" Comment="to http://gamedev.stackexchange.com/questions/8/where-can-i-find-free-sounds-for-my-game" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="21516" PostHistoryTypeId="18" PostId="10308" RevisionGUID="35be3bc6-1c45-4737-86eb-80449e52deb2" CreationDate="2011-03-28T21:36:48.033" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/10304/whats-a-site-for-game-sounds" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="21517" PostHistoryTypeId="18" PostId="10309" RevisionGUID="35be3bc6-1c45-4737-86eb-80449e52deb2" CreationDate="2011-03-28T21:36:48.033" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/10304/whats-a-site-for-game-sounds" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="21518" PostHistoryTypeId="18" PostId="8" RevisionGUID="35be3bc6-1c45-4737-86eb-80449e52deb2" CreationDate="2011-03-28T21:36:48.033" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/10304/whats-a-site-for-game-sounds" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="21519" PostHistoryTypeId="14" PostId="10304" RevisionGUID="8fff376c-3045-43b6-bf1f-348931203b14" CreationDate="2011-03-28T21:36:48.393" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="21520" PostHistoryTypeId="5" PostId="10313" RevisionGUID="d90c6dc3-ada8-46d0-a134-fa532941b7ba" CreationDate="2011-03-28T22:07:06.040" UserId="5259" Comment="added 114 characters in body" Text="Section 2 of [this paper][1] has some interesting notes on hierarchical triangle models, but you might find more immediately useful material looking at [geodesic grids][2]. You need to supply the connectivity information, but that will get you to a good approximation of a sphere.&#xD;&#xA;&#xD;&#xA;[This paper][3] also has some interesting ideas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As Krom pointed out, you certainly can setup your own system for connections, allowing for colonization of weird extra-dimensional spaces at the most weird, or simpler structures such as a Halo-ish ring world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: ftp://ftp.research.microsoft.com/pub/tr/tr-2005-123.pdf&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Geodesic_grid&#xD;&#xA;  [3]: http://webpages.sou.edu/~sahrk/dgg/pubs/gdggs03.pdf" />
  <row Id="21521" PostHistoryTypeId="2" PostId="10314" RevisionGUID="6ad386e9-2e11-44db-8ea7-5f1b9edd9b3b" CreationDate="2011-03-28T22:10:48.097" UserId="6384" Text="I've been researching this extensively.&#xD;&#xA;&#xD;&#xA;We have a game that's 90% complete, using custom game logic in iPhone 4.0. We've been asked to import a 3D model and have it animate when various events happen in the game. &#xD;&#xA;&#xD;&#xA;I've put together an OpenGL view (based on Eagl and several examples), and used Blender to import the model, as well as Jeff LeMarche's script to export the .h file. After much trial, it worked, and I was able to show a rotating model (unskinned). &#xD;&#xA;&#xD;&#xA;However, the 3d artist hadn't UV unwrapped the model, so provided me a new model, this one as a Maya file, along with animation in a FBX format, a .obj file, and .tga texture unwrapped.&#xD;&#xA;&#xD;&#xA;My question is : how can I use FBX inside OpenGL ES inside iPhone to run through animations? And what's the pipeline to get this Maya file into Blender to be able to create a .h file. I've tried the [obj2opengl][1] however the model is missing normals (did it have it in the first place?) and the skin isn't applying at all (possibly a code issue, something I think I can fix).&#xD;&#xA;&#xD;&#xA;I'm trying to use [Jeff LeMarche's animation tutorial][2] but can't figure out how to get the model files into a proper .h file for use.  &#xD;&#xA;&#xD;&#xA;Any advice?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://heikobehrens.net/2009/08/27/obj2opengl/&#xD;&#xA;  [2]: http://iphonedevelopment.blogspot.com/2009/12/opengl-es-from-ground-up-part-9a.html" />
  <row Id="21522" PostHistoryTypeId="1" PostId="10314" RevisionGUID="6ad386e9-2e11-44db-8ea7-5f1b9edd9b3b" CreationDate="2011-03-28T22:10:48.097" UserId="6384" Text="iPhone Open GL ES using FBX - How do I import animations from FBX into iPhone?" />
  <row Id="21523" PostHistoryTypeId="3" PostId="10314" RevisionGUID="6ad386e9-2e11-44db-8ea7-5f1b9edd9b3b" CreationDate="2011-03-28T22:10:48.097" UserId="6384" Text="&lt;iphone&gt;&lt;opengl-es&gt;" />
  <row Id="21524" PostHistoryTypeId="2" PostId="10315" RevisionGUID="84e1e360-86bd-499b-8a82-2953f1221c5f" CreationDate="2011-03-28T22:18:20.243" UserId="5259" Text="What you are looking for is the [spherical coordinate system][1]. Note that you have to be careful what order you apply the rotations in.&#xD;&#xA;&#xD;&#xA;A simple overview of some useful 3d coordinate systems is covered [here][2].&#xD;&#xA;&#xD;&#xA;A very distilled set of slides on generic transforms is covered [here][3].&#xD;&#xA;&#xD;&#xA;Honestly, given your use of VHDL, I would suggest implementing a 4-element dot product (take two vectors of length 4, multiply them together element-by-element, and sum the products), and use that to create a matrix-vector multiply. If you have the general capability, all the rest of affine math for graphics is within your reach.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Spherical_coordinate_system&#xD;&#xA;  [2]: http://electron9.phys.utk.edu/vectors/3dcoordinates.htm&#xD;&#xA;  [3]: http://pages.cs.brandeis.edu/~cs155/Lecture_07_6.pdf" />
  <row Id="21525" PostHistoryTypeId="2" PostId="10316" RevisionGUID="70d085b7-3a7a-4be0-8d10-eb7970cf11a7" CreationDate="2011-03-28T22:21:34.990" UserId="6386" Text="Import the file with blender and then convert it to something you can use. &#xD;&#xA;The 3D iPhone engine [oolong][1] can import blender files for example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/oolongengine/" />
  <row Id="21526" PostHistoryTypeId="2" PostId="10317" RevisionGUID="24e2e0e7-6aa8-431b-8232-206660195f6a" CreationDate="2011-03-28T22:30:27.487" UserId="5253" Text="I am curious on how to handle collision detection involving a moving target and user input. Basing myself in the mobile space, I get events from a set framework, but I do wonder about the amount of lag involved.&#xD;&#xA;&#xD;&#xA;Say the object moves faster and faster, then position of the input and the object is very important. What I want to know is what is the best design for handling user input and then also the best way to make sure to accurately work out when the input point collides with the object, keeping threads in mind?" />
  <row Id="21527" PostHistoryTypeId="1" PostId="10317" RevisionGUID="24e2e0e7-6aa8-431b-8232-206660195f6a" CreationDate="2011-03-28T22:30:27.487" UserId="5253" Text="Collision with User Input and Object" />
  <row Id="21528" PostHistoryTypeId="3" PostId="10317" RevisionGUID="24e2e0e7-6aa8-431b-8232-206660195f6a" CreationDate="2011-03-28T22:30:27.487" UserId="5253" Text="&lt;game-design&gt;&lt;c++&gt;" />
  <row Id="21529" PostHistoryTypeId="25" PostId="10296" RevisionGUID="0a680722-91b0-4766-a53a-309627a3494c" CreationDate="2011-03-29T00:00:10.287" Comment="http://twitter.com/#!/StackGameDev/status/52520384813203456" />
  <row Id="21530" PostHistoryTypeId="2" PostId="10318" RevisionGUID="9836072a-4e5b-413c-a1a0-3bd4c2a5f60c" CreationDate="2011-03-29T01:20:51.250" UserId="5916" Text="Your question is so vague that it cannot really be answered. However, you sound new so I'm going to try and help. Here is what I suggest you do if you truly want to make computer games:&#xD;&#xA;&#xD;&#xA;&gt; I am curious on how to handle collision detection involving a moving target and user input... but I do wonder about the amount of lag involved.&#xD;&#xA;&#xD;&#xA;Your first question tells me that you really need to read up on your Matrix mathematics, in all non trivial cases it will come down to some small Maths to work out if the users press on the screen was on an object. Usually by firing a projection through your world starting at the camera and seeing if it collides with anything. For Matrix Maths knowledge and vector calculus in general start with this good guide: [Vector Math Tutorial for 3D Computer Graphics][1]. (Those sixteen chapters give you the basics and it should take you a few months to learn that properly.)&#xD;&#xA;&#xD;&#xA;&gt; Say the object moves faster and faster, then position of the input and the object is very important. What I want to know is what is the best design for handling user input and then also the best way to make sure to accurately work out when the input point collides with the object, keeping threads in mind?&#xD;&#xA;&#xD;&#xA;Once you know the Math, knowing how to handle collisions with 'jumping' objects due to high speed is relatively easy. Ask a new question about that specifically if it does not come easily to you; but only once you have read that Vector Calculus math above.&#xD;&#xA;&#xD;&#xA;There is no 'best designs' for handling user input in games, just methods that work well for your particular game. Just try and make the simplest thing that will work and improve them only if you need to.&#xD;&#xA;&#xD;&#xA;Now accuracy in video games! That is a real problem and one that requires true concentration and skill, if your game needs a high level of accuracy, and you are using floating point values like 'float' and 'double' to represent things then you will need to learn how to deal with those properly too otherwise you will see serious and subtle problems occur in your games. I would recommended looking at: [Comparing Floating Point Numbers][2] and [other good articles][3] on the topic too to see if, and how, it will effect you.&#xD;&#xA;&#xD;&#xA;As for concurrency, well that completely depends on what parts of your program you think you can make concurrent and how you do it. Just minimise shared state and everything will be easier. There are concurrency best practices out there and they are included in any good concurrency tutorial, the rest is left as an exercise to the reader.&#xD;&#xA;&#xD;&#xA;In the future, try and ask smaller questions with more details because it raises the possibility that somebody will be able to give you a definite answer. Keeping that in mind I hope this answer helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://programmedlessons.org/VectorLessons/vectorIndex.html&#xD;&#xA;  [2]: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm&#xD;&#xA;  [3]: http://download.oracle.com/docs/cd/E19422-01/819-3693/ncg_goldberg.html" />
  <row Id="21532" PostHistoryTypeId="5" PostId="10318" RevisionGUID="f86cb738-5267-4833-bf84-6b7c81caea05" CreationDate="2011-03-29T01:34:47.453" UserId="5916" Comment="Added in some more details." Text="Your question is so vague that it cannot really be answered. However, you sound new so I'm going to try and help. Here is what I suggest you do if you truly want to make computer games:&#xD;&#xA;&#xD;&#xA;&gt; I am curious on how to handle collision detection involving a moving target and user input... but I do wonder about the amount of lag involved.&#xD;&#xA;&#xD;&#xA;Your first question tells me that you really need to read up on your Matrix mathematics, in all non trivial cases it will come down to some small Maths to work out if the users press on the screen was on an object. Usually by firing a projection through your world starting at the camera and seeing if it collides with anything. For Matrix Maths knowledge and vector calculus in general start with this good guide: [Vector Math Tutorial for 3D Computer Graphics][1]. (Those sixteen chapters give you the basics and it should take you a few months to learn that properly.)&#xD;&#xA;&#xD;&#xA;About the lag issue: Maths on Computers is usually ridiculously fast. If you can find a good way to do it using some Maths then, in general, it will be fast code and result in little in the way of lag. If you suffer more lag despite that then it is probably an algorithmic problem and you should look into Complexity Theory and see if you algorithm are fast enough. All you probably need most of the time is Big-O notation and here is a good [introductory tutorial][2] (though there are better notes out there).&#xD;&#xA;&#xD;&#xA;&gt; Say the object moves faster and faster, then position of the input and the object is very important. What I want to know is what is the best design for handling user input and then also the best way to make sure to accurately work out when the input point collides with the object, keeping threads in mind?&#xD;&#xA;&#xD;&#xA;Once you know the Math, knowing how to handle collisions with 'jumping' objects due to high speed is relatively easy. Ask a new question about that specifically if it does not come easily to you; but only once you have read that Vector Calculus math above.&#xD;&#xA;&#xD;&#xA;There is no 'best designs' for handling user input in games, just methods that work well for your particular game. Just try and make the simplest thing that will work and improve them only if you need to.&#xD;&#xA;&#xD;&#xA;Now accuracy in video games! That is a real problem and one that requires true concentration and skill, if your game needs a high level of accuracy, and you are using floating point values like 'float' and 'double' to represent things then you will need to learn how to deal with those properly too otherwise you will see serious and subtle problems occur in your games. I would recommended looking at: [Comparing Floating Point Numbers][3] and [other good articles][4] on the topic too to see if, and how, it will effect you.&#xD;&#xA;&#xD;&#xA;As for concurrency, well that completely depends on what parts of your program you think you can make concurrent and how you do it. Just minimise shared state and everything will be easier. There are concurrency best practices out there and they are included in any good concurrency tutorial, the rest is left as an exercise to the reader.&#xD;&#xA;&#xD;&#xA;In the future, try and ask smaller questions with more details because it raises the possibility that somebody will be able to give you a definite answer. Keeping that in mind I hope this answer help and you should note that the road to game development if filled with learning many different and new topics so it will take some time but, if you enjoy programming, then it is a extremely fun journey.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://programmedlessons.org/VectorLessons/vectorIndex.html&#xD;&#xA;  [2]: http://www.dreamincode.net/forums/topic/125427-determining-big-o-notation/&#xD;&#xA;  [3]: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm&#xD;&#xA;  [4]: http://download.oracle.com/docs/cd/E19422-01/819-3693/ncg_goldberg.html" />
  <row Id="21533" PostHistoryTypeId="2" PostId="10320" RevisionGUID="cde2f677-de61-4fba-ac09-f62af41c460d" CreationDate="2011-03-29T01:46:29.463" UserId="6389" Text="You need to create your own Camera &quot;engine&quot;. It isn't good to put your camera on Main and force to draw all the entities here. And in the same way, it isn't a good idea to draw everything in the same class. For this reason, you can to create your Camera as an entity or class. This Camera has to be accesible to the rest of the game (static) &#xD;&#xA;Draw the object in their own classes (not in main, each object draw itself (or in your render engine class it has)) and when you draw it, call to camera to apply the transformation.&#xD;&#xA;Example:&#xD;&#xA;public Draw(GameTime gameTime)&#xD;&#xA;...&#xD;&#xA;Matrix transform = Game.CameraEngine.Get....&#xD;&#xA;spriteBatch.Begin(...,transform).&#xD;&#xA;...." />
  <row Id="21534" PostHistoryTypeId="2" PostId="10321" RevisionGUID="82948361-2a61-43ec-b995-b6761506b2a5" CreationDate="2011-03-29T02:20:04.380" UserId="5705" Text="After trying to use red5 for my turn-based multiplayer game, I've decided to give AMF a try using amfphp, because of the expensive media server hosting solutions. (With AMF all I need is a web server). The game is a simple turn based game. It uses Box2D for physics. Its similar to pool or billiards. More than two users should be able to play in one game 'table'. Is it OK to use AMF in this situation? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Features: No. of players &gt;= 2 in each 'room' or 'table', turn-based, multiple rooms.&#xD;&#xA;" />
  <row Id="21535" PostHistoryTypeId="1" PostId="10321" RevisionGUID="82948361-2a61-43ec-b995-b6761506b2a5" CreationDate="2011-03-29T02:20:04.380" UserId="5705" Text="Pros and Cons of AMF in multiplayer flash game?" />
  <row Id="21536" PostHistoryTypeId="3" PostId="10321" RevisionGUID="82948361-2a61-43ec-b995-b6761506b2a5" CreationDate="2011-03-29T02:20:04.380" UserId="5705" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;multiplayer&gt;" />
  <row Id="21537" PostHistoryTypeId="2" PostId="10322" RevisionGUID="5135ae02-593d-48a0-92c8-21de5951c263" CreationDate="2011-03-29T02:28:06.133" UserId="6390" Text="I'm trying to load MD2 models (stolen from Cube) and my loader seems to be loading the models fine, but I can't say the same for the drawing of the model. Here's my code: http://pastie.org/private/43jxbgqh8dcocordvfkrkq" />
  <row Id="21538" PostHistoryTypeId="1" PostId="10322" RevisionGUID="5135ae02-593d-48a0-92c8-21de5951c263" CreationDate="2011-03-29T02:28:06.133" UserId="6390" Text="Problem with my model loader?" />
  <row Id="21539" PostHistoryTypeId="3" PostId="10322" RevisionGUID="5135ae02-593d-48a0-92c8-21de5951c263" CreationDate="2011-03-29T02:28:06.133" UserId="6390" Text="&lt;c++&gt;&lt;opengl&gt;&lt;3d&gt;&lt;models&gt;" />
  <row Id="21540" PostHistoryTypeId="25" PostId="10322" RevisionGUID="e40cf936-c946-4926-8ada-fb73f4c2bb48" CreationDate="2011-03-29T03:00:20.350" Comment="http://twitter.com/#!/StackGameDev/status/52565725797294080" />
  <row Id="21544" PostHistoryTypeId="5" PostId="10321" RevisionGUID="1ccf115d-193c-431e-a20a-567aed89a36c" CreationDate="2011-03-29T03:07:37.567" UserId="5705" Comment="added 47 characters in body" Text="After trying to use red5 for my turn-based multiplayer game, I've decided to give AMF a try using amfphp, because of the expensive media server hosting solutions. (With AMF all I need is a web server). The game is a simple turn based game. It uses Box2D for physics. Its similar to pool or billiards. More than two users should be able to play in one game 'table'. Is it OK to use AMF in this situation? Also which one should I use? ZendAMF or AMFPHP?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Features: No. of players &gt;= 2 in each 'room' or 'table', turn-based, multiple rooms.&#xD;&#xA;" />
  <row Id="21546" PostHistoryTypeId="5" PostId="10322" RevisionGUID="8ffe5380-a401-4a60-9422-06c48c64fe60" CreationDate="2011-03-29T03:23:28.537" UserId="51" Comment="added 6461 characters in body" Text="I'm trying to load MD2 models (stolen from Cube) and my loader seems to be loading the models fine, but I can't say the same for the drawing of the model. Here's my code: &#xD;&#xA;&#xD;&#xA;    typedef float vec3_t[3];&#xD;&#xA;    &#xD;&#xA;    struct md2_t&#xD;&#xA;    {&#xD;&#xA;    	int ident;&#xD;&#xA;    	int version;&#xD;&#xA;    &#xD;&#xA;    	int skinwidth;&#xD;&#xA;    	int skinheigh;&#xD;&#xA;    	int framesize;&#xD;&#xA;    &#xD;&#xA;    	int num_skins;&#xD;&#xA;    	int num_xyz;&#xD;&#xA;    	int num_st;&#xD;&#xA;    	int num_tris;&#xD;&#xA;    	int num_glcommands;&#xD;&#xA;    	int num_frames;&#xD;&#xA;    &#xD;&#xA;    	int ofs_skins;&#xD;&#xA;    	int ofs_st;&#xD;&#xA;    	int ofs_tris;&#xD;&#xA;    	int ofs_frames;&#xD;&#xA;    	int ofs_glcommands;&#xD;&#xA;    	int ofs_end;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct md2_vertex_t&#xD;&#xA;    {&#xD;&#xA;    	unsigned char v[3];&#xD;&#xA;    	unsigned char index_normal;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    typedef short md2_textcoord_t[2];&#xD;&#xA;    &#xD;&#xA;    struct md2_frame_t&#xD;&#xA;    {&#xD;&#xA;    	float scale[3];&#xD;&#xA;    	vec3_t translate;&#xD;&#xA;    	char name[16];&#xD;&#xA;    	md2_vertex_t vertices[1]; // First vertex of this frame.&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    struct md2_triangle_t&#xD;&#xA;    {&#xD;&#xA;    	short index_xyz[3];&#xD;&#xA;    	short index_st[3];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct md2_anim_t&#xD;&#xA;    {&#xD;&#xA;    	int first_frame, last_frame, fps;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct md2_animstate_t&#xD;&#xA;    {&#xD;&#xA;    	md2_anim_t* animation;&#xD;&#xA;    	float current_time, old_time, interpol;&#xD;&#xA;    	int type, current_frame, next_frame;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct md2_glcmd_t&#xD;&#xA;    {&#xD;&#xA;    	float s;&#xD;&#xA;    	float t;&#xD;&#xA;    	int index;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define MD2_IDENT (('2'&lt;&lt;24) + ('P'&lt;&lt;16) + ('D'&lt;&lt;8) + 'I')&#xD;&#xA;    #define MD2_VERSION 8&#xD;&#xA;    &#xD;&#xA;    class MD2 : public VertexModel&#xD;&#xA;    {&#xD;&#xA;    	public:&#xD;&#xA;    		MD2(const std::string&amp; Path);&#xD;&#xA;    		~MD2();&#xD;&#xA;    &#xD;&#xA;    		void Draw(timestep_t Time);&#xD;&#xA;    &#xD;&#xA;    	private:&#xD;&#xA;    		md2_t m_MD2Header;&#xD;&#xA;    		md2_animstate_t m_MD2AnimState;&#xD;&#xA;    		md2_anim_t* m_MD2Animations;&#xD;&#xA;    		vec3_t* m_Vertices;&#xD;&#xA;    		vec3_t* m_InterpolatedVertices;&#xD;&#xA;    		int* m_Commands;&#xD;&#xA;    		int* m_Normals;&#xD;&#xA;    &#xD;&#xA;    		unsigned int m_TextureID;&#xD;&#xA;    		float m_Scale;&#xD;&#xA;    &#xD;&#xA;    		void Interpolate(vec3_t* Vertices);&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #include &lt;helpers/md2.h&gt;&#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;fstream&gt;&#xD;&#xA;    #include &lt;exception&gt;&#xD;&#xA;    &#xD;&#xA;    MD2::MD2(const std::string&amp; Path) : m_TextureID(0), m_Scale(1.0f)&#xD;&#xA;    {&#xD;&#xA;    	std::ifstream File(Path.c_str(), std::iostream::in | std::ifstream::binary);&#xD;&#xA;    	if(!File.is_open())&#xD;&#xA;    	{&#xD;&#xA;    		Debugging::Debugf(&quot;Unable to open the file: %s&quot;, Path.c_str());&#xD;&#xA;    		exit(0);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Get the filesize.&#xD;&#xA;    	File.seekg (0, std::ios::end);&#xD;&#xA;    	int Size = File.tellg();&#xD;&#xA;    	File.seekg (0, std::ios::beg);&#xD;&#xA;    &#xD;&#xA;    	if(Size &lt; sizeof(md2_t))&#xD;&#xA;    	{&#xD;&#xA;    		Debugging::Debugf(&quot;Incorrect header for the file: %s&quot;, Path.c_str());&#xD;&#xA;    		exit(0);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Get the header.&#xD;&#xA;    	memset((void*)&amp;m_MD2Header, 0, sizeof(md2_t));&#xD;&#xA;    	File.read((char*)&amp;m_MD2Header, sizeof(md2_t));&#xD;&#xA;    	&#xD;&#xA;    	// Check if the file is actually a MD2 model.&#xD;&#xA;    	if(m_MD2Header.ident != MD2_IDENT || m_MD2Header.version != MD2_VERSION)&#xD;&#xA;    	{&#xD;&#xA;    		Debugging::Debugf(&quot;The file %s is not a MD2 model.&quot;, Path.c_str());&#xD;&#xA;    		exit(0);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Allocate memory for the data.&#xD;&#xA;    	m_Vertices = new vec3_t[m_MD2Header.num_xyz * m_MD2Header.num_frames];&#xD;&#xA;    	m_InterpolatedVertices = new vec3_t[m_MD2Header.num_xyz];&#xD;&#xA;    	m_Normals = new int[m_MD2Header.num_xyz * m_MD2Header.num_frames];&#xD;&#xA;    	m_Commands = new int[m_MD2Header.num_glcommands];&#xD;&#xA;    	char* Buffer = new char[m_MD2Header.framesize * m_MD2Header.num_frames];&#xD;&#xA;    &#xD;&#xA;    	// Read the frame data.&#xD;&#xA;    	File.seekg(m_MD2Header.ofs_frames, std::ios::beg);&#xD;&#xA;    	File.read(Buffer, m_MD2Header.framesize * m_MD2Header.num_frames);&#xD;&#xA;    	&#xD;&#xA;    	// Read the command data.&#xD;&#xA;    	File.seekg(m_MD2Header.ofs_glcommands, std::ios::beg);&#xD;&#xA;    	File.read((char*)m_Commands, m_MD2Header.num_glcommands * sizeof(int));&#xD;&#xA;    &#xD;&#xA;    	// Read all the data.&#xD;&#xA;    	for(int i = 0; i &lt; m_MD2Header.num_frames; ++i)&#xD;&#xA;    	{&#xD;&#xA;    		md2_frame_t* Frame = (md2_frame_t*)&amp;Buffer[m_MD2Header.framesize * i];&#xD;&#xA;    		vec3_t* Vertices = &amp;m_Vertices[m_MD2Header.num_xyz * i];&#xD;&#xA;    		int* Normals = &amp;m_Normals[m_MD2Header.num_xyz * i];&#xD;&#xA;    &#xD;&#xA;    		for(int vertex = 0; vertex &lt; m_MD2Header.num_xyz; ++vertex)&#xD;&#xA;    		{&#xD;&#xA;    			Vertices[i][0] = (Frame-&gt;vertices[i].v[0] * Frame-&gt;scale[0]) + Frame-&gt;translate[0];&#xD;&#xA;    			Vertices[i][1] = (Frame-&gt;vertices[i].v[1] * Frame-&gt;scale[1]) + Frame-&gt;translate[1];&#xD;&#xA;    			Vertices[i][2] = (Frame-&gt;vertices[i].v[2] * Frame-&gt;scale[2]) + Frame-&gt;translate[2];&#xD;&#xA;    			Normals[i] = Frame-&gt;vertices[i].index_normal;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Free unused memory and close the file.&#xD;&#xA;    	delete[] Buffer;&#xD;&#xA;    	File.close();&#xD;&#xA;    &#xD;&#xA;    	memset((void*)&amp;m_MD2AnimState, 0, sizeof(m_MD2AnimState));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    MD2::~MD2()&#xD;&#xA;    {&#xD;&#xA;    	delete[] m_MD2Animations;&#xD;&#xA;    	delete[] m_Vertices;&#xD;&#xA;    	delete[] m_InterpolatedVertices;&#xD;&#xA;    	delete[] m_Commands;&#xD;&#xA;    	delete[] m_Normals;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void MD2::Draw(timestep_t Time)&#xD;&#xA;    {&#xD;&#xA;    	glPushMatrix();&#xD;&#xA;    		// Transform the model coordinates into OpenGL coordinates.&#xD;&#xA;    		glRotatef(-90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;    		glRotatef(-90.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    		// Reverse the orientation of front-facing polygons.&#xD;&#xA;    		glPushAttrib(GL_POLYGON_BIT);&#xD;&#xA;    		glFrontFace(GL_CW);&#xD;&#xA;    		glEnable(GL_CULL_FACE);&#xD;&#xA;    		glCullFace(GL_BACK);&#xD;&#xA;    &#xD;&#xA;    		// Bind the texture.&#xD;&#xA;    		//glEnable(GL_TEXTURE_2D);&#xD;&#xA;    		//glBindTexture(GL_TEXTURE_2D, m_TextureID);&#xD;&#xA;    &#xD;&#xA;    		// Interpolate between frames.&#xD;&#xA;    		Interpolate(m_InterpolatedVertices);&#xD;&#xA;    &#xD;&#xA;    		// Draw the model.&#xD;&#xA;    		int* Commands = m_Commands;&#xD;&#xA;    		while(int i = *(Commands++))&#xD;&#xA;    		{&#xD;&#xA;    			if(i &lt; 0)&#xD;&#xA;    			{&#xD;&#xA;    				glBegin(GL_TRIANGLE_FAN);&#xD;&#xA;    				i = -i;&#xD;&#xA;    			}&#xD;&#xA;    			else&#xD;&#xA;    			{&#xD;&#xA;    				glBegin(GL_TRIANGLE_STRIP);&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			for(; i &gt; 0; --i, Commands += 3)&#xD;&#xA;    			{&#xD;&#xA;    				md2_glcmd_t* Command = (md2_glcmd_t*)Commands;&#xD;&#xA;    &#xD;&#xA;    				glColor3f(1.0f, 1.0f, 1.0f);&#xD;&#xA;    				glTexCoord2f(Command-&gt;s, Command-&gt;t);&#xD;&#xA;    				glVertex3fv(m_InterpolatedVertices[Command-&gt;index]);&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			glEnd();&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		// Use the original orientation.&#xD;&#xA;    		glDisable(GL_CULL_FACE);&#xD;&#xA;    		glPopAttrib();&#xD;&#xA;    &#xD;&#xA;    	glPopMatrix();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void MD2::Interpolate(vec3_t* Vertices)&#xD;&#xA;    {&#xD;&#xA;    	for(int i = 0; i &lt; m_MD2Header.num_xyz; ++i)&#xD;&#xA;    	{&#xD;&#xA;    		Vertices[i][0] = m_Vertices[i + (m_MD2Header.num_xyz * m_MD2AnimState.current_frame)][0] * m_Scale;&#xD;&#xA;    		Vertices[i][1] = m_Vertices[i + (m_MD2Header.num_xyz * m_MD2AnimState.current_frame)][1] * m_Scale;&#xD;&#xA;    		Vertices[i][2] = m_Vertices[i + (m_MD2Header.num_xyz * m_MD2AnimState.current_frame)][2] * m_Scale;&#xD;&#xA;    	}&#xD;&#xA;    }" />
  <row Id="21547" PostHistoryTypeId="2" PostId="10324" RevisionGUID="93c6438b-fb58-44f4-b787-da116835f319" CreationDate="2011-03-29T03:54:14.157" UserId="1021" Text="(This an iOS app just fyi).  Has anyone tried a free app/game with Apple's iAds with an in-app-purchase to remove the ads?  Just wondering if this works.  A friend mentioned that some apps do this... is this a common and/or &quot;user-friendly&quot; monetization method?  Assume the ads are &quot;tastefully&quot; on the homescreen and not in the actual game itself.&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="21548" PostHistoryTypeId="1" PostId="10324" RevisionGUID="93c6438b-fb58-44f4-b787-da116835f319" CreationDate="2011-03-29T03:54:14.157" UserId="1021" Text="Mobile game monetization idea" />
  <row Id="21549" PostHistoryTypeId="3" PostId="10324" RevisionGUID="93c6438b-fb58-44f4-b787-da116835f319" CreationDate="2011-03-29T03:54:14.157" UserId="1021" Text="&lt;mobile&gt;&lt;ios&gt;&lt;monetization&gt;" />
  <row Id="21550" PostHistoryTypeId="2" PostId="10325" RevisionGUID="a9ba7ba8-1590-48a5-b6b1-591f44dba034" CreationDate="2011-03-29T05:39:18.060" UserId="1141" Text="The &quot;proper&quot; way to represent a planet's surface without any special treatment of the poles or any other extreme points is a [triangulated irregular network][1]. From there, you can use any of the usual geographical [map projections][2] to represent whatever part of the surface you want as a 2D map. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Triangulated_irregular_network&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Map_projection" />
  <row Id="21551" PostHistoryTypeId="5" PostId="10324" RevisionGUID="19e93c73-0fa0-4f42-a389-07cfc8ae23d3" CreationDate="2011-03-29T05:41:07.217" UserId="51" Comment="deleted 39 characters in body; edited title" Text="Has anyone tried a free app/game with Apple's iAds with an in-app-purchase to remove the ads?  Just wondering if this works.  A friend mentioned that some apps do this... is this a common and/or &quot;user-friendly&quot; monetization method?  Assume the ads are &quot;tastefully&quot; on the home screen and not in the actual game itself." />
  <row Id="21552" PostHistoryTypeId="4" PostId="10324" RevisionGUID="19e93c73-0fa0-4f42-a389-07cfc8ae23d3" CreationDate="2011-03-29T05:41:07.217" UserId="51" Comment="deleted 39 characters in body; edited title" Text="Mobile game monetization idea - pay to remove ads?" />
  <row Id="21553" PostHistoryTypeId="25" PostId="10324" RevisionGUID="3d5f38f0-06d9-47ec-8dc1-cbf86013c650" CreationDate="2011-03-29T06:00:19.900" Comment="http://twitter.com/#!/StackGameDev/status/52611022539849728" />
  <row Id="21554" PostHistoryTypeId="2" PostId="10326" RevisionGUID="2a05973b-753d-4d41-b6cf-2b1aa8934855" CreationDate="2011-03-29T06:27:03.920" UserId="20" Text="If you have a normal web hosting, you won't be able to run socket connections. So your game has to constantly fetch the updates from the server by issuing a HTTP request. For a turn-based game this might be ok, but probably won't work if you want to simulate your pool billiard on the server and update the clients (to prevent cheating).&#xD;&#xA;&#xD;&#xA;Now as for which AMF implementation to use: AMFPHP is quite easy to setup and get going, but AFAIK it's no longer actively developed. If you have some experience with the Zend Framework (or would like to learn it), definitely stick with the Zend version." />
  <row Id="21555" PostHistoryTypeId="2" PostId="10327" RevisionGUID="04b3c1d3-2a86-4e6a-8bc4-18e378483a6c" CreationDate="2011-03-29T06:27:41.360" UserId="3064" Text="I want a company that can store in a database of it's own the stream of clicks each user does (my game is programmed in action script), of course I will define what data and when to store it. Bear in mind that I am talking about a game that will have millons of users a day.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21556" PostHistoryTypeId="1" PostId="10327" RevisionGUID="04b3c1d3-2a86-4e6a-8bc4-18e378483a6c" CreationDate="2011-03-29T06:27:41.360" UserId="3064" Text="Are there companies that can store the stream of each user event?" />
  <row Id="21557" PostHistoryTypeId="3" PostId="10327" RevisionGUID="04b3c1d3-2a86-4e6a-8bc4-18e378483a6c" CreationDate="2011-03-29T06:27:41.360" UserId="3064" Text="&lt;flash&gt;&lt;databases&gt;&lt;events&gt;" />
  <row Id="21558" PostHistoryTypeId="2" PostId="10328" RevisionGUID="b1f66686-de38-4110-b4e2-4125007f8af0" CreationDate="2011-03-29T06:31:11.713" UserId="6307" Text="I have been in the exact same position.&#xD;&#xA;&#xD;&#xA;What I did was playing a lot of games and thinking about what elements made the game fun. This eventually lead to my current project which basically takes it main elements from three different games I've played earlier." />
  <row Id="21559" PostHistoryTypeId="2" PostId="10329" RevisionGUID="59a11bb6-673a-440b-b7db-313427df632d" CreationDate="2011-03-29T07:23:46.110" UserId="364" Text="I heard a lot of traps and other mecanics in MineCraft does profit from water physics." />
  <row Id="21560" PostHistoryTypeId="2" PostId="10330" RevisionGUID="afb4ed49-685b-4e51-9bc8-b8133bea19f8" CreationDate="2011-03-29T07:39:39.987" UserId="6169" Text="why would anyone pay to remove an ad they see for only a few seconds during startup of the application?&#xD;&#xA;Or are you planning to have the browse through 10 minutes of advertising before they're able to start playing unless they pay up? Because in that case you won't get many users at all, they'll just uninstall and try something else." />
  <row Id="21561" PostHistoryTypeId="2" PostId="10331" RevisionGUID="7a8b376e-856d-434a-ae87-417ec2326f6f" CreationDate="2011-03-29T08:34:24.420" UserId="288" Text="OK, so when you say &quot;Main&quot; I am imagining you mean the class that you derive from `Game`?&#xD;&#xA;&#xD;&#xA;There is nothing wrong with calling `SpriteBatch.Begin()` multiple times around your program and passing in your camera matrix to each one.&#xD;&#xA;&#xD;&#xA;Presumably each of your gameplay classes has a `Draw` method? I recommend passing either your camera matrix or a class containing your camera matrix into each `Draw` function you are calling. So your `Draw` function in your game class might look like this:&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        player.Draw(spriteBatch, camera);&#xD;&#xA;        foreach(var enemy in enemies)&#xD;&#xA;            enemy.Draw(spriteBatch, camera);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If your gameplay classes are `DrawableGameComponent`s, well this is a really good reason &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9204/what-are-the-cons-of-using-drawablegamecomponent-for-every-instance-of-a-game-obj/9209#9209&quot;&gt;not to use game components!&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Of course, if you insist on using DGC, then passing a camera **class** to each constructor, as you mention, will *work*. But as you've probably discovered, it means you have to figure out how to *store* it in each class - along with quite a bit of code duplication to do so.&#xD;&#xA;&#xD;&#xA;You could also use the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.services.aspx&quot;&gt;Services&lt;/A&gt; architecture to allow your components to access the camera. But like DGC, this is a very &quot;heavy&quot; architecture. Why write and manage a service, when you can just make your camera global by making it a `public static` member of your game class?&#xD;&#xA;&#xD;&#xA;(It's gameplay code. It doesn't have to be fancy. &lt;a href=&quot;http://c2.com/xp/DoTheSimplestThingThatCouldPossiblyWork.html&quot;&gt;DTSTTCPW&lt;/a&gt;.)" />
  <row Id="21562" PostHistoryTypeId="25" PostId="10321" RevisionGUID="98aefbf9-16aa-41ab-8e42-6171be70582a" CreationDate="2011-03-29T09:00:20.080" Comment="http://twitter.com/#!/StackGameDev/status/52656321463455745" />
  <row Id="21563" PostHistoryTypeId="2" PostId="10332" RevisionGUID="97e03f78-5e6f-4081-8b85-927a6eafd001" CreationDate="2011-03-29T09:15:52.193" UserId="5916" Text="The best method to solve this type of problem: **try it and see!** Just give it a shot, it might work and it might not but actually doing it is the only way to know. Then write a blog post when you are done so that others know for the future." />
  <row Id="21564" PostHistoryTypeId="2" PostId="10333" RevisionGUID="66e837f9-fc52-40c6-9781-e32c5778986e" CreationDate="2011-03-29T09:21:16.800" UserId="5253" Text="Currently in my project, the way I handle user input events is through the OS Framework, then create a generic object - basically combines all types of input: keyboard, mouse, touch, trackball, etc. all together - this object gets queued and then on update gets processed. The queuing of objects is done on the UI thread - created by the OS - and the processing of the queue on another thread - one that I have generated. I handle the threads by using turn-based concurrency.&#xD;&#xA;&#xD;&#xA;My problem is I worry about lag of the input events when there are fast moving objects, and I am curious to see if there are better ways of handling the input events then currently?&#xD;&#xA;&#xD;&#xA;My current idea, of handling the simple hit test of fast moving objects with user input, is that I try and use the timestamp generated by the event to work out where everything was at that time, but it seem like a lot of work - probably because the way I have implemented everything on the update side - so is there a better way?&#xD;&#xA;&#xD;&#xA;I did think about adding a bulk of data on the generic object creation, but there might be a lag between the creation and the actual event - on Java, I have to go through JNI and the generic object is always created on the native side. So I feel that the timestamp is my best solution. If anyone has any better ideas, it would be great to hear them." />
  <row Id="21565" PostHistoryTypeId="1" PostId="10333" RevisionGUID="66e837f9-fc52-40c6-9781-e32c5778986e" CreationDate="2011-03-29T09:21:16.800" UserId="5253" Text="Handling User Input with Simple Hit Test" />
  <row Id="21566" PostHistoryTypeId="3" PostId="10333" RevisionGUID="66e837f9-fc52-40c6-9781-e32c5778986e" CreationDate="2011-03-29T09:21:16.800" UserId="5253" Text="&lt;game-design&gt;&lt;c++&gt;" />
  <row Id="21567" PostHistoryTypeId="2" PostId="10334" RevisionGUID="24a46371-465c-4651-ba53-d76a81ac29f1" CreationDate="2011-03-29T09:45:10.343" UserId="4264" Text="So far this has been the best resource I've found:&#xD;&#xA;&#xD;&#xA;http://liceu.uab.es/~joaquim/speech_technology/tecnol_parla/synthesis/refs_sintesi.html#Speech_synthesis_formants&#xD;&#xA;&#xD;&#xA;Most specifically:&#xD;&#xA;http://www.ling.ohio-state.edu/courses/materials/825/klsyn-dos/klsynman.pdf&#xD;&#xA;&#xD;&#xA;Still, haven't found The Book." />
  <row Id="21568" PostHistoryTypeId="2" PostId="10335" RevisionGUID="af28232c-080c-42d6-a896-17efb6e07369" CreationDate="2011-03-29T09:46:06.520" UserId="5224" Text="Well basically I think this is more of a game design then a programming problem. If objects are moving so fast that in between the time of clicking and the time of processing the click event the object has moved so far that the user 'misses' the intended target, then the objects are just moving too fast.&#xD;&#xA;&#xD;&#xA;How much time is there between the actual clicking and the handling of the clicking? I assume it's not more than 1/60s (since most update loops update at 60fps). If that is the case then there is no way of fixing this problem, simply because the reaction/response time of a human is not in the range of 1/60s.&#xD;&#xA;&#xD;&#xA;If there is more time between clicking and processing then the input will feel laggy for everything the user does, so in that case try fixing the entire problem. :)&#xD;&#xA;&#xD;&#xA;(If you're talking about online gaming, then yes this is an unavoidable problem, but the way you phrased it, it sounds like it is all on one machine and then this should never be an issue)." />
  <row Id="21569" PostHistoryTypeId="2" PostId="10336" RevisionGUID="9d08b886-0a5f-4e03-baec-032d65c2d758" CreationDate="2011-03-29T11:27:34.413" UserId="6021" Text="The drawing code looks fine - are you sure the loading is?  &#xD;&#xA;&#xD;&#xA;    // Read all the data.&#xD;&#xA;    for(int i = 0; i &lt; m_MD2Header.num_frames; ++i)&#xD;&#xA;    {&#xD;&#xA;        md2_frame_t* Frame = (md2_frame_t*)&amp;Buffer[m_MD2Header.framesize * i];&#xD;&#xA;        vec3_t* Vertices = &amp;m_Vertices[m_MD2Header.num_xyz * i];&#xD;&#xA;        int* Normals = &amp;m_Normals[m_MD2Header.num_xyz * i];&#xD;&#xA;&#xD;&#xA;        for(int vertex = 0; vertex &lt; m_MD2Header.num_xyz; ++vertex)&#xD;&#xA;        {&#xD;&#xA;            Vertices[i][0] = (Frame-&gt;vertices[i].v[0] * Frame-&gt;scale[0]) + Frame-&gt;translate[0];&#xD;&#xA;            Vertices[i][1] = (Frame-&gt;vertices[i].v[1] * Frame-&gt;scale[1]) + Frame-&gt;translate[1];&#xD;&#xA;            Vertices[i][2] = (Frame-&gt;vertices[i].v[2] * Frame-&gt;scale[2]) + Frame-&gt;translate[2];&#xD;&#xA;            Normals[i] = Frame-&gt;vertices[i].index_normal;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To me it looks as if the indexing is wrong - shouldn't you index `Vertices[vertex][0]` rather than `Vertices[i][0]`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Besides*: you don't need to take the OpenGL command list from the MD2 file - MD2 files also contain a regular list of triangles with indexes into the texture coordinate and vertex arrays.&#xD;&#xA;&#xD;&#xA;I mention it because I took this path when I wrote a MD2 loader. I found this data much more convinient than a pre-optimized OpenGL stream, but it surely depends on the application." />
  <row Id="21570" PostHistoryTypeId="5" PostId="10246" RevisionGUID="c9030797-c6ce-4cac-9e23-964423075030" CreationDate="2011-03-29T11:51:40.507" UserId="6312" Comment="added 158 characters in body" Text="I want to import a skinned and animated character model built with bender into an android game. The animations can be: idle, walk, run ...etc&#xD;&#xA;&#xD;&#xA;I've seen a related question but it's only about importing a static model: http://stackoverflow.com/questions/204363/is-there-a-way-to-import-a-3d-model-into-android&#xD;&#xA;&#xD;&#xA;But I don't see how to import a set of animation with tweened frames.&#xD;&#xA;&#xD;&#xA;Any ideas, resources or tutorials about how this can be achieved ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;hr /&gt; Edit:&#xD;&#xA;After some further searching I've found this library that claim to provide model loaders for md5 files. &#xD;&#xA;http://code.google.com/p/libgdx/" />
  <row Id="21571" PostHistoryTypeId="25" PostId="10333" RevisionGUID="45145aa4-ce09-44f7-8193-37257f349427" CreationDate="2011-03-29T12:00:20.393" Comment="http://twitter.com/#!/StackGameDev/status/52701621439823872" />
  <row Id="21572" PostHistoryTypeId="2" PostId="10337" RevisionGUID="876ac931-adf4-4c7c-814c-0e35955cabc6" CreationDate="2011-03-29T12:33:17.103" UserId="-1" Text="" />
  <row Id="21573" PostHistoryTypeId="2" PostId="10338" RevisionGUID="a7ab72cb-129b-4b67-9746-9b48c2b3a658" CreationDate="2011-03-29T12:33:17.103" UserId="-1" Text="" />
  <row Id="21574" PostHistoryTypeId="2" PostId="10339" RevisionGUID="01aa3848-86c3-4a69-90aa-0c27ebc27612" CreationDate="2011-03-29T12:38:40.313" UserId="-1" Text="" />
  <row Id="21575" PostHistoryTypeId="2" PostId="10340" RevisionGUID="c268ae44-9af2-49ee-b57a-1df248430caa" CreationDate="2011-03-29T12:38:40.313" UserId="-1" Text="" />
  <row Id="21576" PostHistoryTypeId="2" PostId="10341" RevisionGUID="dd2231db-5dae-4b6d-b1e6-9bb97b844793" CreationDate="2011-03-29T12:44:41.040" UserId="-1" Text="" />
  <row Id="21577" PostHistoryTypeId="2" PostId="10342" RevisionGUID="3d226769-eb41-49ab-a97c-7ba92f6126c1" CreationDate="2011-03-29T12:44:41.040" UserId="-1" Text="" />
  <row Id="21578" PostHistoryTypeId="5" PostId="10337" RevisionGUID="0c960cbe-9f2f-49ae-bea5-61b37e02986a" CreationDate="2011-03-29T12:46:41.277" UserId="3588" Comment="added 374 characters in body" Text="Questions under the purview of this tag tend to focus on the management and handling of assets in the game. It can also cover other aspects of less common assets, such as reference files or external map data.&#xD;&#xA;&#xD;&#xA;Questions specifically about art or music assets which are outside the context of asset management should use the appropriate [tag:graphics] and [tag:audio] tags." />
  <row Id="21579" PostHistoryTypeId="24" PostId="10337" RevisionGUID="0c960cbe-9f2f-49ae-bea5-61b37e02986a" CreationDate="2011-03-29T12:46:41.277" Comment="Proposed by 3588 approved by 14 edit id of 123" />
  <row Id="21580" PostHistoryTypeId="5" PostId="10338" RevisionGUID="ce74c45b-e120-4595-b993-832c5db8ce23" CreationDate="2011-03-29T12:46:43.493" UserId="3588" Comment="added 134 characters in body" Text="Resources in a game that are not a part of the software (code) and hardware (platform). The most common assets are graphics and audio." />
  <row Id="21581" PostHistoryTypeId="24" PostId="10338" RevisionGUID="ce74c45b-e120-4595-b993-832c5db8ce23" CreationDate="2011-03-29T12:46:43.493" Comment="Proposed by 3588 approved by 14 edit id of 124" />
  <row Id="21582" PostHistoryTypeId="5" PostId="10339" RevisionGUID="d92f858d-210c-44db-90c9-49f6e1efa2a2" CreationDate="2011-03-29T12:46:45.880" UserId="3588" Comment="added 510 characters in body" Text="The decision to release a game onto multiple platforms can have a significant impact on the design of the game. The ability to fully capitalize on exclusive abilities of one platform is exchanged for a much larger potential audience to be able to experience roughly the same gameplay.&#xD;&#xA;&#xD;&#xA;Questions that deal with how to effectively develop a game to run cross-platform fall under the purview of this tag. This also can apply to concerns about what technology will function when used in cross-platform pursuits." />
  <row Id="21583" PostHistoryTypeId="24" PostId="10339" RevisionGUID="d92f858d-210c-44db-90c9-49f6e1efa2a2" CreationDate="2011-03-29T12:46:45.880" Comment="Proposed by 3588 approved by 14 edit id of 125" />
  <row Id="21584" PostHistoryTypeId="5" PostId="10340" RevisionGUID="1d58235a-0a07-4879-b55c-0d89ca133f40" CreationDate="2011-03-29T12:46:47.783" UserId="3588" Comment="added 51 characters in body" Text="The distribution of a game onto multiple platforms." />
  <row Id="21585" PostHistoryTypeId="24" PostId="10340" RevisionGUID="1d58235a-0a07-4879-b55c-0d89ca133f40" CreationDate="2011-03-29T12:46:47.783" Comment="Proposed by 3588 approved by 14 edit id of 126" />
  <row Id="21586" PostHistoryTypeId="5" PostId="10341" RevisionGUID="f7b8511c-0f1b-46e6-af3d-a5cb3964cedb" CreationDate="2011-03-29T12:46:57.627" UserId="3588" Comment="added 409 characters in body" Text="***Disclaimer**: Most of the users of this website are game developers, not lawyers. Keep this in mind with regards to any legal advice received here.*&#xD;&#xA;&#xD;&#xA;If you have concerns about running into copyright issues, or about the legality of the publishing of your game, there may be an answer to be found. If a question is about possible legal worries, use this tag to indicate such.&#xD;&#xA;&#xD;&#xA;See also: [tag:licensing]" />
  <row Id="21587" PostHistoryTypeId="24" PostId="10341" RevisionGUID="f7b8511c-0f1b-46e6-af3d-a5cb3964cedb" CreationDate="2011-03-29T12:46:57.627" Comment="Proposed by 3588 approved by 14 edit id of 127" />
  <row Id="21588" PostHistoryTypeId="5" PostId="10342" RevisionGUID="02a2d00d-06eb-4277-92a1-83900ab99fbd" CreationDate="2011-03-29T12:47:00.607" UserId="3588" Comment="added 139 characters in body" Text="As a business, game development is fraught with legal concerns and issues, especially on copyright, terms of service, and licensing fronts." />
  <row Id="21589" PostHistoryTypeId="24" PostId="10342" RevisionGUID="02a2d00d-06eb-4277-92a1-83900ab99fbd" CreationDate="2011-03-29T12:47:00.607" Comment="Proposed by 3588 approved by 14 edit id of 128" />
  <row Id="21590" PostHistoryTypeId="2" PostId="10343" RevisionGUID="f0b3f2d5-59bf-4855-89d2-e96dec0b9414" CreationDate="2011-03-29T12:54:21.667" UserId="1677" Text="My favourite game genre is quest/adventure and I am a C++ game programmer and game designer from Europe.&#xD;&#xA;&#xD;&#xA;I visited a lot of job search &amp; employment websites, but did not find any with a function to search a company by genre preferences. Such prefered genres are defined by company's released titles, current active projects, etc.&#xD;&#xA;&#xD;&#xA;Do you know such companies or search sites? Which search strategies would you recommend?" />
  <row Id="21591" PostHistoryTypeId="1" PostId="10343" RevisionGUID="f0b3f2d5-59bf-4855-89d2-e96dec0b9414" CreationDate="2011-03-29T12:54:21.667" UserId="1677" Text="Search gamedev companies and vacancies by game genre" />
  <row Id="21592" PostHistoryTypeId="3" PostId="10343" RevisionGUID="f0b3f2d5-59bf-4855-89d2-e96dec0b9414" CreationDate="2011-03-29T12:54:21.667" UserId="1677" Text="&lt;game-industry&gt;&lt;jobs&gt;&lt;quests&gt;&lt;search&gt;&lt;adventure&gt;" />
  <row Id="21593" PostHistoryTypeId="2" PostId="10344" RevisionGUID="9e97dd5b-d820-436f-81c5-243fdbeb3976" CreationDate="2011-03-29T13:55:08.763" UserId="-1" Text="" />
  <row Id="21594" PostHistoryTypeId="2" PostId="10345" RevisionGUID="543cb50e-4ca9-42ac-8cd9-713fdf2a6949" CreationDate="2011-03-29T13:55:08.763" UserId="-1" Text="" />
  <row Id="21595" PostHistoryTypeId="5" PostId="10345" RevisionGUID="be370725-49e2-470c-a468-31ab1632ebe8" CreationDate="2011-03-29T13:57:34.633" UserId="3588" Comment="added 173 characters in body" Text="Questions about game-development related academic subject matter. It includes both specific game development degrees as well as other forms of coursework related to the job." />
  <row Id="21596" PostHistoryTypeId="24" PostId="10345" RevisionGUID="be370725-49e2-470c-a468-31ab1632ebe8" CreationDate="2011-03-29T13:57:34.633" Comment="Proposed by 3588 approved by 51 edit id of 130" />
  <row Id="21597" PostHistoryTypeId="5" PostId="10344" RevisionGUID="01a4ec39-6c85-44c4-8519-ebf4b8ad5259" CreationDate="2011-03-29T13:57:37.707" UserId="3588" Comment="added 586 characters in body" Text="Academia is a great place to get started on the path to a game development career. The fact that game development combines several aspects of education (programming, mathematics, writing, artistry, communication...) lends itself to a lot of variety in the approach during one's learning years.&#xD;&#xA;&#xD;&#xA;Questions about the applicability of specific coursework, or about what kinds of education you may want to consider looking into, fall under the purview of this tag. Please avoid questions like &quot;Which college should I attend?&quot; and focus instead on the subject matter that you should study." />
  <row Id="21598" PostHistoryTypeId="24" PostId="10344" RevisionGUID="01a4ec39-6c85-44c4-8519-ebf4b8ad5259" CreationDate="2011-03-29T13:57:37.707" Comment="Proposed by 3588 approved by 51 edit id of 129" />
  <row Id="21599" PostHistoryTypeId="2" PostId="10346" RevisionGUID="1b2b7564-b68e-4956-a86e-4aab6dc5d7c0" CreationDate="2011-03-29T14:00:15.250" UserId="-1" Text="" />
  <row Id="21600" PostHistoryTypeId="2" PostId="10347" RevisionGUID="716396e6-732d-4773-96fd-a8444886e844" CreationDate="2011-03-29T14:00:15.250" UserId="-1" Text="" />
  <row Id="21601" PostHistoryTypeId="5" PostId="10347" RevisionGUID="986ec8f0-447e-44d7-9a0f-2d9310e4a799" CreationDate="2011-03-29T14:03:47.560" UserId="3588" Comment="added 87 characters in body" Text="Questions about reading material that helps in learning or practicing game development." />
  <row Id="21602" PostHistoryTypeId="24" PostId="10347" RevisionGUID="986ec8f0-447e-44d7-9a0f-2d9310e4a799" CreationDate="2011-03-29T14:03:47.560" Comment="Proposed by 3588 approved by 51 edit id of 132" />
  <row Id="21603" PostHistoryTypeId="5" PostId="10346" RevisionGUID="eefeb152-619f-4807-b59f-d2d05ab70be4" CreationDate="2011-03-29T14:03:49.713" UserId="3588" Comment="added 263 characters in body" Text="There are many resources available to budding and experienced game developers, and there is no shortage of literature on the subject. Under this tag, you can find a variety of book collections about various scopes of game development.&#xD;&#xA;&#xD;&#xA;See also: [tag:education]" />
  <row Id="21604" PostHistoryTypeId="24" PostId="10346" RevisionGUID="eefeb152-619f-4807-b59f-d2d05ab70be4" CreationDate="2011-03-29T14:03:49.713" Comment="Proposed by 3588 approved by 51 edit id of 131" />
  <row Id="21605" PostHistoryTypeId="2" PostId="10348" RevisionGUID="a13bf0f9-c1e8-4164-af64-6c3323fa9bc9" CreationDate="2011-03-29T14:11:18.063" UserId="-1" Text="" />
  <row Id="21606" PostHistoryTypeId="2" PostId="10349" RevisionGUID="fc938f2d-6b67-4ecd-bc6d-6a0d3091ccc5" CreationDate="2011-03-29T14:11:18.063" UserId="-1" Text="" />
  <row Id="21607" PostHistoryTypeId="5" PostId="10349" RevisionGUID="eb66153a-90cc-4653-83d4-a22c070722ca" CreationDate="2011-03-29T14:17:28.297" UserId="3588" Comment="added 57 characters in body" Text="The viewpoint from which the game world is observed from." />
  <row Id="21608" PostHistoryTypeId="24" PostId="10349" RevisionGUID="eb66153a-90cc-4653-83d4-a22c070722ca" CreationDate="2011-03-29T14:17:28.297" Comment="Proposed by 3588 approved by 51 edit id of 134" />
  <row Id="21609" PostHistoryTypeId="5" PostId="10348" RevisionGUID="5ed64ed4-5954-48cd-9fb9-1f2cbcf9727c" CreationDate="2011-03-29T14:17:30.840" UserId="3588" Comment="added 489 characters in body" Text="The camera is what dictates what is shown on the screen, whether or not it simulates the effect of a video camera. It can depict an invisible viewport of the world around the player character, or it could even be showing things as if from the perspective of a character. &#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag generally deal with camera positioning, movement, and special effects. &#xD;&#xA;&#xD;&#xA;When designing a 3D game, you might also want to take [tag:lighting] into account when appropriate." />
  <row Id="21610" PostHistoryTypeId="24" PostId="10348" RevisionGUID="5ed64ed4-5954-48cd-9fb9-1f2cbcf9727c" CreationDate="2011-03-29T14:17:30.840" Comment="Proposed by 3588 approved by 51 edit id of 133" />
  <row Id="21611" PostHistoryTypeId="2" PostId="10350" RevisionGUID="3e5da569-8a77-4eb6-ba51-b1e1c53080c4" CreationDate="2011-03-29T14:24:48.770" UserId="6398" Text="I definitely appreciate your frustration in these wire-based threads, it's a hard problem to solve. We never got collision working perfectly, but the constraint simulation is definitely doable and straightforward.&#xD;&#xA;&#xD;&#xA;A wire constraint is actually almost identical to a regular distance constraint. Instead of two constraint points you have n+1 for a wire with n segments, one for each vertex -- at the end points the Jacobian is identical to a distance constraint (i.e it's something like d/|d| where d is the vector between points), and for the internal nodes the Jacobian is something like (a/|a| - b/|b|) where a and b are the vectors from the node to the adjacent nodes. (Sorry, it's been a couple years since I touched this...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can't fake it a-la &quot;only the last segment is dynamic&quot; because, as in your example, objects can interact with other segments, but you only need to simulate masses at the ends of the rope -- internally the rope can be massless. The constraint impulses calculated at each node need to be applied to the object that's colliding at that node.&#xD;&#xA;&#xD;&#xA;Here are a few related papers:&#xD;&#xA;&#xD;&#xA;[Massless Cable for Real-time Simulation][1]&#xD;&#xA;&#xD;&#xA;[Adaptive resolution in physics based virtual environments][2]&#xD;&#xA;&#xD;&#xA;Hybrid, multiresolution wires with massless frictional contacts&#xD;&#xA;&#xD;&#xA;www.physics.umu.se/digitalAssets/45/45089_hybrid.pdf&#xD;&#xA;&#xD;&#xA;Designing a class library for interactive simulation and rigid body dynamics&#xD;&#xA;&#xD;&#xA;www.win.tue.nl/dynamo/publications/bartbthesis.pdf&#xD;&#xA;&#xD;&#xA;(Sorry about the ugly URLs, as a new user I can only post two links)&#xD;&#xA;&#xD;&#xA;The first three are relatively recent and should help a lot.&#xD;&#xA;Page 75 of the bottom paper describes a &quot;multibar&quot; constraint which is essentially a wire.&#xD;&#xA;&#xD;&#xA;Good luck :)&#xD;&#xA;&#xD;&#xA;raigan&#xD;&#xA;&#xD;&#xA;  [1]: http://www.physics.umu.se/digitalAssets/45/45092_cgf_1014.pdf&#xD;&#xA;  [2]: http://www.ep.liu.se/ecp/034/012/ecp083412.pdf&#xD;&#xA;" />
  <row Id="21612" PostHistoryTypeId="2" PostId="10351" RevisionGUID="afe1b9a6-54f4-4e48-9085-6d190d9edc2d" CreationDate="2011-03-29T14:24:53.393" UserId="51" Text="This data is hardly standardized.  On top of that, most companies aren't completely open with what they're working on.  Just because company X shipped a certain kind of game in the past, doesn't mean they're working on that kind of game now or in the future.  I mean for some companies it's pretty obvious, but for others not so much.&#xD;&#xA;&#xD;&#xA;So I doubt you'll find such a site.&#xD;&#xA;&#xD;&#xA;Personally I'd much rather find a place that has a corporate culture I'm interested in than one that's working on some predetermined type of game. " />
  <row Id="21613" PostHistoryTypeId="2" PostId="10352" RevisionGUID="56b98436-cebb-49e8-92bb-db923466e50f" CreationDate="2011-03-29T14:34:58.933" UserId="4296" Text="There are companies out there that can host a database, sure, but you'll have to be the one to design the database and then collect and store the data.  You will have to implement that kind of collection into your game." />
  <row Id="21614" PostHistoryTypeId="6" PostId="10333" RevisionGUID="5ac89b99-8157-4abc-97f9-f3886f092821" CreationDate="2011-03-29T14:51:01.040" UserId="14" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;" />
  <row Id="21615" PostHistoryTypeId="2" PostId="10353" RevisionGUID="b08a13cc-223f-4d1e-bae6-c95f50d73da1" CreationDate="2011-03-29T14:58:05.953" UserId="6169" Text="You do realise that when you're in game development you won't be playing many games?&#xD;&#xA;That most likely you'll quickly come to loath playing games because you have to test little bits of them over and over again to analyse errors?&#xD;&#xA;&#xD;&#xA;You seem under the impression that working at a game development shop means you're just going to be paid to do what you like to do now, play a certain genre of game when and how you like to do it.&#xD;&#xA;&#xD;&#xA;Nothing could be further from the truth. You're going to be spending a lot of time not playing games but in exhaustive meetings about minute details about them. The rest of the time will be spent working on implementing or testing those minute details, and if that includes any playing it'll be playing the same little bit of the game over and over again to test that little detail you happen to have been assigned to working on.&#xD;&#xA;It's a job no different from any other, and any job can quickly destroy what enjoyment you have in the thing you're doing.&#xD;&#xA;Which is why I always advise people to NOT try to turn their hobbies into their jobs." />
  <row Id="21616" PostHistoryTypeId="25" PostId="10343" RevisionGUID="186e7905-f26a-487c-a540-76f5d71483a0" CreationDate="2011-03-29T15:00:19.457" Comment="http://twitter.com/#!/StackGameDev/status/52746916148154368" />
  <row Id="21617" PostHistoryTypeId="2" PostId="10354" RevisionGUID="b878bb2a-72d4-4e47-90aa-84e092e152d3" CreationDate="2011-03-29T16:02:15.307" UserId="1430" Text="It's hard to say in general. For myself, I hate looking at ads and would happily pay once to remove them forever, assuming the application is otherwise something I'd be interested in. The apparent success (although I have no hard numbers) of games and other products on the app store that offer both free, ad-supported versions and paid, ad-free versions imply to me that the concept is viable in theory.&#xD;&#xA;&#xD;&#xA;In practice, you probably need to make sure the balance of when and how long the ads are displayed (which impacts your expected impression and click-through count) is reasonable. You want users to see them as often as possible without making them too offensive. If they are seen rarely, users may not see value in paying to remove them, *and* you'll get fewer impressions and click-through instances. &#xD;&#xA;&#xD;&#xA;You also don't want to sacrifice the quality of the application itself in order to leverage ads; what I mean is, you mention in a comment to another answer that:&#xD;&#xA;&#xD;&#xA;&gt; The user would see the ads everytime&#xD;&#xA;&gt; the game ends and the homescreen is&#xD;&#xA;&gt; displayed. Since it's a casual game&#xD;&#xA;&gt; that's replayed often (in theory) the&#xD;&#xA;&gt; user would see the ads for a&#xD;&#xA;&gt; non-trivial amount of time.&#xD;&#xA;&#xD;&#xA;This sounds to me like quitting/back-button'ing out of your app will take me back to the home screen when I re-launch it, and/or that I will be forced to spend at least long enough on the game-end screen for the ad to download and display for a second or so (in order to guarantee I have really seen it and encourage me to click).&#xD;&#xA;&#xD;&#xA;When you remove the ads from this scenario, you are saying that the game doesn't save my state if I have to quit it (which I would expect a casual game on a mobile platform to do) and that you're going to hold me at the end-game screne for a potentially unpleasant period of time. If the game *does* save state between invocations, you're drastically reducing the time I'll spend at the home screen. &#xD;&#xA;&#xD;&#xA;In short, I think conceptually this is a workable plan, but I feel like your specific implementation plan may not be as optimal for you or your customers as it could be." />
  <row Id="21618" PostHistoryTypeId="2" PostId="10355" RevisionGUID="39e1cbbd-da40-4cf4-9afe-9eec08e91f97" CreationDate="2011-03-29T16:06:40.400" UserId="1156" Text="Not only are games difficult to fit into genres as such, studios do not always produce just one kind of game. Even further, I doubt you'll find it significantly more interesting to produce one kind of game over another with time in the industry.&#xD;&#xA;&#xD;&#xA;Your best shot with this is to look up a company with a vacancy, that you would like to work for (take Frictional Games for an example), and check up their previous titles (Amnesia, Penumbra) and their genres (horror/survival). &#xD;&#xA;&#xD;&#xA;As a general rule, if you do not have the time to check up a bit about the company, I doubt the company will care much for you since you don't have the time to put some effort in." />
  <row Id="21619" PostHistoryTypeId="2" PostId="10356" RevisionGUID="4551646b-0f58-4b94-a576-2b6bc106e327" CreationDate="2011-03-29T16:09:40.053" UserId="1156" Text="I can say that I will prefer an ad-free version and I will pay after trialling the game. &#xD;&#xA;&#xD;&#xA;Not just games, but other apps too, will often have small ads that take up some room on the top or bottom of the screen. For games, these are usually on titles/game over screens. As long as they do not restrict the game itself, they can be good.&#xD;&#xA;&#xD;&#xA;Instead of an in-game purchase, it may be better to have the standard (well, commonly used) Lite and ad-free versions of the game. If you do this, you can also take some content away for the free users.&#xD;&#xA;&#xD;&#xA;Either way you go, people do not want to pay for a game and still have ads." />
  <row Id="21620" PostHistoryTypeId="2" PostId="10357" RevisionGUID="8cdf651d-afcb-4848-b02a-9ebae034b26f" CreationDate="2011-03-29T16:13:36.227" UserId="1156" Text="I think you mean you want a library or application. Not a company; that is, a business.&#xD;&#xA;&#xD;&#xA;And you are being seriously over-optimistic. Even World Of Warcraft will not reach 1 million unique users a day. &#xD;&#xA;&#xD;&#xA;As for the technical aspect, you're going to need:&#xD;&#xA;&#xD;&#xA; - Some server to host the database. Expect to pay a lot for some 30 million people a month using it.&#xD;&#xA; - Some database to host on the server. I would look up SQL databases.&#xD;&#xA; - Flash access to said database, sending the user and their 'stream of clicks'. Each time they click." />
  <row Id="21621" PostHistoryTypeId="2" PostId="10358" RevisionGUID="5aa501a2-5742-4fb9-bb65-a6ea10dfb379" CreationDate="2011-03-29T16:24:36.683" UserId="6404" Text="this is what i made: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/results?search_query=puppeteer+as3&amp;page=&amp;utm_source=opensearch" />
  <row Id="21622" PostHistoryTypeId="2" PostId="10359" RevisionGUID="52e7bd05-e9f8-4711-9599-6bcd00e456cc" CreationDate="2011-03-29T16:52:03.183" UserId="-1" Text="" />
  <row Id="21623" PostHistoryTypeId="2" PostId="10360" RevisionGUID="87d1ab47-9ecd-4410-be73-80ecf7bb30b8" CreationDate="2011-03-29T16:52:03.183" UserId="-1" Text="" />
  <row Id="21624" PostHistoryTypeId="2" PostId="10361" RevisionGUID="49c02883-566f-4f18-a0d3-25862a728525" CreationDate="2011-03-29T17:24:43.123" UserId="-1" Text="" />
  <row Id="21625" PostHistoryTypeId="2" PostId="10362" RevisionGUID="08aba4c0-ea6e-47ed-8701-fb5945b59ce0" CreationDate="2011-03-29T17:24:43.123" UserId="-1" Text="" />
  <row Id="21626" PostHistoryTypeId="5" PostId="10360" RevisionGUID="be6eba9d-cbb1-4ff8-8775-0f5706938a70" CreationDate="2011-03-29T17:27:45.157" UserId="3588" Comment="added 106 characters in body" Text="Interaction from the player that corresponds to action in the game. Or in simpler terms - pushing buttons!" />
  <row Id="21627" PostHistoryTypeId="24" PostId="10360" RevisionGUID="be6eba9d-cbb1-4ff8-8775-0f5706938a70" CreationDate="2011-03-29T17:27:45.157" Comment="Proposed by 3588 approved by 189 edit id of 136" />
  <row Id="21628" PostHistoryTypeId="5" PostId="10359" RevisionGUID="23c3e16c-7c8c-448c-bc34-bd7e573dee91" CreationDate="2011-03-29T17:27:49.930" UserId="3588" Comment="added 442 characters in body" Text="Questions under the purview of this tag include proper detection of input, handling special maneuvers (like button combinations or holding down for specific lengths), and timing.&#xD;&#xA;&#xD;&#xA;The following input types also have their own tags that can often accompany this tag, or outright replace it if your question is more about the device than the input method:&#xD;&#xA;&#xD;&#xA; - [tag:motion-control]&#xD;&#xA; - [tag:keyboard]&#xD;&#xA; - [tag:controllers]&#xD;&#xA; - [tag:joystick]" />
  <row Id="21629" PostHistoryTypeId="24" PostId="10359" RevisionGUID="23c3e16c-7c8c-448c-bc34-bd7e573dee91" CreationDate="2011-03-29T17:27:49.930" Comment="Proposed by 3588 approved by 189 edit id of 135" />
  <row Id="21630" PostHistoryTypeId="5" PostId="10362" RevisionGUID="d25ec73f-ed79-4333-8caa-ce3d7d8a8710" CreationDate="2011-03-29T17:27:54.407" UserId="3588" Comment="added 96 characters in body" Text="Often the primary input for computer games. It boasts a very large versatility for direct input." />
  <row Id="21631" PostHistoryTypeId="24" PostId="10362" RevisionGUID="d25ec73f-ed79-4333-8caa-ce3d7d8a8710" CreationDate="2011-03-29T17:27:54.407" Comment="Proposed by 3588 approved by 189 edit id of 138" />
  <row Id="21632" PostHistoryTypeId="5" PostId="10361" RevisionGUID="1356218e-265e-4924-990f-497991aac1ad" CreationDate="2011-03-29T17:27:57.900" UserId="3588" Comment="added 487 characters in body" Text="Keyboards are versatile devices that lend themselves to many arrangements, especially when paired with other input devices like a mouse. It is a kind of [tag:input].&#xD;&#xA;&#xD;&#xA;Keyboards have a ton of possible button inputs, but also their own interesting quirks in things such as holding multiple keys. If your question has to deal specifically with keyboard issues, as opposed to general input concerns that would affect both keyboard and gamepad users, this tag is an appropriate choice. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="21633" PostHistoryTypeId="24" PostId="10361" RevisionGUID="1356218e-265e-4924-990f-497991aac1ad" CreationDate="2011-03-29T17:27:57.900" Comment="Proposed by 3588 approved by 189 edit id of 137" />
  <row Id="21634" PostHistoryTypeId="2" PostId="10363" RevisionGUID="b494e350-0656-486c-be8d-f420a4296f97" CreationDate="2011-03-29T17:30:20.583" UserId="-1" Text="" />
  <row Id="21635" PostHistoryTypeId="2" PostId="10364" RevisionGUID="518a823b-3225-4c68-9b96-be55f13252b4" CreationDate="2011-03-29T17:30:20.583" UserId="-1" Text="" />
  <row Id="21636" PostHistoryTypeId="10" PostId="10327" RevisionGUID="af082730-e814-4a88-b66f-e4e5c0bd8a10" CreationDate="2011-03-29T17:32:12.203" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="21637" PostHistoryTypeId="5" PostId="10364" RevisionGUID="eab537bf-6d68-42af-a353-a5eb2a72ecc1" CreationDate="2011-03-29T17:33:20.613" UserId="3588" Comment="added 135 characters in body" Text="A form of directional input consisting of a stick that pivots from a fixed position. May or may not have buttons on top or on its base." />
  <row Id="21638" PostHistoryTypeId="24" PostId="10364" RevisionGUID="eab537bf-6d68-42af-a353-a5eb2a72ecc1" CreationDate="2011-03-29T17:33:20.613" Comment="Proposed by 3588 approved by 189 edit id of 140" />
  <row Id="21639" PostHistoryTypeId="5" PostId="10363" RevisionGUID="cff28c2c-ad57-4ca2-ab46-b62111365845" CreationDate="2011-03-29T17:33:24.357" UserId="3588" Comment="added 339 characters in body" Text="A form of [tag:input], used primarily as an alternative to a directional pad or arrow keys.&#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag deal with handling the unique input of this device. This tag can apply to both standalone joystick devices as well as joysticks that are part of a larger input device (such as a control panel or gamepad)." />
  <row Id="21640" PostHistoryTypeId="24" PostId="10363" RevisionGUID="cff28c2c-ad57-4ca2-ab46-b62111365845" CreationDate="2011-03-29T17:33:24.357" Comment="Proposed by 3588 approved by 189 edit id of 139" />
  <row Id="21641" PostHistoryTypeId="2" PostId="10365" RevisionGUID="675a84ef-715d-4bcb-a47c-47b7ab43ca07" CreationDate="2011-03-29T17:43:49.927" UserId="-1" Text="" />
  <row Id="21642" PostHistoryTypeId="2" PostId="10366" RevisionGUID="ff691e2a-e0ef-4e8d-94cf-d864e36d46a3" CreationDate="2011-03-29T17:43:49.927" UserId="-1" Text="" />
  <row Id="21643" PostHistoryTypeId="5" PostId="10365" RevisionGUID="fd9a3a8d-367d-4a05-b1e1-0a5eac9ee121" CreationDate="2011-03-29T17:48:29.987" UserId="3588" Comment="added 1010 characters in body" Text="Controllers, also known as gamepads in the context of computers, are a handheld form of [tag:input]&#xD;&#xA;&#xD;&#xA;Controllers eschew the complexity and size of a keyboard to favor portability and simplicity. The standard modern controllers tend to have 3 basic components.&#xD;&#xA;&#xD;&#xA; - Directional buttons, consisting of one or more directional pads and joysticks. These are often on the left, to be manipulated with the left thumb.&#xD;&#xA; - Face buttons, buttons on the front portion of the controller designed to be hit with the thumb. Usually game-action buttons are on the right, while system and menu buttons are in the middle.&#xD;&#xA; - Shoulder buttons, buttons on top of the controller on both sides intended to be hit with index finger without drawing away from the face buttons.&#xD;&#xA;&#xD;&#xA;Questions specifically about gamepad input, rather than about generic input that could apply to both a keyboard and a controller, fall under the purview of this tag. Development for specific controllers like for a console also fits under this tag." />
  <row Id="21644" PostHistoryTypeId="24" PostId="10365" RevisionGUID="fd9a3a8d-367d-4a05-b1e1-0a5eac9ee121" CreationDate="2011-03-29T17:48:29.987" Comment="Proposed by 3588 approved by 14 edit id of 141" />
  <row Id="21645" PostHistoryTypeId="5" PostId="10366" RevisionGUID="544b336c-0438-4601-a688-ab805f04253f" CreationDate="2011-03-29T17:48:31.937" UserId="3588" Comment="added 137 characters in body" Text="Often the primary input device for console games. Typically designed to be held in one or both hands rather than being laid on a surface." />
  <row Id="21646" PostHistoryTypeId="24" PostId="10366" RevisionGUID="544b336c-0438-4601-a688-ab805f04253f" CreationDate="2011-03-29T17:48:31.937" Comment="Proposed by 3588 approved by 14 edit id of 142" />
  <row Id="21647" PostHistoryTypeId="2" PostId="10367" RevisionGUID="dd850895-fb69-4332-88ca-7d1c236e1ecf" CreationDate="2011-03-29T17:51:59.280" UserId="-1" Text="" />
  <row Id="21648" PostHistoryTypeId="2" PostId="10368" RevisionGUID="43b94dfe-c62b-4713-949b-cd3bf534d731" CreationDate="2011-03-29T17:51:59.280" UserId="-1" Text="" />
  <row Id="21649" PostHistoryTypeId="25" PostId="10310" RevisionGUID="0fb0be53-1276-4b04-89a4-16af24124df8" CreationDate="2011-03-29T18:00:20.037" Comment="http://twitter.com/#!/StackGameDev/status/52792216766255105" />
  <row Id="21650" PostHistoryTypeId="5" PostId="10368" RevisionGUID="c413a6b5-1dcc-4a9b-bfeb-38e77aa8f0d1" CreationDate="2011-03-29T18:16:11.210" UserId="3588" Comment="added 122 characters in body" Text="Detecting input not by the pressing of buttons or manipulation of a device, but directly from the movements of the player." />
  <row Id="21651" PostHistoryTypeId="24" PostId="10368" RevisionGUID="c413a6b5-1dcc-4a9b-bfeb-38e77aa8f0d1" CreationDate="2011-03-29T18:16:11.210" Comment="Proposed by 3588 approved by 51 edit id of 144" />
  <row Id="21652" PostHistoryTypeId="5" PostId="10367" RevisionGUID="1fa1f211-dd4b-4e70-b603-7ccf822ece61" CreationDate="2011-03-29T18:16:14.750" UserId="3588" Comment="added 609 characters in body" Text="A form of [tag:input] that relies on physical movement instead of the conventional command input.&#xD;&#xA;&#xD;&#xA;Motion control deals with when the motion itself is what is responsible for the input. Examples include using gyroscopic sensors to detect tilting as well as infrared detection and motion capture to detect actual movement. Often, the motion is designed to mimic what the player is intending to accomplish in the game, creating a more direct relation between the actions of the player and the events in the game.&#xD;&#xA;&#xD;&#xA;Questions that deal with this kind of input technology fall under the purview of this tag. &#xD;&#xA;" />
  <row Id="21653" PostHistoryTypeId="24" PostId="10367" RevisionGUID="1fa1f211-dd4b-4e70-b603-7ccf822ece61" CreationDate="2011-03-29T18:16:14.750" Comment="Proposed by 3588 approved by 51 edit id of 143" />
  <row Id="21654" PostHistoryTypeId="2" PostId="10369" RevisionGUID="5d71f304-7d49-47b3-900e-990ab583cf3b" CreationDate="2011-03-29T18:19:09.443" UserId="2168" Text="Currently I have the follow states:&#xD;&#xA;&#xD;&#xA;    Need To Run&#xD;&#xA;    Run&#xD;&#xA;    Need To Walk&#xD;&#xA;    Walk&#xD;&#xA;    Need To Fight&#xD;&#xA;    Fight&#xD;&#xA;&#xD;&#xA;Am I misunderstanding it and mixig possible actions with states ?&#xD;&#xA;&#xD;&#xA;I mean, to me Need To Run would either return true of false telling wether I should procced to the Run action or not and same goes for the other needs.&#xD;&#xA;&#xD;&#xA;While I am fighitng should I have second FSM to threat what skills it should be using for example if it needs to heal or not ?&#xD;&#xA;&#xD;&#xA;For instance inside the fight I would have the another FSM for&#xD;&#xA;&#xD;&#xA;    Need To Heal&#xD;&#xA;    Heal&#xD;&#xA;    Back To Fight&#xD;&#xA;    Use Skill&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21655" PostHistoryTypeId="1" PostId="10369" RevisionGUID="5d71f304-7d49-47b3-900e-990ab583cf3b" CreationDate="2011-03-29T18:19:09.443" UserId="2168" Text="States, actions logic am I doing it right ?" />
  <row Id="21656" PostHistoryTypeId="3" PostId="10369" RevisionGUID="5d71f304-7d49-47b3-900e-990ab583cf3b" CreationDate="2011-03-29T18:19:09.443" UserId="2168" Text="&lt;c#&gt;&lt;fsm&gt;&lt;state&gt;" />
  <row Id="21657" PostHistoryTypeId="2" PostId="10370" RevisionGUID="5e04b886-61eb-4b0a-9237-0c655fc9952a" CreationDate="2011-03-29T18:37:02.657" UserId="2332" Text="It does seem a bit odd to have Need To Run and Run states.&#xD;&#xA;&#xD;&#xA;What might be better is having a Running, Walking and Fighting state. Your finite state machine then checks the appropriate logic (Do I need to run? Do I need to walk? etc) to determine what state to transition to.&#xD;&#xA;&#xD;&#xA;Check out [Programming Game AI by Example][1]. In that book, there is an implementation of FSMs using the state design pattern. A nice, clean and flexible way of implementing FSMs.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1301423760&amp;sr=8-1" />
  <row Id="21658" PostHistoryTypeId="2" PostId="10371" RevisionGUID="c1ef472c-e7bc-4d89-9804-4a94e8bbc230" CreationDate="2011-03-29T19:05:39.310" UserId="395" Text="http://gamedevmap.com/ has break down by very very granular &quot;genres&quot;. Bit of a stretch, but thats about the best you are going to find. Aside from MMO vs. non-MMO (and even that distinction is dropping slowly) companies rarely only handle one kind of game.&#xD;&#xA;&#xD;&#xA;For programmers and artists the actual genre of the game, if that work even means anything these days, has zero impact on the job, and for designers there are still much bigger factors you should look at (these days the casual&lt;-&gt;hardcore&lt;-&gt;serious spectrum is probably the first thing I would look at as a designer).&#xD;&#xA;&#xD;&#xA;Also if you think you would only be happy working on one type of game then I'm sorry to tell you that this industry really isn't for you." />
  <row Id="21659" PostHistoryTypeId="5" PostId="10370" RevisionGUID="bca6b89d-26ac-4074-b934-fb6416aa51d3" CreationDate="2011-03-29T19:13:38.163" UserId="2332" Comment="added 378 characters in body" Text="It does seem a bit odd to have Need To Run and Run states.&#xD;&#xA;&#xD;&#xA;What might be better is having a Running, Walking and Fighting state. Your finite state machine then checks the appropriate logic (Do I need to run? Do I need to walk? etc) to determine what state to transition to.&#xD;&#xA;&#xD;&#xA;Check out [Programming Game AI by Example][1]. In that book, there is an implementation of FSMs using the state design pattern. A nice, clean and flexible way of implementing FSMs.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;EDIT:  &#xD;&#xA;Just to add some points regarding your second FSM, I would suggest looking into hierarchical FSMs as that's essentially what you're doing, but the same concept as above applies really. Later on, if you wanted to get really fancy you could use some sort of planner, or even swap it out completely to use behaviour trees. But they're probably a story for another day :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1301423760&amp;sr=8-1" />
  <row Id="21660" PostHistoryTypeId="2" PostId="10372" RevisionGUID="ec85050f-596f-41c3-93ad-f4d0402d9e52" CreationDate="2011-03-29T19:21:08.673" UserId="3984" Text="Corona Sdk and Unity 3d both support iOS and Android. You still have to run on OSX for iOS development, but supposedly you don't need to re-write your code for each platform. &#xD;&#xA;&#xD;&#xA;Corona runs on windows, so you can try it out now without spending a lot of money. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://www.anscamobile.com/corona/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://unity3d.com/" />
  <row Id="21661" PostHistoryTypeId="2" PostId="10373" RevisionGUID="7380b139-83df-4f36-901d-2bab10113640" CreationDate="2011-03-29T19:27:07.437" UserId="5385" Text="We are **three people** who are going to make a simple game in Java as a school project (University, first grade). The game has to be object oriented. We don't have much time, **10-20 hours** tops. None of us has any experience in game development, but we all have fair skills in Java.&#xD;&#xA;&#xD;&#xA;We can choose exactly what kind of game, and that is where the problem lies. How high should we aim? There is a competition involved, so we do want to make the best game in the time we have. Is a 3d game unrealistic? Should we use any game-engines/libraries? What kind of functionality should we avoid? " />
  <row Id="21662" PostHistoryTypeId="1" PostId="10373" RevisionGUID="7380b139-83df-4f36-901d-2bab10113640" CreationDate="2011-03-29T19:27:07.437" UserId="5385" Text="Java game in a day or two" />
  <row Id="21663" PostHistoryTypeId="3" PostId="10373" RevisionGUID="7380b139-83df-4f36-901d-2bab10113640" CreationDate="2011-03-29T19:27:07.437" UserId="5385" Text="&lt;programming&gt;&lt;java&gt;" />
  <row Id="21664" PostHistoryTypeId="5" PostId="10370" RevisionGUID="10d50449-1e7e-4a70-8c2a-1db170e69066" CreationDate="2011-03-29T19:32:10.417" UserId="2332" Comment="added 338 characters in body" Text="It does seem a bit odd to have Need To Run and Run states.&#xD;&#xA;&#xD;&#xA;What might be better is having a Running, Walking and Fighting state. Your finite state machine then checks the appropriate logic (Do I need to run? Do I need to walk? etc) to determine what state to transition to.&#xD;&#xA;&#xD;&#xA;Check out [Programming Game AI by Example][1]. In that book, there is an implementation of FSMs using the state design pattern. A nice, clean and flexible way of implementing FSMs.&#xD;&#xA;&#xD;&#xA;You can find the source for it here: http://samples.jbpub.com/9781556220784/Buckland_SourceCode.zip&#xD;&#xA;&#xD;&#xA;The state specific stuff is actually available freely online, but the book is a solid investment as an introduction to AI. The state explanations can be found here: http://www.ai-junkie.com/architecture/state_driven/tut_state1.html&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;EDIT:  &#xD;&#xA;Just to add some points regarding your second FSM, I would suggest looking into hierarchical FSMs as that's essentially what you're doing, but the same concept as above applies really. Later on, if you wanted to get really fancy you could use some sort of planner, or even swap it out completely to use behaviour trees. But they're probably a story for another day :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1301423760&amp;sr=8-1" />
  <row Id="21665" PostHistoryTypeId="2" PostId="10374" RevisionGUID="f794aad3-2e17-4e8d-8102-d2454b6e181d" CreationDate="2011-03-29T19:41:16.037" UserId="6407" Text="Community Core Audio is looking pretty promising. It converts voice to text and is said to handle automatic speech recognition. The data is sent via the network through UDP so it would be easy to integrate into Unity. That is if you're not planning on using the webplayer.&#xD;&#xA;&#xD;&#xA;http://nuicode.com/projects/cca-alpha" />
  <row Id="21666" PostHistoryTypeId="2" PostId="10375" RevisionGUID="a14121eb-f548-4515-bbf4-4c67b62bfd38" CreationDate="2011-03-29T19:42:42.500" UserId="20" Text="Don't aim too high. Pick something you're interested in and build something simple around that. Example: Maybe you're really interested in learning about a physic-engine. Why not build a physics-puzzle like [totem-destroyer][1] or similar? Try to revolve around a core-element and don't include other complicated stuff like A.I., sophisticated rendering/graphics/shaders etc.&#xD;&#xA;&#xD;&#xA;Focus on *one* aspect and try to find a game-mechanic that suits that. If you're interested in 3D, your game could be as simple as tic-tac-toe, but focus on getting good 3D graphics on screen.&#xD;&#xA;&#xD;&#xA;Don't try to learn too much new stuff at once. Make use of existing frameworks/tools as much as possible.&#xD;&#xA;&#xD;&#xA;To round this up, here are some ideas for a &quot;getting started&quot; game: http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with&#xD;&#xA;&#xD;&#xA;  [1]: http://armorgames.com/play/1871/totem-destroyer" />
  <row Id="21667" PostHistoryTypeId="5" PostId="10375" RevisionGUID="7eae9994-f0ad-464e-953a-15128c43faee" CreationDate="2011-03-29T19:49:25.417" UserId="20" Comment="added 311 characters in body" Text="Don't aim too high. Pick something you're interested in and build something simple around that. Example: Maybe you're really interested in learning about a physic-engine. Why not build a physics-puzzle like [totem-destroyer][1] or similar? Try to revolve around a core-element and don't include other complicated stuff like A.I., sophisticated rendering/graphics/shaders etc.&#xD;&#xA;&#xD;&#xA;Focus on *one* aspect and try to find a game-mechanic that suits that. If you're interested in 3D, your game could be as simple as tic-tac-toe, but focus on getting good 3D graphics on screen.&#xD;&#xA;&#xD;&#xA;Don't try to learn too much new stuff at once. Make use of existing frameworks/tools as much as possible.&#xD;&#xA;&#xD;&#xA;To round this up, here are some ideas for a &quot;getting started&quot; game: http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with&#xD;&#xA;&#xD;&#xA;**Update:** Since you're really short on time, I'd reduce the &quot;new stuff to learn&quot; to an absolute minimum. A physics-engine might already be overkill if you never used one before. Also pick a game-mechanic you already know, preferably with a well defined and small ruleset and limited amount of game-states.&#xD;&#xA;&#xD;&#xA;  [1]: http://armorgames.com/play/1871/totem-destroyer" />
  <row Id="21668" PostHistoryTypeId="2" PostId="10376" RevisionGUID="9ac692bf-cf8e-4a21-bc5f-ee8a72791da5" CreationDate="2011-03-29T19:52:07.633" UserId="6021" Text="If you have no prior experience in writing 3D games, I'd drop the 3D idea immediately. Instead, focus on a simple game-play concept and try to implement it using simple 2D graphics. Make sure you implement the game mechanics *first* - if you're finished earlier, you can still add sophisticated visual effects.&#xD;&#xA;&#xD;&#xA;But a game without gameplay isn't a game while a game without stunning graphics can still be fun.&#xD;&#xA;&#xD;&#xA;20-30 work hours is very little time for a good game, so you *really* need to plan and prioritize your tasks carefully or you'll never get to a proper result." />
  <row Id="21669" PostHistoryTypeId="2" PostId="10377" RevisionGUID="2e658c1b-9c83-4726-9941-9ddc54194687" CreationDate="2011-03-29T20:40:49.053" UserId="189" Text="*This actually turned into a list of good practices for preparing for your project... So a little astray of your actual question, but I think you might find it useful.*&#xD;&#xA;&#xD;&#xA;**Avoid 3D**, because you would need to know how to make 3D models or find good ones, you would need to know how to load such models (often an epic task in itself, sadly), and how to draw them on the screen (e.g. OpenGL or DirectX takes a lot of work for little gain, and even an engine like [jMonkeyEngine][1] requires knowledge of how to utilize the engine, along with basic 3D knowledge). Blitting 2D images on screen and moving them around is far simpler than dealing with vertices, materials, view matrices, transforms, etc. etc. I think you get the point.&#xD;&#xA;&#xD;&#xA;**Stick with the built-in Java libraries and classes: Graphics2D, ImageIO, AWT mouse and keyboard listeners, Canvas, Java Sound API, and so on.** The benefits of sticking with these instead of finding some other library include: you already know them (to some extent), you know they're well tested and stable and generally make sense, online documentation and resources are abundant, and they are portable so you don't have to worry about installing extra libraries with native libraries and all that.&#xD;&#xA;&#xD;&#xA;**Build up a little library of code snippets ahead of time.** These would include things like loading an image, drawing the image to a position on screen, scaling the image and other effects, playing a sound, looping background music, bounding box collision detection, drawing text. Also have a skeleton application which opens a Frame (or Applet), adds a Canvas to it, and the canvas's paint and repaint methods should be overridden, and a thread should be looping the canvas repaint method (or a timer calling it). You can learn these things if you search around for `Java 2D game programming`. Assuming you have access to your university's library, you should have a number of good Java game books at your disposal; check them out and skim through them for the above-mentioned snippets, and others I missed.&#xD;&#xA;&#xD;&#xA;**Practice source control and division of work with your team ahead of time.** Are you going to use Subversion, Git, Mercurial, or something else? Are everyone's computers set to the same up-to-date version of Java? Create your repository, commit/push some files, make sure everyone has the repository checked out and ready to go on your system. Maybe commit a 'hello world' app and make sure everyone is able to pull and modify and commit it; and make sure you know how to handle merging (whether you avoid it entirely with good communication or pair programming, or you know how to use a merge tool). Or, if you aren't familiar with source control, make sure you figure out a solution that works; whether it's pair programming while the third person does art or sounds, or something else, just make sure to be organized from the start or you'll waste tons of time.&#xD;&#xA;&#xD;&#xA;**Bookmark links to websites which provide free media.** There have been quite a number of these type sites listed in other questions here; sites like [freesound][2] are perfect for quickly finding useful media to use in your game when you don't have the time to make it from scratch. Bookmark this site of course, so you can ask a question if you get stuck on something. Bookmark forums such as the gamedev.net forums so that you can search them for answers. If you opt to use a third-party library, bookmark their website. Organize these bookmarks into folders and grab as many as possible, and make sure to share them so that all three of you have the same useful library of bookmarks. It doesn't take a lot of time to go around and collect these bookmarks and organize them by type/subject, but it saves you a lot of time when you don't have to remember all those websites in the middle of your project.&#xD;&#xA;&#xD;&#xA;For more suggestions, see the answers to my question [&quot;How to prepare for a game development competition?&quot;][3].&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;To address the rest of your question... The general advice is: **don't aim high**. However, it can vary widely depending on how prepared you are (i.e. my above suggestions) and your skills in Java. This is largely a personal judgement based on your history, but since none of you have history of making games (and therefore can't judge the time necessary), **aim really really low**. Come up with a really basic idea which can be easily implemented in 2D without any advanced concepts (e.g. avoid pixelwise collisions, crazy physics calculations, particle effects, etc.). But then create a **prioritized list** of the features of the game, in as much detail as possible (e.g. break each feature into as many separate tasks as possible). This way, you simply work your way down the list as far as possible, and if you don't get to some low-priority tasks, it shouldn't be a big deal. This has to be done carefully (you still need a functional game at the end of the time, so there is a minimum set of tasks which need to be done and some tasks depend on other tasks), but in general I think this is the best approach when you don't know how long things will take.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.com/&#xD;&#xA;  [2]: http://www.freesound.org/&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/2086/how-to-prepare-for-a-game-development-competition" />
  <row Id="21670" PostHistoryTypeId="2" PostId="10378" RevisionGUID="f7dee051-626c-44a6-abb2-3bf648c38406" CreationDate="2011-03-29T20:45:50.287" UserId="-1" Text="" />
  <row Id="21671" PostHistoryTypeId="2" PostId="10379" RevisionGUID="85322963-ac32-49b1-8195-535c436067f1" CreationDate="2011-03-29T20:45:50.287" UserId="-1" Text="" />
  <row Id="21672" PostHistoryTypeId="5" PostId="10377" RevisionGUID="280db753-8d00-4ebc-893a-91f59c64eb27" CreationDate="2011-03-29T20:47:37.393" UserId="189" Comment="deleted 172 characters in body" Text="**Avoid 3D**, because you would need to know how to make 3D models or find good ones, you would need to know how to load such models (often an epic task in itself, sadly), and how to draw them on the screen (e.g. OpenGL or DirectX takes a lot of work for little gain, and even an engine like [jMonkeyEngine][1] requires knowledge of how to utilize the engine, along with basic 3D knowledge). Blitting 2D images on screen and moving them around is far simpler than dealing with vertices, materials, view matrices, transforms, etc. etc. I think you get the point.&#xD;&#xA;&#xD;&#xA;**Stick with the built-in Java libraries and classes: Graphics2D, ImageIO, AWT mouse and keyboard listeners, Canvas, Java Sound API, and so on.** The benefits of sticking with these instead of finding some other library include: you already know them (to some extent), you know they're well tested and stable and generally make sense, online documentation and resources are abundant, and they are portable so you don't have to worry about installing extra libraries with native libraries and all that.&#xD;&#xA;&#xD;&#xA;**Build up a little library of code snippets ahead of time.** These would include things like loading an image, drawing the image to a position on screen, scaling the image and other effects, playing a sound, looping background music, bounding box collision detection, drawing text. Also have a skeleton application which opens a Frame (or Applet), adds a Canvas to it, and the canvas's paint and repaint methods should be overridden, and a thread should be looping the canvas repaint method (or a timer calling it). You can learn these things if you search around for `Java 2D game programming`. Assuming you have access to your university's library, you should have a number of good Java game books at your disposal; check them out and skim through them for the above-mentioned snippets, and others I missed.&#xD;&#xA;&#xD;&#xA;**Practice source control and division of work with your team ahead of time.** Are you going to use Subversion, Git, Mercurial, or something else? Are everyone's computers set to the same up-to-date version of Java? Create your repository, commit/push some files, make sure everyone has the repository checked out and ready to go on your system. Maybe commit a 'hello world' app and make sure everyone is able to pull and modify and commit it; and make sure you know how to handle merging (whether you avoid it entirely with good communication or pair programming, or you know how to use a merge tool). Or, if you aren't familiar with source control, make sure you figure out a solution that works; whether it's pair programming while the third person does art or sounds, or something else, just make sure to be organized from the start or you'll waste tons of time.&#xD;&#xA;&#xD;&#xA;**Bookmark links to websites which provide free media.** There have been quite a number of these type sites listed in other questions here; sites like [freesound][2] are perfect for quickly finding useful media to use in your game when you don't have the time to make it from scratch. Bookmark this site of course, so you can ask a question if you get stuck on something. Bookmark forums such as the gamedev.net forums so that you can search them for answers. If you opt to use a third-party library, bookmark their website. Organize these bookmarks into folders and grab as many as possible, and make sure to share them so that all three of you have the same useful library of bookmarks. It doesn't take a lot of time to go around and collect these bookmarks and organize them by type/subject, but it saves you a lot of time when you don't have to remember all those websites in the middle of your project.&#xD;&#xA;&#xD;&#xA;For more suggestions, see the answers to my question [&quot;How to prepare for a game development competition?&quot;][3].&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;To address the rest of your question... The general advice is: **don't aim high**. However, it can vary widely depending on how prepared you are (i.e. my above suggestions) and your skills in Java. This is largely a personal judgement based on your history, but since none of you have history of making games (and therefore can't judge the time necessary), **aim really really low**. Come up with a really basic idea which can be easily implemented in 2D without any advanced concepts (e.g. avoid pixelwise collisions, crazy physics calculations, particle effects, etc.). But then create a **prioritized list** of the features of the game, in as much detail as possible (e.g. break each feature into as many separate tasks as possible). This way, you simply work your way down the list as far as possible, and if you don't get to some low-priority tasks, it shouldn't be a big deal. This has to be done carefully (you still need a functional game at the end of the time, so there is a minimum set of tasks which need to be done and some tasks depend on other tasks), but in general I think this is the best approach when you don't know how long things will take.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.com/&#xD;&#xA;  [2]: http://www.freesound.org/&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/2086/how-to-prepare-for-a-game-development-competition" />
  <row Id="21673" PostHistoryTypeId="5" PostId="10379" RevisionGUID="79c22c10-f83c-4ccf-b85e-daa2d2a9b704" CreationDate="2011-03-29T20:48:04.303" UserId="3588" Comment="added 102 characters in body" Text="The practice of earning money for games, often on a continuing or advance basis past the initial sale." />
  <row Id="21674" PostHistoryTypeId="24" PostId="10379" RevisionGUID="79c22c10-f83c-4ccf-b85e-daa2d2a9b704" CreationDate="2011-03-29T20:48:04.303" Comment="Proposed by 3588 approved by 189 edit id of 146" />
  <row Id="21675" PostHistoryTypeId="5" PostId="10378" RevisionGUID="b71bde66-aa8a-45e1-95f9-fcaae547f9b8" CreationDate="2011-03-29T20:48:07.847" UserId="3588" Comment="added 254 characters in body" Text="Questions under the purview of this tag deal with methods and tactics to use for generating revenue from a game. This primarily deals with revenue earned from methods other than the initial purchase, such as subscription models and extra payable content." />
  <row Id="21676" PostHistoryTypeId="24" PostId="10378" RevisionGUID="b71bde66-aa8a-45e1-95f9-fcaae547f9b8" CreationDate="2011-03-29T20:48:07.847" Comment="Proposed by 3588 approved by 189 edit id of 145" />
  <row Id="21677" PostHistoryTypeId="25" PostId="10373" RevisionGUID="4dd3cfce-7bbd-4565-a0aa-4ec8d1ccb99b" CreationDate="2011-03-29T21:00:20.147" Comment="http://twitter.com/#!/StackGameDev/status/52837515857633280" />
  <row Id="21678" PostHistoryTypeId="2" PostId="10380" RevisionGUID="a0a8a1b5-d1e8-4e47-8eff-fa43116070a0" CreationDate="2011-03-29T21:03:17.523" UserId="-1" Text="" />
  <row Id="21679" PostHistoryTypeId="2" PostId="10381" RevisionGUID="7957d1c6-b993-4b44-9a40-01cbc382ce63" CreationDate="2011-03-29T21:03:17.523" UserId="-1" Text="" />
  <row Id="21680" PostHistoryTypeId="5" PostId="10373" RevisionGUID="75cbab18-04f3-41cc-abf2-689b5982c9d2" CreationDate="2011-03-29T21:12:16.283" UserId="5385" Comment="deleted 1 characters in body" Text="We are **three people** who are going to make a simple game in Java as a school project (University, first year). The game has to be object oriented. We don't have much time, **10-20 hours** tops. None of us has any experience in game development, but we all have fair skills in Java.&#xD;&#xA;&#xD;&#xA;We can choose exactly what kind of game, and that is where the problem lies. How high should we aim? There is a competition involved, so we do want to make the best game in the time we have. Is a 3d game unrealistic? Should we use any game-engines/libraries? What kind of functionality should we avoid? " />
  <row Id="21681" PostHistoryTypeId="5" PostId="9881" RevisionGUID="b5e630f6-4cd7-4aa8-ba1b-a90c98b7e489" CreationDate="2011-03-29T22:26:32.430" UserId="3588" Comment="The &quot;debug&quot; tag seems to be used more for questions about debugging practices, rather than debugging itself (which feels redundant). While fixing the tag, though, just a minor touch up. ♪" Text="I made this SoundAnalyzer class to detect beats in songs:&#xD;&#xA;&#xD;&#xA;    class SoundAnalyzer&#xD;&#xA;    {&#xD;&#xA;        public SoundBuffer soundData;&#xD;&#xA;        public Sound sound;&#xD;&#xA;        public List&lt;double&gt; beatMarkers = new List&lt;double&gt;();&#xD;&#xA;&#xD;&#xA;        public SoundAnalyzer(string path)&#xD;&#xA;        {&#xD;&#xA;            soundData = new SoundBuffer(path);&#xD;&#xA;            sound = new Sound(soundData);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // C = threshold, N = size of history buffer / 1024  B = bands&#xD;&#xA;        public void PlaceBeatMarkers(float C, int N, int B)&#xD;&#xA;        {&#xD;&#xA;            List&lt;double&gt;[] instantEnergyList = new List&lt;double&gt;[B];&#xD;&#xA;            GetEnergyList(B, ref instantEnergyList);&#xD;&#xA;            for (int i = 0; i &lt; B; i++)&#xD;&#xA;            {&#xD;&#xA;                PlaceMarkers(instantEnergyList[i], N, C);&#xD;&#xA;            }&#xD;&#xA;            beatMarkers.Sort();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private short[] getRange(int begin, int end, short[] array)&#xD;&#xA;        {&#xD;&#xA;            short[] result = new short[end - begin];&#xD;&#xA;            for (int i = 0; i &lt; end - begin; i++)&#xD;&#xA;            {&#xD;&#xA;                result[i] = array[begin + i];&#xD;&#xA;            }&#xD;&#xA;            return result;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // get a array of with a list of energy for each band&#xD;&#xA;        private void GetEnergyList(int B, ref List&lt;double&gt;[] instantEnergyList)&#xD;&#xA;        {&#xD;&#xA;            for (int i = 0; i &lt; B; i++)&#xD;&#xA;            {&#xD;&#xA;                instantEnergyList[i] = new List&lt;double&gt;();&#xD;&#xA;            }&#xD;&#xA;            short[] samples = soundData.Samples;&#xD;&#xA;&#xD;&#xA;            float timePerSample = 1 / (float)soundData.SampleRate;&#xD;&#xA;            int sampleIndex = 0;&#xD;&#xA;            int nextSamples = 1024;&#xD;&#xA;            int samplesPerBand = nextSamples / B;&#xD;&#xA;&#xD;&#xA;            // for the whole song&#xD;&#xA;            while (sampleIndex + nextSamples &lt; samples.Length)&#xD;&#xA;            {&#xD;&#xA;                complex[] FFT = FastFourier.Calculate(getRange(sampleIndex, nextSamples + sampleIndex, samples));&#xD;&#xA;                // foreach band&#xD;&#xA;                for (int i = 0; i &lt; B; i++)&#xD;&#xA;                {&#xD;&#xA;                    double energy = 0;&#xD;&#xA;                    for (int j = 0; j &lt; samplesPerBand; j++)&#xD;&#xA;                        energy += FFT[i * samplesPerBand + j].GetMagnitude();&#xD;&#xA;&#xD;&#xA;                    energy /= samplesPerBand;&#xD;&#xA;                    instantEnergyList[i].Add(energy);&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (sampleIndex + nextSamples &gt;= samples.Length)&#xD;&#xA;                    nextSamples = samples.Length - sampleIndex - 1;&#xD;&#xA;                sampleIndex += nextSamples;&#xD;&#xA;                samplesPerBand = nextSamples / B;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // place the actual markers&#xD;&#xA;        private void PlaceMarkers(List&lt;double&gt; instantEnergyList, int N, float C)&#xD;&#xA;        {&#xD;&#xA;            double timePerSample = 1 / (double)soundData.SampleRate;&#xD;&#xA;            int index = N;&#xD;&#xA;            int numInBuffer = index;&#xD;&#xA;            double historyBuffer = 0;&#xD;&#xA;&#xD;&#xA;            //Fill the history buffer with n * instant energy&#xD;&#xA;            for (int i = 0; i &lt; index; i++)&#xD;&#xA;            {&#xD;&#xA;                historyBuffer += instantEnergyList[i];&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // If instantEnergy / samples in buffer &lt; instantEnergy for the next sample then add beatmarker.&#xD;&#xA;            while (index + 1 &lt; instantEnergyList.Count)&#xD;&#xA;            {&#xD;&#xA;                if(instantEnergyList[index + 1] &gt; (historyBuffer / numInBuffer) * C)&#xD;&#xA;                    beatMarkers.Add((index + 1) * 1024 * timePerSample); &#xD;&#xA;                historyBuffer -= instantEnergyList[index - numInBuffer];&#xD;&#xA;                historyBuffer += instantEnergyList[index + 1];&#xD;&#xA;                index++;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;For some reason it's only detecting beats from 637 sec to around 641 sec, and I have no idea why. I know the beats are being inserted from multiple bands since I am finding duplicates, and it seems that it's assigning a beat to each instant energy value in between those values.&#xD;&#xA;&#xD;&#xA;It's modeled after this: http://www.flipcode.com/misc/BeatDetectionAlgorithms.pdf&#xD;&#xA;&#xD;&#xA;So why won't the beats register properly?" />
  <row Id="21682" PostHistoryTypeId="6" PostId="9881" RevisionGUID="b5e630f6-4cd7-4aa8-ba1b-a90c98b7e489" CreationDate="2011-03-29T22:26:32.430" UserId="3588" Comment="The &quot;debug&quot; tag seems to be used more for questions about debugging practices, rather than debugging itself (which feels redundant). While fixing the tag, though, just a minor touch up. ♪" Text="&lt;c#&gt;&lt;programming&gt;&lt;audio&gt;" />
  <row Id="21683" PostHistoryTypeId="24" PostId="9881" RevisionGUID="b5e630f6-4cd7-4aa8-ba1b-a90c98b7e489" CreationDate="2011-03-29T22:26:32.430" Comment="Proposed by 3588 approved by 14 edit id of 147" />
  <row Id="21684" PostHistoryTypeId="5" PostId="10380" RevisionGUID="8e879f35-1bd2-4a37-91e7-d061aa06e7cb" CreationDate="2011-03-29T22:26:34.753" UserId="3588" Comment="added 356 characters in body" Text="Due to a variety of mediums that one can play games in (computer monitors, TVs, phones), there are a variety of resolutions that one may have to account for when developing a game. Questions under this tag typically deal with how to optimize a game so that it can played on a variety of resolutions without severely impacting the experience for the player." />
  <row Id="21685" PostHistoryTypeId="24" PostId="10380" RevisionGUID="8e879f35-1bd2-4a37-91e7-d061aa06e7cb" CreationDate="2011-03-29T22:26:34.753" Comment="Proposed by 3588 approved by 14 edit id of 148" />
  <row Id="21686" PostHistoryTypeId="5" PostId="10381" RevisionGUID="11ab26d5-f9a1-40d2-85b7-5bf382ef7d34" CreationDate="2011-03-29T22:26:36.627" UserId="3588" Comment="added 93 characters in body" Text="The pixel resolution that the game displays in, or can be displayed in if there are multiple." />
  <row Id="21687" PostHistoryTypeId="24" PostId="10381" RevisionGUID="11ab26d5-f9a1-40d2-85b7-5bf382ef7d34" CreationDate="2011-03-29T22:26:36.627" Comment="Proposed by 3588 approved by 14 edit id of 149" />
  <row Id="21688" PostHistoryTypeId="25" PostId="10369" RevisionGUID="89a02b3f-1552-46eb-b968-b599e2a0fc8a" CreationDate="2011-03-30T00:00:19.760" Comment="http://twitter.com/#!/StackGameDev/status/52882812948332544" />
  <row Id="21689" PostHistoryTypeId="2" PostId="10382" RevisionGUID="68319e7f-b040-4865-ab13-adb580a6920f" CreationDate="2011-03-30T01:58:27.597" UserId="6412" Text="I've gone over this again and again, and my result is obviously wrong when viewed in-action. Here's the initial formula I converted (first one):&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Range_of_a_projectile&#xD;&#xA;&#xD;&#xA;and here's my C# code:&#xD;&#xA;&#xD;&#xA;	float CalculateMaximumRange() {&#xD;&#xA;		float g = Physics.gravity.y;&#xD;&#xA;		float y = origin.position.y;&#xD;&#xA;		float v = projectileSpeed;&#xD;&#xA;		float a = 45;&#xD;&#xA;&#xD;&#xA;		float vSin = v * Mathf.Sin(a);&#xD;&#xA;		float vCos = v * Mathf.Cos(a);&#xD;&#xA;&#xD;&#xA;		float sqrt = Mathf.Sqrt(vSin * vSin + 2 * g * y);&#xD;&#xA;&#xD;&#xA;		return Mathf.Abs((vCos / g) * (vSin + sqrt));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Does anyone see what I did wrong?" />
  <row Id="21690" PostHistoryTypeId="1" PostId="10382" RevisionGUID="68319e7f-b040-4865-ab13-adb580a6920f" CreationDate="2011-03-30T01:58:27.597" UserId="6412" Text="Maximum range of projectile fired at given force and elevation." />
  <row Id="21691" PostHistoryTypeId="3" PostId="10382" RevisionGUID="68319e7f-b040-4865-ab13-adb580a6920f" CreationDate="2011-03-30T01:58:27.597" UserId="6412" Text="&lt;physics&gt;" />
  <row Id="21692" PostHistoryTypeId="2" PostId="10383" RevisionGUID="bf2806df-01b8-459b-b8ec-08bc2ff0e27f" CreationDate="2011-03-30T02:48:26.933" UserId="5021" Text="Use degrees instead of radians.&#xD;&#xA;&#xD;&#xA;45 degrees is Pi/4 radians ~= 0.785398.&#xD;&#xA;&#xD;&#xA;The `y` in your formula should be the object's distance above the ground when it is released. Is the ground 0? If the ground is not at y=0, then y should be:&#xD;&#xA;&#xD;&#xA;`y = origin.Position.y + groundHeight` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, are you sure that this formula is giving you what you want? This formula gives the horizontal distance of the object's travel only -- not the distance of the object along the path (which is longer or equal to the horizontal travel)." />
  <row Id="21693" PostHistoryTypeId="25" PostId="10382" RevisionGUID="db45bd9b-10ed-4157-8f63-7e08a50aa579" CreationDate="2011-03-30T03:00:20.350" Comment="http://twitter.com/#!/StackGameDev/status/52928113511890944" />
  <row Id="21694" PostHistoryTypeId="25" PostId="10314" RevisionGUID="22053a5a-10e9-40bb-9cfd-25571be88041" CreationDate="2011-03-30T06:00:21.037" Comment="http://twitter.com/#!/StackGameDev/status/52973415065337856" />
  <row Id="21695" PostHistoryTypeId="2" PostId="10384" RevisionGUID="6bdc99c9-0a96-41f6-8307-e4c3ac31b287" CreationDate="2011-03-30T06:30:59.033" UserId="704" Text="You mention that there may be more than one AI opponent. Just note that alpha-beta pruning doesn't work for more than 1 opponent (although you can look into Paranoid Search). Next steps are to look at move ordering, branch and bound pruning and transposition tables (which is probably the same as caching mentioned earlier)" />
  <row Id="21696" PostHistoryTypeId="2" PostId="10385" RevisionGUID="f99a9c4d-ceed-4384-9d9f-c2a2c29d7bf0" CreationDate="2011-03-30T06:36:55.563" UserId="704" Text="The well known multiplayer versions of minmax are MaxN and Paranoid Search" />
  <row Id="21697" PostHistoryTypeId="5" PostId="10350" RevisionGUID="ba832c09-991b-4d59-a8d8-8ec5fd237215" CreationDate="2011-03-30T08:09:11.087" UserId="3794" Comment="created links from urls. edited formating" Text="I definitely appreciate your frustration in these wire-based threads, it's a hard problem to solve. We never got collision working perfectly, but the constraint simulation is definitely doable and straightforward.&#xD;&#xA;&#xD;&#xA;A wire constraint is actually almost identical to a regular distance constraint. Instead of two constraint points you have n+1 for a wire with n segments, one for each vertex -- at the end points the Jacobian is identical to a distance constraint (i.e it's something like d/|d| where d is the vector between points), and for the internal nodes the Jacobian is something like (a/|a| - b/|b|) where a and b are the vectors from the node to the adjacent nodes. (Sorry, it's been a couple years since I touched this...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can't fake it a-la &quot;only the last segment is dynamic&quot; because, as in your example, objects can interact with other segments, but you only need to simulate masses at the ends of the rope -- internally the rope can be massless. The constraint impulses calculated at each node need to be applied to the object that's colliding at that node.&#xD;&#xA;&#xD;&#xA;Here are a few related papers:&#xD;&#xA;&#xD;&#xA; - [Massless Cable for Real-time Simulation][1]&#xD;&#xA; - [Adaptive resolution in physics based virtual environments][2]&#xD;&#xA; - [Hybrid, multiresolution wires with massless frictional contacts][3]&#xD;&#xA; - [Designing a class library for interactive simulation and rigid body dynamics][4]&#xD;&#xA;&#xD;&#xA;The first three are relatively recent and should help a lot.&#xD;&#xA;Page 75 of the bottom paper describes a &quot;multibar&quot; constraint which is essentially a wire.&#xD;&#xA;&#xD;&#xA;Good luck :)&#xD;&#xA;&#xD;&#xA;raigan&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.physics.umu.se/digitalAssets/45/45092_cgf_1014.pdf&#xD;&#xA;  [2]: http://www.ep.liu.se/ecp/034/012/ecp083412.pdf&#xD;&#xA;  [3]: http://www.physics.umu.se/digitalAssets/45/45089_hybrid.pdf&#xD;&#xA;  [4]: http://www.win.tue.nl/dynamo/publications/bartbthesis.pdf" />
  <row Id="21698" PostHistoryTypeId="5" PostId="10259" RevisionGUID="17da5db7-3d60-4919-bbe0-33da148ffb8b" CreationDate="2011-03-30T08:13:13.250" UserId="3794" Comment="removed useless line" Text="You propably want to send View matrix (which defines camera position), because why to have skybox if you can't look around? And propably also world matrix to add some scale. Personally i like using vertex position as texture coordinate if you know what you are doing. This is how it should look:&#xD;&#xA;&#xD;&#xA;    uniform mat4 projectionMatrix;&#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;    attribute vec4 position;&#xD;&#xA;    varying mediump vec4 texCoord;&#xD;&#xA;    void main() {&#xD;&#xA;       texCoord = position; &#xD;&#xA;       gl_Position = modelViewMatrix * projectionMatrix * position; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`gl_Position` should contain 3D position converted to the 2D screen space. Thats what modelViewProjection does. And `texCoord` should be texture position on a vertex, which usualy does not changes with vertex's position on a screen, so no multiplication with any matrices. (Maybe there are some cases when it has sense to multiply texture coord with projection matrix, but sky box is definitevely not one of them).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21699" PostHistoryTypeId="2" PostId="10386" RevisionGUID="af6223ed-b3ee-42df-b6d5-dcfdead5df7c" CreationDate="2011-03-30T08:21:49.733" UserId="5350" Text="Here is another such tutorial, which might help you:&#xD;&#xA;&#xD;&#xA;http://wiki.gamedev.net/index.php/OpenGL:Tutorials:Basic_Bones_System&#xD;&#xA;&#xD;&#xA;It's very thorough, and I even used it once to produce an animation engine. The theory is very good and it should be easily understood for you to use it in AS3." />
  <row Id="21700" PostHistoryTypeId="25" PostId="10246" RevisionGUID="38680407-b37b-4889-a14c-d322954b6f3c" CreationDate="2011-03-30T09:00:20.743" Comment="http://twitter.com/#!/StackGameDev/status/53018712407674880" />
  <row Id="21701" PostHistoryTypeId="2" PostId="10387" RevisionGUID="37aabb72-d8f2-4dc9-ae09-dd9241c12ca2" CreationDate="2011-03-30T10:21:25.573" UserId="6395" Text="I'm looking for some open source game controls.&#xD;&#xA;Especially I'm looking for a thumb screen joystick to move a character on the screen, something like a touch circle.&#xD;&#xA;&#xD;&#xA;Are there any open source implementation of what I'm looking for?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21702" PostHistoryTypeId="1" PostId="10387" RevisionGUID="37aabb72-d8f2-4dc9-ae09-dd9241c12ca2" CreationDate="2011-03-30T10:21:25.573" UserId="6395" Text="iOS thumb screen joystick, open source code" />
  <row Id="21703" PostHistoryTypeId="3" PostId="10387" RevisionGUID="37aabb72-d8f2-4dc9-ae09-dd9241c12ca2" CreationDate="2011-03-30T10:21:25.573" UserId="6395" Text="&lt;open-source&gt;&lt;ios&gt;&lt;motion-control&gt;" />
  <row Id="21704" PostHistoryTypeId="2" PostId="10388" RevisionGUID="27b0b83a-2036-417f-b26d-fd02b96c4366" CreationDate="2011-03-30T10:36:24.633" UserId="6416" Text="I am an MPhil student in Computing Science working on the problem of camera control in graphics. Though the literature of camera control dates back to the end of 1980s, the majority of them (up to my knowledge) is mainly academic and rarely used in games.&#xD;&#xA;&#xD;&#xA;Now part of my thesis should be dedicated to camera control methods used in games. But the problem is that I have not implemented all the games in the world, so I can't speak about them. But I suppose there are some references that game developers usually use.&#xD;&#xA;&#xD;&#xA;Can anybody help me with this? Even if it is from your own experience rather than a book.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;" />
  <row Id="21705" PostHistoryTypeId="1" PostId="10388" RevisionGUID="27b0b83a-2036-417f-b26d-fd02b96c4366" CreationDate="2011-03-30T10:36:24.633" UserId="6416" Text="Camera Control Techniques in Games" />
  <row Id="21706" PostHistoryTypeId="3" PostId="10388" RevisionGUID="27b0b83a-2036-417f-b26d-fd02b96c4366" CreationDate="2011-03-30T10:36:24.633" UserId="6416" Text="&lt;camera&gt;&lt;control&gt;" />
  <row Id="21707" PostHistoryTypeId="2" PostId="10389" RevisionGUID="25f69bf7-ca1d-4dee-9c88-1777761bb94b" CreationDate="2011-03-30T10:39:04.637" UserId="259" Text="Sounds like you don't need an FSM, but instead a behaviour system.&#xD;&#xA;&#xD;&#xA;Each state becomes a behaviour, and should have a function that returns a priority, with that value being higher the more it wants to execute. So for instance your Heal behaviour would return a high priority when the entitiy is injured, and Fight would return a low priority when there is no enemies around. This priority calculation function is the &quot;need to&quot; state in your current system.&#xD;&#xA;&#xD;&#xA;The behaviour that returns the highest value then gets to execute.&#xD;&#xA;&#xD;&#xA;It's up to you if the priorities are recalculated at a set time step, and so states could flip-flop rapidly, or if once a state has control it is up to the state to yeild, which may lead to states monopolising control too much but is a bit more &quot;FSM-y&quot;.&#xD;&#xA;&#xD;&#xA;The drawback of this approach over FSMs is that there are no defined transitions. Depending on your implementation a state may have no say over when it loses control. This could make interfacing with your animation system difficult and may not be a good fit for some problems.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21712" PostHistoryTypeId="6" PostId="10369" RevisionGUID="f572ec87-9eb2-45fc-8fe3-5c7f61f35d64" CreationDate="2011-03-30T10:42:24.150" UserId="259" Comment="edited tags" Text="&lt;c#&gt;&lt;ai&gt;&lt;state&gt;&lt;fsm&gt;" />
  <row Id="21714" PostHistoryTypeId="2" PostId="10391" RevisionGUID="ee65dd4f-cb2f-44a8-a430-53946b2ae707" CreationDate="2011-03-30T11:17:13.217" UserId="259" Text="*NB: I'm assuming here you're talking about cameras in third-person games such as Tomb Raider. Even then, some games may have sections, for instance when in cover, when a completely seperate camera system is used to the main walking-around sections of the game.*&#xD;&#xA;&#xD;&#xA;This is a very complex area to get right. The simple nieve approach is to lock the camera to a position above and behind the player, and if raycasts intersect level terrain then to move the camera back towards the player until clear of intersections.&#xD;&#xA;&#xD;&#xA;This quickly gets complicated as you add in smoothing, lookahead prediction, more ray casts to steer clear of trouble, gimble lock, etc. And despite all that you'll still find the camera staring at the walls every now and again.&#xD;&#xA;&#xD;&#xA;It might be easier to get a list of games where the camera works well, and try to figure out what they're doing special.&#xD;&#xA;" />
  <row Id="21715" PostHistoryTypeId="4" PostId="10387" RevisionGUID="fea5f2d4-9433-4a17-a6f8-1b9528ae4bd9" CreationDate="2011-03-30T11:25:13.927" UserId="6395" Comment="edited title" Text="Are there any implemented game controls like a screen (thumb) joystick? - iOS" />
  <row Id="21716" PostHistoryTypeId="2" PostId="10392" RevisionGUID="cc123670-c189-4fba-a000-8f78b3a80a85" CreationDate="2011-03-30T09:52:11.927" UserDisplayName="Tank" Text="I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to&#xD;&#xA;&#xD;&#xA;* display static meshs and&#xD;&#xA;* render animated meshs.&#xD;&#xA;&#xD;&#xA;I've already found quite a large number of possible formats and techniques, like keyframe animations, skeletal animation, MD2 up to MD5, 3DS, X, Collada etc. pp.&#xD;&#xA;&#xD;&#xA;For simplicity I'd like to use a format (and technique) that allows both, namely static and animated meshs. So my question is if _one_ format is suitable for that task and which one you'd suggest. And to clarify a bit: I don't need super-smooth animations or brandnew features.&#xD;&#xA;&#xD;&#xA;Sidenote: Because I'm a blender fan (but _not_ an expert ;-)) it'd be helpful if it can be used with that -- but of course that shouldn't be the show stopper, here.&#xD;&#xA;&#xD;&#xA;Greetings,  &#xD;&#xA;Stefan." />
  <row Id="21717" PostHistoryTypeId="1" PostId="10392" RevisionGUID="cc123670-c189-4fba-a000-8f78b3a80a85" CreationDate="2011-03-30T09:52:11.927" UserDisplayName="Tank" Text="File format for static and animated 3D models" />
  <row Id="21718" PostHistoryTypeId="3" PostId="10392" RevisionGUID="cc123670-c189-4fba-a000-8f78b3a80a85" CreationDate="2011-03-30T09:52:11.927" UserDisplayName="Tank" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="21719" PostHistoryTypeId="17" PostId="10392" RevisionGUID="41074a6b-91e9-41e2-b956-9c719ced7d20" CreationDate="2011-03-30T11:26:10.897" UserId="-1" Comment="from http://stackoverflow.com/questions/5484738/file-format-for-static-and-animated-3d-models" Text="" />
  <row Id="21720" PostHistoryTypeId="2" PostId="10393" RevisionGUID="57d98312-ae67-44e5-8217-1910e3d35672" CreationDate="2011-03-30T11:30:15.873" UserId="20" Text="While a 2D camera is quite simple to implement, a camera in 3D can become really complicated quite fast.&#xD;&#xA;&#xD;&#xA;First person perspective or a fixed camera like in a RTS are probably the easiest ones, while a good third-person camera can be a huge challenge. I recently saw a presentation of a game-camera research project which looked really good: [Visibility Transition Planning for Real-Time Camera Control][1] (you'll find a link to a PDF at the bottom of the page or check out this [video][2] to see it in action).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.graphics.ethz.ch/research/physics/cameracontrol.php&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=8G0xfyDGLsk" />
  <row Id="21721" PostHistoryTypeId="5" PostId="10392" RevisionGUID="19d6735f-96de-43ab-825e-fee3afa7c9d3" CreationDate="2011-03-30T11:35:53.203" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to&#xD;&#xA;&#xD;&#xA;* display static meshs and&#xD;&#xA;* render animated meshs.&#xD;&#xA;&#xD;&#xA;I've already found quite a large number of possible formats and techniques, like keyframe animations, skeletal animation, MD2 up to MD5, 3DS, X, Collada etc. pp.&#xD;&#xA;&#xD;&#xA;For simplicity I'd like to use a format (and technique) that allows both, namely static and animated meshs. So my question is if _one_ format is suitable for that task and which one you'd suggest. And to clarify a bit: I don't need super-smooth animations or brandnew features.&#xD;&#xA;&#xD;&#xA;Sidenote: Because I'm a blender fan (but _not_ an expert ;-)) it'd be helpful if it can be used with that -- but of course that shouldn't be the show stopper, here." />
  <row Id="21722" PostHistoryTypeId="5" PostId="10387" RevisionGUID="a8ec8854-8cbe-4699-82a0-4c0e6d6b3c88" CreationDate="2011-03-30T11:37:55.353" UserId="20" Comment="removed &quot;hi&quot;" Text="I'm looking for some open source game controls.&#xD;&#xA;Especially I'm looking for a thumb screen joystick to move a character on the screen, something like a touch circle.&#xD;&#xA;&#xD;&#xA;Are there any open source implementation of what I'm looking for?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21723" PostHistoryTypeId="2" PostId="10394" RevisionGUID="0f9a39b3-44ea-466a-a2f9-cf46cbf35b96" CreationDate="2011-03-30T11:42:53.790" UserId="20" Text="There's a button and virtual joystick implementation for cocos2d called &quot;[SneakyInput][1]&quot;. Here's a [tutorial][2] that might help you use it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sneakyness/SneakyInput&#xD;&#xA;  [2]: http://www.qcmat.com/sneakyinput-joystick-dpad-and-buttons-for-cocos2d/" />
  <row Id="21724" PostHistoryTypeId="2" PostId="10395" RevisionGUID="ec0429ea-a466-4bae-91cc-bcc32f5246fd" CreationDate="2011-03-30T11:47:45.677" UserId="6021" Text="Let me propose you to use **Collada**.&#xD;&#xA;&#xD;&#xA;It's widely supported by DCC tools and well standardized. It supports skeletal animations and .. well, it does almost everything, including shaders and physics - although those won't be relevant for you. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Blender has a working Collada exporter, but as always, exporting stuff from Blender can be annoying. You may need to try alternative exporters or file formats or hack the scripts manually if you experience problems.&#xD;&#xA;&#xD;&#xA;To load Collada, use libraries such as [FCollada][1] or [ColladaDOM*][2] (Don't try to parse it on your own, Collada is a *really* fat XML monster ...). &#xD;&#xA;&#xD;&#xA;There's also [Open Asset Import Library][3], which loads ~25 file formats, including Collada. It would be an excellent choice since it aims especially towards game developers and provides its output in a format suitable for real-time rendering. But to be honest: I'm one of its co-authors, so I'm probably a *bit* biased.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://collada.org/mediawiki/index.php/FCollada&#xD;&#xA;  [2]: http://sourceforge.net/projects/collada-dom/&#xD;&#xA;  [3]: http://assimp.sourceforge.net/" />
  <row Id="21725" PostHistoryTypeId="5" PostId="10395" RevisionGUID="e115f261-a026-445b-82e1-ae3940941ebb" CreationDate="2011-03-30T11:54:24.507" UserId="6021" Comment="added 233 characters in body; added 458 characters in body; added 40 characters in body" Text="Let me propose you to use **Collada**.&#xD;&#xA;&#xD;&#xA;It's widely supported by DCC tools and well standardized. It supports skeletal animations and .. well, it does almost everything, including shaders and physics - those won't be relevant for you. &#xD;&#xA;&#xD;&#xA;Vertex-based animations such as in the MDL or MD2 formats are more or less a relict of the past. Today, most animations are skeletal animations (i.e. think if smoothly-rigged characters) and the content creation tools are optimized for them.&#xD;&#xA;&#xD;&#xA;Blender has a working Collada exporter, but as always, exporting stuff from Blender can be annoying. You may need to try alternative exporters or file formats or hack the scripts manually should you experience problems.&#xD;&#xA;&#xD;&#xA;To load Collada, use libraries such as [FCollada][1] or [ColladaDOM][2] (Don't try to parse it on your own, Collada is a *really* fat XML monster ...). There's also [Open Asset Import Library][3], which loads ~25 file formats, including Collada (and all the other formats you mention). It would be an excellent choice since it aims especially towards game developers and provides its output in a format suitable for real-time rendering. But to be honest: I'm one of its co-authors, so I'm probably a *bit* biased.&#xD;&#xA;&#xD;&#xA;**Last but not least**: The file format you use to import your assets should not define the abilities of your engine and the techniques it uses - it should rather be the other way round. Whether your animations are super-smooth is not a question of the import format, it's about which technique you use to animate meshes and how good they are modeled in the first place. The import format should just help you bring your data from Blender into your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://collada.org/mediawiki/index.php/FCollada&#xD;&#xA;  [2]: http://sourceforge.net/projects/collada-dom/&#xD;&#xA;  [3]: http://assimp.sourceforge.net/" />
  <row Id="21726" PostHistoryTypeId="25" PostId="10392" RevisionGUID="60d9ba4a-cc89-4fdd-b983-d8307dc34a9e" CreationDate="2011-03-30T12:00:21.023" Comment="http://twitter.com/#!/StackGameDev/status/53064011679399936" />
  <row Id="21727" PostHistoryTypeId="2" PostId="10396" RevisionGUID="0e222350-011c-4f79-a3d2-7abe9ac56463" CreationDate="2011-03-30T12:31:03.133" UserId="-1" Text="" />
  <row Id="21728" PostHistoryTypeId="2" PostId="10397" RevisionGUID="b25f3863-6f1f-455c-929b-672ad4e8b91f" CreationDate="2011-03-30T12:31:03.133" UserId="-1" Text="" />
  <row Id="21729" PostHistoryTypeId="2" PostId="10398" RevisionGUID="877cb54a-3b40-4c81-b2e9-21120e6ea6cd" CreationDate="2011-03-30T12:41:08.100" UserId="-1" Text="" />
  <row Id="21730" PostHistoryTypeId="2" PostId="10399" RevisionGUID="889f542f-b9eb-4929-80ca-ce43ec9017fc" CreationDate="2011-03-30T12:41:08.100" UserId="-1" Text="" />
  <row Id="21731" PostHistoryTypeId="5" PostId="10296" RevisionGUID="311fbd85-1ef6-434e-aa73-386ed8484320" CreationDate="2011-03-30T12:51:41.337" UserId="1198" Comment="fixed caps for directx and spacing of the number to be consistant. Fixed 3D" Text="I've done a reasonable number of small hobby projects using directx9 but it's time to move to DirectX 11 now.&#xD;&#xA;&#xD;&#xA;I have Frank Luna'a book  on 3D programming using DirectX 10 but nothing on DirectX 11. I belive they are pretty similar, but was wondering if anyone could enumerate the main differences at a code level that I'll need to be aware of (or point to an existing source).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21732" PostHistoryTypeId="4" PostId="10296" RevisionGUID="311fbd85-1ef6-434e-aa73-386ed8484320" CreationDate="2011-03-30T12:51:41.337" UserId="1198" Comment="fixed caps for directx and spacing of the number to be consistant. Fixed 3D" Text="Moving from DirectX 10 to DirectX 11" />
  <row Id="21733" PostHistoryTypeId="24" PostId="10296" RevisionGUID="311fbd85-1ef6-434e-aa73-386ed8484320" CreationDate="2011-03-30T12:51:41.337" Comment="Proposed by 1198 approved by -1 edit id of 151" />
  <row Id="21734" PostHistoryTypeId="5" PostId="10296" RevisionGUID="8506d923-e60a-4a47-84b8-b5fcc5f860f6" CreationDate="2011-03-30T12:51:42.227" UserId="189" Comment="added 1 characters in body" Text="I've done a reasonable number of small hobby projects using DirectX 9 but it's time to move to DirectX 11 now.&#xD;&#xA;&#xD;&#xA;I have Frank Luna'a book on 3D programming using DirectX 10 but nothing on DirectX 11. I believe they are pretty similar, but was wondering if anyone could enumerate the main differences at a code level that I'll need to be aware of (or point to an existing source).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21735" PostHistoryTypeId="5" PostId="10391" RevisionGUID="dda98985-b35b-4ef0-ac0b-1d1f74ae53ca" CreationDate="2011-03-30T12:52:07.513" UserId="322" Comment="spelling corrections" Text="*NB: I'm assuming here you're talking about cameras in third-person games such as Tomb Raider. Even then, some games may have sections, for instance when in cover, when a completely separate camera system is used to the main walking-around sections of the game.*&#xD;&#xA;&#xD;&#xA;This is a very complex area to get right. The simple naive approach is to lock the camera to a position above and behind the player, and if raycasts intersect level terrain then to move the camera back towards the player until clear of intersections.&#xD;&#xA;&#xD;&#xA;This quickly gets complicated as you add in smoothing, lookahead prediction, more ray casts to steer clear of trouble, gimbal lock, etc. And despite all that you'll still find the camera staring at the walls every now and again.&#xD;&#xA;&#xD;&#xA;It might be easier to get a list of games where the camera works well, and try to figure out what they're doing special.&#xD;&#xA;" />
  <row Id="21736" PostHistoryTypeId="24" PostId="10391" RevisionGUID="dda98985-b35b-4ef0-ac0b-1d1f74ae53ca" CreationDate="2011-03-30T12:52:07.513" Comment="Proposed by 322 approved by 189 edit id of 152" />
  <row Id="21737" PostHistoryTypeId="5" PostId="10399" RevisionGUID="56d7daf1-5468-44a7-aef1-a4a4474e687f" CreationDate="2011-03-30T12:52:18.747" UserId="3588" Comment="added 167 characters in body" Text="Numeric representation of the location of an entity in the game space. There are multiple forms of coordinate systems to cater to a variety of methods to map position." />
  <row Id="21738" PostHistoryTypeId="24" PostId="10399" RevisionGUID="56d7daf1-5468-44a7-aef1-a4a4474e687f" CreationDate="2011-03-30T12:52:18.747" Comment="Proposed by 3588 approved by 189 edit id of 156" />
  <row Id="21739" PostHistoryTypeId="5" PostId="10398" RevisionGUID="af761b75-c9d8-4a8c-a90f-8fa859c4572a" CreationDate="2011-03-30T12:52:21.430" UserId="3588" Comment="added 348 characters in body" Text="Coordinate systems can vary from the system (such as Cartesian versus Polar), the dimension (2D versus 3D), and even the scale (on a pixel level versus by tiles). Questions under the purview of this tag often deal with the storage and reference of coordinate data as well as the calculations and formulae used in handling coordinate-based geometry." />
  <row Id="21740" PostHistoryTypeId="24" PostId="10398" RevisionGUID="af761b75-c9d8-4a8c-a90f-8fa859c4572a" CreationDate="2011-03-30T12:52:21.430" Comment="Proposed by 3588 approved by 189 edit id of 155" />
  <row Id="21741" PostHistoryTypeId="5" PostId="2127" RevisionGUID="52104946-1184-41c7-8fc2-d3895c672ca6" CreationDate="2011-03-30T12:52:41.303" UserId="1198" Comment="fixed 3D and wording" Text="How can I get voice recognition features into the Unity Game Engine? Is there a plug-in or a framework (hopefully freeware) that I could use? If so, do you have any ideas on how to install it? Also, how much of a problem would there be with background noises in the game interfering with the voice inputs into the game? Are there any examples of games on the market that use this? (besides for Spain 3D for the Torque Game Engine)." />
  <row Id="21742" PostHistoryTypeId="24" PostId="2127" RevisionGUID="52104946-1184-41c7-8fc2-d3895c672ca6" CreationDate="2011-03-30T12:52:41.303" Comment="Proposed by 1198 approved by 189 edit id of 150" />
  <row Id="21743" PostHistoryTypeId="5" PostId="10397" RevisionGUID="fb9a4a5e-7f7d-4f2c-a053-5f929dd8b1cc" CreationDate="2011-03-30T12:52:48.510" UserId="3588" Comment="added 79 characters in body" Text="Hands-on teaching material for learning different elements of game development." />
  <row Id="21744" PostHistoryTypeId="24" PostId="10397" RevisionGUID="fb9a4a5e-7f7d-4f2c-a053-5f929dd8b1cc" CreationDate="2011-03-30T12:52:48.510" Comment="Proposed by 3588 approved by 189 edit id of 154" />
  <row Id="21745" PostHistoryTypeId="5" PostId="10396" RevisionGUID="e64bacf7-5433-4254-85e5-b4462679ecf3" CreationDate="2011-03-30T12:52:54.893" UserId="3588" Comment="added 284 characters in body" Text="For those who want a more direct approach to learning game development, there are plenty of tutorials available. Under this tag, you can find a variety that spans from demonstrating core concepts of design to illustrating the basics of common game genres.&#xD;&#xA;&#xD;&#xA;See also: [tag:education]" />
  <row Id="21746" PostHistoryTypeId="24" PostId="10396" RevisionGUID="e64bacf7-5433-4254-85e5-b4462679ecf3" CreationDate="2011-03-30T12:52:54.893" Comment="Proposed by 3588 approved by 189 edit id of 153" />
  <row Id="21747" PostHistoryTypeId="2" PostId="10400" RevisionGUID="98e62d0b-72df-49d8-9d75-e89e08ebadcf" CreationDate="2011-03-30T12:58:47.260" UserId="-1" Text="" />
  <row Id="21748" PostHistoryTypeId="2" PostId="10401" RevisionGUID="cbbef125-209e-492b-929d-2eefb6b0e54f" CreationDate="2011-03-30T12:58:47.260" UserId="-1" Text="" />
  <row Id="21749" PostHistoryTypeId="2" PostId="10402" RevisionGUID="7b5fccb2-e9cc-4feb-af23-1790c2e2b719" CreationDate="2011-03-30T13:06:44.133" UserId="4538" Text="I'm currently working on an online java game. Currently building the messaging system between the client/server and I came across a big IF.&#xD;&#xA;&#xD;&#xA;I am not experienced as a game programmer, only worked with web applications so far.&#xD;&#xA;Currently I made the messaging system using a custom solution and java NIO with sockets, but it got me wondering: what if it fails? what if I have to change it all to (insert name here)?&#xD;&#xA;&#xD;&#xA;So I thought, well, I gonna abstract the network layer of my engine, and if someday I need to change, I'll swap the adapter! But then, came two more problems, HOW would I abstract a network layer? And of course, is it worth the trouble? will it be a waste of time?&#xD;&#xA;&#xD;&#xA;I'd love some insight on these doubts. Thanks!" />
  <row Id="21750" PostHistoryTypeId="1" PostId="10402" RevisionGUID="7b5fccb2-e9cc-4feb-af23-1790c2e2b719" CreationDate="2011-03-30T13:06:44.133" UserId="4538" Text="Network Abstraction for a Java Game Messaging System" />
  <row Id="21751" PostHistoryTypeId="3" PostId="10402" RevisionGUID="7b5fccb2-e9cc-4feb-af23-1790c2e2b719" CreationDate="2011-03-30T13:06:44.133" UserId="4538" Text="&lt;engine&gt;&lt;java&gt;&lt;network&gt;" />
  <row Id="21752" PostHistoryTypeId="2" PostId="10403" RevisionGUID="487c290b-90d3-4cfe-84d6-2b21fe02d3cc" CreationDate="2011-03-30T13:41:02.760" UserId="-1" Text="" />
  <row Id="21753" PostHistoryTypeId="2" PostId="10404" RevisionGUID="4f37e09d-0343-492d-a20c-1ccc00af1bfc" CreationDate="2011-03-30T13:41:02.760" UserId="-1" Text="" />
  <row Id="21754" PostHistoryTypeId="5" PostId="9789" RevisionGUID="a658363f-0f90-4253-8faf-f95b454c72ae" CreationDate="2011-03-30T13:57:17.270" UserId="6099" Comment="added 7 characters in body" Text="I found this to be quite a thorny problem recently. I have a fully working Box-Sphere system up and running now though.&#xD;&#xA;&#xD;&#xA;My solution was to represent my rectangle as 4 planes. I test the sphere centre's distance from each plane and compare this to the sphere radius to see if there is an intersection (you do this with the framework Plane.DotCoordinate method). At the same time I count how many distances are positive - this is effectively a check to see if the point is in front of each plane. Finally I accumulate the the normals &amp; distances of the intersecting planes to make a single composite 'collision vector' to deal with edge and corner collisions with multiple planes.&#xD;&#xA;&#xD;&#xA;Once you have these 3 bits of info you can check a few things:&#xD;&#xA;&#xD;&#xA;1) If you are in front of *none* of the planes, definitely a collision and just check to see which one is intersecting to find which side was hit.&#xD;&#xA;&#xD;&#xA;1b) In front of *no* planes, but no intersections - complete containment. This is the worst case and I cast back a ray along the objects velocity vector to see which side it hit on its way in.&#xD;&#xA;&#xD;&#xA;2) In front of the same number of planes as there are intersections. This maybe a collision, but only if the intersection distance along the collision vector is less than the sphere radius. This case actually deals with face, edge and corner collisions (1, 2 or 3+ planes) in one go. &#xD;&#xA;&#xD;&#xA;I hope you can follow such a long-description, but the logic is probably more important than the code.&#xD;&#xA;&#xD;&#xA;Plus, a major upside of this this approach is it is trivially generalisable to 3D and you can add as many planes as you like to define the collision volume - provided your shape always remains convex. This technique is a version of the pattern often called Discrete Orientated Polytopes - or DOP if you want to look it up in the literature I think.&#xD;&#xA;&#xD;&#xA;By coincidence, I am presenting online on Wed 24 March on this very topic for Microsoft UK Tech Days. [If you want to see the system in action, see some slides detailing the process above, or ask questions then you can register here.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/ukmsdn/archive/2011/02/24/wanna-get-creative-on-24-march.aspx" />
  <row Id="21755" PostHistoryTypeId="5" PostId="10404" RevisionGUID="b76a4552-2318-4256-8a12-cd319140f5d6" CreationDate="2011-03-30T14:10:25.090" UserId="3588" Comment="added 128 characters in body" Text="The creation of balance to prevent a game from being too easy or too difficult for players. Also applies to competitive balance." />
  <row Id="21756" PostHistoryTypeId="24" PostId="10404" RevisionGUID="b76a4552-2318-4256-8a12-cd319140f5d6" CreationDate="2011-03-30T14:10:25.090" Comment="Proposed by 3588 approved by 51 edit id of 160" />
  <row Id="21757" PostHistoryTypeId="5" PostId="10403" RevisionGUID="ae787862-8b48-4ff7-bd78-ee21d22b938c" CreationDate="2011-03-30T14:10:28.210" UserId="3588" Comment="added 584 characters in body" Text="Balance is the art of finding the window which houses good gameplay experiences, as sitting outside of it may make the game feel boringly easy, unfairly hard, or worse. Balance can apply to both singleplayer and multiplayer scenarios, between whether it represents the player versus the challenges of the game, or the balance of players in comparison to each other.&#xD;&#xA;&#xD;&#xA;Questions under this tag deal with the principles of what factors can affect balance, how to ensure balance in your game, and what affordances can be made to shift the scales without making completely breaking them." />
  <row Id="21758" PostHistoryTypeId="24" PostId="10403" RevisionGUID="ae787862-8b48-4ff7-bd78-ee21d22b938c" CreationDate="2011-03-30T14:10:28.210" Comment="Proposed by 3588 approved by 51 edit id of 159" />
  <row Id="21759" PostHistoryTypeId="5" PostId="10401" RevisionGUID="9cd6a7a2-af13-4a52-a5fe-24541ae1c32d" CreationDate="2011-03-30T14:10:43.920" UserId="3588" Comment="added 180 characters in body" Text="The simulation of light and illumination in games, including its interaction with the environment. A core element of games that can bring out vivacity into otherwise static worlds." />
  <row Id="21760" PostHistoryTypeId="24" PostId="10401" RevisionGUID="9cd6a7a2-af13-4a52-a5fe-24541ae1c32d" CreationDate="2011-03-30T14:10:43.920" Comment="Proposed by 3588 approved by 51 edit id of 158" />
  <row Id="21761" PostHistoryTypeId="5" PostId="10400" RevisionGUID="33e2c352-cfda-471a-84bc-9af7feddfc24" CreationDate="2011-03-30T14:10:46.790" UserId="3588" Comment="added 317 characters in body" Text="Questions with this tag deal with the positioning and utility of light sources, the different methods of providing light into a scene, and special effects that can be done such as coloration and glow. While much more prominent of an issue in 3D games, there is equal potential for creativity in the realm of 2D games." />
  <row Id="21762" PostHistoryTypeId="24" PostId="10400" RevisionGUID="33e2c352-cfda-471a-84bc-9af7feddfc24" CreationDate="2011-03-30T14:10:46.790" Comment="Proposed by 3588 approved by 51 edit id of 157" />
  <row Id="21763" PostHistoryTypeId="6" PostId="327" RevisionGUID="543bf1f5-9770-4dc4-8791-809032103809" CreationDate="2011-03-30T14:11:01.690" UserId="3588" Comment="Compressed the two tags ♪" Text="&lt;textures&gt;&lt;procedural-generation&gt;" />
  <row Id="21764" PostHistoryTypeId="24" PostId="327" RevisionGUID="543bf1f5-9770-4dc4-8791-809032103809" CreationDate="2011-03-30T14:11:01.690" Comment="Proposed by 3588 approved by 51 edit id of 161" />
  <row Id="21765" PostHistoryTypeId="5" PostId="10402" RevisionGUID="e1774dc3-7483-4e8d-bf30-92b5ca1a874d" CreationDate="2011-03-30T14:11:13.123" UserId="1198" Comment="dropped signature and greeting, fixed caps." Text="I'm currently working on an online java game. Currently building the messaging system between the client/server and I came across a big if.&#xD;&#xA;&#xD;&#xA;I am not experienced as a game programmer, only worked with web applications so far.&#xD;&#xA;Currently I made the messaging system using a custom solution and Java NIO with sockets, but it got me wondering: what if it fails? What if I have to change it all to (insert name here)?&#xD;&#xA;&#xD;&#xA;So I thought, well, I gonna abstract the network layer of my engine, and if someday I need to change, I'll swap the adapter! But then, came two more problems, how would I abstract a network layer? And of course, is it worth the trouble? Will it be a waste of time?&#xD;&#xA;&#xD;&#xA;I'd love some insight on these doubts." />
  <row Id="21766" PostHistoryTypeId="24" PostId="10402" RevisionGUID="e1774dc3-7483-4e8d-bf30-92b5ca1a874d" CreationDate="2011-03-30T14:11:13.123" Comment="Proposed by 1198 approved by 51 edit id of 162" />
  <row Id="21768" PostHistoryTypeId="2" PostId="10406" RevisionGUID="c1cffe61-c24e-478e-9253-efca8e7c5689" CreationDate="2011-03-30T14:25:52.263" UserId="6099" Text="I'm afraid I have to disagree with Andrew on this one. I do recommend the DrawableGameComponent architecture and I would dispute that this, or the services pattern, are particularly 'heavyweight' - I do have other issues, outside of the scope of this question, but performance generally isn't one of them. &#xD;&#xA;&#xD;&#xA;Creating a single camera object to provide a view and projection matrix to your drawables is straightforward and allows you to have your objects draw themselves in their own Draw method. This is, by far, the most common way of structuring an XNA project in my experience. At the end of the day your drawables are only maintaining a *reference* to a single object, so there is not much overhead. &#xD;&#xA;&#xD;&#xA;How you provide this reference is a matter of taste and whether you are bothered about reusing your code in other projects:&#xD;&#xA;&#xD;&#xA; - You can offer the camera through the&#xD;&#xA;   services pattern and get hold of it&#xD;&#xA;   in your drawable's Initialize method.&#xD;&#xA; - Pass it in during construction&#xD;&#xA;   (provided it has already been&#xD;&#xA;   instansiated).&#xD;&#xA; - Use a public Property of your derived&#xD;&#xA;   game class (which you retrieve by&#xD;&#xA;   casting the Drawable's game object&#xD;&#xA;   reference to the derived game type&#xD;&#xA;   first)&#xD;&#xA; - Use a Static, as Andrew suggests.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Personally I would suggest one of the first 2 options (via an ICamera interface definition) to neatly decouple your actual camera &amp; drawable implementations for later re-use. Personally I don't believe well structured code is 'fancy' - good code is just good code." />
  <row Id="21769" PostHistoryTypeId="2" PostId="10407" RevisionGUID="44b7bc33-198e-48e2-8d28-0dc2eb4efc1a" CreationDate="2011-03-30T14:34:24.273" UserId="138" Text="I'm going to go ahead and suggest [Real-time Cameras][1]. It appears to cover the topics you require.&#xD;&#xA;&#xD;&#xA;Honestly, though, you should go code some 3D cameras and figure out what works and doesn't :) That's the fun part, anyway.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Real-Time-Cameras-Mark-Haigh-Hutchinson/dp/0123116341/ref=sr_1_2?s=books&amp;ie=UTF8&amp;qid=1301495493&amp;sr=1-2" />
  <row Id="21770" PostHistoryTypeId="6" PostId="7276" RevisionGUID="44dfbe15-c096-434a-badc-b98042b6194d" CreationDate="2011-03-30T14:35:29.327" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;algorithm&gt;&lt;playtesting&gt;" />
  <row Id="21771" PostHistoryTypeId="6" PostId="9111" RevisionGUID="656d5ad6-7b8b-4459-8f4c-2cf8e2dab059" CreationDate="2011-03-30T14:58:36.860" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;databases&gt;&lt;php&gt;" />
  <row Id="21772" PostHistoryTypeId="6" PostId="8695" RevisionGUID="e715dce5-1d0b-47f3-a476-a848fd0659d9" CreationDate="2011-03-30T14:58:55.923" UserId="14" Comment="edited tags" Text="&lt;language-choice&gt;" />
  <row Id="21773" PostHistoryTypeId="6" PostId="8266" RevisionGUID="e082fd6e-b285-4764-b0a5-e1eca5fb0ebb" CreationDate="2011-03-30T14:59:10.120" UserId="14" Comment="edited tags" Text="&lt;math&gt;&lt;matrix&gt;" />
  <row Id="21774" PostHistoryTypeId="6" PostId="7430" RevisionGUID="64f45eb8-6093-4a86-85b6-b3f5f6c3e80c" CreationDate="2011-03-30T14:59:17.280" UserId="14" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;android&gt;&lt;multithreading&gt;" />
  <row Id="21775" PostHistoryTypeId="25" PostId="10388" RevisionGUID="5e1170f0-2013-4267-a4b4-b031d59784fd" CreationDate="2011-03-30T15:00:21.257" Comment="http://twitter.com/#!/StackGameDev/status/53109311290871809" />
  <row Id="21776" PostHistoryTypeId="6" PostId="8068" RevisionGUID="b8c94540-f1ff-4b84-bf88-bcca15b867f7" CreationDate="2011-03-30T15:00:31.587" UserId="14" Comment="edited tags" Text="&lt;game-design&gt;&lt;project-management&gt;&lt;planning&gt;" />
  <row Id="21777" PostHistoryTypeId="6" PostId="8126" RevisionGUID="769bc277-2df2-4ded-af9a-3b3a6f6f21e2" CreationDate="2011-03-30T15:41:41.743" UserId="1430" Comment="removed 'design' as it doesn't add anything" Text="&lt;architecture&gt;&lt;camera&gt;&lt;first-person-shooter&gt;&lt;third-person-view&gt;" />
  <row Id="21778" PostHistoryTypeId="6" PostId="8664" RevisionGUID="6d054fbd-3ac2-43b7-9e7a-8c858b15f9d4" CreationDate="2011-03-30T15:42:57.997" UserId="1430" Comment="s/design/game-mechanics" Text="&lt;game-mechanics&gt;&lt;rpg&gt;&lt;turn-based&gt;" />
  <row Id="21779" PostHistoryTypeId="6" PostId="8195" RevisionGUID="cf754463-d213-4f96-9deb-ae12d70b89de" CreationDate="2011-03-30T15:45:02.070" UserId="1430" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;physics&gt;&lt;gui&gt;&lt;logic&gt;" />
  <row Id="21780" PostHistoryTypeId="2" PostId="10408" RevisionGUID="eaac688a-75eb-4871-bd66-2d2dbd08ecc2" CreationDate="2011-03-30T15:45:10.663" UserId="6099" Text="Hmmm. Got challenge this one for the sake of a bit of balance here I'm afraid.&#xD;&#xA;&#xD;&#xA;There seem to be 5 charges in Andrew's reply, so I'll try and deal with each in turn:&#xD;&#xA;&#xD;&#xA;*1) Components are an out-of-date and abandoned design.*&#xD;&#xA;&#xD;&#xA;The idea of components design pattern existed long before XNA - in essence it is simply a decision to make objects, rather than the over-arching game object, the home of their own Update and Draw behaviour. For objects in its component collection, the game will call these methods (and a couple of others) automatically at the appropriate time - crucially the game object does not itself have to 'know' any of this code. If you wish to re-use your game classes in different games (and thus different Game objects), this de-coupling of objects is still fundementally a good idea. A quick look at the latest (professionally produced) demos of XNA4.0 from the AppHub confirms my impression that Microsoft are still (quite rightly in my view) firmly behind this one.&#xD;&#xA;&#xD;&#xA;*2) Andrew can't think of more than 2 re-usable game classes.*&#xD;&#xA;&#xD;&#xA;I can. In fact I can think of loads! I've just checked my current shared lib, and it comprises more than 80 *re-usable* components and services. To give you a flavour, you could have:&#xD;&#xA;&#xD;&#xA; - Game State/Screen Managers&#xD;&#xA; - ParticleEmitters&#xD;&#xA; - Drawable primitives&#xD;&#xA; - AI controllers&#xD;&#xA; - Input controllers&#xD;&#xA; - Animation controllers&#xD;&#xA; - Billboards&#xD;&#xA; - Physics &amp; Collision Managers&#xD;&#xA; - Cameras&#xD;&#xA;&#xD;&#xA;Any particular game idea will need at least 5-10 things from this set - guaranteed - and they can be fully functional in a completely new game with one line of code.&#xD;&#xA;&#xD;&#xA;*3) Controlling draw order by the order of explicit draw calls is preferrable to using the component's DrawOrder property.*&#xD;&#xA;&#xD;&#xA;Well, I basically agree with Andrew on this one. BUT, if you leave all you component's DrawOrder properties as default, you can still explicitly control their draw order by the order in which you add them to the collection. This is really identical in 'visibility' terms to explicit ordering of their manual draw calls.&#xD;&#xA;&#xD;&#xA;*4) Calling a load of object's Draw methods yourself is more 'lightweight' than having them called by an existing framework method.*&#xD;&#xA;&#xD;&#xA;Why? Plus, in all but the most trivial of projects your Update logic and Draw code will totally overshadow your method calling in terms of performance hit in any case.&#xD;&#xA;&#xD;&#xA;*5) Placing your code in one file is preferrable, when debugging, than having it in the individual object's file.*&#xD;&#xA;&#xD;&#xA;Well, firstly, when I'm debugging in Visual Studio the location of a breakpoint in terms of files on disk is almost invisible these days - the IDE deals with the location without any drama. But also consider for a moment that you have a problem with your Skybox drawing. Is going to the Skybox's Draw method *really* more onerous than locating the skybox drawing code in the (presumably very lengthy) *master* draw method in the Game object? Nope, not really - in fact I would argue that it is quite the opposite.&#xD;&#xA;&#xD;&#xA;So, in summary - please take a long hard look at Andrew's arguments here. I don't believe they actually give substantive grounds to write entangled game code. The upsides of the decoupled component pattern (used judiciously) are massive. " />
  <row Id="21781" PostHistoryTypeId="6" PostId="9987" RevisionGUID="4972cd6a-4495-42d7-9bd8-451da6fd044a" CreationDate="2011-03-30T15:46:24.127" UserId="1430" Comment="edited tags" Text="&lt;game-design&gt;&lt;puzzle&gt;" />
  <row Id="21782" PostHistoryTypeId="6" PostId="9187" RevisionGUID="c2a86cf5-6ce2-49f9-afa4-5dee9d025383" CreationDate="2011-03-30T15:46:55.750" UserId="1430" Comment="removing design tag since it doesn't seem to add anything" Text="&lt;programming&gt;&lt;tools&gt;&lt;hobby-development&gt;" />
  <row Id="21783" PostHistoryTypeId="2" PostId="10409" RevisionGUID="8df07ee6-0dba-4fa5-b9c7-71fbe024d72a" CreationDate="2011-03-30T15:57:53.983" UserId="6427" Text="**Background**&#xD;&#xA;Hi. I am working at a small game studio developing games for iOS and Android. We do the full journey here, from idea to finished product and we have funding to do so. However, with the smartphone market being a bit of a lottery for small developers we are looking into getting into a publisher deal. &#xD;&#xA;&#xD;&#xA;**Question**&#xD;&#xA;What I am wondering now is what kind of different deals one could look at. From what I have gathered from a reading a number of articles a common model it is that the publisher pay for the development cost and once the game is released the developer gets about 20% of the revenue. What I am wondering is if there are any other common models used between developers and publishers? &#xD;&#xA;" />
  <row Id="21784" PostHistoryTypeId="1" PostId="10409" RevisionGUID="8df07ee6-0dba-4fa5-b9c7-71fbe024d72a" CreationDate="2011-03-30T15:57:53.983" UserId="6427" Text="Different revenue models between developers and publishers?" />
  <row Id="21785" PostHistoryTypeId="3" PostId="10409" RevisionGUID="8df07ee6-0dba-4fa5-b9c7-71fbe024d72a" CreationDate="2011-03-30T15:57:53.983" UserId="6427" Text="&lt;publishing&gt;&lt;revenue&gt;&lt;business-model&gt;" />
  <row Id="21786" PostHistoryTypeId="2" PostId="10410" RevisionGUID="f53c291a-cdcc-428d-8a61-11be86e2e769" CreationDate="2011-03-30T16:17:35.653" UserId="6418" Text="# Situation #&#xD;&#xA;I've got a large map divided into 16*16 parts (comparable to [Minecraft](http://minecraft.net)) for x and z. For every part a VBO is generated and stored using GL_STATIC_DRAW.&#xD;&#xA;&#xD;&#xA;# Problem #&#xD;&#xA;The technique described above works fine and with good performance, however it restricts (due to the nature of GL_STATIC_DRAW) modifications that _may_ happen frequently, especially texture animations (that is incrementing texture coordinates to select another sub rectangle in the texture).&#xD;&#xA;&#xD;&#xA;Now I'm asking myself how to solve that problem. Switching to GL_DYNAMIC_DRAW seems like an overkill to me, since most of the geometry _is_ static, thus better placed in GPU's memory.&#xD;&#xA;&#xD;&#xA;Generating a separate VBO (or even a vertex array?) is an option that came into my mind, however this would greatly increase complexity. Any ideas?" />
  <row Id="21787" PostHistoryTypeId="1" PostId="10410" RevisionGUID="f53c291a-cdcc-428d-8a61-11be86e2e769" CreationDate="2011-03-30T16:17:35.653" UserId="6418" Text="Texture animation/coordinates in VBOs" />
  <row Id="21788" PostHistoryTypeId="3" PostId="10410" RevisionGUID="f53c291a-cdcc-428d-8a61-11be86e2e769" CreationDate="2011-03-30T16:17:35.653" UserId="6418" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="21789" PostHistoryTypeId="2" PostId="10411" RevisionGUID="640cda2a-fcff-4965-a29d-c487de7b69c8" CreationDate="2011-03-30T16:25:00.747" UserId="6418" Text="I don't know if this helps you with FSX, however documentation for FS2004 modules has always been rare too, so this might be of help.&#xD;&#xA;&#xD;&#xA;Here's an example of an FS2004 module: http://pastebin.com/AQG2H0Vc (written by myself, public domain). From my experience the APIs haven't changed that much so with a bit of luck you'll be able to adopt the example for FSX.&#xD;&#xA;&#xD;&#xA;Important is the _Linkage_ global variable (type _GAUGESLINKAGE_) because it includes the MSFS version (_0x900_ in the example) and callback functions that MSFS shall call. I don't remember exactly what _ImportTable_ was for, however if you're not writing code for gauges, you may just ignore it for now.&#xD;&#xA;&#xD;&#xA;Have you checked the SDK that is shipped with the FSX Pro/Deluxe edition?" />
  <row Id="21790" PostHistoryTypeId="6" PostId="5935" RevisionGUID="27be5edd-23b4-4444-a577-4b053ba1b957" CreationDate="2011-03-30T16:35:04.903" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;simulations&gt;" />
  <row Id="21791" PostHistoryTypeId="2" PostId="10412" RevisionGUID="3a63d05a-c53a-4974-b103-d888e3e084e5" CreationDate="2011-03-30T16:39:40.733" UserId="4443" Text="In general nature of the Developer-Publisher relationship, it is true that the developer will make the game at a loss to themselves and then receive compensation from the developer. 20% of the revenue however seems first fairly high to me, and second it is -very- easy to show how very little 'revenue' is being generated by something to make this kind of agreement even more frustrating. You may want to consider alternates that are more tangible or lump sum payments for completion (given), target sales ranges, completion dates met, etc. Also, depending on how long your development cycles are, you might want to negotiate milestone deliverables and payment schedule, so its not an all or nothing sort of deal. Split the development cycle into 3 substantial collections of functionality and upon completing terms of the each deliverable you would receive partial payments towards the development costs.&#xD;&#xA;&#xD;&#xA;Another large thing to be aware of, almost every publisher -will- require you to give them ownership of any IP they are publishing, regardless of who came up with the idea. Make sure the terms in that area are well understood by all parties.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="21792" PostHistoryTypeId="2" PostId="10413" RevisionGUID="de693ace-e8d6-4357-8dcd-1b8f5608c45f" CreationDate="2011-03-30T16:40:09.220" UserId="6429" Text="It might not work for the &quot;look and feel&quot; that you're going for, but one thing to consider might be a top-down or more isometric view for your battle map, similar to how e.g. Warcraft or Civilization represents the world. These styles of maps lend less size to show the fine detail of your sprites, of course, but they tend to give you a lot more room to show sprites and to move around. You might also consider some sort of &quot;intelligent zoom&quot;, where as folks on either side start dropping the view could automatically zoom in a little closer as it needs less room to show off the scale of the battle, meaning that as you whittle down the opposing force your players go from a very broad view to a much more detailed view -- not unlike what your characters would experience as they transition from smashing a massive army to mopping up the remaining stragglers." />
  <row Id="21793" PostHistoryTypeId="5" PostId="9991" RevisionGUID="4e116c77-8dfc-431e-ac76-adf2da480882" CreationDate="2011-03-30T16:42:03.220" UserId="20" Comment="deleted 44 characters in body" Text="It seems to me that most of these types of puzzles can be related to solving an over-constrained system of equations that happens to have a solution.  I'm not sure if that makes sense, but if you can somehow relate your rules to a system of equations, then build &quot;solutions&quot; from what you know the answer to be, it might lead to interesting problems.  It also means that the puzzles are entirely mathematical and not &quot;motion-like&quot; at all.  Just a bunch of  static equations :-)&#xD;&#xA;&#xD;&#xA;Another way of looking at it is considering that the simpler types of these puzzles have direct solutions --- that is, move a piece, then another, then another &amp; then it's solved!, but the more complicated ones can force you down a path that doesn't seem obvious at first.  Start from the final solution and applying your rules in reverse to complicate the initial conditions will also help.  Looking at each rule application as a branch on a tree or graph, the interesting puzzles are very dense with only one or two paths that lead to solutions instead of many paths that lead to solutions." />
  <row Id="21794" PostHistoryTypeId="2" PostId="10414" RevisionGUID="1a33ee6f-f9c5-49ca-98df-4e779e892923" CreationDate="2011-03-30T16:44:05.567" UserId="788" Text="I'm porting a C++ game to Android using the NDK and there's one bottleneck that's really slowing down the code: gluScaleImage().&#xD;&#xA;&#xD;&#xA;Does anyone know of a faster way to scale image textures?" />
  <row Id="21795" PostHistoryTypeId="1" PostId="10414" RevisionGUID="1a33ee6f-f9c5-49ca-98df-4e779e892923" CreationDate="2011-03-30T16:44:05.567" UserId="788" Text="Faster way to scale images than gluScaleImage?" />
  <row Id="21796" PostHistoryTypeId="3" PostId="10414" RevisionGUID="1a33ee6f-f9c5-49ca-98df-4e779e892923" CreationDate="2011-03-30T16:44:05.567" UserId="788" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;porting&gt;" />
  <row Id="21797" PostHistoryTypeId="2" PostId="10415" RevisionGUID="809614d4-0296-4b18-89c0-b61dd6e1b796" CreationDate="2011-03-30T17:02:32.087" UserId="20" Text="Scaling images is computationally expensive (even when you're using heavily optimized code/functions). If you're doing this a lot during runtime, you should probably rethink your design.&#xD;&#xA;&#xD;&#xA;If this is just about displaying images with various sizes, why not create a textured quad and scale it to the requested size? The texture could always be the same size then.&#xD;&#xA;" />
  <row Id="21798" PostHistoryTypeId="2" PostId="10416" RevisionGUID="a33c4e38-d656-452e-a467-480358934d85" CreationDate="2011-03-30T17:32:18.350" UserId="4116" Text="I'm making a story-intensive game (RPG) for the iphone and want to distribute it over the AppStore. But AppStore Apps have the potential to be distributed internationally, so I need kind of legal advice - maybe someone of the independent developers here was already in a similiar situation.&#xD;&#xA;&#xD;&#xA;I'm planning to use an book (i.e. classic literature, world literature or fairytales) as foundation for the storyline of my game: So what are the basic conditions, if I dont want to run into big problems? I heard about 70 years after first publishing (or after death of the author?) a book would be &quot;out of copyright&quot; - but is that true for every country? Could I get problems in the App Store?&#xD;&#xA;&#xD;&#xA;*My Background: It doesn't seem economical to pay a scenario writer for my game (no budget) - and myself isn't &quot;talented&quot; so much in this field. But there are already tons of great storys out there, which never get a game release so far. Because of that, I was thinking: &quot;Why not use this, instead of making a crab story by myself&quot;...*&#xD;&#xA;&#xD;&#xA;Any advice is welcome!&#xD;&#xA;Thank you&#xD;&#xA;(P.S.: I know, that I can't get here a reply from a lawyer - but I hope for tips from other independent developers with expierence in such cases...)" />
  <row Id="21799" PostHistoryTypeId="1" PostId="10416" RevisionGUID="a33c4e38-d656-452e-a467-480358934d85" CreationDate="2011-03-30T17:32:18.350" UserId="4116" Text="Story for an iPhone Game from a book?" />
  <row Id="21800" PostHistoryTypeId="3" PostId="10416" RevisionGUID="a33c4e38-d656-452e-a467-480358934d85" CreationDate="2011-03-30T17:32:18.350" UserId="4116" Text="&lt;iphone&gt;&lt;books&gt;&lt;legal&gt;&lt;storyboard&gt;" />
  <row Id="21801" PostHistoryTypeId="2" PostId="10417" RevisionGUID="fdbfb0fc-431c-4a85-9d3b-c9100715c0f9" CreationDate="2011-03-30T17:34:03.153" UserId="6430" Text=" When animating for the Android platform is it a better practice to create a sprite sheet with multiple states for each sprite on a single picture or should I instead export individual images for each character/state/etc.? Which option gives me a smaller file size for resources and which is easier for the programmer to animate?" />
  <row Id="21802" PostHistoryTypeId="1" PostId="10417" RevisionGUID="fdbfb0fc-431c-4a85-9d3b-c9100715c0f9" CreationDate="2011-03-30T17:34:03.153" UserId="6430" Text="Sprite sheet or multiple resources" />
  <row Id="21803" PostHistoryTypeId="3" PostId="10417" RevisionGUID="fdbfb0fc-431c-4a85-9d3b-c9100715c0f9" CreationDate="2011-03-30T17:34:03.153" UserId="6430" Text="&lt;android&gt;&lt;animation&gt;&lt;sprites&gt;" />
  <row Id="21804" PostHistoryTypeId="2" PostId="10418" RevisionGUID="df14342d-eaca-4044-add0-30e11c5b6da9" CreationDate="2011-03-30T17:39:08.267" UserId="5259" Text="Sockets are going to be around for a long, long time, so I wouldn't worry about that. If it is already working for you, that's even better!&#xD;&#xA;&#xD;&#xA;For an interesting messaging layer, check out [ZeroMQ][1].&#xD;&#xA;&#xD;&#xA;In general, if you construct your game to have a general sort of event-based flow (i.e.,&quot;Client 2 fire&quot;, &quot;Client 1 die&quot;, &quot;Sound explosion (2,3,1)&quot;, etc.) and use that for all interactions, you then reduce your problem to routing streams of events and handling them.&#xD;&#xA;&#xD;&#xA;Your networking issue then becomes one mainly of serializing these events to a communications channel (for example, over sockets), and then deserializing these events to an event stream on the client/server. If you make that abstraction, then any change to the networking mechanism (sockets to modems to semaphores to whatever) means that you only will have to rewrite that serialization/deserialization/channel management code.&#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zeromq.org/bindings:java" />
  <row Id="21805" PostHistoryTypeId="2" PostId="10419" RevisionGUID="a8851b24-396a-4be4-8362-3fb55ccd0922" CreationDate="2011-03-30T17:44:24.283" UserId="1198" Text="It depends how many you have and how many of those would be in use at any given time.&#xD;&#xA;&#xD;&#xA;I would break it down as follows:&#xD;&#xA;&#xD;&#xA;For each &quot;sprite&quot; I would have one sheet, each WxH section is a single frame. If there are only a few states, I'd keep those all in the same image file, and just make a map of &#xD;&#xA;&#xD;&#xA; 1. Walking is sprites 0-9&#xD;&#xA; 2. Jumping is 10-15&#xD;&#xA; 3. Crouching is 15-20&#xD;&#xA;&#xD;&#xA;If you have many states per sprite, I would consider breaking up each state animation into its own file.&#xD;&#xA;&#xD;&#xA;If you only have a few sprites and a few states, it might be best to simply have it all on a single image file, and use the maping I have above, but include it per sprite. This will keep the amount of memory usage to a minimum, since you're targeting android, memory is a premium resource and should be conserved where possible." />
  <row Id="21806" PostHistoryTypeId="25" PostId="10417" RevisionGUID="3a9c3a4b-4874-4c8f-a875-0fc37545f3c7" CreationDate="2011-03-30T18:00:20.993" Comment="http://twitter.com/#!/StackGameDev/status/53154608683565057" />
  <row Id="21807" PostHistoryTypeId="2" PostId="10420" RevisionGUID="0013f37c-c9be-40e9-bf3c-3fedfdde1a3e" CreationDate="2011-03-30T18:41:49.240" UserId="5824" Text="It can get very complicated. Have a read of http://en.wikipedia.org/wiki/H._P._Lovecraft#Copyright for example.&#xD;&#xA;&#xD;&#xA;You should seek specific legal advice from a professional on your situation." />
  <row Id="21808" PostHistoryTypeId="2" PostId="10421" RevisionGUID="8f79c835-7f39-4b9a-9669-847f5e988235" CreationDate="2011-03-30T18:45:05.690" UserId="4496" Text="If you want to keep the side view, you could have the monsters function in a method similar to how you imagine the player's characters to be situated.  The enemies would have a &quot;front rank&quot; of sorts with the other monsters on standby.  Give them the ability to support the ones in front with their attacks or perhaps sometimes have different weaker (or stronger) attacks that are only launched while not in front.&#xD;&#xA;&#xD;&#xA;This would add consistency between the player and the enemies, and limit your on-screen resources to reasonable levels.  It could also add some strategy depending on how the monsters are arrayed (probably have some way to see their full group, either via text or a quick pan), how they fill forward as the front line falls, and how different monsters react to their position." />
  <row Id="21809" PostHistoryTypeId="5" PostId="10409" RevisionGUID="6b603573-797d-431c-b82a-d6b207b73418" CreationDate="2011-03-30T18:45:55.150" UserId="1198" Comment="wording, greeting, new lines based on assumed OP intent" Text="**Background**&#xD;&#xA;&#xD;&#xA;I am working at a small game studio developing games for iOS and Android. We do the full journey here, from idea to finished product and we have funding to do so. However, with the smartphone market being a bit of a lottery for small developers we are looking into getting into a publisher deal. &#xD;&#xA;&#xD;&#xA;**Question**&#xD;&#xA;&#xD;&#xA;What I am wondering now is what kind of different deals one could look at. From what I have gathered from reading a number of articles a common model it is that the publisher pay for the development cost and once the game is released the developer gets about 20% of the revenue. What I am wondering is if there are any other common models used between developers and publishers? &#xD;&#xA;" />
  <row Id="21810" PostHistoryTypeId="24" PostId="10409" RevisionGUID="6b603573-797d-431c-b82a-d6b207b73418" CreationDate="2011-03-30T18:45:55.150" Comment="Proposed by 1198 approved by 51 edit id of 163" />
  <row Id="21811" PostHistoryTypeId="2" PostId="10422" RevisionGUID="66a1e7ce-2b51-48f1-827b-59631bda88ed" CreationDate="2011-03-30T18:53:50.853" UserId="51" Text="If you're looking for something &quot;sourceable&quot;, try looking through the GDC Vault archives.  You have access to slides from talks.   Doing a search for &quot;camera&quot; lead to some results that might be useful.  http://gdcvault.com/free" />
  <row Id="21813" PostHistoryTypeId="2" PostId="10423" RevisionGUID="90d91e37-3cb4-4e97-b317-d65770482ef7" CreationDate="2011-03-30T18:56:38.403" UserId="51" Text="I'm going to go out on a limb and say that the problem might be related to your view deriving from UIScrollView that you're rendering into.  You should be handling scrolling yourself inside a stationary EAGLView." />
  <row Id="21814" PostHistoryTypeId="2" PostId="10424" RevisionGUID="25ae598d-5772-48d7-8e82-be6a986d295f" CreationDate="2011-03-30T19:00:47.667" UserId="51" Text="" />
  <row Id="21815" PostHistoryTypeId="2" PostId="10425" RevisionGUID="31642c94-b0de-4140-98d5-b9d10bd94087" CreationDate="2011-03-30T19:00:47.667" UserId="51" Text="Engine-design related questions.  How code is structured." />
  <row Id="21816" PostHistoryTypeId="5" PostId="10409" RevisionGUID="fd2ed560-1a26-4b64-89a6-69a4152ea1dd" CreationDate="2011-03-30T19:04:00.987" UserId="51" Comment="deleted 34 characters in body" Text="I am working at a small game studio developing games for iOS and Android. We do the full journey here, from idea to finished product and we have funding to do so. However, with the smartphone market being a bit of a lottery for small developers we are looking into getting into a publisher deal. &#xD;&#xA;&#xD;&#xA;What I am wondering now is what kind of different deals one could look at. From what I have gathered from reading a number of articles a common model it is that the publisher pay for the development cost and once the game is released the developer gets about 20% of the revenue. What I am wondering is if there are any other common models used between developers and publishers? &#xD;&#xA;" />
  <row Id="21817" PostHistoryTypeId="5" PostId="10416" RevisionGUID="13b0c7aa-9ba0-4ff6-a8ae-8a24a2b92356" CreationDate="2011-03-30T19:07:11.980" UserId="51" Comment="deleted 44 characters in body" Text="I'm making a story-intensive game (RPG) for the iPhone and want to distribute it over the AppStore. But AppStore Apps have the potential to be distributed internationally, so I need kind of legal advice - maybe someone of the independent developers here was already in a similiar situation.&#xD;&#xA;&#xD;&#xA;I'm planning to use an book (i.e. classic literature, world literature or fairytales) as foundation for the storyline of my game: So what are the basic conditions, if I dont want to run into big problems? I heard about 70 years after first publishing (or after death of the author?) a book would be &quot;out of copyright&quot; - but is that true for every country? Could I get problems in the App Store?&#xD;&#xA;&#xD;&#xA;My Background: It doesn't seem economical to pay a scenario writer for my game (no budget) - and myself isn't &quot;talented&quot; so much in this field. But there are already tons of great stories out there, which never get a game release so far. Because of that, I was thinking: &quot;Why not use this, instead of making a crap story by myself&quot;...&#xD;&#xA;&#xD;&#xA;I know that I can't get here a reply from a lawyer - but I hope for tips from other independent developers with experience in such cases...)" />
  <row Id="21818" PostHistoryTypeId="2" PostId="10426" RevisionGUID="f466d15f-1a35-429a-813a-16268317375f" CreationDate="2011-03-30T19:09:35.847" UserId="51" Text="One of the biggest speed advantages from using a sprite sheet is that you can render multiple instances of the sprite batched with a single draw call.  If you do it with individual images then each character (or whatever) on screen is going to be a different draw call unless they happen to be on the same animation frame.&#xD;&#xA;&#xD;&#xA;In general you probably want to atlas as much as possible onto a single sheet. " />
  <row Id="21819" PostHistoryTypeId="5" PostId="9678" RevisionGUID="e0f0e359-4488-4572-a683-f4eccf11f6fd" CreationDate="2011-03-30T19:10:01.837" UserId="1198" Comment="dropped greeting, fixed spelling" Text="I'm not experienced in Game Development questions, but as a programmer. In the language Scala, you can have scalable multi-tasking with Actors, very stable, as I hear. You can even have hundreds of thousands of them running at once without a problem.&#xD;&#xA;&#xD;&#xA;So I thought, maybe you can use these as a base class for 2D-Sprites, to break out of the game-loop thing that requires to go through all the sprites and move them. They'd basically move themselves, event-driven.&#xD;&#xA;&#xD;&#xA;Would that make sense for a game? Having it multitasked like that? After all, it will run on the JVM, though that should not be much of a problem nowadays." />
  <row Id="21820" PostHistoryTypeId="24" PostId="9678" RevisionGUID="e0f0e359-4488-4572-a683-f4eccf11f6fd" CreationDate="2011-03-30T19:10:01.837" Comment="Proposed by 1198 approved by 51 edit id of 164" />
  <row Id="21821" PostHistoryTypeId="5" PostId="9694" RevisionGUID="7c8953b1-9eed-49d8-a0b4-363852c99a68" CreationDate="2011-03-30T19:10:06.330" UserId="1198" Comment="fixed &quot;i&quot; and wording" Text="Well, I'm not that much of a programmer either, but I don't see any problem on your proposal. I didn't even think of such a way of developing actors.&#xD;&#xA;&#xD;&#xA;It may be quite a challenge, since the IA has to be very accurate, to avoid unespected behavior, but besides that, I see it's quite a good proposal" />
  <row Id="21822" PostHistoryTypeId="24" PostId="9694" RevisionGUID="7c8953b1-9eed-49d8-a0b4-363852c99a68" CreationDate="2011-03-30T19:10:06.330" Comment="Proposed by 1198 approved by 51 edit id of 165" />
  <row Id="21823" PostHistoryTypeId="2" PostId="10427" RevisionGUID="f4f5689a-2a0e-4157-a74d-b899e6bd612f" CreationDate="2011-03-30T19:13:12.083" UserId="4443" Text="Along the same lines of what Adam said, you will want to get very specific with this. Pick a specific story and then see if it is available in the public domain. Otherwise this is too broad of a question to answer and it can get tricky with authors assigning their books over to estates to get extended renewal rights and such." />
  <row Id="21824" PostHistoryTypeId="5" PostId="10412" RevisionGUID="77b48078-e9c2-4b57-9be5-2ac16ee45dd0" CreationDate="2011-03-30T19:39:11.780" UserId="4443" Comment="edited body" Text="In general nature of the Developer-Publisher relationship, it is true that the developer will make the game at a loss to themselves and then receive compensation from the publisher. 20% of the revenue however seems first fairly high to me, and second it is -very- easy to show how very little 'revenue' is being generated by something to make this kind of agreement even more frustrating. You may want to consider alternates that are more tangible or lump sum payments for completion (given), target sales ranges, completion dates met, etc. Also, depending on how long your development cycles are, you might want to negotiate milestone deliverables and payment schedule, so its not an all or nothing sort of deal. Split the development cycle into 3 substantial collections of functionality and upon completing terms of the each deliverable you would receive partial payments towards the development costs.&#xD;&#xA;&#xD;&#xA;Another large thing to be aware of, almost every publisher -will- require you to give them ownership of any IP they are publishing, regardless of who came up with the idea. Make sure the terms in that area are well understood by all parties.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="21825" PostHistoryTypeId="6" PostId="41" RevisionGUID="76dfb591-6dee-4ebd-9cfd-5ba11debec2f" CreationDate="2011-03-30T19:39:23.623" UserId="51" Comment="edited tags" Text="&lt;education&gt;&lt;learning&gt;" />
  <row Id="21826" PostHistoryTypeId="2" PostId="10428" RevisionGUID="d4565427-27d3-4a96-b5a7-dd6bfa989941" CreationDate="2011-03-30T20:09:48.947" UserId="6383" Text="When you say you have a method that &quot;loops through the whole set&quot;, do you mean it loops through the whole Spritesheet, or the whole current row? Normally when I make Spritesheets, I have every row being a single animation, and every column being a frame of that animation. &#xD;&#xA;&#xD;&#xA;In my constructor, I set the maximum number of rows and columns my spritesheet can have (although that may not even be necessary). An animation won't necessarily have that many frames (e.g. rows per column) as the maximum, but it's good to keep track of. &#xD;&#xA;&#xD;&#xA;Then, whenever you want to advance a frame of you're animation, simply have a method to do it where you pass the number of frames on the current row.&#xD;&#xA;&#xD;&#xA;This is one way:&#xD;&#xA;&#xD;&#xA;    void AdvanceFrame()&#xD;&#xA;    {&#xD;&#xA;        //currentNumFrames is the number of frames in the current animation -- see below&#xD;&#xA;        frameIndex = (frameIndex + 1) % currentNumFrames;&#xD;&#xA;&#xD;&#xA;        //animationIndex being your current row, frameIndex your current column.&#xD;&#xA;        srcRect = new Rectangle(frameIndex * frameWidth, animationIndex * frameHeight, frameWidth, frameHeight);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then, whenever you want to animate, you would call a function like this:&#xD;&#xA;&#xD;&#xA;    public void Animate(int animation, int framesInAnimation)&#xD;&#xA;    {&#xD;&#xA;        //In your update you will animate when (!paused)&#xD;&#xA;        paused = false; &#xD;&#xA;&#xD;&#xA;        animationIndex = animation;&#xD;&#xA;        frameIndex = 0;&#xD;&#xA;        currentNumFrames = frameInAnimation;&#xD;&#xA;&#xD;&#xA;        //Same as before, you can put it in a method.&#xD;&#xA;        RealignSrcRectangle();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Another way is you could simply put the number of frames per row in an array.&#xD;&#xA;Then, you wouldn't need to send in `framesInAnimation` and store a `currentNumFrames`, in your advance you would do this instead:&#xD;&#xA;&#xD;&#xA;        frameIndex = (frameIndex + 1) % framesPerAnimation[animationIndex];&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21827" PostHistoryTypeId="6" PostId="5447" RevisionGUID="a9372e43-6355-4cf3-8118-22ebc31c2801" CreationDate="2011-03-30T20:12:30.810" UserId="1430" Comment="removing test" Text="&lt;game-design&gt;&lt;adventure&gt;" />
  <row Id="21828" PostHistoryTypeId="5" PostId="10383" RevisionGUID="f0c7ef8b-c4dc-47bf-af60-e2f0bc07e71f" CreationDate="2011-03-30T20:28:59.600" UserId="5021" Comment="added 485 characters in body; added 6 characters in body; added 2 characters in body" Text="Use degrees instead of radians.&#xD;&#xA;&#xD;&#xA;45 degrees is Pi/4 radians ~= 0.785398.&#xD;&#xA;&#xD;&#xA;The `y` in your formula should be the object's distance above the ground when it is released. Is the ground 0? If the ground is not at y=0, then y should be:&#xD;&#xA;&#xD;&#xA;`y = origin.Position.y + groundHeight` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, are you sure that this formula is giving you what you want? This formula gives the horizontal distance of the object's travel only -- not the distance of the object along the path (which is longer or equal to the horizontal travel).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Based on your response, it sounds like you're actually looking for the maximum possible distance that can be achieved.&#xD;&#xA;&#xD;&#xA;To find the angle that gives the maximum possible distance, use this (using your variable names):&#xD;&#xA;&#xD;&#xA;     a = arccos(sqrt((2*g*y + v*v)/(2*g*y + 2*v*v)))&#xD;&#xA;&#xD;&#xA;Now you can plug `a` into the equation you already have to find what the distance is at that angle.&#xD;&#xA;&#xD;&#xA;Now you have both the angle that produces the maximum distance, and the maximum possible distance itself!" />
  <row Id="21829" PostHistoryTypeId="25" PostId="10409" RevisionGUID="6e2af61d-3aae-40d9-ae37-e9df712bb69b" CreationDate="2011-03-30T21:00:20.977" Comment="http://twitter.com/#!/StackGameDev/status/53199906944454656" />
  <row Id="21830" PostHistoryTypeId="2" PostId="10429" RevisionGUID="1dedefe2-90d1-4f31-bfd5-9fcf1d48fe0c" CreationDate="2011-03-30T21:14:03.343" UserId="6099" Text="I *think* you should be able just invert things using your effects world matrix:&#xD;&#xA;        &#xD;&#xA;    effect.World = Matrix.CreateScale(1, -1, 1);&#xD;&#xA;&#xD;&#xA;Instead of using the identity, as you have now.&#xD;&#xA;&#xD;&#xA;I hope this helps." />
  <row Id="21831" PostHistoryTypeId="2" PostId="10430" RevisionGUID="3a71f37a-58ac-47a4-bf28-c548f75c1609" CreationDate="2011-03-30T21:22:21.457" UserId="6432" Text="I am working on a RPG using the JMonkey engine. While I was conceptualizing the map, I realized I would have a problem with the terrain.&#xD;&#xA;&#xD;&#xA;My problem is this: I want to have a click to move interface, and have the player move in increments of 1 world unit (wu). This is actually rather reminiscent of a tile based engine, but in 3d. While making the world map, do I need to make an object made of the world geometries, and load the one object, or would it be better to build a map out of the necessary tiles, using a file to tell the engine how to build the map (similar to 2d tile games)?&#xD;&#xA;&#xD;&#xA;I might also add, the game isn't going to use heavy collision detection or real time physics, which is why I thought a tile based &quot;pass-abilty&quot; system might work.&#xD;&#xA;&#xD;&#xA;Would loading that many objects for a tile be too much as far as memory goes? What if I make a single object, constructed of tiles by a definition file, and just make the player move in 1 wu increments, giving the illusion of &quot;tile-based&quot;?&#xD;&#xA;&#xD;&#xA;I'm assuming that a combination of any of these might work, it's just that I don't have any prior experience making a system like this and would like some opinions on the most efficient method of doing what I'm trying to do." />
  <row Id="21832" PostHistoryTypeId="1" PostId="10430" RevisionGUID="3a71f37a-58ac-47a4-bf28-c548f75c1609" CreationDate="2011-03-30T21:22:21.457" UserId="6432" Text="Method of terrain in a 3d RPG" />
  <row Id="21833" PostHistoryTypeId="3" PostId="10430" RevisionGUID="3a71f37a-58ac-47a4-bf28-c548f75c1609" CreationDate="2011-03-30T21:22:21.457" UserId="6432" Text="&lt;3d&gt;&lt;java&gt;&lt;tiles&gt;&lt;rpg&gt;" />
  <row Id="21834" PostHistoryTypeId="6" PostId="10430" RevisionGUID="ffd6c393-4a4a-419b-a597-399c0bf0d9f1" CreationDate="2011-03-30T21:27:18.873" UserId="189" Comment="edited tags" Text="&lt;3d&gt;&lt;java&gt;&lt;tiles&gt;&lt;rpg&gt;&lt;jmonkeyengine&gt;" />
  <row Id="21835" PostHistoryTypeId="6" PostId="5830" RevisionGUID="d1e36610-2454-423c-97c7-98d2d863810a" CreationDate="2011-03-30T21:27:45.860" UserId="189" Comment="edited tags" Text="&lt;java&gt;&lt;tutorials&gt;&lt;jmonkeyengine&gt;" />
  <row Id="21836" PostHistoryTypeId="6" PostId="2400" RevisionGUID="8fba07c6-8bbb-47a6-813c-af7e37a9ae8e" CreationDate="2011-03-30T21:27:57.827" UserId="189" Comment="edited tags" Text="&lt;3d&gt;&lt;ogre&gt;&lt;jmonkeyengine&gt;" />
  <row Id="21840" PostHistoryTypeId="2" PostId="10432" RevisionGUID="1d92a59d-87eb-49c9-a643-1abe03347bbe" CreationDate="2011-03-30T21:57:31.213" UserId="6429" Text="I'm still at the very early stages of my game design -- nowhere near actually needing the sprites yet -- but a thought occurred to me: What's the best way to approach sprites of different dimensions?&#xD;&#xA;&#xD;&#xA;In context, my game will use sprites to represent different space ships (long-range plans include a 3D engine with actual ship models, but for now it's 2D with simple sprites). I've always thought of using sprite sheets as the best way to handle multiple different sprites in games. But some of my ships will be bigger than others. So while one ship might be represented by a 20x15 sprite, another might be 25x18.&#xD;&#xA;&#xD;&#xA;How should I best approach this? One sprite sheet and somehow include in my sprite objects the dimension of each frame? Or should I group the sprites into different sprite sheets based on their size? Or should every frame on the sheet be the same size (the &quot;biggest&quot;), and just not use up the entire area for every sprite? Maybe abandon sprite sheets entirely in this case?" />
  <row Id="21841" PostHistoryTypeId="1" PostId="10432" RevisionGUID="1d92a59d-87eb-49c9-a643-1abe03347bbe" CreationDate="2011-03-30T21:57:31.213" UserId="6429" Text="Differently-sized sprites?" />
  <row Id="21842" PostHistoryTypeId="3" PostId="10432" RevisionGUID="1d92a59d-87eb-49c9-a643-1abe03347bbe" CreationDate="2011-03-30T21:57:31.213" UserId="6429" Text="&lt;game-design&gt;&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="21847" PostHistoryTypeId="2" PostId="10433" RevisionGUID="91b82725-b3c3-4c61-8e74-99cd9434e95e" CreationDate="2011-03-30T22:18:59.130" UserId="6021" Text="You could round them to the next power of two (or any other size, but powers of two are always convenient) and collect all of the same power of two in a single sprite sheet.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="21848" PostHistoryTypeId="2" PostId="10434" RevisionGUID="ba80bde9-fce4-421d-945f-6202de73ee03" CreationDate="2011-03-30T22:31:43.427" UserId="51" Text="One solution would just be to pack as much as you can on a single sheet: http://gamedev.stackexchange.com/questions/2829/texture-packing-algorithm&#xD;&#xA;&#xD;&#xA;Part of the data that results from that is where the sprite is in the texture and how big it is, so you can use that information to draw the portion of the image that you need for a given sheet.&#xD;&#xA;&#xD;&#xA;Be sure to not use mipmaps, though." />
  <row Id="21849" PostHistoryTypeId="6" PostId="10432" RevisionGUID="345e5ce8-f017-4db5-a83d-754f9408edf5" CreationDate="2011-03-30T22:32:11.537" UserId="51" Comment="edited tags" Text="&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="21850" PostHistoryTypeId="25" PostId="10432" RevisionGUID="f58ef928-f536-4d43-864b-807463efcd39" CreationDate="2011-03-31T00:00:20.853" Comment="http://twitter.com/#!/StackGameDev/status/53245205113077760" />
  <row Id="21857" PostHistoryTypeId="2" PostId="10436" RevisionGUID="aa3948ca-07ab-4c41-af02-7123d74a44f6" CreationDate="2011-03-31T02:17:19.860" UserId="3128" Text="I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in my example. However I cannot figure out how to also add in a rotation around the elbow for the forearm.&#xD;&#xA;&#xD;&#xA;I've tried the following for the forearm rotation around the elbow:&#xD;&#xA;&#xD;&#xA; 1. translate to shoulder, rotate, translate to origin, translate to forearm, rotate, translate to origin&#xD;&#xA; 2. translate to shoulder, rotate, translate to forearm, rotate, translate to shoulder, translate to origin&#xD;&#xA;&#xD;&#xA;Neither work for me. Any suggestions? I'm really stuck on this one." />
  <row Id="21858" PostHistoryTypeId="1" PostId="10436" RevisionGUID="aa3948ca-07ab-4c41-af02-7123d74a44f6" CreationDate="2011-03-31T02:17:19.860" UserId="3128" Text="opengl rotations for a human" />
  <row Id="21859" PostHistoryTypeId="3" PostId="10436" RevisionGUID="aa3948ca-07ab-4c41-af02-7123d74a44f6" CreationDate="2011-03-31T02:17:19.860" UserId="3128" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;matrix&gt;&lt;rotation&gt;&lt;linear-algebra&gt;" />
  <row Id="21860" PostHistoryTypeId="2" PostId="10437" RevisionGUID="d8c26625-438c-423c-8303-1b47c35292fe" CreationDate="2011-03-31T02:30:22.960" UserId="6436" Text="I'm trying to print the coordinates of a drawn square upon movement. The problem is that the x value doesn't get refreshed on screen.&#xD;&#xA;&#xD;&#xA;This is the code I have:&#xD;&#xA;&#xD;&#xA;    #include &lt;allegro.h&gt;&#xD;&#xA;     &#xD;&#xA;    BITMAP *buffer;&#xD;&#xA;     &#xD;&#xA;    void update_screen(void)&#xD;&#xA;    {&#xD;&#xA;    	blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); // blit the buffer to the screen&#xD;&#xA;    }&#xD;&#xA;     &#xD;&#xA;    int init_double_buffering()&#xD;&#xA;    {&#xD;&#xA;    	// create the memory buffer&#xD;&#xA;    	buffer = create_bitmap(SCREEN_W, SCREEN_H);&#xD;&#xA;     &#xD;&#xA;    	if(!buffer)&#xD;&#xA;    		return FALSE;&#xD;&#xA;     &#xD;&#xA;    	return TRUE;&#xD;&#xA;    }&#xD;&#xA;     &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;    	int x, y;&#xD;&#xA;     &#xD;&#xA;    	// install allegro, set graphics mode, etc&#xD;&#xA;    	allegro_init();&#xD;&#xA;    	install_keyboard();&#xD;&#xA;     &#xD;&#xA;    	set_color_depth(32);&#xD;&#xA;    	if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640,480, 0,0))&#xD;&#xA;    	{&#xD;&#xA;    		allegro_message(&quot;Unable to set graphics mode.\n&quot;);&#xD;&#xA;    		return 1;&#xD;&#xA;    	}&#xD;&#xA;     &#xD;&#xA;    	// initialize page flipping&#xD;&#xA;    	if (!init_double_buffering())&#xD;&#xA;    	{&#xD;&#xA;    		set_gfx_mode(GFX_TEXT,0,0,0,0);&#xD;&#xA;    		allegro_message(&quot;Unable to initialize page flipping.\n&quot;);&#xD;&#xA;    		return 1;&#xD;&#xA;    	}&#xD;&#xA;     &#xD;&#xA;    	// default coordinates for the rectangle&#xD;&#xA;    	x = SCREEN_W / 2 - 5;&#xD;&#xA;    	y = SCREEN_H / 2 - 5;&#xD;&#xA;     &#xD;&#xA;    	// main game loop&#xD;&#xA;    	while (!key[KEY_ESC])&#xD;&#xA;    	{&#xD;&#xA;    		// game logic&#xD;&#xA;    		if (key[KEY_LEFT] &amp;&amp; x) --x;&#xD;&#xA;    		if (key[KEY_RIGHT] &amp;&amp; x &lt; SCREEN_W-10) ++x;&#xD;&#xA;    		if (key[KEY_UP] &amp;&amp; y) --y;&#xD;&#xA;    		if (key[KEY_DOWN] &amp;&amp; y &lt; SCREEN_H-10) ++y;&#xD;&#xA;     &#xD;&#xA;    		// you draw everything to buffer&#xD;&#xA;    		clear(buffer);&#xD;&#xA;    		rect(buffer, x,y, x+9,y+9, makecol(255,255,255));&#xD;&#xA;            textprintf_centre_ex(screen, font, SCREEN_W / 2, SCREEN_H/2,&#xD;&#xA;    			   makecol(255, 255, 255), -1,&#xD;&#xA;    			   &quot;X value is %d!&quot;,&#xD;&#xA;    			   x);&#xD;&#xA;                    &#xD;&#xA;    		// show the offscreen page&#xD;&#xA;    		update_screen();&#xD;&#xA;    	}&#xD;&#xA;     &#xD;&#xA;    	return 0;&#xD;&#xA;    }&#xD;&#xA;    END_OF_MAIN()&#xD;&#xA;&#xD;&#xA; " />
  <row Id="21861" PostHistoryTypeId="1" PostId="10437" RevisionGUID="d8c26625-438c-423c-8303-1b47c35292fe" CreationDate="2011-03-31T02:30:22.960" UserId="6436" Text="How to refresh allegro textprintf_centre_ex text upon keypress?" />
  <row Id="21862" PostHistoryTypeId="3" PostId="10437" RevisionGUID="d8c26625-438c-423c-8303-1b47c35292fe" CreationDate="2011-03-31T02:30:22.960" UserId="6436" Text="&lt;c&gt;&lt;text&gt;" />
  <row Id="21863" PostHistoryTypeId="6" PostId="10437" RevisionGUID="243c2016-3d3e-4a66-aadb-6b30d9764d6b" CreationDate="2011-03-31T02:34:52.490" UserId="189" Comment="edited tags" Text="&lt;c&gt;&lt;text&gt;&lt;allegro&gt;" />
  <row Id="21864" PostHistoryTypeId="2" PostId="10438" RevisionGUID="d80ea92f-85d2-4740-9be4-c1beddb5bfd3" CreationDate="2011-03-31T02:44:32.590" UserId="2187" Text="Have you tried doing the forearm transformation first? I think you may just have the transforms in the reverse order. " />
  <row Id="21865" PostHistoryTypeId="2" PostId="10439" RevisionGUID="ca918e7b-ed5c-4c01-9a5b-c28a9336c64d" CreationDate="2011-03-31T02:44:58.627" UserId="1101" Text="&gt; So I thought, maybe you can use these as a base class for 2D-Sprites, to break out of the game-loop thing that requires to go through all the sprites and move them. They'd basically move themselves, event-driven.&#xD;&#xA;&#xD;&#xA;What would the event be that moves them?&#xD;&#xA;&#xD;&#xA;Would it be an event you emit once per frame?&#xD;&#xA;&#xD;&#xA;And if so, how has this changed the system in any practical way?&#xD;&#xA;&#xD;&#xA;When originally studying object-orientation in the context of C++, I learned that some people liked to think of a statement such as `xyz.doThis(x)` as meaning 'send the doThis message to xyz (with payload of x) and wait for an immediate response`. When viewed on this level, there's no intrinsic difference between an event or message based system and a normal procedural one." />
  <row Id="21866" PostHistoryTypeId="25" PostId="10436" RevisionGUID="144fe5be-2656-467a-89b8-207b751af40c" CreationDate="2011-03-31T03:00:20.807" Comment="http://twitter.com/#!/StackGameDev/status/53290503537557504" />
  <row Id="21867" PostHistoryTypeId="2" PostId="10440" RevisionGUID="ceba586a-9b19-4913-855e-6d7cbcfff216" CreationDate="2011-03-31T03:26:23.927" UserId="6437" Text="There really isn't much in the area sadly. I'm currently writing a thesis on the topic of lighting in video games and why it is so important. If your really looking for it now the best books on the subject are in the areas of film and architecture... that or you could wait around for about 6 months for me to finish.&#xD;&#xA;&#xD;&#xA;http://www.moddb.com/tutorials/lighting-in-game-environments-the-hows-and-whys&#xD;&#xA;&#xD;&#xA;this is an alright link on a basic jist of games lighting." />
  <row Id="21868" PostHistoryTypeId="2" PostId="10441" RevisionGUID="af041d8a-41eb-41d9-ae76-0e8ec044e155" CreationDate="2011-03-31T03:49:50.443" UserId="1198" Text="What I'm wondering is how complete your design documents typically are before beginning the implementation of a project? I'm talking about medium to very small projects with a very small team.&#xD;&#xA;&#xD;&#xA;Do you start with a rough framework and start fleshing out the details at the same time implementation is starting? &#xD;&#xA;&#xD;&#xA;Do you completely flesh out every section completely before any implementation is even started? If so, what percentage change have you seen after implementation starts?&#xD;&#xA;" />
  <row Id="21869" PostHistoryTypeId="1" PostId="10441" RevisionGUID="af041d8a-41eb-41d9-ae76-0e8ec044e155" CreationDate="2011-03-31T03:49:50.443" UserId="1198" Text="How detailed and/or complete is/are your game design documents before starting a project?" />
  <row Id="21870" PostHistoryTypeId="3" PostId="10441" RevisionGUID="af041d8a-41eb-41d9-ae76-0e8ec044e155" CreationDate="2011-03-31T03:49:50.443" UserId="1198" Text="&lt;game-design&gt;&lt;design-document&gt;" />
  <row Id="21871" PostHistoryTypeId="5" PostId="10441" RevisionGUID="b1458fa6-3d67-431f-9ea9-68e1732d0a95" CreationDate="2011-03-31T04:06:04.017" UserId="1198" Comment="added 279 characters in body" Text="What I'm wondering is how complete your design documents typically are before beginning the implementation of a project? I'm talking about medium to very small projects with a very small team here where even fully fleshed out the entire document may only be a few dozen pages.&#xD;&#xA;&#xD;&#xA;Do you start with a rough framework and start fleshing out the details at the same time implementation is starting? &#xD;&#xA;&#xD;&#xA;Do you completely flesh out every section completely before any implementation is even started? If so, what percentage change have you seen after implementation starts?&#xD;&#xA;&#xD;&#xA;If you have experience with one of the two scenarios I outlined, I'd love to hear your opinion on what issues going that particular route caused and what obstacles you feel it helped you avoid." />
  <row Id="21872" PostHistoryTypeId="2" PostId="10442" RevisionGUID="62c463cb-87cb-4bfe-a9f9-410f0ee94ef0" CreationDate="2011-03-31T05:19:38.307" UserId="1929" Text="I have a theory on AI that I would like to write a &quot;whitepaper&quot; about. The distinction I want to explore in AI is **learning vs. strategizing.** My question is, **where can I read other material about this subject?**&#xD;&#xA;&#xD;&#xA;Let me give a chess example. Let's look at a chess AI as a max-tree, where capturing an enemy unit adds that unit's value to the &quot;move score&quot; for that decision (and likewise losing a piece subtracts that value to the score). Capturing a pawn might net 1 point, a knight 4 points, a rook 5 points, etc.&#xD;&#xA;&#xD;&#xA;*Strategizing* would be AI to apply these points and determine the next move; eg. given ten possible moves, pick the best (max score) at the end of three moves.&#xD;&#xA;&#xD;&#xA;*Learning* would be applying statistical observation to determine those values. If you play 100 games, the AI might decide that capturing a pawn is 2 points, and a knight is worth 7 points, while a rook is only worth 3 points (based on 100 gameplays).&#xD;&#xA;&#xD;&#xA;Does this distinction already exist in literature, and if so, *where can I read about it*?" />
  <row Id="21873" PostHistoryTypeId="1" PostId="10442" RevisionGUID="62c463cb-87cb-4bfe-a9f9-410f0ee94ef0" CreationDate="2011-03-31T05:19:38.307" UserId="1929" Text="AI: Learning vs. Strategizing" />
  <row Id="21874" PostHistoryTypeId="3" PostId="10442" RevisionGUID="62c463cb-87cb-4bfe-a9f9-410f0ee94ef0" CreationDate="2011-03-31T05:19:38.307" UserId="1929" Text="&lt;ai&gt;&lt;chess&gt;" />
  <row Id="21875" PostHistoryTypeId="2" PostId="10443" RevisionGUID="5de307c1-4230-427e-8a1c-213bafc9b8ba" CreationDate="2011-03-31T05:30:51.827" UserId="1929" Text="Working on small teams across small games (one-man teams on small casual games), I moved from &quot;heavy design&quot; to &quot;quick design.&quot; I find iterative development (two weeks focused on a single goal, eg. core gameplay) helps flesh out the design, and **gives you something to play,** which means that you won't change your mind and invalidate 90% of what you designed which looked good &quot;on paper&quot; but not in-game.&#xD;&#xA;&#xD;&#xA;Having said that, I do spend most of my design time on the core gameplay and mechanics (how the main game will function), and that rarely changes much -- it gets tweaks and sometimes I pick up new ideas or drop old ideas; but nothing goes without a working prototype.&#xD;&#xA;&#xD;&#xA;On the technical side, anything should get at least a few minutes of thought before making the code real. But, you can always refactor later." />
  <row Id="21876" PostHistoryTypeId="25" PostId="10441" RevisionGUID="cfeb89a4-56d5-49de-baac-8be07a99c611" CreationDate="2011-03-31T06:00:20.693" Comment="http://twitter.com/#!/StackGameDev/status/53335801253203969" />
  <row Id="21877" PostHistoryTypeId="2" PostId="10444" RevisionGUID="1d5236ce-778d-47d5-a231-e45d85578926" CreationDate="2011-03-31T06:00:34.703" UserId="5459" Text="I want to resize my texture. I am using cubemap to compute reflection. I want to use this cubemap to draw skybox. Skybox is drawn but I want to resize texture down, because it is dilated. As I wrote in my previous question ([question][1]), to draw skybox I use shaders:&#xD;&#xA;&#xD;&#xA;    //vertex shader        &#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;          uniform mat4 projectionMatrix;&#xD;&#xA;                                                          &#xD;&#xA;            attribute vec4 position;&#xD;&#xA;            varying mediump vec4 texCoord;&#xD;&#xA;            void main() {&#xD;&#xA;                texCoord = position;&#xD;&#xA;                gl_Position = projectionMatrix * modelViewMatrix * position;&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    //fragment shader&#xD;&#xA;    uniform samplerCube Sampler;&#xD;&#xA;         &#xD;&#xA;        varying mediump vec4 texCoord;&#xD;&#xA;                                                        &#xD;&#xA;         void main() {&#xD;&#xA;             mediump vec3 cube = vec3(textureCube(Sampler, texCoord.xyz));&#xD;&#xA;             gl_FragColor = vec4(cube, 1.0);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;I send this data:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    float vertices[24] = {	&#xD;&#xA;    	-1.0, -1.0,  1.0,&#xD;&#xA;        1.0, -1.0,  1.0,&#xD;&#xA;        -1.0,  1.0,  1.0,&#xD;&#xA;        1.0,  1.0,  1.0,&#xD;&#xA;        -1.0, -1.0, -1.0,&#xD;&#xA;        1.0, -1.0, -1.0,&#xD;&#xA;        -1.0,  1.0, -1.0,&#xD;&#xA;        1.0,  1.0, -1.0,&#xD;&#xA;    	};&#xD;&#xA;In this order to draw cube:&#xD;&#xA;&#xD;&#xA;    GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};&#xD;&#xA;&#xD;&#xA;I think, that main problem is in the vertex shader, where I use vertex data as texture coord. But I have no idea how to map vertexes to cube map texture coordinates. Can you help me?&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10217/how-do-i-create-a-sky-box-with-opengl-es-2-0" />
  <row Id="21878" PostHistoryTypeId="1" PostId="10444" RevisionGUID="1d5236ce-778d-47d5-a231-e45d85578926" CreationDate="2011-03-31T06:00:34.703" UserId="5459" Text="OpenGL - resize texture when using cubemap" />
  <row Id="21879" PostHistoryTypeId="3" PostId="10444" RevisionGUID="1d5236ce-778d-47d5-a231-e45d85578926" CreationDate="2011-03-31T06:00:34.703" UserId="5459" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;textures&gt;&lt;shaders&gt;&lt;cubemap&gt;" />
  <row Id="21880" PostHistoryTypeId="2" PostId="10445" RevisionGUID="779bbaf2-6e04-413a-828c-42f6e7a91456" CreationDate="2011-03-31T06:27:42.873" UserId="5275" Text="I'm trying to get the lens texture to rotate around the circumference of the circle and although I picked the centre of the circle as the rotating point of the lens it doesn't work.&#xD;&#xA;&#xD;&#xA;     private float angle;&#xD;&#xA;&#xD;&#xA;    //Initialize Method  &#xD;&#xA;    circlePosition.X = vp.X + vp.Width / 2;&#xD;&#xA;    circlePosition.Y = vp.Y + vp.Height / 2;&#xD;&#xA;&#xD;&#xA;    lensPosition.X = circlePosition.X;&#xD;&#xA;    lensPosition.Y = circlePosition.Y + 155;&#xD;&#xA;&#xD;&#xA;    //Load Content Method  &#xD;&#xA;    circleOrigin.X = Circle.Width / 2;&#xD;&#xA;    circleOrigin.Y = Circle.Height / 2;&#xD;&#xA;&#xD;&#xA;    lensOrigin.X = Lens.Width / 2;&#xD;&#xA;    lensOrigin.Y = Lens.Height / 2;&#xD;&#xA;&#xD;&#xA;     //Update Method &#xD;&#xA;     angle += 0.005f;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //Draw Method&#xD;&#xA;    spriteBatch.Draw(Circle, circlePosition, null, Color.White, 0.0f,&#xD;&#xA;        circleOrigin, 1.0f, SpriteEffects.None, 0f);&#xD;&#xA;&#xD;&#xA;    spriteBatch.Draw(Lens, lensPosition, null, Color.White, angle,&#xD;&#xA;      circleOrigin, 1.0f, SpriteEffects.None, 0f);" />
  <row Id="21881" PostHistoryTypeId="1" PostId="10445" RevisionGUID="779bbaf2-6e04-413a-828c-42f6e7a91456" CreationDate="2011-03-31T06:27:42.873" UserId="5275" Text="Rotating object round circumerference of circle" />
  <row Id="21882" PostHistoryTypeId="3" PostId="10445" RevisionGUID="779bbaf2-6e04-413a-828c-42f6e7a91456" CreationDate="2011-03-31T06:27:42.873" UserId="5275" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="21883" PostHistoryTypeId="2" PostId="10446" RevisionGUID="2af630d9-3f8f-48b1-80b4-e91bbd7d98f0" CreationDate="2011-03-31T07:19:12.027" UserId="20" Text="I don't know XNA, but usually the rotation of a sprite is around it's origin. So the lens *position* should be the center of the circle and the *offset* should be `y: lensRadius, x: lensRadius - circleRadius`. That would initially position your lens at the 3 o'clock position (0 radians)" />
  <row Id="21884" PostHistoryTypeId="5" PostId="10446" RevisionGUID="286dec4d-1070-4070-aea5-d32c100f9417" CreationDate="2011-03-31T07:26:28.387" UserId="20" Comment="replaced offset with origin" Text="I don't know XNA, but usually the rotation of a sprite is around it's origin. So the lens *position* should be the center of the circle and the *origin* should be `y: lensRadius, x: lensRadius - circleRadius`. That would initially position your lens at the 3 o'clock position (0 radians)" />
  <row Id="21885" PostHistoryTypeId="2" PostId="10447" RevisionGUID="4311c02b-7a5a-4eca-9fe3-ea6b460af746" CreationDate="2011-03-31T07:46:31.307" UserId="4200" Text="You could try&#xD;&#xA;&#xD;&#xA;    public Vector2 NewPosition(float angle, float distance, vector2 centre)&#xD;&#xA;    {&#xD;&#xA;        return new Vector2(distance * Math.cos(angle), distance * Math.sin(angle)) + centre;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Keep in mind I'm not at a computer I could test this on but that should be in the right direction" />
  <row Id="21886" PostHistoryTypeId="2" PostId="10448" RevisionGUID="64f73f68-05c6-4692-8126-eab36a0340e4" CreationDate="2011-03-31T08:05:56.143" UserId="5899" Text="The transformation that you are describing is relatively simple and as you can see is very difficult to know what steps must be follow to achieve it.&#xD;&#xA;&#xD;&#xA;When you solve this, you'll find with more problems with the next transformation. Then I encourage you to use &quot;Hierarchical Transformations&quot;, at end of [this][1] article is described. &#xD;&#xA;&#xD;&#xA;With &quot;Hierarchical Transformations&quot; you save a simple transformation (  a matrix for example ) in each node of the hierarchy. A node can be the arm, other the elbow, forearm, legs, etc. The final transformation is acomplished with the combination of all the simples transformations. Once the system is built, whatever transformation is easy to achieve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mrl.nyu.edu/~dzorin/ig04/lecture05/lecture05.pdf" />
  <row Id="21887" PostHistoryTypeId="5" PostId="10383" RevisionGUID="bf6dba3b-ca7b-401c-85f3-ab5464daf930" CreationDate="2011-03-31T08:24:01.277" UserId="5021" Comment="added 470 characters in body; added 70 characters in body" Text="Use degrees instead of radians.&#xD;&#xA;&#xD;&#xA;45 degrees is Pi/4 radians ~= 0.785398.&#xD;&#xA;&#xD;&#xA;The `y` in your formula should be the object's distance above the ground when it is released. Is the ground 0? If the ground is not at y=0, then y should be:&#xD;&#xA;&#xD;&#xA;`y = origin.Position.y + groundHeight` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, are you sure that this formula is giving you what you want? This formula gives the horizontal distance of the object's travel only -- not the distance of the object along the path (which is longer or equal to the horizontal travel).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Based on your response, it sounds like you're actually looking for the maximum possible distance that can be achieved.&#xD;&#xA;&#xD;&#xA;To find the angle that gives the maximum possible distance, use this (using your variable names):&#xD;&#xA;&#xD;&#xA;     a = arccos(sqrt((2*g*y + v*v)/(2*g*y + 2*v*v)))&#xD;&#xA;&#xD;&#xA;Now you can plug `a` into the equation you already have to find what the distance is at that angle.&#xD;&#xA;&#xD;&#xA;Now you have both the angle that produces the maximum distance, and the maximum possible distance itself!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;g = 30, y = 3.85, v = 35, gives:&#xD;&#xA;&#xD;&#xA;[Wolfram Alpha computation.][1]&#xD;&#xA;&#xD;&#xA;a = 0.7422637 radians = 42.53 degrees.&#xD;&#xA;&#xD;&#xA;[Then plugging a into your original formula gives range = 44.517.][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolframalpha.com/input/?i=arccos%28sqrt%28%282*30*3.85%20%2b%2035*35%29/%282*30*3.85%20%2b%202*35*35%29%29%29&#xD;&#xA;  [2]: http://www.wolframalpha.com/input/?i=%28%2835*cos%280.7422637%29%29/30%29%20*%20%2835*sin%280.7422637%29%20%20%2b%20sqrt%28%2835*sin%280.7422637%29*35*sin%280.7422637%29%29%20%2b%202*30*3.85%29%29" />
  <row Id="21888" PostHistoryTypeId="2" PostId="10449" RevisionGUID="4dfe4ce7-bb24-4044-a42a-9740729fa125" CreationDate="2011-03-31T08:24:35.893" UserId="6425" Text="&gt; I'm going to go out on a limb and say&#xD;&#xA;&gt; that the problem might be related to&#xD;&#xA;&gt; your view deriving from UIScrollView&#xD;&#xA;&gt; that you're rendering into.  You&#xD;&#xA;&gt; should be handling scrolling yourself&#xD;&#xA;&gt; inside a stationary EAGLView.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have written earlier that the same situation appears when I use zoom in EAGLView which is derived from UIView (like is shown in many examples of iPhone Developer SDK documentation). Zoom speed is identical, it is very low and it does not depend on how many squares i draw, 9 or 900!!! So what can I do to make zoom bumpless and quick? Can you give any code example or any of such examples in the Internet?" />
  <row Id="21889" PostHistoryTypeId="2" PostId="10450" RevisionGUID="d7d7239a-3c4a-40e0-9ff9-2cdfe46e5f59" CreationDate="2011-03-31T08:28:57.280" UserId="744" Text="What you call strategizing is usually called &lt;a href=&quot;http://en.wikipedia.org/wiki/Search_algorithm&quot;&gt;search&lt;/a&gt; in the AI community. It encompasses simple algorithms like &lt;a href=&quot;http://en.wikipedia.org/wiki/A*&quot;&gt;A*&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Depth-first_search&quot;&gt;DFS&lt;/a&gt;, and methods for heuristic design for informed searches like A*.&#xD;&#xA;&#xD;&#xA;What you call learning is called &lt;a href=&quot;http://en.wikipedia.org/wiki/Machine_learning&quot;&gt;machine learning&lt;/a&gt;, traditionally split into &lt;a href=&quot;http://en.wikipedia.org/wiki/Supervised_learning&quot;&gt;supervised learning&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Unsupervised_learning&quot;&gt;unsupervised learning&lt;/a&gt;, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Reinforcement_learning&quot;&gt;reinforcement learning&lt;/a&gt;. Probably the most important areas to games are &lt;a href=&quot;http://en.wikipedia.org/wiki/Genetic_programming&quot;&gt;genetic programming&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Neural_networks&quot;&gt;neural networks&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Support_vector_machine&quot;&gt;support vector machines&lt;/a&gt;, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Bayesian_network&quot;&gt;Bayesian networks&lt;/a&gt;. But machine learning is an enormous field and this is only a small set of the tools it studies.&#xD;&#xA;&#xD;&#xA;If you are really interested in the different types of AI approaches, I recommend getting a real textbook, like _&lt;a href=&quot;http://aima.cs.berkeley.edu/&quot;&gt;AI: A Modern Approach&lt;/a&gt;_ rather than reading Wikipedia.&#xD;&#xA;" />
  <row Id="21890" PostHistoryTypeId="2" PostId="10451" RevisionGUID="34c8b06f-aa5a-4478-b2c4-11d839852657" CreationDate="2011-03-31T08:34:45.267" UserId="6099" Text="Harold's reply should sort you out, but to clarify, I think the source of confusion here is that &quot;rotating around the circumference&quot; is actually '*positioning* around the circumference'. Passing the angle directly into the spritebatch draw will simply orientate the lens texture around its own centre. Instead you need to use the angle to find the circumference *position* and use that in the draw call. Harold's code snippet should do this step for you if you call it each Update (cheers Harold!)." />
  <row Id="21891" PostHistoryTypeId="25" PostId="10442" RevisionGUID="172d7bd2-826b-43e0-9df5-27bba726dae2" CreationDate="2011-03-31T09:00:20.433" Comment="http://twitter.com/#!/StackGameDev/status/53381098729775105" />
  <row Id="21892" PostHistoryTypeId="5" PostId="10447" RevisionGUID="664a00da-685c-4ad3-a4dd-9a98c146400e" CreationDate="2011-03-31T09:59:43.003" UserId="3794" Comment="changed name of function" Text="You could try&#xD;&#xA;&#xD;&#xA;    public Vector2 Rotate(float angle, float distance, vector2 centre)&#xD;&#xA;    {&#xD;&#xA;        return new Vector2(distance * Math.cos(angle), distance * Math.sin(angle)) + centre;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Keep in mind I'm not at a computer I could test this on but that should be in the right direction" />
  <row Id="21893" PostHistoryTypeId="2" PostId="10452" RevisionGUID="78641db9-df12-4ffb-bf33-252f8df9b839" CreationDate="2011-03-31T10:22:04.557" UserId="3794" Text="Texture cubes works differently than regular texturing. Texture cubes are indexed not by indicies on the polygon, but by a direction vector. Imagine that you are in the middle of the cube and texture coordinate are actualy 3D vector pointing to the texture cubes surface.&#xD;&#xA;&#xD;&#xA;![enter image description here][1] &#xD;&#xA;&#xD;&#xA;Resizing texture will not solve anything. You have to somehow change texture coordinates, but without image i can't say how. (I expect, that i will edit this answer after question will be edited)&#xD;&#xA;&#xD;&#xA;And plase note that:&#xD;&#xA;&#xD;&#xA;    gl_Position = projectionMatrix * modelViewMatrix * position;&#xD;&#xA;&#xD;&#xA;should be:&#xD;&#xA;&#xD;&#xA;    gl_Position = modelViewMatrix * projectionMatrix * position;&#xD;&#xA;&#xD;&#xA;Matrix multiplacation is not comutative and this is correct order. It might work for some cases, but not always and you might have problems with that later.&#xD;&#xA;&#xD;&#xA;(*credits: That nice image was stolen from [here][2]*)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZNxIc.gif&#xD;&#xA;  [2]: http://www.codermind.com/articles/Raytracer-in-C++-Part-III-Textures.html" />
  <row Id="21894" PostHistoryTypeId="5" PostId="10447" RevisionGUID="1141c561-32e7-4f63-9e4f-2d50e5736269" CreationDate="2011-03-31T10:30:33.833" UserId="4200" Comment="added 32 characters in body" Text="You could try&#xD;&#xA;&#xD;&#xA;    public Vector2 Rotate(float angle, float distance, vector2 centre)&#xD;&#xA;    {&#xD;&#xA;        return new Vector2(distance * Math.cos(angle), distance * Math.sin(angle)) + centre;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Keep in mind I'm not at a computer I could test this on but that should be in the right direction&#xD;&#xA;&#xD;&#xA;Edit: Checked it, works fine" />
  <row Id="21895" PostHistoryTypeId="5" PostId="10447" RevisionGUID="b832d2c8-70cd-4578-a5b0-14ac6c98b9f5" CreationDate="2011-03-31T11:26:26.687" UserId="4200" Comment="added 544 characters in body; deleted 6 characters in body" Text="You could try&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    private Vector2 Rotate(float angle, float distance, Vector2 centre)&#xD;&#xA;    {&#xD;&#xA;        return new Vector2((float)(distance * Math.Cos(angle)), (float)(distance * Math.Sin(angle))) + centre;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Keep in mind I'm not at a computer I could test this on but that should be in the right direction&#xD;&#xA;&#xD;&#xA;Edit: Checked it, works fine&#xD;&#xA;&#xD;&#xA;Edit 2: Something else cool you could do:&#xD;&#xA;&#xD;&#xA;    public Vector2 Rotate(float angle, Vector2 currentPos, Vector2 centre)&#xD;&#xA;    {&#xD;&#xA;        double distance = Math.Sqrt(Math.Pow(currentPos.X-centre.X, 2) + Math.Pow(currentPos.Y-centre.Y, 2));&#xD;&#xA;        return new Vector2((float)(distance * Math.Cos(angle)), (float)(distance * Math.Sin(angle))) + centre;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That way you put in the angle you'd like to be rotated to, the position you're currently at and the the central point you'd like to be rotated around" />
  <row Id="21896" PostHistoryTypeId="25" PostId="10445" RevisionGUID="ab4d7289-a791-4e7c-9331-8bfeafc74e69" CreationDate="2011-03-31T12:00:20.560" Comment="http://twitter.com/#!/StackGameDev/status/53426397930196992" />
  <row Id="21897" PostHistoryTypeId="2" PostId="10453" RevisionGUID="d9b4d234-13f0-4cac-a47c-3446bc9976fa" CreationDate="2011-03-31T12:13:44.743" UserId="6441" Text="I'm writing a BSP viewer for a uni project. So far i have the main geometry loaded properly, and the PVS working.&#xD;&#xA;&#xD;&#xA;Now i'm trying to apply the lightmaps, but i can't seem to get the texture coordinates for the lightmaps calculated properly.&#xD;&#xA;&#xD;&#xA;According to here: http://developer.valvesoftware.com/wiki/The_Source_Engine_BSP_File_Format&#xD;&#xA;&#xD;&#xA;    struct texinfo_t&#xD;&#xA;    {&#xD;&#xA;        float textureVecs[2][4];  // [s/t][xyz offset]&#xD;&#xA;        float lightmapVecs[2][4]; // [s/t][xyz offset] - length is in units of texels/area&#xD;&#xA;        int flags;                // miptex flags overrides&#xD;&#xA;        int texdata;               // Pointer to texture name, size, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt; &#xD;&#xA;&gt; The first array of floats is in&#xD;&#xA;&gt; essence two vectors that represent how&#xD;&#xA;&gt; the texture is orientated and scaled&#xD;&#xA;&gt; when rendered on the world geometry.&#xD;&#xA;&gt; The two vectors, s and t, are the&#xD;&#xA;&gt; mapping of the left-to-right and&#xD;&#xA;&gt; down-to-up directions in the texture&#xD;&#xA;&gt; pixel coordinate space, onto the&#xD;&#xA;&gt; world. Each vector has an x, y, and z&#xD;&#xA;&gt; component, plus an offset which is the&#xD;&#xA;&gt; &quot;shift&quot; of the texture in that&#xD;&#xA;&gt; direction relative to the world. The&#xD;&#xA;&gt; length of the vectors represent the&#xD;&#xA;&gt; scaling of the texture in each&#xD;&#xA;&gt; direction.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The 2D coordinates (u, v) of a texture&#xD;&#xA;&gt; pixel (or texel) are mapped to the&#xD;&#xA;&gt; world coordinates (x, y, z) of a point&#xD;&#xA;&gt; on a face by:&#xD;&#xA;&gt; &#xD;&#xA;&gt; u = tv0,0 * x + tv0,1 * y + tv0,2 * z&#xD;&#xA;&gt; + tv0,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; v = tv1,0 * x + tv1,1 * y + tv1,2 * z&#xD;&#xA;&gt; + tv1,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; (ie. The dot product of the vectors&#xD;&#xA;&gt; with the vertex plus the offset in&#xD;&#xA;&gt; that direction. Where tvA,B is&#xD;&#xA;&gt; textureVecs[A][B].&#xD;&#xA;&gt; &#xD;&#xA;&gt; Furthermore, after calculating (u, v),&#xD;&#xA;&gt; to convert them to texture coordinates&#xD;&#xA;&gt; which you would send to your graphics&#xD;&#xA;&gt; card, divide u and v by the width and&#xD;&#xA;&gt; height of the texture respectively.&#xD;&#xA;&#xD;&#xA;So i am doing the calculation as follows. Take the dot product of the vertex and the lightmap vector(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2]) add the offset (lightmapVecs[0][3]), subtract the mins, and divide the result by the width/height.&#xD;&#xA;&#xD;&#xA;    float s = Vector3f.dot(v, new Vector3f(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2])) + lightmapVecs[0][3] - f.LightmapTextureMinsInLuxels[0];&#xD;&#xA;    float t = Vector3f.dot(v, new Vector3f(lightmapVecs[1][0], lightmapVecs[1][1], lightmapVecs[1][2])) + lightmapVecs[1][3] - f.LightmapTextureMinsInLuxels[1];&#xD;&#xA;    s /= (f.LightmapTextureSizeInLuxels[0] + 1);&#xD;&#xA;    t /= (f.LightmapTextureSizeInLuxels[1] + 1);&#xD;&#xA;&#xD;&#xA;However it ends up looking like this:&#xD;&#xA;&#xD;&#xA;&lt;damn not allowed to post pic&gt;&#xD;&#xA;&#xD;&#xA;Here's a sample calculation for the texture coord 't' for one vertex.&#xD;&#xA;vertex = 352.0, -144.00027, -224.0&#xD;&#xA;lightmap vector = -4, 0, 0&#xD;&#xA;lightmap offset = 0&#xD;&#xA;lightmap mins = 9&#xD;&#xA;lightmap height = 14&#xD;&#xA;&#xD;&#xA;So the dot product is -1408&#xD;&#xA;(-1408 + 0 - 9) / 14&#xD;&#xA;t = -101.21&#xD;&#xA;&#xD;&#xA;Seems way off" />
  <row Id="21898" PostHistoryTypeId="1" PostId="10453" RevisionGUID="d9b4d234-13f0-4cac-a47c-3446bc9976fa" CreationDate="2011-03-31T12:13:44.743" UserId="6441" Text="Half-Life 2 BSP Lightmaps" />
  <row Id="21899" PostHistoryTypeId="3" PostId="10453" RevisionGUID="d9b4d234-13f0-4cac-a47c-3446bc9976fa" CreationDate="2011-03-31T12:13:44.743" UserId="6441" Text="&lt;textures&gt;&lt;coordinates&gt;&lt;bsp&gt;" />
  <row Id="21900" PostHistoryTypeId="5" PostId="10453" RevisionGUID="468f52b4-0fb5-468b-a638-05e56acc5b17" CreationDate="2011-03-31T12:20:59.823" UserId="6441" Comment="added 4 characters in body" Text="I'm writing a BSP viewer for a uni project. So far i have the main geometry loaded properly, and the PVS working.&#xD;&#xA;&#xD;&#xA;Now i'm trying to apply the lightmaps, but i can't seem to get the texture coordinates for the lightmaps calculated properly.&#xD;&#xA;&#xD;&#xA;According to here: http://developer.valvesoftware.com/wiki/The_Source_Engine_BSP_File_Format&#xD;&#xA;&#xD;&#xA;    struct texinfo_t&#xD;&#xA;    {&#xD;&#xA;        float textureVecs[2][4];  // [s/t][xyz offset]&#xD;&#xA;        float lightmapVecs[2][4]; // [s/t][xyz offset] - length is in units of texels/area&#xD;&#xA;        int flags;                // miptex flags overrides&#xD;&#xA;        int texdata;               // Pointer to texture name, size, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt; &#xD;&#xA;&gt; The first array of floats is in&#xD;&#xA;&gt; essence two vectors that represent how&#xD;&#xA;&gt; the texture is orientated and scaled&#xD;&#xA;&gt; when rendered on the world geometry.&#xD;&#xA;&gt; The two vectors, s and t, are the&#xD;&#xA;&gt; mapping of the left-to-right and&#xD;&#xA;&gt; down-to-up directions in the texture&#xD;&#xA;&gt; pixel coordinate space, onto the&#xD;&#xA;&gt; world. Each vector has an x, y, and z&#xD;&#xA;&gt; component, plus an offset which is the&#xD;&#xA;&gt; &quot;shift&quot; of the texture in that&#xD;&#xA;&gt; direction relative to the world. The&#xD;&#xA;&gt; length of the vectors represent the&#xD;&#xA;&gt; scaling of the texture in each&#xD;&#xA;&gt; direction.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The 2D coordinates (u, v) of a texture&#xD;&#xA;&gt; pixel (or texel) are mapped to the&#xD;&#xA;&gt; world coordinates (x, y, z) of a point&#xD;&#xA;&gt; on a face by:&#xD;&#xA;&gt; &#xD;&#xA;&gt; u = tv0,0 * x + tv0,1 * y + tv0,2 * z&#xD;&#xA;&gt; + tv0,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; v = tv1,0 * x + tv1,1 * y + tv1,2 * z&#xD;&#xA;&gt; + tv1,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; (ie. The dot product of the vectors&#xD;&#xA;&gt; with the vertex plus the offset in&#xD;&#xA;&gt; that direction. Where tvA,B is&#xD;&#xA;&gt; textureVecs[A][B].&#xD;&#xA;&gt; &#xD;&#xA;&gt; Furthermore, after calculating (u, v),&#xD;&#xA;&gt; to convert them to texture coordinates&#xD;&#xA;&gt; which you would send to your graphics&#xD;&#xA;&gt; card, divide u and v by the width and&#xD;&#xA;&gt; height of the texture respectively.&#xD;&#xA;&#xD;&#xA;So i am doing the calculation as follows. Take the dot product of the vertex and the lightmap vector(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2]) add the offset (lightmapVecs[0][3]), subtract the mins, and divide the result by the width/height.&#xD;&#xA;&#xD;&#xA;    float s = Vector3f.dot(v, new Vector3f(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2])) + lightmapVecs[0][3] - f.LightmapTextureMinsInLuxels[0];&#xD;&#xA;    float t = Vector3f.dot(v, new Vector3f(lightmapVecs[1][0], lightmapVecs[1][1], lightmapVecs[1][2])) + lightmapVecs[1][3] - f.LightmapTextureMinsInLuxels[1];&#xD;&#xA;    s /= (f.LightmapTextureSizeInLuxels[0] + 1);&#xD;&#xA;    t /= (f.LightmapTextureSizeInLuxels[1] + 1);&#xD;&#xA;&#xD;&#xA;However it ends up looking like this:&#xD;&#xA;&#xD;&#xA;(damn not allowed to post pic)&#xD;&#xA;&#xD;&#xA;Here's a sample calculation for the texture coord 't' for one vertex.&#xD;&#xA;vertex = 352.0, -144.00027, -224.0&#xD;&#xA;lightmap vector = -4, 0, 0&#xD;&#xA;lightmap offset = 0&#xD;&#xA;lightmap mins = 9&#xD;&#xA;lightmap height = 14&#xD;&#xA;&#xD;&#xA;So the dot product is -1408&#xD;&#xA;&#xD;&#xA;(-1408 + 0 - 9) / 14&#xD;&#xA;&#xD;&#xA;t = -101.21&#xD;&#xA;&#xD;&#xA;Seems way off" />
  <row Id="21901" PostHistoryTypeId="2" PostId="10454" RevisionGUID="c04707c7-dff4-4461-ae2f-ebc7f5dd3039" CreationDate="2011-03-31T12:24:28.220" UserId="-1" Text="" />
  <row Id="21902" PostHistoryTypeId="2" PostId="10455" RevisionGUID="d5483cf8-9166-4542-a386-dc5b9ed5417b" CreationDate="2011-03-31T12:24:28.220" UserId="-1" Text="" />
  <row Id="21903" PostHistoryTypeId="2" PostId="10456" RevisionGUID="ac7c0733-d0f0-48f8-b00f-ea04d9121be3" CreationDate="2011-03-31T12:34:38.203" UserId="-1" Text="" />
  <row Id="21904" PostHistoryTypeId="2" PostId="10457" RevisionGUID="feb9df45-3ed9-49ff-97f1-37ae9dd6421c" CreationDate="2011-03-31T12:34:38.203" UserId="-1" Text="" />
  <row Id="21905" PostHistoryTypeId="2" PostId="10458" RevisionGUID="8498f975-5fc5-4b55-afe6-e52a05018acd" CreationDate="2011-03-31T12:46:30.143" UserId="-1" Text="" />
  <row Id="21906" PostHistoryTypeId="2" PostId="10459" RevisionGUID="21271eb6-c240-46ae-9b87-d1be475dad40" CreationDate="2011-03-31T12:46:30.143" UserId="-1" Text="" />
  <row Id="21907" PostHistoryTypeId="16" PostId="10441" RevisionGUID="cfd18ea8-d29f-4e49-8b88-c0b3073ad806" CreationDate="2011-03-31T13:07:45.967" UserId="189" />
  <row Id="21908" PostHistoryTypeId="16" PostId="10443" RevisionGUID="bbbf5a5c-6617-40d0-bda8-c4cefc5abd00" CreationDate="2011-03-31T13:07:45.967" UserId="189" />
  <row Id="21909" PostHistoryTypeId="6" PostId="2693" RevisionGUID="345563a2-dae8-45f7-8136-8b6437d7ea08" CreationDate="2011-03-31T13:09:02.207" UserId="3588" Comment="Hitboxes are just a part of collision detection, in the end. ♪" Text="&lt;collision-detection&gt;&lt;animation&gt;" />
  <row Id="21910" PostHistoryTypeId="24" PostId="2693" RevisionGUID="345563a2-dae8-45f7-8136-8b6437d7ea08" CreationDate="2011-03-31T13:09:02.207" Comment="Proposed by 3588 approved by 189 edit id of 170" />
  <row Id="21911" PostHistoryTypeId="5" PostId="10459" RevisionGUID="e326f403-285a-4088-b1e5-ca9d063579c9" CreationDate="2011-03-31T13:09:09.773" UserId="3588" Comment="added 86 characters in body" Text="The simulation of an in-game entity's motion, such as running or sitting or striking. " />
  <row Id="21912" PostHistoryTypeId="24" PostId="10459" RevisionGUID="e326f403-285a-4088-b1e5-ca9d063579c9" CreationDate="2011-03-31T13:09:09.773" Comment="Proposed by 3588 approved by 189 edit id of 172" />
  <row Id="21913" PostHistoryTypeId="5" PostId="10458" RevisionGUID="77258c4d-6a9c-4774-9a21-3d8277612162" CreationDate="2011-03-31T13:10:13.050" UserId="3588" Comment="added 601 characters in body" Text="Whether you're working with sprites or with models, animation is what breaths kinetic life into your game. Questions under the purview of this tag deal with a wide variety of animation problems, including but not restricted to:&#xD;&#xA;&#xD;&#xA; - Storing animation routines&#xD;&#xA; - Tweening frames&#xD;&#xA; - Simulating specific kinds of actions&#xD;&#xA; - Combining or sequencing multiple animations&#xD;&#xA; - Persisting animation throughout movement and rotation&#xD;&#xA;&#xD;&#xA;Not to be confused with [tag:movement], which is simply the change of position of an entity in the game world. Animation corresponds to the movement of an entity's body. " />
  <row Id="21914" PostHistoryTypeId="24" PostId="10458" RevisionGUID="77258c4d-6a9c-4774-9a21-3d8277612162" CreationDate="2011-03-31T13:10:13.050" Comment="Proposed by 3588 approved by -1 edit id of 171" />
  <row Id="21915" PostHistoryTypeId="5" PostId="10458" RevisionGUID="510a20ea-d0e9-4ce1-a47a-7f4f42afebe7" CreationDate="2011-03-31T13:10:13.347" UserId="189" Comment="added 1 characters in body" Text="Whether you're working with sprites or with models, animation is what breathes kinetic life into your game. Questions under the purview of this tag deal with a wide variety of animation problems, including but not restricted to:&#xD;&#xA;&#xD;&#xA; - Storing animation routines&#xD;&#xA; - Tweening frames&#xD;&#xA; - Simulating specific kinds of actions&#xD;&#xA; - Combining or sequencing multiple animations&#xD;&#xA; - Persisting animation throughout movement and rotation&#xD;&#xA;&#xD;&#xA;Not to be confused with [tag:movement], which is simply the change of position of an entity in the game world. Animation corresponds to the movement of an entity's body. " />
  <row Id="21916" PostHistoryTypeId="5" PostId="10455" RevisionGUID="effc34c7-92f5-493f-af00-1fc3d6a368d6" CreationDate="2011-03-31T13:10:26.870" UserId="382" Comment="added 147 characters in body" Text="C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform." />
  <row Id="21917" PostHistoryTypeId="24" PostId="10455" RevisionGUID="effc34c7-92f5-493f-af00-1fc3d6a368d6" CreationDate="2011-03-31T13:10:26.870" Comment="Proposed by 382 approved by 189 edit id of 167" />
  <row Id="21918" PostHistoryTypeId="5" PostId="10454" RevisionGUID="2fba472f-9e94-4eb6-9c63-075e12f998da" CreationDate="2011-03-31T13:10:47.463" UserId="382" Comment="added 4196 characters in body" Text="C# is also available in non-Microsoft implementations (most notably, [Mono][1]).  &#xD;&#xA;&#xD;&#xA;Versions 1.0/1.2 and 2.0 of C# were submitted and approved as both [ECMA][2] and [ISO/IEC][3] standards.  As of December 2010, there are no ECMA or ISO/IEC specifications for C# 3.0 and 4.0, however language specifications are available from Microsoft ([3.0][4] and [4.0][5] respectively).&#xD;&#xA;&#xD;&#xA;The language's type-system was originally static, with only explicit variable declarations allowed. However, the introduction of `var` (C# 3.0) and `dynamic` (C# 4.0) allow it to use type-inference for implicit variable typing, and to consume dynamic type-systems, respectively. Delegates (especially with lexical-closure support for anonymous-methods (C# 2.0) and lambda-expressions (C# 3.0)) allow the language to be used for functional programming.&#xD;&#xA;&#xD;&#xA;Compilation is usually to the Common Intermediate Language (CIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR); however, options like [Ngen][6] (.NET) and [AOT][7] (Mono) mean this isn't the only option. Additionally, some frameworks (e.g. the Micro Framework) act as CIL interpreters, with no JIT.&#xD;&#xA;&#xD;&#xA;Perhaps unusually, generics in C# are provided (in part) by the runtime, unlike (for comparison) C++ templates, or Java's generics (which use type-erasure).&#xD;&#xA;&#xD;&#xA;With the combination of Microsoft .NET for Windows (desktop/server), Mono (desktop/server/mobile), Silverlight / Moonlight (browser/mobile), Compact Framework (mobile), and Micro Framework (embedded devices), it is available for a wide range of platforms.&#xD;&#xA;&#xD;&#xA;**Hello World**&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    class Hello&#xD;&#xA;    {&#xD;&#xA;        static void Main() &#xD;&#xA;        {&#xD;&#xA;            Console.WriteLine(&quot;Hello, World&quot;);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**FAQs on Stack Overflow**&#xD;&#xA;&#xD;&#xA;- [What are the correct version numbers for C#?](http://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c)&#xD;&#xA;- [Why is `Random` giving the same results every time?](http://stackoverflow.com/questions/767999/random-number-generator-not-working-the-way-i-had-planned-c)&#xD;&#xA;- [Captured variables in loops](http://stackoverflow.com/questions/3416758/outer-variable-trap)&#xD;&#xA;- [Why can't I convert `List&lt;Banana&gt;` to `List&lt;Fruit&gt;`?](http://stackoverflow.com/questions/1777800/in-c-is-it-possible-to-cast-a-listchild-to-listparent)&#xD;&#xA;- Does C# pass objects by reference?&#xD;&#xA;&#xD;&#xA;**Resources**&#xD;&#xA;&#xD;&#xA;- [Specification][8]&#xD;&#xA;- [Wikipedia Article][9]&#xD;&#xA;- [Eric Lippert's blog][10]&#xD;&#xA;- [Programming Guide][11]&#xD;&#xA;- Books&#xD;&#xA;  - [CLR via C#][12]&#xD;&#xA;  - [C# in a Nutshell][13]&#xD;&#xA;  - [C# in Depth][14]&#xD;&#xA;  - [Accelerated C#][15]&#xD;&#xA;  - [Head First C#][16]&#xD;&#xA;  - The C# Programming Language ([3rd Edition][17], [4th Edition][18])&#xD;&#xA;  - [Framework Design Guidelines][19]&#xD;&#xA;  - Essential C# ([4.0 (3rd Edition)][20])&#xD;&#xA;  - [Pro C# 2010 and the .Net 4 Platform][21]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/&#xD;&#xA;  [2]: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf&#xD;&#xA;  [3]: http://standards.iso.org/ittf/PubliclyAvailableStandards/c042926_ISO_IEC_23270_2006(E).zip&#xD;&#xA;  [4]: http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c669b09/CSharp%20Language%20Specification.doc&#xD;&#xA;  [5]: http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=dfbf523c-f98c-4804-afbd-459e846b268e&#xD;&#xA;  [6]: http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx&#xD;&#xA;  [7]: http://www.mono-project.com/AOT&#xD;&#xA;  [8]: http://go.microsoft.com/fwlink/?LinkId=188622&#xD;&#xA;  [9]: http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29&#xD;&#xA;  [10]: http://blogs.msdn.com/b/ericlippert/&#xD;&#xA;  [11]: http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx&#xD;&#xA;  [12]: http://www.microsoft.com/learning/en/us/books.aspx?id=13874&amp;locale=en-us&#xD;&#xA;  [13]: http://www.albahari.com/nutshell/&#xD;&#xA;  [14]: http://www.manning.com/skeet2/&#xD;&#xA;  [15]: http://apress.com/book/view/9781430225379&#xD;&#xA;  [16]: http://www.amazon.com/dp/1449380344&#xD;&#xA;  [17]: http://www.informit.com/store/product.aspx?isbn=0321562992&#xD;&#xA;  [18]: http://www.informit.com/store/product.aspx?isbn=0321741765&#xD;&#xA;  [19]: http://www.amazon.com/dp/0321545613&#xD;&#xA;  [20]: http://www.amazon.com/dp/0321694694&#xD;&#xA;  [21]: http://www.amazon.com/dp/B0040ZN34G" />
  <row Id="21919" PostHistoryTypeId="24" PostId="10454" RevisionGUID="2fba472f-9e94-4eb6-9c63-075e12f998da" CreationDate="2011-03-31T13:10:47.463" Comment="Proposed by 382 approved by 189 edit id of 166" />
  <row Id="21920" PostHistoryTypeId="5" PostId="10457" RevisionGUID="df9c8e38-be27-4939-b9a2-49745bcf44f1" CreationDate="2011-03-31T13:11:15.780" UserId="3588" Comment="added 42 characters in body" Text="A representation of an object in 3D space." />
  <row Id="21921" PostHistoryTypeId="24" PostId="10457" RevisionGUID="df9c8e38-be27-4939-b9a2-49745bcf44f1" CreationDate="2011-03-31T13:11:15.780" Comment="Proposed by 3588 approved by 189 edit id of 169" />
  <row Id="21922" PostHistoryTypeId="5" PostId="10456" RevisionGUID="d8c8150f-c686-46bf-a1ac-c1669e311e91" CreationDate="2011-03-31T13:13:39.320" UserId="3588" Comment="added 319 characters in body" Text="Use this tag when your question deals with model assets in a 3D game. Alone, the tag typically refers to problems such as import/export and the handling of multiple models. It can also be combined with tags such as [tag:animation] and [tag:rendering] to clarify your choice of graphics when asking about such processes." />
  <row Id="21923" PostHistoryTypeId="24" PostId="10456" RevisionGUID="d8c8150f-c686-46bf-a1ac-c1669e311e91" CreationDate="2011-03-31T13:13:39.320" Comment="Proposed by 3588 approved by 189 edit id of 168" />
  <row Id="21924" PostHistoryTypeId="2" PostId="10460" RevisionGUID="94a10a73-ce54-481c-8b8c-27a452b1c721" CreationDate="2011-03-31T13:36:22.643" UserId="6442" Text="If the game idea is heavily based on some **unusual gameplay concept**, I prototype that **right away** from scratch, using a previous project as a template. 95% of the time this leads to realizing that it's not as fun as I imagined, and to make it fun would require more resources than it's worth.&#xD;&#xA;&#xD;&#xA;If I'm working on another project in the meantime, I take my time, make a doodle to get an idea of what the **prototype** should look like (try not to get distracted by sketch art). Then I share it with friends, partly to see if they have any input, but mostly to make myself think of things that are **not obvious** right away (there are always tonnes of things, even for the smartest people thinking out the simplest ideas). After a couple hours like this, I'll jot down some key concepts that have to be in the architecture, literally ~20 words. Then I can build a prototype when I have time." />
  <row Id="21925" PostHistoryTypeId="2" PostId="10461" RevisionGUID="061985da-a3ae-4e9a-bcd0-151109cfc8dd" CreationDate="2011-03-31T13:39:16.883" UserId="6444" Text="I've since decided to go 2d, however, @ Tetrad and @Robert, there is something _very_ wrong with that. The problem is that I want to do collisions based off of how it appeared to be in 2d. I would basically need to flatten all of my poly data so that it would lie on a single plane. In the simplest of terms, I needed to get rid of 1 dimension. If I have 2 ships that look like they collide, looking at them from above, I need to make sure they collide.&#xD;&#xA;&#xD;&#xA;    The overhead projection&#xD;&#xA;          __________&#xD;&#xA;    ______|_        |&#xD;&#xA;    |     | |       |&#xD;&#xA;    |     |_|_______|&#xD;&#xA;    |       |&#xD;&#xA;    |       |&#xD;&#xA;    ---------&#xD;&#xA;&#xD;&#xA;    The same ships from a different perspective.&#xD;&#xA;             _____________&#xD;&#xA;    _________ \           |&#xD;&#xA;    |        | |          |&#xD;&#xA;    |________| |          |&#xD;&#xA;              /___________|&#xD;&#xA;&#xD;&#xA;I want this to be a collision because it looks like it would be from a top down perspective. Bounding box collision detection would also not be sufficient in this case. The best I could come up with was rendering and using glReadPixels, but I heard that was unbearably slow.&#xD;&#xA;&#xD;&#xA;Like I said, I've since decided to go 2d. I was only doing this in 3d so a friend who has a hard-on for OpenGL would work on this with me, but he bolted. Still, it's an interesting problem.&#xD;&#xA;&#xD;&#xA;Thanks for your suggestions." />
  <row Id="21926" PostHistoryTypeId="2" PostId="10462" RevisionGUID="bc889800-e28b-48bf-8b52-908510b758e2" CreationDate="2011-03-31T13:51:50.260" UserId="6442" Text="If you insist on a sprite sheet, there are algorithms that will generate the smallest possible area with all the sprites in it (or write one yourself for fun). However with basic compression, you're better off making a big, but organized sprite sheet:&#xD;&#xA;&#xD;&#xA; 1. Easier to manage and look at&#xD;&#xA; 2. You can always pack it if you ever get to ship&#xD;&#xA; 3. Even if you don't, basic compression will make the difference negligible&#xD;&#xA;&#xD;&#xA;However using separate files for each sprite is a more modular way of going about this. The difference is organizational and personal preference - I learned to use sheets from the first tutorial I saw. Then I figured it would be easier to use separate PNGs for everything, and that's stuck with me." />
  <row Id="21927" PostHistoryTypeId="2" PostId="10463" RevisionGUID="29bc23a3-f30d-4945-97c5-27518f13a85e" CreationDate="2011-03-31T13:56:07.457" UserId="6440" Text="I want to try adding shadows to a 3D XNA game. I've set up some testing environment with one light and one camera. However, I'm running into artifacts with my approach.&#xD;&#xA;&#xD;&#xA;I'm using the shader code from http://pastebin.com/zXi0hmsU to render the final result and http://pastebin.com/rY4Gcj9N to create the shadow maps. The code is pretty straight forward and involves production of the depthmap from the light point of view, then projecting it into the camera space and checking for occlusions.&#xD;&#xA;&#xD;&#xA;However, from most angles I am getting pretty ugly results![like in this screenshot][1]&#xD;&#xA;&#xD;&#xA;The scene consists of some simple cubes (constructed by hand, facing outside, backface is culled), one light (shadow map shown in top left corner - looks okay) and one camera.&#xD;&#xA;&#xD;&#xA;My RenderTarget for the shadow maps is initialized by&#xD;&#xA;&#xD;&#xA;    int shadowMapSize = 512;&#xD;&#xA;    RenderTarget2D shadowMap = new RenderTarget2D(GraphicsDevice, shadowMapSize,&#xD;&#xA;        shadowMapSize, true, GraphicsDevice.PresentationParameters.BackBufferFormat,&#xD;&#xA;        DepthFormat.Depth24Stencil8);&#xD;&#xA;    GraphicsDevice.SetRenderTarget(shadowMap);&#xD;&#xA;    GraphicsDevice.Clear(Color.White);&#xD;&#xA;    GraphicsDevice.DepthStencilState = DepthStencilState.Default;&#xD;&#xA;&#xD;&#xA;Afterwards, the `CreateShadowMap` effect is applied, followed by the LambertWithShadows effect. Finally, the shadow map is drawn using a `SpriteBatch`.&#xD;&#xA;&#xD;&#xA;Rest of the code consists of simply providing the correct values to the shaders. If necessary, I can provide it at well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vflkt.png" />
  <row Id="21928" PostHistoryTypeId="1" PostId="10463" RevisionGUID="29bc23a3-f30d-4945-97c5-27518f13a85e" CreationDate="2011-03-31T13:56:07.457" UserId="6440" Text="Shadow map artifacts" />
  <row Id="21929" PostHistoryTypeId="3" PostId="10463" RevisionGUID="29bc23a3-f30d-4945-97c5-27518f13a85e" CreationDate="2011-03-31T13:56:07.457" UserId="6440" Text="&lt;xna&gt;&lt;c#&gt;&lt;shaders&gt;&lt;shadows&gt;&lt;shadow-mapping&gt;" />
  <row Id="21930" PostHistoryTypeId="5" PostId="10462" RevisionGUID="25c9f9c5-70c5-4b00-b75a-bcc3c855dc29" CreationDate="2011-03-31T14:03:03.103" UserId="6442" Comment="added 195 characters in body" Text="If you insist on a sprite sheet, there are algorithms that will generate the smallest possible area with all the sprites in it (or write one yourself for fun). However with basic compression, you're better off making a big, but organized sprite sheet:&#xD;&#xA;&#xD;&#xA; 1. Easier to manage and look at&#xD;&#xA; 2. You can always pack it if you ever get to ship&#xD;&#xA; 3. Even if you don't, basic compression will make the difference negligible&#xD;&#xA;&#xD;&#xA;However using separate files for each sprite is a more modular way of going about this. The difference is organizational and personal preference - I learned to use sheets from the first tutorial I saw. Then I figured it would be easier to use separate PNGs for everything, and that's stuck with me.&#xD;&#xA;&#xD;&#xA;**Edit**: Here's a recent question that addresses the issue. The chosen answer hints at knowledge of performance characteristics of both methods, though it might be guesses.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;" />
  <row Id="21931" PostHistoryTypeId="2" PostId="10464" RevisionGUID="ca498db2-2b80-4f75-9206-f16f1fcfe550" CreationDate="2011-03-31T14:15:17.150" UserId="6442" Text="Not familiar with the android's hardware scaling abilities, but if `gluScaleImage()` doesn't utilize hardware, you should find something that does. Be aware that your performance will then be hardware-dependent as well as CPU speed-dependent (try to find a friend with an older, slower android device to test). If this doesn't help you may want to cache the rotated graphics. When learning SDL I was surprised to find that the planes in this game have a long sprite sheet with ~16 rotations in an image for each of the two colors of plane." />
  <row Id="21932" PostHistoryTypeId="2" PostId="10465" RevisionGUID="05cb4ebf-b42c-4c75-8028-afa9a74704ed" CreationDate="2011-03-31T14:18:05.510" UserId="-1" Text="" />
  <row Id="21933" PostHistoryTypeId="2" PostId="10466" RevisionGUID="c004319d-b33a-4d30-8b24-11a9d099fe1f" CreationDate="2011-03-31T14:18:05.510" UserId="-1" Text="" />
  <row Id="21934" PostHistoryTypeId="5" PostId="10466" RevisionGUID="87df82e9-5215-4710-aa98-cf276b1dd454" CreationDate="2011-03-31T14:18:45.790" UserId="3588" Comment="added 123 characters in body" Text="Songs or melodies that play in the background of scenes to set the tone and nature. Also known as BGM, or background music." />
  <row Id="21935" PostHistoryTypeId="24" PostId="10466" RevisionGUID="87df82e9-5215-4710-aa98-cf276b1dd454" CreationDate="2011-03-31T14:18:45.790" Comment="Proposed by 3588 approved by 51 edit id of 174" />
  <row Id="21936" PostHistoryTypeId="5" PostId="10465" RevisionGUID="ba2d0d99-6f44-4d54-99a9-6b0e47d1d778" CreationDate="2011-03-31T14:18:49.953" UserId="3588" Comment="added 357 characters in body" Text="One of the two primary forms of [tag:audio], music is the sound that plays in the background as a part of the setting and mood of a scene. Questions deal with both the composition of these tunes and their integration into the game engine.&#xD;&#xA;&#xD;&#xA;See also: [tag:sound-effects], which is for sound elements that often represent on-screen events such as footsteps." />
  <row Id="21937" PostHistoryTypeId="24" PostId="10465" RevisionGUID="ba2d0d99-6f44-4d54-99a9-6b0e47d1d778" CreationDate="2011-03-31T14:18:49.953" Comment="Proposed by 3588 approved by 51 edit id of 173" />
  <row Id="21938" PostHistoryTypeId="2" PostId="10467" RevisionGUID="8706bc0d-adb9-4214-a983-7ad25777e1ff" CreationDate="2011-03-31T14:22:39.127" UserId="-1" Text="" />
  <row Id="21939" PostHistoryTypeId="2" PostId="10468" RevisionGUID="c5ce5db8-252b-4de4-9169-1035ebb459a2" CreationDate="2011-03-31T14:22:39.127" UserId="-1" Text="" />
  <row Id="21940" PostHistoryTypeId="2" PostId="10469" RevisionGUID="6ac72288-391d-4255-ae30-81562235d94e" CreationDate="2011-03-31T14:40:47.363" UserId="-1" Text="" />
  <row Id="21941" PostHistoryTypeId="2" PostId="10470" RevisionGUID="74942893-69d6-4300-9160-fa005d960f6a" CreationDate="2011-03-31T14:40:47.363" UserId="-1" Text="" />
  <row Id="21942" PostHistoryTypeId="2" PostId="10471" RevisionGUID="f45c409c-079e-4a18-a554-437c75443e0a" CreationDate="2011-03-31T14:48:16.640" UserId="-1" Text="" />
  <row Id="21943" PostHistoryTypeId="2" PostId="10472" RevisionGUID="a1ca0b78-f895-4850-949a-6c773a506d67" CreationDate="2011-03-31T14:48:16.640" UserId="-1" Text="" />
  <row Id="21944" PostHistoryTypeId="25" PostId="10463" RevisionGUID="b4412b3c-6f9a-4839-b8f5-f86f058d39a1" CreationDate="2011-03-31T15:00:20.633" Comment="http://twitter.com/#!/StackGameDev/status/53471696560201728" />
  <row Id="21945" PostHistoryTypeId="2" PostId="10473" RevisionGUID="688fc719-ab57-4667-a915-1b45f5c52778" CreationDate="2011-03-31T15:04:51.213" UserId="370" Text="You should definitely read [AI a modern approach][1].  The book is a bit expensive but you can't have a serious discussion about AI until you've got some ground work.  Also the 2nd edition is as good as the 3rd, so if you're able to find a cheaper 2nd edition take it.&#xD;&#xA;&#xD;&#xA;If you really want to get into machine learning, [Dr. Mitchell's book][2] has much move indepth information.&#xD;&#xA;&#xD;&#xA;It's unfortunate that there is such a large barrier of entry into AI academics.  But it wont help you or anyone else if you publish a white paper that uses unique (wrong) vocabulary and discusses techniques already well known in academia.&#xD;&#xA;&#xD;&#xA;The field of learning you opponent's behavior to improve your own has several notable entries.  Good spam filters do just this.  You should look into Paper Rock Scissors AI.  What makes PRS unique is that that it's simple and there is no search involved (AKA strategizing).  The only way the AI can beat a human is to learn his preferences and exploit them.&#xD;&#xA;&#xD;&#xA;Check out this PRS [AI bot][3] built by the NYTimes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aima.cs.berkeley.edu/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~tom/mlbook.html&#xD;&#xA;  [3]: http://www.nytimes.com/interactive/science/rock-paper-scissors.html" />
  <row Id="21946" PostHistoryTypeId="5" PostId="10453" RevisionGUID="c996c6fa-562a-4d7e-8c8a-11a179d4dbbf" CreationDate="2011-03-31T15:29:15.377" UserId="1198" Comment="added code formatting, fixed &quot;i&quot;, and changed wording/spelling" Text="I'm writing a BSP viewer for a university project. So far I have the main geometry loaded properly, and the PVS working.&#xD;&#xA;&#xD;&#xA;Now I'm trying to apply the lightmaps, but I can't seem to get the texture coordinates for the lightmaps calculated properly.&#xD;&#xA;&#xD;&#xA;According to here: http://developer.valvesoftware.com/wiki/The_Source_Engine_BSP_File_Format&#xD;&#xA;&#xD;&#xA;    struct texinfo_t&#xD;&#xA;    {&#xD;&#xA;        float textureVecs[2][4];  // [s/t][xyz offset]&#xD;&#xA;        float lightmapVecs[2][4]; // [s/t][xyz offset] - length is in units of texels/area&#xD;&#xA;        int flags;                // miptex flags overrides&#xD;&#xA;        int texdata;               // Pointer to texture name, size, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt; &#xD;&#xA;&gt; The first array of floats is in&#xD;&#xA;&gt; essence two vectors that represent how&#xD;&#xA;&gt; the texture is orientated and scaled&#xD;&#xA;&gt; when rendered on the world geometry.&#xD;&#xA;&gt; The two vectors, s and t, are the&#xD;&#xA;&gt; mapping of the left-to-right and&#xD;&#xA;&gt; down-to-up directions in the texture&#xD;&#xA;&gt; pixel coordinate space, onto the&#xD;&#xA;&gt; world. Each vector has an x, y, and z&#xD;&#xA;&gt; component, plus an offset which is the&#xD;&#xA;&gt; &quot;shift&quot; of the texture in that&#xD;&#xA;&gt; direction relative to the world. The&#xD;&#xA;&gt; length of the vectors represent the&#xD;&#xA;&gt; scaling of the texture in each&#xD;&#xA;&gt; direction.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The 2D coordinates (u, v) of a texture&#xD;&#xA;&gt; pixel (or texel) are mapped to the&#xD;&#xA;&gt; world coordinates (x, y, z) of a point&#xD;&#xA;&gt; on a face by:&#xD;&#xA;&gt; &#xD;&#xA;&gt; u = tv0,0 * x + tv0,1 * y + tv0,2 * z&#xD;&#xA;&gt; + tv0,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; v = tv1,0 * x + tv1,1 * y + tv1,2 * z&#xD;&#xA;&gt; + tv1,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; (ie. The dot product of the vectors&#xD;&#xA;&gt; with the vertex plus the offset in&#xD;&#xA;&gt; that direction. Where tvA,B is&#xD;&#xA;&gt; textureVecs[A][B].&#xD;&#xA;&gt; &#xD;&#xA;&gt; Furthermore, after calculating (u, v),&#xD;&#xA;&gt; to convert them to texture coordinates&#xD;&#xA;&gt; which you would send to your graphics&#xD;&#xA;&gt; card, divide u and v by the width and&#xD;&#xA;&gt; height of the texture respectively.&#xD;&#xA;&#xD;&#xA;So I am doing the calculation as follows. Take the dot product of the vertex and the lightmap vector(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2]) add the offset (lightmapVecs[0][3]), subtract the mins, and divide the result by the width/height.&#xD;&#xA;&#xD;&#xA;    float s = Vector3f.dot(v, new Vector3f(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2])) + lightmapVecs[0][3] - f.LightmapTextureMinsInLuxels[0];&#xD;&#xA;    float t = Vector3f.dot(v, new Vector3f(lightmapVecs[1][0], lightmapVecs[1][1], lightmapVecs[1][2])) + lightmapVecs[1][3] - f.LightmapTextureMinsInLuxels[1];&#xD;&#xA;    s /= (f.LightmapTextureSizeInLuxels[0] + 1);&#xD;&#xA;    t /= (f.LightmapTextureSizeInLuxels[1] + 1);&#xD;&#xA;&#xD;&#xA;However it ends up looking like this:&#xD;&#xA;&#xD;&#xA;(damn not allowed to post pic)&#xD;&#xA;&#xD;&#xA;Here's a sample calculation for the texture coord 't' for one vertex.&#xD;&#xA;&#xD;&#xA;    vertex = 352.0, -144.00027, -224.0&#xD;&#xA;    lightmap vector = -4, 0, 0&#xD;&#xA;    lightmap offset = 0&#xD;&#xA;    lightmap mins = 9&#xD;&#xA;    lightmap height = 14&#xD;&#xA;&#xD;&#xA;So the dot product is -1408&#xD;&#xA;&#xD;&#xA;    (-1408 + 0 - 9) / 14&#xD;&#xA;&#xD;&#xA;    t = -101.21&#xD;&#xA;&#xD;&#xA;This seems way off.&#xD;&#xA;" />
  <row Id="21947" PostHistoryTypeId="24" PostId="10453" RevisionGUID="c996c6fa-562a-4d7e-8c8a-11a179d4dbbf" CreationDate="2011-03-31T15:29:15.377" Comment="Proposed by 1198 approved by 51 edit id of 182" />
  <row Id="21948" PostHistoryTypeId="5" PostId="10465" RevisionGUID="15fb94eb-958b-4603-b37e-17d5db112f18" CreationDate="2011-03-31T15:29:20.573" UserId="3588" Comment="added 2 characters in body" Text="One of the three primary forms of [tag:audio], music is the sound that plays in the background as a part of the setting and mood of a scene. Questions deal with both the composition of these tunes and their integration into the game engine.&#xD;&#xA;&#xD;&#xA;See also: [tag:sound-effects], which is for sound elements that often represent on-screen events such as footsteps." />
  <row Id="21949" PostHistoryTypeId="24" PostId="10465" RevisionGUID="15fb94eb-958b-4603-b37e-17d5db112f18" CreationDate="2011-03-31T15:29:20.573" Comment="Proposed by 3588 approved by 51 edit id of 175" />
  <row Id="21950" PostHistoryTypeId="5" PostId="10471" RevisionGUID="04a1e36c-5871-4f3f-b7f5-5fe643935ca7" CreationDate="2011-03-31T15:29:31.133" UserId="3588" Comment="added 328 characters in body" Text="This tag covers both methods to promote your game to the potential audience, as well as decisions towards the distribution and business model of the game. It can apply to your strategies in the timing of advertisements, the kind of promotions (trailers, posters, exclusive content), and the best ways to spread your name around." />
  <row Id="21951" PostHistoryTypeId="24" PostId="10471" RevisionGUID="04a1e36c-5871-4f3f-b7f5-5fe643935ca7" CreationDate="2011-03-31T15:29:31.133" Comment="Proposed by 3588 approved by 51 edit id of 180" />
  <row Id="21952" PostHistoryTypeId="5" PostId="10470" RevisionGUID="0326e349-7f49-4e94-9824-648b68a0509e" CreationDate="2011-03-31T15:29:35.503" UserId="3588" Comment="added 119 characters in body" Text="The audio component of a game, representing what the player will hear. Comprised of dialogue, music, and sound effects." />
  <row Id="21953" PostHistoryTypeId="24" PostId="10470" RevisionGUID="0326e349-7f49-4e94-9824-648b68a0509e" CreationDate="2011-03-31T15:29:35.503" Comment="Proposed by 3588 approved by 51 edit id of 179" />
  <row Id="21954" PostHistoryTypeId="5" PostId="10469" RevisionGUID="7bce5432-03e0-4262-aa41-e59559028949" CreationDate="2011-03-31T15:29:38.933" UserId="3588" Comment="added 1079 characters in body" Text="Audio refers to the superclass that houses all game elements that are heard. It serves many purposes, from ambient illustration of a scene, to noting the significance of an event, to telegraphing enemy behavior. Often used as an external asset. Audio is comprised of 3 primary forms.&#xD;&#xA;&#xD;&#xA; - **Dialogue**, which is the spoken words of characters in the game. Modern games almost all feature voice acting of some form.&#xD;&#xA; - **Music**, which is the background songs that play as a part of the scenery. Vocals that are part of these songs count as music, not as dialogue. See: [tag:music].&#xD;&#xA; - **Sound Effects**, which are the sound elements that represent in-game events from the clink of toasting glasses to the roaring blaze of a fire. See: [tag:sound-effects].&#xD;&#xA;&#xD;&#xA;Questions under this tag deal with the management, integration, and utility of audio assets in games, especially when the primary form is unspecified or not of general importance to the nature of the question. For questions on musical and sound composition, consider including the tag for that specific form of audio." />
  <row Id="21955" PostHistoryTypeId="24" PostId="10469" RevisionGUID="7bce5432-03e0-4262-aa41-e59559028949" CreationDate="2011-03-31T15:29:38.933" Comment="Proposed by 3588 approved by 51 edit id of 178" />
  <row Id="21956" PostHistoryTypeId="5" PostId="10468" RevisionGUID="3e8a2a9d-ee23-498c-9cdc-357ec03b54d3" CreationDate="2011-03-31T15:29:44.877" UserId="3588" Comment="added 111 characters in body" Text="BAM! WHAP! And other sound elements that represent in-game events that happen. Traditionally abbreviated as SE." />
  <row Id="21957" PostHistoryTypeId="24" PostId="10468" RevisionGUID="3e8a2a9d-ee23-498c-9cdc-357ec03b54d3" CreationDate="2011-03-31T15:29:44.877" Comment="Proposed by 3588 approved by 51 edit id of 177" />
  <row Id="21958" PostHistoryTypeId="5" PostId="10467" RevisionGUID="31c06891-562e-438b-aa45-57423dcfc611" CreationDate="2011-03-31T15:29:47.593" UserId="3588" Comment="added 470 characters in body" Text="One of the three primary forms of [tag:audio], sound effects simulate the noise created when things happen in the game, from the pitter-patter of rain to the slash of a sword across a dragon's chest. Questions deal with both the composition of these sounds and their integration into the game engine.&#xD;&#xA;&#xD;&#xA;Spoken dialogue is considered a separate element from sound effects.&#xD;&#xA;&#xD;&#xA;See also: [tag:music], which is for the tunes that play as a part of the scenery of the game. " />
  <row Id="21959" PostHistoryTypeId="24" PostId="10467" RevisionGUID="31c06891-562e-438b-aa45-57423dcfc611" CreationDate="2011-03-31T15:29:47.593" Comment="Proposed by 3588 approved by 51 edit id of 176" />
  <row Id="21960" PostHistoryTypeId="5" PostId="10472" RevisionGUID="e9338e6e-7869-414a-b9b0-07299bbc89bc" CreationDate="2011-03-31T15:29:50.400" UserId="3588" Comment="added 86 characters in body" Text="The promotion of games to others, because otherwise no one would be playing your game!" />
  <row Id="21961" PostHistoryTypeId="24" PostId="10472" RevisionGUID="e9338e6e-7869-414a-b9b0-07299bbc89bc" CreationDate="2011-03-31T15:29:50.400" Comment="Proposed by 3588 approved by 51 edit id of 181" />
  <row Id="21962" PostHistoryTypeId="5" PostId="10445" RevisionGUID="4b2cd40e-c6ec-4965-88d8-fec24361605a" CreationDate="2011-03-31T15:44:15.143" UserId="1430" Comment="deleted 2 characters in body; edited title" Text="I'm trying to get a lens texture to rotate around the circumference of the circle and although I picked the centre of the circle as the rotating point of the lens it doesn't work.&#xD;&#xA;&#xD;&#xA;     private float angle;&#xD;&#xA;&#xD;&#xA;    //Initialize Method  &#xD;&#xA;    circlePosition.X = vp.X + vp.Width / 2;&#xD;&#xA;    circlePosition.Y = vp.Y + vp.Height / 2;&#xD;&#xA;&#xD;&#xA;    lensPosition.X = circlePosition.X;&#xD;&#xA;    lensPosition.Y = circlePosition.Y + 155;&#xD;&#xA;&#xD;&#xA;    //Load Content Method  &#xD;&#xA;    circleOrigin.X = Circle.Width / 2;&#xD;&#xA;    circleOrigin.Y = Circle.Height / 2;&#xD;&#xA;&#xD;&#xA;    lensOrigin.X = Lens.Width / 2;&#xD;&#xA;    lensOrigin.Y = Lens.Height / 2;&#xD;&#xA;&#xD;&#xA;     //Update Method &#xD;&#xA;     angle += 0.005f;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //Draw Method&#xD;&#xA;    spriteBatch.Draw(Circle, circlePosition, null, Color.White, 0.0f,&#xD;&#xA;        circleOrigin, 1.0f, SpriteEffects.None, 0f);&#xD;&#xA;&#xD;&#xA;    spriteBatch.Draw(Lens, lensPosition, null, Color.White, angle,&#xD;&#xA;      circleOrigin, 1.0f, SpriteEffects.None, 0f);" />
  <row Id="21963" PostHistoryTypeId="4" PostId="10445" RevisionGUID="4b2cd40e-c6ec-4965-88d8-fec24361605a" CreationDate="2011-03-31T15:44:15.143" UserId="1430" Comment="deleted 2 characters in body; edited title" Text="Rotating object around circumference of circle" />
  <row Id="21964" PostHistoryTypeId="2" PostId="10474" RevisionGUID="e8df65bb-0cab-4ebc-815f-d868fc5d2ead" CreationDate="2011-03-31T15:57:33.527" UserId="-1" Text="" />
  <row Id="21965" PostHistoryTypeId="2" PostId="10475" RevisionGUID="34181e67-1d26-425a-ad6b-7864437dbb10" CreationDate="2011-03-31T15:57:33.527" UserId="-1" Text="" />
  <row Id="21966" PostHistoryTypeId="2" PostId="10476" RevisionGUID="664ea2a6-16f5-4a51-84e0-b932d7c41d8d" CreationDate="2011-03-31T16:03:10.840" UserId="-1" Text="" />
  <row Id="21967" PostHistoryTypeId="2" PostId="10477" RevisionGUID="29e8d521-85ff-44d0-a0fc-c61a16b989c5" CreationDate="2011-03-31T16:03:10.840" UserId="-1" Text="" />
  <row Id="21968" PostHistoryTypeId="2" PostId="10478" RevisionGUID="8e0ec8ab-aada-4f50-9145-39d5cc0fa891" CreationDate="2011-03-31T16:17:07.647" UserId="-1" Text="" />
  <row Id="21969" PostHistoryTypeId="2" PostId="10479" RevisionGUID="274d43c3-ca85-4139-8736-2f6a95a9910e" CreationDate="2011-03-31T16:17:07.647" UserId="-1" Text="" />
  <row Id="21970" PostHistoryTypeId="2" PostId="10480" RevisionGUID="b73f607a-6cbf-4d53-9a8a-635c42f6ebd9" CreationDate="2011-03-31T16:28:03.750" UserId="6187" Text="Anyone know any free/non-free RTS engine can be used for iOS game development?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="21971" PostHistoryTypeId="1" PostId="10480" RevisionGUID="b73f607a-6cbf-4d53-9a8a-635c42f6ebd9" CreationDate="2011-03-31T16:28:03.750" UserId="6187" Text="RTS game engine for iOS/iPhone" />
  <row Id="21972" PostHistoryTypeId="3" PostId="10480" RevisionGUID="b73f607a-6cbf-4d53-9a8a-635c42f6ebd9" CreationDate="2011-03-31T16:28:03.750" UserId="6187" Text="&lt;iphone&gt;&lt;ios&gt;&lt;ipad&gt;&lt;rts&gt;" />
  <row Id="21973" PostHistoryTypeId="2" PostId="10481" RevisionGUID="54c151dc-7b08-4ac1-9ee6-c08944d6c540" CreationDate="2011-03-31T16:28:36.823" UserId="-1" Text="" />
  <row Id="21974" PostHistoryTypeId="2" PostId="10482" RevisionGUID="20249970-5ced-4a48-bb6f-7660c5f97f61" CreationDate="2011-03-31T16:28:36.823" UserId="-1" Text="" />
  <row Id="21975" PostHistoryTypeId="2" PostId="10483" RevisionGUID="9addfd41-a2ca-4d38-b32c-a5b1e42e5637" CreationDate="2011-03-31T16:33:57.413" UserId="6447" Text="I don't know of an engine dedicated to RTS, but there's always Unity3D. Runs on both iOS and win.&#xD;&#xA;If you plan on iPhone/Pad development it's going to cost quite a bit though. That being said, Unity is quite awesome!" />
  <row Id="21976" PostHistoryTypeId="5" PostId="10480" RevisionGUID="6e27b1b5-e274-4a79-9802-b98043052d5e" CreationDate="2011-03-31T16:37:00.997" UserId="1198" Comment="removed signature, fixed wording" Text="Anyone know any free or non-free RTS engine that can be used for iOS game development?" />
  <row Id="21977" PostHistoryTypeId="24" PostId="10480" RevisionGUID="6e27b1b5-e274-4a79-9802-b98043052d5e" CreationDate="2011-03-31T16:37:00.997" Comment="Proposed by 1198 approved by 51 edit id of 192" />
  <row Id="21978" PostHistoryTypeId="5" PostId="9916" RevisionGUID="7eafc2e1-d8a3-4a4f-a44c-dc67e3747d89" CreationDate="2011-03-31T16:37:08.017" UserId="1198" Comment="removed greeting" Text="I'm new to games programming and am wondering what tactics games use to pre-load entity and map data. Will a game initialise with the fundamental map data stored in memory?" />
  <row Id="21979" PostHistoryTypeId="24" PostId="9916" RevisionGUID="7eafc2e1-d8a3-4a4f-a44c-dc67e3747d89" CreationDate="2011-03-31T16:37:08.017" Comment="Proposed by 1198 approved by 51 edit id of 189" />
  <row Id="21980" PostHistoryTypeId="5" PostId="10475" RevisionGUID="5444526c-a18c-425a-9339-1be171c8aac1" CreationDate="2011-03-31T16:37:17.473" UserId="3588" Comment="added 57 characters in body" Text="Terminology used by game developers to refer to concepts." />
  <row Id="21981" PostHistoryTypeId="24" PostId="10475" RevisionGUID="5444526c-a18c-425a-9339-1be171c8aac1" CreationDate="2011-03-31T16:37:17.473" Comment="Proposed by 3588 approved by 51 edit id of 184" />
  <row Id="21982" PostHistoryTypeId="5" PostId="10474" RevisionGUID="b73f57c8-992b-4504-a6a8-8274361836e7" CreationDate="2011-03-31T16:37:19.953" UserId="3588" Comment="added 238 characters in body" Text="Not everyone has the same breadth of vocabulary. Use this tag when asking about a game development term that you do not comprehend, or when asking about how a specific method/design pattern/function/element is referred to in the industry." />
  <row Id="21983" PostHistoryTypeId="24" PostId="10474" RevisionGUID="b73f57c8-992b-4504-a6a8-8274361836e7" CreationDate="2011-03-31T16:37:19.953" Comment="Proposed by 3588 approved by 51 edit id of 183" />
  <row Id="21984" PostHistoryTypeId="5" PostId="10479" RevisionGUID="b13bfb0d-df39-4f7e-a182-4b3ad33ab478" CreationDate="2011-03-31T16:37:22.323" UserId="3588" Comment="added 98 characters in body" Text="A technique for using rays to determine points of intersection. Often used in lighting simulation." />
  <row Id="21985" PostHistoryTypeId="24" PostId="10479" RevisionGUID="b13bfb0d-df39-4f7e-a182-4b3ad33ab478" CreationDate="2011-03-31T16:37:22.323" Comment="Proposed by 3588 approved by 51 edit id of 188" />
  <row Id="21986" PostHistoryTypeId="5" PostId="10478" RevisionGUID="46750619-e20a-410a-8514-9e6d19e15539" CreationDate="2011-03-31T16:37:26.457" UserId="3588" Comment="added 638 characters in body" Text="**Ray casting** is a computer graphics technique that involves casting multiple rays from a point, and detecting the first point of impact of each ray in the world. This data can be used to render scenes or determine specific kinds of impact depending on elements such as degree of exposure. Questions with this tag deal with the calculation and implementation of this technique.&#xD;&#xA;&#xD;&#xA;Not to be confused with **ray tracing**, which is a similar process except that secondary rays are cast after the first point of impact to simulate photo phenomena such as reflection. As a tradeoff for its accuracy, ray tracing is slower than ray casting." />
  <row Id="21987" PostHistoryTypeId="24" PostId="10478" RevisionGUID="46750619-e20a-410a-8514-9e6d19e15539" CreationDate="2011-03-31T16:37:26.457" Comment="Proposed by 3588 approved by 51 edit id of 187" />
  <row Id="21988" PostHistoryTypeId="5" PostId="10482" RevisionGUID="3406f964-8751-4579-9d40-326447dee586" CreationDate="2011-03-31T16:37:28.797" UserId="3588" Comment="added 112 characters in body" Text="Pre-rendered scenes which temporarily halt gameplay in order to illustrate an event as part of the game's story." />
  <row Id="21989" PostHistoryTypeId="24" PostId="10482" RevisionGUID="3406f964-8751-4579-9d40-326447dee586" CreationDate="2011-03-31T16:37:28.797" Comment="Proposed by 3588 approved by 51 edit id of 191" />
  <row Id="21990" PostHistoryTypeId="5" PostId="10481" RevisionGUID="454c5b0d-4a56-4e75-b9dc-2191ed3fe6b1" CreationDate="2011-03-31T16:37:31.323" UserId="3588" Comment="added 364 characters in body" Text="Whether it's a full-blown high quality cinematic, or an extended in-engine choreography of non-playable entities, a cutscene represents the time in which the player cannot directly intervene or affect the event. It may be fully automated, or it could require the player to advance textboxes. Questions using this tag deal with how to implement cutscenes in a game." />
  <row Id="21991" PostHistoryTypeId="24" PostId="10481" RevisionGUID="454c5b0d-4a56-4e75-b9dc-2191ed3fe6b1" CreationDate="2011-03-31T16:37:31.323" Comment="Proposed by 3588 approved by 51 edit id of 190" />
  <row Id="21992" PostHistoryTypeId="5" PostId="10477" RevisionGUID="e10ed7a1-0ffd-4d02-a8a1-e019dd5b5779" CreationDate="2011-03-31T16:37:33.323" UserId="3588" Comment="added 124 characters in body" Text="A ranking used to identify the audience of a game based on its content. The most prevalent in the game industry is the ESRB." />
  <row Id="21993" PostHistoryTypeId="24" PostId="10477" RevisionGUID="e10ed7a1-0ffd-4d02-a8a1-e019dd5b5779" CreationDate="2011-03-31T16:37:33.323" Comment="Proposed by 3588 approved by 51 edit id of 186" />
  <row Id="21994" PostHistoryTypeId="5" PostId="10476" RevisionGUID="8a005a8d-1bb5-4439-b0e1-a3f416822ed4" CreationDate="2011-03-31T16:37:35.397" UserId="3588" Comment="added 307 characters in body" Text="Questions on this tag deal with the application and the effects of content ratings on games. Please do not use it for discussion on the appropriateness of a specific game's rating.&#xD;&#xA;&#xD;&#xA;For additional research on content ratings, check out official organizations like the [ESRB Website](http://www.esrb.org/)." />
  <row Id="21995" PostHistoryTypeId="24" PostId="10476" RevisionGUID="8a005a8d-1bb5-4439-b0e1-a3f416822ed4" CreationDate="2011-03-31T16:37:35.397" Comment="Proposed by 3588 approved by 51 edit id of 185" />
  <row Id="21996" PostHistoryTypeId="2" PostId="10484" RevisionGUID="ff1593e8-7d6a-43a4-a152-27cef1cf0dbc" CreationDate="2011-03-31T16:51:46.337" UserId="-1" Text="" />
  <row Id="21997" PostHistoryTypeId="2" PostId="10485" RevisionGUID="4aeaf68d-3f4f-4277-889d-8048b9fa9cda" CreationDate="2011-03-31T16:51:46.337" UserId="-1" Text="" />
  <row Id="21998" PostHistoryTypeId="5" PostId="10442" RevisionGUID="db067c1d-b1e4-49b0-9539-f73d2527ad75" CreationDate="2011-03-31T16:51:51.460" UserId="1929" Comment="added 177 characters in body" Text="I have a theory on AI that I would like to write a &quot;whitepaper&quot; about. The distinction I want to explore in AI is **learning vs. strategizing.** My question is, **where can I read other material about this subject?**&#xD;&#xA;&#xD;&#xA;Let me give a chess example. Let's look at a chess AI as a max-tree, where capturing an enemy unit adds that unit's value to the &quot;move score&quot; for that decision (and likewise losing a piece subtracts that value to the score). Capturing a pawn might net 1 point, a knight 4 points, a rook 5 points, etc.&#xD;&#xA;&#xD;&#xA;*Strategizing* would be AI to apply these points and determine the next move; eg. given ten possible moves, pick the best (max score) at the end of three moves.&#xD;&#xA;&#xD;&#xA;*Learning* would be applying statistical observation to determine those values. If you play 100 games, the AI might decide that capturing a pawn is 2 points, and a knight is worth 7 points, while a rook is only worth 3 points (based on 100 gameplays).&#xD;&#xA;&#xD;&#xA;Does this distinction already exist in literature, and if so, *where can I read about it*?&#xD;&#xA;&#xD;&#xA;**Edit:** Does anyone know a Chess game (with source-code preferably) that utilizes this approach? Maybe [Chess960@Home][1]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chess960athome.org/alpha/" />
  <row Id="21999" PostHistoryTypeId="2" PostId="10486" RevisionGUID="62c2d773-b280-41eb-9aeb-2c504c72365b" CreationDate="2011-03-31T16:58:32.493" UserId="-1" Text="" />
  <row Id="22000" PostHistoryTypeId="2" PostId="10487" RevisionGUID="c6bfccdc-d235-47af-8d51-a661fef06e38" CreationDate="2011-03-31T16:58:32.493" UserId="-1" Text="" />
  <row Id="22001" PostHistoryTypeId="2" PostId="10488" RevisionGUID="9dfe71b6-0cad-465d-95cb-c89a5096275d" CreationDate="2011-03-31T17:10:22.967" UserId="-1" Text="" />
  <row Id="22002" PostHistoryTypeId="2" PostId="10489" RevisionGUID="22d59732-625c-4c9e-8d5a-57c5d442ca0e" CreationDate="2011-03-31T17:10:22.967" UserId="-1" Text="" />
  <row Id="22003" PostHistoryTypeId="2" PostId="10490" RevisionGUID="327e4741-6ffb-4b62-890e-b693f55fe0fd" CreationDate="2011-03-31T17:14:55.990" UserId="-1" Text="" />
  <row Id="22004" PostHistoryTypeId="2" PostId="10491" RevisionGUID="b8b0c3fb-1d61-4a25-ae10-6f7d2e477220" CreationDate="2011-03-31T17:14:55.990" UserId="-1" Text="" />
  <row Id="22005" PostHistoryTypeId="5" PostId="9918" RevisionGUID="3883eafc-cd9a-4521-9bf5-2097b91c9fb2" CreationDate="2011-03-31T17:17:25.647" UserId="1198" Comment="added 8 characters in body" Text="I'd say this really depends on what type of game you're making, but some general points.&#xD;&#xA;&#xD;&#xA; 1. Only load what you absolutly know you need immediatly, or you know you'll need soon&#xD;&#xA; 2. Only remove things from memory when you absolutly know you wont need them again AND you need to load something that fits the constraints of #1 AND you've reached your memory limit&#xD;&#xA; 3. A general understanding of Paging and Virtual Memory of Operating Systems can be applied to games in terms of when to remove data from memory -- that is to say, those ideas can be applied to game systems because many games have &quot;OS like&quot; requirements (fast, direct access to memory, input, and network devices)" />
  <row Id="22006" PostHistoryTypeId="5" PostId="9882" RevisionGUID="aa30268a-190f-40f8-819c-df663f706f54" CreationDate="2011-03-31T17:19:09.420" UserId="1198" Comment="fixed typos" Text="I'd recommend you check into http://nodejs.org/ and https://github.com/joyent/node/wiki/ for information on what you can do with node.js.&#xD;&#xA;&#xD;&#xA;cocos2d-javascript has a tutorials section on their website: http://cocos2d-javascript.org/tutorials/ which I recommend you start with.&#xD;&#xA;&#xD;&#xA;Without significantly more detail, there isn't much more I can recommend you look at." />
  <row Id="22009" PostHistoryTypeId="2" PostId="10494" RevisionGUID="9a899524-1b1b-4dfb-b53c-075dc52c64cf" CreationDate="2011-03-31T17:35:42.430" UserId="-1" Text="" />
  <row Id="22010" PostHistoryTypeId="2" PostId="10495" RevisionGUID="7a677d6f-0615-40e6-8a4d-c51be9fe0798" CreationDate="2011-03-31T17:35:42.430" UserId="-1" Text="" />
  <row Id="22011" PostHistoryTypeId="2" PostId="10496" RevisionGUID="461b6997-8bfd-458d-b1ec-bd68c27a44d2" CreationDate="2011-03-31T17:39:28.613" UserId="6450" Text="Try having your camera move dynamically.&#xD;&#xA;&#xD;&#xA;Center on the front rank of players, and the front-most monsters, and then switch views or move the camera to show the rest of the enemies when they are being attacked, attacking, or being selected by the player for an attack.&#xD;&#xA;&#xD;&#xA;This would also make your battles more engaging, I bet." />
  <row Id="22012" PostHistoryTypeId="2" PostId="10497" RevisionGUID="198d2f8f-5239-45fc-a136-aa5bc52d33cf" CreationDate="2011-03-31T17:45:15.183" UserId="-1" Text="" />
  <row Id="22013" PostHistoryTypeId="2" PostId="10498" RevisionGUID="40c782e8-958e-44a6-88e0-56f000e8d173" CreationDate="2011-03-31T17:45:15.183" UserId="-1" Text="" />
  <row Id="22014" PostHistoryTypeId="5" PostId="10453" RevisionGUID="b939806a-9fe2-4243-bbe0-a03f19343ace" CreationDate="2011-03-31T17:59:47.363" UserId="6441" Comment="added 22 characters in body" Text="I'm writing a BSP viewer for a university project. So far I have the main geometry loaded properly, and the PVS working.&#xD;&#xA;&#xD;&#xA;Now I'm trying to apply the lightmaps, but I can't seem to get the texture coordinates for the lightmaps calculated properly.&#xD;&#xA;&#xD;&#xA;According to here: http://developer.valvesoftware.com/wiki/The_Source_Engine_BSP_File_Format&#xD;&#xA;&#xD;&#xA;    struct texinfo_t&#xD;&#xA;    {&#xD;&#xA;        float textureVecs[2][4];  // [s/t][xyz offset]&#xD;&#xA;        float lightmapVecs[2][4]; // [s/t][xyz offset] - length is in units of texels/area&#xD;&#xA;        int flags;                // miptex flags overrides&#xD;&#xA;        int texdata;               // Pointer to texture name, size, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&gt; &#xD;&#xA;&gt; The first array of floats is in&#xD;&#xA;&gt; essence two vectors that represent how&#xD;&#xA;&gt; the texture is orientated and scaled&#xD;&#xA;&gt; when rendered on the world geometry.&#xD;&#xA;&gt; The two vectors, s and t, are the&#xD;&#xA;&gt; mapping of the left-to-right and&#xD;&#xA;&gt; down-to-up directions in the texture&#xD;&#xA;&gt; pixel coordinate space, onto the&#xD;&#xA;&gt; world. Each vector has an x, y, and z&#xD;&#xA;&gt; component, plus an offset which is the&#xD;&#xA;&gt; &quot;shift&quot; of the texture in that&#xD;&#xA;&gt; direction relative to the world. The&#xD;&#xA;&gt; length of the vectors represent the&#xD;&#xA;&gt; scaling of the texture in each&#xD;&#xA;&gt; direction.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The 2D coordinates (u, v) of a texture&#xD;&#xA;&gt; pixel (or texel) are mapped to the&#xD;&#xA;&gt; world coordinates (x, y, z) of a point&#xD;&#xA;&gt; on a face by:&#xD;&#xA;&gt; &#xD;&#xA;&gt; u = tv0,0 * x + tv0,1 * y + tv0,2 * z&#xD;&#xA;&gt; + tv0,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; v = tv1,0 * x + tv1,1 * y + tv1,2 * z&#xD;&#xA;&gt; + tv1,3&#xD;&#xA;&gt; &#xD;&#xA;&gt; (ie. The dot product of the vectors&#xD;&#xA;&gt; with the vertex plus the offset in&#xD;&#xA;&gt; that direction. Where tvA,B is&#xD;&#xA;&gt; textureVecs[A][B].&#xD;&#xA;&gt; &#xD;&#xA;&gt; Furthermore, after calculating (u, v),&#xD;&#xA;&gt; to convert them to texture coordinates&#xD;&#xA;&gt; which you would send to your graphics&#xD;&#xA;&gt; card, divide u and v by the width and&#xD;&#xA;&gt; height of the texture respectively.&#xD;&#xA;&#xD;&#xA;So I am doing the calculation as follows. Take the dot product of the vertex and the lightmap vector(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2]) add the offset (lightmapVecs[0][3]), subtract the mins, and divide the result by the width/height.&#xD;&#xA;&#xD;&#xA;    float s = Vector3f.dot(v, new Vector3f(lightmapVecs[0][0], lightmapVecs[0][1], lightmapVecs[0][2])) + lightmapVecs[0][3] - f.LightmapTextureMinsInLuxels[0];&#xD;&#xA;    float t = Vector3f.dot(v, new Vector3f(lightmapVecs[1][0], lightmapVecs[1][1], lightmapVecs[1][2])) + lightmapVecs[1][3] - f.LightmapTextureMinsInLuxels[1];&#xD;&#xA;    s /= (f.LightmapTextureSizeInLuxels[0] + 1);&#xD;&#xA;    t /= (f.LightmapTextureSizeInLuxels[1] + 1);&#xD;&#xA;&#xD;&#xA;However it ends up looking like this:&#xD;&#xA;![lightmaps][1]&#xD;&#xA;&#xD;&#xA;Here's a sample calculation for the texture coord 't' for one vertex.&#xD;&#xA;&#xD;&#xA;    vertex = 352.0, -144.00027, -224.0&#xD;&#xA;    lightmap vector = -4, 0, 0&#xD;&#xA;    lightmap offset = 0&#xD;&#xA;    lightmap mins = 9&#xD;&#xA;    lightmap height = 14&#xD;&#xA;&#xD;&#xA;So the dot product is -1408&#xD;&#xA;&#xD;&#xA;    (-1408 + 0 - 9) / 14&#xD;&#xA;&#xD;&#xA;    t = -101.21&#xD;&#xA;&#xD;&#xA;This seems way off.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZM5hP.png" />
  <row Id="22015" PostHistoryTypeId="25" PostId="10453" RevisionGUID="52fdd425-7f79-426e-b0b7-cc591f7d04b4" CreationDate="2011-03-31T18:00:20.550" Comment="http://twitter.com/#!/StackGameDev/status/53516994510725120" />
  <row Id="22016" PostHistoryTypeId="2" PostId="10499" RevisionGUID="e189a2af-475f-48ce-a41f-abae8e1c4069" CreationDate="2011-03-31T18:04:43.370" UserId="-1" Text="" />
  <row Id="22017" PostHistoryTypeId="2" PostId="10500" RevisionGUID="50b31311-348f-47ef-b40c-2f8e6a4204bf" CreationDate="2011-03-31T18:04:43.370" UserId="-1" Text="" />
  <row Id="22018" PostHistoryTypeId="2" PostId="10501" RevisionGUID="32a5f664-336a-45f5-a391-c07e00329a5b" CreationDate="2011-03-31T18:15:38.120" UserId="-1" Text="" />
  <row Id="22019" PostHistoryTypeId="2" PostId="10502" RevisionGUID="e7e5de3f-a259-491b-8c4c-e8b848d860a8" CreationDate="2011-03-31T18:15:38.120" UserId="-1" Text="" />
  <row Id="22020" PostHistoryTypeId="2" PostId="10503" RevisionGUID="08865001-f274-4132-94a9-9165c3fc93bb" CreationDate="2011-03-31T18:24:16.037" UserId="-1" Text="" />
  <row Id="22021" PostHistoryTypeId="2" PostId="10504" RevisionGUID="99c5d47b-83c5-4b01-b240-294be2c3248c" CreationDate="2011-03-31T18:24:16.037" UserId="-1" Text="" />
  <row Id="22022" PostHistoryTypeId="2" PostId="10505" RevisionGUID="90fe6e98-ac1f-4092-a499-4de8ffa5704d" CreationDate="2011-03-31T18:43:20.910" UserId="6452" Text="http://www.vectorlight.net/games.aspx has Silverlight and HTML5 games you can submit to." />
  <row Id="22023" PostHistoryTypeId="5" PostId="10452" RevisionGUID="b480a15e-f31f-4033-8a8f-2be5e789a982" CreationDate="2011-03-31T18:44:46.130" UserId="3794" Comment="added 294 characters in body" Text="Texture cubes works differently than regular texturing. Texture cubes are indexed not by indicies on the polygon, but by a direction vector. Imagine that you are in the middle of the cube and texture coordinate are actualy 3D vector pointing to the texture cubes surface.&#xD;&#xA;&#xD;&#xA;![enter image description here][1] &#xD;&#xA;&#xD;&#xA;Resizing texture will not solve anything. You have to somehow change texture coordinates. But this problem doesn't seem to be caused by texture scale problem. It looks more like a too big field of view in perspective matrix, which can cause this problems.&#xD;&#xA;&#xD;&#xA;    //this should be OK.&#xD;&#xA;    gluPerspective(45.0f, width/height, zNear, zFar);&#xD;&#xA;&#xD;&#xA;And the vertex shader should be like this:&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;        gl_Position = modelViewMatrix * projectionMatrix * gl_Position;&#xD;&#xA;        texCoord = gl_NormalMatrix * gl_Position.xyz;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;[About gl_NormalMatrix][2]&#xD;&#xA;&#xD;&#xA;The matrix multiplication order should be really like this, if this (correct) order doesn't work, there is propably some error on other place...&#xD;&#xA;&#xD;&#xA;(*credits: That nice image was stolen from [here][3]*)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZNxIc.gif&#xD;&#xA;  [2]: http://www.gamedev.net/topic/274933-gl_normalmatrix--gl_modelviewmatrix-inside-fragment-shader-/&#xD;&#xA;  [3]: http://www.codermind.com/articles/Raytracer-in-C++-Part-III-Textures.html" />
  <row Id="22024" PostHistoryTypeId="5" PostId="10487" RevisionGUID="38583e98-33eb-4eaa-97d8-82271ed24392" CreationDate="2011-03-31T19:01:01.373" UserId="3588" Comment="added 77 characters in body" Text="Taking focus on a target, often to shoot it, and even more often in the head." />
  <row Id="22025" PostHistoryTypeId="24" PostId="10487" RevisionGUID="38583e98-33eb-4eaa-97d8-82271ed24392" CreationDate="2011-03-31T19:01:01.373" Comment="Proposed by 3588 approved by 51 edit id of 196" />
  <row Id="22026" PostHistoryTypeId="5" PostId="10486" RevisionGUID="0cf06d6e-9abf-4e26-b4ad-03721186c586" CreationDate="2011-03-31T19:01:05.663" UserId="3588" Comment="added 349 characters in body" Text="Aiming affects the accuracy of attacks, so good aim has a very strong impact. This is not limited to direct aim and can also refer to calculating ballistic arcs to strike a specific point. Questions under this tag deal with both the player's capacity to aim their shots, as well as how non-playable entities determine and focus on their own targets." />
  <row Id="22027" PostHistoryTypeId="24" PostId="10486" RevisionGUID="0cf06d6e-9abf-4e26-b4ad-03721186c586" CreationDate="2011-03-31T19:01:05.663" Comment="Proposed by 3588 approved by 51 edit id of 195" />
  <row Id="22028" PostHistoryTypeId="6" PostId="10343" RevisionGUID="05beb65a-dd13-48f5-a299-e6cd74afc457" CreationDate="2011-03-31T19:01:11.700" UserId="3588" Comment="Removed the specific genres since this is a general question; also removed the sketchy [search] tag which doesn't match any of the other uses of the tag. ♪" Text="&lt;game-industry&gt;&lt;jobs&gt;" />
  <row Id="22029" PostHistoryTypeId="24" PostId="10343" RevisionGUID="05beb65a-dd13-48f5-a299-e6cd74afc457" CreationDate="2011-03-31T19:01:11.700" Comment="Proposed by 3588 approved by 51 edit id of 209" />
  <row Id="22030" PostHistoryTypeId="5" PostId="10489" RevisionGUID="6795b19b-04e9-4ef6-8bbd-e76259532f2a" CreationDate="2011-03-31T19:01:16.943" UserId="3588" Comment="added 143 characters in body" Text="Any part of an object or graphic that light does not fully reflect off of, and thus can be seen through. Also applies to translucency effects. " />
  <row Id="22031" PostHistoryTypeId="24" PostId="10489" RevisionGUID="6795b19b-04e9-4ef6-8bbd-e76259532f2a" CreationDate="2011-03-31T19:01:16.943" Comment="Proposed by 3588 approved by 51 edit id of 198" />
  <row Id="22032" PostHistoryTypeId="5" PostId="10488" RevisionGUID="561dbd91-93a8-4142-b47a-c1bc023bdace" CreationDate="2011-03-31T19:01:22.730" UserId="3588" Comment="added 732 characters in body" Text="As a designer term, transparency is used to refer to both full transparency, in which light fully passes through, and partial transparency, in which light only partially passes through. In games, it thus simply refers to any ability to see through an object onto objects that are further in the background, colorized or not.&#xD;&#xA;&#xD;&#xA;In 2D games, transparency is used not just for actual materials, but also to represent empty space, due to how sprite images are stored. In 3D games, empty space transparency is a default, so the term instead applies more to physical models, whole or in part, which can be seen through.&#xD;&#xA;&#xD;&#xA;Questions with this tag handle the various techniques and implementations of transparency in both 2D and 3D games." />
  <row Id="22033" PostHistoryTypeId="24" PostId="10488" RevisionGUID="561dbd91-93a8-4142-b47a-c1bc023bdace" CreationDate="2011-03-31T19:01:22.730" Comment="Proposed by 3588 approved by 51 edit id of 197" />
  <row Id="22034" PostHistoryTypeId="5" PostId="10498" RevisionGUID="f9e63ec1-c68e-46d1-b74c-a7a65f6903bf" CreationDate="2011-03-31T19:01:25.740" UserId="3588" Comment="added 177 characters in body" Text="A game which eschews the use of graphics and instead relies on text to descriptively illustrate the world. Often involves parsing text input from the player to determine action." />
  <row Id="22035" PostHistoryTypeId="24" PostId="10498" RevisionGUID="f9e63ec1-c68e-46d1-b74c-a7a65f6903bf" CreationDate="2011-03-31T19:01:25.740" Comment="Proposed by 3588 approved by 51 edit id of 204" />
  <row Id="22037" PostHistoryTypeId="5" PostId="10497" RevisionGUID="dc694b8a-d846-46ef-99a6-a4480853031f" CreationDate="2011-03-31T19:01:28.160" UserId="3588" Comment="added 536 characters in body" Text="Text based games have their own unique feature because nothing is represented graphically, and so it plays more like reading a book. As such, there is a larger focus on the colorful detail of words to describe the expansive world of the game and its eccentric denizens. Or not, if all you need to do is shoot into one of 20 rooms to hit a Wumpus.&#xD;&#xA;&#xD;&#xA;Use this tag when your question is about a text-based game you are developing. This tag **does not** apply to games which use ASCII text to illustrate the game world, such as in *Rogue*." />
  <row Id="22038" PostHistoryTypeId="24" PostId="10497" RevisionGUID="dc694b8a-d846-46ef-99a6-a4480853031f" CreationDate="2011-03-31T19:01:28.160" Comment="Proposed by 3588 approved by 51 edit id of 203" />
  <row Id="22039" PostHistoryTypeId="5" PostId="10495" RevisionGUID="dc632c86-cae2-4e33-aa62-4341ad1b4526" CreationDate="2011-03-31T19:01:31.140" UserId="3588" Comment="added 124 characters in body" Text="You're reading text right now. Characters representing primarily letters and numbers, usually arranged to present a message." />
  <row Id="22040" PostHistoryTypeId="24" PostId="10495" RevisionGUID="dc632c86-cae2-4e33-aa62-4341ad1b4526" CreationDate="2011-03-31T19:01:31.140" Comment="Proposed by 3588 approved by 51 edit id of 202" />
  <row Id="22041" PostHistoryTypeId="5" PostId="10494" RevisionGUID="4f29f699-149b-46a5-9316-6ad9cd878180" CreationDate="2011-03-31T19:01:33.463" UserId="3588" Comment="added 377 characters in body" Text="Text presents special issues to game developers because one has to account for both visibility *and* readability. It refers to text that is meant to be read by the *player*, not by in-game entities. Can be used in menus, to represent dialogue, or as parts of the world like in signs.&#xD;&#xA;&#xD;&#xA;Questions with this tag deal with how to store, manage, and render text in the game world." />
  <row Id="22042" PostHistoryTypeId="24" PostId="10494" RevisionGUID="4f29f699-149b-46a5-9316-6ad9cd878180" CreationDate="2011-03-31T19:01:33.463" Comment="Proposed by 3588 approved by 51 edit id of 201" />
  <row Id="22043" PostHistoryTypeId="5" PostId="10491" RevisionGUID="1ee02709-3778-4092-b748-ed5270d6078a" CreationDate="2011-03-31T19:01:36.443" UserId="3588" Comment="added 143 characters in body" Text="Dark spaces cast by the presence of a solid object blocking the flow of light. Often helpful for telling where your character is going to land." />
  <row Id="22044" PostHistoryTypeId="24" PostId="10491" RevisionGUID="1ee02709-3778-4092-b748-ed5270d6078a" CreationDate="2011-03-31T19:01:36.443" Comment="Proposed by 3588 approved by 51 edit id of 200" />
  <row Id="22045" PostHistoryTypeId="5" PostId="10490" RevisionGUID="9dafbc34-a511-4ab5-ba20-07732a06160d" CreationDate="2011-03-31T19:01:38.313" UserId="3588" Comment="added 502 characters in body" Text="Shadows are an interesting tool, in that they are an absence that indicates a presence. They serve as a very subtle but powerful tool to a designer. In games, shadows can be used to help assert the position of entities, warn players of incoming danger, or give important story clues.&#xD;&#xA;&#xD;&#xA;Questions with this tag deal with both real simulation of shadows via light projection (as in most 3D games), as well as faux simulation done without actual light systems (such as might be done for a 2D platformer)." />
  <row Id="22046" PostHistoryTypeId="24" PostId="10490" RevisionGUID="9dafbc34-a511-4ab5-ba20-07732a06160d" CreationDate="2011-03-31T19:01:38.313" Comment="Proposed by 3588 approved by 51 edit id of 199" />
  <row Id="22047" PostHistoryTypeId="5" PostId="10500" RevisionGUID="99ee6a24-6466-424a-9bb7-078acb001880" CreationDate="2011-03-31T19:01:40.733" UserId="3588" Comment="added 109 characters in body" Text="A turn-based exploration game with high degrees of random generation. Can be categorized as a subset of RPGs." />
  <row Id="22048" PostHistoryTypeId="24" PostId="10500" RevisionGUID="99ee6a24-6466-424a-9bb7-078acb001880" CreationDate="2011-03-31T19:01:40.733" Comment="Proposed by 3588 approved by 51 edit id of 206" />
  <row Id="22049" PostHistoryTypeId="5" PostId="10499" RevisionGUID="54ad9b38-37c5-46d0-8b5d-a757bd8b08c7" CreationDate="2011-03-31T19:01:43.183" UserId="3588" Comment="added 1643 characters in body" Text="Roguelikes are games inspired from the game [*Rogue*](http://en.wikipedia.org/wiki/Rogue_(computer_game)). They share many of the same qualities as many RPGs, including stat systems, character creation, and item usage. Beyond that, the most symbolic factors of a roguelike are **random generation**, **turn-based action**, and **permanent death**.&#xD;&#xA;&#xD;&#xA; - **Random Generation** is a staple in many games, but Roguelikes will randomly generate almost the entirety of their worlds as a defining factor. At basic, the dungeons are randomly generated, as well as the nature of various items. As such, they boast high replayability.&#xD;&#xA; - **Turn-Based Action** is the second core aspect of Roguelikes. To accomodate for often-times very high difficulty and extremely complex problems, Roguelikes are turn-based to allow the player to deeply think about all options available. The entire game world operates on a turn-by-turn basis, though the strict method may vary between the specific game.&#xD;&#xA; - **Permanent Death** is one of the most well-known aspects of Roguelikes. When the player encounters a grim fate, the save file is deleted, disallowing any attempt to retry with that same character. It is extremely common in most, although some will opt for slightly less severe penalties such as stripping your character of every piece of equipment, or reducing the character to level 1. &#xD;&#xA;&#xD;&#xA;Use this tag if you're having questions or problems while developing a roguelike game of your own.&#xD;&#xA;&#xD;&#xA;&lt;!-- See also: [What attributes makes a game a roguelike?](http://gaming.stackexchange.com/questions/5195/what-attributes-makes-a-game-a-roguelike/5198#5198) --&gt;" />
  <row Id="22050" PostHistoryTypeId="24" PostId="10499" RevisionGUID="54ad9b38-37c5-46d0-8b5d-a757bd8b08c7" CreationDate="2011-03-31T19:01:43.183" Comment="Proposed by 3588 approved by 51 edit id of 205" />
  <row Id="22051" PostHistoryTypeId="5" PostId="10485" RevisionGUID="ab69d13b-d925-4649-86ff-f8f09bd33e2a" CreationDate="2011-03-31T19:01:46.317" UserId="3588" Comment="added 102 characters in body" Text="The hiring of third-party developers or organizations to handle certain parts of a game's development." />
  <row Id="22052" PostHistoryTypeId="24" PostId="10485" RevisionGUID="ab69d13b-d925-4649-86ff-f8f09bd33e2a" CreationDate="2011-03-31T19:01:46.317" Comment="Proposed by 3588 approved by 51 edit id of 194" />
  <row Id="22053" PostHistoryTypeId="5" PostId="10484" RevisionGUID="43dfc553-dd89-41ad-a409-27635fe1f297" CreationDate="2011-03-31T19:01:47.567" UserId="3588" Comment="added 430 characters in body" Text="Due to personnel or location constraints, it may not be possible to accomplish all of the necessary tasks to develop a full game using only one company's power. Outsourcing specific tasks, such as artwork or audio, to an external studio can help expedite development without overtaxing what the company can produce on its own.&#xD;&#xA;&#xD;&#xA;Questions with this tag deal with outsourcing concerns such as pricing, licensing, and availability." />
  <row Id="22054" PostHistoryTypeId="24" PostId="10484" RevisionGUID="43dfc553-dd89-41ad-a409-27635fe1f297" CreationDate="2011-03-31T19:01:47.567" Comment="Proposed by 3588 approved by 51 edit id of 193" />
  <row Id="22055" PostHistoryTypeId="5" PostId="10504" RevisionGUID="927c0e41-5445-47e0-a65e-2e05a3dfefd2" CreationDate="2011-03-31T19:01:49.203" UserId="3588" Comment="added 118 characters in body" Text="Translation, editing, and other modifications done when a game is being adapted for an audience of a different locale." />
  <row Id="22056" PostHistoryTypeId="24" PostId="10504" RevisionGUID="927c0e41-5445-47e0-a65e-2e05a3dfefd2" CreationDate="2011-03-31T19:01:49.203" Comment="Proposed by 3588 approved by 51 edit id of 211" />
  <row Id="22057" PostHistoryTypeId="5" PostId="10503" RevisionGUID="4d32c73c-02b3-4690-8cfc-91224473850a" CreationDate="2011-03-31T19:01:50.687" UserId="3588" Comment="added 368 characters in body" Text="Most games are written with the intent of one locale's audience. Localization, either on the part of the game developer or a third-party group, allows gamers from around the world to enjoy the experience of that game.&#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag deal with how to prepare for localization, what tasks must be done, and the reasons one might invest in it." />
  <row Id="22058" PostHistoryTypeId="24" PostId="10503" RevisionGUID="4d32c73c-02b3-4690-8cfc-91224473850a" CreationDate="2011-03-31T19:01:50.687" Comment="Proposed by 3588 approved by 51 edit id of 210" />
  <row Id="22059" PostHistoryTypeId="5" PostId="10502" RevisionGUID="7678b5da-e34a-4085-81f0-e9fa1fd140eb" CreationDate="2011-03-31T19:01:52.060" UserId="3588" Comment="added 146 characters in body" Text="A collection of text characters according to the size and style of a particular typeface. Often used as shorthand when referring to said typeface." />
  <row Id="22060" PostHistoryTypeId="24" PostId="10502" RevisionGUID="7678b5da-e34a-4085-81f0-e9fa1fd140eb" CreationDate="2011-03-31T19:01:52.060" Comment="Proposed by 3588 approved by 51 edit id of 208" />
  <row Id="22061" PostHistoryTypeId="5" PostId="10501" RevisionGUID="5c4ff9eb-9ba0-4e82-abfb-fac8e294dcb5" CreationDate="2011-03-31T19:01:53.510" UserId="3588" Comment="added 293 characters in body" Text="A font determines how [tag:text] is rendered, when it is not a direct element of an image. Fonts can be used to distinguish important elements, or also as a creative device in the story.&#xD;&#xA;&#xD;&#xA;Questions dealing with the selection and utility of fonts in a game fall under the purview of this tag." />
  <row Id="22062" PostHistoryTypeId="24" PostId="10501" RevisionGUID="5c4ff9eb-9ba0-4e82-abfb-fac8e294dcb5" CreationDate="2011-03-31T19:01:53.510" Comment="Proposed by 3588 approved by 51 edit id of 207" />
  <row Id="22063" PostHistoryTypeId="2" PostId="10506" RevisionGUID="e09daa81-cb89-4705-a103-22a584e2ba01" CreationDate="2011-03-31T19:15:29.457" UserId="3794" Text="This is typical problem called *shadow map acne*. It is caused because of the projected pixel of the shadow map(depth) is bigger than pixel on the screen (eq. cannot represent depth correctly). &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;There are plenty of solutions to this. First most easy is bias (i see it in your code, so that is not the problem). And second easy solution is shadow map in bigger resolution, it is really more than typical to have shadowmaps in resolution 2048x2048 on current hw. &#xD;&#xA;&#xD;&#xA;Some resources to study more advanced techniques.&#xD;&#xA;&#xD;&#xA; - [Common Techniques to Improve Shadow Depth Maps][2]&#xD;&#xA; - [Gradient shadow maps][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/STCj0.jpg&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee416324%28v=vs.85%29.aspx&#xD;&#xA;  [3]: http://www.slideshare.net/ohyecloudy/42-eliminating-surface-acne-with-gradient-shadow-mapping" />
  <row Id="22064" PostHistoryTypeId="2" PostId="10507" RevisionGUID="140d9810-5817-4be0-9406-e938763e3923" CreationDate="2011-03-31T19:26:41.990" UserId="4129" Text="[Glest][1] uses OpenGL.  You could port it to the iPhone.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glest.org/glest_board/" />
  <row Id="22065" PostHistoryTypeId="2" PostId="10508" RevisionGUID="5fdc44e2-d6aa-4794-9a8e-dbb12a877143" CreationDate="2011-03-31T19:39:10.310" UserId="4604" Text="Well, if you have access to VBO's, you have access to some version of the GLSL shading lang. A vertex shader for manipulating texture coordinates would do what you are asking with minimal performance impact, but it might require a significant change in your rendering system if you are currently using the fixed-function pipeline.&#xD;&#xA;&#xD;&#xA;I would go with c0d3rguy's suggestion and try using the VBO that might be updated as a GL_STREAM_DRAW or GL_DYNAMIC_DRAW and see what the performance impact is. It might prove to work just fine" />
  <row Id="22066" PostHistoryTypeId="2" PostId="10509" RevisionGUID="8d08b941-7ff2-4b26-b81e-ca69e54dba9c" CreationDate="2011-03-31T20:23:20.967" UserId="-1" Text="" />
  <row Id="22067" PostHistoryTypeId="2" PostId="10510" RevisionGUID="9dccdcb4-c074-4641-8ce8-8fd8edcf34d6" CreationDate="2011-03-31T20:23:20.967" UserId="-1" Text="" />
  <row Id="22068" PostHistoryTypeId="2" PostId="10511" RevisionGUID="11960cbd-7ae7-4962-bffc-8ef3d3ccb886" CreationDate="2011-03-31T20:26:37.970" UserId="-1" Text="" />
  <row Id="22069" PostHistoryTypeId="2" PostId="10512" RevisionGUID="032e56e3-7b5a-464d-9751-859bb5837fee" CreationDate="2011-03-31T20:26:37.970" UserId="-1" Text="" />
  <row Id="22070" PostHistoryTypeId="2" PostId="10513" RevisionGUID="5356254e-3866-4bbf-a683-22a747bd525c" CreationDate="2011-03-31T20:27:33.537" UserId="-1" Text="" />
  <row Id="22071" PostHistoryTypeId="2" PostId="10514" RevisionGUID="c6fe1f29-33b6-4eb0-b55e-f09228c05ffb" CreationDate="2011-03-31T20:27:33.537" UserId="-1" Text="" />
  <row Id="22072" PostHistoryTypeId="25" PostId="10480" RevisionGUID="6180c8d0-3964-4849-9a68-ed272e29e263" CreationDate="2011-03-31T21:00:20.740" Comment="http://twitter.com/#!/StackGameDev/status/53562294189305856" />
  <row Id="22073" PostHistoryTypeId="2" PostId="10515" RevisionGUID="9d7afe6e-5818-4f13-bd52-93552a1b0c32" CreationDate="2011-03-31T21:02:13.907" UserId="5685" Text="Well, you went with 2D eventually so this is purely theoretical at this point :) This is how I'd go about, as you put it, getting rid of one dimension :)&#xD;&#xA;&#xD;&#xA;First, you need to project 3d mesh onto a 2d plane. I see two ways of doing that:&#xD;&#xA;&#xD;&#xA;- if your projection is exactly aligned with either angle you just ignore that coordinate&#xD;&#xA;&#xD;&#xA;- if it's not you can set up a projection matrix and use it to 'project to screen', ignoring the depth coordinate (this of course would work for the above case as well)&#xD;&#xA;&#xD;&#xA;Then, you'd need to build a shape outline while going through all the faces. Working with faces allows you to have a concave outline by constructing a CSG sum of all projected triangles (this would be slow but then you'd be doing that on startu or it can even be preprocessed offline). If a convex outline would be OK then you need to build a convex hull. Last, optional step, would be to simplify the silhouette to make the collision detection faster.&#xD;&#xA;&#xD;&#xA;Once you have your outline it's a simple matter of seeing if any of the edges intersect or one object is contained within the other." />
  <row Id="22074" PostHistoryTypeId="5" PostId="10444" RevisionGUID="24c99fe1-c6e8-4306-b3f9-9fe1f6f455c2" CreationDate="2011-03-31T21:04:14.903" UserId="51" Comment="added 670 characters in body" Text="I want to resize my texture. I am using cubemap to compute reflection. I want to use this cubemap to draw skybox. Skybox is drawn but I want to resize texture down, because it is dilated. As I wrote in my previous question ([question][1]), to draw skybox I use shaders:&#xD;&#xA;&#xD;&#xA;    //vertex shader        &#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;          uniform mat4 projectionMatrix;&#xD;&#xA;                                                          &#xD;&#xA;            attribute vec4 position;&#xD;&#xA;            varying mediump vec4 texCoord;&#xD;&#xA;            void main() {&#xD;&#xA;                texCoord = position;&#xD;&#xA;                gl_Position = projectionMatrix * modelViewMatrix * position;&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    //fragment shader&#xD;&#xA;    uniform samplerCube Sampler;&#xD;&#xA;         &#xD;&#xA;        varying mediump vec4 texCoord;&#xD;&#xA;                                                        &#xD;&#xA;         void main() {&#xD;&#xA;             mediump vec3 cube = vec3(textureCube(Sampler, texCoord.xyz));&#xD;&#xA;             gl_FragColor = vec4(cube, 1.0);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;I send this data:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    float vertices[24] = {	&#xD;&#xA;    	-1.0, -1.0,  1.0,&#xD;&#xA;        1.0, -1.0,  1.0,&#xD;&#xA;        -1.0,  1.0,  1.0,&#xD;&#xA;        1.0,  1.0,  1.0,&#xD;&#xA;        -1.0, -1.0, -1.0,&#xD;&#xA;        1.0, -1.0, -1.0,&#xD;&#xA;        -1.0,  1.0, -1.0,&#xD;&#xA;        1.0,  1.0, -1.0,&#xD;&#xA;    	};&#xD;&#xA;In this order to draw cube:&#xD;&#xA;&#xD;&#xA;    GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};&#xD;&#xA;&#xD;&#xA;I think, that main problem is in the vertex shader, where I use vertex data as texture coord. But I have no idea how to map vertexes to cube map texture coordinates. Can you help me?&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;Edit: &#xD;&#xA;It is strange, but when I multiply modelviewMatrix with projectionMatrix it does not work.&#xD;&#xA;Now my code is:&#xD;&#xA;&#xD;&#xA;        uniform mat4 modelViewMatrix;&#xD;&#xA;      uniform mat4 projectionMatrix;&#xD;&#xA;                                                      &#xD;&#xA;        attribute vec4 position;&#xD;&#xA;        varying mediump vec4 texCoord;&#xD;&#xA;        void main() {&#xD;&#xA;            &#xD;&#xA;            gl_Position = projectionMatrix * modelViewMatrix * position;&#xD;&#xA;            texCoord = modelViewMatrix * (gl_Position);&#xD;&#xA;        }&#xD;&#xA;I have attached the screenshot, it looks quite good. Maybe it is distorted, because of the aspect ratio:&#xD;&#xA;![screen][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10217/how-do-i-create-a-sky-box-with-opengl-es-2-0&#xD;&#xA;&#xD;&#xA;  [2]: http://i.stack.imgur.com/WcUvB.jpg&#xD;&#xA;" />
  <row Id="22076" PostHistoryTypeId="5" PostId="10512" RevisionGUID="cc8549ba-01f2-4f3a-8aa2-1b7bdf66b762" CreationDate="2011-03-31T21:05:00.143" UserId="382" Comment="added 101 characters in body" Text="C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language." />
  <row Id="22077" PostHistoryTypeId="24" PostId="10512" RevisionGUID="cc8549ba-01f2-4f3a-8aa2-1b7bdf66b762" CreationDate="2011-03-31T21:05:00.143" Comment="Proposed by 382 approved by 51 edit id of 215" />
  <row Id="22078" PostHistoryTypeId="5" PostId="10510" RevisionGUID="e8955ab7-059c-44b7-8548-ba7514ed1878" CreationDate="2011-03-31T21:05:06.570" UserId="382" Comment="added 121 characters in body" Text="Silverlight is Microsoft's cross-browser, cross platform plug-in for media experiences and rich interactive applications." />
  <row Id="22079" PostHistoryTypeId="24" PostId="10510" RevisionGUID="e8955ab7-059c-44b7-8548-ba7514ed1878" CreationDate="2011-03-31T21:05:06.570" Comment="Proposed by 382 approved by 51 edit id of 213" />
  <row Id="22080" PostHistoryTypeId="5" PostId="10509" RevisionGUID="debdec44-45b1-4b37-bc8a-70677b3cab13" CreationDate="2011-03-31T21:05:15.323" UserId="382" Comment="added 1418 characters in body" Text="Microsoft Silverlight is an application framework for writing and running rich Internet applications with emphasis on multimedia, animations, and graphics, with features and purposes similar to those of Adobe Flash. The run-time environment for Silverlight is available as a plug-in for most web browsers. While early versions of Silverlight focused on streaming media, current versions support multimedia, graphics and animation, and give developers support for CLI languages and development tools.&#xD;&#xA;&#xD;&#xA;It is the standard for writing Windows Phone 7 applications and is being promoted for Line of Business (LoB) applications.&#xD;&#xA;&#xD;&#xA;**Platforms Supported**&#xD;&#xA;&#xD;&#xA; - Silverlight 4 for Window (Chrome, Firefox, IE 6-9) &amp; Mac (Firefox, Safari)&#xD;&#xA; - Windows Phone 7&#xD;&#xA;&#xD;&#xA;**Links**&#xD;&#xA;&#xD;&#xA; - [Microsoft Silverlight][1]&#xD;&#xA; - [Silverlight.net][2] Community Site&#xD;&#xA; - [Moonlight][3] Open Source Silverlight Implementation&#xD;&#xA;&#xD;&#xA;**Development &amp; Design Tools**&#xD;&#xA;&#xD;&#xA; - [Microsoft Visual Studio 2010][4] for developers&#xD;&#xA; - [Microsoft Expression Blend 4][5] for designers&#xD;&#xA; - [Windows Phone 7 Tools][6] for developers and designers&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/silverlight/&#xD;&#xA;  [2]: http://silverlight.net&#xD;&#xA;  [3]: http://www.mono-project.com/Moonlight&#xD;&#xA;  [4]: http://www.microsoft.com/visualstudio/en-us/&#xD;&#xA;  [5]: http://www.microsoft.com/expression/products/StudioUltimate_Overview.aspx&#xD;&#xA;  [6]: http://create.msdn.com/en-us/home/getting_started" />
  <row Id="22081" PostHistoryTypeId="24" PostId="10509" RevisionGUID="debdec44-45b1-4b37-bc8a-70677b3cab13" CreationDate="2011-03-31T21:05:15.323" Comment="Proposed by 382 approved by 51 edit id of 212" />
  <row Id="22082" PostHistoryTypeId="5" PostId="10514" RevisionGUID="40ddf337-b18e-45b6-83d6-c12dd54fb13f" CreationDate="2011-03-31T21:05:19.190" UserId="382" Comment="added 460 characters in body" Text="OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering.&#xD;&#xA;Currently, OpenGL is used for applications like CAD software and computer games. It is also cross-platform. The OpenGL standard is controlled by the Khronos group, which also controls OpenGL ES." />
  <row Id="22083" PostHistoryTypeId="24" PostId="10514" RevisionGUID="40ddf337-b18e-45b6-83d6-c12dd54fb13f" CreationDate="2011-03-31T21:05:19.190" Comment="Proposed by 382 approved by 51 edit id of 217" />
  <row Id="22084" PostHistoryTypeId="5" PostId="10513" RevisionGUID="8779ea90-2253-4495-8edc-da3041a38b71" CreationDate="2011-03-31T21:05:23.513" UserId="382" Comment="added 569 characters in body" Text="**Advice:** When posting in the `opengl` tag, remember to always specify your target OpenGL version in order to get more precise answers.&#xD;&#xA;&#xD;&#xA;### External resources ###&#xD;&#xA;- [OpenGL.org][1] - the home of OpenGL.&#xD;&#xA;- [The OpenGL Registry][2] is the source for OpenGL headers and specifications.&#xD;&#xA;- [The Khronos group][3], the consortium that controls the OpenGL standard.&#xD;&#xA;- [MechCore Wiki][4], a wiki with a modern OpenGL FAQ, and code samples.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/&#xD;&#xA;[2]: http://www.opengl.org/registry&#xD;&#xA;[3]: http://www.khronos.org/&#xD;&#xA;[4]: http://www.mechcore.net/" />
  <row Id="22085" PostHistoryTypeId="24" PostId="10513" RevisionGUID="8779ea90-2253-4495-8edc-da3041a38b71" CreationDate="2011-03-31T21:05:23.513" Comment="Proposed by 382 approved by 51 edit id of 216" />
  <row Id="22086" PostHistoryTypeId="5" PostId="10511" RevisionGUID="f7eee62d-21aa-451b-aeb9-e9a36905a612" CreationDate="2011-03-31T21:05:30.050" UserId="382" Comment="added 4622 characters in body" Text="&lt;sup&gt;[Above excerpt quoted from [Wikipedia][1].]&lt;/sup&gt;&#xD;&#xA;&lt;!--&#xD;&#xA;NOTE: The excerpt doesn't accept some markup and including the WP link there seemed out of place.  The above blurb is a temporary compromise, because I'd rather not use WP's first sentence and split the quote, while including the first sentence twice (once in excerpt, once in body with attribution) is redundant.  Can someone come up with an even better sentence for the excerpt that we had?  Or should we just split off that first sentence and not provide attribution?  (It is small enough.)  Linking to WP in the below lists could be done, or perhaps that &quot;middle-level&quot; bit could be expanded into a paragraph?&#xD;&#xA;--!&gt;&#xD;&#xA;&#xD;&#xA;### New to C++?&#xD;&#xA;&#xD;&#xA;Welcome!  Whether you are new to programming or are coming to C++ from another programming language, it is highly recommended to have a [good book](http://stackoverflow.com/questions/388242/) from which to learn the language.&#xD;&#xA;&#xD;&#xA;If you are looking for a good compiler, [g++](http://gcc.gnu.org/) is the most commonly used compiler on Linux and other platforms, while [Microsoft Visual C++](http://msdn.microsoft.com/en-us/visualc/ee340952.aspx) is the most commonly used on Windows.  We also have a [list of toolsets](http://stackoverflow.com/questions/1128050/best-operating-system-for-c-development-and-learning).&#xD;&#xA;&#xD;&#xA;[Join us in chat](http://chat.stackoverflow.com/rooms/10/), where we discuss C++, programming in general, and even other stuff when the sun goes down and boredom creeps in.  Don't forget your sense of humor, but keep it civilized.&#xD;&#xA;&#xD;&#xA;### C++0x&#xD;&#xA;The language standard has remained pretty much the same for a long time, but the new standard C++0x has now been defined. Rather than a &quot;big bang&quot; approach, it is being rolled out gradually as compilers are supporting the new language features. See the [C++0x FAQ](http://www2.research.att.com/~bs/C++0xFAQ.html) to see what is new in the language, and check your own compilers FAQs to see which of those features are currently supported.&#xD;&#xA;&#xD;&#xA;### Have a Question?&#xD;&#xA;&#xD;&#xA;When you ask a question, be sure to include any relevant source code. Try to keep the code as minimalist as possible while still reproducing the problem; often the problem will be found during the process. Try to make sure that the source code compiles, if possible. However, if there are any compiler errors, be sure to indicate:&#xD;&#xA;&#xD;&#xA; * which compiler you are using&#xD;&#xA; * exactly what the errors are and&#xD;&#xA; * on which lines they occur (mark the lines with comment)&#xD;&#xA;&#xD;&#xA;### Stack Overflow's C++ FAQ&#xD;&#xA;&#xD;&#xA;We've recently started an effort to create a list of C++ questions frequently asked on Stack Overflow. You can reach them using the [tag:c++-faq]. &#xD;&#xA;&#xD;&#xA;### External FAQs&#xD;&#xA;&#xD;&#xA; - [C++ FAQ Lite][2]: frequently asked C++ questions&#xD;&#xA; - [C++ Templates FAQ][3]&#xD;&#xA; - [Comeau C++ Template FAQ][4]&#xD;&#xA; - [Bjarne Stroustrup's C++ Style and Technique FAQ][5]&#xD;&#xA;&#xD;&#xA;### On C++0x&#xD;&#xA; - [Bjarne Stroustrup's C++0x FAQ][6]&#xD;&#xA;&#xD;&#xA;### Other External Resources&#xD;&#xA;&#xD;&#xA;&lt;!--&#xD;&#xA;NOTE: This has been discussed many times in comments and answers and in the C++ chat room:  cplusplus.com is of generally poor quality and has abysmal examples and really should not be listed here as a recommended website, especially not at the top of the list.&#xD;&#xA;--!&gt;&#xD;&#xA;&#xD;&#xA; - [ISO's C++ Standards Committee's Papers][8]&#xD;&#xA; - [Guru of the Week][9]: article series on high-quality, exception-safe C++ code&#xD;&#xA; - SGI's [Standard Template Library Programmer's Guide][10]&#xD;&#xA; - [More C++ Idioms][11]&#xD;&#xA; - [What Every Computer Scientist Should Know About Floating-Point Arithmetic](http://docs.sun.com/source/806-3568/ncg_goldberg.html)&#xD;&#xA;&#xD;&#xA;### Third party code&#xD;&#xA;&#xD;&#xA; - [Boost C++ Libraries](http://stackoverflow.com/tags/boost/info)&#xD;&#xA;&#xD;&#xA;### General Posts on Stack Overflow&#xD;&#xA;&#xD;&#xA; - [Where do I find the current C or C++ standard documents?](http://stackoverflow.com/q/81656/54262)&#xD;&#xA; - [The Definitive C++ Book Guide and List][12]&#xD;&#xA; - [C++ Blogs][13]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/C%2B%2B&#xD;&#xA;  [2]: http://www.parashift.com/c++-faq-lite/&#xD;&#xA;  [3]: http://womble.decadent.org.uk/c++/template-faq.html&#xD;&#xA;  [4]: http://www.comeaucomputing.com/techtalk/templates/&#xD;&#xA;  [5]: http://www2.research.att.com/~bs/bs_faq2.html&#xD;&#xA;  [6]: http://www2.research.att.com/~bs/C++0xFAQ.html&#xD;&#xA;  [7]: http://www.cplusplus.com/&#xD;&#xA;  [8]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/&#xD;&#xA;  [9]: http://www.gotw.ca/gotw/&#xD;&#xA;  [10]: http://www.sgi.com/tech/stl/&#xD;&#xA;  [11]: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms&#xD;&#xA;  [12]: http://stackoverflow.com/questions/388242/the-definitive-c++-book-guide-and-list&#xD;&#xA;  [13]: http://stackoverflow.com/questions/151974/c++-blogs-that-you-regularly-follow" />
  <row Id="22087" PostHistoryTypeId="24" PostId="10511" RevisionGUID="f7eee62d-21aa-451b-aeb9-e9a36905a612" CreationDate="2011-03-31T21:05:30.050" Comment="Proposed by 382 approved by 51 edit id of 214" />
  <row Id="22088" PostHistoryTypeId="6" PostId="513" RevisionGUID="2f751d93-e1d8-4c6c-ac0e-a170936f7570" CreationDate="2011-03-31T21:12:23.960" UserId="51" Comment="edited tags" Text="&lt;c++&gt;" />
  <row Id="22089" PostHistoryTypeId="6" PostId="645" RevisionGUID="623318db-0901-416e-8a09-3f631b8645a2" CreationDate="2011-03-31T21:12:58.530" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;compatibility&gt;" />
  <row Id="22090" PostHistoryTypeId="6" PostId="728" RevisionGUID="6028a25a-629d-4d37-b8c3-344edc65ad9a" CreationDate="2011-03-31T21:13:12.537" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="22091" PostHistoryTypeId="6" PostId="731" RevisionGUID="e9baa35b-7429-4d5c-a593-5d55400d3568" CreationDate="2011-03-31T21:13:25.877" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;graphics&gt;&lt;cross-platform&gt;" />
  <row Id="22092" PostHistoryTypeId="6" PostId="801" RevisionGUID="807ab327-31eb-4b22-9c0d-86471705d164" CreationDate="2011-03-31T21:13:56.203" UserId="51" Comment="edited tags" Text="&lt;assets&gt;&lt;version-control&gt;&lt;asset-management&gt;" />
  <row Id="22093" PostHistoryTypeId="6" PostId="1050" RevisionGUID="6053fe5a-1751-4df5-9eec-bf852c4dc8a8" CreationDate="2011-03-31T21:14:21.400" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;methodology&gt;&lt;prototyping&gt;" />
  <row Id="22094" PostHistoryTypeId="6" PostId="1434" RevisionGUID="e9755526-f237-4fd1-a11a-1a79dc05443b" CreationDate="2011-03-31T21:14:40.353" UserId="51" Comment="edited tags" Text="&lt;animation&gt;&lt;sprites&gt;" />
  <row Id="22095" PostHistoryTypeId="2" PostId="10516" RevisionGUID="c822432f-e288-4a67-8119-d7d16ee47f28" CreationDate="2011-03-31T21:14:50.430" UserId="6455" Text="I'm looking for some advice. I want to create a commercial online fightning game with mainly 2d graphics and some 3d effects(finishers,special moves) like arcade games.&#xD;&#xA;&#xD;&#xA;Also I should be able to create a database where users can login and manage their accounts,&#xD;&#xA;Most importantly stats from within the game should be added to the users account.&#xD;&#xA;&#xD;&#xA;I already started with java, should I continue with it or do you guys recommend another language/software? &#xD;&#xA;" />
  <row Id="22096" PostHistoryTypeId="1" PostId="10516" RevisionGUID="c822432f-e288-4a67-8119-d7d16ee47f28" CreationDate="2011-03-31T21:14:50.430" UserId="6455" Text="What is the best language/software to create an online fighting game?" />
  <row Id="22097" PostHistoryTypeId="3" PostId="10516" RevisionGUID="c822432f-e288-4a67-8119-d7d16ee47f28" CreationDate="2011-03-31T21:14:50.430" UserId="6455" Text="&lt;2d&gt;&lt;3d&gt;&lt;java&gt;&lt;online&gt;&lt;browser-based-games&gt;" />
  <row Id="22098" PostHistoryTypeId="6" PostId="1500" RevisionGUID="6e914f56-c5cd-4d00-b484-761790352c00" CreationDate="2011-03-31T21:15:10.510" UserId="51" Comment="edited tags" Text="&lt;programming&gt;&lt;language-agnostic&gt;&lt;methodology&gt;" />
  <row Id="22099" PostHistoryTypeId="6" PostId="1505" RevisionGUID="ea403782-e510-4ef8-91e1-b3fba6b41927" CreationDate="2011-03-31T21:15:20.820" UserId="51" Comment="edited tags" Text="&lt;scripting&gt;&lt;lua&gt;&lt;extension&gt;" />
  <row Id="22100" PostHistoryTypeId="6" PostId="1542" RevisionGUID="3eadb503-c369-4b84-855c-286830f54262" CreationDate="2011-03-31T21:15:31.507" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;network&gt;" />
  <row Id="22101" PostHistoryTypeId="6" PostId="1557" RevisionGUID="0fbea99a-2949-4cfa-8a76-22f10ee3792b" CreationDate="2011-03-31T21:15:45.017" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;cross-platform&gt;&lt;indie&gt;" />
  <row Id="22102" PostHistoryTypeId="6" PostId="2073" RevisionGUID="a29b5952-3727-4ddd-a287-27ec3d952a05" CreationDate="2011-03-31T21:16:03.597" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;aspect-ratio&gt;" />
  <row Id="22103" PostHistoryTypeId="6" PostId="2084" RevisionGUID="7cdb10f3-b165-4823-aea6-73c3a472b739" CreationDate="2011-03-31T21:16:20.150" UserId="51" Comment="edited tags" Text="&lt;indie&gt;&lt;outsourcing&gt;&lt;productivity&gt;" />
  <row Id="22104" PostHistoryTypeId="6" PostId="2382" RevisionGUID="380394a3-5e2d-44f9-9088-4f21aa4a315d" CreationDate="2011-03-31T21:16:34.547" UserId="51" Comment="edited tags" Text="&lt;algorithm&gt;&lt;racing&gt;&lt;position&gt;" />
  <row Id="22105" PostHistoryTypeId="6" PostId="2578" RevisionGUID="1da67369-c74f-4181-98ec-8dc09a1ba245" CreationDate="2011-03-31T21:16:49.727" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;" />
  <row Id="22106" PostHistoryTypeId="6" PostId="2762" RevisionGUID="d9b137ad-29ae-4aeb-b0e3-22e50c4a47be" CreationDate="2011-03-31T21:17:02.817" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;" />
  <row Id="22107" PostHistoryTypeId="6" PostId="2921" RevisionGUID="c718522e-69e1-4bff-b90f-1adcb351f931" CreationDate="2011-03-31T21:17:15.797" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;unit-testing&gt;" />
  <row Id="22108" PostHistoryTypeId="6" PostId="3090" RevisionGUID="f0fc9c98-1f8c-49b1-b6d2-cfe2969e51e3" CreationDate="2011-03-31T21:17:30.257" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;algorithm&gt;&lt;simulations&gt;&lt;scalability&gt;" />
  <row Id="22109" PostHistoryTypeId="6" PostId="3332" RevisionGUID="6e76b115-aad1-4904-b58c-6adb0d00b405" CreationDate="2011-03-31T21:17:43.703" UserId="51" Comment="edited tags" Text="&lt;business&gt;" />
  <row Id="22110" PostHistoryTypeId="6" PostId="3349" RevisionGUID="db52297f-edc5-4dfe-9d0c-24d129156a06" CreationDate="2011-03-31T21:18:23.937" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;models&gt;" />
  <row Id="22111" PostHistoryTypeId="6" PostId="3374" RevisionGUID="0db0bb52-1120-441a-84cd-b0ceec14c542" CreationDate="2011-03-31T21:18:37.697" UserId="51" Comment="edited tags" Text="&lt;programming&gt;&lt;algorithm&gt;" />
  <row Id="22112" PostHistoryTypeId="6" PostId="3426" RevisionGUID="33b9c0a0-ea88-420f-955f-a50c65250ecb" CreationDate="2011-03-31T21:18:56.560" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;design-patterns&gt;&lt;language-agnostic&gt;&lt;project-management&gt;" />
  <row Id="22113" PostHistoryTypeId="6" PostId="3433" RevisionGUID="dcacafa6-b9b7-4b3c-8731-445419fb77d6" CreationDate="2011-03-31T21:19:41.473" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;resource-management&gt;" />
  <row Id="22114" PostHistoryTypeId="6" PostId="3492" RevisionGUID="c1e5a1d0-6499-4d44-9a3c-108f4a64687f" CreationDate="2011-03-31T21:19:58.757" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;" />
  <row Id="22115" PostHistoryTypeId="6" PostId="3493" RevisionGUID="f296e5fd-8d18-4ba8-bf8f-fa54fd917486" CreationDate="2011-03-31T21:20:14.543" UserId="51" Comment="edited tags" Text="&lt;unity&gt;&lt;ide&gt;" />
  <row Id="22116" PostHistoryTypeId="6" PostId="3679" RevisionGUID="77eca970-50fa-4af1-ad5f-31fd3149fad4" CreationDate="2011-03-31T21:20:36.073" UserId="51" Comment="edited tags" Text="&lt;2d&gt;&lt;programming&gt;" />
  <row Id="22117" PostHistoryTypeId="6" PostId="4107" RevisionGUID="dde9f7f3-786a-41eb-bef5-8402cf1ec940" CreationDate="2011-03-31T21:20:53.703" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;loading&gt;" />
  <row Id="22118" PostHistoryTypeId="6" PostId="4131" RevisionGUID="34137898-957c-4bdd-a7d1-0f375c0c8b8e" CreationDate="2011-03-31T21:21:04.950" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;state&gt;" />
  <row Id="22119" PostHistoryTypeId="6" PostId="4157" RevisionGUID="bd86ec7d-cb8d-41ac-a3b6-dad6d8d81a6c" CreationDate="2011-03-31T21:21:30.643" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;&lt;actionscript-3&gt;&lt;design-patterns&gt;" />
  <row Id="22120" PostHistoryTypeId="6" PostId="4239" RevisionGUID="ea457169-04d2-46fd-becb-2274264260fe" CreationDate="2011-03-31T21:21:41.330" UserId="51" Comment="edited tags" Text="&lt;multiplayer&gt;&lt;client-server&gt;&lt;silverlight&gt;" />
  <row Id="22121" PostHistoryTypeId="6" PostId="4374" RevisionGUID="6882bc57-7b21-4df6-b1eb-4e869275505e" CreationDate="2011-03-31T21:22:08.163" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;ai&gt;&lt;cover&gt;" />
  <row Id="22122" PostHistoryTypeId="6" PostId="4533" RevisionGUID="7b134507-2c9e-4e5b-a816-81aeb1e66112" CreationDate="2011-03-31T21:22:23.030" UserId="51" Comment="edited tags" Text="&lt;education&gt;" />
  <row Id="22123" PostHistoryTypeId="6" PostId="4960" RevisionGUID="2398f4c2-6eec-4df6-860c-859260da54ac" CreationDate="2011-03-31T21:22:36.540" UserId="51" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="22124" PostHistoryTypeId="6" PostId="4985" RevisionGUID="a0b79750-eb26-4d5a-b429-0f0f92127be9" CreationDate="2011-03-31T21:23:11.437" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;design-patterns&gt;" />
  <row Id="22125" PostHistoryTypeId="6" PostId="5074" RevisionGUID="e5f7c02b-280b-475a-a93d-9e965e9457f7" CreationDate="2011-03-31T21:23:49.410" UserId="51" Comment="edited tags" Text="&lt;business&gt;&lt;project-management&gt;&lt;planning&gt;" />
  <row Id="22126" PostHistoryTypeId="5" PostId="10516" RevisionGUID="acf8742f-df09-41b6-8f40-f5e3603ccbb0" CreationDate="2011-03-31T21:23:56.693" UserId="1198" Comment="dropped greeting, fixed spacing and caps" Text="I'm looking for some advice. I want to create a commercial online fightning game with mainly 2d graphics and some 3d effects (finishers, special moves) like arcade games.&#xD;&#xA;&#xD;&#xA;Also I should be able to create a database where users can login and manage their accounts,&#xD;&#xA;Most importantly stats from within the game should be added to the users account.&#xD;&#xA;&#xD;&#xA;I already started with Java, should I continue with it or do you guys recommend another language/software? &#xD;&#xA;" />
  <row Id="22127" PostHistoryTypeId="24" PostId="10516" RevisionGUID="acf8742f-df09-41b6-8f40-f5e3603ccbb0" CreationDate="2011-03-31T21:23:56.693" Comment="Proposed by 1198 approved by 51 edit id of 218" />
  <row Id="22128" PostHistoryTypeId="6" PostId="5633" RevisionGUID="049e3b94-0afb-4e7e-a161-2ec458cb54e2" CreationDate="2011-03-31T21:24:06.053" UserId="51" Comment="edited tags" Text="&lt;java&gt;&lt;multithreading&gt;&lt;rpg&gt;" />
  <row Id="22129" PostHistoryTypeId="6" PostId="5652" RevisionGUID="8041d58d-6eda-4aad-8e51-22a1a2a428dc" CreationDate="2011-03-31T21:24:16.367" UserId="51" Comment="edited tags" Text="&lt;web&gt;&lt;portfolio&gt;" />
  <row Id="22130" PostHistoryTypeId="6" PostId="5748" RevisionGUID="1cf52894-eddf-4758-a6c6-bc91b397c2aa" CreationDate="2011-03-31T21:24:36.210" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;design-patterns&gt;" />
  <row Id="22131" PostHistoryTypeId="6" PostId="9908" RevisionGUID="bdc7c5c5-f753-4a69-853f-48efe5cff198" CreationDate="2011-03-31T21:25:12.387" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;design-patterns&gt;&lt;framework&gt;" />
  <row Id="22132" PostHistoryTypeId="6" PostId="9692" RevisionGUID="9b7cd158-c6f6-456a-a926-f165e153c955" CreationDate="2011-03-31T21:25:26.647" UserId="51" Comment="edited tags" Text="&lt;engine&gt;&lt;architecture&gt;&lt;graphics-programming&gt;&lt;logic&gt;" />
  <row Id="22133" PostHistoryTypeId="5" PostId="9381" RevisionGUID="df29f432-4b75-49dd-b626-f7718f2136f1" CreationDate="2011-03-31T21:26:13.057" UserId="51" Comment="deleted 11 characters in body; edited tags" Text="I am trying to make my first Tile-game using XNA. I have no problem drawing the map layers using [TiledLib from codeplex][1], but, now I want to give sprite an (order) to move to a specific position on map, by selecting the sprite (left mouse click) and then right mouse click somewhere on the map to specify the target position. I don’t know what is the best practice to move sprite this way, considering that there may be collision objects in the direct path.&#xD;&#xA;&#xD;&#xA;What is the best practice to do this? Is there any demo covering this issue?&#xD;&#xA;&#xD;&#xA;BTW: I couldn’t upload snapshot because of my low score :(&#xD;&#xA;&#xD;&#xA;  [1]: http://tiledlib.codeplex.com/" />
  <row Id="22134" PostHistoryTypeId="6" PostId="9381" RevisionGUID="df29f432-4b75-49dd-b626-f7718f2136f1" CreationDate="2011-03-31T21:26:13.057" UserId="51" Comment="deleted 11 characters in body; edited tags" Text="&lt;xna&gt;&lt;game-design&gt;&lt;tiles&gt;" />
  <row Id="22135" PostHistoryTypeId="6" PostId="8801" RevisionGUID="fc811301-47a2-45ce-a9cc-3994e45cb426" CreationDate="2011-03-31T21:26:21.763" UserId="51" Comment="edited tags" Text="&lt;java&gt;&lt;tiles&gt;&lt;mobile&gt;" />
  <row Id="22136" PostHistoryTypeId="6" PostId="8732" RevisionGUID="742a2d0e-fa06-4a14-8017-99ee752c828b" CreationDate="2011-03-31T21:26:33.277" UserId="51" Comment="edited tags" Text="&lt;graphics-design&gt;" />
  <row Id="22137" PostHistoryTypeId="6" PostId="6466" RevisionGUID="264d15e5-0455-41d5-a00c-10c83ab5beec" CreationDate="2011-03-31T21:26:51.560" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;2d&gt;&lt;architecture&gt;" />
  <row Id="22138" PostHistoryTypeId="2" PostId="10517" RevisionGUID="5ffa1192-d2fd-49c5-80c3-b2ee266292b4" CreationDate="2011-03-31T22:03:15.530" UserId="-1" Text="" />
  <row Id="22139" PostHistoryTypeId="2" PostId="10518" RevisionGUID="c01a2773-86b1-48d6-8477-142673175f3c" CreationDate="2011-03-31T22:03:15.530" UserId="-1" Text="" />
  <row Id="22140" PostHistoryTypeId="2" PostId="10519" RevisionGUID="e4964b00-57ae-4371-8aad-aa4008f5e490" CreationDate="2011-03-31T22:16:50.283" UserId="6456" Text="I've just implemented a very rudimentary game of tetris in python using pygame and would like anybody to constuctively criticize me.&#xD;&#xA;&#xD;&#xA;It's my first program of substantial length so there are bound to be bugs. I also have not been able to wrap my head fully around the pygame event handling so keyboard controls might be dodgy but please do give it a try.&#xD;&#xA;&#xD;&#xA;Any constructive criticism or advice will be highly valued&#xD;&#xA;&#xD;&#xA;    ###############################################################################&#xD;&#xA;    ## an implementation of a ***very*** basic tetris game in python using pygame&#xD;&#xA;    ###############################################################################&#xD;&#xA;    '''rotate --- r&#xD;&#xA;       pause ---- p&#xD;&#xA;       direction buttons for movement'''&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import sys&#xD;&#xA;    import pygame&#xD;&#xA;    import random&#xD;&#xA;&#xD;&#xA;    size = width, height = 200, 400&#xD;&#xA;    color = {'black': (0, 0, 0), 'white':(255, 255, 255)}&#xD;&#xA;    sqrsize = 20&#xD;&#xA;    occupied_squares = []&#xD;&#xA;    top_of_screen = (0, 0)&#xD;&#xA;    top_x, top_y = top_of_screen[0], top_of_screen[1]&#xD;&#xA;    num_block = 4&#xD;&#xA;    pen_size = 1&#xD;&#xA;    mov_delay, r_delay = 300, 50&#xD;&#xA;    board_centre = 80&#xD;&#xA;    no_move = 0&#xD;&#xA;    events = {276: 'left', 275: 'right', 112: 'pause'}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pygame.init()&#xD;&#xA;    screen = pygame.display.set_mode(size)&#xD;&#xA;    background = pygame.Surface(screen.get_size())&#xD;&#xA;    background = background.convert()&#xD;&#xA;    background.fill((color['white']))&#xD;&#xA;    screen.blit(background, top_of_screen)&#xD;&#xA;    pygame.display.flip()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def tetris():&#xD;&#xA;    ''' this is the controller of the whole game for now, maybe changed&#xD;&#xA;    later on as game architecture changes.'''&#xD;&#xA;    global mov_delay&#xD;&#xA;    while True:&#xD;&#xA;    curr_shape = create_newshape(board_centre)&#xD;&#xA;    l_of_blcks_ind = blck_x_axis = 0&#xD;&#xA;    shape_name_ind = blck_y_axis = 1&#xD;&#xA;&#xD;&#xA;    move_dir = 'down' #default move direction&#xD;&#xA;    game = 'playing'  #default game state play:- is game paused or playing&#xD;&#xA;&#xD;&#xA;    shape_blcks = [pygame.Rect(block[blck_x_axis], block[blck_y_axis],&#xD;&#xA;        sqrsize, sqrsize) for block in curr_shape[l_of_blcks_ind]]&#xD;&#xA;    if legal(shape_blcks):&#xD;&#xA;        draw_shape(shape_blcks)&#xD;&#xA;    else:&#xD;&#xA;        break  #game over&#xD;&#xA;    while True:&#xD;&#xA;        if game == 'paused':&#xD;&#xA;            for event in pygame.event.get(pygame.KEYDOWN):&#xD;&#xA;                if event.key == pygame.K_p:&#xD;&#xA;                    game = 'playing'            &#xD;&#xA;        else:&#xD;&#xA;            for event in pygame.event.get((pygame.KEYDOWN, pygame.KEYUP,&#xD;&#xA;                                           pygame.QUIT)):&#xD;&#xA;                if event.type == pygame.QUIT:&#xD;&#xA;                    sys.exit()&#xD;&#xA;                elif event.type == pygame.KEYDOWN:&#xD;&#xA;                    if event.key == pygame.K_DOWN:&#xD;&#xA;                        mov_delay = 50&#xD;&#xA;                        continue&#xD;&#xA;                    elif event.key == pygame.K_r:&#xD;&#xA;                        shape_blcks = rotate(shape_blcks, curr_shape[shape_name_ind])&#xD;&#xA;                        draw_shape(shape_blcks)&#xD;&#xA;                        pygame.time.delay(r_delay)&#xD;&#xA;                        continue&#xD;&#xA;&#xD;&#xA;                    elif event.key == pygame.K_p:&#xD;&#xA;                        game = 'paused'&#xD;&#xA;                        move_dir = events[event.key]&#xD;&#xA;                        break&#xD;&#xA;&#xD;&#xA;                    else:&#xD;&#xA;                        if event.key in events.keys():&#xD;&#xA;                            mov_delay = 50&#xD;&#xA;                            move_dir = events[event.key]&#xD;&#xA;                            move (shape_blcks, move_dir)   &#xD;&#xA;                            draw_shape(shape_blcks)&#xD;&#xA;                            pygame.time.delay(mov_delay) &#xD;&#xA;                            continue  &#xD;&#xA;                elif event.type == pygame.KEYUP:&#xD;&#xA;                    if mov_delay != 300:&#xD;&#xA;                        mov_delay = 300&#xD;&#xA;                    move_dir  = 'down'        &#xD;&#xA;            moved = move(shape_blcks, move_dir)&#xD;&#xA;            draw_shape(shape_blcks)&#xD;&#xA;            pygame.time.delay(mov_delay)&#xD;&#xA;&#xD;&#xA;            '''if block did not move and the direction for movement is down&#xD;&#xA;            then shape has come to rest so we can exit loop and then a new&#xD;&#xA;            shape is generated. if direction for movement is sideways and&#xD;&#xA;            block did not move it should be moved down rather'''&#xD;&#xA;            if not moved and move_dir == 'down':&#xD;&#xA;                for block in shape_blcks:&#xD;&#xA;                    occupied_squares.append((block[blck_x_axis],&#xD;&#xA;                                             block[blck_y_axis]))&#xD;&#xA;                break&#xD;&#xA;            else:&#xD;&#xA;                draw_shape(shape_blcks)&#xD;&#xA;                pygame.time.delay(mov_delay)&#xD;&#xA;            for row_no in range (height - sqrsize, 0, -sqrsize):&#xD;&#xA;                if row_filled(row_no):&#xD;&#xA;                    delete_row(row_no)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def draw_shape(shp_blcks):&#xD;&#xA;    '''this draws list of blocks or a block to the background and blits&#xD;&#xA;    background to screen'''&#xD;&#xA;    if isinstance(shp_blcks, list):&#xD;&#xA;        for blck in shp_blcks:&#xD;&#xA;            pygame.draw.rect(background, color['black'], blck, pen_size)&#xD;&#xA;    else:&#xD;&#xA;        pygame.draw.rect(background, color['black'], shp_blcks, pen_size)&#xD;&#xA;    screen.blit(background, top_of_screen)&#xD;&#xA;    pygame.display.update()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def row_filled(row_no):&#xD;&#xA;    '''check if a row is fully occupied by a shape block'''&#xD;&#xA;    for x_coord in range(0, width, sqrsize):&#xD;&#xA;        if (x_coord, row_no) in occupied_squares:&#xD;&#xA;            continue&#xD;&#xA;        else:&#xD;&#xA;            return False&#xD;&#xA;    return True&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def delete_row(row_no):&#xD;&#xA;    '''removes all squares on a row from the occupied_squares list and then&#xD;&#xA;    moves all square positions which have y-axis coord less than row_no down&#xD;&#xA;    board'''&#xD;&#xA;    global occupied_squares&#xD;&#xA;    new_buffer = []&#xD;&#xA;    x_coord, y_coord = 0, 1&#xD;&#xA;    background.fill(color['white'])&#xD;&#xA;    for sqr in occupied_squares:&#xD;&#xA;        if sqr[y_coord] != row_no:&#xD;&#xA;            new_buffer.append(sqr)&#xD;&#xA;    occupied_squares = new_buffer&#xD;&#xA;    for index in range(len(occupied_squares)):&#xD;&#xA;        if occupied_squares[index][y_coord] &lt; row_no:&#xD;&#xA;            occupied_squares[index] = (occupied_squares[index][x_coord],&#xD;&#xA;                                occupied_squares[index][y_coord] + sqrsize)&#xD;&#xA;    for sqr in occupied_squares:&#xD;&#xA;        rect = pygame.Rect(sqr[x_coord], sqr[y_coord], sqrsize, sqrsize)&#xD;&#xA;        draw_shape(rect)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def move(shape_blcks, direction):&#xD;&#xA;    '''input:- list of blocks making up a tetris shape&#xD;&#xA;    output:- list of blocks making up a tetris shape&#xD;&#xA;    function moves the input list of blocks that make up shape and then checks&#xD;&#xA;    that the  list of blocks are all in positions that are valide. position is&#xD;&#xA;    valid if it has not been occupied previously and is within the tetris board.&#xD;&#xA;    If move is successful, function returns the moved shape and if move is not&#xD;&#xA;    possible, function returns a false'''&#xD;&#xA;    directs = {'down':(no_move, sqrsize), 'left':(-sqrsize, no_move),&#xD;&#xA;        'right':(sqrsize, no_move), 'pause': (no_move, no_move)}&#xD;&#xA;    delta_x, delta_y = directs[direction]&#xD;&#xA;    for index in range(num_block):&#xD;&#xA;        shape_blcks[index] = shape_blcks[index].move(delta_x, delta_y)&#xD;&#xA;&#xD;&#xA;    if legal(shape_blcks):&#xD;&#xA;        for index in range(num_block):&#xD;&#xA;            background.fill((color['white']), shape_blcks[index].move(-delta_x,&#xD;&#xA;                                                                  -delta_y))&#xD;&#xA;        return True&#xD;&#xA;    else:&#xD;&#xA;        for index in range(num_block):&#xD;&#xA;            shape_blcks[index] = shape_blcks[index].move(-delta_x, -delta_y)&#xD;&#xA;        return False&#xD;&#xA;&#xD;&#xA;    def legal(shape_blcks):&#xD;&#xA;    '''input: list of shape blocks&#xD;&#xA;    checks whether a shape is in a legal portion of the board as defined in the&#xD;&#xA;    doc of 'move' function'''&#xD;&#xA;    blck_x_axis, blck_y_axis = 0, 1&#xD;&#xA;    for index in range(num_block):&#xD;&#xA;        new_x, new_y = (shape_blcks[index][blck_x_axis],&#xD;&#xA;                    shape_blcks[index][blck_y_axis])&#xD;&#xA;&#xD;&#xA;        if (((new_x, new_y) in occupied_squares or new_y &gt;= height) or&#xD;&#xA;            (new_x &gt;= width or new_x &lt; top_x)): #probly introduced a bug by removing the     check for shape being less that y-axis origin &#xD;&#xA;            return False&#xD;&#xA;    return True&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def create_newshape(start_x=0, start_y=0):&#xD;&#xA;    '''A shape is a list of four rectangular blocks.&#xD;&#xA;    Input:- coordinates of board at which shape is to be created&#xD;&#xA;    Output:- a list of the list of the coordinates of constituent blocks of each&#xD;&#xA;    shape relative to a reference block and shape name. Reference block  has&#xD;&#xA;    starting coordinates of start_x and start_y. '''&#xD;&#xA;    shape_names = ['S', 'O', 'I', 'L', 'T']&#xD;&#xA;    shapes = {'S':[(start_x + 1*sqrsize, start_y + 2*sqrsize),&#xD;&#xA;        (start_x, start_y), (start_x, start_y + 1*sqrsize),(start_x + 1*sqrsize,&#xD;&#xA;                                                start_y + 1*sqrsize)],&#xD;&#xA;&#xD;&#xA;        'O':[(start_x + 1*sqrsize, start_y + 1*sqrsize), (start_x, start_y),&#xD;&#xA;        (start_x, start_y + 1*sqrsize), (start_x + 1*sqrsize, start_y)],&#xD;&#xA;&#xD;&#xA;        'I':[(start_x, start_y + 3*sqrsize), (start_x, start_y),&#xD;&#xA;        (start_x, start_y + 2*sqrsize), (start_x, start_y + 1*sqrsize)],&#xD;&#xA;&#xD;&#xA;        'L':[(start_x + 1*sqrsize, start_y + 2*sqrsize), (start_x, start_y),&#xD;&#xA;        (start_x, start_y + 2*sqrsize), (start_x, start_y + 1*sqrsize)],&#xD;&#xA;&#xD;&#xA;        'T':[(start_x + 1*sqrsize, start_y + 1*sqrsize),(start_x, start_y),&#xD;&#xA;        (start_x - 1*sqrsize, start_y + 1*sqrsize),(start_x,&#xD;&#xA;                                                    start_y + 1*sqrsize)]&#xD;&#xA;        }&#xD;&#xA;    a_shape = random.randint(0, 4)&#xD;&#xA;    return shapes[shape_names[a_shape]], shape_names[a_shape]&#xD;&#xA;    #return shapes['O'], 'O' #for testing &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def rotate(shape_blcks, shape):&#xD;&#xA;    '''input:- list of shape blocks&#xD;&#xA;    ouput:- list of shape blocks&#xD;&#xA;    function tries to rotate ie change orientation of blocks in the shape&#xD;&#xA;    and this applied depending on the shape for example if a 'O' shape is passed&#xD;&#xA;    to this function, the same shape is returned because the orientation of such&#xD;&#xA;    shape cannot be changed according to tetris rules'''&#xD;&#xA;    if shape == 'O':&#xD;&#xA;        return shape_blcks&#xD;&#xA;    else:&#xD;&#xA;        #global no_move, occupied_squares, background&#xD;&#xA;        blck_x_axis, blck_y_axis = 0, 1&#xD;&#xA;&#xD;&#xA;        shape_coords = [(block[blck_x_axis], block[blck_y_axis]) for&#xD;&#xA;            block in shape_blcks]&#xD;&#xA;&#xD;&#xA;        ref_shape_ind = 3 # index of block along which shape is rotated&#xD;&#xA;        start_x, start_y = (shape_coords[ref_shape_ind][blck_x_axis],&#xD;&#xA;                        shape_coords[ref_shape_ind][blck_y_axis])  &#xD;&#xA;        new_shape_blcks = [(start_x + start_y-shape_coords[0][1],&#xD;&#xA;                        start_y - (start_x - shape_coords[0][0])),&#xD;&#xA;            (start_x + start_y-shape_coords[1][1],&#xD;&#xA;             start_y - (start_x - shape_coords[1][0])),&#xD;&#xA;            (start_x + start_y-shape_coords[2][1],&#xD;&#xA;             start_y - (start_x - shape_coords[2][0])),&#xD;&#xA;            (shape_coords[3][0], shape_coords[3][1])]&#xD;&#xA;        if legal(new_shape_blcks):&#xD;&#xA;            for index in range(num_block): # paint over the previous shape&#xD;&#xA;                background.fill(color['white'], shape_blcks[index])&#xD;&#xA;            return [pygame.Rect(block[blck_x_axis], block[blck_y_axis],&#xD;&#xA;                                                 sqrsize, sqrsize) for&#xD;&#xA;                                           block in new_shape_blcks] &#xD;&#xA;        else:&#xD;&#xA;            return shape_blcks&#xD;&#xA;&#xD;&#xA;    if __name__ == '__main__':&#xD;&#xA;        tetris()&#xD;&#xA;" />
  <row Id="22141" PostHistoryTypeId="1" PostId="10519" RevisionGUID="e4964b00-57ae-4371-8aad-aa4008f5e490" CreationDate="2011-03-31T22:16:50.283" UserId="6456" Text="game of tetris in python using pygame" />
  <row Id="22142" PostHistoryTypeId="3" PostId="10519" RevisionGUID="e4964b00-57ae-4371-8aad-aa4008f5e490" CreationDate="2011-03-31T22:16:50.283" UserId="6456" Text="&lt;python&gt;" />
  <row Id="22143" PostHistoryTypeId="5" PostId="10518" RevisionGUID="cc89c3c4-77b0-4aac-898e-b6576c67292c" CreationDate="2011-03-31T22:17:26.460" UserId="382" Comment="added 152 characters in body" Text="Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms." />
  <row Id="22144" PostHistoryTypeId="24" PostId="10518" RevisionGUID="cc89c3c4-77b0-4aac-898e-b6576c67292c" CreationDate="2011-03-31T22:17:26.460" Comment="Proposed by 382 approved by 51 edit id of 220" />
  <row Id="22145" PostHistoryTypeId="5" PostId="10517" RevisionGUID="ead18e1e-fa60-4cf9-a1a0-6a249c706c4e" CreationDate="2011-03-31T22:17:43.793" UserId="382" Comment="added 3111 characters in body" Text="![java logo][1]&#xD;&#xA;&#xD;&#xA;__Initial help__&#xD;&#xA;&#xD;&#xA;* New to Java - need help to get your *first Java program running*?  See the [Oracle Java Tutorials section on Getting Started][2].&#xD;&#xA;&#xD;&#xA;Before asking a question, use the search box in the upper right corner to see if it has been asked before by others (we have many duplicates), and please read [Writing the perfect question][3] to learn how to get Jon Skeet to answer your question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;__Background__&#xD;&#xA;&#xD;&#xA;[Java][4] is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems and released in 1995.  Java is currently owned by Oracle, which purchased Sun on April 20, 2009.&#xD;&#xA;&#xD;&#xA;Very few computers can run Java programs directly.  Therefore the Java environment is normally made available by installing a suitable software component.  For Windows computers, this is usually done by downloading the free Java Runtime Environment (JRE) from Oracle which allows the system to run Java programs.  The easiest way to do this is from [java.com][5].&#xD;&#xA;&#xD;&#xA;Developers frequently need additional tools which are available in the free Java Development Kit (JDK) alternative to the JRE, which for Windows must be downloaded from [Oracle][6] and installed manually.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: Other vendors exist but usually have license fees. For Linux and other platforms consult the operating system documentation. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;More information:  &#xD;&#xA;&#xD;&#xA; - [Wikipedia on Java][7]&#xD;&#xA; - [Wikipedia on the JDK][8]&#xD;&#xA; - [Download Java from Oracle][9]&#xD;&#xA;&#xD;&#xA;Java source code is compiled to an intermediate form (bytecode instructions for the [Java Virtual Machine][10]) that can be executed with the `java` command.&#xD;&#xA;&#xD;&#xA;__Beginners' resources__&#xD;&#xA;&#xD;&#xA; - [The Java Tutorials][11] - Starts from scratch on Windows/Linux/Mac and covers most of the standard library.&#xD;&#xA;&#xD;&#xA;__Day to day resources__&#xD;&#xA;&#xD;&#xA; - [Java SE Documentation][12]&#xD;&#xA; - [API reference][13]&#xD;&#xA;&#xD;&#xA;__Advanced resources__&#xD;&#xA;&#xD;&#xA; - [The Java Virtual Machine Specification][14]&#xD;&#xA; - [The Java Language Specification][15]&#xD;&#xA; - [Other languages that can be mixed with Java on JVM][16]&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/en/thumb/3/39/Java_logo.svg/100px-Java_logo.svg.png&#xD;&#xA;  [2]: http://download.oracle.com/javase/tutorial/getStarted/index.html&#xD;&#xA;  [3]: http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Java_%28programming_language%29&#xD;&#xA;  [5]: http://java.com&#xD;&#xA;  [6]: http://www.oracle.com/technetwork/java/javase/downloads/index.html&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Java_%28programming_language%29&#xD;&#xA;  [8]: http://en.wikipedia.org/wiki/Java_Development_Kit&#xD;&#xA;  [9]: http://www.oracle.com/technetwork/java/javase/downloads/index.html&#xD;&#xA;  [10]: http://en.wikipedia.org/wiki/Java_Virtual_Machine&#xD;&#xA;  [11]: http://java.sun.com/docs/books/tutorial/&#xD;&#xA;  [12]: http://www.oracle.com/technetwork/java/javase/documentation/index.html&#xD;&#xA;  [13]: http://download.oracle.com/javase/6/docs/api&#xD;&#xA;  [14]: http://java.sun.com/docs/books/jvms/&#xD;&#xA;  [15]: http://java.sun.com/docs/books/jls/&#xD;&#xA;  [16]: http://en.wikipedia.org/wiki/List_of_JVM_languages" />
  <row Id="22146" PostHistoryTypeId="24" PostId="10517" RevisionGUID="ead18e1e-fa60-4cf9-a1a0-6a249c706c4e" CreationDate="2011-03-31T22:17:43.793" Comment="Proposed by 382 approved by 51 edit id of 219" />
  <row Id="22147" PostHistoryTypeId="25" PostId="10519" RevisionGUID="36d72f0e-e209-4c75-9a72-633d55a21069" CreationDate="2011-04-01T00:00:20.500" Comment="http://twitter.com/#!/StackGameDev/status/53607591649095680" />
  <row Id="22148" PostHistoryTypeId="2" PostId="10520" RevisionGUID="f1696908-f71a-4c1c-8867-3798ea6d811c" CreationDate="2011-04-01T01:12:03.953" UserId="5904" Text="If you've started with Java and you know how to use Java, then go for it. Java can do 2D/3D graphics and there are no shortages of information about them. As other people here are saying, don't sweat over which is the &quot;best&quot; language/software to use for it.&#xD;&#xA;&#xD;&#xA;Seriously, with a goal as lofty as a &quot;commericial online fighting game&quot;, I'd say that language is even inconsequential. You should be more concerned with how you intend on making this happen -- this is a quite large undertaking not to be done without a lot of forethought." />
  <row Id="22149" PostHistoryTypeId="2" PostId="10521" RevisionGUID="91c1f0be-8c5d-4034-ac20-4a9da21d2044" CreationDate="2011-04-01T01:21:10.217" UserId="5904" Text="First constructive criticisim: Be available and easy. It is hard enough to get people to download and play your game. Let's say I wrote a game in [Erlang][1] using ESDL and dumped the source code here. Would you search for and download Erlang, ESDL, and read tutorials until you knew how to compile and run my code? Probably not.&#xD;&#xA;&#xD;&#xA;I'm interested in testing your game but I don't want to spend an hour trying to figure out to how to get it to run. It would be much appreciated if you would:&#xD;&#xA;&#xD;&#xA; 1. Give links where Python/PyGame can be found + any dependencies they might have&#xD;&#xA; 2. How to run your game from command line&#xD;&#xA; 3. A link to your game in a single .py file instead of making us copy/paste it into a file.&#xD;&#xA; 4. What to do if we can't get it to run&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.erlang.org/" />
  <row Id="22150" PostHistoryTypeId="2" PostId="10522" RevisionGUID="b270427d-032b-4643-981e-0d5bad1ebac2" CreationDate="2011-04-01T02:02:47.297" UserId="5021" Text="In my opinion, XNA is a great place to start learning to make games. It permits development for the XBOX (and Windows Phone 7), which provides you with a way to distribute your game as you make progress toward a serious &quot;commercial online fighting game&quot;, which to be perfectly honest, is probably a few years away from being viable for you.&#xD;&#xA;&#xD;&#xA;Get started here: &#xD;&#xA;http://create.msdn.com&#xD;&#xA;&#xD;&#xA;Since you've learned some Java, everything you know in Java will carry over to C# (which is the language that XNA uses), as the language is very similar, and if you only know a little bit of Java, then the syntax will be identical almost everywhere.&#xD;&#xA;&#xD;&#xA;The choice of language and platform is not of utmost importance here, but I think that having a library like XNA, that comes with [numerous code samples][1] and has a helpful community, will make learning and producing your game quickly, easier and more rewarding.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/" />
  <row Id="22151" PostHistoryTypeId="25" PostId="10516" RevisionGUID="558c1a33-8346-4aec-9b75-54feedf447b0" CreationDate="2011-04-01T03:00:22.347" Comment="http://twitter.com/#!/StackGameDev/status/53652896075628544" />
  <row Id="22152" PostHistoryTypeId="2" PostId="10523" RevisionGUID="9de7e5e1-d9cf-45bf-9bf4-a92396c77138" CreationDate="2011-04-01T03:58:06.963" UserId="5131" Text="Am looking for ideas on how to do the following: I want to write a simple &quot;world&quot; in Java. One which I could start and then add new objects later at a later date to simulate/observe different behaviours between existing objects. The plan is then to code up newer objects after watching the old ones for a while and then load/drop them into the existing world. The problem is that I don't want to ever stop or restart the world once it's started, I want it to run for a few weeks but I do need the ability to drop in objects and redo/rewrite/delete/create/mutate them over time without needing a reboot.&#xD;&#xA;The world could be as simple as a 100 x 100 array of X/Y locations, with a possible tiled-map GUI to visually represent the world. I know I need some kind of ticktimer process to monitor objects and give each one a 'chance to act' (if they wanted to? (and if it was their turn to act?)).&#xD;&#xA;&#xD;&#xA;Example: &#xD;&#xA;I code up World.java on Monday and leave it running. &#xD;&#xA;Then on Tuesday I write a new class called Rock.java (that doesn't move). I then load/drop it (somehow?) into this already running world (which just drops it someplace random in the world array and never moves).&#xD;&#xA;Then on Wednesday I create a new class called Cat.java and drop that into the world, again placed randomly, but this new object can move around the world (over some unit of time), then on Thursday i write a class called Dog.java which also moves around but can 'act' on another object if it's in the neighbour location and vice versa.&#xD;&#xA;&#xD;&#xA;Here's the thing. I don't know what kinda of structure/design I would need to code the actual world class to know how to detect/load/track future (and currently non-existing) objects.&#xD;&#xA;&#xD;&#xA;Any ideas on how you would do something like this using Java?&#xD;&#xA;" />
  <row Id="22153" PostHistoryTypeId="1" PostId="10523" RevisionGUID="9de7e5e1-d9cf-45bf-9bf4-a92396c77138" CreationDate="2011-04-01T03:58:06.963" UserId="5131" Text="How to implement a never-rebooting test world?" />
  <row Id="22154" PostHistoryTypeId="3" PostId="10523" RevisionGUID="9de7e5e1-d9cf-45bf-9bf4-a92396c77138" CreationDate="2011-04-01T03:58:06.963" UserId="5131" Text="&lt;game-design&gt;&lt;java&gt;&lt;world-design&gt;" />
  <row Id="22155" PostHistoryTypeId="2" PostId="10524" RevisionGUID="9d76e33c-f40f-437b-bf61-ac5d9f67cea7" CreationDate="2011-04-01T05:00:59.237" UserId="4513" Text="Save the world (no pun intended) and all its state (positions, velocities, all variables). &#xD;&#xA;&#xD;&#xA; - Close the program. &#xD;&#xA; - Implement changes (ensuring backward compatibility with&#xD;&#xA;   saves).&#xD;&#xA; - Recompile program.&#xD;&#xA; - Restart program. &#xD;&#xA; - Load world and state.&#xD;&#xA; - Repeat&#xD;&#xA;&#xD;&#xA;This is a general solution though, I don't Java specifics to know if you can dynamically implement code blocks and classes like you hope...&#xD;&#xA;&#xD;&#xA;**Option 2**, is to bind a scripting language that can be loaded on the fly." />
  <row Id="22156" PostHistoryTypeId="25" PostId="10523" RevisionGUID="95f11caa-a904-4262-b29b-1667bb2d1070" CreationDate="2011-04-01T06:00:22.677" Comment="http://twitter.com/#!/StackGameDev/status/53698197515800576" />
  <row Id="22157" PostHistoryTypeId="2" PostId="10525" RevisionGUID="7c179a19-d9c9-43bf-b987-097771d76d22" CreationDate="2011-04-01T06:30:13.593" UserId="5508" Text="What you are basically looking for is a hot-pluggable system. You run a main application and then add plug-ins at runtime that get integrated in the event loop. First, start off thinking about what your world expects from a game entity. For example (based on your description):&#xD;&#xA;&#xD;&#xA;    interface Entity {&#xD;&#xA;       void init(World world);&#xD;&#xA;       // Called when loaded for the first time in the world and adds itself&#xD;&#xA;       // to the world (correct position in the array, scheduler for updates)&#xD;&#xA;&#xD;&#xA;       void update(World world);&#xD;&#xA;       // Called when scheduler fires (allows the entity to think about its&#xD;&#xA;       // next move)&#xD;&#xA;&#xD;&#xA;       Image getImage();&#xD;&#xA;       // Called by the GUI when it is time to draw the entity on the screen&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course, you can add other methods you deem necessary. Note the World parameter with the two relevant methods. This allows your new entity to consider the world when setting up or updating. In your Dog class, for example, you can ask the world for all cats in the neighborhood. Next, you create your world that works with this interface and a system for dynamically compiling and loading Java code. An example of this can be found [here][1].&#xD;&#xA;&#xD;&#xA;    void injectEntity(String filename, World world) {&#xD;&#xA;        // Load the class as described in the mentioned link&#xD;&#xA;        Entity e = (Entity) loadClass(filename);&#xD;&#xA;        e.init(world);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Call this method from the World GUI to add new entities. Depending on your World implementation, an Entity init function can look like this:&#xD;&#xA;&#xD;&#xA;    void init(World world) {&#xD;&#xA;       // Register entity with world for easy access&#xD;&#xA;       world.register(this, &quot;RockImpl A&quot;);&#xD;&#xA;&#xD;&#xA;       // Place the entity on the world map&#xD;&#xA;       Point initialLocation = Point(10,5);&#xD;&#xA;       world.place(this, initialLocation);&#xD;&#xA;&#xD;&#xA;       // Schedule its update method for every 5 seconds&#xD;&#xA;       world.schedule(this, 5);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://www.javaworld.com/javaworld/jw-06-2006/jw-0612-dynamic.html" />
  <row Id="22158" PostHistoryTypeId="2" PostId="10526" RevisionGUID="069a8803-11fe-4706-a72b-700b3c4deb39" CreationDate="2011-04-01T07:04:02.127" UserId="450" Text="We did something like that in [Stendhal][1] for raids. &#xD;&#xA;&#xD;&#xA;We did not aim for completely avoiding restarts. So changes to our core infrastructure services such as client/server communication do need a restart. But adding entities, creatures and NPCs, and modifying existing objects does work. (Oh, and sometimes live bug fixing, reflection can be used to manipulate even private fields). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Since we do not only want new object based on **new data** (like another skin), but want to add new behaviour, the world program needs to be able to **load new class files**. We call them &quot;scripts&quot;, but they are real compiled Java classes. Those classes implement the [Script.java][2] interface. &#xD;&#xA;&#xD;&#xA;[Maria.java][3] is a simple example. She is a new NPC that sells drinks and food to players. We can define [very complex objects][4] in there, too.&#xD;&#xA;&#xD;&#xA;A new class is loaded this way:&#xD;&#xA;&#xD;&#xA;    // create a new class loader, with the script folder as classpath.&#xD;&#xA;    final File file = new File(&quot;./data/script&quot;);&#xD;&#xA;    final ClassLoader loader = new URLClassLoader(new URL[] { file.toURI().toURL() });&#xD;&#xA;&#xD;&#xA;    // load class through new loader&#xD;&#xA;    final Class&lt; ? &gt; aClass = loader.loadClass(classname);&#xD;&#xA;    script = (Script) aClass.newInstance();&#xD;&#xA;&#xD;&#xA;If you can ensure unique names and never want to unload classes, you are done with the low level stuff.&#xD;&#xA;&#xD;&#xA;**Unloading**, however, seems pretty important. In order to achieve that, you have to instantiate a new class loader whenever you want to inject new code. So that the GC can do its work after the last reference to that code is cleared.&#xD;&#xA;&#xD;&#xA;We have a **/unload command** that invokes an unload method in our interface so that scripts can do cleanup. The real unloading is done automatically by the GC.&#xD;&#xA;&#xD;&#xA;We often create lots of **temporary objects** during raids. And we want all of them to be removed after the raid ends. For example the Gnomes Raid, which spawns a number of gnomes near the invisible admin, we use this code: [GnomeRaid.java][5] extends [CreateRaid.java][6]. &#xD;&#xA;&#xD;&#xA;The script could access the world directly (as the first example shows) and do its own clean up in the unload() method. But Java coders are not used to do clean up, and it is annoying. So we created a **sandbox** that scripts may use. On unload all objects added to the world through the Sandbox class are removed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org&#xD;&#xA;  [2]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/core/scripting/Script.java?view=markup&#xD;&#xA;  [3]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/Maria.java?view=markup&#xD;&#xA;  [4]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/BetManager.java?view=markup&#xD;&#xA;  [5]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/GnomeRaid.java?view=markup&#xD;&#xA;  [6]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/CreateRaid.java?view=markup" />
  <row Id="22159" PostHistoryTypeId="25" PostId="10414" RevisionGUID="987d8ece-8e2d-4189-8a0a-3949cb9b086d" CreationDate="2011-04-01T09:00:22.833" Comment="http://twitter.com/#!/StackGameDev/status/53743497160835072" />
  <row Id="22163" PostHistoryTypeId="5" PostId="9706" RevisionGUID="ed4843ea-8c31-4cda-b73a-1fb3002e07f3" CreationDate="2011-04-01T11:06:12.153" UserId="1101" Comment="Clarified an ambiguous statement." Text="The best practice for separating the game logic from game rendering is to have separate objects for the logic and the renderable, instead of having one large object that performs both tasks. The renderable object has a reference to the logic object so that it can update its own state (eg. animations) based on data in the game logic, or just query for relevant properties directly (eg. current position).&#xD;&#xA;&#xD;&#xA;Once you make that separation, most of these issues above disappear, and you don't have to worry about complicated observer patterns or event dispatch." />
  <row Id="22164" PostHistoryTypeId="2" PostId="10528" RevisionGUID="8a500adb-f56c-4b50-a6af-81f4def0cf2f" CreationDate="2011-04-01T11:22:57.630" UserId="5021" Text="The solution was to remove the unused color input from the shader.&#xD;&#xA;&#xD;&#xA;Old pixel shader:&#xD;&#xA;&#xD;&#xA;    float4 PixelShaderFunction(float2 texCoord : TEXCOORD0, float4 color : COLOR0) : COLOR0&#xD;&#xA;    {&#xD;&#xA;        color = tex2D(TextureSampler, texCoord);&#xD;&#xA;    &#xD;&#xA;        // Apply the alpha test.&#xD;&#xA;        clip((color.a - AlphaTestThreshold) * AlphaTestDirection);&#xD;&#xA;    &#xD;&#xA;        return color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;New pixel shader:&#xD;&#xA;&#xD;&#xA;    float4 PixelShaderFunction(float2 texCoord : TEXCOORD0) : COLOR0&#xD;&#xA;    {&#xD;&#xA;        float4 color = tex2D(TextureSampler, texCoord);&#xD;&#xA;    &#xD;&#xA;        // Apply the alpha test.&#xD;&#xA;        clip((color.a - AlphaTestThreshold) * AlphaTestDirection);&#xD;&#xA;    &#xD;&#xA;        return color;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="22166" PostHistoryTypeId="2" PostId="10529" RevisionGUID="025c2a03-d729-4b3c-8e11-c0e08b6fe49f" CreationDate="2011-04-01T12:42:34.770" UserId="5020" Text="The short answer is: don't. Multithreading will give you more headaches than it saves.&#xD;&#xA;&#xD;&#xA;Taking your example in particular:&#xD;&#xA;&gt; User clicks on an item The function walkToAndPickUp(item) is called which is basically this:&#xD;&#xA;&#xD;&#xA;I'd rethink things a bit. At any point the state contains (among other things) the PC's target location and the PC's target item.&#xD;&#xA;&#xD;&#xA;* A click clears the target item&#xD;&#xA;* The items are ignored in determining the click location. The PC's target location is updated to the point clicked.&#xD;&#xA;* If the point clicked was on an item the target item is set to that item.&#xD;&#xA;&#xD;&#xA;Then your game loop will include a move() which checks whether the PC can move towards the target location and if so does, and an interact() which interacts with objects near the PC. Among the interactions are items checking &quot;Am I the target item and within a certain distance of the PC?&quot; If so, they call a pick-me-up routine.&#xD;&#xA;&#xD;&#xA;No threads required. No movement code duplicated between moving and picking up items." />
  <row Id="22167" PostHistoryTypeId="6" PostId="1192" RevisionGUID="3fd3c90c-9077-4248-982e-06d140640a2c" CreationDate="2011-04-01T13:23:33.487" UserId="3588" Comment="Creating a new tag to replace the loss of tags ♪" Text="&lt;accessibility&gt;" />
  <row Id="22168" PostHistoryTypeId="24" PostId="1192" RevisionGUID="3fd3c90c-9077-4248-982e-06d140640a2c" CreationDate="2011-04-01T13:23:33.487" Comment="Proposed by 3588 approved by 51 edit id of 221" />
  <row Id="22169" PostHistoryTypeId="6" PostId="9763" RevisionGUID="d1b2afcd-b4e7-45ed-804a-16dc1a1476eb" CreationDate="2011-04-01T13:55:44.097" UserId="3588" Comment="Asking about GUI for the purposes of both age and conditional accessibility. As such, planting the accessibility tag to guarantee that it does not expire in 6 months. ♪" Text="&lt;iphone&gt;&lt;gui&gt;&lt;accessibility&gt;" />
  <row Id="22170" PostHistoryTypeId="24" PostId="9763" RevisionGUID="d1b2afcd-b4e7-45ed-804a-16dc1a1476eb" CreationDate="2011-04-01T13:55:44.097" Comment="Proposed by 3588 approved by 51 edit id of 222" />
  <row Id="22171" PostHistoryTypeId="6" PostId="10523" RevisionGUID="7a81acd5-cd2b-4f2f-b9e9-6c6bfc80dd1c" CreationDate="2011-04-01T14:08:15.273" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;world-design&gt;" />
  <row Id="22172" PostHistoryTypeId="2" PostId="10530" RevisionGUID="a214b03f-56bb-49d2-b821-740afb81e194" CreationDate="2011-04-01T14:43:46.770" UserId="744" Text="For Java, all you need is &lt;a href=&quot;http://en.wikipedia.org/wiki/OSGi&quot;&gt;an OSGi platform&lt;/a&gt;. With that it's trivial to hot-swap modules or applications, and even do remote management or partial upgrades.&#xD;&#xA;&#xD;&#xA;&lt;!-- Man, if this answer gets voted up, I'm giving up on the site. --&gt;" />
  <row Id="22173" PostHistoryTypeId="25" PostId="10430" RevisionGUID="165a808f-2094-476c-b01e-652def324f5d" CreationDate="2011-04-01T15:00:22.483" Comment="http://twitter.com/#!/StackGameDev/status/53834092235599872" />
  <row Id="22174" PostHistoryTypeId="2" PostId="10531" RevisionGUID="935990c7-739d-45ec-b6fb-2726ba52d259" CreationDate="2011-04-01T15:15:14.450" UserId="6465" Text="Do you think it's possible to go straight from Experienced C++ programming (5 or so years) straight into learning DirectX 3d?&#xD;&#xA;&#xD;&#xA;I mean....i'd be starting with the basics, im more interested in setting up Demos (like getting a good water demo and such) than actually doing a full fledged game.&#xD;&#xA;&#xD;&#xA;Do you think this is possible?" />
  <row Id="22175" PostHistoryTypeId="1" PostId="10531" RevisionGUID="935990c7-739d-45ec-b6fb-2726ba52d259" CreationDate="2011-04-01T15:15:14.450" UserId="6465" Text="Do you think it's Possible to go from C++ Straight to 3D (skipping 2D)" />
  <row Id="22176" PostHistoryTypeId="3" PostId="10531" RevisionGUID="935990c7-739d-45ec-b6fb-2726ba52d259" CreationDate="2011-04-01T15:15:14.450" UserId="6465" Text="&lt;3d&gt;&lt;directx&gt;&lt;game-mechanics&gt;" />
  <row Id="22177" PostHistoryTypeId="2" PostId="10532" RevisionGUID="5f428455-fae0-4e49-8363-e921b6a31745" CreationDate="2011-04-01T15:22:28.063" UserId="6467" Text="Absolutely it's possible.  A great starting point [Introduction to 3D Game Programming with DirectX 10 by Frank D. Luna][1].  It is very easy to read, allows you to quickly implement a lot of common functions, and serves as a great base to learn more about DirectX and game programming.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Introduction-3D-Game-Programming-DirectX/dp/1598220535" />
  <row Id="22178" PostHistoryTypeId="17" PostId="10534" RevisionGUID="18125adb-986a-4ed0-a7b4-ca14860f5a86" CreationDate="2011-04-01T15:28:45.313" UserId="-1" Comment="from http://stackoverflow.com/questions/5514677/game-story-event-programming/5514786#5514786" Text="" />
  <row Id="22179" PostHistoryTypeId="17" PostId="10535" RevisionGUID="b2fa8e45-6a5e-4916-a070-7d24387720cc" CreationDate="2011-04-01T15:28:45.313" UserId="-1" Comment="from http://stackoverflow.com/questions/5514677/game-story-event-programming/5514921#5514921" Text="" />
  <row Id="22180" PostHistoryTypeId="17" PostId="10536" RevisionGUID="4b9302c3-10b6-4973-9a1b-938290293b36" CreationDate="2011-04-01T15:28:45.313" UserId="-1" Comment="from http://stackoverflow.com/questions/5514677/game-story-event-programming/5515467#5515467" Text="" />
  <row Id="22181" PostHistoryTypeId="2" PostId="10534" RevisionGUID="a17e0545-b063-4f04-8686-da1b37263dae" CreationDate="2011-04-01T14:29:51.183" UserId="5651" Text="You could use a set of possible states your game is in.  Your NPCs and your world would be aware of those states and react/display accordingly.  You might also want to define a set of triggers that would be activated by some actions/events.  &#xD;&#xA;&#xD;&#xA;For example, beating a certain opponent would activate trigger A, which would add state S to your world and in state S your character gets electrocuted when it walks out of its opponents lair.  Or it's raining outside.  Or you find a rare candy.  You get the point.&#xD;&#xA;&#xD;&#xA;With those two simple additions to your game, you could make it be a lot more &quot;alive&quot;.&#xD;&#xA;&#xD;&#xA;Make sure you also create a rich background for your world, characters and storyline and make sure the game is consistent to that background.  Plan your story first.&#xD;&#xA;&#xD;&#xA;Also try [Gamedev][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com" />
  <row Id="22182" PostHistoryTypeId="2" PostId="10535" RevisionGUID="dd5f0e8f-9f01-4931-84c0-e905634d5a7e" CreationDate="2011-04-01T14:43:26.957" UserDisplayName="sftrabbit" Text="Your game's story should probably be in the form of a finite state automaton (or some kind of extended FSA). When certain events happen, you should move to a new state. This way you only ever have to store the current state and whatever information is needed to know where to move next in the FSA (along with player details like position, health, etc.).&#xD;&#xA;&#xD;&#xA;For example, if we absolutely oversimplify the Pokemon games, the gym badges form the main branch of the FSA. You start in state 0 where you have no badges and as you beat the gym leaders you move through the states, to state 1, to state 2, etc. To get your game entities to update to the current state, you only need to get them to look at the current state. For example, an NPC outside the 3rd gym would check which state you are in, see you are in the state corresponding to having 3 badges, and respond accordingly (perhaps with a &quot;Well done!&quot;).&#xD;&#xA;&#xD;&#xA;You don't need to store the state of everything in the world; just the state of the story. The entities themselves know how to react depending on the current state." />
  <row Id="22183" PostHistoryTypeId="2" PostId="10536" RevisionGUID="f4617d75-d571-4061-b813-e3bef2222687" CreationDate="2011-04-01T15:27:37.740" UserId="5604" Text="I used to use this game engine called [VERGE](http://verge-rpg.com/).  Play around with that and see how it handles events, I really like it.  It's open source too, so you can see how they implement it, [here](https://github.com/Bananattack/verge3).  Here's a brief description.&#xD;&#xA;&#xD;&#xA;Each map has a variety of layers.  The graphical layers, of which there may be several. The obstruction layer.  And then there is the zone layer.  The zone layer is what's important here.&#xD;&#xA;&#xD;&#xA;Each tile has a number to indicate which zone it is part of.  Each zone can be activated in one two basic ways.  Either the zone is activated upon the player entering it, or it has what's called adjacent activation.  Adjacent activation means that when the player is standing adjacent to one of the zone's tiles and presses some key specified as the activation key, the zone is activated.&#xD;&#xA;&#xD;&#xA;What happens when a zone is activated is it calls a function from a script.  So you need to embed some kind of scripting language.  VERGE has it's own language called VergeC, and it also allows lua.  I myself prefer to use python.&#xD;&#xA;&#xD;&#xA;Once you've gotten over this hurdle, you now have tremendous power in your event scripting.  You have a full fledged programming language in which you can store and act on data like player stats, story flags, etc..." />
  <row Id="22184" PostHistoryTypeId="2" PostId="10533" RevisionGUID="12214f11-637d-4aa0-8682-4470ee162f6f" CreationDate="2011-04-01T14:21:05.870" UserDisplayName="Skeith" Text="i have developed an game engine in c/c++ and directx.&#xD;&#xA;&#xD;&#xA;i have a tile engine for the maps, animated player/npc sprites, talking to the npc, menus and level changing but there is no game it just feels empty.&#xD;&#xA;&#xD;&#xA;i have looked around and keep hearing buzzword answers but i want to know how to implement a story in my game.&#xD;&#xA;&#xD;&#xA;some people have said a save file that holds flags governing every possible action/state available in the game but this sounds ludicrous. &#xD;&#xA;&#xD;&#xA;it is a bit ambitious but i am aiming to get a game like the older pokemon/final fantasy games.&#xD;&#xA;&#xD;&#xA;does any one know how these games work or the theory used. &#xD;&#xA;&#xD;&#xA;i am will to go research subjects but please no one word answers, explain what you mean i have been looking for a while and would really appreciate any input people have. &#xD;&#xA;&#xD;&#xA;thank you " />
  <row Id="22185" PostHistoryTypeId="1" PostId="10533" RevisionGUID="12214f11-637d-4aa0-8682-4470ee162f6f" CreationDate="2011-04-01T14:21:05.870" UserDisplayName="Skeith" Text="game story event programming" />
  <row Id="22186" PostHistoryTypeId="3" PostId="10533" RevisionGUID="12214f11-637d-4aa0-8682-4470ee162f6f" CreationDate="2011-04-01T14:21:05.870" UserDisplayName="Skeith" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="22187" PostHistoryTypeId="17" PostId="10533" RevisionGUID="fb395eb7-8640-44f1-b0ca-c542e635cad7" CreationDate="2011-04-01T15:28:45.313" UserId="-1" Comment="from http://stackoverflow.com/questions/5514677/game-story-event-programming" Text="" />
  <row Id="22188" PostHistoryTypeId="5" PostId="10536" RevisionGUID="218e415f-898f-4914-9143-03dfbc1df96d" CreationDate="2011-04-01T15:34:31.753" UserId="5604" Comment="added 88 characters in body" Text="I used to use this game engine called [VERGE](http://verge-rpg.com/).  Play around with that and see how it handles events, I really like it.  It's open source too, so you can see how they implement it, [here](https://github.com/Bananattack/verge3).  Here's a brief description.&#xD;&#xA;&#xD;&#xA;Each map has a variety of layers.  The graphical layers, of which there may be several. The obstruction layer.  And then there is the zone layer.  The zone layer is what's important here.*&#xD;&#xA;&#xD;&#xA;Each tile has a number to indicate which zone it is part of.  Each zone can be activated in one two basic ways.  Either the zone is activated upon the player entering it, or it has what's called adjacent activation.  Adjacent activation means that when the player is standing adjacent to one of the zone's tiles and presses some key specified as the activation key, the zone is activated.&#xD;&#xA;&#xD;&#xA;What happens when a zone is activated is it calls a function from a script.  So you need to embed some kind of scripting language.  VERGE has it's own language called VergeC, and it also allows lua.  I myself prefer to use python.&#xD;&#xA;&#xD;&#xA;Once you've gotten over this hurdle, you now have tremendous power in your event scripting.  You have a full fledged programming language in which you can store and act on data like player stats, story flags, etc...&#xD;&#xA;&#xD;&#xA;*There is also an Entity layer.  Entities act like mobile adjacent activated zones." />
  <row Id="22189" PostHistoryTypeId="2" PostId="10537" RevisionGUID="f66789ea-979c-49e7-90c2-e57d17f3090c" CreationDate="2011-04-01T15:43:40.573" UserId="706" Text="I think using SOAP or even HTTP is overkill. Just define your own protocol over vanilla TCP-connections. For example, interpret each line of text sent as a command. Define what commands/responses the client and the server is allowed to send.&#xD;&#xA;&#xD;&#xA;FICS works that way and it has been serving thousands of chess players for many years. IRC works that way too (see RFC 1459)." />
  <row Id="22190" PostHistoryTypeId="2" PostId="10538" RevisionGUID="5b77bbca-d1b2-4aeb-a37a-d4bb27c2e650" CreationDate="2011-04-01T15:50:05.280" UserId="2306" Text="As sftrabbit mentioned, this is a perfect application for a state machine.&#xD;&#xA;&#xD;&#xA;Essentially, you have a sort of tree structure. Each leaf/node contains information about the current state, and rules for progressing to the next state. Each node may contain multiple exits, depending on how complex you need your plot/play flow to be.&#xD;&#xA;&#xD;&#xA;A good, very loose analog to this is a [Choose Your Own Adventure][1] book. Each page contains some text describing part of the story, and decisions that the player can make. Each decision leads to another page. Some pages may link back to previously-visited pages, etc.&#xD;&#xA;&#xD;&#xA;The old text-based adventure games like [Zork][2] and [Leather Goddesses of Phobos][3], and the infamous Sierra *Quest games ([SpaceQuest starring Roger Wilco the space janitor is one of my favorites][4]) used a very simple version of this type of system. Each room in a map was a state, with exits that linked to other states or rooms. Acquiring an item set a flag in a global state object. Each room would check those flags to determine which characters or items were available in each room. &#xD;&#xA;&#xD;&#xA;So, your states may be implemented as a class or struct, each with properties for:&#xD;&#xA;&#xD;&#xA;Asset list - list of pointers to background graphics and anything else that you need to display the room/state/level.&#xD;&#xA;&#xD;&#xA;Entry conditions - achievements that must already have been reached to enter a level&#xD;&#xA;&#xD;&#xA;Exits - links to each possible &quot;next&quot; exit. North,South,East and West are some examples of this, but you may also include Door1, Teleport, etc. When attempting to exit a room, or determining of an exit/door is &quot;open&quot;, your game could check the next state to see if its entry conditions have been met, and alter the way the exit is displayed on the screen, or just not allow the player to move in that direction.&#xD;&#xA;&#xD;&#xA;If you want to get fancy, you could include a different version of a state with different entry conditions, which would alter the way that the room is presented to the player, or the actions that are available in that room.&#xD;&#xA;&#xD;&#xA;Your start screen, death/game over screen, etc could all be states within the system, similar to the way in which you might navigate between menu screens. In fact, if you have such a menu system in place, you could use it for this. Instead of up/down arrows and &quot;enter&quot; to navigate a menu, you would look for specific events within the game play area, such as stepping on a teleport pad, walking off of the right side of the screen, etc.&#xD;&#xA;&#xD;&#xA;From an admin point of view, consider whether or not you could benefit from creating an admin tool that would allow you to create the state machine. Add rooms to a map, create links between them, assign assets like background images, etc. This is probably overkill for your first attempt; it's too easy to get absorbed in building admin tools, and never actually finish the game. Remember - you're not writing middleware, but a game.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Choose_Your_Own_Adventure&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Zork&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Leather_Goddesses_of_Phobos&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Space_Quest" />
  <row Id="22191" PostHistoryTypeId="2" PostId="10539" RevisionGUID="d0e4d10c-67bd-4a9a-97ea-c3df0b8dcc6f" CreationDate="2011-04-01T15:57:12.697" UserId="2306" Text="Of course, though I recommend starting with a very, very simple 2D app since the initial learning curve (just getting a DX app running can be a chore) can be quite steep, and it's helpful to know whether the problems you're seeing are 3D-specific, or if you're just missing something very basic. &#xD;&#xA;&#xD;&#xA;Implement Pong - you'll learn basics such as getting a DX app up and running, basic collision detection, and, most importantly, how to draw stuff on the screen.&#xD;&#xA;&#xD;&#xA;If it's your first app, it should take you less than a week to get that running. At that point, you should understand the basics of the DX framework, and be ready to start another project where you can focus on the 3D aspects - transformation matrices, object/state management, culling, lighting, etc. Maybe implement 3D pong, or racquetball. " />
  <row Id="22192" PostHistoryTypeId="5" PostId="10539" RevisionGUID="aff4fa44-7276-44ba-bd2e-ef4e71ef3faf" CreationDate="2011-04-01T16:04:23.770" UserId="2306" Comment="added 17 characters in body" Text="Of course, though I recommend starting with a very, very simple 2D app since the initial learning curve (just getting a DX app running can be a chore) can be quite steep, and it's helpful to know whether the problems you're seeing are 3D-specific, or if you're just missing something very basic. &#xD;&#xA;&#xD;&#xA;Implement Pong - you'll learn basics such as getting a DX app up and running, input processing, basic collision detection and, most importantly, how to draw stuff on the screen.&#xD;&#xA;&#xD;&#xA;If it's your first app, it should take you less than a week to get that running. At that point, you should understand the basics of the DX framework, and be ready to start another project where you can focus on the 3D aspects - transformation matrices, object/state management, culling, lighting, etc. Maybe implement 3D pong, or racquetball. " />
  <row Id="22193" PostHistoryTypeId="5" PostId="10533" RevisionGUID="ad185436-cccb-435e-b414-19e03bfbeb9d" CreationDate="2011-04-01T16:09:08.757" UserId="5363" Comment="cleaned up the grammar &amp; punctuation" Text="I have developed a game engine in c/c++ and DirectX.&#xD;&#xA;&#xD;&#xA;I have a tile engine for the maps, animated player/npc sprites, talking to the npc, menus, and level changing but there is no game, it just feels empty.&#xD;&#xA;&#xD;&#xA;I have looked around and keep hearing buzzword answers but I want to know how to implement a story in my game.&#xD;&#xA;&#xD;&#xA;Some people have said a save file that holds flags governing every possible action/state available in the game but this sounds ludicrous. &#xD;&#xA;&#xD;&#xA;It is a bit ambitious but I am aiming to get a game like the older Pokemon/Final Fantasy games.&#xD;&#xA;&#xD;&#xA;Does any one know how these games work or the theory used?&#xD;&#xA;&#xD;&#xA;I have been looking for a while and would really appreciate any input people have. &#xD;&#xA;" />
  <row Id="22194" PostHistoryTypeId="24" PostId="10533" RevisionGUID="ad185436-cccb-435e-b414-19e03bfbeb9d" CreationDate="2011-04-01T16:09:08.757" Comment="Proposed by 5363 approved by 51 edit id of 223" />
  <row Id="22195" PostHistoryTypeId="25" PostId="10533" RevisionGUID="bef8cb6b-cf17-4c8c-87e0-297ec2c4f980" CreationDate="2011-04-01T18:08:47.220" Comment="http://twitter.com/#!/StackGameDev/status/53881507810508800" />
  <row Id="22196" PostHistoryTypeId="2" PostId="10540" RevisionGUID="8e99603c-5bb1-488a-b5fc-0d6958596744" CreationDate="2011-04-01T18:51:12.687" UserId="458" Text="Of course it's possible. It's also possible to learn C++ as your first programming language. But it's probably not the fastest way to get there.&#xD;&#xA;&#xD;&#xA;Going from &quot;programming&quot; to &quot;game programming&quot; requires learning a few things regardless of graphics: game loops, realtime input, and so on. Those are MUCH easier to learn if you don't have to deal with learning a new graphics library at the same time. Learn one thing at a time and you'll probably have a much easier time of it. (And if you're an experienced programmer, learning the 2D stuff should really not take that long anyway.)" />
  <row Id="22197" PostHistoryTypeId="2" PostId="10541" RevisionGUID="20b117ce-ba4f-4145-928e-ab22194f15e1" CreationDate="2011-04-01T19:01:50.217" UserId="458" Text="Design documentation has an upkeep cost; as things change you have to go back and re-read and update any existing docs. As such, it should be a production goal to minimize the amount of maintainable documentation because that will maximize time spent actually building the game.&#xD;&#xA;&#xD;&#xA;From there, it follows that you don't want to design everything down to the tiniest detail in advance, because you know full well that half of it will change, and then you'll be dealing with a lot of wasted time. Do the minimum design needed to start making the core game. When that's done, iterate as needed, then repeat the process for each new feature." />
  <row Id="22198" PostHistoryTypeId="2" PostId="10542" RevisionGUID="296f328f-b4e7-431d-993c-55e9c34d419e" CreationDate="2011-04-01T19:05:23.733" UserId="6474" Text="I know that its just the background that scrolls and the player pretty much stays centered.  What I am wondering what technique is more correct when I am implementing a large side scrolling map (I am not using tiles like some other questions I have found).  &#xD;&#xA;&#xD;&#xA;using a very large map 16000 pixels map, and scrolling that. and create an image list, with maybe 4 4000 pixel maps?&#xD;&#xA;&#xD;&#xA;also, lets say I want a box at a certain point in my map. Right now I am just counting the pixels that I am scrolling and once I get to pixel 2000 I insert the box, and scroll it with the background.  Does that seem correct? or is there a better way to do all of this?&#xD;&#xA;" />
  <row Id="22199" PostHistoryTypeId="1" PostId="10542" RevisionGUID="296f328f-b4e7-431d-993c-55e9c34d419e" CreationDate="2011-04-01T19:05:23.733" UserId="6474" Text="Question about top down/side scrolling!" />
  <row Id="22200" PostHistoryTypeId="3" PostId="10542" RevisionGUID="296f328f-b4e7-431d-993c-55e9c34d419e" CreationDate="2011-04-01T19:05:23.733" UserId="6474" Text="&lt;xna&gt;&lt;level-design&gt;&lt;side-scroller&gt;" />
  <row Id="22202" PostHistoryTypeId="5" PostId="10229" RevisionGUID="584fa889-541f-4570-890e-ea35d42111ba" CreationDate="2011-04-01T19:18:52.240" UserId="6340" Comment="added 1085 characters in body" Text="This question might seem a bit vague but it is hard to formulate properly. I will try as best as I can. So here goes...&#xD;&#xA;&#xD;&#xA;For many years I have been trying to create games but I haven't managed to finish even a single one. The main reason, among others, was that the game creation process lacked focus. There never was a concrete vision of what I was trying to create.&#xD;&#xA;&#xD;&#xA;Now I realize that I would usually want to create a game that was similar to some other that I recently played and liked. It seems like there are many games I would like to make but there is none that I would see as THE game I want to make (or one of THE games).&#xD;&#xA;&#xD;&#xA;I really want to create something that I (and hopefully, others too) like and can be proud of. But I'm having a hard time discovering what it is. It doesn't have to be big, graphically awesome or anything like that. It should simply be something I really enjoy and am motivated to create.&#xD;&#xA;&#xD;&#xA;So, has anyone else here had the same or similar problem? Have you found a way to overcome it? Have you discovered &quot;YOUR&quot; game?&#xD;&#xA;&#xD;&#xA;If so, what was different about it from other games you tried creating?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Thanks for all your answers. Just want to clarify some things a bit...&#xD;&#xA;&#xD;&#xA;Before asking this question I already read through various older questions about things like prototyping, having deadlines, to-do lists, participating in competitions with short deadlines, etc.&#xD;&#xA;&#xD;&#xA;What I wanted to know more by asking this question was not how to create a game in general but how to discover a project that feels like what you really want to do.&#xD;&#xA;&#xD;&#xA;For example, I play racing games very rarely, but sometimes I might play some game that is quite fun for a while and get an idea about creating some racing game of my own. But that idea won't stay for long and I will soon get bored with it because in general I am not the kind of guy who is really &quot;into&quot; racing games.&#xD;&#xA;&#xD;&#xA;It would be nice if someone here could tell how they discovered what their game was. And I would appreciate if you could tell your story with more details, especially about the things that made the difference between &quot;it would be nice to make this game for myself&quot; and &quot;I want to make this game really badly&quot;." />
  <row Id="22203" PostHistoryTypeId="2" PostId="10544" RevisionGUID="e3eb348f-cac3-443e-9aa4-08d73138796f" CreationDate="2011-04-01T19:26:48.957" UserId="2301" Text="In reply to your edited post, and not directly at prototyping a game&#xD;&#xA;&#xD;&#xA;*what was different about it from other games you tried creating?*&#xD;&#xA;I couldn't stop playing it! And when I talked/showed my friends they loved the idea/gameplay.  &#xD;&#xA;&#xD;&#xA;I generally make games that I like to play, and my friends like to play. I keep them updating and that keeps me excited in creating my game." />
  <row Id="22204" PostHistoryTypeId="2" PostId="10545" RevisionGUID="e28d9e3a-0d20-4160-ad45-90212e304f20" CreationDate="2011-04-01T19:38:03.553" UserId="458" Text="Unfortunately, job titles vary from company to company, so a &quot;programmer/analyst&quot; at one place might just be a fancy term for &quot;programmer&quot; while at another place it might involve the creation of software specs and design docs, and in another it might involve budgeting and scheduling. So &quot;Programmer analyst&quot; is vague - you really need to list your skill set.&#xD;&#xA;&#xD;&#xA;That said, can one transition from &quot;programming&quot; to &quot;game programming&quot;? Sure. Game programming can be thought of as a superset of programming: it's standard programming stuff plus the game-specific stuff (realtime input, graphics, networking, etc.). So, you've already got a foundation.&#xD;&#xA;&#xD;&#xA;Keep in mind:&#xD;&#xA;&#xD;&#xA;The game industry is insanely competitive. About half of the people in your class probably got into programming in the first place because of an interest in video games. Finding someone to pay you to make games is going to be an uphill battle. Especially if you have no field experience as a programmer, just a degree. (Real-world experience counts for a lot.)&#xD;&#xA;&#xD;&#xA;There's no rule that says you can't be a programmer by day and make games on your own time at night, as a hobby.&#xD;&#xA;&#xD;&#xA;In either case, take the time to learn how to do game programming (i.e. make some games on your own to teach yourself these skills). If you don't want to because it's too intimidating or just not fun for you, what do you think it'll be like when you have to do this stuff every day because it's your job?&#xD;&#xA;&#xD;&#xA;If you are determined to find a game programming job, there are a few paths from here:&#xD;&#xA;&#xD;&#xA; * Seek entry-level positions directly, right now. In the mean time, while you're waiting to hear back, bring yourself up to speed on game programming as best you can, and keep learning. If you are an outstanding, superstar programmer you might be able to pull this off; if not, realize you are competing against people who are, so it might take awhile.&#xD;&#xA; * Seek an entry-level position at a non-game software company. Get some experience. When you feel ready to leave, start looking for game industry work.&#xD;&#xA; * You can split the difference here: there are a fair number of &quot;serious games&quot; companies, gamification sites and similar companies that aren't &quot;entertainment games&quot; but are kinda sorta on the periphery and might be &quot;close enough&quot;... and the jobs there are usually less competitive.)&#xD;&#xA; * Find a new school that offers a game-programming-specific degree, either as a graduate degree or a second bachelor's. This will probably be expensive and is certainly no guarantee, but if you learn best in a classroom environment this might be a way to push yourself in that direction. Some of these programs also offer part-time classes so that you can go there while also keeping a day job to support yourself. WARNING: there are some good schools out there and a lot of bad ones, and mistakes are very costly in time and money here, so make sure you're getting the value you want before you start if you go this route." />
  <row Id="22205" PostHistoryTypeId="5" PostId="10544" RevisionGUID="be63dd14-af84-4757-bd15-7ce774462df6" CreationDate="2011-04-01T20:07:34.903" UserId="2301" Comment="added 254 characters in body" Text="In reply to your edited post, and not directly at prototyping a game&#xD;&#xA;&#xD;&#xA;*what was different about it from other games you tried creating?*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I couldn't stop playing it! And when I talked/showed my friends they loved the idea/gameplay.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I generally make games that I like to play, and my friends like to play. I keep them updating and that keeps me excited in creating my game.&#xD;&#xA;&#xD;&#xA;Edit: Most of my earlier games I would create for the sake of creating them and getting better at game programming. Once I started creating games not for learning or for making money is when the games starting to be better and more enjoyable." />
  <row Id="22206" PostHistoryTypeId="2" PostId="10546" RevisionGUID="e5a7caaf-4ad5-473e-98c3-89e5c662a79b" CreationDate="2011-04-01T20:09:08.117" UserId="168" Text="I would definitely take a look at some of the underlying principals in skeletal movements.&#xD;&#xA;&#xD;&#xA;General background: http://en.wikipedia.org/wiki/Inverse_kinematics &#xD;&#xA;&#xD;&#xA;Good pictures here: http://freespace.virgin.net/hugo.elias/models/m_ik.htm&#xD;&#xA;&#xD;&#xA;This guy was doing 2D stick figures: http://www.chrishecker.com/Inverse_Kinematics" />
  <row Id="22207" PostHistoryTypeId="2" PostId="10547" RevisionGUID="72cfa1fb-9e8d-4023-a06c-5bc5bbbdec4d" CreationDate="2011-04-01T20:19:39.263" UserId="2301" Text="Currently my game designs have been adequately detailed before starting. &#xD;&#xA;&#xD;&#xA;I'll flesh out most of the important classes, draw some mock-ups(drawings are usually horrible), do a description of the game. &#xD;&#xA;&#xD;&#xA;Though this is mainly due to having a long commute to work, and nothing else to do.  I would rather spend less time doing this, and more time programming, as fleshing out classes that are most likely going to change seems like overkill.&#xD;&#xA;" />
  <row Id="22208" PostHistoryTypeId="2" PostId="10548" RevisionGUID="ef5e5c74-049d-4a54-92aa-658b4e44a6c0" CreationDate="2011-04-01T20:28:33.143" UserId="5586" Text="Use an image list. (Is more memory friendly - although pay attention to the garbage collector)   &#xD;&#xA;&#xD;&#xA;Counting pixels can be good or bad. Depends on the complexity of your game. &#xD;&#xA;Pro: - it's pretty WYSIWYG.&#xD;&#xA;     - it is simple to understand what's happening&#xD;&#xA;&#xD;&#xA;Con: - Your smallest step-size is one pixel&#xD;&#xA;     - maybe you want to be able to be more precise with your controls&#xD;&#xA;&#xD;&#xA;My suggestion: If your game is reasonably simple use pixels. Otherwise calculate everything in a continuous space. " />
  <row Id="22209" PostHistoryTypeId="2" PostId="10549" RevisionGUID="e947e960-683a-4621-b6cd-ca85dc8d2566" CreationDate="2011-04-01T20:41:03.210" UserId="5586" Text="how about normalizing the vectors before calculating the dot product?  " />
  <row Id="22214" PostHistoryTypeId="2" PostId="10551" RevisionGUID="62d8cb35-8ab6-41a0-8d49-5376c93c144e" CreationDate="2011-04-01T21:08:24.660" UserId="6478" Text="Check out this resource, thorough article about the best iPhone game development frameworks:&#xD;&#xA;&#xD;&#xA;[http://www.tonylea.com/2011/best-iphone-game-frameworks/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tonylea.com/2011/best-iphone-game-frameworks/" />
  <row Id="22215" PostHistoryTypeId="25" PostId="10531" RevisionGUID="8f47743c-a7b6-468f-b08f-b9b4c601f19b" CreationDate="2011-04-01T21:08:46.797" Comment="http://twitter.com/#!/StackGameDev/status/53926803475140608" />
  <row Id="22216" PostHistoryTypeId="2" PostId="10552" RevisionGUID="9d02f992-8dcb-4447-9a27-debf4e981f81" CreationDate="2011-04-01T21:24:59.973" UserId="6479" Text="What does 2D have in common with 3D?  Not much.  2D is either a flat world or a faked 3D that, while having a visual appearance somewhat resembling 3D, has very different code from true 3D.&#xD;&#xA;&#xD;&#xA;Even for the stuff that they have in common, such as collision detection, how hard is it to extend the code into 3D?  Pretty easy.&#xD;&#xA;&#xD;&#xA;Simply put, learning 2D won't help you as much as you might think in your journey to learn 3D game or engine design.  They have little in common, and for what they do have in common, 2D isn't really an easy &quot;stepping stone&quot; to get you up to 3D." />
  <row Id="22217" PostHistoryTypeId="5" PostId="10552" RevisionGUID="6ed747f6-3bcb-4d95-b3dd-44d5a55a47f5" CreationDate="2011-04-01T21:36:27.840" UserId="6479" Comment="added 848 characters in body; added 90 characters in body; added 32 characters in body; added 14 characters in body" Text="What does 2D have in common with 3D?  Not much.  2D is either a flat world or a faked 3D that, while having a visual appearance somewhat resembling 3D, has very different code from true 3D.&#xD;&#xA;&#xD;&#xA;Even for the stuff that they have in common, such as collision detection, how hard is it to extend the code into 3D?  Pretty easy.&#xD;&#xA;&#xD;&#xA;Simply put, learning 2D won't help you as much as you might think in your journey to learn 3D game or engine design.  They have little in common, and for what they do have in common, 2D isn't really an easy &quot;stepping stone&quot; to get you up to 3D.&#xD;&#xA;&#xD;&#xA;As David Lively suggested, you might want to start out with a very basic 2D game such as Pong, but don't think that you'll have to recreate Final Fantasy, Super Mario Brothers, Zelda, etc. before you can move on to tackling 3D.  Even introductory work such as this is not for the purpose of getting 2D experience, but rather so that you can learn the basics of getting DX or openGL to work, collision detection, etc., which has as much to do with 3D as it does 2D.&#xD;&#xA;&#xD;&#xA;Let's put it this way... after learning some theory in a college course about game design, we were tasked with making a 3D engine.  I made it in about a week.  It drew 3D objects, cast shadows, drew textures, did mipmapping,  detected collisions, allowed you to jump, and brought up a menu if you right-clicked or hit {ENTER} or {ESC}.  Once you understand matrix manipulations, etc., it's really quite easy.  The time-consuming part is making it fancy: animations, making models and textures, game content, etc." />
  <row Id="22221" PostHistoryTypeId="2" PostId="10554" RevisionGUID="8961383f-8b0f-4fb4-8300-ce14164fe194" CreationDate="2011-04-01T21:42:35.090" UserId="-1" Text="" />
  <row Id="22222" PostHistoryTypeId="2" PostId="10555" RevisionGUID="625bce67-22d8-4e79-99e6-00dcc4bdf919" CreationDate="2011-04-01T21:42:35.090" UserId="-1" Text="" />
  <row Id="22223" PostHistoryTypeId="5" PostId="10552" RevisionGUID="fd8f6bd2-d633-4d9f-aeae-792b31e9de0f" CreationDate="2011-04-01T21:51:21.527" UserId="6479" Comment="added 539 characters in body" Text="What does 2D have in common with 3D?  Not much.  2D is either a flat world or a faked 3D that, while having a visual appearance somewhat resembling 3D, has very different code from true 3D.&#xD;&#xA;&#xD;&#xA;Even for the stuff that they have in common, such as collision detection, how hard is it to extend the code into 3D?  Pretty easy.&#xD;&#xA;&#xD;&#xA;Simply put, learning 2D won't help you as much as you might think in your journey to learn 3D game or engine design.  They have little in common, and for what they do have in common, 2D isn't really an easy &quot;stepping stone&quot; to get you up to 3D.&#xD;&#xA;&#xD;&#xA;As David Lively suggested, you might want to start out with a very basic 2D game such as Pong, but don't think that you'll have to recreate Final Fantasy, Super Mario Brothers, Zelda, etc. before you can move on to tackling 3D.  Even introductory work such as this is not for the purpose of acquiring lots of 2D experience, but rather for the purpose of making everything as simple as possible so that you can see basic concepts &amp; methods (collision detection, getting the graphics library initialized, etc.,) which have as much to do with 3D as they do with 2D, as quickly as possible so that you can move on to the next step.  The next step might be creating a &quot;New/Save/Load/Exit&quot; menu, which you'll once again make as simple as possible, and then you just keep adding stuff (+1 dimension to movement, models, and collision detection, then jumping, anti-aliasing, mipmapping, shadows, reflections, particles, liquids, etc.) until there's nothing more to add, and then you go back and make it fancy, filling it with content.&#xD;&#xA;&#xD;&#xA;Let's just put it this way, though.  After learning some theory in a college course about game design, we were tasked with making a 3D engine.  I made it in about a week.  It drew 3D objects, cast shadows, drew textures, did mipmapping, detected collisions, allowed you to jump, and brought up a menu if you right-clicked or hit {ENTER} or {ESC}.&#xD;&#xA;&#xD;&#xA;The time-consuming part is making it fancy... whether it be fine-tuning the engine or making models/textures/animations, game content, etc." />
  <row Id="22224" PostHistoryTypeId="5" PostId="10328" RevisionGUID="7eb5547c-be72-4ed7-bdde-08fb80ec632a" CreationDate="2011-04-01T23:06:57.937" UserId="6307" Comment="added 1008 characters in body" Text="I have been in the exact same position.&#xD;&#xA;&#xD;&#xA;What I did was playing a lot of games and thinking about what elements made the game fun. This eventually lead to my current project which basically takes it main elements from three different games I've played earlier.&#xD;&#xA;&#xD;&#xA;EDIT: Sorry, this answer was a little short.&#xD;&#xA;Anyway, earlier games I've attempted either a) was an exact clone of an existing game, which resulted in that as soon as I had completed the core functionality I would drop it as I already knew what the game was going to be like, or b) had no real plan at all, which made the code hard to overlook as different ideas was trying to get their way into the game.&#xD;&#xA;&#xD;&#xA;What I did was that I, as I said, looked not at whole games as a template but at elements, and mixed them together. I made up a clear idea of what the core functionality and content was going to be like (with a little space for some changes of course). Then I worked actively towards that goal, always checking my mental checklist (this part, done, that part done, etc.)&#xD;&#xA;&#xD;&#xA;Also, I never sat too long each programming session. Before I sat down and coded I already knew what part I was going to get done and stop and do something else.&#xD;&#xA;&#xD;&#xA;I hope this is of some more use than my original answer." />
  <row Id="22225" PostHistoryTypeId="25" PostId="10542" RevisionGUID="b713fabe-2b37-4508-bd60-5f66ba4be0df" CreationDate="2011-04-02T00:08:46.750" Comment="http://twitter.com/#!/StackGameDev/status/53972102658789376" />
  <row Id="22226" PostHistoryTypeId="2" PostId="10556" RevisionGUID="5833b81e-aaeb-4453-9100-1ae2f5cbd29e" CreationDate="2011-04-02T00:08:49.277" UserId="609" Text="For the background render in my code I need to perform an operation that essentially acts like calling **glClear(GL_DEPTH_BUFFER_BIT)** except that it needs to use the current stencil buffer to mask out parts of the screen. The other requirement is that it has to work on fixed function pipeline systems, preferably back to OpenGL 1.3.  Any suggestions on how to best do this?" />
  <row Id="22227" PostHistoryTypeId="1" PostId="10556" RevisionGUID="5833b81e-aaeb-4453-9100-1ae2f5cbd29e" CreationDate="2011-04-02T00:08:49.277" UserId="609" Text="glClear-like operation that respects the stencil buffer" />
  <row Id="22228" PostHistoryTypeId="3" PostId="10556" RevisionGUID="5833b81e-aaeb-4453-9100-1ae2f5cbd29e" CreationDate="2011-04-02T00:08:49.277" UserId="609" Text="&lt;opengl&gt;" />
  <row Id="22229" PostHistoryTypeId="5" PostId="10154" RevisionGUID="382bb35a-ef65-4495-9fda-4595f7aa0d2b" CreationDate="2011-04-02T00:39:13.607" UserId="1198" Comment="deleted 1 characters in body" Text="Game Design is the soft art of designing mechanisms for players. This is not to be used for programming questions about the &quot;design&quot; of features, engines, etc." />
  <row Id="22230" PostHistoryTypeId="24" PostId="10154" RevisionGUID="382bb35a-ef65-4495-9fda-4595f7aa0d2b" CreationDate="2011-04-02T00:39:13.607" Comment="Proposed by 1198 approved by 51 edit id of 227" />
  <row Id="22231" PostHistoryTypeId="5" PostId="9966" RevisionGUID="fa697384-2fc7-4c0f-bb85-575525312660" CreationDate="2011-04-02T00:39:27.257" UserId="1198" Comment="fixed caps, dropped signature" Text="I am using cocos2d to develop iPhone game, however, it is just an 2D engine and developer is too flexible to use them - i.e. codes tends to be unmanageable.&#xD;&#xA;&#xD;&#xA;Are there any more high level framework for game development, perfer using cocos2d?" />
  <row Id="22232" PostHistoryTypeId="24" PostId="9966" RevisionGUID="fa697384-2fc7-4c0f-bb85-575525312660" CreationDate="2011-04-02T00:39:27.257" Comment="Proposed by 1198 approved by 51 edit id of 226" />
  <row Id="22233" PostHistoryTypeId="2" PostId="10557" RevisionGUID="bb01d4cb-fd84-4aff-9d52-910bf5cba0ee" CreationDate="2011-04-02T00:55:05.997" UserId="2946" Text="Yes. Since you already know C++, now you just have to learn an API and theory.&#xD;&#xA;The main hurdle in learning 3D specifically is probably the math involved. While 2D math is pretty easy to understand at a minimum level, 3D requires a more complex understanding. There's also a ton of stuff like shaders that are definitely more relevant to 3D as opposed to 2D. If you do plan on making a game though, I would take a quick 2D route just to get the feel for making a game from start to finish (and maybe get a working GUI system that you can port over!) before going into 3D." />
  <row Id="22234" PostHistoryTypeId="2" PostId="10558" RevisionGUID="38a9bedf-99a7-4404-8c72-d7413f6ef7d1" CreationDate="2011-04-02T01:08:56.060" UserId="6480" Text="I'm new to Unreal Development.&#xD;&#xA;&#xD;&#xA;In a nutshell, how do I create a button, install it in a basic game, and capture the button click event? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22235" PostHistoryTypeId="1" PostId="10558" RevisionGUID="38a9bedf-99a7-4404-8c72-d7413f6ef7d1" CreationDate="2011-04-02T01:08:56.060" UserId="6480" Text="Unreal Engine - Scaleform - How do I capture a button click event?" />
  <row Id="22236" PostHistoryTypeId="3" PostId="10558" RevisionGUID="38a9bedf-99a7-4404-8c72-d7413f6ef7d1" CreationDate="2011-04-02T01:08:56.060" UserId="6480" Text="&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="22237" PostHistoryTypeId="2" PostId="10559" RevisionGUID="b157a270-86b1-48af-b606-1542f40d6e2c" CreationDate="2011-04-02T01:23:36.397" UserId="2798" Text="You have to do this manually:&#xD;&#xA;&#xD;&#xA; - Disable depth testing.&#xD;&#xA; - Enable depth writing.&#xD;&#xA; - Set up an orthographic projection.&#xD;&#xA; - Enable stencil testing.&#xD;&#xA; - Draw a quad that covers the entire screen and whose Z is near your far plane." />
  <row Id="22238" PostHistoryTypeId="17" PostId="10561" RevisionGUID="d8f24f7e-8f2a-4968-b4d2-17d56f1954f1" CreationDate="2011-04-02T02:32:29.433" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/64407/data-structure-to-represent-connections-between-countries-on-a-map/64409#64409" Text="" />
  <row Id="22239" PostHistoryTypeId="17" PostId="10562" RevisionGUID="a2d8043e-379b-4cb2-9a36-bb0756a5d09f" CreationDate="2011-04-02T02:32:29.433" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/64407/data-structure-to-represent-connections-between-countries-on-a-map/64410#64410" Text="" />
  <row Id="22240" PostHistoryTypeId="2" PostId="10561" RevisionGUID="8e36b9a4-b3ab-4710-b5cd-c14ab0430ba3" CreationDate="2011-04-01T17:50:49.777" UserDisplayName="Stephen Bailey" Text="Sound like a Graph and a [Shortest path Algorithm][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm" />
  <row Id="22241" PostHistoryTypeId="2" PostId="10562" RevisionGUID="f629f321-0f6a-45bb-a724-6f031b2a0229" CreationDate="2011-04-01T17:52:05.657" UserDisplayName="guiman" Text="Definitly a Graph. Check it out here [Graph Theory][1], basically you got nodes and edges. A node may contain 0 or more edges to other nodes.&#xD;&#xA;&#xD;&#xA;There are lots of algorithms to calculate the shortest path (hops or distance) , check for cicles (more than one way to reach one self), etc.&#xD;&#xA;&#xD;&#xA;Now, to be able to implement efficient solutions, that's a little more complex, but as always, there are ways.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graph_theory" />
  <row Id="22242" PostHistoryTypeId="2" PostId="10560" RevisionGUID="c22d1af9-ff22-4d4a-bf2a-65a2f200cfb3" CreationDate="2011-04-01T17:42:53.760" UserId="3552" Text="In a game I'm developing for a client a key game concept involves moving around on a map. In this case the sizes and shapes and such of the various countries are irrelevant: moving from one country to an adjacent country counts as a single step.&#xD;&#xA;&#xD;&#xA;I'm trying to figure out the best data structure for internally representing the connections between the countries. For a given country the game needs to know which countries are adjacent, both to know which ways the players can move as well as for allowing the game's AI to plot out routes, determining possible paths from one country to another. The AI also needs to evaluate how well-connected a country is, not just to its immediately-adjacent neighbors but to the neighbors of those countries, etc.&#xD;&#xA;&#xD;&#xA;I've figured out a couple of possibilities but they seem ungainly and inefficient. Because the AI will need to calculate a bunch of possible routes in order to make good decisions about its movement, &quot;inefficient&quot; is highly problematic.&#xD;&#xA;&#xD;&#xA;I suspect that this is a somewhat common CS puzzle and that there's a common solution, but I've not been able to find much by searching. Any suggestions are welcome." />
  <row Id="22243" PostHistoryTypeId="1" PostId="10560" RevisionGUID="c22d1af9-ff22-4d4a-bf2a-65a2f200cfb3" CreationDate="2011-04-01T17:42:53.760" UserId="3552" Text="Data Structure to Represent Connections Between Countries on a Map" />
  <row Id="22244" PostHistoryTypeId="3" PostId="10560" RevisionGUID="c22d1af9-ff22-4d4a-bf2a-65a2f200cfb3" CreationDate="2011-04-01T17:42:53.760" UserId="3552" Text="&lt;efficiency&gt;" />
  <row Id="22245" PostHistoryTypeId="17" PostId="10560" RevisionGUID="702d7a04-90b8-4db5-b316-e0d8a529eab6" CreationDate="2011-04-02T02:32:29.433" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/64407/data-structure-to-represent-connections-between-countries-on-a-map" Text="" />
  <row Id="22246" PostHistoryTypeId="2" PostId="10563" RevisionGUID="ed1178e1-d2f6-42e3-ba41-4146b906047b" CreationDate="2011-04-02T03:00:39.957" UserId="5311" Text="My Google-fu is failing me: is there a site in the same vein as [Rent a Coder][1], but for hiring artists?  In particular, I'm looking for a site which fits the following criteria:&#xD;&#xA;&#xD;&#xA; - Allows me to specify the style and scope of the work I'm looking for beforehand&#xD;&#xA; - Allows artists to &quot;bid&quot; on the project, including time and cost estimates&#xD;&#xA; - Showcases the work of the bidding artists so that I can see what kind of quality I can expect from each bidder&#xD;&#xA; - Is designed specifically for smaller, short-term projects or one-off graphics&#xD;&#xA;&#xD;&#xA;It seems that the original incarnation of Rent a Coder is dead (the above seems to be some sort of knockoff), and that it was probably killed by an unsustainable market full of unrealistically low bids for large projects by unskilled and unqualified &quot;coders.&quot;  That being the case, such a site might be poorly suited to art as well.&#xD;&#xA;&#xD;&#xA;The reason I'd like such a site, though, is that as a &quot;bedroom programmer&quot; with a small budget and little experience in this sort of thing, I have no idea where I should be looking for art or how much I should reasonably expect to pay.  Thus, a site with good competition where market prices are somewhat transparent would be ideal.&#xD;&#xA;&#xD;&#xA;Any other suggestions about how best to acquire custom artwork as an indie developer are also appreciated.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rent-acoder.com/" />
  <row Id="22247" PostHistoryTypeId="1" PostId="10563" RevisionGUID="ed1178e1-d2f6-42e3-ba41-4146b906047b" CreationDate="2011-04-02T03:00:39.957" UserId="5311" Text="Rent-a-Coder style site for artists" />
  <row Id="22248" PostHistoryTypeId="3" PostId="10563" RevisionGUID="ed1178e1-d2f6-42e3-ba41-4146b906047b" CreationDate="2011-04-02T03:00:39.957" UserId="5311" Text="&lt;art&gt;&lt;resources&gt;&lt;hiring&gt;&lt;human-resources&gt;" />
  <row Id="22249" PostHistoryTypeId="25" PostId="10560" RevisionGUID="01607d60-6032-43fd-8c93-de2d4f1409b5" CreationDate="2011-04-02T03:08:46.853" Comment="http://twitter.com/#!/StackGameDev/status/54017401167151104" />
  <row Id="22250" PostHistoryTypeId="2" PostId="10564" RevisionGUID="f7f0e25d-872a-4593-be4e-ddbe59b24155" CreationDate="2011-04-02T03:54:41.413" UserId="6482" Text="I was originally thinking of creating a game with Python and SFML. I understand Python is slow compared to C++, but how is it compared to Game Maker?&#xD;&#xA;&#xD;&#xA;The main reason I ask is I recently played a Game Maker game (The Iconoclasts) which ran at a fairly bad frame-rate on my computer (GMA 950). I'm worried I would have similar performance issues with Python/SFML." />
  <row Id="22251" PostHistoryTypeId="1" PostId="10564" RevisionGUID="f7f0e25d-872a-4593-be4e-ddbe59b24155" CreationDate="2011-04-02T03:54:41.413" UserId="6482" Text="Python Performance vs Game Maker" />
  <row Id="22252" PostHistoryTypeId="3" PostId="10564" RevisionGUID="f7f0e25d-872a-4593-be4e-ddbe59b24155" CreationDate="2011-04-02T03:54:41.413" UserId="6482" Text="&lt;performance&gt;&lt;python&gt;&lt;sfml&gt;" />
  <row Id="22253" PostHistoryTypeId="2" PostId="10565" RevisionGUID="2f02f2b5-a466-4cda-b0e4-7b9bd73b94e0" CreationDate="2011-04-02T05:46:00.590" UserId="1430" Text="**To say &quot;Python is slow compared to C++&quot; is a generalization that ignores a lot of real-world practicalities** and is usually a poor kind of judgement to rely on. What you really want to do is look at what a particular language or technology can bring to the table in terms of your needs and, similarly, evaluate any potential downfalls of that technology against your needs.&#xD;&#xA;&#xD;&#xA;**If you are having to ask this kind of a question, there is a very good chance that the limiting factor in terms of performance of any game you make will be *you*** and not the technology choices themselves. Consequently the optimal choice is the one that empowers you the most, in other words, the technology or language you already know best. &#xD;&#xA;&#xD;&#xA;As for the poor performance of the Game Maker game you played, that could be attributable to a number of factors, some of which are specific to that game, such as specific poor code that may have been written via Game Maker's tools or scripting languages. It isn't necessarily a fault of Game Maker itself.&#xD;&#xA;" />
  <row Id="22254" PostHistoryTypeId="25" PostId="10563" RevisionGUID="7a0fab38-926b-4363-a61c-3e8d0625729a" CreationDate="2011-04-02T06:08:46.753" Comment="http://twitter.com/#!/StackGameDev/status/54062699457417216" />
  <row Id="22255" PostHistoryTypeId="6" PostId="10560" RevisionGUID="9b4e80bf-3cdf-4a5a-8981-148c2367c37d" CreationDate="2011-04-02T07:18:11.723" UserId="3552" Comment="Added a tag" Text="&lt;maps&gt;&lt;efficiency&gt;" />
  <row Id="22256" PostHistoryTypeId="2" PostId="10566" RevisionGUID="fe313b95-35ba-4411-b9c9-b8ad6c86f319" CreationDate="2011-04-02T07:22:28.097" UserId="288" Text="If you are using SpriteBatch:&#xD;&#xA;&#xD;&#xA;- Draw everything (`SpriteBatch.Draw`) in its &quot;world space&quot;&#xD;&#xA;- Pass a translation matrix to `SpriteBatch.Begin` to translate your world space to the correct position (think of this like a camera).&#xD;&#xA;- The maximum texture size in XNA is 2048x2048 on the Reach profile, 4096x4096 for HiDef (&lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/03/12/reach-vs-hidef.aspx&quot;&gt;details&lt;/a&gt;). If your background texture is bigger, you will have to split it up and draw it in parts.&#xD;&#xA;- You may want to consider adding some &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9277/optimizing-an-xna-2d-game&quot;&gt;culling&lt;/a&gt; ***if*** you hit performance issues.&#xD;&#xA;&#xD;&#xA;You should do all your movement calculations and so on in that &quot;world space&quot;. So that box would have a position of something like `new Vector2(2000, 0)`.&#xD;&#xA;&#xD;&#xA;Your player would also have a `Vector2 position;` and probably also something like a `Vector2 velocity`. You would then `Draw` the player sprite at that position. And also use that position to create your camera matrix.&#xD;&#xA;&#xD;&#xA;For *really* huge worlds, or for physics engines that require precision, you may need to mess about rebasing your world space to maintain precision (&lt;a href=&quot;http://gamedev.stackexchange.com/questions/3351/about-floating-point-precision-and-why-do-we-still-use-it&quot;&gt;details&lt;/a&gt;). I imagine that this probably *doesn't* apply to your situation." />
  <row Id="22257" PostHistoryTypeId="25" PostId="10564" RevisionGUID="b8603c5d-13cd-4e16-9d78-ec38ac223a61" CreationDate="2011-04-02T09:08:46.410" Comment="http://twitter.com/#!/StackGameDev/status/54107996913020928" />
  <row Id="22259" PostHistoryTypeId="2" PostId="10567" RevisionGUID="777573b3-641f-4591-abed-d8a14c96d059" CreationDate="2011-04-02T09:54:18.177" UserId="2710" Text="Not sure about JMonkey, but for most 3D engines having lots of different objects has a negative impact on performance (not memory). That's because every object requires a separate call to draw it. If that's the case with JMonkey too, you'd be better off having one, or few, bigger objects. You might even build them from tiles on-the-fly." />
  <row Id="22260" PostHistoryTypeId="2" PostId="10568" RevisionGUID="b6734ab5-9471-4f41-9e52-c72a54cf7402" CreationDate="2011-04-02T10:49:29.833" UserId="3887" Text="It's best-practice to **not** to create lots of short-lived temporary objects the heap as it'll eventually force a garbage collection during game-play.  &#xD;&#xA;&#xD;&#xA;It is best to create short lived value objects.&#xD;&#xA;&#xD;&#xA;Where does this leave us with event handlers?  My game object fires events quite frequently, so I don't want to create new `MyThingDidSomethingEventArgs` every time.&#xD;&#xA;&#xD;&#xA;What's the alternative.  What do you use?" />
  <row Id="22261" PostHistoryTypeId="1" PostId="10568" RevisionGUID="b6734ab5-9471-4f41-9e52-c72a54cf7402" CreationDate="2011-04-02T10:49:29.833" UserId="3887" Text="How should I manage events in XNA on the Windows Phone 7 without impacting performance?" />
  <row Id="22262" PostHistoryTypeId="3" PostId="10568" RevisionGUID="b6734ab5-9471-4f41-9e52-c72a54cf7402" CreationDate="2011-04-02T10:49:29.833" UserId="3887" Text="&lt;xna&gt;&lt;performance&gt;&lt;events&gt;&lt;windows-phone-7&gt;" />
  <row Id="22263" PostHistoryTypeId="2" PostId="10569" RevisionGUID="edbb4e13-b82a-41d5-9a32-3ed6184cbd61" CreationDate="2011-04-02T11:59:27.557" UserId="5224" Text="You could let MyThingDidSomethingEventArgs be a struct, these are generally (not always) created on the stack instead of on the heap. However this is only viable if you include only value-types in the struct.&#xD;&#xA;&#xD;&#xA;However more important is: what is 'quite frequently', if it's not dozens times per frame than its not going to be an issue so you shouldn't be worrying about this too soon. I understand you want to keep to best practices, but this isn't a best practice more of a optimization hint that should only be applied after you've measured that performance is impacted because of frequent garbage collection." />
  <row Id="22264" PostHistoryTypeId="2" PostId="10570" RevisionGUID="ec860b14-d9d4-48b8-abbd-dd30a7f31789" CreationDate="2011-04-02T11:59:54.493" UserId="288" Text="See this document: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/w369ty8x(v=VS.100).aspx&quot;&gt;How to: Publish Events that Conform to .NET Framework Guidelines (C# Programming Guide)&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;**Ignore it.**&#xD;&#xA;&#xD;&#xA;There is no compelling reason to follow those guidelines when you are making a game. Make your own delegate type that takes appropriate types (either existing object references or value types):&#xD;&#xA;&#xD;&#xA;    public delegate void DidSomethingHandler(MyThing what, Vector2 where);&#xD;&#xA;    public event DidSomethingHandler DidSomething;&#xD;&#xA;&#xD;&#xA;Or, if you want to be especially lazy (*protip: you want to be especially lazy*), you can even just do this:&#xD;&#xA;&#xD;&#xA;    public event Action&lt;MyThing, Vector2&gt; DidSomething;&#xD;&#xA;&#xD;&#xA;(If creating your own delegate provides better documentation or will be used in many places, do that, otherwise just use an `Action`.)" />
  <row Id="22265" PostHistoryTypeId="25" PostId="10568" RevisionGUID="3831c2c6-eb14-494b-aec2-c9edd691a818" CreationDate="2011-04-02T12:08:46.760" Comment="http://twitter.com/#!/StackGameDev/status/54153295903723520" />
  <row Id="22266" PostHistoryTypeId="2" PostId="10571" RevisionGUID="c2aa6cd9-a38c-482b-b1e5-889207ce7a28" CreationDate="2011-04-02T12:29:44.597" UserId="2332" Text="It sounds like you're after assets rather than an actual artist. If that's the case, then I'd suggest [TurboSquid][1].&#xD;&#xA;&#xD;&#xA;Rather than separate artists, it has a whole load of art assets, where some you have to pay for, and others are free (generally &quot;you get what you pay for&quot; applies to the site). The advantage of this site is that you can see exactly what you're getting before entering into any agreement with the artist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com/" />
  <row Id="22267" PostHistoryTypeId="5" PostId="10570" RevisionGUID="9fc42659-8096-4481-b446-98185e3f53d6" CreationDate="2011-04-02T15:05:20.343" UserId="288" Comment="added 356 characters in body" Text="See this document: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/w369ty8x(v=VS.100).aspx&quot;&gt;How to: Publish Events that Conform to .NET Framework Guidelines (C# Programming Guide)&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;**Ignore it.**&#xD;&#xA;&#xD;&#xA;There is no compelling reason to follow those guidelines when you are making a game. Make your own delegate type that takes appropriate types (either existing object references or value types):&#xD;&#xA;&#xD;&#xA;    public delegate void DidSomethingHandler(MyThing what, Vector2 where);&#xD;&#xA;    public event DidSomethingHandler DidSomething;&#xD;&#xA;&#xD;&#xA;Or, if you want to be especially lazy (*protip: you want to be especially lazy*), you can even just do this:&#xD;&#xA;&#xD;&#xA;    public event Action&lt;MyThing, Vector2&gt; DidSomething;&#xD;&#xA;&#xD;&#xA;(If creating your own delegate provides better documentation or will be used in many places, do that, otherwise just use an `Action`.)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Footnote: When *are* those event guidelines applicable? When someone else will be consuming your code - especially in versioning situations. See also: &lt;a href=&quot;http://stackoverflow.com/questions/2283073/what-are-the-benefits-of-having-events-conforming-to-net-guidelines&quot;&gt;What are the benefits of having events conforming to Net guidelines?&lt;/a&gt;." />
  <row Id="22268" PostHistoryTypeId="25" PostId="10556" RevisionGUID="6af7e787-152c-4c82-b0b8-b7ca17884d3e" CreationDate="2011-04-02T15:08:46.750" Comment="http://twitter.com/#!/StackGameDev/status/54198595158683648" />
  <row Id="22269" PostHistoryTypeId="2" PostId="10572" RevisionGUID="7430475d-7dbd-4b19-8fda-b3b1694ed2a4" CreationDate="2011-04-02T16:02:59.130" UserId="4234" Text="Hey. I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the projectile itself? I'd like to keep the projectile at the center of the 'camera', but I'm not sure how to do this in Silverlight. I thought of using a translate transform to constantly scroll the parent canvas's position, but is this the best way of doing this in SL? thanks" />
  <row Id="22270" PostHistoryTypeId="1" PostId="10572" RevisionGUID="7430475d-7dbd-4b19-8fda-b3b1694ed2a4" CreationDate="2011-04-02T16:02:59.130" UserId="4234" Text="Silverlight scrolling with camera" />
  <row Id="22271" PostHistoryTypeId="3" PostId="10572" RevisionGUID="7430475d-7dbd-4b19-8fda-b3b1694ed2a4" CreationDate="2011-04-02T16:02:59.130" UserId="4234" Text="&lt;c#&gt;&lt;physics&gt;&lt;camera&gt;&lt;side-scroller&gt;&lt;silverlight&gt;" />
  <row Id="22272" PostHistoryTypeId="2" PostId="10573" RevisionGUID="a13e4a78-49c0-4ca4-9096-4cdfba21dda1" CreationDate="2011-04-02T16:08:36.143" UserId="4345" Text="As already mentioned you would need a graph representing all possible connections between countries. Each connections would also hold the distance between two countries.&#xD;&#xA;&#xD;&#xA;Then a path-finding algorithm like A* can be used to determine the shortest path between two countries.&#xD;&#xA;&#xD;&#xA;There are also some good books about game ai:&#xD;&#xA;Game AI by example by Mat Buckland&#xD;&#xA;http://www.ai-junkie.com/books/toc_pgaibe.html&#xD;&#xA;&#xD;&#xA;or the AI Game Programming Wisdom series.&#xD;&#xA;http://www.aiwisdom.com/&#xD;&#xA;The first book has several chapters about pathfinding." />
  <row Id="22273" PostHistoryTypeId="2" PostId="10574" RevisionGUID="2668a62f-2d1d-4d35-a853-8308237964b0" CreationDate="2011-04-02T16:51:56.317" UserId="-1" Text="" />
  <row Id="22274" PostHistoryTypeId="2" PostId="10575" RevisionGUID="ddc5bae4-13b2-4a15-b07e-772966c65002" CreationDate="2011-04-02T16:51:56.317" UserId="-1" Text="" />
  <row Id="22275" PostHistoryTypeId="2" PostId="10576" RevisionGUID="49fe525f-32e7-4ad9-a416-951a967486bd" CreationDate="2011-04-02T16:53:43.227" UserId="-1" Text="" />
  <row Id="22276" PostHistoryTypeId="2" PostId="10577" RevisionGUID="6b9abf1c-7201-4c33-afc8-3234bbb0c890" CreationDate="2011-04-02T16:53:43.227" UserId="-1" Text="" />
  <row Id="22277" PostHistoryTypeId="2" PostId="10578" RevisionGUID="3b138408-b8e1-421c-a8b6-34abb7428d1d" CreationDate="2011-04-02T16:55:00.040" UserId="-1" Text="" />
  <row Id="22278" PostHistoryTypeId="2" PostId="10579" RevisionGUID="d76914df-25b6-41be-91c4-4b780065ec52" CreationDate="2011-04-02T16:55:00.040" UserId="-1" Text="" />
  <row Id="22279" PostHistoryTypeId="2" PostId="10580" RevisionGUID="9317406d-78c3-4e04-af20-2d7e9e9122b9" CreationDate="2011-04-02T17:05:10.983" UserId="5540" Text="If I had to guess the biggest reason that the game you played runs so slow is not that it's a game maker game, but that game maker markets itself specifically to non-programmers. Because you have non programmers making games it's highly likely that the game in question uses some very inefficient algorithms that cause it to run slow.&#xD;&#xA;&#xD;&#xA;As in most cases, the speed of the language will only lightly affect the overall performance of the program. When people say &quot;omg this language is 50% slower than this other language&quot; and the speed is still stupid fast in both cases then you'll find little to no discernible difference to the end user. " />
  <row Id="22280" PostHistoryTypeId="5" PostId="10151" RevisionGUID="37fd532d-0abd-4ab9-8ddb-9550a03532d0" CreationDate="2011-04-02T17:13:10.053" UserId="5399" Comment="added 384 characters in body" Text="I know this was asked a while back but i've spent some time on this for my own project so in case anyone else wants to know here are the results of my experiments (assuming you are thinking of skinned characters):&#xD;&#xA;&#xD;&#xA;**On Licensing**  &#xD;&#xA;Daz is venturing (tentatively) into the 3d assest market and as such their new EULA does permit use of their models (&amp; derived) in computer games with a couple of restrictions:&#xD;&#xA;&#xD;&#xA;&gt; SUMMARY: &#xD;&#xA;&gt; &#xD;&#xA;&gt; Summary of section 5 – INCORPORATION&#xD;&#xA;&gt; OF 3D MODEL(S) INTO OTHER WORKS &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may use the 3D content/models or&#xD;&#xA;&gt; derivatives thereof when embedded in a&#xD;&#xA;&gt; single game or other project if you&#xD;&#xA;&gt; have purchased the “single-use”&#xD;&#xA;&gt; license. By purchasing the&#xD;&#xA;&gt; “multiple-use” license, you may use&#xD;&#xA;&gt; the content/models or derivatives&#xD;&#xA;&gt; thereof when embedded in the number of&#xD;&#xA;&gt; games or projects authorized by the&#xD;&#xA;&gt; multiple-use license. &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may publish, market, distribute,&#xD;&#xA;&gt; transfer or sell any games or projects&#xD;&#xA;&gt; that contain DAZ content/models as&#xD;&#xA;&gt; long as the DAZ content/models are not&#xD;&#xA;&gt; accessible to end users in their&#xD;&#xA;&gt; native formats and are protected by&#xD;&#xA;&gt; asset protection technology,&#xD;&#xA;&gt; encryption or whatever means necessary&#xD;&#xA;&gt; to protect them from theft or&#xD;&#xA;&gt; copyright infringement.&#xD;&#xA;&#xD;&#xA;([https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula][1])&#xD;&#xA;&#xD;&#xA;In regards to open source projects I am not sure (I emailed and haven't had a response yet).&#xD;&#xA;Bear in mind however that most of the content sold in Daz's store and in other marketplaces like Renderosity have their own licenses.&#xD;&#xA;&#xD;&#xA;_[See update 1]_&#xD;&#xA;&#xD;&#xA;**File Formats**  &#xD;&#xA;Daz Studio is free and can import/export OBJ and COLLADA files as standard. Plugins can be purchased to export to CR2 (Poser Characters) and FBX.&#xD;&#xA;&#xD;&#xA;In my experience OBJ transports fine between 3DS Max &amp; Daz Studio but the associated MTL material files do not; I am not sure whether this is due to Daz or Max (probably a bit of both). The problems can be resolved easily with a text editor - but it is still another stage in your pipeline no matter how small.&#xD;&#xA;&#xD;&#xA;An important point to consider is rigging. As opposed to vertex weighting, Daz models consist of many distinct poly groups which correspond to bones. These groups deform with respect to a single bone based on spherical falloff zones defined for each axis of rotation.&#xD;&#xA;(I think this is used to maintain compatibility with Poser; certainly i've seen posts on their forums of people saying vertex weighting would be easier when creating clothing)&#xD;&#xA;&#xD;&#xA;The OBJ format does not support vertex weights, or skeletons (though I suppose you may be able to pack one in with something like empty poly groups, I doubt it would be pretty).&#xD;&#xA;&#xD;&#xA;Daz can convert these falloff zones to vertex weights when exporting to FBX and the results are pretty good - I'm sure a modeller could do better if they were working with vertex weighting natively but its unlikely you'll notice unless the limbs are at extremes.&#xD;&#xA;&#xD;&#xA;Poser CR2 files support the poly group rigging but are horrifically complex. Check out Kuroyume's CR2 spec (http://www.kuroyumes-developmentzone.com/poser/poserfilespec/products_poser_cr2.html) to see what I mean.  &#xD;&#xA;CR2 files make liberal use of external references so you will need to process OBJs in full to support CR2s. Further that spec is for an older format. The latest version (8 I believe) had about 5 new sections when I tried to import it using the CR2 importer I've been working on.&#xD;&#xA;&#xD;&#xA;I haven't seen any open source CR2 importers you could modify easily for your project - it looks as if usually people start on one then give up halfway through and writing one myself I can see why!   &#xD;&#xA;&#xD;&#xA;**Performance**  &#xD;&#xA;Daz models are very high poly but I dont think this is as much of an issue as people make out. Daz has 'Decimator', a plugin which can reduce the poly count, though I don't even use it on the Daz models I use in my XNA project as they render perfectly fast; the count is about ~130,000 polys for V4 (base female human model).&#xD;&#xA;&#xD;&#xA;Whats more of a concern is the textures.&#xD;&#xA;&#xD;&#xA;1. They are very large (esp. third party products), so you will need to resize them in the pipeline depending on your engine/api.&#xD;&#xA;&#xD;&#xA;2. They are numerous. (I'm talking 3 different textures for the EYE!)&#xD;&#xA;&#xD;&#xA;3. Most importantly the materials have all sorts of 'odd' configurations - things like bump and transparency maps with no diffuse map. Its not that they are hard to support, its that there are so many different combinations you either need a very comprehensive importer or very comprehensive shader set and model class.  &#xD;&#xA;My importer combines the trans and diffuse maps (creating if necessary), and adds vertex colour and normal data if missing - as a result I pack alot of 'white' structures into the resultant file but I only need 4 shaders.&#xD;&#xA;&#xD;&#xA;**Alpha Sorting**  &#xD;&#xA;Daz models (like probably most organic models) makes liberal use of transparency maps; further the nature of the models prohibits depth sorting before drawing.&#xD;&#xA;&#xD;&#xA;Let me pose a question: When you model an eye, do you surround the completed model eye with an extraneous sphere that has a solid diffuse colour (no map) but a transparency map that turns it invisible? So when the unsuspecting prospective game developer loads up the model the eyes appear black from the outside while from the inside are textured fine? Daz does. (Its to create the glossy wet sheen effect - turn the opacity setting of the material 7_EyeSurface down to 0 on the default V4 to see what I mean)&#xD;&#xA;&#xD;&#xA;I use 2-pass alpha sorting which is best for the 'cutout' transparency maps (which is what Daz models use it for mostly). This is built right into my model base class and engine from the start.&#xD;&#xA;&#xD;&#xA;**Customizing the character**  &#xD;&#xA;Clothes don't have to have a loose fit to deform properly once exported with bone weights, but beware that those ~90,000+ polys they are obscuring will still be there.&#xD;&#xA;&#xD;&#xA;**Animation**  &#xD;&#xA;FBX supports animation (in theory). Daz does have a keyframe animation editor but its a little 'light' and not easy to use. Daz also has plugins such as AniMate Lite which allow you to drag and drop animation segments into a timeline and then bake the keyframes into an animation to be exported.&#xD;&#xA;&#xD;&#xA;I've found extracting animations from FBX to be a little hit and miss, especically when baked from AniMate. For example, the walking animation 'block' will acctually move the model in model space so you couldn't simply pop that into the timeline, bake, export and then move your character around in time with it in an FPS.&#xD;&#xA;&#xD;&#xA;Further I've found that sometimes the exported animation causes the mesh, or a prop, to deform incorrectly; and since FBX files are accessed with an Autodesk SDK as opposed to with a custom importer like most formats its not trivial to look inside and see where the problem lies. (On the plus side I've worked out where the Dead Space developers got the ideas for all their monsters.)&#xD;&#xA;&#xD;&#xA;**To Summarise**  &#xD;&#xA;&#xD;&#xA; 1. If you want to use Daz models you&#xD;&#xA;    will need the FBX exporter because&#xD;&#xA;    OBJ is not comprehensive enough and&#xD;&#xA;    CR2s are too complex to import, and&#xD;&#xA;    even if you did your shader would&#xD;&#xA;    need to support a new type of&#xD;&#xA;    rigging*.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA; 2. Do not be concerned with poly counts&#xD;&#xA;    or texture sizes until you need to&#xD;&#xA;    be. Textures can be resized (and&#xD;&#xA;    also combined into one texture for&#xD;&#xA;    the whole character using Daz's&#xD;&#xA;    Texture Atlas) and Daz has plugins&#xD;&#xA;    for reducing poly counts IF you need&#xD;&#xA;    them.&#xD;&#xA;    &#xD;&#xA;   &#xD;&#xA; 3. Do be aware that the models will&#xD;&#xA;    have quirks that a game artist would&#xD;&#xA;    never dream of putting in - 3x&#xD;&#xA;    texture for 1x eye and 'specular&#xD;&#xA;    surface sphere' for example.&#xD;&#xA;&#xD;&#xA;I think Daz models are a super resource, esp. for hobbyist developers, but to be used seriously they would be best utilized _as_ a resource as opposed to a complete asset - design your characters, clothe them, _then_ cull unseen polys, bake and animate in the modeller of your choice. &#xD;&#xA;Also, while Studio itself is free, to create and equip characters to a resonable standard, and export them in useful formats, you will need ~£70-100 worth of content and plugins minimum.&#xD;&#xA;&#xD;&#xA;*Not saying that would be prohibitively hard though - maybe have say a single 'vertex distance' plugged in by the importer as opposed to four vertex weights, and set the falloff zones &amp; transform shader wide for each poly group (geometry segment).&#xD;&#xA;&#xD;&#xA;**Update 1:**&#xD;&#xA;When purchasing Daz models for use in realtime rendering environments, it needs to be done via Daz's Developer Store at http://developer.daz3d.com; this site has the option to buy a Single or Multiple Use license.&#xD;&#xA;The V4 Base in the developer store starts at ~$60 so it may be worth prototyping with the free V4 Base from the regular store first.&#xD;&#xA;&#xD;&#xA;  [1]: https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula" />
  <row Id="22281" PostHistoryTypeId="5" PostId="10151" RevisionGUID="b857061c-32c0-4750-a5eb-0ef1b6039ff7" CreationDate="2011-04-02T17:50:46.047" UserId="5399" Comment="added 334 characters in body" Text="I know this was asked a while back but i've spent some time on this for my own project so in case anyone else wants to know here are the results of my experiments (assuming you are thinking of skinned characters):&#xD;&#xA;&#xD;&#xA;**On Licensing**  &#xD;&#xA;Daz is venturing (tentatively) into the 3d assest market and as such their new EULA does permit use of their models (&amp; derived) in computer games with a couple of restrictions:&#xD;&#xA;&#xD;&#xA;&gt; SUMMARY: &#xD;&#xA;&gt; &#xD;&#xA;&gt; Summary of section 5 – INCORPORATION&#xD;&#xA;&gt; OF 3D MODEL(S) INTO OTHER WORKS &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may use the 3D content/models or&#xD;&#xA;&gt; derivatives thereof when embedded in a&#xD;&#xA;&gt; single game or other project if you&#xD;&#xA;&gt; have purchased the “single-use”&#xD;&#xA;&gt; license. By purchasing the&#xD;&#xA;&gt; “multiple-use” license, you may use&#xD;&#xA;&gt; the content/models or derivatives&#xD;&#xA;&gt; thereof when embedded in the number of&#xD;&#xA;&gt; games or projects authorized by the&#xD;&#xA;&gt; multiple-use license. &#xD;&#xA;&gt; &#xD;&#xA;&gt; You may publish, market, distribute,&#xD;&#xA;&gt; transfer or sell any games or projects&#xD;&#xA;&gt; that contain DAZ content/models as&#xD;&#xA;&gt; long as the DAZ content/models are not&#xD;&#xA;&gt; accessible to end users in their&#xD;&#xA;&gt; native formats and are protected by&#xD;&#xA;&gt; asset protection technology,&#xD;&#xA;&gt; encryption or whatever means necessary&#xD;&#xA;&gt; to protect them from theft or&#xD;&#xA;&gt; copyright infringement.&#xD;&#xA;&#xD;&#xA;([https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula][1])&#xD;&#xA;&#xD;&#xA;In regards to open source projects I am not sure (I emailed and haven't had a response yet).&#xD;&#xA;Bear in mind however that most of the content sold in Daz's store and in other marketplaces like Renderosity have their own licenses.&#xD;&#xA;&#xD;&#xA;_[See update 1]_&#xD;&#xA;&#xD;&#xA;**File Formats**  &#xD;&#xA;Daz Studio is free and can import/export OBJ and COLLADA files as standard. Plugins can be purchased to export to CR2 (Poser Characters) and FBX.&#xD;&#xA;&#xD;&#xA;In my experience OBJ transports fine between 3DS Max &amp; Daz Studio but the associated MTL material files do not; I am not sure whether this is due to Daz or Max (probably a bit of both). The problems can be resolved easily with a text editor - but it is still another stage in your pipeline no matter how small.&#xD;&#xA;&#xD;&#xA;An important point to consider is rigging. As opposed to vertex weighting, Daz models consist of many distinct poly groups which correspond to bones. These groups deform with respect to a single bone based on spherical falloff zones defined for each axis of rotation.&#xD;&#xA;(I think this is used to maintain compatibility with Poser; certainly i've seen posts on their forums of people saying vertex weighting would be easier when creating clothing)&#xD;&#xA;&#xD;&#xA;The OBJ format does not support vertex weights, or skeletons (though I suppose you may be able to pack one in with something like empty poly groups, I doubt it would be pretty).&#xD;&#xA;&#xD;&#xA;Daz can convert these falloff zones to vertex weights when exporting to FBX and the results are pretty good - I'm sure a modeller could do better if they were working with vertex weighting natively but its unlikely you'll notice unless the limbs are at extremes.&#xD;&#xA;&#xD;&#xA;Poser CR2 files support the poly group rigging but are horrifically complex. Check out Kuroyume's CR2 spec (http://www.kuroyumes-developmentzone.com/poser/poserfilespec/products_poser_cr2.html) to see what I mean.  &#xD;&#xA;CR2 files make liberal use of external references so you will need to process OBJs in full to support CR2s. Further that spec is for an older format. The latest version (8 I believe) had about 5 new sections when I tried to import it using the CR2 importer I've been working on.&#xD;&#xA;&#xD;&#xA;I haven't seen any open source CR2 importers you could modify easily for your project - it looks as if usually people start on one then give up halfway through and writing one myself I can see why!   &#xD;&#xA;&#xD;&#xA;**Performance**  &#xD;&#xA;Daz models are very high poly but I dont think this is as much of an issue as people make out. Daz has 'Decimator', a plugin which can reduce the poly count, though I don't even use it on the Daz models I use in my XNA project as they render perfectly fast; the count is about ~130,000 polys for V4 (base female human model).&#xD;&#xA;&#xD;&#xA;Whats more of a concern is the textures.&#xD;&#xA;&#xD;&#xA;1. They are very large (esp. third party products), so you will need to resize them in the pipeline depending on your engine/api.&#xD;&#xA;&#xD;&#xA;2. They are numerous. (I'm talking 3 different textures for the EYE!)&#xD;&#xA;&#xD;&#xA;3. Most importantly the materials have all sorts of 'odd' configurations - things like bump and transparency maps with no diffuse map. Its not that they are hard to support, its that there are so many different combinations you either need a very comprehensive importer or very comprehensive shader set and model class.  &#xD;&#xA;My importer combines the trans and diffuse maps (creating if necessary), and adds vertex colour and normal data if missing - as a result I pack alot of 'white' structures into the resultant file but I only need 4 shaders.&#xD;&#xA;&#xD;&#xA;**Alpha Sorting**  &#xD;&#xA;Daz models (like probably most organic models) makes liberal use of transparency maps; further the nature of the models prohibits depth sorting before drawing.&#xD;&#xA;&#xD;&#xA;Let me pose a question: When you model an eye, do you surround the completed model eye with an extraneous sphere that has a solid diffuse colour (no map) but a transparency map that turns it invisible? So when the unsuspecting prospective game developer loads up the model the eyes appear black from the outside while from the inside are textured fine? Daz does. (Its to create the glossy wet sheen effect - turn the opacity setting of the material 7_EyeSurface down to 0 on the default V4 to see what I mean)&#xD;&#xA;&#xD;&#xA;I use 2-pass alpha sorting which is best for the 'cutout' transparency maps (which is what Daz models use it for mostly). This is built right into my model base class and engine from the start.&#xD;&#xA;&#xD;&#xA;**Customizing the character**  &#xD;&#xA;Clothes don't have to have a loose fit to deform properly once exported with bone weights, but beware that those ~90,000+ polys they are obscuring will still be there.&#xD;&#xA;&#xD;&#xA;**Animation**  &#xD;&#xA;FBX supports animation (in theory). Daz does have a keyframe animation editor but its a little 'light' and not easy to use. Daz also has plugins such as AniMate Lite which allow you to drag and drop animation segments into a timeline and then bake the keyframes into an animation to be exported.&#xD;&#xA;&#xD;&#xA;I've found extracting animations from FBX to be a little hit and miss, especically when baked from AniMate. For example, the walking animation 'block' will acctually move the model in model space so you couldn't simply pop that into the timeline, bake, export and then move your character around in time with it in an FPS.&#xD;&#xA;&#xD;&#xA;Further I've found that sometimes the exported animation causes the mesh, or a prop, to deform incorrectly; and since FBX files are accessed with an Autodesk SDK as opposed to with a custom importer like most formats its not trivial to look inside and see where the problem lies. (On the plus side I've worked out where the Dead Space developers got the ideas for all their monsters.)&#xD;&#xA;&#xD;&#xA;**To Summarise**  &#xD;&#xA;&#xD;&#xA; 1. If you want to use Daz models you&#xD;&#xA;    will need the FBX exporter because&#xD;&#xA;    OBJ is not comprehensive enough and&#xD;&#xA;    CR2s are too complex to import, and&#xD;&#xA;    even if you did your shader would&#xD;&#xA;    need to support a new type of&#xD;&#xA;    rigging*.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA; 2. Do not be concerned with poly counts&#xD;&#xA;    or texture sizes until you need to&#xD;&#xA;    be. Textures can be resized (and&#xD;&#xA;    also combined into one texture for&#xD;&#xA;    the whole character using Daz's&#xD;&#xA;    Texture Atlas) and Daz has plugins&#xD;&#xA;    for reducing poly counts IF you need&#xD;&#xA;    them.&#xD;&#xA;    &#xD;&#xA;   &#xD;&#xA; 3. Do be aware that the models will&#xD;&#xA;    have quirks that a game artist would&#xD;&#xA;    never dream of putting in - 3x&#xD;&#xA;    texture for 1x eye and 'specular&#xD;&#xA;    surface sphere' for example.&#xD;&#xA;&#xD;&#xA;I think Daz models are a super resource, esp. for hobbyist developers, but to be used seriously they would be best utilized _as_ a resource as opposed to a complete asset - design your characters, clothe them, _then_ cull unseen polys, bake and animate in the modeller of your choice. &#xD;&#xA;Also, while Studio itself is free, to create and equip characters to a resonable standard, and export them in useful formats, you will need ~£70-100 worth of content and plugins minimum.&#xD;&#xA;&#xD;&#xA;*Not saying that would be prohibitively hard though - maybe have say a single 'vertex distance' plugged in by the importer as opposed to four vertex weights, and set the falloff zones &amp; transform shader wide for each poly group (geometry segment).&#xD;&#xA;&#xD;&#xA;**Update 1:**&#xD;&#xA;When purchasing Daz models for use in realtime rendering environments, it needs to be done via Daz's Developer Store at http://developer.daz3d.com; this site has the option to buy a Single or Multiple Use license.&#xD;&#xA;The V4 Base in the developer store starts at ~$60 so it may be worth prototyping with the free V4 Base from the regular store first.&#xD;&#xA;&#xD;&#xA;According to [the Daz Developer Store FAQ][2] models may not be given away for free, i.e. distributed as a part of any free project such as an open source game or mod.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://helpdaz.zendesk.com/entries/123880-what-is-daz-3d-s-real-time-game-content-end-user-license-agreement-eula&#xD;&#xA;  [2]: http://forum.daz3d.com/viewtopic.php?t=134701&amp;start=0&amp;postdays=0&amp;postorder=asc&amp;highlight=&amp;sid=7de96a0b6e6edf3178cb93acadc430b3 &quot;Daz Developer Store FAQ&quot;" />
  <row Id="22282" PostHistoryTypeId="25" PostId="10572" RevisionGUID="15948cf1-13d0-40ef-ba52-c69920f1cdcf" CreationDate="2011-04-02T18:08:52.043" Comment="http://twitter.com/#!/StackGameDev/status/54243916035264512" />
  <row Id="22283" PostHistoryTypeId="2" PostId="10581" RevisionGUID="ccdf894b-bdc7-455d-9cad-c846cc39dce4" CreationDate="2011-04-02T18:12:56.100" UserId="1929" Text="I would suggest you go with a 2D engine that can help you do this. I use FlatRedBall personally, and initially it did have the capability to focus the camera on a single object regardless of that object's velocity or acceleration. (I believe it still does, but I haven't tried this recently.)&#xD;&#xA;&#xD;&#xA;Applying forces to all background sprites is **not** a good idea; you should mimic the natural approach, which is to apply physics on the bullet.&#xD;&#xA;&#xD;&#xA;I'm also making a 2D map game in Silverlight, but I haven't reached this point yet due to other constraints. It shouldn't be hard, given a good engine. FRB is good because it handles both graphics and physics simultaneously." />
  <row Id="22284" PostHistoryTypeId="2" PostId="10582" RevisionGUID="b261f42e-40c1-4e45-84d8-b88462046767" CreationDate="2011-04-02T18:14:08.080" UserId="1929" Text="If you're interested in artists, the best I can recommend is oDesk. I used it once for an artist, and it's fairly good, because it allows you to track their time usage per ten minutes (it takes screen-shots of what they're doing) and it bills by the hour.&#xD;&#xA;&#xD;&#xA;There are a fair number of artists there; when I posted a request, I got around 10-20 proposals. (I asked for a nice 2D title screen.)" />
  <row Id="22285" PostHistoryTypeId="2" PostId="10583" RevisionGUID="8bb3c54f-f4d5-4e09-9254-c3cd92a362fe" CreationDate="2011-04-02T18:17:59.420" UserId="1995" Text="Newbie alert :S&#xD;&#xA;&#xD;&#xA;I have to add sound to a game and I found that you can use xact, thats fine, however why not just use Content.Load&lt;Audio&gt;....&#xD;&#xA;&#xD;&#xA;Besides the tweaking of the sound, are there any other advantages to using Xact?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22286" PostHistoryTypeId="1" PostId="10583" RevisionGUID="8bb3c54f-f4d5-4e09-9254-c3cd92a362fe" CreationDate="2011-04-02T18:17:59.420" UserId="1995" Text="XNA: Why use Xact when I can use Content.Load?" />
  <row Id="22287" PostHistoryTypeId="3" PostId="10583" RevisionGUID="8bb3c54f-f4d5-4e09-9254-c3cd92a362fe" CreationDate="2011-04-02T18:17:59.420" UserId="1995" Text="&lt;xna&gt;&lt;sound&gt;" />
  <row Id="22288" PostHistoryTypeId="2" PostId="10584" RevisionGUID="1f63e5e7-aa7e-4418-9f1f-62ec9b074aaa" CreationDate="2011-04-02T18:27:58.697" UserId="5899" Text=" - Send of signals:&#xD;&#xA;&#xD;&#xA;We can send messages from flash to UDK with the ActionScript command fscommand( &quot;mycommand&quot; )&#xD;&#xA;&#xD;&#xA;For example, we want a button that permit us exit from the game&#xD;&#xA;&#xD;&#xA;With ActionScript, we asign the function fscommand(&quot;exit&quot;) to the click button event&#xD;&#xA;&#xD;&#xA;    btn_exit.addEventListener( &quot;click&quot;, this, &quot;btn_exit_click&quot; );&#xD;&#xA;&#xD;&#xA;    function btn_exit_click():Void&#xD;&#xA;    {&#xD;&#xA;        fscommand(&quot;exit&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; - Receiving message:&#xD;&#xA;&#xD;&#xA;From kismet we can receive the pulsation of the button, for this:&#xD;&#xA;&#xD;&#xA;New event -&gt; GFx Ui -&gt; fscommand&#xD;&#xA;![.][1]&#xD;&#xA;&#xD;&#xA;Inside the properties, we have two that are necessary, Movie and FSCommand&#xD;&#xA;&#xD;&#xA;On Movie we'll put the flash movie that we are using ( button with green arrow ) and in FSCommand we write the command that we are waiting for, in that case Exit&#xD;&#xA;&#xD;&#xA;![.][2]&#xD;&#xA;&#xD;&#xA; - Send of signals:&#xD;&#xA;&#xD;&#xA;We can connect the exit to that we want to happen when the signal was sended from Flash.&#xD;&#xA;&#xD;&#xA;With this example, we are created a &quot;Console Command&quot;&#xD;&#xA;&#xD;&#xA;New Action -&gt; Misc -&gt; Console Command&#xD;&#xA;&#xD;&#xA;![.][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yc7W3.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/n06CK.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/8xwR8.jpg" />
  <row Id="22289" PostHistoryTypeId="5" PostId="10572" RevisionGUID="6cf940ed-8886-4d7d-9c96-cc2ff7a13aba" CreationDate="2011-04-02T19:07:09.503" UserId="1198" Comment="removed greeting and signature" Text="I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the projectile itself? I'd like to keep the projectile at the center of the 'camera', but I'm not sure how to do this in Silverlight. I thought of using a translate transform to constantly scroll the parent canvas's position, but is this the best way of doing this in Silverlight?" />
  <row Id="22290" PostHistoryTypeId="24" PostId="10572" RevisionGUID="6cf940ed-8886-4d7d-9c96-cc2ff7a13aba" CreationDate="2011-04-02T19:07:09.503" Comment="Proposed by 1198 approved by 14 edit id of 234" />
  <row Id="22291" PostHistoryTypeId="5" PostId="10578" RevisionGUID="31ae4373-1796-41a9-a4e6-c0994296bab3" CreationDate="2011-04-02T19:07:13.500" UserId="382" Comment="added 807 characters in body" Text="Adobe ActionScript is the open source object orientated programming language of the Adobe Flash Platform. ActionScript 3 is a dialect of ECMAScript, targeted for Adobe Flash Player 9 and higher.&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;&#xD;&#xA;- [Complete ActionScript language reference][1] (Flash, Flex/AIR, FlashLite, ColdFusion, LCDS, BlazeDS, etc).&#xD;&#xA;- ActionScript language reference [Flash 9][2] &#xD;&#xA;- ActionScript language reference [Flash 10][3]&#xD;&#xA;- ActionScript language reference [Flex 3][4]&#xD;&#xA;- [ActionScript cookbook][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html&#xD;&#xA;  [2]: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/&#xD;&#xA;  [3]: http://help.adobe.com/en_US/AS3LCR/Flash_10.0/&#xD;&#xA;  [4]: http://livedocs.adobe.com/flex/3/langref/&#xD;&#xA;  [5]: http://cookbooks.adobe.com/actionscript" />
  <row Id="22292" PostHistoryTypeId="24" PostId="10578" RevisionGUID="31ae4373-1796-41a9-a4e6-c0994296bab3" CreationDate="2011-04-02T19:07:13.500" Comment="Proposed by 382 approved by 14 edit id of 232" />
  <row Id="22293" PostHistoryTypeId="5" PostId="10579" RevisionGUID="13777730-54dc-475b-917d-6315584cd959" CreationDate="2011-04-02T19:07:15.480" UserId="382" Comment="added 194 characters in body" Text="Adobe ActionScript is the open source object orientated programming language of the Adobe Flash Platform. ActionScript 3 is a dialect of ECMAScript, targeted for Adobe Flash Player 9 and higher." />
  <row Id="22294" PostHistoryTypeId="24" PostId="10579" RevisionGUID="13777730-54dc-475b-917d-6315584cd959" CreationDate="2011-04-02T19:07:15.480" Comment="Proposed by 382 approved by 14 edit id of 233" />
  <row Id="22295" PostHistoryTypeId="5" PostId="10574" RevisionGUID="75335c04-3ecb-4001-880b-a35e46d97886" CreationDate="2011-04-02T19:07:18.507" UserId="382" Comment="added 762 characters in body" Text="[Adobe Flash][1] is a cross-platform multimedia runtime used to embed animations, video, and interactive applications into web pages.&#xD;&#xA;&#xD;&#xA;According to Adobe, Flash delivers [over 75%][2] of online video and the majority of casual gaming.  &#xD;&#xA;It is installed on an estimated [96%][3] to [99%][4] of internet-connected desktop computers, and is available for Android 2.2 mobile devices since version 10.1.&#xD;&#xA;&#xD;&#xA;The [newest version is 10.2][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adobe_flash&#xD;&#xA;  [2]: http://blogs.adobe.com/conversations/2010/02/open_access_to_content_and_app.html&#xD;&#xA;  [3]: http://statowl.com/plugin_overview.php&#xD;&#xA;  [4]: http://www.adobe.com/products/player_census/flashplayer/&#xD;&#xA;  [5]: http://get.adobe.com/br/flashplayer/ &quot;Adobe Flash Player 10.2&quot;" />
  <row Id="22296" PostHistoryTypeId="24" PostId="10574" RevisionGUID="75335c04-3ecb-4001-880b-a35e46d97886" CreationDate="2011-04-02T19:07:18.507" Comment="Proposed by 382 approved by 14 edit id of 228" />
  <row Id="22297" PostHistoryTypeId="5" PostId="10575" RevisionGUID="c9ec8436-7120-4f92-931d-be6bb001181a" CreationDate="2011-04-02T19:07:20.690" UserId="382" Comment="added 128 characters in body" Text="Adobe Flash is a cross-platform multimedia runtime used to embed animations, video, and interactive applications into web pages." />
  <row Id="22298" PostHistoryTypeId="24" PostId="10575" RevisionGUID="c9ec8436-7120-4f92-931d-be6bb001181a" CreationDate="2011-04-02T19:07:20.690" Comment="Proposed by 382 approved by 14 edit id of 229" />
  <row Id="22299" PostHistoryTypeId="5" PostId="10576" RevisionGUID="2bc4bf8a-5f21-451a-adc1-809833251fed" CreationDate="2011-04-02T19:07:23.187" UserId="382" Comment="added 859 characters in body" Text="[Python](http://www.python.org/) is a dynamically and strongly typed programming language, used for developing [a wide range of applications][1]. The philosophy of Python is succinctly formulated in *The Zen of Python*, which can be revealed by issuing this command at the interactive interpreter:&#xD;&#xA;&#xD;&#xA;    &gt;&gt;&gt; import this&#xD;&#xA;&#xD;&#xA;The exhaustive and up-to-date reference to the Python specification and standard library documentation can be found in the [official docs](http://docs.python.org/). There are a wide variety of [implementations](http://en.wikipedia.org/wiki/Python_%28programming_language%29#Implementations). The reference implementation is known as CPython.&#xD;&#xA;&#xD;&#xA;The current stable versions are [2.7.1](http://www.python.org/download/releases/2.7.1/) and [3.2](http://www.python.org/download/releases/3.2/).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.python.org/about/apps/" />
  <row Id="22300" PostHistoryTypeId="24" PostId="10576" RevisionGUID="2bc4bf8a-5f21-451a-adc1-809833251fed" CreationDate="2011-04-02T19:07:23.187" Comment="Proposed by 382 approved by 14 edit id of 230" />
  <row Id="22301" PostHistoryTypeId="5" PostId="10577" RevisionGUID="476f4da4-a26c-4aaa-98fc-1e1523a32b1a" CreationDate="2011-04-02T19:07:25.403" UserId="382" Comment="added 92 characters in body" Text="Python is a dynamically and strongly typed programming language that encourages readability." />
  <row Id="22302" PostHistoryTypeId="24" PostId="10577" RevisionGUID="476f4da4-a26c-4aaa-98fc-1e1523a32b1a" CreationDate="2011-04-02T19:07:25.403" Comment="Proposed by 382 approved by 14 edit id of 231" />
  <row Id="22304" PostHistoryTypeId="2" PostId="10585" RevisionGUID="ffa89882-453b-49b0-8d13-7d2adf35a2ba" CreationDate="2011-04-02T19:12:11.103" UserId="3547" Text="Xact is a bit harder to use than the Content Pipeline method. It was originally the only way to play sounds, but the team added the Content Pipeline method for an easier way.&#xD;&#xA;&#xD;&#xA;Xact lets you do stuff like:&#xD;&#xA;&#xD;&#xA; 1. Group sounds so you could mute or do something to a select group of sounds (like mute menu sounds)&#xD;&#xA; 2. You can have Xact change or choose from multiple sounds to play one sound (so your game engine doesn't play the same repetitive shooting sound over and over)&#xD;&#xA; 3. You can apply effects and other stuff and it really gives you some cool features and abilities. It's also pretty nice for working with sound editors because they don't have to work with code, just the Xact editor (which isn't easy, but it's more direct in purpose).&#xD;&#xA; 4. I'm not an expert, so there are probably other features that I haven't named, but I think this gives the gist of it at least.&#xD;&#xA;&#xD;&#xA;Anyway, learning Xact can be a pain. Only do it if you really think your going to need it. Perhaps you could set up an abstraction in your game so you could switch to Xact a bit easier? If your going to have a lot of sounds and your going to want some of the above features, Xact might be the way to go. Personally, since your kind of new, I would just use the Content Pipeline method and switch to Xact if you really found the need for it later." />
  <row Id="22305" PostHistoryTypeId="5" PostId="10506" RevisionGUID="77da99a7-27a4-4e48-b3b0-1fbb17a53547" CreationDate="2011-04-02T19:36:10.023" UserId="3794" Comment="added 434 characters in body; added 25 characters in body" Text="This is typical problem called *shadow map acne*. It is caused because of the projected pixel of the shadow map(depth) is bigger than pixel on the screen (eq. cannot represent depth correctly). &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;There are plenty of solutions to this. First most easy is bias (i see it in your code, so that is not the problem). And second easy solution is shadow map in bigger resolution, it is really more than typical to have shadowmaps in resolution 2048x2048 on current hw. &#xD;&#xA;&#xD;&#xA;Some resources to study more advanced techniques.&#xD;&#xA;&#xD;&#xA; - [Common Techniques to Improve Shadow Depth Maps][2]&#xD;&#xA; - [Gradient shadow maps][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA; - [Shadow Mapping: GPU-based Tips and Techniques][4] - whole presentation is interesting, but very on-topic is the part starting with &quot;Two Components of Bias&quot;. That Jacobians really helps (on same resolution of depth map)&#xD;&#xA; - [Cascade shadow maps][5] - Very helpfull and useful. &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/STCj0.jpg&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee416324%28v=vs.85%29.aspx&#xD;&#xA;  [3]: http://www.slideshare.net/ohyecloudy/42-eliminating-surface-acne-with-gradient-shadow-mapping&#xD;&#xA;  [4]: http://developer.amd.com/media/gpu_assets/Isidoro-ShadowMapping.pdf&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/ee416307%28v=vs.85%29.aspx" />
  <row Id="22306" PostHistoryTypeId="2" PostId="10586" RevisionGUID="55179e81-b1b9-4943-beeb-b478a85f715c" CreationDate="2011-04-02T20:30:21.647" UserId="141" Text="I've run into an issue with my Mega Man engine, and the structure of my game loop is making it very difficult to fix. With Rush Jet, or any falling platform, Mega Man needs to stay attached to the platform as it falls. Right now the best I can do (without resorting to workarounds like magic forcefields that pull him down) has it so that he falls for a single frame when the platform first starts falling. But even this requires the falling platform to pull him down during the collision check. Without this extra step, he constantly &quot;jitters&quot; in falling as the platform descends.&#xD;&#xA;&#xD;&#xA;The order of events in my game loop is making this happen. It goes like this:&#xD;&#xA;&#xD;&#xA;1. Mega Man and Rush Jet are flying horizontally for a while.&#xD;&#xA;2. Thinking phase: Player presses down - the platform decides to set its velocity to downward.&#xD;&#xA;3. Action phase: Platform moves down, player has no awareness of this.&#xD;&#xA;4. Reaction phase: The two are not colliding, so no &quot;binding force&quot; check can occur.&#xD;&#xA;5. Next frame, Mega Man falls. A frame later, gravity catches up and he lands on the platform again, resetting his y velocity to 0.&#xD;&#xA;&#xD;&#xA;You can see there the basic order of my loop:&#xD;&#xA;&#xD;&#xA;1. Thinking phase, where you analyze collisions from the previous frame, and any other variables, to decide on state transitions and other adjustments.&#xD;&#xA;2. Action phase - everyone moves according to their velocity.&#xD;&#xA;3. Reaction phase - collision checks, adjust positions to fix them. This also handles effects like moving platforms, eg. push the player by some amount. The changes to his velocity are applied in the next frame, during the action phase.&#xD;&#xA;&#xD;&#xA;I've tried reordering these steps and various other changes, but they all make the whole thing much worse, with all sorts of bugs. If I need to make sweeping changes to my engine to get these things right, I'd rather know what the &quot;proper&quot; way is before wasting any time.&#xD;&#xA;&#xD;&#xA;I know one possible solution would be for the movement step to look at who was touching the platform in the previous frame and pull him then, so they actually move together. That seems too complex though, reaching between components like that. My engine code already feels way more complicated than the original game could have been, suggesting that I'm doing something wrong.&#xD;&#xA;&#xD;&#xA;So is there a proper sequence of events? There's another question on here about moving things along with a platform, but that doesn't address the order of events issue which causes my problem. Also, if anyone actually knows the way the classic Mega Man games did it, that would obviously be a huge help.&#xD;&#xA;&#xD;&#xA;Find as much of my code as you want at https://github.com/Tesserex/C--MegaMan-Engine/tree/master/Mega%20Man. The CollisionComponent and MovementComponent may be the most useful." />
  <row Id="22307" PostHistoryTypeId="1" PostId="10586" RevisionGUID="55179e81-b1b9-4943-beeb-b478a85f715c" CreationDate="2011-04-02T20:30:21.647" UserId="141" Text="Correct order of operations in a platformer game loop" />
  <row Id="22308" PostHistoryTypeId="3" PostId="10586" RevisionGUID="55179e81-b1b9-4943-beeb-b478a85f715c" CreationDate="2011-04-02T20:30:21.647" UserId="141" Text="&lt;collision-detection&gt;&lt;gameloop&gt;&lt;moving-platforms&gt;" />
  <row Id="22309" PostHistoryTypeId="25" PostId="10583" RevisionGUID="f5fa12dc-1778-4304-b96a-7c3b8e8ff783" CreationDate="2011-04-02T21:08:52.387" Comment="http://twitter.com/#!/StackGameDev/status/54289216040996865" />
  <row Id="22310" PostHistoryTypeId="2" PostId="10587" RevisionGUID="a6bda24b-a9db-4b13-aec2-3dea323acf44" CreationDate="2011-04-02T21:23:46.907" UserId="6485" Text="Have a look at [HTS](http://hts.sp.nitech.ac.jp/). This is a HMM-based Speech Synthesis System that uses hidden Markov models to learn and generate speech. This [book](http://www.cambridge.org/gb/knowledge/isbn/item1175724/?site_locale=en_GB) has a chapter on HMM based synthesis as well as a complete description of other TTS technologies." />
  <row Id="22311" PostHistoryTypeId="5" PostId="10572" RevisionGUID="8a3a5194-b8d8-4296-9ae3-021d5c9133cc" CreationDate="2011-04-02T22:06:27.807" UserId="4234" Comment="added 168 characters in body" Text="I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the projectile itself? I'd like to keep the projectile at the center of the 'camera', but I'm not sure how to do this in Silverlight. I thought of using a translate transform to constantly scroll the parent canvas's position, but is this the best way of doing this in Silverlight?&#xD;&#xA;&#xD;&#xA;Edit - I'm using [Farseer Physics][1] with the [Physics Helper library][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com&#xD;&#xA;  [2]: http://physicshelper.codeplex.com" />
  <row Id="22312" PostHistoryTypeId="2" PostId="10588" RevisionGUID="fd39f730-5926-4581-93d0-2f1d1b86e952" CreationDate="2011-04-02T23:27:47.503" UserId="3656" Text="There's a little more to game audio than just playing back sound files.&#xD;&#xA;&#xD;&#xA;XACT is primarily useful when you're working with a sound designer who either has no coding experience, or no desire to work in code.&#xD;&#xA;&#xD;&#xA;Omnion's answer covers the essentials:&#xD;&#xA;&#xD;&#xA;- Grouping sounds for selecting a sound to randomly play back  &#xD;&#xA;&#xD;&#xA;- Grouping sounds for organizational purposes (maybe have multiple sounds with the same name but in different groups, so you just need to keep track of which group you're in  &#xD;&#xA;&#xD;&#xA;- Easier control of realtime effects&#xD;&#xA;&#xD;&#xA;Among the few (all small or indie) developers I've worked with, there's a bad habit when thinking about game audio to describe your audio needs exclusively in terms of asset lists. While you do need to eventually keep track of all the different sound files you need for a game, it's not useful at all in describing how multiple sound assets work together to create an overall sound event.&#xD;&#xA;&#xD;&#xA;XACT and other tools like FMOD and Wwise create an interface between sound designer and programmer. The sound designer creates a Sound Cue, Event, or Sync (terminology depends on the tool being used) that can be referred to either by name (`const *char` or `string`) or by a GUI in a header or config file. This sound event contains multiple sound files that play back in a specific way that are controlled by parameters, which are usually variables associated with a sound event that control playback.&#xD;&#xA;&#xD;&#xA;Mere's Microsoft's article about parameters in XACT: http://msdn.microsoft.com/en-us/library/ee416028(v=vs.85).aspx&#xD;&#xA;&#xD;&#xA;So the breakdown is this:&#xD;&#xA;&#xD;&#xA;###Sound Designer:  &#xD;&#xA;  &#xD;&#xA;- Creates sound files using whatever their workflow is&#xD;&#xA;- Creates an XACT project that includes all these files&#xD;&#xA;- Creates SoundCues and Real-time parameter controls that affect sound playback, and communicates to the programmer what each real-time parameter represents (could be &#xD;&#xA;&#xD;&#xA;###Programmer  &#xD;&#xA;  &#xD;&#xA;- Takes the built XACT project, loads it into the game&#xD;&#xA;- Plays the appropriate SoundCues at the appropriate times&#xD;&#xA;- Modifies the real-time parameters as he and the sound designer have agreed upon&#xD;&#xA;&#xD;&#xA;The classic example is a car engine. Here's a [video][1] someone made of their car engine model in FMOD. In this example the programmer would need to do the following:&#xD;&#xA;&#xD;&#xA;1. Grab an instance of the CarEngine SoundCue&#xD;&#xA;2. Optionally adjust the RPM Smooth, Load Smooth, and Scale Smooth parameters (sound designer can specify defaults).&#xD;&#xA;3. Trigger the SoundCue&#xD;&#xA;4. Update the RPM parameter as the player accelerates.&#xD;&#xA;&#xD;&#xA;###More than Cars&#xD;&#xA;&#xD;&#xA;I'm using FMOD on a project to control the movement of robots.&#xD;&#xA;&#xD;&#xA;- If the programmer wants the robot to start moving: they play the RobotStartMove event, which triggers an initial start-from-idle sound, while fading in a looping whirring sound. The whirring sound starts at a slightly lower pitch than the loop and gradually pitches up.&#xD;&#xA;- If the programmer wants the robot to suddenly change directions, they set a parameter called &quot;time&quot; to 0.05 (it's a generic parameter that interpolates between values at 1 unit per second, so this name made the most sense).&#xD;&#xA;- If the programmer wants the robot to stop moving, they &quot;keyoff&quot; the time parameter (`timeParam-&gt;keyOff();`). Which basically just advances the time parameter to its end, as it does so, the whirring loop pitches down slightly to give the impression of the robot's motors slowing down.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;XACT, FMOD, and Wwise are also really useful for footsteps, you can create a &quot;Footstep&quot; sound cue, which has a bank of different footsteps. It will select one at random, adjust its pitch randomly (within a limit).&#xD;&#xA;&#xD;&#xA;The bottom line with these tools, is that your sound designer probably knows what sounds better than you do, so let them define the behavior in an abstract way, so then you only have to adjust some predefined parameters to get the desired effect.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=qPhMWf3j_ZA" />
  <row Id="22313" PostHistoryTypeId="5" PostId="10588" RevisionGUID="538bc8b6-6aaf-482e-aa58-327ed3bfe090" CreationDate="2011-04-02T23:33:57.603" UserId="3656" Comment="typo; added 17 characters in body; added 18 characters in body" Text="There's a little more to game audio than just playing back and fading in/out sound files.&#xD;&#xA;&#xD;&#xA;XACT is primarily useful when you're working with a sound designer who either has no coding experience, or no desire to work in code.&#xD;&#xA;&#xD;&#xA;Omnion's answer covers the essentials:&#xD;&#xA;&#xD;&#xA;- Grouping sounds for selecting a sound to randomly play back  &#xD;&#xA;&#xD;&#xA;- Grouping sounds for organizational purposes (maybe have multiple sounds with the same name but in different groups, so you just need to keep track of which group you're in  &#xD;&#xA;&#xD;&#xA;- Easier control of realtime effects&#xD;&#xA;&#xD;&#xA;Among the few (all small or indie) developers I've worked with, there's a bad habit when thinking about game audio to describe your audio needs exclusively in terms of asset lists. While you do need to eventually keep track of all the different sound files you need for a game, it's not useful at all in describing how multiple sound assets work together to create an overall sound event.&#xD;&#xA;&#xD;&#xA;XACT and other tools like FMOD and Wwise create an interface between sound designer and programmer. The sound designer creates a Sound Cue, Event, or Sync (terminology depends on the tool being used) that can be referred to either by name (`const *char` or `string`) or by a GUI in a header or config file. This sound event contains multiple sound files that play back in a specific way that are controlled by parameters, which are usually variables associated with a sound event that control playback.&#xD;&#xA;&#xD;&#xA;Here's Microsoft's article about parameters in XACT: http://msdn.microsoft.com/en-us/library/ee416028(v=vs.85).aspx&#xD;&#xA;&#xD;&#xA;So the breakdown is this:&#xD;&#xA;&#xD;&#xA;###Sound Designer:  &#xD;&#xA;  &#xD;&#xA;- Creates sound files using whatever their workflow is&#xD;&#xA;- Creates an XACT project that includes all these files&#xD;&#xA;- Creates SoundCues and Real-time parameter controls that affect sound playback, and communicates to the programmer what each real-time parameter represents (could be &#xD;&#xA;&#xD;&#xA;###Programmer  &#xD;&#xA;  &#xD;&#xA;- Takes the built XACT project, loads it into the game&#xD;&#xA;- Plays the appropriate SoundCues at the appropriate times&#xD;&#xA;- Modifies the real-time parameters as he and the sound designer have agreed upon&#xD;&#xA;&#xD;&#xA;The classic example is a car engine. Here's a [video][1] someone made of their car engine model in FMOD. In this example the programmer would need to do the following:&#xD;&#xA;&#xD;&#xA;1. Grab an instance of the CarEngine SoundCue&#xD;&#xA;2. Optionally adjust the RPM Smooth, Load Smooth, and Scale Smooth parameters (sound designer can specify defaults).&#xD;&#xA;3. Trigger the SoundCue&#xD;&#xA;4. Update the RPM parameter as the player accelerates.&#xD;&#xA;&#xD;&#xA;###More than Cars&#xD;&#xA;&#xD;&#xA;I'm using FMOD on a project to control the movement of robots.&#xD;&#xA;&#xD;&#xA;- If the programmer wants the robot to start moving: they play the RobotStartMove event, which triggers an initial start-from-idle sound, while fading in a looping whirring sound. The whirring sound starts at a slightly lower pitch than the loop and gradually pitches up.&#xD;&#xA;- If the programmer wants the robot to suddenly change directions, they set a parameter called &quot;time&quot; to 0.05 (it's a generic parameter that interpolates between values at 1 unit per second, so this name made the most sense).&#xD;&#xA;- If the programmer wants the robot to stop moving, they &quot;keyoff&quot; the time parameter (`timeParam-&gt;keyOff();`). Which basically just advances the time parameter to its end, as it does so, the whirring loop pitches down slightly while fading out to give the impression of the robot's motors slowing down.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;XACT, FMOD, and Wwise are also really useful for footsteps, you can create a &quot;Footstep&quot; sound cue, which has a bank of different footsteps. It will select one at random, adjust its pitch randomly (within a limit).&#xD;&#xA;&#xD;&#xA;The bottom line with these tools, is that your sound designer probably knows what sounds better than you do, so let them define the behavior in an abstract way, so then you only have to adjust some predefined parameters to get the desired effect.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=qPhMWf3j_ZA" />
  <row Id="22314" PostHistoryTypeId="2" PostId="10589" RevisionGUID="387c0b45-db5c-49a7-9609-55977780fe2a" CreationDate="2011-04-02T23:35:37.793" UserId="6480" Text="I'd like to use a SQL Express file or something similar for a UDK demo. &#xD;&#xA;&#xD;&#xA;Is there a standard method for accessing data in a local relational database file?&#xD;&#xA;&#xD;&#xA;I understand that the best method may involve creating a class library and using the DLLBind feature, but I'm still a bit unclear on how to pass data to controls in the UI (I'd like to populate dropdowns and such with records from the database).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22315" PostHistoryTypeId="1" PostId="10589" RevisionGUID="387c0b45-db5c-49a7-9609-55977780fe2a" CreationDate="2011-04-02T23:35:37.793" UserId="6480" Text="Unreal Development Kit - What is a good method for accessing a relational database file?" />
  <row Id="22316" PostHistoryTypeId="3" PostId="10589" RevisionGUID="387c0b45-db5c-49a7-9609-55977780fe2a" CreationDate="2011-04-02T23:35:37.793" UserId="6480" Text="&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="22317" PostHistoryTypeId="25" PostId="10586" RevisionGUID="33aba2e5-f2fe-4f1d-ba29-39a48a6d20a6" CreationDate="2011-04-03T00:08:52.743" Comment="http://twitter.com/#!/StackGameDev/status/54334515639889920" />
  <row Id="22318" PostHistoryTypeId="5" PostId="10583" RevisionGUID="39a21077-8b8f-4967-87b3-8723919b13ef" CreationDate="2011-04-03T00:43:22.707" UserId="51" Comment="deleted 34 characters in body" Text="I have to add sound to a game and I found that you can use xact. That's fine, however why not just use Content.Load&lt;Audio&gt;?&#xD;&#xA;&#xD;&#xA;Besides the tweaking of the sound, are there any other advantages to using Xact?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22319" PostHistoryTypeId="2" PostId="10590" RevisionGUID="162536cf-ed5e-448f-bc8f-6003576805c2" CreationDate="2011-04-03T01:42:06.993" UserId="4234" Text="Whoops! Turns out the MSI installer installs an older version that had a broken camera. I downloaded and recompiled the latest source version and it now works!" />
  <row Id="22320" PostHistoryTypeId="2" PostId="10591" RevisionGUID="8e3a3bd6-fadb-4c60-9491-c24c3558a18f" CreationDate="2011-04-03T02:55:03.237" UserId="395" Text="I know nothing of UDK, but Google turns up http://forums.epicgames.com/showthread.php?t=726137 as an example. (and yes, you should use SQLite for this)" />
  <row Id="22321" PostHistoryTypeId="25" PostId="10589" RevisionGUID="a76cacfb-10ad-484c-9159-1ca201597647" CreationDate="2011-04-03T03:08:52.363" Comment="http://twitter.com/#!/StackGameDev/status/54379813049335808" />
  <row Id="22322" PostHistoryTypeId="25" PostId="10558" RevisionGUID="b79f02f3-7519-4c21-a3b9-187df8be5aaa" CreationDate="2011-04-03T06:08:52.420" Comment="http://twitter.com/#!/StackGameDev/status/54425111448666113" />
  <row Id="22323" PostHistoryTypeId="5" PostId="10321" RevisionGUID="3c9870b7-a09b-4ff3-8d01-1c5e148e86a1" CreationDate="2011-04-03T08:31:38.683" UserId="5705" Comment="added 365 characters in body" Text="After trying to use red5 for my turn-based multiplayer game, I've decided to give AMF a try using amfphp, because of the expensive media server hosting solutions. (With AMF all I need is a web server). The game is a simple turn based game. It uses Box2D for physics. Its similar to pool or billiards. More than two users should be able to play in one game 'table'. Is it OK to use AMF in this situation? Also which one should I use? ZendAMF or AMFPHP?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Features: No. of players &gt;= 2 in each 'room' or 'table', turn-based, multiple rooms.&#xD;&#xA;&#xD;&#xA;I've heard games like farmville use AMF. Does zynga's poker game also use AMF? How does one player get info on what the other player is doing? Do they do a timed checking for any changes, similar to polling? How can changes or 'moves' made by one player be updated to everyone? Since the connection is terminated after every request unlike in a socket connection." />
  <row Id="22324" PostHistoryTypeId="2" PostId="10592" RevisionGUID="ecf6eb6d-b9cb-412d-82f1-6ae5c94610d8" CreationDate="2011-04-03T09:02:18.430" UserId="5916" Text="Okay so in its most basic form a game loop looks like this:&#xD;&#xA;&#xD;&#xA;    while game is running&#xD;&#xA;        act upon user input&#xD;&#xA;        update all game objects&#xD;&#xA;        re-draw everything to the screen&#xD;&#xA;&#xD;&#xA;In your case, what should happen is:&#xD;&#xA;&#xD;&#xA; 1. Loop begins.&#xD;&#xA; 1. You update all of the objects based on the key presses that have taken place. Platform moves down.&#xD;&#xA; 1. You then update all of the objects based on their velocities, inside that step should be a collision check to not go the full distance or change their velocities to zero when they hit (go through) walls and put them in the right places.&#xD;&#xA; 1. Now draw it all to the screen, the user has never seen any error states so everything looks great; no jitters ever.&#xD;&#xA;&#xD;&#xA;And that is how most of the games I write make it work.&#xD;&#xA;&#xD;&#xA;Update: If you need more information on how to write a good game loop then look now further than [this good guide][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.koonsolo.com/news/dewitters-gameloop/" />
  <row Id="22325" PostHistoryTypeId="25" PostId="10387" RevisionGUID="e1e21a00-20e2-4201-858e-8d3ffdd8df05" CreationDate="2011-04-03T09:08:52.923" Comment="http://twitter.com/#!/StackGameDev/status/54470411823493120" />
  <row Id="22326" PostHistoryTypeId="2" PostId="10593" RevisionGUID="d06f5bf2-3a15-48e6-aab1-4d4ce259b3ae" CreationDate="2011-04-03T09:23:21.827" UserId="5916" Text="Off the top of my head:&#xD;&#xA;&#xD;&#xA; 1. Create two line segments from the middle of each circle from where it started to where it moved to in that time step.&#xD;&#xA; 1. Find the min distance between those two line segments; [as is explained here][1]. &#xD;&#xA; 1. If that distance is less than or equal to the radius of the first circle plus the second then they collided; otherwise they did not.&#xD;&#xA;&#xD;&#xA;And that is all there is to it, I would expect that to be pretty fast.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/627563/calculating-the-shortest-distance-between-two-lines-line-segments-in-3d" />
  <row Id="22328" PostHistoryTypeId="2" PostId="10594" RevisionGUID="4cdc0a31-4a85-4bec-b31d-e04a36f518b1" CreationDate="2011-04-03T13:47:32.890" UserId="5572" Text="There are a few sites like what your describing. I can't remember them but here is one of them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://flashgameart.com/artists/" />
  <row Id="22329" PostHistoryTypeId="25" PostId="10416" RevisionGUID="974afcfb-f454-4689-b986-d0124b8cd1f6" CreationDate="2011-04-03T15:08:52.417" Comment="http://twitter.com/#!/StackGameDev/status/54561006915043329" />
  <row Id="22330" PostHistoryTypeId="2" PostId="10595" RevisionGUID="b4415365-4c32-436c-bedb-cdcbac858f8e" CreationDate="2011-04-03T15:35:23.023" UserId="3547" Text="I know this answer doesn't fit with the title of this question, but I think it could solve your problem.&#xD;&#xA;&#xD;&#xA;I looked at your code base and you have an aggregative component design for composing game entities. I'm guessing the rush jet has it's own game entity and list of components (&quot;rush jet&quot; is what I'll be calling this moving platform, yes I know nothing about mega man games). If this is the case, you should try to pass the rush jet a player game entity and set up some kind of bridge (not the best term to use).&#xD;&#xA;&#xD;&#xA;For this &quot;bridge&quot;, I would have the rush jet not take input from the keyboard. Instead, the player would take input and in your message system (the one for the game components in an entity) you could have another game component tied to the rush jet that would also intercept the movement message. Thus, the player and the platform would both be moved together. Once the rush jet is gone, the game component that serves as a bridge between the rush jet and player would be disposed of and removed.&#xD;&#xA;&#xD;&#xA;I think this is a plausible alternative. The movement occurs in your game loop and then the collision checks occur to make sure the rush jet and the player are within bounds. I also believe it is perfectly fine for the rush jet to be dependent upon the player in this way. It's not the most sublime solution, but it'll probably work.&#xD;&#xA;&#xD;&#xA;PS: I like your code base. The code isn't the best, but it's nice." />
  <row Id="22331" PostHistoryTypeId="2" PostId="10596" RevisionGUID="a2521395-c91e-4510-a6a5-394e00988698" CreationDate="2011-04-03T16:01:03.800" UserId="6496" Text="Does game programming use the method of&#xD;&#xA;&#xD;&#xA;1) using time as the main controller to let objects interact with each other, so each step, let 1 object send messages to `N` objects, and the second object to any number of objects, and 3rd, 4th, until all objects done, and that's it, and display the results on screen (or think of it as just a loop that always repeat, with each iteration considered &quot;a tick in time&quot;)    (so object 1 call object 2's method, and object 2 cannot call other object's method immediately?  otherwise, there can be infinite loop like (2) below.  but how do you implement: &quot;cannot call other objects until next time?&quot; )&#xD;&#xA;&#xD;&#xA;Or,&#xD;&#xA;&#xD;&#xA;2) let the objects freely call other objects' methods (send messages to them), with no &quot;Time&quot; concept like the above&#xD;&#xA;&#xD;&#xA;Are they both feasible solutions?  But what if in (2), you have stones in a circular tube, and stone 1 pushes stone 2, and 2 pushes 3, and so forth, until stone N pushes stone 1 again, then the program will go into infinite loop and not able to do anything else (say if the program is a single process, single thread)&#xD;&#xA;" />
  <row Id="22332" PostHistoryTypeId="1" PostId="10596" RevisionGUID="a2521395-c91e-4510-a6a5-394e00988698" CreationDate="2011-04-03T16:01:03.800" UserId="6496" Text="Do game programming just let all the objects in the program to interact with themselves and what about preventing infinite loop?" />
  <row Id="22333" PostHistoryTypeId="3" PostId="10596" RevisionGUID="a2521395-c91e-4510-a6a5-394e00988698" CreationDate="2011-04-03T16:01:03.800" UserId="6496" Text="&lt;gameloop&gt;&lt;objects&gt;" />
  <row Id="22334" PostHistoryTypeId="2" PostId="10597" RevisionGUID="c5e97fad-7336-4dd0-a200-a6ab17914787" CreationDate="2011-04-03T16:19:59.507" UserId="20" Text="Usually you have some separate class that does things like collision detection (collision-solver). So instead of *Object A sending a &quot;collide&quot; message to Object B*, you have a class that holds a list of all Objects. In one step (or update), the class checks collision for all objects in that list and stops when all objects have been checked. &#xD;&#xA;&#xD;&#xA;With this setup it can still happen that if you move an object out of the way due to a collision, it will still collide with another object. To resolve this issue you can iterate the collision-solver several times within one update loop. As long as you have a specialized class that does this, the number of iterations can easily be controlled and infinite loops can be avoided.&#xD;&#xA;" />
  <row Id="22335" PostHistoryTypeId="2" PostId="10598" RevisionGUID="a808293c-90a9-48af-9cb8-e4316c6e9856" CreationDate="2011-04-03T16:21:27.303" UserId="6496" Text="To test a program for iPhone or iPad, seems like the only way is to join the Apple Developer's program and pay $99 per year?  Can you also jailbreak the iPhone or iPad and be able to test it?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22336" PostHistoryTypeId="1" PostId="10598" RevisionGUID="a808293c-90a9-48af-9cb8-e4316c6e9856" CreationDate="2011-04-03T16:21:27.303" UserId="6496" Text="Is it true that to test a game on the iPhone or iPad, we either need to pay $99 to join Apple Developer program, or jailbreak the iPad?" />
  <row Id="22337" PostHistoryTypeId="3" PostId="10598" RevisionGUID="a808293c-90a9-48af-9cb8-e4316c6e9856" CreationDate="2011-04-03T16:21:27.303" UserId="6496" Text="&lt;iphone&gt;&lt;ios&gt;&lt;ipad&gt;" />
  <row Id="22338" PostHistoryTypeId="2" PostId="10599" RevisionGUID="48d998ec-1eba-4335-aee2-5474e93126b1" CreationDate="2011-04-03T16:26:26.647" UserId="20" Text="You can probably use a jailbreaked iOS device for testing, but you won't be able to sell your App on the Appstore. And you won't be able to test the app on other (non-jailbreaked) devices. To do that you'll need the developer license." />
  <row Id="22339" PostHistoryTypeId="5" PostId="10598" RevisionGUID="0cb22b3f-2ef8-44fb-b5f3-1ea652b1bc3b" CreationDate="2011-04-03T16:38:31.820" UserId="1430" Comment="deleted 2 characters in body" Text="To test a program for iPhone or iPad, seems like the only way is to join the Apple Developer program and pay $99 per year?  Can you also jailbreak the iPhone or iPad and be able to test it?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22340" PostHistoryTypeId="5" PostId="10599" RevisionGUID="e4251727-e025-4712-b6f7-0b9c7b024981" CreationDate="2011-04-03T16:39:06.720" UserId="20" Comment="added 293 characters in body" Text="You can use a jailbreaked iOS device for testing, but you won't be able to sell your App on the Appstore. And you won't be able to test the app on other (non-jailbreaked) devices. To do that you'll need the developer license.&#xD;&#xA;&#xD;&#xA;The reason why this is so, is that every app needs to be signed (with the certificate you get from Apple when joining the developer program) to be run on iOS devices. Non-signed code will run on a jailbroken device, but not on any other device. Also a non-signed app cannot be sold in the Appstore." />
  <row Id="22341" PostHistoryTypeId="2" PostId="10600" RevisionGUID="9b7f7bb1-b3e1-4e0e-8d17-b816725c8b39" CreationDate="2011-04-03T16:58:40.097" UserId="6302" Text="Does SpriteBatch in XNA draw to the screen only when a sprite would appear on the screen?  &#xD;&#xA;&#xD;&#xA;Say I have 5 identical sprites placed exactly on top of each other, is SpriteBatch able to determine that it only needs to draw one? &#xD;&#xA;&#xD;&#xA;Also, say I have a large map that I've tiled off the screen in every direction.  Does SpriteBatch handle that it does not need to draw these sprites that are off the screen.&#xD;&#xA;&#xD;&#xA;(Note: Yes my code should handle this, I am just curious) " />
  <row Id="22342" PostHistoryTypeId="1" PostId="10600" RevisionGUID="9b7f7bb1-b3e1-4e0e-8d17-b816725c8b39" CreationDate="2011-04-03T16:58:40.097" UserId="6302" Text="Efficiency of the SpriteBatch" />
  <row Id="22343" PostHistoryTypeId="3" PostId="10600" RevisionGUID="9b7f7bb1-b3e1-4e0e-8d17-b816725c8b39" CreationDate="2011-04-03T16:58:40.097" UserId="6302" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="22344" PostHistoryTypeId="2" PostId="10601" RevisionGUID="ff6fc32e-c5a0-4e71-88ac-16e4273572f4" CreationDate="2011-04-03T17:30:16.950" UserId="3547" Text="No, sprite batch does not handle the first instance (drawing sprites over one another). Anyway, this isn't always the desired result. Sometimes you'd want the images to merge because of transparency with alpha blending.&#xD;&#xA;&#xD;&#xA;I'm pretty sure sprite batch doesn't clip images that aren't in the view port. I'm not sure if they are actually drawn, but you shouldn't batch them up in the sprite batch. It takes more time and from your question I can tell you've got some kind of tile engine.&#xD;&#xA;&#xD;&#xA;If you told sprite batch to draw every tile on the map instead of the ones on the screen, your game would run a lot slower (major frame rate hit) just because of the sheer amount of tiles there could be.&#xD;&#xA;&#xD;&#xA;It's not a good idea to tell the sprite batch to draw things that won't be displayed. However, I wouldn't really differentiate between if a sprite is completely covered by other sprites, especially if your using transparency and alpha blending. I think it's just a tad over kill." />
  <row Id="22345" PostHistoryTypeId="2" PostId="10602" RevisionGUID="9e638549-132d-4eb9-b759-566d66abe0eb" CreationDate="2011-04-03T17:33:40.427" UserId="1430" Text="&gt; Say I have 5 identical sprites placed&#xD;&#xA;&gt; exactly on top of each other, is&#xD;&#xA;&gt; SpriteBatch able to determine that it&#xD;&#xA;&gt; only needs to draw one?&#xD;&#xA;&#xD;&#xA;Is it *able* to? Sure -- it has all the information that would allow it to make that determination. However, it *won't* do so, because such a computation is non-trivial in general and would actually drastically degrade the performance of the `SpriteBatch` interface.&#xD;&#xA;&#xD;&#xA;If enabled, the depth test will kill off fragments that shouldn't be seen or overdraw will hide them, but in both cases the sprite vertices will have been transformed completely through the pipeline already.&#xD;&#xA;&#xD;&#xA;&gt; Also, say I have a large map that I've&#xD;&#xA;&gt; tiled off the screen in every&#xD;&#xA;&gt; direction. Does SpriteBatch handle&#xD;&#xA;&gt; that it does not need to draw these&#xD;&#xA;&gt; sprites that are off the screen.&#xD;&#xA;&#xD;&#xA;It won't attempt to cull enqueued sprites against the view at all, either. They'll be clipped out entirely during the transformation stage like any other geometry, but it's vastly less expensive to simply never enqueue a sprite you know will not be drawn because it is out of view.&#xD;&#xA;&#xD;&#xA;`SpriteBatch` is really just a wrapper around a dynamic vertex buffer that may or may not do some sorting for you to minimize texture stage changes and such. If your curious you can use [Reflector][1] to poke around at the internals and see that it does very little besides manage the buffer for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://reflector.red-gate.com/download.aspx?TreatAsUpdate=1" />
  <row Id="22346" PostHistoryTypeId="2" PostId="10603" RevisionGUID="4679c1c6-0e43-4924-acaa-6f2e88af24f0" CreationDate="2011-04-03T17:49:56.310" UserId="3128" Text="I'm working on make a very basic first person shooter.  At some point I would like to make into an indie game on xbox live but will I have access to parties (invite and chat)?  Does Microsoft provide servers for multiplayer or do I have to provide my own?  Am I free to connect my own server ip from the xbox system within game?  Can I charge people on a web page outside of xbox for things like microtransactions or to maintain the cost of the servers?  &#xD;&#xA;&#xD;&#xA;Any help is appreciated." />
  <row Id="22347" PostHistoryTypeId="1" PostId="10603" RevisionGUID="4679c1c6-0e43-4924-acaa-6f2e88af24f0" CreationDate="2011-04-03T17:49:56.310" UserId="3128" Text="Could I make a multiplayer fps on xbox live as an indie game?" />
  <row Id="22348" PostHistoryTypeId="3" PostId="10603" RevisionGUID="4679c1c6-0e43-4924-acaa-6f2e88af24f0" CreationDate="2011-04-03T17:49:56.310" UserId="3128" Text="&lt;xna&gt;&lt;multiplayer&gt;&lt;xbox360&gt;&lt;indie&gt;&lt;first-person-shooter&gt;" />
  <row Id="22349" PostHistoryTypeId="25" PostId="10600" RevisionGUID="4208fc93-b64f-4f33-b93c-8afb59801e8b" CreationDate="2011-04-03T18:08:52.523" Comment="http://twitter.com/#!/StackGameDev/status/54606305691844608" />
  <row Id="22350" PostHistoryTypeId="2" PostId="10604" RevisionGUID="37295bfb-3d95-4ea7-aee7-34814b7a699d" CreationDate="2011-04-03T18:15:26.123" UserId="395" Text="XNA games cannot talk to a server, or anything other than other copies of the game in a peer-to-peer manner. It is possible to build an FPS like this, though latency might be an issue if you are trying to send a lot of data. As far as I know XBLIG are not permitted the use of the Marketplace, and any billing done outside the XBox &quot;system&quot; will land you with a nice lawsuit." />
  <row Id="22351" PostHistoryTypeId="2" PostId="10605" RevisionGUID="8f0af5d0-5a45-4045-bea6-17359ed4f27c" CreationDate="2011-04-03T18:43:09.203" UserId="5021" Text="Yes.&#xD;&#xA;&#xD;&#xA;The typical model for multiplayer FPS in AAA titles these days is peer-to-peer multiplayer (where one player is chosen to be the server, and all others are peers relying on that player for synchronized updates).&#xD;&#xA;You can use this model in an XNA game for the XBOX 360.&#xD;&#xA;&#xD;&#xA;You can get started here:&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/?contenttype=0&amp;devarea=19&amp;platform=21&amp;sort=1&#xD;&#xA;&#xD;&#xA;There are numerous examples including [this one][1] that demonstrates the type of network architecture used in AAA FPS titles like Halo and Call of Duty.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/network_cs" />
  <row Id="22352" PostHistoryTypeId="12" PostId="5926" RevisionGUID="a384d16c-7d4c-4f64-8703-eaacbbcd651c" CreationDate="2011-04-03T18:47:25.797" UserId="3547" Text="[{&quot;Id&quot;:3547,&quot;DisplayName&quot;:&quot;Omnion&quot;}]" />
  <row Id="22353" PostHistoryTypeId="13" PostId="5926" RevisionGUID="88fd9cd9-46f5-45dd-a85f-4b514541ab71" CreationDate="2011-04-03T18:47:53.973" UserId="3547" Text="[{&quot;Id&quot;:3547,&quot;DisplayName&quot;:&quot;Omnion&quot;}]" />
  <row Id="22354" PostHistoryTypeId="5" PostId="10605" RevisionGUID="b7695c3e-5c5c-4fdb-87b5-7797dc12b591" CreationDate="2011-04-03T18:50:35.640" UserId="5021" Comment="added 649 characters in body; added 59 characters in body" Text="Yes.&#xD;&#xA;&#xD;&#xA;The typical model for multiplayer FPS in AAA titles these days is peer-to-peer multiplayer (where one player is chosen to be the server, and all others are peers relying on that player for synchronized updates).&#xD;&#xA;You can use this model in an XNA game for the XBOX 360.&#xD;&#xA;&#xD;&#xA;You can get started at the [networking architecture for XBOX XNA samples][1].&#xD;&#xA;&#xD;&#xA;There are numerous examples including [this one][2] that demonstrates the type of network architecture used in AAA FPS titles like Halo and Call of Duty (where there is no dedicated server, except for the server(s) that handle the matchmaking).&#xD;&#xA;&#xD;&#xA;One thing that you will be missing is the ability to query a dedicated server when matchmaking players. However, if you get to a point where you have so many players that you would benefit significantly from having a dedicated server for a matchmaking lobby, it's not unreasonable to go to microsoft to get a Live Arcade agreement, in which case you will have access to the microsoft storage servers and potentially access to your own server. Until you get that kind of (pretty large) userbase, peer-to-peer matchmaking will suit your purposes just fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/?contenttype=0&amp;devarea=19&amp;platform=21&amp;sort=1&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/network_cs" />
  <row Id="22355" PostHistoryTypeId="2" PostId="10606" RevisionGUID="9c946054-22f2-4be5-9dad-f9c80ac721a5" CreationDate="2011-04-03T19:00:35.850" UserId="5021" Text="Unless you are willing to pay $10,000 for an XBOX or Playstation devkit, then the only console you can develop for is the XBOX 360, and the only way you can do it is with XNA.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For professional development, unless you really need to get 100% of the processing power of the XBOX (which most games, especially 2D games do not need), then XNA in my opinion is actually much better for development.&#xD;&#xA;&#xD;&#xA;Some mistakes that other answerers have made:&#xD;&#xA;&#xD;&#xA;The XBOX has only 3 cores. You get access to all of them with XNA.&#xD;&#xA;&#xD;&#xA;Each core has hyperthreading and support for 2 hyperthreads. You only get access to 4/6 threads. One of those threads is for XNA. The other is a thread that no game developers get access to, as it is used by the XBOX OS.&#xD;&#xA;&#xD;&#xA;C# on the XBOX is much slower than C# on Windows. The XBOX uses the .NET compact CLR, which is very lightweight and lacks many of the desktop CLR's optmizations. The XBOX security features prevent programs from modifying their own source code. This makes it very difficult to even allow .NET code to run, much less to run *fast*. Part of what makes managed code competitive in performance with C++ native code, is that the CLR can modify it's own code to optimize cache coherency. The XNA dev team has to jump through some pretty big hoops just to get C# to run on the XBOX at all, and there is an associated performance cost with these hoops." />
  <row Id="22356" PostHistoryTypeId="5" PostId="10606" RevisionGUID="2d8cf3ee-4757-477f-b871-ac1ad7c0e59e" CreationDate="2011-04-03T19:06:09.963" UserId="5021" Comment="added 657 characters in body; added 370 characters in body" Text="Unless you are willing to pay $10,000 for an XBOX or Playstation devkit, then the only console you can develop for is the XBOX 360, and the only way you can do it is with XNA.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For professional development, unless you really need to get 100% of the processing power of the XBOX (which most games, especially 2D games do not need), then XNA in my opinion is actually much better for development.&#xD;&#xA;&#xD;&#xA;Some mistakes that other answerers have made:&#xD;&#xA;&#xD;&#xA;The XBOX has only 3 cores. You get access to all of them with XNA.&#xD;&#xA;&#xD;&#xA;Each core has hyperthreading and support for 2 hyperthreads. You only get access to 4/6 threads. One of those threads is for XNA. The other is a thread that no game developers get access to, as it is used by the XBOX OS.&#xD;&#xA;&#xD;&#xA;C# on the XBOX is much slower than C# on Windows. The XBOX uses the .NET compact CLR, which is very lightweight and lacks many of the desktop CLR's optmizations. The XBOX security features prevent programs from modifying their own source code. This makes it very difficult to even allow .NET code to run, much less to run *fast*. Part of what makes managed code competitive in performance with C++ native code, is that the CLR can modify it's own code to optimize cache coherency. The XNA dev team has to jump through some pretty big hoops just to get C# to run on the XBOX at all, and there is an associated performance cost with these hoops.&#xD;&#xA;&#xD;&#xA;You don't get to be TOO lazy with memory allocation. XNA on Windows greatly simplifies memory allocation, as you'd expect from a managed environment. However, on the XBOX, the .NET compact CLR uses a generational approach to garbage collection, and the typical approach to preventing stuttering in your game due to collections, is to avoid collections altogether. This requires using object pools for your classes, and using structs for smaller objects, where you'd normally uses classes in the Windows environment.&#xD;&#xA;&#xD;&#xA;That said, development in C#/XNA is still many times faster and easier than development in C++ without a DirectX API (which XNA is).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you're a hobbist game developer, and you want to make games for a console, not only is XNA+XBOX your only realisitic option, it's also a pretty amazing option, a fun development environment, and many XBOX Live Arcade games have been made with XNA, and made hundreds of thousands of dollars doing it. ([Limbo][1] for example.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.limbogame.org/" />
  <row Id="22357" PostHistoryTypeId="5" PostId="10606" RevisionGUID="482da5cc-a931-4b7b-8c3a-14afcb8cd62c" CreationDate="2011-04-03T19:11:28.257" UserId="5021" Comment="added 501 characters in body; added 1 characters in body" Text="Unless you are willing to pay $10,000 for an XBOX or Playstation devkit, then the only console you can develop for is the XBOX 360, and the only way you can do it is with XNA.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For professional development, unless you really need to get 100% of the processing power of the XBOX (which most games, especially 2D games do not need), then XNA in my opinion is actually much better for development.&#xD;&#xA;&#xD;&#xA;Some mistakes that other answerers have made:&#xD;&#xA;&#xD;&#xA;The XBOX has only 3 cores. You get access to all of them with XNA.&#xD;&#xA;&#xD;&#xA;Each core has hyperthreading and support for 2 hyperthreads. You only get access to 4/6 threads. One of those threads is for XNA. The other is a thread that no game developers get access to, as it is used by the XBOX OS.&#xD;&#xA;&#xD;&#xA;C# on the XBOX is much slower than C# on Windows. The XBOX uses the .NET compact CLR, which is very lightweight and lacks many of the desktop CLR's optmizations. The XBOX security features prevent programs from modifying their own source code. This makes it very difficult to even allow .NET code to run, much less to run *fast*. Part of what makes managed code competitive in performance with C++ native code, is that the CLR can modify it's own code to optimize cache coherency. The XNA dev team has to jump through some pretty big hoops just to get C# to run on the XBOX at all, and there is an associated performance cost with these hoops.&#xD;&#xA;&#xD;&#xA;You don't get to be TOO lazy with memory allocation. XNA on Windows greatly simplifies memory allocation, as you'd expect from a managed environment. However, on the XBOX, the .NET compact CLR uses a generational approach to garbage collection, and the typical approach to preventing stuttering in your game due to collections, is to avoid collections altogether. This requires using object pools for your classes, and using structs for smaller objects, where you'd normally uses classes in the Windows environment. Object pooling generally requires an allocate/free model of object management, which is no worse (and maybe a little bit better) than C++ memory management.&#xD;&#xA;&#xD;&#xA;That said, development in C#/XNA is still many times faster and easier than development in C++ without a DirectX API (which XNA is).&#xD;&#xA;&#xD;&#xA;Here's the status of a game I'm making in XNA, after 4 weeks of work:&#xD;&#xA;&#xD;&#xA;![Screenshot of game after 4 weeks of development.][1]&#xD;&#xA;&#xD;&#xA;That should give you a sense of how incredibly fast development with the XNA library/API is in combination with C#.&#xD;&#xA;&#xD;&#xA;That screenshot is rendered by the XBOX at about 65FPS.&#xD;&#xA;&#xD;&#xA;If you're a hobbyist game developer, and you want to make games for a console, not only is XNA+XBOX your only realisitic option, it's also a pretty amazing option, a fun development environment, and many XBOX Live Arcade games have been made with XNA, and made hundreds of thousands of dollars doing it. ([Limbo][2] for example.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Hyymj.jpg&#xD;&#xA;  [2]: http://www.limbogame.org/" />
  <row Id="22358" PostHistoryTypeId="2" PostId="10607" RevisionGUID="65c6a7d0-6b68-49f7-bec7-0722896c3f96" CreationDate="2011-04-03T19:37:09.187" UserId="6498" Text="I have absolutely no idea about game developing but want to know following things about [internet sweepstake games][1]: Click on demo and play any of the game.&#xD;&#xA;&#xD;&#xA; 1. What technology (programming language) is used to develop these games. e.g. Flash, Silverlight, etc.&#xD;&#xA; 2. If I wish to develop such game(s) what is the best technology to use, how much time it might take to learn and develop a simple commercial product.&#xD;&#xA; 3. Is the algorithm/code behind the scene re-usable while changing the front graphics. I mean a scalable/adjustible game.&#xD;&#xA; 4. In case I wish to hire an programmer what would be the approximate cost or per/hr charge for such developer.&#xD;&#xA; 5. Are the already any other&#xD;&#xA; 6. Any good books or mainly online tutorial/videos to learn/see this in action?&#xD;&#xA;&#xD;&#xA;Or any other ideas or suggestions? &#xD;&#xA;Sorry if these are lot of questions but this is the only good place I see asking such questions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sweepstakesmachines.com/games" />
  <row Id="22359" PostHistoryTypeId="1" PostId="10607" RevisionGUID="65c6a7d0-6b68-49f7-bec7-0722896c3f96" CreationDate="2011-04-03T19:37:09.187" UserId="6498" Text="Developing internet sweepstake games" />
  <row Id="22360" PostHistoryTypeId="3" PostId="10607" RevisionGUID="65c6a7d0-6b68-49f7-bec7-0722896c3f96" CreationDate="2011-04-03T19:37:09.187" UserId="6498" Text="&lt;game-design&gt;&lt;flash&gt;&lt;game-mechanics&gt;&lt;silverlight&gt;" />
  <row Id="22361" PostHistoryTypeId="5" PostId="10606" RevisionGUID="fcc4f4f4-3841-42c4-83fe-fe6435501660" CreationDate="2011-04-03T20:23:16.510" UserId="5021" Comment="added 1 characters in body" Text="Unless you are willing to pay $10,000 for an XBOX or Playstation devkit, then the only console you can develop for is the XBOX 360, and the only way you can do it is with XNA.&#xD;&#xA;&#xD;&#xA;For professional development, unless you really need to get 100% of the processing power of the XBOX (which most games, especially 2D games do not need), then XNA in my opinion is actually much better for development.&#xD;&#xA;&#xD;&#xA;Some mistakes that other answerers have made:&#xD;&#xA;&#xD;&#xA;The XBOX has only 3 cores. You get access to all of them with XNA.&#xD;&#xA;&#xD;&#xA;Each core has hyperthreading and support for 2 hyperthreads. You only get access to 4/6 threads. One of those threads is for XNA. The other is a thread that no game developers get access to, as it is used by the XBOX OS.&#xD;&#xA;&#xD;&#xA;C# on the XBOX is much slower than C# on Windows. The XBOX uses the .NET compact CLR, which is very lightweight and lacks many of the desktop CLR's optmizations. The XBOX security features prevent programs from modifying their own source code. This makes it very difficult to even allow .NET code to run, much less to run *fast*. Part of what makes managed code competitive in performance with C++ native code, is that the CLR can modify it's own code to optimize cache coherency. The XNA dev team has to jump through some pretty big hoops just to get C# to run on the XBOX at all, and there is an associated performance cost with these hoops.&#xD;&#xA;&#xD;&#xA;You don't get to be TOO lazy with memory allocation. XNA on Windows greatly simplifies memory allocation, as you'd expect from a managed environment. However, on the XBOX, the .NET compact CLR uses a sweep &amp; compact approach to garbage collection, and the typical approach to preventing stuttering in your game due to collections, is to avoid collections altogether. This requires using object pools for your classes, and using structs for smaller objects, where you'd normally uses classes in the Windows environment. Object pooling generally requires an allocate/free model of object management, which is no worse (and maybe a little bit better) than C++ memory management.&#xD;&#xA;&#xD;&#xA;That said, development in C#/XNA is still many times faster and easier than development in C++ without a DirectX API (which XNA is).&#xD;&#xA;&#xD;&#xA;Here's the status of a game I'm making in XNA, after 4 weeks of work:&#xD;&#xA;&#xD;&#xA;![Screenshot of game after 4 weeks of development.][1]&#xD;&#xA;&#xD;&#xA;That should give you a sense of how incredibly fast development with the XNA library/API is in combination with C#.&#xD;&#xA;&#xD;&#xA;That screenshot is rendered by the XBOX at about 65FPS.&#xD;&#xA;&#xD;&#xA;If you're a hobbyist game developer, and you want to make games for a console, not only is XNA+XBOX your only realisitic option, it's also a pretty amazing option, a fun development environment, and many XBOX Live Arcade games have been made with XNA, and made hundreds of thousands of dollars doing it. ([Limbo][2] for example.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Hyymj.jpg&#xD;&#xA;  [2]: http://www.limbogame.org/" />
  <row Id="22362" PostHistoryTypeId="5" PostId="10607" RevisionGUID="30f55558-fa16-419d-886c-c66f74af9e23" CreationDate="2011-04-03T20:50:14.617" UserId="6498" Comment="added 46 characters in body" Text="I have absolutely no idea about game developing but want to know following things about [internet sweepstake games][1]: Click on demo and play any of the game.&#xD;&#xA;&#xD;&#xA; 1. What technology (programming language) is used to develop these games. e.g. Flash, Silverlight, etc.&#xD;&#xA; 2. If I wish to develop such game(s) what is the best technology to use, how much time it might take to learn and develop a simple commercial product.&#xD;&#xA; 3. Is the algorithm/code behind the scene re-usable while changing the front graphics. I mean a scalable/adjustible game.&#xD;&#xA; 4. In case I wish to hire a game programmer what would be the approximate cost or per/hr charge for such developer.&#xD;&#xA; 5. Any good books or online tutorial/videos to learn/see this in action?&#xD;&#xA;&#xD;&#xA;Or any other ideas or suggestions? &#xD;&#xA;Sorry if these are lot of questions but this is the only good place I see asking such questions. I will more than happy to post them as separate questions if that is necessary.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sweepstakesmachines.com/games" />
  <row Id="22363" PostHistoryTypeId="25" PostId="10603" RevisionGUID="9a6839d9-c8b8-4502-b7e5-7f9b4cbafff4" CreationDate="2011-04-03T21:08:52.947" Comment="http://twitter.com/#!/StackGameDev/status/54651605265547264" />
  <row Id="22368" PostHistoryTypeId="2" PostId="10609" RevisionGUID="a4b40336-4d53-4030-9faa-a0a2391ea58e" CreationDate="2011-04-03T22:57:30.953" UserId="3656" Text="Why all the talk about jailbreaking?&#xD;&#xA;&#xD;&#xA;The iOS developers I know use ad-hoc distribution for testing. It's like when you sign your own SSL certificate on a home server. You'll have to add your own signature to the list of allowed signers on your device (butchering the terminology here, sorry), and then you can test to your heart's content.&#xD;&#xA;&#xD;&#xA;Google turned up this:&#xD;&#xA;&#xD;&#xA;http://www.readwriteweb.com/mobile/2010/12/apple-best-kept-secret-how-to-do-ad-hoc-installs.php" />
  <row Id="22369" PostHistoryTypeId="2" PostId="10610" RevisionGUID="1d3c76e6-dc13-4ca5-b8b3-c6b98ddc6bdc" CreationDate="2011-04-04T00:07:59.623" UserId="1929" Text="I've recently started completing games and accumulating &quot;assets&quot; -- graphics, sound effects, textures, 3D models, etc. that I can build on and reuse from game to game.&#xD;&#xA;&#xD;&#xA;**Is there a great, free place I can store an unlimited amount of this content?** Ideally, I would like to categorize my content (by game) and tag it (eg. icons, characters, sound-effects, soundscapes). Unlimited storage is key, because I want everything stored in one place.&#xD;&#xA;&#xD;&#xA;Also, most of my content is strange file formats; graphics are vector done in Flash (.FLA), or in GIMP (.XCF); I don't know what 3D model formats I'll use. Sounds will be .MP3.&#xD;&#xA;&#xD;&#xA;Where can I store this stuff?&#xD;&#xA;&#xD;&#xA;**Edit:** Not quite 100% dupe, but quite similar to http://gamedev.stackexchange.com/questions/801/assets-management-database-or-versioning-system" />
  <row Id="22370" PostHistoryTypeId="1" PostId="10610" RevisionGUID="1d3c76e6-dc13-4ca5-b8b3-c6b98ddc6bdc" CreationDate="2011-04-04T00:07:59.623" UserId="1929" Text="Game Asset Storage - Graphics, 3D Models, Sounds" />
  <row Id="22371" PostHistoryTypeId="3" PostId="10610" RevisionGUID="1d3c76e6-dc13-4ca5-b8b3-c6b98ddc6bdc" CreationDate="2011-04-04T00:07:59.623" UserId="1929" Text="&lt;assets&gt;&lt;asset-management&gt;&lt;storage&gt;" />
  <row Id="22372" PostHistoryTypeId="25" PostId="10598" RevisionGUID="5eca6d9b-42b1-4cca-b515-efcdaf7af90d" CreationDate="2011-04-04T00:08:53.627" Comment="http://twitter.com/#!/StackGameDev/status/54696907460714496" />
  <row Id="22373" PostHistoryTypeId="2" PostId="10611" RevisionGUID="c6a12540-68a0-4c3b-8040-594fd87d51d0" CreationDate="2011-04-04T00:25:59.683" UserId="189" Text="Separate and, more importantly, straightforward (answerable) questions work best on this site. That said, here's an answer to each of your sub-questions:&#xD;&#xA;&#xD;&#xA; 1. Any web technology could be used. The particular one you linked to is Flash (as you can tell if you right-click the game).&#xD;&#xA; 2. The best technology to use is generally the one you know best, or if you don't know any of them, maybe just choose the most popular one (or the one that best fits your needs, but in this case your needs can be met by any of the interactive web technologies). Flash is most popular by far for interactive web things; Silverlight is a good choice too, but fewer of your customers will come to your site with it installed. Java is another option; it probably has more coverage than Silverlight, but it is (in my opinion) more complicated to create things in, especially to a beginner or non-programmer. We are slowly moving towards HTML5 and JavaScript, so if you want to be ahead of the curve then look into that (it has the advantage of not requiring plugins and thus generally being lighter-weight, but on the other hand the user needs a recent browser).&#xD;&#xA; 3. Of course, you can make anything you want. If you plan it to be so, then make it so. If you are interested in the details from the programming perspective, you could browse through our [architecture tag][1], and do searches (here and on your search engine) for the MVC or MVP pattern. This would get you started on a game engine which has a completely separated model and view, which would be the most &quot;clean&quot; way of doing this. For simplicity's sake you might just want to put conditional statements on the image loading and/or algorithm pieces of code and load them from a file or something. Again, this is very feasible, you would just need to plan it out and then make it.&#xD;&#xA; 4. This varies widely, depending on the quality of the programmer/team, country, and so on. It might be a good question for the [Programmers Stack Exchange][2], but then again you will likely get the same answer from them. You'll need to do your research on this, maybe look at websites like [vWorker][3] if that's the kind of place you want to hire from. If you are looking to hire a local programmer, look up local companies' average salaries for software developers.&#xD;&#xA; 5. Sort of. We have a number of questions on books and tutorials (search for those keywords using the box in the top right corner) but they are about game development in general. Look for books and information on serious games, as that's what I believe this would be classified under, but I don't think you will specifically find a tutorial on creating &quot;internet sweepstakes games&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/tagged/architecture&#xD;&#xA;  [2]: http://programmers.stackexchange.com/&#xD;&#xA;  [3]: http://www.vworker.com/" />
  <row Id="22374" PostHistoryTypeId="2" PostId="10612" RevisionGUID="a9252421-dbf1-4c87-888d-927c79d1cdc3" CreationDate="2011-04-04T00:35:30.067" UserId="5844" Text="Hey, hello guys, I am trying to draw a simple 3D object generated by Google SketchUp 8 Pro onto my WebGL app, the model is a simple cylinder.&#xD;&#xA;&#xD;&#xA;I opened the exported file and copied the vertices positions, indices, normals and texture coordinates into a .json file in order to be able to use it on javascript. Everything seems to work fine, execept for the texture coordinates which have some pretty big values, like 46.331676 and also negative values. Now I don't know if I am wrong, but isn't 2D texture coordinates supposed to be in a range from 0.0 to 1.0 only?&#xD;&#xA;&#xD;&#xA;Well, drawing the model using these texture coordinates gives me a totally weird look, and I can only get to see the texture properly when I am very close (not really me, the cam) to the model, as if the texture has been insanely reduced in it's size and repeated infinitelly across the model's faces. (yeah, I am using GL_REPEAT on that texture wrap thing)&#xD;&#xA;&#xD;&#xA;What I noticed is that if I get all these coordinates and divide them by 10 or 100 I get a much &quot;normal&quot; look, but still not in the 0.0 to 1.0 range.&#xD;&#xA;&#xD;&#xA;Here's my json file: http://pastebin.com/Aa4wvGvv&#xD;&#xA;&#xD;&#xA;Here are my GLSL Shaders: http://pastebin.com/DR4K37T9&#xD;&#xA;&#xD;&#xA;And here is the .X file exported by SketchUp: http://pastebin.com/hmYAJZWE&#xD;&#xA;&#xD;&#xA;I've also tried to draw this model using XNA, but still not working, tho it gives me a different look. Using this HLSL shaders: http://pastebin.com/RBgVFq08&#xD;&#xA;&#xD;&#xA;I tried exporting the same model to different formats, collada, fbx, and x. All those yields the same thing." />
  <row Id="22375" PostHistoryTypeId="1" PostId="10612" RevisionGUID="a9252421-dbf1-4c87-888d-927c79d1cdc3" CreationDate="2011-04-04T00:35:30.067" UserId="5844" Text="Can't understand these UV texture coordinates (range is NOT 0.0 to 1.0)" />
  <row Id="22376" PostHistoryTypeId="3" PostId="10612" RevisionGUID="a9252421-dbf1-4c87-888d-927c79d1cdc3" CreationDate="2011-04-04T00:35:30.067" UserId="5844" Text="&lt;opengl&gt;&lt;textures&gt;&lt;models&gt;&lt;webgl&gt;" />
  <row Id="22377" PostHistoryTypeId="2" PostId="10613" RevisionGUID="dc5e0a05-9d65-4a45-93aa-71a3235a1ee0" CreationDate="2011-04-04T00:50:23.077" UserId="189" Text="I would just keep the content carefully sorted into folders for what you call &quot;tags&quot; and subfolders by game. Maybe something like this:&#xD;&#xA;&#xD;&#xA;- /assets&#xD;&#xA;    - /2d&#xD;&#xA;        - /spritesheets_tilesets (i.e. combination images)&#xD;&#xA;            - maybe even a sub folder here for humans, animals, etc.&#xD;&#xA;        - /textures (tileable images)&#xD;&#xA;            - you could have subfolders here for sizes, if they're all square power-of-two textures&#xD;&#xA;        - /animated&#xD;&#xA;            - this would be gifs; animation spritesheets would go in spritesheets_tilesets&#xD;&#xA;    - /3d&#xD;&#xA;        - maybe different model types? at the very least, maybe two folders here for organic and non-organic, if you have any mocap files they should have their own subfolder obviously, but for the most part 3D models are 3D models. Name them as best as possible, and where necessary put a screenshot of the model with the same name in the same folder so that you can quickly see models without having to load them in your modeling program.&#xD;&#xA;    - /audio&#xD;&#xA;        - /music&#xD;&#xA;            - if you can come up with different mood types or something, that might be good subfolder candidates here&#xD;&#xA;        - /sound effects&#xD;&#xA;            - again, maybe have folders by type - explosion, shoot, ...&#xD;&#xA;        - /voice&#xD;&#xA;    - /video&#xD;&#xA;        - i can't think of any subfolders for video. broken out by game is probably fine.&#xD;&#xA;    - /text&#xD;&#xA;        - /ascii art&#xD;&#xA;        - anything else you think might be an asset&#xD;&#xA;&#xD;&#xA;Notes:&#xD;&#xA;&#xD;&#xA;- In the &quot;deepest&quot; folder of each of the above things, that's where you should break it out by game if you want.&#xD;&#xA;- Remember, as you fill up the folders, that you can put files in any folder; you don't have to only put files in the deepest folder. A great example is the 2D folder; you're going to have content which doesn't fit the three subfolders I came up with, and probably can't be grouped with anything else, so just leave it in the 2D folder.&#xD;&#xA;- However, to reduce mess, every single file should be properly named. Come up with a consistent naming style and rename all your files to match this style. If you want to capitalize the first letter of every word in a filename, do that for everything; if you don't want files to have spaces but instead replace them with underscores, be consistent with that across all your files. This will help the readibility, both of browsing these folders and of any code or data files that have to list these filenames. Plus it helps you guess at a filename and not have to try variations of capitalization and underscores/spaces/nothing.&#xD;&#xA;&#xD;&#xA;Now, assuming you are okay with the above method of organization, you just have to manage and back up a folder! You can use any of many cloud storage solutions to do this. You could have a server somewhere and FTP everything to/from it (don't use a web server; webhosts don't like being used as backup solutions and have no reservations in deleting files if they see you using it as pure backup). One solution I highly recommend you check out is [Amazon S3][1]; this would truly be unlimited storage, as you ask for, at a cost. But the price is very low. Or, you can simulate unlimited storage by buying a large hard drive(s) and just keeping everything on it (back it up somehow of course!!). Then you have the benefit of always having fast access to your data, whereas S3 would require a (fast) internet connection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aws.amazon.com/s3/" />
  <row Id="22378" PostHistoryTypeId="5" PostId="10612" RevisionGUID="76a8d1ba-5906-478a-a8c4-768bab1a212f" CreationDate="2011-04-04T00:54:57.703" UserId="5844" Comment="added 319 characters in body" Text="Hey, hello guys, I am trying to draw a simple 3D object generated by Google SketchUp 8 Pro onto my WebGL app, the model is a simple cylinder.&#xD;&#xA;&#xD;&#xA;I opened the exported file and copied the vertices positions, indices, normals and texture coordinates into a .json file in order to be able to use it on javascript. Everything seems to work fine, execept for the texture coordinates which have some pretty big values, like 46.331676 and also negative values. Now I don't know if I am wrong, but isn't 2D texture coordinates supposed to be in a range from 0.0 to 1.0 only?&#xD;&#xA;&#xD;&#xA;Well, drawing the model using these texture coordinates gives me a totally weird look, and I can only get to see the texture properly when I am very close (not really me, the cam) to the model, as if the texture has been insanely reduced in it's size and repeated infinitelly across the model's faces. (yeah, I am using GL_REPEAT on that texture wrap thing)&#xD;&#xA;&#xD;&#xA;What I noticed is that if I get all these coordinates and divide them by 10 or 100 I get a much &quot;normal&quot; look, but still not in the 0.0 to 1.0 range.&#xD;&#xA;&#xD;&#xA;Here's my json file: http://pastebin.com/Aa4wvGvv&#xD;&#xA;&#xD;&#xA;Here are my GLSL Shaders: http://pastebin.com/DR4K37T9&#xD;&#xA;&#xD;&#xA;And here is the .X file exported by SketchUp: http://pastebin.com/hmYAJZWE&#xD;&#xA;&#xD;&#xA;I've also tried to draw this model using XNA, but still not working, tho it gives me a different look. Using this HLSL shaders: http://pastebin.com/RBgVFq08&#xD;&#xA;&#xD;&#xA;I tried exporting the same model to different formats, collada, fbx, and x. All those yields the same thing.&#xD;&#xA;&#xD;&#xA;For you to understand better what is going on see this screen shot: http://img97.imageshack.us/i/printwgl.png/&#xD;&#xA;&#xD;&#xA;The cylinder on the right is the model I am reffering to, the cubes, the floor and the skybox are models that I did myself &quot;by hand&quot;. The cylinder is using the same texture as the other lower 2 boxers." />
  <row Id="22379" PostHistoryTypeId="5" PostId="10612" RevisionGUID="5fce61ac-2c41-4710-bbf6-3b0eb573e248" CreationDate="2011-04-04T01:06:49.527" UserId="5844" Comment="English mistakes" Text="Hey, hello guys, I am trying to draw a simple 3D object generated by Google SketchUp 8 Pro onto my WebGL app, the model is a simple cylinder.&#xD;&#xA;&#xD;&#xA;I opened the exported file and copied the vertices positions, indices, normals and texture coordinates into a .json file in order to be able to use it on javascript. Everything seems to work fine, execept for the texture coordinates which have some pretty big values, like 46.331676 and also negative values. Now I don't know if I am wrong, but isn't 2D texture coordinates supposed to be in a range from 0.0 to 1.0 only?&#xD;&#xA;&#xD;&#xA;Well, drawing the model using these texture coordinates gives me a totally weird look, and I can only get to see the texture properly when I am very close (not really me, the cam) to the model, as if the texture has been insanely reduced in it's size and repeated infinitelly across the model's faces. (yeah, I am using GL_REPEAT on that texture wrap thing)&#xD;&#xA;&#xD;&#xA;What I noticed is that if I get all these coordinates and divide them by 10 or 100 I get a much &quot;normal&quot; look, but still not in the 0.0 to 1.0 range.&#xD;&#xA;&#xD;&#xA;Here's my json file: http://pastebin.com/Aa4wvGvv&#xD;&#xA;&#xD;&#xA;Here are my GLSL Shaders: http://pastebin.com/DR4K37T9&#xD;&#xA;&#xD;&#xA;And here is the .X file exported by SketchUp: http://pastebin.com/hmYAJZWE&#xD;&#xA;&#xD;&#xA;I've also tried to draw this model using XNA, but still not working, tho it gives me a different look. Using this HLSL shaders: http://pastebin.com/RBgVFq08&#xD;&#xA;&#xD;&#xA;I tried exporting the same model to different formats, collada, fbx, and x. All those yields the same thing.&#xD;&#xA;&#xD;&#xA;For you to understand better what is going on see this screen shot: http://img97.imageshack.us/i/printwgl.png/&#xD;&#xA;&#xD;&#xA;The cylinder on the right is the model I am refering to, the cubes, the floor and the skybox are models that I did myself &quot;by hand&quot;. The cylinder is using the same texture as the other lower 2 boxes." />
  <row Id="22380" PostHistoryTypeId="5" PostId="10572" RevisionGUID="1a7322b0-235a-45c6-9564-3700b9648e1e" CreationDate="2011-04-04T01:24:05.777" UserId="4234" Comment="added 208 characters in body; edited tags" Text="I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the projectile itself? I'd like to keep the projectile at the center of the 'camera', but I'm not sure how to do this in Silverlight. I thought of using a translate transform to constantly scroll the parent canvas's position, but is this the best way of doing this in Silverlight?&#xD;&#xA;&#xD;&#xA;Edit - I'm using [Farseer Physics][1] with the [Physics Helper library][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com&#xD;&#xA;  [2]: http://physicshelper.codeplex.com&#xD;&#xA;&#xD;&#xA;**Edit 2 - Solution **&#xD;&#xA;&#xD;&#xA;It turns out the MSI installer of the Physics Helper installs an older version that had a broken camera. I downloaded and recompiled the latest source version and it now works!&#xD;&#xA;" />
  <row Id="22381" PostHistoryTypeId="6" PostId="10572" RevisionGUID="1a7322b0-235a-45c6-9564-3700b9648e1e" CreationDate="2011-04-04T01:24:05.777" UserId="4234" Comment="added 208 characters in body; edited tags" Text="&lt;c#&gt;&lt;physics&gt;&lt;camera&gt;&lt;silverlight&gt;&lt;side-scroller&gt;" />
  <row Id="22382" PostHistoryTypeId="2" PostId="10614" RevisionGUID="2ee095fb-e68c-4d01-965c-87b9779946d2" CreationDate="2011-04-04T02:37:50.550" UserId="6503" Text="I am looking for a good physics engine to use with an Ogre game I'm writing.&#xD;&#xA;&#xD;&#xA;I would prefer for it to be free, open source, mature, simple to use, easy to learn, and flexible.&#xD;&#xA;&#xD;&#xA;I'm currently thinking of using either Newton, Bullet or ODE.&#xD;&#xA;&#xD;&#xA;What are the general pros/cons of each?&#xD;&#xA;&#xD;&#xA;Help would be much appreciated." />
  <row Id="22383" PostHistoryTypeId="1" PostId="10614" RevisionGUID="2ee095fb-e68c-4d01-965c-87b9779946d2" CreationDate="2011-04-04T02:37:50.550" UserId="6503" Text="Best 3D Physics Engine to use with Ogre" />
  <row Id="22384" PostHistoryTypeId="3" PostId="10614" RevisionGUID="2ee095fb-e68c-4d01-965c-87b9779946d2" CreationDate="2011-04-04T02:37:50.550" UserId="6503" Text="&lt;c++&gt;&lt;physics&gt;&lt;ogre&gt;&lt;bullet-physics&gt;" />
  <row Id="22385" PostHistoryTypeId="5" PostId="10612" RevisionGUID="35658993-54cb-409f-b8b2-da6cc7734a24" CreationDate="2011-04-04T02:46:07.860" UserId="5844" Comment="correcting incorrect info" Text="Hey, hello guys, I am trying to draw a simple 3D object generated by Google SketchUp 8 Pro onto my WebGL app, the model is a simple cylinder.&#xD;&#xA;&#xD;&#xA;I opened the exported file and copied the vertices positions, indices, normals and texture coordinates into a .json file in order to be able to use it on javascript. Everything seems to work fine, execept for the texture coordinates which have some pretty big values, like 46.331676 and also negative values. Now I don't know if I am wrong, but isn't 2D texture coordinates supposed to be in a range from 0.0 to 1.0 only?&#xD;&#xA;&#xD;&#xA;Well, drawing the model using these texture coordinates gives me a totally weird look, and I can only get to see the texture properly when I am very close (not really me, the cam) to the model, as if the texture has been insanely reduced in it's size and repeated infinitelly across the model's faces. (yeah, I am using GL_REPEAT on that texture wrap thing)&#xD;&#xA;&#xD;&#xA;What I noticed is that if I get all these coordinates and divide them by 10 or 100 I get a much &quot;normal&quot; look, but still not in the 0.0 to 1.0 range.&#xD;&#xA;&#xD;&#xA;Here's my json file: http://pastebin.com/Aa4wvGvv&#xD;&#xA;&#xD;&#xA;Here are my GLSL Shaders: http://pastebin.com/DR4K37T9&#xD;&#xA;&#xD;&#xA;And here is the .X file exported by SketchUp: http://pastebin.com/hmYAJZWE&#xD;&#xA;&#xD;&#xA;I've also tried to draw this model using XNA, but still not working. Using this HLSL shaders: http://pastebin.com/RBgVFq08&#xD;&#xA;&#xD;&#xA;I tried exporting the same model to different formats, collada, fbx, and x. All those yields the same thing.&#xD;&#xA;&#xD;&#xA;For you to understand better what is going on see this screen shot: http://img97.imageshack.us/i/printwgl.png/&#xD;&#xA;&#xD;&#xA;The cylinder on the right is the model I am refering to, the cubes, the floor and the skybox are models that I did myself &quot;by hand&quot;. The cylinder is using the same texture as the other lower 2 boxes." />
  <row Id="22386" PostHistoryTypeId="25" PostId="10610" RevisionGUID="05a65c0b-4eac-436b-ad29-86627e34e5fb" CreationDate="2011-04-04T03:08:53.340" Comment="http://twitter.com/#!/StackGameDev/status/54742205163765760" />
  <row Id="22387" PostHistoryTypeId="2" PostId="10615" RevisionGUID="cf554a2a-2cfd-4747-a3f5-161eb1788e1b" CreationDate="2011-04-04T03:31:05.247" UserId="6504" Text="(Texture coordinates can definitely be outside of 0-1.) I think this is just OpenGL being weird. IIRC, Spheres use texture coordinates that put the 0-1 square on ~1/16 of the surface, and I wouldn't be suprised if Cylinders do something similar. Fix-wise, you might have to write your own cylinder code, issuing the appropiate texture coordinates." />
  <row Id="22388" PostHistoryTypeId="5" PostId="10614" RevisionGUID="38ab27ca-38ae-48e8-8b84-1357969ba44c" CreationDate="2011-04-04T03:38:48.017" UserId="51" Comment="deleted 43 characters in body" Text="I am looking for a good physics engine to use with an Ogre game I'm writing.&#xD;&#xA;&#xD;&#xA;I would prefer for it to be free, open source, mature, simple to use, easy to learn, and flexible.&#xD;&#xA;&#xD;&#xA;I'm currently thinking of using either Newton, Bullet or ODE.&#xD;&#xA;&#xD;&#xA;What are the general pros/cons of each?&#xD;&#xA;" />
  <row Id="22389" PostHistoryTypeId="5" PostId="9131" RevisionGUID="492354d8-f474-4a44-8913-ff3530601074" CreationDate="2011-04-04T03:40:30.480" UserId="51" Comment="deleted 1 characters in body" Text="Ogre (http://www.ogre3d.org) is a multiplatform, open-source 3D rendering engine." />
  <row Id="22390" PostHistoryTypeId="2" PostId="10616" RevisionGUID="d8b91bb5-0888-4937-b0e5-ce2f5e160749" CreationDate="2011-04-04T04:55:13.677" UserId="4513" Text="To quote the [Ogre forums][1] on the matter.&#xD;&#xA;&#xD;&#xA;&gt; Yeah, it's hard to point to any one engine as definitely the best, since they are all quite different. They have different collision shapes (Havok has cylinders, PhysX doesn't), different joints (I think Newton had a corkscrew joint which Havok might have too, but nothing else does) and various other issues.&#xD;&#xA;Then there's the api, Newton is based entirely on callbacks (which I don't like), Havok is painfully SSE obsessed (get used to vector math which looks like C rather than C++. Good for performance, but is annoying to use), PhysX needs that stupid driver crap otherwise it's dll won't start, etc.&#xD;&#xA;&#xD;&#xA;&gt; The most feature filled one is Havok. The animation system alone is enough reason for it (full skeleton animation with physics interaction, skeleton retargetting, inverse kinematics, export tools, etc). Plus if you pay massive amounts of cash you can get Havok Destruction, Havok AI, Havok Behaviour and other bits. (The basic Havok physics and animation components are free for pc).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/forums/viewtopic.php?f=1&amp;t=63839&#xD;&#xA;&#xD;&#xA;In short, it will ideally come down to API differences, because overall they are all performing the same operations; minus some performance differences.&#xD;&#xA;However, it will matter most on how YOU like them, if you can't use it to its best ability, the spot differences won't matter.&#xD;&#xA;If you find the Physics engine to be your biggest bottleneck (from measurement of course), then later you can weight the odds and ends against each other. I suggest for now you find one which is easiest for you to learn.&#xD;&#xA;&#xD;&#xA;Personally, I found Bullet pretty straight forward and simple to learn; it has a nice license, an active community and is not going to be a cause for concern with performance. " />
  <row Id="22391" PostHistoryTypeId="2" PostId="10617" RevisionGUID="f3439ef9-cf56-4133-a955-1515e3231673" CreationDate="2011-04-04T06:01:12.607" UserId="6467" Text="I've been reading [Real-Time Collision Detection][1] and it recommends expanding each node's AABB volume by a factor of 2, making its expanded volume 8 times as large.  I am surprised that it needs to be this large, and there must be quite a lot of overlap and unnecessary child node traversals due to this large size.&#xD;&#xA;&#xD;&#xA;Is there a mathematical reason for the radius ratio being two?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net/" />
  <row Id="22392" PostHistoryTypeId="1" PostId="10617" RevisionGUID="f3439ef9-cf56-4133-a955-1515e3231673" CreationDate="2011-04-04T06:01:12.607" UserId="6467" Text="Are Loose Octrees Wasteful?" />
  <row Id="22393" PostHistoryTypeId="3" PostId="10617" RevisionGUID="f3439ef9-cf56-4133-a955-1515e3231673" CreationDate="2011-04-04T06:01:12.607" UserId="6467" Text="&lt;collision-detection&gt;&lt;octree&gt;" />
  <row Id="22394" PostHistoryTypeId="5" PostId="10617" RevisionGUID="5c38530e-1399-4da8-a35c-91db74cb7eb7" CreationDate="2011-04-04T06:06:55.190" UserId="6467" Comment="added 208 characters in body; added 12 characters in body; added 58 characters in body; added 116 characters in body" Text="I've been reading [Real-Time Collision Detection][1] and for loose octrees it recommends expanding each node's AABB length by a factor of 2, making its expanded volume 8 times as large.  I am surprised that it needs to be this large, and there must be quite a lot of overlap and unnecessary child node traversals due to this large size.  Within the top few levels of the octree, triangles are generally very small compared to the node's volume so I don't see any problem with making their scaling factor much less than 2, perhaps even 1.1 (And then ramping it back up to 2 after a certain depth.)&#xD;&#xA;&#xD;&#xA;*This is for an octree holding static background geometry so I'm not concerned with how long building it takes.*&#xD;&#xA;&#xD;&#xA;Is there a mathematical reason for the radius ratio being two?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net/" />
  <row Id="22395" PostHistoryTypeId="2" PostId="10618" RevisionGUID="c856973e-d5e9-44cb-826f-1708f2bd8194" CreationDate="2011-04-04T06:13:27.913" UserId="4129" Text="**unlimited** is a difficult thing.  But you don't really mean unlimited, you just mean *really big quota*.&#xD;&#xA;&#xD;&#xA;First, compress everything well.  On Windows, simply enable '[compressed folders][1]' for the folder where you are placing things.  Or to compress as well as possible use a proper archiver such as [7zip][2].  The archive approach has the advantage of being a nice single file that is easy to send to other systems, and typically uses 'solid' compression so the ratio can be substantially higher than a Windows compressed folder; however, it is also much slower and non-transparent to work with.&#xD;&#xA;&#xD;&#xA;The best place to keep large amounts of data is locally, but keep multiple copies.  External hard-drives are very cheap these days.  You can put a lot on a DVD every few months and then put that DVD somewhere safe.&#xD;&#xA;&#xD;&#xA;But if you also want off-site backup - good for robust disaster recovery - then email them to your gmail account (using a filter to hide them from normal view, e.g. prefix all subject lines with CRZY or something else that doesn't occur in normal emails).  Put some context into the subject and message body so you can search them well using the gmail interface later to find them.&#xD;&#xA;&#xD;&#xA;After you have filled up the [7GB or so][3] that gmail offers, you may consider a paid solution.&#xD;&#xA;&#xD;&#xA;([gmailFS][4] [solutions][5] are not robust and dependable)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://support.microsoft.com/kb/306531&#xD;&#xA;  [2]: http://www.7-zip.org/&#xD;&#xA;  [3]: http://mail.google.com/support/bin/answer.py?answer=6558&#xD;&#xA;  [4]: http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem.html&#xD;&#xA;  [5]: http://www.viksoe.dk/code/gmail.htm" />
  <row Id="22396" PostHistoryTypeId="4" PostId="10617" RevisionGUID="3436112f-f243-44f8-bfbe-45d554dd9e56" CreationDate="2011-04-04T07:01:26.160" UserId="6467" Comment="edited title" Text="Are Loose Octrees Too Loose?" />
  <row Id="22397" PostHistoryTypeId="2" PostId="10619" RevisionGUID="db3178a1-b56c-4f16-9eff-c69ec3de58a7" CreationDate="2011-04-04T08:06:44.180" UserId="2798" Text="Looks like SketchUp isn't normalizing your texture coordinates, or using a metric of its own. Having texcoords &lt; 0 or &gt; 1 and GL_REPEAT as texture wrapping means that the texture will be scaled down to fit the geometry and repeated horizontally and vertically.&#xD;&#xA;&#xD;&#xA;Try importing the mesh in another modelling package (MilkShape, Blender) and fixing the uv map from there." />
  <row Id="22398" PostHistoryTypeId="2" PostId="10620" RevisionGUID="e0321f27-df4f-496b-a663-39fa31b975f1" CreationDate="2011-04-04T09:01:33.110" UserId="6506" Text="Never mind, logic error........" />
  <row Id="22399" PostHistoryTypeId="25" PostId="10617" RevisionGUID="391afca6-3f6f-496b-bef3-828d70ccf82a" CreationDate="2011-04-04T09:09:00.717" Comment="http://twitter.com/#!/StackGameDev/status/54832832467566593" />
  <row Id="22400" PostHistoryTypeId="5" PostId="10620" RevisionGUID="b0060455-5d95-4c34-a3d2-d86d822da168" CreationDate="2011-04-04T09:15:45.660" UserId="6506" Comment="added 434 characters in body; deleted 8 characters in body" Text="Ok, hopefully this makes sense...  Get the vectors of the balls and calculate their collision point, call this p1.  Find the angle between the 2 vectors, call this a1.  At a1/2 draw a line, this will be in the exact middle in degrees between the two vectors.  You need the location on this line where sin(a1/2) = (radius1 + radius2)/2.  If this picture is visualized in my head right, this is where the collision occurs.  Sorry if this is wrong... its late." />
  <row Id="22401" PostHistoryTypeId="2" PostId="10621" RevisionGUID="f07b795e-4a09-44ed-b2b6-10a8c60701ce" CreationDate="2011-04-04T09:44:44.620" UserId="764" Text="The reason that the scaling factor is two is because this is the *absolute minimum* scaling factor that *guarantees* an at-most-cell-sized object can be placed within a single cell that contains it's centre point.&#xD;&#xA;&#xD;&#xA;This is easy to visualise - imagine the centre point of a cell-sized object is at the very edge of a given cell - then the far edge of the object will be 1/2 of a cell width outside the cell. Add this boundary to both sides and you get your factor of two...&#xD;&#xA;&#xD;&#xA;You are right that this does create overlap and can cause multiple child traversals, but you can avoid &quot;unnecessary&quot; traversals by paying attention to your bounding box as you descend the octree. In practice, you won't need to go very deep most of the time to eliminate the possibility of a collision.&#xD;&#xA;&#xD;&#xA;You *could* reduce the scaling factor on the top level octree nodes but **only if** you can guarantee that no object would ever be large enough to extend beyond the size of this margin. There might be a small benefit in doing this, but as soon as you get down a few levels you will need your scaling factor of two anyway - which will account for the vast majority of nodes in the octree.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22402" PostHistoryTypeId="2" PostId="10622" RevisionGUID="95312012-684b-44c6-8e42-1bde6a9b449f" CreationDate="2011-04-04T10:09:11.593" UserId="6507" Text="does anybody know how it´s possible for &quot;sc2gears&quot; to analyze the the replay files?&#xD;&#xA;How can i communicate with the file, is there a API?&#xD;&#xA;&#xD;&#xA;It´s a very nice tool but i want to try and do some things different for my self.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;Gpx" />
  <row Id="22403" PostHistoryTypeId="1" PostId="10622" RevisionGUID="95312012-684b-44c6-8e42-1bde6a9b449f" CreationDate="2011-04-04T10:09:11.593" UserId="6507" Text="How to Analyze .sc2replay files" />
  <row Id="22404" PostHistoryTypeId="3" PostId="10622" RevisionGUID="95312012-684b-44c6-8e42-1bde6a9b449f" CreationDate="2011-04-04T10:09:11.593" UserId="6507" Text="&lt;starcraft-2&gt;" />
  <row Id="22405" PostHistoryTypeId="2" PostId="10623" RevisionGUID="7509bd10-f871-4fb8-a93b-b9c9bd646a5f" CreationDate="2011-04-04T10:12:02.927" UserId="3599" Text="I am not sure if Maya has Collada format export by default. I guess it does. Only in the case it does not, you might then just install a plugin: http://sourceforge.net/projects/colladamaya/    .Then, use a Blender build that supports collada import in at least in bones, weights, animation. I think latest blender beta builds do support it. You might try one or several of the latest here:  http://www.graphicall.org/builds/&#xD;&#xA;&#xD;&#xA;So, if all that works, means you can export as collada file from Maya, import that file into Blender, and from blender, export as just blend file (ie, for using in that engine mentioned) , or export as directx *.x file (perhaps the import might also work as well, and I think there are x exporters for Maya) , or, reported to work, export from Blender as FBX file,lastly, but with some tech problems of the md2 file format, you could use md2. You could as well just &quot;bake&quot; all frames inside an &quot;Action&quot; in blender, there's a button for that, so to be able to export an OBJ per frame, or, less memory/performance waste, one per x frames, then, in your code, use interpolation, linear or spline, between keyframes, if you can. You might need to do a conversion from these OBJ files to your .h files in a way that your code interpolates (blends motion between two keyframes), as so many objs might be too much memory for the iphone.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22406" PostHistoryTypeId="5" PostId="10622" RevisionGUID="17781b53-46c5-4a09-a4d0-ad7453527588" CreationDate="2011-04-04T10:17:11.467" UserId="6507" Comment="deleted 4 characters in body" Text="does anybody know how it´s possible for &quot;sc2gears&quot; to analyze the replay files?&#xD;&#xA;How can i communicate with the file, is there a API?&#xD;&#xA;&#xD;&#xA;It´s a very nice tool but i want to try and do some things different for my self.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;Gpx" />
  <row Id="22407" PostHistoryTypeId="25" PostId="10622" RevisionGUID="554c107d-829a-4633-9b18-6f771a184f96" CreationDate="2011-04-04T12:09:00.570" Comment="http://twitter.com/#!/StackGameDev/status/54878130988523520" />
  <row Id="22408" PostHistoryTypeId="2" PostId="10624" RevisionGUID="de87fe73-bcb1-4100-b0d6-8af2d26f94d1" CreationDate="2011-04-04T12:24:53.683" UserId="20" Text="The Starcraft 2 replays are stored as [MPQ][1] a compressed file-format developed and used by Blizzard. On the bottom of the Wiki page you'll also find links to MPQ parsers.&#xD;&#xA;&#xD;&#xA;Maybe you'll also want to have a look at the following open-source projects:&#xD;&#xA;[WARP][2] (a Starcraft 2 replay parser written in Java) or [phpsc2replay][3] (a replay parser written in PHP).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/MPQ&#xD;&#xA;  [2]: http://trac.erichseifert.de/warp&#xD;&#xA;  [3]: http://code.google.com/p/phpsc2replay/" />
  <row Id="22409" PostHistoryTypeId="5" PostId="10622" RevisionGUID="97028d2b-6386-41a5-aefd-d5db3ed2f71b" CreationDate="2011-04-04T12:26:08.673" UserId="20" Comment="minor spelling corrections, removed hi and thanks" Text="Does anybody know how it´s possible for &quot;[sc2gears][1]&quot; to analyze the replay files?&#xD;&#xA;How can I communicate with the file, is there an API?&#xD;&#xA;&#xD;&#xA;It´s a very nice tool but I want to try and do some things different for myself.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/sc2gears/" />
  <row Id="22410" PostHistoryTypeId="2" PostId="10625" RevisionGUID="be7170b1-2ae9-47bf-8d34-b73971cb487d" CreationDate="2011-04-04T13:37:53.017" UserId="4598" Text="If you want your uv coordinates to be exactly between 0 and 1, you could use a scale matrix for your model.&#xD;&#xA;&#xD;&#xA;So on loading your model, you could check for your max u and v coordinate and create a scaling matrix that will make it more &quot;normal&quot;. So that will replace your manual scaling of 10 or 100. So to let it fit, you will need to scale your uv coordinates down to [0,1].&#xD;&#xA;&#xD;&#xA;    |1/uMax|0     |&#xD;&#xA;    |0     |1/vMax|&#xD;&#xA;&#xD;&#xA;Of course this is just a workaround and you could better find a way to set Sketchup in the right settings (I think your exporter or Sketchup itself goes wrong here). But if it doesn't work out for you, create your post-loading-processor and save a texture scaling matrix." />
  <row Id="22411" PostHistoryTypeId="2" PostId="10626" RevisionGUID="e0ef1e05-964f-47b7-a72b-82b7e5bf3c4d" CreationDate="2011-04-04T13:48:55.580" UserId="6509" Text="From the StackOverflow post (it was recommended I move this):&#xD;&#xA;&#xD;&#xA;So, I'm working on a game engine, and I've made pretty good progress. However, my engine is single-threaded, and the advantages of splitting updating and rendering into separate threads sounds like a very good idea.&#xD;&#xA;&#xD;&#xA;How should I do this? Single threaded game engines are (conceptually) very easy to make, you have a loop where you update -&gt; render -&gt; sleep -&gt; repeat. However, I can't think of a good way to break updating and rendering apart, especially if I change their update rates (say I go through the update loop 25x a second, and have 60fps for rendering) - what if I begin updating halfway through a render loop, or vice versa?&#xD;&#xA;" />
  <row Id="22412" PostHistoryTypeId="1" PostId="10626" RevisionGUID="e0ef1e05-964f-47b7-a72b-82b7e5bf3c4d" CreationDate="2011-04-04T13:48:55.580" UserId="6509" Text="Multi threaded game - updating, rendering, and how to split them" />
  <row Id="22413" PostHistoryTypeId="3" PostId="10626" RevisionGUID="e0ef1e05-964f-47b7-a72b-82b7e5bf3c4d" CreationDate="2011-04-04T13:48:55.580" UserId="6509" Text="&lt;java&gt;&lt;performance&gt;&lt;gameloop&gt;&lt;multithreading&gt;&lt;efficiency&gt;" />
  <row Id="22414" PostHistoryTypeId="2" PostId="10627" RevisionGUID="81bf6e6b-9d98-44a0-9096-4dddba26e252" CreationDate="2011-04-04T13:51:38.493" UserId="5661" Text="Here is a blog post from Danc @ Lost Garden trying [to hook up artists with developers.][1]  Karnak games has a [great &quot;how-to&quot;][2] on hiring game artists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/2011/03/list-of-game-artists.html#comments&#xD;&#xA;  [2]: http://karnakgames.com/wp/2011/01/how-to-outsource-art-for-your-game-using-freelancing-sites" />
  <row Id="22416" PostHistoryTypeId="2" PostId="10628" RevisionGUID="41063cfc-cc83-41a7-a288-2675dd340eb2" CreationDate="2011-04-04T14:37:14.020" UserId="788" Text="I know the iPhone App Store limits how large an app can be in general and there are also limitations with AT&amp;T over the size it can be to transmit over a data plan vs WiFi. I have no idea what, if any, these limits are for Android apps and what I'm finding online is a mix of different numbers.&#xD;&#xA;&#xD;&#xA;Does anyone know these numbers definitively? The Android game I'm porting is in the 20-30MB range and we'd like to know if we need to further reduce its size." />
  <row Id="22417" PostHistoryTypeId="1" PostId="10628" RevisionGUID="41063cfc-cc83-41a7-a288-2675dd340eb2" CreationDate="2011-04-04T14:37:14.020" UserId="788" Text="What are the app file size limitations for different smartphone OSes &amp; carriers?" />
  <row Id="22418" PostHistoryTypeId="3" PostId="10628" RevisionGUID="41063cfc-cc83-41a7-a288-2675dd340eb2" CreationDate="2011-04-04T14:37:14.020" UserId="788" Text="&lt;iphone&gt;&lt;android&gt;&lt;windows-phone-7&gt;" />
  <row Id="22419" PostHistoryTypeId="25" PostId="10626" RevisionGUID="10358e41-d84f-4b3a-9f03-fcfd2a22e0e8" CreationDate="2011-04-04T15:09:00.457" Comment="http://twitter.com/#!/StackGameDev/status/54923429450752000" />
  <row Id="22420" PostHistoryTypeId="2" PostId="10629" RevisionGUID="bf23dff1-d33f-4d44-bea9-fc755cb2bf2a" CreationDate="2011-04-04T15:32:30.737" UserId="5929" Text="I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be a black bar inbetween the two images and so it seems that the image is not being moved into place quick enough. What would be the algorithm to do such a thing to give the illusion of a continuous background? &#xD;&#xA;I've got this at the moment (which loops, but with a black bar in between the background image)&#xD;&#xA;&#xD;&#xA;    bg1.X -= playerVel.X;&#xD;&#xA;    bg2.X -= playerVek.X;&#xD;&#xA;    &#xD;&#xA;    if (bg1Offset.X &lt; -bg_width) //bg_width = background image width&#xD;&#xA;        bg1.X -= bg1Offset.X - bg_width;&#xD;&#xA;    if (bg2Offset.X &lt; -bg_width)&#xD;&#xA;        bg2.X -= bg2Offset.X - bg_width;&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="22421" PostHistoryTypeId="1" PostId="10629" RevisionGUID="bf23dff1-d33f-4d44-bea9-fc755cb2bf2a" CreationDate="2011-04-04T15:32:30.737" UserId="5929" Text="Scrolling background loop" />
  <row Id="22422" PostHistoryTypeId="3" PostId="10629" RevisionGUID="bf23dff1-d33f-4d44-bea9-fc755cb2bf2a" CreationDate="2011-04-04T15:32:30.737" UserId="5929" Text="&lt;2d&gt;&lt;c#&gt;&lt;silverlight&gt;&lt;side-scroller&gt;&lt;infinite&gt;" />
  <row Id="22423" PostHistoryTypeId="2" PostId="10630" RevisionGUID="2448c627-5ca7-485f-8637-e81ebb9ac40b" CreationDate="2011-04-04T15:39:10.840" UserId="1156" Text="This may be for XNA not silverlight (still C# though), but [this][1] is a good tutorial to achieve what you want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xnadevelopment.com/tutorials/scrollinga2dbackground/ScrollingA2DBackground.shtml" />
  <row Id="22424" PostHistoryTypeId="5" PostId="10629" RevisionGUID="773a3cdb-b2a7-428b-ada2-a3180e432fed" CreationDate="2011-04-04T15:45:08.210" UserId="5929" Comment="edited body; added 452 characters in body" Text="I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be a black bar inbetween the two images and so it seems that the image is not being moved into place quick enough. What would be the algorithm to do such a thing to give the illusion of a continuous background? &#xD;&#xA;I've got this at the moment (which loops, but with a black bar in between the background image)&#xD;&#xA;&#xD;&#xA;     GeneralTransform gt = bg1Canvas.TransformToVisual(Application.Current.RootVisual as UIElement);&#xD;&#xA;            Point bg1Offset = gt.Transform(new Point(0, 0));&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            GeneralTransform gt2 = bg2Canvas.TransformToVisual(Application.Current.RootVisual as UIElement);&#xD;&#xA;            Point bg2Offset = gt2.Transform(new Point(0, 0));&#xD;&#xA;            &#xD;&#xA;           &#xD;&#xA;            bg1.TranslateX -=  playerVel.X;&#xD;&#xA;            bg2.TranslateX -=  playerVel.X;&#xD;&#xA;&#xD;&#xA;            if (bg1Offset .X &lt; -bg_width)&#xD;&#xA;                bg1.TranslateX -= bg1Offset .X - bg_width;&#xD;&#xA;            if (bg2Offset .X &lt; -bg_width)&#xD;&#xA;                bg2.TranslateX -= bg2Offset .X - bg_width;&#xD;&#xA;&#xD;&#xA;Any ideas?&#xD;&#xA;&#xD;&#xA;Edit - Updated code" />
  <row Id="22425" PostHistoryTypeId="5" PostId="10629" RevisionGUID="26d27ded-7d07-4bc0-90d9-72e18a9ed788" CreationDate="2011-04-04T15:51:05.987" UserId="5929" Comment="deleted 51 characters in body; deleted 2 characters in body; added 58 characters in body" Text="I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be a black bar inbetween the two images and so it seems that the image is not being moved into place quick enough. What would be the algorithm to do such a thing to give the illusion of a continuous background? &#xD;&#xA;I've got this at the moment (which loops, but with a black bar in between the background image)&#xD;&#xA;&#xD;&#xA;     GeneralTransform gt = bg1Canvas.TransformToVisual(Application.Current.RootVisual as UIElement);&#xD;&#xA;            Point bg1Offset = gt.Transform(new Point(0, 0));&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;     GeneralTransform gt2 = bg2Canvas.TransformToVisual(Application.Current.RootVisual as UIElement);&#xD;&#xA;            Point bg2Offset = gt2.Transform(new Point(0, 0));&#xD;&#xA;            &#xD;&#xA;           &#xD;&#xA;     bg1.TranslateX -=  playerVel.X; //bg1 and bg2 are the composite transforms for the canvas&#xD;&#xA;     bg2.TranslateX -=  playerVel.X;&#xD;&#xA;&#xD;&#xA;     if (bg1Offset.X &lt; -bg_width)&#xD;&#xA;         bg1.TranslateX -= bg1Offset.X - bg_width;&#xD;&#xA;     if (bg2Offset.X &lt; -bg_width)&#xD;&#xA;         bg2.TranslateX -= bg2Offset.X - bg_width;&#xD;&#xA;&#xD;&#xA;Any ideas?&#xD;&#xA;&#xD;&#xA;Edit - Updated code" />
  <row Id="22426" PostHistoryTypeId="2" PostId="10631" RevisionGUID="d0296c09-35d4-4980-8e1f-6769c80cbb1d" CreationDate="2011-04-04T17:12:38.023" UserId="1198" Text="I think you need to draw the image three times: Imagine your background is `\/` &#xD;&#xA;&#xD;&#xA;    1.    \ [ /\ ] / \/&#xD;&#xA;    2.    \/[ \/ ] \/ &#xD;&#xA;    3. \/ \ [ /\ ] /    &#xD;&#xA;&#xD;&#xA;If you're seeing a black bar (I presuem you are clearing to `Color.Black`) you probably have an error in your positioning code." />
  <row Id="22427" PostHistoryTypeId="2" PostId="10632" RevisionGUID="43fb0eee-e16f-43fd-ad0e-6a616825f587" CreationDate="2011-04-04T17:20:50.480" UserId="6214" Text="I'm creating a text RPG in Java, but I think this applies for a GUI as well with regard to the data structure. Each Level is a tiled map. Each Tile object has an (X,Y) coordinate, and references to adjacent tiles, but my question is with regard to storing object and NPC data on that Tile object. Depending on the size of the map I'm loading, this seems like a lot to load, but if that is the commonly accepted practice then I'll go with it." />
  <row Id="22428" PostHistoryTypeId="1" PostId="10632" RevisionGUID="43fb0eee-e16f-43fd-ad0e-6a616825f587" CreationDate="2011-04-04T17:20:50.480" UserId="6214" Text="For 2D tiled maps is all object and NPC data loaded into memory when the map is loaded?" />
  <row Id="22429" PostHistoryTypeId="3" PostId="10632" RevisionGUID="43fb0eee-e16f-43fd-ad0e-6a616825f587" CreationDate="2011-04-04T17:20:50.480" UserId="6214" Text="&lt;2d&gt;&lt;java&gt;&lt;data&gt;" />
  <row Id="22430" PostHistoryTypeId="2" PostId="10633" RevisionGUID="79ee90fb-99dd-4f5b-8623-8a86f1e675b9" CreationDate="2011-04-04T17:46:21.033" UserId="1929" Text="I'm not sure what you're asking. If you need the data, you have to load it. I would personally keep NPCs in a separate list, and track them separately from all the actual tile data. That's how I make these kinds of games.&#xD;&#xA;&#xD;&#xA;Because you only need to draw the tiles on-screen; but entities (NPCs) may have collision logic, events, etc. and should always be tracked, regardless of their position.&#xD;&#xA;&#xD;&#xA;If you're worried about performance, then I say, don't; just code it, and if problems arise, you have working code to profile and optimize.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22431" PostHistoryTypeId="5" PostId="10629" RevisionGUID="24f9fadf-b4de-499e-a047-5d5915ad50c1" CreationDate="2011-04-04T17:47:39.473" UserId="5929" Comment="added 489 characters in body" Text="I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be a black bar inbetween the two images and so it seems that the image is not being moved into place quick enough. What would be the algorithm to do such a thing to give the illusion of a continuous background? &#xD;&#xA;I've got this at the moment (which loops, but with a black bar in between the background image)&#xD;&#xA;&#xD;&#xA;     GeneralTransform gt = bg1Canvas.TransformToVisual(Application.Current.RootVisual as UIElement);&#xD;&#xA;            Point bg1Offset = gt.Transform(new Point(0, 0));&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;     GeneralTransform gt2 = bg2Canvas.TransformToVisual(Application.Current.RootVisual as UIElement);&#xD;&#xA;            Point bg2Offset = gt2.Transform(new Point(0, 0));&#xD;&#xA;            &#xD;&#xA;           &#xD;&#xA;     bg1.TranslateX -=  playerVel.X; //bg1 and bg2 are the composite transforms for the canvas&#xD;&#xA;     bg2.TranslateX -=  playerVel.X;&#xD;&#xA;&#xD;&#xA;     if (bg1Offset.X &lt; -bg_width)&#xD;&#xA;         bg1.TranslateX -= bg1Offset.X - bg_width;&#xD;&#xA;     if (bg2Offset.X &lt; -bg_width)&#xD;&#xA;         bg2.TranslateX -= bg2Offset.X - bg_width;&#xD;&#xA;&#xD;&#xA;Any ideas?&#xD;&#xA;&#xD;&#xA;Edit - Updated code&#xD;&#xA;Edit 2: New code with three images (all same width). Works for the first few scrolls, then suddenly stops working and no background is displayed.&#xD;&#xA;&#xD;&#xA;    if (bg1Offset.X &lt; -bg_width )&#xD;&#xA;                    bg1.TranslateX = bg3Offset.X+bg_width;&#xD;&#xA;                    &#xD;&#xA;                if (bg2Offset.X &lt; -bg_width )&#xD;&#xA;                    bg2.TranslateX = bg1Offset.X + bg_width;&#xD;&#xA;    &#xD;&#xA;                if (bg3Offset.X &lt; -bg_width)&#xD;&#xA;                    bg3.TranslateX = bg2Offset.X + bg_width;" />
  <row Id="22432" PostHistoryTypeId="2" PostId="10634" RevisionGUID="6040bb82-3223-4b05-860e-12cbdf05f1f5" CreationDate="2011-04-04T17:51:25.383" UserId="1929" Text="I've been coding 2D games exclusively for a while, partly because I have very limited graphics skills, partly because it takes less effort to make something look great, and partly because I have very limited time in which to code. &#xD;&#xA;&#xD;&#xA;I have an idea for a very simple 3d kids game that I'd like to build; it would be based around a player roaming a randomly-generated city and looking for a particular building (eg. dollar store, grocery store, bank, etc.)&#xD;&#xA;&#xD;&#xA;My question is: **Would it be feasible to build this in Unity, using only free models and animation (presumably from Turbo Squid), in a decent time-frame?**&#xD;&#xA;&#xD;&#xA;In terms of features, this would range in extremes from &quot;generate some random buildings, paths, and select one as the winning building to locate&quot; to adding people to talk to, objects to interact with (water, ladders, keys and locks, ropes, etc.)&#xD;&#xA;&#xD;&#xA;I haven't touched 3D modelling for years (I used 3D Studio Max 3.x back in high school), and I don't have 3-4 hours to spend creating, rigging, and animating models. That's really the crux of my doubt. I also don't have cash that I can spend on models/animation." />
  <row Id="22433" PostHistoryTypeId="1" PostId="10634" RevisionGUID="6040bb82-3223-4b05-860e-12cbdf05f1f5" CreationDate="2011-04-04T17:51:25.383" UserId="1929" Text="Simple Game Feasibility: Unity + Turbo Squid + $0 = ?" />
  <row Id="22434" PostHistoryTypeId="3" PostId="10634" RevisionGUID="6040bb82-3223-4b05-860e-12cbdf05f1f5" CreationDate="2011-04-04T17:51:25.383" UserId="1929" Text="&lt;feasibility&gt;" />
  <row Id="22435" PostHistoryTypeId="5" PostId="10634" RevisionGUID="86656e97-aec4-4be8-92fb-c76643e8fc40" CreationDate="2011-04-04T17:59:34.570" UserId="1929" Comment="added 204 characters in body" Text="I've been coding 2D games exclusively for a while, partly because I have very limited graphics skills, partly because it takes less effort to make something look great, and partly because I have very limited time in which to code. &#xD;&#xA;&#xD;&#xA;I have an idea for a very simple 3d kids game that I'd like to build; it would be based around a player roaming a randomly-generated city and looking for a particular building (eg. dollar store, grocery store, bank, etc.)&#xD;&#xA;&#xD;&#xA;My question is: **Would it be feasible to build this in Unity, using only free models and animation (presumably from Turbo Squid), in a decent time-frame?**&#xD;&#xA;&#xD;&#xA;In terms of features, this would range in extremes from &quot;generate some random buildings, paths, and select one as the winning building to locate&quot; to adding people to talk to, objects to interact with (water, ladders, keys and locks, ropes, etc.)&#xD;&#xA;&#xD;&#xA;I haven't touched 3D modelling for years (I used 3D Studio Max 3.x back in high school), and I don't have 3-4 hours to spend creating, rigging, and animating models. That's really the crux of my doubt. I also don't have cash that I can spend on models/animation.&#xD;&#xA;&#xD;&#xA;So to summarize, my main two questions are:&#xD;&#xA;&#xD;&#xA; 1. Is it feasible to create a decent-quality game using free stuff from Turbo Squid?&#xD;&#xA; 2. Are many/most/all of the models from TS compatible with Unity?" />
  <row Id="22436" PostHistoryTypeId="25" PostId="10632" RevisionGUID="21be03a0-b8f8-416e-9f1f-11940272ee41" CreationDate="2011-04-04T18:09:00.587" Comment="http://twitter.com/#!/StackGameDev/status/54968727367712768" />
  <row Id="22437" PostHistoryTypeId="2" PostId="10635" RevisionGUID="87c43938-e2a2-4d93-9407-99c98c79ab0f" CreationDate="2011-04-04T18:10:57.633" UserId="51" Text="As the adage goes, you get what you pay for.&#xD;&#xA;&#xD;&#xA;Sure, you can find free assets to probably technically fill most of your needs (and with the embedded &lt;a href=&quot;http://unity3d.com/unity/editor/asset-store.html&quot;&gt;Unity Asset Store&lt;/a&gt; it's even easier, but without the breadth of content that TurboSquid provides).  &#xD;&#xA;&#xD;&#xA;But you're not going to have a consistent look.  Quality is going to be all over the place.  And you might not find a particular kind of building you're looking for.  And depending on what kind of assets you find it might be pretty hard to get a set of things that fit together in some kind of city generation scheme.  You'd be much better off just having a single static level you throw together manually." />
  <row Id="22438" PostHistoryTypeId="5" PostId="10444" RevisionGUID="0bd3675f-dd93-4463-932e-185a6194fa98" CreationDate="2011-04-04T18:25:26.073" UserId="5459" Comment="corrected vertex shader code" Text="I want to resize my texture. I am using cubemap to compute reflection. I want to use this cubemap to draw skybox. Skybox is drawn but I want to resize texture down, because it is dilated. As I wrote in my previous question ([question][1]), to draw skybox I use shaders:&#xD;&#xA;&#xD;&#xA;    //vertex shader        &#xD;&#xA;    uniform mat4 modelViewMatrix;&#xD;&#xA;          uniform mat4 projectionMatrix;&#xD;&#xA;                                                          &#xD;&#xA;            attribute vec4 position;&#xD;&#xA;            varying mediump vec4 texCoord;&#xD;&#xA;            void main() {&#xD;&#xA;                texCoord = position;&#xD;&#xA;                gl_Position = projectionMatrix * modelViewMatrix * position;&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    //fragment shader&#xD;&#xA;    uniform samplerCube Sampler;&#xD;&#xA;         &#xD;&#xA;        varying mediump vec4 texCoord;&#xD;&#xA;                                                        &#xD;&#xA;         void main() {&#xD;&#xA;             mediump vec3 cube = vec3(textureCube(Sampler, texCoord.xyz));&#xD;&#xA;             gl_FragColor = vec4(cube, 1.0);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;I send this data:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    float vertices[24] = {	&#xD;&#xA;    	-1.0, -1.0,  1.0,&#xD;&#xA;        1.0, -1.0,  1.0,&#xD;&#xA;        -1.0,  1.0,  1.0,&#xD;&#xA;        1.0,  1.0,  1.0,&#xD;&#xA;        -1.0, -1.0, -1.0,&#xD;&#xA;        1.0, -1.0, -1.0,&#xD;&#xA;        -1.0,  1.0, -1.0,&#xD;&#xA;        1.0,  1.0, -1.0,&#xD;&#xA;    	};&#xD;&#xA;In this order to draw cube:&#xD;&#xA;&#xD;&#xA;    GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};&#xD;&#xA;&#xD;&#xA;I think, that main problem is in the vertex shader, where I use vertex data as texture coord. But I have no idea how to map vertexes to cube map texture coordinates. Can you help me?&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;Edit: &#xD;&#xA;It is strange, but when I multiply modelviewMatrix with projectionMatrix it does not work.&#xD;&#xA;Now my code is:&#xD;&#xA;&#xD;&#xA;        uniform mat4 modelViewMatrix;&#xD;&#xA;      uniform mat4 projectionMatrix;&#xD;&#xA;      uniform mat3 normalMatrix;&#xD;&#xA;                                                      &#xD;&#xA;        attribute vec4 position;&#xD;&#xA;        varying mediump vec3 texCoord;&#xD;&#xA;        void main() {&#xD;&#xA;            &#xD;&#xA;            gl_Position = projectionMatrix * modelViewMatrix * position;&#xD;&#xA;            texCoord = normalMatrix * (gl_Position.xyz);&#xD;&#xA;        }&#xD;&#xA;I have attached the screenshot, it looks quite good. Maybe it is distorted, because of the aspect ratio:&#xD;&#xA;![screen][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10217/how-do-i-create-a-sky-box-with-opengl-es-2-0&#xD;&#xA;&#xD;&#xA;  [2]: http://i.stack.imgur.com/WcUvB.jpg&#xD;&#xA;" />
  <row Id="22439" PostHistoryTypeId="5" PostId="10631" RevisionGUID="737006bd-07a2-4dce-a793-29ae578aeaf5" CreationDate="2011-04-04T18:39:06.063" UserId="1198" Comment="added 92 characters in body" Text="I think you need to draw the image three times: Imagine your background is `\/`  &#xD;&#xA;&#xD;&#xA;    1.      [ /\ ] \/ \/&#xD;&#xA;    2.    \ [ /\ ] / \/&#xD;&#xA;    3.    \/[ \/ ] \/ &#xD;&#xA;    4. \/ \ [ /\ ] /    &#xD;&#xA;    5.      [ /\ ] \/ \/&#xD;&#xA;&#xD;&#xA;(assuming Right ==&gt; Left scrolling)&#xD;&#xA;&#xD;&#xA;If you're seeing a black bar (I presuem you are clearing to `Color.Black`) you probably have an error in your positioning code." />
  <row Id="22440" PostHistoryTypeId="2" PostId="10636" RevisionGUID="cd3a4c5c-2e5d-4f9b-b55c-3c2881f1eaec" CreationDate="2011-04-04T18:57:19.080" UserId="4410" Text="You're going to want to double/triple buffer any data necessary for rendering that gets altered in the update pass. That way you won't be rendering with something that's been partially changed. The reason you'll probably need to triple buffer is needing 1) the copy you're updating, 2) the last copy you updated fully, and 3) the copy that is currently being used for rendering that you don't want to change.&#xD;&#xA;&#xD;&#xA;The hardest part is probably working out the best way to organise your data for this." />
  <row Id="22441" PostHistoryTypeId="2" PostId="10637" RevisionGUID="7f3e94d5-18e2-4025-bd68-283293a18167" CreationDate="2011-04-04T19:02:06.290" UserId="6511" Text="here two of the main ones:&#xD;&#xA;&#xD;&#xA;http://www.crowdspring.com&#xD;&#xA;&#xD;&#xA;http://www.99designs.com" />
  <row Id="22442" PostHistoryTypeId="2" PostId="10638" RevisionGUID="43f1e3c5-10cb-4ec1-8960-7183e3d8be2b" CreationDate="2011-04-04T19:06:09.543" UserId="1929" Text="As a hobby programmer, **how can I incorporate a continuous-improvement-like process like Agile's retrospectives in my processes?**&#xD;&#xA;&#xD;&#xA;I've tried bullet items of three good/bad things at the end of each project, but I feel it's not enough. And I feel that a sprint retrospective is overkill. Where's the balance? How can and should I open the door for continuous process improvement?&#xD;&#xA;&#xD;&#xA;Or maybe this question should go on the beta [Project Management Stack Exchange site][1]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pm.stackexchange.com/" />
  <row Id="22443" PostHistoryTypeId="1" PostId="10638" RevisionGUID="43f1e3c5-10cb-4ec1-8960-7183e3d8be2b" CreationDate="2011-04-04T19:06:09.543" UserId="1929" Text="Improving Processes in One-Man GameDev Shops" />
  <row Id="22444" PostHistoryTypeId="3" PostId="10638" RevisionGUID="43f1e3c5-10cb-4ec1-8960-7183e3d8be2b" CreationDate="2011-04-04T19:06:09.543" UserId="1929" Text="&lt;process&gt;" />
  <row Id="22445" PostHistoryTypeId="2" PostId="10639" RevisionGUID="6977102b-d246-4f74-abbf-3ede3c8de073" CreationDate="2011-04-04T19:26:37.913" UserId="1929" Text="Consider procedurally generating enemies. I know it's quite different from the answer you want, and it indirectly solves the problem completely. &#xD;&#xA;&#xD;&#xA;If I were to do this, I would assign each enemy unit a &quot;points&quot; value of how difficult it is, then assign levels some number of points -- 100 points are worth a hundred 1 point enemies, or one 100-point enemy, or anything in-between.&#xD;&#xA;&#xD;&#xA;You would probably need to constrain this a bit so that you don't get a 100-point boss on the first level, or that you have some minimum number of enemies, and you probably want to periodically poll the list of enemies left and pull the next one on-screen.&#xD;&#xA;&#xD;&#xA;You could take it a step further by having formations: collections of positions and points, eg. seven one-point enemies in a single line (row or column), or a five-point flanked by two 3-points." />
  <row Id="22446" PostHistoryTypeId="5" PostId="10633" RevisionGUID="1f2a6c1e-55e7-4960-bf6f-e75d0b948c98" CreationDate="2011-04-04T20:20:09.493" UserId="1929" Comment="added 27 characters in body; added 354 characters in body" Text="I'm not sure where the problem is that you're asking about. If you need the data, you have to load it. I would personally keep NPCs in a separate list, and track them separately from all the actual tile data. That's how I make these kinds of games.&#xD;&#xA;&#xD;&#xA;Because you only need to draw the tiles on-screen; but entities (NPCs) may have collision logic, events, etc. and should always be tracked, regardless of their position.&#xD;&#xA;&#xD;&#xA;If you're worried about performance, then I say, don't; just code it, and if problems arise, you have working code to profile and optimize.&#xD;&#xA;&#xD;&#xA;**Edit:** The way that I would code it would be to have a 2D array of tiles; each tile has the XY coordinates of the image that it displays, a &quot;walkable&quot; attribute, etc. NPCs/entities would be kept in a separate list, and they would either hold a tile XY coordinates for the tile they're stepping on, or hold a reference to a Tile object with an X and Y." />
  <row Id="22447" PostHistoryTypeId="2" PostId="10640" RevisionGUID="b3d09c67-f475-4b12-87e9-5180cd19cff4" CreationDate="2011-04-04T20:39:05.707" UserId="138" Text="As this is a personal project, you have to be very careful not to get bogged down in process. While continuous improvement is very desirable, consider choosing elements from Lean and Agile that are philosophically in-line with the simplicity of a one-man-show.&#xD;&#xA;&#xD;&#xA;In Scrum and many other systems, sprint retrospectives are beneficial, as they provide time for a team to identify improvements. In Lean, there's frequently a focus on solving a problem as it arises, and I think this is where you could greatly benefit.&#xD;&#xA;&#xD;&#xA;When you identify a nasty bit of code or an issue, flag it and take a moment to do the following:&#xD;&#xA;&#xD;&#xA; 1. Look at where the problem resides&#xD;&#xA; 2. Look at the interacting elements and systems&#xD;&#xA; 3. Find a quick solution (something that works, what we typically do and stop at)&#xD;&#xA; 4. Identify the root cause (ask the [5 why's][1])&#xD;&#xA; 5. Generate a more fulfilling (possibly even standardized) solution or plan for a solution (possibly something to be implemented after this project or sprint)&#xD;&#xA;&#xD;&#xA;So, this is taken from the five golden rules of Gemba management and fiddled with to match your scenario. To some degree, it's still not super applicable. Your mileage will vary and you'll have to adapt; but, there's good news: that's all part of Lean!&#xD;&#xA;&#xD;&#xA;You need to adapt whatever processes you can find to be &quot;right fit.&quot; This is going to be something you'll have to continually improve upon, in and of itself.&#xD;&#xA;&#xD;&#xA;I hope that makes sense. I can provide more specific references and comments if you'd like.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/5_Whys" />
  <row Id="22448" PostHistoryTypeId="25" PostId="10638" RevisionGUID="519e5dcf-57b0-40c1-8fb6-f227ebdabbfb" CreationDate="2011-04-04T21:09:00.563" Comment="http://twitter.com/#!/StackGameDev/status/55014026429739008" />
  <row Id="22450" PostHistoryTypeId="6" PostId="31" RevisionGUID="512d2c4b-ab38-4b54-abb5-3c72ea8f4ed8" CreationDate="2011-04-04T21:52:05.817" UserId="450" Comment="edited tags" Text="&lt;fsm&gt;&lt;npc&gt;" />
  <row Id="22451" PostHistoryTypeId="6" PostId="3463" RevisionGUID="ed5ec79f-6117-4a68-beb8-fa190a4de53d" CreationDate="2011-04-04T21:56:37.187" UserId="450" Comment="edited tags" Text="&lt;education&gt;" />
  <row Id="22452" PostHistoryTypeId="6" PostId="300" RevisionGUID="1ab3cfe3-d6d4-4b14-b4c7-323f9c744a97" CreationDate="2011-04-04T21:57:34.453" UserId="450" Comment="edited tags" Text="&lt;education&gt;" />
  <row Id="22453" PostHistoryTypeId="2" PostId="10642" RevisionGUID="a2cad470-201e-4917-8939-3657417772c1" CreationDate="2011-04-04T21:59:05.547" UserId="-1" Text="" />
  <row Id="22454" PostHistoryTypeId="2" PostId="10643" RevisionGUID="0a429b37-86ff-47bf-9ccc-7adfaee30b4f" CreationDate="2011-04-04T21:59:05.547" UserId="-1" Text="" />
  <row Id="22455" PostHistoryTypeId="5" PostId="10137" RevisionGUID="fbd4fe56-baf5-47c1-a849-c83c2007b1c6" CreationDate="2011-04-04T22:23:17.850" UserId="382" Comment="copied body from User Experience" Text="The iPhone smartphone designed by Apple Inc. The first iPhone was introduced on January 9, 2007. The iPhone runs on the iOS platform and can download and install applications from the iTunes app store." />
  <row Id="22456" PostHistoryTypeId="24" PostId="10137" RevisionGUID="fbd4fe56-baf5-47c1-a849-c83c2007b1c6" CreationDate="2011-04-04T22:23:17.850" Comment="Proposed by 382 approved by 51 edit id of 236" />
  <row Id="22457" PostHistoryTypeId="5" PostId="10136" RevisionGUID="5b6c248f-9373-4900-be57-dbe9436079ce" CreationDate="2011-04-04T22:23:20.237" UserId="382" Comment="copied body from User Experience" Text="An iPhone has several built in functions; video camera, text messaging and visual voicemail, MP3 player, media player, e-mail client, web browsing, and both Wi-Fi and 3G connectivity. The user interface is built around the device's multi-touch screen utilizing a virtual keyboard." />
  <row Id="22458" PostHistoryTypeId="24" PostId="10136" RevisionGUID="5b6c248f-9373-4900-be57-dbe9436079ce" CreationDate="2011-04-04T22:23:20.237" Comment="Proposed by 382 approved by 51 edit id of 235" />
  <row Id="22459" PostHistoryTypeId="2" PostId="10644" RevisionGUID="feacbc82-1e1a-4c8e-bf31-cde1a76e9abf" CreationDate="2011-04-04T22:34:53.950" UserId="619" Text="I've done the [Global Game Jam][1] every year for the past three years. Developing a game from scratch in 48 hours with people you didn't necessarily know beforehand is a brilliant experience.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://globalgamejam.org/" />
  <row Id="22461" PostHistoryTypeId="2" PostId="10645" RevisionGUID="e5ef68a7-b3f1-4fb4-a035-4d85ab8cfcbb" CreationDate="2011-04-04T23:43:33.953" UserId="6514" Text="If you have a pretty deep set of dialog trees, use [ChatMapper][1].  They have a fully featured free version and the tool allows you to export your dialog trees into XML.  I've been using it and it's an excellent way to visualize and organize complex dialog trees.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chat-mapper.com/" />
  <row Id="22463" PostHistoryTypeId="25" PostId="10628" RevisionGUID="09d459d6-6610-440d-80c4-8e761971f078" CreationDate="2011-04-05T00:09:00.370" Comment="http://twitter.com/#!/StackGameDev/status/55059324573200384" />
  <row Id="22464" PostHistoryTypeId="2" PostId="10647" RevisionGUID="62230463-414a-4db7-bf41-fe85da5f90f0" CreationDate="2011-04-05T00:38:28.183" UserId="6302" Text="If I use mouse coordinates to select a sprite does XNA provide a built in way to return the top-most sprite on the screen at a coordinate?&#xD;&#xA;&#xD;&#xA;I am trying to highlight the selected sprite, but when iterating through my sprites at the specific mouse location there can be multiple sprites found.  The way my game works any one of the sprites found is valid to be on top." />
  <row Id="22465" PostHistoryTypeId="1" PostId="10647" RevisionGUID="62230463-414a-4db7-bf41-fe85da5f90f0" CreationDate="2011-04-05T00:38:28.183" UserId="6302" Text="XNA Sprite mouse selection with layered/overlapping sprites" />
  <row Id="22466" PostHistoryTypeId="3" PostId="10647" RevisionGUID="62230463-414a-4db7-bf41-fe85da5f90f0" CreationDate="2011-04-05T00:38:28.183" UserId="6302" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="22467" PostHistoryTypeId="5" PostId="10643" RevisionGUID="58950517-2975-418b-baea-2530d3aeedd2" CreationDate="2011-04-05T01:52:20.557" UserId="450" Comment="added 79 characters in body" Text="&quot;Untagged&quot; is not a real tag, it just means that this question is missing tags." />
  <row Id="22468" PostHistoryTypeId="24" PostId="10643" RevisionGUID="58950517-2975-418b-baea-2530d3aeedd2" CreationDate="2011-04-05T01:52:20.557" Comment="Proposed by 450 approved by 51 edit id of 237" />
  <row Id="22470" PostHistoryTypeId="2" PostId="10648" RevisionGUID="0349c1bd-6d3b-492f-b04d-f82c49905cb7" CreationDate="2011-04-05T02:28:14.857" UserId="3547" Text="I don't believe XNA has a built in way to do this. You should definitely implement some kind of ordering or layering system so one sprite gains precedence over the others (unless your game needs multiple sprites to be selected at once from the same mouse click). Once a sprite processes the selection no other sprites should be given the chance to." />
  <row Id="22471" PostHistoryTypeId="2" PostId="10649" RevisionGUID="4b6b2c3b-41dc-4db3-a55d-d70822c542be" CreationDate="2011-04-05T02:34:54.383" UserId="5904" Text="It sounds like you need to assign a &quot;depth&quot; or &quot;Z&quot; value to your sprites that defines which is &quot;on top&quot; of each other. Then you would iterate through the sprites as usual but the sprite returned would have the highest &quot;Z&quot; value." />
  <row Id="22472" PostHistoryTypeId="25" PostId="10647" RevisionGUID="8fbaa9f4-f92f-4376-861c-e3acb75d6170" CreationDate="2011-04-05T03:09:00.533" Comment="http://twitter.com/#!/StackGameDev/status/55104622716653569" />
  <row Id="22474" PostHistoryTypeId="2" PostId="10651" RevisionGUID="8a335be7-5bbf-4cbb-b9d0-f2f288f25a45" CreationDate="2011-04-05T03:26:21.297" UserId="6178" Text="I don't know if I'm doing something wrong or missing anything but I want to simulate sun light, like in a sunny day.&#xD;&#xA;&#xD;&#xA;When the object is facing the directional light, it's well lit and there's no problems there. If I go around the object and look at it's back, it's dark. It's not too much dark because I'm using `GL_AMBIENT` but it's still too dark for a sunny day. If I increase the value, it will never look better because the side of the object facing the light will be too bright.&#xD;&#xA;&#xD;&#xA;And there's another annoying issue with the ambient light, when looking at the back of the object, I can't see any shape, only a plain color. Hard to explain, here's some pictures:&#xD;&#xA;&#xD;&#xA;Object Front: http://i.stack.imgur.com/YW53X.png  &#xD;&#xA;Object Back: http://i.stack.imgur.com/Qufha.png&#xD;&#xA;&#xD;&#xA;As you can easily see, the front side looks nice, you can see the shape of that red thing. On the back side, it's plain, you can't see the same shape.&#xD;&#xA;&#xD;&#xA;Now, I know that I'm looking at the back of an object and I'm looking in the direction of the light and it should be darker than the front side. But it shouldn't look so plain like this. That's not what we see when going against the sun light looking at some object, we see that the objects form some shape.&#xD;&#xA;&#xD;&#xA;How can I have the same (or similar) effect on OpenGL?&#xD;&#xA;&#xD;&#xA;My light is currently defined like this:&#xD;&#xA;&#xD;&#xA;    float posLight0[4] = {-1.0f, 1.0f, 1.0f, 0.0f};&#xD;&#xA;    float ambLight0[4] = {0.5f, 0.5f, 0.5f, 0.5f};&#xD;&#xA;    &#xD;&#xA;    glLightfv(GL_LIGHT0, GL_POSITION, posLight0);&#xD;&#xA;    glLightfv(GL_LIGHT0, GL_AMBIENT, ambLight0);" />
  <row Id="22475" PostHistoryTypeId="1" PostId="10651" RevisionGUID="8a335be7-5bbf-4cbb-b9d0-f2f288f25a45" CreationDate="2011-04-05T03:26:21.297" UserId="6178" Text="Trying to understand light on Opengl, how to simulate a realistic sun light?" />
  <row Id="22476" PostHistoryTypeId="3" PostId="10651" RevisionGUID="8a335be7-5bbf-4cbb-b9d0-f2f288f25a45" CreationDate="2011-04-05T03:26:21.297" UserId="6178" Text="&lt;opengl&gt;&lt;lighting&gt;" />
  <row Id="22478" PostHistoryTypeId="2" PostId="10652" RevisionGUID="ddb1ce31-d9fd-404d-b595-5e610d0df3a3" CreationDate="2011-04-05T05:07:16.813" UserId="2158" Text="With the ambient light your objects appear too bright because the diffuse light is added to the ambient light, and the diffuse light defaults to 1.0. This adds up to 1.5, and everything above 1.0 is clamped. Set the diffuse light to 0.5:&#xD;&#xA;&#xD;&#xA;    float difLight0[4] = {0.5f, 0.5f, 0.5f, 1.0f};&#xD;&#xA;    glLightfv(GL_LIGHT0, GL_DIFFUSE, difLight0);&#xD;&#xA;&#xD;&#xA;The second problem is harder to solve. You can try adding some fine details to the surface such as texture or bump map. In OpenGL the ambient light is constant, but in real world that is never the case. To simulate the real world, some form of [global illumination][1] solution is needed. [Ambient occlusion][2] helps a lot here, but is harder to implement than just setting OpenGL states. You could bake the ambient occlusion to the vertices of your model in your 3D modeling software or use [SSAO][3], but I'm not going to the details.&#xD;&#xA;&#xD;&#xA;What you can easily do is add another dimmer light source from some other direction (e.g. opposite direction). This will not be realistic, but at least it will give some shape for the back sides of your objects as well.&#xD;&#xA;&#xD;&#xA;Also consider adding specular highlights to your application. It will make objects shiny.&#xD;&#xA;&#xD;&#xA;    float specLight0[4] = {0.5f, 0.5f, 0.5f, 1.0f};&#xD;&#xA;    glLightfv(GL_LIGHT0, GL_SPECULAR, specLight0);&#xD;&#xA;    glMaterialfv(GL_FRONT, GL_SHININESS, 10.0f); // Shininess between 0 and 128&#xD;&#xA;&#xD;&#xA;You can also specify light and material colors separately, especially if the defaults are not suitable for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Global_illumination&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Ambient_occlusion&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion" />
  <row Id="22479" PostHistoryTypeId="2" PostId="10653" RevisionGUID="a3131ad9-049c-477f-bb51-084fd0096820" CreationDate="2011-04-05T05:16:04.747" UserId="6519" Text="1st Question is I want to write a board game for iOS and Android so I'm coming up with CoronaSDK and [AirPlay][1]. Since I have a mac, development platform is not an issue but the problem is which one should I choose. I'm fluent with PHP and web languages and familiar with C but it's a new language for Lua. I know a lot of people prefer Corona but why not Airplay? It even provides more devices and able to write in C/C++.&#xD;&#xA;&#xD;&#xA;2nd Question is I want a SDK with shortest development time and easier coding. I don't need complex 3D or animation engine since the game is a board game like chess or monopoly. What would you recommend?&#xD;&#xA;&#xD;&#xA;3rd Question is what kind of technique do you use to support multiplayer gameplay over Internet if it's for my game? Is it socket? If it's socket, which SDK can provide solid socket library?&#xD;&#xA;&#xD;&#xA;Really appreciate anyone trying to answer my questions here :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.airplaysdk.com" />
  <row Id="22480" PostHistoryTypeId="1" PostId="10653" RevisionGUID="a3131ad9-049c-477f-bb51-084fd0096820" CreationDate="2011-04-05T05:16:04.747" UserId="6519" Text="What shall I choose between CoronaSDK or AirPlay?" />
  <row Id="22481" PostHistoryTypeId="3" PostId="10653" RevisionGUID="a3131ad9-049c-477f-bb51-084fd0096820" CreationDate="2011-04-05T05:16:04.747" UserId="6519" Text="&lt;c++&gt;&lt;c&gt;&lt;lua&gt;&lt;turn-based&gt;" />
  <row Id="22483" PostHistoryTypeId="25" PostId="10651" RevisionGUID="31025933-cd20-4649-b869-a2f16f322a41" CreationDate="2011-04-05T06:09:00.543" Comment="http://twitter.com/#!/StackGameDev/status/55149921694785538" />
  <row Id="22484" PostHistoryTypeId="2" PostId="10654" RevisionGUID="511f22f8-41bd-43fa-9e06-4cfb21316447" CreationDate="2011-04-05T07:15:18.573" UserId="302" Text="Without any experience in using either Corona or Airplay, on the surface level I'd say Corona might be easier because it uses a high-level language, Lua, but then if you're already familiar with C, but have never used Lua, maybe that advantage is lost. The advantage of Airplay on the other hand is that it supports a lot of platforms. If you only need iOS and Android though, maybe that doesn't really matter either.&#xD;&#xA;&#xD;&#xA;I think if you feel like C++ would be easier for you, there's not much reason to go with Corona. Both even have similar pricing models, but Corona costs more unless you're making over $100,000 a year, but if you do, you probably don't care either way." />
  <row Id="22485" PostHistoryTypeId="2" PostId="10655" RevisionGUID="cfc8b252-8be3-4764-8e69-0a4de0b6335d" CreationDate="2011-04-05T07:37:40.217" UserId="3794" Text="The answer you have got here is pretty good. Just one addition. Once you will want to have it nicer, try implement [atmospheric scattering][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html" />
  <row Id="22486" PostHistoryTypeId="2" PostId="10656" RevisionGUID="478b3ec4-f844-440d-ac3f-a1798790d02d" CreationDate="2011-04-05T08:00:51.277" UserId="6521" Text="Short Answer:&#xD;&#xA;Yes, you need to average the tangent space vectors for each vertex just like you do with normals to achieve smooth shading. For example if a vertex is shared by 3 triangles then the final tangent frame is the average of the 3 face tangent frames.&#xD;&#xA;&#xD;&#xA;Long Answer:&#xD;&#xA;These days it is generally considered best practice to use index buffers and not worry about triangle strips. The reason for this is twofold. Firstly if your geometry is optimized for vertex caching an index buffer prevents *most* duplicate vertex scenarios and will be just as fast as triangle strips. Secondly making tons of pipeline changes and draw calls can dramatically affect performance. A mesh converted into triangle strips will probably result in the need for multiple draw calls as it's unlikely your entire mesh can be converted into one triangle strip and depending on the architecture of your engine may even require multiple vertex buffers.&#xD;&#xA;&#xD;&#xA;Personally I prefer to precompute tangent frames and store them with the mesh data instead of calculating them in shaders. The reason for this is that 3d modelling packages such as Maya and 3DS MAX have very accurate and elaborate methods of generating the correct normals, uv's, tangents, and bitangents and it's much easier to just import them. If you develop your own method and it differs significantly from these art packages your artists are going to start asking you why the lighting on their models looks all messed up in-game because it was the way they wanted it in Maya." />
  <row Id="22487" PostHistoryTypeId="2" PostId="10657" RevisionGUID="9230b361-bc5b-4f5b-875a-57c40af1b521" CreationDate="2011-04-05T08:19:39.780" UserId="6521" Text="You are correct UV's typically go from 0-1 though as David X mentioned this isn't a requirement. In your case the issue is the frequency of the SketchUp generated UV coordinates. For example if your Y axis (V coordinate) goes from 0 to 46 then that texture, if wrapping is enabled, will repeat 46 times in the V direction. Wrapping also makes it look smaller because you have to duplicate the image many times across the same surface area. Re-exporting as FBX or Collada doesn't do anything to resolve the issue because it's the same UV's either way. To fix this you need to go back to SketchUp and change how it's generating UV's for the cylinder. Perhaps you can specify the UV range yourself or maybe you have to change how the geometry is parameterized. I've never used SketchUp so I don't know exactly how it handles those sorts of things." />
  <row Id="22488" PostHistoryTypeId="5" PostId="10657" RevisionGUID="080a46e4-46e6-4d67-864c-16e032c694da" CreationDate="2011-04-05T08:49:10.330" UserId="6521" Comment="Minor clarification on looking at vertex winding in a 3d modelling package." Text="You are correct UV's typically go from 0-1 though as David X mentioned this isn't a requirement. In your case the issue is the frequency of the SketchUp generated UV coordinates. For example if your Y axis (V coordinate) goes from 0 to 46 then that texture, if wrapping is enabled, will repeat 46 times in the V direction. Wrapping also makes it look smaller because you have to duplicate the image many times across the same surface area. Re-exporting as FBX or Collada doesn't do anything to resolve the issue because it's the same UV's either way. To fix this you need to go back to SketchUp and change how it's generating UV's for the cylinder. Perhaps you can specify the UV range yourself or maybe you have to change how the geometry is parameterized. I've never used SketchUp so I don't know exactly how it handles those sorts of things.&#xD;&#xA;&#xD;&#xA;Lastly it looks like the vertex winding of the cylinder may be the opposite of your cubes. Graphics API's like OpenGL and DirectX use triangle vertex winding to determine which direction the triangle is facing. This is how they perform backface culling - not rendering the triangles facing away from the camera as an optimization. In the case of your cylinder it appears that the view is looking into the cylinder because the triangles closest to the camera are facing the wrong direction. Once again this is an issue that would need to be resolved in SketchUp and it can be verified by looking at the direction of the face normal for each triangle (it should be pointing outward, not inward)." />
  <row Id="22489" PostHistoryTypeId="25" PostId="10653" RevisionGUID="cad93f3e-d090-4e63-b60b-d26dd183271d" CreationDate="2011-04-05T09:09:00.553" Comment="http://twitter.com/#!/StackGameDev/status/55195220744220672" />
  <row Id="22491" PostHistoryTypeId="2" PostId="10658" RevisionGUID="1cac5580-7cb7-48d6-b262-f48c92c5c2ce" CreationDate="2011-04-05T11:02:47.877" UserId="6187" Text="I am planing to create a 2D RTS game on iPhone using cocos2d, besides the tile map, any other suggestion for storing the map details for the game?&#xD;&#xA;&#xD;&#xA;Would be nice if a GUI editor is also provided.&#xD;&#xA; " />
  <row Id="22492" PostHistoryTypeId="1" PostId="10658" RevisionGUID="1cac5580-7cb7-48d6-b262-f48c92c5c2ce" CreationDate="2011-04-05T11:02:47.877" UserId="6187" Text="Map file format for Real-time strategy game" />
  <row Id="22493" PostHistoryTypeId="3" PostId="10658" RevisionGUID="1cac5580-7cb7-48d6-b262-f48c92c5c2ce" CreationDate="2011-04-05T11:02:47.877" UserId="6187" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;ios&gt;&lt;rts&gt;&lt;map-editor&gt;" />
  <row Id="22494" PostHistoryTypeId="2" PostId="10659" RevisionGUID="329034a0-52f8-4ac9-8ee6-5191d3357cc3" CreationDate="2011-04-05T11:22:08.160" UserId="4129" Text="A good idea is to build a map editor into the game, invoked with a hotkey when the game is paused in debug builds.  It allows you to quickly edit the map during development gameplay and will save you masses of time.&#xD;&#xA;&#xD;&#xA;And it might grow into an extra feature of the game if you polish it enough later for end users." />
  <row Id="22495" PostHistoryTypeId="2" PostId="10660" RevisionGUID="3381a9e4-3a61-4dc9-ad25-402c1c7454ed" CreationDate="2011-04-05T11:27:41.820" UserId="4200" Text="Hullo,&#xD;&#xA;&#xD;&#xA;Is it a really bad idea to have my Game1 class as static? As at the moment in my Game1 class I have a class called `TileHandler` which handles everything to do with my current set of tiles, and `AnimalHandler` which handles all my animals (surprisingly).&#xD;&#xA;&#xD;&#xA;Now if I am in `AnimalHandler` and want to check if a tile is walkable from `TileHandler` then that causes problems or I have to pass a list of walkable tiles into `AnimalHandler`, which I'd rather not do.&#xD;&#xA;&#xD;&#xA;What would be easier would be to make Game1 static and then in AnimalHandler just go `Game1._tileHandler.WalkableTile(position)`.&#xD;&#xA;&#xD;&#xA;Now I can't see anything immediately wrong with this or anything that'd cause any problems but I've only just started using static classes, so does anyone more knowledgeable see any giant reason why that's a bad idea?&#xD;&#xA;&#xD;&#xA;Thanks,  &#xD;&#xA;H-rizzle" />
  <row Id="22496" PostHistoryTypeId="1" PostId="10660" RevisionGUID="3381a9e4-3a61-4dc9-ad25-402c1c7454ed" CreationDate="2011-04-05T11:27:41.820" UserId="4200" Text="Is it a bad idea to have game1.cs static in XNA?" />
  <row Id="22497" PostHistoryTypeId="3" PostId="10660" RevisionGUID="3381a9e4-3a61-4dc9-ad25-402c1c7454ed" CreationDate="2011-04-05T11:27:41.820" UserId="4200" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="22498" PostHistoryTypeId="2" PostId="10661" RevisionGUID="98448686-6129-4f7b-9edc-0a72fe167357" CreationDate="2011-04-05T11:31:41.487" UserId="6525" Text="The Problem is that you draw your text on the screen and then blit the doublebuffer over that.&#xD;&#xA;&#xD;&#xA;Simply change the first argument to textprintf_centre_ex from screen to buffer and it works like a charm." />
  <row Id="22499" PostHistoryTypeId="2" PostId="10662" RevisionGUID="2bc151fc-90e3-4e55-a4ea-a9e9196c1e8c" CreationDate="2011-04-05T11:32:48.573" UserId="6526" Text="I have set up all the config files to my game classes and am able to launch the game to test everything.&#xD;&#xA;&#xD;&#xA;Although when I package the game, it still runs the UT deathmatch game??&#xD;&#xA;&#xD;&#xA;What other lines in the config files should be changed to make it default to my game and default map once published/packaged?&#xD;&#xA;" />
  <row Id="22500" PostHistoryTypeId="1" PostId="10662" RevisionGUID="2bc151fc-90e3-4e55-a4ea-a9e9196c1e8c" CreationDate="2011-04-05T11:32:48.573" UserId="6526" Text="UDK - Packaging/Publishing the Game problem" />
  <row Id="22501" PostHistoryTypeId="3" PostId="10662" RevisionGUID="2bc151fc-90e3-4e55-a4ea-a9e9196c1e8c" CreationDate="2011-04-05T11:32:48.573" UserId="6526" Text="&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="22502" PostHistoryTypeId="4" PostId="10660" RevisionGUID="36be20c7-90da-45b6-9360-41afdb904109" CreationDate="2011-04-05T11:41:32.630" UserId="4200" Comment="edited title" Text="Is it a bad idea to have Game1 static in XNA?" />
  <row Id="22503" PostHistoryTypeId="5" PostId="10660" RevisionGUID="5db1387e-9ee2-44a8-941f-380488980d8f" CreationDate="2011-04-05T12:08:32.983" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;" Text="Is it a really bad idea to have my Game1 class as static? As at the moment in my Game1 class I have a class called `TileHandler` which handles everything to do with my current set of tiles, and `AnimalHandler` which handles all my animals (surprisingly).&#xD;&#xA;&#xD;&#xA;Now if I am in `AnimalHandler` and want to check if a tile is walkable from `TileHandler` then that causes problems or I have to pass a list of walkable tiles into `AnimalHandler`, which I'd rather not do.&#xD;&#xA;&#xD;&#xA;What would be easier would be to make Game1 static and then in AnimalHandler just go `Game1._tileHandler.WalkableTile(position)`.&#xD;&#xA;&#xD;&#xA;Now I can't see anything immediately wrong with this or anything that'd cause any problems but I've only just started using static classes, so does anyone more knowledgeable see any giant reason why that's a bad idea?" />
  <row Id="22504" PostHistoryTypeId="25" PostId="10658" RevisionGUID="6571b803-5731-4ae5-a5d6-0162293a960a" CreationDate="2011-04-05T12:09:00.770" Comment="http://twitter.com/#!/StackGameDev/status/55240518912835584" />
  <row Id="22505" PostHistoryTypeId="2" PostId="10663" RevisionGUID="da54a2fe-9975-4755-957a-59c676e5e626" CreationDate="2011-04-05T12:09:13.247" UserId="4788" Text="I do not think it's a super bad idea for a simple game, &#xD;&#xA;but you could also have a look at &#xD;&#xA;http://www.nuclex.org/articles/4-architecture/6-game-components-and-game-services&#xD;&#xA;for a better idea on how to build intercommunicating game components " />
  <row Id="22506" PostHistoryTypeId="2" PostId="10664" RevisionGUID="567d71f8-58b3-40cd-8049-d81e894be9ca" CreationDate="2011-04-05T12:16:51.730" UserId="6054" Text="I have done tiled maps and tile sets quite often, but in a rather simplified way. My tile sets were linear images of the size `(tile_width * num_tiles) * tile_height`, so I could find an index easily by using `val src_pos = (index * tile_width, 0)`.&#xD;&#xA;&#xD;&#xA;But in reality, I've come to notice, tile sets are actually fully sized images of two dimensions. That has some advantages, clearly, it's easier to draw. So I wanted to support that. The problem would be just to turn the index to the right source position. Failed a bit, so I wanted to ask here.&#xD;&#xA;&#xD;&#xA;I've had two ideas dealing with it:&#xD;&#xA;&#xD;&#xA;Turn the index into two values with&#xD;&#xA;&#xD;&#xA;    src_x = index modulo num_tiles_x&#xD;&#xA;    src_y = index div num_tiles_y&#xD;&#xA;&#xD;&#xA;which lead me to some quite weird results. The tiles are correctly cut, but they're the wrong ones for the position.&#xD;&#xA;&#xD;&#xA;The other idea is to take the image and turn it into a 1D-tile set by cutting it up. But I am afraid that would not be an option, as I am using Textures.&#xD;&#xA;&#xD;&#xA;How is this solved in 'professional' applica" />
  <row Id="22507" PostHistoryTypeId="1" PostId="10664" RevisionGUID="567d71f8-58b3-40cd-8049-d81e894be9ca" CreationDate="2011-04-05T12:16:51.730" UserId="6054" Text="Tilesets with Two Dimensions" />
  <row Id="22508" PostHistoryTypeId="3" PostId="10664" RevisionGUID="567d71f8-58b3-40cd-8049-d81e894be9ca" CreationDate="2011-04-05T12:16:51.730" UserId="6054" Text="&lt;tiles&gt;" />
  <row Id="22509" PostHistoryTypeId="2" PostId="10665" RevisionGUID="e25e1891-20d2-4d17-a71d-01443e39ee35" CreationDate="2011-04-05T12:42:55.923" UserId="1386" Text="The formula you are using to convert from a 1d position to a 2d position is almost correct (and I'm sure the same method is used professionally)&#xD;&#xA;&gt; src_x = index modulo num_tiles_x&#xD;&#xA;&#xD;&#xA;&gt; src_y = index div **num_tiles_x**&#xD;&#xA;&#xD;&#xA;Where num_tiles_x is the number of tiles in a single row." />
  <row Id="22510" PostHistoryTypeId="2" PostId="10666" RevisionGUID="b5d5cf62-65e7-47d0-96c1-69dfdf2da794" CreationDate="2011-04-04T13:31:10.427" UserDisplayName="Jamie" Text="I have set up all the config files to my game classes and am able to launch the game to test everything.&#xD;&#xA;&#xD;&#xA;Although when I package the game, it still runs the UT deathmatch game??&#xD;&#xA;&#xD;&#xA;What other lines in the config files should be changed to make it default to my game and default map once published?" />
  <row Id="22511" PostHistoryTypeId="1" PostId="10666" RevisionGUID="b5d5cf62-65e7-47d0-96c1-69dfdf2da794" CreationDate="2011-04-04T13:31:10.427" UserDisplayName="Jamie" Text="UDK - Packaging the Game" />
  <row Id="22512" PostHistoryTypeId="3" PostId="10666" RevisionGUID="b5d5cf62-65e7-47d0-96c1-69dfdf2da794" CreationDate="2011-04-04T13:31:10.427" UserDisplayName="Jamie" Text="&lt;untagged&gt;" />
  <row Id="22513" PostHistoryTypeId="17" PostId="10666" RevisionGUID="38af0a98-e035-4b68-b1b2-0b9abc3297d8" CreationDate="2011-04-05T13:21:16.880" UserId="-1" Comment="from http://stackoverflow.com/questions/5539225/udk-packaging-the-game" Text="" />
  <row Id="22514" PostHistoryTypeId="6" PostId="10666" RevisionGUID="d746c724-bede-4337-927b-12f0d18c13eb" CreationDate="2011-04-05T13:25:31.360" UserId="51" Comment="edited tags" Text="&lt;udk&gt;&lt;distribution&gt;" />
  <row Id="22515" PostHistoryTypeId="18" PostId="10666" RevisionGUID="a1c540c6-df2e-4def-aff1-583d68f16bf2" CreationDate="2011-04-05T13:26:57.133" UserId="51" Comment="to http://gamedev.stackexchange.com/questions/10662/udk-packaging-publishing-the-game-problem" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="22516" PostHistoryTypeId="18" PostId="10662" RevisionGUID="a1c540c6-df2e-4def-aff1-583d68f16bf2" CreationDate="2011-04-05T13:26:57.133" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/10666/udk-packaging-the-game" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="22517" PostHistoryTypeId="14" PostId="10666" RevisionGUID="ef54b78c-231d-4d2d-af30-3c6cf9813d5e" CreationDate="2011-04-05T13:26:57.443" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="22518" PostHistoryTypeId="2" PostId="10667" RevisionGUID="619918df-4181-4b33-8517-591414479167" CreationDate="2011-04-05T13:46:48.970" UserId="3505" Text="While a dedicated map editor is great to have, it's also quite time consuming to make. The #1 easy shortcut is to define your map format as a subset of a bitmap image format and use a bitmap editor to make the maps. How well this works depend greatly on the requirements for the map, it's easy if the number of different options for each tile fit into a small palette, if not you may have to use multiple pixels for each tile, which complicate the matter and make the solution less optimal." />
  <row Id="22519" PostHistoryTypeId="2" PostId="10668" RevisionGUID="35dd945b-0274-44d3-92d7-4113ebc14541" CreationDate="2011-04-05T14:04:02.513" UserId="4296" Text="Things like TileHandler and AnimalHandler I'd put a level lower into a game screen.  Does your title screen need access to the TileHandler and is it initialized when the game is first loaded?  Probably not.&#xD;&#xA;&#xD;&#xA;Check out the [XNA State Management sample][1].  It has a lot of code in there, but basically the base game just initializes a stack of game states (or screens).  Your PlayScreen could take the static members.&#xD;&#xA;&#xD;&#xA;In the base Game, I do use a few statics, but they're very low level things like InputHelper, Log, or Config readers.  So long answer short - no, I don't think it's a bad idea in theory, just be careful what you do make static.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="22520" PostHistoryTypeId="2" PostId="10669" RevisionGUID="1564ee9b-089b-4d3b-9d74-6af2b042f079" CreationDate="2011-04-05T15:02:33.023" UserId="5021" Text="The reason that calling TileHandler in a static context is not the best possible design, is that it couples components of your design that could otherwise be decoupled.&#xD;&#xA;&#xD;&#xA;If you choose to have more than one TileHandler in the future, you'll have to do a lot of work to accommodate this change.&#xD;&#xA;&#xD;&#xA;If you choose to remove TileHandler, you'll have to do a lot of work to accommodate this change.&#xD;&#xA;&#xD;&#xA;Suppose you build a different level/zone in the future, that handles tiles in a different way from your current TileHandler. Then you either need to have a way to specify the method of tilehandling to use, or you need to call a different handler.&#xD;&#xA;&#xD;&#xA;If the TileHandler was passed as a parameter to objects that use it, then you can simply pass a different one next time, or set a different tile handler on objects that use it later.&#xD;&#xA;&#xD;&#xA;Personally, I access many things in my XNA games from a static context, and assume that I'll never have more than one of them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to be able to reuse your game engine code in your next game, you're likely going to have to rewrite much of the stuff that you currently have written as static.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In short:&#xD;&#xA;&#xD;&#xA;**In favor of not using static context:**&#xD;&#xA;&#xD;&#xA;Passing objects as parameters as much as possible decouples game elements, and allows you to modify/reuse them for the current or future projects more easily. It also allows you to manage the complexity of large amounts of code a little easier (think of having hundreds of static managers in your game class, in a big game).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In favor of static context:**&#xD;&#xA;&#xD;&#xA;Declaring and accessing objects from a static context makes it easier to write small games that don't require hundreds of static managers. Simplifies many methods and constructors by not requiring one or more extra parameters that are instead accessed statically." />
  <row Id="22521" PostHistoryTypeId="25" PostId="10664" RevisionGUID="4919a893-0675-4fbd-8839-c644ee31468c" CreationDate="2011-04-05T15:09:00.763" Comment="http://twitter.com/#!/StackGameDev/status/55285818100686848" />
  <row Id="22522" PostHistoryTypeId="5" PostId="10662" RevisionGUID="f6821de1-23df-4991-9cb1-347b104e1729" CreationDate="2011-04-05T15:17:48.493" UserId="1430" Comment="deleted 1 characters in body; edited title" Text="I have set up all the config files to my game classes and am able to launch the game to test everything.&#xD;&#xA;&#xD;&#xA;Although when I package the game, it still runs the UT deathmatch game?&#xD;&#xA;&#xD;&#xA;What other lines in the config files should be changed to make it default to my game and default map once published/packaged?&#xD;&#xA;" />
  <row Id="22523" PostHistoryTypeId="4" PostId="10662" RevisionGUID="f6821de1-23df-4991-9cb1-347b104e1729" CreationDate="2011-04-05T15:17:48.493" UserId="1430" Comment="deleted 1 characters in body; edited title" Text="UDK - problem packaging/publishing the game" />
  <row Id="22524" PostHistoryTypeId="5" PostId="10668" RevisionGUID="81902d87-16dc-44e5-8b36-5404c489401e" CreationDate="2011-04-05T15:28:24.983" UserId="4296" Comment="added 400 characters in body" Text="Things like TileHandler and AnimalHandler I'd put a level higher into a game screen.  Does your title screen need access to the TileHandler and is it initialized when the game is first loaded?  Probably not.&#xD;&#xA;&#xD;&#xA;Check out the [XNA State Management sample][1].  It has a lot of code in there, but basically the base game just initializes a stack of game states (or screens).  Each screen is fairly independent of the others and runs as a simplified version of the Game itself.  Your PlayScreen could have static members so they're accessible to PlayScreen components.&#xD;&#xA;&#xD;&#xA;In the base Game, I do use a few statics, but they're very low level things like InputHelper, Log, or Config readers.  They are pretty standard across all games so the base engine can be quickly and easily ported.  The screens are where the actual game logic happens.  So long answer short - no, I don't think it's a bad idea in theory, just be careful what you do make static.  Once you go ahead and make something static, it's a tremendous amount of work if you change your mind.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="22525" PostHistoryTypeId="2" PostId="10670" RevisionGUID="a425187e-96d5-4e4b-9ce2-761aed7ecb99" CreationDate="2011-04-05T15:30:38.517" UserId="1430" Text="&gt; Now I can't see anything immediately&#xD;&#xA;&gt; wrong with this or anything that'd&#xD;&#xA;&gt; cause any problems but I've only just&#xD;&#xA;&gt; started using static classes, so does&#xD;&#xA;&gt; anyone more knowledgeable see any&#xD;&#xA;&gt; giant reason why that's a bad idea?&#xD;&#xA;&#xD;&#xA;When you have a shiny new hammer, every problem looks like a nail.&#xD;&#xA;&#xD;&#xA;**In general there is nothing wrong with static classes and/or methods, if used properly** (for things that do not have or depend on per-instance state). However, in your case you are misusing them to *hide* a dependency on per-instance, confusing this with removing the dependency. It also appears that you are exposing implementation detail of the `Game1` class, which is also generally bad.&#xD;&#xA;&#xD;&#xA;Here is the crux of your issue:&#xD;&#xA;&#xD;&#xA;&gt; ...if I am in `AnimalHandler` and want&#xD;&#xA;&gt; to check if a tile is walkable from&#xD;&#xA;&gt; `TileHandler` then that causes&#xD;&#xA;&gt; problems or I have to pass a list of&#xD;&#xA;&gt; walkable tiles into `AnimalHandler`,&#xD;&#xA;&gt; which I'd rather not do.&#xD;&#xA;&#xD;&#xA;Ignoring the possibility that `AnimalHandler` needing these tiles may itself be a bad design (with the names you have chosen it's hard to tell the details of these classes) for the moment...if `AnimalHandler` needs a list of walkable tiles, then it needs a list of walkable tiles. **It is generally better to make dependencies more explicit than less so**, as it makes code more self-documenting. By passing the list directly to `AnimalHandler`, you explicit call out the fact that it needs such a list. If you instead make everything static and public so you can just access the static list held elsewhere in the code, all you do is *hide* the dependency without actually solving or removing it.&#xD;&#xA;&#xD;&#xA;For a small game that doesn't need to scale this won't be a problem, per se, but it may lead you down the path of a bad habit so you may want to consider not doing it. At the very least keep this in mind for the next project you work on.&#xD;&#xA;" />
  <row Id="22526" PostHistoryTypeId="2" PostId="10671" RevisionGUID="02df978a-cb50-4f8c-87b2-63247990c099" CreationDate="2011-04-05T15:30:41.903" UserId="1198" Text="The points raised here are all good. In my experience (which admitedly is weighted more toward business apps than games), there are great uses for static classes and members and I've used them many times. I have found, that as requirements and complexity grow, I end up recycling those static classes and converting them to instance classes and start passing them around.&#xD;&#xA;&#xD;&#xA;The point I'd like to make is that, if using a static class helps you get **this** game out, go for it, but still do the right things: implement an interface or base class so it is easier to rip it out and convert it to an instance class later on. &#xD;&#xA;&#xD;&#xA;An ounce of prevention is worth a pound of cure, so make sure your static class doesn't tie you down in away that makes it hard to change. It is pretty easy to refactor a method using a static class that implements an interface so it accepts a new interface parameter and uses that interface instead of the static class reference." />
  <row Id="22527" PostHistoryTypeId="5" PostId="10664" RevisionGUID="4137f434-069c-4bba-b7e2-52466e9f99d7" CreationDate="2011-04-05T15:32:05.473" UserId="1430" Comment="added 6 characters in body; edited title" Text="I have done tiled maps and tile sets quite often, but in a rather simplified way. My tile sets were linear images of the size `(tile_width * num_tiles) * tile_height`, so I could find an index easily by using `val src_pos = (index * tile_width, 0)`.&#xD;&#xA;&#xD;&#xA;But in reality, I've come to notice, tile sets are actually fully sized images of two dimensions. That has some advantages, clearly, it's easier to draw. So I wanted to support that. The problem would be just to turn the index to the right source position. Failed a bit, so I wanted to ask here.&#xD;&#xA;&#xD;&#xA;I've had two ideas dealing with it:&#xD;&#xA;&#xD;&#xA;Turn the index into two values with&#xD;&#xA;&#xD;&#xA;    src_x = index modulo num_tiles_x&#xD;&#xA;    src_y = index div num_tiles_y&#xD;&#xA;&#xD;&#xA;which lead me to some quite weird results. The tiles are correctly cut, but they're the wrong ones for the position.&#xD;&#xA;&#xD;&#xA;The other idea is to take the image and turn it into a 1D-tile set by cutting it up. But I am afraid that would not be an option, as I am using Textures.&#xD;&#xA;&#xD;&#xA;How is this solved in 'professional' applications?" />
  <row Id="22528" PostHistoryTypeId="4" PostId="10664" RevisionGUID="4137f434-069c-4bba-b7e2-52466e9f99d7" CreationDate="2011-04-05T15:32:05.473" UserId="1430" Comment="added 6 characters in body; edited title" Text="Tilesets with two dimensions" />
  <row Id="22529" PostHistoryTypeId="5" PostId="10660" RevisionGUID="85b191a7-b20f-4f84-94f1-381e9b90f051" CreationDate="2011-04-05T15:33:53.943" UserId="1430" Comment="added 8 characters in body; edited tags" Text="Is it a really bad idea to have my `Game1` class as static? As at the moment in my `Game1` class I have a class called `TileHandler` which handles everything to do with my current set of tiles, and `AnimalHandler` which handles all my animals (surprisingly).&#xD;&#xA;&#xD;&#xA;Now if I am in `AnimalHandler` and want to check if a tile is walkable from `TileHandler` then that causes problems or I have to pass a list of walkable tiles into `AnimalHandler`, which I'd rather not do.&#xD;&#xA;&#xD;&#xA;What would be easier would be to make `Game1` static and then in `AnimalHandler` just go `Game1._tileHandler.WalkableTile(position)`.&#xD;&#xA;&#xD;&#xA;Now I can't see anything immediately wrong with this or anything that'd cause any problems but I've only just started using static classes, so does anyone more knowledgeable see any giant reason why that's a bad idea?" />
  <row Id="22530" PostHistoryTypeId="6" PostId="10660" RevisionGUID="85b191a7-b20f-4f84-94f1-381e9b90f051" CreationDate="2011-04-05T15:33:53.943" UserId="1430" Comment="added 8 characters in body; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;architecture&gt;" />
  <row Id="22531" PostHistoryTypeId="6" PostId="10662" RevisionGUID="ce497a0c-b6a4-4732-a25b-78766a03ba24" CreationDate="2011-04-05T15:34:51.370" UserId="1430" Comment="edited tags" Text="&lt;udk&gt;&lt;unreal&gt;&lt;distribution&gt;" />
  <row Id="22532" PostHistoryTypeId="2" PostId="10672" RevisionGUID="d3667aab-8702-4773-96f6-db5d35bbf801" CreationDate="2011-04-05T16:36:41.323" UserId="1747" Text="**Achievements** are everywhere now &amp;mdash; Xbox Live, iOS Game Center, many individual games, and even in social communities with gaming elements like Stack Overflow.&#xD;&#xA;&#xD;&#xA;Many [have requested](http://meta.stackoverflow.com/questions/3230/so-badge-progress-report) that Stack Overflow show progress toward badges.  The accepted answer quotes [this uservoice request](http://stackoverflow.uservoice.com/pages/1722-general/suggestions/27562-badge-progress), where Jeff Atwood made the following statement:&#xD;&#xA;&#xD;&#xA;&gt; this is modelled on the xbox live achievements model, and that does not show progress, either.. by design&#xD;&#xA;&#xD;&#xA;1. Is there a reference for this statement about Xbox Live achievements?&#xD;&#xA;2. Why is this &quot;by design&quot;?  In other words, what is gained by *not* showing achievement progress?&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&lt;sup&gt;*Note: While I think this is interesting on its own, this is not just theoretical, I'm working on a game where currently we do show achievement progress.*&lt;/sup&gt;" />
  <row Id="22533" PostHistoryTypeId="1" PostId="10672" RevisionGUID="d3667aab-8702-4773-96f6-db5d35bbf801" CreationDate="2011-04-05T16:36:41.323" UserId="1747" Text="Why not show progress towards achievements/badges?" />
  <row Id="22534" PostHistoryTypeId="3" PostId="10672" RevisionGUID="d3667aab-8702-4773-96f6-db5d35bbf801" CreationDate="2011-04-05T16:36:41.323" UserId="1747" Text="&lt;game-design&gt;" />
  <row Id="22535" PostHistoryTypeId="2" PostId="10673" RevisionGUID="5df00ca9-c0df-4ffa-ab3f-978f38f7cadb" CreationDate="2011-04-05T16:37:03.447" UserId="5932" Text="What I've done int the past, is have your character hold a velocity in each direction. When I want a jump, I simply say vel_y -= (jump velocity here). And of course I have a constant gravity.&#xD;&#xA;&#xD;&#xA;One other really nice feature you can should look into implementing is the whole concept of &quot;the longer you hold the button the higher you go&quot;. I Hate it when games only jump one single constant variable, and don't allow me to have some feeling of control.&#xD;&#xA;&#xD;&#xA;Oh, and wall jumps are cool =]" />
  <row Id="22536" PostHistoryTypeId="2" PostId="10674" RevisionGUID="e3fafb88-3598-4d5d-b196-c5211d3351e8" CreationDate="2011-04-05T17:02:33.030" UserId="1929" Text="**Disclaimer:** It may be that I'm already doing all the &quot;right&quot; things, but just don't have enough traffic for it to pay off with people giving feedback.&#xD;&#xA;&#xD;&#xA;My question is: **how do you attract early and quality feedback into games, from end-users?** Ideally, I'm looking at a model where the seed of an idea comes from you (or from them, even) and you build it into a game, molding it along the lines that people tell you are best.&#xD;&#xA;&#xD;&#xA;Because you're just one opinion. And game developers have a reputation for doing weird and sub-par quality stuff, sometimes.&#xD;&#xA;&#xD;&#xA;I'm currently practicing the following:&#xD;&#xA;&#xD;&#xA;- **VIP List:** I have a &quot;VIP&quot; mailing list (mostly friends) who agreed to try out game releases and give me feedback. They seem hesitant to say anything negative, and most of them are not really gamers, just doing it because they know me and like my niche.&#xD;&#xA;- **2-4 Week Releases:** I use a form of agile and release iterations every two to four weeks. This means every release is functionally small, but somewhat polished.&#xD;&#xA;- **Press-Releases:** With every release, I also post a small &quot;press release&quot; post identifying the good, the bad, what's next, and screenshots (along with a link to play the latest release version).&#xD;&#xA;&#xD;&#xA;I'm not getting that much feedback. What am I missing?" />
  <row Id="22537" PostHistoryTypeId="1" PostId="10674" RevisionGUID="e3fafb88-3598-4d5d-b196-c5211d3351e8" CreationDate="2011-04-05T17:02:33.030" UserId="1929" Text="Getting Early User Feedback on Games" />
  <row Id="22538" PostHistoryTypeId="3" PostId="10674" RevisionGUID="e3fafb88-3598-4d5d-b196-c5211d3351e8" CreationDate="2011-04-05T17:02:33.030" UserId="1929" Text="&lt;marketing&gt;&lt;feedback&gt;" />
  <row Id="22539" PostHistoryTypeId="2" PostId="10675" RevisionGUID="7a4a825c-a2a5-4f69-ac0f-0642fc1e66ce" CreationDate="2011-04-05T17:04:53.480" UserId="1929" Text="I know this question is old and already answered, but ... have you considered having press-releases of some sort on your site and marketing your game there? It's easier to find people who are the type who will play your game (as opposed to looking in a single, physical, rural city) because the internet brings niches together.&#xD;&#xA;&#xD;&#xA;I do this too. On my main site, I have a &quot;labs&quot; section where I post in-development releases, along with a sort of press release that outlines what's new (with screenshots)." />
  <row Id="22540" PostHistoryTypeId="2" PostId="10676" RevisionGUID="9462ed26-178a-41f6-8dd5-ddcc7288ef2d" CreationDate="2011-04-05T17:08:05.723" UserId="6539" Text="I haven't seen an explicit statement about this for XBL achievements, but when using Xbox Live, it's plainly clear that the system itself doesn't display achievement progress.&#xD;&#xA;&#xD;&#xA;Some games do show progress towards achievements as you mention yours does, but it's done from within the game, not as part of the overall achievement framework.&#xD;&#xA;&#xD;&#xA;As for why, my guess would be that it's done to simplify said framework. Control over how progress is determined and communicated is the kind of decision that's best left to individual games. Coming up with a unified interface that'd work for every possible achievement scenario just sounds like more effort than it's worth. It's a lot easier to make the framework binary (either you have an achievement or you don't) and let the game itself take care of the details -- some might choose to show a percentage completed, some would go for a &quot;You found X of Y widgets&quot; message, some would pick a different approach entirely or not show any progress.&#xD;&#xA;&#xD;&#xA;As for why StackOverflow feels that achievement progress isn't worth implementing, that really belongs on Meta, but I recall reading somewhere that the idea is that badges are not a goal and achieving them isn't meant to be something you do on purpose. Some badges aren't achievable at all without a time machine and some are consolation prizes, not accomplishments." />
  <row Id="22541" PostHistoryTypeId="2" PostId="10677" RevisionGUID="ea36158c-5932-4b50-8690-74940a3ff835" CreationDate="2011-04-05T17:09:33.663" UserId="1430" Text="&gt; Is there a reference for this&#xD;&#xA;&gt; statement about Xbox Live&#xD;&#xA;&gt; achievements?&#xD;&#xA;&#xD;&#xA;The Xbox system pretty clearly does not provide a mechanism to track or display the progress of achievements (although some games may do this themselves via their own internal technology). I don't know of any official public statement anywhere that indicates that Microsoft intended this to be the design of the system, but given that it is a thing that hasn't changed since the achievement system was introduced I think it's fairly safe to assume that it is a design decision.&#xD;&#xA;&#xD;&#xA;&gt; Why is this &quot;by design&quot;? In other&#xD;&#xA;&gt; words, what is gained by not showing&#xD;&#xA;&gt; achievement progress?&#xD;&#xA;&#xD;&#xA;&quot;By design&quot; doesn't necessarily mean that there is any specific gain in the choice. It simply means that a choice was made, intentionally. That said, I think the system is easier for developers to handle when you don't have to implement progress tracking. It also likely simplifies any TRCs around achievements (what is or is not acceptable in terms of &quot;tracking progress&quot; for an achievement that is unlocked by reaching a particular point in the game's plot, for example?)" />
  <row Id="22542" PostHistoryTypeId="5" PostId="10672" RevisionGUID="f13752c6-0412-49af-a6ea-72aa5f67c126" CreationDate="2011-04-05T17:13:43.303" UserId="1747" Comment="added 34 characters in body" Text="**Achievements** are everywhere now &amp;mdash; Xbox Live, iOS Game Center, many individual games, and even in social communities with gaming elements like Stack Overflow.&#xD;&#xA;&#xD;&#xA;Many [have requested](http://meta.stackoverflow.com/questions/3230/so-badge-progress-report) that Stack Overflow show progress toward badges.  The accepted answer quotes [this uservoice request](http://stackoverflow.uservoice.com/pages/1722-general/suggestions/27562-badge-progress), where Jeff Atwood made the following statement:&#xD;&#xA;&#xD;&#xA;&gt; this is modelled on the xbox live achievements model, and that does not show progress, either.. by design&#xD;&#xA;&#xD;&#xA;1. Is there a reference for this statement about Xbox Live achievements (that it actually *is* by design)?&#xD;&#xA;2. Why is this &quot;by design&quot;?  In other words, what is gained by *not* showing achievement progress?&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&lt;sup&gt;*Note: While I think this is interesting on its own, this is not just theoretical, I'm working on a game where currently we do show achievement progress.*&lt;/sup&gt;" />
  <row Id="22543" PostHistoryTypeId="2" PostId="10678" RevisionGUID="67754a34-7d2a-4222-83ae-5e32afa62e4a" CreationDate="2011-04-05T17:25:14.010" UserId="6540" Text="My screen resolution is 640x480 and I have two Vector2 objects located at (10,10) and (600, 320).&#xD;&#xA;&#xD;&#xA;How can I connect these two objects and extend the line to encompass the whole screens width, how can I get the Y for the intersection at the center of the width (320)?" />
  <row Id="22544" PostHistoryTypeId="1" PostId="10678" RevisionGUID="67754a34-7d2a-4222-83ae-5e32afa62e4a" CreationDate="2011-04-05T17:25:14.010" UserId="6540" Text="Get intersection of vector in the middle of the screen" />
  <row Id="22545" PostHistoryTypeId="3" PostId="10678" RevisionGUID="67754a34-7d2a-4222-83ae-5e32afa62e4a" CreationDate="2011-04-05T17:25:14.010" UserId="6540" Text="&lt;xna&gt;&lt;math&gt;&lt;vector&gt;" />
  <row Id="22546" PostHistoryTypeId="2" PostId="10679" RevisionGUID="0ef88695-b0a9-42f5-81db-07734bddcc37" CreationDate="2011-04-05T17:25:31.583" UserId="1430" Text="No feedback *is* feedback; it could mean that your testers simply don't find the game engaging enough to feel like investing time in crafting reasonable feedback for you. Obviously it will be tricky to figure out why, but [it's possible the people you are putting the game in front of are not the ideal demographic (or are not ideal testers)][1]. Or it's possible the game just isn't fun.&#xD;&#xA;&#xD;&#xA;You should try to make providing feedback as smooth as possible, ideally requiring no work from the user at all except an opt-in. For example, gathering automatic metrics like heat maps ([this video][2] discusses these sorts of things, somewhere around the 40 minute mark, I think) has for player death and/or time-to-complete levels and such can tell you things about your game you might not realize without any actual action on the part of your testers at all (other than them agreeing to allow your game to send you statistics about their play sessions).&#xD;&#xA;&#xD;&#xA;You might find that your average game play session lasts five minutes and 95% of the users die or get stuck early in level one, for example. That might suggest why nobody bothers providing much feedback -- they simply get discouraged too early and don't bother.&#xD;&#xA;&#xD;&#xA;Even getting written feedback should be optimized -- provide an in-game means (for example, a `/bug` command) to pop up a UI that a tester can write up a bug or some bit of information and send you.&#xD;&#xA;&#xD;&#xA;People are lazy. The more friction that is involved in testers sending you information, even as little as opening up their email client themselves, the less likely they are to actually do it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jeff-vogel.blogspot.com/2009/08/beta-testers-getting-them-keeping-them.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=7-62tRHLcHk" />
  <row Id="22547" PostHistoryTypeId="5" PostId="10653" RevisionGUID="e39cb4f0-e6dd-48d8-b080-bc22c3d759db" CreationDate="2011-04-05T17:29:22.190" UserId="6519" Comment="deleted 194 characters in body" Text="1st Question is I want to write a board game for iOS and Android so I'm coming up with CoronaSDK and [AirPlay][1]. Since I have a mac, development platform is not an issue but the problem is which one should I choose. I'm fluent with PHP and web languages and familiar with C but it's a new language for Lua. I know a lot of people prefer Corona but why not Airplay? It even provides more devices and able to write in C/C++.&#xD;&#xA;&#xD;&#xA;2nd Question is I want a SDK with shortest development time and easier coding. I don't need complex 3D or animation engine since the game is a board game like chess or monopoly. What would you recommend?&#xD;&#xA;&#xD;&#xA;Really appreciate anyone trying to answer my questions here :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.airplaysdk.com" />
  <row Id="22548" PostHistoryTypeId="2" PostId="10680" RevisionGUID="1993495b-bbdc-4bd8-a7a4-e81b9ffe83ee" CreationDate="2011-04-05T17:37:18.410" UserId="6519" Text="If I'm doing a turn-based card game, what kind of technique do you use to support multiplayer gameplay over Internet? &#xD;&#xA;Is it socket? If it's socket, which SDK(CoronaSDK etc.) can provide solid socket library?&#xD;&#xA;&#xD;&#xA;And extra question is if Unity3D can be used solely to support what I need without using other socket servers like SmartFox or Electro.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="22549" PostHistoryTypeId="1" PostId="10680" RevisionGUID="1993495b-bbdc-4bd8-a7a4-e81b9ffe83ee" CreationDate="2011-04-05T17:37:18.410" UserId="6519" Text="What do you use to support multiplayer turn-based network game for iOS and Android games?" />
  <row Id="22550" PostHistoryTypeId="3" PostId="10680" RevisionGUID="1993495b-bbdc-4bd8-a7a4-e81b9ffe83ee" CreationDate="2011-04-05T17:37:18.410" UserId="6519" Text="&lt;android&gt;&lt;network&gt;&lt;game-mechanics&gt;&lt;ios&gt;" />
  <row Id="22551" PostHistoryTypeId="6" PostId="10672" RevisionGUID="1f4ed13d-45b1-426d-9e26-76b85f0bc9d6" CreationDate="2011-04-05T18:08:13.770" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;achievements&gt;" />
  <row Id="22552" PostHistoryTypeId="25" PostId="10674" RevisionGUID="60543969-f30e-4796-9292-844c8f15cc35" CreationDate="2011-04-05T18:09:01.180" Comment="http://twitter.com/#!/StackGameDev/status/55331118509072384" />
  <row Id="22553" PostHistoryTypeId="5" PostId="10680" RevisionGUID="eabdd10a-40c3-4f68-b8c2-05254e47278c" CreationDate="2011-04-05T18:10:25.360" UserId="51" Comment="deleted 35 characters in body" Text="If I'm doing a turn-based card game, what kind of technique do you use to support multiplayer gameplay over Internet? &#xD;&#xA;&#xD;&#xA;Is it socket? If it's socket, which SDK (CoronaSDK etc.) can provide solid socket library?&#xD;&#xA;&#xD;&#xA;Can Unity3D can be used solely to support what I need without using other socket servers like SmartFox or Electro?" />
  <row Id="22554" PostHistoryTypeId="5" PostId="10677" RevisionGUID="06aae05c-39c6-42b4-b29a-11b4fe3797ac" CreationDate="2011-04-05T18:13:39.267" UserId="1430" Comment="added 379 characters in body" Text="&gt; Is there a reference for this&#xD;&#xA;&gt; statement about Xbox Live&#xD;&#xA;&gt; achievements?&#xD;&#xA;&#xD;&#xA;The Xbox system pretty clearly does not provide a mechanism to track or display the progress of achievements (although some games may do this themselves via their own internal technology). I don't know of any official public statement anywhere that indicates that Microsoft intended this to be the design of the system, but given that it is a thing that hasn't changed since the achievement system was introduced I think it's fairly safe to assume that it is a design decision.&#xD;&#xA;&#xD;&#xA;&gt; Why is this &quot;by design&quot;? In other&#xD;&#xA;&gt; words, what is gained by not showing&#xD;&#xA;&gt; achievement progress?&#xD;&#xA;&#xD;&#xA;&quot;By design&quot; doesn't necessarily mean that there is any specific gain in the choice. It simply means that a choice was made, intentionally. That said, I think the system is easier for developers to handle when you don't have to implement progress tracking. It also likely simplifies any TRCs around achievements (what is or is not acceptable in terms of &quot;tracking progress&quot; for an achievement that is unlocked by reaching a particular point in the game's plot, for example?)&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;**In the general case**, I think it could be argued that exposing the progress towards an achievement could expose too much of the underlying &quot;spreadsheet&quot; of the game. Whether or not that matters depends on the style of the game, I guess -- if you really want to encourage suspension of disbelief, maybe it's better to hide more of these mechanics that to show them. " />
  <row Id="22555" PostHistoryTypeId="2" PostId="10681" RevisionGUID="5b66ebce-273f-49ec-8af2-bca1935c8943" CreationDate="2011-04-05T19:05:33.690" UserId="953" Text="Progress should be shown whenever possible, with achievements and with other goals. Part of the great thing about explicit achievements is that it gives the player/user something to strive for, and a feeling of, yes, *progress* toward that goal. Each time the player makes a step toward her goal, she can get a micro-reward of a progress update, which encourages her to continue and reminds her of the goal. These updates should be spaced out enough that they don't get annoying, but the player/user should always be able to intentionally view her progress at any time.&#xD;&#xA;&#xD;&#xA;The only times this progress technique should be avoided is if progress is unmeasurable or if the goal is deliberately obfuscated. If progress occurs due to a single atomic event (&quot;First bounty you manually awarded on another person's question&quot;), has become impossible (&quot;Actively participated in the private beta&quot; after release), or is kept secret to avoid spoiling a surprise (&quot;Defeat the 3 friends who betrayed you&quot;), then you shouldn't track progress for those achievements.&#xD;&#xA;&#xD;&#xA;Tracking progress does raise some ethical issues. Achievements, especially ones that give frequent progress update micro-rewards, can tie pretty strongly into the base impulses that gambling also touches. If your achievement system is making people play just to get that next progress update, rather than enabling people to have fun with your actual game, then you might want to readjust what achievements you're awarding and how you track them.&#xD;&#xA;&#xD;&#xA;As for why the Xbox system doesn't do this, I suspect it's a combination of minimizing UI clutter in case a game implements their progress milestones poorly, simplifying the achievement API, and a desire for simplicity of mechanics (either you get the gamer points or you don't)." />
  <row Id="22556" PostHistoryTypeId="2" PostId="10682" RevisionGUID="8b47603a-f627-482d-9013-98e102f2acb8" CreationDate="2011-04-05T19:21:32.010" UserId="5899" Text="There are good resources ( manuals, tutorials, etc ) to start studying the code of the Quake 3 engine beyond the code itself?&#xD;&#xA;&#xD;&#xA;I'm very interested in know how it's structured for educational purposes and maybe to do some modifications." />
  <row Id="22557" PostHistoryTypeId="1" PostId="10682" RevisionGUID="8b47603a-f627-482d-9013-98e102f2acb8" CreationDate="2011-04-05T19:21:32.010" UserId="5899" Text="Resources to help study of Quake 3 engine" />
  <row Id="22558" PostHistoryTypeId="3" PostId="10682" RevisionGUID="8b47603a-f627-482d-9013-98e102f2acb8" CreationDate="2011-04-05T19:21:32.010" UserId="5899" Text="&lt;3d-engines&gt;&lt;manuals&gt;&lt;quake3&gt;" />
  <row Id="22559" PostHistoryTypeId="2" PostId="10683" RevisionGUID="67ceec5e-36be-4b23-92aa-fda173376626" CreationDate="2011-04-05T19:30:14.987" UserId="6500" Text="Absolutely.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Quake_engine is a good overview of what is out there, but you can get into the details of its architecture quite quickly through its citations.&#xD;&#xA;&#xD;&#xA;May i also suggest a couple books on game engine architecture which may be more in line with what you are looking for. While not Quake specific, they go into the details of engine design and run parallel to many aspects of of the Quake engines:&#xD;&#xA;&#xD;&#xA; - **3D Game Engine Architecture** - 978-0122290640&#xD;&#xA; - **3D Game Engine Programming** - 978-1592003518&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22560" PostHistoryTypeId="2" PostId="10684" RevisionGUID="ad40e9d2-40ef-4eb9-8d66-877a343a96d2" CreationDate="2011-04-05T19:35:09.103" UserId="6500" Text="Do you mean midpoint?&#xD;&#xA;&#xD;&#xA;You can always set the two vectors equal to each other with a scalar multiple for each and solve, but this situation is not clear. Are we to assume they are pointing at each other?" />
  <row Id="22561" PostHistoryTypeId="2" PostId="10685" RevisionGUID="a396df60-a9b1-428c-9ce3-b7949d372dbb" CreationDate="2011-04-05T20:08:35.820" UserId="5440" Text="you have to use the equation of a line. I prefer to use parametric representation &#xD;&#xA;P(t)= 1-t*(v1) + t*V2 ; then you solve the equation where P1 = P2 ... &#xD;&#xA;&#xD;&#xA;here is the detailed solution http://paulbourke.net/geometry/lineline2d/ you can also google &quot;line line intersection&quot;" />
  <row Id="22562" PostHistoryTypeId="2" PostId="10686" RevisionGUID="a30ac278-b080-49e8-a4f8-bd61d651feae" CreationDate="2011-04-05T20:42:38.017" UserId="5259" Text="So, you should start by looking at Wikipedia's article on [id Tech 3][1]. That can be augmented by Brian Hook's GDC talk [summary][2] and some old stuff on the [Element 61][3] blog. In addition to that, you'll have to trawl through a bunch of whatever old mod tutorials you can find to try and reconstruct what's going on.&#xD;&#xA;&#xD;&#xA;I'd suggest starting from the original source release from id, instead of ioquake3 or what-have-you, in order to really see the context of what's going on (how input is handled and directed inside the engine, what sort of underlying event structure is used, etc.).&#xD;&#xA;&#xD;&#xA;Some key points that helped me when I was working with it:&#xD;&#xA;&#xD;&#xA; - There is always a server; there may also be client logic sitting on top of handling a frame.&#xD;&#xA; - Input is directed first to a console, if interested, then to the GUI, then to the game proper.&#xD;&#xA; - The engine itself is separated (hard!) from the game logic, using trap functions. Look in (if memory serves) the cgame and render projects to find the actual engine code.&#xD;&#xA; - Game logic can be entirely written to run in the Quake 3 virtual machine. When modding and using native dlls, you will have to run the game as `quake3.exe +set sv_pure 0 +set vm_game 0 +set vm_cgame 0 +set vm_ui 0` in order to allow the engine to run native code instead of VM code.&#xD;&#xA; - The UI for the menu system is a strange, evil, twisted stack of structures and callbacks. It is usable once you puzzle it out, but that can take some trial and error. Remember, it's a stack.&#xD;&#xA; - If you are writing code in native .dlls, feel free to allocate memory, write in C++, or whatever else floats your boat. You can use the STL too--there is no reason to rigidly follow the C idioms except where you directly interface with the engine.&#xD;&#xA;&#xD;&#xA;Some neat things I've made for it with a coworker:&#xD;&#xA;&#xD;&#xA; - Simple command-line interface to call shell commands from the console and dump the stdout/stderr streams back to the console (the Quake console).&#xD;&#xA; - Interface with an SQL database to pull and display records.&#xD;&#xA; - Flexible windowing and widget toolkit for making flexible displays on the client hud (using bar charts, text boxes, picture boxes, context menus, resizeable windows, etc.).&#xD;&#xA; - Slow rockets. :)&#xD;&#xA;&#xD;&#xA;Personally, I found that the engine was a great combination of really smart things done in really dumb ways, really dumb things done in really smart ways, and really smart things done in really smart ways. It's a great example of how to have modularity and good structured design in a medium-scale C project.&#xD;&#xA;&#xD;&#xA;Lastly, don't feel bad if it takes a while to grok. It took me maybe a month to really be able to know where to find what I was looking for in the engine; if all else fails, start at the application init and just tunnel down into the functions, leaving comments for yourself as signposts. My monitor ended up covered in pink post-it notes with function names, line numbers, and short descriptions of what they did.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Id_Tech_3&#xD;&#xA;  [2]: http://www.gamers.org/dEngine/quake3/bwh_gdc99.txt&#xD;&#xA;  [3]: http://element61.blogspot.com/2005/08/looking-at-quake-3-source-part-1.html" />
  <row Id="22563" PostHistoryTypeId="25" PostId="10682" RevisionGUID="fe1505ce-338e-4247-82fa-97cc948c340b" CreationDate="2011-04-05T21:09:02.100" Comment="http://twitter.com/#!/StackGameDev/status/55376418397360128" />
  <row Id="22564" PostHistoryTypeId="2" PostId="10687" RevisionGUID="d130700f-123f-42eb-a3c0-e6d20187d350" CreationDate="2011-04-05T22:05:30.643" UserId="1598" Text="CraftyJS supports isometric pretty well, and has examples on their site.  Check it out: http://craftyjs.com/" />
  <row Id="22565" PostHistoryTypeId="2" PostId="10688" RevisionGUID="12b23424-42b0-47c8-99ac-50d1a1f8e1e8" CreationDate="2011-04-05T22:22:42.883" UserId="5091" Text="Im trying to reproduce several sounds in a game Im developing in AS3.&#xD;&#xA;&#xD;&#xA;The game is like a TD game, and when I got 10+ of the same tower firing at the same time, I hear a horrible: &quot;PRRRRRRRRRRRRRRRRRRRRRR&quot;... -_-&#xD;&#xA;&#xD;&#xA;How should I manage this problem?, how PC games (specially RTS ones) manage this in order to hear something decent instead of an obvious and horrible loop?&#xD;&#xA;&#xD;&#xA;Thx in advance." />
  <row Id="22566" PostHistoryTypeId="1" PostId="10688" RevisionGUID="12b23424-42b0-47c8-99ac-50d1a1f8e1e8" CreationDate="2011-04-05T22:22:42.883" UserId="5091" Text="Reproducing several sounds in AS3." />
  <row Id="22567" PostHistoryTypeId="3" PostId="10688" RevisionGUID="12b23424-42b0-47c8-99ac-50d1a1f8e1e8" CreationDate="2011-04-05T22:22:42.883" UserId="5091" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;sound&gt;&lt;sound-effects&gt;" />
  <row Id="22568" PostHistoryTypeId="2" PostId="10689" RevisionGUID="7c62e587-d69c-445f-a795-8c52308f03ac" CreationDate="2011-04-05T22:35:09.443" UserId="6384" Text="I haven't had to run into this issue too many times, but what I've done is have a SoundManager class managing all my sounds - creating, calling, disposing. &#xD;&#xA;&#xD;&#xA;If I'm finding overlapping sounds gets annoying (take a massive battle in SC2), I'll have the SoundManager keep track of &quot;currently playing sounds&quot; - increment this when a sound plays, decrement when it's complete, and not allow new sounds to play until AFTER that limit is back at a mangeable level. &#xD;&#xA;&#xD;&#xA;Hey a bullet's a bullet. You don't need to hear 50+1 to get the idea of a ton of lasers firing and a battlecruiser. &#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;" />
  <row Id="22569" PostHistoryTypeId="2" PostId="10690" RevisionGUID="c4cde144-b6f1-416c-bb81-4cf28b548c38" CreationDate="2011-04-05T22:36:59.183" UserId="2338" Text="The book [Focus On Mod Programming in Quake III Arena][1] will help you understand the way the client and server logic are decoupled, client prediction, client side graphics effects etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Focus-Programming-Quake-Premier-Development/dp/193184156X/ref=sr_1_9?ie=UTF8&amp;qid=1302042620&amp;sr=8-9" />
  <row Id="22570" PostHistoryTypeId="5" PostId="10688" RevisionGUID="64e595ab-4b0a-4e62-9ebd-1bb74630cf31" CreationDate="2011-04-05T23:30:23.220" UserId="51" Comment="deleted 28 characters in body" Text="I'm trying to reproduce several sounds in a game I'm developing in AS3.&#xD;&#xA;&#xD;&#xA;The game is like a TD game, and when I got 10+ of the same tower firing at the same time, I hear a horrible: &quot;PRRRRRRRRRRRRRRRRRRRRRR&quot;...&#xD;&#xA;&#xD;&#xA;How should I manage this problem?  How do PC games (specially RTS ones) manage this in order to hear something decent instead of an obvious and horrible loop?&#xD;&#xA;" />
  <row Id="22571" PostHistoryTypeId="2" PostId="10691" RevisionGUID="692c30d5-c156-419e-8375-7b36e1d757f6" CreationDate="2011-04-05T23:33:50.780" UserId="51" Text="Typically what I do is I have the sound manager prevent the same sound from being played over top of each other within a small period of time.&#xD;&#xA;&#xD;&#xA;So let's say you have 5 towers that all would start firing at the same time (for the sake of argument, let's say the same frame).  They would all tell the sound manager to play a &quot;tower type X fire&quot; sound.  The sound manager would see this, and only play a single instance of this sound.  That sound type won't be allowed to play again until some short period of time later (a couple of frames at least, maybe close to something like a quarter of a second or so).  That'll at least prevent the sound from being really loud.&#xD;&#xA;&#xD;&#xA;There's some game/audio design that can go into that as well.  Keep the pace of the game slow enough and your sounds short enough that you don't have so many bullets firing on screen at a given point in time." />
  <row Id="22572" PostHistoryTypeId="25" PostId="10688" RevisionGUID="64a74406-87e2-4345-a810-98ce4e18a470" CreationDate="2011-04-06T00:09:02.627" Comment="http://twitter.com/#!/StackGameDev/status/55421721318137856" />
  <row Id="22573" PostHistoryTypeId="2" PostId="10692" RevisionGUID="a87565b0-2353-4000-a036-01a07ecc1450" CreationDate="2011-04-06T00:31:51.417" UserId="6384" Text="I'd imagine the reason you're not hearing much about Flash connecting to a multi-client server is possibly because you're researching only the Flash-side of things and not the server-side element.&#xD;&#xA;&#xD;&#xA;It's less of a front-end / client-side issue, and more of a server-side management of state, connections (i.e. players), data (-base) updates, and what-not.&#xD;&#xA;&#xD;&#xA;I've seen a nice abstraction used with [SmartFoxPro][1]. They offer the plug-and-play chat client, room client, in-game API that you can hook into as a flash / actionscript developer.&#xD;&#xA;&#xD;&#xA;Honestly, you should take a look at multiplayer game development from the server-side perspective (java - [redwarf][2], [ruby][3], python ([piston][4] as a framework), even php using a framework like codeigniter for a lightweight application). &#xD;&#xA;&#xD;&#xA;Take a look at researching from that angle and hopefully that helps!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.smartfoxserver.com/products/pro.php&#xD;&#xA;  [2]: http://www.reddwarfserver.org/&#xD;&#xA;  [3]: http://stackoverflow.com/questions/3872639/simple-multiplayer-game-in-ruby-on-rails&#xD;&#xA;  [4]: https://bitbucket.org/jespern/django-piston/wiki/Home" />
  <row Id="22574" PostHistoryTypeId="2" PostId="10693" RevisionGUID="3a420539-86f1-4b64-894b-eaac7ff59470" CreationDate="2011-04-06T00:37:46.230" UserId="1101" Text="When you ask to play a sound, it helps to play a 'logical' sound rather than directly triggering a physical wave. Instead, leave the logical sound object to handle that part, and it can do something like playing 1 of several different versions of that sound in sequence (aka 'round-robin' samples), or picking one at random, or pitch-shifting and changing the volume on them slightly to give the impression of them sounding unique, etc.&#xD;&#xA;&#xD;&#xA;Most AAA games have dedicated editors so that the audio guy can specify the different samples that go into each logical sound without needing to do any programming. The game then just loads in the sound bank that the tool generates." />
  <row Id="22575" PostHistoryTypeId="2" PostId="10694" RevisionGUID="0958c761-91a3-42e7-81ce-2150673e5aa0" CreationDate="2011-04-06T02:01:25.630" UserId="1198" Text="If your game is turn based, a combination of [long-polling][1] (read Push) and web services (SOAP or REST) should be more than sufficient for any turn-based game. They are simple to implement on a server and consume on a multitude of clients.&#xD;&#xA;&#xD;&#xA;The advantage of using web services, are two fold. First, just about every platform worth its salt will have a mechanism to invoke web services natively without much ruckus. Second, is that adding additional platforms, or even letting web (desktop based browser) players play against anyone else, is easy since you're just passing messages back and forth an HTTP connection.&#xD;&#xA;&#xD;&#xA;In addition to that, since you're talking about Android and iOS -- where 3G connections are likely to occur, an HTTP web service wont completely die in a &quot;flaky-connection&quot; mode, where as pure TCP sockets would have issues.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Push_technology" />
  <row Id="22576" PostHistoryTypeId="2" PostId="10695" RevisionGUID="ac5f9814-f0ff-4bb6-8c1d-8e0f6ce63c42" CreationDate="2011-04-06T02:02:25.477" UserId="1929" Text="I've written a fair number of games that have RPG-like &quot;levelling up,&quot; where the player gains experience for killing monsters/enemies, and eventually, reaches a new level, where their stats increase.&#xD;&#xA;&#xD;&#xA;**How do you find a balance between player growth, monster strength, and difficulty?** The extreme ends of this spectrum are:&#xD;&#xA;&#xD;&#xA;- Player levels up really fast and blows away monsters without much effort&#xD;&#xA;- Monsters are incredibly strong and even at low levels, are very difficult to beat&#xD;&#xA;&#xD;&#xA;I've also tried a strange situation of making enemies relative to players, i.e. an enemy will always be at 50% or 100% or 150% of player stats (thus requiring the player to use other techniques instead of brute strength to succeeed).&#xD;&#xA;&#xD;&#xA;But where's the balance, and how do you find it?" />
  <row Id="22577" PostHistoryTypeId="1" PostId="10695" RevisionGUID="ac5f9814-f0ff-4bb6-8c1d-8e0f6ce63c42" CreationDate="2011-04-06T02:02:25.477" UserId="1929" Text="Balancing Player vs. Monsters: Level-Up Curves" />
  <row Id="22578" PostHistoryTypeId="3" PostId="10695" RevisionGUID="ac5f9814-f0ff-4bb6-8c1d-8e0f6ce63c42" CreationDate="2011-04-06T02:02:25.477" UserId="1929" Text="&lt;rpg&gt;&lt;balance&gt;" />
  <row Id="22579" PostHistoryTypeId="25" PostId="10695" RevisionGUID="0fc35e36-6019-4a6e-bd81-ee32103dbd67" CreationDate="2011-04-06T03:09:02.293" Comment="http://twitter.com/#!/StackGameDev/status/55467018933108736" />
  <row Id="22580" PostHistoryTypeId="2" PostId="10696" RevisionGUID="cc46fda0-e75a-4aa5-85ff-a9f7d6f4a3af" CreationDate="2011-04-06T03:13:49.820" UserId="395" Text="The following two links show how this is implemented in Kingdom of Loathing (a web-based MMO). Each monster has a given level, and in general the monsters in a single area are all close to each other.&#xD;&#xA;&#xD;&#xA;http://kol.coldfront.net/thekolwiki/index.php/Monsters&#xD;&#xA;&#xD;&#xA;http://kol.coldfront.net/thekolwiki/index.php/Advancement" />
  <row Id="22581" PostHistoryTypeId="2" PostId="10697" RevisionGUID="91a8585c-4932-4808-a216-d4e8f2dd8bff" CreationDate="2011-04-06T04:33:26.917" UserId="2687" Text="The absolute best balance is to combine the two standard methods used in most games for determining monster strength. That is essentially a level range is selected for perhaps a region, or a monster type, and then the system attempts to auto balance using the relative strength of the player. &#xD;&#xA;&#xD;&#xA;The benefit to this is that it allows you or your designers in the future to retain some form of control over where the player should find the best rewards for the difficulty put in, while still not being as easily gamed by simple grinding, though obviously it should be mentioned that setting the possible level ranges should be refined through playtesting to find an appropriate range. &#xD;&#xA;&#xD;&#xA;The only other thing that is very important when using a system like this, that generates monster difficulty on the fly, is that you save those difficulty settings once they are generated. This is very important, or otherwise you end up with a situation like Bethesda ran into with Oblivion. That game used an almost entirely systematic approach to monster difficulty, and as a result a number of players expressed concerns that they did not feel like they were leveling up at all, since every time they visited a new area (or even returned to an old area previously explored in which they knew how difficult the monsters were when they were there the first time) they found that the encounters were of very similar if not identical difficulty.&#xD;&#xA;&#xD;&#xA;Finally the last thing to remember, there is no &quot;best balance&quot;. If you want to make your game incredibly difficult, then feel free to increase the average monster strength, if you want it to be easier smooth out the player leveling curve. The exact balance of your games difficulty is not nearly as important as it's consistency, nothing is more frustrating than a game with a difficulty curve that flies all over the landscape. " />
  <row Id="22582" PostHistoryTypeId="2" PostId="10698" RevisionGUID="9ff5018e-7384-496e-9d82-c64c93a7a0be" CreationDate="2011-04-06T05:15:49.823" UserId="5021" Text="Group monster difficulty by region. Allow the player to select the region.&#xD;&#xA;&#xD;&#xA;E.g.: Level 10-12 monsters go in zone A, level 12-15 monsters go in zone B, level 15-18 monsters go in zone C.&#xD;&#xA;The player is level 11. Lock zone C away from the player.&#xD;&#xA;If the player tries zone B and it is too difficult, allow the player to leave zone B and try zone A instead.&#xD;&#xA;&#xD;&#xA;Player strength and player skill both affect how difficult the monsters are for the player to kill. By allowing the player to implicitly choose which monsters to fight, you take both into account.&#xD;&#xA;&#xD;&#xA;If your game is linear (the player cannot choose a path or physical region), then spawn weaker monsters up to some lower bound if the player is killing the monsters more slowly than you expect." />
  <row Id="22583" PostHistoryTypeId="2" PostId="10699" RevisionGUID="35f9eef4-8d56-45af-a672-6f52ff8cfb41" CreationDate="2011-04-06T05:19:27.823" UserId="5021" Text="I am able to play a video in windows in my project, but the same code fails on the XBOX at the `_player.Play(_logo)` line. The error message is:&#xD;&#xA;&#xD;&#xA;&quot;An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll&quot;&#xD;&#xA;&#xD;&#xA;Relevant code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public LogoScreen()&#xD;&#xA;        {&#xD;&#xA;            TransitionOnTime = TimeSpan.Zero;&#xD;&#xA;            TransitionOffTime = TimeSpan.Zero;&#xD;&#xA;&#xD;&#xA;            _content = new ContentManager(Game3.Instance.Services, &quot;Content&quot;);&#xD;&#xA;&#xD;&#xA;            _player = new VideoPlayer();&#xD;&#xA;            _player.IsLooped = false;&#xD;&#xA;&#xD;&#xA;            _sb = new SpriteBatch(Game3.GDM.GraphicsDevice);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            _logo = _content.Load&lt;Video&gt;(&quot;Video/intro_logo&quot;);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private bool _started = false;&#xD;&#xA;        public override void Update(bool otherScreenHasFocus, &#xD;&#xA;            bool coveredByOtherScreen, bool coveredByPopup)&#xD;&#xA;        {&#xD;&#xA;            if(_started == false)&#xD;&#xA;            {&#xD;&#xA;                _player.Play(_logo);&#xD;&#xA;                _started = true;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (_player.State == MediaState.Stopped)&#xD;&#xA;            {&#xD;&#xA;                Exit();&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the random test video that I'm using:&#xD;&#xA;http://olhovsky.com/xna/intro_logo.wmv&#xD;&#xA;&#xD;&#xA;Any ideas why this might be failing?&#xD;&#xA;" />
  <row Id="22584" PostHistoryTypeId="1" PostId="10699" RevisionGUID="35f9eef4-8d56-45af-a672-6f52ff8cfb41" CreationDate="2011-04-06T05:19:27.823" UserId="5021" Text="XNA Video Playback on XBOX &quot;Invalid operation exception&quot;." />
  <row Id="22585" PostHistoryTypeId="3" PostId="10699" RevisionGUID="35f9eef4-8d56-45af-a672-6f52ff8cfb41" CreationDate="2011-04-06T05:19:27.823" UserId="5021" Text="&lt;xbox360&gt;&lt;xna-4.0&gt;&lt;xna-video-playback&gt;" />
  <row Id="22586" PostHistoryTypeId="25" PostId="10699" RevisionGUID="25dfe033-3582-4597-a560-41a1b1e82f71" CreationDate="2011-04-06T06:09:02.957" Comment="http://twitter.com/#!/StackGameDev/status/55512319198892032" />
  <row Id="22587" PostHistoryTypeId="2" PostId="10700" RevisionGUID="a452d24e-489d-4b6c-94f0-f2544dd514cb" CreationDate="2011-04-06T07:15:49.847" UserId="5810" Text="Building wise you'll have more luck with sketchup and Google warehouse library&#xD;&#xA;&#xD;&#xA;And if you don't have a never version I doubt you can animate any of them(since those models generally have no animation)&#xD;&#xA;&#xD;&#xA;You will have better luck using Blender and scouring the web for free stuff,but you will have allot of import problems, if you have some basic topology skills and texture as well as animation you might manage with free stuff,but then you have the trouble of license&#xD;&#xA;&#xD;&#xA;I don't see it as feasible,you will probably have more luck with paid packs but not by much" />
  <row Id="22588" PostHistoryTypeId="2" PostId="10701" RevisionGUID="ef9f6ec8-5032-4d5d-bca2-552e5fe99d89" CreationDate="2011-04-06T07:22:02.817" UserId="2710" Text="Playtest. No, really, just playtest your balance until you get it right, or rather mostly right (there's no such thing as perfect balance).&#xD;&#xA;&#xD;&#xA;Write automated tests and run them hundreds of times. Even very simple automated tests, like &quot;level 2 player always hits with shortsword, goblin always hits with club, player should win&quot; can really help, if you run these tests often (generally, whenever you change anything). &#xD;&#xA;Also, test balance by playing. Whenever you find some new potentially balance-changing tactic, write an automated test for it." />
  <row Id="22589" PostHistoryTypeId="25" PostId="10672" RevisionGUID="290ba8ab-81df-43cd-a627-b6c9b3b7d82d" CreationDate="2011-04-06T09:09:02.590" Comment="http://twitter.com/#!/StackGameDev/status/55557616662876160" />
  <row Id="22590" PostHistoryTypeId="2" PostId="10702" RevisionGUID="62e7a37d-9f03-424b-b5a0-854c410fc573" CreationDate="2011-04-06T10:31:49.600" UserId="3686" Text="You could check how it's done in [Hedgewars][1] - it's opensource Worms clone.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hedgewars.org/" />
  <row Id="22591" PostHistoryTypeId="2" PostId="10703" RevisionGUID="a40cd275-79cb-4702-865c-9e21ca488b13" CreationDate="2011-04-06T11:05:40.550" UserId="5275" Text="I'm trying to creating a field of view for the camera I'm making for a game. it rotates around a circle for 180 degrees while the head moves accordingly.I'm going to bound the field of view within a Isosceles triangle using the method described on this website &#xD;&#xA;&#xD;&#xA;http://www.mathopenref.com/coordtriangleareabox.html&#xD;&#xA;&#xD;&#xA;The problem I'm having is that I don't know how I'm going to detect if the field of view has intersected with the character as seen in the other link &#xD;&#xA;&#xD;&#xA;http://www.robotfootgames.com/xna-tutorials/5-xna-platformer-starter-kit-field-of-view-for-enemies&#xD;&#xA;&#xD;&#xA;any help with this would be greatly appreciated." />
  <row Id="22592" PostHistoryTypeId="1" PostId="10703" RevisionGUID="a40cd275-79cb-4702-865c-9e21ca488b13" CreationDate="2011-04-06T11:05:40.550" UserId="5275" Text="Bounding and Intersectiing Triangle XNA" />
  <row Id="22593" PostHistoryTypeId="3" PostId="10703" RevisionGUID="a40cd275-79cb-4702-865c-9e21ca488b13" CreationDate="2011-04-06T11:05:40.550" UserId="5275" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="22594" PostHistoryTypeId="2" PostId="10704" RevisionGUID="bc8959da-1f1c-4137-a8be-74ba4e72512d" CreationDate="2011-04-06T12:06:15.647" UserId="4997" Text="Your percentage idea looks great to me, let your player choose if 40% or 180%. This way more people will like your game, casual player and pro, everyone will find his 'ideal' difficulty.  &#xD;&#xA;Of course, score, bonuses and other difficulty related values should be based on this percentage." />
  <row Id="22595" PostHistoryTypeId="25" PostId="10703" RevisionGUID="44bd5b30-3485-4b67-8be8-689671e743cc" CreationDate="2011-04-06T12:09:02.570" Comment="http://twitter.com/#!/StackGameDev/status/55602915561324544" />
  <row Id="22596" PostHistoryTypeId="2" PostId="10705" RevisionGUID="ae27b035-fb6e-4c0c-9cdf-0845a7fbb02f" CreationDate="2011-04-06T12:40:03.953" UserId="1386" Text="One problem with making enemies strength relative to players is that it can make the player feel like they aren't making progress.&#xD;&#xA;*&quot;What's the point of getting stronger if all the monsters also get stronger at the same rate?&quot;*&#xD;&#xA;&#xD;&#xA;I tend to prefer that enemies have static strength instead of being relative to the player for the following reasons:&#xD;&#xA;&#xD;&#xA; - Players will notice the effect of&#xD;&#xA;   getting stronger (and believe they&#xD;&#xA;   have progressed).&#xD;&#xA; - Players will be&#xD;&#xA;   defeated by strong monsters, and this&#xD;&#xA;   will give them something to aspire to&#xD;&#xA;   and achieve.&#xD;&#xA;&#xD;&#xA;Of course there are negatives also:&#xD;&#xA;&#xD;&#xA; - Areas containing weak monsters can become redundant&#xD;&#xA; - Some players may find that the time they need to&#xD;&#xA;   invest to beat a particular monster&#xD;&#xA;   is too long&#xD;&#xA;&#xD;&#xA;&gt; Player levels up really fast and blows&#xD;&#xA;&gt; away monsters without much effort&#xD;&#xA;&#xD;&#xA;You can prevent this by decreasing the exp received from a monster the higher the players level is over the monsters level - in essence removing the motivation that player has to fight easily blown away monsters.&#xD;&#xA;&#xD;&#xA;&gt; Monsters are incredibly strong and&#xD;&#xA;&gt; even at low levels, are very difficult&#xD;&#xA;&gt; to beat&#xD;&#xA;&#xD;&#xA;This should never happen due to play-testing.&#xD;&#xA;&#xD;&#xA;See also: http://gamedev.stackexchange.com/questions/8965/how-to-implement-an-experience-system/8969#8969" />
  <row Id="22597" PostHistoryTypeId="2" PostId="10706" RevisionGUID="4a8c94db-fcae-4283-b162-415ea05baed4" CreationDate="2011-04-06T13:19:38.050" UserId="6556" Text="I'm looking for a good resource to start learning 3d modeling. I'm looking for something that starts with the basics (e.g. terminology; what are *quads*, *triangles* etc.) before/while going into the actual modeling. Book, website, video,  anything will do. I'm only concerned with the quality of the tutorials, how thorough they are. I have experience with texturing, level design and so on - but I've never created anything more than simple shapes/editing existing assets." />
  <row Id="22598" PostHistoryTypeId="1" PostId="10706" RevisionGUID="4a8c94db-fcae-4283-b162-415ea05baed4" CreationDate="2011-04-06T13:19:38.050" UserId="6556" Text="Where to start? (3D Modeling)" />
  <row Id="22599" PostHistoryTypeId="3" PostId="10706" RevisionGUID="4a8c94db-fcae-4283-b162-415ea05baed4" CreationDate="2011-04-06T13:19:38.050" UserId="6556" Text="&lt;3d&gt;" />
  <row Id="22600" PostHistoryTypeId="2" PostId="10707" RevisionGUID="43e86413-db24-4b82-9e8a-e71905bc8bb9" CreationDate="2011-04-06T13:32:48.447" UserId="953" Text="To a certain extent, you can use math to manage this process. This is the approach Wizards of the Coast used with D&amp;D 3.x and 4. Figure out how many battles you want between levels, and base how much XP battles give you based on that. Do you want it to be easy to level by fighting lower-level monsters? Then choose a flatter XP curve to make that a feasible strategy. On the other hand, you can discourage grinding by making lower-level monsters give much less XP than the player needs to level.&#xD;&#xA;&#xD;&#xA;If you've got random encounters, make sure to take into account the average frequency of battles. You don't want to force players to grind for hours to progress the main storyline. Conversely, if your encounters are all manually placed, make sure there are enough of them to level the PC(s) appropriately.&#xD;&#xA;&#xD;&#xA;I second the dislike of auto-leveling monsters to match the player level. You want to give the player a feeling of progress, which means they should always be able to see monsters too powerful for them and monsters too low-level to be challenging. As an aside, try and make it so that higher-level monsters have something special and advanced about them that goes beyond sheer statistical advantage. There's no difference between fighting a plain 100hp monster and a plain 1000hp monster if your attacks at the time do 10 damage and 100 damage respectively." />
  <row Id="22601" PostHistoryTypeId="5" PostId="10682" RevisionGUID="9659fa3f-e74b-415d-8026-78e04398d15d" CreationDate="2011-04-06T13:52:33.823" UserId="-1" Comment="Fixed grammar errors" Text="Are There good resources ( manuals, tutorials, etc ) to start studying the code of the Quake 3 engine beyond the code itself?&#xD;&#xA;&#xD;&#xA;I'm very interested in know how it's structured for educational purposes and maybe to do some modifications." />
  <row Id="22602" PostHistoryTypeId="24" PostId="10682" RevisionGUID="9659fa3f-e74b-415d-8026-78e04398d15d" CreationDate="2011-04-06T13:52:33.823" Comment="Proposed by 192.117.252.130|f9d731c7-5d4a-46f7-885d-dd476a248685 approved by -1 edit id of 238" />
  <row Id="22603" PostHistoryTypeId="5" PostId="10682" RevisionGUID="2c68d2ce-8383-491d-a2ce-0332c62b6a8d" CreationDate="2011-04-06T13:52:34.153" UserId="14" Comment="edited body" Text="Are there good resources ( manuals, tutorials, etc ) to start studying the code of the Quake 3 engine beyond the code itself?&#xD;&#xA;&#xD;&#xA;I'm very interested in know how it's structured for educational purposes and maybe to do some modifications." />
  <row Id="22604" PostHistoryTypeId="2" PostId="10708" RevisionGUID="7b1ca8da-94f2-4aae-8ead-f6bf3c0de4ef" CreationDate="2011-04-06T13:53:58.693" UserId="-1" Text="" />
  <row Id="22605" PostHistoryTypeId="2" PostId="10709" RevisionGUID="ce7c2750-8955-43e9-96ba-6352704b15ee" CreationDate="2011-04-06T13:53:58.693" UserId="-1" Text="" />
  <row Id="22606" PostHistoryTypeId="6" PostId="10695" RevisionGUID="8a1daf08-6a2c-4103-94be-3cad21fe1bbd" CreationDate="2011-04-06T13:54:18.567" UserId="1929" Comment="edited tags" Text="&lt;rpg&gt;&lt;balance&gt;&lt;roguelikes&gt;" />
  <row Id="22607" PostHistoryTypeId="5" PostId="10709" RevisionGUID="633dd859-b2f2-4424-b80a-c4a13ad51362" CreationDate="2011-04-06T14:19:57.670" UserId="6192" Comment="added 171 characters in body" Text="XNA Game Studio 4.0 is a programming environment that allows you to use Visual Studio to create games for Windows Phone, the Xbox 360 console, and Windows-based computers." />
  <row Id="22608" PostHistoryTypeId="24" PostId="10709" RevisionGUID="633dd859-b2f2-4424-b80a-c4a13ad51362" CreationDate="2011-04-06T14:19:57.670" Comment="Proposed by 6192 approved by 51 edit id of 240" />
  <row Id="22609" PostHistoryTypeId="5" PostId="10708" RevisionGUID="076fd575-fcfd-40e0-9802-ea23e5c2cd6e" CreationDate="2011-04-06T14:19:59.947" UserId="6192" Comment="added 500 characters in body" Text="XNA Game Studio 4.0 is a programming environment that allows you to use Visual Studio to create games for Windows Phone, the Xbox 360 console, and Windows-based computers. XNA Game Studio includes the XNA Framework, which is a set of managed libraries designed for game development based on Microsoft .NET Framework 2.0. This documentation collection contains technology overviews, tutorials, and reference material related to XNA Game Studio.&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb200104.aspx" />
  <row Id="22610" PostHistoryTypeId="24" PostId="10708" RevisionGUID="076fd575-fcfd-40e0-9802-ea23e5c2cd6e" CreationDate="2011-04-06T14:19:59.947" Comment="Proposed by 6192 approved by 51 edit id of 239" />
  <row Id="22611" PostHistoryTypeId="2" PostId="10710" RevisionGUID="d68b275c-ddd9-46ed-8729-0ab283aa039d" CreationDate="2011-04-06T14:20:49.690" UserId="4296" Text="Check out the [BoundingFrustrum.Contains()][1] function.  You give it the view and projection and it builds the frustrum.  If you're going 2d, then you can add bounding boxes to a custom sprite class - [example is here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-US/library/microsoft.xna.framework.boundingfrustum.contains%28v=XNAGameStudio.10%29.aspx&#xD;&#xA;  [2]: http://forums.create.msdn.com/forums/t/6089.aspx" />
  <row Id="22612" PostHistoryTypeId="2" PostId="10711" RevisionGUID="f594833f-df4d-4ac9-a0f8-c822873e8d28" CreationDate="2011-04-06T14:32:42.140" UserId="853" Text="I've been messing with Blender for over a year on and off and am ready to put a lot of sweat into making a great model for an iPhone app I'm working on. I wanting to learn tips and tricks on how to make great looking models and how to animate them well also. &#xD;&#xA;&#xD;&#xA;I know how to do key-frame animation, I just want to learn how to do it well. For instance, I have made a model that walks. Well, my walking animation is not the best and I want to improve it somehow. I want to learn how to move my model realistically. &#xD;&#xA;&#xD;&#xA;So does anyone have any resources that could help me with this? &#xD;&#xA;&#xD;&#xA;Thanks to all that respond." />
  <row Id="22613" PostHistoryTypeId="1" PostId="10711" RevisionGUID="f594833f-df4d-4ac9-a0f8-c822873e8d28" CreationDate="2011-04-06T14:32:42.140" UserId="853" Text="Blender Book for advanced character animation and modeling?" />
  <row Id="22614" PostHistoryTypeId="3" PostId="10711" RevisionGUID="f594833f-df4d-4ac9-a0f8-c822873e8d28" CreationDate="2011-04-06T14:32:42.140" UserId="853" Text="&lt;blender&gt;" />
  <row Id="22615" PostHistoryTypeId="25" PostId="10706" RevisionGUID="06057c32-1c8b-4833-9a6d-02fbe6e37775" CreationDate="2011-04-06T15:09:02.520" Comment="http://twitter.com/#!/StackGameDev/status/55648212752674817" />
  <row Id="22616" PostHistoryTypeId="2" PostId="10712" RevisionGUID="c3bf7f8a-39be-4e55-a3b1-74c9d31e8068" CreationDate="2011-04-06T15:27:14.813" UserId="2913" Text="I've been wondering about this as well, so I decided to check out some popular games and watch Firefox's plugin container memory consumption.&#xD;&#xA;&#xD;&#xA;Memory starts and defaults back to around 5-10MB on my setup. With that in mind, here are the peak memory usages in the first 3-5 minutes of gameplay for some popular games:&#xD;&#xA;&#xD;&#xA; - [The Company of Myself][1] - 35 MB&#xD;&#xA; - [Don't Touch my Gems][2] - 70 MB&#xD;&#xA; - [Epic War 4][3] - 100 MB&#xD;&#xA; - [Sidney Shark][6] - 100 MB&#xD;&#xA; - [Chibi Knight][4] - 140 MB&#xD;&#xA; - [Road of the Dead][5] - 150 MB&#xD;&#xA; - [Smeet][7] - 200 MB&#xD;&#xA;&#xD;&#xA;Notes:&#xD;&#xA;&#xD;&#xA;Smeet is a Facebook Social Game, it ran at around 100 MB, and peaked at 200 when I entered an area with lots of characters and assets. Chibi Knight has fairly simple assets, but an extremely large multi-screen background image (non-tiled), which explains it's high memory usage. The two lowest memory games are both non-scrolling and single-screen (at least in the first couple minutes), explaining their low usage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.newgrounds.com/portal/view/518729&#xD;&#xA;  [2]: http://www.kongregate.com/games/IriySoft/cursed-treasure-dont-touch-my-gems&#xD;&#xA;  [3]: http://www.newgrounds.com/portal/view/543006&#xD;&#xA;  [4]: http://www.newgrounds.com/portal/view/526470&#xD;&#xA;  [5]: http://www.newgrounds.com/portal/view/550714&#xD;&#xA;  [6]: http://www.newgrounds.com/portal/view/533302&#xD;&#xA;  [7]: http://apps.facebook.com/smeet-app/" />
  <row Id="22617" PostHistoryTypeId="5" PostId="10703" RevisionGUID="7eff64f6-334e-4470-b1da-5cefe3237f56" CreationDate="2011-04-06T15:28:41.990" UserId="1430" Comment="added 21 characters in body; edited title" Text="I'm trying to creating a field of view for the camera I'm making for a game. It rotates around a circle for 180 degrees while the head moves accordingly. I'm going to bound the field of view within an isosceles triangle using the method described on [this website][1].&#xD;&#xA;&#xD;&#xA;The problem I'm having is that I don't know how I'm going to detect if the field of view has intersected with the character as seen in [this link][2].&#xD;&#xA;&#xD;&#xA;Any help with this would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mathopenref.com/coordtriangleareabox.html&#xD;&#xA;  [2]: http://www.robotfootgames.com/xna-tutorials/5-xna-platformer-starter-kit-field-of-view-for-enemies" />
  <row Id="22618" PostHistoryTypeId="4" PostId="10703" RevisionGUID="7eff64f6-334e-4470-b1da-5cefe3237f56" CreationDate="2011-04-06T15:28:41.990" UserId="1430" Comment="added 21 characters in body; edited title" Text="Determining if a character is within the field of view in XNA" />
  <row Id="22619" PostHistoryTypeId="5" PostId="10703" RevisionGUID="acf760b9-d606-4069-8fbf-9618ead31c85" CreationDate="2011-04-06T15:34:06.793" UserId="5275" Comment="added 156 characters in body" Text="I'm trying to creating a field of view for the camera I'm making for a game. It rotates around a circle for 180 degrees while the head moves accordingly. I'm going to bound the field of view within an isosceles triangle using the method described on [this website][1].&#xD;&#xA;&#xD;&#xA;The problem I'm having is that I don't know how I'm going to detect if the field of view has intersected with the character as seen in [this link][2].&#xD;&#xA;&#xD;&#xA;Any help with this would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mathopenref.com/coordtriangleareabox.html&#xD;&#xA;  [2]: http://www.robotfootgames.com/xna-tutorials/5-xna-platformer-starter-kit-field-of-view-for-enemies&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[EDIT]&#xD;&#xA;&#xD;&#xA;sorry I meant an asset in game representing a camera much like the enemy in the second link, not an actual camera class in XNA(really sorry)" />
  <row Id="22620" PostHistoryTypeId="5" PostId="10710" RevisionGUID="ee3b92c6-d6f2-4390-a298-33247e272d01" CreationDate="2011-04-06T15:52:49.783" UserId="4296" Comment="Editing for OT's clarification; added 64 characters in body" Text="Check out the [BoundingFrustum.Contains()][1] function.  You give it the view and projection and it builds the frustum.  If you're going 2d, then you can add bounding boxes to a custom sprite class - [example is here][2].&#xD;&#xA;&#xD;&#xA;Edit: [Check here for two different techniques][3] for determining if a point is inside a triangle.&#xD;&#xA;&#xD;&#xA;I think the bounding frustum could still work, but might be a bit more work.  You can use the BoundingFrustum for things other than cameras.  Each NPC would have to have a local view and projection to get their frustum and you can use that to check against a Vector3 (just set Z = 0 for Vector2).  If you wanted to draw the frustum for debugging, you can get the points of the box and project them back to 2D just by setting the Z to 0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-US/library/microsoft.xna.framework.boundingfrustum.contains%28v=XNAGameStudio.10%29.aspx&#xD;&#xA;  [2]: http://forums.create.msdn.com/forums/t/6089.aspx&#xD;&#xA;  [3]: http://www.blackpawn.com/texts/pointinpoly/default.html" />
  <row Id="22621" PostHistoryTypeId="6" PostId="10634" RevisionGUID="f40c5b66-58ef-4681-b261-5d908e926e49" CreationDate="2011-04-06T16:04:08.643" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;unity&gt;&lt;free&gt;" />
  <row Id="22622" PostHistoryTypeId="2" PostId="10713" RevisionGUID="2a57e293-dff6-429a-a420-06f3b6334841" CreationDate="2011-04-06T16:08:35.020" UserId="5846" Text="I would differentiate between download size and memory size, some assets are large, other game related data structures bloat the client's memory but require little bandwidth to download.&#xD;&#xA;&#xD;&#xA;That was the strategy behind FLV, to compress the video code for download, and then decompress it assuming fast CPU and lots of memory in the client.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22623" PostHistoryTypeId="2" PostId="10714" RevisionGUID="792bb7d2-b0ce-485e-af2d-9375ecf08915" CreationDate="2011-04-06T16:19:26.463" UserId="1101" Text="Experience curve balance is a game design choice. Only you know the way you want your combat system to work, the amount of time you want someone to spend on one level, the number of combats you expect a player to take between levels, the proportion of battles a player is expected to win, the magnitude of the numbers you want to display to a player, whether you want the experience-per-level to go up each time or not, whether any or all of these factors should change over the course of play (and in which direction), etc. Choose the experience you want, then do the mathematics to work out how to get that." />
  <row Id="22624" PostHistoryTypeId="5" PostId="10695" RevisionGUID="8463d9d2-6c13-4cb1-9c9e-ad94082c505b" CreationDate="2011-04-06T16:46:24.730" UserId="1929" Comment="added 248 characters in body" Text="I've written a fair number of games that have RPG-like &quot;levelling up,&quot; where the player gains experience for killing monsters/enemies, and eventually, reaches a new level, where their stats increase.&#xD;&#xA;&#xD;&#xA;**How do you find a balance between player growth, monster strength, and difficulty?** The extreme ends of this spectrum are:&#xD;&#xA;&#xD;&#xA;- Player levels up really fast and blows away monsters without much effort&#xD;&#xA;- Monsters are incredibly strong and even at low levels, are very difficult to beat&#xD;&#xA;&#xD;&#xA;I've also tried a strange situation of making enemies relative to players, i.e. an enemy will always be at 50% or 100% or 150% of player stats (thus requiring the player to use other techniques instead of brute strength to succeeed).&#xD;&#xA;&#xD;&#xA;But where's the balance, and how do you find it?&#xD;&#xA;&#xD;&#xA;**Edit:** For example, I am expecting to hear things like:&#xD;&#xA;&#xD;&#xA;- Balance high instead of balance low (200 HP and 20 str is easier to balance than 20 HP and 2 str)&#xD;&#xA;- Look at easiest vs. hardest monsters, and see what you have in terms of a range" />
  <row Id="22625" PostHistoryTypeId="2" PostId="10715" RevisionGUID="ff8f4850-8aec-421e-ba67-46779494aeba" CreationDate="2011-04-06T16:54:47.180" UserId="6214" Text="I have a Map, a Tile, NPCs and the Player. When a player enters a tile in the map, a moveTo event is fired, which calls for any NPCs associated with that tile to be &quot;activated&quot;. Those NPCs may be antagonists, and wish to start a battle. The battle state (rounds, initiative, alive/dead, add and removing combatants) seems like it should all belong to the Tile, but that seems too tightly coupled... maybe it should belong to the Map? Thoughts on that?" />
  <row Id="22626" PostHistoryTypeId="1" PostId="10715" RevisionGUID="ff8f4850-8aec-421e-ba67-46779494aeba" CreationDate="2011-04-06T16:54:47.180" UserId="6214" Text="What should &quot;own&quot; the battle state in combat between the player and NPCs?" />
  <row Id="22627" PostHistoryTypeId="3" PostId="10715" RevisionGUID="ff8f4850-8aec-421e-ba67-46779494aeba" CreationDate="2011-04-06T16:54:47.180" UserId="6214" Text="&lt;game-mechanics&gt;&lt;rpg&gt;&lt;state&gt;&lt;npc&gt;" />
  <row Id="22628" PostHistoryTypeId="2" PostId="10716" RevisionGUID="d8edb097-c89d-473e-9ce8-9f527b4c925d" CreationDate="2011-04-06T17:11:06.183" UserId="6429" Text="Battles are entirely separate things from any of the objects you mentioned. Yes, they take place on a Tile (and, naturally, within the Map), and happen between NPCs and the Player, but none of these object is the Battle.&#xD;&#xA;&#xD;&#xA;I would suggest creating a new object, Battle, to maintain battle state. Hand it the participants and any terrain info it might need (e.g. maybe some NPCs/Players have bonuses on swamp Tiles, or maybe ranged attacks are penalized in forest Tiles), then encapsulate all your battle state logic within the Battle object.&#xD;&#xA;&#xD;&#xA;Another approach I've seen (but that I don't like as much; YMMV) is to make the battle a method within either the Player or NPC objects. Hand this object the opponents (if you always only have one Player in a fight, put this method in the Player object and hand it the antagonistic NPCs; this gets really tricky to figure out, though, if you can have multiple participants on _both_ sides), and then let it handle the battle state logic. This feels too tightly coupled to me, though, and personally I much prefer the battle logic living in its own Battle object. This also scales better if you add complexities like different tactics to your battle rules -- you can quickly find yourself maintaining a massive amount of code to represent your complex fights, and having that in its own separate object makes that a lot easier to manage." />
  <row Id="22629" PostHistoryTypeId="2" PostId="10717" RevisionGUID="9e69b425-f603-4763-b84f-25a3eca3f999" CreationDate="2011-04-06T17:24:23.540" UserId="6075" Text="Check out some of these [Blender tutorials](http://www.blendercookie.com/category/all/tutorials/animation/) by David Ward." />
  <row Id="22631" PostHistoryTypeId="5" PostId="10263" RevisionGUID="6db87da1-886f-4c4d-b3b9-35d16724b4bc" CreationDate="2011-04-06T18:50:02.353" UserId="4497" Comment="fixed grammar" Text="I don't know of any commercial MMOs off the top of my head, but the [NetGore][1] Engine, the successor to the powerful [vbGore][2] Engine, is looking pretty good. NetGore is currently in very active development with a growing community.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.netgore.com/&#xD;&#xA;  [2]: http://www.vbgore.com/Main_Page" />
  <row Id="22632" PostHistoryTypeId="2" PostId="10719" RevisionGUID="0bddf767-fb6a-4c09-8be1-95f3040ec96a" CreationDate="2011-04-06T18:51:03.570" UserId="5527" Text="Check out [Linear Algebra for Game Developers][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/&#xD;&#xA;&#xD;&#xA;See the section titled Do Product. It has a tutorial for the math to determine whether an object is in the field of view of another object. Should get you started." />
  <row Id="22633" PostHistoryTypeId="2" PostId="10720" RevisionGUID="8c2d1d02-04b6-42c5-bf2b-280c26b7e5a3" CreationDate="2011-04-06T19:34:49.797" UserId="1929" Text="I posted a similar question on the [Programmers SE site][1]. Please read it. I want to know **what specific things I can do to help me create games faster.**&#xD;&#xA;&#xD;&#xA;Already, in addition to whatever I wrote there, I am:&#xD;&#xA;&#xD;&#xA;- Creating reusable libraries on top of existing engines that I'm using&#xD;&#xA;- Creating reusable assets (graphics, sounds, icons)&#xD;&#xA;- Finding sites where I can find assets quickly (graphics, sounds, icons)&#xD;&#xA;- Using game engines instead of writing code from scratch&#xD;&#xA;- Using agile so my game is customer-focused and gets results&#xD;&#xA;- Biting off small games (like a vanilla rogue-like)&#xD;&#xA;&#xD;&#xA;I feel it's not enough; I'm taking far too long to make games. A simple chemistry puzzle game, for example, took nearly 40 hours -- and that's with only half-decent graphics.&#xD;&#xA;&#xD;&#xA;What are your recommendations? How can I get better and faster?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://programmers.stackexchange.com/q/65705/19993" />
  <row Id="22634" PostHistoryTypeId="1" PostId="10720" RevisionGUID="8c2d1d02-04b6-42c5-bf2b-280c26b7e5a3" CreationDate="2011-04-06T19:34:49.797" UserId="1929" Text="How to Make Games Faster (Without Sacrificing Quality)" />
  <row Id="22635" PostHistoryTypeId="3" PostId="10720" RevisionGUID="8c2d1d02-04b6-42c5-bf2b-280c26b7e5a3" CreationDate="2011-04-06T19:34:49.797" UserId="1929" Text="&lt;self-improvement&gt;" />
  <row Id="22639" PostHistoryTypeId="2" PostId="10722" RevisionGUID="ba9a7a6f-b997-4e3f-b965-4a22bfb277f7" CreationDate="2011-04-06T19:47:55.533" UserId="6558" Text="The answers in your other question mention typing faster.  Something else to consider is, are you spending most of your time actually coding, or thinking about a problem you need to solve?  If it's the latter, then one suggestion would be to practice problem solving.  If it's the former, then maybe you should look at your typing speed and see if you can improve anything there.&#xD;&#xA;&#xD;&#xA;One thing to point out is that it might be worth getting more practice.  Participate in a gamedev competition like Ludum Dare or the 7day roguelike event.  The more practice you have in making games, the easier it'll be to make the next one.&#xD;&#xA;&#xD;&#xA;Finally, games still take a lot of time, and good quality games take even longer.  Practice helps, but sometimes it just takes 40 hours to make a game." />
  <row Id="22640" PostHistoryTypeId="2" PostId="10723" RevisionGUID="43220549-e58a-46b6-90df-f218e87199a8" CreationDate="2011-04-06T19:57:00.600" UserId="370" Text="###Use constructive solid geometry&#xD;&#xA;I wrote a proof of concept that used [constructive solid geometry][1] to handle destructible terrain.  I used the GLU Tessellator to perform the boolean operations.  The [documentation][2] explains how, search for *&quot;CSG Uses for Winding Rules&quot;*.&#xD;&#xA;&#xD;&#xA;I fed the triangle output of the tessellator as static polygons into Box2D.  The PoC worked quiet well.  I was able to arbitrarily subtract and add terrain in real-time.  All the while the terrain behaved appropriately with Box2D.  The only real hiccup was that the GLU tessellator can produce degenerate triangles which Box2D doesn't like, so I had to filter those out by hand.&#xD;&#xA;&#xD;&#xA;The next step in the PoC (which I never got around to) was to use the [SCC][3] algorithm from the [boost graph][4] library to detect when a piece of the terrain had been severed (cut the top off a mountain).  The severed terrain would still be destructible but now represented by a dynamic(non-static) Box2D body with the triangles attached as shapes.  I had the design worked out but lost interest once I started digging into the boost documentation.  I really do plan to revisit the idea when I make a scorched earth/Worms game someday.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Constructive_solid_geometry&#xD;&#xA;  [2]: http://glprogramming.com/red/chapter11.html&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Strongly_connected_component&#xD;&#xA;  [4]: http://www.boost.org/doc/libs/1_46_1/libs/graph/doc/strong_components.html" />
  <row Id="22641" PostHistoryTypeId="6" PostId="10720" RevisionGUID="f625bb9b-07ec-41bd-b0a9-fc39e63243fd" CreationDate="2011-04-06T20:17:42.807" UserId="1156" Comment="edited tags" Text="&lt;productivity&gt;" />
  <row Id="22644" PostHistoryTypeId="16" PostId="10247" RevisionGUID="bf852345-3715-42fe-aeb0-55e8d273e8d9" CreationDate="2011-04-06T20:24:15.637" UserId="51" />
  <row Id="22645" PostHistoryTypeId="16" PostId="10255" RevisionGUID="566556cf-5a4c-41b3-b1c6-0583a315a4b6" CreationDate="2011-04-06T20:24:15.637" UserId="51" />
  <row Id="22646" PostHistoryTypeId="16" PostId="10263" RevisionGUID="d85ef334-d008-4240-9667-cb0b9c57ae78" CreationDate="2011-04-06T20:24:15.637" UserId="51" />
  <row Id="22647" PostHistoryTypeId="16" PostId="10271" RevisionGUID="e8583ebd-4edb-4097-b2e2-057f3b40334b" CreationDate="2011-04-06T20:24:15.637" UserId="51" />
  <row Id="22648" PostHistoryTypeId="16" PostId="10275" RevisionGUID="f0a347dc-bf2e-49fd-b8c3-a3eb6a68bc3a" CreationDate="2011-04-06T20:24:15.637" UserId="51" />
  <row Id="22649" PostHistoryTypeId="16" PostId="10292" RevisionGUID="9e71867e-0837-4c2f-9af0-35d57c531154" CreationDate="2011-04-06T20:24:15.637" UserId="51" />
  <row Id="22651" PostHistoryTypeId="5" PostId="10672" RevisionGUID="6878201e-c718-4451-9c54-c14a129c16b7" CreationDate="2011-04-06T20:36:59.347" UserId="1747" Comment="Hopefully this clears up my intentions" Text="**Achievements** are everywhere now &amp;mdash; Xbox Live, iOS Game Center, many individual games, and even in social communities with gaming elements like Stack Overflow.&#xD;&#xA;&#xD;&#xA;A [common user request](http://meta.stackoverflow.com/questions/3230/so-badge-progress-report) of Stack Overflow is to show progress toward badges.&#xD;&#xA;&#xD;&#xA;This has been denied by SO, as seen in [this uservoice request](http://stackoverflow.uservoice.com/pages/1722-general/suggestions/27562-badge-progress), where Jeff Atwood made the following statement:&#xD;&#xA;&#xD;&#xA;&gt; this is modelled on the xbox live achievements model, and that does not show progress, either.. by design&#xD;&#xA;&#xD;&#xA;Jeff defers to the design of Xbox Live when denying the request to show progress.  Certainly, SO is technically nothing like Xbox Live, so it can be inferred that this is a *design decision*, not a technical one.&#xD;&#xA;&#xD;&#xA;I am working on a game where we have achievements and right now the intention is to show progress.  So, I have two questions:&#xD;&#xA;&#xD;&#xA;1. If it's known that Xbox Live achievements &quot;by design&quot; do not show progress, is there a source for this?&#xD;&#xA;2. Why is this &quot;by design&quot;?  In other words, in terms of game design, what reason is there to intentionally *not* show achievement progress?&#xD;&#xA;" />
  <row Id="22652" PostHistoryTypeId="2" PostId="10725" RevisionGUID="026a920f-3310-40bf-a892-2964cf8d4df7" CreationDate="2011-04-06T21:06:08.557" UserId="2469" Text="I'm using shared resources to send textures from one D3D11 device to another, so that I can copy the back buffer over the second device and use the second device context to save that texture to a file. This seems to be working, but when I save the texture, it saves an empty PNG.&#xD;&#xA;I tried saving the texture with the primary device context and it works, except if I use the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX MiscFlag, which I need in order to share the resources.&#xD;&#xA;Is there any reason D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX prevents a texture from being saved ? Or am I maybe missing something out in order for it to work ?&#xD;&#xA;&#xD;&#xA;Here is the code I'm using:&#xD;&#xA;&#xD;&#xA;    D3D11_TEXTURE2D_DESC td;&#xD;&#xA;    backBuffer-&gt;GetDesc(&amp;td);&#xD;&#xA;    td.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;&#xD;&#xA;    this-&gt;_device-&gt;CreateTexture2D(&amp;td, 0, &amp;g_tex);&#xD;&#xA;    this-&gt;_context-&gt;CopyResource(g_tex, backBuffer);&#xD;&#xA;&#xD;&#xA;    // saves a blank image if using D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX&#xD;&#xA;    D3DX11SaveTextureToFile(this-&gt;_context, g_tex, D3DX11_IFF_JPG, &quot;test.jpg&quot;);&#xD;&#xA;               &#xD;&#xA;    g_tex-&gt;QueryInterface(__uuidof(IDXGIResource), reinterpret_cast&lt;void **&gt;(&amp;g_dxgiResource));&#xD;&#xA;    g_dxgiResource-&gt;GetSharedHandle(&amp;g_shaderHandle);&#xD;&#xA;    g_dxgiResource-&gt;Release();&#xD;&#xA;    g_tex-&gt;QueryInterface(__uuidof(IDXGIKeyedMutex), reinterpret_cast&lt;void **&gt;(&amp;g_dxgiMutex));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the code used to save the shared textue in the second device&#xD;&#xA;&#xD;&#xA;    ID3D11Texture2D *texture = 0;&#xD;&#xA;    IDXGIKeyedMutex *keyedMutex = 0;&#xD;&#xA;    device2-&gt;OpenSharedResource(g_shaderHandle, __uuidof(ID3D11Texture2D), reinterpret_cast&lt;void **&gt;(&amp;texture));&#xD;&#xA;    texture-&gt;QueryInterface(__uuidof(IDXGIKeyedMutex), reinterpret_cast&lt;void **&gt;(&amp;keyedMutex));&#xD;&#xA;    UINT acqKey = 0;&#xD;&#xA;    UINT relKey = 1;&#xD;&#xA;    DWORD timeout = 16;&#xD;&#xA;    DWORD res = keyedMutex-&gt;AcquireSync(acqKey, timeout);&#xD;&#xA;    if (res == WAIT_OBJECT_0 &amp;&amp; texture)&#xD;&#xA;    {&#xD;&#xA;        // saves a blank image too&#xD;&#xA;        D3DX10SaveTextureToFile(texture, D3DX10_IFF_JPG, &quot;test2.jpg&quot;);&#xD;&#xA;    }&#xD;&#xA;    keyedMutex-&gt;ReleaseSync(relKey);&#xD;&#xA;" />
  <row Id="22653" PostHistoryTypeId="1" PostId="10725" RevisionGUID="026a920f-3310-40bf-a892-2964cf8d4df7" CreationDate="2011-04-06T21:06:08.557" UserId="2469" Text="D3DX11SaveTextureToFile with shared resources" />
  <row Id="22654" PostHistoryTypeId="3" PostId="10725" RevisionGUID="026a920f-3310-40bf-a892-2964cf8d4df7" CreationDate="2011-04-06T21:06:08.557" UserId="2469" Text="&lt;c++&gt;&lt;directx11&gt;" />
  <row Id="22655" PostHistoryTypeId="25" PostId="10715" RevisionGUID="3a76200f-d618-41ca-ad54-0f3b60b54e16" CreationDate="2011-04-06T21:09:02.320" Comment="http://twitter.com/#!/StackGameDev/status/55738809903611904" />
  <row Id="22656" PostHistoryTypeId="2" PostId="10726" RevisionGUID="3c629880-4229-4710-a02e-8e5d71f269d6" CreationDate="2011-04-06T21:28:16.820" UserId="6561" Text="[Torque-2d][1] by GarageGames is a great game engine with a great community, some really impressive add-ons, and built-in support for Windows, Mac, and Wii, and even the iOS (on separate license). It costs $99.&#xD;&#xA;&#xD;&#xA;Another great high quality game engine with a relatively low barrier to entry is [Unity3d][3] (you can develop 2d games on it). Again, great community and really cool multi-platform support, including iOS and Android, in addition to Win/Mac, Wii, Xbox, Playstation, and the web.&#xD;&#xA;&#xD;&#xA;A great iPhone centric game engine is cocos2d for iOS.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com/products/torque-2d/&#xD;&#xA;  [3]: http://unity3d.com/unity/engine/" />
  <row Id="22657" PostHistoryTypeId="5" PostId="10725" RevisionGUID="ee4f3a39-f090-4d53-9bf5-67e56f76f7a5" CreationDate="2011-04-06T21:38:35.923" UserId="2469" Comment="added 116 characters in body" Text="I'm using shared resources to send textures from one D3D11 device to another, so that I can copy the back buffer over the second device and use the second device context to save that texture to a file. This seems to be working, but when I save the texture, it saves an empty PNG.&#xD;&#xA;I tried saving the texture with the primary device context and it works, except if I use the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX MiscFlag, which I need in order to share the resources.&#xD;&#xA;Is there any reason D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX prevents a texture from being saved ? Or am I maybe missing something out in order for it to work ?&#xD;&#xA;&#xD;&#xA;Here is the code I'm using:&#xD;&#xA;&#xD;&#xA;    D3D11_TEXTURE2D_DESC td;&#xD;&#xA;    backBuffer-&gt;GetDesc(&amp;td);&#xD;&#xA;    td.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;&#xD;&#xA;    this-&gt;_device-&gt;CreateTexture2D(&amp;td, 0, &amp;g_tex);&#xD;&#xA;    this-&gt;_context-&gt;CopyResource(g_tex, backBuffer);&#xD;&#xA;&#xD;&#xA;    // saves a blank image if using D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX&#xD;&#xA;    D3DX11SaveTextureToFile(this-&gt;_context, g_tex, D3DX11_IFF_JPG, &quot;test.jpg&quot;);&#xD;&#xA;               &#xD;&#xA;    g_tex-&gt;QueryInterface(__uuidof(IDXGIResource), reinterpret_cast&lt;void **&gt;(&amp;g_dxgiResource));&#xD;&#xA;    g_dxgiResource-&gt;GetSharedHandle(&amp;g_shaderHandle);&#xD;&#xA;    g_dxgiResource-&gt;Release();&#xD;&#xA;    g_tex-&gt;QueryInterface(__uuidof(IDXGIKeyedMutex), reinterpret_cast&lt;void **&gt;(&amp;g_dxgiMutex));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the code used to save the shared textue in the second device&#xD;&#xA;&#xD;&#xA;    ID3D11Texture2D *texture = 0;&#xD;&#xA;    IDXGIKeyedMutex *keyedMutex = 0;&#xD;&#xA;    device2-&gt;OpenSharedResource(g_shaderHandle, __uuidof(ID3D11Texture2D), reinterpret_cast&lt;void **&gt;(&amp;texture));&#xD;&#xA;    texture-&gt;QueryInterface(__uuidof(IDXGIKeyedMutex), reinterpret_cast&lt;void **&gt;(&amp;keyedMutex));&#xD;&#xA;    UINT acqKey = 0;&#xD;&#xA;    UINT relKey = 1;&#xD;&#xA;    DWORD timeout = 16;&#xD;&#xA;    DWORD res = keyedMutex-&gt;AcquireSync(acqKey, timeout);&#xD;&#xA;    if (res == WAIT_OBJECT_0 &amp;&amp; texture)&#xD;&#xA;    {&#xD;&#xA;        // saves a blank image too&#xD;&#xA;        D3DX10SaveTextureToFile(texture, D3DX10_IFF_JPG, &quot;test2.jpg&quot;);&#xD;&#xA;    }&#xD;&#xA;    keyedMutex-&gt;ReleaseSync(relKey);&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Also, the code that is supposed to save the shared texture to the filesystem is running in it's own thread." />
  <row Id="22658" PostHistoryTypeId="2" PostId="10727" RevisionGUID="a8e64cf4-dd6a-442c-bc54-a54e8dcac950" CreationDate="2011-04-06T23:59:29.500" UserId="6562" Text="I am using OpenGL ES 2.0&#xD;&#xA;I have a bunch a quads to be drawn, would love to be able to have to pass only 4 vertices per quad as if I were using GL_QUADS, but basically I just want to know the best way of drawing a bunch of separate quads.&#xD;&#xA;&#xD;&#xA;So far what I've found I could do:&#xD;&#xA;-GL_TRIANGLES(6 vertices per quad)&#xD;&#xA;-Degenerate GL_TRIANGLE_STRIP(6 vertices per quad)&#xD;&#xA;&#xD;&#xA;Possibities I've found:&#xD;&#xA;-GL_TRIANGLE_STRIPS with a special index value that resets quad strip(this would mean 5 indexes per quad, but I dont think this is possible is OpenGL ES 2.0)" />
  <row Id="22659" PostHistoryTypeId="1" PostId="10727" RevisionGUID="a8e64cf4-dd6a-442c-bc54-a54e8dcac950" CreationDate="2011-04-06T23:59:29.500" UserId="6562" Text="Fastest way to draw quads in OpenGL ES?" />
  <row Id="22660" PostHistoryTypeId="3" PostId="10727" RevisionGUID="a8e64cf4-dd6a-442c-bc54-a54e8dcac950" CreationDate="2011-04-06T23:59:29.500" UserId="6562" Text="&lt;opengl&gt;&lt;3d&gt;&lt;iphone&gt;&lt;android&gt;&lt;shaders&gt;" />
  <row Id="22661" PostHistoryTypeId="2" PostId="10728" RevisionGUID="a94afde9-9043-4f4d-af80-92150bf7fc88" CreationDate="2011-04-07T00:01:48.033" UserId="6381" Text="I am working on a hobby game that is played in the browser (not flash). It is a sort of civilization simulator. It is a pretty substantial sized game that I hope one day has many players.&#xD;&#xA;&#xD;&#xA;My question is what should my game have before I allow the public to play. I have several thoughts and would appreciate suggestions as well as other thoughts.&#xD;&#xA;&#xD;&#xA;1. Limit the game to colleagues and friends to test until I effectively finish the game. &#xD;&#xA;&#xD;&#xA;2. I open the game up to the public shortly after basic enjoyable functionality is done. I would then release weekly or biweekly updates with new functionality and bug fixes. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So the root question is, is it better to release to the world after everything is &quot;done&quot; (potentially years) or after it is &quot;playable&quot;, but lacking?" />
  <row Id="22662" PostHistoryTypeId="1" PostId="10728" RevisionGUID="a94afde9-9043-4f4d-af80-92150bf7fc88" CreationDate="2011-04-07T00:01:48.033" UserId="6381" Text="What criteria should I have met before releasing a game?" />
  <row Id="22663" PostHistoryTypeId="3" PostId="10728" RevisionGUID="a94afde9-9043-4f4d-af80-92150bf7fc88" CreationDate="2011-04-07T00:01:48.033" UserId="6381" Text="&lt;browser-based-games&gt;&lt;release&gt;" />
  <row Id="22664" PostHistoryTypeId="25" PostId="10725" RevisionGUID="391a6e34-c1e1-4c9b-ae4d-4beb8c80ccfd" CreationDate="2011-04-07T00:09:02.563" Comment="http://twitter.com/#!/StackGameDev/status/55784108391022592" />
  <row Id="22665" PostHistoryTypeId="2" PostId="10729" RevisionGUID="3aa2970a-2069-45bc-bfb0-9fcdf4e18e65" CreationDate="2011-04-07T00:58:57.787" UserId="1929" Text="I strongly advocate Agile for gaming. It's the best. Based on that, I would say release **now**, and keep continuously improving it. (But the down-side is that people may get upset if you need to do things like resetting points/experience.)&#xD;&#xA;&#xD;&#xA;In agile, work is broken down into small pieces that make sense if the game was released right away. So make sure you do it right.&#xD;&#xA;&#xD;&#xA;This also gives you crucial early feedback, which may surprise you and provoke you to completely change the direction of your game -- for the better. You won't know until players get their hands on it, though." />
  <row Id="22666" PostHistoryTypeId="2" PostId="10730" RevisionGUID="da993f93-cdc4-423f-8422-9376fbc93334" CreationDate="2011-04-07T01:03:25.260" UserId="6543" Text="Posting an answer in case anyone comes searching for this topic.&#xD;&#xA;&#xD;&#xA;Since this is on Android, I believe the assumption is that CPU is scarce, and so the collision algorithms need to be cheap. Based on that assumption, we will construct a system and then discuss optimizations:&#xD;&#xA;&#xD;&#xA;1) [Offline] Simplify the 3D models into a collision mesh. This is a very typical procedure in any 3D game, and is done in the Content Creation Pipeline.&#xD;&#xA;&#xD;&#xA;2) [Offline] Calculate a bounding sphere for every 3D collision mesh.&#xD;&#xA;&#xD;&#xA;3) [Run-time] Project the 3D bounding sphere of each object to a 2D bounding circle.&#xD;&#xA;&#xD;&#xA;4) [Run-time] Do cheap, simple circle-circle collision checks.&#xD;&#xA;&#xD;&#xA;5) [Conditional Run-time] If a circle-circle collision occurs, project the full 3D collision meshes for both objects into 2D. This is trivial if you know your Linear Algebra.&#xD;&#xA;&#xD;&#xA;6) [Conditional Run-time] Now do 2D triangle mesh intersection tests. If this returns True, you have a 2D collision.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Steps 1 and 2 are cheap, because you do them offline or at startup.&#xD;&#xA;&#xD;&#xA;Step 3 is fairly cheap. For extra speed, only re-project a sphere if its projected size will change. This depends on your Projection matrix. In a top-down view, for example, this will only occur if the camera changes height, the objects change height, or the camera zooms in/out.&#xD;&#xA;&#xD;&#xA;Step 4 is dirt cheap. Calculate the distance between the objects:&#xD;&#xA;&#xD;&#xA;    float total_radius = a.bounding_radius + b.bounding_radius;&#xD;&#xA;    if(DotProduct(a.2D_position - b.2D_position) &lt; total_radius*total_radius)&#xD;&#xA;        // Possible Intersection Detected!&#xD;&#xA;&#xD;&#xA;Step 5 may be expensive, depending on your collision mesh complexity, matrix library speed, and the Android device. Luckily its hidden behind the circle-circle test.&#xD;&#xA;Step 5 can be optimized by caching the 3D projections. So, after you've projected a 3D model into 2D triangles, store that in the object's data. Only re-do that projection if the object has rotated, or moved closer/further to the camera.&#xD;&#xA;Also, don't forget back-face culling!&#xD;&#xA;&#xD;&#xA;Step 6 is, again, expensive, but hidden behind the circle-circle test. At the cost of intersection quality, you can simplify the triangle-triangle intersection test to ignore triangle-within-triangle tests. This depends on your game, but I think most games would be fine without that test.&#xD;&#xA;&#xD;&#xA;Both step 5 and step 6 can be optimized by sacrificing collision quality with respect to time. While the game may be rendering at 30 or 60fps, you can perform collision checks at 10fps, or at a rate adjustable based on current rendering performance.&#xD;&#xA;&#xD;&#xA;Other optimizations depend entirely on your specific game. Collision meshes can be made quite simple, and thanks to back-face culling your final mesh-mesh collision check shouldn't be too complex. You can even do bounding circle-circle intersection tests on the triangles to cull them further (i.e., if a triangle isn't inside the other object's bounding circle, don't test it).&#xD;&#xA;&#xD;&#xA;The FPS optimization suggested above can be taken half-way. You can re-project 2D meshes at 10FPS, but do the mesh-mesh intersections at a full 30fps." />
  <row Id="22667" PostHistoryTypeId="2" PostId="10731" RevisionGUID="5d2a610f-213b-42b1-897a-c021352068a5" CreationDate="2011-04-07T01:09:12.650" UserId="1929" Text="Prompted by this question about [becoming a faster programmer][1], I'm curious to know if anyone has made a significant-sized 2D game in SmallTalk or Squeak.&#xD;&#xA;&#xD;&#xA;And if so, how does it compare to C#? I'm using C# with FlatRedBall for my graphics/physics stuff, and I find it pretty easy to make whatever I want to make. Also, how is Squeak/SmallTalk as far as automated testing? &#xD;&#xA;&#xD;&#xA;It's not clear from the Squeak site how the games work; are they download-and-play? I prefer in-browser (via a plugin, like Flash/Silverlight).&#xD;&#xA;&#xD;&#xA;  [1]: http://programmers.stackexchange.com/questions/65705/how-to-code-faster-without-sacrificing-quality/65761#65761" />
  <row Id="22668" PostHistoryTypeId="1" PostId="10731" RevisionGUID="5d2a610f-213b-42b1-897a-c021352068a5" CreationDate="2011-04-07T01:09:12.650" UserId="1929" Text="Significant 2D SmallTalk/Squeak Game? Smalltalk/Squeak vs. C#" />
  <row Id="22669" PostHistoryTypeId="3" PostId="10731" RevisionGUID="5d2a610f-213b-42b1-897a-c021352068a5" CreationDate="2011-04-07T01:09:12.650" UserId="1929" Text="&lt;language-choice&gt;&lt;smalltalk&gt;" />
  <row Id="22670" PostHistoryTypeId="2" PostId="10732" RevisionGUID="73011ab3-b4a5-4015-a9d4-6c4b03cbc292" CreationDate="2011-04-07T01:18:34.983" UserId="6178" Text="I don't know what I'm doing wrong but I'm having a big a problem with GL_TEXTURE_MIN_FILTER when loading textures for my scene.&#xD;&#xA;&#xD;&#xA;I'm doing a skybox, but that's irrelevant because the problem exists even if I just load the textures and don't do anything with them. Meaning, the code to draw the skybox and attach the textures to the box quads is disabled.&#xD;&#xA;&#xD;&#xA;My current code to load textures is the following:&#xD;&#xA;&#xD;&#xA;    typedef struct sGameTextures {&#xD;&#xA;    	unsigned int skybox[6];&#xD;&#xA;    } GameTextures;&#xD;&#xA;    &#xD;&#xA;    GameTextures gameTextures;&#xD;&#xA;    &#xD;&#xA;    unsigned int loadImageTexture(const char *filepath, int glFormat, int pWrap, int pFilter) {&#xD;&#xA;    	int texDimension, texWidth, texHeight, texPixelSize;&#xD;&#xA;    	unsigned int texID, texImage;&#xD;&#xA;    	unsigned char *texPixels;&#xD;&#xA;    	unsigned int ilFormat;&#xD;&#xA;    &#xD;&#xA;    	switch(glFormat) {&#xD;&#xA;    		case GL_LUMINANCE:&#xD;&#xA;    			ilFormat = IL_LUMINANCE;&#xD;&#xA;    			break;&#xD;&#xA;    		case GL_RGB:&#xD;&#xA;    			ilFormat = IL_RGB;&#xD;&#xA;    			break;&#xD;&#xA;    		case GL_RGBA:&#xD;&#xA;    			ilFormat = IL_RGBA;&#xD;&#xA;    			break;&#xD;&#xA;    		default:&#xD;&#xA;    			return -1;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	ilGenImages(1, &amp;texImage);&#xD;&#xA;    	ilBindImage(texImage);&#xD;&#xA;    &#xD;&#xA;    	if(!ilLoadImage((ILstring)filepath)) {&#xD;&#xA;    		ilDeleteImages(1, &amp;texImage);&#xD;&#xA;    		return -1;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	texWidth = ilGetInteger(IL_IMAGE_HEIGHT);&#xD;&#xA;    	texHeight = ilGetInteger(IL_IMAGE_WIDTH);&#xD;&#xA;    	texPixelSize = ilGetInteger(IL_IMAGE_BPP);&#xD;&#xA;    &#xD;&#xA;    	// stop if image width or height is not power of 2&#xD;&#xA;    	if(!texWidth &amp; (texWidth - 1) || !texHeight &amp; (texHeight -1)) {&#xD;&#xA;    		ilDeleteImages(1, &amp;texImage);&#xD;&#xA;    		return -1;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	texDimension = texWidth * texHeight * texPixelSize;&#xD;&#xA;    	texPixels = new unsigned char[texDimension];&#xD;&#xA;    &#xD;&#xA;    	ilCopyPixels(0, 0, 0, texWidth, texHeight, 1, ilFormat, IL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;    	ilDeleteImages(1, &amp;texImage);&#xD;&#xA;    &#xD;&#xA;    	if((texPixelSize * texWidth) % 4 == 0) {&#xD;&#xA;    		glPixelStorei(GL_UNPACK_ALIGNMENT, 4);&#xD;&#xA;    	} else {&#xD;&#xA;    		glPixelStorei(GL_UNPACK_ALIGNMENT, 1);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	glGenTextures(1, &amp;texID);&#xD;&#xA;    	glBindTexture(GL_TEXTURE_2D, texID);&#xD;&#xA;    &#xD;&#xA;    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, pWrap);&#xD;&#xA;    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, pWrap);&#xD;&#xA;    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, pFilter);&#xD;&#xA;    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, pFilter);&#xD;&#xA;    &#xD;&#xA;    	glTexImage2D(GL_TEXTURE_2D, 0, glFormat, texWidth, texHeight, 0, glFormat, GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;    &#xD;&#xA;    	return texID;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void loadGameTextures(void) {&#xD;&#xA;    	char *boxFace[] = { &quot;front&quot;, &quot;back&quot;, &quot;left&quot;, &quot;right&quot;, &quot;top&quot;, &quot;bottom&quot; };&#xD;&#xA;    	char boxTexture[FILENAME_MAX];&#xD;&#xA;    &#xD;&#xA;    	for(int i = 0; i &lt; 6; i++) {&#xD;&#xA;    		sprintf_s(boxTexture, &quot;Resources/Textures/Skybox/Set%d/%s.jpg&quot;, 1, boxFace[i]);&#xD;&#xA;    		gameTextures.skybox[i] = loadImageTexture(boxTexture, GL_RGB, GL_CLAMP, GL_LINEAR);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void main(int argc, char **argv) {&#xD;&#xA;    &#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	ilInit();&#xD;&#xA;    	ilEnable(IL_ORIGIN_SET);&#xD;&#xA;    	ilOriginFunc(IL_ORIGIN_LOWER_LEFT);&#xD;&#xA;&#xD;&#xA;    	loadGameTextures();&#xD;&#xA;    &#xD;&#xA;    	glEnable(GL_DEPTH_TEST);&#xD;&#xA;    	glEnable(GL_CULL_FACE);&#xD;&#xA;    	glEnable(GL_LIGHTING);&#xD;&#xA;    	glEnable(GL_LIGHT0);&#xD;&#xA;    	glEnable(GL_COLOR_MATERIAL);&#xD;&#xA;    	glEnable(GL_TEXTURE_2D);&#xD;&#xA;    &#xD;&#xA;    	glutMainLoop();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is how my scene looks like when I don't load any textures (ie: `loadGameTextures()` is never called): http://i.stack.imgur.com/1cCZp.png. Look how the floor is light green and now compare to the following which is much darker: http://i.stack.imgur.com/NYeqD.png.&#xD;&#xA;&#xD;&#xA;At first I pinpointed the problem to `glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, pFilter);` more exactly when `pFilter = GL_LINEAR`. When I commented this line, or replaced `pFilter` with `GL_LINEAR_MIPMAP_LINEAR` the floor was light green again. However, this was without using the textures, I was just loading them. When I tried to use them, it didn't work, it looked like this: http://i.stack.imgur.com/JRAFJ.png.&#xD;&#xA;&#xD;&#xA;The sky now looks white because that's the clear color I use when drawing the skybox quads. We only see white because the textures are not properly working. They are loaded but that option I selected for `GL_TEXTURE_MIN_FILTER`, helps on the darkening issue but doesn't display any textures.&#xD;&#xA;&#xD;&#xA;Another thing I noticed is that I'm enabling `GL_TEXTURE_2D` globally and if I only enable it when I need it (drawing the skybox) and disable it when finished, it will work. The scene won't be dark anymore. But the skybox is just an example, I'll be using textures all over the place and it's a pain to keep enabling/disabling `GL_TEXTURE_2D` every time I need to draw some texture. Surely there must be another way around this problem?" />
  <row Id="22671" PostHistoryTypeId="1" PostId="10732" RevisionGUID="73011ab3-b4a5-4015-a9d4-6c4b03cbc292" CreationDate="2011-04-07T01:18:34.983" UserId="6178" Text="Loading textures in OpenGL makes everything look darker" />
  <row Id="22672" PostHistoryTypeId="3" PostId="10732" RevisionGUID="73011ab3-b4a5-4015-a9d4-6c4b03cbc292" CreationDate="2011-04-07T01:18:34.983" UserId="6178" Text="&lt;opengl&gt;&lt;textures&gt;&lt;lighting&gt;" />
  <row Id="22673" PostHistoryTypeId="2" PostId="10733" RevisionGUID="06723eb9-b01f-492a-a9bc-ed5db08ac1bf" CreationDate="2011-04-07T01:21:06.167" UserId="6558" Text="Provided you've got enough of the game finished (core feature are done, no major glaring bugs, enough content to get a feel for the game), then I would suggest releasing it to the public in the &quot;playable but lacking&quot; state.  You'll be able to get feedback, and possibly find additional bugs from multiple users playing.  The feedback is the most important.  Not only does it help you with ideas on what to add to the game, it can help motivate you to keep working on the game.&#xD;&#xA;&#xD;&#xA;A something to keep in mind when you open the game up to the public: responding quickly to bug reports and having a level head when responding to criticism will help build a community for the game.  Good luck!" />
  <row Id="22674" PostHistoryTypeId="2" PostId="10734" RevisionGUID="2ae7401b-09c6-4c1a-9399-b739cf0550aa" CreationDate="2011-04-07T01:40:55.897" UserId="268" Text="I'm currently trying to understand how to use the GLFrame Class in the superbible book, and acording to the 4th edition of the book, the camera matrix derived from the Frame of reference class should work the same as GluLookAt&#xD;&#xA;&#xD;&#xA;When I add these lines&#xD;&#xA;&#xD;&#xA;    cameraFrame.SetForwardVector(-0.5f, 0.0f,-0.5f);&#xD;&#xA;    cameraFrame.Normalize();&#xD;&#xA;&#xD;&#xA;The camera looks in the correct direction, yaw at 45 Degrees (Am I doing that right!)&#xD;&#xA;&#xD;&#xA;However when I add this&#xD;&#xA;&#xD;&#xA;    cameraFrame.SetForwardVector(0.0f, 0.5f,-0.5f);&#xD;&#xA;&#xD;&#xA;The camera just looks as if it was set to (0.0f, 0.0f, 1.0f)&#xD;&#xA;&#xD;&#xA;Why is this! It's been driving me mad for three days. Maybe I'm not passing in the vectors correctly, but I'm not sure how to pass in x,y 360 degrees for the look at (forward) location/vector. Do the vectors have to be normalized before passing them in?&#xD;&#xA;&#xD;&#xA;Eventually I hope to do full mouse look (FPS style) , but for now just understanding why I can't make the camera simply pitch up would be a good start.&#xD;&#xA;&#xD;&#xA;Thansk!&#xD;&#xA;&#xD;&#xA;Here is the code in situ.&#xD;&#xA;&#xD;&#xA;    // Called to draw scene&#xD;&#xA;    void RenderScene(void)&#xD;&#xA;	{&#xD;&#xA;    // Color values&#xD;&#xA;    static GLfloat vFloorColor[] = { 0.0f, 1.0f, 0.0f, 1.0f};&#xD;&#xA;    static GLfloat vTorusColor[] = { 1.0f, 0.0f, 0.0f, 1.0f };&#xD;&#xA;    static GLfloat vSphereColor[] = { 0.0f, 0.0f, 1.0f, 1.0f };&#xD;&#xA;&#xD;&#xA;    // Time Based animation&#xD;&#xA;	static CStopWatch	rotTimer;&#xD;&#xA;	float yRot = rotTimer.GetElapsedSeconds() * 60.0f;&#xD;&#xA;	&#xD;&#xA;	// Clear the color and depth buffers&#xD;&#xA;	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    // Save the current modelview matrix (the identity matrix)&#xD;&#xA;	modelViewMatrix.PushMatrix();	&#xD;&#xA;    &#xD;&#xA;    M3DMatrix44f mCamera;&#xD;&#xA;&#xD;&#xA;    /////////&#xD;&#xA;    ///////// My Code&#xD;&#xA;&#xD;&#xA;	cameraFrame.SetForwardVector(-0.5f,-0.5f,-0.5f);&#xD;&#xA;	cameraFrame.Normalize();&#xD;&#xA;&#xD;&#xA;    ///////// End of my code&#xD;&#xA;    cameraFrame.GetCameraMatrix(mCamera);&#xD;&#xA;    modelViewMatrix.PushMatrix(mCamera);&#xD;&#xA;&#xD;&#xA;    // Transform the light position into eye coordinates&#xD;&#xA;    M3DVector4f vLightPos = { 0.0f, 10.0f, 5.0f, 1.0f };&#xD;&#xA;    M3DVector4f vLightEyePos;&#xD;&#xA;    m3dTransformVector4(vLightEyePos, vLightPos, mCamera);&#xD;&#xA;		&#xD;&#xA;	// Draw the ground&#xD;&#xA;	shaderManager.UseStockShader(GLT_SHADER_FLAT,&#xD;&#xA;								 transformPipeline.GetModelViewProjectionMatrix(),&#xD;&#xA;								 vFloorColor);	&#xD;&#xA;	floorBatch.Draw();&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; NUM_SPHERES; i++) {&#xD;&#xA;        modelViewMatrix.PushMatrix();&#xD;&#xA;        modelViewMatrix.MultMatrix(spheres[i]);&#xD;&#xA;        shaderManager.UseStockShader(GLT_SHADER_POINT_LIGHT_DIFF,     transformPipeline.GetModelViewMatrix(), &#xD;&#xA;                                transformPipeline.GetProjectionMatrix(), vLightEyePos, vSphereColor);&#xD;&#xA;        sphereBatch.Draw();&#xD;&#xA;        modelViewMatrix.PopMatrix();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    // Draw the spinning Torus&#xD;&#xA;    modelViewMatrix.Translate(0.0f, 0.0f, -2.5f);&#xD;&#xA;    &#xD;&#xA;    // Save the Translation&#xD;&#xA;    modelViewMatrix.PushMatrix();&#xD;&#xA;    &#xD;&#xA;        // Apply a rotation and draw the torus&#xD;&#xA;        modelViewMatrix.Rotate(yRot, 0.0f, 1.0f, 0.0f);&#xD;&#xA;        shaderManager.UseStockShader(GLT_SHADER_POINT_LIGHT_DIFF, transformPipeline.GetModelViewMatrix(), &#xD;&#xA;                                     transformPipeline.GetProjectionMatrix(), vLightEyePos, vTorusColor);&#xD;&#xA;        torusBatch.Draw();&#xD;&#xA;    modelViewMatrix.PopMatrix(); // &quot;Erase&quot; the Rotation from before&#xD;&#xA;&#xD;&#xA;    // Apply another rotation, followed by a translation, then draw the sphere&#xD;&#xA;    modelViewMatrix.Rotate(yRot * -2.0f, 0.0f, 1.0f, 0.0f);&#xD;&#xA;    modelViewMatrix.Translate(0.8f, 0.0f, 0.0f);&#xD;&#xA;    shaderManager.UseStockShader(GLT_SHADER_POINT_LIGHT_DIFF, transformPipeline.GetModelViewMatrix(), &#xD;&#xA;                                transformPipeline.GetProjectionMatrix(), vLightEyePos, vSphereColor);&#xD;&#xA;    sphereBatch.Draw();&#xD;&#xA;&#xD;&#xA;	// Restore the previous modleview matrix (the identity matrix)&#xD;&#xA;	modelViewMatrix.PopMatrix();&#xD;&#xA;    modelViewMatrix.PopMatrix();    &#xD;&#xA;    // Do the buffer Swap&#xD;&#xA;    glutSwapBuffers();&#xD;&#xA;        &#xD;&#xA;    // Tell GLUT to do it again&#xD;&#xA;    glutPostRedisplay();&#xD;&#xA;}" />
  <row Id="22675" PostHistoryTypeId="1" PostId="10734" RevisionGUID="2ae7401b-09c6-4c1a-9399-b739cf0550aa" CreationDate="2011-04-07T01:40:55.897" UserId="268" Text="Why doesn't the y Axis work with SuperBible frame reference or GluLookAt" />
  <row Id="22676" PostHistoryTypeId="3" PostId="10734" RevisionGUID="2ae7401b-09c6-4c1a-9399-b739cf0550aa" CreationDate="2011-04-07T01:40:55.897" UserId="268" Text="&lt;opengl&gt;&lt;3d&gt;&lt;camera&gt;&lt;matrix&gt;" />
  <row Id="22677" PostHistoryTypeId="2" PostId="10735" RevisionGUID="2056ac50-1104-41bd-b439-ca479d2af5de" CreationDate="2011-04-07T02:27:04.487" UserId="5540" Text="I was reading an article about this topic on a blog by somebody who has studied Jesse Schell. Their philosophy concerning game is identify the &quot;core mechanic&quot; or &quot;toy&quot; that is fun to do in the game, and build everything else around that. &#xD;&#xA;&#xD;&#xA;Take minecraft for example. The &quot;toy&quot; that is fun to do in the game is making blocks explode and putting new ones in their place. &#xD;&#xA;&#xD;&#xA;If your game has its core mechanic down and playable, and most importantly, it's FUN then release and iterate. If not, then don't release until it is FUN. &#xD;&#xA;&#xD;&#xA;Again, considering minecraft, it had the bare essentials of the fun &quot;toy&quot; built so Notch released it. It's since sold over 1.8 million copies at 10 euro (or more) each. It's still barely in beta and a significant number of copies were sold in ALPHA. But it was fun. &#xD;&#xA;&#xD;&#xA;Keep your eye on the ball. An unfun game is a game that will go nowhere no matter how many years of development you put into it. =)" />
  <row Id="22678" PostHistoryTypeId="2" PostId="10736" RevisionGUID="75836ab6-93f6-4c9a-8023-4ff529027ee3" CreationDate="2011-04-07T03:39:17.397" UserId="6567" Text="Squeak has a plugin. I'd be reluctant to use it for a game, although there is a ton of cool stuff done in Scratch (http://scratch.mit.edu/), which is built on Squeak. &#xD;&#xA;&#xD;&#xA;SUnit is as good as NUnit or JUnit. Some recent work has been done with Hudson/Jenkins with Pharo and Squeak (check the mailing list archives if you're interested).&#xD;&#xA;&#xD;&#xA;If you're happy with C# and your physics engine stick with that. Smalltalk is a bit of a niche and it can be frustrating if you're used to modern IDEs with code completion and whatnot. OTOH, it's pretty powerful when you consider that the entire environment is written in itself, and to make a change you can just tweak a method while everything is running, there's no need to &quot;build&quot;.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;Steve" />
  <row Id="22679" PostHistoryTypeId="2" PostId="10737" RevisionGUID="cb45c2e3-2a0d-4aaf-b7e2-712bb8f41887" CreationDate="2011-04-07T04:44:51.893" UserId="6570" Text="Take a look at OpenCobalt http://www.opencobalt.org for what can be done with squeak.   Cobalt is being ported to squeak 4.2 so that it can run on the Cog JIT VM which makes it MUCH faster than the older version running on squeak 3.8. There are things that can be done with Squeak + OpenGL that aren't being done with any other platform as far as I know because it is just too hard/slow to develop the code in a C/C++/C# based system.&#xD;&#xA;&#xD;&#xA;E.g. 3D portals, graphical control of objects through said 3D portals, programmatic control of multiple virtual worlds using external scripting, etc. All those are of course doable with any programming system, but squeak + Cobalt and the Teatime architecture make them easy to implement over a weekend rather than spending months to reinvent teatime using a different language.&#xD;&#xA;&#xD;&#xA;YMMV of course, depending on the specifics of what you want to accomplish.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22680" PostHistoryTypeId="25" PostId="10728" RevisionGUID="d0094b98-a6f9-4bca-9081-4f2f899168ca" CreationDate="2011-04-07T06:09:02.287" Comment="http://twitter.com/#!/StackGameDev/status/55874705189634048" />
  <row Id="22681" PostHistoryTypeId="2" PostId="10738" RevisionGUID="95d7940a-cefd-4251-93b2-b66f600ecc66" CreationDate="2011-04-07T06:25:17.217" UserId="3051" Text="I'm working on a game in which the player runs around a level themed as a pinball machine.  There are flippers that react to the presence of pinballs by flipping (as one would expect pinball flippers to do).  The problem that I'm having is that if the player is in the path of the flipper as it rotates, the player is instantly killed.  The desired behavior is that the player is damaged and pushed away from the moving flipper.&#xD;&#xA;&#xD;&#xA;I've tried all sorts of things to make this stop happening.  Currently, in the flipper, I have the following code to handle the collision:&#xD;&#xA;&#xD;&#xA;    event Bump(Actor other, PrimitiveComponent otherComp, Object.Vector hitNormal)&#xD;&#xA;    {&#xD;&#xA;    	local vector pushVelocity;&#xD;&#xA;    &#xD;&#xA;    	if(/*If Flipper is moving and is bump()ing the Player*/)&#xD;&#xA;    	{&#xD;&#xA;    		pushVelocity = hitNormal * CalcLinearVelocity(vsize(location - other.location));&#xD;&#xA;    		player.TakeDamage(playerDamage, none, player.Location, pushVelocity * 2.1f, class'DamageType', , self);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;By using all sorts of logging, I can determine that the code in question *is* being called when the flipper hits the player and the player is being killed on the first frame this collision occurs--logging within the if() block only appears once.  And yes, `playerDamage` is a value low enough that it would take many hits to kill the player.&#xD;&#xA;&#xD;&#xA;Does anyone have any insight as to why the player is immediately dying instead of being damaged and pushed away?  Or what sorts of things I should try to get my intended behavior?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22682" PostHistoryTypeId="1" PostId="10738" RevisionGUID="95d7940a-cefd-4251-93b2-b66f600ecc66" CreationDate="2011-04-07T06:25:17.217" UserId="3051" Text="Push and damage player pawn when hit by rotating pawn? (UDK)" />
  <row Id="22683" PostHistoryTypeId="3" PostId="10738" RevisionGUID="95d7940a-cefd-4251-93b2-b66f600ecc66" CreationDate="2011-04-07T06:25:17.217" UserId="3051" Text="&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="22684" PostHistoryTypeId="2" PostId="10739" RevisionGUID="f49f3294-c83c-42d5-94fa-f46b437c963f" CreationDate="2011-04-07T06:37:52.523" UserId="20" Text="Are you moving the player to the boundaries of the flipper when the collision occurs? I guess you don't do that and therefore:&#xD;&#xA;&#xD;&#xA; - the player collides with the flipper, ...&#xD;&#xA; - takes damage, changes direction (because of the collision),...&#xD;&#xA; - **but** since the player wasn't moved out of the collision area, it hits the flipper again and takes damage...&#xD;&#xA; - maybe the direction is reversed here once more and therefore you're in some sort of &quot;collision-loop&quot; where the player takes damage with every update." />
  <row Id="22685" PostHistoryTypeId="2" PostId="10740" RevisionGUID="90089f64-aaa0-4f68-8c4c-22e3e2584bdc" CreationDate="2011-04-07T08:00:10.207" UserId="101" Text="There's a chance this is the same problem I saw working on a UT3 mod a long time ago. If your pawn is at risk of interpenetrating the world geometry, the pawn is killed via the event FellOutOfWorld. This happens quite frequently if your pawn is forced to ragdoll and subsequently gets pushed around.&#xD;&#xA;&#xD;&#xA;I believe the interpenetration=kill hack was originally implemented in native code in UT3, and I couldn't tell you if it has since been moved out into UnrealScript in subsequent updates to the UDK sources.&#xD;&#xA;&#xD;&#xA;My workaround, taken from my pawn class, ended up looking like this (again, this is against UT3 code):&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;/** If someone falls out of the world while ragdolled, they have &#xD;&#xA;    this many seconds to stand up before they're killed. */&#xD;&#xA;var float OOWGracePeriod;&#xD;&#xA;&#xD;&#xA;/*&#xD;&#xA; * Extremely common scenario:&#xD;&#xA; *   1) Pawn is ragdolled and has a substantial vertical impulse applied.&#xD;&#xA; *   2) Pawn very briefly &quot;leaves world&quot; upon ragdoll impacting ceiling.&#xD;&#xA; *   3a) Pawn would recover immediately; however, they were killed for falling out of the world.&#xD;&#xA; *   OR&#xD;&#xA; *   3b) Pawn's ragdoll collision geometry interpenetrates world geometry and gets stuck.&#xD;&#xA; *&#xD;&#xA; * In the event of 3a (99% of the time), we don't want the pawn to die.&#xD;&#xA; * In the event of 3b ( 1% of the time), we don't have much choice but to euthanize them.&#xD;&#xA; *&#xD;&#xA; * Therefore, give them a grace period in which to recover.&#xD;&#xA; */&#xD;&#xA;&#xD;&#xA;simulated event FellOutOfWorld( class&lt;DamageType&gt; dmgType )&#xD;&#xA;{&#xD;&#xA;	if ( ! bForcedFeignDeath )&#xD;&#xA;		Super.FellOutOfWorld(dmgType);&#xD;&#xA;	else if ( ! IsTimerActive('KillIfStillForcedRagdoll') )&#xD;&#xA;		SetTimer( OOWGracePeriod, false, 'KillIfStillForcedRagdoll' );&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function KillIfStillForcedRagdoll()&#xD;&#xA;{&#xD;&#xA;	if ( bForcedFeignDeath )&#xD;&#xA;		Super.FellOutOfWorld( class'KillZDamageType' );&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function FeignDeathDelayTimer()&#xD;&#xA;{&#xD;&#xA;	Super.FeignDeathDelayTimer();&#xD;&#xA;&#xD;&#xA;	if ( ! bFeigningDeath )&#xD;&#xA;		ClearTimer( 'KillIfStillForcedRagdoll' );&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;EDIT: Almost forgot there was a second part to this.&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;/*&#xD;&#xA; * Another extremely common scenario: Ragdolled pawn gets crushed upon impacting wall.&#xD;&#xA; * Therefore, don't let crush damage from the world affect us while we're force-ragdolled.&#xD;&#xA; */&#xD;&#xA;&#xD;&#xA;event TakeDamage( int Damage, Controller EventInstigator, Vector HitLocation, Vector Momentum, class&lt;DamageType&gt; dmgType, optional TraceHitInfo HitInfo, optional Actor DamageCauser )&#xD;&#xA;{&#xD;&#xA;	if ( bForcedFeignDeath &amp;&amp; dmgType == class'DmgType_Crushed' &amp;&amp; DamageCauser == None )&#xD;&#xA;			return;&#xD;&#xA;&#xD;&#xA;	Super.TakeDamage( Damage, EventInstigator, HitLocation, Momentum, dmgType, HitInfo, DamageCauser );&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Yes, it was an egregious hack. But there was no way around those when working with UT3, because of how much stuff is implemented in native code. I can't imagine it's that much better with UDK." />
  <row Id="22686" PostHistoryTypeId="2" PostId="10741" RevisionGUID="c22db127-799d-41f1-bac2-852a262fd40f" CreationDate="2011-04-07T08:09:20.573" UserId="4241" Text="Just use index buffer and GL_TRIANGLES. In this case you need 4 vertices + 6 indices per quad (6 additional indices may sound large overhead but in reality it is not - once you have constructed your index buffer you don't have to touch it again). See [this page for more information][1] (search for glDrawElements)&#xD;&#xA;&#xD;&#xA;Also, if you are drawing just one quad you need only 4 vertices to draw it with triangle strips ([as shown in wikipedia][2]) but I guess you already knew this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.songho.ca/opengl/gl_vertexarray.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Triangle_strip" />
  <row Id="22687" PostHistoryTypeId="5" PostId="10741" RevisionGUID="599bc5fa-7b14-4cf9-b1c7-321822b8025b" CreationDate="2011-04-07T08:17:54.013" UserId="4241" Comment="added 565 characters in body; deleted 2 characters in body; added 4 characters in body" Text="Just use index buffer and GL_TRIANGLES. In this case you need 4 vertices + 6 indices per quad (6 additional indices may sound large overhead but in reality it is not - once you have constructed your index buffer you don't have to touch it again). See [this page for more information][1] (search for glDrawElements)&#xD;&#xA;&#xD;&#xA;Simple example code:&#xD;&#xA;&#xD;&#xA;    GLfloat vertices[] = {-1, -1, 0, //bottom left corner&#xD;&#xA;                          -1,  1, 0, //top left corner&#xD;&#xA;                           1,  1, 0, //top right corner&#xD;&#xA;                           1, -1, 0}; // bottom right rocner&#xD;&#xA;    &#xD;&#xA;    GLubyte indices[] = {0,1,2, // first triangle (bottom left - top left - top right)&#xD;&#xA;                         0,2,3}; // second triangle (bottom left - top right - bottom right)&#xD;&#xA;    &#xD;&#xA;    glVertexPointer(3, GL_FLOAT, 0, vertices);&#xD;&#xA;    glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices);&#xD;&#xA;&#xD;&#xA;Also, if you are drawing just one quad you need only 4 vertices to draw it with triangle strips ([as shown in wikipedia][2]) but I guess you already knew this.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.songho.ca/opengl/gl_vertexarray.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Triangle_strip&#xD;&#xA;" />
  <row Id="22689" PostHistoryTypeId="2" PostId="10743" RevisionGUID="b9de194a-5ff6-4b6c-8246-e033cce84afc" CreationDate="2011-04-07T08:38:24.863" UserId="6522" Text="Use a [SoundPool][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/reference/android/media/SoundPool.html" />
  <row Id="22690" PostHistoryTypeId="25" PostId="10727" RevisionGUID="a91056db-6d61-452a-b00a-db9ddb673e6a" CreationDate="2011-04-07T09:09:02.747" Comment="http://twitter.com/#!/StackGameDev/status/55920004620759040" />
  <row Id="22691" PostHistoryTypeId="2" PostId="10744" RevisionGUID="0eff11e3-bdc5-4e1c-8ab9-7ac40224ebeb" CreationDate="2011-04-07T09:33:47.337" UserId="20" Text="Is `ncount` a static variable? If that's the case it is very likely that `ncount` has changed when `onCompletion` gets called (because `ncount` was modified during playing of the sound). You should probably use another method to build that identifier..." />
  <row Id="22692" PostHistoryTypeId="5" PostId="9678" RevisionGUID="6afe1baf-5018-4511-9883-a4cc77f14996" CreationDate="2011-04-07T09:45:26.317" UserId="6054" Comment="added 757 characters in body" Text="I'm not experienced in Game Development questions, but as a programmer. In the language Scala, you can have scalable multi-tasking with Actors, very stable, as I hear. You can even have hundreds of thousands of them running at once without a problem.&#xD;&#xA;&#xD;&#xA;So I thought, maybe you can use these as a base class for 2D-Sprites, to break out of the game-loop thing that requires to go through all the sprites and move them. They'd basically move themselves, event-driven.&#xD;&#xA;&#xD;&#xA;Would that make sense for a game? Having it multitasked like that? After all, it will run on the JVM, though that should not be much of a problem nowadays.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;After dabbling for a while, I noticed there is only one real advantage to this idea: Multicore Support. A simple game loop will only run on one core and will work through everything sequentially.&#xD;&#xA;&#xD;&#xA;Since modern computers, even at home, nowadays have two or more cores built-in, I think it is a good idea to enable game programmers to efficiently use the other cores. After all, I think usually the player will only have just the game running on his eight-core machine, so why not.&#xD;&#xA;&#xD;&#xA;The other advantage I see is that in Scala, you can have `RemoteActors`, which can be treated the very same way but run on another computer. So maybe this can simplify network gaming as well.&#xD;&#xA;&#xD;&#xA;I intend to build that into my Scala 2D engine as soon as I can." />
  <row Id="22693" PostHistoryTypeId="2" PostId="10745" RevisionGUID="f1c4e8a8-83f3-4a7a-9f44-e2cd7119451e" CreationDate="2011-04-07T09:46:24.853" UserId="769" Text="Is there an OgreXML model viewer for Linux? I know about [OgreMax][1] but apparently that's Windows only.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogremax.com/" />
  <row Id="22694" PostHistoryTypeId="1" PostId="10745" RevisionGUID="f1c4e8a8-83f3-4a7a-9f44-e2cd7119451e" CreationDate="2011-04-07T09:46:24.853" UserId="769" Text="Linux OgreXML model viewer" />
  <row Id="22695" PostHistoryTypeId="3" PostId="10745" RevisionGUID="f1c4e8a8-83f3-4a7a-9f44-e2cd7119451e" CreationDate="2011-04-07T09:46:24.853" UserId="769" Text="&lt;3d&gt;&lt;models&gt;&lt;ogre&gt;&lt;jmonkeyengine&gt;" />
  <row Id="22696" PostHistoryTypeId="2" PostId="10746" RevisionGUID="7fdec1cd-0fdb-4de4-9524-60e7ec0cf398" CreationDate="2011-04-07T09:57:30.583" UserId="769" Text="I'm developing an Okey game (a Turkish version of Rummikub/Rummy). In it, each players has a bunch of tiles. Tiles have a colour and a number, like playing cards. Now, the player needs to make sets of these tiles, with three options:&#xD;&#xA;&#xD;&#xA;- Groups: Same number, different colours (Red 1, Blue 1, Black 1)&#xD;&#xA;- Straights: Same colour, sequence of numbers (Red 1, Red 2, Red 3)&#xD;&#xA;- Doubles: Two identical tiles&#xD;&#xA;&#xD;&#xA;I'm now trying to create a simple AI for the game. I want it to be able to find and create sets in/from its own tiles.&#xD;&#xA;&#xD;&#xA;I already have a TileSet class. Feed it a list of tiles and it will say whether it's a valid set and of what type.&#xD;&#xA;&#xD;&#xA;Using this, what kind of algorithm can I use to find the sets in an unordered heap of tiles?" />
  <row Id="22697" PostHistoryTypeId="1" PostId="10746" RevisionGUID="7fdec1cd-0fdb-4de4-9524-60e7ec0cf398" CreationDate="2011-04-07T09:57:30.583" UserId="769" Text="Algorithm for making sets in a Rummikub game." />
  <row Id="22698" PostHistoryTypeId="3" PostId="10746" RevisionGUID="7fdec1cd-0fdb-4de4-9524-60e7ec0cf398" CreationDate="2011-04-07T09:57:30.583" UserId="769" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;card-game&gt;&lt;okey&gt;&lt;rummikub&gt;" />
  <row Id="22699" PostHistoryTypeId="2" PostId="10747" RevisionGUID="cc14661a-4b87-4b49-8096-f86c121db79b" CreationDate="2011-04-07T09:58:00.877" UserId="4129" Text="The big gain on desktop is to move the data into GL_STATIC_DRAW VBOs.  Presumably this is true on iPhone's MBX GPU too." />
  <row Id="22700" PostHistoryTypeId="2" PostId="10748" RevisionGUID="7332f497-46ac-47fd-9da9-55fa7e66c8cf" CreationDate="2011-04-07T10:19:13.030" UserId="6055" Text="I'm looking for a good way to simulate damage, for example a weapon firing at a ship it would calculate the damage depending on layer type, weapon type, angle and similar what i need is a way to to represent the damage to a certain layer. I'm thinking of using matrices for keeping track of damage and also the appearance of the model.&#xD;&#xA;&#xD;&#xA;What the problem is for flat surfaces its not a problem but for curved surfaces calculating the angle, at least no way that i know of.&#xD;&#xA;&#xD;&#xA;For example its a curved hull with 3 armor layers, so we have 4 matrices 3 for the integrity of the armor and a 4th for the height map there is also a density variable(increasing the armor matrix size and then assigning more values in the heightmap/location map to the coresponding layer surface.&#xD;&#xA;&#xD;&#xA;Is there a better way to do this?" />
  <row Id="22701" PostHistoryTypeId="1" PostId="10748" RevisionGUID="7332f497-46ac-47fd-9da9-55fa7e66c8cf" CreationDate="2011-04-07T10:19:13.030" UserId="6055" Text="Realistic damage" />
  <row Id="22702" PostHistoryTypeId="3" PostId="10748" RevisionGUID="7332f497-46ac-47fd-9da9-55fa7e66c8cf" CreationDate="2011-04-07T10:19:13.030" UserId="6055" Text="&lt;math&gt;&lt;game-mechanics&gt;&lt;matrix&gt;" />
  <row Id="22703" PostHistoryTypeId="2" PostId="10749" RevisionGUID="8bbcd975-bf25-4052-909f-76ab1c3db07d" CreationDate="2011-04-07T11:00:15.973" UserId="1101" Text="If you have the equation of the curve in question - or even just an approximation - then you can work out the tangent of the curve at the point where the projectile contacts it. You can then treat that tangent as if it was a flat surface that has been hit and work out the angle of incidence accordingly." />
  <row Id="22704" PostHistoryTypeId="2" PostId="10750" RevisionGUID="1446a57a-5b32-4e65-8113-a49436f67e98" CreationDate="2011-04-07T11:12:54.403" UserId="5899" Text="You can use [OgreMeshy][1], but first the OgreXML file must be converted  to .mesh file with the command line tool OgreXmlConverter, included in the source code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/Ogre+Meshy" />
  <row Id="22705" PostHistoryTypeId="2" PostId="10751" RevisionGUID="94a91cb0-1187-4458-8db3-7928acfaee02" CreationDate="2011-04-07T11:37:02.287" UserId="6469" Text="I have made several games but they have all been space invaders or mario style.&#xD;&#xA;&#xD;&#xA;Following my last question (thank you for all the great answers) I am trying to write out a plot line and a plan for the events that will take place.&#xD;&#xA;&#xD;&#xA;The problem I am having is that my story's tend to resemble things that already exist like films or other games I have played. &#xD;&#xA;&#xD;&#xA;The events to feel like a mix of various other games I have played.&#xD;&#xA;&#xD;&#xA;So apart form become a more creative person does anyone have any advice. Has anyone written a fairly lengthy story for a game and have pointers or does anyone know any good books on the subject.&#xD;&#xA;&#xD;&#xA;Any thoughts would be welcome, story of event ideas to.&#xD;&#xA;&#xD;&#xA;FYI the game has a final fantasy style battle system and a pokemon catch/raise system. &#xD;&#xA;&#xD;&#xA;Thanks  &#xD;&#xA;" />
  <row Id="22706" PostHistoryTypeId="1" PostId="10751" RevisionGUID="94a91cb0-1187-4458-8db3-7928acfaee02" CreationDate="2011-04-07T11:37:02.287" UserId="6469" Text="Original RPG storyline development" />
  <row Id="22707" PostHistoryTypeId="3" PostId="10751" RevisionGUID="94a91cb0-1187-4458-8db3-7928acfaee02" CreationDate="2011-04-07T11:37:02.287" UserId="6469" Text="&lt;game-design&gt;&lt;rpg&gt;" />
  <row Id="22708" PostHistoryTypeId="25" PostId="10751" RevisionGUID="9c954eeb-cc59-4bfd-b9d5-efbe286172e7" CreationDate="2011-04-07T12:09:02.353" Comment="http://twitter.com/#!/StackGameDev/status/55965301916958720" />
  <row Id="22710" PostHistoryTypeId="2" PostId="10753" RevisionGUID="6b7b7dc9-db84-4bf0-ba59-007e5031fc67" CreationDate="2011-04-07T12:26:56.257" UserId="4834" Text="I didn't try, but I'm a Scala programmer, and I would say that this isn't a good idea. Sprites need to be animated synchronously. Actors have no guarantees that they will be executed fairly - some sprites may thus be faster than others, which is not what you want. You might want to use a barrier to synchronize them, but then - why use actors.&#xD;&#xA;If you rely only on message passing , implementing this kind of synchronization (implementing a barrier for 1000+ actors) is an overkill.&#xD;&#xA;&#xD;&#xA;Another issue is - what would you use message-passing for? Do you need your sprites to communicate? You could send a message by the master actor, telling each sprite to move to the next frame, but in terms of performance, that's magnitudes and magnitudes more than invoking methods directly and iterating through a set of sprites.&#xD;&#xA;&#xD;&#xA;Seems to me that what you need here is some kind of a very lightweight multitasking, and no message passing at all.&#xD;&#xA;Rolling in your own actor-like implementation which ensures fairness is probably the best way to go if you want to ensure this, but that's too much work for too little gain.&#xD;&#xA;&#xD;&#xA;I've implemented a 2d isometric game engine in Scala. I've only used 1 global actor to update visible sprites which were animated.&#xD;&#xA;&#xD;&#xA;However, you might want to implement your game logic using actors - for instance, to distribute computations on different parts of your game map to different actors, so that they update game state in parallel - and gain a performance gain.&#xD;&#xA;&#xD;&#xA;Still, if I were you, I'd try it, just to see what happens." />
  <row Id="22711" PostHistoryTypeId="2" PostId="10754" RevisionGUID="486598ab-1770-46d4-b88b-a3145ea7371a" CreationDate="2011-04-07T12:34:12.117" UserId="6469" Text="I like Direct X and have been using it for several years on many projects but if your learning do watch out for version issues. &#xD;&#xA;&#xD;&#xA;I found that the majority of direct x code will not compile under a different version and this can be hell if you are trying to follow a tutorial.&#xD;&#xA;&#xD;&#xA;I recommend Direct X as there are features for everything that make it easier when you are first beginning and then more advanced ways of manipulating things as you advance.   " />
  <row Id="22712" PostHistoryTypeId="2" PostId="10755" RevisionGUID="7463bc87-490d-4464-bfa7-66b830c4baf8" CreationDate="2011-04-07T12:45:10.537" UserId="6469" Text="Go build something, anything and then after two hours of trying to get it to compile go back and read the book again.&#xD;&#xA;&#xD;&#xA;You will now understand why x was called before y and what the purpose was. &#xD;&#xA;&#xD;&#xA;This will allow you to use the knowledge from the book instead of just copying the code." />
  <row Id="22713" PostHistoryTypeId="5" PostId="10753" RevisionGUID="7c352eb3-769f-43d0-a619-353ffc8229b2" CreationDate="2011-04-07T12:48:24.297" UserId="4834" Comment="added 126 characters in body" Text="I didn't try, but I'm a Scala programmer, and I would say that this isn't a good idea. Sprites need to be animated synchronously. Actors have no guarantees that they will be executed fairly - some sprites may thus be faster than others, which is not what you want. You might want to use a barrier to synchronize them, but then - why use actors.&#xD;&#xA;If you rely only on message passing , implementing this kind of synchronization (implementing a barrier for 1000+ actors) is an overkill.&#xD;&#xA;&#xD;&#xA;Another issue is - what would you use message-passing for? Do you need your sprites to communicate? You could send a message by the master actor, telling each sprite to move to the next frame, but in terms of performance, that's magnitudes and magnitudes more than invoking methods directly and iterating through a set of sprites.&#xD;&#xA;&#xD;&#xA;Seems to me that what you need here is some kind of a very lightweight multitasking, and no message passing at all.&#xD;&#xA;Rolling in your own actor-like implementation which ensures fairness is probably the best way to go if you want to ensure this, but that's too much work for too little gain.&#xD;&#xA;&#xD;&#xA;I've implemented a 2d isometric game engine in Scala. I've only used 1 global actor to update visible sprites which were animated.&#xD;&#xA;&#xD;&#xA;However, you might want to implement your game logic using actors - for instance, to distribute computations on different parts of your game map to different actors, so that they update game state in parallel - and gain a performance gain. I would not use a single actor per game object, rather, an actor per region. If you go too fine grained, performance suffers.&#xD;&#xA;&#xD;&#xA;Still, if I were you, I'd try it, just to see what happens." />
  <row Id="22714" PostHistoryTypeId="4" PostId="10751" RevisionGUID="9d244295-792c-4f2e-982d-64ae317b3dfc" CreationDate="2011-04-07T12:49:02.313" UserId="6469" Comment="edited title" Text="Plot and Story design basics" />
  <row Id="22715" PostHistoryTypeId="2" PostId="10756" RevisionGUID="54b4f784-16c6-4854-8bc4-54874c7bb1d6" CreationDate="2011-04-07T13:02:34.823" UserId="6210" Text="&gt; Do the vectors have to be normalized before passing them in?&#xD;&#xA;&#xD;&#xA;That's highly probable. Many computations require normalized vectors to work, and many functions do *not* normalize vectors they receive as parameters as it's quite expensive." />
  <row Id="22716" PostHistoryTypeId="2" PostId="10757" RevisionGUID="17226059-9253-40bb-90a8-bdca04874162" CreationDate="2011-04-07T13:02:45.660" UserId="6469" Text="use a nested loop.&#xD;&#xA;&#xD;&#xA;outside loop is the tile sets on the board and the inside loop is the ai tile. &#xD;&#xA;&#xD;&#xA;one at a time pass the tile set class a tile from the ai and a set on the board to see if it is a viable move.&#xD;&#xA;&#xD;&#xA;if you want the ai to make mistakes the have a random generator in the loop so it dosn't check all of its tile for every set on the board or jumble the order it searches the tiles on the board and take the first move available so it doesn't always take the best move.&#xD;&#xA;&#xD;&#xA;hope this helps" />
  <row Id="22717" PostHistoryTypeId="2" PostId="10758" RevisionGUID="ea43d4c0-0f57-4c6e-838c-1c96442381e3" CreationDate="2011-04-07T13:07:42.730" UserId="6577" Text="As a side note, I would highly recommend using SFML instead of SDL. Since you've been hitting on **C++** books, how SFML is organized will make a lot more sense that SDL. SFML is *very* object oriented.&#xD;&#xA;&#xD;&#xA;Although SDL has been around longer and has a CRAP LOAD of existing resources and tutorials, SFML is worth the investment. I've worked with both, and I can tell you SFML is just *nicer*. An added bonus is that 2D rendering is hardware accelerated in SFML. So it's faster too.&#xD;&#xA;&#xD;&#xA;End of shameless SFML propaganda. " />
  <row Id="22718" PostHistoryTypeId="2" PostId="10759" RevisionGUID="44a80d26-f530-4c1f-9846-593475e82c3d" CreationDate="2011-04-07T13:10:26.110" UserId="6469" Text="Think about the difference a live game will make. &#xD;&#xA;&#xD;&#xA;You say it is a browser game so do they download it or is it run off a server.&#xD;&#xA;&#xD;&#xA;Several hundred beta testers are different to a few mates. &#xD;&#xA;&#xD;&#xA;Another thing is be realistic. You say about releasing additional content weekly but would it be better to wait a fortnight and release it. &#xD;&#xA;&#xD;&#xA;the most important thing is release it when you are confident about it. There is nothing people like more than tearing down your work to make them selves feel better. " />
  <row Id="22719" PostHistoryTypeId="2" PostId="10760" RevisionGUID="83f8b5f7-3acf-48be-9c7c-08a8d231f675" CreationDate="2011-04-07T13:29:53.927" UserId="6313" Text="Im in the same position as you are, having just begun working on game development myself (on the iPhone platform) a few months ago.  Coming from a C background, I would actually suggest you use a framework (Particularly Cocos2d).&#xD;&#xA;&#xD;&#xA;The advantages of a framework are more then can be discussed in this post - but mainly it handles most of the low level processing with OpenGL and provides you methods to deal with the what your most likely going to require for game dev.  They have a great community, are open source, and hence if you need to access the core code of the framework / modify any bit of it to suit your needs / go to the low level OpenGL if necessary - you are still given that choice. &#xD;&#xA;&#xD;&#xA;You can go the route of direct OpenGL but to me it just seems like overkill.&#xD;&#xA;&#xD;&#xA;You will most likely also want to look into various different physics libraries that exist out there - Google Chipmunk and Box2D for more information.&#xD;&#xA;&#xD;&#xA;cheers! " />
  <row Id="22720" PostHistoryTypeId="2" PostId="10761" RevisionGUID="6842ba44-8684-479f-9d3d-68f067643620" CreationDate="2011-04-07T13:38:02.163" UserId="1929" Text="As someone who's written a great number of novels, I can tell you one closely-held secret of writing: **It involves reusing plot elements from other stories.**&#xD;&#xA;&#xD;&#xA;Most of my novels start out with a macro-level plot (eg. boy saves world by defeating sword-wielding maniac), from which I brush out details -- characters, elements, etc. One of the best ways to build a story is to borrow elements from other stories/games/movies, then tweak them and tweak the world they're in.&#xD;&#xA;&#xD;&#xA;For example, in one story (eight volume fantasy genre), I had elements borrowed from Chrono Trigger, Berserk (the anime), Wheel of Time, and bits and pieces from everywhere. But mixed in all together, with everything tweaked to fit the world, it turned out pretty unique.&#xD;&#xA;&#xD;&#xA;So I would say the process that worked for me was:&#xD;&#xA;&#xD;&#xA;- Start with an overall plot&#xD;&#xA;- Pick some characters/villans you want to see&#xD;&#xA;- Pick some elements you want (eg. pokemon)&#xD;&#xA;- Start detailing the plot with events&#xD;&#xA;- Keep subdividing to add story details until you're happy with it&#xD;&#xA;&#xD;&#xA;Just tweak it until you're happy with it. A lot of your story will be backstory; it's harder to figure out how to make it appear in-game." />
  <row Id="22722" PostHistoryTypeId="5" PostId="10753" RevisionGUID="e2fac199-4d7d-411d-956e-39bfa434bc40" CreationDate="2011-04-07T13:59:07.973" UserId="4834" Comment="added 6 characters in body" Text="I didn't try, but I'm a Scala programmer, and I would say that this isn't the best approach. Sprites need to be animated synchronously. Actors have no guarantees that they will be executed fairly - some sprites may thus be faster than others, which is not what you want. You might want to use a barrier to synchronize them, but then - why use actors.&#xD;&#xA;If you rely only on message passing , implementing this kind of synchronization (implementing a barrier for 1000+ actors) is an overkill.&#xD;&#xA;&#xD;&#xA;Another issue is - what would you use message-passing for? Do you need your sprites to communicate? You could send a message by the master actor, telling each sprite to move to the next frame, but in terms of performance, that's magnitudes and magnitudes more than invoking methods directly and iterating through a set of sprites.&#xD;&#xA;&#xD;&#xA;Seems to me that what you need here is some kind of a very lightweight multitasking, and no message passing at all.&#xD;&#xA;Rolling in your own actor-like implementation which ensures fairness is probably the best way to go if you want to ensure this, but that's too much work for too little gain.&#xD;&#xA;&#xD;&#xA;I've implemented a 2d isometric game engine in Scala. I've only used 1 global actor to update visible sprites which were animated.&#xD;&#xA;&#xD;&#xA;However, you might want to implement your game logic using actors - for instance, to distribute computations on different parts of your game map to different actors, so that they update game state in parallel - and gain a performance gain. I would not use a single actor per game object, rather, an actor per region. If you go too fine grained, performance suffers.&#xD;&#xA;&#xD;&#xA;Still, if I were you, I'd try it, just to see what happens." />
  <row Id="22723" PostHistoryTypeId="2" PostId="10762" RevisionGUID="668f5a70-2832-43d2-9822-53f90669a3cf" CreationDate="2011-04-07T13:59:46.290" UserId="6469" Text="//used to find tile on sheet&#xD;&#xA;		sourceY = (ScreenMap[count]/10)*60;&#xD;&#xA;		sourceX = ((ScreenMap[count]%10)-1)*60;&#xD;&#xA;&#xD;&#xA;my tiles are 60x60 pixel squares.&#xD;&#xA;ScreenMap[count] is an array of tiles but in your case it would be the number of the tile for example 14 for the fourth tile on the second row.&#xD;&#xA;&#xD;&#xA;the only problem is you cannot read 1 or 10 due to a mathmatical error so you tile sheets are ten tiles wide but the first and last tile cannot be read so you only get eight per row. &#xD;&#xA;&#xD;&#xA;this method works great and I have many tile sheets working in this way.&#xD;&#xA;&#xD;&#xA;one other thing, you mentioned 'professional' so you might be interested in this. In commercial games a tile sheet is always limited to a maximum of 256 tiles per sheet, this is so each tile can be assigned a binary value. &#xD;&#xA;&#xD;&#xA;hope this helps." />
  <row Id="22724" PostHistoryTypeId="2" PostId="10763" RevisionGUID="7acc7b8d-2192-4761-a922-91b6233ad1ea" CreationDate="2011-04-07T14:07:06.240" UserId="6469" Text="try making you background image bigger than your screen.&#xD;&#xA;&#xD;&#xA;this can be done by duplicating the image in paint or something.&#xD;&#xA;&#xD;&#xA;start at the beginning of the image and scroll along and when you get near the end of the image jump back to displaying the beginning of the image.&#xD;&#xA;&#xD;&#xA;try to jump before you reach the end of the image. &#xD;&#xA;&#xD;&#xA;this will save memory and run faster.&#xD;&#xA;&#xD;&#xA;sorry I cant give an example but I don't recognise the language your using &#xD;&#xA;&#xD;&#xA;hope this helps&#xD;&#xA;" />
  <row Id="22730" PostHistoryTypeId="5" PostId="10761" RevisionGUID="8ac0d822-8d76-41f0-9349-2006a8b89de6" CreationDate="2011-04-07T14:14:23.053" UserId="1929" Comment="added 32 characters in body" Text="As someone who's written a great number of novels, I can tell you one closely-held secret of writing: **It involves reusing elements  (characters, plots) from other sources (games, movies).**&#xD;&#xA;&#xD;&#xA;Most of my novels start out with a macro-level plot (eg. boy saves world by defeating sword-wielding maniac), from which I brush out details -- characters, elements, etc. One of the best ways to build a story is to borrow elements from other stories/games/movies, then tweak them and tweak the world they're in.&#xD;&#xA;&#xD;&#xA;For example, in one story (eight volume fantasy genre), I had elements borrowed from Chrono Trigger, Berserk (the anime), Wheel of Time, and bits and pieces from everywhere. But mixed in all together, with everything tweaked to fit the world, it turned out pretty unique.&#xD;&#xA;&#xD;&#xA;So I would say the process that worked for me was:&#xD;&#xA;&#xD;&#xA;- Start with an overall plot&#xD;&#xA;- Pick some characters/villans you want to see&#xD;&#xA;- Pick some elements you want (eg. pokemon)&#xD;&#xA;- Start detailing the plot with events&#xD;&#xA;- Keep subdividing to add story details until you're happy with it&#xD;&#xA;&#xD;&#xA;Just tweak it until you're happy with it. A lot of your story will be backstory; it's harder to figure out how to make it appear in-game." />
  <row Id="22731" PostHistoryTypeId="2" PostId="10764" RevisionGUID="493b2051-0726-4e8b-9d93-e88281180a63" CreationDate="2011-04-07T14:17:03.847" UserId="3081" Text="You could try something like this (using C# syntax, not verified for correctness).  Note also that I'm not instantiating the inner-collections, for brevity.&#xD;&#xA;&#xD;&#xA;    Dictionary&lt;int, HashSet&lt;Color&gt;&gt; groupTest = new Dictionary&lt;int, HashSet&lt;Color&gt;&gt;();&#xD;&#xA;    Dictionary&lt;Color, bool[]&gt; straightTest = new Dictionary&lt;Color, bool[]&gt;();&#xD;&#xA;    HashSet&lt;Tile&gt; doubleTest = new HashSet&lt;Tile&gt;();&#xD;&#xA;    foreach (Tile tile in AllTiles)&#xD;&#xA;    {&#xD;&#xA;      if (doubleTest.Contains(tile)) { /* Found a double */ }&#xD;&#xA;      groupTest[tile.Number].Add(tile.Color);&#xD;&#xA;      straightTest[tile.Color][tile.Number] = true;&#xD;&#xA;      doubleTest.Add(tile);&#xD;&#xA;    }&#xD;&#xA;    foreach (int number in groupTest.Keys)&#xD;&#xA;    {&#xD;&#xA;      HashSet&lt;Tile&gt; group = groupTest[number];&#xD;&#xA;      if (group.Count &gt;= 3) { /* Found a group */ }&#xD;&#xA;    }&#xD;&#xA;    foreach (Color color in straightTest.Keys)&#xD;&#xA;    {&#xD;&#xA;      HashSet&lt;int&gt; straight = straightTest[color];&#xD;&#xA;      int consecutive = 0;&#xD;&#xA;      for (int i = 1; i &lt; HIGHEST_NUMBER; ++i)&#xD;&#xA;      {&#xD;&#xA;        if (straight[i-1] &amp;&amp; straight[i])&#xD;&#xA;          consecutive++;&#xD;&#xA;        else&#xD;&#xA;          consecutive = 0;&#xD;&#xA;&#xD;&#xA;        if (consecutive &gt;= 3) { /* Found a straight. */ }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="22732" PostHistoryTypeId="2" PostId="10765" RevisionGUID="df773445-1160-4ae9-9bd7-119c6ba90223" CreationDate="2011-04-07T14:26:34.037" UserId="6117" Text="Haaf's Game Engine&#xD;&#xA;&#xD;&#xA;I don't know how up-to-date it is (i mean it's not, but i don't think there's any reason that it shouldn't be usable), but i used it a while ago (C++) and i really enjoyed it.&#xD;&#xA;HGE wasn't updated since 05.08, but again, i remember it being pretty simple to learn, and fast. It also comes with all sorts of tools and helper like a particle system.&#xD;&#xA;&#xD;&#xA;Anyway, if what you want is to create an actualy -game-, as opposed to learning the stuff that's going on &quot;under the hood&quot; in the processes of drawing and such, i'd recommend using something higher level then openGL or DirectX, or you're going to spend your time drawing stuff on the screen as opposed to creating an actual game. And HGE is definitly worth checking out.&#xD;&#xA;&#xD;&#xA;http://hge.relishgames.com/" />
  <row Id="22733" PostHistoryTypeId="2" PostId="10766" RevisionGUID="322ad3d9-4dd3-4bdc-bf92-e0a48c55c9d8" CreationDate="2011-04-07T14:54:09.447" UserId="744" Text="I think &lt;a href=&quot;http://www.amazon.com/Writing-10th-Anniversary-Memoir-Craft/dp/1439156816/&quot;&gt;Stephen King's _On Writing_&lt;/a&gt; is a good resource for any aspiring writer in any medium and genre.&#xD;&#xA;&#xD;&#xA;I have not read &lt;a href=&quot;http://www.amazon.com/Chris-Crawford-Interactive-Storytelling/dp/0321278909/&quot;&gt;_Chris Crawford on Interactive Storytelling_&lt;/a&gt; but I have seen several recommendations for it. Crawford is a vaguely divisive - or at least confounding - figure in game development, but regardless of which side you take it's probably worth reading what he has to say.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.lulu.com/product/paperback/if-theory-reader/15325304&quot;&gt;_The IF Theory Reader_&lt;/a&gt; (&lt;a href=&quot;http://www.lulu.com/product/file-download/if-theory-reader/15325305&quot;&gt;free PDF download&lt;/a&gt;) is a recent book. It covers primarily writing for _interactive fiction_, which is a small subset of games. Some of the topics won't be relevant for FF-style games, but I think at least half of the _Craft_ section essays probably have useful information, and the entire thing has a depth of analysis rarely found in game development book.&#xD;&#xA;&#xD;&#xA;(Disclaimer: Despite years of on-and-off attempts I am still a horrible writer.)" />
  <row Id="22734" PostHistoryTypeId="5" PostId="10763" RevisionGUID="9f68ad39-acb7-4afd-bb4b-b946c36399fd" CreationDate="2011-04-07T14:58:49.310" UserId="1198" Comment="fixed caps, dropped signature" Text="Try making you background image bigger than your screen.&#xD;&#xA;&#xD;&#xA;This can be done by duplicating the image in paint or something.&#xD;&#xA;&#xD;&#xA;Start at the beginning of the image and scroll along and when you get near the end of the image jump back to displaying the beginning of the image.&#xD;&#xA;&#xD;&#xA;Try to jump before you reach the end of the image. &#xD;&#xA;&#xD;&#xA;This will save memory and run faster.&#xD;&#xA;&#xD;&#xA;Sorry I cant give an example but I don't recognise the language your using." />
  <row Id="22735" PostHistoryTypeId="24" PostId="10763" RevisionGUID="9f68ad39-acb7-4afd-bb4b-b946c36399fd" CreationDate="2011-04-07T14:58:49.310" Comment="Proposed by 1198 approved by 51 edit id of 241" />
  <row Id="22736" PostHistoryTypeId="25" PostId="10748" RevisionGUID="9da67e63-c1b7-4064-bd3a-d68e106280c1" CreationDate="2011-04-07T15:09:02.533" Comment="http://twitter.com/#!/StackGameDev/status/56010601599746049" />
  <row Id="22738" PostHistoryTypeId="2" PostId="10768" RevisionGUID="109c501e-fc60-41de-848d-ce778f9a257e" CreationDate="2011-04-07T15:15:36.113" UserId="6210" Text="You can try to 'unbind' any texture if you want to keep GL_TEXTURE_2D enabled (which is fine).&#xD;&#xA;&#xD;&#xA;    glBind(GL_TEXTURE_2D, 0); // Unbind any texture" />
  <row Id="22739" PostHistoryTypeId="2" PostId="10769" RevisionGUID="d31f4969-455e-47eb-b9be-e8a3001c3f09" CreationDate="2011-04-07T15:41:56.373" UserId="5358" Text="Have you tried using D2D interop ? This is just a stab in the dark, but you could maybe try sharing the surface with a D3D10 device instead, and then save it the texture as a bitmap with D2D.&#xD;&#xA;&#xD;&#xA;The fact you can't save a shared texture may have something to do with how it is stored in memory, since it has to be shared between devices, but then again, I'm not sure so I might be wrong." />
  <row Id="22740" PostHistoryTypeId="2" PostId="10770" RevisionGUID="1914c77a-06e5-44dd-b377-1cf87c5a97d2" CreationDate="2011-04-07T15:50:02.977" UserId="6054" Text="I am working on a library to help 2D-Game development with Scala. So far it is a collection of helpful classes, file loading, collision detection, images, sprites...&#xD;&#xA;&#xD;&#xA;So when does it stop being a class library and start being an engine? Where exactly lies the difference in a useful framework and a game engine?" />
  <row Id="22741" PostHistoryTypeId="1" PostId="10770" RevisionGUID="1914c77a-06e5-44dd-b377-1cf87c5a97d2" CreationDate="2011-04-07T15:50:02.977" UserId="6054" Text="What's the difference between a Library and an Engine" />
  <row Id="22742" PostHistoryTypeId="3" PostId="10770" RevisionGUID="1914c77a-06e5-44dd-b377-1cf87c5a97d2" CreationDate="2011-04-07T15:50:02.977" UserId="6054" Text="&lt;engine&gt;&lt;framework&gt;" />
  <row Id="22743" PostHistoryTypeId="5" PostId="10753" RevisionGUID="aa7e8b78-9852-4d71-b040-2a63a4ae1f62" CreationDate="2011-04-07T15:56:35.220" UserId="4834" Comment="added 128 characters in body; deleted 9 characters in body" Text="I didn't try, but I'm a Scala programmer, and I would say that this isn't the best approach. Sprites need to be animated synchronously. Actors have no guarantees that they will be executed fairly - some sprites may thus be faster than others, which is not what you want. You might want to use a barrier to synchronize them, but then - why use actors.&#xD;&#xA;If you rely only on message passing , implementing this kind of synchronization (implementing a barrier for 1000+ actors) is an overkill.&#xD;&#xA;&#xD;&#xA;Another issue is - what would you use message-passing for? Do you need your sprites to communicate? You could send a message by the master actor, telling each sprite to move to the next frame, but in terms of performance, that's magnitudes and magnitudes more than invoking methods directly and iterating through a set of sprites.&#xD;&#xA;&#xD;&#xA;Seems to me that what you need here is some kind of a very lightweight multitasking, and no message passing at all.&#xD;&#xA;Rolling in your own actor-like implementation which ensures fairness is probably the best way to go if you want to ensure this, but that's too much work for too little gain. Another thing to look is functional reactive programming and `scala.react`, I believe that is a better match for this use case.&#xD;&#xA;&#xD;&#xA;I've implemented a 2d isometric game engine in Scala. I've only used 1 global actor to update visible sprites which were animated.&#xD;&#xA;&#xD;&#xA;You might want to implement your game logic using actors - for instance, to distribute computations on different parts of your game map to different actors, so that they update game state in parallel - and gain a performance gain. I would not use a single actor per game object, rather, an actor per region. If you go too fine grained, performance suffers.&#xD;&#xA;&#xD;&#xA;Still, if I were you, I'd try it, just to see what happens." />
  <row Id="22744" PostHistoryTypeId="2" PostId="10771" RevisionGUID="56b46838-c09a-4558-a33d-7287b19dad3d" CreationDate="2011-04-07T16:05:16.527" UserId="1430" Text="There really is no concrete definition for either term (or for the related term &quot;framework,&quot; for that matter). There are hundreds of different ways of interpreting the varied subtle distinctions in software packages and assigning them classifications.&#xD;&#xA;&#xD;&#xA;I personally view a &quot;library&quot; as a thing that provides a relatively small and directed set of functionality, whereas a &quot;framework&quot; provides more or broader functionality, and an &quot;engine&quot; provides the same (or more) and typically has a set of associated tools that come with it.&#xD;&#xA;&#xD;&#xA;I have seen enough of other people's personal interpretations of the same terms to feel safe suggesting that an &quot;engine&quot; provides more, or higher level, functionality than a &quot;library&quot; typically does... but where you draw that line for your own software is up to you." />
  <row Id="22745" PostHistoryTypeId="2" PostId="10772" RevisionGUID="f7cf58f8-c7e0-4cb6-9eb6-c6254fd35557" CreationDate="2011-04-07T16:05:45.337" UserId="6558" Text="This is a tricky question, since the line between library and engine can sometimes be a very thin, blurry one.  I'd have to say that the point where a library turns into an engine is when it becomes geared towards a specific game, or a specific type of game.&#xD;&#xA;&#xD;&#xA;For example: the Unreal engine (or Source, or Quake) is designed to be used for FPS games (it could feasibly be used for other games, but you'd spend some time working against the engine).  Ogre3d (or even Directx, SDL, or other common libraries) can be used to make any type of game, without having to rip out major parts of the code, or work around them." />
  <row Id="22746" PostHistoryTypeId="2" PostId="10773" RevisionGUID="22ece4d3-f8be-43cc-a12c-39efd34559a7" CreationDate="2011-04-07T16:17:22.900" UserId="6383" Text="I am currently working on a 2D &quot;Worms&quot; clone in XNA, and one of the features is &quot;deformable&quot; terrain (e.g. when a rocket hits the terrain, there is an explosion and a chunk of the terrain disappears). &#xD;&#xA;&#xD;&#xA;How I am currently doing this is by using a texture that has a progressively higher Red value as it approaches the center. I cycle through every pixel of that &quot;Deform&quot; texture, and if the current pixel overlaps a terrain pixel and has a high enough red value, I modify the color array representing the terrain to transparent. If the current pixel does NOT have a high enough Red value, I blacken the terrain color (it gets blacker the closer the Red value is to the threshold). At the end of this operation I use SetData to update my terrain texture.&#xD;&#xA;&#xD;&#xA;I realize this is not a good way to do it, not only because I have read about pipeline stalls and such, but also because it can become quite laggy if lots of craters are being added at the same time. I want to remake my Crater Generation on the GPU instead using Render Targets &quot;ping-ponging&quot; between being the target and the texture to modify. That isn't the problem, I know how to do that. the problem is I don't know how to keep my burn effect using this method.&#xD;&#xA;&#xD;&#xA;Here's how the burn effect looks right now: &#xD;&#xA;&#xD;&#xA;![Burn Effect](http://i52.tinypic.com/2h6f2nt.png)&#xD;&#xA;&#xD;&#xA;Does anybody have an idea how I would create a similar burn effect (darkening the edges around the formed crater)? I am completely unfamiliar with Shaders but if it requires it I would be really thankful if someone walked me through on how to do it. If there are any other ways that'd be great too." />
  <row Id="22747" PostHistoryTypeId="1" PostId="10773" RevisionGUID="22ece4d3-f8be-43cc-a12c-39efd34559a7" CreationDate="2011-04-07T16:17:22.900" UserId="6383" Text="XNA Adding Craters (via GPU) with a &quot;Burn&quot; Effect" />
  <row Id="22748" PostHistoryTypeId="3" PostId="10773" RevisionGUID="22ece4d3-f8be-43cc-a12c-39efd34559a7" CreationDate="2011-04-07T16:17:22.900" UserId="6383" Text="&lt;xna&gt;&lt;textures&gt;&lt;effects&gt;" />
  <row Id="22759" PostHistoryTypeId="12" PostId="10773" RevisionGUID="06da71fd-74e4-445b-9a4f-d5d7a1aa9073" CreationDate="2011-04-07T17:11:46.327" UserId="6383" Text="[{&quot;Id&quot;:6383,&quot;DisplayName&quot;:&quot;Benixo&quot;}]" />
  <row Id="22760" PostHistoryTypeId="13" PostId="10773" RevisionGUID="dc3df6e0-4e9c-4f51-952a-4ead721871d1" CreationDate="2011-04-07T17:11:50.180" UserId="6383" Text="[{&quot;Id&quot;:6383,&quot;DisplayName&quot;:&quot;Benixo&quot;}]" />
  <row Id="22761" PostHistoryTypeId="2" PostId="10774" RevisionGUID="d534bd50-51aa-4387-acaa-d2eb7ac59945" CreationDate="2011-04-07T17:56:54.967" UserId="370" Text="If by *sprite* you mean *game entity* then sure.&#xD;&#xA;&#xD;&#xA;Game entities should never draw themselves.  They should update a graphic handle that describes where and how they need to be drawn.  The render system or scene graph or whatever does the actual drawing.  There is one graphic card, further that graphics card must be synchronized every 16ms.  A set up like that just doesn't work well for distributed asynchronous processing.&#xD;&#xA;&#xD;&#xA;The render system should be one actor (or possibly a couple if you're tricky).  When game entities update the graphics handle it sends messages to the render system.  The render system, can them make all sorts of decisions and/or optimizations, e.g. batch rendering, occlusion, physics jitter smoothing, etc.&#xD;&#xA;&#xD;&#xA;I am not a Scala developer, but I've done quite a bit with Erlang.  So if some of my Scala terminology is incorrect, please forgive me." />
  <row Id="22762" PostHistoryTypeId="2" PostId="10775" RevisionGUID="0d4fe4b2-060d-4be0-bb71-70f31e5c7139" CreationDate="2011-04-07T18:01:23.397" UserId="6178" Text="I'm drawing a quad and binding a texture to this quad like this:&#xD;&#xA;&#xD;&#xA;    #define TERRAIN_WIDTH         2000&#xD;&#xA;    #define TERRAIN_LENGTH        2000&#xD;&#xA;    #define TERRAIN_WIDTH_2       (TERRAIN_WIDTH / 2)&#xD;&#xA;    #define TERRAIN_LENGTH_2      (TERRAIN_LENGTH / 2)&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, gameTextures.terrain);&#xD;&#xA;    glBegin(GL_QUADS);&#xD;&#xA;    	glTexCoord2f(0, 0); glVertex3f(-TERRAIN_WIDTH_2, 0.0f,  TERRAIN_LENGTH_2);&#xD;&#xA;    	glTexCoord2f(X, 0); glVertex3f( TERRAIN_WIDTH_2, 0.0f,  TERRAIN_LENGTH_2);&#xD;&#xA;    	glTexCoord2f(X, X); glVertex3f( TERRAIN_WIDTH_2, 0.0f, -TERRAIN_LENGTH_2);&#xD;&#xA;    	glTexCoord2f(0, X); glVertex3f(-TERRAIN_WIDTH_2, 0.0f, -TERRAIN_LENGTH_2);&#xD;&#xA;    glEnd();&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;&#xD;&#xA;Normally, `X` would be equal to `1` but this will stretch the texture because the quad is very large. The idea is to increase that value so the texture is repeated (the texture was generated with `GL_REPEAT` of course).&#xD;&#xA;&#xD;&#xA;But how should I find the best value for `X`? I have a few 512x512 textures which look nice if I replace `X=512`. Then I have another 1024x1024 texture which looks good to with `X=512` but doesn't start to look so good with a higher/lower value. Another texture is 2048x2048 and now I need to go down to `X=256`, otherwise it won't look so good.&#xD;&#xA;&#xD;&#xA;What's confusing me even more is the fact that both 512x512 and 1024x1024 textures look good with `X=512`. The way I see it, the lower the texture resolution, the more times I need to repeat it.&#xD;&#xA;&#xD;&#xA;How should I calculate the value of X then?" />
  <row Id="22763" PostHistoryTypeId="1" PostId="10775" RevisionGUID="0d4fe4b2-060d-4be0-bb71-70f31e5c7139" CreationDate="2011-04-07T18:01:23.397" UserId="6178" Text="How to properly repeat a texture on a quad in OpenGL?" />
  <row Id="22764" PostHistoryTypeId="3" PostId="10775" RevisionGUID="0d4fe4b2-060d-4be0-bb71-70f31e5c7139" CreationDate="2011-04-07T18:01:23.397" UserId="6178" Text="&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="22765" PostHistoryTypeId="2" PostId="10776" RevisionGUID="ddaf8b29-370e-487a-bed0-d205affc9a79" CreationDate="2011-04-07T18:04:35.580" UserId="4496" Text="One way you could do it is similar to what you have been doing.  Have a &quot;Damage&quot; texture and the actual background texture, but instead of copying the data over each time, just keep the two as two separate textures.&#xD;&#xA;&#xD;&#xA;When a blast is made, draw a circle on the Damage texture that has a slightly transparent edge.  This will be the &quot;burn&quot; area.&#xD;&#xA;&#xD;&#xA;Whenever you draw the terrain, give the GPU both textures, and have your shader multiply the color (.rgb) of the background pixels by 1 - the alpha value of the damage texture.  Get rid of the fully black pixels (alpha them to 0, or you can multiply this to alpha as well (.rgba instead of .rgb) depending if you want translucent scorched areas) and voila!&#xD;&#xA;&#xD;&#xA;I doubt this is the *best* solution, but it is fairly similar to what you've done before which may make transferring easier.  You could probably also get away with passing in an array of Vector3's (x,y,radius) and doing some math in the shader based on those explosion points but I am unsure as to the efficiency of such.&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="22766" PostHistoryTypeId="25" PostId="10770" RevisionGUID="957118e1-0a29-4d6f-bb76-6319b9728fe3" CreationDate="2011-04-07T18:09:02.907" Comment="http://twitter.com/#!/StackGameDev/status/56055900720467968" />
  <row Id="22767" PostHistoryTypeId="2" PostId="10777" RevisionGUID="7c6ff6be-07b2-4b0a-8c8b-ad9b9ffe2f73" CreationDate="2011-04-07T18:25:11.530" UserId="5020" Text="Since you have 52 distinct cards, you can represent them as bits and fit in a 64-bit int. E.g. taking `suit` as an int in `0-3` and `card` as an int in `0-12` one way of packing them would be&#xD;&#xA;&#xD;&#xA;    int64 ToBit(int suit, int card) { return ((int64)card) &lt;&lt; (16 * suit); }&#xD;&#xA;&#xD;&#xA;Then you can easily detect doubles and get a bitmask representing the cards present in a list:&#xD;&#xA;&#xD;&#xA;    List&lt;int64&gt; cardsAsBits = ...&#xD;&#xA;    int64 cardsAsBitset = 0, doubles = 0;&#xD;&#xA;    foreach (int64 card in cardsAsBits) {&#xD;&#xA;        doubles |= (cardsAsBitset &amp; card);&#xD;&#xA;        cardsAsBitset |= card;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To check for doubles now you just have to look at the set bits in `doubles`. To check for straights and groups it's just a case of making a suitable mask and &amp;ing.&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; 11; i++) {&#xD;&#xA;        for (int suit = 0; suit &lt; 4; suit++) {&#xD;&#xA;            int64 straight = 7L &lt;&lt; (i + 16 * suit);&#xD;&#xA;            if ((cardsAsBitset &amp; straight) == straight) handleSet(straight);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; 13; i++) {&#xD;&#xA;        int64 group1 = 0x0000000100010001L &lt;&lt; i;&#xD;&#xA;        int64 group2 = 0x0001000000010001L &lt;&lt; i;&#xD;&#xA;        int64 group3 = 0x0001000100000001L &lt;&lt; i;&#xD;&#xA;        int64 group4 = 0x0001000100010000L &lt;&lt; i;&#xD;&#xA;&#xD;&#xA;        if ((cardsAsBitset &amp; group1) == group1) handleSet(group1);&#xD;&#xA;        if ((cardsAsBitset &amp; group2) == group2) handleSet(group2);&#xD;&#xA;        if ((cardsAsBitset &amp; group3) == group3) handleSet(group3);&#xD;&#xA;        if ((cardsAsBitset &amp; group4) == group4) handleSet(group4);&#xD;&#xA;    }" />
  <row Id="22768" PostHistoryTypeId="2" PostId="10778" RevisionGUID="52a3e75f-6ded-43d6-8ccf-267f8923eb01" CreationDate="2011-04-07T18:56:08.847" UserId="4443" Text="I think the confusion people get into here is that one is generally made up of the other, so what people really want to know is when you have enough of one to be considered the other.&#xD;&#xA;&#xD;&#xA;&gt; So when does it stop being a class library and start being an engine?&#xD;&#xA;&#xD;&#xA;Never.&#xD;&#xA;&#xD;&#xA;&gt; Where exactly lies the difference in a useful framework and a game engine?&#xD;&#xA;&#xD;&#xA;There is none.&#xD;&#xA;&#xD;&#xA;Now let me explain the answers. A game engine is made up of class libraries. They do not stop being class libraries simply because they are within a game engine. A library is a useful framework to tackle a specific need within a game engine. A framework that entails the needs for a complete game is a game engine.&#xD;&#xA;&#xD;&#xA;Here are some examples of game engines:&#xD;&#xA;&#xD;&#xA; - Unreal Engine&#xD;&#xA; - Reality Engine&#xD;&#xA; - Source Engine&#xD;&#xA; - Quake Engine&#xD;&#xA; - Unity Engine&#xD;&#xA;&#xD;&#xA;And some examples of libraries&#xD;&#xA;&#xD;&#xA; - Novodex (Physics)&#xD;&#xA; - FMOD (Audio)&#xD;&#xA; - Havok (Physics)&#xD;&#xA; - Ogre3D (Rendering)&#xD;&#xA; - BINK (Video Library)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Hope this helps&#xD;&#xA;" />
  <row Id="22769" PostHistoryTypeId="2" PostId="10779" RevisionGUID="f4eea1d3-343d-4e53-ada7-6864ab18f096" CreationDate="2011-04-07T19:45:12.250" UserId="4306" Text="When is it considered high-poly?" />
  <row Id="22770" PostHistoryTypeId="1" PostId="10779" RevisionGUID="f4eea1d3-343d-4e53-ada7-6864ab18f096" CreationDate="2011-04-07T19:45:12.250" UserId="4306" Text="When is low-poly not low-poly?" />
  <row Id="22771" PostHistoryTypeId="3" PostId="10779" RevisionGUID="f4eea1d3-343d-4e53-ada7-6864ab18f096" CreationDate="2011-04-07T19:45:12.250" UserId="4306" Text="&lt;3d&gt;&lt;models&gt;&lt;low-poly&gt;" />
  <row Id="22772" PostHistoryTypeId="2" PostId="10780" RevisionGUID="05ca1d03-5847-42ba-9c2a-167c41798aab" CreationDate="2011-04-07T19:45:58.880" UserId="5864" Text="If `2048×2048` textures look good with `X = 256`, and `1024×1024` ones look good with `X = 512`, then it is probably that each time the texture size shrinks by a factor of `2`, `X` should grow by a factor of `2`, leading to the following formula:&#xD;&#xA;&#xD;&#xA;    X = 256 * 2048 / TextureSize" />
  <row Id="22773" PostHistoryTypeId="5" PostId="10640" RevisionGUID="e0074207-0c98-4e65-aa56-d3f154a2d1a2" CreationDate="2011-04-07T19:52:39.873" UserId="138" Comment="added 1070 characters in body" Text="As this is a personal project, you have to be very careful not to get bogged down in process. While continuous improvement is very desirable, consider choosing elements from Lean and Agile that are philosophically in-line with the simplicity of a one-man-show.&#xD;&#xA;&#xD;&#xA;In Scrum and many other systems, sprint retrospectives are beneficial, as they provide time for a team to identify improvements. In Lean, there's frequently a focus on solving a problem as it arises, and I think this is where you could greatly benefit.&#xD;&#xA;&#xD;&#xA;When you identify a nasty bit of code or an issue, flag it and take a moment to do the following:&#xD;&#xA;&#xD;&#xA; 1. Look at where the problem resides&#xD;&#xA; 2. Look at the interacting elements and systems&#xD;&#xA; 3. Find a quick solution (something that works, what we typically do and stop at)&#xD;&#xA; 4. Identify the root cause (ask the [5 why's][1])&#xD;&#xA; 5. Generate a more fulfilling (possibly even standardized) solution or plan for a solution (possibly something to be implemented after this project or sprint)&#xD;&#xA;&#xD;&#xA;So, this is taken from the five golden rules of Gemba management and fiddled with to match your scenario. To some degree, it's still not super applicable. Your mileage will vary and you'll have to adapt; but, there's good news: that's all part of Lean!&#xD;&#xA;&#xD;&#xA;You need to adapt whatever processes you can find to be &quot;right fit.&quot; This is going to be something you'll have to continually improve upon, in and of itself.&#xD;&#xA;&#xD;&#xA;I hope that makes sense. I can provide more specific references and comments if you'd like.&#xD;&#xA;&#xD;&#xA;EDIT (in response to question in comments):&#xD;&#xA;&#xD;&#xA;To get started, I'd suggest visiting [LeanBlog.org][2]. You might want to read [this article][3] first. It's short and full of pithy quotes. Most of it is about healthcare; but, you'll really rapidly see how it also applies to games.&#xD;&#xA;&#xD;&#xA;Not to toot my own horn, but, I wrote an article on gamasutra about [standardized work][4] and it has some great resources in the comments section as well as ideas. [You can find it here.][5]&#xD;&#xA;&#xD;&#xA;I would highly suggest checking out [Menlo Innovation's blog][6]. Most of what they talk about is applicable for larger companies; but, you should be able to adapt it.&#xD;&#xA;&#xD;&#xA;I'd be interested in finding out your results after a few months :)&#xD;&#xA;&#xD;&#xA;I hope those links help!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/5_Whys&#xD;&#xA;  [2]: http://leanblog.org&#xD;&#xA;  [3]: http://leanblog.org/2011/03/what-are-barriers-to-kaizen-in-healthcare/&#xD;&#xA;  [4]: http://artoflean.com/blog/2011/01/21/standardized-work/&#xD;&#xA;  [5]: http://www.gamasutra.com/blogs/AndrewGrapsas/20110318/7256/A_Problem_Solution_Standardized_Work.php&#xD;&#xA;  [6]: http://menloinnovations.com/blog/" />
  <row Id="22774" PostHistoryTypeId="2" PostId="10781" RevisionGUID="f74b2261-1977-4e45-a385-c202439277d8" CreationDate="2011-04-07T19:57:26.953" UserId="6109" Text="As long as you're not copying any one story or game outright then I shouldn't be too much of a problem. It practically impossible to write wholly original stories anyway.&#xD;&#xA;For example &quot;Romeo and Juliet&quot; and &quot;West Side Story&quot; are essentially the ancient Greek myth of &quot;Pyramus and Thisbe&quot;.  &#xD;&#xA;&#xD;&#xA;It's all about adapting, combining, and reworking elements from different works to make a new story which embodies the ideas you want to convey. " />
  <row Id="22775" PostHistoryTypeId="2" PostId="10782" RevisionGUID="afce6169-2410-4953-931b-4dd6a2d2533a" CreationDate="2011-04-07T20:26:52.933" UserId="6569" Text="Although at work we use JIRA for this type of stuff, I adapted a version of it for my own use in gamedev at home. It may or may not be a system that works for you, but I'll add it anyway:&#xD;&#xA;&#xD;&#xA; 1. Get some index cards and somewhere&#xD;&#xA;    to keep them - a few piles on the&#xD;&#xA;    desk works just fine. Mark these&#xD;&#xA;    piles &quot;Not Started&quot;, &quot;In Progress&quot;,&#xD;&#xA;    &quot;Blocked&quot;, &quot;Needs improvement&quot;, and&#xD;&#xA;    &quot;Complete&quot;.&#xD;&#xA; 2. If I think of a task that needs to &#xD;&#xA;    get done, I immediately write it&#xD;&#xA;    down    on an index card and give it&#xD;&#xA;    an    estimate of&#xD;&#xA;    difficulty/complexity&#xD;&#xA; 3. If a task I'm currently working on&#xD;&#xA;    is blocked, I write the reason why&#xD;&#xA;    on the back&#xD;&#xA; 4. Unless the task is a blocker, don't&#xD;&#xA;    do it until you have to (or until&#xD;&#xA;    you're out of unblocked/in progress&#xD;&#xA;    tasks)&#xD;&#xA; 5. If all of your tasks are in the&#xD;&#xA;    Needs Improvement or Complete stage,&#xD;&#xA;    start working on those that need&#xD;&#xA;    improvement.&#xD;&#xA; 6. ????&#xD;&#xA; 7. Profit!" />
  <row Id="22776" PostHistoryTypeId="2" PostId="10783" RevisionGUID="bc460bdf-f9f8-4b2f-a20d-f2220e127fbd" CreationDate="2011-04-07T20:39:47.587" UserId="6569" Text="It's *entirely* relative: if you're building an RTS, then low poly is probably about 1500 polys for a unit (I can't recall but I believe the zergling from SC2 is around that much). However, if you're building an FPS you're probably looking at 10-15k per player.&#xD;&#xA;&#xD;&#xA;There's no one true definition of it: the phrase &quot;low poly&quot; depends on a few different things, all of which are important:&#xD;&#xA;&#xD;&#xA; - When the mesh was made&#xD;&#xA; - What system the mesh is designed for&#xD;&#xA; - the shape that the mesh is being used to represent&#xD;&#xA; - *other meshes that are in the scene*&#xD;&#xA; - etc&#xD;&#xA;&#xD;&#xA;These days main characters have upwards of 15k-20k polys which was unheard of back in the days of say, N64. Random objects usually stick around 6k-9k these days." />
  <row Id="22777" PostHistoryTypeId="2" PostId="10784" RevisionGUID="77a336dd-e878-4d15-9d24-52715e723607" CreationDate="2011-04-07T21:01:05.337" UserId="6588" Text="Lua is a far more productive language than C++. I spent 6 months writing a game using C++ (not Airplay admittedly, I was using a different framework) and got about halfway through before I came to grips with how excessively long it was taking. Then I started using Corona three months ago and am about to release my game.&#xD;&#xA;&#xD;&#xA;Also, Lua is pretty similar to PHP so you shouldn't have any trouble picking it up in a weekend. Simpler actually" />
  <row Id="22778" PostHistoryTypeId="25" PostId="10773" RevisionGUID="8a2d5d92-43e1-4a48-8f25-f45e898af408" CreationDate="2011-04-07T21:09:02.950" Comment="http://twitter.com/#!/StackGameDev/status/56101198910070784" />
  <row Id="22779" PostHistoryTypeId="2" PostId="10785" RevisionGUID="c1d9ff23-d827-405b-a30b-13f45db9fcab" CreationDate="2011-04-07T21:11:18.407" UserId="6588" Text="Just about any intro to 3D book will go over basics of terminology, so you should start by deciding which software you want to learn on. Despite the nearly religious fervor a lot of 3D artists have all the different options (3ds max, Maya, Blender, etc.) are about equally good for learning on, so just pick whichever is most convenient for you (eg. your school's computers already have it installed) and then go to the bookstore to get an intro book for that software.&#xD;&#xA;&#xD;&#xA;Eventually you'll want to branch out in your learning and look at other tools, but from the very beginning you gotta pick one." />
  <row Id="22780" PostHistoryTypeId="2" PostId="10786" RevisionGUID="4bf7c6a1-238a-4674-8de3-5560c8112772" CreationDate="2011-04-07T21:13:32.853" UserId="6562" Text="I am using OpenGL ES 1.x/2.x&#xD;&#xA;&#xD;&#xA;I have 2 attributes to be passed to the GPU(one is colors, one is vertices, one color per vertex).&#xD;&#xA;&#xD;&#xA;I use indices. Both attributes will use the same indices array&#xD;&#xA;&#xD;&#xA;This is not a big issue but I was wondering if there is a way to tell the GPU that both attributes use the same indices array so that it is not transfered to the gpu twice, or maybe it does not matter because the GPU uses the RAM?" />
  <row Id="22781" PostHistoryTypeId="1" PostId="10786" RevisionGUID="4bf7c6a1-238a-4674-8de3-5560c8112772" CreationDate="2011-04-07T21:13:32.853" UserId="6562" Text="OpenGL ES indices optimization" />
  <row Id="22782" PostHistoryTypeId="3" PostId="10786" RevisionGUID="4bf7c6a1-238a-4674-8de3-5560c8112772" CreationDate="2011-04-07T21:13:32.853" UserId="6562" Text="&lt;opengl&gt;&lt;3d&gt;&lt;iphone&gt;&lt;android&gt;&lt;shaders&gt;" />
  <row Id="22783" PostHistoryTypeId="2" PostId="10787" RevisionGUID="04fd8326-b950-4829-ab1a-d7df4b554c5c" CreationDate="2011-04-07T21:29:18.027" UserId="6521" Text="If you are using indices then all of those attributes are already using the same index array. Each entry in your index array is an index into the vertex buffer that is currently being used for drawing. If you are using an interleaved vertex buffer then each vertex is represented by a single block of memory (in code usually defined by a struct) that contains all of the associated vertex attributes. The other method is to use multiple vertex arrays where each array contains a different attribute. Regardless of the method used for storing vertex data the current index pulled from your array of indices will point to the same data.&#xD;&#xA;&#xD;&#xA;To summarize, if I understand your question correctly, it sounds like you're already doing the right thing." />
  <row Id="22784" PostHistoryTypeId="2" PostId="10788" RevisionGUID="aec0ce5a-aee4-4b33-b4e6-b37028520648" CreationDate="2011-04-07T21:32:01.847" UserId="4818" Text="I'm new in Game development. I have researched many open source games. But I have not meet any game, which is high quality like a Commercial games.&#xD;&#xA;&#xD;&#xA;By quality I mean Graphic Quality.&#xD;&#xA;&#xD;&#xA;What is the main problem? Engine(Programmable part) or just textures/models?&#xD;&#xA;&#xD;&#xA;I know that this question is very general, but I want to hear some points of view." />
  <row Id="22785" PostHistoryTypeId="1" PostId="10788" RevisionGUID="aec0ce5a-aee4-4b33-b4e6-b37028520648" CreationDate="2011-04-07T21:32:01.847" UserId="4818" Text="Open source VS Commercial games quality" />
  <row Id="22786" PostHistoryTypeId="3" PostId="10788" RevisionGUID="aec0ce5a-aee4-4b33-b4e6-b37028520648" CreationDate="2011-04-07T21:32:01.847" UserId="4818" Text="&lt;engine&gt;&lt;open-source&gt;&lt;commercial&gt;&lt;serious-games&gt;" />
  <row Id="22787" PostHistoryTypeId="2" PostId="10789" RevisionGUID="6c49cb0e-cf02-49df-82dc-36c5ea4f7de9" CreationDate="2011-04-07T21:38:23.863" UserId="51" Text="One of the common definitions these days is that low-poly is the model as in the game.  High poly is the source model that's used to bake down normal maps." />
  <row Id="22788" PostHistoryTypeId="2" PostId="10790" RevisionGUID="651fef78-4f73-442f-8636-c32d07af9547" CreationDate="2011-04-07T22:08:59.237" UserId="6562" Text="Open source games are usually people who work during their free time, when they want to. They don't have any obligation to work.&#xD;&#xA;&#xD;&#xA;For a commercial game, the people working on the game get monetary compensation for their work, and if their work is no good, they get fired. Basically they have more motivation. Another factor is the number of people." />
  <row Id="22789" PostHistoryTypeId="5" PostId="10786" RevisionGUID="85509498-ef96-4cf9-aa48-6cc65e8de3aa" CreationDate="2011-04-07T22:18:59.093" UserId="6562" Comment="added 4 characters in body; deleted 4 characters in body" Text="I am using OpenGL ES 1.x/2.x&#xD;&#xA;&#xD;&#xA;I have 2 attributes to be passed to the GPU(one is colors, one is vertices, one color per vertex).&#xD;&#xA;&#xD;&#xA;I use indices. Both attributes will use the same indices array&#xD;&#xA;&#xD;&#xA;This is not a big issue but I was wondering if there is a way to tell the GPU that both attributes use the same indices array so that it is not transfered to the gpu twice, or maybe it does not matter because the GPU uses the RAM?" />
  <row Id="22790" PostHistoryTypeId="2" PostId="10791" RevisionGUID="f73205c8-a4d6-4dbc-9136-54632e7d266a" CreationDate="2011-04-07T22:36:46.197" UserId="2693" Text="Open source and commercial are not mutually exclusive! Do you know anything about free software? There's a difference between free as in software and free as in beer. &#xD;&#xA;&#xD;&#xA;For instance, Quake 3 was a hugely popular, very technical, 3D, high performance, commercial game engine. It sold as its own game, and then Id sold it out to other developers to make lots of games. They didn't do it immediately, but the quake 3 engine is now open source under the GNU public licence v2. Lots of indie / open-source games are being built upon the open sourced Quake 3 engine.&#xD;&#xA;&#xD;&#xA;There's tons of other modern games that are open source as well, just look around. Myst URU Online just announced that they are going to be releasing the source code to both the client, the tools, and a server. Thats a modern, totally 3D game. There are tons of others.&#xD;&#xA;&#xD;&#xA;&quot;What is the main problem? Engine(Programmable part) or just textures/models?&quot;&#xD;&#xA;&#xD;&#xA;I'm not sure you even know what it is you're asking. Are you talking about open source, or are you talking about indie games? There's a HUGE difference.&#xD;&#xA;&#xD;&#xA;Also, have you heard of mods?&#xD;&#xA;" />
  <row Id="22791" PostHistoryTypeId="2" PostId="10792" RevisionGUID="29d85cc2-949d-4ff9-a05c-0b344a13a611" CreationDate="2011-04-07T23:17:59.570" UserId="2117" Text="Seconding OgreMeshy as I don't have enough rep to comment, though it does require 1.8.0 (so you'd have to build from [source][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://bitbucket.org/sinbad/ogre" />
  <row Id="22792" PostHistoryTypeId="5" PostId="10778" RevisionGUID="529d2394-34b0-4747-88e6-5db2e2edc6df" CreationDate="2011-04-07T23:19:50.397" UserId="4443" Comment="Added in some more libraries to extend to commonly known hardware libraries to further show the differences." Text="I think the confusion people get into here is that one is generally made up of the other, so what people really want to know is when you have enough of one to be considered the other.&#xD;&#xA;&#xD;&#xA;&gt; So when does it stop being a class library and start being an engine?&#xD;&#xA;&#xD;&#xA;Never.&#xD;&#xA;&#xD;&#xA;&gt; Where exactly lies the difference in a useful framework and a game engine?&#xD;&#xA;&#xD;&#xA;There is none.&#xD;&#xA;&#xD;&#xA;Now let me explain the answers. A game engine is made up of class libraries. They do not stop being class libraries simply because they are within a game engine. A library is a useful framework to tackle a specific need within a game engine. A framework that entails the needs for a complete game is a game engine.&#xD;&#xA;&#xD;&#xA;Here are some examples of game engines:&#xD;&#xA;&#xD;&#xA; - Unreal Engine&#xD;&#xA; - Reality Engine&#xD;&#xA; - Source Engine&#xD;&#xA; - Quake Engine&#xD;&#xA; - Unity Engine&#xD;&#xA;&#xD;&#xA;And some examples of libraries&#xD;&#xA;&#xD;&#xA; - Novodex (Physics)&#xD;&#xA; - FMOD (Audio)&#xD;&#xA; - Havok (Physics)&#xD;&#xA; - Ogre3D (Rendering)&#xD;&#xA; - BINK (Video Library)&#xD;&#xA; - Direct3D (Graphics)&#xD;&#xA; - OpenGL (Graphics)&#xD;&#xA; - DirectSound (Audio)&#xD;&#xA; - XInput (Input)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Hope this helps&#xD;&#xA;" />
  <row Id="22793" PostHistoryTypeId="2" PostId="10793" RevisionGUID="00bc8efb-a86e-43e2-922b-ea71788fc3b6" CreationDate="2011-04-07T23:51:58.347" UserId="1929" Text="I want a list of all the game competitions out there -- at least the major ones. Preferably with the approximate time that they run.&#xD;&#xA;&#xD;&#xA;In a move that may be controversial for an SE site, I've created [this Google spreadsheet][1] as a starting point. Feel free to edit it. (You need a Google account to edit it, so we don't get spammed/vandalized.)&#xD;&#xA;&#xD;&#xA;So far, I've got:&#xD;&#xA;&#xD;&#xA;- Ludum Dare&#xD;&#xA;- Ludum Dare (Jam)&#xD;&#xA;- 7DRL&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://spreadsheets.google.com/ccc?hl=en&amp;key=tNNF3creGdeQHNXMtkUKhyA&amp;hl=en#gid=0" />
  <row Id="22794" PostHistoryTypeId="1" PostId="10793" RevisionGUID="00bc8efb-a86e-43e2-922b-ea71788fc3b6" CreationDate="2011-04-07T23:51:58.347" UserId="1929" Text="List of Game Competitions (With Dates)" />
  <row Id="22795" PostHistoryTypeId="3" PostId="10793" RevisionGUID="00bc8efb-a86e-43e2-922b-ea71788fc3b6" CreationDate="2011-04-07T23:51:58.347" UserId="1929" Text="&lt;competition&gt;" />
  <row Id="22796" PostHistoryTypeId="5" PostId="10793" RevisionGUID="ca0a37f6-a5d5-44c2-9ce1-1152618aaf85" CreationDate="2011-04-07T23:56:59.950" UserId="1929" Comment="added 31 characters in body" Text="I want a list of all the game competitions out there -- at least the major ones. Preferably with the approximate time that they run.&#xD;&#xA;&#xD;&#xA;In a move that may be controversial for an SE site, I've created [this Google spreadsheet][1] as a starting point. Feel free to edit it. (You need a Google account to edit it, so we don't get spammed/vandalized.)&#xD;&#xA;&#xD;&#xA;So far, I've got:&#xD;&#xA;&#xD;&#xA;- Ludum Dare&#xD;&#xA;- Ludum Dare (Jam)&#xD;&#xA;- 7DRL&#xD;&#xA;- Experimental Gameplay Project&#xD;&#xA;&#xD;&#xA;  [1]: https://spreadsheets.google.com/ccc?hl=en&amp;key=tNNF3creGdeQHNXMtkUKhyA&amp;hl=en#gid=0" />
  <row Id="22797" PostHistoryTypeId="2" PostId="10794" RevisionGUID="9ec4968a-df1b-45cc-b9bc-1ec9c0c021a1" CreationDate="2011-04-07T23:59:43.943" UserId="6562" Text="I need suggestions for the best method of acheiving what I am trying to do:&#xD;&#xA;&#xD;&#xA;-Using either OpenGL ES 1.x or 2.x&#xD;&#xA;&#xD;&#xA;I need to pass a bunch of vertices to the GPU. Each one has 3 attributes: Position, Color, and Texture coords.&#xD;&#xA;&#xD;&#xA;The vertices form quads, which share vertices. The shared vertices have both position and color attributes in common, but texcoords are not shared because each quad is textured with a 'tile' from a texture atlas.&#xD;&#xA;&#xD;&#xA;I already know that it is not possible to use separate indices for a glDrawElements() call, so does that mean I can only use indexing for individual quads(specify 4 unique vertices per quad)? .. or is there any better solution?" />
  <row Id="22798" PostHistoryTypeId="1" PostId="10794" RevisionGUID="9ec4968a-df1b-45cc-b9bc-1ec9c0c021a1" CreationDate="2011-04-07T23:59:43.943" UserId="6562" Text="OpenGL ES multiple indices" />
  <row Id="22799" PostHistoryTypeId="3" PostId="10794" RevisionGUID="9ec4968a-df1b-45cc-b9bc-1ec9c0c021a1" CreationDate="2011-04-07T23:59:43.943" UserId="6562" Text="&lt;opengl&gt;&lt;3d&gt;&lt;iphone&gt;&lt;android&gt;&lt;shaders&gt;" />
  <row Id="22800" PostHistoryTypeId="5" PostId="10793" RevisionGUID="6d28836a-fea6-47b7-9397-481894958486" CreationDate="2011-04-08T00:03:18.340" UserId="1929" Comment="added 23 characters in body" Text="I want a list of all the game competitions out there -- at least the major ones. Preferably with the approximate time that they run.&#xD;&#xA;&#xD;&#xA;In a move that may be controversial for an SE site, I've created [this Google spreadsheet][1] as a starting point. Feel free to edit it. (You need a Google account to edit it, so we don't get spammed/vandalized.)&#xD;&#xA;&#xD;&#xA;So far, I've got:&#xD;&#xA;&#xD;&#xA;- Ludum Dare&#xD;&#xA;- Ludum Dare (Jam)&#xD;&#xA;- 7DRL&#xD;&#xA;- Experimental Gameplay Project&#xD;&#xA;- Dream. Build. Play.&#xD;&#xA;&#xD;&#xA;  [1]: https://spreadsheets.google.com/ccc?hl=en&amp;key=tNNF3creGdeQHNXMtkUKhyA&amp;hl=en#gid=0" />
  <row Id="22801" PostHistoryTypeId="25" PostId="10786" RevisionGUID="172cd4d9-4d80-45e1-a88f-fcd9428e54b6" CreationDate="2011-04-08T00:09:02.757" Comment="http://twitter.com/#!/StackGameDev/status/56146497103855617" />
  <row Id="22802" PostHistoryTypeId="10" PostId="10793" RevisionGUID="fa47d335-f846-4e92-a22e-fcefcd999ad5" CreationDate="2011-04-08T01:21:07.233" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="22803" PostHistoryTypeId="2" PostId="10795" RevisionGUID="8ab13075-53ba-4542-bf25-f35a48e06274" CreationDate="2011-04-08T01:47:06.870" UserId="1101" Text="The look of a game is rarely down to the code quality, but down to the art quality. Art doesn't really come under the 'open source' concept so getting a coherent set of good art assets for a game for free is very difficult." />
  <row Id="22804" PostHistoryTypeId="5" PostId="10793" RevisionGUID="9bf64b12-f57e-44ae-9463-6006af83f666" CreationDate="2011-04-08T02:22:59.910" UserId="1929" Comment="deleted 240 characters in body" Text="What are all the game competitions out there -- at least the major ones? Preferably with the approximate time that they run.&#xD;&#xA;&#xD;&#xA;So far, I've got:&#xD;&#xA;&#xD;&#xA;- Ludum Dare (April 29th)&#xD;&#xA;- Ludum Dare (Jam) (April 29th)&#xD;&#xA;- 7DRL (next year)&#xD;&#xA;- Experimental Gameplay Project (now until April 30th)&#xD;&#xA;- Dream. Build. Play. (May 17th)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22805" PostHistoryTypeId="25" PostId="10794" RevisionGUID="afbe6a58-2b26-48bc-812d-5b6d09eb562e" CreationDate="2011-04-08T03:09:03.260" Comment="http://twitter.com/#!/StackGameDev/status/56191797248008192" />
  <row Id="22806" PostHistoryTypeId="25" PostId="10788" RevisionGUID="c54251ee-5d1e-42ab-9730-804a5e19ef1a" CreationDate="2011-04-08T06:09:02.833" Comment="http://twitter.com/#!/StackGameDev/status/56237094401605632" />
  <row Id="22807" PostHistoryTypeId="2" PostId="10796" RevisionGUID="773dcc9c-8eba-48d0-a23a-a65f5d95b350" CreationDate="2011-04-08T06:22:56.543" UserId="6594" Text="Look at&#xD;&#xA;http://www.planet-plopp.de or http://www.impara.de/projekt_pirates_engl.html&#xD;&#xA;&#xD;&#xA;Impara used the portable Squeak Smalltalk to build these games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22808" PostHistoryTypeId="2" PostId="10797" RevisionGUID="06dcb61a-6341-4dd1-9485-1a2114543404" CreationDate="2011-04-08T06:25:58.507" UserId="6594" Text="There are also videos on how Dolphin Smalltalk (Win32 only) can be used to build games&#xD;&#xA;http://www.object-arts.com/support/videos_files/21163c4401ba2928d4e0c1ca319c04c7-1.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22809" PostHistoryTypeId="2" PostId="10798" RevisionGUID="4eb7d4b9-bada-427f-bab7-bde31985ab7f" CreationDate="2011-04-08T07:07:14.757" UserId="395" Text="Bad code is far easier to gloss over than bad art or bad design." />
  <row Id="22810" PostHistoryTypeId="2" PostId="10799" RevisionGUID="23aeffed-fccb-44d4-aa70-4b1ff25865e3" CreationDate="2011-04-08T07:41:09.223" UserId="4947" Text="If you have a lot of quads (with shared vertices), but each quad needs its own texcoords, you can't use shared vertices, but each quad has to be defined separately. &#xD;&#xA;&#xD;&#xA;It's better to use interleaved arrays in each case, because you have stored all attributes for one vertex consecutively in memory. So if you are trying to read for example vertex position, also some surrounding data from memory (in your case color and texcoords) are send to cache. If you have a lot of data, it's more efficient. &#xD;&#xA;&#xD;&#xA;And you don't have to use glDrawElements in this case, you can just use glDrawArrays (you don't have to pass indices, if they are just sequence of increasing numbers).&#xD;&#xA;&#xD;&#xA;I also hope, you are using VBOs (data are stored in GPU memory instead of system memory)." />
  <row Id="22811" PostHistoryTypeId="25" PostId="10779" RevisionGUID="ba83e58c-33c0-49fc-969d-e5280592637a" CreationDate="2011-04-08T09:09:02.860" Comment="http://twitter.com/#!/StackGameDev/status/56282393526538240" />
  <row Id="22812" PostHistoryTypeId="2" PostId="10800" RevisionGUID="22869fb3-2074-49cc-94b7-53223ced4a1d" CreationDate="2011-04-08T09:13:03.247" UserId="6597" Text="I was thinking about 2D games (like Starcraft), where the sprites are in two dimensions, but the objects that are &quot;higher&quot; in the screen are behind the other objects (I think this is obvious when you think that &quot;higher&quot; in the screen means &quot;far&quot; when simulating a 3D environment).&#xD;&#xA;&#xD;&#xA;But, how do you do this programmatically? It is a good idea to track every movement for every object, assigning object to different layers in order to simulate movement in that axis?&#xD;&#xA;&#xD;&#xA;Is there a better way?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="22813" PostHistoryTypeId="1" PostId="10800" RevisionGUID="22869fb3-2074-49cc-94b7-53223ced4a1d" CreationDate="2011-04-08T09:13:03.247" UserId="6597" Text="Simulate 3D with 2D sprites" />
  <row Id="22814" PostHistoryTypeId="3" PostId="10800" RevisionGUID="22869fb3-2074-49cc-94b7-53223ced4a1d" CreationDate="2011-04-08T09:13:03.247" UserId="6597" Text="&lt;3d&gt;&lt;sprites&gt;" />
  <row Id="22815" PostHistoryTypeId="2" PostId="10801" RevisionGUID="e7bd71b5-d10b-4ee5-8e87-44bef3517e50" CreationDate="2011-04-08T09:44:37.667" UserId="3644" Text="Here's how I did it for my &quot;Starcraft&quot; clone:&#xD;&#xA;&#xD;&#xA;1. Collect all visible sprites locations into array&#xD;&#xA;2. Sort the array by sprites lower edge. Lower edge should be taken in map-coords (so that units standing on a very tall hill still would be above units behind the hill).&#xD;&#xA;3. Render terrain ground strips along with units standing on them from top to bottom" />
  <row Id="22816" PostHistoryTypeId="17" PostId="10803" RevisionGUID="5bc9bf37-e53b-4750-ac00-c6a70924970b" CreationDate="2011-04-08T09:44:51.053" UserId="-1" Comment="from http://stackoverflow.com/questions/5588021/what-good-3d-graphic-rendering-engines-are-out-there/5588045#5588045" Text="" />
  <row Id="22817" PostHistoryTypeId="17" PostId="10804" RevisionGUID="bbb83742-5ef0-4619-b6e7-ce429e507377" CreationDate="2011-04-08T09:44:51.053" UserId="-1" Comment="from http://stackoverflow.com/questions/5588021/what-good-3d-graphic-rendering-engines-are-out-there/5588146#5588146" Text="" />
  <row Id="22818" PostHistoryTypeId="17" PostId="10805" RevisionGUID="87871135-0f8a-4f1a-9cb3-dc987d1338b3" CreationDate="2011-04-08T09:44:51.053" UserId="-1" Comment="from http://stackoverflow.com/questions/5588021/what-good-3d-graphic-rendering-engines-are-out-there/5588200#5588200" Text="" />
  <row Id="22819" PostHistoryTypeId="17" PostId="10806" RevisionGUID="7292216e-6b81-4223-8f28-3f8d1d8db5c5" CreationDate="2011-04-08T09:44:51.053" UserId="-1" Comment="from http://stackoverflow.com/questions/5588021/what-good-3d-graphic-rendering-engines-are-out-there/5588668#5588668" Text="" />
  <row Id="22820" PostHistoryTypeId="2" PostId="10803" RevisionGUID="b7034706-fb6f-43f5-b828-c1b20ac3efc7" CreationDate="2011-04-07T21:47:03.607" UserDisplayName="Adam" Text="Sounds like you actually want a game engine, not a graphics rendering engine. &#xD;&#xA;&#xD;&#xA;Check out [Unity3D][1], should have everything you want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="22821" PostHistoryTypeId="2" PostId="10806" RevisionGUID="1771822c-4a93-48df-8062-04de36b2f657" CreationDate="2011-04-07T23:08:18.143" UserId="318" Text="If all you want is a rendering engine,&#xD;&#xA;SlimDX wraps the DirectX API with a .NET layer.&#xD;&#xA;&#xD;&#xA;If you want a scene graph (take into consideration that&#xD;&#xA;the are articles, that justly state that scene graphs go against&#xD;&#xA;separation of concerns and don't necessarily improve performance)&#xD;&#xA;then there are no good scene graphs for .NET,&#xD;&#xA;however you could wrap NVIDIA's scene graph or OSG.&#xD;&#xA;&#xD;&#xA;If you want a game engine, checkout the comparison&#xD;&#xA;table at gamedev.net, you can filter by C# there." />
  <row Id="22822" PostHistoryTypeId="2" PostId="10804" RevisionGUID="c59dddf3-c6db-4677-90df-5f1f5f232699" CreationDate="2011-04-07T21:56:42.423" UserId="4598" Text="Xna is more a framework type of thing. You will have to create your own Nodes and set up your own type of scenegraph. A lot is done in the framework (like math).&#xD;&#xA;&#xD;&#xA;If you are going to work on your own, Unity is indeed a good option. *It contains PhysX*.&#xD;&#xA;&#xD;&#xA;Another option is not in C#, but mentionable: http://jmonkeyengine.org/ (Java)  &#xD;&#xA;I heard good stories about this one. *It contains a physics library*.&#xD;&#xA;&#xD;&#xA;Ogre is C++ all the way. It has a very strong community, but it's maybe not what you want. Another engine could be [Panda3D][1], which is python and C++. So also not what you want.&#xD;&#xA;&#xD;&#xA;And there is also the [Unreal Development Kit][2], which you will do in UnrealScript. It is somewhat the same as C# and Java and is parsed by Unreal. This engine has a large community and a lot of tutorials. It supports shading and all of that as well, but has a very overwhelming interface.&#xD;&#xA;&#xD;&#xA;So yes, Unity is a very good beginners engine (and the Pro version of €1000 is very well). The free version misses a lot of options you might want (RenderTexture, Primitive GL support for drawing lines, **external dll's**, Subversion?) You can create nice little games with the free version though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.panda3d.org/&#xD;&#xA;  [2]: http://udk.com/" />
  <row Id="22823" PostHistoryTypeId="2" PostId="10805" RevisionGUID="be519964-c450-4474-80fa-98724d835115" CreationDate="2011-04-07T22:00:55.987" UserDisplayName="RagnarSun" Text="You can look at [SharpDX][1] it generate code from the headers of the c++ directx api direct to the LI code of .Net&#xD;&#xA;&#xD;&#xA;Read more [Here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/sharpdx/&#xD;&#xA;  [2]: http://code4k.blogspot.com/2010/11/official-release-of-sharpdx-10.html" />
  <row Id="22824" PostHistoryTypeId="2" PostId="10802" RevisionGUID="7c071080-9d02-4d6f-bcab-ede3072acc70" CreationDate="2011-04-07T21:43:05.457" UserId="6590" Text="I couldn't find good overview of those and decided to ask experienced people. I'm writing in C# and want to learn some 3D graphics stuff. I used to write some 3d scenes and shaders 4 years ago in DirectX SDK and C#. In fact, I started learning C# from those directx tutorials. So I'm already familiar with simple shaders, effects and meshes. Now I want to learn some more but I found out that DirectX SDK is no longer exists and Microsoft has developed XNA Game Studio instead. So, since I have to switch framework that I knew, I want to ask which one better suits my needs.&#xD;&#xA;&#xD;&#xA;Here is the list of my preferences:&#xD;&#xA;&#xD;&#xA; - I want is to write some game-like stuff. &#xD;&#xA; - I will use C# language. &#xD;&#xA; - Performance does not matter, I'm not going to write production quality code. &#xD;&#xA; - Ability to quickly write what I want does matter, I don't want to write lots of engine-kind stuff.&#xD;&#xA; - Engine architecture should be .NET-style (not just straightforward C++-like P/Invoke wrapper)&#xD;&#xA; - I will use external physics processing (PhysX I think)&#xD;&#xA; - I want to write lots of shaders, preferably in HLSL&#xD;&#xA; - I'm not going to add lots of content and assets, I'm even not going to ship the game. It'll be kind of testing-world app.&#xD;&#xA;&#xD;&#xA;So, basically I need framework, that will handle all game mechanics like setting up viewport, switching resolutions, model loading, animating, physics processing etc. and will let me place some objects to scene and customize their look and interaction parameters.&#xD;&#xA;&#xD;&#xA;What engine should I use? And why? I heard about XNA and OGRE, are there any other notable engines?" />
  <row Id="22825" PostHistoryTypeId="1" PostId="10802" RevisionGUID="7c071080-9d02-4d6f-bcab-ede3072acc70" CreationDate="2011-04-07T21:43:05.457" UserId="6590" Text="What good 3D graphic rendering engines are out there?" />
  <row Id="22826" PostHistoryTypeId="3" PostId="10802" RevisionGUID="7c071080-9d02-4d6f-bcab-ede3072acc70" CreationDate="2011-04-07T21:43:05.457" UserId="6590" Text="&lt;c#&gt;&lt;3d&gt;&lt;xna&gt;&lt;ogre&gt;" />
  <row Id="22827" PostHistoryTypeId="17" PostId="10802" RevisionGUID="ea2ae0d2-5d18-4f2b-bad3-3d15ee4ca5fb" CreationDate="2011-04-08T09:44:51.053" UserId="-1" Comment="from http://stackoverflow.com/questions/5588021/what-good-3d-graphic-rendering-engines-are-out-there" Text="" />
  <row Id="22828" PostHistoryTypeId="2" PostId="10807" RevisionGUID="b10d50c0-cf91-4ef9-b7ce-29dd05c9cb9d" CreationDate="2011-04-08T09:53:33.667" UserId="5515" Text="Lord of the Rings Online's client uses .NET 1.1. Not sure about the server. I think [Turbine](https://www.turbine.com/)'s games (LotRO, DDO, Asheron's Call) use .NET." />
  <row Id="22829" PostHistoryTypeId="2" PostId="10808" RevisionGUID="af1f8344-a0ad-45fc-9c1c-de9e3451ab4d" CreationDate="2011-04-08T10:46:33.430" UserId="6469" Text="My gf is a professional illustrator so I asked her to help me out on my latest game as I wanted more commercial level graphics.&#xD;&#xA;&#xD;&#xA;I now know why the credits at the end of the game go on for so long. &#xD;&#xA;&#xD;&#xA;In a 2d game each character sprite is drawn 30 to 40 times depending on the depth and that takes a lot of time. &#xD;&#xA;&#xD;&#xA;3D textures take even more time when you think of characters, terrain can be faked but character that include complex movement require a huge amount of graphical resources.&#xD;&#xA;&#xD;&#xA;The fact that you are asking such a question leads me to believe you have no idea just how much is required for a commercial quality game. Yes the programming plays a big part but the graphics take as long if not longer and you haven't even considered sound or plot.&#xD;&#xA;&#xD;&#xA;Bottom line time. " />
  <row Id="22830" PostHistoryTypeId="2" PostId="10809" RevisionGUID="820c820f-112e-466c-add1-84b731822f54" CreationDate="2011-04-08T10:47:22.660" UserId="6601" Text="I just started on a new project. In this project one of the main gameplay assets is that you can grab a ledge on certain points in a level and hang on to it.&#xD;&#xA;&#xD;&#xA;Now my question, since i've been wrestling with this for quite a while now. How could i actually try making this? I have tried it with animations but its just really ugly since the player will snap to a certain point where the animation starts.&#xD;&#xA;&#xD;&#xA;Just some tips would be great.&#xD;&#xA;&#xD;&#xA;Thanks verry much in advance.&#xD;&#xA;" />
  <row Id="22831" PostHistoryTypeId="1" PostId="10809" RevisionGUID="820c820f-112e-466c-add1-84b731822f54" CreationDate="2011-04-08T10:47:22.660" UserId="6601" Text="Ledge grab and climb in Unity3D" />
  <row Id="22832" PostHistoryTypeId="3" PostId="10809" RevisionGUID="820c820f-112e-466c-add1-84b731822f54" CreationDate="2011-04-08T10:47:22.660" UserId="6601" Text="&lt;animation&gt;&lt;unity&gt;&lt;javascript&gt;" />
  <row Id="22833" PostHistoryTypeId="2" PostId="10810" RevisionGUID="d7c60324-4409-421f-959b-6d05653587a3" CreationDate="2011-04-08T10:55:45.780" UserId="6469" Text="Maybe something like a height variable that gets updated each time the object moves.&#xD;&#xA;&#xD;&#xA;Run a basic sort algorithm and then you could loop through and draw each level.&#xD;&#xA;&#xD;&#xA;Unfortunately in game development I have found that everything is done the hard way.&#xD;&#xA;If you want to manipulate something you will have to track it, there is likely a trade off in starcraft (not everything tracked to save processing) and this can improve playability &#xD;&#xA;&#xD;&#xA;In the end though that is what being a programmer is all about.  &#xD;&#xA;&#xD;&#xA;" />
  <row Id="22834" PostHistoryTypeId="2" PostId="10811" RevisionGUID="3be1ff95-20d1-4d7d-a760-f04104f59cdd" CreationDate="2011-04-08T10:57:22.733" UserId="6601" Text="I have made some projects with Unity and am also not willing to pay big amounts of cash for good 3D models. &#xD;&#xA;So yes it is possible but for an exampe: At turbosquid if you search for the tag buildings you will find about 100 models. from wich 2 are good looking but Medieval themed. the rest is like a cube with a roof and 2 textures. &#xD;&#xA;My advice, what i did, get a little knowlege of a program like Maya or 3dsMax and im sure you'll be verry capable of making some decent models in a small timeframe.&#xD;&#xA;&#xD;&#xA;as for free models, it is possible. But quality wont be to high im afraid.&#xD;&#xA;&#xD;&#xA;Good luck on your project, it sounds like a verry fun game for the young ones =)" />
  <row Id="22835" PostHistoryTypeId="2" PostId="10812" RevisionGUID="bd496c76-a98d-4ef5-ad0d-5f8b35b21b4c" CreationDate="2011-04-08T11:03:18.813" UserId="6469" Text="Technology just is not as advanced as we think it is.&#xD;&#xA;&#xD;&#xA;You said the answer your self, &quot;the hardware of the day was not powerful enough&quot; and it's still not.&#xD;&#xA;&#xD;&#xA;The kinect is a massive leap forwards technologically not just another piece of retail hardware. &#xD;&#xA;&#xD;&#xA;To demonstrate my point nintendo released the wii motion plus for their controllers because they were not accurate enough for the newer game being developed.  " />
  <row Id="22836" PostHistoryTypeId="2" PostId="10813" RevisionGUID="7f69895a-94f0-405c-87d4-632145d1c781" CreationDate="2011-04-08T11:08:23.147" UserId="6469" Text="Try the pokemon clones.&#xD;&#xA;&#xD;&#xA;There is massive community dedicated to recreating the pokemon games from scratch and creating brand new games(new world/ diffrent badges).&#xD;&#xA;&#xD;&#xA;A lot of people there create sprites (mainly pokemon based), some will help you and in rare occasions I have seen requests. &#xD;&#xA;&#xD;&#xA;All they ask is the rightful credit for there work.  " />
  <row Id="22837" PostHistoryTypeId="5" PostId="10784" RevisionGUID="220e3be4-1d18-4c54-bc34-f00b4dc86923" CreationDate="2011-04-08T11:52:30.600" UserId="6588" Comment="added to answer" Text="Lua is a far more productive language than C++. I spent 6 months writing a game using C++ (not Airplay admittedly, I was using a different framework) and got about halfway through before I came to grips with how excessively long it was taking. Then I started using Corona three months ago and am about to release my game.&#xD;&#xA;&#xD;&#xA;Also, Lua is pretty similar to PHP so you shouldn't have any trouble picking it up in a weekend. Simpler actually&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Basically, the answer to both your questions boils down to it is much faster and easier to develop using Lua in Corona. Although they have differences in features (eg. Airplay deploys to more platforms but apparently lacks a web view) those pros and cons mostly cancel each other out, so the choice mostly comes down to the programming language." />
  <row Id="22838" PostHistoryTypeId="2" PostId="10814" RevisionGUID="04ac4c90-db5a-43c7-96da-1c2d9f8ff49b" CreationDate="2011-04-08T11:52:51.523" UserId="6469" Text="Before you down vote let me give some restrictions.&#xD;&#xA;&#xD;&#xA;I like RPG but they seem long and hard to make but after you make the framework the rest sort of falls into place where as platformers never get faster as each map starts from scratch.&#xD;&#xA;&#xD;&#xA;So under these conditions what is the easiest genre of game to develop as a hobby project.&#xD;&#xA;&#xD;&#xA;1. I am on my own.&#xD;&#xA;&#xD;&#xA;2. The style of graphics must be available. Can be ripped (not publishing).&#xD;&#xA;&#xD;&#xA;3. Not bothered about commercial quality.&#xD;&#xA;&#xD;&#xA;4. Must be real size game, multiple levels and stuff.&#xD;&#xA;&#xD;&#xA;Thanks " />
  <row Id="22839" PostHistoryTypeId="1" PostId="10814" RevisionGUID="04ac4c90-db5a-43c7-96da-1c2d9f8ff49b" CreationDate="2011-04-08T11:52:51.523" UserId="6469" Text="What is the easiest genre of game to make?" />
  <row Id="22840" PostHistoryTypeId="3" PostId="10814" RevisionGUID="04ac4c90-db5a-43c7-96da-1c2d9f8ff49b" CreationDate="2011-04-08T11:52:51.523" UserId="6469" Text="&lt;game-design&gt;" />
  <row Id="22841" PostHistoryTypeId="2" PostId="10815" RevisionGUID="b028ecf8-05d9-455a-8128-2189df825d8f" CreationDate="2011-04-08T11:56:27.253" UserId="2391" Text="The easiest kind of game to make, other than text adventure, is probably a Space Invaders style shmup. Many 2D game engines and libraries use this style of game for their tutorial. " />
  <row Id="22842" PostHistoryTypeId="2" PostId="10816" RevisionGUID="b487fcf1-5b9f-493d-97e4-9bc331bedeb9" CreationDate="2011-04-08T11:58:03.933" UserId="3794" Text="I have to say that you will not save any extra memory by using this. Textures are not stored in gpu's ram by the creation. They are sended after `SetResource(SRV)`. And cleared from gpu ram after the `SetResource(NULL)` call. That's the way how to save space. Always clear after your shader pass." />
  <row Id="22843" PostHistoryTypeId="25" PostId="10809" RevisionGUID="2eb9d9e3-1c5a-4892-bb9d-72b761798e3b" CreationDate="2011-04-08T12:09:03.377" Comment="http://twitter.com/#!/StackGameDev/status/56327693611974656" />
  <row Id="22844" PostHistoryTypeId="2" PostId="10817" RevisionGUID="db273d14-e28e-4808-b176-2962c2b5307c" CreationDate="2011-04-08T12:09:43.627" UserId="2158" Text="For a simple hobby project it is good idea to make a game which doesn't require much content. For example even if a 2D platformer game would be easy to program, it requires lots of good levels. If you create an RTS game with automatically generated levels, you still need several unit and building types and need to balance them.&#xD;&#xA;&#xD;&#xA;Try to start with game ideas where the engine makes the game. For example Asteroids style game can be simple to program and you can also get infinite amount of &quot;levels&quot; with very little effort. The faster you can make a playable and fun game the better. You can then improve it afterwards in many ways if you want to." />
  <row Id="22845" PostHistoryTypeId="2" PostId="10818" RevisionGUID="aa254a76-1876-4c99-9095-db8e687deead" CreationDate="2011-04-08T12:25:46.167" UserId="2913" Text="I agree with Apreche, a side-scrolling shoot 'em up is by far the easiest genre to create a simple game in.&#xD;&#xA;&#xD;&#xA;For the basic setup, all you need is three parts:&#xD;&#xA;&#xD;&#xA; - Player: Moves to where mouse is&#xD;&#xA; - Enemies: Move down- or left-ward, depending on if horizontal or vertical shooter&#xD;&#xA; - Bullets: Move opposite to Enemy direction&#xD;&#xA;&#xD;&#xA;Then you just need to add collision checks for Bullet-Enemy and Enemy-Player, and you've got a game.&#xD;&#xA;&#xD;&#xA;From there on, you can then expand upon your design, adding enemies that shoot back, power-ups, asteroids, points, etc. &#xD;&#xA;&#xD;&#xA;You can also easily try out adding all kinds of interesting &quot;features&quot; to your code-base before starting on a new project: AI finite state machines, spatial partitioning for collisions, particle systems, parallax scrolling, the list goes on and on.&#xD;&#xA;&#xD;&#xA;In short: As your first game, you want something that is easy to make, and easy to expand upon, making a SHMUP an excellent choice." />
  <row Id="22846" PostHistoryTypeId="2" PostId="10819" RevisionGUID="b6014c6b-cf64-4ecf-82f9-d3224fd60459" CreationDate="2011-04-08T12:26:34.057" UserId="6530" Text="So, I create a game in Flash and I want to keep a hi-score table for people to compete in.&#xD;&#xA;&#xD;&#xA;After a player has finished playing a game, the game needs to transmit the score (&amp; player's name etc) back to a central server, to store the results in a database, probably via a PHP web page for simplicity.&#xD;&#xA;&#xD;&#xA;All this is fine, but at this point nothing is stopping some 'clever' individual from sending a their own customised message directly to the PHP page and entering their own values directly into the hi-score tables, therefore cheating the data without even playing!&#xD;&#xA;&#xD;&#xA;So, what can I do to ensure that the data being sent is only validated if it comes from the game itself?" />
  <row Id="22847" PostHistoryTypeId="1" PostId="10819" RevisionGUID="b6014c6b-cf64-4ecf-82f9-d3224fd60459" CreationDate="2011-04-08T12:26:34.057" UserId="6530" Text="How can I secure a high score table?" />
  <row Id="22848" PostHistoryTypeId="3" PostId="10819" RevisionGUID="b6014c6b-cf64-4ecf-82f9-d3224fd60459" CreationDate="2011-04-08T12:26:34.057" UserId="6530" Text="&lt;flash&gt;&lt;server&gt;&lt;security&gt;&lt;data&gt;&lt;php&gt;" />
  <row Id="22849" PostHistoryTypeId="5" PostId="10819" RevisionGUID="8e185a2c-c4e9-4a3f-953f-2b082668588b" CreationDate="2011-04-08T12:39:25.260" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How can I prevent cheating on global highscore tables?](http://gamedev.stackexchange.com/questions/4181/how-can-i-prevent-cheating-on-global-highscore-tables)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;So, I create a game in Flash and I want to keep a hi-score table for people to compete in.&#xD;&#xA;&#xD;&#xA;After a player has finished playing a game, the game needs to transmit the score (&amp; player's name etc) back to a central server, to store the results in a database, probably via a PHP web page for simplicity.&#xD;&#xA;&#xD;&#xA;All this is fine, but at this point nothing is stopping some 'clever' individual from sending a their own customised message directly to the PHP page and entering their own values directly into the hi-score tables, therefore cheating the data without even playing!&#xD;&#xA;&#xD;&#xA;So, what can I do to ensure that the data being sent is only validated if it comes from the game itself?" />
  <row Id="22850" PostHistoryTypeId="10" PostId="10819" RevisionGUID="8c2e597b-b165-41a9-8324-590fcdebd85b" CreationDate="2011-04-08T12:39:24.963" UserId="189" CloseReasonId="1" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="22851" PostHistoryTypeId="2" PostId="10820" RevisionGUID="788db52f-766c-4920-aefa-ab4aae388f0f" CreationDate="2011-04-08T13:19:54.597" UserDisplayName="user8447" Text="I want to make a tower defence game in starcraft2 editor.&#xD;&#xA;How can i make a rally point to control AI appear at one point and go to specific point and how do i make creep spawning every specific time?" />
  <row Id="22852" PostHistoryTypeId="1" PostId="10820" RevisionGUID="788db52f-766c-4920-aefa-ab4aae388f0f" CreationDate="2011-04-08T13:19:54.597" UserDisplayName="user8447" Text="Need help with rally point and spawning in starcraft 2 editor" />
  <row Id="22853" PostHistoryTypeId="3" PostId="10820" RevisionGUID="788db52f-766c-4920-aefa-ab4aae388f0f" CreationDate="2011-04-08T13:19:54.597" UserDisplayName="user8447" Text="&lt;starcraft-2&gt;" />
  <row Id="22854" PostHistoryTypeId="17" PostId="10820" RevisionGUID="cdd28d8b-7e9a-468f-a267-087059ec844e" CreationDate="2011-04-08T13:45:19.607" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/19740/need-help-with-rally-point-and-spawning-in-starcraft-2-editor" Text="" />
  <row Id="22855" PostHistoryTypeId="5" PostId="10809" RevisionGUID="0661da02-3b64-4ec4-bdea-e1ad5ffcbea6" CreationDate="2011-04-08T13:46:16.093" UserId="51" Comment="deleted 80 characters in body" Text="I just started on a new project. In this project one of the main gameplay assets is that you can grab a ledge on certain points in a level and hang on to it.&#xD;&#xA;&#xD;&#xA;Now my question, since i've been wrestling with this for quite a while now. How could i actually try making this? I have tried it with animations but its just really ugly since the player will snap to a certain point where the animation starts.&#xD;&#xA;" />
  <row Id="22856" PostHistoryTypeId="2" PostId="10821" RevisionGUID="905342d1-ad38-4909-9fac-fbd07ee32fd8" CreationDate="2011-04-08T14:02:52.660" UserId="6395" Text="There must be some best practices on how you create your game architecture/skeleton. &#xD;&#xA;One of the best resources that I found is: &#xD;&#xA;http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;My primely focus is for iOS games using cocos2d. &#xD;&#xA;&#xD;&#xA;What is your know how on this topic?&#xD;&#xA;" />
  <row Id="22857" PostHistoryTypeId="1" PostId="10821" RevisionGUID="905342d1-ad38-4909-9fac-fbd07ee32fd8" CreationDate="2011-04-08T14:02:52.660" UserId="6395" Text="[iOS and general] What are the basics in game architecture? How do you create your game skeleton such that it doesn't stay in your way?" />
  <row Id="22858" PostHistoryTypeId="3" PostId="10821" RevisionGUID="905342d1-ad38-4909-9fac-fbd07ee32fd8" CreationDate="2011-04-08T14:02:52.660" UserId="6395" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;ios&gt;" />
  <row Id="22859" PostHistoryTypeId="2" PostId="10822" RevisionGUID="8928c182-71f9-4408-a93b-f19f8fa3a340" CreationDate="2011-04-08T14:08:11.297" UserId="2481" Text="I really want to get into Rocky mountain college of art+design(RMCAD), but I don't know if my skills are up to par with what they need. A representative came down toady and she told me the requirements for the Game Art degree. Turns out I don't need a portfolio, but I know it would definitely help me out with scholarships, acknowledgement of skill and so on. I want one for myself anyway. I have a few 'good' sketches and some other 'eh' sketches I don't think are anywhere near my best. I have some life drawings I've been working on as well. To improve my skill I decided to start over and I'm currently learning the human anatomy to draw better skeletons for my characters and such. I want to be a concept artist with characters and levels/buildings, but... I'm not the best at levels or buildings since I've never really drawn them before. My characters aren't the best, but I am improving. if anyone could help me, I'd greatly appreciate knowing what I should put in my portfolio, how to prepare for college, and etc. Note: The college is an actual college which is a plus because I can learn my major(Game art) plus a Minor like business or something else. Maybe architecture..." />
  <row Id="22860" PostHistoryTypeId="1" PostId="10822" RevisionGUID="8928c182-71f9-4408-a93b-f19f8fa3a340" CreationDate="2011-04-08T14:08:11.297" UserId="2481" Text="What do colleges such as Rocky Mountain College of art+design and Becker college look for in a game art portfolio?" />
  <row Id="22861" PostHistoryTypeId="3" PostId="10822" RevisionGUID="8928c182-71f9-4408-a93b-f19f8fa3a340" CreationDate="2011-04-08T14:08:11.297" UserId="2481" Text="&lt;game-design&gt;&lt;art&gt;&lt;portfolio&gt;" />
  <row Id="22862" PostHistoryTypeId="2" PostId="10823" RevisionGUID="a92cd0e4-a904-47c5-9e12-743026beda1f" CreationDate="2011-04-08T14:12:19.640" UserId="6592" Text="First off, study MVC architecture. I've done a lot of UI design and this has really helped me to understand these roles well.&#xD;&#xA;&#xD;&#xA;If you can, explain your code to someone -- even if they don't understand what you're talking about. I explain things to my wife all the time, and even though she's probably not even listening, it helps to clarify things for me simply by organizing my thoughts into words.&#xD;&#xA;&#xD;&#xA;Lastly, don't be afraid to rip the guts out of your code. If you find that something doesn't seem to work right, come up with a better way to do it and re-implement it, even if you have to tear half of it out to do so. A good revision management system can help here." />
  <row Id="22863" PostHistoryTypeId="2" PostId="10824" RevisionGUID="667fe2f7-1162-49b7-9377-5a15b836b245" CreationDate="2011-04-08T14:29:57.707" UserId="1330" Text="I am a programmer and have worked on games although never attempted design myself. I am now attempting to design a game myself, working with a modest team of programmers and artists.&#xD;&#xA;&#xD;&#xA;Game designers have been telling me it is important to establish the need your game fills, in order to develop a more complete vision of the product. I think in terms of mechanics and gameplay and am having trouble finding a &quot;hook,&quot; even in existing games.&#xD;&#xA;&#xD;&#xA;Any advice in identifying why a mechanic is fun, and what need a game fills, to help develop my own ideas is much appreciated." />
  <row Id="22864" PostHistoryTypeId="1" PostId="10824" RevisionGUID="667fe2f7-1162-49b7-9377-5a15b836b245" CreationDate="2011-04-08T14:29:57.707" UserId="1330" Text="The need your game fills. Establishing your &quot;hook.&quot;" />
  <row Id="22865" PostHistoryTypeId="3" PostId="10824" RevisionGUID="667fe2f7-1162-49b7-9377-5a15b836b245" CreationDate="2011-04-08T14:29:57.707" UserId="1330" Text="&lt;game-design&gt;" />
  <row Id="22866" PostHistoryTypeId="2" PostId="10825" RevisionGUID="c50ef2cb-85a0-40c2-b7e3-465686800a22" CreationDate="2011-04-08T14:48:56.253" UserId="6592" Text="I get most of my motivation, inspiration, and design ideas from playing other games. In fact, most of my motivating &quot;spark&quot; comes straight from the super nintendo emulator these days." />
  <row Id="22867" PostHistoryTypeId="17" PostId="10827" RevisionGUID="54c8a943-dda0-46ee-bff8-edda9e70652a" CreationDate="2011-04-08T14:51:33.310" UserId="-1" Comment="from http://stackoverflow.com/questions/5594500/free-background-music-for-free-game/5594534#5594534" Text="" />
  <row Id="22868" PostHistoryTypeId="2" PostId="10827" RevisionGUID="dcda0c83-b760-42ea-8953-fb2f9062fa55" CreationDate="2011-04-08T11:44:17.657" UserDisplayName="Jim" Text="you can try http://www.freesound.org/" />
  <row Id="22869" PostHistoryTypeId="2" PostId="10826" RevisionGUID="a54716a9-0ef4-4747-b284-cfa16c19dc7e" CreationDate="2011-04-08T11:40:45.690" UserDisplayName="guest86" Text="I have created a logic game and I simply can't find some discrete, appropriate and FREE background looping music :\ You know, something like &quot;C:\Windows\Media\onestop.midi&quot;.&#xD;&#xA;&#xD;&#xA;Do you know some website where i can find some free background music?" />
  <row Id="22870" PostHistoryTypeId="1" PostId="10826" RevisionGUID="a54716a9-0ef4-4747-b284-cfa16c19dc7e" CreationDate="2011-04-08T11:40:45.690" UserDisplayName="guest86" Text="free background music for free game" />
  <row Id="22871" PostHistoryTypeId="3" PostId="10826" RevisionGUID="a54716a9-0ef4-4747-b284-cfa16c19dc7e" CreationDate="2011-04-08T11:40:45.690" UserDisplayName="guest86" Text="&lt;music&gt;" />
  <row Id="22872" PostHistoryTypeId="17" PostId="10826" RevisionGUID="9d6aecad-fa96-409d-85db-55c578434c8c" CreationDate="2011-04-08T14:51:33.310" UserId="-1" Comment="from http://stackoverflow.com/questions/5594500/free-background-music-for-free-game" Text="" />
  <row Id="22873" PostHistoryTypeId="2" PostId="10828" RevisionGUID="ec0ebcb7-6853-4705-9d24-c581fcf13009" CreationDate="2011-04-08T15:01:21.613" UserId="6592" Text="Perhaps you could ask someone to make some for you? Let them know that you'll credit them in your game." />
  <row Id="22874" PostHistoryTypeId="2" PostId="10829" RevisionGUID="80d9ec71-9c06-4fd5-8e00-1ab17bc13b3e" CreationDate="2011-04-08T15:08:56.037" UserId="6605" Text="I'm very new to Android and OpenGL coding (I have previously used ogre3d).  I am trying to find an efficient way to load PNG textures.  It is currently taking around 8 secs to load 3 512x512 textures on a fairly fast phone (Motorola Defy)&#xD;&#xA;&#xD;&#xA;There seems to be a problem with the texture being upside-down (I used a Matrix to flip it below).  Secondly, the order of the colour channels are incompatible, therefore each pixel needs changed.  This (I believe) is the cause of the slowness, is there a way to make the BitmapFactory load it in a channel order that is compatible with opengl?   Is there a better approach here?&#xD;&#xA;&#xD;&#xA;Thanks for your help,&#xD;&#xA;&#xD;&#xA;Ash&#xD;&#xA;&#xD;&#xA;Here is the code: -&#xD;&#xA;&#xD;&#xA;    // Will load a texture out of a drawable resource file, and return an OpenGL texture ID:&#xD;&#xA;	private int loadTexture(GL10 gl, Context context, int resource, boolean loadMipMaps) {&#xD;&#xA;		// We need to flip the textures vertically:&#xD;&#xA;	    Matrix flip = new Matrix();&#xD;&#xA;	    flip.postScale(1f, -1f);&#xD;&#xA;	    &#xD;&#xA;	    // This will tell the BitmapFactory to not scale based on the device's pixel density:&#xD;&#xA;	    BitmapFactory.Options opts = new BitmapFactory.Options();&#xD;&#xA;	    opts.inScaled = false;&#xD;&#xA;	    &#xD;&#xA;	    // Load up, and flip the texture:&#xD;&#xA;	    Bitmap temp = BitmapFactory.decodeResource(context.getResources(), resource, opts);&#xD;&#xA;	    Bitmap bmp = Bitmap.createBitmap(temp, 0, 0, temp.getWidth(), temp.getHeight(), flip, true);&#xD;&#xA;	    temp.recycle();&#xD;&#xA;	    &#xD;&#xA;	    int id = loadTextureFromBmp(gl,bmp, true);&#xD;&#xA;	    &#xD;&#xA;	    bmp.recycle();&#xD;&#xA;	    &#xD;&#xA;	    return id;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	protected static int loadTextureFromBmp(GL10 gl, Bitmap bmp, boolean reverseRGB) {&#xD;&#xA;        ByteBuffer bb = ByteBuffer.allocateDirect(bmp.getHeight()*bmp.getWidth()*4);&#xD;&#xA;        bb.order(ByteOrder.nativeOrder());&#xD;&#xA;        IntBuffer ib = bb.asIntBuffer();&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        for (int y=bmp.getHeight()-1;y&gt;-1;y--)&#xD;&#xA;                for (int x=0;x&lt;bmp.getWidth();x++) {&#xD;&#xA;                        if (reverseRGB) {&#xD;&#xA;                                int px = bmp.getPixel(x,y);&#xD;&#xA;                                int alpha = (px &amp; 0xFF000000) &gt;&gt; 24;&#xD;&#xA;                                int red = (px &amp; 0xFF0000)&gt;&gt;16;&#xD;&#xA;                                int green = (px &amp; 0xFF00)&gt;&gt;8;&#xD;&#xA;                                int blue = (px &amp; 0xFF);&#xD;&#xA;                                ib.put((alpha &lt;&lt; 24) | (blue &lt;&lt; 16) | (green&lt;&lt;8) | (red));&#xD;&#xA;                                //ib.put(Integer.reverseBytes(bmp.getPixel(x, y)));&#xD;&#xA;                        }&#xD;&#xA;                        else {&#xD;&#xA;                                ib.put(bmp.getPixel(x,y));&#xD;&#xA;                        }&#xD;&#xA;                }&#xD;&#xA;        ib.position(0);&#xD;&#xA;        bb.position(0);&#xD;&#xA;&#xD;&#xA;        int[] tmp_tex = new int[1];&#xD;&#xA;&#xD;&#xA;        gl.glGenTextures(1, tmp_tex, 0);&#xD;&#xA;        int tex = tmp_tex[0];&#xD;&#xA;        gl.glBindTexture(GL10.GL_TEXTURE_2D, tex);&#xD;&#xA;        gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, bmp.getWidth(), bmp.getHeight(), 0, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, bb);&#xD;&#xA;        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);&#xD;&#xA;        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);&#xD;&#xA;&#xD;&#xA;        return tex;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22875" PostHistoryTypeId="1" PostId="10829" RevisionGUID="80d9ec71-9c06-4fd5-8e00-1ab17bc13b3e" CreationDate="2011-04-08T15:08:56.037" UserId="6605" Text="Loading PNG textures for use in Android OpenGL ES1" />
  <row Id="22876" PostHistoryTypeId="3" PostId="10829" RevisionGUID="80d9ec71-9c06-4fd5-8e00-1ab17bc13b3e" CreationDate="2011-04-08T15:08:56.037" UserId="6605" Text="&lt;opengl&gt;&lt;java&gt;&lt;android&gt;" />
  <row Id="22877" PostHistoryTypeId="25" PostId="10824" RevisionGUID="ef1b51d7-fba0-47c6-bded-27159f5b2284" CreationDate="2011-04-08T15:09:03.700" Comment="http://twitter.com/#!/StackGameDev/status/56372993856782337" />
  <row Id="22878" PostHistoryTypeId="2" PostId="10830" RevisionGUID="bc96c66f-6541-47f1-aff0-637dedaaf1a8" CreationDate="2011-04-08T15:13:26.470" UserId="6608" Text="Rogue-likes. &#xD;&#xA;Part of the genre is the ease of development. &#xD;&#xA;The curses libraries make the interface the easy and straight forward, leaving the backend to be as complicated and awesome as you want to make it. &#xD;&#xA;&#xD;&#xA;In 08 I participated in the 7 day roguelike challenge and went from stone-cold to a working game (albeit without much conflict other then falling damage). I had to pass on fencing and D&amp;D that week, but I still put in 40 hours at work. &#xD;&#xA;&#xD;&#xA;And the community is more or less friendly and helpful over on RGRD" />
  <row Id="22879" PostHistoryTypeId="5" PostId="10822" RevisionGUID="33f76d35-3738-408a-8483-fcd071b5d88a" CreationDate="2011-04-08T15:18:53.290" UserId="1430" Comment="deleted 5 characters in body; edited tags; edited title; added 39 characters in body; added 52 characters in body" Text="I really want to get into [Rocky Mountain College of Art and Design (RMCAD)][1], but I don't know if my skills are up to par. A representative came down today and she told me the requirements for the [Game Art degree][2]. Turns out I don't need a portfolio, but I know it would definitely help me out with scholarships, acknowledgement of skill and so on. I want one for myself anyway.&#xD;&#xA;&#xD;&#xA;I have a few 'good' sketches and some other 'eh' sketches I don't think are anywhere near my best. I have some life drawings I've been working on as well. To improve my skill I decided to start over and I'm currently learning the human anatomy to draw better skeletons for my characters and such.&#xD;&#xA;&#xD;&#xA;I want to be a concept artist with characters and levels/buildings, but... I'm not the best at levels or buildings since I've never really drawn them before. My characters aren't the best, but I am improving. if anyone could help me, I'd greatly appreciate knowing what I should put in my portfolio, how to prepare for college, and etc.&#xD;&#xA;&#xD;&#xA;Note: The college is an actual college which is a plus because I can learn my major (game art) plus a minor like business or something else. Maybe architecture...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rmcad.edu/&#xD;&#xA;  [2]: http://www.rmcad.edu/game-art/overview" />
  <row Id="22880" PostHistoryTypeId="4" PostId="10822" RevisionGUID="33f76d35-3738-408a-8483-fcd071b5d88a" CreationDate="2011-04-08T15:18:53.290" UserId="1430" Comment="deleted 5 characters in body; edited tags; edited title; added 39 characters in body; added 52 characters in body" Text="What do colleges such as Rocky Mountain College of Art and Design look for in a portfolio?" />
  <row Id="22881" PostHistoryTypeId="6" PostId="10822" RevisionGUID="33f76d35-3738-408a-8483-fcd071b5d88a" CreationDate="2011-04-08T15:18:53.290" UserId="1430" Comment="deleted 5 characters in body; edited tags; edited title; added 39 characters in body; added 52 characters in body" Text="&lt;art&gt;&lt;portfolio&gt;&lt;college&gt;" />
  <row Id="22882" PostHistoryTypeId="2" PostId="10831" RevisionGUID="de556e21-3e82-49f0-8769-2b61a2f7e43c" CreationDate="2011-04-08T15:19:19.593" UserId="6592" Text="Here's my code to load from a bitmap, which doesn't suffer from the same problems you describe, and looks  like it will accomplish the same thing:&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Helper method to load a GL texture from a bitmap&#xD;&#xA;	 *&#xD;&#xA;	 * Note that the caller should &quot;recycle&quot; the bitmap&#xD;&#xA;	 *&#xD;&#xA;	 * @return the ID of the texture returned from glGenTextures()&#xD;&#xA;	 */&#xD;&#xA;	public static int loadGLTextureFromBitmap( Bitmap bitmap, GL10 gl ) {&#xD;&#xA;&#xD;&#xA;		// Generate one texture pointer&#xD;&#xA;		int[] textureIds = new int[1];&#xD;&#xA;		gl.glGenTextures( 1, textureIds, 0 );&#xD;&#xA;&#xD;&#xA;		// bind this texture&#xD;&#xA;		gl.glBindTexture( GL10.GL_TEXTURE_2D, textureIds[0] );&#xD;&#xA;&#xD;&#xA;		// Create Nearest Filtered Texture&#xD;&#xA;		gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR );&#xD;&#xA;		gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR );&#xD;&#xA;&#xD;&#xA;		gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT );&#xD;&#xA;		gl.glTexParameterf( GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_REPEAT );&#xD;&#xA;&#xD;&#xA;		// Use the Android GLUtils to specify a two-dimensional texture image from our bitmap&#xD;&#xA;		GLUtils.texImage2D( GL10.GL_TEXTURE_2D, 0, bitmap, 0 );&#xD;&#xA;		&#xD;&#xA;		return textureIds[0];&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and to load from a resource, I call it via this method (i have another similar method that will create a bitmap from a file):&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Create a texture from a given resource&#xD;&#xA;	 * &#xD;&#xA;	 * @param resourceID the ID of the resource to be loaded&#xD;&#xA;	 * @param scaleToPO2 determines whether the image should be scaled up to the next highest power&#xD;&#xA;	 * of two, or whether it should be &quot;inset&quot; into such an image. Having textures that are&#xD;&#xA;	 * dimensions of some power-of-two is critical for performance in opengl.&#xD;&#xA;	 *&#xD;&#xA;	 * @return the ID of the texture returned from glGenTextures()&#xD;&#xA;	 */&#xD;&#xA;	public static int loadGLTextureFromResource( int resourceID, Context context, boolean scaleToPO2 ) {&#xD;&#xA;&#xD;&#xA;		// pull in the resource&#xD;&#xA;		Bitmap bitmap = null;&#xD;&#xA;		Resources resources = context.getResources();&#xD;&#xA;&#xD;&#xA;		Drawable image = resources.getDrawable( resourceID );&#xD;&#xA;		float density = resources.getDisplayMetrics().density;&#xD;&#xA;&#xD;&#xA;		int originalWidth = (int)(image.getIntrinsicWidth() / density);&#xD;&#xA;		int originalHeight = (int)(image.getIntrinsicHeight() / density);&#xD;&#xA;&#xD;&#xA;		int powWidth = getNextHighestPO2( originalWidth );&#xD;&#xA;		int powHeight = getNextHighestPO2( originalHeight );&#xD;&#xA;&#xD;&#xA;		if ( scaleToPO2 ) {&#xD;&#xA;			image.setBounds( 0, 0, powWidth, powHeight );&#xD;&#xA;		} else {&#xD;&#xA;			image.setBounds( 0, 0, originalWidth, originalHeight );&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		// Create an empty, mutable bitmap&#xD;&#xA;		bitmap = Bitmap.createBitmap( powWidth, powHeight, Bitmap.Config.ARGB_4444 );&#xD;&#xA;		// get a canvas to paint over the bitmap&#xD;&#xA;		Canvas canvas = new Canvas( bitmap );&#xD;&#xA;		bitmap.eraseColor(0);&#xD;&#xA;&#xD;&#xA;		image.draw( canvas ); // draw the image onto our bitmap&#xD;&#xA;&#xD;&#xA;		int textureId = loadGLTextureFromBitmap( bitmap );&#xD;&#xA;&#xD;&#xA;		bitmap.recycle();&#xD;&#xA;&#xD;&#xA;		return textureId;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and lastly, here's a utility to get the next-highest-power-of-two:&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Calculates the next highest power of two for a given integer.&#xD;&#xA;	 *&#xD;&#xA;	 * @param n the number&#xD;&#xA;	 * @return a power of two equal to or higher than n&#xD;&#xA;	 */&#xD;&#xA;	public static int getNextHighestPO2( int n ) {&#xD;&#xA;		n -= 1;&#xD;&#xA;		n = n | (n &gt;&gt; 1);&#xD;&#xA;		n = n | (n &gt;&gt; 2);&#xD;&#xA;		n = n | (n &gt;&gt; 4);&#xD;&#xA;		n = n | (n &gt;&gt; 8);&#xD;&#xA;		n = n | (n &gt;&gt; 16);&#xD;&#xA;		n = n | (n &gt;&gt; 32);&#xD;&#xA;		return n + 1;&#xD;&#xA;	}" />
  <row Id="22883" PostHistoryTypeId="2" PostId="10832" RevisionGUID="6a0323a5-d2b3-4244-8c9c-acacd09d7180" CreationDate="2011-04-08T15:21:08.523" UserId="2469" Text="Here is how I solved the problem. Turns out, using the D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX misc flag doesn't allow to save the texture to a file. So I used the D3D11_RESOURCE_MISC_SHARED flag instead with a regular mutex, without using the DXGIKeyedMutex stuff.&#xD;&#xA;&#xD;&#xA;Copy the back buffer to shared texture and create a shared handle:&#xD;&#xA;&#xD;&#xA;    D3D11_TEXTURE2D_DESC td;&#xD;&#xA;    backBuffer-&gt;GetDesc(&amp;td);&#xD;&#xA;    td.MiscFlags = D3D11_RESOURCE_MISC_SHARED;&#xD;&#xA;&#xD;&#xA;    this-&gt;_device-&gt;CreateTexture2D(&amp;td, 0, &amp;g_tex);&#xD;&#xA;    this-&gt;_context-&gt;CopyResource(g_tex, backBuffer);&#xD;&#xA;    IDXGIResource *dxgiResource = 0;&#xD;&#xA;    g_tex-&gt;QueryInterface(__uuidof(IDXGIResource), reinterpret_cast&lt;void **&gt;(&amp;dxgiResource));&#xD;&#xA;    dxgiResource-&gt;GetSharedHandle(&amp;g_shaderHandle);&#xD;&#xA;    dxgiResource-&gt;Release();&#xD;&#xA;    backBuffer-&gt;Release();&#xD;&#xA;&#xD;&#xA;Now that we have a shared copy of the back buffer and handle to it, we can save it to a file from another thread without hogging the device context:&#xD;&#xA;&#xD;&#xA;    // device_2 and context_2 are the &quot;secondary&quot; device and context&#xD;&#xA;    bool imgSaved = true;&#xD;&#xA;    ID3D11Texture2D *texture = 0;&#xD;&#xA;    HRESULT h = WaitForSingleObject(g_mutex, INFINITE);&#xD;&#xA;    if (h == WAIT_OBJECT_0)&#xD;&#xA;    {&#xD;&#xA;        // check to see if there is an image to save&#xD;&#xA;        if (wdata-&gt;hasFrame)&#xD;&#xA;        {&#xD;&#xA;            wdata-&gt;hasFrame = false;&#xD;&#xA;            imgSaved = false&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    ReleaseMutex(g_mutex);&#xD;&#xA;    if (!imgSaved)&#xD;&#xA;    {&#xD;&#xA;        device_2-&gt;OpenSharedResource(g_shaderHandle, __uuidof(ID3D11Texture2D), (LPVOID*)&amp;texture);&#xD;&#xA;        if (texture)&#xD;&#xA;        {&#xD;&#xA;            h = D3DX11SaveTextureToFile(context_2, texture, D3DX11_IFF_PNG, &quot;image.png&quot;);&#xD;&#xA;            texture-&gt;Release();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Basically this allows me to save HD screen captures without killing the frame rate because my device context is not stuck in the D3DX11SaveTextureToFile function, it's handled by the secondary context.&#xD;&#xA;On a side note, I've not tested it a whole lot, I just hack this together this morning, it might not work in some cases, but it solves the problem I had with the other flag, which caused empty images to be saved to file." />
  <row Id="22884" PostHistoryTypeId="5" PostId="10826" RevisionGUID="ac8b717b-9127-43fa-ae46-a1d4eedd318b" CreationDate="2011-04-08T15:23:03.497" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free music for my game?](http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have created a logic game and I simply can't find some discrete, appropriate and FREE background looping music :\ You know, something like &quot;C:\Windows\Media\onestop.midi&quot;.&#xD;&#xA;&#xD;&#xA;Do you know some website where i can find some free background music?" />
  <row Id="22885" PostHistoryTypeId="10" PostId="10826" RevisionGUID="2432a097-76bd-48e1-85b8-b522c69e28fa" CreationDate="2011-04-08T15:23:03.293" UserId="189" CloseReasonId="1" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="22886" PostHistoryTypeId="6" PostId="10822" RevisionGUID="7364a8b4-ee17-4715-9a8d-4133d2d0bcc6" CreationDate="2011-04-08T15:27:18.670" UserId="3588" Comment="Swapping college for the broader education tag - you probably don't need different tags to distinguish colleges, universities, institutes, or academies. ♪" Text="&lt;art&gt;&lt;education&gt;&lt;portfolio&gt;" />
  <row Id="22887" PostHistoryTypeId="24" PostId="10822" RevisionGUID="7364a8b4-ee17-4715-9a8d-4133d2d0bcc6" CreationDate="2011-04-08T15:27:18.670" Comment="Proposed by 3588 approved by 1156 edit id of 242" />
  <row Id="22888" PostHistoryTypeId="4" PostId="10821" RevisionGUID="3f019ee0-2512-4d72-8e39-f77e4da628d9" CreationDate="2011-04-08T15:29:02.303" UserId="1156" Comment="edited tags; edited title" Text="What are the basics in game architecture? How do you create your game skeleton such that it doesn't stay in your way?" />
  <row Id="22889" PostHistoryTypeId="6" PostId="10821" RevisionGUID="3f019ee0-2512-4d72-8e39-f77e4da628d9" CreationDate="2011-04-08T15:29:02.303" UserId="1156" Comment="edited tags; edited title" Text="&lt;architecture&gt;&lt;framework&gt;&lt;ios&gt;" />
  <row Id="22890" PostHistoryTypeId="2" PostId="10833" RevisionGUID="ca6f1fea-b656-4315-adb0-fb58c3066b3f" CreationDate="2011-04-08T15:29:56.623" UserId="1430" Text="While I'm not an artist, I think you've mostly answered your own questions:&#xD;&#xA;&#xD;&#xA;  1. While admissions to the Game Art program can be attained without a portfolio (you'll have to submit a personal statement instead, as noted in [the application checklist][1]), it may put you at a disadvantage. Applicants are &quot;encouraged&quot; to develop a portfolio prior to submitting an application.&#xD;&#xA;  2. Work on and practice what you believe you are weak at -- musculature, anatomy, and drawings of landscapes or buildings, apparently (based on your question). &#xD;&#xA;  3. Iterate on your work until you are proud of it. If you're not proud of it, why would you show it off?&#xD;&#xA;&#xD;&#xA;It's hard to say exactly what the school (or any school, for that matter) will look for in a portfolio. Some places might want to see only the best work you have to offer, some might want to see a range of your work to show how you have grown and developed on your own. Some may not care if you demonstrate a very narrow focus in terms of media or subject matter, other may consider that a negative and prefer that you show off a broad range of styles, approaches, and subjects.&#xD;&#xA;&#xD;&#xA;In the end, you have the most control over making *yourself* happy and satisfied with your portfolio. Focus on that more than what you think other people want to see in you; that alone will make you better, and should help open the doors you want as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rmcad.edu/apply-admission/application-checklist" />
  <row Id="22891" PostHistoryTypeId="2" PostId="10834" RevisionGUID="5c9d63d9-30f0-4e3c-9c2a-6a881cc99851" CreationDate="2011-04-08T15:34:11.500" UserId="5540" Text="Find your OWN need that wants to be filled. My personal game idea is something that I've searched high and low for, but I've not been able to find a great game to fill that void.&#xD;&#xA;&#xD;&#xA;Because I also have fairly typical interests, I get encouraged by the fact that my game will likely not fail. That it's something I really really want to play helps me keep motivated too.&#xD;&#xA;&#xD;&#xA;Minecraft (seems to by my favorite example these days) was built because Notch noticed a void that needed to be filled. He filled it and is now a multimillionaire. &#xD;&#xA;&#xD;&#xA;Find something missing and build that. It's the best reason for building a game ever. =)" />
  <row Id="22892" PostHistoryTypeId="2" PostId="10835" RevisionGUID="6fd8f86a-ca72-4492-8633-3db5fba15b7f" CreationDate="2011-04-08T15:34:38.650" UserId="4834" Text="In addition to MVC pattern as the other reader suggested, I would suggest you learn a little bit about discrete event simulation - because your game engine heart is basically that.&#xD;&#xA;&#xD;&#xA;In brief, that means:&#xD;&#xA;&#xD;&#xA;Your game is described by a model. A model is composed of game objects. In a real time strategy, this would be terrain, units, static objects (trees), buildings, players, etc. As time progresses, the model is repeatedly changed.&#xD;&#xA;&#xD;&#xA;Model your game elements as simulation entities which are scheduled to do actions at a given point in time. When selected at some point in time, each game element produces an action based on the current state of the game (the model). An action changes the game state, produces an event and schedules the game object that produced the action again at some time in the future.&#xD;&#xA;&#xD;&#xA;You can also have triggers - whenever a matching event (that an action created) is detected, a trigger is triggered (e.g. an action that moves a player character around produces a MoveEvent which can be detected by a CharacterEnteredRegion trigger, that then does something with the game state again - for instance, creates more monsters).&#xD;&#xA;&#xD;&#xA;I found this approach quite extensible and adaptable. In fact, it can be used both for real-time and turn-based games." />
  <row Id="22893" PostHistoryTypeId="5" PostId="10809" RevisionGUID="9b926666-83b0-44ef-ac89-47b92b5b0fda" CreationDate="2011-04-08T15:59:10.657" UserId="3588" Comment="Just some minor formatting that I saw while checking the tags. ♪" Text="I just started on a new project. In this project one of the main gameplay mechanics is that you can grab a ledge on certain points in a level and hang on to it.&#xD;&#xA;&#xD;&#xA;Now my question, since I've been wrestling with this for quite a while now. How could I actually implement this? I have tried it with animations, but it's just really ugly since the player will snap to a certain point where the animation starts.&#xD;&#xA;" />
  <row Id="22894" PostHistoryTypeId="24" PostId="10809" RevisionGUID="9b926666-83b0-44ef-ac89-47b92b5b0fda" CreationDate="2011-04-08T15:59:10.657" Comment="Proposed by 3588 approved by 14 edit id of 243" />
  <row Id="22895" PostHistoryTypeId="2" PostId="10836" RevisionGUID="9d01be2a-1b0e-49c1-9b72-5242268d1e0d" CreationDate="2011-04-08T16:04:41.757" UserId="-1" Text="" />
  <row Id="22896" PostHistoryTypeId="2" PostId="10837" RevisionGUID="62c2d47b-27fd-4ce0-b63f-c3dca87c2387" CreationDate="2011-04-08T16:04:41.757" UserId="-1" Text="" />
  <row Id="22897" PostHistoryTypeId="2" PostId="10838" RevisionGUID="a17bae96-bc94-4a58-9491-9a7a30170e78" CreationDate="2011-04-08T16:08:34.547" UserId="295" Text="You need both Locations and periodic events for the functionality you've described. Using locations, you can create a trigger to order all enemy units in location A to move to location B.&#xD;&#xA;&#xD;&#xA;Likewise, you can make another trigger to generate enemies in location A every x seconds (which can then be ordered by the first trigger to move towards the goal area)." />
  <row Id="22898" PostHistoryTypeId="5" PostId="10814" RevisionGUID="92fc53ae-ba72-4252-b445-02a25d4e4257" CreationDate="2011-04-08T16:13:55.857" UserId="6469" Comment="Added development languages" Text="Before you down vote let me give some restrictions.&#xD;&#xA;&#xD;&#xA;I like RPG but they seem long and hard to make but after you make the framework the rest sort of falls into place where as platformers never get faster as each map starts from scratch.&#xD;&#xA;&#xD;&#xA;So under these conditions what is the easiest genre of game to develop as a hobby project.&#xD;&#xA;&#xD;&#xA;1. I am on my own.&#xD;&#xA;&#xD;&#xA;2. The style of graphics must be available. Can be ripped (not publishing).&#xD;&#xA;&#xD;&#xA;3. Not bothered about commercial quality.&#xD;&#xA;&#xD;&#xA;4. Must be real size game, multiple levels and stuff.&#xD;&#xA;&#xD;&#xA;Thanks &#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;I build games in C++ and Direct x 9.c" />
  <row Id="22899" PostHistoryTypeId="2" PostId="10839" RevisionGUID="96cb6081-7c5c-4e97-93a4-187257f7cccd" CreationDate="2011-04-08T16:25:11.590" UserId="6592" Text="Just because your game operates and is drawn mostly in two dimensions doesn't mean you have to treat it in only two dimensions. You could add a height variable, but this really isn't any different than a third dimension (probably corresponding to a Z axis in your case).&#xD;&#xA;&#xD;&#xA;I would simply treat everything in 3D space, and track its x, y, and z coordinates. The latter (z) probably won't mean a whole lot, and most of your calculations can continue to ignore it. As a unit climbs a ramp or falls down a cliff, etc. you adjust its z coordinate.&#xD;&#xA;&#xD;&#xA;If you take this approach, you can solve your problem by letting OpenGL (or DirectX?) do the depth testing for you (though this would mean slightly more work for the GPU). Simply turn on the depth buffer / depth testing in your rendering engine and the GPU will take care to ensure that objects will not be drawn in front of objects that are &quot;nearer&quot; to the camera than them." />
  <row Id="22900" PostHistoryTypeId="2" PostId="10840" RevisionGUID="f0ce5ba1-8409-4674-a54c-caef4b23b6a2" CreationDate="2011-04-08T16:51:01.033" UserId="6365" Text="I feel that in order to create realistic real-life games, game developers need some ways to monitor the system itself i.e. players' moves, other events and the state of the system itself. I know that creation of profiling/tracing -systems is not that easy, look how many people have tried to do better coverage -program in Python and fell far away from the original coverage.py. I am may be associating profiling/tracing wrongly to this game-development phase of dynamic monitoring but I am interested to know where/how profiling and tracing -techniques such as pythonic sys.settrace() are used in game development? What is their purpose and what are the dynamic event monitoring systems really called? Game engine? Please, let me know whether there are some ready systems to advance in profiling/tracing -areas." />
  <row Id="22901" PostHistoryTypeId="1" PostId="10840" RevisionGUID="f0ce5ba1-8409-4674-a54c-caef4b23b6a2" CreationDate="2011-04-08T16:51:01.033" UserId="6365" Text="How are profiling- and tracing -techniques used in Game Development?" />
  <row Id="22902" PostHistoryTypeId="3" PostId="10840" RevisionGUID="f0ce5ba1-8409-4674-a54c-caef4b23b6a2" CreationDate="2011-04-08T16:51:01.033" UserId="6365" Text="&lt;profiling&gt;&lt;profiler&gt;" />
  <row Id="22903" PostHistoryTypeId="5" PostId="10840" RevisionGUID="b41a12b5-8e84-439c-998d-dffa427c9b2e" CreationDate="2011-04-08T16:57:33.087" UserId="6365" Comment="added 13 characters in body; added 6 characters in body" Text="I feel that in order to create realistic real-life games, game developers need some ways to monitor the system itself i.e. players' moves, other events and the state of the system itself. I know that creation of profiling/tracing -systems is not that easy, look how many people have tried to do better coverage -program in Python and fell far away from the original coverage.py. &#xD;&#xA;&#xD;&#xA; 1. I may be associating profiling/tracing wrongly to this game-development phase of dynamic monitoring but I am interested to know where/how profiling and tracing -techniques such as pythonic sys.settrace() are used in game development? &#xD;&#xA; 2. What is their purpose and what are the dynamic event monitoring systems really called? Game engines? &#xD;&#xA; 3. Are there some ready systems to advance/investigate profiling/tracing -areas in game development?" />
  <row Id="22904" PostHistoryTypeId="2" PostId="10841" RevisionGUID="9786ec0d-ca99-4196-9d6e-342d215568df" CreationDate="2011-04-08T16:59:01.777" UserId="6178" Text="I drew some icons to use on orthographic projection and instead of loading each icon file individually as a texture I thought of putting them all together in one single file. Now I have a file `72x36` which is not a **power of two**. This texture is divide in two icons, both with 36px wide.&#xD;&#xA;&#xD;&#xA;I didn't remember about this restriction when designing the texture but I eventually noticed it when the texture didn't load because I have an if statement checking if the texture is a power of two, if it's not, than the texture is not loaded. I commented that code to see if the texture loaded anyway and it did. The texture was loaded and properly applied to the area I wanted.&#xD;&#xA;&#xD;&#xA;To draw the first icon I do this:&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, gameTextures.hudKeys);&#xD;&#xA;    glBegin(GL_QUADS);&#xD;&#xA;    	glTexCoord2f(0, 0); glVertex2f(0, 36);&#xD;&#xA;    	glTexCoord2f(0.5, 0); glVertex2f(36, 36);&#xD;&#xA;    	glTexCoord2f(0.5, 1); glVertex2f(36, 0);&#xD;&#xA;    	glTexCoord2f(0, 1); glVertex2f(0, 0);&#xD;&#xA;    glEnd();&#xD;&#xA;&#xD;&#xA;And for the second this:&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, gameTextures.hudKeys);&#xD;&#xA;    glBegin(GL_QUADS);&#xD;&#xA;    	glTexCoord2f(0.5, 0); glVertex2f(0, 36);&#xD;&#xA;    	glTexCoord2f(1, 0); glVertex2f(36, 36);&#xD;&#xA;    	glTexCoord2f(1, 1); glVertex2f(36, 0);&#xD;&#xA;    	glTexCoord2f(0.5, 1); glVertex2f(0, 0);&#xD;&#xA;    glEnd();&#xD;&#xA;&#xD;&#xA;Which is easy to understand, I only use half of the texture depending on which icon I want.&#xD;&#xA;&#xD;&#xA;I don't want my icons to be distorted or stretched, the icons were designed with 36x36 in mind. If I use a power of 2 texture, for instance 128x64 (that's the lowest possible to fit a 72x36 texture), how do I properly map the 36x36 texture area I want to the quad?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Or maybe I can keep doing using this NPOT texture or should I still really create a power of 2 texture? How to fix the problem above then?" />
  <row Id="22905" PostHistoryTypeId="1" PostId="10841" RevisionGUID="9786ec0d-ca99-4196-9d6e-342d215568df" CreationDate="2011-04-08T16:59:01.777" UserId="6178" Text="Is it ok to use NPOT textures with OpenGL in this situation?" />
  <row Id="22906" PostHistoryTypeId="3" PostId="10841" RevisionGUID="9786ec0d-ca99-4196-9d6e-342d215568df" CreationDate="2011-04-08T16:59:01.777" UserId="6178" Text="&lt;opengl&gt;&lt;graphics&gt;&lt;textures&gt;" />
  <row Id="22907" PostHistoryTypeId="5" PostId="10837" RevisionGUID="dfd2f614-9a15-4fd2-bc3b-a279e33d1bc7" CreationDate="2011-04-08T16:59:40.973" UserId="3588" Comment="added 190 characters in body" Text="Another term for a high score table, a ranking system that displays how a player's performance compares against previous runs of the game. This is for questions about the the ranking system." />
  <row Id="22908" PostHistoryTypeId="24" PostId="10837" RevisionGUID="dfd2f614-9a15-4fd2-bc3b-a279e33d1bc7" CreationDate="2011-04-08T16:59:40.973" Comment="Proposed by 3588 approved by 51 edit id of 245" />
  <row Id="22909" PostHistoryTypeId="5" PostId="10836" RevisionGUID="c6887270-211a-4e84-a9fb-53951a341027" CreationDate="2011-04-08T16:59:43.687" UserId="3588" Comment="added 550 characters in body" Text="The original source of bragging rights in games. With the advent of online gaming, leaderboard systems now tend to span a global scope, rather than be limitted to a single machine or cabinet.&#xD;&#xA;&#xD;&#xA;Questions with this tag deal with the implementation, management, and maintenance of leaderboard systems in games. Questions about the design and balance of a scoring system, especially one independent of a high score table, do not use this tag.&#xD;&#xA;&#xD;&#xA;&lt;!-- TODO: When we get a score system tag, add that at the end. I'd suggest [tag:score-system] myself. --&gt;" />
  <row Id="22910" PostHistoryTypeId="24" PostId="10836" RevisionGUID="c6887270-211a-4e84-a9fb-53951a341027" CreationDate="2011-04-08T16:59:43.687" Comment="Proposed by 3588 approved by 51 edit id of 244" />
  <row Id="22911" PostHistoryTypeId="2" PostId="10842" RevisionGUID="38016309-3aff-4394-90ec-89827c1ddf98" CreationDate="2011-04-08T17:06:54.457" UserId="51" Text="Generally speaking you should use POT textures so you get the benefits of texture compression.  For example, a PVR compressed texture at 128x64 @ 4bpp is going to be smaller in video memory than an uncompressed 72x36.&#xD;&#xA;&#xD;&#xA;Calculating UVs is pretty simple.  Just plug in pixel values over the size (in pixels) of the source image.  So if you were to just expand the image you made to the next largest POT, the upper left bit of the second icon would be at ( 36/128, 0/64 ).  And so on." />
  <row Id="22912" PostHistoryTypeId="2" PostId="10843" RevisionGUID="89628735-2372-4c94-83da-6c64887d55ca" CreationDate="2011-04-08T17:07:10.743" UserId="1430" Text="There are two kinds of data we can profile, at the high level: &#xD;&#xA;&#xD;&#xA;  1. We can profile the execution of the program itself -- what functions are called when and where, how long they take, and what impact they have on the environment (allocations, locks, threads spawned, et cetera).&#xD;&#xA;&#xD;&#xA;  2. We can profile what the user is actually doing with the program -- where they are in the game when they die, where they are when they earn the most experience, what they spend the most money on, which skills they use most often.&#xD;&#xA;&#xD;&#xA;These aren't fundamentally different operations, really, although the type of data collected by each operation is pretty significant. The type of data collected by the first technique is generally reusable across many programs, whereas the second type of data tends to be more program/game specific (experience may not even exist in a particular game, for example).&#xD;&#xA;&#xD;&#xA;You have the right terminology for this kind of technology -- &quot;profiling,&quot; &quot;tracing,&quot; &quot;user monitoring&quot; and such are all appropriate terms. The technology itself is fairly straightforward to implement as well. The most basic approach just involves instrumenting code by calling a function that collects the desired data. You can then write that data to a log file or (most usefully) send it to a database for later querying and report generation.&#xD;&#xA;&#xD;&#xA;*Code coverage*, which you mention at one point, is a little more complex and difficult to get right (especially in more dynamic languages). It is more akin to the first technique, that is examining the state of your code rather than how users use your program." />
  <row Id="22913" PostHistoryTypeId="2" PostId="10844" RevisionGUID="cc462588-fc21-4174-98e6-5041a36459dc" CreationDate="2011-04-08T17:12:36.420" UserId="6592" Text="Combining images into a single texture is fine, but that texture really needs to be dimensions of P0T. You can avoid distortion by keeping up with the image size, its offset, and the texture size. &#xD;&#xA;&#xD;&#xA;For example, say you have two small 12x12 images that you load and want to combine. You'd need 24x12 for both, but this isn't a power of two, so you'd find the next highest POT dimensions and get 32x16. Now keep up with the image sizes, and their offsets, and when rendering use these to find your texture coordinates.&#xD;&#xA;&#xD;&#xA;I'll define some variables to walk through it:&#xD;&#xA;&#xD;&#xA;    tw, th = texture width (32) and texture height (16)&#xD;&#xA;    iw, ih = image width (12) and image height (12)&#xD;&#xA;    iox, ioy = image offset x (0 and 12) and y (0 and 0)&#xD;&#xA;&#xD;&#xA;so to draw a given image, you'd calculate your top left as:&#xD;&#xA;&#xD;&#xA;    (tw / iox), (th / ioy)&#xD;&#xA;&#xD;&#xA;and your bottom right as:&#xD;&#xA;&#xD;&#xA;&gt; (tw / (iox + iw)), (th / (ioy + ih))&#xD;&#xA;&#xD;&#xA;It helps to draw this out. The POT is very important, though! " />
  <row Id="22914" PostHistoryTypeId="2" PostId="10845" RevisionGUID="88fac95e-a7db-42a1-ae92-061088b94afc" CreationDate="2011-04-08T18:01:48.113" UserId="6588" Text="The less content a game requires, the easier it will be to develop. By &quot;content&quot; I'm referring to how many graphics you need to create, how many levels you need to design, how many sounds you need to record... basically all the work in game development other than the programming.&#xD;&#xA;&#xD;&#xA;There are games in every genre with small content requirements (eg. Space Invaders is a shmup with a limited set of enemies) but overall puzzle games require less content than other genres. Also almost all classic arcade games were made with little content (eg. Breakout was just the paddle, ball, and bricks.)" />
  <row Id="22915" PostHistoryTypeId="25" PostId="10841" RevisionGUID="2a15aa60-11d1-41c0-835b-c148a5ee5fbe" CreationDate="2011-04-08T18:09:03.943" Comment="http://twitter.com/#!/StackGameDev/status/56418293866708992" />
  <row Id="22916" PostHistoryTypeId="2" PostId="10846" RevisionGUID="90ef2933-cc16-4b63-8b38-446185893e09" CreationDate="2011-04-08T18:22:23.813" UserId="6588" Text="In a certain sense VR technologies are becoming very mainstream actually, as now every smartphone has motion sensors built-in. Similarly the Wii controller has very advanced motion sensors, and Kinect takes that even further.&#xD;&#xA;&#xD;&#xA;However if by &quot;VR gear&quot; you are particularly talking about Head-Mounted Displays, then the reason those have fallen out of favor is simple: people don't want to have big clunky displays strapped onto their heads." />
  <row Id="22917" PostHistoryTypeId="2" PostId="10847" RevisionGUID="d702b15a-2530-46bc-8ba1-cc8790ec3daf" CreationDate="2011-04-08T18:26:16.887" UserId="4234" Text="I need some help in 'camera maths'. I have a birds eye view of two characters. One character is static and the other can move. I would like the camera to always show both characters in full and, in order to simulate 'zooming out', I'm uniform-scaling the objects. The static character is always at the top of the screen and so the 'camera' can't move along the Y-axis (otherwise the static character would not be shown in whole). However, it can move along the X-axis as far as possible, until the screen reaches the side of the static character. How can I calculate the *minimum* distance the camera should zoom out in order to ensure that both objects are always on screen? &#xD;&#xA;&#xD;&#xA;I hope that makes sense, but I'd be happy to try and clarify it if need be. Thanks." />
  <row Id="22918" PostHistoryTypeId="1" PostId="10847" RevisionGUID="d702b15a-2530-46bc-8ba1-cc8790ec3daf" CreationDate="2011-04-08T18:26:16.887" UserId="4234" Text="Calculating camera zoom value (top-down)" />
  <row Id="22919" PostHistoryTypeId="3" PostId="10847" RevisionGUID="d702b15a-2530-46bc-8ba1-cc8790ec3daf" CreationDate="2011-04-08T18:26:16.887" UserId="4234" Text="&lt;2d&gt;&lt;c#&gt;&lt;math&gt;&lt;camera&gt;&lt;vector&gt;" />
  <row Id="22920" PostHistoryTypeId="2" PostId="10848" RevisionGUID="d877d26b-f502-4b57-a35f-1523014233f5" CreationDate="2011-04-08T18:30:36.070" UserId="6588" Text="Your title is a different question from your posted message. You should fix that. I'll answer the question from the title because I know that:&#xD;&#xA;&#xD;&#xA;An artist named Psionic has made lots of great tutorials about Cinema4D: http://www.psionic3d.co.uk/?page_id=171&#xD;&#xA;&#xD;&#xA;(scroll down to that section)" />
  <row Id="22921" PostHistoryTypeId="5" PostId="10845" RevisionGUID="7443c1e5-777d-4534-933f-7aa3055b15bb" CreationDate="2011-04-08T18:36:07.940" UserId="6588" Comment="deleted 57 characters in body" Text="The less content a game requires, the easier it will be to develop.&#xD;&#xA;&#xD;&#xA;There are games in every genre with small content requirements but overall puzzle games require less content than other genres. Also almost all classic arcade games were made with little content (eg. Breakout was just the paddle, ball, and bricks.)&#xD;&#xA;&#xD;&#xA;(By &quot;content&quot; I'm referring to how many graphics you need to create, how many levels you need to design, how many sounds you need to record... basically all the work in game development other than the programming.)" />
  <row Id="22922" PostHistoryTypeId="5" PostId="10751" RevisionGUID="2f147af3-889e-42ea-a92e-8356d9cc8b89" CreationDate="2011-04-08T18:44:43.790" UserId="1198" Comment="removed thanks signature" Text="I have made several games but they have all been space invaders or mario style.&#xD;&#xA;&#xD;&#xA;Following my last question (thank you for all the great answers) I am trying to write out a plot line and a plan for the events that will take place.&#xD;&#xA;&#xD;&#xA;The problem I am having is that my story's tend to resemble things that already exist like films or other games I have played. &#xD;&#xA;&#xD;&#xA;The events to feel like a mix of various other games I have played.&#xD;&#xA;&#xD;&#xA;So apart form become a more creative person does anyone have any advice. Has anyone written a fairly lengthy story for a game and have pointers or does anyone know any good books on the subject.&#xD;&#xA;&#xD;&#xA;Any thoughts would be welcome, story of event ideas to.&#xD;&#xA;&#xD;&#xA;FYI the game has a final fantasy style battle system and a pokemon catch/raise system. &#xD;&#xA;" />
  <row Id="22923" PostHistoryTypeId="24" PostId="10751" RevisionGUID="2f147af3-889e-42ea-a92e-8356d9cc8b89" CreationDate="2011-04-08T18:44:43.790" Comment="Proposed by 1198 approved by 14 edit id of 249" />
  <row Id="22924" PostHistoryTypeId="5" PostId="10829" RevisionGUID="2a5a3bf4-6490-4cfd-8933-f0372a787cb7" CreationDate="2011-04-08T18:44:47.953" UserId="1198" Comment="removed thanks signature" Text="I'm very new to Android and OpenGL coding (I have previously used ogre3d).  I am trying to find an efficient way to load PNG textures.  It is currently taking around 8 secs to load 3 512x512 textures on a fairly fast phone (Motorola Defy)&#xD;&#xA;&#xD;&#xA;There seems to be a problem with the texture being upside-down (I used a Matrix to flip it below).  Secondly, the order of the colour channels are incompatible, therefore each pixel needs changed.  This (I believe) is the cause of the slowness, is there a way to make the BitmapFactory load it in a channel order that is compatible with opengl?   Is there a better approach here?&#xD;&#xA;&#xD;&#xA;Here is the code: -&#xD;&#xA;&#xD;&#xA;    // Will load a texture out of a drawable resource file, and return an OpenGL texture ID:&#xD;&#xA;	private int loadTexture(GL10 gl, Context context, int resource, boolean loadMipMaps) {&#xD;&#xA;		// We need to flip the textures vertically:&#xD;&#xA;	    Matrix flip = new Matrix();&#xD;&#xA;	    flip.postScale(1f, -1f);&#xD;&#xA;	    &#xD;&#xA;	    // This will tell the BitmapFactory to not scale based on the device's pixel density:&#xD;&#xA;	    BitmapFactory.Options opts = new BitmapFactory.Options();&#xD;&#xA;	    opts.inScaled = false;&#xD;&#xA;	    &#xD;&#xA;	    // Load up, and flip the texture:&#xD;&#xA;	    Bitmap temp = BitmapFactory.decodeResource(context.getResources(), resource, opts);&#xD;&#xA;	    Bitmap bmp = Bitmap.createBitmap(temp, 0, 0, temp.getWidth(), temp.getHeight(), flip, true);&#xD;&#xA;	    temp.recycle();&#xD;&#xA;	    &#xD;&#xA;	    int id = loadTextureFromBmp(gl,bmp, true);&#xD;&#xA;	    &#xD;&#xA;	    bmp.recycle();&#xD;&#xA;	    &#xD;&#xA;	    return id;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	protected static int loadTextureFromBmp(GL10 gl, Bitmap bmp, boolean reverseRGB) {&#xD;&#xA;        ByteBuffer bb = ByteBuffer.allocateDirect(bmp.getHeight()*bmp.getWidth()*4);&#xD;&#xA;        bb.order(ByteOrder.nativeOrder());&#xD;&#xA;        IntBuffer ib = bb.asIntBuffer();&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        for (int y=bmp.getHeight()-1;y&gt;-1;y--)&#xD;&#xA;                for (int x=0;x&lt;bmp.getWidth();x++) {&#xD;&#xA;                        if (reverseRGB) {&#xD;&#xA;                                int px = bmp.getPixel(x,y);&#xD;&#xA;                                int alpha = (px &amp; 0xFF000000) &gt;&gt; 24;&#xD;&#xA;                                int red = (px &amp; 0xFF0000)&gt;&gt;16;&#xD;&#xA;                                int green = (px &amp; 0xFF00)&gt;&gt;8;&#xD;&#xA;                                int blue = (px &amp; 0xFF);&#xD;&#xA;                                ib.put((alpha &lt;&lt; 24) | (blue &lt;&lt; 16) | (green&lt;&lt;8) | (red));&#xD;&#xA;                                //ib.put(Integer.reverseBytes(bmp.getPixel(x, y)));&#xD;&#xA;                        }&#xD;&#xA;                        else {&#xD;&#xA;                                ib.put(bmp.getPixel(x,y));&#xD;&#xA;                        }&#xD;&#xA;                }&#xD;&#xA;        ib.position(0);&#xD;&#xA;        bb.position(0);&#xD;&#xA;&#xD;&#xA;        int[] tmp_tex = new int[1];&#xD;&#xA;&#xD;&#xA;        gl.glGenTextures(1, tmp_tex, 0);&#xD;&#xA;        int tex = tmp_tex[0];&#xD;&#xA;        gl.glBindTexture(GL10.GL_TEXTURE_2D, tex);&#xD;&#xA;        gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, bmp.getWidth(), bmp.getHeight(), 0, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, bb);&#xD;&#xA;        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);&#xD;&#xA;        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);&#xD;&#xA;&#xD;&#xA;        return tex;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22925" PostHistoryTypeId="24" PostId="10829" RevisionGUID="2a5a3bf4-6490-4cfd-8933-f0372a787cb7" CreationDate="2011-04-08T18:44:47.953" Comment="Proposed by 1198 approved by 14 edit id of 247" />
  <row Id="22926" PostHistoryTypeId="5" PostId="10388" RevisionGUID="f935afce-2c6a-4499-a682-f6ac0b0e34f6" CreationDate="2011-04-08T18:44:49.030" UserId="1198" Comment="removed thanks signature" Text="I am an MPhil student in Computing Science working on the problem of camera control in graphics. Though the literature of camera control dates back to the end of 1980s, the majority of them (up to my knowledge) is mainly academic and rarely used in games.&#xD;&#xA;&#xD;&#xA;Now part of my thesis should be dedicated to camera control methods used in games. But the problem is that I have not implemented all the games in the world, so I can't speak about them. But I suppose there are some references that game developers usually use.&#xD;&#xA;&#xD;&#xA;Can anybody help me with this? Even if it is from your own experience rather than a book." />
  <row Id="22927" PostHistoryTypeId="24" PostId="10388" RevisionGUID="f935afce-2c6a-4499-a682-f6ac0b0e34f6" CreationDate="2011-04-08T18:44:49.030" Comment="Proposed by 1198 approved by 14 edit id of 251" />
  <row Id="22928" PostHistoryTypeId="5" PostId="10238" RevisionGUID="b29a37c7-6226-44b6-b169-9e1df51da98f" CreationDate="2011-04-08T18:44:50.437" UserId="1198" Comment="removed thanks signature" Text="I am using the PictureBox class to create a checkerboard, and it not really working all that well. I've created the loop:&#xD;&#xA;&#xD;&#xA;    PictureBox[,] squares = new PictureBox[10,10];&#xD;&#xA;            for (int i = 0; i &lt; 10; i++)&#xD;&#xA;            {&#xD;&#xA;                for (int j = 0; j &lt; 10; j++)&#xD;&#xA;                {&#xD;&#xA;                    squares[i, j] = new PictureBox();&#xD;&#xA;                    squares[i,j].Image = Chess.Properties.Resources.square;&#xD;&#xA;                    squares[i, j].BackColor = Color.Transparent;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; 10; i++)&#xD;&#xA;            {&#xD;&#xA;                for(int j = 0; j &lt; 10; j++)&#xD;&#xA;                {&#xD;&#xA;                    squares[i, j].Location = new Point(i * 30, j * 30);&#xD;&#xA;                    this.Controls.Add(squares[i, j]);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;It's supposed to create a 10x10 grid, and I added the image into the application resources. Each square is 20x20 pixels, and I loop by column. I thought it would work, but all I get is 6 images and the size just gets smaller.&#xD;&#xA;&#xD;&#xA;Am I missing something? Or any good alternatives in creating a checkerboard without using PictureBox? Any thing with a MouseLeave, MouseHover, MouseClick, events I can use." />
  <row Id="22929" PostHistoryTypeId="24" PostId="10238" RevisionGUID="b29a37c7-6226-44b6-b169-9e1df51da98f" CreationDate="2011-04-08T18:44:50.437" Comment="Proposed by 1198 approved by 14 edit id of 252" />
  <row Id="22930" PostHistoryTypeId="5" PostId="10800" RevisionGUID="cac10b49-753a-4abf-bbc9-17143f6e82b1" CreationDate="2011-04-08T18:44:53.633" UserId="1198" Comment="removed thanks signature" Text="I was thinking about 2D games (like Starcraft), where the sprites are in two dimensions, but the objects that are &quot;higher&quot; in the screen are behind the other objects (I think this is obvious when you think that &quot;higher&quot; in the screen means &quot;far&quot; when simulating a 3D environment).&#xD;&#xA;&#xD;&#xA;But, how do you do this programmatically? It is a good idea to track every movement for every object, assigning object to different layers in order to simulate movement in that axis?&#xD;&#xA;&#xD;&#xA;Is there a better way?" />
  <row Id="22931" PostHistoryTypeId="24" PostId="10800" RevisionGUID="cac10b49-753a-4abf-bbc9-17143f6e82b1" CreationDate="2011-04-08T18:44:53.633" Comment="Proposed by 1198 approved by 14 edit id of 248" />
  <row Id="22932" PostHistoryTypeId="5" PostId="44" RevisionGUID="74f9698c-47b2-4404-b649-df44537587d4" CreationDate="2011-04-08T18:45:01.560" UserId="1198" Comment="removed thanks signature" Text="Do you have any Linux-specific game development resources?" />
  <row Id="22933" PostHistoryTypeId="24" PostId="44" RevisionGUID="74f9698c-47b2-4404-b649-df44537587d4" CreationDate="2011-04-08T18:45:01.560" Comment="Proposed by 1198 approved by 14 edit id of 246" />
  <row Id="22934" PostHistoryTypeId="5" PostId="10711" RevisionGUID="c3268484-b8ce-470f-a3ee-fb457fcb69e0" CreationDate="2011-04-08T18:45:01.683" UserId="1198" Comment="removed thanks signature" Text="I've been messing with Blender for over a year on and off and am ready to put a lot of sweat into making a great model for an iPhone app I'm working on. I wanting to learn tips and tricks on how to make great looking models and how to animate them well also. &#xD;&#xA;&#xD;&#xA;I know how to do key-frame animation, I just want to learn how to do it well. For instance, I have made a model that walks. Well, my walking animation is not the best and I want to improve it somehow. I want to learn how to move my model realistically. &#xD;&#xA;&#xD;&#xA;So does anyone have any resources that could help me with this?" />
  <row Id="22935" PostHistoryTypeId="24" PostId="10711" RevisionGUID="c3268484-b8ce-470f-a3ee-fb457fcb69e0" CreationDate="2011-04-08T18:45:01.683" Comment="Proposed by 1198 approved by 14 edit id of 250" />
  <row Id="22936" PostHistoryTypeId="2" PostId="10849" RevisionGUID="fb4706c8-1382-452c-9415-f9400dec3901" CreationDate="2011-04-08T18:51:01.490" UserId="-1" Text="" />
  <row Id="22937" PostHistoryTypeId="2" PostId="10850" RevisionGUID="5fccbf68-105b-42b9-b275-a6a06ff0159d" CreationDate="2011-04-08T18:51:01.490" UserId="-1" Text="" />
  <row Id="22938" PostHistoryTypeId="2" PostId="10851" RevisionGUID="4098aeaa-35ac-4b23-bb00-849a2dbec690" CreationDate="2011-04-08T18:52:47.883" UserId="6592" Text="I'll take a stab here... I think what you want is:&#xD;&#xA;&#xD;&#xA;    tan( 1/2 * field_of_view ) * ( 1/2 * distance_between_objects)&#xD;&#xA;&#xD;&#xA;Since you can't see my whiteboard, I'll try to describe the idea. Take your camera and your two objects, and draw a triangle between them. Now draw a line from your camera to the side of the triangle opposing it (and perpendicular to it). You now have two right triangles. You know the angle at your camera (1/2 * field_of_view) and the length of the line segment opposing it (1/2 * distance_between_objects). The tangent function, given the angle, will tell you the relationship between the length of your opposite side and your adjacent side, the first of which you know.&#xD;&#xA;&#xD;&#xA;The result is the distance from the line between the two objects (probably your ground plane) and where your camera should be. You probably want to add some &quot;padding&quot; to this so your objects aren't on the very edge of your view." />
  <row Id="22939" PostHistoryTypeId="2" PostId="10852" RevisionGUID="cb603273-f984-4428-83c9-3c9fe638cb0e" CreationDate="2011-04-08T19:02:43.200" UserId="6592" Text="http://www.blendercookie.com/2010/05/13/game-enginecharacter-part-1/&#xD;&#xA;&#xD;&#xA;This was very educational for me..." />
  <row Id="22940" PostHistoryTypeId="2" PostId="10853" RevisionGUID="87177b86-4b97-46d7-bda2-283005153d41" CreationDate="2011-04-08T19:30:12.597" UserId="1130" Text="There's a book soon to be released for 2.5: [Blender 2.5 Character Animation Cookbook][1]&#xD;&#xA;&#xD;&#xA;![blender 2.5 character animation][2]&#xD;&#xA;&#xD;&#xA;For 2.4 there is [Introducing Character Animation with Blender][3]:&#xD;&#xA;&#xD;&#xA;![introducing to blender character animation][4]&#xD;&#xA;&#xD;&#xA;but @stephelton recommendation is very good also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.packtpub.com/blender-2-5-character-animation-cookbook/book&#xD;&#xA;  [2]: http://i.stack.imgur.com/BlsHt.jpg&#xD;&#xA;  [3]: http://www.sybex.com/WileyCDA/SybexTitle/Introducing-Character-Animation-with-Blender.productCd-0470102608.html&#xD;&#xA;  [4]: http://i.stack.imgur.com/YbEhq.jpg" />
  <row Id="22941" PostHistoryTypeId="2" PostId="10854" RevisionGUID="a2504073-9b4e-4dca-bac1-d376da68074a" CreationDate="2011-04-08T19:30:12.813" UserId="6588" Text="I've been using [Texture Packer][1] to create sprites for my iPhone game. Another great tool is [Zwoptex][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.texturepacker.com/&#xD;&#xA;  [2]: http://zwoptexapp.com/" />
  <row Id="22942" PostHistoryTypeId="2" PostId="10855" RevisionGUID="419648c6-cfd8-4be4-bf1a-9c7a26fdcb44" CreationDate="2011-04-08T19:31:45.200" UserId="6588" Text="I've been using [Texture Packer][1] to create sprites for my iPhone game. It's similar to Zwoptex but has a free version.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.texturepacker.com/" />
  <row Id="22943" PostHistoryTypeId="5" PostId="10854" RevisionGUID="39f45c36-6577-4f70-b38e-120ff0118536" CreationDate="2011-04-08T19:44:50.637" UserId="6588" Comment="added 178 characters in body" Text="I've been using [Texture Packer][1] to create sprites for my iPhone game. It's similar to [Zwoptex][2] but has a free version. I'm porting a game originally developed in Flash, so I'm simply exporting each frame of the MovieClip to png and then importing those images in Texture Packer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.texturepacker.com/&#xD;&#xA;  [2]: http://zwoptexapp.com/" />
  <row Id="22944" PostHistoryTypeId="2" PostId="10856" RevisionGUID="883e10a5-aca3-4b4b-a0b4-554a9f31ecde" CreationDate="2011-04-08T20:46:38.003" UserId="6588" Text="If you simply set gravity to zero then the physics simulation works well for a top-down game." />
  <row Id="22945" PostHistoryTypeId="2" PostId="10857" RevisionGUID="6106c62c-5a2b-46e0-bd8e-892075b9b497" CreationDate="2011-04-08T20:54:34.050" UserId="6588" Text="You didn't specify the platform in your question, but since you are leaning toward Game Maker that clearly means you are developing a Windows game. There are of course many many tools you can use to make PC games, with lots of different pros and cons. Using XNA is an option I would strongly consider, but another great looking tool I recently learned of is:&#xD;&#xA;&#xD;&#xA;http://love2d.org/&#xD;&#xA;&#xD;&#xA;It uses Lua for doing the programming, and I have fallen in love with that language because I'm using Corona to develop an iPhone game." />
  <row Id="22946" PostHistoryTypeId="2" PostId="10858" RevisionGUID="7ef2cb91-6301-4885-9bf1-d4c5b8ffc969" CreationDate="2011-04-08T21:02:35.207" UserId="6440" Text="I have a small test environment where small point lights are scattered. Players should able to collect them.&#xD;&#xA;&#xD;&#xA;The collectible lights are rendered using a simple billboard technique where two triangles with a uniform color are rendered facing the camera and a gaussian is used as an alpha-map.&#xD;&#xA;&#xD;&#xA;    0/1     1/1&#xD;&#xA;    +---------+&#xD;&#xA;    ¦        /¦&#xD;&#xA;    ¦      /  ¦&#xD;&#xA;    ¦    /    ¦ u/v texture coordinates for alpha map (gaussian)   &#xD;&#xA;    ¦  /      ¦ every vertex has same color rgb(1, 1, 1)&#xD;&#xA;    ¦/        ¦&#xD;&#xA;    +---------+&#xD;&#xA;    0/0     1/0&#xD;&#xA;&#xD;&#xA;When a player collects a light, the idea is that the collected light is merged with the lights he already has collected. The players are currently rendered with the same method as the collectible lights, the collected light has influence when the lighting is calculated =&gt; higher light intensity.&#xD;&#xA;&#xD;&#xA;What I'm looking to do is to visualize the lights better. They look really boring the way they are rendered currently. Only good thing about them is that they do not influence the performance :-)&#xD;&#xA;&#xD;&#xA;The process of the light merge could for example be visualized in a way where all collected lights circle around as small pulsating glowing particles - sticking together to some extent - maybe some nice lines which travel with them - you know, like such a thing _should_ look like if it is a central part of a game.&#xD;&#xA;&#xD;&#xA;The problem is that I don't really find many resources over advanced shader effects. Most information found is over the basics (diffuse / specular shader - maybe some blurring) or does not involve the HLSL language which I use in XNA 4.0.&#xD;&#xA;&#xD;&#xA;I would appreciate any links to resources which could help me making more awesome light effects which could actually run on the xbox without running into performance issues. Basically, any techniques which involve rendering cool light orbs / beams etc. would be fine for the moment if the result i visually appealing." />
  <row Id="22947" PostHistoryTypeId="1" PostId="10858" RevisionGUID="7ef2cb91-6301-4885-9bf1-d4c5b8ffc969" CreationDate="2011-04-08T21:02:35.207" UserId="6440" Text="Rendering collections of light sources" />
  <row Id="22948" PostHistoryTypeId="3" PostId="10858" RevisionGUID="7ef2cb91-6301-4885-9bf1-d4c5b8ffc969" CreationDate="2011-04-08T21:02:35.207" UserId="6440" Text="&lt;xna&gt;&lt;shaders&gt;&lt;xbox360&gt;&lt;lighting&gt;&lt;hlsl&gt;" />
  <row Id="22949" PostHistoryTypeId="25" PostId="10814" RevisionGUID="f6910190-b7aa-4b56-855f-49eb7a8b641e" CreationDate="2011-04-08T21:09:03.977" Comment="http://twitter.com/#!/StackGameDev/status/56463591590739968" />
  <row Id="22950" PostHistoryTypeId="5" PostId="10711" RevisionGUID="e41f14ea-02a4-4ce3-88b8-28ed4a8c12eb" CreationDate="2011-04-08T21:14:42.570" UserId="3588" Comment="Added more tags, and did some touch up on the question for small grammar fixes. ♪" Text="I've been messing with Blender on and off for over a year, and am now ready to put a lot of sweat into making a great model for an iPhone app I'm working on. I want to learn tips and tricks on how to make great looking models and how to animate them as well. &#xD;&#xA;&#xD;&#xA;I know how to do key-frame animation, I just want to learn how to do it well. For instance, I have made a model that walks, but I want to improve it. I want to learn how make its movements realistic.&#xD;&#xA;&#xD;&#xA;Does anyone have any resources that could help me with this?" />
  <row Id="22951" PostHistoryTypeId="4" PostId="10711" RevisionGUID="e41f14ea-02a4-4ce3-88b8-28ed4a8c12eb" CreationDate="2011-04-08T21:14:42.570" UserId="3588" Comment="Added more tags, and did some touch up on the question for small grammar fixes. ♪" Text="Blender books for advanced character animation and modeling?" />
  <row Id="22952" PostHistoryTypeId="6" PostId="10711" RevisionGUID="e41f14ea-02a4-4ce3-88b8-28ed4a8c12eb" CreationDate="2011-04-08T21:14:42.570" UserId="3588" Comment="Added more tags, and did some touch up on the question for small grammar fixes. ♪" Text="&lt;animation&gt;&lt;books&gt;&lt;models&gt;&lt;blender&gt;" />
  <row Id="22953" PostHistoryTypeId="24" PostId="10711" RevisionGUID="e41f14ea-02a4-4ce3-88b8-28ed4a8c12eb" CreationDate="2011-04-08T21:14:42.570" Comment="Proposed by 3588 approved by 51 edit id of 255" />
  <row Id="22954" PostHistoryTypeId="5" PostId="10850" RevisionGUID="b3070fb1-d2ee-4435-8a0c-242db11fc240" CreationDate="2011-04-08T21:14:45.330" UserId="3588" Comment="added 258 characters in body" Text="A genre of action game typically involving the player controlling an entity which must shoot down waves upon waves of incoming enemies that come into the field. Most easily distinguished from first/third person shooters by the presence of a 2D playing field." />
  <row Id="22955" PostHistoryTypeId="24" PostId="10850" RevisionGUID="b3070fb1-d2ee-4435-8a0c-242db11fc240" CreationDate="2011-04-08T21:14:45.330" Comment="Proposed by 3588 approved by 51 edit id of 254" />
  <row Id="22956" PostHistoryTypeId="5" PostId="10849" RevisionGUID="2cfac3de-24b5-479c-bfd7-722499caeabe" CreationDate="2011-04-08T21:14:47.577" UserId="3588" Comment="added 2188 characters in body" Text="Use this tag if you're having questions or problems while developing a Shoot-Em-Up game of your own.&#xD;&#xA;&#xD;&#xA;The general goal of a **Shoot-Em-Up**, also known as a **Shmup** or **STG**, is to gun down all opposition in the stage. This kind of game is often categorized by large numbers of incoming enemies, dense projectile combat, fast-paced action, and a heavy focus on reflexive action from the player. Sometimes pattern memorization (of both enemy and bullet behavior) is the key to victory, other times it is the reaction speed and adaptability of the player. These qualities tend to lend themselves very strongly towards an arcade-style gameplay. &#xD;&#xA;&#xD;&#xA;Some of the more well known series of Shoot-Em-Ups include the *Gradius* series, *R-Type* series, and the *1945* series. The company [Cave](http://www.cave.co.jp/) ([wikipedia](http://en.wikipedia.org/wiki/Cave_(company))) is one of the most prolific developers of modern Shoot-Em-Ups.&#xD;&#xA;&#xD;&#xA;Because Shoot-Em-Ups represent a very wide category of games, they are often broken down into categories. For example, a Shoot-Em-Up is often classified as **fixed** (screen doesn't move, and the player can often only shoot in one direction) or **scrolling** (screen scrolls through a map, which may or may not have obstacles), the latter of which tends to be broken up into **horizontal scrolling**, **vertical scrolling**, or **free range** (all self-explanitory).&#xD;&#xA;&#xD;&#xA;These are often differentiated from First Person Shooter and Third Person Shooter games by the game field being a 2D plane rather than a 3D map. While the game may incorporate 3D graphics and even use projectiles in all directions, the playing field itself behaves like a 2D game. Due to this, **Rail Shooters** and **Run and Gun** games are often classified as being a class of Shoot-Em-Up.&#xD;&#xA;&#xD;&#xA;A sub-class of Shoot-Em-Up is called **Bullet Hell** or **Curtain Fire**. These feature immense density and complexity in enemy bullet patterns, often filling the screen with beautiful spreads of deadly color. To compensate, the player often has a smaller hitbox, and some measure of ability to assist in evading damage (special shield mechanic, slow down for finer movement, etc.)." />
  <row Id="22957" PostHistoryTypeId="24" PostId="10849" RevisionGUID="2cfac3de-24b5-479c-bfd7-722499caeabe" CreationDate="2011-04-08T21:14:47.577" Comment="Proposed by 3588 approved by 51 edit id of 253" />
  <row Id="22958" PostHistoryTypeId="10" PostId="44" RevisionGUID="197237e1-acc7-4012-a799-00f5a78652bb" CreationDate="2011-04-08T21:28:27.997" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="22959" PostHistoryTypeId="2" PostId="10859" RevisionGUID="a1c45cc3-904e-4e95-90c6-6f22fd00e0aa" CreationDate="2011-04-08T21:33:26.557" UserId="6562" Text="glVertexAttribPointer(index,  size,  type, normalized, stride,  pointer); &#xD;&#xA;&#xD;&#xA;If I use type=GL_UNSIGNED_BYTE and normalized=GL_TRUE&#xD;&#xA;&#xD;&#xA;how is it normalized?&#xD;&#xA;would the data be divided by 256 for normalization? or?&#xD;&#xA;This would mean there is no way to have a normalized value of '1.0f'.." />
  <row Id="22960" PostHistoryTypeId="1" PostId="10859" RevisionGUID="a1c45cc3-904e-4e95-90c6-6f22fd00e0aa" CreationDate="2011-04-08T21:33:26.557" UserId="6562" Text="glVertexAttribPointer normalization" />
  <row Id="22961" PostHistoryTypeId="3" PostId="10859" RevisionGUID="a1c45cc3-904e-4e95-90c6-6f22fd00e0aa" CreationDate="2011-04-08T21:33:26.557" UserId="6562" Text="&lt;opengl&gt;&lt;3d&gt;" />
  <row Id="22962" PostHistoryTypeId="2" PostId="10860" RevisionGUID="52afa136-0b1a-435b-82a0-8fc663d4bd0c" CreationDate="2011-04-08T21:51:46.267" UserId="6592" Text="From the manual,&#xD;&#xA;&#xD;&#xA;&gt; If set to GL_TRUE, normalized indicates that values stored in an integer format are to be mapped to the range [-1,1] (for signed values) or [0,1] (for unsigned values) when they are accessed and converted to floating point.&#xD;&#xA;&#xD;&#xA;I take that to mean that, with an unsigned 8 bit type, 0 would map to 0.0f and 255 would map to 1.0f." />
  <row Id="22963" PostHistoryTypeId="2" PostId="10861" RevisionGUID="bed5501c-3345-4ae8-8411-8abac858f42c" CreationDate="2011-04-08T21:53:55.657" UserId="4496" Text="Motion and such will help, but what it sounds like might be an answer for what you're going for is a way to cause them to look more &quot;glowy&quot;.&#xD;&#xA;&#xD;&#xA;The key to making something look more lit in your scene is by darkening everything else.  From there little things like over-saturation of color (leading to light colors washing out to white) and just plain being more lit than the ambient scene will do a lot to add to the effect.  &#xD;&#xA;&#xD;&#xA;One of the easiest and least intensive ways I can see to get this effect given what you have described would be to go with an additive blend with the scene.  Make your individual motes of light have a 70-80% alpha center, before lowering the alpha rather quickly as you travel outward.  Make sure if you do this to leave a rather wide (2-3x size of center) ring of very low alpha.  &#xD;&#xA;&#xD;&#xA;Now this area will be almost imperceptible when blended with the scene alone, but as you gather multiple together, the different slightly shaded areas will overlap causing a more general glow to the whole collection.  On top of that, the field does not have to be uniform, and you can leave streaks of slightly more alpha areas in the texture to cause light beams to be hinted at.  You'll probably want to rotate the texture over time so the lines don't look static, but overall the effect will cause the bits of light to look more like just that and less like little floating balls.&#xD;&#xA;&#xD;&#xA;Hopefully this helps.  It's not exactly advanced shader work, but I find sometimes the more simple effects can give a quite satisfactory look.  Consider throwing in a soft particle effect as well to allow the lights to leave slight trails or other effects in the player's vision.  Happy coding!" />
  <row Id="22964" PostHistoryTypeId="2" PostId="10862" RevisionGUID="e8d7a7d4-83f1-4461-a8e0-c60d134c2f9a" CreationDate="2011-04-08T21:57:49.010" UserId="6383" Text="'m currently working on a Worms game which involves terrain deformation. I used to do it with .GetData, modifying the color array, then using .SetData, but I looked into changing it to make the work done on the GPU instead (using RenderTargets).&#xD;&#xA;&#xD;&#xA;All is going well with that, but I have come into another problem. My whole collision detection against the terrain was based on a Color array representing the terrain, but I do not have that color array anymore. I could use .GetData every time I modify the terrain to update my Color array, but that would defeat the purpose of my initial changes.&#xD;&#xA;&#xD;&#xA;What I would be okay with is using GetData once at the beginning, and then modifying that array based on the changes I make to the terrain later on by some other means. I do not know how I would do this though, can anyone help?" />
  <row Id="22965" PostHistoryTypeId="1" PostId="10862" RevisionGUID="e8d7a7d4-83f1-4461-a8e0-c60d134c2f9a" CreationDate="2011-04-08T21:57:49.010" UserId="6383" Text="XNA 2D Collision Detection without GetData()" />
  <row Id="22966" PostHistoryTypeId="3" PostId="10862" RevisionGUID="e8d7a7d4-83f1-4461-a8e0-c60d134c2f9a" CreationDate="2011-04-08T21:57:49.010" UserId="6383" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="22967" PostHistoryTypeId="2" PostId="10863" RevisionGUID="934c4f56-a5e7-408d-a45f-edea280b67a3" CreationDate="2011-04-08T22:18:23.837" UserId="5007" Text="As jhocking said, its the same using Box2D for a side or top view.&#xD;&#xA;&#xD;&#xA;Just disable gravity and play with depths using the colision filtering in the box2D manual.&#xD;&#xA;&#xD;&#xA;because there will be no gravity force, the objects will be &quot;lighter&quot; than normal, when pushing them. Play with the masses and the forces to achieve equivalent results.&#xD;&#xA;&#xD;&#xA;What you refered to as damping, should be the common friction in Box2D, i think. and as for checking limits of your levels, there are sensors. shapes that will tell you when something passes over :)&#xD;&#xA;" />
  <row Id="22968" PostHistoryTypeId="25" PostId="10858" RevisionGUID="10e0dcbe-7e07-42cc-b20d-10f7f8455357" CreationDate="2011-04-09T00:09:03.897" Comment="http://twitter.com/#!/StackGameDev/status/56508890182975489" />
  <row Id="22969" PostHistoryTypeId="2" PostId="10864" RevisionGUID="7051a2cb-a1e2-4c9a-bade-978c0e5fbe45" CreationDate="2011-04-09T02:24:27.207" UserId="6588" Text="**Economics**&#xD;&#xA;&#xD;&#xA;Principles learned in economics are very useful in many parts of game development. I'm not only talking about money either; economic principles apply to decisions players make about about everything from whether or not to pick up the health pack to choosing which path to take, and thus knowing economic principles can help make your game designs much stronger." />
  <row Id="22970" PostHistoryTypeId="25" PostId="10862" RevisionGUID="75ffeb1f-1ebe-4fcc-b771-15de4c1802d5" CreationDate="2011-04-09T03:09:03.517" Comment="http://twitter.com/#!/StackGameDev/status/56554187521146880" />
  <row Id="22971" PostHistoryTypeId="2" PostId="10865" RevisionGUID="9d73d50a-a553-4a4e-b78a-5b325b5bab45" CreationDate="2011-04-09T03:18:39.060" UserId="982" Text="I am interested in making a simple 3D game this summer, and I'd prefer if it were playable in a browser. My choices I am considering are Unity and WebGL. Currently I have no experience in either. But I have taken an introduction course to OpenGL. As well I will later be taking a course that will use Unity. I have some C# experience, but no web background.&#xD;&#xA;&#xD;&#xA;The factors I'm considering are ease to learn and the penetration each has. I know Unity games can be uploaded to Kongregate, which seems like a pretty big deal if I made a game that would be somewhat successful. But of course that may not be the case at all.&#xD;&#xA;&#xD;&#xA;Which way should I lean? Personally I think learning WebGL would be the easiest transition, but I am not sure" />
  <row Id="22972" PostHistoryTypeId="1" PostId="10865" RevisionGUID="9d73d50a-a553-4a4e-b78a-5b325b5bab45" CreationDate="2011-04-09T03:18:39.060" UserId="982" Text="Unity3d or WebGL: Where should I go?" />
  <row Id="22973" PostHistoryTypeId="3" PostId="10865" RevisionGUID="9d73d50a-a553-4a4e-b78a-5b325b5bab45" CreationDate="2011-04-09T03:18:39.060" UserId="982" Text="&lt;unity&gt;&lt;webgl&gt;" />
  <row Id="22974" PostHistoryTypeId="2" PostId="10866" RevisionGUID="a2d324cf-8ef2-4095-846c-0c4f9d63dbf6" CreationDate="2011-04-09T04:21:51.243" UserId="6588" Text="Unity is by far the easier option and thus the one I would recommend. Especially considering you have no previous experience developing a 3D game, you want to pick the simplest solution possible in order to complete your game in such a short time frame.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That said, there is one significant advantage to WebGL in your situation, so this advantage may be enough to sway your decision. Working with WebGL will teach you a lot more about how 3D graphics and 3D renderers work under the hood. If you are planning to be an engine programmer then you will need to learn that stuff.&#xD;&#xA;&#xD;&#xA;Take a look at this link, because it is very useful for you to see in evaluating which technology you wish to use: http://learningwebgl.com/blog/?page_id=1217&#xD;&#xA;&#xD;&#xA;Notice that after 16 lessons it's still nowhere near a complete game." />
  <row Id="22975" PostHistoryTypeId="2" PostId="10867" RevisionGUID="fa61f0cb-ada2-4008-b67b-4c803d0598dd" CreationDate="2011-04-09T04:46:15.360" UserId="6383" Text="I've done a bit of research, and I have yet to find a solution to getting rid of any GetData calls every time my terrain is modified, but I have found ways to &quot;optimize&quot; it, or at least reduce the GetData calls as much as possible.&#xD;&#xA;&#xD;&#xA;* Crater drawing is batched, meaning that rather than draw each one as it’s created, I add them to a list and draw all of them every few frames. This reduces the number of GetData calls – one per batch of craters rather than one per crater.&#xD;&#xA;&#xD;&#xA;* After drawing craters to the render target, I wait a few frames before calling GetData to make sure the GPU has processed all of the drawing commands. This minimizes pipeline stalls.&#xD;&#xA;&#xD;&#xA;* If I have a pending GetData call to make and more craters come in, the craters will stay batched until the GetData call is complete.  In other words, the drawing and getting are synchronized so that a GetData call always happens several frames after drawing a batch of craters, and any new crater draw requests wait until after a pending GetData.&#xD;&#xA;&#xD;&#xA;If anyone else has any other suggestions I would still be glad to hear them." />
  <row Id="22976" PostHistoryTypeId="2" PostId="10868" RevisionGUID="66d3b2a4-accc-4e54-88f4-751df82d6dfe" CreationDate="2011-04-09T05:06:18.213" UserId="6214" Text="It seems to me if that were the case that your directory of saved binaries or serialized objects could get massive real quick. Is there some sort of strategy being employed on top of the State pattern that is optimizing each time stamped saved game so that it isn't saving the entire game &quot;context&quot; all the time?" />
  <row Id="22977" PostHistoryTypeId="1" PostId="10868" RevisionGUID="66d3b2a4-accc-4e54-88f4-751df82d6dfe" CreationDate="2011-04-09T05:06:18.213" UserId="6214" Text="For games that time stamp a saved game (think Half-Life), is the entire game state really being saved every time?" />
  <row Id="22978" PostHistoryTypeId="3" PostId="10868" RevisionGUID="66d3b2a4-accc-4e54-88f4-751df82d6dfe" CreationDate="2011-04-09T05:06:18.213" UserId="6214" Text="&lt;game-design&gt;&lt;state&gt;" />
  <row Id="22979" PostHistoryTypeId="25" PostId="10868" RevisionGUID="9beb1ea6-67d4-459e-aab7-84d31fe64373" CreationDate="2011-04-09T06:09:04.170" Comment="http://twitter.com/#!/StackGameDev/status/56599487820464128" />
  <row Id="22981" PostHistoryTypeId="2" PostId="10869" RevisionGUID="08aa94f1-bbe0-421f-9a41-0ecf202f89c3" CreationDate="2011-04-09T07:55:00.950" UserId="5021" Text="The XBOX is very picky about which WMVs it will play. The fix is to encode a WMV with Windows Movie Maker -- encoding in After Effects creates WMVs that the XBOX 360 will not play." />
  <row Id="22982" PostHistoryTypeId="2" PostId="10870" RevisionGUID="ed18d7c2-7f0b-4cc8-9be6-6debc4c4b85e" CreationDate="2011-04-09T08:19:48.870" UserId="3264" Text="I saw a lot of books which cover specific topics, but is there a book or a recommendation of a few books which covers the basic of everything involved in making a game? I know this would only cover the basics, but that would be a good starting point to later read more into specific topics." />
  <row Id="22983" PostHistoryTypeId="1" PostId="10870" RevisionGUID="ed18d7c2-7f0b-4cc8-9be6-6debc4c4b85e" CreationDate="2011-04-09T08:19:48.870" UserId="3264" Text="Good introduction to all things game dev?" />
  <row Id="22984" PostHistoryTypeId="3" PostId="10870" RevisionGUID="ed18d7c2-7f0b-4cc8-9be6-6debc4c4b85e" CreationDate="2011-04-09T08:19:48.870" UserId="3264" Text="&lt;books&gt;" />
  <row Id="22985" PostHistoryTypeId="5" PostId="10858" RevisionGUID="a2572718-d417-437e-9aa5-15ee0e4943e6" CreationDate="2011-04-09T08:36:06.223" UserId="6440" Comment="added 72 characters in body" Text="I have a small test environment where small point lights are scattered. Players should able to collect them.&#xD;&#xA;&#xD;&#xA;The collectible lights are rendered using a simple billboard technique where two triangles with a uniform color are rendered facing the camera and a gaussian is used as an alpha-map.&#xD;&#xA;&#xD;&#xA;    0/1     1/1&#xD;&#xA;    +---------+&#xD;&#xA;    ¦        /¦&#xD;&#xA;    ¦      /  ¦&#xD;&#xA;    ¦    /    ¦ u/v texture coordinates for alpha map (gaussian)   &#xD;&#xA;    ¦  /      ¦ every vertex has same color rgb(1, 1, 1)&#xD;&#xA;    ¦/        ¦&#xD;&#xA;    +---------+&#xD;&#xA;    0/0     1/0&#xD;&#xA;&#xD;&#xA;When a player collects a light, the idea is that the collected light is merged with the lights he already has collected. The players are currently rendered with the same method as the collectible lights, the collected light has influence when the lighting is calculated =&gt; higher light intensity.&#xD;&#xA;&#xD;&#xA;![Light as it looks now][1]&#xD;&#xA;&#xD;&#xA;What I'm looking to do is to visualize the lights better. They look really boring the way they are rendered currently. Only good thing about them is that they do not influence the performance :-)&#xD;&#xA;&#xD;&#xA;The process of the light merge could for example be visualized in a way where all collected lights circle around as small pulsating glowing particles - sticking together to some extent - maybe some nice lines which travel with them - you know, like such a thing _should_ look like if it is a central part of a game.&#xD;&#xA;&#xD;&#xA;The problem is that I don't really find many resources over advanced shader effects. Most information found is over the basics (diffuse / specular shader - maybe some blurring) or does not involve the HLSL language which I use in XNA 4.0.&#xD;&#xA;&#xD;&#xA;I would appreciate any links to resources which could help me making more awesome light effects which could actually run on the xbox without running into performance issues. Basically, any techniques which involve rendering cool light orbs / beams etc. would be fine for the moment if the result i visually appealing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/UPbEH.png" />
  <row Id="22986" PostHistoryTypeId="25" PostId="10870" RevisionGUID="460e38c8-9af3-4840-a98b-a7a695d39485" CreationDate="2011-04-09T09:09:03.803" Comment="http://twitter.com/#!/StackGameDev/status/56644785234116608" />
  <row Id="22987" PostHistoryTypeId="2" PostId="10871" RevisionGUID="851996f6-504c-4e53-841f-1e2aa2f36c7e" CreationDate="2011-04-09T09:21:54.613" UserId="5810" Text="From what I have seen It is my firm opinion that what is plaguing open source games is actually gameplay and engines.&#xD;&#xA;&#xD;&#xA;It actually stands to reason as uninteresting or &quot;alpha&quot; gameplay will not interest anyone,and if the engine is limited it might deter artist since they can't reach an acceptable level of quality or style.&#xD;&#xA;&#xD;&#xA;Most games with solid interesting gameplay and a solid engine I have not seen to have bad art.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="22988" PostHistoryTypeId="2" PostId="10872" RevisionGUID="6ca29c06-34b7-4017-90b5-9ee2a1a6e89d" CreationDate="2011-04-09T09:22:52.957" UserId="3822" Text="If you're about C++ game development then.. &#xD;&#xA;&#xD;&#xA;Steve Rabin's Introduction to Game Development 2nd Edition. &#xD;&#xA;&#xD;&#xA;Mike McShaffrey's Game Coding Complete 3rd Edition. &#xD;&#xA;&#xD;&#xA;Gregory and Lander's Game Engine Architecture. &#xD;&#xA;&#xD;&#xA;If you just want an overview of general game development (non C++ specific) then might be better to look elsewhere..." />
  <row Id="22989" PostHistoryTypeId="2" PostId="10873" RevisionGUID="9294a3bf-56a3-48fa-8922-15b4ba35120c" CreationDate="2011-04-09T10:10:57.847" UserId="142" Text="I think you may be over estimating the size of that data and/or underestimating the size of what is saved. Taking a quick look, I see saves in my folder ranging from about 400kb to 3mb, with one outlier of 8.5mb&#xD;&#xA;&#xD;&#xA;What can you fit in 400k? Well, to store the position and orientation of an object in 3d space you would probably use 24 bytes (32 bit floating point numbers for x, y, z, yaw, pitch, roll). That fits into 400k over 17,000 times. Obviously there is more to each object than that, but not much. Keep in mind that you are only storing dynamic objects for the level you are currently on, since you never move backwards to revisit old levels. If you think about it, there are probably no more than a couple hundred objects on each level, most of which are very simple, like physics objects or health/ammo pickups, which probably don't need anything more than the previously mentioned position/orientation and their type.&#xD;&#xA;&#xD;&#xA;As example that I'm more intimately familiar with, a ~15mb file can hold all the data you need to recreate an hour of game play in Heroes of Newerth. The exact size/time varies depending on the particulars of the match, but what you have there is the initial state of the entire game, plus the changes between each frame and its previous frame. That is a complete game state (minus unchanged data) every 50 milliseconds!" />
  <row Id="22990" PostHistoryTypeId="2" PostId="10874" RevisionGUID="30d6ec6b-e7e2-42d2-83e0-b8db563cdd47" CreationDate="2011-04-09T11:12:08.020" UserId="1101" Text="Remember that all you need to save is the dynamic data generated at runtime. For example, if you have a monster about to attack the player, you need to save its position, its monster type, and its aggressive state, but you don't need to save its textures, model, behavioural scripts, and so on, because they are part of the static state that can be inferred from the monster type.&#xD;&#xA;&#xD;&#xA;As long as your system keeps a clear distinction between the dynamic properties of the game state and the static properties of the world, there is usually not all that much data to store." />
  <row Id="22991" PostHistoryTypeId="2" PostId="10875" RevisionGUID="69eaabed-2f9f-4669-9d82-6b34c50fca69" CreationDate="2011-04-09T11:26:47.850" UserId="5864" Text="I am surprised that no one mentioned **maths** yet. I cannot for the life of me understand how you can be a good game developer without being good at maths.&#xD;&#xA;&#xD;&#xA;I have seen game developers stuck with algorithm or optimisation problems, or simply writing very bad or underperforming code, because they used convolutions without knowing what an integral was, or did not know that a convolution was separable if the rank of its matrix was one, or that a composition of linear maps was linear, that the slope of a curve was related to the derivative of its function, that interpolating using `3*t^3-2*t^2` instead of `t` ensured slope continuity. I have seen them sum 50 values of `sin(x)` to approximate an area instead of using an integral. If `x` was supposed to grow to `A*x` in 10 seconds, they would set it at `A/10*x` after 1 second instead of `exp(log(A)/10))*x`. This is only what I can think of right now, but I could probably come up with dozens more of such examples.&#xD;&#xA;&#xD;&#xA;Seriously, learn maths." />
  <row Id="22992" PostHistoryTypeId="2" PostId="10876" RevisionGUID="4f9e6655-0be6-4d12-8b60-c7888995850d" CreationDate="2011-04-09T12:06:19.527" UserId="6616" Text="I was thinking to make my arcade game match the players strength in the hard level mode. Like checking the score and if the human player's score is above computer's for certain number of units then the computer player would automatically increase the speed of its reactions, just like a human companion who gets more determined to fight back.&#xD;&#xA;&#xD;&#xA;Does this sound a good idea to you? Are there other ways to approach this, so to make a game, like air hockey for a crude example, permanently challenging for anybody?&#xD;&#xA;" />
  <row Id="22993" PostHistoryTypeId="1" PostId="10876" RevisionGUID="4f9e6655-0be6-4d12-8b60-c7888995850d" CreationDate="2011-04-09T12:06:19.527" UserId="6616" Text="Adaptive AI (Artifical Intelligence)" />
  <row Id="22994" PostHistoryTypeId="3" PostId="10876" RevisionGUID="4f9e6655-0be6-4d12-8b60-c7888995850d" CreationDate="2011-04-09T12:06:19.527" UserId="6616" Text="&lt;ai&gt;" />
  <row Id="22995" PostHistoryTypeId="25" PostId="10865" RevisionGUID="c4c8be81-c6e4-46b9-8c0c-43d2cb89bdae" CreationDate="2011-04-09T12:09:03.983" Comment="http://twitter.com/#!/StackGameDev/status/56690084925284352" />
  <row Id="22996" PostHistoryTypeId="2" PostId="10877" RevisionGUID="b3255f4e-b5c4-4999-ab15-9c65ec082519" CreationDate="2011-04-09T12:57:24.387" UserId="1510" Text="I am looking for a list of topics that would be fun to learn and not too complicated to implement with a prototyping tool like FX Composer or Rendermonkey for an intermediate class of real-time rendering.&#xD;&#xA;&#xD;&#xA;so far i came up with:&#xD;&#xA;&#xD;&#xA;Normal Mapping&#xD;&#xA;Blur / Motionblur&#xD;&#xA;Glow / HDRI&#xD;&#xA;Toon&#xD;&#xA;Reflection&#xD;&#xA;Environment Mapping&#xD;&#xA;&#xD;&#xA;what topics would you remove or add?" />
  <row Id="22997" PostHistoryTypeId="1" PostId="10877" RevisionGUID="b3255f4e-b5c4-4999-ab15-9c65ec082519" CreationDate="2011-04-09T12:57:24.387" UserId="1510" Text="What types of effects or shaders would you teach in a rendering class?" />
  <row Id="22998" PostHistoryTypeId="3" PostId="10877" RevisionGUID="b3255f4e-b5c4-4999-ab15-9c65ec082519" CreationDate="2011-04-09T12:57:24.387" UserId="1510" Text="&lt;opengl&gt;&lt;directx&gt;&lt;rendering&gt;&lt;glsl&gt;&lt;hlsl&gt;" />
  <row Id="22999" PostHistoryTypeId="2" PostId="10878" RevisionGUID="d7bc53a3-a40e-4fc8-85fd-3f14ec61f8e7" CreationDate="2011-04-09T13:00:38.473" UserId="5864" Text="I believe it is a good idea, but to use wisely. Adaptive difficulty can be frustrating to players who wish to beat a game with a fixed set of rules and are suddenly faced with a different difficulty without asking for it. It will depend what your game exactly is about, though." />
  <row Id="23000" PostHistoryTypeId="2" PostId="10879" RevisionGUID="050d8dfa-1683-4db3-b736-e1e1d27e6bdd" CreationDate="2011-04-09T13:11:17.560" UserId="337" Text="I think it's similar to the so called rubber-banding in race games which is fairly common, if done correctly it can make games more fun to play.&#xD;&#xA;&#xD;&#xA;However when done incorrectly it can lead to the player feeling like he (or she) isn't getting better at the game or to the player getting frustrated that they aren't making any progress." />
  <row Id="23001" PostHistoryTypeId="2" PostId="10880" RevisionGUID="a7d0508c-ae20-44d1-b332-3607d2dc13a7" CreationDate="2011-04-09T13:39:51.060" UserId="1510" Text="i have some problem using an int 3x3 matrix as the convolution filter to do edge detection. (i know int matrices are not very meaningful since there is only float on the gpu)&#xD;&#xA;&#xD;&#xA;here is the code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       float2 stepSizeX = (1.0/512.0,  0.0);&#xD;&#xA;       float2 stepSizeY = (0.0, 1.0/512.0);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;       for(int y = -1; y &lt;= 1; y++)&#xD;&#xA;       {&#xD;&#xA;          for(int x = -1; x &lt;= 1; x++)&#xD;&#xA;          {&#xD;&#xA;            float4 c = tex2D(origSampler, TexCoord + stepSizeX * x + stepSizeY * y);&#xD;&#xA;            endColorX.rgb += c.rgb * theMatrix[x+1][y+1];&#xD;&#xA;          }&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the matrix is set to &#xD;&#xA;-1 -2 -1&#xD;&#xA;0 0 0&#xD;&#xA;1 2 1&#xD;&#xA;in the application, but it seems the values in the HLSL shader are different, though i cant figure out how and why?&#xD;&#xA;&#xD;&#xA;thanks a lot!" />
  <row Id="23002" PostHistoryTypeId="1" PostId="10880" RevisionGUID="a7d0508c-ae20-44d1-b332-3607d2dc13a7" CreationDate="2011-04-09T13:39:51.060" UserId="1510" Text="HLSL weird matrix behaviour" />
  <row Id="23003" PostHistoryTypeId="3" PostId="10880" RevisionGUID="a7d0508c-ae20-44d1-b332-3607d2dc13a7" CreationDate="2011-04-09T13:39:51.060" UserId="1510" Text="&lt;directx&gt;&lt;hlsl&gt;" />
  <row Id="23004" PostHistoryTypeId="5" PostId="10876" RevisionGUID="2abdde11-5c5f-462b-b83c-c20395aa2e81" CreationDate="2011-04-09T13:50:43.873" UserId="6616" Comment="added 499 characters in body" Text="I was thinking to make my arcade game match the players strength in the hard level mode. Like checking the score and if the human player's score is above computer's for certain number of units then the computer player would automatically increase the speed of its reactions, just like a human companion who gets more determined to fight back.&#xD;&#xA;&#xD;&#xA;Does this sound a good idea to you? Are there other ways to approach this, so to make a game, like air hockey for a crude example, permanently challenging for anybody?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I agree with the answers below. I believe that most people like to win about 70% time over the computer in order to be motivated. Hence an adaptive intelligence must not be become too superior to the player and depending on human player's concentration and some random elements in the game (good 'old' quantum RND), the outcome should be always uncertain.&#xD;&#xA;&#xD;&#xA;A nice thing about this is that such a system could handle week and strong players and would adjust to the human's learing curve." />
  <row Id="23005" PostHistoryTypeId="2" PostId="10881" RevisionGUID="d1c291b8-2a86-4959-8961-247be13a414a" CreationDate="2011-04-09T14:00:15.650" UserId="3794" Text="Morphing objects to a sphere (simple) or to [cube][1] on a vertex shader&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7189/morph-a-sphere-to-a-cube-and-a-a-cube-to-a-sphere-with-glsl/" />
  <row Id="23006" PostHistoryTypeId="2" PostId="10882" RevisionGUID="6224efa3-5c6d-4202-9ce4-90df316adb77" CreationDate="2011-04-09T14:04:33.713" UserId="3794" Text="Simple geometry shaders: &#xD;&#xA;&#xD;&#xA; - drawing normals as lines (input is a regular mesh)&#xD;&#xA; - creating duplicates of mesh in a different color&#xD;&#xA; - maybe simple fur created by lines (similar to drawing lines actually)" />
  <row Id="23007" PostHistoryTypeId="2" PostId="10883" RevisionGUID="58443cb9-da75-4bbe-844d-e683b24ecd5d" CreationDate="2011-04-09T14:08:44.147" UserId="3794" Text="Show them the difference between fixed pipeline phong and programmable pipeline phong. Thats good motivation." />
  <row Id="23008" PostHistoryTypeId="2" PostId="10884" RevisionGUID="6b31f635-46f3-4ce2-90ca-0aa4a3ba804d" CreationDate="2011-04-09T15:07:57.417" UserId="5224" Text="I just finished a CG class and these where the type of shaders we wrote&#xD;&#xA;&#xD;&#xA; 1. Phong (fixed pipeline vs shaders)&#xD;&#xA; 2. Vertex Distortion&#xD;&#xA; 3. Cool-Warm ([Amy Gooch' her algorithm][1])&#xD;&#xA; 4. Edge detection (using angle between normals and view vector vs using the&#xD;&#xA;    depth buffer vs combined)&#xD;&#xA;&#xD;&#xA;More advanced topics (That didn't make it into the first CG class)&#xD;&#xA;&#xD;&#xA; 1. [Hatching][2]&#xD;&#xA; 2. Shadow mapping/Projectors&#xD;&#xA; 3. Reflection mapping&#xD;&#xA; 4. Water shader.&#xD;&#xA;&#xD;&#xA;Edit: normal mapping is always pretty hard because you need to compute the tangent, so unless you give them the tangent or an easy way to calculate the tangent, I wouldn't ask for an implementation in shaders.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=-SI07OhiQMAC&amp;pg=PA467&amp;lpg=PA467&amp;dq=kcool%20kwarm&amp;source=bl&amp;ots=tUU4_gegQ_&amp;sig=o7f8EKDHOqJHLALUg-3mvk5GQmw&amp;hl=en&amp;ei=o3WgTejPHYqZOvKvwDQ&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CBQQ6AEwAA#v=onepage&amp;q=kcool%20kwarm&amp;f=false&#xD;&#xA;  [2]: http://www.edharriss.com/tutorials/tutorial_xsi_hatch_shader/hatch_files/Hatch_Result.jpg" />
  <row Id="23009" PostHistoryTypeId="25" PostId="10877" RevisionGUID="e15c2ad5-2683-48d7-b458-b2f014b59cf2" CreationDate="2011-04-09T15:09:04.017" Comment="http://twitter.com/#!/StackGameDev/status/56735382670282752" />
  <row Id="23010" PostHistoryTypeId="2" PostId="10885" RevisionGUID="d2011bd7-c0f4-4c08-9719-8a54050b4b1e" CreationDate="2011-04-09T15:12:19.197" UserId="6588" Text="[Corona SDK][1] is a great tool for developing 2D games like Angry Birds or Cut the Rope. cocos2D is a very awesome tool but programming in Lua is way more productive than programming in ObjC. It's a lot like using ActionScript.&#xD;&#xA;&#xD;&#xA;They even did a sample specifically to demonstrate developing an Angry Birds clone in Corona:&#xD;&#xA;http://blog.anscamobile.com/2010/12/ghosts-vs-monsters-open-source-game-in-corona-sdk/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.anscamobile.com/corona/" />
  <row Id="23011" PostHistoryTypeId="2" PostId="10886" RevisionGUID="f0dc8e96-0c89-427f-8538-6bdd12157617" CreationDate="2011-04-09T15:35:39.280" UserId="6588" Text="TIFFs work well, but the most widely used file format in 3D graphics is TGA. If you have existing .iff files that you need to work with then that's a problem, but for rendering out your own images use TGA." />
  <row Id="23012" PostHistoryTypeId="5" PostId="7906" RevisionGUID="9800b9d5-8fff-4edc-b252-ef0c3def9a1d" CreationDate="2011-04-09T15:46:37.427" UserId="450" Comment="corrected spelling" Text="I don't understand how to use a finite state machine with the entity controlled by the player. &#xD;&#xA;&#xD;&#xA;For example I have a Mario style game (2d platform). I can jump, run, walk, take damage, swim, etc. So my first thought was to use this actions as states. But what happens, if you are running when you take damage? Or jumping, taking damage and shooting at the same time?&#xD;&#xA;&#xD;&#xA;I just want to add functionalities (actions) to the player in a clean way (not using it for all the actions in the entity update) .&#xD;&#xA;" />
  <row Id="23013" PostHistoryTypeId="24" PostId="7906" RevisionGUID="9800b9d5-8fff-4edc-b252-ef0c3def9a1d" CreationDate="2011-04-09T15:46:37.427" Comment="Proposed by 450 approved by 14 edit id of 256" />
  <row Id="23014" PostHistoryTypeId="2" PostId="10887" RevisionGUID="7be0c0c7-2101-4ffa-ab76-be40407b3455" CreationDate="2011-04-09T15:51:57.940" UserId="4513" Text="To be honest, I think most players like AI that can out smart them; the difficulty curve should be included in part of the level design, so that the player can still manage the challenge, but it is difficult.&#xD;&#xA;You want to keep the player constantly thinking, unsure of what the AI will do. Predictability and AI 'quirks' kill immersion and game play, so they should be the highest priorities.&#xD;&#xA;&#xD;&#xA;Second to that, if they become too smart, lower their capabilities, for example in an FPS, you may hard code a bullet dispersion for AI to decrease their 'aim bot' abilities." />
  <row Id="23015" PostHistoryTypeId="2" PostId="10888" RevisionGUID="85705424-0808-4ad2-b1c0-61bc685d94e7" CreationDate="2011-04-09T15:52:15.423" UserId="6588" Text="The best 3D engine I know that uses Lua is [Leadwerks][1].&#xD;&#xA;&#xD;&#xA;That said, I would also tend to recommend Unity for 3D games. You won't be programming in Lua, but it'll be a similar gain in productivity.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://leadwerks.com/werkspace/page/products/_/tools/leadwerks-engine-r3" />
  <row Id="23016" PostHistoryTypeId="2" PostId="10889" RevisionGUID="afff845a-bfc1-4496-b6f5-24f54daf9a09" CreationDate="2011-04-09T17:26:04.713" UserId="2536" Text="If you run through the [Blender Noob to Pro][1] series, you'll have a good foundation.&#xD;&#xA;&#xD;&#xA;If you download the free 1-month trial of Maya, the [Getting Started Guide][2] is included, and will also provide a good foundation.&#xD;&#xA;&#xD;&#xA;At the very least, one or both of those will give you the terminology you need to craft useful search phrases to find the rest of the topics you're searching for.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro&#xD;&#xA;  [2]: http://usa.autodesk.com/adsk/servlet/download/item?id=16324856&amp;siteID=123112" />
  <row Id="23017" PostHistoryTypeId="16" PostId="10870" RevisionGUID="79b38934-5615-4cb6-a574-447dc54b7107" CreationDate="2011-04-09T17:47:24.663" UserId="51" />
  <row Id="23018" PostHistoryTypeId="16" PostId="10872" RevisionGUID="f7ac5a51-a016-4277-823b-5931fbba5baf" CreationDate="2011-04-09T17:47:24.663" UserId="51" />
  <row Id="23019" PostHistoryTypeId="25" PostId="10876" RevisionGUID="22684868-b6cc-464b-b847-c87d015f5dad" CreationDate="2011-04-09T18:09:03.723" Comment="http://twitter.com/#!/StackGameDev/status/56780680260104192" />
  <row Id="23020" PostHistoryTypeId="2" PostId="10890" RevisionGUID="708fb36c-e38d-46a3-a191-5290646b16c2" CreationDate="2011-04-09T18:09:20.370" UserId="5672" Text="One other aspect of game saving is that you really don't need to save anything that hasn't changed. Say you've got a room full of objects if the player enters the room but doesn't manipulate anything you don't need to bother saving the positions of those objects. So you when you're saving the game you could compare the object's default and current attributes and only save the delta. Obviously the comparisons would add complexity and overhead to the process but that's a typical CS trade off, storage or CPU." />
  <row Id="23021" PostHistoryTypeId="2" PostId="10891" RevisionGUID="d64bec61-f51a-4d46-aa4b-6d4f3c69d05e" CreationDate="2011-04-09T18:14:37.357" UserId="5672" Text="I thought this [article on prototyping games in under 7 days][1] had some interesting ideas. The suggested focusing on a single theme and exploring it: &#xD;&#xA;&#xD;&#xA;&gt; “gravity”, “springs”, “evolution”, “sound”, “predator and prey”, “addictive games”, “drawing”, “exponential growth”, “vegetation”, “balance”.&#xD;&#xA;&#xD;&#xA;I also appreciated the suggestion to focus on getting it working quickly so you can get a fell for the mechanics and if it's not right fail quickly and move on to the next idea.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/2438/how_to_prototype_a_game_in_under_7_.php" />
  <row Id="23022" PostHistoryTypeId="2" PostId="10892" RevisionGUID="b5276bac-b1a2-4ea7-b936-d47cfa07633d" CreationDate="2011-04-09T18:17:26.100" UserId="4828" Text="I want to ask you what is the best way to deal with collisions in hack&amp;slash game, I know that collisions aren't must be very accurate. My first idea is to use sphere bounds ( I making hack&amp;slash in 3d), but how to deal with hitting with sword some enemy, do you know some better solution for this type of game ?" />
  <row Id="23023" PostHistoryTypeId="1" PostId="10892" RevisionGUID="b5276bac-b1a2-4ea7-b936-d47cfa07633d" CreationDate="2011-04-09T18:17:26.100" UserId="4828" Text="Collision test solution for hack&amp;slash game" />
  <row Id="23024" PostHistoryTypeId="3" PostId="10892" RevisionGUID="b5276bac-b1a2-4ea7-b936-d47cfa07633d" CreationDate="2011-04-09T18:17:26.100" UserId="4828" Text="&lt;collision-detection&gt;" />
  <row Id="23025" PostHistoryTypeId="2" PostId="10893" RevisionGUID="6381e00c-64ac-4467-a73b-a6abb288fbaa" CreationDate="2011-04-09T18:52:14.657" UserId="6592" Text="You could treat your sword as a line segment and continue treating your enemies as spheres. Line segment + sphere intersection would be very cheap and you'd probably gain sufficient accuracy for a hack and slash.&#xD;&#xA;&#xD;&#xA;Determining the location and orientation of the line segment could be challenging, especially if it needs to correspond with animation." />
  <row Id="23026" PostHistoryTypeId="2" PostId="10894" RevisionGUID="cf336c11-7496-4909-b007-0338fd8fd532" CreationDate="2011-04-09T18:59:48.423" UserId="5864" Text="My project was initially not meant for Android, and its assets are organised along the following directory structure (I hope the ASCII art renders reasonably well):&#xD;&#xA;&#xD;&#xA;    /&#xD;&#xA;    +- engine/&#xD;&#xA;     |    +- src/&#xD;&#xA;     |     |      enginefile1.cpp&#xD;&#xA;     |     |      ...&#xD;&#xA;     |     `- textures/&#xD;&#xA;     |            texture1.tex&#xD;&#xA;     |            ...&#xD;&#xA;    +- game/&#xD;&#xA;     |    +- src/&#xD;&#xA;     |     |      gamefile1.cpp&#xD;&#xA;     |     |      ...&#xD;&#xA;     |    +- textures/&#xD;&#xA;     |     |      gametexture1.tex&#xD;&#xA;     |     |      ...&#xD;&#xA;     |    +- ios/&#xD;&#xA;     |     |      [various iOS-specific files]&#xD;&#xA;     |     `- android/&#xD;&#xA;     |           | build.xml&#xD;&#xA;     |           | AndroidManifest.xml&#xD;&#xA;     |           +- jni/&#xD;&#xA;     |           |     Android.mk&#xD;&#xA;     |           +- assets/&#xD;&#xA;     |             [other Android-specific files]&#xD;&#xA;     `- othergame/&#xD;&#xA;&#xD;&#xA;My `game/android/jni` directory is almost empty because `Android.mk` points to the relative paths of the source files in `engine/src` and `game/src`. Actually, it even includes the proper `Makefile`s so that I never have to modify `Android.mk` when I add or remove a source file to the project.&#xD;&#xA;&#xD;&#xA;Both `engine` and `game` provide assets that need to be shipped with the Android build. I would like `build.xml` to refer to these assets without having to manually copy them. A rule that copies the assets at build time then deletes them would be acceptable, but of course I would prefer a zero copy solution. Does this make sense? How did others solve this cross-platform build problem?" />
  <row Id="23027" PostHistoryTypeId="1" PostId="10894" RevisionGUID="cf336c11-7496-4909-b007-0338fd8fd532" CreationDate="2011-04-09T18:59:48.423" UserId="5864" Text="Can I refer to Android assets in other directories?" />
  <row Id="23028" PostHistoryTypeId="3" PostId="10894" RevisionGUID="cf336c11-7496-4909-b007-0338fd8fd532" CreationDate="2011-04-09T18:59:48.423" UserId="5864" Text="&lt;android&gt;&lt;cross-platform&gt;&lt;ndk&gt;&lt;make&gt;&lt;ant&gt;" />
  <row Id="23029" PostHistoryTypeId="2" PostId="10895" RevisionGUID="7a886a08-6897-49f3-aa03-e6bfee2ab60c" CreationDate="2011-04-09T19:29:04.450" UserId="6627" Text="I'm working on simple platformer game. I've got already finished programming the main part of game which is move, collecting items.. I want any unique game puzzle in every level, but I can't think it up. I've been thinking about hours but I've got only few puzzles which are not very good.&#xD;&#xA;If you have got any ideas write it please. I would be greatful." />
  <row Id="23030" PostHistoryTypeId="1" PostId="10895" RevisionGUID="7a886a08-6897-49f3-aa03-e6bfee2ab60c" CreationDate="2011-04-09T19:29:04.450" UserId="6627" Text="Platform simple puzzles" />
  <row Id="23031" PostHistoryTypeId="3" PostId="10895" RevisionGUID="7a886a08-6897-49f3-aa03-e6bfee2ab60c" CreationDate="2011-04-09T19:29:04.450" UserId="6627" Text="&lt;game-design&gt;" />
  <row Id="23032" PostHistoryTypeId="25" PostId="10892" RevisionGUID="24ebe911-b453-4a3b-b850-2ed5c027f966" CreationDate="2011-04-09T21:09:03.640" Comment="http://twitter.com/#!/StackGameDev/status/56825978869133312" />
  <row Id="23033" PostHistoryTypeId="5" PostId="10684" RevisionGUID="d4d3883e-4272-45e3-9909-e46fcd0644f0" CreationDate="2011-04-09T21:37:10.333" UserId="6500" Comment="Updated for clarity from comments..." Text="Do you mean midpoint?&#xD;&#xA;&#xD;&#xA;You can always set the two vectors equal to each other with a scalar multiple for each and solve, but this situation is not clear. Are we to assume they are pointing at each other?&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Updated for clarity&#xD;&#xA;&#xD;&#xA;You are asking for the point of intersection between two lines, one that is vertical - splitting the screen - at x=320, and one that is at some other non parallel point. With two lines, the point of intersection is the point where they are equal to each other. &#xD;&#xA;&#xD;&#xA;I used the example of a vertical line (x=320) and a second line (y=13x+2) and all you have to do is set them equal to each other and solve. Since one line is x=320, so no matter what you do the x value needs to be 320. When you plug that value into the second equation, you get y=13(320)+2&#xD;&#xA;&#xD;&#xA;This will give you the y position for the system of equations. You can find the line by using the vectors slope, or rise/run (change in y/change in x), and solve for the offset (y=mx+b, because your lines origin gives you the x and y positions. &#xD;&#xA;&#xD;&#xA;Ex.&#xD;&#xA;&#xD;&#xA;    Two points (300,30), (450, 330);&#xD;&#xA;    The slope is (330-30)/(450-300)=(300/150)=2;&#xD;&#xA;    The y intercept is y=mx+b -&gt; (30)=(2)(300)+b -&gt; b=-570;&#xD;&#xA;    The line is thus y=(2)x-570; &#xD;&#xA;    This line intersects the x=320 line at:&#xD;&#xA;    y=(2)x-570 == x=320 -&gt; y=(2)(320)-570 = 70&#xD;&#xA;    the point of intersection is: (320, 70)&#xD;&#xA;&#xD;&#xA;http://www.analyzemath.com/Calculators_2/intersection_lines.html" />
  <row Id="23034" PostHistoryTypeId="2" PostId="10896" RevisionGUID="82b632fe-5e6f-40e0-b4d6-882bfa402f06" CreationDate="2011-04-09T22:22:31.233" UserId="6592" Text="Off the top of my head, I don't think you can use anything outside of res/, but if you're looking to avoid added cost to your dev cycle with a copy, you might try moving them instead or maybe even using a symlink..." />
  <row Id="23035" PostHistoryTypeId="25" PostId="10895" RevisionGUID="ff4947fb-2013-48df-a90b-3ce38f81a507" CreationDate="2011-04-10T00:09:04.067" Comment="http://twitter.com/#!/StackGameDev/status/56871278828732417" />
  <row Id="23036" PostHistoryTypeId="2" PostId="10897" RevisionGUID="93f68659-ba59-4b4e-9a1b-5c3956d6ed26" CreationDate="2011-04-10T00:13:37.450" UserId="4828" Text="Game design - http://artofgamedesign.com/ - making games, isn't only about programming." />
  <row Id="23037" PostHistoryTypeId="2" PostId="10898" RevisionGUID="b68c3e0f-008f-4883-816c-55389171c3d7" CreationDate="2011-04-10T01:34:42.710" UserId="3794" Text="Neat idea for the game. The problem is that lights really doesn't look like this. Light decay is NOT gausian :). Thats for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it sounds :).&#xD;&#xA;&#xD;&#xA;I have created this in engine i'm working on for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is done by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which is looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usauly used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    &#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb = (1 - col.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        col.a = (1 - col.a) * opacity; //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoin += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][2] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][3] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [2]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [3]: http://www.real-time-volume-graphics.org/" />
  <row Id="23038" PostHistoryTypeId="2" PostId="10899" RevisionGUID="0529e3b8-6953-4ba7-ba94-7e1acfbe79b4" CreationDate="2011-04-10T01:47:38.107" UserId="6588" Text="Your puzzles will flow from the mechanics of your game, so you should start by defining those mechanics. For example, can the player run and jump? I would assume yes, since that's pretty much the definition of a platform game, but you should list that concretely.&#xD;&#xA;&#xD;&#xA;What other stuff can the player do? For example, can the player collect keys to open doors? Can the player attack enemies somehow? If so, how exactly do they attack? etc etc&#xD;&#xA;&#xD;&#xA;Once you've listed out all the different mechanics in your game (incidentally, you will probably come up with more later so don't worry about this being a complete list, just a place to start from) you can start planning ways for the player to accomplish specific tasks by using those mechanics.&#xD;&#xA;&#xD;&#xA;If this is your first platformer then it's probably best to stick with mechanics that you've seen before and know work, but many innovative games have been built pretty much by starting with a couple new mechanics and everything else flowed out from there. Braid is a great example of a 2D platformer where all the puzzles started from the time-rewind mechanic and branched out from there." />
  <row Id="23039" PostHistoryTypeId="5" PostId="10898" RevisionGUID="0d8fd8e6-1cf2-4892-a518-7aad836d5f69" CreationDate="2011-04-10T02:05:45.727" UserId="3794" Comment="added 239 characters in body" Text="Neat idea for the game. The problem is that lights really doesn't look like this. Light decay is NOT gausian :). Thats for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it sounds :).&#xD;&#xA;&#xD;&#xA;I have created this in engine i'm working on for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is done by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which is looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usauly used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    &#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb = (1 - col.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        col.a = (1 - col.a) * opacity; //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoin += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][2] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][3] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;Improvement: Adding perlin noise to look more natural (left without perlin|right with perlin)&#xD;&#xA;&#xD;&#xA;![enter image description here][4]![enter image description here][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [2]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [3]: http://www.real-time-volume-graphics.org/&#xD;&#xA;  [4]: http://i.stack.imgur.com/Ce68m.gif&#xD;&#xA;  [5]: http://i.stack.imgur.com/bwi7r.gif" />
  <row Id="23040" PostHistoryTypeId="5" PostId="10898" RevisionGUID="2d60b154-dcf6-4dd1-8c9a-f38dc8754499" CreationDate="2011-04-10T02:13:49.557" UserId="3794" Comment="added 176 characters in body" Text="Neat idea for the game. The problem is that light really doesn't look like this. Light decay is NOT gausian :). Thats for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it might sound.&#xD;&#xA;&#xD;&#xA;I have created this in [our engine][1] for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is caused by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which is looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usauly used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    &#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb = (1 - col.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        col.a = (1 - col.a) * opacity; //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoin += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][3] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][4] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;Improvement: Adding colors to lights and perlin noise to the volume to look more natural (left without perlin|right with perlin)&#xD;&#xA;&#xD;&#xA;![enter image description here][5]![enter image description here][6]  &#xD;&#xA;(hmm those gifs are too low quality that there is no significant difference).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*That was fun...*&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://furryball.aaa-studio.eu/&#xD;&#xA;  [2]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [3]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [4]: http://www.real-time-volume-graphics.org/&#xD;&#xA;  [5]: http://i.stack.imgur.com/Ce68m.gif&#xD;&#xA;  [6]: http://i.stack.imgur.com/bwi7r.gif" />
  <row Id="23041" PostHistoryTypeId="2" PostId="10900" RevisionGUID="744df384-c957-4a4b-8d1d-1c597102823a" CreationDate="2011-04-10T02:21:23.727" UserId="6258" Text="start with flash, there are plenty of resourcces and some really good books:&#xD;&#xA;&#xD;&#xA;http://www.emanueleferonato.com - some good beginner code but the structure and efficency of the code is sometimes bad, but its a good and fast start&#xD;&#xA;&#xD;&#xA;also this will probably have better code&#xD;&#xA;http://www.amazon.com/ActionScript-3-0-Game-Programming-University/dp/0789747324/ref=sr_1_1?ie=UTF8&amp;qid=1302401359&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;I skimmed it, it was fairly basic but an excellent start.&#xD;&#xA;&#xD;&#xA;http://www.lynda.com/ActionScript-3-tutorials/projects-game-development/366-2.html&#xD;&#xA;a video guide into game development. It depends on your style of learning, if you like just looking at a source code and using that as a starting point, I would recommend the books, but if you're new to programming the video tutorial guide will be great help for you.&#xD;&#xA;&#xD;&#xA;finally after getting all that done you'll have a good understanding of object oriented programming, after which you should read:&#xD;&#xA;http://www.amazon.ca/ActionScript-3-0-Design-Patterns-Programming/dp/0596528469&#xD;&#xA;&#xD;&#xA;Design Patters will help you effectively create bigger games, and allow you to better transfer your skills to other languages. Don't need to read everything but make sure you read the chapters on inheritance, polymorphism, factory design patterns, and model view component.&#xD;&#xA;&#xD;&#xA;However, you decide to learn make sure you actually program the code and not just read or watch it. Pick a sample game you want to learn every 2 weeks and really try to understand the code, where you don't have to reference the book too much - if you get stuck don't look at the ans in the book but try and googleing it, being a good googler and understanding how to read the documents for you language is really helpful. If you do those within maybe the next 5-10 months you should be able to make those games within 2 days (the logic at least) - but at that point you should move the the next plateau &#xD;&#xA;&#xD;&#xA;P.S game programming and programming in general are frustrating so don't be demotivated every must go through that battlefield; if you find yourself really feeling comfortable and able to make games/app without much problem you need to move to harder material, because its a trap!" />
  <row Id="23042" PostHistoryTypeId="5" PostId="10900" RevisionGUID="283a0576-7222-40ba-8438-40c92eb98241" CreationDate="2011-04-10T02:29:18.273" UserId="6258" Comment="added 485 characters in body; added 226 characters in body" Text="start with flash, there are plenty of resourcces and some really good books:&#xD;&#xA;&#xD;&#xA;http://www.emanueleferonato.com - some good beginner code but the structure and efficency of the code is sometimes bad, but its a good and fast start&#xD;&#xA;&#xD;&#xA;also this will probably have better code&#xD;&#xA;http://www.amazon.com/ActionScript-3-0-Game-Programming-University/dp/0789747324/ref=sr_1_1?ie=UTF8&amp;qid=1302401359&amp;sr=8-1&#xD;&#xA;&#xD;&#xA;I skimmed it, it was fairly basic but an excellent start.&#xD;&#xA;&#xD;&#xA;http://www.lynda.com/ActionScript-3-tutorials/projects-game-development/366-2.html&#xD;&#xA;a video guide into game development. It depends on your style of learning, if you like just looking at a source code and using that as a starting point, I would recommend the books, but if you're new to programming the video tutorial guide will be great help for you.&#xD;&#xA;&#xD;&#xA;finally after getting all that done you'll have a good understanding of object oriented programming, after which you should read:&#xD;&#xA;http://www.amazon.ca/ActionScript-3-0-Design-Patterns-Programming/dp/0596528469&#xD;&#xA;&#xD;&#xA;Design Patters will help you effectively create bigger games, and allow you to better transfer your skills to other languages. Don't need to read everything but make sure you read the chapters on inheritance, polymorphism, factory design patterns, and model view component.&#xD;&#xA;&#xD;&#xA;However, you decide to learn make sure you actually program the code and not just read or watch it. Pick a sample game you want to learn every 2 weeks and really try to understand the code, where you don't have to reference the book too much - if you get stuck don't look at the ans in the book but try and googleing it, being a good googler and understanding how to read the documents for you language is really helpful. If you do those within maybe the next 5-10 months you should be able to make those games within 2 days (the logic at least) - but at that point you should move the the next plateau &#xD;&#xA;&#xD;&#xA;I would then recommend moving onto C# creating games on XNA for xbox live and windows 7. Its a very good game development platform, and will be some good books on it in the next few months (xna just got updated so a lot of material online is still outdated), C# is a lot like as3 so don't spend too much time on it, just get comfortable with the language make a few games then move on.&#xD;&#xA;&#xD;&#xA;I would say make a java game next for android, but if you think you're ready learn some C++. But before moving to C++ read: http://www.amazon.com/Data-Structures-Algorithms-Developers-Development/dp/1584504951/ref=sr_1_2?s=books&amp;ie=UTF8&amp;qid=1301897090&amp;sr=1-2 get a good familiarity with algorithms and data structures.&#xD;&#xA;&#xD;&#xA;P.S game programming and programming in general are frustrating so don't be demotivated every must go through that battlefield; if you find yourself really feeling comfortable and able to make games/app without much problem you need to move to harder material, because its a trap!" />
  <row Id="23043" PostHistoryTypeId="2" PostId="10901" RevisionGUID="431f2557-58f9-4e39-a9db-467ba6a80152" CreationDate="2011-04-10T03:07:11.847" UserId="6629" Text="Attempting to set up a targeting array for a MMO-style game in GameMaker8 Pro, I have this code in the create event for the player's character, which is and has been running perfectly fine:&#xD;&#xA;&#xD;&#xA;    j = 0&#xD;&#xA;    i = 0&#xD;&#xA;    g = 0&#xD;&#xA;    for (i=100000; i&lt;1000000; i+=1) if instance_exists(i) {if i.object_index = enemy         {global.ttarget[j] = i j+=1}  if i.object_index = rk or i.object_index = sage    {global.etarget[g] = i g += 1}}&#xD;&#xA;    global.rmtargets = j&#xD;&#xA;    global.etargets = g&#xD;&#xA;&#xD;&#xA;Then running this code in the step event for the player character:&#xD;&#xA;&#xD;&#xA;    h = 0&#xD;&#xA;    g = 0&#xD;&#xA;    i = 0&#xD;&#xA;    for (i=0; i&lt;global.rmtargets; i+=1) global.target[i] = 0&#xD;&#xA;    global.target[0]=101139&#xD;&#xA;    for (h = 0; h&lt;global.rmtargets; h+=1){hv = -1&#xD;&#xA;    for (g = 0; g&lt;global.rmtargets; g+=1){if global.ttarget[g].range &gt; hv {hv =    global.ttarget[g].range}}&#xD;&#xA;    global.target[h] = hv&#xD;&#xA;    global.ttarget[h] = -1}&#xD;&#xA;&#xD;&#xA;Returns this error message:&#xD;&#xA;&#xD;&#xA;ERROR in&#xD;&#xA;action number 1&#xD;&#xA;of  Step Event&#xD;&#xA;for object rk:&#xD;&#xA;&#xD;&#xA;Error in code at line 8: for (g = 0; g&lt;global.rmtargets; g+=1){if global.ttarget[g].range &gt; hv {hv = global.ttarget[g].range}}&#xD;&#xA;at position 61: Unknown variable range&#xD;&#xA;&#xD;&#xA;Even though I have this in the create event for the enemy:&#xD;&#xA;&#xD;&#xA;    range = 0&#xD;&#xA;    range = distance_to_object(rk)&#xD;&#xA;&#xD;&#xA;And I've used this sort of syntax all over:&#xD;&#xA;&#xD;&#xA;    global.target[target].threat[s] += damage&#xD;&#xA;&#xD;&#xA;Help? Any ideas why Game Maker won't recognize the variable?" />
  <row Id="23044" PostHistoryTypeId="1" PostId="10901" RevisionGUID="431f2557-58f9-4e39-a9db-467ba6a80152" CreationDate="2011-04-10T03:07:11.847" UserId="6629" Text="Game Maker not recognizing variable" />
  <row Id="23045" PostHistoryTypeId="3" PostId="10901" RevisionGUID="431f2557-58f9-4e39-a9db-467ba6a80152" CreationDate="2011-04-10T03:07:11.847" UserId="6629" Text="&lt;game-mechanics&gt;" />
  <row Id="23046" PostHistoryTypeId="25" PostId="10894" RevisionGUID="6f22396b-0f4a-4ee8-b6ce-a1be3d8e8205" CreationDate="2011-04-10T03:09:03.700" Comment="http://twitter.com/#!/StackGameDev/status/56916575671951360" />
  <row Id="23047" PostHistoryTypeId="2" PostId="10902" RevisionGUID="d0cdc5f7-a35d-4e92-84a2-db002e6509c8" CreationDate="2011-04-10T03:20:14.377" UserId="6178" Text="Before anyone asks, this is for a university project and **I have to use GLUT**. I'm not tagging this as homework because this is not a requirement, nor will I have extra points for this.&#xD;&#xA;&#xD;&#xA;With GLUT, for people unaware, you have:&#xD;&#xA;&#xD;&#xA; - `glutIdleFunc(func)`: registers the render function and this means that when GLUT is not doing anything else, it will call this function. In other words, it will keep rendering as fast as possible.&#xD;&#xA; - `glutTimerFunc(msecs, func, val)`: registers a function that will be called in `msecs` and the registering the same function recursively would allow for a fixed time based movement.&#xD;&#xA;&#xD;&#xA;Now, I'm trying to avoid these functions for this purpose and most discussions/articles I found about GLUT, use them for time based movement. So I have come here once again... But if I'm not using any of those functions, how are the frames rendered? I just call `glutPostRedisplay` and a single frame will be rendered.&#xD;&#xA;&#xD;&#xA;I have managed to implement time based movement in GLUT in a simple manner. May not be the best implementation, but it's not overly complex and works. Well, there's only a slight problem, that's why I'm here.&#xD;&#xA;&#xD;&#xA;My camera movement is based on Newton's Second Law of Motion, where I calculate the displacement movement like this:&#xD;&#xA;&#xD;&#xA;    Vector3D displacement = (CurrentVelocity * elapsedTime) +&#xD;&#xA;        (Acceleration * 0.5f * elapsedTime * elapsedTime);&#xD;&#xA;&#xD;&#xA;The `elapsedTime` comes from my timer implementation and I think that's where the problem lies. The problem is that `displacement` should be positive or negative depending on the movement direction but if `CurrentVelocity` is a really low value (ie: -0.1f), the `displacement` will be positive when it should be negative. The rest of the code will accelerate or deacelerate the camera, so the problem only happens when accelerating because that's when `CurrentVelocity` will be small and what happens is that the camera moves slightly to the right (positive) and then to the left (negative) when it gains enough momentum to give a negative `displacement` value.&#xD;&#xA;&#xD;&#xA;Now, when there's no movement in the scene, nothing is being rendered at all. When I press on of the movement keys, I do this:&#xD;&#xA;&#xD;&#xA;    CameraDirection.z = CAMERA_WALK_BACKWARD;&#xD;&#xA;    SceneTimer.PostRedisplayWindow();&#xD;&#xA;&#xD;&#xA;That also comes from my timer class, I do that instead of calling `glutPostRedisplay` and the reason for that is this:&#xD;&#xA;&#xD;&#xA;    void Timer::PostRedisplayWindow(void) {&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    	glutPostRedisplay();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I need to get the `currentTime` (which will become the `previousTime` when I need to calculate the elapsed time) and then I call `glutPostRedisplay`. A single frame will be rendered, which means the `renderScene` will be called:&#xD;&#xA;&#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	glLoadIdentity();&#xD;&#xA;    &#xD;&#xA;    	elapsedTime = SceneTimer.GetElapsedTimeInSeconds();&#xD;&#xA;    &#xD;&#xA;    	SceneCamera.Move(CameraDirection, elapsedTime);&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	drawCompleteScene();&#xD;&#xA;    &#xD;&#xA;    	glutSwapBuffers();&#xD;&#xA;    &#xD;&#xA;    	checkAnimationRedisplay();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As you can see, the elapsed time is calculated and the camera is moved on that. Everything in the scene is drawn, swap buffers and then I have this extra function which will check if something needs to be animated, in this case, the camera needs:&#xD;&#xA;&#xD;&#xA;    void checkAnimationRedisplay(void) {&#xD;&#xA;    	if(SceneCamera.IsCameraMoving()) {&#xD;&#xA;    		glutPostRedisplay();&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It will keep calling `glutPostRedisplay` until the camera has stopped moving. Meaning, `renderScene` will be called every time, the elapsed time is calculated and the camera is moved based on time, everything's working; besides, of course, the little glitch already mentioned, little but the one that made me create this long question (sorry about that).&#xD;&#xA;&#xD;&#xA;All that's missing is the most important function of this question, the one that calculates the elapsed time, simple as this:&#xD;&#xA;&#xD;&#xA;float Timer::GetElapsedTimeInSeconds(void) {&#xD;&#xA;	static int previousTime = 0;&#xD;&#xA;	static int elapsedTime = 0;&#xD;&#xA;&#xD;&#xA;	previousTime = currentTime;&#xD;&#xA;	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;	elapsedTime = currentTime - previousTime;&#xD;&#xA;&#xD;&#xA;	return elapsedTime / 1000.0f;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;There's probably something wrong with my timer code right? I mean, moving forward or right (positive values), there's no problems. The movement is smooth and time based. For instance, if I set a movement speed of 5m/s, it will actually take 5 seconds to move 25meters (I'm assuming 1m = 1.0f).&#xD;&#xA;&#xD;&#xA;So, what I'm doing wrong with the timer so that the negative values start moving to the right for a split-second and only then to the left as it should?" />
  <row Id="23048" PostHistoryTypeId="1" PostId="10902" RevisionGUID="d0cdc5f7-a35d-4e92-84a2-db002e6509c8" CreationDate="2011-04-10T03:20:14.377" UserId="6178" Text="Having a slight problem moving my camera based on time passed using GLUT/OpenGL" />
  <row Id="23049" PostHistoryTypeId="3" PostId="10902" RevisionGUID="d0cdc5f7-a35d-4e92-84a2-db002e6509c8" CreationDate="2011-04-10T03:20:14.377" UserId="6178" Text="&lt;opengl&gt;&lt;animation&gt;&lt;glut&gt;" />
  <row Id="23050" PostHistoryTypeId="2" PostId="10903" RevisionGUID="90e3ac13-753d-4f83-955d-5717e9841e2c" CreationDate="2011-04-10T05:23:07.237" UserId="6631" Text="I came up with a method for testing collision awhile back. I haven't used it so I don't know how useful it will be but the basic idea is this. if point x is inside triangle ABC (collision) then the area of triangle AxB + BxC + CxA will be approximately equal to the total area of triangle ABC. If point x was outside of triangle ABC then it won't be equal. This same idea could then be applied to 3 dimensional objects just using the formula for volume and testing all points within an object to another object. I'm not sure how CPU intensive it would be but I assume it would be too slow with testing lots of points every frame so I thought of only testing two objects if they were close to eachother. Hopefully you can use this information to come up with something." />
  <row Id="23051" PostHistoryTypeId="2" PostId="10904" RevisionGUID="0de692e5-9e22-40ff-a1bb-1a7e4f02eb94" CreationDate="2011-04-10T05:50:25.777" UserId="5932" Text="&lt;b&gt;First&lt;/b&gt;&#xD;&#xA;&#xD;&#xA;Simplicity is key.&#xD;&#xA;&#xD;&#xA;&lt;b&gt;Second&lt;/b&gt;&#xD;&#xA;&#xD;&#xA;Expandability is necessary.&#xD;&#xA;&#xD;&#xA;What I would do, if I were making a &quot;hack n' slash&quot; is create a simple bounding box technique. Define the height and width of the attack, then check collisions with the box. Keep in mind, that if your character can go inside of other characters you want to include your own collision dimensions in the attack box.&#xD;&#xA;&#xD;&#xA;Simple, and expandable. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="23052" PostHistoryTypeId="25" PostId="10901" RevisionGUID="3cb7782f-e41f-4e05-b7ac-4b01aa302cf0" CreationDate="2011-04-10T06:09:03.770" Comment="http://twitter.com/#!/StackGameDev/status/56961874884968449" />
  <row Id="23053" PostHistoryTypeId="2" PostId="10905" RevisionGUID="24657218-34ac-446b-84fc-abe890efbb5e" CreationDate="2011-04-10T06:12:50.763" UserId="6244" Text="If I alt-tab and do stuff outside of the game window, the game still captures mouse clicks (both left and right clicks).&#xD;&#xA;&#xD;&#xA;The game doesn't &quot;consume&quot; the clicks, since they are also sent to the application that has the focus.&#xD;&#xA;&#xD;&#xA;But it's rather annoying to hear a gunshot each time you click in your internet browser...&#xD;&#xA;&#xD;&#xA;Also, the problem occurs even if the game is set to fullscreen." />
  <row Id="23054" PostHistoryTypeId="1" PostId="10905" RevisionGUID="24657218-34ac-446b-84fc-abe890efbb5e" CreationDate="2011-04-10T06:12:50.763" UserId="6244" Text="XNA captures mouse clicks when the game hasn't the focus" />
  <row Id="23055" PostHistoryTypeId="3" PostId="10905" RevisionGUID="24657218-34ac-446b-84fc-abe890efbb5e" CreationDate="2011-04-10T06:12:50.763" UserId="6244" Text="&lt;xna&gt;" />
  <row Id="23056" PostHistoryTypeId="2" PostId="10906" RevisionGUID="9369d857-0772-4420-9ddc-2edf55827511" CreationDate="2011-04-10T06:22:29.200" UserId="5020" Text="On identifying why a game is fun, [A Theory of Fun](http://www.amazon.com/Theory-Fun-Game-Design/dp/1932111972) is a good book." />
  <row Id="23057" PostHistoryTypeId="2" PostId="10907" RevisionGUID="e6263362-76ef-4ec9-904f-296ab9b9602e" CreationDate="2011-04-10T06:47:54.363" UserId="288" Text="The best solution I have found to this is to stop responding to input (and probably pause your game as well) if it goes inactive.&#xD;&#xA;&#xD;&#xA;**You can check &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.isactive.aspx&quot;&gt;`Game.IsActive`&lt;/a&gt; or hook the `Activated` and `Deactivated` events.**&#xD;&#xA;&#xD;&#xA;There is one minor drawback - I would just about consider this a bug in the framework - the game always starts in the Active state, even if the game isn't actually active when it starts running. (For example: you click to another window between launching your game and your game actually starting.)&#xD;&#xA;&#xD;&#xA;You could work around this by checking what the active window is when your game starts, probably using `GetForegroundWindow`. Or you could just not worry about it - it occasionally happens as a developer, but I suspect it doesn't really affect end-users." />
  <row Id="23058" PostHistoryTypeId="2" PostId="10908" RevisionGUID="1000ea14-dd35-4c0c-844d-213f8ecfee8e" CreationDate="2011-04-10T07:07:02.207" UserId="1839" Text="Does the problem occur whenever you change the direction or only when changing from positive values to negative values? If it is always, it is most likely the last acceleration stored from last movement which is still slightly bigger than zero. How do you determine that the movement is over in IsCameraMoving() ?&#xD;&#xA;&#xD;&#xA;Can you show the entire calculation of CurrentVelociy and Acceleration and how you apply the displacement?&#xD;&#xA;&#xD;&#xA;Also double check that you reset all components of CameraDirection properly." />
  <row Id="23059" PostHistoryTypeId="2" PostId="10909" RevisionGUID="03dce193-2de2-4025-8b9f-8bd3f3be063d" CreationDate="2011-04-10T07:59:08.703" UserId="4105" Text="Should I be pessimistic about the IOS game development under VM? A virtualized environment will run on AMD (4-core 2.8 ghz Phenom II)/ATI/Linux/VMware host.&#xD;&#xA;&#xD;&#xA;Not talking about any 3D engines, may Xcode's emulator bring at least 15-20 FPS for a simple 2D game like, errr, `Airport Mania`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23060" PostHistoryTypeId="1" PostId="10909" RevisionGUID="03dce193-2de2-4025-8b9f-8bd3f3be063d" CreationDate="2011-04-10T07:59:08.703" UserId="4105" Text="Xcode on Hackintosh (under VM)." />
  <row Id="23061" PostHistoryTypeId="3" PostId="10909" RevisionGUID="03dce193-2de2-4025-8b9f-8bd3f3be063d" CreationDate="2011-04-10T07:59:08.703" UserId="4105" Text="&lt;2d&gt;&lt;ios&gt;&lt;ipad&gt;&lt;virtual-machines&gt;" />
  <row Id="23062" PostHistoryTypeId="2" PostId="10910" RevisionGUID="9232500d-b64a-407f-9079-e136e43c9b45" CreationDate="2011-04-10T08:56:07.683" UserId="6627" Text="I think the problem is that variable can not have &quot;under variable&quot;, in GM is this possible even with the objects." />
  <row Id="23063" PostHistoryTypeId="25" PostId="10905" RevisionGUID="d890f5a0-1e3b-415b-9efa-9ad4d09dddf0" CreationDate="2011-04-10T09:09:03.687" Comment="http://twitter.com/#!/StackGameDev/status/57007173506576384" />
  <row Id="23064" PostHistoryTypeId="2" PostId="10911" RevisionGUID="65c5c74d-fb09-4e56-a50a-7c9d75ba7932" CreationDate="2011-04-10T09:37:50.150" UserId="6616" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AhgXV.jpg" />
  <row Id="23065" PostHistoryTypeId="1" PostId="10911" RevisionGUID="65c5c74d-fb09-4e56-a50a-7c9d75ba7932" CreationDate="2011-04-10T09:37:50.150" UserId="6616" Text="A ball hits the corner, where will it deflect?" />
  <row Id="23066" PostHistoryTypeId="3" PostId="10911" RevisionGUID="65c5c74d-fb09-4e56-a50a-7c9d75ba7932" CreationDate="2011-04-10T09:37:50.150" UserId="6616" Text="&lt;math&gt;&lt;collision-detection&gt;&lt;animation&gt;" />
  <row Id="23067" PostHistoryTypeId="5" PostId="10911" RevisionGUID="aa39a610-d802-4a0b-a8fb-8c6ebbd2d299" CreationDate="2011-04-10T09:43:16.757" UserId="6616" Comment="edited body" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1Ef1K.jpg" />
  <row Id="23068" PostHistoryTypeId="5" PostId="10911" RevisionGUID="8065a715-a58d-4b85-928d-bbd2b67bba0d" CreationDate="2011-04-10T09:54:34.403" UserId="6616" Comment="added 3 characters in body" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball is moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1Ef1K.jpg" />
  <row Id="23069" PostHistoryTypeId="2" PostId="10912" RevisionGUID="7bc7aa83-0127-46e6-aa65-291bd7c4828c" CreationDate="2011-04-10T10:16:08.987" UserId="6636" Text="I'm working on a game and also stuck here. But I guess it goes this way:&#xD;&#xA;&#xD;&#xA;[Image Link][1]&#xD;&#xA;&#xD;&#xA;[There's another view][2]&#xD;&#xA;My problem is that I don't know how to quickly calculate the new dx, dy (to me using traditional math requires too many calculations).&#xD;&#xA;&#xD;&#xA;  [1]: http://img156.imageshack.us/i/cornercollide.png/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/3430/new-vector-calculation-for-elastic-collision-of-circle-and-fixed-rectangle" />
  <row Id="23070" PostHistoryTypeId="5" PostId="10898" RevisionGUID="8729c02c-0baa-4049-b2c8-5df05b98bfe6" CreationDate="2011-04-10T10:55:55.680" UserId="3794" Comment="typo" Text="Neat idea for the game. The problem is that light really doesn't look like this. Light decay is NOT gausian :). Thats for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it might sound.&#xD;&#xA;&#xD;&#xA;I have created this in [our engine][1] for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is caused by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which is looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usauly used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    &#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb = (1 - col.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        col.a = (1 - col.a) * opacity; //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoint += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][3] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][4] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;Improvement: Adding colors to lights and perlin noise to the volume to look more natural (left without perlin|right with perlin)&#xD;&#xA;&#xD;&#xA;![enter image description here][5]![enter image description here][6]  &#xD;&#xA;(hmm those gifs are too low quality that there is no significant difference).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*That was fun...*&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://furryball.aaa-studio.eu/&#xD;&#xA;  [2]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [3]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [4]: http://www.real-time-volume-graphics.org/&#xD;&#xA;  [5]: http://i.stack.imgur.com/Ce68m.gif&#xD;&#xA;  [6]: http://i.stack.imgur.com/bwi7r.gif" />
  <row Id="23072" PostHistoryTypeId="2" PostId="10914" RevisionGUID="221f18de-7a79-4f38-a7e5-e9572e8b9cd0" CreationDate="2011-04-10T11:32:01.170" UserId="6587" Text="I believe not only is this a good idea but should be mandatory for most games.   &#xD;&#xA;Make your system not as simple as if the score is higher than some arbitrary number than send enemies with more health, that is the wrong kind of difficulty increase. Also, don't limit it to the hard difficulty, start easy and let the system adjust the difficulty according to what the player does.   &#xD;&#xA;&#xD;&#xA;For your example of air hockey I would divide the elements of gameplay into several parts through a brainstrom. Say, you start with the full game, that divides into offence and defence, and defence divides into keeping your goal safe and being quick enough to react. keep the player's score for each of those and then adjust it (according to a function, not some random number, I'm pretty sure there's some research for that) for each of the fields of the AI.&#xD;&#xA;[Infinite adaptive mario][1] is a great example of what you're trying to do, you should look at that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://eis-blog.ucsc.edu/2010/09/infinite-adaptive-mario/ &quot;infinite adaptive mario&quot;" />
  <row Id="23073" PostHistoryTypeId="5" PostId="10911" RevisionGUID="bf21ba59-a526-449a-af93-0ab7c79de9fd" CreationDate="2011-04-10T11:41:21.213" UserId="6616" Comment="added 280 characters in body" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball is moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1Ef1K.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The way forward I see:&#xD;&#xA;&#xD;&#xA; - find the angle between the ball and&#xD;&#xA;   the corner&#xD;&#xA; - calculate a deflection angle&#xD;&#xA; - convert the deflection angle into new&#xD;&#xA;   ballDx and ballDy taking in account&#xD;&#xA;   ballDx and ballDy original values&#xD;&#xA;&#xD;&#xA;I need a bit of help here with math..." />
  <row Id="23074" PostHistoryTypeId="5" PostId="10912" RevisionGUID="4a0b904c-0e26-48a0-a322-bd8fc1f924f5" CreationDate="2011-04-10T11:55:06.403" UserId="6636" Comment="deleted 43 characters in body; edited body; added 85 characters in body" Text="I'm working on a game and also stuck here. But I guess it goes this way:&#xD;&#xA;&#xD;&#xA;[//Image in the next comment][1]&#xD;&#xA;&#xD;&#xA;[There's another view][2]&#xD;&#xA;My problem is that I don't know how to quickly calculate the new dx, dy (to me using traditional math requires too many calculations).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i763.photobucket.com/albums/xx274/fleuve_rouge/cornercollide.png&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/3430/new-vector-calculation-for-elastic-collision-of-circle-and-fixed-rectangle" />
  <row Id="23075" PostHistoryTypeId="5" PostId="10898" RevisionGUID="eeef1aa3-73be-41c8-b716-54a5a6898235" CreationDate="2011-04-10T12:07:01.420" UserId="3794" Comment="added 970 characters in body" Text="Neat idea for the game. The problem is that light really doesn't look like this. Light decay is NOT gausian :). Thats for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it might sound.&#xD;&#xA;&#xD;&#xA;I have created this in [our engine][1] for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is caused by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which is looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usauly used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    &#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb = (1 - col.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        col.a = (1 - col.a) * (1 - opacity); //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoint += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][3] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][4] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;Improvement: Adding colors to lights and perlin noise to the volume to look more natural (left without perlin|right with perlin)&#xD;&#xA;&#xD;&#xA;![enter image description here][5]![enter image description here][6]  &#xD;&#xA;(hmm those gifs are too low quality that there is no significant difference).&#xD;&#xA;&#xD;&#xA;**edit (some performance notes):**&#xD;&#xA;it can be done as one pass per light, which is usefull if lights has lots of aditional textures (light color - projective texturing, intensity curves etc.). But this is frame rate killer, it can (and should) be done in one pass for all lights if you have enough texture units available (i think you have in your game). Than it can have about 45-60fps i hope. &#xD;&#xA;&#xD;&#xA;Sampling doesn't have to be linear. You can make sampling logartmic (or similar function). &#xD;&#xA;&#xD;&#xA;    makeEveryStepALittleBigger = 1.05;&#xD;&#xA;    samplePoint += direction * step * makeEveryStepALittleBigger;&#xD;&#xA;&#xD;&#xA;This however destroy physical correctness and &quot;opacity correction&quot; has to be done. Which is: &#xD;&#xA;&#xD;&#xA;    curentAlpha = 1 - pow((1 - opacity), delta);&#xD;&#xA;&#xD;&#xA;where delta is difference between step1 and step2.&#xD;&#xA;&#xD;&#xA;And if you dont mind little noise, you can add depth jittering which allows you to use much lower number of samples (that is pretty good and easier solution).&#xD;&#xA;&#xD;&#xA;*That was fun...*&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://furryball.aaa-studio.eu/&#xD;&#xA;  [2]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [3]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [4]: http://www.real-time-volume-graphics.org/&#xD;&#xA;  [5]: http://i.stack.imgur.com/Ce68m.gif&#xD;&#xA;  [6]: http://i.stack.imgur.com/bwi7r.gif" />
  <row Id="23076" PostHistoryTypeId="25" PostId="10911" RevisionGUID="bd4c7d8a-57ee-438a-bad1-c96dbbcb78d7" CreationDate="2011-04-10T12:09:03.673" Comment="http://twitter.com/#!/StackGameDev/status/57052471020883968" />
  <row Id="23078" PostHistoryTypeId="5" PostId="10902" RevisionGUID="aab89da3-7c5f-4520-8fa9-1e1152cdff1a" CreationDate="2011-04-10T12:29:06.697" UserId="6178" Comment="added 2318 characters in body" Text="Before anyone asks, this is for a university project and **I have to use GLUT**. I'm not tagging this as homework because this is not a requirement, nor will I have extra points for this.&#xD;&#xA;&#xD;&#xA;With GLUT, for people unaware, you have:&#xD;&#xA;&#xD;&#xA; - `glutIdleFunc(func)`: registers the render function and this means that when GLUT is not doing anything else, it will call this function. In other words, it will keep rendering as fast as possible.&#xD;&#xA; - `glutTimerFunc(msecs, func, val)`: registers a function that will be called in `msecs` and the registering the same function recursively would allow for a fixed time based movement.&#xD;&#xA;&#xD;&#xA;Now, I'm trying to avoid these functions for this purpose and most discussions/articles I found about GLUT, use them for time based movement. So I have come here once again... But if I'm not using any of those functions, how are the frames rendered? I just call `glutPostRedisplay` and a single frame will be rendered.&#xD;&#xA;&#xD;&#xA;I have managed to implement time based movement in GLUT in a simple manner. May not be the best implementation, but it's not overly complex and works. Well, there's only a slight problem, that's why I'm here.&#xD;&#xA;&#xD;&#xA;My camera movement is based on Newton's Second Law of Motion, where I calculate the displacement movement like this:&#xD;&#xA;&#xD;&#xA;    Vector3D displacement = (CurrentVelocity * elapsedTime) +&#xD;&#xA;        (Acceleration * 0.5f * elapsedTime * elapsedTime);&#xD;&#xA;&#xD;&#xA;The `elapsedTime` comes from my timer implementation and I think that's where the problem lies. The problem is that `displacement` should be positive or negative depending on the movement direction but if `CurrentVelocity` is a really low value (ie: -0.1f), the `displacement` will be positive when it should be negative. The rest of the code will accelerate or deacelerate the camera, so the problem only happens when accelerating because that's when `CurrentVelocity` will be small and what happens is that the camera moves slightly to the right (positive) and then to the left (negative) when it gains enough momentum to give a negative `displacement` value.&#xD;&#xA;&#xD;&#xA;Now, when there's no movement in the scene, nothing is being rendered at all. When I press on of the movement keys, I do this:&#xD;&#xA;&#xD;&#xA;    CameraDirection.z = CAMERA_WALK_BACKWARD;&#xD;&#xA;    SceneTimer.PostRedisplayWindow();&#xD;&#xA;&#xD;&#xA;That also comes from my timer class, I do that instead of calling `glutPostRedisplay` and the reason for that is this:&#xD;&#xA;&#xD;&#xA;    void Timer::PostRedisplayWindow(void) {&#xD;&#xA;    	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;    	glutPostRedisplay();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I need to get the `currentTime` (which will become the `previousTime` when I need to calculate the elapsed time) and then I call `glutPostRedisplay`. A single frame will be rendered, which means the `renderScene` will be called:&#xD;&#xA;&#xD;&#xA;    void renderScene(void) {&#xD;&#xA;    	(...)&#xD;&#xA;    &#xD;&#xA;    	glLoadIdentity();&#xD;&#xA;    &#xD;&#xA;    	elapsedTime = SceneTimer.GetElapsedTimeInSeconds();&#xD;&#xA;    &#xD;&#xA;    	SceneCamera.Move(CameraDirection, elapsedTime);&#xD;&#xA;    	SceneCamera.LookAt();&#xD;&#xA;    &#xD;&#xA;    	drawCompleteScene();&#xD;&#xA;    &#xD;&#xA;    	glutSwapBuffers();&#xD;&#xA;    &#xD;&#xA;    	checkAnimationRedisplay();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As you can see, the elapsed time is calculated and the camera is moved on that. Everything in the scene is drawn, swap buffers and then I have this extra function which will check if something needs to be animated, in this case, the camera needs:&#xD;&#xA;&#xD;&#xA;    void checkAnimationRedisplay(void) {&#xD;&#xA;    	if(SceneCamera.IsCameraMoving()) {&#xD;&#xA;    		glutPostRedisplay();&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It will keep calling `glutPostRedisplay` until the camera has stopped moving. Meaning, `renderScene` will be called every time, the elapsed time is calculated and the camera is moved based on time, everything's working; besides, of course, the little glitch already mentioned, little but the one that made me create this long question (sorry about that).&#xD;&#xA;&#xD;&#xA;All that's missing is the most important function of this question, the one that calculates the elapsed time, simple as this:&#xD;&#xA;&#xD;&#xA;float Timer::GetElapsedTimeInSeconds(void) {&#xD;&#xA;	static int previousTime = 0;&#xD;&#xA;	static int elapsedTime = 0;&#xD;&#xA;&#xD;&#xA;	previousTime = currentTime;&#xD;&#xA;	currentTime = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;	elapsedTime = currentTime - previousTime;&#xD;&#xA;&#xD;&#xA;	return elapsedTime / 1000.0f;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;There's probably something wrong with my timer code right? I mean, moving forward or right (positive values), there's no problems. The movement is smooth and time based. For instance, if I set a movement speed of 5m/s, it will actually take 5 seconds to move 25meters (I'm assuming 1m = 1.0f).&#xD;&#xA;&#xD;&#xA;So, what I'm doing wrong with the timer so that the negative values start moving to the right for a split-second and only then to the left as it should?&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;A little more code as requested, this is how the `CurrentVelocity` is how calculated and how the displacement is applied:&#xD;&#xA;&#xD;&#xA;    void Camera::Move(Vector3D direction, float elapsedTime) {&#xD;&#xA;    	// Move only if the velocity vector is not of zero length (guards against&#xD;&#xA;    	// floating point rounding erros&#xD;&#xA;    	if(CurrentVelocity.SquaredMagnitude() != 0.0f) {&#xD;&#xA;    		Vector3D displacement = (CurrentVelocity * elapsedTime) +&#xD;&#xA;    			(Acceleration * 0.5f * elapsedTime * elapsedTime);&#xD;&#xA;    &#xD;&#xA;    		Vector3D ForwardVector = Reference;&#xD;&#xA;    &#xD;&#xA;    		if(cameraType != CAMERA_TYPE_SPECTATOR) {&#xD;&#xA;    			ForwardVector = Vector3D::CrossProduct(WORLD_SKY_VECTOR, RightVector);&#xD;&#xA;    			ForwardVector.Normalize();&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		Position = Position + (RightVector * displacement.x);&#xD;&#xA;    		Position = Position + (WORLD_SKY_VECTOR * displacement.y);&#xD;&#xA;    		Position = Position + (ForwardVector * displacement.z);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	UpdateCameraVelocity(direction, elapsedTime);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void Camera::UpdateCameraVelocity(const Vector3D direction, float elapsedTime) {&#xD;&#xA;    	// Accelerate camera if the direction is -1 or 1 or decelerate if it's 0&#xD;&#xA;    	if(direction.x != 0.0f) {&#xD;&#xA;    		// Accelerate the camera&#xD;&#xA;    		CurrentVelocity.x += direction.x * Acceleration.x * elapsedTime;&#xD;&#xA;    &#xD;&#xA;    		// Don't let it go beyond the max velocity&#xD;&#xA;    		if(CurrentVelocity.x &gt; MaxVelocity.x) {&#xD;&#xA;    			CurrentVelocity.x = MaxVelocity.x;&#xD;&#xA;    		} else if(CurrentVelocity.x &lt; -MaxVelocity.x) {&#xD;&#xA;    			CurrentVelocity.x = -MaxVelocity.x;&#xD;&#xA;    		}&#xD;&#xA;    	} else {&#xD;&#xA;    		// Decelerate the camera in the correct direction&#xD;&#xA;    		if(CurrentVelocity.x &gt; 0.0f) {&#xD;&#xA;    			CurrentVelocity.x -= Acceleration.x * elapsedTime;&#xD;&#xA;    &#xD;&#xA;    			// Don't let it start move in the opposite direction&#xD;&#xA;    			if(CurrentVelocity.x &lt; 0.0f) {&#xD;&#xA;    				CurrentVelocity.x = 0.0f;&#xD;&#xA;    			}&#xD;&#xA;    		} else {&#xD;&#xA;    			CurrentVelocity.x += Acceleration.x * elapsedTime;&#xD;&#xA;    &#xD;&#xA;    			// Don't let it start move in the opposite direction&#xD;&#xA;    			if(CurrentVelocity.x &gt; 0.0f) {&#xD;&#xA;    				CurrentVelocity.x = 0.0f;&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// All code below was removed, it's similar for all other axis...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    bool Camera::IsCameraMoving(void) {&#xD;&#xA;    	return CurrentVelocity.SquaredMagnitude() != 0.0f;&#xD;&#xA;    }" />
  <row Id="23082" PostHistoryTypeId="2" PostId="10917" RevisionGUID="e17ea52a-a083-4ec8-a20a-3af7e8898d30" CreationDate="2011-04-10T13:24:53.550" UserId="6637" Text="Note: All of the following assumes the ball's surface is frictionless (so it won't start spinning or rebound differently because it is).&#xD;&#xA;&#xD;&#xA;At the moment of collision, the ball will be touching the corner. When solid objects collide, a force will act along the so called surface normal, i.e. perpendicular to the surface at the point of collision. &#xD;&#xA;&#xD;&#xA;Since it's a ball, perpendicular to the surface is towards to ball's center. Ok, so we know the direction of the force, what about its magnitude? Assuming an elastic collision (and that the rectangle can't move), the ball must rebound at the same velocity it impacted with.&#xD;&#xA;&#xD;&#xA;Let (nDx, nDy) be the velocity after collision, (oDx, oDy) the velocity before collision, and (x,y) the position of the ball at the point of collision. Let's further assume the corner the ball collides with is at (0,0).&#xD;&#xA;&#xD;&#xA;Expressing our insights as formulae, we have:&#xD;&#xA;&#xD;&#xA;    (nDx, nDy) = (oDx, oDy) + c * (x, y)&#xD;&#xA;    length (nDx, nDy) = length (oDx, oDy)&#xD;&#xA;&#xD;&#xA;With is equivalent to:&#xD;&#xA;&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;    nDx^2 + nDy^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Substituting the first two equations in the last one, we get:&#xD;&#xA;&#xD;&#xA;    (oDx + c * x)^2 + (oDy + c * y)^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Simplifying with the binomial formula:&#xD;&#xA;&#xD;&#xA;    oDx^2 + 2 * oDx * c * x + (c * x) ^ 2 + oDy^2 + 2 * oDy * c * y + (c * y) ^ 2 = oDx^2 + oDy^2&#xD;&#xA;    2 * oDx * c * x + 2 * oDy * c * y + (c * x) ^ 2 + (c * y) ^ 2 = 0&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) * c + (x^2 + y^2) * c^2 = 0&#xD;&#xA;&#xD;&#xA;This quadratic equation for `c` has two solutions, one of which is 0. Obviously, that's not the solution we are interested in, as generally the direction of the ball will change as a result of the collision. To get the other solution, we divide both sides by c and get:&#xD;&#xA;&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) + (x^2 + y^2) * c = 0&#xD;&#xA;&#xD;&#xA;That is:&#xD;&#xA;&#xD;&#xA;     c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;&#xD;&#xA;To summarize, we have:&#xD;&#xA;&#xD;&#xA;    c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;&#xD;&#xA;A few implementation considerations: While you can approximate (x,y) with the ball's position after the simulation step, this approximation will change the angle of deflection and hence be very noticeable, so your simulation steps need to be very fine (perhaps such that the ball doesn't move more than 1/20 of its diamater per step). For a more accurate solution, you could compute the time the collision occurs, and split that simulation step at that time, i.e. do a partial step until the point of collision, and another partial step for the remainder of the step." />
  <row Id="23083" PostHistoryTypeId="5" PostId="10917" RevisionGUID="e3dd4f58-3e7f-47f5-a354-35d7771215f8" CreationDate="2011-04-10T13:32:46.770" UserId="6637" Comment="added 1 characters in body" Text="Note: All of the following assumes the ball's surface is frictionless (so it won't start spinning or rebound differently because it is).&#xD;&#xA;&#xD;&#xA;At the moment of collision, the ball will be touching the corner. When solid objects collide, a force will act along the so called surface normal, i.e. perpendicular to the surface at the point of collision. &#xD;&#xA;&#xD;&#xA;Since it's a ball, perpendicular to the surface is towards to ball's center. Ok, so we know the direction of the force, what about its magnitude? Assuming an elastic collision (and that the rectangle can't move), the ball must rebound at the same velocity it impacted with.&#xD;&#xA;&#xD;&#xA;Let (nDx, nDy) be the velocity after collision, (oDx, oDy) the velocity before collision, and (x,y) the position of the ball at the point of collision. Let's further assume the corner the ball collides with is at (0,0).&#xD;&#xA;&#xD;&#xA;Expressing our insights as formulae, we have:&#xD;&#xA;&#xD;&#xA;    (nDx, nDy) = (oDx, oDy) + c * (x, y)&#xD;&#xA;    length (nDx, nDy) = length (oDx, oDy)&#xD;&#xA;&#xD;&#xA;Which is equivalent to:&#xD;&#xA;&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;    nDx^2 + nDy^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Substituting the first two equations in the last one, we get:&#xD;&#xA;&#xD;&#xA;    (oDx + c * x)^2 + (oDy + c * y)^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Simplifying with the binomial formula:&#xD;&#xA;&#xD;&#xA;    oDx^2 + 2 * oDx * c * x + (c * x) ^ 2 + oDy^2 + 2 * oDy * c * y + (c * y) ^ 2 = oDx^2 + oDy^2&#xD;&#xA;    2 * oDx * c * x + 2 * oDy * c * y + (c * x) ^ 2 + (c * y) ^ 2 = 0&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) * c + (x^2 + y^2) * c^2 = 0&#xD;&#xA;&#xD;&#xA;This quadratic equation for `c` has two solutions, one of which is 0. Obviously, that's not the solution we are interested in, as generally the direction of the ball will change as a result of the collision. To get the other solution, we divide both sides by c and get:&#xD;&#xA;&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) + (x^2 + y^2) * c = 0&#xD;&#xA;&#xD;&#xA;That is:&#xD;&#xA;&#xD;&#xA;     c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;&#xD;&#xA;To summarize, we have:&#xD;&#xA;&#xD;&#xA;    c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;&#xD;&#xA;A few implementation considerations: While you can approximate (x,y) with the ball's position after the simulation step, this approximation will change the angle of deflection and hence be very noticeable, so your simulation steps need to be very fine (perhaps such that the ball doesn't move more than 1/20 of its diamater per step). For a more accurate solution, you could compute the time the collision occurs, and split that simulation step at that time, i.e. do a partial step until the point of collision, and another partial step for the remainder of the step." />
  <row Id="23084" PostHistoryTypeId="2" PostId="10918" RevisionGUID="96448ef9-599c-49d4-9b9e-0b6acdb7606d" CreationDate="2011-04-10T13:59:35.127" UserId="6637" Text="I dislike that idea, because the change in difficulty is not obvious to the player, making him feel he has not improved, interfering with any achievement mechanism such as a high score table. &#xD;&#xA;&#xD;&#xA;Instead, I prefer if the player gets to choose the difficulty level, but has an incentive to go as high with the difficulty level as possible, for instance because in-game rewards (score, powerups, whatever you have) increase with difficulty. &#xD;&#xA;&#xD;&#xA;This doesn't have to break immersion or game flow; in an arcade top-scrolling shooter, the player could pick up a score multiplier (honey), thereby enraging the bee hive :D" />
  <row Id="23085" PostHistoryTypeId="2" PostId="10919" RevisionGUID="fa33fa8d-db6d-42a4-bea4-84ee1743c8dd" CreationDate="2011-04-10T14:12:58.043" UserId="6638" Text="I am playing around a bit with the [PushButton Engine][1] for game development in Flash and have come across a need for a Camera like the Camera that follows Mario in Mario Games. [Flashpunk][2] has a nice implementation of it.&#xD;&#xA;&#xD;&#xA;Does PushButton have it out of the Box?(I searched for it and didn't find, hence the question here). If not then if any of you have written a component for the same, or can guide in the direction, any help would be much appreciated.&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;  [1]: http://pushbuttonengine.com/&#xD;&#xA;  [2]: http://flashpunk.net&#xD;&#xA;" />
  <row Id="23086" PostHistoryTypeId="1" PostId="10919" RevisionGUID="fa33fa8d-db6d-42a4-bea4-84ee1743c8dd" CreationDate="2011-04-10T14:12:58.043" UserId="6638" Text="Does PushButton Game Engine have the notion of a Camera?" />
  <row Id="23087" PostHistoryTypeId="3" PostId="10919" RevisionGUID="fa33fa8d-db6d-42a4-bea4-84ee1743c8dd" CreationDate="2011-04-10T14:12:58.043" UserId="6638" Text="&lt;engine&gt;&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="23088" PostHistoryTypeId="25" PostId="10919" RevisionGUID="d698e6d8-8cfb-4e5c-ac99-ced4df808687" CreationDate="2011-04-10T15:09:03.543" Comment="http://twitter.com/#!/StackGameDev/status/57097769365676032" />
  <row Id="23089" PostHistoryTypeId="2" PostId="10920" RevisionGUID="0b5abd3e-d8b7-4141-aadb-f9f06b5dfcf4" CreationDate="2011-04-10T15:19:34.293" UserId="5966" Text="Box2D marks stable range of object size is 0.1M ~ 10M. This specifies object size range. How about space size? If I make an 1M object at (1000.0f,1000.0f) position? Is it can be stable? Or should I assume spatial range is also limited same with object size? " />
  <row Id="23090" PostHistoryTypeId="1" PostId="10920" RevisionGUID="0b5abd3e-d8b7-4141-aadb-f9f06b5dfcf4" CreationDate="2011-04-10T15:19:34.293" UserId="5966" Text="Box2D stable range and position." />
  <row Id="23091" PostHistoryTypeId="3" PostId="10920" RevisionGUID="0b5abd3e-d8b7-4141-aadb-f9f06b5dfcf4" CreationDate="2011-04-10T15:19:34.293" UserId="5966" Text="&lt;box2d&gt;" />
  <row Id="23092" PostHistoryTypeId="5" PostId="10920" RevisionGUID="eaa5641d-8689-4833-b26c-1e40af22f214" CreationDate="2011-04-10T15:28:19.590" UserId="5966" Comment="added 198 characters in body; edited tags" Text="Box2D marks stable range of object size is 0.1M ~ 10M. This specifies object size range. How about space size? If I make an 1M object at (1000.0f,1000.0f) position? Is it can be stable? Or should I assume spatial range is also limited same with object size? &#xD;&#xA;&#xD;&#xA;PS. Maybe the resolution limit is defined because of limit of floating-point operations. I believe there's also some limitation on spatial range, but I couldn't figure out specific range myself." />
  <row Id="23093" PostHistoryTypeId="6" PostId="10920" RevisionGUID="eaa5641d-8689-4833-b26c-1e40af22f214" CreationDate="2011-04-10T15:28:19.590" UserId="5966" Comment="added 198 characters in body; edited tags" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="23094" PostHistoryTypeId="2" PostId="10921" RevisionGUID="a015cef8-50a5-4ea3-8318-f02569a92474" CreationDate="2011-04-10T16:24:44.213" UserId="5385" Text="We are four guys making a Tower Defense game as a project in first grade on a university. The game is going to be really simple!&#xD;&#xA;&#xD;&#xA; - Three different towers&#xD;&#xA; - Three different monsters&#xD;&#xA; - One map (maybe add some more if we have time)&#xD;&#xA;&#xD;&#xA;The game has to be object oriented.&#xD;&#xA;&#xD;&#xA;The class structure is as following&#xD;&#xA;&#xD;&#xA;**Game** - Drawing of graphic, etc.&#xD;&#xA;**Level** - Every level is an object of this class. Each level has a finite number of wave-objects (in a list)&#xD;&#xA;**Wave** - Contains a list of monsterobjects.&#xD;&#xA;**Monster** - This is a superclass. We make subclasses for the different type of monsters&#xD;&#xA;**Tower** - Superclass to the towers. There are subclasses for each type of tower.&#xD;&#xA;&#xD;&#xA;We are thinking about how to solve the problem that many objects have to do stuff, at the same time... Ex: Move on pixel in one direction...&#xD;&#xA;&#xD;&#xA;What we came up with is the idea of implementing av class Timer, to control when objects to things. I am not sure this is the best way to do it. Could someone give some good ideas about how to solve the continious update case?&#xD;&#xA;&#xD;&#xA;Thx :)" />
  <row Id="23095" PostHistoryTypeId="1" PostId="10921" RevisionGUID="a015cef8-50a5-4ea3-8318-f02569a92474" CreationDate="2011-04-10T16:24:44.213" UserId="5385" Text="Best way to implement a &quot;timer&quot; in a tower defense game?" />
  <row Id="23096" PostHistoryTypeId="3" PostId="10921" RevisionGUID="a015cef8-50a5-4ea3-8318-f02569a92474" CreationDate="2011-04-10T16:24:44.213" UserId="5385" Text="&lt;java&gt;&lt;timer&gt;" />
  <row Id="23097" PostHistoryTypeId="2" PostId="10922" RevisionGUID="1bf69771-d695-4efa-82b3-657de5da0383" CreationDate="2011-04-10T16:32:03.297" UserId="5966" Text="I setup a simple simulation environment something like billiard. There is 4 circle balls (dynamic) and 4 box walls (static).&#xD;&#xA;&#xD;&#xA;Simulation works. Except one thing. Sometimes a ball is sticked to a wall, it sticks to the wall eternally. The other balls hits the sticked ball so many times, but the ball never wants to separated with the wall. The only situation the ball is taking off from the wall is another ball is sticked to the same wall, and hits each other.&#xD;&#xA;&#xD;&#xA;Why this situations occur? And how can I avoid this situation? I looked simulation long time, and now all balls are stuck in each corners completely." />
  <row Id="23098" PostHistoryTypeId="1" PostId="10922" RevisionGUID="1bf69771-d695-4efa-82b3-657de5da0383" CreationDate="2011-04-10T16:32:03.297" UserId="5966" Text="Box2D object sticked to wall" />
  <row Id="23099" PostHistoryTypeId="3" PostId="10922" RevisionGUID="1bf69771-d695-4efa-82b3-657de5da0383" CreationDate="2011-04-10T16:32:03.297" UserId="5966" Text="&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="23100" PostHistoryTypeId="4" PostId="10921" RevisionGUID="5960d791-3d35-4e3f-aa17-5365046e270e" CreationDate="2011-04-10T16:32:32.097" UserId="5385" Comment="edited title; edited title" Text="Best way to update monsters/towers/etc. in a tower defense game?" />
  <row Id="23101" PostHistoryTypeId="4" PostId="10921" RevisionGUID="e0efdb7e-fc4f-45c0-bd0c-4a090aa6a952" CreationDate="2011-04-10T16:42:07.967" UserId="5385" Comment="edited tags; edited title" Text="Best way to update movement in a tower defense game?" />
  <row Id="23102" PostHistoryTypeId="6" PostId="10921" RevisionGUID="e0efdb7e-fc4f-45c0-bd0c-4a090aa6a952" CreationDate="2011-04-10T16:42:07.967" UserId="5385" Comment="edited tags; edited title" Text="&lt;java&gt;&lt;movement&gt;&lt;timer&gt;" />
  <row Id="23103" PostHistoryTypeId="2" PostId="10923" RevisionGUID="58c42659-2b9e-4590-8ae6-9312c574d0ac" CreationDate="2011-04-10T16:52:10.270" UserId="1923" Text="Most likely, you have collision resolution code that reverses (reflects) the direction that the ball is going when it hits the wall. If the ball's position penetrates the wall slightly and stays there until the next frame, it may sense a collision again be reversing direction again (and each frame thereafter) and stay stuck.&#xD;&#xA;&#xD;&#xA;Typically, if you sense a collision with the wall, in addition to reflecting the ball's direction, you should also make sure you position it on the side where it won't sense a collision next frame." />
  <row Id="23104" PostHistoryTypeId="2" PostId="10924" RevisionGUID="b3aa3483-6090-4689-890f-ff9a68618b3f" CreationDate="2011-04-10T16:55:23.293" UserId="6622" Text="Basically, I use an **update loop** and not an event based system.&#xD;&#xA;&#xD;&#xA;To update monsters, you could iterate a list of monsters and update them in the update loop with, let´s say, `monster.update()`&#xD;&#xA;&#xD;&#xA;If a monster has to walk it has to update its position. So, in the update method I calculate the new position on base of the elapsed time, which is stored in a seperate 'timer' class.&#xD;&#xA;&#xD;&#xA;That should be all the 'walking' stuff ;)" />
  <row Id="23105" PostHistoryTypeId="2" PostId="10925" RevisionGUID="e4838ee9-bfcf-4a30-afc5-1394a51b2c17" CreationDate="2011-04-10T17:38:50.960" UserId="51" Text="Here's a visual way of looking at a problem.&#xD;&#xA;&#xD;&#xA;The original problem set is circle vs. rectangle (gray in the image below).  This is equivalent to point vs. rounded rect (shown in black). &#xD;&#xA;&#xD;&#xA;So this is a multi-part problem.  You're testing your point collision vs. 4 lines (extruded out from the edge of the box by the radius of the original circle) and 4 circles (at the corners of the rectangle with the same radius of the original circle).&#xD;&#xA;&#xD;&#xA;With the rough velocity in your original image, the point will hit the bottom right corner circle.  All you have to do is figure out the point on the corner circle that you would hit, calculate the angle of that, and reflect off of it.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;I'll leave the derivation of that as an exercise to the reader.&#xD;&#xA;  [1]: http://i.stack.imgur.com/heEPL.jpg" />
  <row Id="23106" PostHistoryTypeId="6" PostId="10911" RevisionGUID="34f10fbf-5e30-45d5-b636-ff4f885e6da1" CreationDate="2011-04-10T17:40:18.587" UserId="51" Comment="edited tags" Text="&lt;math&gt;&lt;collision-detection&gt;" />
  <row Id="23107" PostHistoryTypeId="2" PostId="10926" RevisionGUID="751b7236-7837-4c2e-831c-58b4fb4d62e3" CreationDate="2011-04-10T17:45:19.120" UserId="6117" Text="I suppose it will fill it's purpose well for a uni project, but in a real game i would have a concrete monster class, and instead of subclassing for types, have the different types of monsters described in data files. Speed, health points, resistances to different types of damage and sprites can be perfectly described in files, it will make it easier for you to add new types of monsters to your game, and you won't have to compile each time you'd want to do so.&#xD;&#xA;&#xD;&#xA;Anyway, about the movement. Give all your &quot;movable&quot; objects different a speed variable. Each frame in your game logic you loop through all those movable objects and do something like &#xD;&#xA;&#xD;&#xA;    object.x += Math.cos(object.angle) * object.speed * timeSinceLastIteration;&#xD;&#xA;    object.y += Math.sin(object.angle) * object.speed * timeSinceLastIteration;&#xD;&#xA;&#xD;&#xA;This applies to monsters, missiles from towers, etc..." />
  <row Id="23108" PostHistoryTypeId="2" PostId="10927" RevisionGUID="a8aa7ffc-02d0-4b04-9c8b-862daac8e386" CreationDate="2011-04-10T18:01:15.217" UserId="6117" Text="I ran some cocos2d examples on a weaker PC than the one in the question with sufficient FPs, but that's all i can say. I also remember running some stuff that was more GPU intensive than this on a Mac Mini, and than running it on the device. It actually ran faster on an iPhone 3GS, i assume it's because the emulator doesn't utilize the GPU, but i might be wrong about that one.&#xD;&#xA;&#xD;&#xA;Hope that was any help to you :)&#xD;&#xA;&#xD;&#xA;Other stuff to consider:&#xD;&#xA;&#xD;&#xA;In anyway, you're really going to want to test your game on a device frequently no matter what, and not just because of performance related issues, but compatibility as well. When working with OpenGL ES (and not only!) often stuff that runs on the simulator won't run on the device and the other way around.&#xD;&#xA;&#xD;&#xA;And another thing to keep in mind might be the most important one, assuming you're talking about *some* kind of an &quot;action&quot; game - getting your gameplay to feel right and intuitive depends alot on it being tested with real input, as opposed to simulating clicks with the mouse.&#xD;&#xA;" />
  <row Id="23109" PostHistoryTypeId="2" PostId="10928" RevisionGUID="819d2dd2-822f-4381-9a91-5546eb8ebc24" CreationDate="2011-04-10T18:02:35.557" UserId="6384" Text="Check out [here][1] and [here][2] for some related questions ans their corresponding answers.&#xD;&#xA;&#xD;&#xA;The biggest pain I'm told is setting up the virtual environment for leopard / snow leopard to run and facilitate. Honestly, I'd recommend just getting a Mac mini or the full MBP and devving on that. You'll save yourself a lot of pain and headache setting up the VM environment.&#xD;&#xA;&#xD;&#xA;But it's entirely possible, baring that you can get a 10.5 / 10.6 OS install. XCode won't really run on anything else. And I definitely wouldn't use the machine to build a distribution version for submission.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/644225/iphone-development-on-hackintosh&#xD;&#xA;  [2]: http://stackoverflow.com/questions/535403/is-it-possible-to-develop-iphone-apps-with-a-hackintosh" />
  <row Id="23110" PostHistoryTypeId="2" PostId="10929" RevisionGUID="20364af1-7fe5-46b3-94f2-e15b9edc2009" CreationDate="2011-04-10T18:03:58.317" UserId="6605" Text="Is it possible to [load a texture using the NDK](http://www.anddev.org/android-2d-3d-graphics-opengl-tutorials-f2/ndk-opengl-loading-resources-and-assets-from-native-code-t11978-15.html?sid=aef538ba2f42ab96ee790ee848d2cd1e), but pass the result back to use in java.&#xD;&#xA;&#xD;&#xA;I have used the code in the link above and it appears to load the png correctly and generates a texture ID without an error (the id is 0 before the loading function is called and non-zero afterwards).&#xD;&#xA;&#xD;&#xA;Is it not allowed to mix opengl operations between C++ and java?&#xD;&#xA;&#xD;&#xA;Thanks for your help&#xD;&#xA;All the best,&#xD;&#xA;Ash" />
  <row Id="23111" PostHistoryTypeId="1" PostId="10929" RevisionGUID="20364af1-7fe5-46b3-94f2-e15b9edc2009" CreationDate="2011-04-10T18:03:58.317" UserId="6605" Text="Passing an OpenGL texture ID loaded in NDK back to java" />
  <row Id="23112" PostHistoryTypeId="3" PostId="10929" RevisionGUID="20364af1-7fe5-46b3-94f2-e15b9edc2009" CreationDate="2011-04-10T18:03:58.317" UserId="6605" Text="&lt;c++&gt;&lt;java&gt;&lt;android&gt;&lt;ndk&gt;" />
  <row Id="23113" PostHistoryTypeId="5" PostId="10927" RevisionGUID="7aff84dc-e552-40af-83b6-baae08c29704" CreationDate="2011-04-10T18:09:01.493" UserId="6117" Comment="added 37 characters in body" Text="I ran some cocos2d examples on a weaker PC than the one in the question, running snow leopard through VMWare with sufficient FPS, but that's all i can say. I also remember running some stuff that was more GPU intensive than this on a Mac Mini, and than running it on the device. It actually ran faster on an iPhone 3GS, i assume it's because the emulator doesn't utilize the GPU, but i might be wrong about that one.&#xD;&#xA;&#xD;&#xA;Hope that was any help to you :)&#xD;&#xA;&#xD;&#xA;Other stuff to consider:&#xD;&#xA;&#xD;&#xA;In anyway, you're really going to want to test your game on a device frequently no matter what, and not just because of performance related issues, but compatibility as well. When working with OpenGL ES (and not only!) often stuff that runs on the simulator won't run on the device and the other way around.&#xD;&#xA;&#xD;&#xA;And another thing to keep in mind might be the most important one, assuming you're talking about *some* kind of an &quot;action&quot; game - getting your gameplay to feel right and intuitive depends alot on it being tested with real input, as opposed to simulating clicks with the mouse.&#xD;&#xA;" />
  <row Id="23114" PostHistoryTypeId="25" PostId="10920" RevisionGUID="07183487-8a15-4573-91fe-88d8ac7a9a6f" CreationDate="2011-04-10T18:09:03.833" Comment="http://twitter.com/#!/StackGameDev/status/57143069585326080" />
  <row Id="23115" PostHistoryTypeId="2" PostId="10930" RevisionGUID="d718f8cb-f70b-410d-bdca-3f9e02fe5963" CreationDate="2011-04-10T18:37:52.967" UserId="6592" Text="I do quite a bit of the opposite -- I leverage the Android facilities for loading images from disk and into OpenGL, and then return the texture ID back over JNI.&#xD;&#xA;&#xD;&#xA;So basically, I have native code, a JNI bridge, and then a series of utility functions in Java that do the actual work, and my call sequence looks something like:&#xD;&#xA;&#xD;&#xA;[native code] -&gt; [JNI code] -&gt; [Java Code]&#xD;&#xA;&#xD;&#xA;and of course the texture ID is passed back to native code. There's no reason this can't work the other way around, though I have to wonder what compels you to do so, since it's so easy to do in Java/Android as it is. What is the problem you're encountering?&#xD;&#xA;&#xD;&#xA;Make sure you aren't attempting to make OpenGL calls simultaneously from multiple threads, and check to see if the OpenGL error flag is being set anywhere." />
  <row Id="23116" PostHistoryTypeId="2" PostId="10931" RevisionGUID="c872fc7a-1503-4248-a5f3-3f76befdfa43" CreationDate="2011-04-10T18:50:06.270" UserId="744" Text="The answer is yes and no. Calculations in local space won't be bothered by large positions, but calculations in world space will be.&#xD;&#xA;&#xD;&#xA;Collisions, for example, happen in local space. If two 1x1, density 1, |v| = 1 objects collide, it doesn't matter where they are - no magnitude involved in the collision detection or correction is going to be much above 2. Likewise, a very large, dense, or fast object is not going to be stable no matter where it is.&#xD;&#xA;&#xD;&#xA;But things like body position updates happen in world space. If the same object is at position 10000000 has a speed of 0.1/sec, it might as well have a speed of 0 - or worse, it might keep one component of velocity but not the other.&#xD;&#xA;&#xD;&#xA;At 1000,1000 you're probably just fine, you've still got a bit of precision to spare. But the world is not unlimited in size." />
  <row Id="23117" PostHistoryTypeId="2" PostId="10932" RevisionGUID="eca32281-29cb-4ba1-b126-24324222ca8a" CreationDate="2011-04-10T19:32:04.047" UserId="6642" Text="I am in the middle of creating a browser game. I need to add 'special items' like in diablo, but simpler. Item names are fixed (e.g. ring of power), only their attributes change. &#xD;&#xA;&#xD;&#xA;In my game there are different towns. Each town may trade a different set of items with randomized characteristics. For instance in Town A 'ring of power' will have better attributes than the same item in Town B (and, thus, it will cost more). &#xD;&#xA;&#xD;&#xA;My question is how to construct the database. &#xD;&#xA;&#xD;&#xA;After constructing the database I will create a small script that will assign a different subset of items in each town. Each item with random attributes and a price that reflects its value.&#xD;&#xA;&#xD;&#xA;I can make the script, but I need help (any help would do) in order to create the database." />
  <row Id="23118" PostHistoryTypeId="1" PostId="10932" RevisionGUID="eca32281-29cb-4ba1-b126-24324222ca8a" CreationDate="2011-04-10T19:32:04.047" UserId="6642" Text="creating a database with special items like in Diablo" />
  <row Id="23119" PostHistoryTypeId="3" PostId="10932" RevisionGUID="eca32281-29cb-4ba1-b126-24324222ca8a" CreationDate="2011-04-10T19:32:04.047" UserId="6642" Text="&lt;architecture&gt;&lt;databases&gt;" />
  <row Id="23120" PostHistoryTypeId="25" PostId="10921" RevisionGUID="8d34dd8a-2746-4664-ae0d-a192bd006d01" CreationDate="2011-04-10T21:09:03.820" Comment="http://twitter.com/#!/StackGameDev/status/57188366969606144" />
  <row Id="23121" PostHistoryTypeId="2" PostId="10933" RevisionGUID="13870383-5209-4e5a-a872-e19f88755fd9" CreationDate="2011-04-10T21:22:48.603" UserId="3175" Text="The problem here is you are trying to key the item on the name &quot;Ring of Power&quot; and thus running into a conflict.  Instead, use a hidden key for the item, multiple items display as &quot;Ring of Power&quot;." />
  <row Id="23122" PostHistoryTypeId="2" PostId="10934" RevisionGUID="668bf3f0-97a5-4678-9028-b207c50cd7c4" CreationDate="2011-04-10T22:14:35.120" UserId="6622" Text="You can think about items as a pair of names with description and attributes (including the price)   &#xD;&#xA;You can do a table 'items':&#xD;&#xA;ID, descid, attrid &#xD;&#xA;&#xD;&#xA;You can make the two others like this:  &#xD;&#xA;'item_descriptions':&#xD;&#xA;ID, name, desc  &#xD;&#xA;'item_attributes':&#xD;&#xA;ID, strength, intellect, agility, price &#xD;&#xA;&#xD;&#xA;This would split up the description part and the, let's say, value part of the item. " />
  <row Id="23123" PostHistoryTypeId="5" PostId="10917" RevisionGUID="200e11ba-8c91-44fe-bfb7-8caa18403d71" CreationDate="2011-04-10T22:35:58.597" UserId="6637" Comment="inlined the special case of the binomial theorem, since not everybody seems to know that one" Text="Note: All of the following assumes the ball's surface is frictionless (so it won't start spinning or rebound differently because it is).&#xD;&#xA;&#xD;&#xA;At the moment of collision, the ball will be touching the corner. When solid objects collide, a force will act along the so called surface normal, i.e. perpendicular to the surface at the point of collision. &#xD;&#xA;&#xD;&#xA;Since it's a ball, perpendicular to the surface is towards to ball's center. Ok, so we know the direction of the force, what about its magnitude? Assuming an elastic collision (and that the rectangle can't move), the ball must rebound at the same velocity it impacted with.&#xD;&#xA;&#xD;&#xA;Let (nDx, nDy) be the velocity after collision, (oDx, oDy) the velocity before collision, and (x,y) the position of the ball at the point of collision. Let's further assume the corner the ball collides with is at (0,0).&#xD;&#xA;&#xD;&#xA;Expressing our insights as formulae, we have:&#xD;&#xA;&#xD;&#xA;    (nDx, nDy) = (oDx, oDy) + c * (x, y)&#xD;&#xA;    length (nDx, nDy) = length (oDx, oDy)&#xD;&#xA;&#xD;&#xA;Which is equivalent to:&#xD;&#xA;&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;    nDx^2 + nDy^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Substituting the first two equations in the last one, we get:&#xD;&#xA;&#xD;&#xA;    (oDx + c * x)^2 + (oDy + c * y)^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Expanding using the binomial thorem&#xD;&#xA;&#xD;&#xA;    (a+b)^2 = a^2 + 2ab + b^2 &#xD;&#xA;&#xD;&#xA;yields:&#xD;&#xA;&#xD;&#xA;    oDx^2 + 2 * oDx * c * x + (c * x) ^ 2 + oDy^2 + 2 * oDy * c * y + (c * y) ^ 2 = oDx^2 + oDy^2&#xD;&#xA;    2 * oDx * c * x + 2 * oDy * c * y + (c * x) ^ 2 + (c * y) ^ 2 = 0&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) * c + (x^2 + y^2) * c^2 = 0&#xD;&#xA;&#xD;&#xA;This quadratic equation for `c` has two solutions, one of which is 0. Obviously, that's not the solution we are interested in, as generally the direction of the ball will change as a result of the collision. To get the other solution, we divide both sides by c and get:&#xD;&#xA;&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) + (x^2 + y^2) * c = 0&#xD;&#xA;&#xD;&#xA;That is:&#xD;&#xA;&#xD;&#xA;     c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;&#xD;&#xA;To summarize, we have:&#xD;&#xA;&#xD;&#xA;    c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;&#xD;&#xA;A few implementation considerations: While you can approximate (x,y) with the ball's position after the simulation step, this approximation will change the angle of deflection and hence be very noticeable, so your simulation steps need to be very fine (perhaps such that the ball doesn't move more than 1/20 of its diamater per step). For a more accurate solution, you could compute the time the collision occurs, and split that simulation step at that time, i.e. do a partial step until the point of collision, and another partial step for the remainder of the step." />
  <row Id="23124" PostHistoryTypeId="5" PostId="10921" RevisionGUID="6c8fcae1-6fac-48a3-a37c-7a61283479cd" CreationDate="2011-04-10T22:36:08.523" UserId="962" Comment="deleted 17 characters in body" Text="We are four guys making a Tower Defense game as a project in first grade on a university. The game is going to be really simple!&#xD;&#xA;&#xD;&#xA; - Three different towers&#xD;&#xA; - Three different monsters&#xD;&#xA; - One map (maybe add some more if we have time)&#xD;&#xA;&#xD;&#xA;The game has to be object oriented.&#xD;&#xA;&#xD;&#xA;The class structure is as following&#xD;&#xA;&#xD;&#xA;**Game** - Drawing of graphic, etc.&#xD;&#xA;**Level** - Every level is an object of this class. Each level has a finite number of wave-objects (in a list)&#xD;&#xA;**Wave** - Contains a list of monsterobjects.&#xD;&#xA;**Monster** - This is a superclass. We make subclasses for the different type of monsters&#xD;&#xA;**Tower** - Superclass to the towers. There are subclasses for each type of tower.&#xD;&#xA;&#xD;&#xA;We are thinking about how to solve the problem that many objects have to do stuff, at the same time... Ex: Move on pixel in one direction...&#xD;&#xA;&#xD;&#xA;What we came up with is the idea of implementing av class Timer, to control when objects to things. I am not sure this is the best way to do it. Could someone give some good ideas about how to solve the continious update case?" />
  <row Id="23126" PostHistoryTypeId="5" PostId="10917" RevisionGUID="f3871ca8-3f40-4bc5-bc9f-97add3a11fd4" CreationDate="2011-04-10T23:15:29.110" UserId="6637" Comment="code example" Text="Note: All of the following assumes the ball's surface is frictionless (so it won't start spinning or rebound differently because it is).&#xD;&#xA;&#xD;&#xA;At the moment of collision, the ball will be touching the corner. When solid objects collide, a force will act along the so called surface normal, i.e. perpendicular to the surface at the point of collision. &#xD;&#xA;&#xD;&#xA;Since it's a ball, perpendicular to the surface is towards to ball's center. Ok, so we know the direction of the force, what about its magnitude? Assuming an elastic collision (and that the rectangle can't move), the ball must rebound at the same velocity it impacted with.&#xD;&#xA;&#xD;&#xA;Let (nDx, nDy) be the velocity after collision, (oDx, oDy) the velocity before collision, and (x,y) the position of the ball at the point of collision. Let's further assume the corner the ball collides with is at (0,0).&#xD;&#xA;&#xD;&#xA;Expressing our insights as formulae, we have:&#xD;&#xA;&#xD;&#xA;    (nDx, nDy) = (oDx, oDy) + c * (x, y)&#xD;&#xA;    length (nDx, nDy) = length (oDx, oDy)&#xD;&#xA;&#xD;&#xA;Which is equivalent to:&#xD;&#xA;&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;    nDx^2 + nDy^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Substituting the first two equations in the last one, we get:&#xD;&#xA;&#xD;&#xA;    (oDx + c * x)^2 + (oDy + c * y)^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Expanding using the binomial thorem&#xD;&#xA;&#xD;&#xA;    (a+b)^2 = a^2 + 2ab + b^2 &#xD;&#xA;&#xD;&#xA;yields:&#xD;&#xA;&#xD;&#xA;    oDx^2 + 2 * oDx * c * x + (c * x) ^ 2 + oDy^2 + 2 * oDy * c * y + (c * y) ^ 2 = oDx^2 + oDy^2&#xD;&#xA;    2 * oDx * c * x + 2 * oDy * c * y + (c * x) ^ 2 + (c * y) ^ 2 = 0&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) * c + (x^2 + y^2) * c^2 = 0&#xD;&#xA;&#xD;&#xA;This quadratic equation for `c` has two solutions, one of which is 0. Obviously, that's not the solution we are interested in, as generally the direction of the ball will change as a result of the collision. To get the other solution, we divide both sides by c and get:&#xD;&#xA;&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) + (x^2 + y^2) * c = 0&#xD;&#xA;&#xD;&#xA;That is:&#xD;&#xA;&#xD;&#xA;     c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;&#xD;&#xA;To summarize, we have:&#xD;&#xA;&#xD;&#xA;    c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;&#xD;&#xA;**Edit**: In code:&#xD;&#xA;&#xD;&#xA;    if (collision) {&#xD;&#xA;        float x = ballX - cornerX;&#xD;&#xA;        float y = ballY - cornerY;&#xD;&#xA;        float c = -2 * (ballDx * x + ballDy * y) / (x * x + y * y);&#xD;&#xA;        ballDx = ballDx + c * x;&#xD;&#xA;        ballDy = ballDy + c * y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A few implementation considerations: While you can approximate (x,y) with the ball's position after the simulation step, this approximation will change the angle of deflection and hence be very noticeable, so your simulation steps need to be very fine (perhaps such that the ball doesn't move more than 1/20 of its diamater per step). For a more accurate solution, you could compute the time the collision occurs, and split that simulation step at that time, i.e. do a partial step until the point of collision, and another partial step for the remainder of the step." />
  <row Id="23127" PostHistoryTypeId="2" PostId="10935" RevisionGUID="0170c602-2404-4350-8c90-0f1c72fb5ce1" CreationDate="2011-04-10T23:18:24.823" UserId="2332" Text="[Game Coding Complete][1] describes an Update loop well. It's simply a while loop running in your main class that does the following (more or less):&#xD;&#xA;&#xD;&#xA;    while( game.isRunning )  &#xD;&#xA;    {  &#xD;&#xA;      GetInput();&#xD;&#xA;      Update( dt );&#xD;&#xA;      Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You pass in a dt (delta time) depending on whether you want your game running at a fixed or variable frame rate. For a fixed frame rate, this isn't necessary.&#xD;&#xA;&#xD;&#xA;Now to do what you want to do quite easily is use the notion of 2D vectors, where one vector represents the position of the monster (x,y) and a velocity vector that represents the direction the monster is travelling in (in units/sec).&#xD;&#xA;&#xD;&#xA;So to create monsters with different speeds, all you need to do is change the velocity vector to whatever you want and let the monster.update() function handle it for you.&#xD;&#xA;&#xD;&#xA;For example:  &#xD;&#xA;&#xD;&#xA;    Monster monster = new Monster();&#xD;&#xA;    monster.position = new Vector2( 0, 0 );&#xD;&#xA;    monster.velocity = new Vector2( 1, 0 );   // Every frame I want the monster &#xD;&#xA;                                              // to move 1 unit to the right&#xD;&#xA;&#xD;&#xA;And your update method would look like this (for a fixed frame rate of 60 frames per second):&#xD;&#xA;&#xD;&#xA;    monster.position += monster.velocity * ( 1.0f / 60.0f ); // The ( 1.0f / 60.0f ) would  &#xD;&#xA;                                                             // be dt if it was passed into the Update() method&#xD;&#xA;&#xD;&#xA;This is known as the Euler update method and it's a very easy and straightforward method of implementing the equations of motion.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Game-Coding-Complete-Mike-McShaffry/dp/1584506806/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1302476759&amp;sr=8-1" />
  <row Id="23128" PostHistoryTypeId="2" PostId="10936" RevisionGUID="22789019-36ed-4160-8acf-7498eb60ec7e" CreationDate="2011-04-10T23:25:37.613" UserId="6440" Text="I want to calculate world coordinates from camera coordinates. However, I seem to have problems with my understandings of how matrices in HLSL work.&#xD;&#xA;&#xD;&#xA;From world to camera is clear:&#xD;&#xA;&#xD;&#xA;    cameraPosition = mul(mul(worldPosition, view), projection);&#xD;&#xA;&#xD;&#xA;Logic would now say that for the reverse, I could just use something like&#xD;&#xA;&#xD;&#xA;    worldPosition = mul(mul(cameraPosition, invProjection), invView);&#xD;&#xA;&#xD;&#xA;However, when I check if it is correct with&#xD;&#xA;&#xD;&#xA;    cameraPosition = mul(mul(mul(mul(cameraPosition, invProjection), &#xD;&#xA;                                       invView), view), projection);&#xD;&#xA;&#xD;&#xA;I don't get the same point back anymore.&#xD;&#xA;&#xD;&#xA;The inverses should be fine as `view` * `invView` produces the identity matrix etc.&#xD;&#xA;&#xD;&#xA;What is my misunderstanding here? Even the simpler case does not work:&#xD;&#xA;&#xD;&#xA;    void VS_test(in  float4 inPosition            : POSITION,&#xD;&#xA;                 out float4 outPosition           : POSITION)&#xD;&#xA;    {&#xD;&#xA;        outPosition = inPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;produces the triangle I want. However, using &#xD;&#xA;&#xD;&#xA;    void VS_test(in  float4 inPosition            : POSITION,&#xD;&#xA;                 out float4 outPosition           : POSITION)&#xD;&#xA;    {&#xD;&#xA;        outPosition = mul(mul(inPosition, view), invView);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;already produces no visible triangle. Same with&#xD;&#xA;&#xD;&#xA;    void VS_test(in  float4 inPosition            : POSITION,&#xD;&#xA;                 out float4 outPosition           : POSITION)&#xD;&#xA;    {&#xD;&#xA;        outPosition = mul(inPosition, mul(view, invView));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader is just a shader which returns a constant color.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23129" PostHistoryTypeId="1" PostId="10936" RevisionGUID="22789019-36ed-4160-8acf-7498eb60ec7e" CreationDate="2011-04-10T23:25:37.613" UserId="6440" Text="From camera coordinates to world coordinates" />
  <row Id="23130" PostHistoryTypeId="3" PostId="10936" RevisionGUID="22789019-36ed-4160-8acf-7498eb60ec7e" CreationDate="2011-04-10T23:25:37.613" UserId="6440" Text="&lt;xna&gt;&lt;shaders&gt;&lt;camera&gt;&lt;hlsl&gt;&lt;matrix&gt;" />
  <row Id="23131" PostHistoryTypeId="25" PostId="10936" RevisionGUID="85cf73a3-9a13-443c-959d-eb7ad9213199" CreationDate="2011-04-11T00:09:03.817" Comment="http://twitter.com/#!/StackGameDev/status/57233665935155200" />
  <row Id="23132" PostHistoryTypeId="2" PostId="10937" RevisionGUID="e7f2cb27-478e-421a-b7eb-3c55d610a1e4" CreationDate="2011-04-11T00:20:41.647" UserId="237" Text="While it's true that `matrix * invMatrix` results in an identity matrix, if one of these operations discards information (eg, turning 3D world coordinates into 2D screen coordinates), then you can't get that information back. You can *cast rays* out from the camera at a particular vector to try and hit something, but you can't reproduce the original coordinate.&#xD;&#xA;&#xD;&#xA;Need proof?&#xD;&#xA;&#xD;&#xA;    (X * 0) / 0 == ? // Solve as an algorithm, not as algebra :)" />
  <row Id="23133" PostHistoryTypeId="2" PostId="10938" RevisionGUID="d1e10883-88bb-46e0-8767-45a49aa22af5" CreationDate="2011-04-11T00:39:51.267" UserId="6645" Text="You can find an already installed 10.6.2 VMware image. Upgrade it to 10.6.7 (the latest version) using the Mac OS X updater, **install the VMware Tools** (otherwise is slow as hell) and after XCode 4. &#xD;&#xA;&#xD;&#xA;I've done this, it runs a little sluggish (Win 7 x64, **Intel** quad core, 8 GB RAM, 3 GB for VM) but it's usable. Don't know if it will work on AMD.&#xD;&#xA;&#xD;&#xA;OpenGL ES 2.0 also works, but very slowly. Yes, shaders work. From my understanding it's software emulated. Some Mac OS X native OpenGL applications I've tested cause a kernel panic.&#xD;&#xA;&#xD;&#xA;If you tell me how I can install Airport Mania in the emulator (I'm new to this) I can test the FPS for you, assuming it's displayed somewhere (please tell where)." />
  <row Id="23134" PostHistoryTypeId="5" PostId="10937" RevisionGUID="012627ae-0384-4891-bad0-e29d36cffbaa" CreationDate="2011-04-11T00:50:13.900" UserId="237" Comment="added 145 characters in body; added 15 characters in body" Text="Since you mentioned the projection matrix in your code, I'm going to assume that you mean screen coordinates rather than camera coordinates. &#xD;&#xA;&#xD;&#xA;While it's true that mathematically `matrix * invMatrix` results in an identity matrix, if one of these operations discards information (eg, turning 3D world coordinates into 2D screen coordinates), then you can't get that information back. You can *cast rays* out from the camera at a particular vector to try and hit something, but you can't reproduce the original coordinate.&#xD;&#xA;&#xD;&#xA;Need proof?&#xD;&#xA;&#xD;&#xA;    (X * 0) / 0 == ? // Solve as an algorithm, not as algebra :)" />
  <row Id="23135" PostHistoryTypeId="2" PostId="10939" RevisionGUID="454ad91b-d911-4ed8-9518-85546027a517" CreationDate="2011-04-11T02:45:43.550" UserId="6647" Text="I am making an OpenGL graphics accelerated FPS, and I need to find a library to handle GUI correctly. My current GUI handler just wont do!&#xD;&#xA;&#xD;&#xA;Yes, as in the title says, the UI of the game is Metro(ZuneHD, WP7, etc).&#xD;&#xA;&#xD;&#xA;So the UI contains little to NO images, just fonts.&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;John." />
  <row Id="23136" PostHistoryTypeId="1" PostId="10939" RevisionGUID="454ad91b-d911-4ed8-9518-85546027a517" CreationDate="2011-04-11T02:45:43.550" UserId="6647" Text="Looking for a GUI library for OpenGL, or tips for my own (MetroUI)" />
  <row Id="23137" PostHistoryTypeId="3" PostId="10939" RevisionGUID="454ad91b-d911-4ed8-9518-85546027a517" CreationDate="2011-04-11T02:45:43.550" UserId="6647" Text="&lt;opengl&gt;&lt;gui&gt;" />
  <row Id="23138" PostHistoryTypeId="25" PostId="10939" RevisionGUID="b86dc12b-7430-4df2-94e8-4f25646473a7" CreationDate="2011-04-11T03:09:03.700" Comment="http://twitter.com/#!/StackGameDev/status/57278964078616576" />
  <row Id="23140" PostHistoryTypeId="2" PostId="10941" RevisionGUID="fefd11f9-3350-4ce1-ba5d-88f4e43f58b9" CreationDate="2011-04-11T03:55:39.510" UserId="6588" Text="One of the best GUI libraries that renders in OpenGL is CEGUI:&#xD;&#xA;http://www.cegui.org.uk/wiki/index.php/Main_Page&#xD;&#xA;&#xD;&#xA;It isn't specifically designed to emulate WP7 but I would imagine you can accomplish that with customized graphics within CEGUI." />
  <row Id="23141" PostHistoryTypeId="2" PostId="10942" RevisionGUID="0087e978-8c0c-492f-a0c9-dc53f9e52e8f" CreationDate="2011-04-11T04:55:46.817" UserId="6650" Text="how do you access and modify the tech tree(make it a RPG skill tree for example), are there any possible way to make a skill like disable minimap, make an area of minimap become black(can't see enemy or allie on map)." />
  <row Id="23142" PostHistoryTypeId="1" PostId="10942" RevisionGUID="0087e978-8c0c-492f-a0c9-dc53f9e52e8f" CreationDate="2011-04-11T04:55:46.817" UserId="6650" Text="Modify tech tree and minimap in SC2 editor" />
  <row Id="23143" PostHistoryTypeId="3" PostId="10942" RevisionGUID="0087e978-8c0c-492f-a0c9-dc53f9e52e8f" CreationDate="2011-04-11T04:55:46.817" UserId="6650" Text="&lt;starcraft-2&gt;" />
  <row Id="23144" PostHistoryTypeId="2" PostId="10943" RevisionGUID="7d1cfe48-6a7e-403c-b8da-1cfbbba03bc2" CreationDate="2011-04-11T05:09:27.463" UserId="5413" Text="I think I'm at a conundrum here, I've creating a matching game in C# winforms. And I'm 90% done, the only thing left is the game loop.&#xD;&#xA;&#xD;&#xA;The matching games consits of two multidimensional arrrays which are panels. And after I set everything up, I can RunGame(), which where my game loop is, the problem I am having is getting input. I'm not sure how to do that yet.&#xD;&#xA;&#xD;&#xA;For example.&#xD;&#xA;&#xD;&#xA;It's a while loop.&#xD;&#xA;&#xD;&#xA;So,&#xD;&#xA;&#xD;&#xA;    while(game.isRunning()){&#xD;&#xA;    &#xD;&#xA;    //get input from player.&#xD;&#xA;    &#xD;&#xA;    //getchoice then redraw panels accordingly&#xD;&#xA;    &#xD;&#xA;    //get input from player 2.&#xD;&#xA;    &#xD;&#xA;    //getchoice then redraw panels accordingly&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem is my players click on panels that's how I get the choice they've made. So I wanted to know if you guys have any good ways of getting input in a loop from an event that will be launched outside the loop for a game.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="23145" PostHistoryTypeId="1" PostId="10943" RevisionGUID="7d1cfe48-6a7e-403c-b8da-1cfbbba03bc2" CreationDate="2011-04-11T05:09:27.463" UserId="5413" Text="Have a while loops but inputs depend on events fired, what are some ways on getting the input?" />
  <row Id="23146" PostHistoryTypeId="3" PostId="10943" RevisionGUID="7d1cfe48-6a7e-403c-b8da-1cfbbba03bc2" CreationDate="2011-04-11T05:09:27.463" UserId="5413" Text="&lt;c#&gt;&lt;gui&gt;" />
  <row Id="23147" PostHistoryTypeId="2" PostId="10944" RevisionGUID="afb90027-9066-4d79-bd88-cd534d240b50" CreationDate="2011-04-11T05:11:08.480" UserId="4200" Text="    while(game.isRunning()){&#xD;&#xA;        if(player1InputKey())&#xD;&#xA;            DoSomething();&#xD;&#xA;&#xD;&#xA;        if(player2InputKey())&#xD;&#xA;            DoSomethingElse();&#xD;&#xA;&#xD;&#xA;        Draw();&#xD;&#xA;    }" />
  <row Id="23148" PostHistoryTypeId="25" PostId="10943" RevisionGUID="0ab3b435-e894-457c-b344-2c3f28515394" CreationDate="2011-04-11T06:09:03.557" Comment="http://twitter.com/#!/StackGameDev/status/57324261295144960" />
  <row Id="23149" PostHistoryTypeId="2" PostId="10945" RevisionGUID="5c3a3d4e-f80d-4d4b-a980-d2b23592ac5b" CreationDate="2011-04-11T06:59:59.140" UserId="4129" Text="I produce a strip of quads with texture coordinates to represent a path.&#xD;&#xA;&#xD;&#xA;My texture is tiled along these quads.&#xD;&#xA;&#xD;&#xA;When the quad is drawn very small (on my integrated Intel chip) it draws distorted.&#xD;&#xA;&#xD;&#xA;![200KB gif of scene at different zooms][1]&#xD;&#xA;&#xD;&#xA;How can I avoid this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/mh5AJ.gif" />
  <row Id="23150" PostHistoryTypeId="1" PostId="10945" RevisionGUID="5c3a3d4e-f80d-4d4b-a980-d2b23592ac5b" CreationDate="2011-04-11T06:59:59.140" UserId="4129" Text="texture distortion at a distance" />
  <row Id="23151" PostHistoryTypeId="3" PostId="10945" RevisionGUID="5c3a3d4e-f80d-4d4b-a980-d2b23592ac5b" CreationDate="2011-04-11T06:59:59.140" UserId="4129" Text="&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="23152" PostHistoryTypeId="2" PostId="10946" RevisionGUID="e2a70fa5-9ad9-4583-9fc7-fd8944bae5e3" CreationDate="2011-04-11T07:09:01.980" UserId="3794" Text="Try [anisotropic filtering][1]. In opengl it should be enabled like this:&#xD;&#xA;&#xD;&#xA;    GLfloat largest_supported_anisotropy; &#xD;&#xA;    glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &amp;largest_supported_anisotropy); &#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Anisotropic_filtering" />
  <row Id="23153" PostHistoryTypeId="2" PostId="10947" RevisionGUID="cec14663-a138-4659-939e-69ccaaa09167" CreationDate="2011-04-11T07:38:45.823" UserId="5224" Text="As notabene said, anisotropic filtering will help, especially if you combine it with mip-mapping.&#xD;&#xA;&#xD;&#xA;Why this works is explained perfectly in this wikipedia article: http://en.wikipedia.org/wiki/Anisotropic_filtering&#xD;&#xA;&#xD;&#xA;&quot;In layman's terms, anisotropic filtering retains the &quot;sharpness&quot; of a texture normally lost by MIP map texture's attempts to avoid aliasing. Anisotropic filtering can therefore be said to maintain crisp texture detail at all viewing orientations while providing fast anti-aliased texture filtering.&quot;&#xD;&#xA;&#xD;&#xA;On how todo mipmapping in OpenGL see: http://www.swiftless.com/tutorials/opengl/mipmap_generation.html" />
  <row Id="23154" PostHistoryTypeId="5" PostId="10882" RevisionGUID="f09573f5-8e6c-4c27-a96b-aad3da63b3da" CreationDate="2011-04-11T07:52:30.367" UserId="3794" Comment="added 2 characters in body" Text="Simple geometry shaders: &#xD;&#xA;&#xD;&#xA; - drawing normals as lines (input is a regular mesh)&#xD;&#xA; - creating duplicates of mesh in a different color&#xD;&#xA; - maybe simple fur created by lines (similar to drawing normals actually)" />
  <row Id="23155" PostHistoryTypeId="5" PostId="10936" RevisionGUID="da94a14e-eced-4d5f-bec8-a5d8d00b02f8" CreationDate="2011-04-11T08:28:32.020" UserId="6440" Comment="added 242 characters in body" Text="I want to calculate world coordinates from camera coordinates. However, I seem to have problems with my understandings of how matrices in HLSL work.&#xD;&#xA;&#xD;&#xA;From world to camera is clear:&#xD;&#xA;&#xD;&#xA;    cameraPosition = mul(mul(worldPosition, view), projection);&#xD;&#xA;&#xD;&#xA;Logic would now say that for the reverse, I could just use something like&#xD;&#xA;&#xD;&#xA;    worldPosition = mul(mul(cameraPosition, invProjection), invView);&#xD;&#xA;&#xD;&#xA;However, when I check if it is correct with&#xD;&#xA;&#xD;&#xA;    cameraPosition = mul(mul(mul(mul(cameraPosition, invProjection), &#xD;&#xA;                                       invView), view), projection);&#xD;&#xA;&#xD;&#xA;I don't get the same point back anymore.&#xD;&#xA;&#xD;&#xA;The inverses should be fine as `view` * `invView` produces the identity matrix etc.&#xD;&#xA;&#xD;&#xA;What is my misunderstanding here? Even the simpler case does not work:&#xD;&#xA;&#xD;&#xA;    void VS_test(in  float4 inPosition            : POSITION,&#xD;&#xA;                 out float4 outPosition           : POSITION)&#xD;&#xA;    {&#xD;&#xA;        outPosition = inPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;produces the triangle I want. However, using &#xD;&#xA;&#xD;&#xA;    void VS_test(in  float4 inPosition            : POSITION,&#xD;&#xA;                 out float4 outPosition           : POSITION)&#xD;&#xA;    {&#xD;&#xA;        outPosition = mul(mul(inPosition, view), invView);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;already produces no visible triangle. Same with&#xD;&#xA;&#xD;&#xA;    void VS_test(in  float4 inPosition            : POSITION,&#xD;&#xA;                 out float4 outPosition           : POSITION)&#xD;&#xA;    {&#xD;&#xA;        outPosition = mul(inPosition, mul(view, invView));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader is just a shader which returns a constant color.&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;I have 3D camera-space coordinates WITH z-buffer value, like (0, 0, zNear) for the point directly in the center of the screen. I want to know what world coordinates correspond to this by doing the whole view-transform backwards." />
  <row Id="23156" PostHistoryTypeId="2" PostId="10948" RevisionGUID="99e64aa5-f7d2-4317-acb7-5a53fce248f2" CreationDate="2011-04-11T09:00:43.610" UserId="2710" Text="This kind of game loop is a poor choice if you're using winforms. In winforms UI, input events are processed in the same thread as your program logic - in this case, game loop. This means that you _won't_ get any input events while the loop is running (unless you create a second thread, of course.)&#xD;&#xA;&#xD;&#xA;It is much better to use events for everything. There's a `Timer` class that you can use to have events fired periodically - every 100, or 50, ms. That's not enough resolution for an action game, but will probably be OK for a puzzle. &#xD;&#xA;&#xD;&#xA;Then, you can have your matching, animation etc in `OnTimer` event handler, and input in `OnClick` event handler. Or, for simplicity, `OnClick` could just set some state like &quot;player clicked here&quot;, and `OnTimer` would then check this state and act accordingly - that way, all game logic would be in the same place." />
  <row Id="23157" PostHistoryTypeId="25" PostId="10945" RevisionGUID="fe308203-f4e6-4040-96fc-963b0e207081" CreationDate="2011-04-11T09:09:03.830" Comment="http://twitter.com/#!/StackGameDev/status/57369561497997312" />
  <row Id="23158" PostHistoryTypeId="2" PostId="10949" RevisionGUID="f098ab3d-76c3-4471-86d3-3184f7757fa6" CreationDate="2011-04-11T09:12:47.253" UserId="3794" Text="I think that the problem is that you don't normalize screen space point after worldViewProj multiplication. This should do the job:&#xD;&#xA;&#xD;&#xA;    cameraPositionScreenSpace = mul(mul(worldPosition, view), projection);&#xD;&#xA;    cameraPositionScreenSpace /= cameraPositionScreenSpace .w;" />
  <row Id="23159" PostHistoryTypeId="2" PostId="10950" RevisionGUID="5ecbaa67-22cf-4685-ace0-56c59371e772" CreationDate="2011-04-11T10:44:31.700" UserId="1868" Text="From the site: &quot;Cycleblob is implemented using WebGL and HTML 5 canvas elements and is written completely in JavaScript.&quot;&#xD;&#xA;&#xD;&#xA;http://cycleblob.com/" />
  <row Id="23160" PostHistoryTypeId="2" PostId="10951" RevisionGUID="65fed66d-2b7b-47c3-8260-1862041db6f7" CreationDate="2011-04-11T10:45:26.720" UserId="4828" Text="I recommend read these articles:&#xD;&#xA;&#xD;&#xA; - http://thegameprodigy.com/the-game-design-canvas-an-introduction/&#xD;&#xA; - http://thegameprodigy.com/the-game-design-canvas-base-mechanics/&#xD;&#xA; - http://thegameprodigy.com/the-game-design-canvas-punishment-and-reward-systems/&#xD;&#xA; - http://thegameprodigy.com/the-game-design-canvas-aesthetic-layout/&#xD;&#xA; - http://thegameprodigy.com/the-game-design-canvas-long-term-incentive/&#xD;&#xA;&#xD;&#xA;There you can find basic information about game mechanics etc. It can help you." />
  <row Id="23162" PostHistoryTypeId="2" PostId="10952" RevisionGUID="bb025a8f-8587-4671-95c6-6c7eb7328e9a" CreationDate="2011-04-11T11:58:33.740" UserId="6440" Text="Okay, stupid me. I accidently forwarded a wrong inverse matrix to the shader :-)" />
  <row Id="23163" PostHistoryTypeId="25" PostId="10942" RevisionGUID="91bfb595-ee5e-477e-a003-fc30eb18fd46" CreationDate="2011-04-11T12:09:03.653" Comment="http://twitter.com/#!/StackGameDev/status/57414859683401728" />
  <row Id="23164" PostHistoryTypeId="2" PostId="10953" RevisionGUID="11f8f6c0-bb3d-4b64-a5a8-3c0fedcb61f6" CreationDate="2011-04-11T12:23:41.927" UserId="3505" Text="If it's multi player it's going to have to run on the server, you can only export the interface to the browser without allowing people to cheat.&#xD;&#xA;&#xD;&#xA;If your generation script is fast enough and made as an ID-&gt;item formula you may simply generate the item whenever needed. You could also store the entire list as a literal in a code file. I'd suggest using one of these methods for the client code.&#xD;&#xA;&#xD;&#xA;For the server code, if you are using a stateless language like PHP a literal list may be a lot of strain on the server as it will have to be loaded once for each request, so in that case you would have to use on-the-fly generation, or if that is not practical either a database.&#xD;&#xA;&#xD;&#xA;Your typical relational database is very slow, that is why I'd as far as conveniently possible would try to avoid using it." />
  <row Id="23165" PostHistoryTypeId="5" PostId="10948" RevisionGUID="1e4bfbea-ea0b-4c8a-ac22-5f4a7544323d" CreationDate="2011-04-11T12:31:39.360" UserId="2710" Comment="added link to MSDN and sample code." Text="This kind of game loop is a poor choice if you're using winforms. In winforms UI, input events are processed in the same thread as your program logic - in this case, game loop. This means that you _won't_ get any input events while the loop is running (unless you create a second thread, of course.)&#xD;&#xA;&#xD;&#xA;It is much better to use events for everything. There's a `Timer` class that you can use to have events fired periodically - every 100, or 50, ms. That's not enough resolution for an action game, but will probably be OK for a puzzle. &#xD;&#xA;&#xD;&#xA;Then, you can have your matching, animation etc in `OnTimer` event handler, and input in `OnClick` event handler. Or, for simplicity, `OnClick` could just set some state like &quot;player clicked here&quot;, and `OnTimer` would then check this state and act accordingly - that way, all game logic would be in the same place.&#xD;&#xA;&#xD;&#xA;Take a look at `Timer` documentation [here][1]. What you need is place code that updates panels inside your timer handler (`TimerEventProcessor` in the example), and user input code inside corresponding `Click` handlers for your panels. Something along the lines of&#xD;&#xA;&#xD;&#xA;    panel1.Click += HandlePlayerInput; // this methods handles player's clicking on the panel. Use other events to capture other input like dragging.&#xD;&#xA;    panel2.Click += HandlePlayerInput;&#xD;&#xA;    panel1.Paint += RedrawPanel; // this method actually draws whatever there is in the panel&#xD;&#xA;    panel2.Paint += RedrawPanel;&#xD;&#xA;    timer1.Tick += UpdatePanelContents; // this is whatever logic is left in your game loop - generally, checking the state of panels, finding matches, and the like...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx" />
  <row Id="23166" PostHistoryTypeId="2" PostId="10954" RevisionGUID="dc493007-a17c-4fe5-9cef-d64db87970c7" CreationDate="2011-04-11T12:56:14.893" UserId="3505" Text="Attach a function that set a variable to each event, like:&#xD;&#xA;&#xD;&#xA;    gloabl eventfired=false&#xD;&#xA;    eventhandler=function(){&#xD;&#xA;        eventfired=true&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    while(...){&#xD;&#xA;        if(eventfired){&#xD;&#xA;            //do stuff&#xD;&#xA;            eventfired=false&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="23167" PostHistoryTypeId="5" PostId="10942" RevisionGUID="35a7a602-def5-442a-b3cf-53e04b1f5e28" CreationDate="2011-04-11T13:38:41.187" UserId="3588" Comment="Just minor toning. Something tells me it should probably be two separate questions, but until a split happens no harm in getting some basic editing in there. ♪" Text="How do you access and modify the tech tree (to make it like an RPG skill tree, for example)? &#xD;&#xA;&#xD;&#xA;Is there any possible way to make a skill like `disable minimap`, which will make an area of the minimap become black (can't see enemy or allie on map)?" />
  <row Id="23168" PostHistoryTypeId="4" PostId="10942" RevisionGUID="35a7a602-def5-442a-b3cf-53e04b1f5e28" CreationDate="2011-04-11T13:38:41.187" UserId="3588" Comment="Just minor toning. Something tells me it should probably be two separate questions, but until a split happens no harm in getting some basic editing in there. ♪" Text="Modify tech tree and minimap in StarCraft 2 editor" />
  <row Id="23169" PostHistoryTypeId="24" PostId="10942" RevisionGUID="35a7a602-def5-442a-b3cf-53e04b1f5e28" CreationDate="2011-04-11T13:38:41.187" Comment="Proposed by 3588 approved by 189 edit id of 257" />
  <row Id="23170" PostHistoryTypeId="2" PostId="10955" RevisionGUID="25a23c2e-ac4f-4609-8995-0e7c4a46c650" CreationDate="2011-04-11T14:08:20.510" UserId="-1" Text="" />
  <row Id="23171" PostHistoryTypeId="2" PostId="10956" RevisionGUID="86042979-e3ce-485b-96c6-e0d80f8869d7" CreationDate="2011-04-11T14:08:20.510" UserId="-1" Text="" />
  <row Id="23172" PostHistoryTypeId="2" PostId="10957" RevisionGUID="b4692eec-1002-4dbf-86d3-441ff470c90a" CreationDate="2011-04-11T14:32:23.133" UserId="-1" Text="" />
  <row Id="23173" PostHistoryTypeId="2" PostId="10958" RevisionGUID="35491add-2672-4f89-a576-201333588e8d" CreationDate="2011-04-11T14:32:23.133" UserId="-1" Text="" />
  <row Id="23174" PostHistoryTypeId="5" PostId="10958" RevisionGUID="e777fa7f-ab0d-476b-8926-d9a37b72364c" CreationDate="2011-04-11T15:03:16.763" UserId="3588" Comment="added 125 characters in body" Text="A real-time strategy game from Blizzard released in 2010. This tag is for the developing maps and other content for the game." />
  <row Id="23175" PostHistoryTypeId="24" PostId="10958" RevisionGUID="e777fa7f-ab0d-476b-8926-d9a37b72364c" CreationDate="2011-04-11T15:03:16.763" Comment="Proposed by 3588 approved by 51 edit id of 263" />
  <row Id="23176" PostHistoryTypeId="5" PostId="10957" RevisionGUID="f6ae60f3-eb5c-4ebb-8563-bf02f1ab2497" CreationDate="2011-04-11T15:03:18.497" UserId="3588" Comment="added 491 characters in body" Text="StarCraft 2 features an extremely robust and adaptable map editor capable of creating well beyond the game's normal RTS gameplay. Questions with this tag thus deal with all of the intricacies of developing levels and other modifications to the game. &#xD;&#xA;&#xD;&#xA;If you have questions about the gameplay of the StarCraft 2 game itself, please ask on [the Gaming Stack Exchange site](http://gaming.stackexchange.com), using [the appropriate tag](http://gaming.stackexchange.com/tags/starcraft-2/info)." />
  <row Id="23177" PostHistoryTypeId="24" PostId="10957" RevisionGUID="f6ae60f3-eb5c-4ebb-8563-bf02f1ab2497" CreationDate="2011-04-11T15:03:18.497" Comment="Proposed by 3588 approved by 51 edit id of 262" />
  <row Id="23178" PostHistoryTypeId="5" PostId="10497" RevisionGUID="ef54256c-95a4-48bd-abd3-3096043afdf3" CreationDate="2011-04-11T15:03:27.183" UserId="3588" Comment="Reformat to match the formatting of the other genre tags. I should really make a better habit of opening with the tag's utility in these genre tags. ♪" Text="Use this tag when your question is about a Text-based game you are developing. This tag **does not** apply to games which use ASCII text to illustrate the game world, such as in *Rogue*.&#xD;&#xA;&#xD;&#xA;**Text-based games** have their own unique feature because nothing is represented graphically, and so it plays more like reading a book. As such, there is a larger focus on the colorful detail of words to describe the expansive world of the game and its eccentric denizens. Or not, if all you need to do is shoot into one of 20 rooms to hit a Wumpus.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23179" PostHistoryTypeId="24" PostId="10497" RevisionGUID="ef54256c-95a4-48bd-abd3-3096043afdf3" CreationDate="2011-04-11T15:03:27.183" Comment="Proposed by 3588 approved by 51 edit id of 261" />
  <row Id="23180" PostHistoryTypeId="5" PostId="10499" RevisionGUID="5cb7a3e1-04c9-4f46-bc19-4cca693d18a7" CreationDate="2011-04-11T15:03:32.740" UserId="3588" Comment="Altering the format to more closely match that of other genre tags; namely, I'm moving the closing point to the start." Text="Use this tag if you're having questions or problems while developing a Roguelike game of your own.&#xD;&#xA;&#xD;&#xA;**Roguelikes** are games inspired from the game [*Rogue*](http://en.wikipedia.org/wiki/Rogue_(computer_game)). They share many of the same qualities as many RPGs, including stat systems, character creation, and item usage. Beyond that, the most symbolic factors of a roguelike are **random generation**, **turn-based action**, and **permanent death**.&#xD;&#xA;&#xD;&#xA; - **Random Generation** is a staple in many games, but Roguelikes will randomly generate almost the entirety of their worlds as a defining factor. At basic, the dungeons are randomly generated, as well as the nature of various items. As such, they boast high replayability.&#xD;&#xA; - **Turn-Based Action** is the second core aspect of Roguelikes. To accomodate for often-times very high difficulty and extremely complex problems, Roguelikes are turn-based to allow the player to deeply think about all options available. The entire game world operates on a turn-by-turn basis, though the strict method may vary between the specific game.&#xD;&#xA; - **Permanent Death** is one of the most well-known aspects of Roguelikes. When the player encounters a grim fate, the save file is deleted, disallowing any attempt to retry with that same character. It is extremely common in most, although some will opt for slightly less severe penalties such as stripping your character of every piece of equipment, or reducing the character to level 1. &#xD;&#xA;&#xD;&#xA;&lt;!-- See also: [What attributes makes a game a roguelike?](http://gaming.stackexchange.com/questions/5195/what-attributes-makes-a-game-a-roguelike/5198#5198) --&gt;" />
  <row Id="23181" PostHistoryTypeId="24" PostId="10499" RevisionGUID="5cb7a3e1-04c9-4f46-bc19-4cca693d18a7" CreationDate="2011-04-11T15:03:32.740" Comment="Proposed by 3588 approved by 51 edit id of 260" />
  <row Id="23182" PostHistoryTypeId="5" PostId="10956" RevisionGUID="31dc4ca0-1d59-4288-80b1-27229e77aee6" CreationDate="2011-04-11T15:03:35.640" UserId="3588" Comment="added 138 characters in body" Text="A 3D or pseudo-3D action game genre categorized most famously by its first-person perspective and a bias towards ranged projectile combat." />
  <row Id="23183" PostHistoryTypeId="24" PostId="10956" RevisionGUID="31dc4ca0-1d59-4288-80b1-27229e77aee6" CreationDate="2011-04-11T15:03:35.640" Comment="Proposed by 3588 approved by 51 edit id of 259" />
  <row Id="23184" PostHistoryTypeId="5" PostId="10955" RevisionGUID="bb4f6a29-6f3b-4831-91a5-00caf6658049" CreationDate="2011-04-11T15:03:37.310" UserId="3588" Comment="added 1155 characters in body" Text="Use this tag if you're having questions or problems while developing a First Person Shooter game of your own.&#xD;&#xA;&#xD;&#xA;Perhaps the most widespread and popular genre of first-person-perspective 3D action games of the modern day, **First Person Shooters**, or **FPS**, involve a heavy focus or predominance of gunplay or other forms of ranged attack. The first person perspective lends itself very easily to the art of aiming a gun. While melee attacks and weaponry may be available, they are not a defining characteristic and serve as either emergency measures or as deliberate exceptions. They are one of the more popular genres in the world of PC gaming, and often incorporate multiplayer cooperative and competitive play.&#xD;&#xA;&#xD;&#xA;If the perspective is a chase camera or otherwise from the third person, it is a **Third Person Shooter**. Games which can shift between third-person or first-person perspective are often classified under the perspective which is default or most common in the series. These classes of shooting games are distinguished from **Shoot-Em-Up** games by their playing out in a full 3D environment; the latter genre is engaged on a 2D plane." />
  <row Id="23185" PostHistoryTypeId="24" PostId="10955" RevisionGUID="bb4f6a29-6f3b-4831-91a5-00caf6658049" CreationDate="2011-04-11T15:03:37.310" Comment="Proposed by 3588 approved by 51 edit id of 258" />
  <row Id="23186" PostHistoryTypeId="5" PostId="10932" RevisionGUID="b352ff1e-9bc2-49f0-bb98-478b002f3e7d" CreationDate="2011-04-11T15:03:45.047" UserId="3588" Comment="Minor toning. Mostly capitalization and punctuation. Reshaped the closing sentence to be less redundant with the question as a whole." Text="I am in the middle of creating a browser game. I need to add 'special items' like in *Diablo*, but simpler. Item names are fixed (e.g. 'ring of power'), so only their attributes change. &#xD;&#xA;&#xD;&#xA;In my game there are different towns. Each town may trade a different set of items with randomized characteristics. For instance, in Town A a 'ring of power' will have better attributes than the same item in Town B (and, thus, it will cost more). &#xD;&#xA;&#xD;&#xA;My question is how to construct the database to handle this. &#xD;&#xA;&#xD;&#xA;After constructing the database I will create a small script that will assign a different subset of items in each town. Each item with random attributes and a price that reflects its value.&#xD;&#xA;&#xD;&#xA;I can make the script; what I need help on is creating the database." />
  <row Id="23187" PostHistoryTypeId="4" PostId="10932" RevisionGUID="b352ff1e-9bc2-49f0-bb98-478b002f3e7d" CreationDate="2011-04-11T15:03:45.047" UserId="3588" Comment="Minor toning. Mostly capitalization and punctuation. Reshaped the closing sentence to be less redundant with the question as a whole." Text="Creating a database with special items, like in Diablo" />
  <row Id="23188" PostHistoryTypeId="24" PostId="10932" RevisionGUID="b352ff1e-9bc2-49f0-bb98-478b002f3e7d" CreationDate="2011-04-11T15:03:45.047" Comment="Proposed by 3588 approved by 51 edit id of 264" />
  <row Id="23189" PostHistoryTypeId="25" PostId="10922" RevisionGUID="8de613bd-1471-48cf-8255-81a2de0ffe4d" CreationDate="2011-04-11T15:09:24.927" Comment="http://twitter.com/#!/StackGameDev/status/57460246356037632" />
  <row Id="23190" PostHistoryTypeId="2" PostId="10959" RevisionGUID="54022164-94f8-4007-b3ed-47be817fa2ee" CreationDate="2011-04-11T15:28:46.103" UserId="-1" Text="" />
  <row Id="23191" PostHistoryTypeId="2" PostId="10960" RevisionGUID="20e20e25-ce22-4e84-8d44-bd0d2ed95c20" CreationDate="2011-04-11T15:28:46.103" UserId="-1" Text="" />
  <row Id="23192" PostHistoryTypeId="2" PostId="10961" RevisionGUID="d2c92e51-4642-46d7-8ecf-4b38a49fd517" CreationDate="2011-04-11T15:40:53.827" UserId="-1" Text="" />
  <row Id="23193" PostHistoryTypeId="2" PostId="10962" RevisionGUID="c1213950-8774-4833-bd71-aa78c36e57c6" CreationDate="2011-04-11T15:40:53.827" UserId="-1" Text="" />
  <row Id="23196" PostHistoryTypeId="5" PostId="10960" RevisionGUID="036ccb18-4b16-449c-ad9b-548c83294c72" CreationDate="2011-04-11T16:11:03.430" UserId="3588" Comment="added 122 characters in body" Text="A genre of action game whose focus is on platform-based movement. It is equally present in both the 2D and 3D game worlds." />
  <row Id="23197" PostHistoryTypeId="24" PostId="10960" RevisionGUID="036ccb18-4b16-449c-ad9b-548c83294c72" CreationDate="2011-04-11T16:11:03.430" Comment="Proposed by 3588 approved by 51 edit id of 266" />
  <row Id="23198" PostHistoryTypeId="5" PostId="10959" RevisionGUID="3902c600-10d0-4fd5-be21-585a5ee63a39" CreationDate="2011-04-11T16:11:06.113" UserId="3588" Comment="added 1334 characters in body" Text="Use this tag if you're having questions or problems while developing a Platform game of your own. This tag does not refer to games about gaming platforms, such as *Hyperdimension Neptunia*.&#xD;&#xA;&#xD;&#xA;A **Platform game**, also known as a **Platformer game** or **Platformer**, is one where level traversal and platform jumping comprise something beyond the arena of the gameplay. These platforming puzzles may be present in all kinds of genres, but in the Platform game they represent a core and omnipresent challenge of the stages. The player character may be limitted to movement abilities, or may wield an impressive arsenal of different weapon types, but in all scenarios remains endangered by the surrounding environment and gravity.&#xD;&#xA;&#xD;&#xA;Platform games can be 2D or 3D. They comprise a very prominent portion of the 2D action genre, but in 3D they represent a much smaller portion due to the greater variety of possible action focus points (most commonly combat and shooting).&#xD;&#xA;&#xD;&#xA;In the early years of video games, Platform games represented one of the most popular and prevalent genres in the console market. The most symbolic and well-known games of this genre tend to be the *Super Mario Bros.* series and the *Mega Man* series. Some of the more unique platformers include games such as *Shadows of the Colossus* and *Umihara Kawase*. " />
  <row Id="23199" PostHistoryTypeId="24" PostId="10959" RevisionGUID="3902c600-10d0-4fd5-be21-585a5ee63a39" CreationDate="2011-04-11T16:11:06.113" Comment="Proposed by 3588 approved by 51 edit id of 265" />
  <row Id="23200" PostHistoryTypeId="5" PostId="10962" RevisionGUID="f2e791a8-aab0-404f-b526-b76954a812e0" CreationDate="2011-04-11T16:11:09.343" UserId="3588" Comment="added 171 characters in body" Text="A moving surface in a game that can be stood on. Can move back and forth, along a track, or in any other way that serves to kill characters just as often as it helps them." />
  <row Id="23201" PostHistoryTypeId="24" PostId="10962" RevisionGUID="f2e791a8-aab0-404f-b526-b76954a812e0" CreationDate="2011-04-11T16:11:09.343" Comment="Proposed by 3588 approved by 51 edit id of 268" />
  <row Id="23202" PostHistoryTypeId="5" PostId="10961" RevisionGUID="bfec3a06-bd81-41ba-a043-6c3d58568496" CreationDate="2011-04-11T16:11:11.260" UserId="3588" Comment="added 528 characters in body" Text="A common component of [tag:platform-games]. Jumping from platform to platform increases exponentially in difficulty when the movement of platforms is introduced.&#xD;&#xA;&#xD;&#xA;This tag specifically refers to the translation movement of a platform in the game space; platforms whose only &quot;movement&quot; consists of disappearing into the background or rotating (thus altering the standing surface itself) are a different concept. Questions deal with things such as implementation, setting up paths, and scheduling the movements of whole systems." />
  <row Id="23203" PostHistoryTypeId="24" PostId="10961" RevisionGUID="bfec3a06-bd81-41ba-a043-6c3d58568496" CreationDate="2011-04-11T16:11:11.260" Comment="Proposed by 3588 approved by 51 edit id of 267" />
  <row Id="23204" PostHistoryTypeId="2" PostId="10964" RevisionGUID="672cd05e-57f9-42b0-abd1-bcaf28d7ccdd" CreationDate="2011-04-11T16:22:32.280" UserId="5401" Text="Letting me sample the framebuffer or the depthbuffer in the pixel shader would be an extremely useful feature. Even just being able to know the depth or the color of whatever is behind the current pixel would be useful.&#xD;&#xA;&#xD;&#xA;Why does both OpenGL and DirectX not let me do this? I was expecting there to be some kind of hardware limitation, but alpha blending uses the color in the framebuffer for blending calculations, and the Z-test samples the depth buffer at the current location. Why not just expose these values to us directly? Can I hope to see this in the future?" />
  <row Id="23205" PostHistoryTypeId="1" PostId="10964" RevisionGUID="672cd05e-57f9-42b0-abd1-bcaf28d7ccdd" CreationDate="2011-04-11T16:22:32.280" UserId="5401" Text="Why do pixel shaders not let us read directly from the framebuffer or the depth buffer?" />
  <row Id="23206" PostHistoryTypeId="3" PostId="10964" RevisionGUID="672cd05e-57f9-42b0-abd1-bcaf28d7ccdd" CreationDate="2011-04-11T16:22:32.280" UserId="5401" Text="&lt;opengl&gt;&lt;3d&gt;&lt;directx&gt;&lt;shaders&gt;" />
  <row Id="23207" PostHistoryTypeId="2" PostId="10965" RevisionGUID="57bc794e-4447-45be-ba75-11f05135abeb" CreationDate="2011-04-11T16:40:14.800" UserId="1430" Text="It *is* a hardware limitation. The fragment shader is part of the programmable pipeline, but the final color blend with the target buffer(s) isn't programmable in widely-available/commodity hardware at this point (it's configurable via blend states, but you can't write arbitrary code that replaces the GPUs built-in blend operations). &#xD;&#xA;&#xD;&#xA;The reason the hardware isn't built for this probably has to do with the fact that GPU are massively parallel; they process many fragments at a time. Some of those fragments may ultimately interact with each other within the destination buffers, but due to the asynchronous nature of fragment processing it isn't possible to know how until after the fragment has been processed and final color has been emitted... which won't always happen deterministically.&#xD;&#xA;&#xD;&#xA;Just because pixel A will be behind pixel B in the final frame does not mean that pixel A will always complete fragment processing and be written to the destination before B, especially across multiple frames of rendering. So the value read from the destination buffer during pixel B's processing will not always be pixel A's -- sometimes it will be the clear values.&#xD;&#xA;&#xD;&#xA;So I suspect that disallowing direct destination buffer reads during the fragment stage has far more to do with stopping the shader programmer from shooting himself in the foot by getting potentially nondeterministic results from that read than from any actual technical limitation in making the blend stage fully-programmable. By keeping the read operations tightly controlled (the depth test, for example), the GPU ensures that the operations done with the read value make some kind of sense.&#xD;&#xA;&#xD;&#xA;That said, there may also be a cost/benefit thing going on. Making that aspect of the GPU pipeline programmable would complicate the chip design somewhat, and the need/demand for destination buffer reads has been relatively low in comparison to other features." />
  <row Id="23208" PostHistoryTypeId="2" PostId="10966" RevisionGUID="2560205e-2273-443e-ba26-91dc70acb7aa" CreationDate="2011-04-11T16:42:50.413" UserId="2798" Text="For future reference: ImgTec has both a [texture compression utility][1] and a [texture compression library][2] (which works under both Linux and Windows). They support some compressed texture formats, like DXT and PVRTC.&#xD;&#xA;&#xD;&#xA;Rolling out your own command-line tool is easy as pie using the library. I'm currently adding PVRTC support for my XNA pipeline (the processor is made with Managed-C++) and haven't found any problems yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imgtec.com/powervr/insider/powervr-pvrtextool.asp&#xD;&#xA;  [2]: http://www.imgtec.com/powervr/insider/powervr-pvrtexlib.asp" />
  <row Id="23209" PostHistoryTypeId="5" PostId="10911" RevisionGUID="e1bb973e-20e5-4780-9646-3facd37314c6" CreationDate="2011-04-11T16:48:06.147" UserId="6616" Comment="deleted 274 characters in body" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball is moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1Ef1K.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23210" PostHistoryTypeId="5" PostId="10939" RevisionGUID="ce2e8933-94e9-4f6d-8656-c5775d40dfb9" CreationDate="2011-04-11T16:49:52.867" UserId="1198" Comment="dropped greeting and signature" Text="I am making an OpenGL graphics accelerated FPS, and I need to find a library to handle GUI correctly. My current GUI handler just wont do!&#xD;&#xA;&#xD;&#xA;Yes, as in the title says, the UI of the game is Metro (ZuneHD, WP7, etc).&#xD;&#xA;&#xD;&#xA;So the UI contains little to NO images, just fonts." />
  <row Id="23211" PostHistoryTypeId="24" PostId="10939" RevisionGUID="ce2e8933-94e9-4f6d-8656-c5775d40dfb9" CreationDate="2011-04-11T16:49:52.867" Comment="Proposed by 1198 approved by 189 edit id of 269" />
  <row Id="23212" PostHistoryTypeId="25" PostId="10964" RevisionGUID="4d907c1c-4fef-4f9e-9401-f9b04ba60a22" CreationDate="2011-04-11T18:09:24.437" Comment="http://twitter.com/#!/StackGameDev/status/57505543291547648" />
  <row Id="23213" PostHistoryTypeId="5" PostId="10768" RevisionGUID="18690bdf-19a8-4352-b57a-4df5bed36781" CreationDate="2011-04-11T18:48:07.900" UserId="744" Comment="added 21 characters in body" Text="You can try to 'unbind' any texture if you want to keep GL_TEXTURE_2D enabled (which is fine).&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, 0); // Bind the default (empty) texture" />
  <row Id="23214" PostHistoryTypeId="2" PostId="10967" RevisionGUID="c17f17c4-ddc9-45ea-948a-2d4b9682739f" CreationDate="2011-04-11T18:49:13.340" UserId="6664" Text="I am looking for resources that can provide me with a better understanding of what kind of things shaders are used for in games, what they can do, and maybe even more importantly, what they cannot. I understand how the graphics pipeline works and all that, and I have made some very basic shaders in GLSL (mostly just to replace the fixed-function pipeline functionality), but I don't yet fully understand which things are only possible with custom shaders, which things can be done more efficiently, etc. I have been able to find some examples of certain techniques, most notably lighting, but I am looking for a more higher-level overview of their usage.&#xD;&#xA;&#xD;&#xA;Links to and explanations of certain interesting techniques, as opposed to an overview, are also appreciated (but less than an overview ;) ), preferrably in GLSL or pseudocode.&#xD;&#xA;" />
  <row Id="23215" PostHistoryTypeId="1" PostId="10967" RevisionGUID="c17f17c4-ddc9-45ea-948a-2d4b9682739f" CreationDate="2011-04-11T18:49:13.340" UserId="6664" Text="Overview/showcase of shader techniques/uses for games" />
  <row Id="23216" PostHistoryTypeId="3" PostId="10967" RevisionGUID="c17f17c4-ddc9-45ea-948a-2d4b9682739f" CreationDate="2011-04-11T18:49:13.340" UserId="6664" Text="&lt;graphics&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;effects&gt;" />
  <row Id="23217" PostHistoryTypeId="2" PostId="10968" RevisionGUID="8c203a4a-c459-4ecb-a684-d9da1c36036e" CreationDate="2011-04-11T19:45:32.153" UserId="6521" Text="I'm not entirely sure what you're trying to do but I'll give it my best shot =). First of all you are on the right track - to undo a transformation you must multiply the result by its inverse. So in a vertex shader you are taking an object/local space point and transforming it into homogeneous clip space for the pixel shader:&#xD;&#xA;&#xD;&#xA;    float4 outPos = mul(float4(inPos.xyz, 1), matWorldViewProj);&#xD;&#xA;&#xD;&#xA;This can also be represented as:&#xD;&#xA;&#xD;&#xA;    float4 outPos = mul(mul(mul(float4(inPos.xyz, 1), matWorld), matView), matProj);&#xD;&#xA;&#xD;&#xA;Thus to get the world space position of a point after a transformation into homogeneous clip space you must multiply the point by the inverse of the view and projection matrices:&#xD;&#xA;&#xD;&#xA;    float4 worldPos = mul(outPos, matInvViewProj);&#xD;&#xA;&#xD;&#xA;Which can also be represented as:&#xD;&#xA;&#xD;&#xA;    float4 worldPos = mul(mul(outPos, matInvProj), matInvView);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So if you already have a vertex that's in view/eye (camera?) space, which means the origin of the coordinate system for that point is the current location of the view/eye:&#xD;&#xA;&#xD;&#xA;    float4 outPos = mul(float4(inPos.xyz, 1), matWorldView);&#xD;&#xA;&#xD;&#xA;To get back the world position of that point you multiply it by the inverse of the view matrix:&#xD;&#xA;&#xD;&#xA;    float4 worldPos = mul(outPos, matInvView);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23218" PostHistoryTypeId="5" PostId="10869" RevisionGUID="cc6bdf90-a822-4226-9168-45022b608ab2" CreationDate="2011-04-11T19:58:26.510" UserId="5021" Comment="added 120 characters in body" Text="The XBOX is very picky about which WMVs it will play. The fix is to encode a WMV with Windows Movie Maker -- encoding in After Effects creates WMVs that the XBOX 360 will not play.&#xD;&#xA;&#xD;&#xA;Edit: I believe the problem more specifically, is that the bitrate must be 12000kbps or less, for XBOX 360 playback." />
  <row Id="23219" PostHistoryTypeId="2" PostId="10969" RevisionGUID="ca9b85bc-23a1-48db-a6c1-eae02c323cb1" CreationDate="2011-04-11T20:06:55.417" UserId="6666" Text="Although I would love to get a job in the gaming industry I can't help but feel I should have a backup plan.  What I wanted to ask is game/level design a marketable skill that translates to other industries?&#xD;&#xA;&#xD;&#xA;For example if your a programming in game development, you can be a software engineer in business, health care, finance, scientific etc, industries&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If your an artist in game development, you can be an graphic artist, web designer, animator, advertisement, etc.&#xD;&#xA;&#xD;&#xA;Do game/level designers have other industries they can get into other than gaming?  If you think so, what are some industries that level design (or game design) would be marketable for?&#xD;&#xA;" />
  <row Id="23220" PostHistoryTypeId="1" PostId="10969" RevisionGUID="ca9b85bc-23a1-48db-a6c1-eae02c323cb1" CreationDate="2011-04-11T20:06:55.417" UserId="6666" Text="Game/Level Design Career translations in other fields" />
  <row Id="23221" PostHistoryTypeId="3" PostId="10969" RevisionGUID="ca9b85bc-23a1-48db-a6c1-eae02c323cb1" CreationDate="2011-04-11T20:06:55.417" UserId="6666" Text="&lt;game-design&gt;&lt;level-design&gt;&lt;jobs&gt;" />
  <row Id="23222" PostHistoryTypeId="2" PostId="10970" RevisionGUID="1495f849-8afb-4a27-9fcb-255ba17e6230" CreationDate="2011-04-11T20:16:24.480" UserId="6647" Text="I am in a very similiar situation regarding occupation. In my opinion, I believe Architecture (Which in itself is a very broad subject containing many practical fields.) is a really nice choice for you. That is if you want to apply yourself to real world principles. Architecture is used in housing, landscaping, large scale city projects, etc. Now, mabye you think &quot;Oh, but architecture is more hands on and physical and less digital.&quot; Not true, Architecture nowadays uses CAD programs for modeling ideas and projects. Not to mention you also make 2D drafts." />
  <row Id="23226" PostHistoryTypeId="2" PostId="10972" RevisionGUID="699e9a03-1956-47bd-bbfd-45f2392a1190" CreationDate="2011-04-11T20:24:23.413" UserId="4947" Text="You can find something [here][1] and also [here][2]. And if you want, you can find a lot of information in GPU Gems 1, 2, 3.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.geeks3d.com/category/geeks3d/shader-library-geeks3d/&#xD;&#xA;  [2]: http://www.ozone3d.net/tutorials/" />
  <row Id="23227" PostHistoryTypeId="5" PostId="10972" RevisionGUID="a5b7e46d-e46d-40cb-9a45-55e0c092f5fc" CreationDate="2011-04-11T20:31:50.193" UserId="4947" Comment="added 105 characters in body; added 18 characters in body" Text="You can find something [here][1] and also [here][2]. And if you want, you can find a lot of information in GPU Gems 1, 2, 3 and Shaders for Game Programming and Artists (I think, it's not about GLSL, but about HSL and shaders and games generally).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.geeks3d.com/category/geeks3d/shader-library-geeks3d/&#xD;&#xA;  [2]: http://www.ozone3d.net/tutorials/" />
  <row Id="23230" PostHistoryTypeId="6" PostId="10699" RevisionGUID="e37b3b0e-e8ea-4ecb-81d8-82a6fa7d350b" CreationDate="2011-04-11T20:47:08.390" UserId="1198" Comment="added extra tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;xbox360&gt;&lt;xna-4.0&gt;&lt;xna-video-playback&gt;" />
  <row Id="23231" PostHistoryTypeId="24" PostId="10699" RevisionGUID="e37b3b0e-e8ea-4ecb-81d8-82a6fa7d350b" CreationDate="2011-04-11T20:47:08.390" Comment="Proposed by 1198 approved by 51 edit id of 270" />
  <row Id="23232" PostHistoryTypeId="2" PostId="10973" RevisionGUID="c76110a4-7133-40d6-9f28-6ed9ea9417c0" CreationDate="2011-04-11T20:59:18.357" UserId="4410" Text="While annoying, it allows hardware manufacturers the flexibility to optimise the rendering process in numerous and transparent ways.&#xD;&#xA;&#xD;&#xA;For example, the PowerVR hardware (certainly used to back in the day, not used one for a long time) wait until the entire scene to be rendered was submitted, then perform automatic depth sorting using the painters algorithm and not actually need to generate a depth buffer. It would divide the screen up into tiles and render each one in turn." />
  <row Id="23233" PostHistoryTypeId="25" PostId="10967" RevisionGUID="7e9b2497-a98f-435d-9e89-fe865ada562b" CreationDate="2011-04-11T21:09:24.760" Comment="http://twitter.com/#!/StackGameDev/status/57550843641200640" />
  <row Id="23234" PostHistoryTypeId="2" PostId="10974" RevisionGUID="fa7ee656-c4b4-4db1-bb04-b0dc40df50df" CreationDate="2011-04-11T21:12:07.867" UserId="6214" Text="Without using any external libraries, does Java, including all officially supported APIs give you enough to develop fully-featured 2D games? The reason I ask is that I hear a lot of &quot;bad-mouthing&quot; about Java and game development, but I'm wondering if that is only in regard to intensive 3D games. Also reading up on some Java games there often appears to be external graphics or sound libraries involved that simply have a Java port. This makes me think it isn't possible." />
  <row Id="23235" PostHistoryTypeId="1" PostId="10974" RevisionGUID="fa7ee656-c4b4-4db1-bb04-b0dc40df50df" CreationDate="2011-04-11T21:12:07.867" UserId="6214" Text="What is Java missing that might make it difficult to develop fully-featured 2D games?" />
  <row Id="23236" PostHistoryTypeId="3" PostId="10974" RevisionGUID="fa7ee656-c4b4-4db1-bb04-b0dc40df50df" CreationDate="2011-04-11T21:12:07.867" UserId="6214" Text="&lt;game-design&gt;&lt;java&gt;" />
  <row Id="23237" PostHistoryTypeId="5" PostId="10909" RevisionGUID="61af02fa-cd4f-4a30-b761-c88f39ef4ab3" CreationDate="2011-04-11T21:21:29.347" UserId="1198" Comment="dropped greeting fixed caps" Text="Should I be pessimistic about the iOS game development under VM? A virtualized environment will run on AMD (4-core 2.8 ghz Phenom II)/ATI/Linux/VMware host.&#xD;&#xA;&#xD;&#xA;Not talking about any 3D engines, may Xcode's emulator bring at least 15-20 FPS for a simple 2D game like, errr, `Airport Mania`?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23238" PostHistoryTypeId="24" PostId="10909" RevisionGUID="61af02fa-cd4f-4a30-b761-c88f39ef4ab3" CreationDate="2011-04-11T21:21:29.347" Comment="Proposed by 1198 approved by 51 edit id of 271" />
  <row Id="23239" PostHistoryTypeId="6" PostId="10974" RevisionGUID="db9667e3-7c88-4e4d-8623-2667fc73faec" CreationDate="2011-04-11T21:22:16.177" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;" />
  <row Id="23240" PostHistoryTypeId="2" PostId="10975" RevisionGUID="656a4238-1bc1-4b52-af18-8a537699fb8f" CreationDate="2011-04-11T21:24:05.817" UserId="6622" Text="Of course you can. &#xD;&#xA;But some boring stuff you have to do at your own.  &#xD;&#xA;&#xD;&#xA;I read a book, 'killer game programming in java', and there was no external library, just java2D.  I also developed an arcade game with it... &#xD;&#xA;&#xD;&#xA;Java can be an engine imo, but you should really prefer another engine, which is built on top of this stuff and opengl.  &#xD;&#xA;&#xD;&#xA;I am currently using libGDX for my android game and I am happy so far. With it you can develop simultaneously for android and PC ;) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23241" PostHistoryTypeId="2" PostId="10976" RevisionGUID="1a680301-7fa4-4ac1-8225-f9c2df321c6e" CreationDate="2011-04-11T21:24:07.923" UserId="51" Text="In theory, nothing.&#xD;&#xA;&#xD;&#xA;In practice, mainly the fact that not a lot of people have done it already.  If you're looking for code samples or documentation you'll more likely find code written in C or C++ instead of Java.&#xD;&#xA;&#xD;&#xA;See also http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java" />
  <row Id="23246" PostHistoryTypeId="2" PostId="10977" RevisionGUID="46e1279a-8f0a-450f-a54a-3390d129cdb5" CreationDate="2011-04-11T21:57:58.397" UserId="3505" Text="For modern high quality 2D graphics you'd almost always be using 3D rendering, meaning you'd have to get a 3rd part 3D library for most languages anyway.&#xD;&#xA;&#xD;&#xA;I think mostly for game development Java just doesn't do a lot that C++ or C# doesn't do, and it might be a little slower than C#.&#xD;&#xA;&#xD;&#xA;A lot of people seem to have very strong opinions on what is good for what and what isn't, it's often a sign that they simply don't know what they are talking about." />
  <row Id="23247" PostHistoryTypeId="5" PostId="10891" RevisionGUID="cbdebd6a-97d3-44a6-8e74-bb2c9f6ad8b4" CreationDate="2011-04-11T21:59:16.367" UserId="5672" Comment="added 1 characters in body" Text="I thought this [article on prototyping games in under 7 days][1] had some interesting ideas. The suggested focusing on a single theme and exploring it: &#xD;&#xA;&#xD;&#xA;&gt; “gravity”, “springs”, “evolution”, “sound”, “predator and prey”, “addictive games”, “drawing”, “exponential growth”, “vegetation”, “balance”.&#xD;&#xA;&#xD;&#xA;I also appreciated the suggestion to focus on getting it working quickly so you can get a feel for the mechanics and if it's not right, fail quickly and move on to the next idea.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/2438/how_to_prototype_a_game_in_under_7_.php" />
  <row Id="23248" PostHistoryTypeId="2" PostId="10978" RevisionGUID="8a40917f-d54f-45fb-90a9-afb15c2a5d43" CreationDate="2011-04-11T22:04:38.187" UserId="6558" Text="There's nothing missing from Java that is required to make a fully featured 2d game.  There are definitely games written in Java that don't use external libraries, or, use them sparingly.  Most of the complaints people tend to make about Java are either the slowness of games vs C or C++ (valid, but computer speed is fast enough to make the point moot), or personal frustrations with Java (almost everyone has a language they like to hate...).  Java also has a reputation for being a 'business' programming language.&#xD;&#xA;&#xD;&#xA;The only issues that might come up from using Java is hardware acceleration.  If Java's native graphics rendering is not hardware accelerated, then you'd be risking performance problems.  External libraries can often solve this problem." />
  <row Id="23249" PostHistoryTypeId="5" PostId="10975" RevisionGUID="69586164-4512-4f47-a9cd-ec7e4393acac" CreationDate="2011-04-11T23:17:54.450" UserId="1198" Comment="caps spacing" Text="Of course you can. But some boring stuff you have to do at your own.  &#xD;&#xA;&#xD;&#xA;I read a book, 'killer game programming in java', and there was no external library, just Java2D. I also developed an arcade game with it... &#xD;&#xA;&#xD;&#xA;Java can be an engine IMO, but you should really prefer another engine, which is built on top of this stuff and OpenGL.  &#xD;&#xA;&#xD;&#xA;I am currently using libGDX for my android game and I am happy so far. With it you can develop simultaneously for android and PC ;) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23250" PostHistoryTypeId="24" PostId="10975" RevisionGUID="69586164-4512-4f47-a9cd-ec7e4393acac" CreationDate="2011-04-11T23:17:54.450" Comment="Proposed by 1198 approved by 51 edit id of 272" />
  <row Id="23251" PostHistoryTypeId="25" PostId="10974" RevisionGUID="f82f8db8-ba40-4cf0-8409-f77f7385d3d9" CreationDate="2011-04-12T00:09:24.450" Comment="http://twitter.com/#!/StackGameDev/status/57596139712688128" />
  <row Id="23252" PostHistoryTypeId="2" PostId="10979" RevisionGUID="f11adcb5-771e-4795-8058-4d5308b550e4" CreationDate="2011-04-12T00:30:34.863" UserId="6042" Text="In 2011 any language with bindings to OpenGL is more than capable of a &quot;2D game&quot; in the style of Nintendo from the 1990s or so, when running on a desktop PC made in this millennium.&#xD;&#xA;&#xD;&#xA;For TV game consoles, the only language available for development across all platforms is C++, so that's what people use for the most complex 3D games and the simplest 2D games. Java would work for simpler games, but C++ is the compromise we live with to avoid the cost of supporting more than one language.&#xD;&#xA;&#xD;&#xA;For handheld devices (and to a lesser extent TV game consoles) performance is critical often enough that the overhead imposed by Java et al. can't be tolerated for games with medium or high complexity.&#xD;&#xA;&#xD;&#xA;Android phones do run games in Java, but there is a clear trend recently toward &quot;native&quot; C++ games on Android, not primarily for performance, but because ironically Java isn't as &quot;platform-independent&quot; as C++. All non-Android platforms use some kind of C/OpenGL, and porting a game among them is fairly cheap. Porting from any of them to Android/Java is relatively expensive." />
  <row Id="23253" PostHistoryTypeId="2" PostId="10980" RevisionGUID="832d83e8-8d71-4e51-b85a-9f9ec0897b7a" CreationDate="2011-04-12T00:38:41.037" UserId="6042" Text="The pixel shader can't read from the color and depth buffers because:&#xD;&#xA;&#xD;&#xA;Pixels A and B may be shaded at exactly the same moment in hardware, though B ultimately renders on top of (&quot;after&quot;) pixel A. &#xD;&#xA;&#xD;&#xA;If you made it so the hardware is guaranteed to shade A before B, then parts of the hardware would sit around doing nothing while A is shaded, and then parts of the hardware would sit around doing nothing while B is shaded.&#xD;&#xA;&#xD;&#xA;In the worst case imaginable, roughly half of the GPU is wasted.&#xD;&#xA;" />
  <row Id="23254" PostHistoryTypeId="2" PostId="10981" RevisionGUID="5a704f99-72b3-476b-b456-f616a4dab4f5" CreationDate="2011-04-12T01:54:29.780" UserId="6670" Text="I have a button for my game which has a movieclip in it. The movieclip in it consists of an image of a lock and an image of an item, representing the item being locked and unlocked. I make the button become slightly smaller when the mouse is over it to create the effect of a button slightly down. For some reason, however, this makes the movieclip in the button go to the next frame. I have no code in the ActionScript of the button or frame it's in currently applied to that movieclip, and in the first frame of the movieclip itself I have `stop()`, so I really don't understand why this would happen. It only goes to the next frame when I hover my mouse over the button and then quickly goes back to the first frame (since there's no `stop()` in the second frame). After experimenting with `stop()` in both frames of the movieclip, it does indeed only happen when my mouse enters the button. Leaving the button doesn't do anything and the button left alone doesn't do anything. It just changes the frame when I hover my cursor over it. There's absolutely no script involved aside from `stop()` in the first frame of the movieclip in the button. What could be the cause of this problem?" />
  <row Id="23255" PostHistoryTypeId="1" PostId="10981" RevisionGUID="5a704f99-72b3-476b-b456-f616a4dab4f5" CreationDate="2011-04-12T01:54:29.780" UserId="6670" Text="MC in button changes on hover" />
  <row Id="23256" PostHistoryTypeId="3" PostId="10981" RevisionGUID="5a704f99-72b3-476b-b456-f616a4dab4f5" CreationDate="2011-04-12T01:54:29.780" UserId="6670" Text="&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="23257" PostHistoryTypeId="5" PostId="10980" RevisionGUID="16215a5d-f1e9-44a1-9ecd-20cfff113c9a" CreationDate="2011-04-12T02:07:42.883" UserId="6042" Comment="added 158 characters in body" Text="The pixel shader can't read from the color and depth buffers because:&#xD;&#xA;&#xD;&#xA;Pixels A and B may be shaded at exactly the same moment in hardware, though B ultimately renders on top of (&quot;after&quot;) pixel A. &#xD;&#xA;&#xD;&#xA;If you made it so the hardware is guaranteed to shade A before B, then parts of the hardware would sit around doing nothing while A is shaded, and then parts of the hardware would sit around doing nothing while B is shaded.&#xD;&#xA;&#xD;&#xA;In the worst case imaginable, all the pixels you shade render on top of each other, and the thousands upon thousands of GPU threads - all except one - sit idle. This one thread patiently shades pixel A, then B, then C...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23258" PostHistoryTypeId="25" PostId="10969" RevisionGUID="30de1e4f-a8a7-44da-9877-e38d6cbbf247" CreationDate="2011-04-12T03:09:24.427" Comment="http://twitter.com/#!/StackGameDev/status/57641438753722368" />
  <row Id="23259" PostHistoryTypeId="25" PostId="10981" RevisionGUID="95a37af8-2c0e-4cf3-80c6-2bc01d90f9f0" CreationDate="2011-04-12T06:09:25.233" Comment="http://twitter.com/#!/StackGameDev/status/57686738927235072" />
  <row Id="23263" PostHistoryTypeId="2" PostId="10983" RevisionGUID="b041cdbc-4923-480f-8c1c-7d01be8c1293" CreationDate="2011-04-12T07:16:48.387" UserId="3132" Text="Items is the most high loaded part of game database. So you should create the most effective design handle it. In your case it will be table like this&#xD;&#xA;&#xD;&#xA;       create table item (&#xD;&#xA;        id long primary key&#xD;&#xA;        item_name string&#xD;&#xA;        ....&#xD;&#xA;        item_state_type int&#xD;&#xA;        item_state_data varbinary &#xD;&#xA;    )&#xD;&#xA;    id - it is the key for unique item entity.&#xD;&#xA;    item_name - &quot;ring of power&quot;&#xD;&#xA;    item_state_type - type of your item. Ordinary or random generated.&#xD;&#xA;    item_state_data - serialized custom data. In your case it is an array of custom attributes. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The pair of tables item and item_attributes with keys-and-values isn't a good idea. Operation with one row (in my design) will be converted in operation with ~10 rows in different tables (in key-value design)&#xD;&#xA;" />
  <row Id="23264" PostHistoryTypeId="2" PostId="10984" RevisionGUID="c191e656-40dd-465c-bc4c-d7cd1c4de055" CreationDate="2011-04-12T07:18:22.083" UserId="6654" Text="What is the simplest method to generate smooth terrain for a 2d game like &quot;Moon Buggy&quot; or &quot;Route 960&quot; ?&#xD;&#xA;&#xD;&#xA;I got an answer at stackoverflow.com about generate an array of random heights and blur them later. Yes, it's quite ok. But it would be better to give some points, and get a smooth curve.&#xD;&#xA;&#xD;&#xA;Any ideas ?&#xD;&#xA;" />
  <row Id="23265" PostHistoryTypeId="1" PostId="10984" RevisionGUID="c191e656-40dd-465c-bc4c-d7cd1c4de055" CreationDate="2011-04-12T07:18:22.083" UserId="6654" Text="smooth 2D terrain generation" />
  <row Id="23266" PostHistoryTypeId="3" PostId="10984" RevisionGUID="c191e656-40dd-465c-bc4c-d7cd1c4de055" CreationDate="2011-04-12T07:18:22.083" UserId="6654" Text="&lt;algorithm&gt;&lt;terrain&gt;" />
  <row Id="23267" PostHistoryTypeId="2" PostId="10985" RevisionGUID="7026e6d7-1dd3-42d6-9bbb-073dc017a449" CreationDate="2011-04-12T07:31:01.510" UserId="4894" Text="My idea would be to create a smoothed noise function. First with a method intNoise(int) which return a &quot;random&quot; int, but wich depends on the input. If you use the same input twice, the result will be the same. &#xD;&#xA;&#xD;&#xA;Then use a smoothing method to make a floatNoise(float) which uses the two integers around the input to build a random value.&#xD;&#xA;&#xD;&#xA;Then use the X position as the input and the Y as the output. The result will be a smoothed curve but with random height. " />
  <row Id="23268" PostHistoryTypeId="2" PostId="10986" RevisionGUID="0fa458e4-1d41-4a77-9b15-27c9c95a49f0" CreationDate="2011-04-12T07:36:30.677" UserId="6675" Text="One way you could achieve this the following:&#xD;&#xA;&#xD;&#xA; - Create a point in the middle of the screen, with a random height; you now have two sections, one on each side of this point&#xD;&#xA; - For every section, divide into two placing a point in the middle of this section, with random height between its two neighbours&#xD;&#xA; - Repeat n times.&#xD;&#xA;&#xD;&#xA;What happens is detail in the scenery gets finer with each iteration. &#xD;&#xA;&#xD;&#xA;How you handle boundary cases is up to you: you could assume points at (0,height/2) and (width,height/2) for instance.&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="23269" PostHistoryTypeId="5" PostId="10983" RevisionGUID="467e29f7-5fb8-4e57-b489-2d462b1079d4" CreationDate="2011-04-12T08:06:22.850" UserId="3132" Comment="added 7 characters in body" Text="Items is the most high loaded part of game database. So you should create the most effective design to handle it. In your case it will be table like this one&#xD;&#xA;&#xD;&#xA;       create table item (&#xD;&#xA;        id long primary key&#xD;&#xA;        item_name string&#xD;&#xA;        ....&#xD;&#xA;        item_state_type int&#xD;&#xA;        item_state_data varbinary &#xD;&#xA;    )&#xD;&#xA;    id - it is the key for unique item entity.&#xD;&#xA;    item_name - &quot;ring of power&quot;&#xD;&#xA;    item_state_type - type of your item. Ordinary or random generated.&#xD;&#xA;    item_state_data - serialized custom data. In your case it is an array of custom attributes. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The pair of tables item and item_attributes with keys-and-values isn't a good idea. Operation with one row (in my design) will be converted in operation with ~10 rows in different tables (in key-value design)&#xD;&#xA;" />
  <row Id="23270" PostHistoryTypeId="2" PostId="10987" RevisionGUID="d563f09f-9c2c-476a-be63-927795a5d8d9" CreationDate="2011-04-12T08:11:58.780" UserId="4200" Text="Try putting gotoAndStop(1) in the second frame of the movie clip" />
  <row Id="23271" PostHistoryTypeId="25" PostId="10984" RevisionGUID="93c40499-ee7d-40c1-81f4-9406e115a562" CreationDate="2011-04-12T09:09:25.403" Comment="http://twitter.com/#!/StackGameDev/status/57732039293665280" />
  <row Id="23272" PostHistoryTypeId="2" PostId="10988" RevisionGUID="eac89d74-86f8-4701-b547-2a8ad0f29afe" CreationDate="2011-04-12T09:36:27.167" UserId="20" Text="I wonder why you put a MovieClip with two frames inside a Button? From my experience the Flash Button is really broken and scripts won't work inside the button. So if you have a &quot;locked&quot; (*frame 1*) and &quot;unlocked&quot; (*frame 2*) image in your MovieClip, you won't be able to access the &quot;unlocked&quot; image, because using a script to get to frame 2 won't work properly in the first place.&#xD;&#xA;&#xD;&#xA;Better create two separate Button instances, or script the MovieClip so that it works as a button directly (eg. scale it on mouse-over/mouse-out and use `buttonMode` and `useHandCursor` properties to control mouse-pointer behavior)." />
  <row Id="23273" PostHistoryTypeId="5" PostId="10934" RevisionGUID="df2562e9-b3ed-4c9b-b3f4-06f02693235c" CreationDate="2011-04-12T09:42:09.973" UserId="6622" Comment="added 554 characters in body" Text="You can think about items as a pair of names with description and attributes (including the price)   &#xD;&#xA;You can do a table 'items':&#xD;&#xA;ID, descid, attrid &#xD;&#xA;&#xD;&#xA;You can make the two others like this:  &#xD;&#xA;'item_descriptions':&#xD;&#xA;ID, name, desc  &#xD;&#xA;'item_attributes':&#xD;&#xA;&#xD;&#xA;ID, strength, intellect, agility, price &#xD;&#xA;&#xD;&#xA;This would split up the description part and the, let's say, value part of the item. &#xD;&#xA;&#xD;&#xA;Edit:  &#xD;&#xA;I would, as said in a comment, now recommend the following structure:  &#xD;&#xA;&#xD;&#xA;'items': ID, descid, strength, intellect, agility, price  &#xD;&#xA;'item_descriptions': ID, name, desc &#xD;&#xA;&#xD;&#xA;The item is in a table with the attributes, because every attribute set should be unique. &#xD;&#xA;&#xD;&#xA;The description is in another table, because you wanted to have the same description for different attributes. &#xD;&#xA;&#xD;&#xA;And one thing in addition:  &#xD;&#xA;I strongly recommend to use memcached! &#xD;&#xA;With it you don't have to query the database all the time. Memory is much faster. &#xD;&#xA;" />
  <row Id="23274" PostHistoryTypeId="5" PostId="10983" RevisionGUID="f23d068a-e7f3-464a-acab-81e6376337a9" CreationDate="2011-04-12T10:00:10.337" UserId="3132" Comment="added 560 characters in body; added 1 characters in body" Text="Items is the most high loaded part of game database. So you should create the most effective design to handle it. In your case it will be table like this one&#xD;&#xA;&#xD;&#xA;       create table item (&#xD;&#xA;        id long primary key&#xD;&#xA;        item_name string&#xD;&#xA;        ....&#xD;&#xA;        item_state_type int&#xD;&#xA;        item_state_data varbinary &#xD;&#xA;    )&#xD;&#xA;    id - it is the key for unique item entity.&#xD;&#xA;    item_name - &quot;ring of power&quot;&#xD;&#xA;    item_state_type - type of your item. Ordinary or random generated.&#xD;&#xA;    item_state_data - serialized custom data. In your case it is an array of custom attributes. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The pair of tables item and item_attributes with keys-and-values isn't a good idea. Operation with one row (in my design) will be converted in operation with ~10 rows in different tables (in key-value design)&#xD;&#xA;&#xD;&#xA;For example&#xD;&#xA;&#xD;&#xA;    id, item_name,      item_state_type, item_state_data, owner_town, owner_id&#xD;&#xA;    1, &quot;ring of power&quot; , 0, null,    1,    null - vendor ordinary item&#xD;&#xA;    2, &quot;ring of power&quot; , 1, binary1, 1,    null - vendor customized item&#xD;&#xA;    3, &quot;ring of power&quot; , 1, binary2, 2,    null - vendor customized item in another town&#xD;&#xA;    4, &quot;ring of power&quot; , 1, binary1, null, 10 - user1 item&#xD;&#xA;    4, &quot;ring of power&quot; , 1, binary2, null, 10 - user2 item&#xD;&#xA;&#xD;&#xA;Actually I prefer to store item templates in XML files, but this approach is OK too for simple data model." />
  <row Id="23275" PostHistoryTypeId="2" PostId="10989" RevisionGUID="bb3879be-8d14-4a71-882c-28597f302790" CreationDate="2011-04-12T10:25:38.907" UserId="6601" Text="I am trying to make this:&#xD;&#xA;The chracter walks up to a large crate, the player presses the &quot;e&quot; key and an animation starts playin where the character climbs up on to the crate. (all in first person view).&#xD;&#xA;&#xD;&#xA;So far i tried this with normal &quot;First Person Controller&quot; Prefab in Unity.&#xD;&#xA;&#xD;&#xA;My code so far:&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;function OnTriggerStay(other : Collider){&#xD;&#xA;	if(other.tag == &quot;GrabZone&quot;){&#xD;&#xA;		if(Input.GetKeyDown(&quot;e&quot;)){&#xD;&#xA;			animation.Play(&quot;JumpToLedge&quot;);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&lt;/pre&gt;&lt;code&gt;&#xD;&#xA;However when i use this on The FPC it will always play from the position the animation is created on.&#xD;&#xA;&#xD;&#xA;I also tried to create an empty game object, placing the FPC in there. Gives same effect.&#xD;&#xA;&#xD;&#xA;And as latst i tried just animating the graphics of the FPC alone. This seems to work but since the Character Controller itself is not animated that stays onthe ground. So the whole FPC wont work anymore.&#xD;&#xA;&#xD;&#xA;Is there anyway i could let this animation play on the local position the player is on at that time?&#xD;&#xA;Or can you think of any other logical solution for a grab and climb?&#xD;&#xA;&#xD;&#xA;Thank you for your time and hope you can help." />
  <row Id="23276" PostHistoryTypeId="1" PostId="10989" RevisionGUID="bb3879be-8d14-4a71-882c-28597f302790" CreationDate="2011-04-12T10:25:38.907" UserId="6601" Text="Animation on Local position." />
  <row Id="23277" PostHistoryTypeId="3" PostId="10989" RevisionGUID="bb3879be-8d14-4a71-882c-28597f302790" CreationDate="2011-04-12T10:25:38.907" UserId="6601" Text="&lt;animation&gt;&lt;unity&gt;&lt;javascript&gt;" />
  <row Id="23279" PostHistoryTypeId="2" PostId="10990" RevisionGUID="7a69182a-ebfb-4783-a836-53c3e31eaa10" CreationDate="2011-04-12T10:33:07.950" UserId="6568" Text="Has anyone here played &quot;Mobsters&quot; on facebook? I want to make a game with a similar structure. How can I do this?&#xD;&#xA;&#xD;&#xA;Mobsters is a flash game that works with facebook or myspace. It's flash based, and most of it deals with completing jobs and getting money and land, as well as friends and reputation. The setup looks, from what I can see, to be a collection of flash devices seperated in tables. For instance, I complete a job called &quot;Mug a person&quot; a number of times until I reach a new level. I can also use the resulting money to buy land that will generate money for me by the hour. I can upgrade the land to bigger and more extravagant buildings that will earn even more per hour. I can also get into fights." />
  <row Id="23280" PostHistoryTypeId="1" PostId="10990" RevisionGUID="7a69182a-ebfb-4783-a836-53c3e31eaa10" CreationDate="2011-04-12T10:33:07.950" UserId="6568" Text="Mobsters Flash Game" />
  <row Id="23281" PostHistoryTypeId="3" PostId="10990" RevisionGUID="7a69182a-ebfb-4783-a836-53c3e31eaa10" CreationDate="2011-04-12T10:33:07.950" UserId="6568" Text="&lt;game-design&gt;&lt;facebook&gt;" />
  <row Id="23282" PostHistoryTypeId="2" PostId="10991" RevisionGUID="0fa7fc56-6adb-4166-aa9a-fa227df9a044" CreationDate="2011-04-12T10:36:43.860" UserId="6341" Text="I cannot really figure out what causes one surface to overlap another. In a 3D engine I'm creating, my technique is failing in edge cases.&#xD;&#xA;&#xD;&#xA;My method is sorting the surfaces to be painted from the furthest to the closest. To determine the closeness, I'm comparing the average z values. Sometimes, however, an overlapping surface has a **higher** average z value than the one it is overlapping. Thus, the surface further away is painted over the closer one - resulting in bizarre rendering like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;What one is meant to see is the purple front surface of the cube only, whilst the red side surface is painted over the purple one. The average z value of the purple surface is higher, and therefore 'further away'. So I'm having naggling doubt as to whether this technique is correct.&#xD;&#xA;&#xD;&#xA;What I also tried is getting the distance from the camera (i.e. origin) to the surface, but then I needed a point. I chose the middle of each surface but also this doesn't always seem to work because not all surfaces are as large as each other.&#xD;&#xA;&#xD;&#xA;Therefore, what is a reliable way to determine the order of closeness of surfaces towards the origin?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AcOPu.png" />
  <row Id="23283" PostHistoryTypeId="1" PostId="10991" RevisionGUID="0fa7fc56-6adb-4166-aa9a-fa227df9a044" CreationDate="2011-04-12T10:36:43.860" UserId="6341" Text="What exactly does a surface make it overlap another?" />
  <row Id="23284" PostHistoryTypeId="3" PostId="10991" RevisionGUID="0fa7fc56-6adb-4166-aa9a-fa227df9a044" CreationDate="2011-04-12T10:36:43.860" UserId="6341" Text="&lt;3d&gt;&lt;math&gt;&lt;rendering&gt;&lt;3d-engines&gt;&lt;vector&gt;" />
  <row Id="23285" PostHistoryTypeId="2" PostId="10992" RevisionGUID="5eac616b-e068-4201-8f90-f142f1ad7025" CreationDate="2011-04-12T10:58:06.090" UserId="769" Text="What you have is a [visibility problem][1]. One solution is using a [z-buffer][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Visibility_problem&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Z-buffering" />
  <row Id="23286" PostHistoryTypeId="2" PostId="10993" RevisionGUID="fa287aed-8288-499d-8fe9-e41e4b6c9044" CreationDate="2011-04-12T11:13:20.803" UserId="4410" Text="You seem to be trying to implement the [Painters Algorithm][1]. I'm guessing you're trying to write a rasteriser from scratch as a learning exercise, as most modern 3D hardware uses what Bart has mentioned (the Z/Depth buffer). For the painters algorithm to work in all cases, you'd need to be prepared to subdivide the surfaces as they're rendered to solve possible scenarios (such as the overlapping polygon problem shown on the Wikipedia page).&#xD;&#xA;&#xD;&#xA;By rendering from furthest to closest you're also spending time rendering pixels which will possibly later be occluded by other polygons, which when you start putting textures and complex shaders on the polygons wastes precious cycles. This is the reason modern hardware would prefer you to render from front to back, using the depth buffer to determine if the pixel to be rendered is further away than the one on the screen (and can therefore be discarded).&#xD;&#xA;&#xD;&#xA;Even with most modern acceleration hardware you'll still need to sort and render from back to front any semi-transparent polygons, rendering this only once all the opaque polygons have been rendered.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Painter%27s_algorithm" />
  <row Id="23287" PostHistoryTypeId="2" PostId="10994" RevisionGUID="b390fc2d-f052-4100-ba50-1a99aebd2f7f" CreationDate="2011-04-12T11:41:22.117" UserId="6210" Text="There is the ever-growing field of serious gaming to consider, if you get a formal game design training.&#xD;&#xA;&#xD;&#xA;It has many variants now :&#xD;&#xA;&#xD;&#xA; - edutainment: learning games for kids (an old and very profitable business), getting a lot of attention with iPad/tablets right now.&#xD;&#xA; - corporate training: currently not very big, but there are growing possibilities there. Might be more popular than 'survival'-type 'seminars'.&#xD;&#xA; - institutional training: military forces in several countries now use serious gaming as a way to train their officers." />
  <row Id="23288" PostHistoryTypeId="2" PostId="10995" RevisionGUID="9a9ef05c-a05c-414b-b310-fc107d4069cc" CreationDate="2011-04-12T11:48:06.873" UserId="4129" Text="My game world is 3D.&#xD;&#xA;&#xD;&#xA;The map is only 2D, however.&#xD;&#xA;&#xD;&#xA;It is natural to think of the map as having an X and Y axis.&#xD;&#xA;&#xD;&#xA;And it is natural to think of the world has having an X, Y and Z axis, where Y is upwards.&#xD;&#xA;&#xD;&#xA;That is to say, X Y in 2D map coordinates is X Z in 3D coordinates.&#xD;&#xA;&#xD;&#xA;What conventions and approaches do you have to keeping things straight at a code level to make mapping between them natural?&#xD;&#xA;&#xD;&#xA;(Is Y usually upwards in 3D?  Or do you have X and Z in map coordinates, or?)" />
  <row Id="23289" PostHistoryTypeId="1" PostId="10995" RevisionGUID="9a9ef05c-a05c-414b-b310-fc107d4069cc" CreationDate="2011-04-12T11:48:06.873" UserId="4129" Text="2D and 3D coordinates and swapping axis" />
  <row Id="23290" PostHistoryTypeId="3" PostId="10995" RevisionGUID="9a9ef05c-a05c-414b-b310-fc107d4069cc" CreationDate="2011-04-12T11:48:06.873" UserId="4129" Text="&lt;design-patterns&gt;&lt;language-agnostic&gt;" />
  <row Id="23291" PostHistoryTypeId="5" PostId="10986" RevisionGUID="acf27d85-a722-4b4f-84ca-8473d6515b41" CreationDate="2011-04-12T11:48:24.750" UserId="6675" Comment="Added picture; added 143 characters in body" Text="One way you could achieve this the following:&#xD;&#xA;&#xD;&#xA; - Create a point in the middle of the screen, with a random height; you now have two sections, one on each side of this point&#xD;&#xA; - For every section, divide into two placing a point in the middle of this section, with (ranged) random height between its two neighbours&#xD;&#xA; - Repeat n times.&#xD;&#xA;&#xD;&#xA;What happens is detail in the scenery gets finer with each iteration. &#xD;&#xA;&#xD;&#xA;How you handle boundary cases is up to you: you could assume points at (0,height/2) and (width,height/2) for instance.&#xD;&#xA;&#xD;&#xA;Hope this helps!&#xD;&#xA;&#xD;&#xA;EDIT: Here is a picture I made for illustration:&#xD;&#xA;&#xD;&#xA;![terraingen][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[This is the same idea!][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/xDyYc.png&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/9384/how-do-i-generate-terrain-like-that-of-scorched-earth" />
  <row Id="23292" PostHistoryTypeId="2" PostId="10996" RevisionGUID="71c866cc-be8d-4624-b508-c4be83319aa5" CreationDate="2011-04-12T11:50:17.603" UserId="6678" Text="I am designing a mobile game.But i dont no much about it.&#xD;&#xA;&#xD;&#xA; How we differentiate HTTP TCP and UDP in reference to mobile game.&#xD;&#xA;" />
  <row Id="23293" PostHistoryTypeId="1" PostId="10996" RevisionGUID="71c866cc-be8d-4624-b508-c4be83319aa5" CreationDate="2011-04-12T11:50:17.603" UserId="6678" Text="What are the protocols used in server driven mobile games except HTTP TCP and UDP" />
  <row Id="23294" PostHistoryTypeId="3" PostId="10996" RevisionGUID="71c866cc-be8d-4624-b508-c4be83319aa5" CreationDate="2011-04-12T11:50:17.603" UserId="6678" Text="&lt;game-design&gt;" />
  <row Id="23295" PostHistoryTypeId="2" PostId="10997" RevisionGUID="e95e1e0d-b9f4-4b14-ad99-547e386b4194" CreationDate="2011-04-12T12:06:29.737" UserId="1742" Text="It's good that you are learning about rendering by doing. Kudos. In this instance, there is no &quot;painters algorithm&quot; solution, instead of trying to fix it by sorting, on the PS1 we used to just try to keep polygons around the same size when they were next to each other (which you are doing as far as I can tell), and **backface cull** (which you're not doing)&#xD;&#xA;&#xD;&#xA;**Backface culling** is checking the surface normal in screen space for it's direction (just get the sign of the depth element from the screen space transformed normal (in our case it was the z of the normal), or the cross product of two vectors of the triangle i.e. cross( v1-v0, v2-v0 ))&#xD;&#xA;&#xD;&#xA;If you implement backface culling, you also reduce the amount of rasterising you're doing.. double win." />
  <row Id="23296" PostHistoryTypeId="2" PostId="10998" RevisionGUID="91f9b457-d723-4085-a8a6-133534a7f55d" CreationDate="2011-04-12T12:08:18.707" UserId="4129" Text="UDP is difficult; you can typically only use UDP for client-initiated messages.&#xD;&#xA;&#xD;&#xA;Also, TCP is also particularly high latency for mobile.  And its very bursty; it might be running very fast and suddenly it drops right off.&#xD;&#xA;&#xD;&#xA;But TCP works pretty much across the board.&#xD;&#xA;&#xD;&#xA;There is no widespread peer-to-peer networking for games; all gets bounced through a central server.&#xD;&#xA;&#xD;&#xA;You can do fun peer-to-peer stuff using any platform-provided push mechanism e.g. C2DM on Android, but that only suits turn-based slow games." />
  <row Id="23297" PostHistoryTypeId="25" PostId="10991" RevisionGUID="14324b3d-d3c8-46e9-9301-6cb3b904455f" CreationDate="2011-04-12T12:09:25.460" Comment="http://twitter.com/#!/StackGameDev/status/57777338523463680" />
  <row Id="23298" PostHistoryTypeId="5" PostId="10983" RevisionGUID="b38ee376-d6a4-49d7-b161-afedd4a82b15" CreationDate="2011-04-12T12:09:37.713" UserId="3132" Comment="added 1306 characters in body" Text="Items is the most high loaded part of game database. So you should create the most effective design to handle it. In your case it will be table like this one&#xD;&#xA;&#xD;&#xA;       create table item (&#xD;&#xA;        id long primary key&#xD;&#xA;        item_name string&#xD;&#xA;        ....&#xD;&#xA;        item_state_type int&#xD;&#xA;        item_state_data varbinary &#xD;&#xA;    )&#xD;&#xA;    id - it is the key for unique item entity.&#xD;&#xA;    item_name - &quot;ring of power&quot;&#xD;&#xA;    item_state_type - type of your item. Ordinary or random generated.&#xD;&#xA;    item_state_data - serialized custom data. In your case it is an array of custom attributes. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The pair of tables item and item_attributes with keys-and-values isn't a good idea. Operation with one row (in my design) will be converted in operation with ~10 rows in different tables (in key-value design)&#xD;&#xA;&#xD;&#xA;For example&#xD;&#xA;&#xD;&#xA;    id, item_name,      item_state_type, item_state_data, owner_town, owner_id&#xD;&#xA;    1, &quot;ring of power&quot; , 0, null,    1,    null - vendor ordinary item&#xD;&#xA;    2, &quot;ring of power&quot; , 1, binary1, 1,    null - vendor customized item&#xD;&#xA;    3, &quot;ring of power&quot; , 1, binary2, 2,    null - vendor customized item in another town&#xD;&#xA;    4, &quot;ring of power&quot; , 1, binary1, null, 10 - user1 item&#xD;&#xA;    4, &quot;ring of power&quot; , 1, binary2, null, 10 - user2 item&#xD;&#xA;&#xD;&#xA;Actually I prefer to store item templates in XML files, but this approach is OK too for simple data model.&#xD;&#xA;&#xD;&#xA;item_state_data - serialized custom data. In your case it is an array of custom attributes.&#xD;&#xA;The main idea - you should somehow translate your custom data into one byte array. Or into string. &#xD;&#xA;&#xD;&#xA;Example in java + pseudocode. &#xD;&#xA;&#xD;&#xA;    public void saveItem(ItemDataSet item) {&#xD;&#xA;           ... &#xD;&#xA;          PreparedStatement stmt = getConnection().prepareStatement(&quot;insert into item ... &quot;);&#xD;&#xA;          ItemSerializer serializer = SerializerFactory.createItemSerializer();&#xD;&#xA;          byte[] item_state_data = serializer.serialize(item);&#xD;&#xA;          stmt.setBytes(1, avatarInfo);&#xD;&#xA;          ...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public ItemSerializer {&#xD;&#xA;      public byte[] serialize(ItemDataSet item) {&#xD;&#xA;        DataOutput out = new DataOutputStream(...);  &#xD;&#xA;        out.writeInt(item.customParams().length);&#xD;&#xA;        for (long value : item.customParams()) {&#xD;&#xA;          out.writeLong(value);&#xD;&#xA;        }&#xD;&#xA;        ... &#xD;&#xA;        return out.toByteArray();&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      public ItemDataSet item deserialize(byte[] bytes) {&#xD;&#xA;        DataInputStream in = new DataInputStream(bytes);  &#xD;&#xA;        ItemDataSet item = new ItemDataSet();&#xD;&#xA;            int arrayLength = in.readInt();&#xD;&#xA;        for(int i=0;i&lt;arrayLength; i++ ) {&#xD;&#xA;          item.addParam( in.readLong);&#xD;&#xA;        }&#xD;&#xA;        ... &#xD;&#xA;        return item;&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="23299" PostHistoryTypeId="2" PostId="10999" RevisionGUID="b84356bd-2462-420c-be51-acbc0115cf0b" CreationDate="2011-04-12T12:23:50.900" UserId="6117" Text="This is a question basically to programmers with experience working in game companies.&#xD;&#xA;&#xD;&#xA;How common is it that game developers participate in the design process of the game? Both gameplay design, and content design. Do you participate in related meetings and such, or do you have some other (formal/informal) opportunities to sound your opinions of game features / levels / even story, and for them to be actually considered?&#xD;&#xA;&#xD;&#xA;Another question, not completely unrelated - is it possible for a programmer with interest in the field to move from the technical job to a gameplay design related job (or do both in smaller companies)? Does that happen?" />
  <row Id="23300" PostHistoryTypeId="1" PostId="10999" RevisionGUID="b84356bd-2462-420c-be51-acbc0115cf0b" CreationDate="2011-04-12T12:23:50.900" UserId="6117" Text="Game companies - Involvement of programmers in the design process" />
  <row Id="23301" PostHistoryTypeId="3" PostId="10999" RevisionGUID="b84356bd-2462-420c-be51-acbc0115cf0b" CreationDate="2011-04-12T12:23:50.900" UserId="6117" Text="&lt;game-design&gt;&lt;programming&gt;&lt;career&gt;&lt;jobs&gt;" />
  <row Id="23302" PostHistoryTypeId="2" PostId="11000" RevisionGUID="731944d7-543e-4cf9-8a69-1b4a39fc6796" CreationDate="2011-04-12T12:43:35.923" UserId="2710" Text="You can use _noise_ functions to generate random heights. The simplest of them is value noise, which works exactly like your description: you generate some random integer heights, and then _interpolate_ heights between them. The most-often used interpolation method is cubic S-curve mapping: &#xD;&#xA;&#xD;&#xA;Suppose you have height `h0` at point `x0` and height `h1` at point `x1`. Then to obtain height at any point `x` (`x0&lt;=x&lt;=x1`), you use&#xD;&#xA;&#xD;&#xA;    t = (x-x0)/(x1-x0); // map to [0,1] range&#xD;&#xA;    t = t*t*(3f - 2f*t); // map to cubic S-shaped curve&#xD;&#xA;    h = h0+t*h1;&#xD;&#xA;&#xD;&#xA;Heights obtained in this way will be smooth, random, but not really interesting. To make your terrain better, you can use _fractal noise_. It works like this: suppose you have generated a function `h(x)` that returns height at a given coordinate (using the method above). This function has a frequency, determined by frequency of original interger heights. To make a fractal out of it, you combine together functions with several frequencies:&#xD;&#xA;&#xD;&#xA;    fbm(x)=h(x) + 0.5*h(2*x) + 0.25*h(4*x) + 0.125*h(8*x);&#xD;&#xA;&#xD;&#xA;In this example, I combine four frequencies - original, double, 4-times and 8-times original, with higher frequencies given less weight. Theoretically, fractals go all the way to infinity, but in practice only a few terms are required. The `fbm` in the formula stands for fractional Brownian motion - this is the name of this function. &#xD;&#xA;&#xD;&#xA;This is a powerful technique. You can play with frequency multiplier, with weights of different frequencies, or add some functions to distort noise. For example, to get more &quot;ridged&quot; feel, `h(x)` can be changed to `1-abs(h(x))` (assuming `-1&lt;=h(x)&lt;=1`)&#xD;&#xA;&#xD;&#xA;However, while all this is nice, this technique has a serious limitation. With a &quot;heightline&quot; based approach, you can never have terrain &quot;overhangs&quot;. And I imagine them to be a very nice feature to have in a &quot;Moon Buggy&quot;-like game.&#xD;&#xA;&#xD;&#xA;Adding nice overhangs is a difficult task. One thing that I can think of - you can start with a fractal &quot;heightline&quot;, and &quot;tesselate&quot; it into a series of splines or bezier curves. Then the terrain line will be defined by several &quot;key points&quot;. Apply some jitter to these key points - this will result in random deformation of the terrain, probably forming some interesting shapes. However, terrain self-intersections might become a problem with this approach, especially with high jitter amounts." />
  <row Id="23303" PostHistoryTypeId="2" PostId="11001" RevisionGUID="3c8db8a2-f092-489b-af77-62abcd4fde49" CreationDate="2011-04-12T12:51:59.523" UserId="-1" Text="" />
  <row Id="23304" PostHistoryTypeId="2" PostId="11002" RevisionGUID="d110ea4d-1faf-4143-9b61-a87a2c435270" CreationDate="2011-04-12T12:51:59.523" UserId="-1" Text="" />
  <row Id="23305" PostHistoryTypeId="6" PostId="10995" RevisionGUID="9e158034-6043-4247-a550-8fb594295125" CreationDate="2011-04-12T12:55:26.597" UserId="1386" Comment="edited tags" Text="&lt;language-agnostic&gt;" />
  <row Id="23306" PostHistoryTypeId="5" PostId="11000" RevisionGUID="4222b307-5832-4645-92dd-ec21a5181b79" CreationDate="2011-04-12T12:55:58.600" UserId="2710" Comment="removed confusing &quot;f&quot; from code example" Text="You can use _noise_ functions to generate random heights. The simplest of them is value noise, which works exactly like your description: you generate some random integer heights, and then _interpolate_ heights between them. The most-often used interpolation method is cubic S-curve mapping: &#xD;&#xA;&#xD;&#xA;Suppose you have height `h0` at point `x0` and height `h1` at point `x1`. Then to obtain height at any point `x` (`x0&lt;=x&lt;=x1`), you use&#xD;&#xA;&#xD;&#xA;    t = (x-x0)/(x1-x0); // map to [0,1] range&#xD;&#xA;    t = t*t*(3 - 2*t); // map to cubic S-shaped curve&#xD;&#xA;    h = h0+t*h1;&#xD;&#xA;&#xD;&#xA;Heights obtained in this way will be smooth, random, but not really interesting. To make your terrain better, you can use _fractal noise_. It works like this: suppose you have generated a function `h(x)` that returns height at a given coordinate (using the method above). This function has a frequency, determined by frequency of original interger heights. To make a fractal out of it, you combine together functions with several frequencies:&#xD;&#xA;&#xD;&#xA;    fbm(x)=h(x) + 0.5*h(2*x) + 0.25*h(4*x) + 0.125*h(8*x);&#xD;&#xA;&#xD;&#xA;In this example, I combine four frequencies - original, double, 4-times and 8-times original, with higher frequencies given less weight. Theoretically, fractals go all the way to infinity, but in practice only a few terms are required. The `fbm` in the formula stands for fractional Brownian motion - this is the name of this function. &#xD;&#xA;&#xD;&#xA;This is a powerful technique. You can play with frequency multiplier, with weights of different frequencies, or add some functions to distort noise. For example, to get more &quot;ridged&quot; feel, `h(x)` can be changed to `1-abs(h(x))` (assuming `-1&lt;=h(x)&lt;=1`)&#xD;&#xA;&#xD;&#xA;However, while all this is nice, this technique has a serious limitation. With a &quot;heightline&quot; based approach, you can never have terrain &quot;overhangs&quot;. And I imagine them to be a very nice feature to have in a &quot;Moon Buggy&quot;-like game.&#xD;&#xA;&#xD;&#xA;Adding nice overhangs is a difficult task. One thing that I can think of - you can start with a fractal &quot;heightline&quot;, and &quot;tesselate&quot; it into a series of splines or bezier curves. Then the terrain line will be defined by several &quot;key points&quot;. Apply some jitter to these key points - this will result in random deformation of the terrain, probably forming some interesting shapes. However, terrain self-intersections might become a problem with this approach, especially with high jitter amounts." />
  <row Id="23307" PostHistoryTypeId="2" PostId="11003" RevisionGUID="0c3aab90-6beb-446a-9976-ba979024f2e5" CreationDate="2011-04-12T12:56:03.623" UserId="-1" Text="" />
  <row Id="23308" PostHistoryTypeId="2" PostId="11004" RevisionGUID="96a92627-0474-48a0-9141-8e985ed3899b" CreationDate="2011-04-12T12:56:03.623" UserId="-1" Text="" />
  <row Id="23309" PostHistoryTypeId="2" PostId="11005" RevisionGUID="d4885c7e-d73a-4fed-a5f1-5080d0d04965" CreationDate="2011-04-12T13:03:18.227" UserId="1386" Text="Y is usually upwards in 3D, but the designations of the axes are rather arbitrary. To keep it simple I'd either have:&#xD;&#xA;&#xD;&#xA;    X (width), Y (depth), Z (height)&#xD;&#xA;    or&#xD;&#xA;    X (width) Z (depth) Y (height)&#xD;&#xA;&#xD;&#xA;Keep the naming of the axes consistent between 2D and 3D.&#xD;&#xA;Conversion between 2D and 3D can be done with a simple function.&#xD;&#xA;&#xD;&#xA;If you're interfacing a lot with a library that has a different convention then either use the convention the library is using or make conversion functions.&#xD;&#xA;The conversion functions could look something like this:&#xD;&#xA;&#xD;&#xA;    vector3D switchAxes(vector3D in)&#xD;&#xA;    {&#xD;&#xA;      return vector3D(in.y, in.z, in.x);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23310" PostHistoryTypeId="6" PostId="10996" RevisionGUID="6025681a-042e-4b0c-ac93-231328154a57" CreationDate="2011-04-12T13:13:09.450" UserId="450" Comment="fixed tags" Text="&lt;network&gt;&lt;mobile&gt;" />
  <row Id="23311" PostHistoryTypeId="24" PostId="10996" RevisionGUID="6025681a-042e-4b0c-ac93-231328154a57" CreationDate="2011-04-12T13:13:09.450" Comment="Proposed by 450 approved by 189 edit id of 273" />
  <row Id="23312" PostHistoryTypeId="5" PostId="6712" RevisionGUID="25708471-d5d4-4d83-8596-3a73d6bca2d9" CreationDate="2011-04-12T13:13:36.487" UserId="3588" Comment="Switching the tag for the correct one. Also added title text for the second diagram. ♪" Text="The NES classic Mega Man series uses a very specific scrolling technique that I'm having a hard time wrapping my head around implementing. Essentially, the level is divided into &quot;screens&quot; which are all the same size. Some of the screens *smoothly scroll* in to one another, creating the illusion of a wider fields of play. Some of the screens *stop the camera from scrolling* until the player has reached the edge of the screen, at which time a transition occurs and the next screen is shown. It is also possible for a single screen to have more than one transition, for example it has a ladder that goes up to one screen, but you could also walk forward to another screen.&#xD;&#xA;&#xD;&#xA;How can these screen transitions be modeled?&#xD;&#xA;&#xD;&#xA;![Mega Man screen transition diagram][1]&#xD;&#xA;&#xD;&#xA;* Screen 0 is the starting screen, where the player starts.&#xD;&#xA;* Screen 0-3 is horizontally smooth-scrolling and appears to the player as one continuous field of play.&#xD;&#xA;* Since there is a transition between Screen 3 and it's neighboring screens 4 and 5, the camera will not advance passed the right or top edges of Screen 3 unless the player moves to that respective edge and &quot;pushes&quot; through to the next screen.&#xD;&#xA;* Once the player moves to either of the transition edges, user input is momentarily disabled and the camera transitions into the new area, after which user input is restored.&#xD;&#xA;&#xD;&#xA;* The blue screen (Screen 5) disabled horizontal scrolling so that only vertical transitions are possible.&#xD;&#xA;* The green screen (Screen 6) has a vertical transition back to Screen 5 but also allows horizontal smooth-scrolling into Screen 7.&#xD;&#xA;&#xD;&#xA;**Edit**: Implementing the transitions in terms of rooms lead me to this:&#xD;&#xA;&#xD;&#xA;![Room structure implementation diagram][2]&#xD;&#xA;&#xD;&#xA;The small notches with an arrow are the regions in which a transition can occur. Each region has a &quot;direction&quot; and lies *just* outside of the room's visible area. As soon as the player hits a region, a transition will be started.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/b6EF8.png &quot;Mega Man screen transition diagram&quot;&#xD;&#xA;  [2]: http://i.stack.imgur.com/yO7jT.png &quot;Room structure implementation diagram&quot;" />
  <row Id="23313" PostHistoryTypeId="6" PostId="6712" RevisionGUID="25708471-d5d4-4d83-8596-3a73d6bca2d9" CreationDate="2011-04-12T13:13:36.487" UserId="3588" Comment="Switching the tag for the correct one. Also added title text for the second diagram. ♪" Text="&lt;2d&gt;&lt;camera&gt;&lt;platform-games&gt;" />
  <row Id="23314" PostHistoryTypeId="24" PostId="6712" RevisionGUID="25708471-d5d4-4d83-8596-3a73d6bca2d9" CreationDate="2011-04-12T13:13:36.487" Comment="Proposed by 3588 approved by 189 edit id of 274" />
  <row Id="23315" PostHistoryTypeId="5" PostId="11003" RevisionGUID="52ce874a-8abb-4693-a305-1075ca77459c" CreationDate="2011-04-12T13:13:42.790" UserId="3588" Comment="added 395 characters in body" Text="**Parallax scrolling** is a technique of using different rates of scrolling for multiple layers of background. The farther items in the background scroll at a slower pace than those in the foreground, which mimics the actual displacement of objects at a distance in 3D.&#xD;&#xA;&#xD;&#xA;This tag is used for questions dealing with the implementation and common practices for using parallax scrolling in games." />
  <row Id="23316" PostHistoryTypeId="24" PostId="11003" RevisionGUID="52ce874a-8abb-4693-a305-1075ca77459c" CreationDate="2011-04-12T13:13:42.790" Comment="Proposed by 3588 approved by 189 edit id of 277" />
  <row Id="23317" PostHistoryTypeId="5" PostId="11004" RevisionGUID="34ff069b-0e96-4a8d-97b1-c86d5783ca49" CreationDate="2011-04-12T13:13:48.530" UserId="3588" Comment="added 108 characters in body" Text="An illusion technique for scrolling backgrounds which allows for a finer simulation of depth in 2D graphics." />
  <row Id="23318" PostHistoryTypeId="24" PostId="11004" RevisionGUID="34ff069b-0e96-4a8d-97b1-c86d5783ca49" CreationDate="2011-04-12T13:13:48.530" Comment="Proposed by 3588 approved by 189 edit id of 278" />
  <row Id="23319" PostHistoryTypeId="5" PostId="11001" RevisionGUID="d78ceb68-a25d-4411-bf57-01064b392702" CreationDate="2011-04-12T13:13:55.970" UserId="3588" Comment="added 997 characters in body" Text="A platform defines many characteristics of the game's development, not the least of which is the accessibility of the game to your audience. The choice of platform can greatly impact the gameplay you program, the stylistic approach you take, and the ease of applying patches or modifications to the game.&#xD;&#xA;&#xD;&#xA;The main class of questions with this tag deal with the choice of platform when designing a game for certain parameters. When you are designing for a specific platform, you should ideally use the appropriate tag. When you are concerned about cross-platform programming, use the [tag:cross-platform] tag.&#xD;&#xA;&#xD;&#xA;The most common platforms in modern days, and some of the corresponding tags, include:&#xD;&#xA;&#xD;&#xA; - **Consoles**&#xD;&#xA;    - [tag:wii], [tag:xbox360], [tag:playstation3], [tag:xbox]&#xD;&#xA; - **Computers**&#xD;&#xA;    - [tag:pc], [tag:macos], [tag:linux]&#xD;&#xA; - **Mobile Devices**&#xD;&#xA;    - [tag:mobile], [tag:ios]&#xD;&#xA; - **Handhelds**&#xD;&#xA;&#xD;&#xA;If your question is about the Platform game genre, use [tag:platform-games]. " />
  <row Id="23320" PostHistoryTypeId="24" PostId="11001" RevisionGUID="d78ceb68-a25d-4411-bf57-01064b392702" CreationDate="2011-04-12T13:13:55.970" Comment="Proposed by 3588 approved by 189 edit id of 275" />
  <row Id="23321" PostHistoryTypeId="5" PostId="11002" RevisionGUID="8aa818be-31c0-4e5b-8542-c879ef37b976" CreationDate="2011-04-12T13:14:00.760" UserId="3588" Comment="added 178 characters in body" Text="Console, computer, mobile... an umbrella term for the hardware architecture and the software framework on which a game is run. Not to be confused with the genre of the same name." />
  <row Id="23322" PostHistoryTypeId="24" PostId="11002" RevisionGUID="8aa818be-31c0-4e5b-8542-c879ef37b976" CreationDate="2011-04-12T13:14:00.760" Comment="Proposed by 3588 approved by 189 edit id of 276" />
  <row Id="23323" PostHistoryTypeId="2" PostId="11006" RevisionGUID="15a500d5-c3d2-48f0-9ba4-a2c23ed0e1db" CreationDate="2011-04-12T13:27:13.583" UserId="1742" Text="Frequently coders are called upon to figure out if designs are possible, and also help order new features in schedules, but when it comes to actively providing creative input, each company varies wildly. Some don't have many dedicated designers and the coders are meant to &quot;add value&quot; while developing the features. In other companies there is a very strict &quot;if it's not in a design doc, it's not going in&quot;.&#xD;&#xA;&#xD;&#xA;So, choose who you work for carefully.&#xD;&#xA;&#xD;&#xA;Also, it's very possible for a coder to move to being a producer, which can lead to some more creative control, but I've not yet seen a good designer start out as a professional coder. (bedroom coding doesn't count, as many designers have to start trying their ideas out somewhere)" />
  <row Id="23324" PostHistoryTypeId="2" PostId="11007" RevisionGUID="87ff9c23-eac0-4922-862d-0d1663b94188" CreationDate="2011-04-12T13:41:59.133" UserId="-1" Text="" />
  <row Id="23325" PostHistoryTypeId="2" PostId="11008" RevisionGUID="3d4ef0fe-8b58-4313-b258-0ed8e2cf4030" CreationDate="2011-04-12T13:41:59.133" UserId="-1" Text="" />
  <row Id="23326" PostHistoryTypeId="5" PostId="10996" RevisionGUID="34d12310-5d8f-428e-8b75-d607d86b36fd" CreationDate="2011-04-12T13:44:27.407" UserId="189" Comment="Vastly fixed this question. It's a good question!" Text="I am designing a mobile game, but I don't know much about it.&#xD;&#xA;&#xD;&#xA;How do we differentiate HTTP, TCP and UDP in reference to mobile game?" />
  <row Id="23327" PostHistoryTypeId="4" PostId="10996" RevisionGUID="34d12310-5d8f-428e-8b75-d607d86b36fd" CreationDate="2011-04-12T13:44:27.407" UserId="189" Comment="Vastly fixed this question. It's a good question!" Text="TCP vs. UDP on mobile platforms?" />
  <row Id="23328" PostHistoryTypeId="5" PostId="11008" RevisionGUID="962716a5-e7d5-4943-9d82-c33f113afeb9" CreationDate="2011-04-12T13:44:42.307" UserId="3588" Comment="added 147 characters in body" Text="The quality, efficiency, and speed of running gameplay as a result of several factors in the design and structure of the game and its architecture." />
  <row Id="23329" PostHistoryTypeId="24" PostId="11008" RevisionGUID="962716a5-e7d5-4943-9d82-c33f113afeb9" CreationDate="2011-04-12T13:44:42.307" Comment="Proposed by 3588 approved by 189 edit id of 280" />
  <row Id="23330" PostHistoryTypeId="5" PostId="11007" RevisionGUID="41205914-fee8-4262-9df5-8c53dbde704f" CreationDate="2011-04-12T13:44:47.470" UserId="3588" Comment="added 743 characters in body" Text="High performance is a big goal of any quality game. Performing low by having extensive load times, poor framerate, or other issues in the resolution of actions will result in a poor gaming experience. See also: [Computer Performance on Wikipedia](http://en.wikipedia.org/wiki/Computer_performance).&#xD;&#xA;&#xD;&#xA;Like any software, the performance of a game is affected by a myriad of elements, such as throughput, loading speed, and bandwidth. With that comes a myriad of things that can hamper the performance. Questions with this tag deal with all of the different elements that influence the performance of a game, and how one should optimize things such as data storage, calculations, and scalability in order to provide a quality gaming experience." />
  <row Id="23331" PostHistoryTypeId="24" PostId="11007" RevisionGUID="41205914-fee8-4262-9df5-8c53dbde704f" CreationDate="2011-04-12T13:44:47.470" Comment="Proposed by 3588 approved by 189 edit id of 279" />
  <row Id="23332" PostHistoryTypeId="5" PostId="10999" RevisionGUID="746843c5-c798-4c2e-8fa2-649ebcc0a59f" CreationDate="2011-04-12T13:51:21.837" UserId="6117" Comment="deleted 4 characters in body" Text="This is a question basically to programmers with experience working in game companies.&#xD;&#xA;&#xD;&#xA;How common is it that game coders participate in the design process of the game? Both gameplay design, and content design. Do you participate in related meetings and such, or do you have some other (formal/informal) opportunities to sound your opinions of game features / levels / even story, and for them to be actually considered?&#xD;&#xA;&#xD;&#xA;Another question, not completely unrelated - is it possible for a programmer with interest in the field to move from the technical job to a gameplay design related job (or do both in smaller companies)? Does that happen?" />
  <row Id="23333" PostHistoryTypeId="5" PostId="10977" RevisionGUID="ce48fbaa-fcd0-4dcf-b34f-584165b4fda6" CreationDate="2011-04-12T13:59:57.057" UserId="3505" Comment="Statement vagueified to avoid discussion beyond the intended scope." Text="For modern high quality 2D graphics you'd often use 3D rendering, meaning you'd need a 3rd part 3D library for most languages anyway.&#xD;&#xA;&#xD;&#xA;I think mostly for game development Java just doesn't do a lot that C++ or C# doesn't do, and it might be a little slower than C#.&#xD;&#xA;&#xD;&#xA;A lot of people seem to have very strong opinions on what is good for what and what isn't, it's often a sign that they simply don't know what they are talking about." />
  <row Id="23334" PostHistoryTypeId="2" PostId="11009" RevisionGUID="71eef39b-6463-4998-a839-5a10a6f35fa8" CreationDate="2011-04-12T14:06:13.800" UserId="4750" Text="So in one of our projects we're using Vector2/Vector3's a lot but we do only use integer/byte values mostly. So up to the point we've implemented our Vector2Int, Vector3Int, Vector2Byte and so structures;&#xD;&#xA;&#xD;&#xA;    public struct Vector2Int&#xD;&#xA;        {&#xD;&#xA;            public int X;&#xD;&#xA;            public int Z;&#xD;&#xA;    &#xD;&#xA;            public Vector2Int(int x, int z)&#xD;&#xA;            {&#xD;&#xA;                this.X = x;&#xD;&#xA;                this.Z = z;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public override bool Equals(object obj)&#xD;&#xA;            {&#xD;&#xA;                if (obj is Vector2Int) return this.Equals((Vector2Int)obj);&#xD;&#xA;                else return false;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public bool Equals(Vector2Int other)&#xD;&#xA;            {&#xD;&#xA;                return ((this.X == other.X) &amp;&amp; (this.Z == other.Z));&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public static bool operator ==(Vector2Int value1, Vector2Int value2)&#xD;&#xA;            {&#xD;&#xA;                return ((value1.X == value2.X) &amp;&amp; (value1.Z == value2.Z));&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public static bool operator !=(Vector2Int value1, Vector2Int value2)&#xD;&#xA;            {&#xD;&#xA;                if (value1.X == value2.X) return value1.Z != value2.Z;&#xD;&#xA;                return true;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public override int GetHashCode()&#xD;&#xA;            {&#xD;&#xA;                return (this.X.GetHashCode() + this.Z.GetHashCode());&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public override string ToString()&#xD;&#xA;            {&#xD;&#xA;                return string.Format(&quot;{{X:{0} Z:{1}}}&quot;, this.X, this.Z);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;But i don't know if we're on right track? Should we just better use XNA's float based vectors because of performance-wise concerns?&#xD;&#xA;&#xD;&#xA;On the other hand a Vector2Byte or Vector3Bytes consumes less space which is also quite important when you use so much vectors.&#xD;&#xA;&#xD;&#xA;I've searched for tests / information on XNA's built-in vector performance but couldn't find a bit even on it.&#xD;&#xA;&#xD;&#xA;I'm happy to hear your experiences." />
  <row Id="23335" PostHistoryTypeId="1" PostId="11009" RevisionGUID="71eef39b-6463-4998-a839-5a10a6f35fa8" CreationDate="2011-04-12T14:06:13.800" UserId="4750" Text="Should we go for our Vector2Int/Vector3Int implementation or just use built-in float based vectors?" />
  <row Id="23336" PostHistoryTypeId="3" PostId="11009" RevisionGUID="71eef39b-6463-4998-a839-5a10a6f35fa8" CreationDate="2011-04-12T14:06:13.800" UserId="4750" Text="&lt;xna&gt;&lt;vector&gt;" />
  <row Id="23337" PostHistoryTypeId="2" PostId="11010" RevisionGUID="e7b2e653-dcab-4683-92b4-a9c97e5af5b9" CreationDate="2011-04-12T14:07:41.853" UserId="3132" Text="In our company game designers are separated from other developers. But we have special page on our internal wiki where we can post our thoughts about different aspects of game and of course we can talk to them directly. But the last word always have game designers and we are not allowed to do anything outside the specs. And it is great, actually. Division of labor." />
  <row Id="23338" PostHistoryTypeId="2" PostId="11011" RevisionGUID="63e29361-04cf-4c84-bf06-d744ec80b57b" CreationDate="2011-04-12T14:44:52.023" UserId="6655" Text="HTTP is just another protocol on top of TCP, therefore I'll skip it in my answer. Use HTTP only for infrequent simple notifications like highscore uploads.&#xD;&#xA;&#xD;&#xA;Beej has a good tutorial on TCP and UDP socket programming: http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html&#xD;&#xA;&#xD;&#xA;Basically TCP is a connection oriented protocol. A client connects to a server, they exchange some messages, one of them closes the connection. You can think of it as a bytestream flowing directly from one side to the other. TCP makes sure no byte gets lost and all of them arrive in order.&#xD;&#xA;&#xD;&#xA;UDP doesn't provide anything of this. It is very low-level. You just send a bunch of bytes (message) to some destination (address). UDP will build a packet out of these and send it on its way. There is no guarantee it will ever arrive.&#xD;&#xA;&#xD;&#xA;For high-performance multiplayer games you need UDP, because you can't afford the latency overhead of TCP. But you have to handle all of those cases where packets get lost, duplicated or reordered yourself.&#xD;&#xA;&#xD;&#xA;If latency is not of concern go for TCP. It is *much* easier to use." />
  <row Id="23339" PostHistoryTypeId="2" PostId="11012" RevisionGUID="d3724a77-9566-454a-9d82-0398af57e3a5" CreationDate="2011-04-12T14:58:00.083" UserId="-1" Text="" />
  <row Id="23340" PostHistoryTypeId="2" PostId="11013" RevisionGUID="2d79c066-30be-425a-8069-5842c5ba530a" CreationDate="2011-04-12T14:58:00.083" UserId="-1" Text="" />
  <row Id="23341" PostHistoryTypeId="25" PostId="11009" RevisionGUID="a4275a6c-ac4a-4810-832c-445312ba2b56" CreationDate="2011-04-12T15:09:25.610" Comment="http://twitter.com/#!/StackGameDev/status/57822638009098241" />
  <row Id="23342" PostHistoryTypeId="2" PostId="11014" RevisionGUID="889da8e0-f681-46ee-bbfb-ca8b34e64a9e" CreationDate="2011-04-12T15:31:13.863" UserId="1430" Text="I would be more concerned that there are operations (divisions, square roots, et cetera) done on or to components of vectors that would cause integer-based representations to become inaccurate. Beyond that I'm not sure it's worth switching implementations mid-project.&#xD;&#xA;&#xD;&#xA;There are minor potential performance nitpicks here and there, but none of them are likely to be serious. I would suggest using the XNA versions simply for uniformity and scalability, but probably only if you're about to start a new project. I don't see any compelling reasons to change everything up mid-stream." />
  <row Id="23343" PostHistoryTypeId="2" PostId="11015" RevisionGUID="fe81bd92-3cfc-482f-add6-d7b845aff8f4" CreationDate="2011-04-12T15:50:48.327" UserId="6655" Text="Sorting the faces according to their average z-value doesn't work, because the average z-value provides no information on the actual z-value of the vertices or even surface pixels.&#xD;&#xA;&#xD;&#xA;Example (warning, ASCII art ahead):&#xD;&#xA;&#xD;&#xA;              &#xD;&#xA;              /&#xD;&#xA;             /&#xD;&#xA;    cam     /&#xD;&#xA;    --&gt;    / &#xD;&#xA;          /&#xD;&#xA;         /--       &lt;--B&#xD;&#xA;        /&#xD;&#xA;        ^--A&#xD;&#xA;&#xD;&#xA;There are two faces A and B. From the camera's perspective A is in front of B. Yet the average z-value of B is smaller. Let's look at the other z-values:&#xD;&#xA;&#xD;&#xA;- the minimum z-value of A is 4&#xD;&#xA;- the maximum z-value of A is 11&#xD;&#xA;- therefore the average z-value of A is 7.5&#xD;&#xA;- the minimum z-value of B is 6&#xD;&#xA;- the maximum z-value of B is 8&#xD;&#xA;- therefore the average z-value of B is 7&#xD;&#xA;&#xD;&#xA;You could try to sort them by their minimal z-values but there cases where that won't work too. There is just no way to sort arbitrary faces correctly using just one z-value.&#xD;&#xA;&#xD;&#xA;In Newell's algorithm http://en.wikipedia.org/wiki/Newell's_algorithm what you do is sort the min/max-ranges of the z-values. If the ranges of two faces do not overlap you can know for sure which one is in front. If they do, sometimes you absolutely have to split the faces. Sometimes it will suffice to raytrace every vertex for occlusion or some other technique." />
  <row Id="23344" PostHistoryTypeId="2" PostId="11016" RevisionGUID="e410024d-334f-4889-9f59-1c12dc3b8074" CreationDate="2011-04-12T16:30:39.137" UserId="6678" Text=" I have to design PONG game in android.There are 2 or n mobiles and  game server.Application is installed in mobile .In mobile1(M1) can see the movement of bat and ball of Mobile2(M2) an vice_versa.Suppose if M1 hits the ball,all the movements of the ball and bat of M1 can be seen in M2 Screen and viceversa. Now i want to know which protocol i should use and why. – " />
  <row Id="23345" PostHistoryTypeId="1" PostId="11016" RevisionGUID="e410024d-334f-4889-9f59-1c12dc3b8074" CreationDate="2011-04-12T16:30:39.137" UserId="6678" Text="Which protocol should i use for the game" />
  <row Id="23346" PostHistoryTypeId="3" PostId="11016" RevisionGUID="e410024d-334f-4889-9f59-1c12dc3b8074" CreationDate="2011-04-12T16:30:39.137" UserId="6678" Text="&lt;game-design&gt;&lt;network&gt;&lt;mobile&gt;" />
  <row Id="23347" PostHistoryTypeId="5" PostId="10991" RevisionGUID="75f6cc3b-12c3-4695-8e31-e7124177b60d" CreationDate="2011-04-12T16:35:08.967" UserId="3588" Comment="Fixed the title, also added title text to the image. ♪" Text="I cannot really figure out what causes one surface to overlap another. In a 3D engine I'm creating, my technique is failing in edge cases.&#xD;&#xA;&#xD;&#xA;My method is sorting the surfaces to be painted from the furthest to the closest. To determine the closeness, I'm comparing the average z values. Sometimes, however, an overlapping surface has a **higher** average z value than the one it is overlapping. Thus, the surface further away is painted over the closer one - resulting in bizarre rendering like this:&#xD;&#xA;&#xD;&#xA;![Large purple square with a section of red on the side][1]&#xD;&#xA;&#xD;&#xA;What one is meant to see is the purple front surface of the cube only, whilst the red side surface is painted over the purple one. The average z value of the purple surface is higher, and therefore 'further away'. So I'm having naggling doubt as to whether this technique is correct.&#xD;&#xA;&#xD;&#xA;What I also tried is getting the distance from the camera (i.e. origin) to the surface, but then I needed a point. I chose the middle of each surface but also this doesn't always seem to work because not all surfaces are as large as each other.&#xD;&#xA;&#xD;&#xA;Therefore, what is a reliable way to determine the order of closeness of surfaces towards the origin?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AcOPu.png" />
  <row Id="23348" PostHistoryTypeId="4" PostId="10991" RevisionGUID="75f6cc3b-12c3-4695-8e31-e7124177b60d" CreationDate="2011-04-12T16:35:08.967" UserId="3588" Comment="Fixed the title, also added title text to the image. ♪" Text="What exactly causes a surface to overlap another?" />
  <row Id="23349" PostHistoryTypeId="24" PostId="10991" RevisionGUID="75f6cc3b-12c3-4695-8e31-e7124177b60d" CreationDate="2011-04-12T16:35:08.967" Comment="Proposed by 3588 approved by 51 edit id of 284" />
  <row Id="23350" PostHistoryTypeId="5" PostId="11001" RevisionGUID="ab9416a2-5beb-4c34-8e19-3c9a4e9f5900" CreationDate="2011-04-12T16:35:13.413" UserId="3588" Comment="Whoops! I can't believe I forgot Android! Sorry! ♪" Text="A platform defines many characteristics of the game's development, not the least of which is the accessibility of the game to your audience. The choice of platform can greatly impact the gameplay you program, the stylistic approach you take, and the ease of applying patches or modifications to the game.&#xD;&#xA;&#xD;&#xA;The main class of questions with this tag deal with the choice of platform when designing a game for certain parameters. When you are designing for a specific platform, you should ideally use the appropriate tag. When you are concerned about cross-platform programming, use the [tag:cross-platform] tag.&#xD;&#xA;&#xD;&#xA;The most common platforms in modern days, and some of the corresponding tags, include:&#xD;&#xA;&#xD;&#xA; - **Consoles**&#xD;&#xA;    - [tag:wii], [tag:xbox360], [tag:playstation3], [tag:xbox]&#xD;&#xA; - **Computers**&#xD;&#xA;    - [tag:pc], [tag:macos], [tag:linux]&#xD;&#xA; - **Mobile Devices**&#xD;&#xA;    - [tag:mobile], [tag:ios], [tag:android]&#xD;&#xA; - **Handhelds**&#xD;&#xA;&#xD;&#xA;If your question is about the Platform game genre, use [tag:platform-games]. " />
  <row Id="23351" PostHistoryTypeId="24" PostId="11001" RevisionGUID="ab9416a2-5beb-4c34-8e19-3c9a4e9f5900" CreationDate="2011-04-12T16:35:13.413" Comment="Proposed by 3588 approved by 51 edit id of 283" />
  <row Id="23352" PostHistoryTypeId="5" PostId="11013" RevisionGUID="20abc794-41f3-4e2c-86bf-8f75c08f5ddd" CreationDate="2011-04-12T16:35:16.737" UserId="3588" Comment="added 235 characters in body" Text="A portable device capable of multiple applications, one of which is a platform for playing games. Mobile phones are the eponymous example of such devices. Distinct from handhelds, which are exclusively or primarily designed for gaming." />
  <row Id="23353" PostHistoryTypeId="24" PostId="11013" RevisionGUID="20abc794-41f3-4e2c-86bf-8f75c08f5ddd" CreationDate="2011-04-12T16:35:16.737" Comment="Proposed by 3588 approved by 51 edit id of 282" />
  <row Id="23354" PostHistoryTypeId="5" PostId="11012" RevisionGUID="86a35a23-e5ef-4fe6-9d8b-68f9f07054d0" CreationDate="2011-04-12T16:35:18.687" UserId="3588" Comment="added 689 characters in body" Text="A [tag:platform] that is highly portable. Use this tag when you have a question about developing games for a mobile device platform in general. &#xD;&#xA;&#xD;&#xA;Use [tag:ios] or [tag:android] when dealing with those specific devices.&#xD;&#xA;&#xD;&#xA;Advances in technology have led to both the improvement of the generic mobile phone and the invention of multiple new mobile devices for other purposes. Computers and consoles are bulky to carry and setup, while laptops tend to be subpar for standard computer games. As such, mobile games are developed for the moving gamer to be able to enjoy a good game at any point of travel. They are typically optimized for the smaller design and power of a mobile device.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23355" PostHistoryTypeId="24" PostId="11012" RevisionGUID="86a35a23-e5ef-4fe6-9d8b-68f9f07054d0" CreationDate="2011-04-12T16:35:18.687" Comment="Proposed by 3588 approved by 51 edit id of 281" />
  <row Id="23356" PostHistoryTypeId="10" PostId="10990" RevisionGUID="ccb7b355-43fa-4ffe-98ab-a79ae4fd6818" CreationDate="2011-04-12T16:41:40.563" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="23357" PostHistoryTypeId="5" PostId="11016" RevisionGUID="0a3aac07-9452-4261-a78c-bcd78eead1fd" CreationDate="2011-04-12T16:52:13.433" UserId="1430" Comment="cleanup. not game design." Text="I have to design a Pong game for Android. There are multiple mobiles and a game server. Application is installed in mobile. Mobile 1 (M1) can see the movement of bat and ball of mobile 2 (M2) an vice-versa.&#xD;&#xA;&#xD;&#xA;Suppose if M1 hits the ball, all the movements of the ball and bat of M1 can be seen on M2's screen and vice-versa. Now I want to know which protocol I should use and why? " />
  <row Id="23358" PostHistoryTypeId="4" PostId="11016" RevisionGUID="0a3aac07-9452-4261-a78c-bcd78eead1fd" CreationDate="2011-04-12T16:52:13.433" UserId="1430" Comment="cleanup. not game design." Text="Which protocol should I use for a networked Pong clone?" />
  <row Id="23359" PostHistoryTypeId="6" PostId="11016" RevisionGUID="0a3aac07-9452-4261-a78c-bcd78eead1fd" CreationDate="2011-04-12T16:52:13.433" UserId="1430" Comment="cleanup. not game design." Text="&lt;network&gt;&lt;mobile&gt;" />
  <row Id="23360" PostHistoryTypeId="2" PostId="11017" RevisionGUID="c89644b5-685f-4c7a-b84b-70df7e66a3ad" CreationDate="2011-04-12T17:32:42.837" UserId="1198" Text="I'd recommend the [User Datagram Protocol][1] -- have each client send user inputs to your server, have your server calculate the results of all inputs and respond that result to each client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/User_Datagram_Protocol" />
  <row Id="23361" PostHistoryTypeId="2" PostId="11018" RevisionGUID="f48d2a1d-22f4-40eb-8a18-507061ce9f07" CreationDate="2011-04-12T17:40:48.307" UserId="4443" Text="This comes down to use the appropriate data structure for the task.&#xD;&#xA;&#xD;&#xA;If you are using this for internal functionality key to your game and such then your own data types that hold the values in a format you are using them would make sense.&#xD;&#xA;&#xD;&#xA;If however this is dealing with rendering and graphics hardware then you will want to use floats as that is what the hardware is generally built to use and accelerated for.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="23362" PostHistoryTypeId="2" PostId="11019" RevisionGUID="dda7983f-5b5c-4610-bfc2-4e43e4b15cd4" CreationDate="2011-04-12T17:54:09.383" UserId="2520" Text="Is there a fundamental technical reason for Flash being so much more prevalent as a game-publishing platform, when compared to Javascript?" />
  <row Id="23363" PostHistoryTypeId="1" PostId="11019" RevisionGUID="dda7983f-5b5c-4610-bfc2-4e43e4b15cd4" CreationDate="2011-04-12T17:54:09.383" UserId="2520" Text="Both Javascript and Flash are implementations of Ecmascript. Is there a fundamental technical reason for Flash being a more popular game platform?" />
  <row Id="23364" PostHistoryTypeId="3" PostId="11019" RevisionGUID="dda7983f-5b5c-4610-bfc2-4e43e4b15cd4" CreationDate="2011-04-12T17:54:09.383" UserId="2520" Text="&lt;flash&gt;&lt;javascript&gt;" />
  <row Id="23365" PostHistoryTypeId="2" PostId="11020" RevisionGUID="426e99f1-b7c3-4977-8573-2d2e243e359f" CreationDate="2011-04-12T17:56:50.483" UserId="744" Text="&lt;a href=&quot;http://en.wikipedia.org/wiki/Adobe_Flash#History&quot;&gt;Flash&lt;/a&gt;:&#xD;&#xA;&#xD;&#xA;&gt; Originally developed by Macromedia, Flash was introduced in **1996**, and is currently developed and distributed by Adobe Systems,&#xD;&#xA;&#xD;&#xA;&quot;Javascript&quot; &lt;a href=&quot;http://en.wikipedia.org/wiki/HTML5&quot;&gt;really means HTML 5&lt;/a&gt;, when compared to Flash:&#xD;&#xA;&#xD;&#xA;&gt; The HTML5 specification was adopted as the starting point of the work of the new HTML working group of the World Wide Web Consortium (W3C) in 2007. This working group published the First Public Working Draft of the specification on **January 22, 2008**&#xD;&#xA;&#xD;&#xA;(Emphasis added.)" />
  <row Id="23366" PostHistoryTypeId="2" PostId="11021" RevisionGUID="d28dc8ae-7591-4e2e-8f88-b1a3cf4bbe7d" CreationDate="2011-04-12T18:01:56.143" UserId="4443" Text="TCP and UDP would be the two choices for this and you will want to go with UDP.&#xD;&#xA;&#xD;&#xA;As for the Why part of your question, TCP is a 'guaranteed delivery' system, but its slow. For video games and where up to date information is a priority over ensuring the data gets there, UDP fits the bill. You will generally want to have an incremented Packet ID so you can ignore outdated packets to take care of them showing up in the wrong order, but this will suit your needs.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="23367" PostHistoryTypeId="25" PostId="11016" RevisionGUID="471ffaac-bc87-40fa-983e-693c09623426" CreationDate="2011-04-12T18:09:26.353" Comment="http://twitter.com/#!/StackGameDev/status/57867938279079936" />
  <row Id="23368" PostHistoryTypeId="2" PostId="11022" RevisionGUID="ea8a08c3-0e13-4baf-9c5d-03bc28639878" CreationDate="2011-04-12T18:18:51.700" UserId="953" Text="Flash is a more established platform, and people are more used to using it to code games.  In my experience, compiled AS3 running in the Flash Player runs much faster than Javascript running in-browser, and it offers easier access to things like sound and embedded files. Flash apps can also be encapsulated in a single .SWF file, while HTML5 apps written using Javascript tend to have a more complicated distribution method, since assets, scripts, and pages usually need to be separate files.&#xD;&#xA;&#xD;&#xA;It's not entirely a fair comparison; Flash is compiled (to an extent), while Javascript is at best just-in-time-compiled for most web applications." />
  <row Id="23369" PostHistoryTypeId="2" PostId="11023" RevisionGUID="59d7c644-7e1b-407c-9c56-0f100c6886cb" CreationDate="2011-04-12T18:23:43.403" UserId="450" Text="Flash is a lot more than ECMAScript. Although there were attempts to introduce some features of ActionScript into ECMAScript version 4, those were abandoned.&#xD;&#xA;&#xD;&#xA;JavaScript only got usable for most type of games very recently. JavaScript in [HTML5][1] nowadays offers:&#xD;&#xA;&#xD;&#xA;- performance gains dune to compiling&#xD;&#xA;- 2D and 3D canvas&#xD;&#xA;- native Video And Audio support&#xD;&#xA;&#xD;&#xA;But those things are provided by flash for a decade.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/HTML5" />
  <row Id="23370" PostHistoryTypeId="2" PostId="11024" RevisionGUID="f8ba1e14-722b-416c-8a25-41729ecdbb44" CreationDate="2011-04-12T18:26:13.123" UserId="6042" Text="I use integer vectors when my concern is in &quot;which bucket&quot; something occupies or &quot;from which bucket onward&quot; something occupies, and float vectors when my concern is &quot;where in space&quot; something &quot;is.&quot;&#xD;&#xA;&#xD;&#xA;Integers are much better than floats at bucketing things, and floats are much better at saying &quot;where&quot; something &quot;is&quot; in space.&#xD;&#xA;" />
  <row Id="23371" PostHistoryTypeId="4" PostId="11019" RevisionGUID="aa88d417-804a-45e9-b774-f3daf800dc9b" CreationDate="2011-04-12T18:32:59.350" UserId="450" Comment="offical upper/lower case spelling of ECMAScript" Text="Both Javascript and Flash are implementations of ECMAScript. Is there a fundamental technical reason for Flash being a more popular game platform?" />
  <row Id="23372" PostHistoryTypeId="24" PostId="11019" RevisionGUID="aa88d417-804a-45e9-b774-f3daf800dc9b" CreationDate="2011-04-12T18:32:59.350" Comment="Proposed by 450 approved by 14 edit id of 286" />
  <row Id="23373" PostHistoryTypeId="5" PostId="10895" RevisionGUID="0d682f72-90d2-4d76-b443-a1858a5c6628" CreationDate="2011-04-12T18:33:02.610" UserId="3588" Comment="Fixed tags, and rewrote the question for mostly grammar toning. ♪" Text="I'm working on simple platformer game. I've got already finished programming the main part of game, which is moving and collecting items. &#xD;&#xA;&#xD;&#xA;I want a unique game puzzle in every level, but I can't think up enough. I've been thinking for hours but I've got only few puzzles which are not very good. I would be grateful for any ideas or help you can provide." />
  <row Id="23374" PostHistoryTypeId="4" PostId="10895" RevisionGUID="0d682f72-90d2-4d76-b443-a1858a5c6628" CreationDate="2011-04-12T18:33:02.610" UserId="3588" Comment="Fixed tags, and rewrote the question for mostly grammar toning. ♪" Text="Simple puzzles in platform games" />
  <row Id="23375" PostHistoryTypeId="6" PostId="10895" RevisionGUID="0d682f72-90d2-4d76-b443-a1858a5c6628" CreationDate="2011-04-12T18:33:02.610" UserId="3588" Comment="Fixed tags, and rewrote the question for mostly grammar toning. ♪" Text="&lt;level-design&gt;&lt;puzzle&gt;&lt;platform-games&gt;" />
  <row Id="23376" PostHistoryTypeId="24" PostId="10895" RevisionGUID="0d682f72-90d2-4d76-b443-a1858a5c6628" CreationDate="2011-04-12T18:33:02.610" Comment="Proposed by 3588 approved by 14 edit id of 285" />
  <row Id="23377" PostHistoryTypeId="2" PostId="11025" RevisionGUID="99c21c80-eecc-4608-9dc3-ec17248f29d6" CreationDate="2011-04-12T18:37:48.750" UserId="6684" Text="Basically - You are asking question on how to decompose UI from game logic.&#xD;&#xA;&#xD;&#xA;To do that - You must abstract things. [Object-oriented programming][1] helps with that. More specifically - [MVC][2] pattern is what You are looking for. Combined with rich domain model (Your game mechanics) which is able to interpret so called [DSL][3] You could achieve Your aim.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5484593/what-might-be-a-good-object-oriented-programming-book-that-can-give-a-good-solid/5484769#5484769&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Domain-specific_language" />
  <row Id="23378" PostHistoryTypeId="2" PostId="11026" RevisionGUID="31225168-52a5-48ec-8ac0-1b80dd6cf3fd" CreationDate="2011-04-12T18:40:20.123" UserId="6683" Text="I'm building a game engine on the OpenTK framework that needs to support multiple players.&#xD;&#xA;&#xD;&#xA;How I have the basic framework established is that there is a Client and a Server.  The Server binds and listens on a specified port, and the Clients connect to the Server's IP Address and Port to make a TCP socket.  The server then transmits a `World` object to all clients as they connect.&#xD;&#xA;&#xD;&#xA;A `World` object contains all of the `Light` objects, `Surface` objects, `Mesh` objects and `Camera` objects.  With all of these objects, the `World` is responsible for rendering the game environment.&#xD;&#xA;&#xD;&#xA;My idea is that each `Camera` object has a Unique ID, a position (X,Y,Z), and 2 angle values representing Zenith and Azimuth.  When any of these values changes (only the camera can move at this point.  Basics first!) I want to Serialize and send the updated `Camera` object to the Server, which then transmits this object to all of the Clients.  The Client then deserializes the new `Camera` object, uses its Unique ID and updates the existing `Camera` object in the `World`.  Since the Camera object consists of only 5 double values (X,Y,Z,Az,Ze) it shouldn't be a lot of data being sent over the network, but my implementation seems to slow down the Game Screen significantly&#xD;&#xA;&#xD;&#xA;Is there a better model for Multiplayer network communication?  Is there any built in functionality in C# that handles this kind of communication?&#xD;&#xA;&#xD;&#xA;Basically, I just need to update all of the other Clients when one Client's `Camera` changes.&#xD;&#xA;&#xD;&#xA;Thanks for any help!" />
  <row Id="23379" PostHistoryTypeId="1" PostId="11026" RevisionGUID="31225168-52a5-48ec-8ac0-1b80dd6cf3fd" CreationDate="2011-04-12T18:40:20.123" UserId="6683" Text="Network communication via Sockets. Is there a better way?" />
  <row Id="23380" PostHistoryTypeId="3" PostId="11026" RevisionGUID="31225168-52a5-48ec-8ac0-1b80dd6cf3fd" CreationDate="2011-04-12T18:40:20.123" UserId="6683" Text="&lt;c#&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="23381" PostHistoryTypeId="5" PostId="11025" RevisionGUID="01cf3f2d-b691-4efc-8019-2647fd39bc91" CreationDate="2011-04-12T18:43:06.657" UserId="6684" Comment="added 55 characters in body" Text="Basically - You are asking question on how to decompose UI from game logic.&#xD;&#xA;&#xD;&#xA;To do that - You must abstract things. [Object-oriented programming][1] helps with that. More specifically - [MVC][2] pattern is what You are looking for. Combined with rich [domain model][3] (Your game mechanics) which is able to interpret so called [DSL][4] You could achieve Your aim.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5484593/what-might-be-a-good-object-oriented-programming-book-that-can-give-a-good-solid/5484769#5484769&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Domain_model&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Domain-specific_language" />
  <row Id="23382" PostHistoryTypeId="2" PostId="11027" RevisionGUID="3ad9e057-af0d-4202-9a9c-844159317257" CreationDate="2011-04-12T19:03:53.877" UserId="6214" Text="The biggest reason is because ActionScript contends only with the version of Flash you're using. You can reach a wide audience fairly quick with ActionScript in Flash because of the market penetration of some of the most recent versions of Flash (the adoption rate is quick). Now think about JavaScript; it is not a single implementation of ECMAScript, but several interpretations of the ECMAScript standard, which all depend not only on the browser, but browser version. Adoption rate for the updated browsers for a general audience (think IE) is very slow. It just makes more sense to choose Flash (or even Java) because it is more portable." />
  <row Id="23383" PostHistoryTypeId="5" PostId="10898" RevisionGUID="19278b54-1613-4567-8ca4-637a085b9f41" CreationDate="2011-04-12T19:04:23.990" UserId="3794" Comment="added 55 characters in body; added 6 characters in body" Text="Neat idea for the game. The problem is that light really doesn't look like this. Light decay is NOT gausian :). That's for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it might sound.&#xD;&#xA;&#xD;&#xA;I have created this in [our engine][1] for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is caused by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usualy used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    &#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb = (1 - color.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        color.a = (1 - color.a) * (1 - opacity); //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoint += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][3] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][4] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;Improvement: Adding colors to lights and perlin noise to the volume to look more natural (left without perlin|right with perlin)&#xD;&#xA;&#xD;&#xA;![enter image description here][5]![enter image description here][6]  &#xD;&#xA;(hmm those gifs are too low quality that there is no significant difference).&#xD;&#xA;&#xD;&#xA;**edit (some performance notes):**&#xD;&#xA;it can be done as one pass per light, which is usefull if lights has lots of aditional textures (light color - projective texturing, intensity curves etc.). But this is frame rate killer, it can (and should) be done in one pass for all lights if you have enough texture units available (i think you have in your game). Than it can have about 45-60fps i hope. &#xD;&#xA;&#xD;&#xA;Sampling doesn't have to be linear. You can make sampling logartmic (or similar function). &#xD;&#xA;&#xD;&#xA;    makeEveryStepALittleBigger = 1.05;&#xD;&#xA;    samplePoint += direction * step;&#xD;&#xA;    step *= makeEveryStepALittleBigger; //this should be actualy based on camera FOV&#xD;&#xA;&#xD;&#xA;This however destroy physical correctness and &quot;opacity correction&quot; has to be done. Which is: &#xD;&#xA;&#xD;&#xA;    curentAlpha = 1 - pow((1 - opacity), delta);&#xD;&#xA;&#xD;&#xA;where delta is difference between step1 and step2.&#xD;&#xA;&#xD;&#xA;And if you dont mind little noise, you can add depth jittering which allows you to use much lower number of samples (that is pretty good and easier solution).&#xD;&#xA;&#xD;&#xA;*That was fun...*&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://furryball.aaa-studio.eu/&#xD;&#xA;  [2]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [3]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [4]: http://www.real-time-volume-graphics.org/&#xD;&#xA;  [5]: http://i.stack.imgur.com/Ce68m.gif&#xD;&#xA;  [6]: http://i.stack.imgur.com/bwi7r.gif" />
  <row Id="23384" PostHistoryTypeId="2" PostId="11028" RevisionGUID="26cb0f71-30d1-46f0-93fb-99201f0cf8d8" CreationDate="2011-04-12T19:15:38.827" UserId="1119" Text="Sockets isn't the problem. That's just how TCP/IP networking works. Two things could be wrong. How you are using them and what you are sending. Serializing a class and sending it and de-serializing seems huge for a game. Just send something like CBIXYZCE as in CB for camera begin, I for identifier, x coord, y coord, z coord, and CE for camera end. &#xD;&#xA;&#xD;&#xA;When it comes to netowkrign be as terse as possible.&#xD;&#xA;&#xD;&#xA;infact my example may bee too big. The camera class should exist on the server and you only pass what changes. Oh and use UDP" />
  <row Id="23385" PostHistoryTypeId="2" PostId="11029" RevisionGUID="f9356a19-25a8-4961-af6d-cf20f1bdf430" CreationDate="2011-04-12T20:09:41.560" UserId="6042" Text="Your problem is that your ambient light is a constant color. In reality ambient light tends to be bright from the top and dark from the bottom, because light typically comes from above.&#xD;&#xA;&#xD;&#xA;There is much you can do to fix this. At the very least, you should have a &quot;top ambient color&quot;, &quot;bottom ambient color&quot;, and &quot;top ambient direction&quot; vertex shader constants. &#xD;&#xA;&#xD;&#xA;In your vertex shader, take the dot product of the &quot;top ambient direction&quot; and the vertex normal, and use the result to lerp between the &quot;top ambient color&quot; and &quot;bottom ambient color:&quot;&#xD;&#xA;&#xD;&#xA;    float value = dot( vertex_normal, top_ambient_direction ) * 0.5 + 0.5;&#xD;&#xA;    ambient_color = lerp( bottom_ambient_color, top_ambient_color, value );&#xD;&#xA;&#xD;&#xA;That is one of the simpler ways to make ambient look better, and was used often in PS2 and XBOX1 games. Contemporary games go further by using an &quot;ambient cubemap&quot; or &quot;ambient spherical harmonic coefficients.&quot;" />
  <row Id="23386" PostHistoryTypeId="25" PostId="11026" RevisionGUID="e4fd702c-679a-42b5-b74a-ae754139e97e" CreationDate="2011-04-12T21:09:27.173" Comment="http://twitter.com/#!/StackGameDev/status/57913240730079232" />
  <row Id="23387" PostHistoryTypeId="2" PostId="11030" RevisionGUID="06288c5f-897c-49a7-a04b-697ec130ed25" CreationDate="2011-04-12T21:13:32.027" UserId="5661" Text="I would have a look at a framework like [GeekGameBoard][1].  Once you figure out how to write your code, you can quickly implement a new board game.  The library abstracts a lot of the mechanics, allowing you to simply write the rules for which piece moves where, does it capture, etc.  I was able to prototype a brand new board game from start to finish in about an hour (the game wasn't that much fun...).&#xD;&#xA;&#xD;&#xA;For other types of games, you would need to do similar up-front work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/mac/#samplecode/GeekGameBoard/Introduction/Intro.html" />
  <row Id="23388" PostHistoryTypeId="2" PostId="11031" RevisionGUID="854b6984-edf7-41fe-8466-54beb29cf0f2" CreationDate="2011-04-12T21:20:51.963" UserId="1163" Text="I think this is a lot to do with tooling and marketing. &#xD;&#xA;&#xD;&#xA;Most people back in the early AS2 and even AS1 days of Flash, were introduced via the Flash IDE. This was a great tool, were you could draw or import graphics, and add scripts very easily to get things happening very quickly. Macromedia (now Adobe) owes a lot of it popularity to this easy, graphics based entry point. There was not really much else out there that was even close (well, besides Director. Which I still love btw).&#xD;&#xA;&#xD;&#xA;So Flash became a popular game creation tool before ActionScript was popular. ActionScript just provided a way to add the interactivity. The IDE is what really made it popular.&#xD;&#xA;&#xD;&#xA;Things are different these days, at the platform has matured into many different part. It is now quite common to make Flash games without even touching the Flash IDE." />
  <row Id="23389" PostHistoryTypeId="2" PostId="11032" RevisionGUID="cbbeee8d-1bdf-46f4-a7a4-bd70441cc6b2" CreationDate="2011-04-12T22:02:32.130" UserId="6588" Text="The semantic quibble Gregory made in his comment gets at the root of the issue here. Flash is a very established gaming platform because of the combination of ActionScript 3 and a host of powerful multimedia capabilities. While JavaScript was always just as good of a language, only recently has it been coupled with the powerful multimedia capabilities of HTML5.&#xD;&#xA;&#xD;&#xA;As others are pointing out, you can compare ActionScript to JavaScript, and you can compare Flash to HTML 5, but comparing Flash to JavaScript is like saying &quot;Which is better, Linux or C#?&quot;" />
  <row Id="23390" PostHistoryTypeId="2" PostId="11033" RevisionGUID="0a64c99f-54bb-4c29-8297-644e9a7ba677" CreationDate="2011-04-12T22:15:26.117" UserId="6588" Text="For no-code prototyping I recommend GameMaker on PC and GameSalad on Mac. Don't be fooled into thinking you're making the final result though; the only *released* game done with those tools that I enjoyed was Spelunky." />
  <row Id="23391" PostHistoryTypeId="5" PostId="6467" RevisionGUID="14723d93-cab9-42e7-8e58-4834256d313b" CreationDate="2011-04-12T22:43:21.847" UserId="1198" Comment="dropped greeting and signature" Text="Are there any known libs / frameworks / systems allowing to prototype a game based on a defined &quot;model&quot; of the game mechanics?&#xD;&#xA;&#xD;&#xA;Think all those match 3 games, i'm looking for &quot;something&quot; allowing to try out new rule sets in rapid prototypes where dealing with the grafix/updating the screen based on the state and input/output is only secondary and having something running and interactive is most important to validate an idea...&#xD;&#xA;&#xD;&#xA;Do such tools exist? What would be your take on this when asked to skip as much coding as possible? &#xD;&#xA;&#xD;&#xA;To clarify: nope I am NOT looking for any magic. What I am looking for are tools allowing to concentrate more on the &quot;logic&quot; of a game (atleast for simple games ala match 3) and not having to code all the screen/input/ui stuff, thus the &quot;model driven&quot; naming..." />
  <row Id="23392" PostHistoryTypeId="24" PostId="6467" RevisionGUID="14723d93-cab9-42e7-8e58-4834256d313b" CreationDate="2011-04-12T22:43:21.847" Comment="Proposed by 1198 approved by 51 edit id of 287" />
  <row Id="23393" PostHistoryTypeId="2" PostId="11034" RevisionGUID="83e815b9-48a8-46fc-b583-9f3951fdee12" CreationDate="2011-04-12T22:49:07.740" UserId="6244" Text="I've been messing with my game's network code recently (TCP/UDP sockets) and my game keeps shutting down with no exceptions being thrown at all.&#xD;&#xA;&#xD;&#xA;It runs fine until the disconnection of a client, so I already know that it has to be related to the network.&#xD;&#xA;&#xD;&#xA;My real problem is that no exception is thrown and the game silently exits on both the client and server sides. How's that even possible? What could end the runtime of an XNA game?" />
  <row Id="23394" PostHistoryTypeId="1" PostId="11034" RevisionGUID="83e815b9-48a8-46fc-b583-9f3951fdee12" CreationDate="2011-04-12T22:49:07.740" UserId="6244" Text="My XNA game shutdowns for no apparent reason" />
  <row Id="23395" PostHistoryTypeId="3" PostId="11034" RevisionGUID="83e815b9-48a8-46fc-b583-9f3951fdee12" CreationDate="2011-04-12T22:49:07.740" UserId="6244" Text="&lt;xna&gt;&lt;network&gt;" />
  <row Id="23396" PostHistoryTypeId="5" PostId="10928" RevisionGUID="4b6ab104-aa22-4bae-ad4f-e2292bf76a2a" CreationDate="2011-04-12T23:13:24.893" UserId="6384" Comment="added 410 characters in body" Text="Check out [here][1] and [here][2] for some related questions ans their corresponding answers.&#xD;&#xA;&#xD;&#xA;The biggest pain I'm told is setting up the virtual environment for leopard / snow leopard to run and facilitate. Honestly, I'd recommend just getting a Mac mini or the full MBP and devving on that. You'll save yourself a lot of pain and headache setting up the VM environment.&#xD;&#xA;&#xD;&#xA;But it's entirely possible, baring that you can get a 10.5 / 10.6 OS install. XCode won't really run on anything else. And I definitely wouldn't use the machine to build a distribution version for submission.&#xD;&#xA;&#xD;&#xA;Also, there's nothing to be pessimistic about! Learning a new language on a new environment is exciting (about as exciting as learnin' Zerg if you're a 'Toss player on SC2 as I tell one of my dev's). I'm simply recommending the best tool for the job (&quot;best&quot; being qualified as the one that'll get you started the quickest without any headache and fit in your monetary expenditures - time vs money that is.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/644225/iphone-development-on-hackintosh&#xD;&#xA;  [2]: http://stackoverflow.com/questions/535403/is-it-possible-to-develop-iphone-apps-with-a-hackintosh" />
  <row Id="23397" PostHistoryTypeId="5" PostId="11021" RevisionGUID="22e31903-fc9a-4e45-9da2-710cd9ad5274" CreationDate="2011-04-12T23:21:47.977" UserId="4443" Comment="added in more info asked for in the comments." Text="TCP and UDP would be the two choices for this and you will want to go with UDP.&#xD;&#xA;&#xD;&#xA;As for the Why part of your question, TCP is a 'guaranteed delivery' system, but its slow. For video games and where up to date information is a priority over ensuring the data gets there, UDP fits the bill. You will generally want to have an incremented Packet ID so you can ignore outdated packets to take care of them showing up in the wrong order, but this will suit your needs.&#xD;&#xA;&#xD;&#xA;EDIT: A bit more information on the incremented packet IDs. With TCP, you are not only guaranteed that the data is sent, but that it is sent in the right order. It will not try to send a new piece of data along the same TCP connection until the current one has been confirmed to be sent.&#xD;&#xA;&#xD;&#xA;UDP does not guarantee delivery order. So if you have an incrementing ID in the packet data and you keep track of that value, you will know that incoming data with an ID lower than what you have already processed is old data. In that way you can safely ignore that packet and just wait for the next one. &#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="23398" PostHistoryTypeId="2" PostId="11035" RevisionGUID="1b9f1f9d-08b4-4ef2-a22a-93e73b4840b0" CreationDate="2011-04-12T23:49:04.337" UserId="4443" Text="With out knowing more I can not give you more detailed information but here are some things to look for:&#xD;&#xA;&#xD;&#xA;Look for critical failures you may be handling in your code silently that could cause this.. and do not rule out that that is what is happening in the XNA code. This could be anything that you would assume would never happen but put in for good code theory.&#xD;&#xA;&#xD;&#xA;Areas to look for are where you are access the data of the other user. Maybe a system is still tracking the remote user on a Mini map that is no longer there or the like. Pretty much any sort of data that you are guaranteed is there when not dealing with remote players but might disappear when dealing with remote players.&#xD;&#xA;&#xD;&#xA;I will update if you get more specifics.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="23399" PostHistoryTypeId="25" PostId="11019" RevisionGUID="d8c83927-923e-4587-9062-115c2b65dcbf" CreationDate="2011-04-13T00:09:27.760" Comment="http://twitter.com/#!/StackGameDev/status/57958542518390784" />
  <row Id="23400" PostHistoryTypeId="2" PostId="11036" RevisionGUID="b6e90a14-d004-45e2-bce0-4c8338a57bac" CreationDate="2011-04-13T00:09:58.727" UserId="1021" Text="I just want to run any Box2D &quot;Hello World&quot; or test apps.  I've downloaded the source twice (zip file the first time and via svn the second time), followed the build instructions (do stuff w/ cmake, &quot;make&quot;, &quot;make install&quot; etc) and don't know where to go from there.  **How do I run the test apps or Hello World apps that come w/ Box2D on my iPhone (or simulator)?**" />
  <row Id="23401" PostHistoryTypeId="1" PostId="11036" RevisionGUID="b6e90a14-d004-45e2-bce0-4c8338a57bac" CreationDate="2011-04-13T00:09:58.727" UserId="1021" Text="Getting started with Box2D for iOS" />
  <row Id="23402" PostHistoryTypeId="3" PostId="11036" RevisionGUID="b6e90a14-d004-45e2-bce0-4c8338a57bac" CreationDate="2011-04-13T00:09:58.727" UserId="1021" Text="&lt;iphone&gt;&lt;box2d&gt;" />
  <row Id="23403" PostHistoryTypeId="5" PostId="11031" RevisionGUID="06fd5a4b-bd4f-4360-b27a-ae3287c090de" CreationDate="2011-04-13T00:12:13.283" UserId="1163" Comment="added 41 characters in body" Text="I think this is a lot to do with tooling and marketing.&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Most people back in the early AS2 and even AS1 days of Flash, were introduced via the Flash IDE. This was a great tool, were you could draw or import graphics, and add scripts very easily to get things happening very quickly. Macromedia (now Adobe) owes a lot of it popularity to this easy, graphics based entry point. There was not really much else out there that was even close (well, besides Director. Which I still love btw).&#xD;&#xA;&#xD;&#xA;So Flash became a popular game creation tool before ActionScript was popular. ActionScript just provided a way to add the interactivity. The IDE is what really made it popular.&#xD;&#xA;&#xD;&#xA;Things are different these days, at the platform has matured into many different part. It is now quite common to make Flash games without even touching the Flash IDE." />
  <row Id="23404" PostHistoryTypeId="4" PostId="11034" RevisionGUID="28877acb-02a8-4f74-a3d2-31fcb2d4b173" CreationDate="2011-04-13T00:29:48.090" UserId="6244" Comment="edited title" Text="How could an XNA game close with no exception being thrown?" />
  <row Id="23405" PostHistoryTypeId="5" PostId="11019" RevisionGUID="ee390312-eb0e-44a9-b81d-ab0bb6a7ac32" CreationDate="2011-04-13T00:31:25.233" UserId="2913" Comment="Fixed question title by removing &quot;exposition&quot; and adding it to body. Formatted question body accordingly." Text="Both Javascript and AS3 are implementations of ECMAScript.&#xD;&#xA;&#xD;&#xA;Is there a fundamental technical reason for Flash being so much more prevalent as a game-publishing platform, when compared to Javascript?" />
  <row Id="23406" PostHistoryTypeId="4" PostId="11019" RevisionGUID="ee390312-eb0e-44a9-b81d-ab0bb6a7ac32" CreationDate="2011-04-13T00:31:25.233" UserId="2913" Comment="Fixed question title by removing &quot;exposition&quot; and adding it to body. Formatted question body accordingly." Text="Is there a fundamental technical reason for Flash being a more popular game platform than JavaScript?" />
  <row Id="23407" PostHistoryTypeId="24" PostId="11019" RevisionGUID="ee390312-eb0e-44a9-b81d-ab0bb6a7ac32" CreationDate="2011-04-13T00:31:25.233" Comment="Proposed by 2913 approved by 51 edit id of 288" />
  <row Id="23408" PostHistoryTypeId="2" PostId="11037" RevisionGUID="bbad7913-9dc0-4125-9692-f7695be24172" CreationDate="2011-04-13T01:41:08.067" UserId="3403" Text="I'm looking to create a FoV implementation and I was wondering which algorithm is faster - raycasting or shadowcasting?" />
  <row Id="23409" PostHistoryTypeId="1" PostId="11037" RevisionGUID="bbad7913-9dc0-4125-9692-f7695be24172" CreationDate="2011-04-13T01:41:08.067" UserId="3403" Text="Which is faster: raycasting or shadowcasting?" />
  <row Id="23410" PostHistoryTypeId="3" PostId="11037" RevisionGUID="bbad7913-9dc0-4125-9692-f7695be24172" CreationDate="2011-04-13T01:41:08.067" UserId="3403" Text="&lt;algorithm&gt;" />
  <row Id="23411" PostHistoryTypeId="2" PostId="11038" RevisionGUID="fb19008c-474a-4924-a39a-6a5375ee9605" CreationDate="2011-04-13T01:41:41.803" UserId="1021" Text="Ok finally got something to work (this was helpful:  [http://box2d.org/forum/viewtopic.php?f=18&amp;t=6580&amp;p=29800&amp;hilit=cmake#p29800][1])&#xD;&#xA;&#xD;&#xA;Anyways here's what I did:&#xD;&#xA;&#xD;&#xA; 1. get Box2D source like this: &quot;svn checkout http://box2d.googlecode.com/svn/trunk/&quot;&#xD;&#xA; 2. In the Terminal navigate to &quot;Contributions/Platforms/iPhone&quot;&#xD;&#xA; 3. In the Terminal do &quot;cmake -G Xcode&quot;&#xD;&#xA; 4. Double click on &quot;iPhoneTestbed.xcodeproj&quot; in the Finder&#xD;&#xA;&#xD;&#xA;Now this Xcode project actually builds and will run in the simulator.  There's some cool demos of Box2D physics.  Hope this is helpful :-)&#xD;&#xA;&#xD;&#xA;  [1]: http://box2d.org/forum/viewtopic.php?f=18&amp;t=6580&amp;p=29800&amp;hilit=cmake#p29800" />
  <row Id="23412" PostHistoryTypeId="2" PostId="11039" RevisionGUID="390fc87d-3db2-4043-8c31-41929eb9282f" CreationDate="2011-04-13T01:54:04.953" UserId="6690" Text="As with everyone else, I'm going to assume you mean Flash vs what's collectively being called the HTML5 technologies.&#xD;&#xA;&#xD;&#xA;I believe Flash is still more popular because:&#xD;&#xA;&#xD;&#xA;* Momentum. Plenty of people who are interested in producing Flash type games are already well versed in Flash. People who are aspiring to create that sort of game are learning from them. Along with this comes a reluctance to switch for what seems like the sake of switching.&#xD;&#xA;&#xD;&#xA;* Environment. The Flash designer is an integrated package that deals with asset management, authoring of data like animation curves, editing scripts, compilation, optimization and packaging, all with relatively low friction. There is no real competing HTML5 based environment to work in. With HTML5 you're still looking at reinventing a lot of the wheel just to get started.&#xD;&#xA;&#xD;&#xA;* Robustness. HTML5, in its current state, is relatively new and still quite janky for game applications. The rules are constantly changing, which is exciting but not conducive to actually finishing a project. Flash, for better or worse, works as advertised. Its self contained graphics  engine is several generations in, with support for all manner of advanced features, and should behave identically in all supported environments. HTML5 is a &lt;sic&gt; blank canvas still, and one that will behave differently depending on how it's viewed.&#xD;&#xA;&#xD;&#xA;* Reference materials. This goes hand in hand with the environment and momentum reasons above: there's plenty of stuff to learn from if you're making a flash game; years of articles, discussions and postmortems. There really isn't that much stuff that talks about HTML5 yet." />
  <row Id="23413" PostHistoryTypeId="2" PostId="11040" RevisionGUID="d928cf53-0593-47dd-aa19-396c982425c9" CreationDate="2011-04-13T01:59:26.447" UserId="6244" Text="I just found the answer to my problem:&#xD;&#xA;&#xD;&#xA;The reason why the exception wouldn't show off is because it was actually thrown on a different thread. So removing my existing try/catch blocks in the main thread was of no help to show the exception. Adding a try/catch block to the Main method (to catch anything thrown in the entire application) wouldn't help either, since exception thrown on different threads don't fall in the catch blocks of the main thread.&#xD;&#xA;&#xD;&#xA;My guess was correct: the problem came from the async TCP networking, which automatically generates and uses underlying threads. The exception was thrown whenever the client forcibly closed the TCP socket. Since the exception was on another thread, it silently forced the XNA runtime to stop.&#xD;&#xA;&#xD;&#xA;    // Unable to read data from the transport connection: An existing connection was&#xD;&#xA;    // forcibly closed by the remote host.&#xD;&#xA;&#xD;&#xA;    // at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)&#xD;&#xA;" />
  <row Id="23414" PostHistoryTypeId="2" PostId="11041" RevisionGUID="b03bba53-7c17-44d3-a364-314d47b8849f" CreationDate="2011-04-13T02:07:10.853" UserId="6690" Text="Y up and Z up (where the respective axis is considered the upright direction in 3D) are just conventions. Modelling packages often have toggles to switch between them.&#xD;&#xA;&#xD;&#xA;You should arrange your game around whatever makes sense to you. You can always accept incoming data in any coordinate system and convert it internally to match what the engine is doing.&#xD;&#xA;&#xD;&#xA;If your game is truly 2D in nature, as in you plan to do all your game logic in 2D but just draw a 3D representation of the action, then you might want to consider working entirely with a 2D coordinate data structure until you come to your drawing code, where you promote it to 3D to pass to the graphics engine. You'll save memory, gain performance, and get to work in your familiar XY space.&#xD;&#xA;&#xD;&#xA;If your game is just &quot;conceptually&quot; 2D, but you're actually still performing calculations in 3D for whatever reason (say you had an undulating terrain and projectiles that actually travel in 3D even though your actors cant), then I suggest deciding on a drawing coordinate system (very likely the popular Y up), and just getting used to writing your &quot;2D&quot; logic on the appropriate matching plane (the XZ, assuming the aforementioned Y up).&#xD;&#xA;&#xD;&#xA;Maintaining a code base with two different overlapping 3D coordinate systems will get unbearably messy and annoying with no recourse, while just learning to think of the floor as XZ will snap into focus within hours." />
  <row Id="23415" PostHistoryTypeId="25" PostId="11034" RevisionGUID="9b644feb-0899-4375-b574-d91cafeeaac8" CreationDate="2011-04-13T03:09:27.810" Comment="http://twitter.com/#!/StackGameDev/status/58003840443756544" />
  <row Id="23417" PostHistoryTypeId="2" PostId="11043" RevisionGUID="ea588b40-275c-467a-afd0-f081d4af9222" CreationDate="2011-04-13T04:52:42.563" UserId="3198" Text="It may not be exactly what you want, but it's worth mentioning that [Cocos2D][1] works very well with Box2D, and has an example that comes with it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/" />
  <row Id="23418" PostHistoryTypeId="2" PostId="11044" RevisionGUID="c461e1c3-daac-4389-8014-2d8296d8ec37" CreationDate="2011-04-13T04:58:50.810" UserId="3198" Text="You might pick a pick you like, and figure out how you could improve it. Or take a game that you thought had potential but didn't deliver, and figure out what could have saved it. In the process, you may come up with an idea that you like.&#xD;&#xA;" />
  <row Id="23419" PostHistoryTypeId="2" PostId="11045" RevisionGUID="c2193c9a-d8cc-4eb7-83c7-868aed9729f5" CreationDate="2011-04-13T05:00:51.730" UserId="6592" Text="After some profiling, I've determined that one of my most expensive functions involves drawing text. As a solution, I'd like to implement a LRU type of cache that will &quot;remember&quot; the vertices, tex coords (etc) for a given string. This is particularly complicated because some of the resources involved reside in VRAM (most do, actually; I take a given string and convert it into a long sequence of vertices / tex coords / indices), while some reside in plain RAM.&#xD;&#xA;&#xD;&#xA;If I knew what my limits were (in both respects) I could write a decent LRU cache system and probably buy myself a substantial performance gain. The primary target for this app is the Android platform, and as I understand it, most such devices share RAM with the GPU.&#xD;&#xA;&#xD;&#xA;I'd appreciate any answers to this, whether they directly answer my question or not. Thanks!" />
  <row Id="23420" PostHistoryTypeId="1" PostId="11045" RevisionGUID="c2193c9a-d8cc-4eb7-83c7-868aed9729f5" CreationDate="2011-04-13T05:00:51.730" UserId="6592" Text="How can I determine a budget for RAM used (LRU involving VRAM, in particular)" />
  <row Id="23421" PostHistoryTypeId="3" PostId="11045" RevisionGUID="c2193c9a-d8cc-4eb7-83c7-868aed9729f5" CreationDate="2011-04-13T05:00:51.730" UserId="6592" Text="&lt;opengl&gt;&lt;android&gt;&lt;resource-management&gt;" />
  <row Id="23423" PostHistoryTypeId="5" PostId="11045" RevisionGUID="a220fec3-8177-47c5-82ef-04b19c243352" CreationDate="2011-04-13T05:17:00.033" UserId="1198" Comment="removed signature" Text="After some profiling, I've determined that one of my most expensive functions involves drawing text. As a solution, I'd like to implement a LRU type of cache that will &quot;remember&quot; the vertices, tex coords (etc) for a given string. This is particularly complicated because some of the resources involved reside in VRAM (most do, actually; I take a given string and convert it into a long sequence of vertices / tex coords / indices), while some reside in plain RAM.&#xD;&#xA;&#xD;&#xA;If I knew what my limits were (in both respects) I could write a decent LRU cache system and probably buy myself a substantial performance gain. The primary target for this app is the Android platform, and as I understand it, most such devices share RAM with the GPU.&#xD;&#xA;&#xD;&#xA;I'd appreciate any answers to this, whether they directly answer my question or not." />
  <row Id="23424" PostHistoryTypeId="24" PostId="11045" RevisionGUID="a220fec3-8177-47c5-82ef-04b19c243352" CreationDate="2011-04-13T05:17:00.033" Comment="Proposed by 1198 approved by 51 edit id of 289" />
  <row Id="23428" PostHistoryTypeId="2" PostId="11047" RevisionGUID="51d4f2ad-0788-40cd-b149-3930eb8ea444" CreationDate="2011-04-13T06:04:10.980" UserId="2158" Text="There are two popular methods for generating terrain height maps.&#xD;&#xA;&#xD;&#xA; - [Diamond-square algorithm][1]&#xD;&#xA; - [Perlin noise][2], also check [this tutorial][3]&#xD;&#xA;&#xD;&#xA;Some answers given here are already based on the Diamond-square algorithm, but knowing the name makes it easier to search for more information. Perlin noise has other uses as well, so it's good to check it anyway. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Diamond-square_algorithm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Perlin_noise&#xD;&#xA;  [3]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm" />
  <row Id="23429" PostHistoryTypeId="25" PostId="11045" RevisionGUID="b587f673-fbcc-4356-871a-af4ce605d540" CreationDate="2011-04-13T06:09:27.540" Comment="http://twitter.com/#!/StackGameDev/status/58049138167783424" />
  <row Id="23430" PostHistoryTypeId="2" PostId="11048" RevisionGUID="30a5abf8-3d42-4b01-9428-fdd8a34cca97" CreationDate="2011-04-13T06:25:28.243" UserId="6691" Text="I am trying to implement some positive evaluation into my game. Let me explain.&#xD;&#xA;&#xD;&#xA;I have a series (anywhere from 5 to 25 (might vary)) of circles (three sizes, big medium small). And each player starts with a main circle which gains 1 every turn (like risk the circles gain at different speeds, the big one gains the fastest and the small one gains the slowest). You can use these numbers to take over other circles, if the &quot;enemy&quot; is on this circle it does a risk thing (you fight to see who takes it over, who ever has more wins most of the time, I'm not getting into this logic as it is rather irreverent).&#xD;&#xA;&#xD;&#xA;So this is a very basic overview of what occurs, now what I need some help with is how I can create an AI which will look at all available (and taken) circles and determine where it wants to move to. There would be circles closes to it, and circles in the enemies area and circles available and circles taken over. And it would need to determine where to move it's forces too next, and so on and so forth.&#xD;&#xA;&#xD;&#xA;So after some research I read a lot about Positive Evaluation, which it takes all possible moves and determines the best one.&#xD;&#xA;&#xD;&#xA;So I am wondering if anyone could help me out or give me some direction as to where to go from here. I think what I need to do is take all the circles with any forces on them, throw them into a table/array with the cords of each circle and determine which would be best, then I would need to determine how many forces I want to send and where from.&#xD;&#xA;&#xD;&#xA;Help!&#xD;&#xA;" />
  <row Id="23431" PostHistoryTypeId="1" PostId="11048" RevisionGUID="30a5abf8-3d42-4b01-9428-fdd8a34cca97" CreationDate="2011-04-13T06:25:28.243" UserId="6691" Text="Positive Evaluation Function - Territory AI Help" />
  <row Id="23432" PostHistoryTypeId="3" PostId="11048" RevisionGUID="30a5abf8-3d42-4b01-9428-fdd8a34cca97" CreationDate="2011-04-13T06:25:28.243" UserId="6691" Text="&lt;ai&gt;" />
  <row Id="23433" PostHistoryTypeId="2" PostId="11049" RevisionGUID="ff352266-14b4-49ee-b121-b3865f8a6a85" CreationDate="2011-04-13T07:30:49.403" UserId="259" Text="I don't think I quite follow your explaination, but if I had to write an AI that evaluated multiple targets I'd do something like this:&#xD;&#xA;&#xD;&#xA;* create a list of all possible targets&#xD;&#xA;* pass each target to multiple behaviours, each which may return a score&#xD;&#xA;  * for instance a &quot;weak target&quot; behaviour might return a high score if the target is not very well defended&#xD;&#xA;  * a &quot;supply chain&quot; behaviour might reward a high score to targets that are vital links in the opponent's infrastructure&#xD;&#xA;* add all the scores together&#xD;&#xA;* attack the target with the highest score&#xD;&#xA;&#xD;&#xA;This approach is modular and extendable. You may need to put some work into making it easy for you to tweak at run time the numerous constants you will invariably use in each behaviour.&#xD;&#xA;&#xD;&#xA;For bonus brownie points, you could return multiple scores in multiple categories (eg seperate scores for how much of a defensive attack this might be, and how much of an aggressive one). Then you could define a personality of your AI as a series of multipliers to these scores (an aggressive AI might have personality [0.5, 1.5] for instance, to boost aggressive targets and relatively ignore defensive targets). You pick the target with the highest of any type of score.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23434" PostHistoryTypeId="5" PostId="11048" RevisionGUID="6b69f669-143b-4363-951a-bd3a265e70d2" CreationDate="2011-04-13T07:48:55.317" UserId="6691" Comment="added 509 characters in body" Text="I am trying to implement some positive evaluation into my game. Let me explain.&#xD;&#xA;&#xD;&#xA;I have a series (anywhere from 5 to 25 (might vary)) of circles (three sizes, big medium small). And each player starts with a main circle which gains 1 every turn (like risk the circles gain at different speeds, the big one gains the fastest and the small one gains the slowest). You can use these numbers to take over other circles, if the &quot;enemy&quot; is on this circle it does a risk thing (you fight to see who takes it over, who ever has more wins most of the time, I'm not getting into this logic as it is rather irreverent).&#xD;&#xA;&#xD;&#xA;So this is a very basic overview of what occurs, now what I need some help with is how I can create an AI which will look at all available (and taken) circles and determine where it wants to move to. There would be circles closes to it, and circles in the enemies area and circles available and circles taken over. And it would need to determine where to move it's forces too next, and so on and so forth.&#xD;&#xA;&#xD;&#xA;So after some research I read a lot about Positive Evaluation, which it takes all possible moves and determines the best one.&#xD;&#xA;&#xD;&#xA;So I am wondering if anyone could help me out or give me some direction as to where to go from here. I think what I need to do is take all the circles with any forces on them, throw them into a table/array with the cords of each circle and determine which would be best, then I would need to determine how many forces I want to send and where from.&#xD;&#xA;&#xD;&#xA;Help!&#xD;&#xA;&#xD;&#xA;ADDITION:&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;Allow me to explain a bit, http://imm.io/4Xwy see that diagram lets assume the circles are sections of forces, and you gain a new force each &quot;time interval&quot; and lets say I want to take all my forces (I'm pink) the circle directly below me and capture it, well the AI would need look at all available circles and pick for example the big green on in the top right (since big would make more troops and its close to the &quot;main&quot;). I'm assuming what you said would still work? Weighted options?&#xD;&#xA;" />
  <row Id="23435" PostHistoryTypeId="2" PostId="11050" RevisionGUID="177cb159-afc7-441b-9f41-e656c2867ba6" CreationDate="2011-04-13T08:04:01.077" UserId="5824" Text="Instead of determining a memory budget by guessing, I'd suggest you make the size of the cache configurable and use profiling to determine the best size for you.&#xD;&#xA;&#xD;&#xA;Also you shouldn't need more than one index buffer - you just need one which will handle the maximum length string. You should be able to use less than the whole index buffer for shorter strings by passing the appropriate parameters to your draw call." />
  <row Id="23436" PostHistoryTypeId="2" PostId="11051" RevisionGUID="2b347875-f15c-46e1-93c2-d79bfbeac667" CreationDate="2011-04-13T08:05:08.300" UserId="3361" Text="I have a tile based 2D engine where the projection matrix is an orthographic view of the world without any scaling applied.  Thus: one pixel texture is drawn on the screen in the same size.&#xD;&#xA;&#xD;&#xA;That all works well and looks nice but if the camera makes a sub-pixel movement small lines appear between the tiles.  I can tell you in advance what does not fix the problem:&#xD;&#xA;&#xD;&#xA;* `GL_NEAREST` texture interpolation&#xD;&#xA;* `GL_CLAMP_TO_EDGE`&#xD;&#xA;&#xD;&#xA;What does “fix” the problem is anchoring the camera to the nearest pixel instead of doing a sub-pixel translation.  I can live with that, but the camera movement becomes jerky.  Any ideas how to fix that problem without resorting to the rounding trick I do currently?" />
  <row Id="23437" PostHistoryTypeId="1" PostId="11051" RevisionGUID="2b347875-f15c-46e1-93c2-d79bfbeac667" CreationDate="2011-04-13T08:05:08.300" UserId="3361" Text="OpenGL 2D Rasterization Sub-Pixel Translations" />
  <row Id="23438" PostHistoryTypeId="3" PostId="11051" RevisionGUID="2b347875-f15c-46e1-93c2-d79bfbeac667" CreationDate="2011-04-13T08:05:08.300" UserId="3361" Text="&lt;opengl&gt;&lt;2d&gt;" />
  <row Id="23439" PostHistoryTypeId="2" PostId="11052" RevisionGUID="8f434587-6331-44da-9aef-2e1b6aeed3e6" CreationDate="2011-04-13T08:05:30.147" UserId="744" Text="Having dealt with text rendering a lot, I have to say all the string LRU systems I've seen end up being, at best, a wash for performance, and at worse an enormous source of bugs and code complication. The only time it makes sense is if all your text is static, and that's rarely the case in any game these days.&#xD;&#xA;&#xD;&#xA;Do you know what's actually taking the time? Is it...&#xD;&#xA;&#xD;&#xA; * Binding the font textures? If so, make sure all your characters are on the same texture, and make sure you're sorting them correctly to avoid unnecessary binds.&#xD;&#xA; * Looking up the character data? What kind of data structure are you using? If it's not a hash table, it really should be. If it is, take a look at the load factor to make sure you're getting decent hashing.&#xD;&#xA; * Accessing the character data? Accessor methods are very slow on Android and discouraged for any performance-critical code. Use public members instead.&#xD;&#xA; * Calculating the vertices and copying them into the buffer? This might be an appropriate time to break out the NDK so you can do float crunching without the overhead of Dalvik." />
  <row Id="23440" PostHistoryTypeId="25" PostId="11051" RevisionGUID="f0189be9-bd8c-4c0e-809c-a38d37ef0fb9" CreationDate="2011-04-13T09:09:27.860" Comment="http://twitter.com/#!/StackGameDev/status/58094438555193344" />
  <row Id="23441" PostHistoryTypeId="5" PostId="11016" RevisionGUID="0819c521-4612-42b3-8816-f6065d145cfd" CreationDate="2011-04-13T10:50:47.380" UserId="6678" Comment=" Edited: how can a server take the initiative to send a message? What are the different methods to do this:  i.e. &quot;push&quot;, other,...; added 119 characters in body; edited tags; edited title" Text=" I have to design PONG game in android.There are 2 or n mobiles and  game server.Application is installed in mobile .In mobile1(M1) can see the movement of bat and ball of Mobile2(M2) an vice_versa.Suppose if M1 hits the ball,all the movements of the ball and bat of M1 can be seen in M2 Screen and viceversa. Now i want to know which protocol i should use and why. – &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edited:&#xD;&#xA;how can a server take the initiative to send a message? What are the different methods to do this:  i.e. &quot;push&quot;, other,..." />
  <row Id="23442" PostHistoryTypeId="4" PostId="11016" RevisionGUID="0819c521-4612-42b3-8816-f6065d145cfd" CreationDate="2011-04-13T10:50:47.380" UserId="6678" Comment=" Edited: how can a server take the initiative to send a message? What are the different methods to do this:  i.e. &quot;push&quot;, other,...; added 119 characters in body; edited tags; edited title" Text="Which protocol should i use for the game" />
  <row Id="23443" PostHistoryTypeId="6" PostId="11016" RevisionGUID="0819c521-4612-42b3-8816-f6065d145cfd" CreationDate="2011-04-13T10:50:47.380" UserId="6678" Comment=" Edited: how can a server take the initiative to send a message? What are the different methods to do this:  i.e. &quot;push&quot;, other,...; added 119 characters in body; edited tags; edited title" Text="&lt;game-design&gt;&lt;network&gt;&lt;mobile&gt;" />
  <row Id="23444" PostHistoryTypeId="8" PostId="11016" RevisionGUID="30839d99-84b4-4a96-ae81-4c4c03dfa7f4" CreationDate="2011-04-13T12:08:55.440" UserId="6678" Comment="Rollback to [0a3aac07-9452-4261-a78c-bcd78eead1fd]" Text="I have to design a Pong game for Android. There are multiple mobiles and a game server. Application is installed in mobile. Mobile 1 (M1) can see the movement of bat and ball of mobile 2 (M2) an vice-versa.&#xD;&#xA;&#xD;&#xA;Suppose if M1 hits the ball, all the movements of the ball and bat of M1 can be seen on M2's screen and vice-versa. Now I want to know which protocol I should use and why? " />
  <row Id="23445" PostHistoryTypeId="7" PostId="11016" RevisionGUID="30839d99-84b4-4a96-ae81-4c4c03dfa7f4" CreationDate="2011-04-13T12:08:55.440" UserId="6678" Comment="Rollback to [0a3aac07-9452-4261-a78c-bcd78eead1fd]" Text="Which protocol should I use for a networked Pong clone?" />
  <row Id="23446" PostHistoryTypeId="9" PostId="11016" RevisionGUID="30839d99-84b4-4a96-ae81-4c4c03dfa7f4" CreationDate="2011-04-13T12:08:55.440" UserId="6678" Comment="Rollback to [0a3aac07-9452-4261-a78c-bcd78eead1fd]" Text="&lt;network&gt;&lt;mobile&gt;" />
  <row Id="23447" PostHistoryTypeId="25" PostId="11048" RevisionGUID="e38037fd-34df-4cec-9cf7-36857b2340cb" CreationDate="2011-04-13T12:09:27.660" Comment="http://twitter.com/#!/StackGameDev/status/58139735029317632" />
  <row Id="23448" PostHistoryTypeId="5" PostId="11016" RevisionGUID="24174951-4b92-4a38-b639-59e439061df3" CreationDate="2011-04-13T12:10:51.447" UserId="6678" Comment="added 135 characters in body; edited tags" Text="I have to design a Pong game for Android. There are multiple mobiles and a game server. Application is installed in mobile. Mobile 1 (M1) can see the movement of bat and ball of mobile 2 (M2) an vice-versa.&#xD;&#xA;&#xD;&#xA;Suppose if M1 hits the ball, all the movements of the ball and bat of M1 can be seen on M2's screen and vice-versa. Now I want to know which protocol I should use and why? &#xD;&#xA;&#xD;&#xA;Edited:&#xD;&#xA;how can a server take the initiative to send a message? What are the different methods to do this:  i.e. &quot;push&quot;, other,..." />
  <row Id="23449" PostHistoryTypeId="6" PostId="11016" RevisionGUID="24174951-4b92-4a38-b639-59e439061df3" CreationDate="2011-04-13T12:10:51.447" UserId="6678" Comment="added 135 characters in body; edited tags" Text="&lt;network&gt;&lt;server&gt;&lt;mobile&gt;" />
  <row Id="23450" PostHistoryTypeId="2" PostId="11053" RevisionGUID="b342b6bd-2ebf-4998-9ee3-fe53e7cd180c" CreationDate="2011-04-13T12:25:25.783" UserId="6178" Text="I'm using Windows 7 and most people in the group of this specific OpenGL project is too, there's only one member on Windows XP. We are all using Visual Studio 2010 though. I don't know if the OpenGL headers come with VS or with Windows but I would assume it's VS. And since we are all using the same VS version, albeit not the same SKU, I'm also assuming we all have the same OpenGL headers and version running on our systems.&#xD;&#xA;&#xD;&#xA;That said, the version installed on my system (note that I haven't installed anything OpenGL related) is 2.1 and it does support `GL_GENERATE_MIPMAP`, I don't need to resort ot the SGIS extension.&#xD;&#xA;&#xD;&#xA;However, the Windows headers only support version 1.1. To work around that, I'm using GLEW. I also noticed that both `GL_GENERATE_MIPMAP_SGIS` and `GL_GENERATE_MIPMAP` have the same exact values defined.&#xD;&#xA;&#xD;&#xA;So my question is, should I do the following on my texture loading routine:&#xD;&#xA;&#xD;&#xA;    if(GLEW_SGIS_generate_mipmap) {&#xD;&#xA;    	glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);&#xD;&#xA;    	glTexImage2D(GL_TEXTURE_2D, 0, glFormat, texWidth, texHeight, 0, glFormat,&#xD;&#xA;    		GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;    } else {&#xD;&#xA;    	gluBuild2DMipmaps(GL_TEXTURE_2D, glFormat, texWidth, texHeight, glFormat,&#xD;&#xA;    		GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;...or can I just assume everything will work and just do this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);&#xD;&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, glFormat, texWidth, texHeight, 0, glFormat,&#xD;&#xA;    	GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;&#xD;&#xA;?&#xD;&#xA;&#xD;&#xA;I would think that this code would fail (and the game wouldn't probably run) if the OpenGL version doesn't support mipmapping generation like that, but nowadays, most people probably have OpenGL 2.1 on their systems right, probably in Windows XP too (without any development tools installed)?&#xD;&#xA;&#xD;&#xA;Also, another small question...&#xD;&#xA;&#xD;&#xA;My laptop has 2 graphics card, one integrated (Intel) and the other dedicated (NVIDIA), with NVIDIA Optimus technology. Mipmapping using the dedicated GPU seems to have better quality. I mean, the integrated card mipmapping seems more pixelized in near planes (I'm talking about a plane terrain texture) than the dedicated one. And when I move the camera, the near pixels &quot;blink&quot; a little (with the integrated card) and it's distracting, while the far pixels look nicely linear. Yes, I'm using `GL_LINEAR_MIPMAP_LINEAR` for the minifying filter. Anyway to fix this?" />
  <row Id="23451" PostHistoryTypeId="1" PostId="11053" RevisionGUID="b342b6bd-2ebf-4998-9ee3-fe53e7cd180c" CreationDate="2011-04-13T12:25:25.783" UserId="6178" Text="Should I use GL_GENERATE_MIPMAP_SGIS or GL_GENERATE_MIPMAP?" />
  <row Id="23452" PostHistoryTypeId="3" PostId="11053" RevisionGUID="b342b6bd-2ebf-4998-9ee3-fe53e7cd180c" CreationDate="2011-04-13T12:25:25.783" UserId="6178" Text="&lt;opengl&gt;&lt;extension&gt;" />
  <row Id="23453" PostHistoryTypeId="2" PostId="11054" RevisionGUID="4bda03de-0de1-44c2-a389-20cee4adee4b" CreationDate="2011-04-13T12:28:10.453" UserId="6210" Text="You can see [this blog post][1] about using `double` instead of `float` for OpenGL matrices. I've had similar issues on PC using OpenGL, so it's not iPhone/OpenGL ES-specific, although the blog post mention OpenGL ES on the iPhone.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://abepralle.wordpress.com/2009/04/02/iphone-2d-projection-matrix-fpu/" />
  <row Id="23454" PostHistoryTypeId="2" PostId="11055" RevisionGUID="c5f98c43-3e7c-4c54-8e62-2d262d1d925a" CreationDate="2011-04-13T12:41:19.277" UserId="5864" Text="To avoid the camera jerkiness, you should keep the floating-point coordinates camera, but clamp the OpenGL *projection* to the nearest pixel." />
  <row Id="23455" PostHistoryTypeId="2" PostId="11056" RevisionGUID="4803329f-39f4-4b00-a1ab-d85f6768119e" CreationDate="2011-04-13T13:40:31.963" UserId="138" Text="First: your mileage will vary depending on both you and the company you work for.&#xD;&#xA;&#xD;&#xA;That being said, let's look at some job titles:&#xD;&#xA;&#xD;&#xA;**Technical designer** - These individuals straddle design and programming. Often times, the ones I've encountered have started off as programmers and then heavily migrated to design. Responsibilities often involve working closely with both the design team and programming team to build technically challenging design elements.&#xD;&#xA;&#xD;&#xA;**Gameplay programmer** - I've been a gameplay programmer on a triple-A FPS. Typically, our responsibilities involve translating a designer's dreams into realities. Depending on the studio, you can be given a great deal of latitude in how your implementation functions and what if offers the designer. I've seen more than one gameplay programmer's initial values be used in the shipped product. Additionally, being a gameplay programmer gives you a close dialogue with the design team, potentially allow you to comment or influence their designs.&#xD;&#xA;&#xD;&#xA;**Other programmers** - Engine programmers and tools programmers typically have very little sway in any design decisions beyond &quot;can it be done&quot;. Though, this depends on the studio. My current studio (a social/casual house) expects everyone to provide input for design, including all programmers.&#xD;&#xA;&#xD;&#xA;So, basically, it all depends on the company and your position within the company.&#xD;&#xA;&#xD;&#xA;I hope that helps!" />
  <row Id="23456" PostHistoryTypeId="2" PostId="11057" RevisionGUID="81209a85-5d64-4a5a-aba4-f173158fbbfb" CreationDate="2011-04-13T14:02:22.983" UserId="6581" Text="As of September 24, 2010, the largest apk file you are able to upload is 25MB.  I don't believe it has changed." />
  <row Id="23457" PostHistoryTypeId="2" PostId="11058" RevisionGUID="7bade388-4e5d-4b88-a9e1-b0ca77e6afaf" CreationDate="2011-04-13T14:03:41.413" UserId="6214" Text="For instance, in Half-Life 2 you have Civil Protection, Combine Soldier and Combine Elite. Each class has a weapon. Is there a shift away from this at all, where the NPCs are matched with the player in the sense that the weapon they choose to use is based upon their advantage, while still maintaining some sense of competitiveness? Is there a reason this became the norm? Does it have to do with all the variables and complications that can arise from doing that?" />
  <row Id="23458" PostHistoryTypeId="1" PostId="11058" RevisionGUID="7bade388-4e5d-4b88-a9e1-b0ca77e6afaf" CreationDate="2011-04-13T14:03:41.413" UserId="6214" Text="Why has it become commonplace for NPCs to have one weapon per class instead of variants?" />
  <row Id="23459" PostHistoryTypeId="3" PostId="11058" RevisionGUID="7bade388-4e5d-4b88-a9e1-b0ca77e6afaf" CreationDate="2011-04-13T14:03:41.413" UserId="6214" Text="&lt;game-mechanics&gt;&lt;game-industry&gt;" />
  <row Id="23460" PostHistoryTypeId="4" PostId="10995" RevisionGUID="2ca294f5-b5bf-497a-a852-e596cf3d9bd5" CreationDate="2011-04-13T14:04:30.490" UserId="3588" Comment="Added a tag and fixed the title up to better reflect the apparent intent of the question. ♪" Text="Swapping axis labels between 2D and 3D coordinates" />
  <row Id="23461" PostHistoryTypeId="6" PostId="10995" RevisionGUID="2ca294f5-b5bf-497a-a852-e596cf3d9bd5" CreationDate="2011-04-13T14:04:30.490" UserId="3588" Comment="Added a tag and fixed the title up to better reflect the apparent intent of the question. ♪" Text="&lt;language-agnostic&gt;&lt;coordinates&gt;" />
  <row Id="23462" PostHistoryTypeId="24" PostId="10995" RevisionGUID="2ca294f5-b5bf-497a-a852-e596cf3d9bd5" CreationDate="2011-04-13T14:04:30.490" Comment="Proposed by 3588 approved by 51 edit id of 290" />
  <row Id="23463" PostHistoryTypeId="2" PostId="11059" RevisionGUID="c9c44dad-8dfb-45aa-8491-11464bcee1d3" CreationDate="2011-04-13T14:07:41.753" UserId="-1" Text="" />
  <row Id="23464" PostHistoryTypeId="2" PostId="11060" RevisionGUID="d4adc771-c2b0-41ac-81e9-0ae408f31b32" CreationDate="2011-04-13T14:07:41.753" UserId="-1" Text="" />
  <row Id="23465" PostHistoryTypeId="2" PostId="11061" RevisionGUID="20cad049-5983-41d5-ae6a-0bf9f7e6ac4e" CreationDate="2011-04-13T14:07:44.727" UserId="6588" Text="The limit on iPhone apps for transmitting over 3G is 20MB (although that'll take a long time to download, so you definitely want to be much smaller than that.)&#xD;&#xA;&#xD;&#xA;I don't know what the overall app size limit is (ie. how big can an app be to download over a wired connection?) because I behave as if the wireless limit is the upper limit." />
  <row Id="23466" PostHistoryTypeId="2" PostId="11062" RevisionGUID="88131840-4616-4e5e-96a1-43954e5eb088" CreationDate="2011-04-13T14:11:21.887" UserId="6588" Text="Why it's commonplace is easy to understand. There are two reasons I can see immediately, both to do with simplicity: it's simpler to program the AI, and it's simpler for the player to understand. Now for certain games it may be an advantage if enemy characters can switch weapons for the situation (for starters, it's more realistic) but for most games it can be a significant problem if the player gets confused about what tactics to expect and counter.&#xD;&#xA;&#xD;&#xA;As for complication in AI, there's just plain less thinking for the enemy to do if it doesn't have to consider which weapon to use. Consider your own thought process when deciding which weapon to use; now try to model that thought process as a set of instructions. You'll be considering damage per shot with how accurate the shots are, weighing effectiveness against different sorts of targets, and balancing all those factors against how much ammo you have. Pretty complicated huh?" />
  <row Id="23467" PostHistoryTypeId="5" PostId="11060" RevisionGUID="42839bf0-33b2-4781-92a8-d5bff95b1937" CreationDate="2011-04-13T14:15:14.710" UserId="3588" Comment="added 168 characters in body" Text="The central code loop responsible for handling the running gameplay. At its most basic state, it accepts input, resolves the actions of entities, and renders the scene." />
  <row Id="23468" PostHistoryTypeId="24" PostId="11060" RevisionGUID="42839bf0-33b2-4781-92a8-d5bff95b1937" CreationDate="2011-04-13T14:15:14.710" Comment="Proposed by 3588 approved by 51 edit id of 292" />
  <row Id="23469" PostHistoryTypeId="5" PostId="11059" RevisionGUID="5dc9dab1-2ada-42e6-9427-2f4a8bca906d" CreationDate="2011-04-13T14:15:16.800" UserId="3588" Comment="added 815 characters in body" Text="The **game loop** is designed to ensure the persistence of action in a game. Unlike many other software applications, games do not stall and wait for input. The world continues to run while the player watches, which importantly allows timing to play a role.&#xD;&#xA;&#xD;&#xA;The game loop is responsible for allowing this, by continually rendering the scene without *requiring* the player's input. A rudimentary game loop might run like the following:&#xD;&#xA;&#xD;&#xA; 1. Accept player input if any exists, resolve actions for player as a result of any input&#xD;&#xA; 2. Resolve AI decisions and actions&#xD;&#xA; 3. Determine collisions and resolve their impact&#xD;&#xA; 4. Render the resulting scene&#xD;&#xA;&#xD;&#xA;Use this tag when you're asking questions such as the proper structure, optimization and efficiency strategies, or debugging errors in the main game loop code." />
  <row Id="23470" PostHistoryTypeId="24" PostId="11059" RevisionGUID="5dc9dab1-2ada-42e6-9427-2f4a8bca906d" CreationDate="2011-04-13T14:15:16.800" Comment="Proposed by 3588 approved by 51 edit id of 291" />
  <row Id="23471" PostHistoryTypeId="5" PostId="11062" RevisionGUID="c28b5a24-981d-46e0-82f5-5276504afa2e" CreationDate="2011-04-13T14:16:36.223" UserId="6588" Comment="added 105 characters in body" Text="Why it's commonplace is easy to understand. There are two reasons I can see immediately, both to do with simplicity: it's simpler to program the AI, and it's simpler for the player to understand. Now for certain games it may be an advantage if enemy characters can switch weapons for the situation (for starters, it's more realistic) but for most games it can be a significant problem if the player gets confused about what tactics to expect and counter. Players like being able to think &quot;oh there's one of the grenade dudes, I better watch out for grenades.&quot;&#xD;&#xA;&#xD;&#xA;As for complication in AI, there's just plain less thinking for the enemy to do if it doesn't have to consider which weapon to use. Consider your own thought process when deciding which weapon to use; now try to model that thought process as a set of instructions. You'll be considering damage per shot with how accurate the shots are, weighing effectiveness against different sorts of targets, and balancing all those factors against how much ammo you have. Pretty complicated huh?" />
  <row Id="23472" PostHistoryTypeId="2" PostId="11063" RevisionGUID="ac063e73-adb8-425a-933d-c8b1b67bdebb" CreationDate="2011-04-13T14:23:22.033" UserId="-1" Text="" />
  <row Id="23473" PostHistoryTypeId="2" PostId="11064" RevisionGUID="4aff62c4-e46f-47aa-b42b-c5da4c5e6fb0" CreationDate="2011-04-13T14:23:22.033" UserId="-1" Text="" />
  <row Id="23474" PostHistoryTypeId="2" PostId="11065" RevisionGUID="4594a672-4688-4c10-b257-55c7c98d8f60" CreationDate="2011-04-13T14:28:30.653" UserId="-1" Text="" />
  <row Id="23475" PostHistoryTypeId="2" PostId="11066" RevisionGUID="2fae3e78-269c-4d88-a852-c3bbf233d0c4" CreationDate="2011-04-13T14:28:30.653" UserId="-1" Text="" />
  <row Id="23476" PostHistoryTypeId="5" PostId="10908" RevisionGUID="8cfedb60-40ff-4c67-9ce5-50f44f049328" CreationDate="2011-04-13T14:49:44.667" UserId="1839" Comment="added Fix; added 10 characters in body" Text="Does the problem occur whenever you change the direction or only when changing from positive values to negative values? If it is always, it is most likely the last acceleration stored from last movement which is still slightly bigger than zero. How do you determine that the movement is over in IsCameraMoving() ?&#xD;&#xA;&#xD;&#xA;Can you show the entire calculation of CurrentVelociy and Acceleration and how you apply the displacement?&#xD;&#xA;&#xD;&#xA;Also double check that you reset all components of CameraDirection properly.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Solution: The `displacement` calculation in `Camera::Move()` was wrong. `Acceleration` must also be multiplied with `direction` here as also done in `Camera::UpdateCameraVelocity`, otherwise it points into the wrong direction.&#xD;&#xA;&#xD;&#xA;`Vector3D displacement = (CurrentVelocity * elapsedTime) + (direction * Acceleration * 0.5f * elapsedTime * elapsedTime);`" />
  <row Id="23477" PostHistoryTypeId="5" PostId="10338" RevisionGUID="7d197333-5267-40ba-b0fc-7a1ae455295f" CreationDate="2011-04-13T15:01:54.480" UserId="3588" Comment="Revised the excerpt so that it doesn't render oddly in the tags page. ♪" Text="Game resources separate from the software (code) and hardware (platform). The most common assets are graphics and audio." />
  <row Id="23478" PostHistoryTypeId="24" PostId="10338" RevisionGUID="7d197333-5267-40ba-b0fc-7a1ae455295f" CreationDate="2011-04-13T15:01:54.480" Comment="Proposed by 3588 approved by 14 edit id of 297" />
  <row Id="23479" PostHistoryTypeId="5" PostId="11065" RevisionGUID="c33316f2-9a29-4b14-9259-8d1e8b85b0b7" CreationDate="2011-04-13T15:01:58.177" UserId="3588" Comment="added 307 characters in body" Text="Your choice of **file format** affects both the size of the game, and the running efficiency of accessing their stored information.&#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag deal with the selection and optimization of file formats and the differences between various file formats used for the same purpose." />
  <row Id="23480" PostHistoryTypeId="24" PostId="11065" RevisionGUID="c33316f2-9a29-4b14-9259-8d1e8b85b0b7" CreationDate="2011-04-13T15:01:58.177" Comment="Proposed by 3588 approved by 14 edit id of 295" />
  <row Id="23481" PostHistoryTypeId="5" PostId="11066" RevisionGUID="02d0af6a-83fa-4f05-bee9-2e4ac5347692" CreationDate="2011-04-13T15:02:03.793" UserId="3588" Comment="added 53 characters in body" Text="The structure of data files and how they are stored. " />
  <row Id="23482" PostHistoryTypeId="24" PostId="11066" RevisionGUID="02d0af6a-83fa-4f05-bee9-2e4ac5347692" CreationDate="2011-04-13T15:02:03.793" Comment="Proposed by 3588 approved by 14 edit id of 296" />
  <row Id="23483" PostHistoryTypeId="5" PostId="11063" RevisionGUID="d8efd2ae-b014-4c8c-8aaa-728d02482cfb" CreationDate="2011-04-13T15:02:03.793" UserId="3588" Comment="added 745 characters in body" Text="A popular trend that has only grown in recent years, Indie games are to the game industry what indie films are to the film industry (thus the name). Independent development allows one to avoid the rigidity of the corporate environment, but also yields many hardships. Lower budgets, smaller staffs, limited resource and skills, and inferior marketing are the most common elements that plague independent developers. However, independent development has proven itself as a very successful endeavor that has produced many popular games.&#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag include managing an independent group, how to overcome the limitations in certain fields, and what alternatives or assistance is available to budding indie developers." />
  <row Id="23484" PostHistoryTypeId="24" PostId="11063" RevisionGUID="d8efd2ae-b014-4c8c-8aaa-728d02482cfb" CreationDate="2011-04-13T15:02:03.793" Comment="Proposed by 3588 approved by 14 edit id of 293" />
  <row Id="23485" PostHistoryTypeId="5" PostId="11064" RevisionGUID="5dfd5c8a-65e8-47e2-82c3-1eba8c7dd7f9" CreationDate="2011-04-13T15:02:03.793" UserId="3588" Comment="added 149 characters in body" Text="Short for &quot;independent development&quot;, the development of games outside of the corporate world. May be a single person or a team of friends/associates." />
  <row Id="23486" PostHistoryTypeId="24" PostId="11064" RevisionGUID="5dfd5c8a-65e8-47e2-82c3-1eba8c7dd7f9" CreationDate="2011-04-13T15:02:03.793" Comment="Proposed by 3588 approved by 14 edit id of 294" />
  <row Id="23489" PostHistoryTypeId="25" PostId="11058" RevisionGUID="c358e52a-d0b1-4d6c-9d6f-f554601f2890" CreationDate="2011-04-13T15:09:27.527" Comment="http://twitter.com/#!/StackGameDev/status/58185033424445440" />
  <row Id="23490" PostHistoryTypeId="2" PostId="11067" RevisionGUID="3f4f2f38-de8e-4a85-8066-be21e748a6db" CreationDate="2011-04-13T15:21:00.930" UserId="6701" Text="I tried to use the FBX SDK (2011.3.1) to load FBX files and save them as Collada files in order to be able to import FBX files in Panda3D.&#xD;&#xA;Unfortunately the resulting Collada files are not usable for several reasons, among them:&#xD;&#xA;&#xD;&#xA;* There's a Maya specific extra technique&#xD;&#xA;&#xD;&#xA;diffuse&#xD;&#xA;&#xD;&#xA;    &lt;diffuse&gt;&#xD;&#xA;        &lt;texture texture=&quot;Map__2-image&quot; texcoord=&quot;CHANNEL0&quot;&gt;&#xD;&#xA;            &lt;extra&gt;&#xD;&#xA;                &lt;technique profile=&quot;MAYA&quot;&gt;&#xD;&#xA;                    &lt;wrapU sid=&quot;wrapU0&quot;&gt;TRUE&lt;/wrapU&gt;&#xD;&#xA;                    &lt;wrapV sid=&quot;wrapV0&quot;&gt;TRUE&lt;/wrapV&gt;&#xD;&#xA;                    &lt;blend_mode&gt;ADD&lt;/blend_mode&gt;&#xD;&#xA;                &lt;/technique&gt;&#xD;&#xA;            &lt;/extra&gt;&#xD;&#xA;        &lt;/texture&gt;&#xD;&#xA;    &lt;/diffuse&gt;&#xD;&#xA;&#xD;&#xA;* It assigns a texcoord channel name that isn't referenced anywhere else in the file (in the previous code sample, no geometry uses &quot;CHANNEL0&quot;...)&#xD;&#xA;&#xD;&#xA;* Every polygon is exported twice, a first time with a basic material (only diffuse color, specular color, etc.) and a second time with a textured material --&gt; this doubles the number of polygons of each model without any valuable reason&#xD;&#xA;&#xD;&#xA;Anyway, the resulting Collada file cannot be opened correctly either with OpenCOLLADA or Panda3D's &quot;dae2egg&quot;.&#xD;&#xA;&#xD;&#xA;Anyone has any experience on how to &quot;fix&quot; it and make it understandable by common and well-reputed Collada importers such as OpenCOLLADA?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="23491" PostHistoryTypeId="1" PostId="11067" RevisionGUID="3f4f2f38-de8e-4a85-8066-be21e748a6db" CreationDate="2011-04-13T15:21:00.930" UserId="6701" Text="How to fix bad Collada produced by FBX?" />
  <row Id="23492" PostHistoryTypeId="3" PostId="11067" RevisionGUID="3f4f2f38-de8e-4a85-8066-be21e748a6db" CreationDate="2011-04-13T15:21:00.930" UserId="6701" Text="&lt;collada&gt;" />
  <row Id="23493" PostHistoryTypeId="2" PostId="11068" RevisionGUID="53366946-cd69-4fc8-80e7-bea4743b8f60" CreationDate="2011-04-13T15:22:35.057" UserId="6698" Text="**There's no rules, sometimes**&lt;br&gt;&#xD;&#xA;&#xD;&#xA;There was no rules in the game company I worked at. *Sure, I don't think it's uncommon for coders to do design*. I'll share my examples.&lt;br&gt; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Regarding,&lt;br&gt;&#xD;&#xA;While I was hired as a programmer, but I did design and music. It's not that I wanted to do the creative stuff, they just had no structure and needed my design.&#xD;&#xA;&#xD;&#xA;*Yes, moving from a technical job to design/gameplay is possible in an unstructured company.*  You need to bring some real skill, and be careful about territorial issues and egos.&#xD;&#xA;&#xD;&#xA;Because I came from the multi-media industry and was just doing programming as a hobbie, I had the confidence to move into game design. That was my break, but instead of lacking experience with design, I lacked experience in the programming.&#xD;&#xA;&#xD;&#xA;I hope you get a break in the industry if that is what you're after. *I recommend getting some experience with design in a gaming company, but stay within your job title.* You can always go to an other company with the experience you've gained, without ruffling egos.&lt;br&gt;&#xD;&#xA;Good Luck," />
  <row Id="23494" PostHistoryTypeId="17" PostId="11070" RevisionGUID="85067c8e-0067-4d21-88bf-a81e87f7c0de" CreationDate="2011-04-13T15:23:42.077" UserId="-1" Comment="from http://stackoverflow.com/questions/5650866/competing-with-c-for-games-programming/5651089#5651089" Text="" />
  <row Id="23495" PostHistoryTypeId="2" PostId="11070" RevisionGUID="e451dff4-35f7-4bfc-8cb5-05c8cd378d8d" CreationDate="2011-04-13T14:42:31.460" UserDisplayName="Graham Perks" Text="Numerous reasons:&#xD;&#xA;&#xD;&#xA;- Big one you missed: It's portable, simplifying ports your game engine to iOS, XBOX, PS3, whatever&#xD;&#xA;- It's fast&#xD;&#xA;- All the SDKs support it natively&#xD;&#xA;- Lots of libraries available&#xD;&#xA;- Everyone writing games knows it, so it's easy to hire experienced games devs for your team&#xD;&#xA;- It's trivial to embed a game engine scripting language like Lua&#xD;&#xA;" />
  <row Id="23496" PostHistoryTypeId="2" PostId="11069" RevisionGUID="ea6e0c94-a547-44b2-9985-e27509cf1b3e" CreationDate="2011-04-13T14:27:25.213" UserDisplayName="Rainbird" Text="I'm curious as to why C++ is so popular for games development, and not other languages instead. I know you can create very fast code with it, but what exactly is it that makes it popular?&#xD;&#xA;&#xD;&#xA;Is it just because it's fast?&#xD;&#xA;Is it some other feature in the language, like the OO paradigm or the portability?&#xD;&#xA;Is it because of all the libraries that have been created over time?&#xD;&#xA;Or some combination of all these (and other) reasons?&#xD;&#xA;&#xD;&#xA;If someone could fill me in on this, I'd be very happy. :-)" />
  <row Id="23497" PostHistoryTypeId="1" PostId="11069" RevisionGUID="ea6e0c94-a547-44b2-9985-e27509cf1b3e" CreationDate="2011-04-13T14:27:25.213" UserDisplayName="Rainbird" Text="Competing with C++ for games programming" />
  <row Id="23498" PostHistoryTypeId="3" PostId="11069" RevisionGUID="ea6e0c94-a547-44b2-9985-e27509cf1b3e" CreationDate="2011-04-13T14:27:25.213" UserDisplayName="Rainbird" Text="&lt;c++&gt;" />
  <row Id="23499" PostHistoryTypeId="17" PostId="11069" RevisionGUID="ffcce1ba-ca1b-4f4a-ad8c-77a3f8f531ac" CreationDate="2011-04-13T15:23:42.077" UserId="-1" Comment="from http://stackoverflow.com/questions/5650866/competing-with-c-for-games-programming" Text="" />
  <row Id="23500" PostHistoryTypeId="2" PostId="11071" RevisionGUID="c735bed0-e770-4dde-b76f-6ae60ac37228" CreationDate="2011-04-13T15:50:01.660" UserId="370" Text="The [midpoint displacement algorithm][1] can generate beautiful 2d terrain.&#xD;&#xA;&#xD;&#xA;![terrain example][2]&#xD;&#xA;&#xD;&#xA;There is subtle different between midpoint displacement and what @tykel is suggesting.  Tykel's algorithm subdivides the horizon and picks a new height.  This creates terrain where the peaks are uniformly spaced.  Humans are great at picking out regularities, so the generate terrain will seem generated, not natural.&#xD;&#xA;&#xD;&#xA;Midpoint's power comes from picking the midpoint then displacing along the _normal_ of the that line.  This causes the peaks to vary up and down as well as side to side.  The resultant terrain is fractal, and humans perceive fractals as natural.&#xD;&#xA;&#xD;&#xA;Random height displacement could result in a descent terrain if you threw in a couple more parameters (horizontal displacement, maximum slope, etc).  This highlights another of MPD strengths; it is very simple to tune.  Two parameters, bumpiness and level of detail.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprogrammer.com/fractal.html#midpoint&#xD;&#xA;  [2]: http://i.stack.imgur.com/XHPHn.gif" />
  <row Id="23501" PostHistoryTypeId="2" PostId="11072" RevisionGUID="1a045d55-1c92-4d3a-8de4-e76615382532" CreationDate="2011-04-13T16:08:07.683" UserId="1198" Text="There are a few reasons, that I'd like to mention in addition to what @Graham brought up.&#xD;&#xA;&#xD;&#xA; - Legacy Code - many studios have lots of C++ code, goes to your mention of libraries.&#xD;&#xA; - C++ is really a high-level assembler, and has **direct** access to hardware (as direct as you can get running on top of an Operating System at least) and is quite fast. If you want, in C++ you can drop directly down into assembly language for instruction level control (not that it is always wise, its just not possible with Java, C#, Python, etc)&#xD;&#xA; - DirectX and OpenGL natively support C++, most other languages have &quot;bindings&quot; to the underlying libraries through intermediate layers, thats not to say they aren't fast or can't do many of the same things, but it adds a layer of software between your game and the hardware.&#xD;&#xA; - As @Graham mentions, lots of programmers know it, so its easy to find experienced  developers, and its also quite portable, compared to C# which is stuck on the .NET Framework (there is Mono, but it generally laggs a generation behind Microsoft's implementation.)" />
  <row Id="23502" PostHistoryTypeId="5" PostId="11017" RevisionGUID="81457007-42ad-4560-9ae0-46b691e033be" CreationDate="2011-04-13T16:14:42.890" UserId="1198" Comment="added pseudo code sample" Text="I'd recommend the [User Datagram Protocol][1] -- have each client send user inputs to your server, have your server calculate the results of all inputs and respond that result to each client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    **Pseudo Code for UDP Client/Server**&#xD;&#xA;    // public&#xD;&#xA;    int sendSequenceID= 0;&#xD;&#xA;    int receiveSequenceID = 0;&#xD;&#xA;    &#xD;&#xA;    // send data&#xD;&#xA;    var data = new { id = sendSequenceID, DeltaX = changeInXCoord, DeltaY = changeinYCoord };&#xD;&#xA;    udpSocket.Send(data);&#xD;&#xA;    sendSequenceID++;&#xD;&#xA;    &#xD;&#xA;    //receive data&#xD;&#xA;    var receivedData = null;&#xD;&#xA;    udpSocket.Receive(receivedData);&#xD;&#xA;    if(receivedData.id &gt; receivedSequenceID) // ignore packets out of order&#xD;&#xA;    {&#xD;&#xA;        receivedSequenceID = receivedData.id;&#xD;&#xA;        // process received data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/User_Datagram_Protocol" />
  <row Id="23503" PostHistoryTypeId="5" PostId="11067" RevisionGUID="eb3c0538-bbfc-4b83-b44c-4e7e3ddeb8bb" CreationDate="2011-04-13T16:19:56.910" UserId="1198" Comment="dropped greeting and signature, per the FAQ page" Text="I tried to use the FBX SDK (2011.3.1) to load FBX files and save them as Collada files in order to be able to import FBX files in Panda3D.&#xD;&#xA;Unfortunately the resulting Collada files are not usable for several reasons, among them:&#xD;&#xA;&#xD;&#xA;* There's a Maya specific extra technique&#xD;&#xA;&#xD;&#xA;diffuse&#xD;&#xA;&#xD;&#xA;    &lt;diffuse&gt;&#xD;&#xA;        &lt;texture texture=&quot;Map__2-image&quot; texcoord=&quot;CHANNEL0&quot;&gt;&#xD;&#xA;            &lt;extra&gt;&#xD;&#xA;                &lt;technique profile=&quot;MAYA&quot;&gt;&#xD;&#xA;                    &lt;wrapU sid=&quot;wrapU0&quot;&gt;TRUE&lt;/wrapU&gt;&#xD;&#xA;                    &lt;wrapV sid=&quot;wrapV0&quot;&gt;TRUE&lt;/wrapV&gt;&#xD;&#xA;                    &lt;blend_mode&gt;ADD&lt;/blend_mode&gt;&#xD;&#xA;                &lt;/technique&gt;&#xD;&#xA;            &lt;/extra&gt;&#xD;&#xA;        &lt;/texture&gt;&#xD;&#xA;    &lt;/diffuse&gt;&#xD;&#xA;&#xD;&#xA;* It assigns a texcoord channel name that isn't referenced anywhere else in the file (in the previous code sample, no geometry uses &quot;CHANNEL0&quot;...)&#xD;&#xA;&#xD;&#xA;* Every polygon is exported twice, a first time with a basic material (only diffuse color, specular color, etc.) and a second time with a textured material --&gt; this doubles the number of polygons of each model without any valuable reason&#xD;&#xA;&#xD;&#xA;Anyway, the resulting Collada file cannot be opened correctly either with OpenCOLLADA or Panda3D's &quot;dae2egg&quot;.&#xD;&#xA;&#xD;&#xA;Anyone has any experience on how to &quot;fix&quot; it and make it understandable by common and well-reputed Collada importers such as OpenCOLLADA?" />
  <row Id="23504" PostHistoryTypeId="24" PostId="11067" RevisionGUID="eb3c0538-bbfc-4b83-b44c-4e7e3ddeb8bb" CreationDate="2011-04-13T16:19:56.910" Comment="Proposed by 1198 approved by 51 edit id of 298" />
  <row Id="23505" PostHistoryTypeId="2" PostId="11073" RevisionGUID="a0d98ecb-fd11-42ec-a290-d3394b0ab61f" CreationDate="2011-04-13T16:22:54.743" UserId="6588" Text="Raw speed is the primary reason, but actually it's not an either-or decision so lots of game companies are starting to use other languages for parts of the game. Certain tasks require the computer to work as fast as possible (eg. core rendering routines) but many tasks in gameplay code don't have to run all that fast (eg. making the door open when the player clicks on it) which means it is smart to use a much simpler (and thus faster to write programs in) language for those parts. That is why many game engines are written in C++ but embed a scripting language like Lua for writing gameplay code.&#xD;&#xA;&#xD;&#xA;The tricky thing to understand is that when choosing programming languages there is an overall tradeoff between efficiency for the computer and efficiency for the programmer. That is, which is more important to you, how quickly the computer runs the code or how quickly the programmer writes the code?" />
  <row Id="23506" PostHistoryTypeId="2" PostId="11074" RevisionGUID="1c1f0653-6356-4d06-a9fa-9fe6c01e8fd0" CreationDate="2011-04-13T16:57:19.220" UserId="656" Text="Here's a link which has good information about automatic mipmap generation:&#xD;&#xA;http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation&#xD;&#xA;&#xD;&#xA;In short:&#xD;&#xA;&#xD;&#xA;if OpenGL &gt;= 3.0, use glGenerateMipmap&#xD;&#xA;&#xD;&#xA;else if OpenGL &gt;= 1.4, use glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);&#xD;&#xA;&#xD;&#xA;else video card is pretty old at this point, fall back to gluBuild2DMipmaps?&#xD;&#xA;&#xD;&#xA;else cut off support" />
  <row Id="23507" PostHistoryTypeId="5" PostId="11068" RevisionGUID="5e554fe4-60a4-4289-bcad-e8f478dc3d79" CreationDate="2011-04-13T17:14:43.137" UserId="6698" Comment="without ruffling egos at your current company" Text="**There's no rules, sometimes**&lt;br&gt;&#xD;&#xA;&#xD;&#xA;There was no rules in the game company I worked at. *Sure, I don't think it's uncommon for coders to do design*. I'll share my examples.&lt;br&gt; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Regarding,&lt;br&gt;&#xD;&#xA;While I was hired as a programmer, but I did design and music. It's not that I wanted to do the creative stuff, they just had no structure and needed my design.&#xD;&#xA;&#xD;&#xA;*Yes, moving from a technical job to design/gameplay is possible in an unstructured company.*  You need to bring some real skill, and be careful about territorial issues and egos.&#xD;&#xA;&#xD;&#xA;Because I came from the multi-media industry and was just doing programming as a hobbie, I had the confidence to move into game design. That was my break, but instead of lacking experience with design, I lacked experience in the programming.&#xD;&#xA;&#xD;&#xA;I hope you get a break in the industry if that is what you're after. *I recommend getting some experience with design in a gaming company, but stay within your job title.* You can always go to an other company with the experience you've gained, without ruffling egos at your current company.&lt;br&gt;&#xD;&#xA;Good Luck," />
  <row Id="23508" PostHistoryTypeId="2" PostId="11075" RevisionGUID="77b3a9c0-54bb-4693-8757-b8c21bd7dd61" CreationDate="2011-04-13T17:37:58.263" UserId="1929" Text="I'm using RPG-Maker-XP-like sprites (any 2D adventure/RPG style sprites). I would like to tint them so that they look different at different times of day.&#xD;&#xA;&#xD;&#xA;Times of the day are the set of:&#xD;&#xA;&#xD;&#xA;- Daytime (normal)&#xD;&#xA;- Early morning (bluish?)&#xD;&#xA;- Sunrise and Sunset (orangish?)&#xD;&#xA;- Night time (dark)&#xD;&#xA;&#xD;&#xA;**What do I need to do to tint them, and make them look good, during different times of the day?** Are there any &quot;known&quot; formulas for any of these times, like &quot;delete the green blue component and tint heavily red+green for a sunrise effect&quot;?&#xD;&#xA;&#xD;&#xA;Ideally, I have just the original sprites, with no additional information or images (like spot-highlights or shadows separated out).&#xD;&#xA;&#xD;&#xA;Finally, I'm using Silverlight/FlatRedBall for this, so I do have access to per-pixel information, as well as RGB tinting (adding, subtracting, multiplying, etc.)" />
  <row Id="23509" PostHistoryTypeId="1" PostId="11075" RevisionGUID="77b3a9c0-54bb-4693-8757-b8c21bd7dd61" CreationDate="2011-04-13T17:37:58.263" UserId="1929" Text="Programmatically Modifying Images to Create Morning, Sunrise/Sunset and Night-Time Modes" />
  <row Id="23510" PostHistoryTypeId="3" PostId="11075" RevisionGUID="77b3a9c0-54bb-4693-8757-b8c21bd7dd61" CreationDate="2011-04-13T17:37:58.263" UserId="1929" Text="&lt;2d&gt;&lt;graphic-effects&gt;" />
  <row Id="23511" PostHistoryTypeId="6" PostId="11034" RevisionGUID="56f86ee5-b22d-4e79-9cf4-e71dbfa6382b" CreationDate="2011-04-13T17:44:06.883" UserId="4443" Comment="edited tags" Text="&lt;xna&gt;&lt;network&gt;&lt;debugging&gt;" />
  <row Id="23512" PostHistoryTypeId="25" PostId="11069" RevisionGUID="59f07341-25fc-4634-b4c2-9610b7b7f089" CreationDate="2011-04-13T18:09:27.693" Comment="http://twitter.com/#!/StackGameDev/status/58230333073661952" />
  <row Id="23513" PostHistoryTypeId="5" PostId="10862" RevisionGUID="ad605e57-778b-4783-a08c-11d9b342444d" CreationDate="2011-04-13T18:28:27.030" UserId="1198" Comment="adjusted formatting on using method names in sentences and fixed &quot;I'm&quot; " Text="I'm currently working on a Worms game which involves terrain deformation. I used to do it with `.GetData()`, modifying the color array, then using `.SetData()`, but I looked into changing it to make the work done on the GPU instead (using RenderTargets).&#xD;&#xA;&#xD;&#xA;All is going well with that, but I have come into another problem. My whole collision detection against the terrain was based on a Color array representing the terrain, but I do not have that color array anymore. I could use `.GetData()` every time I modify the terrain to update my Color array, but that would defeat the purpose of my initial changes.&#xD;&#xA;&#xD;&#xA;What I would be okay with is using `.GetData()` once at the beginning, and then modifying that array based on the changes I make to the terrain later on by some other means. I do not know how I would do this though, can anyone help?" />
  <row Id="23514" PostHistoryTypeId="24" PostId="10862" RevisionGUID="ad605e57-778b-4783-a08c-11d9b342444d" CreationDate="2011-04-13T18:28:27.030" Comment="Proposed by 1198 approved by 51 edit id of 300" />
  <row Id="23515" PostHistoryTypeId="5" PostId="11074" RevisionGUID="26b9d8e8-68a9-4bfb-9ffc-51c278fd6fe4" CreationDate="2011-04-13T18:28:41.303" UserId="1198" Comment="code formatting" Text="Here's a link which has good information about automatic mipmap generation:&#xD;&#xA;http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation&#xD;&#xA;&#xD;&#xA;In short:&#xD;&#xA;&#xD;&#xA;    if OpenGL &gt;= 3.0, use glGenerateMipmap&#xD;&#xA;    &#xD;&#xA;    else if OpenGL &gt;= 1.4, use glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);&#xD;&#xA;    &#xD;&#xA;    else video card is pretty old at this point, fall back to gluBuild2DMipmaps?&#xD;&#xA;    &#xD;&#xA;    else cut off support" />
  <row Id="23516" PostHistoryTypeId="24" PostId="11074" RevisionGUID="26b9d8e8-68a9-4bfb-9ffc-51c278fd6fe4" CreationDate="2011-04-13T18:28:41.303" Comment="Proposed by 1198 approved by 51 edit id of 299" />
  <row Id="23517" PostHistoryTypeId="2" PostId="11076" RevisionGUID="8c77a9b3-a916-4d9f-9735-e655ce277a78" CreationDate="2011-04-13T18:39:07.557" UserId="1101" Text="&gt; How common is it that game coders participate in the design process of the game?&#xD;&#xA;&#xD;&#xA;I've had experience of 3 companies:&#xD;&#xA;&#xD;&#xA;  - One had no designers at all. All design was done by programmers and artists, typically the most senior.&#xD;&#xA;  - One had designers and programmers had virtually no input into the process. The lead programmer might be brought in to provide a feasibility check on the design after it was made and adjustments made accordingly, but they did no design as such.&#xD;&#xA;  - One has separate programmers and designers, but programmers are encouraged to contribute high level design just as much as the designers are - the division of labour takes place more on the implementation side.&#xD;&#xA;&#xD;&#xA;So, no standard there!&#xD;&#xA;&#xD;&#xA;&gt; is it possible for a programmer with interest in the field to move from the technical job to a gameplay design related job (or do both in smaller companies)? Does that happen?&#xD;&#xA;&#xD;&#xA;Yes, and yes. I think it's actually quite common, and I would argue it's preferable - I would much rather have a designer who has (a) experience of the game making process and (b) understanding of the medium's limitations." />
  <row Id="23518" PostHistoryTypeId="2" PostId="11077" RevisionGUID="46c77bff-f919-4906-93ca-069081d8bc84" CreationDate="2011-04-13T18:58:18.907" UserId="6707" Text="In C++ you can allocate local variables that disappear after the function ends.  Usually, these are allocated on a stack.  &#xD;&#xA;&#xD;&#xA;The stack variables do not contribute to the dynamic memory allocation issues of fragmentation and overhead.  Allocating room on the stack is quick and easy (just adjusting a pointer).  Dynamic memory allocation usually involves searching a container for an adequate block of memory, marking the memory, then tagging it as occupied.  Deallocation involves adding the memory block to a container, and possibly merging it with existing blocks.  A lot more overhead than just changing a pointer.  &#xD;&#xA;&#xD;&#xA;Java and C# allocate memory dynamically, except for primitive types.  These languages depend on a run-time environment that will mark a variable to delete, then run a garbage collector at random (unscheduled) intervals to reclaim the memory.  In general, the programmer has no control as to when the variable will be tagged for deletion nor when it will be reclaimed (reclamation of used memory is an advanced topic that most C++ and Java programmers don't experience).&#xD;&#xA;&#xD;&#xA;The speed of C++ is primarily due to its direct translation to executable code.  Java and C# are compiled to an intermediate code which is then interpreted by a virtual machine.  In general, interpretive languages are slower performers than directly translated languages.&#xD;&#xA;" />
  <row Id="23520" PostHistoryTypeId="5" PostId="10917" RevisionGUID="5ba4f008-aacb-4489-bde0-573152bb1f3a" CreationDate="2011-04-13T19:13:00.743" UserId="6637" Comment="formula for collision point" Text="Note: All of the following assumes the ball's surface is frictionless (so it won't start spinning or rebound differently because it is).&#xD;&#xA;&#xD;&#xA;At the moment of collision, the ball will be touching the corner. When solid objects collide, a force will act along the so called surface normal, i.e. perpendicular to the surface at the point of collision. &#xD;&#xA;&#xD;&#xA;Since it's a ball, perpendicular to the surface is towards to ball's center. Ok, so we know the direction of the force, what about its magnitude? Assuming an elastic collision (and that the rectangle can't move), the ball must rebound at the same velocity it impacted with.&#xD;&#xA;&#xD;&#xA;Let (nDx, nDy) be the velocity after collision, (oDx, oDy) the velocity before collision, and (x,y) the position of the ball at the point of collision. Let's further assume the corner the ball collides with is at (0,0).&#xD;&#xA;&#xD;&#xA;Expressing our insights as formulae, we have:&#xD;&#xA;&#xD;&#xA;    (nDx, nDy) = (oDx, oDy) + c * (x, y)&#xD;&#xA;    length (nDx, nDy) = length (oDx, oDy)&#xD;&#xA;&#xD;&#xA;Which is equivalent to:&#xD;&#xA;&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;    nDx^2 + nDy^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Substituting the first two equations in the last one, we get:&#xD;&#xA;&#xD;&#xA;    (oDx + c * x)^2 + (oDy + c * y)^2 = oDx^2 + oDy^2&#xD;&#xA;&#xD;&#xA;Expanding using the binomial thorem&#xD;&#xA;&#xD;&#xA;    (a+b)^2 = a^2 + 2ab + b^2 &#xD;&#xA;&#xD;&#xA;yields:&#xD;&#xA;&#xD;&#xA;    oDx^2 + 2 * oDx * c * x + (c * x) ^ 2 + oDy^2 + 2 * oDy * c * y + (c * y) ^ 2 = oDx^2 + oDy^2&#xD;&#xA;    2 * oDx * c * x + 2 * oDy * c * y + (c * x) ^ 2 + (c * y) ^ 2 = 0&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) * c + (x^2 + y^2) * c^2 = 0&#xD;&#xA;&#xD;&#xA;This quadratic equation for `c` has two solutions, one of which is 0. Obviously, that's not the solution we are interested in, as generally the direction of the ball will change as a result of the collision. To get the other solution, we divide both sides by c and get:&#xD;&#xA;&#xD;&#xA;    (2 * oDx * x + 2 * oDy * y) + (x^2 + y^2) * c = 0&#xD;&#xA;&#xD;&#xA;That is:&#xD;&#xA;&#xD;&#xA;     c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;&#xD;&#xA;To summarize, we have:&#xD;&#xA;&#xD;&#xA;    c = -(2 * oDx * x + 2 * oDy * y) / (x^2 + y^2)&#xD;&#xA;    nDx = oDx + c * x&#xD;&#xA;    nDy = oDy + c * y&#xD;&#xA;&#xD;&#xA;**Edit**: In code:&#xD;&#xA;&#xD;&#xA;    if (collision) {&#xD;&#xA;        float x = ballX - cornerX;&#xD;&#xA;        float y = ballY - cornerY;&#xD;&#xA;        float c = -2 * (ballDx * x + ballDy * y) / (x * x + y * y);&#xD;&#xA;        ballDx = ballDx + c * x;&#xD;&#xA;        ballDy = ballDy + c * y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A few implementation considerations: While you can approximate (x,y) with the ball's position after the simulation step, this approximation will change the angle of deflection and hence be very noticeable, so your simulation steps need to be very fine (perhaps such that the ball doesn't move more than 1/20 of its diamater per step). For a more accurate solution, you could compute the time the collision occurs, and split that simulation step at that time, i.e. do a partial step until the point of collision, and another partial step for the remainder of the step.&#xD;&#xA;&#xD;&#xA;**Edit 2: Computing the point of impact**&#xD;&#xA;&#xD;&#xA;Let r be the radius, (x0, y0) the position and (dx, dy) the velocity of the ball at the beginning of the simulation step. For simplicity, let's further assume that the corner in question is located at (0,0).&#xD;&#xA;&#xD;&#xA;We know:&#xD;&#xA;&#xD;&#xA;    (x,y) = (x0, y0) + (dx, dy) * t&#xD;&#xA;&#xD;&#xA;We want&#xD;&#xA;&#xD;&#xA;    length(x,y) = r&#xD;&#xA;&#xD;&#xA;That is&#xD;&#xA;&#xD;&#xA;    (x0 + dx * t) ^ 2 + (y0 + dy * t) ^ 2 = r^2&#xD;&#xA;    x0^2 + 2 * x0 * dx * t + dx^2 * t^2 + y0^2 + 2 * y0 * dy * t + dy^2 * t^2 = r ^ 2&#xD;&#xA;    (dx^2 + dy^2) * t^2 + (2 * x0 * dx + 2 * y0 * dy) * t + (x0^2 + y0^2 - r^2) = 0&#xD;&#xA;    \____  _____/         \____________  ___________/       \_______  ________/&#xD;&#xA;         \/                            \/                           \/&#xD;&#xA;         a                             b                            c&#xD;&#xA;&#xD;&#xA;That is a [quadratic equation](http://en.wikipedia.org/wiki/Quadratic_equation) in t. If its discriminant &#xD;&#xA;&#xD;&#xA;    D = b^2 - 4 * a * c&#xD;&#xA;&#xD;&#xA;is negative, it has no solutions, i.e. the ball will never hit the corner on its present course. Otherwise, its two solutions are given by &#xD;&#xA;&#xD;&#xA;    t1 = (-b - sqrt(D)) / (2 * a)&#xD;&#xA;    t2 = (-b + sqrt(D)) / (2 * a)&#xD;&#xA;&#xD;&#xA;We are interested in the time the collision started, which is the earlier time `t1`.&#xD;&#xA;&#xD;&#xA;Your method would become:&#xD;&#xA;&#xD;&#xA;        // compute a,b,c and D as given above&#xD;&#xA;        &#xD;&#xA;        if (D &gt;= 0) {&#xD;&#xA;            t = (-b - sqrt(D)) / (2 * a);&#xD;&#xA;            if (0 &lt; t &amp;&amp; t &lt;= ts) {&#xD;&#xA;                // collision during this timestep!&#xD;&#xA;&#xD;&#xA;                x = x + t * dx;&#xD;&#xA;                y = y + t * dy;&#xD;&#xA;                ts = ts - t;&#xD;&#xA;                &#xD;&#xA;                // change dx and dy using the deflection formula &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;            &#xD;&#xA;        x = x + ts * dx;&#xD;&#xA;        y = y + ts * dy;&#xD;&#xA;" />
  <row Id="23521" PostHistoryTypeId="2" PostId="11079" RevisionGUID="1b421e83-fc9c-4907-87ab-356f78b4aec3" CreationDate="2011-04-13T19:22:23.340" UserId="2768" Text="I'm pretty confident programming in Objective-C and C++, but I find Objective-C to be somewhat easier to use and more flexible and dynamic in nature.&#xD;&#xA;&#xD;&#xA;What would be the pros and cons when using C++ instead of Obj-C for writing games in iOS? &#xD;&#xA;&#xD;&#xA;For instance, I suspect  there might be performance issues in Obj-C code as compared to C++." />
  <row Id="23522" PostHistoryTypeId="1" PostId="11079" RevisionGUID="1b421e83-fc9c-4907-87ab-356f78b4aec3" CreationDate="2011-04-13T19:22:23.340" UserId="2768" Text="Objective-C or C++ for iOS games?" />
  <row Id="23523" PostHistoryTypeId="3" PostId="11079" RevisionGUID="1b421e83-fc9c-4907-87ab-356f78b4aec3" CreationDate="2011-04-13T19:22:23.340" UserId="2768" Text="&lt;c++&gt;&lt;ios&gt;&lt;language-choice&gt;&lt;objective-c&gt;" />
  <row Id="23524" PostHistoryTypeId="2" PostId="11080" RevisionGUID="d078c206-111e-4519-b556-b8fe8be3767c" CreationDate="2011-04-13T19:35:05.287" UserId="6708" Text="I have a 3d world in a grid layout where each grid cell contains its separate vertex and index buffer for the mesh/terrain of that cell.&#xD;&#xA;&#xD;&#xA;When the player moves outside the boundaries of his cell, i dynamically load more cells in his walking direction based on his viewing distance. This triggers x number of vertex and indexbuffer initializations depending on how many cells that needs to be generated and causes the framerate to drop annoyingly during this time.&#xD;&#xA;&#xD;&#xA;The generation of terrain data is handled in a separate thread and runs smoothly.&#xD;&#xA;The vertex and index buffers are added during the update cycle of the game loop.&#xD;&#xA;&#xD;&#xA;I´ve tried batching the number of cells to be processed to avoid sending too much data at once into the buffers, which worked ok at a shorter viewing distance (about 9 cells to process), but not as well at greater distances with around 30 cells to process.&#xD;&#xA;&#xD;&#xA;Any idea how i can optimize this?" />
  <row Id="23525" PostHistoryTypeId="1" PostId="11080" RevisionGUID="d078c206-111e-4519-b556-b8fe8be3767c" CreationDate="2011-04-13T19:35:05.287" UserId="6708" Text="XNA VertexBuffer.SetData performance suggestions" />
  <row Id="23526" PostHistoryTypeId="3" PostId="11080" RevisionGUID="d078c206-111e-4519-b556-b8fe8be3767c" CreationDate="2011-04-13T19:35:05.287" UserId="6708" Text="&lt;xna-4.0&gt;" />
  <row Id="23527" PostHistoryTypeId="5" PostId="11079" RevisionGUID="8234de23-b2ff-4106-9f5b-6f668293bdd8" CreationDate="2011-04-13T19:40:42.763" UserId="2768" Comment="added 90 characters in body" Text="I'm pretty confident programming in Objective-C and C++, but I find Objective-C to be somewhat easier to use and more flexible and dynamic in nature.&#xD;&#xA;&#xD;&#xA;What would be the pros and cons when using C++ instead of Obj-C for writing games in iOS? Or rather, are there any known problems with using Obj-C as compared to C++? &#xD;&#xA;&#xD;&#xA;For instance, I *suspect* there might be performance issues with Obj-C compared to code written in C/C++." />
  <row Id="23528" PostHistoryTypeId="2" PostId="11081" RevisionGUID="883d9abe-35f6-4301-8d02-54a3b4a8c8df" CreationDate="2011-04-13T20:04:25.833" UserId="6117" Text="It depends on exactly *what* you are programming. If it's mainly game logic using existing physics and graphics engines, i can safely say i don't see any reason to use c or c++ if you're more comfortable with obj-c. If you are going to be rolling out rendering or physics classes i would probably write those using c or c++. Cocos2d - which is a wonderful and one of the most popular iOS game libraries is written in obj-c. &#xD;&#xA;&#xD;&#xA;Check out this read:&#xD;&#xA;[Managed code in games][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2008/02/26/managed-code-in-games/&#xD;&#xA;&#xD;&#xA;While objective-c overhead should be no where near C#, i believe the logic still applies, and the iOS is also no where near as strong as the PC that would be interpreting MSIL :)" />
  <row Id="23529" PostHistoryTypeId="5" PostId="11081" RevisionGUID="adcb3c85-b7ef-4225-b63a-b7549d7c4ef7" CreationDate="2011-04-13T20:16:04.200" UserId="6117" Comment="added 160 characters in body" Text="It depends on exactly *what* you are programming. If it's mainly game logic using existing physics and graphics engines, i can safely say i don't see any reason to use c or c++ if you're more comfortable with obj-c. If you are going to be rolling out rendering or physics classes i would probably write those using c or c++. Cocos2d - which is a wonderful and one of the most popular iOS game libraries is written in obj-c. &#xD;&#xA;&#xD;&#xA;Check out this read - the relevant part is &quot;division of labor&quot;, might help you to decide when to code in a higher level language and when to use lower level:&#xD;&#xA;[Managed code in games][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2008/02/26/managed-code-in-games/&#xD;&#xA;&#xD;&#xA;While objective-c overhead should be no where near C# and isn't even managed, i believe the logic still applies, and the iOS is also no where near as strong as the PC that would be interpreting MSIL :)" />
  <row Id="23530" PostHistoryTypeId="2" PostId="11082" RevisionGUID="53a1d346-36f7-4ffb-9e54-2451da9fa4f0" CreationDate="2011-04-13T20:18:45.743" UserId="6042" Text="Games were once written in machine language, because they had exotic hardware for which there was no compiler. The hardware also lacked features that C programmers take for granted, such as efficient 16-bit integer math.&#xD;&#xA;&#xD;&#xA;Once games settled on familiar hardware, C compilers became available and in a short time all games were written in C.&#xD;&#xA;&#xD;&#xA;C++ seemed like a good idea at one time, and most games are C++ today, but engineers are now mumbling about a return to C, and that might actually happen. I would love to work on a game in C, and so would many coworkers. There's no feature new to C++ that I think improves games.&#xD;&#xA;&#xD;&#xA;It would seem now that computers are 1000x faster than a few years ago, a high level language would reduce development time ($) making C obsolete.&#xD;&#xA;&#xD;&#xA;This has not happened because game buyers know that the hardware is 1000x better, and want to trade their dollars for a game that looks and sounds 1000x better. This removes the slack from the system that a high level language would consume.&#xD;&#xA;&#xD;&#xA;Performance requirements in games are brutal. A new frame of graphics must be rendered in under 33ms (or 16ms!) without fail. Everything the hardware does must be accounted for, so that this budget can be met. Any language that goes off and does something with the hardware that the programmer doesn't understand or expect is going to make it very hard to meet this budget. This is an automatic minus against anything high-level.&#xD;&#xA;&#xD;&#xA;Game programmers not only work in a low-level language, but they shun high-level data structures and algorithms too. Games typically don't have linked lists and seldom have trees. There is a movement towards avoiding pointers whenever possible. Any algorithm with more than O(N) time or O(1) space tends not to find wide use.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23531" PostHistoryTypeId="5" PostId="11081" RevisionGUID="a6e8bdbe-d7f1-42bb-aaaf-04afd880477a" CreationDate="2011-04-13T20:22:47.097" UserId="6117" Comment="added 9 characters in body" Text="It depends on exactly *what* you are programming. If it's mainly game logic using existing physics and graphics engines, i can safely say i don't see any reason to use c or c++ if you're more comfortable with obj-c. If you are going to be rolling out rendering or physics classes i would probably write those using c or c++. Cocos2d - which is a wonderful and one of the most popular iOS game libraries is written in obj-c. &#xD;&#xA;&#xD;&#xA;Check out this read - the relevant part is &quot;division of labor&quot;, might help you to decide when to code in a higher level language and when to use lower level:&#xD;&#xA;[Managed code in games][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2008/02/26/managed-code-in-games/&#xD;&#xA;&#xD;&#xA;While objective-c overhead should be no where near C# and isn't even managed (on iOS), i believe the logic still applies, and the iOS is also no where near as strong as the PC that would be interpreting MSIL :)" />
  <row Id="23532" PostHistoryTypeId="2" PostId="11083" RevisionGUID="ce16ed3e-7323-42a4-8d62-e627036c74f2" CreationDate="2011-04-13T20:38:43.293" UserId="3884" Text="Is it a good move to disable windows' file-caching capabilities (via I/O completion ports) for resource loading in a game environment? Most games will do their own resource management and caching anyways, so the OS will probably cache it a second time. Of course, you don't get the caching across the process' lifetime, but that's usually not a big downside. On the other hand, it probably makes file loading times more predictable - so you can actually give accurate load-time predictions." />
  <row Id="23533" PostHistoryTypeId="1" PostId="11083" RevisionGUID="ce16ed3e-7323-42a4-8d62-e627036c74f2" CreationDate="2011-04-13T20:38:43.293" UserId="3884" Text="File caching on the PC" />
  <row Id="23534" PostHistoryTypeId="3" PostId="11083" RevisionGUID="ce16ed3e-7323-42a4-8d62-e627036c74f2" CreationDate="2011-04-13T20:38:43.293" UserId="3884" Text="&lt;windows&gt;&lt;loading&gt;" />
  <row Id="23535" PostHistoryTypeId="5" PostId="11053" RevisionGUID="f8ade47b-ca1f-4d9f-89b3-13e6fada42fe" CreationDate="2011-04-13T20:46:18.473" UserId="6178" Comment="deleted 5 characters in body" Text="I'm using Windows 7 and most people in the group of this specific OpenGL project is too, there's only one member on Windows XP. We are all using Visual Studio 2010 though. I don't know if the OpenGL headers come with VS or with Windows but I would assume it's VS. And since we are all using the same VS version, albeit not the same SKU, I'm also assuming we all have the same OpenGL headers and version running on our systems.&#xD;&#xA;&#xD;&#xA;That said, the version installed on my system (note that I haven't installed anything OpenGL related) is 2.1 and it does support `GL_GENERATE_MIPMAP`, I don't need to resort ot the SGIS extension.&#xD;&#xA;&#xD;&#xA;However, the Windows headers only support version 1.1. To work around that, I'm using GLEW. I also noticed that both `GL_GENERATE_MIPMAP_SGIS` and `GL_GENERATE_MIPMAP` have the same exact values defined.&#xD;&#xA;&#xD;&#xA;So my question is, should I do the following on my texture loading routine:&#xD;&#xA;&#xD;&#xA;    if(GLEW_SGIS_generate_mipmap) {&#xD;&#xA;    	glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);&#xD;&#xA;    	glTexImage2D(GL_TEXTURE_2D, 0, glFormat, texWidth, texHeight, 0, glFormat,&#xD;&#xA;    		GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;    } else {&#xD;&#xA;    	gluBuild2DMipmaps(GL_TEXTURE_2D, glFormat, texWidth, texHeight, glFormat,&#xD;&#xA;    		GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;...or can I just assume everything will work and just do this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);&#xD;&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, glFormat, texWidth, texHeight, 0, glFormat,&#xD;&#xA;    	GL_UNSIGNED_BYTE, texPixels);&#xD;&#xA;&#xD;&#xA;?&#xD;&#xA;&#xD;&#xA;I would think that this code would fail (and the game wouldn't probably run) if the OpenGL version doesn't support mipmapping generation like that, but nowadays, most people probably have OpenGL 2.1 on their systems right, probably in Windows XP too (without any development tools installed)?&#xD;&#xA;&#xD;&#xA;Also, another small question...&#xD;&#xA;&#xD;&#xA;My laptop has 2 graphics card, one integrated (Intel) and the other dedicated (NVIDIA), with NVIDIA Optimus technology. Mipmapping using the dedicated GPU seems to have better quality. I mean, the integrated card mipmapping seems more pixelized in near planes (I'm talking about a plane terrain texture) than the dedicated one. And when I move the camera, the near pixels &quot;blink&quot; a little (with the integrated card) and it's distracting, while the far pixels look nicely linear. Yes, I'm using `GL_LINEAR_MIPMAP_LINEAR` for the minifying filter. Anyway to fix this?" />
  <row Id="23536" PostHistoryTypeId="2" PostId="11084" RevisionGUID="83cbede2-ffca-4414-848a-58654822197f" CreationDate="2011-04-13T20:46:56.197" UserId="1929" Text="&gt; Premature optimization is the root of much evil.&#xD;&#xA;&#xD;&#xA;If your goal is loading-time prediction, I would say **leave the OS file-caching in place.** It's probably general, but well-written, so I would say that you shouldn't disable it unless:&#xD;&#xA;&#xD;&#xA;- You have a very good reason to do so, and&#xD;&#xA;- You can measurably prove that disabling it is beneficial in your case.&#xD;&#xA;&#xD;&#xA;Otherwise, it's probably not worth the work; and in the worst case (average case?), you may even *decrease* efficiency.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23537" PostHistoryTypeId="2" PostId="11085" RevisionGUID="f1e549f6-ad29-4652-b345-b77cae6ad461" CreationDate="2011-04-13T20:47:02.513" UserId="323" Text="I'd say no. Windows will be using spare memory for this caching - it's basically free. Unless you've got a fancy system to somehow expand your process memory to cache more data when Windows is under low load, and then contract it again when Windows decides it wants more memory, just let the computer do what it's good at it.&#xD;&#xA;&#xD;&#xA;I don't think increasing load time in order to give better load-time predictions is a good tradeoff :)" />
  <row Id="23538" PostHistoryTypeId="2" PostId="11086" RevisionGUID="0f565a5a-f5a0-4af6-96f5-b486bb8ecf25" CreationDate="2011-04-13T20:48:49.470" UserId="323" Text="One big upside to C++: If you decide to do so, it'll be relatively easy to port to Android/PC/DS/PSP/(insert platform of choice here). Objective-C will lock you into iOS until you decide to rewrite the entire game." />
  <row Id="23539" PostHistoryTypeId="5" PostId="11082" RevisionGUID="892c8158-8680-456a-9ec7-80f4ff768f85" CreationDate="2011-04-13T20:57:46.333" UserId="6042" Comment="added 151 characters in body" Text="Games were once written in machine language, because they had exotic hardware for which there was no compiler. The hardware also lacked features that C programmers take for granted, such as efficient 16-bit integer math.&#xD;&#xA;&#xD;&#xA;Once games settled on familiar hardware, C compilers became available and in a short time all games were written in C.&#xD;&#xA;&#xD;&#xA;C++ seemed like a good idea at one time, and most games are C++ today, but engineers are now mumbling about a return to C, and that might actually happen. I would love to work on a game in C, and so would many coworkers. There's no feature new to C++ that I think improves games.&#xD;&#xA;&#xD;&#xA;It would seem now that computers are 1000x faster than a few years ago, a high level language would reduce development time ($) making C obsolete.&#xD;&#xA;&#xD;&#xA;This has not happened because game buyers know that the hardware is 1000x better, and want to trade their dollars for a game that looks and sounds 1000x better. This removes the slack from the system that a high level language would consume.&#xD;&#xA;&#xD;&#xA;Performance requirements in games are brutal. A new frame of graphics must be rendered in under 33ms (or 16ms!) without fail. Everything the hardware does must be accounted for, so that this budget can be met. Any language that goes off and does something with the hardware that the programmer doesn't understand or expect is going to make it very hard to meet this budget. This is an automatic minus against anything high-level.&#xD;&#xA;&#xD;&#xA;Game programmers not only work in a low-level language, but they shun high-level data structures and algorithms too. Games typically don't have linked lists and seldom have trees. There is a movement towards avoiding pointers whenever possible*. Any algorithm with more than O(N) time or O(1) space tends not to find wide use.&#xD;&#xA;&#xD;&#xA;*If a pointer doesn't cause a cache miss, then why spend 32 bits to store it? If a pointer does cause a cache miss, best get rid of that cache miss.&#xD;&#xA;" />
  <row Id="23540" PostHistoryTypeId="25" PostId="11083" RevisionGUID="8f5bbb12-2cdd-4c4a-98b0-ba226f17f8d9" CreationDate="2011-04-13T21:09:27.477" Comment="http://twitter.com/#!/StackGameDev/status/58275629522628609" />
  <row Id="23541" PostHistoryTypeId="2" PostId="11087" RevisionGUID="8a1ba577-ecef-4048-bc92-4b0df0bdfe34" CreationDate="2011-04-13T21:10:00.457" UserId="5639" Text="Do you need to process all the new cells at once or could you queue them up and do a few each frame?  Is the terrain data in memory or are you loading it from disk and processing it all on your main thread? (if so, perhaps you could read the data on a background thread).&#xD;&#xA;" />
  <row Id="23542" PostHistoryTypeId="2" PostId="11088" RevisionGUID="418fc35e-d382-46a8-aa9c-19a3bcebb032" CreationDate="2011-04-13T21:19:31.057" UserId="6558" Text="What you want is typically called 'color blending'.  There's a blog post about how to do it in silverlight here: http://blogs.silverarcade.com/silverlight-games-101/15/silverlight-blitting-and-blending-with-silverlights-writeablebitmap/&#xD;&#xA;&#xD;&#xA;As far as what colors to use at different times of the day, that's a much harder question to answer.  The colors you included in your post might work, but you might have to play around a bit with the exact values to make everything look 'good'.&#xD;&#xA;&#xD;&#xA;It might be worth pointing out that adding shadows to the sprites would likely go a long way to improving the effect of changing the time of day." />
  <row Id="23543" PostHistoryTypeId="2" PostId="11089" RevisionGUID="faefffcd-40b1-4dad-b2ba-a2f66df73c93" CreationDate="2011-04-13T21:28:03.963" UserId="1705" Text="I'm making a simple FPS and I can't decide on the size of my models and my camera settings. Could someone please recommend a good combination of:&#xD;&#xA;&#xD;&#xA; - **camera field of view**&#xD;&#xA; - **near and far planes**&#xD;&#xA; - **model proportions** (such as 1 unit = 1 meter)&#xD;&#xA;&#xD;&#xA;so that the game looks realistic enough and the numbers are easy to work with?" />
  <row Id="23544" PostHistoryTypeId="1" PostId="11089" RevisionGUID="faefffcd-40b1-4dad-b2ba-a2f66df73c93" CreationDate="2011-04-13T21:28:03.963" UserId="1705" Text="Recommended 3D camera settings and model sizes for an FPS" />
  <row Id="23545" PostHistoryTypeId="3" PostId="11089" RevisionGUID="faefffcd-40b1-4dad-b2ba-a2f66df73c93" CreationDate="2011-04-13T21:28:03.963" UserId="1705" Text="&lt;3d&gt;&lt;camera&gt;&lt;first-person-shooter&gt;" />
  <row Id="23546" PostHistoryTypeId="2" PostId="11090" RevisionGUID="4e929cc7-12b3-4eb6-882a-0254aa7cb882" CreationDate="2011-04-13T21:31:43.730" UserId="6715" Text="Legacy and momentum. &#xD;&#xA;&#xD;&#xA;Once upon a time code was written in assembler for ultimate performance. As compute power increased, compiled languages became more viable, and C offered the best compromise between power and productivity, at a very basic level being little more than a macro assembler.&#xD;&#xA;&#xD;&#xA;C++ was just the natural successor to C. You throw away no former code or knowledge, yet have the potential to expand into new methodologies. C++ is ultimately very flexible, and I've yet to see a design paradigm that can't be at least simulated in C++, whilst being able to maintain near total control over performance.&#xD;&#xA;" />
  <row Id="23547" PostHistoryTypeId="2" PostId="11091" RevisionGUID="256f407d-115a-4325-b9db-5ecc1375a8b6" CreationDate="2011-04-13T21:32:21.013" UserId="6690" Text="There are no real pros or cons here, at least none that should force a programmer comfortable in one language to have to use the other.&#xD;&#xA;&#xD;&#xA;Performance shouldn't be an issue. It's unlikely that you'd write any heavy lifting with lots of messaging in the inner loops if you're a good Obj-C programmer, which means you'll really be writing those inner loops in C. If you're not a low level programmer, chances are the heavy lifting will be done by whatever libraries you chose to defer that too, and you'll be at the mercy of whatever they've chosen to do. &#xD;&#xA;&#xD;&#xA;Portability _is_ a real issue, if you care about it. If not, then meh. Being cross platform isn't the end all be all. Being successful on one first would be nice :) You can always port later. If you're not carefully planning to be cross platform from day 1 anyway, just being in the same language won't get you very far: there are plenty of further real differences between platforms that need addressing.&#xD;&#xA;&#xD;&#xA;Finishing the project is more important that fretting about the tech, and if you're more productive in Obj-C then stay in Obj-C.&#xD;&#xA;&#xD;&#xA;My preference? I'm a C++ guy. I like Obj-C just fine, but I'm happy in C++, and I _do_ write cross platform code." />
  <row Id="23548" PostHistoryTypeId="2" PostId="11092" RevisionGUID="e074ea76-6acd-4122-9fb0-daec1a1bb7e8" CreationDate="2011-04-13T21:40:35.923" UserId="3505" Text="For wide-screens you'd want a field of view around 1 (equal to 90 degrees of horizontal vision). Experiment a bit to find out what looks good for a default, but do give players the means to adjust it.&#xD;&#xA;&#xD;&#xA;Near and far planes should ideally be as restricted as possible without clipping, but given a 24 bit Z-buffer it's not very important to restrict them tightly.&#xD;&#xA;&#xD;&#xA;You can use what scale you like, it won't make any practical difference." />
  <row Id="23549" PostHistoryTypeId="2" PostId="11093" RevisionGUID="96c1bad1-891f-49fd-a74f-3926e9852f1e" CreationDate="2011-04-13T21:42:15.610" UserId="6690" Text="If you're developing for the consoles, you have no choice: the professional SDKs only come in C++ flavors. Usually they also have C access to most things.&#xD;&#xA;&#xD;&#xA;Because many developers are Consoles + PC, it makes sense to do all their PC work in the same language and directly share tech.&#xD;&#xA;&#xD;&#xA;Because that's where the pro industry lives, and most everyone wants to be a part of that, most game programmers are C++ programmers.&#xD;&#xA;&#xD;&#xA;Because all of that happens, most engine developers are C++ developers too, so when evaluating professional grade engines almost all your choices will be C++.&#xD;&#xA;&#xD;&#xA;It's all a big self sustaining engine. Disrupting it would require more than just technical advancement." />
  <row Id="23550" PostHistoryTypeId="2" PostId="11094" RevisionGUID="d0a3226c-8fdd-4614-9104-759f937c5707" CreationDate="2011-04-13T21:43:03.660" UserId="3794" Text=" - **camera FOV** - near to human eye fov -&gt; 60 degrees, but you can play with that&#xD;&#xA; - **near and far planes** - near plane is usualy 0.1 distance, but far plane have to be as near as possible to gain the best depth buffer accurancy. Same for near plane, it should be as far as possible.&#xD;&#xA; - **model proportions** - use whatever you like. But meters are just fine." />
  <row Id="23551" PostHistoryTypeId="5" PostId="11089" RevisionGUID="559e2ccf-6f71-4f76-a584-a6ce2f93c9a2" CreationDate="2011-04-13T21:49:21.630" UserId="1705" Comment="added 119 characters in body; deleted 2 characters in body" Text="I'm making a simple FPS and I can't decide on the size of my models and my camera settings. Could someone please recommend a good combination of:&#xD;&#xA;&#xD;&#xA; - **camera field of view**&#xD;&#xA; - **near and far planes**&#xD;&#xA; - **model proportions** (such as 1 unit = 1 meter)&#xD;&#xA;&#xD;&#xA;so that the game looks realistic enough and the numbers are easy to work with?&#xD;&#xA;&#xD;&#xA;**EDIT:** I know I can use whatever dimensions I want, but I'd like to know what is most commonly found in games." />
  <row Id="23552" PostHistoryTypeId="5" PostId="11092" RevisionGUID="5988f271-12da-45ec-8297-3143610ea8ab" CreationDate="2011-04-13T22:03:24.780" UserId="3505" Comment="added 208 characters in body" Text="For wide-screens you'd want a field of view around 1 (equal to 90 degrees of horizontal vision). Experiment a bit to find out what looks good for a default, but do give players the means to adjust it.&#xD;&#xA;&#xD;&#xA;Near and far planes should ideally be as restricted as possible without clipping, but given a 24 bit Z-buffer it's not very important to restrict them tightly.&#xD;&#xA;&#xD;&#xA;You can use what scale you like, it won't make any practical difference. 1 unit ~= 1 meter is probably the most common, but it's not like you are going to run into issues if a designer use a different scale than the game, it takes virtually no effort to rescale a model as needed." />
  <row Id="23553" PostHistoryTypeId="2" PostId="11095" RevisionGUID="b7eb5906-a0e8-4e34-ba9b-84504fa22988" CreationDate="2011-04-13T22:18:25.670" UserId="6562" Text="I am trying to draw point sprites in OpenGL ES 2.0, but all my points end up with a size of 1 pixel...even when I set gl_PointSize to a high value in my vertex shader.&#xD;&#xA;&#xD;&#xA;How can I make my point sprites bigger?" />
  <row Id="23554" PostHistoryTypeId="1" PostId="11095" RevisionGUID="b7eb5906-a0e8-4e34-ba9b-84504fa22988" CreationDate="2011-04-13T22:18:25.670" UserId="6562" Text="OpenGL ES 2.0 Point Sprites Size" />
  <row Id="23555" PostHistoryTypeId="3" PostId="11095" RevisionGUID="b7eb5906-a0e8-4e34-ba9b-84504fa22988" CreationDate="2011-04-13T22:18:25.670" UserId="6562" Text="&lt;opengl&gt;&lt;3d&gt;&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="23556" PostHistoryTypeId="2" PostId="11096" RevisionGUID="54727720-0ba7-4ecf-af32-db26375175c9" CreationDate="2011-04-13T22:21:36.780" UserId="3794" Text="[Color temperature][1]&#xD;&#xA;&#xD;&#xA;But basicly it is orange at the morning and evening. White at the day. And blue is used for the night. &#xD;&#xA;&#xD;&#xA;For creating shadows you may find useful program [crazybump][2], which can create normal maps for 2D textures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Color_temperature&#xD;&#xA;  [2]: http://www.crazybump.com/" />
  <row Id="23557" PostHistoryTypeId="5" PostId="11081" RevisionGUID="a9a7ab1d-fe09-47e1-be92-f3723a178c12" CreationDate="2011-04-13T23:33:32.393" UserId="6117" Comment="added 13 characters in body" Text="It depends on exactly *what* you are programming. If it's mainly game logic using existing physics and graphics engines, i can safely say i don't see any reason to use c or c++ if you're more comfortable with obj-c. If you are going to be rolling out rendering or physics classes i would probably write those using c or c++. Cocos2d - which is a wonderful and one of the most popular iOS game libraries is written in obj-c. &#xD;&#xA;&#xD;&#xA;Check out this read - the relevant part is &quot;division of labor&quot;, might help you to decide when to code in a higher level language and when to use lower level:&#xD;&#xA;[Managed code in games][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2008/02/26/managed-code-in-games/&#xD;&#xA;&#xD;&#xA;While objective-c overhead should be no where near C# and isn't even managed (on iOS), i believe the logic still applies, and devices running iOS are also no where near as strong as the PC that would be interpreting MSIL :)" />
  <row Id="23558" PostHistoryTypeId="2" PostId="11097" RevisionGUID="6d024f42-6e9b-4ef9-a831-d7d920f36f93" CreationDate="2011-04-13T23:56:37.450" UserId="6719" Text="FWIW: C# is gaining in popularity for game development. See [Miguel de Icaza's blog post][1].&#xD;&#xA;Very interesting read, IMHO.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tirania.org/blog/archive/2011/Mar-07.html" />
  <row Id="23559" PostHistoryTypeId="2" PostId="11098" RevisionGUID="7eb161ac-bc56-45e5-8214-fd28b76de6ec" CreationDate="2011-04-14T00:00:13.050" UserId="2693" Text="Lighting/shading needs to be more advanced than just a binary decision. Blocks are not either lit or unlit completely by a light, they can be partially lit. Sometimes the face should be totally shiny, in which case it is being hit directly by the light. Sometimes you only want the ambient light, if it is completely untouched by the light. However, when it is partially obscured, you need to give it a light value between fully lit and fully unlit.&#xD;&#xA;&#xD;&#xA;The standard basic lighting method shifts from zero light to maximum light based on the difference in angle between the incoming light ray and the surface normal of the face you are lighting.&#xD;&#xA;&#xD;&#xA;If the normal of the surface is equal (or opposite, depending upon how you're looking at it) then you have maximum brightness. As the angle between the incoming light and the surface normal increases, you get less and less light on that face from that light.&#xD;&#xA;&#xD;&#xA;This way, with two lights, each face should receive a brightness that is a combination of how much brightness each light puts on each face based on its angle. &#xD;&#xA;&#xD;&#xA;This should be much more natural than trying to determine if a single face is lit or not. You'll have a natural gradient as surfaces get further away from the light, and you'll get balancing for surfaces effected by more than one light." />
  <row Id="23560" PostHistoryTypeId="25" PostId="11089" RevisionGUID="d1601b62-dd93-4258-b954-9155b73e3408" CreationDate="2011-04-14T00:09:27.707" Comment="http://twitter.com/#!/StackGameDev/status/58320929549336576" />
  <row Id="23561" PostHistoryTypeId="5" PostId="11037" RevisionGUID="decb1b9a-0045-4f59-97bf-3edd2812e426" CreationDate="2011-04-14T01:12:38.533" UserId="3403" Comment="added 1 characters in body" Text="I'm looking to create an FoV implementation and I was wondering which algorithm is faster - raycasting or shadowcasting?" />
  <row Id="23562" PostHistoryTypeId="2" PostId="11099" RevisionGUID="99550861-ca00-4307-8417-8406845236e3" CreationDate="2011-04-14T01:21:31.513" UserId="3830" Text="I'd suggest playing around with Photoshop (if you've got it) with different color/layer overlays, and see if you can't get the visual effect you're looking for.  If you can find it, duplicate it in code.&#xD;&#xA;&#xD;&#xA;If the sky is visible, consider the idea of fading between two different background images (night sky, day sky).  If you're using sprites, you could also consider animating a moon/sun in the sky.&#xD;&#xA;&#xD;&#xA;Also, take a look at (as in play) World of Warcraft.  Yes, it's 3D, and it has a dynamically lit day/night cycle, but at the same time shadows and lighting of things is totally baked on - the shadows don't move.  It's more like what you see in TV shows where they don't actually film at night, but instead film during the day and apply a night time filter.  In fact you might consider googling around for how this is done for film as it might give some hints.&#xD;&#xA;" />
  <row Id="23563" PostHistoryTypeId="2" PostId="11100" RevisionGUID="1af9de7a-12ca-4d6f-aeea-319e6181de80" CreationDate="2011-04-14T01:34:10.423" UserId="6722" Text="I am looking to implement an extremely rudimentary FPS game with extremely rudimentary 3D graphics using C++ .NET and DirectX.&#xD;&#xA;&#xD;&#xA;I'm not interested in any third party libraries or anything special like that.&#xD;&#xA;&#xD;&#xA;Having never done graphics based programming besides 2D stuff I don't really know where to get started or even how to find the right resources online.&#xD;&#xA;&#xD;&#xA;I have a few weeks to build this game so im trying to keep it simple.&#xD;&#xA;&#xD;&#xA;Can anyone give me a little guidance on how to get started?" />
  <row Id="23564" PostHistoryTypeId="1" PostId="11100" RevisionGUID="1af9de7a-12ca-4d6f-aeea-319e6181de80" CreationDate="2011-04-14T01:34:10.423" UserId="6722" Text="Rudimentary 3D graphics in C++ .NET" />
  <row Id="23565" PostHistoryTypeId="3" PostId="11100" RevisionGUID="1af9de7a-12ca-4d6f-aeea-319e6181de80" CreationDate="2011-04-14T01:34:10.423" UserId="6722" Text="&lt;game-design&gt;&lt;c++&gt;&lt;3d&gt;&lt;directx&gt;" />
  <row Id="23566" PostHistoryTypeId="6" PostId="11100" RevisionGUID="b1bde394-dd54-4a9c-b9d9-6006fcae6be6" CreationDate="2011-04-14T01:45:06.100" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;3d&gt;&lt;directx&gt;" />
  <row Id="23567" PostHistoryTypeId="2" PostId="11101" RevisionGUID="69fec793-bc83-4c49-93ec-8b15af054cd4" CreationDate="2011-04-14T01:50:18.987" UserId="6042" Text="Download the DirectX SDK and fire up the sample code that puts a rainbow colored 3D shape on screen. Try making it draw more shapes. Try making it so that big shapes can shoot little shapes out of them. Try moving the shapes around. Try moving the camera around.&#xD;&#xA;&#xD;&#xA;You can have a fully playable (but weird) game up and running in an evening that way. Later, you can worry about getting more sophisticated one step at a time. For example, keep the game playable while replacing the rainbow colored 3D shape with a mesh that looks like a person or a bullet or a tank.&#xD;&#xA;&#xD;&#xA;The key point is to keep the thing playable at all times. That's where the fun is, and it will motivate you to go back again and again to fix &quot;one more detail.&quot; It's like the folk story of [Stone Soup][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Stone_soup" />
  <row Id="23571" PostHistoryTypeId="25" PostId="11079" RevisionGUID="0f08b233-ee5d-48de-9cc7-f80633977da7" CreationDate="2011-04-14T03:09:27.810" Comment="http://twitter.com/#!/StackGameDev/status/58366228087050240" />
  <row Id="23574" PostHistoryTypeId="2" PostId="11103" RevisionGUID="d4d7c700-7b31-403e-a834-9b65e540f444" CreationDate="2011-04-14T05:54:33.923" UserId="3057" Text="Although I'm fairly heavily anti-C, C &amp; C++, the one thing they DO have that few other languages have is complete control over the platform it's running on, you can be sure exactly what will be going on at all times, no GC, no glitches.&#xD;&#xA;&#xD;&#xA;This isn't as important these days, but it can be for underpowered platforms.&#xD;&#xA;&#xD;&#xA;On PC/Mac/Linux it's probably the least portable language you'll encounter these days, and the speed bonus is no longer that much of a difference--Minecraft (Java) is smooth and works on pretty minimal platforms (and any OS) with a single executable--I've yet to see a low-manpower indi C/C++ app with as much functionality and as few bugs, let alone work on three platforms.&#xD;&#xA;&#xD;&#xA;So at this point I'd say that most of it is inertia and the conception that real games are always done in C/C++, although the ability to &quot;port&quot; to iPhone and consoles is significant (Even though I'm fairly sure most of the UI of games take a LOT of effort to port except between Windows and XBox)." />
  <row Id="23583" PostHistoryTypeId="2" PostId="11105" RevisionGUID="3e50f37e-ed52-47b1-8879-7e0453359654" CreationDate="2011-04-14T07:08:51.507" UserId="6530" Text="In the past I've used SWiSH to create small animations that I could use for Flash projects, however, I'm now trying to move to writing AS3 which SWiSH doesn't support.&#xD;&#xA;&#xD;&#xA;Whilst I have access to Flash CS5 through work, it doesn't have much in the way of in-built effects &amp; animations, compared to SWiSH's 400+, and I want to be able to create various effects quickly and easily. (I'm a coder, not a graphics kind of guy!)&#xD;&#xA;&#xD;&#xA;So, does anyone know of a good alternative to SWiSH (Flash Animator) that I could get/purchase that has a lot of stock animations/effects built into it, but is fully compatible with AS3, allowing me to export symbols in SWF and embed/use them in FlashDevelop? " />
  <row Id="23584" PostHistoryTypeId="1" PostId="11105" RevisionGUID="3e50f37e-ed52-47b1-8879-7e0453359654" CreationDate="2011-04-14T07:08:51.507" UserId="6530" Text="SWiSH alternative Flash animator for AS3" />
  <row Id="23585" PostHistoryTypeId="3" PostId="11105" RevisionGUID="3e50f37e-ed52-47b1-8879-7e0453359654" CreationDate="2011-04-14T07:08:51.507" UserId="6530" Text="&lt;actionscript-3&gt;&lt;animation&gt;&lt;flashdevelop&gt;&lt;flash-cs5&gt;" />
  <row Id="23586" PostHistoryTypeId="2" PostId="11106" RevisionGUID="6a3ea916-3e75-4cf7-8a98-02802e9ba365" CreationDate="2011-04-14T07:23:45.720" UserId="6724" Text="Generally speaking, I'm more in favor of using SSL to do the network communications in general. While it may seem unneeded, there have been hacks for some games to use the unencrypted transmission of the packets from the netcode to do some pretty nasty things. SSL would not prevent that completely, but it would add an additional layer of protection to slow it down." />
  <row Id="23588" PostHistoryTypeId="25" PostId="11100" RevisionGUID="cc8b1130-5cda-462c-b297-a15435bc20e7" CreationDate="2011-04-14T09:09:27.833" Comment="http://twitter.com/#!/StackGameDev/status/58456824793407490" />
  <row Id="23589" PostHistoryTypeId="2" PostId="11107" RevisionGUID="8f00e5cc-cf91-44a2-aea2-efac76ec95ce" CreationDate="2011-04-14T10:21:00.293" UserId="6175" Text="I want to know if it were possible to integrate models created with Blender into a game written in solely C++." />
  <row Id="23590" PostHistoryTypeId="1" PostId="11107" RevisionGUID="8f00e5cc-cf91-44a2-aea2-efac76ec95ce" CreationDate="2011-04-14T10:21:00.293" UserId="6175" Text="Blender modelling for a C++ game?" />
  <row Id="23591" PostHistoryTypeId="3" PostId="11107" RevisionGUID="8f00e5cc-cf91-44a2-aea2-efac76ec95ce" CreationDate="2011-04-14T10:21:00.293" UserId="6175" Text="&lt;blender&gt;" />
  <row Id="23592" PostHistoryTypeId="2" PostId="11108" RevisionGUID="cf82aa22-27e2-4050-bc60-48ad7ab0b96c" CreationDate="2011-04-14T10:25:40.303" UserId="6021" Text="The programming language doesn't matter for this purpose. You just need to get your model data from Blender into your application, which is possible by using one of the various export formats that Blender offers.&#xD;&#xA;&#xD;&#xA;Of course all models you create in Blender must be suitable for real-time rendering, i.e. their polygon count should be decent and their materials and other effects features must be supported by your game framework. Typically you'll need many iterations until a content pipeline becomes actually stable.  &#xD;&#xA;&#xD;&#xA;See [this question][1] for more information on suitable formats for use with Blender 3D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10392/file-format-for-static-and-animated-3d-models/10395#10395" />
  <row Id="23593" PostHistoryTypeId="2" PostId="11109" RevisionGUID="27eb5585-01eb-4f57-8f4e-9b3a21428231" CreationDate="2011-04-14T10:51:36.020" UserId="288" Text="The solution to this seems pretty simple, really:&#xD;&#xA;&#xD;&#xA;You're already generating your terrain data on a separate thread. You can **create your vertex and index buffers on a separate thread** as well!&#xD;&#xA;&#xD;&#xA;Also, you are probably best off making your buffers quite huge - thousands of triangles." />
  <row Id="23594" PostHistoryTypeId="5" PostId="10911" RevisionGUID="c35072d9-4d6e-4160-9863-50537c902b68" CreationDate="2011-04-14T11:02:01.927" UserId="6616" Comment="added 39 characters in body" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball is moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![2D collision between ball and the corner edge of a solid unmovable object][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RbdfV.jpg" />
  <row Id="23595" PostHistoryTypeId="2" PostId="11110" RevisionGUID="4cb07061-f803-44ed-99d6-fa8056e2d1dc" CreationDate="2011-04-14T11:03:15.210" UserId="4828" Text="For Blender you can use Python to write script for exporting models to your model data type." />
  <row Id="23596" PostHistoryTypeId="5" PostId="10911" RevisionGUID="19914ae1-f630-408e-b263-783067e718ca" CreationDate="2011-04-14T11:13:48.127" UserId="6616" Comment="deleted 45 characters in body; added 45 characters in body" Text="I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems when the ball is moving very fast, but for now I just need to calculate ballDx and ballDy. It is also possible that ballDx = 0 (vertical movement only), but when the ball deflects ballDx may get a different value.&#xD;&#xA;&#xD;&#xA;![2D collision between ball and the corner edge of a solid unmovable object][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RnPSe.jpg" />
  <row Id="23597" PostHistoryTypeId="2" PostId="11111" RevisionGUID="0a099333-8676-419f-91d5-cf84153d95cb" CreationDate="2011-04-14T11:34:58.727" UserId="6729" Text="I'm controlling the main loop with Game States like in pseudo code below:&#xD;&#xA;    &#xD;&#xA;    loop{&#xD;&#xA;          if (Not Game.WaitingForUserInput){&#xD;&#xA;&#xD;&#xA;              if (Game.Started){&#xD;&#xA;                  StartTurn();&#xD;&#xA;              }&#xD;&#xA;&#xD;&#xA;              if (Turn Started){&#xD;&#xA;                  DoSomething();&#xD;&#xA;              }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This works fine, until the inner workings of a method like &quot;StartTurn()&quot; or &quot;DoSomething()&quot; requires waiting for user input.&#xD;&#xA;&#xD;&#xA;Also, Assume that calling &quot;DoSomething()&quot; triggers an event that is listened to by more than one object. Each object that handles the event requires user input to finish handling the event.&#xD;&#xA;To illustrate:&#xD;&#xA;&#xD;&#xA;DoSomething() ==&gt; fires an event that is handled by 2 objects with methods that follow this pattern:&#xD;&#xA;&#xD;&#xA;    HandlingMethod()&#xD;&#xA;    {&#xD;&#xA;        // some logic&#xD;&#xA;&#xD;&#xA;        // Here we need to get a variable X that is determined through user input&#xD;&#xA;        // like clicking a UI element. So, we need to wait (or simulate wait) until X is&#xD;&#xA;        // determined.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This means when the first object starts handling the event, the 2nd object must wait until the first object has finished handling the event.&#xD;&#xA;&#xD;&#xA;I tried tight loops inside these methods like:&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;    while (X is unknown){&#xD;&#xA;       // just loop and check X until user has clicked something&#xD;&#xA;    }&#xD;&#xA;    ... X here will be known&#xD;&#xA;&#xD;&#xA;However, this leads to the UI to hang and user will not be able to interact with the application.&#xD;&#xA;&#xD;&#xA;By the way, I'm using a windows application (windows forms) for the UI.&#xD;&#xA;" />
  <row Id="23598" PostHistoryTypeId="1" PostId="11111" RevisionGUID="0a099333-8676-419f-91d5-cf84153d95cb" CreationDate="2011-04-14T11:34:58.727" UserId="6729" Text="How to simulate or actually make your code wait for user input in response to events in turn-based games" />
  <row Id="23599" PostHistoryTypeId="3" PostId="11111" RevisionGUID="0a099333-8676-419f-91d5-cf84153d95cb" CreationDate="2011-04-14T11:34:58.727" UserId="6729" Text="&lt;turn-based&gt;" />
  <row Id="23600" PostHistoryTypeId="2" PostId="11112" RevisionGUID="f09a35fe-f237-412b-b082-8eed958ee7d4" CreationDate="2011-04-14T11:42:47.593" UserId="3995" Text="I am drawing lots of textures and panning and zooming in and out on them. When the camera zooms out they look really ugly. &#xD;&#xA;&#xD;&#xA;What can I do?" />
  <row Id="23601" PostHistoryTypeId="1" PostId="11112" RevisionGUID="f09a35fe-f237-412b-b082-8eed958ee7d4" CreationDate="2011-04-14T11:42:47.593" UserId="3995" Text="How to make shrunken textures look pretty" />
  <row Id="23602" PostHistoryTypeId="3" PostId="11112" RevisionGUID="f09a35fe-f237-412b-b082-8eed958ee7d4" CreationDate="2011-04-14T11:42:47.593" UserId="3995" Text="&lt;opengl&gt;&lt;c++&gt;&lt;2d&gt;" />
  <row Id="23603" PostHistoryTypeId="2" PostId="11113" RevisionGUID="288ce410-9fe7-4646-88a7-bcead4dc0a0b" CreationDate="2011-04-14T11:44:41.040" UserId="6562" Text="I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero.&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_POINT_SPRITE);&#xD;&#xA;    glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);&#xD;&#xA;    glDrawElements(GL_POINTS, 1, GL_UNSIGNED_SHORT, index);//attrib p will be 0.0f,0.0f,0.0f in the vertex shader&#xD;&#xA;Vertex Shader:&#xD;&#xA;&#xD;&#xA;    attribute highp vec4 p;&#xD;&#xA;    void main() {&#xD;&#xA;      gl_PointSize = 40.0f;&#xD;&#xA;      gl_Position = p;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader:&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;     gl_FragColor = vec4(gl_PointCoord.st, 0, 1);&#xD;&#xA;    }&#xD;&#xA;But this only draws a black square with a size of 40.&#xD;&#xA;What am I doing wrong?&#xD;&#xA; " />
  <row Id="23604" PostHistoryTypeId="1" PostId="11113" RevisionGUID="288ce410-9fe7-4646-88a7-bcead4dc0a0b" CreationDate="2011-04-14T11:44:41.040" UserId="6562" Text="gl_PointCoord always zero" />
  <row Id="23605" PostHistoryTypeId="3" PostId="11113" RevisionGUID="288ce410-9fe7-4646-88a7-bcead4dc0a0b" CreationDate="2011-04-14T11:44:41.040" UserId="6562" Text="&lt;opengl&gt;&lt;shaders&gt;" />
  <row Id="23606" PostHistoryTypeId="2" PostId="11114" RevisionGUID="79eb8289-5f22-4d38-8b36-f08bfacdaa19" CreationDate="2011-04-14T12:03:21.547" UserId="3872" Text="I am looking to use reinforcement learning to adaptively modify the weights involved in a flocking algorithm (i.e. 'boids').  &#xD;&#xA;&#xD;&#xA;Searching google revealed several libraries, but I don't know anything about any of them.&#xD;&#xA;&#xD;&#xA;I am far from being an expert in reinforcement learning, though I have perused Sutton and Barto's classic book on the subject, so I understand some of the concepts.&#xD;&#xA;&#xD;&#xA;A little background, in case it helps.  I have a few steering behaviours (seperation, alignment, cohesion, forward, and wall avoidance), which each generate a 'force' vector and compete to tell the agent(s) where to move.  Each force vector is combined in, basically, a weighted sum.  I would like to 'learn' these weights adaptively so as to cause e.g. more/less clustering, reduce/increase the flock's speed, etc.&#xD;&#xA;&#xD;&#xA;Can anyone recommend a good library to use?  &#xD;&#xA;&#xD;&#xA;I would also need some kind of linear classifier, or something, I think (lol), to interface the learning with the (float valued) weights for each of the flocking steering behaviours.  So a library that provides a one-stop solution for this problem would be good?" />
  <row Id="23607" PostHistoryTypeId="1" PostId="11114" RevisionGUID="79eb8289-5f22-4d38-8b36-f08bfacdaa19" CreationDate="2011-04-14T12:03:21.547" UserId="3872" Text="Suggestion for C++ reinforcement learning library to control flocking algorithm" />
  <row Id="23608" PostHistoryTypeId="3" PostId="11114" RevisionGUID="79eb8289-5f22-4d38-8b36-f08bfacdaa19" CreationDate="2011-04-14T12:03:21.547" UserId="3872" Text="&lt;c++&gt;&lt;ai&gt;&lt;movement&gt;&lt;learning&gt;&lt;character&gt;" />
  <row Id="23609" PostHistoryTypeId="25" PostId="11113" RevisionGUID="44099caf-c990-4ec6-8ab0-4b1226215bbe" CreationDate="2011-04-14T12:09:27.500" Comment="http://twitter.com/#!/StackGameDev/status/58502123125608448" />
  <row Id="23610" PostHistoryTypeId="2" PostId="11115" RevisionGUID="60831a3d-8357-4cba-80ef-d07d93229697" CreationDate="2011-04-14T12:41:29.053" UserId="5864" Text="This is a design decision with countless possible answers. In the end it's related to how many states your state machine has and what the transitions are.&#xD;&#xA;&#xD;&#xA;If `StartTurn()` needs to wait for user input, one possibility is to split it like you already split your method into `StartTurn()` and `DoSomething()`. This is akin to *adding a state* to your state machine:&#xD;&#xA;&#xD;&#xA;    loop{&#xD;&#xA;      if (Game.WaitingForUserInput) {&#xD;&#xA;        WaitForInput();&#xD;&#xA;      }&#xD;&#xA;      else {&#xD;&#xA;        switch (Game.State) {&#xD;&#xA;          case Game.State.GameStarted:&#xD;&#xA;            PrepareTurn(); break; /* Will set WaitingForUserInput to TRUE */&#xD;&#xA;          case Game.State.TurnPrepared:&#xD;&#xA;            StartTurn(); break;&#xD;&#xA;          case Game.State.TurnStarted:&#xD;&#xA;            DoSomething(); break;&#xD;&#xA;          /* More cases */&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You could also make `StartTurn()` not change the game state until the second time it is called. This is akin to *adding a substate* to your state machine.&#xD;&#xA;" />
  <row Id="23611" PostHistoryTypeId="2" PostId="11116" RevisionGUID="e962437f-d62f-4c5b-878b-5ad092df4851" CreationDate="2011-04-14T12:51:43.750" UserId="5493" Text="I'm developing a space-simulation related game, and I am having some trouble implementing the movement of binary stars, like this :&#xD;&#xA;&#xD;&#xA;![Binary star][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/MMspr.gif&#xD;&#xA;&#xD;&#xA;The two stars orbit their centroid, and their trajectories are ellipses.&#xD;&#xA;&#xD;&#xA;I basically know how to determine the angular velocity at any position, but not the angular velocity over time. So, for a given angle, I can very easily compute the stars position (cf. http://en.wikipedia.org/wiki/Orbit_equation).&#xD;&#xA;&#xD;&#xA;I'd want to get the stars position over time. The parametric equations of the ellipse works but doesn't give the correct speed :&#xD;&#xA;`{ X(t) = a×cos(t) ; Y(t) = b×sin(t) }`.&#xD;&#xA;&#xD;&#xA;Is it possible, and how can it be done? Thanks." />
  <row Id="23612" PostHistoryTypeId="1" PostId="11116" RevisionGUID="e962437f-d62f-4c5b-878b-5ad092df4851" CreationDate="2011-04-14T12:51:43.750" UserId="5493" Text="Kepler orbit : get position on the orbit over time" />
  <row Id="23613" PostHistoryTypeId="3" PostId="11116" RevisionGUID="e962437f-d62f-4c5b-878b-5ad092df4851" CreationDate="2011-04-14T12:51:43.750" UserId="5493" Text="&lt;physics&gt;" />
  <row Id="23614" PostHistoryTypeId="2" PostId="11117" RevisionGUID="6ecffdb5-e235-4d73-a4b0-9ff11eb1c2c9" CreationDate="2011-04-14T13:12:38.070" UserId="6731" Text="Where can I find 3d models of equipment  for supermarket? I will use them in XNA. Thanks. &#xD;&#xA;&#xD;&#xA;UPD. I need equipment like this http://www.the3dstudio.com/product_details.aspx?id_product=419747 without products." />
  <row Id="23615" PostHistoryTypeId="1" PostId="11117" RevisionGUID="6ecffdb5-e235-4d73-a4b0-9ff11eb1c2c9" CreationDate="2011-04-14T13:12:38.070" UserId="6731" Text="Where can I find 3d models of equipment for supermarket?" />
  <row Id="23616" PostHistoryTypeId="3" PostId="11117" RevisionGUID="6ecffdb5-e235-4d73-a4b0-9ff11eb1c2c9" CreationDate="2011-04-14T13:12:38.070" UserId="6731" Text="&lt;models&gt;" />
  <row Id="23617" PostHistoryTypeId="2" PostId="11118" RevisionGUID="0990b8e9-fe1f-47b8-81fd-6e5c18a9d2bf" CreationDate="2011-04-14T14:03:00.343" UserId="370" Text="[Coroutines][1] are a beautiful thing.  They are unfortunately not well supported in most languages.&#xD;&#xA;&#xD;&#xA;A coroutine allows a function to yield it's execution to it caller (ie return).  The magic is that the function (coroutine) can be be restarted where it left off.  Coroutines are known for being able to change complex IO (waiting for input) code into simple sequential steps.&#xD;&#xA;&#xD;&#xA;In python coroutines are created by using the `yield` statement in a function.  Python coroutines are limited in that the coroutine can only yield to its immediate caller.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Lua has great coroutine support.  In lua you explicitly change a function into a coroutine.  When the `coroutine.yield` method is called the function will return to the top most caller.&#xD;&#xA;&#xD;&#xA;.NET has great coroutine support with its standard fiber library.&#xD;&#xA;&#xD;&#xA;D has great coroutine support.&#xD;&#xA;&#xD;&#xA;C/C++ have some implementations but they are arguably black magic.&#xD;&#xA;&#xD;&#xA;So depending on the language you're using coroutines may be available.  Personally, I love using lua for level scripting because of Lua's coroutine library.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Coroutine" />
  <row Id="23618" PostHistoryTypeId="2" PostId="11119" RevisionGUID="5701f3d6-80d4-4eba-a8cd-b142f0316a65" CreationDate="2011-04-14T14:06:16.183" UserId="6732" Text="am developing a 2D golf game in vb.net 2005, but am stuck on how to implement air or wind drag that should affect the ball.&#xD;&#xA;&#xD;&#xA;Already i have these equation for projectile&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Vo**                            `&lt;-Initial velocity of golfball when hit or fired`&#xD;&#xA;&#xD;&#xA;**Vx=VoCos(theta)**               `&lt;-Vertical component of velocity of golfball`&#xD;&#xA;&#xD;&#xA;**Vy=VoSin(theta)-gt**            `&lt;-Horizontal component of velocity of golfball`&#xD;&#xA;&#xD;&#xA;**X=VoCos(theta)t**               `&lt;-Vertical dixtance of golfball`&#xD;&#xA;&#xD;&#xA;**Y=VoSin(theta)t-(0.5)g(t*t)**   `&lt;-Horizontal dixtance of golfball`&#xD;&#xA;&#xD;&#xA;The question is how to add air drag to this equation to be able to affect the golf velocity.&#xD;&#xA;i don't have an idea of how to do it that is why am posting the equation, perhaps someone that has done something similar can help me.&#xD;&#xA;thanks&#xD;&#xA;" />
  <row Id="23619" PostHistoryTypeId="1" PostId="11119" RevisionGUID="5701f3d6-80d4-4eba-a8cd-b142f0316a65" CreationDate="2011-04-14T14:06:16.183" UserId="6732" Text="golf ball air drag in equation help" />
  <row Id="23620" PostHistoryTypeId="3" PostId="11119" RevisionGUID="5701f3d6-80d4-4eba-a8cd-b142f0316a65" CreationDate="2011-04-14T14:06:16.183" UserId="6732" Text="&lt;c#&gt;&lt;physics&gt;" />
  <row Id="23621" PostHistoryTypeId="5" PostId="11076" RevisionGUID="109c2058-e61e-4a68-9303-dacb8b51ba86" CreationDate="2011-04-14T14:08:04.417" UserId="1101" Comment="added a comma to clarify meaning" Text="&gt; How common is it that game coders participate in the design process of the game?&#xD;&#xA;&#xD;&#xA;I've had experience of 3 companies:&#xD;&#xA;&#xD;&#xA;  - One had no designers at all. All design was done by programmers and artists, typically the most senior.&#xD;&#xA;  - One had designers, and programmers had virtually no input into the process. The lead programmer might be brought in to provide a feasibility check on the design after it was made and adjustments made accordingly, but they did no design as such.&#xD;&#xA;  - One has separate programmers and designers, but programmers are encouraged to contribute high level design just as much as the designers are - the division of labour takes place more on the implementation side.&#xD;&#xA;&#xD;&#xA;So, no standard there!&#xD;&#xA;&#xD;&#xA;&gt; is it possible for a programmer with interest in the field to move from the technical job to a gameplay design related job (or do both in smaller companies)? Does that happen?&#xD;&#xA;&#xD;&#xA;Yes, and yes. I think it's actually quite common, and I would argue it's preferable - I would much rather have a designer who has (a) experience of the game making process and (b) understanding of the medium's limitations." />
  <row Id="23622" PostHistoryTypeId="2" PostId="11120" RevisionGUID="ca843af5-98ba-4f64-be80-d248cdd74caf" CreationDate="2011-04-14T14:08:25.280" UserId="20" Text="You could try [turbosquid.com][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.turbosquid.com/Search/Index.cfm?keyword=supermarket&amp;x=0&amp;y=0" />
  <row Id="23623" PostHistoryTypeId="2" PostId="11121" RevisionGUID="6eb771c9-8665-4b71-a8f6-954d156891c4" CreationDate="2011-04-14T14:44:42.717" UserId="6655" Text="I'm not sure if there even exists a closed form for drag or wind, but it is quite easy to simulate in a step-wise fashion (like all the physics libraries do):&#xD;&#xA;&#xD;&#xA;1. set your initial condition: `x`, `y`, `vx`, `vy`   (for `t = 0`)&#xD;&#xA;2. update position: `x += vx * dt`, `y += vy * dt`   (where `dt` is the time elapsed since the last update)&#xD;&#xA;3. calculate these velocity helpers: `v_squared = vx * vx + vy * vy` and `v_length = sqrt(v_squared)`&#xD;&#xA;3. calculate drag force: `f_drag = c * v_squared`    (where `c` is the coefficient of friction *small!*)&#xD;&#xA;4. accumulate forces: `f_x = (-f_drag * vx / v_length)`, `f_y = (-f_drag * vy / v_length) + (-g * mass)`   (where mass is the mass of your golf ball)&#xD;&#xA;5. update velocity: `v_x += f_x * dt / mass`, `v_y += f_y * dt / mass`&#xD;&#xA;&#xD;&#xA;That's basically Euler's Method http://en.wikipedia.org/wiki/Euler_method for approximating those physics." />
  <row Id="23624" PostHistoryTypeId="5" PostId="11028" RevisionGUID="fb8067c6-0cae-47e8-8750-080496f2c4b5" CreationDate="2011-04-14T14:50:32.713" UserId="382" Comment="corrected spelling and improved formatting" Text="Sockets aren't the problem. That's just how TCP/IP networking works. Two things could be wrong. How you are using them and what you are sending?&#xD;&#xA;&#xD;&#xA;Serializing a class and sending it and de-serializing seems huge for a game. Just send something like `CBIXYZCE` as in `CB` for camera begin, `I` for identifier, x coord, y coord, z coord, and `CE` for camera end. &#xD;&#xA;&#xD;&#xA;When it comes to networking be as terse as possible.&#xD;&#xA;&#xD;&#xA;In fact my example may be too big. The camera class should exist on the server and you only pass what changes. Oh and use UDP." />
  <row Id="23625" PostHistoryTypeId="24" PostId="11028" RevisionGUID="fb8067c6-0cae-47e8-8750-080496f2c4b5" CreationDate="2011-04-14T14:50:32.713" Comment="Proposed by 382 approved by 51 edit id of 301" />
  <row Id="23626" PostHistoryTypeId="5" PostId="11117" RevisionGUID="956125a9-d8ac-40f5-ab36-35aeeeaaa051" CreationDate="2011-04-14T14:53:21.233" UserId="1198" Comment="deleted 23 characters in body" Text="Where can I find 3d models of equipment  for supermarket? I will use them in XNA.&#xD;&#xA;&#xD;&#xA;UPD. I need equipment like this http://www.the3dstudio.com/product_details.aspx?id_product=419747 without products." />
  <row Id="23627" PostHistoryTypeId="5" PostId="11119" RevisionGUID="7722dd60-c8b1-4b00-8542-d7165fdf71c9" CreationDate="2011-04-14T14:55:34.197" UserId="1198" Comment="dropped signature per FAQ, added formatting to preserve the spacing the OP has in the post at the exepnse of the bold" Text="I'm developing a 2D golf game in vb.net 2005, but am stuck on how to implement air or wind drag that should affect the ball.&#xD;&#xA;&#xD;&#xA;Already I have these equation for projectile&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vo                            `&lt;-Initial velocity of golfball when hit or fired`&#xD;&#xA;    &#xD;&#xA;    Vx=VoCos(theta)               `&lt;-Vertical component of velocity of golfball`&#xD;&#xA;    &#xD;&#xA;    Vy=VoSin(theta)-gt*           `&lt;-Horizontal component of velocity of golfball`&#xD;&#xA;    &#xD;&#xA;    X=VoCos(theta)t              `&lt;-Vertical dixtance of golfball`&#xD;&#xA;    &#xD;&#xA;    Y=VoSin(theta)t-(0.5)g(t*t)  `&lt;-Horizontal dixtance of golfball`&#xD;&#xA;&#xD;&#xA;The question is how to add air drag to this equation to be able to affect the golf velocity.&#xD;&#xA;I don't have an idea of how to do it that is why am posting the equation, perhaps someone that has done something similar can help me.&#xD;&#xA;" />
  <row Id="23628" PostHistoryTypeId="2" PostId="11122" RevisionGUID="ab1d8a7c-b3df-42dd-9b03-ed92239f3afb" CreationDate="2011-04-14T14:57:04.530" UserId="6743" Text="Game source code: [https://github.com/dnguyen/Aurora][1]&#xD;&#xA;&#xD;&#xA;I am using this to create a 2D camera: http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/. After I added the transformation to the spritebatch all my positions seem to be &quot;off&quot; after I start moving the ship away from the center of the screen.&#xD;&#xA;&#xD;&#xA;Any idea what might be wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dnguyen/Aurora" />
  <row Id="23629" PostHistoryTypeId="1" PostId="11122" RevisionGUID="ab1d8a7c-b3df-42dd-9b03-ed92239f3afb" CreationDate="2011-04-14T14:57:04.530" UserId="6743" Text="Positions are &quot;off&quot; after adding a camera transformation (2d)" />
  <row Id="23630" PostHistoryTypeId="3" PostId="11122" RevisionGUID="ab1d8a7c-b3df-42dd-9b03-ed92239f3afb" CreationDate="2011-04-14T14:57:04.530" UserId="6743" Text="&lt;xna&gt;&lt;2d&gt;&lt;camera&gt;" />
  <row Id="23631" PostHistoryTypeId="2" PostId="11123" RevisionGUID="7ba19a2b-45a5-4a24-a057-dac96c7f2507" CreationDate="2011-04-14T14:58:53.483" UserId="6655" Text="As Daniel pointed out, the difficult part is the reward function. If you got that figured out what it comes to to is this:&#xD;&#xA;&#xD;&#xA;1. You create a flocking simulation taking N parameters (where N is the number of coefficients to tune) returning a single value (the &quot;fitness/error/reward&quot;).&#xD;&#xA;2. Afterwards you plug that function into a reinforcement-learning algorithm as a black-box error-function.&#xD;&#xA;3. The algorithm will then try more or less random values for the N parameters, evaluating their error (by launching your simulation), and stop when good values are found.&#xD;&#xA;&#xD;&#xA;A very fast and stable reinforment learning algorithm is the CMA-ES. Papers and source code are available at http://www.lri.fr/~hansen/cmaesintro.html&#xD;&#xA;&#xD;&#xA;Be warned though:&#xD;&#xA;&#xD;&#xA;- Building a reward function that actually does what it should is often more difficult &#xD;&#xA;than solving the initial problem manually.&#xD;&#xA;- The reward function should return the same output value for same input values, therefore &quot;then alter the reward function&quot; is probably a bad idea." />
  <row Id="23632" PostHistoryTypeId="5" PostId="11118" RevisionGUID="2f705823-b37e-40e2-9437-96ccf47488e1" CreationDate="2011-04-14T15:02:54.887" UserId="370" Comment="added links" Text="[Coroutines][1] are a beautiful thing.  They are unfortunately not well supported in most languages.&#xD;&#xA;&#xD;&#xA;A coroutine allows a function to yield its execution to its caller (silimar to return).  The magic is that the function (coroutine) can be be restarted where it left off whereas a regular function must start from the top everytime.  Coroutines are known for being able to transform complex IO (waiting for input) code into simple sequential steps.&#xD;&#xA;&#xD;&#xA;In [python coroutines][2] are created by using the `yield` statement in a function.  Python coroutines are limited in that the coroutine can only yield to its immediate caller.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Lua has great [coroutine support][3].  In lua you explicitly change a function into a coroutine.  When the `coroutine.yield` method is called the function will return to the top most caller.&#xD;&#xA;&#xD;&#xA;.NET has great coroutine support with its standard fiber library.&#xD;&#xA;&#xD;&#xA;D has great [coroutine support][4].&#xD;&#xA;&#xD;&#xA;C/C++ have some implementations but they are arguably black magic.&#xD;&#xA;&#xD;&#xA;So depending on the language you're using coroutines may be available.  Personally, I love using lua for [level scripting][5] because of Lua's coroutine library.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Coroutine&#xD;&#xA;  [2]: http://www.dabeaz.com/coroutines/index.html&#xD;&#xA;  [3]: http://www.lua.org/manual/5.1/manual.html#2.11&#xD;&#xA;  [4]: http://www.digitalmars.com/d/2.0/phobos/std_thread.html#Fiber&#xD;&#xA;  [5]: http://stackoverflow.com/questions/5128375/what-are-lua-coroutines-even-for-why-doesnt-this-code-work-as-i-expect-it/5128495#5128495" />
  <row Id="23633" PostHistoryTypeId="2" PostId="11124" RevisionGUID="69ef7a92-bcc5-49af-8f98-42f454eb3cfe" CreationDate="2011-04-14T15:04:21.077" UserId="3853" Text="When I recently entered the field of game development, I actually assumed that “game engine” meant something with which you can make your game story script run in an environment where non-player characters have a state, and so you can test running your story as the bare bones of a game. A typical example of a tool for this is [Chat Mapper][1].  This in my perspective is the core of your game, around which you build animations, sounds, etc. using say a 3D engine. A 3D engine can also be used for ends which have little to do with games. Let’s temporarily call what I mean a game-story engine.&#xD;&#xA;&#xD;&#xA;But this does not seem the intended meaning – I guess it depends on the focus and stage of your game. Possible meanings of “game engine” seem to be:&#xD;&#xA;&#xD;&#xA;- an environment which supports creating and running a complete game; this too is quite ambiguous definition, consider Unity, http://unity3d.com/unity/engine/, Vassal http://www.vassalengine.org .&#xD;&#xA;&#xD;&#xA;- the term “game engine” is actually a shortcut for “game 2D engine” or “game 3D engine”&#xD;&#xA;&#xD;&#xA;Now what I am asking is not to become uselessly precise with words, but just whether there is a better term used for “game-story engine” which experienced game developers use. Thanks. &#xD;&#xA;&#xD;&#xA;*P.S. And no, I’m not heading towards (nor advising to) creating “game engines” before creating games. In my startup we actually created a very simple JavaScript “game-story engine” for our browser games (it was strictly necessary) which we would like to share and am now wondering how to present it.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chat-mapper.com/" />
  <row Id="23634" PostHistoryTypeId="1" PostId="11124" RevisionGUID="69ef7a92-bcc5-49af-8f98-42f454eb3cfe" CreationDate="2011-04-14T15:04:21.077" UserId="3853" Text="Clarification on the &quot;game engine&quot; notion needed" />
  <row Id="23635" PostHistoryTypeId="3" PostId="11124" RevisionGUID="69ef7a92-bcc5-49af-8f98-42f454eb3cfe" CreationDate="2011-04-14T15:04:21.077" UserId="3853" Text="&lt;engine&gt;&lt;browser-based-games&gt;&lt;storyboard&gt;" />
  <row Id="23636" PostHistoryTypeId="25" PostId="11119" RevisionGUID="ffd04837-a039-4186-9161-287dad8dbfd4" CreationDate="2011-04-14T15:09:27.827" Comment="http://twitter.com/#!/StackGameDev/status/58547421126471680" />
  <row Id="23637" PostHistoryTypeId="2" PostId="11125" RevisionGUID="fcc71c33-710b-4d26-b72d-688e19433542" CreationDate="2011-04-14T15:15:47.900" UserId="5846" Text="Prototype Environment is probably a good phrase to use, not that it's standard or anything, but if your talking about a place to set up AI characters and play with the mechanics of the game, that's a layer above the game engine.&#xD;&#xA;&#xD;&#xA;game engine usually refers to things like the graphics renderer, which calculates lighting, etc. and some basic components important to the game like collision detection, how state is tracked, for the game, characters, level etc.&#xD;&#xA;&#xD;&#xA;An environment set up where you have all of these components together in a usable way implies that a layer has been created which brings them all together. what that layer is called is a slippery term, because it brings so much together, sometimes it's referred to as the gameplay engine, sometimes it's just coordinating the gameplay, and then what do you call it. the thing or the thing that it acts upon." />
  <row Id="23638" PostHistoryTypeId="2" PostId="11126" RevisionGUID="262ae12c-777e-4602-aba6-a46018cfb7f3" CreationDate="2011-04-14T15:20:52.017" UserId="6588" Text="I would use the term &quot;story engine&quot; for what you're describing. It's a code module to handle the story, just like a physics engine is a code module to handle the physics. You'll also see terms like &quot;tile engine&quot; for a code module that handles graphics tiles; basically, a code module that handles a single aspect of a complete game will often be referred to as a &lt;blank&gt; engine. It's used more or less in the same way as &quot;library&quot; (as in &quot;audio library.&quot;)&#xD;&#xA;&#xD;&#xA;Both your possible definitions for the term &quot;game engine&quot; apply. For example, Unity is a 3D game engine." />
  <row Id="23639" PostHistoryTypeId="2" PostId="11127" RevisionGUID="4fd3fad7-c7c0-4f33-9b55-fe9967034c50" CreationDate="2011-04-14T15:48:50.067" UserId="3541" Text="I just implemented a animated sprite class that takes the total frames like others have said, and the frame size.  I then calculate the rows and columns from those.  Since we have large animations and didn't want to go over 2048x2048 sprite sheet size I also can span multiple sprite sheets. " />
  <row Id="23640" PostHistoryTypeId="5" PostId="11124" RevisionGUID="abc1413c-25f5-4fef-be65-22305d4ac526" CreationDate="2011-04-14T15:50:38.913" UserId="1198" Comment="edited body" Text="When I recently entered the field of game development, I actually assumed that “game engine” meant something with which you can make your game story script run in an environment where non-player characters have a state, and so you can test running your story as the bare bones of a game. A typical example of a tool for this is [Chat Mapper][1].  This in my perspective is the core of your game, around which you build animations, sounds, etc. using say a 3D engine. A 3D engine can also be used for ends which have little to do with games. Let’s temporarily call what I mean a game-story engine.&#xD;&#xA;&#xD;&#xA;But this does not seem the intended meaning – I guess it depends on the focus and stage of your game. Possible meanings of “game engine” seem to be:&#xD;&#xA;&#xD;&#xA;- An environment which supports creating and running a complete game; this too is quite ambiguous definition, consider Unity, http://unity3d.com/unity/engine/, Vassal http://www.vassalengine.org .&#xD;&#xA;&#xD;&#xA;- The term “game engine” is actually a shortcut for “game 2D engine” or “game 3D engine”&#xD;&#xA;&#xD;&#xA;Now what I am asking is not to become uselessly precise with words, but just whether there is a better term used for “game-story engine” which experienced game developers use. Thanks. &#xD;&#xA;&#xD;&#xA;*P.S. And no, I’m not heading towards (nor advising to) creating “game engines” before creating games. In my startup we actually created a very simple JavaScript “game-story engine” for our browser games (it was strictly necessary) which we would like to share and am now wondering how to present it.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chat-mapper.com/" />
  <row Id="23641" PostHistoryTypeId="5" PostId="11040" RevisionGUID="b3fe6247-25b7-41ca-b54b-c0995bf1fb9c" CreationDate="2011-04-14T17:08:06.837" UserId="6244" Comment="added 1155 characters in body; added 4 characters in body" Text="I just found the answer to my problem:&#xD;&#xA;&#xD;&#xA;The reason why the exception wouldn't show off is because it was actually thrown on a different thread. So removing my existing try/catch blocks in the main thread was of no help to show the exception. Adding a try/catch block to the Main method (to catch anything thrown in the entire application) wouldn't help either, since exception thrown on different threads don't fall in the catch blocks of the main thread.&#xD;&#xA;&#xD;&#xA;My guess was correct: the problem came from the async TCP networking, which automatically generates and uses underlying threads. The exception was thrown whenever the client forcibly closed the TCP socket. Since the exception was on another thread, it silently forced the XNA runtime to stop.&#xD;&#xA;&#xD;&#xA;    // Unable to read data from the transport connection: An existing connection was&#xD;&#xA;    // forcibly closed by the remote host.&#xD;&#xA;&#xD;&#xA;    // at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)&#xD;&#xA;&#xD;&#xA;**Update:** Just to make it perfectly clear for anyone who might encounter this problem in the future, here's how to correct it.&#xD;&#xA;&#xD;&#xA;This is the problematic code:&#xD;&#xA;&#xD;&#xA;    // runs on main thread&#xD;&#xA;    private void ReadAsync()&#xD;&#xA;    {&#xD;&#xA;        tcpClient.GetStream().BeginRead(buffer, 0, buffer.Length, readCallback, null);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // runs on an hidden underlying thread&#xD;&#xA;    // because of the asynchronous operation&#xD;&#xA;    private void OnRead(IAsyncResult result)&#xD;&#xA;    {&#xD;&#xA;        // dangerous exception thrown here&#xD;&#xA;        // it won't fall in the try/catch blocks of the main thread&#xD;&#xA;        tcpClient.GetStream().EndRead(result); &#xD;&#xA;&#xD;&#xA;        // process the received data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A simple try/catch block in the asynchronous thread will fix the problem:&#xD;&#xA;&#xD;&#xA;    private void OnRead(IAsyncResult result)&#xD;&#xA;    {&#xD;&#xA;        try&#xD;&#xA;        {&#xD;&#xA;            // dangerous exception thrown here&#xD;&#xA;            // it won't fall in the try/catch blocks of the main thread&#xD;&#xA;            tcpClient.GetStream().EndRead(result);&#xD;&#xA;&#xD;&#xA;            // process the received data &#xD;&#xA;        }&#xD;&#xA;        catch(Exception ex)&#xD;&#xA;        {&#xD;&#xA;            // handle the exception&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="23642" PostHistoryTypeId="5" PostId="11040" RevisionGUID="a8bdb5e4-bb77-47f9-a005-3f7f5654718c" CreationDate="2011-04-14T17:16:14.787" UserId="6244" Comment="added 239 characters in body; deleted 7 characters in body" Text="I just found the answer to my problem:&#xD;&#xA;&#xD;&#xA;The reason why the exception wouldn't show off is because it was actually thrown on a different thread. So removing my existing try/catch blocks in the main thread was of no help to show the exception. Adding a try/catch block to the Main method (to catch anything thrown in the entire application) wouldn't help either, since exceptions thrown on different threads don't fall in the catch blocks of the main thread.&#xD;&#xA;&#xD;&#xA;My guess was correct: the problem came from the async TCP networking, which automatically generates and uses underlying threads. The exception was thrown whenever the client forcibly closed the TCP socket. Since the exception was on another thread, it silently forced the XNA runtime to stop.&#xD;&#xA;&#xD;&#xA;    // Unable to read data from the transport connection: An existing connection was&#xD;&#xA;    // forcibly closed by the remote host.&#xD;&#xA;&#xD;&#xA;    // at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)&#xD;&#xA;&#xD;&#xA;**Update:** Just to make it perfectly clear for anyone who might encounter this problem in the future, here's how to correct it.&#xD;&#xA;&#xD;&#xA;This is the problematic code:&#xD;&#xA;&#xD;&#xA;    // runs on main thread&#xD;&#xA;    private void ReadAsync()&#xD;&#xA;    {&#xD;&#xA;        tcpClient.GetStream().BeginRead(buffer, 0, buffer.Length, readCallback, null);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // runs on an hidden underlying thread&#xD;&#xA;    // because of the asynchronous operation&#xD;&#xA;    private void OnRead(IAsyncResult result)&#xD;&#xA;    {&#xD;&#xA;        // dangerous exception thrown here&#xD;&#xA;        // it won't fall in the catch blocks of the main thread&#xD;&#xA;        tcpClient.GetStream().EndRead(result); &#xD;&#xA;&#xD;&#xA;        // process the received data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A simple try/catch block in the asynchronous thread will fix the problem:&#xD;&#xA;&#xD;&#xA;    private void OnRead(IAsyncResult result)&#xD;&#xA;    {&#xD;&#xA;        try&#xD;&#xA;        {&#xD;&#xA;            // dangerous exception thrown here&#xD;&#xA;            // it won't fall in the catch blocks of the main thread&#xD;&#xA;            tcpClient.GetStream().EndRead(result);&#xD;&#xA;&#xD;&#xA;            // process the received data &#xD;&#xA;        }&#xD;&#xA;        catch(Exception ex)&#xD;&#xA;        {&#xD;&#xA;            // handle the exception&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Naturally, this pitfall is not limited to TCP networking. You might encounter this problem for any type of .NET asynchronous operation and also in your own custom threads, so be sure to always put some try/catch blocks at these places!" />
  <row Id="23643" PostHistoryTypeId="5" PostId="11040" RevisionGUID="74b46ede-41a1-413c-a6aa-461a3f080aa9" CreationDate="2011-04-14T17:23:14.513" UserId="6244" Comment="added 80 characters in body; added 4 characters in body; added 6 characters in body" Text="I just found the answer to my problem:&#xD;&#xA;&#xD;&#xA;The reason why the exception wouldn't show off is because it was actually thrown on a different thread. So removing my existing try/catch blocks in the main thread was of no help to show the exception. Adding a try/catch block to the Main method (to catch anything thrown in the entire application) wouldn't help either, since exceptions thrown on different threads don't fall in the catch blocks of the main thread.&#xD;&#xA;&#xD;&#xA;My guess was correct: the problem came from the async TCP networking, which automatically generates and uses underlying threads. The exception was thrown whenever the client forcibly closed the TCP socket. Since the exception was on another thread, it silently forced the XNA runtime to stop.&#xD;&#xA;&#xD;&#xA;This is the exception that was silently thrown and that stopped the runtime:&#xD;&#xA;&#xD;&#xA;    // Unable to read data from the transport connection: An existing connection was&#xD;&#xA;    // forcibly closed by the remote host.&#xD;&#xA;&#xD;&#xA;    // at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)&#xD;&#xA;&#xD;&#xA;**Update:** Just to make it perfectly clear for anyone who might encounter this problem in the future, here's how to correct it.&#xD;&#xA;&#xD;&#xA;This is the problematic code:&#xD;&#xA;&#xD;&#xA;    // runs on the main thread&#xD;&#xA;    private void ReadAsync()&#xD;&#xA;    {&#xD;&#xA;        tcpClient.GetStream().BeginRead(buffer, 0, buffer.Length, readCallback, null);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // runs on an hidden underlying thread&#xD;&#xA;    // because of the asynchronous operation&#xD;&#xA;    private void OnRead(IAsyncResult result)&#xD;&#xA;    {&#xD;&#xA;        // dangerous exception thrown here&#xD;&#xA;        // which won't fall in the catch blocks of the main thread&#xD;&#xA;        tcpClient.GetStream().EndRead(result); &#xD;&#xA;&#xD;&#xA;        // process the received data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A simple try/catch block in the asynchronous thread will fix the problem:&#xD;&#xA;&#xD;&#xA;    private void OnRead(IAsyncResult result)&#xD;&#xA;    {&#xD;&#xA;        try&#xD;&#xA;        {&#xD;&#xA;            // dangerous exception thrown here&#xD;&#xA;            // which won't fall in the catch blocks of the main thread&#xD;&#xA;            tcpClient.GetStream().EndRead(result);&#xD;&#xA;&#xD;&#xA;            // process the received data &#xD;&#xA;        }&#xD;&#xA;        catch(Exception ex)&#xD;&#xA;        {&#xD;&#xA;            // handle the exception&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Naturally, this pitfall is not limited to TCP networking. You might encounter this problem for any type of .NET asynchronous operation and also in your own custom threads, so be sure to always put some try/catch blocks at these places!" />
  <row Id="23644" PostHistoryTypeId="25" PostId="11124" RevisionGUID="ab3ae06d-db0d-4cde-83c4-ce8493be61e6" CreationDate="2011-04-14T18:09:27.853" Comment="http://twitter.com/#!/StackGameDev/status/58592720813432832" />
  <row Id="23646" PostHistoryTypeId="2" PostId="11129" RevisionGUID="4c7fb17f-8d19-42e8-8ecb-70d62ae1a4e6" CreationDate="2011-04-14T18:47:44.887" UserId="4296" Text="Yup, looks like mipmaps.  [This looks like it might be a good resource][1] on how to add them in.  Once in though, you can manipulate the filtering - try enabling [trilinear filtering][2] or [anisotropic filtering][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swiftless.com/tutorials/opengl/mipmap_generation.html&#xD;&#xA;  [2]: http://gregs-blog.com/2008/01/17/opengl-texture-filter-parameters-explained/&#xD;&#xA;  [3]: http://steinsoft.net/index.php?site=Programming/Code%20Snippets/OpenGL/anisotropicfiltering" />
  <row Id="23647" PostHistoryTypeId="2" PostId="11130" RevisionGUID="635b5f25-a3de-424c-874e-ffefc128f7e5" CreationDate="2011-04-14T19:32:41.797" UserId="962" Text="I need to be able to determine how long a key has been held down with high accuracy. For example if they key tapped really fast it could report a time that is less than the time for each update frame." />
  <row Id="23648" PostHistoryTypeId="1" PostId="11130" RevisionGUID="635b5f25-a3de-424c-874e-ffefc128f7e5" CreationDate="2011-04-14T19:32:41.797" UserId="962" Text="How to get elapsed time of keypress?" />
  <row Id="23649" PostHistoryTypeId="3" PostId="11130" RevisionGUID="635b5f25-a3de-424c-874e-ffefc128f7e5" CreationDate="2011-04-14T19:32:41.797" UserId="962" Text="&lt;xna&gt;&lt;input&gt;" />
  <row Id="23650" PostHistoryTypeId="2" PostId="11131" RevisionGUID="7e016bb1-2727-448e-9a81-255bf9ba87dc" CreationDate="2011-04-14T20:22:03.340" UserId="337" Text="I'm not aware of any official way of doing this, you could run a second thread in a very tight loop just to check the input and send this of to a circular buffer sufficiently large to require very little synchronization between threads.&#xD;&#xA;&#xD;&#xA;(Store some kind of increasing number in each slot of the buffer and update that AFTER the thread wrote all the data, then continue reading slots with data from the buffer until the number decreases (don't forget to check for overflowing numbers!))" />
  <row Id="23651" PostHistoryTypeId="2" PostId="11132" RevisionGUID="36014e1d-2a86-4432-9946-428d2cd81ecb" CreationDate="2011-04-14T20:22:23.730" UserId="6042" Text="OpenGL's ambient light is a single color, but ambient light in the real world is usually brighter from above and darker from below. You can approximate this in OpenGL by setting the ambient light to very dark blue, and adding a dark blue directional light pointing downward. That, plus a bright white directional light coming from wherever the sun is, can approximate outdoors light pretty well.&#xD;&#xA;&#xD;&#xA;What you really should do is write a shader that calculates light per pixel, but getting there from where you are is going to take a little time." />
  <row Id="23652" PostHistoryTypeId="2" PostId="11133" RevisionGUID="47048d3b-20c6-4465-b1d3-37205053360d" CreationDate="2011-04-14T20:27:37.657" UserId="6042" Text="If you update thirty times per second, a human will not be able to press keys faster than you can sample the keyboard state. If you update more slowly than a human can type, then you may need one thread for rendering graphics, and another thread for reading and responding to the keyboard / mouse. &#xD;&#xA;&#xD;&#xA;But, if you update more slowly than a human can type, then you can't provide visual feedback for each key press either. This doesn't matter if the idea is to display aggregate feedback, such as average time between key presses." />
  <row Id="23653" PostHistoryTypeId="16" PostId="11129" RevisionGUID="d20af152-5c5e-4377-9f35-ce2389bbf92b" CreationDate="2011-04-14T20:33:53.053" UserId="4296" />
  <row Id="23654" PostHistoryTypeId="2" PostId="11134" RevisionGUID="2b84fe4a-48a1-46f1-b990-5b405d23a14c" CreationDate="2011-04-14T20:35:25.580" UserId="-1" Text="" />
  <row Id="23655" PostHistoryTypeId="2" PostId="11135" RevisionGUID="d8ac4f1f-a22a-4d17-98e3-9711c5eec1bd" CreationDate="2011-04-14T20:35:25.580" UserId="-1" Text="" />
  <row Id="23656" PostHistoryTypeId="2" PostId="11136" RevisionGUID="8999428d-ffe8-4b96-bdac-d2e8bc588fe8" CreationDate="2011-04-14T20:36:11.180" UserId="6042" Text="You seem to have had enough data to produce the handy animation above. Your simulation may need more accuracy than provided by my solution: &#xD;&#xA;&#xD;&#xA;For each frame of your animation above, record the pixel positions of the centers of each star. Enter these values into two arrays in your program. For a given time t, find the corresponding four consecutive entries in each array and do a bicubic filter on them to produce the position of each star." />
  <row Id="23657" PostHistoryTypeId="2" PostId="11137" RevisionGUID="537563d7-2a92-44c9-9a7c-0842112fec4c" CreationDate="2011-04-14T21:02:50.677" UserId="6690" Text="Well, if you're writing WinForms, you could just turn your whole app event based and deal with input the way a normal windows app would: let your app idle waiting for updates, and just go through the motions of a turn until you're ready to idle again.&#xD;&#xA;&#xD;&#xA;But I suspect, having a run loop and all, that what you're after is more of a traditional game loop for a turn based game like Civilization. In that case, you need to bear in mind that your logic is turn based, but your game actually isn't. &#xD;&#xA;&#xD;&#xA;Here's an outline of what I would normally do:&#xD;&#xA;&#xD;&#xA;    main() {&#xD;&#xA;      while( true ) {&#xD;&#xA;        collectInput(); // deal with common code for filling in keyboard queues, determining mouse positions, etc.&#xD;&#xA;        preBookKeeping(); // do any other work that needs constant ticks, like updating streaming/sound/physics/networking receives, etc.&#xD;&#xA;        runLogic(); // see below&#xD;&#xA;        postBookKeeping(); // again any stuff that needs ticking, but would want to take into account what happened in runLogic this frame, e.g. animation/particles/networking transmit, etc &#xD;&#xA;        drawEverything(); // any actual rendering actions you need to take&#xD;&#xA;      } &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    runLogic() {&#xD;&#xA;        // this is where you actually have a statemachine&#xD;&#xA;        switch ( state ) {&#xD;&#xA;           case WaitingForInput:&#xD;&#xA;             // look at the collected input and see if any of it is actionable&#xD;&#xA;           case WaitingForOpponent:&#xD;&#xA;             // look at the input and warn the player that they are doing stuff that isn't going to work right now e.g. a &quot;It's not your turn!&quot; notification.&#xD;&#xA;             // otherwise, use input to do things that might be valid when it's not the player's turn, like pan around the map.&#xD;&#xA;           case etc:&#xD;&#xA;             // a real game would have a ton more actual states, including transition states, start/end/options screens, etc.&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;The idea here is that runLogic() wouldn't actually block, it would just deal with input for the current time step. &#xD;&#xA;&#xD;&#xA;Your transition from state to state would make the game appear to be turn based in that at the appropriate states it would appear to be waiting for the player to take action, but in reality your game loop ticks on carrying out animation and rendering duties.&#xD;&#xA;&#xD;&#xA;You can hierarchically extend this to your objects: each object would get ticked to let it decide if it needs to take action based on the current state of the game. The trick is similarly to avoid blocking by having states that represent the object waiting for input. When you're in such a state, check the current input for the motivation you're looking for and just do nothing if it's not present, allowing the rest of the game to continue.&#xD;&#xA;&#xD;&#xA;The same goes for messaging. Rather than delivering messages immediately between objects and blocking when you get to an object that cannot continue, what you want is to post all messages to a central postmaster, and then once a tick deliver them. Return results the same way, by posting a return message. In this manner, objects that expect a response will automatically be able to wait over any number of ticks where other objects are happily ticking away. You can decouple the frequency of this messaging from your display frame rate by just ticking the postmaster multiple times a frame.&#xD;&#xA;&#xD;&#xA;A final note on optimization: it sounds like you'll have to do a lot of ticking and checking of every object just to do nothing, but once you have everything up and running, obvious optimizations should become self evident. For instance, rather than having one object list, split it into two: actively ticking objects that need to reconsider every tick, and dormant objects that won't need to do anything until a suitable message comes along to wake them up. You should find that very few things will really need to watch the world, and that the vast majority will just respond to messages to do their work." />
  <row Id="23658" PostHistoryTypeId="2" PostId="11138" RevisionGUID="2abcffd4-36bb-4b94-9c1c-ba476e67f293" CreationDate="2011-04-14T21:06:26.470" UserId="6302" Text="Store key state into a variable and compare on the next loop to current key states.  Create a `DateTime` object to hold the start and you can compare with `DateTime.Now` when the previous key state doesn't match." />
  <row Id="23659" PostHistoryTypeId="25" PostId="11130" RevisionGUID="22bee911-647f-49b9-b26d-7e4c5fe34d7e" CreationDate="2011-04-14T21:09:27.707" Comment="http://twitter.com/#!/StackGameDev/status/58638019451813888" />
  <row Id="23660" PostHistoryTypeId="5" PostId="11138" RevisionGUID="8679a507-fbd3-4313-afcf-0e1a0add0a62" CreationDate="2011-04-14T21:16:01.317" UserId="6302" Comment="added sample" Text="Store key state into a variable and compare on the next loop to current key states.  Create a `DateTime` object to hold the start and you can compare with `DateTime.Now` when the previous key state doesn't match.&#xD;&#xA;&#xD;&#xA;Very simple example of what I mean: &#xD;&#xA;&#xD;&#xA;       if(currentKeyboardState.IsKeyDown(Keys.Space)&#xD;&#xA;          &amp;&amp; !previousKeyboardState.IsKeyDown(Key.Space))&#xD;&#xA;          { DateTime startTime = DateTime.Now; }&#xD;&#xA;        ...&#xD;&#xA;        if(!currentKeyboardState.IsKeyDown(Keys.Space)&#xD;&#xA;          &amp;&amp; previousKeyboardState.IsKeyDown(Key.Space))&#xD;&#xA;          { TimeSpan elapsedTime = DateTime.Now - startTime; }" />
  <row Id="23661" PostHistoryTypeId="5" PostId="11113" RevisionGUID="eb7c2c8d-9ce4-41fe-81e2-1ce6de334aed" CreationDate="2011-04-14T21:23:55.503" UserId="6562" Comment="added 196 characters in body" Text="I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero.&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;Setup:&#xD;&#xA;&#xD;&#xA;    //Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, &quot;p&quot;);)&#xD;&#xA;    glEnableVertexAttribArray(ATTRIB_P);&#xD;&#xA;&#xD;&#xA;In the rendering loop:&#xD;&#xA;&#xD;&#xA;    float vertices[]={0.0f,0.0f,0.0f};&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_POINT_SPRITE);&#xD;&#xA;    glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);&#xD;&#xA;    glVertexAttribPointer(ATTRIB_P, 3, GL_FLOAT, GL_FALSE, 0, vertices);&#xD;&#xA;    glDrawArrays(GL_POINTS, 0, 1);&#xD;&#xA;Vertex Shader:&#xD;&#xA;&#xD;&#xA;    attribute highp vec4 p;&#xD;&#xA;    void main() {&#xD;&#xA;      gl_PointSize = 40.0f;&#xD;&#xA;      gl_Position = p;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader:&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;     gl_FragColor = vec4(gl_PointCoord.st, 0, 1);&#xD;&#xA;    }&#xD;&#xA;But this only draws a black square with a size of 40.&#xD;&#xA;What am I doing wrong?&#xD;&#xA; " />
  <row Id="23662" PostHistoryTypeId="2" PostId="11139" RevisionGUID="fc7fd4f1-ddcf-45d1-bb28-34076df369a3" CreationDate="2011-04-14T21:36:39.133" UserId="6690" Text="The industry doesn't have these terms nailed down well yet, but I'd say your concept is pretty far from colloquial use.&#xD;&#xA;&#xD;&#xA;&quot;Game Engine&quot; usually refers to a piece of software that is meant to be extended by a game developer with their own specific logic to make a unique game. The Game Engine would provide all or nearly all of the generic services a game might need; e.g. audio playback, asset management, a renderer, physics simulation, AI framework, special effects systems, etc. &#xD;&#xA;&#xD;&#xA;Usually a good Game Engine will also have a heavy tool component, where the Game Engine will ship with one or more tools to facilitate creating assets for use with the Game Engine; e.g. a 3D model and texture converter, a level editor, a sound back editor, etc.&#xD;&#xA;&#xD;&#xA;The general idea is that a game dev should only have to bring their own unique work to the project (their logic, their art, their flair for lack of a better term), avoiding reinventing the wheel by leaving the common stuff to the game engine.&#xD;&#xA;&#xD;&#xA;The murky part usually is how much needs to come with an Engine to consider it complete. That's a shifting target, both by who's looking at the question and what's currently fashionable. It's not at all uncommon that a project will use only a portion of the Game Engine they're purportedly using, patching in other components they find desirable/necessary. These other components (usually referred to as libraries) are also often bought in rather than written in house.&#xD;&#xA;&#xD;&#xA;To throw in one more related common term: both the individual systems (Libraries) and comprehensive collections of integrated systems and tools (Engines) are collectively referred to as Middleware." />
  <row Id="23663" PostHistoryTypeId="2" PostId="11140" RevisionGUID="ecb94375-d0be-4d65-8728-02985a5acae4" CreationDate="2011-04-14T21:43:32.547" UserId="5020" Text="Following a few links from the Wikipedia page you reference leads to [Position as a function of time](http://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion#Position_as_a_function_of_time)." />
  <row Id="23664" PostHistoryTypeId="5" PostId="11113" RevisionGUID="8f4304f1-db56-4fa3-a334-d67f5962ab42" CreationDate="2011-04-14T21:52:00.990" UserId="6562" Comment="added 437 characters in body; added 92 characters in body; added 1 characters in body; added 81 characters in body" Text="I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero.&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;Setup:&#xD;&#xA;&#xD;&#xA;    //Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, &quot;p&quot;);)&#xD;&#xA;    glEnableVertexAttribArray(ATTRIB_P);&#xD;&#xA;&#xD;&#xA;In the rendering loop:&#xD;&#xA;&#xD;&#xA;    glUseProgram(shader_particles);&#xD;&#xA;    float vertices[]={0.0f,0.0f,0.0f};&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_POINT_SPRITE);&#xD;&#xA;    glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);&#xD;&#xA;    //glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);(tried with this on/off, doesn't work)&#xD;&#xA;    glVertexAttribPointer(ATTRIB_P, 3, GL_FLOAT, GL_FALSE, 0, vertices);&#xD;&#xA;    glDrawArrays(GL_POINTS, 0, 1);&#xD;&#xA;Vertex Shader:&#xD;&#xA;&#xD;&#xA;    attribute highp vec4 p;&#xD;&#xA;    void main() {&#xD;&#xA;      gl_PointSize = 40.0f;&#xD;&#xA;      gl_Position = p;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader:&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;     gl_FragColor = vec4(gl_PointCoord.st, 0, 1);//if the coords range from 0-1, this should draw a square with black,red,green,yellow corners&#xD;&#xA;    }&#xD;&#xA;But this only draws a black square with a size of 40.&#xD;&#xA;What am I doing wrong?&#xD;&#xA;&#xD;&#xA;Edit: Point sprites work when i use the fixed function, but I need to use shaders because in the end the code will be for opengl es 2.0&#xD;&#xA;&#xD;&#xA;    glUseProgram(0);&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_POINT_SPRITE);&#xD;&#xA;    glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);&#xD;&#xA;    glPointSize(40);&#xD;&#xA;    glBegin(GL_POINTS);&#xD;&#xA;    glVertex3f(0.0f,0.0f,0.0f);&#xD;&#xA;    glEnd();&#xD;&#xA;&#xD;&#xA; " />
  <row Id="23665" PostHistoryTypeId="5" PostId="11134" RevisionGUID="1ddd07bb-7790-4cb8-a6a4-5713e56173fb" CreationDate="2011-04-14T22:43:46.603" UserId="3588" Comment="added 910 characters in body" Text="[tag:math] is a core aspect of computer science and programming to begin with, so it is no surprise that it has extensive amounts of importance to a game developer. This tag is for questions about the math needed to produce some result in your game. It can be complete formulae and algorithms, or it could just be the math for a particular step in the process. Examples of math questions include:&#xD;&#xA;&#xD;&#xA; - Create a formula for damage given different present variables&#xD;&#xA; - Determine the change in momentum for two objects after a collision&#xD;&#xA; - Find the largest parabolic distance for a projectile path&#xD;&#xA; - Produce specific beautiful, scintillating patterns of colorful bullet death&#xD;&#xA;&#xD;&#xA;And much more! It also can apply to questions seeking a mathematical explanation for bizarre behavior.&#xD;&#xA;&#xD;&#xA;For questions specifically about using a complete algorithm to achieve a specific result, one can also use [tag:algorithm]." />
  <row Id="23666" PostHistoryTypeId="24" PostId="11134" RevisionGUID="1ddd07bb-7790-4cb8-a6a4-5713e56173fb" CreationDate="2011-04-14T22:43:46.603" Comment="Proposed by 3588 approved by 51 edit id of 302" />
  <row Id="23667" PostHistoryTypeId="5" PostId="11135" RevisionGUID="3b814670-e7bd-46c5-b595-7c1f0183f50b" CreationDate="2011-04-14T22:43:48.537" UserId="3588" Comment="added 206 characters in body" Text="Arithmetic, geometry, calculus, and all else which resolves the number-crunching necessary in a game. Math questions are those that deal with the formulae and calculations used by the game in various parts." />
  <row Id="23668" PostHistoryTypeId="24" PostId="11135" RevisionGUID="3b814670-e7bd-46c5-b595-7c1f0183f50b" CreationDate="2011-04-14T22:43:48.537" Comment="Proposed by 3588 approved by 51 edit id of 303" />
  <row Id="23669" PostHistoryTypeId="5" PostId="11122" RevisionGUID="f30db2c2-5165-4332-bf88-2d0659634993" CreationDate="2011-04-14T22:43:56.870" UserId="6743" Comment="Added a screenshot" Text="Game source code: [https://github.com/dnguyen/Aurora][1]&#xD;&#xA;&#xD;&#xA;I am using this to create a 2D camera: http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/. After I added the transformation to the spritebatch all my positions seem to be &quot;off&quot; after I start moving the ship away from the center of the screen.&#xD;&#xA;&#xD;&#xA;Screenshot: http://i.stack.imgur.com/llHrk.png The blue trail should be following the ship, but it's not.&#xD;&#xA;&#xD;&#xA;Any idea what might be wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dnguyen/Aurora" />
  <row Id="23670" PostHistoryTypeId="24" PostId="11122" RevisionGUID="f30db2c2-5165-4332-bf88-2d0659634993" CreationDate="2011-04-14T22:43:56.870" Comment="Proposed by 6743 approved by 51 edit id of 304" />
  <row Id="23671" PostHistoryTypeId="2" PostId="11141" RevisionGUID="1c015466-e5b5-4410-a0a1-9d8656df926d" CreationDate="2011-04-14T22:46:27.087" UserId="3547" Text="You could capture the input by using the System.Windows.Forms.NativeWindow class. You'll get a notification when an input event occurs. That way you'll be notified as fast as possible right when it occurs, letting you record the time to a higher precision. It gets kind of messy (native/unsafe code), but it works.&#xD;&#xA;&#xD;&#xA;I think this only works on windows, but I think that's the platform your targeting (no need for this on Xbox and WP7).&#xD;&#xA;&#xD;&#xA;Here is a good example (from nuclex framework): [WindowInputCapturer][1] (note: this code might have been updated recently and I didn't code it)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://devel.nuclex.org/framework/browser/ui/Nuclex.UserInterface/trunk/Source/Input/WindowInputCapturer.cs?rev=975" />
  <row Id="23672" PostHistoryTypeId="2" PostId="11142" RevisionGUID="bd427755-ebb7-4fa3-9e04-e8609a51202d" CreationDate="2011-04-14T22:54:01.513" UserId="1923" Text="XNA is a looped based framework, not an event based framework. If you need the exact time an event occurred, consider a winforms project (an event based project) and connect XNA to a control if necessary for rendering." />
  <row Id="23673" PostHistoryTypeId="2" PostId="11143" RevisionGUID="7d425ab6-c21d-4dd7-bea6-9dc96fc3c5a6" CreationDate="2011-04-14T23:28:00.860" UserId="6605" Text="I am trying to add a &quot;PlayerName&quot; box on top of a opengl menu background, is this possible?  I've tried various layouts, but they don't seem to allow an EditText box to appear on top&#xD;&#xA;&#xD;&#xA;What is the typical way of doing something like this?  Do I need to manually render the text and handle input or is there a better way?  It seems like it should be possible to show the EditText on top of the GLSurfaceView somehow.&#xD;&#xA;&#xD;&#xA;Thanks for your help&#xD;&#xA;&#xD;&#xA;All the best,&#xD;&#xA;&#xD;&#xA;Ash" />
  <row Id="23674" PostHistoryTypeId="1" PostId="11143" RevisionGUID="7d425ab6-c21d-4dd7-bea6-9dc96fc3c5a6" CreationDate="2011-04-14T23:28:00.860" UserId="6605" Text="Possible to overlay EditText box on a GLSurfaceView on Android?" />
  <row Id="23675" PostHistoryTypeId="3" PostId="11143" RevisionGUID="7d425ab6-c21d-4dd7-bea6-9dc96fc3c5a6" CreationDate="2011-04-14T23:28:00.860" UserId="6605" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;gui&gt;" />
  <row Id="23676" PostHistoryTypeId="6" PostId="11143" RevisionGUID="698a805e-f043-44af-9c1f-43feb4fb996b" CreationDate="2011-04-14T23:45:33.870" UserId="6605" Comment="edited tags" Text="&lt;android&gt;&lt;java&gt;&lt;opengl-es&gt;&lt;gui&gt;" />
  <row Id="23677" PostHistoryTypeId="25" PostId="11143" RevisionGUID="3bb130f9-c5e8-4601-b58a-b7d1c64688dc" CreationDate="2011-04-15T00:09:27.517" Comment="http://twitter.com/#!/StackGameDev/status/58683316135657472" />
  <row Id="23678" PostHistoryTypeId="5" PostId="11141" RevisionGUID="b4e89642-9981-4f4f-ae69-7ab15c3012b7" CreationDate="2011-04-15T00:49:52.100" UserId="3547" Comment="added 162 characters in body; added 124 characters in body" Text="You could capture the input by using the System.Windows.Forms.NativeWindow class. You'll get a notification when an input event occurs. That way you'll be notified as fast as possible right when it occurs, letting you record the time to a higher precision. It gets kind of messy (native/unsafe code), but it works.&#xD;&#xA;&#xD;&#xA;I think this only works on windows, but I think that's the platform your targeting (no need for this on Xbox and WP7).&#xD;&#xA;&#xD;&#xA;Here is a good example (from nuclex framework): [WindowInputCapturer][1] (note: this code might have been updated recently and I didn't code it)&#xD;&#xA;&#xD;&#xA;Edit: This also allows you to get at the character code of the key press. This could be useful for taking text input (especially things like latin characters) I'm not sure why you would need to get input at such a high precision, but this would be a good way to do it in my opinion.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://devel.nuclex.org/framework/browser/ui/Nuclex.UserInterface/trunk/Source/Input/WindowInputCapturer.cs?rev=975" />
  <row Id="23679" PostHistoryTypeId="2" PostId="11144" RevisionGUID="8b479ed3-bd67-4522-b7c7-5f10ffadd24a" CreationDate="2011-04-15T01:13:38.843" UserId="43" Text="What are good methods/software for automatically updating your player's game assets and executables? It is preferable for this to be free. Updates must be small in size and not waste cpu-time. Also it has to be easy to run a update server to create new versions or logistically.&#xD;&#xA;&#xD;&#xA;My usecase is for updating player game versions such as in normal games or massive online clients or running distributed game testing." />
  <row Id="23680" PostHistoryTypeId="1" PostId="11144" RevisionGUID="8b479ed3-bd67-4522-b7c7-5f10ffadd24a" CreationDate="2011-04-15T01:13:38.843" UserId="43" Text="What are good methods for automatically updating your entire game's files." />
  <row Id="23681" PostHistoryTypeId="3" PostId="11144" RevisionGUID="8b479ed3-bd67-4522-b7c7-5f10ffadd24a" CreationDate="2011-04-15T01:13:38.843" UserId="43" Text="&lt;client-server&gt;" />
  <row Id="23682" PostHistoryTypeId="5" PostId="11144" RevisionGUID="da806f44-3f5e-426d-b266-9da619c23bbc" CreationDate="2011-04-15T01:23:23.667" UserId="43" Comment="deleted 26 characters in body; edited title; added 8 characters in body; added 7 characters in body; added 6 characters in body" Text="How should I automatically update my player's game assets and executables? It is preferable for the update software to be free. Updates must be small in size and not waste cpu-time. Also it has to be easy to run a update server to create new versions or logistically.&#xD;&#xA;&#xD;&#xA;My use case is for updating player game versions such as in massive online clients or running distributed game testing or even normal games." />
  <row Id="23683" PostHistoryTypeId="4" PostId="11144" RevisionGUID="da806f44-3f5e-426d-b266-9da619c23bbc" CreationDate="2011-04-15T01:23:23.667" UserId="43" Comment="deleted 26 characters in body; edited title; added 8 characters in body; added 7 characters in body; added 6 characters in body" Text="How should I automatically update my entire game's files." />
  <row Id="23684" PostHistoryTypeId="4" PostId="11144" RevisionGUID="79ba7f6c-81bd-4cf3-9d9a-e6284f960654" CreationDate="2011-04-15T01:33:44.510" UserId="43" Comment="edited title; added 6 characters in body; edited title" Text="How should I automatically update/patch my entire game's files?" />
  <row Id="23685" PostHistoryTypeId="5" PostId="11144" RevisionGUID="79ba7f6c-81bd-4cf3-9d9a-e6284f960654" CreationDate="2011-04-15T01:33:44.510" UserId="43" Comment="edited title; added 6 characters in body; edited title" Text="How should I automatically update/patch my player's game assets and executables? It is preferable for the update software to be free. Updates must be small in size and not waste cpu-time. Also it has to be easy to run a update server to create new versions or logistically.&#xD;&#xA;&#xD;&#xA;My use case is for updating player game versions such as in massive online clients or running distributed game testing or even normal games." />
  <row Id="23686" PostHistoryTypeId="5" PostId="11144" RevisionGUID="62ab2ebc-b2f8-4558-9c9f-2e5214b7f546" CreationDate="2011-04-15T01:39:02.087" UserId="43" Comment="deleted 6 characters in body; edited title" Text="How should I automatically update my player's game assets and executables? It is preferable for the update software to be free. Updates must be small in size and not waste cpu-time. Also it has to be easy to run a update server to create new versions or logistically.&#xD;&#xA;&#xD;&#xA;My use case is for updating player game versions such as in massive online clients or running distributed game testing or even normal games." />
  <row Id="23687" PostHistoryTypeId="4" PostId="11144" RevisionGUID="62ab2ebc-b2f8-4558-9c9f-2e5214b7f546" CreationDate="2011-04-15T01:39:02.087" UserId="43" Comment="deleted 6 characters in body; edited title" Text="How should I automatically update my entire game's files?" />
  <row Id="23688" PostHistoryTypeId="25" PostId="11144" RevisionGUID="52842cdc-17d4-4333-91f9-db628f6ea42d" CreationDate="2011-04-15T03:09:27.620" Comment="http://twitter.com/#!/StackGameDev/status/58728615445143552" />
  <row Id="23689" PostHistoryTypeId="2" PostId="11145" RevisionGUID="d0aa3be2-f4ad-40b6-bd06-732925e7074c" CreationDate="2011-04-15T03:12:23.620" UserId="5944" Text="   I've found numerical integration to be the easiest way. The inverse square law (F=GM/r^2) works pretty well. And Runge Kutta order four often called RK4 is easy to implment and works quiet well. You start out by writing a routien which takes first order time derivative, for instance for a single object in 2D space, you have X and Y coordinates, and X and Y velocities. The output is the time derivative, the time derivative of of position is simply velocity, so half of it is just copying values, then the acceleration is just the gravational attraction. Then you follow the Runge Kutta prescription. The error of a single time step is proportional to the time step to the fifth power. You adjust the time step to make the result accurate enough. One advantage on numerical integration is if you want to play with the system to make it more interesting, add extra orbiting bodies, or add friction, or whatever, you alreday have the machinery." />
  <row Id="23690" PostHistoryTypeId="5" PostId="11144" RevisionGUID="41ad347e-8ed8-44b3-8dab-7f585817ca4d" CreationDate="2011-04-15T04:17:47.520" UserId="43" Comment="added 30 characters in body; deleted 7 characters in body; edited body; deleted 23 characters in body" Text="How should I automatically update my player's game assets and executables? It is preferable for the update software to be free. Updates must be small in size and not waste cpu-time. Also it has to be easy to run a update server to create new versions or logistically.&#xD;&#xA;&#xD;&#xA;My use case is for updating player game versions such as in massive online clients or running distributed game testing or even normal games." />
  <row Id="23691" PostHistoryTypeId="25" PostId="11111" RevisionGUID="25f3ca49-758c-42d4-8cd0-a27276f57338" CreationDate="2011-04-15T06:09:27.740" Comment="http://twitter.com/#!/StackGameDev/status/58773914792370176" />
  <row Id="23692" PostHistoryTypeId="2" PostId="11146" RevisionGUID="4f73c753-1ecc-4001-ae70-833faedbc4d4" CreationDate="2011-04-15T07:55:46.527" UserId="20" Text="As long as the animations are frame-based (not scripted), you can embed AS2 SWF assets into an AS3 project.&#xD;&#xA;&#xD;&#xA;The best way is probably to [embed symbols][1] from your SWF files, like this:&#xD;&#xA;&#xD;&#xA;    [Embed(source='SWFFileName.swf', symbol='symbolName')]&#xD;&#xA;&#xD;&#xA;If you just create animations and maybe have some frame-labels to jump to, this is going to work fine. It won't work if you have scripted animations, since all AS2 code will be lost when embedding.&#xD;&#xA;&#xD;&#xA;It's probably good practice anyway to have plain animations without scripting and let the actual game code control the animations.&#xD;&#xA;&#xD;&#xA;  [1]: http://livedocs.adobe.com/flex/3/html/help.html?content=embed_4.html" />
  <row Id="23693" PostHistoryTypeId="2" PostId="11147" RevisionGUID="a1377768-1193-4d0b-bd9a-db8f6fb35c82" CreationDate="2011-04-15T07:55:48.600" UserId="6732" Text="first of all, i don't know any particular website for this, but i can help you out.&#xD;&#xA;&#xD;&#xA;What file types does you current 3d environment support?&#xD;&#xA;search Google sketch-up library online, it has lots of 3d models.&#xD;&#xA;&#xD;&#xA;if you found what you need, then check if you 3d apps file type is supported in Google sketch-up.&#xD;&#xA;&#xD;&#xA;if yes download Google sketch-up, download the model from Google site and do the conversion manually.&#xD;&#xA;&#xD;&#xA;the reason i suggest this is that Google sketch-up has lots of models you can download free, depending on the owners terms.&#xD;&#xA;&#xD;&#xA;if you have any problem converting, let me know&#xD;&#xA;i have done lots of conversion like these when doing 3d games" />
  <row Id="23694" PostHistoryTypeId="25" PostId="11116" RevisionGUID="5222114b-1bd6-4221-b41b-fbac3224d696" CreationDate="2011-04-15T09:09:27.717" Comment="http://twitter.com/#!/StackGameDev/status/58819212428328960" />
  <row Id="23695" PostHistoryTypeId="5" PostId="10898" RevisionGUID="3fc77836-cce5-4b1b-a4ad-a5eb431382b6" CreationDate="2011-04-15T09:24:07.250" UserId="3794" Comment="added 12 characters in body" Text="Neat idea for the game. The problem is that light really doesn't look like this. Light decay is NOT gausian :). That's for the begining. What i want to propose is adding simple (but relatively physicaly correct) fog or dust. Mean volumetric effect. You will have to implement volumetric raycasting on the gpu. Don't panic. It is not that hard as it might sound.&#xD;&#xA;&#xD;&#xA;I have created this in [our engine][1] for you as a example how it might look like. It is realtime. And can be realtime for few lights with cube map shadow map. (low fps is caused by output)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;What do you see here is fog (or dust) containing lights. Lights are represented only by their position, color and intensity. They have cubic decay, which looks natural and fits to the definition of the Radiance. Lights has different intensity, exactly what you wanted. &#xD;&#xA;&#xD;&#xA;Volumetric raycasting casts ray for every pixel and samples through the volume. It is usualy used for smoke, dust or fire on offline rendering, but can be done on gpu in realtime. You dont have actual volume, but you have to sample for the shadows contained in the shadow maps. If you want only fog, it can be done with O(1) complexity (per pixel shader)&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Vk8i2.png&quot; width=&quot;400&quot;&gt;&#xD;&#xA;&#xD;&#xA;You sample on ray like this:&#xD;&#xA;&#xD;&#xA;    //pseudo ugly pixel shader code&#xD;&#xA;    samplePoint = zNear;  //position on zNear (in worldSpace)&#xD;&#xA;    color = 0;&#xD;&#xA;    until(z-buffur_value || zFar)&#xD;&#xA;    {&#xD;&#xA;        lightDecay = getLightDecay(samplePoint,lightPosition); &#xD;&#xA;        shadow = getShadow(samplePoint); //like regular shadow mapping, you have world space position and want to know if there is shadow or not.&#xD;&#xA;        color.rgb += (1 - color.a) * (lightColor * lightIntensity * lightDecay * shadow);&#xD;&#xA;        color.a += (1 - color.a) * (1 - opacity); //opacity is the same in your case. If rendering something like clouds it is loaded from the 3D texture. I suggest value like 0.01 or similar..&#xD;&#xA;        samplePoint += direction * step;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is not hard actually and can be done as a pixel shader (offscreen). You have to stop sampling rays at z-buffer value (so it has to be applied after the opaque scene render). And alpha blended with opaque scene render.&#xD;&#xA;&#xD;&#xA;It is pretty solution to this. It also attenuates lights which are far from player, solves the intensity correctly and i think it looks cool.&#xD;&#xA;&#xD;&#xA;For more info you maybe like read [my paper][3] about implementation of volumetric effects into game engine (well something similar to game engine :)). &#xD;&#xA;&#xD;&#xA;There is also [awesome book][4] about volumetric rendering. I'm in love with it. Also this site contains pdf tutorials which are quite good introduction to the volume graphics.&#xD;&#xA;&#xD;&#xA;Improvement: Adding colors to lights and perlin noise to the volume to look more natural (left without perlin|right with perlin)&#xD;&#xA;&#xD;&#xA;![enter image description here][5]![enter image description here][6]  &#xD;&#xA;(hmm those gifs are too low quality that there is no significant difference).&#xD;&#xA;&#xD;&#xA;**edit (some performance notes):**&#xD;&#xA;it can be done as one pass per light, which is usefull if lights has lots of aditional textures (light color - projective texturing, intensity curves etc.). But this is frame rate killer, it can (and should) be done in one pass for all lights if you have enough texture units available (i think you have in your game). Than it can have about 45-60fps i hope. &#xD;&#xA;&#xD;&#xA;Sampling doesn't have to be linear. You can make sampling logartmic (or similar function). &#xD;&#xA;&#xD;&#xA;    makeEveryStepALittleBigger = 1.05;&#xD;&#xA;    samplePoint += direction * step;&#xD;&#xA;    step *= makeEveryStepALittleBigger; //this should be actualy based on camera FOV&#xD;&#xA;&#xD;&#xA;This however destroy physical correctness and &quot;opacity correction&quot; has to be done. Which is: &#xD;&#xA;&#xD;&#xA;    curentAlpha = 1 - pow((1 - opacity), delta);&#xD;&#xA;&#xD;&#xA;where delta is difference between step1 and step2.&#xD;&#xA;&#xD;&#xA;And if you dont mind little noise, you can add depth jittering which allows you to use much lower number of samples (that is pretty good and easier solution).&#xD;&#xA;&#xD;&#xA;*That was fun...*&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://furryball.aaa-studio.eu/&#xD;&#xA;  [2]: http://i.stack.imgur.com/5jYuH.gif&#xD;&#xA;  [3]: http://dl.dropbox.com/u/5034466/cescg/cescgsmpl.pdf&#xD;&#xA;  [4]: http://www.real-time-volume-graphics.org/&#xD;&#xA;  [5]: http://i.stack.imgur.com/Ce68m.gif&#xD;&#xA;  [6]: http://i.stack.imgur.com/bwi7r.gif" />
  <row Id="23696" PostHistoryTypeId="2" PostId="11148" RevisionGUID="fa4e6b47-682d-4887-a9a9-663487676434" CreationDate="2011-04-15T09:55:44.147" UserId="4410" Text="There's a question on Stack Overflow [here][1] that might be of use. It relates to patching binary files in an efficient way (basically storing the differences between versions rather than the entire files).&#xD;&#xA;&#xD;&#xA;It's also worth being aware that if you install the game files into &quot;Program Files&quot; on Windows Vista and up then you'd also need to take into account the user not necessarily having the permission to modify the files. There's a little bit of info from the DirectX help files [here][2] on that too.&#xD;&#xA;&#xD;&#xA;Once you have your patch generated, you'll want to probably be checking the current version of the game exe with something hosted on the web somewhere, then download and launch a separate patcher with patch content. The main game exe won't be able to patch itself while it's running. There are plenty of cheap file hosting solutions out there you can store your patch and other data on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1945075/how-do-i-create-binary-patches&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ee418715%28v=VS.85%29.aspx" />
  <row Id="23697" PostHistoryTypeId="5" PostId="11121" RevisionGUID="85012959-a03c-4193-ba25-9de8102eef36" CreationDate="2011-04-15T10:16:32.897" UserId="6655" Comment="Added pseudo-code" Text="I'm not sure if there even exists a closed form for drag or wind, but it is quite easy to simulate in a step-wise fashion (like all the physics libraries do):&#xD;&#xA;&#xD;&#xA;1. set your initial condition: `x`, `y`, `vx`, `vy`   (for `t = 0`)&#xD;&#xA;2. update position: `x += vx * dt`, `y += vy * dt`   (where `dt` is the time elapsed since the last update)&#xD;&#xA;3. calculate these velocity helpers: `v_squared = vx * vx + vy * vy` and `v_length = sqrt(v_squared)`&#xD;&#xA;3. calculate drag force: `f_drag = c * v_squared`    (where `c` is the coefficient of friction *small!*)&#xD;&#xA;4. accumulate forces: `f_x = (-f_drag * vx / v_length)`, `f_y = (-f_drag * vy / v_length) + (-g * mass)`   (where mass is the mass of your golf ball)&#xD;&#xA;5. update velocity: `v_x += f_x * dt / mass`, `v_y += f_y * dt / mass`&#xD;&#xA;&#xD;&#xA;That's basically Euler's Method http://en.wikipedia.org/wiki/Euler_method for approximating those physics.&#xD;&#xA;&#xD;&#xA;Edit: A bit more on how the simulation as requested in the comments:&#xD;&#xA;&#xD;&#xA;- The initial condition (`t = 0`) in your case is `x = 0, y = 0, vx = v0 * cos(theta), vy = v0 * sin(theta)`. It's basically the same as in your basic trajectory formula where every occurence of `t` is replaced by `0`.&#xD;&#xA;&#xD;&#xA;- The kinetic energy `KE = 0.5 * m * (V * V) = 0.5 * m * v_squared` is valid for every `t` (see `v_squared` as in 3.&#xD;&#xA;&#xD;&#xA;- The potential energy `PE = m * g * y` is also always valid.&#xD;&#xA;&#xD;&#xA;- If you want to get the current `x,y` for a given `t1` what you need to do is initialize the simulation for `t = 0` and do small `dt` updates until `t = t1`&#xD;&#xA;&#xD;&#xA;- If you already calculated `x,y` for a `t1` and you want to know their values for a `t2` where `t1 &lt; t2` all you need to do is calculating those small `dt` update steps from `t1` to `t2`&#xD;&#xA;&#xD;&#xA;Pseudo-Code:&#xD;&#xA;&#xD;&#xA;    simulate(v0, theta, t1)&#xD;&#xA;      dt = 0.1&#xD;&#xA;      x = 0&#xD;&#xA;      y = 0&#xD;&#xA;      vx = v0 * cos(theta)&#xD;&#xA;      vy = v0 * sin(theta)&#xD;&#xA;      for (t = 0; t &lt; t1; t += dt)&#xD;&#xA;        x += vx * dt&#xD;&#xA;        y += vy * dt&#xD;&#xA;        v_squared = vx * vx + vy * vy&#xD;&#xA;        v_length = sqrt(v_squared)&#xD;&#xA;        f_drag = c * v_squared&#xD;&#xA;        f_grav = g * mass&#xD;&#xA;        f_x = (-f_drag * vx / v_length)&#xD;&#xA;        f_y = (-f_drag * vy / v_length) + (-f_grav)&#xD;&#xA;        v_x += f_x * dt / mass&#xD;&#xA;        v_y += f_y * dt / mass&#xD;&#xA;      end for&#xD;&#xA;      return x, y&#xD;&#xA;    end simulate" />
  <row Id="23698" PostHistoryTypeId="2" PostId="11149" RevisionGUID="f659ffda-ec68-4551-81a4-8a103116eb55" CreationDate="2011-04-15T10:38:01.897" UserId="6601" Text="I am trying to make a simple weapon change in Unity3D.&#xD;&#xA;The best way to do this is with the mouse Scroll wheel as far as i can see.&#xD;&#xA;&#xD;&#xA;I googled on how to do this and found that i have to use the Input.GetAxis(&quot;Mouse ScrollWheel&quot;); I use this piece of code and print it. Still i always get an value of 0.&#xD;&#xA;any ideas? I just need to solve how to get the value first, ill figure out the rest myself.&#xD;&#xA;&#xD;&#xA;Code idea:&#xD;&#xA;&#xD;&#xA;    function Update () {&#xD;&#xA;	print(WeaponNumber);&#xD;&#xA;	&#xD;&#xA;	if(Input.GetAxis(&quot;Mouse ScrollWheel&quot;)){&#xD;&#xA;		WeaponNumber += Input.GetAxis(&quot;Mouse ScrollWheel&quot;);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}" />
  <row Id="23699" PostHistoryTypeId="1" PostId="11149" RevisionGUID="f659ffda-ec68-4551-81a4-8a103116eb55" CreationDate="2011-04-15T10:38:01.897" UserId="6601" Text="Unity MouseWheel weapon change" />
  <row Id="23700" PostHistoryTypeId="3" PostId="11149" RevisionGUID="f659ffda-ec68-4551-81a4-8a103116eb55" CreationDate="2011-04-15T10:38:01.897" UserId="6601" Text="&lt;unity&gt;&lt;javascript&gt;" />
  <row Id="23701" PostHistoryTypeId="2" PostId="11150" RevisionGUID="4491e94d-9457-4bce-a3f7-261503cedc41" CreationDate="2011-04-15T10:54:34.743" UserId="5584" Text="Is it possible to render a surface of revolution with using a vertex shader?&#xD;&#xA;&#xD;&#xA;I have NxM vertices, and I would like to transformate them accordingly to the function&#xD;&#xA;I have to draw.&#xD;&#xA;&#xD;&#xA;Is it possible, or i can not change the vertex position with a vertex shader?&#xD;&#xA;&#xD;&#xA;Thanks ahead!&#xD;&#xA;" />
  <row Id="23702" PostHistoryTypeId="1" PostId="11150" RevisionGUID="4491e94d-9457-4bce-a3f7-261503cedc41" CreationDate="2011-04-15T10:54:34.743" UserId="5584" Text="Surface of Revolution with vertex shader" />
  <row Id="23703" PostHistoryTypeId="3" PostId="11150" RevisionGUID="4491e94d-9457-4bce-a3f7-261503cedc41" CreationDate="2011-04-15T10:54:34.743" UserId="5584" Text="&lt;graphics-programming&gt;" />
  <row Id="23704" PostHistoryTypeId="5" PostId="11113" RevisionGUID="de3088d3-fbb1-485a-96a5-7dde840de1bb" CreationDate="2011-04-15T11:28:43.830" UserId="6562" Comment="added 86 characters in body" Text="I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero.&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;Setup:&#xD;&#xA;&#xD;&#xA;    //Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, &quot;p&quot;);)&#xD;&#xA;    glEnableVertexAttribArray(ATTRIB_P);&#xD;&#xA;&#xD;&#xA;In the rendering loop:&#xD;&#xA;&#xD;&#xA;    glUseProgram(shader_particles);&#xD;&#xA;    float vertices[]={0.0f,0.0f,0.0f};&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_POINT_SPRITE);&#xD;&#xA;    glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);&#xD;&#xA;    //glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);(tried with this on/off, doesn't work)&#xD;&#xA;    glVertexAttribPointer(ATTRIB_P, 3, GL_FLOAT, GL_FALSE, 0, vertices);&#xD;&#xA;    glDrawArrays(GL_POINTS, 0, 1);&#xD;&#xA;Vertex Shader:&#xD;&#xA;&#xD;&#xA;    attribute highp vec4 p;&#xD;&#xA;    void main() {&#xD;&#xA;      gl_PointSize = 40.0f;&#xD;&#xA;      gl_Position = p;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader:&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;     gl_FragColor = vec4(gl_PointCoord.st, 0, 1);//if the coords range from 0-1, this should draw a square with black,red,green,yellow corners&#xD;&#xA;    }&#xD;&#xA;But this only draws a black square with a size of 40.&#xD;&#xA;What am I doing wrong?&#xD;&#xA;&#xD;&#xA;Edit: Point sprites work when i use the fixed function, but I need to use shaders because in the end the code will be for opengl es 2.0&#xD;&#xA;&#xD;&#xA;    glUseProgram(0);&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;    glEnable(GL_POINT_SPRITE);&#xD;&#xA;    glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);&#xD;&#xA;    glPointSize(40);&#xD;&#xA;    glBegin(GL_POINTS);&#xD;&#xA;    glVertex3f(0.0f,0.0f,0.0f);&#xD;&#xA;    glEnd();&#xD;&#xA;&#xD;&#xA;Is anyone able to get point sprites working with shader? If so, please share some code." />
  <row Id="23705" PostHistoryTypeId="2" PostId="11151" RevisionGUID="f81d7583-bee6-42a2-bc53-eced6ae771a5" CreationDate="2011-04-15T11:41:54.530" UserId="4129" Text="***Yes you can change the vertex position with a vertex shader***.  The vertex shader is specifically intended for this purpose.&#xD;&#xA;&#xD;&#xA;In [this basic OpenGL example][1], the shader reads in the vertex - in the `gl_Vertex` variable - and writes the final vertex position to the `gl_Position` variable:&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;       vec4 a = gl_Vertex;&#xD;&#xA;       a.x = a.x * 0.5;&#xD;&#xA;       a.y = a.y * 0.5;&#xD;&#xA;       gl_Position = gl_ModelViewProjectionMatrix * a;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/loading.php" />
  <row Id="23706" PostHistoryTypeId="5" PostId="11151" RevisionGUID="36458f8b-b262-4ba2-8fd3-cc32b74a7a7b" CreationDate="2011-04-15T11:47:38.597" UserId="4129" Comment="deleted 46 characters in body; added 153 characters in body" Text="***Yes you can change the vertex position with a vertex shader***.  The vertex shader is specifically intended for this purpose.&#xD;&#xA;&#xD;&#xA;In [this basic OpenGL example][1], the shader reads in the vertex - in the `gl_Vertex` variable - and writes the final vertex position to the `gl_Position` variable:&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;       vec4 a = gl_Vertex;&#xD;&#xA;       ... custom code here&#xD;&#xA;       gl_Position = ... * a;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Determining the [surface of revolution][2] is, however, not really a rendering problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/loading.php&#xD;&#xA;  [2]: http://mathworld.wolfram.com/SurfaceofRevolution.html" />
  <row Id="23707" PostHistoryTypeId="25" PostId="11150" RevisionGUID="63a89135-58d1-41cc-af1e-d43748805d87" CreationDate="2011-04-15T12:09:27.647" Comment="http://twitter.com/#!/StackGameDev/status/58864511096078336" />
  <row Id="23708" PostHistoryTypeId="2" PostId="11152" RevisionGUID="daab24d0-c7b9-4fc4-b68e-b54c1b447b10" CreationDate="2011-04-15T12:13:39.020" UserId="1386" Text="In addition to using the code you have above you need to configure the axis in the input manager and name it correctly.&#xD;&#xA;&#xD;&#xA;The accepted answer here may be of help: http://answers.unity3d.com/questions/6106/implementing-the-scrollwheel" />
  <row Id="23709" PostHistoryTypeId="2" PostId="11153" RevisionGUID="37ae7361-c2e0-4f8f-bd82-62887c2eca85" CreationDate="2011-04-15T13:00:00.360" UserId="458" Text="One question I'd like to answer even if you didn't ask directly: SHOULD game designers involve programmers in their design meetings? (As others have said, whether they actually do or not varies from team to team.)&#xD;&#xA;&#xD;&#xA;I think this is an emphatic YES. A programmer's job is, essentially, to turn the designer's ideas into working code. For that to happen, the programmer needs to have buy-in to the design, whether this comes from feeling like they have creative input, or merely that they are &quot;in the loop&quot; in terms of the current state and direction of the game.&#xD;&#xA;&#xD;&#xA;Especially in teams where the designers are not strong coders, it is also vital that programmers have &quot;veto power&quot; over any designs that would be more difficult or time-consuming to code than they are worth... especially if they can suggest trivial-to-implement alternatives. Programmers also tend to be good at finding holes in the design, because they are thinking in terms of &quot;how do I code this&quot; so a missing detail will stick out to a programmer easier than it will to a designer." />
  <row Id="23710" PostHistoryTypeId="2" PostId="11154" RevisionGUID="b593b33a-0e63-44af-958a-10588d8f3b43" CreationDate="2011-04-15T13:08:33.423" UserId="458" Text="&quot;Game design&quot; is an incredibly broad field that likes to include level design, systems design, and story writing (among many others) under its umbrella.&#xD;&#xA;&#xD;&#xA;When I think of game designers, though, I think of systems designers: the people who write the specs that get implemented by programmers. And yes, spec-writing is a skill that is used in the greater software industry (these people are sometimes called &quot;systems analysts&quot; or &quot;program managers&quot; or lots of other names) - just look at all of the &quot;design&quot; articles on joelonsoftware! This goes triple for designers who specialize in UI, since the principles of designing a good UI are still largely the same whether you're making a game or a business application. So, yeah, the skills transfer quite nicely.&#xD;&#xA;&#xD;&#xA;One caveat: not everyone in the software industry knows what it's like to work in game development. There is still the stigma of &quot;oh, you used to get paid to just sit around and play games all day? We actually do Real Work here&quot; that has to be overcome in some companies, so you may have to convince people that a game developers is actually one of the hardest workers and most skilled labor they are likely to find. This might mean, for example, carefully crafting your resume and cover letter to focus on job responsibilities that sync well with a given posting, and downplaying the &quot;games&quot; aspect." />
  <row Id="23711" PostHistoryTypeId="2" PostId="11155" RevisionGUID="7360946d-30da-4414-8186-dd5e3a8a3e9b" CreationDate="2011-04-15T13:16:57.367" UserDisplayName="fterh" Text="I am doing a project and I have a few questions about game development/maintenance costs.&#xD;&#xA;&#xD;&#xA;For a MMORPG like Second Life, how much does it cost to develop and maintain? Maintain as in servers' operational costs, hiring of engineers and developers to patch the game regularly, etc.?" />
  <row Id="23712" PostHistoryTypeId="1" PostId="11155" RevisionGUID="7360946d-30da-4414-8186-dd5e3a8a3e9b" CreationDate="2011-04-15T13:16:57.367" UserDisplayName="fterh" Text="Cost of game development and maintenance" />
  <row Id="23713" PostHistoryTypeId="3" PostId="11155" RevisionGUID="7360946d-30da-4414-8186-dd5e3a8a3e9b" CreationDate="2011-04-15T13:16:57.367" UserDisplayName="fterh" Text="&lt;mmo&gt;" />
  <row Id="23714" PostHistoryTypeId="17" PostId="11155" RevisionGUID="64d5274d-fa84-459a-a90b-380fa6217c8e" CreationDate="2011-04-15T13:33:24.713" UserId="-1" Comment="from http://stackoverflow.com/questions/5677363/cost-of-game-development-and-maintenance" Text="" />
  <row Id="23715" PostHistoryTypeId="5" PostId="11149" RevisionGUID="6716c9a7-8d39-4b04-81ff-20fe727e1a78" CreationDate="2011-04-15T14:07:59.873" UserId="3588" Comment="We don't have a tag for mice input, yet, so I've added it. Also cleared the salutation, fixed some basic grammar, and repaired the code formatting for the codeblock. ♪" Text="I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see.&#xD;&#xA;&#xD;&#xA;I googled on how to do this and found that I have to use `Input.GetAxis(&quot;Mouse ScrollWheel&quot;)`; I use this piece of code and print it. Still, I always get an value of 0.&#xD;&#xA;any ideas? I just need to solve how to get the value first, I'll figure out the rest myself.&#xD;&#xA;&#xD;&#xA;Code idea:&#xD;&#xA;&#xD;&#xA;    function Update () {&#xD;&#xA;        print(WeaponNumber);&#xD;&#xA;        &#xD;&#xA;        if(Input.GetAxis(&quot;Mouse ScrollWheel&quot;)){&#xD;&#xA;        WeaponNumber += Input.GetAxis(&quot;Mouse ScrollWheel&quot;);&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="23716" PostHistoryTypeId="6" PostId="11149" RevisionGUID="6716c9a7-8d39-4b04-81ff-20fe727e1a78" CreationDate="2011-04-15T14:07:59.873" UserId="3588" Comment="We don't have a tag for mice input, yet, so I've added it. Also cleared the salutation, fixed some basic grammar, and repaired the code formatting for the codeblock. ♪" Text="&lt;unity&gt;&lt;javascript&gt;&lt;input&gt;&lt;mouse&gt;" />
  <row Id="23717" PostHistoryTypeId="24" PostId="11149" RevisionGUID="6716c9a7-8d39-4b04-81ff-20fe727e1a78" CreationDate="2011-04-15T14:07:59.873" Comment="Proposed by 3588 approved by 51 edit id of 305" />
  <row Id="23718" PostHistoryTypeId="4" PostId="11155" RevisionGUID="fd33d509-814a-493b-bbd5-1c03511b5ea8" CreationDate="2011-04-15T14:08:25.770" UserId="3588" Comment="Added more tags and specified the title more. ♪" Text="Cost of game development and maintenance of an MMORPG" />
  <row Id="23719" PostHistoryTypeId="6" PostId="11155" RevisionGUID="fd33d509-814a-493b-bbd5-1c03511b5ea8" CreationDate="2011-04-15T14:08:25.770" UserId="3588" Comment="Added more tags and specified the title more. ♪" Text="&lt;mmo&gt;&lt;rpg&gt;&lt;business&gt;&lt;costs&gt;" />
  <row Id="23720" PostHistoryTypeId="24" PostId="11155" RevisionGUID="fd33d509-814a-493b-bbd5-1c03511b5ea8" CreationDate="2011-04-15T14:08:25.770" Comment="Proposed by 3588 approved by 51 edit id of 307" />
  <row Id="23721" PostHistoryTypeId="5" PostId="4804" RevisionGUID="c34a1335-f522-45df-a930-9d4945edae2b" CreationDate="2011-04-15T14:08:27.253" UserId="3588" Comment="Removed salutation, and added a second instance of the mouse tag. This will guarantee its continued survival. ♪" Text="I'm trying to write a game where player picks where they are going by just mouse-clicking on that position and it goes there (just like RuneScape's point-and-click mouse interface).&#xD;&#xA;&#xD;&#xA;I'm trying to get it working on the `jme3test.bullet.TestWalkingChar` example.&#xD;&#xA;&#xD;&#xA;I've tried:&#xD;&#xA;&#xD;&#xA;    character.setLocalTranslation(&#xD;&#xA;        cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f));&#xD;&#xA;&#xD;&#xA;Also tried:&#xD;&#xA;&#xD;&#xA;    Vector3f worldCoordinates = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f);&#xD;&#xA;    Vector3f localCoordinates = null;&#xD;&#xA;    		&#xD;&#xA;    character.worldToLocal(worldCoordinates, localCoordinates);&#xD;&#xA;    character.setLocalTranslation(localCoordinates);&#xD;&#xA;&#xD;&#xA;and:&#xD;&#xA;&#xD;&#xA;    Vector3f worldCoordinates = cam.getWorldCoordinates(inputManager.getCursorPosition(), 0.0f);&#xD;&#xA;    Vector3f localCoordinates = null;&#xD;&#xA; &#xD;&#xA;    character.setLocalTranslation(character.worldToLocal(worldCoordinates, localCoordinates));&#xD;&#xA;&#xD;&#xA;But it's just teleporting the player to some unrelated coordinates.&#xD;&#xA;&#xD;&#xA;Any ideas?&#xD;&#xA;&#xD;&#xA;BTW: If there's a complete example on how to do that, it'd be great. I don't care about game engine - I prefer jME3 but it doesn't really matter for me." />
  <row Id="23722" PostHistoryTypeId="6" PostId="4804" RevisionGUID="c34a1335-f522-45df-a930-9d4945edae2b" CreationDate="2011-04-15T14:08:27.253" UserId="3588" Comment="Removed salutation, and added a second instance of the mouse tag. This will guarantee its continued survival. ♪" Text="&lt;java&gt;&lt;mmo&gt;&lt;movement&gt;&lt;mouse&gt;" />
  <row Id="23723" PostHistoryTypeId="24" PostId="4804" RevisionGUID="c34a1335-f522-45df-a930-9d4945edae2b" CreationDate="2011-04-15T14:08:27.253" Comment="Proposed by 3588 approved by 51 edit id of 306" />
  <row Id="23724" PostHistoryTypeId="5" PostId="10359" RevisionGUID="9149a3a9-7d53-450e-83b7-10d8981c6af2" CreationDate="2011-04-15T14:28:45.800" UserId="3588" Comment="Now that the tag exists (since I acquired the ability to create tags ♪), I can finally add that tag into the tag wiki." Text="Questions under the purview of this tag include proper detection of input, handling special maneuvers (like button combinations or holding down for specific lengths), and timing.&#xD;&#xA;&#xD;&#xA;The following input types also have their own tags that can often accompany this tag, or outright replace it if your question is more about the device than the input method:&#xD;&#xA;&#xD;&#xA; - [tag:motion-control]&#xD;&#xA; - [tag:keyboard]&#xD;&#xA; - [tag:controllers]&#xD;&#xA; - [tag:joystick]&#xD;&#xA; - [tag:mouse]" />
  <row Id="23725" PostHistoryTypeId="24" PostId="10359" RevisionGUID="9149a3a9-7d53-450e-83b7-10d8981c6af2" CreationDate="2011-04-15T14:28:45.800" Comment="Proposed by 3588 approved by 51 edit id of 308" />
  <row Id="23726" PostHistoryTypeId="2" PostId="11156" RevisionGUID="9af7374f-5883-40d4-b7ca-fab9660ed1a4" CreationDate="2011-04-15T14:41:24.633" UserId="-1" Text="" />
  <row Id="23727" PostHistoryTypeId="2" PostId="11157" RevisionGUID="25f0363c-7ac9-4c82-ab0c-794007b01d93" CreationDate="2011-04-15T14:41:24.633" UserId="-1" Text="" />
  <row Id="23728" PostHistoryTypeId="2" PostId="11158" RevisionGUID="62d2751e-e4e9-4622-9bd5-979afe2f7fc3" CreationDate="2011-04-15T15:02:07.057" UserId="6732" Text="really, you don't really know what is fun until you have shared the idea with two or more ardent game players" />
  <row Id="23729" PostHistoryTypeId="25" PostId="11149" RevisionGUID="20f71849-8df3-4e5c-b9a4-899bb0c979a1" CreationDate="2011-04-15T15:09:27.453" Comment="http://twitter.com/#!/StackGameDev/status/58909809348583424" />
  <row Id="23730" PostHistoryTypeId="5" PostId="5992" RevisionGUID="e624e1e5-3241-4d3a-b9f5-809dc4b0542b" CreationDate="2011-04-15T15:41:14.013" UserId="3588" Comment="Swapping the unique &quot;English&quot; tag for the more common &quot;terminology&quot; tag, and just some minor toning. ♪" Text="This is an English-language question.&#xD;&#xA;&#xD;&#xA;I'm trying to remember the English name for a memory model of a map built exclusively for handling collision detection. I think this is especially frequent in tile-based platform games.&#xD;&#xA;&#xD;&#xA;I believe the Spanish term for it is &quot;Mapa de durezas&quot;.&#xD;&#xA;&#xD;&#xA;If you have a *Super Mario* tilemap like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        C     +        'P' = Pipe&#xD;&#xA;             +++       '+' = Brick&#xD;&#xA;            +++++      '@' = Ground&#xD;&#xA;       P   +++++++     'C' = Cloud&#xD;&#xA;     @@@@@@@@@@@@@@@@  ' ' = Air&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then the `&lt;ENGLISH EXPRESSION THAT I'M LOOKING FOR&gt;` of that map would be:&#xD;&#xA;&#xD;&#xA;              *       '*' = Solid&#xD;&#xA;             ***      ' ' = Traversable&#xD;&#xA;            *****     &#xD;&#xA;       *   *******&#xD;&#xA;     ****************&#xD;&#xA;&#xD;&#xA;Any clues?" />
  <row Id="23731" PostHistoryTypeId="6" PostId="5992" RevisionGUID="e624e1e5-3241-4d3a-b9f5-809dc4b0542b" CreationDate="2011-04-15T15:41:14.013" UserId="3588" Comment="Swapping the unique &quot;English&quot; tag for the more common &quot;terminology&quot; tag, and just some minor toning. ♪" Text="&lt;collision-detection&gt;&lt;maps&gt;&lt;terminology&gt;" />
  <row Id="23732" PostHistoryTypeId="24" PostId="5992" RevisionGUID="e624e1e5-3241-4d3a-b9f5-809dc4b0542b" CreationDate="2011-04-15T15:41:14.013" Comment="Proposed by 3588 approved by 51 edit id of 312" />
  <row Id="23733" PostHistoryTypeId="5" PostId="11157" RevisionGUID="61dcc338-e844-4a63-831e-4217177ad056" CreationDate="2011-04-15T15:41:18.023" UserId="3588" Comment="added 117 characters in body" Text="A very common input device in computer games. It offers a more direct form of movement compared to directional input." />
  <row Id="23734" PostHistoryTypeId="24" PostId="11157" RevisionGUID="61dcc338-e844-4a63-831e-4217177ad056" CreationDate="2011-04-15T15:41:18.023" Comment="Proposed by 3588 approved by 51 edit id of 310" />
  <row Id="23735" PostHistoryTypeId="5" PostId="11156" RevisionGUID="c5d29e06-7317-4de2-bd34-8e3d3e626c95" CreationDate="2011-04-15T15:41:19.957" UserId="3588" Comment="added 894 characters in body" Text="A mouse adds the freedom of a direct point-and-click interface. It typically has two clicking buttons, and most modern mice have a scroll wheel. It is a kind of [tag:input].&#xD;&#xA;&#xD;&#xA;A mouse offers a very strong difference compared to button-based input, as it can map movement towards a *position*, rather than towards a *direction*. As its usage in conjunction with a keyboard is commonplace, and as the mouse pointer can also be tracked separately from the player's character, it can also be used as an entirely separate system from movement, such as aiming.&#xD;&#xA;&#xD;&#xA;If your question deals with mouse-based inputs, instead of general movement inputs, this tag is appropriate to use. Using the touchpad or other equivalent on a laptop which mimics the behavior of a connected mouse will also qualify. Questions about scroll wheels, which are found on most modern mice, fall under this category as well. " />
  <row Id="23736" PostHistoryTypeId="24" PostId="11156" RevisionGUID="c5d29e06-7317-4de2-bd34-8e3d3e626c95" CreationDate="2011-04-15T15:41:19.957" Comment="Proposed by 3588 approved by 51 edit id of 309" />
  <row Id="23737" PostHistoryTypeId="5" PostId="7812" RevisionGUID="c173f331-fc39-47d6-8073-8f8be6d257ef" CreationDate="2011-04-15T15:41:32.750" UserId="3588" Comment="Swapping some of the tags around. Very busy question here! ♪" Text="I would like to make a First Person Shooter and move the camera with the mouse. The problem is that when the cursor reaches the limits of the screen, the camera won't turn anymore. How can I keep the mouse centered and detect its movements anyway?" />
  <row Id="23738" PostHistoryTypeId="4" PostId="7812" RevisionGUID="c173f331-fc39-47d6-8073-8f8be6d257ef" CreationDate="2011-04-15T15:41:32.750" UserId="3588" Comment="Swapping some of the tags around. Very busy question here! ♪" Text="Mouse aim in an FPS" />
  <row Id="23739" PostHistoryTypeId="6" PostId="7812" RevisionGUID="c173f331-fc39-47d6-8073-8f8be6d257ef" CreationDate="2011-04-15T15:41:32.750" UserId="3588" Comment="Swapping some of the tags around. Very busy question here! ♪" Text="&lt;xna&gt;&lt;camera&gt;&lt;first-person-shooter&gt;&lt;aiming&gt;&lt;mouse&gt;" />
  <row Id="23740" PostHistoryTypeId="24" PostId="7812" RevisionGUID="c173f331-fc39-47d6-8073-8f8be6d257ef" CreationDate="2011-04-15T15:41:32.750" Comment="Proposed by 3588 approved by 51 edit id of 311" />
  <row Id="23741" PostHistoryTypeId="5" PostId="1050" RevisionGUID="cbdc18ad-2a0c-43c9-8a4a-44c693437768" CreationDate="2011-04-15T15:43:44.290" UserId="51" Comment="deleted 55 characters in body" Text="I'm a new hobbyist game developer but have yet to come up with something original that I found to be really fun. The hardest part I find about game development is this:&#xD;&#xA;&#xD;&#xA;- You have an idea that in your head looks like it would be really fun.&#xD;&#xA;- You build a quick prototype and you realise that in reality its not so much fun for the user.&#xD;&#xA;- You realise that your brain was tricking you by giving you the impression that you had a complete idea but in reality it was skimming over lots of missing details that prevent you from reaching the fun that you envisaged.&#xD;&#xA;- You come up with lots ideas to fill in the missing gaps and hopefully make it fun.&#xD;&#xA;- You try these ideas one by one but it seems none of them really get you to where you wanted.&#xD;&#xA;&#xD;&#xA;When do you know to stop trying these ideas and admit the overall game concept sucks? Do you just keep on iterating on them and hope you find the magic formula?&#xD;&#xA;&#xD;&#xA;Do people have any rules they follow in this process?" />
  <row Id="23742" PostHistoryTypeId="2" PostId="11159" RevisionGUID="0c9b9a14-f294-4f66-b8e4-146ee55aaa76" CreationDate="2011-04-15T15:53:00.357" UserId="2954" Text="Have anyone experience with using SQLight and XNA? &#xD;&#xA;&#xD;&#xA;Or using any other DB and XNA?" />
  <row Id="23743" PostHistoryTypeId="1" PostId="11159" RevisionGUID="0c9b9a14-f294-4f66-b8e4-146ee55aaa76" CreationDate="2011-04-15T15:53:00.357" UserId="2954" Text="XNA with SQLight" />
  <row Id="23744" PostHistoryTypeId="3" PostId="11159" RevisionGUID="0c9b9a14-f294-4f66-b8e4-146ee55aaa76" CreationDate="2011-04-15T15:53:00.357" UserId="2954" Text="&lt;xna&gt;&lt;databases&gt;" />
  <row Id="23745" PostHistoryTypeId="2" PostId="11160" RevisionGUID="7931c3dd-03c4-4330-95db-09ef5696d776" CreationDate="2011-04-15T16:01:49.293" UserId="3830" Text="This is one of those questions where one has to response with another question:  That depends on what you want to do.  An MMO can be a mega-multi-million dollar production effort that requires vast server farms to run, or it can be a lean clean web based game that runs on a single Amazon S3 instance or uses Google Application Engine.&#xD;&#xA;&#xD;&#xA;Whatever your approach, you have to have a solid business plan.  It's going to cost X per month to run your servers, and so you had better be bring in X + P (P = profit) every month from subscriptions unless you like losing money.  And don't forget that P is going into paying back your development costs.  $50 million to build an MMO that grosses $100 a month isn't going to work.&#xD;&#xA;&#xD;&#xA;Do read this article...&#xD;&#xA;&#xD;&#xA;http://www.escapistmagazine.com/articles/view/issues/issue_75/431-Boutique-MMOGs&#xD;&#xA;&#xD;&#xA;It doesn't go into cost details, but it goes into mindset." />
  <row Id="23746" PostHistoryTypeId="2" PostId="11161" RevisionGUID="48dda1f8-0cb8-407c-b887-5e4685be6f65" CreationDate="2011-04-15T17:01:50.907" UserId="2301" Text="SQLight does work with XNA, just don't expect any store procedures or functions.  Any flat file will work to store data (XML, JSON etc). I prefer XML, though if I was using lots of data I would switch to SQLite" />
  <row Id="23747" PostHistoryTypeId="2" PostId="11162" RevisionGUID="d8f9c9e4-8cbb-4e66-b1f9-718e6f75548c" CreationDate="2011-04-15T17:03:37.053" UserId="-1" Text="" />
  <row Id="23748" PostHistoryTypeId="2" PostId="11163" RevisionGUID="9c8370d4-24cf-442c-b43f-69c8cf8c7174" CreationDate="2011-04-15T17:03:37.053" UserId="-1" Text="" />
  <row Id="23749" PostHistoryTypeId="5" PostId="11139" RevisionGUID="87785459-16d9-4dc5-949e-a9df4cf7e9a3" CreationDate="2011-04-15T17:19:49.793" UserId="6690" Comment="Clarified usage of Game Engine vs Engine alone" Text="The industry doesn't have these terms nailed down well yet, but I'd say your concept is pretty far from colloquial use.&#xD;&#xA;&#xD;&#xA;&quot;Game Engine&quot; usually refers to a piece of software that is meant to be extended by a game developer with their own specific logic to make a unique game. The Game Engine would provide all or nearly all of the generic services a game might need; e.g. audio playback, asset management, a renderer, physics simulation, AI framework, special effects systems, etc. &#xD;&#xA;&#xD;&#xA;Usually a good Game Engine will also have a heavy tool component, where the Game Engine will ship with one or more tools to facilitate creating assets for use with the Game Engine; e.g. a 3D model and texture converter, a level editor, a sound back editor, etc.&#xD;&#xA;&#xD;&#xA;The general idea is that a game dev should only have to bring their own unique work to the project (their logic, their art, their flair for lack of a better term), avoiding reinventing the wheel by leaving the common stuff to the Game Engine.&#xD;&#xA;&#xD;&#xA;The murky part usually is how much needs to come with a Game Engine to consider it complete. That's a shifting target, both by who's looking at the question and what's currently fashionable. It's not at all uncommon that a project will use only a portion of the Game Engine they're purportedly using, patching in other components they find desirable/necessary. These other components (usually referred to as libraries) are also often bought in rather than written in house.&#xD;&#xA;&#xD;&#xA;To throw in one more related common term: both the individual systems (Libraries) and comprehensive collections of integrated systems and tools (Game Engines) are collectively referred to as Middleware.&#xD;&#xA;&#xD;&#xA;Note: here we're talking about Game Engine, as in a specific case of engine. The term engine alone is commonly (at least in my experience) used synonymously with library, module, system and even manager, and in that context would refer to a logical unit of code that provides a service, as per the components of a Game Engine above. I guess you could say all these nouns serve to form the sentence &quot;the X that does Y&quot; for the form YX; e.g. &quot;the engine that does games&quot;, &quot;the library that does pathfinding&quot;, &quot;the module that does dialogue trees&quot;. " />
  <row Id="23750" PostHistoryTypeId="2" PostId="11164" RevisionGUID="7e01cf45-91af-470d-9fae-23e1f76a66e0" CreationDate="2011-04-15T17:24:33.520" UserId="-1" Text="" />
  <row Id="23751" PostHistoryTypeId="2" PostId="11165" RevisionGUID="8fadd617-11b3-4e21-9f2f-79affaec643f" CreationDate="2011-04-15T17:24:33.520" UserId="-1" Text="" />
  <row Id="23752" PostHistoryTypeId="2" PostId="11166" RevisionGUID="4bb78b7b-817c-40d0-b7da-6488b2332a8e" CreationDate="2011-04-15T17:35:43.733" UserId="1198" Text="You should have no issues Accessing SQLite from a Windows XNA Game. On Windows, XNA Project is just like any other project and you can do anything that C# can do. On Xbox or WP7 this isn't completely the case; however, there is also a C# version of SQLite written to run on fully managed environment (Xbox, WP7): see the ZMan's post here: http://forums.create.msdn.com/forums/p/47127/282261.aspx" />
  <row Id="23753" PostHistoryTypeId="2" PostId="11167" RevisionGUID="38687f67-23c1-48e5-aa9a-0addfb83c58c" CreationDate="2011-04-15T17:38:41.067" UserId="5259" Text="## Easy answer ##&#xD;&#xA;The cost of running an MMO? In United States Dollars?&#xD;&#xA;&#xD;&#xA;*ITS OVER 9000 (dollars)!!!!!*&#xD;&#xA;&#xD;&#xA;## Useful Answer##&#xD;&#xA;### Scope of question ####&#xD;&#xA;So, dividing your question up into chunks, you seem to want to know about the costs of:&#xD;&#xA;&#xD;&#xA; - Development (making the game)&#xD;&#xA; - Marketing (making people aware of the game)&#xD;&#xA; - Infrastructure (base cost of server hardware and supporting infrastructure)&#xD;&#xA; - Infrastructure maintenance (recurring costs in electricity, parts replacement, rent, etc.)&#xD;&#xA; - Operating expense (cost of patches/updates/moderation)&#xD;&#xA;&#xD;&#xA;For the sake of simplicity, I'm going to play a little bit fast and loose with the numbers here--these will be mostly back-of-the-envelope informal estimates, informed by common sense, my engineering background, and my location.&#xD;&#xA;&#xD;&#xA;I'm going to err on the side of being a small developer, and I'm going to bend rules to get you your MMO. You should thus consider this to be a *very conservative* economic assessment (you will probably end up spending more) and a *very liberal* social assessment (you might end up in prison with some of my shortcuts).&#xD;&#xA;&#xD;&#xA;I'm going to avoid assuming supermen developers and exotic product designs, and instead assume a conventional MMO such as Asheron's Call or WoW and merely highly-motivated developers (which is still a generous assumption).&#xD;&#xA;&#xD;&#xA;### Project scope estimate and assumptions ###&#xD;&#xA;&#xD;&#xA;So, let's throw out some numbers to get started. These may or may not be reasonable, but they give us a place to begin.&#xD;&#xA;&#xD;&#xA; - Development time: 2 years. (this is about how long Minecraft has been in development, and about the total amount of time it took to create Project Volucris, an MMO based on Xenimus)&#xD;&#xA; - Development rate: Full-time work. (you aren't working full-time, you aren't working)&#xD;&#xA; - Running time: 4 years. (people still play Asheron's Call and Ultima, so not unreasonable)&#xD;&#xA;&#xD;&#xA;### Cost the first: Development ###&#xD;&#xA;&#xD;&#xA;So, let's consider the costs of development. I'm going to keep a running total for you.&#xD;&#xA;&#xD;&#xA;#### People ####&#xD;&#xA;&#xD;&#xA;So, we know that zero people will get no work done. Minecraft was done by 1 guy, WoW by hundreds. We expect to fall somewhere in that range. We support specialization, so we expect to have people dedicated to one field (some overlap, perhaps). We need at least one coder and one artist. This, however, will be an MMO, and so we need someone to babysit the servers; add a sysadmin.&#xD;&#xA;&#xD;&#xA;Except, this doesn't cut it. You want some amount of redundancy in case somebody gets sick, so double all of those. Especially for programmers, you really need somebody to call you out on design decisions and motivate you. So, 6 people. More artists are better (content creation really does scale linearly!). So, 8 people. A third programmer wouldn't be a bad idea either, especially if you need to farm out grunt work while doing design. So, 9. And a tools programmer is going to be really important--but let's pretend that could be your second sysadmin.&#xD;&#xA;&#xD;&#xA;So, 9 people. Let's assume they are motivated/deluded into doing this for two years, and so are willing to work at minimum wage for the duration of the project. Living wage where I live is roughly $18k a year; these guys are also all-star developers, so let's given them a $7k bonus on top of that.&#xD;&#xA;&#xD;&#xA;(Incidentally, this is paying them peanuts compared to industry work)&#xD;&#xA;&#xD;&#xA;(also incidentally, this is assuming we are treating them as contractors, and so have avoid the full cost of things like health insurance, HR overhead, etc.)&#xD;&#xA;&#xD;&#xA;9 people x $25k per person per year x 2 years development = $450k&#xD;&#xA;&#xD;&#xA;**People Cost: $450 000. 00**&#xD;&#xA;&#xD;&#xA;***Grand total: $450 000. 00***&#xD;&#xA;&#xD;&#xA;#### Software ####&#xD;&#xA;### Operating systems ###&#xD;&#xA;Let's save our money and use Linux for everything, and assume that we can test on our home machines, or that the users can magically provide beta-testing for us. Or, even better, that we pirate copies of Windows or OSX, or scavenge license keys off discarded equipment.&#xD;&#xA;&#xD;&#xA;*OS Cost: $0 *&#xD;&#xA;&#xD;&#xA;### Art tools ###&#xD;&#xA;Let's use the GIMP or Paint.NET for our 2D art, and Blender/Wings/Sculptris for our 3D art. Or, we can get Adobe CS5 and 3DStudio Max 2011 with the PirateBay discount. The end user doesn't know/can't tell, and we can probably mask the origin of the assets from inquiry.&#xD;&#xA;&#xD;&#xA;*Art tools Cost: $0 *&#xD;&#xA;&#xD;&#xA;### Code tools ###&#xD;&#xA;We can legitimately use GCC/Visual Studio Express/Eclipse for free. If we really need to have the fancy ultimate/pro/whatever editions, back to the Bay--just remember to strip your executables afterwards.&#xD;&#xA;&#xD;&#xA;*Code tools Cost: $0 *&#xD;&#xA;&#xD;&#xA;**Software Cost: $0. 00**&#xD;&#xA;&#xD;&#xA;***Grand total: $450 000. 00***&#xD;&#xA;&#xD;&#xA;#### Hardware ####&#xD;&#xA;&#xD;&#xA;### Development Hardware ###&#xD;&#xA;&#xD;&#xA;Let's not assume that you need insane next-gen tech, and let's not assume that you ask everyone to just bring their home machines to work. So, a couple of minutes on [TigerDirect][1] show several systems for under $500. I'll assume you spend a full grand anyways, which could be for storage, RAM, video card, or whatever helps that particular developer. &#xD;&#xA;&#xD;&#xA;$1k per box per developer x 9 box-developers = $9k&#xD;&#xA;&#xD;&#xA;* Developer Hardware Cost: $9 000. 00 *&#xD;&#xA;&#xD;&#xA;### Server Hardware ###&#xD;&#xA;&#xD;&#xA;IBM has some great hardware for many tens of thousands (hundreds of thousands!) of dollars. Let's Google this, and use cheap normal components. Let's again use the $500/box metric from above.&#xD;&#xA;&#xD;&#xA;Second Life has [over 2000 servers][2]. We'll use that, since you asked for Second Life as an example.&#xD;&#xA;&#xD;&#xA;2000 servers x $500 per server = $1 000 000. 00&#xD;&#xA;&#xD;&#xA;* Server Hardware Cost: $1 000 000. 00 *&#xD;&#xA;&#xD;&#xA;**Hardware Cost: $1 009 000. 00**&#xD;&#xA;&#xD;&#xA;***Grand total: $1 459 000. 00***&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This is before you have marketing (zero to millions, depending), maintenance, or anything else. This is just development and the server hardware costs. If you want me to continue this analysis, please mention it in the comments.&#xD;&#xA;&#xD;&#xA;MMOs are **expensive** to make.&#xD;&#xA;  [1]: http://www.tigerdirect.com&#xD;&#xA;  [2]: http://news.cnet.com/Second-Life-Dont-worry,-we-can-scale/2100-1043_3-6080186.html?tag=nefd.lede" />
  <row Id="23754" PostHistoryTypeId="2" PostId="11168" RevisionGUID="8f1ce650-7564-4d87-ae3f-c995ad6b241b" CreationDate="2011-04-15T17:43:48.830" UserId="982" Text="I was wondering, what kind of database does Minecraft use? Is it a relational database, maybe something common like MySQL? Do we even know what he's using? &#xD;&#xA;&#xD;&#xA;And maybe even a better question, SHOULD he be doing it that way? What type of database should be used?" />
  <row Id="23755" PostHistoryTypeId="1" PostId="11168" RevisionGUID="8f1ce650-7564-4d87-ae3f-c995ad6b241b" CreationDate="2011-04-15T17:43:48.830" UserId="982" Text="&quot;What' is Minecraft's database?" />
  <row Id="23756" PostHistoryTypeId="3" PostId="11168" RevisionGUID="8f1ce650-7564-4d87-ae3f-c995ad6b241b" CreationDate="2011-04-15T17:43:48.830" UserId="982" Text="&lt;databases&gt;&lt;minecraft&gt;" />
  <row Id="23757" PostHistoryTypeId="2" PostId="11169" RevisionGUID="8a56a98a-5302-4de9-924b-1b3fcaf18c81" CreationDate="2011-04-15T17:45:38.390" UserId="1101" Text="The biggest cost of any software project is the wages for the workers.&#xD;&#xA;&#xD;&#xA;Imagine a team of 30 developers: maybe 8 coders, 8 artists, 8 designers, and 6 support staff. If they earn [an average of $75,000 each][1], that's $2.25M per year. Imagine you develop for 3 years before release, then that's nearly $7M you have to find up-front.&#xD;&#xA;&#xD;&#xA;Do you need 30 developers and 3 years of development? Maybe, maybe not, and maybe that's not enough. It depends on what you need to make. The best thing you can do is find a company that has made a game similar in scope to the one you want to make, and find out the size of their development team and the length of time they spent developing it - these figures are usually public. Then multiply those by the average wage and you get a ballpark figure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.next-gen.biz/news/average-us-game-developer-salary-down-4" />
  <row Id="23758" PostHistoryTypeId="2" PostId="11170" RevisionGUID="a47fcbda-ebd9-454b-9293-e00264ff8ac0" CreationDate="2011-04-15T17:52:23.780" UserId="-1" Text="" />
  <row Id="23759" PostHistoryTypeId="2" PostId="11171" RevisionGUID="7d734ba6-f390-4add-bd71-8a707ba1f4da" CreationDate="2011-04-15T17:52:23.780" UserId="-1" Text="" />
  <row Id="23760" PostHistoryTypeId="2" PostId="11172" RevisionGUID="4ce42f8b-2256-4ae5-bc66-ab989fa1183f" CreationDate="2011-04-15T17:55:17.173" UserId="6622" Text="I thought about random pathfinding for my TD game. A* would not work for my puposes, because I exactly need **random** pathfinding.&#xD;&#xA;&#xD;&#xA;Imagine a map with ways, a starting point and a destination. I have multiple ways, which all lead from the starting point or a way to the destination or another way. It could look like this: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://accord-games.de/Downloads/map2.png&quot; &gt;&#xD;&#xA;&#xD;&#xA;*Color description:&#xD;&#xA;red - starting point; black - destination; grey - way; white - free space  &#xD;&#xA;(The numbers are used in the text as a reference to some tiles)*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I first thought about just calculating randomly the next waypoint, when an entity passes a tile. But that would not work. When an entity passes tile 1 it either can go up or down. When it comes to 2 it can either go down/up (relative to it´s position) or right.  &#xD;&#xA;**If** it goes **down/up** it would go to tile 1, which means that it took a way back. Bad...&#xD;&#xA;&#xD;&#xA;I would really like to make it **dynamic**, but can´t figure out, what I can do now. Anyone with ideas or experience?" />
  <row Id="23761" PostHistoryTypeId="1" PostId="11172" RevisionGUID="4ce42f8b-2256-4ae5-bc66-ab989fa1183f" CreationDate="2011-04-15T17:55:17.173" UserId="6622" Text="Tower Defense: Pathfinding (random multiple Paths)" />
  <row Id="23762" PostHistoryTypeId="3" PostId="11172" RevisionGUID="4ce42f8b-2256-4ae5-bc66-ab989fa1183f" CreationDate="2011-04-15T17:55:17.173" UserId="6622" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;random&gt;" />
  <row Id="23763" PostHistoryTypeId="2" PostId="11173" RevisionGUID="0709fdfa-8bf2-48d2-86f9-8b2006b9f4a5" CreationDate="2011-04-15T18:06:34.623" UserId="6690" Text="Sure this is possible, for a given value of possible. It's somewhat unclear to me exactly what you're looking to do, but the basic principle of a vertex shader is to take a stream of inputs, execute a homogenous function for every vert, and produce a set of outputs.&#xD;&#xA;&#xD;&#xA;In your case of a surface of revolution, I assume you mean you want to end up with a mesh like a lathed surface, given an input profile curve? If so, what you're intending to do is more commonly done on the CPU, written into a vertex buffer as a finished surface, and then displayed like any other mesh. Usually the vertex shader would only be used to apply a linear transformation + projection matrix to get a perspective render of the surface.&#xD;&#xA;&#xD;&#xA;It's not entirely uncommon though to move some calculations to the vertex shader where you know that they will be heavy for the CPU to perform, and you intend to do them often, or you could save resources in some way by parametrizing the same input data over and over again. E.g. you wanted to draw 1000 similar lathed objects where only the radius varies.&#xD;&#xA;&#xD;&#xA;If that's the case, then your first problem is that you cannot generate vertices in a vertex shader. There are two inputs into a vertex shader: varying/stream and uniform/constants. Varying inputs vary for each vertex, while uniform ones only change between draw calls. &#xD;&#xA;&#xD;&#xA;All vertices you will draw will need to be present in the input stream. What this means is that you'll need to identify a common input stream pattern to all your possible instances. Let's say, for instance, that you'll be making lathed surfaces where:&#xD;&#xA;&#xD;&#xA;* There are N segments around the axis of rotation (let's call it Y)&#xD;&#xA;* You have a function that given a T value between 0 and 1 can give you the distance from the axis, and the distance along the axis for a vertex; i.e. the x and y of the profile curve.&#xD;&#xA;&#xD;&#xA;So, you'll need to setup an input vertex buffer that provides for each vertex:&#xD;&#xA;&#xD;&#xA;* An A value, which determines segment it is on, so that you can calculate how far around the axis it should be. Let's say we store this in radians.&#xD;&#xA;* The T value, so that you can calculate where on the profile curve it should be. We'll store this as a value between 0 and 1.&#xD;&#xA;&#xD;&#xA;So for an instance that had 3 segments, and 3 steps along the curve, your stream would look like: 0, 0, 0.5, 0, 1, 0, 0, 2/3pi, 0.5, 2/3pi, 1, 2/3pi, 0, 4/3pi, 0.5, 4/3pi, 1, 4/3pi. _Note: with that vertex stream you'll need an index buffer to describe how to stitch those points into triangles._&#xD;&#xA;&#xD;&#xA;You would then make a custom vertex declaration that described the two floats you need.&#xD;&#xA;&#xD;&#xA;You would then make your vertex shader take these two inputs, and:&#xD;&#xA;&#xD;&#xA;* Calculate the X/Y position using the T input.&#xD;&#xA;* Rotate that point around the Y axis using the A value, creating a 3D point.&#xD;&#xA;* Apply your view/projection transform.&#xD;&#xA;&#xD;&#xA;Now, based on what you're trying to do, you can figure out what uniform inputs you'll need here, i.e. whatever your function that takes T to produce XY needs.&#xD;&#xA;&#xD;&#xA;Once that's all done, you can now make individual draw calls reusing the same stream inputs, but varying the uniform inputs to create different lathed surfaces. You could also vary the vertex shader its self to apply different functions. You could also create multiple streams with varying amounts of tessellation. Swapping between these would allow you to cheaply adjust the level of detail for each instance.&#xD;&#xA;&#xD;&#xA;That's the simplest usage of the GPU at this time. Different architectures offer alternative features that may contribute a different solution to your goal, but without knowing more about your goal or what your environment is, I can't speak to those." />
  <row Id="23764" PostHistoryTypeId="2" PostId="11174" RevisionGUID="729a549c-7fe9-4edb-90f3-e2ef25f950f2" CreationDate="2011-04-15T18:06:43.617" UserId="2187" Text="Instead of having all adjacent squares as possible next waypoints, only include squares that do not lead back to the beginning and randomly pick from those. If you did this, it would be impossible to go backwards because going back is not an option.&#xD;&#xA;&#xD;&#xA;This is a directed graph problem with each waypoint as a vertex, and each path an edge. You just need to limit the number of cycles, perhaps removing them entirely. " />
  <row Id="23765" PostHistoryTypeId="25" PostId="11168" RevisionGUID="c4c4df30-df49-49e8-977a-b528739859f4" CreationDate="2011-04-15T18:09:27.487" Comment="http://twitter.com/#!/StackGameDev/status/58955106854506496" />
  <row Id="23766" PostHistoryTypeId="2" PostId="11175" RevisionGUID="f7bb5a61-9756-4947-a539-801681b40aaa" CreationDate="2011-04-15T18:09:45.677" UserId="-1" Text="" />
  <row Id="23767" PostHistoryTypeId="2" PostId="11176" RevisionGUID="c12ca811-7c01-4e30-8257-77fce43e2344" CreationDate="2011-04-15T18:09:45.677" UserId="-1" Text="" />
  <row Id="23768" PostHistoryTypeId="2" PostId="11177" RevisionGUID="7cf37426-11d5-4489-9f25-36061169fdd5" CreationDate="2011-04-15T18:16:03.377" UserId="-1" Text="" />
  <row Id="23769" PostHistoryTypeId="2" PostId="11178" RevisionGUID="bfbcaa26-4439-4192-a04a-ca51814a5eb2" CreationDate="2011-04-15T18:16:03.377" UserId="-1" Text="" />
  <row Id="23770" PostHistoryTypeId="2" PostId="11179" RevisionGUID="b1cfd413-828f-4f97-bff5-6971944f6038" CreationDate="2011-04-15T18:16:12.683" UserId="6622" Text="Minecraft saves the world data and the player data. Saving the world data is done in multiplayer and singleplayer with the same method. It saves everything in a single `.mcr` file.   &#xD;&#xA;Previous versions of minecraft saved the data in a file structure with many files, which was slower, I think.  &#xD;&#xA;I don´t know this exactly, but I guess that a database for world saving would be not the best, because the data is saved in intervals of 15 minutes or so and a database is not designed for saving all data at the same time.&#xD;&#xA;&#xD;&#xA;The player data on multiplayer servers is saved in a `.dat` file. I don´t think that this player data is saved in a SQLite database or something similar, because using a database for requesting once and saving every 5 minutes or so is also not the best.&#xD;&#xA;&#xD;&#xA;**To sum it up:**  &#xD;&#xA;I think Notch doesn´t even use any database, because it does not make sense since every data is kept in memory and only saved in intervals of minutes." />
  <row Id="23771" PostHistoryTypeId="2" PostId="11180" RevisionGUID="9e56f836-562d-4d3e-a6fc-f4756ad17efa" CreationDate="2011-04-15T18:37:27.543" UserId="6588" Text="I wrote an implementation of A* in ActionScript for Flash games:&#xD;&#xA;http://www.newarteest.com/flash/astar.html&#xD;&#xA;&#xD;&#xA;I mostly referred to this great tutorial (which itself links to a number of other resources) http://www.policyalmanac.org/games/aStarTutorial.htm" />
  <row Id="23772" PostHistoryTypeId="2" PostId="11181" RevisionGUID="5f2a063e-f8a8-4db3-89bb-b9f77b20904f" CreationDate="2011-04-15T18:41:10.300" UserId="2332" Text="During my software agents module, I searched high and low for a decent RL learning. Unfortunately, I didn't find anything that was a) useful for my uses and b) well documented.&#xD;&#xA;&#xD;&#xA;However, something like Q-Learning isn't too difficult to implement. [Artificial Intelligence for Games][1] has a simple implementation of Q-Learning that would probably be of use to you. What's more is the source is packaged on the CD. I would have suggested the website for the book to get the source code but it seems to be down or just gone.&#xD;&#xA;&#xD;&#xA;Also, here is a reinforcement learning simulator (open source and written in Java) which is fairly straightforward to understand the underlying concepts.&#xD;&#xA;http://www.cs.cmu.edu/~awm/rlsim/&#xD;&#xA;&#xD;&#xA;But as said above, the reward function you use is key to getting a decent result.&#xD;&#xA;&#xD;&#xA;Personally, when it comes to tweaking weights, I'd probably use a genetic algorithm, but similarly you'll need the appropriate fitness function for what you're trying to create.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Artificial-Intelligence-Games-Ian-Millington/dp/0123747317/ref=sr_1_1?ie=UTF8&amp;qid=1302888533&amp;sr=8-1" />
  <row Id="23773" PostHistoryTypeId="2" PostId="11182" RevisionGUID="9a957c03-b67a-4632-8026-cff34c6bd244" CreationDate="2011-04-15T19:40:37.903" UserId="6754" Text="I'm working on a simple game to rate a users' preference among several styles.  There are `C` classes, and the game consists of `R` rounds of comparison.  At each round, the user is presented a [pseudorandomly selected] single representative image from each of `S` classes and chooses exactly one to be the &quot;round winner.&quot;  At the end of the `R` rounds, there cannot be a tie among any classes (i.e., one of the classes must have a higher score than all the others).&#xD;&#xA;&#xD;&#xA;For example, say I have 3 classes (traditional, contemporary, alternative), and I want to run a 5 round game, comparing 2 classes per round.&#xD;&#xA;&#xD;&#xA;I'm looking for an algorithm to provide as-even-as-possible sampling from each of the classes, but in such a way that it would be impossible to end the 5th round with a tie." />
  <row Id="23774" PostHistoryTypeId="1" PostId="11182" RevisionGUID="9a957c03-b67a-4632-8026-cff34c6bd244" CreationDate="2011-04-15T19:40:37.903" UserId="6754" Text="Preventing ties" />
  <row Id="23775" PostHistoryTypeId="3" PostId="11182" RevisionGUID="9a957c03-b67a-4632-8026-cff34c6bd244" CreationDate="2011-04-15T19:40:37.903" UserId="6754" Text="&lt;math&gt;&lt;algorithm&gt;" />
  <row Id="23776" PostHistoryTypeId="5" PostId="11159" RevisionGUID="01c853cb-3989-46d0-af91-d5fdc1030324" CreationDate="2011-04-15T19:46:41.003" UserId="6302" Comment="changed library name to correct name; grammar" Text="Does anyone have experience using SQLite with XNA? &#xD;&#xA;&#xD;&#xA;Or using any other DB with XNA?" />
  <row Id="23777" PostHistoryTypeId="4" PostId="11159" RevisionGUID="01c853cb-3989-46d0-af91-d5fdc1030324" CreationDate="2011-04-15T19:46:41.003" UserId="6302" Comment="changed library name to correct name; grammar" Text="XNA with SQLite" />
  <row Id="23778" PostHistoryTypeId="24" PostId="11159" RevisionGUID="01c853cb-3989-46d0-af91-d5fdc1030324" CreationDate="2011-04-15T19:46:41.003" Comment="Proposed by 6302 approved by 51 edit id of 317" />
  <row Id="23779" PostHistoryTypeId="5" PostId="11178" RevisionGUID="c7daf655-3063-4afd-a5a2-23bf7cd20217" CreationDate="2011-04-15T19:46:43.233" UserId="3588" Comment="added 170 characters in body" Text="A raster image which can depict a 3D environment through mapping out the height at every point. Can be thought of as a mechanically consumeable form of topographical map." />
  <row Id="23780" PostHistoryTypeId="24" PostId="11178" RevisionGUID="c7daf655-3063-4afd-a5a2-23bf7cd20217" CreationDate="2011-04-15T19:46:43.233" Comment="Proposed by 3588 approved by 51 edit id of 323" />
  <row Id="23781" PostHistoryTypeId="5" PostId="11177" RevisionGUID="3d1cb874-39d9-46bb-beec-b481dbeff00f" CreationDate="2011-04-15T19:46:44.903" UserId="3588" Comment="added 458 characters in body" Text="A **heightmap** is a very efficient method of storing data on 3D structures such as terrain. The value of each point corresponds to the height, allowing elements such as complex mountain ranges to be stored in a mere 2D graphic. It can be pixel-smooth for full 3D games, or it could be on a per-tile basis when dealing with a tile-based map.&#xD;&#xA;&#xD;&#xA;Use this tag when your question deals with the construction, storage, or implementation of a heightmap in a game." />
  <row Id="23782" PostHistoryTypeId="24" PostId="11177" RevisionGUID="3d1cb874-39d9-46bb-beec-b481dbeff00f" CreationDate="2011-04-15T19:46:44.903" Comment="Proposed by 3588 approved by 51 edit id of 322" />
  <row Id="23783" PostHistoryTypeId="5" PostId="11171" RevisionGUID="2ba75cb5-4dbe-4e95-b0dc-6049e6adac5c" CreationDate="2011-04-15T19:46:47.290" UserId="3588" Comment="added 77 characters in body" Text="The point or points at which two or more shapes cross or overlap one another." />
  <row Id="23784" PostHistoryTypeId="24" PostId="11171" RevisionGUID="2ba75cb5-4dbe-4e95-b0dc-6049e6adac5c" CreationDate="2011-04-15T19:46:47.290" Comment="Proposed by 3588 approved by 51 edit id of 319" />
  <row Id="23785" PostHistoryTypeId="5" PostId="11170" RevisionGUID="afc93ca7-6d0c-4fe5-8129-2a501f68ef8e" CreationDate="2011-04-15T19:46:49.020" UserId="3588" Comment="added 511 characters in body" Text="The calculation of intersections can be used in game development to find things ranging from the when the paths of two objects will cross to the number of intersections between multiple lines. Intersections are a part of [tag:math].&#xD;&#xA;&#xD;&#xA;This tag refers more towards the mathematics of intersecting shapes and structures in space. [tag:collision-detection] should be used when referring specifically to the determining the collision between in-game entities outside the abstraction of their underlying geometries." />
  <row Id="23786" PostHistoryTypeId="24" PostId="11170" RevisionGUID="afc93ca7-6d0c-4fe5-8129-2a501f68ef8e" CreationDate="2011-04-15T19:46:49.020" Comment="Proposed by 3588 approved by 51 edit id of 318" />
  <row Id="23787" PostHistoryTypeId="5" PostId="11175" RevisionGUID="ebb2a551-2c7b-4a21-8a45-59dd37a53213" CreationDate="2011-04-15T19:46:50.970" UserId="3588" Comment="added 1107 characters in body" Text="The **isometric perspective** is very popular as a method of depicting 3D environments in 2D graphics. It does not require graphics to scale with a change of perspective - the &quot;left&quot; and &quot;right&quot; sides will be of the same shape even if the object is mirrored. It also lends itself very easily to tiled environments. While much more common in 2D games, 3D games can display in an isometric perspective by simply focusing the camera to align the axes properly.&#xD;&#xA;&#xD;&#xA;Limits of early graphics technology meant that the proper axis alignment did not match smoothly with how pixels were drawn. As such, most &quot;isometric&quot; games are in fact not isometric, but simply **dimetric perspective** (with the two &quot;ground&quot; axes being mirrored across the &quot;height&quot; axis). With anti-aliasing, modern 2D games can now employ true isometric perspective without &#xD;&#xA;&#xD;&#xA;Questions under this tag deal with developing games that use isometric perspectives, whether they deal with a true isometric perspective or the just-near isometric perspective.&#xD;&#xA;&#xD;&#xA;&lt;!-- This wiki entry would be so much cooler if I had an image to go with it... --&gt;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23788" PostHistoryTypeId="24" PostId="11175" RevisionGUID="ebb2a551-2c7b-4a21-8a45-59dd37a53213" CreationDate="2011-04-15T19:46:50.970" Comment="Proposed by 3588 approved by 51 edit id of 320" />
  <row Id="23789" PostHistoryTypeId="5" PostId="11176" RevisionGUID="1950a437-af1c-4654-a8fb-723960277ca0" CreationDate="2011-04-15T19:46:53.403" UserId="3588" Comment="added 183 characters in body" Text="A specific 3D perspective technically defined as having all 3 axes being exactly 120 degrees apart. In early video games, it is often slightly off to account for smoother pixel lines." />
  <row Id="23790" PostHistoryTypeId="24" PostId="11176" RevisionGUID="1950a437-af1c-4654-a8fb-723960277ca0" CreationDate="2011-04-15T19:46:53.403" Comment="Proposed by 3588 approved by 51 edit id of 321" />
  <row Id="23791" PostHistoryTypeId="5" PostId="11163" RevisionGUID="bcf09a92-d635-40bc-b642-ff9f9ccc8d0a" CreationDate="2011-04-15T19:46:56.400" UserId="3588" Comment="added 192 characters in body" Text="Services for matching up players in a multiplayer game, sometimes attempting to cater for a fair match-up of opponents in competitive play. Does not carry any intent to conclude with marriage." />
  <row Id="23792" PostHistoryTypeId="24" PostId="11163" RevisionGUID="bcf09a92-d635-40bc-b642-ff9f9ccc8d0a" CreationDate="2011-04-15T19:46:56.400" Comment="Proposed by 3588 approved by 51 edit id of 314" />
  <row Id="23793" PostHistoryTypeId="5" PostId="11162" RevisionGUID="cfc451d1-5172-4d93-bb96-7fdf7f10c93e" CreationDate="2011-04-15T19:46:58.413" UserId="3588" Comment="added 616 characters in body" Text="With multiplayer gaming having extended beyond the simple capacity of gathering neighbors and friends, the complexity of arranging players together has been increased. Matchmaking services include those which simply provide a gathering place for prospective players to find playmates, and those which blindly or algorithmically pair up players based on recorded gameplay attributes. Matchmaking specifically caters towards grouping together those who would ideally have an enjoyable experience when playing together.&#xD;&#xA;&#xD;&#xA;Use this tag when you're designing a specific matchmaking service for a game you are developing." />
  <row Id="23794" PostHistoryTypeId="24" PostId="11162" RevisionGUID="cfc451d1-5172-4d93-bb96-7fdf7f10c93e" CreationDate="2011-04-15T19:46:58.413" Comment="Proposed by 3588 approved by 51 edit id of 313" />
  <row Id="23795" PostHistoryTypeId="5" PostId="11165" RevisionGUID="69a03921-f898-4e1b-8f5e-22914552960b" CreationDate="2011-04-15T19:47:00.753" UserId="3588" Comment="added 102 characters in body" Text="A demonstrative or promotional video which advertises a game, often with its most attractive features." />
  <row Id="23796" PostHistoryTypeId="24" PostId="11165" RevisionGUID="69a03921-f898-4e1b-8f5e-22914552960b" CreationDate="2011-04-15T19:47:00.753" Comment="Proposed by 3588 approved by 51 edit id of 316" />
  <row Id="23797" PostHistoryTypeId="5" PostId="11164" RevisionGUID="b253d605-79c7-4af4-be9d-0c3609dc9107" CreationDate="2011-04-15T19:47:02.733" UserId="3588" Comment="added 687 characters in body" Text="A trailer is also known as a teaser or a preview. It is a form of [tag:marketing].&#xD;&#xA;&#xD;&#xA;Because games are very active, trailers often serve as an excellent way to show the awesome results of a game. Trailers often cover one of two things, although they may cover both. &#xD;&#xA;&#xD;&#xA; - They provide glimpses of gameplay footage, allowing the player to know what can be expected of how the game plays. &#xD;&#xA; - They show parts of the story and the characters, in order to entice those interested in the plot.&#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag cover topics such as strategies for building an attractive trailer, methods to record or create a trailer, and how to distribute it for maximum viewing." />
  <row Id="23798" PostHistoryTypeId="24" PostId="11164" RevisionGUID="b253d605-79c7-4af4-be9d-0c3609dc9107" CreationDate="2011-04-15T19:47:02.733" Comment="Proposed by 3588 approved by 51 edit id of 315" />
  <row Id="23799" PostHistoryTypeId="25" PostId="11182" RevisionGUID="2777ee1d-f81d-4169-bd38-28576bf6d1a5" CreationDate="2011-04-15T21:09:27.560" Comment="http://twitter.com/#!/StackGameDev/status/59000405748744192" />
  <row Id="23800" PostHistoryTypeId="2" PostId="11183" RevisionGUID="85a10191-8977-4824-af42-dc8674664de3" CreationDate="2011-04-15T21:20:35.440" UserId="6198" Text="There are no performance issues with Obj-C over C++.  Both are compiled code, and recall that Obj-C is a superset of C, and Obj-C++ is a superset of C++, which is great when you want to mix Obj-C and C++ in the same program (easy to do and XCode has nice support for the C++ side).  All language combinations support OpenGL, so any serious graphics work is fine and the library support is ok with Apple regardless of language.&#xD;&#xA;&#xD;&#xA;That said, what is the purpose of your game?&#xD;&#xA;&#xD;&#xA;- If you are solely writing for IOS, then don't worry and write in whatever language or combination you feel more comfortable in.  For me, this happens to be Obj-C++ with STL since that's my favorite part of C++.  Since I prefer Obj-C slightly over C++, I tend to use this option.&#xD;&#xA;&#xD;&#xA;- If you are writing with the goal of porting to another device, write in C++ with a translation layer to Obj-C to deal with any device-specific stuff (graphics, input, camera, ...), where the calls are made to entry-points in your application.&#xD;&#xA;&#xD;&#xA;- If you are a purest and want just one language, write in Obj-C.&#xD;&#xA;&#xD;&#xA;Others have talked about other libraries (physics and such).  There are absolutely no problems with accessing any of that from any of the language choices you are talking about (Obj-C, C++, or Obj-C++).  You will also not have any performance issues with those libraries in any language.&#xD;&#xA;&#xD;&#xA;A caveat:  There is a pointer indirection call with message passing.  I'm not sure how much you can interpret that as overhead, since I'm pretty sure that's exactly the same as an inherited C++ method call.  Can anyone clarify this?&#xD;&#xA;&#xD;&#xA;Hope that helps,&#xD;&#xA;&#xD;&#xA;Lee." />
  <row Id="23801" PostHistoryTypeId="5" PostId="11160" RevisionGUID="401a66f1-997a-4bf7-9338-72a06d9dea8a" CreationDate="2011-04-15T21:49:19.743" UserId="3830" Comment="added 2 characters in body" Text="This is one of those questions where one has to response with another question:  That depends on what you want to do.&#xD;&#xA;&#xD;&#xA;An MMO can be a mega-multi-million dollar production effort that requires vast server farms to run, or it can be a lean clean web based game that runs on a single Amazon S3 instance or uses Google Application Engine.&#xD;&#xA;&#xD;&#xA;Whatever your approach, you have to have a solid business plan.  It's going to cost X per month to run your servers, and so you had better be bring in X + P (P = profit) every month from subscriptions unless you like losing money.  And don't forget that P is going into paying back your development costs.  $50 million to build an MMO that grosses $100 a month isn't going to work.&#xD;&#xA;&#xD;&#xA;Do read this article...&#xD;&#xA;&#xD;&#xA;http://www.escapistmagazine.com/articles/view/issues/issue_75/431-Boutique-MMOGs&#xD;&#xA;&#xD;&#xA;It doesn't go into cost details, but it goes into mindset." />
  <row Id="23802" PostHistoryTypeId="2" PostId="11184" RevisionGUID="e1083a12-c5d7-48bc-8352-e53b6fb533eb" CreationDate="2011-04-15T22:10:52.090" UserId="4827" Text="I have some pretty decent general programming skills and elementary C/C++ skills. I am a complete noob in game/graphics programming and I would like to start.&#xD;&#xA;&#xD;&#xA;I want to gradually learn, starting off by something like Pong, and gradually making more difficult stuff for learning. My ultimate goal is to make some COD:BO zombies clone (I __love__ this game).&#xD;&#xA;&#xD;&#xA;So what libraries/engines can you guys recommend, first to even start drawing stuff on the screen, and later more sophisticated stuff for getting a FPS going." />
  <row Id="23803" PostHistoryTypeId="1" PostId="11184" RevisionGUID="e1083a12-c5d7-48bc-8352-e53b6fb533eb" CreationDate="2011-04-15T22:10:52.090" UserId="4827" Text="What libraries/engines should I use?" />
  <row Id="23804" PostHistoryTypeId="3" PostId="11184" RevisionGUID="e1083a12-c5d7-48bc-8352-e53b6fb533eb" CreationDate="2011-04-15T22:10:52.090" UserId="4827" Text="&lt;engine&gt;&lt;libraries&gt;" />
  <row Id="23805" PostHistoryTypeId="2" PostId="11185" RevisionGUID="adb1cb68-28d6-4836-a10a-319cb56d5461" CreationDate="2011-04-15T22:19:06.953" UserId="4827" Text="Just a proof of concept:&#xD;&#xA;&#xD;&#xA;1. Choose a random direction.&#xD;&#xA;2. If this would cause us to go somewhere we've already been, pick another direction.&#xD;&#xA;3. If we have run out of directions go back to the last square with a unexplored direction." />
  <row Id="23806" PostHistoryTypeId="2" PostId="11186" RevisionGUID="dec6d2bb-1dfb-4ba0-8289-35979208cab0" CreationDate="2011-04-15T22:33:35.807" UserId="6622" Text="First you should choose your programming language. &#xD;&#xA;&#xD;&#xA;I can recommend Java, not only because of it's ease, or C++. You should choose the language, which is most familiar for you. Don't worry about performance. Java and c++ are extremely performant, if you keep some performance rules.   &#xD;&#xA;I like java more so I use it. I can't recommend engines in C++, because I have no experience there. &#xD;&#xA;&#xD;&#xA;Open Source Game Engines in Java:  &#xD;&#xA;&#xD;&#xA;2D:  &#xD;&#xA;libGDX - nice and fast library for developing games simultaneously for PC and android   &#xD;&#xA;Slick - Also good and easy to learn &#xD;&#xA;Java2D - built in java 2d graphics engine&#xD;&#xA;&#xD;&#xA;3D:&#xD;&#xA;jMonkeyEngine - famous 3d engine &#xD;&#xA;&#xD;&#xA;(I will add links tomorrow, I'm writing from my mobile phone) " />
  <row Id="23807" PostHistoryTypeId="2" PostId="11187" RevisionGUID="7f1062e0-d439-47dc-b97e-055ad18ea1a1" CreationDate="2011-04-15T22:37:58.457" UserId="6021" Text="Try to keep your first attempts as simple as possible. Pong is a good start. You can use a 2D library such as SDL or (better) SFML to bring your graphics onto the screen. &#xD;&#xA;&#xD;&#xA;For 3D, there's for example [OGRE][1], which is pretty powerful. But keep in mind that making 3D games is much more time-consuming and difficult than 2D, so you should definitely practice with the former.&#xD;&#xA;&#xD;&#xA;**Alternative**: You may want to have a look at [Unity3D][2] or [Unreal Development Kit (UDK)][3] if you want to get as quick as possible to a playable prototype. Albeit those are rather 'game makers' than low-level libraries and don't require you to code in C++ or Java, you still have to code respectively script your game logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://unity3d.com/&#xD;&#xA;  [3]: http://www.udk.com/" />
  <row Id="23808" PostHistoryTypeId="5" PostId="11186" RevisionGUID="3976ed59-db15-42c0-b15f-c6fb499ab7bf" CreationDate="2011-04-15T22:38:44.900" UserId="6622" Comment="added 251 characters in body" Text="First you should choose your programming language. &#xD;&#xA;&#xD;&#xA;I can recommend Java, not only because of it's ease, or C++. You should choose the language, which is most familiar for you. Don't worry about performance. Java and c++ are extremely performant, if you keep some performance rules.   &#xD;&#xA;I like java more so I use it. I can't recommend engines in C++, because I have no experience there. &#xD;&#xA;&#xD;&#xA;For learning drawing and other basics I would start with java2D or the equivalent c++ engine. This way you understand the basics of game development such as the main loop, rendering and input. These tasks are normally taken by the game engine.  &#xD;&#xA;&#xD;&#xA;Open Source Game Engines in Java:  &#xD;&#xA;&#xD;&#xA;2D:  &#xD;&#xA;libGDX - nice and fast library for developing games simultaneously for PC and android   &#xD;&#xA;Slick - Also good and easy to learn   &#xD;&#xA;Java2D - built in java 2d graphics engine&#xD;&#xA;&#xD;&#xA;3D:&#xD;&#xA;jMonkeyEngine - famous 3d engine &#xD;&#xA;&#xD;&#xA;(I will add links tomorrow, I'm writing from my mobile phone) " />
  <row Id="23809" PostHistoryTypeId="6" PostId="11184" RevisionGUID="045a2059-beef-4bdc-a2c8-fc37f4ccfc41" CreationDate="2011-04-15T22:45:02.113" UserId="962" Comment="edited tags" Text="&lt;c++&gt;&lt;engine&gt;&lt;libraries&gt;" />
  <row Id="23810" PostHistoryTypeId="9" PostId="11184" RevisionGUID="ef3968b8-ea05-43f3-8d29-4a53c63e64b2" CreationDate="2011-04-15T22:48:25.580" UserId="4827" Comment="Rollback to [e1083a12-c5d7-48bc-8352-e53b6fb533eb]" Text="&lt;engine&gt;&lt;libraries&gt;" />
  <row Id="23811" PostHistoryTypeId="2" PostId="11188" RevisionGUID="ef2a8b7a-d66c-4722-96ac-e1dac4f6ba06" CreationDate="2011-04-15T22:54:06.743" UserId="4598" Text="I did an answer for a question like this as well, maybe you can get more out of this one:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/10802/what-good-3d-graphic-rendering-engines-are-out-there/10804#10804" />
  <row Id="23812" PostHistoryTypeId="5" PostId="11158" RevisionGUID="271c7cbe-99bf-4f6e-b024-00919037f490" CreationDate="2011-04-15T23:45:57.113" UserId="1198" Comment="added 1 characters in body" Text="Really, you don't really know what is fun until you have shared the idea with two or more ardent game players." />
  <row Id="23813" PostHistoryTypeId="25" PostId="11172" RevisionGUID="6b25bdd4-069d-45a5-b7ed-e56e4ae56b7c" CreationDate="2011-04-16T00:09:27.633" Comment="http://twitter.com/#!/StackGameDev/status/59045705133731840" />
  <row Id="23814" PostHistoryTypeId="2" PostId="11189" RevisionGUID="55dc67bf-4460-4b5c-a3a0-1d1822047885" CreationDate="2011-04-16T00:12:04.697" UserId="6588" Text="I wouldn't recommend either Java or C++ unless you are already very familiar with those languages. The language I would recommend is Python, and the most obvious game library for that language is PyGame: http://www.pygame.org/news.html&#xD;&#xA;&#xD;&#xA;Another game development tool I am thinking of starting to use is Love2D, mostly because I have started programming in Lua: http://love2d.org/&#xD;&#xA;&#xD;&#xA;That's for 2D games; if you want to develop 3D games then going with Unity is a great place to learn: http://unity3d.com/&#xD;&#xA;&#xD;&#xA;And then while I have no personal experience with C# a lot of people say good things about learning game development using XNA." />
  <row Id="23818" PostHistoryTypeId="25" PostId="11159" RevisionGUID="d6406e0f-ec78-44be-9b1f-20d324f60c38" CreationDate="2011-04-16T03:09:27.513" Comment="http://twitter.com/#!/StackGameDev/status/59091002522206208" />
  <row Id="23819" PostHistoryTypeId="25" PostId="11155" RevisionGUID="eb0f1dac-2672-4b2c-86f7-479c73ac8d42" CreationDate="2011-04-16T06:09:27.803" Comment="http://twitter.com/#!/StackGameDev/status/59136302628610048" />
  <row Id="23820" PostHistoryTypeId="2" PostId="11192" RevisionGUID="b62f361f-6fcc-4d6f-b1b4-d94b80f9ae9c" CreationDate="2011-04-16T07:11:13.663" UserId="1198" Text="I noticed that you tagged the question client-server, so I assume you're also asking how to physically distribute the patch. Depending on your budget, the easiest for users is to simply provide an HTTP download on your website, but this requires the most bandwidth from your server (patch size * games purchased), a slightly less user friendly option is to upload your content as a bittorrent and run some seeds from your servers. This reduces bandwidth requried on your server, but will be more of a pain for your users unless you are like Blizzard and have the resoruces to build a bittorrent client into your game.&#xD;&#xA;&#xD;&#xA;The bottom line is that it depends on how large (MB/GB) your patch or update will be and how much money you have to throw at a server and bandwidth to distribute your patch to end users.&#xD;&#xA;&#xD;&#xA;From a software perspective, there are many ways to distribute and install game updates, but in general you should stick with the methods used by traditional software. Have the user download an update installer, which knows how to prompt the user for adminsitrative access to their machine and copy/update files as necessary checking versions (user may have skipped v1.1 and installed v1.2 directly)." />
  <row Id="23821" PostHistoryTypeId="2" PostId="11193" RevisionGUID="bea1bb44-edc2-49b5-9e67-f118a5587921" CreationDate="2011-04-16T07:19:10.550" UserId="6756" Text="I have agreed to show my child how to develop software. He wants me to help him develop a game.&#xD;&#xA;&#xD;&#xA;**If you were me then what approach would you take to develop an old school game?** &#xD;&#xA;&#xD;&#xA;The trouble is that I do not know much about the available approaches to games design and develop these days. It was different way back, before I did my A-Levels in early 1990s, a friend had arranged for us to meet with Psygnosis. The idea was that we would be able to market our respective versions for a game that we had been developing. My friend was writing for the Amiga at the time; I was writing one for the C64. Psygnosis lost interest in C64 overnight. I then decided that I would have to go into back education albeit late. I do not think I turned my C64 on much after that.  &#xD;&#xA;&#xD;&#xA;I thought that economics would offer me an escape from computer science. I saw little further for me in programming at a time when I could not even afford a PC. Nothing much ever changes; I ended up having to written applications all by life. By the time, I released that I was being wholly messed about with the PhD, economics and computer science had begun to meet in interesting ways. I was already reading into concepts of business intelligence, data warehousing, etc., before I decided to leave academic and find work in software development. So, I have been developing software professionally for over ten years (using now mainly Microsoft technologies: C#, t-Sql, Mdx, jQuery, ASP.Net, MVC2, etc.). However, none of these applications have been games.&#xD;&#xA;&#xD;&#xA;I am not interested in an amazing revenue or some &quot;AAA&quot; title. Also, I do not want to bring in teams of developers. I do not want to say &quot;I refactored 25% of the AI system, I programmed the traffic lights, implemented the leaf effect, etc&quot;. I want to avoid describing a sitution where each person has a pretty minimal effect on the whole game.&#xD;&#xA;The complexity demanded is shocking; I believe the main of it started with the switch from home computers to consoles. Unbearably, because the games industry met with mass media, the same FX used in film media will increasingly be demanded in a game setting. Consumer appetites for realism are insatiable, which is odd in one way because playing games is often about escapism - enough of the analysis.&#xD;&#xA;&#xD;&#xA;I was thinking about an old school game that you can pick up and play them straight away, where there is no &quot;learning curve&quot;. This is because we prefer playing these types of games. On top of that I want to be able to say things like &quot;I made the game engine, the AI, he did the scoring system and .. and .. and ..&quot;. &#xD;&#xA;&#xD;&#xA;So, if you were me then what approach would you take to develop an old school game? &#xD;&#xA;" />
  <row Id="23822" PostHistoryTypeId="1" PostId="11193" RevisionGUID="bea1bb44-edc2-49b5-9e67-f118a5587921" CreationDate="2011-04-16T07:19:10.550" UserId="6756" Text="What approach would you take to develop an old school game?" />
  <row Id="23823" PostHistoryTypeId="3" PostId="11193" RevisionGUID="bea1bb44-edc2-49b5-9e67-f118a5587921" CreationDate="2011-04-16T07:19:10.550" UserId="6756" Text="&lt;c#&gt;&lt;old-school&gt;" />
  <row Id="23824" PostHistoryTypeId="2" PostId="11194" RevisionGUID="a7cead91-f7bb-4ddd-bb90-0000d2387245" CreationDate="2011-04-16T07:33:38.353" UserId="6762" Text="I remember John Carmack talking about how they initially used Megatexturing for Quake Wars: Enemy Territory. &#xD;&#xA;The technology has since evolved quite a bit in Rage.&#xD;&#xA;&#xD;&#xA;I was wondering if somebody here can give some technical details on the specifics on what and how it has evolved since then." />
  <row Id="23825" PostHistoryTypeId="1" PostId="11194" RevisionGUID="a7cead91-f7bb-4ddd-bb90-0000d2387245" CreationDate="2011-04-16T07:33:38.353" UserId="6762" Text="Megatexturing : Evolution from Quake Wars to Rage" />
  <row Id="23826" PostHistoryTypeId="3" PostId="11194" RevisionGUID="a7cead91-f7bb-4ddd-bb90-0000d2387245" CreationDate="2011-04-16T07:33:38.353" UserId="6762" Text="&lt;textures&gt;" />
  <row Id="23827" PostHistoryTypeId="5" PostId="11193" RevisionGUID="9f2ad8ad-9909-418d-bc2e-faf7cef4ed8a" CreationDate="2011-04-16T07:37:35.777" UserId="6756" Comment="added 119 characters in body; edited tags; deleted 4 characters in body" Text="I have agreed to show my child how to develop software. He wants me to help him develop a game.&#xD;&#xA;&#xD;&#xA;**If you were me then what approach would you take to develop an old school game?** &#xD;&#xA;&#xD;&#xA;The trouble is that I do not know much about the available approaches to games design and develop these days. It was different way back, before I did my A-Levels in early 1990s, a friend had arranged for us to meet with Psygnosis. The idea was that we would be able to market our respective versions for a game that we had been developing. My friend was writing for the Amiga at the time; I was writing one for the C64. Psygnosis lost interest in C64 overnight. I then decided that I would have to go into back education albeit late. I do not think I turned my C64 on much after that.  &#xD;&#xA;&#xD;&#xA;I thought that economics would offer me an escape from computer science. I saw little further for me in programming at a time when I could not even afford a PC. Nothing much ever changes; I ended up having to written applications all by life. By the time, I released that I was being wholly messed about with the PhD, economics and computer science had begun to meet in interesting ways. I was already reading into concepts of business intelligence, data warehousing, etc., before I decided to leave academic and find work in software development. So, I have been developing software professionally for over ten years (using now mainly Microsoft technologies: C#, t-Sql, Mdx, jQuery, ASP.Net, MVC2, etc.). However, none of these applications have been games.&#xD;&#xA;&#xD;&#xA;I am not interested in an amazing revenue or some &quot;AAA&quot; title. Also, I do not want to bring in teams of developers. I do not want to say &quot;I refactored 25% of the AI system, I programmed the traffic lights, implemented the leaf effect, etc&quot;. I want to avoid describing a sitution where each person has a pretty minimal effect on the whole game.&#xD;&#xA;The complexity demanded is shocking; I believe the main of it started with the switch from home computers to consoles. Unbearably, because the games industry met with mass media, the same FX used in film media will increasingly be demanded in a game setting. Consumer appetites for realism are insatiable, which is odd in one way because playing games is often about escapism - enough of the analysis.&#xD;&#xA;&#xD;&#xA;I was thinking about an old school game that you can pick up and play them straight away, where there is no &quot;learning curve&quot;. This is because we prefer playing these types of games. On top of that I want to be able to say things like &quot;I made the game engine, the AI, he did the scoring system and .. and .. and ..&quot;. &#xD;&#xA;&#xD;&#xA;I intend to target a broad range of platforms and use mainly C#. So, I was thinking of maybe using Silverlight.&#xD;&#xA;&#xD;&#xA;So, if you were me then what approach would you take to develop an old school game? &#xD;&#xA;" />
  <row Id="23828" PostHistoryTypeId="6" PostId="11193" RevisionGUID="9f2ad8ad-9909-418d-bc2e-faf7cef4ed8a" CreationDate="2011-04-16T07:37:35.777" UserId="6756" Comment="added 119 characters in body; edited tags; deleted 4 characters in body" Text="&lt;c#&gt;&lt;silverlight&gt;&lt;old-school&gt;&lt;commodore-64&gt;" />
  <row Id="23829" PostHistoryTypeId="2" PostId="11195" RevisionGUID="6a805040-7a89-4be0-a2a8-b78fe98bdd3a" CreationDate="2011-04-16T07:44:49.547" UserId="4947" Text="I don't know, if it's what you are looking for, but you can try [this video][1] and [this paper][2] from GDC 2011. It's about: Mega Meshes - Modelling, rendering and lighting a world made of 100 billion polygons. And there is a lot about texturing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=M04SMNkTx9E&#xD;&#xA;  [2]: http://miciwan.com/GDC2011/GDC2011_Mega_Meshes.pdf" />
  <row Id="23831" PostHistoryTypeId="6" PostId="11193" RevisionGUID="177ef498-56ac-4ba2-ad0d-a4b92fae36f7" CreationDate="2011-04-16T08:15:09.380" UserId="6756" Comment="edited tags" Text="&lt;c#&gt;" />
  <row Id="23832" PostHistoryTypeId="2" PostId="11196" RevisionGUID="16225df7-d017-4164-adff-590879af0f7b" CreationDate="2011-04-16T08:59:15.753" UserId="5767" Text="Is it possible to make model in Blender, with enabled GLSL, add multiple textures, etc, and then just load it in XNA, where's own HLSL? Will it work?" />
  <row Id="23833" PostHistoryTypeId="1" PostId="11196" RevisionGUID="16225df7-d017-4164-adff-590879af0f7b" CreationDate="2011-04-16T08:59:15.753" UserId="5767" Text="Model in Blender GLSL to XNA HLSL" />
  <row Id="23834" PostHistoryTypeId="3" PostId="11196" RevisionGUID="16225df7-d017-4164-adff-590879af0f7b" CreationDate="2011-04-16T08:59:15.753" UserId="5767" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;hlsl&gt;&lt;glsl&gt;&lt;blender&gt;" />
  <row Id="23835" PostHistoryTypeId="25" PostId="11193" RevisionGUID="15c74908-09f3-45c7-a140-31257d91682f" CreationDate="2011-04-16T09:09:27.750" Comment="http://twitter.com/#!/StackGameDev/status/59181601376047104" />
  <row Id="23836" PostHistoryTypeId="2" PostId="11197" RevisionGUID="3408ef6c-80b9-4f07-b8cb-a0ddf73051b7" CreationDate="2011-04-16T09:46:10.783" UserId="6765" Text="I'm looking for an AI engine for iOS game development (machine learning, path finding), please help me and sorry about my English." />
  <row Id="23837" PostHistoryTypeId="1" PostId="11197" RevisionGUID="3408ef6c-80b9-4f07-b8cb-a0ddf73051b7" CreationDate="2011-04-16T09:46:10.783" UserId="6765" Text="AI engine for iOS game development?" />
  <row Id="23838" PostHistoryTypeId="3" PostId="11197" RevisionGUID="3408ef6c-80b9-4f07-b8cb-a0ddf73051b7" CreationDate="2011-04-16T09:46:10.783" UserId="6765" Text="&lt;ai&gt;&lt;ios&gt;&lt;objective-c&gt;" />
  <row Id="23839" PostHistoryTypeId="2" PostId="11198" RevisionGUID="75b85c27-2cd0-4928-9039-809ec64c65f2" CreationDate="2011-04-16T11:17:10.253" UserId="6767" Text="Companies want to hire technical artists these days, basically that means you must have skills both in art and programming in one. To serious people trying to break into the industry it's sad to report that the industry is simply not interested in the average Joe with some hands on game engine experience, its not dedication or even creating works of art that do wonder. It's all about time and money nothing else, 90% of your skills are wasted on what your art directors or coordinators want to see. You get passed concept work and you work to complete that and bring it into reality then you get messy and put the art into the technology that will be running it, that is practically all a game artist does in the industry. If you believe otherwise then you are sadly mistaken, try spending the 40 to 60 years in the industry you will see what its like creating art for a living on a shoe string budget.&#xD;&#xA;&#xD;&#xA;UDK is not Unreal Engine 3 and vise versa they are contemporary engines which are a superset of the unreal technology, UDK is simply a lesser umbilical child of the Unreal Engine thus its state is in constant evolution. Whereas Unreal engine is the complete source code licensed under an NDA sort of agreement and unless you can pay millions chances are STFU. That is not to say UDK isn't powerful, however it is limiting in a number of ways which are both technical and license model based, what does make UDK interesting is that it employs a technology share type program. Where various technology partners have contributed to the needed success of UDK for example &quot;Speedtree&quot; without it our lives would be miserable. UDK is nothing but a cheap shot at the market because Epic has lost Epic revenue and court battles, so they decided to build a license model that targets the average market in the hopes of revitalizing their losses.&#xD;&#xA;&#xD;&#xA;ID Software as much as I hate their direction and lack of aesthetics, were the first to open source their previous generation technology to the public. That is something no game development company has done thus far, UDK comes close but loses the stretch by a mile. " />
  <row Id="23840" PostHistoryTypeId="5" PostId="11193" RevisionGUID="6bf26e95-d252-4a3b-be07-4c53e31ad2ba" CreationDate="2011-04-16T11:42:00.450" UserId="6756" Comment="added 82 characters in body; added 8 characters in body" Text="I have agreed to show my child how to develop software. He wants me to help him develop a game.&#xD;&#xA;&#xD;&#xA;**If you were me then what approach would you take to develop an old school game?** &#xD;&#xA;&#xD;&#xA;The trouble is that I do not know much about the available approaches to games design and develop these days. It was different way back, before I did my A-Levels in early 1990s, a friend had arranged for us to meet with Psygnosis. The idea was that we would be able to market our respective versions for a game that we had been developing. My friend was writing for the Amiga at the time; I was writing one for the C64. Psygnosis lost interest in C64 overnight. I then decided that I would have to go into back education albeit late. I do not think I turned my C64 on much after that.  &#xD;&#xA;&#xD;&#xA;I thought that economics would offer me an escape from computer science. I saw little further for me in programming at a time when I could not even afford a PC. Nothing much ever changes; I ended up having to written applications all by life. By the time, I released that I was being wholly messed about with the PhD, economics and computer science had begun to meet in interesting ways. I was already reading into concepts of business intelligence, data warehousing, etc., before I decided to leave academic and find work in software development. So, I have been developing software professionally for over ten years (using now mainly Microsoft technologies: C#, t-Sql, Mdx, jQuery, ASP.Net, MVC2, etc.). However, none of these applications have been games.&#xD;&#xA;&#xD;&#xA;I am not interested in an amazing revenue or some &quot;AAA&quot; title. Also, I do not want to bring in teams of developers. I do not want to say &quot;I refactored 25% of the AI system, I programmed the traffic lights, implemented the leaf effect, etc&quot;. I want to avoid describing a sitution where each person has a pretty minimal effect on the whole game.&#xD;&#xA;The complexity demanded is shocking; I believe the main of it started with the switch from home computers to consoles. Unbearably, because the games industry met with mass media, the same FX used in film media will increasingly be demanded in a game setting. Consumer appetites for realism are insatiable, which is odd in one way because playing games is often about escapism - enough of the analysis.&#xD;&#xA;&#xD;&#xA;I was thinking about an old school game that you can pick up and play them straight away, where there is no &quot;learning curve&quot;. This is because we prefer playing these types of games. On top of that I want to be able to say things like &quot;I made the game engine, the AI, he did the scoring system and .. and .. and ..&quot;. &#xD;&#xA;&#xD;&#xA;I intend to run it in a browser, to target a broad range of platforms. I was thinking to use mainly C# and Silverlight.&#xD;&#xA;&#xD;&#xA;So, if you were me then what approach would you take to develop an old school game? &#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Could I use XNA? Is it free? Does it plug into Visual Studio 2010?&#xD;&#xA;" />
  <row Id="23841" PostHistoryTypeId="2" PostId="11199" RevisionGUID="b4db9b0a-dbd4-4755-be1a-e721c8705d06" CreationDate="2011-04-16T11:43:41.640" UserId="3794" Text="C# makes best combo for home development. There are two great platforms which are well suitable even for beginers. I expect that &quot;old school game&quot; means something like SNES games.&#xD;&#xA;&#xD;&#xA; - [XNA][1] - is buid over directx and can ran on PC,XBOX and win7 phone. It is easy to use and learn. It uses shaders but you can evercome it by use basic effect classes which does the work for you and you don't need to touch GPU. And of course you can make simple 2D old school games which will run on todays hw with xna.&#xD;&#xA; - [Unity][2] - Is today's &quot;everybody-love&quot; game development platform. You can write code in c# or javascript and it will run on almost everything (PC, web browser, mac, iphone, android, xbox and ps3). It is however not that good for simple 2D development as XNA is. But someone may disagree. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/&#xD;&#xA;  [2]: http://unity3d.com" />
  <row Id="23842" PostHistoryTypeId="5" PostId="11199" RevisionGUID="3fdd8dbe-015b-4d6f-be9f-e8241b3f36c7" CreationDate="2011-04-16T12:07:45.853" UserId="3794" Comment="added 747 characters in body" Text="C# makes best combo for home development. There are two great platforms which are well suitable even for beginers. I expect that &quot;old school game&quot; means something like SNES games.&#xD;&#xA;&#xD;&#xA; - [XNA][1] - is buid over directx and can ran on PC,XBOX and win7 phone. It is easy to use and learn. It uses shaders but you can evercome it by use basic effect classes which does the work for you and you don't need to touch GPU. And of course you can make simple 2D old school games which will run on todays hw with xna.&#xD;&#xA; - [Unity][2] - Is today's &quot;everybody-love&quot; game development platform. You can write code in c# or javascript and it will run on almost everything (PC, web browser, mac, iphone, android, xbox and ps3). It is however not that good for simple 2D development as XNA is. But someone may disagree. &#xD;&#xA;&#xD;&#xA;edit: if running in web browser is your &quot;must have&quot;:&#xD;&#xA;&#xD;&#xA; - Using java applets is also possibility to run games in browsers. If you use only canvas to which you can draw geometric primitives, it will be pretty near to the old school. However you can also use JOGL or similar to have access to the OpenGl functions.&#xD;&#xA; - Flash - It is well used possibility for game development in a browser. It uses action script, which is similar to javascript.&#xD;&#xA; - Javascript and html5 - Html5 canvas and javascript opens new ways to create games in browsers. You can control directly what you draw into the canvas and it will run with no need on of installation of any plugin in every browser (in near future). No hw acceleration seems like no problem for you. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/&#xD;&#xA;  [2]: http://unity3d.com" />
  <row Id="23843" PostHistoryTypeId="25" PostId="11194" RevisionGUID="843fa41c-09cc-4959-860e-688dbdf40b46" CreationDate="2011-04-16T12:09:27.440" Comment="http://twitter.com/#!/StackGameDev/status/59226897422356481" />
  <row Id="23844" PostHistoryTypeId="2" PostId="11200" RevisionGUID="a0892438-9152-470d-a704-89344df82fb9" CreationDate="2011-04-16T12:13:54.563" UserId="6637" Text="You say random, but how much randomness do you want? Is it ok if the enemies pick a path that is 10 times as long as the shortest one? Is it ok if the enemies enter a dead end and have to backtrack? That is, random over what set of paths, and with which probability distribution?&#xD;&#xA;&#xD;&#xA;Assuming you want the enemies to prefer short paths, you could use A*, but randomly vary the edge weights fed to it. Then, enemies will always choose a random path that visits each node at most once, with a bias towards shorter paths. In particular, if without randomization there would be several paths of same length, each of these paths would be chosen with equal probability.&#xD;&#xA;&#xD;&#xA;Alternatively, in A*, you could iterate over neighbours in random order. In your eaxmple, when path finding reaches node 1, it would at random enqueue the top of bottom neighbour first, causing the top or bottom path to considered first. This solution would cause enemies to pick among all shortest paths at random. In your simple example, both shortest paths would be equally probable, but in a situation like:&#xD;&#xA;&#xD;&#xA;    start -+--------+&#xD;&#xA;           |        |&#xD;&#xA;           +--------+&#xD;&#xA;           |        |&#xD;&#xA;           +--------+- end&#xD;&#xA;&#xD;&#xA;the top path would be chosen at probability 1/2, while the bottom ones would be chosen at probability 1/4 each." />
  <row Id="23845" PostHistoryTypeId="2" PostId="11201" RevisionGUID="f15db959-8e24-41cb-88df-a4aa777ce3fc" CreationDate="2011-04-16T12:24:44.590" UserId="5584" Text="I have to use this function to get a Surface of Revolution (homework).&#xD;&#xA;&#xD;&#xA;newVertex = (oldVertex.y, someFunc1(oldVertex.x, oldVertex.y), someFunc2(oldVertex.x, oldVertex.y));&#xD;&#xA;&#xD;&#xA;As far as I know (FIXME) Surface of Revolution means rotations of a (2D)curve around an axis in 3D.&#xD;&#xA;But this vertex computing gives a 3D plane (FIXME again :D), so rotation of this isn't&#xD;&#xA;obvious.&#xD;&#xA;&#xD;&#xA;I am misunderstand something?" />
  <row Id="23846" PostHistoryTypeId="1" PostId="11201" RevisionGUID="f15db959-8e24-41cb-88df-a4aa777ce3fc" CreationDate="2011-04-16T12:24:44.590" UserId="5584" Text="Surface of Revolution with 3D surface" />
  <row Id="23847" PostHistoryTypeId="3" PostId="11201" RevisionGUID="f15db959-8e24-41cb-88df-a4aa777ce3fc" CreationDate="2011-04-16T12:24:44.590" UserId="5584" Text="&lt;math&gt;" />
  <row Id="23848" PostHistoryTypeId="5" PostId="11193" RevisionGUID="b1f4ab55-dcf2-4212-b183-703b2777b8cc" CreationDate="2011-04-16T12:27:05.620" UserId="6756" Comment="deleted 2102 characters in body" Text="I have agreed to show my child how to develop software. He wants me to help him develop a game.&#xD;&#xA;&#xD;&#xA;**If you were me then what approach would you take to develop an old school game?** &#xD;&#xA;&#xD;&#xA;I was thinking about an old school game that you can pick up and play them straight away, where there is no &quot;learning curve&quot;. This is because we prefer playing these types of games. On top of that I want to be able to say things like &quot;I made the game engine, the AI, he did the scoring system and .. and .. and ..&quot;. &#xD;&#xA;&#xD;&#xA;I intend to run it in a browser, to target a broad range of platforms. I was thinking to use mainly C# and Silverlight.&#xD;&#xA;&#xD;&#xA;So, if you were me then what approach would you take to develop an old school game? &#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Could I use XNA? Is it free? Does it plug into Visual Studio 2010?&#xD;&#xA;" />
  <row Id="23849" PostHistoryTypeId="2" PostId="11202" RevisionGUID="9aca7586-498c-419c-8b39-9a8a71b17c53" CreationDate="2011-04-16T12:42:32.300" UserId="6768" Text="I would recommend to check &quot;Virtual Texture Mapping 101&quot; article on GPU Gems. It is basically dividing the original texture (which is usually huge) into smaller tiles and load them into GPU memory when needed. The same idea can be used to render huge and high detailed terrains." />
  <row Id="23850" PostHistoryTypeId="2" PostId="11203" RevisionGUID="93fa8ec5-1ac7-4c0e-a924-ea08ffd12fbe" CreationDate="2011-04-16T14:08:11.240" UserId="3132" Text="average mmo&#xD;&#xA;&#xD;&#xA;development - approx 15 mln $ for three years of development&#xD;&#xA;&#xD;&#xA;support after release day - 400k$ per month&#xD;&#xA;&#xD;&#xA;income if you are lucky - 1.5-2mln$/month" />
  <row Id="23851" PostHistoryTypeId="2" PostId="11204" RevisionGUID="90b0ae61-cf00-4ec4-990d-b0bf419de285" CreationDate="2011-04-16T14:54:35.067" UserId="5423" Text="I'm having some troubles with a 2D platformer type game (there's more to it, but that's all that matters for this question). I had collision with the platforms working fine, but if the character hit the side of the platform, they would be automatically be placed on top of the platform. This is bad, for obvious reasons. I want the player to hit the side and fall, like one would expect. So what I'm trying to do is simply keep track of the previous position of the player, and if the player's bounding box overlaps the platform's bounding box, move the player back to their previous position. The problem is, when the player is on the platform, they cannot move left or right. They can jump, they can move while they're in the air, and their falls are stopped by the platforms. I just can't figure out why they won't move anymore. Here's some relevant code:&#xD;&#xA;&#xD;&#xA;    // previous position is stored&#xD;&#xA;    previousPos = new Vector2(playerPosition.x, playerPosition.y);&#xD;&#xA;&#xD;&#xA;    ....&#xD;&#xA;    // game checks input and calculates next position and&#xD;&#xA;    // stores it in playerPosition. only changes the Vector2&#xD;&#xA;    // playerPosition, does not display the change via the sprite yet,&#xD;&#xA;    // so it doesn't look like it's stuttering to the player&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;    if (!isJumping) {&#xD;&#xA;    			// loop through the platform list&#xD;&#xA;    			for (Platform platform : platformList) {&#xD;&#xA;    				// if the player is touching a platform, then they are on a platform&#xD;&#xA;    				// and they are not falling&#xD;&#xA;    				if (platform.getBoundingBox().contains(playerBoundingBox)) {&#xD;&#xA;    					playerPosition = new Vector2(previousPos.x, previousPos.y);&#xD;&#xA;    					boundingBoxPositionLower = new Vector3(playerPosition.x, playerPosition.y, 0);&#xD;&#xA;    					boundingBoxPositionUpper = new Vector3(playerPosition.x+playerSprite.getWidth(), playerPosition.y+playerSprite.getHeight(), 0);&#xD;&#xA;    					playerBoundingBox.set(boundingBoxPositionLower, boundingBoxPositionUpper);&#xD;&#xA;    					isOnPlatform = true;&#xD;&#xA;    					isFalling = false;&#xD;&#xA;    					playerDirection.y = 0;&#xD;&#xA;    					break;&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;I'm not sure where to go from here. Maybe ideas on how to debug? Or maybe it's just a simple problem I'm overlooking. If you need any other code snippets, let me know.&#xD;&#xA;&#xD;&#xA;Thanks guys!&#xD;&#xA;&#xD;&#xA;PS - Sorry I don't follow the 80 characters per line standard, it all fits on my 1080p monitor fine in my IDE :P ." />
  <row Id="23852" PostHistoryTypeId="1" PostId="11204" RevisionGUID="90b0ae61-cf00-4ec4-990d-b0bf419de285" CreationDate="2011-04-16T14:54:35.067" UserId="5423" Text="Collision Problems" />
  <row Id="23853" PostHistoryTypeId="3" PostId="11204" RevisionGUID="90b0ae61-cf00-4ec4-990d-b0bf419de285" CreationDate="2011-04-16T14:54:35.067" UserId="5423" Text="&lt;opengl&gt;&lt;2d&gt;&lt;java&gt;&lt;collision-detection&gt;&lt;movement&gt;" />
  <row Id="23854" PostHistoryTypeId="5" PostId="11204" RevisionGUID="5194861b-03c5-4f49-b06a-f391d16cb0d6" CreationDate="2011-04-16T15:01:19.743" UserId="5423" Comment="deleted 32 characters in body" Text="I'm having some troubles with a 2D platformer type game (there's more to it, but that's all that matters for this question). I had collision with the platforms working fine, but if the character hit the side of the platform, they would be automatically be placed on top of the platform. This is bad, for obvious reasons. I want the player to hit the side and fall, like one would expect. So what I'm trying to do is simply keep track of the previous position of the player, and if the player's bounding box overlaps the platform's bounding box, move the player back to their previous position. The problem is, when the player is on the platform, they cannot move left or right. They can jump, they can move while they're in the air, and their falls are stopped by the platforms. I just can't figure out why they won't move anymore. Here's some relevant code:&#xD;&#xA;&#xD;&#xA;    // previous position is stored&#xD;&#xA;    previousPos = new Vector2(playerPosition.x, playerPosition.y);&#xD;&#xA;&#xD;&#xA;    ....&#xD;&#xA;    // game checks input and calculates next position and&#xD;&#xA;    // stores it in playerPosition. only changes the Vector2&#xD;&#xA;    // playerPosition, does not display the change via the sprite yet,&#xD;&#xA;    // so it doesn't look like it's stuttering to the player&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;    if (!isJumping) {&#xD;&#xA;    	// loop through the platform list&#xD;&#xA;    	for (Platform platform : platformList) {&#xD;&#xA;    		// if the player is touching a platform, then they are on a platform&#xD;&#xA;    		// and they are not falling&#xD;&#xA;    		if (platform.getBoundingBox().contains(playerBoundingBox)) {&#xD;&#xA;    			playerPosition = new Vector2(previousPos.x, previousPos.y);&#xD;&#xA;    			boundingBoxPositionLower = new Vector3(playerPosition.x, playerPosition.y, 0);&#xD;&#xA;    			boundingBoxPositionUpper = new Vector3(playerPosition.x+playerSprite.getWidth(), playerPosition.y+playerSprite.getHeight(), 0);&#xD;&#xA;    			playerBoundingBox.set(boundingBoxPositionLower, boundingBoxPositionUpper);&#xD;&#xA;    			isOnPlatform = true;&#xD;&#xA;    			isFalling = false;&#xD;&#xA;    			playerDirection.y = 0;&#xD;&#xA;    			break;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm not sure where to go from here. Maybe ideas on how to debug? Or maybe it's just a simple problem I'm overlooking. If you need any other code snippets, let me know.&#xD;&#xA;&#xD;&#xA;Thanks guys!&#xD;&#xA;&#xD;&#xA;PS - Sorry I don't follow the 80 characters per line standard, it all fits on my 1080p monitor fine in my IDE :P ." />
  <row Id="23855" PostHistoryTypeId="25" PostId="11204" RevisionGUID="07bf17ab-4997-43f9-8012-48f4362dd3a4" CreationDate="2011-04-16T15:09:27.450" Comment="http://twitter.com/#!/StackGameDev/status/59272196522123264" />
  <row Id="23856" PostHistoryTypeId="2" PostId="11205" RevisionGUID="5ce78346-cb76-4101-8a49-7b6c745ea301" CreationDate="2011-04-16T16:12:46.977" UserId="1562" Text="For starters, Beyond3D has a [nice little Writeup][1] of some technical tidbits gathered throughout an interview with Splash Damage's Technical Director Arnout van Meer as well as Senior Graphics Programmer Mike Armstrong. This same article specifically cites some [disadvantages about MegaTexturing][2] in its then current iteration on page 5. It hints at John Carmack having already fixed some of them in a later revision as well as at ways to fix some others that were not viable at the time.&#xD;&#xA;&#xD;&#xA;Notable examples are:&#xD;&#xA;&#xD;&#xA; - Sniper Rifle zoom won't stream in higher quality mip maps for displayed tiles&#xD;&#xA; - Not possible with arbitrary geometry&#xD;&#xA;&#xD;&#xA;Also, in [this interview][3] John Carmack states that some of the shortcomings of the technology used in Quake Wars have already been fixed in internal builds - for instance applying MegaTextures to arbitrary geometry including characters and vehicles.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.beyond3d.com/content/articles/95/1&#xD;&#xA;  [2]: http://www.beyond3d.com/content/articles/95/5&#xD;&#xA;  [3]: http://www.team5150.com/~andrew/carmack/johnc_interview_2006_MegaTexture_QandA.html" />
  <row Id="23857" PostHistoryTypeId="5" PostId="11186" RevisionGUID="edf4b10d-86df-4707-97f0-33817d51222e" CreationDate="2011-04-16T16:54:33.120" UserId="6622" Comment="added 111 characters in body" Text="First you should choose your programming language. &#xD;&#xA;&#xD;&#xA;I can recommend **Java**, not only because of it's ease, or **C++**. You should choose the language, which is most familiar for you. Don't worry about performance. Java and C++ are extremely performant, if you keep some performance rules.   &#xD;&#xA;I like java more so I use it. I can't recommend engines in C++, because I have no experience there. &#xD;&#xA;&#xD;&#xA;For learning drawing and other basics I would start with java2D or the equivalent C++ engine. This way you understand the basics of game development such as the main loop, rendering and input. These tasks are normally taken by the game engine.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Open Source Game Engines in Java:  &#xD;&#xA;&#xD;&#xA;**2D:**  &#xD;&#xA;&lt;a href=&quot;http://code.google.com/p/libgdx/&quot;&gt;*libGDX*&lt;/a&gt; - nice and fast library for developing games simultaneously for PC and android   &#xD;&#xA;&lt;a href=&quot;http://slick.cokeandcode.com/&quot;&gt;*Slick*&lt;/a&gt; - Also good and easy to learn   &#xD;&#xA;*Java2D* - built in java 2d graphics engine&#xD;&#xA;&#xD;&#xA;**3D:**  &#xD;&#xA;&lt;a href=&quot;http://jmonkeyengine.com/&quot;&gt;*jMonkeyEngine*&lt;/a&gt; - famous 3d engine &#xD;&#xA;" />
  <row Id="23858" PostHistoryTypeId="2" PostId="11206" RevisionGUID="606d05de-21b3-4396-9f05-db839f71323d" CreationDate="2011-04-16T17:15:04.267" UserId="4572" Text="For correction of entering doors, you could make the collision object for the door slightly larger than the image of the door.  This would result in the same effect proposed by Josh, but without having to calculate the proximity to the wall's collision rectangle." />
  <row Id="23859" PostHistoryTypeId="6" PostId="7305" RevisionGUID="c8fa1645-bcc7-4aa6-93be-39efe9ad7eda" CreationDate="2011-04-16T17:28:45.597" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;2d&gt;&lt;rpg&gt;&lt;movement&gt;" />
  <row Id="23860" PostHistoryTypeId="25" PostId="11201" RevisionGUID="b426fdad-aa18-415f-b4b4-466962a4d918" CreationDate="2011-04-16T18:09:27.490" Comment="http://twitter.com/#!/StackGameDev/status/59317495596728320" />
  <row Id="23861" PostHistoryTypeId="2" PostId="11207" RevisionGUID="30ed119d-2eee-452e-9827-55907b69a94b" CreationDate="2011-04-16T18:56:29.087" UserId="6732" Text="I have just installed XNA for VB2008 professional, now i try to run my first game development and i get this error,&#xD;&#xA;&#xD;&#xA;any way around this, am using windows xp sp3&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/iFj7V.png&#xD;&#xA;&#xD;&#xA;my system configuration&#xD;&#xA;&#xD;&#xA;    Host Name:                 USER-PC&#xD;&#xA;    OS Name:                   Microsoft Windows XP Professional&#xD;&#xA;    OS Version:                5.1.2600 Service Pack 3 Build 2600&#xD;&#xA;    OS Manufacturer:           Microsoft Corporation&#xD;&#xA;    OS Configuration:          Standalone Workstation&#xD;&#xA;    OS Build Type:             Uniprocessor Free&#xD;&#xA;    Registered Owner:          user&#xD;&#xA;    Registered Organization:   user-pc&#xD;&#xA;    Product ID:                55274-640-1011873-23081&#xD;&#xA;    Original Install Date:     1/26/2011, 7:00:52 PM&#xD;&#xA;    System Up Time:            0 Days, 10 Hours, 31 Minutes, 22 Seconds&#xD;&#xA;    System Manufacturer:       Hewlett-Packard&#xD;&#xA;    System Model:              HP d330 uT(DC579AV)&#xD;&#xA;    System type:               X86-based PC&#xD;&#xA;    Processor(s):              1 Processor(s) Installed.&#xD;&#xA;                               [01]: x86 Family 15 Model 2 Stepping 9 GenuineIntel ~&#xD;&#xA;    2593 Mhz&#xD;&#xA;    BIOS Version:              COMPAQ - 20031003&#xD;&#xA;    Windows Directory:         C:\WINDOWS&#xD;&#xA;    System Directory:          C:\WINDOWS\system32&#xD;&#xA;    Boot Device:               \Device\HarddiskVolume1&#xD;&#xA;    System Locale:             en-us;English (United States)&#xD;&#xA;    Input Locale:              en-us;English (United States)&#xD;&#xA;    Time Zone:                 N/A&#xD;&#xA;    Total Physical Memory:     1,527 MB&#xD;&#xA;    Available Physical Memory: 689 MB&#xD;&#xA;    Virtual Memory: Max Size:  2,048 MB&#xD;&#xA;    Virtual Memory: Available: 2,008 MB&#xD;&#xA;    Virtual Memory: In Use:    40 MB&#xD;&#xA;    Page File Location(s):     C:\pagefile.sys&#xD;&#xA;    Domain:                    WORKGROUP&#xD;&#xA;    Logon Server:              \\USER-PC&#xD;&#xA;    Hotfix(s):                 10 Hotfix(s) Installed." />
  <row Id="23862" PostHistoryTypeId="1" PostId="11207" RevisionGUID="30ed119d-2eee-452e-9827-55907b69a94b" CreationDate="2011-04-16T18:56:29.087" UserId="6732" Text="pixel shader and vertex shader problem in visual studio 2008" />
  <row Id="23863" PostHistoryTypeId="3" PostId="11207" RevisionGUID="30ed119d-2eee-452e-9827-55907b69a94b" CreationDate="2011-04-16T18:56:29.087" UserId="6732" Text="&lt;shaders&gt;&lt;.net&gt;" />
  <row Id="23864" PostHistoryTypeId="2" PostId="11208" RevisionGUID="0cc9ac59-036b-4a6f-8f14-e7a58f3a72f2" CreationDate="2011-04-16T18:57:01.667" UserId="6173" Text="I'm currently wishing to draw up my UI for a 2d game, however I'm not so sure what the normal strategy is for creating the images for a UI. Are there any programmes which are specifically accurate for UI Design or is something like Photoshop perfectly fine?" />
  <row Id="23865" PostHistoryTypeId="1" PostId="11208" RevisionGUID="0cc9ac59-036b-4a6f-8f14-e7a58f3a72f2" CreationDate="2011-04-16T18:57:01.667" UserId="6173" Text="How does one accurately design a UI?" />
  <row Id="23866" PostHistoryTypeId="3" PostId="11208" RevisionGUID="0cc9ac59-036b-4a6f-8f14-e7a58f3a72f2" CreationDate="2011-04-16T18:57:01.667" UserId="6173" Text="&lt;ui-design&gt;" />
  <row Id="23867" PostHistoryTypeId="2" PostId="11209" RevisionGUID="eea696a1-5b4e-4176-b215-769c365088e4" CreationDate="2011-04-16T18:59:09.020" UserId="93" Text="Frank Luna's books on DX9 and DX10 are really the only good books on Direct3D that I've seen. His DX11 book isn't due out until next year I think (it seems he had to find another publisher), but DX11 is close enough to DX10 as far as DX11 as far as basic 3d graphics goes. &#xD;&#xA;&#xD;&#xA;The only thing I'll say is that the title is a little bit misleading because there's no actual game programming in there - it is purely a graphics programming book." />
  <row Id="23869" PostHistoryTypeId="2" PostId="11211" RevisionGUID="f3c829ce-bebc-435c-ba68-e36acd6acabc" CreationDate="2011-04-16T19:18:56.140" UserId="51" Text="Doing a quick google search on your PC model number led me to this page: http://h18000.www1.hp.com/products/quickspecs/11647_na/11647_na.html&#xD;&#xA;&#xD;&#xA;The important bit is this:&#xD;&#xA;&gt; Intel 865G chipset with Integrated Intel Extreme Graphics 2&#xD;&#xA;&#xD;&#xA;Which, according to a few sources I found, seems to not support shaders.&#xD;&#xA;&#xD;&#xA;You need a new graphics card." />
  <row Id="23870" PostHistoryTypeId="2" PostId="11212" RevisionGUID="6b3f847b-7bbc-485b-9d17-5e76e1bc5067" CreationDate="2011-04-16T19:24:53.513" UserId="6729" Text="You can use any graphics tool you are comfortable with. &#xD;&#xA;I'm not sure what you mean by &quot;Accurate for UI Design&quot;. Besides, are you talking about animations or single images?&#xD;&#xA;&#xD;&#xA;I'll assume you are talking about animations. I'm not an artist. But the simple rule is if you made the first image in an animation sequence 50x50 pixels, then the remaining images of the sequence should also be 50x50 pixels. Should and not a must. but it will make the programming issues easier.&#xD;&#xA;&#xD;&#xA;Accuracy comes from you." />
  <row Id="23871" PostHistoryTypeId="2" PostId="11213" RevisionGUID="eb15c76d-c6e5-4771-bc77-f1670b9f3a1f" CreationDate="2011-04-16T19:42:40.980" UserId="6729" Text="Check this site for a long list of libraries. The best thing is that these libraries are categorized under Physcis, AI, GUI, Networking .... &#xD;&#xA;&#xD;&#xA;http://gpwiki.org/index.php/Libraries &#xD;&#xA;&#xD;&#xA;He provides descriptions and sometimes examples or at least from where you can get the library.&#xD;&#xA;&#xD;&#xA;Also, you can check this for free open source libraries&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://www.thefreecountry.com/sourcecode/games.shtml" />
  <row Id="23872" PostHistoryTypeId="2" PostId="11214" RevisionGUID="4acd6e93-e10e-4397-b8e2-34ef8714cb84" CreationDate="2011-04-16T20:31:13.790" UserId="6655" Text="I guess the 2D &quot;curve&quot; is given as a polyline with `oldVertex` vertices. Rotating the curve around an axis should result in appropriate 3D vertices where each old vertex creates a loop of new vertices given an angle-step.&#xD;&#xA;&#xD;&#xA;The other possibility I imaging is rotating given 3D vertices according to their x/y components, ignoring z. That would involve some dot- and crossproducts but you example code doesn't make a lot of sense in that case.&#xD;&#xA;&#xD;&#xA;Are you sure you got all those x/y/z parts right?" />
  <row Id="23874" PostHistoryTypeId="25" PostId="11207" RevisionGUID="928a3409-c65e-44c7-856e-6f4ae6138938" CreationDate="2011-04-16T21:09:27.693" Comment="http://twitter.com/#!/StackGameDev/status/59362794117677056" />
  <row Id="23875" PostHistoryTypeId="2" PostId="11215" RevisionGUID="1c2ee630-77b8-4b42-8fc9-57ca4c3f0e03" CreationDate="2011-04-16T21:21:55.297" UserId="3505" Text="You really just got to do the inverse for side collisions, go back to the old X and let the Y go on to continue the fall. Beware of corners where you hit two different blocks, there you got to make the full stop.&#xD;&#xA;&#xD;&#xA;And by the way, ideally you shouldn't move all the way back to the old position, but just far enough that you don't collide." />
  <row Id="23876" PostHistoryTypeId="25" PostId="11208" RevisionGUID="38dfd3c9-1a11-4563-aefe-983cb3b0df2c" CreationDate="2011-04-17T00:09:27.483" Comment="http://twitter.com/#!/StackGameDev/status/59408092181438464" />
  <row Id="23877" PostHistoryTypeId="5" PostId="11193" RevisionGUID="70d2cbe4-5611-40f1-a098-516e56e076c2" CreationDate="2011-04-17T00:40:02.437" UserId="3794" Comment="added 106 characters in body; edited tags" Text="&gt; Possible duplicate: http://gamedev.stackexchange.com/questions/3003/best-technology-for-online-games&#xD;&#xA;&#xD;&#xA;I have agreed to show my child how to develop software. He wants me to help him develop a game.&#xD;&#xA;&#xD;&#xA;**If you were me then what approach would you take to develop an old school game?** &#xD;&#xA;&#xD;&#xA;I was thinking about an old school game that you can pick up and play them straight away, where there is no &quot;learning curve&quot;. This is because we prefer playing these types of games. On top of that I want to be able to say things like &quot;I made the game engine, the AI, he did the scoring system and .. and .. and ..&quot;. &#xD;&#xA;&#xD;&#xA;I intend to run it in a browser, to target a broad range of platforms. I was thinking to use mainly C# and Silverlight.&#xD;&#xA;&#xD;&#xA;So, if you were me then what approach would you take to develop an old school game? &#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Could I use XNA? Is it free? Does it plug into Visual Studio 2010?&#xD;&#xA;" />
  <row Id="23878" PostHistoryTypeId="6" PostId="11193" RevisionGUID="70d2cbe4-5611-40f1-a098-516e56e076c2" CreationDate="2011-04-17T00:40:02.437" UserId="3794" Comment="added 106 characters in body; edited tags" Text="&lt;c#&gt;&lt;web&gt;" />
  <row Id="23879" PostHistoryTypeId="2" PostId="11216" RevisionGUID="b535f84b-b31d-4680-af29-0d5a012ffc51" CreationDate="2011-04-17T01:50:52.130" UserId="6558" Text="Something like photoshop would be perfectly fine for creating UI images.&#xD;&#xA;&#xD;&#xA;As for accuracy, I'm wondering what you mean.  If it means &quot;I want my GUI to fit over my game screen&quot;, then simply take a screenshot of your game, and use that as the bottom layer in photoshop.  If accuracy means &quot;I want the GUI to look like the default (Windows/Mac/Linux/iDevice) GUI&quot;, then you can either use native OS calls, a GUI library, get art from the internet, or draw the assets yourself." />
  <row Id="23880" PostHistoryTypeId="2" PostId="11217" RevisionGUID="616d328b-f5b7-4eb4-8325-8635774194f3" CreationDate="2011-04-17T02:13:59.290" UserId="1705" Text="I'm currently dealing with a multiplayer combat system where the damage dealt by the players is always multiplied by a random factor between 0.8 and 1.2.&#xD;&#xA;&#xD;&#xA;In theory, a truly random RNG may eventually yield the same number many times (see the [Tetris dilemma][1]). This could result in a match where player is *always* making very high damage while the other always makes very low damage.&#xD;&#xA;&#xD;&#xA;What can I do to make sure this doesn't happen? Are some RNGs better than others at avoiding repetition?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tetris#Possibility_of_indefinite_gameplay" />
  <row Id="23881" PostHistoryTypeId="1" PostId="11217" RevisionGUID="616d328b-f5b7-4eb4-8325-8635774194f3" CreationDate="2011-04-17T02:13:59.290" UserId="1705" Text="Avoiding repetition in RNGs" />
  <row Id="23882" PostHistoryTypeId="3" PostId="11217" RevisionGUID="616d328b-f5b7-4eb4-8325-8635774194f3" CreationDate="2011-04-17T02:13:59.290" UserId="1705" Text="&lt;algorithm&gt;&lt;multiplayer&gt;&lt;random&gt;" />
  <row Id="23883" PostHistoryTypeId="2" PostId="11218" RevisionGUID="b171229f-adfd-4b96-a6e7-5bf0c11fb9d6" CreationDate="2011-04-17T02:19:58.537" UserId="395" Text="What you are asking for is actually the opposite of most PRNGs, a non-linear distribution. Just put in some kind of diminishing returns logic in your rules, Assuming that everything over 1.0x is a &quot;critical hit&quot; of some kind, just say that each round your chances of getting a crit go up by X, until you get one at which point they reset to Y. You then do two rolls each round, one to determine crit or not, and then another for the actual magnitude." />
  <row Id="23884" PostHistoryTypeId="2" PostId="11219" RevisionGUID="31cb9251-a0b6-4232-b8a5-6e1b836c66d5" CreationDate="2011-04-17T02:20:00.473" UserId="3830" Text="Reseed frequently with the current time or some other unique value.  And let players mark up streaks to just being bad luck (or good).  You get streaks rolling dice or playing cards after all.  " />
  <row Id="23885" PostHistoryTypeId="2" PostId="11220" RevisionGUID="c940ed9e-db62-43a6-9967-504a8ad60a6a" CreationDate="2011-04-17T02:50:25.187" UserId="6779" Text="I'm one of the devs behind [WTactics.org][1] and would of course recommend our project over Forge as it's open, while the other is written to play Magic: The gathering against an A.I. &#xD;&#xA;&#xD;&#xA;Art wise we have plenty and more to come since we hire artist(s). Code wise we have plenty of things cooking, like for example local client, a browser based version and card also online development tools. &#xD;&#xA;&#xD;&#xA;Personally I wouldn't ever recommend anyone to play a CCG on a small mobile device, but I guess that's just my own preferences.&#xD;&#xA;&#xD;&#xA;Anyways, a safe bet would be Wagic, if you, again, don't care much about it being a MtG centric AI. The good thing with it is that it even runs on a PSP, which I think is already more mobile than *perhaps* Forge is.&#xD;&#xA;&#xD;&#xA;With regards&#xD;&#xA;/snowdrop&#xD;&#xA;&#xD;&#xA;  [1]: http://WTactics.org" />
  <row Id="23886" PostHistoryTypeId="25" PostId="11217" RevisionGUID="3f1f13cd-c7ef-496b-a0d9-7bc23c4d5b4b" CreationDate="2011-04-17T03:09:27.510" Comment="http://twitter.com/#!/StackGameDev/status/59453391260225536" />
  <row Id="23887" PostHistoryTypeId="2" PostId="11221" RevisionGUID="4c627d8b-9061-48cc-b472-563c22e9b25d" CreationDate="2011-04-17T04:00:45.377" UserId="6781" Text="Ok, here is my code: &#xD;&#xA; &#xD;&#xA;class Player  &#xD;&#xA;{  &#xD;&#xA;public:  &#xD;&#xA;	Player(void);  &#xD;&#xA;	~Player(void);  &#xD;&#xA;&#xD;&#xA;	void Create;&#xD;&#xA;	void Render;&#xD;&#xA;	int Health, maxHealth;&#xD;&#xA;	void Run(bool isRun);&#xD;&#xA;	void Walk(bool isWalk);&#xD;&#xA;	void Crouch(bool isCrouch);&#xD;&#xA;	void Die(bool isDead, canDie);&#xD;&#xA;&#xD;&#xA;private:&#xD;&#xA;&#xD;&#xA;	string Name;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Would this work? I am afraid I set up incorrectly!" />
  <row Id="23888" PostHistoryTypeId="1" PostId="11221" RevisionGUID="4c627d8b-9061-48cc-b472-563c22e9b25d" CreationDate="2011-04-17T04:00:45.377" UserId="6781" Text="Would this header work?" />
  <row Id="23889" PostHistoryTypeId="3" PostId="11221" RevisionGUID="4c627d8b-9061-48cc-b472-563c22e9b25d" CreationDate="2011-04-17T04:00:45.377" UserId="6781" Text="&lt;game-mechanics&gt;" />
  <row Id="23890" PostHistoryTypeId="2" PostId="11222" RevisionGUID="3f1181e8-c98f-40e6-a369-b5eae67a620b" CreationDate="2011-04-17T05:12:17.777" UserId="2029" Text="As long as you wrote the member functions correctly and you don't get any compiler errors, yes, it should work. You also want to make sure to use #ifndef, #define, and #endif so you don't include multiple headers.&#xD;&#xA;&#xD;&#xA;You should also make variables like health and maxHealth are private members." />
  <row Id="23891" PostHistoryTypeId="2" PostId="11223" RevisionGUID="66e51f78-75ad-4b04-a468-503b93044896" CreationDate="2011-04-17T05:52:54.067" UserId="27" Text="That code should work fine.&#xD;&#xA;&#xD;&#xA;Add include guards: http://en.wikipedia.org/wiki/Include_guard&#xD;&#xA;&#xD;&#xA;Also, give the canDie paramter in Die a type." />
  <row Id="23892" PostHistoryTypeId="25" PostId="10999" RevisionGUID="37f3032b-889d-4497-a247-0d60cf87e1fe" CreationDate="2011-04-17T06:09:27.640" Comment="http://twitter.com/#!/StackGameDev/status/59498688447393793" />
  <row Id="23893" PostHistoryTypeId="2" PostId="11224" RevisionGUID="dbb19bc8-a7b4-4c5f-98f2-b8f26f0ed63a" CreationDate="2011-04-17T06:55:50.297" UserId="6188" Text="This is the first time I'm trying to make a 2D game, so I'm having quite a few difficulties in getting things right. Right now I'm trying to figure out exactly how the entity state machine should work.&#xD;&#xA;&#xD;&#xA;**1. I noticed entity states are... well, stateless.** Basically, they just act on the data in the entity accordingly, they hold no data of their own. When an entity forwards events to its states it does it like this:&#xD;&#xA;&#xD;&#xA;    void Entity::handleEvent(const Event&amp; event)&#xD;&#xA;    {&#xD;&#xA;         // We pass this to the state so it could act upon the data in&#xD;&#xA;         // the entity in a manner appropriate for the given event.&#xD;&#xA;         state_-&gt;handleEvent(event, this);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That means that I don't really ever need more than one instance of a particular entity state; doing something like `entity.setState(new StandState)` is therefore highly wasteful. Then again, making each entity state a singleton hardly seems appropriate. What do you suggest I do?&#xD;&#xA;&#xD;&#xA;(_The same can be said about game states, so whatever the solution to this is, I guess it can be applied to game states as well._)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**2. The state of the entity sprite.** Most of the time, whenever the state of the entity changes, the sprite that is used to represent it must change as well. How should the entity representation be notified of the change in state?&#xD;&#xA;&#xD;&#xA;Then again, should it be notified at all? It seem that if the representation needs to be made aware the entity has changed, then it (the representation) starts having an internal state. I would much rather have it stateless so that I require only one instance of every representation (just as before). &#xD;&#xA;" />
  <row Id="23894" PostHistoryTypeId="1" PostId="11224" RevisionGUID="dbb19bc8-a7b4-4c5f-98f2-b8f26f0ed63a" CreationDate="2011-04-17T06:55:50.297" UserId="6188" Text="A few questions about entity states" />
  <row Id="23895" PostHistoryTypeId="3" PostId="11224" RevisionGUID="dbb19bc8-a7b4-4c5f-98f2-b8f26f0ed63a" CreationDate="2011-04-17T06:55:50.297" UserId="6188" Text="&lt;c++&gt;&lt;state&gt;&lt;entity-system&gt;" />
  <row Id="23896" PostHistoryTypeId="5" PostId="11203" RevisionGUID="c0132c29-ebe3-4709-ac82-f4c3d9cee7f9" CreationDate="2011-04-17T07:12:55.073" UserId="3132" Comment="source added" Text="average mmo  - Allods Online. The biggest Russian mmo but still average in the whole world scene.&#xD;&#xA;&#xD;&#xA;development - approx 15 mln $ for three years of development&#xD;&#xA;&#xD;&#xA;support after release day - 400k$ per month&#xD;&#xA;&#xD;&#xA;income if you are lucky - 1.5-2mln$/month" />
  <row Id="23897" PostHistoryTypeId="2" PostId="11225" RevisionGUID="810a2615-fe21-4246-8c69-a0d308ee9600" CreationDate="2011-04-17T07:45:12.043" UserId="5259" Text="Well, for the first one, you could just make a state that has a static public member function handleMessage(), and then you don't really need to define any internal data. That would make states exceedingly cheap to allocate, as they would basically just be wrapped function pointers. For that matter, you could just have a global array of function pointers for those states (very C-ish way of handling this issue).&#xD;&#xA;&#xD;&#xA;As for the second, it sounds like you have things backwards: the *entity* should notify the *sprite*, not the other way around. So, just have a setAnimationFrame() or whatever function exposed by the sprite, and let the entity call that as needed." />
  <row Id="23898" PostHistoryTypeId="5" PostId="11221" RevisionGUID="e6f6de68-df18-4532-a0e3-591d4290f5a1" CreationDate="2011-04-17T07:59:40.977" UserId="2698" Comment="Proper indenting" Text="Ok, here is my code: &#xD;&#xA; &#xD;&#xA;    class Player  &#xD;&#xA;    {  &#xD;&#xA;    public:  &#xD;&#xA;    	Player(void);  &#xD;&#xA;    	~Player(void);  &#xD;&#xA;    &#xD;&#xA;    	void Create;&#xD;&#xA;    	void Render;&#xD;&#xA;    	int Health, maxHealth;&#xD;&#xA;    	void Run(bool isRun);&#xD;&#xA;    	void Walk(bool isWalk);&#xD;&#xA;    	void Crouch(bool isCrouch);&#xD;&#xA;    	void Die(bool isDead, canDie);&#xD;&#xA;    &#xD;&#xA;    private:&#xD;&#xA;    &#xD;&#xA;    	string Name;&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Would this work? I am afraid I set up incorrectly!" />
  <row Id="23899" PostHistoryTypeId="24" PostId="11221" RevisionGUID="e6f6de68-df18-4532-a0e3-591d4290f5a1" CreationDate="2011-04-17T07:59:40.977" Comment="Proposed by 2698 approved by 1156 edit id of 324" />
  <row Id="23900" PostHistoryTypeId="2" PostId="11226" RevisionGUID="dd3ec979-ca36-4745-ad70-a4dc96016555" CreationDate="2011-04-17T08:05:30.160" UserId="1156" Text="    Player(void);  &#xD;&#xA;    ~Player(void);  &#xD;&#xA;&#xD;&#xA;You don't really need `void` as parameters. You can just leave them blank (I feel VS auto-generated this for you).&#xD;&#xA;&#xD;&#xA;    void Create;&#xD;&#xA;    void Render;&#xD;&#xA;&#xD;&#xA;You can't declare `void` objects, so you're missing some parantheses in your functions here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    int Health, maxHealth;&#xD;&#xA;&#xD;&#xA;I would keep to a single naming convention. Either have all variables `Uppercase` or all `pascalCase`.&#xD;&#xA;&#xD;&#xA;    void Run(bool isRun);&#xD;&#xA;    void Walk(bool isWalk);&#xD;&#xA;    void Crouch(bool isCrouch);&#xD;&#xA;&#xD;&#xA;These seem ok, though I don't see why you can't have something like:&#xD;&#xA;&#xD;&#xA;`void SetMovementState(int blah);`&#xD;&#xA;&#xD;&#xA;and then:&#xD;&#xA;&#xD;&#xA;    const int WALK = 0;&#xD;&#xA;    const int RUN = 1;&#xD;&#xA;    const int CROUCH = 2;&#xD;&#xA;&#xD;&#xA;Though this is personal preference mostly.&#xD;&#xA;&#xD;&#xA;    void Die(bool isDead, canDie);&#xD;&#xA;&#xD;&#xA;You're missing a type on `canDie`. &#xD;&#xA;&#xD;&#xA;    private:&#xD;&#xA;&#xD;&#xA;    string Name;&#xD;&#xA;You're either missing out a 'using namespace std;' which is VERY BAD in a header, or you're missing out `std` from string.&#xD;&#xA;&#xD;&#xA;Finally, you need some kind of header guard. Either the older &#xD;&#xA;&#xD;&#xA;    #ifndef FILENAME_H&#xD;&#xA;    #define FILENAME_H&#xD;&#xA;    &#xD;&#xA;    //code&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;&#xD;&#xA;or the newer, less effort:&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23901" PostHistoryTypeId="6" PostId="11221" RevisionGUID="873ae594-c838-46c9-b47d-b8fc8c1589ef" CreationDate="2011-04-17T08:05:55.293" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;" />
  <row Id="23902" PostHistoryTypeId="5" PostId="11201" RevisionGUID="e6f1ec06-4994-4f86-b68f-9851ce3cd0d3" CreationDate="2011-04-17T08:07:20.643" UserId="1156" Comment="deleted 2 characters in body" Text="&#xD;&#xA;I have to use this function to get a Surface of Revolution (homework).&#xD;&#xA;&#xD;&#xA;    newVertex = (oldVertex.y, someFunc1(oldVertex.x, oldVertex.y), someFunc2(oldVertex.x, oldVertex.y));&#xD;&#xA;&#xD;&#xA;As far as I know (FIXME) Surface of Revolution means rotations of a (2D)curve around an axis in 3D.&#xD;&#xA;But this vertex computing gives a 3D plane (FIXME again :D), so rotation of this isn't&#xD;&#xA;obvious.&#xD;&#xA;&#xD;&#xA;Am I misunderstanding something?" />
  <row Id="23903" PostHistoryTypeId="5" PostId="11224" RevisionGUID="15937fc8-a8fe-4ad4-b1df-1caf48067c31" CreationDate="2011-04-17T08:11:30.123" UserId="6188" Comment="added 867 characters in body" Text="This is the first time I'm trying to make a 2D game, so I'm having quite a few difficulties in getting things right. Right now I'm trying to figure out exactly how the entity state machine should work.&#xD;&#xA;&#xD;&#xA;**1. I noticed entity states are... well, stateless.** Basically, they just act on the data in the entity accordingly, they hold no data of their own. When an entity forwards events to its states it does it like this:&#xD;&#xA;&#xD;&#xA;    void Entity::handleEvent(const Event&amp; event)&#xD;&#xA;    {&#xD;&#xA;         // We pass this to the state so it could act upon the data in&#xD;&#xA;         // the entity in a manner appropriate for the given event.&#xD;&#xA;         state_-&gt;handleEvent(event, this);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;That means that I don't really ever need more than one instance of a particular entity state; doing something like `entity.setState(new StandState)` is therefore highly wasteful. Then again, making each entity state a singleton hardly seems appropriate. What do you suggest I do?&#xD;&#xA;&#xD;&#xA;(_The same can be said about game states, so whatever the solution to this is, I guess it can be applied to game states as well._)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**2. The state of the entity sprite.** Most of the time, whenever the state of the entity changes, the sprite that is used to represent it must change as well. How should the entity representation be notified of the change in state?&#xD;&#xA;&#xD;&#xA;Then again, should it be notified at all? It seem that if the representation needs to be made aware the entity has changed, then it (the representation) starts having an internal state. I would much rather have it stateless so that I require only one instance of every representation (just as before). &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;**Edit:** How the Entity and its sprite interact in my current setup.&#xD;&#xA;&#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;      public:&#xD;&#xA;        void handleEvent(const Event&amp; event);&#xD;&#xA;        void render(Surface* surf, unsigned long currentTime);&#xD;&#xA;        // void update(unsigned long currentTime);&#xD;&#xA;        &#xD;&#xA;      private:&#xD;&#xA;        // The representation holds the actual sprite.&#xD;&#xA;        EntityRepresentation* representation_;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    void Entity::handleEvent(const Event&amp; event)&#xD;&#xA;    {&#xD;&#xA;        // The representation changes its internal state depending on the event.&#xD;&#xA;        // This means a representation can only be used for a specific entity,&#xD;&#xA;        // and thus may be wasteful.&#xD;&#xA;        representation_-&gt;handleEvent(event);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void Entity::render(Surface* surf, unsigned long currentTime)&#xD;&#xA;    {&#xD;&#xA;        representation_-&gt;render(surf, currentTime);&#xD;&#xA;    }" />
  <row Id="23904" PostHistoryTypeId="2" PostId="11227" RevisionGUID="69ceda2b-d22e-474f-ac22-71d30b1c69ad" CreationDate="2011-04-17T08:44:22.953" UserId="744" Text="You can solve it the same way Tetris does, by making a preset list of damage results and shuffling.&#xD;&#xA;&#xD;&#xA;Let's say you know the player is going to deal 0.8x to 1.2x damage with a linear distribution. Take the list [0.8, 0.9, 1.0, 1.1, 1.2]. &lt;a href=&quot;http://en.wikipedia.org/wiki/Fisher-Yates_Shuffle&quot;&gt;Shuffle it randomly&lt;/a&gt;, so you get e.g. [1.2, 1.0, 0.8, 0.9, 1.1].&#xD;&#xA;&#xD;&#xA;The first time the player deals damage, they deal 1.2x. Then 1x. Then, etc, to 1.1x. _Only when the array is empty_ should you generate and shuffle a new array.&#xD;&#xA;&#xD;&#xA;In practice, you'll probably want do this to 4+ arrays at once (e.g. start with [0.8,0.8,0.8,0.8,0.9,0.9,0.9,0.9,...]). Otherwise the period of the sequence is low enough that players can figure out whether their next hit is &quot;good&quot; or not. (Although that can also add more strategy to the combat, as in &lt;a href=&quot;http://www.gamefaqs.com/boards/937281-dragon-quest-ix-sentinels-of-the-starry-skies/55948750&quot;&gt;Dragon Quest IX's Hoemi table&lt;/a&gt;, which people figured out how to probe by looking at healing numbers and tweak until you're guaranteed a rare drop.)" />
  <row Id="23905" PostHistoryTypeId="4" PostId="11217" RevisionGUID="5acff45a-1c92-4744-91dc-f8c95a61c2af" CreationDate="2011-04-17T08:51:17.453" UserId="744" Comment="edited title" Text="How do I avoid &quot;too&quot; lucky / unlucky streaks in random number generation?" />
  <row Id="23906" PostHistoryTypeId="25" PostId="11224" RevisionGUID="ff76f50e-3e71-45a9-82e2-a69ed19f93d6" CreationDate="2011-04-17T09:09:27.463" Comment="http://twitter.com/#!/StackGameDev/status/59543987442294784" />
  <row Id="23907" PostHistoryTypeId="2" PostId="11228" RevisionGUID="643cb76f-ace9-4eb6-b735-761ed300954f" CreationDate="2011-04-17T09:17:45.190" UserId="2933" Text="I'm working on an input system (in C#) and now I'm wondering, what is the best place to put input functionality?&#xD;&#xA;&#xD;&#xA;Currently what I was coding was a bunch of delegates which act as callbacks (i.e. onkeypress, onmouseclick, etc) and the idea is when the input manager checks for input it invokes these delegaetes.&#xD;&#xA;&#xD;&#xA;However this means that input is updated when the input manager updates and not when a game class has its own update function called.&#xD;&#xA;&#xD;&#xA;The way I see it is moving input functionality out of a classes update function and deferring them would forecefully reduce the codes complexity (particularly the update function) but on the other hand I'm thinking it might be a better idea to move update and input to the same place as it would give the coder more freedom to work with the input systems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyone have any ideas on this matter?" />
  <row Id="23908" PostHistoryTypeId="1" PostId="11228" RevisionGUID="643cb76f-ace9-4eb6-b735-761ed300954f" CreationDate="2011-04-17T09:17:45.190" UserId="2933" Text="Where should input be used?" />
  <row Id="23909" PostHistoryTypeId="3" PostId="11228" RevisionGUID="643cb76f-ace9-4eb6-b735-761ed300954f" CreationDate="2011-04-17T09:17:45.190" UserId="2933" Text="&lt;game-design&gt;&lt;c#&gt;&lt;architecture&gt;&lt;input&gt;" />
  <row Id="23910" PostHistoryTypeId="2" PostId="11229" RevisionGUID="4c2d0f0d-9784-4bf8-b706-79cec6afc4c9" CreationDate="2011-04-17T09:54:53.217" UserId="4410" Text="I'd recommend a good clear separation of input and the rest of your game. I'd also recommend a layer that allows you to map different inputs onto different results (i.e. press key A maps to Left, S to Right). If you tightly couple the game with the input you won't easily be able to handle people remapping keys to suit their tastes, you also would have trouble adapting to maybe using a controller (i.e. 360 pad) instead of the keyboard later, or even being able to use something like Kinect to control input with enough abstraction.&#xD;&#xA;&#xD;&#xA;In a driving game for example, I would have something that parses the current input state from the device currently in use (i.e. keyboard, pad, wheel, etc) and use the values I retrieve to build up a structure more suitable to my specific need, i.e. turn the values I parse into a steering value, an accelerator pedal, a brake pedal, etc. This structure could then be passed around to systems without having to worry about what input method had generated these values or whether they used analogue sticks, d-pad or keyboard." />
  <row Id="23911" PostHistoryTypeId="2" PostId="11230" RevisionGUID="9304697a-263a-4549-9888-4f8ded2e6fb7" CreationDate="2011-04-17T10:14:01.133" UserId="2954" Text="I have an XML file representing different car manufactures that will be available in my game. The file looks like this:&#xD;&#xA; &#xD;&#xA;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;&#xD;&#xA;    &lt;XnaContent&gt;&#xD;&#xA;      &lt;Asset Type=&quot;List[string]&quot;&gt;&#xD;&#xA;        &lt;car&gt;Audi&lt;/car&gt;&#xD;&#xA;        &lt;car&gt;BMW&lt;/car&gt;&#xD;&#xA;        &lt;car&gt;Nissan&lt;/car&gt;&#xD;&#xA;        &lt;car&gt;Volvo&lt;/car&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;When adding it into my content folder, the compiler return this error:&#xD;&#xA;&#xD;&#xA;    There was an error while deserializing intermediate XML. Cannot find type &quot;List`1&quot;&#xD;&#xA;&#xD;&#xA;How can I create a list of strings, put it into XML and read it from XNA?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23912" PostHistoryTypeId="1" PostId="11230" RevisionGUID="9304697a-263a-4549-9888-4f8ded2e6fb7" CreationDate="2011-04-17T10:14:01.133" UserId="2954" Text="How to use XML files as content files in XNA?" />
  <row Id="23913" PostHistoryTypeId="3" PostId="11230" RevisionGUID="9304697a-263a-4549-9888-4f8ded2e6fb7" CreationDate="2011-04-17T10:14:01.133" UserId="2954" Text="&lt;xna&gt;&lt;xml&gt;" />
  <row Id="23914" PostHistoryTypeId="2" PostId="11231" RevisionGUID="7917d974-9025-44fa-ac52-74ba5f8513cf" CreationDate="2011-04-17T10:27:20.687" UserId="6786" Text="I am very new to 3d graphics and game engines and panda3d and python. I followed few panda3d tutorials and now I want to test them with few new models. High majority of 3d models in the internet are in .max format.&#xD;&#xA;&#xD;&#xA;Is there a way to convert these models to a format that can be used with panda3d. (.egg or .bam, I think). I am using linux. Thank you&#xD;&#xA;" />
  <row Id="23915" PostHistoryTypeId="1" PostId="11231" RevisionGUID="7917d974-9025-44fa-ac52-74ba5f8513cf" CreationDate="2011-04-17T10:27:20.687" UserId="6786" Text="How to convert .max files to .egg on linux" />
  <row Id="23916" PostHistoryTypeId="3" PostId="11231" RevisionGUID="7917d974-9025-44fa-ac52-74ba5f8513cf" CreationDate="2011-04-17T10:27:20.687" UserId="6786" Text="&lt;3dsmax&gt;" />
  <row Id="23917" PostHistoryTypeId="10" PostId="11221" RevisionGUID="838f412a-21e1-4518-bec9-9c7881c324fe" CreationDate="2011-04-17T10:28:47.523" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="23918" PostHistoryTypeId="2" PostId="11232" RevisionGUID="95527b94-1eaa-4ead-bbdf-60763b1cb933" CreationDate="2011-04-17T11:19:18.900" UserId="5824" Text="The only program that can reliably open .max files is 3DS Max itself. From Max you can export to something more open and portable like fbx.&#xD;&#xA;&#xD;&#xA;There's a free trial version of Max available from http://usa.autodesk.com/3ds-max/trial/?nd=1 which should do the job, although it won't run on Linux..." />
  <row Id="23919" PostHistoryTypeId="6" PostId="11231" RevisionGUID="d3c8caa2-09bf-4698-8ae0-1394023e5f10" CreationDate="2011-04-17T11:20:53.890" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;models&gt;&lt;python&gt;&lt;file-format&gt;&lt;3dsmax&gt;" />
  <row Id="23920" PostHistoryTypeId="5" PostId="11227" RevisionGUID="8dd4caa7-c24f-48b1-a807-1788b74d7341" CreationDate="2011-04-17T11:23:31.930" UserId="744" Comment="Typo." Text="You can solve it the same way Tetris does, by making a preset list of damage results and shuffling.&#xD;&#xA;&#xD;&#xA;Let's say you know the player is going to deal 0.8x to 1.2x damage with a linear distribution. Take the list [0.8, 0.9, 1.0, 1.1, 1.2]. &lt;a href=&quot;http://en.wikipedia.org/wiki/Fisher-Yates_Shuffle&quot;&gt;Shuffle it randomly&lt;/a&gt;, so you get e.g. [1.2, 1.0, 0.8, 0.9, 1.1].&#xD;&#xA;&#xD;&#xA;The first time the player deals damage, they deal 1.2x. Then 1x. Then, etc, to 1.1x. _Only when the array is empty_ should you generate and shuffle a new array.&#xD;&#xA;&#xD;&#xA;In practice, you'll probably want do this to 4+ arrays at once (e.g. start with [0.8,0.8,0.8,0.8,0.9,0.9,0.9,0.9,...]). Otherwise the period of the sequence is low enough that players can figure out whether their next hit is &quot;good&quot; or not. (Although that can also add more strategy to the combat, as in &lt;a href=&quot;http://www.gamefaqs.com/boards/937281-dragon-quest-ix-sentinels-of-the-starry-skies/55948750&quot;&gt;Dragon Quest IX's Hoimi table&lt;/a&gt;, which people figured out how to probe by looking at healing numbers and tweak until you're guaranteed a rare drop.)" />
  <row Id="23924" PostHistoryTypeId="25" PostId="11228" RevisionGUID="85db9f51-fbd3-4b53-8af3-8ff3ba5d5df5" CreationDate="2011-04-17T12:09:27.473" Comment="http://twitter.com/#!/StackGameDev/status/59589286386864128" />
  <row Id="23925" PostHistoryTypeId="2" PostId="11234" RevisionGUID="2e27ac30-a60a-492c-852a-d59371fc7311" CreationDate="2011-04-17T12:14:01.030" UserId="5275" Text="I've recently picked up a class which creates 2D Rays and detects if the ray is intersecting any bounding boxes passed through it.&#xD;&#xA;&#xD;&#xA;    public struct Ray2D&#xD;&#xA;        {&#xD;&#xA;            private Vector2 startPos;&#xD;&#xA;            private Vector2 endPos;&#xD;&#xA;            private readonly List&lt;Point&gt; result;&#xD;&#xA;    &#xD;&#xA;            public Ray2D(Vector2 startPos, Vector2 endPos)&#xD;&#xA;            {&#xD;&#xA;                this.startPos = startPos;&#xD;&#xA;                this.endPos = endPos;&#xD;&#xA;                result = new List&lt;Point&gt;();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;  &#xD;&#xA;            /// Determine if the ray intersects the rectangle  &#xD;&#xA;            /// &lt;/summary&gt;  &#xD;&#xA;            /// &lt;param name=&quot;rectangle&quot;&gt;Rectangle to check&lt;/param&gt;  &#xD;&#xA;            /// &lt;returns&gt;&lt;/returns&gt;&#xD;&#xA;            /// &#xD;&#xA;            public Vector2 Intersects(Rectangle rectangle)&#xD;&#xA;            {&#xD;&#xA;                Point p0 = new Point((int)startPos.X, (int)startPos.Y);&#xD;&#xA;                Point p1 = new Point((int)endPos.X, (int)endPos.Y);&#xD;&#xA;    &#xD;&#xA;                foreach (Point testPoint in BresenhamLine(p0, p1))&#xD;&#xA;                {&#xD;&#xA;                    if (rectangle.Contains(testPoint))&#xD;&#xA;                        return new Vector2((float)testPoint.X, (float)testPoint.Y);&#xD;&#xA;                }&#xD;&#xA;                return Vector2.Zero;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            // Swap the values of A and B  &#xD;&#xA;    &#xD;&#xA;            private void Swap&lt;T&gt;(ref T a, ref T b)&#xD;&#xA;            {&#xD;&#xA;                T c = a;&#xD;&#xA;                a = b;&#xD;&#xA;                b = c;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            // Returns the list of points from p0 to p1   &#xD;&#xA;    &#xD;&#xA;            private List&lt;Point&gt; BresenhamLine(Point p0, Point p1)&#xD;&#xA;            {&#xD;&#xA;                return BresenhamLine(p0.X, p0.Y, p1.X, p1.Y);&#xD;&#xA;            }&#xD;&#xA;     &#xD;&#xA;             // Returns the list of points from (x0, y0) to (x1, y1)  &#xD;&#xA;     &#xD;&#xA;            private List&lt;Point&gt; BresenhamLine(int x0, int y0, int x1, int y1) &#xD;&#xA;            { &#xD;&#xA;                // Optimization: it would be preferable to calculate in  &#xD;&#xA;                // advance the size of &quot;result&quot; and to use a fixed-size array  &#xD;&#xA;                // instead of a list.  &#xD;&#xA;     &#xD;&#xA;                result.Clear(); &#xD;&#xA;     &#xD;&#xA;                bool steep = Math.Abs(y1 - y0) &gt; Math.Abs(x1 - x0); &#xD;&#xA;                if (steep) &#xD;&#xA;                { &#xD;&#xA;                    Swap(ref x0, ref y0); &#xD;&#xA;                    Swap(ref x1, ref y1); &#xD;&#xA;                } &#xD;&#xA;                if (x0 &gt; x1) &#xD;&#xA;                { &#xD;&#xA;                    Swap(ref x0, ref x1); &#xD;&#xA;                    Swap(ref y0, ref y1); &#xD;&#xA;                } &#xD;&#xA;     &#xD;&#xA;                int deltax = x1 - x0; &#xD;&#xA;                int deltay = Math.Abs(y1 - y0); &#xD;&#xA;                int error = 0; &#xD;&#xA;                int ystep; &#xD;&#xA;                int y = y0; &#xD;&#xA;                if (y0 &lt; y1) ystep = 1; else ystep = -1; &#xD;&#xA;                for (int x = x0; x &lt;= x1; x++) &#xD;&#xA;                { &#xD;&#xA;                    if (steep) result.Add(new Point(y, x)); &#xD;&#xA;                    else result.Add(new Point(x, y)); &#xD;&#xA;                    error += deltay; &#xD;&#xA;                    if (2 * error &gt;= deltax) &#xD;&#xA;                    { &#xD;&#xA;                        y += ystep; &#xD;&#xA;                        error -= deltax; &#xD;&#xA;                    } &#xD;&#xA;                } &#xD;&#xA;     &#xD;&#xA;                return result; &#xD;&#xA;            } &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Based off this class I'm cycling through every tile in the level to determine if the ray  has indeed intersected with any of the boxes and then move on from there &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    camToChar = new Ray2D(lensPosition, level.Player.Position);   &#xD;&#xA;                // For each potentially colliding tile,&#xD;&#xA;                for (int y = tileMap.GetHeight(); y &lt;= tileMap.GetHeight(); ++y)&#xD;&#xA;                {&#xD;&#xA;                    for (int x = tileMap.GetWidth(); x &lt;= tileMap.GetWidth(); ++x)&#xD;&#xA;                    {&#xD;&#xA;                        TileCollision collision = Level.GetCollision(x, y, tileMap);&#xD;&#xA;                        if (collision != TileCollision.Passable)&#xD;&#xA;                        {&#xD;&#xA;                            // Determine collision depth (with direction) and magnitude.&#xD;&#xA;                            Rectangle tileBounds = Level.GetBounds(x, y);&#xD;&#xA;    &#xD;&#xA;                            Vector2 depth = camToChar.Intersects(tileBounds);&#xD;&#xA;    &#xD;&#xA;                            if (depth != Vector2.Zero)&#xD;&#xA;                            {&#xD;&#xA;                                clockwise = true;&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;The problem is that despite the fact the ray should be passing through bounding boxes, the intersect method never gives this result. I'm trying to determine if it is an issue with either the 2DRay class or the way I've constructed method to use it.&#xD;&#xA;&#xD;&#xA;Any help with this would be greatly appreciated." />
  <row Id="23926" PostHistoryTypeId="1" PostId="11234" RevisionGUID="2e27ac30-a60a-492c-852a-d59371fc7311" CreationDate="2011-04-17T12:14:01.030" UserId="5275" Text="2d Ray intersection" />
  <row Id="23927" PostHistoryTypeId="3" PostId="11234" RevisionGUID="2e27ac30-a60a-492c-852a-d59371fc7311" CreationDate="2011-04-17T12:14:01.030" UserId="5275" Text="&lt;xna&gt;" />
  <row Id="23928" PostHistoryTypeId="2" PostId="11235" RevisionGUID="5018fe81-46b3-4d4a-b145-5e3c888e63c0" CreationDate="2011-04-17T12:33:24.907" UserId="1923" Text="If you want to see how to do it by code example, here is a sample that uses xml like you want to&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/collision&#xD;&#xA;&#xD;&#xA;If you want to read articles explaining whats going on and gain insight on how to work with xml &amp; the content processor, go to this link, scroll down to the intermediate serializer section and read the 8 or 9 articles there.&#xD;&#xA;http://www.talula.demon.co.uk/blogindex.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23929" PostHistoryTypeId="6" PostId="11234" RevisionGUID="560787cd-b7d1-4c24-b848-6b46af377b21" CreationDate="2011-04-17T12:43:44.210" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;collision-detection&gt;" />
  <row Id="23930" PostHistoryTypeId="2" PostId="11236" RevisionGUID="14f7670d-c5d9-4dae-82f6-652ed4c55f6a" CreationDate="2011-04-17T12:54:21.557" UserId="1923" Text="This answer implies using the xna framework with c#.&#xD;&#xA;&#xD;&#xA;I generally create an input manager class that has its own update method to update the current state of the keyboard/mouse/gamepads. I create an instance of this class and register it as a service so it's available to any class in the game. &#xD;&#xA;&#xD;&#xA;At the beginning of the game's update, I call the inputManager's update. At this point the current &amp; previous states of the keyboard, mouse, &amp; gamepads are available to all classes that can access services. &#xD;&#xA;&#xD;&#xA;My input manager also has stand alone methods to check for key or button presses and/or clicks which can also be accessed from anywhere and can pass in whatever key/button they are concerned about. &#xD;&#xA;" />
  <row Id="23931" PostHistoryTypeId="2" PostId="11237" RevisionGUID="58cf8941-f655-458e-869e-9fe6150fe0b4" CreationDate="2011-04-17T13:16:56.803" UserId="2710" Text="I'm thinking about making a game set in space, that would feature very large, procedurally-generated game world (many stars, planets and what have you). However, I foresee a big problem: cosmic space is mostly featureless. It's almost the same everywhere - the same black emptiness with stars. This is obviously bad. A large game world must be different in different places, so that the player can understand where she is, and how to get where she needs. What can I do to make different, recognizable places in space?&#xD;&#xA;&#xD;&#xA;The game I'm envisioning is 2D (a bit like [Space Rangers][1]), with space pictures used only in background. However, I'm interested in any techniques, 2D or 3D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Space_Rangers_%28video_game%29" />
  <row Id="23932" PostHistoryTypeId="1" PostId="11237" RevisionGUID="58cf8941-f655-458e-869e-9fe6150fe0b4" CreationDate="2011-04-17T13:16:56.803" UserId="2710" Text="How can I make space recognizable and easy to orient in?" />
  <row Id="23933" PostHistoryTypeId="3" PostId="11237" RevisionGUID="58cf8941-f655-458e-869e-9fe6150fe0b4" CreationDate="2011-04-17T13:16:56.803" UserId="2710" Text="&lt;game-design&gt;" />
  <row Id="23934" PostHistoryTypeId="2" PostId="11238" RevisionGUID="22ab4f93-f457-4746-a2b2-9e009333f6ad" CreationDate="2011-04-17T13:36:37.003" UserId="5899" Text="Bresenham line algorithm is not intended to collision detection tests. It is intended to discretize and achieve an aproximation to draw lines on the screen. With bresenham accuracy is being lost.&#xD;&#xA;&#xD;&#xA;To collision tests you can use geometric equations. In this case the bounding box can be separated in four segments and check if any of the segments intersects with the ray ( other segment ).&#xD;&#xA;&#xD;&#xA;I write you a code to this test in C++, sorry but I'm not familiarized with C# but the conversion must be very easy.&#xD;&#xA;&#xD;&#xA;    float signedTriangleArea( const vector2df&amp; pointA,&#xD;&#xA;                              const vector2df&amp; pointB,&#xD;&#xA;                              const vector2df&amp; pointC&#xD;&#xA;                            )&#xD;&#xA;    {&#xD;&#xA;        return ( pointA.X - pointC.X ) * ( pointC.Y - pointB.Y ) - ( pointC.Y - pointA.Y ) * ( pointB.X - pointC.X );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    bool testSegmentsIntersection( const vector2df&amp; pointA,&#xD;&#xA;                                   const vector2df&amp; pointB,&#xD;&#xA;                                   const vector2df&amp; pointC,&#xD;&#xA;                                   const vector2df&amp; pointD &#xD;&#xA;                                 )&#xD;&#xA;    {&#xD;&#xA;        float a1 = signedTriangleArea( pointA, pointB, pointD );&#xD;&#xA;        float a2 = signedTriangleArea( pointA, pointB, pointC );&#xD;&#xA;	&#xD;&#xA;        if ( a1 * a2 &lt; 0.f )&#xD;&#xA;        {&#xD;&#xA;            float a3 = signedTriangleArea( pointC, pointD, pointA );&#xD;&#xA;            float a4 = a3 + a2 - a1;&#xD;&#xA;		&#xD;&#xA;            if ( a3 * a4 &lt; 0.f )&#xD;&#xA;                return true;&#xD;&#xA;	&#xD;&#xA;            return false;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;The triangle area is useful because the sign of the function can determine if a point is on the left or on the right of a segment.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23935" PostHistoryTypeId="2" PostId="11239" RevisionGUID="b2cddbd8-e963-4bee-bfde-4806f37d0449" CreationDate="2011-04-17T13:39:54.020" UserId="6332" Text="There may be a bug in this line:&#xD;&#xA;&#xD;&#xA;    for (int y = tileMap.GetHeight(); y &lt;= tileMap.GetHeight(); ++y)&#xD;&#xA;&#xD;&#xA;Maybe it should have been:&#xD;&#xA;&#xD;&#xA;    for (int y = 0; y &lt; tileMap.GetHeight(); ++y)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23936" PostHistoryTypeId="2" PostId="11240" RevisionGUID="5f8815d1-0bc8-43a5-9404-6c9b1e2fcf4d" CreationDate="2011-04-17T14:01:14.697" UserId="5899" Text="I'm agree with the books recommended in other answers. I want to encourage to learn animation concepts that are universal and there aren't linked to no specific tool.&#xD;&#xA;&#xD;&#xA;Animation is the process to give life to things. The movement is very bound to the life. The things that are dead not move. The unanimated things not move. The animation process is very hard and need a lot of experience to achieve good results. There are some small concepts that are essential to begin animating. The books of a tool normally forgive these concepts and focuses only in the use of the tool.&#xD;&#xA;&#xD;&#xA;I recommend the book: &quot;[The Animator's Survival Kit][1]&quot; from Richard Williams that is a &quot;must have&quot; to every animator, that teach these concepts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Animators-Survival-Kit-Expanded-Principles/dp/0571238343/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1303048837&amp;sr=8-1" />
  <row Id="23937" PostHistoryTypeId="2" PostId="11241" RevisionGUID="dfa0156c-97dc-455b-8337-da9087451d13" CreationDate="2011-04-17T14:05:13.053" UserId="288" Text="I haven't tried to find out exactly what is wrong with your XML - it's probably the lack of a namespace. **But here is the correct XML:**&#xD;&#xA;&#xD;&#xA;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&#xD;&#xA;    &lt;XnaContent xmlns:Generic=&quot;System.Collections.Generic&quot;&gt;&#xD;&#xA;      &lt;Asset Type=&quot;Generic:List[string]&quot;&gt;&#xD;&#xA;        &lt;Item&gt;Audi&lt;/Item&gt;&#xD;&#xA;        &lt;Item&gt;BMW&lt;/Item&gt;&#xD;&#xA;        &lt;Item&gt;Nissan&lt;/Item&gt;&#xD;&#xA;        &lt;Item&gt;Volvo&lt;/Item&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;Under the hood the `XmlImporter` uses the `IntermediateSerializer` class. So a small program like the following can be used to determine what your XML *should* look like:&#xD;&#xA;&#xD;&#xA;	var test = new List&lt;string&gt;(){ &quot;Audi&quot;, &quot;BMW&quot;, &quot;Nissan&quot;, &quot;Volvo&quot; };&#xD;&#xA;	var sb = new StringBuilder();&#xD;&#xA;	using(XmlWriter writer = XmlWriter.Create(sb))&#xD;&#xA;	{&#xD;&#xA;		IntermediateSerializer.Serialize(writer, test, null);&#xD;&#xA;	}&#xD;&#xA;	Console.Write(sb.ToString());&#xD;&#xA;&#xD;&#xA;(You can even convert the output to a stream, pass it to the `Deserialize` method, and reconstruct the object - just to be doubly-sure it's working.)&#xD;&#xA;&#xD;&#xA;For some in-depth information about `IntermediateSerializer`, take a look at Shawn Hargreaves' blog, starting with &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2008/05/30/xml-and-the-content-pipeline.aspx&quot;&gt;this post&lt;/a&gt; and continuing through the archives until August 2008." />
  <row Id="23938" PostHistoryTypeId="2" PostId="11242" RevisionGUID="733fb835-0db7-47b4-bbe9-4c04a64f1dcb" CreationDate="2011-04-17T14:08:10.850" UserId="6789" Text="I've had luck with the airplay SDK - at least on x86 and apparently targets iPhone well (although I still have yet to put an app on an iPhone yet)." />
  <row Id="23939" PostHistoryTypeId="2" PostId="11243" RevisionGUID="30122fcb-84ab-433e-a165-88359eb5d6fe" CreationDate="2011-04-17T14:09:33.300" UserId="744" Text="Unfortunately, I can't remember where I read or heard this rule, so apologies to whoever gave it to me, but what I learned was _give the player at least three points of reference_.&#xD;&#xA;&#xD;&#xA;The simplest form is a point for where the player was coming from, a point for where they're going, and a point elsewhere to help orient the other two points. If you want to encourage more exploration or have the player participate more in orienteering, they can be three arbitrary points. These features should be big - a distant nebula, a black hole, an asteroid cloud - and dominate the camera when the player is looking at them.&#xD;&#xA;&#xD;&#xA;Three is a lower limit. You can go higher, but not much higher. If there's points of interest everywhere, they're no longer interesting. I suspect the ideal number is 3-5.&#xD;&#xA;&#xD;&#xA;Play any open world game and you should be able to see this rule in action - Fallout 3, GTA, Assassin's Creed, WoW - from any given point on the map you'll see 3-5 major landmarks." />
  <row Id="23940" PostHistoryTypeId="2" PostId="11244" RevisionGUID="78d50822-3de6-48e2-b75d-15a0d83cb5fb" CreationDate="2011-04-17T14:15:30.160" UserId="1923" Text="Another alternative is to use XNA's built in Ray class and BoundingBox class. Although they are typically used in 3d, often (as in this case) you can simply set their Z components to zero and utilize them in 2d as needed. It seems to me that that would achieve a dramatic simplification to your code." />
  <row Id="23941" PostHistoryTypeId="5" PostId="11241" RevisionGUID="04046f9d-3937-4ecf-bbbf-0167cb7ccaf4" CreationDate="2011-04-17T14:23:11.133" UserId="288" Comment="added 99 characters in body" Text="I haven't tried to find out exactly what is wrong with your XML - it's probably the lack of a namespace. **But here is the correct XML:**&#xD;&#xA;&#xD;&#xA;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#xD;&#xA;    &lt;XnaContent xmlns:Generic=&quot;System.Collections.Generic&quot;&gt;&#xD;&#xA;      &lt;Asset Type=&quot;Generic:List[string]&quot;&gt;&#xD;&#xA;        &lt;Item&gt;Audi&lt;/Item&gt;&#xD;&#xA;        &lt;Item&gt;BMW&lt;/Item&gt;&#xD;&#xA;        &lt;Item&gt;Nissan&lt;/Item&gt;&#xD;&#xA;        &lt;Item&gt;Volvo&lt;/Item&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;Under the hood the `XmlImporter` uses the `IntermediateSerializer` class. So a small program like the following can be used to determine what your XML *should* look like:&#xD;&#xA;&#xD;&#xA;	var test = new List&lt;string&gt;(){ &quot;Audi&quot;, &quot;BMW&quot;, &quot;Nissan&quot;, &quot;Volvo&quot; };&#xD;&#xA;	var sb = new StringBuilder();&#xD;&#xA;	using(XmlWriter writer = XmlWriter.Create(sb))&#xD;&#xA;	{&#xD;&#xA;		IntermediateSerializer.Serialize(writer, test, null);&#xD;&#xA;	}&#xD;&#xA;	Console.Write(sb.ToString());&#xD;&#xA;&#xD;&#xA;(You can even convert the output to a stream, pass it to the `Deserialize` method, and reconstruct the object - just to be doubly-sure it's working. Also it is probably worth putting the right encoding in the header - eg: `StringBuilder` is utf-16.)&#xD;&#xA;&#xD;&#xA;For some in-depth information about `IntermediateSerializer`, take a look at Shawn Hargreaves' blog, starting with &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2008/05/30/xml-and-the-content-pipeline.aspx&quot;&gt;this post&lt;/a&gt; and continuing through the archives until August 2008." />
  <row Id="23946" PostHistoryTypeId="25" PostId="11237" RevisionGUID="4f044970-8883-4ed1-8e9f-2b652212d1ee" CreationDate="2011-04-17T15:09:27.423" Comment="http://twitter.com/#!/StackGameDev/status/59634583729213441" />
  <row Id="23948" PostHistoryTypeId="2" PostId="11247" RevisionGUID="680ab89a-7766-499e-95ec-0b96d29d51f0" CreationDate="2011-04-17T15:57:24.333" UserId="6786" Text="Is there a way to load .max files directly to Panda3D engine? I am running Panda3D on linux so converting them using 3ds max is bit difficult.&lt;br /&gt;&#xD;&#xA;Or at least is there a work around this problem?" />
  <row Id="23949" PostHistoryTypeId="1" PostId="11247" RevisionGUID="680ab89a-7766-499e-95ec-0b96d29d51f0" CreationDate="2011-04-17T15:57:24.333" UserId="6786" Text="How to load .max files to Panda3D" />
  <row Id="23950" PostHistoryTypeId="3" PostId="11247" RevisionGUID="680ab89a-7766-499e-95ec-0b96d29d51f0" CreationDate="2011-04-17T15:57:24.333" UserId="6786" Text="&lt;3d&gt;&lt;models&gt;&lt;file-format&gt;&lt;linux&gt;" />
  <row Id="23951" PostHistoryTypeId="2" PostId="11248" RevisionGUID="90007cd9-b89b-45d0-92af-b114104ba475" CreationDate="2011-04-17T16:16:50.183" UserId="6792" Text="I am developing an application on Blitz 3D that uses basic programming language. Look at this code:&#xD;&#xA;&#xD;&#xA;    If MilliSecs() = timer + 1000 Then pitch#=2 yaw#=2 roll#=2&#xD;&#xA;    If MilliSecs() = timer + 2000 Then pitch#=3 yaw#=3 roll#=3&#xD;&#xA;    If MilliSecs() = timer + 3000 Then pitch#=4 yaw#=4 roll#=4&#xD;&#xA;&#xD;&#xA;As you can see, I want to make an animation that changes every second. The problem is that it will animate the first one and the last one, but not the middle on. I have tried adding more lines and its always the same issue. I do not understand what I am doing wrong here and would appreciate any assistance in solving this issue.&#xD;&#xA;&#xD;&#xA;I have a feeling that what I am doing wrong is something stupid, so feel free to insult ;)&#xD;&#xA;" />
  <row Id="23952" PostHistoryTypeId="1" PostId="11248" RevisionGUID="90007cd9-b89b-45d0-92af-b114104ba475" CreationDate="2011-04-17T16:16:50.183" UserId="6792" Text="Basic code not working properly" />
  <row Id="23953" PostHistoryTypeId="3" PostId="11248" RevisionGUID="90007cd9-b89b-45d0-92af-b114104ba475" CreationDate="2011-04-17T16:16:50.183" UserId="6792" Text="&lt;animation&gt;&lt;source-code&gt;&lt;blitzmax&gt;" />
  <row Id="23954" PostHistoryTypeId="2" PostId="11249" RevisionGUID="6d366c24-f4d5-472e-accb-47e8b7d8d3a5" CreationDate="2011-04-17T16:18:41.393" UserId="6786" Text="I am involved with a research that deals with 3D graphics. I am very new to 3D graphics. In my research I have to move a 3D object based on some information queried by processing a video. Viewer's only interaction with the 3D environment is, changing the camera viewpoint.&#xD;&#xA;&#xD;&#xA;I am not that worried about the speed or efficiency at this level. What I need is easy to learn and easy to program 3D game engine, I suppose.&#xD;&#xA;&#xD;&#xA;I'd like to know about any open 3d model file format supported by the game engine, as I will have to use custom made 3D models using 3D modelling techniques of computer vision.&#xD;&#xA;&#xD;&#xA;I tried Panda3D, but the most significant drawback was it's inability to use .max files directly (most of the 3D models available were of this format). Panda3D was quite simple when it came to scripting.&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="23955" PostHistoryTypeId="1" PostId="11249" RevisionGUID="6d366c24-f4d5-472e-accb-47e8b7d8d3a5" CreationDate="2011-04-17T16:18:41.393" UserId="6786" Text="A good beginers' game engine to run on linux" />
  <row Id="23956" PostHistoryTypeId="3" PostId="11249" RevisionGUID="6d366c24-f4d5-472e-accb-47e8b7d8d3a5" CreationDate="2011-04-17T16:18:41.393" UserId="6786" Text="&lt;3d-engines&gt;&lt;3d-meshes&gt;&lt;file-format&gt;&lt;linux&gt;" />
  <row Id="23957" PostHistoryTypeId="2" PostId="11250" RevisionGUID="6de4fff6-b42a-4303-b13c-1589c9623552" CreationDate="2011-04-17T16:24:55.917" UserId="1101" Text="Most interesting places in space are in the middle of a galaxy. Most galaxies are flattened in some way and thus have a clear band of denser stars forming a ring around the viewer's position. This will hold true for almost all positions within that galaxy. You can see plenty of examples from our own galaxy [on Google Image Search][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.co.uk/search?q=milky%20way&amp;tbm=isch&amp;tbo=u" />
  <row Id="23958" PostHistoryTypeId="16" PostId="10711" RevisionGUID="fb97d599-0a03-4287-af0d-d257ba5cd771" CreationDate="2011-04-17T16:36:01.647" UserId="51" />
  <row Id="23959" PostHistoryTypeId="16" PostId="10852" RevisionGUID="c423e9fd-2254-46a0-b448-f147dc0b4d80" CreationDate="2011-04-17T16:36:01.647" UserId="51" />
  <row Id="23960" PostHistoryTypeId="16" PostId="10853" RevisionGUID="b2b56d40-82b0-4d49-8a8a-5e9c4bebd58f" CreationDate="2011-04-17T16:36:01.647" UserId="51" />
  <row Id="23961" PostHistoryTypeId="16" PostId="11240" RevisionGUID="1ca3a0fd-2d06-4da9-ba2a-8c231af4b252" CreationDate="2011-04-17T16:36:01.647" UserId="51" />
  <row Id="23962" PostHistoryTypeId="6" PostId="11248" RevisionGUID="69bc29be-5c16-4668-9b56-707dd955eb63" CreationDate="2011-04-17T17:04:19.860" UserId="1156" Comment="edited tags" Text="&lt;animation&gt;&lt;blitzmax&gt;" />
  <row Id="23963" PostHistoryTypeId="2" PostId="11251" RevisionGUID="44bebcb0-36e2-4e31-909c-f7f3833cace8" CreationDate="2011-04-17T17:06:51.370" UserId="337" Text="I'm not familiar with Blitz 3D, but if the = sign is a regular comparison in this context, than there is no guarantee the milliseconds will be exactly the value you're comparing it to (I think, I don't know what the timer variable is).&#xD;&#xA;&#xD;&#xA;You should be using a different comparison, say less than (usually &lt;) that way it will set it to the latest possible (and use an else if statement if you want it to change the pitch/yaw/roll only once)." />
  <row Id="23964" PostHistoryTypeId="2" PostId="11252" RevisionGUID="d070cf0b-8927-46b9-a43b-96e0fee45f07" CreationDate="2011-04-17T17:10:02.757" UserId="4410" Text="Are you sure &quot;MillSecs()&quot; is returning values that always exactly fall on those specified values? Unless you're manually incrementing the value it provides by the same amount you could reasonably expect it could miss.&#xD;&#xA;&#xD;&#xA;Have you considered trying this as a slightly more robust alternative (I've not used Blitz so this might need to be tweaked for it to compile):&#xD;&#xA;&#xD;&#xA;       If MilliSecs() &gt;= timer + 3000 Then pitch#=4 yaw#=4 roll#=4&#xD;&#xA;       ElseIf MilliSecs() &gt;= timer + 2000 Then pitch#=3 yaw#=3 roll#=3&#xD;&#xA;       ElseIf MilliSecs() &gt;= timer + 1000 Then pitch#=2 yaw#=2 roll#=2&#xD;&#xA;&#xD;&#xA;This way the value doesn't have to fall exactly and will be set to the right number as long as it falls in a certain range that doesn't overlap." />
  <row Id="23965" PostHistoryTypeId="5" PostId="11248" RevisionGUID="2e6d196c-2f78-46f6-919a-e20d176247a4" CreationDate="2011-04-17T17:19:27.490" UserId="1156" Comment="deleted 96 characters in body" Text="I am developing an application on Blitz 3D that uses basic programming language. Look at this code:&#xD;&#xA;&#xD;&#xA;    If MilliSecs() = timer + 1000 Then pitch#=2 yaw#=2 roll#=2&#xD;&#xA;    If MilliSecs() = timer + 2000 Then pitch#=3 yaw#=3 roll#=3&#xD;&#xA;    If MilliSecs() = timer + 3000 Then pitch#=4 yaw#=4 roll#=4&#xD;&#xA;&#xD;&#xA;As you can see, I want to make an animation that changes every second. The problem is that it will animate the first one and the last one, but not the middle on. I have tried adding more lines and its always the same issue. I do not understand what I am doing wrong here and would appreciate any assistance in solving this issue." />
  <row Id="23966" PostHistoryTypeId="5" PostId="11250" RevisionGUID="c68e95d2-9591-48d0-93f9-20f18fea5760" CreationDate="2011-04-17T18:02:44.710" UserId="1101" Comment="clarification" Text="Most interesting places in space are in the middle of a galaxy. Most galaxies are flattened in some way and thus have a clear band of densely-packed stars forming a ring around the viewer's position. This will hold true for almost all positions within that galaxy. You can see plenty of examples from our own galaxy [on Google Image Search][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.co.uk/search?q=milky%20way&amp;tbm=isch&amp;tbo=u" />
  <row Id="23967" PostHistoryTypeId="25" PostId="11248" RevisionGUID="fe748a1f-9524-40a2-b2be-cb11ac1996dd" CreationDate="2011-04-17T18:09:27.760" Comment="http://twitter.com/#!/StackGameDev/status/59679883877556224" />
  <row Id="23968" PostHistoryTypeId="2" PostId="11253" RevisionGUID="0c1f1068-5bc2-4631-9ef1-92c739b3e1a7" CreationDate="2011-04-17T18:26:08.830" UserId="4129" Text="I think that the best way to keep player's orientated is an on-screen mini-map." />
  <row Id="23969" PostHistoryTypeId="2" PostId="11254" RevisionGUID="ab7c17f4-bc1b-4af1-8bb3-c0ae9210576f" CreationDate="2011-04-17T18:50:25.353" UserId="4817" Text="Between not being sure how to phrase my question for Google and not being a lawyer, I thought it might be easier to ask you guys. Specifically, I want to know if it's OK to sell an Xbox Live indie game while simultaneously distributing the source code and other assets via GitHub or something." />
  <row Id="23970" PostHistoryTypeId="1" PostId="11254" RevisionGUID="ab7c17f4-bc1b-4af1-8bb3-c0ae9210576f" CreationDate="2011-04-17T18:50:25.353" UserId="4817" Text="Is it OK to release the source code for your own Xbox Live indie game?" />
  <row Id="23971" PostHistoryTypeId="3" PostId="11254" RevisionGUID="ab7c17f4-bc1b-4af1-8bb3-c0ae9210576f" CreationDate="2011-04-17T18:50:25.353" UserId="4817" Text="&lt;xna&gt;&lt;open-source&gt;&lt;licensing&gt;" />
  <row Id="23972" PostHistoryTypeId="5" PostId="11237" RevisionGUID="b7ca4138-7c45-4212-80ed-e3522183867b" CreationDate="2011-04-17T18:52:47.157" UserId="2710" Comment="added clarification" Text="I'm thinking about making a game set in space, that would feature very large, procedurally-generated game world (many stars, planets and what have you). However, I foresee a big problem: cosmic space is mostly featureless. It's almost the same everywhere - the same black emptiness with stars. This is obviously bad. A large game world must be different in different places, so that the player can understand where she is, and how to get where she needs. What can I do to make different, recognizable places in space?&#xD;&#xA;&#xD;&#xA;The game I'm envisioning is 2D (a bit like [Space Rangers][1]), with space pictures used only in background. However, I'm interested in any techniques, 2D or 3D.&#xD;&#xA;&#xD;&#xA;**Clarification**&#xD;&#xA;What I need here is not just ability to orient in game space, but rather having _different_ places so that the game feels more interesting. Here's an example: imagine any space-trading game (like Elite or X or whatever). You visit different star systems, but they're all generally alike: a dock to repair/refuel, a shop to trade, a bar to take missions/contracts... Some Tau Ceti III differs from KZ'ish VI mostly by name.&#xD;&#xA;&#xD;&#xA;I believe that every place, or at least most places that player visits should be different from each other, and immediately recognizable, so that player has a sense of wonder and discovery as she explores the universe.  Of course, making every star system a full-fledged 3D level with its own visual style would work, but that's prohibitively expensive even for a big-budget game. Are there any other ways to achieve this wonder and discovery?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Space_Rangers_%28video_game%29" />
  <row Id="23973" PostHistoryTypeId="2" PostId="11255" RevisionGUID="03388abd-6fdb-4d9d-911b-c0add74e0a3c" CreationDate="2011-04-17T18:54:26.333" UserId="1156" Text="I'm not a lawyer, but why not? It's your code. Generally the reason people don't distribute commercial source code is because they lose profit.&#xD;&#xA;&#xD;&#xA;Unless there's some weird part of Microsoft's licensing. I would have a look at their terms and conditions on this. " />
  <row Id="23974" PostHistoryTypeId="2" PostId="11256" RevisionGUID="e281540a-c1bc-4b46-9679-944afc608d68" CreationDate="2011-04-17T19:05:38.727" UserId="2708" Text="In my Game I'm currently have &quot;Scene Coordinates&quot; which are the X,Y coordinates relative to a Game Scene.&#xD;&#xA;&#xD;&#xA;In that Scene there are Game Entities, let's say there's a GameEntity **A** in x=100.0, y=100.0 ( scene coordinates )&#xD;&#xA;&#xD;&#xA;Which is the best way to have &quot;Entity Coordinates&quot; so that from GameEntity **A** point of view, he's standing at x=0.0, y=0.0 with OpenGL transformations?&#xD;&#xA;&#xD;&#xA;In that way if I apply something like&#xD;&#xA;&#xD;&#xA;    glRotatef(angle, 0, 0, 1) &#xD;&#xA;&#xD;&#xA;The entity will rotate around it's own origin and not the scene &quot;global&quot; origin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23975" PostHistoryTypeId="1" PostId="11256" RevisionGUID="e281540a-c1bc-4b46-9679-944afc608d68" CreationDate="2011-04-17T19:05:38.727" UserId="2708" Text="Managing Game Entity coordinates" />
  <row Id="23976" PostHistoryTypeId="3" PostId="11256" RevisionGUID="e281540a-c1bc-4b46-9679-944afc608d68" CreationDate="2011-04-17T19:05:38.727" UserId="2708" Text="&lt;opengl&gt;&lt;matrix&gt;&lt;entity-system&gt;" />
  <row Id="23977" PostHistoryTypeId="2" PostId="11257" RevisionGUID="55269552-5489-4ded-8943-9db38051b834" CreationDate="2011-04-17T19:08:38.077" UserId="395" Text="http://www.panda3d.org/manual/index.php/Converting_from_3D_Studio_Max shows how to use the exporter." />
  <row Id="23978" PostHistoryTypeId="5" PostId="11254" RevisionGUID="9f8280d2-2391-4112-8161-bda937cb5eb8" CreationDate="2011-04-17T19:14:34.480" UserId="4817" Comment="Fixed broken link" Text="Between not being sure how to phrase my question for Google and not being a lawyer, I thought it might be easier to ask you guys. Specifically, I want to know if it's OK to sell an Xbox Live indie game while simultaneously distributing the source code and other assets via GitHub or something.&#xD;&#xA;&#xD;&#xA;Edit: &lt;a href=&quot;http://gamedev.stackexchange.com/questions/11254/is-it-ok-to-release-the-source-code-for-your-own-xbox-live-indie-game#answer-11255&quot;&gt;The Communist Duck asked&lt;/a&gt; &quot;why not?&quot; One reason I can think of is that Microsoft has a small stake in a game's sales. They are hosting the demo/full game, they might be dedicating an advertising slot to the game in their &quot;latest&quot; section, etc. It's true they get a cut of each sale, **but** they get nothing if everyone just goes and downloads the free version.&#xD;&#xA;&#xD;&#xA;Anyway, it's not a matter of what is reasonable and logical, it's a matter of what the terms and conditions allow. I'm going to read through them regardless, but I was hoping someone already knew." />
  <row Id="23979" PostHistoryTypeId="2" PostId="11258" RevisionGUID="773c1dd6-2073-419d-8f2f-26566567fbf0" CreationDate="2011-04-17T20:17:31.483" UserId="6795" Text="What i'd use in a basic set:&#xD;&#xA;&#xD;&#xA;* different background&#xD;&#xA;* &quot;landmarks&quot;&#xD;&#xA;* effects&#xD;&#xA;&#xD;&#xA;I don't know how realistic it should be and which &quot;dimensions&quot; it should have, so you need to clarify most for yourself.&#xD;&#xA;&#xD;&#xA;Ad background) I you say you're inside one galaxy, then you'll have &#xD;&#xA;&#xD;&#xA;* some other galaxies flying around - add them to mark different &quot;sectors&quot; - galaxies can look pretty different from each other (form &amp; color)&#xD;&#xA;* The angle of galaxies can change (they're mostly flat, so it's a difference if you look at them front top/bottom or some side)&#xD;&#xA;* If you're closer to the middle of your own galaxy, you'll have more densitiy when i comes to star systems and more brightness for light.&#xD;&#xA;* close planets &amp; suns from star system(s)&#xD;&#xA;&#xD;&#xA;Ad &quot;landmarks&quot;) You could use &#xD;&#xA;&#xD;&#xA;* asteroids&#xD;&#xA;* asteroid fields&#xD;&#xA;* destroyed/abandoned ships or stations&#xD;&#xA;&#xD;&#xA;Ad effects) You could take a basic set of colors and lightning effects (puls, etc.) and use different combination sets for &#xD;&#xA;&#xD;&#xA;* unknown space animals (swarms) like whales in the sea&#xD;&#xA;* satelites &#xD;&#xA;* patroull or scientific drones&#xD;&#xA;* plasma fields&#xD;&#xA;* nebulars&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This would allow a lot of combinations, so you wouldn't get into the trouble of having doublettes too soon. In every case i'd sketch your world down on paper and make soft transitions on the background/surroundings for places which are next to each other. So if solar system _a_ is next to system _b_ and _a_ has green nebulars and blue pulsing plasma fields, i'd give system _b_ one of both so it feels more &quot;next to _a_&quot;." />
  <row Id="23980" PostHistoryTypeId="2" PostId="11259" RevisionGUID="2dac7085-ce2b-4d8f-b058-5622363d52d7" CreationDate="2011-04-17T20:23:35.710" UserId="6797" Text="If differentiating your player locations is important to your game, perhaps you need consider alternative perspectives on the world.&#xD;&#xA;&#xD;&#xA;The games you reference, and most common for the genre, are out-of-starship third-person perspectives.  One alternative would be to take a first-person perspective at the trade depot, allowing the biology, culture (architecture, language, etc.) and surrounding environment (atmosphere, star light, etc.) take a more dominate role in your game.&#xD;&#xA;&#xD;&#xA;In other words, if it is the space between is the boring/repetition parts, eliminate that and associated travel time from the player's experience.&#xD;&#xA;&#xD;&#xA;If you're not willing to jump that far out of genre, some games have had success with color (star light and nebulous backdrops) and sound (radio noise from local culture, with possible interference from local celestial bodies)." />
  <row Id="23981" PostHistoryTypeId="5" PostId="11255" RevisionGUID="081160c3-2cfd-4be6-a9a3-400c6cd7b3e8" CreationDate="2011-04-17T20:26:50.013" UserId="1156" Comment="added 105 characters in body" Text="I'm not a lawyer, but why not? It's your code. Generally the reason people don't distribute commercial source code is because they lose profit.&#xD;&#xA;&#xD;&#xA;Unless there's some weird part of Microsoft's licensing. **I would have a look at their terms and conditions on this.** I put this in bold because there could be some esoteric condition; see Joe Wreschnig's comment below." />
  <row Id="23982" PostHistoryTypeId="5" PostId="11247" RevisionGUID="20547887-1b24-4b79-8840-1d5759e6a781" CreationDate="2011-04-17T20:52:20.857" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How to convert .max files to .egg on linux](http://gamedev.stackexchange.com/questions/11231/how-to-convert-max-files-to-egg-on-linux)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Is there a way to load .max files directly to Panda3D engine? I am running Panda3D on linux so converting them using 3ds max is bit difficult.&lt;br /&gt;&#xD;&#xA;Or at least is there a work around this problem?" />
  <row Id="23983" PostHistoryTypeId="10" PostId="11247" RevisionGUID="723b8f5c-5533-4acf-80df-f81102e80bbe" CreationDate="2011-04-17T20:52:20.547" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:395,&quot;DisplayName&quot;:&quot;coderanger&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="23984" PostHistoryTypeId="2" PostId="11260" RevisionGUID="9dc30ab3-34e9-4320-aeaf-0f846897b4f1" CreationDate="2011-04-17T21:00:29.157" UserId="1839" Text="The order of transformations in OpenGl is the opposite order then for DirectX. For DirectX its the SRT-Rule (Scale, Rotate, Translate) for OpenGl its Translate, Rotate, Scale:&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;        // move entity to its position&#xD;&#xA;        glTranslate(...);&#xD;&#xA;        // rotate entity around its origin&#xD;&#xA;        glRotate(...);&#xD;&#xA;        // drawn entity&#xD;&#xA;        DrawEntity();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;DrawEntity must render the entity using its local space coordsystem, they are fixed if there is no animation.&#xD;&#xA;&#xD;&#xA;If that doesnt answer your question, please rephrase it and elaborate.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23985" PostHistoryTypeId="5" PostId="11260" RevisionGUID="74c74a7b-565c-42f9-979d-30ce077efed7" CreationDate="2011-04-17T21:05:35.660" UserId="1839" Comment="edited body; added 1 characters in body" Text="The order of transformations in OpenGL is the opposite order then for DirectX. For DirectX its the SRT-Rule: Scale, Rotate, Translate - for OpenGL its: Translate, Rotate, Scale&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;        // move entity to its position&#xD;&#xA;        glTranslate(...);&#xD;&#xA;        // rotate entity around its origin&#xD;&#xA;        glRotate(...);&#xD;&#xA;        // drawn entity&#xD;&#xA;        DrawEntity();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;DrawEntity must render the entity using its local space coordsystem, they are fixed if there is no animation.&#xD;&#xA;&#xD;&#xA;If that doesnt answer your question, please rephrase it and elaborate.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23986" PostHistoryTypeId="5" PostId="11259" RevisionGUID="e0451874-b610-4e06-8bfd-6d3ed4b2bd21" CreationDate="2011-04-17T21:06:55.703" UserId="6797" Comment="added 3143 characters in body; added 88 characters in body" Text="If differentiating your player locations is important to your game, perhaps you need consider alternative perspectives on the world.&#xD;&#xA;&#xD;&#xA;The games you reference, and most common for the genre, are out-of-starship third-person perspectives.  One alternative would be to take a first-person perspective at the trade depot, allowing the biology, culture (architecture, language, etc.) and surrounding environment (atmosphere, star light, etc.) take a more dominate role in your game.&#xD;&#xA;&#xD;&#xA;In other words, if it is the space between is the boring/repetition parts, eliminate that and associated travel time from the player's experience.&#xD;&#xA;&#xD;&#xA;If you're not willing to jump that far out of genre, some games have had success with color (star light and nebulous backdrops) and sound (radio noise from local culture, with possible interference from local celestial bodies).&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;**Edit:** Since you already mentioned &quot;a dock to repair/refuel, a shop to trade, a bar&quot;, let me elaborate with some questions&#xD;&#xA;&#xD;&#xA;*   How does star type and planet orbit relate to the habitable zone?&#xD;&#xA;*   How does this affect the planet's biosphere?&#xD;&#xA;*   How did the local species evolve in this environment?&#xD;&#xA;*   Did the traders evolve here?  If not what in the environment brings them to this world?&#xD;&#xA;*   How does the biology affect the culture?&#xD;&#xA;    *  How large are the inhabitants, and how does that change the player's perspective.&#xD;&#xA;    *  What would they eat and drink? (Or more aptly, how would the player observer locals being served, since eating it probably not in the player's scope of interaction?)&#xD;&#xA;    * How segregate or ingrained is the surround biology into the urban/trading post environment?&#xD;&#xA;    *  How is the biology adapted to the environment?&#xD;&#xA;*   What is the architecture like?&#xD;&#xA;    *   What colors and shapes define cultural artifacts and architectural details?&#xD;&#xA;    *   What materials and technologies are available for buildings?  Carved in rock? Built from glass or gold? Grown out of trees or crystal nanites?&#xD;&#xA;    *   What environmental protection/exposure is the architecture supposed to provide?  Extreme weather? Radiation? Meteorites?  Ocean-going access?&#xD;&#xA;*   What is the dominant economy, and how does this reflect in the values of the culture?&#xD;&#xA;    *   Mining? Agriculture? Trade? Science &amp; Technology?&#xD;&#xA;    *   Are there different classes/castes in the culture, and if so, who would the player be interacting with?&#xD;&#xA;*   How would local culture or customs influence communication, trade, contracts, and the surround social environment?&#xD;&#xA;    *   How do they feeling about outsiders, like the player?&#xD;&#xA;    *   How close is the player allowed to everyday citizens, and what obstacles are presented along the way? Security outposts? Quarantine isolation?  Guarded at gun point?  Or just invited to the local bar for drinks?&#xD;&#xA;    *   Is the culture more formal or informal?  Does the player trade with an accountant like book-keeper, or to they haggle with a dock-hand at the space dock?&#xD;&#xA;    *   How is trade conducted?  Free trade between private parties? Government run?&#xD;&#xA;    *   Are the NPCs prone to gossip? Do they expect bribes?  Are they supportive of the local authority, or prone to rebellion?&#xD;&#xA;*   In any of the above questions, is there any variety exposed to the player?&#xD;&#xA;    *   Are there multiple locations on a planet or in a system open to foreign trade?  Are they located in different climates? Do they represent different nations?  Do they share a world or social outlook?&#xD;&#xA;&#xD;&#xA;These are just a handful of questions you can consider to differentiate the player experiences.  Obviously it would be a huge undertaking to address all over then in a single procedural system, but a textual prototype might help you navigate them for what is important for your vision of the player's experience.&#xD;&#xA;&#xD;&#xA;The beauty about using culture and biology to differentiate locations, is that you can also use it to ties different places together.  A starfaring civilization will bring it heritage with it, which will allow a player to recognize the similarities, as well as the differences.&#xD;&#xA;" />
  <row Id="23987" PostHistoryTypeId="25" PostId="11254" RevisionGUID="d135dd31-7d73-4bca-82e7-2aef352bd855" CreationDate="2011-04-17T21:09:27.537" Comment="http://twitter.com/#!/StackGameDev/status/59725182025211904" />
  <row Id="23988" PostHistoryTypeId="5" PostId="11259" RevisionGUID="a8ad79fb-7c6a-426f-bc24-fadf2c18c2e3" CreationDate="2011-04-17T21:16:53.357" UserId="6797" Comment="added 203 characters in body" Text="If differentiating your player locations is important to your game, perhaps you need consider alternative perspectives on the world.&#xD;&#xA;&#xD;&#xA;The games you reference, and most common for the genre, are out-of-starship third-person perspectives.  One alternative would be to take a first-person perspective at the trade depot, allowing the biology, culture (architecture, language, etc.) and surrounding environment (atmosphere, star light, etc.) take a more dominate role in your game.&#xD;&#xA;&#xD;&#xA;In other words, if it is the space between is the boring/repetition parts, eliminate that and associated travel time from the player's experience.&#xD;&#xA;&#xD;&#xA;If you're not willing to jump that far out of genre, some games have had success with color (star light and nebulous backdrops) and sound (radio noise from local culture, with possible interference from local celestial bodies).&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;**Edit:** Since you already mentioned &quot;a dock to repair/refuel, a shop to trade, a bar&quot;, let me elaborate with some questions&#xD;&#xA;&#xD;&#xA;*   How does star type and planet orbit relate to the habitable zone?&#xD;&#xA;*   How does this affect the planet's biosphere?&#xD;&#xA;*   How did the local species evolve in this environment?&#xD;&#xA;*   Did the traders evolve here?  If not what in the environment brings them to this world?&#xD;&#xA;*   How does the biology affect the culture?&#xD;&#xA;    *  How large are the inhabitants, and how does that change the player's perspective.&#xD;&#xA;    *  What would they eat and drink? (Or more aptly, how would the player observe locals being served, since eating is probably not in the player's scope of interaction?)&#xD;&#xA;    * How segregate or ingrained is the surround biology into the urban/trading post environment?&#xD;&#xA;    *  How is the biology adapted to the environment and the climate or weather?&#xD;&#xA;*   What is the architecture like?&#xD;&#xA;    *   What is the scale of the architecture?  Caves or hobbit holes? Skyscrapers? Castles? Arcologies? Ring worlds?&#xD;&#xA;    *   What colors and shapes define cultural artifacts and architectural details?&#xD;&#xA;    *   What materials and technologies are available for buildings?  Carved in rock? Built from glass or gold? Grown out of trees or crystal nanites?&#xD;&#xA;    *   What environmental protection/exposure is the architecture supposed to provide?  Extreme weather? Radiation? Meteorites?  Ocean-going access?&#xD;&#xA;*   What is the dominant economy, and how does this reflect in the values of the culture?&#xD;&#xA;    *   Mining? Agriculture? Trade? Science &amp; Technology?&#xD;&#xA;    *   Are there different classes/castes in the culture, and if so, who would the player be interacting with?&#xD;&#xA;*   How would local culture or customs influence communication, trade, contracts, and the surround social environment?&#xD;&#xA;    *   How do they feeling about outsiders, like the player?&#xD;&#xA;    *   How close is the player allowed to everyday citizens, and what obstacles are presented along the way? Security outposts? Quarantine isolation?  Guarded at gun point?  Or just invited to the local bar for drinks?  Possibly showered with gifts to smooth business relations?&#xD;&#xA;    *   Is the culture more formal or informal?  Does the player trade with an accountant like book-keeper, or to they haggle with a dock-hand at the space dock?&#xD;&#xA;    *   How is trade conducted?  Free trade between private parties? Government run?&#xD;&#xA;    *   Are the NPCs prone to gossip? Do they expect bribes?  Are they supportive of the local authority, or prone to rebellion?&#xD;&#xA;*   In any of the above questions, is there any variety exposed to the player?&#xD;&#xA;    *   Are there multiple locations on a planet or in a system open to foreign trade?  Are they located in different climates? Do they represent different nations?  Do they share a world or social outlook?&#xD;&#xA;&#xD;&#xA;These are just a handful of questions you can consider to differentiate the player experiences.  Obviously it would be a huge undertaking to address all of them in a single procedural system, but a textual prototype might help you navigate them for what is important for your vision of the player's experience.&#xD;&#xA;&#xD;&#xA;The beauty about using culture and biology to differentiate locations, is that you can also use it to ties different places together.  A starfaring civilization will bring it heritage with it, which will allow a player to recognize the similarities, as well as the differences.&#xD;&#xA;" />
  <row Id="23989" PostHistoryTypeId="5" PostId="11260" RevisionGUID="96d3d06b-b5ad-4794-8ae2-05d747f889bb" CreationDate="2011-04-17T22:00:32.630" UserId="1839" Comment="edited body" Text="The order of transformations in OpenGL is the opposite order than for DirectX. For DirectX its the SRT-Rule: Scale, Rotate, Translate - for OpenGL its: Translate, Rotate, Scale&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;        // move entity to its position&#xD;&#xA;        glTranslate(...);&#xD;&#xA;        // rotate entity around its origin&#xD;&#xA;        glRotate(...);&#xD;&#xA;        // drawn entity&#xD;&#xA;        DrawEntity();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;DrawEntity must render the entity using its local space coordsystem, they are fixed if there is no animation.&#xD;&#xA;&#xD;&#xA;If that doesnt answer your question, please rephrase it and elaborate.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="23991" PostHistoryTypeId="2" PostId="11262" RevisionGUID="536dad70-f4ba-4e71-bfd8-d2372894a591" CreationDate="2011-04-17T22:23:54.497" UserId="6803" Text="I've recently started a project, building a physics engine.&#xD;&#xA;I was hoping you could give me some advice related to some documentation and/or best technologies for this.&#xD;&#xA;&#xD;&#xA;First of all, I've seen that [Game-Physics-Engine-Development][1] is highly recommended for the task at hand, and I was wondering if you could give me a second opinion.Should I get it?&#xD;&#xA;Also, while browsing Amazon, I've stumbled onto  [Game Engine Architecture][2] and since I want to build my physics engine for games, I thought this might be a good read aswell.&#xD;&#xA;&#xD;&#xA;Second, I know that simulating physics is highly computation intensive so I would like to use either CUDA or OpenCL.Right now I'm leaning towards OpenCL, because it would work on both NVIDIA and ATI chipsets.What do you guys suggest?&#xD;&#xA;&#xD;&#xA;PS: I will be implementing this in C++ on Linux.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768/ref=sr_1_1/275-9603831-4785734?ie=UTF8&amp;qid=1303052306&amp;sr=8-1-spell&#xD;&#xA;  [2]: http://www.amazon.co.uk/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/ref=pd_bxgy_b_img_c" />
  <row Id="23992" PostHistoryTypeId="1" PostId="11262" RevisionGUID="536dad70-f4ba-4e71-bfd8-d2372894a591" CreationDate="2011-04-17T22:23:54.497" UserId="6803" Text="Advice needed for a physics engine." />
  <row Id="23993" PostHistoryTypeId="3" PostId="11262" RevisionGUID="536dad70-f4ba-4e71-bfd8-d2372894a591" CreationDate="2011-04-17T22:23:54.497" UserId="6803" Text="&lt;physics-engine&gt;" />
  <row Id="23995" PostHistoryTypeId="2" PostId="11263" RevisionGUID="500ed9c8-98e6-4681-90f1-aad273766036" CreationDate="2011-04-17T22:55:02.553" UserId="1839" Text="Here is how I learned to write a physics engine, its free and highly recommendable: [David Baraff's papers][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;particulary [An Introduction to Physically Based Modeling][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf" />
  <row Id="23996" PostHistoryTypeId="2" PostId="11264" RevisionGUID="b1599df9-e015-4b2f-8fd9-8fb756995d2b" CreationDate="2011-04-17T23:00:25.120" UserId="6804" Text="I have a lot of experience with C++, but I have no experience with game programming.  This summer I plan to create a 2D platformer from scratch using C++/SDL for the learning experience.  I am looking for as many resources as possible to help me get started.  Good source code, tutorials, anything.  &#xD;&#xA;&#xD;&#xA;One of the best tutorials I've found are the [inactive jump 'n' run dev tutorials by the late Florian Hufsky](http://replay.waybackmachine.org/20090523104747/http://jnrdev.72dpiarmy.com/).  Any similar tutorials?" />
  <row Id="23997" PostHistoryTypeId="1" PostId="11264" RevisionGUID="b1599df9-e015-4b2f-8fd9-8fb756995d2b" CreationDate="2011-04-17T23:00:25.120" UserId="6804" Text="Making a 2D Platformer in C++/SDL. Looking for tutorials/examples/resources." />
  <row Id="23998" PostHistoryTypeId="3" PostId="11264" RevisionGUID="b1599df9-e015-4b2f-8fd9-8fb756995d2b" CreationDate="2011-04-17T23:00:25.120" UserId="6804" Text="&lt;c++&gt;&lt;2d&gt;&lt;sdl&gt;&lt;platform-games&gt;" />
  <row Id="23999" PostHistoryTypeId="5" PostId="11263" RevisionGUID="a74b6c92-4411-4d86-9c45-e132ea132abe" CreationDate="2011-04-17T23:10:58.003" UserId="1839" Comment="added 168 characters in body; added 128 characters in body" Text="Here is how I learned to write a physics engine, its free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dnamics System&quot; SIGRAPH 2003, unfortunely I couldnt find the last with a quick google search anymore.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html" />
  <row Id="24000" PostHistoryTypeId="5" PostId="11263" RevisionGUID="a45dddff-0b8d-476f-99dd-79742386fdea" CreationDate="2011-04-17T23:21:51.173" UserId="1839" Comment="added 97 characters in body" Text="Here is how I learned to write a physics engine, its free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dnamics System&quot; SIGRAPH 2003, unfortunely I couldnt find the last with a quick google search anymore.&#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complecated enough :) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html" />
  <row Id="24001" PostHistoryTypeId="5" PostId="11263" RevisionGUID="a0b4c4ab-1136-4611-986c-6231d606332c" CreationDate="2011-04-17T23:30:21.360" UserId="1839" Comment="added 343 characters in body; deleted 2 characters in body; added 4 characters in body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dnamics System&quot; SIGRAPH 2003, unfortunely I couldnt find the last with a quick google search anymore.&#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine on your own, but its a great learning experience! Also have a look at other engines, here is the source for the [Bullet Physics Engine][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24002" PostHistoryTypeId="5" PostId="11263" RevisionGUID="8d0559a6-4020-4457-9c27-768ab1e8ea7d" CreationDate="2011-04-17T23:36:02.450" UserId="1839" Comment="added 1 characters in body; added 4 characters in body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dynamics system&quot; SIGRAPH 2003, unfortunely I couldnt find the last one with a quick google search anymore.&#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine on your own, but its a great learning experience! Also have a look at other engines, here is the source for the [Bullet Physics Engine][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24003" PostHistoryTypeId="25" PostId="11264" RevisionGUID="3971b00f-2a5c-4566-8416-a5a7acc81912" CreationDate="2011-04-18T00:09:27.423" Comment="http://twitter.com/#!/StackGameDev/status/59770479149449216" />
  <row Id="24004" PostHistoryTypeId="2" PostId="11265" RevisionGUID="5cb4775e-8002-418f-8560-431caf3d19cb" CreationDate="2011-04-18T01:14:41.523" UserId="3656" Text="If you're a C++/object-oriented kinda guy, you might find [SFML][1] easier to work with. It's very similar to SDL, except that is has an OO interface. It's not as widespread as SDL, but still has quite a large following.&#xD;&#xA;&#xD;&#xA;As for tutorials, since you're experienced with C++ you can probably get away with reading tutorials aimed at other engines and languages and apply the high level concepts, referencing your API and its help forums for specific issues you encounter along the way.&#xD;&#xA;&#xD;&#xA;* Here's a random SFML tutorial from their [forums][2]&#xD;&#xA;&#xD;&#xA;* [Flash Game Dojo][3] is aimed at Flixel &amp; Flashpunk users, but has a lot of &quot;beginning game programming&quot; type of material.&#xD;&#xA;&#xD;&#xA;* [GPWiki][4] has a massive amount of info on game programming.&#xD;&#xA;&#xD;&#xA;* [GameDev.net][5] is another huge resource (look at their articles and wiki)&#xD;&#xA;&#xD;&#xA;* Also look at the [FlipCode][6] archives. These generally cover more advanced topics, but you may find them useful in the future.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/&#xD;&#xA;  [2]: http://www.sfml-dev.org/forum/viewtopic.php?t=1561&amp;sid=991fa7722ee20bc50c2d1125e9e77e97&#xD;&#xA;  [3]: http://flashgamedojo.com/&#xD;&#xA;  [4]: http://gpwiki.org/index.php/Game_Programming_Wiki&#xD;&#xA;  [5]: http://gamedev.net/&#xD;&#xA;  [6]: http://flipcode.com/" />
  <row Id="24005" PostHistoryTypeId="2" PostId="11266" RevisionGUID="3173d600-c0aa-4101-8f1a-77d9c056538a" CreationDate="2011-04-18T02:28:29.150" UserId="6781" Text="Ok, so here is my current situation. I have a player model, fully UV mapped, and textured. At first I made multiple bitmaps for the character representing multiple colors for each team in the game. (red, blue, green, yellow, etc) Well, as my player count build up, space lowers. So I needed to make a new method of keeping the game effecient, clean, and fast. So I thought of the idea of having a color mask (alpha map covering the areas to be colored). I am using OpenGL, and I just have NO idea on where to begin! &#xD;&#xA;&#xD;&#xA;So I ask you, are there any libraries? methods? anything that could help me do this?&#xD;&#xA;&#xD;&#xA;Thanks for listening!" />
  <row Id="24006" PostHistoryTypeId="1" PostId="11266" RevisionGUID="3173d600-c0aa-4101-8f1a-77d9c056538a" CreationDate="2011-04-18T02:28:29.150" UserId="6781" Text="[OpenGL] Changing player color without multiple player bitmaps" />
  <row Id="24007" PostHistoryTypeId="3" PostId="11266" RevisionGUID="3173d600-c0aa-4101-8f1a-77d9c056538a" CreationDate="2011-04-18T02:28:29.150" UserId="6781" Text="&lt;opengl&gt;" />
  <row Id="24008" PostHistoryTypeId="25" PostId="11262" RevisionGUID="90d34f6f-d11f-4c7e-92ac-b1f6bf1358e2" CreationDate="2011-04-18T03:09:27.683" Comment="http://twitter.com/#!/StackGameDev/status/59815779184549888" />
  <row Id="24009" PostHistoryTypeId="2" PostId="11267" RevisionGUID="90a0a32a-53ff-4621-acff-3ce60fbd80fb" CreationDate="2011-04-18T03:16:32.557" UserId="4688" Text="you can make a model with some base color and replace that color with a shader.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; color = texture_color(x,y);&#xD;&#xA;&gt; &#xD;&#xA;&gt; if(color == base_color)&#xD;&#xA;&gt;      color = team_color;" />
  <row Id="24011" PostHistoryTypeId="2" PostId="11268" RevisionGUID="c8e48e34-8849-4ec8-adfe-c94e1fe4702d" CreationDate="2011-04-18T03:46:09.353" UserId="376" Text="Since my other answer was incorrect, I deleted it, pulled your source and traced down the actual solution.&#xD;&#xA;&#xD;&#xA;The issue is that your particle renderer never gets your camera's transform matrix. Here's how you can fix it:&#xD;&#xA;&#xD;&#xA;Update your `ParticleManager.Draw` method to be the following (very slight change, just the passing of the matrix:&#xD;&#xA;&#xD;&#xA;    public void Draw(Matrix transform)&#xD;&#xA;    {&#xD;&#xA;        foreach (KeyValuePair&lt;string, ParticleEffect&gt; effectPair in particleEffects)&#xD;&#xA;        {&#xD;&#xA;            particleRenderer.RenderEffect(effectPair.Value, ref transform);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then within your `ActionScreen.Draw` method, make sure to pass along the transformation matrix:&#xD;&#xA;&#xD;&#xA;    particleManager.Draw(cam.get_transformation(game.GraphicsDevice));&#xD;&#xA;&#xD;&#xA;You might want to grab the matrix from the camera earlier in this method, so you don't end up calculating it more than once.&#xD;&#xA;&#xD;&#xA;Now comes the annoying part - this alone didn't work for me. I'm guessing it's a bug in the Mercury Particle Engine 3.1. I ended up pulling the source of the current version of Mercury (from their trunk) and compiled it myself. After dropping those assemblies in, the trails and explosions were placed correctly.&#xD;&#xA;&#xD;&#xA;For reference, I used Mercury Particle Engine's changeset [87447][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mpe.codeplex.com/SourceControl/changeset/changes/87447" />
  <row Id="24012" PostHistoryTypeId="2" PostId="11269" RevisionGUID="9a3a1faa-6d27-4741-8a36-45abf9826e0e" CreationDate="2011-04-18T04:14:57.903" UserId="-1" Text="" />
  <row Id="24013" PostHistoryTypeId="2" PostId="11270" RevisionGUID="1d874662-91d0-4908-a551-8393d159834e" CreationDate="2011-04-18T04:14:57.903" UserId="-1" Text="" />
  <row Id="24014" PostHistoryTypeId="5" PostId="11270" RevisionGUID="b9970d04-00c1-4019-8d96-1ddfcb06f01f" CreationDate="2011-04-18T04:17:13.657" UserId="2698" Comment="Corrected markup (I hope)." Text="A 2.5D game uses either 3D or 2D to simulate the other. In modern day, a 2.5D game normally uses a 3D graphics engine but sticks to a 2D plane (e.g. [Trine](http://en.wikipedia.org/wiki/File:Trine_-_Wizard_Gears_Box.jpg) ). More historically it would mean a game that uses 2D images to create the illusion of a third dimension (e.g. Diablo 2)." />
  <row Id="24015" PostHistoryTypeId="24" PostId="11270" RevisionGUID="b9970d04-00c1-4019-8d96-1ddfcb06f01f" CreationDate="2011-04-18T04:17:13.657" Comment="Proposed by 2698 approved by 189 edit id of 325" />
  <row Id="24016" PostHistoryTypeId="2" PostId="11271" RevisionGUID="64b2a44d-3150-46e6-be53-1ff7e05545ec" CreationDate="2011-04-18T05:14:25.777" UserId="2698" Text="I'm creating a 2.5D platformer in XNA which uses 3D models that are constrained to travelling along a 2D plane (just like [Trine](http://en.wikipedia.org/wiki/File:Trine_-_Wizard_Gears_Box.jpg)).&#xD;&#xA;&#xD;&#xA;To make things tricker, however, I want the 2D plane itself to be able to curve. Consider [this replay of Klonoa][1] (you only need to watch for 10 seconds): although the player was on a 2D plane, the plane itself could wrap around the side of a mountain, effectively allowing the player to travel through 3D space - all the while constrained to the regular 2D plane of a platformer.&#xD;&#xA;&#xD;&#xA;**How should the physics be approached in a game like this?**&#xD;&#xA;&#xD;&#xA;* Should I use a 2D physics engine or a 3D physics engine?&#xD;&#xA;* Are there any physics engines actually designed with this situation in mind?&#xD;&#xA;* For any that weren't designed for this: what hacks or tricks will be necessary to get the physics engine cooperating with me?&#xD;&#xA;&#xD;&#xA;[1]:http://www.youtube.com/watch?v=d6RXvCUNX-4#t=1m30s" />
  <row Id="24017" PostHistoryTypeId="1" PostId="11271" RevisionGUID="64b2a44d-3150-46e6-be53-1ff7e05545ec" CreationDate="2011-04-18T05:14:25.777" UserId="2698" Text="Physics for a 2.5D platformer with a plane that curves" />
  <row Id="24018" PostHistoryTypeId="3" PostId="11271" RevisionGUID="64b2a44d-3150-46e6-be53-1ff7e05545ec" CreationDate="2011-04-18T05:14:25.777" UserId="2698" Text="&lt;xna&gt;&lt;3d&gt;&lt;physics&gt;&lt;2.5d&gt;" />
  <row Id="24019" PostHistoryTypeId="5" PostId="11270" RevisionGUID="1a74aae4-25b7-477c-9146-158686c364c2" CreationDate="2011-04-18T05:42:31.040" UserId="2698" Comment="The markup doesn't work. I'm including examples in the body instead." Text="A 2.5D game uses either 3D or 2D to simulate the other. In modern day, a 2.5D game normally uses a 3D graphics engine but sticks to a 2D plane (e.g. Trine). More historically it would mean a game that uses 2D images to create the illusion of a third dimension (e.g. Diablo 2)." />
  <row Id="24020" PostHistoryTypeId="24" PostId="11270" RevisionGUID="1a74aae4-25b7-477c-9146-158686c364c2" CreationDate="2011-04-18T05:42:31.040" Comment="Proposed by 2698 approved by 51 edit id of 327" />
  <row Id="24021" PostHistoryTypeId="5" PostId="11269" RevisionGUID="e91248e1-7900-4e43-8388-810ef85e5769" CreationDate="2011-04-18T05:42:35.813" UserId="2698" Comment="The markup doesn't work. I'm including examples in the body instead." Text="### Examples of games that use 3D graphics on a 2D plane: ###&#xD;&#xA;&#xD;&#xA;* [Trine](http://en.wikipedia.org/wiki/Trine_(video_game)) ([Screenshot](http://en.wikipedia.org/wiki/File:Trine_-_Wizard_Gears_Box.jpg))&#xD;&#xA;* [Donkey Kong Country Returns](http://en.wikipedia.org/wiki/Donkey_Kong_Country_Returns) ([Screenshot](http://wiimedia.ign.com/wii/image/article/109/1097969/donkey-kong-country-returns-20100615111702334_640w.jpg))&#xD;&#xA;* [Klonoa: Door to Phantomile](http://en.wikipedia.org/wiki/Klonoa:_Door_to_Phantomile) ([Screenshot](http://en.wikipedia.org/wiki/File:Klonoa_Door_to_Phantomile_Screen01.jpg))&#xD;&#xA;&#xD;&#xA;It is worth noting that games of this type _do not have to be completely flat_. For instance, in _Klonoa: Door to Phantomile_, although the player model is restricted to a 2D plane, the plane itself can curve through three dimensions as the platform you're running along twists and turns.&#xD;&#xA;&#xD;&#xA;### Examples of games that use 2D graphics to create an illusion of 3D: ###&#xD;&#xA;&#xD;&#xA;* [StarCraft](http://en.wikipedia.org/wiki/StarCraft) ([Screenshot](http://en.wikipedia.org/wiki/File:Zerg_colony_%28StarCraft%29.png))&#xD;&#xA;* [Diablo II](http://en.wikipedia.org/wiki/Diablo_II)" />
  <row Id="24022" PostHistoryTypeId="24" PostId="11269" RevisionGUID="e91248e1-7900-4e43-8388-810ef85e5769" CreationDate="2011-04-18T05:42:35.813" Comment="Proposed by 2698 approved by 51 edit id of 326" />
  <row Id="24023" PostHistoryTypeId="2" PostId="11272" RevisionGUID="10718fce-6ff4-42cd-99b0-19f76402f0cd" CreationDate="2011-04-18T05:56:29.093" UserId="5508" Text="A platformer like this is still, in its essence a 2D platformer. The 2.5D effect, even the curling around the mountain, is merely a visualisation of a world constrained in 2D. Your physics engine will probably only operate on this world and not on the visualisation of it, so a 2D physics engine will be sufficient.&#xD;&#xA;&#xD;&#xA;That said, you might be interested in some 3D effects. In the game &quot;Bionic Commando:Re-armed&quot;, defeated enemy characters will kinda 'roll' off the platform, making the ragdoll physics actually 3D. In addition, most 3D physics engines allow you constrain the movement along one or more axis (albeit with some tweaks like creating a joint between the road and moving characters).&#xD;&#xA;&#xD;&#xA;Remember that not every 3D effect needs a full-blown physics engine. You could code your own 3D implementations for minor things like falling debris after an explosion, without having to resort to a complete 3D engine.&#xD;&#xA;&#xD;&#xA;My recommendation is starting out with a 2D engine if you probably will not need physics calculations in the 3rd dimension. Otherwise pick a 3D engine and constrain the calculations in only two axis where relevant." />
  <row Id="24024" PostHistoryTypeId="25" PostId="11271" RevisionGUID="860ac891-72c3-49dc-9e0e-10e35e75950e" CreationDate="2011-04-18T06:09:27.490" Comment="http://twitter.com/#!/StackGameDev/status/59861077357363200" />
  <row Id="24025" PostHistoryTypeId="5" PostId="11262" RevisionGUID="89fe2b84-e0d5-46fc-954d-835f22098a48" CreationDate="2011-04-18T06:18:52.977" UserId="1198" Comment="deleted 21 characters in body" Text="I've recently started a project, building a physics engine.&#xD;&#xA;I was hoping you could give me some advice related to some documentation and/or best technologies for this.&#xD;&#xA;&#xD;&#xA;First of all, I've seen that [Game-Physics-Engine-Development][1] is highly recommended for the task at hand, and I was wondering if you could give me a second opinion.Should I get it?&#xD;&#xA;Also, while browsing Amazon, I've stumbled onto  [Game Engine Architecture][2] and since I want to build my physics engine for games, I thought this might be a good read aswell.&#xD;&#xA;&#xD;&#xA;Second, I know that simulating physics is highly computation intensive so I would like to use either CUDA or OpenCL.Right now I'm leaning towards OpenCL, because it would work on both NVIDIA and ATI chipsets.What do you guys suggest?&#xD;&#xA;&#xD;&#xA;PS: I will be implementing this in C++ on Linux.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768/ref=sr_1_1/275-9603831-4785734?ie=UTF8&amp;qid=1303052306&amp;sr=8-1-spell&#xD;&#xA;  [2]: http://www.amazon.co.uk/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/ref=pd_bxgy_b_img_c" />
  <row Id="24026" PostHistoryTypeId="5" PostId="11253" RevisionGUID="d20f3603-523a-49d6-b4f4-c04fe4c6b688" CreationDate="2011-04-18T06:26:32.273" UserId="4129" Comment="added 254 characters in body; added 265 characters in body" Text="I think that the best way to keep player's orientated is an on-screen mini-map.&#xD;&#xA;&#xD;&#xA;All the RTS games that I play have mini-maps in a corner e.g. the top left corner.&#xD;&#xA;&#xD;&#xA;The map typically stays &quot;pointing north&quot; and the angle of the user is shown with an arrow indicating direction etc.&#xD;&#xA;&#xD;&#xA;In RTS games you can often navigate to somewhere hidden by the fog of war, which means the screen is blank.  Yet users can use the mini-map, which is always visible, to understand where they are in relation to all the landmarks they know.  Users don't get lost.&#xD;&#xA;&#xD;&#xA;Elite had a map at the bottom, if I remember." />
  <row Id="24027" PostHistoryTypeId="5" PostId="11263" RevisionGUID="7b8a444c-1e8e-4523-886f-afa482110ef9" CreationDate="2011-04-18T07:01:34.077" UserId="1839" Comment="added 303 characters in body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dynamics system&quot; SIGRAPH 2003, unfortunely I couldnt find the last one with a quick google search anymore.&#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine on your own, but its a great learning experience! Also have a look at other engines, here is the source for the [Bullet Physics Engine][4]. As soon as you have a simple engine running, my advice is: make test-scenarios where you compare the result with the result of another engine, that helped me find a lot of errors, and it will improve your interface, something like appling a similar force for 1 second at the same body in both engines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24028" PostHistoryTypeId="2" PostId="11273" RevisionGUID="3521a436-615a-428c-b329-fa6d7463c417" CreationDate="2011-04-18T07:10:52.343" UserId="6618" Text="If it's an IP(intellectual property) submitted on XBox Live it has to conform to the rules of submission, when you agree to a contract online to submit a game you are accepting and abiding by the bindings of that contract.  If you change the terms of the contract &lt;B&gt;after&lt;/B&gt; the fact, your basically violating the contract.&#xD;&#xA;&#xD;&#xA;You can resolve this issue by:&#xD;&#xA;&#xD;&#xA;1. not submitting the game to XBox Live.&#xD;&#xA;2. writing a &quot;similar&quot; game ( in a language other than C#) and posting it on a  site with no affiliations to XBox Live" />
  <row Id="24029" PostHistoryTypeId="5" PostId="11263" RevisionGUID="81942dfb-b4f5-4798-85d4-c2b94f39994b" CreationDate="2011-04-18T07:11:41.493" UserId="1839" Comment="added 122 characters in body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dynamics system&quot; SIGRAPH 2003, unfortunely I couldnt find the last one with a quick google search anymore.&#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine with a competitive feature-list on your own, but its a great learning experience! Also have a look at other engines, here is the source for the [Bullet Physics Engine][4]. As soon as you have a simple engine running, my advice is: make test-scenarios where you compare the result with the result of another engine, that helped me find a lot of errors, and it will improve your interface, something like appling a similar force for 1 second at the same body in both engines. Last but not least: ignore collisions when you start, focus on a stable simulation first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24030" PostHistoryTypeId="5" PostId="11263" RevisionGUID="2c155970-627d-4d2f-996a-fd1b1202d68d" CreationDate="2011-04-18T08:29:58.073" UserId="1839" Comment="added 311 characters in body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2], Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3], also Kacic/Bullock &quot;A practical dynamics system&quot; SIGRAPH 2003, unfortunely I couldn't find the last one with a quick google search anymore. Those papers were mentioned in another great article from Nick Porcino (LucasArts) in one of the gems-books [Gems 4][4] &quot;Writing a Verlet-Based Physics Engine&quot;. Its not free but its worth every penny.&#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine with a competitive feature-list on your own, but its a great learning experience! Also have a look at other engines, here is the source for the [Bullet Physics Engine][5]. As soon as you have a simple engine running, my advice is: make test-scenarios where you compare the result with the result of another engine, that helped me find a lot of errors, and it will improve your interface, something like appling a similar force for 1 second at the same body in both engines. Last but not least: ignore collisions when you start, focus on a stable simulation first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/ref=sr_1_1?ie=UTF8&amp;qid=1303115129&amp;sr=8-1&#xD;&#xA;  [5]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24031" PostHistoryTypeId="6" PostId="11262" RevisionGUID="f37ea245-4f14-4c76-899f-4e36ba68adba" CreationDate="2011-04-18T08:37:49.053" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;physics-engine&gt;" />
  <row Id="24032" PostHistoryTypeId="2" PostId="11274" RevisionGUID="e6f18645-8c95-4efa-8016-9d8aa42668d7" CreationDate="2011-04-18T08:38:29.767" UserId="6618" Text="You might want to check out fmod.org&#xD;&#xA;" />
  <row Id="24033" PostHistoryTypeId="2" PostId="11275" RevisionGUID="b211f447-47d4-4348-aeb2-4981428c0d18" CreationDate="2011-04-18T09:08:21.907" UserId="4129" Text="I have found it easier myself to put the playing of audio in the platform-specific code rather than trying to use a works-portably library to wrap it.&#xD;&#xA;&#xD;&#xA;The discussion then comes what format to use.  MP3 works well everywhere." />
  <row Id="24034" PostHistoryTypeId="25" PostId="11266" RevisionGUID="b475184b-0d3b-4cc8-aa07-f1928dea9ed3" CreationDate="2011-04-18T09:09:27.460" Comment="http://twitter.com/#!/StackGameDev/status/59906374708117504" />
  <row Id="24035" PostHistoryTypeId="5" PostId="11263" RevisionGUID="6aa64713-bed5-4907-8937-d730bb5a8ce6" CreationDate="2011-04-18T09:17:57.090" UserId="1839" Comment="added 79 characters in body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: &#xD;&#xA;&#xD;&#xA; 1. [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2] &#xD;&#xA;&#xD;&#xA; 2. Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3]&#xD;&#xA;&#xD;&#xA; 3. Kacic/Bullock &quot;A practical dynamics system&quot; SIGRAPH 2003, unfortunely I couldn't find it with a quick google search anymore.  &#xD;&#xA;&#xD;&#xA;Those papers were mentioned in another great article from Nick Porcino (LucasArts) in one of the gems-books [Gems 4][4] &quot;Writing a Verlet-Based Physics Engine&quot;. Its not free, but its worth every penny.   &lt;br&gt;   &#xD;&#xA;Also have a look at other engines, here is the source for the [Bullet Physics Engine][5]. &lt;br&gt;  &#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) &lt;br&gt;&lt;br&gt;&#xD;&#xA;Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine with a competitive feature-list on your own, however it's a great learning experience! &lt;br&gt;  &#xD;&#xA;As soon as you have a simple engine running, my advice is: make test-scenarios where you compare the result or your engine with the result of another engine. This helped me find a lot of errors and it will improve your interface; something like appling a similar force for 1 second at the same body in both engines.  &lt;br&gt;  &lt;br&gt; Last but not least: Ignore collisions when you start, focus on a stable simulation first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/ref=sr_1_1?ie=UTF8&amp;qid=1303115129&amp;sr=8-1&#xD;&#xA;  [5]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24036" PostHistoryTypeId="2" PostId="11276" RevisionGUID="35656ded-ff6f-405e-9b6b-e73d6c371457" CreationDate="2011-04-18T09:46:01.080" UserId="2933" Text="I feel like what I'm currently doing is stupid but would just like reaffirmation it is. Basically I'm writing games which target a certain screen resolution (800x480), so all positions, widths and heights I set for sprites is for that resolution.&#xD;&#xA;&#xD;&#xA;On the engine side I have special scalers which will change the width and height of what is being drawn to meet the current platforms res, so for example if the platforms screen res is 1200x720 I will stretch a sprite by a factor of:&#xD;&#xA;&#xD;&#xA;    1280 / 800.0f;&#xD;&#xA;    720 / 480.0f;&#xD;&#xA;&#xD;&#xA;Positions are also offset and manipulated in a similar way.&#xD;&#xA;&#xD;&#xA;I really feel I should move to a normalized system for widths and positions (i.e. 0 to 1) but at the same time feel this is more intuitive since the first platform I target is 800x480 and I already kind of have a good udnerstanding of dimensions and such for that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So my question is, is it really that bad to target a specific ccreen res then in the engine side modify this res to meet different platforms?" />
  <row Id="24037" PostHistoryTypeId="1" PostId="11276" RevisionGUID="35656ded-ff6f-405e-9b6b-e73d6c371457" CreationDate="2011-04-18T09:46:01.080" UserId="2933" Text="Designing for multiple screen resolutions and aspect ratios, target one resolution then scale to meet others or use normalized values?" />
  <row Id="24038" PostHistoryTypeId="3" PostId="11276" RevisionGUID="35656ded-ff6f-405e-9b6b-e73d6c371457" CreationDate="2011-04-18T09:46:01.080" UserId="2933" Text="&lt;sprites&gt;&lt;interface&gt;&lt;aspect-ratio&gt;" />
  <row Id="24039" PostHistoryTypeId="2" PostId="11277" RevisionGUID="b55f03ec-149c-47e6-87af-a300f8d733bc" CreationDate="2011-04-18T10:33:48.933" UserId="4410" Text="The only part of the FAQ I could see that came close to answering this is [here][1]. It states:&#xD;&#xA;&#xD;&#xA;**Who owns the IP rights to the game I create?&#xD;&#xA;Can I distribute my game on non-Microsoft services?**&#xD;&#xA;You own the complete IP rights to your game, and you're free to distribute through any service of your choosing. However, we may provide incentives for exclusive distribution through Microsoft services.&#xD;&#xA;&#xD;&#xA;Looking through the App Hub community forums it seems others have asked the same question and consensus seems to be it won't be a problem. For example, one person is already giving away the code for their game [here][2].&#xD;&#xA;&#xD;&#xA;As others have said, if you're still not sure on reading all of this then stay on the side of caution or consult a lawyer. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/home/faq/xbox_live_indie_games#xboxfaq011&#xD;&#xA;  [2]: http://zeboyd.com/free-stuff/" />
  <row Id="24040" PostHistoryTypeId="5" PostId="11263" RevisionGUID="9ddb9f1d-be54-4d6e-9c7c-8b060cd2010f" CreationDate="2011-04-18T10:45:41.363" UserId="1839" Comment="edited body" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: &#xD;&#xA;&#xD;&#xA; 1. [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2] &#xD;&#xA;&#xD;&#xA; 2. Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3]&#xD;&#xA;&#xD;&#xA; 3. Kacic/Bullock &quot;A practical dynamics system&quot; SIGRAPH 2003, unfortunely I couldn't find it with a quick google search anymore.  &#xD;&#xA;&#xD;&#xA;Those papers were mentioned in another great article from Nick Porcino (LucasArts) in one of the gems-books [Gems 4][4] &quot;Writing a Verlet-Based Physics Engine&quot;. Its not free, but its worth every penny.   &lt;br&gt;   &#xD;&#xA;Also have a look at other engines, here is the source for the [Bullet Physics Engine][5]. &lt;br&gt;  &#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) &lt;br&gt;&lt;br&gt;&#xD;&#xA;Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine with a competitive feature-list on your own, however it's a great learning experience! &lt;br&gt;  &#xD;&#xA;As soon as you have a simple engine running, my advice is: make test-scenarios where you compare the result of your engine with the result of another engine. This helped me find a lot of errors and it will improve your interface; something like appling a similar force for 1 second at the same body in both engines.  &lt;br&gt;  &lt;br&gt; Last but not least: Ignore collisions when you start, focus on a stable simulation first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/ref=sr_1_1?ie=UTF8&amp;qid=1303115129&amp;sr=8-1&#xD;&#xA;  [5]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24041" PostHistoryTypeId="2" PostId="11278" RevisionGUID="834fcba8-057a-497f-b4d8-ced88d7342ef" CreationDate="2011-04-18T11:13:36.290" UserId="6588" Text="A cross-platform development tool that is so new I don't necessarily recommend it is http://www.monkeycoder.co.nz/&#xD;&#xA;&#xD;&#xA;It hits every platform you mentioned.&#xD;&#xA;&#xD;&#xA;While it is too new to really judge, it has a great pedigree: it's creator previously made Blitz3D and BlitzMax, which were great development tools for indie game developers." />
  <row Id="24042" PostHistoryTypeId="6" PostId="4887" RevisionGUID="5663f2de-46bf-4d3f-9cde-3f4bc8f91a0a" CreationDate="2011-04-18T11:44:52.043" UserId="2698" Comment="edited tags" Text="&lt;c++&gt;&lt;list&gt;" />
  <row Id="24043" PostHistoryTypeId="2" PostId="11279" RevisionGUID="0734603c-ed16-4099-bfd2-2549c54dc09a" CreationDate="2011-04-18T11:54:19.337" UserId="-1" Text="" />
  <row Id="24044" PostHistoryTypeId="2" PostId="11280" RevisionGUID="08a841f5-e34e-452b-9733-15ec44a26bc7" CreationDate="2011-04-18T11:54:19.337" UserId="-1" Text="" />
  <row Id="24045" PostHistoryTypeId="6" PostId="4788" RevisionGUID="977e0015-b50e-43a1-814c-c13d1a0b9063" CreationDate="2011-04-18T11:59:11.813" UserId="2698" Comment="edited tags" Text="&lt;graphics&gt;&lt;svg&gt;&lt;vector-art&gt;" />
  <row Id="24046" PostHistoryTypeId="6" PostId="2196" RevisionGUID="f4b59230-2db2-49f5-ac14-95ed053d6395" CreationDate="2011-04-18T11:59:13.123" UserId="2698" Comment="edited tags" Text="&lt;xna&gt;&lt;2d&gt;&lt;graphics&gt;&lt;art&gt;&lt;vector-art&gt;" />
  <row Id="24047" PostHistoryTypeId="25" PostId="11276" RevisionGUID="b7afab62-ce3d-476a-b1aa-6eca2bc44293" CreationDate="2011-04-18T12:09:27.453" Comment="http://twitter.com/#!/StackGameDev/status/59951673749155840" />
  <row Id="24048" PostHistoryTypeId="2" PostId="11281" RevisionGUID="fae3235b-38ae-4303-868e-0fa8dc2fbbe5" CreationDate="2011-04-18T12:29:19.477" UserId="6655" Text="Maik is right, Baraff's papers are an excellent start, but don't forget Chris Heckers write-up on rigid body dynamics: http://chrishecker.com/Rigid_Body_Dynamics !&#xD;&#xA;&#xD;&#xA;Also his advice on &quot;[..] you will throw your engine away&quot; is entirely true. But you will learn a lot!&#xD;&#xA;&#xD;&#xA;Regarding the CUDA/OpenCL part of your question: If you know CUDA then switching to OpenCL becomes very easy. I'd recommend learning CUDA first, because there are so many good tutorials, example code and computation libraries out there. For example:&#xD;&#xA;&#xD;&#xA;- CUDA show case with many examples on simulations: http://www.nvidia.com/object/cuda_apps_flash_new.html&#xD;&#xA;- CUDA/OpenCL programming and best practice guides: http://developer.nvidia.com/cuda-toolkit-32-downloads&#xD;&#xA;- Thrust library for easy common CUDA computation tasks: http://code.google.com/p/thrust/&#xD;&#xA;&#xD;&#xA;But be aware: Getting started on CUDA is easy, getting started on physics simulation is a good bit harder, but combining both is quite a challenge!" />
  <row Id="24049" PostHistoryTypeId="2" PostId="11282" RevisionGUID="84a1fabb-0360-49b1-8275-a80008816a8f" CreationDate="2011-04-18T12:46:57.497" UserId="6655" Text="It depends if any of your physics can happen outside the flat player space.&#xD;&#xA;&#xD;&#xA;As ghostonline said debris and ragdoll animations are a classic example of out-of-2D physics in an 2.5D game.&#xD;&#xA;&#xD;&#xA;Another example is bullets: If there are any projectiles in your game, do they follow the curvature of your 2D space or do the travel straight ahead even if that means they will leave those bounds?&#xD;&#xA;&#xD;&#xA;Also mapping a physical 2D space to a curved 3D visualization correctly is (correct me if I'm mistaken) .. not that easy. You will need an injective projection functions probably involving lots of splines or something similar.&#xD;&#xA;&#xD;&#xA;While having curved 2D game spaces is a nice add-on, it requires quite some overhead for the code. That might be the reason why there is no such thing in Trine. But the game was fun anyway, wasn't it? I'd think twice about a feature like that." />
  <row Id="24050" PostHistoryTypeId="5" PostId="11263" RevisionGUID="233c5d3c-9506-4b18-a10c-100e32983bf6" CreationDate="2011-04-18T12:52:34.907" UserId="2332" Comment="Added link to Kacic's paper" Text="Here is how I learned to write a physics engine, its all free and highly recommendable: &#xD;&#xA;&#xD;&#xA; 1. [David Baraff's papers][1] particulary [An Introduction to Physically Based Modeling][2] &#xD;&#xA;&#xD;&#xA; 2. Brian Vincent Mirtich's Thesis [Impulse-based Dynamic Simulation of Rigid Body Systems][3]&#xD;&#xA;&#xD;&#xA; 3. Kacic/Bullock [&quot;A practical dynamics system&quot;][4] SIGRAPH 2003, *EDIT: Link added*.  &#xD;&#xA;&#xD;&#xA;Those papers were mentioned in another great article from Nick Porcino (LucasArts) in one of the gems-books [Gems 4][5] &quot;Writing a Verlet-Based Physics Engine&quot;. Its not free, but its worth every penny.   &lt;br&gt;   &#xD;&#xA;Also have a look at other engines, here is the source for the [Bullet Physics Engine][6]. &lt;br&gt;  &#xD;&#xA;About the CUDA/OpenCL implementation: make it run on the CPU first, it's complicated enough :) &lt;br&gt;&lt;br&gt;&#xD;&#xA;Be aware that most likely you will throw your engine away after a while, since its just too hard to make a stable and well integrated physics engine with a competitive feature-list on your own, however it's a great learning experience! &lt;br&gt;  &#xD;&#xA;As soon as you have a simple engine running, my advice is: make test-scenarios where you compare the result of your engine with the result of another engine. This helped me find a lot of errors and it will improve your interface; something like appling a similar force for 1 second at the same body in both engines.  &lt;br&gt;  &lt;br&gt; Last but not least: Ignore collisions when you start, focus on a stable simulation first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.cmu.edu/~baraff/&#xD;&#xA;  [2]: http://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf&#xD;&#xA;  [3]: http://www.kuffner.org/james/software/dynamics/mirtich/index.html&#xD;&#xA;  [4]: http://webuser.uni-weimar.de/~caw/papers/p7-kacic-alesic.pdf&#xD;&#xA;  [5]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/ref=sr_1_1?ie=UTF8&amp;qid=1303115129&amp;sr=8-1&#xD;&#xA;  [6]: http://code.google.com/p/bullet/source/browse" />
  <row Id="24051" PostHistoryTypeId="9" PostId="4887" RevisionGUID="810e9dd0-75dc-4b51-9baf-b376e8eb41b1" CreationDate="2011-04-18T13:03:17.717" UserId="1101" Comment="Rollback to [6afe187a-99d7-43e5-8e17-cf37fe15a5fb]" Text="&lt;c++&gt;&lt;vector&gt;&lt;list&gt;" />
  <row Id="24052" PostHistoryTypeId="5" PostId="8692" RevisionGUID="165f044b-ae2f-426c-bb4d-c058cb6f3dee" CreationDate="2011-04-18T13:04:05.813" UserId="2698" Comment="What if you're the top answer? Use names. :)" Text="I agree with Josh Petrie's answer, use ray cast to find intersection with an imaginary sphere now find the vector from intersection point to the center of the sphere for the first mouse position, now repeat the step for the next mouse position, you will have two vectors, make a cross product to the find the axis that you should rotate your camera around.   " />
  <row Id="24053" PostHistoryTypeId="24" PostId="8692" RevisionGUID="165f044b-ae2f-426c-bb4d-c058cb6f3dee" CreationDate="2011-04-18T13:04:05.813" Comment="Proposed by 2698 approved by 189 edit id of 330" />
  <row Id="24054" PostHistoryTypeId="5" PostId="11280" RevisionGUID="7cf923e5-6548-4f54-80ac-5e2f3b41e5d9" CreationDate="2011-04-18T13:08:41.003" UserId="2698" Comment="added 212 characters in body" Text="A mathematical concept for expressing position, direction and velocity and which simplify or outright trivialise numerous spatial problems. They make the life of any game developer who works with geometry easier." />
  <row Id="24055" PostHistoryTypeId="24" PostId="11280" RevisionGUID="7cf923e5-6548-4f54-80ac-5e2f3b41e5d9" CreationDate="2011-04-18T13:08:41.003" Comment="Proposed by 2698 approved by -1 edit id of 329" />
  <row Id="24056" PostHistoryTypeId="5" PostId="11280" RevisionGUID="1652f10a-125e-42fc-a1fe-8f08ad5b0479" CreationDate="2011-04-18T13:08:41.567" UserId="189" Comment="deleted 66 characters in body" Text="A mathematical concept that can be used to express position, direction or velocity and which can simplify or outright trivialise spatial problems." />
  <row Id="24057" PostHistoryTypeId="5" PostId="11279" RevisionGUID="032b5f0d-952b-4c18-99ef-48ade800dc12" CreationDate="2011-04-18T13:08:59.333" UserId="2698" Comment="added 745 characters in body" Text="&gt; ### Why do we care about linear algebra? ###&#xD;&#xA;&gt;&#xD;&#xA;&gt; Linear algebra is the study of **vectors**. If your game involves the position of an on-screen button, the direction of a camera, or the velocity of a race car, you will have to use vectors. The better you understand linear algebra, the more control you will have over the behavior of these vectors. &#xD;&#xA;&gt;&#xD;&#xA;&gt; — _from the tutorial you're about to see the link to_&#xD;&#xA;&#xD;&#xA;An excellent two-part introduction to vectors within the context of game development can be found here: &#xD;&#xA;[Linear Algebra for Game Developers Part 1][1] / [Part 2][2]&#xD;&#xA;&#xD;&#xA;[1]:http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;[2]:http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/" />
  <row Id="24058" PostHistoryTypeId="24" PostId="11279" RevisionGUID="032b5f0d-952b-4c18-99ef-48ade800dc12" CreationDate="2011-04-18T13:08:59.333" Comment="Proposed by 2698 approved by 189 edit id of 328" />
  <row Id="24059" PostHistoryTypeId="5" PostId="11279" RevisionGUID="4ca07b64-2717-4801-b2e1-b1364840b19f" CreationDate="2011-04-18T13:12:14.247" UserId="189" Comment="added 340 characters in body" Text="&gt; ### Why do we care about linear algebra? ###&#xD;&#xA;&gt;&#xD;&#xA;&gt; Linear algebra is the study of **vectors**. If your game involves the position of an on-screen button, the direction of a camera, or the velocity of a race car, you will have to use vectors. The better you understand linear algebra, the more control you will have over the behavior of these vectors. &#xD;&#xA;&gt;&#xD;&#xA;&gt; — _from the tutorial you're about to see the link to_&#xD;&#xA;&#xD;&#xA;An excellent two-part introduction to vectors within the context of game development can be found here: &#xD;&#xA;[Linear Algebra for Game Developers Part 1][1] / [Part 2][2]&#xD;&#xA;&#xD;&#xA;In several programming languages, &quot;Vector&quot; is also used to refer to a one-dimensional dynamically sized array, rather than the mathematical Euclidean vector explained above. Any questions discussing the array version most likely belong in [Stack Overflow][3] or otherwise should not be given this tag.&#xD;&#xA;&#xD;&#xA;[1]:http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;[2]:http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/&#xD;&#xA;[3]:http://www.stackoverflow.com/" />
  <row Id="24060" PostHistoryTypeId="2" PostId="11283" RevisionGUID="1152a5d4-503a-4410-a13b-da1823a0a2e6" CreationDate="2011-04-18T13:19:36.267" UserId="189" Text="If you don't have access to a Windows machine to do the conversion, you can try loading the .max files in [Blender3D][1] (free, cross-platform) and then exporting them to a format which Panda3D can open. In Blender3D, go to File &gt; Import &gt; 3ds and then open the max file; then export it to one of the formats that Panda3D supports, such as the .x format.&#xD;&#xA;&#xD;&#xA;Support for 3ds files in Blender is probably not as perfect as opening them in 3D Studio Max itself, but it should hopefully do the trick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/" />
  <row Id="24061" PostHistoryTypeId="5" PostId="11274" RevisionGUID="6f536865-bd52-4c33-b921-9f0caab9211c" CreationDate="2011-04-18T13:39:53.120" UserId="189" Comment="added link" Text="You might want to check out [fmod][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fmod.org/" />
  <row Id="24062" PostHistoryTypeId="2" PostId="11284" RevisionGUID="24308c5a-5187-4515-a316-d93554502c00" CreationDate="2011-04-18T14:03:22.767" UserId="5874" Text="Using XNA, is it possible to access the GameTime object *before* Update is called for the first time?&#xD;&#xA;&#xD;&#xA;Can it be used in the game constructor, Initialize or LoadContent methods?" />
  <row Id="24063" PostHistoryTypeId="1" PostId="11284" RevisionGUID="24308c5a-5187-4515-a316-d93554502c00" CreationDate="2011-04-18T14:03:22.767" UserId="5874" Text="XNA GameTime before first Update" />
  <row Id="24064" PostHistoryTypeId="3" PostId="11284" RevisionGUID="24308c5a-5187-4515-a316-d93554502c00" CreationDate="2011-04-18T14:03:22.767" UserId="5874" Text="&lt;xna&gt;&lt;gameloop&gt;" />
  <row Id="24065" PostHistoryTypeId="2" PostId="11285" RevisionGUID="20cc3ab3-d8d4-4c6a-b1cb-76dbb3136a06" CreationDate="2011-04-18T14:18:50.803" UserId="6812" Text="As I am using Unity, I can easily grab a square of pixels of any length. However, I want to find the largest circle possible within that square of pixels.&#xD;&#xA;&#xD;&#xA;So for instance, if I had a 40 x 40 square of pixels, how would I get an array of pixels that form a circle inside of the square?" />
  <row Id="24066" PostHistoryTypeId="1" PostId="11285" RevisionGUID="20cc3ab3-d8d4-4c6a-b1cb-76dbb3136a06" CreationDate="2011-04-18T14:18:50.803" UserId="6812" Text="How to find the largest circle possible in a square of pixels." />
  <row Id="24067" PostHistoryTypeId="3" PostId="11285" RevisionGUID="20cc3ab3-d8d4-4c6a-b1cb-76dbb3136a06" CreationDate="2011-04-18T14:18:50.803" UserId="6812" Text="&lt;unity&gt;" />
  <row Id="24068" PostHistoryTypeId="5" PostId="106" RevisionGUID="7135126f-b318-4d59-9896-7ba3d5f76308" CreationDate="2011-04-18T14:30:10.523" UserId="284" Comment="added 27 characters in body" Text="[Lost Garden][1] has lots of free graphics that you can use in your games.&#xD;&#xA;&#xD;&#xA;For RPG Games you have a [cool 32x32 tileset][2](edit: url no longer valid) and lots of [free to use sprites, objects, icons, etc.][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/search/label/free%20game%20graphics&#xD;&#xA;  [2]: http://www.rpg-palace.com/artists/xpexterior.php&#xD;&#xA;  [3]: http://untamed.wild-refuge.net/rmxpresources.php?characters" />
  <row Id="24069" PostHistoryTypeId="25" PostId="11285" RevisionGUID="c79fc618-7219-4548-bb5a-71bf8ea03cc4" CreationDate="2011-04-18T15:09:27.727" Comment="http://twitter.com/#!/StackGameDev/status/59996973759070208" />
  <row Id="24070" PostHistoryTypeId="5" PostId="11259" RevisionGUID="d87e722c-a8cf-4a05-8766-92bdcf550df3" CreationDate="2011-04-18T15:25:17.563" UserId="6797" Comment="added 8 characters in body; added 19 characters in body" Text="If differentiating your player locations is important to your game, perhaps you need consider alternative perspectives on the world.&#xD;&#xA;&#xD;&#xA;The games you reference, and most common for the genre, are out-of-starship third-person perspectives.  One alternative would be to take a first-person perspective at the trade depot, allowing the biology, culture (architecture, language, etc.) and surrounding environment (atmosphere, star light, etc.) take a more dominate role in your game.&#xD;&#xA;&#xD;&#xA;In other words, if it is the space between is the boring/repetition parts, eliminate that and associated travel time from the player's experience.&#xD;&#xA;&#xD;&#xA;If you're not willing to jump that far out of genre, some games have had success with color (star light and nebulous backdrops) and sound (radio noise from local culture, with possible interference from local celestial bodies).&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;**Edit:** Since you already mentioned &quot;a dock to repair/refuel, a shop to trade, a bar&quot;, let me elaborate with some questions&#xD;&#xA;&#xD;&#xA;*   How does star type and planet orbit relate to the habitable zone?&#xD;&#xA;*   How does this affect the planet's biosphere?&#xD;&#xA;*   How did the local species evolve in this environment?&#xD;&#xA;*   Did the traders evolve here?  If not what in the environment brings them to this world?&#xD;&#xA;*   How does the biology affect the culture?&#xD;&#xA;    *  How large are the inhabitants, and how does that change the player's perspective.&#xD;&#xA;    *  What would they eat and drink? (Or more aptly, how would the player observe locals being served, since eating is probably not in the player's scope of interaction?)&#xD;&#xA;    * How segregate or ingrained is the surround biology into the urban/trading post environment?&#xD;&#xA;    *  How is the biology adapted to the environment and the climate or weather?&#xD;&#xA;*   What is the architecture like?&#xD;&#xA;    *   What is the scale of the architecture?  Caves or hobbit holes? Skyscrapers? Castles? Arcologies? Ring worlds?&#xD;&#xA;    *   What colors and shapes define cultural artifacts and architectural details?&#xD;&#xA;    *   What materials and technologies are available for buildings?  Carved in rock? Built from glass or gold? Grown out of trees or crystal nanites?&#xD;&#xA;    *   What environmental protection/exposure is the architecture supposed to provide?  Extreme weather? Radiation? Meteorites?  Ocean-going access?&#xD;&#xA;*   What is the dominant economy, and how does this reflect in the values of the culture?&#xD;&#xA;    *   Mining? Agriculture? Trade? Science &amp; Technology?&#xD;&#xA;    *   Are there different classes/castes/genders in the culture, and if so, who would the player be interacting with?&#xD;&#xA;*   How would local culture or customs influence communication, trade, contracts, and the surround social environment?&#xD;&#xA;    *   How do they feeling about outsiders, like the player?&#xD;&#xA;    *   How close is the player allowed to everyday citizens, and what obstacles are presented along the way? Security outposts? Quarantine isolation?  Guarded at gun point?  Or just invited to the local bar for drinks?  Possibly showered with gifts to smooth business relations?&#xD;&#xA;    *   Is the culture more formal or informal?  Does the player trade with an accountant like book-keeper, or to they haggle with a dock-hand at the space dock?&#xD;&#xA;    *   How is trade conducted?  Free trade between private parties? Government run customs checkpoint?&#xD;&#xA;    *   Are the NPCs prone to gossip? Do they expect bribes?  Are they supportive of the local authority, or prone to rebellion?&#xD;&#xA;*   In any of the above questions, is there any variety exposed to the player?&#xD;&#xA;    *   Are there multiple locations on a planet or in a system open to foreign trade?  Are they located in different climates? Do they represent different nations?  Do they share a world or social outlook?&#xD;&#xA;&#xD;&#xA;These are just a handful of questions you can consider to differentiate the player experiences.  Obviously it would be a huge undertaking to address all of them in a single procedural system, but a textual prototype might help you navigate them for what is important for your vision of the player's experience.&#xD;&#xA;&#xD;&#xA;The beauty about using culture and biology to differentiate locations, is that you can also use it to ties different places together.  A starfaring civilization will bring it heritage with it, which will allow a player to recognize the similarities, as well as the differences.&#xD;&#xA;" />
  <row Id="24071" PostHistoryTypeId="4" PostId="11285" RevisionGUID="91f7ca89-553e-42c2-868e-9e17aa9e11a2" CreationDate="2011-04-18T15:38:58.037" UserId="3505" Comment="Clarified that this about Unity more than maths." Text="Unity, how to find the largest circle possible in a square of pixels." />
  <row Id="24072" PostHistoryTypeId="24" PostId="11285" RevisionGUID="91f7ca89-553e-42c2-868e-9e17aa9e11a2" CreationDate="2011-04-18T15:38:58.037" Comment="Proposed by 3505 approved by 1156 edit id of 331" />
  <row Id="24073" PostHistoryTypeId="2" PostId="11286" RevisionGUID="c74d497e-2468-4426-9fc3-39a1a0e43bdb" CreationDate="2011-04-18T15:41:15.357" UserId="5864" Text="On a 40×40 square of pixels, you can draw a circle with approximately 40×sqrt(8) pixels.&#xD;&#xA;&#xD;&#xA;If you are looking for a circle drawing algorithm to let you pick the pixels to put in your array, an easy way is to draw an eighth of the circle, then mirror it three times. It's the [midpoint algorithm][1].&#xD;&#xA;&#xD;&#xA; [1]: http://en.wikipedia.org/wiki/Midpoint_circle_algorithm" />
  <row Id="24074" PostHistoryTypeId="5" PostId="11286" RevisionGUID="2c9d38a5-b550-4682-9d5f-366d765522a0" CreationDate="2011-04-18T15:49:10.017" UserId="5864" Comment="clarify" Text="On a 40×40 square of pixels, you can draw a circle with approximately 40×sqrt(8) pixels.&#xD;&#xA;&#xD;&#xA;If you are looking for a circle drawing algorithm to let you pick the pixels to put in your array, an easy way is to draw an eighth of the circle, for instance using the [midpoint algorithm][1], then mirror it three times.&#xD;&#xA;&#xD;&#xA; [1]: http://en.wikipedia.org/wiki/Midpoint_circle_algorithm" />
  <row Id="24075" PostHistoryTypeId="5" PostId="11267" RevisionGUID="dbd4e593-8215-40d5-b629-616a57ffd2b3" CreationDate="2011-04-18T15:50:42.840" UserId="-1" Comment="formatted code better" Text="you can make a model with some base color and replace that color with a shader.&#xD;&#xA;&#xD;&#xA;    color = texture_color(x,y);&#xD;&#xA;&#xD;&#xA;    if(color == base_color)&#xD;&#xA;        color = team_color;" />
  <row Id="24076" PostHistoryTypeId="24" PostId="11267" RevisionGUID="dbd4e593-8215-40d5-b629-616a57ffd2b3" CreationDate="2011-04-18T15:50:42.840" Comment="Proposed by 142.227.188.60|2844fbe9-4a49-487f-bc0b-ea7df8d69ffe approved by 14 edit id of 332" />
  <row Id="24077" PostHistoryTypeId="2" PostId="11287" RevisionGUID="cea5559e-43a1-46b7-a300-14249b389d03" CreationDate="2011-04-18T15:52:42.307" UserId="1829" Text="I remember having spotted a link to a huge page with different equations to non linear interpolation curves, for example if you want to stop a car smoothly, etc.&#xD;&#xA;&#xD;&#xA;Those can sometime be useful to emulate some real-world acceleration/velocity behaviors without the help of a physics engine, which can really simplify the code.&#xD;&#xA;&#xD;&#xA;Any idea where this page is ? I can't manage to give google the right keywords..." />
  <row Id="24078" PostHistoryTypeId="1" PostId="11287" RevisionGUID="cea5559e-43a1-46b7-a300-14249b389d03" CreationDate="2011-04-18T15:52:42.307" UserId="1829" Text="Animated examples of different interpolations formulas: any link ?" />
  <row Id="24079" PostHistoryTypeId="3" PostId="11287" RevisionGUID="cea5559e-43a1-46b7-a300-14249b389d03" CreationDate="2011-04-18T15:52:42.307" UserId="1829" Text="&lt;math&gt;&lt;physics&gt;&lt;simulations&gt;" />
  <row Id="24080" PostHistoryTypeId="2" PostId="11288" RevisionGUID="68b90343-8cbf-4c98-8afe-63018997e15c" CreationDate="2011-04-18T16:21:20.273" UserId="51" Text="If you had searched for &quot;easing formulas&quot; it would've been the first result.&#xD;&#xA;&#xD;&#xA;http://www.gizma.com/easing/" />
  <row Id="24081" PostHistoryTypeId="2" PostId="11289" RevisionGUID="41a4746d-c8a7-4e33-b765-ad2fc9b12661" CreationDate="2011-04-18T16:31:54.240" UserId="51" Text="&gt; So my question is, is it really that bad to target a specific screen res then in the engine side modify this res to meet different platforms?&#xD;&#xA;&#xD;&#xA;Generally speaking, no.  Changing the scale of your number and then normalizing to 0..1 later just means it's easier to design the UI.&#xD;&#xA;&#xD;&#xA;The one thing that'll bite you on this, though, are different aspect ratios.  If you're authoring on a coordinate system that's, for example, 4:3, things are going to stretch pretty bad at 16:9.&#xD;&#xA;&#xD;&#xA;There are a couple of solutions to this.  One is to just accept the stretching.  Another is to stretch to fill the screen area, and just not have any UI in the side areas if you are displaying on a screen that's wider.&#xD;&#xA;&#xD;&#xA;A more robust solution, though, is to set up some kind of anchoring system.  Generally speaking, you want certain elements near the edges of the screen.  You set up your widgets such that the &quot;quit&quot; button is in the &quot;upper left&quot;, offset by some amount.  Then when your resolution changes, the button's absolute position shifts such that it makes sense.   " />
  <row Id="24082" PostHistoryTypeId="2" PostId="11290" RevisionGUID="8b47899e-d48d-45f6-b0d8-495d163f6caf" CreationDate="2011-04-18T16:43:21.620" UserId="4443" Text="You might want to consider only scaling some things, specifically the positions of the layouts. But then leave the actual size of the UI elements the same and allow the user to step it up in increments as they see fit. This should give you a layout that works between resolution and aspect ratios as well as increasing the options the user has in how predominant the UI is on their screen all while solving the issue you are addressing.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="24084" PostHistoryTypeId="5" PostId="11266" RevisionGUID="8288256e-105c-4cdd-ae38-869459e2b1ed" CreationDate="2011-04-18T17:11:13.520" UserId="20" Comment="removed tag from title." Text="Ok, so here is my current situation. I have a player model, fully UV mapped, and textured. At first I made multiple bitmaps for the character representing multiple colors for each team in the game. (red, blue, green, yellow, etc) Well, as my player count build up, space lowers. So I needed to make a new method of keeping the game effecient, clean, and fast. So I thought of the idea of having a color mask (alpha map covering the areas to be colored). I am using OpenGL, and I just have NO idea on where to begin! &#xD;&#xA;&#xD;&#xA;So I ask you, are there any libraries? methods? anything that could help me do this?" />
  <row Id="24085" PostHistoryTypeId="4" PostId="11266" RevisionGUID="8288256e-105c-4cdd-ae38-869459e2b1ed" CreationDate="2011-04-18T17:11:13.520" UserId="20" Comment="removed tag from title." Text="Changing player color without multiple player bitmaps" />
  <row Id="24089" PostHistoryTypeId="2" PostId="11293" RevisionGUID="632d6bb9-4e6e-4b6d-86f9-a473a593c688" CreationDate="2011-04-18T17:33:18.657" UserId="6042" Text="I recommend using the same idea that they use in movies - [chroma key][1]. Reserve one color that you don't otherwise use in your textures (e.g. green, blue, magenta). Let's call it the &quot;reserved color.&quot; In the engine, make a matrix that rotates the &quot;reserved color&quot; onto the &quot;player color&quot; you wish to render at the moment. &#xD;&#xA;&#xD;&#xA;Set this matrix as a pixel shader constant. In the pixel shader, compute the chroma of the pixel color and find its angle to the &quot;reserved color's&quot; chroma. Lerp the pixel color to the pixel color transformed by the matrix, according to how close the pixel's chroma is to the reserved color's chroma.&#xD;&#xA;&#xD;&#xA;Why do this instead of using an alpha channel? Because when textures are DXT compressed, adding an alpha channel makes your texture 2x bigger. A matrix multiply and a little bit of trig in the pixel shader is a lot cheaper than reading 2x as much memory - and will become even cheaper as the years roll on. &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Chroma_key" />
  <row Id="24092" PostHistoryTypeId="2" PostId="11294" RevisionGUID="e4fe8de7-4ca7-41b2-965f-5b65d93db840" CreationDate="2011-04-18T18:07:31.657" UserId="6042" Text="Devoting a texture alpha channel to team color makes DXT textures 2x bigger, so I would rather use [chroma key][1] to calculate team color. Designate one color (e.g. green, blue, magenta) as the &quot;reserved color&quot; in your textures.&#xD;&#xA;&#xD;&#xA;When the engine boots up, make a matrix for each team color that rotates the &quot;reserved color&quot; onto the team color. Just before drawing a team object, set this matrix as a pixel shader constant.&#xD;&#xA;&#xD;&#xA;In the pixel shader, transform the pixel color by the team color matrix. Lerp the untransformed pixel color with the transformed pixel color, by an amount proportional to the angle of the pixel's chroma to the &quot;reserved color's&quot; chroma.&#xD;&#xA;&#xD;&#xA;This will cost you some ALU instructions and trig in the pixel shader, but that's a lot cheaper than bloating up your texture cache with textures 2x as big.&#xD;&#xA;&#xD;&#xA;You also have the ability to have multiple chroma keys (e.g. magenta and cyan get mapped onto a primary and secondary team color) without devoting one texture channel to each color.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Chroma_key" />
  <row Id="24093" PostHistoryTypeId="25" PostId="11287" RevisionGUID="c45590e3-d120-4298-bde8-eea83ed62cb9" CreationDate="2011-04-18T18:09:27.787" Comment="http://twitter.com/#!/StackGameDev/status/60042271558606848" />
  <row Id="24094" PostHistoryTypeId="4" PostId="11285" RevisionGUID="594e2cb6-f607-4c7f-9ff3-6d5e3138ac23" CreationDate="2011-04-18T18:23:11.343" UserId="3588" Comment="Edited the title as per the conclusion from http://meta.gamedev.stackexchange.com/questions/428/adding-the-tag-to-the-title-yes-or-no" Text="How do I find the largest circle possible in a square of pixels using Unity?" />
  <row Id="24095" PostHistoryTypeId="24" PostId="11285" RevisionGUID="594e2cb6-f607-4c7f-9ff3-6d5e3138ac23" CreationDate="2011-04-18T18:23:11.343" Comment="Proposed by 3588 approved by 51 edit id of 333" />
  <row Id="24097" PostHistoryTypeId="5" PostId="11006" RevisionGUID="1606c28c-4da6-4ac9-a9a4-56c6894b1b9a" CreationDate="2011-04-18T18:24:44.477" UserId="1742" Comment="explaining designers that code vs coders that design" Text="Frequently coders are called upon to figure out if designs are possible, and also help order new features in schedules, but when it comes to actively providing creative input, each company varies wildly. Some don't have many dedicated designers and the coders are meant to &quot;add value&quot; while developing the features. In other companies there is a very strict &quot;if it's not in a design doc, it's not going in&quot;.&#xD;&#xA;&#xD;&#xA;So, choose who you work for carefully.&#xD;&#xA;&#xD;&#xA;Also, it's very possible for a coder to move to being a producer, which can lead to some more creative control, but I've not yet seen a good designer start out as a professional coder. (being a computer games enthusiast turned bedroom coder doesn't count, as many games designers have to start trying their ideas out somewhere)&#xD;&#xA;&#xD;&#xA;This distinction of mine seems to have stirred up some feelings, so let me elaborate:&#xD;&#xA;&#xD;&#xA;Games developers that are first and foremost coders, the ones that started out by coding, then realising that they liked computer games and then started to develop them became games developers, those games developers I would say are probably a bit hit or miss for being games designers.&#xD;&#xA;&#xD;&#xA;The ones that started out by loving games then attacking SDKs with gusto, the ones that make mods, generate a lot of random stuff in game creation kits, only finally getting into a job where they code much later, those are games designers that can code. These ones, often, have the feel for games design that makes them good games designers.&#xD;&#xA;&#xD;&#xA;Admittedly, I'm one of the former, I do love coding games, but for the joy of developing the game, and in the case of my home projects, for seeing the reaction from my family when they play the games I make for them. I am, however, aware of my shortcomings when it comes to games design. I have to try really hard not to be blinkered into thinking like  a coder when designing games. I have to stop myself from adding features just because they're simple, and stop myself from trying to avoid adding features just because they're hard.&#xD;&#xA;&#xD;&#xA;The coders that started out by designing annoy me with their tolerance for shabby code, but when I take a step back and see what they've done with the code, I have to be humble and admit that they made the game better, regardless of how annoying they might be to work with when it comes to code cleanliness.&#xD;&#xA;&#xD;&#xA;I found a rare one at my last job that was the combination of both and wish him much luck in the future.&#xD;&#xA;&#xD;&#xA;So, although coders can be involved in the design process, add their own creativity to the mix, I think it's probably better to sum it up differently:&#xD;&#xA;Design meetings can include coders and designers, sometimes they even have the right job description." />
  <row Id="24098" PostHistoryTypeId="6" PostId="11285" RevisionGUID="370f8f83-a8b9-4e04-8998-0f1c637137f1" CreationDate="2011-04-18T18:25:24.570" UserId="51" Comment="edited tags" Text="&lt;math&gt;&lt;unity&gt;" />
  <row Id="24099" PostHistoryTypeId="2" PostId="11295" RevisionGUID="d18365c9-275e-4888-851e-5d85411d1340" CreationDate="2011-04-18T18:32:23.907" UserId="1198" Text="I don't believe this is possible:&#xD;&#xA;&#xD;&#xA;&gt; The GameTime object received by Draw&#xD;&#xA;&gt; and Update isn't technically owned by&#xD;&#xA;&gt; anyone, but is instead re-created each&#xD;&#xA;&gt; Game.Tick and passed to Update and&#xD;&#xA;&gt; Draw from there.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Internally, Tick fills the value of&#xD;&#xA;&gt; the Total/ElapsedRealTime properties&#xD;&#xA;&gt; based off of the current high&#xD;&#xA;&gt; performance counter value as reported&#xD;&#xA;&gt; by Stopwatch.GetTimestamp().  If the&#xD;&#xA;&gt; PC the program is running on does not&#xD;&#xA;&gt; have a high performance counter, then&#xD;&#xA;&gt; it returns DateTime.Now.Ticks.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The Game Time properties (as opposed&#xD;&#xA;&gt; to real-time) also use the&#xD;&#xA;&gt; Stopwatch.GetTimestamp, however&#xD;&#xA;&gt; elapsed time since application launch&#xD;&#xA;&gt; and last frame are computed internally&#xD;&#xA;&gt; and then filled in before **GameTime is&#xD;&#xA;&gt; passed to Draw or Update - so there's&#xD;&#xA;&gt; no external way to compute those&#xD;&#xA;&gt; values directly.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Source: http://forums.create.msdn.com/forums/t/10587.aspx, bold mine. Also included there are several work arounds, similar to what you've already outlined though." />
  <row Id="24101" PostHistoryTypeId="2" PostId="11296" RevisionGUID="bdfe8dfe-b9cc-42cc-abb4-ff5ac2a9aba2" CreationDate="2011-04-18T19:06:25.090" UserId="6042" Text="If I were you, I'd render two scenes: a light-only scene and an everything-else scene. First, clear the Z buffer to zNear and render the light-only scene with zCompare turned off and Z set to zFar. This will make it so unlit pixels = zNear and lit pixels = zFar.&#xD;&#xA;&#xD;&#xA;To draw the lights, the simple way is to bound each light by a rectangle on screen and render a quad with a texture of a radial gradient and additive blend.&#xD;&#xA;&#xD;&#xA;If you intend to have a very large amount of lights, eventually you will have to do it the fast way: divide the screen into tiles and for each tile, set pixel shader constants to say where each light in the tile is and what color it is, and in the pixel shader for each tile, render all the lights into pixel shader registers before finally returning only the total light with no additive blend.&#xD;&#xA;&#xD;&#xA;Anyway, after you've rendered all the lights, copy off the light color buffer somewhere else as a texture, and start to render the main scene.&#xD;&#xA;&#xD;&#xA;Since all unlit pixels were set to zNear in the light pass, you won't waste any GPU time rendering unlit pixels in the main scene, woot!&#xD;&#xA;&#xD;&#xA;If the main scene is rendered with deferred rendering, then use the light texture you made in the beginning in a deferred lighting pass. If the main scene is forward-rendered, then in the pixel shader of each object in the main scene, read in the light texture and multiply the pixel's albedo by it before writing it out." />
  <row Id="24102" PostHistoryTypeId="2" PostId="11297" RevisionGUID="25399949-f741-4ed3-994f-951f1eca63f4" CreationDate="2011-04-18T20:14:31.353" UserId="6819" Text="I know this post is somewhat old but I've recently had to tackle this situation myself and came up with what I see as a pretty efficient solution.&#xD;&#xA;&#xD;&#xA;I wrote a tumblr post about how I managed to do this.  I'm sure it's not the best way but it ended up being lightning fast.&#xD;&#xA;&#xD;&#xA;It's similar to your approach except all tiles are split into rows which are calculated and filled with vertices at the beginning of the world.  In the end, only a handful of drawcalls are done to the visible rows and from each row only a handful of vertices are used based on the viewport position.&#xD;&#xA;&#xD;&#xA;Feel free to check out the more thorough explanation:&#xD;&#xA;http://mortalparody.tumblr.com/post/4725205385/tilemapping-on-android-in-opengl-es" />
  <row Id="24103" PostHistoryTypeId="5" PostId="11268" RevisionGUID="e9ef134d-939d-46ab-9509-f518e4fbc4c7" CreationDate="2011-04-18T20:20:52.730" UserId="376" Comment="Added mouse aiming changes" Text="Since my other answer was incorrect, I deleted it, pulled your source and traced down the actual solution.&#xD;&#xA;&#xD;&#xA;The issue is that your particle renderer never gets your camera's transform matrix. Here's how you can fix it:&#xD;&#xA;&#xD;&#xA;Update your `ParticleManager.Draw` method to be the following (very slight change, just the passing of the matrix:&#xD;&#xA;&#xD;&#xA;    public void Draw(Matrix transform)&#xD;&#xA;    {&#xD;&#xA;        foreach (KeyValuePair&lt;string, ParticleEffect&gt; effectPair in particleEffects)&#xD;&#xA;        {&#xD;&#xA;            particleRenderer.RenderEffect(effectPair.Value, ref transform);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then within your `ActionScreen.Draw` method, make sure to pass along the transformation matrix:&#xD;&#xA;&#xD;&#xA;    particleManager.Draw(cam.get_transformation(game.GraphicsDevice));&#xD;&#xA;&#xD;&#xA;You might want to grab the matrix from the camera earlier in this method, so you don't end up calculating it more than once.&#xD;&#xA;&#xD;&#xA;Now comes the annoying part - this alone didn't work for me. I'm guessing it's a bug in the Mercury Particle Engine 3.1. I ended up pulling the source of the current version of Mercury (from their trunk) and compiled it myself. After dropping those assemblies in, the trails and explosions were placed correctly.&#xD;&#xA;&#xD;&#xA;For reference, I used Mercury Particle Engine's changeset [87447][1].&#xD;&#xA;&#xD;&#xA;I just looked into the mouse aiming issue and found a quick fix (may want to modify it long-term). In `Player.Update`, change this:&#xD;&#xA;&#xD;&#xA;    direction = position - mousePosition;&#xD;&#xA;&#xD;&#xA;To this:&#xD;&#xA;&#xD;&#xA;    direction = new Vector2(Game1.SCREEN_WIDTH * 0.5f, Game1.SCREEN_HEIGHT * 0.5f) - mousePosition;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mpe.codeplex.com/SourceControl/changeset/changes/87447" />
  <row Id="24104" PostHistoryTypeId="2" PostId="11298" RevisionGUID="b630fce8-0978-475b-9afa-6bd0c1549c0d" CreationDate="2011-04-18T20:42:31.703" UserId="853" Text="I'm trying to create an Augmented Reality app. I'm using OpenCV to get 4 points from a checkerboard pattern that represent the four corners of the pattern. This should be used to create a plane in my app, but the points are in 2D. &#xD;&#xA;&#xD;&#xA;Anyone here have an idea how one is to use these 4 points to create a plane and/or map a 3D object to the pattern" />
  <row Id="24105" PostHistoryTypeId="1" PostId="11298" RevisionGUID="b630fce8-0978-475b-9afa-6bd0c1549c0d" CreationDate="2011-04-18T20:42:31.703" UserId="853" Text="AR app: Mapping 3D object to 2D plane?" />
  <row Id="24106" PostHistoryTypeId="3" PostId="11298" RevisionGUID="b630fce8-0978-475b-9afa-6bd0c1549c0d" CreationDate="2011-04-18T20:42:31.703" UserId="853" Text="&lt;3d&gt;" />
  <row Id="24107" PostHistoryTypeId="2" PostId="11299" RevisionGUID="5b431fe5-1fb1-42b5-ab18-759e031c5df1" CreationDate="2011-04-18T20:50:21.347" UserId="360" Text="A little late, but posted as an answer as requested. &#xD;&#xA;&#xD;&#xA;They wont move any more because they 'hit' the platform, so you're moving them back to their previous position. You need to check their new position against the old position. If they moved down into the platform from the top (as with gravity), you just need to use their old Y position, not the X.&#xD;&#xA;&#xD;&#xA;To solve the 'sticking to the side' issue, you'd do the same as the 'sticking to the top' solution, but just revert the X and leave the Y in tact." />
  <row Id="24108" PostHistoryTypeId="5" PostId="11299" RevisionGUID="165b7fa5-9be0-4df1-9bea-ac04874b74ee" CreationDate="2011-04-18T20:55:45.973" UserId="360" Comment="added 342 characters in body" Text="A little late, but posted as an answer as requested. &#xD;&#xA;&#xD;&#xA;They wont move any more because they 'hit' the platform, so you're moving them back to their previous position. You need to check their new position against the old position. If they moved down into the platform from the top (as with gravity), you just need to use their old Y position, not the X.&#xD;&#xA;&#xD;&#xA;To solve the 'sticking to the side' issue, you'd do the same as the 'sticking to the top' solution, but just revert the X and leave the Y in tact.&#xD;&#xA;&#xD;&#xA;In the case where you move the character too far back, you could just calculate the exact X or Y position using the width/height of the bounding boxes.&#xD;&#xA;&#xD;&#xA;Eg.&#xD;&#xA;If you're using the centroid as your position, and the player is moving left-to-right and hits a wall:&#xD;&#xA;&#xD;&#xA;    player.X = (wall.X - (wall.Width / 2) - (player.width / 2);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   " />
  <row Id="24109" PostHistoryTypeId="25" PostId="11284" RevisionGUID="5aafff74-8c4b-47f0-b8d5-156fe4b4c93e" CreationDate="2011-04-18T21:09:27.657" Comment="http://twitter.com/#!/StackGameDev/status/60087569320378368" />
  <row Id="24110" PostHistoryTypeId="2" PostId="11300" RevisionGUID="4b614047-de91-435f-bcd8-b5ca03f41d14" CreationDate="2011-04-18T22:36:32.510" UserId="1021" Text="I have some small circles just rolling across the bottom of the screen in my Cocos2D/Box2D iOS app.  The bodies are dynamic... so I make them roll by applying a horizontal force to the center of mass (when the linear velocity is below the max velocity).&#xD;&#xA;&#xD;&#xA;Currently I apply this force in &quot;-(void) tick: (ccTime) dt&quot;.  Is this the best place to apply it?  Or should I subclass something and implement an update function somewhere?  Please keep in mind I'm very new to Cocos2D/Box2D.&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="24111" PostHistoryTypeId="1" PostId="11300" RevisionGUID="4b614047-de91-435f-bcd8-b5ca03f41d14" CreationDate="2011-04-18T22:36:32.510" UserId="1021" Text="Cocos2D and Box2D basics" />
  <row Id="24112" PostHistoryTypeId="3" PostId="11300" RevisionGUID="4b614047-de91-435f-bcd8-b5ca03f41d14" CreationDate="2011-04-18T22:36:32.510" UserId="1021" Text="&lt;2d-physics&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="24113" PostHistoryTypeId="2" PostId="11301" RevisionGUID="9af0cb35-cbf1-441c-920b-4db9c158fbe1" CreationDate="2011-04-18T22:52:31.863" UserId="4410" Text="There was a question on [Stack Overflow][1] that also has a link to the [ARToolkit][2] which describes the process they use a little bit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/2604097/how-to-begin-with-augmented-reality&#xD;&#xA;  [2]: http://www.hitl.washington.edu/artoolkit/documentation/index.html" />
  <row Id="24114" PostHistoryTypeId="2" PostId="11302" RevisionGUID="351e5fd1-37b5-498c-984f-e6b4544b1347" CreationDate="2011-04-18T22:54:54.310" UserId="1134" Text="Sean Barret's [GDC 2008 Sparse Virtual Texture presentation][1] was his attempt to recreate what Carmack was doing at the time.  There's source, too.  There has been some correspondence between Carmack and Barrett since then.&#xD;&#xA;&#xD;&#xA;(The presentation is a bit dense, but worth taking the time to understand -- I spent a few hour-long sessions with a whiteboard after watching it twice in the course of two days, and eventually got to the point where I think I understood it all.  Much easier if you have a fragment shader background, which I didn't at the time.  It's also really neat that the presentation _is_ the demo.)&#xD;&#xA;&#xD;&#xA;+1 to zacharmarz for mentioning the excellent GDC2011 Mega Meshes presentation by the Lionhead folks working on Milo and Kate.  There are a lot of very practical solutions mentioned therein, for example: rendering every other frame at different locations (hotspots, 180 degree turns, zooms, further along a control spline, etc) to determine texture visibility and mip levels, and communicating the results to an &quot;L2 Cache&quot;, to solve some of the texture streaming issues.  Not necessarily simple, but nonetheless elegant in its directness.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.silverspaceship.com/src/svt/" />
  <row Id="24115" PostHistoryTypeId="2" PostId="11303" RevisionGUID="f77b7bd1-2b1a-4674-8e00-2a26d7276e07" CreationDate="2011-04-18T22:58:17.007" UserId="5259" Text="So, haven't tried this before, but here is my guess at the approach.&#xD;&#xA;&#xD;&#xA;You've got four points in screen space, in 2D. Let's refer to those as the UL,UR,LL,LR corner points (upper left, upper right, etc.).&#xD;&#xA;&#xD;&#xA;Create a vector from the LL to the UL (so, along the left edge), and another vector from the LL to the LR (along the bottom edge). The cross product of these two vectors (with normalization applied where needed) give you the normal of the plane for the checkerboard.&#xD;&#xA;&#xD;&#xA;You've still got to figure out the distance of the plane from the camera; to do this, you need to figure out how the edge distances compare with what you believe they should be, and so back out the perspective scaling that's been undergone.  To get a feel for the scales, you'll probably need a calibration phase for your code where you place the checkerboard facing the camera straight on (perpendicular to the camera) and move it to different (measured and known!) distances, observing the detected lengths of the edges. From that information you can figure out the perspective transform of the camera.&#xD;&#xA;&#xD;&#xA;That should be a good start, anyways." />
  <row Id="24116" PostHistoryTypeId="2" PostId="11304" RevisionGUID="80fddf2f-0f75-42ee-b0dd-5606b801a6f0" CreationDate="2011-04-18T23:01:55.227" UserId="6042" Text="Procedural texture suffers from the problem that an Art Director can not reliably point at the work of an Artist and say &quot;please make that part a little more X.&quot; because the procedural shading system may not support X cheaply or at all.&#xD;&#xA;&#xD;&#xA;For example, a brick shader may support clean brown brick, but may not support brick that was painted with an advertisement 80 years ago and graffiti 10 years ago. Or it may not support having one purple brick out of 1,000 brown bricks. In exactly that one spot, because that spot appeals to the Art Director's taste.&#xD;&#xA;&#xD;&#xA;A real texture can support all these things of course, and in this sense a real texture is superior to a procedural texture.&#xD;&#xA;&#xD;&#xA;The procedural texture exerts artistic control by virtue of its preference for certain use cases over others. A real texture exerts little such control.&#xD;&#xA;&#xD;&#xA;GPU hardware, however, has a strong preference for proceduralism, because texture memory is so many cycles away from the ALU units that do the shading. " />
  <row Id="24117" PostHistoryTypeId="2" PostId="11305" RevisionGUID="db005425-0cb9-4952-beaa-60f3210c2ab5" CreationDate="2011-04-18T23:20:56.747" UserId="6042" Text="Midpoint displacement height mapping is a good place to start. OP, why do you think it isn't?&#xD;&#xA;&#xD;&#xA;OP is good to model the planet surface as a cubemap, because any flat map (e.g. mercator projection) is going to have distortions that are ugly and complicated, mathwise.&#xD;&#xA;&#xD;&#xA;If I were OP, I would forget the large scale planet geometry at first. I would make a cubemap where each face is 2**N+1 pixels (2,3,5,9,17,33...) and each texel encodes a height [0..N) where 0 is the altitude of the expected lowest trench and N is the altitude of the expected highest mountain on the planet.&#xD;&#xA;&#xD;&#xA;I would then calculate random heights for the eight vertices of the cube, and propagate them into the six squares of the cube map, so that each vertex shows up three times.&#xD;&#xA;&#xD;&#xA;As I recursively generate fractal heights for the midpoints of the edges, I would make sure to propagate face edge vertices to the other face that shares them.&#xD;&#xA;&#xD;&#xA;Once I'm done, I have a cube map where all the edge texels are doubled and all the corner texels are tripled. No need to convert it to a normal map - I'd use the algorithm in [Morten Mikkelsen's paper][1] to render normals directly from the heightmap at runtime.&#xD;&#xA;&#xD;&#xA;At runtime I would probably render a quad that covers the projection of the planet to the screen, and do a single ray-sphere intersection test in the pixel shader to find whether I hit the planet and where. Sure beats rasterizing a highly-tessellated sphere model, and gets a nice smooth edge too.&#xD;&#xA;&#xD;&#xA;  [1]: http://jgt.akpeters.com/papers/Mikk10/" />
  <row Id="24118" PostHistoryTypeId="2" PostId="11306" RevisionGUID="54091c57-5a32-4368-bd59-a7440ea90d7e" CreationDate="2011-04-18T23:27:13.033" UserId="6302" Text="I come from a .net web background so I am accustomed to using xml .config files.  What is the XNA equivalent?  It seems to me that using the same practice of a xml config leaves your game open to easy modification (which can be good, I know). In my day-life web development the configs live on servers where users can't access.  XNA games live purely on the client (most of the time).&#xD;&#xA;&#xD;&#xA;Say I have some values I want in a config, can the config be obfuscated or is there a different configuration management system for XNA?  Is the only solution to hardcode the values back in before release so they are not accessible?" />
  <row Id="24119" PostHistoryTypeId="1" PostId="11306" RevisionGUID="54091c57-5a32-4368-bd59-a7440ea90d7e" CreationDate="2011-04-18T23:27:13.033" UserId="6302" Text="Configuration management in XNA" />
  <row Id="24120" PostHistoryTypeId="3" PostId="11306" RevisionGUID="54091c57-5a32-4368-bd59-a7440ea90d7e" CreationDate="2011-04-18T23:27:13.033" UserId="6302" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="24121" PostHistoryTypeId="2" PostId="11307" RevisionGUID="b8f2f84c-09d8-40a5-b2a1-a857973c025f" CreationDate="2011-04-18T23:33:38.693" UserId="6042" Text="If you don't care at all about memory performance, you could store your sprites uncompressed such that pixels with color 0 are pure red, 1 are pure green, 2 are pure blue, and 3 are pure alpha.&#xD;&#xA;&#xD;&#xA;When about to render a sprite, set a matrix pixel shader constant made of four vectors that correspond to colors 0, 1, 2, 3. In the pixel shader, execute the following code to recolor the sprite texel:&#xD;&#xA;&#xD;&#xA;    float4 unpaletted = tex2D( texture, uv );&#xD;&#xA;    float4 paletted = mul( unpaletted, paletteMatrix );&#xD;&#xA;&#xD;&#xA;This works because when a pixel is color 0, it is pure red, and so it will end up as &#xD;&#xA;&#xD;&#xA;    1 * palette[0] + 0 * palette[1] + 0 * palette[2] + 0 * palette[3]&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;    1 * palette[0]&#xD;&#xA;&#xD;&#xA;and the same applies to colors 1, 2, and 3.&#xD;&#xA;&#xD;&#xA;If you do care about memory performance, then by all means store your NES palette as a 1x64 RGB uncompressed texture, set texture filtering to nearest-neighbor, store your sprites as uncompressed 8 bit single-channel textures, and do shader code something like this:&#xD;&#xA;&#xD;&#xA;    float palette_index = tex2D( texture, uv );&#xD;&#xA;    float4 color = tex1D( palette, palette_index * 255 );&#xD;&#xA;" />
  <row Id="24122" PostHistoryTypeId="5" PostId="11307" RevisionGUID="740a12f2-2bc6-4075-8cb2-7f4bb1501e40" CreationDate="2011-04-18T23:55:11.553" UserId="6042" Comment="added 1 characters in body" Text="If you don't care at all about memory performance, you could store your sprites uncompressed such that pixels with color 0 are pure red, 1 are pure green, 2 are pure blue, and 3 are pure alpha.&#xD;&#xA;&#xD;&#xA;When about to render a sprite, set a matrix pixel shader constant made of four vectors that correspond to colors 0, 1, 2, 3. In the pixel shader, execute the following code to recolor the sprite texel:&#xD;&#xA;&#xD;&#xA;    float4 unpaletted = tex2D( texture, uv );&#xD;&#xA;    float4 paletted = mul( unpaletted, paletteMatrix );&#xD;&#xA;&#xD;&#xA;This works because when a pixel is color 0, it is pure red, and so it will end up as &#xD;&#xA;&#xD;&#xA;    1 * palette[0] + 0 * palette[1] + 0 * palette[2] + 0 * palette[3]&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;    1 * palette[0]&#xD;&#xA;&#xD;&#xA;and the same applies to colors 1, 2, and 3.&#xD;&#xA;&#xD;&#xA;If you do care about memory performance, then by all means store your NES palette as a 256x1 RGB uncompressed texture, set texture filtering to nearest-neighbor, store your sprites as uncompressed 8 bit single-channel textures, and do shader code something like this:&#xD;&#xA;&#xD;&#xA;    float palette_index = tex2D( texture, uv );&#xD;&#xA;    float4 color = tex1D( palette, palette_index * 255 );&#xD;&#xA;" />
  <row Id="24123" PostHistoryTypeId="25" PostId="11306" RevisionGUID="dbfef0df-945d-4a78-a7f2-d283f45d269c" CreationDate="2011-04-19T00:09:27.463" Comment="http://twitter.com/#!/StackGameDev/status/60132868126556160" />
  <row Id="24124" PostHistoryTypeId="2" PostId="11308" RevisionGUID="85eefedc-e3d0-45ac-8bfb-ffd93c86d3ab" CreationDate="2011-04-19T00:14:23.837" UserId="6042" Text="It sounds to me like you want rectangular textures with air on top and dirt on the bottom. You can map rectangular textures to the circles by making the U texture coordinate represent angle around the circle, and V texture coordinate represent distance from the center of the circle. For larger planets, U can wrap around the planet several times.&#xD;&#xA;&#xD;&#xA;To convert from regular 2D coordinates XY to the above UV coordinates, you can do math like so:&#xD;&#xA;&#xD;&#xA;    y -= planet_center.y;&#xD;&#xA;    x -= planet_center.x;&#xD;&#xA;    u = atan2( y, x );&#xD;&#xA;    v = sqrt( y*y + x*x );&#xD;&#xA;&#xD;&#xA;Care should be taken to avoid calculating this too close to the center of the planets..." />
  <row Id="24125" PostHistoryTypeId="2" PostId="11309" RevisionGUID="0b0fb699-a4fe-496a-bf89-997994e04ba0" CreationDate="2011-04-19T00:47:25.367" UserId="1923" Text="Your dev machine takes the XML &amp; uses the content processor to convert it into a binary XNB file which is distributed to your customers. The XNA runtime on the customer device can understand and load it. The customer device does not need to ever have the raw XML on it." />
  <row Id="24126" PostHistoryTypeId="5" PostId="11303" RevisionGUID="140bd536-5bb1-4fd7-803f-50bcc3e9fcee" CreationDate="2011-04-19T01:06:02.777" UserId="5259" Comment="added 386 characters in body" Text="So, haven't tried this before, but here is my guess at the approach.&#xD;&#xA;&#xD;&#xA;You've got four points in screen space, in 2D. Let's refer to those as the UL,UR,LL,LR corner points (upper left, upper right, etc.).&#xD;&#xA;&#xD;&#xA;Create a vector from the LL to the UL (so, along the left edge), and another vector from the LL to the LR (along the bottom edge). The cross product of these two vectors (with normalization applied where needed) give you the normal of the plane for the checkerboard.&#xD;&#xA;&#xD;&#xA;You've still got to figure out the distance of the plane from the camera; to do this, you need to figure out how the edge distances compare with what you believe they should be, and so back out the perspective scaling that's been undergone.  To get a feel for the scales, you'll probably need a calibration phase for your code where you place the checkerboard facing the camera straight on (perpendicular to the camera) and move it to different (measured and known!) distances, observing the detected lengths of the edges. From that information you can figure out the perspective transform of the camera.&#xD;&#xA;&#xD;&#xA;That should be a good start, anyways.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;I made a mistake here and failed to address that the actual depth of the points/vectors would still need to be worked out. The cross-product as spec'd above would be useless, as it could only give you a vector perp. to the camera, which is useless.&#xD;&#xA;&#xD;&#xA;I'm leaving this up in case it spurs any ideas, but the approach I quickly sketched is, at best, deeply flawed." />
  <row Id="24127" PostHistoryTypeId="2" PostId="11310" RevisionGUID="b523776b-ca21-4508-a0cb-8d9ecc2fc6df" CreationDate="2011-04-19T01:13:36.943" UserId="6826" Text="I like making game concepts for fun, as a hobby. I don't think that all my game concepts are amazingly awesome and have to be created and would revolutionize the industry. I just want some people to talk to that have the same hobbies as I do. To be able to discuss ideas and point out the pros and cons." />
  <row Id="24128" PostHistoryTypeId="1" PostId="11310" RevisionGUID="b523776b-ca21-4508-a0cb-8d9ecc2fc6df" CreationDate="2011-04-19T01:13:36.943" UserId="6826" Text="Is there a site where people discuss game concepts and questions in general?" />
  <row Id="24129" PostHistoryTypeId="3" PostId="11310" RevisionGUID="b523776b-ca21-4508-a0cb-8d9ecc2fc6df" CreationDate="2011-04-19T01:13:36.943" UserId="6826" Text="&lt;game-design&gt;" />
  <row Id="24131" PostHistoryTypeId="2" PostId="11312" RevisionGUID="e254a0e6-0791-4757-a2cf-3ff889dbeabe" CreationDate="2011-04-19T02:19:29.853" UserId="2469" Text="This might be the one:&#xD;&#xA;http://hosted.zeh.com.br/tweener/docs/en-us/misc/transitions.html" />
  <row Id="24132" PostHistoryTypeId="2" PostId="11313" RevisionGUID="9af6ae1f-6ad5-44fc-a664-48d458d0fdbb" CreationDate="2011-04-19T03:02:16.117" UserId="6690" Text="If this is your first time out, then you're unlikely to get this right. _Something_ will come and bite you in the arse, and it's unlikely anyone will be able to steer you away from that because what that thing is will depend on your design.&#xD;&#xA;&#xD;&#xA;So my advice is pick a resolution for this project, and treat it as your &quot;virtual&quot; coordinate system and let it lie at that. As you've already mentioned, you're currently thinking in 800 * 480, so stick with that.&#xD;&#xA;&#xD;&#xA;If you're working on your own 2D engine on 3D hardware, then you can use your vertex shader to compensate for the actual size of your back buffer. Otherwise, you'll need to factor in a scale somewhere in your pipeline between the fixed logical units and the variable screen dimensions. &#xD;&#xA;&#xD;&#xA;Now, what to do about aspect ratio changes? The easiest plan is to just assume you'll letter box. That's not a terrible choice, and most devices are close enough in aspect ratio that it won't matter. In that case, all you'll have to do is calculate the largest square that fits inside the screen at your aspect ratio, calculate either a horizontal or vertical offset to center that box on screen, and then mask off the remaining space.&#xD;&#xA;&#xD;&#xA;One step up from that, but heavily dependent on what kind of game you're making and how you're building it, is making sure you have some bleed in your backgrounds that can extend outside the play area into what would be the letter boxed area. This would give the user the impression that you're filling the screen, without shagging up your logic. &#xD;&#xA;&#xD;&#xA;Imagine, for instance, Mario; you could easily see making it taller if you had to, just repeating sky and ground tiles above and below. Going the other way is a little dicier, in that you'd have to show more of the level to the left and right, which may break some of the design, but art wise appending a few extra columns to the far left and far right of the level would be trivial." />
  <row Id="24133" PostHistoryTypeId="25" PostId="11298" RevisionGUID="95676d59-8eb2-4bd4-93a2-eed70e406333" CreationDate="2011-04-19T03:09:27.903" Comment="http://twitter.com/#!/StackGameDev/status/60178167180177408" />
  <row Id="24134" PostHistoryTypeId="25" PostId="11310" RevisionGUID="f406dd81-1b7a-46d8-a17d-ee60acc9735b" CreationDate="2011-04-19T06:09:27.507" Comment="http://twitter.com/#!/StackGameDev/status/60223464472186880" />
  <row Id="24135" PostHistoryTypeId="5" PostId="11287" RevisionGUID="4e14b7f7-46cd-47be-960a-fcbd501e26b4" CreationDate="2011-04-19T06:35:15.050" UserId="1829" Comment="DUH !" Text="I remember having spotted a link to a huge page with different equations to non linear interpolation curves, for example if you want to stop a car smoothly, etc.&#xD;&#xA;&#xD;&#xA;Those can sometime be useful to emulate some real-world acceleration/velocity behaviors without the help of a physics engine, which can really simplify the code.&#xD;&#xA;&#xD;&#xA;Any idea where this page is ? I can't manage to give google the right keywords...&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I just searched on my previous laptop bookmarks, and I found it: http://sol.gfxile.net/interpolation/" />
  <row Id="24136" PostHistoryTypeId="2" PostId="11314" RevisionGUID="0d478db7-408f-4f1e-b10c-7a8bc53e262a" CreationDate="2011-04-19T07:33:16.060" UserId="4129" Text="Having found the corners in 2D, you assign them 3D coordinates yourself.  (You might know the actual physical size of the board squares, or you might simply do everything relative to these sizes e.g. assign them a size of 1).&#xD;&#xA;&#xD;&#xA;You then calibrate the camera giving the chessboard positions and your assigned 3D coordinates.  OpenCV then computes a camera model.  With this camera model, you can project 3D points.&#xD;&#xA;&#xD;&#xA;There is a good example in [Tutorial 10][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dasl.mem.drexel.edu/~noahKuntz/openCVTut10.html" />
  <row Id="24137" PostHistoryTypeId="5" PostId="11314" RevisionGUID="5474e799-500d-494a-aa13-087f941bb193" CreationDate="2011-04-19T07:39:49.500" UserId="4129" Comment="added 435 characters in body" Text="Having found the corners in 2D, you assign them 3D coordinates yourself.  (You might know the actual physical size of the board squares, or you might simply do everything relative to these sizes e.g. assign them a size of 1).&#xD;&#xA;&#xD;&#xA;You then [calibrate][1] the camera giving the chessboard positions and your assigned 3D coordinates.  OpenCV then computes a [camera model][2].  With this camera model, you can [project 3D points][3].&#xD;&#xA;&#xD;&#xA;There is a good example in [***Tutorial 10***][4].  This also shows how to undistort the image.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opencv.willowgarage.com/documentation/cpp/calib3d_camera_calibration_and_3d_reconstruction.html#cv-calibratecamera&#xD;&#xA;  [2]: http://opencv.willowgarage.com/documentation/cpp/calib3d_camera_calibration_and_3d_reconstruction.html&#xD;&#xA;  [3]: http://opencv.willowgarage.com/documentation/cpp/calib3d_camera_calibration_and_3d_reconstruction.html#cv-projectpoints&#xD;&#xA;  [4]: http://dasl.mem.drexel.edu/~noahKuntz/openCVTut10.html" />
  <row Id="24138" PostHistoryTypeId="2" PostId="11315" RevisionGUID="84916903-36a4-4f78-83ca-fc96760af3b5" CreationDate="2011-04-19T07:52:18.690" UserId="1156" Text="There's a design board on the [TIGSource forums][1]. It seems pretty full and diverse.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/index.php?board=25.0" />
  <row Id="24139" PostHistoryTypeId="2" PostId="11316" RevisionGUID="a8998ae9-0aa7-41d1-883d-12755866d1fc" CreationDate="2011-04-19T09:00:13.123" UserId="-1" Text="" />
  <row Id="24140" PostHistoryTypeId="2" PostId="11317" RevisionGUID="9ead573b-543e-443f-bd52-407a8d246892" CreationDate="2011-04-19T09:00:13.123" UserId="-1" Text="" />
  <row Id="24141" PostHistoryTypeId="25" PostId="11300" RevisionGUID="8573d4b6-2a3d-4877-8068-c498554d1c16" CreationDate="2011-04-19T09:09:27.530" Comment="http://twitter.com/#!/StackGameDev/status/60268763488067586" />
  <row Id="24142" PostHistoryTypeId="2" PostId="11318" RevisionGUID="b3cd326b-4981-4dd9-97f6-8f3933b7d295" CreationDate="2011-04-19T09:26:51.380" UserId="1829" Text="I found it mate.&#xD;&#xA;http://sol.gfxile.net/interpolation/&#xD;&#xA;" />
  <row Id="24143" PostHistoryTypeId="2" PostId="11319" RevisionGUID="94e01fa4-2cb9-40c1-bc1b-27226a229d4f" CreationDate="2011-04-19T09:29:06.167" UserId="6496" Text="Cut the Rope is so smooth and real life like, while some apps are very &quot;bitmap&quot; like.  How does Cut the Rope do such realistic animation?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24144" PostHistoryTypeId="1" PostId="11319" RevisionGUID="94e01fa4-2cb9-40c1-bc1b-27226a229d4f" CreationDate="2011-04-19T09:29:06.167" UserId="6496" Text="Some app are very primitive bitmap types of graphics, but some are so realistic, such as Cut The Rope -- how does it do it?" />
  <row Id="24145" PostHistoryTypeId="3" PostId="11319" RevisionGUID="94e01fa4-2cb9-40c1-bc1b-27226a229d4f" CreationDate="2011-04-19T09:29:06.167" UserId="6496" Text="&lt;engine&gt;&lt;animation&gt;" />
  <row Id="24146" PostHistoryTypeId="6" PostId="4887" RevisionGUID="b23b7845-163d-4fac-8c3f-ebf690a3f20a" CreationDate="2011-04-19T10:43:25.823" UserId="744" Comment="edited tags; edited tags; edited tags" Text="&lt;c++&gt;&lt;algorithm&gt;&lt;data-structure&gt;" />
  <row Id="24147" PostHistoryTypeId="6" PostId="8108" RevisionGUID="0d54edb1-6231-4d6e-b386-616d12980289" CreationDate="2011-04-19T10:44:40.597" UserId="744" Comment="edited tags" Text="&lt;xna&gt;" />
  <row Id="24148" PostHistoryTypeId="2" PostId="11320" RevisionGUID="d50eecfe-3ca7-4a1c-a2b4-474bd99d676c" CreationDate="2011-04-19T10:52:13.023" UserId="6831" Text="I'm looking for any material on seamless mmo servers! I do have a few articles in the books &quot;Massively Multiplayer Game Development&quot; 1 and 2 and  &quot;Game Programming Gems 5&quot;. Has anyone experience on that topic or knows articles about that? &#xD;&#xA;I'm interested in &quot;high-level views&quot; as well as implementations. This might become the topic of my master thesis and I would like to find out how hard it is to write such a system, before I actually start the thesis. Right now I haven't decided which language to use, I'm thinking about Java or Scala. Erlang could be a choice, but I've never worked with that.&#xD;&#xA;Note: Basic requirement would be movement. Any other gamesystems are optional and give &quot;bonus credit&quot;.&#xD;&#xA;&#xD;&#xA;Now for what I mean with &quot;seamless server&quot;:&#xD;&#xA;I want so set up a server cluster where every node controls some part of the game world, with static boundaries. Players can now move from one end of the world to the other without switching an instance or hitting some &quot;teleporter&quot;. I think WoW does that. In my backend however the player transitions from one server to the next.&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="24149" PostHistoryTypeId="1" PostId="11320" RevisionGUID="d50eecfe-3ca7-4a1c-a2b4-474bd99d676c" CreationDate="2011-04-19T10:52:13.023" UserId="6831" Text="Information on seamless MMO server architecture" />
  <row Id="24150" PostHistoryTypeId="3" PostId="11320" RevisionGUID="d50eecfe-3ca7-4a1c-a2b4-474bd99d676c" CreationDate="2011-04-19T10:52:13.023" UserId="6831" Text="&lt;architecture&gt;&lt;programming&gt;&lt;network&gt;&lt;mmo&gt;&lt;server&gt;" />
  <row Id="24151" PostHistoryTypeId="2" PostId="11321" RevisionGUID="ca24cc58-4ff8-4ffb-bc96-2b8acd4d2949" CreationDate="2011-04-19T11:12:14.180" UserId="4129" Text="I want to render very pretty smooth undulating hills.  There are objects snuggled between these hills, so I can't really use naive bump-mapping.&#xD;&#xA;&#xD;&#xA;I am currently rendering using a very detailed mesh.  Its a lot of very small triangles.&#xD;&#xA;&#xD;&#xA;Are there other approaches?  Can it be done in a pixel shader, for example?" />
  <row Id="24152" PostHistoryTypeId="1" PostId="11321" RevisionGUID="ca24cc58-4ff8-4ffb-bc96-2b8acd4d2949" CreationDate="2011-04-19T11:12:14.180" UserId="4129" Text="rendering rolling hills" />
  <row Id="24153" PostHistoryTypeId="3" PostId="11321" RevisionGUID="ca24cc58-4ff8-4ffb-bc96-2b8acd4d2949" CreationDate="2011-04-19T11:12:14.180" UserId="4129" Text="&lt;opengl&gt;" />
  <row Id="24154" PostHistoryTypeId="5" PostId="11321" RevisionGUID="d7ffb7f5-b348-48e7-9aa2-dda07beccc38" CreationDate="2011-04-19T11:17:46.280" UserId="4129" Comment="added 44 characters in body; edited tags; added 132 characters in body" Text="I want to render very pretty smooth undulating hills.  There are objects snuggled between these hills, so I can't really use naive bump-mapping.&#xD;&#xA;&#xD;&#xA;I am currently rendering using a very detailed mesh that I generate myself.  Its a lot of very small triangles.&#xD;&#xA;&#xD;&#xA;Are there other approaches?  What is the current viability of displacement mapping, for example?&#xD;&#xA;&#xD;&#xA;I would like to run on mainstream hardware, including integrated graphics, and possibly even one day across to tablets and such." />
  <row Id="24155" PostHistoryTypeId="6" PostId="11321" RevisionGUID="d7ffb7f5-b348-48e7-9aa2-dda07beccc38" CreationDate="2011-04-19T11:17:46.280" UserId="4129" Comment="added 44 characters in body; edited tags; added 132 characters in body" Text="&lt;opengl&gt;&lt;displacement-mapping&gt;" />
  <row Id="24156" PostHistoryTypeId="2" PostId="11322" RevisionGUID="96451e00-6ef5-4c65-adda-61d2c1acf23f" CreationDate="2011-04-19T11:46:13.717" UserId="3128" Text="I currently have volume data for the world stored as an array of booleans.  I then check each empty block and if it has non-empty neighbors the faces get drawn.  This prevents me from sending a bunch of faces to the graphics card using opengl.&#xD;&#xA;&#xD;&#xA;I'm now working on inserting and removing blocks but I'm not sure how to do this quickly.  It is simple enough to change the volume data but I don't want to recompute all the vertices from the volume data each time someone inserts or removes a block.  It occurred to me just to add the block to the vertex buffer at the end of the existing vertex data but then I don't have a good way of destroying it as I have no way to correlate between the volume and vertex buffer data.&#xD;&#xA;&#xD;&#xA;Any thoughts on how I can fix the mess I'm in?" />
  <row Id="24157" PostHistoryTypeId="1" PostId="11322" RevisionGUID="96451e00-6ef5-4c65-adda-61d2c1acf23f" CreationDate="2011-04-19T11:46:13.717" UserId="3128" Text="How to insert and remove blocks quickly in a Minecraftian world?" />
  <row Id="24158" PostHistoryTypeId="3" PostId="11322" RevisionGUID="96451e00-6ef5-4c65-adda-61d2c1acf23f" CreationDate="2011-04-19T11:46:13.717" UserId="3128" Text="&lt;opengl&gt;&lt;engine&gt;&lt;maps&gt;&lt;performance&gt;&lt;minecraft&gt;" />
  <row Id="24159" PostHistoryTypeId="2" PostId="11323" RevisionGUID="68e85858-03c6-494c-81a7-20b1cecf05c4" CreationDate="2011-04-19T11:51:51.903" UserId="6833" Text="I'd like to make a simple text-based game using either JavaScript or PHP. Ideally I'd like to be able to render ASCII text in a kind of blackscreen &quot;console&quot; style (think console roguelikes such as Crawl or Nethack, or old Infocom text adventure games). The game would be simple, mostly text entry and menu choices. &#xD;&#xA;&#xD;&#xA;Is this easily done using JS or PHP; if so, could you give me some pointers, and if not, what could I use to have this kind of game running from a browser rather than an executeable?" />
  <row Id="24160" PostHistoryTypeId="1" PostId="11323" RevisionGUID="68e85858-03c6-494c-81a7-20b1cecf05c4" CreationDate="2011-04-19T11:51:51.903" UserId="6833" Text="Text-based game using JavaScript and/or PHP" />
  <row Id="24161" PostHistoryTypeId="3" PostId="11323" RevisionGUID="68e85858-03c6-494c-81a7-20b1cecf05c4" CreationDate="2011-04-19T11:51:51.903" UserId="6833" Text="&lt;javascript&gt;&lt;php&gt;&lt;text-based&gt;" />
  <row Id="24162" PostHistoryTypeId="25" PostId="11321" RevisionGUID="7f7e603d-ad2c-460f-bf14-2923a6cdbdeb" CreationDate="2011-04-19T12:09:27.877" Comment="http://twitter.com/#!/StackGameDev/status/60314062654930945" />
  <row Id="24163" PostHistoryTypeId="2" PostId="11324" RevisionGUID="b66c91f7-17ea-47bc-8c2f-cfe9a90076b5" CreationDate="2011-04-19T12:16:19.913" UserId="4129" Text="[Notch says][1]:&#xD;&#xA;&#xD;&#xA;&gt; Terrain is generated, saved and&#xD;&#xA;&gt; loaded, and (kind of) rendered in&#xD;&#xA;&gt; chunks of 16*16*128 blocks&#xD;&#xA;&#xD;&#xA;Divide your world into small subsections of space.  Within each of these sections, generate a VBO for the faces of the cubes (or place the faces into a big shared VBO).  Each time you edit in a section, regenerate the VBO from scratch.  This is unlikely to be a performance bottleneck.&#xD;&#xA;&#xD;&#xA;  [1]: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1" />
  <row Id="24167" PostHistoryTypeId="2" PostId="11326" RevisionGUID="d962cafe-83f6-4b1e-ad8c-3ed8b50ecd96" CreationDate="2011-04-19T13:04:37.153" UserId="6836" Text="Hey, the newb is back.. :/&#xD;&#xA;&#xD;&#xA;Im having trouble with XML as described within the question ^^^.&#xD;&#xA;&#xD;&#xA;Ive got a snake game with three objects; apple, pear &amp; orange. I would like these to be associated with questions which I'm trying to create in XML. This is what I've done so far...&#xD;&#xA;&#xD;&#xA;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;&#xD;&#xA;    &lt;XnaContent&gt;&#xD;&#xA;    &lt;Asset Type=&quot;System.Collections.Generic.List[System.String]&quot;&gt;&#xD;&#xA;&#xD;&#xA;    &lt;MathsQuiz&gt;&#xD;&#xA;   &#xD;&#xA;    &lt;Question Value =&quot;What is 3 x 3? Orange = 9, Pear = 10, Apple = 12&quot; Right =&quot;orange&quot;&gt;&#xD;&#xA;        &lt;answer Value =&quot;orange&quot;/&gt;&#xD;&#xA;        &lt;answer Value =&quot;pear&quot;/&gt;&#xD;&#xA;        &lt;answer Value =&quot;apple&quot;/&gt;&#xD;&#xA;      &lt;/Question&gt;&#xD;&#xA;&#xD;&#xA;    &lt;/MathsQuiz&gt;&#xD;&#xA;    &lt;/Asset&gt; &#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;I'm gettin the error: &#xD;&#xA;&quot;Error There was an error while deserializing intermediate XML. 'Element' is an invalid XmlNodeType. Line 7, position 6.&quot;&#xD;&#xA;&#xD;&#xA;I'm guessing its because of the line MathsQuiz but not sure.&#xD;&#xA;&#xD;&#xA;Any help if much appreciated! &#xD;&#xA;&#xD;&#xA;Thanks, Tom " />
  <row Id="24168" PostHistoryTypeId="1" PostId="11326" RevisionGUID="d962cafe-83f6-4b1e-ad8c-3ed8b50ecd96" CreationDate="2011-04-19T13:04:37.153" UserId="6836" Text="Using XML in XNA to display maths questions which are associated with objects" />
  <row Id="24169" PostHistoryTypeId="3" PostId="11326" RevisionGUID="d962cafe-83f6-4b1e-ad8c-3ed8b50ecd96" CreationDate="2011-04-19T13:04:37.153" UserId="6836" Text="&lt;xna&gt;&lt;xml&gt;" />
  <row Id="24171" PostHistoryTypeId="2" PostId="11327" RevisionGUID="690f5224-27f5-4f84-b77b-656721b9d146" CreationDate="2011-04-19T13:20:28.130" UserId="6655" Text="All the games I know of that display lots of terrain make heavy use of LODing to create the illusion of huge amounts of very detailed surfaces.&#xD;&#xA;&#xD;&#xA;The CryEngine is king at this. And in World of Warcraft you can even see the LOD transitions when using low-performance settings.&#xD;&#xA;&#xD;&#xA;The second post at http://www.gamedev.net/topic/439081-crysis-voxel-based-terrain-engine/ describes many different techniques to visualize huge terrains efficiently. Especially the HLOD article http://www.cs.unc.edu/~walk/hlod/ seems helpful.&#xD;&#xA;&#xD;&#xA;I doubt that displacement mapping will get you anywhere near the performance obtained by simply reducing the number of triangles for far-away terrain. Especially for mobile devices lacking hardware support." />
  <row Id="24172" PostHistoryTypeId="2" PostId="11328" RevisionGUID="f565b6d2-e733-4bae-b92d-0fee83b3542d" CreationDate="2011-04-19T13:56:25.040" UserId="3505" Text="Yep, should be pretty easy to do in HTML/JavaScript. Take a pre block and style it as you see fit. For input you should probably ditch text input fields and just use the key events." />
  <row Id="24173" PostHistoryTypeId="2" PostId="11329" RevisionGUID="39c77c63-6a81-4b9e-9f82-e57abb26af79" CreationDate="2011-04-19T13:57:28.487" UserId="769" Text="I want to generate a town layout in a square grid (rendered isometrically, but that doesn't matter) using the following elements:&#xD;&#xA;&#xD;&#xA;- 2x2 Houses&#xD;&#xA;- Roads, 1 unit wide&#xD;&#xA;- Canals, 1 unit wide&#xD;&#xA;&#xD;&#xA;Sample layout:&#xD;&#xA;&#xD;&#xA;![Sample layout][1]&#xD;&#xA;&#xD;&#xA;- I always have a specific number of houses, and as many roads and canals as necessary to connect them all.&#xD;&#xA;- The houses need to have two pieces of road in front of their front door (which is always pointing to the right)&#xD;&#xA;- It would be nice to have fields of grass (emptiness) inbetween.&#xD;&#xA;&#xD;&#xA;Is there a ready-made algorithm for this? If not, what direction should I be thinking of to implement this?&#xD;&#xA;  [1]: http://i.stack.imgur.com/I1a8d.png" />
  <row Id="24174" PostHistoryTypeId="1" PostId="11329" RevisionGUID="39c77c63-6a81-4b9e-9f82-e57abb26af79" CreationDate="2011-04-19T13:57:28.487" UserId="769" Text="Generating a town layout in a grid" />
  <row Id="24175" PostHistoryTypeId="3" PostId="11329" RevisionGUID="39c77c63-6a81-4b9e-9f82-e57abb26af79" CreationDate="2011-04-19T13:57:28.487" UserId="769" Text="&lt;procedural-generation&gt;&lt;isometric&gt;&lt;grid&gt;" />
  <row Id="24176" PostHistoryTypeId="2" PostId="11330" RevisionGUID="d86e308f-bf18-43f1-acc7-d01245cf4c1c" CreationDate="2011-04-19T13:59:26.523" UserId="6835" Text="SkinnedModel sample nicely shows how to import single root bone skeleton and run in xna.&#xD;&#xA;&#xD;&#xA;My question are:&#xD;&#xA; &#xD;&#xA;Is it possible to have animations played in xna if there no bones are used in model (which can easily be done in 3dmax with auto key frames)?&#xD;&#xA;&#xD;&#xA;Is it possible to have multiple independent bones laying around, connected to independent meshes and animated, all played in xna?&#xD;&#xA;&#xD;&#xA;Can SkinnedModelProcessor be downgraded to this level ?" />
  <row Id="24177" PostHistoryTypeId="1" PostId="11330" RevisionGUID="d86e308f-bf18-43f1-acc7-d01245cf4c1c" CreationDate="2011-04-19T13:59:26.523" UserId="6835" Text="Fbx animation without bones or single skeleton" />
  <row Id="24178" PostHistoryTypeId="3" PostId="11330" RevisionGUID="d86e308f-bf18-43f1-acc7-d01245cf4c1c" CreationDate="2011-04-19T13:59:26.523" UserId="6835" Text="&lt;xna&gt;&lt;models&gt;" />
  <row Id="24179" PostHistoryTypeId="2" PostId="11331" RevisionGUID="ea5b953e-0a22-4b40-bea0-bde73f0fc677" CreationDate="2011-04-19T14:00:41.703" UserId="4777" Text="I was looking at the unity site, and I was a bit confused with the pricing.  It says its free, but for IOS/IOS Pro or Android/Android Pro. I need to shell out $400 minimum each.  So if I want to develop for android and iphone, I need $800 to do this? (not saying that it's a lot of money, actually seems reasonable, just wondering)&#xD;&#xA;&#xD;&#xA;(any news on their 2d engine?)" />
  <row Id="24180" PostHistoryTypeId="1" PostId="11331" RevisionGUID="ea5b953e-0a22-4b40-bea0-bde73f0fc677" CreationDate="2011-04-19T14:00:41.703" UserId="4777" Text="Unity Price for Android and IPhone?" />
  <row Id="24181" PostHistoryTypeId="3" PostId="11331" RevisionGUID="ea5b953e-0a22-4b40-bea0-bde73f0fc677" CreationDate="2011-04-19T14:00:41.703" UserId="4777" Text="&lt;unity&gt;" />
  <row Id="24182" PostHistoryTypeId="5" PostId="11317" RevisionGUID="8227c849-b804-4155-b40e-ea32f0b7e113" CreationDate="2011-04-19T14:03:01.290" UserId="6286" Comment="added 50 characters in body" Text="GLSL is a programming language for OpenGL shaders." />
  <row Id="24183" PostHistoryTypeId="24" PostId="11317" RevisionGUID="8227c849-b804-4155-b40e-ea32f0b7e113" CreationDate="2011-04-19T14:03:01.290" Comment="Proposed by 6286 approved by 51 edit id of 335" />
  <row Id="24184" PostHistoryTypeId="5" PostId="11316" RevisionGUID="287c016a-f191-4dc0-9d43-ff68a2e7f3ed" CreationDate="2011-04-19T14:03:17.563" UserId="6286" Comment="added 182 characters in body" Text="GLSL is a programming language for OpenGL shaders.&#xD;&#xA;&#xD;&#xA;Information about GLSL and OpenGL can be found at [http://www.khronos.org/opengl/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.khronos.org/opengl/" />
  <row Id="24185" PostHistoryTypeId="24" PostId="11316" RevisionGUID="287c016a-f191-4dc0-9d43-ff68a2e7f3ed" CreationDate="2011-04-19T14:03:17.563" Comment="Proposed by 6286 approved by 51 edit id of 334" />
  <row Id="24186" PostHistoryTypeId="2" PostId="11332" RevisionGUID="6b15938e-f548-48cb-9e13-ec5f0bc984c0" CreationDate="2011-04-19T14:08:22.183" UserId="2301" Text="vectors are used in cut the rope. and the other games may be using bitmaps instead... like old school zelda.&#xD;&#xA;&#xD;&#xA;Vectors you can have curve lines and such, where bitmaps are all squares.&#xD;&#xA;[Vectors vs bitmaps][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://graphicssoft.about.com/od/aboutgraphics/a/bitmapvector.htm" />
  <row Id="24187" PostHistoryTypeId="2" PostId="11333" RevisionGUID="ad0a5c02-b3ff-4c49-b537-c31e1a853e3b" CreationDate="2011-04-19T14:09:55.007" UserId="6838" Text="At the time of this posting, the basic iPhone and Android licenses will cost a total of $800 along with the free version of Unity. For future reference, here are the Shop and License Comparisons:&#xD;&#xA;&#xD;&#xA;[Shop][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[License Comparisons][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://store.unity3d.com/shop/&#xD;&#xA;  [2]: http://unity3d.com/unity/licenses" />
  <row Id="24188" PostHistoryTypeId="2" PostId="11334" RevisionGUID="d8d1f410-ba71-4539-bf48-68a1e83cc11d" CreationDate="2011-04-19T14:14:38.560" UserId="6831" Text="Yes, the engine is free for Win/Mac/Web. But if you want to release on Android/iPhone you have to buy some extra license.&#xD;&#xA;But I agree with you. It is a bit confusing, because on the download page it says &quot;Free Full Version for Windows with Unity Pro and Android.&quot; They don't mention that it is a 30 day trial. At least, that was the case some time ago..." />
  <row Id="24189" PostHistoryTypeId="2" PostId="11335" RevisionGUID="b13b3a9d-6ea2-4621-baf0-4426217dd9b7" CreationDate="2011-04-19T14:21:01.440" UserId="6187" Text="I am creating a map in a game, the map contains different countries, my question:&#xD;&#xA;&#xD;&#xA;Q. How to model the irregular boundary of each countries? How to do quick country searching if I click on the map (given x,y values)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24190" PostHistoryTypeId="1" PostId="11335" RevisionGUID="b13b3a9d-6ea2-4621-baf0-4426217dd9b7" CreationDate="2011-04-19T14:21:01.440" UserId="6187" Text="How to model irregular boundary of a 2D map in Game?" />
  <row Id="24191" PostHistoryTypeId="3" PostId="11335" RevisionGUID="b13b3a9d-6ea2-4621-baf0-4426217dd9b7" CreationDate="2011-04-19T14:21:01.440" UserId="6187" Text="&lt;algorithm&gt;&lt;maps&gt;" />
  <row Id="24192" PostHistoryTypeId="2" PostId="11336" RevisionGUID="338f498d-6e22-4e7d-af2c-684d803fb67f" CreationDate="2011-04-19T14:26:40.873" UserId="-1" Text="" />
  <row Id="24193" PostHistoryTypeId="2" PostId="11337" RevisionGUID="29b787ae-c11f-4eca-80b5-6600f0804e0d" CreationDate="2011-04-19T14:26:40.873" UserId="-1" Text="" />
  <row Id="24194" PostHistoryTypeId="2" PostId="11338" RevisionGUID="92bde941-81a9-4ff3-81d0-705a81495f43" CreationDate="2011-04-19T14:27:53.750" UserId="6837" Text="I'm writing a 2D rigid body simulator. The objects being simulated are convex polygons. My question involves how to decide on the &quot;point&quot; of collision, so that when I apply a response force, I can also calculate torque.&#xD;&#xA;&#xD;&#xA;In 2D, the popular method of narrowphase collision detection seems to be the Separating Axis Theorem. However, while this gives you the &quot;are they colliding?&quot; as well as &quot;by how much?&quot;, it does NOT give you a reference point (that I'm aware of) at which to apply the response force (and thus calculate torque)*.&#xD;&#xA;&#xD;&#xA;The other method (which also interests me more, because it's what's used in 3D, which would be the logical next step) is to calculate the Minkowski difference of the two polygons, and decide that they're colliding if (0,0) is contained in the resulting polygon. But, how do you use this to decide the relative point at which to apply the response force? My hypothesis is that, since each face of this difference effectively corresponds to a face of one of the polygons, the separation distance is the shortest distance from (0,0) to the MD, and you apply this to the corresponding face on the polygon.&#xD;&#xA;&#xD;&#xA;As a bonus, how does one do this in 3D?&#xD;&#xA;&#xD;&#xA;*As I'm writing this, I just realized that, when using SAT, I could just keep track of which points are overlapping, and apply the force at the &quot;average&quot; of those points. But I would have to decide on which of the several non-separating axes to perform this little trick..." />
  <row Id="24195" PostHistoryTypeId="1" PostId="11338" RevisionGUID="92bde941-81a9-4ff3-81d0-705a81495f43" CreationDate="2011-04-19T14:27:53.750" UserId="6837" Text="Finding the point of collision" />
  <row Id="24196" PostHistoryTypeId="3" PostId="11338" RevisionGUID="92bde941-81a9-4ff3-81d0-705a81495f43" CreationDate="2011-04-19T14:27:53.750" UserId="6837" Text="&lt;collision-detection&gt;&lt;2d-physics&gt;&lt;physics-engine&gt;&lt;simulations&gt;" />
  <row Id="24197" PostHistoryTypeId="2" PostId="11339" RevisionGUID="1f7f5b18-9e7f-4038-88de-6063c78f31dd" CreationDate="2011-04-19T14:32:15.040" UserId="5787" Text="The simplest way I can think of to do this is make the map into a finite grid or into an image and assign each location an enumerated value (or color). Each country would be a separate value on the map. Then given any xy index or coordinate you could quickly find out the country's value and look up its name in a table.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24198" PostHistoryTypeId="2" PostId="11340" RevisionGUID="440a3482-4c4e-47da-988b-ae43631afd57" CreationDate="2011-04-19T14:33:10.437" UserId="3505" Text="There are many ways to go depending on exactly how you want it. Here is a rough outline of one way which I think will fit your description:&#xD;&#xA;&#xD;&#xA;First generate the canals. Then start placing houses randomly, for each house you place, place the road in front of it and draw a road from that piece to the existing road network, if either is not possible or placing the road in front results in an ugly 2x2 block of road reposition the house. Detect some road points that are close to each other but far apart following the existing roads and try to make some shortcuts for those.&#xD;&#xA;&#xD;&#xA;This kind of stuff most of all takes experimentation and experience. Often you'll get good results from making some detail in a random fashion, determine if it meets some criteria and undo and retry if it doesn't.&#xD;&#xA;&#xD;&#xA;For this exact task you will certainly also need a good grasp of basic pathfinding, unless you are already an expert, go read on the topic. And remember, pathfinding doesn't have to be just about the shortest path, for the last part of my description you might want to give some weight to reusing paths that are already there.&#xD;&#xA;&#xD;&#xA;This is not at all an easy task, if you get stuck come back and show us your code and some example output and explain in detail how you would like it to be different." />
  <row Id="24199" PostHistoryTypeId="2" PostId="11341" RevisionGUID="732bc825-9313-4cf9-afe4-e121121b1ec7" CreationDate="2011-04-19T14:39:24.757" UserId="4777" Text="After figuring out the pricing of monoTouch and Unity, I've found that the pricing will be the same ($800). With XnaTouch for monoTouch I am able to port my games to droid/apple. I am just curious if anyone has tried both XnaTouch and Unity and which one they prefer.  &#xD;&#xA;&#xD;&#xA;I do mostly 2D games (if unity had a 2d Engine I would be all over that) so xnaTouch seems that it might be better, but unity seems better for a more advance side (more companies are using it, so if I ever wanted to do this for more than just myself I have more options)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(I also read somewhere that monTouch is against the new apple term of agreement?)&#xD;&#xA;Thoughts on either end?" />
  <row Id="24200" PostHistoryTypeId="1" PostId="11341" RevisionGUID="732bc825-9313-4cf9-afe4-e121121b1ec7" CreationDate="2011-04-19T14:39:24.757" UserId="4777" Text="Unity or MonTouch with XNATouch? same price" />
  <row Id="24201" PostHistoryTypeId="3" PostId="11341" RevisionGUID="732bc825-9313-4cf9-afe4-e121121b1ec7" CreationDate="2011-04-19T14:39:24.757" UserId="4777" Text="&lt;unity&gt;&lt;compile&gt;&lt;mono&gt;" />
  <row Id="24202" PostHistoryTypeId="2" PostId="11342" RevisionGUID="c7a4357d-2a0b-4d8f-a278-c5a54a58e3fd" CreationDate="2011-04-19T14:45:57.277" UserId="853" Text="I'm trying to achieve the warp effect that you see in games like geometry wars.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7lOwR.jpg&#xD;&#xA;&#xD;&#xA;Can someone help explain what is going on here? I feel like the grid's z axis is manipulated in some way, any way, by the programmer, but is there maybe some known mathematical equation to really get the correct warping effect?" />
  <row Id="24203" PostHistoryTypeId="1" PostId="11342" RevisionGUID="c7a4357d-2a0b-4d8f-a278-c5a54a58e3fd" CreationDate="2011-04-19T14:45:57.277" UserId="853" Text="geometry wars warp effect?" />
  <row Id="24204" PostHistoryTypeId="3" PostId="11342" RevisionGUID="c7a4357d-2a0b-4d8f-a278-c5a54a58e3fd" CreationDate="2011-04-19T14:45:57.277" UserId="853" Text="&lt;graphics&gt;" />
  <row Id="24205" PostHistoryTypeId="5" PostId="11341" RevisionGUID="463fc6d6-c0c6-44a0-aae5-930fe18ef02b" CreationDate="2011-04-19T14:49:10.337" UserId="4777" Comment="added 32 characters in body" Text="After figuring out the pricing of monoTouch and Unity, I've found that the pricing will be the same ($800). With XnaTouch for monoTouch I am able to port my games to droid/apple. I am just curious if anyone has tried both XnaTouch and Unity and which one they prefer.  &#xD;&#xA;&#xD;&#xA;I do mostly 2D games (if unity had a 2d Engine I would be all over that) so xnaTouch seems that it might be better, but unity seems better for more advance/professional (more companies are using it, so if I ever wanted to do this for more than just myself I have more options, which I've thought about)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(I also read somewhere that monTouch is against the new apple term of agreement?)&#xD;&#xA;Thoughts on either end?" />
  <row Id="24206" PostHistoryTypeId="5" PostId="11342" RevisionGUID="d5ff45d4-8ea1-4211-a210-c6afc639c30b" CreationDate="2011-04-19T14:51:13.653" UserId="853" Comment="added 128 characters in body" Text="I'm trying to achieve the warp effect that you see in games like geometry wars.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7lOwR.jpg&#xD;&#xA;&#xD;&#xA;Can someone help explain what is going on here? I feel like the grid's z axis is manipulated in some way, any way, by the programmer, but is there maybe some known mathematical equation to really get the correct warping effect?&#xD;&#xA;&#xD;&#xA;Edit: To be more specific the warping of the grid. How everything looks pulled towards the negative z axis and then bounces." />
  <row Id="24207" PostHistoryTypeId="25" PostId="11331" RevisionGUID="9eac5242-9c54-4434-bb17-5b72f8749bb7" CreationDate="2011-04-19T15:09:27.450" Comment="http://twitter.com/#!/StackGameDev/status/60359360005685248" />
  <row Id="24208" PostHistoryTypeId="5" PostId="11326" RevisionGUID="5f67a417-ebdb-472d-b97e-32bc55254498" CreationDate="2011-04-19T15:10:36.060" UserId="2698" Comment="Fixed punctuation and erased some unnecessary talk (we are completely OK if the newb is back, don't berate yourself as if it's a bad thing, in fact it almost totally doesn't matter to us)" Text="I've got a snake game with three objects: apple, pear &amp; orange. I would like these to be associated with questions which I'm trying to create in XML. This is what I've done so far...&#xD;&#xA;&#xD;&#xA;    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;&#xD;&#xA;    &lt;XnaContent&gt;&#xD;&#xA;    &lt;Asset Type=&quot;System.Collections.Generic.List[System.String]&quot;&gt;&#xD;&#xA;&#xD;&#xA;    &lt;MathsQuiz&gt;&#xD;&#xA;   &#xD;&#xA;    &lt;Question Value =&quot;What is 3 x 3? Orange = 9, Pear = 10, Apple = 12&quot; Right =&quot;orange&quot;&gt;&#xD;&#xA;        &lt;answer Value =&quot;orange&quot;/&gt;&#xD;&#xA;        &lt;answer Value =&quot;pear&quot;/&gt;&#xD;&#xA;        &lt;answer Value =&quot;apple&quot;/&gt;&#xD;&#xA;      &lt;/Question&gt;&#xD;&#xA;&#xD;&#xA;    &lt;/MathsQuiz&gt;&#xD;&#xA;    &lt;/Asset&gt; &#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;I'm getting the error: &#xD;&#xA;&quot;Error There was an error while deserializing intermediate XML. 'Element' is an invalid XmlNodeType. Line 7, position 6.&quot;&#xD;&#xA;&#xD;&#xA;I'm guessing it's because of the line MathsQuiz but not sure.&#xD;&#xA;&#xD;&#xA;Any help is much appreciated! &#xD;&#xA;&#xD;&#xA;Thanks, Tom " />
  <row Id="24209" PostHistoryTypeId="24" PostId="11326" RevisionGUID="5f67a417-ebdb-472d-b97e-32bc55254498" CreationDate="2011-04-19T15:10:36.060" Comment="Proposed by 2698 approved by 14 edit id of 336" />
  <row Id="24210" PostHistoryTypeId="5" PostId="11342" RevisionGUID="3f6bb8b7-aabc-43ca-93b1-21ad0bee814f" CreationDate="2011-04-19T15:10:44.780" UserId="3588" Comment="Rearranged the title a bit, italicized the game name, and added title text to the screenshot. Judging from how the graphic-effects tag is used elsewhere (for visual special effects), it also seemed appropriate. ♪" Text="I'm trying to achieve the warp effect that you see in games like *Geometry Wars*.&#xD;&#xA;&#xD;&#xA;![Screenshot of Geometry Wars including the warp effect][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7lOwR.jpg&#xD;&#xA;&#xD;&#xA;Can someone help explain what is going on here? I feel like the grid's z axis is manipulated in some way, any way, by the programmer, but is there maybe some known mathematical equation to really get the correct warping effect?&#xD;&#xA;&#xD;&#xA;Edit: To be more specific, I mean the warping of the grid. How everything looks pulled towards the negative z axis and then bounces." />
  <row Id="24211" PostHistoryTypeId="4" PostId="11342" RevisionGUID="3f6bb8b7-aabc-43ca-93b1-21ad0bee814f" CreationDate="2011-04-19T15:10:44.780" UserId="3588" Comment="Rearranged the title a bit, italicized the game name, and added title text to the screenshot. Judging from how the graphic-effects tag is used elsewhere (for visual special effects), it also seemed appropriate. ♪" Text="How do I replicate the warp effect from Geometry Wars?" />
  <row Id="24212" PostHistoryTypeId="6" PostId="11342" RevisionGUID="3f6bb8b7-aabc-43ca-93b1-21ad0bee814f" CreationDate="2011-04-19T15:10:44.780" UserId="3588" Comment="Rearranged the title a bit, italicized the game name, and added title text to the screenshot. Judging from how the graphic-effects tag is used elsewhere (for visual special effects), it also seemed appropriate. ♪" Text="&lt;graphics&gt;&lt;graphic-effects&gt;" />
  <row Id="24213" PostHistoryTypeId="24" PostId="11342" RevisionGUID="3f6bb8b7-aabc-43ca-93b1-21ad0bee814f" CreationDate="2011-04-19T15:10:44.780" Comment="Proposed by 3588 approved by 14 edit id of 340" />
  <row Id="24214" PostHistoryTypeId="5" PostId="11331" RevisionGUID="045b2e3e-a2bf-4dcf-b448-85094d32ff09" CreationDate="2011-04-19T15:10:54.873" UserId="3588" Comment="Added more tags, fixed some spelling, rearranged the title, and removed the tangent (as this is not a discussion forum)... a lot in today's work, it seems ♪" Text="I was looking at the Unity site, and I was a bit confused with the pricing. It says it's free, but for iOS/iOS Pro or Android/Android Pro. I need to shell out $400 minimum each.  So if I want to develop with Unity for Android and iPhone, I need $800 to do this? (not saying that it's a lot of money, actually seems reasonable, just wondering)" />
  <row Id="24215" PostHistoryTypeId="4" PostId="11331" RevisionGUID="045b2e3e-a2bf-4dcf-b448-85094d32ff09" CreationDate="2011-04-19T15:10:54.873" UserId="3588" Comment="Added more tags, fixed some spelling, rearranged the title, and removed the tangent (as this is not a discussion forum)... a lot in today's work, it seems ♪" Text="Price for Unity on Android and iPhone?" />
  <row Id="24216" PostHistoryTypeId="6" PostId="11331" RevisionGUID="045b2e3e-a2bf-4dcf-b448-85094d32ff09" CreationDate="2011-04-19T15:10:54.873" UserId="3588" Comment="Added more tags, fixed some spelling, rearranged the title, and removed the tangent (as this is not a discussion forum)... a lot in today's work, it seems ♪" Text="&lt;android&gt;&lt;unity&gt;&lt;ios&gt;&lt;costs&gt;" />
  <row Id="24217" PostHistoryTypeId="24" PostId="11331" RevisionGUID="045b2e3e-a2bf-4dcf-b448-85094d32ff09" CreationDate="2011-04-19T15:10:54.873" Comment="Proposed by 3588 approved by 14 edit id of 337" />
  <row Id="24218" PostHistoryTypeId="5" PostId="11336" RevisionGUID="e69d9132-8c03-49d9-9c36-6d65546faf8e" CreationDate="2011-04-19T15:10:58.633" UserId="3588" Comment="added 460 characters in body" Text="Use this tag when asking about the costs you or your firm will incur during the process of development. Questions include determining the price of software as well as the costs of services that can be outsourced such as graphic or audio assets.&#xD;&#xA;&#xD;&#xA;Related tags include [tag:pricing], which is about the price you put on your product when marketing it, and [tag:monetization], which is about strategies to earn revenue from a game outside of the purchase price." />
  <row Id="24219" PostHistoryTypeId="24" PostId="11336" RevisionGUID="e69d9132-8c03-49d9-9c36-6d65546faf8e" CreationDate="2011-04-19T15:10:58.633" Comment="Proposed by 3588 approved by 14 edit id of 338" />
  <row Id="24220" PostHistoryTypeId="5" PostId="11337" RevisionGUID="47caeebb-c543-43a9-be23-9a9f12bffa3e" CreationDate="2011-04-19T15:11:00.567" UserId="3588" Comment="added 67 characters in body" Text="The monetary expenses associated with the game development process." />
  <row Id="24221" PostHistoryTypeId="24" PostId="11337" RevisionGUID="47caeebb-c543-43a9-be23-9a9f12bffa3e" CreationDate="2011-04-19T15:11:00.567" Comment="Proposed by 3588 approved by 14 edit id of 339" />
  <row Id="24222" PostHistoryTypeId="2" PostId="11343" RevisionGUID="882a1d51-0261-4cb6-97b8-797cdb52c6e5" CreationDate="2011-04-19T15:18:04.943" UserId="1141" Text="Without knowing any further constraints, I'd prefer using a [BSP][1] to find out which point of (2D) space belongs to which object. This works even with the country borders overlapping (simulating conflicts about the exact borders) or not filling out all the available space (simulating no-man's land and areas outside of the map's chosen projection).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Binary_space_partitioning" />
  <row Id="24223" PostHistoryTypeId="2" PostId="11344" RevisionGUID="fbe52426-71df-467e-87ff-b8530a30eb79" CreationDate="2011-04-19T15:21:15.550" UserId="6839" Text="this is very much possible in javascript, you can also load your preferred console font from an .ttf or .otf file. " />
  <row Id="24224" PostHistoryTypeId="2" PostId="11345" RevisionGUID="f767c2db-b2cd-46ef-9f34-ef4f6b302a1d" CreationDate="2011-04-19T15:24:42.927" UserId="3081" Text="You might try the [GDSE Chat Room][1].  It's occasionally pretty well-populated, and has proven to be a pretty good sounding-board.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chat.stackexchange.com/rooms/19/game-development" />
  <row Id="24225" PostHistoryTypeId="2" PostId="11346" RevisionGUID="caa0d31b-788e-411b-9314-7298ed6c0129" CreationDate="2011-04-19T15:34:16.467" UserId="370" Text="###use anchor points&#xD;&#xA;This can be done exactly with using the collision detection from a physics engine and triangulated country shapes.  However, I think the results will require lots of work that will be ultimately unsatisfactory.&#xD;&#xA;&#xD;&#xA;You're best bet is to hand tune some anchor points.  The basic idea is you place anchor points on the map.  On user click find the anchor point that is the closest.  That is the country you just selected.&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;&#xD;&#xA;* add some null anchor points for areas that don't make sense to click.  &#xD;&#xA;This avoids surprising the user when the accidentally click on an ocean and suddenly select a country hundreds of miles away.I think you best shot will be to hand tune.&#xD;&#xA;&#xD;&#xA;* The anchor points don't need to be fair.  &#xD;&#xA;Luxemburg would be very difficult to select.  Adding some luxemburg anchor points into its neighboring countries will result in a better user experience." />
  <row Id="24226" PostHistoryTypeId="2" PostId="11347" RevisionGUID="c0cb5c19-484f-46a2-8b7f-90da4316c2c2" CreationDate="2011-04-19T15:45:54.523" UserId="20" Text="You could build the entire game in JavaScript for sure. Be aware that the source-code will be visible to the user. So if you're concerned about cheating (probably a non-issue if it's just a single-player game), then you should have your game logic on the server.&#xD;&#xA;&#xD;&#xA;JavaScript and PHP is definitely going to work.&#xD;&#xA;&#xD;&#xA;If I were creating such a game, I would do the following:&#xD;&#xA;&#xD;&#xA; - Use a robust JavaScript framework like [jQuery][1] or [Mootools][2] for the client.&#xD;&#xA; - Write the game logic in PHP. This could be plain PHP, but a framework like [Zend][3], [Saphire][4] or [Symfony][5] can speed up development of complex projects quite a bit.&#xD;&#xA; - Try to have your game-quests and items in data-files or a database to facilitate updates to your game-world. Avoid having your data in your code.&#xD;&#xA; - Start with simple page-requests for testing, then move to asynchronous requests (AJAX) for a nicer user-experience. &#xD;&#xA; - Always start with the most simple input method possible. A form field and a *send* button should be sufficient to start sending some user-input to the server. You can implement more sophisticated methods in your client as soon as the basic communication works.&#xD;&#xA; - Don't trust the user input! Always validate/sanitize data coming from the client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jquery.com/&#xD;&#xA;  [2]: http://mootools.net/&#xD;&#xA;  [3]: http://framework.zend.com/&#xD;&#xA;  [4]: http://silverstripe.org/sapphire-introduction/&#xD;&#xA;  [5]: http://symfony.com/" />
  <row Id="24227" PostHistoryTypeId="2" PostId="11348" RevisionGUID="18e54170-1bb1-4174-91c6-8ca95bdb8a3e" CreationDate="2011-04-19T15:47:58.103" UserId="370" Text="The keywords you're looking for are _&quot;support points&quot;_ and _&quot;manifold&quot;_.&#xD;&#xA;&#xD;&#xA;Erin Catto has written an excellent 2D physics engine.  He regularly presents at GDC.  You should be able to find some of his slides where he explains collision manifolds.  The first version of his physics engine only supported box shapes to simply calculating the support points.  Which is where the engine got its name [Box2D][1].&#xD;&#xA;&#xD;&#xA;The answer is too complex to describe fully here but the overview is you need to pick a total of 2 points from the two shapes.  Then apply the restitution force equally to each.  You'll also have to deal with a corner case where it's better to only use one support point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org" />
  <row Id="24228" PostHistoryTypeId="2" PostId="11349" RevisionGUID="ec23fd7a-e6f4-452a-a141-b32e3d305214" CreationDate="2011-04-19T15:53:40.640" UserId="1742" Text="The question is a bit vague, but, assuming you want to generate some irregular boundaried countries with a quick lookup function, here goes:&#xD;&#xA;&#xD;&#xA;Take a very simple country lookup, I'm assuming you have some kind of capital city at the centre, assign the city a strength, then use an adjusted voronoi style map to produce the regular shaped country border map. that gets you something like this:&#xD;&#xA;&#xD;&#xA;http://imgur.com/1hrBt&#xD;&#xA;&#xD;&#xA;now, for the irregular borders, look at how perlin noise is used to offset into a different texture: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;&#xD;&#xA;this should provide you with a quick way to generate the clean coordinates from the world coordinates. That then should provide you with a rough edged country map." />
  <row Id="24229" PostHistoryTypeId="2" PostId="11350" RevisionGUID="8f69637f-0a83-47c5-ab1e-4b6a9dafce01" CreationDate="2011-04-19T15:54:04.470" UserId="1021" Text="I don't understand how to listen for collisions in Cocos2D/Box2D.  Say I have two dynamic circle bodies.  One is very small and the other is relatively large.  When the small circle collides w/ the large circle I'd like to do something (play a sound for example).  What's the best way to do this?&#xD;&#xA;&#xD;&#xA;I'm currently experimenting w/ the TestPoint method.  Something like:&#xD;&#xA;&#xD;&#xA;    if(largeCircleBody-&gt;GetFixtureList()-&gt;TestPoint(smallCirclePoint)){&#xD;&#xA;        // collision happened...&#xD;&#xA;        // play sound etc&#xD;&#xA;    }" />
  <row Id="24230" PostHistoryTypeId="1" PostId="11350" RevisionGUID="8f69637f-0a83-47c5-ab1e-4b6a9dafce01" CreationDate="2011-04-19T15:54:04.470" UserId="1021" Text="Basic Box2D collision detection" />
  <row Id="24231" PostHistoryTypeId="3" PostId="11350" RevisionGUID="8f69637f-0a83-47c5-ab1e-4b6a9dafce01" CreationDate="2011-04-19T15:54:04.470" UserId="1021" Text="&lt;2d-physics&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="24232" PostHistoryTypeId="16" PostId="11310" RevisionGUID="7a5e7824-84a7-4109-a926-8612bfa90f22" CreationDate="2011-04-19T15:56:45.520" UserId="51" />
  <row Id="24233" PostHistoryTypeId="16" PostId="11315" RevisionGUID="90ff423d-e931-4187-b38e-fab1237b60d1" CreationDate="2011-04-19T15:56:45.520" UserId="51" />
  <row Id="24234" PostHistoryTypeId="16" PostId="11345" RevisionGUID="62bbf488-559a-4fc3-b898-7bab2ef1ae88" CreationDate="2011-04-19T15:56:45.520" UserId="51" />
  <row Id="24235" PostHistoryTypeId="5" PostId="11341" RevisionGUID="e0f88cde-8e68-4ddf-a0e4-d45b16e0219d" CreationDate="2011-04-19T15:59:13.660" UserId="51" Comment="deleted 24 characters in body; edited tags; edited title" Text="After figuring out the pricing of monoTouch and Unity, I've found that the pricing will be the same ($800). With XnaTouch for monoTouch I am able to port my games to droid/apple. I am just curious if anyone has tried both XnaTouch and Unity and which one they prefer.  &#xD;&#xA;&#xD;&#xA;I do mostly 2D games (if Unity had a 2d Engine I would be all over that) so xnaTouch seems that it might be better, but Unity seems better for more advance/professional (more companies are using it, so if I ever wanted to do this for more than just myself I have more options, which I've thought about)&#xD;&#xA;&#xD;&#xA;(I also read somewhere that monoTouch is against the new apple term of agreement?)&#xD;&#xA;" />
  <row Id="24236" PostHistoryTypeId="4" PostId="11341" RevisionGUID="e0f88cde-8e68-4ddf-a0e4-d45b16e0219d" CreationDate="2011-04-19T15:59:13.660" UserId="51" Comment="deleted 24 characters in body; edited tags; edited title" Text="Unity or MonoTouch with XNATouch? same price" />
  <row Id="24237" PostHistoryTypeId="6" PostId="11341" RevisionGUID="e0f88cde-8e68-4ddf-a0e4-d45b16e0219d" CreationDate="2011-04-19T15:59:13.660" UserId="51" Comment="deleted 24 characters in body; edited tags; edited title" Text="&lt;unity&gt;&lt;mono&gt;&lt;monotouch&gt;" />
  <row Id="24238" PostHistoryTypeId="2" PostId="11351" RevisionGUID="2fd23cb8-2a11-45d8-bcc8-1a27a87094ae" CreationDate="2011-04-19T16:05:38.523" UserId="1430" Text="[GDNet][1] also has a [Game Design][2] forum.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.net/&#xD;&#xA;  [2]: http://www.gamedev.net/forum/17-game-design/" />
  <row Id="24239" PostHistoryTypeId="2" PostId="11352" RevisionGUID="09ae0885-a9ec-449a-a761-cf0a5b85b2c6" CreationDate="2011-04-19T16:06:08.300" UserId="288" Text="Much like &lt;a href=&quot;http://gamedev.stackexchange.com/questions/11230/how-to-use-xml-files-as-content-files-in-xna&quot;&gt;this question&lt;/a&gt;, **you cannot simply *make up* the XML format!**&#xD;&#xA;&#xD;&#xA;You have to use a format which matches the objects you will be deserializing!&#xD;&#xA;&#xD;&#xA;Just as in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/11230/how-to-use-xml-files-as-content-files-in-xna/11241#11241&quot;&gt;my answer&lt;/a&gt; to that question, you can simply create some of your objects, serialize them, and see what they *should* look like in XML such that they can be deserialized. For example:&#xD;&#xA;&#xD;&#xA;	var sb = new StringBuilder();&#xD;&#xA;	using(XmlWriter writer = XmlWriter.Create(sb))&#xD;&#xA;	{&#xD;&#xA;		IntermediateSerializer.Serialize(writer, theRootObjectYouAreSerializing, null);&#xD;&#xA;	}&#xD;&#xA;	Console.Write(sb.ToString());&#xD;&#xA;&#xD;&#xA;So in your case, if your question structure looks like this:&#xD;&#xA;&#xD;&#xA;    struct Question&#xD;&#xA;    {&#xD;&#xA;        public string question; &#xD;&#xA;        public string correct;&#xD;&#xA;        public List&lt;string&gt; answers;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then your XML will look something like this:&#xD;&#xA;&#xD;&#xA;	&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#xD;&#xA;	&lt;XnaContent&gt;&#xD;&#xA;	&lt;Asset Type=&quot;MyNamespace.Question&quot;&gt;&#xD;&#xA;		&lt;question&gt;What is 3 x 3? Orange = 9, Pear = 10, Apple = 12&lt;/question&gt;&#xD;&#xA;		&lt;correct&gt;orange&lt;/correct&gt;&#xD;&#xA;		&lt;answers&gt;&#xD;&#xA;			&lt;Item&gt;orange&lt;/Item&gt;&#xD;&#xA;			&lt;Item&gt;pear&lt;/Item&gt;&#xD;&#xA;			&lt;Item&gt;apple&lt;/Item&gt;&#xD;&#xA;		&lt;/answers&gt;&#xD;&#xA;	&lt;/Asset&gt;&#xD;&#xA;	&lt;/XnaContent&gt;" />
  <row Id="24240" PostHistoryTypeId="2" PostId="11353" RevisionGUID="cc254b53-70f7-42fe-8af5-048ffa29fc3b" CreationDate="2011-04-19T16:17:39.423" UserId="6690" Text="I don't know if there's a &quot;correct&quot; way to do it, but it's likely just an aesthetically pleasing linear transform applied with a falloff calculated from distance to a point.&#xD;&#xA;&#xD;&#xA;So for any element you're working with, you'd:&#xD;&#xA;&#xD;&#xA;* find the distance to the center of the warp (d)&#xD;&#xA;* calculate 1 - d / the max distance of the effect you'd like (i for intensity)&#xD;&#xA;* clamp that to [0-1]&#xD;&#xA;* transform the element by lerp( identity, transform, i )&#xD;&#xA;&#xD;&#xA;Iirc, Geometry wars applied that as a distorting warp to some elements, while other elements like particles were just affected by the &quot;force&quot;, without being distorted. You could apply the distortion in a vertex shader, assuming you had enough vertices to smoothly sample the effect. Alternatively you could render everything that needs affecting to an offscreen buffer first, and then render the results onto a nicely tessellated quad that you apply the distortion to, before adding all the non distorted elements on top.&#xD;&#xA;&#xD;&#xA;As for the transform, scaling will give you the sucking in look. If I remember correctly, there was also some twisting going on, which would just be a little rotation.&#xD;&#xA;&#xD;&#xA;You can get fancier and fancier with your calculations of the intensity factor to get wackier looking effects. You could, for instance, calculate the angle (a) that an element is relative to the center, and factor that in. Take cos(a) and you can make radial waves in the effect. What you want to do is set yourself up with the necessary scaffolding code and then go to town experimenting with different combinations of factors." />
  <row Id="24241" PostHistoryTypeId="2" PostId="11354" RevisionGUID="fcc7a2ca-d820-449e-9c4d-7517d1cc4ae3" CreationDate="2011-04-19T16:52:01.847" UserId="1743" Text="On top of bummzack's answer, which is pretty well fleshed out, I would give you one bit of advice.&#xD;&#xA;&#xD;&#xA;Before you get into animating, make sure your PHP is solid.  One good way of testing is to have several buttons on the page for your various actions, and use them with a simple POST call.&#xD;&#xA;&#xD;&#xA;If you can nail down your game processing logic, then animating it should be a simple step forward.  But, debugging AJAX requests can certainly be a headache if you're not careful." />
  <row Id="24242" PostHistoryTypeId="2" PostId="11355" RevisionGUID="ace12972-6fb3-435f-8781-dcb6a047a48b" CreationDate="2011-04-19T17:15:17.867" UserId="6690" Text="This depends entirely on your input data.&#xD;&#xA;&#xD;&#xA;If all you have is a bitmap, then you'll need some bitmap data. You could paint a parallel image to your game map, but with block colors where the countries are. You'd want the image painted palletized, with each color representing a country. At runtime, load it uncompressed and trivially look up which color, and thus which country is under any given pixel by mapping your pick ray onto the image. If you're just displaying in 2D, it should be easy to map the screen coordinates to the map coordinates. This is a nice fast array lookup, and should be easy to author side by side with the visual map. &#xD;&#xA;&#xD;&#xA;If you want to save some memory, it's highly likely that you could quarter this image and still have enough fidelity to feel precise picking countries near borders.&#xD;&#xA;&#xD;&#xA;If you're modeling geometry for your countries, say you're making a nice 3D map, then you could just feed each country into a collision library like &lt;http://bulletphysics.org/&gt; and just build a pick ray from the camera and collide it with the resulting optimized shapes. Which shape gets picked tells you which country was hit. It's highly likely that this would be fast enough for you, and again it would be easy to author side by side with your visual data." />
  <row Id="24243" PostHistoryTypeId="2" PostId="11356" RevisionGUID="c27e0adb-2451-4ed2-a66d-17d882a0f94d" CreationDate="2011-04-19T18:06:16.843" UserId="4410" Text="A 10-minute implementation of a simple spring system (or so he says on his [blog][1] ;) ). The system can handle multiple warps and other things distorting the grid.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.quantumrain.com/post/4429184416/postmortem-wars-the-grid" />
  <row Id="24244" PostHistoryTypeId="25" PostId="11338" RevisionGUID="b6940c70-07cd-4681-80fc-ce567c78e495" CreationDate="2011-04-19T18:09:28.053" Comment="http://twitter.com/#!/StackGameDev/status/60404661512974337" />
  <row Id="24245" PostHistoryTypeId="2" PostId="11357" RevisionGUID="d992e8c8-8712-4e05-a1de-6b91ff6050a2" CreationDate="2011-04-19T18:21:43.497" UserId="6042" Text="In console games we never, ever use std::list because:&#xD;&#xA;&#xD;&#xA;1. it does memory allocations whenever you add a new item. memory allocations are slow.&#xD;&#xA;2. it's full of pointers. pointers are bad. a pointer is a cache miss. a cache miss is bad.&#xD;&#xA;&#xD;&#xA;even std::vector is losing favor on consoles because:&#xD;&#xA;&#xD;&#xA;1. you often care only about, for example, the positions of all the objects. like for example you want to collide the objects with each other, in which case you don't care what their color is. so you want all the positions to be contiguous in memory and you want the colors to be somewhere else far away, to avoid polluting the cache. but std::vector requires you to store everything for each object in a contiguous chunk of memory (e.g. position then color.) so if you do work that reads only the positions, you need to read all the colors into the cache too, even if you don't use them. this is wasteful." />
  <row Id="24246" PostHistoryTypeId="2" PostId="11358" RevisionGUID="e4bc30c7-0f7b-499c-8433-752c8eaa363b" CreationDate="2011-04-19T18:37:35.127" UserId="1198" Text="I presume that you mean MonoTouch + MonoGame (formerly XNATouch). There are several successful iOS games deployed using that combination. It seems that either way you can port to/from iOS/Android, so the question be comes which do you like better?&#xD;&#xA;&#xD;&#xA;I believe that the iOS terms were adjusted to permit things like MonoTouch; however, (my optinion follows) *Since Apple runs the iOS environment, you will **alway** be at their mercy, whatever Steve Jobs decides isn't kocher for iOS will be given the boot.* with that said; I would probably not hesitate to use MonoTouch to develop commercial software for iOS.&#xD;&#xA;&#xD;&#xA;In terms of Unity if you really think it might be a better option than MonoTouch and MonoGame, I'd try out the free version of Unity and see if you like the tooling and the development experience, if you like it go for it and if you don't, head to MonoTouch." />
  <row Id="24247" PostHistoryTypeId="5" PostId="11338" RevisionGUID="279929f9-0611-4bf4-a76b-15bc1e645180" CreationDate="2011-04-19T18:38:12.943" UserId="1198" Comment="deleted 14 characters in body" Text="I'm writing a 2D rigid body simulator. The objects being simulated are convex polygons. My question involves how to decide on the &quot;point&quot; of collision, so that when I apply a response force, I can also calculate torque.&#xD;&#xA;&#xD;&#xA;In 2D, the popular method of narrowphase collision detection seems to be the Separating Axis Theorem. However, while this gives you the &quot;are they colliding?&quot; as well as &quot;by how much?&quot;, it does NOT give you a reference point (that I'm aware of) at which to apply the response force (and thus calculate torque)*.&#xD;&#xA;&#xD;&#xA;The other method (which also interests me more, because it's what's used in 3D, which would be the logical next step) is to calculate the Minkowski difference of the two polygons, and decide that they're colliding if (0,0) is contained in the resulting polygon. But, how do you use this to decide the relative point at which to apply the response force? My hypothesis is that, since each face of this difference effectively corresponds to a face of one of the polygons, the separation distance is the shortest distance from (0,0) to the MD, and you apply this to the corresponding face on the polygon.&#xD;&#xA;&#xD;&#xA;As a bonus, how does one do this in 3D?&#xD;&#xA;&#xD;&#xA;*As I'm writing this, I just realized that, when using SAT, I could just keep track of which points are overlapping, and apply the force at the &quot;average&quot; of those points. But I would have to decide on which of the several non-separating axes to perform this little trick..." />
  <row Id="24248" PostHistoryTypeId="5" PostId="11344" RevisionGUID="74fde398-7147-4342-abba-8e4cd7554369" CreationDate="2011-04-19T18:38:59.807" UserId="1198" Comment="added 4 characters in body" Text="This is very much possible in javascript, you can also load your preferred console font from an `.ttf` or `.otf` file. " />
  <row Id="24249" PostHistoryTypeId="5" PostId="11330" RevisionGUID="f4455901-7637-4d50-b377-d8125d405684" CreationDate="2011-04-19T18:40:32.130" UserId="1198" Comment="added 12 characters in body; edited body" Text="SkinnedModel sample nicely shows how to import single root bone skeleton and run in XNA.&#xD;&#xA;&#xD;&#xA;My question are:&#xD;&#xA; &#xD;&#xA; 1. Is it possible to have animations played in XNA if there no bones are used in model (which can easily be done in 3dmax with auto key frames)?&#xD;&#xA;&#xD;&#xA; 2. Is it possible to have multiple independent bones laying around, connected to independent meshes and animated, all played in XNA?&#xD;&#xA;&#xD;&#xA; 3. Can SkinnedModelProcessor be downgraded to this level ?" />
  <row Id="24250" PostHistoryTypeId="5" PostId="11341" RevisionGUID="c90641ad-8bf2-4ad6-a145-9c7599c4eeb3" CreationDate="2011-04-19T18:43:19.117" UserId="2301" Comment="xnatouch is now called monogame" Text="After figuring out the pricing of monoTouch and Unity, I've found that the pricing will be the same ($800). With XnaTouch/MonoGame for monoTouch I am able to port my games to droid/apple. I am just curious if anyone has tried both XnaTouch and Unity and which one they prefer.  &#xD;&#xA;&#xD;&#xA;I do mostly 2D games (if Unity had a 2d Engine I would be all over that) so xnaTouch seems that it might be better, but Unity seems better for more advance/professional (more companies are using it, so if I ever wanted to do this for more than just myself I have more options, which I've thought about)&#xD;&#xA;&#xD;&#xA;(I also read somewhere that monoTouch is against the new apple term of agreement?)&#xD;&#xA;" />
  <row Id="24251" PostHistoryTypeId="4" PostId="11341" RevisionGUID="c90641ad-8bf2-4ad6-a145-9c7599c4eeb3" CreationDate="2011-04-19T18:43:19.117" UserId="2301" Comment="xnatouch is now called monogame" Text="Unity or MonoTouch with XNATouch/MonoGame? same price" />
  <row Id="24252" PostHistoryTypeId="24" PostId="11341" RevisionGUID="c90641ad-8bf2-4ad6-a145-9c7599c4eeb3" CreationDate="2011-04-19T18:43:19.117" Comment="Proposed by 2301 approved by 1198 edit id of 341" />
  <row Id="24253" PostHistoryTypeId="5" PostId="6257" RevisionGUID="ebb12388-f366-47ca-b8e9-08dc70a2df30" CreationDate="2011-04-19T18:52:30.907" UserId="1198" Comment="edited body" Text="Personally I believe HTML5 to be downwards stable, i.e. what's there won't go again. Obviously no ones knows how all the unresolved issues will turn out in the end and yes, there might be features in the future that one should wait for, but it's already &quot;good enough&quot;. That's why I guess a lot of people are working on their own html5 game engine or towards that. At least I am :-)&#xD;&#xA;&#xD;&#xA;It does not have an isometric builder yet, but well, it does not stop you either.&#xD;&#xA;Tutorials will be added soonish, but mainly I am posting this cause I also listed all the other engines I found so far - here at the bottom&#xD;&#xA;http://blog.weeblog.net/?p=29" />
  <row Id="24254" PostHistoryTypeId="2" PostId="11359" RevisionGUID="fa17b9f1-90b6-44fd-aafd-4286f60e80a4" CreationDate="2011-04-19T14:08:44.133" UserDisplayName="Steven" Text="I'd like to develop a small Facebook game with some graphics involved (not that many). Within that game, the users will be able to buy/sell certain items and I wonder WHERE I can save those items/virtual money ...? Does Facebook offer me a database I can use?" />
  <row Id="24255" PostHistoryTypeId="1" PostId="11359" RevisionGUID="fa17b9f1-90b6-44fd-aafd-4286f60e80a4" CreationDate="2011-04-19T14:08:44.133" UserDisplayName="Steven" Text="Facebook Game Development - Where can I save my data?" />
  <row Id="24256" PostHistoryTypeId="3" PostId="11359" RevisionGUID="fa17b9f1-90b6-44fd-aafd-4286f60e80a4" CreationDate="2011-04-19T14:08:44.133" UserDisplayName="Steven" Text="&lt;facebook&gt;" />
  <row Id="24257" PostHistoryTypeId="17" PostId="11359" RevisionGUID="99544eda-9784-4b28-852f-67d6c2a13138" CreationDate="2011-04-19T19:18:11.540" UserId="-1" Comment="from http://webapps.stackexchange.com/questions/14636/facebook-game-development-where-can-i-save-my-data" Text="" />
  <row Id="24258" PostHistoryTypeId="5" PostId="10726" RevisionGUID="3ce9a4e9-9c76-4f7c-8a13-cc60270ce1a1" CreationDate="2011-04-19T19:32:46.343" UserId="6561" Comment="clarity edit" Text="[Torque-2d][1] by GarageGames is a great game engine with a great community, some really impressive add-ons, and built-in support for Windows, Mac, and Wii, and even the iOS (on separate license). It costs $99.&#xD;&#xA;&#xD;&#xA;[Unity3d][3] (you can develop 2d games on it) is another very good high quality game engine with a relatively low barrier to entry. Again, great community, and really cool multi-platform support, including iOS and Android, in addition to Win/Mac, Wii, Xbox, Playstation, and the web.&#xD;&#xA;&#xD;&#xA;A great iPhone centric game engine is cocos2d for iOS.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com/products/torque-2d/&#xD;&#xA;  [3]: http://unity3d.com/unity/engine/" />
  <row Id="24259" PostHistoryTypeId="2" PostId="11360" RevisionGUID="ca5ed5ba-af47-4b35-8e7e-9b526614c304" CreationDate="2011-04-19T19:34:50.007" UserId="6561" Text="[Google App Engine][1] and [AWS Simple Db][2] would be a good starting point. They include some superb sample client code to get you going.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/appengine/docs/whatisgoogleappengine.html&#xD;&#xA;  [2]: http://aws.amazon.com/simpledb/usecases_online_gaming/" />
  <row Id="24260" PostHistoryTypeId="5" PostId="11359" RevisionGUID="1f98eb10-da0a-44c0-9d22-5df2fa933fba" CreationDate="2011-04-19T19:39:31.510" UserId="1198" Comment="deleted 11 characters in body" Text="I'd like to develop a small Facebook game with some graphics involved (not that many). Within that game, the users will be able to buy/sell certain items and I wonder WHERE I can save those items/virtual money...? Does Facebook offer me a database I can use?" />
  <row Id="24261" PostHistoryTypeId="5" PostId="11299" RevisionGUID="de95c1b7-7af9-4692-a7ae-d14e747d608e" CreationDate="2011-04-19T19:42:02.493" UserId="360" Comment="deleted 1 characters in body" Text="A little late, but posted as an answer as requested. &#xD;&#xA;&#xD;&#xA;They wont move any more because they 'hit' the platform, so you're moving them back to their previous position. You need to check their new position against the old position. If they moved down into the platform from the top (as with gravity), you just need to use their old Y position, not the X.&#xD;&#xA;&#xD;&#xA;To solve the 'sticking to the side' issue, you'd do the same as the 'sticking to the top' solution, but just revert the X and leave the Y in tact.&#xD;&#xA;&#xD;&#xA;In the case where you move the character too far back, you could just calculate the exact X or Y position using the width/height of the bounding boxes.&#xD;&#xA;&#xD;&#xA;Eg.&#xD;&#xA;If you're using the centroid as your position, and the player is moving left-to-right and hits a wall:&#xD;&#xA;&#xD;&#xA;    player.X = wall.X - (wall.Width / 2) - (player.width / 2);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   " />
  <row Id="24262" PostHistoryTypeId="2" PostId="11361" RevisionGUID="c94df7cb-f892-41a5-be51-42d5dd2a4924" CreationDate="2011-04-19T19:54:42.023" UserId="-1" Text="" />
  <row Id="24263" PostHistoryTypeId="2" PostId="11362" RevisionGUID="7cc9e264-0ccd-4b44-97f6-989906356e9c" CreationDate="2011-04-19T19:54:42.023" UserId="-1" Text="" />
  <row Id="24264" PostHistoryTypeId="2" PostId="11363" RevisionGUID="5bd5aa75-9ed9-4cfd-a9be-c494de547c05" CreationDate="2011-04-19T20:03:21.547" UserId="-1" Text="" />
  <row Id="24265" PostHistoryTypeId="2" PostId="11364" RevisionGUID="af35dc77-bfb0-44af-bff6-f559fecb2eec" CreationDate="2011-04-19T20:03:21.547" UserId="-1" Text="" />
  <row Id="24266" PostHistoryTypeId="2" PostId="11365" RevisionGUID="5c017642-f556-46fa-bf6b-f29861893544" CreationDate="2011-04-19T20:20:04.333" UserId="-1" Text="" />
  <row Id="24267" PostHistoryTypeId="2" PostId="11366" RevisionGUID="8cd90f7f-0fa0-46d5-a58e-8ea1e2932114" CreationDate="2011-04-19T20:20:04.333" UserId="-1" Text="" />
  <row Id="24268" PostHistoryTypeId="5" PostId="11116" RevisionGUID="4cd30263-2de1-44f5-bcc0-7ea5f188b40e" CreationDate="2011-04-19T20:45:30.417" UserId="3588" Comment="Mostly adding the [position] and [math] tags, but while I'm here I figured I could remove the salutations. ♪" Text="I'm developing a space-simulation related game, and I am having some trouble implementing the movement of binary stars, like this:&#xD;&#xA;&#xD;&#xA;![Binary star][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/MMspr.gif&#xD;&#xA;&#xD;&#xA;The two stars orbit their centroid, and their trajectories are ellipses.&#xD;&#xA;&#xD;&#xA;I basically know how to determine the angular velocity at any position, but not the angular velocity over time. So, for a given angle, I can very easily compute the stars position (cf. http://en.wikipedia.org/wiki/Orbit_equation).&#xD;&#xA;&#xD;&#xA;I'd want to get the stars position over time. The parametric equations of the ellipse works but doesn't give the correct speed :&#xD;&#xA;`{ X(t) = a×cos(t) ; Y(t) = b×sin(t) }`.&#xD;&#xA;&#xD;&#xA;Is it possible, and how can it be done?" />
  <row Id="24269" PostHistoryTypeId="6" PostId="11116" RevisionGUID="4cd30263-2de1-44f5-bcc0-7ea5f188b40e" CreationDate="2011-04-19T20:45:30.417" UserId="3588" Comment="Mostly adding the [position] and [math] tags, but while I'm here I figured I could remove the salutations. ♪" Text="&lt;math&gt;&lt;physics&gt;&lt;position&gt;" />
  <row Id="24270" PostHistoryTypeId="24" PostId="11116" RevisionGUID="4cd30263-2de1-44f5-bcc0-7ea5f188b40e" CreationDate="2011-04-19T20:45:30.417" Comment="Proposed by 3588 approved by 51 edit id of 348" />
  <row Id="24271" PostHistoryTypeId="5" PostId="11366" RevisionGUID="3ef0cbb1-5d5f-4ec7-86ff-27465c077aca" CreationDate="2011-04-19T20:45:33.367" UserId="3588" Comment="added 54 characters in body" Text="The directional facing of an entity in the game space." />
  <row Id="24272" PostHistoryTypeId="24" PostId="11366" RevisionGUID="3ef0cbb1-5d5f-4ec7-86ff-27465c077aca" CreationDate="2011-04-19T20:45:33.367" Comment="Proposed by 3588 approved by 51 edit id of 347" />
  <row Id="24273" PostHistoryTypeId="5" PostId="11362" RevisionGUID="06790833-8cc3-414d-8585-b8718787f3a4" CreationDate="2011-04-19T20:45:35.833" UserId="3588" Comment="added 123 characters in body" Text="A genre of games dealing with entities participating in a competitive race. Reaching the finish line first may be optional." />
  <row Id="24274" PostHistoryTypeId="24" PostId="11362" RevisionGUID="06790833-8cc3-414d-8585-b8718787f3a4" CreationDate="2011-04-19T20:45:35.833" Comment="Proposed by 3588 approved by 51 edit id of 343" />
  <row Id="24275" PostHistoryTypeId="5" PostId="11361" RevisionGUID="99a08980-d1ac-4f43-ba29-ae1ded824eea" CreationDate="2011-04-19T20:45:37.347" UserId="3588" Comment="added 911 characters in body" Text="Use this tag if you're having questions while developing a Racing game of your own.&#xD;&#xA;&#xD;&#xA;**Racing games** are those which are focused on some manner of competitive race. It is most often manifest in the form of car races, reaching all manner from NASCAR and Formula-1 to Street Racing and Go Karts, but is not limited to automobiles or even vehicular transport. They can be considered a subset of the broader Sports genre. Some examples of this genre include the *Mario Kart* series, the *Need For Speed* series, and the *Burnout* series.&#xD;&#xA;&#xD;&#xA;A Racing game is identified by its main setting and gameplay being a race. However, time and speed is not necessarily the goal of every Racing game. Some games may weight or fully base rank on elements such as stunts performed, items collected, or destruction waged. Many Racing games also include alternative gameplay modes such as arena-based fighting or car billiards." />
  <row Id="24276" PostHistoryTypeId="24" PostId="11361" RevisionGUID="99a08980-d1ac-4f43-ba29-ae1ded824eea" CreationDate="2011-04-19T20:45:37.347" Comment="Proposed by 3588 approved by 51 edit id of 342" />
  <row Id="24277" PostHistoryTypeId="5" PostId="11364" RevisionGUID="4b949e0e-1a2e-449a-9e97-f6b37d873e33" CreationDate="2011-04-19T20:45:39.877" UserId="3588" Comment="added 77 characters in body" Text="The creation, manual or algorithmic, of frames of animation 'twixt keyframes." />
  <row Id="24278" PostHistoryTypeId="24" PostId="11364" RevisionGUID="4b949e0e-1a2e-449a-9e97-f6b37d873e33" CreationDate="2011-04-19T20:45:39.877" Comment="Proposed by 3588 approved by 51 edit id of 345" />
  <row Id="24279" PostHistoryTypeId="5" PostId="11363" RevisionGUID="c17255f0-e36d-4568-ad82-35f5a54ece06" CreationDate="2011-04-19T20:45:44.513" UserId="3588" Comment="added 656 characters in body" Text="Shorthand for **inbetweening**, **tweening** originally was developed as a means of simplifying the storyboarding and artistic process in animation. The lead artist would design only the keyframes of animation to observe the progression - once the animation was approved, tweeners would draw out all of the frames between each keyframe.&#xD;&#xA;&#xD;&#xA;Advances in computer graphics have since allowed tweening to be automatically generated, and it has become an essential tool in all forms of animation.&#xD;&#xA;&#xD;&#xA;Use this tag when dealing with tweening issues in the animation of your game's entities. It can apply equally to manual tweening and software-generated tweening." />
  <row Id="24280" PostHistoryTypeId="24" PostId="11363" RevisionGUID="c17255f0-e36d-4568-ad82-35f5a54ece06" CreationDate="2011-04-19T20:45:44.513" Comment="Proposed by 3588 approved by 51 edit id of 344" />
  <row Id="24281" PostHistoryTypeId="5" PostId="11365" RevisionGUID="0d4b8982-5673-4ba0-a814-3176e7204761" CreationDate="2011-04-19T20:45:46.590" UserId="3588" Comment="added 649 characters in body" Text="One of the primary spatial properties of an object, it is the position of an object relative to rotational space. If [tag:position] describes where an object is placed, orientation describes *how* the object is placed.&#xD;&#xA;&#xD;&#xA;In a literal sense, orientation only figures in when there is rotational movement involved. However, orientation can also describe in the absence of actual rotation - such as left-right in a side-scrolling game, or a 2D sprite's &quot;direction&quot; in an isometric playing field. Questions under the purview of this tag deal with both forms of orientation of entities, for tasks such as determining, storing, or fixing the orientation." />
  <row Id="24282" PostHistoryTypeId="24" PostId="11365" RevisionGUID="0d4b8982-5673-4ba0-a814-3176e7204761" CreationDate="2011-04-19T20:45:46.590" Comment="Proposed by 3588 approved by 51 edit id of 346" />
  <row Id="24283" PostHistoryTypeId="25" PostId="11335" RevisionGUID="d5b709df-6250-4167-a3e4-05bad0f77c5a" CreationDate="2011-04-19T21:09:29.427" Comment="http://twitter.com/#!/StackGameDev/status/60449964765089792" />
  <row Id="24284" PostHistoryTypeId="2" PostId="11367" RevisionGUID="d7635e14-4f27-4106-add7-79179a3f67d9" CreationDate="2011-04-19T21:12:16.637" UserId="6842" Text="What I DON'T need is an mmorpg Engine, at the moment.&#xD;&#xA;&#xD;&#xA;What I need is a flexible easy-to-use engine that I can make a mock-up with. I don't need support for more than 10 players in an instance, so any multiplayer platform is probably fine.&#xD;&#xA;&#xD;&#xA;I need an engine with which I can create the following core features:&#xD;&#xA;&#xD;&#xA;- Waves of simple AI enemies that have specific objectives (move to point a, destroy target, move to point b). The units present can be between 50-200 in number.&#xD;&#xA;- An over-the-shoulder view and the ability to control a team of 3 (like mass effect or the latest Dragon Age)&#xD;&#xA;- Functioning inventory system&#xD;&#xA;&#xD;&#xA;Right now, all I can really think of is Unreal or Source. Any other suggestions? Again, this is a proving mock-up, not an actual MMO.&#xD;&#xA;&#xD;&#xA;I'm not terribly worried about the visual aspects as we just want to test mechanics.&#xD;&#xA;" />
  <row Id="24285" PostHistoryTypeId="1" PostId="11367" RevisionGUID="d7635e14-4f27-4106-add7-79179a3f67d9" CreationDate="2011-04-19T21:12:16.637" UserId="6842" Text="Need an engine for MMO mockup" />
  <row Id="24286" PostHistoryTypeId="3" PostId="11367" RevisionGUID="d7635e14-4f27-4106-add7-79179a3f67d9" CreationDate="2011-04-19T21:12:16.637" UserId="6842" Text="&lt;game-design&gt;&lt;engine&gt;&lt;mmo&gt;&lt;tools&gt;&lt;testing&gt;" />
  <row Id="24287" PostHistoryTypeId="5" PostId="11367" RevisionGUID="fca63361-b3de-44b4-87bd-7d58b495a0fc" CreationDate="2011-04-19T21:17:30.690" UserId="1430" Comment="added 7 characters in body; edited tags" Text="What I *don't* need is an MMORPG engine, at the moment.&#xD;&#xA;&#xD;&#xA;What I *do* need is a flexible easy-to-use engine that I can make a mock-up with. I don't need support for more than 10 players in an instance, so any multiplayer platform is probably fine.&#xD;&#xA;&#xD;&#xA;I need an engine with which I can create the following core features:&#xD;&#xA;&#xD;&#xA;- Waves of simple AI enemies that have specific objectives (move to point A, destroy target, move to point B). The units present can be between 50-200 in number.&#xD;&#xA;- An over-the-shoulder view and the ability to control a team of 3 (like Mass Effect or the latest Dragon Age)&#xD;&#xA;- Functioning inventory system&#xD;&#xA;&#xD;&#xA;Right now, all I can really think of is Unreal or Source. Any other suggestions? Again, this is a proving mock-up, not an actual MMO.&#xD;&#xA;&#xD;&#xA;I'm not terribly worried about the visual aspects as we just want to test mechanics.&#xD;&#xA;" />
  <row Id="24288" PostHistoryTypeId="6" PostId="11367" RevisionGUID="fca63361-b3de-44b4-87bd-7d58b495a0fc" CreationDate="2011-04-19T21:17:30.690" UserId="1430" Comment="added 7 characters in body; edited tags" Text="&lt;engine&gt;&lt;mmo&gt;&lt;tools&gt;&lt;testing&gt;" />
  <row Id="24289" PostHistoryTypeId="2" PostId="11368" RevisionGUID="e3b4f316-bbaa-4aa0-b53a-023619c47d8f" CreationDate="2011-04-19T21:39:21.687" UserId="395" Text="About the only thing that will be this high-level is a tool like RPGMaker. Honestly if you just want to test it, mock something out in a top-down view using blue and red boxes or something." />
  <row Id="24290" PostHistoryTypeId="2" PostId="11369" RevisionGUID="3d6928ed-9e19-4315-8227-2eb0b3be1688" CreationDate="2011-04-19T22:19:00.950" UserId="2472" Text="Your question is about what it takes to write a 2D game prototype, but I think there's something else to consider: the biggest advantage of Flash is what it takes to share that prototype with others. Almost everyone already has Flash installed. I can upload a SWF and pass the URL to someone over chat or email. No download, no install, no unzip, no exe, no cross platform issue. I ended up picking Flash because it was so easy to share and get feedback. Iteration involves uploading again and telling them to reload, and I wanted quick iteration for prototyping. (Javascript + Canvas/SVG is another useful option, and I'm sure we'll soon see libraries like Flixel/Flashpunk for JS)." />
  <row Id="24291" PostHistoryTypeId="5" PostId="11367" RevisionGUID="1520b97c-3bc1-4ad6-a39e-f140f589f306" CreationDate="2011-04-19T22:31:53.200" UserId="6842" Comment="added 71 characters in body" Text="What I *don't* need is an MMORPG engine, at the moment.&#xD;&#xA;&#xD;&#xA;What I *do* need is a flexible easy-to-use engine that I can make a mock-up with. I don't need support for more than 10 players in an instance, so any multiplayer platform is probably fine.&#xD;&#xA;&#xD;&#xA;I need an engine with which I can create the following core features:&#xD;&#xA;&#xD;&#xA;- Waves of simple AI enemies that have specific objectives (move to point A, destroy target, move to point B). The units present can be between 50-200 in number.&#xD;&#xA;- An over-the-shoulder view and the ability to control a team of 3 (like Mass Effect or the latest Dragon Age)&#xD;&#xA;- Functioning inventory system&#xD;&#xA;&#xD;&#xA;Right now, all I can really think of is Unreal or Source. Any other suggestions? Again, this is a proving mock-up, not an actual MMO.&#xD;&#xA;&#xD;&#xA;I'm not terribly worried about the visual aspects as we just want to test mechanics.&#xD;&#xA;&#xD;&#xA;*Note: Can write some scripts in Python, Ruby, or Lua, if necessary.*" />
  <row Id="24292" PostHistoryTypeId="5" PostId="11356" RevisionGUID="195af0b9-52e3-4c82-b02a-3c979f0f8fbc" CreationDate="2011-04-19T22:35:31.573" UserId="4410" Comment="added more specific detail" Text="A 10-minute implementation of a simple spring system (or so he says on his [blog][1] ;) ). The system can handle multiple warps and other things distorting the grid.&#xD;&#xA;&#xD;&#xA;Updated to add some minor addition detail:&#xD;&#xA;&#xD;&#xA;A few other details. From an interview that used to be hosted on the Bizarre Creations website (that site has now disappeared due to the company closure) there was a question:&#xD;&#xA;&#xD;&#xA;**Q: One of the most striking new graphical features in the game is the &quot;gravity grid&quot; play area. How did you make this look so cool; does every object in the game really have its own gravity?**&#xD;&#xA;The grid itself is made up of 60,000 points, each one exerting a small amount of force on its neighbour. The simulation itself sits on the edge of stability which is what causes it to swing about so much when one of the game objects gives it a small push!&#xD;&#xA;Only a few types of object affect the grid. As the grid system is rather expensive to calculate, it actually runs on the second core along with the audio system, (the first core being dedicated to gameplay and particles, the third is used to render the audio).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.quantumrain.com/post/4429184416/postmortem-wars-the-grid" />
  <row Id="24293" PostHistoryTypeId="2" PostId="11370" RevisionGUID="c6dce312-8a93-42a0-8529-c2c95f88bb58" CreationDate="2011-04-19T23:19:00.710" UserId="6275" Text="hey, ive been stuck on this problem for a couple of days, so i figured i'd ask here. the problem is that im trying to use my meshes with Bullet Physics for the collision part of my game.&#xD;&#xA;&#xD;&#xA;but when i attempted doing this method with my GLM(model loading library by nate robins) model, i get a segmentation fault in the debug, so then i figured that it doesnt like the coordinate variables of the model.&#xD;&#xA;&#xD;&#xA;so my question is: If i use blender to export my model as a collision file, what type of file should i use?&#xD;&#xA;&#xD;&#xA;i heard theres a .bullet exporter, but i dont know hot to integrate this python script into my Blender 2.5 program..." />
  <row Id="24294" PostHistoryTypeId="1" PostId="11370" RevisionGUID="c6dce312-8a93-42a0-8529-c2c95f88bb58" CreationDate="2011-04-19T23:19:00.710" UserId="6275" Text="A simple question about Bullet Physics." />
  <row Id="24295" PostHistoryTypeId="3" PostId="11370" RevisionGUID="c6dce312-8a93-42a0-8529-c2c95f88bb58" CreationDate="2011-04-19T23:19:00.710" UserId="6275" Text="&lt;opengl&gt;&lt;c++&gt;&lt;blender&gt;&lt;bullet-physics&gt;" />
  <row Id="24296" PostHistoryTypeId="2" PostId="11371" RevisionGUID="98ac753b-06c5-4405-a486-a630b55fae0d" CreationDate="2011-04-19T23:38:48.923" UserId="2332" Text="[Unity][1] - It will allow you quickly prototype what you're after. It has networking support, you can add flexible scripts to it to create your gameplay mechanics and it's got a lot of support and resources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="24297" PostHistoryTypeId="2" PostId="11372" RevisionGUID="64cd0231-7b87-41e7-8d20-e46d3dd8d139" CreationDate="2011-04-19T23:39:19.867" UserId="37" Text="[PixieEngine][1] is a web based IDE and game development environment. It provides easy Box2d integration and a built in pixel editor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pixieengine.com" />
  <row Id="24298" PostHistoryTypeId="6" PostId="4754" RevisionGUID="62f49b1b-19dd-4df6-9159-e87e961bdfac" CreationDate="2011-04-19T23:59:38.023" UserId="3588" Comment="Added the position tag, started the seed for projectile-physics (see the start from http://chat.stackexchange.com/transcript/message/858147#858147). I'll leave the 2d-physics for later elaboration. ♪" Text="&lt;2d-physics&gt;&lt;position&gt;&lt;projectile-physics&gt;" />
  <row Id="24299" PostHistoryTypeId="24" PostId="4754" RevisionGUID="62f49b1b-19dd-4df6-9159-e87e961bdfac" CreationDate="2011-04-19T23:59:38.023" Comment="Proposed by 3588 approved by 189 edit id of 349" />
  <row Id="24300" PostHistoryTypeId="5" PostId="4762" RevisionGUID="b37825fc-53ec-467f-b5dd-eb2b43cbcb64" CreationDate="2011-04-20T00:04:00.080" UserId="2698" Comment="edited body" Text="Brandon's answer is pretty good, but if you're looking for something more advanced, you might want to check out linear interpolation: http://en.wikipedia.org/wiki/Linear_interpolation&#xD;&#xA;&#xD;&#xA;Also, if your curve is a function, you can know the x and y (and z) coords at a given time.&#xD;&#xA;This might help too: http://www.ucl.ac.uk/Mathematics/geomath/level2/fvec/fv8.html#l1" />
  <row Id="24301" PostHistoryTypeId="25" PostId="11370" RevisionGUID="d78438ab-1855-4a28-998d-022c7c308f04" CreationDate="2011-04-20T00:09:29.503" Comment="http://twitter.com/#!/StackGameDev/status/60495263999082496" />
  <row Id="24302" PostHistoryTypeId="2" PostId="11373" RevisionGUID="07ff8c15-6043-4d50-8739-2179d2e80c2f" CreationDate="2011-04-20T00:20:18.997" UserId="6042" Text="In console games we often use [Bicubic Interpolation][1] to solve this problem. First, sample an object's position at regular intervals of time t. For a projectile, add gravitational acceleration [0,dy/dt/dt] to its velocity [dx/dt,dy/dt] at each interval. Record all the [x,y] coordinates so generated in an array.&#xD;&#xA;&#xD;&#xA;Later, to reconstruct the object's position [x,y] for a given t, read the four samples closest to that t from the buffer you recorded: [t-1,t,t+1,t+2]. Blend the four samples according to the coefficients in the linked wikipedia article to get smooth motion in space.&#xD;&#xA;&#xD;&#xA;This is not as physically accurate as performing physics calculations on-the-fly but it permits artistic license and economy of scale to assist your simulation.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bicubic_interpolation" />
  <row Id="24308" PostHistoryTypeId="2" PostId="11375" RevisionGUID="ffbec2d1-4219-4488-b3a8-cc98c9441b4a" CreationDate="2011-04-20T02:13:44.963" UserId="1406" Text="You use b2ContactListener&#xD;&#xA;&#xD;&#xA;http://www.box2d.org/manual.html#_Toc258082975&#xD;&#xA;&#xD;&#xA;http://www.emanueleferonato.com/2008/12/23/understanding-how-box2d-manages-collisions/" />
  <row Id="24309" PostHistoryTypeId="25" PostId="11342" RevisionGUID="a12bcaf8-c01d-42a8-b7a8-9652d95e5af9" CreationDate="2011-04-20T03:09:29.450" Comment="http://twitter.com/#!/StackGameDev/status/60540562780073985" />
  <row Id="24310" PostHistoryTypeId="2" PostId="11376" RevisionGUID="66127e96-f2e7-4372-8bd9-5517dc21e415" CreationDate="2011-04-20T04:19:07.473" UserId="6588" Text="You need to provide your own server for hosting your database. Google App Engine is free to start using but kind of tricky because the database is Google's Big Table rather than SQL.&#xD;&#xA;&#xD;&#xA;So the option I recommend is Kodingen: http://kodingen.com/" />
  <row Id="24311" PostHistoryTypeId="2" PostId="11377" RevisionGUID="073ab750-b4b8-4627-b107-566efb82ae39" CreationDate="2011-04-20T05:16:26.623" UserId="5876" Text="I have a very simple shader and added linear fog via mix like this:&#xD;&#xA;&#xD;&#xA;	finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);&#xD;&#xA;&#xD;&#xA;Note that the view Z distance is in the variable that also contains the UV coordinates, so the fog didn't even add a new interpolator.&#xD;&#xA;&#xD;&#xA;Still, this one innocuous line brought the framerate on the OG Droid with the Power SGX chipset from 33fps to 22fps. Even the HTC Evo with the Adreno 200 GPU stays under 30fps. (The Adreno 205 is at a constant 60fps, but that thing is a beast).&#xD;&#xA;&#xD;&#xA;The fragment shader itself is primitive (all values are hard-coded since it's a test shader):&#xD;&#xA;&#xD;&#xA;    precision mediump float;&#xD;&#xA;    varying mediump vec3 vUVoutAndViewZ;&#xD;&#xA;    varying lowp vec3 vNormalOut;&#xD;&#xA;    &#xD;&#xA;    uniform lowp sampler2D diffuse;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;    	lowp vec3 normal = vNormalOut;&#xD;&#xA;    &#xD;&#xA;    	// Lighting&#xD;&#xA;    	lowp vec3 lightDir = vec3(0.5, 0.3, 0.5);&#xD;&#xA;    	lowp vec3 light = vec3(dot(normal, lightDir));&#xD;&#xA;    &#xD;&#xA;    	lowp vec3 diffuse = texture2D(diffuse, vUVoutAndViewZ.xy).rgb;&#xD;&#xA;    	&#xD;&#xA;    	lowp vec3 finalColor = diffuse * light;&#xD;&#xA;    &#xD;&#xA;        // Fog&#xD;&#xA;    	finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);&#xD;&#xA;    &#xD;&#xA;    	gl_FragColor = vec4(finalColor.xyz, 1.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I added the lowp/mediump declarations later (which added about 2fps), it works just as bad without them.&#xD;&#xA;&#xD;&#xA;I refuse to believe that the PowerVR chipset is so weak that it can't handle a simple shader like this. There must be something stupid in this shader (like something implicitly swizzling a lowp register) that just completely messes up the unit." />
  <row Id="24312" PostHistoryTypeId="1" PostId="11377" RevisionGUID="073ab750-b4b8-4627-b107-566efb82ae39" CreationDate="2011-04-20T05:16:26.623" UserId="5876" Text="Adding a simple mix() destroys the framerate" />
  <row Id="24313" PostHistoryTypeId="3" PostId="11377" RevisionGUID="073ab750-b4b8-4627-b107-566efb82ae39" CreationDate="2011-04-20T05:16:26.623" UserId="5876" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;shaders&gt;&lt;performance&gt;" />
  <row Id="24314" PostHistoryTypeId="2" PostId="11378" RevisionGUID="90fcc7ff-c63f-46c4-91fe-b24d1b19733e" CreationDate="2011-04-20T05:46:45.570" UserId="721" Text="The PowerVR 530/535 is very slow. Andreno 200 and PowerVR 530/535 are first GPU generation (OpenGL ES 2.x) for hdpi resolution. You can't redraw a full screen at 60FPS with a simple texture.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24315" PostHistoryTypeId="5" PostId="11378" RevisionGUID="474f65d3-ef48-458a-9525-495da92629b9" CreationDate="2011-04-20T05:53:07.333" UserId="721" Comment="added 215 characters in body; added 154 characters in body; added 1 characters in body" Text="The PowerVR 530/535 is very slow. Andreno 200 and PowerVR 530/535 are first GPU generation (OpenGL ES 2.x) for hdpi resolution. You can't redraw a full screen at 60FPS with a simple texture.&#xD;&#xA;&#xD;&#xA;I wrote GPUBench to test shaders performance and it is very bad on these GPU. The second generation (Andreno 205, Powervr 540) is far better.&#xD;&#xA;&#xD;&#xA;Today, i try to minimize Fragment shader with one or two operations. You can try to [optimize][1] your shader because GLSL compilers are bad (on mobile platform):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aras-p.info/blog/2010/09/29/glsl-optimizer/" />
  <row Id="24316" PostHistoryTypeId="5" PostId="11378" RevisionGUID="d5a9bc51-44ca-4e76-bc4b-41a76ebe8804" CreationDate="2011-04-20T06:08:39.437" UserId="721" Comment="added 243 characters in body; added 40 characters in body" Text="The PowerVR 530/535 is very slow. Andreno 200 and PowerVR 530/535 are first GPU generation (OpenGL ES 2.x) for hdpi resolution. You can't redraw a full screen at 60FPS with a simple texture.&#xD;&#xA;&#xD;&#xA;I wrote GPUBench to test shaders performance and it is very bad on these GPU. The second generation (Andreno 205, Powervr 540) is far better.&#xD;&#xA;&#xD;&#xA;Today, i try to minimize Fragment shader with one or two operations. You can try to [optimize][1] your shader because GLSL compilers are bad (on mobile platform).&#xD;&#xA;&#xD;&#xA;My toughts:&#xD;&#xA;&#xD;&#xA; * The Droid GPU is slower than Andreno 200 because of fillrate&#xD;&#xA; * 30 FPS for Andreno 200 is good&#xD;&#xA; * 20 FPS for Droid is good&#xD;&#xA; * You can render your scene in a smaller FBO and draw it on a screen (but FBO switch is costly)&#xD;&#xA; * Fragment shaders must be very short.&#xD;&#xA;&#xD;&#xA;  [1]: http://aras-p.info/blog/2010/09/29/glsl-optimizer/" />
  <row Id="24317" PostHistoryTypeId="25" PostId="11377" RevisionGUID="c9ce7b82-4572-4781-bedc-e028f9b4d95f" CreationDate="2011-04-20T06:09:29.843" Comment="http://twitter.com/#!/StackGameDev/status/60585861896609792" />
  <row Id="24318" PostHistoryTypeId="2" PostId="11379" RevisionGUID="5ab04d9c-f065-4cdf-9576-68a180ad7f4e" CreationDate="2011-04-20T06:39:57.193" UserId="4213" Text="A good online resources to understand camera properties , such as fov, aspect and more." />
  <row Id="24319" PostHistoryTypeId="1" PostId="11379" RevisionGUID="5ab04d9c-f065-4cdf-9576-68a180ad7f4e" CreationDate="2011-04-20T06:39:57.193" UserId="4213" Text="A good online resources to understand camera ," />
  <row Id="24320" PostHistoryTypeId="3" PostId="11379" RevisionGUID="5ab04d9c-f065-4cdf-9576-68a180ad7f4e" CreationDate="2011-04-20T06:39:57.193" UserId="4213" Text="&lt;camera&gt;" />
  <row Id="24321" PostHistoryTypeId="5" PostId="11378" RevisionGUID="4deffbfa-b67f-4f0b-bfc2-f183fbef0058" CreationDate="2011-04-20T07:31:13.713" UserId="721" Comment="added 194 characters in body; added 53 characters in body" Text="The PowerVR 530/535 is very slow. Andreno 200 and PowerVR 530/535 are first GPU generation (OpenGL ES 2.x) for hdpi resolution. You can't redraw a full screen at 60FPS with a simple texture.&#xD;&#xA;&#xD;&#xA;I wrote GPUBench to test shaders performance and it is very bad on these GPU. The second generation (Andreno 205, Powervr 540) is far better.&#xD;&#xA;&#xD;&#xA;Today, i try to minimize Fragment shader with one or two operations. You can try to [optimize][1] your shader because GLSL compilers are bad (on mobile platform).&#xD;&#xA;&#xD;&#xA;Note: for powervr gpu, read this [document][2]. PVRUniSCo Editor can compute cycles used in shaders.&#xD;&#xA;&#xD;&#xA;My toughts:&#xD;&#xA;&#xD;&#xA; * The Droid GPU is slower than Andreno 200 because of fillrate&#xD;&#xA; * 30 FPS for Andreno 200 is good&#xD;&#xA; * 20 FPS for Droid is good&#xD;&#xA; * You can render your scene in a smaller FBO and draw it on a screen (but FBO switch is costly)&#xD;&#xA; * Fragment shaders must be very short.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aras-p.info/blog/2010/09/29/glsl-optimizer/&#xD;&#xA;  [2]: http://www.imgtec.net/factsheets/SDK/POWERVR%20SGX.OpenGL%20ES%202.0%20Application%20Development%20Recommendations.1.1f.External.pdf" />
  <row Id="24322" PostHistoryTypeId="2" PostId="11380" RevisionGUID="caff2594-ab64-4273-95a1-1038e9e6b64f" CreationDate="2011-04-20T07:33:16.113" UserId="20" Text="Your best bet is probably to mod an existing game. Some people are even modding [Starcraft 2 to an MMO][1], but that looks like a lot more work than modding a game that already has some RPG features. &#xD;&#xA;&#xD;&#xA;There's an active [modding community][2] for Diablo 2, so this might be a starting point?&#xD;&#xA;&#xD;&#xA;I'm making this answer CW, because I'm not a modding expert and somebody might add some better suggestions for easy moddable RPGs or MMOs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=roIOpHq0vUc&#xD;&#xA;  [2]: http://phrozenkeep.hugelaser.com/" />
  <row Id="24323" PostHistoryTypeId="5" PostId="11379" RevisionGUID="1443df39-f417-4c7a-b5c9-a5d74132ccca" CreationDate="2011-04-20T07:40:28.417" UserId="20" Comment="changed title and turned &quot;question&quot; into an actual question" Text="What are some good online resources to understand game camera properties, such as fov, aspect-ratio and more?" />
  <row Id="24324" PostHistoryTypeId="4" PostId="11379" RevisionGUID="1443df39-f417-4c7a-b5c9-a5d74132ccca" CreationDate="2011-04-20T07:40:28.417" UserId="20" Comment="changed title and turned &quot;question&quot; into an actual question" Text="Looking for online resources to understand game camera properties" />
  <row Id="24325" PostHistoryTypeId="2" PostId="11381" RevisionGUID="bc8a0d49-ccb1-4c32-a8a9-9b6203b97e51" CreationDate="2011-04-20T07:53:29.427" UserId="4508" Text="it's not too complete and exaustive but mayebe this could help: http://aoeu.snth.net/?p=43" />
  <row Id="24326" PostHistoryTypeId="5" PostId="11381" RevisionGUID="f8e00cd8-6ac1-4cb0-95c2-e86dc4fc0f1e" CreationDate="2011-04-20T08:18:35.047" UserId="3794" Comment="deleted 1 characters in body" Text="it's not too complete and exaustive but maybe this could help: http://aoeu.snth.net/?p=43" />
  <row Id="24327" PostHistoryTypeId="2" PostId="11382" RevisionGUID="730660d0-da34-4fd4-9641-c574158e1114" CreationDate="2011-04-20T08:21:28.820" UserId="6210" Text="I know you said you don't want a full-fledged MMORPG, but I can't think of something that will fit your bill without being big... &#xD;&#xA;&#xD;&#xA;Here is a modern MMORPG, open sourced, including assets: [Ryzom][1]. It should provide a good starting point for any open world multiplayer game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ryzom.org/" />
  <row Id="24328" PostHistoryTypeId="5" PostId="11378" RevisionGUID="d9b428cc-995a-41b1-9939-fc396775fd3b" CreationDate="2011-04-20T08:22:52.477" UserId="721" Comment="added 36 characters in body; added 77 characters in body; added 10 characters in body" Text="**Response from EboMike computed with PVRUniSCo Editor: mix() brings the shader from 4 cycles to 12 cycles** (PowerVR).&#xD;&#xA;&#xD;&#xA;The PowerVR 530/535 is very slow. Andreno 200 and PowerVR 530/535 are first GPU generation (OpenGL ES 2.x) for hdpi resolution. You can't redraw a full screen at 60FPS with a simple texture.&#xD;&#xA;&#xD;&#xA;I wrote GPUBench to test shaders performance and it is very bad on these GPU. The second generation (Andreno 205, Powervr 540) is far better.&#xD;&#xA;&#xD;&#xA;Today, i try to minimize Fragment shader with one or two operations. You can try to [optimize][1] your shader because GLSL compilers are bad (on mobile platform).&#xD;&#xA;&#xD;&#xA;Note: for powervr gpu, read this [document][2]. PVRUniSCo Editor can compute cycles used in shaders.&#xD;&#xA;&#xD;&#xA;My toughts:&#xD;&#xA;&#xD;&#xA; * The Droid GPU is slower than Andreno 200 because of fillrate&#xD;&#xA; * 30 FPS for Andreno 200 is good&#xD;&#xA; * 20 FPS for Droid is good&#xD;&#xA; * You can render your scene in a smaller FBO and draw it on a screen (but FBO switch is costly)&#xD;&#xA; * Fragment shaders must be very short.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aras-p.info/blog/2010/09/29/glsl-optimizer/&#xD;&#xA;  [2]: http://www.imgtec.net/factsheets/SDK/POWERVR%20SGX.OpenGL%20ES%202.0%20Application%20Development%20Recommendations.1.1f.External.pdf" />
  <row Id="24329" PostHistoryTypeId="2" PostId="11383" RevisionGUID="3cedf710-8fdf-44b8-bee9-d26380c8ad29" CreationDate="2011-04-20T08:25:41.343" UserId="6210" Text="Maybe you should look at [XNAnimation][1], it extends on the original samples to provide a more comprehensive set of animation possibilities.&#xD;&#xA;&#xD;&#xA;Beware though, it was discontinued at some point, although it's now looking active again. Somebody took it up to port it to the SunBurn rendering engine: [sgMotion][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnanimation.codeplex.com/&#xD;&#xA;  [2]: http://sgmotion.codeplex.com/" />
  <row Id="24330" PostHistoryTypeId="5" PostId="11377" RevisionGUID="2ded86f4-c59d-4e42-ab29-fb3f58009b30" CreationDate="2011-04-20T08:28:11.333" UserId="5876" Comment="Added answer" Text="I have a very simple shader and added linear fog via mix like this:&#xD;&#xA;&#xD;&#xA;	finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);&#xD;&#xA;&#xD;&#xA;Note that the view Z distance is in the variable that also contains the UV coordinates, so the fog didn't even add a new interpolator.&#xD;&#xA;&#xD;&#xA;Still, this one innocuous line brought the framerate on the OG Droid with the Power SGX chipset from 33fps to 22fps. Even the HTC Evo with the Adreno 200 GPU stays under 30fps. (The Adreno 205 is at a constant 60fps, but that thing is a beast).&#xD;&#xA;&#xD;&#xA;The fragment shader itself is primitive (all values are hard-coded since it's a test shader):&#xD;&#xA;&#xD;&#xA;    precision mediump float;&#xD;&#xA;    varying mediump vec3 vUVoutAndViewZ;&#xD;&#xA;    varying lowp vec3 vNormalOut;&#xD;&#xA;    &#xD;&#xA;    uniform lowp sampler2D diffuse;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    void main() {&#xD;&#xA;    	lowp vec3 normal = vNormalOut;&#xD;&#xA;    &#xD;&#xA;    	// Lighting&#xD;&#xA;    	lowp vec3 lightDir = vec3(0.5, 0.3, 0.5);&#xD;&#xA;    	lowp vec3 light = vec3(dot(normal, lightDir));&#xD;&#xA;    &#xD;&#xA;    	lowp vec3 diffuse = texture2D(diffuse, vUVoutAndViewZ.xy).rgb;&#xD;&#xA;    	&#xD;&#xA;    	lowp vec3 finalColor = diffuse * light;&#xD;&#xA;    &#xD;&#xA;        // Fog&#xD;&#xA;    	finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);&#xD;&#xA;    &#xD;&#xA;    	gl_FragColor = vec4(finalColor.xyz, 1.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I added the lowp/mediump declarations later (which added about 2fps), it works just as bad without them.&#xD;&#xA;&#xD;&#xA;I refuse to believe that the PowerVR chipset is so weak that it can't handle a simple shader like this. There must be something stupid in this shader (like something implicitly swizzling a lowp register) that just completely messes up the unit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**ANSWER and EDIT:**&#xD;&#xA;&#xD;&#xA;Ellis has some fantastic information in the answer and the subsequent comments. In this particular case, it seems that mix() is flat-out broken. It brought the shader to 12 cycles (from 4) and 4 GPRs (from 2). I got back to 29fps by using this code instead:&#xD;&#xA;&#xD;&#xA;	lowp vec3 fogDiff = vec3(0.5, 0.8, 0.95) - finalColor;&#xD;&#xA;	fogDiff *= vUVoutAndViewZ.z;&#xD;&#xA;	finalColor += fogDiff;&#xD;&#xA;" />
  <row Id="24331" PostHistoryTypeId="2" PostId="11384" RevisionGUID="3ae7d406-0dee-48f6-854d-51318f66922e" CreationDate="2011-04-20T08:36:59.560" UserId="6850" Text="I'm now planning a casual car racing game that want to model some real cities sight into it. I doubt if there is copyright of the landscape or city planning of those real cities in the world. Can I model such as existing city or I can't?&#xD;&#xA;&#xD;&#xA;Thanks a lot." />
  <row Id="24332" PostHistoryTypeId="1" PostId="11384" RevisionGUID="3ae7d406-0dee-48f6-854d-51318f66922e" CreationDate="2011-04-20T08:36:59.560" UserId="6850" Text="Does it require any license to use a real city landscape in a car racing game?" />
  <row Id="24333" PostHistoryTypeId="3" PostId="11384" RevisionGUID="3ae7d406-0dee-48f6-854d-51318f66922e" CreationDate="2011-04-20T08:36:59.560" UserId="6850" Text="&lt;copyright&gt;&lt;racing&gt;" />
  <row Id="24334" PostHistoryTypeId="2" PostId="11385" RevisionGUID="9e299694-830f-4fde-9fa0-dbb2d230895f" CreationDate="2011-04-20T08:44:14.613" UserId="4129" Text="You can use [OpenStreetMap.org][1] - their [license is clear and suitable][2]:&#xD;&#xA;&#xD;&#xA;&gt; You are free to copy, distribute, transmit and adapt our maps and data, as long as you credit OpenStreetMap and its contributors.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.openstreetmap.org/&#xD;&#xA;  [2]: http://www.openstreetmap.org/copyright" />
  <row Id="24335" PostHistoryTypeId="5" PostId="11385" RevisionGUID="b8667243-8ebf-4642-a3dc-d94453631437" CreationDate="2011-04-20T08:49:19.540" UserId="4129" Comment="added 170 characters in body" Text="You can use [OpenStreetMap.org][1] - their [license is clear and suitable][2]:&#xD;&#xA;&#xD;&#xA;&gt; You are free to copy, distribute, transmit and adapt our maps and data, as long as you credit OpenStreetMap and its contributors.&#xD;&#xA;&#xD;&#xA;[osm2xp][3] is for example using this data for the X-Plane game:&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.openstreetmap.org/&#xD;&#xA;  [2]: http://www.openstreetmap.org/copyright&#xD;&#xA;  [3]: http://osm2xp.com/&#xD;&#xA;  [4]: http://i.stack.imgur.com/O77z7.jpg" />
  <row Id="24336" PostHistoryTypeId="25" PostId="11384" RevisionGUID="a578da9b-9b82-43c7-96e5-7e293ac69105" CreationDate="2011-04-20T09:09:29.860" Comment="http://twitter.com/#!/StackGameDev/status/60631160929267712" />
  <row Id="24337" PostHistoryTypeId="2" PostId="11386" RevisionGUID="68404feb-1aef-415d-83e4-0d2fd05f84f2" CreationDate="2011-04-20T09:39:49.747" UserId="3599" Text="In Max, you can actually asign a mesh a single bone, that has rigidly asigned or linked a mesh or vertices, and animate bone's traslations/rotations (or use dummies). Using auto keyframe or not. The mesh will follow it, as is linked. I guess later on importing the skinned mesh into XNA will treat it like always, it would see no difference, but you actually handled them as if were moving just static meshes, in Max. If there can be two skinned meshes at a time in xna, then you should be able to do this, and with more than two." />
  <row Id="24338" PostHistoryTypeId="2" PostId="11387" RevisionGUID="16395c95-6bfc-426f-8734-1ccbb3d7841c" CreationDate="2011-04-20T09:47:25.793" UserId="6427" Text="I work for a small game studio that develops games for iOS and Android currently. The engine we are building will be portable and our upcoming game is quite ambitious. Therefore we are considering porting it to PSP also, making it available at the PSN as a mini. I have been searching for days now but I am having trouble finding any numbers of what an average PSN mini game can sell. What a hit or a bad game could sell is also really interesting. &#xD;&#xA;As we are trying to calculate if it is worth going into this market any clue would be helpful!" />
  <row Id="24339" PostHistoryTypeId="1" PostId="11387" RevisionGUID="16395c95-6bfc-426f-8734-1ccbb3d7841c" CreationDate="2011-04-20T09:47:25.793" UserId="6427" Text="Anyone know of th sales numbers on PSN, minis specificly?" />
  <row Id="24340" PostHistoryTypeId="3" PostId="11387" RevisionGUID="16395c95-6bfc-426f-8734-1ccbb3d7841c" CreationDate="2011-04-20T09:47:25.793" UserId="6427" Text="&lt;sales&gt;" />
  <row Id="24341" PostHistoryTypeId="2" PostId="11388" RevisionGUID="52df8730-9ace-4014-bef2-3e16ce0b3bd2" CreationDate="2011-04-20T10:06:09.777" UserId="6469" Text="Does anyone know if in a pokemon game does the wild pokemon have the same stats when you catch it as it did in that battle?&#xD;&#xA;&#xD;&#xA;and to make this a more programming question ... In that type of game should the &quot;wild&quot; enemies have the same limits imposed on them as if they were player controlled or should the enemies be stronger that if you caught them. &#xD;&#xA;&#xD;&#xA;This question assumes that the creature is the same level in both cases." />
  <row Id="24342" PostHistoryTypeId="1" PostId="11388" RevisionGUID="52df8730-9ace-4014-bef2-3e16ce0b3bd2" CreationDate="2011-04-20T10:06:09.777" UserId="6469" Text="AI controlled monster vs player controlled monster stats" />
  <row Id="24343" PostHistoryTypeId="3" PostId="11388" RevisionGUID="52df8730-9ace-4014-bef2-3e16ce0b3bd2" CreationDate="2011-04-20T10:06:09.777" UserId="6469" Text="&lt;balance&gt;&lt;stats&gt;" />
  <row Id="24344" PostHistoryTypeId="2" PostId="11389" RevisionGUID="26107d5c-2dc4-4563-9eab-ce7e5ae52543" CreationDate="2011-04-20T10:19:13.460" UserId="4410" Text="If you're seriously considering this I'd speak to Sony directly. Sales numbers are usually considered commercially sensitive, not only between competing game developers/publishers but between different platform holders. As a developer Sony would probably be prepared to provide you with generalisations on some of the numbers for what you could reasonably expect." />
  <row Id="24345" PostHistoryTypeId="5" PostId="11387" RevisionGUID="e06013c7-a809-45d0-bce4-fb6af2118657" CreationDate="2011-04-20T10:19:29.963" UserId="744" Comment="deleted 6 characters in body; edited tags; edited title" Text="I work for a small game studio that develops games for iOS and Android currently. The engine we are building will be portable and our upcoming game is quite ambitious. Therefore we are considering porting it to PSP also, making it available at the PSN as a mini. I have been searching for days now but I am having trouble finding any numbers of what an average PSN mini game can sell. What a hit or a bad game could sell is also really interesting. &#xD;&#xA;As we are trying to calculate if it is worth going into this market any clue would be helpful!" />
  <row Id="24346" PostHistoryTypeId="4" PostId="11387" RevisionGUID="e06013c7-a809-45d0-bce4-fb6af2118657" CreationDate="2011-04-20T10:19:29.963" UserId="744" Comment="deleted 6 characters in body; edited tags; edited title" Text="Where can I find sales figures for PSN Minis?" />
  <row Id="24347" PostHistoryTypeId="6" PostId="11387" RevisionGUID="e06013c7-a809-45d0-bce4-fb6af2118657" CreationDate="2011-04-20T10:19:29.963" UserId="744" Comment="deleted 6 characters in body; edited tags; edited title" Text="&lt;business&gt;&lt;sales&gt;&lt;playstation-network&gt;" />
  <row Id="24348" PostHistoryTypeId="2" PostId="11390" RevisionGUID="d2476ac1-782d-4007-9d8d-5582bea825a6" CreationDate="2011-04-20T11:04:32.237" UserId="4410" Text="It depends on the level of detail you go into and how you generate your data. From Will's post, deriving your layout from OSM does seem to be a way of doing this to an extent, however if you derive anything from any other source you'll need to carefully check their licences very carefully.&#xD;&#xA;&#xD;&#xA;There may be certain buildings or objects in real cities or locations that would require a specific licence to use (from past experience we've had to remove the odd distinct building that either didn't want to appear or had a ridiculously high licence fee), if you planned to try and actually use the real shops or corporate logo's of buildings you'd potentially have to obtain a licence for each one individually (this may vary depending on the country you're recreating).&#xD;&#xA;&#xD;&#xA;As an example, take the Hollywood sign, if you wanted to put that in a game you'd need to specifically obtain a licence for it [here][1].&#xD;&#xA;&#xD;&#xA;As with all things legal, if in doubt, ask a lawyer who has some experience in this area.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hollywoodsign.org/filmingatthesign.html" />
  <row Id="24349" PostHistoryTypeId="25" PostId="11387" RevisionGUID="8a41ed44-b19d-43a8-a687-2a34d62b9d8d" CreationDate="2011-04-20T12:09:29.810" Comment="http://twitter.com/#!/StackGameDev/status/60676459580227584" />
  <row Id="24350" PostHistoryTypeId="2" PostId="11391" RevisionGUID="b6b6f4b3-29fb-4ccc-9d35-46b38b46d660" CreationDate="2011-04-20T12:31:27.743" UserId="6188" Text="I need some advice on how to design the Entity module in my game, how to apply the MVC pattern and generally how the Entity should interact with its controller and its representation.&#xD;&#xA;&#xD;&#xA;First some details about the game: it's a 2D action-platformer, it's data-driven (or rather, I'd like it to be data-driven &amp;mdash; it isn't yet) and the Entities should be scriptable (I'll be using Python).&#xD;&#xA;&#xD;&#xA;I'm still at the very beginning of the development and I have some general ideas about how the Entity module should work, but I get stuck on the details. Here's roughly what I have up until now:&#xD;&#xA;&#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;      private:&#xD;&#xA;        // The representation holds the actual animation and sounds that&#xD;&#xA;        // are used to render the entity. The representation can read the&#xD;&#xA;        // Entity's state but it cannot alter it.&#xD;&#xA;        EntityRepresentation* representation_;&#xD;&#xA;    &#xD;&#xA;        // The controller handles events and changes the Entity's state&#xD;&#xA;        // based on these events.&#xD;&#xA;        EntityController* controller_;&#xD;&#xA;    &#xD;&#xA;        // Here's some of Entity's attributes&#xD;&#xA;        struct Vector{ float x, y; } position_;&#xD;&#xA;        float directionRadians_;&#xD;&#xA;        float speed_;&#xD;&#xA;    &#xD;&#xA;      public:&#xD;&#xA;        void handleEvent(const Event&amp; e) {&#xD;&#xA;            controller_-&gt;handleEvent(e, this); // It's obvious what it does :)&#xD;&#xA;    &#xD;&#xA;            // The representation needs to handle events so it can change the&#xD;&#xA;            // current animation, queue up a sound for playing, etc. In my&#xD;&#xA;            // current setup it doesn't yet need to take 'this' as a parameter.&#xD;&#xA;            representation_-&gt;handleEvent(e);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void update(unsigned long timePassed) {&#xD;&#xA;            position_.x += speed_ * timePassed * std::cos(directionRadians_);&#xD;&#xA;            position_.y += speed_ * timePassed * std::sin(directionRadians_);&#xD;&#xA;            // .. And any other updates I might need to do... &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void render(DrawingContext* context, unsigned long timePassed) {&#xD;&#xA;            representation_-&gt;render(context, timePassed, position_.x, position_.y);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;There are a few things I think could be problematic in this setup. For one, if you look at the `Entity::handleEvent()` function you will see that the Entity forwards the event to the controller _as well as to the representation_. The controller uses the event to alter the state of the Entity; the representation however uses it to alter its own state (to use some other animation, to decide whether it should play a sound, etc.).&#xD;&#xA;&#xD;&#xA;This means the representation has a state of its own which is characteristic to this Entity only. Do you think it's bad that each representation can only be used for one Entity? (Note: this does not mean that in case there are two entities using the same sprite, that sprite is loaded twice in memory: the sprite itself is a common resource.)&#xD;&#xA;&#xD;&#xA;Another thing I'm having problems with the deciding how to organize the actual entity data on disk. Where should the bounding box info be read from: the animation or somewhere separate? should there be a single animation file for each character? should scripts be separate from the data or should everything related to one type of entity be stored in a single folder (scripts and animation and sounds)?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;**tl;dr** Can you give some some general advice on how the Entity should interact with its controller and its representation (i.e. sprites and sounds). Also, do you have any advice on how the data itself should be organized on the hard-drive?" />
  <row Id="24351" PostHistoryTypeId="1" PostId="11391" RevisionGUID="b6b6f4b3-29fb-4ccc-9d35-46b38b46d660" CreationDate="2011-04-20T12:31:27.743" UserId="6188" Text="Design suggestions for my Entity module" />
  <row Id="24352" PostHistoryTypeId="3" PostId="11391" RevisionGUID="b6b6f4b3-29fb-4ccc-9d35-46b38b46d660" CreationDate="2011-04-20T12:31:27.743" UserId="6188" Text="&lt;entity-system&gt;" />
  <row Id="24353" PostHistoryTypeId="2" PostId="11392" RevisionGUID="649118b1-f632-4764-a183-b44bbafb753e" CreationDate="2011-04-20T12:46:12.487" UserId="5020" Text="If it's segfaulting there's a bug in the library. Open a bug report and send them a reproducible test case." />
  <row Id="24354" PostHistoryTypeId="2" PostId="11393" RevisionGUID="e47a7228-e4f5-44cb-9756-6f696ea2d84b" CreationDate="2011-04-20T12:54:52.433" UserId="5705" Text="I've been trying to develop a multiplayer turn based game which is mostly free to play - I just want to see if the game idea is appreciated - hence I want to do it with minimal cost and I'm confused which one of these to use: red5, zendamf, BlazeDS or Cirrus.&#xD;&#xA;&#xD;&#xA;Red5 seemed the best option for me initially but getting a media server to host seems to be quite expensive. Same reason why I couldn't use Electroserver - cost. Both are very attractive options though.&#xD;&#xA;&#xD;&#xA;ZendAMF then looked a feasible option since it supported remoting. But how do I let the other players get updates on actions of one player through zendAMF, which as far as I know does not do data push. I'll have to do it by polling - asking server constantly for updates - which wont look very real time.&#xD;&#xA;&#xD;&#xA;Then I heard about BlazeDS which does support data push. Now I have to learn java if I want to use that and get a new web host because my existing host does not have tomcat.&#xD;&#xA;&#xD;&#xA;Then I heard about cirrus which is still in 'codename cirrus' stage. It looks like a very feasible option since its peer to peer with miniamal server support needed. Is it good for a mutiplayer game? &#xD;&#xA;&#xD;&#xA;Well if anyone has experience developing multiplayer flash games I'd like to know if a turn based multiplayer game with more than two players participating can be implemented using zendamf. ZendAMF because I know PHP and AS3." />
  <row Id="24355" PostHistoryTypeId="1" PostId="11393" RevisionGUID="e47a7228-e4f5-44cb-9756-6f696ea2d84b" CreationDate="2011-04-20T12:54:52.433" UserId="5705" Text="Red5 or zendZMF or BlazeDS or Cirrus?" />
  <row Id="24356" PostHistoryTypeId="3" PostId="11393" RevisionGUID="e47a7228-e4f5-44cb-9756-6f696ea2d84b" CreationDate="2011-04-20T12:54:52.433" UserId="5705" Text="&lt;flash&gt;&lt;multiplayer&gt;&lt;server&gt;&lt;hosting&gt;" />
  <row Id="24357" PostHistoryTypeId="2" PostId="11394" RevisionGUID="7da09f91-1c33-4b59-b855-819c05118fa0" CreationDate="2011-04-20T13:25:25.017" UserId="-1" Text="" />
  <row Id="24358" PostHistoryTypeId="2" PostId="11395" RevisionGUID="33e30a78-f688-454b-8534-f80a5b6e4c4c" CreationDate="2011-04-20T13:25:25.017" UserId="-1" Text="" />
  <row Id="24359" PostHistoryTypeId="2" PostId="11396" RevisionGUID="07b3fe44-66d8-4eb5-885e-a6991cd04f53" CreationDate="2011-04-20T13:30:45.697" UserId="3115" Text="Depending on what sort of game you are trying to make, you will need some place to put the actual game.&#xD;&#xA;&#xD;&#xA;A Facebook App points to external websites for the canvas part of the application. This is your own webserver/webhotel and what ever language your webserver uses ought to provide you with some database connectivity. &#xD;&#xA;&#xD;&#xA;So if you eg. use PHP on the server, MySQL might be the datasstorage.&#xD;&#xA;If you have a IIS/ASP/ASP.net server available, SQL-Express could be your answer. But with most server-side languages you can also remotely connect through IP to another database server somewhere else.&#xD;&#xA;&#xD;&#xA;You can also use API's to connect to webservices that allows you to put/get data from their storage. Some are SQL, some are Table and some are XML based, but if you have basic CRUDL functionality at them, you dont have to care about how they do it. &#xD;&#xA;&#xD;&#xA;Amazon AWS has something called SimpleDB which is a XML kinda storage. It has a great API too, but again, it all depends on your needs, economics and technical skills for implementing this.&#xD;&#xA;&#xD;&#xA;If you use Flash for a client, then you have the issue of how to communicate with a server to get the data in and out from the client. For this you also need the server-side &quot;something&quot; that can serve your data as needed and receive &quot;POST&quot; data from the Flash-client.&#xD;&#xA;&#xD;&#xA;So once you have a server, you know where you can put your data.&#xD;&#xA;&#xD;&#xA;To my knowledge, Facebook does currently NOT support native data-storage, but perhaps others can elaborate on this subject." />
  <row Id="24360" PostHistoryTypeId="2" PostId="11397" RevisionGUID="e88a47ba-4ba1-4998-974e-a6af73d89e47" CreationDate="2011-04-20T14:16:17.230" UserId="3505" Text="For balancing there is only one true answer, experiment. I don't know exactly what the different Pokemon games do, it may be different from game to game, but it seems very likely that there is a difference, as it would otherwise be quite limited what tools one have for fine tuning the difficulty." />
  <row Id="24361" PostHistoryTypeId="6" PostId="11388" RevisionGUID="8e2257f1-8f5b-4c6f-a119-129053372f92" CreationDate="2011-04-20T14:45:08.553" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;balance&gt;&lt;stats&gt;" />
  <row Id="24362" PostHistoryTypeId="25" PostId="11393" RevisionGUID="fe62a3e6-d02c-4883-b862-04765d7b2746" CreationDate="2011-04-20T15:09:29.937" Comment="http://twitter.com/#!/StackGameDev/status/60721757543333888" />
  <row Id="24363" PostHistoryTypeId="2" PostId="11398" RevisionGUID="b5632cea-b784-445a-bf36-fe0f73741a8a" CreationDate="2011-04-20T15:11:18.143" UserId="6856" Text="I understand that the following math topics are required for 3D graphics programming. I have started doing some of them in my math course. Can someone point me in the direction of a resource that explains **how** they apply? What graphics/game problems are they used to solve?&#xD;&#xA;&#xD;&#xA; * vector math&#xD;&#xA; * matrix math&#xD;&#xA; * quaternions&#xD;&#xA; * linear algebra&#xD;&#xA;&#xD;&#xA;As far as I can see these are all linear algebra/matrix topics. Are there any other topics required?" />
  <row Id="24364" PostHistoryTypeId="1" PostId="11398" RevisionGUID="b5632cea-b784-445a-bf36-fe0f73741a8a" CreationDate="2011-04-20T15:11:18.143" UserId="6856" Text="Math topics for 3D graphics programming" />
  <row Id="24365" PostHistoryTypeId="3" PostId="11398" RevisionGUID="b5632cea-b784-445a-bf36-fe0f73741a8a" CreationDate="2011-04-20T15:11:18.143" UserId="6856" Text="&lt;3d&gt;&lt;math&gt;&lt;matrix&gt;&lt;linear-algebra&gt;&lt;quaternion&gt;" />
  <row Id="24366" PostHistoryTypeId="5" PostId="11394" RevisionGUID="8dce9823-d859-4c07-87da-0dc17f6d8c32" CreationDate="2011-04-20T15:18:24.753" UserId="3588" Comment="added 643 characters in body" Text="One of the primary spatial properties of an object, the position is where the object can be physically found. &#xD;&#xA;&#xD;&#xA;Position can be measured in a variety of ways. It could be measured in the sense of the pixel position on the screen. Alternatively, it could be measured as the tile position within a game map, or even by section within an environment. Questions under the purview of this tag deal with the determination and manipulation of the position of an entity - either absolute within the game space, or relative to other entities within the world.&#xD;&#xA;&#xD;&#xA;See also [tag:orientation], which is the position of an object within rotational space." />
  <row Id="24367" PostHistoryTypeId="24" PostId="11394" RevisionGUID="8dce9823-d859-4c07-87da-0dc17f6d8c32" CreationDate="2011-04-20T15:18:24.753" Comment="Proposed by 3588 approved by 14 edit id of 352" />
  <row Id="24368" PostHistoryTypeId="5" PostId="11395" RevisionGUID="c684fede-4782-4d11-bb38-c91f38b4b743" CreationDate="2011-04-20T15:18:30.557" UserId="3588" Comment="added 108 characters in body" Text="The physical location of an entity inside the game space, be it visible or invisible, absolute or relative. " />
  <row Id="24369" PostHistoryTypeId="24" PostId="11395" RevisionGUID="c684fede-4782-4d11-bb38-c91f38b4b743" CreationDate="2011-04-20T15:18:30.557" Comment="Proposed by 3588 approved by 14 edit id of 353" />
  <row Id="24370" PostHistoryTypeId="2" PostId="11399" RevisionGUID="c01e61ea-6097-45c0-a191-ab056b0161e1" CreationDate="2011-04-20T15:23:08.290" UserId="3656" Text="(My tl;dr -&gt; Just make a friggin' game!)&#xD;&#xA;&#xD;&#xA;For the MVC part of your question, have you read through [this question][1]?&#xD;&#xA;&#xD;&#xA;I think keeping a 1-to-1 relationship between Entity and EntityRepresentation is the right choice. The things you'll want to share across multiple entities can be referred to in the Representation or Controller (like the Sprite loaded in memory as you discussed). This way, you are able to make per-instance changes to the Entity.&#xD;&#xA;&#xD;&#xA;Say you added the option in EntityRepresentation to apply special effects, like a colored glow. If you shared one EntityRepresentation instance among multiple Entity instances, you wouldn't be able to choose one specific Entity instance to add the glow effect to.&#xD;&#xA;&#xD;&#xA;Have you written your EntityRepresentation class? Something to think about is cases where you want image and sound vs image but no sound vs sound but no image.&#xD;&#xA;&#xD;&#xA;My train of thought regarding that is:&#xD;&#xA;* Okay, have different subclasses of EntityRepresentation to represent each.&#xD;&#xA;* Except that's wasteful performance-wise, just give EntityRepresentation two pointers to an Audio and Visual representation respectvely Easier/faster to check NULL than to have another virtual call and making your inheritance chain deeper.&#xD;&#xA;* But then that leads me to the conclusion, why even bother having EntityRepresentation? just have an AudioRepresentation and VisualRepresentation in the Entity class and do the null checking in Entity. It's just one additional handle_event call.&#xD;&#xA;&#xD;&#xA;As for file organization, I don't think it makes a significant difference so long as you keep it organized. I personally prefer to keep (for example) images and scripts in separate folders even if they are associated with the same type of entity. I do keep a similar subdirectory hierarchy in both the images and scripts folder though.&#xD;&#xA;&#xD;&#xA;ie:&#xD;&#xA;&#xD;&#xA;* `images/Enemies/Vogon/Vogon_idle.png` and `images/Enemies/Vogon/Vogon_walk.png`&#xD;&#xA;* `scripts/Enemies/Vogon_config.py` and `scripts/Enemies/Vogon_AI.py`&#xD;&#xA;&#xD;&#xA;There is a miniscule workflow benefit for having all `Vogon` related files in one folder in that you don't have to keep multiple file browser windows open. But this is a really trivial difference.&#xD;&#xA;&#xD;&#xA;A lot of this stuff is really trivial. Just keep making the game and go with your gut instinct on organization and the Entity class structure. I like your current layout of the Entity class. Work with it and then make some decisions. You'll be better informed about your style of programming and about the game you want to make after you actually start trying to make this game. Starting with separating the representation as you are now will give you enough wiggle room to change things up later down the line.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture" />
  <row Id="24371" PostHistoryTypeId="2" PostId="11400" RevisionGUID="da5af1be-d578-4bbf-81ad-0a6e873addf4" CreationDate="2011-04-20T15:33:24.327" UserId="6855" Text="If you are familiar with Cartesian coordinates, then the application of the above topics to computer graphics should be pretty clear.  There are tutorials such as [these for OpenGL](http://www.falloutsoftware.com/tutorials/gl/gl0.htm) that will help to clarify the application of math to solving basic display problems, e.g. how to make a wire-frame model appear to rotate. The Wikipedia article on [perspective drawing](http://en.wikipedia.org/wiki/Perspective_(graphical)) might help with a bit of historical background.&#xD;&#xA;&#xD;&#xA;Beyond that there are many display topics that benefit from mathematical formulation.  For example, 3D solids are usually represented by triangulations of their surface.  How do we show only that part of the surface that an observer &quot;should&quot; see (hidden surface/line algorithms)?  If an object is to be illuminated from a particular source/direction, how does this interact with perspective to give a convincing surface rendering?&#xD;&#xA;&#xD;&#xA;Beyond that there are all sorts of interesting modelling topics, such as animation of a mist or a flame.  But the transformation of coordinates, as your list of topics seems to center on, is a staple of all later advances." />
  <row Id="24372" PostHistoryTypeId="6" PostId="10382" RevisionGUID="dd97785b-3e7e-400f-8fcc-707f907e1a43" CreationDate="2011-04-20T15:36:08.010" UserId="3588" Comment="Added the projectile-physics tag... not much else to fix. ♪" Text="&lt;physics&gt;&lt;projectile-physics&gt;" />
  <row Id="24373" PostHistoryTypeId="24" PostId="10382" RevisionGUID="dd97785b-3e7e-400f-8fcc-707f907e1a43" CreationDate="2011-04-20T15:36:08.010" Comment="Proposed by 3588 approved by 189 edit id of 351" />
  <row Id="24374" PostHistoryTypeId="2" PostId="11401" RevisionGUID="63d1cd1c-33c5-4a79-9162-6f58adeb8096" CreationDate="2011-04-20T15:40:03.700" UserId="1430" Text="[Practical Linear Algebra][1] and [Fundamentals of Computer Graphics][2] are two very good books that will cover the topics you mention (and their use within computer graphics), if you're in to books and such.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/1568812345/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=1568810741&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=1DX3VJFH66ZZQBFH4VC8&#xD;&#xA;  [2]: http://www.amazon.com/Fundamentals-Computer-Graphics-Third-Shirley/dp/1568814690/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1303313964&amp;sr=1-1" />
  <row Id="24375" PostHistoryTypeId="5" PostId="11320" RevisionGUID="8207ad26-1e39-40ff-8361-9edd1ba76dda" CreationDate="2011-04-20T15:48:14.960" UserId="1430" Comment="deleted 6 characters in body" Text="I'm looking for any material on seamless MMO servers! I do have a few articles in the &quot;Massively Multiplayer Game Development&quot; books and &quot;Game Programming Gems 5.&quot; Has anyone experience on that topic or knows articles about that? &#xD;&#xA;&#xD;&#xA;I'm interested in &quot;high-level views&quot; as well as implementations. This might become the topic of my master thesis and I would like to find out how hard it is to write such a system, before I actually start the thesis. Right now I haven't decided which language to use, I'm thinking about Java or Scala. Erlang could be a choice, but I've never worked with that.&#xD;&#xA;Note: Basic requirement would be movement. Any other gamesystems are optional and give &quot;bonus credit.&quot;&#xD;&#xA;&#xD;&#xA;Now for what I mean with &quot;seamless server&quot;:&#xD;&#xA;I want so set up a server cluster where every node controls some part of the game world, with static boundaries. Players can now move from one end of the world to the other without switching an instance or hitting some &quot;teleporter&quot;. I think WoW does that. In my backend however the player transitions from one server to the next.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="24376" PostHistoryTypeId="2" PostId="11402" RevisionGUID="fedeca3a-e04b-41ad-8d45-0687f17cec5c" CreationDate="2011-04-20T15:51:11.937" UserId="-1" Text="" />
  <row Id="24377" PostHistoryTypeId="2" PostId="11403" RevisionGUID="e6164046-0c63-4f9e-b8c1-82108e6777ce" CreationDate="2011-04-20T15:51:11.937" UserId="-1" Text="" />
  <row Id="24378" PostHistoryTypeId="2" PostId="11404" RevisionGUID="b70de1d7-2172-4318-a974-62693c97dda2" CreationDate="2011-04-20T15:59:05.003" UserId="1430" Text="&gt; I'm interested in &quot;high-level views&quot;&#xD;&#xA;&gt; as well as implementations.&#xD;&#xA;&#xD;&#xA;Implementations are generally reasonably deeply involved and you probably won't see much talk of them here. The StackExchange software isn't well-suited to that kind of involved discussion, not to mention it would involve a significant investment of somebody's time.&#xD;&#xA;&#xD;&#xA;&gt; I would like to find out how hard it&#xD;&#xA;&gt; is to write such a system&#xD;&#xA;&#xD;&#xA;No more or less hard than any other system: it will depend on your requirements and the features you intend to drive. You can write trivial implementations trivially, but non-trivial stuff will of course be much harder. One of the bigger problems is that [you probably won't have enough real clients to tell if your system actually scales to the &quot;massive&quot; level][1] that WoW and other games operate on.&#xD;&#xA;&#xD;&#xA;MMOs are not magical. Most of their technology is nothing special when taken in isolation, it's simply that a number of smaller, simpler bits of technology are combined very intelligently to allow for larger scale, connected parallel simulations of some shared world state.&#xD;&#xA;&#xD;&#xA;&gt; I want so set up a server cluster&#xD;&#xA;&gt; where every node controls some part of&#xD;&#xA;&gt; the game world, with static&#xD;&#xA;&gt; boundaries. Players can now move from&#xD;&#xA;&gt; one end of the world to the other&#xD;&#xA;&gt; without switching an instance or&#xD;&#xA;&gt; hitting some &quot;teleporter&quot;.&#xD;&#xA;&#xD;&#xA;Essentially what you're talking about is simulation hand-off. This can be done quite simply and isn't necessarily an MMO-specific technology (peer-to-peer games tend to support all the same underlying mechanisms to implement host migration). The basic premise is to have each server understand the topology of the servers &quot;around&quot; it (specifically, a server for world node A must know about the servers for simulation-adjacent world nodes) as well as to define a buffer around which you consider a particular simulated entity &quot;close&quot; to an adjacent server.&#xD;&#xA;&#xD;&#xA;When an entity enters the &quot;close&quot; buffer, you start reporting it to the adjacent server as well. Once the entity crosses the actual threshold, you send a message to the adjacent server with the full state of the entity and a message indicating that the adjacent server should take over the entity. Obviously you want this to be as reliable as possible.&#xD;&#xA;&#xD;&#xA;  [1]: http://scientificninja.com/blog/m-is-for-massive" />
  <row Id="24379" PostHistoryTypeId="2" PostId="11405" RevisionGUID="f2b86c71-c57b-41e0-a48d-c5e2ef1e5775" CreationDate="2011-04-20T16:18:15.553" UserId="6857" Text="For a college project I need to draw an empty cube and then show the cube being filled.&#xD;&#xA;&#xD;&#xA;So far I have heard that JME and voxels is the way to go but I have no idea where to start. Can anyone point me towards a tutorial or any reading? &#xD;&#xA;&#xD;&#xA;My project is in Java but any pseudo-code is welcome.&#xD;&#xA;&#xD;&#xA;Thank you  " />
  <row Id="24380" PostHistoryTypeId="1" PostId="11405" RevisionGUID="f2b86c71-c57b-41e0-a48d-c5e2ef1e5775" CreationDate="2011-04-20T16:18:15.553" UserId="6857" Text="Filling in 3d Shapes" />
  <row Id="24381" PostHistoryTypeId="3" PostId="11405" RevisionGUID="f2b86c71-c57b-41e0-a48d-c5e2ef1e5775" CreationDate="2011-04-20T16:18:15.553" UserId="6857" Text="&lt;java&gt;" />
  <row Id="24382" PostHistoryTypeId="5" PostId="11403" RevisionGUID="bfe7d5b2-bc1f-43d0-a95f-2c479942843b" CreationDate="2011-04-20T16:28:10.270" UserId="3588" Comment="added 131 characters in body" Text="The motion physics of the objects sailing through the air, ranging from thrown baseballs to battleship cannonfire to falling rocks." />
  <row Id="24383" PostHistoryTypeId="24" PostId="11403" RevisionGUID="bfe7d5b2-bc1f-43d0-a95f-2c479942843b" CreationDate="2011-04-20T16:28:10.270" Comment="Proposed by 3588 approved by 51 edit id of 355" />
  <row Id="24384" PostHistoryTypeId="5" PostId="11402" RevisionGUID="c61ecbd5-c6b2-4134-92f5-87417b8033f1" CreationDate="2011-04-20T16:28:12.297" UserId="3588" Comment="added 1073 characters in body" Text="This tag is a subset of [tag:physics], and applies to the branch of classical mechanics known as **Projectile Motion**. It is not to be confused with [tag:bullet-physics], which is about the aptly named Bullet Physics engine.&#xD;&#xA;&#xD;&#xA;A projectile is defined as an object that is given an initial velocity, with projectile motion corresponding to the resulting trajectory of its movement. This trajectory is often affected by factors such as gravity and air resistance, though it is not uncommon to ignore the latter in both study and practice. Projectile motion problems deal with determining things such as position in flight, trajectory, accuracy, and range.&#xD;&#xA;&#xD;&#xA;Games of many genres deal with projectiles in motion, and game development often applies the physics of projectile motion in both artistic and mechanical endeavors. Most game development reference to projectile motion deals with arc trajectory. Use this tag when your question deals with normal physics of projectiles (as opposed to the more patterned bullet movements seen in many Shoot-Em-Up games, for example)." />
  <row Id="24385" PostHistoryTypeId="24" PostId="11402" RevisionGUID="c61ecbd5-c6b2-4134-92f5-87417b8033f1" CreationDate="2011-04-20T16:28:12.297" Comment="Proposed by 3588 approved by 51 edit id of 354" />
  <row Id="24386" PostHistoryTypeId="2" PostId="11406" RevisionGUID="c9c877ee-fc3a-4b4d-a65d-bf1f97e046ae" CreationDate="2011-04-20T16:32:54.297" UserId="1101" Text="The main complexity in managing such a system comes from just how seamless you need it to be. As Josh has said, solving the problem handing off an entity from one server to another is a key part of the package.&#xD;&#xA;&#xD;&#xA;This is not the only problem though - if entities across multiple servers need to interact as part of one operation you now have a synchronisation problem where each system needs data from the other side in order to proceed, but by the time that data arrives it may already be invalid. You can attempt to solve this by breaking the operation down into multiple messages with rollback capability if one side backs out, but as you've seen from Chapter 3.1 in &quot;Massively Multiplayer Game Development&quot;, this *significantly* complicates any game logic that you have to do this with. Scala and Erlang help you get the messaging system right - they do not help you with the decomposition of what used to be a 10 line function into the many different messages and states you now need to track.&#xD;&#xA;&#xD;&#xA;Obviously, this problem is not entirely new, and relational databases support this sort of problem by storing all the data centrally and letting multiple clients query and alter it as they need to, rolling back transactions where necessary. This gives you most of your correctness requirements but unfortunately imposes impractical performance problems as well as making game logic implementation awkward (since much of your logic is now written in database stored procedures). A different kind of database might provide a good solution here, especially if you're willing to trade away the reliability requirements that most RDBMSes provide. &#xD;&#xA;&#xD;&#xA;Most professional games get around this problem by not even attempting it, by keeping the shard size small enough to put all players on one server, by splitting the world into parts that don't really interact (see the WoW example in the comments above), or by distributing the game across servers based on function rather than geography (eg. all combat happens on one server, all chat on another) so that there are no 'seams' to contend with." />
  <row Id="24387" PostHistoryTypeId="2" PostId="11407" RevisionGUID="24379185-06fe-4c02-b1dc-af7dbf2e69eb" CreationDate="2011-04-20T17:41:41.020" UserId="6860" Text="There are tutorials about applying shaders to 3D models, but I would like to know how to use shaders on primitives. I have a world with a lot of vertices and I would like to apply a shader to it without adding any texture to it or loading any model. I'm working with XNA and HSLS. " />
  <row Id="24388" PostHistoryTypeId="1" PostId="11407" RevisionGUID="24379185-06fe-4c02-b1dc-af7dbf2e69eb" CreationDate="2011-04-20T17:41:41.020" UserId="6860" Text="How to apply shaders on primitives" />
  <row Id="24389" PostHistoryTypeId="3" PostId="11407" RevisionGUID="24379185-06fe-4c02-b1dc-af7dbf2e69eb" CreationDate="2011-04-20T17:41:41.020" UserId="6860" Text="&lt;xna&gt;" />
  <row Id="24390" PostHistoryTypeId="25" PostId="11405" RevisionGUID="fbaca3b4-5f8e-4116-b10c-6abe7eb17c66" CreationDate="2011-04-20T18:09:29.473" Comment="http://twitter.com/#!/StackGameDev/status/60767054785036288" />
  <row Id="24391" PostHistoryTypeId="6" PostId="1041" RevisionGUID="eb0e94f0-e6f3-4a86-830d-b30d0b9d20ae" CreationDate="2011-04-20T18:33:16.993" UserId="3588" Comment="It's specifically a comparison of physics engine libraries with respect to projectile motion. ♪" Text="&lt;libraries&gt;&lt;physics-engine&gt;&lt;projectile-physics&gt;" />
  <row Id="24392" PostHistoryTypeId="24" PostId="1041" RevisionGUID="eb0e94f0-e6f3-4a86-830d-b30d0b9d20ae" CreationDate="2011-04-20T18:33:16.993" Comment="Proposed by 3588 approved by 51 edit id of 356" />
  <row Id="24393" PostHistoryTypeId="5" PostId="11405" RevisionGUID="c2230bb8-bea3-4dbc-b660-795aaad20ed2" CreationDate="2011-04-20T18:43:03.923" UserId="962" Comment="deleted 15 characters in body" Text="For a college project I need to draw an empty cube and then show the cube being filled.&#xD;&#xA;&#xD;&#xA;So far I have heard that JME and voxels is the way to go but I have no idea where to start. Can anyone point me towards a tutorial or any reading? &#xD;&#xA;&#xD;&#xA;My project is in Java but any pseudo-code is welcome." />
  <row Id="24394" PostHistoryTypeId="2" PostId="11408" RevisionGUID="d8f6a77a-8467-45f6-b713-ccfb3f7445a5" CreationDate="2011-04-20T18:49:18.027" UserId="4496" Text="All of the primitive stuff I've seen so far for XNA was actually building the object out of verts during run time and passing them in as a Triangle list of Vertexes (or VertexNormals if you want to do lighting stuff)  You may wish to consider getting some basic shape models for traditional primitives.  &#xD;&#xA;&#xD;&#xA;That being said, the terrain in the current game I'm working on is all generated run-time with no models (though we do apply textures), and if you already have your verts set up and want to get them to draw into a shader, all you have to do is set up a VertexBuffer and an IndexBuffer, then set the Indicies and Vertices on your GraphicsDevice to each of them.  After that, you use the GraphicsDevice's DrawIndexedPrimitives to draw the data you've buffered.  Start an effect before you do so just like with a model and voila.&#xD;&#xA;&#xD;&#xA;[http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php][1] Has a good starting point for this as the terrain is generated from a heightmap instead of a model, and the lighting/coloring is done with normal/height data in hlsl.&#xD;&#xA;&#xD;&#xA;*Warning: all of this is in regards to XNA 3.1*, I would imagine most of it would carry over to XNA 4.0 or be easily translatable, but there may be a better way in the current version. &#xD;&#xA;&#xD;&#xA;Anyway, hope this helps!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php" />
  <row Id="24395" PostHistoryTypeId="5" PostId="11320" RevisionGUID="ce3d2b44-0577-46de-a2db-0dbb42e7e737" CreationDate="2011-04-20T18:51:17.940" UserId="1198" Comment="deleted 27 characters in body" Text="I'm looking for any material on seamless MMO servers! I do have a few articles in the &quot;Massively Multiplayer Game Development&quot; books and &quot;Game Programming Gems 5.&quot; Has anyone experience on that topic or knows articles about that? &#xD;&#xA;&#xD;&#xA;I'm interested in &quot;high-level views&quot; as well as implementations. This might become the topic of my master thesis and I would like to find out how hard it is to write such a system, before I actually start the thesis. Right now I haven't decided which language to use, I'm thinking about Java or Scala. Erlang could be a choice, but I've never worked with that.&#xD;&#xA;&#xD;&#xA;Note: Basic requirement would be movement. Any other gamesystems are optional and give &quot;bonus credit.&quot;&#xD;&#xA;&#xD;&#xA;Now for what I mean with &quot;seamless server&quot;: I want so set up a server cluster where every node controls some part of the game world, with static boundaries. Players can now move from one end of the world to the other without switching an instance or hitting some &quot;teleporter&quot;. I think WoW does that. In my back-end however the player transitions from one server to the next." />
  <row Id="24396" PostHistoryTypeId="2" PostId="11409" RevisionGUID="d4ea6996-d0eb-4c0b-bc4f-9467fa85a738" CreationDate="2011-04-20T19:01:38.970" UserId="5708" Text="Linear Algebra is the foremost discipline for 3d graphics programming simply _because_ it's the mathematical language for describing spatial geometry.  Your other three topics are really just subsets of linear algebra:&#xD;&#xA;&#xD;&#xA; - Vectors are a way of thinking about points in space&#xD;&#xA; - Matrices are ways of thinking about transformations of space and objects: translating objects, scaling them, etc. &#xD;&#xA; - Quaternions are a natural representation for a specific subgroup of those transformations, the rotations&#xD;&#xA; - etc, etc.&#xD;&#xA;&#xD;&#xA;As far as other relevant pieces of mathematics for 3d graphics programming, the one I'd recommend that doesn't get nearly enough love is computational geometry.  A lot of natural problems boil down to topics in computational geometry:&#xD;&#xA;&#xD;&#xA; - One of the most natural ways of defining a volume from a set of points (for instance, to define an audio volume where a specific background noise will play, or a fog volume, or the like) is to find the _Convex Hull_ of the points; there are good algorithms for doing that in 2 and 3 dimensions, but even the 2d algorithms aren't immediately obvious.&#xD;&#xA; - The problem of being able to determine what objects are near a given point or are near each other (for instance, to reduce the number of objects that have to be checked for possible collisions, or to figure out which enemies will notice the players at a given point) gets into the field of _Geometric query_ problems and to spatial partitioning schemes (and thus into structures like BSP trees and octrees).  The same general ideas are also used to answer 'line tracing' queries (for instance, 'what does this laser beam hit?')&#xD;&#xA;&#xD;&#xA;After that, I'd encourage looking into basic calculus and particularly numerical methods for differential equations; these are less relevant to 3d graphics per se than they are to 3d physics, but in general the two topics are pretty tightly coupled (even for simple problems of kinematics - for instance, for character animations and the like) and some knowledge of both will substantially enhance your knowledge of either; it's difficult if not impossible to work the relevant physics without the same core linear algebra knowledge as graphics uses, but at the same time having the physics knowledge provides another point of reference for understanding the topics in graphics.&#xD;&#xA;" />
  <row Id="24397" PostHistoryTypeId="2" PostId="11410" RevisionGUID="c832bf92-ba6b-44ef-832d-4ba4dd499fbe" CreationDate="2011-04-20T19:10:42.430" UserId="3505" Text="They are not all required. Vector maths are all over 3D graphics, you might be able to set up the geometry without knowing the finer points of vector maths, but stuff like bump maps are going to get really hard, and you'll fall through on physics.&#xD;&#xA;&#xD;&#xA;Quaternions simply offer a different description for some of the maths, it may be nice to have, but it's certainly not needed as more conventional mathematics suffice for describing any calculation you can do with quaternions.&#xD;&#xA;&#xD;&#xA;Matrix maths and linear algebra are very closely related, most of all it describe linear operations on sets of numbers. But again, it's just another way of describing some things that could be described with vectors and algebra.&#xD;&#xA;&#xD;&#xA;I don't know if you consider it to be just a part of basic maths, but trigonometry certainly needs to make the list as well." />
  <row Id="24398" PostHistoryTypeId="2" PostId="11411" RevisionGUID="e65278ff-1b03-45ca-880f-5d3770c10e13" CreationDate="2011-04-20T19:12:54.347" UserId="5844" Text="http://www.dickbaldwin.com/KjellTutorial/KjellVectorTutorialIndex.htm is a pretty good and straightforward tutorial about 2D/3D vector math AND it's applications on graphics programming." />
  <row Id="24399" PostHistoryTypeId="2" PostId="11412" RevisionGUID="8b6926ea-3960-49d2-9493-566b1ef8966a" CreationDate="2011-04-20T19:22:34.250" UserId="6588" Text="Here's a great intro http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/" />
  <row Id="24400" PostHistoryTypeId="2" PostId="11413" RevisionGUID="2a6575ad-033c-4014-9241-30e4a9bed440" CreationDate="2011-04-20T19:37:06.587" UserId="6835" Text="3d Max does export Opacity value of an material to Fbx, which in Xna (when importet/processed) can be easily found in BasicEffect of a mesh instance Alpha property (and used in draw method).&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA;&#xD;&#xA;1. Can opacity values on animated mesh be exported (specific opacity states/values over time/keyframes) ??&#xD;&#xA;&#xD;&#xA;From what I gathered it seems that only Opacity value of the First frame of animated mesh is exported (and found in BasicEffect of mesh). So if in Max there are keyframes with different opacity values and Max animation preview clearly show these transparency transitions when moving scroll, then do not get exported to Fbx.&#xD;&#xA;&#xD;&#xA;Are there knows techniques/hacks to inject opacity from animated meshed (values over time/keyframes) to Fbx? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="24401" PostHistoryTypeId="1" PostId="11413" RevisionGUID="2a6575ad-033c-4014-9241-30e4a9bed440" CreationDate="2011-04-20T19:37:06.587" UserId="6835" Text="Fbx mesh animation opacity export" />
  <row Id="24402" PostHistoryTypeId="3" PostId="11413" RevisionGUID="2a6575ad-033c-4014-9241-30e4a9bed440" CreationDate="2011-04-20T19:37:06.587" UserId="6835" Text="&lt;xna&gt;&lt;models&gt;" />
  <row Id="24403" PostHistoryTypeId="2" PostId="11414" RevisionGUID="c1f476fc-7c3e-46d7-9da0-71148a718386" CreationDate="2011-04-20T19:48:12.600" UserId="853" Text="I'm wanting to create a rope that can collide with objects like in the following youtube video:&#xD;&#xA;&#xD;&#xA;[2D Game Physics Rope][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=fpIrHU8r2UM&amp;feature=related&#xD;&#xA;&#xD;&#xA;I'm thinking that you implement the verlet integration which uses points and connects these points with lines. I'm trying to figure out what type of collision detection you would apply to the rope to get the effect in the video. &#xD;&#xA;&#xD;&#xA;I'm thinking you would have to do some cd to each point. I would like to use box2D, so I'm wondering would making each point a rigid body work? Any advice would be appreciated. " />
  <row Id="24404" PostHistoryTypeId="1" PostId="11414" RevisionGUID="c1f476fc-7c3e-46d7-9da0-71148a718386" CreationDate="2011-04-20T19:48:12.600" UserId="853" Text="2D Rope Collision Detection" />
  <row Id="24405" PostHistoryTypeId="3" PostId="11414" RevisionGUID="c1f476fc-7c3e-46d7-9da0-71148a718386" CreationDate="2011-04-20T19:48:12.600" UserId="853" Text="&lt;collision-detection&gt;" />
  <row Id="24406" PostHistoryTypeId="25" PostId="11414" RevisionGUID="da87b97f-4ee2-47bb-a7b5-3ff2e495ba5c" CreationDate="2011-04-20T21:09:29.560" Comment="http://twitter.com/#!/StackGameDev/status/60812354081923072" />
  <row Id="24407" PostHistoryTypeId="6" PostId="11414" RevisionGUID="0fb513e7-0c07-43cf-b5e5-bf932d284275" CreationDate="2011-04-20T22:40:37.053" UserId="3505" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;box2d&gt;" />
  <row Id="24408" PostHistoryTypeId="2" PostId="11415" RevisionGUID="77e22b13-bd8d-4291-a64b-c99fd77e8ddf" CreationDate="2011-04-20T22:46:50.097" UserId="4804" Text="Sure, lots of programming languages have a future in games development.  It is an often used false dilemma used in the computing press that there can be only one tool of type X and that everybody wants this to occur.&#xD;&#xA;&#xD;&#xA;Nothing could be farther from the truth.&#xD;&#xA;&#xD;&#xA;C# and Java have been used in games for a long time.  C and C++ have for even longer, and still are.  Lua is used as the scripting language for some incredibly popular games, with the engine written in C/C++.&#xD;&#xA;&#xD;&#xA;So clearly, no programming language is blowing other programming languages out of the water as The Game Programming Language.  In fact, we see a tendency for leading games to be composed of a high performance compiled programming language for developing the engine(s) in. and then a higher level dynamic programming language for scripting how the UI and stuff behaves.&#xD;&#xA;&#xD;&#xA;The key at the moment is performance.  If any of the programming languages/libraries used cause unpredictable/uncontrollable pauses in the application then in an action game, that will fall flat on its face. In a text-based adventure game, that might be okay however." />
  <row Id="24409" PostHistoryTypeId="2" PostId="11416" RevisionGUID="548e8b92-1c36-4663-822d-198f1cdd76af" CreationDate="2011-04-20T22:52:15.593" UserId="3505" Text="Here is what I would do, make each each point on the line a circle, make enough points that the circles overlap. Tether each point to it's neighbour, rather than standard collision this tether should make the points stay a fixed distance from each other.&#xD;&#xA;&#xD;&#xA;I don't know Box2D, but I'd guess the functionality required is there." />
  <row Id="24410" PostHistoryTypeId="2" PostId="11417" RevisionGUID="eb315be0-7a42-41d8-bcad-4fb5852f368f" CreationDate="2011-04-20T23:14:11.760" UserId="6763" Text="I implemented/copied the wu line algorithm from pseudo-code on wiki-pedia and other places.  &#xD;&#xA;&#xD;&#xA;When drawing a sine wave it breaks down at the point where the line changes from y dominant to x dominant (or vice versa). (I did not copy the endpoint code because it looks terrible and I do not need them for my purposes. )&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/qyhLe.png&quot; /&gt;&#xD;&#xA;&#xD;&#xA;Does anyone know a solution for this issue?  If not I will modify the algorithm myself to get it to work.  I am just curious if someone else has run into this and knows exactly how to fix it.  Is it possible to implement without the lines being globally aware of each other?  Or is this why drawing API's implement moveto and lineto functions?&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://freespace.virgin.net/hugo.elias/graphics/x_wuline.htm&quot;&gt;The pseudo code&lt;/a&gt;" />
  <row Id="24411" PostHistoryTypeId="1" PostId="11417" RevisionGUID="eb315be0-7a42-41d8-bcad-4fb5852f368f" CreationDate="2011-04-20T23:14:11.760" UserId="6763" Text="connecting multiple anti-aliased lines together" />
  <row Id="24412" PostHistoryTypeId="3" PostId="11417" RevisionGUID="eb315be0-7a42-41d8-bcad-4fb5852f368f" CreationDate="2011-04-20T23:14:11.760" UserId="6763" Text="&lt;programming&gt;&lt;graphics&gt;&lt;graphics-programming&gt;&lt;c&gt;" />
  <row Id="24413" PostHistoryTypeId="2" PostId="11418" RevisionGUID="faa606cc-d44f-47d8-b942-4082ba5035cc" CreationDate="2011-04-20T23:26:18.143" UserId="6442" Text="[Airstrike][1] is a small and simple game to start from. The source code is **short and simple**. It's not a platformer, but that may be a good thing, since you may not want your architecture to have outside influence. Every **low-level action** you may want is implemented - there aren't many (load resources, play sounds, display sprites...)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://icculus.org/airstrike/" />
  <row Id="24414" PostHistoryTypeId="5" PostId="9254" RevisionGUID="11a15938-0318-4fa0-85cb-7ec0debbb250" CreationDate="2011-04-20T23:55:45.547" UserId="3588" Comment="Swapping algorithm, which doesn't fully seem applicable (this seems less about an algorithm and more about the math itself), for projectile-physics. Also dragging that stuff out of parentheses and into real question body data ♪" Text="I'm not much of a maths expert, so this is probably quite straight forward. I was playing a soccer flash game where you take free kicks. You provide Power, Swerve and Direction. I'm reading up on vectors and such so I can use the direction and power information to shoot the ball with the correct velocity. &#xD;&#xA;&#xD;&#xA;What I don't understand is how the 'Swerve' information is used. What formula connects the Swerve information with the Direction and Power? This is all assuming a 2D environment." />
  <row Id="24415" PostHistoryTypeId="6" PostId="9254" RevisionGUID="11a15938-0318-4fa0-85cb-7ec0debbb250" CreationDate="2011-04-20T23:55:45.547" UserId="3588" Comment="Swapping algorithm, which doesn't fully seem applicable (this seems less about an algorithm and more about the math itself), for projectile-physics. Also dragging that stuff out of parentheses and into real question body data ♪" Text="&lt;math&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;vector&gt;&lt;projectile-physics&gt;" />
  <row Id="24416" PostHistoryTypeId="24" PostId="9254" RevisionGUID="11a15938-0318-4fa0-85cb-7ec0debbb250" CreationDate="2011-04-20T23:55:45.547" Comment="Proposed by 3588 approved by 51 edit id of 361" />
  <row Id="24417" PostHistoryTypeId="5" PostId="6568" RevisionGUID="0ec77f52-9926-430a-a58f-4e690920b1b0" CreationDate="2011-04-20T23:55:52.300" UserId="3588" Comment="Reformatted the title and a little bit of the body, added the projectile-physics tag as well as it does deal with projectile motion ♪" Text="I'm shooting out a projectile and I want another projectile to closely follow it. I can't simply shoot out the second projectile at a slightly lesser time because the first projectile may change trajectory.&#xD;&#xA;&#xD;&#xA;All I want is the second projectile to be closely following behind the first projectile.&#xD;&#xA;&#xD;&#xA;My first idea was to plot the points every frame to follow the first projectile. However, as the speed of the first projectile increases, the following projectile lags behind." />
  <row Id="24418" PostHistoryTypeId="4" PostId="6568" RevisionGUID="0ec77f52-9926-430a-a58f-4e690920b1b0" CreationDate="2011-04-20T23:55:52.300" UserId="3588" Comment="Reformatted the title and a little bit of the body, added the projectile-physics tag as well as it does deal with projectile motion ♪" Text="Forcing one projectile to follow close behind an initial projectile" />
  <row Id="24419" PostHistoryTypeId="6" PostId="6568" RevisionGUID="0ec77f52-9926-430a-a58f-4e690920b1b0" CreationDate="2011-04-20T23:55:52.300" UserId="3588" Comment="Reformatted the title and a little bit of the body, added the projectile-physics tag as well as it does deal with projectile motion ♪" Text="&lt;math&gt;&lt;physics&gt;&lt;projectile-physics&gt;" />
  <row Id="24420" PostHistoryTypeId="24" PostId="6568" RevisionGUID="0ec77f52-9926-430a-a58f-4e690920b1b0" CreationDate="2011-04-20T23:55:52.300" Comment="Proposed by 3588 approved by 51 edit id of 357" />
  <row Id="24421" PostHistoryTypeId="5" PostId="9439" RevisionGUID="275766eb-8cfd-4f6c-a10e-1539173ecfd2" CreationDate="2011-04-20T23:55:57.183" UserId="3588" Comment="Tag additions, and just some minor additional touch-ups, preserving things even when they're loooooong ♪" Text="I have a gun which fires a projectile that has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot, so that the projectile hits the enemy dead in the center.&#xD;&#xA;&#xD;&#xA;It's been a looooong time since school, and my physics skills are a bit rusty, but they're there. I've been thinking to somehow apply the `v = d/t` formula to find the time needed for the projectile or enemy to reach a certain point. But the problem is that I can't find a common point for both the projectile and enemy trajectories. Yes, I can find a certain point for the projectile, and another for the enemy, but I would need lots of tries to find one where the two points coincide, which is stupid. There has to be a way to link them together but I can't figure it out.&#xD;&#xA;&#xD;&#xA;I prepared some drawings and samples:&#xD;&#xA;&#xD;&#xA;A simple version of my Flash game, dumbed down to the basics, just some shapes:&#xD;&#xA;&#xD;&#xA;http://axonnsd.org/W/P001/MathSandBox.swf - click the mouse anywhere to fire a projectile.&#xD;&#xA;&#xD;&#xA;Or, here is an image which describes my problem:&#xD;&#xA;&#xD;&#xA;![An image which describes my problem][1]&#xD;&#xA;&#xD;&#xA;So... who has any ideas about how to find x3/y3, thus leading me to find the angle in which the weapon has to tilt in order to fire a projectile to meet the enemy?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vwPuB.jpg&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I think it would be clearer if I also mention that I know: the speed of both Enemy and Projectile and the Enemy travels on a straight vertical line." />
  <row Id="24422" PostHistoryTypeId="6" PostId="9439" RevisionGUID="275766eb-8cfd-4f6c-a10e-1539173ecfd2" CreationDate="2011-04-20T23:55:57.183" UserId="3588" Comment="Tag additions, and just some minor additional touch-ups, preserving things even when they're loooooong ♪" Text="&lt;2d-physics&gt;&lt;intersection&gt;&lt;projectile-physics&gt;" />
  <row Id="24423" PostHistoryTypeId="24" PostId="9439" RevisionGUID="275766eb-8cfd-4f6c-a10e-1539173ecfd2" CreationDate="2011-04-20T23:55:57.183" Comment="Proposed by 3588 approved by 51 edit id of 359" />
  <row Id="24424" PostHistoryTypeId="5" PostId="11119" RevisionGUID="7f47a9c1-985a-4c98-b25c-b7421c8d4efe" CreationDate="2011-04-20T23:55:59.463" UserId="3588" Comment="Rewrote most of the body to amend the grammar, restructured the title, and added tags for math and projectile motion. ♪" Text="I'm developing a 2D golf game in VB.NET 2005, but I am stuck on how to implement air or wind drag that should affect the ball.&#xD;&#xA;&#xD;&#xA;Already I have these equations for projectile:&#xD;&#xA;&#xD;&#xA;    Vo                            `&lt;-Initial velocity of golfball when hit or fired`&#xD;&#xA;    &#xD;&#xA;    Vx=VoCos(theta)               `&lt;-Vertical component of velocity of golfball`&#xD;&#xA;    &#xD;&#xA;    Vy=VoSin(theta)-gt*           `&lt;-Horizontal component of velocity of golfball`&#xD;&#xA;    &#xD;&#xA;    X=VoCos(theta)t              `&lt;-Vertical dixtance of golfball`&#xD;&#xA;    &#xD;&#xA;    Y=VoSin(theta)t-(0.5)g(t*t)  `&lt;-Horizontal dixtance of golfball`&#xD;&#xA;&#xD;&#xA;How do I add air drag to this equation to properly affect the velocity of the golf ball? I don't have any idea how to do it, has anyone worked with similar equations?&#xD;&#xA;" />
  <row Id="24425" PostHistoryTypeId="4" PostId="11119" RevisionGUID="7f47a9c1-985a-4c98-b25c-b7421c8d4efe" CreationDate="2011-04-20T23:55:59.463" UserId="3588" Comment="Rewrote most of the body to amend the grammar, restructured the title, and added tags for math and projectile motion. ♪" Text="Adding air drag to a golf ball trajectory equation" />
  <row Id="24426" PostHistoryTypeId="6" PostId="11119" RevisionGUID="7f47a9c1-985a-4c98-b25c-b7421c8d4efe" CreationDate="2011-04-20T23:55:59.463" UserId="3588" Comment="Rewrote most of the body to amend the grammar, restructured the title, and added tags for math and projectile motion. ♪" Text="&lt;c#&gt;&lt;math&gt;&lt;physics&gt;&lt;projectile-physics&gt;" />
  <row Id="24427" PostHistoryTypeId="24" PostId="11119" RevisionGUID="7f47a9c1-985a-4c98-b25c-b7421c8d4efe" CreationDate="2011-04-20T23:55:59.463" Comment="Proposed by 3588 approved by 51 edit id of 362" />
  <row Id="24428" PostHistoryTypeId="5" PostId="9404" RevisionGUID="1262a30d-6c28-4bc1-9b66-2feb53562d70" CreationDate="2011-04-20T23:56:02.410" UserId="3588" Comment="Restructured the title and removed salutations. Originally marked for the projectile-physics tag, but it's more about vectors than it is about projectile motion specifically. ♪" Text="I've got a 2D projectile code sample working, but would like to extend it to 3D. How would I calculate the initial velocity of the Z-axis? At the moment, I've got:&#xD;&#xA;&#xD;&#xA;    initVel.X = (float)Math.Cos(45.0);&#xD;&#xA;    initVel.Y = (float)Math.Sin(45.0);&#xD;&#xA;&#xD;&#xA;How would I convert this to work in 3D, and add the initial velocity for the Z-axis?&#xD;&#xA;&#xD;&#xA;In my example, X is across, Y is up down and Z is going into the screen. I also normalize the vector and multiply it by the speed." />
  <row Id="24429" PostHistoryTypeId="4" PostId="9404" RevisionGUID="1262a30d-6c28-4bc1-9b66-2feb53562d70" CreationDate="2011-04-20T23:56:02.410" UserId="3588" Comment="Restructured the title and removed salutations. Originally marked for the projectile-physics tag, but it's more about vectors than it is about projectile motion specifically. ♪" Text="Calculate the initial velocity of a 3D trajectory" />
  <row Id="24430" PostHistoryTypeId="24" PostId="9404" RevisionGUID="1262a30d-6c28-4bc1-9b66-2feb53562d70" CreationDate="2011-04-20T23:56:02.410" Comment="Proposed by 3588 approved by 51 edit id of 358" />
  <row Id="24431" PostHistoryTypeId="5" PostId="2942" RevisionGUID="3d4c17fa-538b-41d3-b528-cb0b8f0b44ef" CreationDate="2011-04-20T23:56:04.423" UserId="3588" Comment="It's a Worms-like game. You're *definitely* dealing with projectile motion here. ♪" Text="Following up on my earlier question about [finding the slope of a 2D bitmap terrain][1] I now need to know the best way of finding the point on the 2D terrain that the missile hit. Obviously, I can see if any pixels under the missile intersect terrain, but say it has moved quite deep into the terrain. &#xD;&#xA;&#xD;&#xA;What is the best way to step back to find where it initially collided? I could move back X pixels at a time towards the missile's previous position, but what would be a good value of X? And is there a smarter way? Maybe moving half the distance, then a quarter etc? &#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2853/how-do-i-calculate-the-angle-of-the-slope-at-a-point-on-a-2d-bitmap-terrain" />
  <row Id="24432" PostHistoryTypeId="4" PostId="2942" RevisionGUID="3d4c17fa-538b-41d3-b528-cb0b8f0b44ef" CreationDate="2011-04-20T23:56:04.423" UserId="3588" Comment="It's a Worms-like game. You're *definitely* dealing with projectile motion here. ♪" Text="What's the most efficient way to find the intersection point of a missile and a bitmap terrain?" />
  <row Id="24433" PostHistoryTypeId="6" PostId="2942" RevisionGUID="3d4c17fa-538b-41d3-b528-cb0b8f0b44ef" CreationDate="2011-04-20T23:56:04.423" UserId="3588" Comment="It's a Worms-like game. You're *definitely* dealing with projectile motion here. ♪" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;terrain&gt;&lt;projectile-physics&gt;" />
  <row Id="24434" PostHistoryTypeId="24" PostId="2942" RevisionGUID="3d4c17fa-538b-41d3-b528-cb0b8f0b44ef" CreationDate="2011-04-20T23:56:04.423" Comment="Proposed by 3588 approved by 51 edit id of 360" />
  <row Id="24435" PostHistoryTypeId="5" PostId="7939" RevisionGUID="5f283bd2-2c40-493b-bcc2-f45e790fbb0d" CreationDate="2011-04-20T23:56:06.827" UserId="3588" Comment="Added MORE PHYSICS tags, slightly altered the title to be clearer with a subject, and some body changes. That big change in the middle, it felt awkward since &quot;but&quot; implies a contradiction yet it was paired with the data point that remained the same." Text="I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is:&#xD;&#xA;&#xD;&#xA;    x = x0 + vx0*t&#xD;&#xA;    y = y0 + vy0*t - 0.5*g*t*t&#xD;&#xA;&#xD;&#xA;where `g` is gravity, `t` is time, `x0` is the initial `x` position, `vx0` is the initial x velocity.&#xD;&#xA;&#xD;&#xA;What I would like to do is change the speed of this ball, without changing how far it travels. Let's say the ball starts in the lower left corner, moves upwards and rightwards in an arc, and finishes in the lower right corner, and this takes 5s. What I would like to do is change it so the ball still follows the same curve and finishes in the same position, but takes 10s or 20s to do so.&#xD;&#xA;&#xD;&#xA;How can I achieve this? All I can think of is manipulating `t` but I don't think that's a good idea. I'm sure it's something simple, but my maths are pretty shaky." />
  <row Id="24436" PostHistoryTypeId="4" PostId="7939" RevisionGUID="5f283bd2-2c40-493b-bcc2-f45e790fbb0d" CreationDate="2011-04-20T23:56:06.827" UserId="3588" Comment="Added MORE PHYSICS tags, slightly altered the title to be clearer with a subject, and some body changes. That big change in the middle, it felt awkward since &quot;but&quot; implies a contradiction yet it was paired with the data point that remained the same." Text="How do I change the speed of an object without changing path travelled?" />
  <row Id="24437" PostHistoryTypeId="6" PostId="7939" RevisionGUID="5f283bd2-2c40-493b-bcc2-f45e790fbb0d" CreationDate="2011-04-20T23:56:06.827" UserId="3588" Comment="Added MORE PHYSICS tags, slightly altered the title to be clearer with a subject, and some body changes. That big change in the middle, it felt awkward since &quot;but&quot; implies a contradiction yet it was paired with the data point that remained the same." Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;projectile-physics&gt;" />
  <row Id="24438" PostHistoryTypeId="24" PostId="7939" RevisionGUID="5f283bd2-2c40-493b-bcc2-f45e790fbb0d" CreationDate="2011-04-20T23:56:06.827" Comment="Proposed by 3588 approved by 51 edit id of 363" />
  <row Id="24439" PostHistoryTypeId="25" PostId="11398" RevisionGUID="dfe22a60-60e6-42bd-afb4-30b931e129c0" CreationDate="2011-04-21T00:09:30.083" Comment="http://twitter.com/#!/StackGameDev/status/60857654242840576" />
  <row Id="24440" PostHistoryTypeId="5" PostId="11399" RevisionGUID="ddf6f4f4-1fe0-4f04-9c05-ffd41345cedb" CreationDate="2011-04-21T00:45:17.167" UserId="3656" Comment="added 2 characters in body" Text="(My tl;dr -&gt; Just make a friggin' game!)&#xD;&#xA;&#xD;&#xA;For the MVC part of your question, have you read through [this question][1]?&#xD;&#xA;&#xD;&#xA;I think keeping a 1-to-1 relationship between Entity and EntityRepresentation is the right choice. The things you'll want to share across multiple entities can be referred to in the Representation or Controller (like the Sprite loaded in memory as you discussed). This way, you are able to make per-instance changes to the Entity.&#xD;&#xA;&#xD;&#xA;Say you added the option in EntityRepresentation to apply special effects, like a colored glow. If you shared one EntityRepresentation instance among multiple Entity instances, you wouldn't be able to choose one specific Entity instance to add the glow effect to.&#xD;&#xA;&#xD;&#xA;Have you written your EntityRepresentation class? Something to think about is cases where you want image and sound vs image but no sound vs sound but no image.&#xD;&#xA;&#xD;&#xA;My train of thought regarding that is:&#xD;&#xA;&#xD;&#xA;* Okay, have different subclasses of EntityRepresentation to represent each.&#xD;&#xA;* Except that's wasteful performance-wise, just give EntityRepresentation two pointers to an Audio and Visual representation respectvely Easier/faster to check NULL than to have another virtual call and making your inheritance chain deeper.&#xD;&#xA;* But then that leads me to the conclusion, why even bother having EntityRepresentation? just have an AudioRepresentation and VisualRepresentation in the Entity class and do the null checking in Entity. It's just one additional handle_event call.&#xD;&#xA;&#xD;&#xA;As for file organization, I don't think it makes a significant difference so long as you keep it organized. I personally prefer to keep (for example) images and scripts in separate folders even if they are associated with the same type of entity. I do keep a similar subdirectory hierarchy in both the images and scripts folder though.&#xD;&#xA;&#xD;&#xA;ie:&#xD;&#xA;&#xD;&#xA;* `images/Enemies/Vogon/Vogon_idle.png` and `images/Enemies/Vogon/Vogon_walk.png`&#xD;&#xA;* `scripts/Enemies/Vogon_config.py` and `scripts/Enemies/Vogon_AI.py`&#xD;&#xA;&#xD;&#xA;There is a miniscule workflow benefit for having all `Vogon` related files in one folder in that you don't have to keep multiple file browser windows open. But this is a really trivial difference.&#xD;&#xA;&#xD;&#xA;A lot of this stuff is really trivial. Just keep making the game and go with your gut instinct on organization and the Entity class structure. I like your current layout of the Entity class. Work with it and then make some decisions. You'll be better informed about your style of programming and about the game you want to make after you actually start trying to make this game. Starting with separating the representation as you are now will give you enough wiggle room to change things up later down the line.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture" />
  <row Id="24441" PostHistoryTypeId="2" PostId="11419" RevisionGUID="04c7dc9e-b665-4af6-a733-edcd6a68904f" CreationDate="2011-04-21T01:26:12.647" UserId="6666" Text="&#xD;&#xA;&#xD;&#xA;From what I understand being a level designer and a character/environment/object/etc Modeler are two different jobs, yet sometimes it feels like a Modeler can also do the job of the level designer.  I know this also depends on the scale of the game.  For small games maybe they are one and the same, but for bigger games they become two different jobs.&#xD;&#xA;&#xD;&#xA;I understand a background in some modeling could not hurt when it comes to level design, but the question I have is:  Do jobs prefer people who can model for level designing?  This way they can kill two birds with one stone and have someone to create the assets and design the level.  &#xD;&#xA;&#xD;&#xA;What is your opinion of the training?  Does level design contain skill sets that make them completely different from what a modeler can do, or is this an easy transition for a modeler to become a level designer?  Can you be a bad level designer but a good modeler and vice versa?" />
  <row Id="24442" PostHistoryTypeId="1" PostId="11419" RevisionGUID="04c7dc9e-b665-4af6-a733-edcd6a68904f" CreationDate="2011-04-21T01:26:12.647" UserId="6666" Text="Level Design V.S. Modeler" />
  <row Id="24443" PostHistoryTypeId="3" PostId="11419" RevisionGUID="04c7dc9e-b665-4af6-a733-edcd6a68904f" CreationDate="2011-04-21T01:26:12.647" UserId="6666" Text="&lt;animation&gt;&lt;art&gt;&lt;level-design&gt;&lt;jobs&gt;" />
  <row Id="24444" PostHistoryTypeId="2" PostId="11420" RevisionGUID="bc8134d5-b9be-44d6-900b-fbb71384e7ce" CreationDate="2011-04-21T02:19:37.597" UserId="6864" Text="It depends on how the levels are created. Sometimes level designers wont even touch a single vert during the entire level creation process. Usually they have tools that allow the level designer to make the level without having to deal with polygons (Hammer for Source engine games, Unreal Editor for unreal). But as far as your question goes, I'm sure being able to also create 3d assets as well as design levels would increase your chances of getting a job but it doesn't necessarily make you a better level designer. " />
  <row Id="24445" PostHistoryTypeId="25" PostId="11419" RevisionGUID="ba3891ee-eac9-414b-a45a-adbb8739ff32" CreationDate="2011-04-21T03:09:29.800" Comment="http://twitter.com/#!/StackGameDev/status/60902951618740224" />
  <row Id="24446" PostHistoryTypeId="2" PostId="11421" RevisionGUID="bdd59bfc-2338-4850-857e-091dabc0369c" CreationDate="2011-04-21T03:22:43.420" UserId="-1" Text="" />
  <row Id="24447" PostHistoryTypeId="2" PostId="11422" RevisionGUID="76690eb0-8ea0-4de7-b119-cbd1f7106110" CreationDate="2011-04-21T03:22:43.420" UserId="-1" Text="" />
  <row Id="24448" PostHistoryTypeId="2" PostId="11423" RevisionGUID="5f288c9c-29bc-464a-8fd5-0e32f4d0ac77" CreationDate="2011-04-21T03:33:26.963" UserId="6588" Text="Here are a few links about game design and level design collected on my webpage:&#xD;&#xA;http://www.newarteest.com/game_dev.html&#xD;&#xA;&#xD;&#xA;Especially take note of the link &quot;evaluating game mechanics for depth&quot; because that is a really informative article about level designers." />
  <row Id="24449" PostHistoryTypeId="2" PostId="11424" RevisionGUID="2c90cf68-8f6f-4dc4-a84e-1640aee34574" CreationDate="2011-04-21T03:40:37.220" UserId="6588" Text="Level design is not really about visual design, although in many studios level designers do end up doing a lot of visual design work (eg. applying textures to the level.) Level design is really about planning the flow of the level, making decisions about gameplay, and laying out challenges for the player to overcome. Level design as a discipline starts with written plans and drawn schematics before firing up a level editing tool.&#xD;&#xA;&#xD;&#xA;&quot;Pure&quot; level design is embodied by a workflow called &quot;white-boxing&quot; where the level designer places blank (not necessarily white, anymore than blueprints have to be blue) geometry in the scene to establish scale and structure, places all the dynamic items and enemies around the scene, and then environment artists go through and replace all the stand-in geometry with polished assets.&#xD;&#xA;&#xD;&#xA;Here are a few links about game design and level design collected on my webpage: http://www.newarteest.com/game_dev.html&#xD;&#xA;&#xD;&#xA;Especially take note of the link &quot;evaluating game mechanics for depth&quot; because that is a really informative article about level designers." />
  <row Id="24450" PostHistoryTypeId="2" PostId="11425" RevisionGUID="e2553b8c-646b-4f4d-bb09-357da0a07592" CreationDate="2011-04-21T03:41:04.160" UserId="6588" Text="Level design is not really about visual design, although in many studios level designers do end up doing a lot of visual design work (eg. applying textures to the level.) Level design is really about planning the flow of the level, making decisions about gameplay, and laying out challenges for the player to overcome. Level design as a discipline starts with written plans and drawn schematics before firing up a level editing tool.&#xD;&#xA;&#xD;&#xA;&quot;Pure&quot; level design is embodied by a workflow called &quot;white-boxing&quot; where the level designer places blank (not necessarily white, anymore than blueprints have to be blue) geometry in the scene to establish scale and structure, places all the dynamic items and enemies around the scene, and then environment artists go through and replace all the stand-in geometry with polished assets.&#xD;&#xA;&#xD;&#xA;Here are a few links about game design and level design collected on my webpage: http://www.newarteest.com/game_dev.html&#xD;&#xA;&#xD;&#xA;Especially take note of the link &quot;evaluating game mechanics for depth&quot; because that is a really informative article about level designers." />
  <row Id="24455" PostHistoryTypeId="2" PostId="11427" RevisionGUID="eab12b19-4eb0-4ed5-91a3-5d7fa7f0136c" CreationDate="2011-04-21T07:01:30.230" UserId="6867" Text="I am building a game that is tile-based (filled with glowy vector squares). Right now, I am considering using instancing for drawing these, but I would like to know if there is a faster approach.&#xD;&#xA;&#xD;&#xA;The squares are all of the same size. They should be rendered in a rectangular grid, and I know exactly how many of them I should render. The squares are also made with linelists (so 8 vertices for a single rectangle).&#xD;&#xA;&#xD;&#xA;Knowing all this, is instancing still the best approach? Or can I utilize the GPU more here? (in my game, I only utilize 1% of the GPU, but 100% of the CPU)." />
  <row Id="24456" PostHistoryTypeId="1" PostId="11427" RevisionGUID="eab12b19-4eb0-4ed5-91a3-5d7fa7f0136c" CreationDate="2011-04-21T07:01:30.230" UserId="6867" Text="Rendering everything with a shader when only squares are needed?" />
  <row Id="24457" PostHistoryTypeId="3" PostId="11427" RevisionGUID="eab12b19-4eb0-4ed5-91a3-5d7fa7f0136c" CreationDate="2011-04-21T07:01:30.230" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;hlsl&gt;" />
  <row Id="24458" PostHistoryTypeId="2" PostId="11428" RevisionGUID="850f7f8a-95a5-4e36-947b-86c977447c1b" CreationDate="2011-04-21T07:57:42.327" UserId="4947" Text="You can use geometry shader and send just one point and normal for each rectangle. In geometry shader produce for example triangle strip. But if you need texture coordinates, it could be problem.&#xD;&#xA;&#xD;&#xA;If you don't want to use geom. shader, it would be also better to use triangle strip instead of rectangles. And also indexed geometry is much better then non-indexed. &#xD;&#xA;&#xD;&#xA;If you want to more improve your app, you can use more extensions, like half_float_vertex, primitive_restart or vertex_buffer_unified_memory." />
  <row Id="24459" PostHistoryTypeId="2" PostId="11429" RevisionGUID="3208779c-e85a-4209-a0b8-dbe22f4dfd0d" CreationDate="2011-04-21T08:51:18.907" UserId="6601" Text="Hi all im trying to deactivate an GameObject when a certain variable reaches a certain value.&#xD;&#xA;It is an imported FBX and doesnt have a MeshRenderer.&#xD;&#xA;Im trying to stop it now with TheGameObject.gameObject.activate = false;&#xD;&#xA;Than nothinghappens.&#xD;&#xA;Is there any other way to do this or fix this?&#xD;&#xA;Thanks in advance" />
  <row Id="24460" PostHistoryTypeId="1" PostId="11429" RevisionGUID="3208779c-e85a-4209-a0b8-dbe22f4dfd0d" CreationDate="2011-04-21T08:51:18.907" UserId="6601" Text="Unity Deactivating a gameObject" />
  <row Id="24461" PostHistoryTypeId="3" PostId="11429" RevisionGUID="3208779c-e85a-4209-a0b8-dbe22f4dfd0d" CreationDate="2011-04-21T08:51:18.907" UserId="6601" Text="&lt;unity&gt;&lt;javascript&gt;" />
  <row Id="24462" PostHistoryTypeId="25" PostId="11427" RevisionGUID="0010440d-cc21-4ef2-9915-30d97b4322f2" CreationDate="2011-04-21T09:09:29.483" Comment="http://twitter.com/#!/StackGameDev/status/60993548165718016" />
  <row Id="24463" PostHistoryTypeId="2" PostId="11430" RevisionGUID="6af23795-8c53-4d75-87ca-b772cdb139fd" CreationDate="2011-04-21T09:40:40.347" UserId="5864" Text="Are your pixel pairs really covering the line points? You appear to have an off-by-one error in your algorithm implementation.&#xD;&#xA;&#xD;&#xA;I suggest plotting the aliased version of your curve and superposing the two images, maybe using two separate colour channels. You will probably see where the error lies. Or you could post some code for double checking." />
  <row Id="24464" PostHistoryTypeId="2" PostId="11431" RevisionGUID="fd04e038-0211-44b8-91c1-ff12b0bb8dc8" CreationDate="2011-04-21T09:50:07.190" UserId="364" Text="I'm in the end of finishing a little game for friends made with [RenPy][1] and I'm having a hard time finding a simple solution to do the following.&#xD;&#xA;&#xD;&#xA;At the start of the game, the player choose between a male or female character.&#xD;&#xA;The game is the same with both but some tests that depends on it but it's not important and it works.&#xD;&#xA;&#xD;&#xA;The problem is that I want to write :&#xD;&#xA;&#xD;&#xA;    show hero normal&#xD;&#xA;&#xD;&#xA;and get the image of the girl if it was the choice, or the image of the boy if he was choosen at the start.&#xD;&#xA;&#xD;&#xA;I started to write a python function to do this but it looks wrong because there seem to be enough ATL language to do this, even if I can't find a way. &#xD;&#xA;&#xD;&#xA;Any idea?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.renpy.org" />
  <row Id="24465" PostHistoryTypeId="1" PostId="11431" RevisionGUID="fd04e038-0211-44b8-91c1-ff12b0bb8dc8" CreationDate="2011-04-21T09:50:07.190" UserId="364" Text="RenPy : Get an image depending on variables" />
  <row Id="24466" PostHistoryTypeId="3" PostId="11431" RevisionGUID="fd04e038-0211-44b8-91c1-ff12b0bb8dc8" CreationDate="2011-04-21T09:50:07.190" UserId="364" Text="&lt;python&gt;&lt;renpy&gt;" />
  <row Id="24467" PostHistoryTypeId="2" PostId="11432" RevisionGUID="ca960c00-99c8-4691-962e-502296e0fdaa" CreationDate="2011-04-21T09:56:27.633" UserId="6870" Text="I'm trying to use SDL + OpenGL but I don't believe hardware acceleration is working because the framerate for around 18000 polys is about 24fps on a quad core machine but is a hopeless 1-2fps on an Intel Atom. Even the quad core starts to struggle when the poly count rises about this.&#xD;&#xA;&#xD;&#xA;I've checked my code over but I'm clearly missing something obvious. I've changed my SDL initialisation code to use the same code as in the SDL OpenGL test (http://svn.libsdl.org/tags/SDL/release-1.2.14/test/testgl.c) It reports that SDL_GL_ACCELERATED_VISUAL is 1 but that hw_available in SDL_VideoInfo is 0&#xD;&#xA;&#xD;&#xA;Also the vendor is reported correctly as Nvidia on both machines and accelerated apps such as Compiz and glxgears work fine.&#xD;&#xA;&#xD;&#xA;Any ideas of what to try?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="24468" PostHistoryTypeId="1" PostId="11432" RevisionGUID="ca960c00-99c8-4691-962e-502296e0fdaa" CreationDate="2011-04-21T09:56:27.633" UserId="6870" Text="Getting OpenGL hardware acceleration with SDL on Linux" />
  <row Id="24469" PostHistoryTypeId="3" PostId="11432" RevisionGUID="ca960c00-99c8-4691-962e-502296e0fdaa" CreationDate="2011-04-21T09:56:27.633" UserId="6870" Text="&lt;opengl&gt;&lt;c++&gt;&lt;sdl&gt;&lt;linux&gt;" />
  <row Id="24470" PostHistoryTypeId="5" PostId="11428" RevisionGUID="af1dd074-5d9d-4178-b24f-b717a7358c1c" CreationDate="2011-04-21T11:50:53.230" UserId="4947" Comment="deleted 226 characters in body" Text="You can use geometry shader and send just one point and normal for each rectangle. In geometry shader produce for example triangle strip. But if you need texture coordinates, it could be problem.&#xD;&#xA;&#xD;&#xA;// Deleted some Opengl info (now I have taken note that you are talking about XNA :) )" />
  <row Id="24471" PostHistoryTypeId="25" PostId="11432" RevisionGUID="f64d9f92-7828-4f19-975b-0f105afdabf0" CreationDate="2011-04-21T12:09:29.637" Comment="http://twitter.com/#!/StackGameDev/status/61038846342725632" />
  <row Id="24472" PostHistoryTypeId="2" PostId="11433" RevisionGUID="de737d27-a83b-4cd8-82cb-4e1ee570d836" CreationDate="2011-04-21T12:15:06.757" UserId="3599" Text="So, you want to animate the material transparency setting. You might want to use a different format if FBX does not support that, at least for this specific effect, maybe detach to a different mesh, and export as collada file instead for that effect. I don't know if collada is supported in XNA, nor if would support material opacity animation. But is by far a more complete format, allowing a lot more stuff to be ported from a scenery.&#xD;&#xA;&#xD;&#xA;I haven't really searched, but some stuff that pops, in case collada is not already supported by default (if not, they should add it) : [link 1][1], [link 2][2]&#xD;&#xA;&#xD;&#xA;Edit: Collada [plugin][3] for Max, info.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bunkernetz.wordpress.com/2011/03/09/loading-and-rendering-animated-collada-models-using-xna-4-0/&#xD;&#xA;  [2]: http://www.khronos.org/news/permalink/open-model-implementation-for-xna-to-load-collada-files&#xD;&#xA;  [3]: https://collada.org/mediawiki/index.php/ColladaMax" />
  <row Id="24473" PostHistoryTypeId="5" PostId="11433" RevisionGUID="473ac734-b2ab-4b47-87af-01bcc635f631" CreationDate="2011-04-21T12:24:03.847" UserId="3599" Comment="added 92 characters in body" Text="So, you want to animate the material transparency setting. You might want to use a different format if FBX does not support that, at least for this specific effect, maybe detach to a different mesh, and export as collada file instead for that effect. I don't know if collada is supported in XNA, nor if would support material opacity animation. But is by far a more complete format, allowing a lot more stuff to be ported from a scenery.&#xD;&#xA;&#xD;&#xA;I haven't really searched, but some stuff that pops, in case collada is not already supported by default (if not, they should add it) : [link 1][1], [link 2][2]&#xD;&#xA;&#xD;&#xA;Edit: Collada [plugin][3] for Max, info. You can try also with [this][4] other one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bunkernetz.wordpress.com/2011/03/09/loading-and-rendering-animated-collada-models-using-xna-4-0/&#xD;&#xA;  [2]: http://www.khronos.org/news/permalink/open-model-implementation-for-xna-to-load-collada-files&#xD;&#xA;  [3]: https://collada.org/mediawiki/index.php/ColladaMax&#xD;&#xA;  [4]: http://www.opencollada.org/download.html" />
  <row Id="24474" PostHistoryTypeId="2" PostId="11434" RevisionGUID="4477681c-fcdd-4617-a1fc-c5e19ba5c916" CreationDate="2011-04-21T12:53:52.373" UserId="6873" Text="Which C runtime is the plugin DLL built with? If you use the 'DLL' runtime (Multithreaded DLL, I think it's called; I don't have Visual C++ in front of me), you'll also need the matching CRT distributable installed on the target machine (you're building a DLL which references the DLL version of the C runtime, in other words). If you use the non-DLL runtime (just called Multithreaded), then the C runtime will be statically linked to your DLL (as such the plugin DLL will be bigger but won't have the CRT DLL dependency)." />
  <row Id="24475" PostHistoryTypeId="5" PostId="11432" RevisionGUID="1ce11d8c-3995-4dca-99d1-0e1a5fdd4e7d" CreationDate="2011-04-21T13:10:00.340" UserId="6870" Comment="Changed word 'about' to 'above' in first paragraph" Text="I'm trying to use SDL + OpenGL but I don't believe hardware acceleration is working because the framerate for around 18000 polys is about 24fps on a quad core machine but is a hopeless 1-2fps on an Intel Atom. Even the quad core starts to struggle when the poly count rises above this.&#xD;&#xA;&#xD;&#xA;I've checked my code over but I'm clearly missing something obvious. I've changed my SDL initialisation code to use the same code as in the SDL OpenGL test (http://svn.libsdl.org/tags/SDL/release-1.2.14/test/testgl.c) It reports that SDL_GL_ACCELERATED_VISUAL is 1 but that hw_available in SDL_VideoInfo is 0&#xD;&#xA;&#xD;&#xA;Also the vendor is reported correctly as Nvidia on both machines and accelerated apps such as Compiz and glxgears work fine.&#xD;&#xA;&#xD;&#xA;Any ideas of what to try?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="24476" PostHistoryTypeId="2" PostId="11435" RevisionGUID="d402c987-39ae-4eab-8eff-e74a6d57b365" CreationDate="2011-04-21T13:54:16.167" UserId="5398" Text="I remember this Allegro game: [Cupid][1], from SpeedHack 2002. It contains an implementation for ropes that collide with the scenery. See PhysParticles and HeartTrails classes in heart_tails.cpp file in its [source code][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.talula.demon.co.uk/cupid/&#xD;&#xA;  [2]: http://www.talula.demon.co.uk/cupid/cupid_src.zip" />
  <row Id="24477" PostHistoryTypeId="2" PostId="11436" RevisionGUID="b7d26772-1642-4f1f-9682-fa490da32f30" CreationDate="2011-04-21T13:57:04.493" UserId="-1" Text="" />
  <row Id="24478" PostHistoryTypeId="2" PostId="11437" RevisionGUID="0dbbd558-842f-4ce6-97fb-a09fa563aeb6" CreationDate="2011-04-21T13:57:04.493" UserId="-1" Text="" />
  <row Id="24479" PostHistoryTypeId="2" PostId="11438" RevisionGUID="1f482bd4-d074-45eb-8b90-f6458412a110" CreationDate="2011-04-21T14:07:34.460" UserId="4508" Text="i'm trying to learn about **vertex array** and **vertex buffer object**, but i don't understand the differences in term of:&#xD;&#xA;&#xD;&#xA; - case-of-use (static geomerty like terrains, geometry that change every frame like particle systems, etc)&#xD;&#xA; - performance&#xD;&#xA; - portability (old graphics card, consolle, devices like android or iphone, etc)&#xD;&#xA;&#xD;&#xA;some clarifications?" />
  <row Id="24480" PostHistoryTypeId="1" PostId="11438" RevisionGUID="1f482bd4-d074-45eb-8b90-f6458412a110" CreationDate="2011-04-21T14:07:34.460" UserId="4508" Text="when to use vertex array and when to use vbo" />
  <row Id="24481" PostHistoryTypeId="3" PostId="11438" RevisionGUID="1f482bd4-d074-45eb-8b90-f6458412a110" CreationDate="2011-04-21T14:07:34.460" UserId="4508" Text="&lt;opengl&gt;&lt;api&gt;" />
  <row Id="24482" PostHistoryTypeId="2" PostId="11439" RevisionGUID="d808b9bc-3db1-4565-b616-d2a1171d335d" CreationDate="2011-04-21T14:08:22.920" UserId="-1" Text="" />
  <row Id="24483" PostHistoryTypeId="2" PostId="11440" RevisionGUID="2f8b45ea-6aa5-41aa-874b-852d0b712a7d" CreationDate="2011-04-21T14:08:22.920" UserId="-1" Text="" />
  <row Id="24487" PostHistoryTypeId="2" PostId="11442" RevisionGUID="cacaf408-d836-4e9d-86c2-2662c5f1f32d" CreationDate="2011-04-21T14:24:33.033" UserId="4410" Text="A quick Google threw this up [here][1]. A demo, description and code (in Flash) using Box2D to implement a simple rope. The rope collides with itself and the block at the top of the scene.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.emanueleferonato.com/2009/10/05/basic-box2d-rope/" />
  <row Id="24490" PostHistoryTypeId="6" PostId="1811" RevisionGUID="530af115-5b72-4b85-aca8-5e5e2485d185" CreationDate="2011-04-21T14:58:00.393" UserId="3588" Comment="I ponder about the feasibility of a &quot;naming&quot; tag, but we don't have all too many questions on the subject. That said, this question isn't so much about AI. Also correcting the formerly adverbial tag. ♪" Text="&lt;difficulty&gt;" />
  <row Id="24491" PostHistoryTypeId="24" PostId="1811" RevisionGUID="530af115-5b72-4b85-aca8-5e5e2485d185" CreationDate="2011-04-21T14:58:00.393" Comment="Proposed by 3588 approved by 14 edit id of 367" />
  <row Id="24492" PostHistoryTypeId="5" PostId="984" RevisionGUID="3ddfd014-e6e5-4560-aecb-8e5bfd5ad5c9" CreationDate="2011-04-21T14:58:04.667" UserId="3588" Comment="While difficultly is indeed a word, this is demanding for the adjective, not the adverb. Fixed it and rephrased the question a bit smoother. ♪" Text="How is game difficulty typically tested or balanced so that there's a steady progression of difficulty; how do I ensure that no level is too difficult or too easy for its point in the game?&#xD;&#xA;&#xD;&#xA;Are play testers of various skills brought in, or a random sampling of people? What considerations are/should be taken into account during the actual level design process?" />
  <row Id="24493" PostHistoryTypeId="4" PostId="984" RevisionGUID="3ddfd014-e6e5-4560-aecb-8e5bfd5ad5c9" CreationDate="2011-04-21T14:58:04.667" UserId="3588" Comment="While difficultly is indeed a word, this is demanding for the adjective, not the adverb. Fixed it and rephrased the question a bit smoother. ♪" Text="How is game difficulty tested/balanced?" />
  <row Id="24494" PostHistoryTypeId="6" PostId="984" RevisionGUID="3ddfd014-e6e5-4560-aecb-8e5bfd5ad5c9" CreationDate="2011-04-21T14:58:04.667" UserId="3588" Comment="While difficultly is indeed a word, this is demanding for the adjective, not the adverb. Fixed it and rephrased the question a bit smoother. ♪" Text="&lt;game-design&gt;&lt;testing&gt;&lt;balance&gt;&lt;difficulty&gt;" />
  <row Id="24495" PostHistoryTypeId="24" PostId="984" RevisionGUID="3ddfd014-e6e5-4560-aecb-8e5bfd5ad5c9" CreationDate="2011-04-21T14:58:04.667" Comment="Proposed by 3588 approved by 14 edit id of 366" />
  <row Id="24496" PostHistoryTypeId="5" PostId="11436" RevisionGUID="862fe075-f690-41ff-839e-39c621314caf" CreationDate="2011-04-21T14:58:07.570" UserId="3588" Comment="added 473 characters in body" Text="The most common aspect ratios that games will deal with are 4:3 (standard definition television and computer monitors) and 16:9 (wide-screen television and computer monitors).&#xD;&#xA;&#xD;&#xA;This tag specifically refers to screen aspect ratio, not for aspect ratio used for in-game objects. While [tag:resolution] questions deal more often with scale, differences in aspect ratio actually figure into completely different screen real-estate, which has a much different set of problems." />
  <row Id="24497" PostHistoryTypeId="24" PostId="11436" RevisionGUID="862fe075-f690-41ff-839e-39c621314caf" CreationDate="2011-04-21T14:58:07.570" Comment="Proposed by 3588 approved by 14 edit id of 368" />
  <row Id="24498" PostHistoryTypeId="5" PostId="11437" RevisionGUID="e4360bd0-d97f-4f7e-8a7e-b7edb6a6b0ed" CreationDate="2011-04-21T14:58:11.720" UserId="3588" Comment="added 96 characters in body" Text="The ratio of the dimensions of a screen resolution. Always listed as the longer dimension first." />
  <row Id="24499" PostHistoryTypeId="24" PostId="11437" RevisionGUID="e4360bd0-d97f-4f7e-8a7e-b7edb6a6b0ed" CreationDate="2011-04-21T14:58:11.720" Comment="Proposed by 3588 approved by 14 edit id of 369" />
  <row Id="24500" PostHistoryTypeId="5" PostId="11421" RevisionGUID="e05c5b31-7055-45c4-b63e-01dc8e52db98" CreationDate="2011-04-21T14:58:17.553" UserId="6865" Comment="added 652 characters in body" Text="[Blender][1] is extremely popular among enthusiasts and has started to be taken seriously in production too. It has been used in the movie [2012][2] and numerous commercials. It is now maintained by [Blender Foundation][3], which is a non-profit organization. Blender Foundation frequently undertakes development of challenging and high quality [open source movies][4] which allows accelerated development of Blender.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/&#xD;&#xA;  [2]: http://www.blendernation.com/2009/11/16/2012-uses-bullet/&#xD;&#xA;  [3]: http://www.blender.org/blenderorg/blender-foundation/&#xD;&#xA;  [4]: http://www.blender.org/features-gallery/blender-open-projects/" />
  <row Id="24501" PostHistoryTypeId="24" PostId="11421" RevisionGUID="e05c5b31-7055-45c4-b63e-01dc8e52db98" CreationDate="2011-04-21T14:58:17.553" Comment="Proposed by 6865 approved by 14 edit id of 364" />
  <row Id="24502" PostHistoryTypeId="5" PostId="11422" RevisionGUID="ce68baec-dcad-4054-b90d-ec4407ff6697" CreationDate="2011-04-21T14:58:21.000" UserId="6865" Comment="added 124 characters in body" Text="Blender is an open source 3D modelling software with built-in game engine, Bullet physics engine and fluid animation engine." />
  <row Id="24503" PostHistoryTypeId="24" PostId="11422" RevisionGUID="ce68baec-dcad-4054-b90d-ec4407ff6697" CreationDate="2011-04-21T14:58:21.000" Comment="Proposed by 6865 approved by 14 edit id of 365" />
  <row Id="24504" PostHistoryTypeId="5" PostId="11439" RevisionGUID="08f44fa0-4943-4a00-8d19-1e0b97dd1545" CreationDate="2011-04-21T14:58:23.543" UserId="3588" Comment="added 942 characters in body" Text="Shorthand for **Player versus Player**, **PvP** is a very common element in multiplayer games to add a competitive aspect. It may be the main focus of the game, or it could be an optional side attraction. Because of the nature of PvP, it is not uncommon for MMOs that are not 100% PvP to allow players to set whether or not they participate in PvP.&#xD;&#xA;&#xD;&#xA;In some games like *World of Warcraft*, players run a completely different set of stats than the computer entities, thus PvP has great amounts of differences in flow compared to PvE. Other games like *Pokémon* will have player and computer opponents possess the same potential for stats and abilities, which means that PvP's difference instead boils down ot the meta-game.&#xD;&#xA;&#xD;&#xA;Use this tag when you are asking a question that relates to the PvP gameplay of your project - such as how to properly balance abilities or strategies in making the experience enjoyable for both winners and losers." />
  <row Id="24505" PostHistoryTypeId="24" PostId="11439" RevisionGUID="08f44fa0-4943-4a00-8d19-1e0b97dd1545" CreationDate="2011-04-21T14:58:23.543" Comment="Proposed by 3588 approved by 14 edit id of 370" />
  <row Id="24506" PostHistoryTypeId="5" PostId="11440" RevisionGUID="e657a84b-8cb9-418b-8212-77b8359f6a9e" CreationDate="2011-04-21T14:58:24.650" UserId="3588" Comment="added 124 characters in body" Text="Multiplayer gameplay in which players are pitted against each other, rather than against a common computer-controlled enemy." />
  <row Id="24507" PostHistoryTypeId="24" PostId="11440" RevisionGUID="e657a84b-8cb9-418b-8212-77b8359f6a9e" CreationDate="2011-04-21T14:58:24.650" Comment="Proposed by 3588 approved by 14 edit id of 371" />
  <row Id="24508" PostHistoryTypeId="5" PostId="11432" RevisionGUID="a8b60953-d200-4d8d-8da0-bfc3b02df236" CreationDate="2011-04-21T15:01:47.113" UserId="370" Comment="added 16 characters in body" Text="I'm trying to use SDL + OpenGL but I don't believe hardware acceleration is working because the framerate for around 18000 polys is about 24fps on a quad core machine but is a hopeless 1-2fps on an Intel Atom. Even the quad core starts to struggle when the poly count rises above this.&#xD;&#xA;&#xD;&#xA;I've checked my code over but I'm clearly missing something obvious. I've changed my SDL initialisation code to use the same code as in the [SDL OpenGL test][1]. It reports that SDL_GL_ACCELERATED_VISUAL is 1 but that hw_available in SDL_VideoInfo is 0&#xD;&#xA;&#xD;&#xA;Also the vendor is reported correctly as Nvidia on both machines and accelerated apps such as Compiz and glxgears work fine.&#xD;&#xA;&#xD;&#xA;Any ideas of what to try?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://svn.libsdl.org/tags/SDL/release-1.2.14/test/testgl.c" />
  <row Id="24509" PostHistoryTypeId="25" PostId="11438" RevisionGUID="100cf37f-6915-4fe0-9fa9-3bd0bde6d5dc" CreationDate="2011-04-21T15:09:30.097" Comment="http://twitter.com/#!/StackGameDev/status/61084147074076672" />
  <row Id="24510" PostHistoryTypeId="2" PostId="11443" RevisionGUID="80e3c903-7790-4ba5-906f-1587049086c8" CreationDate="2011-04-21T15:16:58.217" UserId="6835" Text="Note sure how much this question belongs to this forum so please redirect me if necessary.&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA;&#xD;&#xA;1. Can 3d Max script used/written to export opacity value of an mesh (material) to a file ?&#xD;&#xA;2. better yet, could script export opacity values for animated mesh(es) for each keyframe ??&#xD;&#xA;&#xD;&#xA;This is basically extension to my previous question: http://gamedev.stackexchange.com/questions/11413/fbx-mesh-animation-opacity-export" />
  <row Id="24511" PostHistoryTypeId="1" PostId="11443" RevisionGUID="80e3c903-7790-4ba5-906f-1587049086c8" CreationDate="2011-04-21T15:16:58.217" UserId="6835" Text="3d Max script for exporting opacity" />
  <row Id="24512" PostHistoryTypeId="3" PostId="11443" RevisionGUID="80e3c903-7790-4ba5-906f-1587049086c8" CreationDate="2011-04-21T15:16:58.217" UserId="6835" Text="&lt;scripting&gt;&lt;3dsmax&gt;" />
  <row Id="24513" PostHistoryTypeId="2" PostId="11444" RevisionGUID="6bb76dc5-269f-49cb-8b26-c1ebe5e104b7" CreationDate="2011-04-21T15:17:37.827" UserId="5259" Text="If you are using glBegin()/glEnd() in your code, especially if setting textures and states redundantly between frames (i.e., draw with texture 1, then 2, then 1, then 2, as opposed to 1,1,2,2), you probably are incurring driver overhead. Especially this is the case if you are noticing that a slow processor is chugging while it still has a good card. Using glDrawArrays or similar usually has *much* better performance.&#xD;&#xA;&#xD;&#xA;Without a full code listing, though, there really isn't a way to know for sure. SDL is a pretty thin wrapper, so unless you are doing something really weird I wouldn't expect an error. Also, what cards are being used?" />
  <row Id="24514" PostHistoryTypeId="2" PostId="11445" RevisionGUID="779ece88-a565-4cf5-8bdd-c35428c461d2" CreationDate="2011-04-21T15:28:46.640" UserId="5259" Text="[Here][1] is a good overview of the calling semantics.&#xD;&#xA;&#xD;&#xA;[Here][2] here is another good overview of performance issues; in it we see that VBOs are more performant than arrays.&#xD;&#xA;&#xD;&#xA;The reason we prefer VBOs is that the data is loaded onto the card, and so you don't have to transfer it every frame. Depending on the type of VBO created, you can give the graphics driver hints on the usage (write-many, read-many vs. write-many, never-read, etc).&#xD;&#xA;&#xD;&#xA;VBOs are really good for static geometry like terrain that you don't expect to change, or for instanced geometry.&#xD;&#xA;&#xD;&#xA;Vertex arrays are good for data that changes frequently but that also is read by the host machine--so, for directly rendering data that is being manipulated (laser rangefinder data buffers, for example, are where I've used them) frequently. If you can get away with never reading the data on the host device (so, just pushing it out onto the card), VBOs in write-only mode are a good option.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ezekiel.vancouver.wsu.edu/~cs442/lectures/vbo/vbo.pdf&#xD;&#xA;  [2]: http://developer.amd.com/media/gpu_assets/PerformanceTuning.pdf" />
  <row Id="24515" PostHistoryTypeId="5" PostId="11443" RevisionGUID="15dbfc45-137c-42a5-96c5-e29f6d9c5884" CreationDate="2011-04-21T15:29:04.863" UserId="6835" Comment="added 3 characters in body" Text="Note sure how much this question belongs to this forum so please redirect me if necessary.&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA;&#xD;&#xA;1. Can 3d Max script be used/written to export opacity value of an mesh (material) to a file ?&#xD;&#xA;2. better yet, could script export opacity values for animated mesh(es) for each keyframe ??&#xD;&#xA;&#xD;&#xA;This is basically extension to my previous question: http://gamedev.stackexchange.com/questions/11413/fbx-mesh-animation-opacity-export" />
  <row Id="24517" PostHistoryTypeId="5" PostId="11445" RevisionGUID="d515704f-ed56-4c19-aff0-039b2a88e5d5" CreationDate="2011-04-21T15:38:20.857" UserId="5259" Comment="added 418 characters in body; added 13 characters in body" Text="[Here][1] is a decent writeup about VBOs.&#xD;&#xA;&#xD;&#xA;**Performance**&#xD;&#xA;&#xD;&#xA;[Here][2] is a good overview of the calling semantics.&#xD;&#xA;&#xD;&#xA;[Here][3] here is another good overview of performance issues; in it we see that VBOs are more performant than arrays.&#xD;&#xA;&#xD;&#xA;The reason we prefer VBOs is that the data is loaded onto the card, and so you don't have to transfer it every frame. Depending on the type of VBO created, you can give the graphics driver hints on the usage (write-many, read-many vs. write-many, never-read, etc).&#xD;&#xA;&#xD;&#xA;**Usage**&#xD;&#xA;&#xD;&#xA;VBOs are really good for static geometry like terrain that you don't expect to change, or for instanced geometry.&#xD;&#xA;&#xD;&#xA;Vertex arrays are good for data that changes frequently but that also is read by the host machine--so, for directly rendering data that is being manipulated (laser rangefinder data buffers, for example, are where I've used them) frequently. If you can get away with never reading the data on the host device (so, just pushing it out onto the card), VBOs in write-only mode are a good option.&#xD;&#xA;&#xD;&#xA;**Portability**&#xD;&#xA;&#xD;&#xA;*Vertex Arrays*&#xD;&#xA;These are available in OpenGL prior to 3.0, deprecated in 3.0, and gone in 3.1+.&#xD;&#xA;OpenGL ES supports them (OpenGL ES 2 does not).&#xD;&#xA;&#xD;&#xA;*VBOs*&#xD;&#xA;These are available after OpenGL 1.5.&#xD;&#xA;These are the only way to store geometry data in OpenGL ES 2 (and so, WebGL).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/wiki/Vertex_Buffer_Objects&#xD;&#xA;  [2]: http://ezekiel.vancouver.wsu.edu/~cs442/lectures/vbo/vbo.pdf&#xD;&#xA;  [3]: http://developer.amd.com/media/gpu_assets/PerformanceTuning.pdf" />
  <row Id="24518" PostHistoryTypeId="2" PostId="11446" RevisionGUID="304cbd38-9ec8-4235-beab-d9bbfda8b731" CreationDate="2011-04-21T15:46:05.403" UserId="6836" Text="I have two lists which work with an XML file which holds questions and answers. At the moment the project displays all the questions at the same time so they &quot;flicker&quot; on the screen and iterate between each item in the list.&#xD;&#xA;&#xD;&#xA;Whats the easiest way (coding) to pause the random generated list on any particular questions?&#xD;&#xA;&#xD;&#xA;Question class:    &#xD;&#xA;    &#xD;&#xA;     class question&#xD;&#xA;    {&#xD;&#xA;        public string questionString;&#xD;&#xA;        public string apple;&#xD;&#xA;        public string pear;&#xD;&#xA;        public string orange;&#xD;&#xA;&#xD;&#xA;        //the ? indicate the int can be nullable so it can accept the string item&#xD;&#xA;        int? correctAnswer;&#xD;&#xA;&#xD;&#xA;        public question(string newquestionString)&#xD;&#xA;        {&#xD;&#xA;            parseQuestion(newquestionString);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void parseQuestion(string newquestionString)&#xD;&#xA;        {&#xD;&#xA;            List&lt;string&gt; questionComponents = newquestionString.Split('|').ToList&lt;string&gt;();&#xD;&#xA;&#xD;&#xA;            questionString = questionComponents[0];&#xD;&#xA;            apple = questionComponents[1];&#xD;&#xA;            pear = questionComponents[2];&#xD;&#xA;            orange = questionComponents[3];&#xD;&#xA;&#xD;&#xA;            correctAnswer = Int32.Parse(questionComponents[4]);&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;In Game1:&#xD;&#xA;&#xD;&#xA;    Random q = new Random();&#xD;&#xA;            int i = q.Next(questions.Count);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;            spriteBatch.DrawString(myfont, questions[i], new Vector2(100 + 100 *i, 100), Color.Black);&#xD;&#xA;            spriteBatch.DrawString(myfont, myQuestions[i].questionString, new Vector2(100 + 100, 100), Color.Black);&#xD;&#xA;            spriteBatch.DrawString(myfont, myQuestions[i].apple, new Vector2(100 + 100, 200), Color.Black);&#xD;&#xA;            spriteBatch.DrawString(myfont, myQuestions[i].orange, new Vector2(100 + 100, 300), Color.Black);&#xD;&#xA;            spriteBatch.DrawString(myfont, myQuestions[i].pear, new Vector2(100 + 100, 400), Color.Black);&#xD;&#xA;            spriteBatch.End();" />
  <row Id="24519" PostHistoryTypeId="1" PostId="11446" RevisionGUID="304cbd38-9ec8-4235-beab-d9bbfda8b731" CreationDate="2011-04-21T15:46:05.403" UserId="6836" Text="Simple Update loop to show questions one at a time." />
  <row Id="24520" PostHistoryTypeId="3" PostId="11446" RevisionGUID="304cbd38-9ec8-4235-beab-d9bbfda8b731" CreationDate="2011-04-21T15:46:05.403" UserId="6836" Text="&lt;xna&gt;&lt;xml&gt;" />
  <row Id="24521" PostHistoryTypeId="2" PostId="11447" RevisionGUID="2527ce39-8cbd-44f8-bb97-b5eb44e6266d" CreationDate="2011-04-21T16:05:00.800" UserId="5224" Text="The update and draw loops run roughly 60 times per second (30 on WPF, and it also depends on how much your computer is doing in each loop and how fast the computer is). To update the questions slower you need to keep track of the time passed. You can do that as following&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    float elapsedSeconds = 0; &#xD;&#xA;    public void Update(GameTime gameTime){&#xD;&#xA;         elapsedSeconds += (float)gameTime.ElapsedGameTime.TotalSeconds;&#xD;&#xA;         if(elapsedSeconds &gt; TimeIWantAQuestionToDisplay)&#xD;&#xA;         {&#xD;&#xA;           elapsedSeconds = 0;&#xD;&#xA;           question = q.Next(questions.Count);&#xD;&#xA;         }  &#xD;&#xA;    }" />
  <row Id="24522" PostHistoryTypeId="2" PostId="11448" RevisionGUID="fd03ad21-5f74-4621-887c-a6e15f8be261" CreationDate="2011-04-21T16:09:47.200" UserId="-1" Text="" />
  <row Id="24523" PostHistoryTypeId="2" PostId="11449" RevisionGUID="604462b5-1a21-4d6d-9f04-ba4fd059edc3" CreationDate="2011-04-21T16:09:47.200" UserId="-1" Text="" />
  <row Id="24527" PostHistoryTypeId="2" PostId="11451" RevisionGUID="b1b722e5-fcd6-4f7f-94fe-9a9cb8c00305" CreationDate="2011-04-21T16:33:50.790" UserId="-1" Text="" />
  <row Id="24528" PostHistoryTypeId="2" PostId="11452" RevisionGUID="c67719ff-1e73-4596-8b9e-23deb84509e9" CreationDate="2011-04-21T16:33:50.790" UserId="-1" Text="" />
  <row Id="24530" PostHistoryTypeId="5" PostId="11414" RevisionGUID="dfdf3d97-a823-4c2e-a420-4157ebb39a00" CreationDate="2011-04-21T16:40:51.090" UserId="3588" Comment="Added the rope-physics tag, I honestly am surprised to see rope questions show up as often as they do. ♪" Text="I'm wanting to create a rope that can collide with objects like in the following youtube video:&#xD;&#xA;&#xD;&#xA;[2D Game Physics Rope][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=fpIrHU8r2UM&amp;feature=related &quot;2D Game Physics Rope&quot;&#xD;&#xA;&#xD;&#xA;I'm thinking that you implement the verlet integration which uses points and connects these points with lines. I'm trying to figure out what type of collision detection you would apply to the rope to get the effect in the video. &#xD;&#xA;&#xD;&#xA;I'm thinking you would have to do some cd to each point. I would like to use box2D, so I'm wondering would making each point a rigid body work? Any advice would be appreciated. " />
  <row Id="24531" PostHistoryTypeId="6" PostId="11414" RevisionGUID="dfdf3d97-a823-4c2e-a420-4157ebb39a00" CreationDate="2011-04-21T16:40:51.090" UserId="3588" Comment="Added the rope-physics tag, I honestly am surprised to see rope questions show up as often as they do. ♪" Text="&lt;collision-detection&gt;&lt;box2d&gt;&lt;rope-physics&gt;" />
  <row Id="24532" PostHistoryTypeId="24" PostId="11414" RevisionGUID="dfdf3d97-a823-4c2e-a420-4157ebb39a00" CreationDate="2011-04-21T16:40:51.090" Comment="Proposed by 3588 approved by 51 edit id of 374" />
  <row Id="24533" PostHistoryTypeId="5" PostId="11449" RevisionGUID="2a7af2bd-fc26-491e-8f06-ac1381903f80" CreationDate="2011-04-21T16:40:53.760" UserId="3588" Comment="added 87 characters in body" Text="The level of challenge in the game, as determined by the relative ease of the gameplay." />
  <row Id="24534" PostHistoryTypeId="24" PostId="11449" RevisionGUID="2a7af2bd-fc26-491e-8f06-ac1381903f80" CreationDate="2011-04-21T16:40:53.760" Comment="Proposed by 3588 approved by 51 edit id of 373" />
  <row Id="24535" PostHistoryTypeId="5" PostId="11448" RevisionGUID="bb3c31a9-eb8d-41a0-b8a3-366780adb040" CreationDate="2011-04-21T16:40:55.677" UserId="3588" Comment="added 764 characters in body" Text="Some players enjoy exciting challenges and will stand firm even in the harshest of defeats. Some players lose enjoyment when a game is too difficult, while others lose enjoyment when it is not difficult enough. The breadth of skill levels and preferences presents a very wide variety of strategies on how to approach difficulty. &#xD;&#xA;&#xD;&#xA;Difficulty comes whether or not there are seperate levels of difficulty in the game, as well as whether or not the challenge level is directly configured by the player. Use this tag when you have concerns about the difficulty of your game, with topics such as the differences between difficulty levels, what triggers or performance to use when scaling difficulty, or how to balance the difficulty so that it never gets *too* hard. " />
  <row Id="24536" PostHistoryTypeId="24" PostId="11448" RevisionGUID="bb3c31a9-eb8d-41a0-b8a3-366780adb040" CreationDate="2011-04-21T16:40:55.677" Comment="Proposed by 3588 approved by 51 edit id of 372" />
  <row Id="24537" PostHistoryTypeId="5" PostId="11452" RevisionGUID="9ba2013d-c16c-4fac-91e9-c010550f44ab" CreationDate="2011-04-21T16:41:01.030" UserId="3588" Comment="added 181 characters in body" Text="Ropes, chains, vines, rubber fishing lines, and other manners of long-bodied objects that can twist or wrap around objects in the game world, and the physics of how they move about." />
  <row Id="24538" PostHistoryTypeId="24" PostId="11452" RevisionGUID="9ba2013d-c16c-4fac-91e9-c010550f44ab" CreationDate="2011-04-21T16:41:01.030" Comment="Proposed by 3588 approved by 51 edit id of 376" />
  <row Id="24539" PostHistoryTypeId="5" PostId="11451" RevisionGUID="16579743-86cb-4749-8324-06c431b83542" CreationDate="2011-04-21T16:41:03.230" UserId="3588" Comment="added 1065 characters in body" Text="This tag is a subset of [tag:physics], and applies to the physical properties of ropes and other ropelike objects. It does not correspond to a specific branch, although a lot of the problems may seem similar to parts of fluid dynamics. &#xD;&#xA;&#xD;&#xA;Rope physics is significant as they present unique challenges to game development due to how different it can be handled compared to other objects. It doesn't have a rigid body shape like most game objects, it instead has a malleable shape that can wrap around other objects. More complexity can be introduced by adding tension and stress on a suspended rope bridge, or by simulating the gradual velocity of different segments of a swaying vine.&#xD;&#xA;&#xD;&#xA;Games use rope physics both for its artistic flavor and as crucial parts of the gameplay. It is most often seen in varying forms of swinging around, be it from dangling chandeliers to grappling hooks. Use this tag when your question involves the properties of ropes in a game that adhere to these kinds of principles, moreso than simple &quot;line connecting entity A to entity B&quot;." />
  <row Id="24540" PostHistoryTypeId="24" PostId="11451" RevisionGUID="16579743-86cb-4749-8324-06c431b83542" CreationDate="2011-04-21T16:41:03.230" Comment="Proposed by 3588 approved by 51 edit id of 375" />
  <row Id="24541" PostHistoryTypeId="2" PostId="11453" RevisionGUID="96713607-47e2-4666-8abf-3faf55df4b55" CreationDate="2011-04-21T16:49:18.367" UserId="51" Text="The property is `active`, not `activate`.  And you can try using &lt;a href=&quot;http://unity3d.com/support/documentation/ScriptReference/GameObject.SetActiveRecursively.html&quot;&gt;`SetActiveRecursively`&lt;/a&gt; if your game object has multiple child objects.  Just setting the active flag doesn't set the active flags of child objects." />
  <row Id="24543" PostHistoryTypeId="2" PostId="11454" RevisionGUID="d82600a1-96a7-4317-9026-6b7b3e87d85f" CreationDate="2011-04-21T17:03:25.680" UserId="6880" Text="ATL doesn't have an if statement at the moment. You can use DynamicDisplayable&#xD;&#xA;for this - the code looks like:&#xD;&#xA;&#xD;&#xA;    image hero normal = ConditionSwitch(&#xD;&#xA;        &quot;male&quot;, &quot;male_normal.png&quot;,&#xD;&#xA;        &quot;True&quot;, &quot;female_normal.png&quot;)&#xD;&#xA;&#xD;&#xA;I've added an ATL if statement to the list of things I'll add to Ren'Py in the future, since it really should be there." />
  <row Id="24544" PostHistoryTypeId="2" PostId="11455" RevisionGUID="837a633e-1bb9-4c96-910e-62b27d3248fb" CreationDate="2011-04-21T17:23:45.267" UserId="6873" Text="Originally Box2D had a rope bridge demo made of thin boxes joined with point-to-point constraints; that would be a fine place to start (I don't know if it still ships with that demo, but it would be straightforward to recreate).&#xD;&#xA;&#xD;&#xA;It's easy enough to implement rope as particles with distance constraints independently of a rigid body simulator (as you mention, using a Verlet integration and constraint solving scheme like the one described in this article: http://www.gamasutra.com/resource_guide/20030121/jacobson_pfv.htm), but if you want rigid bodies to react to your rope (like in the video, with the dangling box) then it gets much more complicated. I'd start with a comprehensive suite of tools like Box2D and work backwards rather then try and build up from particles." />
  <row Id="24545" PostHistoryTypeId="2" PostId="11456" RevisionGUID="ed2b36f4-2436-492e-9b33-0674615845e2" CreationDate="2011-04-21T17:57:13.247" UserId="6867" Text="I am new to game development, having only developed a few games before, in 2D space, but with 3D rendering.&#xD;&#xA;&#xD;&#xA;I have implemented instancing before, but this is only my 2nd time doing it. I have a question regarding instancing.&#xD;&#xA;&#xD;&#xA;To do instancing, I have a geometry buffer having a vertex declaration (for instance) 32 VertexPositionColor elements. This is because I have a few elements with 32 vertices in them.&#xD;&#xA;&#xD;&#xA;I am rendering all elements as linelists. However, there are some elements in the list that doesn't have 32 vertices. I would like to include these in the instancing render process too. &#xD;&#xA;&#xD;&#xA;So my final question is, what happens if I (for instance) fill out 8 of the vertices with their indexes, but then still send all the 32 vertices into the instancing shader? Is it possible?&#xD;&#xA;&#xD;&#xA;Is there a better approach to be able to instance all kinds of elements, with various vertex counts?" />
  <row Id="24546" PostHistoryTypeId="1" PostId="11456" RevisionGUID="ed2b36f4-2436-492e-9b33-0674615845e2" CreationDate="2011-04-21T17:57:13.247" UserId="6867" Text="Instancing with empty data, or varying vertex counts?" />
  <row Id="24547" PostHistoryTypeId="3" PostId="11456" RevisionGUID="ed2b36f4-2436-492e-9b33-0674615845e2" CreationDate="2011-04-21T17:57:13.247" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;directx&gt;&lt;hlsl&gt;" />
  <row Id="24548" PostHistoryTypeId="25" PostId="11446" RevisionGUID="13012115-e468-4687-bb90-d0c550a2f976" CreationDate="2011-04-21T18:09:30.467" Comment="http://twitter.com/#!/StackGameDev/status/61129447683788800" />
  <row Id="24549" PostHistoryTypeId="5" PostId="11456" RevisionGUID="5216ffcf-68df-4341-8332-5df852732443" CreationDate="2011-04-21T18:10:31.677" UserId="1198" Comment="deleted 13 characters in body" Text="I am new to game development, having only developed a few games before, in 2D space, but with 3D rendering.&#xD;&#xA;&#xD;&#xA;I have implemented instancing before, but this is only my 2nd time doing it. I have a question regarding instancing.&#xD;&#xA;&#xD;&#xA;To do instancing, I have a geometry buffer having a vertex declaration (for instance) 32 VertexPositionColor elements. This is because I have a few elements with 32 vertices in them.&#xD;&#xA;&#xD;&#xA;I am rendering all elements as linelists. However, there are some elements in the list that doesn't have 32 vertices. I would like to include these in the instancing render process too. &#xD;&#xA;&#xD;&#xA;So my final question is, what happens if I (for instance) fill out 8 of the vertices with their indexes, but then still send all the 32 vertices into the instancing shader? Is it possible?&#xD;&#xA;&#xD;&#xA;Is there a better approach to be able to instance all kinds of elements, with various vertex counts?" />
  <row Id="24550" PostHistoryTypeId="5" PostId="11209" RevisionGUID="039eb880-2cbe-4b4f-ba0f-96baa0086df7" CreationDate="2011-04-21T18:27:12.763" UserId="93" Comment="deleted 15 characters in body" Text="Frank Luna's books on DX9 and DX10 are really the only good books on Direct3D that I've seen. His DX11 book isn't due out until next year I think (it seems he had to find another publisher), but DX11 is close enough to DX10 as far as basic 3d graphics goes. &#xD;&#xA;&#xD;&#xA;The only thing I'll say is that the title is a little bit misleading because there's no actual game programming in there - it is purely a graphics programming book." />
  <row Id="24551" PostHistoryTypeId="2" PostId="11457" RevisionGUID="1ef4415b-8157-471e-85ce-9b72ecc0f1f9" CreationDate="2011-04-21T18:30:46.673" UserId="-1" Text="" />
  <row Id="24552" PostHistoryTypeId="2" PostId="11458" RevisionGUID="30b87f5c-6433-4b06-96e5-be94d85699f5" CreationDate="2011-04-21T18:30:46.673" UserId="-1" Text="" />
  <row Id="24554" PostHistoryTypeId="2" PostId="11459" RevisionGUID="f248c5d4-6c85-49b2-be14-c6a802f021b9" CreationDate="2011-04-21T19:03:38.567" UserId="6873" Text="Available OpenGL functionality is determined by the graphics hardware/driver revision; it is independent of installed developer tools.&#xD;&#xA;&#xD;&#xA;If you want to be super-safe, use your first version and test for GLEW_VERSION_1_4 too:&#xD;&#xA;&#xD;&#xA;if(GLEW_VERSION_1_4 || GLEW_SGIS_generate_mipmap)&#xD;&#xA;&#xD;&#xA;That will take care of the cases where either 1) the SGIS extension is reported by a driver/card that reports a GL version before the extension became part of the core, 2) where the GL version is sufficient but the SGIS extension is not reported (which I haven't seen in the wild, but I suppose it could happen) or 3) neither condition is met and you fall back to GLU. GL_GENERATE_MIPMAP_SGIS and GL_GENERATE_MIPMAP are the same, so it doesn't matter which one you use in your code (assuming one is available, so is the other; it all looks the same to the runtime).&#xD;&#xA;&#xD;&#xA;As to your other question: a difference in the setting for anisotropic filtering or anti-aliasing would be my guess." />
  <row Id="24555" PostHistoryTypeId="5" PostId="11446" RevisionGUID="a3a6945c-f157-4c17-a568-2f44e0916a2f" CreationDate="2011-04-21T19:15:41.267" UserId="1198" Comment="deleted 29 characters in body" Text="I have two lists which work with an XML file which holds questions and answers. At the moment the project displays all the questions at the same time so they &quot;flicker&quot; on the screen and iterate between each item in the list.&#xD;&#xA;&#xD;&#xA;Whats the easiest way (coding) to pause the random generated list on any particular questions?&#xD;&#xA;&#xD;&#xA;Question class:    &#xD;&#xA;    &#xD;&#xA;    class question&#xD;&#xA;    {&#xD;&#xA;        public string questionString;&#xD;&#xA;        public string apple;&#xD;&#xA;        public string pear;&#xD;&#xA;        public string orange;&#xD;&#xA;&#xD;&#xA;        //the ? indicate the int can be nullable so it can accept the string item&#xD;&#xA;        int? correctAnswer;&#xD;&#xA;&#xD;&#xA;        public question(string newquestionString)&#xD;&#xA;        {&#xD;&#xA;            parseQuestion(newquestionString);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void parseQuestion(string newquestionString)&#xD;&#xA;        {&#xD;&#xA;            List&lt;string&gt; questionComponents = newquestionString.Split('|').ToList&lt;string&gt;();&#xD;&#xA;&#xD;&#xA;            questionString = questionComponents[0];&#xD;&#xA;            apple = questionComponents[1];&#xD;&#xA;            pear = questionComponents[2];&#xD;&#xA;            orange = questionComponents[3];&#xD;&#xA;&#xD;&#xA;            correctAnswer = Int32.Parse(questionComponents[4]);&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;In Game1:&#xD;&#xA;&#xD;&#xA;        Random q = new Random();&#xD;&#xA;        int i = q.Next(questions.Count);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        spriteBatch.Begin();&#xD;&#xA;        spriteBatch.DrawString(myfont, questions[i], new Vector2(100 + 100 *i, 100), Color.Black);&#xD;&#xA;        spriteBatch.DrawString(myfont, myQuestions[i].questionString, new Vector2(100 + 100, 100), Color.Black);&#xD;&#xA;        spriteBatch.DrawString(myfont, myQuestions[i].apple, new Vector2(100 + 100, 200), Color.Black);&#xD;&#xA;        spriteBatch.DrawString(myfont, myQuestions[i].orange, new Vector2(100 + 100, 300), Color.Black);&#xD;&#xA;        spriteBatch.DrawString(myfont, myQuestions[i].pear, new Vector2(100 + 100, 400), Color.Black);&#xD;&#xA;        spriteBatch.End();" />
  <row Id="24556" PostHistoryTypeId="2" PostId="11460" RevisionGUID="73f21d35-e4d5-4ed0-b7cd-f7d2f49d23bc" CreationDate="2011-04-21T19:20:19.423" UserId="1198" Text="Does the code labeled &quot;Game1&quot; occur in the `Draw(GameTime gameTime)` method? If so, the problem looks as though you draw a different question each frame not that you need to draw slower. If you draw the same thing every frame, there should be no flicker; I would adjust the code like this:&#xD;&#xA;&#xD;&#xA;    // private class level variable&#xD;&#xA;    int currentQuestion = 0;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // in the Update(GameTime gameTime) method&#xD;&#xA;    if(userChoseAnswer) // check input and see if you should advance to the next question&#xD;&#xA;    {&#xD;&#xA;        Random q = new Random();&#xD;&#xA;        // might want to add code here to avoid showing &#xD;&#xA;        // questions already shown? unless that wont help your game&#xD;&#xA;        int i = q.Next(questions.Count);  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // in the Draw(GameTime gameTime) method&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    spriteBatch.DrawString(myfont, questions[currentQuestion], new Vector2(100 + 100 *i, 100), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].questionString, new Vector2(100 + 100, 100), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].apple, new Vector2(100 + 100, 200), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].orange, new Vector2(100 + 100, 300), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].pear, new Vector2(100 + 100, 400), Color.Black);&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24557" PostHistoryTypeId="2" PostId="11461" RevisionGUID="4f34a99c-73da-4297-aa35-a112357bbab9" CreationDate="2011-04-21T19:27:12.313" UserId="6882" Text="I've been looking into PowerVR textures, and have run into several textures that are apparently 2 bits per-pixel. This, frankly, boggles my mind. How does one get even half way decent color preservation when you only have 4 possible states per pi per pixel? I would love any resources out there that talk about the compression behind such a feat. Thanks!" />
  <row Id="24558" PostHistoryTypeId="1" PostId="11461" RevisionGUID="4f34a99c-73da-4297-aa35-a112357bbab9" CreationDate="2011-04-21T19:27:12.313" UserId="6882" Text="How on earth do you get decent color out of 2BPP?" />
  <row Id="24559" PostHistoryTypeId="3" PostId="11461" RevisionGUID="4f34a99c-73da-4297-aa35-a112357bbab9" CreationDate="2011-04-21T19:27:12.313" UserId="6882" Text="&lt;textures&gt;&lt;compression&gt;" />
  <row Id="24560" PostHistoryTypeId="2" PostId="11462" RevisionGUID="08035b75-baa1-43ff-a28f-54af4788cef4" CreationDate="2011-04-21T19:48:48.743" UserId="370" Text="Texture compression does not compress pixels.  It compresses blocks of pixels.  When an individual pixel is referenced, the GPU computes which block represents the pixel.  Then it processes the whole block to get the color of that pixel." />
  <row Id="24561" PostHistoryTypeId="5" PostId="11462" RevisionGUID="bc9e5f69-895c-4b54-8df2-fc66fe2dbdca" CreationDate="2011-04-21T20:12:24.783" UserId="370" Comment="added an example" Text="Texture compression does not compress pixels.  It compresses blocks of pixels.  When an individual pixel is referenced, the GPU computes which block represents the pixel.  Then it processes the whole block to get the color of that pixel.&#xD;&#xA;&#xD;&#xA;An example&#xD;&#xA;&#xD;&#xA;Lets assume the block size is 4x4 pixels on an RGB texture.  Uncompressed, each block consumes `4x4x3 = 48` bytes in texture memory.  &#xD;&#xA;Now the compression algorithm will calculate the average for each channel (RGB) and store it with the block ( 3 bytes).  Now lets give each pixel 3 bits to adjust the average so that the pixel is closer to its original color.  Thats another `4x4x3/8 = 6` bytes.  &#xD;&#xA;The total bytes used by this newly invented compressor is 9 bytes per block, a compression ratio of 18.75%.&#xD;&#xA;&#xD;&#xA;My mythical compressor uses 4.5 bpp.  That isn't as good as the 2 bpp you mentioned, but now you have rough idea on how 2 bbp might be achieved." />
  <row Id="24562" PostHistoryTypeId="5" PostId="11460" RevisionGUID="469fb19f-5117-4845-8269-1cb858fd4761" CreationDate="2011-04-21T20:13:21.350" UserId="1198" Comment="fixed a bug in my code :)" Text="Does the code labeled &quot;Game1&quot; occur in the `Draw(GameTime gameTime)` method? If so, the problem looks as though you draw a different question each frame not that you need to draw slower. If you draw the same thing every frame, there should be no flicker; I would adjust the code like this:&#xD;&#xA;&#xD;&#xA;    // private class level variable&#xD;&#xA;    int currentQuestion = 0;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // in the Update(GameTime gameTime) method&#xD;&#xA;    if(userChoseAnswer) // check input and see if you should advance to the next question&#xD;&#xA;    {&#xD;&#xA;        Random q = new Random();&#xD;&#xA;        // might want to add code here to avoid showing &#xD;&#xA;        // questions already shown? unless that wont help your game&#xD;&#xA;        currentQuestion = q.Next(questions.Count);  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // in the Draw(GameTime gameTime) method&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    spriteBatch.DrawString(myfont, questions[currentQuestion], new Vector2(100 + 100 *i, 100), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].questionString, new Vector2(100 + 100, 100), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].apple, new Vector2(100 + 100, 200), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].orange, new Vector2(100 + 100, 300), Color.Black);&#xD;&#xA;    spriteBatch.DrawString(myfont, myQuestions[currentQuestion].pear, new Vector2(100 + 100, 400), Color.Black);&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24563" PostHistoryTypeId="2" PostId="11463" RevisionGUID="cd68f237-c6d0-4229-b202-2331af7eabe8" CreationDate="2011-04-21T20:16:52.767" UserId="6042" Text="PVRTC 2BPP encoding, as introduced in [this paper][1] divides an image into 8x4-texel blocks, and compresses each block such that only two RGB colors are stored for each thirty-two texel block. &#xD;&#xA;&#xD;&#xA;None of the thirty-two texels stores a color of its own - each texel stores only information about how to blend between the two RGB colors of its 8x4-texel block.&#xD;&#xA;&#xD;&#xA;If the source image has an 8x4 texel block with a rainbow of 32 colors in it, PVRTC 2BPP compression will do a very poor job of maintaining its quality, because in PVRTC 2BPP each 8x4 texel block has only two RGB colors to blend with.&#xD;&#xA;&#xD;&#xA;  [1]: http://web.onetel.net.uk/~simonnihal/assorted3d/fenney03texcomp.pdf" />
  <row Id="24564" PostHistoryTypeId="2" PostId="11464" RevisionGUID="5e009554-1326-4bde-8960-b93f29087ee4" CreationDate="2011-04-21T20:19:50.630" UserId="6867" Text="Does it make sense to include an index by using DrawIndexedPrimitives, when using linelists performance wise? I could imagine it would be easy for the GPU to generate such indexes anyway." />
  <row Id="24565" PostHistoryTypeId="1" PostId="11464" RevisionGUID="5e009554-1326-4bde-8960-b93f29087ee4" CreationDate="2011-04-21T20:19:50.630" UserId="6867" Text="Does it make sense to include an index for linelists?" />
  <row Id="24566" PostHistoryTypeId="3" PostId="11464" RevisionGUID="5e009554-1326-4bde-8960-b93f29087ee4" CreationDate="2011-04-21T20:19:50.630" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;directx&gt;&lt;hlsl&gt;" />
  <row Id="24567" PostHistoryTypeId="2" PostId="11465" RevisionGUID="33bf56b6-742a-4aae-b783-27f7930a4d37" CreationDate="2011-04-21T20:29:51.670" UserId="2306" Text="Indexing provides two major benefits:&#xD;&#xA;&#xD;&#xA;1. Vertices are only transformed once. If you have two connected lines (consisting of a total of three vertices), an indexed draw will only call the vertex shader three times. Without indexing, you'll pass in four vertices (even though two of them will have the same coordinates), and the vertex shader will be called four times. Multiple this by a few million primitives...&#xD;&#xA;&#xD;&#xA;2. Memory. In the above example, your vertex buffer will only have to hold three vertices, and your index buffer will have three four indexes. You're trading the space required to store one of the vertices for the index list. If you're using a large vertex type (`VertexPositionNormalTexture`, for instance), this makes sense.&#xD;&#xA;&#xD;&#xA;If you use a 16-bit index buffer or non-trivial vertex types, your savings with indexing will most likely outweight the memory cost of the extra vertices (ie - a good thing).&#xD;&#xA;" />
  <row Id="24568" PostHistoryTypeId="5" PostId="11458" RevisionGUID="cc5f3e34-0686-44ea-ba29-6f0e2f158987" CreationDate="2011-04-21T20:47:36.423" UserId="3588" Comment="added 37 characters in body" Text="A 2D rendering of an object in space." />
  <row Id="24569" PostHistoryTypeId="24" PostId="11458" RevisionGUID="cc5f3e34-0686-44ea-ba29-6f0e2f158987" CreationDate="2011-04-21T20:47:36.423" Comment="Proposed by 3588 approved by 51 edit id of 378" />
  <row Id="24570" PostHistoryTypeId="5" PostId="11457" RevisionGUID="4862d790-f4cd-483d-9268-5b16c5de4fe8" CreationDate="2011-04-21T20:47:39.607" UserId="3588" Comment="added 381 characters in body" Text="Use this tag when your question deals with sprite assets in your game, whether you're using sprites in 2D or 3D. Questions can involve subjects such as the design and integration of sprites, setting display layers, and sprite manipulation. Use additional tags such as [tag:animation] and [tag:rendering] when appropriate.&#xD;&#xA;&#xD;&#xA;For questions about spritesheets, use [tag:spritesheet]." />
  <row Id="24571" PostHistoryTypeId="24" PostId="11457" RevisionGUID="4862d790-f4cd-483d-9268-5b16c5de4fe8" CreationDate="2011-04-21T20:47:39.607" Comment="Proposed by 3588 approved by 51 edit id of 377" />
  <row Id="24572" PostHistoryTypeId="5" PostId="11462" RevisionGUID="781cd8eb-93f7-4c14-8116-96e3d2e8bdfb" CreationDate="2011-04-21T20:57:01.280" UserId="370" Comment="update for pvrtc vs block compression" Text="Texture compression does not compress pixels.  It compresses blocks of pixels.  When an individual pixel is referenced, the GPU computes which block represents the pixel.  Then it processes the whole block to get the color of that pixel.&#xD;&#xA;&#xD;&#xA;An example&#xD;&#xA;&#xD;&#xA;Lets assume the block size is 4x4 pixels on an RGB texture.  Uncompressed, each block consumes `4x4x3 = 48` bytes in texture memory.  &#xD;&#xA;Now the compression algorithm will calculate the average for each channel (RGB) and store it with the block ( 3 bytes).  Now lets give each pixel 2 bits to adjust the average so that the pixel is closer to its original color.  Thats another `4x4x2x3/8 = 12` bytes.  &#xD;&#xA;The total bytes used by this newly invented compressor is 15 bytes per block, a compression ratio of 31.25%.&#xD;&#xA;&#xD;&#xA;My mythical compressor uses 7.5 bpp.  That isn't as good as the 2 bpp pvrtc can achieve, but now you have rough idea on how 2 bbp might be achieved.&#xD;&#xA;&#xD;&#xA;**update:**  &#xD;&#xA;I just looked at the [wikipedia page for pvrtc][1].  It looks like pvrtc doesn't use traditional block based compression.  [Here is paper][2] that describes the way block based compression works and how pvrtc differs.  Of particular note:  Block based filters can produce decent looking images using 4bpp (no alpha), whereas nvrtc can do so with 2bpp.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/PVRTC&#xD;&#xA;  [2]: http://web.onetel.net.uk/~simonnihal/assorted3d/fenney03texcomp.pdf" />
  <row Id="24573" PostHistoryTypeId="25" PostId="11461" RevisionGUID="2e13ade1-2148-4946-91d4-c7742dc73050" CreationDate="2011-04-21T21:09:30.750" Comment="http://twitter.com/#!/StackGameDev/status/61174746418655232" />
  <row Id="24574" PostHistoryTypeId="5" PostId="4178" RevisionGUID="2162e274-5c4e-4a63-934b-c93515f69e1f" CreationDate="2011-04-21T22:11:21.463" UserId="2345" Comment="deleted 252 characters in body" Text="You could overlay a simple glow effect texture with soft transparent edges.&#xD;&#xA;If you want lighting/shadows similar to what you may find in a 3d world you could do something like this: [http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/][1]. However, if you are new to HLSL, then that may be a little bit too much.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/" />
  <row Id="24575" PostHistoryTypeId="2" PostId="11466" RevisionGUID="d191a5ca-4ab6-4437-ac62-6160e31e3b34" CreationDate="2011-04-21T23:48:27.667" UserId="6886" Text="wkerslake is right, camera shakes appear to be more complex than you might think.&#xD;&#xA;&#xD;&#xA;When emulating a shaking camera you'd have to think about what type of camera (operator) you want to mimic. The weight of the camera affects inertia, eg. heavier cameras smooth out small 'random' movements. A camera operator on a rail or in a car adds additional noise.&#xD;&#xA;&#xD;&#xA;Using Perlin or Simplex noise is definitely an option, then it's all about finding the right balance between different noise ratios. But I found using interpolation between values is less computationally intensive and can be just as effective.&#xD;&#xA;&#xD;&#xA;A while ago, I've found a Maya script that seems to get a lot of things right. You could take a look at [that][1].&#xD;&#xA;&#xD;&#xA;Also, you might want to take a look at [Gran Turismo (5)][2], their team did an impressive job at doing various types of realtime camera shaking when you watch a replay in the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jackals-forge.com/tutor/tut2_1.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=hxfNb4d3bPY" />
  <row Id="24576" PostHistoryTypeId="2" PostId="11467" RevisionGUID="d55f5857-3933-45eb-9509-5fbf18a4f257" CreationDate="2011-04-21T23:54:08.190" UserId="6886" Text="Did anyone notice that during the transition, everthing but MegaMan himself is removed from the screen?" />
  <row Id="24577" PostHistoryTypeId="25" PostId="11464" RevisionGUID="c37942a9-6d10-48f3-87d9-de666a747465" CreationDate="2011-04-22T00:09:30.870" Comment="http://twitter.com/#!/StackGameDev/status/61220045816213504" />
  <row Id="24578" PostHistoryTypeId="5" PostId="1828" RevisionGUID="2ef39033-d336-4170-a100-57b8447328f9" CreationDate="2011-04-22T00:14:12.347" UserId="962" Comment="deleted 68 characters in body; edited title" Text="I'd like to shake the camera around a bit during an explosion, and I've tried a few different functions for rocking it around, and nothing seems to really give that 'wow, what a bang!' type feeling that I'm looking for. I've tried some arbitrary relatively high frequency sine wave patterns with a bit of linear attenuation, as well as a square wave-type pattern. I've tried moving just one axis, two, and all three (although the dolly effect was barely noticeable in that case).&#xD;&#xA;&#xD;&#xA;Does anyone know of a good camera shaking pattern?" />
  <row Id="24579" PostHistoryTypeId="4" PostId="1828" RevisionGUID="2ef39033-d336-4170-a100-57b8447328f9" CreationDate="2011-04-22T00:14:12.347" UserId="962" Comment="deleted 68 characters in body; edited title" Text="Realistic Camera/Screen Shake from Explosion" />
  <row Id="24580" PostHistoryTypeId="2" PostId="11468" RevisionGUID="cb56c93b-48d0-4992-b67b-ee03f2d84b0a" CreationDate="2011-04-22T00:19:09.983" UserId="6887" Text="Activemq supports websockets and has a .net client. While the queue/message abstraction might not be the best for your use case, it could be worth to have a look at. http://activemq.apache.org/websockets.html" />
  <row Id="24581" PostHistoryTypeId="2" PostId="11469" RevisionGUID="210e29cc-9e1b-4aed-aed4-0d3de045843d" CreationDate="2011-04-22T01:58:01.733" UserId="288" Text="Resizing or creating a buffer is a costly operation, don't do it at draw-time.&#xD;&#xA;&#xD;&#xA;There is no processing cost for having unused vertices in your vertex buffer (or unused indices in your index buffer, for that matter). They just take up a small amount of memory." />
  <row Id="24582" PostHistoryTypeId="2" PostId="11470" RevisionGUID="d10d8cdc-fc00-4a1d-90ed-4fe2e4c16417" CreationDate="2011-04-22T02:11:43.503" UserId="5439" Text="Curious.  It's working exactly as it should for me.  The only real difference is that I'm using an OpenGL 3.2 Core Profile.&#xD;&#xA;&#xD;&#xA;Vertex shader:&#xD;&#xA;&#xD;&#xA;    #version 150&#xD;&#xA;    &#xD;&#xA;    uniform mat4 ProjectionMatrix;&#xD;&#xA;    uniform mat4 ViewMatrix;&#xD;&#xA;    uniform mat4 ModelMatrix;&#xD;&#xA;    &#xD;&#xA;    in vec3 Position;&#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;       gl_PointSize = 40.0;&#xD;&#xA;       gl_Position = ProjectionMatrix * ViewMatrix * ModelMatrix * vec4(Position, 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment shader:&#xD;&#xA;&#xD;&#xA;    #version 150&#xD;&#xA;    &#xD;&#xA;    out vec4 FragmentColour;&#xD;&#xA;    &#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;       FragmentColour = vec4(gl_PointCoord.st, 0, 1);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="24583" PostHistoryTypeId="2" PostId="11471" RevisionGUID="3148b785-e857-41ac-9b2c-1d24a5600975" CreationDate="2011-04-22T02:25:49.483" UserId="288" Text="You are probably hitting 100% CPU because you are at the batch limit. You get a few hundred batches per frame. A batch is basically equivalent to a call to one of the `GraphicsDevice.Draw*` functions.&#xD;&#xA;&#xD;&#xA;You probably want to read &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9277/optimizing-an-xna-2d-game/9289#9289&quot;&gt;this answer&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;While you can reduce the number of batches with instancing, because your geometry is so simple you are probably better off using &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.dynamicvertexbuffer.aspx&quot;&gt;`DynamicVertexBuffer`&lt;/a&gt; or &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff433984.aspx&quot;&gt;`DrawUserPrimatives`&lt;/a&gt; to put all your geometry into a single batch. (This is the technique that `SpriteBatch` uses.)&#xD;&#xA;&#xD;&#xA;For such a small amount of geometry, the cost of calculating and sending the vertex data to the GPU will be comparable to, and quite possibly better than, the cost of transmitting the instancing data.&#xD;&#xA;&#xD;&#xA;Additionally, if your data doesn't change every frame, you should use `DynamicVertexBuffer` and instead of refreshing it every frame, add a `ContentLost` handler and then only refresh it when you need to or if the device is lost.&#xD;&#xA;&#xD;&#xA;Obviously, if your data never changes at all you should simply build it into a single, static `VertexBuffer`. If what you are drawing is terrain, and it is not deformable, just have one (or more) huge (thousands of vertices) vertex buffer that you can scroll around, and let the GPU handle culling for you.&#xD;&#xA;" />
  <row Id="24584" PostHistoryTypeId="25" PostId="11456" RevisionGUID="274fe0ce-752b-46d7-9b89-9889ca80195d" CreationDate="2011-04-22T03:09:30.957" Comment="http://twitter.com/#!/StackGameDev/status/61265345226354689" />
  <row Id="24585" PostHistoryTypeId="2" PostId="11472" RevisionGUID="d2fc2ba6-5472-4bbc-8b7f-29aa29172205" CreationDate="2011-04-22T04:07:10.237" UserId="1047" Text="http://superwebsocket.codeplex.com/ " />
  <row Id="24586" PostHistoryTypeId="25" PostId="11431" RevisionGUID="c83afcdd-7b56-4800-8e6d-09291a9fff7b" CreationDate="2011-04-22T06:09:30.583" Comment="http://twitter.com/#!/StackGameDev/status/61310641226514432" />
  <row Id="24587" PostHistoryTypeId="2" PostId="11473" RevisionGUID="14ab412e-f198-4732-83dc-663f52880cd6" CreationDate="2011-04-22T06:49:23.170" UserId="6890" Text="I am interested in getting into game development and posses good C/C++ programming skills. I have tried OGRE before tho, and I am curious whether I should learn either OGRE or OpenGL as a starting point.&#xD;&#xA;&#xD;&#xA;From my understanding, OGRE is a wrapper for OpenGL and DirectX. So, supposed that I learn OGRE, do I still need to learn OpenGL as well to develop a game?&#xD;&#xA;&#xD;&#xA;Also, can someone points me good tutorial for OpenGL? I found that OGRE is well documented (it's even come with the distribution!) but for OpenGL, most of the tutorials I came over are outdated.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="24588" PostHistoryTypeId="1" PostId="11473" RevisionGUID="14ab412e-f198-4732-83dc-663f52880cd6" CreationDate="2011-04-22T06:49:23.170" UserId="6890" Text="OpenGL vs OGRE : Which is the best for beginner?" />
  <row Id="24589" PostHistoryTypeId="3" PostId="11473" RevisionGUID="14ab412e-f198-4732-83dc-663f52880cd6" CreationDate="2011-04-22T06:49:23.170" UserId="6890" Text="&lt;opengl&gt;&lt;engine&gt;&lt;ogre&gt;" />
  <row Id="24590" PostHistoryTypeId="2" PostId="11474" RevisionGUID="f43cd43a-3b4e-436a-90ec-dcd94466b73a" CreationDate="2011-04-22T07:45:23.720" UserId="5021" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png" />
  <row Id="24591" PostHistoryTypeId="1" PostId="11474" RevisionGUID="f43cd43a-3b4e-436a-90ec-dcd94466b73a" CreationDate="2011-04-22T07:45:23.720" UserId="5021" Text="Rotating a vector by another vector in shader." />
  <row Id="24592" PostHistoryTypeId="3" PostId="11474" RevisionGUID="f43cd43a-3b4e-436a-90ec-dcd94466b73a" CreationDate="2011-04-22T07:45:23.720" UserId="5021" Text="&lt;math&gt;&lt;hlsl&gt;&lt;linear-algebra&gt;&lt;vectors&gt;&lt;shaders&gt;" />
  <row Id="24593" PostHistoryTypeId="2" PostId="11475" RevisionGUID="01f75919-5e1d-414a-8e0a-655e372ea9d9" CreationDate="2011-04-22T07:54:34.740" UserId="5224" Text="You can use the LERP function, this will linearly interpolate between the two vectors. Giving you a nice 'averaged' normal.&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb509618(VS.85).aspx&#xD;&#xA;&#xD;&#xA;(Of course this is not really rotating, but given the orange and blue vector this will get you the green vector)" />
  <row Id="24594" PostHistoryTypeId="2" PostId="11476" RevisionGUID="6ca8822b-1e61-4374-9b76-d51676097410" CreationDate="2011-04-22T08:01:01.833" UserId="5224" Text="ORGE is indeed a wrapper for OpenGL, however the idea of such a wrapper is that you don't have to concern yourself with the intricacies of OpenGL. It will of course help to know a bit about OpenGL, but ORGE will hide a lot of the ugly details for you.&#xD;&#xA;&#xD;&#xA;I would say that Ogre is arguably easier to learn as opposed to OpenGL, or at least it will get you interesting results faster. Of course it totally depends on what you would like to do to asses if it's worth learning OpenGL.&#xD;&#xA;&#xD;&#xA;About OpenGL tutorials, yes most of them are pretty outdated, however the spec hasn't been moving forward really fast so a lot of those old tutorials still apply to most of OpenGL.&#xD;&#xA;&#xD;&#xA;A few of my favourites:&#xD;&#xA;&#xD;&#xA; - http://www.falloutsoftware.com/tutorials/gl/gl8.htm (7 years old but the theory is still very solid!)&#xD;&#xA;&#xD;&#xA; - http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=11&#xD;&#xA;&#xD;&#xA; - Or actually all of Nehe's tutorials http://nehe.gamedev.net/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24595" PostHistoryTypeId="2" PostId="11477" RevisionGUID="a878c7d7-727e-4f2e-b31b-a2a14cd8020e" CreationDate="2011-04-22T08:04:43.890" UserId="5224" Text="If you draw a line where the end point of the first line is the start point of the second line then you can use LineStrip to 'automatically' get indices.&#xD;&#xA;&#xD;&#xA;If you draw lines where vertices are never shared between lines then indices will get you no benefit at all (might even slow it down).&#xD;&#xA;&#xD;&#xA;If some part of your vertices are shared then it can indeed be smart to use an index buffer." />
  <row Id="24596" PostHistoryTypeId="5" PostId="11474" RevisionGUID="229166de-7f80-4a0d-9edf-b80517e52b82" CreationDate="2011-04-22T08:13:52.230" UserId="5021" Comment="added 110 characters in body" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA; - The 1st normal vector (blue) that we are rotating the 2nd vector (orange) by, can be almost horizontal.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png" />
  <row Id="24597" PostHistoryTypeId="5" PostId="11474" RevisionGUID="3f1dccbb-83e6-4970-899c-c3bc41315db7" CreationDate="2011-04-22T08:26:08.707" UserId="5021" Comment="added 420 characters in body; added 2 characters in body; added 162 characters in body" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA; - The 1st normal vector (blue) that we are rotating the 2nd vector (orange) by, can be almost horizontal.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The amount that the orange vector is rotated should be roughly (or if possibly exactly) equal to the angle that the blue normal vector forms with the surface.&#xD;&#xA;&#xD;&#xA;Here is a second scenario:&#xD;&#xA;&#xD;&#xA;![The blue vector is almost horizontal, so the 2nd normal map is being applied to an almost horizontal surface, thus the orange vector is rotated further.][2]&#xD;&#xA;&#xD;&#xA;In the above image, the blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/BcHmK.png" />
  <row Id="24598" PostHistoryTypeId="5" PostId="11474" RevisionGUID="d291e308-1a97-4dca-9c03-6e3df03fe104" CreationDate="2011-04-22T08:43:23.887" UserId="5021" Comment="deleted 422 characters in body; added 440 characters in body" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA; - The 1st normal vector (blue) that we are rotating the 2nd vector (orange) by, can be almost horizontal.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The amount that the orange vector is rotated should be roughly (or if possibly exactly) equal to the angle that the blue normal vector forms with the surface.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a second scenario:&#xD;&#xA;&#xD;&#xA;![The blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further][2]&#xD;&#xA;&#xD;&#xA;In the above image, the blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/fgQ9U.png" />
  <row Id="24599" PostHistoryTypeId="2" PostId="11478" RevisionGUID="92000a51-f8ec-46b3-8a6d-c566917d9500" CreationDate="2011-04-22T08:57:36.303" UserId="1156" Text="Short answer? OGRE.&#xD;&#xA;&#xD;&#xA;Longish answer? OGRE is a wrapper over OpenGL, so therefore you have to do a lot less work. You do not have to worry so much about sending data to the GPU or binding shaders, or sorting out vertices at a low level. It is much faster to use OGRE than to use OpenGL for production, and chances are your code will be (very marginally) faster too.&#xD;&#xA;&#xD;&#xA;If you're interested in engine development, use GL. Else, use OGRE. And I'd probably start with OGRE anyway." />
  <row Id="24600" PostHistoryTypeId="25" PostId="11473" RevisionGUID="720d7496-2737-4ddb-ab91-c218bd552c05" CreationDate="2011-04-22T09:09:30.467" Comment="http://twitter.com/#!/StackGameDev/status/61355939625828352" />
  <row Id="24601" PostHistoryTypeId="2" PostId="11479" RevisionGUID="eeedf234-4a15-486a-a78f-4d185262883e" CreationDate="2011-04-22T09:21:36.617" UserId="6890" Text="I just dived into OGRE. It is wonderful experience aaand..if you notice in the tutorial, they provided a Robot for you (which is basically a character). &#xD;&#xA;&#xD;&#xA;I am just curious, aside from manually generating character by commanding the OGRE to draw vertices by vertices, is it reachable by using Blender?&#xD;&#xA;&#xD;&#xA;And, how on earth exactly the character movement is mapped? For example, when we press forward key in video games, the character will move. How this movement is made? Is it like the game will redraw the character with one hand &amp; one leg up, or we have to create a set of movement and attach it in the game?&#xD;&#xA;&#xD;&#xA;Thanks in advance. Any explanation is welcomed!" />
  <row Id="24602" PostHistoryTypeId="1" PostId="11479" RevisionGUID="eeedf234-4a15-486a-a78f-4d185262883e" CreationDate="2011-04-22T09:21:36.617" UserId="6890" Text="How do you create character in games, and attach movement to it?" />
  <row Id="24603" PostHistoryTypeId="3" PostId="11479" RevisionGUID="eeedf234-4a15-486a-a78f-4d185262883e" CreationDate="2011-04-22T09:21:36.617" UserId="6890" Text="&lt;game-design&gt;&lt;movement&gt;&lt;character&gt;" />
  <row Id="24606" PostHistoryTypeId="2" PostId="11480" RevisionGUID="042d987e-e3ee-432c-ae07-0a1933f6aede" CreationDate="2011-04-22T09:39:06.970" UserId="3794" Text="Knowing computer graphics hardware is not 100% need for game development. It is need for become graphics pipeline engineer or part of render dev team in game company (Personal note: which is the best fun on whole gamedev). &#xD;&#xA;&#xD;&#xA;Otherwise you propably don't need to learn whole openGL or DX to develop games. But it helps ;)" />
  <row Id="24607" PostHistoryTypeId="2" PostId="11481" RevisionGUID="99a4d8b9-b1d0-45b7-a51a-a385ecd5165c" CreationDate="2011-04-22T09:50:43.143" UserId="364" Text="Someone on this forum showed me that I could use choice in ATL : &#xD;&#xA;&#xD;&#xA;    image hero normal:&#xD;&#xA;        choice( hero_sex == &quot;man&quot; ):&#xD;&#xA;            &quot;hero_man_normal.png&quot;&#xD;&#xA;        choice( hero_sex == &quot;woman&quot; ):&#xD;&#xA;            &quot;hero_woman_normal.png&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Not perfect solution but simple enough to solve my problem." />
  <row Id="24609" PostHistoryTypeId="5" PostId="11474" RevisionGUID="8e5ee9db-56ba-45ca-945d-89a78411b05e" CreationDate="2011-04-22T10:01:27.503" UserId="5021" Comment="added 1620 characters in body; added 429 characters in body; added 92 characters in body" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA; - The 1st normal vector (blue) that we are rotating the 2nd vector (orange) by, can be almost horizontal.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The amount that the orange vector is rotated should be roughly (or if possibly exactly) equal to the angle that the blue normal vector forms with the surface.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a second scenario:&#xD;&#xA;&#xD;&#xA;![The blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further][2]&#xD;&#xA;&#xD;&#xA;In the above image, the blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: Maybe I need a tangent and bitangent as well as the normal?&#xD;&#xA;&#xD;&#xA;Here's how I get the normal:&#xD;&#xA;&#xD;&#xA;    float4 ComputeNormals(VS_OUTPUT input) : COLOR&#xD;&#xA;    {&#xD;&#xA;    	float2 uv = input.TexCoord;&#xD;&#xA;    	&#xD;&#xA;    	// top left, left, bottom left, top, bottom, top right, right, bottom right&#xD;&#xA;        float tl = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1, -1)).x);&#xD;&#xA;        float  l = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1,  0)).x);&#xD;&#xA;        float bl = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1,  1)).x);&#xD;&#xA;        float  t = abs(tex2D(HeightSampler, uv + TexelSize * float2( 0, -1)).x);&#xD;&#xA;        float  b = abs(tex2D(HeightSampler, uv + TexelSize * float2( 0,  1)).x);&#xD;&#xA;        float tr = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1, -1)).x);&#xD;&#xA;        float  r = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1,  0)).x);&#xD;&#xA;        float br = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1,  1)).x);&#xD;&#xA;    &#xD;&#xA;        // Compute dx using Sobel filter.&#xD;&#xA;        //           -1  0  1 &#xD;&#xA;        //           -2  0  2&#xD;&#xA;        //           -1  0  1&#xD;&#xA;        float dX = tr + 2*r + br - tl - 2*l - bl;&#xD;&#xA;    &#xD;&#xA;        // Compute dy using Sobel filter.&#xD;&#xA;        //           -1 -2 -1 &#xD;&#xA;        //            0  0  0&#xD;&#xA;        //            1  2  1&#xD;&#xA;        float dY = bl + 2*b + br - tl - 2*t - tr;&#xD;&#xA;    &#xD;&#xA;        // Compute cross-product and renormalize&#xD;&#xA;        float3 N = normalize(float3(-dX, NormalStrength, -dY));    &#xD;&#xA;    &#xD;&#xA;        // Map [-1.0 , 1.0] to [0.0 , 1.0];&#xD;&#xA;        return float4(N * 0.5f + 0.5f, 1.0f);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How might I get the tangent and bitangent vectors then?&#xD;&#xA;&#xD;&#xA;Is it enough to take the cross product of the normal with the Z axis unit vector to find the tangent vector? (Since the normal.Y is always positive, where Y is up, and Z is pointing into your screen).&#xD;&#xA;&#xD;&#xA;And then take that tangent vector and cross it with the normal to obtain the bitangent?&#xD;&#xA;&#xD;&#xA;And then take the normal, tangent and bitangent together to form a rotation matrix to rotate the orange normal map vector?&#xD;&#xA;&#xD;&#xA;Even if that works, this seems like a lot of effort. Does this work, and is there an easier way?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/fgQ9U.png&#xD;&#xA;" />
  <row Id="24610" PostHistoryTypeId="5" PostId="11474" RevisionGUID="42abd1b3-80f2-4f96-8d1f-0eeb4035d906" CreationDate="2011-04-22T10:11:02.767" UserId="5021" Comment="added 53 characters in body; added 31 characters in body" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA; - The 1st normal vector (blue) that we are rotating the 2nd vector (orange) by, can be almost horizontal.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The amount that the orange vector is rotated should be roughly (or if possibly exactly) equal to the angle that the blue normal vector forms with the XZ plane (where Y is up, like the DirectX coordinate system).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a second scenario:&#xD;&#xA;&#xD;&#xA;![The blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further][2]&#xD;&#xA;&#xD;&#xA;In the above image, the blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: Maybe I need a tangent and bitangent as well as the normal?&#xD;&#xA;&#xD;&#xA;Here's how I get the normal:&#xD;&#xA;&#xD;&#xA;    float4 ComputeNormals(VS_OUTPUT input) : COLOR&#xD;&#xA;    {&#xD;&#xA;    	float2 uv = input.TexCoord;&#xD;&#xA;    	&#xD;&#xA;    	// top left, left, bottom left, top, bottom, top right, right, bottom right&#xD;&#xA;        float tl = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1, -1)).x);&#xD;&#xA;        float  l = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1,  0)).x);&#xD;&#xA;        float bl = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1,  1)).x);&#xD;&#xA;        float  t = abs(tex2D(HeightSampler, uv + TexelSize * float2( 0, -1)).x);&#xD;&#xA;        float  b = abs(tex2D(HeightSampler, uv + TexelSize * float2( 0,  1)).x);&#xD;&#xA;        float tr = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1, -1)).x);&#xD;&#xA;        float  r = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1,  0)).x);&#xD;&#xA;        float br = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1,  1)).x);&#xD;&#xA;    &#xD;&#xA;        // Compute dx using Sobel filter.&#xD;&#xA;        //           -1  0  1 &#xD;&#xA;        //           -2  0  2&#xD;&#xA;        //           -1  0  1&#xD;&#xA;        float dX = tr + 2*r + br - tl - 2*l - bl;&#xD;&#xA;    &#xD;&#xA;        // Compute dy using Sobel filter.&#xD;&#xA;        //           -1 -2 -1 &#xD;&#xA;        //            0  0  0&#xD;&#xA;        //            1  2  1&#xD;&#xA;        float dY = bl + 2*b + br - tl - 2*t - tr;&#xD;&#xA;    &#xD;&#xA;        // Compute cross-product and renormalize&#xD;&#xA;        float3 N = normalize(float3(-dX, NormalStrength, -dY));    &#xD;&#xA;    &#xD;&#xA;        // Map [-1.0 , 1.0] to [0.0 , 1.0];&#xD;&#xA;        return float4(N * 0.5f + 0.5f, 1.0f);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How might I get the tangent and bitangent vectors then?&#xD;&#xA;&#xD;&#xA;Is it enough to take the cross product of the normal with the Z axis unit vector to find the tangent vector? (Since the normal.Y is always positive, where Y is up, and Z is pointing into your screen).&#xD;&#xA;&#xD;&#xA;And then take that tangent vector and cross it with the normal to obtain the bitangent?&#xD;&#xA;&#xD;&#xA;And then take the normal, tangent and bitangent together to form a rotation matrix to rotate the orange normal map vector?&#xD;&#xA;&#xD;&#xA;Even if that works, this seems like a lot of computation for a pixel shader. Does this work, and is there a more efficient way?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/fgQ9U.png&#xD;&#xA;" />
  <row Id="24612" PostHistoryTypeId="2" PostId="11483" RevisionGUID="ba18135c-525c-41c4-8e64-f6e8d932312c" CreationDate="2011-04-22T10:27:57.167" UserId="6892" Text="I have an idea for a game, and I was wondering, how would I go about grabbing people in the gaming development community to help build this baby that is in my head. I am no coder, but I do understand coding concepts etc.&#xD;&#xA;&#xD;&#xA;Are there sites for discussing possible game design ideas, or game concepts? (I'm hoping here is such a site :) )" />
  <row Id="24613" PostHistoryTypeId="1" PostId="11483" RevisionGUID="ba18135c-525c-41c4-8e64-f6e8d932312c" CreationDate="2011-04-22T10:27:57.167" UserId="6892" Text="How do I turn a game idea, into a game?" />
  <row Id="24614" PostHistoryTypeId="3" PostId="11483" RevisionGUID="ba18135c-525c-41c4-8e64-f6e8d932312c" CreationDate="2011-04-22T10:27:57.167" UserId="6892" Text="&lt;hobby-development&gt;&lt;project-management&gt;" />
  <row Id="24615" PostHistoryTypeId="2" PostId="11484" RevisionGUID="97dd8e22-e282-4f26-ba2b-f637fc8b5ee8" CreationDate="2011-04-22T11:44:39.723" UserId="1839" Text="I think I get your question, although its explained a bit confusing ;)&#xD;&#xA;&#xD;&#xA;The problem is, there is a normal-map to be mapped on a xz-plane (the orange vector). Now the actual plane described by the blue normal is not necessarily in the xz-plane, so one must find a rotation from the xz-plane to the actual plane, in order to rotate the orange vector to map it on the actual plane.&#xD;&#xA;&#xD;&#xA;Now how can we do that? Bacially we must find the rotation, that rotates the xz-plane to the plane described by the blue normal. &#xD;&#xA;&#xD;&#xA; 1. Find the rotation-axis by taking the cross-product of both normals, the orange vector must be roatated around this axis.&#xD;&#xA;&#xD;&#xA;        axis = N_orange cross N_blue&#xD;&#xA;&#xD;&#xA; 2. Find the rotations angle by using the dot-produnt of both normals&#xD;&#xA;&#xD;&#xA;        angle = acos(N_orange dot N_blue)&#xD;&#xA;    &#xD;&#xA; 3. Now create a rotation-matrix from those values, pass it to the shader and transform the orange normal with that matrix" />
  <row Id="24616" PostHistoryTypeId="2" PostId="11485" RevisionGUID="2d3f959d-5e6f-42e3-b525-cf0f1b57cc0a" CreationDate="2011-04-22T11:50:54.307" UserId="6588" Text="There are game development communities on http://www.gamedev.net/ and http://www.indiegamer.com/&#xD;&#xA;&#xD;&#xA;However nobody will react well to some random person just barging in with an idea, and it is crucial that you understand why. The first article on Sloperama addresses this issue:&#xD;&#xA;http://www.sloperama.com/advice/idea.htm&#xD;&#xA;&#xD;&#xA;Although his advice talks about selling the idea, getting others to make it for you amounts to the same thing. Basically, you are going to have to build it yourself because noone else will do it for you. That doesn't mean you have to do every bit personally (ie. do all the programming, create all the art, compose all the music, etc.) but it does mean you have to work hard on it.&#xD;&#xA;&#xD;&#xA;In order to get anyone else interested in your idea you have to be coming to the table with a lot. It helps a lot to have developed games in the past, so I might recommend setting your great idea aside temporarily and go develop a few small games (Tetris, Pacman, that sort of thing) on your own to develop rep.&#xD;&#xA;" />
  <row Id="24617" PostHistoryTypeId="2" PostId="11486" RevisionGUID="fbac4bc4-9f0d-4719-9096-44094390ec93" CreationDate="2011-04-22T11:52:00.080" UserId="6588" Text="There are game development communities on http://www.gamedev.net/ and http://www.indiegamer.com/" />
  <row Id="24618" PostHistoryTypeId="5" PostId="11484" RevisionGUID="916c815b-0a0b-4707-b5bd-ac4ec19d417b" CreationDate="2011-04-22T11:57:13.673" UserId="1839" Comment="added 38 characters in body; edited body; deleted 23 characters in body" Text="I think I get your question, although its explained a bit confusing ;)&#xD;&#xA;&#xD;&#xA;The problem is, there is a normal-map to be mapped on a xz-plane (the orange vector). Now the actual plane described by the blue normal is not necessarily in the xz-plane, so one must find a rotation from the xz-plane to the actual plane, in order to rotate the orange vector to map it on the actual plane.&#xD;&#xA;&#xD;&#xA;Now how can we do that? Bacially we must find the rotation, that rotates the xz-plane to the plane described by the blue normal. &#xD;&#xA;&#xD;&#xA; 1. Find the rotation-axis by taking the cross-product of the blue normal and the normal from the xz-plane {0, 1, 0}, the orange vector must be roatated around this axis.&#xD;&#xA;&#xD;&#xA;        axis = N_xz cross N_blue&#xD;&#xA;&#xD;&#xA; 2. Find the rotation angle by taking the dot-product of both normals&#xD;&#xA;&#xD;&#xA;        angle = acos(N_xz dot N_blue)&#xD;&#xA;    &#xD;&#xA; 3. Now create a rotation-matrix from those values and transform the orange normal with that matrix" />
  <row Id="24619" PostHistoryTypeId="2" PostId="11487" RevisionGUID="5843010a-dc0e-4e62-beb3-005620301d53" CreationDate="2011-04-22T12:02:54.823" UserId="6588" Text="The answer depends on exactly your intention. The more control you want to have, the more you have to be bringing to the table. For example, you could build the game using placeholder art and then try to find a talented artist to polish all the graphics. Similarly, if you pay them (up-front cash, not a percentage of future profits) then by definition you are bringing money to the table.&#xD;&#xA;&#xD;&#xA;If however you want to recruit an artist from the beginning then don't expect to direct everything. They will want and rightly expect a lot of creative control; after all, the project is as much a speculative venture for them as it is for you.&#xD;&#xA;&#xD;&#xA;It is simply impossible to know with 100% certainty how well someone will work out until you work with them on something, so the way around this Catch-22 is find people to do small projects and only do big projects with people you've already done small projects with. Doing a small project it's okay if things go south and you have to lick your wounds to start over with someone else." />
  <row Id="24620" PostHistoryTypeId="5" PostId="11474" RevisionGUID="e46054dd-1e6c-4a30-8a06-5b2ce766aacd" CreationDate="2011-04-22T12:03:43.043" UserId="5021" Comment="added 523 characters in body" Text="I have a terrain surface with a normal for each point on the terrain.&#xD;&#xA;&#xD;&#xA;I have a second detail normal map to be applied to the terrain.&#xD;&#xA;&#xD;&#xA; - These normals are in 3-space.&#xD;&#xA;   &#xD;&#xA; - The Y value of both normals is&#xD;&#xA;   **always** positive.&#xD;&#xA;   &#xD;&#xA; - The X,Z values of both normals can be&#xD;&#xA;   positive/negative/zero.&#xD;&#xA;&#xD;&#xA; - The 1st normal vector (blue) that we are rotating the 2nd vector (orange) by, can be almost horizontal.&#xD;&#xA;&#xD;&#xA;I am okay with an approximate solution if it makes it easier/faster to compute.&#xD;&#xA;![Image of blue surface normal, orange normal map normal, and the green desired result normal.][1]&#xD;&#xA;&#xD;&#xA;In the above image, you see the blue surface normal (from the 1st normal map),  the orange normal map normal (from the 2nd normal map), and the green desired result normal.&#xD;&#xA;&#xD;&#xA;The amount that the orange vector is rotated should be roughly (or if possibly exactly) equal to the angle that the blue normal vector forms with the XZ plane (where Y is up, like the DirectX coordinate system).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a second scenario:&#xD;&#xA;&#xD;&#xA;![The blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further][2]&#xD;&#xA;&#xD;&#xA;In the above image, the blue surface normal is almost horizontal, so the 2nd normal map is being applied to an almost vertical surface, thus the orange normal map vector is rotated further.&#xD;&#xA;&#xD;&#xA;The rotation is being implemented in a HLSL shader.&#xD;&#xA;&#xD;&#xA;How do I rotate the 1st orange normal based on the direction of the 2nd blue normal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: Maybe I need a tangent and bitangent as well as the normal?&#xD;&#xA;&#xD;&#xA;Here's how I get the normal:&#xD;&#xA;&#xD;&#xA;    float4 ComputeNormals(VS_OUTPUT input) : COLOR&#xD;&#xA;    {&#xD;&#xA;    	float2 uv = input.TexCoord;&#xD;&#xA;    	&#xD;&#xA;    	// top left, left, bottom left, top, bottom, top right, right, bottom right&#xD;&#xA;        float tl = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1, -1)).x);&#xD;&#xA;        float  l = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1,  0)).x);&#xD;&#xA;        float bl = abs(tex2D(HeightSampler, uv + TexelSize * float2(-1,  1)).x);&#xD;&#xA;        float  t = abs(tex2D(HeightSampler, uv + TexelSize * float2( 0, -1)).x);&#xD;&#xA;        float  b = abs(tex2D(HeightSampler, uv + TexelSize * float2( 0,  1)).x);&#xD;&#xA;        float tr = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1, -1)).x);&#xD;&#xA;        float  r = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1,  0)).x);&#xD;&#xA;        float br = abs(tex2D(HeightSampler, uv + TexelSize * float2( 1,  1)).x);&#xD;&#xA;    &#xD;&#xA;        // Compute dx using Sobel filter.&#xD;&#xA;        //           -1  0  1 &#xD;&#xA;        //           -2  0  2&#xD;&#xA;        //           -1  0  1&#xD;&#xA;        float dX = tr + 2*r + br - tl - 2*l - bl;&#xD;&#xA;    &#xD;&#xA;        // Compute dy using Sobel filter.&#xD;&#xA;        //           -1 -2 -1 &#xD;&#xA;        //            0  0  0&#xD;&#xA;        //            1  2  1&#xD;&#xA;        float dY = bl + 2*b + br - tl - 2*t - tr;&#xD;&#xA;    &#xD;&#xA;        // Compute cross-product and renormalize&#xD;&#xA;        float3 N = normalize(float3(-dX, NormalStrength, -dY));    &#xD;&#xA;    &#xD;&#xA;        // Map [-1.0 , 1.0] to [0.0 , 1.0];&#xD;&#xA;        return float4(N * 0.5f + 0.5f, 1.0f);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How might I get the tangent and bitangent vectors then?&#xD;&#xA;&#xD;&#xA;Is it enough to take the cross product of the normal with the Z axis unit vector to find the tangent vector? (Since the normal.Y is always positive, where Y is up, and Z is pointing into your screen).&#xD;&#xA;&#xD;&#xA;And then take that tangent vector and cross it with the normal to obtain the bitangent?&#xD;&#xA;&#xD;&#xA;And then take the normal, tangent and bitangent together to form a rotation matrix to rotate the orange normal map vector?&#xD;&#xA;&#xD;&#xA;Even if that works, this seems like a lot of computation for a pixel shader. Does this work, and is there a more efficient way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;This image may help you understand what I'm trying to do:&#xD;&#xA;![Normal mapping.][3]&#xD;&#xA;&#xD;&#xA;If you know what normal mapping is, then this should be straightforward, I think.&#xD;&#xA;&#xD;&#xA;I'm trying to take the normal map, which contains various normals, and apply them to a surface. The surface has it's own normals. The normal map will contain many more normals than the surface, so several normal map normals are sampled across a single part of the surface that has only a single normal.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/deXis.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/fgQ9U.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/jdBsf.png" />
  <row Id="24621" PostHistoryTypeId="2" PostId="11488" RevisionGUID="9091f376-dc0c-4475-a36c-8128c4e884bc" CreationDate="2011-04-22T12:08:24.553" UserId="2698" Text="Since you're using Box2D, you can create a series of rectangles and use [Box2D's joints][1] to join them. There you have your rope.&#xD;&#xA;&#xD;&#xA;In order to avoid corners poking out of a bent rope, I can imagine two options:&#xD;&#xA;&#xD;&#xA;1. Give your rope segments rounded ends (so they won't be rectangles anymore)&#xD;&#xA;2. Make this rope itself invisible and use it only for physics. Take the positions of the joints in each frame and use that to draw a rope on the fly that the player _will_ see.&#xD;&#xA;&#xD;&#xA;Warning: I have never tried this myself, but I fail to see how a series of joined rectangles can fail when the video you posted displays practically the same thing in disguise.&#xD;&#xA;&#xD;&#xA;[1]:http://www.box2d.org/manual.html#_Toc258082974" />
  <row Id="24622" PostHistoryTypeId="25" PostId="11483" RevisionGUID="2483f3a3-6fad-47e3-baed-892a6d2e6a8a" CreationDate="2011-04-22T12:09:30.540" Comment="http://twitter.com/#!/StackGameDev/status/61401238947897344" />
  <row Id="24623" PostHistoryTypeId="5" PostId="11484" RevisionGUID="bd842b71-a5e8-4e69-b1aa-485eac1209fe" CreationDate="2011-04-22T12:10:27.127" UserId="1839" Comment="added 99 characters in body" Text="I think I get your question, although its explained a bit confusing ;)&#xD;&#xA;&#xD;&#xA;The problem is, there is a normal-map to be mapped on a xz-plane (the orange vector). Now the actual plane described by the blue normal is not necessarily in the xz-plane, so one must find a rotation from the xz-plane to the actual plane, in order to rotate the orange vector to map it on the actual plane.&#xD;&#xA;&#xD;&#xA;Now how can we do that? Bacially we must find the rotation, that rotates the xz-plane to the plane described by the blue normal. &#xD;&#xA;&#xD;&#xA; 1. Find the rotation-axis by taking the cross-product of the blue normal and the normal from the xz-plane {0, 1, 0}, the orange vector must be roatated around this axis.&#xD;&#xA;&#xD;&#xA;        axis = N_xz cross N_blue&#xD;&#xA;&#xD;&#xA; 2. Find the rotation angle by taking the dot-product of both normals&#xD;&#xA;&#xD;&#xA;        angle = acos(N_xz dot N_blue)&#xD;&#xA;    &#xD;&#xA; 3. Now [create a rotation-matrix][1] from those values and transform the orange normal with that matrix.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle" />
  <row Id="24624" PostHistoryTypeId="2" PostId="11489" RevisionGUID="72214030-4d96-4913-8a8d-cd8dee0cd18b" CreationDate="2011-04-22T12:22:36.213" UserId="1101" Text="Game development doesn't really take external ideas and fashion them into games. It's not like making films where you have a small chance of getting your script made into a movie if it lands in the right hands. It's more like writing a book where a first-time author is going to have to write every word himself before submitting it.&#xD;&#xA;&#xD;&#xA;So, you're pretty much guaranteed to need to take a hands-on approach to getting your game made. There are essentially 3 routes:&#xD;&#xA;&#xD;&#xA; * have a concrete skill to bring to the game-making process - typically game-specific such as art, design (not ideas, but concrete design), or programming. If you are willing to pull your weight, often you can find people willing to match your effort. (Whether they are capable of doing so is another matter.) Then you make the game for free in your spare time.&#xD;&#xA; * money to pay people with so that they will do your bidding. Most people have bills to pay and will happily build someone else's idea if it'll put food on the table.&#xD;&#xA; * join an existing company, again with a concrete game-making skill as above, and this time work on other people's games until you're in a senior enough position to be able to present your ideas to the team. This is the longest route and least likely to succeed, but is also probably the only route for games of a certain complexity and production standard.&#xD;&#xA;&#xD;&#xA;There isn't really an alternative because game ideas are considered worthless on their own. They're not worthless, of course - but the two main problems you face are:&#xD;&#xA;&#xD;&#xA; * most game developers already have more ideas than they have time to create (and have too little time in which to create them all). This is generally why they're into game development anyway - they had ideas, and so they picked up a skill to make them happen. The number of idle game coders waiting for someone to present them with a game idea is incredible miniscule. I've been a moderator on Gamedev.net for 10 years and seen tens of thousands of posts there but I think I've only ever seen 3 people say, &quot;I'm a game coder - give me something to code&quot;.&#xD;&#xA; * it's generally not possible to spot the amazing ideas relative to the average ones until they are, at a minimum, prototyped into something playable. Nobody has set up a commercial 'slush pile' for games because you simply can't tell from a top-level concept whether the game would be fun, whether it would sell well, how long it would take to make, etc. Even if you restricted this to fully fleshed-out design documents, that only really helps with the development feasibility, not with determining how fun it'll be or how much it'll sell. So with this in mind, idea selection and production is left to the experienced - who will go with their own ideas (where possible - often they just end up making whatever the publisher is willing to fund)." />
  <row Id="24625" PostHistoryTypeId="4" PostId="6008" RevisionGUID="af8610ac-1f40-462d-9cd4-6051eae593f7" CreationDate="2011-04-22T12:35:13.330" UserId="450" Comment="question body is only about .net" Text="Serverside libs/examples for html5 WebSocket in .net?" />
  <row Id="24626" PostHistoryTypeId="6" PostId="6008" RevisionGUID="af8610ac-1f40-462d-9cd4-6051eae593f7" CreationDate="2011-04-22T12:35:13.330" UserId="450" Comment="question body is only about .net" Text="&lt;server&gt;&lt;html5&gt;&lt;.net&gt;&lt;websocket&gt;" />
  <row Id="24627" PostHistoryTypeId="2" PostId="11490" RevisionGUID="6967dc34-236e-4a3b-b9c3-9a9ac8076070" CreationDate="2011-04-22T12:36:03.987" UserId="1101" Text="Hobbyists, independent developers, and prospective developers discuss these things on this site, Gamedev.net, and various forums such as TigSource and Indiegamer. These are pretty much only the places where this sort of discussion happens.&#xD;&#xA;&#xD;&#xA;By comparison, professionals tend to carry out their high-level discussion of game design takes place in a similar way to much academia: they publish books, papers, articles, give conference talks, and post blog entries, which are then discussed and cross-referenced. There's no reason why you couldn't start your own blog about your ideas, but you'll have trouble getting any traffic, because the average person's game concept is not going to be of much interest to the wider community. This is why typically you'd go for the first route, of game development forums.&#xD;&#xA;&#xD;&#xA;The reason there isn't anything more for this is partly because the professionals do a decent enough job of exchanging and discussing ideas, and partly because the ideas and concepts that a typical prospective developer comes up with are considered nearly worthless in the professional arena. (And as such, only of interest to one's peers on forums and the like.) This perception of worthlessness is because most professional game developers already have more of their own pet ideas than they have time to create (making ideas far too abundant for the average one to be worth much), and because the quality of a game is almost never intrinsic to the concept itself, meaning it can be almost useless in isolation without a full prototype or technical specification behind it - and usually the only people capable of making such a prototype or specification are already either in the industry, or are able to make the game themselves without presenting it to others." />
  <row Id="24628" PostHistoryTypeId="2" PostId="11491" RevisionGUID="2fa4a017-0f18-4d21-99c8-d5125f5c3eb9" CreationDate="2011-04-22T12:48:18.663" UserId="6894" Text="I am working on a tower defense game in Flash. Right now most towers find the the nearest enemy in range (enemies are in an array), get the enemies coordinates, and fire a bullet. When it hits the coordinates [bullet.hitTestPoint(x, y)] it damages the enemy.&#xD;&#xA;&#xD;&#xA;I want to design a tower that will shoot a bullet at the first enemy just like above, however, the bullet needs to go its max range and damage all enemies it hits along the way. I am having some trouble determining what enemies it is hitting.&#xD;&#xA;&#xD;&#xA;The best way I have come up with so far is when the bullet reaches its max range, I draw a line from that point back to my tower. Then I loop through the enemy array and use [enemies[i].hitTestObject(bulletLine)]. If that returns true, it damages that enemy.&#xD;&#xA;&#xD;&#xA;This seems to work okay, but I would like something more realtime and sometimes it seems like this is hitting enemies it shouldn't hit.&#xD;&#xA;" />
  <row Id="24629" PostHistoryTypeId="1" PostId="11491" RevisionGUID="2fa4a017-0f18-4d21-99c8-d5125f5c3eb9" CreationDate="2011-04-22T12:48:18.663" UserId="6894" Text="Flash AS3 Tower Defense Problem" />
  <row Id="24630" PostHistoryTypeId="3" PostId="11491" RevisionGUID="2fa4a017-0f18-4d21-99c8-d5125f5c3eb9" CreationDate="2011-04-22T12:48:18.663" UserId="6894" Text="&lt;flash&gt;&lt;collision-detection&gt;&lt;actionscript-3&gt;" />
  <row Id="24631" PostHistoryTypeId="5" PostId="11465" RevisionGUID="08e98b51-5676-4c7d-94c5-e6214a53e99e" CreationDate="2011-04-22T12:48:27.927" UserId="2306" Comment="added 161 characters in body" Text="Indexing provides two major benefits:&#xD;&#xA;&#xD;&#xA;1. Speed. Vertices are only transformed once. If you have two connected lines (consisting of a total of three vertices), an indexed draw will only call the vertex shader three times. Without indexing, you'll pass in four vertices (even though two of them will have the same coordinates), and the vertex shader will be called four times. Multiple this by a few million primitives...&#xD;&#xA;&#xD;&#xA;2. Memory. In the above example, your vertex buffer will only have to hold three vertices, and your index buffer will have four indices. You're trading the space required to store one of the vertices for the index list. If you're using a large vertex type (`VertexPositionNormalTexture`, for instance), this makes sense.&#xD;&#xA;&#xD;&#xA;If you use a 16-bit index buffer or non-trivial vertex types, your savings with indexing will most likely outweight the memory cost of the extra vertices (ie - a good thing).&#xD;&#xA;&#xD;&#xA;Also, there is a small bit of GPU overhead with indexing, but it can be very small compared the running the vertex shader many more times than is necessary.&#xD;&#xA;" />
  <row Id="24632" PostHistoryTypeId="2" PostId="11492" RevisionGUID="e7ff3532-6e16-4b71-b3be-25dbdc6b4525" CreationDate="2011-04-22T13:20:01.200" UserId="6896" Text="Which platform/language/sdk is easier for developing a game like Gladiators. http://www.miniclip.com/games/gladiators/en/&#xD;&#xA;&#xD;&#xA;I have a experience at Java but not at GD. Where should I start for developing this kind of 3D game?&#xD;&#xA;" />
  <row Id="24633" PostHistoryTypeId="1" PostId="11492" RevisionGUID="e7ff3532-6e16-4b71-b3be-25dbdc6b4525" CreationDate="2011-04-22T13:20:01.200" UserId="6896" Text="Platform choice for (3d) fighting game" />
  <row Id="24634" PostHistoryTypeId="3" PostId="11492" RevisionGUID="e7ff3532-6e16-4b71-b3be-25dbdc6b4525" CreationDate="2011-04-22T13:20:01.200" UserId="6896" Text="&lt;language-choice&gt;" />
  <row Id="24635" PostHistoryTypeId="5" PostId="11484" RevisionGUID="2591d80c-14a5-441e-b119-e626367c729b" CreationDate="2011-04-22T13:20:32.520" UserId="1839" Comment="added 17 characters in body; added 13 characters in body" Text="I think I get your question, although the title and the 2 first pictures are confusing.&#xD;&#xA;&#xD;&#xA;The problem is, there is a normal-map to be mapped on a xz-plane (the orange vector). Now the actual plane described by the blue normal is not necessarily in the xz-plane, so one must find a rotation from the xz-plane to the actual plane, in order to rotate the orange vector to map it on the actual plane.&#xD;&#xA;&#xD;&#xA;Now how can we do that? Bacially we must find the rotation, that rotates the xz-plane to the plane described by the blue normal. &#xD;&#xA;&#xD;&#xA; 1. Find the rotation-axis by taking the cross-product of the blue normal and the normal from the xz-plane {0, 1, 0}, the orange vector must be roatated around this axis.&#xD;&#xA;&#xD;&#xA;        axis = N_xz cross N_blue&#xD;&#xA;&#xD;&#xA; 2. Find the rotation angle by taking arccosine of the dot-product of both normals&#xD;&#xA;&#xD;&#xA;        angle = acos(N_xz dot N_blue)&#xD;&#xA;    &#xD;&#xA; 3. Now [create a rotation-matrix][1] from those values and transform the orange normal with that matrix.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle" />
  <row Id="24636" PostHistoryTypeId="5" PostId="11465" RevisionGUID="82a78aee-1305-456f-b378-6bb9df8be32f" CreationDate="2011-04-22T13:41:28.720" UserId="2306" Comment="added 788 characters in body" Text="Indexing provides two major benefits:&#xD;&#xA;&#xD;&#xA;1. Speed. Vertices are only transformed once. If you have two connected lines (consisting of a total of three vertices), an indexed draw will only call the vertex shader three times. Without indexing, you'll pass in four vertices (even though two of them will have the same coordinates), and the vertex shader will be called four times. Multiple this by a few million primitives...&#xD;&#xA;&#xD;&#xA;2. Memory. In the above example, your vertex buffer will only have to hold three vertices, and your index buffer will have four indices. You're trading the space required to store one of the vertices for the index list. If you're using a large vertex type (`VertexPositionNormalTexture`, for instance), this makes sense.&#xD;&#xA;&#xD;&#xA;If you use a 16-bit index buffer or non-trivial vertex types, your savings with indexing will most likely outweight the memory cost of the extra vertices (ie - a good thing).&#xD;&#xA;&#xD;&#xA;Also, there is a small bit of GPU overhead with indexing, but it can be very small compared the running the vertex shader many more times than is necessary.&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;I thought of an example where you'd need to use non-indexed vertices. If you want to implement something like [horizontal window blinds (picture for clarity)][1], you may start with a model that has them closed (ie, all the blind surfaces are coplanar). To open them you'd apply different rotation matrices to each of the faces. Vertices that overlapped when closed would now be separate in world space. (When closed, the bottom edge of one slat will sit on top of the top edge of the next one down, and when open, they don't touch at all). &#xD;&#xA;&#xD;&#xA;(Incidentally, that would be a perfect application of instancing [which can be thought of as yet another layer of indexing] if you had many sets of blinds.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Window_blind#Persian.2C_or_slat" />
  <row Id="24637" PostHistoryTypeId="2" PostId="11493" RevisionGUID="d64a1cb1-d3a3-4663-8c24-e9acf6173895" CreationDate="2011-04-22T13:48:17.997" UserId="-1" Text="" />
  <row Id="24638" PostHistoryTypeId="2" PostId="11494" RevisionGUID="f52c987f-94f8-4570-989b-f8f5991f669a" CreationDate="2011-04-22T13:48:17.997" UserId="-1" Text="" />
  <row Id="24639" PostHistoryTypeId="2" PostId="11495" RevisionGUID="19122d68-85be-41d1-ad76-1db57b031c2e" CreationDate="2011-04-22T14:20:31.850" UserId="6588" Text="There is more information about the bullet you may need to clarify. My first suggestion is to just not remove the bullet when it hits something and keep using hitTestObject like you do with other objects, but I'm wondering if there is a reason that approach wouldn't work.&#xD;&#xA;&#xD;&#xA;For example, how fast is this bullet moving? Is it firing out to the max range instantaneously?" />
  <row Id="24640" PostHistoryTypeId="5" PostId="11492" RevisionGUID="ee2b8d99-8b99-42a7-bfcd-6dea07955e2b" CreationDate="2011-04-22T14:28:15.250" UserId="1156" Comment="deleted 9 characters in body; edited tags; edited title" Text="Which language/sdk is easier for developing a game like Gladiators. http://www.miniclip.com/games/gladiators/en/&#xD;&#xA;&#xD;&#xA;I have a experience at Java but not at GD. Where should I start for developing this kind of 3D game?&#xD;&#xA;" />
  <row Id="24641" PostHistoryTypeId="4" PostId="11492" RevisionGUID="ee2b8d99-8b99-42a7-bfcd-6dea07955e2b" CreationDate="2011-04-22T14:28:15.250" UserId="1156" Comment="deleted 9 characters in body; edited tags; edited title" Text="Language choice for (3d) fighting game" />
  <row Id="24642" PostHistoryTypeId="6" PostId="11492" RevisionGUID="ee2b8d99-8b99-42a7-bfcd-6dea07955e2b" CreationDate="2011-04-22T14:28:15.250" UserId="1156" Comment="deleted 9 characters in body; edited tags; edited title" Text="&lt;3d&gt;&lt;libraries&gt;&lt;language-choice&gt;" />
  <row Id="24643" PostHistoryTypeId="5" PostId="11485" RevisionGUID="84157b1f-6d73-4568-a8a0-b6f5e96d5a1b" CreationDate="2011-04-22T14:32:15.607" UserId="6588" Comment="added 612 characters in body" Text="There are game development communities on http://www.gamedev.net/ and http://www.indiegamer.com/&#xD;&#xA;&#xD;&#xA;However nobody will react well to some random person just barging in with an idea, and it is crucial that you understand why. The first article on Sloperama addresses this issue:&#xD;&#xA;http://www.sloperama.com/advice/idea.htm&#xD;&#xA;&#xD;&#xA;Although his advice talks about selling the idea, getting others to make it for you amounts to the same thing. Basically, you are going to have to build it yourself because noone else will do it for you. That doesn't mean you have to do every bit personally (ie. do all the programming, create all the art, compose all the music, etc.) but it does mean you have to work hard on it.&#xD;&#xA;&#xD;&#xA;In order to get anyone else interested in your idea you have to be coming to the table with a lot. It helps a lot to have developed games in the past, so I might recommend setting your great idea aside temporarily and go develop a few small games (Tetris, Pacman, that sort of thing) on your own to develop rep.&#xD;&#xA;&#xD;&#xA;ADDITION: Your use of the term &quot;baby&quot; in describing your idea is a red flag. That may mean you are too in love with your idea and expect other people to just do what you tell them. I hope this isn't the case, because you have to realize that unless you are hiring/paying them (up-front cash, not a promise of future profits) then this venture is just as speculative for them as for you and they'll rightly expect to have a lot of creative control too. Basically you should look at it like &quot;hey does anyone else want to work with me on a shooter?&quot; and then the details are worked out in collaboration with them." />
  <row Id="24644" PostHistoryTypeId="2" PostId="11496" RevisionGUID="ce944cdf-519b-45e4-9cd7-767b4cf7bcec" CreationDate="2011-04-22T14:50:10.823" UserId="6813" Text="you should consider computing the distance between the segment (from tower position to the max radius using the enemy direction) and the point (your current enemies list). Here is a page that explain the math needed to achieve this : http://paulbourke.net/geometry/pointline/&#xD;&#xA;&#xD;&#xA;You can also consider computing the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Thus said, you can previously reduce the number of enemies in your current enemies table using a simple vector dot product (the direction the tower is pointing to, versus the direction of an enemy seen from the tower). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24645" PostHistoryTypeId="5" PostId="11496" RevisionGUID="0f261181-ac3b-48de-9af1-6bfa674fbd03" CreationDate="2011-04-22T14:55:27.477" UserId="6813" Comment="added 6 characters in body; added 42 characters in body" Text="you should consider computing the distance between the segment (from tower position to the max radius using the first enemy direction) and the point (your current enemies list). Here is a page that explain the math needed to achieve this : http://paulbourke.net/geometry/pointline/&#xD;&#xA;&#xD;&#xA;You can also consider computing the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Thus said, you can previously reduce the number of enemies in your current enemies table using a simple vector dot product (the vector from the tower to the max distance in the first enemy direction, dot-product the vector from the tower to the enemy to test). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24646" PostHistoryTypeId="5" PostId="11496" RevisionGUID="d482cd33-2965-4e42-a191-24f2b9095a8e" CreationDate="2011-04-22T15:04:07.047" UserId="6813" Comment="added 391 characters in body; deleted 54 characters in body" Text="you should consider computing the distance between the segment (from tower position to the max radius using the first enemy direction) and the point (your current enemies list). Here is a page that explain the math needed to achieve this : http://paulbourke.net/geometry/pointline/&#xD;&#xA;&#xD;&#xA;You can also consider computing the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Thus said, you can previously reduce the number of enemies in your current enemies table using a simple vector dot product (the vector from the tower to the max distance in the first enemy direction, dot-product the vector from the tower to the enemy to test). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;you could consider Cross product too...as one of the use if the cross product is to determine if two vectors are parallels by checking whether the resulting vector is close to the zero vector. It normally does apply to 3D vectors only, but as far as I remember you can use it with 2D vectors using a 0 value as third value. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24649" PostHistoryTypeId="25" PostId="11474" RevisionGUID="5e34ea59-ea8b-45d4-a0a2-01d685ba49cf" CreationDate="2011-04-22T15:09:30.517" Comment="http://twitter.com/#!/StackGameDev/status/61446536126672897" />
  <row Id="24650" PostHistoryTypeId="5" PostId="11496" RevisionGUID="426c3363-2c51-4f6a-a1aa-1860bf4a9dfa" CreationDate="2011-04-22T15:16:37.560" UserId="6813" Comment="added 101 characters in body; added 164 characters in body; added 2 characters in body" Text="Hello you should consider using the cross product.&#xD;&#xA;&#xD;&#xA;As one of the use if the cross product is to determine if two vectors are parallels by checking whether the resulting vector is close to the zero vector, you can determine which enemies in your enemies list are aligned on the same vector as your first targeted enemy. It normally does apply to 3D vectors only, but as far as I remember you can use it with 2D vectors using a 0 value as Z value. (Take care they can be parallels and in opposite direction, ie: in back of the tower direction. You can use crossproduct to determine if they are the same direction)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;you could also consider computing the distance between the segment (from tower position to the max radius using the first enemy direction) and the point (your current enemies list) : http://paulbourke.net/geometry/pointline/, or the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Using the above techniques (distance from a point to a plan/segment), you should also consider previously reducing the number of enemies in your current enemies table using a simple vector dot product (the vector from the tower to the max distance in the first enemy direction, dot-product the vector from the tower to the enemy to test). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24651" PostHistoryTypeId="5" PostId="11496" RevisionGUID="963a7b56-33e3-4e81-8649-94b47b72ffe3" CreationDate="2011-04-22T15:32:03.033" UserId="6813" Comment="added 509 characters in body" Text="Hello you should consider using the cross product.&#xD;&#xA;&#xD;&#xA;As one of the use if the cross product is to determine if two vectors are parallels by checking whether the resulting vector is close to the zero vector, you can determine which enemies in your enemies list are aligned on the same vector as your first targeted enemy. It normally does apply to 3D vectors only, but as far as I remember you can use it with 2D vectors using a 0 value as Z value. (Take care they can be parallels and in opposite direction, ie: in the opposite side of the tower direction. You can use crossproduct to determine if they are the same direction)&#xD;&#xA;&#xD;&#xA;Considering:&#xD;&#xA;- A is the vector from the tower to the max distance point aligned with the first enemy.&#xD;&#xA;- B is the vector from the tower to the enemy to test (one of the enemies list).&#xD;&#xA;&#xD;&#xA;&gt; A **x** B = [Ax, Ay, Az] **x** [Bx,&#xD;&#xA;&gt; By, Bz]&#xD;&#xA;&gt; &#xD;&#xA;&gt; A **x** B = [Ay*Bz - Az*By , Az*Bx -&#xD;&#xA;&gt; Ax*Bz , Ax*By - Ay*Bx ]&#xD;&#xA;&#xD;&#xA;If this result vector is equal to (or &quot;close to&quot;, depending of you needs) [0,0,0] then they should be parallels. then compute the dot product to verify if they are the same direction.&#xD;&#xA;&#xD;&#xA;You could also consider computing the distance between the segment (from tower position to the max radius using the first enemy direction) and the point (your current enemies list) : http://paulbourke.net/geometry/pointline/, or the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Using the above techniques (distance from a point to a plan/segment), you should also consider previously reducing the number of enemies in your current enemies table using a simple vector dot product (the vector from the tower to the max distance in the first enemy direction, dot-product the vector from the tower to the enemy to test). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24652" PostHistoryTypeId="5" PostId="11496" RevisionGUID="10fef6f2-58c0-462b-a168-113be67a4ae3" CreationDate="2011-04-22T15:39:48.123" UserId="6813" Comment="added 466 characters in body; added 50 characters in body; deleted 120 characters in body" Text="Hello you should consider using the dot product to compute the angle between two vectors.&#xD;&#xA;&#xD;&#xA;Considering:&#xD;&#xA;&#xD;&#xA;- A is the vector from the tower to the max distance point aligned with the first enemy.&#xD;&#xA;- B is the vector from the tower to the enemy to test (one of the enemies list).&#xD;&#xA;&#xD;&#xA;θ = acos( (A . B) / (|A| |B|) )&#xD;&#xA;&#xD;&#xA;Thus if θ is equal or close to 0° then they are parallels and in the same direction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You could also consider using the cross product, but it's fit better for 3D.&#xD;&#xA;One of the use of the cross product is to determine if two vectors are parallels by checking whether the resulting vector is close to the zero vector, you can determine which enemies in your enemies list are aligned on the same vector as your first targeted enemy. It normally does apply to 3D vectors only, but as far as I remember you can use it with 2D vectors using a 0 value as Z value. (Take care they can be parallels and in opposite direction, ie: in the opposite side of the tower direction. You can use crossproduct to determine if they are the same direction)&#xD;&#xA;&#xD;&#xA;Still considering the same A and B as in the dot product part:&#xD;&#xA;&#xD;&#xA;&gt; A **x** B = [Ax, Ay, Az] **x** [Bx,&#xD;&#xA;&gt; By, Bz]&#xD;&#xA;&gt; &#xD;&#xA;&gt; A **x** B = [Ay*Bz - Az*By , Az*Bx -&#xD;&#xA;&gt; Ax*Bz , Ax*By - Ay*Bx ]&#xD;&#xA;&#xD;&#xA;If this result vector is equal to (or &quot;close to&quot;, depending of you needs) [0,0,0] then they should be parallels. then compute the dot product to verify if they are the same direction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, could also consider computing the distance between the segment (from tower position to the max radius using the first enemy direction) and the point (your current enemies list) : http://paulbourke.net/geometry/pointline/, or the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Using the above techniques (distance from a point to a plan/segment), you should also consider previously reducing the number of enemies in your current enemies table using a simple vector dot product (the vector from the tower to the max distance in the first enemy direction, dot-product the vector from the tower to the enemy to test). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Edited: to reorganize the ideas...&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24653" PostHistoryTypeId="2" PostId="11497" RevisionGUID="36c1453f-bad1-4a95-9419-1cbaecf8b808" CreationDate="2011-04-22T15:42:37.770" UserId="4345" Text="You would need a postfilter shader effect written in HLSL or GLSL. The shader would receive the player coordinates and modify the brightness for all pixels in a certain range. XNA supports 2D shaders quite good.&#xD;&#xA;&#xD;&#xA;Another solution would be to simulate brightness by using a texture with an alpha-channel. The texture would be mostly black except for a transparent spot in the middle. This texture we be an overlay over your game screen with the transparent spot centered on the 'glowing' player character. Old adventure games used this technique to simulate flashlights." />
  <row Id="24654" PostHistoryTypeId="5" PostId="2712" RevisionGUID="cd21d940-57d0-4944-b7f3-d1e81eeddcde" CreationDate="2011-04-22T15:46:34.060" UserId="3588" Comment="Adding the genre tag and the level-design tag, italicized the game titles, moved a comma, and extracted parenthetical text into the body of the question. ♪" Text="I'm working on a top-down shooter akin to *DoDonPachi*, *Ikaruga*, etc. The camera movement through the world is handled automatically with the player able to move inside of the camera's visible region.&#xD;&#xA;&#xD;&#xA;Along the way, enemies are scripted to spawn at particular points along the path. While this sounds straightforward, I could see two ways to define these points:&#xD;&#xA;&#xD;&#xA; 1. Camera's position: 'trigger' spawning as the camera passes by the points&#xD;&#xA; 2. Time along path: &quot;30 seconds in, spawn 2 enemies&quot;&#xD;&#xA;&#xD;&#xA;In both cases, the camera-relative positions would be defined as well as the behavior of the enemy.&#xD;&#xA;&#xD;&#xA;The way I see it, the way you define these points will directly affect how the 'level editor', or what have you, will work.&#xD;&#xA;&#xD;&#xA;Would there be any benefits of one approach over the other?" />
  <row Id="24655" PostHistoryTypeId="4" PostId="2712" RevisionGUID="cd21d940-57d0-4944-b7f3-d1e81eeddcde" CreationDate="2011-04-22T15:46:34.060" UserId="3588" Comment="Adding the genre tag and the level-design tag, italicized the game titles, moved a comma, and extracted parenthetical text into the body of the question. ♪" Text="Enemy Spawning method in a Top-Down Shooter" />
  <row Id="24656" PostHistoryTypeId="6" PostId="2712" RevisionGUID="cd21d940-57d0-4944-b7f3-d1e81eeddcde" CreationDate="2011-04-22T15:46:34.060" UserId="3588" Comment="Adding the genre tag and the level-design tag, italicized the game titles, moved a comma, and extracted parenthetical text into the body of the question. ♪" Text="&lt;game-design&gt;&lt;level-design&gt;&lt;shoot-em-up&gt;" />
  <row Id="24657" PostHistoryTypeId="24" PostId="2712" RevisionGUID="cd21d940-57d0-4944-b7f3-d1e81eeddcde" CreationDate="2011-04-22T15:46:34.060" Comment="Proposed by 3588 approved by 51 edit id of 381" />
  <row Id="24658" PostHistoryTypeId="5" PostId="11494" RevisionGUID="1bd7cf2d-a1eb-4da7-b22b-0d6d3c1d2fdc" CreationDate="2011-04-22T15:46:36.337" UserId="3588" Comment="added 130 characters in body" Text="Patterns of identical shapes (often squares or hexagons) that have no gaps. They usually represent the playfield in various games." />
  <row Id="24659" PostHistoryTypeId="24" PostId="11494" RevisionGUID="1bd7cf2d-a1eb-4da7-b22b-0d6d3c1d2fdc" CreationDate="2011-04-22T15:46:36.337" Comment="Proposed by 3588 approved by 51 edit id of 380" />
  <row Id="24660" PostHistoryTypeId="5" PostId="11493" RevisionGUID="a9fe446d-7571-4758-9d93-a4d812fa8ff1" CreationDate="2011-04-22T15:46:38.083" UserId="3588" Comment="added 676 characters in body" Text="**Tiles** are a very common element in games, used to store information in a simple tesselated format. Because tile grids can easily represent the space of the entire screen, tiles are a very common means of organizing level structure.&#xD;&#xA;&#xD;&#xA;The utility of tiles ranges from the layout of ground to hard restrictions on the movement of in-game entities. It may apply to only parts of the game such as overworld movement, or it could represent the entirety of all meaningful interactions in the game.&#xD;&#xA;&#xD;&#xA;Questions under the purview of this tag involve subjects such as organizing tilesets, rendering the contents of tiles, and how to integrate freeform movement within tiled maps." />
  <row Id="24661" PostHistoryTypeId="24" PostId="11493" RevisionGUID="a9fe446d-7571-4758-9d93-a4d812fa8ff1" CreationDate="2011-04-22T15:46:38.083" Comment="Proposed by 3588 approved by 51 edit id of 379" />
  <row Id="24662" PostHistoryTypeId="5" PostId="11496" RevisionGUID="277bc525-b159-4905-b904-1273ec4911d8" CreationDate="2011-04-22T15:47:25.120" UserId="6813" Comment="added 148 characters in body; deleted 6 characters in body" Text="Hello you should consider using the dot product to compute the angle between two vectors.&#xD;&#xA;&#xD;&#xA;Considering:&#xD;&#xA;&#xD;&#xA;- A is the vector from the tower to the max distance point aligned with the first enemy.&#xD;&#xA;- B is the vector from the tower to the enemy to test (one of the enemies list).&#xD;&#xA;&#xD;&#xA;&gt; θ = acos( (A . B) / (|A| |B|) )&#xD;&#xA;&#xD;&#xA;- |A| is the vector magnitude of A.&#xD;&#xA;- |B| is the vector magnitude of B.&#xD;&#xA;&#xD;&#xA; |V| = square-root( V . V ) = square-root( Vx² + Vy² + ... )&#xD;&#xA;&#xD;&#xA;Thus if θ is equal or close to 0° then they are parallels and in the same direction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You could also consider using the cross product, but it's fit better for 3D.&#xD;&#xA;One of the use of the cross product is to determine if two vectors are parallels by checking whether the resulting vector is close to the zero vector, you can determine which enemies in your enemies list are aligned on the same vector as your first targeted enemy. It normally does apply to 3D vectors only, but as far as I remember you can use it with 2D vectors using a 0 value as Z value. (Take care they can be parallels and in opposite direction, ie: in the opposite side of the tower direction. You can use crossproduct to determine if they are the same direction)&#xD;&#xA;&#xD;&#xA;Still considering the same A and B as in the dot product part:&#xD;&#xA;&#xD;&#xA;&gt; A **x** B = [Ax, Ay, Az] **x** [Bx,&#xD;&#xA;&gt; By, Bz]&#xD;&#xA;&gt; &#xD;&#xA;&gt; A **x** B = [Ay*Bz - Az*By , Az*Bx -&#xD;&#xA;&gt; Ax*Bz , Ax*By - Ay*Bx ]&#xD;&#xA;&#xD;&#xA;If this result vector is equal to (or &quot;close to&quot;, depending of you needs) [0,0,0] then they should be parallels. then compute the dot product to verify if they are the same direction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, could also consider computing the distance between the segment (from tower position to the max radius using the first enemy direction) and the point (your current enemies list) : http://paulbourke.net/geometry/pointline/, or the distance from a point to a plane if you use 3D and flying enemies on top of grounded ones.&#xD;&#xA;&#xD;&#xA;Using the above techniques (distance from a point to a plan/segment), you should also consider previously reducing the number of enemies in your current enemies table using a simple vector dot product (the vector from the tower to the max distance in the first enemy direction, dot-product the vector from the tower to the enemy to test). If your dot product is greater than 0 they point to the &quot;same direction&quot;, if it is equal to 0 the vectors are perpendiculars and if the dot product is lower than 0, the vectors are in &quot;opposite&quot; directions. This way you can reduce the number of enemies to consider by keeping only those in the front direction... I beg this is useful only with a huge number of enemies, so it's up to you to decide if it worth it or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Edited: to reorganize the ideas...&#xD;&#xA;&#xD;&#xA;I beg your pardon if this is not clear enough, as I'm not really fluent at English, it could be unclear... so if I'm not I will try to reformulate." />
  <row Id="24663" PostHistoryTypeId="5" PostId="6433" RevisionGUID="03722509-6180-4ce0-b4fe-3d4ac90700df" CreationDate="2011-04-22T15:48:39.173" UserId="3588" Comment="Swapped the otherwise unused &quot;controls&quot; for input, specified the input and genre, then fixed some italics. Also removed a salutation. ♪" Text="So we recently launched a shoot 'em up arcade-type game (think [*Smash TV*](http://en.wikipedia.org/wiki/Smash_TV) or [*I Made a Game with Zombies in It!*](http://en.wikipedia.org/wiki/I_Made_a_Game_with_Zombies_in_It!)). You can move in one direction and fire in another, so the ideal control scheme is probably two analog joysticks (like the Xbox 360 has). We support WASD to move and arrow keys to fire. The best way to control though is to move with WASD and aim with the mouse.&#xD;&#xA;&#xD;&#xA;We're getting a lot of people [asking for mobile versions](http://twitter.com/#!/Wesley_Bao/status/13664193764917248) of the game (mostly for iPad and Android) and the problem is we just can't come up with a good way to translate the controls over to a touch device.&#xD;&#xA;&#xD;&#xA;Interestingly, someone actually [hacked an early version of our game a while back to work on Android](http://www.borismus.com/mobile-html-games/) by overlaying D-pads, and sure enough, it was almost impossible to control. The game gets really difficult later on, and the thought of releasing a game with a crappy control scheme that nobody could possibly ever use to beat the game does not sit well with me.&#xD;&#xA;&#xD;&#xA;So I was wondering if anyone has any previous experience or suggestions on how to approach this problem? Overlaying two D-pads on the screen is clearly not the way to go and we're kind of at a loss for other ideas." />
  <row Id="24664" PostHistoryTypeId="6" PostId="6433" RevisionGUID="03722509-6180-4ce0-b4fe-3d4ac90700df" CreationDate="2011-04-22T15:48:39.173" UserId="3588" Comment="Swapped the otherwise unused &quot;controls&quot; for input, specified the input and genre, then fixed some italics. Also removed a salutation. ♪" Text="&lt;game-design&gt;&lt;input&gt;&lt;touch&gt;&lt;shoot-em-up&gt;" />
  <row Id="24665" PostHistoryTypeId="24" PostId="6433" RevisionGUID="03722509-6180-4ce0-b4fe-3d4ac90700df" CreationDate="2011-04-22T15:48:39.173" Comment="Proposed by 3588 approved by 51 edit id of 382" />
  <row Id="24666" PostHistoryTypeId="6" PostId="6091" RevisionGUID="b338d847-bdd6-41ed-a3b7-0175f87df6b1" CreationDate="2011-04-22T15:55:55.210" UserId="3588" Comment="This has many similarities to the twin-stick question, but this isn't about twin sticks. Nevertheless, they do get the same tags. ♪" Text="&lt;game-design&gt;&lt;input&gt;&lt;touch&gt;&lt;shoot-em-up&gt;" />
  <row Id="24667" PostHistoryTypeId="24" PostId="6091" RevisionGUID="b338d847-bdd6-41ed-a3b7-0175f87df6b1" CreationDate="2011-04-22T15:55:55.210" Comment="Proposed by 3588 approved by 189 edit id of 383" />
  <row Id="24668" PostHistoryTypeId="6" PostId="11479" RevisionGUID="1e3900e2-29ec-4fa3-a7f6-e99614bb6221" CreationDate="2011-04-22T15:56:18.633" UserId="51" Comment="edited tags" Text="&lt;movement&gt;&lt;character&gt;" />
  <row Id="24669" PostHistoryTypeId="2" PostId="11498" RevisionGUID="252cc0f2-6b1b-4e84-af9d-4e3ef5e78ffc" CreationDate="2011-04-22T16:21:20.210" UserId="831" Text="I'm looking for a SIMD library focused small (4x4) matrix operations for graphics. There's lots of single precision ones out there, but I need to support both single and double precision.&#xD;&#xA;&#xD;&#xA;I've looked at Intel's IPP MX library, but I'd prefer something with source. I'm very interested in SSE3+ implementations of these particular operations:&#xD;&#xA;&#xD;&#xA;   1. Mat4 * Mat4&#xD;&#xA;   2. Mat4 * Vec4&#xD;&#xA;   3. Mat4 * Array of Mat4&#xD;&#xA;   4. Mat4 * Array of Vec4&#xD;&#xA;   5. Mat4 inversion (nice to have)" />
  <row Id="24670" PostHistoryTypeId="1" PostId="11498" RevisionGUID="252cc0f2-6b1b-4e84-af9d-4e3ef5e78ffc" CreationDate="2011-04-22T16:21:20.210" UserId="831" Text="Is there are a good double-precision small matrix SIMD library for x86?" />
  <row Id="24671" PostHistoryTypeId="3" PostId="11498" RevisionGUID="252cc0f2-6b1b-4e84-af9d-4e3ef5e78ffc" CreationDate="2011-04-22T16:21:20.210" UserId="831" Text="&lt;c++&gt;&lt;c&gt;&lt;matrix&gt;&lt;simd&gt;&lt;library&gt;" />
  <row Id="24672" PostHistoryTypeId="2" PostId="11499" RevisionGUID="10ef8b79-767d-4f60-8b47-8840efae21f6" CreationDate="2011-04-22T16:43:42.817" UserId="5259" Text="Here's a project that isn't bad: [SIMDx86][1], especially if you are just looking for source.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://simdx86.sourceforge.net/" />
  <row Id="24673" PostHistoryTypeId="5" PostId="11489" RevisionGUID="3ce96858-7841-4893-8d8d-d616dc9824b9" CreationDate="2011-04-22T16:48:48.643" UserId="1101" Comment="fixed spelling error" Text="Game development doesn't really take external ideas and fashion them into games. It's not like making films where you have a small chance of getting your script made into a movie if it lands in the right hands. It's more like writing a book where a first-time author is going to have to write every word himself before submitting it.&#xD;&#xA;&#xD;&#xA;So, you're pretty much guaranteed to need to take a hands-on approach to getting your game made. There are essentially 3 routes:&#xD;&#xA;&#xD;&#xA; * have a concrete skill to bring to the game-making process - typically game-specific such as art, design (not ideas, but concrete design), or programming. If you are willing to pull your weight, often you can find people willing to match your effort. (Whether they are capable of doing so is another matter.) Then you make the game for free in your spare time.&#xD;&#xA; * money to pay people with so that they will do your bidding. Most people have bills to pay and will happily build someone else's idea if it'll put food on the table.&#xD;&#xA; * join an existing company, again with a concrete game-making skill as above, and this time work on other people's games until you're in a senior enough position to be able to present your ideas to the team. This is the longest route and least likely to succeed, but is also probably the only route for games of a certain complexity and production standard.&#xD;&#xA;&#xD;&#xA;There isn't really an alternative because game ideas are considered worthless on their own. They're not worthless, of course - but the two main problems you face are:&#xD;&#xA;&#xD;&#xA; * most game developers already have more ideas than they have time to create (and have too little time in which to create them all). This is generally why they're into game development anyway - they had ideas, and so they picked up a skill to make them happen. The number of idle game coders waiting for someone to present them with a game idea is incredibly miniscule. I've been a moderator on Gamedev.net for 10 years and seen tens of thousands of posts there but I think I've only ever seen 3 people say, &quot;I'm a game coder - give me something to code&quot;.&#xD;&#xA; * it's generally not possible to spot the amazing ideas relative to the average ones until they are, at a minimum, prototyped into something playable. Nobody has set up a commercial 'slush pile' for games because you simply can't tell from a top-level concept whether the game would be fun, whether it would sell well, how long it would take to make, etc. Even if you restricted this to fully fleshed-out design documents, that only really helps with the development feasibility, not with determining how fun it'll be or how much it'll sell. So with this in mind, idea selection and production is left to the experienced - who will go with their own ideas (where possible - often they just end up making whatever the publisher is willing to fund)." />
  <row Id="24674" PostHistoryTypeId="5" PostId="11490" RevisionGUID="b6710dad-c75a-4d1b-a16c-d2c311f5daba" CreationDate="2011-04-22T16:49:55.863" UserId="1101" Comment="Fixed nonsensical grammar caused by cut-and-paste and poor proof-reading!" Text="Hobbyists, independent developers, and prospective developers discuss these things on this site, Gamedev.net, and various forums such as TigSource and Indiegamer. These are pretty much only the places where this sort of discussion happens.&#xD;&#xA;&#xD;&#xA;By comparison, professionals tend to carry out their high-level discussion of game design in a similar way to much academia: they publish books, papers, articles, give conference talks, and post blog entries, which are then discussed and cross-referenced. There's no reason why you couldn't start your own blog about your ideas, but you'll have trouble getting any traffic, because the average person's game concept is not going to be of much interest to the wider community. This is why typically you'd go for the first route, of game development forums.&#xD;&#xA;&#xD;&#xA;The reason there isn't anything more for this is partly because the professionals do a decent enough job of exchanging and discussing ideas, and partly because the ideas and concepts that a typical prospective developer comes up with are considered nearly worthless in the professional arena. (And as such, only of interest to one's peers on forums and the like.) This perception of worthlessness is because most professional game developers already have more of their own pet ideas than they have time to create (making ideas far too abundant for the average one to be worth much), and because the quality of a game is almost never intrinsic to the concept itself, meaning it can be almost useless in isolation without a full prototype or technical specification behind it - and usually the only people capable of making such a prototype or specification are already either in the industry, or are able to make the game themselves without presenting it to others." />
  <row Id="24675" PostHistoryTypeId="5" PostId="6008" RevisionGUID="42a8a82b-9db1-4b4b-b7c3-092f55343b22" CreationDate="2011-04-22T17:33:37.080" UserId="1198" Comment="added 6 characters in body" Text="Hey guys, I wanted to know what libraries or examples exist for WebSockets in .NET" />
  <row Id="24676" PostHistoryTypeId="6" PostId="11479" RevisionGUID="8eaa0497-ba4c-4625-819e-42eb8c8e2902" CreationDate="2011-04-22T17:47:48.917" UserId="4496" Comment="Was missing a relevent tag" Text="&lt;ogre&gt;&lt;movement&gt;&lt;character&gt;" />
  <row Id="24677" PostHistoryTypeId="24" PostId="11479" RevisionGUID="8eaa0497-ba4c-4625-819e-42eb8c8e2902" CreationDate="2011-04-22T17:47:48.917" Comment="Proposed by 4496 approved by 14 edit id of 384" />
  <row Id="24678" PostHistoryTypeId="25" PostId="11498" RevisionGUID="fb86a81d-ef32-47eb-9dc2-d76bac2c469b" CreationDate="2011-04-22T18:09:30.793" Comment="http://twitter.com/#!/StackGameDev/status/61491836149178369" />
  <row Id="24679" PostHistoryTypeId="5" PostId="7694" RevisionGUID="90d083ce-f286-4f86-ac07-fbfc5528d083" CreationDate="2011-04-22T18:14:22.533" UserId="4191" Comment="slight phrasing tweaks" Text="Am I a bad person because I think of these?&#xD;&#xA;&#xD;&#xA;* What do you do for fun? *(Translation: Do you have a social life that will interfere with putting in 60 hour weeks normally, 100+ hour weeks in crunch?)*&#xD;&#xA;* How do you balance your personal life with work? *(Translation: Have you had experience with a normal job that you put in a day at and then go home from when you're done, or can we format your brain with the insane expectations that make us money?)*&#xD;&#xA;* Where do you see yourself in five years? *(Translation: Do we have a reasonable shot at keeping you in the same code monkey role for several product cycles?)*&#xD;&#xA;&#xD;&#xA;**Disclaimer**: Please note that this answer contains a high quotient of bitterness and cynicism, and that its contents reflect a worst-case scenario that the gaming industry is unfortunately notorious for.  There are many ethical and benignly-motivated people performing hiring and management in the industry, and being asked any of these questions *does not* automatically mean that the &quot;translations&quot; apply." />
  <row Id="24683" PostHistoryTypeId="2" PostId="11501" RevisionGUID="36ab9e81-e8f3-421c-abd6-f39ddb609cdb" CreationDate="2011-04-22T19:16:10.243" UserId="1198" Text="In my opinion, based on the question you asked, I think you should do a couple things:&#xD;&#xA;&#xD;&#xA; 1. Scale back your plans, start with something simple, otherwise you'll get frusterated and give up&#xD;&#xA; 2. Check out a few of the &quot;Getting Started&quot; questions on this site:&#xD;&#xA;&#xD;&#xA;  - http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games&#xD;&#xA;  - http://gamedev.stackexchange.com/questions/2530/getting-started-in-game-development-is-xna-a-good-choice&#xD;&#xA;  - http://gamedev.stackexchange.com/questions/4011/getting-started-questions&#xD;&#xA;  - http://gamedev.stackexchange.com/questions/513/how-should-i-get-started-on-this-very-simple-game&#xD;&#xA;  - Finally: http://gamedev.stackexchange.com/search?q=get+started&#xD;&#xA;&#xD;&#xA;To answer the specific question, Java is not a bad choice, in fact many [famous games][1] have been created with Java. The game you linked to appears to be in Shockwave, not a horrible choice for on-line web games, though I think Flash is a bit more common on end user machines.&#xD;&#xA;&#xD;&#xA;That all said, personally, I think that XNA is a good starting point because the barrier to entry is extremely low. The drawback is that its not cross-platform, if thats a cut you are willing to make, I think XNA is the way to go; however, if you just want to make a game and not worry about programming GameMaker is not a bad choice to test out your game idea and see if its fun or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java" />
  <row Id="24684" PostHistoryTypeId="5" PostId="11427" RevisionGUID="728250f0-6349-43b1-89bb-9174ac10dd19" CreationDate="2011-04-22T19:19:27.573" UserId="1198" Comment="deleted 13 characters in body" Text="I am building a game that is tile-based (filled with glowy vector squares). Right now, I am considering using instancing for drawing these, but I would like to know if there is a faster approach.&#xD;&#xA;&#xD;&#xA;The squares are all of the same size. They should be rendered in a rectangular grid, and I know exactly how many of them I should render. The squares are also made with linelists (so 8 vertices for a single rectangle).&#xD;&#xA;&#xD;&#xA;Knowing all this, is instancing still the best approach? Or can I utilize the GPU more here? (in my game, I only utilize 1% of the GPU, but 100% of the CPU)." />
  <row Id="24685" PostHistoryTypeId="2" PostId="11502" RevisionGUID="0feb3803-a191-4b5d-ba9a-d5740c720058" CreationDate="2011-04-22T19:34:18.567" UserId="1829" Text="http://altdevblogaday.org/2011/02/24/introduction-to-behavior-trees/&#xD;&#xA;&#xD;&#xA;Obviously the most interesting article I found on this website. What do you think about it ?&#xD;&#xA;&#xD;&#xA;It lacks some code example, don't you know any ? I also read that state machines are not very flexible compared to behaviour trees... On top of that I'm not sure if there is a true link between state machines and the state pattern... is there ?" />
  <row Id="24686" PostHistoryTypeId="1" PostId="11502" RevisionGUID="0feb3803-a191-4b5d-ba9a-d5740c720058" CreationDate="2011-04-22T19:34:18.567" UserId="1829" Text="Behaviour tree code example ?" />
  <row Id="24687" PostHistoryTypeId="3" PostId="11502" RevisionGUID="0feb3803-a191-4b5d-ba9a-d5740c720058" CreationDate="2011-04-22T19:34:18.567" UserId="1829" Text="&lt;ai&gt;&lt;game-industry&gt;&lt;state&gt;&lt;tree&gt;&lt;behavior&gt;" />
  <row Id="24688" PostHistoryTypeId="2" PostId="11503" RevisionGUID="6c4aa4cf-395d-4bdc-a792-f9c0d534ffcb" CreationDate="2011-04-22T21:08:20.040" UserId="5554" Text="That's frames per hour.&#xD;&#xA;&#xD;&#xA;I've had plenty of times where data throttling/pushing was based on a poll of what's going on in regard to frames per minute. &#xD;&#xA;&#xD;&#xA;To perfectly implement 60+ fps of course there are some times where I need to look ahead, prerender some stuff if possible and dial down some details to allow some other stuff through, etc.. So far I haven't had to look much further ahead than 5 minutes, maybe 10 at the most.&#xD;&#xA;&#xD;&#xA;Are there any real situations (however niche) where developers need or can make good use of seriously monitoring frames per hour to make dynamic adjustments? So far I can only see use in benchmarking really." />
  <row Id="24689" PostHistoryTypeId="1" PostId="11503" RevisionGUID="6c4aa4cf-395d-4bdc-a792-f9c0d534ffcb" CreationDate="2011-04-22T21:08:20.040" UserId="5554" Text="216,000+ FPH - Is it ever a useful measurement?" />
  <row Id="24690" PostHistoryTypeId="3" PostId="11503" RevisionGUID="6c4aa4cf-395d-4bdc-a792-f9c0d534ffcb" CreationDate="2011-04-22T21:08:20.040" UserId="5554" Text="&lt;rendering&gt;&lt;game-mechanics&gt;&lt;performance&gt;&lt;frame-rate&gt;&lt;data&gt;" />
  <row Id="24692" PostHistoryTypeId="2" PostId="11504" RevisionGUID="1034a4c2-0671-423e-842a-0c7b52192335" CreationDate="2011-04-22T21:17:26.300" UserId="744" Text="Frames per hour is an okay measurement if you're making a render farm or some other non-realtime rendering system. (A better measurement would be hours/hour though.)&#xD;&#xA;&#xD;&#xA;Frames per second is not particularly useful either, and most developers that are any good at optimization will look at ms/frame instead, even if they still describe targets as X fps.&#xD;&#xA;&#xD;&#xA;This question seems a bit artificial because I've never seen anyone actually describing measurements as such though." />
  <row Id="24693" PostHistoryTypeId="2" PostId="11505" RevisionGUID="b7c8d60f-671c-4140-9378-a5de76342af3" CreationDate="2011-04-22T21:57:45.367" UserId="1839" Text="Seems almost as useful as a speed limit saying &quot;2400 km/day&quot; or &quot;614400 km/year&quot; ;)    &#xD;&#xA;&#xD;&#xA;From the mathematical standpoint it makes no difference, but we humans have a narrow perception and we can deal much better with smaller numbers and time-frames.  &#xD;&#xA; &#xD;&#xA;If you throw 216,000+ FPH at me, I had no idea how long a frame is.   &#xD;&#xA;&#xD;&#xA;If you tell me 30 frame/s I can calculate without a calculator that 1 frame is 33.3 ms. &#xD;&#xA;&#xD;&#xA;So no, I don't think it's a useful measurement, I never heard somebody using it during 6 years in game-industry." />
  <row Id="24694" PostHistoryTypeId="2" PostId="11506" RevisionGUID="868d8595-8526-40d9-8e72-4e2f14c8e266" CreationDate="2011-04-22T21:59:17.193" UserId="6843" Text="There are times when it is necessary, for &quot;serious&quot; applications, such as real-life Flight Simulators.&#xD;&#xA;" />
  <row Id="24695" PostHistoryTypeId="2" PostId="11507" RevisionGUID="0a1cb87e-ee7a-4f75-ac6a-e80431d056b7" CreationDate="2011-04-22T22:01:28.263" UserId="1929" Text="**What are my options for writing C# code to produce a 2D iPhone game?**&#xD;&#xA;&#xD;&#xA;I specifically mention 2D -- Unity will not suffice for me (even though it can &quot;fake&quot; it with a 2.5D game). &#xD;&#xA;&#xD;&#xA;I like C# because of language features (LINQ, garbage collection, generic collections, etc.) although I would be open to considering Java as well if nothing exists. Objective C is not my cup of tea." />
  <row Id="24696" PostHistoryTypeId="1" PostId="11507" RevisionGUID="0a1cb87e-ee7a-4f75-ac6a-e80431d056b7" CreationDate="2011-04-22T22:01:28.263" UserId="1929" Text="Writing C# for iPhone 2D Game Dev - Not Unity" />
  <row Id="24697" PostHistoryTypeId="3" PostId="11507" RevisionGUID="0a1cb87e-ee7a-4f75-ac6a-e80431d056b7" CreationDate="2011-04-22T22:01:28.263" UserId="1929" Text="&lt;2d&gt;&lt;c#&gt;&lt;engine&gt;&lt;iphone&gt;" />
  <row Id="24698" PostHistoryTypeId="2" PostId="11508" RevisionGUID="fde68e1f-4641-4e4e-82af-f7f33cb47f06" CreationDate="2011-04-22T22:05:41.827" UserId="6900" Text="Famously the Sims and similar games have been described by some designers as Toys and not &quot;really&quot; games.&#xD;&#xA;&#xD;&#xA;I'm curious if there is a good answer to what makes something a game.&#xD;&#xA;&#xD;&#xA;For example many companies sell Sudoku games - EA has an iPhone one, IronSudoku offers a great web based one, and there are countless others on most platforms. &#xD;&#xA;&#xD;&#xA;Many newspapers publish Sudoku puzzles in their print editions and often online.&#xD;&#xA;&#xD;&#xA;What differentiates a game from a puzzle? (or are all Sudoku &quot;games&quot; misnamed?) &#xD;&#xA;&#xD;&#xA;I'm not convinced there is a simple or easy answer - but I'd love to be proven wrong. I've seen some definitions and emphasize &quot;rules&quot; as core to something being a game (vs. &quot;real life&quot;) but puzzles have rules as well - as do many other things. &#xD;&#xA;&#xD;&#xA;I'm open to answers that either focus only on computer games (on any platform) or which expand to include games and gameplay across many platforms. Here to I'm not fully convinced the lines are clear - is a &quot;game&quot; of D&amp;D played over a virtual tabletop with computer dice rollers, video &amp; audio chat a computer game or something else? (I'd lean towards something else - but where do you draw that line?)" />
  <row Id="24699" PostHistoryTypeId="1" PostId="11508" RevisionGUID="fde68e1f-4641-4e4e-82af-f7f33cb47f06" CreationDate="2011-04-22T22:05:41.827" UserId="6900" Text="What makes a game a game vs something else like a puzzle or a toy?" />
  <row Id="24700" PostHistoryTypeId="3" PostId="11508" RevisionGUID="fde68e1f-4641-4e4e-82af-f7f33cb47f06" CreationDate="2011-04-22T22:05:41.827" UserId="6900" Text="&lt;game-design&gt;&lt;game-industry&gt;" />
  <row Id="24701" PostHistoryTypeId="5" PostId="11505" RevisionGUID="e74c1757-75d4-425d-8e1f-aa5fef702621" CreationDate="2011-04-22T22:05:42.070" UserId="1839" Comment="added 221 characters in body" Text="Seems almost as useful as a speed limit saying &quot;2400 km/day&quot; or &quot;614400 km/year&quot; ;)    &#xD;&#xA;&#xD;&#xA;From the mathematical standpoint it makes no difference, but we humans have a narrow perception and we can deal much better with smaller numbers and time-frames.  &#xD;&#xA; &#xD;&#xA;If you throw 216,000+ FPH at me, I had no idea how long a frame is.   &#xD;&#xA;&#xD;&#xA;If you tell me 30 frame/s I can calculate without a calculator that 1 frame is 33.3 ms. &#xD;&#xA;&#xD;&#xA;So no, I don't think it's a useful measurement, I never heard somebody using it during 6 years in game-industry.&#xD;&#xA;&#xD;&#xA;**Edit:** Now that I think about it, it would make sense, if 1 frame is very long, like 30 mins, then it is 2 frames/hour, but I doubt the fun factor of that game would be very high ;)&#xD;&#xA;So still &quot;No&quot; for game-industry" />
  <row Id="24702" PostHistoryTypeId="2" PostId="11509" RevisionGUID="390b6c1e-d3ad-4623-9204-31ee480851f6" CreationDate="2011-04-22T22:19:03.587" UserId="962" Text="FPH? I had no idea what that meant till I clicked on this question.&#xD;&#xA;&#xD;&#xA;And **no** I cannot see what could be useful about knowing how many frames per hour.&#xD;&#xA;&#xD;&#xA;What would be useful is logging the frames per second over time to make a visual graph, or to analyze programmatically.&#xD;&#xA;&#xD;&#xA;With frames per hour, you could have 60fps most of the time, and every 20 seconds 1fps, and the final reading wont look different than a solid fps that is lower than 60." />
  <row Id="24703" PostHistoryTypeId="4" PostId="11503" RevisionGUID="2d575268-ef18-47d6-908b-d90345c212a1" CreationDate="2011-04-22T22:21:31.667" UserId="51" Comment="edited title; deleted 27 characters in body" Text="216,000+ frames per hour - Is it ever a useful measurement?" />
  <row Id="24704" PostHistoryTypeId="5" PostId="11503" RevisionGUID="2d575268-ef18-47d6-908b-d90345c212a1" CreationDate="2011-04-22T22:21:31.667" UserId="51" Comment="edited title; deleted 27 characters in body" Text="I've had plenty of times where data throttling/pushing was based on a poll of what's going on in regard to frames per minute. &#xD;&#xA;&#xD;&#xA;To perfectly implement 60+ fps of course there are some times where I need to look ahead, prerender some stuff if possible and dial down some details to allow some other stuff through, etc.. So far I haven't had to look much further ahead than 5 minutes, maybe 10 at the most.&#xD;&#xA;&#xD;&#xA;Are there any real situations (however niche) where developers need or can make good use of seriously monitoring frames per hour to make dynamic adjustments? So far I can only see use in benchmarking really." />
  <row Id="24705" PostHistoryTypeId="2" PostId="11510" RevisionGUID="b5c19f50-f9dc-4194-81d9-8894d38579ee" CreationDate="2011-04-22T22:29:47.787" UserId="51" Text="There are two very different questions here.&#xD;&#xA;&#xD;&#xA;All puzzles are games to some extent.  Not all games are puzzles.  Calling Sudoku a &quot;game&quot; or a &quot;puzzle&quot; doesn't seem to make a difference to me, and I don't think it's a very interesting question.  Unfortunately it seems to be the bulk of your question.  Maybe there's an argument that a specific instance of a sudoku board is a &quot;puzzle&quot; whereas the sum total of the rules and the concept of sudoku is the &quot;game&quot;.&#xD;&#xA;&#xD;&#xA;What makes a game a &quot;toy&quot; is a bit more interesting to me, if only because some of the iconic games of recent times have very toy-like qualities.  Minecraft is a toy.  So's The Sims.  So's Garry's Mod.  &#xD;&#xA;&#xD;&#xA;Toy-type games are typically heavy on some kind of emergent behavior.  Often times it's physics related, sometime's it's AI related, but there's a pretty common theme of a lot of user direction.  The idea is that you're not trying to hit some specific game-designer-given goal, but instead you're put in an environment with certain rules and playing around with those rules is what gives you your enjoyment.  " />
  <row Id="24706" PostHistoryTypeId="2" PostId="11511" RevisionGUID="1656430a-1011-4598-abae-a6cef4ca9a60" CreationDate="2011-04-22T22:31:05.617" UserId="51" Text="You can use MonoTouch and write your own GL code, but it isn't nearly as fast to get something up and running as using Unity.&#xD;&#xA;&#xD;&#xA;http://forums.monotouch.net/yaf_postst1420.aspx" />
  <row Id="24707" PostHistoryTypeId="5" PostId="11505" RevisionGUID="605d9e65-f2ba-4e33-8df6-af9dfe8999b2" CreationDate="2011-04-22T22:31:51.937" UserId="1839" Comment="added 34 characters in body; deleted 2 characters in body; added 6 characters in body" Text="Seems almost as useful as a speed limit saying &quot;2400 km/day&quot; or &quot;614400 km/year&quot;. Both are the same as &quot;100 km/hour&quot;.  &#xD;&#xA;&#xD;&#xA;From the mathematical standpoint it makes no difference, but we humans have a narrow perception and we can deal much better with smaller numbers and time-frames.  &#xD;&#xA; &#xD;&#xA;If you throw 216,000+ FPH at me, I had no idea how long a frame is.   &#xD;&#xA;&#xD;&#xA;If you tell me 30 frame/s I can calculate without a calculator that 1 frame is 33.3 ms. &#xD;&#xA;&#xD;&#xA;So no, I don't think it's a useful measurement, I never heard somebody using it during several years in game-industry.&#xD;&#xA;&#xD;&#xA;**Edit:** Now that I think about it, it would make sense, if 1 frame is very long, like 30 mins, then it is 2 frames/hour, but I doubt the fun factor of that game would be very high ;)&#xD;&#xA;So still &quot;No&quot; for game-industry" />
  <row Id="24708" PostHistoryTypeId="5" PostId="11507" RevisionGUID="14e7dd54-34be-4adf-adb6-c5700a9ff345" CreationDate="2011-04-22T22:36:05.457" UserId="1929" Comment="added 35 characters in body" Text="**What are my options for writing C# code to produce a 2D iPhone game?**&#xD;&#xA;&#xD;&#xA;I specifically mention 2D -- Unity will not suffice for me (even though it can &quot;fake&quot; it with a 2.5D game). &#xD;&#xA;&#xD;&#xA;I like C# because of language features (LINQ, garbage collection, generic collections, etc.) although I would be open to considering Java as well if nothing exists. Objective C is not my cup of tea.&#xD;&#xA;&#xD;&#xA;And **I don't own a Mac.** Eek." />
  <row Id="24709" PostHistoryTypeId="5" PostId="11503" RevisionGUID="f5a90486-8094-4af4-ac99-6aecf8dd816c" CreationDate="2011-04-22T22:50:09.677" UserId="5554" Comment="added 227 characters in body; edited title" Text="How useful is it to keep a measurement of framerate over the course of long times spanning multiple scenes/data environments? Anyone come across anything this helps with aside from straight benchmarking?&#xD;&#xA;&#xD;&#xA;I've had plenty of times where data throttling/pushing was based on a poll of what's going on in regard to framerate over the course of a minute. &#xD;&#xA;&#xD;&#xA;To perfectly implement 60+ fps of course there are some times where I need to look ahead, prerender some stuff if possible and dial down some details to allow some other stuff through, etc.. So far I haven't had to look much further ahead than 5 minutes, maybe 10 at the most.&#xD;&#xA;&#xD;&#xA;Are there any real situations (however niche) where developers need or can make good use of seriously monitoring frames per hour to make dynamic adjustments? So far I can only see use in benchmarking really." />
  <row Id="24710" PostHistoryTypeId="4" PostId="11503" RevisionGUID="f5a90486-8094-4af4-ac99-6aecf8dd816c" CreationDate="2011-04-22T22:50:09.677" UserId="5554" Comment="added 227 characters in body; edited title" Text="Frames per hour - Is it ever a useful measurement?" />
  <row Id="24711" PostHistoryTypeId="2" PostId="11512" RevisionGUID="5351793a-2cf2-48ba-b1cd-5bc9b4659e4f" CreationDate="2011-04-22T22:53:07.163" UserId="3128" Text="I would like to make a 360 game and was just wondering if I could re-use some existing C code I have or whether I need to re-write everything in C#.  Any help is appreciated." />
  <row Id="24712" PostHistoryTypeId="1" PostId="11512" RevisionGUID="5351793a-2cf2-48ba-b1cd-5bc9b4659e4f" CreationDate="2011-04-22T22:53:07.163" UserId="3128" Text="Can I call c functions within the XNA framework?" />
  <row Id="24713" PostHistoryTypeId="3" PostId="11512" RevisionGUID="5351793a-2cf2-48ba-b1cd-5bc9b4659e4f" CreationDate="2011-04-22T22:53:07.163" UserId="3128" Text="&lt;xna&gt;&lt;c#&gt;&lt;xbox360&gt;&lt;c&gt;" />
  <row Id="24714" PostHistoryTypeId="2" PostId="11513" RevisionGUID="91f09f1e-7f6e-4353-864e-fcc278484f1b" CreationDate="2011-04-22T23:00:00.773" UserId="3115" Text="I believe part of the strategy from Apple is that you OWN a Mac if you want to become a developer. I haven't checked the latest articles/details regarding their licensing system, but I know that Adobe is now able to ship Flash Builder 4.5 which generates code for the iPhone. I wonder if you still need a Mac to upload it to iTunes.&#xD;&#xA;&#xD;&#xA;Xcode, the developer tool from Apple for iOS is Mac only.&#xD;&#xA;&#xD;&#xA;There is another approach I've been told though. If you have a spare PC or harddrive, you can buy the original Mac OSX DVD (actually rather cheap last time I checked) and then with a lot of tweaking and researching, you can install Mac OSX ontop of PC hardware and have a dual boot machine.&#xD;&#xA;&#xD;&#xA;Look on google for &quot;hackintosh&quot;. Its not every PC that will work with this, but search, read and try - it ought to be possible. I am not sure what Apple thinks about this, but if you start by buying the original Mac OSX instead of using a pirated copy, I believe you should be &quot;okay&quot; - cant promise you anything, but thats what I've been told by someone who did it himself." />
  <row Id="24715" PostHistoryTypeId="6" PostId="11502" RevisionGUID="ea0e0053-158f-40cc-a1dc-17b595093c58" CreationDate="2011-04-22T23:06:59.190" UserId="51" Comment="edited tags" Text="&lt;ai&gt;&lt;state&gt;&lt;tree&gt;&lt;behavior&gt;" />
  <row Id="24716" PostHistoryTypeId="2" PostId="11514" RevisionGUID="fca53496-89d8-4ef2-b21c-4827cc2feb85" CreationDate="2011-04-22T23:14:06.130" UserId="5554" Text="I think this can be rather simple or rather complex.&#xD;&#xA;&#xD;&#xA; - You don't really 'play' a toy, but you can play *with* a toy. Pretty similar for the sims. You can make situations that are games, but it is more open-ended.&#xD;&#xA; - Puzzles are totally goal-driven. To 'win' you must solve it. Toys on the other hand have more of an intended use than a goal and you typically can't win at a toy. Sometimes a game can be a set of puzzles that tie coherently together (like chess) but it can be much more and the path to the goal is not generally a static set of state changes.&#xD;&#xA; - Not always, but games are usually *designed* to entertain or otherwise engage players. Not to say other models do not also do this... This point is tough for me to describe but it is at least partly obvious. All three examples can be fun..differently.&#xD;&#xA; - It may be possible to say that all games are puzzles in that they all rely on some degree of problem solving, even reaction-driven games. The programing certainly makes it feel like you are setting up puzzles. I think there is a difference in there somewhere though.&#xD;&#xA;&#xD;&#xA;Sorry that half of this is a bit vague, that's quite a brain teaser, lol :) I will try to come back to this if I can think it through a bit further." />
  <row Id="24717" PostHistoryTypeId="5" PostId="11503" RevisionGUID="857bf5b1-f6ed-4c39-9ab2-280d7d8bee7e" CreationDate="2011-04-22T23:23:32.517" UserId="5554" Comment="added 229 characters in body" Text="How useful is it to keep a measurement of framerate over the course of long times spanning multiple scenes/data environments? Anyone come across anything this helps with aside from straight benchmarking?&#xD;&#xA;&#xD;&#xA;I've had plenty of times where data throttling/pushing was based on a poll of what's going on in regard to framerate over the course of a minute. &#xD;&#xA;&#xD;&#xA;To perfectly implement 60+ fps of course there are some times where I need to look ahead, prerender some stuff if possible and dial down some details to allow some other stuff through, etc.. So far I haven't had to look much further ahead than 5 minutes, maybe 10 at the most.&#xD;&#xA;&#xD;&#xA;Are there any real situations (however niche) where developers need or can make good use of seriously monitoring frames per hour to make dynamic adjustments? So far I can only see use in benchmarking really.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`Edit: To try and clarify: I'm talking about [time for individual frames to render] in different settings over the course of an hour. Basically a line graph of how many fps for an hour, but it can get a bit more precise.`&#xD;&#xA;" />
  <row Id="24718" PostHistoryTypeId="5" PostId="11505" RevisionGUID="b2e8e119-7d17-4c9a-8331-9f52f1d395ce" CreationDate="2011-04-22T23:49:12.650" UserId="1839" Comment="added 3 characters in body" Text="Seems almost as useful as a speed limit saying &quot;2400 km/day&quot; or &quot;614400 km/year&quot;. Both are the same as &quot;100 km/hour&quot;.  &#xD;&#xA;&#xD;&#xA;From the mathematical standpoint it makes no difference, but we humans have a narrow perception and we can deal much better with smaller numbers and time-frames.  &#xD;&#xA; &#xD;&#xA;If you throw 216,000+ FPH at me, I had no idea how long a frame is.   &#xD;&#xA;&#xD;&#xA;If you tell me 30 frame/s I can calculate without a calculator that 1 frame is 33.3 ms. &#xD;&#xA;&#xD;&#xA;So no, I don't think it's a useful measurement, I've never heard somebody using it during several years in game-industry.&#xD;&#xA;&#xD;&#xA;**Edit:** Now that I think about it, it would make sense, if 1 frame is very long, like 30 mins, then it is 2 frames/hour, but I doubt the fun factor of that game would be very high ;)&#xD;&#xA;So still &quot;No&quot; for game-industry" />
  <row Id="24719" PostHistoryTypeId="2" PostId="11515" RevisionGUID="d64e2e5b-6d97-49b7-84b3-8e1b05e390c8" CreationDate="2011-04-22T23:50:59.780" UserId="6040" Text="Quite a few years ago, when professional vehicle simulators were *very* expensive, I heard about a vessel simulator (e.g oil tanker type of vessel) which had a frame rate of 2 frames/second.&#xD;&#xA;&#xD;&#xA;In *that* context a 120 frames/hour metric would be meaningful, perhaps even more useful compared to 2 frames/second, especially if you have reason to believe that those two numbers are not exact but something that has been estimated.&#xD;&#xA;&#xD;&#xA;Assume the scenario that those numbers (120 and 2) are based on some values that are rounded to 120 or 2 respectively.  In the case of 2, you could expect the frame rate to vary quite a lot, anywhere from 1.5 to 2.5 frames per second.  In the case of 120, the frame rate could vary from 115 to 125 frames per hour, which is a bit more accurate.&#xD;&#xA;&#xD;&#xA;But again, quite a hypothetical kind of simulator software these days." />
  <row Id="24720" PostHistoryTypeId="2" PostId="11516" RevisionGUID="ace1ccb4-1352-4132-b904-dfe076734d96" CreationDate="2011-04-22T23:57:11.473" UserId="1101" Text="No, there's no use for frames per hour, in a system that requires multiple frames per second. it would be like measuring speed in millimetres per hour or something.&#xD;&#xA;&#xD;&#xA;Even if you did have a situation where you want to look forward 10 minutes (why?!) to predict some slowdown event, any problem will manifest itself as a sharp negative spike in the frame rate at that point. By merging that freak event into the more normal rendering 5 minutes either side of it and looking at the 10 minute aggregate, you actually make it harder to spot these problems, not easier.&#xD;&#xA;&#xD;&#xA;Mathematically speaking, taking the average of a set of samples effectively applies a low-pass filter to the data, leaving you with less information than you started with. The larger the set of samples, the more the filter cuts out. Since there's nothing you can do with less information that can't be done with more information, there's no use for this value." />
  <row Id="24721" PostHistoryTypeId="2" PostId="11517" RevisionGUID="1b684dfa-07c5-465e-923c-0632162b9cf7" CreationDate="2011-04-23T00:06:07.177" UserId="1101" Text="A toy is an instrument with which you play.&#xD;&#xA;&#xD;&#xA;A game is a system of rules for structured play.&#xD;&#xA;&#xD;&#xA;A puzzle is a type of game where completion results from discovering a hidden solution.&#xD;&#xA;&#xD;&#xA;Obviously the &quot;computer game industry&quot; and most of its customers calls any sort of software entertainment product a game, and thus it is one. However, if you choose to be more specific, the definitions above can help.&#xD;&#xA;&#xD;&#xA;(Yes, these are a bit vague and can overlap. Most things in life cannot be clearly segregated into one pile or another. If I show you something red you'll agree it's red, and if I show you something orange you'll agree it's orange, but there are infinite shades in between.)" />
  <row Id="24722" PostHistoryTypeId="25" PostId="11503" RevisionGUID="a42b61c2-53e8-4cba-b309-d2e174dd0b56" CreationDate="2011-04-23T00:09:31.937" Comment="http://twitter.com/#!/StackGameDev/status/61582437540577280" />
  <row Id="24723" PostHistoryTypeId="2" PostId="11518" RevisionGUID="a8b6d21f-04e2-4bf2-af8d-ae1e5a6887a1" CreationDate="2011-04-23T00:12:20.403" UserId="6825" Text="Previous posters have pretty well nailed down the difference between a &quot;toy&quot; and a &quot;puzzle or game&quot;; puzzles and games have a goal, whereas toys are just meant to be played with until you're sick of it.&#xD;&#xA;&#xD;&#xA;I would define the difference between a &quot;game&quot; and a &quot;puzzle&quot; as the element of competition. In a game, you're competing &lt;i&gt;against&lt;/i&gt; something: another player, an AI, time pressure, &amp;c. Essentially, you might &lt;i&gt;lose&lt;/i&gt; a game through the action of another agent, whereas with a puzzle the only way you fail to win is by giving up.&#xD;&#xA;&#xD;&#xA;This definition automatically implies that competitive puzzle-solving becomes a game, which makes sense to me.&#xD;&#xA;&#xD;&#xA;Stated another way, my distinctions among these three terms are their ending conditions.&#xD;&#xA;&#xD;&#xA; - toy: give up &#xD;&#xA; - puzzle: win OR give up&#xD;&#xA; - game: win OR lose" />
  <row Id="24724" PostHistoryTypeId="2" PostId="11519" RevisionGUID="99c6325b-09d8-4efb-9e8f-d4efb30eedd7" CreationDate="2011-04-23T00:24:43.773" UserId="2306" Text="Yes and no. &#xD;&#xA;&#xD;&#xA;Officially, the only thing you can use on the 360 with xna is c#. You cant ship any unmanaged DLLs with an app on xbox live, and if you want to write your game in C, you need a dev kit and an impossible-to-get contract with Redmond. &#xD;&#xA;&#xD;&#xA;That said, anything you can compile into CIL that will run on the compact framework will be okay. If you can convince your code to compile as managed c++, you should be able to get it to work. " />
  <row Id="24725" PostHistoryTypeId="5" PostId="11518" RevisionGUID="de6a3340-2c35-4b4f-b12b-0e15e8588c94" CreationDate="2011-04-23T00:24:57.103" UserId="6825" Comment="added 1413 characters in body; added 92 characters in body; added 67 characters in body; added 71 characters in body" Text="Previous posters have pretty well nailed down the difference between a &quot;toy&quot; and a &quot;puzzle or game&quot;; puzzles and games have a goal, whereas toys are just meant to be played with until you're sick of it.&#xD;&#xA;&#xD;&#xA;I would define the difference between a &quot;game&quot; and a &quot;puzzle&quot; as the element of competition. In a game, you're competing &lt;i&gt;against&lt;/i&gt; something: another player, an AI, time pressure, &amp;c. Essentially, you might &lt;i&gt;lose&lt;/i&gt; a game through the action of another agent, whereas with a puzzle the only way you fail to win is by giving up.&#xD;&#xA;&#xD;&#xA;This definition automatically implies that competitive puzzle-solving becomes a game, which makes sense to me. Also, puzzle-solving against a countdown timer becomes a game, which is again fine with me.&#xD;&#xA;&#xD;&#xA;Stated another way, my distinctions among these three terms are their ending conditions.&#xD;&#xA;&#xD;&#xA; - toy: give up &#xD;&#xA; - puzzle: win OR give up&#xD;&#xA; - game: win OR lose OR give up before completion&#xD;&#xA;&#xD;&#xA;Note that altering your perspective can move a particular artifact among these categories. Generally, expanding your time scale will tend to move an artifact up the chart. For example, each life in Portal is clearly a game; either you beat the level, or GlaDOS kills you. However, Portal as a whole is more of a puzzle, since in the end you WILL either figure out the way to beat the level, or you'll give up; GlaDOS never permanently prevents you from trying again. Completing a shelter before the monsters get you in Minecraft is a game; eventually completing your shelter, possibly with many respawns, so that you'll be safe from monsters in the future is a puzzle; Minecraft as a whole is clearly a toy (it has no built-in permanent end condition).&#xD;&#xA;&#xD;&#xA;This classification isn't perfect, of course. Dwarf Fortress is an interesting example. As a game, your objective on a single embark is presumably to create a fortress that can... something. Hmm. As a toy, the possibilities are limitless; I've seen a 4-function calculator implemented in DF (yes, this is &lt;s&gt;insane&lt;/s&gt; awesome). The problem with my classification is that any given DF fortress clearly has a &lt;i&gt;lose&lt;/i&gt; condition, or you can stop playing (give up), but it has no obvious &lt;/i&gt;win&lt;/i&gt; condition. You can set your own win condition, which clearly makes it a game, but without doing so it doesn't really fall into any of these possibilities. Possibly I need a 4th category for &quot;toys that menace with spikes of evil&quot; to fit a single DF fortress into." />
  <row Id="24726" PostHistoryTypeId="2" PostId="11520" RevisionGUID="81f3159e-3c05-442a-878d-f7e69b75bd6a" CreationDate="2011-04-23T01:32:56.820" UserId="6875" Text="Given the point&#xD;&#xA;&#xD;&#xA;    Vector pos = new Vector(0.0, 0.20156815648078918, -78.30000305175781, 1.0);&#xD;&#xA;&#xD;&#xA;and the plane (triangle)&#xD;&#xA;&#xD;&#xA;    Vector a = new Vector(-6.599999904632568, 0.0, -78.5, 1.0);&#xD;&#xA;    Vector b = new Vector(6.599999904632568, 0.0, -78.5, 1.0);&#xD;&#xA;    Vector c = new Vector(6.599999904632568, 4.400000095367432, -78.5, 1.0);&#xD;&#xA;&#xD;&#xA;I want to get a plane normal pointing in the direction of `pos`&#xD;&#xA;&#xD;&#xA;    //Getting plane normal&#xD;&#xA;    Vector ac = Vector.Subtract(a,c);&#xD;&#xA;    Vector bc = Vector.Subtract(b,c);&#xD;&#xA;    Vector planeNormal = Vector.CrossProduct(bc, ac);&#xD;&#xA;    &#xD;&#xA;    //Testing which side of the plane the point is on&#xD;&#xA;    double dprod = Vector.DotProduct(planeNormal, pos);&#xD;&#xA;    if (dprod &lt; 0)&#xD;&#xA;    {&#xD;&#xA;        planeNormal.Negate();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But this method is wrong. The resulting `planeNormal` points in the negative Z direction, so it should not be negated. I guess I have to translate my point to (0,0,0) somehow, maybe with the distance vector of plane-&gt;`pos`? Please help me, I fail massively @ math :)" />
  <row Id="24727" PostHistoryTypeId="1" PostId="11520" RevisionGUID="81f3159e-3c05-442a-878d-f7e69b75bd6a" CreationDate="2011-04-23T01:32:56.820" UserId="6875" Text="Given a plane and a point, how can I determine which side of the plane the point is on?" />
  <row Id="24728" PostHistoryTypeId="3" PostId="11520" RevisionGUID="81f3159e-3c05-442a-878d-f7e69b75bd6a" CreationDate="2011-04-23T01:32:56.820" UserId="6875" Text="&lt;collision-detection&gt;&lt;normals&gt;" />
  <row Id="24729" PostHistoryTypeId="2" PostId="11521" RevisionGUID="fe1ad0f8-1300-47a7-bdcf-ff08f3eb4a49" CreationDate="2011-04-23T01:41:05.227" UserId="2332" Text="Behaviour trees are getting pretty big in the industry right now. Halo 3 uses them extensively for their AI ([Halo 3 - Building a Better Battle][1]).&#xD;&#xA;&#xD;&#xA;Alex Champandard seems to be a big fan as well (Lots of articles on it on [AIGameDev.com][2]).&#xD;&#xA;&#xD;&#xA;For code examples, take a look at:  &#xD;&#xA;http://magicscrollsofcode.blogspot.com/2010/12/behavior-trees-by-example-ai-in-android.html - The example is in Java, but self-explanatory)&#xD;&#xA;&#xD;&#xA;And:  &#xD;&#xA;http://www.sgtconker.com/affiliated-projects/brains/ - Which is C# and XNA, but probably a little more in depth.&#xD;&#xA;&#xD;&#xA;A fairly new behaviour tree middleware tool is [GameBrainsAI's tool][3]. It's in its very early stages at the minute, but the plus side is that you can download an evaluation copy for free and use the visual editor and see what kind of code it generates.&#xD;&#xA;&#xD;&#xA;To answer your latter question: http://gamedev.stackexchange.com/questions/7524/state-machines-state-object-versus-sequential-check-what-are-the-pro-cons&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bungie.net/images/Inside/publications/presentations/betterbattle.zip&#xD;&#xA;  [2]: http://www.aigamedev.com&#xD;&#xA;  [3]: http://www.neatsciences.com/html/home.html&#xD;&#xA;  [4]: http://rads.stackoverflow.com/amzn/click/1556220782" />
  <row Id="24730" PostHistoryTypeId="5" PostId="11520" RevisionGUID="09ffe401-5302-40e3-907b-af59ef8369db" CreationDate="2011-04-23T01:44:31.537" UserId="6875" Comment="deleted 70 characters in body" Text="Given the point&#xD;&#xA;&#xD;&#xA;    Vector pos = new Vector(0.0, 0.20156815648078918, -78.30000305175781, 1.0);&#xD;&#xA;&#xD;&#xA;and the plane (triangle)&#xD;&#xA;&#xD;&#xA;    Vector a = new Vector(-6.599999904632568, 0.0, -78.5, 1.0);&#xD;&#xA;    Vector b = new Vector(6.599999904632568, 0.0, -78.5, 1.0);&#xD;&#xA;    Vector c = new Vector(6.599999904632568, 4.400000095367432, -78.5, 1.0);&#xD;&#xA;&#xD;&#xA;I want to get a plane normal pointing in the direction of `pos`&#xD;&#xA;&#xD;&#xA;    //Getting plane normal&#xD;&#xA;    Vector ac = Vector.Subtract(a,c);&#xD;&#xA;    Vector bc = Vector.Subtract(b,c);&#xD;&#xA;    Vector planeNormal = Vector.CrossProduct(bc, ac);&#xD;&#xA;    &#xD;&#xA;    //Testing which side of the plane the point is on&#xD;&#xA;    double dprod = Vector.DotProduct(planeNormal, pos);&#xD;&#xA;    if (dprod &lt; 0)&#xD;&#xA;    {&#xD;&#xA;        planeNormal.Negate();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But this method is wrong. The resulting `planeNormal` points in the negative Z direction, so it should not be negated. Is there a best practise for this? Please help me, I fail massively @ math :)" />
  <row Id="24731" PostHistoryTypeId="2" PostId="11522" RevisionGUID="43c640bc-4b7c-451a-8af0-1bd3dc665c01" CreationDate="2011-04-23T01:54:34.630" UserId="6588" Text="Your method is mostly correct but misses one step. You can't simply use the point's position as the vector to get a dot product with, you need to create a direction vector from a point on the plane. Any point on the plane will do so just use one of the corners." />
  <row Id="24732" PostHistoryTypeId="2" PostId="11523" RevisionGUID="83b2cef7-d941-470a-97f8-cf212494cd64" CreationDate="2011-04-23T01:55:44.610" UserId="5678" Text="Frames per hour says a lot more about your environment. It is a keen indicator for the long-term enjoyability of the game.&#xD;&#xA;&#xD;&#xA;For example, you may have 50fps in some parts of the game, but in crowded areas, or areas of high intensity graphics or physics, you drop to 10 or 12.&#xD;&#xA;&#xD;&#xA;If you graph the fph over the course of the game, you have a general idea of where you're at. It's no substitute for knowing that the frame rate drops in some circumstances, but if you're consistantly only at 15 or 20 fph you know there's a problem. The game should be high fps MOST of the time, if not ALL of the time. So having a moving average of the the long-term fps can help you achieve that goal." />
  <row Id="24733" PostHistoryTypeId="5" PostId="11522" RevisionGUID="e1c934d9-fab9-48a4-841c-a09c39236294" CreationDate="2011-04-23T02:02:01.517" UserId="6588" Comment="added 41 characters in body" Text="Your method is mostly correct but misses one step. You can't simply use the point's position as the vector to get a dot product with, you need to create a direction vector from a point on the plane. Any point on the plane will do (the direction doesn't need to be exact) so just use one of the corners." />
  <row Id="24734" PostHistoryTypeId="25" PostId="11520" RevisionGUID="5b1440ee-4750-403a-ab43-733bb712ae81" CreationDate="2011-04-23T03:09:31.930" Comment="http://twitter.com/#!/StackGameDev/status/61627736581603328" />
  <row Id="24735" PostHistoryTypeId="5" PostId="11488" RevisionGUID="d066559e-0e34-4bb5-a5db-8355ae759859" CreationDate="2011-04-23T04:16:59.860" UserId="2698" Comment="added 102 characters in body" Text="Since you're using Box2D, you can create a series of rectangles and use [Box2D's joints][1] to join them. There you have your rope.&#xD;&#xA;&#xD;&#xA;In order to avoid corners poking out of a bent rope, I can imagine two options:&#xD;&#xA;&#xD;&#xA;1. Give your rope segments rounded ends (so they won't be rectangles anymore)&#xD;&#xA;2. Make this rope itself invisible and use it only for physics. Take the positions of the joints in each frame and use that to draw a rope on the fly that the player _will_ see.&#xD;&#xA;&#xD;&#xA;Warning: I have never tried this myself, but I fail to see how a series of joined rectangles can fail when the video you posted displays practically the same thing in disguise.&#xD;&#xA;&#xD;&#xA;Edit: I just saw PaulZ and I realised the same thing. Go read his comment on the question as well.&#xD;&#xA;&#xD;&#xA;[1]:http://www.box2d.org/manual.html#_Toc258082974" />
  <row Id="24736" PostHistoryTypeId="5" PostId="8777" RevisionGUID="58680752-addf-4b4e-b218-9fbaf5186086" CreationDate="2011-04-23T04:23:30.713" UserId="5554" Comment="added 679 characters in body" Text="&#xD;&#xA;The creators may shoot me for saying so, but I found [GLFW][1] to be just awesome at creating cross-platform GUI frameworks. The GLFW development folks go on and on about GLFW does *not* handle GUI. It *does* however do a nice, simple, clean and totally portable job of handling graphics, events and mouse/keyboard/joystick tasks. &#xD;&#xA;&#xD;&#xA;The nice thing about GLFW for me is that it is fairly small, requires no system specific code, no GLUT *and* is well maintained. Has been stable for use on OpenGL 4.1 projects so far. Compared to something like SDL I love the tiny overhead and it was easy as pie to write GUI handler classes. &#xD;&#xA;&#xD;&#xA;Alternatively, take a look at [FLTK][2]. It can be used for all sorts of things and re-purposed very simply. It is used really for application building but is perfectly capable of handling 3D objects and is built on OpenGL. Very small, well supported and while I don't see many people making custom interfaces on the game design level, there are some that seem to work great.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.glfw.org/&#xD;&#xA;  [2]: http://www.fltk.org/applications/shots.php" />
  <row Id="24737" PostHistoryTypeId="25" PostId="11508" RevisionGUID="1e287dc8-bf79-442c-85ea-fe2edd7584c9" CreationDate="2011-04-23T06:09:31.707" Comment="http://twitter.com/#!/StackGameDev/status/61673033869430785" />
  <row Id="24738" PostHistoryTypeId="2" PostId="11524" RevisionGUID="9a3e2bc5-7a7d-4bc0-bfc6-2cc11da9c6b6" CreationDate="2011-04-23T09:03:22.777" UserId="744" Text="&lt;a href=&quot;http://meta.boardgames.stackexchange.com/questions/47/rubiks-cube-is-it-on-topic/280#280&quot;&gt;A discussion on the B&amp;CGSE meta site over what is on-topic&lt;/a&gt; proposed a distinction that I like:&#xD;&#xA;&#xD;&#xA;&gt; A single-player activity with a goal and legal moves is a game, as opposed to a puzzle, if it also possesses a clear losing condition; that is, a game-state under which the goal can no longer be achieved.&#xD;&#xA;&#xD;&#xA;So sudoku is a puzzle but not a game - you can't lose sudoku, only give up before solving it.&#xD;&#xA;&#xD;&#xA;Klondike solitaire is a game, not a puzzle - even though there's no competition, you can lose it, when you can't make any more moves.&#xD;&#xA;&#xD;&#xA;In Minecraft, The Sims, D&amp;D, and so on, losing/winning is a more analog spectrum. But getting your work blown up by a creeper, having your Sims die alone and miserable, or getting killed before finding the artifact are still clear cases of loss, I think. Winning, on the other hand, is more about personal goals - I built that thing, I reached level 20, etc.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24739" PostHistoryTypeId="17" PostId="11526" RevisionGUID="47579122-7a12-4728-9c36-82d0dcefb2a8" CreationDate="2011-04-23T09:06:35.363" UserId="-1" Comment="from http://stackoverflow.com/questions/5745237/developing-an-asteroids-successor-which-languages-tools-frameworks/5745268#5745268" Text="" />
  <row Id="24740" PostHistoryTypeId="17" PostId="11527" RevisionGUID="7619ca14-1b1a-4c1b-8423-7fc58d22f59a" CreationDate="2011-04-23T09:06:35.363" UserId="-1" Comment="from http://stackoverflow.com/questions/5745237/developing-an-asteroids-successor-which-languages-tools-frameworks/5745584#5745584" Text="" />
  <row Id="24741" PostHistoryTypeId="2" PostId="11526" RevisionGUID="1350943a-9186-4285-8998-a723bc272e90" CreationDate="2011-04-21T14:10:23.223" UserDisplayName="spender" Text="Assuming you want to deliver to a web audience, if you actually want people to be able to play your game, Flash will give you the furthest reach." />
  <row Id="24742" PostHistoryTypeId="2" PostId="11527" RevisionGUID="27b78b21-6be1-443c-8ebe-cf850587be8a" CreationDate="2011-04-21T14:36:29.820" UserDisplayName="J_A_X" Text="Flash has better penetration (everyone has the Flash plugin...), provides better tools for gaming (several 2d and 3d gaming engines like [Flixel][1], [PushButton][2], [Alternativa][3], [Away3d][4], [Fisix][5]) as well as better tools for creating graphics (Flash IDE, Vector based graphics).  And to top it all off, you can port it to any mobile device using Air (iOS, Android, Playbook, Win7 in the works).&#xD;&#xA;&#xD;&#xA;Flash gaming is a fairly big part of Flash in itself.  It's been around forever.  Very good community support as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flixel.org/&#xD;&#xA;  [2]: http://pushbuttonengine.com/&#xD;&#xA;  [3]: http://alternativaplatform.com/en/&#xD;&#xA;  [4]: http://away3d.com/&#xD;&#xA;  [5]: http://www.fisixengine.com/" />
  <row Id="24743" PostHistoryTypeId="2" PostId="11525" RevisionGUID="720605e2-502c-48e7-b946-7c75ffbc9612" CreationDate="2011-04-21T14:07:59.473" UserDisplayName="soc" Text="Currently I'm planning to run the [Asteroids][1] successor on the Java Virtual Machine, while writing the code in Scala (because that's the language I'm fluent in).&#xD;&#xA;&#xD;&#xA;I have looked at different options, like using one of the various OpenGL bindings or using Java2D.&#xD;&#xA;&#xD;&#xA;Having looked at some frameworks it seems that they either are targeted at 3D development or [jump-and-run style games][2].&#xD;&#xA;&#xD;&#xA;Are there any useful frameworks or should I try to combine libraries from different origins and roll my own &quot;framework&quot;?&#xD;&#xA;&#xD;&#xA;Are other frameworks/tools like Flash/Flex vastly superior, so that learning a new language/platform would only be a minor drawback compared to huge benefits?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Asteroids_%28video_game%29&#xD;&#xA;  [2]: http://slick.cokeandcode.com/" />
  <row Id="24744" PostHistoryTypeId="1" PostId="11525" RevisionGUID="720605e2-502c-48e7-b946-7c75ffbc9612" CreationDate="2011-04-21T14:07:59.473" UserDisplayName="soc" Text="Developing an Asteroids successor: which languages/tools/frameworks?" />
  <row Id="24745" PostHistoryTypeId="3" PostId="11525" RevisionGUID="720605e2-502c-48e7-b946-7c75ffbc9612" CreationDate="2011-04-21T14:07:59.473" UserDisplayName="soc" Text="&lt;java&gt;&lt;flash&gt;&lt;flex&gt;" />
  <row Id="24746" PostHistoryTypeId="17" PostId="11525" RevisionGUID="8a9c96fb-93ed-4d80-8004-7f32c30c843d" CreationDate="2011-04-23T09:06:35.363" UserId="-1" Comment="from http://stackoverflow.com/questions/5745237/developing-an-asteroids-successor-which-languages-tools-frameworks" Text="" />
  <row Id="24747" PostHistoryTypeId="25" PostId="11512" RevisionGUID="d1b59736-ba25-4641-8324-666da06e30e9" CreationDate="2011-04-23T09:09:32.020" Comment="http://twitter.com/#!/StackGameDev/status/61718333464129536" />
  <row Id="24748" PostHistoryTypeId="2" PostId="11528" RevisionGUID="a69cf75d-f312-4b08-8198-049f71e96fda" CreationDate="2011-04-23T09:27:57.307" UserId="1163" Text="I am using flixel v2.5 and am using `FlxG.camera.follow` to get the camera to follow the player. I have a background `FlxSprite` that I don't want to move with the camera. Is there a way I can set this `FlxSprite` to stay in the same place on the screen? I would also like to have a GUI HUD that stays fixed to the screen, and was thinking I could do this the same way." />
  <row Id="24749" PostHistoryTypeId="1" PostId="11528" RevisionGUID="a69cf75d-f312-4b08-8198-049f71e96fda" CreationDate="2011-04-23T09:27:57.307" UserId="1163" Text="FlxSprite ignore camera follow in flixel" />
  <row Id="24750" PostHistoryTypeId="3" PostId="11528" RevisionGUID="a69cf75d-f312-4b08-8198-049f71e96fda" CreationDate="2011-04-23T09:27:57.307" UserId="1163" Text="&lt;camera&gt;&lt;flixel&gt;" />
  <row Id="24751" PostHistoryTypeId="2" PostId="11529" RevisionGUID="578a63b6-788f-460c-b91e-13f0119f9589" CreationDate="2011-04-23T11:33:12.153" UserId="5998" Text="I've done some basic 1 D integration, but i can't wrap my head around things and apply it to my graph layout.&#xD;&#xA;So, consider the picture below:&#xD;&#xA;&#xD;&#xA;- if i drag the red node to the right, i'm forcing his position to my mouse position&#xD;&#xA;- the other nodes will &quot;follow&quot; him, but how ?&#xD;&#xA;&#xD;&#xA;For Verlet, to compute the newPosition, i need the acceleration for every node and the currentPosition.&#xD;&#xA;That is what i don't understand.&#xD;&#xA;&#xD;&#xA;How to i compute the acceleration and the currentPosition ?&#xD;&#xA;&#xD;&#xA;The currentPosition will be the position of the RedNode ? If yes, doesn't that means that they will all overlap ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/NCKmO.jpg&#xD;&#xA;" />
  <row Id="24752" PostHistoryTypeId="1" PostId="11529" RevisionGUID="578a63b6-788f-460c-b91e-13f0119f9589" CreationDate="2011-04-23T11:33:12.153" UserId="5998" Text="How to apply numerical integration on a graph layout" />
  <row Id="24753" PostHistoryTypeId="3" PostId="11529" RevisionGUID="578a63b6-788f-460c-b91e-13f0119f9589" CreationDate="2011-04-23T11:33:12.153" UserId="5998" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;graphs&gt;" />
  <row Id="24754" PostHistoryTypeId="2" PostId="11530" RevisionGUID="ff1e793a-66a9-4d32-af31-a8ed46e73134" CreationDate="2011-04-23T11:59:51.917" UserId="3686" Text="I have 960x3000 map image in png and I'm scrolling it in a loop like this:&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;        glBindTexture( GL_TEXTURE_2D, mapTex[iBgImg]);&#xD;&#xA;        glBegin(GL_QUADS);&#xD;&#xA;        double mtstart = 0.0f - fBgVPos/(double)BgSize;&#xD;&#xA;        double mtend = mtstart + mtsize;&#xD;&#xA;        glTexCoord2d(0.0, mtstart); glVertex2f(fBgX, TOP_MARGIN);&#xD;&#xA;        glTexCoord2d(1.0, mtstart); glVertex2f(fBgX + MAP_WIDTH, TOP_MARGIN);&#xD;&#xA;        glTexCoord2d(1.0, mtend); glVertex2f(fBgX + MAP_WIDTH, BOTTOM_MARGIN);&#xD;&#xA;        glTexCoord2d(0.0, mtend); glVertex2f(fBgX, BOTTOM_MARGIN);&#xD;&#xA;        glEnd();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;unfortunately it isn't smooth when the game is in windowed mode. However, it is smooth in full screen mode. I'm using GLFW for windows. Maybe there is something wrong with my method? Is there anything better? Or could this be hardware problem?" />
  <row Id="24755" PostHistoryTypeId="1" PostId="11530" RevisionGUID="ff1e793a-66a9-4d32-af31-a8ed46e73134" CreationDate="2011-04-23T11:59:51.917" UserId="3686" Text="Problem with scrolling background in one OpenGL loop" />
  <row Id="24756" PostHistoryTypeId="3" PostId="11530" RevisionGUID="ff1e793a-66a9-4d32-af31-a8ed46e73134" CreationDate="2011-04-23T11:59:51.917" UserId="3686" Text="&lt;opengl&gt;&lt;2d&gt;&lt;side-scroller&gt;" />
  <row Id="24757" PostHistoryTypeId="25" PostId="11529" RevisionGUID="0cd65305-29be-4a46-bda5-dbfee08aaad6" CreationDate="2011-04-23T12:09:32.590" Comment="http://twitter.com/#!/StackGameDev/status/61763634853974016" />
  <row Id="24758" PostHistoryTypeId="2" PostId="11531" RevisionGUID="f1fb4e4e-4140-4df5-938b-22a7f6a66a35" CreationDate="2011-04-23T12:12:20.677" UserId="1839" Text="If I understand your question right and you want to connect the nodes by springs, that apply forces when the spring is not at its rest-length (in other words when you drag it), then look at [Hook's Law][1], it explains the mechanics and forces of springs. &#xD;&#xA;&#xD;&#xA;But you will need any kind of physics-engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hooke%27s_law&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;&gt; How to i compute the acceleration and the currentPosition ?&#xD;&#xA;&#xD;&#xA;Using Hook's Law:&#xD;&#xA;&#xD;&#xA;    F = -kx&#xD;&#xA;    A = F/m" />
  <row Id="24759" PostHistoryTypeId="5" PostId="11531" RevisionGUID="d32bb714-c869-497b-b461-02c63259e054" CreationDate="2011-04-23T12:28:37.363" UserId="1839" Comment="added 145 characters in body" Text="If I understand your question right and you want to connect the nodes by springs, that apply forces when the spring is not at its rest-length (in other words when you drag it), then look at [Hook's Law][1], it explains the mechanics and forces of springs. &#xD;&#xA;&#xD;&#xA;But you will need any kind of physics-engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;&gt; How to i compute the acceleration and the currentPosition ?&#xD;&#xA;&#xD;&#xA;Using Hook's Law:&#xD;&#xA;&#xD;&#xA;    F = -kx&#xD;&#xA;    A = F/m&#xD;&#xA;&#xD;&#xA;&lt;/b&gt;   &#xD;&#xA;[Here][2] you can find a nice tutorial about springs using Hook's Law.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hooke%27s_law&#xD;&#xA;  [2]: http://gafferongames.com/game-physics/spring-physics/" />
  <row Id="24760" PostHistoryTypeId="5" PostId="11530" RevisionGUID="c433d355-7232-40a3-a416-91f556a7d6f7" CreationDate="2011-04-23T13:16:56.560" UserId="3686" Comment="added 208 characters in body" Text="I have 960x3000 map image in png and I'm scrolling it in a loop like this:&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;        glBindTexture( GL_TEXTURE_2D, mapTex[iBgImg]);&#xD;&#xA;        glBegin(GL_QUADS);&#xD;&#xA;        double mtstart = 0.0f - fBgVPos/(double)BgSize;&#xD;&#xA;        double mtend = mtstart + mtsize;&#xD;&#xA;        glTexCoord2d(0.0, mtstart); glVertex2f(fBgX, TOP_MARGIN);&#xD;&#xA;        glTexCoord2d(1.0, mtstart); glVertex2f(fBgX + MAP_WIDTH, TOP_MARGIN);&#xD;&#xA;        glTexCoord2d(1.0, mtend); glVertex2f(fBgX + MAP_WIDTH, BOTTOM_MARGIN);&#xD;&#xA;        glTexCoord2d(0.0, mtend); glVertex2f(fBgX, BOTTOM_MARGIN);&#xD;&#xA;        glEnd();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;unfortunately it isn't smooth when the game is in windowed mode. However, it is smooth in full screen mode. I'm using GLFW for windows. Maybe there is something wrong with my method? Is there anything better? Or could this be hardware problem?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Window is created using &#xD;&#xA;&#xD;&#xA;     glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE);&#xD;&#xA;     glfwOpenWindowHint(GLFW_REFRESH_RATE, 60);&#xD;&#xA;&#xD;&#xA;and main loop is using glfwSwapInterval(1) to ensure 60 FPS;" />
  <row Id="24761" PostHistoryTypeId="5" PostId="11530" RevisionGUID="4331b33c-53ff-4aef-b61a-0db3546d2b6a" CreationDate="2011-04-23T13:45:52.207" UserId="3686" Comment="more info" Text="I have 960x3000 map image in png and I'm scrolling it in a loop like this (it's called in 60 FPS loop):&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;        glBindTexture( GL_TEXTURE_2D, mapTex[iBgImg]);&#xD;&#xA;        glBegin(GL_QUADS);&#xD;&#xA;        double mtstart = 0.0f - fBgVPos/(double)BgSize;&#xD;&#xA;        double mtend = mtstart + mtsize;&#xD;&#xA;        glTexCoord2d(0.0, mtstart); glVertex2f(fBgX, TOP_MARGIN);&#xD;&#xA;        glTexCoord2d(1.0, mtstart); glVertex2f(fBgX + MAP_WIDTH, TOP_MARGIN);&#xD;&#xA;        glTexCoord2d(1.0, mtend); glVertex2f(fBgX + MAP_WIDTH, BOTTOM_MARGIN);&#xD;&#xA;        glTexCoord2d(0.0, mtend); glVertex2f(fBgX, BOTTOM_MARGIN);&#xD;&#xA;        glEnd();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;unfortunately it isn't smooth when the game is in windowed mode. However, it is smooth in full screen mode. I'm using GLFW for windows. Maybe there is something wrong with my method? Is there anything better? Or could this be hardware problem?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Window is created using &#xD;&#xA;&#xD;&#xA;     glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE);&#xD;&#xA;     glfwOpenWindowHint(GLFW_REFRESH_RATE, 60);&#xD;&#xA;&#xD;&#xA;and main loop is using glfwSwapInterval(1) to ensure 60 FPS;" />
  <row Id="24762" PostHistoryTypeId="2" PostId="11532" RevisionGUID="87ad7c0d-df53-4999-97a8-ba768c9fec32" CreationDate="2011-04-23T13:55:52.550" UserId="450" Text="It may be more useful to create a diagram showing frames per second over a period of time. Ideally this diagram contains annotations about what happened in the world, for example changes of areas, starting and ending of fights. " />
  <row Id="24763" PostHistoryTypeId="2" PostId="11533" RevisionGUID="60a4577a-d141-48ea-86d3-1483bd0b36d1" CreationDate="2011-04-23T14:11:18.450" UserId="6908" Text="I'm learning C++, and I'm writing my first OpenGL program. Unfortunately, it seems to be defaulting to Software Rendering (CPU uses bounces, GPU uses stays at 1%). I'm using SDL as the Windowing system. I've got no idea why, but when there is significant scaling, the program grinds to a halt. My PC should be able to handle it - I'm using an 8800GTX. My texture is 1024x1024 and glGetString(GL_VENDOR) is returning &quot;NVidia Corporation&quot;. Any ideas?&#xD;&#xA;&#xD;&#xA;I'm sorry to be dumping all the code, but I've got absolutely no idea at all what is doing it. I'm very new to OpenGL.&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;    #include &quot;SDL.h&quot;&#xD;&#xA;    #include &quot;SDL_opengl.h&quot;7&#xD;&#xA;    #include &quot;IL/il.h&quot;&#xD;&#xA;    #include &quot;IL/ilut.h&quot;&#xD;&#xA;    #include &lt;math.h&gt;    &#xD;&#xA;    &#xD;&#xA;    const int SCREEN_WIDTH = 1024;&#xD;&#xA;    const int SCREEN_HEIGHT = 768;&#xD;&#xA;    const int SCREEN_BPP = 32;&#xD;&#xA;    const int FPS = 60;&#xD;&#xA;    const int XSIZE = 1024; &#xD;&#xA;    const int YSIZE = 768;&#xD;&#xA;    &#xD;&#xA;    int main( int argc, char *argv[] )&#xD;&#xA;    {&#xD;&#xA;        bool quit = false;&#xD;&#xA;    &#xD;&#xA;        SDL_Init(SDL_INIT_EVERYTHING);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);&#xD;&#xA;    &#xD;&#xA;        SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_HWSURFACE |  SDL_OPENGL);     &#xD;&#xA;    &#xD;&#xA;        glEnable(GL_TEXTURE_2D);&#xD;&#xA;        &#xD;&#xA;        const GLubyte * Vendor = glGetString(GL_VENDOR);&#xD;&#xA;    &#xD;&#xA;        glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red      &#xD;&#xA;        glMatrixMode (GL_PROJECTION);&#xD;&#xA;        glLoadIdentity ();&#xD;&#xA;        glOrtho(0, XSIZE, YSIZE, 0, 0, 1);&#xD;&#xA;        glMatrixMode (GL_MODELVIEW);&#xD;&#xA;    &#xD;&#xA;        glDisable(GL_DEPTH_TEST);&#xD;&#xA;    &#xD;&#xA;        GLuint image;&#xD;&#xA;        &#xD;&#xA;        ilInit();&#xD;&#xA;        ilutRenderer(ILUT_OPENGL);  &#xD;&#xA;    &#xD;&#xA;        ILuint texid;&#xD;&#xA;        ILboolean success;&#xD;&#xA;        ilGenImages(1, &amp;texid);&#xD;&#xA;        ilBindImage(texid);&#xD;&#xA;    &#xD;&#xA;        success = ilLoadImage(&quot;Textures.png&quot;);&#xD;&#xA;        if (success)&#xD;&#xA;        {&#xD;&#xA;            success = ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);&#xD;&#xA;            if (!success)&#xD;&#xA;            {&#xD;&#xA;                SDL_Quit();&#xD;&#xA;                return -1;&#xD;&#xA;            }&#xD;&#xA;            glGenTextures(1, &amp;image);&#xD;&#xA;            glBindTexture(GL_TEXTURE_2D, image);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),&#xD;&#xA;              ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,&#xD;&#xA;              ilGetData());&#xD;&#xA;            ilDeleteImages(1, &amp;texid);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            SDL_Quit();&#xD;&#xA;            return -2;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        SDL_Event event;&#xD;&#xA;    &#xD;&#xA;        float x = 0.0f;&#xD;&#xA;    &#xD;&#xA;        while (!quit) &#xD;&#xA;        {&#xD;&#xA;            while ( SDL_PollEvent(&amp;event) )&#xD;&#xA;            {&#xD;&#xA;                switch (event.type)&#xD;&#xA;                {&#xD;&#xA;                    case SDL_QUIT:&#xD;&#xA;                        quit = true;&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;        &#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glTranslatef(200.0f, 200.0f, 0.0f);&#xD;&#xA;            glRotatef(x,0.0f,0.0f, 1.0f);       &#xD;&#xA;            glScalef(1.0f+x, 1.0f+x, 1.0f+x);&#xD;&#xA;            glBegin(GL_QUADS);      &#xD;&#xA;            glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;            glVertex2f(-100, -100); &#xD;&#xA;            glTexCoord2f(0.0f, 0.119140f);      &#xD;&#xA;            glVertex2f(-100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.119140f);&#xD;&#xA;            glVertex2f(100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.0f);&#xD;&#xA;            glVertex2f(100, -100);&#xD;&#xA;            glEnd();&#xD;&#xA;    &#xD;&#xA;            x += 0.1f;&#xD;&#xA;            &#xD;&#xA;            SDL_GL_SwapBuffers();&#xD;&#xA;            glFlush;        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }" />
  <row Id="24764" PostHistoryTypeId="1" PostId="11533" RevisionGUID="60a4577a-d141-48ea-86d3-1483bd0b36d1" CreationDate="2011-04-23T14:11:18.450" UserId="6908" Text="OpenGL Insanely Slow" />
  <row Id="24765" PostHistoryTypeId="3" PostId="11533" RevisionGUID="60a4577a-d141-48ea-86d3-1483bd0b36d1" CreationDate="2011-04-23T14:11:18.450" UserId="6908" Text="&lt;opengl&gt;&lt;c++&gt;&lt;sdl&gt;" />
  <row Id="24766" PostHistoryTypeId="2" PostId="11534" RevisionGUID="c9b54860-2c1a-47e8-9e98-d947d0160730" CreationDate="2011-04-23T14:11:20.333" UserId="6605" Text="I found the correct way of doing this.&#xD;&#xA;&#xD;&#xA;    view = new MyGLSurfaceView(this, gameHandler);&#xD;&#xA;    editBox = new EditText(context);&#xD;&#xA;    editBox.setText(&quot;Hello Matron&quot;);&#xD;&#xA;    	&#xD;&#xA;    view.setRenderer(new OpenGLRenderer(gameHandler));&#xD;&#xA;    setContentView(view);&#xD;&#xA;       		&#xD;&#xA;    addContentView(editBox, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The key is using **addContentView** to add the editBox on top of the GLSurfaceView.&#xD;&#xA;&#xD;&#xA;Hope this helps some googlers :)&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;Ash&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24767" PostHistoryTypeId="5" PostId="11532" RevisionGUID="4e4b8d2d-3e5b-431b-90c8-b26f16a321b2" CreationDate="2011-04-23T14:15:10.380" UserId="450" Comment="added diagram" Text="It may be more useful to create a diagram showing frames per second over a period of time. Ideally this diagram contains annotations about what happened in the world, for example changes of areas, starting and ending of fights.&#xD;&#xA;&#xD;&#xA;![annotated diagram showing FPS over time][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/6Wtbw.png&#xD;&#xA;&#xD;&#xA;In the sample diagram it is easy to see that the frame rate is a lot better in the home town than in the dungeon. And there seems to be something very fishy going on in the desert; likely a memory hole." />
  <row Id="24768" PostHistoryTypeId="2" PostId="11535" RevisionGUID="27f7f8b2-13b4-4211-93a3-fdec9e0708b2" CreationDate="2011-04-23T14:54:04.907" UserId="6906" Text="I am investigating Google App Engine for use in a browser based MMO. The player will make a server request when ever they build, buy or do any other action that the server needs to process. Therefore I am estimating a server request no faster than once per 10 seconds. &#xD;&#xA;&#xD;&#xA;I want to store all my player data in one data structure (entity), because I have heard this is the most efficient way -- if not please correct me. So I figure that when a player causes a server request, I need to load/access the player's state data, carry out the action the player wanted to do and then store the result.&#xD;&#xA;&#xD;&#xA;However, from an efficiency point-of-view, what is the best way to access the player data? I thought about using the datastore and maybe memcaching the result in memory for fast lookup. But don't I still need to write the data back out to the data store if it's cached? Should I write it out every time data changes? I looked at write behind caching but this seems to eat through your task queue quota.&#xD;&#xA;&#xD;&#xA;Any ideas on the best approach? Best being defined as the most efficient method using the Google App Engine." />
  <row Id="24769" PostHistoryTypeId="1" PostId="11535" RevisionGUID="27f7f8b2-13b4-4211-93a3-fdec9e0708b2" CreationDate="2011-04-23T14:54:04.907" UserId="6906" Text="Efficient player state architecture in Google App Engine" />
  <row Id="24770" PostHistoryTypeId="3" PostId="11535" RevisionGUID="27f7f8b2-13b4-4211-93a3-fdec9e0708b2" CreationDate="2011-04-23T14:54:04.907" UserId="6906" Text="&lt;architecture&gt;&lt;mmo&gt;&lt;python&gt;&lt;browser-based-games&gt;&lt;google-app-engine&gt;" />
  <row Id="24771" PostHistoryTypeId="25" PostId="11533" RevisionGUID="d8aee72b-78c7-4f5d-bd36-4952789d1cee" CreationDate="2011-04-23T15:09:32.477" Comment="http://twitter.com/#!/StackGameDev/status/61808933332987904" />
  <row Id="24772" PostHistoryTypeId="2" PostId="11536" RevisionGUID="0dd0997c-d9be-4c07-88f5-836f7c48cbb1" CreationDate="2011-04-23T15:10:23.753" UserId="5753" Text="What do you mean by insanely slow? You have no timing in your code. How many frames per second?&#xD;&#xA;&#xD;&#xA;Your drawing very little, it's normal for the GPU to be mostly unused. You can't determine if it's software rendering just by looking at CPU/GPU usage." />
  <row Id="24773" PostHistoryTypeId="5" PostId="11533" RevisionGUID="b80120b4-ac45-4651-b33a-8f0e10bda4f5" CreationDate="2011-04-23T15:50:59.147" UserId="6908" Comment="Added DEViL to the details on the texture" Text="I'm learning C++, and I'm writing my first OpenGL program. Unfortunately, it seems to be defaulting to Software Rendering (CPU uses bounces, GPU uses stays at 1%). I'm using SDL as the Windowing system. I've got no idea why, but when there is significant scaling, the program grinds to a halt. My PC should be able to handle it - I'm using an 8800GTX. My texture is 1024x1024, 32 bit RGBA and loaded with DevIL,  and glGetString(GL_VENDOR) is returning &quot;NVidia Corporation&quot;. Any ideas?&#xD;&#xA;&#xD;&#xA;I'm sorry to be dumping all the code, but I've got absolutely no idea at all what is doing it. I'm very new to OpenGL.&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;    #include &quot;SDL.h&quot;&#xD;&#xA;    #include &quot;SDL_opengl.h&quot;7&#xD;&#xA;    #include &quot;IL/il.h&quot;&#xD;&#xA;    #include &quot;IL/ilut.h&quot;&#xD;&#xA;    #include &lt;math.h&gt;    &#xD;&#xA;    &#xD;&#xA;    const int SCREEN_WIDTH = 1024;&#xD;&#xA;    const int SCREEN_HEIGHT = 768;&#xD;&#xA;    const int SCREEN_BPP = 32;&#xD;&#xA;    const int FPS = 60;&#xD;&#xA;    const int XSIZE = 1024; &#xD;&#xA;    const int YSIZE = 768;&#xD;&#xA;    &#xD;&#xA;    int main( int argc, char *argv[] )&#xD;&#xA;    {&#xD;&#xA;        bool quit = false;&#xD;&#xA;    &#xD;&#xA;        SDL_Init(SDL_INIT_EVERYTHING);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);&#xD;&#xA;    &#xD;&#xA;        SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_HWSURFACE |  SDL_OPENGL);     &#xD;&#xA;    &#xD;&#xA;        glEnable(GL_TEXTURE_2D);&#xD;&#xA;        &#xD;&#xA;        const GLubyte * Vendor = glGetString(GL_VENDOR);&#xD;&#xA;    &#xD;&#xA;        glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red      &#xD;&#xA;        glMatrixMode (GL_PROJECTION);&#xD;&#xA;        glLoadIdentity ();&#xD;&#xA;        glOrtho(0, XSIZE, YSIZE, 0, 0, 1);&#xD;&#xA;        glMatrixMode (GL_MODELVIEW);&#xD;&#xA;    &#xD;&#xA;        glDisable(GL_DEPTH_TEST);&#xD;&#xA;    &#xD;&#xA;        GLuint image;&#xD;&#xA;        &#xD;&#xA;        ilInit();&#xD;&#xA;        ilutRenderer(ILUT_OPENGL);  &#xD;&#xA;    &#xD;&#xA;        ILuint texid;&#xD;&#xA;        ILboolean success;&#xD;&#xA;        ilGenImages(1, &amp;texid);&#xD;&#xA;        ilBindImage(texid);&#xD;&#xA;    &#xD;&#xA;        success = ilLoadImage(&quot;Textures.png&quot;);&#xD;&#xA;        if (success)&#xD;&#xA;        {&#xD;&#xA;            success = ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);&#xD;&#xA;            if (!success)&#xD;&#xA;            {&#xD;&#xA;                SDL_Quit();&#xD;&#xA;                return -1;&#xD;&#xA;            }&#xD;&#xA;            glGenTextures(1, &amp;image);&#xD;&#xA;            glBindTexture(GL_TEXTURE_2D, image);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),&#xD;&#xA;              ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,&#xD;&#xA;              ilGetData());&#xD;&#xA;            ilDeleteImages(1, &amp;texid);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            SDL_Quit();&#xD;&#xA;            return -2;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        SDL_Event event;&#xD;&#xA;    &#xD;&#xA;        float x = 0.0f;&#xD;&#xA;    &#xD;&#xA;        while (!quit) &#xD;&#xA;        {&#xD;&#xA;            while ( SDL_PollEvent(&amp;event) )&#xD;&#xA;            {&#xD;&#xA;                switch (event.type)&#xD;&#xA;                {&#xD;&#xA;                    case SDL_QUIT:&#xD;&#xA;                        quit = true;&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;        &#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glTranslatef(200.0f, 200.0f, 0.0f);&#xD;&#xA;            glRotatef(x,0.0f,0.0f, 1.0f);       &#xD;&#xA;            glScalef(1.0f+x, 1.0f+x, 1.0f+x);&#xD;&#xA;            glBegin(GL_QUADS);      &#xD;&#xA;            glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;            glVertex2f(-100, -100); &#xD;&#xA;            glTexCoord2f(0.0f, 0.119140f);      &#xD;&#xA;            glVertex2f(-100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.119140f);&#xD;&#xA;            glVertex2f(100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.0f);&#xD;&#xA;            glVertex2f(100, -100);&#xD;&#xA;            glEnd();&#xD;&#xA;    &#xD;&#xA;            x += 0.1f;&#xD;&#xA;            &#xD;&#xA;            SDL_GL_SwapBuffers();&#xD;&#xA;            glFlush;        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }" />
  <row Id="24774" PostHistoryTypeId="2" PostId="11537" RevisionGUID="45749d93-3199-4264-a5f7-e8c560fbc949" CreationDate="2011-04-23T15:52:22.473" UserId="3644" Text="Query **glGetString(GL_VERSION);** from OpenGL and make sure it is not something like 1.0 (that would mean no proper drivers installed). It happens on built-in GPUs mostly, but give it a try! ;)" />
  <row Id="24775" PostHistoryTypeId="2" PostId="11538" RevisionGUID="1df7a432-c006-4900-877c-20bd18f60afd" CreationDate="2011-04-23T16:26:02.107" UserId="5932" Text="**Simple:**&#xD;&#xA;&#xD;&#xA;Why not simply use your line idea, but instead of making a line for the whole path, make a line from the bullet's last position?&#xD;&#xA;&#xD;&#xA;*how:*&#xD;&#xA;&#xD;&#xA;Make the bullet an object, and give it a velocity and a direction (see vector), and then make a line from it's position in the last frame (make a variable to keep track of the previous position) and check against that!&#xD;&#xA;&#xD;&#xA;This way you won't collide with any objects you shouldn't, and you can expand the game to something more complicated easily!&#xD;&#xA;" />
  <row Id="24776" PostHistoryTypeId="2" PostId="11539" RevisionGUID="be051a88-d5dd-4c1e-808e-d2945dd1fbef" CreationDate="2011-04-23T16:27:38.127" UserId="4947" Text="Try to disable texturing before rendering (before while loop): glDisable(GL_TEXTURE_2D); - if it helps, there is problem with texturing. But I don't think it should help.&#xD;&#xA;&#xD;&#xA;You can also try to comment everything from glBegin(GL_QUADS); to glEnd(); - but you will not see if it helps. You would need some FPS counter. &#xD;&#xA;&#xD;&#xA;Also try to sleep while loop at the end for some time (let's say for 20 ms). But I don't think it will help anyway.&#xD;&#xA;&#xD;&#xA;And also try to change glOrtho(0, XSIZE, YSIZE, 0, 0, 1); to glOrtho(0, XSIZE, 0, YSIZE, 0, 1); Is your code rendering something? " />
  <row Id="24777" PostHistoryTypeId="2" PostId="11540" RevisionGUID="322ecc92-130b-4feb-9296-9fa19c5fdca5" CreationDate="2011-04-23T17:07:42.350" UserId="999" Text="You should not need to use glFlush(). Also it's advisable to use vertex arrays or VBOs instead of immediate mode, though it probably won't make a difference in a program as small as this." />
  <row Id="24778" PostHistoryTypeId="2" PostId="11541" RevisionGUID="fde6bc8c-5a56-4e78-a5c4-1da7f9e71e90" CreationDate="2011-04-23T17:53:29.257" UserId="3198" Text="What if movement was controlled by touch and the shooting was controlled by accelerometer/gyro?&#xD;&#xA;&#xD;&#xA;To move, the player would touch the point on screen they want to move to, or the direction they want to move in.&#xD;&#xA;&#xD;&#xA;The turn the character around, the player physically would rotate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Obviously there are a lot of situations where this would be unplayable, but it could be fun and unique. Definitely the kind of thing that you couldn't do on a non-mobile system. Sometimes things like that can be a big selling point." />
  <row Id="24782" PostHistoryTypeId="5" PostId="11541" RevisionGUID="d783e5b8-2334-40cc-822f-e479781cd050" CreationDate="2011-04-23T18:04:33.447" UserId="3198" Comment="added 52 characters in body; added 25 characters in body" Text="What if movement was controlled by touch and the shooting was controlled by accelerometer/gyro?&#xD;&#xA;&#xD;&#xA;To move, the player would touch the point on screen they want to move to, or the direction they want to move in.&#xD;&#xA;&#xD;&#xA;The turn the character around, the player physically would rotate, or they woud turn the device around in their hands.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Obviously there are a lot of situations where this would be unplayable, but it could be fun and unique in the right environment. Definitely the kind of thing that you couldn't do on a non-mobile system. Sometimes things like that can be a big selling point." />
  <row Id="24783" PostHistoryTypeId="25" PostId="11535" RevisionGUID="23a1ff96-ed3b-4201-b448-d102c5a97632" CreationDate="2011-04-23T18:09:32.727" Comment="http://twitter.com/#!/StackGameDev/status/61854231900073984" />
  <row Id="24784" PostHistoryTypeId="2" PostId="11543" RevisionGUID="2f1bf238-3389-4701-b091-c64ae2ed91d0" CreationDate="2011-04-23T18:23:59.730" UserId="2472" Text="The most efficient way to organize the data depends on the kinds of operations you are performing on the data, and how often each of those operations will occur.&#xD;&#xA;&#xD;&#xA;It sounds like you are making an MMO where players don't interact with each other, and where there's very little interaction with the game server (once every 10 seconds), so storing the player data in one data structure will probably work as long as it's not too large.&#xD;&#xA;&#xD;&#xA;The way to find out is to try it. Start with the plain datastore. Measure it with a simulated load test. Find out if it's too slow. My guess is that if it's really once every 10 seconds there's no need for memcache or task queues or write behind caching or anything complicated like that. Once you test the performance, if you find it's too slow, then you'll be able to come here and point to the kinds of operations that are too slow, and we'll be able to help you with specific performance issues." />
  <row Id="24786" PostHistoryTypeId="2" PostId="11544" RevisionGUID="a955c148-edfe-4ca3-8e3d-698e58bffaab" CreationDate="2011-04-23T18:41:36.987" UserId="6884" Text="When a player is in the updating state (assuming this isn't a heavy-heavy write game like FPS or RTS), you need to either *batch*, or *heartbeat* (every 10 seconds or 100 updates) your updates. I ran into this problem with a Facebook isometric casual game. The basic idea is that a player needed to decorate their store/farm/whatever. If you try writing each time to the Player entity you'll run into huge problems. Also, it's not really a good idea to write only to cache ... it's not consistent and you could have cache evictions that make your players really mad that they just lost 5 hours worth of work.&#xD;&#xA;&#xD;&#xA;For my game, I was thinking about using an eventually consistent, write behind cache, but it really is overkill.&#xD;&#xA;&#xD;&#xA;My architecture looks something like this:&#xD;&#xA;&#xD;&#xA;    class MapTile(db.Model):&#xD;&#xA;            &quot;&quot;&quot; Map tiles are very efficient way of storing what's on a tile, I just access  it by a key name like userid-x-y&#xD;&#xA;    &#xD;&#xA;                e.x MapTile(on='10001.180,20002.90')&#xD;&#xA;            &quot;&quot;&quot;&#xD;&#xA;            on = db.StringListProperty() # a comma separated list of item ids on that tile and the rotation&#xD;&#xA;        &#xD;&#xA;    &#xD;&#xA;    class Item(db.Expando):&#xD;&#xA;        &quot;&quot;&quot;properties of a particular item, like a chair or a crop&quot;&quot;&quot;&#xD;&#xA;&#xD;&#xA;Then when a new update comes along it will either be a sell,put away, purchase, or rotation. So I encode updates like `{a:ROTATE,x:1,y:1,r:NW}` and `{a:PURCHASE,x:1,y:2,id:10001}`&#xD;&#xA;&#xD;&#xA;And batch them all up into a `mapUpdates = []` queue that gets flushed whenever the length is 10 or the heartbeat comes around, whichever is first. This way your client is never waiting around, trying to save dozens to hundreds of entities. You can also have some sort of &quot;...loading&quot; indicator that tells them you're saving.&#xD;&#xA;&#xD;&#xA;When the updates get to the server just *write,blow cache,write cache*. Simple as that.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24787" PostHistoryTypeId="5" PostId="11518" RevisionGUID="358b1e70-1a1c-44b8-b8a8-cae7fcd8bbdd" CreationDate="2011-04-23T19:53:06.560" UserId="6825" Comment="responded to comments" Text="Previous posters have pretty well nailed down the difference between a &quot;toy&quot; and a &quot;puzzle or game&quot;; puzzles and games have a goal, whereas toys are just meant to be played with until you're sick of it.&#xD;&#xA;&#xD;&#xA;I would define the difference between a &quot;game&quot; and a &quot;puzzle&quot; as the element of competition. In a game, you're competing &lt;i&gt;against&lt;/i&gt; something: another player, an AI, time pressure, &amp;c. Essentially, you might &lt;i&gt;lose&lt;/i&gt; a game through the action of another agent, whereas with a puzzle the only way you fail to win is by giving up.&#xD;&#xA;&#xD;&#xA;This definition automatically implies that competitive puzzle-solving becomes a game, which makes sense to me. Also, puzzle-solving against a countdown timer becomes a game, which is again fine with me.&#xD;&#xA;&#xD;&#xA;Stated another way, my distinctions among these three terms are their ending conditions.&#xD;&#xA;&#xD;&#xA; - toy: give up &#xD;&#xA; - puzzle: win OR give up&#xD;&#xA; - game: win OR lose OR give up before completion&#xD;&#xA;&#xD;&#xA;Note that altering your perspective can move a particular artifact among these categories. Generally, expanding your time scale will tend to move an artifact up the chart. For example, each life in Portal is clearly a game; either you beat the level, or GlaDOS kills you. However, Portal as a whole is more of a puzzle, since in the end you WILL either figure out the way to beat the level, or you'll give up; GlaDOS never permanently prevents you from trying again. Completing a shelter before the monsters get you in Minecraft is a game; eventually completing your shelter, possibly with many respawns, so that you'll be safe from monsters in the future is a puzzle; Minecraft as a whole is clearly a toy (it has no built-in permanent end condition).&#xD;&#xA;&#xD;&#xA;This classification isn't perfect, of course. Dwarf Fortress is an interesting example. As a game, your objective on a single embark is presumably to create a fortress that can... something. Hmm. As a toy, the possibilities are limitless; I've seen a 4-function calculator implemented in DF (yes, this is &lt;s&gt;insane&lt;/s&gt; awesome). The problem with my classification is that any given DF fortress clearly has a &lt;i&gt;lose&lt;/i&gt; condition, or you can stop playing (give up), but it has no obvious &lt;/i&gt;win&lt;/i&gt; condition. You can set your own win condition, which clearly makes it a game, but without doing so it doesn't really fall into any of these possibilities. Possibly I need a 4th category for &quot;toys that menace with spikes of evil&quot; to fit a single DF fortress into.&#xD;&#xA;&#xD;&#xA;EDIT: I think Joe Wreschnig nailed it in the comments. The essential difference between a game and a puzzle is that a game can be lost, whether through competition, a timer, or whatever. I was kind of working toward this but couldn't quite articulate it. Thanks Joe!" />
  <row Id="24788" PostHistoryTypeId="2" PostId="11545" RevisionGUID="f9e5fc4d-dbb2-40ca-a42e-5fc7036e9648" CreationDate="2011-04-23T20:04:17.380" UserId="953" Text="In previous versions, you could set the background/HUD's scrollfactor.x and scrollfactor.y to zero. Does that still work in 2.5?" />
  <row Id="24789" PostHistoryTypeId="2" PostId="11546" RevisionGUID="3912d8f7-9571-4977-b74a-3d4d822a13c5" CreationDate="2011-04-23T20:22:58.857" UserId="4183" Text="Are your textures a power of 2 size? (4x4, 64x64 etc.)&#xD;&#xA;I think that could definitely slow things way down if they are not." />
  <row Id="24790" PostHistoryTypeId="25" PostId="11502" RevisionGUID="113091c7-3da5-4cc0-9b57-e22a92a5f92c" CreationDate="2011-04-23T21:09:32.627" Comment="http://twitter.com/#!/StackGameDev/status/61899530421014528" />
  <row Id="24791" PostHistoryTypeId="5" PostId="11533" RevisionGUID="cb0f24bc-eb6f-426b-bedf-d2d79d2d69b4" CreationDate="2011-04-23T21:25:22.663" UserId="1198" Comment="deleted 10 characters in body" Text="I'm learning C++, and I'm writing my first OpenGL program. Unfortunately, it seems to be defaulting to Software Rendering (CPU uses bounces, GPU uses stays at 1%). I'm using SDL as the Windowing system. I've got no idea why, but when there is significant scaling, the program grinds to a halt. My PC should be able to handle it - I'm using an 8800GTX. My texture is 1024x1024, 32 bit RGBA and loaded with DevIL,  and glGetString(GL_VENDOR) is returning &quot;NVidia Corporation&quot;. Any ideas?&#xD;&#xA;&#xD;&#xA;I'm sorry to be dumping all the code, but I've got absolutely no idea at all what is doing it. I'm very new to OpenGL.&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;    #include &quot;SDL.h&quot;&#xD;&#xA;    #include &quot;SDL_opengl.h&quot;7&#xD;&#xA;    #include &quot;IL/il.h&quot;&#xD;&#xA;    #include &quot;IL/ilut.h&quot;&#xD;&#xA;    #include &lt;math.h&gt;    &#xD;&#xA;    &#xD;&#xA;    const int SCREEN_WIDTH = 1024;&#xD;&#xA;    const int SCREEN_HEIGHT = 768;&#xD;&#xA;    const int SCREEN_BPP = 32;&#xD;&#xA;    const int FPS = 60;&#xD;&#xA;    const int XSIZE = 1024; &#xD;&#xA;    const int YSIZE = 768;&#xD;&#xA;    &#xD;&#xA;    int main( int argc, char *argv[] )&#xD;&#xA;    {&#xD;&#xA;        bool quit = false;&#xD;&#xA;    &#xD;&#xA;        SDL_Init(SDL_INIT_EVERYTHING);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);&#xD;&#xA;    &#xD;&#xA;        SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_HWSURFACE |  SDL_OPENGL);     &#xD;&#xA;    &#xD;&#xA;        glEnable(GL_TEXTURE_2D);&#xD;&#xA;        &#xD;&#xA;        const GLubyte * Vendor = glGetString(GL_VENDOR);&#xD;&#xA;    &#xD;&#xA;        glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red      &#xD;&#xA;        glMatrixMode (GL_PROJECTION);&#xD;&#xA;        glLoadIdentity ();&#xD;&#xA;        glOrtho(0, XSIZE, YSIZE, 0, 0, 1);&#xD;&#xA;        glMatrixMode (GL_MODELVIEW);&#xD;&#xA;    &#xD;&#xA;        glDisable(GL_DEPTH_TEST);&#xD;&#xA;    &#xD;&#xA;        GLuint image;&#xD;&#xA;        &#xD;&#xA;        ilInit();&#xD;&#xA;        ilutRenderer(ILUT_OPENGL);  &#xD;&#xA;    &#xD;&#xA;        ILuint texid;&#xD;&#xA;        ILboolean success;&#xD;&#xA;        ilGenImages(1, &amp;texid);&#xD;&#xA;        ilBindImage(texid);&#xD;&#xA;    &#xD;&#xA;        success = ilLoadImage(&quot;Textures.png&quot;);&#xD;&#xA;        if (success)&#xD;&#xA;        {&#xD;&#xA;            success = ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);&#xD;&#xA;            if (!success)&#xD;&#xA;            {&#xD;&#xA;                SDL_Quit();&#xD;&#xA;                return -1;&#xD;&#xA;            }&#xD;&#xA;            glGenTextures(1, &amp;image);&#xD;&#xA;            glBindTexture(GL_TEXTURE_2D, image);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),&#xD;&#xA;              ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,&#xD;&#xA;              ilGetData());&#xD;&#xA;            ilDeleteImages(1, &amp;texid);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            SDL_Quit();&#xD;&#xA;            return -2;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        SDL_Event event;&#xD;&#xA;    &#xD;&#xA;        float x = 0.0f;&#xD;&#xA;    &#xD;&#xA;        while (!quit) &#xD;&#xA;        {&#xD;&#xA;            while ( SDL_PollEvent(&amp;event) )&#xD;&#xA;            {&#xD;&#xA;                switch (event.type)&#xD;&#xA;                {&#xD;&#xA;                    case SDL_QUIT:&#xD;&#xA;                        quit = true;&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;        &#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glTranslatef(200.0f, 200.0f, 0.0f);&#xD;&#xA;            glRotatef(x,0.0f,0.0f, 1.0f);       &#xD;&#xA;            glScalef(1.0f+x, 1.0f+x, 1.0f+x);&#xD;&#xA;            glBegin(GL_QUADS);      &#xD;&#xA;            glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;            glVertex2f(-100, -100); &#xD;&#xA;            glTexCoord2f(0.0f, 0.119140f);      &#xD;&#xA;            glVertex2f(-100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.119140f);&#xD;&#xA;            glVertex2f(100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.0f);&#xD;&#xA;            glVertex2f(100, -100);&#xD;&#xA;            glEnd();&#xD;&#xA;    &#xD;&#xA;            x += 0.1f;&#xD;&#xA;            &#xD;&#xA;            SDL_GL_SwapBuffers();&#xD;&#xA;            glFlush;        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }" />
  <row Id="24792" PostHistoryTypeId="2" PostId="11547" RevisionGUID="b0e8e12e-aad3-4360-813d-083345113710" CreationDate="2011-04-23T21:36:33.047" UserId="6911" Text="Because SDL 1.3 is still a long way coming I implemented native force feedback (rumble) support for Aquaria:&#xD;&#xA;https://bitbucket.org/panzi/aquaria/&#xD;&#xA;&#xD;&#xA;However, I could not find a way to find the according event device (force feedback device) for any given joystick (gamepad) device. I looked in the SDL 1.3 source and I thought this might be how it is done:&#xD;&#xA;&#xD;&#xA;	std::ostringstream os;&#xD;&#xA;	os &lt;&lt; &quot;/dev/input/js&quot; &lt;&lt; sdl_index;&#xD;&#xA;	std::string jsdevice(os.str());&#xD;&#xA;	char evdevice[128];&#xD;&#xA;	evdevice[0] = 0;&#xD;&#xA;&#xD;&#xA;	int fd = open(jsdevice.c_str(), O_RDONLY, 0);&#xD;&#xA;	if (fd &lt;= 0) {&#xD;&#xA;		std::cerr &lt;&lt; &quot;Could not open joystick [&quot; &lt;&lt; jsdevice &lt;&lt; &quot;]: &quot; &lt;&lt; strerror(errno) &lt;&lt; std::endl;&#xD;&#xA;		return;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (ioctl(fd, EVIOCGNAME(sizeof(evdevice)), evdevice) == -1) {&#xD;&#xA;		std::cerr &lt;&lt; &quot;Could not get event device for joystick [&quot; &lt;&lt; jsdevice &lt;&lt; &quot;]: &quot; &lt;&lt; strerror(errno) &lt;&lt; std::endl;&#xD;&#xA;		close(fd);&#xD;&#xA;		return;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	close(fd);&#xD;&#xA;	&#xD;&#xA;	// ...&#xD;&#xA;&#xD;&#xA;But it always just prints this:&#xD;&#xA;&#xD;&#xA;	Could not get event device for joystick [/dev/input/js0]: Invalid argument&#xD;&#xA;&#xD;&#xA;Currently I use an environment variable to indicate the force feedback device that should be used. Does anyone know how to automatically find the correct device? What I've got is the input device as an index (e.g. the 0 in /dev/input/js0) and therefore the path." />
  <row Id="24793" PostHistoryTypeId="1" PostId="11547" RevisionGUID="b0e8e12e-aad3-4360-813d-083345113710" CreationDate="2011-04-23T21:36:33.047" UserId="6911" Text="Linux: find force feedback device for joystick device" />
  <row Id="24794" PostHistoryTypeId="3" PostId="11547" RevisionGUID="b0e8e12e-aad3-4360-813d-083345113710" CreationDate="2011-04-23T21:36:33.047" UserId="6911" Text="&lt;input&gt;&lt;linux&gt;&lt;joystick&gt;" />
  <row Id="24795" PostHistoryTypeId="17" PostId="11549" RevisionGUID="5e767cb3-b375-4021-a915-b1bc0d0c9fb8" CreationDate="2011-04-23T21:58:34.480" UserId="-1" Comment="from http://stackoverflow.com/questions/5753023/opengl-book-recommendation/5753053#5753053" Text="" />
  <row Id="24796" PostHistoryTypeId="17" PostId="11550" RevisionGUID="97cdeb68-bd69-4307-be6b-4ed0d0c006e8" CreationDate="2011-04-23T21:58:34.480" UserId="-1" Comment="from http://stackoverflow.com/questions/5753023/opengl-book-recommendation/5753065#5753065" Text="" />
  <row Id="24797" PostHistoryTypeId="2" PostId="11549" RevisionGUID="dd750306-0ef5-4e74-bd7c-898213a23451" CreationDate="2011-04-22T06:59:55.727" UserId="5837" Text=" - http://www.amazon.com/OpenGL-ES-Game-Development/dp/1592003702/ref=sr_1_7?ie=UTF8&amp;s=books&amp;qid=1303455494&amp;sr=8-7&#xD;&#xA; - http://www.amazon.com/Mobile-3D-Graphics-Kaufmann-Computer/dp/0123737273/ref=sr_1_5?ie=UTF8&amp;s=books&amp;qid=1303455494&amp;sr=8-5&#xD;&#xA; - http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321498828/ref=sr_1_4?ie=UTF8&amp;s=books&amp;qid=1303455494&amp;sr=8-4" />
  <row Id="24798" PostHistoryTypeId="2" PostId="11550" RevisionGUID="fbc685ec-3730-4a68-8245-f087dce4a436" CreationDate="2011-04-22T07:02:38.820" UserDisplayName="Nupul" Text="A personal favorite: Computer Graphics using OpenGL - Francis Hill Jr. is a good book to get your graphics 'concepts' right and understanding OpenGL along the way. A good reference." />
  <row Id="24799" PostHistoryTypeId="2" PostId="11548" RevisionGUID="d0a91868-9166-43e4-919f-5841353f5e18" CreationDate="2011-04-22T06:55:10.200" UserDisplayName="Amit Ofer" Text="I wanna start learning OpenGL especially for android game programming but I would eventually want to be able to use this knowledge for windows\linux as well.&#xD;&#xA;&#xD;&#xA;I'm having difficulty choosing between the two following books:&#xD;&#xA;1.[OpenGL Programming][1]&#xD;&#xA;2.[OpenGL superBible][2]&#xD;&#xA;&#xD;&#xA;I assume they are both pretty good, anyone here read them (or one of them) and can recommend me?&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321552628/ref=sr_1_2?ie=UTF8&amp;qid=1303454991&amp;sr=8-2&#xD;&#xA;  [2]: http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_1?ie=UTF8&amp;qid=1303454991&amp;sr=8-1" />
  <row Id="24800" PostHistoryTypeId="1" PostId="11548" RevisionGUID="d0a91868-9166-43e4-919f-5841353f5e18" CreationDate="2011-04-22T06:55:10.200" UserDisplayName="Amit Ofer" Text="openGL book recommendation" />
  <row Id="24801" PostHistoryTypeId="3" PostId="11548" RevisionGUID="d0a91868-9166-43e4-919f-5841353f5e18" CreationDate="2011-04-22T06:55:10.200" UserDisplayName="Amit Ofer" Text="&lt;opengl&gt;&lt;graphics&gt;&lt;books&gt;" />
  <row Id="24802" PostHistoryTypeId="17" PostId="11548" RevisionGUID="c2dad704-f89f-4b63-8898-3375bc6b4e7b" CreationDate="2011-04-23T21:58:34.480" UserId="-1" Comment="from http://stackoverflow.com/questions/5753023/opengl-book-recommendation" Text="" />
  <row Id="24803" PostHistoryTypeId="16" PostId="11548" RevisionGUID="a6d47c8d-8883-4627-af52-4e0d60719d04" CreationDate="2011-04-23T23:17:33.343" UserId="51" />
  <row Id="24804" PostHistoryTypeId="16" PostId="11549" RevisionGUID="b2a046ea-66b7-4248-a15b-772f8b87324d" CreationDate="2011-04-23T23:17:33.343" UserId="51" />
  <row Id="24805" PostHistoryTypeId="16" PostId="11550" RevisionGUID="69ebb4e4-f95d-417a-9d94-6c517fc365f5" CreationDate="2011-04-23T23:17:33.343" UserId="51" />
  <row Id="24806" PostHistoryTypeId="25" PostId="11547" RevisionGUID="a026710d-aaff-4c83-bd34-c2af167ff3d4" CreationDate="2011-04-24T00:09:32.700" Comment="http://twitter.com/#!/StackGameDev/status/61944829751463936" />
  <row Id="24807" PostHistoryTypeId="25" PostId="11507" RevisionGUID="067dc104-ea02-4ee4-9ee7-7b391dd11277" CreationDate="2011-04-24T03:09:32.653" Comment="http://twitter.com/#!/StackGameDev/status/61990127068643328" />
  <row Id="24808" PostHistoryTypeId="25" PostId="11525" RevisionGUID="89c1ef84-d73b-4725-9ebe-b08897331d4f" CreationDate="2011-04-24T06:09:32.460" Comment="http://twitter.com/#!/StackGameDev/status/62035424989822976" />
  <row Id="24809" PostHistoryTypeId="5" PostId="11503" RevisionGUID="d49db0b6-f0c9-4353-a69d-06b688e55657" CreationDate="2011-04-24T06:12:19.337" UserId="5554" Comment="2nd attempt to reclarify; added 7 characters in body" Text="How useful is it to keep a measurement of framerate over the course of long times (such as an hour) spanning multiple scenes/data environments? &#xD;&#xA;&#xD;&#xA;I've had plenty of times where data throttling/pushing was based on a poll of what's going on in regard to framerate over the course of a minute. I've used ~10 minutes a few times when the game can be sensitive to upcoming high-detail/volume renders to task some unused processing power/memory bandwidth ahead of time.&#xD;&#xA;&#xD;&#xA;Anyone come across any situations where long-term polling of frame speed is useful?" />
  <row Id="24810" PostHistoryTypeId="4" PostId="11503" RevisionGUID="d49db0b6-f0c9-4353-a69d-06b688e55657" CreationDate="2011-04-24T06:12:19.337" UserId="5554" Comment="2nd attempt to reclarify; added 7 characters in body" Text="Is it useful to monitor framerate over the course of an arbitrary (but long) period of time?" />
  <row Id="24811" PostHistoryTypeId="2" PostId="11551" RevisionGUID="1a38be56-d327-49d8-888d-f1fc950942f3" CreationDate="2011-04-24T08:12:48.637" UserId="6916" Text="Hey guys I am creating a game using Corona SDK and so coding it in Lua. &#xD;&#xA;So there are 2 separate functions, &#xD;&#xA;&#xD;&#xA;1. To translate the hit objects and change their color when they are tapped&#xD;&#xA;The link below is the code I am using to for the first function &#xD;&#xA;[http://developer.anscamobile.com/sample-code/fishies][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.anscamobile.com/sample-code/fishies&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2. Spawn objects that will hit the translating objects on collision. Alos on collision the spawned object disappears and the translating object bears a color(indicating the collision). In addition the size of this spawned object is dependent on i/p volume level. The function I have written is as follows,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;--VOICE INPUT CODE&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;local r = media.newRecording()&#xD;&#xA;r:startRecording()&#xD;&#xA;r:startTuner()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;--local function newBar()&#xD;&#xA;--	local bar = display.newLine( 0, 0, 1, 0 ) &#xD;&#xA;--	bar:setColor( 0, 55, 100, 20 )&#xD;&#xA;--	bar.width = 5&#xD;&#xA;--	bar.y=400&#xD;&#xA;--	bar.x=20&#xD;&#xA;--	return bar&#xD;&#xA;--end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;local c1 = display.newImage(&quot;str-minion-small.png&quot;)&#xD;&#xA;c1.isVisible=false&#xD;&#xA;local c2 = display.newImage(&quot;str-minion-mid.png&quot;)&#xD;&#xA;c2.isVisible=false&#xD;&#xA;local c3 = display.newImage(&quot;str-minion-big.png&quot;)&#xD;&#xA;c3.isVisible=false&#xD;&#xA;--SPAWNING&#xD;&#xA;local function spawnDisk( event )&#xD;&#xA;	local phase = event.phase&#xD;&#xA;	&#xD;&#xA;	local volumeBar = display.newLine( 0, 0, 1, 0 )&#xD;&#xA;volumeBar.y =  400&#xD;&#xA;volumeBar.x = 20&#xD;&#xA;--	volumeBar.isVisible=false&#xD;&#xA;	&#xD;&#xA;	local v = 20*math.log(r:getTunerVolume())    &#xD;&#xA;    local MINTHRESH = 30&#xD;&#xA;    local LEFTMARGIN = 20&#xD;&#xA;    local v2 = MINTHRESH + math.max (v, -MINTHRESH)&#xD;&#xA;    v2 = (display.contentWidth - 1 * LEFTMARGIN ) * v2 / MINTHRESH&#xD;&#xA;    volumeBar.xScale =  math.max ( 20, v2 )&#xD;&#xA;	&#xD;&#xA;	local l = volumeBar.xScale&#xD;&#xA;	local cnt1 = 0&#xD;&#xA;    local cnt2 = 0&#xD;&#xA;	local cnt3 = 0&#xD;&#xA;	local ONE =1&#xD;&#xA;	local val = event.numTaps&#xD;&#xA;	&#xD;&#xA;	--local px=event.x&#xD;&#xA;	--local py=event.y&#xD;&#xA;	&#xD;&#xA;	if &quot;ended&quot; == phase then&#xD;&#xA;&#xD;&#xA;		--audio.play( popSound )&#xD;&#xA;		--myLabel.isVisible = false&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if l &gt; 50 and l &lt;=150 then&#xD;&#xA;		&#xD;&#xA;            --  c1:setFillColor(10,105,0)&#xD;&#xA;	         -- c1.isVisible=false&#xD;&#xA;		       c1.x=math.random( 10, 450 )&#xD;&#xA;		       c1.y=math.random( 10, 300 )&#xD;&#xA;		      physics.addBody( c1, { density=1, radius=10.0 } )&#xD;&#xA;		        c1.isVisible=true&#xD;&#xA;		        cnt1= cnt1+ ONE&#xD;&#xA;		        return c1&#xD;&#xA;		&#xD;&#xA;		elseif l &gt; 100 and l &lt;=250 then&#xD;&#xA;			&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;              --c2:setFillColor(200,10,0)&#xD;&#xA;		      c2.x=math.random( 10, 450 )&#xD;&#xA;		      c2.y=math.random( 10, 300 )&#xD;&#xA;		       &#xD;&#xA;		       &#xD;&#xA;		       &#xD;&#xA;		      &#xD;&#xA;	physics.addBody( c2, { density=2, radius=9000.0 } )&#xD;&#xA;		&#xD;&#xA;		        c2.isVisible=true&#xD;&#xA;		        cnt2= cnt2+ ONE&#xD;&#xA;		        &#xD;&#xA;		        return c2&#xD;&#xA;		        &#xD;&#xA;		        &#xD;&#xA;		   elseif l &gt;=250 then&#xD;&#xA;			&#xD;&#xA;	          &#xD;&#xA;	&#xD;&#xA;            &#xD;&#xA;	         &#xD;&#xA;		       c3.x=math.random( 40, 450 )&#xD;&#xA;c3.y=math.random( 40, 300 )&#xD;&#xA;		       &#xD;&#xA;		       &#xD;&#xA;		       &#xD;&#xA;		      &#xD;&#xA;				physics.addBody( c3, { density=2, radius=7000.0 , bounce=0.0 } )&#xD;&#xA;		&#xD;&#xA;		        c3.isVisible=true&#xD;&#xA;		        cnt3= cnt3+ ONE&#xD;&#xA;		        return c3&#xD;&#xA;	&#xD;&#xA;		end&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;		&#xD;&#xA;	end&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;buzzR:addEventListener( &quot;touch&quot;, spawnDisk ) -- touch the screen to create disks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now both functions work fine independently but there is no collision happening. Its almost as if the translating object and the spawn object are on different layers. The translating object passes through the spawn object freely.&#xD;&#xA;&#xD;&#xA;Can anyone please tell me how to resolve this problem. And how can I get them to collide.&#xD;&#xA;&#xD;&#xA;Its my first attempt at game development, that too for a mobile platform so would appreciate all help. Also if I have not been specific do let me know. I ll try to frame the query better :).&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24812" PostHistoryTypeId="1" PostId="11551" RevisionGUID="1a38be56-d327-49d8-888d-f1fc950942f3" CreationDate="2011-04-24T08:12:48.637" UserId="6916" Text="Help with Collision of spawned object(postion fixed) with objects that there are translating on screen" />
  <row Id="24813" PostHistoryTypeId="3" PostId="11551" RevisionGUID="1a38be56-d327-49d8-888d-f1fc950942f3" CreationDate="2011-04-24T08:12:48.637" UserId="6916" Text="&lt;iphone&gt;&lt;collision-detection&gt;&lt;lua&gt;&lt;mobile&gt;" />
  <row Id="24814" PostHistoryTypeId="25" PostId="11551" RevisionGUID="d8d929c8-c8c1-4584-8ec3-123e480e609f" CreationDate="2011-04-24T09:09:32.500" Comment="http://twitter.com/#!/StackGameDev/status/62080724353810432" />
  <row Id="24815" PostHistoryTypeId="2" PostId="11552" RevisionGUID="454cd821-933d-4187-993b-40218dde7eca" CreationDate="2011-04-24T09:21:28.977" UserId="5493" Text="I am currently reading the SuperBible (fourth edition).&#xD;&#xA;&#xD;&#xA;I had previously no OpenGL (or other 3D graphics) knowledge whatsoever, and I find the chapters very clear. The book is well structured too, and you'll quickly find what you are looking for (there is even an API reference at the end of the book). There's a bunch of colored illustrations for most examples too, it's really nice.&#xD;&#xA;&#xD;&#xA;All the examples use GLUT, so the code is really focused on using the OpenGL API. However, it's not in that book that you'll learn how to develop a game." />
  <row Id="24816" PostHistoryTypeId="5" PostId="11533" RevisionGUID="47f21ced-31a8-4998-b996-b1b72b878d03" CreationDate="2011-04-24T11:23:36.260" UserId="6908" Comment="added 111 characters in body" Text="I'm learning C++, and I'm writing my first OpenGL program. Unfortunately, it seems to be defaulting to Software Rendering (CPU uses bounces, GPU uses stays at 1%). I'm using SDL as the Windowing system. I've got no idea why, but when there is significant scaling, the program grinds to a halt. My PC should be able to handle it - I'm using an 8800GTX. My texture is 1024x1024, 32 bit RGBA and loaded with DevIL,  and glGetString(GL_VENDOR) is returning &quot;NVidia Corporation&quot;. Any ideas?&#xD;&#xA;&#xD;&#xA;I'm sorry to be dumping all the code, but I've got absolutely no idea at all what is doing it. I'm very new to OpenGL.&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;    #include &quot;SDL.h&quot;&#xD;&#xA;    #include &quot;SDL_opengl.h&quot;7&#xD;&#xA;    #include &quot;IL/il.h&quot;&#xD;&#xA;    #include &quot;IL/ilut.h&quot;&#xD;&#xA;    #include &lt;math.h&gt;    &#xD;&#xA;    &#xD;&#xA;    const int SCREEN_WIDTH = 1024;&#xD;&#xA;    const int SCREEN_HEIGHT = 768;&#xD;&#xA;    const int SCREEN_BPP = 32;&#xD;&#xA;    const int FPS = 60;&#xD;&#xA;    const int XSIZE = 1024; &#xD;&#xA;    const int YSIZE = 768;&#xD;&#xA;    &#xD;&#xA;    int main( int argc, char *argv[] )&#xD;&#xA;    {&#xD;&#xA;        bool quit = false;&#xD;&#xA;    &#xD;&#xA;        SDL_Init(SDL_INIT_EVERYTHING);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);&#xD;&#xA;        SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);&#xD;&#xA;    &#xD;&#xA;        SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_HWSURFACE |  SDL_OPENGL);     &#xD;&#xA;    &#xD;&#xA;        glEnable(GL_TEXTURE_2D);&#xD;&#xA;        &#xD;&#xA;        const GLubyte * Vendor = glGetString(GL_VENDOR);&#xD;&#xA;    &#xD;&#xA;        glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red      &#xD;&#xA;        glMatrixMode (GL_PROJECTION);&#xD;&#xA;        glLoadIdentity ();&#xD;&#xA;        glOrtho(0, XSIZE, YSIZE, 0, 0, 1);&#xD;&#xA;        glMatrixMode (GL_MODELVIEW);&#xD;&#xA;    &#xD;&#xA;        glDisable(GL_DEPTH_TEST);&#xD;&#xA;    &#xD;&#xA;        GLuint image;&#xD;&#xA;        &#xD;&#xA;        ilInit();&#xD;&#xA;        ilutRenderer(ILUT_OPENGL);  &#xD;&#xA;    &#xD;&#xA;        ILuint texid;&#xD;&#xA;        ILboolean success;&#xD;&#xA;        ilGenImages(1, &amp;texid);&#xD;&#xA;        ilBindImage(texid);&#xD;&#xA;    &#xD;&#xA;        success = ilLoadImage(&quot;Textures.png&quot;);&#xD;&#xA;        if (success)&#xD;&#xA;        {&#xD;&#xA;            success = ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);&#xD;&#xA;            if (!success)&#xD;&#xA;            {&#xD;&#xA;                SDL_Quit();&#xD;&#xA;                return -1;&#xD;&#xA;            }&#xD;&#xA;            glGenTextures(1, &amp;image);&#xD;&#xA;            glBindTexture(GL_TEXTURE_2D, image);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,&#xD;&#xA;            GL_NEAREST);&#xD;&#xA;            glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),&#xD;&#xA;              ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,&#xD;&#xA;              ilGetData());&#xD;&#xA;            ilDeleteImages(1, &amp;texid);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            SDL_Quit();&#xD;&#xA;            return -2;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        SDL_Event event;&#xD;&#xA;    &#xD;&#xA;        float x = 0.0f;&#xD;&#xA;    &#xD;&#xA;        while (!quit) &#xD;&#xA;        {&#xD;&#xA;            while ( SDL_PollEvent(&amp;event) )&#xD;&#xA;            {&#xD;&#xA;                switch (event.type)&#xD;&#xA;                {&#xD;&#xA;                    case SDL_QUIT:&#xD;&#xA;                        quit = true;&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;        &#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glTranslatef(200.0f, 200.0f, 0.0f);&#xD;&#xA;            glRotatef(x,0.0f,0.0f, 1.0f);       &#xD;&#xA;            glScalef(1.0f+x, 1.0f+x, 1.0f+x);&#xD;&#xA;            glBegin(GL_QUADS);      &#xD;&#xA;            glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;            glVertex2f(-100, -100); &#xD;&#xA;            glTexCoord2f(0.0f, 0.119140f);      &#xD;&#xA;            glVertex2f(-100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.119140f);&#xD;&#xA;            glVertex2f(100, 100); &#xD;&#xA;            glTexCoord2f(0.091797f, 0.0f);&#xD;&#xA;            glVertex2f(100, -100);&#xD;&#xA;            glEnd();&#xD;&#xA;    &#xD;&#xA;            x += 0.1f;&#xD;&#xA;            &#xD;&#xA;            SDL_GL_SwapBuffers();&#xD;&#xA;            glFlush;        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Edit : (24/04/2011 9.22 PM AEST)&#xD;&#xA;When run on an ancient card, on an ancient computer, it maintains ~60FPS." />
  <row Id="24817" PostHistoryTypeId="25" PostId="11528" RevisionGUID="1aacded5-ce81-4658-b140-4a6f910c5cb4" CreationDate="2011-04-24T12:09:32.453" Comment="http://twitter.com/#!/StackGameDev/status/62126021494833152" />
  <row Id="24818" PostHistoryTypeId="2" PostId="11553" RevisionGUID="4a6093a4-863a-4ef1-8999-218697720449" CreationDate="2011-04-24T13:06:13.397" UserId="4513" Text="My suggestion, is to try your entire project, on a different platform, and see if the problem persists.&#xD;&#xA;It will quickly eliminate any guessing your making over what it could be in relation to hardware; which at this point (at the time of this answer) appears to be the only possible solution other than SDL itself, which is industry proven to work with *at least* the basics of OGL, let alone past that." />
  <row Id="24819" PostHistoryTypeId="2" PostId="11554" RevisionGUID="43614329-3305-4cef-85bf-547a44af82f3" CreationDate="2011-04-24T13:29:31.753" UserId="2971" Text="I'm working on creating a multiplayer game, with the client in ActionScript and the server written in Java. I'm using `XMLSocket` in the client to connect to the server. The server code looks something like:&#xD;&#xA;&#xD;&#xA;    ServerSocket server = new ServerSocket(port);&#xD;&#xA;    &#xD;&#xA;    while(true)&#xD;&#xA;    {&#xD;&#xA;        Socket client = server.accept();&#xD;&#xA;        ClientHandlingProcess child = new ClientHandlingProcess(client);&#xD;&#xA;        child.start(); // starts new thread for client&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The client handling process looks something like:&#xD;&#xA;&#xD;&#xA;    while(true)&#xD;&#xA;    {&#xD;&#xA;        byte[] arr = new byte[1024];&#xD;&#xA;        if(socket.getInputStream().read(arr) == -1)&#xD;&#xA;        {&#xD;&#xA;            break;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        handleInputMethod(arr);&#xD;&#xA;    &#xD;&#xA;        while(!message_queue.isEmpty())&#xD;&#xA;        {&#xD;&#xA;            socket.getOutputStream().write(message_queue.get(0).getBytes());&#xD;&#xA;            message_queue.remove(0);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The issue is that the `read` method is blocking, meaning I can't send any data while I'm waiting for data to come in. What would be a good way to fix this? Have two processes: one for reading and one for writing, have the client send empty requests when it has no proper messages to send, or is there another way I can proceed?" />
  <row Id="24820" PostHistoryTypeId="1" PostId="11554" RevisionGUID="43614329-3305-4cef-85bf-547a44af82f3" CreationDate="2011-04-24T13:29:31.753" UserId="2971" Text="Client server design question" />
  <row Id="24821" PostHistoryTypeId="3" PostId="11554" RevisionGUID="43614329-3305-4cef-85bf-547a44af82f3" CreationDate="2011-04-24T13:29:31.753" UserId="2971" Text="&lt;java&gt;&lt;actionscript-3&gt;&lt;server&gt;&lt;client-server&gt;&lt;client&gt;" />
  <row Id="24822" PostHistoryTypeId="2" PostId="11555" RevisionGUID="a10fd79a-7f1d-4227-99ff-8e61ba58de4c" CreationDate="2011-04-24T13:43:44.947" UserId="6908" Text="I've got no idea why, but it seems to have repaired itself. I even put a NPOT texture to test and I'm still getting very, very reasonable FPS rates. I don't think I've changed anything, and I've really got not idea at all why it is fixed. I'm sorry that this doesn't seem to be really answering the question. If anybody else can decipher why - you're doing better then me.&#xD;&#xA;&#xD;&#xA;My final source is below:&#xD;&#xA;&#xD;&#xA;    #pragma once&#xD;&#xA;    #include &quot;SDL.h&quot;&#xD;&#xA;    #include &quot;SDL_opengl.h&quot;&#xD;&#xA;    #include &quot;IL/il.h&quot;&#xD;&#xA;    #include &quot;IL/ilut.h&quot;&#xD;&#xA;    #include &lt;math.h&gt;    &#xD;&#xA;    #include &lt;fstream&gt;&#xD;&#xA;&#xD;&#xA;    const int SCREEN_WIDTH = 1024;&#xD;&#xA;    const int SCREEN_HEIGHT = 768;&#xD;&#xA;    const int SCREEN_BPP = 32;&#xD;&#xA;    const int FPS = 60;&#xD;&#xA;    const int XSIZE = 1024; &#xD;&#xA;    const int YSIZE = 768;&#xD;&#xA;&#xD;&#xA;    using namespace std;&#xD;&#xA;&#xD;&#xA;    int main( int argc, char *argv[] )&#xD;&#xA;    {&#xD;&#xA;    bool quit = false;&#xD;&#xA;&#xD;&#xA;    SDL_Init(SDL_INIT_EVERYTHING);&#xD;&#xA;    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);&#xD;&#xA;    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);&#xD;&#xA;    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);&#xD;&#xA;    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);&#xD;&#xA;    SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);&#xD;&#xA;&#xD;&#xA;    SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_HWSURFACE |  SDL_OPENGL);     &#xD;&#xA;&#xD;&#xA;    glEnable(GL_TEXTURE_2D);&#xD;&#xA;&#xD;&#xA;    const GLubyte * Vendor = glGetString(GL_VENDOR);&#xD;&#xA;&#xD;&#xA;    glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red      &#xD;&#xA;    glMatrixMode (GL_PROJECTION);&#xD;&#xA;    glLoadIdentity ();&#xD;&#xA;    glOrtho(0, XSIZE, YSIZE, 0, 0, 1);&#xD;&#xA;    glMatrixMode (GL_MODELVIEW);&#xD;&#xA;&#xD;&#xA;    glDisable(GL_DEPTH_TEST);&#xD;&#xA;&#xD;&#xA;    GLuint image;&#xD;&#xA;&#xD;&#xA;    ilInit();&#xD;&#xA;    ilutRenderer(ILUT_OPENGL);  &#xD;&#xA;&#xD;&#xA;    ILuint texid;&#xD;&#xA;    ILboolean success;&#xD;&#xA;    ilGenImages(1, &amp;texid);&#xD;&#xA;    ilBindImage(texid);&#xD;&#xA;&#xD;&#xA;    success = ilLoadImage(&quot;Textures.png&quot;);&#xD;&#xA;&#xD;&#xA;		Uint32 startclock = 0;&#xD;&#xA;	Uint32 deltaclock = 0;&#xD;&#xA;	Uint32 currentFPS = 0;		&#xD;&#xA;	startclock = SDL_GetTicks();&#xD;&#xA;	deltaclock = SDL_GetTicks();&#xD;&#xA;	&#xD;&#xA;	fstream Log;&#xD;&#xA;	Log.open(&quot;log.txt&quot;, ios::out | ios::trunc);&#xD;&#xA;	Log.clear();	&#xD;&#xA;&#xD;&#xA;    if (success)&#xD;&#xA;    {&#xD;&#xA;        success = ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);&#xD;&#xA;        if (!success)&#xD;&#xA;        {&#xD;&#xA;            SDL_Quit();&#xD;&#xA;            return -1;&#xD;&#xA;        }&#xD;&#xA;        glGenTextures(1, &amp;image);&#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, image);&#xD;&#xA;        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);&#xD;&#xA;        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);&#xD;&#xA;        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,&#xD;&#xA;        GL_NEAREST);&#xD;&#xA;        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,&#xD;&#xA;        GL_NEAREST);&#xD;&#xA;        glTexImage2D(GL_TEXTURE_2D, 0, ilGetInteger(IL_IMAGE_BPP), ilGetInteger(IL_IMAGE_WIDTH),&#xD;&#xA;          ilGetInteger(IL_IMAGE_HEIGHT), 0, ilGetInteger(IL_IMAGE_FORMAT), GL_UNSIGNED_BYTE,&#xD;&#xA;          ilGetData());&#xD;&#xA;        ilDeleteImages(1, &amp;texid);&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        SDL_Quit();&#xD;&#xA;        return -2;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    SDL_Event event;&#xD;&#xA;&#xD;&#xA;    float x = 0.0f;&#xD;&#xA;&#xD;&#xA;    while (!quit) &#xD;&#xA;    {&#xD;&#xA;        while ( SDL_PollEvent(&amp;event) )&#xD;&#xA;        {&#xD;&#xA;            switch (event.type)&#xD;&#xA;            {&#xD;&#xA;                case SDL_QUIT:&#xD;&#xA;                    quit = true;&#xD;&#xA;                    break;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;        glLoadIdentity();&#xD;&#xA;        glTranslatef(200.0f, 200.0f, 0.0f);&#xD;&#xA;        glRotatef(x,0.0f,0.0f, 1.0f);       &#xD;&#xA;        glScalef(1.0f+x, 1.0f+x, 1.0f+x);&#xD;&#xA;        glBegin(GL_QUADS);      &#xD;&#xA;        glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;        glVertex2f(-100, -100); &#xD;&#xA;        glTexCoord2f(0.0f, 0.119140f);      &#xD;&#xA;        glVertex2f(-100, 100); &#xD;&#xA;        glTexCoord2f(0.091797f, 0.119140f);&#xD;&#xA;        glVertex2f(100, 100); &#xD;&#xA;        glTexCoord2f(0.091797f, 0.0f);&#xD;&#xA;        glVertex2f(100, -100);&#xD;&#xA;        glEnd();&#xD;&#xA;&#xD;&#xA;        x += 0.1f;&#xD;&#xA;&#xD;&#xA;        SDL_GL_SwapBuffers();&#xD;&#xA;        &#xD;&#xA;		deltaclock = SDL_GetTicks() - startclock;&#xD;&#xA;		startclock = SDL_GetTicks();&#xD;&#xA;		if ( deltaclock != 0 )	currentFPS = 1000 / deltaclock; &#xD;&#xA;		static char buffer[20] = {0}; &#xD;&#xA;		sprintf( buffer, &quot;%d &quot;, currentFPS ); &#xD;&#xA;		SDL_WM_SetCaption( buffer,0 ); &#xD;&#xA;&#xD;&#xA;		if (currentFPS &lt; 4) { quit = true ;}&#xD;&#xA;&#xD;&#xA;		Log &lt;&lt; buffer;&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;	Log.close();&#xD;&#xA;    return 0;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="24823" PostHistoryTypeId="2" PostId="11556" RevisionGUID="7fdb2f1e-37a6-4291-91dc-9eb7c48a3c9b" CreationDate="2011-04-24T14:00:12.020" UserId="6891" Text="hi i made simple puzzle game and i want to put a resume option on it so when user open the game next time he play a game where he stops" />
  <row Id="24824" PostHistoryTypeId="1" PostId="11556" RevisionGUID="7fdb2f1e-37a6-4291-91dc-9eb7c48a3c9b" CreationDate="2011-04-24T14:00:12.020" UserId="6891" Text="resume option on game in android" />
  <row Id="24825" PostHistoryTypeId="3" PostId="11556" RevisionGUID="7fdb2f1e-37a6-4291-91dc-9eb7c48a3c9b" CreationDate="2011-04-24T14:00:12.020" UserId="6891" Text="&lt;android&gt;" />
  <row Id="24826" PostHistoryTypeId="2" PostId="11557" RevisionGUID="30d92052-28b1-451d-9b55-2390cf06a8cc" CreationDate="2011-04-24T14:06:45.087" UserId="6588" Text="Although my comment about fixing the formatting of the code in your question still applies, I think the problem is that the objects are all inserted into a group in the Fishies code. That is, your comment that they seem to be on different layers is correct. Note line 113:&#xD;&#xA;&#xD;&#xA;group:insert( fishOriginal, true )&#xD;&#xA;&#xD;&#xA;Physics don't work between display groups. This was done on purpose so that you can move the group around without affecting anything in the group, in order to do a moving camera like the Egg Breaker demo." />
  <row Id="24827" PostHistoryTypeId="5" PostId="11534" RevisionGUID="a896e415-a1ab-486a-9aaf-3e523ad43b4a" CreationDate="2011-04-24T14:09:08.250" UserId="6605" Comment="added 65 characters in body" Text="I found the correct way of doing this (This code is in the Activity class)&#xD;&#xA;&#xD;&#xA;    view = new MyGLSurfaceView(this, gameHandler);&#xD;&#xA;    editBox = new EditText(context);&#xD;&#xA;    editBox.setText(&quot;Hello Matron&quot;);&#xD;&#xA;    	&#xD;&#xA;    view.setRenderer(new OpenGLRenderer(gameHandler));&#xD;&#xA;    setContentView(view);&#xD;&#xA;       		&#xD;&#xA;    addContentView(editBox, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The key is using **addContentView** method on the Activity class to add the editBox on top of the GLSurfaceView.&#xD;&#xA;&#xD;&#xA;Hope this helps some googlers :)&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;Ash&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24831" PostHistoryTypeId="25" PostId="11556" RevisionGUID="4dd65481-e1cf-4b77-a59b-33bd6e63b471" CreationDate="2011-04-24T15:09:32.557" Comment="http://twitter.com/#!/StackGameDev/status/62171320988868608" />
  <row Id="24836" PostHistoryTypeId="2" PostId="11560" RevisionGUID="a1c9949d-5df8-4b3d-baef-b75492bb82ed" CreationDate="2011-04-24T15:46:39.957" UserId="20" Text="You'll have to write your current game-state to &quot;disk&quot; whenever the user quits the application or triggers a &quot;save-game&quot; manually. This is also called [serialization][1]. &#xD;&#xA;Whenever the application resumes, deserialize the data and restore the previous game-state.&#xD;&#xA;&#xD;&#xA;The data that is needed for serialization heavily depends on your game. &#xD;&#xA;&#xD;&#xA;I'm not an android developer, but I suggest you have a look at the [Serializable Interface][2] and the [onPause and onResume][3] callbacks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/4202/what-is-serialization&#xD;&#xA;  [2]: http://developer.android.com/reference/java/io/Serializable.html&#xD;&#xA;  [3]: http://developer.android.com/reference/android/app/Activity.html#onPause%28%29" />
  <row Id="24837" PostHistoryTypeId="2" PostId="11561" RevisionGUID="16c2deb9-1700-4799-9571-5179e9782274" CreationDate="2011-04-24T15:46:56.693" UserId="6924" Text="i just put this question on the ogre's forums,&#xD;&#xA;&#xD;&#xA;and i still want to put it again.&#xD;&#xA;&#xD;&#xA;Hi everybody:&#xD;&#xA;&#xD;&#xA;    I'am a newbie here, just found that ogres is a amazing engine for 3d programming,  &#xD;&#xA;&#xD;&#xA;The Entity class is easy to load a static model which exported via some kinds of 3ds max plugins,&#xD;&#xA;&#xD;&#xA;But i did't read the source of ogre Because i'm not be familar with ogre, And i just get started with ogre a couple days ago.&#xD;&#xA;&#xD;&#xA;So i question is, Is anyone know if i can load a ogre's mesh via d3d?&#xD;&#xA;&#xD;&#xA;Or anyone has been doing something about the OgreEntity.h and split it out with a Seperate Class which it can directly use in row direct3d?&#xD;&#xA;&#xD;&#xA;If anyone can show me the oger's mesh file format will be appreciated.&#xD;&#xA;&#xD;&#xA;Thanks for your further replying. &#xD;&#xA;&#xD;&#xA;                                                                                                ilysony  24 April, 2011" />
  <row Id="24838" PostHistoryTypeId="1" PostId="11561" RevisionGUID="16c2deb9-1700-4799-9571-5179e9782274" CreationDate="2011-04-24T15:46:56.693" UserId="6924" Text="can i load ogre's mesh file via direct3d?" />
  <row Id="24839" PostHistoryTypeId="3" PostId="11561" RevisionGUID="16c2deb9-1700-4799-9571-5179e9782274" CreationDate="2011-04-24T15:46:56.693" UserId="6924" Text="&lt;directx&gt;" />
  <row Id="24840" PostHistoryTypeId="2" PostId="11562" RevisionGUID="b021dbf3-0adc-4225-af4e-f4dd9e50fb4e" CreationDate="2011-04-24T15:50:42.690" UserId="2239" Text="Zelda games for Nintendo DS might be useful for inspiration - you hack/slash and shoot by tapping where to attack/shoot, in the general direction or directly on enemies - and then move by holding somewhere on the screen which makes your character start moving towards that point until you stop holding.&#xD;&#xA;&#xD;&#xA;* Move: hold down on a point to start moving towards&#xD;&#xA;* Attack: tap on a point to attack&#xD;&#xA;&#xD;&#xA;Obviously, you can't walk and shoot at the same time - so it might not work in all situations - but it felt pretty useful with a stylus ^^" />
  <row Id="24842" PostHistoryTypeId="5" PostId="11561" RevisionGUID="87321173-d338-44f0-b847-d6c18898143b" CreationDate="2011-04-24T15:54:11.920" UserId="20" Comment="changed spelling" Text="I just posted this question over at the the OGRE 3D forums, and I wanted to post it here as well.&#xD;&#xA;&#xD;&#xA;I'm a newbie here, just found that OGRE is an amazing engine for 3d programming.  &#xD;&#xA;&#xD;&#xA;Using the Entity class it's easy to load a static model which was exported via some kind of 3ds max plugin.&#xD;&#xA;&#xD;&#xA;But I did't read the source-code of OGRE Because I'm not familar with it, and I just got started with OGRE a couple days ago.&#xD;&#xA;&#xD;&#xA;So the question is: Does anyone know if I can load a OGRE mesh via d3d?&#xD;&#xA;&#xD;&#xA;Or has anyone been doing something using the `OgreEntity.h` and split it out into a separate class which can directly be used in raw direct3d?&#xD;&#xA;&#xD;&#xA;I would appreciate if anyone could share some information about the OGRE mesh file format.&#xD;&#xA;" />
  <row Id="24843" PostHistoryTypeId="4" PostId="11561" RevisionGUID="87321173-d338-44f0-b847-d6c18898143b" CreationDate="2011-04-24T15:54:11.920" UserId="20" Comment="changed spelling" Text="Can I load OGRE's mesh file via direct3d?" />
  <row Id="24844" PostHistoryTypeId="6" PostId="11561" RevisionGUID="87321173-d338-44f0-b847-d6c18898143b" CreationDate="2011-04-24T15:54:11.920" UserId="20" Comment="changed spelling" Text="&lt;directx&gt;&lt;ogre&gt;" />
  <row Id="24846" PostHistoryTypeId="2" PostId="11565" RevisionGUID="6d6efcc7-2861-40cf-be1d-96aec372c7ff" CreationDate="2011-04-24T16:01:18.920" UserId="6924" Text="Java's NIO package (as of Java6), provides support for non-blocking I/O only, via Selectors.&#xD;&#xA;" />
  <row Id="24847" PostHistoryTypeId="2" PostId="11566" RevisionGUID="eaccbe9c-1b55-481e-9e09-fbb15a09fa45" CreationDate="2011-04-24T16:01:56.393" UserId="20" Text="The easiest way is probably to just export the model in a direct3d compatible format? Or convert the existing `.mesh` file.&#xD;&#xA;&#xD;&#xA;If you really want to use the OGRE mesh format and load that outside of OGRE, your best bet would be to write your own deserializer. You could use the [MeshSerializer][1] as a starting-point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/docs/api/html/classOgre_1_1MeshSerializer.html#_details" />
  <row Id="24848" PostHistoryTypeId="2" PostId="11567" RevisionGUID="db817d6f-7919-4553-b347-a91c888c3b58" CreationDate="2011-04-24T16:05:14.703" UserId="6924" Text="its better to use C#. bacause that using C# will not cause unknow problems.&#xD;&#xA;&#xD;&#xA;however, Yes, it can cll C functions." />
  <row Id="24849" PostHistoryTypeId="2" PostId="11568" RevisionGUID="ad39b15c-9f87-4125-996c-78dc80b61a7b" CreationDate="2011-04-24T16:22:56.233" UserId="6616" Text="I am creating a kaleidoscopic effect on an android tablet. I am using the code below to rotate a slice of an image, but as you can see in the image when rotating a bitmap 60 degrees it distorts it quite a lot (red rectangles) – it is smudging the image! I have set dither and anti-alias flags but it does not help much. I think it is just not a very sophisticated bitmap rotation algorithm.&#xD;&#xA;&#xD;&#xA;    canvas.save(); &#xD;&#xA;    canvas.rotate(angle, screenW/2, screenH/2);&#xD;&#xA;    canvas.drawBitmap(picSlice, screenW/2, screenH/2, pOutput);&#xD;&#xA;    canvas.restore();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So I wonder if you can help me find a better way to rotate a bitmap. It does not have to be fast, because I intend to use a high quality rotation only when I want to save the screen to the SD card - I would redraw the screen in memory before saving.&#xD;&#xA;&#xD;&#xA;Do you know any comprehensible or replicable algorithm for bitmap rotation that I could programme or use as a library? Or any other suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7i7P9.jpg" />
  <row Id="24850" PostHistoryTypeId="1" PostId="11568" RevisionGUID="ad39b15c-9f87-4125-996c-78dc80b61a7b" CreationDate="2011-04-24T16:22:56.233" UserId="6616" Text="Need a good quality bitmap rotation algorithm for Android" />
  <row Id="24851" PostHistoryTypeId="3" PostId="11568" RevisionGUID="ad39b15c-9f87-4125-996c-78dc80b61a7b" CreationDate="2011-04-24T16:22:56.233" UserId="6616" Text="&lt;android&gt;&lt;rotation&gt;&lt;image&gt;" />
  <row Id="24852" PostHistoryTypeId="2" PostId="11569" RevisionGUID="0b48f72b-b331-4a0a-b5ab-be5acc343259" CreationDate="2011-04-24T16:45:38.150" UserId="1868" Text="I have seen term &quot;rotation by shearing&quot; mentioned in several times. I have not tried it myself but it doesn't look impossible to implement&#xD;&#xA;&#xD;&#xA;http://www.ocf.berkeley.edu/~fricke/projects/israel/paeth/rotation_by_shearing.html&#xD;&#xA;&#xD;&#xA;http://www.codeproject.com/KB/graphics/rotatebyshear.aspx" />
  <row Id="24853" PostHistoryTypeId="2" PostId="11570" RevisionGUID="a144fd67-9340-453b-94e4-e21324267148" CreationDate="2011-04-24T16:46:02.393" UserId="450" Text="You have basically these two options:&#xD;&#xA;&#xD;&#xA;- Use blocking IO with one thread per client&#xD;&#xA;- Use non blocking IO &#xD;&#xA;&#xD;&#xA;The first option has the disadvantage that it does not scale for large number of clients.&#xD;&#xA;&#xD;&#xA;While non blocking IO can be done by checking inputstream.available(), it may be a good idea to look at the New I/O API. Wikipedia has a good article on [NIO][1] with sample code. You can find additional information in the [JavaDoc for the NIO package][2]. And on a quick glance this [tutorial][3] seems helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You might get away with doing smart things on the client side, such as sending a dummy message on every &quot;turn&quot;. This, however, means that a rouge client can freeze your server. So you should not go into this direction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/New_I/O&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/nio/package-summary.html&#xD;&#xA;  [3]: http://www.roseindia.net/tutorial/java/corejava/nio/home.html" />
  <row Id="24854" PostHistoryTypeId="25" PostId="11568" RevisionGUID="97636937-bed7-480b-8d28-5ea5b44ca18c" CreationDate="2011-04-24T18:09:32.457" Comment="http://twitter.com/#!/StackGameDev/status/62216619560148992" />
  <row Id="24857" PostHistoryTypeId="2" PostId="11571" RevisionGUID="e41671b9-56fb-4d8b-b371-529d967b7aba" CreationDate="2011-04-24T18:54:17.947" UserId="5021" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;On page 4 in the &quot;Implementation&quot; section they describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand two things:&#xD;&#xA;&#xD;&#xA; 1. How do I construct the 2D lookup&#xD;&#xA;    table texture? I don't quite&#xD;&#xA;    understand their explanation,&#xD;&#xA;    although it doesn't seem like it's&#xD;&#xA;    difficult at all.&#xD;&#xA;    &#xD;&#xA; 2. My normal maps contain normalized&#xD;&#xA;    normals, so where is this difference&#xD;&#xA;    in |N_a| coming from? (Shouldn't&#xD;&#xA;    |N_a| always be 1?)" />
  <row Id="24858" PostHistoryTypeId="1" PostId="11571" RevisionGUID="e41671b9-56fb-4d8b-b371-529d967b7aba" CreationDate="2011-04-24T18:54:17.947" UserId="5021" Text="Trying to understand relatively simple normal map antialiasing paper." />
  <row Id="24859" PostHistoryTypeId="3" PostId="11571" RevisionGUID="e41671b9-56fb-4d8b-b371-529d967b7aba" CreationDate="2011-04-24T18:54:17.947" UserId="5021" Text="&lt;hlsl&gt;&lt;normal-mapping&gt;&lt;antialiasing&gt;" />
  <row Id="24860" PostHistoryTypeId="2" PostId="11572" RevisionGUID="8568dc8c-c271-41b1-b9a5-dce2d3933029" CreationDate="2011-04-24T19:01:00.600" UserId="6756" Text="I have started to design a game. I have weighed up the options of XNA, Unity, and Silverlight. I am going with Silverlight... Is there anything I important that I am missing that I need to know?" />
  <row Id="24861" PostHistoryTypeId="1" PostId="11572" RevisionGUID="8568dc8c-c271-41b1-b9a5-dce2d3933029" CreationDate="2011-04-24T19:01:00.600" UserId="6756" Text="Why do I need to know about game design before I design and develop a game in Silverlight?" />
  <row Id="24862" PostHistoryTypeId="3" PostId="11572" RevisionGUID="8568dc8c-c271-41b1-b9a5-dce2d3933029" CreationDate="2011-04-24T19:01:00.600" UserId="6756" Text="&lt;silverlight&gt;&lt;considerations&gt;" />
  <row Id="24863" PostHistoryTypeId="2" PostId="11573" RevisionGUID="d0a9ab61-d791-4335-91fc-229b0421ef9c" CreationDate="2011-04-24T19:01:48.850" UserId="4662" Text="`2.` They may not always be normalized after transformation into projection or world space, even if you provide the correct inverse transpose of the vertex transformation." />
  <row Id="24864" PostHistoryTypeId="2" PostId="11574" RevisionGUID="064f7a59-4ba8-4d0b-9735-218ea614c638" CreationDate="2011-04-24T19:53:06.837" UserId="6797" Text="There are several ways to preserve state in Android apps.  &#xD;&#xA;&#xD;&#xA;If your gameplay is limited to a single `Activity` (common for anything relying a `SurfaceView`), and your game state is relatively small, you can often rely on the `savedInstanceState Bundle` passed into `Activity.onCreate`.  Not only does this allow to to support saved state as the user goes into and out of the game, it will also bullet proof your code against various `Configuration` changes, such as opening the keyboard or changing display mode.&#xD;&#xA;&#xD;&#xA;You can also use `SharedPreferences` to store data in one or more key/value maps.  This is probably the most common solution, and becomes available to all Activities within your app (and even other entry points, such as `BroadcastReceivers`, in a thread safe manner.&#xD;&#xA;&#xD;&#xA;Probably not the best approach for games, other than some deep inventory RPGS, every Android device has an SQL instance built in.&#xD;&#xA;&#xD;&#xA;Finally, you have access to the file system.  Both in an application private folder accessible by `Context.getDir(..)`, or via the phone's SD Card.  The latter will require an additional user privledge, but it is the best route to go if you expect your game state to be large (half a meg or more).  Both will require you to get familiar with the `java.io` package, and maybe the `java.nio` package.&#xD;&#xA;&#xD;&#xA;If you want state to persist between reinstalls, you'll have to look at setting up [backup support][1] for your app, or run a server that can store and retrieve state.  I've had good luck with using Google App Engine for network server (for free!).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/guide/topics/data/backup.html" />
  <row Id="24865" PostHistoryTypeId="2" PostId="11575" RevisionGUID="40420e7e-aa8f-4713-856f-c832930b84a9" CreationDate="2011-04-24T20:02:53.397" UserId="6797" Text="Yes, you can absolutely use files in other directories.  Place the assets you have in to the `assets` directory (sibling to the `res` directory), and use the [`AssetManager`][1] to &#xD;&#xA;access them.&#xD;&#xA;&#xD;&#xA;To load bitmaps, you'll want the `BitmapFactory`, and you'll have to do some extra work if you intend to load resolution dependent images.&#xD;&#xA;&#xD;&#xA;Be careful about loading Bitmaps more than once.  Because you will be dealing with raw file handles, you'll probably want to implement some resource/memory manager that allows you ot quickly look up references to existing Bitmap objects and the like.  Depending on your architecture, you may need to do this with `WeakReferences` so you don't end up with the entire game data in memory.  (With normal android resources, the `ResourceManager` handles all of this for you.)&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/reference/android/content/res/AssetManager.html" />
  <row Id="24866" PostHistoryTypeId="4" PostId="11572" RevisionGUID="3afd491b-69c2-4567-b8da-81468e2a30be" CreationDate="2011-04-24T20:08:08.277" UserId="6756" Comment="edited title" Text="What do I need to know about game design before I design and develop a game in Silverlight?" />
  <row Id="24867" PostHistoryTypeId="2" PostId="11576" RevisionGUID="cfd39ca9-aed3-4203-a098-79ccf8b79bc8" CreationDate="2011-04-24T20:09:44.030" UserId="1101" Text="Never rely on a client to do ANYTHING to make your server run properly. If you do, then malicious users can attack your game simply by refusing to perform whatever is required of them.&#xD;&#xA;&#xD;&#xA;Use non-blocking IO or threads for this task. Threads is fine if you have a small number of players (eg, &lt; 10) and you are confident with passing data safely between threads. Otherwise, go for the non-blocking IO route." />
  <row Id="24868" PostHistoryTypeId="2" PostId="11577" RevisionGUID="7670bd74-2cba-43f3-adc7-63e17b7c6ff4" CreationDate="2011-04-24T20:26:18.727" UserId="5824" Text="Instead of applying a better rotation algorithm you could improve the image quality by using multisampling instead. That is you make everything say four times bigger, then reduce the final result back down to the required size by averaging pixels.&#xD;&#xA;&#xD;&#xA;This will obviously increase your memory requirements, but it should be simple to implement, and it works with transforms other than rotation. You should also be able to get the graphics hardware to do it for you." />
  <row Id="24869" PostHistoryTypeId="25" PostId="11571" RevisionGUID="a9bfd0ee-a803-4b3f-87f9-c9bdc9dd2e69" CreationDate="2011-04-24T21:09:32.447" Comment="http://twitter.com/#!/StackGameDev/status/62261917095440384" />
  <row Id="24870" PostHistoryTypeId="6" PostId="11554" RevisionGUID="c82698c1-40cc-4efa-abfb-88d9234d29ea" CreationDate="2011-04-24T21:19:41.367" UserId="450" Comment="edited tags" Text="&lt;java&gt;&lt;actionscript-3&gt;&lt;network&gt;&lt;server&gt;&lt;client-server&gt;" />
  <row Id="24871" PostHistoryTypeId="2" PostId="11578" RevisionGUID="ffc2ebf0-c5fa-4b62-9a28-7220081a1416" CreationDate="2011-04-24T21:19:44.603" UserId="5459" Text="I am getting error code 1286 when doing this:&#xD;&#xA;&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;I have found it is error: `GL_INVALID_FRAMEBUFFER_OPERATION`&#xD;&#xA;I am using same code for rendering on Mac and iOS both. Maybe problem is in the buffers initialization. On iOS I am doing it this way:&#xD;&#xA;&#xD;&#xA;        CAEAGLLayer* eaglLayer = (CAEAGLLayer*) super.layer;&#xD;&#xA;        eaglLayer.opaque = YES;&#xD;&#xA;&#xD;&#xA;        EAGLRenderingAPI api = kEAGLRenderingAPIOpenGLES2;&#xD;&#xA;        m_context = [[EAGLContext alloc] initWithAPI:api];&#xD;&#xA;&#xD;&#xA;        if (!m_context) {&#xD;&#xA;            [self release];&#xD;&#xA;            return nil;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (!m_context || ![EAGLContext setCurrentContext:m_context]) {&#xD;&#xA;            [self release];&#xD;&#xA;            return nil;&#xD;&#xA;        }&#xD;&#xA;		&#xD;&#xA;		[self layoutIfNeeded];&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		NSLog(@&quot;Using OpenGL ES 2.0&quot;);&#xD;&#xA;&#xD;&#xA;        [m_context&#xD;&#xA;            renderbufferStorage:GL_RENDERBUFFER&#xD;&#xA;            fromDrawable: eaglLayer];&#xD;&#xA;&#xD;&#xA;Variable `m_context` is object `EAGLContext`&#xD;&#xA;&#xD;&#xA;On the Mac this way:&#xD;&#xA;&#xD;&#xA;    NSOpenGLPixelFormat *nsglFormat;&#xD;&#xA;	&#xD;&#xA;    NSOpenGLPixelFormatAttribute attr[] = &#xD;&#xA;	{&#xD;&#xA;        NSOpenGLPFADoubleBuffer,&#xD;&#xA;		NSOpenGLPFAAccelerated,&#xD;&#xA;		NSOpenGLPFAColorSize, m_colorBits, //16&#xD;&#xA;		NSOpenGLPFADepthSize, m_depthBits, //16&#xD;&#xA;        0 &#xD;&#xA;	};&#xD;&#xA;	 &#xD;&#xA;	&#xD;&#xA;    [self setPostsFrameChangedNotifications: YES];&#xD;&#xA;	&#xD;&#xA;    ///&lt; Next, initialize the NSOpenGLPixelFormat itself&#xD;&#xA;    nsglFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];&#xD;&#xA;	&#xD;&#xA;    ///&lt; Check for errors in the creation of the NSOpenGLPixelFormat&#xD;&#xA;    if(!nsglFormat) { &#xD;&#xA;		NSLog(@&quot;Invalid format... terminating.&quot;); &#xD;&#xA;		return nil; &#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;    ///&lt; Now create the the CocoaGL instance, using initial frame and the NSOpenGLPixelFormat&#xD;&#xA;    self = [super initWithFrame:frame pixelFormat:nsglFormat];&#xD;&#xA;    [nsglFormat release];&#xD;&#xA;    &#xD;&#xA;    ///&lt; If there was an error, we again should probably send an error message to the user&#xD;&#xA;    if(!self) { &#xD;&#xA;		NSLog(@&quot;Self not created... terminating.&quot;); &#xD;&#xA;		return nil; &#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ///&lt; Now  set this context to the current context&#xD;&#xA;&#xD;&#xA;    [[self openGLContext] makeCurrentContext];&#xD;&#xA;&#xD;&#xA;Maybe I am doing anything wrong when I initialize NSOpenGLContext. Can you see any error? Thankyou" />
  <row Id="24872" PostHistoryTypeId="1" PostId="11578" RevisionGUID="ffc2ebf0-c5fa-4b62-9a28-7220081a1416" CreationDate="2011-04-24T21:19:44.603" UserId="5459" Text="glClear produce error 1286" />
  <row Id="24873" PostHistoryTypeId="3" PostId="11578" RevisionGUID="ffc2ebf0-c5fa-4b62-9a28-7220081a1416" CreationDate="2011-04-24T21:19:44.603" UserId="5459" Text="&lt;opengl&gt;&lt;macos&gt;" />
  <row Id="24874" PostHistoryTypeId="2" PostId="11579" RevisionGUID="4da8ca33-fe7f-422b-901b-9c26a6d185e4" CreationDate="2011-04-24T21:23:36.540" UserId="5748" Text="This looks similar to when you have a vector model and you rotate it, and rotate the result, and rotate the result, etc.  Eventually the model will be noticeably distorted due to rounding.  The solution is have a read-only source and always transform from that.  Not sure how that applies to your android kaleidoscope effect (it looks great to me), but I hope that's helpful. " />
  <row Id="24875" PostHistoryTypeId="2" PostId="11580" RevisionGUID="df56f6cb-757a-4f00-8f57-eaca0625a209" CreationDate="2011-04-24T21:37:04.050" UserId="2239" Text="Attend demoparties (like Breakpoint, [Revision][1], [Assembly][2] and so forth - or other creative computer festivals like indie game conferences) to meet skilled creators like good artists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.revision-party.net/&#xD;&#xA;  [2]: http://www.assembly.org/winter11/" />
  <row Id="24876" PostHistoryTypeId="5" PostId="11571" RevisionGUID="111f3590-5213-44be-a993-13768be198e0" CreationDate="2011-04-24T21:45:58.237" UserId="5021" Comment="added 125 characters in body; added 53 characters in body; added 18 characters in body" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;On page 4 in the &quot;Implementation&quot; section they describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand two things:&#xD;&#xA;&#xD;&#xA; 1. How do I construct the 2D lookup&#xD;&#xA;    table texture? I don't quite&#xD;&#xA;    understand their explanation,&#xD;&#xA;    although it doesn't seem like it's&#xD;&#xA;    difficult at all.&#xD;&#xA;    &#xD;&#xA; 2. My normal maps contain normalized&#xD;&#xA;    normals, so where is this difference&#xD;&#xA;    in |N_a| coming from? (Shouldn't&#xD;&#xA;    |N_a| always be 1?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;The answer to 2 is that the difference in |N_a| is caused by the transform from normal map space to world space. Thanks DeadMG for that.&#xD;&#xA;&#xD;&#xA;Still wondering about #1." />
  <row Id="24877" PostHistoryTypeId="5" PostId="11578" RevisionGUID="24ac5227-ff24-40ae-b768-2dcf0e8980f4" CreationDate="2011-04-24T22:09:10.003" UserId="5459" Comment="added code of init" Text="I am getting error code 1286 when doing this:&#xD;&#xA;&#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;I have found it is error: `GL_INVALID_FRAMEBUFFER_OPERATION`&#xD;&#xA;I am using same code for rendering on Mac and iOS both. Maybe problem is in the buffers initialization. On iOS I am doing it this way:&#xD;&#xA;&#xD;&#xA;        CAEAGLLayer* eaglLayer = (CAEAGLLayer*) super.layer;&#xD;&#xA;        eaglLayer.opaque = YES;&#xD;&#xA;&#xD;&#xA;        EAGLRenderingAPI api = kEAGLRenderingAPIOpenGLES2;&#xD;&#xA;        m_context = [[EAGLContext alloc] initWithAPI:api];&#xD;&#xA;&#xD;&#xA;        if (!m_context) {&#xD;&#xA;            [self release];&#xD;&#xA;            return nil;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (!m_context || ![EAGLContext setCurrentContext:m_context]) {&#xD;&#xA;            [self release];&#xD;&#xA;            return nil;&#xD;&#xA;        }&#xD;&#xA;		&#xD;&#xA;		[self layoutIfNeeded];&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		NSLog(@&quot;Using OpenGL ES 2.0&quot;);&#xD;&#xA;&#xD;&#xA;        [m_context&#xD;&#xA;            renderbufferStorage:GL_RENDERBUFFER&#xD;&#xA;            fromDrawable: eaglLayer];&#xD;&#xA;&#xD;&#xA;Variable `m_context` is object `EAGLContext`&#xD;&#xA;&#xD;&#xA;On the Mac this way:&#xD;&#xA;&#xD;&#xA;    NSOpenGLPixelFormat *nsglFormat;&#xD;&#xA;	&#xD;&#xA;    NSOpenGLPixelFormatAttribute attr[] = &#xD;&#xA;	{&#xD;&#xA;        NSOpenGLPFADoubleBuffer,&#xD;&#xA;		NSOpenGLPFAAccelerated,&#xD;&#xA;		NSOpenGLPFAColorSize, m_colorBits, //16&#xD;&#xA;		NSOpenGLPFADepthSize, m_depthBits, //16&#xD;&#xA;        0 &#xD;&#xA;	};&#xD;&#xA;	 &#xD;&#xA;	&#xD;&#xA;    [self setPostsFrameChangedNotifications: YES];&#xD;&#xA;	&#xD;&#xA;    ///&lt; Next, initialize the NSOpenGLPixelFormat itself&#xD;&#xA;    nsglFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];&#xD;&#xA;	&#xD;&#xA;    ///&lt; Check for errors in the creation of the NSOpenGLPixelFormat&#xD;&#xA;    if(!nsglFormat) { &#xD;&#xA;		NSLog(@&quot;Invalid format... terminating.&quot;); &#xD;&#xA;		return nil; &#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;    ///&lt; Now create the the CocoaGL instance, using initial frame and the NSOpenGLPixelFormat&#xD;&#xA;    self = [super initWithFrame:frame pixelFormat:nsglFormat];&#xD;&#xA;    [nsglFormat release];&#xD;&#xA;    &#xD;&#xA;    ///&lt; If there was an error, we again should probably send an error message to the user&#xD;&#xA;    if(!self) { &#xD;&#xA;		NSLog(@&quot;Self not created... terminating.&quot;); &#xD;&#xA;		return nil; &#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ///&lt; Now  set this context to the current context&#xD;&#xA;&#xD;&#xA;    [[self openGLContext] makeCurrentContext];&#xD;&#xA;&#xD;&#xA;Maybe I am doing anything wrong when I initialize NSOpenGLContext. Can you see any error? Thankyou&#xD;&#xA;**UPDATE**: Initialization of the OpenGL I am doing this way: &#xD;&#xA;&#xD;&#xA;	int m_width, m_height;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    glGetRenderbufferParameteriv(GL_RENDERBUFFER,&#xD;&#xA;								 GL_RENDERBUFFER_WIDTH, &amp;m_width);&#xD;&#xA;    glGetRenderbufferParameteriv(GL_RENDERBUFFER,&#xD;&#xA;								 GL_RENDERBUFFER_HEIGHT, &amp;m_height);&#xD;&#xA;	&#xD;&#xA;    // Create the depth buffer.&#xD;&#xA;    glGenRenderbuffers(1, &amp;m_depthRenderbuffer);&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, m_depthRenderbuffer);&#xD;&#xA;    glRenderbufferStorage(GL_RENDERBUFFER,&#xD;&#xA;                          GL_DEPTH_COMPONENT16,&#xD;&#xA;                          m_width,&#xD;&#xA;                          m_height);&#xD;&#xA;    &#xD;&#xA;    // Create the framebuffer object; attach the depth and color buffers.&#xD;&#xA;    glGenFramebuffers(1, &amp;m_framebuffer);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);&#xD;&#xA;    glFramebufferRenderbuffer(GL_FRAMEBUFFER,&#xD;&#xA;                              GL_COLOR_ATTACHMENT0,&#xD;&#xA;                              GL_RENDERBUFFER,&#xD;&#xA;                              m_colorRenderbuffer);&#xD;&#xA;    glFramebufferRenderbuffer(GL_FRAMEBUFFER,&#xD;&#xA;                              GL_DEPTH_ATTACHMENT,&#xD;&#xA;                              GL_RENDERBUFFER,&#xD;&#xA;                              m_depthRenderbuffer);&#xD;&#xA;&#xD;&#xA;    // Bind the color buffer for rendering.&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, m_colorRenderbuffer);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    // Set up some GL state.&#xD;&#xA;    glViewport(0, 0, 640, 480);&#xD;&#xA;    glEnable(GL_DEPTH_TEST);&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;" />
  <row Id="24878" PostHistoryTypeId="6" PostId="11572" RevisionGUID="3485a236-6ae3-4d9a-8b8d-f8c1fc953649" CreationDate="2011-04-24T23:00:15.087" UserId="51" Comment="edited tags" Text="&lt;silverlight&gt;" />
  <row Id="24879" PostHistoryTypeId="25" PostId="11554" RevisionGUID="2cd50640-46b5-4269-b024-d3ecb38573b9" CreationDate="2011-04-25T00:09:32.817" Comment="http://twitter.com/#!/StackGameDev/status/62307217596092416" />
  <row Id="24880" PostHistoryTypeId="2" PostId="11581" RevisionGUID="246bf943-922e-4438-9322-24b8f94e28c8" CreationDate="2011-04-25T00:43:04.013" UserId="6929" Text="I'm making a tile based game, and I'm working for support of tilesets. I'm trying to make it so that a Texture2D is set as a chosen PNG file. I can do this with no problem f I load the image into the content pipeline, but the level editor will be used by people without access to the content pipeline. How do I go about doing this?" />
  <row Id="24881" PostHistoryTypeId="1" PostId="11581" RevisionGUID="246bf943-922e-4438-9322-24b8f94e28c8" CreationDate="2011-04-25T00:43:04.013" UserId="6929" Text="Xna: Texture2D from a png file" />
  <row Id="24882" PostHistoryTypeId="3" PostId="11581" RevisionGUID="246bf943-922e-4438-9322-24b8f94e28c8" CreationDate="2011-04-25T00:43:04.013" UserId="6929" Text="&lt;xna&gt;&lt;game-design&gt;&lt;textures&gt;&lt;tiles&gt;&lt;map-editor&gt;" />
  <row Id="24883" PostHistoryTypeId="2" PostId="11582" RevisionGUID="f7d6caf2-7143-427f-97bd-5846881551d9" CreationDate="2011-04-25T00:49:17.010" UserId="3547" Text="You can call the [Texture2D.FromStream][1] static method. Just pass it a stream to the png file. I'm pretty sure it works without the content pipeline.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.texture2d.fromstream.aspx" />
  <row Id="24885" PostHistoryTypeId="2" PostId="11584" RevisionGUID="b8bfe219-78ab-4710-8e55-4bbe3d1cc5ad" CreationDate="2011-04-25T01:46:07.580" UserId="6929" Text="I would like to split a large texture into a one dimensional array of smaller textures. How should I do this?" />
  <row Id="24886" PostHistoryTypeId="1" PostId="11584" RevisionGUID="b8bfe219-78ab-4710-8e55-4bbe3d1cc5ad" CreationDate="2011-04-25T01:46:07.580" UserId="6929" Text="Xna: Splitting one large texture into an array of smaller textures." />
  <row Id="24887" PostHistoryTypeId="3" PostId="11584" RevisionGUID="b8bfe219-78ab-4710-8e55-4bbe3d1cc5ad" CreationDate="2011-04-25T01:46:07.580" UserId="6929" Text="&lt;xna&gt;&lt;2d&gt;&lt;textures&gt;" />
  <row Id="24888" PostHistoryTypeId="2" PostId="11585" RevisionGUID="38ef9e6e-3d41-4a5e-96cd-7d253cbe078b" CreationDate="2011-04-25T01:49:26.343" UserId="5753" Text="I had the exact same problem when I tried adding a depth buffer to the sample code generated by XCode. You should add code to check for framebuffer completion:&#xD;&#xA;&#xD;&#xA;    if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)&#xD;&#xA;        NSLog(@&quot;Failed to make complete framebuffer object %x&quot;, glCheckFramebufferStatus(GL_FRAMEBUFFER));&#xD;&#xA;    // also check glGetError() here&#xD;&#xA;&#xD;&#xA;I'm not a Mac expert, but I do remember that the position of the following call is very important:&#xD;&#xA;&#xD;&#xA;    [m_context renderbufferStorage:GL_RENDERBUFFER fromDrawable: eaglLayer];&#xD;&#xA;&#xD;&#xA;On iOS it needs to be before creating the color and depth components of the framebuffer.&#xD;&#xA;&#xD;&#xA;Here is my working iOS code:&#xD;&#xA;&#xD;&#xA;    [EAGLContext setCurrentContext:context];&#xD;&#xA;&#xD;&#xA;    glGenFramebuffers(1, &amp;frameBuffer);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer);&#xD;&#xA;&#xD;&#xA;    glGenRenderbuffers(1, &amp;colorRenderBuffer);&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, colorRenderBuffer);&#xD;&#xA;    [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];&#xD;&#xA;    glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderBuffer);&#xD;&#xA;&#xD;&#xA;    glGenRenderbuffers(1, &amp;depthRenderBuffer);&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, depthRenderBuffer);&#xD;&#xA;    glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width, height);&#xD;&#xA;    glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthRenderBuffer);&#xD;&#xA;&#xD;&#xA;    if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)&#xD;&#xA;        NSLog(@&quot;Failed to make complete framebuffer object %x&quot;, glCheckFramebufferStatus(GL_FRAMEBUFFER));&#xD;&#xA;&#xD;&#xA;    CheckOpenGLError();&#xD;&#xA;" />
  <row Id="24892" PostHistoryTypeId="2" PostId="11587" RevisionGUID="84a042fe-3538-4b88-a72f-0f97c5fa727c" CreationDate="2011-04-25T03:04:49.883" UserId="1929" Text="I would say you need to know:&#xD;&#xA;&#xD;&#xA;- Basics of object-oriented programming&#xD;&#xA;- C# (or VB.NET)&#xD;&#xA;- What you plan to build (graphics engine? physics engine) &#xD;&#xA;- What you *don't* plan to build (eg. what you will look to use existing code for -- like a 2D game engine)&#xD;&#xA;- The game idea&#xD;&#xA;- The core gameplay mechanic&#xD;&#xA;&#xD;&#xA;Most of this you won't know in detail; the rest, you can figure out along the way." />
  <row Id="24893" PostHistoryTypeId="25" PostId="11581" RevisionGUID="b3e8b259-66be-4342-ab6c-f89aff1d52c1" CreationDate="2011-04-25T03:09:32.560" Comment="http://twitter.com/#!/StackGameDev/status/62352515185913857" />
  <row Id="24894" PostHistoryTypeId="2" PostId="11588" RevisionGUID="133790d3-6400-40e9-9f83-23e8a58a6258" CreationDate="2011-04-25T03:10:35.057" UserId="3656" Text="Are you talking about 2D or 3D Textures?&#xD;&#xA;&#xD;&#xA;When you're drawing 2d graphics with SpriteBatch.Draw(), you have the option to set a source and destination rectangle. To keep track of a collection of smaller textures, you'd have an array/list/whatever of Rectangle objects that represent the source rectangle of your loaded Texture.&#xD;&#xA;&#xD;&#xA;See MSDN's documentation for SpriteBatch: http://msdn.microsoft.com/en-us/library/ff433987.aspx&#xD;&#xA;&#xD;&#xA;I haven't done any 3D in XNA, but I presume there's a similar mechanism." />
  <row Id="24898" PostHistoryTypeId="2" PostId="11590" RevisionGUID="1237e157-5b6c-4fcd-a9f2-22883f7c106d" CreationDate="2011-04-25T04:32:36.587" UserId="6930" Text="Here's a method that should do what you need:&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Splits a texture into an array of smaller textures of the specified size.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;param name=&quot;original&quot;&gt;The texture to be split into smaller textures&lt;/param&gt;&#xD;&#xA;        /// &lt;param name=&quot;partWidth&quot;&gt;The width of each of the smaller textures that will be contained in the returned array.&lt;/param&gt;&#xD;&#xA;        /// &lt;param name=&quot;partHeight&quot;&gt;The height of each of the smaller textures that will be contained in the returned array.&lt;/param&gt;&#xD;&#xA;        public Texture2D[] Split(Texture2D original, int partWidth, int partHeight, out int xCount, out int yCount)&#xD;&#xA;        {&#xD;&#xA;            yCount = original.Height / partHeight + (partHeight % original.Height == 0 ? 0 : 1);//The number of textures in each horizontal row&#xD;&#xA;            xCount = original.Height / partHeight + (partHeight % original.Height == 0 ? 0 : 1);//The number of textures in each vertical column&#xD;&#xA;            Texture2D[] r = new Texture2D[xCount * yCount];//Number of parts = (area of original) / (area of each part).&#xD;&#xA;            int dataPerPart = partWidth * partHeight;//Number of pixels in each of the split parts&#xD;&#xA;&#xD;&#xA;            //Get the pixel data from the original texture:&#xD;&#xA;            Color[] originalData = new Color[original.Width * original.Height];&#xD;&#xA;            original.GetData&lt;Color&gt;(originalData);&#xD;&#xA;&#xD;&#xA;            int index = 0;&#xD;&#xA;            for (int y = 0; y &lt; yCount * partHeight; y += partHeight)&#xD;&#xA;                for (int x = 0; x &lt; xCount * partWidth; x += partWidth)&#xD;&#xA;                {&#xD;&#xA;                    //The texture at coordinate {x, y} from the top-left of the original texture&#xD;&#xA;                    Texture2D part = new Texture2D(original.GraphicsDevice, partWidth, partHeight);&#xD;&#xA;                    //The data for part&#xD;&#xA;                    Color[] partData = new Color[dataPerPart];&#xD;&#xA;&#xD;&#xA;                    //Fill the part data with colors from the original texture&#xD;&#xA;                    for (int py = 0; py &lt; partHeight; py++)&#xD;&#xA;                        for (int px = 0; px &lt; partWidth; px++)&#xD;&#xA;                        {&#xD;&#xA;                            int partIndex = px + py * partWidth;&#xD;&#xA;                            //If a part goes outside of the source texture, then fill the overlapping part with Color.Transparent&#xD;&#xA;                            if (y + py &gt;= original.Height || x + px &gt;= original.Width)&#xD;&#xA;                                partData[partIndex] = Color.Transparent;&#xD;&#xA;                            else&#xD;&#xA;                                partData[partIndex] = originalData[(x + px) + (y + py) * original.Width];&#xD;&#xA;                        }&#xD;&#xA;&#xD;&#xA;                    //Fill the part with the extracted data&#xD;&#xA;                    part.SetData&lt;Color&gt;(partData);&#xD;&#xA;                    //Stick the part in the return array:                    &#xD;&#xA;                    r[index++] = part;&#xD;&#xA;                }&#xD;&#xA;            //Return the array of parts.&#xD;&#xA;            return r;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;And here's an example of how to use it:&#xD;&#xA;&#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            //Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;            spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;&#xD;&#xA;            Texture2D tex = Content.Load&lt;Texture2D&gt;(&quot;MyTexture&quot;);&#xD;&#xA;            parts = Split(tex, 10, 10, out xCount, out yCount);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        Texture2D[] parts;&#xD;&#xA;        int&#xD;&#xA;            xCount,&#xD;&#xA;            yCount,&#xD;&#xA;            partWidth = 10;&#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Texture, BlendState.Opaque);&#xD;&#xA;            for (int y = 0; y &lt; yCount; y++)&#xD;&#xA;                for (int x = 0; x &lt; xCount; x++)&#xD;&#xA;                    spriteBatch.Draw(parts[x + y * xCount], new Rectangle(10 + x * 40 + x * 10, 10 + y * 40 + y * 10, 40, 40), Color.White);&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Please realize that this is not quite the most efficient way to do what you want, but it is very maintainable and easy to understand (I hope).&#xD;&#xA;&#xD;&#xA;If you're looking for more efficiency, and have some experience with XNA, I would recommend using RenderTargets&lt;sup&gt;1&lt;/sup&gt;. Just set each texture &quot;part&quot; in your array as a render target, then draw the original large texture, offset by the position of the part you're drawing. Be aware that this method requires your XNA project to target the Hi-Def profile 99% of the time, which is why I couldn't give you a working sample with that method (my current computer doesn't support the Hi-Def profile). I have used RenderTargets to do this exact thing in the past, though, so it's possible. It's also much easier&lt;sup&gt;2&lt;/sup&gt; now than in previous versions of XNA, thanks to the RenderTarget changes in XNA Game Studio 4.0&lt;sup&gt;3&lt;/sup&gt;.&#xD;&#xA;&#xD;&#xA;Please feel free to comment if you need any clarification or more help :)&#xD;&#xA;&#xD;&#xA;Links (Sorry- I'm a new user, so I can't post hyperlinks):&#xD;&#xA; &lt;ol&gt;&lt;li&gt;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rendertarget%28v=xnagamestudio.31%29.aspx&lt;/li&gt;&#xD;&#xA;&lt;li&gt;http://blogs.msdn.com/b/shawnhar/archive/2007/02/04/xna-rendertarget-semantics.aspx&lt;/li&gt;&#xD;&#xA;&lt;li&gt;http://blogs.msdn.com/b/shawnhar/archive/2010/03/26/rendertarget-changes-in-xna-game-studio-4-0.aspx&lt;/li&gt;&#xD;&#xA;&lt;/ol&gt;" />
  <row Id="24899" PostHistoryTypeId="5" PostId="11590" RevisionGUID="e9fc28a4-bc6e-4d91-928a-b8437398cfd6" CreationDate="2011-04-25T06:01:42.497" UserId="1198" Comment="made links real" Text="Here's a method that should do what you need:&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Splits a texture into an array of smaller textures of the specified size.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;param name=&quot;original&quot;&gt;The texture to be split into smaller textures&lt;/param&gt;&#xD;&#xA;        /// &lt;param name=&quot;partWidth&quot;&gt;The width of each of the smaller textures that will be contained in the returned array.&lt;/param&gt;&#xD;&#xA;        /// &lt;param name=&quot;partHeight&quot;&gt;The height of each of the smaller textures that will be contained in the returned array.&lt;/param&gt;&#xD;&#xA;        public Texture2D[] Split(Texture2D original, int partWidth, int partHeight, out int xCount, out int yCount)&#xD;&#xA;        {&#xD;&#xA;            yCount = original.Height / partHeight + (partHeight % original.Height == 0 ? 0 : 1);//The number of textures in each horizontal row&#xD;&#xA;            xCount = original.Height / partHeight + (partHeight % original.Height == 0 ? 0 : 1);//The number of textures in each vertical column&#xD;&#xA;            Texture2D[] r = new Texture2D[xCount * yCount];//Number of parts = (area of original) / (area of each part).&#xD;&#xA;            int dataPerPart = partWidth * partHeight;//Number of pixels in each of the split parts&#xD;&#xA;&#xD;&#xA;            //Get the pixel data from the original texture:&#xD;&#xA;            Color[] originalData = new Color[original.Width * original.Height];&#xD;&#xA;            original.GetData&lt;Color&gt;(originalData);&#xD;&#xA;&#xD;&#xA;            int index = 0;&#xD;&#xA;            for (int y = 0; y &lt; yCount * partHeight; y += partHeight)&#xD;&#xA;                for (int x = 0; x &lt; xCount * partWidth; x += partWidth)&#xD;&#xA;                {&#xD;&#xA;                    //The texture at coordinate {x, y} from the top-left of the original texture&#xD;&#xA;                    Texture2D part = new Texture2D(original.GraphicsDevice, partWidth, partHeight);&#xD;&#xA;                    //The data for part&#xD;&#xA;                    Color[] partData = new Color[dataPerPart];&#xD;&#xA;&#xD;&#xA;                    //Fill the part data with colors from the original texture&#xD;&#xA;                    for (int py = 0; py &lt; partHeight; py++)&#xD;&#xA;                        for (int px = 0; px &lt; partWidth; px++)&#xD;&#xA;                        {&#xD;&#xA;                            int partIndex = px + py * partWidth;&#xD;&#xA;                            //If a part goes outside of the source texture, then fill the overlapping part with Color.Transparent&#xD;&#xA;                            if (y + py &gt;= original.Height || x + px &gt;= original.Width)&#xD;&#xA;                                partData[partIndex] = Color.Transparent;&#xD;&#xA;                            else&#xD;&#xA;                                partData[partIndex] = originalData[(x + px) + (y + py) * original.Width];&#xD;&#xA;                        }&#xD;&#xA;&#xD;&#xA;                    //Fill the part with the extracted data&#xD;&#xA;                    part.SetData&lt;Color&gt;(partData);&#xD;&#xA;                    //Stick the part in the return array:                    &#xD;&#xA;                    r[index++] = part;&#xD;&#xA;                }&#xD;&#xA;            //Return the array of parts.&#xD;&#xA;            return r;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;And here's an example of how to use it:&#xD;&#xA;&#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            //Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;            spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;&#xD;&#xA;            Texture2D tex = Content.Load&lt;Texture2D&gt;(&quot;MyTexture&quot;);&#xD;&#xA;            parts = Split(tex, 10, 10, out xCount, out yCount);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        Texture2D[] parts;&#xD;&#xA;        int&#xD;&#xA;            xCount,&#xD;&#xA;            yCount,&#xD;&#xA;            partWidth = 10;&#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Texture, BlendState.Opaque);&#xD;&#xA;            for (int y = 0; y &lt; yCount; y++)&#xD;&#xA;                for (int x = 0; x &lt; xCount; x++)&#xD;&#xA;                    spriteBatch.Draw(parts[x + y * xCount], new Rectangle(10 + x * 40 + x * 10, 10 + y * 40 + y * 10, 40, 40), Color.White);&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Please realize that this is not quite the most efficient way to do what you want, but it is very maintainable and easy to understand (I hope).&#xD;&#xA;&#xD;&#xA;If you're looking for more efficiency, and have some experience with XNA, I would recommend using RenderTargets&lt;sup&gt;1&lt;/sup&gt;. Just set each texture &quot;part&quot; in your array as a render target, then draw the original large texture, offset by the position of the part you're drawing. Be aware that this method requires your XNA project to target the Hi-Def profile 99% of the time, which is why I couldn't give you a working sample with that method (my current computer doesn't support the Hi-Def profile). I have used RenderTargets to do this exact thing in the past, though, so it's possible. It's also much easier&lt;sup&gt;2&lt;/sup&gt; now than in previous versions of XNA, thanks to the RenderTarget changes in XNA Game Studio 4.0&lt;sup&gt;3&lt;/sup&gt;.&#xD;&#xA;&#xD;&#xA;Please feel free to comment if you need any clarification or more help :)&#xD;&#xA;&#xD;&#xA;Links (Sorry- I'm a new user, so I can't post hyperlinks):&#xD;&#xA;&#xD;&#xA; 1. http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rendertarget%28v=xnagamestudio.31%29.aspx&#xD;&#xA; 2. http://blogs.msdn.com/b/shawnhar/archive/2007/02/04/xna-rendertarget-semantics.aspx&#xD;&#xA; 3. http://blogs.msdn.com/b/shawnhar/archive/2010/03/26/rendertarget-changes-in-xna-game-studio-4-0.aspx&#xD;&#xA;&lt;/ol&gt;" />
  <row Id="24900" PostHistoryTypeId="25" PostId="11584" RevisionGUID="57afaf90-1fb0-49f8-b5e4-756d64d2fabb" CreationDate="2011-04-25T06:09:32.443" Comment="http://twitter.com/#!/StackGameDev/status/62397812431785984" />
  <row Id="24902" PostHistoryTypeId="5" PostId="11572" RevisionGUID="fb00d59f-87a8-4de1-9d9f-d9126cdcfd8c" CreationDate="2011-04-25T07:07:50.973" UserId="6756" Comment="added 239 characters in body" Text="I have started to design a game. I have weighed up the options of XNA, Unity, and Silverlight. I am going with Silverlight... Is there anything I important that I am missing that I need to know?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Not to repeat the game specifications at great length, a description of the 2D old school game can be found here: http://gamedev.stackexchange.com/questions/11193/what-approach-would-you-take-to-develop-an-old-school-game&#xD;&#xA;" />
  <row Id="24903" PostHistoryTypeId="5" PostId="11572" RevisionGUID="d1ec00d7-378e-44b7-9c1e-bc4e84faaf93" CreationDate="2011-04-25T07:21:17.173" UserId="6756" Comment="added 140 characters in body" Text="I have started to design a game. I have weighed up the options of XNA, Unity, and Silverlight. I am going with Silverlight... Is there anything I important that I am missing that I need to know?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I sketched the structural design yesterday: http://carnotaurus.tumblr.com/post/4921541502/old-school-game-to-be-written-in-silverlight&#xD;&#xA;&#xD;&#xA;Not to repeat the game specifications at great length, a description of the 2D old school game can be found here: http://gamedev.stackexchange.com/questions/11193/what-approach-would-you-take-to-develop-an-old-school-game&#xD;&#xA;&#xD;&#xA;" />
  <row Id="24905" PostHistoryTypeId="2" PostId="11592" RevisionGUID="ae01190b-a3f1-4d51-a222-1d68fadd9f8a" CreationDate="2011-04-25T07:47:20.090" UserId="2735" Text="As counter-intuitive as it may seem, I've had the best luck starting with OpenGL introductions in quality books relevant to the platform I'm developing for.  OpenGL-specific texts tend to be unapproachably technical and/or academic, to the point at which it's almost as if the author has contempt for beginners.&#xD;&#xA;&#xD;&#xA;&quot;Game Programming for the Such-And-Such Platform&quot; books tend to be written in a more casual, readable style that walks you through the basics enough to prepare you to dive into the heavier stuff.  In essence, they fill the delta between complete ignorance and &quot;getting it&quot; in a way that more technical books don't seem to have time for.&#xD;&#xA;&#xD;&#xA;All this said, you may need to skip over the more lightweight books.  Many will tell you what you need to do to get started with OpenGL for your platform, without giving any explanation as to what's going on behind the scenes.  To be a good OpenGL programmer, though, it's invaluable to understand some of the &quot;nitty gritty&quot; details since it will help you debug, tune performance, and achieve the exact effects you're looking for." />
  <row Id="24915" PostHistoryTypeId="5" PostId="11568" RevisionGUID="2f33f121-0153-4853-bf83-6eaca4b34ccc" CreationDate="2011-04-25T09:46:35.467" UserId="6616" Comment="added 365 characters in body" Text="I am creating a kaleidoscopic effect on an android tablet. I am using the code below to rotate a slice of an image, but as you can see in the image when rotating a bitmap 60 degrees it distorts it quite a lot (red rectangles) – it is smudging the image! I have set dither and anti-alias flags but it does not help much. I think it is just not a very sophisticated bitmap rotation algorithm.&#xD;&#xA;&#xD;&#xA;    canvas.save(); &#xD;&#xA;    canvas.rotate(angle, screenW/2, screenH/2);&#xD;&#xA;    canvas.drawBitmap(picSlice, screenW/2, screenH/2, pOutput);&#xD;&#xA;    canvas.restore();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So I wonder if you can help me find a better way to rotate a bitmap. It does not have to be fast, because I intend to use a high quality rotation only when I want to save the screen to the SD card - I would redraw the screen in memory before saving.&#xD;&#xA;&#xD;&#xA;Do you know any comprehensible or replicable algorithm for bitmap rotation that I could programme or use as a library? Or any other suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT:** The answers below made me think if Android OS had bilinear or bicubic interpolation option and after some search I found that it does have its own version of it called FilterBitmap. After applying it to my paint&#xD;&#xA;&#xD;&#xA;    pOutput.setFilterBitmap(true);&#xD;&#xA;&#xD;&#xA;I get a better result&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7i7P9.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/lFIKw.jpg" />
  <row Id="24916" PostHistoryTypeId="5" PostId="11568" RevisionGUID="6dfdeb55-7ca6-47a3-bccd-93b8b5b2e893" CreationDate="2011-04-25T09:52:01.497" UserId="6616" Comment="added 5 characters in body" Text="I am creating a kaleidoscopic effect on an android tablet. I am using the code below to rotate a slice of an image, but as you can see in the image when rotating a bitmap 60 degrees it distorts it quite a lot (red rectangles) – it is smudging the image! I have set dither and anti-alias flags but it does not help much. I think it is just not a very sophisticated bitmap rotation algorithm.&#xD;&#xA;&#xD;&#xA;    canvas.save(); &#xD;&#xA;    canvas.rotate(angle, screenW/2, screenH/2);&#xD;&#xA;    canvas.drawBitmap(picSlice, screenW/2, screenH/2, pOutput);&#xD;&#xA;    canvas.restore();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So I wonder if you can help me find a better way to rotate a bitmap. It does not have to be fast, because I intend to use a high quality rotation only when I want to save the screen to the SD card - I would redraw the screen in memory before saving.&#xD;&#xA;&#xD;&#xA;Do you know any comprehensible or replicable algorithm for bitmap rotation that I could programme or use as a library? Or any other suggestion?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT:** The answers below made me think if Android OS had bilinear or bicubic interpolation option and after some search I found that it does have its own version of it called FilterBitmap. After applying it to my paint&#xD;&#xA;&#xD;&#xA;    pOutput.setFilterBitmap(true);&#xD;&#xA;&#xD;&#xA;I get much better result&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/7i7P9.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/Hr2uB.jpg" />
  <row Id="24917" PostHistoryTypeId="2" PostId="11594" RevisionGUID="42c05236-3402-4059-99f4-fd950d3cf588" CreationDate="2011-04-25T10:00:17.773" UserId="1499" Text="I have a Matrix of a player &amp; I want to create a second location a set distance away from the first location but I want the second matrix to be set a set distance based on the rotation of the first matrix e.g. A player looking in a certain direction fires a gun, I want the bullet to start it's existence out side of the players mesh but in the direction the player is facing.&#xD;&#xA;&#xD;&#xA;I've uploaded a video of what's happening:&#xD;&#xA;http://www.youtube.com/watch?v=9aThUZ94Edo&#xD;&#xA;&#xD;&#xA;Ideally I would like to just apply the players rotation Matrix to the Offset amount to get the proper offset Matrix, based in the world space co-ordinates to then be able to apply back to the object.&#xD;&#xA;&#xD;&#xA;It's obvious at the end of the video that it's wrong when I am able to shoot the player model from his bullet :-)&#xD;&#xA;&#xD;&#xA;~DSebJ" />
  <row Id="24918" PostHistoryTypeId="1" PostId="11594" RevisionGUID="42c05236-3402-4059-99f4-fd950d3cf588" CreationDate="2011-04-25T10:00:17.773" UserId="1499" Text="How do I calculate an offset from an Object based on the Objects Rotation rather than the World Space" />
  <row Id="24919" PostHistoryTypeId="3" PostId="11594" RevisionGUID="42c05236-3402-4059-99f4-fd950d3cf588" CreationDate="2011-04-25T10:00:17.773" UserId="1499" Text="&lt;xna&gt;&lt;3d&gt;&lt;matrix&gt;&lt;sunburn&gt;" />
  <row Id="24920" PostHistoryTypeId="2" PostId="11595" RevisionGUID="134978b2-373d-49ba-9872-72c579ab1a16" CreationDate="2011-04-25T10:26:24.777" UserId="6932" Text="I use a very simple formula that works well with my little isometric engine in OpenGL:&#xD;&#xA;&#xD;&#xA;Each of you objects (trees, floor tiles, characters, ...) have a X and Y position on the screen. You need to enable DEPTH TESTING and find the good Z value for each values. You can simply to the following:&#xD;&#xA;&#xD;&#xA;    z = x + y + objectIndex&#xD;&#xA;&#xD;&#xA;I use and different index for the floor and objects that will be above the floor (0 for the floor and 1 for all the objects that has a height). This should work just fine." />
  <row Id="24921" PostHistoryTypeId="2" PostId="11596" RevisionGUID="397c8485-a98e-44b7-b4d4-fbdb21925e2f" CreationDate="2011-04-25T10:36:58.923" UserId="1163" Text="I am using the flash flixel engine, and have a sprite sheet of a spaceship from top-down view. The sprite sheet includes a bunch of different states and animation frames. Problem is that I have drawn them all facing upwards (north), and my maths is all done assuming the sprites face to the right (east).&#xD;&#xA;&#xD;&#xA;In flixel v2.5 is there a way to rotate the sprite graphics without affecting the &quot;angle&quot; property of the FlxSprite that is using the graphics? I was thinking along the lines of a pre-process, as I initialise everything. I don't really want to fix all the graphics, or hack into my maths at this point. This also might come in handy later." />
  <row Id="24922" PostHistoryTypeId="1" PostId="11596" RevisionGUID="397c8485-a98e-44b7-b4d4-fbdb21925e2f" CreationDate="2011-04-25T10:36:58.923" UserId="1163" Text="Rotate spritesheet graphics in flixel" />
  <row Id="24923" PostHistoryTypeId="3" PostId="11596" RevisionGUID="397c8485-a98e-44b7-b4d4-fbdb21925e2f" CreationDate="2011-04-25T10:36:58.923" UserId="1163" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;spritesheet&gt;&lt;flixel&gt;" />
  <row Id="24924" PostHistoryTypeId="2" PostId="11597" RevisionGUID="abe61978-d1dc-4742-8f27-67c1feaa68c8" CreationDate="2011-04-25T10:37:20.997" UserId="6933" Text="Blog of a racing game development.&#xD;&#xA;&#xD;&#xA;[http://blog.raggededge-online.com/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.raggededge-online.com/" />
  <row Id="24925" PostHistoryTypeId="5" PostId="11587" RevisionGUID="50b183f1-8b5a-4536-a821-e83ae28e77bf" CreationDate="2011-04-25T10:48:17.853" UserId="1929" Comment="added 185 characters in body" Text="I would say you need to know:&#xD;&#xA;&#xD;&#xA;- Basics of object-oriented programming&#xD;&#xA;- C# (or VB.NET)&#xD;&#xA;- What you plan to build (graphics engine? physics engine) &#xD;&#xA;- What you *don't* plan to build (eg. what you will look to use existing code for -- like a 2D game engine)&#xD;&#xA;- The game idea&#xD;&#xA;- The core gameplay mechanic&#xD;&#xA;&#xD;&#xA;An example of core gameplay mechanic is: in Tetris, you spend 99% of your time rotating and placing blocks on top of other blocks, trying to make lines. *That's* your core gameplay.&#xD;&#xA;&#xD;&#xA;Most of this you won't know in detail; the rest, you can figure out along the way." />
  <row Id="24926" PostHistoryTypeId="2" PostId="11598" RevisionGUID="40ab1fdc-d525-43b2-8f4d-bd451fcac2f8" CreationDate="2011-04-25T11:01:11.693" UserId="1101" Text="Your question is still too vague and wide-ranging, which is why you only have one response currently. Perhaps you don't realise that it is vague because you're expecting game development to fit some sort of standard check list, but unfortunately it does not. For example, to take what you've mentioned in your response to ashes999, there is not necessarily a controller involved, nor is there even necessarily an engine involved. And the 'core gameplay mechanic' is just a pithy way of saying 'how does the player play'.&#xD;&#xA;&#xD;&#xA;Regarding your Tumblr post, 99% of the stuff you've sketched out there would not be of relevance to a typical game developer. In particular games running in Silverlight would hardly ever need any jQuery and the MVC implementation you have (which looks more like [MVP][1] than MVC, really) looks like overkill for what would have originally been quite a simple game implemented with an infinite loop of `get_input/update_data/render_screen` calls.&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.vuscode.com/malovicn/archive/2007/12/18/model-view-presenter-mvp-vs-model-view-controller-mvc.aspx" />
  <row Id="24928" PostHistoryTypeId="2" PostId="11600" RevisionGUID="b1044feb-745f-46e4-b7e6-4ebef058481f" CreationDate="2011-04-25T11:47:20.147" UserId="1923" Text="Assuming the player is facing in its Matrix's Forward direction, this will do what your asking:&#xD;&#xA;&#xD;&#xA;    Matrix secondMatrix = firstMatrix;&#xD;&#xA;    SecondMatrix.Translation += (secondMatrix.Forward * zOffset) + (secondMatrix.Up * yOffset);&#xD;&#xA;&#xD;&#xA;Where zOffset represents the distance in front of the model that you want the bullet to start out from, &amp; yOffset represents the height above gun center you want the bullet to start out from.&#xD;&#xA;&#xD;&#xA;The 2ndMatrix takes on the rotation of the 1stMatrix but adds location offsets using the local space vectors to achieve your set distance. You could add barrel elevation rotation to the 2ndMatrix if you wanted." />
  <row Id="24929" PostHistoryTypeId="25" PostId="11594" RevisionGUID="76291422-6b6d-413f-8255-f8e6acebea20" CreationDate="2011-04-25T12:09:32.463" Comment="http://twitter.com/#!/StackGameDev/status/62488410509676544" />
  <row Id="24930" PostHistoryTypeId="2" PostId="11601" RevisionGUID="56538a55-e5fb-417c-9f27-c374f14ee98d" CreationDate="2011-04-25T12:23:36.367" UserId="3037" Text="I’ve always wanted to create an old-fashionned 2D Role-Playing Game like Star Ocean, Final Fantasy, Sword of Mana and even the “Tales of” series, and I guess a lot of people do. But before even writing a single line of code I did a lot of research, drawing and tryouts.&#xD;&#xA;&#xD;&#xA;I've found almost all the answers to my questions but there is a problem I haven’t been able to solve: **How do you create a realistic but yet simple collision detection**, like in the games I named before?&#xD;&#xA;&#xD;&#xA;I already know several ways of calculating collision detection, look at the following examples:&#xD;&#xA;&#xD;&#xA;![Collision detection examples][1]&#xD;&#xA;&#xD;&#xA;None of these satisfy my needs.&#xD;&#xA;&#xD;&#xA; - Tile-based collisions are way too simple and suits more a Zelda than a Star Ocean. Plus, the drawing of each tile needs to fill up all space in order to look realistic.&#xD;&#xA; - Pixel-perfect has too many constraints. If your tile has some pixel here and there,  the player will most likely get stuck in the midle of nowhere(ie: in some games you get stuck on a 2 pixels width tree root).&#xD;&#xA; - And binary masks uses too much memory and settings imo.  &#xD;&#xA;&#xD;&#xA;I've read alot of documentation but I never found something that looked good to me. And all my tryouts didn't look close to what I used to play with. So if you have any good links or tutorials on how evolved 2D RPG work please let me know. &#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Jte2Z.png" />
  <row Id="24931" PostHistoryTypeId="1" PostId="11601" RevisionGUID="56538a55-e5fb-417c-9f27-c374f14ee98d" CreationDate="2011-04-25T12:23:36.367" UserId="3037" Text="How to create a realistic 2D Role-Playing game collision detection?" />
  <row Id="24932" PostHistoryTypeId="3" PostId="11601" RevisionGUID="56538a55-e5fb-417c-9f27-c374f14ee98d" CreationDate="2011-04-25T12:23:36.367" UserId="3037" Text="&lt;collision-detection&gt;&lt;rpg&gt;" />
  <row Id="24933" PostHistoryTypeId="2" PostId="11602" RevisionGUID="ecba3b79-6f7d-435c-bdb8-a86fbe51d9b7" CreationDate="2011-04-25T12:40:34.437" UserId="1134" Text="[The N Tutorials][1] may help here.  Admittedly, they're for an arcade-style platformer, but they'll work just as well for a top-down view RPG; just don't apply gravity.  The premise is testing for collision in a collection of basic shapes -- circles, axis-aligned bounding boxes, lines, points, etcetera.&#xD;&#xA;&#xD;&#xA;You then somehow either decorate your world with these (perhaps via a custom level editor), or automatically generate them (fit a closest box or circle) -- or both (default to auto generated box/circle, and allow a designer to tweak).&#xD;&#xA;&#xD;&#xA;Where I work, we have done quite a few platformers and some top-down exploration games.  We've been doing them since the GBA days.  We most often use AABBs for characters and objects, tunable in a sprite editor -- and we go crazy here, allowing a ton of boxes per sprite, some with different purposes.  We might have:&#xD;&#xA;&#xD;&#xA;* one or more collision boxes, describing the shape of the object for running into things;&#xD;&#xA;* possibly many &quot;attack boxes&quot; that only come into being when you're in the middle of an attack (and animate with the sprite), perhaps even two or three per weapon, depending;&#xD;&#xA;* a few &quot;vulnerable boxes&quot; that will take damage when hit by others' attack boxes -- by default, we use the collision box, but the vulnerable boxes tend to feel better when they're smaller than the collision box, and we can allow for location-aware damage this way&#xD;&#xA;* one or more &quot;activation box&quot; on AI that describes the sense region for the AI -- they'll attack if the player is in this region, for example.&#xD;&#xA;&#xD;&#xA;The levels are mostly strings of line segments; we have a bit of metadata per segment to describe damaging or slippery surfaces, etc.&#xD;&#xA;&#xD;&#xA;So most of the collision detection and response becomes AABB-vs-AABB or AABB-vs-segment.  Occasionally we toss in a circle-vs-something for a projectile, although often an AABB will do here as well.&#xD;&#xA;&#xD;&#xA;You don't need a lot of basic shapes to make things look good and behave well -- a few will do, provided you can tweak and iterate on them.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Also, don't feel bad about blending systems together; tile-based collision may be excellent in some areas (representing the majority of your world) but horrible for object-object interactions.  That's fine; use a different system for object-vs-object!  Writing for interactions between the two systems may be easier than you think.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="24934" PostHistoryTypeId="2" PostId="11603" RevisionGUID="7ac90580-d7ec-4274-9919-d49493f19cb4" CreationDate="2011-04-25T12:46:47.957" UserId="1839" Text="In my answer I'm assuming that your matrices are in row-major form, if not, read column for row.&#xD;&#xA;&#xD;&#xA;The matrix has the following information:&#xD;&#xA;&#xD;&#xA; - 1st Row:  The Right-Vector&#xD;&#xA; - 2nd Row:  The Up-Vector&#xD;&#xA; - 3rd Row:  The Forward-Vector&#xD;&#xA;&#xD;&#xA;Now if you want to shoot a bullet in the direction the character is facing, just use the 3rd row (the Forward Vector), scale it by the start-distance from the character and add that to the character's position:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    bullet_start_pos = player_start_pos + orientation[2] * start_distance;&#xD;&#xA;&#xD;&#xA;orientation[2] is the vector in the 3rd row of the orientation-matrix&#xD;&#xA;" />
  <row Id="24936" PostHistoryTypeId="5" PostId="11603" RevisionGUID="70e51e85-ab59-4f0b-9ab3-a389381d2405" CreationDate="2011-04-25T13:06:03.347" UserId="1839" Comment="added 169 characters in body; deleted 13 characters in body" Text="I'm assuming that your matrices are in row-major form, if not, read column for row.&#xD;&#xA;&#xD;&#xA;It's supposed to be a general answer for all orientation-matrices, rather than only for XNA, giving some background about matrices and what data they actually store.&#xD;&#xA;&#xD;&#xA;The matrix has the following information:&#xD;&#xA;&#xD;&#xA; - 1st Row:  The Right-Vector&#xD;&#xA; - 2nd Row:  The Up-Vector&#xD;&#xA; - 3rd Row:  The Forward-Vector&#xD;&#xA;&#xD;&#xA;Now if you want to shoot a bullet in the direction the character is facing, just use the 3rd row (the Forward Vector), scale it by the start-distance from the character and add that to the character's position:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    bullet_start_pos = player_start_pos + orientation[2] * start_distance;&#xD;&#xA;&#xD;&#xA;orientation[2] is the vector in the 3rd row of the orientation-matrix&#xD;&#xA;" />
  <row Id="24937" PostHistoryTypeId="2" PostId="11605" RevisionGUID="5d6d7c81-b9d8-4df1-bba2-3cc61b65278d" CreationDate="2011-04-25T13:17:35.317" UserId="3656" Text="Look at the command line tool for [ImageMagick][1]. It allows you to do batch processing on images, including transforms such as rotation. It's also useful for generating simple spritesheets (not the &quot;packed&quot; kind, but the kind where each the image is cut up into frames of equal width and height).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imagemagick.org/script/index.php" />
  <row Id="24938" PostHistoryTypeId="2" PostId="11606" RevisionGUID="976a6b4b-f984-4229-b501-4ea2cd58ebcd" CreationDate="2011-04-25T13:23:51.480" UserId="5401" Text="We are making a multipler first person shooter.&#xD;&#xA;The client sends it's position to the server at a fixed rate (currently at 10Hz). The server sends a single message contatining all player's positions to all players at the same rate (10Hz).&#xD;&#xA;&#xD;&#xA;As expected, the movement is pretty choppy since the 60fps game is only recieving updates 10 times a second.&#xD;&#xA;What is the best way to smooth this movement?&#xD;&#xA;The most obvious way would be to interpolate between the last two packets, so that the interpolation is done as we recieve a new packet. But this adds an instant 100ms delay for all players.&#xD;&#xA;The other way would be to use the velocity and acceleration inferred from the last few packets to predict where the player is between packets, however if the prediction is wrong, the player would tend to jump as soon as a new packet is recieved.&#xD;&#xA;&#xD;&#xA;Does anyone know how AAA titles solve this problem?" />
  <row Id="24939" PostHistoryTypeId="1" PostId="11606" RevisionGUID="976a6b4b-f984-4229-b501-4ea2cd58ebcd" CreationDate="2011-04-25T13:23:51.480" UserId="5401" Text="Implementing network smoothing" />
  <row Id="24940" PostHistoryTypeId="3" PostId="11606" RevisionGUID="976a6b4b-f984-4229-b501-4ea2cd58ebcd" CreationDate="2011-04-25T13:23:51.480" UserId="5401" Text="&lt;network&gt;&lt;first-person-shooter&gt;" />
  <row Id="24943" PostHistoryTypeId="5" PostId="11606" RevisionGUID="9d836249-beac-4c1e-8c5b-57075645bc51" CreationDate="2011-04-25T13:39:54.877" UserId="5401" Comment="added 18 characters in body" Text="We are making a multipler first person shooter.&#xD;&#xA;The client sends it's position to the server at a fixed rate (currently at 10Hz). The server sends a single message contatining all player's positions to all players at the same rate (10Hz).&#xD;&#xA;&#xD;&#xA;As expected, the movement is pretty choppy since the 60fps game is only recieving updates 10 times a second.&#xD;&#xA;What is the best way to smooth this movement?&#xD;&#xA;The most obvious way would be to interpolate between the last two packets, so that the interpolation finishes as we recieve a new packet. But this adds an instant 100ms delay for all players.&#xD;&#xA;&#xD;&#xA;The other way would be to use the velocity and acceleration inferred from the last few packets to predict where the player is before the next packet arrives, however if the prediction is wrong, the player would tend to jump as soon as a new packet is recieved.&#xD;&#xA;&#xD;&#xA;Does anyone know how AAA titles solve this problem?" />
  <row Id="24944" PostHistoryTypeId="2" PostId="11608" RevisionGUID="f024f0e6-72b8-4e45-bef3-df9afc2340d5" CreationDate="2011-04-25T14:18:49.690" UserId="6836" Text="So I'm following a tutorial: &#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb195026%28v=xnagamestudio.31%29.aspx#Y539 &#xD;&#xA;&#xD;&#xA;to create a way to pause the game I'm making. But I'm stuck because the code includes &quot;Simulate&quot; which is not explained in the tutorial. I understand what it supposed to do.&#xD;&#xA;&#xD;&#xA;It brings up an error about it doesnt exist - so my guess it that it needs to be created like a variable?&#xD;&#xA;&#xD;&#xA;Heres the code:&#xD;&#xA;     &#xD;&#xA;    if (!paused)&#xD;&#xA;     {&#xD;&#xA;    Simulate(gameTime);&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Could someone point me in the correct direction please? Thanks :)&#xD;&#xA;" />
  <row Id="24945" PostHistoryTypeId="1" PostId="11608" RevisionGUID="f024f0e6-72b8-4e45-bef3-df9afc2340d5" CreationDate="2011-04-25T14:18:49.690" UserId="6836" Text="Pausing an XNA game" />
  <row Id="24946" PostHistoryTypeId="3" PostId="11608" RevisionGUID="f024f0e6-72b8-4e45-bef3-df9afc2340d5" CreationDate="2011-04-25T14:18:49.690" UserId="6836" Text="&lt;xna&gt;" />
  <row Id="24947" PostHistoryTypeId="2" PostId="11609" RevisionGUID="a9f31112-dfae-4d8d-a52c-69d1e7dabfdb" CreationDate="2011-04-25T14:19:25.810" UserId="4662" Text="I've got an object in HLSL and I'm using hardware instancing to render multiple copies. But I've come a bit of a cropper when it comes to the vertex normals. Currently I am not using normal mapping (although planning to implement it soon), I'm just putting the normals inside the vertex structure. I can put the world matrix and get it out in HLSL just fine, but I need the inverse transpose if I want the world position of the vertex normal from object space. How can I invert a matrix in HLSL? Or am I going to have to send the matrix and it's inverse in the instance buffer?&#xD;&#xA;&#xD;&#xA;Or is this somehing that normal mapping doesn't require?" />
  <row Id="24948" PostHistoryTypeId="1" PostId="11609" RevisionGUID="a9f31112-dfae-4d8d-a52c-69d1e7dabfdb" CreationDate="2011-04-25T14:19:25.810" UserId="4662" Text="Inverting matrix in HLSL" />
  <row Id="24949" PostHistoryTypeId="3" PostId="11609" RevisionGUID="a9f31112-dfae-4d8d-a52c-69d1e7dabfdb" CreationDate="2011-04-25T14:19:25.810" UserId="4662" Text="&lt;c++&gt;&lt;directx&gt;&lt;hlsl&gt;&lt;matrix&gt;" />
  <row Id="24951" PostHistoryTypeId="2" PostId="11610" RevisionGUID="8be35136-1380-48e4-91d5-c189cac898fd" CreationDate="2011-04-25T14:40:55.263" UserId="288" Text="It's just a simple way to wrap your entire `Update` method in a conditional, without mixing the pausing logic with your game's updating logic.&#xD;&#xA;&#xD;&#xA;So instead of:&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        if(!paused)&#xD;&#xA;        {&#xD;&#xA;            // Lots and lots of code!&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can have:&#xD;&#xA;&#xD;&#xA;    private void Simulate(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        // Lots and lots of code!&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        if(!paused)&#xD;&#xA;        {&#xD;&#xA;            Simulate(gameTime);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course, if you would prefer to express it as &quot;continue the game like normal&quot;, you could also do this:&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        if(paused)&#xD;&#xA;            return;&#xD;&#xA;&#xD;&#xA;        // Lots and lots of code!&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;These all do the same thing. Which method you choose to do it is simply a matter of taste. Basically what the tutorial is telling you is:&#xD;&#xA;&#xD;&#xA;* Determine if your game should be paused and store that in a variable (ie: `bool paused`)&#xD;&#xA;* If it is paused, *skip over* the code that is responsible for updating your game's state (essentially freezing it in time, ie: &quot;pausing&quot; it.)" />
  <row Id="24952" PostHistoryTypeId="5" PostId="11578" RevisionGUID="7cbf266b-ef83-48a4-88b5-a6a54a0625a4" CreationDate="2011-04-25T14:41:46.043" UserId="5459" Comment="better explanation of the problem" Text="I am getting error code GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT when creating framebuffer on Mac (using glCheckFramebufferStatus).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am using same code for rendering on Mac and iOS both. Maybe problem is in the buffers initialization. On iOS I am doing it this way:&#xD;&#xA;&#xD;&#xA;        CAEAGLLayer* eaglLayer = (CAEAGLLayer*) super.layer;&#xD;&#xA;        eaglLayer.opaque = YES;&#xD;&#xA;&#xD;&#xA;        EAGLRenderingAPI api = kEAGLRenderingAPIOpenGLES2;&#xD;&#xA;        m_context = [[EAGLContext alloc] initWithAPI:api];&#xD;&#xA;&#xD;&#xA;        if (!m_context) {&#xD;&#xA;            [self release];&#xD;&#xA;            return nil;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (!m_context || ![EAGLContext setCurrentContext:m_context]) {&#xD;&#xA;            [self release];&#xD;&#xA;            return nil;&#xD;&#xA;        }&#xD;&#xA;		&#xD;&#xA;		[self layoutIfNeeded];&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		NSLog(@&quot;Using OpenGL ES 2.0&quot;);&#xD;&#xA;&#xD;&#xA;        [m_context&#xD;&#xA;            renderbufferStorage:GL_RENDERBUFFER&#xD;&#xA;            fromDrawable: eaglLayer];&#xD;&#xA;&#xD;&#xA;Variable `m_context` is object `EAGLContext`&#xD;&#xA;&#xD;&#xA;On the Mac this way:&#xD;&#xA;&#xD;&#xA;    NSOpenGLPixelFormat *nsglFormat;&#xD;&#xA;	&#xD;&#xA;    NSOpenGLPixelFormatAttribute attr[] = &#xD;&#xA;	{&#xD;&#xA;        NSOpenGLPFADoubleBuffer,&#xD;&#xA;		NSOpenGLPFAAccelerated,&#xD;&#xA;		NSOpenGLPFAColorSize, m_colorBits, //16&#xD;&#xA;		NSOpenGLPFADepthSize, m_depthBits, //16&#xD;&#xA;        0 &#xD;&#xA;	};&#xD;&#xA;	 &#xD;&#xA;	&#xD;&#xA;    [self setPostsFrameChangedNotifications: YES];&#xD;&#xA;	&#xD;&#xA;    ///&lt; Next, initialize the NSOpenGLPixelFormat itself&#xD;&#xA;    nsglFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];&#xD;&#xA;	&#xD;&#xA;    ///&lt; Check for errors in the creation of the NSOpenGLPixelFormat&#xD;&#xA;    if(!nsglFormat) { &#xD;&#xA;		NSLog(@&quot;Invalid format... terminating.&quot;); &#xD;&#xA;		return nil; &#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;    ///&lt; Now create the the CocoaGL instance, using initial frame and the NSOpenGLPixelFormat&#xD;&#xA;    self = [super initWithFrame:frame pixelFormat:nsglFormat];&#xD;&#xA;    [nsglFormat release];&#xD;&#xA;    &#xD;&#xA;    ///&lt; If there was an error, we again should probably send an error message to the user&#xD;&#xA;    if(!self) { &#xD;&#xA;		NSLog(@&quot;Self not created... terminating.&quot;); &#xD;&#xA;		return nil; &#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ///&lt; Now  set this context to the current context&#xD;&#xA;&#xD;&#xA;    [[self openGLContext] makeCurrentContext];&#xD;&#xA;&#xD;&#xA;Maybe I am doing anything wrong when I initialize NSOpenGLContext. Can you see any error? Thankyou&#xD;&#xA;**UPDATE**: Initialization of the OpenGL I am doing this way: &#xD;&#xA;&#xD;&#xA;	int m_width, m_height;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    glGetRenderbufferParameteriv(GL_RENDERBUFFER,&#xD;&#xA;								 GL_RENDERBUFFER_WIDTH, &amp;m_width);&#xD;&#xA;    glGetRenderbufferParameteriv(GL_RENDERBUFFER,&#xD;&#xA;								 GL_RENDERBUFFER_HEIGHT, &amp;m_height);&#xD;&#xA;	&#xD;&#xA;    // Create the depth buffer.&#xD;&#xA;    glGenRenderbuffers(1, &amp;m_depthRenderbuffer);&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, m_depthRenderbuffer);&#xD;&#xA;    glRenderbufferStorage(GL_RENDERBUFFER,&#xD;&#xA;                          GL_DEPTH_COMPONENT16,&#xD;&#xA;                          m_width,&#xD;&#xA;                          m_height);&#xD;&#xA;    &#xD;&#xA;    // Create the framebuffer object; attach the depth and color buffers.&#xD;&#xA;    glGenFramebuffers(1, &amp;m_framebuffer);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);&#xD;&#xA;    glFramebufferRenderbuffer(GL_FRAMEBUFFER,&#xD;&#xA;                              GL_COLOR_ATTACHMENT0,&#xD;&#xA;                              GL_RENDERBUFFER,&#xD;&#xA;                              m_colorRenderbuffer);&#xD;&#xA;    glFramebufferRenderbuffer(GL_FRAMEBUFFER,&#xD;&#xA;                              GL_DEPTH_ATTACHMENT,&#xD;&#xA;                              GL_RENDERBUFFER,&#xD;&#xA;                              m_depthRenderbuffer);&#xD;&#xA;&#xD;&#xA;    // Bind the color buffer for rendering.&#xD;&#xA;    glBindRenderbuffer(GL_RENDERBUFFER, m_colorRenderbuffer);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    // Set up some GL state.&#xD;&#xA;    glViewport(0, 0, 640, 480);&#xD;&#xA;    glEnable(GL_DEPTH_TEST);&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;" />
  <row Id="24953" PostHistoryTypeId="4" PostId="11578" RevisionGUID="7cbf266b-ef83-48a4-88b5-a6a54a0625a4" CreationDate="2011-04-25T14:41:46.043" UserId="5459" Comment="better explanation of the problem" Text="Getting error GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" />
  <row Id="24954" PostHistoryTypeId="2" PostId="11611" RevisionGUID="b5512183-1e68-47cc-9232-92df9903671e" CreationDate="2011-04-25T14:56:44.623" UserId="1101" Text="They do exactly what you've just said - either one of those two approaches, or some compromise between them. (eg. accept a small delay and interpolate where possible, and extrapolate when the ping exceeds that delay.) Instead of jumping (also known as 'snapping') back to a corrected position, you typically do some sort of interpolation between the wrong prediction and the corrected value, smoothing it out, if possible. You also handle the corrections in the past to reduce the amount of correction you need to apply.&#xD;&#xA;&#xD;&#xA;This is a frequently asked question and there are several canonical links which you will probably find elsewhere on gamedev.stackexchange.com if you search, and they include the following:&#xD;&#xA;&#xD;&#xA;[What every programmer needs to know about game networking][3] (this summarises stuff in the next two links)&#xD;&#xA;&#xD;&#xA;[Source Multiplayer Networking][1]&#xD;&#xA;&#xD;&#xA;[Unreal Networking Architecture][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking&#xD;&#xA;  [2]: http://unreal.epicgames.com/Network.htm&#xD;&#xA;  [3]: http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/" />
  <row Id="24955" PostHistoryTypeId="2" PostId="11612" RevisionGUID="3d9e6d00-8fa9-4fe4-b9a7-8b3c534b381e" CreationDate="2011-04-25T15:04:03.720" UserId="312" Text="I am trying to put 3Dish audio in a game I'm developing, and I'm unsure how to do positional sound. I want to be able to adjust the volume of the audio's channels depending on how far it is and the orientation." />
  <row Id="24956" PostHistoryTypeId="1" PostId="11612" RevisionGUID="3d9e6d00-8fa9-4fe4-b9a7-8b3c534b381e" CreationDate="2011-04-25T15:04:03.720" UserId="312" Text="Implementing Positional Sound" />
  <row Id="24957" PostHistoryTypeId="3" PostId="11612" RevisionGUID="3d9e6d00-8fa9-4fe4-b9a7-8b3c534b381e" CreationDate="2011-04-25T15:04:03.720" UserId="312" Text="&lt;flash&gt;&lt;audio&gt;&lt;sound&gt;" />
  <row Id="24958" PostHistoryTypeId="25" PostId="11608" RevisionGUID="9ff0c3f2-19b4-4010-8e65-81f9da06abda" CreationDate="2011-04-25T15:09:32.513" Comment="http://twitter.com/#!/StackGameDev/status/62533708128845824" />
  <row Id="24959" PostHistoryTypeId="2" PostId="11613" RevisionGUID="16624989-395d-4ed0-917f-59fb2ff550db" CreationDate="2011-04-25T15:24:02.683" UserId="1587" Text="As Andrew mentioned, you can simply add a flag in the `Update` loop to check the game's state. However, if your game is a bit more complex, you might want to take a look at the [Game State Management code sample][1], that demonstrates multiple screens, transitions and a pause menu.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="24960" PostHistoryTypeId="2" PostId="11614" RevisionGUID="95025b59-7b44-44fb-9d40-282eb9f4c64f" CreationDate="2011-04-25T15:41:00.883" UserId="370" Text="[Silly][1] is produced the the [CEGUI][2] guys.&#xD;&#xA;&#xD;&#xA;I supports loading PNG, TGA, JPG, etc.  And it's released with an MIT license.&#xD;&#xA;&#xD;&#xA;You'd have to write a C wrapper yourself as the library is written in C++.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cegui.org.uk/wiki/index.php/SILLY_Downloads_0.1.0&#xD;&#xA;  [2]: http://www.cegui.org.uk/wiki/index.php/Main_Page" />
  <row Id="24961" PostHistoryTypeId="6" PostId="11612" RevisionGUID="559f3ae3-ed84-43d2-b10a-3d3bb13604d9" CreationDate="2011-04-25T15:58:32.170" UserId="3588" Comment="The fact it's 3D is pretty important. Also, switched the ambiguous [sound] tag for the more appropriate [sound-effects] tag. ♪" Text="&lt;3d&gt;&lt;flash&gt;&lt;audio&gt;&lt;sound-effects&gt;" />
  <row Id="24962" PostHistoryTypeId="24" PostId="11612" RevisionGUID="559f3ae3-ed84-43d2-b10a-3d3bb13604d9" CreationDate="2011-04-25T15:58:32.170" Comment="Proposed by 3588 approved by 51 edit id of 386" />
  <row Id="24963" PostHistoryTypeId="16" PostId="9083" RevisionGUID="be390d8e-bd16-4160-ba3a-81db672aa03e" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24964" PostHistoryTypeId="16" PostId="9084" RevisionGUID="b6651db5-e574-4e54-8f66-095bf833bc3f" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24965" PostHistoryTypeId="16" PostId="9086" RevisionGUID="4248ad6d-c844-4811-9a15-485918246b66" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24966" PostHistoryTypeId="16" PostId="9087" RevisionGUID="6fe0c992-0d23-492b-a4e2-dba9ece20f07" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24967" PostHistoryTypeId="16" PostId="9088" RevisionGUID="2307654b-4838-4356-90bd-8422177a673f" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24968" PostHistoryTypeId="16" PostId="9092" RevisionGUID="67343e0a-5a68-49fd-8172-8ac5a223edd3" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24970" PostHistoryTypeId="16" PostId="11614" RevisionGUID="52938372-d53e-427c-825e-b9e129e4e0a9" CreationDate="2011-04-25T15:58:54.073" UserId="51" />
  <row Id="24971" PostHistoryTypeId="2" PostId="11615" RevisionGUID="d3a31a31-d6ff-49aa-9162-5236218bca1b" CreationDate="2011-04-25T16:05:27.437" UserId="6937" Text="I'm currently in a group that researches network optimizations and various distributed applications, I'm much more interested in games but more from a research side.Is there a resource that focuses on research topics specific to game development and what are some common areas of research? &#xD;&#xA;&#xD;&#xA;Note:I understand game development is made up of various topics that are thoroughly researched, my question is more geared towards the areas that are exclusive to gaming applications or at least only important for gaming.&#xD;&#xA;&#xD;&#xA;One example could be maybe a &quot;genetic algorithm approach to character skill progression&quot;. Which would focus on building a skill progression that is most optimal to player returns. Etc etc...Random idea, but you get my point. I also mean the technical side of development too, but I didn't want to limit this." />
  <row Id="24972" PostHistoryTypeId="1" PostId="11615" RevisionGUID="d3a31a31-d6ff-49aa-9162-5236218bca1b" CreationDate="2011-04-25T16:05:27.437" UserId="6937" Text="What research areas exist in game development?" />
  <row Id="24973" PostHistoryTypeId="3" PostId="11615" RevisionGUID="d3a31a31-d6ff-49aa-9162-5236218bca1b" CreationDate="2011-04-25T16:05:27.437" UserId="6937" Text="&lt;game-design&gt;&lt;resources&gt;&lt;academic-research&gt;" />
  <row Id="24974" PostHistoryTypeId="2" PostId="11616" RevisionGUID="193eec95-38fc-4d81-b794-35f5cab1a281" CreationDate="2011-04-25T16:05:44.597" UserId="6636" Text="I'm studying AI. My teacher gave us source code of a chess-like game and asked us to enhance it. My exercise is to improve the alpha/beta algorithm implementing in that game. The programmer already uses transposition tables, MTD(f) with alpha/beta+memory (MTD(f) is the best algorithm I know by far). So is there any better algorithm to enhance alpha-beta search or a good way to implement MTD(f) in coding a game?" />
  <row Id="24975" PostHistoryTypeId="1" PostId="11616" RevisionGUID="193eec95-38fc-4d81-b794-35f5cab1a281" CreationDate="2011-04-25T16:05:44.597" UserId="6636" Text="The best algorithm enhancing alpha-beta?" />
  <row Id="24976" PostHistoryTypeId="3" PostId="11616" RevisionGUID="193eec95-38fc-4d81-b794-35f5cab1a281" CreationDate="2011-04-25T16:05:44.597" UserId="6636" Text="&lt;algorithm&gt;&lt;chess&gt;" />
  <row Id="24977" PostHistoryTypeId="2" PostId="11617" RevisionGUID="3b557ac3-9d94-4169-8c8a-2a0cf86e7d7b" CreationDate="2011-04-25T16:16:29.013" UserId="6937" Text="I'll answer generally then more specifically. First, in my experience when a professor asks is there a better way.. I immediately go to the book and look for things the author noted as shortfalls of the algorithm in question. Second, I look at optimizations that have helped me in the past. &#xD;&#xA;&#xD;&#xA;For a tree searching algorithm like alpha-beta I would look at adding a heuristic that reduces the number of searches or causes it to look in more likely locations first.&#xD;&#xA;&#xD;&#xA;I would assign weights to paths that can be taken in the tree based on past results. If a path has resulting in a higher score in the past, the it's probably a good path to take again. So long story short, add heuristics to the paths and choose to go with those so the algorithm can terminate earlier.&#xD;&#xA;&#xD;&#xA;Note that I don't really remember much about the specific algorithm, just that it is a tree and the naive approach to it does not involve this heuristic." />
  <row Id="24978" PostHistoryTypeId="2" PostId="11618" RevisionGUID="d8d4e992-d1ec-47d6-b92e-391974799404" CreationDate="2011-04-25T16:19:40.963" UserId="6395" Text="In the next few weeks I will start a game for iOS, most of the action will happen in 2D but a 2D engine is not enough for our idea, therefore I'm doing a small research on available 3D engines for iOS written in Objective-C (we already looked on some engines written in C++).&#xD;&#xA;&lt;br /&gt; &lt;br /&gt;&#xD;&#xA;Do you know 3D engines written in Objective-C?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;I found this one http://nineveh.gl/ but is not yet ready :(.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="24979" PostHistoryTypeId="1" PostId="11618" RevisionGUID="d8d4e992-d1ec-47d6-b92e-391974799404" CreationDate="2011-04-25T16:19:40.963" UserId="6395" Text="Do you know any 3D engines written in Objective-C for iOS?" />
  <row Id="24980" PostHistoryTypeId="3" PostId="11618" RevisionGUID="d8d4e992-d1ec-47d6-b92e-391974799404" CreationDate="2011-04-25T16:19:40.963" UserId="6395" Text="&lt;3d-engines&gt;&lt;objective-c&gt;" />
  <row Id="24986" PostHistoryTypeId="2" PostId="11619" RevisionGUID="503b854a-86c4-40cb-bdf4-a6f492e999b2" CreationDate="2011-04-25T16:33:29.663" UserId="6937" Text="Since you didn't mention any API for sound I'll give you the general answer. &#xD;&#xA;&#xD;&#xA;First get the distance between the audio listener and the audio source&#xD;&#xA;d(L,S) = sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)&#xD;&#xA;&#xD;&#xA;Then you define a distance where you don't want it to be audible anymore, lets say 150m&#xD;&#xA;&#xD;&#xA;If your distance is 40 meters from the source, then the volume is about 73%.&#xD;&#xA;&#xD;&#xA;To give you an equation that would be:&#xD;&#xA;1-(d(L,S)/maxDistance)&#xD;&#xA;or(1-(40/150)) = about .73&#xD;&#xA;That will be the percentage of volume from 1 to 100%&#xD;&#xA;&#xD;&#xA;That's assuming you want the volume to change linearly with your position change." />
  <row Id="24987" PostHistoryTypeId="6" PostId="11615" RevisionGUID="efcea152-2722-4bda-8794-fdb44aa8e5d9" CreationDate="2011-04-25T16:36:20.970" UserId="2332" Comment="Removed game design tag. Not really applicable" Text="&lt;resources&gt;&lt;academic-research&gt;" />
  <row Id="24988" PostHistoryTypeId="2" PostId="11620" RevisionGUID="ee732001-1590-4259-b355-1937f367da00" CreationDate="2011-04-25T16:36:46.867" UserId="5014" Text="Cocos3d is an extension for Cocos2d and supports many features. Check out their website - &#xD;&#xA;[http://brenwill.com/cocos3d/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://brenwill.com/cocos3d/" />
  <row Id="24989" PostHistoryTypeId="2" PostId="11621" RevisionGUID="7c5445d0-487e-45c5-8575-d105d3f1cd74" CreationDate="2011-04-25T16:37:47.757" UserId="3830" Text="Check out both the Unreal Development Kit ([http://www.udk.com/][1]) and Unity ([http://www.unity3d.com][2]) engines.  Both have Objective-C hooks.&#xD;&#xA;&#xD;&#xA;I am assuming that it's not important that the engine itself be written in Objective-C, only that you can program in Objective-C and use the engine. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.udk.com/&#xD;&#xA;  [2]: http://www.unity3d.com" />
  <row Id="24990" PostHistoryTypeId="2" PostId="11622" RevisionGUID="9c01aeb5-d69e-41ff-9aad-3a4dc2f44954" CreationDate="2011-04-25T16:47:46.003" UserId="20" Text="If you really want to do this in code (instead of converting the sprite-sheets you have), I suggest you use the [BitmapData:draw][1] method to draw an existing BitmapData object (your Sprite) into another. When using the `draw` method you can also supply a transform matrix to use, so basically you do the following:&#xD;&#xA;&#xD;&#xA; - Create a new BitmapData object with the same size as your sprite (actually, width becomes height and height becomes width).&#xD;&#xA; - Copy your sprite using a 90 degree rotation matrix&#xD;&#xA; - Use the new BitmapData object for the graphics in Flixel...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#draw%28%29" />
  <row Id="24991" PostHistoryTypeId="2" PostId="11623" RevisionGUID="0dfd4e6f-74ed-4e8d-aa70-dc5b5a964dde" CreationDate="2011-04-25T17:06:48.100" UserId="6831" Text="I agree with the other answers that NIO provides better results. However using NIO isn't that trivial. You will definitely learn something when you code the NIO network code yourself. Or you just use an asynch network package like [netty][1] or [Apache Mina][2]. I prefer netty, since I find it better documented. However if you understand one of them, you understand the other one as well.&#xD;&#xA;&#xD;&#xA;But, if you want to keep the design you have, you can split the sending and receiving code. Create some &quot;PlayerSession&quot; or &quot;PlayerConnection&quot; Object that provides the methods for sending messages to the client and contains one thread that blocks on the read and handles input. Maybe you want to move the sending stuff to an own thread, just try it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jboss.org/netty&#xD;&#xA;  [2]: http://mina.apache.org/" />
  <row Id="24992" PostHistoryTypeId="5" PostId="11506" RevisionGUID="338743c5-ab3b-4636-ab1d-b102385c613d" CreationDate="2011-04-25T17:10:31.123" UserId="6843" Comment="added 534 characters in body; added 264 characters in body; added 4 characters in body" Text="There are times when it is necessary, for &quot;serious&quot; applications, such as real-life Flight Simulators.&#xD;&#xA;&#xD;&#xA;*EDIT*: In a flight simulator environment, such as the ones used to train pilots in routine and adverse situations, it is entirely possible that the simulator knows what scenario is coming up, and would need to pre-plan out possible responses the pilot may make, which may include abrupt changes in altitude (height), attitude (roll and pitch), direction (yaw), all of which may quickly change the upcoming scenery.  The simulator plans for this by preloading the data and precomputing visibility in the potential upcoming scenes.&#xD;&#xA;&#xD;&#xA;The long-term polling of frame-rate is necessary to help ensure that the training was a valid experience for the pilot.  If the frame-rate had dipped below an acceptable level, then the training regimen may not qualify for FAA (re)certification of pilot readiness.&#xD;&#xA;" />
  <row Id="24993" PostHistoryTypeId="2" PostId="11624" RevisionGUID="fdf95fcb-9ef1-4e5f-8ebe-05dae29b7ebc" CreationDate="2011-04-25T17:17:34.303" UserId="5459" Text="Finally I have found the solution. It is necessary NOT to use renderbuffer. So I have to DELETE code to init renderbuffer. " />
  <row Id="24994" PostHistoryTypeId="5" PostId="11570" RevisionGUID="7204201c-2b87-4ca4-b8ff-7c39695be5b4" CreationDate="2011-04-25T17:39:09.037" UserId="450" Comment="added 8 characters in body" Text="You have basically these two options:&#xD;&#xA;&#xD;&#xA;- Use blocking IO with one reading thread per client&#xD;&#xA;- Use non blocking IO &#xD;&#xA;&#xD;&#xA;The first option has the disadvantage that it does not scale for large number of clients.&#xD;&#xA;&#xD;&#xA;While non blocking IO can be done by checking inputstream.available(), it may be a good idea to look at the New I/O API. Wikipedia has a good article on [NIO][1] with sample code. You can find additional information in the [JavaDoc for the NIO package][2]. And on a quick glance this [tutorial][3] seems helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You might get away with doing smart things on the client side, such as sending a dummy message on every &quot;turn&quot;. This, however, means that a rouge client can freeze your server. So you should not go into this direction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/New_I/O&#xD;&#xA;  [2]: http://download.oracle.com/javase/6/docs/api/java/nio/package-summary.html&#xD;&#xA;  [3]: http://www.roseindia.net/tutorial/java/corejava/nio/home.html" />
  <row Id="24995" PostHistoryTypeId="2" PostId="11625" RevisionGUID="20c356d6-56d4-4705-9ecf-139ca82bcd98" CreationDate="2011-04-25T17:57:50.463" UserId="2332" Text="The primary resources (barring conferences) for research around game development that I've found is the Game Programming Gems books, GPU Gems and the AI Game Programming Wisdom books (Both can be found [here][1]).&#xD;&#xA;&#xD;&#xA;Both series' feature articles from game developers as well as researchers and at the end of each article they offer a comprehensive reference list to further your understanding on the topic.&#xD;&#xA;&#xD;&#xA;I would say that the main research efforts are focused on either graphics or AI, probably because they're pretty large areas of interest for academia in general.&#xD;&#xA;&#xD;&#xA;The [GDC Vault][2] (found on the sidebar of this site sometimes) is also very useful as is GDC itself. Conferences are probably the way to go to keep on the cutting edge of research topics as well as networking to find out what some people are working on, etc.  &#xD;&#xA;&#xD;&#xA;If you don't have access to the conferences, you could always purchase the proceedings that have all presented papers and articles of interest within them.&#xD;&#xA;&#xD;&#xA;A fairly old resource for finding game development research topics is [Red3D][3]. It's fairly outdated and a lot of links are broken, but with some Googling of the research areas you should be able to find them again pretty quickly.&#xD;&#xA;&#xD;&#xA;Although not official (from an academic perspective), [GameDev.net][4] has a good few interesting articles on latest advances as does [GamaSutra][5].&#xD;&#xA;&#xD;&#xA;Alex J. Champandard runs [AIGameDev][6] and they have a lot of guest speakers, research students, articles, papers, etc. It's pretty comprehensive, but to really get the most out of it you need to be a Premium member which can be a bit pricy.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.aiwisdom.com&#xD;&#xA;  [2]: http://meta.gamedev.stackexchange.com/ads/ct/403?url=http://www.gdcvault.com/&#xD;&#xA;  [3]: http://www.red3d.com/cwr/games/&#xD;&#xA;  [4]: http://www.gamedev.net&#xD;&#xA;  [5]: http://www.gamasutra.com/&#xD;&#xA;  [6]: http://aigamedev.com" />
  <row Id="24996" PostHistoryTypeId="25" PostId="11618" RevisionGUID="d0fed501-e6fa-491f-be8e-1421bec5cf9b" CreationDate="2011-04-25T18:09:32.477" Comment="http://twitter.com/#!/StackGameDev/status/62579006960181249" />
  <row Id="24997" PostHistoryTypeId="5" PostId="11625" RevisionGUID="b7083069-3560-4448-8d94-a77e4cde2d58" CreationDate="2011-04-25T18:54:13.120" UserId="2332" Comment="Added further information regarding cancellation of AI series" Text="The primary resources (barring conferences) for research around game development that I've found is the Game Programming Gems books, GPU Gems and the AI Game Programming Wisdom books (Both can be found [here][1]).&#xD;&#xA;&#xD;&#xA;Both series' feature articles from game developers as well as researchers and at the end of each article they offer a comprehensive reference list to further your understanding on the topic.&#xD;&#xA;&#xD;&#xA;EDIT: Although the AI series has ended, they do have some great articles in there, well worth a look.&#xD;&#xA;&#xD;&#xA;I would say that the main research efforts are focused on either graphics or AI, probably because they're pretty large areas of interest for academia in general.&#xD;&#xA;&#xD;&#xA;The [GDC Vault][2] (found on the sidebar of this site sometimes) is also very useful as is GDC itself. Conferences are probably the way to go to keep on the cutting edge of research topics as well as networking to find out what some people are working on, etc.&#xD;&#xA;&#xD;&#xA;A great conference for graphics is SIGGRAPH.&#xD;&#xA;&#xD;&#xA;Good ones for AI: AIIDE and T-CIAIG.&#xD;&#xA;&#xD;&#xA;If you don't have access to the conferences, you could always purchase the proceedings that have all presented papers and articles of interest within them.&#xD;&#xA;&#xD;&#xA;A fairly old resource for finding game development research topics is [Red3D][3]. It's fairly outdated and a lot of links are broken, but with some Googling of the research areas you should be able to find them again pretty quickly.&#xD;&#xA;&#xD;&#xA;Although not official (from an academic perspective), [GameDev.net][4] has a good few interesting articles on latest advances as does [GamaSutra][5].&#xD;&#xA;&#xD;&#xA;Alex J. Champandard runs [AIGameDev][6] and they have a lot of guest speakers, research students, articles, papers, etc. It's pretty comprehensive, but to really get the most out of it you need to be a Premium member which can be a bit pricy.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.aiwisdom.com&#xD;&#xA;  [2]: http://meta.gamedev.stackexchange.com/ads/ct/403?url=http://www.gdcvault.com/&#xD;&#xA;  [3]: http://www.red3d.com/cwr/games/&#xD;&#xA;  [4]: http://www.gamedev.net&#xD;&#xA;  [5]: http://www.gamasutra.com/&#xD;&#xA;  [6]: http://aigamedev.com" />
  <row Id="24998" PostHistoryTypeId="6" PostId="11616" RevisionGUID="20303844-01f5-40f1-a858-cc26d4fbebb0" CreationDate="2011-04-25T19:02:35.000" UserId="1156" Comment="edited tags" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;chess&gt;" />
  <row Id="24999" PostHistoryTypeId="2" PostId="11626" RevisionGUID="c40e5ef7-264f-4204-ad7c-21ea2decdf3e" CreationDate="2011-04-25T19:12:16.347" UserId="6937" Text="I would actually say unity is a very valid tool to accomplish this. You can create both 2.5d and full 2d games using unity. If you change the camera from perspective to orthogonal projection then you are eliminating the depth side of the rendering. Doing this, and using either textured 2d planes or gui textures, you can create a very detailed 2d game. As such, you are no longer limited by the engine to create 2d games. With that said, if you want to develop a full game before porting to IOS, unity is IMO the best route as it lets you develop and partially test without a mac. All other tools I've seen for this are mac only." />
  <row Id="25000" PostHistoryTypeId="2" PostId="11627" RevisionGUID="e9890c27-eedc-44eb-b1ac-20429684c9d8" CreationDate="2011-04-25T20:01:46.033" UserId="6938" Text="HLSL does not provide a function for invert but it does provide for transpose. So if your matrix is orthogonal you can just use transpose.  &#xD;&#xA;Also if you have scaling and is uniform you won't need the inverse transpose matrix. You can just use the world matrix to rotate your normal and then normalize it.  &#xD;&#xA;I apologize If I haven't understand your problem correctly. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25001" PostHistoryTypeId="2" PostId="11628" RevisionGUID="34b93fcd-b98d-4e1e-b2f8-02b7403248ab" CreationDate="2011-04-25T20:35:57.690" UserId="2734" Text="Right now, I'm planning a new FPS single-player Half-Life 2/Call of Duty: Black Ops/Crysis 2-like, and I'm trying to determine what game engine should I use. Right now, my team is me, as a programmer, and **only one** models/textures artist, so each model takes us a lot of time.&#xD;&#xA;&#xD;&#xA;I thought about: &#xD;&#xA;&#xD;&#xA; - Source Engine - because it has a lot of existing content I can use to write my game much more quickly. The main disadvantage of Source is that it lacks in the graphics area (especially in vegetation).&#xD;&#xA; - Unity - the ability to use C#, which is my favourite programming language. It is perfect when it comes to graphics, but it doesn't have so much existing content like Source.  Plus, it is cross platform.&#xD;&#xA;&#xD;&#xA;I also thought about some open source game engines, but most of them (Ogre3D, for example) lacks in development speed and some graphics capabilities.&#xD;&#xA;&#xD;&#xA;If there was some model/textures/sound repository (not necessarily free, but also not really expensive), I'd use Unity. &#xD;&#xA;&#xD;&#xA;UDK is not an option, as it doesn't give me access to native code and I'll need to use some libraries wrriten in C++. &#xD;&#xA;&#xD;&#xA;Are there any more advantages/disadvantages to each engine? Feel free to suggest new  game engines. Also, in your opinion, what game engine should I use? Do you know some content repository I can use?" />
  <row Id="25002" PostHistoryTypeId="1" PostId="11628" RevisionGUID="34b93fcd-b98d-4e1e-b2f8-02b7403248ab" CreationDate="2011-04-25T20:35:57.690" UserId="2734" Text="Choosing an engine for a new game" />
  <row Id="25003" PostHistoryTypeId="3" PostId="11628" RevisionGUID="34b93fcd-b98d-4e1e-b2f8-02b7403248ab" CreationDate="2011-04-25T20:35:57.690" UserId="2734" Text="&lt;engine&gt;&lt;unity&gt;&lt;valve&gt;" />
  <row Id="25004" PostHistoryTypeId="2" PostId="11629" RevisionGUID="62bee528-c49a-4f35-959c-cc4d6a238b41" CreationDate="2011-04-25T20:39:33.913" UserId="5957" Text="Don't - you'll have to do it for each vertex for a regular vertex shader and this is a massive waste of GPU time. Anything complex like this that can be pre-calculated should be pre-calculated." />
  <row Id="25005" PostHistoryTypeId="2" PostId="11630" RevisionGUID="777f0cb3-e81c-4d36-99fc-ab68c605ae7d" CreationDate="2011-04-25T20:46:55.900" UserId="6937" Text="It sounds like you know the pros and cons here. If it's between unity in source and it's just you, simplification is important for development time, and you want a large amount of support, Unity would be the choice I'de make. &#xD;&#xA;&#xD;&#xA;Unity does have an asset store to buy from by the way. Unity also lets you use c++ extensions so you can actually use c++ with your code, but again if it's just you, avoid it! I spent 2 months making a puzzle game with two other programmers with unity and we took every shortcut we could given our deadline. If we tried that project in source it would have taken a bit longer as we didn't have to manage our scene or any of the resources.&#xD;&#xA;&#xD;&#xA;I don't know your experience level, but if it leans on the side of beginner/intermediate or if you have no other help there's almost no choice here. In my experience, development time in source is much longer than in Unity." />
  <row Id="25006" PostHistoryTypeId="2" PostId="11631" RevisionGUID="3966b891-e86d-45e2-83cc-1a5bd53199ef" CreationDate="2011-04-25T20:59:30.703" UserId="5824" Text="Your first issue is that with your example of 3 classes and 5 rounds you can't make any selection of five comparisons where each of the three classes has an equal chance of winning given random choices by the user. That's because 5 rounds * 2 choices per round isn't a multiple of the number of classes.&#xD;&#xA;&#xD;&#xA;Unfortunately fixing that and making it fair means you can almost always end up with a tie. The only exception I can think of is with two classes and and odd number of rounds. Other than that I don't think there's any way to rig it so that ties are impossible without adding unlimited numbers of extra rounds, or biasing the selections you present to the user.&#xD;&#xA;&#xD;&#xA;Of course if the classes are significantly different and the number of rounds is high it's very unlikely that you'll actually get a tie. You could always just pick randomly between the tied classes if you need to pick a single winner." />
  <row Id="25007" PostHistoryTypeId="25" PostId="11628" RevisionGUID="3833011c-a90d-45f0-a026-644cf2a05655" CreationDate="2011-04-25T21:09:32.487" Comment="http://twitter.com/#!/StackGameDev/status/62624306009612288" />
  <row Id="25008" PostHistoryTypeId="2" PostId="11632" RevisionGUID="ebbce109-1022-46ba-bf65-906466075f60" CreationDate="2011-04-25T21:10:37.313" UserId="853" Text="I was wondering if someone has read both the:&#xD;&#xA;&#xD;&#xA;[iPhone 3D Programming][1]&#xD;&#xA;&#xD;&#xA;And&#xD;&#xA;&#xD;&#xA;[OpenGL ES 2.0][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/iPhone-Programming-Developing-Graphical-Applications/dp/0596804822/ref=sr_1_1?ie=UTF8&amp;qid=1303765699&amp;sr=8-1&#xD;&#xA;  [2]: http://www.amazon.com/OpenGL-ES-2-0-Programming-Guide/dp/0321502795/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1303765760&amp;sr=1-1&#xD;&#xA;&#xD;&#xA;books and have an opinion if one is better than the other? &#xD;&#xA;&#xD;&#xA;I'm basically wanting to get into doing 3D graphics on iOS including shaders." />
  <row Id="25009" PostHistoryTypeId="1" PostId="11632" RevisionGUID="ebbce109-1022-46ba-bf65-906466075f60" CreationDate="2011-04-25T21:10:37.313" UserId="853" Text="OpenGL ES on iOS Books" />
  <row Id="25010" PostHistoryTypeId="3" PostId="11632" RevisionGUID="ebbce109-1022-46ba-bf65-906466075f60" CreationDate="2011-04-25T21:10:37.313" UserId="853" Text="&lt;books&gt;" />
  <row Id="25011" PostHistoryTypeId="5" PostId="11618" RevisionGUID="4baba8c3-2a40-434d-90e8-679b823bacdd" CreationDate="2011-04-25T21:27:32.017" UserId="6395" Comment="added 304 characters in body" Text="In the next few weeks I will start a game for iOS, most of the action will happen in 2D but a 2D engine is not enough for our idea, therefore I'm doing a small research on available 3D engines for iOS written in Objective-C (we already looked on some engines written in C++).&#xD;&#xA;&lt;br /&gt; &lt;br /&gt;&#xD;&#xA;Do you know 3D engines written in Objective-C?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;I found this one http://nineveh.gl/ but is not yet ready :(.&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;**later edit**.......&lt;br /&gt;&#xD;&#xA;I did a research on the engines written in C++, they are nice and probably I will go with one of them, but if there is any good engine written in Objective-C, than I will go with it, because its a matter of taste and I like very much the obj-c language.&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="25012" PostHistoryTypeId="5" PostId="11618" RevisionGUID="181b6bae-836b-40e8-85a6-e6055e84a864" CreationDate="2011-04-25T21:35:53.557" UserId="6395" Comment="added 172 characters in body" Text="In the next few weeks I will start a game for iOS, most of the action will happen in 2D but a 2D engine is not enough for our idea, therefore I'm doing a small research on available 3D engines for iOS written in Objective-C (we already looked on some engines written in C++).&#xD;&#xA;&lt;br /&gt; &lt;br /&gt;&#xD;&#xA;Do you know 3D engines written in Objective-C?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;I found this one http://nineveh.gl/ but is not yet ready :(.&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;**later edit (1)**.......&lt;br /&gt;&#xD;&#xA;I did a research on the engines written in C++, they are nice and probably I will go with one of them, but if there is any good engine written in Objective-C, than I will go with it, because its a matter of taste and I like very much the obj-c language.&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;**later edit (2)**.......&lt;br /&gt;&#xD;&#xA;nice presentation/teaser about what I'm looking for http://www.slideshare.net/rsebbe/designing-an-objectivec-framework-about-3d&#xD;&#xA;&#xD;&#xA; " />
  <row Id="25013" PostHistoryTypeId="2" PostId="11633" RevisionGUID="e0b46dee-049c-4b7c-afe2-1e56dda762e3" CreationDate="2011-04-25T21:41:16.163" UserId="6946" Text="[Galaxy Engine][1] looks pretty solid. It's not just a 3D engine written in Objective-C, but the package also contains scene manager, mesh converter and dozen of other content-creation related tools. &#xD;&#xA;&#xD;&#xA;Also check out the [Oolong engine][2], it's mostly written in C++ and maintained by Wolfgang Engel of Rockstar Games fame.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/galaxyengine/&#xD;&#xA;  [2]: http://code.google.com/p/oolongengine/" />
  <row Id="25014" PostHistoryTypeId="16" PostId="11632" RevisionGUID="02341b3a-4890-4204-8a81-0b917341bad3" CreationDate="2011-04-25T21:42:22.913" UserId="51" />
  <row Id="25015" PostHistoryTypeId="2" PostId="11634" RevisionGUID="ecbd589b-3d0a-4ec7-bded-2f9a0dd5348a" CreationDate="2011-04-25T21:50:15.930" UserId="3056" Text="It seems that some games have managed to implement downsampled transparency, and presumably gained a significant performance boost. (Examples: Uncharted 2, Crysis 2) A while back I attempted to implement a form of this based off of [an article][1] in GPU Gems 3, but we found that it wasn't quite fast enough to be a win for us.&#xD;&#xA;&#xD;&#xA;I'm looking for information on other techniques of implementing downsampled transparency, especially targeting the PS3 and Xbox360.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch23.html" />
  <row Id="25016" PostHistoryTypeId="1" PostId="11634" RevisionGUID="ecbd589b-3d0a-4ec7-bded-2f9a0dd5348a" CreationDate="2011-04-25T21:50:15.930" UserId="3056" Text="What are some effective methods for implementing downsampled transparency?" />
  <row Id="25017" PostHistoryTypeId="3" PostId="11634" RevisionGUID="ecbd589b-3d0a-4ec7-bded-2f9a0dd5348a" CreationDate="2011-04-25T21:50:15.930" UserId="3056" Text="&lt;rendering&gt;&lt;xbox360&gt;&lt;playstation3&gt;&lt;transparency&gt;" />
  <row Id="25018" PostHistoryTypeId="2" PostId="11635" RevisionGUID="8d0c9316-aa51-4c35-99b0-17351c5a0c55" CreationDate="2011-04-25T21:52:00.880" UserId="6561" Text="I would take a look at [Garage Games Torque-3D][1] engine. They have a very good community, some great resources you can buy to use in your games as well, if aren't making your own content from scratch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com/products/torque-3d" />
  <row Id="25023" PostHistoryTypeId="25" PostId="11615" RevisionGUID="02630a31-a8fb-481b-a292-3f4b85080fd7" CreationDate="2011-04-26T00:09:33.113" Comment="http://twitter.com/#!/StackGameDev/status/62669606074056704" />
  <row Id="25024" PostHistoryTypeId="2" PostId="11637" RevisionGUID="97a63f16-12fc-411e-946f-ace6ef6ed492" CreationDate="2011-04-26T00:34:52.560" UserId="6950" Text="does anyone know of a good wp7 accelerometer sample of a ball rolling around on a screen" />
  <row Id="25025" PostHistoryTypeId="1" PostId="11637" RevisionGUID="97a63f16-12fc-411e-946f-ace6ef6ed492" CreationDate="2011-04-26T00:34:52.560" UserId="6950" Text="XNA / WP7 accelerometer sample / example ball rolling" />
  <row Id="25026" PostHistoryTypeId="3" PostId="11637" RevisionGUID="97a63f16-12fc-411e-946f-ace6ef6ed492" CreationDate="2011-04-26T00:34:52.560" UserId="6950" Text="&lt;xna&gt;&lt;windows-phone-7&gt;" />
  <row Id="25027" PostHistoryTypeId="2" PostId="11638" RevisionGUID="06e6b173-af20-45d5-9adb-9465a910f910" CreationDate="2011-04-26T00:40:36.720" UserId="6937" Text="Sort of what you want, been a while since I've used samples like this but it should work. http://faculty.washington.edu/ksung/pub/WP7/3.Accelerometer/Accelerometer.html&#xD;&#xA;&#xD;&#xA;Just googled &quot;wp7 accelerometer sample&quot;. I'de avoid copying the source though. Look more at what you logically want to do and look specifically at the API documentation for XNA to accomplish it. If you want to roll a ball, look up how to add torque to rigidbodies in XNA, then how to get the x and y values from the accelerometer. Apply those to the torque and there ya go!" />
  <row Id="25028" PostHistoryTypeId="2" PostId="11639" RevisionGUID="ddde9bf5-ca8c-4998-975c-05fb554a8d8f" CreationDate="2011-04-26T02:50:34.507" UserId="5497" Text="How Fixed is R? Would the Player notice if after the regular rounds of comparison, you ended the sequence with a series of direct comparisons of the tied classes?&#xD;&#xA;&#xD;&#xA;Let's say R is 10. After 10 rounds you have A and B which are tied. Can't you do an A vs B round to force the direct comparison?&#xD;&#xA;&#xD;&#xA;This will work better if R varies from time to time normally, so as to hide the occasions when you need a few extra rounds for tie-elimination." />
  <row Id="25029" PostHistoryTypeId="2" PostId="11640" RevisionGUID="5b87485b-88ed-4a5a-9d97-44c6dbfc0b28" CreationDate="2011-04-26T03:06:05.677" UserId="1263" Text="My current project, using Java and OpenGL, has a fairly standard overhead tilemap in the style of the Zelda games.&#xD;&#xA;&#xD;&#xA;I'd really like to add &quot;real&quot; grass to the grass tiles so that there are actually blades that can sway in the wind and maybe, if possible, react to the player's movement as well. I'm figuring that since this is only in 2D, a rather striking effect should be possible without much performance hit.&#xD;&#xA;&#xD;&#xA;What possible algorithms are there for rendering dynamic 2D grass? If possible, I'd like to keep the effect strictly 2D--i.e., I don't want to render actually 3D grass, as it would break the artistic design of the world." />
  <row Id="25030" PostHistoryTypeId="1" PostId="11640" RevisionGUID="5b87485b-88ed-4a5a-9d97-44c6dbfc0b28" CreationDate="2011-04-26T03:06:05.677" UserId="1263" Text="Rendering 2D grass" />
  <row Id="25031" PostHistoryTypeId="3" PostId="11640" RevisionGUID="5b87485b-88ed-4a5a-9d97-44c6dbfc0b28" CreationDate="2011-04-26T03:06:05.677" UserId="1263" Text="&lt;opengl&gt;&lt;2d&gt;&lt;graphics-programming&gt;" />
  <row Id="25032" PostHistoryTypeId="25" PostId="11637" RevisionGUID="7f6f368f-cb2f-41b9-914a-eca10dd6a1b8" CreationDate="2011-04-26T03:09:33.483" Comment="http://twitter.com/#!/StackGameDev/status/62714906532790273" />
  <row Id="25033" PostHistoryTypeId="2" PostId="11641" RevisionGUID="e7944242-048b-4496-9a15-cfadc510971a" CreationDate="2011-04-26T03:28:44.970" UserId="6937" Text="I would make an animation sprite map for the grass. This way you can apply a scene wide call (atleast all visible grass in the scene) to have them randomly go through their animation to make it look like the wind sparsely gusts through the scene. Just have a loopable animation setup for the grass and play them at different speeds and randomly to get the effect. You can also use this to interact with the player by determining which way the player is walking over the grass and play the animation in that direction. This is definitely a high level answer and would require a bit of figuring out to completely hash this idea out.&#xD;&#xA;&#xD;&#xA;You could even save on space if you want to. Have a middle position that the grass sits straight up. Have a blowing to the right animation. Then if you want it to blow to the left, smoothly move the animation towards the center and flip the sprite then play the same animation." />
  <row Id="25034" PostHistoryTypeId="2" PostId="11642" RevisionGUID="40f14503-0f3d-4ed5-82ca-9a5ef56a8a3b" CreationDate="2011-04-26T04:00:10.143" UserId="6952" Text="I'm having a problem with the way I designed my first simple game in C++.&#xD;&#xA;&#xD;&#xA;I have GameObject (abstract class) and ObjectA which inherits the update() and draw() methods from GameObject.&#xD;&#xA;&#xD;&#xA;My main loop contains a linked list of GameObject*, and while that list is not empty it cycles through it, calling update on each one.&#xD;&#xA;&#xD;&#xA;Up until this point, I thought the design was standard(?) and would work.&#xD;&#xA;&#xD;&#xA;However, when I call update on ObjectA() I run into two problems:&#xD;&#xA;&#xD;&#xA;- ObjectA can die which messes up the list, which in turn throws off the loop in main.&#xD;&#xA;- ObjectA can spawn more ObjectA's but these are local scope and the update() goes out of scope, creating problems in main's list of GameObjects.&#xD;&#xA;&#xD;&#xA;I think my design if alright, but I'm having such problems with segmentation faults that there must be something seriously wrong with at least one part of my implementation.  If anyone could point out any serious mistakes or simple examples of this being done (or even alternative designs) then I would greatly appreciate it!" />
  <row Id="25035" PostHistoryTypeId="1" PostId="11642" RevisionGUID="40f14503-0f3d-4ed5-82ca-9a5ef56a8a3b" CreationDate="2011-04-26T04:00:10.143" UserId="6952" Text="Game Object Design" />
  <row Id="25036" PostHistoryTypeId="3" PostId="11642" RevisionGUID="40f14503-0f3d-4ed5-82ca-9a5ef56a8a3b" CreationDate="2011-04-26T04:00:10.143" UserId="6952" Text="&lt;c++&gt;&lt;objects&gt;" />
  <row Id="25038" PostHistoryTypeId="2" PostId="11644" RevisionGUID="c09be59d-f49c-4d35-93b6-d2d5255de3d0" CreationDate="2011-04-26T04:42:21.600" UserId="51" Text="First off, &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4887/when-should-vector-list-be-used/4888#4888&quot;&gt;don't use linked lists&lt;/a&gt;.  &#xD;&#xA;&#xD;&#xA;Second, your design should work, in theory.  For the dying problem, an easy solution is to just have some kind of flag on your GameObject class that says whether or not the object is dead.  Just set it in your concrete classes' `update` method when appropriate.  Then after all of your updates are complete, remove the dead objects from the object list.&#xD;&#xA;&#xD;&#xA;So in theory something like this (excuse my C++ it's been a while):&#xD;&#xA;&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fn( &amp;GameObject::update ) );&#xD;&#xA;    remove_if( m_allEntites.begin(), m_allEntites.end(), mem_fn( &amp;GameObject::isDead ) );&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fn( &amp;GameObject::draw ) );&#xD;&#xA;&#xD;&#xA;Third, for your &quot;new game objects&quot; problem.  What you want to do is use `new` on the ObjectA objects you create.  If you can't modify the list while you're iterating over it, an easy solution is to create a temporary list (or vector, whatever) with the new objects you've created.  Then when you're done with `update`, add the new objects to the list of all objects.  A naive solution would just be that all GameObjects know about the class that contains them, but I wouldn't worry about the coupling that imposes at this point in time until you figure out the basics.  So in your class that contains the list of all objects, and modifying the above structure, you can do something like this:&#xD;&#xA;&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fn( &amp;GameObject::update ) );&#xD;&#xA;    m_allEntites.insert( m_allEntities.end(), m_newEntities.begin(), m_newEntites.end() );&#xD;&#xA;    m_newEntites.clear();&#xD;&#xA;    remove_if( m_allEntites.begin(), m_allEntites.end(), mem_fn( &amp;GameObject::isDead ) );&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fn( &amp;GameObject::draw ) );&#xD;&#xA;" />
  <row Id="25040" PostHistoryTypeId="5" PostId="11608" RevisionGUID="0d732569-bb67-477d-9f44-fd3e87c7ed80" CreationDate="2011-04-26T05:09:09.657" UserId="1198" Comment="added 3 characters in body" Text="So I'm following a tutorial: &#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb195026%28v=xnagamestudio.31%29.aspx#Y539 &#xD;&#xA;&#xD;&#xA;to create a way to pause the game I'm making. But I'm stuck because the code includes &quot;Simulate&quot; which is not explained in the tutorial. I understand what it supposed to do.&#xD;&#xA;&#xD;&#xA;It brings up an error about it doesn't exist - so my guess it that it needs to be created like a variable?&#xD;&#xA;&#xD;&#xA;Heres the code:&#xD;&#xA;     &#xD;&#xA;    if (!paused)&#xD;&#xA;    {&#xD;&#xA;        Simulate(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Could someone point me in the correct direction please? Thanks :)&#xD;&#xA;" />
  <row Id="25041" PostHistoryTypeId="25" PostId="11640" RevisionGUID="20e75f04-fb8b-496c-9fef-0c9d230609a6" CreationDate="2011-04-26T06:09:33.743" Comment="http://twitter.com/#!/StackGameDev/status/62760206735646721" />
  <row Id="25042" PostHistoryTypeId="5" PostId="11644" RevisionGUID="b78b59e8-2618-4706-a280-022f15e9f51d" CreationDate="2011-04-26T07:04:24.923" UserId="51" Comment="added 374 characters in body; added 145 characters in body" Text="First off, &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4887/when-should-vector-list-be-used/4888#4888&quot;&gt;don't use linked lists&lt;/a&gt;.  &#xD;&#xA;&#xD;&#xA;Second, your design should work, in theory.  For the dying problem, an easy solution is to just have some kind of flag on your GameObject class that says whether or not the object is dead.  Just set it in your concrete classes' `update` method when appropriate.  Then after all of your updates are complete, remove the dead objects from the object list.&#xD;&#xA;&#xD;&#xA;So in theory something like this (excuse my C++ it's been a while):&#xD;&#xA;&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fun( &amp;GameObject::update ) );&#xD;&#xA;    remove_if( m_allEntites.begin(), m_allEntites.end(), mem_fun( &amp;GameObject::isDead ) );&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fun( &amp;GameObject::draw ) );&#xD;&#xA;&#xD;&#xA;Third, for your &quot;new game objects&quot; problem.  What you want to do is use `new` on the ObjectA objects you create.  If you can't modify the list while you're iterating over it, an easy solution is to create a temporary list (or vector, whatever) with the new objects you've created.  Then when you're done with `update`, add the new objects to the list of all objects.  A naive solution would just be that all GameObjects know about the class that contains them, but I wouldn't worry about the coupling that imposes at this point in time until you figure out the basics.  So in your class that contains the list of all objects, and modifying the above structure, you can do something like this:&#xD;&#xA;&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fun( &amp;GameObject::update ) );&#xD;&#xA;    m_allEntites.insert( m_allEntities.end(), m_newEntities.begin(), m_newEntites.end() );&#xD;&#xA;    m_newEntites.clear();&#xD;&#xA;    remove_if( m_allEntites.begin(), m_allEntites.end(), mem_fun( &amp;GameObject::isDead ) );&#xD;&#xA;    for_each( m_allEntites.begin(), m_allEntites.end(), mem_fun( &amp;GameObject::draw ) );&#xD;&#xA;&#xD;&#xA;*Edit:* Just realized previous code would leak dead objects.  I'm used to using `ptr_vector` instead of standard `vector` to maintain strict ownership rules.  Using a standard vector you'd want to iterate over the list and `delete` dead objects.  A common pattern I've used in the past was to also set their pointer to `null` then do a `remove_if` on `null` objects.  Or you could do something fancy and keep GameObjects around in a bucket pattern to avoid allocations if that's the route you wanted to go down." />
  <row Id="25043" PostHistoryTypeId="2" PostId="11645" RevisionGUID="99717e2f-5fd2-4578-a31d-d8c1a943bdbf" CreationDate="2011-04-26T08:00:22.163" UserId="6932" Text="I like to follow the blog from the developers of the excellent Amnesia and Penumbra games: http://frictionalgames.blogspot.com/&#xD;&#xA;&#xD;&#xA;It contains study articles about games concepts, game industry, some making of and technical thoughts ([example][4]). They post once a week in an very good and easy to read English.&#xD;&#xA;&#xD;&#xA;  [4]: http://frictionalgames.blogspot.com/2010/11/tech-feature-terrain-textures.html" />
  <row Id="25044" PostHistoryTypeId="2" PostId="11646" RevisionGUID="10c73c14-9e29-449f-87f5-8e875560a627" CreationDate="2011-04-26T08:15:18.517" UserId="6957" Text="@Toji, the site the paper is on is a bit temperamental but it worked for me this morning. Failing that, if you have access to ACM/SIGGRAPH, it's hosted [here][1]. Strangely, it *was* also on the [IMG/PowerVR developer website][2] (free registration) but I can't seem to find the right section. :-(&#xD;&#xA;&#xD;&#xA;@bmcnet: PVRTC does not break the texture into blocks like, say, ETC or S3TC. FWIW, I did experiment with block-based textures but I couldn't find a way to pack enough data into self-contained blocks and still get the results I wanted. Instead, it's a bit more of 'global' texture compression system. It has 2 low resolution images which it bilinearly upscales to the target res, and then mixes these together on a texel-by-texel basis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://portal.acm.org/citation.cfm?id=844174.844187&amp;coll=DL&amp;dl=GUIDE&amp;CFID=19686367&amp;CFTOKEN=74181114&#xD;&#xA;  [2]: http://www.imgtec.com/powervr/insider/powervr-insider.asp" />
  <row Id="25045" PostHistoryTypeId="2" PostId="11647" RevisionGUID="02b14da4-e9f2-4d94-bb44-f0585e77b02d" CreationDate="2011-04-26T08:43:25.073" UserId="6946" Text="iPhone 3D programming is a better starter, it's written like a tutorial and in general is better suited for your game development needs. OpenGL ES 2.0 on the other hand goes quite near to the metal, it's more like OpenGL ES 2.0 reference on steroids.&#xD;&#xA;&#xD;&#xA;[iPhone 3D programming is freely available through O'Reillys OFP system][1], so you can buy the other one and eventually read both.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://iphone-3d-programming.labs.oreilly.com/" />
  <row Id="25046" PostHistoryTypeId="25" PostId="11642" RevisionGUID="c4a83f8e-a0b8-4d6f-aa5a-1822939c3762" CreationDate="2011-04-26T09:09:33.420" Comment="http://twitter.com/#!/StackGameDev/status/62805502886821889" />
  <row Id="25047" PostHistoryTypeId="2" PostId="11648" RevisionGUID="60e3d11b-228d-48db-bedd-6d4e07d5796c" CreationDate="2011-04-26T10:03:49.947" UserId="6440" Text="In my [previous question][1] I have asked about an effect on how to visualize light spheres. The question resulted in a very nice formulated answer which described pretty well how to achieve this by adding some fog to the scene and using some factor to weight different light samples on the rays from the camera to the scene.&#xD;&#xA;&#xD;&#xA;However, since performance was too bad when testing it on the Xbox when taking shadows in account (`texCUBElod` lookups seem to be expensive) in split-screen multiplayer, I wanted to solve the resulting integral (which is currently approximated by a [Riemann's sum][2]) analytically **without taking shadows into account**.&#xD;&#xA;&#xD;&#xA;![How the lights currently look][4]&#xD;&#xA;&#xD;&#xA;I could reduce the pixel shader code to some formula, but was unable to solve it. So, I've put up another [question][3] on the mathematics stackexchange. It was answered fast, but the responder could not come up with any way I could use to solve this in an efficient way.&#xD;&#xA;&#xD;&#xA;The question remains, how the performance could be increased without losing awesomeness of the lighting effect. (It does not have to be physically correct, so, if there are methods to increase performance but take away realism, I would like to hear about them.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10858/rendering-collections-of-light-sources&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Riemann_sum&#xD;&#xA;  [3]: http://math.stackexchange.com/questions/34299/integrating-ray-casting-equation/34401#34401&#xD;&#xA;  [4]: http://i.stack.imgur.com/M5Dtp.png" />
  <row Id="25048" PostHistoryTypeId="1" PostId="11648" RevisionGUID="60e3d11b-228d-48db-bedd-6d4e07d5796c" CreationDate="2011-04-26T10:03:49.947" UserId="6440" Text="Computing volumetric light effects analytically" />
  <row Id="25049" PostHistoryTypeId="3" PostId="11648" RevisionGUID="60e3d11b-228d-48db-bedd-6d4e07d5796c" CreationDate="2011-04-26T10:03:49.947" UserId="6440" Text="&lt;xna&gt;&lt;c#&gt;&lt;xbox360&gt;&lt;performance&gt;&lt;volumetric-light&gt;" />
  <row Id="25050" PostHistoryTypeId="5" PostId="11648" RevisionGUID="d929f2bc-0359-49cb-ab5e-c359d24551af" CreationDate="2011-04-26T10:09:08.370" UserId="6440" Comment="added 71 characters in body; deleted 6 characters in body" Text="In my [previous question][1] I have asked about an effect on how to visualize light spheres. The question resulted in a very nice formulated answer which described pretty well how to achieve this by adding some fog to the scene and using some factor to weight different light samples on the rays from the camera to the scene.&#xD;&#xA;&#xD;&#xA;However, since performance was too bad when testing it on the Xbox when taking shadows in account (`texCUBElod` lookups seem to be expensive) in split-screen multiplayer, I wanted to solve the resulting integral (which is currently approximated by a [Riemann's sum][2]) analytically **without taking shadows into account**.&#xD;&#xA;&#xD;&#xA;![How the lights currently look][4]&#xD;&#xA;&#xD;&#xA;I could reduce the pixel shader code to some formula, but was unable to solve it. So, I've put up another [question][3] on the mathematics stackexchange. It was answered fast, but the responder could not come up with any way I could use to solve this in an efficient way.&#xD;&#xA;&#xD;&#xA;The question remains, how the performance could be increased without losing awesomeness of the lighting effect. (It does not have to be physically correct, so, if there are methods to increase performance but take away realism, I would like to hear about them.)&#xD;&#xA;&#xD;&#xA;[Current pixel shader code][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10858/rendering-collections-of-light-sources&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Riemann_sum&#xD;&#xA;  [3]: http://math.stackexchange.com/questions/34299/integrating-ray-casting-equation/34401&#xD;&#xA;  [4]: http://i.stack.imgur.com/M5Dtp.png&#xD;&#xA;  [5]: http://pastebin.com/F5DqxqU1" />
  <row Id="25051" PostHistoryTypeId="4" PostId="11615" RevisionGUID="ba12508f-1eb9-4383-8fb0-9bfe23a0b009" CreationDate="2011-04-26T10:26:16.853" UserId="744" Comment="Narrow the question, making the answer correct." Text="What research areas exist in game programming?" />
  <row Id="25052" PostHistoryTypeId="6" PostId="11615" RevisionGUID="ba12508f-1eb9-4383-8fb0-9bfe23a0b009" CreationDate="2011-04-26T10:26:16.853" UserId="744" Comment="Narrow the question, making the answer correct." Text="&lt;programming&gt;&lt;resources&gt;&lt;academic-research&gt;" />
  <row Id="25053" PostHistoryTypeId="2" PostId="11649" RevisionGUID="0760ab4b-7595-43a8-aae8-77ff592c2c3c" CreationDate="2011-04-26T10:28:21.527" UserId="3794" Text="There is term called &quot;opacity correction&quot;. It is used for changing number of samples but also can be used for solving constant density analyticaly:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/4lt9T.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;\delta x is segment length, \delta x' is new segment length. So you can just define some segment length which is reference and it should provide same results. &#xD;&#xA;&#xD;&#xA;Source: real time volume graphics book." />
  <row Id="25054" PostHistoryTypeId="5" PostId="11649" RevisionGUID="cb6788d1-6c1a-4c72-88a3-bd9d67511bae" CreationDate="2011-04-26T10:42:43.537" UserId="3794" Comment="added 34 characters in body" Text="There is term called &quot;opacity correction&quot;. It enable changing number of samples  without changing final result, but also can be used for solving constant density analyticaly:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/4lt9T.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;\delta x is segment length, \delta x' is new segment length. So you can just define some segment length which is reference and it should provide same results(i hope) &#xD;&#xA;&#xD;&#xA;Source: real time volume graphics book." />
  <row Id="25055" PostHistoryTypeId="6" PostId="11632" RevisionGUID="e876c794-18b1-41aa-981e-e4d22c133d9b" CreationDate="2011-04-26T10:57:15.033" UserId="1156" Comment="edited tags" Text="&lt;3d&gt;&lt;opengl-es&gt;&lt;books&gt;&lt;ios&gt;" />
  <row Id="25056" PostHistoryTypeId="2" PostId="11650" RevisionGUID="3287cb40-22c0-4210-b568-76101462e44f" CreationDate="2011-04-26T11:31:41.450" UserId="6959" Text="Which data structure should be best used to store a pile of tiles from which a player can pick a random tile?" />
  <row Id="25057" PostHistoryTypeId="1" PostId="11650" RevisionGUID="3287cb40-22c0-4210-b568-76101462e44f" CreationDate="2011-04-26T11:31:41.450" UserId="6959" Text="Implementing a tile-based game" />
  <row Id="25058" PostHistoryTypeId="3" PostId="11650" RevisionGUID="3287cb40-22c0-4210-b568-76101462e44f" CreationDate="2011-04-26T11:31:41.450" UserId="6959" Text="&lt;c++&gt;&lt;tiles&gt;" />
  <row Id="25059" PostHistoryTypeId="2" PostId="11651" RevisionGUID="efa745cf-a424-4536-8a5a-bd1388f1a051" CreationDate="2011-04-26T11:50:51.557" UserId="1386" Text="I'd suggest any container that has [random access (wikipedia)][1], for example a plain array, vector, or deque.&#xD;&#xA;&#xD;&#xA;    int tiles[100];&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;    std::vector&lt;int&gt; tiles;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;*I have left a comment asking for more information, if more information is added I'll update this answer.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Random_access" />
  <row Id="25060" PostHistoryTypeId="6" PostId="11650" RevisionGUID="ff56c8e6-31a8-4553-a8f4-f4685a337d38" CreationDate="2011-04-26T11:51:56.280" UserId="2698" Comment="edited tags" Text="&lt;c++&gt;&lt;tiles&gt;&lt;data-structure&gt;" />
  <row Id="25061" PostHistoryTypeId="5" PostId="11651" RevisionGUID="52d1af91-7d2d-41d8-a5b8-14a5edff31a3" CreationDate="2011-04-26T12:09:09.450" UserId="1386" Comment="added 94 characters in body" Text="I'd suggest any container that has [random access (wikipedia)][1], for example a plain array, vector, or deque.&#xD;&#xA;&#xD;&#xA;    int tiles[100];&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;    std::vector&lt;int&gt; tiles;&#xD;&#xA;    &#xD;&#xA;This will allow you to select a random element without having to step through the container.&#xD;&#xA;&#xD;&#xA;*I have left a comment asking for more information, if more information is added I'll update this answer.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Random_access" />
  <row Id="25062" PostHistoryTypeId="25" PostId="11648" RevisionGUID="18f644c6-9944-44ce-a42d-f68a735d1687" CreationDate="2011-04-26T12:09:33.460" Comment="http://twitter.com/#!/StackGameDev/status/62850802011750400" />
  <row Id="25063" PostHistoryTypeId="5" PostId="11630" RevisionGUID="4a6c7786-af4b-4987-9451-f6457c56ef00" CreationDate="2011-04-26T12:59:18.267" UserId="6937" Comment="added 1 characters in body" Text="It sounds like you know the pros and cons here. If it's between unity and source and it's just you, simplification is important for development time, and you want a large amount of support, Unity would be the choice I'de make. &#xD;&#xA;&#xD;&#xA;Unity does have an asset store to buy from by the way. Unity also lets you use c++ extensions so you can actually use c++ with your code, but again if it's just you, avoid it! I spent 2 months making a puzzle game with two other programmers with unity and we took every shortcut we could given our deadline. If we tried that project in source it would have taken a bit longer as we didn't have to manage our scene or any of the resources.&#xD;&#xA;&#xD;&#xA;I don't know your experience level, but if it leans on the side of beginner/intermediate or if you have no other help there's almost no choice here. In my experience, development time in source is much longer than in Unity." />
  <row Id="25064" PostHistoryTypeId="2" PostId="11652" RevisionGUID="b957eeba-60b9-4f53-be6d-7139ee8372c1" CreationDate="2011-04-26T13:09:30.380" UserId="6961" Text="I am not a 3d developer but i want to lean 3ds max just for simple house building with 2-3 rooms. Actually i don't want to develop from scratch .&#xD;&#xA;&#xD;&#xA;What i really want to do is get the existing models of homes , rooms , hotels from the internet and add my name there or my photo there , just for fun .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;SO i want to know that how much time do u think it will take me to that sort of stuff.&#xD;&#xA;&#xD;&#xA;Its not my career but just hobby . If its going to take longer time , then i don't want to waste but i can get going in one week or so that will go good but i want to ask from experience developers&#xD;&#xA;&#xD;&#xA;thanks" />
  <row Id="25065" PostHistoryTypeId="1" PostId="11652" RevisionGUID="b957eeba-60b9-4f53-be6d-7139ee8372c1" CreationDate="2011-04-26T13:09:30.380" UserId="6961" Text="How much time it will take to learn 3ds Max" />
  <row Id="25066" PostHistoryTypeId="3" PostId="11652" RevisionGUID="b957eeba-60b9-4f53-be6d-7139ee8372c1" CreationDate="2011-04-26T13:09:30.380" UserId="6961" Text="&lt;3d-engines&gt;&lt;3dsmax&gt;" />
  <row Id="25067" PostHistoryTypeId="2" PostId="11653" RevisionGUID="55a2f8a8-3035-432f-81d6-b6c6e0793d54" CreationDate="2011-04-26T13:56:37.873" UserId="3599" Text="The problem is you need to learn more stuff about the general UI, and some basic 3D concepts. Only for that which you say, yes, a week if you are smart, dedicate time to it, etc. Two weeks I'd say. But uvmapping and texturing alone has its issues. Max has one of easiest GUIs for newcomers (more arguable if it being the most functional later on)&#xD;&#xA;&#xD;&#xA;For modeling, not texturing, Google Sketchup is really great and easy, but the problem is the mesh export.&#xD;&#xA;&#xD;&#xA;Another easy one for newcomers is Cinema4D. And a totally free one which would allow this mesh modifying matter, Blender." />
  <row Id="25068" PostHistoryTypeId="6" PostId="11652" RevisionGUID="169250ab-7bd1-4996-9273-0a760c7f8b4f" CreationDate="2011-04-26T14:28:31.030" UserId="2698" Comment="edited tags" Text="&lt;3dsmax&gt;" />
  <row Id="25069" PostHistoryTypeId="2" PostId="11654" RevisionGUID="e8fa5cd7-1bce-48fe-92df-cbd14f4b7c9e" CreationDate="2011-04-26T14:58:42.953" UserId="4082" Text="If you don't need to read many formats, consider writing your own loader code. I use libjpeg and libpng directly and they're quite easy to use. Both have very simple functions that essentially fetch a scanline of RGBA data, just put that into an array and then upload to OpenGL. Both have very useful and straightforward example programs.&#xD;&#xA;&#xD;&#xA;I have no experience with other formats, though. But to be honest, PNG+JPEG cover 100% of our needs (which aren't trivial nor hobbyist level - see &lt;http://www.mysterystudio.com&gt;)" />
  <row Id="25070" PostHistoryTypeId="5" PostId="1003" RevisionGUID="0c730602-e251-42ac-afa2-5ce82d61d417" CreationDate="2011-04-26T15:04:10.780" UserId="3588" Comment="Fixed Dijkstra's name, removed parentheticals, reformatted the body, changed a comment to a semicolon, removed the &quot;best&quot; from the title, added the language tag and generated the new Tower Defense tag! Whew! That's a lot. ♪" Text="I'm making a Tower Defense and I need a good pathing algorithm for it.  &#xD;&#xA;&#xD;&#xA;I have thought about Dijkstra but I need one that can be dynamic; it must be able to update itself when one edge is removed or added without a full recalculation.  &#xD;&#xA;&#xD;&#xA;I'm coding in C# if it helps." />
  <row Id="25071" PostHistoryTypeId="4" PostId="1003" RevisionGUID="0c730602-e251-42ac-afa2-5ce82d61d417" CreationDate="2011-04-26T15:04:10.780" UserId="3588" Comment="Fixed Dijkstra's name, removed parentheticals, reformatted the body, changed a comment to a semicolon, removed the &quot;best&quot; from the title, added the language tag and generated the new Tower Defense tag! Whew! That's a lot. ♪" Text="Dynamic pathing algorithm for tower defense game" />
  <row Id="25072" PostHistoryTypeId="6" PostId="1003" RevisionGUID="0c730602-e251-42ac-afa2-5ce82d61d417" CreationDate="2011-04-26T15:04:10.780" UserId="3588" Comment="Fixed Dijkstra's name, removed parentheticals, reformatted the body, changed a comment to a semicolon, removed the &quot;best&quot; from the title, added the language tag and generated the new Tower Defense tag! Whew! That's a lot. ♪" Text="&lt;c#&gt;&lt;algorithm&gt;&lt;path-finding&gt;&lt;tower-defense&gt;" />
  <row Id="25073" PostHistoryTypeId="24" PostId="1003" RevisionGUID="0c730602-e251-42ac-afa2-5ce82d61d417" CreationDate="2011-04-26T15:04:10.780" Comment="Proposed by 3588 approved by 51 edit id of 387" />
  <row Id="25074" PostHistoryTypeId="5" PostId="10921" RevisionGUID="319ac380-dc71-4570-a272-a4072d85062d" CreationDate="2011-04-26T15:04:25.727" UserId="3588" Comment="Altered title slightly, added another bullet list, and did some tiny spelling and grammar fixes near the end. Added the tower-defense, swapped movement for programming. I might want to revisit it when we later deal with timer tags, but for now, here goes. ♪" Text="We are four guys making a Tower Defense game as a project in first grade on a university. The game is going to be really simple!&#xD;&#xA;&#xD;&#xA; - Three different towers&#xD;&#xA; - Three different monsters&#xD;&#xA; - One map (maybe add some more if we have time)&#xD;&#xA;&#xD;&#xA;The game has to be object oriented.&#xD;&#xA;&#xD;&#xA;The class structure is as following&#xD;&#xA;&#xD;&#xA; - **Game** - Drawing of graphic, etc.&#xD;&#xA; - **Level** - Every level is an object of this class. Each level has a finite number of wave-objects (in a list)&#xD;&#xA; - **Wave** - Contains a list of monster-objects.&#xD;&#xA; - **Monster** - This is a superclass. We make subclasses for the different type of monsters&#xD;&#xA; - **Tower** - Superclass to the towers. There are subclasses for each type of tower.&#xD;&#xA;&#xD;&#xA;We are thinking about how to solve the problem that many objects have to do stuff, at the same time, e.g. move one pixel in one direction.&#xD;&#xA;&#xD;&#xA;What we came up with is the idea of implementing av class Timer, to control when objects do things. I am not sure this is the best way to do it. Could someone give some good ideas about how to solve the continious update case?" />
  <row Id="25075" PostHistoryTypeId="4" PostId="10921" RevisionGUID="319ac380-dc71-4570-a272-a4072d85062d" CreationDate="2011-04-26T15:04:25.727" UserId="3588" Comment="Altered title slightly, added another bullet list, and did some tiny spelling and grammar fixes near the end. Added the tower-defense, swapped movement for programming. I might want to revisit it when we later deal with timer tags, but for now, here goes. ♪" Text="Effective methods to continuously update movement in a tower defense game?" />
  <row Id="25076" PostHistoryTypeId="6" PostId="10921" RevisionGUID="319ac380-dc71-4570-a272-a4072d85062d" CreationDate="2011-04-26T15:04:25.727" UserId="3588" Comment="Altered title slightly, added another bullet list, and did some tiny spelling and grammar fixes near the end. Added the tower-defense, swapped movement for programming. I might want to revisit it when we later deal with timer tags, but for now, here goes. ♪" Text="&lt;programming&gt;&lt;java&gt;&lt;timer&gt;&lt;tower-defense&gt;" />
  <row Id="25077" PostHistoryTypeId="24" PostId="10921" RevisionGUID="319ac380-dc71-4570-a272-a4072d85062d" CreationDate="2011-04-26T15:04:25.727" Comment="Proposed by 3588 approved by 51 edit id of 389" />
  <row Id="25078" PostHistoryTypeId="5" PostId="1751" RevisionGUID="377b068f-a879-4bc7-9e80-31ff3eb73207" CreationDate="2011-04-26T15:04:32.247" UserId="3588" Comment="Added the TD tag, and also fixed up the question body some degree. Mostly spelling, some grammar fixes, and converted the last element to a bullet list. ♪" Text="I'm making a Tower Defense game in Flash with no predefined path.&#xD;&#xA;&#xD;&#xA;Although my grid is 40x40 (small?), A* is struggling when recalculating every time. So I made my own modification to ease the recalculation and the touched cell count dropped to around 900 (when modifying near the root). It still freezes for a very short, but detectable, amount of time when a new tower is placed.&#xD;&#xA;&#xD;&#xA;Is this an implementation problem, or is 40x40 just too much?  &#xD;&#xA;&#xD;&#xA;&lt;b&gt;Edit:&lt;/b&gt;  &#xD;&#xA;&#xD;&#xA;The structure of my code:&#xD;&#xA;&#xD;&#xA; - All the data is saved in 2d array of cells.  &#xD;&#xA; - Each cell contains its parent in path direction (1-8 clockwise) and bitwise encoded array of its children in path (every bit represents a child).  &#xD;&#xA; - The search is performed by A* with the estimate of euclidian distance." />
  <row Id="25079" PostHistoryTypeId="6" PostId="1751" RevisionGUID="377b068f-a879-4bc7-9e80-31ff3eb73207" CreationDate="2011-04-26T15:04:32.247" UserId="3588" Comment="Added the TD tag, and also fixed up the question body some degree. Mostly spelling, some grammar fixes, and converted the last element to a bullet list. ♪" Text="&lt;flash&gt;&lt;algorithm&gt;&lt;path-finding&gt;&lt;tower-defense&gt;" />
  <row Id="25080" PostHistoryTypeId="24" PostId="1751" RevisionGUID="377b068f-a879-4bc7-9e80-31ff3eb73207" CreationDate="2011-04-26T15:04:32.247" Comment="Proposed by 3588 approved by 51 edit id of 388" />
  <row Id="25081" PostHistoryTypeId="25" PostId="11652" RevisionGUID="8a5cf0b7-1537-4b8b-aec8-7f8c0d9b4286" CreationDate="2011-04-26T15:09:34.220" Comment="http://twitter.com/#!/StackGameDev/status/62896104060092416" />
  <row Id="25082" PostHistoryTypeId="2" PostId="11655" RevisionGUID="6f41ba0c-cd73-4b32-9cc4-7054b896dd19" CreationDate="2011-04-26T16:05:33.487" UserId="6588" Text="I would guess that your slowdown is because you are calculating a path for all characters simultaneously. Calculating a path for one character is fast but if there are two dozen characters in the scene then that can bog down.&#xD;&#xA;&#xD;&#xA;Instead you should spread out the load over a few frames. Stagger your AI updates so different characters update their path on different frames. It would be really noticeable if a character didn't react until a second later, but just one frame is not going to cause bad reactions." />
  <row Id="25083" PostHistoryTypeId="5" PostId="11646" RevisionGUID="1f81010a-1367-499c-af00-ed1d275d982d" CreationDate="2011-04-26T16:07:15.110" UserId="6957" Comment="added 44 characters in body" Text="@Toji, the site the paper is on is a bit temperamental but it worked for me this morning. Failing that, if you have access to ACM/SIGGRAPH, it's hosted [here][1]. Strangely, it *was* also on the IMG/PowerVR developer website (free registration) but I can't seem to find the right section. :-(&#xD;&#xA;&#xD;&#xA;[UPDATE] It is still on the IMG site [here][3][/UPDATE]&#xD;&#xA;&#xD;&#xA;@bmcnet: PVRTC does not break the texture into blocks like, say, ETC or S3TC. FWIW, I did experiment with block-based textures but I couldn't find a way to pack enough data into self-contained blocks and still get the results I wanted. Instead, it's a bit more of 'global' texture compression system. It has 2 low resolution images which it bilinearly upscales to the target res, and then mixes these together on a texel-by-texel basis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://portal.acm.org/citation.cfm?id=844174.844187&amp;coll=DL&amp;dl=GUIDE&amp;CFID=19686367&amp;CFTOKEN=74181114&#xD;&#xA;  [3]: http://www.imgtec.com/downloads.asp#WhitePapers" />
  <row Id="25084" PostHistoryTypeId="2" PostId="11656" RevisionGUID="7b5a7d93-64b7-409c-8a56-e674bdd0db50" CreationDate="2011-04-26T16:08:35.513" UserId="6963" Text="I would like to implement free-running as popularized by Assassin's Creed, albeit in 2D.&#xD;&#xA;What are some specific techniques or algorithms that I can use to achieve free-running in 2D without having to reinvent everything?&#xD;&#xA;&#xD;&#xA;I tried to Google for resources, but couldn't really find any leads (no surprise there). Ideally, I'd like to know how did Assassin's Creed did it.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="25085" PostHistoryTypeId="1" PostId="11656" RevisionGUID="7b5a7d93-64b7-409c-8a56-e674bdd0db50" CreationDate="2011-04-26T16:08:35.513" UserId="6963" Text="I want to implement free-running movement (like Assassin's Creed) in 2D. What to do?" />
  <row Id="25086" PostHistoryTypeId="3" PostId="11656" RevisionGUID="7b5a7d93-64b7-409c-8a56-e674bdd0db50" CreationDate="2011-04-26T16:08:35.513" UserId="6963" Text="&lt;2d&gt;&lt;free&gt;" />
  <row Id="25087" PostHistoryTypeId="5" PostId="11656" RevisionGUID="70ba157f-0aec-4441-a5cd-e091b52b899b" CreationDate="2011-04-26T16:12:33.657" UserId="20" Comment="changed tags, removed thanks" Text="I would like to implement free-running as popularized by Assassin's Creed, albeit in 2D.&#xD;&#xA;What are some specific techniques or algorithms that I can use to achieve free-running in 2D without having to reinvent everything?&#xD;&#xA;&#xD;&#xA;I tried to Google for resources, but couldn't really find any leads (no surprise there). Ideally, I'd like to know how did Assassin's Creed did it." />
  <row Id="25088" PostHistoryTypeId="6" PostId="11656" RevisionGUID="70ba157f-0aec-4441-a5cd-e091b52b899b" CreationDate="2011-04-26T16:12:33.657" UserId="20" Comment="changed tags, removed thanks" Text="&lt;2d&gt;&lt;movement&gt;" />
  <row Id="25089" PostHistoryTypeId="2" PostId="11657" RevisionGUID="63d720b5-3ba6-4549-a9dc-62927b301713" CreationDate="2011-04-26T16:16:02.433" UserId="6963" Text="The solution is to iterate in reverse from back to front.&#xD;&#xA;That way, if you:&#xD;&#xA;1. Add things to the end of the list, it won't get iterated upon&#xD;&#xA;2. The currently-iterated thing dies, the loop can still continue as normal&#xD;&#xA;&#xD;&#xA;If I were you, I'd use a vector class and iterate backwards using numeric indices.&#xD;&#xA;(e.g. for int i = things.size() - 1; i &gt;= 0; -- i)" />
  <row Id="25091" PostHistoryTypeId="2" PostId="11658" RevisionGUID="ce721aae-be80-47a5-b00a-f9591f34afe6" CreationDate="2011-04-26T17:05:13.680" UserId="1868" Text="iPhone 3D Programming covers both ES 1.1 and ES 2.0. I found that slightly confusing when going through examples but it is up to your preference whether you are interested in 1.1 as well. " />
  <row Id="25095" PostHistoryTypeId="2" PostId="11660" RevisionGUID="a99c5319-0f80-4c8b-9dc4-d5e1866f4dd8" CreationDate="2011-04-26T17:35:04.467" UserId="6964" Text="General question. My company developed a custom software for simulating combat scenarios using the Unreal 3D Engine (2003).  It currently runs on XP-based Dell system. Sometime in the Fall Dell is going to stop supplying XP systems. So we need to port it over to a Windows 7 environment.&#xD;&#xA;&#xD;&#xA;However, we expect to run into compatibility issues that could be expensive to resolve.&#xD;&#xA;&#xD;&#xA;Couple questions:&#xD;&#xA;&#xD;&#xA;(1) What kind of issues can we anticipate running the software on a Windows 7 environment?&#xD;&#xA;&#xD;&#xA;(2) Are there any solutions to having to fully upgrade the SW to run on Windows 7?  For example, is there any way we can run the software on a XP-based virtual OS?" />
  <row Id="25096" PostHistoryTypeId="1" PostId="11660" RevisionGUID="a99c5319-0f80-4c8b-9dc4-d5e1866f4dd8" CreationDate="2011-04-26T17:35:04.467" UserId="6964" Text="Running Unreal 3D Engine (2003) on Windows 7..." />
  <row Id="25097" PostHistoryTypeId="3" PostId="11660" RevisionGUID="a99c5319-0f80-4c8b-9dc4-d5e1866f4dd8" CreationDate="2011-04-26T17:35:04.467" UserId="6964" Text="&lt;windows&gt;&lt;unreal&gt;&lt;compatibility&gt;" />
  <row Id="25098" PostHistoryTypeId="2" PostId="11661" RevisionGUID="c1828f04-b8ae-41ff-bf92-b824f56ff2a6" CreationDate="2011-04-26T18:00:13.483" UserId="962" Text="I don't thinks there should be any issues with it running on Windows 7. I have played every version of Unreal on my Windows 7 desktop.&#xD;&#xA;&#xD;&#xA;Windows 7 does require more RAM than Windows XP, so you should take that into account when ordering the computers, as if you have too little ram, the game's performance might not be as high.&#xD;&#xA;&#xD;&#xA;I do not know what you have specifically done to the engine in your simulation, but you really just should test this out on Windows 7 machine. You really should be able to find a machine that has Windows 7 on it to test." />
  <row Id="25099" PostHistoryTypeId="2" PostId="11662" RevisionGUID="4aad9a0f-7a3e-476f-a6c6-d9b75b3b63a7" CreationDate="2011-04-26T18:00:42.370" UserId="4410" Text="Microsoft makes a lot of effort to not break compatibility between different versions of their operating systems. Windows 7 is widely available and cheap to purchase, the best thing you can do is buy a copy, install it, then see what if anything is broken, then attempt to fix it. If nothings broken, you've nothing to worry about.&#xD;&#xA;&#xD;&#xA;You could always purchase copies of XP and install them onto the new PC's?" />
  <row Id="25101" PostHistoryTypeId="25" PostId="11660" RevisionGUID="14f398d4-1872-482e-907c-f54745c66d4d" CreationDate="2011-04-26T18:09:35.173" Comment="http://twitter.com/#!/StackGameDev/status/62941405491892224" />
  <row Id="25102" PostHistoryTypeId="2" PostId="11663" RevisionGUID="1be08bdb-9969-40be-a05e-ce7eba20d374" CreationDate="2011-04-26T18:24:15.733" UserId="2229" Text="say I develop a game for mobile platform running **OpenGL ES 2.0**. I have done 2D part, and now I wish to import some 3D objects.&#xD;&#xA;&#xD;&#xA;*The imported 3D objects must contain the following:*&#xD;&#xA;&#xD;&#xA; - **Vertices positions**&#xD;&#xA; - **Normals**&#xD;&#xA; - **UVs**&#xD;&#xA; - **Texturing information**&#xD;&#xA; - **Animation information**&#xD;&#xA; - **Collision mesh**&#xD;&#xA; - **Maybe some other things...**&#xD;&#xA;&#xD;&#xA;I am aware, that I could and (maybe should) create my own file format that brings these data from 3D authoring application (3ds Max, Maya, Softimage) into the game. &#xD;&#xA;&#xD;&#xA;However, doing so from scratch is going to be really be a lot of work. Therefore, is there any available solution/middleware, that will let me import 3d meshes into my game, ready to use?&#xD;&#xA;&#xD;&#xA;*The solution/middleware should be:*&#xD;&#xA;&#xD;&#xA; - **easy to use**&#xD;&#xA; - **easy to port**&#xD;&#xA; - **efficient**&#xD;&#xA; - **not consuming too much memory with unnecessary things**&#xD;&#xA; - **containing all the above mentioned features plus things I haven't considered yet**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Programming language is: Visual C++.* &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Currently, I develop under *Windows 7, Visual Studio 2010, and OpenGL ES 2.0 emulator.* &#xD;&#xA;Later, the product will be ported to *iOS and possibly Android.*&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="25103" PostHistoryTypeId="1" PostId="11663" RevisionGUID="1be08bdb-9969-40be-a05e-ce7eba20d374" CreationDate="2011-04-26T18:24:15.733" UserId="2229" Text="Effective Way to Bring 3D Meshes into OpenGL ES 2.0." />
  <row Id="25104" PostHistoryTypeId="3" PostId="11663" RevisionGUID="1be08bdb-9969-40be-a05e-ce7eba20d374" CreationDate="2011-04-26T18:24:15.733" UserId="2229" Text="&lt;game-design&gt;&lt;opengl&gt;&lt;c++&gt;&lt;opengl-es&gt;" />
  <row Id="25105" PostHistoryTypeId="2" PostId="11664" RevisionGUID="73adb129-0d94-4293-9409-5a816e429273" CreationDate="2011-04-26T18:30:47.583" UserId="6965" Text="OpenGL! Yes I'm openly disagreeing with everyone on this board so far.&#xD;&#xA;&#xD;&#xA;OGRE is a mess. The learning curve is steep. Yeah they've got some nice tutorials, but stepping outside the bounds of the tutorials and doing your own thing is VERY difficult. I'd expect to spend a three weeks before you can get OGRE set up and working, work through the tutorials, and figure out what to do next. There's nothing about OGRE that is THAT much better or simpler than OpenGL. If you are a good C programmer as you've claimed, and you understand your pointers/arrays/functions, OpenGL will be just as easy, if not easier.&#xD;&#xA;&#xD;&#xA;That's why I strongly recommend starting with OpenGL. OpenGL will force you to learn all of the fundamentals of graphics. It's a lot more interesting as you'll actually come to realize what they heck is going on in the background. And YES start with NeHe's tutorials. Yeah they are 1.x which is very outdated (this is for you, Ranieri), but jumping into OpenGL 4.x is too steep a learning curve.&#xD;&#xA;&#xD;&#xA;Start out with the immediate mode in 1.x (glBegin, glEnd), then learn about Vertex Arrays. If you want, play with display lists just to learn. Then move towards vertex buffer objects. Then learn about shaders. Each of these transitions are very easy, and there are plenty of great tutorials online. VBO's are in the core of 4.1, so by the time you make it there, you are no longer learning outdated material, and it's a lot easier to get there by starting with the 1.x stuff. &#xD;&#xA;&#xD;&#xA;Also, if you ever want a game development career, nobody is going to hire you because you can make a cube spin in some off the shelf library. They are going to hire you because you understand what is going on at the lowest level possible and you can make design decisions based on that valuable knowledge.&#xD;&#xA;&#xD;&#xA;References: I was where you were. I spent a month on OGRE, a week trying out Irrlicht, a week trying out Horde3d, two days playing with DirectX, and a month playing with OpenGL. After a month with OGRE I could barely go beyond the scope of the tutorials. After a month with OpenGL I had a character running around a minecraftian world, rendering 260,000 textured cubes per frame with 700+ framerate." />
  <row Id="25106" PostHistoryTypeId="5" PostId="11663" RevisionGUID="17cfaf5b-83a2-4b9a-a3b0-bfde5572b273" CreationDate="2011-04-26T19:02:25.920" UserId="51" Comment="edited tags" Text="Say I develop a game for mobile platform running OpenGL ES 2.0. I have done 2D part, and now I wish to import some 3D objects.&#xD;&#xA;&#xD;&#xA;The imported 3D objects must contain the following:&#xD;&#xA;&#xD;&#xA; - Vertices positions&#xD;&#xA; - Normals&#xD;&#xA; - UVs&#xD;&#xA; - Texturing information&#xD;&#xA; - Animation information&#xD;&#xA; - Collision mesh&#xD;&#xA; - Maybe some other things...&#xD;&#xA;&#xD;&#xA;I am aware, that I could and (maybe should) create my own file format that brings these data from 3D authoring application (3ds Max, Maya, Softimage) into the game. &#xD;&#xA;&#xD;&#xA;However, doing so from scratch is going to be really be a lot of work. Therefore, is there any available solution/middleware, that will let me import 3d meshes into my game, ready to use?&#xD;&#xA;&#xD;&#xA;The solution/middleware should be:&#xD;&#xA;&#xD;&#xA; - easy to use&#xD;&#xA; - easy to port&#xD;&#xA; - efficient&#xD;&#xA; - not consuming too much memory with unnecessary things&#xD;&#xA; - containing all the above mentioned features plus things I haven't considered yet&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Programming language is: C++.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Currently, I'm developing under Windows 7, Visual Studio 2010, and OpenGL ES 2.0 emulator.&#xD;&#xA;&#xD;&#xA;Later, the product will be ported to iOS and possibly Android.&#xD;&#xA;" />
  <row Id="25107" PostHistoryTypeId="2" PostId="11665" RevisionGUID="9dc632d3-2e66-441d-a179-5aaebfb53de5" CreationDate="2011-04-26T19:03:22.673" UserId="51" Text="Try &lt;a href=&quot;http://assimp.sourceforge.net/index.html&quot;&gt;AssImp&lt;/a&gt;.  It's an open C++ model loader that supports a bunch of different formats." />
  <row Id="25108" PostHistoryTypeId="6" PostId="11663" RevisionGUID="17cfaf5b-83a2-4b9a-a3b0-bfde5572b273" CreationDate="2011-04-26T19:02:25.920" UserId="51" Comment="edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;opengl-es&gt;&lt;models&gt;&lt;importing&gt;" />
  <row Id="25109" PostHistoryTypeId="5" PostId="11476" RevisionGUID="0c93b4e0-7617-4f7f-951e-77299d4cf300" CreationDate="2011-04-26T19:14:47.903" UserId="189" Comment="Nehe should be discouraged until they update." Text="ORGE is indeed a wrapper for OpenGL, however the idea of such a wrapper is that you don't have to concern yourself with the intricacies of OpenGL. It will of course help to know a bit about OpenGL, but ORGE will hide a lot of the ugly details for you.&#xD;&#xA;&#xD;&#xA;I would say that Ogre is arguably easier to learn as opposed to OpenGL, or at least it will get you interesting results faster. Of course it totally depends on what you would like to do to asses if it's worth learning OpenGL.&#xD;&#xA;&#xD;&#xA;About OpenGL tutorials, yes most of them are pretty outdated, however the spec hasn't been moving forward really fast so a lot of those old tutorials still apply to most of OpenGL.&#xD;&#xA;&#xD;&#xA;A few of my favourites:&#xD;&#xA;&#xD;&#xA; - http://www.falloutsoftware.com/tutorials/gl/gl8.htm (7 years old but the theory is still very solid!)&#xD;&#xA;&#xD;&#xA; - &lt;strike&gt;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=11&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA; - &lt;strike&gt;Or actually all of Nehe's tutorials http://nehe.gamedev.net/&lt;/strike&gt; (see below comments)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25110" PostHistoryTypeId="5" PostId="11473" RevisionGUID="1db08a97-2fcb-47f6-b424-737c035ab32b" CreationDate="2011-04-26T19:33:29.687" UserId="962" Comment="deleted 36 characters in body" Text="I am interested in getting into game development and posses good C/C++ programming skills. I have tried OGRE before, and I am curious whether I should learn either OGRE or OpenGL as a starting point.&#xD;&#xA;&#xD;&#xA;From my understanding, OGRE is a wrapper for OpenGL and DirectX. So, supposed that I learn OGRE, do I still need to learn OpenGL as well to develop a game?&#xD;&#xA;&#xD;&#xA;Also, can someone points me good tutorial for OpenGL? I found that OGRE is well documented (it's even come with the distribution!) but for OpenGL, most of the tutorials I came over are outdated." />
  <row Id="25111" PostHistoryTypeId="6" PostId="418" RevisionGUID="2d94ee54-c503-4ab0-a86d-b90225237ece" CreationDate="2011-04-26T20:39:49.620" UserId="6968" Comment="added mobile tag" Text="&lt;android&gt;&lt;lua&gt;&lt;mobile&gt;&lt;porting&gt;" />
  <row Id="25112" PostHistoryTypeId="24" PostId="418" RevisionGUID="2d94ee54-c503-4ab0-a86d-b90225237ece" CreationDate="2011-04-26T20:39:49.620" Comment="Proposed by 6968 approved by 51 edit id of 390" />
  <row Id="25113" PostHistoryTypeId="2" PostId="11666" RevisionGUID="bf5d82bb-2602-4f35-8ebe-6477c1f3aa37" CreationDate="2011-04-26T20:41:36.630" UserId="6588" Text="I would argue neither is best for a beginner, but then &quot;best&quot; is a relative term that depends what exactly you are looking to gain. For example, if what you're wanting is to learn 3D graphics programming in order to gain skills that you could use to get a job as a 3D graphics programmer for a games company then those choices make sense. With this goal you might also look at DirectX.&#xD;&#xA;&#xD;&#xA;If however you have any other goal in mind then I would recommend looking at other options. For starters, while from your question one would assume you want to be involved in game development as a programmer, you didn't actually specify that. Both writing a graphics engine in OpenGL and building on top of Ogre are definitely for hard-core programmers." />
  <row Id="25114" PostHistoryTypeId="25" PostId="11663" RevisionGUID="8f846908-4cbb-4a64-9d5e-ebd07e515cef" CreationDate="2011-04-26T21:09:36.573" Comment="http://twitter.com/#!/StackGameDev/status/62986709347995649" />
  <row Id="25115" PostHistoryTypeId="5" PostId="11571" RevisionGUID="a1685a17-5e37-4a8f-ab5f-1a58d719e02b" CreationDate="2011-04-26T22:20:12.413" UserId="5021" Comment="deleted 9 characters in body; deleted 42 characters in body; deleted 1 characters in body; added 13 characters in body; added 29 characters in body" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;They describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand exactly how to look up an appropriate value in the lookup table they describe.&#xD;&#xA;&#xD;&#xA;A value is accessed with (N_a . N_a, N_a . H).&#xD;&#xA;&#xD;&#xA;My specular light for example, is computed with:&#xD;&#xA;&#xD;&#xA;			result.Specular += baseIntensity * SpecularColor * &#xD;&#xA;				pow(max(0, dot(H,N)), SpecularExponent);&#xD;&#xA;&#xD;&#xA;The `H` is the same as the `H` in the paper.&#xD;&#xA;`SpecularExponent` is the `s` in the paper.&#xD;&#xA;The `N` is the vector that results from looking up a normal in the normal map (which is already normalized) and then transforming that normal into world space.&#xD;&#xA;&#xD;&#xA;What is `N_a` then?" />
  <row Id="25116" PostHistoryTypeId="5" PostId="11571" RevisionGUID="c83b2a7f-3ee6-4308-a84c-3b58ece12565" CreationDate="2011-04-26T22:32:38.467" UserId="5021" Comment="added 321 characters in body; added 25 characters in body" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;They describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand exactly how to look up an appropriate value in the lookup table they describe.&#xD;&#xA;&#xD;&#xA;A value is accessed with (N_a . N_a, N_a . H).&#xD;&#xA;&#xD;&#xA;My specular light for example, is computed with:&#xD;&#xA;&#xD;&#xA;			result.Specular += baseIntensity * SpecularColor * &#xD;&#xA;				pow(max(0, dot(H,N)), SpecularExponent);&#xD;&#xA;&#xD;&#xA;The `H` is the same as the `H` in the paper.&#xD;&#xA;`SpecularExponent` is the `s` in the paper.&#xD;&#xA;The `N` is the vector that results from looking up a normal in the normal map (which is already normalized) and then transforming that normal into world space.&#xD;&#xA;&#xD;&#xA;What is `N_a` then?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;After seeing DeadMG's answer, I think that N_a is just the normal in the normal map. This is possible because this method of antialiasing is based on the guassian distribution of normals in the normal map. Does this mean then that a lookup table is required for each normal map, as well as for each specular exponent?" />
  <row Id="25117" PostHistoryTypeId="5" PostId="11571" RevisionGUID="46bb8f5f-582d-431a-8bc4-ff0e6f2822ec" CreationDate="2011-04-26T23:23:56.357" UserId="5021" Comment="deleted 30 characters in body" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;They describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand exactly how to look up an appropriate value in the lookup table they describe.&#xD;&#xA;&#xD;&#xA;A value is accessed with (N_a . N_a, N_a . H).&#xD;&#xA;&#xD;&#xA;My specular light for example, is computed with:&#xD;&#xA;&#xD;&#xA;			result.Specular += baseIntensity * SpecularColor * &#xD;&#xA;				pow(max(0, dot(H,N)), SpecularExponent);&#xD;&#xA;&#xD;&#xA;The `H` is the same as the `H` in the paper.&#xD;&#xA;`SpecularExponent` is the `s` in the paper.&#xD;&#xA;The `N` is the vector that results from looking up a normal in the normal map (which is already normalized) and then transforming that normal into world space.&#xD;&#xA;&#xD;&#xA;What is `N_a` then?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;After seeing DeadMG's answer, I thought perhaps N_a is just the normal in the normal map before transformation into world space. However, this can't be, as this wouldn't take into account the normal after transformation into world space. So I'm still not sure what N_a is supposed to be." />
  <row Id="25118" PostHistoryTypeId="5" PostId="11571" RevisionGUID="f9ba000c-58b2-447e-bb4b-39694bc588e0" CreationDate="2011-04-26T23:48:02.660" UserId="5021" Comment="added 620 characters in body; deleted 316 characters in body" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;They describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand exactly how to look up an appropriate value in the lookup table they describe.&#xD;&#xA;&#xD;&#xA;A value is accessed with (N_a . N_a, N_a . H).&#xD;&#xA;&#xD;&#xA;My specular light for example, is computed with:&#xD;&#xA;&#xD;&#xA;			result.Specular += baseIntensity * SpecularColor * &#xD;&#xA;				pow(max(0, dot(H,N)), SpecularExponent);&#xD;&#xA;&#xD;&#xA;The `H` is the same as the `H` in the paper.&#xD;&#xA;`SpecularExponent` is the `s` in the paper.&#xD;&#xA;The `N` is the vector that results from looking up a normal in the normal map (which is already normalized) and then transforming that normal into world space.&#xD;&#xA;&#xD;&#xA;What is `N_a` then?&#xD;&#xA;&#xD;&#xA;It seems that the lookup table is constructed by taking all of the normals (N_a) in a normal map, and then taking all (or many) of the values that H can take, and forming a table from these according to the formula they provide.&#xD;&#xA;&#xD;&#xA;However, this doesn't make sense to me, how is the normal that is transformed into world space taken into account in the lookup table then?&#xD;&#xA;&#xD;&#xA;That is, the normal in the normal map is rotated to be on the mesh that the normal map is being applied to. So this new rotated normal is what we use to calculate the specular exponent -- how does this fit into the use of the lookup texture?" />
  <row Id="25119" PostHistoryTypeId="5" PostId="11571" RevisionGUID="ab90e19a-5304-438c-aa53-7fa1d1a11e58" CreationDate="2011-04-26T23:53:51.280" UserId="5021" Comment="added 243 characters in body" Text="See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf&#xD;&#xA;&#xD;&#xA;They describe the very simple implementation of an algorithm for antialiasing normal maps.&#xD;&#xA;&#xD;&#xA;I don't understand exactly how to look up an appropriate value in the lookup table they describe.&#xD;&#xA;&#xD;&#xA;A value is accessed with (N_a . N_a, N_a . H).&#xD;&#xA;&#xD;&#xA;My specular light for example, is computed with:&#xD;&#xA;&#xD;&#xA;			result.Specular += baseIntensity * SpecularColor * &#xD;&#xA;				pow(max(0, dot(H,N)), SpecularExponent);&#xD;&#xA;&#xD;&#xA;The `H` is the same as the `H` in the paper.&#xD;&#xA;`SpecularExponent` is the `s` in the paper.&#xD;&#xA;The `N` is the vector that results from looking up a normal in the normal map (which is already normalized) and then transforming that normal into world space.&#xD;&#xA;&#xD;&#xA;What is `N_a` then?&#xD;&#xA;&#xD;&#xA;It seems that the lookup table is constructed by taking all of the normals (N_a) in a normal map, and then taking all (or many) of the values that H can take, and forming a table from these according to the formula they provide.&#xD;&#xA;&#xD;&#xA;However, this doesn't make sense to me, how is the normal that is transformed into world space taken into account in the lookup table then?&#xD;&#xA;&#xD;&#xA;That is, the normal in the normal map is rotated to be on the mesh that the normal map is being applied to. So this new rotated normal is what we use to calculate the specular exponent -- how does this fit into the use of the lookup texture?&#xD;&#xA;&#xD;&#xA;My best guess right now is that N_a is actually the normal from the normal map that is already transformed into world space. Otherwise, I guess it is just the normal from the normal map, and they ignore the transformation into world space." />
  <row Id="25120" PostHistoryTypeId="2" PostId="11667" RevisionGUID="5dae587f-5fe3-444a-9878-a469cb1456c7" CreationDate="2011-04-26T23:54:52.467" UserId="6042" Text="N_a is the result of the normal map fetch, which is usually not unit length because it is a linear blend of almost-unit vectors. &#xD;&#xA;&#xD;&#xA;The normal map typically encodes normals in tangent space, which is to say that a normal in the map with the value [0,0,1] points directly away from the surface along the surface normal.&#xD;&#xA;&#xD;&#xA;You are right that N_a is &quot;the normal ... before transformation into world space&quot; in the typical case. Take care that the &quot;H&quot; in &quot;dot( N_a, H )&quot; is in the same space as N_a.&#xD;&#xA;" />
  <row Id="25121" PostHistoryTypeId="25" PostId="11656" RevisionGUID="4c6843c0-f3c7-44dc-a194-f24350d1908e" CreationDate="2011-04-27T00:09:36.597" Comment="http://twitter.com/#!/StackGameDev/status/63032009567641601" />
  <row Id="25122" PostHistoryTypeId="2" PostId="11668" RevisionGUID="7e9a1a12-c446-4d61-9895-ab1dabd244d8" CreationDate="2011-04-27T01:18:42.523" UserId="5001" Text="I'm not so sure how looking at Assassin's creed could help, being as it is very firmly rooted in the 3D world when it comes to movement. If you want something like AC's &quot;reach out and grab holes&quot; system, you could look at QWOP's sequel &quot;[GIRP][1]&quot; - it's probably too gimmicky to copy for a more traditional game, but the core idea is there. Aside that, Creed had a lot of gap jumping, grabbing onto ledges and shimmying, all of these could probably translate well to 2D in their own style. Prince of Persia might be a good source of inspiration as well.&#xD;&#xA;&#xD;&#xA;Also I definitely recommend looking at Super Metroid and the &quot;metroidvania&quot; genre in general if you're looking for traditional side scrolling &quot;free running&quot;. There are tons of implementations of wall jumping, trick jumps, etc. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.foddy.net/GIRP.html" />
  <row Id="25123" PostHistoryTypeId="2" PostId="11669" RevisionGUID="4729f8f8-23a1-4ebf-a8d1-f655f0eafe94" CreationDate="2011-04-27T02:29:45.047" UserId="3830" Text="Right click the app icon in Windows 7 and bring up the properties.  Under the &quot;Compatibility&quot; tab you'll find a checkbox to run the program under compatibility mode for a number of versions of Windows, including XP SP2 and SP3.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25124" PostHistoryTypeId="25" PostId="11606" RevisionGUID="a800bbef-4626-4e0b-916b-937274b21ecc" CreationDate="2011-04-27T03:09:36.950" Comment="http://twitter.com/#!/StackGameDev/status/63077307383947265" />
  <row Id="25125" PostHistoryTypeId="2" PostId="11670" RevisionGUID="303d8088-759a-41dd-a695-c2da89a34286" CreationDate="2011-04-27T05:00:48.970" UserId="6973" Text="I'm new to Game Programming. Neither do I know C++ nor do I know OpenGL. I'm going to start learning C++ with a book as well as OpenGL. Once I'm done doing so, after seeing the examples from the OpenGL book, I doubt we can make games using it. So my question is:-&#xD;&#xA;&#xD;&#xA;1&gt; What must be the step towards Game programming other than learning C++?&#xD;&#xA;&#xD;&#xA;2&gt; Can OpenGL help me in Game Programming?&#xD;&#xA;&#xD;&#xA;3&gt; Are there any books / online tutorials which have helped you in Game Programming?&#xD;&#xA;&#xD;&#xA;I would first like to approach 2D then 3D! :D&#xD;&#xA;&#xD;&#xA;I'm looking forward to serve this community with the best I can, but for that I need to learn Game Programming. Please help me out&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="25126" PostHistoryTypeId="1" PostId="11670" RevisionGUID="303d8088-759a-41dd-a695-c2da89a34286" CreationDate="2011-04-27T05:00:48.970" UserId="6973" Text="Completely new to Game Programming" />
  <row Id="25127" PostHistoryTypeId="3" PostId="11670" RevisionGUID="303d8088-759a-41dd-a695-c2da89a34286" CreationDate="2011-04-27T05:00:48.970" UserId="6973" Text="&lt;game-design&gt;&lt;opengl&gt;&lt;c++&gt;&lt;engine&gt;" />
  <row Id="25128" PostHistoryTypeId="25" PostId="11670" RevisionGUID="6f96904d-6718-47ba-8b5a-722ed91932d4" CreationDate="2011-04-27T06:09:36.413" Comment="http://twitter.com/#!/StackGameDev/status/63122605313503232" />
  <row Id="25131" PostHistoryTypeId="5" PostId="11670" RevisionGUID="d625b3ea-3852-4cda-b1f5-afa7570bc052" CreationDate="2011-04-27T07:27:06.830" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What are some good resources for getting a beginner started in developing games?](http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Hey Programmers,&#xD;&#xA;&#xD;&#xA;I'm new to Game Programming. Neither do I know C++ nor do I know OpenGL. I'm going to start learning C++ with a book as well as OpenGL. Once I'm done doing so, after seeing the examples from the OpenGL book, I doubt we can make games using it. So my question is:-&#xD;&#xA;&#xD;&#xA;1&gt; What must be the step towards Game programming other than learning C++?&#xD;&#xA;&#xD;&#xA;2&gt; Can OpenGL help me in Game Programming?&#xD;&#xA;&#xD;&#xA;3&gt; Are there any books / online tutorials which have helped you in Game Programming?&#xD;&#xA;&#xD;&#xA;I would first like to approach 2D then 3D! :D&#xD;&#xA;&#xD;&#xA;I'm looking forward to serve this community with the best I can, but for that I need to learn Game Programming. Please help me out&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="25132" PostHistoryTypeId="10" PostId="11670" RevisionGUID="0f01dd0e-8094-49ed-adde-6fe6dea4e828" CreationDate="2011-04-27T07:27:06.113" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25133" PostHistoryTypeId="5" PostId="11670" RevisionGUID="d95ee198-8a4f-494c-b309-baed6e9bdf4b" CreationDate="2011-04-27T07:27:28.063" UserId="51" Comment="added 5 characters in body; edited tags" Text="&gt; **Possible Duplicate:**  &#xD;&#xA;&gt; [What are some good resources for getting a beginner started in developing games?](http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games)  &#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;Hey Programmers,&#xD;&#xA;&#xD;&#xA;I'm new to Game Programming. Neither do I know C++ nor do I know OpenGL. I'm going to start learning C++ with a book as well as OpenGL. Once I'm done doing so, after seeing the examples from the OpenGL book, I doubt we can make games using it. So my question is:-&#xD;&#xA;&#xD;&#xA;1&gt; What must be the step towards Game programming other than learning C++?&#xD;&#xA;&#xD;&#xA;2&gt; Can OpenGL help me in Game Programming?&#xD;&#xA;&#xD;&#xA;3&gt; Are there any books / online tutorials which have helped you in Game Programming?&#xD;&#xA;&#xD;&#xA;I would first like to approach 2D then 3D! :D&#xD;&#xA;&#xD;&#xA;I'm looking forward to serve this community with the best I can, but for that I need to learn Game Programming. Please help me out&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="25134" PostHistoryTypeId="6" PostId="11670" RevisionGUID="d95ee198-8a4f-494c-b309-baed6e9bdf4b" CreationDate="2011-04-27T07:27:28.063" UserId="51" Comment="added 5 characters in body; edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;engine&gt;" />
  <row Id="25135" PostHistoryTypeId="25" PostId="11609" RevisionGUID="609e450a-5fe6-4af8-9872-d9e2c4d218ea" CreationDate="2011-04-27T09:09:36.720" Comment="http://twitter.com/#!/StackGameDev/status/63167905457635328" />
  <row Id="25136" PostHistoryTypeId="2" PostId="11672" RevisionGUID="35008bfa-1ba5-4089-94e0-98f0f48249c0" CreationDate="2011-04-27T09:44:48.927" UserId="252" Text="The obvious part is drawing as periodic as possible, but hand-drawing is impossibly so perfect, so what kind of modifications are possible that do not make the textures loose their hand-drawn character?" />
  <row Id="25137" PostHistoryTypeId="1" PostId="11672" RevisionGUID="35008bfa-1ba5-4089-94e0-98f0f48249c0" CreationDate="2011-04-27T09:44:48.927" UserId="252" Text="How to make a hand-drawn squared texture periodic with as little modification as possible?" />
  <row Id="25138" PostHistoryTypeId="3" PostId="11672" RevisionGUID="35008bfa-1ba5-4089-94e0-98f0f48249c0" CreationDate="2011-04-27T09:44:48.927" UserId="252" Text="&lt;textures&gt;&lt;hand-drawn&gt;&lt;periodicity&gt;" />
  <row Id="25139" PostHistoryTypeId="2" PostId="11673" RevisionGUID="ed88521c-01b7-43a0-9553-152646ebd847" CreationDate="2011-04-27T10:01:57.857" UserId="252" Text="I'm currently working on a texture pack for [minecraft](http://www.minecraft.net) (but this question is not restricted to that). All terrain textures are squared and stored in one big terrain.png, see e.g. [here](http://img820.imageshack.us/img820/5083/terrainj.png) (FYI that's from [Glimmar's Steampunk pack](http://www.minecraftforum.net/viewtopic.php?t=48884)). I'd like to store each texture in an individual file and have same automated process pack them into the terrain.png later on (maybe leaving the not yet created ones their default). At the moment I do this manually by copy/pasting them with gimp (at least the raster helps a lot here) but I'd really like to do this automatically. Basically this seems to be what happens behind the scenes of the [Painterly pack customizer](http://painterlypack.net/customizer.php) already. So,&#xD;&#xA;&#xD;&#xA;&gt; Is there a tool that replaces some &lt;s&gt;squares&lt;/s&gt;polygons&lt;sup&gt;*&lt;/sup&gt; in a png file with new ones (also png), the position of which might be configured in a separate file?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;*)&lt;/sup&gt; might as well ask the general case" />
  <row Id="25140" PostHistoryTypeId="1" PostId="11673" RevisionGUID="ed88521c-01b7-43a0-9553-152646ebd847" CreationDate="2011-04-27T10:01:57.857" UserId="252" Text="Is there a tool to automatically pack individual textures into one big png?" />
  <row Id="25141" PostHistoryTypeId="3" PostId="11673" RevisionGUID="ed88521c-01b7-43a0-9553-152646ebd847" CreationDate="2011-04-27T10:01:57.857" UserId="252" Text="&lt;textures&gt;&lt;tools&gt;&lt;packing&gt;" />
  <row Id="25142" PostHistoryTypeId="5" PostId="11673" RevisionGUID="9d6c2203-d767-485b-9155-c8f21f874e85" CreationDate="2011-04-27T10:14:33.780" UserId="252" Comment="added 93 characters in body" Text="I'm currently working on a texture pack for [minecraft](http://www.minecraft.net) (but this question is not restricted to that). All terrain textures are squared and stored in one big terrain.png, see e.g. [here](http://img820.imageshack.us/img820/5083/terrainj.png) (FYI that's from [Glimmar's Steampunk pack](http://www.minecraftforum.net/viewtopic.php?t=48884)). I'd like to store each texture in an individual file and have same automated process pack them into the terrain.png later on (maybe leaving the not yet created ones their default). At the moment I do this manually by copy/pasting them with gimp (at least the raster helps a lot here) but I'd really like to do this automatically. Basically this seems to be what happens behind the scenes of the [Painterly pack customizer](http://painterlypack.net/customizer.php) already. So,&#xD;&#xA;&#xD;&#xA;&gt; Is there a tool that replaces some &lt;s&gt;squares&lt;/s&gt;polygons&lt;sup&gt;*&lt;/sup&gt; in a png file with new ones (also png), the position of which might be configured in a separate file?&#xD;&#xA;&#xD;&#xA;**edit** Some automated resizing for different resolution versions might be nice as well...&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;*)&lt;/sup&gt; might as well ask the general case" />
  <row Id="25143" PostHistoryTypeId="2" PostId="11674" RevisionGUID="a34aff95-568e-452a-80ab-6cd2bfba0d12" CreationDate="2011-04-27T10:36:39.310" UserId="5073" Text="I Am New to the cocoas2d and i did't find the way to open the camera from  the library&#xD;&#xA;                           &#xD;&#xA;I Want to open the camera in the my game application &#xD;&#xA; can any buddy have idea regarding with this ?&#xD;&#xA; Thank you in advance" />
  <row Id="25144" PostHistoryTypeId="1" PostId="11674" RevisionGUID="a34aff95-568e-452a-80ab-6cd2bfba0d12" CreationDate="2011-04-27T10:36:39.310" UserId="5073" Text="i want to open the camera in the ccscene node in the i-phone cocoas2d application ?" />
  <row Id="25145" PostHistoryTypeId="3" PostId="11674" RevisionGUID="a34aff95-568e-452a-80ab-6cd2bfba0d12" CreationDate="2011-04-27T10:36:39.310" UserId="5073" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="25146" PostHistoryTypeId="2" PostId="11675" RevisionGUID="016c26d2-47d9-42b2-a297-ac81f2c1a6e4" CreationDate="2011-04-27T10:44:56.057" UserId="3656" Text="Try out [Nick Gravelyn's Sprite Sheet Packer][1]. I don't know if you can control scale with it, but you can easily automate that in script with [ImageMagick][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://spritesheetpacker.codeplex.com/&#xD;&#xA;  [2]: http://www.imagemagick.org/script/index.php" />
  <row Id="25147" PostHistoryTypeId="2" PostId="11676" RevisionGUID="d3927d30-43fc-4bad-8d82-b535a62f75e4" CreationDate="2011-04-27T11:02:04.490" UserId="6588" Text="My favorite spritesheet packer is Texture Packer: http://www.texturepacker.com/&#xD;&#xA;&#xD;&#xA;Another option is Zwoptex: http://zwoptexapp.com/" />
  <row Id="25148" PostHistoryTypeId="2" PostId="11677" RevisionGUID="402221b7-8d7a-4cf5-b661-89c599a34cae" CreationDate="2011-04-27T11:30:10.913" UserId="1386" Text="I would suggest doing this manually in software like Photoshop.&#xD;&#xA;&#xD;&#xA;In Photoshop there's a filter called offset which scrolls the image by the given amount of pixels. If you offset by half the images width and half the images height you'll see the seams in the middle of the image. You can then alter the image until the seams are no longer visible. When you've done that, use offset again to make sure you haven't created any new seams.&#xD;&#xA;&#xD;&#xA;[This tutorial][1] may be of help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.designbash.com/photoshop/photoshop-offset-filter-making-seamless-textures/" />
  <row Id="25149" PostHistoryTypeId="25" PostId="11673" RevisionGUID="13b01594-e3c7-4fa0-a889-7cba453bec53" CreationDate="2011-04-27T12:09:36.483" Comment="http://twitter.com/#!/StackGameDev/status/63213202045014016" />
  <row Id="25150" PostHistoryTypeId="5" PostId="11676" RevisionGUID="ff42b1ba-8b78-4b52-8fb6-1d8ebb5dff73" CreationDate="2011-04-27T12:13:20.690" UserId="6588" Comment="added 100 characters in body" Text="My favorite spritesheet packer is Texture Packer: http://www.texturepacker.com/&#xD;&#xA;&#xD;&#xA;There's a free version that works pretty well, but the paid version adds features like resizing.&#xD;&#xA;&#xD;&#xA;Another option is Zwoptex: http://zwoptexapp.com/" />
  <row Id="25151" PostHistoryTypeId="4" PostId="11663" RevisionGUID="73871bc0-bf6c-4c75-bd34-6b6eff255ab6" CreationDate="2011-04-27T12:14:52.263" UserId="2229" Comment="Changed topic to be more explanatory about the content of the question." Text="Middleware to Bring 3D Meshes into OpenGL ES 2.0." />
  <row Id="25152" PostHistoryTypeId="2" PostId="11678" RevisionGUID="998737cb-1f94-4c6d-8161-c0c6314c2752" CreationDate="2011-04-27T12:30:19.483" UserId="6977" Text="I am C# programmer, I want to know what are the different options I have in developing a game" />
  <row Id="25153" PostHistoryTypeId="1" PostId="11678" RevisionGUID="998737cb-1f94-4c6d-8161-c0c6314c2752" CreationDate="2011-04-27T12:30:19.483" UserId="6977" Text="From where do I started Game Development" />
  <row Id="25154" PostHistoryTypeId="3" PostId="11678" RevisionGUID="998737cb-1f94-4c6d-8161-c0c6314c2752" CreationDate="2011-04-27T12:30:19.483" UserId="6977" Text="&lt;hobby-development&gt;" />
  <row Id="25155" PostHistoryTypeId="2" PostId="11679" RevisionGUID="08711cfa-d9f2-4846-899a-28444565338c" CreationDate="2011-04-27T13:07:13.670" UserId="2592" Text="I'm a web developer who is trying to know more about game development.&#xD;&#xA;&#xD;&#xA;I've [started trying to make Pong using canvas][1], just to see how far I can go (and what I can learn along the way).&#xD;&#xA;&#xD;&#xA;I have heard a lot about the *game loop* but being a novice was not sure how it applies to Pong. I figured it would be something like a `setInterval()` that changes the game's state as it runs (ball movement, enemy position, etc).&#xD;&#xA;&#xD;&#xA;I have also created two objects, `Paddle` and `Ball`, but looked at implementing the bouncing inside one of `Ball`'s methods. I'm not sure if that is right.&#xD;&#xA;&#xD;&#xA;What I want to know is *am I on the right track*? What suggestions would you have to my code in terms of layout/structure (and any recommended reading)?&#xD;&#xA;&#xD;&#xA;Most of the articles I found regarding JavaScript game development were horribly outdated or didn't deal with canvas; only animating DOM elements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jsfiddle.net/alexdickson/7vGgv/" />
  <row Id="25156" PostHistoryTypeId="1" PostId="11679" RevisionGUID="08711cfa-d9f2-4846-899a-28444565338c" CreationDate="2011-04-27T13:07:13.670" UserId="2592" Text="Am I on the right track with Pong?" />
  <row Id="25157" PostHistoryTypeId="3" PostId="11679" RevisionGUID="08711cfa-d9f2-4846-899a-28444565338c" CreationDate="2011-04-27T13:07:13.670" UserId="2592" Text="&lt;javascript&gt;" />
  <row Id="25158" PostHistoryTypeId="2" PostId="11680" RevisionGUID="55b28502-8fe0-47f5-82ba-b6c2ad30c9e5" CreationDate="2011-04-27T13:12:48.203" UserId="4747" Text="Your question might get closed as a duplicate (there are a lot of these questions), but you might feel most comfortable starting with [XNA][1]. It's free from Microsoft, and you can program in C# or VB .NET, using Visual Studio (of course).&#xD;&#xA;&#xD;&#xA;You can build Windows games for free. For $99/year, you can also deploy games to Windows Phone 7 devices and Xbox 360 (Xbox Live Indie Games). That last one is a big deal: No other major consoles officially allow hobby development.&#xD;&#xA;&#xD;&#xA;They have a ton of educational resources on the site. I'm starting to learn it right now, and it's a great place to start. There are a ton of XNA questions on here too, so this seems like a good place to get help.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/" />
  <row Id="25159" PostHistoryTypeId="2" PostId="11681" RevisionGUID="7ad40c76-e8a0-4fb0-85eb-8c635dec5681" CreationDate="2011-04-27T13:38:10.000" UserId="6588" Text="Yes you're on the right track. In some languages the main loop is written with an explicit &quot;while&quot; loop, but in many languages you want to hook into a built in main loop using an event listener or callback. JavaScript is the latter." />
  <row Id="25160" PostHistoryTypeId="5" PostId="10462" RevisionGUID="642c7d11-d10a-4e49-bb8c-22082a13159b" CreationDate="2011-04-27T13:39:33.010" UserId="6442" Comment="added 38 characters in body" Text="If you insist on a sprite sheet, there are algorithms that will generate the smallest possible area with all the sprites in it (or write one yourself for fun). However with basic compression, you're better off making a big, but organized sprite sheet:&#xD;&#xA;&#xD;&#xA; 1. Easier to manage and look at&#xD;&#xA; 2. You can always pack it if you ever get to ship&#xD;&#xA; 3. Even if you don't, basic compression will make the difference negligible&#xD;&#xA;&#xD;&#xA;However using separate files for each sprite is a more modular way of going about this. The difference is organizational and personal preference - I learned to use sheets from the first tutorial I saw. Then I figured it would be easier to use separate PNGs for everything, and that's stuck with me.&#xD;&#xA;&#xD;&#xA;Edit: [Here][1] is an another answer that links to two tools for texture packing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/11673/is-there-a-tool-to-automatically-pack-individual-textures-into-one-big-png/11676#11676" />
  <row Id="25161" PostHistoryTypeId="2" PostId="11682" RevisionGUID="b79b842b-f1c4-4af9-ad80-b62b90e400b9" CreationDate="2011-04-27T13:45:23.570" UserId="6932" Text="This is a very common problem. To solve it right you need to make sure the game time and the game framerate are not dependent (you don't want all you game elements to move slowly if the framerate is low and faster if it's high). From my point of view setInterval will not be efficient. Here is what I suggest:&#xD;&#xA;&#xD;&#xA;You need to have three methods in your game: main (that we will try to run 60 times per seconds), update (that will update elements positions) and draw (that will display all the elements) and a variable to store the current time. Initialize your currentTime variable to now then start your main method.&#xD;&#xA;&#xD;&#xA;Here is what your main method should do:&#xD;&#xA;&#xD;&#xA;- compute the time elapsed since the last execution of the main method (timeElapsed = now - currentTime)&#xD;&#xA;- reset the current time variable (currentTime = now)&#xD;&#xA;- run the update method with timeElapsed has argument&#xD;&#xA;- run the draw method&#xD;&#xA;- compute the time elapsed since we started the main method (timeElapsed = now - currentTime)&#xD;&#xA;- compute the time wee need to wait before running again the main method for an expected framerate of 60 frame per seconds (timeout = 1000 / 60 - timeElapsed)&#xD;&#xA;- prevent this time from being less than zero (timeout = timeout &lt; 0 ? 0 : timeout)&#xD;&#xA;- schedule the next execution of the main method using setTimeout: setTimeout(main, tiemout)&#xD;&#xA;&#xD;&#xA;Then in your update method multiply every translations operations by the elapsedTime variable passed has argument (x = x + speed * elapsedTime). This way, if the ball has a speed of 1.6 it will always move 96 pixel per seconds even if the framerate too is slow or too high.&#xD;&#xA;&#xD;&#xA;This way you make sure the game run at (almost) exactly 60 fps all the time and that you elements moves at the right speed even if the framerate changes for some reason.&#xD;&#xA;&#xD;&#xA;Implementing the bounce logic within your Ball class is up to you. Try to write your game step by step and do not hesitate to change and move your code so it always looks simple. There is no &quot;right way&quot; to do it. I suggest you give a look to [this project][1] (a nice javascript pong game but without canevas). It does implement the loop method described above. You can also test it [here][2].&#xD;&#xA;&#xD;&#xA;I hope this help ! Good luck !&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/inside/pong&#xD;&#xA;  [2]: http://inside.github.com/pong/" />
  <row Id="25162" PostHistoryTypeId="5" PostId="11172" RevisionGUID="740a527b-96af-454a-bd38-939a6ec21d27" CreationDate="2011-04-27T13:49:47.440" UserId="3588" Comment="Rearranged the title, did some switching of vocabulary, rehosted the image on our special imgur host, and added the Tower Defense tag. ♪" Text="I thought about random pathfinding for my Tower Defense game. A* would not work for my puposes, because I specifically need **random** pathfinding.&#xD;&#xA;&#xD;&#xA;Imagine a map with routes, a starting point and a destination. I have multiple routes, which all lead from the starting point to the destination, one way or another. It could look like this: &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA; &#xD;&#xA;![Two branch-path shaped like a square][1]&#xD;&#xA;&#xD;&#xA;*Color description: red - starting point; black - destination; grey - route; white - free space  &#xD;&#xA;(The numbers are used in the text as a reference to some tiles)*&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I first thought about just calculating the next waypoint randomly, when an entity passes a tile. But that would not work. When an entity passes tile 1 it either can go up or down. When it comes to 2 it can either go down/up (relative to it´s position) or right.  &#xD;&#xA;**If** it goes **down/up** it would go to tile 1, which means that it goes backwards. Bad...&#xD;&#xA;&#xD;&#xA;I would really like to make it **dynamic**, but I can´t figure out what I can do now. Anyone with ideas or experience in this?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tw0Xw.png &quot;Two branch-path shaped like a square&quot;" />
  <row Id="25163" PostHistoryTypeId="4" PostId="11172" RevisionGUID="740a527b-96af-454a-bd38-939a6ec21d27" CreationDate="2011-04-27T13:49:47.440" UserId="3588" Comment="Rearranged the title, did some switching of vocabulary, rehosted the image on our special imgur host, and added the Tower Defense tag. ♪" Text="Pathfinding with multiple random paths in a Tower Defense game" />
  <row Id="25164" PostHistoryTypeId="6" PostId="11172" RevisionGUID="740a527b-96af-454a-bd38-939a6ec21d27" CreationDate="2011-04-27T13:49:47.440" UserId="3588" Comment="Rearranged the title, did some switching of vocabulary, rehosted the image on our special imgur host, and added the Tower Defense tag. ♪" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;random&gt;&lt;tower-defense&gt;" />
  <row Id="25165" PostHistoryTypeId="24" PostId="11172" RevisionGUID="740a527b-96af-454a-bd38-939a6ec21d27" CreationDate="2011-04-27T13:49:47.440" Comment="Proposed by 3588 approved by 51 edit id of 391" />
  <row Id="25166" PostHistoryTypeId="5" PostId="1452" RevisionGUID="291e35c5-d9ca-4113-8668-ac70a362c607" CreationDate="2011-04-27T13:49:57.563" UserId="3588" Comment="A fairly strong revision to more emphasize the goal, especially in the otherwise confusing title. Added the tower-defense tag as well. ♪" Text="I'm making a Tower Defense and I have basic pathfinding working, but I got a problem.&#xD;&#xA;&#xD;&#xA;I want to make the path blockable, and when a block occurs the runners will attack the blocking towers.&#xD;&#xA;&#xD;&#xA;So what I need is a way to find the shortest path that, more importantly, has the lowest number of towers in the way.&#xD;&#xA;&#xD;&#xA;How do I do that?" />
  <row Id="25167" PostHistoryTypeId="4" PostId="1452" RevisionGUID="291e35c5-d9ca-4113-8668-ac70a362c607" CreationDate="2011-04-27T13:49:57.563" UserId="3588" Comment="A fairly strong revision to more emphasize the goal, especially in the otherwise confusing title. Added the tower-defense tag as well. ♪" Text="Locate the shortest path through obstacles when all normal paths are blocked" />
  <row Id="25168" PostHistoryTypeId="6" PostId="1452" RevisionGUID="291e35c5-d9ca-4113-8668-ac70a362c607" CreationDate="2011-04-27T13:49:57.563" UserId="3588" Comment="A fairly strong revision to more emphasize the goal, especially in the otherwise confusing title. Added the tower-defense tag as well. ♪" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;tower-defense&gt;" />
  <row Id="25169" PostHistoryTypeId="24" PostId="1452" RevisionGUID="291e35c5-d9ca-4113-8668-ac70a362c607" CreationDate="2011-04-27T13:49:57.563" Comment="Proposed by 3588 approved by 51 edit id of 393" />
  <row Id="25170" PostHistoryTypeId="5" PostId="10820" RevisionGUID="9757b93a-ab50-458f-81e5-cd85d6fd6c0a" CreationDate="2011-04-27T13:50:03.930" UserId="3588" Comment="Reshaped the question a little bit, and added the tower-defense tag. ♪" Text="I want to make a Tower Defense game using the *StarCraft 2* editor.&#xD;&#xA;&#xD;&#xA;How can I make a rally point to control AI appear at one point and go to specific point? How do I make creep spawn properly at specific times?" />
  <row Id="25171" PostHistoryTypeId="4" PostId="10820" RevisionGUID="9757b93a-ab50-458f-81e5-cd85d6fd6c0a" CreationDate="2011-04-27T13:50:03.930" UserId="3588" Comment="Reshaped the question a little bit, and added the tower-defense tag. ♪" Text="Need help with rally point and spawning in StarCraft 2 map editor" />
  <row Id="25172" PostHistoryTypeId="6" PostId="10820" RevisionGUID="9757b93a-ab50-458f-81e5-cd85d6fd6c0a" CreationDate="2011-04-27T13:50:03.930" UserId="3588" Comment="Reshaped the question a little bit, and added the tower-defense tag. ♪" Text="&lt;starcraft-2&gt;&lt;tower-defense&gt;" />
  <row Id="25173" PostHistoryTypeId="24" PostId="10820" RevisionGUID="9757b93a-ab50-458f-81e5-cd85d6fd6c0a" CreationDate="2011-04-27T13:50:03.930" Comment="Proposed by 3588 approved by 51 edit id of 392" />
  <row Id="25174" PostHistoryTypeId="4" PostId="11678" RevisionGUID="51c934ce-7da7-4b94-8815-485da116c5c7" CreationDate="2011-04-27T14:02:34.653" UserId="51" Comment="edited tags; edited title" Text="What can I use to make a game with C#?" />
  <row Id="25175" PostHistoryTypeId="6" PostId="11678" RevisionGUID="51c934ce-7da7-4b94-8815-485da116c5c7" CreationDate="2011-04-27T14:02:34.653" UserId="51" Comment="edited tags; edited title" Text="&lt;c#&gt;&lt;hobby-development&gt;" />
  <row Id="25176" PostHistoryTypeId="5" PostId="11678" RevisionGUID="c91d822f-84a0-4f4f-8808-154475ffc832" CreationDate="2011-04-27T14:04:06.537" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What C# libraries can be used to support game development?](http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am C# programmer, I want to know what are the different options I have in developing a game" />
  <row Id="25177" PostHistoryTypeId="10" PostId="11678" RevisionGUID="dac45a5a-fb26-4de4-a626-03827f111be3" CreationDate="2011-04-27T14:04:06.197" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25178" PostHistoryTypeId="2" PostId="11683" RevisionGUID="c271fe20-d927-474c-b856-27f248bcd867" CreationDate="2011-04-27T14:17:47.087" UserId="6932" Text="I'm writing a small 2d isometric engine in C++ and I'm trying to implement real time shadow casting. I followed a simple approach described on [this page][1] and here is the result (light is located at the same position than the yellow cube):&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The result is very nice but there are missing shadows on walls and on the top of cubes. Here is an example of how it should look like (I've draw expected shadows in green):&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;All the cubes drawn are simply made of 3 2D quads located at a X-Y position and with a Z depth (z = x + y). I use OpenGL with an orthographic matrix (glOrtho). Shadows are drawn using the stencil buffer.&#xD;&#xA;&#xD;&#xA;I'm looking for resources or solutions that would help me complete this shadow casting implementation.&#xD;&#xA;&#xD;&#xA;Thanks a lot!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/3eMl8.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/YZ0gy.png" />
  <row Id="25179" PostHistoryTypeId="1" PostId="11683" RevisionGUID="c271fe20-d927-474c-b856-27f248bcd867" CreationDate="2011-04-27T14:17:47.087" UserId="6932" Text="Real time shadow casting in a 2D isometric game" />
  <row Id="25180" PostHistoryTypeId="3" PostId="11683" RevisionGUID="c271fe20-d927-474c-b856-27f248bcd867" CreationDate="2011-04-27T14:17:47.087" UserId="6932" Text="&lt;opengl&gt;&lt;2d&gt;&lt;graphics-programming&gt;&lt;shadows&gt;&lt;isometric&gt;" />
  <row Id="25181" PostHistoryTypeId="5" PostId="11674" RevisionGUID="f2380151-c385-42c7-8572-2edabb9558ce" CreationDate="2011-04-27T15:21:11.980" UserId="1430" Comment="caps, grammar" Text="I am new to Cocos2D and I can't find the way to open the camera from the library. I want to open the camera in the my game, can any one help me with with this?&#xD;&#xA;&#xD;&#xA;Thank you in advance." />
  <row Id="25182" PostHistoryTypeId="4" PostId="11674" RevisionGUID="f2380151-c385-42c7-8572-2edabb9558ce" CreationDate="2011-04-27T15:21:11.980" UserId="1430" Comment="caps, grammar" Text="How do I open the camera in a CCScene node in a Cocos2D application?" />
  <row Id="25183" PostHistoryTypeId="6" PostId="11674" RevisionGUID="f2380151-c385-42c7-8572-2edabb9558ce" CreationDate="2011-04-27T15:21:11.980" UserId="1430" Comment="caps, grammar" Text="&lt;iphone&gt;&lt;camera&gt;&lt;cocos2d&gt;" />
  <row Id="25184" PostHistoryTypeId="2" PostId="11684" RevisionGUID="6cc61d63-b958-4902-b40c-5a5fea135dca" CreationDate="2011-04-27T15:34:08.993" UserId="20" Text="In [GIMP][1] you can use the &quot;make seamless&quot; filter (this can also be scripted). If the results aren't good enough, the best way is a manual approach as described in the answer by CiscoIPPhone.&#xD;&#xA;&#xD;&#xA;This [tutorial][2] lists several possibilities using GIMP, including the &quot;make seamless&quot; filter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gimp.org&#xD;&#xA;  [2]: http://www.coniserver.net/wiki/index.php/Seamless_Texture_Tutorial" />
  <row Id="25185" PostHistoryTypeId="5" PostId="226" RevisionGUID="651f188b-ca7d-4d3a-82f2-56ad4820c3f1" CreationDate="2011-04-27T15:36:34.803" UserId="2698" Comment="Updated an excellent and comprehensive answer with a new source" Text="Graphics/Sound&#xD;&#xA;&#xD;&#xA; - [XNA][1]  High level wrapper on DirectX9. Allows you to get up and running quickly. Supports PC, Xbox360 and windows phone 7. Support Xact audio aswell as its own SoundEffect API.&#xD;&#xA; - [SlimDX][2] Lower level wrapper on DX9/10/11. If its in the DX SDK, its wrapped here.&#xD;&#xA; - [OpenTK][3] Wrapper on OpenGL/AL.&#xD;&#xA; - [SDL.net][4] A port of thr popular SDL lib.&#xD;&#xA;&#xD;&#xA;Engines&#xD;&#xA;&#xD;&#xA; - [TorqueX][5] A 2D/3D engine for XNA. Good editor suppport, garage games have recently reinvested in the engine after a period of neglect.&#xD;&#xA; - [truevision 3d][6] C++ game engine with c# bindings&#xD;&#xA; - [Axiom][7] A rewrite of Ogre in c#. Supports numerous backed rendering APIs.&#xD;&#xA; - [Unity][8] is a C++ graphics/game engine that supports gameplay scripting in C#&#xD;&#xA; - [AngelXNA][9] A port of EALA's open source angle protoypeing framework&#xD;&#xA;&#xD;&#xA;Physics&#xD;&#xA;&#xD;&#xA;- [Farseer][10] A popular 2D physics engine, supports .net(desktop), compact(xbox) and micro(silverlight).&#xD;&#xA;- [Jitter][11] a relatively new 3D physics engine, Much better than its completion.&#xD;&#xA;- [Box2Dx][12] A direct port of box2D&#xD;&#xA;- [Box2D.XNA][15] Another port of Box2D for XNA; more recent than Box2Dx&#xD;&#xA;- [JigLib][13]&#xD;&#xA;- [BulletX][14] A c# port of Bullet, seems to be abandoned. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://creators.xna.com&#xD;&#xA;  [2]: http://slimdx.org&#xD;&#xA;  [3]: http://www.opentk.com/&#xD;&#xA;  [4]: http://cs-sdl.sourceforge.net/index.php/Main_Page&#xD;&#xA;  [5]: http://www.torquepowered.com/products/torquex-3d&#xD;&#xA;  [6]: http://www.truevision3d.com/&#xD;&#xA;  [7]: http://axiom3d.net/&#xD;&#xA;  [8]: http://unity3d.com/&#xD;&#xA;  [9]: http://www.jeffongames.com/2009/05/angelxna-v10&#xD;&#xA;  [10]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [11]: http://www.jitter-physics.com/&#xD;&#xA;  [12]: http://code.google.com/p/box2dx&#xD;&#xA;  [13]: http://jiglibx.codeplex.com/&#xD;&#xA;  [14]: http://xnadevru.codeplex.com/wikipage?title=Managed%20Bullet%20Physics%20Library&amp;ProjectName=xnadevru&#xD;&#xA;  [15]: http://box2dxna.codeplex.com/" />
  <row Id="25186" PostHistoryTypeId="24" PostId="226" RevisionGUID="651f188b-ca7d-4d3a-82f2-56ad4820c3f1" CreationDate="2011-04-27T15:36:34.803" Comment="Proposed by 2698 approved by 51 edit id of 394" />
  <row Id="25187" PostHistoryTypeId="2" PostId="11685" RevisionGUID="38a88b56-825f-459f-89f7-31e2265a1161" CreationDate="2011-04-27T15:54:45.843" UserId="6937" Text="Thinking about the bigger picture may be helpful.&#xD;&#xA;&#xD;&#xA;First where do you store the current state of their entire &quot;farm&quot;. It's obviously not on the user side. It must be on the server side. If you are storing the entire state of the farm which would include each horse and the amount of energy they have then you are correct.&#xD;&#xA;&#xD;&#xA;This is how I would handle it. &#xD;&#xA;&#xD;&#xA;You store the farms current status which is made up of everything and their current decaying energy value. The rate of decay is where time comes in. It is a function based on how much they were fed and how fast the energy from said food decays. You don't store their feed times, you store their current state and the last time of update for the entire farm. &#xD;&#xA;&#xD;&#xA;When they send a request for an update then you look at their last overall update time and then send back the new state of the farm and all of the decayed energies.&#xD;&#xA;&#xD;&#xA;The update request is going to be the same whether it be right when they log in, or in a polling situation every 10 seconds. Client side if you want a finer time window than 10 seconds you can have their client update the decayed values, but always verify when the new server update comes in 10 seconds.&#xD;&#xA;&#xD;&#xA;These numbers are all arbitrary. The short answer is, you store the amount of energy left from any decaying value like food and store a global last update and update the decay from that value on the next global update.&#xD;&#xA;&#xD;&#xA;EDIT: Just to clarify to anyone that didn't get his concern, he probably didn't like storing a last update time for each and every object in the farm. My optimization is to store a global one and instead store energies and user their respective decay functions on global updates" />
  <row Id="25188" PostHistoryTypeId="5" PostId="11685" RevisionGUID="d0ff8543-d226-4183-93ad-404f2b26b6fe" CreationDate="2011-04-27T16:11:45.603" UserId="6937" Comment="deleted 49 characters in body" Text="Thinking about the bigger picture may be helpful.&#xD;&#xA;&#xD;&#xA;First where do you store the current state of their entire &quot;farm&quot;. It's obviously not on the user side. It must be on the server side. If you are storing the entire state of the farm which would include each horse and the amount of energy they have then you are correct.&#xD;&#xA;&#xD;&#xA;This is how I would handle it. &#xD;&#xA;&#xD;&#xA;You store the farms current status which is made up of everything and their current decaying energy value. The rate of decay is where time comes in. It is a function based on how much they were fed and how fast the energy from said food decays. You don't store their feed times, you store their current state and the last time of update for the entire farm. &#xD;&#xA;&#xD;&#xA;When they send a request for an update then you look at their last overall update time and then send back the new state of the farm and all of the decayed energies.&#xD;&#xA;&#xD;&#xA;The update request is going to be the same whether it be right when they log in, or in a polling situation every 10 seconds. Client side if you want a finer time window than 10 seconds you can have their client update the decayed values, but always verify when the new server update comes in 10 seconds. (Or whatever time frame you choose)&#xD;&#xA;&#xD;&#xA;So Old Solution:&#xD;&#xA;![old][1]&#xD;&#xA;&#xD;&#xA;New Solution:&#xD;&#xA;![new][2]&#xD;&#xA;&#xD;&#xA;EDIT: Just to clarify to anyone that didn't get his concern, he probably didn't like storing a last update time for each and every object in the farm. My optimization is to store a global one and instead store energies and user their respective decay functions on global updates&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/IFFQS.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/R4bCF.png" />
  <row Id="25189" PostHistoryTypeId="2" PostId="11686" RevisionGUID="f705652c-cff9-445e-9607-468faf387634" CreationDate="2011-04-27T16:21:35.220" UserId="6982" Text="I am developing 2D game in java, and I want some basic ingame scripting (spawn enemy, spawn item, change enemies properties). What I dont know is, how to divide the game world, to easily work with it. I need enemies (have health, basic AI) of diferent types, item classes (can be picked by player), tile map with different blocks. Whats the best solution to maintain the whole world and to what classes should I divide it, to easily extend? Thank you for your help and sorry for bad English." />
  <row Id="25190" PostHistoryTypeId="1" PostId="11686" RevisionGUID="f705652c-cff9-445e-9607-468faf387634" CreationDate="2011-04-27T16:21:35.220" UserId="6982" Text="Game World structure in classes" />
  <row Id="25191" PostHistoryTypeId="3" PostId="11686" RevisionGUID="f705652c-cff9-445e-9607-468faf387634" CreationDate="2011-04-27T16:21:35.220" UserId="6982" Text="&lt;java&gt;&lt;world-design&gt;" />
  <row Id="25192" PostHistoryTypeId="5" PostId="11686" RevisionGUID="2086a841-b6da-4dae-ba05-c467f624c792" CreationDate="2011-04-27T16:53:58.780" UserId="962" Comment="deleted 48 characters in body" Text="I am developing 2D game in java, and I want some basic in-game scripting (spawn enemy, spawn item, change enemies properties).&#xD;&#xA;&#xD;&#xA;What I don't know is, how to divide the game world, to easily work with it. &#xD;&#xA;&#xD;&#xA;I need enemies (have health, basic AI) of different types, item classes (can be picked by player), tile map with different blocks. Whats the best solution to maintain the whole world and to what classes should I divide it, to easily extend?" />
  <row Id="25193" PostHistoryTypeId="5" PostId="11476" RevisionGUID="b7bb3e87-6e50-4965-b7e7-10f77989b279" CreationDate="2011-04-27T16:55:53.427" UserId="189" Comment="deleted 30 characters in body" Text="ORGE is indeed a wrapper for OpenGL, however the idea of such a wrapper is that you don't have to concern yourself with the intricacies of OpenGL. It will of course help to know a bit about OpenGL, but ORGE will hide a lot of the ugly details for you.&#xD;&#xA;&#xD;&#xA;I would say that Ogre is arguably easier to learn as opposed to OpenGL, or at least it will get you interesting results faster. Of course it totally depends on what you would like to do to asses if it's worth learning OpenGL.&#xD;&#xA;&#xD;&#xA;About OpenGL tutorials, yes most of them are pretty outdated, however the spec hasn't been moving forward really fast so a lot of those old tutorials still apply to most of OpenGL.&#xD;&#xA;&#xD;&#xA;A few of my favourites:&#xD;&#xA;&#xD;&#xA; - http://www.falloutsoftware.com/tutorials/gl/gl8.htm (7 years old but the theory is still very solid!)&#xD;&#xA;&#xD;&#xA; - http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=11&#xD;&#xA;&#xD;&#xA; - Or actually all of Nehe's tutorials http://nehe.gamedev.net/ (but see below comments)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25194" PostHistoryTypeId="6" PostId="11686" RevisionGUID="a1b23c2b-1986-4315-89ce-edfe318452b9" CreationDate="2011-04-27T17:04:45.957" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;" />
  <row Id="25195" PostHistoryTypeId="2" PostId="11687" RevisionGUID="3576820a-b861-446c-9d19-2573adc111bc" CreationDate="2011-04-27T17:13:08.247" UserId="5404" Text="I'm trying to implement a basic scene graph in DirectX using C++. I am using a left child-right sibling binary tree to do this.&#xD;&#xA;I'm having trouble updating each node's world transformation relative to its parent (and its parent's parent etc.). I'm struggling to get it to work recursively, though I can get it to  work like this:&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; NUM_OBJECTS; i++)&#xD;&#xA;	{&#xD;&#xA;		// Initialize to identity matrix.&#xD;&#xA;		D3DXMatrixIdentity(&amp;mObject[i].toWorldXForm);&#xD;&#xA;&#xD;&#xA;		int k = i;&#xD;&#xA;		while( k != -1 )&#xD;&#xA;		{&#xD;&#xA;			mObject[i].toWorldXForm *= mObject[k].toParentXForm;&#xD;&#xA;			k = mObject[k].parent;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;toWorldXForm is the object's world transform and toParentXForm is the object's transform relative to the parent. I want to do this using a method within my object class (the code above is in my main class).&#xD;&#xA;This is what I've tried but it doesn't work (only works with nodes 1 generation away from the root)&#xD;&#xA;&#xD;&#xA;    if (this-&gt;sibling != NULL)&#xD;&#xA;		this-&gt;sibling-&gt;update(toParentXForm);&#xD;&#xA;	D3DXMatrixIdentity(&amp;toWorldXForm);&#xD;&#xA;	this-&gt;toWorldXForm *= this-&gt;toParentXForm;&#xD;&#xA;	this-&gt;toWorldXForm *= toParentXForm;	&#xD;&#xA;	toParentXForm *= this-&gt;toParentXForm;&#xD;&#xA;	if (this-&gt;child != NULL)&#xD;&#xA;		this-&gt;child-&gt;update(toParentXForm);&#xD;&#xA;&#xD;&#xA;Sorry if I've not been clear, please tell me if there's anything else you need to know. I've no doubt it's merely a silly mistake on my part, hopefully an outside view will be able to spot the problem." />
  <row Id="25196" PostHistoryTypeId="1" PostId="11687" RevisionGUID="3576820a-b861-446c-9d19-2573adc111bc" CreationDate="2011-04-27T17:13:08.247" UserId="5404" Text="Problem with DirectX scene-graph" />
  <row Id="25197" PostHistoryTypeId="3" PostId="11687" RevisionGUID="3576820a-b861-446c-9d19-2573adc111bc" CreationDate="2011-04-27T17:13:08.247" UserId="5404" Text="&lt;c++&gt;&lt;directx&gt;&lt;matrix&gt;&lt;scene-graph&gt;" />
  <row Id="25198" PostHistoryTypeId="2" PostId="11688" RevisionGUID="ead8846f-9b23-48d9-8660-12c296ee8490" CreationDate="2011-04-27T17:57:40.073" UserId="6983" Text="dont know if i'll be bashed for posting my answer twice .... but well... didnt see this one and this is kindof more appropriate place&#xD;&#xA;&#xD;&#xA;game world basics to me are about finding common grounds.&#xD;&#xA;&#xD;&#xA;the world going forward in time. so are all active elements (player, dropped items, enemies, npc's) but all passive elements are not (block of stone, tree, house) therefor i'd use 2 interfaces ActiveElement and PassiveElement. the active element could have a stepintime() function which is called by the game world each time itself steps in time. both elements could have a render() function which draws the element whenever the gameworld is drawn on a canvas.&#xD;&#xA;&#xD;&#xA;then all enemies should call their ai to determine their next step in time as well as checking collision with any other objects and whatever that means (trees bullets players etc) same goes basically for every other element.&#xD;&#xA;&#xD;&#xA;this is to me the most basic architecture in gameworlds.&#xD;&#xA;&#xD;&#xA;then there's the issue of performance where it might be better to put certain things in their own threads and let them run (enemy ai that is checking the position and status of his avatar each cycle and makes input which is read with each step in time) but there i dont have enough experience in to elaborate. then you should go to a gamedev site (eg as karim79 said).&#xD;&#xA;&#xD;&#xA;implemented elements can have their own attributes then and is easy to expand(health, stats)&#xD;&#xA;and write an interpreter that reads simpel scripts that communicates with the gameworld adding enemies etc.&#xD;&#xA;&#xD;&#xA;ciao" />
  <row Id="25199" PostHistoryTypeId="25" PostId="11687" RevisionGUID="db0a8421-9fe5-46a3-8210-08b461c0423e" CreationDate="2011-04-27T18:09:37.483" Comment="http://twitter.com/#!/StackGameDev/status/63303804048781312" />
  <row Id="25200" PostHistoryTypeId="2" PostId="11689" RevisionGUID="eddd4c30-35b2-445d-9386-dc5605035354" CreationDate="2011-04-27T18:10:41.447" UserId="3468" Text="I guess I'll post my answer here to...&#xD;&#xA;&#xD;&#xA;I usually have a layout similar to [this][1].&#xD;&#xA;&#xD;&#xA;`GameObject` has functions such as `Draw()` and `Move()`. Then `Enemy` sets up some more functions and variables for implementing Artificial Intelligence in `Goblin` and `Unicorn`. `Player` contains all the stuff for moving the player in `Move()`.&#xD;&#xA;&#xD;&#xA;Thats just a general idea of what I would do. Its different for every game, depending on what type of game it is and how you play it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.theadamgaskins.com/upload/318_Untitaled.png" />
  <row Id="25201" PostHistoryTypeId="2" PostId="11690" RevisionGUID="184823b5-ed5d-4c39-800f-056e7650d4f8" CreationDate="2011-04-27T19:06:33.360" UserId="6985" Text="A friend and I want to try making an iPhone game, but we don't really have a budget to speak of. From what I've found, I need the iOS SDK, and that costs money. Is there really no way to make an iPhone game on a $0 budget? If not, can I do so for the Android?" />
  <row Id="25202" PostHistoryTypeId="1" PostId="11690" RevisionGUID="184823b5-ed5d-4c39-800f-056e7650d4f8" CreationDate="2011-04-27T19:06:33.360" UserId="6985" Text="Can You Make an iPhone game for Free?" />
  <row Id="25203" PostHistoryTypeId="3" PostId="11690" RevisionGUID="184823b5-ed5d-4c39-800f-056e7650d4f8" CreationDate="2011-04-27T19:06:33.360" UserId="6985" Text="&lt;iphone&gt;&lt;costs&gt;" />
  <row Id="25204" PostHistoryTypeId="2" PostId="11691" RevisionGUID="2a2e8671-ac84-411a-abe4-fdb8c1467aa1" CreationDate="2011-04-27T19:15:35.357" UserId="6937" Text="If you want to publish or test it then no. The minimum you can spend to publish a game is the yearly $99 fee that you are talking about for the SDK. Apple simply won't let you post a game to the app store if you aren't paying to be a developer.&#xD;&#xA;&#xD;&#xA;If you want to make one and maybe publish it later, find a game engine like Unity3d that will let you make it for other platforms and easily port it to iphone when you're ready. That's the route my team took a few years ago when we were just starting. We made our game for Unity's browser plugin then ported it over to IOS when we bought the license.&#xD;&#xA;&#xD;&#xA;EDIT: FYI, unity and a few other engines are completely free just for this purpose. Once you want to publish to iPhone though you will need to also buy the unity IOS basic license at minimum which is $400, but if you have a game worth anything you may find somebody willing to pay for your licenses for a percent of the game." />
  <row Id="25205" PostHistoryTypeId="2" PostId="11692" RevisionGUID="6a3acf63-147c-435c-bff6-f066b3b71258" CreationDate="2011-04-27T19:19:16.733" UserId="6558" Text="The Airplay SDK: http://www.airplaysdk.com/ as well as some other other mobile SDKs, will let you make iOS games for free, but I believe it will still cost $100 to get your game on the app store, no matter what tool you use.&#xD;&#xA;&#xD;&#xA;The Android is free to develop for and deploy to.  You can also make an HTML5 web game, and people with iPhones can play it in their browser, at no cost to you (or them)." />
  <row Id="25206" PostHistoryTypeId="5" PostId="11683" RevisionGUID="94a6fe75-4795-4d58-8bfc-046832c18643" CreationDate="2011-04-27T19:28:18.663" UserId="6932" Comment="added 86 characters in body" Text="I'm writing a small 2d isometric engine in C++ and I'm trying to implement real time shadow casting. I followed a simple approach described on [this page][3] and here is the result (light is located at the same position than the yellow cube):&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The result is very nice but there are missing shadows on walls and on the top of cubes. Here is an example of how it should look like (I've draw expected shadows in green):&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;All the cubes drawn are simply made of 3 2D quads located at a X-Y position and with a Z depth (z = x + y). I use OpenGL with an orthographic matrix (glOrtho). Shadows are drawn using the stencil buffer.&#xD;&#xA;&#xD;&#xA;I'm looking for resources or solutions that would help me complete this shadow casting implementation.&#xD;&#xA;&#xD;&#xA;Thanks a lot!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/3eMl8.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/YZ0gy.png&#xD;&#xA;  [3]: http://www.hesselboom.com/experimenting-with-simulation-of-hard-edged-shadows" />
  <row Id="25207" PostHistoryTypeId="2" PostId="11693" RevisionGUID="9895b796-c27c-4005-ad76-29cce46d232a" CreationDate="2011-04-27T19:56:00.023" UserId="4662" Text="Fundamentally, what you're looking for can't be done. You want to take a bunch of 2D objects and have them cast shadows as if they were 3D objects. If you want to have full 3D shadows, you need to have 3D objects." />
  <row Id="25208" PostHistoryTypeId="2" PostId="11694" RevisionGUID="4a5e2c33-e7cc-4495-8156-4d2e942dadf7" CreationDate="2011-04-27T20:27:31.377" UserId="6588" Text="None of the other answers addressed a basic misconception in your question: the iOS SDK does not cost any money. You can download Apple's developer tools for free. However you will only be able to test in the simulator for free; in order to deploy onto device you need to purchase the $99/year developer registration.&#xD;&#xA;&#xD;&#xA;The fee is for the ability to publish, not for the SDK. Subtle but important distinction." />
  <row Id="25209" PostHistoryTypeId="2" PostId="11695" RevisionGUID="674ec526-8532-4788-b8a1-36394492214a" CreationDate="2011-04-27T20:37:18.467" UserId="6887" Text="The craftyjs javascript game engine is in the process of creating a game builder that will assist the developer in map design, sprites, animations and that kind of stuff.&#xD;&#xA;&#xD;&#xA;Are there any good resources on how a game builder should be crafted, both from an ease of use point of view(you need these features, and the world should be displayed like this) and a technical point of view(You need to store the data like this). I figure there should be blogs and articles written by players in the traditional console and pc game industry that we can learn from, but i have a hard time finding any." />
  <row Id="25210" PostHistoryTypeId="1" PostId="11695" RevisionGUID="674ec526-8532-4788-b8a1-36394492214a" CreationDate="2011-04-27T20:37:18.467" UserId="6887" Text="resources on creating world editor / game IDE" />
  <row Id="25211" PostHistoryTypeId="3" PostId="11695" RevisionGUID="674ec526-8532-4788-b8a1-36394492214a" CreationDate="2011-04-27T20:37:18.467" UserId="6887" Text="&lt;tools&gt;&lt;browser-based-games&gt;&lt;map-editor&gt;" />
  <row Id="25212" PostHistoryTypeId="5" PostId="11694" RevisionGUID="5c352ac2-8772-45fc-aa15-724e08181d98" CreationDate="2011-04-27T20:48:17.730" UserId="6588" Comment="added 113 characters in body" Text="None of the other answers addressed a basic misconception in your question: the iOS SDK does not cost any money. You can download Apple's developer tools for free. However you will only be able to test in the simulator for free; in order to deploy onto device you need to purchase the $99/year developer registration.&#xD;&#xA;&#xD;&#xA;The fee is for the ability to publish, not for the SDK. Subtle but important distinction.&#xD;&#xA;&#xD;&#xA;So no, there is no way to make an iPhone game without paying a fee. Android does not have any fee to publish." />
  <row Id="25213" PostHistoryTypeId="2" PostId="11696" RevisionGUID="460f478c-a0f4-4cde-b96c-e899ae0b32d7" CreationDate="2011-04-27T20:58:42.570" UserId="982" Text="I've recently come across GWT (Google Web Toolkit) and have been amazed by it. I was wondering if anyone has ever put it to use making a video game? And if they did, what their experience was, whether it was worth it and whether the game was any good." />
  <row Id="25214" PostHistoryTypeId="1" PostId="11696" RevisionGUID="460f478c-a0f4-4cde-b96c-e899ae0b32d7" CreationDate="2011-04-27T20:58:42.570" UserId="982" Text="Google Web Toolkit: Ever used for making games?" />
  <row Id="25215" PostHistoryTypeId="3" PostId="11696" RevisionGUID="460f478c-a0f4-4cde-b96c-e899ae0b32d7" CreationDate="2011-04-27T20:58:42.570" UserId="982" Text="&lt;web&gt;&lt;google-web-toolkit&gt;" />
  <row Id="25216" PostHistoryTypeId="25" PostId="11690" RevisionGUID="03b9c0f3-7cfb-4dd8-bf03-458f1c1c0a2b" CreationDate="2011-04-27T21:09:37.457" Comment="http://twitter.com/#!/StackGameDev/status/63349101466624000" />
  <row Id="25217" PostHistoryTypeId="5" PostId="11692" RevisionGUID="1239e989-6bc3-4eb1-b1c7-574613086819" CreationDate="2011-04-27T21:52:35.333" UserId="6558" Comment="added 81 characters in body" Text="The Airplay SDK: http://www.airplaysdk.com/ as well as some other other mobile SDKs, will let you make iOS games for free, but I believe it will still cost $100 to get your game on the app store, no matter what tool you use.&#xD;&#xA;&#xD;&#xA;The Android is free to develop for and deploy to (Edit: per the comment by Ricket, it's actually $25 to publish on the app store).  You can also make an HTML5 web game, and people with iPhones can play it in their browser, at no cost to you (or them)." />
  <row Id="25218" PostHistoryTypeId="2" PostId="11697" RevisionGUID="f901e6bd-ba30-4b70-a7c6-1944acf32f58" CreationDate="2011-04-27T21:54:29.137" UserId="5044" Text="I'm seriously thinking of building a space opera game which would share some of Machiavelli The Prince aspects regarding commerce: each player will be able to extract/build/buy/sell/donate a wide range of products (from ore to spaceships roughly). &#xD;&#xA;&#xD;&#xA;However, I'm struggling with the economy aspect of it. Should the game defines the prices once and for all? Shall each player be able to determine his own buy/sell prices and if so, how ? How not to over engineer such a mechanism while still making it attractive ?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;best&lt;br/&gt;&#xD;&#xA;space borg" />
  <row Id="25219" PostHistoryTypeId="1" PostId="11697" RevisionGUID="f901e6bd-ba30-4b70-a7c6-1944acf32f58" CreationDate="2011-04-27T21:54:29.137" UserId="5044" Text="Guidance for building a proper in game economy" />
  <row Id="25220" PostHistoryTypeId="3" PostId="11697" RevisionGUID="f901e6bd-ba30-4b70-a7c6-1944acf32f58" CreationDate="2011-04-27T21:54:29.137" UserId="5044" Text="&lt;game-design&gt;&lt;economy&gt;" />
  <row Id="25221" PostHistoryTypeId="5" PostId="11697" RevisionGUID="6f125816-bc9c-40d5-8033-fdd193efe04b" CreationDate="2011-04-27T21:57:14.667" UserId="51" Comment="deleted 53 characters in body" Text="I'm seriously thinking of building a space opera game which would share some of Machiavelli The Prince aspects regarding commerce: each player will be able to extract/build/buy/sell/donate a wide range of products (from ore to spaceships roughly). &#xD;&#xA;&#xD;&#xA;However, I'm struggling with the economy aspect of it. Should the game defines the prices once and for all? Shall each player be able to determine his own buy/sell prices and if so, how ? How not to over engineer such a mechanism while still making it attractive ?" />
  <row Id="25222" PostHistoryTypeId="5" PostId="11694" RevisionGUID="afbcc8db-b754-42b6-aa84-42417105e45f" CreationDate="2011-04-27T21:59:48.697" UserId="6588" Comment="added 66 characters in body" Text="None of the other answers addressed a basic misconception in your question: the iOS SDK does not cost any money. You can download Apple's developer tools for free. However you will only be able to test in the simulator for free; in order to deploy onto device you need to purchase the $99/year developer registration.&#xD;&#xA;&#xD;&#xA;The fee is for the ability to publish, not for the SDK. Subtle but important distinction.&#xD;&#xA;&#xD;&#xA;So no, there is no way to make an iPhone game without paying a fee. Android does not have any fee to deploy to device, but the individual marketplaces have their own policies." />
  <row Id="25223" PostHistoryTypeId="2" PostId="11698" RevisionGUID="075f0665-e8ce-45a8-b7e2-a15db055ed80" CreationDate="2011-04-27T22:45:52.013" UserId="4662" Text="The main thing players want from an economy is control. A player wants to feel like advanced knowledge of the economy will yield economic rewards. This does place some responsibility on the dev but a lot comes from the players. I'm gonna refer to World of Warcraft here because I have quite a lot of experience with the in-game economy there.&#xD;&#xA;&#xD;&#xA;Firstly, the developer's interaction with the economy should involve controlling supply and demand- that is, Item X is rare and only used in high-end play, so it's expensive. This basically entails understanding the value of each item, in general, so that you can implement point #2. Remember that specific players have specific playstyles, and may as a group trend towards favouring supplying some items over others, even if objectively they should have the same value. This means monitoring the in-game economy and trying to keep it balanced.&#xD;&#xA;&#xD;&#xA;Secondly, you have to control the income and outcome of the economy, globally. Remember that money transferred between players remains in the system and is not infact lost. Buying items from computer-controlled vendors is an example of economic outcome- that money is permanently lost to the player economy. If there is too much income compared to outcome, money will devalue and you'll suffer large inflation. This can happen when unintended things occur, including bugs or exploits, that dramatically increase the player economy's income and often happens with new content. If there is too little income, then players will spend almost all their time farming money because they simply can't keep enjoying the content without a sufficient supply for, say, consumables/upgrades/whatever. This was especially true of the early days of World of Warcraft, where virtually all computer-controlled vendors charged very excessive prices for their wares, including essential skills. This means that even very low-level players had to spend a lot of time looking for money to keep up, instead of enjoying the content. This is easily seen by comparing the prices and rewards for quests and basic goods- in the expansions, the money earned by simple levelling was hugely increased, and the cost of basic essentials like mounts was dramatically decreased.&#xD;&#xA;&#xD;&#xA;Income- quest rewards, drops, etc. Outcome- repair bills, buying from vendors, and soulbinding. If you spend 1000g buying an item, then it'll be soulbound to you and when you come to upgrade, that money is just gone, it's not transferred, even if you get it disenchanted then you won't get it all back by a long way. This means that you can inflict costs on your playerbase without necessarily making them pony up.&#xD;&#xA;&#xD;&#xA;The final thing you want to offer player-based economies is organization. For example, in WoW then the most common organized economic activity is the Auction House. If you don't offer organized economy then it will be difficult for players to take meaningful control of their own economy and use it for their own ends. Of course, the degree to which you want to offer this depends on the degree to which you want to make an economic game, such as EvE.&#xD;&#xA;&#xD;&#xA;In the end, you want to ensure that players can afford in most scenarios the basics that they need- consumables, item upgrades as befits some new status that you choose to give them, etc, and then if you want, you can make them work their socks off for the more elite status." />
  <row Id="25224" PostHistoryTypeId="2" PostId="11699" RevisionGUID="0e7e448b-6299-4146-8e53-c5d710a86c89" CreationDate="2011-04-27T22:52:51.587" UserId="6994" Text="For roof and walls, you may try to determine intersections between your wall segments and generated shadows regions. You need two pass rendering of your shadows. First one will do what you are doing today (in memory storage). Second pass will calculate intersections of roof and wall. Last stage is real rendering. DeadMG is wrong, you can do that.&#xD;&#xA;&#xD;&#xA;Note: for roof you have to intersect shadow area and roof area." />
  <row Id="25225" PostHistoryTypeId="2" PostId="11700" RevisionGUID="6d149a53-1a8e-417b-8e2a-984185afd92e" CreationDate="2011-04-27T23:17:18.910" UserId="5021" Text="&gt; Or is this somehing that normal&#xD;&#xA;&gt; mapping doesn't require?&#xD;&#xA;&#xD;&#xA;That's right, normal mapping doesn't require this.&#xD;&#xA;&#xD;&#xA;In most cases the best way to do normal mapping is to store the normal map normals in tangent space. That is, a normal in the normal map pointing in the same direction as the surface normal is &lt;0,0,1&gt;. (This is why many normal maps are mostly blue, since they are stored in tangent space.)&#xD;&#xA;&#xD;&#xA;Instead of transforming every normal in the normal map into world space (as you're about to do), you can just transform the lights and camera into tangent space on the CPU before the draw call. Then no transformation of the normal map normals is needed.&#xD;&#xA;&#xD;&#xA;This means that you will do perhaps 2-10 matrix multiplications on the CPU, saving thousands or millions of transformations on the GPU.&#xD;&#xA;&#xD;&#xA;See this article for a more in depth explanation of normal mapping and tangent space:&#xD;&#xA;http://www.gamasutra.com/view/feature/1515/messing_with_tangent_space.php" />
  <row Id="25226" PostHistoryTypeId="2" PostId="11701" RevisionGUID="8371e140-3270-4702-8792-d828bb4b7610" CreationDate="2011-04-27T23:20:46.067" UserId="4513" Text="I think it is also highly dependent on how your overall application is structured.&#xD;&#xA;You should ideally separate functionality as much as possible.&#xD;&#xA;&#xD;&#xA;Naturally we all want to see a code example, so I'll give it my best shot. Though to be honest, this all means nothing without being related to your own specific examples. Perhaps just do some basic prototypes, and when it gets clunky (and it probably will), re-factor. Iterative design accomplishes so much more than if you try to plan it all at once; in which case you meet constant mental blocks; and may even lose motivation.&#xD;&#xA;&#xD;&#xA;    class Renderer;&#xD;&#xA;    &#xD;&#xA;    class Mesh {&#xD;&#xA;    	Vertex Data etc;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class WorldObject {&#xD;&#xA;    	Position, Rotation&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Movable {&#xD;&#xA;    	Velocity, Acceleration;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Terrain {&#xD;&#xA;    	WorldObject;&#xD;&#xA;    	Mesh;&#xD;&#xA;    &#xD;&#xA;    	draw() { Renderer.draw(Mesh, WorldObject); }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Entity {&#xD;&#xA;    	WorldObject;&#xD;&#xA;    	Mesh;&#xD;&#xA;    	Movable;&#xD;&#xA;&#xD;&#xA;    	update() {&#xD;&#xA;        	// update position based on velocity/accelerate&#xD;&#xA;    	    // render mesh&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class World {&#xD;&#xA;    	Terrain;&#xD;&#xA;    	Entities;&#xD;&#xA;    &#xD;&#xA;    	draw() {&#xD;&#xA;    	    	Terrain.draw();&#xD;&#xA;    	    	foreach Entities&#xD;&#xA;    	    	{&#xD;&#xA;        	      	entity.update();&#xD;&#xA;            	}&#xD;&#xA;    	}&#xD;&#xA;    }" />
  <row Id="25227" PostHistoryTypeId="5" PostId="11701" RevisionGUID="c5fb89f6-0657-4180-8d34-781c7d034fbc" CreationDate="2011-04-27T23:25:53.347" UserId="4513" Comment="added 163 characters in body" Text="I think it is also highly dependent on how your overall application is structured.&#xD;&#xA;You should ideally separate functionality as much as possible.&#xD;&#xA;&#xD;&#xA;Naturally we all want to see a code example, so I'll give it my best shot. Though to be honest, this all means nothing without being related to your own specific examples. Perhaps just do some basic prototypes, and when it gets clunky (and it probably will), re-factor. Iterative design accomplishes so much more than if you try to plan it all at once; in which case you meet constant mental blocks; and may even lose motivation.&#xD;&#xA;&#xD;&#xA;    class Renderer;&#xD;&#xA;    &#xD;&#xA;    class Mesh {&#xD;&#xA;    	Vertex Data etc;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class WorldObject {&#xD;&#xA;    	Position, Rotation&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Movable {&#xD;&#xA;    	Velocity, Acceleration;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Terrain {&#xD;&#xA;    	WorldObject;&#xD;&#xA;    	Mesh;&#xD;&#xA;    &#xD;&#xA;    	draw() { Renderer.draw(Mesh, WorldObject); }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Entity {&#xD;&#xA;    	WorldObject;&#xD;&#xA;    	Mesh;&#xD;&#xA;    	Movable;&#xD;&#xA;&#xD;&#xA;    	update() {&#xD;&#xA;        	// update position based on velocity/accelerate&#xD;&#xA;    	    // render mesh&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class World {&#xD;&#xA;    	Terrain;&#xD;&#xA;    	Entities;&#xD;&#xA;    &#xD;&#xA;    	draw() {&#xD;&#xA;    	    	Terrain.draw();&#xD;&#xA;    	    	foreach Entities&#xD;&#xA;    	    	{&#xD;&#xA;        	      	entity.update();&#xD;&#xA;            	}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Obvious points, avoid code duplication, but don't go inheritance crazy, otherwise you will run into pitfalls really quickly because of cross-tree dependencies." />
  <row Id="25228" PostHistoryTypeId="5" PostId="11701" RevisionGUID="75750654-13d2-4217-a60f-d03c195d8afe" CreationDate="2011-04-27T23:35:36.727" UserId="4513" Comment="added 695 characters in body; added 143 characters in body; added 147 characters in body" Text="I think it is also highly dependent on how your overall application is structured.&#xD;&#xA;You should ideally separate functionality as much as possible.&#xD;&#xA;&#xD;&#xA;Naturally we all want to see a code example, so I'll give it my best shot. Though to be honest, this all means nothing without being related to your own specific examples. Perhaps just do some basic prototypes, and when it gets clunky (and it probably will), re-factor. Iterative design accomplishes so much more than if you try to plan it all at once; in which case you meet constant mental blocks; and may even lose motivation.&#xD;&#xA;&#xD;&#xA;    class Renderer;&#xD;&#xA;    &#xD;&#xA;    class Mesh {&#xD;&#xA;    	Vertex Data etc;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class WorldObject {&#xD;&#xA;    	Position, Rotation&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Movable {&#xD;&#xA;    	Velocity, Acceleration;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Terrain {&#xD;&#xA;    	WorldObject;&#xD;&#xA;    	Mesh;&#xD;&#xA;    &#xD;&#xA;    	draw() { Renderer.draw(Mesh, WorldObject); }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Entity {&#xD;&#xA;    	WorldObject;&#xD;&#xA;    	Mesh;&#xD;&#xA;    	Movable;&#xD;&#xA;&#xD;&#xA;        draw() { Renderer.draw(Mesh, WorldObject); }&#xD;&#xA;    	update() {&#xD;&#xA;            // update position based on velocity/accelerate&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class World {&#xD;&#xA;    	Terrain;&#xD;&#xA;    	Entities;&#xD;&#xA;&#xD;&#xA;    	draw() {&#xD;&#xA;    	    	Terrain.draw();&#xD;&#xA;    	    	foreach Entities&#xD;&#xA;    	    	{&#xD;&#xA;        	      	entity.draw();&#xD;&#xA;            	}    	&#xD;&#xA;    	}&#xD;&#xA;    	update() {&#xD;&#xA;    	    	foreach Entities&#xD;&#xA;    	    	{&#xD;&#xA;        	      	entity.update();&#xD;&#xA;            	}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Animation {&#xD;&#xA;    	Animation data etc;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class AnimatedEntity : Entity {&#xD;&#xA;    	Animations;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Health;&#xD;&#xA;    class Gear;&#xD;&#xA;    &#xD;&#xA;    class Character {&#xD;&#xA;    	AnimatedEntity;&#xD;&#xA;    	Health;&#xD;&#xA;        Gear;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Situation {&#xD;&#xA;    	Entities enemies;&#xD;&#xA;    	Entities obstacles;&#xD;&#xA;    	Position;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class AI {&#xD;&#xA;    	Brain;&#xD;&#xA;    &#xD;&#xA;    	React(Character, Situation) { ... }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class NPC {&#xD;&#xA;    	Character;&#xD;&#xA;    	AI;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This could go on forever; the implementation of functions you described (spawn enemy etc), are just methods you can write that create these objects with particular properties, or modify them.&#xD;&#xA;&#xD;&#xA;Obvious points, avoid code duplication, but don't go inheritance crazy, otherwise you will run into pitfalls really quickly because of cross-tree dependencies. I have greatly avoided inheritance here, simply to make a point, but if you find it appropriate it, I'm sure you can implement it differently." />
  <row Id="25229" PostHistoryTypeId="2" PostId="11702" RevisionGUID="df9cae7e-fa87-4ce3-899c-1c4bcd2d0da6" CreationDate="2011-04-27T23:38:26.010" UserId="704" Text="Look into move ordering and principle variation search" />
  <row Id="25230" PostHistoryTypeId="2" PostId="11703" RevisionGUID="f487f68b-f1e4-4397-ad3f-0a86ee5bfd29" CreationDate="2011-04-28T00:03:55.627" UserId="6383" Text="I am in charge of a game development club at my school and I'd like to work on a project this summer that I could use as a tutorial next semester. I have never done anything quite like this so I was wondering if anyone had any guide lines or ideas.&#xD;&#xA;&#xD;&#xA;What I want to do basically is make a very simple game. Something like a top-down shooter where enemies come rush in for you to kill them and pick up some loot. However, I want everything to be very easily modified. The people in the club have little game development experience, so if I could set up my game in such a way that people could modify and add functionality with ease, it would be great for them.&#xD;&#xA;&#xD;&#xA;Stuff like having an enemy class where the behavior is easy to play with, or making guns shoot differently/adding new guns, and new loot. Even adding new elements to the game. What would be the best way to build the game to allow this kind of malleability? &#xD;&#xA;&#xD;&#xA;We are an XNA based club btw, if that has any relevance. " />
  <row Id="25231" PostHistoryTypeId="1" PostId="11703" RevisionGUID="f487f68b-f1e4-4397-ad3f-0a86ee5bfd29" CreationDate="2011-04-28T00:03:55.627" UserId="6383" Text="Making a game as a tutorial?" />
  <row Id="25232" PostHistoryTypeId="3" PostId="11703" RevisionGUID="f487f68b-f1e4-4397-ad3f-0a86ee5bfd29" CreationDate="2011-04-28T00:03:55.627" UserId="6383" Text="&lt;game-design&gt;&lt;tutorials&gt;&lt;modification&gt;&lt;accessibility&gt;" />
  <row Id="25233" PostHistoryTypeId="25" PostId="11697" RevisionGUID="29cd7c2e-3ad1-4e35-9ceb-cef139dcffc4" CreationDate="2011-04-28T00:09:38.263" Comment="http://twitter.com/#!/StackGameDev/status/63394403766636544" />
  <row Id="25234" PostHistoryTypeId="2" PostId="11704" RevisionGUID="85caf7f5-be94-40eb-af12-93379bbffd0d" CreationDate="2011-04-28T00:11:21.660" UserId="6908" Text="You've got a few different options. My preferred option is to (even if its not), make it look like a real world (or as it appears in your case, real galaxy) economy.&#xD;&#xA;&#xD;&#xA;To do this, you want each region/store to have an initial price. Such an initial price should be broadly similar over every store, and then similar to the prices nearby. You could generate them using a very stretched, very blurred/low granular perlin noise generator. As well, a regions price should be determined by what is in the region. For instance, if there is a lot of iron available in a region, iron should be slightly cheaper owing to the standard principals of supply and demand. A nice touch is to change the landscape according to the economy - if iron is slowly getting more expensive, finding occasional iron sources being built.&#xD;&#xA;&#xD;&#xA;These prices should then slowly change. You can make it look like supply and demand is working in the background by moving the prices slowly up and down generally, whilst adding some variation between regions. Regional pricing can then be influenced by some events as well. For instance, if the seller is selling massive, economy altering quantities of widgets, the price should be going down - a reasonable amount in the region, and a small amount globally. Which still doesn't preclude you from having a situation where there is a massive oversupply or lull in supply in one particular place - making the price far lower or higher respectively, creating the opportunity to 'exploit' the economy to provide or take away goods for massive profits. As such opportunities would be exploited by many people who can, you slowly push the price back to normal as the lull is fulfilled. A nice touch is to visibly return the economy to normal as the player does.&#xD;&#xA;&#xD;&#xA;The selling/buying prices should be different, but similar - enough that you want to encourage your players to actually sell things (if that is what you want them to do in the game). In the real world, profit margins vary, but if your sellers are selling goods for more then about 30% more then what they're buying them, players (particularly in a game where you want to encourage money making via trade) will feel a bit ripped off. My selling would be to offer two spot prices - a buy, and sell price. You'd see them slowly moving up or down (like watch them move by a few cents as you're buying them), and even on occasion as somebody 'makes a big order', see the price suddenly jump up by 2 or 3% and then slowly go down.&#xD;&#xA;&#xD;&#xA;Determining individual item prices can be done by rareity in the same way. The more rare and demanded an item, the more it should cost in general. The harder it is to get an item in a specific region, the more it should cost. The more that is available at a specific place, the less it should cost at that place. The more that is available everywhere, the less it should cost everywhere.&#xD;&#xA;&#xD;&#xA;You don't have to fully simulate an economy to make a game feel like it has one that can be used, and is an actual influence on the world. If you remember basic supply demand [(You can see a more full description Here)][1], and make it look like that its workings (whether or not it actually is), your economy will feel real and generally be very playable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Supply_and_demand" />
  <row Id="25235" PostHistoryTypeId="5" PostId="11692" RevisionGUID="529076c4-c398-4200-a058-2a6ea93ab94c" CreationDate="2011-04-28T00:13:02.347" UserId="6558" Comment="added 48 characters in body" Text="The Airplay SDK: http://www.airplaysdk.com/ as well as some other other mobile SDKs, will let you make iOS games for free (in the sense that you don't have to buy a Mac), but I believe it will still cost $100 to get your game on the app store, no matter what tool you use.&#xD;&#xA;&#xD;&#xA;The Android is free to develop for and deploy to (Edit: per the comment by Ricket, it's actually $25 to publish on the app store).  You can also make an HTML5 web game, and people with iPhones can play it in their browser, at no cost to you (or them)." />
  <row Id="25236" PostHistoryTypeId="2" PostId="11705" RevisionGUID="057333e4-ab5b-47d3-83bb-8e4a54119b81" CreationDate="2011-04-28T01:29:48.190" UserId="6997" Text="I'm looking for a open-source 3D graphics and physics engine specialized in golf simulation.&#xD;&#xA;&#xD;&#xA;The preferred engine would be have short learning curve, supports Windows platform and Java or C++ and Lua/Python support for scripting, also prefer something like outdoor golf plane scene with weather system support, I'm new to this area and would love to hear all of your advice.&#xD;&#xA;&#xD;&#xA;I'm just come from stackoverflow site, @mikera there recommends jMonkeyEngine, it sounds a fit, but I'm not sure if there's other ideal candidate engine?" />
  <row Id="25237" PostHistoryTypeId="1" PostId="11705" RevisionGUID="057333e4-ab5b-47d3-83bb-8e4a54119b81" CreationDate="2011-04-28T01:29:48.190" UserId="6997" Text="Need an ideal opensource 3D engine for building Golf simulation game" />
  <row Id="25238" PostHistoryTypeId="3" PostId="11705" RevisionGUID="057333e4-ab5b-47d3-83bb-8e4a54119b81" CreationDate="2011-04-28T01:29:48.190" UserId="6997" Text="&lt;opengl&gt;&lt;3d-engines&gt;&lt;open-source&gt;" />
  <row Id="25239" PostHistoryTypeId="2" PostId="11706" RevisionGUID="8d529b95-baf5-4f6b-88a2-535e3fa92419" CreationDate="2011-04-28T01:35:54.957" UserId="6998" Text="I have a few hundred VBOs. I want to only draw a subset of the VBOs each frame.&#xD;&#xA;&#xD;&#xA;Is there anything faster than binding and drawing each VBO? Is there a batched draw command for multiple VBOs?&#xD;&#xA;&#xD;&#xA;1&gt; How do I bind multiple VBOs&#xD;&#xA;&#xD;&#xA;2&gt; Is there a version of glMultiDrawElements for sets of VBOs?" />
  <row Id="25240" PostHistoryTypeId="1" PostId="11706" RevisionGUID="8d529b95-baf5-4f6b-88a2-535e3fa92419" CreationDate="2011-04-28T01:35:54.957" UserId="6998" Text="Drawing a set of VBOs with one draw command in OpenGL. Is there a glMultiDrawElements for VBOs?" />
  <row Id="25241" PostHistoryTypeId="3" PostId="11706" RevisionGUID="8d529b95-baf5-4f6b-88a2-535e3fa92419" CreationDate="2011-04-28T01:35:54.957" UserId="6998" Text="&lt;opengl&gt;" />
  <row Id="25242" PostHistoryTypeId="2" PostId="11707" RevisionGUID="08b25839-8649-427b-af7a-e3893fe80c7f" CreationDate="2011-04-28T01:39:18.980" UserId="6996" Text="A traditional way to accomplish this goal in game development is to use a data-driven architecture for the game systems.&#xD;&#xA;&#xD;&#xA;In essence, this means that code does not implement a particular type of weapon (a gun) with explicitly defined values for its range/damage/penetration rather it populates the generic concepts of a ranged weapon (range/damage/penetration...) from an external (to the code) data source.  This external source can vary from parse-able (perhaps XML) files read in from disk, to binary files or database elements generated via tools internal or external to the game engine itself.&#xD;&#xA;&#xD;&#xA;Defining something like an enemy, the AI system might be designed to support some number of generic behaviors (aggressive, defensive, support, coward) which are then tweaked by data driven elements.&#xD;&#xA;&#xD;&#xA;My New Enemy, starts with the aggressive base AI behavior with data-driven values for:&#xD;&#xA; -ignore players &gt; my level + X&#xD;&#xA; -pursue players up to X units beyond spawn point&#xD;&#xA; -flee when health &lt; X&#xD;&#xA; -ranged ability priorities&#xD;&#xA; -melee ability priorities (for when players get too close)&#xD;&#xA;&#xD;&#xA;A more complicated data driven scheme might allow the definition of specific data points (events) where an AI state transitions (finite state machine) to another state (or even a chance to transition to one of N other states) allowing your users to define a complicated hierarchy of behaviors.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All of this is of course more work than just coding explicitly a behavior, but its a fun challenge to enable users to produce content without modification of the source.  &#xD;&#xA;&#xD;&#xA;There are bonus points to be achieved:&#xD;&#xA;&#xD;&#xA; - if you can dynamically update data and have the changes reflected within the game engine without restarting the application&#xD;&#xA; - if you create user friendly UIs over the data allowing users to use an interface to interact with the data rather than directly editing text (xml, or whatever) files&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For a tutorial game targeted as a more technical crowd, most of the work is instead in designed classes/objects that expose clean interfaces for the users to extend which in turn may also be data-driven.&#xD;&#xA;" />
  <row Id="25243" PostHistoryTypeId="2" PostId="11708" RevisionGUID="e973f7ed-1fbb-4b79-8b19-0d59f646c063" CreationDate="2011-04-28T02:13:48.060" UserId="2734" Text="Try Ogre3D as a graphics engine and [bullet][1] as a physics engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/OgreBullet" />
  <row Id="25244" PostHistoryTypeId="25" PostId="11703" RevisionGUID="1e919150-4fb0-47d6-858a-e8f5499b5206" CreationDate="2011-04-28T03:09:38.757" Comment="http://twitter.com/#!/StackGameDev/status/63439704883867648" />
  <row Id="25245" PostHistoryTypeId="5" PostId="11703" RevisionGUID="58dccce2-4beb-4db4-823f-c3bb7238da3b" CreationDate="2011-04-28T03:11:49.220" UserId="962" Comment="deleted 69 characters in body; edited tags" Text="I am in charge of a game development club at my school and I'd like to work on a project this summer that I could use as a tutorial next semester. I have never done anything quite like this so I was wondering if anyone had any guide lines or ideas.&#xD;&#xA;&#xD;&#xA;What I want to do basically is make a very simple game. Something like a top-down shooter where enemies come rush in for you to kill them and pick up some loot. However, I want everything to be very easily modified. The people in the club have little game development experience, so if I could set up my game in such a way that people could modify and add functionality with ease, it would be great for them.&#xD;&#xA;&#xD;&#xA;Stuff like having an enemy class where the behavior is easy to play with, or making guns shoot differently/adding new guns, and new loot. Even adding new elements to the game. What would be the best way to build the game to allow this kind of malleability?" />
  <row Id="25246" PostHistoryTypeId="6" PostId="11703" RevisionGUID="58dccce2-4beb-4db4-823f-c3bb7238da3b" CreationDate="2011-04-28T03:11:49.220" UserId="962" Comment="deleted 69 characters in body; edited tags" Text="&lt;xna&gt;&lt;game-design&gt;&lt;tutorials&gt;&lt;modification&gt;&lt;accessibility&gt;" />
  <row Id="25247" PostHistoryTypeId="25" PostId="11705" RevisionGUID="ff48ac65-7078-4d8c-ace6-5279f4e382ed" CreationDate="2011-04-28T06:09:38.413" Comment="http://twitter.com/#!/StackGameDev/status/63485000993087488" />
  <row Id="25248" PostHistoryTypeId="2" PostId="11709" RevisionGUID="43248754-f736-45f0-9a8f-aeab62582ab6" CreationDate="2011-04-28T06:38:07.830" UserId="6941" Text="Basically, the title says it all. I've seen and worked with Django, Rails and a bit with Cake PHP. I'd like to know if there is a framework that is excellent for supporting casual, 2d, browser based game development. The closest that I've seen is flash, but I'd like to find something open source. Something that could handle both the graphics and communication to a database would be ideal. Any suggestions?" />
  <row Id="25249" PostHistoryTypeId="1" PostId="11709" RevisionGUID="43248754-f736-45f0-9a8f-aeab62582ab6" CreationDate="2011-04-28T06:38:07.830" UserId="6941" Text="Are there any web frameworks used primarily to produce games?" />
  <row Id="25250" PostHistoryTypeId="3" PostId="11709" RevisionGUID="43248754-f736-45f0-9a8f-aeab62582ab6" CreationDate="2011-04-28T06:38:07.830" UserId="6941" Text="&lt;browser-based-games&gt;&lt;casual-games&gt;" />
  <row Id="25251" PostHistoryTypeId="2" PostId="11710" RevisionGUID="a59371b6-b631-4858-9c17-3c0bd62f1949" CreationDate="2011-04-28T06:57:02.970" UserId="7001" Text="Hi i am developing a game in android just like Farmville by Zinga. In that game we have to place elements in the diamond shaped field with out overlapping each other.Now i did coding for placing the field inside the farm field but i cannot stop the problem of overlapping of the farm field. I Am attaching the code that i have down for all this some one plz help me....`try{&#xD;&#xA;&#xD;&#xA;if(bm1.getPixel((int)initX,(int)initY)!=0)&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;    if(bm1.getPixel((int)initX,(int)initY+20)!=0)&#xD;&#xA;&#xD;&#xA;      {&#xD;&#xA;&#xD;&#xA;      if(bm1.getPixel((int)initX-20,(int)initY)!=0)&#xD;&#xA;&#xD;&#xA;       {&#xD;&#xA;&#xD;&#xA;      if(bm1.getPixel((int)initX+20,(int)initY)!=0)&#xD;&#xA;&#xD;&#xA;          {&#xD;&#xA;&#xD;&#xA;              if(bm1.getPixel((int)initX,(int)initY-20)!=0)&#xD;&#xA;&#xD;&#xA;              {   &#xD;&#xA;&#xD;&#xA;            	             	 c.drawBitmap(bm,initX-30,initY-20, paint);&#xD;&#xA;&#xD;&#xA;              }&#xD;&#xA;         &#xD;&#xA;           }&#xD;&#xA;&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}catch(Exception e)&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;Toast.makeText(getContext(), e.toString(), Toast.LENGTH_SHORT);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;`" />
  <row Id="25252" PostHistoryTypeId="1" PostId="11710" RevisionGUID="a59371b6-b631-4858-9c17-3c0bd62f1949" CreationDate="2011-04-28T06:57:02.970" UserId="7001" Text="Operations on multiple overlapping layers not working" />
  <row Id="25253" PostHistoryTypeId="3" PostId="11710" RevisionGUID="a59371b6-b631-4858-9c17-3c0bd62f1949" CreationDate="2011-04-28T06:57:02.970" UserId="7001" Text="&lt;collision-detection&gt;" />
  <row Id="25254" PostHistoryTypeId="2" PostId="11711" RevisionGUID="3acec9ad-d879-4b6d-80d4-be291c5bb858" CreationDate="2011-04-28T07:02:59.553" UserId="20" Text="There are several game engines/frameworks emerging with HTML5. Here are some links that might be of interest:&#xD;&#xA;&#xD;&#xA; - [Impact Engine][1]&#xD;&#xA; - [LimeJS][2]&#xD;&#xA; - [Akihabara][3]&#xD;&#xA; - [Rocket Engine][4] (not available yet)&#xD;&#xA;&#xD;&#xA;Apart from the Rocket Engine, these engines just cover the client side of a game. So there's no direct communication to a database (unless you're using something like [Google Gears][5]). &#xD;&#xA;&#xD;&#xA;Depending on your game, you still have to implement some backend stuff in Ruby, Java, PHP, ASP or similar. IMHO any regular web-application framework will be sufficient for that. [Node.js][6] probably deserves a special mention, because you can implement the backend in the same language as your game (JavaScript).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://impactjs.com/&#xD;&#xA;  [2]: http://www.limejs.com/&#xD;&#xA;  [3]: http://www.kesiev.com/akihabara/&#xD;&#xA;  [4]: http://rocketpack.fi/engine/&#xD;&#xA;  [5]: http://gears.google.com/&#xD;&#xA;  [6]: http://nodejs.org/" />
  <row Id="25255" PostHistoryTypeId="17" PostId="11713" RevisionGUID="b90ce4ac-4e17-4851-ba0d-2d667e2b43b8" CreationDate="2011-04-28T07:55:10.797" UserId="-1" Comment="from http://stackoverflow.com/questions/5813660/internal-game-organization/5813684#5813684" Text="" />
  <row Id="25256" PostHistoryTypeId="17" PostId="11714" RevisionGUID="2a93b487-bc00-4e3d-88fc-e0513a04830a" CreationDate="2011-04-28T07:55:10.797" UserId="-1" Comment="from http://stackoverflow.com/questions/5813660/internal-game-organization/5813770#5813770" Text="" />
  <row Id="25257" PostHistoryTypeId="2" PostId="11713" RevisionGUID="d00670a9-d88a-43e7-b5f3-9ab0e572166a" CreationDate="2011-04-28T04:39:06.903" UserDisplayName="MigDus" Text="You need some [software engineering][1]. Also, you should study design patterns, &#xD;&#xA;&#xD;&#xA;&gt; [language-independent strategies for&#xD;&#xA;&gt; solving common object-oriented design&#xD;&#xA;&gt; problems][2]&#xD;&#xA;&#xD;&#xA;Go there, read and learn. Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Software_engineering&#xD;&#xA;  [2]: http://www.javacamp.org/designPattern/" />
  <row Id="25258" PostHistoryTypeId="2" PostId="11714" RevisionGUID="c7496f46-4a36-491b-819f-d8db1e4e0fc1" CreationDate="2011-04-28T04:53:42.337" UserDisplayName="Marty Wallace" Text="Good OOP is the sure way around complexity. It also helps a lot to consider your game as being made up of many individual pieces that can function on their own, rather than a giant mess of elements that all require each other to work at all. &#xD;&#xA;&#xD;&#xA;That way it seems more like you're adding features rather than amending your entire application to support newly created elements. The previous answer seems like a good resource - good luck :)" />
  <row Id="25259" PostHistoryTypeId="2" PostId="11712" RevisionGUID="97d90da4-fd41-44bd-abf9-6ef4e08e979d" CreationDate="2011-04-28T04:34:35.850" UserDisplayName="Harold Forrest" Text="world. I've been trying to make various sorts of games throughout the past few months, I've had several false starts (currently using python + pygame). I find that what happens is that I get a first pass of the basic mechanics working, and then I find it impossible to proceed because the internal organization of the game does not scale up well. What typically happens is that after I get a working prototype, the complexity of the code is at a manageable level. Then I add a new feature, and the complexity increases, and another feature, which leads to more complexity. Soon enough, the complexity is unmanageable - there are so many special cases that it becomes impossible to account for all of them.&#xD;&#xA;&#xD;&#xA;How should I deal with this kind of problem? Is there some kind of technique of abstraction that I am not applying?  Do you know of any resources or guides that might be useful here? Or am I just bad for not being able to deal with a little complexity?&#xD;&#xA;&#xD;&#xA;Thank you for your time" />
  <row Id="25260" PostHistoryTypeId="1" PostId="11712" RevisionGUID="97d90da4-fd41-44bd-abf9-6ef4e08e979d" CreationDate="2011-04-28T04:34:35.850" UserDisplayName="Harold Forrest" Text="Internal Game Organization" />
  <row Id="25261" PostHistoryTypeId="3" PostId="11712" RevisionGUID="97d90da4-fd41-44bd-abf9-6ef4e08e979d" CreationDate="2011-04-28T04:34:35.850" UserDisplayName="Harold Forrest" Text="&lt;untagged&gt;" />
  <row Id="25262" PostHistoryTypeId="17" PostId="11712" RevisionGUID="5e351697-1601-4165-b6c9-076c8659dd9f" CreationDate="2011-04-28T07:55:10.797" UserId="-1" Comment="from http://stackoverflow.com/questions/5813660/internal-game-organization" Text="" />
  <row Id="25263" PostHistoryTypeId="5" PostId="11710" RevisionGUID="df3bb983-b676-4dcb-9c65-b38de0883149" CreationDate="2011-04-28T08:03:12.097" UserId="20" Comment="cleaned up formatting, minor spelling changes" Text="Hi I am developing a game in android just like Farmville by Zinga. In that game we have to place elements in the diamond shaped field so the don't overlap each other. Now I did coding for placing the field inside the farm field but I cannot stop the problem of overlapping of the farm field. I Am attaching the code that I have down for all this someone please help me....&#xD;&#xA;&#xD;&#xA;    try{&#xD;&#xA;        if(bm1.getPixel((int)initX,(int)initY)!=0){&#xD;&#xA;            if(bm1.getPixel((int)initX,(int)initY+20)!=0){&#xD;&#xA;                if(bm1.getPixel((int)initX-20,(int)initY)!=0){&#xD;&#xA;                    if(bm1.getPixel((int)initX+20,(int)initY)!=0){&#xD;&#xA;                        if(bm1.getPixel((int)initX,(int)initY-20)!=0){&#xD;&#xA;                            c.drawBitmap(bm,initX-30,initY-20, paint);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }catch(Exception e) {&#xD;&#xA;        Toast.makeText(getContext(), e.toString(), Toast.LENGTH_SHORT);&#xD;&#xA;    }" />
  <row Id="25264" PostHistoryTypeId="2" PostId="11715" RevisionGUID="2affe98d-78f4-40b2-b746-530d80ed62d4" CreationDate="2011-04-28T08:06:05.933" UserId="20" Text="I wonder why you're choosing a pixel based collision detection here? A game like Farmville works with a tile-grid. I assume you have such a data-structure in your game that holds all the tiles? Why not simply query this data-structure and look up if a tile is already occupied? If yes, snap the new tile to an adjacent field, or simply prevent the user from dropping a new element there." />
  <row Id="25265" PostHistoryTypeId="5" PostId="11712" RevisionGUID="5308f29e-159b-40e8-88dc-a60a37a98f27" CreationDate="2011-04-28T08:10:29.037" UserId="20" Comment="added tags" Text="world. I've been trying to make various sorts of games throughout the past few months, I've had several false starts (currently using python + pygame). I find that what happens is that I get a first pass of the basic mechanics working, and then I find it impossible to proceed because the internal organization of the game does not scale up well. What typically happens is that after I get a working prototype, the complexity of the code is at a manageable level. Then I add a new feature, and the complexity increases, and another feature, which leads to more complexity. Soon enough, the complexity is unmanageable - there are so many special cases that it becomes impossible to account for all of them.&#xD;&#xA;&#xD;&#xA;How should I deal with this kind of problem? Is there some kind of technique of abstraction that I am not applying?  Do you know of any resources or guides that might be useful here? Or am I just bad for not being able to deal with a little complexity?" />
  <row Id="25266" PostHistoryTypeId="6" PostId="11712" RevisionGUID="5308f29e-159b-40e8-88dc-a60a37a98f27" CreationDate="2011-04-28T08:10:29.037" UserId="20" Comment="added tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;learning&gt;" />
  <row Id="25267" PostHistoryTypeId="25" PostId="11709" RevisionGUID="c8d595cb-f9d6-4d84-8b34-734a0ff7a6b4" CreationDate="2011-04-28T09:09:38.687" Comment="http://twitter.com/#!/StackGameDev/status/63530300898164736" />
  <row Id="25268" PostHistoryTypeId="2" PostId="11716" RevisionGUID="51e9d5c2-4511-4b80-82e5-e4c9efe0c6cf" CreationDate="2011-04-28T09:53:50.723" UserId="5494" Text="I guess that CCRenderTexture is what you are looking for.&#xD;&#xA;&#xD;&#xA;Take a look at [this example][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cocos2d-iphone.googlecode.com/svn-history/r1325/trunk/tests/RenderTextureTest.m" />
  <row Id="25269" PostHistoryTypeId="5" PostId="11715" RevisionGUID="f23a6df5-0fe9-4cf3-b94f-8a6f262569cc" CreationDate="2011-04-28T09:56:35.883" UserId="20" Comment="added some more information" Text="I wonder why you're choosing a pixel based collision detection here? A game like Farmville works with a tile-grid. I assume you have such a data-structure in your game that holds all the tiles? Why not simply query this data-structure and look up if a tile is already occupied? If yes, snap the new tile to an adjacent field, or simply prevent the user from dropping a new element there.&#xD;&#xA;&#xD;&#xA;**Update**:&#xD;&#xA;Have a look at the following screenshot:&#xD;&#xA;&#xD;&#xA;![farmville grid][1]&#xD;&#xA;&#xD;&#xA;I drew some lines (white) over it to show you the tile grid. The smallest grid size is probably the size of the small pink rhombus. Of course you can also use bigger tiles, like the 2x2 tile (also colored pink). The Farm-House is a 4x3 tile.&#xD;&#xA;&#xD;&#xA;When you place a new element on that grid, you can check if any other tile is already at that position. For a 2x2 tile, you'll only have to check 4 grid cells...&#xD;&#xA;&#xD;&#xA;It is of course up to you how coarse your grid should be.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1Pfue.png" />
  <row Id="25270" PostHistoryTypeId="2" PostId="11717" RevisionGUID="c589f58d-769f-45c5-9d4b-03242964bb98" CreationDate="2011-04-28T10:48:39.687" UserId="5896" Text="If you're looking for a few ideas on how get your project started and build it up step by step so it can be converted to a tutorial, have a look at [XNA Game Programming Adventures][1]. The author has several tutorials set up, with explanation and source code that increments step-by-step.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnagpa.net/index.html" />
  <row Id="25271" PostHistoryTypeId="25" PostId="11712" RevisionGUID="528d12eb-06df-4152-93a4-bc8b4a9c4827" CreationDate="2011-04-28T12:09:38.477" Comment="http://twitter.com/#!/StackGameDev/status/63575599234547712" />
  <row Id="25272" PostHistoryTypeId="2" PostId="11718" RevisionGUID="d78dc2bd-1242-49c7-a1fb-74f0941139da" CreationDate="2011-04-28T12:26:07.980" UserId="6341" Text="I'm trying to explore a little as to how I could make a simple '[dots and boxes][1]' game.&#xD;&#xA;&#xD;&#xA;The problem I'm facing is in what way to store which lines are allocated by who. The problem lies in the fact that all inner lines are shared by neighbour boxes. So I can't actually just have four variables on each box because the right line of upper left-hand box is actually the same as the left line of box next to it. So I'd need them to be stored in one variable.&#xD;&#xA;&#xD;&#xA;What technique of saving this data would be effective here?&#xD;&#xA;&#xD;&#xA;Thanks for any ideas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dots_and_Boxes" />
  <row Id="25273" PostHistoryTypeId="1" PostId="11718" RevisionGUID="d78dc2bd-1242-49c7-a1fb-74f0941139da" CreationDate="2011-04-28T12:26:07.980" UserId="6341" Text="How to store 'dots and boxes' data?" />
  <row Id="25274" PostHistoryTypeId="3" PostId="11718" RevisionGUID="d78dc2bd-1242-49c7-a1fb-74f0941139da" CreationDate="2011-04-28T12:26:07.980" UserId="6341" Text="&lt;game-mechanics&gt;&lt;memory-efficiency&gt;&lt;storage&gt;" />
  <row Id="25275" PostHistoryTypeId="2" PostId="11719" RevisionGUID="ebb980ec-5d6c-4df6-99a5-0c98bab359b8" CreationDate="2011-04-28T13:40:04.000" UserId="747" Text="The thing is, in web development, a large part of the presentation would typically be done on the server side (using a framework that embeds some sort of templating system to output HTML to the client). If you want to do interactive game, a lot of the work has to happen on the client side (in the browser), so the problem is not so much how you generate HTML, but rather how you make things move on the user's screen. &#xD;&#xA;&#xD;&#xA;For this client-side part, as mentioned, your choice are either Flash or JS (potentially using Canvas for modern browser).&#xD;&#xA;&#xD;&#xA;For the client-server-db communication part, any of the technology you mentioned would be fine. The browser and server can communicate using classic ajax calls if you need. &#xD;&#xA;&#xD;&#xA;I don't know of a framework that would handle both problems, but that's probably because they are really distinct, and happening on different side of the client-server mix." />
  <row Id="25276" PostHistoryTypeId="2" PostId="11720" RevisionGUID="f7824f20-96ec-4897-acfa-4d8805c12e4a" CreationDate="2011-04-28T13:41:53.310" UserId="7004" Text="I would suggest looking at the Java Game Development tutorial on www.thenewboston.com&#xD;&#xA;&#xD;&#xA;It may not be exactly what you're looking for in terms of dudes with weapons and all that jazz, but it gives a nice step by step breakdown of a number of key factors in game developement.  The presenter &quot;Bucky&quot; also has a chilled out, just-for-fun style of teaching.  Enjoy.&#xD;&#xA;" />
  <row Id="25277" PostHistoryTypeId="2" PostId="11721" RevisionGUID="0d5733df-379c-4187-acf2-9b6e790c7d6d" CreationDate="2011-04-28T13:56:15.003" UserId="6957" Text="There is an excellent, GIMP Plugin filter called Resynthesizer ([webpage here][1]) which, among other tricks, can make a tileable texture. Have a look at the section in that web page called &quot;Creating more of a texture&quot;.&#xD;&#xA;&#xD;&#xA;Once you have it installed, put your source texture in the middle of a larger image, select your source pixels (or just use your original image and select a subsection of it) and then 'select-&gt;invert' to get the bits you need to fill. As long as you give it enough pixel area to work with, I've found it tends to do a really nice job.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.logarithmic.net/pfh/resynthesizer" />
  <row Id="25278" PostHistoryTypeId="2" PostId="11722" RevisionGUID="0ac4f194-613a-4550-bf59-6e5b8608f368" CreationDate="2011-04-28T13:59:09.980" UserId="1929" Text="It's not actually a problem. What you need to do is make sure that lines are shared references, not simply variables.&#xD;&#xA;&#xD;&#xA;So if you have two boxes, A and B, sharing a line:&#xD;&#xA;&#xD;&#xA;    .  .   .&#xD;&#xA;     A | B&#xD;&#xA;    .  .   .&#xD;&#xA;&#xD;&#xA;Then a.RightLine and b.LeftLine both point to the same reference. Or, if it's a boolean, when the user clicks on the line, make sure you update both A and B to keep track of that fact.&#xD;&#xA;&#xD;&#xA;Another solution might be to keep a hash-map of lines, where the key is the indicies of both boxes plus the line side.&#xD;&#xA;&#xD;&#xA;So the above example would be something like:&#xD;&#xA;&#xD;&#xA;    lines[&quot;A, B&quot;] = solid&#xD;&#xA;&#xD;&#xA;Because you can uniquely identify a line with two boxes, since every pair of boxes only have one shared side." />
  <row Id="25279" PostHistoryTypeId="2" PostId="11723" RevisionGUID="94d0c680-c46e-4fc4-9e2e-49fb89650f79" CreationDate="2011-04-28T14:20:40.527" UserId="6365" Text="I am trying to automatically simulate the game experience in my programming game. I think Expect is the way to do it because it creates its own tty for the process, becoming independent process of the main process but I want that some key sequence is pressed down in some pattern, such as press the key Z down every minute or press this that with this that pauses, without really expecting any specific file descriptors. Is there some ready programs to automate this kind of high-level debugging?&#xD;&#xA;&#xD;&#xA;I have access to obsd and ubuntu.&#xD;&#xA;" />
  <row Id="25280" PostHistoryTypeId="1" PostId="11723" RevisionGUID="94d0c680-c46e-4fc4-9e2e-49fb89650f79" CreationDate="2011-04-28T14:20:40.527" UserId="6365" Text="How can I automate high-level user interactions to test correctness of my game?" />
  <row Id="25281" PostHistoryTypeId="3" PostId="11723" RevisionGUID="94d0c680-c46e-4fc4-9e2e-49fb89650f79" CreationDate="2011-04-28T14:20:40.527" UserId="6365" Text="&lt;testing&gt;&lt;playtesting&gt;&lt;debugging&gt;" />
  <row Id="25282" PostHistoryTypeId="2" PostId="11724" RevisionGUID="9a36f192-1f51-4ac0-814b-e6ef1c4de9cd" CreationDate="2011-04-28T14:29:53.300" UserId="6937" Text="There are ways to do the high level testing, but I'll throw in my 2 cents about this approach first! I think if you instead implement unit testing on each aspect of your game, it would be a better test. If you make some test that runs whatever function is called when you input that key sequence, just provide the unit test with all key sequences that you think might break the function. If it works for all key sequences, then you know the internals for that function are good and you can go on to test the link between the input box and that function. That test is easier and you only need to make sure the data gets passed to the function. After all of that works, then the testing above that is usually done by play testers, or in your case you. The top level test would need to be done either way.&#xD;&#xA;&#xD;&#xA;Now, to answer your question, before I knew what unit testing was, I used something called [workspace macro recorder][1] to do exactly what you're asking. Given, your program may need some sort of testing that I'm not thinking of, but if your program fits in the general scope that I'm thinking, my previous approach should be more helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tethyssolutions.com/macro-automation.htm" />
  <row Id="25283" PostHistoryTypeId="25" PostId="11718" RevisionGUID="96244602-3a3b-4d66-8092-fb3721a8b88c" CreationDate="2011-04-28T15:09:39.477" Comment="http://twitter.com/#!/StackGameDev/status/63620900200775680" />
  <row Id="25284" PostHistoryTypeId="2" PostId="11725" RevisionGUID="5db40130-6de1-4172-bc6c-1c31c1047fb7" CreationDate="2011-04-28T15:18:29.200" UserId="1887" Text="Usually this is solved by trying to stuff as much as possible into a single VBO. You can store multiple, unrelated primitives/meshes in a single VBO and then separate them with array indices/ranges.&#xD;&#xA;&#xD;&#xA;Binding multiple VBOs or drawing from a set of VBOs is not possible, AFAIK." />
  <row Id="25285" PostHistoryTypeId="2" PostId="11726" RevisionGUID="0a7d9bde-4fd3-4b36-a371-6e912a5e88f4" CreationDate="2011-04-28T15:23:54.140" UserId="6937" Text="I've been looking for a book that takes a bottom-up approach for graphics programming. So something that starts with 2d filtering, maybe moving into normal mapping, then ambient occlusion, etc.&#xD;&#xA;&#xD;&#xA;I ask because I've been lazy for the last few years in game development and always used an engine that handles this. I want to start writing some shaders for my games instead of relying on the cryptic ones that I've borrowed in the past. I think a very strong knowledge in this will help and I'm a bottom-up kind of learner so please help me out!&#xD;&#xA;&#xD;&#xA;I know the GPU Gems series is great, but they seem to be more like a cookbook than a bottom-up approach that I want. You tend to get more scattered theory from cookbooks instead of building on theory from previous chapters.&#xD;&#xA;&#xD;&#xA;EDIT: Preferably something you've read! I can search amazon for this, but it's hard to get a unbiased review that way." />
  <row Id="25286" PostHistoryTypeId="1" PostId="11726" RevisionGUID="0a7d9bde-4fd3-4b36-a371-6e912a5e88f4" CreationDate="2011-04-28T15:23:54.140" UserId="6937" Text="Any good books on graphics programming?" />
  <row Id="25287" PostHistoryTypeId="3" PostId="11726" RevisionGUID="0a7d9bde-4fd3-4b36-a371-6e912a5e88f4" CreationDate="2011-04-28T15:23:54.140" UserId="6937" Text="&lt;shaders&gt;&lt;graphics-programming&gt;&lt;graphic-effects&gt;" />
  <row Id="25288" PostHistoryTypeId="6" PostId="11712" RevisionGUID="ab79767c-6bc3-4b4a-810b-2572c5401825" CreationDate="2011-04-28T15:34:10.633" UserId="51" Comment="edited tags; deleted 14 characters in body" Text="&lt;architecture&gt;&lt;programming&gt;" />
  <row Id="25289" PostHistoryTypeId="5" PostId="11712" RevisionGUID="ab79767c-6bc3-4b4a-810b-2572c5401825" CreationDate="2011-04-28T15:34:10.633" UserId="51" Comment="edited tags; deleted 14 characters in body" Text="I've been trying to make various sorts of games throughout the past few months, I've had several false starts (currently using python + pygame). I find that what happens is that I get a first pass of the basic mechanics working, and then I find it impossible to proceed because the internal organization of the game does not scale up well. What typically happens is that after I get a working prototype, the complexity of the code is at a manageable level. Then I add a new feature, and the complexity increases, and another feature, which leads to more complexity. Soon enough, the complexity is unmanageable - there are so many special cases that it becomes impossible to account for all of them.&#xD;&#xA;&#xD;&#xA;How should I deal with this kind of problem? Is there some kind of technique of abstraction that I am not applying?  Do you know of any resources or guides that might be useful here? Or am I just bad for not being able to deal with a little complexity?" />
  <row Id="25290" PostHistoryTypeId="2" PostId="11727" RevisionGUID="a8da2e45-09ec-4c24-be52-e6613d979f25" CreationDate="2011-04-28T15:46:00.030" UserId="1430" Text="OO design is a pretty common way of abstracting complexity behind manageable layers (although by no means the only valid way of doing so). There are plenty of good resources on the topic, such the [ObjectMentor series of articles][1] on core OO design principles.&#xD;&#xA;&#xD;&#xA;Reading those and other articles on OO or abstraction and dependency management in general will certainly help you, but they won't necessarily be direct solutions to your problem. &#xD;&#xA;&#xD;&#xA;What you should be doing is examining the state of your code and your systems at every juncture, particular when you are adding a new feature or subsystem. Look at the code, look for things you can refactor or clean up in some fashion -- repeated code, overly complex interfaces that require too many parameters or are not self-contained. Clean those up; harden the code and the API design until you are satisfied with its complexity before moving on.&#xD;&#xA;&#xD;&#xA;It sounds like you might have simply been driving forward with feature development on your projects without spending adequate time doing postmortem analysis on each new feature you added to see how you might have improved it once it got working. If you do that, and also if you pay attention to the eventual design/scalability problems you do run across (write them down if you must!) you'll start to develop a better understand of how to craft things properly the first time. You'll rarely ever get it right the first time -- but you'll eventually learn to get it right within a very small number of iterations.&#xD;&#xA;&#xD;&#xA;If you're having a hard time doing that kind of analysis, you could certainly post another question here outlining a specific scalability or complexity problem you're having in your current code and get some specific, directed advice on how to improve it.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.objectmentor.com/omSolutions/oops_what.html" />
  <row Id="25291" PostHistoryTypeId="2" PostId="11728" RevisionGUID="a9dddf3a-ea68-4300-b176-ee7d3e32072d" CreationDate="2011-04-28T16:00:49.133" UserId="1430" Text="Most &quot;shader effects&quot; like filtering and normal mapping have very little in common that could be considered building blocks between effects. 2D filtering and normal mapping aren't any more difficult or advanced than each other, for example, and the same is true of many effects with only a few notable exceptions (the various flavors of shadow mapping come to mind). They're just different. That's why you'll see so many cookbook-style books when it comes to discussing actual graphical *effects* programming (as opposed to graphics programming at a fundamental level).&#xD;&#xA;&#xD;&#xA;Most in-world effects (i.e., not post-processing ones) are rooted at some level in the physical properties of light and the simulation or approximation thereof. To that end, reading books that focus on ray-tracing as a rendering method may help you better understand the core theories involved ([Physically Based Rendering][1] is also an excellent read). &#xD;&#xA;&#xD;&#xA;Once you understand that, the &quot;scattered theory&quot; present in books like GPU Gems will relate primarily to the specific ways in which the GPU can be manipulated to approximate the real-world physical scenarios desired, and will seem less disjointed.&#xD;&#xA;&#xD;&#xA;Similarly, post-processing shaders tend to draw from signal and image processing theory. I think I recall having [this book][2] as a textbook in a class on the subject, but don't recall too much about it.&#xD;&#xA;&#xD;&#xA;In general, though, you aren't going to find too much that caters to that kind of approach because the theory that binds together all the various shader effects that are in vogue right now is structured like a very, very shallow tree rather than a very deep one -- there are very few dependencies that cater to &quot;bottom up&quot; approaches once you get beyond the fundamentals of graphics programming theory itself (how to structure the scene, the transformation pipeline and associated linear algebra, rasterization, et cetera).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Physically-Based-Rendering-Implementation-Interactive/dp/012553180X&#xD;&#xA;  [2]: http://www.amazon.com/Nonlinear-Signal-Image-Processing-Applications/dp/0849314275" />
  <row Id="25292" PostHistoryTypeId="2" PostId="11729" RevisionGUID="7f94b292-9cab-45ff-b219-20bdff7de41d" CreationDate="2011-04-28T16:04:02.857" UserId="5687" Text="The way I've traditionally handled it is as two arrays of lines: one n-by-(n+1) array of vertical lines (one for each row and one for each column-plus-one - there's the one to the left of each column and then the last set of vertical lines on the right), and likewise, one (n+1)-by-n array of horizontal lines, one for each row-plus-one and one for each column.  This requires a very little special-casing (the two boxes you'll have to check for matches when a line's drawn are different for horizontal vs. vertical), but it also allows for easy indexing of the lines corresponding to a given box (the edges of Box[a,b] are HLine[a,b], HLine[a+1,b], VLine[a,b], and VLine[a,b+1]).&#xD;&#xA;&#xD;&#xA;And if you ever decide to make the game more sophisticated (especially on an AI front), then you'll probably want a more abstract representation for strategic purposes: you may want to look into Nimstring and Berlekamp's dots-and-boxes book - a lot of positions that look completely different on the board are actually identical from a mathematical perspective (for instance, 'chains' of boxes with two walls closed off and two open to the next-and-previous box).&#xD;&#xA;" />
  <row Id="25293" PostHistoryTypeId="2" PostId="11730" RevisionGUID="fb13faf3-5494-4ca4-9111-3e0c4e774e78" CreationDate="2011-04-28T16:06:17.473" UserId="6887" Text="I maintain a [list of resources][1] related to javascript game development that i have found useful, including a list of game engines and web services you can integrate.&#xD;&#xA;&#xD;&#xA;You need to keep track of two different concepts: Client side presentation and server side processing. If you are developing a casual flash-style game the complete game will probably be the client side presentation, mixed with some web services for highscore and the likes.&#xD;&#xA;However, if you want to do social-, mulitplayer- or mmo style games a lot, if not most of the game will be on the server to prevent cheating, and the client will just act like a dumb terminal. How that is handled is probably a topic for another question.&#xD;&#xA;&#xD;&#xA;Of interest to anyone who wants to communicate in realtime between browser and server should be socket.io that is an abstraction on top of websockets with fallback using flash in older browsers.&#xD;&#xA;&#xD;&#xA;  [1]: http://gitcp.com/sorenbs/jsgames-articles/resources" />
  <row Id="25294" PostHistoryTypeId="2" PostId="11731" RevisionGUID="3bcb84e5-4a44-42a4-8e40-b71f807c0504" CreationDate="2011-04-28T16:21:14.397" UserId="6887" Text="If you are concerned with the volume of operations in the database, you should have a look at a databse that supports sharding well. As your query path is essentially a key lookup you are free to choose from a number of databases. I would recomend MongoDB as it has native drivers for many languages, and is extremely easy to manage.&#xD;&#xA;&#xD;&#xA;I would not recommend you store this in files, as a database system can better optimize performance by keeping part of the data in ram and apply indexing on keys (depending on file system file access performance can degrade quite dramatically as the number of files in a folder increases). &#xD;&#xA;Also, when you need to distribute load to more servers it is much easier when you have a database that can do sharding and balancing for you." />
  <row Id="25295" PostHistoryTypeId="2" PostId="11732" RevisionGUID="5241cf88-7dfc-4aef-ba34-9590d8f94498" CreationDate="2011-04-28T16:59:11.477" UserId="5705" Text="I'm trying to make a multiplayer game but am a newbie to server side programming except that I know a little PHP. I learnt about this technique called long polling where the server can wait for fresh data to be available and then send it. How does one do long polling using PHP? Are there any libraries available. I'm already using ZendAMF, so how do I make zendamf and long-polling to co-exist?" />
  <row Id="25296" PostHistoryTypeId="1" PostId="11732" RevisionGUID="5241cf88-7dfc-4aef-ba34-9590d8f94498" CreationDate="2011-04-28T16:59:11.477" UserId="5705" Text="How to implement Long Polling with PHP and flash?" />
  <row Id="25297" PostHistoryTypeId="3" PostId="11732" RevisionGUID="5241cf88-7dfc-4aef-ba34-9590d8f94498" CreationDate="2011-04-28T16:59:11.477" UserId="5705" Text="&lt;flash&gt;&lt;multiplayer&gt;" />
  <row Id="25298" PostHistoryTypeId="2" PostId="11733" RevisionGUID="a3ae2b12-6d80-4f2e-8d41-493a3d1861b3" CreationDate="2011-04-28T17:12:17.710" UserId="1198" Text="On the client side (I do not have any experience using ZendAMF), you simply make a call with a very long timeout value, and as soon as you get a response, you make another call with another long timeout. The &quot;long-polling&quot; happens on the server.&#xD;&#xA;&#xD;&#xA;On the server long-polling simply means that when your client application makes a &quot;get&quot; (or &quot;post&quot;) to a PHP page, that page simply does not `exit();` until there is data to be sent. So a short loop that continually checks the status of the data until it has changed. The loop that checks data will &quot;block&quot; until there is data.&#xD;&#xA;&#xD;&#xA;There maybe libraries available that help with this, but it shouldn't be necessary unless your situation is quite complex." />
  <row Id="25299" PostHistoryTypeId="25" PostId="11732" RevisionGUID="1dece69a-224a-4483-963f-d94a7e63c194" CreationDate="2011-04-28T18:09:39.707" Comment="http://twitter.com/#!/StackGameDev/status/63666200789516288" />
  <row Id="25300" PostHistoryTypeId="2" PostId="11734" RevisionGUID="2f91fa7a-744c-479f-a1e5-0727b7e9bcee" CreationDate="2011-04-28T18:12:02.637" UserId="3056" Text="I found a good [GDC presentation][1] on how they did it in Halo Reach.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdcvault.com/play/1014348/HALO-REACH-Effects" />
  <row Id="25308" PostHistoryTypeId="2" PostId="11736" RevisionGUID="89db90c9-3505-41cf-957d-39268b349931" CreationDate="2011-04-28T20:49:38.027" UserId="4947" Text="There is extension called primitive restart, which can maybe help you, but you will have to have only one big VBO. &#xD;&#xA;&#xD;&#xA;Also - if you want to use multiple VBOs, you can try extension unified buffer memory, which is faster then binding. &#xD;&#xA;&#xD;&#xA;But what I know, there is no way to draw multiple VBOs (you can have bound only one VBO at a time). " />
  <row Id="25309" PostHistoryTypeId="2" PostId="11737" RevisionGUID="b2a5a52d-d1c5-472a-9faa-dbd04afc8ea4" CreationDate="2011-04-28T21:02:46.393" UserId="6994" Text="Solution described is not full 3d as he doesn't need full 3d solution. It will look like but it is not. Creation of shadow casting must be considered as intersection between volume. What he needs is less complicated. Remember (if you have kown) dooms and dooms like rendering engine. All processing were done on two dimensions." />
  <row Id="25313" PostHistoryTypeId="2" PostId="11738" RevisionGUID="a7c078fe-c3e5-4b19-a4be-c1709d81a839" CreationDate="2011-04-28T22:53:45.770" UserId="6678" Text="I am Playing a Game (application )on 3G network using Android or Iphone.&#xD;&#xA;Suppose i am moving from one cell to another,Will the Ip Address change??&#xD;&#xA;If Yes the How Can i continue the same game while changing the base station as my IP address is already registered in The game server.&#xD;&#xA;Is there something DHCP.???&#xD;&#xA;" />
  <row Id="25314" PostHistoryTypeId="1" PostId="11738" RevisionGUID="a7c078fe-c3e5-4b19-a4be-c1709d81a839" CreationDate="2011-04-28T22:53:45.770" UserId="6678" Text="How 3G network assign IP to Smart Phones.?" />
  <row Id="25315" PostHistoryTypeId="3" PostId="11738" RevisionGUID="a7c078fe-c3e5-4b19-a4be-c1709d81a839" CreationDate="2011-04-28T22:53:45.770" UserId="6678" Text="&lt;network&gt;&lt;server&gt;&lt;mobile&gt;" />
  <row Id="25316" PostHistoryTypeId="2" PostId="11739" RevisionGUID="8d029d02-0f3b-4b99-9ea5-6e01c316fe30" CreationDate="2011-04-28T23:18:55.897" UserId="6040" Text="Given that you want this game to be small, what about just saying that the current shadow implementation is good enough?&#xD;&#xA;&#xD;&#xA;I admit that I have not seen this in action, that is, I have not seen how disturbing or non-disturbing the shadow imperfections will be when this games is running live with dynamic objects and dynamic light sources *but* judging from your images, I'm very tempted to say &quot;it's good enough, now focus on getting the game completed&quot;.  If the current implementation happen to be small and execute fast and fixing what you perceive to be problems will turn the code big and slow, I think you are better of not worrying about those shadows.&#xD;&#xA;&#xD;&#xA;I know, I know, suggesting &quot;don't try to solve the problem&quot; as a solution to a problem might be a bad practice.  Still, I honestly want to say that it really is good as it is if you want a small footprint for your code." />
  <row Id="25317" PostHistoryTypeId="25" PostId="11726" RevisionGUID="aff2e92b-76d0-421b-85bc-55f53dd484eb" CreationDate="2011-04-29T00:09:39.667" Comment="http://twitter.com/#!/StackGameDev/status/63756796946423808" />
  <row Id="25321" PostHistoryTypeId="2" PostId="11741" RevisionGUID="26903d02-2a1e-412c-a307-32d2e91e2617" CreationDate="2011-04-29T00:32:12.497" UserId="6275" Text="im having a big problem when using Ambient lights in my opengl game.&#xD;&#xA;&#xD;&#xA;when i first started with my program, i had a positioned light, and the code was this:&#xD;&#xA;&#xD;&#xA;&gt; GLfloat AmbientColor[] =&#xD;&#xA;&gt; {1.0f,1.0f,1.0f,1.0f};&#xD;&#xA;&gt;     glLightModelfv(GL_LIGHT_MODEL_AMBIENT,AmbientColor);&#xD;&#xA;&gt;     ////////POSITIONED LIGHT&#xD;&#xA;&gt;     GLfloat LightColor0[] = {0.9f,0.9f,0.7f,1.0f};&#xD;&#xA;&gt;     GLfloat LightPos0[] = {0.0f,900.0f,1000.0f,1.0f};&#xD;&#xA;&gt;     glLightfv(GL_LIGHT0,GL_DIFFUSE,LightColor0);&#xD;&#xA;&gt;     glLightfv(GL_LIGHT0,GL_POSITION,LightPos0);&#xD;&#xA;&#xD;&#xA;when doing this, i had a well lit area with no problem.&#xD;&#xA;&#xD;&#xA;but once i changed my matrix to `GL_MODELVIEW`, i noticed that my lights were not equal on each face.&#xD;&#xA;&#xD;&#xA;noticing this, i changed my code to look like this:&#xD;&#xA;&#xD;&#xA;&gt; GLfloat AmbientColor[] =&#xD;&#xA;&gt; {1.0f,1.0f,1.0f,1.0f};&#xD;&#xA;&gt;     glLightModelfv(GL_LIGHT_MODEL_AMBIENT,AmbientColor);&#xD;&#xA;&gt;     ////////POSITIONED LIGHT&#xD;&#xA;&gt;     GLfloat LightColor0[] = {0.9f,0.9f,0.7f,1.0f};&#xD;&#xA;&gt;     glLightfv(GL_LIGHT0,GL_AMBIENT,AmbientColor);&#xD;&#xA;&#xD;&#xA;once i used this code, only the mountains in my terrain were lit up, and anything perfectly flat was not lit at all(completely black...)&#xD;&#xA;&#xD;&#xA;so my question is, How would i use my ambient light correctly?&#xD;&#xA;&#xD;&#xA;example code would be nice in this situation.&#xD;&#xA;&#xD;&#xA;thanks" />
  <row Id="25322" PostHistoryTypeId="1" PostId="11741" RevisionGUID="26903d02-2a1e-412c-a307-32d2e91e2617" CreationDate="2011-04-29T00:32:12.497" UserId="6275" Text="My Ambient lighting is not working correctly..." />
  <row Id="25323" PostHistoryTypeId="3" PostId="11741" RevisionGUID="26903d02-2a1e-412c-a307-32d2e91e2617" CreationDate="2011-04-29T00:32:12.497" UserId="6275" Text="&lt;opengl&gt;&lt;c++&gt;&lt;lighting&gt;" />
  <row Id="25325" PostHistoryTypeId="25" PostId="11741" RevisionGUID="13343aae-68c9-43df-b857-9b25700ebfdf" CreationDate="2011-04-29T03:09:39.457" Comment="http://twitter.com/#!/StackGameDev/status/63802095215714305" />
  <row Id="25326" PostHistoryTypeId="2" PostId="11742" RevisionGUID="5d34e5c1-6c7d-4fb6-9e94-02250710e8b7" CreationDate="2011-04-29T03:59:10.703" UserId="7020" Text="i am developing a gaming control panel and that uses `Rcon.jar` to fetch data from gaming server.&#xD;&#xA;&#xD;&#xA;the code to use it written as below&#xD;&#xA;&#xD;&#xA;    public static String rconExecute(String rcon, String command, int port, String ip) throws SocketTimeoutException{&#xD;&#xA;    		String response = &quot;&quot;;&#xD;&#xA;    		try {&#xD;&#xA;    			&#xD;&#xA;    			response = Rcon.send(27778, ip, port, rcon, command);&#xD;&#xA;    		} catch (Exception e) {&#xD;&#xA;    			// TODO Auto-generated catch block&#xD;&#xA;    			e.printStackTrace();&#xD;&#xA;    		}&#xD;&#xA;    		return response;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;this throws an error when run using site but when done using local application like&#xD;&#xA;&#xD;&#xA;    public class RconTest {&#xD;&#xA;    &#xD;&#xA;    	public static void main(String args[]) throws SocketTimeoutException, BadRcon, ResponseEmpty{&#xD;&#xA;    		String response = Rcon.send(27778, &quot;59.177.45.13&quot;, 27015, &quot;123&quot;, &quot;status&quot;);&#xD;&#xA;    		System.out.println(response);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it works fine any reason why?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the error is :`java.net.SocketTimeoutException: Receive timed out`" />
  <row Id="25327" PostHistoryTypeId="1" PostId="11742" RevisionGUID="5d34e5c1-6c7d-4fb6-9e94-02250710e8b7" CreationDate="2011-04-29T03:59:10.703" UserId="7020" Text="Rcon Api not working" />
  <row Id="25328" PostHistoryTypeId="3" PostId="11742" RevisionGUID="5d34e5c1-6c7d-4fb6-9e94-02250710e8b7" CreationDate="2011-04-29T03:59:10.703" UserId="7020" Text="&lt;java&gt;&lt;steam&gt;" />
  <row Id="25329" PostHistoryTypeId="2" PostId="11743" RevisionGUID="be0f87dc-5f65-413a-b383-acd56b84f81a" CreationDate="2011-04-29T03:59:20.420" UserId="5904" Text="I'm assuming you've already done:&#xD;&#xA;glEnable(GL_LIGHTING);&#xD;&#xA;glEnable(GL_LIGHT0);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After you set up your modelview matrix (a popular example is gluLookAt()), then you should call glLightfv(GL_LIGHTi, AmbientColor). You need to do this every frame, not once. The position you give is transformed by the modelview matrix and stored. Thus, if your modelview matrix changes (which it typically changes every frame), then you need to call glLightfv(GL_LIGHTi, GL_POSITION, ...) again.&#xD;&#xA;&#xD;&#xA;Getting black patches that *depend on your camera angle* is a sign that the angle between the camera and the light is taking part in the lighting. If you are truly do just ambient lighting, it should NOT - that is a factor of **DIFFUSE** lighting. Check your diffuse color on the light/material. If you ARE use diffuse color, check the glLightfv() call (as above), make sure your projection matrix is correctly initialized, and finally, that your vertex normals make sense. Remember, scaling in the modelview (e.g. glScalef()) scales the normals as well. For a simple solution, you can try enabling autonormalization by glEnable(GL_NORMALIZE) - but generally this is frowned upon because it is usually unnecessary (see GL_RESCALE_NORMAL).&#xD;&#xA;&#xD;&#xA;The fixed function light model is a long equation to say the least. What effect are you trying to achieve by ambient lighting? It is generally used to give a low default amount of light to a scene, and that is done with a global ambient factor. A simplified (no spot lights, specular, attenuation) equation is:&#xD;&#xA;&#xD;&#xA;Color = Global.ambient*Material.ambient + LightFactor[0] + LightFactor[1] ... + Material.emissive&#xD;&#xA;&#xD;&#xA;where&#xD;&#xA;LightFactor[i] = Light.ambient*Material.ambient + Light.diffuse*Material.diffuse*dot(Light.DirVector, Vertex.Normal)&#xD;&#xA;&#xD;&#xA;If we apply that your example, you get:&#xD;&#xA;&#xD;&#xA;Color = 1.0*Material.ambient + 1.0*Material.ambient + Light.diffuse*Material.diffuse*dot(Light.DirVector, Vertex.Normal)&#xD;&#xA;&#xD;&#xA;This sums the material's ambient color twice, which almost definitely not what you want.&#xD;&#xA;&#xD;&#xA;If you just want to apply a small uniform amount of light to everything, then set your global ambient to a small factor like {0.2, 0.2, 0.2, 1.0}, your light's ambient to {0.0,  0.0, 0.0, 0.0}, and your material's ambient to {1.0, 1.0, 1.0, 1.0}. Thus if a shape is entirely outside of a light, it gets a minimum of {0.2, 0.2, 0.2, 0.2} color (dull gray).&#xD;&#xA;&#xD;&#xA;OpenGL fixed-function lighting confusing at first, but stick with it.&#xD;&#xA;&#xD;&#xA;Edit: or go on to shaders." />
  <row Id="25330" PostHistoryTypeId="2" PostId="11744" RevisionGUID="6f1a3853-9104-4c69-aa6a-a835e5f79522" CreationDate="2011-04-29T04:12:52.983" UserId="6592" Text="I'm not really understanding what you've done. You say &quot;change my matrix,&quot; and I assume &quot;glMatrixMode(SOME_MATRIX).&quot; But the current matrix mode will not have any affect on anything you do until you make some GL call that changes the &quot;current&quot; matrix.&#xD;&#xA;&#xD;&#xA;So it sounds to me like somewhere you changed the current matrix and then things started going awry. So I would check for calls to glFoo() made between that call (where you change the matrix mode) and where you draw your model, where glFoo() is a method that affects the current matrix.&#xD;&#xA;&#xD;&#xA;That said, no matrix should affect ambient light, assuming the &quot;fixed pipeline&quot; functionality of OpenGL (this assumes you're not writing your own shaders; in other words, that you're using the built-in functionality of OpenGL that has existed for many years).&#xD;&#xA;&#xD;&#xA;As I understand it, in the &quot;fixed pipeline&quot; mode (which uses &quot;Phong Shading&quot;), a light has a given ambient contribution, and any material has an attribute that affects how much ambient light it receives. The result is that every fragment (&quot;potential&quot; pixel) in an affected primitive that is drawn with the same ambient lighting.&#xD;&#xA;&#xD;&#xA;You said in your original question that one of your problems is that lights are not equal on each face. This implies that either (1) the difference in lighting is not an effect of ambient light (since any primitive drawn with the same light and material will have identical ambient lighting) or (2) that the faces have different light models or different material models (or perhaps (3) you're writing your own shaders and doing something odd).&#xD;&#xA;&#xD;&#xA;To recap, I don't think changing any matrix has anything to do with your lighting problems unless you're making a glFoo() call that would cause a primitive to effectively be oriented differently toward a particular light, in which case the problem should have nothing to do with ambient light (and may have something to do with one of the other &quot;types&quot; of lighting)." />
  <row Id="25331" PostHistoryTypeId="2" PostId="11745" RevisionGUID="1c299dd1-63b1-4b6c-bb34-1e282afb2b2e" CreationDate="2011-04-29T04:13:41.423" UserId="5904" Text="In short game event logging and replay is how you automate this. I don't know of any 3rd party software that does this (qualifier: SDK to integrate into app), but doing it yourself is both really easy and perhaps really hard.&#xD;&#xA;&#xD;&#xA;You use game events to mean stuff like &quot;pressed the X key&quot; or &quot;moved the mouse by (10,2)&quot; &#xD;&#xA;&#xD;&#xA;You play the game once recording each keystroke/mouse movement and the *precise time it occured* relative to the start of the recording. Once you are finished recording, you run the program again, but instead of generating the events from the mouse/keyboard, you simply play back the events you recorded, in order, at the right time. So, say if you found a reproducible bug that takes a few minutes of running around waving a sword or jumping into a wall, then you can record all of your actions and replay them again and see if you get the same results (if you have a deterministic engine, you should). Then you can make fixes, play it back again, etc. until the bug is fixed.&#xD;&#xA;&#xD;&#xA;Though it isn't the same purpose, you've probably seen this method in old arcade games ('demo mode' before you insert a coin). It would have been too expensive to simply record a fullscreen demo to playback when the machines have &lt; 1024KB of RAM, so the they record the actions and play them back as a sort of &quot;real-time video&quot; or &quot;compression&quot;. &#xD;&#xA;&#xD;&#xA;Getting the game/engine to be deterministic is a lot harder though." />
  <row Id="25332" PostHistoryTypeId="5" PostId="11744" RevisionGUID="a96d56db-e68f-435c-b9e1-bf7e25ea7d7e" CreationDate="2011-04-29T04:19:42.497" UserId="6592" Comment="added 125 characters in body" Text="I'm not really understanding what you've done. You say &quot;change my matrix,&quot; and I assume &quot;glMatrixMode(SOME_MATRIX).&quot; But the current matrix mode will not have any affect on anything you do until you make some GL call that changes the &quot;current&quot; matrix.&#xD;&#xA;&#xD;&#xA;So it sounds to me like somewhere you changed the current matrix and then things started going awry. So I would check for calls to glFoo() made between that call (where you change the matrix mode) and where you draw your model, where glFoo() is a method that affects the current matrix.&#xD;&#xA;&#xD;&#xA;That said, no matrix should affect ambient light, assuming the &quot;fixed pipeline&quot; functionality of OpenGL (this assumes you're not writing your own shaders; in other words, that you're using the built-in functionality of OpenGL that has existed for many years).&#xD;&#xA;&#xD;&#xA;As I understand it, in the &quot;fixed pipeline&quot; mode (which uses &quot;Phong Shading&quot;), a light has a given ambient contribution, and any material has an attribute that affects how much ambient light it receives. The result is that every fragment (&quot;potential&quot; pixel) in an affected primitive is drawn with the same ambient lighting. In fact, if the only lighting that was enabled was ambient, you'd be drawing primitives that had a uniform color (and intensity).&#xD;&#xA;&#xD;&#xA;You said in your original question that one of your problems is that lights are not equal on each face. This implies that either (1) the difference in lighting is not an effect of ambient light (since any primitive drawn with the same light and material will have identical ambient lighting) or (2) that the faces have different light models or different material models (or perhaps (3) you're writing your own shaders and doing something odd).&#xD;&#xA;&#xD;&#xA;To recap, I don't think changing any matrix has anything to do with your lighting problems unless you're making a glFoo() call that would cause a primitive to effectively be oriented differently toward a particular light, in which case the problem should have nothing to do with ambient light (and may have something to do with one of the other &quot;types&quot; of lighting)." />
  <row Id="25333" PostHistoryTypeId="2" PostId="11746" RevisionGUID="274c7bf8-65b7-4061-9f6c-04465bd82062" CreationDate="2011-04-29T04:46:31.550" UserId="7021" Text="I am doing research on replicating an ad execution - http://www.digitalbuzzblog.com/gol-airlines-mobile-controlled-banner-game/&#xD;&#xA;&#xD;&#xA;It's a simple &quot;game&quot; involving using the phone as a forward/back/left/right controller for a car in flash on the internet. &#xD;&#xA;&#xD;&#xA;I've started reading on P2P, but I'm finding such a vast amount of information and non specific to what I need that it's hard for me to sort through. &#xD;&#xA;&#xD;&#xA;Does anyone know any tutorials or can shed some light on how I might go about making a very simple mobile controller for a flash game? &#xD;&#xA;&#xD;&#xA;I apologize in advance if this is too basic/if I've bothered you in anyway.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="25334" PostHistoryTypeId="1" PostId="11746" RevisionGUID="274c7bf8-65b7-4061-9f6c-04465bd82062" CreationDate="2011-04-29T04:46:31.550" UserId="7021" Text="How do I make this ad execution?" />
  <row Id="25335" PostHistoryTypeId="3" PostId="11746" RevisionGUID="274c7bf8-65b7-4061-9f6c-04465bd82062" CreationDate="2011-04-29T04:46:31.550" UserId="7021" Text="&lt;iphone&gt;&lt;programming&gt;&lt;game-mechanics&gt;" />
  <row Id="25336" PostHistoryTypeId="25" PostId="11746" RevisionGUID="d38c3aae-d280-480a-99b5-a895c3aa3254" CreationDate="2011-04-29T06:09:39.997" Comment="http://twitter.com/#!/StackGameDev/status/63847396425207808" />
  <row Id="25337" PostHistoryTypeId="2" PostId="11747" RevisionGUID="6b405bf9-0e56-443a-85b6-a7a3eabfdd43" CreationDate="2011-04-29T08:56:24.737" UserId="6961" Text="I have joined the course of 3ds max. i want to know that what are the diiferent part of 3ds max  whic i need to learn&#xD;&#xA;&#xD;&#xA;hw was saying that he will teach me architecture . i want to know whay are the divisio of 3ds max so that i know which things to learn .&#xD;&#xA;&#xD;&#xA;alo where does vray , mental ray , particle effects , character modellings stand in 3ds max.&#xD;&#xA;&#xD;&#xA;is architecture alone will be enough foe me&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;please explain me thanks" />
  <row Id="25338" PostHistoryTypeId="1" PostId="11747" RevisionGUID="6b405bf9-0e56-443a-85b6-a7a3eabfdd43" CreationDate="2011-04-29T08:56:24.737" UserId="6961" Text="what thing i need to learn in 3ds max" />
  <row Id="25339" PostHistoryTypeId="3" PostId="11747" RevisionGUID="6b405bf9-0e56-443a-85b6-a7a3eabfdd43" CreationDate="2011-04-29T08:56:24.737" UserId="6961" Text="&lt;3dsmax&gt;" />
  <row Id="25340" PostHistoryTypeId="25" PostId="11747" RevisionGUID="dd2c22ae-202a-4eeb-840a-dd7b0aae8f86" CreationDate="2011-04-29T09:09:39.617" Comment="http://twitter.com/#!/StackGameDev/status/63892691926265856" />
  <row Id="25341" PostHistoryTypeId="2" PostId="11748" RevisionGUID="48d85daa-47c1-4053-bda7-88033c3823d9" CreationDate="2011-04-29T09:16:55.283" UserId="6875" Text="I have the following tetrahedron:&#xD;&#xA;&#xD;&#xA;        var vertices = [&#xD;&#xA;            // Front face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;             1.0, -1.0,  1.0,&#xD;&#xA; &#xD;&#xA;            // Right face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;             1.0, -1.0,  1.0,&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA; &#xD;&#xA;            // Back face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA; &#xD;&#xA;            // Left face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;			&#xD;&#xA;		    // Bottom face&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;        ];&#xD;&#xA;&#xD;&#xA;What are the texture coordinates?&#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;		  // Front face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Right face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Back face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Left face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA;		  &#xD;&#xA;		  // Bottom face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25342" PostHistoryTypeId="1" PostId="11748" RevisionGUID="48d85daa-47c1-4053-bda7-88033c3823d9" CreationDate="2011-04-29T09:16:55.283" UserId="6875" Text="What are the texture coordinates for a tetrahedron (WebGL)" />
  <row Id="25343" PostHistoryTypeId="3" PostId="11748" RevisionGUID="48d85daa-47c1-4053-bda7-88033c3823d9" CreationDate="2011-04-29T09:16:55.283" UserId="6875" Text="&lt;textures&gt;&lt;coordinates&gt;&lt;webgl&gt;" />
  <row Id="25344" PostHistoryTypeId="4" PostId="11748" RevisionGUID="918449a5-7a82-4b59-8b3d-1a9cbb2e881e" CreationDate="2011-04-29T09:35:53.157" UserId="3794" Comment="no tags in headline ..." Text="What are the texture coordinates for a tetrahedron" />
  <row Id="25345" PostHistoryTypeId="2" PostId="11749" RevisionGUID="2a670188-503b-44c4-990e-16c3cd06eacb" CreationDate="2011-04-29T09:37:08.913" UserId="6831" Text="Just as @JustSid said, if you move from one cell to another the handover is handled transparently. The 3G network is just the method of transportation of your data packets, therefore it is a few layers below the IP layer, if you think in terms of the ISO/OSI stack. I worked on a push-to-talk application for mobile phones and all i can say is, that we never dealt with 3G cell changes. We just opened a TCP connection and started sending packets. One thing that also depends on your carrier is the 3G &lt;-&gt; 2G handover. With some carriers it worked fine, with some others we had disconnects." />
  <row Id="25347" PostHistoryTypeId="2" PostId="11750" RevisionGUID="739413d9-c7c5-4fc6-bcaf-30f0bf25f19a" CreationDate="2011-04-29T10:08:30.323" UserId="5904" Text="The simple answer is: Whatever you want them to be. There isn't a &quot;right answer&quot; here.&#xD;&#xA;&#xD;&#xA;In effect, you've asked a question like &quot;I have a tetrahedron, what is the right color?&quot; Nobody can give you a meaningful answer.&#xD;&#xA;&#xD;&#xA;You'll need to rephrase the question in a way that can be answered, such as &quot;What are the texture coordinates of the 'bottom' face if I wanted to map the lower half of an image divided along a line extending from the upper-left corner to the bottom-right using OpenGL?&quot;&#xD;&#xA;&#xD;&#xA;You're asking someone to type out texture coordinates, which is somewhat silly. Humans really don't do well with visualizing texture coordinates -&gt; image relationships for anything more complicated than say a few triangles, and even then only if they form a simple and/or regular shape. This is why we have programs that allow us to visualize the changes without tediously typing out values.&#xD;&#xA;&#xD;&#xA;Also, why does your tetrahedron have 5 faces? A tetrahedron has a triangular base and shares edges with 3 other triangular faces, who all share a common &quot;top&quot; vertex (and thus two edges each). If you've ever playing a pen &amp; paper RPG such as Dungeons and Dragons, it is the canonical &quot;four sided die&quot;. Just go Google Image Search &quot;tetrahedron&quot; to see what I mean. &#xD;&#xA;&#xD;&#xA;At risk of sounding rude, I'd say it looks like this 'code' suffers from copy-paste syndrome. I think you need to take sometime out to read up on the fundamentals of texture mapping as a concept, maybe write some example that texture maps a single &quot;flat&quot; (parallel to screen) triangle to get some hands-on practice with it. Playing with a 3D editor's UV editor may help as well so you can see real-time changes as you modify the texture coordinates.&#xD;&#xA;&#xD;&#xA;Best of luck." />
  <row Id="25348" PostHistoryTypeId="2" PostId="11751" RevisionGUID="fd209657-b6e0-4a6b-8b2f-637da0d1c5ab" CreationDate="2011-04-29T11:09:35.207" UserId="7023" Text="No one can give you an answer to this other than yourself. You need to ask yourself - What do you wanna be? What do you wanna do? What do you like?&#xD;&#xA;&#xD;&#xA;Typically these are the areas you might want to consider specializing in when it comes to 3D:&#xD;&#xA;&#xD;&#xA;- Modelling&#xD;&#xA;- Animation&#xD;&#xA;- Texturing&#xD;&#xA;- Lighting&#xD;&#xA;- Rendering (which is where vray and mental ray come to play)&#xD;&#xA;&#xD;&#xA;alternatively, of course you can go ahead and learn all of these things! &#xD;&#xA;&#xD;&#xA;If you want to become an architect you may want to consider Modelling, texturing and lighting, and possibly rendering. (Although for architecture there are better solutions than 3DSmax, such as AutoCAD)&#xD;&#xA;&#xD;&#xA;If you like Disney/Pixar films like Toy Story you might want to consider Modelling and Animation. &#xD;&#xA;&#xD;&#xA;The same thing also applies to game development (except maybe lighting and rendering). Game characters need to be modeled, they need to be textured, they need to be animated. Whichever one you want to learn to do is up to you &#xD;&#xA;&#xD;&#xA;Also, 3DSMax does not specialize in any one of these areas. It's great for all of them. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="25349" PostHistoryTypeId="5" PostId="106" RevisionGUID="f8b27e81-e02c-4660-8135-d8c5345b58c0" CreationDate="2011-04-29T11:29:52.393" UserId="1156" Comment="Fixed the URL for the tileset" Text="[Lost Garden][1] has lots of free graphics that you can use in your games.&#xD;&#xA;&#xD;&#xA;For RPG Games you have a [cool 32x32 tileset][2] and lots of [free to use sprites, objects, icons, etc.][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/search/label/free%20game%20graphics&#xD;&#xA;  [2]: http://www.rpg-palace.com/visual-resources/tilesets-rmxp&#xD;&#xA;  [3]: http://untamed.wild-refuge.net/rmxpresources.php?characters" />
  <row Id="25350" PostHistoryTypeId="25" PostId="11748" RevisionGUID="99153a19-8fb1-4288-9dd4-e31ca70d2777" CreationDate="2011-04-29T12:11:22.743" Comment="http://twitter.com/#!/StackGameDev/status/63938423823675392" />
  <row Id="25351" PostHistoryTypeId="5" PostId="11697" RevisionGUID="842de67e-183e-486f-9b91-8657ab257073" CreationDate="2011-04-29T12:34:32.620" UserId="5044" Comment="added 924 characters in body" Text="I'm seriously thinking of building a space opera game which would share some of Machiavelli The Prince aspects regarding commerce: each player will be able to extract/build/buy/sell/donate a wide range of products (from ore to spaceships roughly). &#xD;&#xA;&#xD;&#xA;However, I'm struggling with the economy aspect of it. Should the game defines the prices once and for all? Shall each player be able to determine his own buy/sell prices and if so, how ? How not to over engineer such a mechanism while still making it attractive ?&#xD;&#xA;&#xD;&#xA;Edit: thanks to your very nice input, some more information about the setup: &lt;br/&gt;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;it's a &quot;player only game&quot;, with no &quot;computer managed player&quot;. &lt;/li&gt;&#xD;&#xA;&lt;li&gt;players start with a planet and some resources/units and then (try to) expand&lt;/li&gt;&#xD;&#xA;&lt;li&gt;players can be of multiple &quot;species&quot; with no proper relationship apart the one they might make up =&gt; no possible notion of &quot;central bank&quot; or similar in the first place&lt;/li&gt;&#xD;&#xA;&lt;li&gt;consequently, I would prefer &quot;not magic&quot; on the economy, by that I mean a standard currency whose value would be determined by the system. However then I don't see how trade would be appealing, since barter would be the only way, which feels a bit clumsy for the players. I was thinking of having some rare metal as the standard exchange mean, but then I wonder how would work basic economic stuff such as population's wealth...&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;Hopefully it doesn't look too daunting...&#xD;&#xA;" />
  <row Id="25352" PostHistoryTypeId="2" PostId="11752" RevisionGUID="7a7a5018-cc36-4496-ac19-dc8a7fe76110" CreationDate="2011-04-29T13:12:17.530" UserId="7025" Text="Are all board games like &quot;Monopoly&quot;, &quot;Domino&quot;, &quot;Checkers&quot; &quot;Chess&quot; game developers can make clones? And, do all the ZX Spectrum games can make clones? Are there many parts of the game can do the same?" />
  <row Id="25353" PostHistoryTypeId="1" PostId="11752" RevisionGUID="7a7a5018-cc36-4496-ac19-dc8a7fe76110" CreationDate="2011-04-29T13:12:17.530" UserId="7025" Text="Is it possible to make a clone of the game?" />
  <row Id="25354" PostHistoryTypeId="3" PostId="11752" RevisionGUID="7a7a5018-cc36-4496-ac19-dc8a7fe76110" CreationDate="2011-04-29T13:12:17.530" UserId="7025" Text="&lt;game-design&gt;" />
  <row Id="25355" PostHistoryTypeId="2" PostId="11753" RevisionGUID="ce1cb7a0-aa30-4d86-804d-003e2e625a4d" CreationDate="2011-04-29T13:24:17.893" UserId="1883" Text="Not a lawyer and you should check with one for assurance.&#xD;&#xA;&#xD;&#xA;There should not a problem as long as you don't copy any specific names since you cannot trademark or copyright gameplay &amp; rules." />
  <row Id="25356" PostHistoryTypeId="5" PostId="11747" RevisionGUID="2a7ec92c-5cc5-4cbf-b19c-9ae4449b1a8a" CreationDate="2011-04-29T13:42:21.077" UserId="1156" Comment="Attempted to make question clearer; still not sure about 2nd sentence" Text="I have joined a 3ds Max course. What are the diiferent part of 3ds Max which I need to learn?&#xD;&#xA;&#xD;&#xA;He was saying that he will teach me architecture. What are the divisions of 3ds max, so that I know which things to learn?&#xD;&#xA;&#xD;&#xA;Also, where do vray, mental ray, particle effects, and character modellings stand in 3ds max?&#xD;&#xA;&#xD;&#xA;Is architecture alone going to be enough for me?&#xD;&#xA;" />
  <row Id="25357" PostHistoryTypeId="4" PostId="11747" RevisionGUID="2a7ec92c-5cc5-4cbf-b19c-9ae4449b1a8a" CreationDate="2011-04-29T13:42:21.077" UserId="1156" Comment="Attempted to make question clearer; still not sure about 2nd sentence" Text="What do I need to learn in 3DS Max?" />
  <row Id="25358" PostHistoryTypeId="5" PostId="11741" RevisionGUID="e54a5c75-77ab-4954-8435-d691b1bdf8ee" CreationDate="2011-04-29T13:45:32.650" UserId="1156" Comment="deleted 27 characters in body" Text="I'm having a problem when using ambient lights in my opengl game.&#xD;&#xA;&#xD;&#xA;When I first started with my program, i had a positioned light, and the code was this:&#xD;&#xA;&#xD;&#xA;    GLfloat AmbientColor[] = {1.0f,1.0f,1.0f,1.0f};&#xD;&#xA;        glLightModelfv(GL_LIGHT_MODEL_AMBIENT,AmbientColor);&#xD;&#xA;        ////////POSITIONED LIGHT&#xD;&#xA;        GLfloat LightColor0[] = {0.9f,0.9f,0.7f,1.0f};&#xD;&#xA;        GLfloat LightPos0[] = {0.0f,900.0f,1000.0f,1.0f};&#xD;&#xA;        glLightfv(GL_LIGHT0,GL_DIFFUSE,LightColor0);&#xD;&#xA;        glLightfv(GL_LIGHT0,GL_POSITION,LightPos0);&#xD;&#xA;&#xD;&#xA;When doing this, I had a well lit area with no problem.&#xD;&#xA;&#xD;&#xA;Once I changed my matrix to `GL_MODELVIEW`, I noticed that my lights were not equal on each face.&#xD;&#xA;&#xD;&#xA;I changed my code to look like this:&#xD;&#xA;&#xD;&#xA;    GLfloat AmbientColor[] = {1.0f,1.0f,1.0f,1.0f};&#xD;&#xA;        glLightModelfv(GL_LIGHT_MODEL_AMBIENT,AmbientColor);&#xD;&#xA;        ////////POSITIONED LIGHT&#xD;&#xA;        GLfloat LightColor0[] = {0.9f,0.9f,0.7f,1.0f};&#xD;&#xA;        glLightfv(GL_LIGHT0,GL_AMBIENT,AmbientColor);&#xD;&#xA;&#xD;&#xA;Once I used this code, only the mountains in my terrain were lit up, and anything perfectly flat was not lit at all(completely black...)&#xD;&#xA;&#xD;&#xA;So my question is - How would I use my ambient light correctly?&#xD;&#xA;&#xD;&#xA;Example code would be nice, thanks." />
  <row Id="25359" PostHistoryTypeId="5" PostId="11752" RevisionGUID="f41fc586-0c84-48dd-aced-cc4f6201b360" CreationDate="2011-04-29T13:46:41.900" UserId="1156" Comment="added 23 characters in body; edited tags; edited title; deleted 10 characters in body" Text="With board games like &quot;Monopoly&quot;, &quot;Domino&quot;, &quot;Checkers&quot;, or &quot;Chess&quot;, can game developers make clones and sell them? Also, can I make a clone of ZX Spectrum games? Are there many parts of the game with which can do the same?" />
  <row Id="25360" PostHistoryTypeId="4" PostId="11752" RevisionGUID="f41fc586-0c84-48dd-aced-cc4f6201b360" CreationDate="2011-04-29T13:46:41.900" UserId="1156" Comment="added 23 characters in body; edited tags; edited title; deleted 10 characters in body" Text="Is it legally possible to make a clone of the game?" />
  <row Id="25361" PostHistoryTypeId="6" PostId="11752" RevisionGUID="f41fc586-0c84-48dd-aced-cc4f6201b360" CreationDate="2011-04-29T13:46:41.900" UserId="1156" Comment="added 23 characters in body; edited tags; edited title; deleted 10 characters in body" Text="&lt;legal&gt;" />
  <row Id="25362" PostHistoryTypeId="2" PostId="11754" RevisionGUID="4a386eca-f41d-4f3c-a09b-f15a37cbcb93" CreationDate="2011-04-29T13:49:18.183" UserId="1156" Text="I am not a lawyer.&#xD;&#xA;&#xD;&#xA;You've got two separate sets of games.&#xD;&#xA;&#xD;&#xA;Chess, checkers, dominoes, etc. are very old - literally thousands of years. They obviously have no copyrights. You can make a chess game and sell it with no problems.&#xD;&#xA;&#xD;&#xA;ZX Spectrum games and Monopoly are copyrighted/patented; that is, the game belongs to someone. You would need to seek out the copyright holders (that is, the creator of the ZX Spectrum games or Hasbro, who own Monopoly) to make a version.&#xD;&#xA;&#xD;&#xA;You could, however, make a game where you have to buy property and build on them. You could not use Monopoly's names, places, or rules, but something very similar." />
  <row Id="25363" PostHistoryTypeId="5" PostId="11738" RevisionGUID="a546c599-f02b-432c-9ffe-44cea8189a37" CreationDate="2011-04-29T13:50:29.977" UserId="1156" Comment="deleted 10 characters in body; edited title" Text="I am playing a game on the 3G network using Android or Iphone.&#xD;&#xA;Suppose I am moving from one cell to another; Will the IP Address change?&#xD;&#xA;If yes, then how can I continue the same game while changing the base station, as my IP address is already registered in The game server?&#xD;&#xA;Is there something DHCP?&#xD;&#xA;" />
  <row Id="25364" PostHistoryTypeId="4" PostId="11738" RevisionGUID="a546c599-f02b-432c-9ffe-44cea8189a37" CreationDate="2011-04-29T13:50:29.977" UserId="1156" Comment="deleted 10 characters in body; edited title" Text="How does the 3G network assign IP to smartphones?" />
  <row Id="25365" PostHistoryTypeId="2" PostId="11755" RevisionGUID="0f174284-b28c-49b8-8817-47044d7adf0a" CreationDate="2011-04-29T13:51:42.223" UserId="6588" Text="Dominoes, checkers, and chess are all ancient games that you can do whatever you want with. Modern games like Monopoly are trickier and the legalities can vary. First off, never copy the names because that is copyrighted. It's usually fine to copy gameplay because that can't be copyrighted, but watch out for patents on hit games. For example, I wouldn't be surprised if the rules of Monopoly are patented." />
  <row Id="25366" PostHistoryTypeId="5" PostId="1079" RevisionGUID="936f6b33-f2e1-4173-9510-31fc524d30cb" CreationDate="2011-04-29T13:55:13.143" UserId="3588" Comment="Thus far, [economy] is only used for in-game economy. Well, let's strengthen that by adding the only other in-game economy question we have. Oh, and just some tiny touch-ups to your question's grammar, hope you don't mind. ♪" Text="With your typical MMORPG, players can usually farm the world for raw materials essentially forever. Monsters/mineral veins/etc are usually on some sort of respawn timer, so other than time there really isn't a good way to limit the amount of new currency entering the system. &#xD;&#xA;&#xD;&#xA;That really only leaves money sinks to try to take money out of the system. What are some strategies to prevent inflation of the in-game currency?" />
  <row Id="25367" PostHistoryTypeId="6" PostId="1079" RevisionGUID="936f6b33-f2e1-4173-9510-31fc524d30cb" CreationDate="2011-04-29T13:55:13.143" UserId="3588" Comment="Thus far, [economy] is only used for in-game economy. Well, let's strengthen that by adding the only other in-game economy question we have. Oh, and just some tiny touch-ups to your question's grammar, hope you don't mind. ♪" Text="&lt;game-design&gt;&lt;mmo&gt;&lt;economy&gt;" />
  <row Id="25368" PostHistoryTypeId="24" PostId="1079" RevisionGUID="936f6b33-f2e1-4173-9510-31fc524d30cb" CreationDate="2011-04-29T13:55:13.143" Comment="Proposed by 3588 approved by 189 edit id of 396" />
  <row Id="25369" PostHistoryTypeId="5" PostId="11753" RevisionGUID="e257607c-09ec-4d1a-ae70-d1470e1711a6" CreationDate="2011-04-29T14:18:58.703" UserId="1883" Comment="added 17 characters in body" Text="Not a lawyer and you should check with one for assurance.&#xD;&#xA;&#xD;&#xA;There should not a problem as long as you don't copy any specific names, things or text since you cannot trademark or copyright gameplay &amp; rules. " />
  <row Id="25371" PostHistoryTypeId="2" PostId="11756" RevisionGUID="074b6930-5cad-40a2-8fdd-18600c705abb" CreationDate="2011-04-29T14:44:29.633" UserId="7030" Text="While you can, theoretically, write the server-side application to use the common request lifecycle (request -&gt; processing -&gt; response -&gt; stop) fronted by a HTTP server, like you would would with a website, this approach tends not to be practically feasible for most games.&#xD;&#xA;&#xD;&#xA;When writing a game, you will probably want to look into a shared everything design, as opposed to the shared nothing, stateless design used for a webpage. The reason for this is that you will want to be able to scale to a number of concurrent users for any given session (a match in Counter Strike, for example) where the game logic depends on a shared state.&#xD;&#xA;&#xD;&#xA;Running one instance of PHP for every user will tie up a lot of resources, as well as force you to push the game state outside of the PHP process, neither of which goes very well with either scalability or performance.&#xD;&#xA;&#xD;&#xA;Your best bet is likely to write a stateful, event-based application that is then run in PHP deamon mode. You would bypass the web server, and deal with network programming directly." />
  <row Id="25372" PostHistoryTypeId="2" PostId="11757" RevisionGUID="42fc96aa-bd62-48a7-98e3-129c45970b6c" CreationDate="2011-04-29T14:48:17.190" UserId="6961" Text="is there any videos on how to make a small game using max . i mean is it only done in max or there r other things used . i am newbie in game prog" />
  <row Id="25373" PostHistoryTypeId="1" PostId="11757" RevisionGUID="42fc96aa-bd62-48a7-98e3-129c45970b6c" CreationDate="2011-04-29T14:48:17.190" UserId="6961" Text="Is there any video tutorial available for game prog with max" />
  <row Id="25374" PostHistoryTypeId="3" PostId="11757" RevisionGUID="42fc96aa-bd62-48a7-98e3-129c45970b6c" CreationDate="2011-04-29T14:48:17.190" UserId="6961" Text="&lt;game-design&gt;&lt;3dsmax&gt;" />
  <row Id="25375" PostHistoryTypeId="2" PostId="11758" RevisionGUID="1d1d389d-1e1c-46e5-b43c-4f15f08a8e23" CreationDate="2011-04-29T14:58:53.097" UserId="6848" Text="This will obviously vary a lot from country to country, but the basic idea is that you can't make an exact clone, but you can make a knock-off version.  Board games tend to be covered by two aspects: the copyright on the written rules of the game, the trademarks and copyrights on the visual elements to the game.&#xD;&#xA;&#xD;&#xA;The underlying mechanics and gameplay tend not to be covered by any legal protection. However, and this is a damn big however, as certain countries (like the US) offer software patents it seems possible that a company could indeed patent the gameplay itself.  However, for popular games the mechanics are usually so common as not likely to be granted such protection.&#xD;&#xA;&#xD;&#xA;Mostly however companies protect their brand. If your game does not infringe on their brand you are probably safe. Be careful about copying rules (this also applies to video games) too closely. If you have a game that behaves nearly identical to another but with distinct artwork I think most people would consider it a derivative work, and thus infringing on the original.&#xD;&#xA;&#xD;&#xA;So, feel free to replicate a basic gameplay mechanic, but never duplicate graphics and avoid duplicating level-structure." />
  <row Id="25376" PostHistoryTypeId="25" PostId="11752" RevisionGUID="54912a4e-c66d-42a5-8585-36ac999b2ef2" CreationDate="2011-04-29T15:11:23.220" Comment="http://twitter.com/#!/StackGameDev/status/63983724806668289" />
  <row Id="25377" PostHistoryTypeId="5" PostId="11757" RevisionGUID="d1a11dd6-cfdd-4dee-9553-1dc2ede7d5e7" CreationDate="2011-04-29T15:15:56.023" UserId="1430" Comment="added 11 characters in body; edited tags; edited title" Text="Are there any videos on how to make a small game using Max? I mean is it only done in Max or are there other things used? I am a newbie in game programming." />
  <row Id="25378" PostHistoryTypeId="4" PostId="11757" RevisionGUID="d1a11dd6-cfdd-4dee-9553-1dc2ede7d5e7" CreationDate="2011-04-29T15:15:56.023" UserId="1430" Comment="added 11 characters in body; edited tags; edited title" Text="Are there any video tutorials available for game programming with Max?" />
  <row Id="25379" PostHistoryTypeId="6" PostId="11757" RevisionGUID="d1a11dd6-cfdd-4dee-9553-1dc2ede7d5e7" CreationDate="2011-04-29T15:15:56.023" UserId="1430" Comment="added 11 characters in body; edited tags; edited title" Text="&lt;3dsmax&gt;" />
  <row Id="25380" PostHistoryTypeId="2" PostId="11759" RevisionGUID="6f3389c8-5cbd-4f11-bf4f-10f35a91f5a4" CreationDate="2011-04-29T15:17:17.410" UserId="6588" Text="3ds Max is not used for programming games. The relevance of 3ds Max to game development is that you can export 3D models to load in a game engine." />
  <row Id="25381" PostHistoryTypeId="2" PostId="11760" RevisionGUID="08710607-4c69-4244-aab5-0b55372fed1a" CreationDate="2011-04-29T15:20:41.433" UserId="1430" Text="3DS Max is a 3D modelling tool. [There are several video tutorials available][1] all over the internet (of varying quality). However, **you can't make a game just using Max** -- all it does is modelling and rendering. You'll need to use something else entirely, or at least something else in conjunction with Max, in order to make a game.&#xD;&#xA;&#xD;&#xA;**[Blender][2] is a similar kind of modelling tool that does have a built-in game engine that can be used.** It's also *much cheaper* than Max (because it's free). There's [lots of documentation and educational material][3] on Blender's website and elsewhere on the internet. You may also want to consider looking at [Unity][4]. There are several other game construction tools available as well.&#xD;&#xA;&#xD;&#xA;You could also teach yourself to program -- I'd recommend [Python][5] as a first language, if you choose to do this. This will give you a lot of control and flexibility in the games you create, but it will involve a much steeper learning curve (for example if you choose to go this route you'll likely be learning to develop very simple text-based games for some time before you are ready to tackle the complexity of 3D graphics and loading 3D models and scenes exported from Max).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?q=3DS%20max%20video%20tutorials&#xD;&#xA;  [2]: http://www.blender.org/&#xD;&#xA;  [3]: http://www.blender.org/education-help/&#xD;&#xA;  [4]: http://unity3d.com/&#xD;&#xA;  [5]: http://python.org/" />
  <row Id="25382" PostHistoryTypeId="5" PostId="11748" RevisionGUID="368095e3-361f-40ff-a51e-813bbc656a06" CreationDate="2011-04-29T15:53:39.090" UserId="6875" Comment="deleted 206 characters in body; added 65 characters in body; edited body" Text="I have the following tetrahedron:&#xD;&#xA;&#xD;&#xA;        var vertices = [&#xD;&#xA;            // Front face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;             1.0, -1.0,  1.0,&#xD;&#xA; &#xD;&#xA;            // Right face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;             1.0, -1.0,  1.0,&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA; &#xD;&#xA;            // Back face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA; &#xD;&#xA;            // Left face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;        ];&#xD;&#xA;&#xD;&#xA;How should I imagine texturing when I have triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;		  // Front face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Right face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Back face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Left face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25383" PostHistoryTypeId="2" PostId="11761" RevisionGUID="69c93e3a-4526-40e6-b16a-5f1179f01b0e" CreationDate="2011-04-29T15:54:55.583" UserId="7031" Text="A HTTP request from a mobile device is routed through a WAP Gateway. These are maintained by the mobile network operators. The WAP Gateway routes the request to the desired server and returns the response to the client.&#xD;&#xA;&#xD;&#xA;As far as I know, IP routing on a mobile phone has nothing to do with cell tower base stations as everyone on the same network would be routed through these gateways." />
  <row Id="25384" PostHistoryTypeId="2" PostId="11762" RevisionGUID="b76ebc71-3ffd-479a-83b1-86a30c6147b7" CreationDate="2011-04-29T16:51:21.257" UserId="7023" Text="As the other two people have said, you cannot make a game in Max. If you are a designer/artist and you wanna get into game development there are a couple of tools available online that you might like to consider picking up:&#xD;&#xA;&#xD;&#xA;1) **Construct:** http://www.scirra.com/construct/&#xD;&#xA;&#xD;&#xA;This is an open source (free) game development tool targeted specifically for 2D games. It's also targeted at people like you who aren't programmers because you don't need to learn programming to use it. The interface allows you to build a game without writing any code&#xD;&#xA;&#xD;&#xA;2) **Game Maker:** http://www.yoyogames.com/gamemaker/&#xD;&#xA;&#xD;&#xA;Basically a similar thing to Construct. It has a free version as well as a pro version. Also doesn't require programming&#xD;&#xA;&#xD;&#xA;3) **Game Salad:** http://gamesalad.com/&#xD;&#xA;&#xD;&#xA;Another similar thing, except this one is Mac only.&#xD;&#xA;&#xD;&#xA;Now these three are great if all you want to do is mess around with game development, have some fun and all, but if you're serious in getting into some real game development, unfortunately you **MUST** learn programming. That's not to say you need to be amazing at it, but you do need to know it relatively well. And the tool I very very much recommend you use if you want to get into it is called **Unity3d: http://www.unity3d.com**&#xD;&#xA;&#xD;&#xA;Unity is a free game development tool that is very popular nowadays amongst indie developers. Its interface is very well made. Basically if you want to get into serious game development - it doesn't get any easier then Unity. &#xD;&#xA;&#xD;&#xA;The final option is.. don't develop games. If you want to stay in 3DSMax, go ahead and become amazing at it, then you can make content for games such as 3D models, animations, textures, etc. &#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="25385" PostHistoryTypeId="5" PostId="11762" RevisionGUID="83f217cb-7106-4a19-98df-4b9b3097bba7" CreationDate="2011-04-29T16:57:27.567" UserId="7023" Comment="added 190 characters in body" Text="As the other two people have said, you cannot make a game in Max. If you are a designer/artist and you wanna get into game development there are a couple of tools available online that you might like to consider picking up:&#xD;&#xA;&#xD;&#xA;1) **Construct:** http://www.scirra.com/construct/&#xD;&#xA;&#xD;&#xA;This is an open source (free) game development tool targeted specifically for 2D games. It's also targeted at people like you who aren't programmers because you don't need to learn programming to use it. The interface allows you to build a game without writing any code&#xD;&#xA;&#xD;&#xA;2) **Game Maker:** http://www.yoyogames.com/gamemaker/&#xD;&#xA;&#xD;&#xA;Basically a similar thing to Construct. It has a free version as well as a pro version. Also doesn't require programming&#xD;&#xA;&#xD;&#xA;3) **Game Salad:** http://gamesalad.com/&#xD;&#xA;&#xD;&#xA;Another similar thing, except this one is Mac only.&#xD;&#xA;&#xD;&#xA;Now these three are great if all you want to do is mess around with game development, have some fun and all, but if you're serious in getting into some real game development, unfortunately you **MUST** learn programming. That's not to say you need to be amazing at it, but you do need to know it relatively well. And the tool I very very much recommend you use if you want to get into it is called **Unity3d: http://www.unity3d.com**&#xD;&#xA;&#xD;&#xA;Unity is a free game development tool that is very popular nowadays amongst indie developers. Its interface is very well made. Basically if you want to get into serious game development - it doesn't get any easier then Unity. You do need to write code to get stuff to happen in Unity, but in my opinion it's very easy to learn. The language you will be using in Unity is Javascript, C# or Boo. I recommend Javascript&#xD;&#xA;&#xD;&#xA;The final option is.. don't develop games. If you want to stay in 3DSMax, go ahead and become amazing at it, then you can make content for games such as 3D models, animations, textures, etc. &#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="25386" PostHistoryTypeId="2" PostId="11763" RevisionGUID="05ec8c24-3a29-4773-9d18-55c902e46ae4" CreationDate="2011-04-29T16:59:19.920" UserId="7032" Text="The problem here is an &quot;infinite&quot; supply of resources.  That is, if a player needs cash he can farm monsters.&#xD;&#xA;&#xD;&#xA;You can have money sinks and all sorts of creative ways to take money out of the system; but that isn't the issue, the issue is that the scale is unbalanced on the side of money coming in.&#xD;&#xA;&#xD;&#xA;So you need to limit it.  A few things you could do is only allow players to farm X amount of items/gold in Y time.  Or have a decay function.  That is, hour 1 a player could earn say 100 gold; but on hour 20 he could only earn 1 gold.&#xD;&#xA;&#xD;&#xA;You could put a reset or timers or whatever.  The point is to make it dismissing returns.&#xD;&#xA;&#xD;&#xA;Another option would be a &quot;tax&quot; either based on level or net worth.  So, at level 1 a health potion costs 1 gold; but at level 100 it costs 1000 gold! &#xD;&#xA;&#xD;&#xA;Or for ever 100 gold you earn, you need to be X in taxes to the &quot;king&quot;.&#xD;&#xA;&#xD;&#xA;A third option is to fix the amount of resources.  For every player that joins, inject a 100 gold (or the equal worth) into the system, but no more.&#xD;&#xA;&#xD;&#xA;The main point is, you don't want infinite input with a fixed output.  You need to align then by either A) fixing the input to a fixed amount of B) have the output in align (by percentage, not fixed amount) with the input.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="25387" PostHistoryTypeId="5" PostId="11746" RevisionGUID="e3cd3229-32fd-4561-97a0-fb9fae9dc100" CreationDate="2011-04-29T17:37:46.973" UserId="962" Comment="deleted 101 characters in body" Text="I am doing research on replicating an ad execution - http://www.digitalbuzzblog.com/gol-airlines-mobile-controlled-banner-game/&#xD;&#xA;&#xD;&#xA;It's a simple &quot;game&quot; involving using the phone as a forward/back/left/right controller for a car in flash on the internet. &#xD;&#xA;&#xD;&#xA;I've started reading on P2P, but I'm finding such a vast amount of information and non specific to what I need that it's hard for me to sort through. &#xD;&#xA;&#xD;&#xA;Does anyone know any tutorials or can shed some light on how I might go about making a very simple mobile controller for a flash game?" />
  <row Id="25388" PostHistoryTypeId="25" PostId="11757" RevisionGUID="4d56a9df-5647-4af0-bfa0-40795913c93d" CreationDate="2011-04-29T18:11:23.913" Comment="http://twitter.com/#!/StackGameDev/status/64029024351035392" />
  <row Id="25389" PostHistoryTypeId="2" PostId="11764" RevisionGUID="e4aea4af-5053-4b4e-ac83-8ab2a460a22a" CreationDate="2011-04-29T19:00:39.630" UserId="5014" Text="Lawyer here for a change.&#xD;&#xA;You can copy all of gameplay without any issues at all. That is not copyrightable or enforceable. The things that matter are assets - art, sound, music, video, etc.&#xD;&#xA;For example if you take ZX game and clone it with your own assets you will be perfectly fine doing that. But if you take some asset and use it in different kind of game all together, it could be enforceable. &#xD;&#xA;There are loads of examples of this in the industry, for example first Warcraft basically copied Dune 2 gameplay mechanics and the genre was totally new at the time.&#xD;&#xA;  For a more recent example - check out Gameloft company, the developer for iphone. What they do is copy successful game ideas as close as possible to the original but without using any art assets from originals. That is their successful business model.&#xD;&#xA;They copied games like Halo, Starcraft, World of warcraft and so on with huge success in their field. It is even funny that if you check their wow clone you may see that animations of orcs and their looks are very close to the original.&#xD;&#xA;&#xD;&#xA;TL;DR version:&#xD;&#xA;As long as you copy gameplay and don't copy any assets (art, music, animation) you are 100% fine.&#xD;&#xA;" />
  <row Id="25390" PostHistoryTypeId="2" PostId="11765" RevisionGUID="34614dfd-06cf-41aa-8ccb-0277ebd01bcd" CreationDate="2011-04-29T20:26:48.853" UserId="2229" Text="After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game.&#xD;&#xA;&#xD;&#xA;*I will need to export the following:*&#xD;&#xA;&#xD;&#xA; - Vertices&#xD;&#xA; - Indices&#xD;&#xA; - Normals&#xD;&#xA; - UVs&#xD;&#xA; - Material Information&#xD;&#xA; - Animation information (no clue, how to import it)&#xD;&#xA; - Collision mesh&#xD;&#xA; - ..another assets..&#xD;&#xA;&#xD;&#xA;Can I kindly ask for a hint, how to construct my custom file format. How to organize data within my files, please? Does anoybody have a good adivce on exporting animation information, especially when the mesh changes its geometry?&#xD;&#xA;&#xD;&#xA;I would be thankful for advices that could point me into right direction. It would be nice to save some time instead of wasting it on incorrect approaches. &#xD;&#xA;&#xD;&#xA;*I use Softimage as my 3D authoring tool. Target platform is OpenGL ES 2.0 running on mobile devices (iOS, Android). Programming language: C++.*" />
  <row Id="25391" PostHistoryTypeId="1" PostId="11765" RevisionGUID="34614dfd-06cf-41aa-8ccb-0277ebd01bcd" CreationDate="2011-04-29T20:26:48.853" UserId="2229" Text="Data Organization in Custom 3D Mesh File Format" />
  <row Id="25392" PostHistoryTypeId="3" PostId="11765" RevisionGUID="34614dfd-06cf-41aa-8ccb-0277ebd01bcd" CreationDate="2011-04-29T20:26:48.853" UserId="2229" Text="&lt;game-design&gt;&lt;opengl&gt;&lt;c++&gt;&lt;opengl-es&gt;&lt;3d-meshes&gt;" />
  <row Id="25393" PostHistoryTypeId="5" PostId="11619" RevisionGUID="22a70553-06ae-4a3a-93b8-2a50f8517c4f" CreationDate="2011-04-29T20:26:56.913" UserId="7035" Comment="formulae formatting" Text="Since you didn't mention any API for sound I'll give you the general answer. &#xD;&#xA;&#xD;&#xA;First get the distance between the audio listener and the audio source  &#xD;&#xA;d(L,S) = sqrt((x2-x1)&lt;sup&gt;2&lt;/sup&gt; + (y2-y1)&lt;sup&gt;2&lt;/sup&gt; + (z2-z1)&lt;sup&gt;2&lt;/sup&gt;)&#xD;&#xA;&#xD;&#xA;Then you define a distance where you don't want it to be audible anymore, lets say 150m&#xD;&#xA;&#xD;&#xA;If your distance is 40 meters from the source, then the volume is about 73%.&#xD;&#xA;&#xD;&#xA;To give you an equation that would be:  &#xD;&#xA;1-(d(L,S)/maxDistance)  &#xD;&#xA;or  (1-(40/150)) = about .73  &#xD;&#xA;That will be the percentage of volume from 1 to 100%&#xD;&#xA;&#xD;&#xA;That's assuming you want the volume to change linearly with your position change." />
  <row Id="25394" PostHistoryTypeId="24" PostId="11619" RevisionGUID="22a70553-06ae-4a3a-93b8-2a50f8517c4f" CreationDate="2011-04-29T20:26:56.913" Comment="Proposed by 7035 approved by 51 edit id of 397" />
  <row Id="25395" PostHistoryTypeId="6" PostId="11765" RevisionGUID="e20df7cc-4653-4922-a8eb-ff5ae0689c3f" CreationDate="2011-04-29T20:29:40.590" UserId="51" Comment="edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;opengl-es&gt;&lt;3d-meshes&gt;" />
  <row Id="25396" PostHistoryTypeId="2" PostId="11766" RevisionGUID="b778cc98-1560-487c-ab9e-39e550defa04" CreationDate="2011-04-29T20:55:15.083" UserId="2229" Text="Is it possible to mix 2D and 3D graphics in a single OpenGL ES 2.0 game, please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have plenty of 2D graphics in my game. The 2D graphics is represented by two triangular polygons (making up a rectangle) with texture on them. I use **orthographic** matrix to render the whole scene.&#xD;&#xA;&#xD;&#xA;However, I need to add some 3D effects into my game. Threfore, I wish to use **perspective** camera to render the meshes.&#xD;&#xA;&#xD;&#xA;Is it possible to **mix orthographic and perspective camera** in one scene? If yes, is there going to be a large performance cost for this? Is there any recommended approach to do this effectively? I wil have 90% of 2D graphics and only 10% of 3D.&#xD;&#xA;&#xD;&#xA;Target platform is OpenGL ES 2.0 (iOS, Android). I use C++ to develop. &#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="25397" PostHistoryTypeId="1" PostId="11766" RevisionGUID="b778cc98-1560-487c-ab9e-39e550defa04" CreationDate="2011-04-29T20:55:15.083" UserId="2229" Text="OpenGL ES 2.0: Mixing 2D with 3D" />
  <row Id="25398" PostHistoryTypeId="3" PostId="11766" RevisionGUID="b778cc98-1560-487c-ab9e-39e550defa04" CreationDate="2011-04-29T20:55:15.083" UserId="2229" Text="&lt;opengl-es&gt;&lt;openg&gt;" />
  <row Id="25399" PostHistoryTypeId="2" PostId="11767" RevisionGUID="144a2cdd-fe3e-44b4-8347-7ad62f404200" CreationDate="2011-04-29T21:07:26.080" UserId="5259" Text="This is easily done.&#xD;&#xA;&#xD;&#xA;Set the view transform to orthographic for the 2D stuff, and render it. Then, before clearing the framebuffer, draw the effects with a perspective projection. The projection will only effect the geometry drawn after it, so just set the desired mode prior to drawing.&#xD;&#xA;&#xD;&#xA;This is the same way we handle HUDs in our FPS. :)&#xD;&#xA;&#xD;&#xA;The only performance impact is that your are changing a uniform variable (your project matrix), right? So, just try to batch things to minimize state changes--same old stuff." />
  <row Id="25400" PostHistoryTypeId="6" PostId="11766" RevisionGUID="1f7ee1d1-5ce3-4d94-a5bf-82a71b0d8741" CreationDate="2011-04-29T21:10:13.270" UserId="5259" Comment="edited tags" Text="&lt;opengl-es&gt;" />
  <row Id="25401" PostHistoryTypeId="25" PostId="11766" RevisionGUID="9cc0495a-41a6-42c8-928c-d372e65e1c38" CreationDate="2011-04-29T21:11:23.503" Comment="http://twitter.com/#!/StackGameDev/status/64074322389630977" />
  <row Id="25402" PostHistoryTypeId="5" PostId="11765" RevisionGUID="5c61b2dc-7c5d-4e29-b067-44c4fbb8d672" CreationDate="2011-04-29T21:28:02.170" UserId="2229" Comment="added more information.." Text="After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game.&#xD;&#xA;&#xD;&#xA;*I will need to export the following:*&#xD;&#xA;&#xD;&#xA; - Vertices&#xD;&#xA; - Indices&#xD;&#xA; - Normals&#xD;&#xA; - UVs&#xD;&#xA; - Material Information&#xD;&#xA; - Animation information (no clue, how to import it)&#xD;&#xA; - Collision mesh&#xD;&#xA; - Game Properties defined within 3D authoring tool (object intelligence, aggressivity, etc..)&#xD;&#xA; - ..another assets..&#xD;&#xA;&#xD;&#xA;Can I kindly ask for a hint, how to construct my custom file format. How to organize data within my files, please? Does anoybody have a good adivce on exporting animation information, especially when the mesh changes its geometry?&#xD;&#xA;&#xD;&#xA;I would be thankful for advices that could point me into right direction. It would be nice to save some time instead of wasting it on incorrect approaches. &#xD;&#xA;&#xD;&#xA;*I use Softimage as my 3D authoring tool. Target platform is OpenGL ES 2.0 running on mobile devices (iOS, Android). Programming language: C++.*" />
  <row Id="25403" PostHistoryTypeId="2" PostId="11768" RevisionGUID="896cd6be-aebb-4992-99d9-5ed2a811164a" CreationDate="2011-04-29T22:54:42.797" UserId="6412" Text="I'm not sure if there's a better way to ask that, but I have a hovercraft which hovers by imparting force at each of four corners. I'd like to clamp the maximum variance between the thrusters so if one corner hovers over something higher altitude, the effect is less dramatic. &#xD;&#xA;&#xD;&#xA;For example, if I had 4-6-8-10, I might want it to compress to 4-5-6-7." />
  <row Id="25404" PostHistoryTypeId="1" PostId="11768" RevisionGUID="896cd6be-aebb-4992-99d9-5ed2a811164a" CreationDate="2011-04-29T22:54:42.797" UserId="6412" Text="Compress the variance in a set of numbers?" />
  <row Id="25405" PostHistoryTypeId="3" PostId="11768" RevisionGUID="896cd6be-aebb-4992-99d9-5ed2a811164a" CreationDate="2011-04-29T22:54:42.797" UserId="6412" Text="&lt;math&gt;" />
  <row Id="25406" PostHistoryTypeId="25" PostId="11768" RevisionGUID="412021e0-c140-4040-8bf8-1b50c67410ab" CreationDate="2011-04-30T00:11:23.480" Comment="http://twitter.com/#!/StackGameDev/status/64119621229355008" />
  <row Id="25407" PostHistoryTypeId="2" PostId="11769" RevisionGUID="95f336e0-21d0-476e-bd69-808dc751a9a7" CreationDate="2011-04-30T00:15:19.977" UserId="6107" Text="I believe what you are trying to do is simply stack the matrix of each child to generate the toWorldMatrix from a set of toParentMatrices?&#xD;&#xA;&#xD;&#xA;Given:&#xD;&#xA;&#xD;&#xA;    class Object&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;       void GenerateWorldMats();&#xD;&#xA;    &#xD;&#xA;       cMatrix toWorld;&#xD;&#xA;       cMatrix toParent;&#xD;&#xA;    &#xD;&#xA;       Object* mParent;&#xD;&#xA;       Object** mChildren;&#xD;&#xA;       uint32 mNumChildren;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;You can...&#xD;&#xA;&#xD;&#xA;    void Object::GenerateWorldMats()  &#xD;&#xA;    {&#xD;&#xA;       if(mParent == NULL)&#xD;&#xA;       {&#xD;&#xA;          toWorld.Identity();&#xD;&#xA;       }&#xD;&#xA;       else &#xD;&#xA;       {&#xD;&#xA;          toWorld = mParent.toWorld * toParent;  //Or Swapped order depending on pre or post mult&#xD;&#xA;       }&#xD;&#xA;    &#xD;&#xA;       for(int i = 0; i &lt; mNumChildren; ++i)&#xD;&#xA;       {&#xD;&#xA;          mChildren[i]-&gt;GenerateWorldMats();&#xD;&#xA;       }&#xD;&#xA;    }" />
  <row Id="25408" PostHistoryTypeId="2" PostId="11770" RevisionGUID="48251d80-58b0-42ef-81f9-39e7f864b65c" CreationDate="2011-04-30T01:40:21.033" UserId="962" Text="From what you posted I see a pattern you could use. Here is some psudocode&#xD;&#xA;&#xD;&#xA;    values = {4,6,8,10}&#xD;&#xA;    &#xD;&#xA;    lowest = 100 //or some other imposible high number&#xD;&#xA;    for each int in values {&#xD;&#xA;     if int &lt; lowest then lowest = int&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    for each int in values {&#xD;&#xA;     value = value -((lowest-value)/2)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;         &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25409" PostHistoryTypeId="2" PostId="11771" RevisionGUID="78e8a77f-873a-4e99-9f2d-0a4fdaa0cdc6" CreationDate="2011-04-30T01:42:55.770" UserId="7042" Text="One of the maps I've played, nicknamed SotiS (DoTA in SC2) has the ability to maintain stats, which are sent back to their own server.&#xD;&#xA;&#xD;&#xA;Does anybody know how this is done?" />
  <row Id="25410" PostHistoryTypeId="1" PostId="11771" RevisionGUID="78e8a77f-873a-4e99-9f2d-0a4fdaa0cdc6" CreationDate="2011-04-30T01:42:55.770" UserId="7042" Text="Gathering Stats from a StarCraft 2 game" />
  <row Id="25411" PostHistoryTypeId="3" PostId="11771" RevisionGUID="78e8a77f-873a-4e99-9f2d-0a4fdaa0cdc6" CreationDate="2011-04-30T01:42:55.770" UserId="7042" Text="&lt;starcraft-2&gt;" />
  <row Id="25412" PostHistoryTypeId="2" PostId="11772" RevisionGUID="59979677-e7a9-4ebe-9c1f-6145e9c936df" CreationDate="2011-04-30T02:47:14.687" UserId="6592" Text="I might also add that if you are sued and you do not have the resources (money, time) to defend yourself, it is 100% irrelevant whether you would win or not." />
  <row Id="25413" PostHistoryTypeId="5" PostId="11772" RevisionGUID="bae36369-4a31-43bb-a475-c25bedfc0297" CreationDate="2011-04-30T03:04:22.157" UserId="6592" Comment="added 197 characters in body" Text="I might also add that if you are sued and you do not have the resources (money, time) to defend yourself, it is 100% irrelevant whether you would win or not.&#xD;&#xA;&#xD;&#xA;When I consider the legal ramifications of something, I often ask myself &quot;what is the likelihood that I will get sued if I do this?&quot; as opposed to &quot;if I were sued because of this, would I win?&quot;" />
  <row Id="25414" PostHistoryTypeId="25" PostId="11771" RevisionGUID="9e3adb2f-ce5a-41d4-81bf-42d52d437419" CreationDate="2011-04-30T03:11:23.597" Comment="http://twitter.com/#!/StackGameDev/status/64164919083417601" />
  <row Id="25415" PostHistoryTypeId="2" PostId="11773" RevisionGUID="5be251b2-fe60-4889-a09e-afd9d832fcdd" CreationDate="2011-04-30T03:27:21.413" UserId="2187" Text="I believe you can write to files with the scripting available in SC2. The server interaction is done by a [separate application][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playsotis.com/index.php?option=com_kunena&amp;func=view&amp;catid=7&amp;id=16342&amp;Itemid=210" />
  <row Id="25416" PostHistoryTypeId="2" PostId="11774" RevisionGUID="ec8cbcbb-f1a7-4315-a7a1-d2445632f7e1" CreationDate="2011-04-30T05:43:32.173" UserId="5844" Text="The title probably is not that clear but please help me out here. I am going to write a (mostly) 2D game using OpenGL ES 2.0 so if I have a vertex at (5,10,1) I want it to be drawn at the (5,10) pixel on the screen. But I can't use orthogonal projection because I'll still use some few real 3D objects on it to give a cool effect, and I want to preserve the perspective distortion on their vertices with Z &gt; 1.&#xD;&#xA;&#xD;&#xA;How should I set up my view/projection matrices to achieve this?&#xD;&#xA;&#xD;&#xA;note: I am so sorry if this sounds like a noob question, but please take in account that I am a noob myself..." />
  <row Id="25417" PostHistoryTypeId="1" PostId="11774" RevisionGUID="ec8cbcbb-f1a7-4315-a7a1-d2445632f7e1" CreationDate="2011-04-30T05:43:32.173" UserId="5844" Text="How to ensure that a 3D coordinate at Z=1 act like a 2D coordinate (using perspective projection)" />
  <row Id="25418" PostHistoryTypeId="3" PostId="11774" RevisionGUID="ec8cbcbb-f1a7-4315-a7a1-d2445632f7e1" CreationDate="2011-04-30T05:43:32.173" UserId="5844" Text="&lt;2d&gt;&lt;opengl-es&gt;" />
  <row Id="25419" PostHistoryTypeId="25" PostId="11774" RevisionGUID="d211e498-14d3-4649-a795-4c9f477188c1" CreationDate="2011-04-30T06:11:23.433" Comment="http://twitter.com/#!/StackGameDev/status/64210217545629697" />
  <row Id="25420" PostHistoryTypeId="2" PostId="11775" RevisionGUID="9079ab0b-c9bc-4a08-a10b-09f7afa3e276" CreationDate="2011-04-30T06:45:18.370" UserId="1263" Text="I'm in the planning stage of a new project. Without going into details, this is a real-time 2D game with some basic construction aspects, combat, and a large procedurally generated world.&#xD;&#xA;&#xD;&#xA;Because of the design of the game, it really makes most sense for it to run directly in a browser with all of a player's progress stored on the server. Basically each player will have their own persistent 2D map which they can modify, and I want them to be able to access it from any computer. It's not multiplayer.&#xD;&#xA;&#xD;&#xA;Imagine a real-time 2D action and building game that could be played completely offline, except it saves your progress to a server so it can be accessed from anywhere.&#xD;&#xA;&#xD;&#xA;This will be my first foray into making an online game or web application, so I'm wanting it to be as painless as possible. Would GAE work well for a game like this? I've been told that GAE is simply not appropriate for a real-time game; however, this has always been said in the context of a multiplayer game, not a single player game." />
  <row Id="25421" PostHistoryTypeId="1" PostId="11775" RevisionGUID="9079ab0b-c9bc-4a08-a10b-09f7afa3e276" CreationDate="2011-04-30T06:45:18.370" UserId="1263" Text="Is Google App Engine suitable for a real-time but single player game?" />
  <row Id="25422" PostHistoryTypeId="3" PostId="11775" RevisionGUID="9079ab0b-c9bc-4a08-a10b-09f7afa3e276" CreationDate="2011-04-30T06:45:18.370" UserId="1263" Text="&lt;2d&gt;&lt;google-app-engine&gt;" />
  <row Id="25423" PostHistoryTypeId="5" PostId="11748" RevisionGUID="e364485e-7015-44d4-8722-69dd85837066" CreationDate="2011-04-30T06:48:46.997" UserId="6875" Comment="added 86 characters in body" Text="I have the following tetrahedron: **EDIT** This is actually not a tetrahedron, I mixed it up, so I will edit this soon.&#xD;&#xA;&#xD;&#xA;        var vertices = [&#xD;&#xA;            // Front face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;             1.0, -1.0,  1.0,&#xD;&#xA; &#xD;&#xA;            // Right face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;             1.0, -1.0,  1.0,&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA; &#xD;&#xA;            // Back face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;             1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA; &#xD;&#xA;            // Left face&#xD;&#xA;             0.0,  1.0,  0.0,&#xD;&#xA;            -1.0, -1.0, -1.0,&#xD;&#xA;            -1.0, -1.0,  1.0,&#xD;&#xA;        ];&#xD;&#xA;&#xD;&#xA;How should I imagine texturing when I have triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;		  // Front face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Right face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Back face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Left face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25424" PostHistoryTypeId="5" PostId="11774" RevisionGUID="305000c4-7da7-4948-bbf4-1724bc619d6a" CreationDate="2011-04-30T06:50:53.297" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [OpenGL ES 2.0: Mixing 2D with 3D](http://gamedev.stackexchange.com/questions/11766/opengl-es-2-0-mixing-2d-with-3d)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;The title probably is not that clear but please help me out here. I am going to write a (mostly) 2D game using OpenGL ES 2.0 so if I have a vertex at (5,10,1) I want it to be drawn at the (5,10) pixel on the screen. But I can't use orthogonal projection because I'll still use some few real 3D objects on it to give a cool effect, and I want to preserve the perspective distortion on their vertices with Z &gt; 1.&#xD;&#xA;&#xD;&#xA;How should I set up my view/projection matrices to achieve this?&#xD;&#xA;&#xD;&#xA;note: I am so sorry if this sounds like a noob question, but please take in account that I am a noob myself..." />
  <row Id="25425" PostHistoryTypeId="10" PostId="11774" RevisionGUID="1377c07a-b90f-440c-8b83-22b86d888135" CreationDate="2011-04-30T06:50:53.000" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25426" PostHistoryTypeId="5" PostId="11775" RevisionGUID="756b27e4-1108-4b8a-92a2-fb3886cabb8e" CreationDate="2011-04-30T07:22:41.113" UserId="1263" Comment="added 329 characters in body" Text="I'm in the planning stage of a new project. Without going into details, this is a real-time 2D game with some basic construction aspects, combat, and a large procedurally generated world.&#xD;&#xA;&#xD;&#xA;Because of the design of the game, it really makes most sense for it to run directly in a browser with all of a player's progress stored on the server. Basically each player will have their own persistent 2D map which they can modify, and I want them to be able to access it from any computer. It's not multiplayer.&#xD;&#xA;&#xD;&#xA;Imagine a real-time 2D action and building game that could be played completely offline, except it saves your progress to a server so it can be accessed from anywhere.&#xD;&#xA;&#xD;&#xA;This will be my first foray into making an online game or web application, so I'm wanting it to be as painless as possible. Would GAE work well for a game like this? I've been told that GAE is simply not appropriate for a real-time game; however, this has always been said in the context of a multiplayer game, not a single player game.&#xD;&#xA;&#xD;&#xA;I should also note that it would be acceptable for the game to have an ordinary save option and to only save data to the server when this option is used by the player. Since that means the player would lose progress if he just closed the tab or browser window without saving, it could be accompanied with a 5 minute autosave." />
  <row Id="25427" PostHistoryTypeId="25" PostId="11775" RevisionGUID="f9ddbe0e-661a-469b-a294-96a614f57a5d" CreationDate="2011-04-30T09:11:23.443" Comment="http://twitter.com/#!/StackGameDev/status/64255516574089216" />
  <row Id="25428" PostHistoryTypeId="2" PostId="11776" RevisionGUID="9c630424-8a5e-46bc-a5dd-08d3659d620b" CreationDate="2011-04-30T09:40:19.163" UserId="5073" Text="Hi guys I Am developing the application in cocoas2d using the box 2d frame work but unfortunately&#xD;&#xA;&#xD;&#xA;i'm not able to restrict the orange ball in the half screen area of the image shown here i want that ball not to go opposite part of the screen&#xD;&#xA;&#xD;&#xA;I Have Used The b2Mousejoint For to move the ball around the screen&#xD;&#xA;&#xD;&#xA;b2PrismaticJointDef restrict on any particular axis But&#xD;&#xA;i want to restrict on the particular rect area of the screen &#xD;&#xA;![i want to prevent orange color ball to move within displayed screen not the other part of the screen][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/N1rpR.png" />
  <row Id="25429" PostHistoryTypeId="1" PostId="11776" RevisionGUID="9c630424-8a5e-46bc-a5dd-08d3659d620b" CreationDate="2011-04-30T09:40:19.163" UserId="5073" Text="mouse joint is not working to restrict the ball in the half part of the screen" />
  <row Id="25430" PostHistoryTypeId="3" PostId="11776" RevisionGUID="9c630424-8a5e-46bc-a5dd-08d3659d620b" CreationDate="2011-04-30T09:40:19.163" UserId="5073" Text="&lt;iphone&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="25431" PostHistoryTypeId="5" PostId="11755" RevisionGUID="67be70b5-84fa-4dc6-a271-be1013de28ae" CreationDate="2011-04-30T11:42:06.417" UserId="6588" Comment="added 75 characters in body" Text="Dominoes, checkers, and chess are all ancient games that you can do whatever you want with. Modern games like Monopoly are trickier and the legalities can vary. First off, never copy the names because that is copyrighted. Similarly, change all the graphics because images are protected.&#xD;&#xA;&#xD;&#xA;It's usually fine to copy gameplay because that can't be copyrighted, but watch out for patents on hit games. &lt;s&gt;For example, I wouldn't be surprised if the rules of Monopoly are patented.&lt;/s&gt;" />
  <row Id="25432" PostHistoryTypeId="25" PostId="11776" RevisionGUID="ce60c277-4b2e-4b0e-ad5c-570eda677139" CreationDate="2011-04-30T12:11:23.793" Comment="http://twitter.com/#!/StackGameDev/status/64300815589978112" />
  <row Id="25433" PostHistoryTypeId="2" PostId="11777" RevisionGUID="42a169c3-772f-4f23-8869-732fccdacb0c" CreationDate="2011-04-30T14:49:58.870" UserId="6978" Text="I'm developing a game at the moment and I had an idea where the game's story line would randomly generate at the progressed and their actions for affect the story. &#xD;&#xA;&#xD;&#xA;Would this is be a bad idea in terms of gameplay or would the &quot;traditional&quot; storyline that has multiple endings be the best idea?" />
  <row Id="25434" PostHistoryTypeId="1" PostId="11777" RevisionGUID="42a169c3-772f-4f23-8869-732fccdacb0c" CreationDate="2011-04-30T14:49:58.870" UserId="6978" Text="Randomly generated Story" />
  <row Id="25435" PostHistoryTypeId="3" PostId="11777" RevisionGUID="42a169c3-772f-4f23-8869-732fccdacb0c" CreationDate="2011-04-30T14:49:58.870" UserId="6978" Text="&lt;procedural-generation&gt;&lt;random&gt;&lt;storyboard&gt;" />
  <row Id="25436" PostHistoryTypeId="6" PostId="11777" RevisionGUID="d6646a06-92cc-4762-a14a-78e6d0c17355" CreationDate="2011-04-30T14:54:10.927" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;procedural-generation&gt;&lt;random&gt;" />
  <row Id="25437" PostHistoryTypeId="5" PostId="11777" RevisionGUID="0183807f-939d-4c89-959c-8b06c7f6d220" CreationDate="2011-04-30T15:06:32.170" UserId="6978" Comment="deleted 2 characters in body" Text="I'm developing a game at the moment and I had an idea where the game's story line would randomly generate as the player progressed and their actions would affect the story. &#xD;&#xA;&#xD;&#xA;Would this is be a bad idea in terms of gameplay or would have a storyline that has multiple endings be the best idea?" />
  <row Id="25438" PostHistoryTypeId="25" PostId="11777" RevisionGUID="c3447493-deeb-4c3f-8678-3be8d7071bf3" CreationDate="2011-04-30T15:11:23.413" Comment="http://twitter.com/#!/StackGameDev/status/64346112944910336" />
  <row Id="25439" PostHistoryTypeId="2" PostId="11778" RevisionGUID="2a2e97aa-b1c8-4553-889b-bd1b397c35c1" CreationDate="2011-04-30T15:30:29.303" UserId="1156" Text="A hand written storyline is going to be much, MUCH better for the end player. A good writer who can write a storyline well will manage to convey the storyline across much better than a computer will.&#xD;&#xA;&#xD;&#xA;A procedurally done storyline would also take a LOT of implementation. Even then, it's going to have to rely on some kind of random choices from data - it can't just make up the entire storyline.&#xD;&#xA;&#xD;&#xA;Some games have incredibly immerseful storylines (Fallout 3, Amnesia), and they're hand written. Fallout's is slightly different, in terms that it has the karma system I mentioned..as such, the people will react differently to you (and you get different storyline options for the finale)." />
  <row Id="25440" PostHistoryTypeId="2" PostId="11779" RevisionGUID="db1c993c-db22-4295-b819-e253443d01b1" CreationDate="2011-04-30T15:34:57.237" UserId="6588" Text="If you can find a copy I might recommend looking for the DnD book &quot;Guide to Villains.&quot; To this day I wish I hadn't lost that.&#xD;&#xA;&#xD;&#xA;The reason I bring it up is because they discuss a very interesting approach to doing a semi-random story that responds to the player's actions, called a &quot;power matrix.&quot; In essence the story space is designed ahead of time with a bunch of characters, their relationships, and story pieces (ie. event X happens) but the specific order those events happen or even which events happen reacts to what the player's choose to do.&#xD;&#xA;&#xD;&#xA;At the most basic level the story depends on the very first choice the players make: who they talk to when they first arrive. As soon as you talk to someone, their relationships to all the other characters determines which characters ultimately take on which roles within the story.&#xD;&#xA;&#xD;&#xA;I've always wanted to experiment with a power matrix in a computerized game, and hopefully someday I'll have the time for such a project." />
  <row Id="25441" PostHistoryTypeId="5" PostId="11776" RevisionGUID="786525d0-82d1-4c9c-b157-6b3fd006a78d" CreationDate="2011-04-30T17:23:55.787" UserId="3585" Comment="tried to improve grammar. there's still room for improvement, i'm not a native speaker" Text="I'm developing a application in cocos2d using the Box2D framework, but unfortunately I am having issues. I'm not able to restrict the orange ball in the half screen area, taking the image below as reference, I don't want to allow the ball to go to the opposite part of the screen.&#xD;&#xA;&#xD;&#xA;I'm using the b2MouseJoint to move the ball around the screen. b2PrismaticJointDef seems to restrict on any particular axis, but I need to restrict on a particular rectangular area of the screen.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;![i want to prevent orange color ball to move within displayed screen not the other part of the screen][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/N1rpR.png" />
  <row Id="25442" PostHistoryTypeId="4" PostId="11776" RevisionGUID="786525d0-82d1-4c9c-b157-6b3fd006a78d" CreationDate="2011-04-30T17:23:55.787" UserId="3585" Comment="tried to improve grammar. there's still room for improvement, i'm not a native speaker" Text="Mouse joint isn't restricting the ball from going to the other part of the screen" />
  <row Id="25443" PostHistoryTypeId="24" PostId="11776" RevisionGUID="786525d0-82d1-4c9c-b157-6b3fd006a78d" CreationDate="2011-04-30T17:23:55.787" Comment="Proposed by 3585 approved by 189 edit id of 398" />
  <row Id="25444" PostHistoryTypeId="2" PostId="11780" RevisionGUID="3b7ca3bc-44ec-492c-a9a4-a354c55f622d" CreationDate="2011-04-30T17:29:19.403" UserId="7048" Text="Hey, I'm creating my second game ever, but this time - using Java. Before I used Pascal and CRT module! =D It's 2D game where you need to drag the ball with mouse from location A to location B. Right now, I have ball on location A and I want to make it &quot;alive&quot;. With that I mean that it will move from location A in 135° direction until it reaches wall, then bounce the wall and move in 45° direction, then again wall - in 315° and so on.&#xD;&#xA;&#xD;&#xA;![Bouncing...][1]&#xD;&#xA;&#xD;&#xA;Let's imagine that all board is 460x640 units big. So, as you can see in image above, ball's start location is 0. When the ball for the first time bounce the wall, location may be like x = 400, y = 480. In this example I have four possible directions like North, East, South and West, but in real game, when player drags the ball with his mouse, options may be more, right? I think so. So I think that I need to use degrees for it. I made list as example of what do I mean...&#xD;&#xA;&#xD;&#xA;&gt;45°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x + .5,&#xD;&#xA;&gt;  y = y - .5&#xD;&#xA;&#xD;&#xA;&gt;90°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x + 1,&#xD;&#xA;&gt;  y = y + 0&#xD;&#xA;&#xD;&#xA;&gt;135°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x + .5,&#xD;&#xA;&gt;  y = y + .5&#xD;&#xA;&#xD;&#xA;&gt;180°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x + 0,&#xD;&#xA;&gt;  y = y + 1&#xD;&#xA;&#xD;&#xA;&gt;225°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x - .5,&#xD;&#xA;&gt;  y = y + .5&#xD;&#xA;&#xD;&#xA;&gt;270°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x - 1,&#xD;&#xA;&gt;  y = y + 0&#xD;&#xA;&#xD;&#xA;&gt;315°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x - .5,&#xD;&#xA;&gt;  y = y - .5&#xD;&#xA;&#xD;&#xA;&gt;360°:&#xD;&#xA;&#xD;&#xA;&gt;  x = x + 0,&#xD;&#xA;&gt;  y = y - 1&#xD;&#xA;&#xD;&#xA;&gt;246°:&#xD;&#xA;&#xD;&#xA;&gt;  x = ?,&#xD;&#xA;&gt;  y = ?&#xD;&#xA;&#xD;&#xA;The main problem is that I don't know how to covert degrees to coordinates and vice versa. For example I need to know x and y for 246°. Why? By knowing x and y I can move ball, because all my application basically is infinite loop that takes pause, then calculate x and y from degrees and then move ball. Please keep in mind that I'm very newbie to games development, I'm not good at math (unfortunately) and English isn't my native language... as you can see.&#xD;&#xA;&#xD;&#xA;P.S. Maybe all idea about how-to is wrong!??&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FP4J8.jpg" />
  <row Id="25445" PostHistoryTypeId="1" PostId="11780" RevisionGUID="3b7ca3bc-44ec-492c-a9a4-a354c55f622d" CreationDate="2011-04-30T17:29:19.403" UserId="7048" Text="Degrees to Coordinates" />
  <row Id="25446" PostHistoryTypeId="3" PostId="11780" RevisionGUID="3b7ca3bc-44ec-492c-a9a4-a354c55f622d" CreationDate="2011-04-30T17:29:19.403" UserId="7048" Text="&lt;collision-detection&gt;&lt;game-mechanics&gt;&lt;coordinates&gt;" />
  <row Id="25447" PostHistoryTypeId="2" PostId="11781" RevisionGUID="d3800341-9d12-4ed5-900e-1280bf033888" CreationDate="2011-04-30T17:34:53.907" UserId="5473" Text="This is a non-trivial problem. I spent a fair amount of timing delving into it last year.&#xD;&#xA;&#xD;&#xA;You will want to look into the implementation of the first ever dynamic storyteller program, TaleSpin. This was written in 1976 and still things have not progressed much further in terms of dynamic story generation. TaleSpin will give you an idea of the basic elements you would need to model. See [this][1] and [this][2].&#xD;&#xA;&#xD;&#xA;Ultimately, a dynamic story will hinge off agents' motivations and goals (and further, one might specify how a particular agent might go about achieving its goals). It will also work off their knowledge of the world and how that knowledge enables them to come up with solutions to meet goals in their goal stack. (Depending on how you model the problem space, and I don't doubt there are many ways, graph theory and discrete mathematics in general may come in very handy here).&#xD;&#xA;&#xD;&#xA;Since real-life motivations/goals are often quite complex, you would need to look into how much realism you would want.&#xD;&#xA;&#xD;&#xA;Essentially, if you want anything more than a very (and I do mean *very*) simple story generator, you have a good deal of work ahead of you.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eliterature.org/images/microtalespin.txt&#xD;&#xA;  [2]: http://grandtextauto.org/2007/10/30/scott-turner-on-minstrel/&#xD;&#xA;" />
  <row Id="25448" PostHistoryTypeId="5" PostId="11781" RevisionGUID="a4b92eb4-03d5-4c5a-9d56-fceb1458c833" CreationDate="2011-04-30T17:41:29.737" UserId="5473" Comment="warning further" Text="This is a non-trivial problem. I spent a fair amount of timing delving into it last year.&#xD;&#xA;&#xD;&#xA;You will want to look into the implementation of the first ever dynamic storyteller program, TaleSpin. This was written in 1976 and still things have not progressed much further in terms of dynamic story generation. TaleSpin will give you an idea of the basic elements you would need to model. See [this][1] and [this][2].&#xD;&#xA;&#xD;&#xA;Ultimately, a dynamic story will hinge off agents' motivations and goals (and further, one might specify how a particular agent might go about achieving its goals). It will also work off their knowledge of the world and how that knowledge enables them to come up with solutions to meet goals in their goal stack. (Depending on how you model the problem space, and I don't doubt there are many ways, graph theory and discrete mathematics in general may come in very handy here).&#xD;&#xA;&#xD;&#xA;Since real-life motivations/goals are often quite complex, you would need to look into how much realism you would want.&#xD;&#xA;&#xD;&#xA;Essentially, if you want anything more than a very (and I do mean *very*) simple story generator, you have a good deal of work ahead of you. Beyond that, even, there lie issues of balancing that others have noted. Caveat emptor -- This problem is a hotbed of hidden complexity.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eliterature.org/images/microtalespin.txt&#xD;&#xA;  [2]: http://grandtextauto.org/2007/10/30/scott-turner-on-minstrel/&#xD;&#xA;" />
  <row Id="25449" PostHistoryTypeId="2" PostId="11782" RevisionGUID="da59eb4c-503c-4683-93a8-966c0feeb231" CreationDate="2011-04-30T17:44:27.963" UserId="7050" Text="I am doing a very simple scene with a cube sliding on the &quot;ground&quot;. Once the cube reach a wall, he is blocked.&#xD;&#xA;&#xD;&#xA;I want to detect the wall to make the cube go in the other direction. I used OnCollisionEnter but it is triggered at the scene start as my cube touch the ground.&#xD;&#xA;&#xD;&#xA;I could make a difference between grounds and wall, but my game will make the whole scene rotate, and floor will become wall and wall floor.&#xD;&#xA;&#xD;&#xA;I wanted to add &quot;physics whatever object&quot; to allow a left/right detection but i cannot add collider or rigidbody to my cube.&#xD;&#xA;&#xD;&#xA;How can i have a cube knowing when he touch a wall without having a false positive with the ground ?" />
  <row Id="25450" PostHistoryTypeId="1" PostId="11782" RevisionGUID="da59eb4c-503c-4683-93a8-966c0feeb231" CreationDate="2011-04-30T17:44:27.963" UserId="7050" Text="Have a simple enemy detecting he touch a wall to make him stop/turn around" />
  <row Id="25451" PostHistoryTypeId="3" PostId="11782" RevisionGUID="da59eb4c-503c-4683-93a8-966c0feeb231" CreationDate="2011-04-30T17:44:27.963" UserId="7050" Text="&lt;collision-detection&gt;&lt;unity&gt;" />
  <row Id="25452" PostHistoryTypeId="2" PostId="11783" RevisionGUID="2832836e-cb23-4d66-aea6-c9ef1b6d7647" CreationDate="2011-04-30T17:53:35.717" UserId="51" Text="&gt; I could make a difference between grounds and wall, but my game will make the whole scene rotate, and floor will become wall and wall floor.&#xD;&#xA;&#xD;&#xA;Why couldn't you just tag the two sets of walls (horizontal and vertical), and then do tag check in `OnCollisionEnter` for horizontal or vertical as a wall check compared to the rotation of the world?  So, for example, if the world is rotated by 90 degrees, you &quot;hit a wall&quot; when you collide with something that was marked as horizontal." />
  <row Id="25453" PostHistoryTypeId="2" PostId="11784" RevisionGUID="1795ea41-bf2b-4ed1-aadc-f8d9cf4c4f29" CreationDate="2011-04-30T17:57:57.600" UserId="51" Text="This is pretty basic vector math stuff.&#xD;&#xA;&#xD;&#xA;Basically, the answer you're looking for is that if you want to be 1 unit away for a given angle of x, your coordinate is going to be *( cos( x ), sin( x ) )*.  You'll probably have to work in radians instead of degrees, though.&#xD;&#xA;&#xD;&#xA;You can then take that unit vector and multiply it by whatever your per-frame velocity is to determine where you're going to be next frame.&#xD;&#xA;" />
  <row Id="25454" PostHistoryTypeId="25" PostId="11780" RevisionGUID="0f87c235-5f61-45d1-89f3-ba4f45b087f3" CreationDate="2011-04-30T18:11:23.437" Comment="http://twitter.com/#!/StackGameDev/status/64391411994341376" />
  <row Id="25455" PostHistoryTypeId="2" PostId="11785" RevisionGUID="ef03c1a2-60f2-4dce-86f0-5a5d76301858" CreationDate="2011-04-30T19:24:27.677" UserId="2536" Text="(apologies if this is phrased vaguely due to my lack of knowledge; I'm happy to change the question entirely if someone can suggest a more realistic query)&#xD;&#xA;&#xD;&#xA;I'm getting a grip on creating 3D characters in Lightwave, Maya, Blender, etc. My goal is to focus on creating creature &amp; character animations specifically for games. I thought it would be a good exercise to make a few critters with a specific scope. As a non-programmer (I've written a few scripts, but I really don't have a passion to code) - can you point me in the right direction to find some guidelines? (I have a programmer handy who will write the code, but I want to be able to give him assets that are as usable as possible)&#xD;&#xA;&#xD;&#xA;I assume that Android games are intended to run on limited hardware - maybe there's a polycount I should shoot for, or a particular memory limit? The resources I've found so far all seem to be [helpful to developers][1] - haven't found much oriented in my direction&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/guide/topics/graphics/index.html" />
  <row Id="25456" PostHistoryTypeId="1" PostId="11785" RevisionGUID="ef03c1a2-60f2-4dce-86f0-5a5d76301858" CreationDate="2011-04-30T19:24:27.677" UserId="2536" Text="What are the specifications for 3D animated game assets on the Android platform?" />
  <row Id="25457" PostHistoryTypeId="3" PostId="11785" RevisionGUID="ef03c1a2-60f2-4dce-86f0-5a5d76301858" CreationDate="2011-04-30T19:24:27.677" UserId="2536" Text="&lt;game-design&gt;&lt;android&gt;&lt;efficiency&gt;" />
  <row Id="25458" PostHistoryTypeId="2" PostId="11786" RevisionGUID="437d8cfc-1cc3-45a9-b638-37df0e72a899" CreationDate="2011-04-30T19:25:25.733" UserId="4229" Text="I want to start writing my game engine from scratch for learning purpose, what is the prerequisites and how to do that what programming languages and things you recommend me? Also if you have good articles and books on that it will be great. Thanks in advance!&#xD;&#xA;&#xD;&#xA;My Programming languages are:&#xD;&#xA;&#xD;&#xA; 1. C/C++ is it good to use only c?&#xD;&#xA; 2. Python&#xD;&#xA;&#xD;&#xA;Programming Tools&#xD;&#xA;&#xD;&#xA; 1. OpenGL&#xD;&#xA; 2. Git&#xD;&#xA; 3. GDB" />
  <row Id="25459" PostHistoryTypeId="1" PostId="11786" RevisionGUID="437d8cfc-1cc3-45a9-b638-37df0e72a899" CreationDate="2011-04-30T19:25:25.733" UserId="4229" Text="Writing Game Engine from scratch with OpenGL" />
  <row Id="25460" PostHistoryTypeId="3" PostId="11786" RevisionGUID="437d8cfc-1cc3-45a9-b638-37df0e72a899" CreationDate="2011-04-30T19:25:25.733" UserId="4229" Text="&lt;opengl&gt;&lt;c++&gt;&lt;engine&gt;&lt;c&gt;" />
  <row Id="25461" PostHistoryTypeId="6" PostId="11786" RevisionGUID="277cf715-d6a7-452a-90a7-251b45c6ae08" CreationDate="2011-04-30T19:36:18.107" UserId="4229" Comment="edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;engine&gt;&lt;architecture&gt;&lt;c&gt;" />
  <row Id="25462" PostHistoryTypeId="2" PostId="11787" RevisionGUID="cb11cf3e-5911-46d0-bc12-92446a3334c8" CreationDate="2011-04-30T19:46:15.513" UserId="6275" Text="im wondering if its possible to setup a fog to a player's coordinates(where there is fog around the player to make it more third-person) the main reason i ask this is because i have my player more towards the top right corner of the screen&#xD;&#xA;&#xD;&#xA;heres some code that can give you a guide on what im doing:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; glEnable(GL_FOG) GLfloat FogColor[] =&#xD;&#xA;&gt; {0.8,0.8,0.8,1.0};&#xD;&#xA;&gt;     glFogfv(GL_FOG_COLOR,FogColor);&#xD;&#xA;&gt;     glFogi(GL_FOG_MODE,GL_LINEAR);&#xD;&#xA;&gt;     glFogf(GL_FOG_START,30);&#xD;&#xA;&gt;     glFogf(GL_FOG_END,);&#xD;&#xA;&gt;     glHint(GL_FOG_HINT,GL_NICEST);&#xD;&#xA;&#xD;&#xA;and i want the fog to follow a player with a position as said in &#xD;&#xA;&#xD;&#xA;`posX,posY,posZ`&#xD;&#xA;&#xD;&#xA;if anyone can turn this into some example code that would be very helpful, thanks" />
  <row Id="25463" PostHistoryTypeId="1" PostId="11787" RevisionGUID="cb11cf3e-5911-46d0-bc12-92446a3334c8" CreationDate="2011-04-30T19:46:15.513" UserId="6275" Text="How would i setup fog to follow a players coordinates?" />
  <row Id="25464" PostHistoryTypeId="3" PostId="11787" RevisionGUID="cb11cf3e-5911-46d0-bc12-92446a3334c8" CreationDate="2011-04-30T19:46:15.513" UserId="6275" Text="&lt;opengl&gt;&lt;c++&gt;&lt;rendering&gt;" />
  <row Id="25465" PostHistoryTypeId="5" PostId="11787" RevisionGUID="80d31519-abfd-4418-a863-48a85d45c79f" CreationDate="2011-04-30T19:59:16.943" UserId="6275" Comment="added picture and better description" Text="im wondering if its possible to setup a fog to a player's coordinates(where there is fog around the player to make it more third-person) the main reason i ask this is because i have my player more towards the top right corner of the screen&#xD;&#xA;&#xD;&#xA;heres some code that can give you a guide on what im doing:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; glEnable(GL_FOG) GLfloat FogColor[] =&#xD;&#xA;&gt; {0.8,0.8,0.8,1.0};&#xD;&#xA;&gt;     glFogfv(GL_FOG_COLOR,FogColor);&#xD;&#xA;&gt;     glFogi(GL_FOG_MODE,GL_LINEAR);&#xD;&#xA;&gt;     glFogf(GL_FOG_START,30);&#xD;&#xA;&gt;     glFogf(GL_FOG_END,);&#xD;&#xA;&gt;     glHint(GL_FOG_HINT,GL_NICEST);&#xD;&#xA;&#xD;&#xA;and i want the fog to follow a player with a position as said in &#xD;&#xA;&#xD;&#xA;`posX,posY,posZ`&#xD;&#xA;&#xD;&#xA;if anyone can turn this into some example code that would be very helpful, thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if this is not possible then how would i setup the fog to be around a certain position of the camera, like show on the top right corner of the camera instead of the center?&#xD;&#xA;&#xD;&#xA;heres a picture of the game screen so you can see what im talking about:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/EF55n.jpg" />
  <row Id="25466" PostHistoryTypeId="5" PostId="11786" RevisionGUID="b8d8717f-d968-424f-9601-31fa5be5c272" CreationDate="2011-04-30T20:16:14.623" UserId="4229" Comment="added 1 characters in body" Text="I want to start writing my game engine from scratch for learning purpose, what is the prerequisites and how to do that, what programming languages and things you recommend me? Also if you have good articles and books on that it will be great. Thanks in advance!&#xD;&#xA;&#xD;&#xA;My Programming languages are:&#xD;&#xA;&#xD;&#xA; 1. C/C++ is it good to use only c?&#xD;&#xA; 2. Python&#xD;&#xA;&#xD;&#xA;Programming Tools&#xD;&#xA;&#xD;&#xA; 1. OpenGL&#xD;&#xA; 2. Git&#xD;&#xA; 3. GDB" />
  <row Id="25467" PostHistoryTypeId="5" PostId="11787" RevisionGUID="c70821b6-66b8-48d5-a452-c28f94c6a289" CreationDate="2011-04-30T20:38:20.950" UserId="382" Comment="corrected spelling and improved formatting" Text="I'm wondering if its possible to setup a fog to a player's coordinates (where there is fog around the player to make it more third-person) the main reason I ask this is because I have my player more towards the top right corner of the screen&#xD;&#xA;&#xD;&#xA;Here's some code that can give you a guide on what im doing:&#xD;&#xA;&#xD;&#xA;    glEnable(GL_FOG) GLfloat FogColor[] = {0.8,0.8,0.8,1.0};&#xD;&#xA;    glFogfv(GL_FOG_COLOR,FogColor);&#xD;&#xA;    glFogi(GL_FOG_MODE,GL_LINEAR);&#xD;&#xA;    glFogf(GL_FOG_START,30);&#xD;&#xA;    glFogf(GL_FOG_END,);&#xD;&#xA;    glHint(GL_FOG_HINT,GL_NICEST);&#xD;&#xA;&#xD;&#xA;and I want the fog to follow a player with a position as said in &#xD;&#xA;&#xD;&#xA;`posX,posY,posZ`&#xD;&#xA;&#xD;&#xA;If anyone can turn this into some example code that would be very helpful, thanks&#xD;&#xA;&#xD;&#xA;If this is not possible then how would I setup the fog to be around a certain position of the camera, like show on the top right corner of the camera instead of the center?&#xD;&#xA;&#xD;&#xA;Here's a picture of the game screen so you can see what im talking about:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/EF55n.jpg" />
  <row Id="25468" PostHistoryTypeId="4" PostId="11787" RevisionGUID="c70821b6-66b8-48d5-a452-c28f94c6a289" CreationDate="2011-04-30T20:38:20.950" UserId="382" Comment="corrected spelling and improved formatting" Text="How would I setup fog to follow a players coordinates?" />
  <row Id="25469" PostHistoryTypeId="24" PostId="11787" RevisionGUID="c70821b6-66b8-48d5-a452-c28f94c6a289" CreationDate="2011-04-30T20:38:20.950" Comment="Proposed by 382 approved by 51 edit id of 399" />
  <row Id="25470" PostHistoryTypeId="6" PostId="11785" RevisionGUID="9011180f-3a09-4677-8d73-9118030e80d0" CreationDate="2011-04-30T20:39:03.073" UserId="51" Comment="edited tags" Text="&lt;android&gt;&lt;efficiency&gt;" />
  <row Id="25471" PostHistoryTypeId="2" PostId="11788" RevisionGUID="f331f68f-17fc-406d-b3e9-0675b0293466" CreationDate="2011-04-30T20:41:56.813" UserId="7041" Text="I want to split a long png from my artist into vertical chunks that I can load into my code for a side scroller.&#xD;&#xA;&#xD;&#xA;Is there a tool that will help do that or do I have to do it manually?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25472" PostHistoryTypeId="1" PostId="11788" RevisionGUID="f331f68f-17fc-406d-b3e9-0675b0293466" CreationDate="2011-04-30T20:41:56.813" UserId="7041" Text="split pngs for sidescroller" />
  <row Id="25473" PostHistoryTypeId="3" PostId="11788" RevisionGUID="f331f68f-17fc-406d-b3e9-0675b0293466" CreationDate="2011-04-30T20:41:56.813" UserId="7041" Text="&lt;image&gt;" />
  <row Id="25474" PostHistoryTypeId="2" PostId="11789" RevisionGUID="3193b042-5fd3-4779-8d4a-d985e5f4d4ba" CreationDate="2011-04-30T21:07:01.427" UserId="4662" Text="Don't use C unless an implementation detail holds you to it at gunpoint. Otherwise, use C++, because it's flat out a vastly more capable language, and you can always choose not to use those capabilities later. I personally have nothing for/against Python, I've never used it.&#xD;&#xA;&#xD;&#xA;I wouldn't recommend OpenGL against DirectX because DX has a modern object-orientated approach, which is far cleaner and more understandable/less error prone. The interface offered by OpenGL is extremely poor in comparison.&#xD;&#xA;&#xD;&#xA;The last thing I've got is that I've heard from many people I trust that GDB utterly, utterly sucks and the Visual Studio debugger is by far and away the best. This is not my personal experience so take it with a little salt." />
  <row Id="25475" PostHistoryTypeId="25" PostId="11788" RevisionGUID="53904847-61b4-4cbd-a684-a9ff141fac00" CreationDate="2011-04-30T21:11:23.753" Comment="http://twitter.com/#!/StackGameDev/status/64436710859218946" />
  <row Id="25476" PostHistoryTypeId="2" PostId="11790" RevisionGUID="8d62be48-2307-4304-9e81-6adaf7fe252c" CreationDate="2011-04-30T22:02:41.147" UserId="5824" Text="Try http://www.imagemagick.org/ which you can control from the command line to process images." />
  <row Id="25477" PostHistoryTypeId="2" PostId="11791" RevisionGUID="5b557500-e336-4a91-b2ed-47b30dd4e64d" CreationDate="2011-04-30T22:20:47.790" UserId="7052" Text="Designing a virtual economy is a complicated task.  It is a balancing act between your game design and artistic design; it can also involve meta-game design factors (such as your company's financial model).&#xD;&#xA;&#xD;&#xA;Let's remember that the point of an economy is to facilitate the players transferring value between each other.  Money is **generalized value**.  That is to say, it should an abstract thing that you can convert into many different types of value.&#xD;&#xA;&#xD;&#xA;What counts as value?  Among other things, **power points** and **pretty points**.  Power points include that Longsword of Dragonslaying and the Potion of Swiftness- things that will make your character more powerful, enabling you to **overcome more difficult challenges**.  The addition of power-point-items is restricted by your game design.  Pretty points include the barber-shop giving you a new hairstyle and that cute puppy pet that follows you around.  They're aesthetic and **don't involve core game mechanics**.  The addition of pretty-point-items is restricted by your artistic design.&#xD;&#xA;&#xD;&#xA;Design of a good economy is largely **matching money flow to value flow**.&#xD;&#xA;&#xD;&#xA;If an item of value is sold by a merchant, it introduces more value (the value of the item) into the world and takes money (the purchase price) out of the world.  When money flow matches value flow, prices remain stable.  It also makes it easier to keep money flowing between players.  Here are some other game events and how they’ll affect the balance of money and value:&#xD;&#xA;&#xD;&#xA; - Player buys an item from another player (no change)&#xD;&#xA; - Player sells an item to an NPC (value--, money++)&#xD;&#xA; - Player kills an NPC, who drops an item (value++)&#xD;&#xA; - Player kills an NPC, who drops money (money++)&#xD;&#xA; - Player spends money at an NPC blacksmith to repair armor (money--)&#xD;&#xA; - Player completes a quest with a reward of money (money++)&#xD;&#xA;&#xD;&#xA;The ways that money and value enter and leave the economy will depend on your game; the above list might work for WoW and not for your game.  But you'll need to understand what events in your game will affect the amount of money and value in your game's economy.&#xD;&#xA;&#xD;&#xA;**What are the benefits of a good economy?**&#xD;&#xA;&#xD;&#xA;In a good economy, buying an item costs an amount of gold that matches its value.  Super items cost more than basic items.  &#xD;&#xA;&#xD;&#xA;In a good economy, the price of a good item can be driven up by the players buying those items; crafters can see that, make more of the item, and the price will fall again.&#xD;&#xA;&#xD;&#xA;In a good economy, money is just as useful for top-level players as it is for new players.  There are high-level things that require money just as there are entry-level things that require money.&#xD;&#xA;&#xD;&#xA;In a good economy, crafters can find a buyer for their product if they set a fair price.  Not only that, they can sell it for more than the cost of materials.  That's because materials (value) + **work (value)** = item (value).&#xD;&#xA;&#xD;&#xA;**What are the problems of a bad economy?**&#xD;&#xA;&#xD;&#xA;If money supply outpaces value, money will become less meaningful and people will stop accepting it in trades.  If there's another item that ends up being better currency than actual money, they may switch to that (see the [Stone of Jordan][1] in Diablo II).  If they can't find another suitable currency, trade will dry up; this will make certain playstyles (such as the crafter) less broadly appealing.&#xD;&#xA;&#xD;&#xA;If value outpaces money supply, you'll typically run into the problem of hoarding: a few players will have all the money.  This will dry up trade for most players, and only the few rich, well-established players will have access to the “real” economy.  This makes your game less appealing to newcomers.&#xD;&#xA;&#xD;&#xA;If your crafting system isn't balanced well- if the created items don't have the right amount of power points or pretty points- the work of a crafter will actually add negative value, and they'll have to sell their product for less than the cost of materials.  Very few people will want to craft in that circumstance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.diablowiki.com/The_Stone_of_Jordan &quot;Stone of Jordan&quot;" />
  <row Id="25478" PostHistoryTypeId="2" PostId="11792" RevisionGUID="fa186621-0ea1-4ab4-a57b-9b6a7156f8a1" CreationDate="2011-04-30T22:30:36.300" UserId="6117" Text="Yes, i know creating graphics is not just something &quot;you get done&quot;, and most artists have interest and practice in the field since a young age. &#xD;&#xA;&#xD;&#xA;Being the artistically challenged coder that i am i decided that paying some artist from abroad will be too risky and messy, and finding someone to tag along on a project &quot;to split future profits&quot; is not going to work especially if i want it to have my own tone, and i believe many aspiring game devs have this same obstacle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**So the question is**, are there any good tutorials for someone who wants to create his own 2D graphical game asset? Drawing classes for absolute beginners, preferably teaching skills that can be as relevant as possible to games - drawing characters sideways/top-down, isometric, drawing textures and such.&#xD;&#xA;&#xD;&#xA;Can this poor soul be saved?" />
  <row Id="25479" PostHistoryTypeId="1" PostId="11792" RevisionGUID="fa186621-0ea1-4ab4-a57b-9b6a7156f8a1" CreationDate="2011-04-30T22:30:36.300" UserId="6117" Text="Teaching a coder to draw his own 2D assets" />
  <row Id="25480" PostHistoryTypeId="3" PostId="11792" RevisionGUID="fa186621-0ea1-4ab4-a57b-9b6a7156f8a1" CreationDate="2011-04-30T22:30:36.300" UserId="6117" Text="&lt;2d&gt;&lt;graphics&gt;&lt;tutorials&gt;&lt;indie&gt;&lt;learning&gt;" />
  <row Id="25481" PostHistoryTypeId="2" PostId="11793" RevisionGUID="dfaaee29-d08d-4375-92d4-f0805aaca1bf" CreationDate="2011-04-30T23:31:44.307" UserId="7053" Text="[image of the problem](http://i56.tinypic.com/xaorvd.png)&#xD;&#xA;&#xD;&#xA;I used Microsoft's BasicEffect tutorial [here](http://go.microsoft.com/fwlink/?LinkId=198921) and the code sample here: go.microsoft.com/fwlink/?LinkId=198921 and got everything to work fine.  Next I changed everything to use vertexPositionNormalTexture, added a few small methods to help with the texture, and was able to render a textured cube just fine.  I also made the cube spin a bit.  Next I wanted to try using vertexPositionNormalTexture.  Unfortunately, I got this image instead of a cube.  Here's some pieces of my code that contain major modifications.  &#xD;&#xA;&#xD;&#xA;Draw method&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     protected override void Draw(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                graphics.GraphicsDevice.Clear(Color.SteelBlue);&#xD;&#xA;    &#xD;&#xA;                RasterizerState rasterizerState1 = new RasterizerState();&#xD;&#xA;                //backface culling&#xD;&#xA;                rasterizerState1.CullMode = CullMode.None;&#xD;&#xA;                //turn off texture blurring&#xD;&#xA;                graphics.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp;&#xD;&#xA;                &#xD;&#xA;    &#xD;&#xA;                graphics.GraphicsDevice.RasterizerState = rasterizerState1;&#xD;&#xA;                foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)&#xD;&#xA;                {&#xD;&#xA;                    pass.Apply();&#xD;&#xA;                    graphics.GraphicsDevice.DrawPrimitives(&#xD;&#xA;                        PrimitiveType.TriangleList, &#xD;&#xA;                        0, &#xD;&#xA;                        12&#xD;&#xA;                    );&#xD;&#xA;                } &#xD;&#xA;    &#xD;&#xA;                base.Draw(gameTime);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Part of the method that sets up vertices&#xD;&#xA;&#xD;&#xA;    private void InitializeCube()&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;            Vector3 topLeftFront = new Vector3(-1.0f, 1.0f, 1.0f);&#xD;&#xA;            Vector3 bottomLeftFront = new Vector3(-1.0f, -1.0f, 1.0f);&#xD;&#xA;            Vector3 topRightFront = new Vector3(1.0f, 1.0f, 1.0f);&#xD;&#xA;            Vector3 bottomRightFront = new Vector3(1.0f, -1.0f, 1.0f);&#xD;&#xA;            Vector3 topLeftBack = new Vector3(-1.0f, 1.0f, -1.0f);&#xD;&#xA;            Vector3 topRightBack = new Vector3(1.0f, 1.0f, -1.0f);&#xD;&#xA;            Vector3 bottomLeftBack = new Vector3(-1.0f, -1.0f, -1.0f);&#xD;&#xA;            Vector3 bottomRightBack = new Vector3(1.0f, -1.0f, -1.0f);&#xD;&#xA;&#xD;&#xA;            Vector2 textureTopLeft = new Vector2(0.0f, 0.0f);&#xD;&#xA;            Vector2 textureTopRight = new Vector2(.25f, 0.0f);&#xD;&#xA;            Vector2 textureBottomLeft = new Vector2(0.0f, .25f);&#xD;&#xA;            Vector2 textureBottomRight = new Vector2(.25f, .25f);&#xD;&#xA;&#xD;&#xA;            Color frontColor = new Color(255, 255, 255);&#xD;&#xA;            Color backColor = new Color(255, 0, 0);&#xD;&#xA;            Color topColor = new Color(0, 255, 0);&#xD;&#xA;            Color bottomColor = new Color(0, 0, 255);&#xD;&#xA;            Color leftColor = new Color(0, 255, 255);&#xD;&#xA;            Color rightColor = new Color(0, 0, 0);&#xD;&#xA;&#xD;&#xA;            // Front face.&#xD;&#xA;            cubeVertices[0] =&#xD;&#xA;                new VertexPositionColorTexture(&#xD;&#xA;                topLeftFront, frontColor, GetTexPos(2));&#xD;&#xA;            cubeVertices[1] =&#xD;&#xA;                new VertexPositionColorTexture(&#xD;&#xA;                bottomLeftFront, frontColor, GetTexPos(2) + textureBottomLeft);&#xD;&#xA;            cubeVertices[2] =&#xD;&#xA;                new VertexPositionColorTexture(&#xD;&#xA;                topRightFront, frontColor, GetTexPos(2) + textureTopRight);&#xD;&#xA;            cubeVertices[3] =&#xD;&#xA;                new VertexPositionColorTexture(&#xD;&#xA;                bottomLeftFront, frontColor, GetTexPos(2) + textureBottomLeft);&#xD;&#xA;            cubeVertices[4] =&#xD;&#xA;                new VertexPositionColorTexture(&#xD;&#xA;                bottomRightFront, frontColor, GetTexPos(2) + textureBottomRight);&#xD;&#xA;            cubeVertices[5] =&#xD;&#xA;                new VertexPositionColorTexture(&#xD;&#xA;                topRightFront, frontColor, GetTexPos(2) + textureTopRight);&#xD;&#xA;&#xD;&#xA;Initializing basicEffect&#xD;&#xA;&#xD;&#xA;    private void InitializeEffect()&#xD;&#xA;        {&#xD;&#xA;            basicEffect = new BasicEffect(graphics.GraphicsDevice);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            basicEffect.World = worldMatrix;&#xD;&#xA;            basicEffect.View = viewMatrix;&#xD;&#xA;            basicEffect.Projection = projectionMatrix;&#xD;&#xA;&#xD;&#xA;            //basicEffect.EnableDefaultLighting&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;LoadContent&#xD;&#xA;&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            canyonTexture = Content.Load&lt;Texture2D&gt;(&quot;CanyonTexture&quot;);&#xD;&#xA;            textureSheetWidth = canyonTexture.Width / 16;&#xD;&#xA;            InitializeTransform();&#xD;&#xA;            InitializeEffect();&#xD;&#xA;            basicEffect.TextureEnabled = true;&#xD;&#xA;            basicEffect.VertexColorEnabled = true;&#xD;&#xA;            basicEffect.Texture = canyonTexture;&#xD;&#xA;            &#xD;&#xA;            InitializeCube();&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Setting up the VertexBuffer&#xD;&#xA;&#xD;&#xA;    private void CreateVertexBuffer()&#xD;&#xA;        {&#xD;&#xA;            vertexDeclaration = new VertexDeclaration(new VertexElement[]&#xD;&#xA;                {&#xD;&#xA;                    new VertexElement(0, VertexElementFormat.Vector3, VertexElementUsage.Position, 0),&#xD;&#xA;                    new VertexElement(12, VertexElementFormat.Color, VertexElementUsage.Color, 0),&#xD;&#xA;                    new VertexElement(24, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0)&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;            vertexBuffer = new VertexBuffer(&#xD;&#xA;                graphics.GraphicsDevice,&#xD;&#xA;                vertexDeclaration,&#xD;&#xA;                number_of_vertices,&#xD;&#xA;                BufferUsage.None&#xD;&#xA;                );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            cubeVertices = new VertexPositionColorTexture[number_of_vertices];&#xD;&#xA;            InitializeCube();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            vertexBuffer.SetData&lt;VertexPositionColorTexture&gt;(cubeVertices);&#xD;&#xA;&#xD;&#xA;            graphics.GraphicsDevice.SetVertexBuffer(vertexBuffer);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        protected override void Initialize()&#xD;&#xA;        {&#xD;&#xA;            // TODO: Add your initialization logic here&#xD;&#xA;            CreateVertexBuffer();&#xD;&#xA;&#xD;&#xA;            base.Initialize();&#xD;&#xA;        }&#xD;&#xA;" />
  <row Id="25482" PostHistoryTypeId="1" PostId="11793" RevisionGUID="dfaaee29-d08d-4375-92d4-f0805aaca1bf" CreationDate="2011-04-30T23:31:44.307" UserId="7053" Text="Messed-up triangles when using VertexPositionColorTexture with BasicEffect" />
  <row Id="25483" PostHistoryTypeId="3" PostId="11793" RevisionGUID="dfaaee29-d08d-4375-92d4-f0805aaca1bf" CreationDate="2011-04-30T23:31:44.307" UserId="7053" Text="&lt;xna&gt;&lt;3d&gt;&lt;c#&gt;" />
  <row Id="25484" PostHistoryTypeId="2" PostId="11794" RevisionGUID="5b415b6f-f1a9-49b5-a1d8-be2c79f66f48" CreationDate="2011-04-30T23:42:44.210" UserId="51" Text="In the interest of being somewhat helpful, check out this question:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/455/good-resources-for-learning-about-game-architecture&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25485" PostHistoryTypeId="25" PostId="11792" RevisionGUID="4e8d0511-61f1-4a0d-8c17-dd2d03d388dc" CreationDate="2011-05-01T00:11:23.437" Comment="http://twitter.com/#!/StackGameDev/status/64482008402903040" />
  <row Id="25486" PostHistoryTypeId="2" PostId="11795" RevisionGUID="3bb36ee5-2609-47db-b9ce-1e05c6676194" CreationDate="2011-05-01T01:42:06.833" UserId="288" Text="Basically your vertex declaration is wrong.&#xD;&#xA;&#xD;&#xA;A `Color` is only four bytes wide. So the offset of the texture-coordinate element that follows should be 16, not 24.&#xD;&#xA;&#xD;&#xA;However you don't even need to create a vertex declaration for this in XNA 4.0. Simply pass `VertexPositionColorTexture.VertexDeclaration` or `typeof(VertexPositionColorTexture)` to the constructor of your `VertexBuffer`.&#xD;&#xA;&#xD;&#xA;There is a &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/04/19/vertex-data-in-xna-game-studio-4-0.aspx&quot;&gt;blog post here&lt;/a&gt; that explains how this all works." />
  <row Id="25487" PostHistoryTypeId="2" PostId="11796" RevisionGUID="478ba39e-5d15-478c-b4db-95b31bf558b3" CreationDate="2011-05-01T02:10:01.643" UserId="7053" Text="First, you want to search for tutorials on the internet.  Youtube is your friend.  Seriously, it's probably the best way to learn drawing.  It's easy to look at some really amazing drawing and say &quot;oh, I could never do that, he's been doing that since he was a kid.&quot;  But when someone slowly walks you through the steps and explains every part of the way, the mountain suddenly seems a lot easier to climb.  &#xD;&#xA;&#xD;&#xA;Next the problem is figuring out what to search for.  You don't want to start off with the hard stuff, so don't go searching for &quot;digital art&quot; or &quot;character design&quot; as you will be lost very fast.  There's a lot of tutorials out there that start off like &quot;first draw a basic human figure&quot; or &quot;start by sketching out some buildings&quot;.  Avoid those.  &#xD;&#xA;&#xD;&#xA;Now, a tutorial to get you started.  First, search YouTube for &quot;perspective drawing&quot;.  It's a basic skill that's the first thing they teach you in any art class.  Play around with this a bit, drawing 3D houses, etc.  Now, try to find something in your house that's roughly box-shaped.  Your speakers or desktop should work fine.  Now draw it using perspective.  What you just did is called &quot;life drawing&quot; which is basically where you draw something from real life.  It's really important that you do this, because you figure out neat little things on your own when you draw real things.  &#xD;&#xA;Eventually, you'll get to the point where you can look at something and start thinking &quot;how would I draw this?&quot;  That's important, because then when you need to draw, say, a potion for a game, you can look at a glass bottle and think about how to draw it, then apply that to your potion.  Think of it like writing a &quot;method&quot; for drawing a bottle.  You'd probably start out with a method called &quot;DrawLine&quot;, use it for &quot;DrawCylinder&quot;, then make &quot;ShadeGlass&quot; and combine &quot;ShadeGlass&quot; with &quot;DrawCylinder&quot; to get &quot;DrawBottle&quot;.&#xD;&#xA;&#xD;&#xA;Also, when you watch a tutorial you'll see that a lot of what you drew looks a lot messier or uglier than what you saw in the tutorial.  Do not be worried, it's not that you're less creative or that you didn't follow the tutorial, you just haven't built up some of the basic skills that the artists in the tutorials have.  An easy way to help this is to just draw lots of basic shapes over and over again.  Keep a pad of paper next to you while watching tv, and during the commercial break see if you can draw 20 circles, lines, or squares.  Think of it like learning the basic methods in a new language so that you don't have to look through pages of the documentation.  &#xD;&#xA;&#xD;&#xA;Another thing to watch out for is details.  Say you're drawing a person.  You decide to start with the head.  So you start with drawing a circle.  Then you think &quot;oh, I've already got the circle, I'll give it eyes and a mouth!&quot;  Next thing you know, you've got a pretty good head, with hair, a nose, eyes, a mouth, ears, etc.  So you start drawing the body.  After doing some pretty good shoes and maybe a cool shoulder armor you realize that your drawing looks horrible.  The head is too big, the legs are different sizes, and the feet look backwards.  My point is that you have to focus on big shapes and try to resist the urge to start adding details.  &#xD;&#xA;&#xD;&#xA;Finally, learn to critique your own drawings.  Don't just look at the person you drew and say &quot;that's ugly&quot;.  Pick out specific things to improve upon.  Say &quot;those hands could be better&quot; or &quot;the proportions seem kinda weird&quot; or &quot;The hair looks too fuzzy&quot;. Then look up tutorials for whatever you need to improve on.  There's a lot of good resources out there, but you have to know what you are looking for.  You wouldn't just search for &quot;Making my program faster&quot;, you would look up &quot;improving performance rendering triangle strips in XNA&quot;.  &#xD;&#xA;&#xD;&#xA;Anyways, assuming you already did perspective drawing, here's some things to search for to get stated.  (inserting &quot;tutorial&quot; after all of these can give better results)&#xD;&#xA;3D shading &#xD;&#xA;Figure drawing&#xD;&#xA;Gesture drawing&#xD;&#xA;Basic Pixel Art&#xD;&#xA;&#xD;&#xA;Just with that stuff you should have a good month or two of stuff to practice.  Try to keep sketchbooks, so that you can look back and see how much you've improved.  If you want to look forward and see how good you can get, look up &quot;speed painting&quot; on YouTube.  And if you are getting frustrated with all sorts of technical details and stuff, watch [this video][1] and try to have some fun.  &#xD;&#xA;&#xD;&#xA;Good luck, and make sure you draw often!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=heKK95DAKms" />
  <row Id="25488" PostHistoryTypeId="2" PostId="11797" RevisionGUID="c11a9d09-960e-4641-91f7-e69fa5a4c171" CreationDate="2011-05-01T02:14:07.667" UserId="6937" Text="I would take the important facts from people who say it's too late, but also ignore them. When I started making games I wasn't very good at drawing, but still managed to learn what I needed. I'm never going to make the final graphics for any of my games in reality, but I learned enough to prototype my idea to the designers that I work with. This way you can still keep your &quot;tone&quot; and have someone who knows what their doing do the heavy lifting. I'de say my artist partner and music partners are the reason I got past the old days of having a cool game idea in very basic playable form. Actually the first game I ever finished was the first project I had the partners on.&#xD;&#xA;&#xD;&#xA;That said, knowing how to prototype your art to keep your vision is very important if you have your own ideas.&#xD;&#xA;&#xD;&#xA;My list:&#xD;&#xA;&#xD;&#xA; - drawing - I bought a tablet pc. (ipad will work but that wasn't out then!) I was terrible at drawing so I traced a ton of concept art for games that I love. A few months later I could get my idea across without doing a stick figure which kills the vision. &#xD;&#xA;&#xD;&#xA; - textures - lots and lots of texture packs. these things are great, why reinvent the wheel? If you find that you can't get what you want from that, start playing around with photoshop and all of the filters. A link http://vandelaydesign.com/blog/design/photoshop-textures/&#xD;&#xA;&#xD;&#xA; - 2d sprites - again there are tons of these out here. For your own stuff, use a sprite editor. I don't have a preference as I do mostly 3d, but [this one is on my computer][3]. Seems good and fairly straight forward from the few times I've used it.&#xD;&#xA;&#xD;&#xA; - storyboarding - I do this the most. I got [anime studio 7][4] which is incredible. Basically the 3d bones concept but for 2d. Puts flash to shame for this purpose.&#xD;&#xA;&#xD;&#xA;I'de say [3dbuzz][1] and [lynda][2] are the most helpful resources for me as far as art in general goes. I spent about 200 hours on these sites and can get my ideas across to designers very well now. I still will never publish my art, real designers can do this stuff effortlessly. &#xD;&#xA;&#xD;&#xA;  [1]: http://3dbuzz.com/vbforum/sv_home.php&#xD;&#xA;  [2]: http://www.lynda.com/&#xD;&#xA;  [3]: http://www.cosmigo.com/promotion/index.php&#xD;&#xA;  [4]: http://anime.smithmicro.com/" />
  <row Id="25493" PostHistoryTypeId="2" PostId="11799" RevisionGUID="bbb67ae1-3b43-47bf-a24f-e89f70e7242d" CreationDate="2011-05-01T03:33:14.307" UserId="5540" Text="Yes, it is quite usable and I'm developing a game myself on the platform. &#xD;&#xA;&#xD;&#xA;However, the limitation is you have to choose between HTTP requests or XMPP somehow. I'm going the HTTP route personally. &#xD;&#xA;&#xD;&#xA;Most games use some form of secure socket connections from the server to the client, so for that kind of setup you need a dedicated server running your software, but if you can set it up as a web service or website then you'll be fine. " />
  <row Id="25495" PostHistoryTypeId="2" PostId="11800" RevisionGUID="671d7ec6-3e8c-4dab-86e6-3a95d3d1d8f6" CreationDate="2011-05-01T05:07:45.363" UserId="7058" Text="I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find out with which side the player is colliding. So if they move left, I want to know that if they collide with a square, and with which side they collide with it." />
  <row Id="25496" PostHistoryTypeId="1" PostId="11800" RevisionGUID="671d7ec6-3e8c-4dab-86e6-3a95d3d1d8f6" CreationDate="2011-05-01T05:07:45.363" UserId="7058" Text="2d Collision detecton axis aligned boxes" />
  <row Id="25497" PostHistoryTypeId="3" PostId="11800" RevisionGUID="671d7ec6-3e8c-4dab-86e6-3a95d3d1d8f6" CreationDate="2011-05-01T05:07:45.363" UserId="7058" Text="&lt;collision-detection&gt;&lt;2d-physics&gt;" />
  <row Id="25498" PostHistoryTypeId="25" PostId="11787" RevisionGUID="63db2e62-0b8f-4d65-9141-a9a5d251ae93" CreationDate="2011-05-01T06:11:23.793" Comment="http://twitter.com/#!/StackGameDev/status/64572606510141440" />
  <row Id="25499" PostHistoryTypeId="2" PostId="11801" RevisionGUID="e86c47ee-6cd1-4ddc-9a98-51a643d57fbd" CreationDate="2011-05-01T06:30:09.237" UserId="6882" Text="The command line PVRTexTool works very well for getting textures into a PVR format, but I need a way of going the opposite directions. Does anyone know of a good command line tool (or GUI with a batch mode) that will convert a PowerVR texture to a more common image format (like JPEG or PNG?)" />
  <row Id="25500" PostHistoryTypeId="1" PostId="11801" RevisionGUID="e86c47ee-6cd1-4ddc-9a98-51a643d57fbd" CreationDate="2011-05-01T06:30:09.237" UserId="6882" Text="Batch conversion of PVR to JPEG (or similar)" />
  <row Id="25501" PostHistoryTypeId="3" PostId="11801" RevisionGUID="e86c47ee-6cd1-4ddc-9a98-51a643d57fbd" CreationDate="2011-05-01T06:30:09.237" UserId="6882" Text="&lt;textures&gt;" />
  <row Id="25502" PostHistoryTypeId="5" PostId="11748" RevisionGUID="448cd71b-1373-4587-98ae-7349fe9f9fba" CreationDate="2011-05-01T09:04:40.150" UserId="6875" Comment="added 2117 characters in body; deleted 86 characters in body; added 9 characters in body" Text="I have the following tetrahedron: **EDIT**&#xD;&#xA;&#xD;&#xA;		//Making a tetrahedron with equal sides, using rotation matrices to determine the points&#xD;&#xA;		&#xD;&#xA;		//-30 degrees&#xD;&#xA;		var q = -Math.PI/2.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		var rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		var a = vec3.create(new Array(0.0, 0.0, -1.0));&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, a);&#xD;&#xA;		&#xD;&#xA;		//Now we have the first point vector which is pointing 'downwards' in the negative Z direction		&#xD;&#xA;		//After rotating the first vector A with 120 degrees two times, we have the 3 base points&#xD;&#xA;		&#xD;&#xA;		//120 degrees&#xD;&#xA;		q = Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for Y-axis rotation&#xD;&#xA;		var rotationArrayY = [&#xD;&#xA;			Math.cos(q), 0.0, -Math.sin(q), 	0.0,&#xD;&#xA;			0.0, 		 1.0, 		0.0, 		0.0,&#xD;&#xA;			Math.sin(q), 0.0, Math.cos(q), 		0.0,&#xD;&#xA;			0.0,		 0.0, 	 	0.0, 		1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixY = mat4.create(rotationArrayY);&#xD;&#xA;		&#xD;&#xA;		//Calculating points B and C&#xD;&#xA;		var b = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, a, b);&#xD;&#xA;		var c = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, b, c);&#xD;&#xA;		&#xD;&#xA;		//The remaining point is the top point&#xD;&#xA;		//(Actually, it should be clear that this point is 0,1,0)&#xD;&#xA;		&#xD;&#xA;		q = Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		&#xD;&#xA;		var d = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, a, d);&#xD;&#xA;		&#xD;&#xA;		//Filling the array with points&#xD;&#xA;	&#xD;&#xA;        var vertices = new Array();&#xD;&#xA;		&#xD;&#xA;		//bottom face&#xD;&#xA;		vertices.push(a[0]); vertices.push(a[1]); vertices.push(a[2]);&#xD;&#xA;		vertices.push(b[0]); vertices.push(b[1]); vertices.push(b[2]);&#xD;&#xA;		vertices.push(c[0]); vertices.push(c[1]); vertices.push(c[2]);&#xD;&#xA;		//front face&#xD;&#xA;		vertices.push(b[0]); vertices.push(b[1]); vertices.push(b[2]);&#xD;&#xA;		vertices.push(c[0]); vertices.push(c[1]); vertices.push(c[2]);&#xD;&#xA;		vertices.push(d[0]); vertices.push(d[1]); vertices.push(d[2]);&#xD;&#xA;		//right face&#xD;&#xA;		vertices.push(c[0]); vertices.push(c[1]); vertices.push(c[2]);&#xD;&#xA;		vertices.push(a[0]); vertices.push(a[1]); vertices.push(a[2]);&#xD;&#xA;		vertices.push(d[0]); vertices.push(d[1]); vertices.push(d[2]);&#xD;&#xA;		//left face&#xD;&#xA;		vertices.push(a[0]); vertices.push(a[1]); vertices.push(a[2]);&#xD;&#xA;		vertices.push(b[0]); vertices.push(b[1]); vertices.push(b[2]);&#xD;&#xA;		vertices.push(d[0]); vertices.push(d[1]); vertices.push(d[2]);&#xD;&#xA;&#xD;&#xA;How should I imagine texturing these triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;		  // Bottom face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Front face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Right face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Left face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25503" PostHistoryTypeId="25" PostId="11801" RevisionGUID="5576df9d-38d9-4f10-b3a9-852b1fb4a5ca" CreationDate="2011-05-01T09:11:23.430" Comment="http://twitter.com/#!/StackGameDev/status/64617903802167296" />
  <row Id="25504" PostHistoryTypeId="5" PostId="11748" RevisionGUID="8029e6c0-dfd0-4315-ba18-908a1df866ae" CreationDate="2011-05-01T09:22:59.213" UserId="6875" Comment="deleted 1069 characters in body; added 18 characters in body; deleted 14 characters in body" Text="I have the following tetrahedron: **EDIT**&#xD;&#xA;&#xD;&#xA;		//Making a tetrahedron with equal sides&#xD;&#xA;		//Using rotation matrices to determine the points&#xD;&#xA;		&#xD;&#xA;		//-120 degrees&#xD;&#xA;		var q = -Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		var rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		var d = vec3.create(new Array(0.0, 1.0, 0.0)); //Topmost point&#xD;&#xA;		var a = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, d, a);&#xD;&#xA;		&#xD;&#xA;		//Now we have the top most point and the first point of the base&#xD;&#xA;		//After rotating the vector A with 120 degrees two times, we have the 3 base points&#xD;&#xA;		&#xD;&#xA;		//120 degrees&#xD;&#xA;		q = -q;&#xD;&#xA;		//Transformation matrix for Y-axis rotation&#xD;&#xA;		var rotationArrayY = [&#xD;&#xA;			Math.cos(q), 0.0, -Math.sin(q), 	0.0,&#xD;&#xA;			0.0, 		 1.0, 		0.0, 		0.0,&#xD;&#xA;			Math.sin(q), 0.0, Math.cos(q), 		0.0,&#xD;&#xA;			0.0,		 0.0, 	 	0.0, 		1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixY = mat4.create(rotationArrayY);&#xD;&#xA;		&#xD;&#xA;		//Calculating points B and C&#xD;&#xA;		var b = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, a, b);&#xD;&#xA;		var c = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, b, c);&#xD;&#xA;		&#xD;&#xA;		//The remaining point is the top point&#xD;&#xA;	&#xD;&#xA;        var vertices = new Array();&#xD;&#xA;		&#xD;&#xA;		//bottom&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(c);&#xD;&#xA;		//front&#xD;&#xA;		vertices.push(d); vertices.push(c); vertices.push(d);&#xD;&#xA;		//right&#xD;&#xA;		vertices.push(c); vertices.push(a); vertices.push(d);&#xD;&#xA;		//left&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(d);&#xD;&#xA;&#xD;&#xA;How should I imagine texturing these triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;		  // Bottom face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Front face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Right face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA; &#xD;&#xA;		  // Left face&#xD;&#xA;		  0.0, 0.0,&#xD;&#xA;		  1.0, 0.0,&#xD;&#xA;		  1.0, 1.0,&#xD;&#xA;		  0.0, 1.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25505" PostHistoryTypeId="5" PostId="11748" RevisionGUID="d193a5c2-0892-4eb0-b253-8878195e35a6" CreationDate="2011-05-01T09:31:10.547" UserId="6875" Comment="deleted 38 characters in body" Text="I have the following tetrahedron: **EDIT**&#xD;&#xA;&#xD;&#xA;		//Making a tetrahedron with equal sides&#xD;&#xA;		//Using rotation matrices to determine the points&#xD;&#xA;		&#xD;&#xA;		//-120 degrees&#xD;&#xA;		var q = -Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		var rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		var d = vec3.create(new Array(0.0, 1.0, 0.0)); //Topmost point&#xD;&#xA;		var a = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, d, a);&#xD;&#xA;		&#xD;&#xA;		//Now we have the top most point and the first point of the base&#xD;&#xA;		//After rotating the vector A with 120 degrees two times, we have the 3 base points&#xD;&#xA;		&#xD;&#xA;		//120 degrees&#xD;&#xA;		q = -q;&#xD;&#xA;		//Transformation matrix for Y-axis rotation&#xD;&#xA;		var rotationArrayY = [&#xD;&#xA;			Math.cos(q), 0.0, -Math.sin(q), 	0.0,&#xD;&#xA;			0.0, 		 1.0, 		0.0, 		0.0,&#xD;&#xA;			Math.sin(q), 0.0, Math.cos(q), 		0.0,&#xD;&#xA;			0.0,		 0.0, 	 	0.0, 		1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixY = mat4.create(rotationArrayY);&#xD;&#xA;		&#xD;&#xA;		//Calculating points B and C&#xD;&#xA;		var b = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, a, b);&#xD;&#xA;		var c = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, b, c);&#xD;&#xA;		&#xD;&#xA;		//The remaining point is the top point&#xD;&#xA;	&#xD;&#xA;        var vertices = new Array();&#xD;&#xA;		&#xD;&#xA;		//bottom&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(c);&#xD;&#xA;		//front&#xD;&#xA;		vertices.push(d); vertices.push(c); vertices.push(d);&#xD;&#xA;		//right&#xD;&#xA;		vertices.push(c); vertices.push(a); vertices.push(d);&#xD;&#xA;		//left&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(d);&#xD;&#xA;&#xD;&#xA;How should I imagine texturing these triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;			//bottom&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//front&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//right&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//left&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25506" PostHistoryTypeId="5" PostId="11748" RevisionGUID="e473060e-e915-46ed-b29d-4f80eeca285d" CreationDate="2011-05-01T09:44:20.787" UserId="6875" Comment="edited body" Text="I have the following tetrahedron: **EDIT**&#xD;&#xA;&#xD;&#xA;		//Making a tetrahedron with equal sides&#xD;&#xA;		//Using rotation matrices to determine the points&#xD;&#xA;		&#xD;&#xA;		//-120 degrees&#xD;&#xA;		var q = -Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		var rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		var d = vec3.create(new Array(0.0, 1.0, 0.0)); //Topmost point&#xD;&#xA;		var a = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, d, a);&#xD;&#xA;		&#xD;&#xA;		//Now we have the top most point and the first point of the base&#xD;&#xA;		//After rotating the vector A with 120 degrees two times, we have the 3 base points&#xD;&#xA;		&#xD;&#xA;		//120 degrees&#xD;&#xA;		q = -q;&#xD;&#xA;		//Transformation matrix for Y-axis rotation&#xD;&#xA;		var rotationArrayY = [&#xD;&#xA;			Math.cos(q), 0.0, -Math.sin(q), 	0.0,&#xD;&#xA;			0.0, 		 1.0, 		0.0, 		0.0,&#xD;&#xA;			Math.sin(q), 0.0, Math.cos(q), 		0.0,&#xD;&#xA;			0.0,		 0.0, 	 	0.0, 		1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixY = mat4.create(rotationArrayY);&#xD;&#xA;		&#xD;&#xA;		//Calculating points B and C&#xD;&#xA;		var b = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, a, b);&#xD;&#xA;		var c = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, b, c);&#xD;&#xA;		&#xD;&#xA;		//The remaining point is the top point&#xD;&#xA;	&#xD;&#xA;        var vertices = new Array();&#xD;&#xA;		&#xD;&#xA;		//bottom&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(c);&#xD;&#xA;		//front&#xD;&#xA;		vertices.push(b); vertices.push(c); vertices.push(d);&#xD;&#xA;		//right&#xD;&#xA;		vertices.push(c); vertices.push(a); vertices.push(d);&#xD;&#xA;		//left&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(d);&#xD;&#xA;&#xD;&#xA;How should I imagine texturing these triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;			//bottom&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//front&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//right&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//left&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			0.0, 1.0,&#xD;&#xA;			1.0, 1.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25507" PostHistoryTypeId="5" PostId="11748" RevisionGUID="248af4d0-4728-4343-93b7-a3cfcea59463" CreationDate="2011-05-01T09:53:33.647" UserId="6875" Comment="deleted 56 characters in body" Text="I have the following tetrahedron: **EDIT**&#xD;&#xA;&#xD;&#xA;		//Making a tetrahedron with equal sides&#xD;&#xA;		//Using rotation matrices to determine the points&#xD;&#xA;		&#xD;&#xA;		//-120 degrees&#xD;&#xA;		var q = -Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		var rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		var d = vec3.create(new Array(0.0, 1.0, 0.0)); //Topmost point&#xD;&#xA;		var a = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, d, a);&#xD;&#xA;		&#xD;&#xA;		//Now we have the top most point and the first point of the base&#xD;&#xA;		//After rotating the vector A with 120 degrees two times, we have the 3 base points&#xD;&#xA;		&#xD;&#xA;		//120 degrees&#xD;&#xA;		q = -q;&#xD;&#xA;		//Transformation matrix for Y-axis rotation&#xD;&#xA;		var rotationArrayY = [&#xD;&#xA;			Math.cos(q), 0.0, -Math.sin(q), 	0.0,&#xD;&#xA;			0.0, 		 1.0, 		0.0, 		0.0,&#xD;&#xA;			Math.sin(q), 0.0, Math.cos(q), 		0.0,&#xD;&#xA;			0.0,		 0.0, 	 	0.0, 		1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixY = mat4.create(rotationArrayY);&#xD;&#xA;		&#xD;&#xA;		//Calculating points B and C&#xD;&#xA;		var b = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, a, b);&#xD;&#xA;		var c = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, b, c);&#xD;&#xA;		&#xD;&#xA;		//The remaining point is the top point&#xD;&#xA;	&#xD;&#xA;        var vertices = new Array();&#xD;&#xA;		&#xD;&#xA;		//bottom&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(c);&#xD;&#xA;		//front&#xD;&#xA;		vertices.push(b); vertices.push(c); vertices.push(d);&#xD;&#xA;		//right&#xD;&#xA;		vertices.push(c); vertices.push(a); vertices.push(d);&#xD;&#xA;		//left&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(d);&#xD;&#xA;&#xD;&#xA;How should I imagine texturing these triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;			//bottom&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//front&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//right&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//left&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25508" PostHistoryTypeId="2" PostId="11802" RevisionGUID="d897a820-d8d3-4db4-b6af-dfc613767847" CreationDate="2011-05-01T10:29:22.290" UserId="7063" Text="I'm trying to build an underwater scene. I'm including my scene in a large cube, which I'm going to texture with images that resemble an underwater environment. Where can I get textures for something of that sort?" />
  <row Id="25509" PostHistoryTypeId="1" PostId="11802" RevisionGUID="d897a820-d8d3-4db4-b6af-dfc613767847" CreationDate="2011-05-01T10:29:22.290" UserId="7063" Text="Textures for an underwater environment?" />
  <row Id="25510" PostHistoryTypeId="3" PostId="11802" RevisionGUID="d897a820-d8d3-4db4-b6af-dfc613767847" CreationDate="2011-05-01T10:29:22.290" UserId="7063" Text="&lt;opengl&gt;&lt;c++&gt;&lt;textures&gt;" />
  <row Id="25511" PostHistoryTypeId="25" PostId="11802" RevisionGUID="c94cc26b-1d60-431f-b5a2-0088067e0df6" CreationDate="2011-05-01T12:11:23.423" Comment="http://twitter.com/#!/StackGameDev/status/64663202813849600" />
  <row Id="25512" PostHistoryTypeId="2" PostId="11803" RevisionGUID="d6dfcdb2-8aab-40e5-b279-d5a07c0de2a0" CreationDate="2011-05-01T12:33:39.610" UserId="6756" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball only seems to work with Visual Studio 2008 or express edition. Which game engine is compatiable with Visual Studio 2010?" />
  <row Id="25513" PostHistoryTypeId="1" PostId="11803" RevisionGUID="d6dfcdb2-8aab-40e5-b279-d5a07c0de2a0" CreationDate="2011-05-01T12:33:39.610" UserId="6756" Text="Which game engine is compatiable with Visual Studio 2010?" />
  <row Id="25514" PostHistoryTypeId="3" PostId="11803" RevisionGUID="d6dfcdb2-8aab-40e5-b279-d5a07c0de2a0" CreationDate="2011-05-01T12:33:39.610" UserId="6756" Text="&lt;engine&gt;" />
  <row Id="25515" PostHistoryTypeId="2" PostId="11804" RevisionGUID="e4500719-c161-43da-b143-6818eeca1b45" CreationDate="2011-05-01T13:35:16.033" UserId="3794" Text="Waves creates caustics (as magnifier does for example). Caustics are moving (becuase waves are moving). Real caustics cannot be simulated in realtime, so for realtime it has to be faked somehow.&#xD;&#xA;&#xD;&#xA;**GPU Gems** for the rescue: &#xD;&#xA;[Rendering Water Caustics][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems/gpugems_ch02.html" />
  <row Id="25516" PostHistoryTypeId="2" PostId="11805" RevisionGUID="40cbdc93-bc12-42df-be44-14fcfd89c320" CreationDate="2011-05-01T13:47:49.327" UserId="7066" Text="This is a very good idea, but one which requires too much research and development for an independent commercial software developer. I have been slowly working towards this lofty goal with the research and development of open source middleware for multimedia authoring and videogame creation for the past 20 years and am not even close to releasing product.&#xD;&#xA;&#xD;&#xA;You see, I am increasingly nauseated by the current trend towards Cinematic Videogames.&#xD;&#xA;&#xD;&#xA;It is a phrase that I regard as something of an oxymoron.&#xD;&#xA;&#xD;&#xA;Developers could remedy this by realising that narrative is merely a symptom of an underlying theme. If it is the intention of the artist to convey this theme, then what does it matter to hold to a particular pre-scripted narrative?&#xD;&#xA;&#xD;&#xA;Games are systems of rules within which interesting behaviour may emerge, often with some aspect of challenge, or competition for the player to measure their performance against. The designers of Chess and Football didn't need to fret about &quot;Story&quot;, but despite this stories still emerged from interesting games:&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/World_Chess_Championship_1972&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Maradona#1986_World_Cup&#xD;&#xA;&#xD;&#xA;However, there are a great many more matches that were dull. Being a passive spectator does not really help with engagement, yet the ideal would be to 'rig' the match so that the opponent either made deliberate mistakes, or suddenly got a whole lot better (e.g. equalising just before half-time).&#xD;&#xA;&#xD;&#xA;Once the game's rules have been modified to make it seek entertaining levels of drama rather than boring old fairness the player's psychology can be probed by offering them a choice of actions (NPC proposed procedurally-generated missions), the successful completion of which would gain you &quot;Kudos&quot; for your competent role play and unlock more challenging and subtle missions as the game's personality model of the player's &quot;alter-ego&quot; was further refined.&#xD;&#xA;&#xD;&#xA;This would allow games to get away from the thinly disguised corridor along which revelatory narrative scenes are encountered in the correct sequence. A game may seem to then be an Open World, but on extended interaction the player would find their choices constrained by their past actions and probably be oblivious to the subtle interventions of the game shaping the set of available choices (and their consequences), throughout in order to reinforce the underlying theme - forcing irreversible character developments, then stage-managing a cathartic climax.&#xD;&#xA;&#xD;&#xA;Players would assume roles and try to play that part as best as they could being rewarded with Kudos for remaining &quot;in character&quot;. Counter-intuitively, this would herald a break from players avoiding character death as this would no longer mean GAME OVER.&#xD;&#xA;&#xD;&#xA;Indeed, heroic sacrifice, or a villain getting his comeuppance, could both be terminal for the player's character, but pay a handsome reward in terms of Kudos. The player would continue with the game, selecting from a choice of new, equivalently experienced, characters - adding equipment in keeping to the new role they were adopting from a cash sum each character had been allotted. As a result, play would have a different, dramatic, motivation rather than mere, hackneyed, survival and because the story was built in response to player psychology they would more likely be drawn in to its emergent story.&#xD;&#xA;&#xD;&#xA;So, in summary:&#xD;&#xA;&#xD;&#xA;Randomly generate? No.&#xD;&#xA;&#xD;&#xA;Procedurally-generate in harmony with player psychology and a coherent theme? Yes." />
  <row Id="25517" PostHistoryTypeId="2" PostId="11806" RevisionGUID="c4c79610-b89f-481f-bf64-002681dc7ffc" CreationDate="2011-05-01T14:40:19.383" UserId="7067" Text="I am developing a game card in XNA and C#, and I am wondering if there is any onclick event in XNA for objects. I am trying to make cards move when the player clicks on them. In this project I already have a Sprite class that draws cards Image, but I am a little stuck because I don't know how to use OnClick events or anything like that." />
  <row Id="25518" PostHistoryTypeId="1" PostId="11806" RevisionGUID="c4c79610-b89f-481f-bf64-002681dc7ffc" CreationDate="2011-05-01T14:40:19.383" UserId="7067" Text="XNA C# OnClick Event" />
  <row Id="25519" PostHistoryTypeId="3" PostId="11806" RevisionGUID="c4c79610-b89f-481f-bf64-002681dc7ffc" CreationDate="2011-05-01T14:40:19.383" UserId="7067" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="25520" PostHistoryTypeId="2" PostId="11807" RevisionGUID="166e1bff-8d08-4645-895f-580807f03299" CreationDate="2011-05-01T14:49:24.147" UserId="73" Text="I'm having some troubles coming up with a subject for my master's degree thesis. I'd like to know what areas of research are valuable at this time (and the near future) so I can narrow my search and idea-creation.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="25521" PostHistoryTypeId="1" PostId="11807" RevisionGUID="166e1bff-8d08-4645-895f-580807f03299" CreationDate="2011-05-01T14:49:24.147" UserId="73" Text="What are the most-valuable research fields to explore nowadays concerning game AI?" />
  <row Id="25522" PostHistoryTypeId="3" PostId="11807" RevisionGUID="166e1bff-8d08-4645-895f-580807f03299" CreationDate="2011-05-01T14:49:24.147" UserId="73" Text="&lt;ai&gt;&lt;academic-research&gt;" />
  <row Id="25523" PostHistoryTypeId="5" PostId="11697" RevisionGUID="9742b5aa-8661-4693-951c-447c78f1a982" CreationDate="2011-05-01T14:57:37.200" UserId="5396" Comment="fixed grammar and spelling" Text="I'm seriously thinking of building a space opera game which would share some of Machiavelli The Prince aspects regarding commerce: each player will be able to extract/build/buy/sell/donate a wide range of products (from ore to spaceships roughly). &#xD;&#xA;&#xD;&#xA;However, I'm struggling with the economy aspect of it. Should the game define the prices once and for all? Should each player be able to determine his own buy/sell prices, and if so, how? How can I avoid over engineering this game economy mechanism, while still making it attractive for users?&#xD;&#xA;&#xD;&#xA;Edit: thanks to your very nice input, some more information about the setup: &lt;br/&gt;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;it's a &quot;player only game,&quot; with no &quot;computer managed player.&quot;&lt;/li&gt;&#xD;&#xA;&lt;li&gt;players start with a planet and some resources/units and then (try to) expand&lt;/li&gt;&#xD;&#xA;&lt;li&gt;players can be of multiple &quot;species&quot; with no proper relationship apart from the one they might make up =&gt; no possible notion of &quot;central bank&quot; or similar in the first place&lt;/li&gt;&#xD;&#xA;&lt;li&gt;consequently, I would prefer &quot;not magic&quot; on the economy, by that I mean a standard currency whose value would be determined by the system. However then I don't see how trading would be appealing, since bartering would be the only way, which feels a bit clumsy for the players. I was thinking of having some rare metal as the standard exchange medium, but then I wonder how would to include other basic economic attributes, such as the population's wealth...&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;Hopefully it doesn't look too daunting...&#xD;&#xA;" />
  <row Id="25524" PostHistoryTypeId="24" PostId="11697" RevisionGUID="9742b5aa-8661-4693-951c-447c78f1a982" CreationDate="2011-05-01T14:57:37.200" Comment="Proposed by 5396 approved by 51 edit id of 400" />
  <row Id="25525" PostHistoryTypeId="25" PostId="11806" RevisionGUID="9753a1f2-c81b-46cd-a821-be82a2c4b8da" CreationDate="2011-05-01T15:11:23.857" Comment="http://twitter.com/#!/StackGameDev/status/64708502052024320" />
  <row Id="25526" PostHistoryTypeId="2" PostId="11808" RevisionGUID="76b56f72-05f0-4be2-b802-3263881b0c4d" CreationDate="2011-05-01T15:21:10.690" UserId="5824" Text="You'll need to implement it yourself. Try looking at the tutorial at: http://bluwiki.com/go/XNA_Tutorials/Mouse_Input" />
  <row Id="25527" PostHistoryTypeId="2" PostId="11809" RevisionGUID="ac7bf5bb-1b4b-4587-b616-0a9fd0887968" CreationDate="2011-05-01T15:36:09.533" UserId="7068" Text="There is a square grid in which there are empty and filled blocks. A no of contiguous blocks form an object. My bot can find out the status of it's neighbouring 8 blocks (whether they are filled or not). It can move to a neighbouring position if there is no filled block over there.&#xD;&#xA;&#xD;&#xA;I have 2 questions&#xD;&#xA;&#xD;&#xA;First one :  &#xD;&#xA;&#xD;&#xA;My code works for the case when there are no tight spaces (i.e., when objects have atleast 2 empty blocks between them). But, in the case when there can be a single space between 2 blocks, since my bot has no way of knowing if the neighbouring filled blocks belong to the same or different objects, it fails to encircle the object.&#xD;&#xA;&#xD;&#xA;Is there a way to get around this problem?&#xD;&#xA;&#xD;&#xA;The other question :  &#xD;&#xA;&#xD;&#xA;What would be the best search strategy for this? I've been thinking of assigning rewards to neighbouring spaces on the basis of how many unvisited spaces it will allow me to visit if i visit that neigbouring space, but a much more simpler strategy seem to be :&#xD;&#xA;keep going right till you hit the wall, the go up and keep going left, then up and right ....&#xD;&#xA;Is there a catch to this approach?&#xD;&#xA;" />
  <row Id="25528" PostHistoryTypeId="1" PostId="11809" RevisionGUID="ac7bf5bb-1b4b-4587-b616-0a9fd0887968" CreationDate="2011-05-01T15:36:09.533" UserId="7068" Text="encircling and counting no of objects in a grid" />
  <row Id="25529" PostHistoryTypeId="3" PostId="11809" RevisionGUID="ac7bf5bb-1b4b-4587-b616-0a9fd0887968" CreationDate="2011-05-01T15:36:09.533" UserId="7068" Text="&lt;ai&gt;&lt;bot&gt;" />
  <row Id="25530" PostHistoryTypeId="2" PostId="11810" RevisionGUID="7ac70b2f-0c3a-46d5-a3e9-41f43980a9f9" CreationDate="2011-05-01T15:51:49.660" UserId="1883" Text="Unity3D  &#xD;&#xA;UDK using nFringe  &#xD;&#xA;XNA (framework, not engine)  &#xD;&#xA;Torque 3D  &#xD;&#xA;&#xD;&#xA;And pretty much every open source C/C++ engine ever&#xD;&#xA;&#xD;&#xA;Support for debugging does vary among the engines." />
  <row Id="25531" PostHistoryTypeId="5" PostId="11801" RevisionGUID="8724773c-d1ed-42d0-ad43-ccbba66be2de" CreationDate="2011-05-01T15:53:13.410" UserId="6882" Comment="added 78 characters in body" Text="The command line [PVRTexTool][1] works very well for getting textures into a PVR format, but I need a way of going the opposite directions. Does anyone know of a good command line tool (or GUI with a batch mode) that will convert a PowerVR texture to a more common image format (like JPEG or PNG?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imgtec.com/powervr/insider/powervr-pvrtextool.asp" />
  <row Id="25532" PostHistoryTypeId="2" PostId="11811" RevisionGUID="f973e095-7000-4649-80b6-7fd45bbc595f" CreationDate="2011-05-01T16:14:53.930" UserId="1923" Text="When working with XNA in general you have to move from an event driven code paradigm to a loop driven code paradigm. Your update code loops 60 times/sec. So each time, look at the state of the mouse and if a button is down &amp; pointer is within your rect, then branch to code you would normally place in an OnClick event." />
  <row Id="25533" PostHistoryTypeId="2" PostId="11812" RevisionGUID="e8de9198-2c60-4620-a56f-3eafc752bbbe" CreationDate="2011-05-01T16:20:15.500" UserId="6937" Text="I asked a more general question last week. [This answer should be helpful.][1]&#xD;&#xA;&#xD;&#xA;I asked what the research areas are too, but I think a better question is, &quot;Where can I find some resources showing the current research trends&quot;. This answer covers that fairly well.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/11615/what-research-areas-exist-in-game-programming/11625#11625" />
  <row Id="25534" PostHistoryTypeId="2" PostId="11813" RevisionGUID="a627e213-f2df-4dfa-8aff-b06b02bb4657" CreationDate="2011-05-01T16:46:10.990" UserId="3956" Text="Is there a way to shufle a group of sprites created with:&#xD;&#xA;&#xD;&#xA;    pygame.sprite.Group()&#xD;&#xA;&#xD;&#xA;I have tried using random.shuffle but it apparently doesn't work on sprite groups." />
  <row Id="25535" PostHistoryTypeId="1" PostId="11813" RevisionGUID="a627e213-f2df-4dfa-8aff-b06b02bb4657" CreationDate="2011-05-01T16:46:10.990" UserId="3956" Text="shuffle a sprite group" />
  <row Id="25536" PostHistoryTypeId="3" PostId="11813" RevisionGUID="a627e213-f2df-4dfa-8aff-b06b02bb4657" CreationDate="2011-05-01T16:46:10.990" UserId="3956" Text="&lt;sprites&gt;&lt;python&gt;&lt;pygame&gt;" />
  <row Id="25537" PostHistoryTypeId="2" PostId="11814" RevisionGUID="49a51c03-f8b2-41b4-aafb-00aae1261beb" CreationDate="2011-05-01T17:07:09.670" UserId="6970" Text="I am a second year, learning C/C++ and Java.&#xD;&#xA;&#xD;&#xA;In our first year of university we did basic C++, no classes. This year we have been introduced to classes and inheritance. We have not yet done pointers, virtual functions, abstract classes, operator overloading, exception handling, linked lists, stacks, queues, binary trees, graphs, etc.&#xD;&#xA;&#xD;&#xA;I am very curious, so I like to teach myself some things that we haven't yet done. I enjoy the technical side of things a lot, my friends think I am weird to want to learn more than I have to..&#xD;&#xA;&#xD;&#xA;**But heres my problem:** &#xD;&#xA;&#xD;&#xA;Our C++ lecturer has decided to take a different approach this term to learning. He said, form a group, think of a project you would like to do and implement it over the year. &#xD;&#xA;&#xD;&#xA;**Let me give you a break down of our group:**&#xD;&#xA;&#xD;&#xA;Theres five of us in the group. Myself and another member are much more experienced than the other three and we like the technical side of things, and are quite motivated to do something with an **interesting** challenge. Then we have a group member who has been extremely hard to motivate, and he was very unsure why he wanted to be a programmer. He did some thinking and decided he wanted to work towards becoming a game programmer. The next member of ours is not the most reliable and has let us down a few times. Finally we have a new member that is keen to learn, but his programming needs work, as do the previous two members.&#xD;&#xA;&#xD;&#xA;We are all friends, of course -- which probably isn't the ideal solution to a good group.&#xD;&#xA;&#xD;&#xA;**The project idea:**&#xD;&#xA;&#xD;&#xA;Our lecturer gave us an initial idea for a project: a timetable scheduler. Of course this is no trivial task, but most of our members were not really interested in the project at all. So, then I thought -- one member wants to be a game programmer (the hardest member to motivate), most of us would probably enjoy the experience of doing a game, as it would be a big challenge, so why not give it a go?&#xD;&#xA;&#xD;&#xA;**So what is my question?**&#xD;&#xA;Do you think that we should take on the task of making a game, or aim for something else?&#xD;&#xA;&#xD;&#xA;Initially we thought of a 2D, top-down, ARPG. Then it became a 3D ARPG.&#xD;&#xA;&#xD;&#xA;Obviously 3D would be harder, but as we have time to learn, it wouldn't be such a bad idea would it?&#xD;&#xA;&#xD;&#xA;**Note 1:** Personally I think that the learning will be the most fun part of this project, even if we don't end up with a great game, we should have learned  a lot (including being forced to learn and implement new C++ topics).&#xD;&#xA;&#xD;&#xA;Feel free to knock us down if we are dreaming here, it would be better to know.&#xD;&#xA;&#xD;&#xA;**Note 2:** Please can someone make this a community wiki as it is subjective.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25538" PostHistoryTypeId="1" PostId="11814" RevisionGUID="49a51c03-f8b2-41b4-aafb-00aae1261beb" CreationDate="2011-05-01T17:07:09.670" UserId="6970" Text="Should our group try to make a game?" />
  <row Id="25539" PostHistoryTypeId="3" PostId="11814" RevisionGUID="49a51c03-f8b2-41b4-aafb-00aae1261beb" CreationDate="2011-05-01T17:07:09.670" UserId="6970" Text="&lt;game-design&gt;&lt;c++&gt;&lt;programming&gt;" />
  <row Id="25540" PostHistoryTypeId="2" PostId="11815" RevisionGUID="d86af1c7-129e-4851-b0f3-77ea0b574227" CreationDate="2011-05-01T17:08:27.967" UserId="4362" Text="I am just thinking about beginning game development in xna c#. However, I don't know (and no tutorial teaches) how do professional game developers create a 3D Model/Scene. How can we create a realistic looking model and what is the hardware configuration needed in machine for using such a software?&#xD;&#xA;&#xD;&#xA;Thanks in advance :)" />
  <row Id="25541" PostHistoryTypeId="1" PostId="11815" RevisionGUID="d86af1c7-129e-4851-b0f3-77ea0b574227" CreationDate="2011-05-01T17:08:27.967" UserId="4362" Text="In which software do the professional game developers create 3D Model?" />
  <row Id="25542" PostHistoryTypeId="3" PostId="11815" RevisionGUID="d86af1c7-129e-4851-b0f3-77ea0b574227" CreationDate="2011-05-01T17:08:27.967" UserId="4362" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="25543" PostHistoryTypeId="5" PostId="11781" RevisionGUID="e6256f22-1cf5-4b27-b387-9119d3c7363d" CreationDate="2011-05-01T17:12:23.730" UserId="5473" Comment="typo!!!" Text="This is a non-trivial problem. I spent a fair amount of time delving into it last year.&#xD;&#xA;&#xD;&#xA;You will want to look into the implementation of the first ever dynamic storyteller program, TaleSpin. This was written in 1976 and still things have not progressed much further in terms of dynamic story generation. TaleSpin will give you an idea of the basic elements you would need to model. See [this][1] and [this][2].&#xD;&#xA;&#xD;&#xA;Ultimately, a dynamic story will hinge off agents' motivations and goals (and further, one might specify how a particular agent might go about achieving its goals). It will also work off their knowledge of the world and how that knowledge enables them to come up with solutions to meet goals in their goal stack. (Depending on how you model the problem space, and I don't doubt there are many ways, graph theory and discrete mathematics in general may come in very handy here).&#xD;&#xA;&#xD;&#xA;Since real-life motivations/goals are often quite complex, you would need to look into how much realism you would want.&#xD;&#xA;&#xD;&#xA;Essentially, if you want anything more than a very (and I do mean *very*) simple story generator, you have a good deal of work ahead of you. Beyond that, even, there lie issues of balancing that others have noted. Caveat emptor -- This problem is a hotbed of hidden complexity.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eliterature.org/images/microtalespin.txt&#xD;&#xA;  [2]: http://grandtextauto.org/2007/10/30/scott-turner-on-minstrel/&#xD;&#xA;" />
  <row Id="25544" PostHistoryTypeId="5" PostId="11803" RevisionGUID="dcfb962b-d9f7-4946-97f0-bea1dab84256" CreationDate="2011-05-01T17:29:36.063" UserId="6756" Comment="added 33 characters in body" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball (and therefore Flat Silver Ball) only seems to work with Visual Studio 2008 or express edition. Which game engine is compatiable with Visual Studio 2010?" />
  <row Id="25545" PostHistoryTypeId="2" PostId="11816" RevisionGUID="c4ebb3fa-9e21-41e1-a788-3a25bb28090b" CreationDate="2011-05-01T17:32:20.133" UserId="7069" Text="Professionals use Autodesk [Maya][1] and Autodesk [3ds Max][2]. Many indie developers use [Blender][3], which is free. The XNA content pipeline has great support for the FBX file format, which is supported by both Maya and 3ds Max with a [plugin][4]. Google turns up this [Blender extension][5] to support the FBX file format, but I've never used it. &#xD;&#xA;&#xD;&#xA;The web sites for these products will list minimum hardware requirements. They tend to require lots of memory and a modern graphics card. &#xD;&#xA;&#xD;&#xA;Stack Exchange won't let me post more than two links, but you'll find Maya, 3ds Max, and Blender with Google.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [4]: http://usa.autodesk.com/adsk/servlet/pc/index?id=6837478&amp;siteID=123112&#xD;&#xA;  [5]: http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Export/FBX-XNA" />
  <row Id="25546" PostHistoryTypeId="2" PostId="11817" RevisionGUID="e5c55ab3-209d-4255-b361-748538b04d42" CreationDate="2011-05-01T17:32:54.517" UserId="6937" Text="If you're ok with using c# example code, here is an example of 2d polygon detection. It may get you started, there's a lot to put into a QA answer.&#xD;&#xA;&#xD;&#xA;http://www.codeproject.com/KB/GDI-plus/PolygonCollision.aspx&#xD;&#xA;&#xD;&#xA;Otherwise, just google polygon detection. Once you know which ones are colliding, finding out on which face should be easy." />
  <row Id="25547" PostHistoryTypeId="25" PostId="11814" RevisionGUID="995d6599-91b1-4976-81a4-498285e82079" CreationDate="2011-05-01T18:11:23.457" Comment="http://twitter.com/#!/StackGameDev/status/64753799302098944" />
  <row Id="25548" PostHistoryTypeId="2" PostId="11818" RevisionGUID="b2bf5133-a8c0-4b76-9541-8d2c67ba0f18" CreationDate="2011-05-01T18:26:04.517" UserId="3547" Text="I am guessing that none of you have done a project like this. You should definitely use a game engine or some kind of third party library. Do not try to roll your own.&#xD;&#xA;&#xD;&#xA;Use something like OGRE, Unity, or anything that looks like it will fit your needs (decent list here: [Easy to use cross-platform 3D engines for C++ game development?][1]). You should probably stick with C++ since this is a C++ class your talking about.&#xD;&#xA;&#xD;&#xA;Also, consider content. Programming isn't the only thing that will go into this project. Some games need a lot of assets: sounds, music, models, meshes, textures, etc. Another important asset is game content like maps, items, etc (depending on the game). My foremost recommendation is to make a game that doesn't require too many assets so you guys can focus on the programming aspect. That's why I recommend you stay away from certain genres like RPGs (usually require vast amounts of game content like maps, items, monsters, art, sound, etc).&#xD;&#xA;&#xD;&#xA;This isn't to say you can't make a game where art or sound is required, just be ready to use things that are already out there. This will save you vast amounts of time.&#xD;&#xA;&#xD;&#xA;If you make a game, it should be a game that is focused on something programming wise. For instance: a game where you have to catch shapes as music plays. The varying pitches and other aspects of the music would change the flow of shapes. This game would be neat because it doesn't require a lot of assets (no maps and very minimal amount of art and sounds). You would also have to focus on programming tasks like manipulating and responding to the music your game is playing. Try to do a game that is neat, but also doesn't require a lot of content.&#xD;&#xA;&#xD;&#xA;My core suggestion: Aim for a game that you think you can finish. Low amounts of content (or content from free/usable sources) is essential in my opinion for a first project like this. You should also develop other games before your &quot;end game&quot; project (clones like tic-tac-toe, break out, and tetris are good examples). Also, don't reinvent the wheel. Use other people's code! It'll save you time and it'll probably be better than your code if your doing this for the first time. Don't code an engine, code a game.&#xD;&#xA;&#xD;&#xA;3D verse 2D isn't a huge deal in my opinion. The math is a bit more imposing, but it isn't like 3D is far harder than 2D. Yeah, your not going to make WoW, but you can make a decent-looking 3D game. It's all about where you set your sights.&#xD;&#xA;&#xD;&#xA;Notes on your team: Your team is only as strong as it's weakest link. If you feel that certain team members will have troubles, than you should anticipate picking up the slack or making changes. Your team members should fully realize how hard making game can be. It's not an easy project by far.&#xD;&#xA;&#xD;&#xA;Honestly, I think you guys can do it in a year. Five people can definitely learn and implement a game. It all depends on the game your making, set your sights just right and you'll hit your mark. Sorry for the horribly long answer, just my opinions from what I've learned in the past year.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/21/easy-to-use-cross-platform-3d-engines-for-c-game-development" />
  <row Id="25549" PostHistoryTypeId="4" PostId="5885" RevisionGUID="c83d91e3-d7d2-45d5-b53e-ed5febbfe639" CreationDate="2011-05-01T18:28:59.490" UserId="3547" Comment="edited tags; edited title" Text="Should I go with Windows Phone 7 or Try Android?" />
  <row Id="25550" PostHistoryTypeId="6" PostId="5885" RevisionGUID="c83d91e3-d7d2-45d5-b53e-ed5febbfe639" CreationDate="2011-05-01T18:28:59.490" UserId="3547" Comment="edited tags; edited title" Text="&lt;xna&gt;&lt;c#&gt;&lt;java&gt;&lt;android&gt;&lt;windows-phone-7&gt;" />
  <row Id="25551" PostHistoryTypeId="5" PostId="11810" RevisionGUID="c29fd6ff-591d-4ef9-b4aa-b2d4099705f1" CreationDate="2011-05-01T18:38:39.400" UserId="1883" Comment="added 42 characters in body" Text="Unity3D  &#xD;&#xA;UDK using nFringe  &#xD;&#xA;XNA (framework, not engine)  &#xD;&#xA;Silverlight (2D framework, not engine)  &#xD;&#xA;Torque 3D  &#xD;&#xA;&#xD;&#xA;And pretty much every open source C/C++ engine ever&#xD;&#xA;&#xD;&#xA;Support for debugging does vary among the engines." />
  <row Id="25552" PostHistoryTypeId="5" PostId="11816" RevisionGUID="696c6b76-3227-47eb-b6a4-98b9eef03da9" CreationDate="2011-05-01T18:51:57.957" UserId="14" Comment="Adding Links; deleted 111 characters in body" Text="Professionals use Autodesk [Maya][1] and Autodesk [3ds Max][2]. Many indie developers use [Blender][3], which is free. The XNA content pipeline has great support for the FBX file format, which is supported by both Maya and 3ds Max with a [plugin][4]. Google turns up this [Blender extension][5] to support the FBX file format, but I've never used it. &#xD;&#xA;&#xD;&#xA;The web sites for these products will list minimum hardware requirements. They tend to require lots of memory and a modern graphics card. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://usa.autodesk.com/maya/&#xD;&#xA;  [2]: http://usa.autodesk.com/3ds-max/&#xD;&#xA;  [3]: http://blender.org&#xD;&#xA;  [4]: http://usa.autodesk.com/adsk/servlet/pc/index?id=6837478&amp;siteID=123112&#xD;&#xA;  [5]: http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Export/FBX-XNA" />
  <row Id="25553" PostHistoryTypeId="5" PostId="11818" RevisionGUID="13cbfb79-e1e6-489e-8438-784c953243fe" CreationDate="2011-05-01T18:58:14.290" UserId="3547" Comment="added 19 characters in body" Text="I am guessing that none of you have done a project like this. You should definitely use a game engine or some kind of third party library. Do not try to roll your own.&#xD;&#xA;&#xD;&#xA;Use something like C4, Irrlicht, Horde3D, NeoAxis, or anything that looks like it will fit your needs (decent list here: [Easy to use cross-platform 3D engines for C++ game development?][1]). You should probably stick with C++ since this is a C++ class your talking about.&#xD;&#xA;&#xD;&#xA;Also, consider content. Programming isn't the only thing that will go into this project. Some games need a lot of assets: sounds, music, models, meshes, textures, etc. Another important asset is game content like maps, items, etc (depending on the game). My foremost recommendation is to make a game that doesn't require too many assets so you guys can focus on the programming aspect. That's why I recommend you stay away from certain genres like RPGs (usually require vast amounts of game content like maps, items, monsters, art, sound, etc).&#xD;&#xA;&#xD;&#xA;This isn't to say you can't make a game where art or sound is required, just be ready to use things that are already out there. This will save you vast amounts of time.&#xD;&#xA;&#xD;&#xA;If you make a game, it should be a game that is focused on something programming wise. For instance: a game where you have to catch shapes as music plays. The varying pitches and other aspects of the music would change the flow of shapes. This game would be neat because it doesn't require a lot of assets (no maps and very minimal amount of art and sounds). You would also have to focus on programming tasks like manipulating and responding to the music your game is playing. Try to do a game that is neat, but also doesn't require a lot of content.&#xD;&#xA;&#xD;&#xA;My core suggestion: Aim for a game that you think you can finish. Low amounts of content (or content from free/usable sources) is essential in my opinion for a first project like this. You should also develop other games before your &quot;end game&quot; project (clones like tic-tac-toe, break out, and tetris are good examples). Also, don't reinvent the wheel. Use other people's code! It'll save you time and it'll probably be better than your code if your doing this for the first time. Don't code an engine, code a game.&#xD;&#xA;&#xD;&#xA;3D verse 2D isn't a huge deal in my opinion. The math is a bit more imposing, but it isn't like 3D is far harder than 2D. Yeah, your not going to make WoW, but you can make a decent-looking 3D game. It's all about where you set your sights.&#xD;&#xA;&#xD;&#xA;Notes on your team: Your team is only as strong as it's weakest link. If you feel that certain team members will have troubles, than you should anticipate picking up the slack or making changes. Your team members should fully realize how hard making game can be. It's not an easy project by far.&#xD;&#xA;&#xD;&#xA;Honestly, I think you guys can do it in a year. Five people can definitely learn and implement a game. It all depends on the game your making, set your sights just right and you'll hit your mark. Sorry for the horribly long answer, just my opinions from what I've learned in the past year.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/21/easy-to-use-cross-platform-3d-engines-for-c-game-development" />
  <row Id="25554" PostHistoryTypeId="2" PostId="11819" RevisionGUID="feca3768-f784-4c40-a4b6-03977957cdaa" CreationDate="2011-05-01T19:09:50.507" UserId="2332" Text="Honestly, in the space of time you've got where you have to factor in learning time as well, design a 2D game rather than 3D. As quoted a few times on this site, 3D is orders of magnitude harder than 2D.&#xD;&#xA;&#xD;&#xA;It's definitely possible to make a game but you must make sure that you clamp your gameplay features right at the beginning. You don't want to situation of &quot;Well wouldn't it be cool if we did X as well as Y?&quot; 7-8 months down the line.&#xD;&#xA;&#xD;&#xA;Just remember that it doesn't have to have fancy graphics or the polish of a AAA game.&#xD;&#xA;&#xD;&#xA;Depending on your game idea and how complete you want it (and try to keep it as simple as possible, especially as some members are less experienced than others) you will need something for:&#xD;&#xA;&#xD;&#xA; - Graphics&#xD;&#xA; - Input&#xD;&#xA; - Audio - potentially optional&#xD;&#xA; - Collision Detection&#xD;&#xA; - Physics - depending on the idea, you&#xD;&#xA;   can easily get away with your own&#xD;&#xA;   physics for a Tetris clone, for&#xD;&#xA;   example.&#xD;&#xA; - AI - completely optional&#xD;&#xA;&#xD;&#xA;There are plenty of sites available that you can get free assets and content from.&#xD;&#xA;&#xD;&#xA;I have heard good things regarding [SDL][1] and [SFML][2] so have a look at them to make your 2D implementation a lot easier.&#xD;&#xA;&#xD;&#xA;If you really want physics, you could use [Box2D][3] but you should take note that it's a fine balance you're after. The more libraries you use the longer it will take to learn them and integrate them to a satisfactory degree. On the other hand, depending on the complexities of your game, you should make use of more libraries rather than reinvent the wheel.&#xD;&#xA;&#xD;&#xA;You can simplify this headache just by keeping your game simple. There's nothing wrong with a Tetris, Mario or Asteroids clone.&#xD;&#xA;&#xD;&#xA;Personally, I wouldn't bother with AI. You can have some enemies that move about randomly and that would be sufficient to make it a challenging game.&#xD;&#xA;&#xD;&#xA;Just as a final note, I'd get used to using pointers and references at the very least, so I'd recommend learning a bit more about C++ too in your own time.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.sfml-dev.org/&#xD;&#xA;  [3]: http://www.box2d.org/" />
  <row Id="25555" PostHistoryTypeId="6" PostId="11814" RevisionGUID="590b89f7-8d86-4f17-a5be-2038b16802dc" CreationDate="2011-05-01T19:27:30.347" UserId="51" Comment="edited tags; deleted 201 characters in body" Text="&lt;c++&gt;&lt;programming&gt;" />
  <row Id="25556" PostHistoryTypeId="5" PostId="11814" RevisionGUID="590b89f7-8d86-4f17-a5be-2038b16802dc" CreationDate="2011-05-01T19:27:30.347" UserId="51" Comment="edited tags; deleted 201 characters in body" Text="I am a second year, learning C/C++ and Java.&#xD;&#xA;&#xD;&#xA;In our first year of university we did basic C++, no classes. This year we have been introduced to classes and inheritance. We have not yet done pointers, virtual functions, abstract classes, operator overloading, exception handling, linked lists, stacks, queues, binary trees, graphs, etc.&#xD;&#xA;&#xD;&#xA;I am very curious, so I like to teach myself some things that we haven't yet done. I enjoy the technical side of things a lot, my friends think I am weird to want to learn more than I have to..&#xD;&#xA;&#xD;&#xA;**But heres my problem:** &#xD;&#xA;&#xD;&#xA;Our C++ lecturer has decided to take a different approach this term to learning. He said, form a group, think of a project you would like to do and implement it over the year. &#xD;&#xA;&#xD;&#xA;**Let me give you a break down of our group:**&#xD;&#xA;&#xD;&#xA;Theres five of us in the group. Myself and another member are much more experienced than the other three and we like the technical side of things, and are quite motivated to do something with an **interesting** challenge. Then we have a group member who has been extremely hard to motivate, and he was very unsure why he wanted to be a programmer. He did some thinking and decided he wanted to work towards becoming a game programmer. The next member of ours is not the most reliable and has let us down a few times. Finally we have a new member that is keen to learn, but his programming needs work, as do the previous two members.&#xD;&#xA;&#xD;&#xA;We are all friends, of course -- which probably isn't the ideal solution to a good group.&#xD;&#xA;&#xD;&#xA;**The project idea:**&#xD;&#xA;&#xD;&#xA;Our lecturer gave us an initial idea for a project: a timetable scheduler. Of course this is no trivial task, but most of our members were not really interested in the project at all. So, then I thought -- one member wants to be a game programmer (the hardest member to motivate), most of us would probably enjoy the experience of doing a game, as it would be a big challenge, so why not give it a go?&#xD;&#xA;&#xD;&#xA;**So what is my question?**&#xD;&#xA;Do you think that we should take on the task of making a game, or aim for something else?&#xD;&#xA;&#xD;&#xA;Initially we thought of a 2D, top-down, ARPG. Then it became a 3D ARPG.&#xD;&#xA;&#xD;&#xA;Obviously 3D would be harder, but as we have time to learn, it wouldn't be such a bad idea would it?&#xD;&#xA;&#xD;&#xA;Personally I think that the learning will be the most fun part of this project, even if we don't end up with a great game, we should have learned  a lot (including being forced to learn and implement new C++ topics).&#xD;&#xA;" />
  <row Id="25557" PostHistoryTypeId="5" PostId="11815" RevisionGUID="0bc9a65a-7947-4599-9aa7-16450c503cc3" CreationDate="2011-05-01T19:31:12.357" UserId="51" Comment="deleted 32 characters in body; edited tags" Text="I am just thinking about beginning game development in xna c#. However, I don't know (and no tutorial teaches) how do professional game developers create a 3D Model/Scene. How can we create a realistic looking model and what is the hardware configuration needed in machine for using such a software?&#xD;&#xA;" />
  <row Id="25558" PostHistoryTypeId="6" PostId="11815" RevisionGUID="0bc9a65a-7947-4599-9aa7-16450c503cc3" CreationDate="2011-05-01T19:31:12.357" UserId="51" Comment="deleted 32 characters in body; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;models&gt;" />
  <row Id="25559" PostHistoryTypeId="2" PostId="11820" RevisionGUID="6cef0647-717f-4485-8931-6d9683f005a7" CreationDate="2011-05-01T19:33:15.740" UserId="3128" Text="How would I go about creating a menu system with fonts in OpenGL? I want to make a dungeon crawler and will need a menu for inventory and stats for the weapons. I can draw a world made out of blocks ok but I'm not quite sure how to do this.&#xD;&#xA;&#xD;&#xA;I think I need to use the matrix that glortho applies to the matrix stack. Specifically I'm using WebGL and I don't have access to fonts so it seems like I have to create my own.&#xD;&#xA;&#xD;&#xA;Any help with how I would go about doing this would be appreciated." />
  <row Id="25560" PostHistoryTypeId="1" PostId="11820" RevisionGUID="6cef0647-717f-4485-8931-6d9683f005a7" CreationDate="2011-05-01T19:33:15.740" UserId="3128" Text="How do I create menu with text in OpenGL?" />
  <row Id="25561" PostHistoryTypeId="3" PostId="11820" RevisionGUID="6cef0647-717f-4485-8931-6d9683f005a7" CreationDate="2011-05-01T19:33:15.740" UserId="3128" Text="&lt;opengl&gt;&lt;webgl&gt;" />
  <row Id="25562" PostHistoryTypeId="2" PostId="11821" RevisionGUID="fee5f469-b91b-4f7e-ab5f-4e43394c5f24" CreationDate="2011-05-01T20:13:17.543" UserId="4183" Text="I am trying to learn how to use Shaders for a 2D XNA project I am working on. To test them out, I was trying to make a white triangle become colored using a super simple Pixel Shader, and I can't get it to work.&#xD;&#xA;&#xD;&#xA;This is my Pixel Shader:&#xD;&#xA;&#xD;&#xA;    float4 ThePixelShader(float4 texCoord : TEXCOORD0) : COLOR0&#xD;&#xA;    {&#xD;&#xA;    	return(125,15,105,0);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    technique MandelbrotSet&#xD;&#xA;    {&#xD;&#xA;        pass Pass0&#xD;&#xA;        {&#xD;&#xA;    	    PixelShader = compile ps_2_0 ThePixelShader();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And this is the code I was using to draw my Plain white triangle onto the screen, and trying to use the shader to change its color.&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.Clear(Color.Black);&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;            //MandelbrotEffect.Parameters[&quot;&quot;].SetValue();&#xD;&#xA;            MandelbrotEffect.CurrentTechnique = MandelbrotEffect.Techniques[&quot;MandelbrotSet&quot;];&#xD;&#xA;            foreach (EffectPass pass in MandelbrotEffect.CurrentTechnique.Passes)&#xD;&#xA;            {&#xD;&#xA;                pass.Apply();&#xD;&#xA;                spriteBatch.Draw(Dot, new Rectangle(10, 10, 200, 200), Color.White);&#xD;&#xA;            }&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;I'm guessing I am doing something dumb, but I can't figure out what. The triangle is drawn on screen as just a plain white triangle, what it would look like without a shader.&#xD;&#xA;&#xD;&#xA;Thoughts?" />
  <row Id="25563" PostHistoryTypeId="1" PostId="11821" RevisionGUID="fee5f469-b91b-4f7e-ab5f-4e43394c5f24" CreationDate="2011-05-01T20:13:17.543" UserId="4183" Text="Learning Shaders in XNA" />
  <row Id="25564" PostHistoryTypeId="3" PostId="11821" RevisionGUID="fee5f469-b91b-4f7e-ab5f-4e43394c5f24" CreationDate="2011-05-01T20:13:17.543" UserId="4183" Text="&lt;xna&gt;&lt;shaders&gt;" />
  <row Id="25565" PostHistoryTypeId="2" PostId="11822" RevisionGUID="c515660c-2b9a-490c-9c2c-520047a0f66b" CreationDate="2011-05-01T20:22:34.497" UserId="4662" Text="Direct3D colours are RGBA, which means you're passing 0 for the Alpha component, which is totally transparent." />
  <row Id="25566" PostHistoryTypeId="5" PostId="11821" RevisionGUID="da45b584-40a4-4599-b7b9-0ddb82ae6fcb" CreationDate="2011-05-01T20:33:54.180" UserId="4183" Comment="Fixed the alpha value to 1 from 0, didn't fix the problem; added 639 characters in body" Text="I am trying to learn how to use Shaders for a 2D XNA project I am working on. To test them out, I was trying to make a white triangle become colored using a super simple Pixel Shader, and I can't get it to work.&#xD;&#xA;&#xD;&#xA;This is my Pixel Shader:&#xD;&#xA;&#xD;&#xA;    float4 ThePixelShader(float4 texCoord : TEXCOORD0) : COLOR0&#xD;&#xA;    {&#xD;&#xA;    	return(125,15,105,1);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    technique MandelbrotSet&#xD;&#xA;    {&#xD;&#xA;        pass Pass0&#xD;&#xA;        {&#xD;&#xA;    	    PixelShader = compile ps_2_0 ThePixelShader();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And this is the code I was using to draw my Plain white triangle onto the screen, and trying to use the shader to change its color.&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.Clear(Color.Black);&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;            //MandelbrotEffect.Parameters[&quot;&quot;].SetValue();&#xD;&#xA;            MandelbrotEffect.CurrentTechnique = MandelbrotEffect.Techniques[&quot;MandelbrotSet&quot;];&#xD;&#xA;            foreach (EffectPass pass in MandelbrotEffect.CurrentTechnique.Passes)&#xD;&#xA;            {&#xD;&#xA;                pass.Apply();&#xD;&#xA;                spriteBatch.Draw(Dot, new Rectangle(10, 10, 200, 200), Color.White);&#xD;&#xA;            }&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;I'm guessing I am doing something dumb, but I can't figure out what. The triangle is drawn on screen as just a plain white triangle, what it would look like without a shader.&#xD;&#xA;&#xD;&#xA;EDIT: Changed my drawing code to look like this.&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.Clear(Color.Black);&#xD;&#xA;            //MandelbrotEffect.Parameters[&quot;&quot;].SetValue();&#xD;&#xA;            MandelbrotEffect.CurrentTechnique = MandelbrotEffect.Techniques[&quot;MandelbrotSet&quot;];&#xD;&#xA;            spriteBatch.Begin(0, BlendState.Opaque, null, null, null, MandelbrotEffect);&#xD;&#xA;            spriteBatch.Draw(blank, Vector2.Zero, Color.White);&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;Now it does draws the box fullscreen, and I know the shader is working because changing the Alpha value does change the Alpha value of the full screen image, but still the colors don't change.&#xD;&#xA;&#xD;&#xA;Thoughts?" />
  <row Id="25567" PostHistoryTypeId="2" PostId="11823" RevisionGUID="6a4c8c41-7896-499c-8cc6-5776acc90e7d" CreationDate="2011-05-01T20:34:46.630" UserId="2332" Text="Behaviour trees are a big thing in the industry right now, but from an academic perspective there hasn't been too much research into them, as far as I'm aware.&#xD;&#xA;&#xD;&#xA;Parallelism with AI systems is an interesting area too, but I'm not too sure on what has been done with it.&#xD;&#xA;&#xD;&#xA;Check out [AIGameDev.com][1] and in particular [this link][2]. It details a number of current open challenges with regards to FPS games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://aigamedev.com/&#xD;&#xA;  [2]: http://aigamedev.com/open/editorial/open-challenges-fps/" />
  <row Id="25568" PostHistoryTypeId="25" PostId="11821" RevisionGUID="674d993a-5fcd-4aa9-b8f0-e13699940c5c" CreationDate="2011-05-01T21:11:23.450" Comment="http://twitter.com/#!/StackGameDev/status/64799098242469888" />
  <row Id="25569" PostHistoryTypeId="2" PostId="11824" RevisionGUID="a4a96c07-d2cd-4864-8cc6-1ae9dcba4510" CreationDate="2011-05-01T21:21:10.010" UserId="7071" Text="If you are looking for an open source Lua engine for mobile games, check out Moai at http://getmoai.com" />
  <row Id="25570" PostHistoryTypeId="17" PostId="11826" RevisionGUID="85e64ed9-9487-4674-9c84-7484a147a6f9" CreationDate="2011-05-01T21:23:39.690" UserId="-1" Comment="from http://stackoverflow.com/questions/5849953/in-which-software-do-the-professional-game-developers-create-3d-model/5850001#5850001" Text="" />
  <row Id="25571" PostHistoryTypeId="17" PostId="11827" RevisionGUID="f1be8cf4-0547-4b4a-9bbe-7be13337d939" CreationDate="2011-05-01T21:23:39.690" UserId="-1" Comment="from http://stackoverflow.com/questions/5849953/in-which-software-do-the-professional-game-developers-create-3d-model/5850007#5850007" Text="" />
  <row Id="25572" PostHistoryTypeId="2" PostId="11826" RevisionGUID="d3c1a9ee-e461-45a8-bb2f-ea53414ccf2b" CreationDate="2011-05-01T17:17:07.373" UserDisplayName="MrRoy" Text="[3rd max](http://usa.autodesk.com/3ds-max/) is a professional 3d modelling tool, but it is only available at a high cost.&#xD;&#xA;&#xD;&#xA;[Blender](http://www.blender.org/) is a free and open-source one.&#xD;&#xA;&#xD;&#xA;This is 3ds max minimum requirements :&#xD;&#xA;&#xD;&#xA;&gt; Intel® Pentium® 4 1.4 GHz or equivalent AMD® processor with SSE2 technology*&#xD;&#xA;&#xD;&#xA;&gt;2 GB RAM (4 GB recommended)&#xD;&#xA;&#xD;&#xA;&gt;2 GB swap space (4 GB recommended)**&#xD;&#xA;&#xD;&#xA;&gt;3 GB free hard drive space&#xD;&#xA;&#xD;&#xA;&gt;Direct3D® 10 technology, Direct3D 9, or OpenGL-capable graphics card† (256 MB or higher video card memory, 1 GB or higher recommended)&#xD;&#xA;&#xD;&#xA;&gt;Three-button mouse with mouse driver software&#xD;&#xA;&#xD;&#xA;&gt;DVD-ROM drive††&#xD;&#xA;&#xD;&#xA;&gt;Microsoft® Internet Explorer® 8.0 internet browser or higher or Mozilla® Firefox® 3.0 &#xD;&#xA;&#xD;&#xA;&gt;internet browser or higher&#xD;&#xA;&#xD;&#xA;&gt;Internet connection for web downloads and Autodesk® Subscription-aware access" />
  <row Id="25573" PostHistoryTypeId="2" PostId="11827" RevisionGUID="1651e573-2124-45d0-842f-f75a45332833" CreationDate="2011-05-01T17:18:04.547" UserDisplayName="Nick" Text="Well, I have used blender to model 3D models for one of my projects however you have many choices such as 3ds max, maya, Rhino, Lightwave,cinema 4d,etc&#xD;&#xA;&#xD;&#xA;Also for detailing you can use ZBrush3, Mudbox.&#xD;&#xA;&#xD;&#xA;According to me 3ds max is what most Game developers use&#xD;&#xA; &#xD;&#xA;for 3ds max &#xD;&#xA;&#xD;&#xA;Must have: Quad core, with &gt;4GB ram. Good video card. &#xD;&#xA;&#xD;&#xA;Nice to have: very top end quad core, 16GB ram, 4870 VC or better. &#xD;&#xA;&#xD;&#xA;As for hard drives, pick up a couple of 500GB or larger, and you may want to look into RAID, possibly.&#xD;&#xA;&#xD;&#xA;For 32-bit Autodesk Maya 2012&#xD;&#xA;&#xD;&#xA;Microsoft® Windows® 7 Professional, Microsoft® Windows Vista® Business (SP2), or Microsoft® Windows® XP Professional (SP3) operating systems&#xD;&#xA;Windows: Intel® Pentium® 4, AMD Athlon™ processor with SSE3 instruction set support (or higher)&#xD;&#xA;2 GB RAM&#xD;&#xA;10 GB free hard drive space&#xD;&#xA;Qualified hardware-accelerated OpenGL® graphics card&#xD;&#xA;Three-button mouse with mouse driver software&#xD;&#xA;DVD-ROM drive&#xD;&#xA;HDD: IDE, SATA, SATA 2, SAS, SCSI&#xD;&#xA;Microsoft Internet Explorer 7.0 or higher, Apple Safari, or Mozilla Firefox web browsers&#xD;&#xA;&#xD;&#xA;CINEMA 4D R12 and BodyPaint 3D R12&#xD;&#xA;&#xD;&#xA;Detailed system requirements : http://www.maxon.net/products/general-information/general-information/system-requirements.html" />
  <row Id="25581" PostHistoryTypeId="18" PostId="11826" RevisionGUID="64aa984e-5e24-4ed1-845d-82800e5d41fa" CreationDate="2011-05-01T21:26:31.290" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/11825/in-which-software-do-the-professional-game-developers-create-3d-model" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25582" PostHistoryTypeId="18" PostId="11827" RevisionGUID="64aa984e-5e24-4ed1-845d-82800e5d41fa" CreationDate="2011-05-01T21:26:31.290" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/11825/in-which-software-do-the-professional-game-developers-create-3d-model" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25583" PostHistoryTypeId="18" PostId="11815" RevisionGUID="64aa984e-5e24-4ed1-845d-82800e5d41fa" CreationDate="2011-05-01T21:26:31.290" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/11825/in-which-software-do-the-professional-game-developers-create-3d-model" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25585" PostHistoryTypeId="2" PostId="11828" RevisionGUID="9fde607e-ea5d-401f-a773-dd6e26791b67" CreationDate="2011-05-01T21:48:57.977" UserId="4947" Text="Maybe I just don't understand your question, but if you want to draw text, you can use function [glutBitmapCharacter][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/libraries/glut/spec3/node76.html" />
  <row Id="25586" PostHistoryTypeId="5" PostId="11748" RevisionGUID="e507e086-e1bc-4631-8902-c10b83d09ea2" CreationDate="2011-05-01T22:01:26.937" UserId="6875" Comment="added 125 characters in body; added 274 characters in body" Text="**EDIT** This is the WebGL code for initializing the tetrahedron points. You may want to skip to the second code block, because you may be able to answer without this.&#xD;&#xA;&#xD;&#xA;		//Making a tetrahedron with equal sides&#xD;&#xA;		//Using rotation matrices to determine the points&#xD;&#xA;		&#xD;&#xA;		//-120 degrees&#xD;&#xA;		var q = -Math.PI/2.0 * 4.0/3.0;&#xD;&#xA;		//Transformation matrix for X-axis rotation&#xD;&#xA;		var rotationArrayX = [&#xD;&#xA;			1.0,	0.0,			0.0,			0.0,&#xD;&#xA;			0.0,	Math.cos(q),	Math.sin(q), 	0.0,&#xD;&#xA;			0.0,	-Math.sin(q),	Math.cos(q), 	0.0,&#xD;&#xA;			0.0,	0.0, 	 		0.0, 			1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixX = mat4.create(rotationArrayX);&#xD;&#xA;		var d = vec3.create(new Array(0.0, 1.0, 0.0)); //Topmost point&#xD;&#xA;		var a = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixX, d, a);&#xD;&#xA;		&#xD;&#xA;		//Now we have the top most point and the first point of the base&#xD;&#xA;		//After rotating the vector A with 120 degrees two times, we have the 3 base points&#xD;&#xA;		&#xD;&#xA;		//120 degrees&#xD;&#xA;		q = -q;&#xD;&#xA;		//Transformation matrix for Y-axis rotation&#xD;&#xA;		var rotationArrayY = [&#xD;&#xA;			Math.cos(q), 0.0, -Math.sin(q), 	0.0,&#xD;&#xA;			0.0, 		 1.0, 		0.0, 		0.0,&#xD;&#xA;			Math.sin(q), 0.0, Math.cos(q), 		0.0,&#xD;&#xA;			0.0,		 0.0, 	 	0.0, 		1.0&#xD;&#xA;		];&#xD;&#xA;		&#xD;&#xA;		var rotationMatrixY = mat4.create(rotationArrayY);&#xD;&#xA;		&#xD;&#xA;		//Calculating points B and C&#xD;&#xA;		var b = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, a, b);&#xD;&#xA;		var c = vec3.create();&#xD;&#xA;		mat4.multiplyVec3(rotationMatrixY, b, c);&#xD;&#xA;		&#xD;&#xA;		//The remaining point is the top point&#xD;&#xA;	&#xD;&#xA;        var vertices = new Array();&#xD;&#xA;		&#xD;&#xA;		//bottom&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(c);&#xD;&#xA;		//front&#xD;&#xA;		vertices.push(b); vertices.push(c); vertices.push(d);&#xD;&#xA;		//right&#xD;&#xA;		vertices.push(c); vertices.push(a); vertices.push(d);&#xD;&#xA;		//left&#xD;&#xA;		vertices.push(a); vertices.push(b); vertices.push(d);&#xD;&#xA;&#xD;&#xA;How should I imagine texturing these triangles? Is this a valid set of texture coordinates? &#xD;&#xA;&#xD;&#xA;		var textureCoords = [&#xD;&#xA;			//bottom&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//front&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//right&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;			&#xD;&#xA;			//left&#xD;&#xA;			0.5, 1.0,&#xD;&#xA;			0.0, 0.0,&#xD;&#xA;			1.0, 0.0,&#xD;&#xA;		];&#xD;&#xA;&#xD;&#xA;I based this on &lt;http://www.codeguru.com/forum/showpost.php?p=1542703&amp;postcount=2&gt;:&#xD;&#xA;&#xD;&#xA;	  -------(0.5,1)-------&#xD;&#xA;	  |                   |&#xD;&#xA;	  |      Texture      |&#xD;&#xA;	  |      Image        |&#xD;&#xA;	  |                   | &#xD;&#xA;	  |                   |&#xD;&#xA;	(0,0)---------------(1,0)&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25587" PostHistoryTypeId="2" PostId="11829" RevisionGUID="cea25a52-e246-4823-b816-9005c3cd0cc8" CreationDate="2011-05-01T22:24:17.807" UserId="7073" Text="I would add two points to keep in consideration:&#xD;&#xA;&#xD;&#xA;1) Platform popularity: this is a country-dependent factor. For example, at the present, in the country where I live (Italy) Android it seems to be more popular than WP7. Furthermore, it's difficult to find a WP7 phone at a reasonable price.&#xD;&#xA;&#xD;&#xA;2) Platform hardware: on the other hand, WP7 gives you a baseline on hardware performance in which you can rely on. I played a famous race game on WP7 and the experience was amazing. In Android, when you develop a 3d game, you don't know in advance whick kind of hardware your application will run on. It might be a 150 euro phone with a poor hardware, or a 600 euro phone with a great hardware. Since the Android ecosystem is open, you must cope with many different devices. This could be hard to deal with.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="25588" PostHistoryTypeId="25" PostId="11815" RevisionGUID="de4f4137-f666-446b-ad29-64e2ae8d5c37" CreationDate="2011-05-02T00:11:23.803" Comment="http://twitter.com/#!/StackGameDev/status/64844397468073984" />
  <row Id="25589" PostHistoryTypeId="2" PostId="11830" RevisionGUID="cd524ae2-139d-4dd5-a2a9-3cb8a3733ece" CreationDate="2011-05-02T00:53:05.847" UserId="5021" Text="After your edit it is unclear exactly what code you are using. &#xD;&#xA;&#xD;&#xA;Replace the code in your question with the code that you are using (for example, we don't know what &quot;the drawing part&quot; is, since all of this code is &quot;the drawing part&quot;).&#xD;&#xA;&#xD;&#xA;The following code is all you need to draw a quad with the effect as desired:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Clear(Color.Black);&#xD;&#xA;    MandelbrotEffect.CurrentTechnique = MandelbrotEffect.Techniques[&quot;MandelbrotSet&quot;];&#xD;&#xA;    MandelbrotEffect.CurrentTechnique.Passes[0].Apply();&#xD;&#xA;    spriteBatch.Begin(0, BlendState.Opaque, null, null, null, MandelbrotEffect);&#xD;&#xA;    spriteBatch.Draw(blank, Vector2.Zero, Color.White);&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25590" PostHistoryTypeId="2" PostId="11831" RevisionGUID="edd1340e-013e-4708-a1c8-3b178aafbe17" CreationDate="2011-05-02T01:00:49.543" UserId="5021" Text="Contrary to the statements in your question, [Flat Red Ball][1] uses XNA 4 and therefore ***does*** work with Visual Studio 2010.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com" />
  <row Id="25591" PostHistoryTypeId="2" PostId="11832" RevisionGUID="777bcc8c-b646-4168-9710-b1eb97f9196f" CreationDate="2011-05-02T01:02:24.533" UserId="4827" Text="I am creating a tetris game in C++ &amp; SDL, and I'm trying to do it &quot;good&quot; by making it object-oriented and keeping scopes small. So far I have the following structure:&#xD;&#xA;&#xD;&#xA;- A main with some lowlevel SDL set up and handling input&#xD;&#xA;- A game class that keeps track of score and provides the interface for main (move block down, etc)&#xD;&#xA;- A map class that keeps track of the current game field, which blocks are where. Used by the game class.&#xD;&#xA;- A block class that consists of the current falling block, used by game.&#xD;&#xA;- A renderer class abstracting low level SDL to a format where you render &quot;tetris blocks&quot;. Used by map and block.&#xD;&#xA;&#xD;&#xA;Now I have a though time where to place the time-management of this game. For example, where should be decided when a block bumps the bottom of the screen how long it takes the current block locks in place and a new block spawns?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;I also have an other unrelated question, is there some place where you can find some standard data on tetris like standard score tables, rulesets, timings, etc?" />
  <row Id="25592" PostHistoryTypeId="1" PostId="11832" RevisionGUID="777bcc8c-b646-4168-9710-b1eb97f9196f" CreationDate="2011-05-02T01:02:24.533" UserId="4827" Text="Splitting a tetris game apart - where to put time-management?" />
  <row Id="25593" PostHistoryTypeId="3" PostId="11832" RevisionGUID="777bcc8c-b646-4168-9710-b1eb97f9196f" CreationDate="2011-05-02T01:02:24.533" UserId="4827" Text="&lt;c++&gt;&lt;sdl&gt;&lt;time-management&gt;" />
  <row Id="25594" PostHistoryTypeId="2" PostId="11833" RevisionGUID="5b7822ba-c192-40ee-86ef-05a578c73e59" CreationDate="2011-05-02T01:50:10.703" UserId="7076" Text="you may also want to check out Badumna (www.badumna.com) which claims to be a peer-to-peer networking solution for online games. It seems to do the game state synchronisation in a distributed manner and according to their website there is a Flash version coming." />
  <row Id="25595" PostHistoryTypeId="2" PostId="11834" RevisionGUID="d18562d1-04d7-4ce5-9c6f-b2e5a07f3ffa" CreationDate="2011-05-02T02:36:34.660" UserId="2111" Text="I would create a separate class called *CollisionDetection* or something that would check if the block reached the bottom of the screen or collided with other blocks, and if there was a collision, update the overall block data to add the current falling shape's blocks and create the next shape. The same class could contain a method to check if lines are completed and act accordingly. &#xD;&#xA;&#xD;&#xA;Pseudocode for collision detection:&#xD;&#xA;    &#xD;&#xA;    if shape is colliding with bottom of the screen or other blocks:&#xD;&#xA;        undo collision&#xD;&#xA;        if collision was from the bottom:&#xD;&#xA;           add the blocks owned by the shape to the overall block data&#xD;&#xA;           create next shape&#xD;&#xA;&#xD;&#xA;Pseudocode for line check:&#xD;&#xA;&#xD;&#xA;    foreach lines in block data&#xD;&#xA;       if line is filled&#xD;&#xA;          clear line&#xD;&#xA;          move down the blocks above&#xD;&#xA;          give according score to player(depending on the amount of lines cleared with this shape)&#xD;&#xA;&#xD;&#xA;I would call the methods from this class from your Game class.&#xD;&#xA;&#xD;&#xA;This is how I made my own Tetris. As for the standard information for Tetris, I would be interested in finding such information too. If you don't get an appropriate answer from this question, I think you should make a separate question." />
  <row Id="25596" PostHistoryTypeId="2" PostId="11835" RevisionGUID="436d5d5b-acff-46e5-a71c-a090f7614eb3" CreationDate="2011-05-02T03:04:17.893" UserId="5021" Text="There are solutions for this all over the internet, stackoverflow and gamedev.SE.&#xD;&#xA;&#xD;&#xA;Here are a couple of random ones:&#xD;&#xA;&#xD;&#xA; - http://gamedev.stackexchange.com/questions/3841/2d-aabb-collision-response&#xD;&#xA;   &#xD;&#xA; -  http://gamedev.stackexchange.com/questions/586/what-is-the-fastest-way-to-work-out-2d-bounding-box-intersection" />
  <row Id="25597" PostHistoryTypeId="25" PostId="11832" RevisionGUID="64fb98b8-2c84-430c-9140-cf9909a21db4" CreationDate="2011-05-02T03:11:23.600" Comment="http://twitter.com/#!/StackGameDev/status/64889695284367363" />
  <row Id="25598" PostHistoryTypeId="2" PostId="11836" RevisionGUID="c52dfcbb-d7c8-4a4e-9f1a-ca8db800da5c" CreationDate="2011-05-02T03:41:00.160" UserId="5390" Text="This is long, so the short question is: What's the best/right/standard set of technologies for creating 3D models and incorporating them into a game such that the complexity for the artist is kept to a minimum while also keeping things relatively sane for the game authors?&#xD;&#xA;&#xD;&#xA;The long story:&#xD;&#xA;&#xD;&#xA;I am a developer for an open source space game called [Pioneer](http://pioneerspacesim.net/). We currently have a custom 3D model format based around a Lua script that defines how the various objects in the model hang together.&#xD;&#xA;&#xD;&#xA;The existing format has a lot of flexibility. It can load Wavefront objects or build its own from polygon primitives. It has a dynamic function that can emit tailored geometry each frame based on game state. It can also define various attributes and properties such as special collision surfaces, simple waypoints (use for automated docking with a space station), and so forth.&#xD;&#xA;&#xD;&#xA;The feature set is more than enough for what we need right now, but its implementation leaves a lot to be desired. The actual script reader is almost 3000 lines of spaghetti. Model scripts are messy and require too much knowledge of the game engine. Matters are made worse by that fact that the original author is not readily available at the moment, so its left to others with little understanding of this system to fix things. We're also hearing some of users say they can drive a modelling program just fine, but find the required Lua script to be completely incomprehensible. We don't want to turn these contributors away, so we need to find a way to help them.&#xD;&#xA;&#xD;&#xA;(Some examples of model scripts, for the interested, can be found in our [models repository](https://github.com/pioneerspacesim/pioneer/tree/master/data/models)).&#xD;&#xA;&#xD;&#xA;As a result, I'm looking for a replacement. Ideally, I'd like to be able to point interested parties at something like [Blender](http://www.blender.org/), tell them to draw a ship, define a few special properties and then export it, and that'd be that. On the code side, I'd very much like to be able to integrate a good third-party library that I can hand one of these files and just poke an object to get the necessary data back out. Anything that we can shift on to other, more competent projects is a win.&#xD;&#xA;&#xD;&#xA;My question then, is what do use? I've done some searching and the best approach at this point appears to be to require artists to export their model in [COLLADA](https://collada.org/) format and then write a utilty based on [FCollada](https://github.com/fcolladaCE/fcolladaCE) to convert the export to some internal format. That's a little heavier than I think I want, but keeps things as easy as possible for the artist, which is the major requirement.&#xD;&#xA;&#xD;&#xA;I'm very new to world of 3D modelling however, so I wouldn't be at all surprised to learn that there is a better way. Recommendations of standard/best practice for this sort of thing would be greatly appreciated." />
  <row Id="25599" PostHistoryTypeId="1" PostId="11836" RevisionGUID="c52dfcbb-d7c8-4a4e-9f1a-ca8db800da5c" CreationDate="2011-05-02T03:41:00.160" UserId="5390" Text="Replacing a custom 3D model format with something more standard" />
  <row Id="25600" PostHistoryTypeId="3" PostId="11836" RevisionGUID="c52dfcbb-d7c8-4a4e-9f1a-ca8db800da5c" CreationDate="2011-05-02T03:41:00.160" UserId="5390" Text="&lt;3d&gt;&lt;models&gt;&lt;blender&gt;&lt;collada&gt;" />
  <row Id="25601" PostHistoryTypeId="2" PostId="11837" RevisionGUID="17be5e0b-4bf4-4cf8-856c-1fddc8f16257" CreationDate="2011-05-02T04:06:05.530" UserId="7078" Text="Specifically I would like to mess with the idea of giving each bot a specific &quot;personality&quot; so to speak. Open Arena provides this functionality, and I'm assuming that Warsow/Nexiuz (Xonotic?) may provide the same.&#xD;&#xA;&#xD;&#xA;However I remember scouring through Warsow/Nexuiz data files while back and was unable to find anything similar to was OA has. I would like such settings to be stored in plain text configuration, or some similar method that I can use a script to create/edit new profiles, so in that regard, a game that runs in Linux would be preferable as well, but Windows only suggestions still welcome.&#xD;&#xA;&#xD;&#xA;Thanks for any suggestions! :D" />
  <row Id="25602" PostHistoryTypeId="1" PostId="11837" RevisionGUID="17be5e0b-4bf4-4cf8-856c-1fddc8f16257" CreationDate="2011-05-02T04:06:05.530" UserId="7078" Text="Does anybody know any Twitch FPS games that allow you to extensively customize individual bot profiles (OpenArena is one example)" />
  <row Id="25603" PostHistoryTypeId="3" PostId="11837" RevisionGUID="17be5e0b-4bf4-4cf8-856c-1fddc8f16257" CreationDate="2011-05-02T04:06:05.530" UserId="7078" Text="&lt;linux&gt;&lt;first-person-shooter&gt;&lt;bot&gt;" />
  <row Id="25604" PostHistoryTypeId="2" PostId="11838" RevisionGUID="accc481e-6dd2-4e90-a9ce-4dde1ece8725" CreationDate="2011-05-02T04:52:47.467" UserId="3956" Text="I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method)&#xD;&#xA;&#xD;&#xA;How would I retrieve the nth sprite in this group?&#xD;&#xA;&#xD;&#xA;Code like this does not work:&#xD;&#xA;&#xD;&#xA;    mygroup = pygame.sprite.Group(mysprite01)&#xD;&#xA;    print mygroup[n].rect&#xD;&#xA;&#xD;&#xA;It returns the error: group object does not support indexing.&#xD;&#xA;&#xD;&#xA;For the moment I'm using the following function:&#xD;&#xA;&#xD;&#xA;    def getSpriteByPosition(position,group):&#xD;&#xA;        for index,spr in enumerate(group):&#xD;&#xA;            if (index == position):&#xD;&#xA;                return spr&#xD;&#xA;        return False&#xD;&#xA;&#xD;&#xA;Although working, it just doesn't seem right...&#xD;&#xA;&#xD;&#xA;Is there a cleaner way to do this?" />
  <row Id="25605" PostHistoryTypeId="1" PostId="11838" RevisionGUID="accc481e-6dd2-4e90-a9ce-4dde1ece8725" CreationDate="2011-05-02T04:52:47.467" UserId="3956" Text="sprite group doesn't support indexing" />
  <row Id="25606" PostHistoryTypeId="3" PostId="11838" RevisionGUID="accc481e-6dd2-4e90-a9ce-4dde1ece8725" CreationDate="2011-05-02T04:52:47.467" UserId="3956" Text="&lt;sprites&gt;&lt;python&gt;&lt;pygame&gt;" />
  <row Id="25608" PostHistoryTypeId="2" PostId="11840" RevisionGUID="13529e2f-1742-4516-bdc5-7af6b67cf557" CreationDate="2011-05-02T05:31:36.463" UserId="4559" Text="lets say I want to make a **really** simple artillery game something like gorillas for the old qbasic. I don't have any experience in games, just some basic opengl understanding. I want to do this for fun and to learn something. I figured out how to simulate gravity and generate simple terrain and how to do some collision detection. But I have no idea how do they mask out the part of the terrain that is hit with a projectile that leaves a hole in form of a circle. I tried enabling stencil buffer and put a quad which has a circle texture on it expecting to mask out only the circle part, but it masked out the whole quad, I mean it was a rectangle shaped hole and not a circle shaped one. Next i thought maybe some blending will do the trick but I didn't figure it out how. Or should I just draw a poligon with many edges to look like a circle and use that instead (with the stencil buffer)? I'm just curious how it is done. Can someone point me in the right direction?" />
  <row Id="25609" PostHistoryTypeId="1" PostId="11840" RevisionGUID="13529e2f-1742-4516-bdc5-7af6b67cf557" CreationDate="2011-05-02T05:31:36.463" UserId="4559" Text="In an artillery game how do I mask out the part of the terrain that was hit" />
  <row Id="25610" PostHistoryTypeId="3" PostId="11840" RevisionGUID="13529e2f-1742-4516-bdc5-7af6b67cf557" CreationDate="2011-05-02T05:31:36.463" UserId="4559" Text="&lt;opengl&gt;&lt;terrain&gt;" />
  <row Id="25611" PostHistoryTypeId="2" PostId="11841" RevisionGUID="e9f9e966-baca-4fd1-bac9-a30934fdea20" CreationDate="2011-05-02T05:49:51.547" UserId="5160" Text="According to pygame documentation:&#xD;&#xA;&gt;The Sprites in the Group are not ordered, so drawing and iterating the Sprites is in no particular order. &#xD;&#xA;[http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.Group][1]&#xD;&#xA;&#xD;&#xA;I think the best you can do is not to use the Group, and make your own group mechanism.&#xD;&#xA;If you need only ordered update then use [http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.OrderedUpdates][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.Group&#xD;&#xA;  [2]: http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.OrderedUpdates" />
  <row Id="25612" PostHistoryTypeId="2" PostId="11842" RevisionGUID="714ded6a-ccef-4a48-9803-bd547181805f" CreationDate="2011-05-02T05:57:18.717" UserId="656" Text="Mentioned many times on the topic of 3d model loading, [AssImp][1] is a very easy to use library that reads both .blend and COLLADA files as well as many other formats. You can use it to load models directly into your engine or use it as a conversion tool to convert to your own internal format. I think it would be a good library that suits your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://assimp.sourceforge.net/" />
  <row Id="25613" PostHistoryTypeId="25" PostId="11840" RevisionGUID="32aa9edb-9b6d-46c8-9f2c-67219ff139bc" CreationDate="2011-05-02T06:11:23.673" Comment="http://twitter.com/#!/StackGameDev/status/64934994740658176" />
  <row Id="25615" PostHistoryTypeId="2" PostId="11843" RevisionGUID="707da695-93ac-4eb3-b0f4-d5ef783ab934" CreationDate="2011-05-02T06:27:00.987" UserId="2792" Text="I usually keep my own format internally, and a standardised format externally. The artist only sees the standard format and my engine can only load the optimized internal format. This way you won't have to have model loading code in engine, it can all be done in some nice high level language as a compile step. I usually use a existing build system that rebuilds an art folder on demand, will only rebuild changed content.&#xD;&#xA;&#xD;&#xA;**Pros:**&#xD;&#xA;&#xD;&#xA; - High performance loading (data already laid out as engine wants it)&#xD;&#xA; - Separation of code from engine&#xD;&#xA; - Standard format for artists&#xD;&#xA;&#xD;&#xA;**Cons:**&#xD;&#xA;&#xD;&#xA; - Extra step for artists (can be solved with a content pipeline)&#xD;&#xA; - Limited subset of features (but you have to have that anyway)" />
  <row Id="25616" PostHistoryTypeId="2" PostId="11844" RevisionGUID="357b7d81-ee07-4723-99ab-346c6bceb877" CreationDate="2011-05-02T07:56:18.223" UserId="6756" Text="Find a helpful forum and read widely to find your answer." />
  <row Id="25617" PostHistoryTypeId="2" PostId="11845" RevisionGUID="ce933e32-60d3-4bfb-86cd-c8072a42a845" CreationDate="2011-05-02T08:33:47.317" UserId="6961" Text="I am learning 3ds max . I was just wodering if need to build a complete small village with small building , hotels , rooms , then do i need more advanced configuration . i mean how much minimum RAM will be required for to make the walk through of whole village&#xD;&#xA;&#xD;&#xA;I am new bie so i have no idea . i mean do everything has to be in one max file  or i need to make them separate then put in one scene . i am confused" />
  <row Id="25618" PostHistoryTypeId="1" PostId="11845" RevisionGUID="ce933e32-60d3-4bfb-86cd-c8072a42a845" CreationDate="2011-05-02T08:33:47.317" UserId="6961" Text="How much RAM or CPU configuration is required for good rendering" />
  <row Id="25619" PostHistoryTypeId="3" PostId="11845" RevisionGUID="ce933e32-60d3-4bfb-86cd-c8072a42a845" CreationDate="2011-05-02T08:33:47.317" UserId="6961" Text="&lt;rendering&gt;&lt;3dsmax&gt;" />
  <row Id="25620" PostHistoryTypeId="5" PostId="11844" RevisionGUID="ceba0e37-c165-4e51-851b-010462627dee" CreationDate="2011-05-02T08:58:09.810" UserId="6756" Comment="added 426 characters in body; added 2 characters in body" Text="Flat Red Ball have already stated that a compatiable version is on its way. So, I suggest you find another engine; or hack around with VS2010 Ultimate. You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime.&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Find a helpful forum, read widely to find your answer, or seek professional game development advice which probably means paying for it.&#xD;&#xA;" />
  <row Id="25621" PostHistoryTypeId="4" PostId="11803" RevisionGUID="e5cdc8d1-3e01-49a7-a2d1-b66dcd6faff0" CreationDate="2011-05-02T09:01:26.257" UserId="6756" Comment="edited title; added 206 characters in body; added 17 characters in body" Text="Which game engine is compatiable with Visual Studio 2010 Ultimate?" />
  <row Id="25622" PostHistoryTypeId="5" PostId="11803" RevisionGUID="e5cdc8d1-3e01-49a7-a2d1-b66dcd6faff0" CreationDate="2011-05-02T09:01:26.257" UserId="6756" Comment="edited title; added 206 characters in body; added 17 characters in body" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball (and therefore Flat Silver Ball) only seems to work with Visual Studio 2008 or express edition. &#xD;&#xA;You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Which game engine is compatiable with Visual Studio 2010 Ultimate with Silverlight?" />
  <row Id="25623" PostHistoryTypeId="25" PostId="11836" RevisionGUID="999a5ae7-825b-4ef6-b520-6ca12fc30762" CreationDate="2011-05-02T09:11:23.890" Comment="http://twitter.com/#!/StackGameDev/status/64980293806862336" />
  <row Id="25624" PostHistoryTypeId="5" PostId="11836" RevisionGUID="7181b23e-0e4e-461b-80bb-041296570a7d" CreationDate="2011-05-02T09:11:30.673" UserId="5390" Comment="spelling &amp; grammar" Text="This is long, so the short question is: What's the best/right/standard set of technologies for creating 3D models and incorporating them into a game such that the complexity for the artist is kept to a minimum while also keeping things relatively sane for the game authors?&#xD;&#xA;&#xD;&#xA;The long story:&#xD;&#xA;&#xD;&#xA;I am a developer for an open source space game called [Pioneer](http://pioneerspacesim.net/). We currently have a custom 3D model format based around a Lua script that defines how the various objects in the model hang together.&#xD;&#xA;&#xD;&#xA;The existing format has a lot of flexibility. It can load Wavefront objects or build its own from polygon primitives. It has a dynamic function that can emit tailored geometry each frame based on game state. It can also define various attributes and properties such as special collision surfaces, simple waypoints (use for automated docking with a space station), and so forth.&#xD;&#xA;&#xD;&#xA;The feature set is more than enough for what we need right now, but its implementation leaves a lot to be desired. The actual script reader is almost 3000 lines of spaghetti. Model scripts are messy and require too much knowledge of the game engine. Matters are made worse by that fact that the original author is not readily available at the moment, so its left to others with little understanding of this system to fix things. We're also hearing some of our users say they can drive a modelling program just fine, but find the required Lua script to be completely incomprehensible. We don't want to turn these contributors away, so we need to find a way to help them.&#xD;&#xA;&#xD;&#xA;(Some examples of model scripts, for the interested, can be found in our [models repository](https://github.com/pioneerspacesim/pioneer/tree/master/data/models)).&#xD;&#xA;&#xD;&#xA;As a result, I'm looking for a replacement. Ideally, I'd like to be able to point interested parties at something like [Blender](http://www.blender.org/), tell them to draw a ship, define a few special properties and then export it, and that'd be that. On the code side, I'd very much like to be able to integrate a good third-party library that I can hand one of these files and just poke an object to get the necessary data back out. Anything that we can shift on to other, more competent projects is a win.&#xD;&#xA;&#xD;&#xA;My question then, is what to use? I've done some searching and the best approach at this point appears to be to require artists to export their model in [COLLADA](https://collada.org/) format and then write a utilty based on [FCollada](https://github.com/fcolladaCE/fcolladaCE) to convert the export to some internal format. That's a little heavier than I think I want, but keeps things as easy as possible for the artist, which is the major requirement.&#xD;&#xA;&#xD;&#xA;I'm very new to world of 3D modelling however, so I wouldn't be at all surprised to learn that there is a better way. Recommendations of standard/best practice for this sort of thing would be greatly appreciated." />
  <row Id="25626" PostHistoryTypeId="4" PostId="11803" RevisionGUID="26542991-37de-462c-b2a4-039629e145ed" CreationDate="2011-05-02T09:37:51.293" UserId="6756" Comment="edited title" Text="Which game engine is compatiable with Visual Studio 2010 Ultimate and Silverlight?" />
  <row Id="25627" PostHistoryTypeId="2" PostId="11847" RevisionGUID="f46558e6-0e92-4451-9698-4c4b61f6f04e" CreationDate="2011-05-02T09:51:16.113" UserId="6961" Text="I have two options to choose 3ds max or maya. I am not going in commercial line. &#xD;&#xA;&#xD;&#xA;I need to get advice from users which thing i should choose provided i am really not going in character animation . i just want building , landscapes , moving objects etc .&#xD;&#xA;&#xD;&#xA;I have to start , so i think its better to ask" />
  <row Id="25628" PostHistoryTypeId="1" PostId="11847" RevisionGUID="f46558e6-0e92-4451-9698-4c4b61f6f04e" CreationDate="2011-05-02T09:51:16.113" UserId="6961" Text="Should i learn 3ds max or maya" />
  <row Id="25629" PostHistoryTypeId="3" PostId="11847" RevisionGUID="f46558e6-0e92-4451-9698-4c4b61f6f04e" CreationDate="2011-05-02T09:51:16.113" UserId="6961" Text="&lt;3dsmax&gt;&lt;maya&gt;" />
  <row Id="25630" PostHistoryTypeId="2" PostId="11848" RevisionGUID="c0f6b6ed-cf33-42c0-a62f-72561935ff4f" CreationDate="2011-05-02T10:26:12.280" UserId="5904" Text="If you're using WebGL, using the properties of the underlying 'canvas' element from which you created the context from to draw text. Don't make it harder than it needs to be until it needs to be." />
  <row Id="25631" PostHistoryTypeId="2" PostId="11849" RevisionGUID="c8525de5-e0c8-4c3f-aa82-13281241d7f9" CreationDate="2011-05-02T10:27:03.987" UserId="2525" Text="I saw there are quite a number of articles and sample code regarding ball bouncing within a rectangle.&#xD;&#xA;&#xD;&#xA;Is there any articles or sample code regarding **ball bouncing within a polygon**? I try to look into Box2D demo, I can't find one yet." />
  <row Id="25632" PostHistoryTypeId="1" PostId="11849" RevisionGUID="c8525de5-e0c8-4c3f-aa82-13281241d7f9" CreationDate="2011-05-02T10:27:03.987" UserId="2525" Text="Ball bouncing within polygon" />
  <row Id="25633" PostHistoryTypeId="3" PostId="11849" RevisionGUID="c8525de5-e0c8-4c3f-aa82-13281241d7f9" CreationDate="2011-05-02T10:27:03.987" UserId="2525" Text="&lt;collision-detection&gt;&lt;box2d&gt;" />
  <row Id="25634" PostHistoryTypeId="2" PostId="11850" RevisionGUID="25582cca-bc90-4a98-b4e8-16dbfd1a9e1d" CreationDate="2011-05-02T10:41:44.147" UserId="7050" Text="I want to rotate all my gameobjects of 90 degrees. To perform that i need to select all my gameobjects, how can i do that?" />
  <row Id="25635" PostHistoryTypeId="1" PostId="11850" RevisionGUID="25582cca-bc90-4a98-b4e8-16dbfd1a9e1d" CreationDate="2011-05-02T10:41:44.147" UserId="7050" Text="Select all gameobject in unity" />
  <row Id="25636" PostHistoryTypeId="3" PostId="11850" RevisionGUID="25582cca-bc90-4a98-b4e8-16dbfd1a9e1d" CreationDate="2011-05-02T10:41:44.147" UserId="7050" Text="&lt;unity&gt;&lt;objects&gt;" />
  <row Id="25637" PostHistoryTypeId="2" PostId="11851" RevisionGUID="5dcd65a9-56f9-4c17-be8a-80a390a0e05d" CreationDate="2011-05-02T10:46:17.193" UserId="5904" Text="I've noticed you're asking a lot of questions that are getting negative or zero votes, and they seem to be related to modeling. I don't know if it is a language barrier, but people here find your questions difficult to answer or somewhat off-topic.&#xD;&#xA;&#xD;&#xA;To answer the title question directly, a modern CPU with a reasonable amount of RAM, say 1-2GB is more than sufficient. You can always check the modeling program's minimum requirements and go up from there. However, judging by the questions you ask, I think you need to spend less time asking &quot;How much RAM or CPU configuration is required for good rendering&quot;, &quot;Should i learn 3ds max or maya&quot;, &quot;Should i learn 3ds max or maya&quot;, or &quot;How much time it will take to learn 3ds Max&quot;, and just pick something and do it. Don't focus so much on the prerequisites of learning -- cut straight to the learning and doing.&#xD;&#xA;&#xD;&#xA;Truth be told, you can use a Pentium III with a GeForce4 to model a small village if you did it in something like Wings3D. Is it ideal? For most people, probably not. Is it doable? Yes, very likely.&#xD;&#xA;Having a computer with more RAM/faster CPU/&quot;Super3D Package 2011&quot; won't make you better at modeling or learn the skills, which you seem to want to build up.&#xD;&#xA;&#xD;&#xA;It's going to take time, blood, sweat, and tears, not computing hardware, to build a small village. Spend some time learning your programs, reading tutorials, and becoming a master of your modeling environment -- worry about your computer later. I think you'll find mundane (and mostly irrelevant) questions like &quot;one file or many scenes&quot; to be answered as you gain experience with you program of choice. I'd imagine the answers have a lot less to do with computer hardware and more to do with manageability and project scope." />
  <row Id="25638" PostHistoryTypeId="5" PostId="11803" RevisionGUID="2567e14d-ac3e-498d-aeda-34bfd3591b4e" CreationDate="2011-05-02T10:49:32.400" UserId="6756" Comment="added 123 characters in body" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball (and therefore Flat Silver Ball) only seems to work with Visual Studio 2008 or express edition. &#xD;&#xA;You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Which game engine is compatiable with Visual Studio 2010 Ultimate with Silverlight?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;With a bit of hacking, I now have the Flat Silver Ball &quot;template&quot; working in Visual Studio 2010 Ultimate.&#xD;&#xA;" />
  <row Id="25639" PostHistoryTypeId="5" PostId="11844" RevisionGUID="780f3b41-ba26-4971-acef-c229212d8beb" CreationDate="2011-05-02T10:57:41.630" UserId="6756" Comment="added 254 characters in body; added 4 characters in body" Text="Read widely to find your answer and hack around with the Flat Silver Ball &quot;template&quot;.&#xD;&#xA;&#xD;&#xA;First, download the Flat Silver Ball &quot;template&quot; from here: [FlatSilverBallTemplate.zip][1]&#xD;&#xA;&#xD;&#xA;**CAUTION**: This is not exactly a VS2010 template but just a solution file containing a couple of solutions. So, do not try to install it like a *real* template. This can cause you no end of pain.&#xD;&#xA;&#xD;&#xA;Second, ensure that: &#xD;&#xA;&#xD;&#xA;1) You unblock the three library files   &#xD;&#xA;2) Comment out the line `FlatRedBall.Debugging.Debugger.DestroyText();`&#xD;&#xA;&#xD;&#xA;After that, we are ready to use Flat Silver Ball with Visual Studio 2010 Ultimate and Silverlight. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/content/FrbXnaTemplates/2011/April/ZippedTemplates/FlatSilverBallTemplate.zip" />
  <row Id="25640" PostHistoryTypeId="5" PostId="11803" RevisionGUID="82cdac48-db2e-4a76-8f80-61a2124c8afb" CreationDate="2011-05-02T11:01:04.967" UserId="6756" Comment="added 34 characters in body" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball only seems to work with Visual Studio 2008 or express edition. &#xD;&#xA;&#xD;&#xA;You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Which game engine is compatiable with Visual Studio 2010 Ultimate with Silverlight?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;It is compatiable. You just need to use the right &quot;template&quot; and with a bit of hacking, I now have the Flat Silver Ball &quot;template&quot; working in Visual Studio 2010 Ultimate.&#xD;&#xA;" />
  <row Id="25641" PostHistoryTypeId="5" PostId="11844" RevisionGUID="9ee14b2b-df1d-4fa3-9ea2-243859da58f1" CreationDate="2011-05-02T11:03:13.840" UserId="6756" Comment="deleted 1 characters in body" Text="Read widely to find your answer and hack around with the Flat Silver Ball &quot;template&quot;.&#xD;&#xA;&#xD;&#xA;First, download the Flat Silver Ball &quot;template&quot; from here: [FlatSilverBallTemplate.zip][1]&#xD;&#xA;&#xD;&#xA;**CAUTION**: This is not exactly a VS2010 template but just a solution file containing a couple of projects. So, do not try to install it like a *real* template. This can cause you no end of pain.&#xD;&#xA;&#xD;&#xA;Second, ensure that: &#xD;&#xA;&#xD;&#xA;1) You unblock the three library files   &#xD;&#xA;2) Comment out the line `FlatRedBall.Debugging.Debugger.DestroyText();`&#xD;&#xA;&#xD;&#xA;After that, we are ready to use Flat Silver Ball with Visual Studio 2010 Ultimate and Silverlight. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/content/FrbXnaTemplates/2011/April/ZippedTemplates/FlatSilverBallTemplate.zip" />
  <row Id="25642" PostHistoryTypeId="5" PostId="11803" RevisionGUID="79f29fdd-8eb4-455a-ab9c-ebd7bc5a7ccf" CreationDate="2011-05-02T11:08:52.103" UserId="6756" Comment="added 63 characters in body" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball only seems to work with Visual Studio 2008 or express edition. &#xD;&#xA;&#xD;&#xA;You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Which game engine is compatiable with Visual Studio 2010 Ultimate with Silverlight?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I found the solution myself as nothing useful was forthcoming. It is compatiable. You just need to use the right &quot;template&quot; and with a bit of hacking, I now have the Flat Silver Ball &quot;template&quot; working in Visual Studio 2010 Ultimate.&#xD;&#xA;" />
  <row Id="25643" PostHistoryTypeId="2" PostId="11852" RevisionGUID="00c18266-44d5-451c-9a19-49aaa4d0ab1a" CreationDate="2011-05-02T11:09:24.880" UserId="5904" Text="I don't know of any articles, but hopefully you can figure out how to rig it up from these suggestions below:&#xD;&#xA;&#xD;&#xA;If it is a convex polygon, a convex hull is about as simple as it gets while still being a general solution. That topic is extremely well documented and I think every physics library has a &quot;plane&quot; primitive that can be used to build it.&#xD;&#xA;Basically, you have N planes for an N sided figure. Each plane divides space in half, the part in 'front' of the plane, and the part 'behind' it. If you had two planes making an 'X', the area that is in front of *both* forms a 'V'. If you add a *third* plane such that the front faces the inner point of the 'V', you get a closed off area that is ' in front' of all three planes. This is a triangle, and the planes form its convex hull. This extends to N-sided convex polygons fairly easily.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If it is a concave polygon, then things are a bit hairier but still manageable: just use an array of line segments. You can simulate that if a line segment isn't available by having very &quot;thin&quot; rectangles. This would also work for convex polygons, but it isn't as clean or as fast.&#xD;&#xA;&#xD;&#xA;I hope this helps." />
  <row Id="25644" PostHistoryTypeId="2" PostId="11853" RevisionGUID="0ca251b5-7a8f-4ce1-8975-4b05c9c91f98" CreationDate="2011-05-02T11:10:29.963" UserId="7084" Text="I've downloaded [Microsoft Advertising SDK][1] for WP7, added reference to Windows Phone Game project, and now when i'm trying to run the game I get this in Output:&#xD;&#xA;&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'mscorlib.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.Windows.RuntimeHost.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.Windows.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.Xml.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded '\Applications\Install\B2719AD1-5A3C-40BE-A114-7E56C19E22D6\Install\TheGame.dll', Symbols loaded.&#xD;&#xA;    A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll&#xD;&#xA;    The thread '&lt;No Name&gt;' (0xd4b004e) has exited with code 0 (0x0).&#xD;&#xA;    The program '[229048418] taskhost.exe: Managed' has exited with code 0 (0x0).&#xD;&#xA;&#xD;&#xA;if the reference is removed, game launches normally again.&#xD;&#xA;&#xD;&#xA;what might be the possible solution to fix this ?&#xD;&#xA;&#xD;&#xA;Thank You !&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=b0f00afc-9709-4cc2-ba2c-57728db6cbd6" />
  <row Id="25645" PostHistoryTypeId="1" PostId="11853" RevisionGUID="0ca251b5-7a8f-4ce1-8975-4b05c9c91f98" CreationDate="2011-05-02T11:10:29.963" UserId="7084" Text="WP7 emulator + Microsoft.Advertising.Mobile.Xna.dll = 'System.IO.FileLoadException' occurred in mscorlib.dll" />
  <row Id="25646" PostHistoryTypeId="3" PostId="11853" RevisionGUID="0ca251b5-7a8f-4ce1-8975-4b05c9c91f98" CreationDate="2011-05-02T11:10:29.963" UserId="7084" Text="&lt;xna&gt;" />
  <row Id="25647" PostHistoryTypeId="2" PostId="11854" RevisionGUID="8159fd93-ad2d-45ce-9fef-5c6e3b28f7e1" CreationDate="2011-05-02T11:24:16.583" UserId="5904" Text="Judging by the fact that you can arbitrarily choose between two $3500 tools to work with, you're probably pirating them, so I guess the price doesn't really matter. I don't really think it matters which of the two you use -- I'm sure some UIs/workflows will just click better with some than others.&#xD;&#xA;&#xD;&#xA;It seems like you're asking for advice between using a mechanical pencil or a wooden pencil for sketching. I'm sure there are advocates for both who will give you contradictory opinions on why one is better suited than the other for the task. There isn't really a strong reason that I've seen to prefer either of these tools over the other for the task of &quot;just modeling&quot;. You can probably use any number of other tools: Milkshape, Wings3D, Blender, etc.&#xD;&#xA;&#xD;&#xA;Why don't you find tutorials on how to use one tool and follow them -- get a feel for each program. There are trials available from Autodesk for both. In other words, if 10,000 people tell you here &quot;Use 3DS Max&quot; but it just doesn't click with you the way that Maya does, why use 3DS Max? Vice versa for any tools listed. Do what works, and master your tool. Any of them are sufficient to do what you want." />
  <row Id="25648" PostHistoryTypeId="25" PostId="11853" RevisionGUID="c9e5ec08-494b-4580-a2af-7ed60a923923" CreationDate="2011-05-02T12:11:23.457" Comment="http://twitter.com/#!/StackGameDev/status/65025590243246080" />
  <row Id="25649" PostHistoryTypeId="2" PostId="11855" RevisionGUID="eb06c6fb-ace5-4222-975f-f9ae39f1761f" CreationDate="2011-05-02T12:49:40.820" UserId="6588" Text="Neither is really better than the other, so try both and use whichever you prefer. Or rather, go with whichever is most convenient to learn on (eg. one is already installed on computers at your school) because it doesn't make a whole lot of difference.&#xD;&#xA;&#xD;&#xA;For the record, I learned on 3ds Max but later switched to Maya when that became available on Macs. I still consider them about the same however and actually at my current job I use 3ds Max occasionally because that's what they have." />
  <row Id="25650" PostHistoryTypeId="2" PostId="11856" RevisionGUID="7d57e261-6eb4-42a0-9a5a-10f8d1590e22" CreationDate="2011-05-02T13:19:25.527" UserId="4897" Text="Actually making this work is way out of my depth (and it's DX11 and not OpenGL) but I found this article on Bokeh and DOF effects fascinating, and the results look really good :&#xD;&#xA;&#xD;&#xA;[How To Fake Bokeh (And Make It Look Pretty Good)][1]&#xD;&#xA;&#xD;&#xA;There's a follow-up [here][2] too if you're interested.&#xD;&#xA;&#xD;&#xA;Another suggestion would be a good HDR tone-mapping algorithm, for example [from Uncharted 2's John Hable's blog][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mynameismjp.wordpress.com/2011/02/28/bokeh/&#xD;&#xA;  [2]: http://mynameismjp.wordpress.com/2011/04/19/bokeh-ii-the-sequel/&#xD;&#xA;  [3]: http://filmicgames.com/archives/75#more-75" />
  <row Id="25651" PostHistoryTypeId="2" PostId="11857" RevisionGUID="01d555c2-cc7b-404a-b72c-2b0dc7446197" CreationDate="2011-05-02T13:20:08.317" UserId="2792" Text="OpenGL know nothing of fonts, so you have two choices. Either use bitmap fonts (a font written into a texture) or use Canvas/HTML to display your text.&#xD;&#xA;&#xD;&#xA;Most regular OpenGL games uses bitmap fonts." />
  <row Id="25652" PostHistoryTypeId="2" PostId="11858" RevisionGUID="df453141-4ba4-4106-aa4a-0aa5c3c0d056" CreationDate="2011-05-02T13:33:30.780" UserId="744" Text="Since groups are an iterator, you can use:&#xD;&#xA;&#xD;&#xA;    sprs = list(spr_group)&#xD;&#xA;    random.shuffle(sprs)&#xD;&#xA;&#xD;&#xA;You should not rely on Python's hashing order to randomize sprites for you. It is not a good RNG." />
  <row Id="25653" PostHistoryTypeId="2" PostId="11859" RevisionGUID="a56740b1-ccbb-45b4-b40e-a59b37c197a3" CreationDate="2011-05-02T13:37:22.307" UserId="744" Text="What do you need the index for? Since sprites are hashed, the index is not stable; since you can't use it to easily find the sprite again, I don't know why you'd want to store it; and since you can't easily get from a sprite to an index I don't know how you got it in the first place.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you need a reference to a sprite, reference _the sprite itself_, not its index." />
  <row Id="25654" PostHistoryTypeId="2" PostId="11860" RevisionGUID="049e9802-a80e-4b0d-ae1b-c4ecec13a435" CreationDate="2011-05-02T13:42:29.557" UserId="189" Text="To loop over all GameObjects, use the following code:&#xD;&#xA;&#xD;&#xA;JavaScript:&#xD;&#xA;&#xD;&#xA;    for(var gameObj : GameObject in GameObject.FindObjectsOfType(GameObject))&#xD;&#xA;    {&#xD;&#xA;        // modify gameObj.transform.rotation&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;C#:&#xD;&#xA;&#xD;&#xA;    foreach(GameObject gameObj in GameObject.FindObjectsOfType&lt;GameObject&gt;())&#xD;&#xA;    {&#xD;&#xA;        // modify gameObj.transform.rotation&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Also see the manual for [FindObjectsOfType][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/ScriptReference/Object.FindObjectsOfType.html" />
  <row Id="25655" PostHistoryTypeId="2" PostId="11861" RevisionGUID="5aaa0e2d-ef44-492c-be3a-1e389fb1c2bf" CreationDate="2011-05-02T13:51:25.940" UserId="6982" Text="I want to create a 2D map composed of small tiles, that should look like voxels (eg. [this](http://www.youtube.com/watch?v=Bhuhdw_9Hnk) just from side).&#xD;&#xA;&#xD;&#xA;I think I can make a structure like Voxel2D, that have int X, Y and some Color, and every Voxel2D is going to be 5x5 pixels (so multiply X and Y by 5 when drawing). &#xD;&#xA;&#xD;&#xA;But now how should I store the whole map? In a 2D array like classic Tile-map, or is there any faster way? Thank you for your tips and sorry for bad English." />
  <row Id="25656" PostHistoryTypeId="1" PostId="11861" RevisionGUID="5aaa0e2d-ef44-492c-be3a-1e389fb1c2bf" CreationDate="2011-05-02T13:51:25.940" UserId="6982" Text="How to store 2D tile-map" />
  <row Id="25657" PostHistoryTypeId="3" PostId="11861" RevisionGUID="5aaa0e2d-ef44-492c-be3a-1e389fb1c2bf" CreationDate="2011-05-02T13:51:25.940" UserId="6982" Text="&lt;2d&gt;&lt;java&gt;&lt;maps&gt;&lt;voxels&gt;" />
  <row Id="25658" PostHistoryTypeId="2" PostId="11862" RevisionGUID="9b38c5c2-a23f-4ab5-8581-3c99d43a2b95" CreationDate="2011-05-02T14:02:15.757" UserId="189" Text="You can actually find a number of the chapters for free at the [book's website][1].&#xD;&#xA;&#xD;&#xA;Java 3D was a neat API, but has since been &quot;put on hold&quot; in January 2008. It's not looking good, 3 years later and with no apparent progress towards starting up again. I would probably recommend looking into [JMonkeyEngine][2] or [LWJGL][3] instead (the former being closer to Java 3D, with a scene graph, while LWJGL is OpenGL in Java so it'd be more low-level).&#xD;&#xA;&#xD;&#xA;Also it's extremely unfortunate that Java 3D is/was hosted at java.sun.com because the Oracle acquisition messed up some of the webpages. For example, many of the links at the [Wikipedia article for Java 3D][4] are now broken thanks to Oracle. So hopefully you will be able to get to all the downloads and documentation you need; but you might want to check now, before you buy the book!&#xD;&#xA;&#xD;&#xA;Personally, I found Java 3D to be rather neat. I didn't do much with it, but I did buy this book and another about Java 3D in an attempt to learn it. It seems to be a well-made API with similar goals to Java (cross-platform - working on all machine, screen, etc. configurations).&#xD;&#xA;&#xD;&#xA;One last note: there was one Java 3D game I knew of, called [Magicosm][5] (later renamed to Cosm). I was excited about it! But, well, you can read the story on that page. Still, archive.org has [a copy of the old website][6] which explained all the game ideas and progress of the game. So it appears that it is definitely possible to make a game in Java 3D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://fivedots.coe.psu.ac.th/~ad/jg/&#xD;&#xA;  [2]: http://jmonkeyengine.com/&#xD;&#xA;  [3]: http://lwjgl.org/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Java_3D&#xD;&#xA;  [5]: http://www.cosm-game.com/&#xD;&#xA;  [6]: http://replay.web.archive.org/20050205020100/http://www.cosm-game.com/" />
  <row Id="25659" PostHistoryTypeId="5" PostId="11854" RevisionGUID="9060d762-db7e-479a-90a7-5eecf32d789a" CreationDate="2011-05-02T14:03:19.577" UserId="189" Comment="removed hostile pirating comment; don't judge others" Text="Judging by the fact that you can arbitrarily choose between two $3500 tools to work with, I guess the price doesn't really matter. I don't really think it matters which of the two you use -- I'm sure some UIs/workflows will just click better with some than others.&#xD;&#xA;&#xD;&#xA;It seems like you're asking for advice between using a mechanical pencil or a wooden pencil for sketching. I'm sure there are advocates for both who will give you contradictory opinions on why one is better suited than the other for the task. There isn't really a strong reason that I've seen to prefer either of these tools over the other for the task of &quot;just modeling&quot;. You can probably use any number of other tools: Milkshape, Wings3D, Blender, etc.&#xD;&#xA;&#xD;&#xA;Why don't you find tutorials on how to use one tool and follow them -- get a feel for each program. There are trials available from Autodesk for both. In other words, if 10,000 people tell you here &quot;Use 3DS Max&quot; but it just doesn't click with you the way that Maya does, why use 3DS Max? Vice versa for any tools listed. Do what works, and master your tool. Any of them are sufficient to do what you want." />
  <row Id="25660" PostHistoryTypeId="2" PostId="11863" RevisionGUID="9e140eb0-91b9-4c5c-b78c-7f5626156324" CreationDate="2011-05-02T14:22:02.357" UserId="3505" Text="You wouldn't call it voxels when it's 2D, it's just tile based. Array storage should be what you are looking for." />
  <row Id="25661" PostHistoryTypeId="5" PostId="11863" RevisionGUID="f52d01a7-4246-435b-ad0b-44563835093c" CreationDate="2011-05-02T14:55:59.413" UserId="3505" Comment="added 285 characters in body" Text="You wouldn't call it voxels when it's 2D, it's just tile based. Array storage should be what you are looking for.&#xD;&#xA;&#xD;&#xA;Edit: I can't help wondering if there is more to your question than I read, and I don't really get why you choose a 3D game for explaining your idea. Do you just want to be sure that you are working in the right direction or is there something that you don't know how to implement?" />
  <row Id="25662" PostHistoryTypeId="2" PostId="11864" RevisionGUID="14dc8c45-e667-4dc3-93ff-34ac5a046206" CreationDate="2011-05-02T14:59:01.627" UserId="4296" Text="How large is the village?  How many polygons?  How many textures?  There are a lot of details left out.&#xD;&#xA;&#xD;&#xA;Personally, in such a situation, I'd start with simple terrain rendering. Get the land working first.  Second, make a single building.  Get it loaded into the world and placed.  Repeat step 2 until you have a village.  If you're looking at being able to transition inside buildings, then you're opening up a whole new set of issues.  How much detail is inside?  Is a separate loading transition acceptable?  Would a portal system work for that?&#xD;&#xA;&#xD;&#xA;Third, get terrain material transitions working (road-&gt;grass-&gt;dirt)." />
  <row Id="25663" PostHistoryTypeId="25" PostId="11861" RevisionGUID="002a1ce9-a3e3-4e24-aaea-041bd7cbb679" CreationDate="2011-05-02T15:11:23.937" Comment="http://twitter.com/#!/StackGameDev/status/65070891167522816" />
  <row Id="25664" PostHistoryTypeId="5" PostId="11838" RevisionGUID="6c1ab351-0ec2-4cfe-b0ba-9800b9e3e470" CreationDate="2011-05-02T15:55:07.887" UserId="3956" Comment="added 129 characters in body" Text="I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method)&#xD;&#xA;&#xD;&#xA;How would I retrieve the nth sprite in this group?&#xD;&#xA;&#xD;&#xA;Code like this does not work:&#xD;&#xA;&#xD;&#xA;    mygroup = pygame.sprite.Group(mysprite01)&#xD;&#xA;    print mygroup[n].rect&#xD;&#xA;&#xD;&#xA;It returns the error: group object does not support indexing.&#xD;&#xA;&#xD;&#xA;For the moment I'm using the following function:&#xD;&#xA;&#xD;&#xA;    def getSpriteByPosition(position,group):&#xD;&#xA;        for index,spr in enumerate(group):&#xD;&#xA;            if (index == position):&#xD;&#xA;                return spr&#xD;&#xA;        return False&#xD;&#xA;&#xD;&#xA;Although working, it just doesn't seem right...&#xD;&#xA;&#xD;&#xA;Is there a cleaner way to do this?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I mention a &quot;position&quot; and index but it's not important actually, returning any single sprite from the group is enough" />
  <row Id="25665" PostHistoryTypeId="5" PostId="11847" RevisionGUID="c1548564-76b2-4604-b05f-962693a3b819" CreationDate="2011-05-02T16:33:48.553" UserId="1430" Comment="added 21 characters in body; edited title; edited title" Text="I have two options to choose from: 3DS Max or Maya. I am not going into the commercial line. &#xD;&#xA;&#xD;&#xA;I need to get advice from users on which thing I should choose provided I am really not going in to character animation. I just want building, landscapes, moving objects, et cetera.&#xD;&#xA;&#xD;&#xA;I have to start, so I think its better to ask." />
  <row Id="25666" PostHistoryTypeId="4" PostId="11847" RevisionGUID="c1548564-76b2-4604-b05f-962693a3b819" CreationDate="2011-05-02T16:33:48.553" UserId="1430" Comment="added 21 characters in body; edited title; edited title" Text="Should I learn 3DS Max or Maya?" />
  <row Id="25667" PostHistoryTypeId="5" PostId="11850" RevisionGUID="fbf88bf6-53ed-49f7-8759-4cb5231ac611" CreationDate="2011-05-02T16:36:06.557" UserId="1430" Comment="deleted 7 characters in body; edited tags; edited title" Text="I want to rotate all my GameObjects by 90 degrees. To do that I need to select all my GameObjects, how can I do so?" />
  <row Id="25668" PostHistoryTypeId="4" PostId="11850" RevisionGUID="fbf88bf6-53ed-49f7-8759-4cb5231ac611" CreationDate="2011-05-02T16:36:06.557" UserId="1430" Comment="deleted 7 characters in body; edited tags; edited title" Text="Selecting all GameObjects in Unity" />
  <row Id="25669" PostHistoryTypeId="6" PostId="11850" RevisionGUID="fbf88bf6-53ed-49f7-8759-4cb5231ac611" CreationDate="2011-05-02T16:36:06.557" UserId="1430" Comment="deleted 7 characters in body; edited tags; edited title" Text="&lt;unity&gt;" />
  <row Id="25670" PostHistoryTypeId="5" PostId="11861" RevisionGUID="d8a4056d-6320-443f-b9ab-a566b5ada708" CreationDate="2011-05-02T17:44:40.250" UserId="1198" Comment="deleted 58 characters in body" Text="I want to create a 2D map composed of small tiles, that should look like voxels (eg. [this](http://www.youtube.com/watch?v=Bhuhdw_9Hnk) just from side).&#xD;&#xA;&#xD;&#xA;I think I can make a structure like Voxel2D, that have int X, Y and some Color, and every Voxel2D is going to be 5x5 pixels (so multiply X and Y by 5 when drawing). &#xD;&#xA;&#xD;&#xA;But now how should I store the whole map? In a 2D array like classic Tile-map, or is there any faster way?" />
  <row Id="25671" PostHistoryTypeId="5" PostId="11853" RevisionGUID="b56d9a6e-2f57-4bf0-8f5f-8f27567d2acd" CreationDate="2011-05-02T17:46:10.720" UserId="1198" Comment="deleted 25 characters in body; edited body" Text="I've downloaded [Microsoft Advertising SDK][1] for WP7, added reference to Windows Phone Game project, and now when I'm trying to run the game I get this in Output:&#xD;&#xA;&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'mscorlib.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.Windows.RuntimeHost.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.Windows.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded 'System.Xml.dll'&#xD;&#xA;    'taskhost.exe' (Managed): Loaded '\Applications\Install\B2719AD1-5A3C-40BE-A114-7E56C19E22D6\Install\TheGame.dll', Symbols loaded.&#xD;&#xA;    A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll&#xD;&#xA;    The thread '&lt;No Name&gt;' (0xd4b004e) has exited with code 0 (0x0).&#xD;&#xA;    The program '[229048418] taskhost.exe: Managed' has exited with code 0 (0x0).&#xD;&#xA;&#xD;&#xA;If the reference is removed, game launches normally again.&#xD;&#xA;&#xD;&#xA;What might be the possible solution to fix this?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=b0f00afc-9709-4cc2-ba2c-57728db6cbd6" />
  <row Id="25672" PostHistoryTypeId="5" PostId="11806" RevisionGUID="6c3c122e-d96e-4a97-9e7f-8020645bfbff" CreationDate="2011-05-02T17:54:43.973" UserId="1198" Comment="deleted 4 characters in body" Text="I am developing a game card in XNA and C#, and I am wondering if there is any onclick event in XNA for objects. I am trying to make cards move when the player clicks on them. In this project I already have a Sprite class that draws cards Image, but I am a little stuck because I don't know how to use OnClick events or anything like that." />
  <row Id="25673" PostHistoryTypeId="5" PostId="11806" RevisionGUID="c96c2abe-798d-4123-a09d-a2751019ea98" CreationDate="2011-05-02T18:00:45.190" UserId="962" Comment="deleted 33 characters in body; edited title; edited title" Text="I am developing a card game in XNA.&#xD;&#xA;&#xD;&#xA;Is there any onclick event in XNA for objects?&#xD;&#xA;&#xD;&#xA;I am trying to make cards move when the player clicks on them. In this project this is a Sprite class that draws the card, but I am a little stuck because I don't know how to use OnClick events or anything like that." />
  <row Id="25674" PostHistoryTypeId="4" PostId="11806" RevisionGUID="c96c2abe-798d-4123-a09d-a2751019ea98" CreationDate="2011-05-02T18:00:45.190" UserId="962" Comment="deleted 33 characters in body; edited title; edited title" Text="How to handle mouse input in XNA?" />
  <row Id="25675" PostHistoryTypeId="25" PostId="11850" RevisionGUID="c700ba1b-73b7-4b1b-8540-ecd90899add2" CreationDate="2011-05-02T18:11:24.040" Comment="http://twitter.com/#!/StackGameDev/status/65116190497968129" />
  <row Id="25676" PostHistoryTypeId="2" PostId="11865" RevisionGUID="6c9fa3a7-b333-4346-9243-47425c2903cd" CreationDate="2011-05-02T18:38:23.110" UserId="4234" Text="Hey. I'm using Farseer physics engine, but if anyone has an idea on the theory that would be cool. I have a simple rectangle body and would like it to split into two pieces given a starting coordinate (where the bullet enters the object) and ending coordinate (where it exits). Thanks for any help." />
  <row Id="25677" PostHistoryTypeId="1" PostId="11865" RevisionGUID="6c9fa3a7-b333-4346-9243-47425c2903cd" CreationDate="2011-05-02T18:38:23.110" UserId="4234" Text="Splitting an object into two" />
  <row Id="25678" PostHistoryTypeId="3" PostId="11865" RevisionGUID="6c9fa3a7-b333-4346-9243-47425c2903cd" CreationDate="2011-05-02T18:38:23.110" UserId="4234" Text="&lt;c#&gt;&lt;physics&gt;&lt;algorithm&gt;&lt;silverlight&gt;&lt;polygon&gt;" />
  <row Id="25680" PostHistoryTypeId="5" PostId="11865" RevisionGUID="e1d7e0b9-ec35-463d-b2c5-a6b6088b36d2" CreationDate="2011-05-02T19:34:45.193" UserId="962" Comment="deleted 83 characters in body" Text="I'm using Farseer physics engine.&#xD;&#xA;&#xD;&#xA;I have a simple rectangle body and would like it to split into two pieces given a starting coordinate (where the bullet enters the object) and ending coordinate (where it exits)." />
  <row Id="25681" PostHistoryTypeId="2" PostId="11866" RevisionGUID="98bd3e68-89b8-4dd3-a240-d822d1644cd1" CreationDate="2011-05-02T20:27:48.583" UserId="7073" Text="I would add the [python][1] language to the list, with its popular game library [pygame][2].&#xD;&#xA;Python is a vibrant ecosystem, suitable for a huge range of projects, including gaming.&#xD;&#xA;&#xD;&#xA;Pygame has a rapid learning curve and it's excellent to beginning video game programming.&#xD;&#xA;&#xD;&#xA;Happy coding!&#xD;&#xA;Francesco&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.python.org/&#xD;&#xA;  [2]: http://www.pygame.org/news.html" />
  <row Id="25682" PostHistoryTypeId="6" PostId="11837" RevisionGUID="8ad04580-7467-45b5-81df-5d7e32989cf0" CreationDate="2011-05-02T20:40:24.237" UserId="259" Comment="added AI tag" Text="&lt;ai&gt;&lt;linux&gt;&lt;first-person-shooter&gt;&lt;bot&gt;" />
  <row Id="25683" PostHistoryTypeId="2" PostId="11867" RevisionGUID="40265f22-8fa0-4037-a417-fa427b25a4e4" CreationDate="2011-05-02T21:03:04.640" UserId="7052" Text="Games like Ryzom and the Sims allow players to have human bodies with different shapes: wide or thin, tall or short, big noses or small, etc.  It seems to me that it'd be impractical to pre-generate all possible combinations of the meshes.&#xD;&#xA;&#xD;&#xA;What are some ways to do that?  Are the meshes defined programmatically? Is it a weighted average of multiple &quot;morph target&quot; models?&#xD;&#xA;&#xD;&#xA;If there is calculation to be done to determine the mesh: is it done in a &quot;geometry shader&quot;?  Or is it done by the CPU?&#xD;&#xA;&#xD;&#xA;I found this related question: &quot;[How to create art assets for 3d avatar editor][1]&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8349/how-to-create-art-assets-for-a-3d-avatar-editor" />
  <row Id="25684" PostHistoryTypeId="1" PostId="11867" RevisionGUID="40265f22-8fa0-4037-a417-fa427b25a4e4" CreationDate="2011-05-02T21:03:04.640" UserId="7052" Text="What are some ways to implement variable body shapes?" />
  <row Id="25685" PostHistoryTypeId="3" PostId="11867" RevisionGUID="40265f22-8fa0-4037-a417-fa427b25a4e4" CreationDate="2011-05-02T21:03:04.640" UserId="7052" Text="&lt;graphics&gt;&lt;geometry&gt;&lt;procedural&gt;&lt;avatar&gt;" />
  <row Id="25686" PostHistoryTypeId="25" PostId="11865" RevisionGUID="92f51f7a-5b68-4bc9-bfb6-f094c04d86b8" CreationDate="2011-05-02T21:11:24.387" Comment="http://twitter.com/#!/StackGameDev/status/65161489618702336" />
  <row Id="25687" PostHistoryTypeId="5" PostId="11803" RevisionGUID="3d8b2e80-865a-4836-9afb-be4d65429d3c" CreationDate="2011-05-02T21:34:46.950" UserId="6756" Comment="added 89 characters in body; added 1 characters in body; added 130 characters in body; added 120 characters in body; added 68 characters in body" Text="HELLO! THIS IS SOLVED - NO NEED TO KEEP POSTING ON IT AND PRETENDING TO BE HELPFUL!!!! &#xD;&#xA;&#xD;&#xA;I HAVE TRIED DELETING THIS QUESTION BECAUSE OF THE USELESS RESPONSES I HAVE HAD AND EVEN FLAGGED IT FOR MODERATION BUT THE FACT OF THE MATTER IS THIS: http://carnotaurus.tumblr.com/post/5129828035/all-stackexchange-networks-are-not-created-equal&#xD;&#xA;&#xD;&#xA;HERE IS THE QUESTION THAT WAS IGNORED:&#xD;&#xA;&#xD;&#xA;I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball only seems to work with Visual Studio 2008 or express edition. &#xD;&#xA;&#xD;&#xA;You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Which game engine is compatiable with Visual Studio 2010 Ultimate with Silverlight?&#xD;&#xA;&#xD;&#xA;HERE IS THE EDIT THAT WAS IGNORED:&#xD;&#xA;&#xD;&#xA;I found the solution myself as nothing useful was forthcoming. It is compatiable. You just need to use the right &quot;template&quot; and with a bit of hacking, I now have the Flat Silver Ball &quot;template&quot; working in Visual Studio 2010 Ultimate.&#xD;&#xA;" />
  <row Id="25688" PostHistoryTypeId="2" PostId="11868" RevisionGUID="5edf4d62-1093-4d69-8bc0-e280c70e3e7e" CreationDate="2011-05-02T21:51:32.340" UserId="4662" Text="It would have to be done by the CPU- a geometry shader doesn't give the opportunity to save it's results, which would be essential, and not all devices supported by those games support geometry shaders. Achieving it could be as simple as applying a scale matrix to the whole or separate parts.&#xD;&#xA;&#xD;&#xA;Edit: I read your related question. You should really clarify this question to be explicitly about morph target or explicitly about just scaling customization." />
  <row Id="25689" PostHistoryTypeId="2" PostId="11869" RevisionGUID="9c4d4e97-f72a-43c1-a79b-9bafd6638243" CreationDate="2011-05-02T22:17:35.443" UserId="7089" Text="Perhaps a different approach will help:&#xD;&#xA;You're basically after a 'winner' so perhaps a 'ladder' approach used in one-on-one sports might be what you're after. Each choice is a rung on a ladder and adjacent choices can compete, the winner swapping places. This does rely on some kind of initial ordering which could be random.&#xD;&#xA;&#xD;&#xA;eg for C=3 Classes (a, b, c) with S=2 choices and R=5 rounds&#xD;&#xA;&#xD;&#xA;At start: (Top) c-b-c (Bottom)&#xD;&#xA;&#xD;&#xA; 1. a vs b. b wins =&gt; b-a-c&#xD;&#xA; 2. c vs a. c wins =&gt; b-c-a&#xD;&#xA; 3. b vs c. b wins =&gt; b-c-a&#xD;&#xA; 4. c vs a. a wins =&gt; b-a-c (players can be fickle!)&#xD;&#xA; 5. b vs a. b wins =&gt; b-a-c (so b is overall winner!)&#xD;&#xA;&#xD;&#xA;Admittedly the player will likely be presented with some of the same choices more than once, but you don't get a tie and in the example above, 5 rounds should be plenty to get allow the randomly placed bottom Class to 'float' to the top.&#xD;&#xA;&#xD;&#xA;Anyway, hope this helps!" />
  <row Id="25690" PostHistoryTypeId="2" PostId="11870" RevisionGUID="88a988b8-9efd-452d-8a59-602ec5258e7d" CreationDate="2011-05-02T22:35:40.330" UserId="7090" Text="You might also want to check out iSGL3D ([http://isgl3d.com][1]) which is an open source Objective-C iOS scene graph library. &#xD;&#xA;&#xD;&#xA;It works with both OpenGL ES 1.1 and ES 2.0 with a number of features such as simple scene and object manipulation, lighting and shading, cameras, multiple views, meshes and particles, tweening, mesh skinning, vertex animation, shadows, object interactivity, etc.&#xD;&#xA;&#xD;&#xA;It uses a few C++ hooks for external libraries such as Bullet physics and PowerVR POD importing but these are wrapped in Objective-C classes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://isgl3d.com" />
  <row Id="25691" PostHistoryTypeId="2" PostId="11871" RevisionGUID="2db7b54f-5b5d-4573-b75d-2c394c2a3369" CreationDate="2011-05-02T23:05:06.297" UserId="2698" Text="XNA only gives you just enough to build your own input classes.&#xD;&#xA;&#xD;&#xA;Implementing your own mouse class is quite important considering XNA implements the mouse only very loosely (e.g. not even offering a mousebutton enum, like it does for the keyboard and gamepad).&#xD;&#xA;&#xD;&#xA;[This blog post][1] by InnovativeGames describes a trio of excellent input classes for the Mouse, Keyboard and Gamepad which allow you to check the input state either through its methods (e.g. `IsButtonDown`, `IsButtonHeld`, etc) or through events.&#xD;&#xA;&#xD;&#xA;Here's the source code for the mouse class: [MouseDevice.cs][2]&#xD;&#xA;&#xD;&#xA;[1]: http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/&#xD;&#xA;[2]: http://www.innovativegames.net/upload/GameEngineTutorial/6/MouseDevice.cs" />
  <row Id="25692" PostHistoryTypeId="2" PostId="11872" RevisionGUID="8c66b685-33a4-44e4-9b3d-d5e82222ef6d" CreationDate="2011-05-02T23:07:16.113" UserId="5929" Text="This is probably a simple vector question, but I'm not sure how to do it. I have an object at vector position `(ox,oy)`. Potentially every update, the user walks around the screen and is at position `(px,py)` at any given moment. How do I make it so that the object is always facing the player? I need to get the angle in degrees. This is what I'm messing around with, but the direction doesn't immediately point to where the user is facing (it slowly increments in the direction the user is walking in).&#xD;&#xA;&#xD;&#xA;     objVec.Normalize(); &#xD;&#xA;     playerVec.Normalize();&#xD;&#xA;&#xD;&#xA;     obj.Rotation = MathHelper.ToDegrees((float)Math.Acos(Vector2.Dot(objVec, playerVec)));&#xD;&#xA;&#xD;&#xA;I might be going about it completley wrong, so any help is appreciated!" />
  <row Id="25693" PostHistoryTypeId="1" PostId="11872" RevisionGUID="8c66b685-33a4-44e4-9b3d-d5e82222ef6d" CreationDate="2011-05-02T23:07:16.113" UserId="5929" Text="Rotate object to face player" />
  <row Id="25694" PostHistoryTypeId="3" PostId="11872" RevisionGUID="8c66b685-33a4-44e4-9b3d-d5e82222ef6d" CreationDate="2011-05-02T23:07:16.113" UserId="5929" Text="&lt;2d&gt;&lt;c#&gt;&lt;math&gt;&lt;vector&gt;" />
  <row Id="25695" PostHistoryTypeId="2" PostId="11873" RevisionGUID="c205429e-cb02-4fac-8658-1633adb90dd8" CreationDate="2011-05-02T23:17:07.587" UserId="6825" Text="Think about the problem differently. You want to object always to &quot;face&quot; the player, which means you want its &quot;forward&quot; vector rotated around to be parallel to the vector from itself to the player. Assuming its &quot;forward&quot; vector is normally at `obj.Rotation = 0`, the proper rotation is basically the arctangent of `Vector2.Minus(playerPos, objectPos)`. Most math libraries will have something like `atan2` that takes two arguments or a `Vector2` that will automatically figure out the right quadrant for you." />
  <row Id="25696" PostHistoryTypeId="5" PostId="11873" RevisionGUID="620296aa-6c1c-45d0-bf51-b04723ddcecc" CreationDate="2011-05-02T23:24:18.940" UserId="6825" Comment="added more answer" Text="Think about the problem differently. You want to object always to &quot;face&quot; the player, which means you want its &quot;forward&quot; vector rotated around to be parallel to the vector from itself to the player. Assuming its &quot;forward&quot; vector is normally at `obj.Rotation = 0`, the proper rotation is basically the arctangent of `Vector2.Subtract(playerPos, objectPos)`. Most math libraries will have something like `atan2` that takes two arguments or a `Vector2` that will automatically figure out the right quadrant for you.&#xD;&#xA;&#xD;&#xA;EDIT: I realized that you're in C# and these are actually built-in classes. So you don't have to go hunting for math library documentation, I can do so for you. The right code should be:&#xD;&#xA;&#xD;&#xA;    Vector2 facingVec = playerVec - objVec;&#xD;&#xA;    obj.Rotation = MathHelper.ToDegrees((float)Math.Atan2(facingVec.Y, facingVec.X));&#xD;&#xA;&#xD;&#xA;Note the X/Y reversal; for hysterical raisins, Atan2 always has the arguments reversed." />
  <row Id="25697" PostHistoryTypeId="2" PostId="11874" RevisionGUID="c41e90b3-efce-4452-9cc1-ef5fbd7f2cd1" CreationDate="2011-05-02T23:59:06.070" UserId="6825" Text="I'm making an economic kind of game, and one of the things I'm simulating is the transportation of resources to a central depository, e.g. moving metal from a mine to the city (so it can be turned into swords). I want it to behave so that a producer farther away from the city is considerably less efficient, but the player can bring the efficiency back up by assigning additional carters.&#xD;&#xA;&#xD;&#xA;The function I have right now is:&#xD;&#xA;&#xD;&#xA;    efficiencyPercent = 100 - pow(9 * travelTime, 4/3)*pow(2/3, carters)&#xD;&#xA;&#xD;&#xA;However, this doesn't have the behavior I want; carters are too powerful, either because `pow(2/3, carters)` converges to 0 much too fast, or because `pow(9 * travelTime, 4/3)` grows too slowly, or both, I'm not sure. No matter how big `travelTime` is, the player can overcome it by assigning a reasonable number of carters. I want it to work so that modest `travelTime` is defeatable by a reasonable number of carters, but once it gets too high it takes an absolutely incredible number of carters to defeat it.&#xD;&#xA;&#xD;&#xA;What's a better sort of function that will have this behavior? I think I need the inefficiency to be exponential in `travelTime` but I don't know what to do about `carters`. Please help!" />
  <row Id="25698" PostHistoryTypeId="1" PostId="11874" RevisionGUID="c41e90b3-efce-4452-9cc1-ef5fbd7f2cd1" CreationDate="2011-05-02T23:59:06.070" UserId="6825" Text="Need a better function for transportation efficiency" />
  <row Id="25699" PostHistoryTypeId="3" PostId="11874" RevisionGUID="c41e90b3-efce-4452-9cc1-ef5fbd7f2cd1" CreationDate="2011-05-02T23:59:06.070" UserId="6825" Text="&lt;math&gt;&lt;game-mechanics&gt;" />
  <row Id="25700" PostHistoryTypeId="2" PostId="11875" RevisionGUID="be786409-12d5-49bd-bfae-da7e07f7a5a2" CreationDate="2011-05-03T00:09:10.387" UserId="4662" Text="Firstly, you need to simplify your equation. Drop the exponentiation in carters- it's redundant when you already have an exponential increase in the inefficiency resulting from higher travelTime. Once you do that, you only have one variable- the power you raise `9 * travelTime` to- to tweak, and maybe you could tweak the constants, to gain the effect that you want." />
  <row Id="25701" PostHistoryTypeId="25" PostId="11872" RevisionGUID="250eff3b-8f6e-4d18-a86e-2965b4c08993" CreationDate="2011-05-03T00:11:24.833" Comment="http://twitter.com/#!/StackGameDev/status/65206790127763457" />
  <row Id="25702" PostHistoryTypeId="5" PostId="11875" RevisionGUID="120ce5e5-6719-46bb-938a-fe1b43372204" CreationDate="2011-05-03T00:14:56.313" UserId="4662" Comment="added 190 characters in body" Text="Ultimately, I think that you're dramatically over-complicating the situation at hand. You want to achieve a simple effect- resources further away are more expensive. You should aim to reflect this in the simplest way possible- an increase in the cost, either recurring or initial, of obtaining the resource production. Once this is done, then it doesn't matter what you decide to do about stacking carters, because all mines produce the same amount once they're paid for, and you can balance the distance of resources and the power of carters independently." />
  <row Id="25703" PostHistoryTypeId="5" PostId="11874" RevisionGUID="8901f289-412c-45c2-87ee-a411f9560da5" CreationDate="2011-05-03T00:36:27.440" UserId="6825" Comment="more concreteness" Text="I'm making an economic kind of game, and one of the things I'm simulating is the transportation of resources to a central depository, e.g. moving metal from a mine to the city (so it can be turned into swords). I want it to behave so that a producer farther away from the city is considerably less efficient, but the player can bring the efficiency back up by assigning additional carters.&#xD;&#xA;&#xD;&#xA;The function I have right now is:&#xD;&#xA;&#xD;&#xA;    efficiencyPercent = 100 - pow(9 * travelTime, 4/3)*pow(2/3, carters)&#xD;&#xA;&#xD;&#xA;However, this doesn't have the behavior I want; carters are too powerful, either because `pow(2/3, carters)` converges to 0 much too fast, or because `pow(9 * travelTime, 4/3)` grows too slowly, or both, I'm not sure. No matter how big `travelTime` is, the player can overcome it by assigning a reasonable number of carters. I want it to work so that modest `travelTime` is defeatable by a reasonable number of carters, but once it gets too high it takes an absolutely incredible number of carters to defeat it.&#xD;&#xA;&#xD;&#xA;What's a better sort of function that will have this behavior? I think I need the inefficiency to be exponential in `travelTime` but I don't know what to do about `carters`. Please help!&#xD;&#xA;&#xD;&#xA;EDIT: DeadMG suggests that I have combined two effects (effect of travel time &amp; effect of carters) that would be better off separated. I'm not sure I agree, but I'm not sure I disagree either, so I'm restating the question in support of this theory. &#xD;&#xA;&#xD;&#xA;What I'm looking for is some kind of mechanic, involving carters and travel time, with the following behavior:&#xD;&#xA;&#xD;&#xA; - An iron mine can generate iron at a rate dependent on the number of laborers assigned to the mine; for example, 40 miners produce a maximum of 10 iron per month. This is strictly linear and I'm not changing it at this point. No matter how many carters you assign, there should never be a way to convince the mine to provide more than this amount.&#xD;&#xA; - In order to be used, the iron has to be transported to a city. The miners are willing to do this to some extent, but they become less willing the farther they have to carry it. If the mine is right in the middle of town, no carrying is necessary and the miners work at full power; farther away and they are forced to take time off to haul wagons. In the interest of concreteness, the miners shouldn't be willing to carry a significant amount of stuff farther than 5 days away. (I can fiddle with the exact balance later).&#xD;&#xA; - You can assign additional laborers (from the city's pool) as carters, allowing the miners to get on with their proper jobs. Dedicated carters are far better at moving things than miners moonlighting as teamsters. Assigning more carters should have diminishing returns. For concreteness in fiddling with constants, a mine 5-7 days away should be restored to 95% efficiency by roughly 10 carters.&#xD;&#xA; - The farther away the mine is, the more carters it should take to achieve a given efficiency improvement. Mines that are too far away (for concreteness, 14 days or so) should require a completely impractical amount of carters to increase the efficiency to usable levels. Ideally, in this situation the player would rather build a new city, closer to the mine, than assign such an incredible amount of workforce simply to cart things around.&#xD;&#xA;&#xD;&#xA;The formula I have satisfies all of these except the last, which is the one I'm having trouble with. I'm particularly looking for a mechanic that provides all of these features in a &quot;smooth&quot; way, without arbitrary breakpoints or funny corner cases, because I want to be able to change the constants depending on the empire's technology levels." />
  <row Id="25704" PostHistoryTypeId="5" PostId="11874" RevisionGUID="b506793b-4613-4c2c-9916-8f609336b3d2" CreationDate="2011-05-03T00:44:26.593" UserId="6825" Comment="added 270 characters in body" Text="I'm making an economic kind of game, and one of the things I'm simulating is the transportation of resources to a central depository, e.g. moving metal from a mine to the city (so it can be turned into swords). I want it to behave so that a producer farther away from the city is considerably less efficient, but the player can bring the efficiency back up by assigning additional carters.&#xD;&#xA;&#xD;&#xA;The function I have right now is:&#xD;&#xA;&#xD;&#xA;    efficiencyPercent = 100 - pow(9 * travelTime, 4/3)*pow(2/3, carters)&#xD;&#xA;&#xD;&#xA;However, this doesn't have the behavior I want; carters are too powerful, either because `pow(2/3, carters)` converges to 0 much too fast, or because `pow(9 * travelTime, 4/3)` grows too slowly, or both, I'm not sure. No matter how big `travelTime` is, the player can overcome it by assigning a reasonable number of carters. I want it to work so that modest `travelTime` is defeatable by a reasonable number of carters, but once it gets too high it takes an absolutely incredible number of carters to defeat it.&#xD;&#xA;&#xD;&#xA;What's a better sort of function that will have this behavior? I think I need the inefficiency to be exponential in `travelTime` but I don't know what to do about `carters`. Please help!&#xD;&#xA;&#xD;&#xA;EDIT: DeadMG suggests that I have combined two effects (effect of travel time &amp; effect of carters) that would be better off separated. I'm not sure I agree, but I'm not sure I disagree either, so I'm restating the question in support of this theory. &#xD;&#xA;&#xD;&#xA;What I'm looking for is some kind of mechanic, involving carters and travel time, with the following behavior:&#xD;&#xA;&#xD;&#xA; - An iron mine can generate iron at a rate dependent on the number of laborers assigned to the mine; for example, 40 miners produce a maximum of 10 iron per month. This is strictly linear and I'm not changing it at this point. No matter how many carters you assign, there should never be a way to convince the mine to provide more than this amount.&#xD;&#xA; - In order to be used, the iron has to be transported to a city. The miners are willing to do this to some extent, but they become less willing the farther they have to carry it. If the mine is right in the middle of town, no carrying is necessary and the miners work at full power; farther away and they are forced to take time off to haul wagons. In the interest of concreteness, the miners shouldn't be willing to carry a significant amount of stuff farther than 5 days away. (I can fiddle with the exact balance later).&#xD;&#xA; - You can assign additional laborers (from the city's pool) as carters, allowing the miners to get on with their proper jobs. Dedicated carters are far better at moving things than miners moonlighting as teamsters. Assigning more carters should have diminishing returns. For concreteness in fiddling with constants, a mine 5-7 days away should be restored to 95% efficiency by roughly 10 carters.&#xD;&#xA; - The farther away the mine is, the more carters it should take to achieve a given efficiency improvement. Mines that are too far away (for concreteness, 14 days or so) should require a completely impractical amount of carters to increase the efficiency to usable levels. Ideally, in this situation the player would rather build a new city, closer to the mine, than assign such an incredible amount of workforce simply to cart things around.&#xD;&#xA;&#xD;&#xA;The formula I have satisfies all of these except the last, which is the one I'm having trouble with. I'm particularly looking for a mechanic that provides all of these features in a &quot;smooth&quot; way, without arbitrary breakpoints or funny corner cases, because I want to be able to change the constants depending on the empire's technology levels. Whether this is two separate formulae as DeadMG suggests, or a single combined one like I have now, or any other kind of mechanic, I don't care. Any suggestion, up to and including the simulation of little carter automata moving around the map, is what I'm looking for." />
  <row Id="25705" PostHistoryTypeId="5" PostId="11800" RevisionGUID="0b9a38ee-5c32-42b4-85d4-216c6274c58a" CreationDate="2011-05-03T00:56:30.240" UserId="7058" Comment="added 100 characters in body" Text="I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find out with which side the player is colliding. So if they move left, I want to know that if they collide with a square, and with which side they collide with it.&#xD;&#xA;&#xD;&#xA;Edit: Basically, what I want to know is how to find out which face the player is colliding with." />
  <row Id="25706" PostHistoryTypeId="2" PostId="11876" RevisionGUID="b779a1d2-f827-45f8-9c29-6ec230660a4c" CreationDate="2011-05-03T02:08:59.150" UserId="2472" Text="I had started an economic model for one of my games, and wanted distances between factories and towns to matter.  I tried to model the person's commuting and working hours.  Suppose they're willing to work+commute 12 hours in a day and have 4 hours leisure/eating and 8 hours sleep. Some of that 12 hours goes into the commute to work and some of it goes into actual work. The farther you are from town, the more goes into the commute. There's a hard cutoff at 12 hours of commute time — you just don't get any work done anymore.&#xD;&#xA;&#xD;&#xA;    time_worked = 12 - time_commuting&#xD;&#xA;&#xD;&#xA;and then&#xD;&#xA;&#xD;&#xA;    time_to_complete_job = constant / (12 - time_commuting)&#xD;&#xA;&#xD;&#xA;If you plot this on a graph you'll see it's reasonable for the first 6 hours commute time (any factory within 3 hours of the town is the same efficiency) but then it starts going up after that, and it's twice as expensive around 9 hours commute time, and starts going up very quickly.  At 12 hours it goes to infinity.  That corresponds to your 14 days = impractical.&#xD;&#xA;&#xD;&#xA;I don't know if this behaves the way you want but given that you have some distance you want to be impractical, I think this type of function probably gives you better results than pow().&#xD;&#xA;" />
  <row Id="25707" PostHistoryTypeId="5" PostId="11867" RevisionGUID="a1649b43-8aad-41fe-adf9-00765a9b0676" CreationDate="2011-05-03T02:27:07.450" UserId="7052" Comment="added 103 characters in body" Text="Games like Ryzom and the Sims allow players to have human bodies with different shapes: wide or thin, tall or short, big noses or small, etc.  It seems to me that it'd be impractical to pre-generate all possible combinations of the meshes.&#xD;&#xA;&#xD;&#xA;What are some ways to do that?  Are the meshes defined programmatically? Is it a weighted average of multiple &quot;morph target&quot; models?&#xD;&#xA;&#xD;&#xA;If there is calculation to be done to determine the mesh: is it done in a &quot;geometry shader&quot;?  Or is it done by the CPU?&#xD;&#xA;&#xD;&#xA;Reference: The question &quot;[How to create art assets for 3d avatar editor][1]&quot; mentioned avatar editors and variable body elements, and that some games use morph targets and glyph bombing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8349/how-to-create-art-assets-for-a-3d-avatar-editor" />
  <row Id="25708" PostHistoryTypeId="25" PostId="11867" RevisionGUID="fc30b786-d8be-4f63-a3ab-43e06d8a89d0" CreationDate="2011-05-03T03:11:24.687" Comment="http://twitter.com/#!/StackGameDev/status/65252088799707136" />
  <row Id="25709" PostHistoryTypeId="2" PostId="11877" RevisionGUID="116bd67c-46c6-4ea7-ab4b-44c46e45f99d" CreationDate="2011-05-03T03:29:37.293" UserId="7032" Text="&#xD;&#xA;This question really depends on what game you are targeting.  It's very specific to the engine and platform.  So, that would be more of a question for your programmer buddy than anyone.  Is it his own game engine or 3rd party?  Either way, he should know A) the formats used or preferred and B) the &quot;requirements&quot; of the system and C) any special cases such as max polygon count, textures sizes/foramts,  animations, etc.&#xD;&#xA;&#xD;&#xA;Generally speaking, you will want to work with whatever format that works best for you (as the artist).  Once you have a finished model, you'll want to give that to your development team.  They will compile that offline into an optimized format/textures that works best with their engine.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25710" PostHistoryTypeId="2" PostId="11878" RevisionGUID="45dbd6cf-ea2d-4dc4-9295-43fba300cad5" CreationDate="2011-05-03T03:45:04.710" UserId="7032" Text="&#xD;&#xA;You can write a game engine in practically any language using practically any methods of rendering.  You could write a game engine in bash using console output for example.&#xD;&#xA;&#xD;&#xA;So, I think it would be best to define what exactly you want to learn in writing your own engine.  There are a lot of &quot;fields&quot; in game development.&#xD;&#xA;&#xD;&#xA;* Core Game Engine &#xD;&#xA;&#xD;&#xA;* Rendering / Graphics&#xD;&#xA;&#xD;&#xA;* AI&#xD;&#xA;&#xD;&#xA;* Networking&#xD;&#xA;&#xD;&#xA;* Game Play/Rules&#xD;&#xA;&#xD;&#xA;* Sound&#xD;&#xA;&#xD;&#xA;* Input (keyboard/mouse/controllers, etc)&#xD;&#xA;&#xD;&#xA;etc..  From there you can even have sub topics.  In Rendering/Graphics&#xD;&#xA;&#xD;&#xA;* 2d or 3d ?&#xD;&#xA;&#xD;&#xA;* Modeling&#xD;&#xA;&#xD;&#xA;* Shading&#xD;&#xA;&#xD;&#xA;* Lighting&#xD;&#xA;&#xD;&#xA;* Texturing&#xD;&#xA;&#xD;&#xA;* GUIs/Huds/Interfaces.&#xD;&#xA;&#xD;&#xA;* etc, etc&#xD;&#xA;&#xD;&#xA;Just one of those sub-sub-topics could eat up many hours (or years!) of study!&#xD;&#xA;&#xD;&#xA;So, first define what you want to learn.  Start simple.  &#xD;&#xA;&#xD;&#xA;Use whatever langue you are comfortable with - though some are better suited for certain tasks.  For example, the core engine and rendering is probably best done in &quot;lower&quot; level language like C/C++ (if you need performance that is); but something like AI or Game Rules might be better to do in a higher level language. Nothing says you can't mix and match.  You could write your engine in C++, your rendering in C (since it works well with OpenGL) and then use LUA for scripting your Game Rules, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As far as example, there is a game engine called Slick2D.  It's written in Java and Open Source.  It's an example of a simple 2d engine written and designed really well.  You can learn basic concepts from that, like game loops, managing game states, etc.&#xD;&#xA;&#xD;&#xA;If your comfortable with C/C++; I would suggest taking a look at SDL/OpenGL.  It handles some of the housekeeping like input, sound, creating windows, etc and can focus on other stuff.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25711" PostHistoryTypeId="2" PostId="11879" RevisionGUID="0bb3b575-3460-44d7-87a6-a39281260657" CreationDate="2011-05-03T04:34:07.413" UserId="5904" Text="Use fog coordinates. http://www.opengl.org/registry/doc/fog_coord.txt&#xD;&#xA;&#xD;&#xA;Normally, the fog value is computed using a distance factor from eye to the pixel 'c'. In effect, the fog density is a function of distance. &#xD;&#xA;&#xD;&#xA;f = exp(-d*c)       -- GL_EXP2 &lt;br /&gt;&#xD;&#xA;f = exp(-(d*c)^2)   -- GL_EXP &lt;br /&gt;&#xD;&#xA;f = (e-c)/(e-s)     -- GL_LINEAR &lt;br /&gt;&#xD;&#xA;&#xD;&#xA;Fog coordinates allow you to set the 'c' value of the equation and specify values directly for this. If you want to set up fogging so that 0 -&gt; no fog, 1.0 -&gt; most fog, then do:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;glFogi(GL_FOG_MODE,GL_LINEAR);&#xD;&#xA;glFogf(GL_FOG_START, 0.0f);&#xD;&#xA;glFogf(GL_FOG_END, 1.0f);&#xD;&#xA;&#xD;&#xA;//This actually enables the &quot;fog coordinate&quot; mode&#xD;&#xA;glFogi(FOG_COORDINATE_SOURCE_EXT, FOG_COORDINATE_EXT);&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Then, when you render your person, use glFogCoordfEXT()&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;//Show fog (some value between 0.0 - 1.0f)&#xD;&#xA;glFogCoordfEXT(1.0f);&#xD;&#xA;&#xD;&#xA;renderPerson();&#xD;&#xA;&#xD;&#xA;//No fog&#xD;&#xA;glFogCoordfEXT(0.0f);&#xD;&#xA;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Edit: An extensionless alternative is to disable fog when rendering everything, then enable fog with appropriate start/end distances when rendering your character." />
  <row Id="25712" PostHistoryTypeId="2" PostId="11880" RevisionGUID="903c1f24-f41d-48c5-89b0-e0f129b80aec" CreationDate="2011-05-03T04:52:30.867" UserId="6970" Text="I am a beginner-intermediate C++/Java programmer and my long term goal is to be a game programmer.&#xD;&#xA;&#xD;&#xA;I have decided to start off with 2D and work my way towards 3D.&#xD;&#xA;&#xD;&#xA;I would like to use SDL to start off with, but I am wondering if it is maybe not such a great idea. &#xD;&#xA;&#xD;&#xA;Given the fact that I am working towards 3D, would it be advisable to use SDL or jump into OpenGL without the Z axis?" />
  <row Id="25713" PostHistoryTypeId="1" PostId="11880" RevisionGUID="903c1f24-f41d-48c5-89b0-e0f129b80aec" CreationDate="2011-05-03T04:52:30.867" UserId="6970" Text="Working towards going 3D" />
  <row Id="25714" PostHistoryTypeId="3" PostId="11880" RevisionGUID="903c1f24-f41d-48c5-89b0-e0f129b80aec" CreationDate="2011-05-03T04:52:30.867" UserId="6970" Text="&lt;opengl&gt;&lt;c++&gt;&lt;sdl&gt;" />
  <row Id="25715" PostHistoryTypeId="2" PostId="11881" RevisionGUID="002ebaba-7ec3-44f5-8ae4-68f2f58910ae" CreationDate="2011-05-03T05:13:18.377" UserId="51" Text="Just use SDL.  You can use OpenGL with the SDL when you want to transition over.&#xD;&#xA;&#xD;&#xA;http://www.libsdl.org/docs/html/guidevideoopengl.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25716" PostHistoryTypeId="2" PostId="11882" RevisionGUID="984832fe-2b2d-4587-a7e9-94ee6452ebf0" CreationDate="2011-05-03T05:42:20.337" UserId="2792" Text="OpenGL is used quite a lot for 2D games. We used it in [Teeworlds][1] for example. Using it as a pure 2D language is ok, it might give you some quirks when setting up camera and especially if you want stuff pixel perfect. But you will learn a lot by doing it.&#xD;&#xA;&#xD;&#xA;You can use OpenGL with SDL, it's very common. Most people doing it that way only uses GL though, and skips most (all?) of SDL:s drawing functions.&#xD;&#xA;&#xD;&#xA;  [1]: http://teeworlds.com" />
  <row Id="25717" PostHistoryTypeId="25" PostId="11880" RevisionGUID="6177dd19-9ea7-4281-9da9-f35ee0a13d02" CreationDate="2011-05-03T06:11:24.513" Comment="http://twitter.com/#!/StackGameDev/status/65297385617752064" />
  <row Id="25718" PostHistoryTypeId="2" PostId="11883" RevisionGUID="8ec708ce-db0d-4eaf-9e9f-1a31f6c847ac" CreationDate="2011-05-03T06:17:40.077" UserId="5073" Text="I Did This By following simple if Condition It was looking hard to Me As I am new to the Box2D FrameWork &#xD;&#xA;&#xD;&#xA;    if (location.y&lt;240.00)&#xD;&#xA;	{&#xD;&#xA;		b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA;		_mouseJoint-&gt;SetTarget(locationWorld);	&#xD;&#xA;	}&#xD;&#xA;" />
  <row Id="25719" PostHistoryTypeId="2" PostId="11884" RevisionGUID="fc86804c-2352-4b44-b07c-ea5cea81d2a1" CreationDate="2011-05-03T06:27:38.550" UserId="5073" Text="Hi friend I can't find the tutorials of  joints class in the Box2D for  i phone  &#xD;&#xA;I also unable to run a Testbed for  i phone Box2D  &#xD;&#xA;&#xD;&#xA; help Is Appreciated &#xD;&#xA;thank you in Advance" />
  <row Id="25720" PostHistoryTypeId="1" PostId="11884" RevisionGUID="fc86804c-2352-4b44-b07c-ea5cea81d2a1" CreationDate="2011-05-03T06:27:38.550" UserId="5073" Text="Looking for the reference tutorials for the joints in the Box2D for iphone" />
  <row Id="25721" PostHistoryTypeId="3" PostId="11884" RevisionGUID="fc86804c-2352-4b44-b07c-ea5cea81d2a1" CreationDate="2011-05-03T06:27:38.550" UserId="5073" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;&lt;physics-engine&gt;" />
  <row Id="25722" PostHistoryTypeId="2" PostId="11885" RevisionGUID="23848c31-8577-4351-9643-12752f46b90e" CreationDate="2011-05-03T07:50:40.303" UserId="2050" Text="I tend to say 'if you can't find an explicit solution, seek an implicit one' (compare my anwer to [this question][1]).&#xD;&#xA;&#xD;&#xA;Have you thought about simulating miners, carters and stockpiles as agents? &#xD;&#xA;&#xD;&#xA;Taking your example numbers, you could go like this: A miner mines .25 units of iron in 30 days (i assume uniform month-length for the sake of brevity). If this miner has to push a cart across the country, he can not mine, so for a five-day-trip, he is out of the mine for 10 days (five days to there, five days back again), so there is your inefficency. So, let the miners mine to a stockpile at the mine.&#xD;&#xA;&#xD;&#xA;Let a cart have a limited maximum load, eg 2 units. A carter needs the same 10 days for a round trip, picking up up to 2 units of iron at the main after five days. A single carter would thus be able to pick up 6 units of iron from the mine per month (3 trips of 10 days with a load of 2 units each). A second carter could then be assigend to pick up the rest of the iron mined, but he might have to go back (half)empty or wait for the miners if there isn't enough iron in the stockpile to fill his cart.&#xD;&#xA;&#xD;&#xA;Essentially, this would be like the gathering logic in RTS-games, without the fancy graphics.&#xD;&#xA;&#xD;&#xA;The implementation depends on the granularity of your game. As you didn't mention it in your question i assume a turn based approach, with one turn being one month - so you would have to simulate 30 days of mining and carting for each turn.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/6262/calculating-the-output-of-two-armies-fighting/6264#6264" />
  <row Id="25723" PostHistoryTypeId="25" PostId="11874" RevisionGUID="293842c4-a65d-4eaa-bc8b-1752d4d0f846" CreationDate="2011-05-03T09:11:24.493" Comment="http://twitter.com/#!/StackGameDev/status/65342684449083392" />
  <row Id="25724" PostHistoryTypeId="5" PostId="11646" RevisionGUID="c5e14fb4-1f5e-4516-a2e7-c0bbf79cfb70" CreationDate="2011-05-03T09:24:43.580" UserId="6957" Comment="grammar" Text="@Toji, the site the paper is on is a bit temperamental but it worked for me this morning. Failing that, if you have access to ACM/SIGGRAPH, it's hosted [here][1]. Strangely, it *was* also on the IMG/PowerVR developer website (free registration) but I can't seem to find the right section. :-(&#xD;&#xA;&#xD;&#xA;[UPDATE] It is still on the IMG site [here][3][/UPDATE]&#xD;&#xA;&#xD;&#xA;@bmcnet: PVRTC does not break the texture into blocks like, say, ETC or S3TC. FWIW, I did experiment with block-based textures but I couldn't find a way to pack enough data into self-contained blocks and still get the results I wanted. Instead, it's a bit more of a 'global' texture compression system. It has 2 low resolution images which it bilinearly upscales to the target res, and then mixes these together on a texel-by-texel basis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://portal.acm.org/citation.cfm?id=844174.844187&amp;coll=DL&amp;dl=GUIDE&amp;CFID=19686367&amp;CFTOKEN=74181114&#xD;&#xA;  [3]: http://www.imgtec.com/downloads.asp#WhitePapers" />
  <row Id="25725" PostHistoryTypeId="2" PostId="11886" RevisionGUID="240cbd62-8657-4d55-8663-0fb80053f66e" CreationDate="2011-05-03T09:50:58.517" UserId="7094" Text="I'm trying to write a short &quot;game&quot; where a player goes around and fights monsters but I have no idea how to handle the combat.&#xD;&#xA;&#xD;&#xA;For example, say I have a &quot;Warrior&quot; and a &quot;Troll&quot;. How do the two fight each other? I know I can do something like&#xD;&#xA;&#xD;&#xA;Conan = Warrior.new();&#xD;&#xA;CaveTroll = Troll.new();&#xD;&#xA;Conan.attack(CaveTroll);&#xD;&#xA;CaveTroll.attack(Conan);&#xD;&#xA;But what part of the game controls the monster? Do I just stick the above sequence in a loop until one of them dies? Or does the game &quot;engine&quot; need to have a part that deals specifically with combat? Or is this an aspect of the Troll's artificial intelligence that needs to take care of it's actions?&#xD;&#xA;&#xD;&#xA;Also, who/what determines the actions that the monster takes? Maybe a Troll can bash, kick, bite, cast spells, drink potions, use a magical item. Does the game engine determine what action the Troll takes or is that something the Troll class manages?&#xD;&#xA;&#xD;&#xA;Sorry I can't be more specific but I need some guidance on which direction to go with this. Please help!" />
  <row Id="25726" PostHistoryTypeId="1" PostId="11886" RevisionGUID="240cbd62-8657-4d55-8663-0fb80053f66e" CreationDate="2011-05-03T09:50:58.517" UserId="7094" Text="Programming the combat sequence in a role playing game" />
  <row Id="25727" PostHistoryTypeId="3" PostId="11886" RevisionGUID="240cbd62-8657-4d55-8663-0fb80053f66e" CreationDate="2011-05-03T09:50:58.517" UserId="7094" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;gameloop&gt;" />
  <row Id="25728" PostHistoryTypeId="5" PostId="11886" RevisionGUID="6d1908b8-7a88-4a5d-8961-00f2d0da1ee6" CreationDate="2011-05-03T09:57:45.387" UserId="7094" Comment="added 18 characters in body" Text="I'm trying to write a short &quot;game&quot; where a player goes around and fights monsters but I have no idea how to handle the combat.&#xD;&#xA;&#xD;&#xA;For example, say I have a &quot;Warrior&quot; and a &quot;Troll&quot;. How do the two fight each other? I know I can do something like&#xD;&#xA;&#xD;&#xA;    Conan = Warrior.new();&#xD;&#xA;    CaveTroll = Troll.new();&#xD;&#xA;    Conan.attack(CaveTroll);&#xD;&#xA;    CaveTroll.attack(Conan);&#xD;&#xA;&#xD;&#xA;But what part of the game controls the monster? Do I just stick the above sequence in a loop until one of them dies? Or does the game &quot;engine&quot; need to have a part that deals specifically with combat? Or is this an aspect of the Troll's artificial intelligence that needs to take care of it's actions?&#xD;&#xA;&#xD;&#xA;Also, who/what determines the actions that the monster takes? Maybe a Troll can bash, kick, bite, cast spells, drink potions, use a magical item. Does the game engine determine what action the Troll takes or is that something the Troll class manages?&#xD;&#xA;&#xD;&#xA;Sorry I can't be more specific but I need some guidance on which direction to go with this. Please help!" />
  <row Id="25729" PostHistoryTypeId="5" PostId="11803" RevisionGUID="f09f80e1-1498-4ca8-83bf-280919ae16c5" CreationDate="2011-05-03T10:46:25.843" UserId="6756" Comment="deleted 386 characters in body; deleted 41 characters in body" Text="I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball only seems to work with Visual Studio 2008 or express edition. &#xD;&#xA;&#xD;&#xA;You will receive &quot;You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime&quot; when you try to add this reference to a Silverlight Navigation Application.&#xD;&#xA;&#xD;&#xA;Which game engine is compatiable with Visual Studio 2010 Ultimate with Silverlight, if not Flat Red Ball?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I found the solution. It is compatiable. You just need to use the right &quot;template&quot; and with a bit of hacking, I now have the Flat Silver Ball &quot;template&quot; working in Visual Studio 2010 Ultimate.&#xD;&#xA;" />
  <row Id="25730" PostHistoryTypeId="2" PostId="11887" RevisionGUID="055e505f-ea81-4538-a7dd-ae51f8a7b6d4" CreationDate="2011-05-03T11:41:01.757" UserId="5508" Text="I imagine a battle sequence as a minigame within your game. Update ticks (or turn ticks) are directed to a component handling these events.&#xD;&#xA;&#xD;&#xA;    class BattleSequence {&#xD;&#xA;        public:&#xD;&#xA;            BattleSequence(Entity player, Entity enemy);&#xD;&#xA;            void HandleTurn();&#xD;&#xA;            bool battleFinished();&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity currentlyAttacking;&#xD;&#xA;            Entity currentlyReceiving;&#xD;&#xA;            bool finished;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your Troll and Warrior both inherit from a common superclass called Entity. Within HandleTurn, the attacking entity is allowed to move. This is equivalent to an AI think routine.&#xD;&#xA;&#xD;&#xA;    void HandleTurn() {&#xD;&#xA;        // Perform turn actions&#xD;&#xA;        currentlyAttacking.fight(currentlyReceiving);&#xD;&#xA;&#xD;&#xA;        // Switch sides&#xD;&#xA;        Entity temp = currentlyAttacking;&#xD;&#xA;        currentlyAttacking = currentlyReceiving;&#xD;&#xA;        currentlyReceiving = temp;&#xD;&#xA;&#xD;&#xA;        // Battle end condition&#xD;&#xA;        if (currentlyReceiving.isDead() || currentlyAttacking.hasFled()) {&#xD;&#xA;            finished = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fight method decides what the entity is going to do. Note that this does not need to involve the opposing entity, like drinking a potion or running away.&#xD;&#xA;&#xD;&#xA;This approach encapsulates the battle sequence logic and enemy specific logic in their respective classes, leaving your main game loop free to transition between game states." />
  <row Id="25731" PostHistoryTypeId="2" PostId="11888" RevisionGUID="3c44c8ce-af1c-4122-bc98-4ce692226bf3" CreationDate="2011-05-03T11:47:01.173" UserId="18" Text="I would have a dedicated Combat object that manages combat. It'd encapsulate the full combat state including things such as the list of player characters, list of enemies, current turn, battle terrain, and so on. Combat can then have an update method which manages the battle logic. It's not a good idea to just put the combat code in a simple loop, because it'd end really fast. Normally you'd have some timing and different battle stages.&#xD;&#xA;&#xD;&#xA;For the actions taken, you can certainly just make it random, but it'd make little sense for a monster with full HP to cast a healing spell. It pays to have some basic logic for determining which action to take. For example, some actions could have more priority than others (e.g. troll kicks 30% of the time), as well as other conditions to make battles more interesting (e.g. when troll HP is less than 10% of full HP, there's a 20% chance of casting healing spell, otherwise the chance is 1%). This could be as complex as you like.&#xD;&#xA;&#xD;&#xA;I think the monster class should handle selecting what action to make, the battle object asks the monster for an action and the monster makes a choice and then proceeds to apply it. One idea is to have a strategy object that you plug into monsters and which selects from the list of possible monster actions based on priorities, categories, and conditions assigned to each battle action. Then you can have a OffensiveStrategy class for example which prioritizes attacks over defensive skills, and another CautiousStrategy which is more likely to heal. A boss might be able to dynamically change strategy based on its current condition.&#xD;&#xA;&#xD;&#xA;One last thing. You might want to either have both player characters and monsters inherit from the same class, be instances of the same class (actor or combatant for example), or share a common object that encapsulates the common functionality. This reduces code duplication and it'd also allow you to have AI-controlled NPCs on your side which can implement the same strategies you already coded for monsters." />
  <row Id="25732" PostHistoryTypeId="5" PostId="11887" RevisionGUID="8a163cb2-5c88-439b-8337-ebfe513dfb60" CreationDate="2011-05-03T11:48:32.860" UserId="5508" Comment="added 573 characters in body" Text="I imagine a battle sequence as a minigame within your game. Update ticks (or turn ticks) are directed to a component handling these events. This approach encapsulates the battle sequence logic in a separate class, leaving your main game loop free to transition between game states.&#xD;&#xA;&#xD;&#xA;    void gameLoop() {&#xD;&#xA;        while(gameRunning) {&#xD;&#xA;            if (state == EXPLORATION) {&#xD;&#xA;                // Perform actions for when player is simply walking around&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_BATTLE) {&#xD;&#xA;                // Perform actions for when player is in battle&#xD;&#xA;                currentBattle.HandleTurn()&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_DIALOGUE) {&#xD;&#xA;                // Perform actions for when player is talking with npcs&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The battle sequence class would look like this:&#xD;&#xA;&#xD;&#xA;    class BattleSequence {&#xD;&#xA;        public:&#xD;&#xA;            BattleSequence(Entity player, Entity enemy);&#xD;&#xA;            void HandleTurn();&#xD;&#xA;            bool battleFinished();&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity currentlyAttacking;&#xD;&#xA;            Entity currentlyReceiving;&#xD;&#xA;            bool finished;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your Troll and Warrior both inherit from a common superclass called Entity. Within HandleTurn, the attacking entity is allowed to move. This is equivalent to an AI think routine.&#xD;&#xA;&#xD;&#xA;    void HandleTurn() {&#xD;&#xA;        // Perform turn actions&#xD;&#xA;        currentlyAttacking.fight(currentlyReceiving);&#xD;&#xA;&#xD;&#xA;        // Switch sides&#xD;&#xA;        Entity temp = currentlyAttacking;&#xD;&#xA;        currentlyAttacking = currentlyReceiving;&#xD;&#xA;        currentlyReceiving = temp;&#xD;&#xA;&#xD;&#xA;        // Battle end condition&#xD;&#xA;        if (currentlyReceiving.isDead() || currentlyAttacking.hasFled()) {&#xD;&#xA;            finished = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fight method decides what the entity is going to do. Note that this does not need to involve the opposing entity, like drinking a potion or running away." />
  <row Id="25733" PostHistoryTypeId="25" PostId="11886" RevisionGUID="85c6e105-91c7-4bfb-bcc7-74fd2ba28050" CreationDate="2011-05-03T12:11:24.550" Comment="http://twitter.com/#!/StackGameDev/status/65387983615954944" />
  <row Id="25734" PostHistoryTypeId="5" PostId="11871" RevisionGUID="073047bf-b8b3-4895-8ab3-6f36ec2fb761" CreationDate="2011-05-03T13:25:13.520" UserId="2698" Comment="Reapproached the content of the post." Text="XNA only gives you just enough to build your own input classes - and you should do so considering the utility they offer.&#xD;&#xA;&#xD;&#xA;I would recommend the mouse input class described in [this blog post][1] ([source code][2]). It detects a button being pressed, held or released, and lets you get that information either via checking through a method or tying yourself to an event.&#xD;&#xA;&#xD;&#xA;On a related note, the same blog post also provides keyboard and gamepad input device classes.&#xD;&#xA;&#xD;&#xA;[1]: http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/&#xD;&#xA;[2]: http://www.innovativegames.net/upload/GameEngineTutorial/6/MouseDevice.cs" />
  <row Id="25735" PostHistoryTypeId="2" PostId="11889" RevisionGUID="8f4f671f-879d-4a3a-9037-ee38c7ae61bb" CreationDate="2011-05-03T13:48:27.123" UserId="3361" Text="SDL + OpenGL is an excellent choice to start up a custom game engine.&#xD;&#xA;&#xD;&#xA;I personally use a C-ish version of C++ because I found out that works the best for me.  By that I mean I don't use any exceptions.  There are two reasons for that: first and foremost exceptions require exception safe code all the way down which with OpenGL and SDL is not exactly easy to achieve.  More importantly however this way it's very easy to expose C++ objects over the C ABI which is incredible helpful if you try to bring a scripting language into the mix.&#xD;&#xA;&#xD;&#xA;I'm in a similar boat than you are and I wrote down some of my adventures with SDL and OpenGL in a blog ([immersedcode.org](http://immersedcode.org/)) in case someone else is interested.&#xD;&#xA;&#xD;&#xA;For the general architecture I have two suggestions: if you want a 3D engine check out the book &quot;Game Engine Architecture&quot; by Jason Lander.  If all you want is 2D, keep the design as simple as possible and let yourself inspire by XNA or other projects.&#xD;&#xA;&#xD;&#xA;Lastly: do not call OpenGL all over the place.  Do yourself a favor and isolate it into a couple of places so that you have the ability to switch between desktop OpenGL/OpenGL ES or even DirectX at a later point if you want to." />
  <row Id="25736" PostHistoryTypeId="2" PostId="11890" RevisionGUID="aad354ab-0e7c-4f77-bba7-a248cdb00565" CreationDate="2011-05-03T14:15:50.247" UserId="7098" Text="A common technique for creating cutaways or cross-sections is to use an arbitrary clipping plane to exclude a part of the body. By cloning the body and clipping an opposite part of the body you end up with two pieces of something that appears to have been sliced in two. &#xD;&#xA;&#xD;&#xA;You would then have to use the stencil buffer to 'fill in' the clip edges, and create new physics bodies for the two new bodies.&#xD;&#xA;&#xD;&#xA;http://glbook.gamedev.net/moglgp/advclip.asp" />
  <row Id="25737" PostHistoryTypeId="2" PostId="11891" RevisionGUID="d7a4a8e7-7d3d-4341-97c3-83f336c05b2e" CreationDate="2011-05-03T14:42:43.480" UserId="5091" Text="After watching (and playing) a little this game: http://www.haxball.com/ I can imagine that RTMFP (or any other real time multiplayer flash based technology) games will be the new big thing, replacing social games (cafeworld, etc).&#xD;&#xA;&#xD;&#xA;What do you think about it?, is it the right moment to dedicate some time to learn how this technology works and how can it be used at his full potential?&#xD;&#xA;&#xD;&#xA;Just your 2 cents." />
  <row Id="25738" PostHistoryTypeId="1" PostId="11891" RevisionGUID="d7a4a8e7-7d3d-4341-97c3-83f336c05b2e" CreationDate="2011-05-03T14:42:43.480" UserId="5091" Text="Are RTMFP Flash games the new big thing?" />
  <row Id="25739" PostHistoryTypeId="3" PostId="11891" RevisionGUID="d7a4a8e7-7d3d-4341-97c3-83f336c05b2e" CreationDate="2011-05-03T14:42:43.480" UserId="5091" Text="&lt;flash&gt;&lt;multiplayer&gt;&lt;peer-to-peer&gt;" />
  <row Id="25740" PostHistoryTypeId="2" PostId="11892" RevisionGUID="692ecc90-cf30-44f3-8032-1612a4ba149d" CreationDate="2011-05-03T14:58:18.463" UserId="6469" Text="I wrote a game for my final year project alone so it is possible with five of you.&#xD;&#xA;&#xD;&#xA;I would advise you think about these things:&#xD;&#xA;&#xD;&#xA;1. check how lenient your professor is going to be. I nearly failed my first review because I used to much 3rd party code and they felt that I wasn't doing any real work.&#xD;&#xA;&#xD;&#xA;2. resources. I wasn't allowed to use any graphics or sounds that were copyrighted so its more difficult than just googleing it.&#xD;&#xA;&#xD;&#xA;3. plan to fail. the amount of times I thought I knew what I was doing and it turned out it wasn't as simple as that such as adding text to a graphic window. &#xD;&#xA;&#xD;&#xA;and I cannot stress enough plan before you code, or two months in you will realise that should be a class. a good plan will save you time especially if there are 5 of you.&#xD;&#xA;&#xD;&#xA;also dont feel bad if you dont create a big hit. a game is an incredibly big project. Though your classmates projects may look a lot better two thirds of a game will get you a better mark that all of a easier project. &#xD;&#xA;&#xD;&#xA;I never made it past a demo world and still got the top grade in my class (first with honours) " />
  <row Id="25741" PostHistoryTypeId="25" PostId="11891" RevisionGUID="440557f1-143b-45ff-99a4-26920ba87b86" CreationDate="2011-05-03T15:11:25.023" Comment="http://twitter.com/#!/StackGameDev/status/65433282896068608" />
  <row Id="25742" PostHistoryTypeId="5" PostId="11891" RevisionGUID="3fd3e902-47c6-42bc-a1c6-0caef452a287" CreationDate="2011-05-03T15:22:37.300" UserId="1430" Comment="added 8 characters in body" Text="After watching (and playing) [HaxBall][1], I can imagine that RTMFP (or any other real time multiplayer flash based technology) games will be the new big thing, replacing social games (cafeworld, etc).&#xD;&#xA;&#xD;&#xA;What do you think about it? Is now the right moment to dedicate some time to learn how this technology works and how can it be used at its full potential?&#xD;&#xA;&#xD;&#xA;Just your two cents.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.haxball.com/" />
  <row Id="25743" PostHistoryTypeId="2" PostId="11893" RevisionGUID="1b997b7f-0624-4e84-9edb-e7ab8e209aa2" CreationDate="2011-05-03T15:26:25.410" UserId="1430" Text="I don't see anything about the game you linked, or the concept of &quot;real time Flash-based multiplayer&quot; games in general, that would distinguish them in any kind of revolutionary fashion from the glut of Flash-based games out there already, multiplayer or not. Nor do I see them as being all that distinct from most casual or social games that exist as well.&#xD;&#xA;&#xD;&#xA;That said, just because there is nothing mind-blowingly revolutionary about them doesn't mean they are a dead end. If you are interested in the platform, understand the advantages and disadvantages of that platform (from both a technical and marketing perspective) and can make you game idea work within that context then by all means, invest some time in learning the technology." />
  <row Id="25744" PostHistoryTypeId="2" PostId="11894" RevisionGUID="56c0e6a1-09d0-48a6-8096-dab637094d20" CreationDate="2011-05-03T15:40:25.627" UserId="3830" Text="You need to narrow down what might have caused the error.  Timeout might mean either it can't reach the server at all, or it can, but the server isn't accepting the connection.  &#xD;&#xA;&#xD;&#xA;Check everything you're assuming - like the port number, the server IP address, etc.  When you find yourself with a, &quot;But it HAS to work!&quot; bug, that usually means you're assuming something that isn't true.  &#xD;&#xA;&#xD;&#xA;In that vein, note that the call to Rcon.send in the two code examples aren't identical - one has parameters passed in and the other has hardwired parameters.  You're assuming the parameters passed (like ip address) are correct.  If you replace the Rcon.send line in example 1 with the hardwired one in example 2 does it work? &#xD;&#xA;" />
  <row Id="25745" PostHistoryTypeId="2" PostId="11895" RevisionGUID="2874ca0b-c823-473a-a3ad-4f46f8315f20" CreationDate="2011-05-03T15:47:33.630" UserId="1156" Text="Use a texture atlas, or a tilesheet of some kind. One texture in video memory is much less work than 100 textures in video memory." />
  <row Id="25746" PostHistoryTypeId="2" PostId="11896" RevisionGUID="227b7b84-5d99-412d-9b09-3711d2b403b8" CreationDate="2011-05-03T16:47:07.023" UserId="7102" Text="				Body b;&#xD;&#xA;				while ((b=box2d.physics.PhysicssWorld.world.getBodyList().getNext())!=null) {&#xD;&#xA;						&#xD;&#xA;						   Shape shape;&#xD;&#xA;						   while ((shape=b.getShapeList().getNext())!=null) {&#xD;&#xA;							   &#xD;&#xA;							    Log.e(&quot;name&quot;,&quot;&quot;+b.getUserData().toString()+&quot; &quot;+shape+&quot; &quot;);&#xD;&#xA;	&#xD;&#xA;							    opengl.saveMatrix();&#xD;&#xA;									Meshes.select(b.getUserData().toString())&#xD;&#xA;											.translate((b.getPosition().x)*RATIO, (b.getPosition().y)*RATIO)&#xD;&#xA;											.rotate((int) ((int) b.getAngle()* (180 / Math.PI)), 0, 0, 1)&#xD;&#xA;											.draw(shape, 1,1,1);&#xD;&#xA;									&#xD;&#xA;								opengl.loadMatrix();&#xD;&#xA;							   &#xD;&#xA;						   }&#xD;&#xA;						    &#xD;&#xA;	&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;I d like to get my bodies's shape, but i cant get anything, only null.. why?&#xD;&#xA;&#xD;&#xA;never run this line: Log.e(&quot;name&quot;,&quot;&quot;+b.getUserData().toString()+&quot; &quot;+shape+&quot; &quot;);&#xD;&#xA;&#xD;&#xA;so shape=b.getShapeList().getNext()) always null..." />
  <row Id="25747" PostHistoryTypeId="1" PostId="11896" RevisionGUID="227b7b84-5d99-412d-9b09-3711d2b403b8" CreationDate="2011-05-03T16:47:07.023" UserId="7102" Text="Box2D get shape of my bodies" />
  <row Id="25748" PostHistoryTypeId="3" PostId="11896" RevisionGUID="227b7b84-5d99-412d-9b09-3711d2b403b8" CreationDate="2011-05-03T16:47:07.023" UserId="7102" Text="&lt;box2d&gt;" />
  <row Id="25749" PostHistoryTypeId="5" PostId="11837" RevisionGUID="3ea57c0d-bafe-4bc3-a371-38cb10cfca11" CreationDate="2011-05-03T16:52:05.447" UserId="1198" Comment="deleted 34 characters in body" Text="Specifically I would like to mess with the idea of giving each bot a specific &quot;personality&quot; so to speak. Open Arena provides this functionality, and I'm assuming that Warsow/Nexiuz (Xonotic?) may provide the same.&#xD;&#xA;&#xD;&#xA;However I remember scouring through Warsow/Nexuiz data files while back and was unable to find anything similar to was OA has. I would like such settings to be stored in plain text configuration, or some similar method that I can use a script to create/edit new profiles, so in that regard, a game that runs in Linux would be preferable as well, but Windows only suggestions still welcome." />
  <row Id="25750" PostHistoryTypeId="2" PostId="11897" RevisionGUID="80cf6e64-aa19-4f69-9b8e-66d3e019b410" CreationDate="2011-05-03T17:55:53.523" UserId="7103" Text="I wish to know if there is a way to load a texture which is not in powers of 2, for example 100 X 56 in dimension, in XNA 4.0 and draw it using VertexPositionColorTexture. Thanks for your time." />
  <row Id="25751" PostHistoryTypeId="1" PostId="11897" RevisionGUID="80cf6e64-aa19-4f69-9b8e-66d3e019b410" CreationDate="2011-05-03T17:55:53.523" UserId="7103" Text="Drawing a texture of arbitrary size in XNA." />
  <row Id="25752" PostHistoryTypeId="3" PostId="11897" RevisionGUID="80cf6e64-aa19-4f69-9b8e-66d3e019b410" CreationDate="2011-05-03T17:55:53.523" UserId="7103" Text="&lt;xna&gt;&lt;iphone&gt;&lt;android&gt;&lt;game-mechanics&gt;&lt;physics-engine&gt;" />
  <row Id="25753" PostHistoryTypeId="2" PostId="11898" RevisionGUID="1a00df36-10d3-4d19-b5c0-f4c05fc80e12" CreationDate="2011-05-03T18:03:28.193" UserId="7104" Text="So I'm currently making a game on the Android platform. The thing is, I don't know whether to do a &quot;smartphone edition&quot; and a &quot;tablet edition&quot; or simply to do one unique app. Why would I do two programs ? Because if I put high definition textures, the users of smartphones will have to download a heavy package, and thus will have very less space available as if it was &quot;normal definition&quot; textures...&#xD;&#xA;But on the other hand it's very hard to maintain two versions at the same time...&#xD;&#xA;&#xD;&#xA;So how do you handle this ? Even if you develop only for smartphones, do you send multiple versions of your game/app to the Android Market or not ?&#xD;&#xA;&#xD;&#xA;Thank you for trying to help me anyway :)" />
  <row Id="25754" PostHistoryTypeId="1" PostId="11898" RevisionGUID="1a00df36-10d3-4d19-b5c0-f4c05fc80e12" CreationDate="2011-05-03T18:03:28.193" UserId="7104" Text="Handling smartphones + tablets = heavy app ! How to solve this ?" />
  <row Id="25755" PostHistoryTypeId="3" PostId="11898" RevisionGUID="1a00df36-10d3-4d19-b5c0-f4c05fc80e12" CreationDate="2011-05-03T18:03:28.193" UserId="7104" Text="&lt;android&gt;&lt;distribution&gt;&lt;resolution&gt;" />
  <row Id="25756" PostHistoryTypeId="25" PostId="11898" RevisionGUID="05332e95-755b-40a1-bac2-d863f9df5cc5" CreationDate="2011-05-03T18:11:25.530" Comment="http://twitter.com/#!/StackGameDev/status/65478584235606016" />
  <row Id="25757" PostHistoryTypeId="5" PostId="11897" RevisionGUID="f40f2283-0e8c-47a8-aaf1-dbd5ac95a106" CreationDate="2011-05-03T18:24:27.133" UserId="1198" Comment="deleted 26 characters in body" Text="I wish to know if there is a way to load a texture which is not in powers of 2, for example 100 X 56 in dimension, in XNA 4.0 and draw it using VertexPositionColorTexture." />
  <row Id="25758" PostHistoryTypeId="5" PostId="11896" RevisionGUID="0177ce0e-ab3b-4e56-ad3e-bb0387899fcd" CreationDate="2011-05-03T19:22:32.243" UserId="3585" Comment="trying to improve a little. couldn't guess the language, so I didn't retag (I would say Java or C#)" Text="I would like to get the shape of my bodies, but I can't get anything, only null. Why?  &#xD;&#xA;Here is the relevant code section:&#xD;&#xA;&#xD;&#xA;    Body b;&#xD;&#xA;    while((b = box2d.physics.PhysicsWorld.world.getBodyList().getNext()) !=null) {&#xD;&#xA;      Shape shape;&#xD;&#xA;      while((shape = b.getShapeList().getNext()) != null) {&#xD;&#xA;        &#xD;&#xA;        Log.e(&quot;name&quot;,&quot;&quot;+b.getUserData().toString()+&quot; &quot;+shape+&quot; &quot;);&#xD;&#xA;        &#xD;&#xA;        opengl.saveMatrix();&#xD;&#xA;        Meshes.select(b.getUserData().toString())&#xD;&#xA;                  .translate((b.getPosition().x)*RATIO, (b.getPosition().y)*RATIO)&#xD;&#xA;                  .rotate((int) ((int) b.getAngle() * (180 / Math.PI)), 0, 0, 1)&#xD;&#xA;                  .draw(shape, 1, 1, 1);&#xD;&#xA;        &#xD;&#xA;        opengl.loadMatrix();&#xD;&#xA;        &#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;shape = b.getShapeList().getNext() always returns null...  &#xD;&#xA;Log.e(&quot;name&quot;,&quot;&quot;+b.getUserData().toString()+&quot; &quot;+shape+&quot; &quot;) never ran." />
  <row Id="25759" PostHistoryTypeId="4" PostId="11896" RevisionGUID="0177ce0e-ab3b-4e56-ad3e-bb0387899fcd" CreationDate="2011-05-03T19:22:32.243" UserId="3585" Comment="trying to improve a little. couldn't guess the language, so I didn't retag (I would say Java or C#)" Text="Get shape of my bodies using Box2D" />
  <row Id="25760" PostHistoryTypeId="24" PostId="11896" RevisionGUID="0177ce0e-ab3b-4e56-ad3e-bb0387899fcd" CreationDate="2011-05-03T19:22:32.243" Comment="Proposed by 3585 approved by 1156 edit id of 401" />
  <row Id="25761" PostHistoryTypeId="5" PostId="11884" RevisionGUID="21b13b34-2d82-4e4c-96af-efb55ab91e8b" CreationDate="2011-05-03T19:38:06.553" UserId="1198" Comment="attempt to make sense of this question" Text="I can't find the tutorials of joints class in the Box2D for iPhone. I am unable to run a Testbed for iPhone Box2D." />
  <row Id="25762" PostHistoryTypeId="6" PostId="11897" RevisionGUID="8bf8a023-b306-48bb-8e8a-1379a9700372" CreationDate="2011-05-03T19:49:41.930" UserId="2332" Comment="Removed all unnecessary tags; edited tags" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="25763" PostHistoryTypeId="2" PostId="11899" RevisionGUID="8512544e-44f4-4779-b112-4cc0f26b5be9" CreationDate="2011-05-03T20:16:13.913" UserId="7104" Text="It's very simple using SpriteBatch.&#xD;&#xA;Initialize it :&#xD;&#xA;&#xD;&#xA;    spriteBatch = new SpriteBatch(yourGraphicsDevice);&#xD;&#xA;When you load content just call&#xD;&#xA;&#xD;&#xA;    image = Content.Load&lt;Texture2D&gt;(@&quot;yourImage&quot;);&#xD;&#xA;then you can draw it easily&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    spriteBatch.Draw(image, dstRect, srcRect, Color.White);&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;That's all !&#xD;&#xA;&#xD;&#xA;srcRect is juste a rectangle that indicates where your image is in the texture. That way you can have multiple images in one texture.&#xD;&#xA;&#xD;&#xA;For the VertexPositionColorTexture, you'll probably want to create your own spriteBatch. See [here](http://social.msdn.microsoft.com/forums/en-US/xnaframework/thread/7e5cc12f-3b75-49ef-8da9-c00a75139a21/)." />
  <row Id="25764" PostHistoryTypeId="2" PostId="11900" RevisionGUID="12f06cd8-f9a1-4a27-90d5-6a88d237b013" CreationDate="2011-05-03T20:18:04.193" UserId="6558" Text="Usually, when you're making something that will be ported to different systems (whether a game for multiple consoles, or an app for various mobile devices), it's common to wrap your code so that anything that is specific to one system (rendering, event handling, etc) can be completely replaced without touching the code for the logic.  SDL (and SFML) are examples of this sort of code, and there's other examples out there for various things.&#xD;&#xA;&#xD;&#xA;Now, if the only difference between the mobile and tablet version is texture sizes, then you could probably set up your code to use either a configurable texture size, or different build options.  If there's multiple differences between the two, then it gets more complex.&#xD;&#xA;&#xD;&#xA;Of course, there's nothing wrong with focusing on one platform to start, and if your game does well/there's enough demand for it/you have free time, porting your game to a new platform once you make the gameplay solid for the initial version." />
  <row Id="25765" PostHistoryTypeId="2" PostId="11901" RevisionGUID="77848a70-9e5c-4e07-afd0-9927f833394e" CreationDate="2011-05-03T20:24:47.783" UserId="7106" Text="I'm a hobbyist and I've just finished implementing the &quot;game&quot; part of a game I'm developing, and I feel as if it finally matured enough to be worth adding a menu to start a new game, exit, edit options, etc., and so I tried to find sources online with tips for creating menus in XNA (first time creating a game in XNA).&#xD;&#xA;&#xD;&#xA;So far, I haven't really found any good solutions.  I guess I'm looking for a solution that isn't ad hoc so that I could easily reuse it for future games I decide to make.  Is there any such built in XNA functionality I'm unaware of?  Any XNA libraries out there that would prove useful?  Or do you guys have any tips in general for easy/robust/reusable implementation of menus in XNA?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="25766" PostHistoryTypeId="1" PostId="11901" RevisionGUID="77848a70-9e5c-4e07-afd0-9927f833394e" CreationDate="2011-05-03T20:24:47.783" UserId="7106" Text="Efficient Way of Creating Menus in XNA" />
  <row Id="25767" PostHistoryTypeId="3" PostId="11901" RevisionGUID="77848a70-9e5c-4e07-afd0-9927f833394e" CreationDate="2011-05-03T20:24:47.783" UserId="7106" Text="&lt;xna&gt;" />
  <row Id="25768" PostHistoryTypeId="2" PostId="11902" RevisionGUID="92e97a2f-3f2c-4fe8-b75c-94084e2f9005" CreationDate="2011-05-03T20:31:32.013" UserId="4947" Text="You can try [Game State Management code sample][1]. I was using it in my first XNA game :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="25769" PostHistoryTypeId="2" PostId="11903" RevisionGUID="bb381e3c-36d0-4939-b79b-3f355d2d40c2" CreationDate="2011-05-03T20:33:26.520" UserId="5473" Text="(Simplified answer on proper architecture, to keep it comprehensible for beginners like the OP.)&#xD;&#xA;&#xD;&#xA;Your player and your troll are nothing but sets of data (what we call the data Model which describes your world). Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will holds general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. Do not have any functions in this model class or any of its subparts; getters are the exception, to allow you to get data from the model more readily (only if public members don't already do the trick). This main model can consist of many subobjects in order to describe your world.&#xD;&#xA;&#xD;&#xA;Now, create functions in one or more &quot;controller&quot; classes  (you can even write them all as subfunctions in your main class, although this may get out a bit too large). These functions will be called every update to act upon the entities. While some suggest creating a full class instance with methods(functions) for every entity, plus all the member data etc., you don't need to do that and in fact it's inefficient to do so. DRY -- Don't Repeat Yourself. All that any entity really is, is it's own data. So you can keep the control function separate.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...methods...&#xD;&#xA;    function realTimeUpdate() //called every x milliseconds on a timer.&#xD;&#xA;    {&#xD;&#xA;    //receive input from player, store results&#xD;&#xA;    //do AI thinking, store results&#xD;&#xA;    //&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }" />
  <row Id="25770" PostHistoryTypeId="5" PostId="11903" RevisionGUID="23b12bac-e5ad-44a7-afc7-77b016e2420a" CreationDate="2011-05-03T20:40:04.737" UserId="5473" Comment="added 269 characters in body; added 23 characters in body" Text="(Simplified answer on proper architecture, to keep it comprehensible for beginners like the OP.)&#xD;&#xA;&#xD;&#xA;Your player and your troll are nothing but sets of data (what we call the data Model which describes your world). Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will holds general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Now, create functions in one or more &quot;controller&quot; classes  (you can even write them all as subfunctions in your main class, although this may get out a bit too large). These functions will be called every update to act upon the entities. While some suggest creating a full class instance with methods(functions) for every entity, plus all the member data etc., you don't need to do that and in fact it's inefficient to do so. DRY -- Don't Repeat Yourself. All that any entity really is, is it's own data. So you can keep the control function separate.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...methods...&#xD;&#xA;    function realTimeUpdate() //called every x milliseconds on a timer.&#xD;&#xA;    {&#xD;&#xA;    //receive input from player, store results&#xD;&#xA;    //do AI thinking, store results&#xD;&#xA;    //&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above." />
  <row Id="25771" PostHistoryTypeId="5" PostId="11903" RevisionGUID="874dc6ae-0731-4db3-b0f6-5f31ad41a272" CreationDate="2011-05-03T20:46:00.377" UserId="5473" Comment="dev's note; deleted 1 characters in body; deleted 68 characters in body" Text="(Simplified answer on proper architecture, to keep it comprehensible for beginners like the OP.)&#xD;&#xA;&#xD;&#xA;Your player and your troll are nothing but sets of data (what we call the data Model which describes your world). Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Now, create functions in one or more &quot;controller&quot; classes  (you can even write them all as subfunctions in your main class, although this may get out a bit too large). These functions will be called every update to act upon the entities. While some suggest creating a full class instance with methods(functions) for every entity, plus all the member data etc., you don't need to do that and in fact it's inefficient to do so. All an entity really is, is it's own data. So you can keep the control functions separate, as they can be applied to all your entities from one single place in code: your main update call.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...methods...&#xD;&#xA;    function realTimeUpdate() //called every x milliseconds on a timer.&#xD;&#xA;    {&#xD;&#xA;    //receive input from player, store results&#xD;&#xA;    //do AI thinking, store results&#xD;&#xA;    //&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC.)" />
  <row Id="25772" PostHistoryTypeId="2" PostId="11904" RevisionGUID="e1693862-9591-45ea-9502-350c4ce18071" CreationDate="2011-05-03T20:50:56.833" UserId="744" Text="I'm guessing by the presence of `Log.e` and `toString()` that this is Java on Android. I don't know much about JBox2D in Java, but...&#xD;&#xA;&#xD;&#xA;    while((b = box2d.physics.PhysicsWorld.world.getBodyList().getNext()) !=null)&#xD;&#xA;&#xD;&#xA;You're only ever going to get the second body here. I can't imagine this loop would ever terminate if it was entered. Your other loop has a similar problem:&#xD;&#xA;&#xD;&#xA;    while((shape = b.getShapeList().getNext()) != null)&#xD;&#xA;&#xD;&#xA;In Box2D, shapes and bodies form a linked list. getBodyList and getShapeList return the head of that linked list, which is itself a body/shape, not an iterator. (Your loop is wrong even if it was an iterator, though! If something returns an iterator, you need to keep using the one it returned, not ask for it again.)&#xD;&#xA;&#xD;&#xA;The loop you want is of the form:&#xD;&#xA;&#xD;&#xA;    for (Body b = box2d.physics.PhysicsWorld.world.getBodyList();&#xD;&#xA;         b != null;&#xD;&#xA;         b = b.getNext())&#xD;&#xA;" />
  <row Id="25773" PostHistoryTypeId="5" PostId="11903" RevisionGUID="973e28c6-7049-44af-9218-87ed18c1c9e9" CreationDate="2011-05-03T20:53:41.230" UserId="5473" Comment="oopsies; added 255 characters in body; deleted 100 characters in body; added 3 characters in body" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Now, create functions in one or more &quot;controller&quot; classes; you can even write them all as subfunctions in your main class, although this may get a bit large after a while. These functions will be called every update to act upon the entities. While some suggest creating a full class instance with methods(functions) for every entity, plus all the member data etc., you don't need to do that and in fact it's inefficient to do so. All an entity really is, is it's own data. So you can keep the control functions separate, as they can be applied to all your entities from one single place in code: your main update call.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called every x milliseconds on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC.)" />
  <row Id="25774" PostHistoryTypeId="5" PostId="11903" RevisionGUID="4ae93144-6bda-4e06-939b-2d47683177ab" CreationDate="2011-05-03T21:00:55.340" UserId="5473" Comment="added 81 characters in body" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Now, create functions in one or more &quot;controller&quot; classes; you can even write them all as subfunctions in your main class, although this may get a bit large after a while. These functions will be called every update to act upon the entities. While some suggest creating a full class instance with methods(functions) for every entity, plus all the member data etc., you don't need to do that and in fact it's inefficient to do so. All an entity really is, is it's own data. What it can do, on the other hand, can be shared by many other entities. So you can keep the control functions separate, as they can be applied to all your entities from one single, shared place in code: your main update call.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called every x milliseconds on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC.)" />
  <row Id="25775" PostHistoryTypeId="25" PostId="11901" RevisionGUID="2cac9c94-a740-461c-b598-ffa108921a02" CreationDate="2011-05-03T21:11:25.527" Comment="http://twitter.com/#!/StackGameDev/status/65523883159191552" />
  <row Id="25776" PostHistoryTypeId="5" PostId="11903" RevisionGUID="be4852fb-2458-4a1f-82f4-b692efb9c455" CreationDate="2011-05-03T21:19:45.013" UserId="5473" Comment="added 31 characters in body" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Now, create functions in one or more &quot;controller&quot; classes; you can even write them all as subfunctions in your main class, although this may get a bit large after a while. These functions will be called every update to act upon the entities. While some suggest creating a full class instance with methods(functions) for every entity, plus all the member data etc., you don't need to do that and in fact it's inefficient to do so. All an entity really is, is it's own data. What it can do, on the other hand, can be shared by many other entities. So you can keep the control functions separate, as they can be applied to all your entities from one single, shared place in code: your main update call.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called every x milliseconds on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else //everyone else is your enemy!&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC.)" />
  <row Id="25777" PostHistoryTypeId="5" PostId="11896" RevisionGUID="ff007094-1c45-4098-8065-a67f38b0fd23" CreationDate="2011-05-03T21:24:17.453" UserId="744" Comment="deleted 42 characters in body; edited tags" Text="I would like to get the shapes of my bodies, but I can't get anything, only null. Why?  &#xD;&#xA;Here is the relevant code section:&#xD;&#xA;&#xD;&#xA;    Body b;&#xD;&#xA;    while((b = box2d.physics.PhysicsWorld.world.getBodyList().getNext()) !=null) {&#xD;&#xA;      Shape shape;&#xD;&#xA;      while((shape = b.getShapeList().getNext()) != null) {&#xD;&#xA;        &#xD;&#xA;        Log.e(&quot;name&quot;,&quot;&quot;+b.getUserData().toString()+&quot; &quot;+shape+&quot; &quot;);&#xD;&#xA;        &#xD;&#xA;        opengl.saveMatrix();&#xD;&#xA;        Meshes.select(b.getUserData().toString())&#xD;&#xA;                  .translate((b.getPosition().x)*RATIO, (b.getPosition().y)*RATIO)&#xD;&#xA;                  .rotate((int) ((int) b.getAngle() * (180 / Math.PI)), 0, 0, 1)&#xD;&#xA;                  .draw(shape, 1, 1, 1);&#xD;&#xA;        &#xD;&#xA;        opengl.loadMatrix();&#xD;&#xA;        &#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`shape = b.getShapeList().getNext()` always returns null, and the log entry never ran." />
  <row Id="25778" PostHistoryTypeId="6" PostId="11896" RevisionGUID="ff007094-1c45-4098-8065-a67f38b0fd23" CreationDate="2011-05-03T21:24:17.453" UserId="744" Comment="deleted 42 characters in body; edited tags" Text="&lt;java&gt;&lt;box2d&gt;" />
  <row Id="25779" PostHistoryTypeId="5" PostId="11903" RevisionGUID="954a584a-1dc1-4df3-a744-bc5f921b464e" CreationDate="2011-05-03T21:27:21.933" UserId="5473" Comment="dearcanifying things; deleted 21 characters in body" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Next, create functions in one or more &quot;controller&quot; classes; you can write them all as helper functions in your main class, although this may get a bit large after a while. These will be called every update to act upon the entities' data for different purposes (movement, attack etc.). Keep these functions outside of an entity class is more resource-efficient, and once you know what *describes* your entity you will automatically know what functions need to act on it.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called x times per second, on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else //everyone else is your enemy!&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC.)" />
  <row Id="25780" PostHistoryTypeId="5" PostId="11903" RevisionGUID="86f54350-1984-413f-82f0-8b7b3d055ded" CreationDate="2011-05-03T21:32:55.197" UserId="5473" Comment="added 65 characters in body" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Next, create functions in one or more &quot;controller&quot; classes; you can write them all as helper functions in your main class, although this may get a bit large after a while. These will be called every update to act upon the entities' data for different purposes (movement, attack etc.). Keep these functions outside of an entity class is more resource-efficient, and once you know what *describes* your entity you will automatically know what functions need to act on it.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called x times per second, on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else //everyone else is your enemy!&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;        var whoseTurn:Boolean; //if turnbased&#xD;&#xA;        //etc.&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC.)" />
  <row Id="25781" PostHistoryTypeId="5" PostId="11898" RevisionGUID="673c7865-69cf-49fb-894b-97f83ecda876" CreationDate="2011-05-03T22:22:55.703" UserId="3585" Comment="improve wording and general structure" Text="I'm currently making a game on the Android platform. I don't know whether to do a &quot;smartphone edition&quot; and a &quot;tablet edition&quot; or simply to do one edition.&#xD;&#xA;&#xD;&#xA;If I put high definition textures, the users of smartphones will have to download a heavy package, and thus will have very less space available as if it was &quot;normal definition&quot; textures. On the other hand, it's very hard to maintain two versions at the same time...&#xD;&#xA;&#xD;&#xA;So how do you handle this? Even if you develop only for smartphones, do you send multiple versions of your game/app to the Android Market or not?" />
  <row Id="25782" PostHistoryTypeId="4" PostId="11898" RevisionGUID="673c7865-69cf-49fb-894b-97f83ecda876" CreationDate="2011-05-03T22:22:55.703" UserId="3585" Comment="improve wording and general structure" Text="Should I distribute different versions of the same game?" />
  <row Id="25783" PostHistoryTypeId="24" PostId="11898" RevisionGUID="673c7865-69cf-49fb-894b-97f83ecda876" CreationDate="2011-05-03T22:22:55.703" Comment="Proposed by 3585 approved by 51 edit id of 402" />
  <row Id="25784" PostHistoryTypeId="4" PostId="11898" RevisionGUID="16f98fc2-14e1-4f97-ab63-540e1db0d3de" CreationDate="2011-05-03T22:26:09.503" UserId="51" Comment="edited title" Text="Should I distribute different versions of the same game for different mobile platforms?" />
  <row Id="25785" PostHistoryTypeId="2" PostId="11905" RevisionGUID="3378e1a2-4689-4ef2-ab15-62597706169a" CreationDate="2011-05-03T22:29:52.243" UserId="6117" Text="I've got a game object i need to rotate. It's current angle is player.rotation, the destination is targetAngle, both in degress, 0 to 359. I've got a function named rotateDirection(float sourceAngle, float destAngle) that needs to return -1 or 1 depending on whether the shortest way to reach the destination angle would be clockwise or clockwise. &#xD;&#xA;&#xD;&#xA;For example - for sourceAngle 300 and destAngle 0 the function would return 1 for clockwise. &#xD;&#xA;&#xD;&#xA;The solution is most probably going to leave me looking silly, and i usually don't like just asking for code, but my brain is completely broken so please help me with this one :)" />
  <row Id="25786" PostHistoryTypeId="1" PostId="11905" RevisionGUID="3378e1a2-4689-4ef2-ab15-62597706169a" CreationDate="2011-05-03T22:29:52.243" UserId="6117" Text="rotating an object from sourceAngle to destAngle, both 0-359, clockwise or counter clockwise?" />
  <row Id="25787" PostHistoryTypeId="3" PostId="11905" RevisionGUID="3378e1a2-4689-4ef2-ab15-62597706169a" CreationDate="2011-05-03T22:29:52.243" UserId="6117" Text="&lt;math&gt;&lt;geometry&gt;&lt;logic&gt;" />
  <row Id="25788" PostHistoryTypeId="2" PostId="11906" RevisionGUID="741aabd2-d701-45cb-ac05-77e5bf70248d" CreationDate="2011-05-03T22:43:05.587" UserId="3505" Text="This should do:&#xD;&#xA;&#xD;&#xA;    (((source-dest+360) mod 360)&gt;180)?1:-1&#xD;&#xA;&#xD;&#xA;The +360 is only necessary for languages with a fuzzy mod function." />
  <row Id="25789" PostHistoryTypeId="25" PostId="11905" RevisionGUID="e765f8f2-63bf-4957-aa4b-13bd1b6f3d75" CreationDate="2011-05-04T00:11:25.817" Comment="http://twitter.com/#!/StackGameDev/status/65569181919219712" />
  <row Id="25790" PostHistoryTypeId="2" PostId="11907" RevisionGUID="22126da7-c56e-4dd4-9a90-5071691230a3" CreationDate="2011-05-04T00:31:53.000" UserId="3232" Text="When I load a texture using the code below:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    WWW www = new WWW(textureName);     &#xD;&#xA;&#xD;&#xA;    yield return www;&#xD;&#xA;&#xD;&#xA;    renderer.material = new Material(Shader.Find(&quot;Diffuse&quot;));&#xD;&#xA;&#xD;&#xA;    Texture tex = www.texture;&#xD;&#xA;    tex.filterMode = FilterMode.Trilinear;&#xD;&#xA;&#xD;&#xA;    renderer.material.mainTexture =tex;&#xD;&#xA;&#xD;&#xA;The texture does not come with mipmaps, how can I tell unity to generate the mipmaps?" />
  <row Id="25791" PostHistoryTypeId="1" PostId="11907" RevisionGUID="22126da7-c56e-4dd4-9a90-5071691230a3" CreationDate="2011-05-04T00:31:53.000" UserId="3232" Text="How to create mipmap for Unity3d textures loaded with www?" />
  <row Id="25792" PostHistoryTypeId="3" PostId="11907" RevisionGUID="22126da7-c56e-4dd4-9a90-5071691230a3" CreationDate="2011-05-04T00:31:53.000" UserId="3232" Text="&lt;textures&gt;&lt;unity&gt;" />
  <row Id="25793" PostHistoryTypeId="2" PostId="11908" RevisionGUID="4cbce03b-2d71-40b1-99bc-24a82dc4a9f1" CreationDate="2011-05-04T00:44:22.873" UserId="6030" Text="Emanuele Feronato has some great joint tutorials for box2d. The tutorials are in Actionscript 3, but the basic principles are the same. &#xD;&#xA;&#xD;&#xA;BTW, the as3 port of box2d sticks pretty closely to the naming convention of the original c++ box2d, so you'll just have to change syntax a bit to use it on the iPhone.&#xD;&#xA;&#xD;&#xA;http://www.emanueleferonato.com/category/box2d/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25794" PostHistoryTypeId="5" PostId="11905" RevisionGUID="fe3efb50-7a04-43c7-9888-5b3b5a58f8a2" CreationDate="2011-05-04T01:56:31.800" UserId="5021" Comment="&quot;clockwise or clockwise&quot; should be &quot;clockwise or counterclockwise&quot;" Text="I've got a game object i need to rotate. It's current angle is player.rotation, the destination is targetAngle, both in degress, 0 to 359. I've got a function named rotateDirection(float sourceAngle, float destAngle) that needs to return -1 or 1 depending on whether the shortest way to reach the destination angle would be clockwise or counterclockwise. &#xD;&#xA;&#xD;&#xA;For example - for sourceAngle 300 and destAngle 0 the function would return 1 for clockwise. &#xD;&#xA;&#xD;&#xA;The solution is most probably going to leave me looking silly, and i usually don't like just asking for code, but my brain is completely broken so please help me with this one :)" />
  <row Id="25795" PostHistoryTypeId="24" PostId="11905" RevisionGUID="fe3efb50-7a04-43c7-9888-5b3b5a58f8a2" CreationDate="2011-05-04T01:56:31.800" Comment="Proposed by 5021 approved by 51 edit id of 404" />
  <row Id="25796" PostHistoryTypeId="2" PostId="11909" RevisionGUID="ec066123-fc75-4ec8-8e2d-f23952231b3e" CreationDate="2011-05-04T01:59:15.447" UserId="1430" Text="You could simply [create a new texture](http://unity3d.com/support/documentation/ScriptReference/Texture2D.Texture2D.html) using the width/height information from the WWW's texture, and pass `true` to the `mipmap` parameter of the constructor. Then you can use the GetPixels and SetPixels methods to copy the data over (the texture returned from the WWW object is read-only so you probably can't modify it directly). &#xD;&#xA;&#xD;&#xA;See also:&#xD;&#xA;http://answers.unity3d.com/questions/2814/how-do-i-generate-mipmaps-at-runtime&#xD;&#xA;" />
  <row Id="25797" PostHistoryTypeId="25" PostId="11907" RevisionGUID="b3e42a7a-b690-438f-88d7-cbd9ab6d8b32" CreationDate="2011-05-04T03:11:25.840" Comment="http://twitter.com/#!/StackGameDev/status/65614480964452352" />
  <row Id="25798" PostHistoryTypeId="2" PostId="11910" RevisionGUID="e0665e50-e53a-4948-8cbd-7f2107869843" CreationDate="2011-05-04T04:47:31.327" UserId="2472" Text="Many browser games are single player. Of the multiplayer ones, there are lots of &quot;social&quot; ones (e.g. on Facebook), letting you play with your friends. Since your friends aren't online at the same time as you, these games are typically asynchronous — you play a bit, then they play a bit, then you play a bit. There are also some synchronous games — you and they play at the same time. These are common on XBox and PC not as common in the browser. You typically play these games with strangers.&#xD;&#xA;&#xD;&#xA;I can't say it's the next big thing but the synchronous realtime games seem to be uncommon when it comes to browser games. There are a few out there though. For example, there's [Realm of the Mad God][1], which has hundreds of players online at once. (Disclaimer: the authors are friends of mine.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realmofthemadgod.com/" />
  <row Id="25799" PostHistoryTypeId="5" PostId="11910" RevisionGUID="811ecd55-fea4-4aad-9dc4-5b8bae4e1772" CreationDate="2011-05-04T04:53:48.013" UserId="2472" Comment="added 48 characters in body" Text="Many browser games are single player. Of the multiplayer ones, there are lots of &quot;social&quot; ones (e.g. on Facebook), letting you play with your friends. Since your friends aren't online at the same time as you, these games are typically asynchronous — you play a bit, then they play a bit, then you play a bit. There are also some synchronous games — you and they play at the same time. These are common on XBox and PC not as common in the browser. You typically play these games with strangers.&#xD;&#xA;&#xD;&#xA;I can't say it's the next big thing but the synchronous realtime games seem to be uncommon when it comes to browser games. Maybe people don't like playing with strangers. There are a few out there though. For example, there's [Realm of the Mad God][1], which has hundreds of players online at once. (Disclaimer: the authors are friends of mine.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realmofthemadgod.com/" />
  <row Id="25800" PostHistoryTypeId="2" PostId="11911" RevisionGUID="ecf15353-9709-4b46-9e32-ab7f8e9aeb15" CreationDate="2011-05-04T05:28:20.070" UserId="7102" Text="Is there a way to do it? I can get only polygon_shape's vertices, but i want circle, box, etc too.&#xD;&#xA;&#xD;&#xA;How to do it?" />
  <row Id="25801" PostHistoryTypeId="1" PostId="11911" RevisionGUID="ecf15353-9709-4b46-9e32-ab7f8e9aeb15" CreationDate="2011-05-04T05:28:20.070" UserId="7102" Text="Get Body Vertexes of a Shape/Body in Box2D" />
  <row Id="25802" PostHistoryTypeId="3" PostId="11911" RevisionGUID="ecf15353-9709-4b46-9e32-ab7f8e9aeb15" CreationDate="2011-05-04T05:28:20.070" UserId="7102" Text="&lt;box2d&gt;" />
  <row Id="25807" PostHistoryTypeId="4" PostId="11911" RevisionGUID="99881625-5c93-47f3-b385-576767544ba4" CreationDate="2011-05-04T05:40:07.653" UserId="7102" Comment="edited title" Text="Get Vertexes of a Shape/Body in Box2D" />
  <row Id="25808" PostHistoryTypeId="2" PostId="11913" RevisionGUID="5012ea2e-5634-4376-857d-9d3527fc1c56" CreationDate="2011-05-04T05:49:18.453" UserId="744" Text="There's no such thing as a _box_ in in Box2D (ironically). The `SetAsBox` method is a convenience function that creates a 4-ary polygon.&#xD;&#xA;&#xD;&#xA;A circle does not have vertices, so you cannot get a list of them. A circle is defined by its radius and its position, and those are both accessible.&#xD;&#xA;&#xD;&#xA;Edge and loop shapes use the same vertex storage as a polygon." />
  <row Id="25810" PostHistoryTypeId="25" PostId="11911" RevisionGUID="155bb98e-9db7-47b4-a3a0-d954aab051c1" CreationDate="2011-05-04T06:11:25.493" Comment="http://twitter.com/#!/StackGameDev/status/65659778495553536" />
  <row Id="25811" PostHistoryTypeId="4" PostId="11911" RevisionGUID="f28af9bf-b2d4-4828-a826-c21b84a5c99c" CreationDate="2011-05-04T06:27:01.100" UserId="2698" Comment="Let's get some grammar up in here" Text="Get Vertices of a Shape/Body in Box2D" />
  <row Id="25812" PostHistoryTypeId="24" PostId="11911" RevisionGUID="f28af9bf-b2d4-4828-a826-c21b84a5c99c" CreationDate="2011-05-04T06:27:01.100" Comment="Proposed by 2698 approved by 51 edit id of 405" />
  <row Id="25813" PostHistoryTypeId="2" PostId="11914" RevisionGUID="dc8e6529-940e-4bf1-92f9-e4cf6496a099" CreationDate="2011-05-04T06:32:30.493" UserId="1263" Text="I've been seeing lots of simple interactive programs popping up all over the internet that generate basic music, usually quite nice sounding, from simple interactions from the user. [Otomata][1] is one recent popular example; on the iDevices there are a variety of programs, like [Bloom][2].&#xD;&#xA;&#xD;&#xA;I'm just wondering how these programs work. How do they generate the music live? Are there established APIs for doing this? I'm interested in the technical aspects of how this is implemented. My knowledge is so lacking here I'm honestly not sure how to better phrase the question. Ask if anything isn't clear!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.earslap.com/projectslab/otomata&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=YJkMdm5T1PY&amp;feature=related" />
  <row Id="25814" PostHistoryTypeId="1" PostId="11914" RevisionGUID="dc8e6529-940e-4bf1-92f9-e4cf6496a099" CreationDate="2011-05-04T06:32:30.493" UserId="1263" Text="Interactive music games" />
  <row Id="25815" PostHistoryTypeId="3" PostId="11914" RevisionGUID="dc8e6529-940e-4bf1-92f9-e4cf6496a099" CreationDate="2011-05-04T06:32:30.493" UserId="1263" Text="&lt;sound&gt;&lt;music&gt;" />
  <row Id="25816" PostHistoryTypeId="10" PostId="11891" RevisionGUID="c43d7c50-6de9-42ee-a6f4-b06df7a06542" CreationDate="2011-05-04T06:34:17.333" UserId="-1" CloseReasonId="3" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25817" PostHistoryTypeId="2" PostId="11915" RevisionGUID="50236cde-e562-4ad2-8346-cfafda02db59" CreationDate="2011-05-04T07:34:41.100" UserId="3656" Text="Your question can be broken down into 2 components:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;##1. How do I generate musical sounds and timbres, and then play that through the speaker?&#xD;&#xA;&#xD;&#xA;This is even a 2-parter:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;###1.1. How do I generate any kind of sound and play it back through the speaker?&#xD;&#xA;&#xD;&#xA;Audio data is frequently represented and processed in 32 bit floating point numbers ranging from -1.0 to 1.0, representing. Open up an audio file in Audacity and zoom in to the sample level to see individual pieces of data. When you write data either to a sound file or to an audio buffer that goes out to the sound card, you typically map these -1.0 to 1.0 values to a fixed scale (no fractional values) of 0 to 65536 (for 16 bit depth) or 0 to 16777216 (for 24 bit depth).&#xD;&#xA;&#xD;&#xA;Once you have your buffer constructed, you feed it to your sound device. This is library and platform-specific.&#xD;&#xA;&#xD;&#xA;* Flash 10 added support for dynamically generating sound via the [SampleDataEvent][1] of the Sound class. You create a Sound object, but don't load any data into it. When you call Sound.play(), it will fire the SampleDataEvent, and the data member of SampleDataEvent will be a bytearray you can feed samples into. Read the docs for details.&#xD;&#xA;&#xD;&#xA;* XNA recently gave you the option of using [DynamicSoundEffectInstance][2], which is similar to Flash's sampleDataEvent.&#xD;&#xA;&#xD;&#xA;* iOS seems to support AudioUnits, which are a standard way of generating sound in Cocoa (disclaimer: haven't used them myself). You could use this in a Mac application as well. (example: http://cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html)&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;###1.2 How do I make my generated sound musical?&#xD;&#xA;&#xD;&#xA;For a sound wave to have a sense of pitch, it must be generally periodic (obviously sound waves from instruments are not perfectly periodic, but we're talking broad strokes here). Any periodic wave can be constructed by adding together multiple waves of different frequencies and phases.&#xD;&#xA;&#xD;&#xA;An spectrum analysis will show that the frequency with the greatest amplitude will generally be the pitch that the sound is perceived as. See [this figure][3]. To add depth, you also add waves with frequencies that are integer multiples of the base frequency (see the [overtone or harmonic series][4]).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;##2. How do I use my new robot zombie sounds to generate music on the fly?&#xD;&#xA;&#xD;&#xA;This is a really open ended question, and is half of the fun of computer music. You can start somewhere as basic as selecting notes at random from a predefined scale, and then from there implement random rhythm variation as another step.&#xD;&#xA;&#xD;&#xA;People do everything from selecting portions of music from a database of pre-written compositions (there's a really really thick book on a project to get a program to write 2-part Inventions in the style of Bach), to applying genetic algorithms to an initial interval vector and apply the results to different starting pitches.&#xD;&#xA;&#xD;&#xA;Eventually you'll want to think about how to create larger movements of smaller, randomly generated musical components. As you start building up, this is where you can begin to insert game hooks. Maybe the angle of the mobile device can alter the range of notes, and when bad guys arrive you change the set of pitches in the scale to closer resemble a minor rather than a major scale, or adjust other properties such as attack envelopes and frequency of note events.&#xD;&#xA;&#xD;&#xA;Timing can be tricky, because you don't want to be polling the elapsed time of your audio source, but you also want to be accurate. In Flash you can get away with musical timing for long sound cues if a 50ms delay is acceptable and it wouldn't be too obvious if you faded out one sound then started it again on another channel in sync with everything else. Just use your basic math to figure out beat and tempo to millisecond interval conversions.&#xD;&#xA;&#xD;&#xA;--------&#xD;&#xA;##*There's a whole wide world of audio programming fun out there*&#xD;&#xA;&#xD;&#xA;A book that I haven't managed to read much of yet (damn school) is [The Audio Programming Book][5] by Richard Boulanger and Victor Lazzarini. The first 60-70 pages are a basic C primer wrapped up in music-specfic examples and may get a little boring, but they get to the good stuff later on like oscillators and filters.&#xD;&#xA;&#xD;&#xA;There's a lot of popular visual tools, libraries, and mini programming languages for creating or prototyping computer music:&#xD;&#xA;&#xD;&#xA;* [PureData][6]&#xD;&#xA;* [MaxMSP][7]&#xD;&#xA;* [Chuck][8]&#xD;&#xA;* [JSyn][9]&#xD;&#xA;* [JMusic][10]&#xD;&#xA;* [CSound][11]&#xD;&#xA;&#xD;&#xA;The newfangled &quot;creative computing&quot; frameworks like Processing, OpenFrameworks, and Cinder all have some basic audio capability as well, but nowhere near what you get with these dedicated tools. A classmate of mine models HRTFs in SuperCollider to simulate environments in a basic 3d environment. Another fun thing is to pipe OSC out of Unity and let it control a MaxMSP patch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.dynamicsoundeffectinstance_members.aspx&#xD;&#xA;  [3]: http://www.google.com/imgres?imgurl=http://kozco.com/tech/audacity/piano_G1.jpg&amp;imgrefurl=http://forum.audacityteam.org/viewtopic.php?f=28&amp;t=15649&amp;usg=__e_ot-tFBs14vDoteUivktnXh1es=&amp;h=1040&amp;w=1530&amp;sz=89&amp;hl=en&amp;start=0&amp;zoom=1&amp;tbnid=JEFyoAg6ZV46hM:&amp;tbnh=149&amp;tbnw=219&amp;ei=D_vATajsG4bUgQeu7Ln3BQ&amp;prev=/search?q=frequency%2bspectrum%2bpitch%2bpiano&amp;um=1&amp;hl=en&amp;biw=1022&amp;bih=802&amp;tbm=isch&amp;um=1&amp;itbs=1&amp;iact=hc&amp;vpx=142&amp;vpy=274&amp;dur=526&amp;hovh=185&amp;hovw=272&amp;tx=132&amp;ty=116&amp;page=1&amp;ndsp=16&amp;ved=1t:429,r:4,s:0&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Harmonic_series_%28music%29&#xD;&#xA;  [5]: http://www.amazon.com/Audio-Programming-Book-Richard-Boulanger/dp/0262014467&#xD;&#xA;  [6]: http://puredata.info/&#xD;&#xA;  [7]: http://cycling74.com/products/maxmspjitter/&#xD;&#xA;  [8]: http://chuck.cs.princeton.edu/&#xD;&#xA;  [9]: http://www.softsynth.com/jsyn/&#xD;&#xA;  [10]: http://jmusic.ci.qut.edu.au/&#xD;&#xA;  [11]: http://www.csounds.com/" />
  <row Id="25818" PostHistoryTypeId="5" PostId="11915" RevisionGUID="5ec9074f-a989-4b28-a639-7561a3e8348c" CreationDate="2011-05-04T07:42:26.613" UserId="3656" Comment="more clarification" Text="Your question can be broken down into 2 components:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;##1. How do I generate musical sounds and timbres, and then play that through the speaker?&#xD;&#xA;&#xD;&#xA;This is even a 2-parter:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;###1.1. How do I generate any kind of sound and play it back through the speaker?&#xD;&#xA;&#xD;&#xA;Audio data is frequently represented and processed in 32 bit floating point numbers ranging from -1.0 to 1.0, representing. Open up an audio file in Audacity and zoom in to the sample level to see individual pieces of data. When you write data either to a sound file or to an audio buffer that goes out to the sound card, you typically map these -1.0 to 1.0 values to a fixed scale (no fractional values) of 0 to 65536 (for 16 bit depth) or 0 to 16777216 (for 24 bit depth).&#xD;&#xA;&#xD;&#xA;Once you have your buffer constructed, you feed it to your sound device. This is library and platform-specific.&#xD;&#xA;&#xD;&#xA;* Flash 10 added support for dynamically generating sound via the [SampleDataEvent][1] of the Sound class. You create a Sound object, but don't load any data into it. When you call Sound.play(), it will fire the SampleDataEvent, and the data member of SampleDataEvent will be a bytearray you can feed samples into. Read the docs for details.&#xD;&#xA;&#xD;&#xA;* XNA recently gave you the option of using [DynamicSoundEffectInstance][2], which is similar to Flash's sampleDataEvent.&#xD;&#xA;&#xD;&#xA;* iOS seems to support AudioUnits, which are a standard way of generating sound in Cocoa (disclaimer: haven't used them myself). You could use this in a Mac application as well. (example: http://cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html)&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;###1.2 How do I make my generated sound musical?&#xD;&#xA;&#xD;&#xA;For a sound wave to have a sense of pitch, it must be generally periodic (obviously sound waves from instruments are not perfectly periodic, but we're talking broad strokes here). Any periodic wave can be constructed by adding together multiple waves of different frequencies and phases.&#xD;&#xA;&#xD;&#xA;An spectrum analysis will show that the frequency with the greatest amplitude will generally be the pitch that the sound is perceived as. See [this figure][3]. To add depth, you also add waves with frequencies that are integer multiples of the base frequency (see the [overtone or harmonic series][4]).&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;##2. How do I use my new robot zombie sounds to generate music on the fly?&#xD;&#xA;&#xD;&#xA;This is a really open ended question, and is half of the fun of computer music. You can start somewhere as basic as selecting notes at random from a predefined scale, and then from there implement random rhythm variation as another step.&#xD;&#xA;&#xD;&#xA;People do everything from selecting portions of music from a database of pre-written compositions (there's a really really thick book on a project to get a program to write 2-part Inventions in the style of Bach), to applying genetic algorithms to an initial interval vector and apply the results to different starting pitches.&#xD;&#xA;&#xD;&#xA;Eventually you'll want to think about how to create larger movements of smaller, randomly generated musical components. As you start building up, this is where you can begin to insert game hooks. Maybe the angle of the mobile device can alter the range of notes, and when bad guys arrive you change the set of pitches in the scale to closer resemble a minor rather than a major scale, or adjust other properties such as attack envelopes and frequency of note events.&#xD;&#xA;&#xD;&#xA;Timing can be tricky, because you don't want to be polling the elapsed time of your audio source, but you also want to be accurate. Relying on &quot;sound complete&quot; type of events will generally be much too slow. In Flash you can get away with musical timing for long sound cues if a 50ms delay is acceptable and it wouldn't be too obvious if you faded out one sound then started it again on another channel in sync with everything else. The catch is you need to check Channel.position on every frame update, unless you're manipulating your own sample data, in which case you're crunching a lot of data anyway just copying stuff to the SampleDataEvent buffer. Performance aside, just use basic ratios to figure out beat and tempo to millisecond interval conversions.&#xD;&#xA;&#xD;&#xA;--------&#xD;&#xA;##*There's a whole wide world of audio programming fun out there*&#xD;&#xA;&#xD;&#xA;A book that I haven't managed to read much of yet (damn school) is [The Audio Programming Book][5] by Richard Boulanger and Victor Lazzarini. The first 60-70 pages are a basic C primer wrapped up in music-specfic examples and may get a little boring, but they get to the good stuff later on like oscillators and filters.&#xD;&#xA;&#xD;&#xA;There's a lot of popular visual tools, libraries, and mini programming languages for creating or prototyping computer music:&#xD;&#xA;&#xD;&#xA;* [PureData][6]&#xD;&#xA;* [MaxMSP][7]&#xD;&#xA;* [Chuck][8]&#xD;&#xA;* [JSyn][9]&#xD;&#xA;* [JMusic][10]&#xD;&#xA;* [CSound][11]&#xD;&#xA;&#xD;&#xA;The newfangled &quot;creative computing&quot; frameworks like Processing, OpenFrameworks, and Cinder all have some basic audio capability as well, but nowhere near what you get with these dedicated tools. A classmate of mine models HRTFs in SuperCollider to simulate environments in a basic 3d environment. Another fun thing is to pipe OSC out of Unity and let it control a MaxMSP patch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.audio.dynamicsoundeffectinstance_members.aspx&#xD;&#xA;  [3]: http://www.google.com/imgres?imgurl=http://kozco.com/tech/audacity/piano_G1.jpg&amp;imgrefurl=http://forum.audacityteam.org/viewtopic.php?f=28&amp;t=15649&amp;usg=__e_ot-tFBs14vDoteUivktnXh1es=&amp;h=1040&amp;w=1530&amp;sz=89&amp;hl=en&amp;start=0&amp;zoom=1&amp;tbnid=JEFyoAg6ZV46hM:&amp;tbnh=149&amp;tbnw=219&amp;ei=D_vATajsG4bUgQeu7Ln3BQ&amp;prev=/search?q=frequency%2bspectrum%2bpitch%2bpiano&amp;um=1&amp;hl=en&amp;biw=1022&amp;bih=802&amp;tbm=isch&amp;um=1&amp;itbs=1&amp;iact=hc&amp;vpx=142&amp;vpy=274&amp;dur=526&amp;hovh=185&amp;hovw=272&amp;tx=132&amp;ty=116&amp;page=1&amp;ndsp=16&amp;ved=1t:429,r:4,s:0&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Harmonic_series_%28music%29&#xD;&#xA;  [5]: http://www.amazon.com/Audio-Programming-Book-Richard-Boulanger/dp/0262014467&#xD;&#xA;  [6]: http://puredata.info/&#xD;&#xA;  [7]: http://cycling74.com/products/maxmspjitter/&#xD;&#xA;  [8]: http://chuck.cs.princeton.edu/&#xD;&#xA;  [9]: http://www.softsynth.com/jsyn/&#xD;&#xA;  [10]: http://jmusic.ci.qut.edu.au/&#xD;&#xA;  [11]: http://www.csounds.com/" />
  <row Id="25819" PostHistoryTypeId="25" PostId="11914" RevisionGUID="ec7e3db9-92d2-4535-a811-cf0ebe7c18f9" CreationDate="2011-05-04T09:11:25.410" Comment="http://twitter.com/#!/StackGameDev/status/65705075699494912" />
  <row Id="25820" PostHistoryTypeId="2" PostId="11916" RevisionGUID="ed4dd8d2-d7d0-4a6b-8df7-d8e3dac283d6" CreationDate="2011-05-04T09:35:31.153" UserId="7102" Text="I have a code, that add a vertex array to a shape, my code is:&#xD;&#xA;&#xD;&#xA;    PolygonDef shape 	= new PolygonDef(); &#xD;&#xA;            for (int i=0; i&lt;vertices.size(); i++) {&#xD;&#xA;            	Vec2 v = vertices.get(i);&#xD;&#xA;            	shape.addVertex(new Vec2(v.x/RATIO,v.y/RATIO));&#xD;&#xA;            }        &#xD;&#xA;&#xD;&#xA;But its very strange because not working good on any of my polygon creator tool. &#xD;&#xA;&#xD;&#xA;So with a triangle, it work good:&#xD;&#xA;&#xD;&#xA;    	ArrayList&lt;Vec2&gt; vertices=new ArrayList&lt;Vec2&gt;();&#xD;&#xA;    	&#xD;&#xA;		vertices.add(new Vec2(0,-size.height/2));&#xD;&#xA;		vertices.add(new Vec2(size.width/2,size.height/2));&#xD;&#xA;		vertices.add(new Vec2(-size.width/2,size.height/2));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but with a bigger polygon its not working, (vertex count =50-60 )&#xD;&#xA;&#xD;&#xA;How I can create a usable vertex array from a shape? I have a greyscaled image with black and white colors... How can use this shape(image) to define my vertex array good?&#xD;&#xA;&#xD;&#xA;And in box2D with the addVertex how I can add this points to make a normal usable polygon? (counter clockwise?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25821" PostHistoryTypeId="1" PostId="11916" RevisionGUID="ed4dd8d2-d7d0-4a6b-8df7-d8e3dac283d6" CreationDate="2011-05-04T09:35:31.153" UserId="7102" Text="How to create a vertex array from any shape in BOX2D?" />
  <row Id="25822" PostHistoryTypeId="3" PostId="11916" RevisionGUID="ed4dd8d2-d7d0-4a6b-8df7-d8e3dac283d6" CreationDate="2011-05-04T09:35:31.153" UserId="7102" Text="&lt;box2d&gt;" />
  <row Id="25823" PostHistoryTypeId="2" PostId="11917" RevisionGUID="461d6743-79cd-4f4c-bca2-584d468ba83d" CreationDate="2011-05-04T09:49:06.937" UserId="744" Text="&lt;a href=&quot;http://code.google.com/p/jbox2d/source/browse/trunk/jbox2d/src/org/jbox2d/common/Settings.java#100&quot;&gt;(J)Box2D polygons are limited to 8 vertices.&lt;/a&gt; When you say it's &quot;not working&quot; I assume you mean you're getting the assert that fires when you pass in arrays that are too large, which should've led you to this yourself.&#xD;&#xA;&#xD;&#xA;You will need to triangulate your polygons." />
  <row Id="25824" PostHistoryTypeId="5" PostId="11916" RevisionGUID="6087ce9c-e8f0-40b3-b508-b1344950db1b" CreationDate="2011-05-04T09:50:34.893" UserId="744" Comment="deleted 25 characters in body; edited tags; edited title" Text="I have a code, that add a vertex array to a shape, my code is:&#xD;&#xA;&#xD;&#xA;    PolygonDef shape = new PolygonDef(); &#xD;&#xA;    for (int i=0; i&lt;vertices.size(); i++) {&#xD;&#xA;        Vec2 v = vertices.get(i);&#xD;&#xA;        shape.addVertex(new Vec2(v.x/RATIO,v.y/RATIO));&#xD;&#xA;    }        &#xD;&#xA;&#xD;&#xA;But its very strange because not working good on any of my polygon creator tool. &#xD;&#xA;&#xD;&#xA;So with a triangle, it work good:&#xD;&#xA;&#xD;&#xA;    	ArrayList&lt;Vec2&gt; vertices = new ArrayList&lt;Vec2&gt;();&#xD;&#xA;    	&#xD;&#xA;		vertices.add(new Vec2(0,-size.height/2));&#xD;&#xA;		vertices.add(new Vec2(size.width/2,size.height/2));&#xD;&#xA;		vertices.add(new Vec2(-size.width/2,size.height/2));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but with a bigger polygon of 50 to 60 vertices it's not working.&#xD;&#xA;&#xD;&#xA;How I can create a usable vertex array from a shape? I have a greyscaled image with black and white colors... How can use this shape (image) to define my vertex array good?&#xD;&#xA;&#xD;&#xA;And in box2D with the addVertex how I can add this points to make a normal usable polygon? (counter clockwise?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25825" PostHistoryTypeId="4" PostId="11916" RevisionGUID="6087ce9c-e8f0-40b3-b508-b1344950db1b" CreationDate="2011-05-04T09:50:34.893" UserId="744" Comment="deleted 25 characters in body; edited tags; edited title" Text="How to create a vertex array from any shape in JBox2D?" />
  <row Id="25826" PostHistoryTypeId="6" PostId="11916" RevisionGUID="6087ce9c-e8f0-40b3-b508-b1344950db1b" CreationDate="2011-05-04T09:50:34.893" UserId="744" Comment="deleted 25 characters in body; edited tags; edited title" Text="&lt;java&gt;&lt;box2d&gt;" />
  <row Id="25827" PostHistoryTypeId="4" PostId="8720" RevisionGUID="ba25bee2-2fd5-41da-a239-2561da5b180a" CreationDate="2011-05-04T10:52:15.680" UserId="2229" Comment="changed topic to be more precise" Text="OpenGL ES 2.0: Picking Sprite Polygons from within VBO" />
  <row Id="25828" PostHistoryTypeId="2" PostId="11918" RevisionGUID="9871674e-b964-463c-957f-c2b7f8514615" CreationDate="2011-05-04T11:40:38.150" UserId="747" Text="I'm not a professionnal game dev, and only tried implementing IoC in C++ once, so this is just speculating. &#xD;&#xA;&#xD;&#xA;However, I suspect game developers's would be suspicious about IoC because it means : &#xD;&#xA;&#xD;&#xA;1/ designing lots of interfaces and lots of small classes &#xD;&#xA;&#xD;&#xA;2/ having pretty much every function call being lately bound&#xD;&#xA;&#xD;&#xA;Now, it might be a coincidence, but both tend to be a little bit more complicated and/or problematic for performances in C++ (which is widely used in game, isn't it ?) than in Java , where IoC became widespread (Probably because it was relatively easy to do, help people design saner object hierarchies, and because some believed it could turn writing an a application in Java into writing an application in XML, but that's another debate :P)&#xD;&#xA;&#xD;&#xA;I'm interested in the comments if that does not make any sense at all ;)" />
  <row Id="25829" PostHistoryTypeId="25" PostId="11916" RevisionGUID="f4fe1137-f791-4e02-b856-95c64d8db11a" CreationDate="2011-05-04T12:11:25.437" Comment="http://twitter.com/#!/StackGameDev/status/65750374748921856" />
  <row Id="25830" PostHistoryTypeId="2" PostId="11919" RevisionGUID="e95e621c-6969-473d-9437-3dff9dd0d4c3" CreationDate="2011-05-04T12:56:46.707" UserId="6203" Text="How can I &quot;glue&quot; more objects to each other so I get one object? (It is for resizing models), couldn't find anything about it on the internet, but I'm dutch, so maybe that's why. Thank you very much! " />
  <row Id="25831" PostHistoryTypeId="1" PostId="11919" RevisionGUID="e95e621c-6969-473d-9437-3dff9dd0d4c3" CreationDate="2011-05-04T12:56:46.707" UserId="6203" Text="How to make one solid object in Maya?" />
  <row Id="25832" PostHistoryTypeId="3" PostId="11919" RevisionGUID="e95e621c-6969-473d-9437-3dff9dd0d4c3" CreationDate="2011-05-04T12:56:46.707" UserId="6203" Text="&lt;objects&gt;" />
  <row Id="25833" PostHistoryTypeId="2" PostId="11920" RevisionGUID="40252a70-d052-4d8a-85c6-a5619a3c0201" CreationDate="2011-05-04T13:13:02.890" UserId="5401" Text="In our game, we set the acceleration due to gravity to the appropriate value of 9.8 m/s^2. Although physically correct, it feels more like moving around on the moon.. It feels about right at a value of 16 m/s^2. Has anyone else experienced this? Is it only because we don't have motion blur, or sound to give the apparent feeling of speed?&#xD;&#xA;Is it OK to just to set it to 16 m/s^2 if it feels right?" />
  <row Id="25834" PostHistoryTypeId="1" PostId="11920" RevisionGUID="40252a70-d052-4d8a-85c6-a5619a3c0201" CreationDate="2011-05-04T13:13:02.890" UserId="5401" Text="Gravity strength in first person games" />
  <row Id="25835" PostHistoryTypeId="3" PostId="11920" RevisionGUID="40252a70-d052-4d8a-85c6-a5619a3c0201" CreationDate="2011-05-04T13:13:02.890" UserId="5401" Text="&lt;3d&gt;&lt;physics&gt;&lt;first-person-shooter&gt;" />
  <row Id="25836" PostHistoryTypeId="2" PostId="11921" RevisionGUID="0c1d6d93-3dda-4849-b68b-8d8097a8fdbc" CreationDate="2011-05-04T13:21:42.157" UserId="382" Text="I'd say go with whatever feels and plays right.&#xD;&#xA;&#xD;&#xA;Don't forget that your physics implementation is only ever going to be an approximation of the real world and that sometimes getting things &quot;too close&quot; to reality makes the game unplayable. Also there may be something else in your simulation that's &quot;off&quot; - perhaps the mass of the model used to represent the player. Double check that as well.&#xD;&#xA;&#xD;&#xA;More than a few years ago I was involved with a helicopter simulator and the client wanted the controls to be &quot;realistic&quot;. It failed because it was unplayable. Making the controls simpler made the game playable." />
  <row Id="25837" PostHistoryTypeId="2" PostId="11922" RevisionGUID="b0a6ae45-d1bb-4563-aa6a-74d1456efffa" CreationDate="2011-05-04T13:24:46.813" UserId="6937" Text="It could be that your scale is off. If you are looking at a brick and it seems to fall slower than it should, you may just have it scaled larger than a brick should be. I had this problem when I was working the physX engine. My entire scene was about 3x too big so I scaled it down and it worked.&#xD;&#xA;&#xD;&#xA;If 16 seems better than 9.8 but you want to use 9.8. Just multiply the size of the object falling by 0.61. Which should scale it down to where 9.8 gives you the desired effect." />
  <row Id="25838" PostHistoryTypeId="2" PostId="11923" RevisionGUID="9ebdae7b-8fee-4c43-b506-baf0d6088092" CreationDate="2011-05-04T13:30:06.247" UserId="6655" Text="Modelling everything in the metric system I also observed that gravity feels much too weak with regards to the player jumping (in a platformer). Much like &quot;on the moon&quot;, &quot;jelly&quot;, &quot;too much phyics&quot;, not &quot;arcade&quot; enough. On the other hand players in games are regularly able to jump to great unrealistic height too.&#xD;&#xA;&#xD;&#xA;TLDR: high gravity feels very fast paced and arcade, realistic gravity sometimes might not give the desired game experience." />
  <row Id="25839" PostHistoryTypeId="5" PostId="11921" RevisionGUID="e319244d-22d5-456e-baf3-a02ea16871eb" CreationDate="2011-05-04T13:30:27.330" UserId="382" Comment="removed pointless example." Text="I'd say go with whatever feels and plays right. However, it would be better if you were using the correct value - if only so you or other developers don't have a WTF moment when you revisit the code 6 months down the line.&#xD;&#xA;&#xD;&#xA;Don't forget that your physics implementation is only ever going to be an approximation of the real world and that sometimes getting things &quot;too close&quot; to reality makes the game unplayable. Also there may be something else in your simulation that's &quot;off&quot;. Double check that as well.&#xD;&#xA;&#xD;&#xA;More than a few years ago I was involved with a helicopter simulator and the client wanted the controls to be &quot;realistic&quot;. It failed because it was unplayable. Making the controls simpler made the game playable." />
  <row Id="25840" PostHistoryTypeId="2" PostId="11924" RevisionGUID="351cdde5-a0cf-4ed0-9cc5-904ea7f354e9" CreationDate="2011-05-04T13:30:30.127" UserId="6937" Text="If you want them to be resized, moved, and rotated together, use Grouping. Just select all of the models and click Edit-&gt;Group. This will allow them to be edited together." />
  <row Id="25841" PostHistoryTypeId="5" PostId="11922" RevisionGUID="7034a201-a633-4203-b0d4-402bf2b903e6" CreationDate="2011-05-04T13:35:41.103" UserId="6937" Comment="added 505 characters in body" Text="It could be that your scale is off. If you are looking at a brick and it seems to fall slower than it should, you may just have it scaled larger than a brick should be. I had this problem when I was working the physX engine. My entire scene was about 3x too big so I scaled it down and it worked.&#xD;&#xA;&#xD;&#xA;If 16 seems better than 9.8 but you want to use 9.8. Just multiply the size of the object falling by 0.61. Which should scale it down to where 9.8 gives you the desired effect.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;To fix this. I made an object that should be 1 meter tall. I scale it until it seems to fall at the right speed. Whatever the world units are compared to the new scale gives me my new unit scale. Example. If the object was scaled to 0.14 then that represents 1 meter in the game world. Make a ruler object that is .14 tall and when you design the level you will be able to use that ruler to scale everything correctly. That will cause everything to look like it's falling correctly at 9.8 m/ss." />
  <row Id="25842" PostHistoryTypeId="4" PostId="8720" RevisionGUID="1fcab30a-9b7b-4a06-9bf6-bf49e6a5a06b" CreationDate="2011-05-04T14:21:26.310" UserId="2229" Comment="edited title" Text="OpenGL ES 2.0: Picking Polygon Sprites from within VBO" />
  <row Id="25847" PostHistoryTypeId="5" PostId="11777" RevisionGUID="89fd5a82-f6bd-4b50-872e-d7282006f9ad" CreationDate="2011-05-04T15:08:59.100" UserId="7066" Comment="removed spurious words" Text="I'm developing a game at the moment and I had an idea where the game's story line would randomly generate as the player progressed and their actions would affect the story. &#xD;&#xA;&#xD;&#xA;Would this be a bad idea in terms of gameplay or would a storyline that has multiple endings be the best idea?" />
  <row Id="25848" PostHistoryTypeId="24" PostId="11777" RevisionGUID="89fd5a82-f6bd-4b50-872e-d7282006f9ad" CreationDate="2011-05-04T15:08:59.100" Comment="Proposed by 7066 approved by 14 edit id of 406" />
  <row Id="25849" PostHistoryTypeId="25" PostId="11920" RevisionGUID="79facf4c-4c94-4cf4-b405-0c85b5340cc2" CreationDate="2011-05-04T15:11:25.820" Comment="http://twitter.com/#!/StackGameDev/status/65795675341856768" />
  <row Id="25851" PostHistoryTypeId="2" PostId="11927" RevisionGUID="5e5f1209-9ffc-468b-a73c-6beebfd3df37" CreationDate="2011-05-04T15:23:46.337" UserId="5966" Text="I'm beginning Bullet3D. Can I change collision shape of a rigid body after it created? A rigid body accepts a collision shape when it's creating, but it's hard to find options changes the collision shape of an instance." />
  <row Id="25852" PostHistoryTypeId="1" PostId="11927" RevisionGUID="5e5f1209-9ffc-468b-a73c-6beebfd3df37" CreationDate="2011-05-04T15:23:46.337" UserId="5966" Text="Can I change shape of a rigid body after it created in Bullet3D?" />
  <row Id="25853" PostHistoryTypeId="3" PostId="11927" RevisionGUID="5e5f1209-9ffc-468b-a73c-6beebfd3df37" CreationDate="2011-05-04T15:23:46.337" UserId="5966" Text="&lt;physics&gt;&lt;bullet-physics&gt;" />
  <row Id="25854" PostHistoryTypeId="2" PostId="11928" RevisionGUID="163b2120-0266-4779-bf6f-3c53f807ac43" CreationDate="2011-05-04T15:35:36.617" UserId="1430" Text="As far as I know, you can't. You'd have swap out the entire rigid body object, I would imagine." />
  <row Id="25855" PostHistoryTypeId="4" PostId="11777" RevisionGUID="d4b56a5b-5494-4f12-a8c3-3e7fe8a8d564" CreationDate="2011-05-04T15:37:00.267" UserId="1430" Comment="edited title" Text="Randomly generated story" />
  <row Id="25856" PostHistoryTypeId="2" PostId="11929" RevisionGUID="51540230-cc07-4559-805c-78ebea97338e" CreationDate="2011-05-04T16:22:26.310" UserId="1430" Text="Does your application actually fail to run, or does it just print that message to the output window and continue (there's no timestamps in the output window, alas, so I can't tell how much time elapsed between the first-chance message and the program-is-exiting message)?&#xD;&#xA;&#xD;&#xA;First-chance exception messages like that aren't always indicative of a problem that needs to be solved, especially if they occur in code that isn't yours (unfortunately).&#xD;&#xA;&#xD;&#xA;If you *are* crashing, I've seen [this issue (and a fix for it)][1] regarding WP7 development tools and another external assembly (not the Advertising SDK directly, but perhaps it's a related problem that could be solved with the same steps).&#xD;&#xA;&#xD;&#xA;Other things you might try include turning on &quot;break on throw&quot; for all managed exceptions and disabling &quot;Just my code&quot; in the Options section of Visual Studio to see if you can break into the debugger when the exception is thrown -- this will let you examine the [exception's][2] FileName property and determine exactly which assembly isn't loaded -- this exception is thrown generally when the CLR finds an assembly but can't get it to load for whatever reason. &#xD;&#xA;&#xD;&#xA;It's possible you won't be able to trap the exception if if occurs too deeply in code that belongs to the CLR loader, in which case you may need to use WinDbg or [load the SOS.dll directly into VS][3] to trap and print the exception (look into `sxe clr` in WinDbg and `!pe` from SOS).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://timheuer.com/blog/archive/2010/04/29/windows-phone-tools-update-april-2010-silverlight-xna.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/system.io.fileloadexception.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/bb190764.aspx" />
  <row Id="25858" PostHistoryTypeId="2" PostId="11930" RevisionGUID="3d6415d4-8ca2-486b-96b2-4e8d9ccfc717" CreationDate="2011-05-04T17:06:04.853" UserId="7114" Text="I'm working on a very small game, a puzzle in first person similar to games like Portal and The Trap: http://www.youtube.com/watch?v=Z3ELRzlGegc &#xD;&#xA;&#xD;&#xA;I would love to hear some ideas about challenges, and most importantly, keeping the player addicted." />
  <row Id="25859" PostHistoryTypeId="1" PostId="11930" RevisionGUID="3d6415d4-8ca2-486b-96b2-4e8d9ccfc717" CreationDate="2011-05-04T17:06:04.853" UserId="7114" Text="Ideas for a puzzle in first-person" />
  <row Id="25860" PostHistoryTypeId="3" PostId="11930" RevisionGUID="3d6415d4-8ca2-486b-96b2-4e8d9ccfc717" CreationDate="2011-05-04T17:06:04.853" UserId="7114" Text="&lt;game-design&gt;&lt;first-person-shooter&gt;&lt;puzzle&gt;" />
  <row Id="25861" PostHistoryTypeId="10" PostId="11930" RevisionGUID="4ff09454-ccbd-4200-93ae-18485a429f63" CreationDate="2011-05-04T17:22:47.527" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="25862" PostHistoryTypeId="2" PostId="11931" RevisionGUID="0ed8b6d3-c48a-435f-935d-32f001e9473d" CreationDate="2011-05-04T18:01:16.417" UserId="5459" Text="I have strange problem with drawing skybox texture on Mac. On iPhone everything is going fine. I have tried to change near and far planes value with no success.&#xD;&#xA;&#xD;&#xA;It is skybox of six textures and for every texture I set this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;What could be a problem?&#xD;&#xA;&#xD;&#xA;Screenshot:&#xD;&#xA;![screen][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JH2qM.jpg" />
  <row Id="25863" PostHistoryTypeId="1" PostId="11931" RevisionGUID="0ed8b6d3-c48a-435f-935d-32f001e9473d" CreationDate="2011-05-04T18:01:16.417" UserId="5459" Text="OPENGL - Skybox texture artifact on edge" />
  <row Id="25864" PostHistoryTypeId="3" PostId="11931" RevisionGUID="0ed8b6d3-c48a-435f-935d-32f001e9473d" CreationDate="2011-05-04T18:01:16.417" UserId="5459" Text="&lt;opengl&gt;&lt;textures&gt;&lt;macos&gt;" />
  <row Id="25865" PostHistoryTypeId="25" PostId="11931" RevisionGUID="3492ecab-63c0-43ab-99c1-35c0ad48dcf5" CreationDate="2011-05-04T18:11:25.890" Comment="http://twitter.com/#!/StackGameDev/status/65840973082660865" />
  <row Id="25866" PostHistoryTypeId="2" PostId="11932" RevisionGUID="457a1571-43a4-4d88-b2bc-e242a4fe6ca0" CreationDate="2011-05-04T18:17:49.173" UserId="7116" Text="When my application goes into full screen state my movement is not smooth, seems like frames are not rendered in the correct order, doing something like : 1 - 3 - 2 - 4 - 6 - 5 - ...&#xD;&#xA;It makes the move &quot;flicker&quot;&#xD;&#xA;&#xD;&#xA;For my PIX test, I draw really a low number of primitive (1140 triangle exactly) inside 6 VB + IB&#xD;&#xA;&#xD;&#xA;I clearly see a difference in the GPU frame &quot;ordering&quot; in PIX :&#xD;&#xA;&#xD;&#xA;Here is the result when in windowed mode :&#xD;&#xA;[PIX screenshot1][1]&#xD;&#xA;You can see that the GPU time needed for the frame is nearly in sync with the CPU time needed to generate it.&#xD;&#xA;&#xD;&#xA;But in full screen state here is what I got (same scene, withtout camera move) : [PIX screenshot2][2]&#xD;&#xA;&#xD;&#xA;You can see, that each GPU frame processing are splitted in minimum in 2 part, and the GPU doesn't wait the end of a frame for starting another one.&#xD;&#xA;Do you know what can be the cause of this ?&#xD;&#xA;&#xD;&#xA;Tx you for your help ! &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.s33m3.be/PIX/PIX2.png&#xD;&#xA;  [2]: http://www.s33m3.be/PIX/PIX.png" />
  <row Id="25867" PostHistoryTypeId="1" PostId="11932" RevisionGUID="457a1571-43a4-4d88-b2bc-e242a4fe6ca0" CreationDate="2011-05-04T18:17:49.173" UserId="7116" Text="[PIX] DirectX - Help interpreting PIX result." />
  <row Id="25868" PostHistoryTypeId="3" PostId="11932" RevisionGUID="457a1571-43a4-4d88-b2bc-e242a4fe6ca0" CreationDate="2011-05-04T18:17:49.173" UserId="7116" Text="&lt;directx10&gt;&lt;slimdx&gt;" />
  <row Id="25870" PostHistoryTypeId="5" PostId="11931" RevisionGUID="42e4cc86-14e5-4f83-a0f6-abf5170377a7" CreationDate="2011-05-04T19:33:55.567" UserId="51" Comment="deleted 4 characters in body; edited title" Text="I have strange problem with drawing skybox texture on Mac. On iPhone everything is going fine. I have tried to change near and far planes value with no success.&#xD;&#xA;&#xD;&#xA;It is skybox of six textures and for every texture I set this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;What could be a problem?&#xD;&#xA;&#xD;&#xA;Screenshot:&#xD;&#xA;![screen][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JH2qM.jpg" />
  <row Id="25871" PostHistoryTypeId="4" PostId="11931" RevisionGUID="42e4cc86-14e5-4f83-a0f6-abf5170377a7" CreationDate="2011-05-04T19:33:55.567" UserId="51" Comment="deleted 4 characters in body; edited title" Text="Skybox texture artifact on edge" />
  <row Id="25872" PostHistoryTypeId="2" PostId="11934" RevisionGUID="868ca16c-d205-47b6-b08c-1f19712411fd" CreationDate="2011-05-04T19:36:00.043" UserId="3505" Text="My best guess is that the difference between MAC and iPhone is caused by antialiasing on the MAC. My 3D programming is a bit rusty, but I guess you would have to make all the squares part of the same mesh or something like that.&#xD;&#xA;&#xD;&#xA;Dirty hack solution would be to make all the squares a bit too big so they overlap and clip each other and adjust UV coordinates accordingly." />
  <row Id="25873" PostHistoryTypeId="2" PostId="11935" RevisionGUID="df9c251f-53c9-414c-85ff-a4e3a1dd0806" CreationDate="2011-05-04T19:38:32.567" UserId="516" Text="Are there any sites where I can find people for a 0 budget collab?" />
  <row Id="25874" PostHistoryTypeId="1" PostId="11935" RevisionGUID="df9c251f-53c9-414c-85ff-a4e3a1dd0806" CreationDate="2011-05-04T19:38:32.567" UserId="516" Text="Finding contributors for a collab" />
  <row Id="25875" PostHistoryTypeId="3" PostId="11935" RevisionGUID="df9c251f-53c9-414c-85ff-a4e3a1dd0806" CreationDate="2011-05-04T19:38:32.567" UserId="516" Text="&lt;search&gt;" />
  <row Id="25876" PostHistoryTypeId="2" PostId="11936" RevisionGUID="d0bb9799-c678-4438-b799-ffa5fc74565a" CreationDate="2011-05-04T19:58:44.300" UserId="1156" Text="The [Help Wanted][1] forum of Gamedev.net can be quite active with projects, both finding talent and projects to work on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/forum/8-help-wanted/" />
  <row Id="25877" PostHistoryTypeId="2" PostId="11937" RevisionGUID="5474ede4-fbd6-4c2b-b708-dbad6d66df3e" CreationDate="2011-05-04T20:00:04.880" UserId="189" Text="I guess a standard place would be the [Help Wanted][1] section of the gamedev.net forums. Really though, you need to get creative, set yourself apart from the crowd. Do you have a prototype of the game made yet? If not, that's something to consider - having something actually functional to show is leagues ahead of some guy with some game idea looking for employees that work for free.&#xD;&#xA;&#xD;&#xA;You could also look around for any communities focused on game development in the particular genre of game you're looking to make. For example, if you want to make a roguelike, there are tons of communities just about roguelikes. If you want to make a generic RPG, maybe not so much, but a steampunk RPG, there's bound to be some steampunk RPG development communities out there.&#xD;&#xA;&#xD;&#xA;Networking is important too. Maybe look around on Twitter or Facebook or LinkedIn or career sites for game developers looking for jobs. It's a stretch, but you might get really lucky (especially with a really good idea) and convince them to work for free.&#xD;&#xA;&#xD;&#xA;It all comes down to the quality of your idea though. What's in it for them? Not money, so you better have a darn good game idea to compensate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/forum/8-help-wanted/" />
  <row Id="25878" PostHistoryTypeId="6" PostId="11935" RevisionGUID="7d106821-67db-495a-8515-a828caa09250" CreationDate="2011-05-04T20:00:49.653" UserId="189" Comment="edited tags" Text="&lt;career&gt;" />
  <row Id="25879" PostHistoryTypeId="2" PostId="11938" RevisionGUID="f78c33e9-9c65-4d46-93dc-8c8cad262ea5" CreationDate="2011-05-04T20:06:40.970" UserId="7119" Text="I'm creating a small text RPG as a way to practice python and I'm running into a question about how to load data.  The game is a wild west game, though that isn't too relevant, and I need to store lists of weapons and their properties, as well as lists of characters, scenarios, etc.  I've got a good idea of how to represent this data as classes but I'm not as clear on how to store and load the data.  &#xD;&#xA;&#xD;&#xA;My main question revolves around the relationship between data and classes.  I have read through some posts here on SE and many of them relate to storage, so I have some good information there.&#xD;&#xA;&#xD;&#xA;When should I load that data in?  For example, the player chooses from several weapons when the game starts.  Should I load in all the weapons and instantiate all the weapon objects at that point?  Should the weapon class have the ability to show weapons from the database without instantiating them?&#xD;&#xA;&#xD;&#xA;Thanks for any help.  Long time stack overflow reader, first time poster. :)" />
  <row Id="25880" PostHistoryTypeId="1" PostId="11938" RevisionGUID="f78c33e9-9c65-4d46-93dc-8c8cad262ea5" CreationDate="2011-05-04T20:06:40.970" UserId="7119" Text="Loading data for an RPG" />
  <row Id="25881" PostHistoryTypeId="3" PostId="11938" RevisionGUID="f78c33e9-9c65-4d46-93dc-8c8cad262ea5" CreationDate="2011-05-04T20:06:40.970" UserId="7119" Text="&lt;architecture&gt;&lt;python&gt;&lt;file-format&gt;" />
  <row Id="25882" PostHistoryTypeId="2" PostId="11939" RevisionGUID="c45ad168-74a1-4fdf-be93-df8957a4056e" CreationDate="2011-05-04T20:19:58.583" UserId="5957" Text="inset '0.5f / texture_width' from the left and right side of the texture and '0.5f / texture_height' from top and bottom. You're seeing sampling artefacts - texture samplers usually sample from the centre of texels so on the left and right, top and bottom (at 0 and 1 uv) you're getting 50% of whatever texel your sampler gets when it's out of bounds. That's either the other side of the texture or a default sampling colour." />
  <row Id="25883" PostHistoryTypeId="2" PostId="11940" RevisionGUID="c8379fb8-bfe4-4ee6-9f93-1c6db13364c0" CreationDate="2011-05-04T20:41:23.997" UserId="7120" Text="I'm not that very familiar with python. The general advice I would give is to keep it simple. You said that you already got an idea of how to represent the data. If you got some classes for the data you want to store, you can store them in a list. That list can then be serialized to disk onSave and deserialized onLoad. For a first implementation and if the data is not that big I would load everything on start of the game and save it at some given points in time." />
  <row Id="25884" PostHistoryTypeId="6" PostId="11932" RevisionGUID="f34b685c-debf-4d95-880c-0b13a5da91ce" CreationDate="2011-05-04T20:43:10.910" UserId="51" Comment="edited tags; edited title; deleted 25 characters in body" Text="&lt;directx10&gt;&lt;slimdx&gt;&lt;pix&gt;" />
  <row Id="25885" PostHistoryTypeId="4" PostId="11932" RevisionGUID="f34b685c-debf-4d95-880c-0b13a5da91ce" CreationDate="2011-05-04T20:43:10.910" UserId="51" Comment="edited tags; edited title; deleted 25 characters in body" Text="Help interpreting PIX result." />
  <row Id="25886" PostHistoryTypeId="5" PostId="11932" RevisionGUID="f34b685c-debf-4d95-880c-0b13a5da91ce" CreationDate="2011-05-04T20:43:10.910" UserId="51" Comment="edited tags; edited title; deleted 25 characters in body" Text="When my application goes into full screen state my movement is not smooth, seems like frames are not rendered in the correct order, doing something like : 1 - 3 - 2 - 4 - 6 - 5 - ...&#xD;&#xA;It makes the move &quot;flicker&quot;&#xD;&#xA;&#xD;&#xA;For my PIX test, I draw really a low number of primitive (1140 triangle exactly) inside 6 VB + IB&#xD;&#xA;&#xD;&#xA;I clearly see a difference in the GPU frame &quot;ordering&quot; in PIX :&#xD;&#xA;&#xD;&#xA;Here is the result when in windowed mode :&#xD;&#xA;[PIX screenshot1][1]&#xD;&#xA;You can see that the GPU time needed for the frame is nearly in sync with the CPU time needed to generate it.&#xD;&#xA;&#xD;&#xA;But in full screen state here is what I got (same scene, withtout camera move) : [PIX screenshot2][2]&#xD;&#xA;&#xD;&#xA;You can see, that each GPU frame processing are splitted in minimum in 2 part, and the GPU doesn't wait the end of a frame for starting another one.&#xD;&#xA;&#xD;&#xA;Do you know what can be the cause of this ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.s33m3.be/PIX/PIX2.png&#xD;&#xA;  [2]: http://www.s33m3.be/PIX/PIX.png" />
  <row Id="25887" PostHistoryTypeId="2" PostId="11941" RevisionGUID="4dcdd77b-c6d4-4bdf-bb92-2f151f4ce0c5" CreationDate="2011-05-04T20:53:30.867" UserId="3794" Text="This is usual problem with cubemaps on older HW (or iphones maybe). Check for the &#xD;&#xA;&#xD;&#xA;    GL_ARB_seamless_cube_map&#xD;&#xA;&#xD;&#xA;extension if it is available on your hw. If so. Problem will be propably solved by using it." />
  <row Id="25888" PostHistoryTypeId="25" PostId="11938" RevisionGUID="83525112-e062-4e5e-901e-52287d7abfd4" CreationDate="2011-05-04T21:11:26.273" Comment="http://twitter.com/#!/StackGameDev/status/65886272463437824" />
  <row Id="25889" PostHistoryTypeId="2" PostId="11942" RevisionGUID="3f2f24a1-f8d7-4262-b6de-019f5fe6b110" CreationDate="2011-05-04T21:14:55.863" UserId="7122" Text="I was planning on producing a game but then I had to stall. I have an idea to make a game, but its very similar to a game already out there. If I made my own graphics, audio and use my own code, would I be allowed to sell it?" />
  <row Id="25890" PostHistoryTypeId="1" PostId="11942" RevisionGUID="3f2f24a1-f8d7-4262-b6de-019f5fe6b110" CreationDate="2011-05-04T21:14:55.863" UserId="7122" Text="Can one build a game based on something that already exists and make money off of it?" />
  <row Id="25891" PostHistoryTypeId="3" PostId="11942" RevisionGUID="3f2f24a1-f8d7-4262-b6de-019f5fe6b110" CreationDate="2011-05-04T21:14:55.863" UserId="7122" Text="&lt;game-design&gt;&lt;productivity&gt;" />
  <row Id="25892" PostHistoryTypeId="2" PostId="11943" RevisionGUID="63c107a6-d791-496f-b6c5-f6e543b63269" CreationDate="2011-05-04T21:17:50.273" UserId="4662" Text="IANAL.&#xD;&#xA;&#xD;&#xA;Gameplay ideas themselves cannot be copyrighted. If you need any evidence of this, just look at the wrath of clones of any specific popular game, such as Call of Duty or World of Warcraft, available on the market. You cannot use any of the original content, however, unless it's independent- for example, just because CoD uses an AK-47 doesn't stop you from using it, but because WoW has a race called the Night Elves pretty much does preclude you from doing something identical.&#xD;&#xA;&#xD;&#xA;The general rule is that if the gameplay happens to be similar to an existing game at the end, then that's one thing, but if it's a straight rip of another game from the start, then you're not going to win many fans and may end up in court." />
  <row Id="25893" PostHistoryTypeId="2" PostId="11944" RevisionGUID="8a00e3e9-b5e7-4ee9-9d9c-e9af14d036a9" CreationDate="2011-05-04T21:25:38.610" UserId="4191" Text="Since you say a &quot;small&quot; text RPG, my advice would be to just preload everything.  If we're not talking about an enormous amount of content, then it shouldn't make a great difference to startup time, and it keeps things, as Bjorn advises, simple.&#xD;&#xA;&#xD;&#xA;One thing that occurs to me, reading your question, is that you may want to consider the difference between a *weapon* and a *weapon type*.  My preference is always to have a clear distinction between the two, and to have both modeled in code so that I can ask questions about the weapon type without necessarily having to have an instance on hand.  (One way of doing this is to have the weapon type be the class, with class methods that allow you to interact with it, and the weapon be an instance of that class.  I actually do not prefer this approach because then it's either impossible or incredibly messy for a weapon to change type.  Obviously that won't be relevant to all games.)" />
  <row Id="25894" PostHistoryTypeId="5" PostId="11937" RevisionGUID="21046bde-296f-496c-9945-03ba16c10f00" CreationDate="2011-05-04T23:10:02.887" UserId="189" Comment="added 541 characters in body" Text="I guess a standard place would be the [Help Wanted][1] section of the gamedev.net forums. Really though, you need to get creative, set yourself apart from the crowd. Do you have a prototype of the game made yet? If not, that's something to consider - having something actually functional to show is leagues ahead of some guy with some game idea looking for employees that work for free.&#xD;&#xA;&#xD;&#xA;You could also look around for any communities focused on game development in the particular genre of game you're looking to make. For example, if you want to make a roguelike, there are tons of communities just about roguelikes. If you want to make a generic RPG, maybe not so much, but a steampunk RPG, there's bound to be some steampunk RPG development communities out there.&#xD;&#xA;&#xD;&#xA;Networking is important too. Maybe look around on Twitter or Facebook or LinkedIn or career sites for game developers looking for jobs. It's a stretch, but you might get really lucky (especially with a really good idea) and convince them to work for free.&#xD;&#xA;&#xD;&#xA;It all comes down to the quality of your idea though. What's in it for them? Not money, so you better have a darn good game idea to compensate.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Given that you just need art for a finished game, you might try art-specific forums as suggested in the comments. You might also try looking around someplace like [deviantART][2] for someone with the art style you're looking for, and then send them a message. I can't say it's the right approach, I have no experience to back it up, but I feel like being more personal (as opposed to sticking a post in a forum) would help increase your chances of finding a good artist who will work with you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/forum/8-help-wanted/&#xD;&#xA;  [2]: http://www.deviantart.com/" />
  <row Id="25895" PostHistoryTypeId="5" PostId="11942" RevisionGUID="7a922fc9-10ec-4fbe-ab81-3689c75ccabf" CreationDate="2011-05-04T23:15:15.657" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Is it legally possible to make a clone of the game?](http://gamedev.stackexchange.com/questions/11752/is-it-legally-possible-to-make-a-clone-of-the-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I was planning on producing a game but then I had to stall. I have an idea to make a game, but its very similar to a game already out there. If I made my own graphics, audio and use my own code, would I be allowed to sell it?" />
  <row Id="25896" PostHistoryTypeId="10" PostId="11942" RevisionGUID="840efc41-3524-4ad1-a87d-0e3a6ffff872" CreationDate="2011-05-04T23:15:15.160" UserId="189" CloseReasonId="1" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="25897" PostHistoryTypeId="2" PostId="11945" RevisionGUID="c84f04f3-a541-42a2-8b42-8c8cda8d0d52" CreationDate="2011-05-04T23:37:13.253" UserId="627" Text="Fixed time step is useful when taking into account floating point accuracy and to make updates consistent.&#xD;&#xA;&#xD;&#xA;It's a simple piece of code so it would be useful to try it out and see if it works for your game.&#xD;&#xA;&#xD;&#xA;    now = currentTime&#xD;&#xA;    frameTime = now - lastTimeStamp // time since last render()&#xD;&#xA;    while (frameTime &gt; updateTime)&#xD;&#xA;        update(timestep)&#xD;&#xA;        frameTime -= updateTime     // update enough times to catch up&#xD;&#xA;                                    // possibly leaving a small remainder&#xD;&#xA;                                    // of time for the next frame&#xD;&#xA;&#xD;&#xA;    lastTimeStamp = now - frameTime // set last timestamp to now but&#xD;&#xA;                                    // subtract the remaining frame time&#xD;&#xA;                                    // to make sure the game will still&#xD;&#xA;                                    // catch up on those remaining few millseconds&#xD;&#xA;    render()&#xD;&#xA;&#xD;&#xA;The main issue with using a fixed time step is that players with a fast computer won't be able to make use of the speed. Rendering at 100fps when the game is updated only at 30fps is the same as just rendering at 30fps.&#xD;&#xA;&#xD;&#xA;That being said, it may be possible to use more than one fixed time step. 60fps could be used to update trivial objects (such as UI or animated sprites) and 30fps to update non-trivial systems (such as physics and) and even slower timers to do behind the scenes management such as deleting unused objects, resources etc." />
  <row Id="25898" PostHistoryTypeId="25" PostId="11932" RevisionGUID="5d4d4586-6fcb-47e4-a4aa-fe90de17938c" CreationDate="2011-05-05T00:11:27.140" Comment="http://twitter.com/#!/StackGameDev/status/65931575979819008" />
  <row Id="25899" PostHistoryTypeId="2" PostId="11946" RevisionGUID="dda07883-6256-4464-98ba-c56ed24fd73d" CreationDate="2011-05-05T00:21:38.843" UserId="1101" Text="Load everything at the start. Don't complicate your program by splitting data between memory and disk unless you have to (eg. when there is too much to hold in memory at once).&#xD;&#xA;&#xD;&#xA;The important thing is to understand the distinction between data that represents instances of an item and data that represents the type of an item. Generally several instances of the former share one common instance of the latter." />
  <row Id="25900" PostHistoryTypeId="2" PostId="11947" RevisionGUID="5ec65d98-011f-4290-bbaf-e86c79ddb041" CreationDate="2011-05-05T00:42:20.047" UserId="6937" Text="Ok ok I admit, I'm bored and toying with a portal script like the one on steam. &#xD;&#xA;&#xD;&#xA;I've figured out the following:&#xD;&#xA;&#xD;&#xA; - relative positioning of the mirrored cameras&#xD;&#xA; - render to texture for the portal (the texture is the view from the opposite camera)&#xD;&#xA; - poly culling (since the camera is behind the other portal, I cull all polys behind the front face of the portal&#xD;&#xA;&#xD;&#xA;I can't figure out how to scale the projection so I ignore everything outside of the back of the portal. Here's a picture to explain.&#xD;&#xA;&#xD;&#xA;The back of portal 2, which is viewed from camera 2, is being displayed on the front of portal 1. My problem is the scale. I want to ignore everything around the dotted line and scale up the view from cam 2 so it fits the front of portal 1 perfectly. One big problem with that scaling is the perspective changes as you move around. I'm not good at matrix math to figure this out. Anyone have an idea?&#xD;&#xA;&#xD;&#xA;I'm looking for some matrix I can set as the projection matrix for cam2 to make this work.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Co8lr.png" />
  <row Id="25901" PostHistoryTypeId="1" PostId="11947" RevisionGUID="5ec65d98-011f-4290-bbaf-e86c79ddb041" CreationDate="2011-05-05T00:42:20.047" UserId="6937" Text="Portal Projection" />
  <row Id="25902" PostHistoryTypeId="3" PostId="11947" RevisionGUID="5ec65d98-011f-4290-bbaf-e86c79ddb041" CreationDate="2011-05-05T00:42:20.047" UserId="6937" Text="&lt;rendering&gt;&lt;camera&gt;&lt;matrix&gt;&lt;projection&gt;" />
  <row Id="25903" PostHistoryTypeId="2" PostId="11948" RevisionGUID="dd07d560-f394-4e84-8912-d89e37c3d12f" CreationDate="2011-05-05T01:09:24.033" UserId="7129" Text="I am an normal programmer with about 3 years of experience, who is interested in getting into game development. The problem that I face is that when I look at these &quot;beginner&quot; books, most of them teach basic programming skills, and I don't have the patience to sit through it or find them worthwhile. But, when I look at more advanced books, they're over my head, and once again, fruitless to me. What I'm looking for, are books that explain the nitty-gritty internals of games, but at a more reasonable level. &#xD;&#xA;&#xD;&#xA;For example, I'm very familiar with all kinds of data structure (hashes, trees, linked lists), and with many common algorithms (sorting, searching), but I wouldn't know how to, say, implement collision detection effectively. I also have experience using foreign libraries, so I know how to use documentation to learn an API, so I don't need a &quot;Learn to use X&quot; book either.&#xD;&#xA;&#xD;&#xA;Personally, I don't care what platforms/languages/libraries are used in the books, since I'm comfortable in many languages, but the game I'm looking at making would use Javascript and the HTML5 canvas.&#xD;&#xA;&#xD;&#xA;Any suggestions? Any that are free? &#xD;&#xA;&#xD;&#xA;P.S. I should note that my level of mathematics and physics is relatively low, and a book that gently integrated those things would be a plus." />
  <row Id="25904" PostHistoryTypeId="1" PostId="11948" RevisionGUID="dd07d560-f394-4e84-8912-d89e37c3d12f" CreationDate="2011-05-05T01:09:24.033" UserId="7129" Text="Game programming books that don't teach programming?" />
  <row Id="25905" PostHistoryTypeId="3" PostId="11948" RevisionGUID="dd07d560-f394-4e84-8912-d89e37c3d12f" CreationDate="2011-05-05T01:09:24.033" UserId="7129" Text="&lt;books&gt;" />
  <row Id="25906" PostHistoryTypeId="2" PostId="11949" RevisionGUID="a7bd48db-f57d-4a91-9e13-899d5f7205d9" CreationDate="2011-05-05T01:27:15.407" UserId="998" Text="So assume you have an input system that is based on polling&#xD;&#xA;&#xD;&#xA;    void update()&#xD;&#xA;    {&#xD;&#xA;        if( Keyboard[ 'A' ] )&#xD;&#xA;            // A is down&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Say you want to be able to recognize 3 to 8 length key combinations (like down, down-forward, forward, A for hado-ken)&#xD;&#xA;&#xD;&#xA;How would you best create a generic (easily modifiable/programmable) key combination input system on _polled_ input?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25907" PostHistoryTypeId="1" PostId="11949" RevisionGUID="a7bd48db-f57d-4a91-9e13-899d5f7205d9" CreationDate="2011-05-05T01:27:15.407" UserId="998" Text="Key combinations on poll-based input" />
  <row Id="25908" PostHistoryTypeId="3" PostId="11949" RevisionGUID="a7bd48db-f57d-4a91-9e13-899d5f7205d9" CreationDate="2011-05-05T01:27:15.407" UserId="998" Text="&lt;input&gt;&lt;keyboard&gt;" />
  <row Id="25909" PostHistoryTypeId="2" PostId="11950" RevisionGUID="8928d4f8-7b6f-494f-adb8-2a21665ae051" CreationDate="2011-05-05T01:29:12.330" UserId="4662" Text="I recommend Introduction to Game Programming with DirectX 9.0c: A Shader Approach, by Frank Luna. It's also available for D3D10 if you're curious. The book assumes basic C++ knowledge but nothing game-specific and no COM, and begins with various mathematical foundations like vectors and matrices, and fairly gently guides the user through setting up games from basic to the intermediate. What's notable of course is that as time goes on, then things change- for example, he doesn't teach hardware instancing or other optimizations that are *relatively* new." />
  <row Id="25910" PostHistoryTypeId="2" PostId="11951" RevisionGUID="246de390-194a-4a9d-a5c0-5d69949b1260" CreationDate="2011-05-05T01:32:01.020" UserId="3505" Text="Consider this as a pure 2D problem, you have the two renderings as 2D images and all you got to do is overlay one on the other, no scaling, moving around or funny angles of projection. If you just do the simplest copy pasting job you can imagine, it's going to fit perfectly.&#xD;&#xA;&#xD;&#xA;I guess you might want to do this in a more seamless manner, using the cam 2 rendering as a texture for the cam 1 rendering. For that to work properly the cam 2 rendering must be the texture of a plane that is perpendicular to the camera angle in rendering 1.&#xD;&#xA;&#xD;&#xA;I hope this answers your question, it sure will take a bit of trickery to get everything ordered just right." />
  <row Id="25911" PostHistoryTypeId="2" PostId="11952" RevisionGUID="3a8a7548-b87a-4b71-890f-5689625dbdcb" CreationDate="2011-05-05T01:36:09.630" UserId="7119" Text="Have you looked at [Game Programming Gems](http://www.gameprogramminggems.com/) series?  It might give you the specifics you seem to be asking for.  There are not many books out on HTML5/canvas as it is quite new, especially ones talking about game programming." />
  <row Id="25912" PostHistoryTypeId="2" PostId="11953" RevisionGUID="c8aa3c62-680a-4619-af94-9e3a7d8722b4" CreationDate="2011-05-05T01:36:28.223" UserId="4662" Text="This system is unnecessary. Just hardware instance the room (and it's contents), then translate it and rotate it if necessary to match up and let the GPU do the culling. This has the large advantage of making the world seamless- that is, you don't have to specially make the AI work with it or anything, as you're extending the world, effectively, rather than just rendering it twice." />
  <row Id="25913" PostHistoryTypeId="2" PostId="11954" RevisionGUID="3197bba8-45cd-4560-be3d-49c92a9aa4bd" CreationDate="2011-05-05T01:42:42.120" UserId="3505" Text="Make a stack of the last X key events, for each key event add an object with the key and time of the press/release, then check if the last members of the stack match a special pattern and if those keys were pressed fast enough to count as a combination. Finally remove the oldest object from the stack." />
  <row Id="25914" PostHistoryTypeId="5" PostId="11871" RevisionGUID="16ffb1f5-07d1-4469-8f14-3866652d5ffd" CreationDate="2011-05-05T02:08:01.613" UserId="2698" Comment="So I just learned the term for this." Text="XNA only gives you just enough to build your own input classes - and you should do so considering the utility they offer.&#xD;&#xA;&#xD;&#xA;I would recommend the mouse input class described in [this blog post][1] ([source code][2]). It detects a button being pressed, held or released, and lets you get that information either via polling or events.&#xD;&#xA;&#xD;&#xA;On a related note, the same blog post also provides keyboard and gamepad input device classes.&#xD;&#xA;&#xD;&#xA;[1]: http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/&#xD;&#xA;[2]: http://www.innovativegames.net/upload/GameEngineTutorial/6/MouseDevice.cs" />
  <row Id="25919" PostHistoryTypeId="5" PostId="11948" RevisionGUID="9f492338-4d9a-493c-93cc-a472a285f198" CreationDate="2011-05-05T02:54:32.727" UserId="7129" Comment="added 117 characters in body" Text="I am an normal programmer with about 3 years of experience, who is interested in getting into game development. The problem that I face is that when I look at these &quot;beginner&quot; books, most of them teach basic programming skills, and I don't have the patience to sit through it or find them worthwhile. But, when I look at more advanced books, they're over my head, and once again, fruitless to me. What I'm looking for, are books that explain the nitty-gritty internals of games, but at a more reasonable level. &#xD;&#xA;&#xD;&#xA;For example, I'm very familiar with all kinds of data structure (hashes, trees, linked lists), and with many common algorithms (sorting, searching), but I wouldn't know how to, say, implement collision detection effectively. I also have experience using foreign libraries, so I know how to use documentation to learn an API, so I don't need a &quot;Learn to use X&quot; book either.&#xD;&#xA;&#xD;&#xA;Personally, I don't care what platforms/languages/libraries are used in the books, since I'm comfortable in many languages, but the game I'm looking at making would use Javascript and the HTML5 canvas.&#xD;&#xA;&#xD;&#xA;Any suggestions? Any that are free? &#xD;&#xA;&#xD;&#xA;P.S. I should note that my level of mathematics and physics is relatively low, and a book that gently integrated those things would be a plus.&#xD;&#xA;&#xD;&#xA;EDIT: I should mention that I'm interested in 2D programming, and at this point I don't really care for 3D yet.  " />
  <row Id="25920" PostHistoryTypeId="25" PostId="11948" RevisionGUID="08636c12-2f7c-465f-ace5-d3a79d4baae2" CreationDate="2011-05-05T03:11:27.997" Comment="http://twitter.com/#!/StackGameDev/status/65976877269000192" />
  <row Id="25921" PostHistoryTypeId="2" PostId="11956" RevisionGUID="e02e304c-d00f-4ffd-90f5-1a00c6e85a15" CreationDate="2011-05-05T03:24:06.737" UserId="5966" Text="There are `setCollisionShape()` and `setMassProps()` method for this on `btRigidBody` class." />
  <row Id="25922" PostHistoryTypeId="2" PostId="11957" RevisionGUID="14d05b6f-9a65-49cd-b599-9437ca25d3b9" CreationDate="2011-05-05T03:58:17.447" UserId="7130" Text="Can anybody suggest a good game development and animation tutorial for iphone" />
  <row Id="25923" PostHistoryTypeId="1" PostId="11957" RevisionGUID="14d05b6f-9a65-49cd-b599-9437ca25d3b9" CreationDate="2011-05-05T03:58:17.447" UserId="7130" Text="animation and game development tutorial for iphone" />
  <row Id="25924" PostHistoryTypeId="3" PostId="11957" RevisionGUID="14d05b6f-9a65-49cd-b599-9437ca25d3b9" CreationDate="2011-05-05T03:58:17.447" UserId="7130" Text="&lt;iphone&gt;&lt;animation&gt;&lt;ipad&gt;" />
  <row Id="25925" PostHistoryTypeId="2" PostId="11958" RevisionGUID="076a1af6-1c8b-4fda-a4cd-b1acb1fb5e26" CreationDate="2011-05-05T04:05:30.463" UserId="5966" Text="I made a billiard scene with Bullet Physics. And I got a problem. When the ball is slow down around wall, it sticks to the wall. And slides along the wall. It generally bounces, but does not bounces at low speed.&#xD;&#xA;&#xD;&#xA;What's wrong? What should I set to make the balls always bounces from the wall? I used bare bone `btRigidBody`, no parameters set." />
  <row Id="25926" PostHistoryTypeId="1" PostId="11958" RevisionGUID="076a1af6-1c8b-4fda-a4cd-b1acb1fb5e26" CreationDate="2011-05-05T04:05:30.463" UserId="5966" Text="How can I make bodies are not stick to the wall in Bullet Physics?" />
  <row Id="25927" PostHistoryTypeId="3" PostId="11958" RevisionGUID="076a1af6-1c8b-4fda-a4cd-b1acb1fb5e26" CreationDate="2011-05-05T04:05:30.463" UserId="5966" Text="&lt;bullet-physics&gt;" />
  <row Id="25928" PostHistoryTypeId="2" PostId="11959" RevisionGUID="a95b46f7-f6ab-45d7-94bc-0060405ae606" CreationDate="2011-05-05T04:47:19.277" UserId="2698" Text="If you're confident with object-oriented programming, you should make sure you pick up something which covers component-oriented design. It's a programming approach within OOP that is very powerful in games development and has become a standard approach within the last decade.&#xD;&#xA;&#xD;&#xA;Two resources that contributed massively to my understanding of COD:&#xD;&#xA;&#xD;&#xA;- [Cowboy Programming - Evolve your Hierarchy](http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/)&#xD;&#xA;- [A presentation by a developer of Dungeon Siege](http://scottbilas.com/files/2002/gdc_san_jose/game_objects_slides.pdf)&#xD;&#xA;&#xD;&#xA;There is an answer on Stack Overflow that contains an incredible list of resources: [Component-based software engineering in game literature](http://stackoverflow.com/questions/1901251/component-based-game-engine-design/3495647#3495647).&#xD;&#xA;&#xD;&#xA;Note: COD isn't used solely in games development. You may find resources that explain COD in completely different contexts, which won't necessarily be helpful at all for understanding the role it plays in games (YMMV)." />
  <row Id="25929" PostHistoryTypeId="2" PostId="11960" RevisionGUID="943d8df5-be74-49dc-8f80-ce552f3cd437" CreationDate="2011-05-05T06:11:24.107" UserId="3656" Text="What aspect of game programming are you curious about? There's quite a few books that discuss specific aspects of game programming. Getting a game up and running is not difficult, and any game logic is just like how you'd manage data for any other application, perhaps a little more concerned with speed of execution. Getting into stuff like graphics programming though, can be something else entirely. Start with a basic framework of a game, then focus on one area you're interested in, like designing a robust combat system, or synchronizing animation, or shaders.&#xD;&#xA;&#xD;&#xA;General-info type books that I've found useful:&#xD;&#xA;&#xD;&#xA;* [Game Coding Complete][1] (expects general C++ knowledge)&#xD;&#xA;* [Game Architecture and Design][2] (Development cycles and high level architecture)&#xD;&#xA;&#xD;&#xA;You're probably at the stage where you'll get the most information by looking at various tutorial postings for specific engines online. There's also a decent enough number of open source games you can check out.&#xD;&#xA;&#xD;&#xA;One interesting thing to study might be the [Monocle Engine][3].&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;**Edit**:&#xD;&#xA;&#xD;&#xA;With regards to math, I'm also a little shaky on my foundations. A good resource for these general subject areas is [Khan Academy][4].&#xD;&#xA;&#xD;&#xA;For other free stuff, just browse GameDev.net, and possibly the MSDN articles for XNA.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/1584506806/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=1932111751&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=0AZSWZ6S791JGWFH3GNJ&#xD;&#xA;  [2]: http://www.amazon.com/Game-Architecture-Design-Andrew-Rollings/dp/0735713634/ref=sr_1_1?ie=UTF8&amp;qid=1304575314&amp;sr=8-1&#xD;&#xA;  [3]: https://github.com/zaphire/Monocle-Engine&#xD;&#xA;  [4]: http://www.khanacademy.org/" />
  <row Id="25930" PostHistoryTypeId="25" PostId="11958" RevisionGUID="cfba0c1d-4063-404c-ad49-01f838d0703f" CreationDate="2011-05-05T06:11:28.427" Comment="http://twitter.com/#!/StackGameDev/status/66022178096816129" />
  <row Id="25931" PostHistoryTypeId="5" PostId="11931" RevisionGUID="bab83dd2-0714-4958-93f9-93a924dff024" CreationDate="2011-05-05T06:51:31.810" UserId="5459" Comment="added description of what I have tried to solve the problem" Text="I have strange problem with drawing skybox texture on Mac. On iPhone everything is going fine. I have tried to change near and far planes value with no success.&#xD;&#xA;&#xD;&#xA;It is skybox of six textures and for every texture I set this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;What could be a problem?&#xD;&#xA;&#xD;&#xA;Screenshot:&#xD;&#xA;![screen][1]&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;I have tried to set background color to red, to ensure if it is bleeding through the texture&#xD;&#xA;&#xD;&#xA;I have also tried to change coords of the texture to this:&#xD;&#xA;&#xD;&#xA;    float err_corr = 0.5 / TEXTURE_SIZE;&#xD;&#xA;    &#xD;&#xA;    GLfloat vertices[24] = {	&#xD;&#xA;    		-1.0f - err_corr, -1.0f - err_corr,  1.0f + err_corr,&#xD;&#xA;        1.0f + err_corr, -1.0f - err_corr,  1.0f + err_corr,&#xD;&#xA;        -1.0f - err_corr,  1.0f + err_corr,  1.0f + err_corr,&#xD;&#xA;        1.0f + err_corr,  1.0f + err_corr,  1.0f + err_corr,&#xD;&#xA;        -1.0f - err_corr, -1.0f - err_corr, -1.0f - err_corr,&#xD;&#xA;        1.0f + err_corr, -1.0f - err_corr, -1.0f - err_corr,&#xD;&#xA;        -1.0f - err_corr,  1.0f + err_corr, -1.0f - err_corr,&#xD;&#xA;        1.0f + err_corr,  1.0f + err_corr, -1.0f - err_corr,&#xD;&#xA;    	};&#xD;&#xA;&#xD;&#xA;And the box is drawn in this order:&#xD;&#xA;`GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JH2qM.jpg" />
  <row Id="25932" PostHistoryTypeId="2" PostId="11961" RevisionGUID="36373135-5174-4474-b6f6-2316c86f524e" CreationDate="2011-05-05T06:52:49.977" UserId="5966" Text="How can I enable CCD in Bullet Physics?" />
  <row Id="25933" PostHistoryTypeId="1" PostId="11961" RevisionGUID="36373135-5174-4474-b6f6-2316c86f524e" CreationDate="2011-05-05T06:52:49.977" UserId="5966" Text="How can I enable CCD in Bullet Physics?" />
  <row Id="25934" PostHistoryTypeId="3" PostId="11961" RevisionGUID="36373135-5174-4474-b6f6-2316c86f524e" CreationDate="2011-05-05T06:52:49.977" UserId="5966" Text="&lt;bullet-physics&gt;" />
  <row Id="25935" PostHistoryTypeId="5" PostId="11961" RevisionGUID="558bcb51-ed62-4cd4-891a-2de5802b2797" CreationDate="2011-05-05T07:27:54.410" UserId="2698" Comment="Expanded an acronym. 1) Those who want to learn what this is can find out immediately without first having to work out what it even stands for. 2) It is clearer for one who knows about CCD but doesn't recognise the acronym." Text="How can I enable Continuous Collision Detection (CCD) in Bullet Physics?" />
  <row Id="25936" PostHistoryTypeId="24" PostId="11961" RevisionGUID="558bcb51-ed62-4cd4-891a-2de5802b2797" CreationDate="2011-05-05T07:27:54.410" Comment="Proposed by 2698 approved by 51 edit id of 408" />
  <row Id="25937" PostHistoryTypeId="5" PostId="11950" RevisionGUID="a953cb2b-5aee-40a3-b98f-d73c0ac6f3ac" CreationDate="2011-05-05T07:28:00.480" UserId="6539" Comment="Added a link to the book on Amazon" Text="I recommend [Introduction to Game Programming with DirectX 9.0c: A Shader Approach][1] by Frank Luna. It's also available for D3D10 if you're curious. The book assumes basic C++ knowledge but nothing game-specific and no COM, and begins with various mathematical foundations like vectors and matrices, and fairly gently guides the user through setting up games from basic to the intermediate. What's notable of course is that as time goes on, then things change- for example, he doesn't teach hardware instancing or other optimizations that are *relatively* new.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160" />
  <row Id="25938" PostHistoryTypeId="24" PostId="11950" RevisionGUID="a953cb2b-5aee-40a3-b98f-d73c0ac6f3ac" CreationDate="2011-05-05T07:28:00.480" Comment="Proposed by 6539 approved by 51 edit id of 407" />
  <row Id="25939" PostHistoryTypeId="16" PostId="11948" RevisionGUID="796010f6-8d1f-4405-ad40-7d47ca899253" CreationDate="2011-05-05T07:29:23.100" UserId="51" />
  <row Id="25940" PostHistoryTypeId="16" PostId="11950" RevisionGUID="d443ebb2-bcfe-4c2b-8867-c53e72f55c94" CreationDate="2011-05-05T07:29:23.100" UserId="51" />
  <row Id="25941" PostHistoryTypeId="16" PostId="11952" RevisionGUID="2d9e922e-a220-4599-b9a5-665b332c31d4" CreationDate="2011-05-05T07:29:23.100" UserId="51" />
  <row Id="25942" PostHistoryTypeId="16" PostId="11959" RevisionGUID="2e420792-7e4f-49f7-9e5d-030a446ffcf2" CreationDate="2011-05-05T07:29:23.100" UserId="51" />
  <row Id="25943" PostHistoryTypeId="16" PostId="11960" RevisionGUID="907aa938-d1d5-4ebb-b489-1ae497359323" CreationDate="2011-05-05T07:29:23.100" UserId="51" />
  <row Id="25944" PostHistoryTypeId="2" PostId="11962" RevisionGUID="f2e2bf17-ef1f-4d0d-a48a-091c2ab19cae" CreationDate="2011-05-05T09:10:09.517" UserId="1199" Text="I just found a publisher with what seems to be a great list of possible books: &#xD;&#xA;http://www.courseptr.com/Courses.aspx?MenuId=8&amp;MenuSubId=0 - they're the publishers of the Game Programming Gems series." />
  <row Id="25945" PostHistoryTypeId="16" PostId="11962" RevisionGUID="6254fa65-d2ea-4b55-9382-8fd5352b6878" CreationDate="2011-05-05T09:10:09.517" UserId="1199" />
  <row Id="25946" PostHistoryTypeId="25" PostId="11949" RevisionGUID="6e00867e-9228-4688-91e4-3bbc8e5e6221" CreationDate="2011-05-05T09:11:28.720" Comment="http://twitter.com/#!/StackGameDev/status/66067478341623808" />
  <row Id="25949" PostHistoryTypeId="2" PostId="11964" RevisionGUID="d94f744c-2c62-45d3-b1dd-1c7086779693" CreationDate="2011-05-05T11:05:00.643" UserId="744" Text="Fundamentally, _you can't_. Key combinations require an ordering, and an ordering requires events.&#xD;&#xA;&#xD;&#xA;What you can do is turn polling into events by comparing the key states each frame and generating post-hoc keyup/keydown events from the differences. It's not as reliable because you lose the timestamping and other intra-frame ordering that &quot;native&quot; event systems provide, but it will allow you to detect and order at least one key per frame.&#xD;&#xA;&#xD;&#xA;Once you have those ordered events, you can use a finite state machine or other tool to match them against your move lists and execute the correct one." />
  <row Id="25950" PostHistoryTypeId="2" PostId="11965" RevisionGUID="3bf89c1e-f198-4537-9d83-997f9a3dcf1e" CreationDate="2011-05-05T12:10:43.253" UserId="6117" Text="Examples of what i'm going to need:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I'm using cocos2d to draw a CCTMXTiledMap, on those tiles i'll have to draw the LOS triangle.&#xD;&#xA;&#xD;&#xA;How would i test if the player is within that triangle, taking obstacles into account?&#xD;&#xA;How would i draw the line of sight area on the map tiles, again taking obstacles into account, like in the examples above?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m2upc.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/pu1f6.jpg&#xD;&#xA;&#xD;&#xA;This is a re-post of a question i've put on stackoverflow." />
  <row Id="25951" PostHistoryTypeId="1" PostId="11965" RevisionGUID="3bf89c1e-f198-4537-9d83-997f9a3dcf1e" CreationDate="2011-05-05T12:10:43.253" UserId="6117" Text="top down game - checking, drawing enemy's line of sight area with obstacles" />
  <row Id="25952" PostHistoryTypeId="3" PostId="11965" RevisionGUID="3bf89c1e-f198-4537-9d83-997f9a3dcf1e" CreationDate="2011-05-05T12:10:43.253" UserId="6117" Text="&lt;graphics&gt;&lt;math&gt;&lt;algorithm&gt;&lt;objective-c&gt;&lt;cocos2d&gt;" />
  <row Id="25953" PostHistoryTypeId="25" PostId="11961" RevisionGUID="ac39b24c-6ac9-4590-94a7-6c9639c3c68a" CreationDate="2011-05-05T12:11:29.797" Comment="http://twitter.com/#!/StackGameDev/status/66112780335452161" />
  <row Id="25954" PostHistoryTypeId="5" PostId="11884" RevisionGUID="930ebf5e-f827-4409-b205-51110ef04d2f" CreationDate="2011-05-05T12:46:25.383" UserId="5073" Comment="described the  question in the detail" Text="I can't find the tutorials of joints class in the Box2D for iPhone. I am unable to run a Testbed for iPhone Box2D.&#xD;&#xA;&#xD;&#xA;    (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event&#xD;&#xA;    {&#xD;&#xA;           if (_mouseJoint!=NULL)return;&#xD;&#xA;	       UITouch *mytouch=[touches anyObject];&#xD;&#xA;	       CGPoint location=[mytouch locationInView:[mytouch view]];&#xD;&#xA;	       location=[[CCDirector sharedDirector]convertToGL:location];&#xD;&#xA;        	b2Vec2 locationWorld=b2Vec2(location.x/PTM_RATIO,location.y/PTM_RATIO);&#xD;&#xA;     //ristrict the player within the ground limit  keep stucking the player with grounditself..... &#xD;&#xA;    if (_playerFixture-&gt;TestPoint(locationWorld))&#xD;&#xA;    {&#xD;&#xA;		b2MouseJointDef md;&#xD;&#xA;		md.bodyA=groundBody;&#xD;&#xA;		md.bodyB=_playerBody;&#xD;&#xA;		md.target=locationWorld; &#xD;&#xA;		md.collideConnected=true;&#xD;&#xA;		md.maxForce=100.0f*_playerBody-&gt;GetMass();&#xD;&#xA;		_mouseJoint=(b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);&#xD;&#xA;		_playerBody-&gt;SetAwake(true);&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event&#xD;&#xA;    {&#xD;&#xA;    if (_mouseJoint == NULL) return;&#xD;&#xA;    UITouch *myTouch = [touches anyObject];&#xD;&#xA;    CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;    location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;    if (location.y&lt;240.00&amp;&amp;location.y&gt;=20.0f)&#xD;&#xA;	{&#xD;&#xA;		b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA;		_mouseJoint-&gt;SetTarget(locationWorld);	&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event &#xD;&#xA;    {&#xD;&#xA;    if (_mouseJoint) &#xD;&#xA;	{&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;      }  &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25955" PostHistoryTypeId="2" PostId="11966" RevisionGUID="7a38f9ee-fa89-4513-9441-352c5a6521b8" CreationDate="2011-05-05T13:19:38.310" UserId="6465" Text="Ok......So im just recently starting with Direct X &#xD;&#xA;i've been using Raserteks tutorials, and Frank Lunas book. One thing thats just out of this world to me is how much effort it is to Initialize DX11, the swap chain and everything.&#xD;&#xA;&#xD;&#xA;So...maybe to give myself a little bit of peace, is it mostly always going to be the same? I mean in Raserteks tutorials it's like 8 different files, while nicely laid out seems to be a bit much, but I guess is it just required? It just seems a little long and hard to understand (the swap chain and everything).....but I guess my questions are:&#xD;&#xA;&#xD;&#xA;1. Why is it SOOO long, like OpenGL's initialization to start drawing is 1/100th the size it seems like&#xD;&#xA;&#xD;&#xA;2. Is it basically going to be the same (Swap Chain, Message Handlers, etc) for all DX programs (im working with DX11 btw)" />
  <row Id="25956" PostHistoryTypeId="1" PostId="11966" RevisionGUID="7a38f9ee-fa89-4513-9441-352c5a6521b8" CreationDate="2011-05-05T13:19:38.310" UserId="6465" Text="Initializing Direct X" />
  <row Id="25957" PostHistoryTypeId="3" PostId="11966" RevisionGUID="7a38f9ee-fa89-4513-9441-352c5a6521b8" CreationDate="2011-05-05T13:19:38.310" UserId="6465" Text="&lt;directx&gt;" />
  <row Id="25958" PostHistoryTypeId="2" PostId="11967" RevisionGUID="9e62d1c7-8f34-4481-a113-4a2935c59f3a" CreationDate="2011-05-05T13:21:42.323" UserId="4662" Text="DX10/11 requires more than DX9, because they have DXGI. However, there *is* a shortcut function. More importantly, the initialization to start drawing is pretty trivial, compared to what you're going to have to go through to load assets, etc.&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/ff476083(v=VS.85).aspx" />
  <row Id="25959" PostHistoryTypeId="2" PostId="11968" RevisionGUID="6ba04a48-838f-4905-8408-380c51019159" CreationDate="2011-05-05T13:26:52.850" UserId="4662" Text="I've been looking at creating some 2D rendering systems in D3D9, basically because I don't like ID3DXSprite. For the output of the vertex shader, what co-ordinate system does the run-time expect vertex co-ordinates in, like homogenous device co-ordinates? And secondly, does the depth of the resulting vertices have any effect except on the culling/depth buffering? I wanted to &quot;reserve&quot; a section of depth for use in 2D drawing, and then have a section for 3D geometry, to ensure that 3D geometry is always behind 2D." />
  <row Id="25960" PostHistoryTypeId="1" PostId="11968" RevisionGUID="6ba04a48-838f-4905-8408-380c51019159" CreationDate="2011-05-05T13:26:52.850" UserId="4662" Text="Output from vertex shader in D3D9" />
  <row Id="25961" PostHistoryTypeId="3" PostId="11968" RevisionGUID="6ba04a48-838f-4905-8408-380c51019159" CreationDate="2011-05-05T13:26:52.850" UserId="4662" Text="&lt;c++&gt;&lt;directx&gt;&lt;vertex&gt;&lt;shaders&gt;" />
  <row Id="25962" PostHistoryTypeId="2" PostId="11969" RevisionGUID="b99b303c-3a14-4736-8052-74e48e04f1cd" CreationDate="2011-05-05T14:12:38.180" UserId="7116" Text="Keywords missing (cannot create new one) : Fullscreen; Vsync; Stuttering&#xD;&#xA;&#xD;&#xA;In me research for a stuttering problem in my game engine, I think, I have found the problem, but don't have any idea why this is happening, that's why I ask you if you have an idea !&#xD;&#xA;&#xD;&#xA;The situation :&#xD;&#xA;DirectX10 under win7 simple engine. If running fullscreen (and only in fullscreen), with Vsync On and the rendering loop going much more faster than the vsync ==&gt; Stutter (Frame dropped by the driver).&#xD;&#xA;&#xD;&#xA;My base solution at this moment : Make the call to device.present() not faster than the Vsync !&#xD;&#xA;&#xD;&#xA;My questions :&#xD;&#xA;- What is happening here ? It seems that the called to .present() &quot;is caching&quot; frames, and if the cache is full, it can go to throw away a frame ==&gt; It makes the stutter !&#xD;&#xA;- Why is it not happening in windowed mode under the exact same situation (back buffer resolution, scene, ...) ???&#xD;&#xA;&#xD;&#xA;Tx you for your help !&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25963" PostHistoryTypeId="1" PostId="11969" RevisionGUID="b99b303c-3a14-4736-8052-74e48e04f1cd" CreationDate="2011-05-05T14:12:38.180" UserId="7116" Text="Fullscreen + Vsync = Stuttering" />
  <row Id="25964" PostHistoryTypeId="3" PostId="11969" RevisionGUID="b99b303c-3a14-4736-8052-74e48e04f1cd" CreationDate="2011-05-05T14:12:38.180" UserId="7116" Text="&lt;directx&gt;&lt;performance&gt;" />
  <row Id="25965" PostHistoryTypeId="6" PostId="11969" RevisionGUID="6ae18572-4878-4cba-bd0d-c51a855a9d2f" CreationDate="2011-05-05T14:20:52.640" UserId="51" Comment="edited tags; deleted 102 characters in body" Text="&lt;directx&gt;&lt;performance&gt;&lt;vsync&gt;" />
  <row Id="25966" PostHistoryTypeId="5" PostId="11969" RevisionGUID="6ae18572-4878-4cba-bd0d-c51a855a9d2f" CreationDate="2011-05-05T14:20:52.640" UserId="51" Comment="edited tags; deleted 102 characters in body" Text="In me research for a stuttering problem in my game engine, I think, I have found the problem, but don't have any idea why this is happening, that's why I ask you if you have an idea !&#xD;&#xA;&#xD;&#xA;The situation :&#xD;&#xA;DirectX10 under win7 simple engine. If running fullscreen (and only in fullscreen), with Vsync On and the rendering loop going much more faster than the vsync ==&gt; Stutter (Frame dropped by the driver).&#xD;&#xA;&#xD;&#xA;My base solution at this moment : Make the call to device.present() not faster than the Vsync !&#xD;&#xA;&#xD;&#xA;My questions :&#xD;&#xA;- What is happening here ? It seems that the called to .present() &quot;is caching&quot; frames, and if the cache is full, it can go to throw away a frame ==&gt; It makes the stutter !&#xD;&#xA;- Why is it not happening in windowed mode under the exact same situation (back buffer resolution, scene, ...) ???&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25967" PostHistoryTypeId="2" PostId="11970" RevisionGUID="832aea60-b3c9-4d06-950c-c6bb4ab05373" CreationDate="2011-05-05T14:37:18.560" UserId="4662" Text="That's not vsync. The call to Present() will block until the appropriate time if you have vsync enabled. This means that unless you're trying multi-threaded rendering, which DX10 does not support, this shouldn't happen- that is, it should be impossible to Present() multiple times a frame." />
  <row Id="25969" PostHistoryTypeId="5" PostId="11969" RevisionGUID="92ff2017-b56e-45f2-8c3c-4cb44400213c" CreationDate="2011-05-05T15:03:16.197" UserId="7116" Comment="added 567 characters in body" Text="In me research for a stuttering problem in my game engine, I think, I have found the problem, but don't have any idea why this is happening, that's why I ask you if you have an idea !&#xD;&#xA;&#xD;&#xA;The situation :&#xD;&#xA;DirectX10 under win7 simple engine. If running fullscreen (and only in fullscreen), with Vsync On and the rendering loop going much more faster than the vsync ==&gt; Stutter (Frame dropped by the driver).&#xD;&#xA;&#xD;&#xA;My base solution at this moment : Make the call to device.present() not faster than the Vsync !&#xD;&#xA;&#xD;&#xA;My questions :&#xD;&#xA;- What is happening here ? It seems that the called to .present() &quot;is caching&quot; frames, and if the cache is full, it can go to throw away a frame ==&gt; It makes the stutter !&#xD;&#xA;- Why is it not happening in windowed mode under the exact same situation (back buffer resolution, scene, ...) ???&#xD;&#xA;&#xD;&#xA;Edit : &#xD;&#xA;Here is a Pix debugging screen (big picture), showing the stuttering :&#xD;&#xA;http://www.s33m3.be/PIX/PIX3.png&#xD;&#xA;You can see that frame 912, that did exactly the same amount of work as other frames, wasn't processed by the GPU. (No GPU start/Duration). And after debugging, it just that for this frame the call to .Present() was really low (more then 10 times faster than the average .Present() of the other frames !&#xD;&#xA;&#xD;&#xA;So how can I disable in DirectX10  this &quot;feature&quot; to throw aways frames ? I would prefer the Present method to hold instead of dropping a frame !" />
  <row Id="25970" PostHistoryTypeId="2" PostId="11971" RevisionGUID="4f0a216c-367f-473f-a031-0a54752b354f" CreationDate="2011-05-05T15:04:00.917" UserId="1430" Text="&gt; For the output of the vertex shader,&#xD;&#xA;&gt; what co-ordinate system does the&#xD;&#xA;&gt; run-time expect vertex co-ordinates in?&#xD;&#xA;&#xD;&#xA;You should output vertices in clip space from the vertex shader (this is generally where things end up after the projection matrix is applied). The hardware will take the output of the vertex shader, perform clipping, and then perform the perspective division by `w` and continue along the pipeline.&#xD;&#xA;&#xD;&#xA;&gt; Does the depth of the resulting&#xD;&#xA;&gt; vertices have any effect except on the&#xD;&#xA;&gt; culling/depth buffering?&#xD;&#xA;&#xD;&#xA;It could also be used in early-Z optimizations, potentially, and possibly a few other things like that. And maybe fixed-function fog, but I don't think anybody uses that any longer anyhow.&#xD;&#xA;&#xD;&#xA;So in general, no. You're probably fine trying to reserve a range in the depth buffer for 2D versus 3D from that standpoint, although I suspect it may be a touch cumbersome to give the 3D elements proper depth from the eye to ensure they land in the desired range (it may be easier just to disable the depth test for the 2D elements or clear the depth buffer to the desired &quot;2D far&quot; value after all the 3D elements are rendered, or something, depending on exactly what you need).&#xD;&#xA;&#xD;&#xA;The only other thing to be aware of it is the non-linearity of the depth buffer, so you should probably use a much smaller range for the 2D stuff since it will presumably be closer and thus in the more granular region of the buffer." />
  <row Id="25971" PostHistoryTypeId="25" PostId="11965" RevisionGUID="a782ce77-b203-429f-b3da-1f8a646b96fb" CreationDate="2011-05-05T15:11:29.307" Comment="http://twitter.com/#!/StackGameDev/status/66158077254172672" />
  <row Id="25972" PostHistoryTypeId="2" PostId="11972" RevisionGUID="97b20422-1157-4f59-b1f3-cb68588d1fca" CreationDate="2011-05-05T15:14:33.457" UserId="1430" Text="D3D10+ expose a much lower-level view of the driver/card than D3D9 did -- there are a number of nice advantages to this (control, consistency) but they come with costs, and one of those costs is that the API is *much* more verbose. Fortunately it's not hard to encapsulate all that verbosity away so you only need to deal with it once or twice.&#xD;&#xA;&#xD;&#xA;For D3D10 and up, the general process will be quite similar. 9 is, as I noted, much different and a lot simpler. If you're using D3D11, you should be good to go for quite some time now." />
  <row Id="25974" PostHistoryTypeId="2" PostId="11974" RevisionGUID="3d5b9860-ef1e-41a9-be1e-cccc8f0a10ba" CreationDate="2011-05-05T15:25:37.287" UserId="1430" Text="There's an article on GDNet about [walls and shadows in 2D][1]; the technique can be applied to visibility determination as well. Additionally there [this old-school post][2] on 2D visibility, [this post on StackOverflow][3] and a variety of other resources online you can [find via Google][4].&#xD;&#xA;&#xD;&#xA;Once you have a logical understanding of the visibility region for an agent in your game, you can convert that to a visual one for display (you can and should keep these distinct, so you could render a smooth cone even if your algorithm is working with tiles, for example). &#xD;&#xA;&#xD;&#xA;One way to do that is with a stencil buffer -- you render your normal scene, and write to the stencil buffer every time you draw an obstacle, then render your visibility cone with an appropriate stencil test enable. Unfortunate [cocos2d may not support the requisite functionality][5] for you to do this (but that linked thread has some notes on using texture combiners to simulate the effect). &#xD;&#xA;&#xD;&#xA;An alternative, very crude, solution if your game is more like the second screenshot you posted (top-down) is to render the floors, then render the visibility regions, then render obstacles. However this will not give you the effect like in the Commandos screenshot where you can see that the tree (for example) are blocking the visibility. &#xD;&#xA;&#xD;&#xA;The GDNet article discusses a rendering technique as well, but it's triangle-based and will need some adjustment to remove the jagged edges it produces.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_//feature/fprogramming/walls-and-shadows-in-2d-r2711&#xD;&#xA;  [2]: http://www.fadden.com/techmisc/fast-los.html&#xD;&#xA;  [3]: http://stackoverflow.com/questions/5493085/line-of-sight-2d&#xD;&#xA;  [4]: http://www.google.com/q=2d+visibility+algorithm&#xD;&#xA;  [5]: http://www.cocos2d-iphone.org/forum/topic/4609" />
  <row Id="25975" PostHistoryTypeId="5" PostId="11966" RevisionGUID="462a6c4e-ebad-4dda-954d-9e0ae5928c56" CreationDate="2011-05-05T15:34:28.803" UserId="1156" Comment="Tidied it up" Text="I've recently starting with Direct X;&#xD;&#xA;I've been using Rasertek's tutorials, and Frank Luna's book. One thing thats just out of this world to me is how much effort it is to initialize DX11: the swap chain and everything.&#xD;&#xA;&#xD;&#xA;So...maybe to give myself a little bit of peace, is it mostly always going to be the same? I mean in Rasertek's tutorials it's like 8 different files, while nicely laid out seems to be a bit much; but I guess is it just required? It just seems a little long and hard to understand (the swap chain and everything).....but I guess my questions are:&#xD;&#xA;&#xD;&#xA;1. Why is it so long, unlike OpenGL's initialization to start drawing which is 1/100th the size (it seems like)?&#xD;&#xA;&#xD;&#xA;2. Is it basically going to be the same (Swap Chain, Message Handlers, etc) for all DX APIs (I'm working with DX11)?" />
  <row Id="25976" PostHistoryTypeId="5" PostId="11958" RevisionGUID="2406e0bc-e038-4f8b-875b-b6c48f5f7154" CreationDate="2011-05-05T15:39:53.360" UserId="3588" Comment="Revised the title, and did some wide reformatting of the question to be more clear on what it asks. Also added the [physics] tag just to be complete, and the [movement] tag to note which kind of physics problem it is. ♪" Text="I made a Billiards scene with Bullet Physics, but I've got a problem. When the ball is slowing down near a wall, it sticks to that wall and slides along it. It normally bounces, but at those low speeds it sticks instead of bouncing.&#xD;&#xA;&#xD;&#xA;What's wrong? What should I set to make sure the ball always bounces when it hits the wall? I used barebone `btRigidBody`, with no parameters set." />
  <row Id="25977" PostHistoryTypeId="4" PostId="11958" RevisionGUID="2406e0bc-e038-4f8b-875b-b6c48f5f7154" CreationDate="2011-05-05T15:39:53.360" UserId="3588" Comment="Revised the title, and did some wide reformatting of the question to be more clear on what it asks. Also added the [physics] tag just to be complete, and the [movement] tag to note which kind of physics problem it is. ♪" Text="How can I make bodies that do not stick to the wall in Bullet Physics?" />
  <row Id="25978" PostHistoryTypeId="6" PostId="11958" RevisionGUID="2406e0bc-e038-4f8b-875b-b6c48f5f7154" CreationDate="2011-05-05T15:39:53.360" UserId="3588" Comment="Revised the title, and did some wide reformatting of the question to be more clear on what it asks. Also added the [physics] tag just to be complete, and the [movement] tag to note which kind of physics problem it is. ♪" Text="&lt;physics&gt;&lt;movement&gt;&lt;bullet-physics&gt;" />
  <row Id="25979" PostHistoryTypeId="24" PostId="11958" RevisionGUID="2406e0bc-e038-4f8b-875b-b6c48f5f7154" CreationDate="2011-05-05T15:39:53.360" Comment="Proposed by 3588 approved by 14 edit id of 409" />
  <row Id="25980" PostHistoryTypeId="5" PostId="11806" RevisionGUID="f1517a5e-a3c8-422c-bc20-c029beebc6cb" CreationDate="2011-05-05T15:39:55.543" UserId="3588" Comment="Mostly adding the [mouse] and [input] tags, but no harm in tossing in some formatting while we're at it, neh? ♪" Text="I am developing a card game in XNA.&#xD;&#xA;&#xD;&#xA;Is there any `OnClick` event in XNA for objects?&#xD;&#xA;&#xD;&#xA;I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws the card, but I am a little stuck because I don't know how to use `OnClick` events or anything like that." />
  <row Id="25981" PostHistoryTypeId="6" PostId="11806" RevisionGUID="f1517a5e-a3c8-422c-bc20-c029beebc6cb" CreationDate="2011-05-05T15:39:55.543" UserId="3588" Comment="Mostly adding the [mouse] and [input] tags, but no harm in tossing in some formatting while we're at it, neh? ♪" Text="&lt;xna&gt;&lt;c#&gt;&lt;input&gt;&lt;mouse&gt;" />
  <row Id="25982" PostHistoryTypeId="24" PostId="11806" RevisionGUID="f1517a5e-a3c8-422c-bc20-c029beebc6cb" CreationDate="2011-05-05T15:39:55.543" Comment="Proposed by 3588 approved by 14 edit id of 410" />
  <row Id="25983" PostHistoryTypeId="2" PostId="11975" RevisionGUID="8c7f3c97-7aee-445d-abf5-6989a57a78d2" CreationDate="2011-05-05T15:43:47.823" UserId="4235" Text="Are you positive that you've set GL_CLAMP_TO_EDGE **for each individual texture**? This is a part of individual texture state and it defaults to GL_REPEAT, so this needs to be done after binding with glBindTexture.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex1);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex2);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;&#xD;&#xA;This is not the same as:&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex1);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex2);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="25984" PostHistoryTypeId="2" PostId="11976" RevisionGUID="a647b3a3-3161-478a-a013-c28f3da98398" CreationDate="2011-05-05T15:46:12.743" UserId="6467" Text="Why does Minecraft use polygons to draw the world terrain instead of voxels?  Would a voxel based rendering engine be appropriate for a fully destructible game world built out of cubes like Minecraft?  Would it be more efficient than using polygons?" />
  <row Id="25985" PostHistoryTypeId="1" PostId="11976" RevisionGUID="a647b3a3-3161-478a-a013-c28f3da98398" CreationDate="2011-05-05T15:46:12.743" UserId="6467" Text="Voxel Rendering" />
  <row Id="25986" PostHistoryTypeId="3" PostId="11976" RevisionGUID="a647b3a3-3161-478a-a013-c28f3da98398" CreationDate="2011-05-05T15:46:12.743" UserId="6467" Text="&lt;voxels&gt;&lt;minecraft&gt;" />
  <row Id="25987" PostHistoryTypeId="2" PostId="11977" RevisionGUID="d403b88d-0f46-474d-9554-938af6a25a2b" CreationDate="2011-05-05T16:00:07.513" UserId="7050" Text="I have a walking npc that will &quot;see&quot; the wall in front or behind him(2d gameplay) and that will react accordingly.&#xD;&#xA;&#xD;&#xA;I was thinking to attach him to an invisible collider that would react to objects at collision, but i did not manage to do so, collider seems to alway go with a visible mesh.&#xD;&#xA;&#xD;&#xA;How should i implement it, and how can i do it in Unity ?" />
  <row Id="25988" PostHistoryTypeId="1" PostId="11977" RevisionGUID="d403b88d-0f46-474d-9554-938af6a25a2b" CreationDate="2011-05-05T16:00:07.513" UserId="7050" Text="Design in unity : Make my NPC &quot;see&quot; gameobjects around him." />
  <row Id="25989" PostHistoryTypeId="3" PostId="11977" RevisionGUID="d403b88d-0f46-474d-9554-938af6a25a2b" CreationDate="2011-05-05T16:00:07.513" UserId="7050" Text="&lt;collision-detection&gt;&lt;unity&gt;" />
  <row Id="25990" PostHistoryTypeId="2" PostId="11978" RevisionGUID="5646821e-08b3-4ff7-9254-aebb5138a5f0" CreationDate="2011-05-05T16:07:29.997" UserId="1430" Text="&gt; Why does Minecraft use polygons to&#xD;&#xA;&gt; draw the world terrain instead of&#xD;&#xA;&gt; voxels?&#xD;&#xA;&#xD;&#xA;Graphics hardware works with and renders triangles, so you have to use triangles if you want hardware acceleration. Most voxel renderers employ something like [Marching Cubes][1] to extract a polygonal mesh from a voxel representation and present that; direct volume rendering is typically computational expensive.&#xD;&#xA;&#xD;&#xA;&gt; Would a voxel based rendering engine&#xD;&#xA;&gt; be appropriate for a fully&#xD;&#xA;&gt; destructible game world built out of&#xD;&#xA;&gt; cubes like Minecraft?&#xD;&#xA;&#xD;&#xA;Yes.&#xD;&#xA;&#xD;&#xA;&gt; Would it be more efficient than using&#xD;&#xA;&gt; polygons?&#xD;&#xA;&#xD;&#xA;Probably, but not because voxels are faster or cheaper to render (in fact, they're more expensive to render since you must convert the data set). Voxel representation lends itself to *manipulation* easier than polygons -- so it's much easier to add and remove chunks, bits and pieces of the world represented by the data set.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Marching_cubes" />
  <row Id="25992" PostHistoryTypeId="5" PostId="11931" RevisionGUID="351d1ed2-9da7-4d5b-ba9d-da8b6c0c78ac" CreationDate="2011-05-05T16:54:30.910" UserId="3588" Comment="Added alt text to the image, miniscule other post formats, and threw in the [sky] tag which seems to be consistently used for skyboxes" Text="I have strange problem with drawing skybox texture on Mac. On iPhone everything is going fine. I have tried to change near and far planes value with no success.&#xD;&#xA;&#xD;&#xA;It is a skybox of six textures, and for every texture I set this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;What could be the problem?&#xD;&#xA;&#xD;&#xA;Screenshot:&#xD;&#xA;&#xD;&#xA;![Image of sky with the edges of the skybox visible][1]&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;I have tried to set background color to red, to ensure if it is bleeding through the texture&#xD;&#xA;&#xD;&#xA;I have also tried to change coords of the texture to this:&#xD;&#xA;&#xD;&#xA;    float err_corr = 0.5 / TEXTURE_SIZE;&#xD;&#xA;    &#xD;&#xA;    GLfloat vertices[24] = {	&#xD;&#xA;    		-1.0f - err_corr, -1.0f - err_corr,  1.0f + err_corr,&#xD;&#xA;        1.0f + err_corr, -1.0f - err_corr,  1.0f + err_corr,&#xD;&#xA;        -1.0f - err_corr,  1.0f + err_corr,  1.0f + err_corr,&#xD;&#xA;        1.0f + err_corr,  1.0f + err_corr,  1.0f + err_corr,&#xD;&#xA;        -1.0f - err_corr, -1.0f - err_corr, -1.0f - err_corr,&#xD;&#xA;        1.0f + err_corr, -1.0f - err_corr, -1.0f - err_corr,&#xD;&#xA;        -1.0f - err_corr,  1.0f + err_corr, -1.0f - err_corr,&#xD;&#xA;        1.0f + err_corr,  1.0f + err_corr, -1.0f - err_corr,&#xD;&#xA;    	};&#xD;&#xA;&#xD;&#xA;And the box is drawn in this order:  &#xD;&#xA;`GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};`&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JH2qM.jpg" />
  <row Id="25993" PostHistoryTypeId="6" PostId="11931" RevisionGUID="351d1ed2-9da7-4d5b-ba9d-da8b6c0c78ac" CreationDate="2011-05-05T16:54:30.910" UserId="3588" Comment="Added alt text to the image, miniscule other post formats, and threw in the [sky] tag which seems to be consistently used for skyboxes" Text="&lt;opengl&gt;&lt;textures&gt;&lt;macos&gt;&lt;sky&gt;" />
  <row Id="25994" PostHistoryTypeId="24" PostId="11931" RevisionGUID="351d1ed2-9da7-4d5b-ba9d-da8b6c0c78ac" CreationDate="2011-05-05T16:54:30.910" Comment="Proposed by 3588 approved by 51 edit id of 411" />
  <row Id="25995" PostHistoryTypeId="2" PostId="11979" RevisionGUID="fd9fc84a-91e1-4bc2-a46d-773f2d232947" CreationDate="2011-05-05T16:57:57.787" UserId="51" Text="A common way of solving the &quot;seeing&quot; problem is to use raycasts.&#xD;&#xA;&#xD;&#xA;http://unity3d.com/support/documentation/ScriptReference/Physics.Raycast.html&#xD;&#xA;&#xD;&#xA;Basically the gist of it is that you define a line starting at your NPC and going in the direction they are looking and do a trace for a certain distance with the world. You can do things like set up the world such that you're only doing traces with colliders that are marked with a certain tag (like &quot;world&quot;).&#xD;&#xA;&#xD;&#xA;When you get the trace information back, you know 1) if the trace hit anything 2) the object the trace hit and 3) the point at which the trace hit occurred.  From there you should be able to figure out what you need to do." />
  <row Id="25996" PostHistoryTypeId="2" PostId="11980" RevisionGUID="7ce5c9d6-509c-44d1-a5d3-1c48dfa43c16" CreationDate="2011-05-05T17:12:40.327" UserId="3830" Text="You might check out O'Reilly's &lt;a href='http://oreilly.com/catalog/9780596159863'&gt;iPhone Game Development&lt;/a&gt; book if you're talking about more 2D sprite oriented animation (think &quot;Angry Birds&quot;).  &#xD;&#xA;&#xD;&#xA;But if you're talking 3D style animation, you'll need to decide whether you're going to write it yourself (a lot of work) or use a commercial game engine like Unity 3D or Unreal." />
  <row Id="25997" PostHistoryTypeId="25" PostId="11977" RevisionGUID="eac6ed42-52dd-4f2c-84fb-06f068399226" CreationDate="2011-05-05T18:11:29.363" Comment="http://twitter.com/#!/StackGameDev/status/66203376458797057" />
  <row Id="25998" PostHistoryTypeId="2" PostId="11981" RevisionGUID="1d51caac-51fc-41f0-b4ec-6a5403b9c907" CreationDate="2011-05-05T18:45:47.483" UserId="6117" Text="Without any information on your requirements, i can only link to the most popular iOS game development environments around, which are [cocos2d][1] and [unity][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-iphone.org/&#xD;&#xA;  [2]: http://unity3d.com/unity/publishing/" />
  <row Id="25999" PostHistoryTypeId="2" PostId="11982" RevisionGUID="a83444c3-a0bb-4808-a702-b7aec9b64c81" CreationDate="2011-05-05T20:47:06.677" UserId="5021" Text="One way is to store the current and previous input states, and compare them every time that you poll the input.&#xD;&#xA;&#xD;&#xA;For each key that can be pressed, store an object that has a timestamp of the last time that the key switched from a down state to an up state.&#xD;&#xA;&#xD;&#xA;Update these objects by doing this at every poll:&#xD;&#xA;&#xD;&#xA;    void update(){&#xD;&#xA;        some_key_has_been_pressed = false;&#xD;&#xA;        foreach(key in keys){&#xD;&#xA;            if(previous_input[key].Down &amp;&amp; current_input[key].Up){&#xD;&#xA;                keys[key].up_timestamp = current_time();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if(current_input[key].down){&#xD;&#xA;                keys[key].down_timestamp = current_time();&#xD;&#xA;                some_key_has_been_pressed = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now you can pattern match your combos against the contents of `keys`.&#xD;&#xA;&#xD;&#xA;Have a combo object for each combo, and call update() on each combo object at each poll.&#xD;&#xA;&#xD;&#xA;A combo object's update() method will pattern match the combo, checking if all necessary conditions for the combo are satisfied at this poll. I.e. all keys timestamps for the combo so far are in order, and no other key that would break the combo has been pressed this frame. For each condition met, increment a counter in the combo object to the next condition to check. When all conditions are met in a combo, call the method that the combo should perform.&#xD;&#xA;If `some_key_has_been_pressed == true` but the key that is the next condition for the combo has not been pressed, then reset the combo's satisfied condition counter to 0.&#xD;&#xA;&#xD;&#xA;The above is my preferred method, as it is clean, easy to maintain, efficient, and highly modular. However for another good method, check out the XNA input sequence sample, which is written in C#, and the logic is likely transferrable to the language you're using.&#xD;&#xA;&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/input_sequence_sample" />
  <row Id="26000" PostHistoryTypeId="5" PostId="11982" RevisionGUID="0eeb004c-b034-49cf-8565-ec0d39035074" CreationDate="2011-05-05T20:54:20.473" UserId="5021" Comment="added 17 characters in body; added 14 characters in body" Text="One way is to store the current and previous input states, and compare them every time that you poll the input.&#xD;&#xA;&#xD;&#xA;For each key that can be pressed, store an object that has a timestamp of the last time that the key switched from a down state to an up state.&#xD;&#xA;&#xD;&#xA;Update these objects by doing this at every poll:&#xD;&#xA;&#xD;&#xA;    void update(){&#xD;&#xA;        some_key_has_been_pressed = false;&#xD;&#xA;        foreach(key in keys){&#xD;&#xA;            if(previous_input[key].Down &amp;&amp; current_input[key].Up){&#xD;&#xA;                keys[key].up_timestamp = current_time();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if(current_input[key].down){&#xD;&#xA;                keys[key].down_timestamp = current_time();&#xD;&#xA;                some_key_has_been_pressed = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now you can pattern match your combos against the contents of `keys`.&#xD;&#xA;&#xD;&#xA;Have a combo object for each combo, and call update() on each combo object at each poll.&#xD;&#xA;&#xD;&#xA;A combo object's update() method will pattern match the combo, checking if all necessary conditions for the combo are satisfied at this poll. I.e. all keys timestamps for the combo so far are in order, and no other key that would break the combo has been pressed this frame. For each condition met, increment a counter in the combo object to the next condition to check. When all conditions are met in a combo, call the method that the combo should perform.&#xD;&#xA;If `some_key_has_been_pressed == true` but the key that is the next condition for the combo has not been pressed, then reset the combo's satisfied condition counter to 0.&#xD;&#xA;&#xD;&#xA;The above is my preferred method, as it is simple to implement, easy to maintain, efficient, and highly modular.&#xD;&#xA;&#xD;&#xA;However for another good method, check out the [XNA input sequence sample][1], which is written in C#, and the logic is likely transferrable to the language you're using.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/input_sequence_sample" />
  <row Id="26001" PostHistoryTypeId="25" PostId="11976" RevisionGUID="4d040e51-65de-4177-b8fd-0511c1244740" CreationDate="2011-05-05T21:11:29.720" Comment="http://twitter.com/#!/StackGameDev/status/66248675470491648" />
  <row Id="26002" PostHistoryTypeId="2" PostId="11983" RevisionGUID="27104806-e811-431b-8264-8ef5ce22f334" CreationDate="2011-05-05T21:52:40.697" UserId="7136" Text="First, most of these sensors system don't use &quot;triangles&quot;, but an opening angle and a distance at which the NPC can detect the player.  Doing this kind of detection is pretty easy, determine the distance and angle between the heading of the NPC and the player's position.  Using these two values you can test if the player is within the range of the sensor, if it is you can then apply the more costly check, a ray cast that tests if an obstacle is between both characters.  If the raycast doesn't hit anything, you see your target, otherwise you don't see it.&#xD;&#xA;&#xD;&#xA;As for rendering... you either follow the same strategy that is used for projected shadows or you could render a &quot;triangle fan&quot; representing your sensor after rendering the floor and before rendering the obstacles and actors, allowing you to see the sensor on top of the floor but below everything else.  This will not be as good looking as the projected sensors and will not take obstacles into account (removing parts of the sensors when hitting an obstacle) but should be faster to implement and have a lower processing cost." />
  <row Id="26003" PostHistoryTypeId="5" PostId="11965" RevisionGUID="2c84b92c-7db1-4a26-8375-7ace3dbad475" CreationDate="2011-05-05T21:59:28.740" UserId="6117" Comment="deleted 8 characters in body" Text="Examples of what i'm going to need:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I'm using cocos2d to draw a CCTMXTiledMap, on those tiles i'll have to draw the LOS cone.&#xD;&#xA;&#xD;&#xA;How would i test if the player is within that cone, taking obstacles into account?&#xD;&#xA;How would i draw the line of sight area on the map tiles, again taking obstacles into account, like in the examples above?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m2upc.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/pu1f6.jpg&#xD;&#xA;&#xD;&#xA;This is a re-post of a question i've put on stackoverflow." />
  <row Id="26004" PostHistoryTypeId="25" PostId="11969" RevisionGUID="72734174-f9cc-4bf0-863c-58b9ce1c24ee" CreationDate="2011-05-06T00:11:29.683" Comment="http://twitter.com/#!/StackGameDev/status/66293974289231872" />
  <row Id="26005" PostHistoryTypeId="2" PostId="11984" RevisionGUID="9da7a1cd-7149-4a9c-9fdc-da3db51e3655" CreationDate="2011-05-06T01:40:35.520" UserId="7136" Text="I'm not too familiar with rcon, is it the remote administration protocol from Valve?&#xD;&#xA;&#xD;&#xA;If so, is the web server on your machine?  What is this IP address, yours?  Is it properly routed with the right ports (if you're behind a rounter)?  Is your firewall accepting incoming connections on this port from your web server?&#xD;&#xA;&#xD;&#xA;If you install a web server on your PC, does the code work?  This would mean that your server is most likely only accepting connection from your localhost or that the firewall / router config is preventing external connections." />
  <row Id="26006" PostHistoryTypeId="25" PostId="11968" RevisionGUID="dfb4f867-1ac6-416e-acbf-a03c5cecacac" CreationDate="2011-05-06T03:11:29.613" Comment="http://twitter.com/#!/StackGameDev/status/66339272969551872" />
  <row Id="26007" PostHistoryTypeId="2" PostId="11985" RevisionGUID="aa6ca216-0185-4dad-9b33-0ca109217236" CreationDate="2011-05-06T03:12:26.333" UserId="7141" Text="I managed to make a simple loop to move my character, onmousedown I move the character diagonally to where the user clicked. It's working but my problem is that I don't know how to prevent more loops to start over the first if the user clicks more than once. &#xD;&#xA;&#xD;&#xA;Right now if you click more than once the character moves faster and faster since more loops are running at the same time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the loop:&#xD;&#xA;&#xD;&#xA;    (function move() {&#xD;&#xA;        if(cframes&lt;frames) {&#xD;&#xA;    	cframes = cframes+1;&#xD;&#xA;            character.style.left=parseInt(character.style.left)+pxsecx;&#xD;&#xA;            character.style.top=parseInt(character.style.top)+pxsecy;&#xD;&#xA;            setTimeout(move, 20);&#xD;&#xA;    }&#xD;&#xA;    })()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How do I prevent this loop from starting if it already has? or stop it and start another?&#xD;&#xA;Thanks" />
  <row Id="26008" PostHistoryTypeId="1" PostId="11985" RevisionGUID="aa6ca216-0185-4dad-9b33-0ca109217236" CreationDate="2011-05-06T03:12:26.333" UserId="7141" Text="How do I prevent loop that moves character to run twice? (Javascript)" />
  <row Id="26009" PostHistoryTypeId="3" PostId="11985" RevisionGUID="aa6ca216-0185-4dad-9b33-0ca109217236" CreationDate="2011-05-06T03:12:26.333" UserId="7141" Text="&lt;javascript&gt;" />
  <row Id="26010" PostHistoryTypeId="2" PostId="11986" RevisionGUID="a2f02776-8d9c-41c5-bf71-0ccc5e190d00" CreationDate="2011-05-06T04:51:18.800" UserId="395" Text="setTimeout() returns a timer ID that can be passed to clearTimeout() later to cancel it. Store it in a variable somewhere and cancel the old one in the event callback. See https://developer.mozilla.org/en/window.setTimeout for more details." />
  <row Id="26011" PostHistoryTypeId="5" PostId="11742" RevisionGUID="751ed76f-2f98-4039-8b12-9f2377105f66" CreationDate="2011-05-06T05:44:16.670" UserId="1198" Comment="deleted 8 characters in body" Text="I am developing a gaming control panel and that uses `Rcon.jar` to fetch data from gaming server.&#xD;&#xA;&#xD;&#xA;the code to use it written as below&#xD;&#xA;&#xD;&#xA;    public static String rconExecute(String rcon, String command, int port, String ip) throws SocketTimeoutException{&#xD;&#xA;    		String response = &quot;&quot;;&#xD;&#xA;    		try {&#xD;&#xA;    			&#xD;&#xA;    			response = Rcon.send(27778, ip, port, rcon, command);&#xD;&#xA;    		} catch (Exception e) {&#xD;&#xA;    			// TODO Auto-generated catch block&#xD;&#xA;    			e.printStackTrace();&#xD;&#xA;    		}&#xD;&#xA;    		return response;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;this throws an error when run using site but when done using local application like&#xD;&#xA;&#xD;&#xA;    public class RconTest {&#xD;&#xA;    &#xD;&#xA;    	public static void main(String args[]) throws SocketTimeoutException, BadRcon, ResponseEmpty{&#xD;&#xA;    		String response = Rcon.send(27778, &quot;59.177.45.13&quot;, 27015, &quot;123&quot;, &quot;status&quot;);&#xD;&#xA;    		System.out.println(response);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it works fine any reason why?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the error is :`java.net.SocketTimeoutException: Receive timed out`" />
  <row Id="26012" PostHistoryTypeId="25" PostId="11985" RevisionGUID="14785385-009d-4708-8721-b0adf1a891cf" CreationDate="2011-05-06T06:11:29.650" Comment="http://twitter.com/#!/StackGameDev/status/66384569833758720" />
  <row Id="26013" PostHistoryTypeId="2" PostId="11987" RevisionGUID="589c31c3-a7b5-4d0e-bbaf-9037df128d48" CreationDate="2011-05-06T07:28:13.940" UserId="4235" Text="I think this would be most easily accomplished using shaders. If you don't have the ability to use shaders yet I'd recommend figuring them out regardless because they're super useful for lots of things like this. Operating under the assumption you can use them, here is a vertex and fragment shader that will create a grey radius fog around your character's location (with simple texturing).&#xD;&#xA;&#xD;&#xA;Vertex Shader (fog.vert):&#xD;&#xA;    &#xD;&#xA;    uniform vec3 playerPos;&#xD;&#xA;    uniform sampler2D colorMap;&#xD;&#xA;&#xD;&#xA;    varying vec3 vertexToPlayer;&#xD;&#xA;&#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;        vec3 vertexPos = vec3(gl_Vertex[0], gl_Vertex[1], gl_Vertex[2]);&#xD;&#xA;&#xD;&#xA;        vertexToPlayer = playerPos - vertexPos;&#xD;&#xA;&#xD;&#xA;        gl_TexCoord[0] = gl_MultiTexCoord0;&#xD;&#xA;        gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader (fog.frag):&#xD;&#xA;&#xD;&#xA;    uniform vec3 playerPos;&#xD;&#xA;    uniform sampler2D colorMap;&#xD;&#xA;&#xD;&#xA;    varying vec3 vertexToPlayer;&#xD;&#xA;&#xD;&#xA;    void main(void)&#xD;&#xA;    {&#xD;&#xA;        const float radius = 1024.0;&#xD;&#xA;&#xD;&#xA;        float dist = length(vertexToPlayer);&#xD;&#xA;        float attenuation = clamp((radius - dist) / radius, 0.0, 1.0);&#xD;&#xA;&#xD;&#xA;        vec4 diffuseTexel = texture2D(colorMap, gl_TexCoord[0].st);&#xD;&#xA;        vec4 diffuseTerm  = diffuseTexel * attenuation + (.8 * (1.0-attenuation));&#xD;&#xA;        diffuseTerm.a = diffuseTexel.a; /* preserve alpha */&#xD;&#xA;&#xD;&#xA;        gl_FragColor = diffuseTerm;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then, somewhere in your code, pass in your values for the player position with:&#xD;&#xA;&#xD;&#xA;    GLint playerPos = glGetUniformLocation(prog, &quot;playerPos&quot;);&#xD;&#xA;    glUniform3f(playerPos, xPos, yPos, zPos);&#xD;&#xA;&#xD;&#xA;Hope this is helpful!&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        " />
  <row Id="26014" PostHistoryTypeId="5" PostId="11975" RevisionGUID="36d899d2-4e4e-40ac-a561-a6c90aed5366" CreationDate="2011-05-06T07:36:29.077" UserId="4235" Comment="added clarification that i had actually read the post ;)" Text="Are you positive that you've set GL_CLAMP_TO_EDGE **for each individual texture**? This is a part of individual texture state and it defaults to GL_REPEAT, so this needs to be done after binding with glBindTexture. I realize in the original post you literally say that you set it for each texture, but I'm wondering what the code actually looks like?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex1);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex2);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;&#xD;&#xA;This is not the same as:&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex1);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, tex2);&#xD;&#xA;    //upload texture, etc.&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26015" PostHistoryTypeId="2" PostId="11988" RevisionGUID="54741506-137c-43dc-9f2d-ac55e097be6c" CreationDate="2011-05-06T07:55:12.920" UserId="4413" Text="Extensive answer with multiple solutions, pictures and all the math here:&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/892811/drawing-isometric-game-worlds" />
  <row Id="26016" PostHistoryTypeId="2" PostId="11989" RevisionGUID="7553dd23-af39-4b91-a2a3-9977b7e67e4d" CreationDate="2011-05-06T08:37:02.557" UserId="6957" Text="Are the six textures set up, specifically, as a cube map or are each of the skybox faces rendered separately with their own texture?  I heard some *early* PC systems had rather poor filtering when it came to handling cubemaps in that they didn't necessarily filter across the from one face texture to the next when you sampled near the cube edges. AFAIK the SGX (iphone GPU) should filter across edges correctly.&#xD;&#xA;&#xD;&#xA;It did occur to me that the bottom of your side textures looks to be a similar shade of blue to the artefact . Could you try, say, making the bottom row (or a few rows) of pixels a hideous shade of magenta and see if that changes the artefact colour? That might give some more idea of what may or may not be happening." />
  <row Id="26017" PostHistoryTypeId="25" PostId="11966" RevisionGUID="97d73e41-0e63-468d-bb97-57f4a6b8ef3b" CreationDate="2011-05-06T09:11:29.787" Comment="http://twitter.com/#!/StackGameDev/status/66429870179229696" />
  <row Id="26018" PostHistoryTypeId="2" PostId="11990" RevisionGUID="f8143a93-4917-466e-a1a9-7d39a8617e00" CreationDate="2011-05-06T09:23:13.593" UserId="4235" Text="I'll add to the deluge of titles here:&#xD;&#xA;&#xD;&#xA;[Game Engine Architecture][1] by Jason Gregory (Naughty Dog) for general game engine overview at a reasonably detailed level.&#xD;&#xA;&#xD;&#xA;[Real-time Collision Detection][2] by Christer Ericson (God of War) for an in-depth and comprehensive overview of collision detection systems.&#xD;&#xA;&#xD;&#xA;[Real-time Rendering][3] by Tomas Moller and Eric Haines for a similarly in-depth treatment of rendering.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gameenginebook.com&#xD;&#xA;  [2]: http://realtimecollisiondetection.net&#xD;&#xA;  [3]: http://www.realtimerendering.com/" />
  <row Id="26019" PostHistoryTypeId="16" PostId="11990" RevisionGUID="b276fe90-6572-42df-90bd-74a01a31f603" CreationDate="2011-05-06T09:23:13.593" UserId="4235" />
  <row Id="26020" PostHistoryTypeId="2" PostId="11991" RevisionGUID="c25bd923-40d6-4f21-9c7b-a2e0a697edd3" CreationDate="2011-05-06T09:56:36.360" UserId="7143" Text="hy,m beginner to corona and game development.i am using different objects in my game,on collision they all perform same function.i want them to do differently and some obects collide with some others and some may not.i hope you can understand my problem" />
  <row Id="26021" PostHistoryTypeId="1" PostId="11991" RevisionGUID="c25bd923-40d6-4f21-9c7b-a2e0a697edd3" CreationDate="2011-05-06T09:56:36.360" UserId="7143" Text="different collision effects on different objets" />
  <row Id="26022" PostHistoryTypeId="3" PostId="11991" RevisionGUID="c25bd923-40d6-4f21-9c7b-a2e0a697edd3" CreationDate="2011-05-06T09:56:36.360" UserId="7143" Text="&lt;collision-detection&gt;" />
  <row Id="26023" PostHistoryTypeId="2" PostId="11992" RevisionGUID="df60196b-82f9-4cb9-9b37-024bf71af394" CreationDate="2011-05-06T09:56:55.750" UserId="2239" Text="One way of solving it is to not call the move function when clicking but only set the desired destination where you want to move the character (and trigger a main loop if it's for some reason not already running) and let the main loop move the character towards the destination.&#xD;&#xA;&#xD;&#xA;See [tips for writing the game loop question][1] and this StackOverflow question titled [best way for simple game-loop in Javascript][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/651/tips-for-writing-the-main-game-loop&#xD;&#xA;  [2]: http://stackoverflow.com/questions/1955687/best-way-for-simple-game-loop-in-javascript" />
  <row Id="26024" PostHistoryTypeId="2" PostId="11993" RevisionGUID="50c8e234-b918-4824-9985-b21255f758b8" CreationDate="2011-05-06T11:21:35.647" UserId="5113" Text="I am interested in moving into game development once my current project is done, as it's nearly at a point where it will pay my bills and allow me to hire someone else to take the driver's seat, meaning that, for the first time in my working life, I'll be in a position to devote a proper amount of energy to getting into game development, which has been something I've wanted to do for a long time but forced myself to wait on, as there are only so many hours in the day to devote to projects.&#xD;&#xA;&#xD;&#xA;I am an experienced web developer (12 years) with most of my experience programming in C# and .Net (8 years). I am also a capable graphic designer. I have a surface knowledge of C++, though it's been 10 years since I wrote any C++ code. I also played with the DirectX 5 API back then as well.&#xD;&#xA;&#xD;&#xA;I am happy to outsource graphics and sound, leaving me with coding, game design, level design and so forth.&#xD;&#xA;&#xD;&#xA;* Do I need to learn C++ properly, or can I rely on my C# and .Net knowledge?&#xD;&#xA;* If I'm going to leave C++ out of the equation, am I seriously limiting myself with regards to platform agnosticism?&#xD;&#xA;* Given that my memory of mathematics (high school level) is hazy at best, how much time I do I need to devote to pure maths self-education, or can I pretty much figure it out as I go?&#xD;&#xA;&#xD;&#xA;In a nutshell, I'd love to get some idea of what the best approach for me would be, including DO's and DON'T's that might slow me down. I know that baby steps will be required at first, but it would be nice to get some advice as to what path I should follow to get myself up to speed quickly so that I am able to create decent indie games with nice looking 3D graphics, AI, particle effects and so forth." />
  <row Id="26025" PostHistoryTypeId="1" PostId="11993" RevisionGUID="50c8e234-b918-4824-9985-b21255f758b8" CreationDate="2011-05-06T11:21:35.647" UserId="5113" Text="Experienced coder/designer moving into game development - what's involved?" />
  <row Id="26026" PostHistoryTypeId="3" PostId="11993" RevisionGUID="50c8e234-b918-4824-9985-b21255f758b8" CreationDate="2011-05-06T11:21:35.647" UserId="5113" Text="&lt;c++&gt;&lt;c#&gt;&lt;learning&gt;" />
  <row Id="26027" PostHistoryTypeId="2" PostId="11994" RevisionGUID="8b3903ef-e7a0-42d5-b131-6e1f9391e2b9" CreationDate="2011-05-06T11:57:53.540" UserId="2792" Text="As you are just doing this for yourself and are not aiming to get employed as a game programmer, I would suggest sticking to what you know: Use C#. There seems to be a lot of movement doing gamedev in C# with tools like XNA and Unity3D. There has also been some cross platform games like SpaceChem delivered using C# on mono.&#xD;&#xA;&#xD;&#xA;You can always try to do stuff in C or C++ just to learn something new, or fresh up on old knowledge. Low level programming is not going away, but it might not be your main focus." />
  <row Id="26028" PostHistoryTypeId="2" PostId="11995" RevisionGUID="a0edb3ed-8eb1-4ac2-938f-8004c506b662" CreationDate="2011-05-06T12:06:41.377" UserId="6588" Text="Collision events parameters for the objects involved in a collision. The parameters are named &quot;other&quot; or &quot;other1&quot; depending how how exactly you setup the collision event listener. Here's the documentation:&#xD;&#xA;&#xD;&#xA;http://developer.anscamobile.com/content/game-edition-collision-detection#Global_collision_listeners" />
  <row Id="26029" PostHistoryTypeId="25" PostId="11993" RevisionGUID="cdd017ff-d14c-4c69-afc5-0a9fbff8950a" CreationDate="2011-05-06T12:11:29.953" Comment="http://twitter.com/#!/StackGameDev/status/66475169572585472" />
  <row Id="26030" PostHistoryTypeId="2" PostId="11996" RevisionGUID="68145d22-b6b9-458a-9a62-ea08271d864c" CreationDate="2011-05-06T12:34:43.960" UserId="7144" Text="The main focus when first getting into game development, especially if you are doing solo development, is choosing an approach which will allow you to finish a game.  The world is littered with half-finished prototypes of every game genre imaginable, but bringing a game through to completion is much more difficult.&#xD;&#xA;&#xD;&#xA;So, to expand on what void said, stick to what you know, and choose a game to develop that is both something you would enjoy playing and is a relatively simple concept.  Bring it through to a fully playable state with a simple version of every subsystem in place (that is, as appropriate have some simple graphics, a frontend system, HUD/overlays, a save/load system, networking, whatever the game needs to be complete).  Then you can upgrade each part of the game as you get more comfortable.  Don't worry too much about your first game being your magnum opus, as you get more confident in game development you will know when the time is right to step up your work, start work on a new game with a larger scope, or start focusing on cross-platform development.&#xD;&#xA;&#xD;&#xA;As for mathematics, your knowledge will need to scale with the specific tasks that you are trying to accomplish, and will also depend on how much you are trying to develop on your own versus using third-party packages to accomplish things for you. For example, manipulating objects in 2D or 3D space requires some knowledge of matrix algebra and vector math, but nothing too complicated.  Creating an animation engine will likely require knowledge of quaternions.  Developing a physics engine requires some knowledge of calculus - the more complex your physics engine, the more complex calculus you need to get into.&#xD;&#xA;&#xD;&#xA;I would recommend looking into third party packages like [ODE](http://www.ode.org/) so you can sweep away some of the more complicated mathematics and focus on developing your game.  Then later, if you decide to take on developing these underlying systems yourself, you can buckle down and learn the maths you need to develop effectively in a just-in-time fashion." />
  <row Id="26031" PostHistoryTypeId="4" PostId="8720" RevisionGUID="3db9d025-a671-4f1f-bc2b-fc585747d560" CreationDate="2011-05-06T13:02:06.213" UserId="2229" Comment="edited title" Text="OpenGL ES 2.0: Picking Individual Polygon Sprites from within VBO" />
  <row Id="26037" PostHistoryTypeId="2" PostId="11999" RevisionGUID="5c3a71e6-33e4-4c5f-9f9d-a9ae36ca60f1" CreationDate="2011-05-06T15:16:57.000" UserId="1964" Text="I'm in the pre-planning phase of coming up with a game design and I was wondering if there was a sensible way to stop people from editing saves in a game with offline and online components.&#xD;&#xA;&#xD;&#xA;The offline component would allow the player to play through the game and the online component would allow them to play against other players, so I would need to make sure that people hadn't edited the source code/save files while offline to gain an advantage while online.&#xD;&#xA;&#xD;&#xA;Game likely to be developed in either .Net or Java, both of which are unfortunately easy to decompile." />
  <row Id="26038" PostHistoryTypeId="1" PostId="11999" RevisionGUID="5c3a71e6-33e4-4c5f-9f9d-a9ae36ca60f1" CreationDate="2011-05-06T15:16:57.000" UserId="1964" Text="Ensuring that saved data has not been edited in a game with both offline and online components." />
  <row Id="26039" PostHistoryTypeId="3" PostId="11999" RevisionGUID="5c3a71e6-33e4-4c5f-9f9d-a9ae36ca60f1" CreationDate="2011-05-06T15:16:57.000" UserId="1964" Text="&lt;online&gt;&lt;anti-cheat&gt;" />
  <row Id="26040" PostHistoryTypeId="2" PostId="12000" RevisionGUID="9da523bd-043c-4885-932f-df1d08d66166" CreationDate="2011-05-06T15:11:53.367" UserDisplayName="Saska" Text="I must write a cross-platform real-time-strategy game within 2-3 months. I want use C++ and OpenGL and am looking for an engine.&#xD;&#xA;&#xD;&#xA;The engine must be open source and work under both Linux and Windows. Preferably it should work with 3ds Max models. I do not know the game engines. Which engine would you recommend?&#xD;&#xA;&#xD;&#xA;Thanks for answers and sorry for bad english." />
  <row Id="26041" PostHistoryTypeId="1" PostId="12000" RevisionGUID="9da523bd-043c-4885-932f-df1d08d66166" CreationDate="2011-05-06T15:11:53.367" UserDisplayName="Saska" Text="open source engine for rts" />
  <row Id="26042" PostHistoryTypeId="3" PostId="12000" RevisionGUID="9da523bd-043c-4885-932f-df1d08d66166" CreationDate="2011-05-06T15:11:53.367" UserDisplayName="Saska" Text="&lt;opengl&gt;&lt;engine&gt;" />
  <row Id="26043" PostHistoryTypeId="17" PostId="12000" RevisionGUID="3bd45796-4c95-43f1-ad72-145f390a0f99" CreationDate="2011-05-06T15:25:44.737" UserId="-1" Comment="from http://stackoverflow.com/questions/5913377/open-source-engine-for-rts" Text="" />
  <row Id="26044" PostHistoryTypeId="2" PostId="12001" RevisionGUID="939c46a5-8689-4600-b0c6-7f137b5ddea4" CreationDate="2011-05-06T15:29:08.797" UserId="7148" Text="Ricket gave some solid advice above, but you might want to add the [TIGSource Forums' Unpaid Collaborations][1] to your list of places to investigate. They have a pretty active community of 0-budget developers and artists. Also, if you're willing to use pre-made art assets/sound/music, you should check out the results from their [Assemblee Competition][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/&#xD;&#xA;  [2]: http://forums.tigsource.com/index.php?board=37.0" />
  <row Id="26046" PostHistoryTypeId="12" PostId="12001" RevisionGUID="b517fe7a-9c29-48db-9ef4-4e9e3e4ddc05" CreationDate="2011-05-06T15:34:52.210" UserId="7148" Text="[{&quot;Id&quot;:7148,&quot;DisplayName&quot;:&quot;user7148&quot;}]" />
  <row Id="26047" PostHistoryTypeId="2" PostId="12002" RevisionGUID="248f8b00-0ba3-4298-9620-c4dfbc910b47" CreationDate="2011-05-06T15:38:28.870" UserId="1430" Text="I know of two that still seem reasonably actively developed: [Spring][1], [OpenRA][2] and [Stratagus][3]. Wikipedia has a [list of open source game engines][4], some of which may be appropriate for an RTS game (such as [FIFE][5], which used to bill itself as a Fallout-style engine, but should still be appropriate for RTS games).&#xD;&#xA;&#xD;&#xA;Some of these engines may work directly with 3DS Max model files, but that file format (.3ds) is actually pretty archaic, cumbersome, and suboptimal for direct consumption by a game engine, so you may find that the engines instead support some other model format that Max can export to (or supply their own conversion tools).&#xD;&#xA;&#xD;&#xA;Also, it's not open source (and does in fact cost money), but [people have used Unity][6] to make RTS games as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://springrts.com/&#xD;&#xA;  [2]: http://openra.res0l.net/&#xD;&#xA;  [3]: http://stratagus.sourceforge.net/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/List_of_game_engines#Free_and_open_source&#xD;&#xA;  [5]: http://fifengine.net/&#xD;&#xA;  [6]: http://forum.unity3d.com/threads/17634-C-amp-C-style-RTS-Community-Project-Generals" />
  <row Id="26048" PostHistoryTypeId="13" PostId="12001" RevisionGUID="f4941cc1-2579-486e-a57c-37a74cf2b7b6" CreationDate="2011-05-06T15:39:34.503" UserId="7148" Text="[{&quot;Id&quot;:7148,&quot;DisplayName&quot;:&quot;user7148&quot;}]" />
  <row Id="26049" PostHistoryTypeId="2" PostId="12003" RevisionGUID="e59e2672-ea3d-4131-9049-b6d532fce3f9" CreationDate="2011-05-06T15:43:24.507" UserId="5966" Text="I'm making pool game like game. This game requires very precise reflective bounces.&#xD;&#xA;I tried *Box2D* and *Bullet Physics*, but they have this problem.&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FJQ0A.png&#xD;&#xA;&#xD;&#xA;If there is a wall on top of this image, red line is regular course of the regular pool game. But the engines often shows green line course. Especially,&#xD;&#xA;&#xD;&#xA;1. This happens after a ball moving slowly hits the wall.&#xD;&#xA;2. Sometimes a ball moving fast get slower suddenly.&#xD;&#xA;&#xD;&#xA;I'm finding a physics engine can simulate pool game correctly without these problems. Can you recommend some? I'm digging *Newton Game Dynamics* now, but I have no sure about this. I'm considering *PhysX* as next trial, and have to make my own if nothing be found. But it's obvious it'll take huge time, so I wish I will do not.&#xD;&#xA;I'll be very appreciated if you save my time.&#xD;&#xA;&#xD;&#xA;Acceptable languages/platform are C/C++/Objective+C on iOS." />
  <row Id="26050" PostHistoryTypeId="1" PostId="12003" RevisionGUID="e59e2672-ea3d-4131-9049-b6d532fce3f9" CreationDate="2011-05-06T15:43:24.507" UserId="5966" Text="Physics engine recommendation which can simulate pool game correctly?" />
  <row Id="26051" PostHistoryTypeId="3" PostId="12003" RevisionGUID="e59e2672-ea3d-4131-9049-b6d532fce3f9" CreationDate="2011-05-06T15:43:24.507" UserId="5966" Text="&lt;engine&gt;&lt;physics&gt;&lt;simulations&gt;" />
  <row Id="26053" PostHistoryTypeId="5" PostId="12003" RevisionGUID="1276c6f6-1786-437f-8a96-6ec8862b3b16" CreationDate="2011-05-06T15:48:32.727" UserId="5966" Comment="added 95 characters in body" Text="I'm making pool game like game. This game requires correct (or very accurate) reflective bounces.&#xD;&#xA;I tried *Box2D* and *Bullet Physics*, but they have this problem.&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FJQ0A.png&#xD;&#xA;&#xD;&#xA;If there is a wall on top of this image, red line is regular course of the regular pool game. But the engines often shows green line course. Especially,&#xD;&#xA;&#xD;&#xA;1. This happens after a ball moving slowly hits the wall.&#xD;&#xA;2. Sometimes a ball moving fast get slower suddenly.&#xD;&#xA;&#xD;&#xA;I'm finding a physics engine can simulate pool game as much as possible without these problems. Can you recommend some? I'm digging *Newton Game Dynamics* now, but I have no sure about this. I'm considering *PhysX* as next trial, and have to make my own if nothing be found. But it's obvious it'll take huge time, so I wish I will do not.&#xD;&#xA;I'll be very appreciated if you save my time. And of course, solution with Box2D / Bullet Physics are also welcomed!&#xD;&#xA;&#xD;&#xA;Acceptable languages/platform are C/C++/Objective+C on iOS." />
  <row Id="26054" PostHistoryTypeId="2" PostId="12004" RevisionGUID="f2f03f0c-e04d-4364-9b79-6e4d38335c56" CreationDate="2011-05-06T15:51:15.323" UserId="1430" Text="Being able to decompile/reverse engineer the client code easily is really only a slight hindrance. Enterprising hackers have been bending executables to their will (maliciously and non-) for years before high-level, trivial-to-decompile languages like C# came on to the scene. Security through obscurity alone is no security at all.&#xD;&#xA;&#xD;&#xA;Any data on the user's machine (code or regular asset data) is essentially compromised already. You can't really protect yourself against that -- if you don't want people editing data, don't put it on their machine, save it on your servers. Similarly if you don't want them modifying the code in the client, make sure the client doesn't have control over anything useful.&#xD;&#xA;&#xD;&#xA;If that's not an option (for example your multiplayer is entirely peer-to-peer) you can do things like compute hashes of the relevant assets and only allow people to play with eachother if the hashes match. Yes, somebody could carefully craft an edit to the executable such that it returned a different hash, but all that should mean is that the offending player will desynchronize and disconnect from the game relatively quickly because his or her assets don't match the rest of the players'.&#xD;&#xA;&#xD;&#xA;You could also employ a &quot;majority rules&quot; type of test that allows for you to disconnect players whose simulation has drifted out of sync with other players, giving the &quot;host&quot; player (whoever started the game) the tie-breaking vote." />
  <row Id="26055" PostHistoryTypeId="5" PostId="12002" RevisionGUID="b1bbe016-b2ec-46f6-ba4e-0b5ef675de77" CreationDate="2011-05-06T15:55:43.900" UserId="1430" Comment="added 47 characters in body" Text="I know of two that still seem reasonably actively developed: [Spring][1], [OpenRA][2] and [Stratagus][3]. Wikipedia has a [list of open source game engines][4], some of which may be appropriate for an RTS game (such as [FIFE][5], which used to bill itself as a Fallout-style engine, but should still be appropriate for RTS games).&#xD;&#xA;&#xD;&#xA;Some of these engines may work directly with 3DS Max model files, but that file format (.3ds) is actually pretty archaic, cumbersome, and suboptimal for direct consumption by a game engine, so you may find that the engines instead support some other model format that Max can export to (or supply their own conversion tools).&#xD;&#xA;&#xD;&#xA;Also, it's not open source (&lt;s&gt;and does in fact cost money&lt;/s&gt; might cost if you need certain features), but [people have used Unity][6] to make RTS games as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://springrts.com/&#xD;&#xA;  [2]: http://openra.res0l.net/&#xD;&#xA;  [3]: http://stratagus.sourceforge.net/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/List_of_game_engines#Free_and_open_source&#xD;&#xA;  [5]: http://fifengine.net/&#xD;&#xA;  [6]: http://forum.unity3d.com/threads/17634-C-amp-C-style-RTS-Community-Project-Generals" />
  <row Id="26056" PostHistoryTypeId="2" PostId="12005" RevisionGUID="99d39c55-7db6-4b8b-9202-1c7d9a816ac3" CreationDate="2011-05-06T15:55:51.670" UserId="7148" Text="[Chimpmunk][1] may be worth a shot.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://howlingmoonsoftware.com/chipmunk.php" />
  <row Id="26057" PostHistoryTypeId="2" PostId="12006" RevisionGUID="d4ea66b7-534e-46b6-8116-2a3c98531eb6" CreationDate="2011-05-06T15:58:34.920" UserId="6937" Text="Physics engines have a bounce threshold. I don't know how to do it in either of those engines, but the threshold being set too high will cause it to ignore impacts under a certain velocity. Lower the bounce threshold and it will bounce at lower speeds." />
  <row Id="26059" PostHistoryTypeId="2" PostId="12008" RevisionGUID="be7f0ee3-e251-45fd-bc0e-499f430af6c4" CreationDate="2011-05-06T16:04:37.000" UserId="744" Text="Box2D will do what you want but you have to set the restitution (bounce) constants for the wall and ball fixtures. For a pool game you probably want to start with perfect restitution and high friction but linear and angular damping, and tweak from there." />
  <row Id="26060" PostHistoryTypeId="5" PostId="12006" RevisionGUID="0b0d2891-1d55-4d16-8e99-c4faa461d2e0" CreationDate="2011-05-06T16:05:55.690" UserId="6937" Comment="added 294 characters in body" Text="Physics engines have a bounce threshold. I don't know how to do it in either of those engines, but the threshold being set too high will cause it to ignore impacts under a certain velocity. Lower the bounce threshold and it will bounce at lower speeds.&#xD;&#xA;&#xD;&#xA;I know you asked for a different physics engine, but all physics engines I know of use bounce thresholds to keep objects from jittering when they're sitting on top of each other. So suggesting a good physics engine will be counterproductive as any good physics engine will have this effect." />
  <row Id="26061" PostHistoryTypeId="2" PostId="12009" RevisionGUID="5d4af71e-5f2b-46ac-a907-4d8f17982de6" CreationDate="2011-05-06T16:22:04.000" UserId="1101" Text="If the data is all generated client-side, there's nothing you can do about this. You can't tell the difference between an edit done by your software and an edit done by someone or something else pretending to be your software.&#xD;&#xA;&#xD;&#xA;One deterrent you can try is encrypting the save file, using a key in the software. Unfortunately, if the user is good enough to edit a save file, they're good enough to find the key in your software too.&#xD;&#xA;&#xD;&#xA;You can stop people editing the saves by not storing them on the client's machine, eg. by uploading them to the server - but that doesn't stop them uploading a hacked save in the first place! Online games solve this problem by keeping the authoritative game state on their server all the time, but that won't work for your offline mode.&#xD;&#xA;&#xD;&#xA;So really, the answer is no - anything your game can do to edit, obscure, or encrypt the data can also be done by a hacker." />
  <row Id="26062" PostHistoryTypeId="5" PostId="11991" RevisionGUID="8a3b653c-d5b9-46cd-93d8-85297bfd9f90" CreationDate="2011-05-06T16:35:17.127" UserId="1430" Comment="added 12 characters in body; edited title" Text="I'm a beginner to Corona and game development. I am using different objects in my game, on collision they all perform the same function. I want them to do different things and also to allow some obects collide with only certain others. How would I achieve this?" />
  <row Id="26063" PostHistoryTypeId="4" PostId="11991" RevisionGUID="8a3b653c-d5b9-46cd-93d8-85297bfd9f90" CreationDate="2011-05-06T16:35:17.127" UserId="1430" Comment="added 12 characters in body; edited title" Text="Different collision effects on different objects" />
  <row Id="26065" PostHistoryTypeId="2" PostId="12010" RevisionGUID="9ae14b72-f4e4-4b1a-8036-ac715e0cca51" CreationDate="2011-05-06T17:23:08.823" UserId="7150" Text="I'm just getting into coding up some 3d rendering apps and I'm considering taking the jump into interactivity. While developing I've learned about Euler angles, gimbal lock, quaternions, frustum, culling, vector matrices, (quad/oc)trees, etc. Haven't touched vertex buffers, textures, mipmapping, peripheral interfaces (other than mouse/keyboard), and general game engine components.&#xD;&#xA;&#xD;&#xA;I imagine all of these terms, techniques, have evolved over time from early &quot;Wolfenstein&quot;  implementation, to Quake 3 implementation, to modern day id Tech 5 implementation (and everything in between.)&#xD;&#xA;&#xD;&#xA;Seems like information like this would be valuable so I can rule out certain implementations of something because they've already been obsoleted by other newer and cooler things. Essentially looking to evolve my own skills, but on a fast track (instead of reading all the material and chronologically keeping track.)&#xD;&#xA;&#xD;&#xA;**Are there any good articles that layout the evolution of game development techniques?**&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Chenz&#xD;&#xA;&#xD;&#xA;P.S. I'm not trying to avoid RTFM, just trying to only get the up-to-date information." />
  <row Id="26066" PostHistoryTypeId="1" PostId="12010" RevisionGUID="9ae14b72-f4e4-4b1a-8036-ac715e0cca51" CreationDate="2011-05-06T17:23:08.823" UserId="7150" Text="Are there any good articles that layout the evolution of game development techniques?" />
  <row Id="26067" PostHistoryTypeId="3" PostId="12010" RevisionGUID="9ae14b72-f4e4-4b1a-8036-ac715e0cca51" CreationDate="2011-05-06T17:23:08.823" UserId="7150" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;game-industry&gt;" />
  <row Id="26068" PostHistoryTypeId="5" PostId="11786" RevisionGUID="fff7ac61-985a-448e-a5d0-e37e1fcc7690" CreationDate="2011-05-06T17:53:32.640" UserId="4229" Comment="added 223 characters in body; edited body; deleted 13 characters in body; deleted 5 characters in body" Text="I want to start writing my game engine from scratch for learning purpose, what is the prerequisites and how to do that, what programming languages and things you recommend me? Also if you have good articles and books on that it will be great. Thanks in advance!&#xD;&#xA;&#xD;&#xA;My Programming languages and tools are:&#xD;&#xA;&#xD;&#xA; - C/C++ is it good to use only C?&#xD;&#xA; - Python&#xD;&#xA; - OpenGL&#xD;&#xA; - Git&#xD;&#xA; - GDB&#xD;&#xA;&#xD;&#xA;What I want to learn from it:&#xD;&#xA;&#xD;&#xA; - Core Game Engine&#xD;&#xA; - Rendering / Graphics&#xD;&#xA; - Game Play/Rules&#xD;&#xA; - Input (keyboard/mouse/controllers,&#xD;&#xA;   etc)&#xD;&#xA;&#xD;&#xA;In Rendering/Graphics:&#xD;&#xA;&#xD;&#xA; - 3D&#xD;&#xA; - Shading&#xD;&#xA; - Lighting&#xD;&#xA; - Texturing" />
  <row Id="26069" PostHistoryTypeId="2" PostId="12011" RevisionGUID="ff5051df-2caf-4a1a-80fb-066dbd3a21ec" CreationDate="2011-05-06T17:58:15.733" UserId="7151" Text="There is also [Glest][1].&#xD;&#xA;&#xD;&#xA;  [1]: http://glest.org/en/index.php" />
  <row Id="26070" PostHistoryTypeId="2" PostId="12012" RevisionGUID="62ec54cc-ecbb-46b9-8e61-57c4451a8f69" CreationDate="2011-05-06T18:00:01.337" UserId="5048" Text="I am trying to learn a bit of level-design. The type of game I am most interested is 2D puzzle games similar to Cut The Rope for iPad. However, literature on general level-design for different genres would be very welcomed.&#xD;&#xA;&#xD;&#xA;A internet quick search brings.&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965/ref=pd_sim_b_5&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Game-Level-Design-Development/dp/1584503696&#xD;&#xA;&#xD;&#xA;Anyone can recommend those or any other resources? books, recorded conferences, examples, tutorials, slides..&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="26071" PostHistoryTypeId="1" PostId="12012" RevisionGUID="62ec54cc-ecbb-46b9-8e61-57c4451a8f69" CreationDate="2011-05-06T18:00:01.337" UserId="5048" Text="Are there good books on level-design?" />
  <row Id="26072" PostHistoryTypeId="3" PostId="12012" RevisionGUID="62ec54cc-ecbb-46b9-8e61-57c4451a8f69" CreationDate="2011-05-06T18:00:01.337" UserId="5048" Text="&lt;level-design&gt;&lt;resources&gt;" />
  <row Id="26073" PostHistoryTypeId="5" PostId="11991" RevisionGUID="4f5ef5a4-002d-4dad-8188-4da585549fb9" CreationDate="2011-05-06T18:00:26.547" UserId="962" Comment="deleted 3 characters in body" Text="I'm a beginner to Corona and game development. I am using different objects in my game, on collision they all perform the same function. I want them to do different things and also to allow some objects collide with only certain others. How would I achieve this?" />
  <row Id="26074" PostHistoryTypeId="25" PostId="11999" RevisionGUID="fb52456d-2b53-45f9-9ff0-e3c730ee7c34" CreationDate="2011-05-06T18:11:30.433" Comment="http://twitter.com/#!/StackGameDev/status/66565768233484288" />
  <row Id="26075" PostHistoryTypeId="5" PostId="11995" RevisionGUID="668bff1e-f0e5-400d-a5f2-9aae968058c4" CreationDate="2011-05-06T18:23:03.237" UserId="6588" Comment="added 188 characters in body" Text="Collision events parameters for the objects involved in a collision. The parameters are named &quot;other&quot; or &quot;other1&quot; depending how how exactly you setup the collision event listener. Here's the documentation:&#xD;&#xA;&#xD;&#xA;http://developer.anscamobile.com/content/game-edition-collision-detection#Global_collision_listeners&#xD;&#xA;&#xD;&#xA;To have control which objects actually collide use collision masking:&#xD;&#xA;http://developer.anscamobile.com/content/game-edition-collision-detection#Collision_categories_masking_and_groups" />
  <row Id="26076" PostHistoryTypeId="2" PostId="12013" RevisionGUID="db510c53-1ff3-4d77-9eb9-d1d404c72387" CreationDate="2011-05-06T18:50:34.313" UserId="6937" Text="We, as in my 4 person indie group, have an entire whiteboard that looks like graffiti for prototyping our game ideas. We look at it every day and choose which idea draws us in the most when we near time to start a new project. We also randomly draw characters that seem interesting even if they have no gameplay associated with them. This works but doesn't always seem to give us the best understanding of our ideas. We tried a rule that if you come up with a game idea, build a very basic prototype and show us, but that also wastes time.&#xD;&#xA;&#xD;&#xA;So, my question is &quot;what is a good way to prototype game ideas&quot;. We need a balance between getting the idea across and not skipping it because we don't understand it, but also not wasting time building up a ton of ideas that will never be touched. What is an efficient way to describe the major aspects like gameplay, art feel, special features, audience, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope this isn't viewed as too subjective, but it would be really good to know. I think a best answer can be chosen for this type of question." />
  <row Id="26077" PostHistoryTypeId="1" PostId="12013" RevisionGUID="db510c53-1ff3-4d77-9eb9-d1d404c72387" CreationDate="2011-05-06T18:50:34.313" UserId="6937" Text="A good way to prototype games?" />
  <row Id="26078" PostHistoryTypeId="3" PostId="12013" RevisionGUID="db510c53-1ff3-4d77-9eb9-d1d404c72387" CreationDate="2011-05-06T18:50:34.313" UserId="6937" Text="&lt;game-design&gt;&lt;design-patterns&gt;&lt;prototyping&gt;" />
  <row Id="26079" PostHistoryTypeId="4" PostId="12013" RevisionGUID="a8717507-df40-4be4-b725-eaae3960a023" CreationDate="2011-05-06T18:55:43.497" UserId="6937" Comment="edited title" Text="A good way to prototype game ideas?" />
  <row Id="26080" PostHistoryTypeId="5" PostId="12012" RevisionGUID="f21828d0-8cf1-4691-b19b-bc8c58bacd9b" CreationDate="2011-05-06T19:13:43.397" UserId="3588" Comment="Removing salutations. Also, switching the poor [resources] tag for the more specific [books] tag. ♪" Text="I am trying to learn a bit of level-design. The type of game I am most interested is 2D puzzle games similar to Cut The Rope for iPad. However, literature on general level-design for different genres would be very welcomed.&#xD;&#xA;&#xD;&#xA;A internet quick search brings.&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965/ref=pd_sim_b_5&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Game-Level-Design-Development/dp/1584503696&#xD;&#xA;&#xD;&#xA;Anyone can recommend those or any other resources? books, recorded conferences, examples, tutorials, slides.." />
  <row Id="26081" PostHistoryTypeId="6" PostId="12012" RevisionGUID="f21828d0-8cf1-4691-b19b-bc8c58bacd9b" CreationDate="2011-05-06T19:13:43.397" UserId="3588" Comment="Removing salutations. Also, switching the poor [resources] tag for the more specific [books] tag. ♪" Text="&lt;books&gt;&lt;level-design&gt;" />
  <row Id="26082" PostHistoryTypeId="24" PostId="12012" RevisionGUID="f21828d0-8cf1-4691-b19b-bc8c58bacd9b" CreationDate="2011-05-06T19:13:43.397" Comment="Proposed by 3588 approved by 51 edit id of 412" />
  <row Id="26083" PostHistoryTypeId="16" PostId="12012" RevisionGUID="e74304bf-39ec-49a6-9f86-79014e450a1c" CreationDate="2011-05-06T19:13:51.930" UserId="51" />
  <row Id="26084" PostHistoryTypeId="5" PostId="12002" RevisionGUID="9a56817f-018a-4529-b1a6-1ca7aec1b7b8" CreationDate="2011-05-06T19:14:12.277" UserId="1430" Comment="added 2 characters in body" Text="I know of three that still seem reasonably actively developed: [Spring][1], [OpenRA][2] and [Stratagus][3]. Wikipedia has a [list of open source game engines][4], some of which may be appropriate for an RTS game (such as [FIFE][5], which used to bill itself as a Fallout-style engine, but should still be appropriate for RTS games).&#xD;&#xA;&#xD;&#xA;Some of these engines may work directly with 3DS Max model files, but that file format (.3ds) is actually pretty archaic, cumbersome, and suboptimal for direct consumption by a game engine, so you may find that the engines instead support some other model format that Max can export to (or supply their own conversion tools).&#xD;&#xA;&#xD;&#xA;Also, it's not open source (&lt;s&gt;and does in fact cost money&lt;/s&gt; might cost if you need certain features), but [people have used Unity][6] to make RTS games as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://springrts.com/&#xD;&#xA;  [2]: http://openra.res0l.net/&#xD;&#xA;  [3]: http://stratagus.sourceforge.net/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/List_of_game_engines#Free_and_open_source&#xD;&#xA;  [5]: http://fifengine.net/&#xD;&#xA;  [6]: http://forum.unity3d.com/threads/17634-C-amp-C-style-RTS-Community-Project-Generals" />
  <row Id="26085" PostHistoryTypeId="2" PostId="12014" RevisionGUID="dcd059c5-1310-49ab-982f-f4163eb137f1" CreationDate="2011-05-06T19:23:10.983" UserId="51" Text="The only thing that's important is getting game playable as quickly as possible, and being able to iterate on the game as quickly as possible.&#xD;&#xA;&#xD;&#xA;So with that in mind, there are a lot of things you can do.&#xD;&#xA;&#xD;&#xA;1) Pen/paper play it.  If it's a level, draw it out on the white board and storyboard the major beats.  If it's an RPG style game you can pen and paper it DnD style.  If you're trying to prototype an art style, paint it up.  You don't have to get everything to 100% in some 3D engine just to test something.&#xD;&#xA;&#xD;&#xA;2) Try out ideas in a rapid prototype environment.  For example, using Unity.  If you have to write code, you should be doing it with the highest level programming language you are comfortable with.  There are related questions for this, like http://gamedev.stackexchange.com/questions/536/recommended-2d-game-engine-for-prototyping and http://gamedev.stackexchange.com/questions/13/when-creating-quick-prototypes-is-it-better-to-use-the-language-you-are-going-to&#xD;&#xA;&#xD;&#xA;3) If you must do it in your own engine, be sure to employ practices that allow you malleability of code and content.  Make sure your tools are good so you can drop in content quickly.  Try to write code in such a way that you can modify it easily.  Employ a source control solution that allows really easy branching like git or mercurial so you can try things with impunity." />
  <row Id="26086" PostHistoryTypeId="2" PostId="12015" RevisionGUID="d9ee5685-64fa-4052-aead-e4b24d22bd51" CreationDate="2011-05-06T19:46:45.633" UserId="2710" Text="When we were just starting development of our current game, we, too, wanted to have offline play mode. The idea was to let players play through game levels while offline, and then somehow sync their progress when they come online. So, we thought long and hard about how we can prevent cheating. The conclusion was: we can't. There's really NO way to let players play offline and be 100% sure they didn't cheat." />
  <row Id="26087" PostHistoryTypeId="6" PostId="12013" RevisionGUID="610d3fa4-609c-4e41-9934-9f62488b7127" CreationDate="2011-05-06T20:14:55.787" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;prototyping&gt;" />
  <row Id="26088" PostHistoryTypeId="5" PostId="11931" RevisionGUID="f671f5e7-bcc3-4173-901d-7f31e8b4ece3" CreationDate="2011-05-06T20:48:44.340" UserId="5459" Comment="SOLUTION!" Text="I have strange problem with drawing skybox texture on Mac. On iPhone everything is going fine. I have tried to change near and far planes value with no success.&#xD;&#xA;&#xD;&#xA;It is a skybox of six textures, and for every texture I set this:&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;What could be the problem?&#xD;&#xA;&#xD;&#xA;Screenshot:&#xD;&#xA;&#xD;&#xA;![Image of sky with the edges of the skybox visible][1]&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;I have tried to set background color to red, to ensure if it is bleeding through the texture&#xD;&#xA;&#xD;&#xA;I have also tried to change coords of the texture to this:&#xD;&#xA;&#xD;&#xA;    float err_corr = 0.5 / TEXTURE_SIZE;&#xD;&#xA;    &#xD;&#xA;    GLfloat vertices[24] = {	&#xD;&#xA;    		-1.0f - err_corr, -1.0f - err_corr,  1.0f + err_corr,&#xD;&#xA;        1.0f + err_corr, -1.0f - err_corr,  1.0f + err_corr,&#xD;&#xA;        -1.0f - err_corr,  1.0f + err_corr,  1.0f + err_corr,&#xD;&#xA;        1.0f + err_corr,  1.0f + err_corr,  1.0f + err_corr,&#xD;&#xA;        -1.0f - err_corr, -1.0f - err_corr, -1.0f - err_corr,&#xD;&#xA;        1.0f + err_corr, -1.0f - err_corr, -1.0f - err_corr,&#xD;&#xA;        -1.0f - err_corr,  1.0f + err_corr, -1.0f - err_corr,&#xD;&#xA;        1.0f + err_corr,  1.0f + err_corr, -1.0f - err_corr,&#xD;&#xA;    	};&#xD;&#xA;&#xD;&#xA;And the box is drawn in this order:  &#xD;&#xA;`GLubyte indices[14] = {0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1};`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**SOLUTION:**&#xD;&#xA;&#xD;&#xA;The solution is to set **GL_CLAMP_TO_EDGE** for the cubemap itself!&#xD;&#xA;&#xD;&#xA;    glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JH2qM.jpg" />
  <row Id="26089" PostHistoryTypeId="2" PostId="12016" RevisionGUID="a7a62e87-d4da-401c-96ae-b7236723bbed" CreationDate="2011-05-06T20:48:46.133" UserId="5497" Text="It sounds like you also need some pre-prototyping organization, too. Make a list of all your current ideas. To generate a rough ranking, each team member assigns each idea a score from 0 to 3 that indicates how badly they want to move the idea to the next stage. Everyone should try to have an even number of ideas at each ranking level (with 30 ideas, each person should have 6 or 7 0-ranked ideas, 6 or 7 1-ranked ideas, etc.). Next, for each idea add everyone's scores to get a total that will be from 0 to 12. With luck you will have from 1 to 3 top-scoring ideas to move forward with. After that, follow Tetrad's advice. Personally I love paper prototyping. With things on cards or slips of paper, it is incredibly easy to do things like reorganize a tech tree or explore variations on puzzles. I find a camera very handy for recording the good stuff you find as people are moving things around." />
  <row Id="26090" PostHistoryTypeId="25" PostId="12013" RevisionGUID="ce288471-dd18-4812-aff4-3a960eceb7e0" CreationDate="2011-05-06T21:11:30.253" Comment="http://twitter.com/#!/StackGameDev/status/66611066414710784" />
  <row Id="26091" PostHistoryTypeId="2" PostId="12017" RevisionGUID="21031da0-951d-4b62-9dc7-c217b9848109" CreationDate="2011-05-06T21:26:45.273" UserId="3051" Text="It took a while but I eventually found a fix for it.&#xD;&#xA;Some debugging eventually revealed the player was being telefragged.  Intercepting `EncroachedBy()` in our player's Pawn class with a no-op has stopped the issue:&#xD;&#xA;&#xD;&#xA;    event EncroachedBy(Actor Other)&#xD;&#xA;    {&#xD;&#xA;    	//NOP!&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm not sure if this is just putting a band-aid on a severed limb here but it's working now.&#xD;&#xA;&#xD;&#xA;Thanks for the suggestions above!" />
  <row Id="26092" PostHistoryTypeId="2" PostId="12018" RevisionGUID="ee9df418-f3a0-4931-9b1f-0e1961e94b5f" CreationDate="2011-05-06T21:43:42.497" UserId="7116" Text="After weeks of investigations I found the problem : Nvidia DX10 driver are really a mess !!!!&#xD;&#xA;&#xD;&#xA;=&gt; Tested my application with ATI = No problem&#xD;&#xA;=&gt; Migrated to DX11 =&gt; No problem at all ! (Instead of a gpu &quot;bound&quot; in full screen, my gpu now is idle 95% of the time !!)" />
  <row Id="26093" PostHistoryTypeId="2" PostId="12019" RevisionGUID="d1a279c0-7171-4d29-9fc5-4a40c4b4dec2" CreationDate="2011-05-06T21:44:24.493" UserId="4960" Text="[Irrlicht][1] is a great open-source 3D game engine. It doesn't have RTS-specific features but it could certainly be used to create an RTS (or any kind of game).&#xD;&#xA;&#xD;&#xA;It's written in C++, runs on Windows or Linux and supports both OpenGL and DirectX.&#xD;&#xA;&#xD;&#xA;Irrlicht is &#xD;&#xA;&#xD;&#xA;  [1]: http://irrlicht.sourceforge.net/" />
  <row Id="26094" PostHistoryTypeId="2" PostId="12020" RevisionGUID="f0b26e9b-7c06-40d3-907e-c9b34db607f6" CreationDate="2011-05-06T21:55:02.847" UserId="1072" Text="Sort of like a strip-light effect; not actually a light source, but just a polygon with glowing edges.&#xD;&#xA;&#xD;&#xA;Can this be done easily? Right now I'm contemplating drawing a line more than once with varying alpha/width values to achieve this, but I think that'll cause weird glowing points at the vertices, which is far from ideal." />
  <row Id="26095" PostHistoryTypeId="1" PostId="12020" RevisionGUID="f0b26e9b-7c06-40d3-907e-c9b34db607f6" CreationDate="2011-05-06T21:55:02.847" UserId="1072" Text="What's the best way of drawing a glowing 3d line using LWJGL?" />
  <row Id="26096" PostHistoryTypeId="3" PostId="12020" RevisionGUID="f0b26e9b-7c06-40d3-907e-c9b34db607f6" CreationDate="2011-05-06T21:55:02.847" UserId="1072" Text="&lt;opengl&gt;&lt;java&gt;&lt;lwjgl&gt;" />
  <row Id="26097" PostHistoryTypeId="5" PostId="11903" RevisionGUID="311662ed-efec-4c68-9795-a236ebbd5b30" CreationDate="2011-05-06T22:02:25.433" UserId="5473" Comment="add clarification with link to external question; added 1 characters in body" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Next, create functions in one or more &quot;controller&quot; classes; you can write them all as helper functions in your main class, although this may get a bit large after a while. These will be called every update to act upon the entities' data for different purposes (movement, attack etc.). Keep these functions outside of an entity class is more resource-efficient, and once you know what *describes* your entity you will automatically know what functions need to act on it.&#xD;&#xA;&#xD;&#xA;    /*** Real time game code ***/&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called x times per second, on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else //everyone else is your enemy!&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;        var whoseTurn:Boolean; //if turnbased&#xD;&#xA;        //etc.&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC, since it achieves MVC's goal of separation of concerns explicitly. See this [question][1].)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/327955/does-functional-programming-replace-gof-design-patterns" />
  <row Id="26098" PostHistoryTypeId="5" PostId="11886" RevisionGUID="67fad769-4d8b-4ce1-b5a5-f436f6076f71" CreationDate="2011-05-06T22:13:32.193" UserId="1198" Comment="deleted 12 characters in body" Text="I'm trying to write a short &quot;game&quot; where a player goes around and fights monsters but I have no idea how to handle the combat.&#xD;&#xA;&#xD;&#xA;For example, say I have a &quot;Warrior&quot; and a &quot;Troll&quot;. How do the two fight each other? I know I can do something like&#xD;&#xA;&#xD;&#xA;    Conan = Warrior.new();&#xD;&#xA;    CaveTroll = Troll.new();&#xD;&#xA;    Conan.attack(CaveTroll);&#xD;&#xA;    CaveTroll.attack(Conan);&#xD;&#xA;&#xD;&#xA;But what part of the game controls the monster? Do I just stick the above sequence in a loop until one of them dies? Or does the game &quot;engine&quot; need to have a part that deals specifically with combat? Or is this an aspect of the Troll's artificial intelligence that needs to take care of it's actions?&#xD;&#xA;&#xD;&#xA;Also, who/what determines the actions that the monster takes? Maybe a Troll can bash, kick, bite, cast spells, drink potions, use a magical item. Does the game engine determine what action the Troll takes or is that something the Troll class manages?&#xD;&#xA;&#xD;&#xA;Sorry I can't be more specific but I need some guidance on which direction to go with this. " />
  <row Id="26099" PostHistoryTypeId="5" PostId="12000" RevisionGUID="c0996340-54f9-4f22-b1ef-7f8718c6a9ae" CreationDate="2011-05-06T22:16:14.140" UserId="1198" Comment="fixed caps, removed signature per faq" Text="I must write a cross-platform real-time-strategy game within 2-3 months. I want use C++ and OpenGL and am looking for an engine.&#xD;&#xA;&#xD;&#xA;The engine must be open source and work under both Linux and Windows. Preferably it should work with 3ds Max models. I do not know the game engines. Which engine would you recommend?" />
  <row Id="26100" PostHistoryTypeId="4" PostId="12000" RevisionGUID="c0996340-54f9-4f22-b1ef-7f8718c6a9ae" CreationDate="2011-05-06T22:16:14.140" UserId="1198" Comment="fixed caps, removed signature per faq" Text="Open Source Engine for RTS" />
  <row Id="26101" PostHistoryTypeId="2" PostId="12021" RevisionGUID="3fc1ca70-e002-4ed7-80ac-f99caf92a7d5" CreationDate="2011-05-06T22:17:30.127" UserId="7155" Text="Hey guys, Whats the best practice to create games like farmville, tapzoo...Do I create a simple grid/tilemap as the background and then just have the objects (like houses and whatnot) as sprites ontop? Or can I also just use a regular image as a background and just make my sprites move on the basis of a non graphical grid? How do I go about the isometric perspective of the map? How would I increase the size of the map(for example in an mutable array i could add more locations or I could set already instantiated locations to bool:valid...)? Do I have to use a game-freindly language like cocos2d or can i just use obj-c with UIImageViews...or is very bad practice because of the amount of memory it consumes? What the best practice to create something like this?&#xD;&#xA;&#xD;&#xA;If you can answer anyone of these questions you are friggin awesome!&#xD;&#xA;Thanks!" />
  <row Id="26102" PostHistoryTypeId="1" PostId="12021" RevisionGUID="3fc1ca70-e002-4ed7-80ac-f99caf92a7d5" CreationDate="2011-05-06T22:17:30.127" UserId="7155" Text="Isometric Tile maps - best practice - games like farmville, tapzoo...?" />
  <row Id="26103" PostHistoryTypeId="3" PostId="12021" RevisionGUID="3fc1ca70-e002-4ed7-80ac-f99caf92a7d5" CreationDate="2011-05-06T22:17:30.127" UserId="7155" Text="&lt;tiles&gt;" />
  <row Id="26104" PostHistoryTypeId="5" PostId="11637" RevisionGUID="1c5034fa-27a0-417d-9694-da2fafc8adc2" CreationDate="2011-05-06T22:19:13.407" UserId="1198" Comment="fixed caps, added punctuation" Text="Does anyone know of a good WP7 accelerometer sample of a ball rolling around on a screen?" />
  <row Id="26105" PostHistoryTypeId="16" PostId="12000" RevisionGUID="30b6908f-1089-438a-be68-7be14e54363a" CreationDate="2011-05-06T22:24:55.080" UserId="51" />
  <row Id="26106" PostHistoryTypeId="16" PostId="12002" RevisionGUID="8863d981-1042-47e8-b671-ff5e36aa5acc" CreationDate="2011-05-06T22:24:55.080" UserId="51" />
  <row Id="26107" PostHistoryTypeId="16" PostId="12011" RevisionGUID="a505a4e9-d758-4986-80bd-d7187ac4cc00" CreationDate="2011-05-06T22:24:55.080" UserId="51" />
  <row Id="26108" PostHistoryTypeId="16" PostId="12019" RevisionGUID="605eca28-36ff-4d65-91f8-4630cf50494b" CreationDate="2011-05-06T22:24:55.080" UserId="51" />
  <row Id="26109" PostHistoryTypeId="5" PostId="12013" RevisionGUID="cf3e0bd0-ec88-422b-9c98-d0877b1cce6b" CreationDate="2011-05-06T23:35:11.807" UserId="6937" Comment="deleted 149 characters in body" Text="We, as in my 4 person indie group, have an entire whiteboard that looks like graffiti for prototyping our game ideas. We look at it every day and choose which idea draws us in the most when we near time to start a new project. We also randomly draw characters that seem interesting even if they have no gameplay associated with them. This works but doesn't always seem to give us the best understanding of our ideas. We tried a rule that if you come up with a game idea, build a very basic prototype and show us, but that also wastes time.&#xD;&#xA;&#xD;&#xA;So, my question is &quot;what is a good way to prototype game ideas&quot;. We need a balance between getting the idea across and not skipping it because we don't understand it, but also not wasting time building up a ton of ideas that will never be touched. What is an efficient way to describe the major aspects like gameplay, art feel, special features, audience, etc." />
  <row Id="26110" PostHistoryTypeId="2" PostId="12022" RevisionGUID="bb00c964-bcfd-4e92-a476-447cebe6ee11" CreationDate="2011-05-06T23:36:40.070" UserId="4235" Text="Although I realize you're looking for literature on the subject, in the meantime I would recommend trying to find a discussion community that most closely aligns to the particular game you're trying to design for. If none exist specifically for level design, find one where players of the game congregate. One of the best ways to learn level design for any game, IMO, is to do the following:&#xD;&#xA;&#xD;&#xA; 1. Actually begin creating levels for&#xD;&#xA;    the game &#xD;&#xA; 2. Get critical feedback about&#xD;&#xA;    what could be improved from players&#xD;&#xA;    and other designers &#xD;&#xA; 3. Respond to the&#xD;&#xA;    feedback with improvements to your&#xD;&#xA;    level &#xD;&#xA; 4. Repeat&#xD;&#xA;&#xD;&#xA;In terms of books on the subject, one you might be interested in looking at is Hourences' book, [The Hows and Whys of Level Design][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hourences.com/" />
  <row Id="26111" PostHistoryTypeId="16" PostId="12022" RevisionGUID="454932e1-9f50-4999-a07c-423dbeacb61b" CreationDate="2011-05-06T23:36:40.070" UserId="4235" />
  <row Id="26112" PostHistoryTypeId="2" PostId="12023" RevisionGUID="c0bd4df8-ce28-4390-8f2d-f0b4860e5f66" CreationDate="2011-05-07T00:04:06.493" UserId="3505" Text="The simple answer is: Do as you like. There are almost as many formulas for creating games as there are games.&#xD;&#xA;&#xD;&#xA;If you want a more specific answer you got to be far more specific about what you want to create.&#xD;&#xA;&#xD;&#xA;I guess that you are a beginner in game programming, in that case the most valuable piece of advice I can give you is keep it small and simple." />
  <row Id="26113" PostHistoryTypeId="25" PostId="12003" RevisionGUID="6b315d92-5db9-42a9-bf7b-a5750599c24a" CreationDate="2011-05-07T00:11:30.613" Comment="http://twitter.com/#!/StackGameDev/status/66656365308936192" />
  <row Id="26114" PostHistoryTypeId="2" PostId="12024" RevisionGUID="d5553cf0-0920-48e6-aa95-d889087a08cf" CreationDate="2011-05-07T00:56:59.017" UserId="4834" Text="If you have custom maps in your game, and want to be able to create many different maps or have map editors, having tiles and then objects like houses on top is probably the way to go. Most older strategy games follow this approach.&#xD;&#xA;There are RPGs like Baldur's Gate, on the other hand, which have a big image for each map. The downside of this is that you cannot be really generic in the way you create maps - they tend to end up with a fixed number of maps.&#xD;&#xA;&#xD;&#xA;On rendering the isometric tiles - it can get somewhat tricky, but [here][1] are some ideas. &#xD;&#xA;&#xD;&#xA;Map tilesets, or moveable areas can be represented by many different data structures. Array is one option, quad trees trade off memory-usage for performance as they allow you to compress your map representation somewhat. Both can have variable sizes.&#xD;&#xA;&#xD;&#xA;In any case, I recommend you first define more precisely what kind of a game you want to do, and list all the requirements and goals. Try to be able to create something rudimentary first, and optionally evolve it later.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8151/how-should-i-sort-images-in-an-isometric-game-so-that-they-appear-in-the-correct/8181#8181" />
  <row Id="26115" PostHistoryTypeId="5" PostId="12003" RevisionGUID="db728625-4ea6-4474-964c-b560470911b2" CreationDate="2011-05-07T01:24:01.737" UserId="5966" Comment="added 430 characters in body" Text="I'm making pool game like game. This game requires correct (or very accurate) reflective bounces.&#xD;&#xA;I tried *Box2D* and *Bullet Physics*, but they have this problem.&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FJQ0A.png&#xD;&#xA;&#xD;&#xA;If there is a wall on top of this image, red line is regular course of the regular pool game. But the engines often shows green line course. Especially,&#xD;&#xA;&#xD;&#xA;1. This happens after a ball moving slowly hits the wall.&#xD;&#xA;2. Sometimes a ball moving fast get slower suddenly.&#xD;&#xA;&#xD;&#xA;I'm finding a physics engine can simulate pool game as much as possible without these problems. Can you recommend some? I'm digging *Newton Game Dynamics* now, but I have no sure about this. I'm considering *PhysX* as next trial, and have to make my own if nothing be found. But it's obvious it'll take huge time, so I wish I will do not.&#xD;&#xA;I'll be very appreciated if you save my time. And of course, solution with Box2D / Bullet Physics are also welcomed!&#xD;&#xA;&#xD;&#xA;Acceptable languages/platform are C/C++/Objective+C on iOS.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I attach my configuration with Box2D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Walls&#xD;&#xA;- static box shape&#xD;&#xA;- linear/angular damping = 0.1&#xD;&#xA;- restitution = 1.0&#xD;&#xA;- friction = 0.8&#xD;&#xA;- density = 1.0&#xD;&#xA;- bullet = false&#xD;&#xA;- fixed rotation = false&#xD;&#xA;- inertial scale = 1.0&#xD;&#xA;&#xD;&#xA;# Balls&#xD;&#xA;- dynamic sphere shape&#xD;&#xA;- linear/angular damping = 0.1&#xD;&#xA;- restitution = 1.0&#xD;&#xA;- friction = 0.9&#xD;&#xA;- density = 2.0&#xD;&#xA;- bullet = true&#xD;&#xA;- fixed rotation = false&#xD;&#xA;- inertial scale = 1.0&#xD;&#xA;" />
  <row Id="26116" PostHistoryTypeId="5" PostId="12003" RevisionGUID="51ce0050-2580-4d8b-8ff4-1c65f8b9933b" CreationDate="2011-05-07T01:31:09.687" UserId="5966" Comment="deleted 2 characters in body" Text="I'm making pool game like game. This game requires correct (or very accurate) reflective bounces.&#xD;&#xA;I tried *Box2D* and *Bullet Physics*, but they have this problem.&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FJQ0A.png&#xD;&#xA;&#xD;&#xA;If there is a wall on top of this image, red line is regular course of the regular pool game. But the engines often shows green line course. Especially,&#xD;&#xA;&#xD;&#xA;1. This happens after a ball moving slowly hits the wall.&#xD;&#xA;2. Sometimes a ball moving fast get slower suddenly.&#xD;&#xA;&#xD;&#xA;I'm finding a physics engine can simulate pool game as much as possible without these problems. Can you recommend some? I'm digging *Newton Game Dynamics* now, but I have no sure about this. I'm considering *PhysX* as next trial, and have to make my own if nothing be found. But it's obvious it'll take huge time, so I wish I will do not.&#xD;&#xA;I'll be very appreciated if you save my time. And of course, solution with Box2D / Bullet Physics are also welcomed!&#xD;&#xA;&#xD;&#xA;Acceptable languages/platform are C/C++/Objective+C on iOS.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I attach my configuration with Box2D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Walls&#xD;&#xA;- static box shape&#xD;&#xA;- linear/angular damping = 0.1&#xD;&#xA;- restitution = 1.0&#xD;&#xA;- friction = 100&#xD;&#xA;- density = 10&#xD;&#xA;- bullet = false&#xD;&#xA;- fixed rotation = false&#xD;&#xA;- inertial scale = 1.0&#xD;&#xA;&#xD;&#xA;# Balls&#xD;&#xA;- dynamic sphere shape&#xD;&#xA;- linear/angular damping = 0.1&#xD;&#xA;- restitution = 1.0&#xD;&#xA;- friction = 100&#xD;&#xA;- density = 20&#xD;&#xA;- bullet = true&#xD;&#xA;- fixed rotation = false&#xD;&#xA;- inertial scale = 1.0&#xD;&#xA;" />
  <row Id="26117" PostHistoryTypeId="5" PostId="12003" RevisionGUID="f51e79a7-3628-4989-abef-0630bf36ed8a" CreationDate="2011-05-07T01:39:12.757" UserId="5966" Comment="deleted 2 characters in body" Text="I'm making pool game like game. This game requires correct (or very accurate) reflective bounces.&#xD;&#xA;I tried *Box2D* and *Bullet Physics*, but they have this problem.&#xD;&#xA;&#xD;&#xA;![Illustration][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FJQ0A.png&#xD;&#xA;&#xD;&#xA;If there is a wall on top of this image, red line is regular course of the regular pool game. But the engines often shows green line course. Especially,&#xD;&#xA;&#xD;&#xA;1. This happens after a ball moving slowly hits the wall.&#xD;&#xA;2. Sometimes a ball moving fast get slower suddenly.&#xD;&#xA;&#xD;&#xA;I'm finding a physics engine can simulate pool game as much as possible without these problems. Can you recommend some? I'm digging *Newton Game Dynamics* now, but I have no sure about this. I'm considering *PhysX* as next trial, and have to make my own if nothing be found. But it's obvious it'll take huge time, so I wish I will do not.&#xD;&#xA;I'll be very appreciated if you save my time. And of course, solution with Box2D / Bullet Physics are also welcomed!&#xD;&#xA;&#xD;&#xA;Acceptable languages/platform are C/C++/Objective+C on iOS.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I attach my configuration with Box2D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Walls&#xD;&#xA;- static box shape&#xD;&#xA;- linear/angular damping = 0.1&#xD;&#xA;- restitution = 1.0&#xD;&#xA;- friction = 100&#xD;&#xA;- density = 10&#xD;&#xA;- bullet = false&#xD;&#xA;- fixed rotation = false&#xD;&#xA;- inertial scale = 1.0&#xD;&#xA;&#xD;&#xA;# Balls&#xD;&#xA;- dynamic sphere shape&#xD;&#xA;- linear/angular damping = 0.1&#xD;&#xA;- restitution = 1.0&#xD;&#xA;- friction = 100&#xD;&#xA;- density = 20&#xD;&#xA;- bullet = true&#xD;&#xA;- fixed rotation = false&#xD;&#xA;- inertial scale = 1.0" />
  <row Id="26118" PostHistoryTypeId="25" PostId="12010" RevisionGUID="b136927c-e069-499b-9454-fca284a49034" CreationDate="2011-05-07T03:11:30.703" Comment="http://twitter.com/#!/StackGameDev/status/66701664781991937" />
  <row Id="26119" PostHistoryTypeId="2" PostId="12025" RevisionGUID="93915fe4-f619-44f2-82aa-19acb0a03114" CreationDate="2011-05-07T04:38:51.580" UserId="6279" Text="I have a matrix that defines the rotation and translation of an object, relative to (0, 0, 0). Assuming that the identity matrix defines the camera to be at (0, 0, 0) pointing at (0, 0, 1), how would I go about constructing the view matrix from the world + rotation matrix?" />
  <row Id="26120" PostHistoryTypeId="1" PostId="12025" RevisionGUID="93915fe4-f619-44f2-82aa-19acb0a03114" CreationDate="2011-05-07T04:38:51.580" UserId="6279" Text="Conversion from matrix defining rotation and position to camera matrix" />
  <row Id="26121" PostHistoryTypeId="3" PostId="12025" RevisionGUID="93915fe4-f619-44f2-82aa-19acb0a03114" CreationDate="2011-05-07T04:38:51.580" UserId="6279" Text="&lt;3d&gt;&lt;camera&gt;&lt;matrix&gt;" />
  <row Id="26122" PostHistoryTypeId="25" PostId="12025" RevisionGUID="e436327b-628b-4f9e-be5b-77bfbc5e0624" CreationDate="2011-05-07T06:11:30.617" Comment="http://twitter.com/#!/StackGameDev/status/66746963353280512" />
  <row Id="26123" PostHistoryTypeId="2" PostId="12026" RevisionGUID="d1ea1095-e438-40f0-8aad-e810f533010c" CreationDate="2011-05-07T08:08:44.983" UserId="5957" Text="Assuming I've understood the question correctly, you need to inverse the matrix. The inverse of the matrix is a matrix such that a multiplication between it and the matrix it is an inverse of will result in the identity matrix (i.e. 1,0,0,0 ,0,1,0,0, 0,0,1,0, 0,0,0,1). I'm not sure if you're using Opengl, D3d or whatever but your library should include functions to calculate the inverse. Bear in mind that calculating the inverse is not trivial and shouldn't be done say, once per vertex - you should calculate the inverse of the view matrix only as often as you change the view position.&#xD;&#xA;HTH." />
  <row Id="26124" PostHistoryTypeId="5" PostId="12012" RevisionGUID="7438eca8-cbda-4df5-bdee-ec3af4c85ea5" CreationDate="2011-05-07T08:15:42.297" UserId="1156" Comment="changed from are there to what" Text="I am trying to learn a bit of level design. The type of game I am most interested is 2D puzzle games similar to Cut The Rope for iPad. However, literature on general level-design for different genres would be very welcomed.&#xD;&#xA;&#xD;&#xA;A internet quick search brings.&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Art-Game-Design-book-lenses/dp/0123694965/ref=pd_sim_b_5&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Game-Level-Design-Development/dp/1584503696&#xD;&#xA;&#xD;&#xA;Anyone can recommend those or any other resources? books, recorded conferences, examples, tutorials, slides.." />
  <row Id="26125" PostHistoryTypeId="4" PostId="12012" RevisionGUID="7438eca8-cbda-4df5-bdee-ec3af4c85ea5" CreationDate="2011-05-07T08:15:42.297" UserId="1156" Comment="changed from are there to what" Text="What good books are there on level design?" />
  <row Id="26126" PostHistoryTypeId="25" PostId="12012" RevisionGUID="afb90ac7-580f-4409-8cf4-855dd4becf2f" CreationDate="2011-05-07T09:11:30.897" Comment="http://twitter.com/#!/StackGameDev/status/66792262004244480" />
  <row Id="26127" PostHistoryTypeId="2" PostId="12027" RevisionGUID="7af6a2d7-3af4-4960-9c40-5311844616d6" CreationDate="2011-05-07T10:23:10.370" UserId="7159" Text="I am working on building a Strategy Game (Animal Colonies fighting each other).&#xD;&#xA;&#xD;&#xA;It is going to be simple game targeting Kids, the beta version will only support single player playing against AI opponent.&#xD;&#xA;&#xD;&#xA;I am going to hire Algorithm programmers to build the AI algorithms of the opponent, BUT :&#xD;&#xA;&#xD;&#xA; 1. I am not sure what information I need to give for the programmers in order to build these algorithms.&#xD;&#xA; 2. I want to have different AI levels difficulties (easy, medium, hard), BUT if the AI opponent is too easy to defeat, the game is boring, while if it is too difficult to defeat, the game is too frustrating, and the player will quit, so I need this issue to be addressed when building AI for different levels.&#xD;&#xA; 3. I am not sure if the AI opponent should behave like a human player? I mean should the specification allow AI opponent to have access to all game resources ? or AI should behave like human player to use scouts to collect information about resources and enemy?&#xD;&#xA;&#xD;&#xA;I need to identify these points. I want to write detailed specification so algorithm programmers can do the work as expected. All what I have at the mean time is Colonies design (characters/elements), maps with objects (grass, rocks, hills, tree .. etc).&#xD;&#xA;&#xD;&#xA;So, what exactly do I need to give them in order to build opponent AI?&#xD;&#xA;&#xD;&#xA;Thx!&#xD;&#xA;" />
  <row Id="26128" PostHistoryTypeId="1" PostId="12027" RevisionGUID="7af6a2d7-3af4-4960-9c40-5311844616d6" CreationDate="2011-05-07T10:23:10.370" UserId="7159" Text="HTML5 - AI algorithms for Strategy Game" />
  <row Id="26129" PostHistoryTypeId="3" PostId="12027" RevisionGUID="7af6a2d7-3af4-4960-9c40-5311844616d6" CreationDate="2011-05-07T10:23:10.370" UserId="7159" Text="&lt;ai&gt;&lt;html5&gt;&lt;strategy&gt;" />
  <row Id="26130" PostHistoryTypeId="2" PostId="12028" RevisionGUID="855fc2b7-cf16-44a1-b84d-12a62bbb9007" CreationDate="2011-05-07T10:30:44.037" UserId="1156" Text="As a short answer, the best thing to do is to develop the AI and use the different difficulty settings as different levels of randomness/thinking ahead. Thus, easy will very often not take the best path whereas hard will more often.&#xD;&#xA;&#xD;&#xA;As for trying to get the difficulties right, you cannot judge human perception through code. Your only option really is to get testers to play it and comment." />
  <row Id="26131" PostHistoryTypeId="5" PostId="11903" RevisionGUID="c11375fc-2eb8-456b-bff1-08bbb52a1bb3" CreationDate="2011-05-07T10:46:39.920" UserId="5473" Comment="removed a comment from code" Text="Your player and your troll are nothing but sets of data, what we call the data Model which describes your world. Life, inventory, attack capabilities, their knowledge of the world even -- all consists in the data model.&#xD;&#xA;&#xD;&#xA;Keep a single, main Model object which holds all data describing your world. It will hold general world information such as difficulty, physics parameters etc. It will also hold a list/array of specific *entities*' data as I've described above. This main model can consist of many subobjects in order to describe your world. Nowhere in your model should you have any functions that control game logic or display logic; getters are the only exception, and would be used only to allow you to get data from the model more readily (if public members don't already do the trick).&#xD;&#xA;&#xD;&#xA;Next, create functions in one or more &quot;controller&quot; classes; you can write them all as helper functions in your main class, although this may get a bit large after a while. These will be called every update to act upon the entities' data for different purposes (movement, attack etc.). Keep these functions outside of an entity class is more resource-efficient, and once you know what *describes* your entity you will automatically know what functions need to act on it.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    class Main&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    //...members variables...&#xD;&#xA;    var model:GameModel = new GameModel();&#xD;&#xA;    &#xD;&#xA;    //...member functions...&#xD;&#xA;    function realTimeUpdate() //called x times per second, on a timer.&#xD;&#xA;    {&#xD;&#xA;        for each (var entity in model.entities)&#xD;&#xA;        {&#xD;&#xA;            //command processing&#xD;&#xA;            if (entity == player)&#xD;&#xA;                decideActionsFromPlayerInput(entity);&#xD;&#xA;            else //everyone else is your enemy!&#xD;&#xA;                decideActionsThroughDeviousAI(entity);&#xD;&#xA;    &#xD;&#xA;            act(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    //OR&#xD;&#xA;    function turnBasedUpdate()&#xD;&#xA;    {&#xD;&#xA;        if (model.whoseTurn == &quot;player&quot;)&#xD;&#xA;        {&#xD;&#xA;            decideActionsFromInput(model.player); //may be some movement or none at all&#xD;&#xA;            act(player);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            var enemy;&#xD;&#xA;            for each (var entity in model.entities)&#xD;&#xA;            {&#xD;&#xA;                if (entity != model.player)&#xD;&#xA;                {&#xD;&#xA;                    enemy = entity;&#xD;&#xA;                    decideActions(enemy);&#xD;&#xA;                    act(enemy);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //AND THEN... (common to both turn-based and real-time)&#xD;&#xA;    function decideActionsThroughDeviousAI(enemy)&#xD;&#xA;    {&#xD;&#xA;        if (distanceBetween(enemy, player) &lt;= enemy.maximumAttackDistance)&#xD;&#xA;            storeAttackCommand(enemy, &quot;kidney punch&quot;, model.player);&#xD;&#xA;        else&#xD;&#xA;            storeMoveCommand(player, getVectorFromTo(enemy, model.player));&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function decideActionsFromPlayerInput(player)&#xD;&#xA;    {&#xD;&#xA;        //store commands to your player data based on keyboard input&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;A&quot;))&#xD;&#xA;            storeMoveCommand(player, getForwardVector(player));&#xD;&#xA;        if (KeyManager.isKeyDown(&quot;space&quot;))&#xD;&#xA;            storeAttackCommand(player, &quot;groin slam&quot;, currentlyHighlightedEnemy);&#xD;&#xA;    }&#xD;&#xA;    function storeAttackCommand(entity, attackType, target)&#xD;&#xA;    {&#xD;&#xA;        entity.target = target;&#xD;&#xA;    &#xD;&#xA;        entity.currentAttack = attackType;&#xD;&#xA;        //OR&#xD;&#xA;        entity.attackQueue.add(attackType);&#xD;&#xA;    }&#xD;&#xA;    function storeMoveCommand(entity, motionVector)&#xD;&#xA;    {&#xD;&#xA;        entity.motionVector = motionVector;&#xD;&#xA;    }&#xD;&#xA;    function act(entity)&#xD;&#xA;    {&#xD;&#xA;        entity.position += entity.motionVector;&#xD;&#xA;        attack(entity.target, entity.currentAttack);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class GameModel&#xD;&#xA;    {&#xD;&#xA;        var entities:Array = []; //or List&lt;Entity&gt; or whatever!&#xD;&#xA;        var player:Entity; //will often also appear in the entity list, above&#xD;&#xA;        var difficultyLevel:int;&#xD;&#xA;        var globalMaxAttackDamage:int;&#xD;&#xA;        var whoseTurn:Boolean; //if turnbased&#xD;&#xA;        //etc.&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A final note is that it is also useful to keep your display logic separate from your game logic. Display logic would be, &quot;Where do I draw this on the screen and in what colour?&quot; vs. game logic being what I've outlined in the pseudcode above.&#xD;&#xA;&#xD;&#xA;(Dev's note: While using classes, this loosely follows a functional programming approach which considers all methods as ideally stateless, allowing for a clean data model and processing approach that minimises bugs caused by retained state. FP is the ultimate MVC, since it achieves MVC's goal of separation of concerns explicitly. See this [question][1].)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/327955/does-functional-programming-replace-gof-design-patterns" />
  <row Id="26132" PostHistoryTypeId="17" PostId="12030" RevisionGUID="f6d3862c-1fff-4584-89b3-e0f7cb27f859" CreationDate="2011-05-07T11:26:35.280" UserId="-1" Comment="from http://stackoverflow.com/questions/5866600/how-do-you-implement-logic-for-role-playing-game-combat/5873821#5873821" Text="" />
  <row Id="26133" PostHistoryTypeId="2" PostId="12030" RevisionGUID="7ee6942a-ec48-47d5-bfd6-f5e8a2c557d9" CreationDate="2011-05-03T18:13:03.253" UserDisplayName="Daggio" Text="Yes, you need to have a special part in your engine that handles combat.&#xD;&#xA;&#xD;&#xA;I don't know how exactly you're doing your combat but I'll assume players roams aroud the game world, meet with monsters and the battle goes real time. If so then, the troll needs to know the surrounding within a certain area, maybe define how far the troll can see something in front of it (troll handles this).&#xD;&#xA;&#xD;&#xA;About the AI, I think the engine needs to handle it itself, so that let's say you have more than one kind of enemy that can do the same thing (bite), you can just assign the AI to another monster and there you go!" />
  <row Id="26138" PostHistoryTypeId="25" PostId="12027" RevisionGUID="730ab547-50c9-485e-9bd0-696338a19804" CreationDate="2011-05-07T12:11:31.013" Comment="http://twitter.com/#!/StackGameDev/status/66837561607327744" />
  <row Id="26139" PostHistoryTypeId="2" PostId="12031" RevisionGUID="57402225-b3bb-4d0a-b182-6bd642f55394" CreationDate="2011-05-07T12:57:05.827" UserId="3794" Text="Maybe this one will help:&#xD;&#xA;[A Practical Analytic Single Scattering Model for Real Time Rendering][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://graphics.berkeley.edu/papers/Sun-APA-2005-08/index.html" />
  <row Id="26140" PostHistoryTypeId="2" PostId="12032" RevisionGUID="33f26b95-dc99-4b76-b93a-229d132f3b17" CreationDate="2011-05-07T14:04:54.117" UserId="6540" Text="What is a good technique to enable an object to move between to points in a nice curved motion?&#xD;&#xA;&#xD;&#xA;The end position could also be in motion, giving the effect of a homing missile." />
  <row Id="26141" PostHistoryTypeId="1" PostId="12032" RevisionGUID="33f26b95-dc99-4b76-b93a-229d132f3b17" CreationDate="2011-05-07T14:04:54.117" UserId="6540" Text="Curved movement between two points" />
  <row Id="26142" PostHistoryTypeId="3" PostId="12032" RevisionGUID="33f26b95-dc99-4b76-b93a-229d132f3b17" CreationDate="2011-05-07T14:04:54.117" UserId="6540" Text="&lt;xna&gt;&lt;2d&gt;" />
  <row Id="26145" PostHistoryTypeId="2" PostId="12033" RevisionGUID="430f567f-0e8d-42e4-ad71-fd36586098c0" CreationDate="2011-05-07T14:22:15.380" UserId="1156" Text="You may want to look up sine waves or possibly [Bezier Curves][1]. I don't know whether the sine wave approach is normal, but I can't see why it would be that poor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/B%C3%A9zier_curve" />
  <row Id="26149" PostHistoryTypeId="18" PostId="12030" RevisionGUID="f3468477-2580-4ec0-b4c3-9e1a5c44e909" CreationDate="2011-05-07T14:40:00.763" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/12029/how-do-you-implement-logic-for-role-playing-game-combat" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="26150" PostHistoryTypeId="18" PostId="11886" RevisionGUID="f3468477-2580-4ec0-b4c3-9e1a5c44e909" CreationDate="2011-05-07T14:40:00.763" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/12029/how-do-you-implement-logic-for-role-playing-game-combat" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="26152" PostHistoryTypeId="2" PostId="12034" RevisionGUID="0a495857-9468-4445-a959-3c45fdf3b0a1" CreationDate="2011-05-07T14:53:51.453" UserId="288" Text="There are two possible techniques:&#xD;&#xA;&#xD;&#xA;**The first technique is to do a *frame-based* simulation. This is good if you are doing something like a homing missile in gameplay, that does not have to hit your target exactly.**&#xD;&#xA;&#xD;&#xA;In this case you want to track the object's position and velocity. Each frame look at the direction to the target and the current movement direction, and adjust the velocity appropriately.&#xD;&#xA;&#xD;&#xA;If you snap the velocity instantly, your missile will always hit the target. But if you adjust the velocity by a small amount each frame, your missile will curve towards the target - and if it curves slowly enough, the target could dodge it.&#xD;&#xA;&#xD;&#xA;**The second technique is to use a *parametric* method. This is useful for animating things where you want to hit your target precisely and predictably.** In this case you usually take &quot;time&quot; as your parameter and put it into a function of some kind.&#xD;&#xA;&#xD;&#xA;A particularly useful set of functions are the &lt;a href=&quot;http://en.wikipedia.org/wiki/Equations_of_motion&quot;&gt;Equations of Motion&lt;/a&gt; you learned in highschool physics. By applying these to both axis you can get ballistic trajectories. With a little bit of maths, you can determine the initial parameters to hit a target - even a moving one, if it moves predictably.&#xD;&#xA;&#xD;&#xA;XNA also provides a number of interpolation and curved motion functions. Take a look at the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector2_members.aspx&quot;&gt;documentation for `Vector2`&lt;/a&gt; &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.mathhelper_members.aspx&quot;&gt; and for `MathHelper`&lt;/a&gt;. These provide some interpolation functions which you can use and even combine to do interesting things. For example, firing a missile: `Lerp` (linear interpolate) your missile's position from its start point to a target position, and also lerp that target position from some initial target to the target object's real (changing) position. This will give you a nice &quot;locking on&quot; effect.&#xD;&#xA;&#xD;&#xA;(There are also some functions for producing curves, for example: `CatmulRom`, `Hermite`. These are probably harder to use successfully with a moving target, though.)&#xD;&#xA;&#xD;&#xA;If you look into &quot;easing&quot; (in the context of animation), you can get some more interesting interpolation functions that can give you interesting effects like acceleration.&#xD;&#xA;&#xD;&#xA;Now - you may say that this technique gives some odd results as your target moves around. However in practice, as long as your projectile is moving faster than your target, it usually looks fine. If it is a problem, you should probably be using a frame-based technique anyway." />
  <row Id="26155" PostHistoryTypeId="25" PostId="12032" RevisionGUID="b641dbfb-fd27-4783-a09c-ef9f487162ef" CreationDate="2011-05-07T15:11:31.383" Comment="http://twitter.com/#!/StackGameDev/status/66882861885689856" />
  <row Id="26160" PostHistoryTypeId="2" PostId="12037" RevisionGUID="8d4b6d28-e353-4faf-969b-19a03ccc4e31" CreationDate="2011-05-07T16:13:24.660" UserId="6203" Text="For my new assignment I have to make this bike in 3D in maya. But I actually don't know how to curve cylinders for the frame and saddle of this bike.&#xD;&#xA;&#xD;&#xA;To be more specific I added a image of the bike for you guys:&#xD;&#xA;http://images.trike.com.au/trike_site/pd-CAD.jpg&#xD;&#xA;&#xD;&#xA;Thanks a lot!&#xD;&#xA;-" />
  <row Id="26161" PostHistoryTypeId="1" PostId="12037" RevisionGUID="8d4b6d28-e353-4faf-969b-19a03ccc4e31" CreationDate="2011-05-07T16:13:24.660" UserId="6203" Text="How do I add curve to cylinders in Maya?" />
  <row Id="26162" PostHistoryTypeId="3" PostId="12037" RevisionGUID="8d4b6d28-e353-4faf-969b-19a03ccc4e31" CreationDate="2011-05-07T16:13:24.660" UserId="6203" Text="&lt;maya&gt;" />
  <row Id="26163" PostHistoryTypeId="10" PostId="12037" RevisionGUID="bbcaf538-b4f7-4dc5-ae85-0ea48794acd8" CreationDate="2011-05-07T16:49:06.610" UserId="189" CloseReasonId="2" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="26164" PostHistoryTypeId="2" PostId="12038" RevisionGUID="d100b669-0ee9-436e-abaf-c9faea493f0a" CreationDate="2011-05-07T17:50:11.293" UserId="2061" Text="Assuming you want this to be a frame-by-frame thing (where the target could even be moving), and not a precomputed trajectory, this is actually incredibly simple:&#xD;&#xA;&#xD;&#xA;Every frame, compare the velocity-vector of the missile to the vector **(position&lt;sub&gt;missile&lt;/sub&gt; - position&lt;sub&gt;target&lt;/sub&gt;)**; that is, the vector pointing from the missile to the target.  Every frame, if the two vectors do not have the same direction, then rotate the veloity-vector a little bit towards the other vector, so every frame the missle gets a little bit closer to looking at its target.&#xD;&#xA;&#xD;&#xA;You can determine whether to rotate clockwise or counter-clockwise by looking at the sign of the cross-product between the two vectors." />
  <row Id="26165" PostHistoryTypeId="25" PostId="12000" RevisionGUID="8d34a8af-a081-4075-b621-a7296a3358ee" CreationDate="2011-05-07T18:11:31.437" Comment="http://twitter.com/#!/StackGameDev/status/66928159844614144" />
  <row Id="26169" PostHistoryTypeId="5" PostId="12038" RevisionGUID="a3d78493-fa27-4cd2-9ccd-50507daf9e1c" CreationDate="2011-05-07T18:46:09.723" UserId="2061" Comment="added 958 characters in body; added 1 characters in body; edited body; deleted 1 characters in body; deleted 11 characters in body; added 3 characters in body" Text="Assuming you want this to be a frame-by-frame thing (where the target could even be moving), and not a precomputed trajectory, this is actually incredibly simple:&#xD;&#xA;&#xD;&#xA;Every frame, compare the velocity-vector of the missile to the vector **(position&lt;sub&gt;target&lt;/sub&gt; - position&lt;sub&gt;missile&lt;/sub&gt;)**; that is, the vector pointing from the missile to the target.  Every frame, if the two vectors do not have the same direction, then rotate the veloity-vector a little bit towards the other vector, so every frame the missle gets a little bit closer to looking at its target.&#xD;&#xA;&#xD;&#xA;You can determine whether to rotate clockwise or counter-clockwise by looking at the sign of the cross-product between the two vectors.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**[Edit]**  XNA-ish code (I don't have XNA to test this):&#xD;&#xA;&#xD;&#xA;    //Once a frame:&#xD;&#xA;&#xD;&#xA;	//Get vector spanning from missile to target&#xD;&#xA;	Vector2 vectorToTarget = target.Position - missile.Position;&#xD;&#xA;	&#xD;&#xA;	//Convert to Vector3 to do cross-product&#xD;&#xA;	Vector3 vectorToTarget3 = new Vector3(vectorToTarget, 0);&#xD;&#xA;	Vector3 missileVelocity3 = new Vector3(missile.Velocity, 0);&#xD;&#xA;	&#xD;&#xA;	//Rotate clockwise/counter-clockwise is determined by sign of cross-product&#xD;&#xA;	int crossProductSign = Vector3.Cross(missileVelocity3, vectorToTarget3).Z;&#xD;&#xA;	&#xD;&#xA;	//Positive cross-product means rotate counter-clockwise, negative is clockwise&#xD;&#xA;	double rotationAngle = 0;&#xD;&#xA;	if(crossProductSign &gt; 0)&#xD;&#xA;	    rotationAngle = -0.05;&#xD;&#xA;	else if(crossProductSign &lt; 0)&#xD;&#xA;		rotationAngle = 0.05;&#xD;&#xA;	&#xD;&#xA;	//I'm not sure how to do rotation in XNA, but the internets tell me it's something like this:&#xD;&#xA;	missile.velocity = Vector2.Transform(missile.velocity, Matrix.CreateRotationZ(rotationAngle))" />
  <row Id="26170" PostHistoryTypeId="5" PostId="12037" RevisionGUID="5df5d060-5d28-403a-ab85-d2d0bd54ed44" CreationDate="2011-05-07T19:41:35.547" UserId="744" Comment="Make image inline, improve tags, remove footer." Text="For my new assignment I have to make this bike in 3D in Maya. But I actually don't know how to curve cylinders for the frame and saddle of this bike.&#xD;&#xA;&#xD;&#xA;To be more specific I added a image of the bike for you guys:&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://images.trike.com.au/trike_site/pd-CAD.jpg&quot;&gt;&#xD;&#xA;" />
  <row Id="26171" PostHistoryTypeId="4" PostId="12037" RevisionGUID="5df5d060-5d28-403a-ab85-d2d0bd54ed44" CreationDate="2011-05-07T19:41:35.547" UserId="744" Comment="Make image inline, improve tags, remove footer." Text="How do I add curves to cylinders in Maya?" />
  <row Id="26172" PostHistoryTypeId="6" PostId="12037" RevisionGUID="5df5d060-5d28-403a-ab85-d2d0bd54ed44" CreationDate="2011-05-07T19:41:35.547" UserId="744" Comment="Make image inline, improve tags, remove footer." Text="&lt;models&gt;&lt;art&gt;&lt;maya&gt;" />
  <row Id="26173" PostHistoryTypeId="2" PostId="12040" RevisionGUID="db1661fd-7642-4c15-9a78-9ac872307f40" CreationDate="2011-05-07T20:43:59.800" UserId="2228" Text="I'm developing a 3D videogame in C# with XNA, my problem comes when I load my model done in 3ds max, and I try to rotate a mesh of it, because the pivot point isn't exported so it takes another point; the point you get when pressing &quot;Reset Pivot&quot; in 3ds max.&#xD;&#xA;What I want to do is to change its point default value, so that my animation gets the correct pivot point, how can I achieve this?&#xD;&#xA;Thank in advance! :)" />
  <row Id="26174" PostHistoryTypeId="1" PostId="12040" RevisionGUID="db1661fd-7642-4c15-9a78-9ac872307f40" CreationDate="2011-05-07T20:43:59.800" UserId="2228" Text="Change 3ds max mesh origin pivot point" />
  <row Id="26175" PostHistoryTypeId="3" PostId="12040" RevisionGUID="db1661fd-7642-4c15-9a78-9ac872307f40" CreationDate="2011-05-07T20:43:59.800" UserId="2228" Text="&lt;3d&gt;&lt;3dsmax&gt;" />
  <row Id="26176" PostHistoryTypeId="25" PostId="12040" RevisionGUID="7e160997-c387-4fe8-8245-7539de960e8f" CreationDate="2011-05-07T21:11:32.023" Comment="http://twitter.com/#!/StackGameDev/status/66973460957634560" />
  <row Id="26177" PostHistoryTypeId="5" PostId="12040" RevisionGUID="9b6637d1-94d6-4858-bfad-12a1e2c117b2" CreationDate="2011-05-07T21:17:00.473" UserId="2228" Comment="Corrected some concepts" Text="I'm developing a 3D videogame in C# with XNA, my problem comes when I load my model done in 3ds max, and I try to rotate a mesh of it, because the pivot point isn't exported so it takes the local origin of the mesh, the point you get when pressing &quot;Reset Pivot&quot; in 3ds max.&#xD;&#xA;&#xD;&#xA;What I want to do is to change its point default value, so that my animation gets the correct pivot point, how can I achieve this?&#xD;&#xA;&#xD;&#xA;Thank in advance! :)" />
  <row Id="26178" PostHistoryTypeId="4" PostId="12040" RevisionGUID="9b6637d1-94d6-4858-bfad-12a1e2c117b2" CreationDate="2011-05-07T21:17:00.473" UserId="2228" Comment="Corrected some concepts" Text="Change 3ds max mesh local origin pivot point" />
  <row Id="26180" PostHistoryTypeId="5" PostId="12040" RevisionGUID="a8f7a344-0612-4777-a032-dfbf47ddc360" CreationDate="2011-05-08T01:32:18.353" UserId="51" Comment="deleted 24 characters in body" Text="I'm developing a 3D videogame in C# with XNA, my problem comes when I load my model done in 3ds max, and I try to rotate a mesh of it, because the pivot point isn't exported so it takes the local origin of the mesh, the point you get when pressing &quot;Reset Pivot&quot; in 3ds max.&#xD;&#xA;&#xD;&#xA;What I want to do is to change its point default value, so that my animation gets the correct pivot point, how can I achieve this?" />
  <row Id="26191" PostHistoryTypeId="5" PostId="12027" RevisionGUID="c96d5771-a65a-4ce7-8040-c722f69f247d" CreationDate="2011-05-08T01:44:19.320" UserId="51" Comment="deleted 10 characters in body; edited title" Text="I am working on building a Strategy Game (Animal Colonies fighting each other).&#xD;&#xA;&#xD;&#xA;It is going to be simple game targeting Kids, the beta version will only support single player playing against AI opponent.&#xD;&#xA;&#xD;&#xA;I am going to hire Algorithm programmers to build the AI algorithms of the opponent, BUT :&#xD;&#xA;&#xD;&#xA; 1. I am not sure what information I need to give for the programmers in order to build these algorithms.&#xD;&#xA; 2. I want to have different AI levels difficulties (easy, medium, hard), BUT if the AI opponent is too easy to defeat, the game is boring, while if it is too difficult to defeat, the game is too frustrating, and the player will quit, so I need this issue to be addressed when building AI for different levels.&#xD;&#xA; 3. I am not sure if the AI opponent should behave like a human player? I mean should the specification allow AI opponent to have access to all game resources ? or AI should behave like human player to use scouts to collect information about resources and enemy?&#xD;&#xA;&#xD;&#xA;I need to identify these points. I want to write detailed specification so algorithm programmers can do the work as expected. All what I have at the mean time is Colonies design (characters/elements), maps with objects (grass, rocks, hills, tree .. etc).&#xD;&#xA;&#xD;&#xA;So, what exactly do I need to give them in order to build opponent AI?" />
  <row Id="26192" PostHistoryTypeId="4" PostId="12027" RevisionGUID="c96d5771-a65a-4ce7-8040-c722f69f247d" CreationDate="2011-05-08T01:44:19.320" UserId="51" Comment="deleted 10 characters in body; edited title" Text="AI algorithms for Strategy Game" />
  <row Id="26193" PostHistoryTypeId="25" PostId="11935" RevisionGUID="41cca699-bce1-408c-8ae0-4d2c8c6d7a12" CreationDate="2011-05-08T03:11:31.973" Comment="http://twitter.com/#!/StackGameDev/status/67064056430862336" />
  <row Id="26194" PostHistoryTypeId="2" PostId="12041" RevisionGUID="40f90887-ef6a-4ee6-8dda-26a1ab9fc89f" CreationDate="2011-05-08T03:58:41.200" UserId="7168" Text="I am attempting to make a game using OpenGL and C++ but i haven't been able to find any good tutorials..or anything that could assist me in setting up my main game loop with some kind of timer/tick system...i would prefer to use as little external libraries as possible...i am using Win32 &#xD;&#xA;any help would be appreciated " />
  <row Id="26195" PostHistoryTypeId="1" PostId="12041" RevisionGUID="40f90887-ef6a-4ee6-8dda-26a1ab9fc89f" CreationDate="2011-05-08T03:58:41.200" UserId="7168" Text="C++ OpenGL Game Timer" />
  <row Id="26196" PostHistoryTypeId="3" PostId="12041" RevisionGUID="40f90887-ef6a-4ee6-8dda-26a1ab9fc89f" CreationDate="2011-05-08T03:58:41.200" UserId="7168" Text="&lt;opengl&gt;&lt;c++&gt;&lt;gameloop&gt;&lt;timer&gt;" />
  <row Id="26197" PostHistoryTypeId="2" PostId="12042" RevisionGUID="5d457b49-1e31-4906-8719-8bc03f41b065" CreationDate="2011-05-08T04:37:56.597" UserId="6467" Text="This is called timer based movement.  The premise is that game should run at the same speed regardless of your hardware or current frame rate.  Your program needs to ask the system its current time so objects appear to move at the same speed on any computer.  Started unzipping a huge file?  Your character will still walk the same speed, only he'll be doing it in less frames with bigger distances each frame.&#xD;&#xA;&#xD;&#xA;Be careful of pausing!  You'll have to distinguish between system time and game time.  I do this by subtracting out the accumulated pause time, otherwise things will appear to &quot;jump&quot; ahead.  For example, if you had a sun/moon cycle based on the system time, where an in game day was equal to 15 real minutes, pause the game while it's day.  Come back in 15 minutes, unpause it a WOW! it's magically nighttime.&#xD;&#xA;&#xD;&#xA;In my game engine, I have all speeds expressed in terms of meters per second.  At the beginning of every frame, I call a tick() function which calculates the time difference in seconds between the this call to tick() and the last call to tick().  This is stored in a variable called df which I multiply add speeds by before adding them to object positions.  Do this and Bam!  Your game has timer based movement&#xD;&#xA;&#xD;&#xA;Windows has functions called QueryPerformanceCounter and QueryPerformanceFrequency that you can use." />
  <row Id="26198" PostHistoryTypeId="5" PostId="12042" RevisionGUID="41ed0aa0-7795-4550-b82d-4bba360a5185" CreationDate="2011-05-08T04:43:42.510" UserId="6467" Comment="added 443 characters in body; added 50 characters in body" Text="This is called timer based movement.  The premise is that game should run at the same speed regardless of your hardware or the current frame rate.  Your program needs to ask the system its current time so that the objects will appear to move at the same speed on all computers.  Started unzipping a huge file?  Your character will still walk the same speed, only instead of taking 500 frames to do it he'll do it in 50, moving 10 times the distance each frame.&#xD;&#xA;&#xD;&#xA;Be careful of pausing!  You'll have to distinguish between system time and game time.  I do this by subtracting out the accumulated pause time, otherwise things will appear to &quot;jump&quot; ahead.  For example, if you had a sun/moon cycle based on the system time, where an in game day was equal to 15 real minutes, pause the game while it's day.  Come back in 15 minutes, unpause it a WOW! it's magically nighttime.&#xD;&#xA;&#xD;&#xA;In my games, I have all speeds expressed in terms of meters per second, or, if it is a 2D game, pixels per second.  This is much easier to work with than using &quot;units per frame.&quot; At the beginning of my game loop, I call the tick() function which calculates the time difference in seconds between this call to tick() and the last call to tick().  This difference is stored in a variable called df which I multiply all speeds by before adding them to object positions.  If you do this then BAM! your game has timer based movement.&#xD;&#xA;&#xD;&#xA;Windows has functions called QueryPerformanceCounter and QueryPerformanceFrequency that you can use to pull this off.  Last time I checked, there *may* be some problems with df being negative if you get shuffled to another processor.  Frank Luna recommends clamping df to the nonnegatives in this situation.  Don't worry about external libraries, in my game engine the timer functionality is all contained in one small class." />
  <row Id="26199" PostHistoryTypeId="5" PostId="12041" RevisionGUID="95269060-0936-47fa-91d2-e103317f6ca9" CreationDate="2011-05-08T04:57:57.600" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Tips for writing the main game loop?](http://gamedev.stackexchange.com/questions/651/tips-for-writing-the-main-game-loop)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am attempting to make a game using OpenGL and C++ but i haven't been able to find any good tutorials..or anything that could assist me in setting up my main game loop with some kind of timer/tick system...i would prefer to use as little external libraries as possible...i am using Win32 &#xD;&#xA;any help would be appreciated " />
  <row Id="26200" PostHistoryTypeId="10" PostId="12041" RevisionGUID="7897c932-97d1-4c03-ad8a-f9615673c710" CreationDate="2011-05-08T04:57:57.227" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="26201" PostHistoryTypeId="25" PostId="12020" RevisionGUID="362b11f9-0c76-4065-a3dd-069091ec3d7b" CreationDate="2011-05-08T06:11:32.060" Comment="http://twitter.com/#!/StackGameDev/status/67109355148943360" />
  <row Id="26202" PostHistoryTypeId="2" PostId="12043" RevisionGUID="010a029d-541c-474b-8cab-b3e4fc45768c" CreationDate="2011-05-08T06:32:33.487" UserId="3000" Text="Lets look at Starcraft 1 AI, which is well known and understood as a source of inspiration.&#xD;&#xA;&#xD;&#xA;For point 1 I can't help you much since I don't know enough about your game. Basically you should start your game with no computer opponents and get your developers to play the game. You can then make points about what strategies that they employ - and that you want those built into the AI. &#xD;&#xA;&#xD;&#xA;Point 2 is the most interesting. In Starcraft, the AI has sets of build orders to execute based on what the player is doing, but also based on the difficulty. At easier levels, the AI scales back on what it builds, and doesn't retreat from losing battles. The higher the difficulty, the more aggressive the build order and the more it tries to preserve its own units from losing battles. At the &quot;insane&quot; difficulty level, the AI actively cheats, gaining more resources than it should. &#xD;&#xA;&#xD;&#xA;Point 3 is just an opinion. The AI should behave like humans. It should know what units it has revealed through scouting and build units to counter. &#xD;&#xA;&#xD;&#xA;So moral of the story, the easier the difficulty, the less the AI should &quot;try&quot;, and the less it should read player inputs. It should mine resources and use them fairly. The AI should be bound to the rules of the human players, but the difficulty is making them &quot;act&quot; like one." />
  <row Id="26203" PostHistoryTypeId="2" PostId="12044" RevisionGUID="1a89730c-f21e-4ccf-9259-050c186651ee" CreationDate="2011-05-08T06:32:34.210" UserId="2509" Text="Does AndEngine have a way to manage scenes (ex: main splash,menu,options,main game)?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26204" PostHistoryTypeId="1" PostId="12044" RevisionGUID="1a89730c-f21e-4ccf-9259-050c186651ee" CreationDate="2011-05-08T06:32:34.210" UserId="2509" Text="Using AndEngine for game. Is an activity per screen still the best approach?" />
  <row Id="26205" PostHistoryTypeId="3" PostId="12044" RevisionGUID="1a89730c-f21e-4ccf-9259-050c186651ee" CreationDate="2011-05-08T06:32:34.210" UserId="2509" Text="&lt;android&gt;" />
  <row Id="26206" PostHistoryTypeId="25" PostId="12044" RevisionGUID="31c77f0a-073a-42e3-a8fd-ec9eb84f83e4" CreationDate="2011-05-08T09:11:32.330" Comment="http://twitter.com/#!/StackGameDev/status/67154655385362432" />
  <row Id="26207" PostHistoryTypeId="2" PostId="12045" RevisionGUID="8d504051-9a66-4852-b232-73b56addb887" CreationDate="2011-05-08T09:15:59.820" UserId="2933" Text="I'm having this weird problem where the position ocmponent of a rectangle of the XNA type is offsetting the position the sprite is rendered to as well.&#xD;&#xA;&#xD;&#xA;I guess a broader question I'm trying to have answered is: how can I make 4 integer values: top, left, bottom, right (in texture space) the equivalent of an XNA rectangle?" />
  <row Id="26208" PostHistoryTypeId="1" PostId="12045" RevisionGUID="8d504051-9a66-4852-b232-73b56addb887" CreationDate="2011-05-08T09:15:59.820" UserId="2933" Text="Position of XNA.Rectangle is changing the position a spritre is rendered to?" />
  <row Id="26209" PostHistoryTypeId="3" PostId="12045" RevisionGUID="8d504051-9a66-4852-b232-73b56addb887" CreationDate="2011-05-08T09:15:59.820" UserId="2933" Text="&lt;xna&gt;&lt;sprites&gt;" />
  <row Id="26210" PostHistoryTypeId="8" PostId="12040" RevisionGUID="d15c5fe6-5509-4889-8a5b-b729cede3bd3" CreationDate="2011-05-08T10:24:52.223" UserId="2228" Comment="Rollback to [9b6637d1-94d6-4858-bfad-12a1e2c117b2]" Text="I'm developing a 3D videogame in C# with XNA, my problem comes when I load my model done in 3ds max, and I try to rotate a mesh of it, because the pivot point isn't exported so it takes the local origin of the mesh, the point you get when pressing &quot;Reset Pivot&quot; in 3ds max.&#xD;&#xA;&#xD;&#xA;What I want to do is to change its point default value, so that my animation gets the correct pivot point, how can I achieve this?&#xD;&#xA;&#xD;&#xA;Thank in advance! :)" />
  <row Id="26211" PostHistoryTypeId="5" PostId="12040" RevisionGUID="9ed1c96f-f26d-4ed3-984f-0150b633d2bf" CreationDate="2011-05-08T10:26:14.393" UserId="2228" Comment="added 1 characters in body" Text="I'm developing a 3D videogame in C# with XNA, my problem comes when I load my model done in 3ds max, and I try to rotate a mesh of it, because the pivot point isn't exported so it takes the local origin of the mesh, the point you get when pressing &quot;Reset Pivot&quot; in 3ds max.&#xD;&#xA;&#xD;&#xA;What I want to do is to change its point default value, so that my animation gets the correct pivot point, how can I achieve this?&#xD;&#xA;&#xD;&#xA;Thanks in advance! :)" />
  <row Id="26212" PostHistoryTypeId="2" PostId="12046" RevisionGUID="c4d34596-7ead-484d-9204-56ed57769057" CreationDate="2011-05-08T11:04:23.683" UserId="5224" Text="There are two rectangles when drawing a texture with spritebatch (also depends on which overload you are using), the source rectangle specifies where in the texture the image is take from (you can specify this as null to use the entire texture), the destination rectangle specifies where this image will be drawn on screen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The source rectangle is mainly used to load sprite animations that are stored in one texture.&#xD;&#xA;&#xD;&#xA;For example this is a sprite sheet in which 3 animations are encoded.&#xD;&#xA;&#xD;&#xA;![sprite sheet][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Uupjd.png" />
  <row Id="26213" PostHistoryTypeId="2" PostId="12047" RevisionGUID="410c4925-e2a0-4858-922b-71659dd39b6f" CreationDate="2011-05-08T11:30:39.957" UserId="7169" Text="I want to create a sidescroller game for Android but it seems stupid to reinvent the wheel and since there are a lot of android sidescroller games already out I though that there must be some sort of template or something so I can get started quicker, so I can keep developing from there." />
  <row Id="26214" PostHistoryTypeId="1" PostId="12047" RevisionGUID="410c4925-e2a0-4858-922b-71659dd39b6f" CreationDate="2011-05-08T11:30:39.957" UserId="7169" Text="Android sidecroller template" />
  <row Id="26215" PostHistoryTypeId="3" PostId="12047" RevisionGUID="410c4925-e2a0-4858-922b-71659dd39b6f" CreationDate="2011-05-08T11:30:39.957" UserId="7169" Text="&lt;2d&gt;&lt;java&gt;&lt;android&gt;&lt;side-scroller&gt;" />
  <row Id="26216" PostHistoryTypeId="25" PostId="12047" RevisionGUID="a61d5bf5-c36e-4a81-9e5c-a0fce6c8dc9f" CreationDate="2011-05-08T12:11:31.610" Comment="http://twitter.com/#!/StackGameDev/status/67199951029022721" />
  <row Id="26217" PostHistoryTypeId="2" PostId="12048" RevisionGUID="f0e2dcc8-bcb2-48dc-89f1-a585e93038cb" CreationDate="2011-05-08T13:17:09.137" UserId="7048" Text="I'm creating Snake's clone. My app have too classes: [Snake.java][1] and [Board.java][2].&#xD;&#xA;&#xD;&#xA;Right now I have three problems:&#xD;&#xA;&#xD;&#xA;1) There are two constants - BOARDS_WIDTH, BOARDS_HEIGHT. They are meant to be dimensions for playground where snake moves and collects apples. It's dynamic and I can set them as I want. For example 640 x 480, 160 x 160 or whatever. Only thing I need to keep in my mind is that both numbers must divide with 16. Why? Because constant UNIT is set to 16 x 16 and, for example, when board's dimensions are set to 160 x 160, it means that there would be 10 x 10 units large playground (160 / 16 = 10). Problem: playground is always two pixels (not units) larger than it meant to be. Like if I have set dimensions to 160 x 160, actual dimensions will be 162 x 162! Here are screenshot...&#xD;&#xA;&#xD;&#xA;![Units problem.][3]&#xD;&#xA;&#xD;&#xA;If you measure this image... after pill (apple, if you like) there are two extra pixels.&#xD;&#xA;&#xD;&#xA;2) Collisions. I think - it's because problem #1. You see, there are code lines...&#xD;&#xA;&#xD;&#xA;    if( x[0] &lt; 0 || x[0] &gt; BOARDS_WIDTH || y[0] &lt; 0 || y[0] &gt; BOARDS_HEIGHT ) {&#xD;&#xA;&#xD;&#xA;    	inGame = false;&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;They should prevent snake from going into walls. Actual result is that snake goes few units in the wall - then only the game stops... i want it to stop exactly when snake collide with the wall!&#xD;&#xA;&#xD;&#xA;3) How to make snake start to move only when users clicks any of arrows? Right now it's like snake starts to move her body, but her head is stopped. After joints * DELAY snake's all joints are under her head! Ha, ha...&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pastie.org/1877821&#xD;&#xA;  [2]: http://pastie.org/1877822&#xD;&#xA;  [3]: http://i.stack.imgur.com/okvVc.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/qC2nW.jpg" />
  <row Id="26218" PostHistoryTypeId="1" PostId="12048" RevisionGUID="f0e2dcc8-bcb2-48dc-89f1-a585e93038cb" CreationDate="2011-05-08T13:17:09.137" UserId="7048" Text="Problems with Creating Snake's Clone on Java" />
  <row Id="26219" PostHistoryTypeId="3" PostId="12048" RevisionGUID="f0e2dcc8-bcb2-48dc-89f1-a585e93038cb" CreationDate="2011-05-08T13:17:09.137" UserId="7048" Text="&lt;java&gt;&lt;collision-detection&gt;&lt;events&gt;" />
  <row Id="26220" PostHistoryTypeId="2" PostId="12049" RevisionGUID="04b4bf4e-36df-43c8-a28f-b021c7794d79" CreationDate="2011-05-08T13:21:24.320" UserId="7160" Text="I recently returned to face a problem I had with a game client of mine, i.e. the client's thread responsible for input &amp; painting becomes unable to run after some while. &#xD;&#xA;&#xD;&#xA;I suspect that it has something to do with server sent massages. Possibly client is unable to handle old ones before new ones are arriving. But when I am printing inQueue size after dequeue it always reaches 0.&#xD;&#xA;&#xD;&#xA;**What else could possibly be the reason of this block?**&#xD;&#xA;&#xD;&#xA;I was debugging using NetBeans and it says there is no deadlocks?&#xD;&#xA;&#xD;&#xA;Are there other tools which I should/might use to find the reason.&#xD;&#xA;&#xD;&#xA;I have tried lots of things and I think the code of my client is now in a state of disaster :) &#xD;&#xA;&#xD;&#xA;I am using [the engine coded][1] by Bret Barker which I got from the book by David Brackeen titled [&quot;Developing Games in Java&quot;][2].&#xD;&#xA;&#xD;&#xA;If you guys would need some code I can paste some snippets of bits which you would suspect the problem is since the whole code is big &amp; fat. Plus the last thing all wants to do here is read and debug someone's code, right? :) Thus I think we can do it by need basic.&#xD;&#xA;&#xD;&#xA;*I am stuck and all your help/suggestions of stuff I should look after, even an article about similar issues, etc. is much appreciated.*&#xD;&#xA;&#xD;&#xA;  [1]: http://www.brackeen.com/javagamebook/ch06src.zip&#xD;&#xA;  [2]: http://www.brackeen.com/javagamebook/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26221" PostHistoryTypeId="1" PostId="12049" RevisionGUID="04b4bf4e-36df-43c8-a28f-b021c7794d79" CreationDate="2011-05-08T13:21:24.320" UserId="7160" Text="What causes my client's painting &amp; input thread to stop?" />
  <row Id="26222" PostHistoryTypeId="3" PostId="12049" RevisionGUID="04b4bf4e-36df-43c8-a28f-b021c7794d79" CreationDate="2011-05-08T13:21:24.320" UserId="7160" Text="&lt;java&gt;&lt;multiplayer&gt;&lt;multithreading&gt;" />
  <row Id="26223" PostHistoryTypeId="25" PostId="12048" RevisionGUID="0eb850c1-f673-4cfe-81f6-2dab5d2d06bd" CreationDate="2011-05-08T15:11:32.640" Comment="http://twitter.com/#!/StackGameDev/status/67245252670529536" />
  <row Id="26224" PostHistoryTypeId="2" PostId="12050" RevisionGUID="24021a8c-9543-4a5b-a488-14dc86821f01" CreationDate="2011-05-08T15:15:32.343" UserId="7103" Text="Is there a free type library kind of implementation available for XNA? I wish to use it on WP7, so it should be a managed code. I know can alternatively use spritefont, but I wish to know if other implementations exist for complex requirements." />
  <row Id="26225" PostHistoryTypeId="1" PostId="12050" RevisionGUID="24021a8c-9543-4a5b-a488-14dc86821f01" CreationDate="2011-05-08T15:15:32.343" UserId="7103" Text="Font library for XNA." />
  <row Id="26226" PostHistoryTypeId="3" PostId="12050" RevisionGUID="24021a8c-9543-4a5b-a488-14dc86821f01" CreationDate="2011-05-08T15:15:32.343" UserId="7103" Text="&lt;xna&gt;&lt;windows-phone-7&gt;&lt;fonts&gt;" />
  <row Id="26227" PostHistoryTypeId="2" PostId="12051" RevisionGUID="247f6fa2-fb71-4641-b138-89dd1bcfd368" CreationDate="2011-05-08T17:38:59.187" UserId="5021" Text="Nuclex fonts are excellent.&#xD;&#xA;&#xD;&#xA;Developer's blog, article discussing why XNA 4 fonts don't render as well as they could with spritebatch, with before and after comparisons of Nuclex font rendering vs Spritebatch in XNA4:&#xD;&#xA;&#xD;&#xA;http://www.nuclex.org/blog/2-gamedev/113-xna-sprite-font-quality&#xD;&#xA;&#xD;&#xA;Nuclex Fonts wiki:&#xD;&#xA;&#xD;&#xA;https://devel.nuclex.org/framework/wiki/NuclexFonts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Vector fonts (very useful for large fonts or fonts that need to be drawn well in 3D):&#xD;&#xA;&#xD;&#xA;http://nuclexframework.codeplex.com/wikipage?title=Vector%20Fonts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;XNA 4 uses DXT compression on it's font textures, which causes the edges of fonts to be a little uglier than they need to be. XNA also has no Vector font implementation, which Nuclex does." />
  <row Id="26228" PostHistoryTypeId="5" PostId="12051" RevisionGUID="609c600e-cad6-499c-b47c-dc4ac4e31a8d" CreationDate="2011-05-08T17:47:37.283" UserId="5021" Comment="added 112 characters in body; added 59 characters in body" Text="The nuclex library has more than one font renderer.&#xD;&#xA;&#xD;&#xA;Developer's blog, [article discussing why XNA 4 fonts don't render as well as they could][1] with spritebatch, with before and after comparisons of Nuclex font rendering vs Spritebatch in XNA4.&#xD;&#xA;&#xD;&#xA;[Nuclex Fonts wiki][2].&#xD;&#xA;&#xD;&#xA;Nuclex [Vector fonts][3] (very useful for large fonts or fonts that need to be drawn well in 3D).&#xD;&#xA;&#xD;&#xA;XNA 4 uses DXT compression on it's font textures, which causes the edges of fonts to be a little uglier than they need to be. XNA also has no Vector font implementation, which Nuclex does.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The nuclex font **source code** can be found here:&#xD;&#xA;https://devel.nuclex.org/framework/svn/graphics/fonts/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nuclex.org/blog/2-gamedev/113-xna-sprite-font-quality&#xD;&#xA;  [2]: https://devel.nuclex.org/framework/wiki/NuclexFonts&#xD;&#xA;  [3]: http://nuclexframework.codeplex.com/wikipage?title=Vector%20Fonts" />
  <row Id="26229" PostHistoryTypeId="25" PostId="12050" RevisionGUID="b4a7bbcb-4440-4338-9a41-ef8a87f5f99e" CreationDate="2011-05-08T18:11:33.613" Comment="http://twitter.com/#!/StackGameDev/status/67290556279169024" />
  <row Id="26230" PostHistoryTypeId="2" PostId="12052" RevisionGUID="468a923f-911e-40c7-a868-ba53cfc62842" CreationDate="2011-05-08T19:17:27.460" UserId="3175" Text="As a player it gets really annoying at times when the AI can see things it shouldn't be able to see.  I still one game that was otherwise quite good but the AI was all-seeing and thus could do some very nasty things with artillery at times because of that." />
  <row Id="26231" PostHistoryTypeId="25" PostId="12049" RevisionGUID="1b71c26b-8408-484c-a9e8-aa210c293480" CreationDate="2011-05-08T21:11:34.270" Comment="http://twitter.com/#!/StackGameDev/status/67335857744510976" />
  <row Id="26232" PostHistoryTypeId="2" PostId="12053" RevisionGUID="77d7535a-186d-4a3b-99bd-81317cfca3df" CreationDate="2011-05-08T21:12:25.967" UserId="6930" Text="I feel like I need to give a little background information on why I'm doing what I'm doing, because I want to open it to suggestions and criticism, and give hope to Blender-using XNA programmers that might read this. Considering the length of this post, please feel free to skip to the last paragraph if you don't care about the nitty-gritty details of my problem.&#xD;&#xA;&#xD;&#xA;I'm working on an XNA Content Pipeline extension project that reads .blend files (created by [Blender][1]) and converts them to data loadable from an XNA game, to avoid having to export a new .FBX or .OBJ model from Blender every time I make any little tweak, as well as (hopefully) make some XNA-compatible support for Blender's awesome particle and physics capabilities.&#xD;&#xA;&#xD;&#xA;Without diving too deep into [Blender's inner workings][2], I'd like to describe my understanding of how .blend files work. Please correct me if you're more knowledgeable on the subject.&#xD;&#xA;&#xD;&#xA;Blender saves files in &quot;blocks&quot; of bytes. Most of these blocks contain data representing objects and settings in the 3D scene, and the last block in the file (called the SDNA block), contains what can be thought of as very simple C-style structures, each of which has a unique identifier, as well as several fields of various types. Fields of these structures may be of simple types, such as `int` or `float`, or they may be of the types defined in the SDNA block.&#xD;&#xA;&#xD;&#xA;For example, here's a semi-pseudo-code representation of the `ID` SDNA structure:&#xD;&#xA;&#xD;&#xA;    structure IDPropertyData&#xD;&#xA;    {&#xD;&#xA;    	void *pointer;&#xD;&#xA;    	ListBase group;&#xD;&#xA;    	int val;&#xD;&#xA;    	int val2;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As you can see, the fields `*pointer`, `val`, and `val2` can be represented at runtime by simple values of type `void*` or `int`. The `group` field, however, is of type `ListBase`, which is defined elsewhere in the file's SDNA block.&#xD;&#xA;&#xD;&#xA;This is where C#'s new dynamic features come to play: I've made a class (called `BlenderObject`) that, given an SDNA structure (it's &quot;SDNA type&quot;), and a chunk of bytes, behaves as an instance of that structure by storing either a simple-type value for itself, or a collection of other `BlenderObject` instances, each representing one of its &quot;fields&quot;. This allows the user of my library to write code like the following:&#xD;&#xA;&#xD;&#xA;    //Get a BlendContent instance that contains the file's information.&#xD;&#xA;    BlendContent content = BlendContent.Read(filePath);&#xD;&#xA;    //Get the 0th (and only) block containing data for the scene (code &quot;SC&quot;)&#xD;&#xA;    BlendFileBlock sceneBlock = content.FileBlocks[&quot;SC&quot;, 0];&#xD;&#xA;    //Get the BlenderObject that represents the scene&#xD;&#xA;    dynamic scene = sceneBlock.Object;&#xD;&#xA;    //Get the scene's &quot;r&quot; field, whose SDNA type is RenderData.&#xD;&#xA;    dynamic renderData = scene.r;&#xD;&#xA;    //Get the x and y resolution of the rendered scene&#xD;&#xA;    float&#xD;&#xA;        xParts = renderData.xparts,&#xD;&#xA;        yParts = renderData.yparts;&#xD;&#xA;&#xD;&#xA;`scene` and `renderData` are both &quot;complex&quot; `BlenderObject` instances (each having a collection of fields, rather than a direct value), and `xparts`, and `yparts` are both &quot;simple&quot; `BlenderObject` instances (each having a direct, simple-type value for itself, rather than a collection of fields). Each `BlenderObject` behaves exactly the way you'd expect it to if its SDNA type was a concretely compiled type in the assembly, which is my goal in using dynamics to represent Blender objects.&#xD;&#xA;&#xD;&#xA;To simplify using my library, I'm working on overloading `DynamicObject`'s methods in a way that makes &quot;simple&quot; `BlenderObject` instances behave as their direct values. For example, let `foo` be a `BlenderObject` with a direct `int`-type value of, let's say, 4. I want to be able to do the following with `foo`:&#xD;&#xA;&#xD;&#xA;    string s = foo.ToString();&#xD;&#xA;    Console.WriteLine(s);&#xD;&#xA;&#xD;&#xA;The intention of the first line is to invoke the ToString method of `foo`'s inner value, not of `foo` itself, so the `foo`'s `TryInvokeMember` override uses reflection to invoke `Int32.ToString()` on its value of 4, rather than `BlenderObject.ToString()` on itself. This reflective method-calling works great (and so does the same concept applied to indexers for array-type direct values), except when I try something like the following:&#xD;&#xA;&#xD;&#xA;    string s = foo.Bar();&#xD;&#xA;    Console.WriteLine(s);&#xD;&#xA;&#xD;&#xA;`Bar` is an extension method defined in my assembly, and so reflecting `foo`'s value of 4 obviously fails to find it, and, of course, exceptions are thrown. My question, finally, is this:&#xD;&#xA;&#xD;&#xA;How can I find and/or cache extension methods that can be applied to an object? I know [how to find extension methods with reflection][3], but doing this every time an extension method is called on a dynamic `BlenderObject` instance would be ***really*** slow. Is there a faster way to find extension methods, other than the one described in that question? If not, how should I go about interning extension methods so I only need to find them once and can quickly access them again? Sorry for the longevity, and thanks in advance for any helpful answers/comments. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/&#xD;&#xA;  [2]: http://www.atmind.nl/blender/mystery_ot_blend.html&#xD;&#xA;  [3]: http://stackoverflow.com/questions/299515/c-reflection-to-identify-extension-methods" />
  <row Id="26233" PostHistoryTypeId="1" PostId="12053" RevisionGUID="77d7535a-186d-4a3b-99bd-81317cfca3df" CreationDate="2011-05-08T21:12:25.967" UserId="6930" Text="Using extension methods through the TryInvokeMember override of a DynamicObject" />
  <row Id="26234" PostHistoryTypeId="3" PostId="12053" RevisionGUID="77d7535a-186d-4a3b-99bd-81317cfca3df" CreationDate="2011-05-08T21:12:25.967" UserId="6930" Text="&lt;xna&gt;&lt;c#&gt;&lt;blender&gt;" />
  <row Id="26235" PostHistoryTypeId="2" PostId="12054" RevisionGUID="e6976a75-8bcf-4f1f-a46f-24f3cc78214d" CreationDate="2011-05-08T21:22:35.870" UserId="1718" Text="This solution doesn't apply to everything, but there is another level of variable timestep - variable timestep for each object in the world.&#xD;&#xA;&#xD;&#xA;This seems complicated, and it can be, but think of it as modeling your game as a discrete event simulation. Each player movement can be represented as an event which starts when the motion starts, and ends when the motion ends. If there is any interaction that requires the event be split (a collision for instance) the event is canceled and another event pushed onto the event queue (which is probably a priority queue sorted by event end time).&#xD;&#xA;&#xD;&#xA;Rendering is totally detached from the event queue. The display engine interpolates points between event start/end times as necessary, and can be as accurate or as sloppy in this estimate as need be.&#xD;&#xA;&#xD;&#xA;To see a demonstration of this in action, see the space simulation [EXOFLIGHT][1]. It uses a different execution model from most flight simulators -- an event-based model, rather than the traditional fixed time-slice model. The basic main loop of this type of simulation looks like this, in pseudo-code:&#xD;&#xA;&#xD;&#xA;    while (game_is_running)&#xD;&#xA;    {&#xD;&#xA;       world.draw_to_screen(); &#xD;&#xA;       world.get_player_input(); &#xD;&#xA;       world.consume_events(current_time + time_step); &#xD;&#xA;       current_time += time_step; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The main reason for using one in a space simulator is the necessity of providing arbitrary time-acceleration without loss of accuracy. Some missions in EXOFLIGHT may take years to complete, and even a 32x acceleration option would be insufficient. You'd need over 1,000,000x acceleration for a usable sim, which is difficult to do in a time-slice model. With the event-based model, we get arbitrary time rates, from 1 s = 7 ms to 1 s = 1 yr, and we can still fire events with millisecond accuracy.&#xD;&#xA;&#xD;&#xA;Changing the time rate does not change the behavior of the sim, which is a critical feature. If there is not enough CPU power available to run the simulator at the desired rate, the time rate is simply decreased until it is low enough for the CPU to handle.&#xD;&#xA;&#xD;&#xA;Cons: Complexity, and lack of any off-the-shelf physics engines which support this model :)&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/exoflight/" />
  <row Id="26236" PostHistoryTypeId="2" PostId="12055" RevisionGUID="46ae077f-36bc-462b-874e-e60edcdd4f47" CreationDate="2011-05-08T21:24:59.653" UserId="1163" Text="There is [Replica Island by Chris Pruett][1]. The game is open-source, and his blog takes you through the entire development as he works on the game, and solved issues that pop up. Definitely worth the read.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://replicaisland.blogspot.com/" />
  <row Id="26237" PostHistoryTypeId="5" PostId="12054" RevisionGUID="6f2e0219-733a-4af1-a27c-6a9cff35e276" CreationDate="2011-05-08T23:53:41.887" UserId="1718" Comment="added conclusion; added 20 characters in body" Text="This solution doesn't apply to everything, but there is another level of variable timestep - variable timestep for each object in the world.&#xD;&#xA;&#xD;&#xA;This seems complicated, and it can be, but think of it as modeling your game as a discrete event simulation. Each player movement can be represented as an event which starts when the motion starts, and ends when the motion ends. If there is any interaction that requires the event be split (a collision for instance) the event is canceled and another event pushed onto the event queue (which is probably a priority queue sorted by event end time).&#xD;&#xA;&#xD;&#xA;Rendering is totally detached from the event queue. The display engine interpolates points between event start/end times as necessary, and can be as accurate or as sloppy in this estimate as need be.&#xD;&#xA;&#xD;&#xA;To see a demonstration of this in action, see the space simulation [EXOFLIGHT][1]. It uses a different execution model from most flight simulators -- an event-based model, rather than the traditional fixed time-slice model. The basic main loop of this type of simulation looks like this, in pseudo-code:&#xD;&#xA;&#xD;&#xA;    while (game_is_running)&#xD;&#xA;    {&#xD;&#xA;       world.draw_to_screen(); &#xD;&#xA;       world.get_player_input(); &#xD;&#xA;       world.consume_events(current_time + time_step); &#xD;&#xA;       current_time += time_step; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The main reason for using one in a space simulator is the necessity of providing arbitrary time-acceleration without loss of accuracy. Some missions in EXOFLIGHT may take years to complete, and even a 32x acceleration option would be insufficient. You'd need over 1,000,000x acceleration for a usable sim, which is difficult to do in a time-slice model. With the event-based model, we get arbitrary time rates, from 1 s = 7 ms to 1 s = 1 yr.&#xD;&#xA;&#xD;&#xA;Changing the time rate does not change the behavior of the sim, which is a critical feature. If there is not enough CPU power available to run the simulator at the desired rate, the time rate is simply decreased until it is low enough for the CPU to handle.&#xD;&#xA;&#xD;&#xA;So summing up: We can not only model one vehicle in a long, leisurely orbit (using Runge-Kutta integration) but we can also model another vehicle simultaneously bouncing along the ground -- and both vehicles will be simulated at the appropriate accuracy since we do not have a global timestep.&#xD;&#xA;&#xD;&#xA;Cons: Complexity, and lack of any off-the-shelf physics engines which support this model :)&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/exoflight/" />
  <row Id="26238" PostHistoryTypeId="5" PostId="12054" RevisionGUID="ae73b6ab-994e-4b1d-9ae1-6ab241259707" CreationDate="2011-05-09T00:00:27.283" UserId="1718" Comment="deleted 13 characters in body; added 6 characters in body; added 122 characters in body" Text="This solution doesn't apply to everything, but there is another level of variable timestep -- variable timestep for each object in the world.&#xD;&#xA;&#xD;&#xA;This seems complicated, and it can be, but think of it as modeling your game as a discrete event simulation. Each player movement can be represented as an event which starts when the motion starts, and ends when the motion ends. If there is any interaction that requires the event be split (a collision for instance) the event is canceled and another event pushed onto the event queue (which is probably a priority queue sorted by event end time).&#xD;&#xA;&#xD;&#xA;Rendering is totally detached from the event queue. The display engine interpolates points between event start/end times as necessary, and can be as accurate or as sloppy in this estimate as need be.&#xD;&#xA;&#xD;&#xA;To see a complex implementation of this model, see the space simulator [EXOFLIGHT][1]. It uses a different execution model from most flight simulators -- an event-based model, rather than the traditional fixed time-slice model. The basic main loop of this type of simulation looks like this, in pseudo-code:&#xD;&#xA;&#xD;&#xA;    while (game_is_running)&#xD;&#xA;    {&#xD;&#xA;       world.draw_to_screen(); &#xD;&#xA;       world.get_player_input(); &#xD;&#xA;       world.consume_events_until(current_time + time_step); &#xD;&#xA;       current_time += time_step; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The main reason for using one in a space simulator is the necessity of providing arbitrary time-acceleration without loss of accuracy. Some missions in EXOFLIGHT may take game-years to complete, and even a 32x acceleration option would be insufficient. You'd need over 1,000,000x acceleration for a usable sim, which is difficult to do in a time-slice model. With the event-based model, we get arbitrary time rates, from 1 s = 7 ms to 1 s = 1 yr.&#xD;&#xA;&#xD;&#xA;Changing the time rate does not change the behavior of the sim, which is a critical feature. If there is not enough CPU power available to run the simulator at the desired rate, events will stack up and we might limit UI refreshing until the event queue is cleared. Similarly, we can fast-forward the sim as much as we want and be sure we're neither wasting CPU nor sacrificing accuracy.&#xD;&#xA;&#xD;&#xA;So summing up: We can model one vehicle in a long, leisurely orbit (using Runge-Kutta integration) and another vehicle simultaneously bouncing along the ground -- both vehicles will be simulated at the appropriate accuracy since we do not have a global timestep.&#xD;&#xA;&#xD;&#xA;Cons: Complexity, and lack of any off-the-shelf physics engines which support this model :)&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/exoflight/" />
  <row Id="26239" PostHistoryTypeId="25" PostId="12053" RevisionGUID="3f5c8962-fda4-4286-934d-74b1b721673b" CreationDate="2011-05-09T00:11:35.160" Comment="http://twitter.com/#!/StackGameDev/status/67381159872561152" />
  <row Id="26240" PostHistoryTypeId="2" PostId="12056" RevisionGUID="cb17f2c3-341e-4d22-be2a-f2d7709bad84" CreationDate="2011-05-09T00:42:29.043" UserId="4779" Text="What if I decide to make a fanmade game from a popular, recent game release?&#xD;&#xA;&#xD;&#xA; - 100% non-profit. I will just post my game in a forum.&#xD;&#xA; - Graphic work is 100% mine.&#xD;&#xA; - I DO have some sounds from the original game. I have credited the developers.&#xD;&#xA; - The game's title might include the original game's title, but I do have other unique words in it.&#xD;&#xA;&#xD;&#xA;Is that possible?" />
  <row Id="26241" PostHistoryTypeId="1" PostId="12056" RevisionGUID="cb17f2c3-341e-4d22-be2a-f2d7709bad84" CreationDate="2011-05-09T00:42:29.043" UserId="4779" Text="Fanmade game copyright?" />
  <row Id="26242" PostHistoryTypeId="3" PostId="12056" RevisionGUID="cb17f2c3-341e-4d22-be2a-f2d7709bad84" CreationDate="2011-05-09T00:42:29.043" UserId="4779" Text="&lt;copyright&gt;" />
  <row Id="26243" PostHistoryTypeId="5" PostId="12056" RevisionGUID="eeae5eab-3945-4445-8c7a-c6f8282be1dd" CreationDate="2011-05-09T01:24:46.053" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Legal issues for a &amp;ldquo;fangame&amp;rdquo; of a commercial franchise?](http://gamedev.stackexchange.com/questions/712/legal-issues-for-a-fangame-of-a-commercial-franchise)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;What if I decide to make a fanmade game from a popular, recent game release?&#xD;&#xA;&#xD;&#xA; - 100% non-profit. I will just post my game in a forum.&#xD;&#xA; - Graphic work is 100% mine.&#xD;&#xA; - I DO have some sounds from the original game. I have credited the developers.&#xD;&#xA; - The game's title might include the original game's title, but I do have other unique words in it.&#xD;&#xA;&#xD;&#xA;Is that possible?" />
  <row Id="26244" PostHistoryTypeId="10" PostId="12056" RevisionGUID="b5088357-4158-479b-b897-02c18852c345" CreationDate="2011-05-09T01:24:45.413" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="26245" PostHistoryTypeId="2" PostId="12057" RevisionGUID="8483d58b-3920-4ea3-8fe7-27e818ba10c5" CreationDate="2011-05-09T01:24:55.950" UserId="1430" Text="I am not a lawyer, and you should consult a real lawyer for legal advice.&#xD;&#xA;&#xD;&#xA;However, it is *possible* to do what you ask, but (depending on where you are) it is almost certainly not *legal*. Basing your game on somebody else's game without their permission probably violates some intellectual property laws, reusing their assets (such as sounds) probably constitutes copyright infringement, et cetera -- it typically does not matter if you charge for the product or credit the authors. You need their permission, that's what matters.&#xD;&#xA;&#xD;&#xA;IP law varies from country to country. In the US, you pretty much can't do this without permission from the IP holders and consulting a lawyer, otherwise you run the risk of getting a C&amp;D and/or a lawsuit." />
  <row Id="26246" PostHistoryTypeId="25" PostId="12045" RevisionGUID="35572772-5c6e-429d-b8c8-91d6e3d741f7" CreationDate="2011-05-09T03:11:35.183" Comment="http://twitter.com/#!/StackGameDev/status/67426458359963648" />
  <row Id="26247" PostHistoryTypeId="5" PostId="11887" RevisionGUID="a19ba1a1-de62-4bbe-9e14-5f7b1ac06174" CreationDate="2011-05-09T06:11:26.517" UserId="5508" Comment="Updated the answer with respect to groups" Text="I imagine a battle sequence as a minigame within your game. Update ticks (or turn ticks) are directed to a component handling these events. This approach encapsulates the battle sequence logic in a separate class, leaving your main game loop free to transition between game states.&#xD;&#xA;&#xD;&#xA;    void gameLoop() {&#xD;&#xA;        while(gameRunning) {&#xD;&#xA;            if (state == EXPLORATION) {&#xD;&#xA;                // Perform actions for when player is simply walking around&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_BATTLE) {&#xD;&#xA;                // Perform actions for when player is in battle&#xD;&#xA;                currentBattle.HandleTurn()&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_DIALOGUE) {&#xD;&#xA;                // Perform actions for when player is talking with npcs&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The battle sequence class would look like this:&#xD;&#xA;&#xD;&#xA;    class BattleSequence {&#xD;&#xA;        public:&#xD;&#xA;            BattleSequence(Entity player, Entity enemy);&#xD;&#xA;            void HandleTurn();&#xD;&#xA;            bool battleFinished();&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity currentlyAttacking;&#xD;&#xA;            Entity currentlyReceiving;&#xD;&#xA;            bool finished;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your Troll and Warrior both inherit from a common superclass called Entity. Within HandleTurn, the attacking entity is allowed to move. This is equivalent to an AI think routine.&#xD;&#xA;&#xD;&#xA;    void HandleTurn() {&#xD;&#xA;        // Perform turn actions&#xD;&#xA;        currentlyAttacking.fight(currentlyReceiving);&#xD;&#xA;&#xD;&#xA;        // Switch sides&#xD;&#xA;        Entity temp = currentlyAttacking;&#xD;&#xA;        currentlyAttacking = currentlyReceiving;&#xD;&#xA;        currentlyReceiving = temp;&#xD;&#xA;&#xD;&#xA;        // Battle end condition&#xD;&#xA;        if (currentlyReceiving.isDead() || currentlyAttacking.hasFled()) {&#xD;&#xA;            finished = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fight method decides what the entity is going to do. Note that this does not need to involve the opposing entity, like drinking a potion or running away.&#xD;&#xA;&#xD;&#xA;*Update:* To support multiple monsters and a player party, you introducte a Group class:&#xD;&#xA;&#xD;&#xA;    class Group {&#xD;&#xA;        public:&#xD;&#xA;            void fight(Group opponents) {&#xD;&#xA;                // Loop through all group members so everyone gets&#xD;&#xA;                // a shot at the opponents&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    Entity attacker = members[i];&#xD;&#xA;                    attacker.fight(opponents)&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            Entity get(int targetID) {&#xD;&#xA;                // TODO: Bounds checking&#xD;&#xA;                return members[targetID]&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            bool isDead() {&#xD;&#xA;                bool dead = true;&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    dead = dead &amp;&amp; members[i].isDead();&#xD;&#xA;                }&#xD;&#xA;                return dead;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            bool hasFled() {&#xD;&#xA;                bool fled = true;&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    fled = fled &amp;&amp; members[i].hasFled();&#xD;&#xA;                }&#xD;&#xA;                return fled;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity members;&#xD;&#xA;            int memberCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The Group class will replace all occurences of Entity in the class BattleSequence. Selecting and attacking will be handled by the Entity class itself, so the AI can take the whole group into account when selecting the best course of action.&#xD;&#xA;&#xD;&#xA;    class Entity {&#xD;&#xA;        public:&#xD;&#xA;            void fight(Group opponents) {&#xD;&#xA;                // Algorithm for selecting an entity from the group&#xD;&#xA;                // ...&#xD;&#xA;                targetID = 0; // Or just pick the first one&#xD;&#xA;&#xD;&#xA;                Entity target = opponents.get(targetID);&#xD;&#xA;&#xD;&#xA;                // Fighting algorithm&#xD;&#xA;                target.applyDamage(10);&#xD;&#xA;            }&#xD;&#xA;    }" />
  <row Id="26248" PostHistoryTypeId="25" PostId="11897" RevisionGUID="8c8cc964-4dd7-4dda-b184-38123573cebf" CreationDate="2011-05-09T06:11:34.637" Comment="http://twitter.com/#!/StackGameDev/status/67471754456600576" />
  <row Id="26249" PostHistoryTypeId="5" PostId="11887" RevisionGUID="73f8e9ba-9f7c-4f77-95fe-0ce9880fb03e" CreationDate="2011-05-09T06:17:54.357" UserId="5508" Comment="Forgot some semicolons in the code; added 4 characters in body" Text="I imagine a battle sequence as a minigame within your game. Update ticks (or turn ticks) are directed to a component handling these events. This approach encapsulates the battle sequence logic in a separate class, leaving your main game loop free to transition between game states.&#xD;&#xA;&#xD;&#xA;    void gameLoop() {&#xD;&#xA;        while(gameRunning) {&#xD;&#xA;            if (state == EXPLORATION) {&#xD;&#xA;                // Perform actions for when player is simply walking around&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_BATTLE) {&#xD;&#xA;                // Perform actions for when player is in battle&#xD;&#xA;                currentBattle.HandleTurn()&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_DIALOGUE) {&#xD;&#xA;                // Perform actions for when player is talking with npcs&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The battle sequence class would look like this:&#xD;&#xA;&#xD;&#xA;    class BattleSequence {&#xD;&#xA;        public:&#xD;&#xA;            BattleSequence(Entity player, Entity enemy);&#xD;&#xA;            void HandleTurn();&#xD;&#xA;            bool battleFinished();&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity currentlyAttacking;&#xD;&#xA;            Entity currentlyReceiving;&#xD;&#xA;            bool finished;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your Troll and Warrior both inherit from a common superclass called Entity. Within HandleTurn, the attacking entity is allowed to move. This is equivalent to an AI think routine.&#xD;&#xA;&#xD;&#xA;    void HandleTurn() {&#xD;&#xA;        // Perform turn actions&#xD;&#xA;        currentlyAttacking.fight(currentlyReceiving);&#xD;&#xA;&#xD;&#xA;        // Switch sides&#xD;&#xA;        Entity temp = currentlyAttacking;&#xD;&#xA;        currentlyAttacking = currentlyReceiving;&#xD;&#xA;        currentlyReceiving = temp;&#xD;&#xA;&#xD;&#xA;        // Battle end condition&#xD;&#xA;        if (currentlyReceiving.isDead() || currentlyAttacking.hasFled()) {&#xD;&#xA;            finished = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fight method decides what the entity is going to do. Note that this does not need to involve the opposing entity, like drinking a potion or running away.&#xD;&#xA;&#xD;&#xA;**Update:** To support multiple monsters and a player party, you introducte a Group class:&#xD;&#xA;&#xD;&#xA;    class Group {&#xD;&#xA;        public:&#xD;&#xA;            void fight(Group opponents) {&#xD;&#xA;                // Loop through all group members so everyone gets&#xD;&#xA;                // a shot at the opponents&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    Entity attacker = members[i];&#xD;&#xA;                    attacker.fight(opponents);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            Entity get(int targetID) {&#xD;&#xA;                // TODO: Bounds checking&#xD;&#xA;                return members[targetID];&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            bool isDead() {&#xD;&#xA;                bool dead = true;&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    dead = dead &amp;&amp; members[i].isDead();&#xD;&#xA;                }&#xD;&#xA;                return dead;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            bool hasFled() {&#xD;&#xA;                bool fled = true;&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    fled = fled &amp;&amp; members[i].hasFled();&#xD;&#xA;                }&#xD;&#xA;                return fled;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity members;&#xD;&#xA;            int memberCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The Group class will replace all occurences of Entity in the class BattleSequence. Selecting and attacking will be handled by the Entity class itself, so the AI can take the whole group into account when selecting the best course of action.&#xD;&#xA;&#xD;&#xA;    class Entity {&#xD;&#xA;        public:&#xD;&#xA;            void fight(Group opponents) {&#xD;&#xA;                // Algorithm for selecting an entity from the group&#xD;&#xA;                // ...&#xD;&#xA;                int targetID = 0; // Or just pick the first one&#xD;&#xA;&#xD;&#xA;                Entity target = opponents.get(targetID);&#xD;&#xA;&#xD;&#xA;                // Fighting algorithm&#xD;&#xA;                target.applyDamage(10);&#xD;&#xA;            }&#xD;&#xA;    }" />
  <row Id="26250" PostHistoryTypeId="2" PostId="12058" RevisionGUID="d118b762-b9d7-427e-9d04-2204abb641d4" CreationDate="2011-05-09T06:38:48.817" UserId="7172" Text="Yo everyone!&#xD;&#xA;&#xD;&#xA;I have been working on an Isometric Tile Game Engine in HTML5/Canvas for a little while now and I have a complete working game. Earlier today I looked back over my code and thought: &quot;hmm, let's try to get this animated smoothly...&quot;&#xD;&#xA;&#xD;&#xA;And since then, that is all I have tried to do.&#xD;&#xA;&#xD;&#xA;***The problem***&lt;br /&gt;&#xD;&#xA;I would like the character to actually &quot;slide&quot; from tile to tile - but the canvas redrawing  doesn't allow this - does anyone have any ideas....? Code and fiddle below...&#xD;&#xA;&#xD;&#xA;**Fiddle with it!** http://jsfiddle.net/neuroflux/n7VAu/&#xD;&#xA;&#xD;&#xA;    &lt;html&gt;  &#xD;&#xA;    &lt;head&gt;&#xD;&#xA;    &lt;title&gt;tileEngine - Isometric&lt;/title&gt;&#xD;&#xA;    &lt;style type=&quot;text/css&quot;&gt;&#xD;&#xA;    * { margin: 0px; padding: 0px; font-family: arial, helvetica, sans-serif; font-size: 12px; cursor: default; }&#xD;&#xA;    &lt;/style&gt;&#xD;&#xA;    &lt;script type=&quot;text/javascript&quot;&gt;&#xD;&#xA;    var map = Array( //land&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],&#xD;&#xA;    	[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]&#xD;&#xA;    );&#xD;&#xA;    var tileDict = Array(&quot;http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/land.png&quot;);&#xD;&#xA;    var charDict = Array(&quot;http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/mario.png&quot;);&#xD;&#xA;    var objectDict = Array(&quot;http://www.wikiword.co.uk/release-candidate/canvas/tileEngine/rock.png&quot;); //last is one more&#xD;&#xA;    var objectImg = new Array();&#xD;&#xA;    &#xD;&#xA;    var charImg = new Array();&#xD;&#xA;    var tileImg = new Array();&#xD;&#xA;    &#xD;&#xA;    var loaded = 0;&#xD;&#xA;    var loadTimer;&#xD;&#xA;    var ymouse;&#xD;&#xA;    var xmouse;&#xD;&#xA;    var eventUpdate = 0;&#xD;&#xA;    &#xD;&#xA;    var playerX = 0;&#xD;&#xA;    var playerY = 0;&#xD;&#xA;    &#xD;&#xA;    function loadImg(){ //preload images and calculate the total loading time&#xD;&#xA;    	for(var i=0;i&lt;tileDict.length;i++){	&#xD;&#xA;    		tileImg[i] = new Image();&#xD;&#xA;    		tileImg[i].src = tileDict[i];&#xD;&#xA;    		tileImg[i].onload = function(){&#xD;&#xA;    			loaded++;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    	i = 0;&#xD;&#xA;    	for(var i=0;i&lt;charDict.length;i++){&#xD;&#xA;    		charImg[i] = new Image();&#xD;&#xA;    		charImg[i].src = charDict[i];&#xD;&#xA;    		charImg[i].onload = function(){&#xD;&#xA;    			loaded++;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    	i = 0;&#xD;&#xA;    	for(var i=0;i&lt;objectDict.length;i++){&#xD;&#xA;    		objectImg[i] = new Image();&#xD;&#xA;    		objectImg[i].src = objectDict[i];&#xD;&#xA;    		objectImg[i].onload = function(){&#xD;&#xA;    			loaded++;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function checkKeycode(event) { //key pressed&#xD;&#xA;    	var keycode;&#xD;&#xA;    	if(event == null) {&#xD;&#xA;    		keyCode = window.event.keyCode;&#xD;&#xA;    	} else {&#xD;&#xA;    		keyCode = event.keyCode;&#xD;&#xA;    	}&#xD;&#xA;    	switch(keyCode) {&#xD;&#xA;    		case 38: //left&#xD;&#xA;    			if(!map[playerX-1][playerY][1] &gt; 0){&#xD;&#xA;    				playerX--;&#xD;&#xA;    			}&#xD;&#xA;    			break;&#xD;&#xA;    		case 40: //right&#xD;&#xA;    			if(!map[playerX+1][playerY][1]  &gt; 0){&#xD;&#xA;    				playerX++;&#xD;&#xA;    			}&#xD;&#xA;    			break;&#xD;&#xA;    		case 39: //up&#xD;&#xA;    			if(!map[playerX][playerY-1][1]  &gt; 0){&#xD;&#xA;    				playerY--;&#xD;&#xA;    			}&#xD;&#xA;    			break;&#xD;&#xA;    		case 37: //down&#xD;&#xA;    			if(!map[playerX][playerY+1][1]  &gt; 0){&#xD;&#xA;    				playerY++;&#xD;&#xA;    			}&#xD;&#xA;    			break;&#xD;&#xA;    		default:&#xD;&#xA;    			break;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function loadAll(){ //load the game&#xD;&#xA;    	if(loaded == tileDict.length + charDict.length + objectDict.length){&#xD;&#xA;    		clearInterval(loadTimer);&#xD;&#xA;    		loadTimer = setInterval(gameUpdate,100);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;     &#xD;&#xA;    function drawMap(){ //draw the map (in intervals)&#xD;&#xA;    	var tileH = 25;&#xD;&#xA;    	var tileW = 50;&#xD;&#xA;    	mapX = 80;&#xD;&#xA;    	mapY = 10;&#xD;&#xA;    	for(i=0;i&lt;map.length;i++){&#xD;&#xA;    		for(j=0;j&lt;map[i].length;j++){&#xD;&#xA;    			var drawTile= map[i][j][0];&#xD;&#xA;    			var xpos = (i-j)*tileH + mapX*4.5;&#xD;&#xA;    			var ypos = (i+j)*tileH/2+ mapY*3.0;&#xD;&#xA;    			ctx.drawImage(tileImg[drawTile],xpos,ypos);&#xD;&#xA;    			&#xD;&#xA;    			if(i == playerX &amp;&amp; j == playerY){&#xD;&#xA;    				you = ctx.drawImage(charImg[0],xpos,ypos-(charImg[0].height/2));&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;     &#xD;&#xA;    function init(){ //initialise the main functions and even handlers&#xD;&#xA;    	ctx = document.getElementById('main').getContext('2d');&#xD;&#xA;    	loadImg();&#xD;&#xA;    	loadTimer = setInterval(loadAll,10);&#xD;&#xA;    	document.onkeydown = checkKeycode;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function gameUpdate() { //update the game, clear canvas etc&#xD;&#xA;    	ctx.clearRect(0,0,904,460);	&#xD;&#xA;    	ctx.fillStyle = &quot;rgba(255, 255, 255, 1.0)&quot;; //assign color&#xD;&#xA;    	drawMap();&#xD;&#xA;    }&#xD;&#xA;    &lt;/script&gt;&#xD;&#xA;    &lt;/head&gt; &#xD;&#xA;    &lt;body align=&quot;center&quot; style=&quot;text-align: center;&quot; onload=&quot;init()&quot;&gt;	&#xD;&#xA;    	&lt;canvas id=&quot;main&quot; width=&quot;904&quot; height=&quot;465&quot;&gt;&#xD;&#xA;    		&lt;h1 style=&quot;color: white; font-size: 24px;&quot;&gt;I'll be damned, there be no HTML5 &amp;amp; canvas support on this 'ere electronic machine!&lt;sub&gt;This game, jus' plain ol' won't work!&lt;/sub&gt;&lt;/h1&gt;&#xD;&#xA;    	&lt;/canvas&gt;&#xD;&#xA;    &lt;/body&gt; &#xD;&#xA;    &lt;/html&gt;  " />
  <row Id="26251" PostHistoryTypeId="1" PostId="12058" RevisionGUID="d118b762-b9d7-427e-9d04-2204abb641d4" CreationDate="2011-05-09T06:38:48.817" UserId="7172" Text="Smooth animation on a persistently refreshing canvas" />
  <row Id="26252" PostHistoryTypeId="3" PostId="12058" RevisionGUID="d118b762-b9d7-427e-9d04-2204abb641d4" CreationDate="2011-05-09T06:38:48.817" UserId="7172" Text="&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="26253" PostHistoryTypeId="2" PostId="12059" RevisionGUID="a18eae02-52da-47be-96b6-9f87f7ff4916" CreationDate="2011-05-09T07:02:53.540" UserId="5021" Text="The code below is from a Microsoft XNA sample here.&#xD;&#xA;This is quite a simple rigid body simulation that ignores many physical effects (such as angular momentum), but it does try to push objects (spheres) apart so that they are not penetrating one-another.&#xD;&#xA;&#xD;&#xA;However, the simulation allows spheres not only to penetrate, but when many spheres are stacked on top of each other, small spheres can be almost completely inside of larger spheres. If I make all spheres have the same radius and mass, then the simulation performs reasonably well (with minimal interpenetration).&#xD;&#xA;&#xD;&#xA;Can someone explain why there is any interpenetration at all? Since it moves the positions of the spheres, it seems like interpenetration should be impossible.&#xD;&#xA;&#xD;&#xA;For each sphere in the simulation, this method is called on every other sphere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    // Given 2 spheres with velocity, mass and size, evaluate whether&#xD;&#xA;    // a collision occured, and if so, excatly where, and move sphere 2&#xD;&#xA;    // at the contact point with sphere 1, and generate new velocities.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    private void SphereCollisionImplicit(Sphere sphere1, Sphere sphere2)&#xD;&#xA;    {&#xD;&#xA;        const float K_ELASTIC = 0.75f;&#xD;&#xA;    &#xD;&#xA;        Vector3 relativepos = sphere2.Position - sphere1.Position;&#xD;&#xA;        float distance = relativepos.Length();&#xD;&#xA;        float radii = sphere1.Radius + sphere2.Radius;&#xD;&#xA;        if (distance &gt;= radii)&#xD;&#xA;        {&#xD;&#xA;            return; // No collision&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // Add epsilon to avoid NaN.&#xD;&#xA;        distance += 0.000001f;&#xD;&#xA;    &#xD;&#xA;        Vector3 relativeUnit = relativepos * (1.0f / distance);&#xD;&#xA;        Vector3 penetration = relativeUnit * (radii - distance);&#xD;&#xA;    &#xD;&#xA;        // Adjust the spheres' relative positions&#xD;&#xA;        float mass1 = sphere1.Mass;&#xD;&#xA;        float mass2 = sphere2.Mass;&#xD;&#xA;    &#xD;&#xA;        float m_inv = 1.0f / (mass1 + mass2);&#xD;&#xA;        float weight1 = mass1 * m_inv; // relative weight of sphere 1&#xD;&#xA;        float weight2 = mass2 * m_inv; // relative weight of sphere 2. w1+w2==1.0&#xD;&#xA;    &#xD;&#xA;        sphere1.Position -= weight2 * penetration;&#xD;&#xA;        sphere2.Position += weight1 * penetration;&#xD;&#xA;    &#xD;&#xA;        // Adjust the objects’ relative velocities, if they are&#xD;&#xA;        // moving toward each other.&#xD;&#xA;        //&#xD;&#xA;        // Note that we're assuming no friction, or equivalently, no angular momentum.&#xD;&#xA;        //&#xD;&#xA;        // velocityTotal = velocity of v2 in v1 stationary ref. frame&#xD;&#xA;        // get reference frame of common center of mass&#xD;&#xA;        Vector3 velocity1 = sphere1.Velocity;&#xD;&#xA;        Vector3 velocity2 = sphere2.Velocity;&#xD;&#xA;    &#xD;&#xA;        Vector3 velocityTotal = velocity1 * weight1 + velocity2 * weight2;&#xD;&#xA;        Vector3 i2 = (velocity2 - velocityTotal) * mass2;&#xD;&#xA;        if (Vector3.Dot(i2, relativeUnit) &lt; 0)&#xD;&#xA;        {&#xD;&#xA;            // i1+i2 == 0, approx&#xD;&#xA;            Vector3 di = Vector3.Dot(i2, relativeUnit) * relativeUnit;&#xD;&#xA;            i2 -= di * (K_ELASTIC + 1);&#xD;&#xA;            sphere1.Velocity = (-i2) / mass1 + velocityTotal;&#xD;&#xA;            sphere2.Velocity = i2 / mass2 + velocityTotal;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In particular, I though that this:&#xD;&#xA;&#xD;&#xA;    sphere1.Position -= weight2 * penetration;&#xD;&#xA;    sphere2.Position += weight1 * penetration;&#xD;&#xA;&#xD;&#xA;Should completely disallow any interpenetration, why doesn't it?" />
  <row Id="26254" PostHistoryTypeId="1" PostId="12059" RevisionGUID="a18eae02-52da-47be-96b6-9f87f7ff4916" CreationDate="2011-05-09T07:02:53.540" UserId="5021" Text="Why do objects interpenetrate in this simple collision solver?" />
  <row Id="26255" PostHistoryTypeId="3" PostId="12059" RevisionGUID="a18eae02-52da-47be-96b6-9f87f7ff4916" CreationDate="2011-05-09T07:02:53.540" UserId="5021" Text="&lt;xna&gt;&lt;c#&gt;&lt;physics&gt;&lt;rigid-body-dynamics&gt;" />
  <row Id="26257" PostHistoryTypeId="2" PostId="12061" RevisionGUID="e9918711-45f2-4225-afd1-4f6a1574aad0" CreationDate="2011-05-09T07:15:37.267" UserId="20" Text="You can animate your character by interpolating from the initial position to the target position.&#xD;&#xA;&#xD;&#xA;You would have to update the position of the player inside your `gameUpdate` method, *before* calling `drawMap();`. To avoid strange movements, you'll have to lock/ignore player input for that period of time. This can be done easily by setting a flag `isAnimating` to `true` and simply ignoring key-input when `isAnimating == true`.&#xD;&#xA;&#xD;&#xA;If your game gets more fleshed out, your game code will increase. If that's the case it's probably a good idea to separate your code into classes (I know, not so easy with JavaScript) and also implement a proper game-loop: http://gamedev.stackexchange.com/questions/651/tips-for-writing-the-main-game-loop&#xD;&#xA;" />
  <row Id="26258" PostHistoryTypeId="25" PostId="12058" RevisionGUID="85a1f0d4-5aaa-42fd-91fb-d4fa85b93d7b" CreationDate="2011-05-09T09:11:34.947" Comment="http://twitter.com/#!/StackGameDev/status/67517054412005376" />
  <row Id="26259" PostHistoryTypeId="2" PostId="12062" RevisionGUID="afe2efa6-213f-49f6-a032-7dfd87105b19" CreationDate="2011-05-09T09:30:34.650" UserId="1868" Text="A bit related to this [question][1]. &#xD;&#xA;&#xD;&#xA;The idea is to guarantee the same physics behavior as much as possible. Would it be possible to run fixed time step physics on a web worker? The UI would update itself with different/variable refresh rate.&#xD;&#xA;&#xD;&#xA;Has anyone tried such yet?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="26260" PostHistoryTypeId="1" PostId="12062" RevisionGUID="afe2efa6-213f-49f6-a032-7dfd87105b19" CreationDate="2011-05-09T09:30:34.650" UserId="1868" Text="Web workers for HTML5 game physics simulation?" />
  <row Id="26261" PostHistoryTypeId="3" PostId="12062" RevisionGUID="afe2efa6-213f-49f6-a032-7dfd87105b19" CreationDate="2011-05-09T09:30:34.650" UserId="1868" Text="&lt;physics&gt;&lt;html5&gt;&lt;webworkers&gt;" />
  <row Id="26262" PostHistoryTypeId="2" PostId="12063" RevisionGUID="d9c02f1f-dafa-4539-92dc-cef2d3cef1bb" CreationDate="2011-05-09T09:54:41.823" UserId="7048" Text="1) You need to add setResizable() before pack() method,&#xD;&#xA;&#xD;&#xA;2) You need to implement so to say &quot;collision prediction&quot; to reach desired effect,&#xD;&#xA;&#xD;&#xA;3) You need to start timer only after any keyEvent is happened;" />
  <row Id="26263" PostHistoryTypeId="2" PostId="12064" RevisionGUID="84e0404a-dbb0-4889-973b-59617730078a" CreationDate="2011-05-09T10:05:54.853" UserId="259" Text="Thought I'd give a vague overview of an RTS AI so you know what to expect.&#xD;&#xA;&#xD;&#xA;There two large and seperate components: the higher-level planner, and the individual unit AI. &#xD;&#xA;&#xD;&#xA;The job of the planner will be to win the game by building new units and issuing orders to them, like a general behind friendly lines. It may use a complex planning system like a hierarchical task network, or may take a simpler approach. This is a highly active area of research, so there's lots to read.&#xD;&#xA;&#xD;&#xA;Whatever approach you take, you'll probably need a system to record information about the environment and enemies. This will probably be spatial. Possibilities here include blackboards, heat maps, and influence maps.&#xD;&#xA;&#xD;&#xA;Each individual unit will have its own AI responsible for following orders from the planner. It will be responsible for picking and attacking targets, pathfinding around the environment, and even choosing when to override the planner's orders to preserve itself.&#xD;&#xA;&#xD;&#xA;None of these issues are trivial. For any sufficently interesting RTS I'd expect a team of three or more full-time AI programmers to take more than a year to go from a blank page to a shippable competent opponent. " />
  <row Id="26264" PostHistoryTypeId="6" PostId="12062" RevisionGUID="9dfa06d7-5d31-48b5-8a33-c20e9f0a2ae9" CreationDate="2011-05-09T10:11:16.253" UserId="1868" Comment="edited tags" Text="&lt;physics&gt;&lt;javascript&gt;&lt;html5&gt;&lt;webworkers&gt;" />
  <row Id="26265" PostHistoryTypeId="2" PostId="12065" RevisionGUID="73ca80e5-b65a-453d-bb3e-1d0c28d416a6" CreationDate="2011-05-09T11:14:09.273" UserId="7158" Text="I am planning to develop 2D space RPG and i am facing the choice: what is the best language to write it in? My candidates are C++, Java and Python. Obviously, I want to write game in Python because of its expressiveness, speed of development and simplicity of adding scripting support. But i am worried:&#xD;&#xA;&#xD;&#xA; - Won't python be too slow? Game will be not trivial (like Tetris for example), it may be needed to calculate tasks for thousands of ships in universe (though their AI can be heavily simplified if those ships are not seen to the player). Of course I can write some critical parts in C, but it will instantly complicate building and deploying.&#xD;&#xA; - Let's suppose that game became popular, and I became a superstar. Windows users rarely have python at all (fortunately we have py2exe). Python on Mac OS X can be outdated and game may crash with obscure exception. Wouldn't it be hard to deploy game in python?&#xD;&#xA; - Because of lack of libraries for python 3 I'll have to write game in python 2. Wouldn't transition to python 3 in couple of years be too painful and time consuming?" />
  <row Id="26266" PostHistoryTypeId="1" PostId="12065" RevisionGUID="73ca80e5-b65a-453d-bb3e-1d0c28d416a6" CreationDate="2011-05-09T11:14:09.273" UserId="7158" Text="Is it a good idea to develop non-trivial 2d game in python?" />
  <row Id="26267" PostHistoryTypeId="3" PostId="12065" RevisionGUID="73ca80e5-b65a-453d-bb3e-1d0c28d416a6" CreationDate="2011-05-09T11:14:09.273" UserId="7158" Text="&lt;python&gt;&lt;language-choice&gt;" />
  <row Id="26268" PostHistoryTypeId="2" PostId="12066" RevisionGUID="7e68b27a-f390-4a43-9103-82a2358a20b6" CreationDate="2011-05-09T11:24:46.563" UserId="7143" Text="hy . . .i am using corona... i have got through alot of material and an example of balloons regarding collision filter...but it didint works for me . . . its my first game and first app ever so can any one provide me an example regarding collision filter and masking. . .m using sprite for my object who fires enemy and enimies fires my object so theres are alot of collisions and functionality...it is confusing for me . . .and i have sprnd alot of time on this so help me plz.thanx" />
  <row Id="26269" PostHistoryTypeId="1" PostId="12066" RevisionGUID="7e68b27a-f390-4a43-9103-82a2358a20b6" CreationDate="2011-05-09T11:24:46.563" UserId="7143" Text="collision filter" />
  <row Id="26270" PostHistoryTypeId="3" PostId="12066" RevisionGUID="7e68b27a-f390-4a43-9103-82a2358a20b6" CreationDate="2011-05-09T11:24:46.563" UserId="7143" Text="&lt;collision-detection&gt;&lt;game-mechanics&gt;" />
  <row Id="26271" PostHistoryTypeId="2" PostId="12067" RevisionGUID="93b74a4f-d430-4dd0-a022-ca7d9cdc98aa" CreationDate="2011-05-09T11:26:05.953" UserId="7182" Text="What kind of book I read, that should do a full indie game?" />
  <row Id="26272" PostHistoryTypeId="1" PostId="12067" RevisionGUID="93b74a4f-d430-4dd0-a022-ca7d9cdc98aa" CreationDate="2011-05-09T11:26:05.953" UserId="7182" Text="book that I could make an indie game" />
  <row Id="26273" PostHistoryTypeId="3" PostId="12067" RevisionGUID="93b74a4f-d430-4dd0-a022-ca7d9cdc98aa" CreationDate="2011-05-09T11:26:05.953" UserId="7182" Text="&lt;books&gt;&lt;indie&gt;" />
  <row Id="26274" PostHistoryTypeId="2" PostId="12068" RevisionGUID="8a0a4bba-3250-4157-b07e-6f7079dea003" CreationDate="2011-05-09T11:42:11.983" UserId="5769" Text="The reason that your getting an extra 2 pixels added on is that these pixels are added in to form the frame around your game. (Frame width is 1 pixel, add the frame on  both sides and there's your extra 2)&#xD;&#xA;&#xD;&#xA;I know this because I had a similar problem myself a while back." />
  <row Id="26275" PostHistoryTypeId="2" PostId="12069" RevisionGUID="3a85475f-af89-44da-9b1f-4ea03870bf3d" CreationDate="2011-05-09T11:44:59.393" UserId="7180" Text="Depends a little on what you are looking for a game.&#xD;&#xA;&#xD;&#xA;You could do some Flash Games with little scripting but you have to learn the Flash scripting itself.&#xD;&#xA;If you can program C/C++/C#/Java you can find [here][1] some books which could be very interesting.&#xD;&#xA;&#xD;&#xA;So, what is it what you can and what is it what you want to create?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/11948/game-programming-books-that-dont-teach-programming" />
  <row Id="26276" PostHistoryTypeId="2" PostId="12070" RevisionGUID="936b6446-cfa2-484f-a54a-a357ba369944" CreationDate="2011-05-09T12:05:00.673" UserId="1868" Text="For game design I can recommend [The Art of Game Design: A book of lenses][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Art-Game-Design-book-lenses/dp/0123694965" />
  <row Id="26277" PostHistoryTypeId="2" PostId="12071" RevisionGUID="aeab6f2c-227e-498a-a755-96ff762c7a90" CreationDate="2011-05-09T12:06:22.833" UserId="6469" Text="I am making a final fantasy style battle system.&#xD;&#xA;&#xD;&#xA;I have a random generator that select the monsters move when it is there turn, different moves have different chances to be performed. &#xD;&#xA;&#xD;&#xA;I also have reaction actions and conditional actions for the monster to create simulated intelligent but what I can't figure out is aim.&#xD;&#xA;&#xD;&#xA;I could just choose randomly between the five player characters but I was looking for something that would make the game more challenging by adding some kind of strategy to the monsters actions. &#xD;&#xA;&#xD;&#xA;I code in C++ " />
  <row Id="26278" PostHistoryTypeId="1" PostId="12071" RevisionGUID="aeab6f2c-227e-498a-a755-96ff762c7a90" CreationDate="2011-05-09T12:06:22.833" UserId="6469" Text="Monster aim in a turn based rpg" />
  <row Id="26279" PostHistoryTypeId="3" PostId="12071" RevisionGUID="aeab6f2c-227e-498a-a755-96ff762c7a90" CreationDate="2011-05-09T12:06:22.833" UserId="6469" Text="&lt;rpg&gt;&lt;turn-based&gt;&lt;aiming&gt;" />
  <row Id="26280" PostHistoryTypeId="25" PostId="12067" RevisionGUID="e99c041e-14b2-4252-b9ec-33e40b760604" CreationDate="2011-05-09T12:11:35.040" Comment="http://twitter.com/#!/StackGameDev/status/67562352878436352" />
  <row Id="26281" PostHistoryTypeId="2" PostId="12072" RevisionGUID="8950989b-4463-438e-9459-c6450dd674a4" CreationDate="2011-05-09T12:41:54.897" UserId="1923" Text="SphereCollisionImplicit() gets called after the spheres have moved. That movement could have ended up with collision &amp; interpenetration, this method resolves that.&#xD;&#xA;&#xD;&#xA;start frame:&#xD;&#xA;&#xD;&#xA;1. elsewhere in your code, the position is updated by velocity.&#xD;&#xA;&#xD;&#xA;2. Then this method is called to see if that resulted in collision/penetration.&#xD;&#xA;&#xD;&#xA;3. if so, it separates them &amp; reflects/changes their velocities.&#xD;&#xA;&#xD;&#xA;4. next frame, positions are updated with new/changed velocity... goto 1.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26282" PostHistoryTypeId="5" PostId="12071" RevisionGUID="9b746c93-d8d3-47b7-944b-bee1dd3c6595" CreationDate="2011-05-09T12:53:53.803" UserId="6469" Comment="added 122 characters in body" Text="I am making a final fantasy style battle system.&#xD;&#xA;&#xD;&#xA;I have a random generator that select the monsters move when it is there turn, different moves have different chances to be performed. &#xD;&#xA;&#xD;&#xA;I also have reaction actions and conditional actions for the monster to create simulated intelligent but what I can't figure out is aim.&#xD;&#xA;&#xD;&#xA;I could just choose randomly between the five player characters but I was looking for something that would make the game more challenging by adding some kind of strategy to the monsters actions. &#xD;&#xA;&#xD;&#xA;I code in C++ &#xD;&#xA;&#xD;&#xA;Does anyone have an idea how to implement a system for the monster to choose who to attack besides completely random. " />
  <row Id="26283" PostHistoryTypeId="2" PostId="12073" RevisionGUID="2929edd3-f3f3-420d-8e51-42d92497fe6f" CreationDate="2011-05-09T13:02:56.990" UserId="4191" Text="If you wanted them to act really smart, usually in RPGs the best thing for the monsters to do is all attack the PC with the highest ratio of offensive capability to hit points.  You don't see this actually done a lot, though, since it tends not to be rewarding for the player. :)&#xD;&#xA;&#xD;&#xA;One place I might recommend starting is to come up with some general categorization scheme for your PCs -- bucket them as melee, casters, healers, and stealth, or as offensive, defensive, support, or what-have-you -- and have each type of monster display a preference for the category of PC it will attack.  Maybe some almost always go for that category, while some have a mild preference.  This provides something useful the player can learn about the monster types and gives more interesting behavior than pure randomness.&#xD;&#xA;&#xD;&#xA;You may also want to make monsters &quot;sticky&quot; in their target preference to some degree, i.e. make them tend to continue attacking whoever they last attacked." />
  <row Id="26284" PostHistoryTypeId="2" PostId="12074" RevisionGUID="0daf69fb-35d6-4ee0-9abb-9c21a035b9f1" CreationDate="2011-05-09T13:24:01.330" UserId="259" Text="My [answer from this question][1] would fit here.&#xD;&#xA;&#xD;&#xA;To adapt for your problem: A monster would look to assign a score to each enemy. Pass the enemy to each of a collection of behaviour classes, which each return an integer score. Add all these scores together, and assign the final score to the enemy. Attack the enemy with the highest score.&#xD;&#xA;&#xD;&#xA;This has the scope for different monsters having different behaviours, evaluating targets in different ways, and the personality extension I mentioned in the other answer could be modified at run time to alter target choice based on the monster's situation: maybe he becomes more aggressive as his health lowers? &#xD;&#xA;&#xD;&#xA;From chaos' answer, you could keep a sticky target by remembering the score of the last target, and any new target would have to beat that score by some extra %.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/11048/positive-evaluation-function-territory-ai-help" />
  <row Id="26285" PostHistoryTypeId="2" PostId="12075" RevisionGUID="6e547324-9ae5-43c1-9f95-4a6c349f52a3" CreationDate="2011-05-09T13:25:32.497" UserId="215" Text="Using LWJGL what is the easiest way to load a 3D model to be drawn on screen?&#xD;&#xA;&#xD;&#xA;I know LWJGL doesn't have built in loading support so I am looking for a small library that would help to load specifically .blend files." />
  <row Id="26286" PostHistoryTypeId="1" PostId="12075" RevisionGUID="6e547324-9ae5-43c1-9f95-4a6c349f52a3" CreationDate="2011-05-09T13:25:32.497" UserId="215" Text="How to load 3D models into Java?" />
  <row Id="26287" PostHistoryTypeId="3" PostId="12075" RevisionGUID="6e547324-9ae5-43c1-9f95-4a6c349f52a3" CreationDate="2011-05-09T13:25:32.497" UserId="215" Text="&lt;3d&gt;&lt;java&gt;&lt;3d-meshes&gt;&lt;blender&gt;&lt;lwjgl&gt;" />
  <row Id="26291" PostHistoryTypeId="2" PostId="12077" RevisionGUID="6dbe6e68-a254-492c-91b9-25918ebb488c" CreationDate="2011-05-09T13:39:13.013" UserId="6588" Text="To your first point, you'll just need to build a prototype and see. Even if you told us all the details that wouldn't really change things.&#xD;&#xA;&#xD;&#xA;As for the other two points, I kinda feel like you're putting the cart before the horse. From your question it seems like you are new to game development, in which case you really just need to pick a tool and go with it. Nitpicking over the pros and cons of mostly equally useful tools is a distraction from your real challenge: learning game development." />
  <row Id="26292" PostHistoryTypeId="10" PostId="12067" RevisionGUID="d8faf695-68ba-4ca8-8d70-694845e76b9a" CreationDate="2011-05-09T14:16:29.420" UserId="-1" CloseReasonId="4" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="26294" PostHistoryTypeId="2" PostId="12078" RevisionGUID="2b0f225c-c264-4aae-9551-2951626b091d" CreationDate="2011-05-09T14:47:19.247" UserId="395" Text="re #3, Python 2.x will see distributor support for at least another 5-10 years. If you use a fairly recent version (2.7, or possibly 2.6) the migration path is fairly easy if you write future-proofed code (new-style object, unicode everywhere, etc etc). The pain is mostly for things that were relying on old, broken behaviors." />
  <row Id="26295" PostHistoryTypeId="5" PostId="12071" RevisionGUID="99816831-8eaa-4a6d-92c2-47d6b31e1186" CreationDate="2011-05-09T14:59:38.117" UserId="1430" Comment="added 1 characters in body; edited tags; edited title" Text="I am making a Final Fantasy-style battle system.&#xD;&#xA;&#xD;&#xA;I have a random generator that select the monsters move when it is their turn; different moves have different chances to be performed. I also have reactions and conditional actions for the monster to create simulated intelligence... but what I can't figure out is targeting.&#xD;&#xA;&#xD;&#xA;I could just choose randomly between the five player characters, but I was looking for something that would make the game more challenging by adding some kind of strategy to the monsters' actions. &#xD;&#xA;&#xD;&#xA;I code in C++. &#xD;&#xA;&#xD;&#xA;Does anyone have an idea how to implement a system for the monster to choose who to attack besides completely random?" />
  <row Id="26296" PostHistoryTypeId="4" PostId="12071" RevisionGUID="99816831-8eaa-4a6d-92c2-47d6b31e1186" CreationDate="2011-05-09T14:59:38.117" UserId="1430" Comment="added 1 characters in body; edited tags; edited title" Text="Strategies for monster targeting AI in a turn-based combat system" />
  <row Id="26297" PostHistoryTypeId="6" PostId="12071" RevisionGUID="99816831-8eaa-4a6d-92c2-47d6b31e1186" CreationDate="2011-05-09T14:59:38.117" UserId="1430" Comment="added 1 characters in body; edited tags; edited title" Text="&lt;ai&gt;&lt;rpg&gt;&lt;turn-based&gt;" />
  <row Id="26298" PostHistoryTypeId="5" PostId="12065" RevisionGUID="b667fbee-aa7c-45c0-8a77-7dd05951e980" CreationDate="2011-05-09T15:00:42.457" UserId="1430" Comment="added 4 characters in body" Text="I am planning to develop 2D space RPG and i am facing the choice: what is the best language to write it in? My candidates are C++, Java and Python. Obviously, I want to write game in Python because of its expressiveness, speed of development and simplicity of adding scripting support. But I am worried:&#xD;&#xA;&#xD;&#xA; - Won't Python be too slow? The game will be not trivial (like Tetris for example), it may be needed to calculate tasks for thousands of ships in universe (though their AI can be heavily simplified if those ships are not seen to the player). Of course I can write some critical parts in C, but it will instantly complicate building and deploying.&#xD;&#xA; - Let's suppose that game became popular, and I became a superstar. Windows users rarely have Python at all (fortunately we have py2exe). Python on Mac OS X can be outdated and game may crash with obscure exception. Wouldn't it be hard to deploy game in Python?&#xD;&#xA; - Because of lack of libraries for Python 3 I'll have to write game in Python 2. Wouldn't transition to Python 3 in couple of years be too painful and time consuming?" />
  <row Id="26299" PostHistoryTypeId="2" PostId="12079" RevisionGUID="38b642ac-f0d1-48f9-9659-547e78c193f8" CreationDate="2011-05-09T15:08:56.427" UserId="1430" Text="&gt; Won't Python be too slow? The game&#xD;&#xA;&gt; will be not trivial (like Tetris for&#xD;&#xA;&gt; example), it may be needed to&#xD;&#xA;&gt; calculate tasks for thousands of ships&#xD;&#xA;&gt; in universe (though their AI can be&#xD;&#xA;&gt; heavily simplified if those ships are&#xD;&#xA;&gt; not seen to the player). Of course I&#xD;&#xA;&gt; can write some critical parts in C,&#xD;&#xA;&gt; but it will instantly complicate&#xD;&#xA;&gt; building and deploying.&#xD;&#xA;&#xD;&#xA;It's hard to say, but most of the time the limiting factor for performance is one's ability/experience as a developer, not the language. Note that EVE uses Stackless Python (see [here][1] and [here][2] for downloads of a related presentation). I don't recall the exact details, but [apparently most of their server cluster is running Python][3]. I would thus imagine that it could handle your scalability requirements, although prototyping to be sure would be good.&#xD;&#xA;&#xD;&#xA;&gt; Windows users rarely have Python at&#xD;&#xA;&gt; all (fortunately we have py2exe).&#xD;&#xA;&gt; Python on Mac OS X can be outdated and&#xD;&#xA;&gt; game may crash with obscure exception.&#xD;&#xA;&gt; Wouldn't it be hard to deploy game in&#xD;&#xA;&gt; Python?&#xD;&#xA;&#xD;&#xA;Most users rarely have the appropriate binary dependencies for games, regardless of what technology those games were written in (even C requires a runtime component to be distributed). Deploying via py2exe or equivalent, or simply deploying the appropriate dependency, is something of a fact of life. While it's never the easiest thing (most installer technologies are painful), it's doable and shouldn't be a reason to eschew the language -- as I said, you'll likely need to handle something similar regardless.&#xD;&#xA;&#xD;&#xA;&gt; Because of lack of libraries for&#xD;&#xA;&gt; Python 3 I'll have to write game in&#xD;&#xA;&gt; Python 2. Wouldn't transition to&#xD;&#xA;&gt; Python 3 in couple of years be too&#xD;&#xA;&gt; painful and time consuming?&#xD;&#xA;&#xD;&#xA;This I don't know much about, never having really used Python 3. I don't expect Python 2.X will vanish any time soon, however, so I don't even suspect the lifetime of your game would be such that you'd *need* to transition over if you didn't want to, which makes this concern something of a non-issue.&#xD;&#xA;&#xD;&#xA;As others have said, you're worrying too much about the language selection aspect of your project. Python is a powerful, useful tool for developing games and if you know it and like it you should develop with it. It doesn't matter how fast your game runs if it never gets finished because you worried too much about the language.&#xD;&#xA;  [1]: http://zope.stackless.com/Members/rmtew/News%20Archive/newsPyCon2006Pres&#xD;&#xA;  [2]: http://zope.stackless.com/Members/rmtew/News%20Archive/newsPyCon2009Pres&#xD;&#xA;  [3]: http://www.python.org/about/quotes/" />
  <row Id="26300" PostHistoryTypeId="25" PostId="12065" RevisionGUID="6dbc7bd0-fd4d-47ca-ae17-3e942fe03e87" CreationDate="2011-05-09T15:11:35.000" Comment="http://twitter.com/#!/StackGameDev/status/67607651562946560" />
  <row Id="26301" PostHistoryTypeId="2" PostId="12080" RevisionGUID="b4115621-2525-42ff-80dd-b2f2f8075df7" CreationDate="2011-05-09T15:21:24.833" UserId="6465" Text="For some reason I can not find a good example of terrain rendering, as in like &quot;bare bones&quot;. Im reading Introduction to game Programming with DX10, and i've seen some other tutorials....but they all are complicated classes with ALOT of stuff thats unnecessary, and tbh just confuses a beginner like me. Like Raserteks tutorials are awesome, but it's SOO much code and classes, it's very difficult to understand the &quot;3d&quot; part when you have so many other classes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Im just looking for the most BASIC terrain rendering (using a heightmap....or what have you).&#xD;&#xA;&#xD;&#xA;It doesn't even have to have a camera or movement control, hell it can just be of one color. Im just trying to understand everything first. Does anyone know where I could find a sample of this? or heck if anyone would be willing to provide a simple sample of their own i'd be mega appreciative. &#xD;&#xA;&#xD;&#xA;Dont get me wrong, the Book is great.....and I understand the functions, but the way the classes are put together...it makes it confusing of &quot;what goes where&quot;.&#xD;&#xA;&#xD;&#xA;edit: I've seen some Direct X 9 terrain demo's/samples....but isn't DX9 like WAYYY different from DX10 (if so thats why I wouldn't want to waste time on it). I could be wrong though." />
  <row Id="26302" PostHistoryTypeId="1" PostId="12080" RevisionGUID="b4115621-2525-42ff-80dd-b2f2f8075df7" CreationDate="2011-05-09T15:21:24.833" UserId="6465" Text="Simple Terrain Rendering" />
  <row Id="26303" PostHistoryTypeId="3" PostId="12080" RevisionGUID="b4115621-2525-42ff-80dd-b2f2f8075df7" CreationDate="2011-05-09T15:21:24.833" UserId="6465" Text="&lt;terrain-rendering&gt;&lt;directx10&gt;" />
  <row Id="26304" PostHistoryTypeId="2" PostId="12081" RevisionGUID="d6113307-415b-4ebe-84b7-5cf669770c4e" CreationDate="2011-05-09T15:39:52.300" UserId="1430" Text="D3D9 is quite different from an API perspective than D3D10, but the underlying concepts are very similar. Any terrain rendering example in D3D9 ([such as this one][1]) will work fine in D3D10, you'll just have to translate the API calls which shouldn't be that difficult. Similarly, since the techniques for rendering terrain are in no way API-specific, you could even take a look at a tutorial geared for an OpenGL user, [like this one][2]. &#xD;&#xA;&#xD;&#xA;Both of those articles illustrate very basic hieghtmap-based terrain using simple grids.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chadvernon.com/blog/resources/directx9/terrain-generation-with-a-heightmap/&#xD;&#xA;  [2]: http://www.lighthouse3d.com/opengl/terrain/" />
  <row Id="26305" PostHistoryTypeId="2" PostId="12082" RevisionGUID="012636a2-7ad1-493d-ac89-aeb2e33992a4" CreationDate="2011-05-09T15:40:58.827" UserId="5122" Text="The easiest way is to build you own loader that can for example load [.OBJ][1] files or maybe your own format thats custom made for your game. &#xD;&#xA;Blender files however I'm not sure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wavefront_.obj_file" />
  <row Id="26306" PostHistoryTypeId="2" PostId="12083" RevisionGUID="12d560a5-4e36-4d91-8197-b54b2dbc705d" CreationDate="2011-05-09T15:42:44.420" UserId="5275" Text="I'm currently re working an editor got from a tutorial, but I'm having a problem.&#xD;&#xA;&#xD;&#xA;I'm making a call to an associative class for the form, which is supposed to get the original tile value and the set a new value, e.g &#xD;&#xA;&#xD;&#xA;9(the original tile value) &#xD;&#xA;9#5(the new tile value, based off the previous value) &#xD;&#xA;&#xD;&#xA;The trouble I'm having instead of creating the new value it creates this instead &#xD;&#xA;9#5#5#5#5#5#5#5 &#xD;&#xA;&#xD;&#xA;here is how I'm currently calling the functions &#xD;&#xA;&#xD;&#xA;    tileNumber = currentCollisionLayer.GetCellIndex(collideCellX, collideCellY);&#xD;&#xA;    string TileName = tileNumber + &quot;#&quot; + numForm.actualNumber.Text;&#xD;&#xA;    currentCollisionLayer.SetCellIndex(collideCellX, collideCellY, TileName);&#xD;&#xA;&#xD;&#xA;when I call either of the other functions alone it works fine, its only when I try and use them in combination there is an issue &#xD;&#xA;&#xD;&#xA;The class I calling these functions are below, any help with this would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public class CollisionLayer&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;            List&lt;Texture2D&gt; collisionTextures = new List&lt;Texture2D&gt;();&#xD;&#xA;            string[,] map;&#xD;&#xA;    &#xD;&#xA;            public int Width&#xD;&#xA;            {&#xD;&#xA;                get { return map.GetLength(1); }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            public int Height&#xD;&#xA;            {&#xD;&#xA;                get { return map.GetLength(0); }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public CollisionLayer(int width, int height)&#xD;&#xA;            {&#xD;&#xA;                map = new string[height, width];&#xD;&#xA;    &#xD;&#xA;                for (int x = 0; x &lt; width; x++)&#xD;&#xA;                    for (int y = 0; y &lt; height; y++)&#xD;&#xA;                        map[y, x] = &quot;0&quot;;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            #if !XBOX&#xD;&#xA;            public void Save(string filename)&#xD;&#xA;            {&#xD;&#xA;                XmlDocument doc = new XmlDocument();&#xD;&#xA;    &#xD;&#xA;                XmlElement rootElement = doc.CreateElement(&quot;CollisionLayer&quot;);&#xD;&#xA;                doc.AppendChild(rootElement);&#xD;&#xA;    &#xD;&#xA;                XmlElement layoutElement = doc.CreateElement(&quot;Layout&quot;);&#xD;&#xA;    &#xD;&#xA;                string line = string.Empty;&#xD;&#xA;    &#xD;&#xA;                for (int y = 0; y &lt; Height; y++)&#xD;&#xA;                {&#xD;&#xA;                    string formatString = string.Empty;&#xD;&#xA;    &#xD;&#xA;                    for (int x = 0; x &lt; Width; x++)&#xD;&#xA;                    {&#xD;&#xA;                        formatString += map[y, x].ToString() + &quot; &quot;;&#xD;&#xA;                    }&#xD;&#xA;                    if (y == 0)&#xD;&#xA;                        line += System.Environment.NewLine + formatString + '\r' + '\n';&#xD;&#xA;                    else&#xD;&#xA;                        line += formatString + '\r' + '\n';&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                layoutElement.InnerText = line;&#xD;&#xA;    &#xD;&#xA;                XmlAttribute widthAttribute = doc.CreateAttribute(&quot;Width&quot;);&#xD;&#xA;                XmlAttribute heightAttribute = doc.CreateAttribute(&quot;Height&quot;);&#xD;&#xA;    &#xD;&#xA;                widthAttribute.Value = Width.ToString();&#xD;&#xA;                heightAttribute.Value = Height.ToString();&#xD;&#xA;    &#xD;&#xA;                layoutElement.Attributes.Append(widthAttribute);&#xD;&#xA;                layoutElement.Attributes.Append(heightAttribute);&#xD;&#xA;    &#xD;&#xA;                rootElement.AppendChild(layoutElement);&#xD;&#xA;    &#xD;&#xA;                doc.Save(filename);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            #endif&#xD;&#xA;    &#xD;&#xA;            #if !XBOX&#xD;&#xA;    &#xD;&#xA;            public static CollisionLayer FromFile(string filename)&#xD;&#xA;            {&#xD;&#xA;                CollisionLayer tileLayer;&#xD;&#xA;                List&lt;List&lt;int&gt;&gt; tempLayout = new List&lt;List&lt;int&gt;&gt;();&#xD;&#xA;    &#xD;&#xA;                XmlDocument input = new XmlDocument();&#xD;&#xA;    &#xD;&#xA;                input.Load(filename);&#xD;&#xA;    &#xD;&#xA;                int width = 0;&#xD;&#xA;                int height = 0;&#xD;&#xA;    &#xD;&#xA;                tileLayer = new CollisionLayer(width, height);&#xD;&#xA;    &#xD;&#xA;                foreach (XmlNode node in input.DocumentElement.ChildNodes)&#xD;&#xA;                {&#xD;&#xA;                    if (node.Name == &quot;Layout&quot;)&#xD;&#xA;                    {&#xD;&#xA;                        width = int.Parse(node.Attributes[&quot;Width&quot;].Value);&#xD;&#xA;                        height = int.Parse(node.Attributes[&quot;Height&quot;].Value);&#xD;&#xA;    &#xD;&#xA;                        tileLayer = new CollisionLayer(width, height);&#xD;&#xA;    &#xD;&#xA;                        string layout = node.InnerText;&#xD;&#xA;    &#xD;&#xA;                        string[] lines = layout.Split('\r', '\n');&#xD;&#xA;    &#xD;&#xA;                        int row = 0;&#xD;&#xA;    &#xD;&#xA;                        foreach (string line in lines)&#xD;&#xA;                        {&#xD;&#xA;                            string realLine = line.Trim();&#xD;&#xA;    &#xD;&#xA;                            if (string.IsNullOrEmpty(line))&#xD;&#xA;                                continue;&#xD;&#xA;    &#xD;&#xA;                            string[] cells = realLine.Split(' ');&#xD;&#xA;    &#xD;&#xA;                            for (int x = 0; x &lt; width; x++)&#xD;&#xA;                            {&#xD;&#xA;                                string cellIndex = cells[x];&#xD;&#xA;                                tileLayer.SetCellIndex(x, row, cellIndex);&#xD;&#xA;                            }&#xD;&#xA;    &#xD;&#xA;                            row++;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                return tileLayer;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            #endif&#xD;&#xA;    &#xD;&#xA;            public void SetCellIndex(int x, int y, string cellIndex)&#xD;&#xA;            {&#xD;&#xA;                map[y, x] = cellIndex;&#xD;&#xA;            }      &#xD;&#xA;    &#xD;&#xA;            public void SetCellIndex(Point point, string cellIndex)&#xD;&#xA;            {&#xD;&#xA;                map[point.Y, point.X] = cellIndex;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public string GetCellIndex(int x, int y)&#xD;&#xA;            {&#xD;&#xA;                return map[y, x];&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public string GetCellIndex(Point point)&#xD;&#xA;            {&#xD;&#xA;                return map[point.Y, point.X];&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //public void RemoveIndex(string existingIndex)&#xD;&#xA;            //{&#xD;&#xA;            //    for (int x = 0; x &lt; Width; x++)&#xD;&#xA;            //    {&#xD;&#xA;            //        for (int y = 0; y &lt; Height; y++)&#xD;&#xA;            //        {&#xD;&#xA;            //            if (map[y, x] == existingIndex)&#xD;&#xA;            //                map[y, x] = &quot;0&quot;;&#xD;&#xA;            //            else if (map[y, x] &gt; existingIndex)&#xD;&#xA;            //                map[y, x]--;&#xD;&#xA;            //        }&#xD;&#xA;            //    }&#xD;&#xA;            //}&#xD;&#xA;    &#xD;&#xA;            public void ReplaceIndex(string existingIndex, string newIndex)&#xD;&#xA;            {&#xD;&#xA;                for (int x = 0; x &lt; Width; x++)&#xD;&#xA;                    for (int y = 0; y &lt; Height; y++)&#xD;&#xA;                        if (map[y, x] == existingIndex)&#xD;&#xA;                            map[y, x] = newIndex;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;  &#xD;&#xA;     " />
  <row Id="26307" PostHistoryTypeId="1" PostId="12083" RevisionGUID="12d560a5-4e36-4d91-8197-b54b2dbc705d" CreationDate="2011-05-09T15:42:44.420" UserId="5275" Text="Loop writing value error" />
  <row Id="26308" PostHistoryTypeId="3" PostId="12083" RevisionGUID="12d560a5-4e36-4d91-8197-b54b2dbc705d" CreationDate="2011-05-09T15:42:44.420" UserId="5275" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="26309" PostHistoryTypeId="5" PostId="1524" RevisionGUID="66516f2e-721a-493a-9dd7-d5348c094f11" CreationDate="2011-05-09T16:16:32.137" UserId="3588" Comment="This is really the origin question for line-of-sight, but it's second on my list, haha. Also removed the salutation. ♪" Text="I am working on a 2D tile-based game, and right now I'm trying to get a 2d equivalent of shadow volumes to work. I'm having trouble finding the surfaces that should cast shadows. From any point in the game, I need to find either the unoccluded faces, or the whole tile.&#xD;&#xA;&#xD;&#xA;My question is, is how can I find these tiles/edges as fast as possible given a point?&#xD;&#xA;&#xD;&#xA;![Image showing general line of sight and affected tiles][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://imgur.com/ia5xU.png" />
  <row Id="26310" PostHistoryTypeId="6" PostId="1524" RevisionGUID="66516f2e-721a-493a-9dd7-d5348c094f11" CreationDate="2011-05-09T16:16:32.137" UserId="3588" Comment="This is really the origin question for line-of-sight, but it's second on my list, haha. Also removed the salutation. ♪" Text="&lt;2d&gt;&lt;tiles&gt;&lt;line-of-sight&gt;" />
  <row Id="26311" PostHistoryTypeId="24" PostId="1524" RevisionGUID="66516f2e-721a-493a-9dd7-d5348c094f11" CreationDate="2011-05-09T16:16:32.137" Comment="Proposed by 3588 approved by 51 edit id of 419" />
  <row Id="26312" PostHistoryTypeId="4" PostId="6412" RevisionGUID="a0a54223-d7ef-4cfa-8b83-fe138340c217" CreationDate="2011-05-09T16:17:17.457" UserId="741" Comment="Tweaked question title to read properly" Text="Was C++ designed for speed, and is it better to not use high level features when teaming with inexperienced programmers ?" />
  <row Id="26313" PostHistoryTypeId="24" PostId="6412" RevisionGUID="a0a54223-d7ef-4cfa-8b83-fe138340c217" CreationDate="2011-05-09T16:17:17.457" Comment="Proposed by 741 approved by 51 edit id of 415" />
  <row Id="26314" PostHistoryTypeId="5" PostId="11977" RevisionGUID="d5fc24b5-dc96-4064-836e-04a2c7c294ac" CreationDate="2011-05-09T16:17:30.810" UserId="3588" Comment="Added the 2D tag, created the new [line-of-sight] tag for dealing with this kind of problem, made some capitalization and article fixes, and also restructured the title to more organically bring up Unity. ♪" Text="I have a walking NPC that will &quot;see&quot; the wall in front or behind him (2d gameplay) and that will react accordingly.&#xD;&#xA;&#xD;&#xA;I was thinking to attach him to an invisible collider that would react to objects at collision, but I did not manage to do so, a collider seems to always go with a visible mesh.&#xD;&#xA;&#xD;&#xA;How should I implement it, and how can I do it in Unity?" />
  <row Id="26315" PostHistoryTypeId="4" PostId="11977" RevisionGUID="d5fc24b5-dc96-4064-836e-04a2c7c294ac" CreationDate="2011-05-09T16:17:30.810" UserId="3588" Comment="Added the 2D tag, created the new [line-of-sight] tag for dealing with this kind of problem, made some capitalization and article fixes, and also restructured the title to more organically bring up Unity. ♪" Text="Make my NPC &quot;see&quot; gameobjects around him in Unity" />
  <row Id="26316" PostHistoryTypeId="6" PostId="11977" RevisionGUID="d5fc24b5-dc96-4064-836e-04a2c7c294ac" CreationDate="2011-05-09T16:17:30.810" UserId="3588" Comment="Added the 2D tag, created the new [line-of-sight] tag for dealing with this kind of problem, made some capitalization and article fixes, and also restructured the title to more organically bring up Unity. ♪" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;unity&gt;&lt;line-of-sight&gt;" />
  <row Id="26317" PostHistoryTypeId="24" PostId="11977" RevisionGUID="d5fc24b5-dc96-4064-836e-04a2c7c294ac" CreationDate="2011-05-09T16:17:30.810" Comment="Proposed by 3588 approved by 51 edit id of 418" />
  <row Id="26318" PostHistoryTypeId="5" PostId="6957" RevisionGUID="7ca21031-d4f3-4eba-9519-e6770f953739" CreationDate="2011-05-09T16:40:05.193" UserId="3588" Comment="Removing [torque] to keep the tag applying to the Torque engine, not the physics term. Also just a couple article placements. ♪" Text="Given a `body` with an orientation angle and a point of interest or `targetAngle`, is there an elegant solution for keeping the `body` oriented towards the point of interest by applying torque or impulses?&#xD;&#xA;&#xD;&#xA;I have a naive solution working below, but the effect is pretty 'wobbly', it'll overshoot each time, slowly getting closer to the target angle - an undesirable effect in my case.  I'd like to find a solution that is more intelligent - one that can accelerate to near the target angle then decelerate and stop right at the target angle (or within a small range).&#xD;&#xA;&#xD;&#xA;If it helps, I'm using box2d and the `body` is a rectangle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    def gameloop(dt):&#xD;&#xA;        targetAngle = get_target_angle()&#xD;&#xA;        bodyAngle = get_body_angle()&#xD;&#xA;        deltaAngle = targetAngle - bodyAngle&#xD;&#xA;        if deltaAngle &gt; PI:&#xD;&#xA;            deltaAngle = targetAngle - (bodyAngle + 2.0 * PI)&#xD;&#xA;        if deltaAngle &lt; -PI:&#xD;&#xA;            deltaAngle = targetAngle - (bodyAngle - 2.0 * PI)&#xD;&#xA;        # multiply by 2, for stronger reaction&#xD;&#xA;        deltaAngle = deltaAngle * 2.0;&#xD;&#xA;        body.apply_torque(deltaAngle);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One other thing, when body has no linear velocity, the above solution works ok.  But when the body has some linear velocity, the solution above causes really wonky movement.  Not sure why, but would appreciate any hints as to why that might be.&#xD;&#xA;        &#xD;&#xA;        " />
  <row Id="26319" PostHistoryTypeId="6" PostId="6957" RevisionGUID="7ca21031-d4f3-4eba-9519-e6770f953739" CreationDate="2011-05-09T16:40:05.193" UserId="3588" Comment="Removing [torque] to keep the tag applying to the Torque engine, not the physics term. Also just a couple article placements. ♪" Text="&lt;math&gt;&lt;physics&gt;&lt;orientation&gt;" />
  <row Id="26320" PostHistoryTypeId="24" PostId="6957" RevisionGUID="7ca21031-d4f3-4eba-9519-e6770f953739" CreationDate="2011-05-09T16:40:05.193" Comment="Proposed by 3588 approved by 14 edit id of 416" />
  <row Id="26321" PostHistoryTypeId="6" PostId="178" RevisionGUID="f3226966-53ba-4d16-88a5-8f203cd42355" CreationDate="2011-05-09T16:40:09.560" UserId="3588" Comment="Removing the torque tag. Those parentheses at the end strike me as very unnecessary, but not finding a better way to incorporate that data so I'll hold off on that one myself." Text="&lt;physics&gt;&lt;orientation&gt;" />
  <row Id="26322" PostHistoryTypeId="24" PostId="178" RevisionGUID="f3226966-53ba-4d16-88a5-8f203cd42355" CreationDate="2011-05-09T16:40:09.560" Comment="Proposed by 3588 approved by 14 edit id of 417" />
  <row Id="26327" PostHistoryTypeId="5" PostId="12074" RevisionGUID="18f17f86-6e63-441a-bd16-b3d99f379826" CreationDate="2011-05-09T16:58:30.683" UserId="259" Comment="added concrete examples of behaviours" Text="My [answer from this question][1] would fit here.&#xD;&#xA;&#xD;&#xA;To adapt for your problem: A monster would look to assign a score to each enemy. Pass the enemy to each of a collection of behaviour classes, which each return an integer score. Add all these scores together, and assign the final score to the enemy. Attack the enemy with the highest score.&#xD;&#xA;&#xD;&#xA;This has the scope for different monsters having different behaviours, evaluating targets in different ways, and the personality extension I mentioned in the other answer could be modified at run time to alter target choice based on the monster's situation: maybe he becomes more aggressive as his health lowers? &#xD;&#xA;&#xD;&#xA;From chaos' answer, you could keep a sticky target by remembering the score of the last target, and any new target would have to beat that score by some extra %.&#xD;&#xA;&#xD;&#xA;Examples of the behaviours might be:&#xD;&#xA;&#xD;&#xA;* defenseless target behaviour: returns high scores for targets that are particularly susceptible to this monster's attacks - eg a mage vulnerable to red magic in a battle with a fire demon.&#xD;&#xA;* weak target behaviour: returns high scores for targets that are close to death&#xD;&#xA;* decapitation behaviour: returns a high score for the player or leader of the group&#xD;&#xA;* splash damage behaviour: if your game is a strategy-style rpg, that can make attacks across various team members, this behaviour could return high scores for targets that affect large numbers of bystanders, eg if a target is in the center of a tight group.&#xD;&#xA;&#xD;&#xA;All of these behaviours are based on snapshots of the current game state, and require no long-term planning and little state on behalf of the monster. &#xD;&#xA;&#xD;&#xA;More ideas: if your monster has multiple attacks, run this whole alg once for each attack, and pick the target/attack pair with the highest score. This was how I made enemy infantry select weapons on one big-budget FPS.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/11048/positive-evaluation-function-territory-ai-help" />
  <row Id="26328" PostHistoryTypeId="2" PostId="12085" RevisionGUID="6d0f982b-0b65-4339-befd-c890c4c5b716" CreationDate="2011-05-09T17:08:21.477" UserId="7192" Text="I need develope simple multiplayers cards game. For example poker game but this is only for study. I develope it in java language.&#xD;&#xA;&#xD;&#xA;How I must mange comunication between server and clients? Can I use socket for this game? Is it right decision?&#xD;&#xA;&#xD;&#xA;Help me please.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="26329" PostHistoryTypeId="1" PostId="12085" RevisionGUID="6d0f982b-0b65-4339-befd-c890c4c5b716" CreationDate="2011-05-09T17:08:21.477" UserId="7192" Text="Developer java multiplayer cards game" />
  <row Id="26330" PostHistoryTypeId="3" PostId="12085" RevisionGUID="6d0f982b-0b65-4339-befd-c890c4c5b716" CreationDate="2011-05-09T17:08:21.477" UserId="7192" Text="&lt;game-design&gt;&lt;java&gt;" />
  <row Id="26332" PostHistoryTypeId="5" PostId="6502" RevisionGUID="60734609-ad42-4d2c-992a-1aceb80ba728" CreationDate="2011-05-09T17:24:53.603" UserId="1198" Comment="deleted 17 characters in body" Text="I'm looking for some references about water simulation, and how to model it's interaction with bodies (like boats, ships, submarines).&#xD;&#xA;&#xD;&#xA;I've found a lot of references on the visual aspects of water (waves, reflection, etc), but very little about how to deal with the way it should interact with bodies. My experience with game development is very limited, and I'm really stuck here.&#xD;&#xA;&#xD;&#xA;Bascally I would like to be able to make the position of a ship variates according to the waves. How can I do this?&#xD;&#xA;&#xD;&#xA;I'm using Panda3D, but hope to hear about techniques and implementations used in any available technology." />
  <row Id="26333" PostHistoryTypeId="5" PostId="12085" RevisionGUID="7cf645af-1b1d-4111-8cf1-db646efa8e2e" CreationDate="2011-05-09T17:39:08.693" UserId="1156" Comment="deleted 50 characters in body; edited tags; edited title" Text="I need to develop a simple multiplayer card game. For example, a poker game; this is only for study. I am going to develop it in Java.&#xD;&#xA;&#xD;&#xA;How I can I manage communication between the server and clients? Can I use sockets for this game?" />
  <row Id="26334" PostHistoryTypeId="4" PostId="12085" RevisionGUID="7cf645af-1b1d-4111-8cf1-db646efa8e2e" CreationDate="2011-05-09T17:39:08.693" UserId="1156" Comment="deleted 50 characters in body; edited tags; edited title" Text="Java multiplayer cards game" />
  <row Id="26335" PostHistoryTypeId="6" PostId="12085" RevisionGUID="7cf645af-1b1d-4111-8cf1-db646efa8e2e" CreationDate="2011-05-09T17:39:08.693" UserId="1156" Comment="deleted 50 characters in body; edited tags; edited title" Text="&lt;java&gt;&lt;network&gt;&lt;card-game&gt;" />
  <row Id="26337" PostHistoryTypeId="25" PostId="12085" RevisionGUID="618ec334-fe6f-404f-a8cd-af74b10e2d0c" CreationDate="2011-05-09T18:11:35.217" Comment="http://twitter.com/#!/StackGameDev/status/67652951056973824" />
  <row Id="26338" PostHistoryTypeId="2" PostId="12086" RevisionGUID="eaf1e47a-c99a-4939-a0e8-6d4cfee272ec" CreationDate="2011-05-09T18:36:26.787" UserId="7159" Text="I am building a simple strategy game, the goal of the game to teach programming basics to kids.&#xD;&#xA;&#xD;&#xA;The concept of the game is simple, there will be a set of colony individuals - different type (resource gathering, fight, defend, scout ..etc).&#xD;&#xA;&#xD;&#xA;I want to build a Campaign mode for this game, simple set of scenarios and missions as beta version.&#xD;&#xA;&#xD;&#xA;As I said, the purpose is to teach programming basics, so player need to code there strategy to play the game, means that each colony individual's behavior will be programmed separately.&#xD;&#xA;&#xD;&#xA;I am thinking of creating a basic syntax for code conditions, commands and actions (custom language), player will simply code individual's behavior by simply grouping these conditions, commands and actions in logical order. An example:&#xD;&#xA;&#xD;&#xA;    if FindEnemy&#xD;&#xA;        if stamina &gt; 0.6&#xD;&#xA;           dobattle;&#xD;&#xA;        else&#xD;&#xA;           returnToNest;&#xD;&#xA;        endif;&#xD;&#xA;    endif;&#xD;&#xA;&#xD;&#xA;My question is that I am building the game using HTML5/CSS3/JS, and wondering I can implement it a client-side library to parse custom language and convert it to animation? or whether there is already built JS library or engine that can do similar requirement?&#xD;&#xA;" />
  <row Id="26339" PostHistoryTypeId="1" PostId="12086" RevisionGUID="eaf1e47a-c99a-4939-a0e8-6d4cfee272ec" CreationDate="2011-05-09T18:36:26.787" UserId="7159" Text="Play game by coding your strategy" />
  <row Id="26340" PostHistoryTypeId="3" PostId="12086" RevisionGUID="eaf1e47a-c99a-4939-a0e8-6d4cfee272ec" CreationDate="2011-05-09T18:36:26.787" UserId="7159" Text="&lt;html5&gt;" />
  <row Id="26341" PostHistoryTypeId="2" PostId="12087" RevisionGUID="1ac3caaf-f1d4-41ec-ad86-a4d4ca43f8b2" CreationDate="2011-05-09T18:47:57.007" UserId="7102" Text="I have a simple game with 20-30 bodies (static, and dynamic)&#xD;&#xA;&#xD;&#xA;If I add some more Dynamic bodies and joints (over 80-90 item), then the Box2D will be very laggy, and a little slow..&#xD;&#xA;&#xD;&#xA;Am I doing something wrong, or this is the limit of JBox2D? If I change to Box2D JNI via java native calls, is will be faster?" />
  <row Id="26342" PostHistoryTypeId="1" PostId="12087" RevisionGUID="1ac3caaf-f1d4-41ec-ad86-a4d4ca43f8b2" CreationDate="2011-05-09T18:47:57.007" UserId="7102" Text="jBox2D become very slow on mobil phone after 80-90 dynamic bodies" />
  <row Id="26343" PostHistoryTypeId="3" PostId="12087" RevisionGUID="1ac3caaf-f1d4-41ec-ad86-a4d4ca43f8b2" CreationDate="2011-05-09T18:47:57.007" UserId="7102" Text="&lt;box2d&gt;" />
  <row Id="26344" PostHistoryTypeId="2" PostId="12088" RevisionGUID="5f95f0c7-1541-457a-bf2d-0c7b57f5860e" CreationDate="2011-05-09T18:48:54.470" UserId="7193" Text="Which book is more a beginner to learn to program in c++ (or GML) and more fun: &quot;Game Maker 8 Cookbook&quot; (available for pre-order), or &quot;The Game Maker's Companion&quot; ?" />
  <row Id="26345" PostHistoryTypeId="1" PostId="12088" RevisionGUID="5f95f0c7-1541-457a-bf2d-0c7b57f5860e" CreationDate="2011-05-09T18:48:54.470" UserId="7193" Text="game maker book for beginner" />
  <row Id="26346" PostHistoryTypeId="3" PostId="12088" RevisionGUID="5f95f0c7-1541-457a-bf2d-0c7b57f5860e" CreationDate="2011-05-09T18:48:54.470" UserId="7193" Text="&lt;programming&gt;&lt;fun&gt;" />
  <row Id="26347" PostHistoryTypeId="2" PostId="12089" RevisionGUID="0989cde3-c956-4333-94cd-9ff7cc88d81f" CreationDate="2011-05-09T19:11:24.080" UserId="2332" Text="If this is for kids, then another option is to use a GUI based alternative. Taking your example as reference:&#xD;&#xA;&#xD;&#xA;    if FindEnemy&#xD;&#xA;        if stamina &gt; 0.6&#xD;&#xA;           dobattle;&#xD;&#xA;        else&#xD;&#xA;           returnToNest;&#xD;&#xA;        endif;&#xD;&#xA;    endif&#xD;&#xA;&#xD;&#xA;Rather than getting them to type out text, you can have blocks (very literally) like so:&#xD;&#xA;&#xD;&#xA; ![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Then you can work out what kind of mechanism you could have to insert an available block into the into the behaviour blocks. This essentially makes up a sort of script, where the users can drag over an IF block and enter a condition. &#xD;&#xA;&#xD;&#xA;This method offers a number of advantages:&#xD;&#xA;&#xD;&#xA; - Much easier to implement than text&#xD;&#xA;   parsing as you don't need to worry&#xD;&#xA;   about syntax errors (which is&#xD;&#xA;   probably more likely to happen with&#xD;&#xA;   first-time programmers).&#xD;&#xA; - You can easily limit the scope of&#xD;&#xA;   your work as the amount of&#xD;&#xA;   functionality you give to the user is&#xD;&#xA;   dependent on what blocks you make&#xD;&#xA;   available.&#xD;&#xA; - It's a much nicer experience for the&#xD;&#xA;   user if they're starting out. Since&#xD;&#xA;   they're scripting a game, they want&#xD;&#xA;   to be able to see the results of&#xD;&#xA;   their efforts as soon as possible,&#xD;&#xA;   there's no need to memorise any APIs&#xD;&#xA;   as all the available functionality is&#xD;&#xA;   laid out in front of them and it's&#xD;&#xA;   their choice.&#xD;&#xA; - You can also help their debugging&#xD;&#xA;   woes before they even compile and run&#xD;&#xA;   by checking there aren't any illegal&#xD;&#xA;   block combinations as soon as you can&#xD;&#xA;   (for example, an ENDIF block when&#xD;&#xA;   there's no opening IF)&#xD;&#xA; - You more or less know what to expect&#xD;&#xA;   from user input. For example a user&#xD;&#xA;   typing in &quot;IF BLAH YES THIS&#xD;&#xA;   SOMETHING!! WOOP1!!1!&quot; would probably&#xD;&#xA;   result in invalid syntax, but let's&#xD;&#xA;   say an IF block had a combo box in it&#xD;&#xA;   to select all possible attributes&#xD;&#xA;   that have conditions (like stamina)&#xD;&#xA;   then you know the input they provide&#xD;&#xA;   is legal.&#xD;&#xA;&#xD;&#xA;I understand that this doesn't completely answer your question regarding text parsing, but I thought I'd suggest another method of doing so that might be a lot easier than a lot of syntax headaches for both the end user and yourself.&#xD;&#xA;&#xD;&#xA;Hope that helps!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/QeqD5.png" />
  <row Id="26348" PostHistoryTypeId="2" PostId="12090" RevisionGUID="5c338a10-b8d0-4f3a-997f-dc4867a8cbcf" CreationDate="2011-05-09T19:18:07.410" UserId="1430" Text="I don't think either of them look all that great, and certainly they don't appear to teach C++ at all (focusing instead entirely on Game Maker and GML, it's internal language). &#xD;&#xA;&#xD;&#xA;&quot;Cookbook&quot; style books tend to be more focused around isolated, individual techniques rather than providing a unifying educational &quot;narrative,&quot; so I would shy away from the &quot;Game Maker 8 Cookbook&quot; entirely if that's what you are looking for.&#xD;&#xA;&#xD;&#xA;Additionally, &quot;The Game Maker's Companion&quot; is a follow-up, so perhaps the first book in the series, [The Game Maker's Apprentice][1] is a better choice overall. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/gp/product/1590596153/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=1430228261&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=1KX034RHR362K7XXBRQ7" />
  <row Id="26349" PostHistoryTypeId="2" PostId="12091" RevisionGUID="9c8e08d7-4bc9-445e-8364-33313db1dee3" CreationDate="2011-05-09T19:23:46.567" UserId="7195" Text="I asked this question on Stack Overflow, and a fellow user suggested I ask it here. So just [check it out](http://stackoverflow.com/questions/5941231/how-to-do-this-in-cocos2d) and be sure to answer HERE, not on Stack Overflow. So, just to confirm, answer my question here, not on Stack Overflow." />
  <row Id="26350" PostHistoryTypeId="1" PostId="12091" RevisionGUID="9c8e08d7-4bc9-445e-8364-33313db1dee3" CreationDate="2011-05-09T19:23:46.567" UserId="7195" Text="Help with with Cocos2d?" />
  <row Id="26351" PostHistoryTypeId="3" PostId="12091" RevisionGUID="9c8e08d7-4bc9-445e-8364-33313db1dee3" CreationDate="2011-05-09T19:23:46.567" UserId="7195" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="26352" PostHistoryTypeId="5" PostId="12032" RevisionGUID="1e4fa10d-9cac-4d8b-be15-400fcf7b2ddf" CreationDate="2011-05-09T20:14:58.963" UserId="3588" Comment="Added the [movement] tag for objects in motion, and then rephrased &quot;giving the effect&quot; to &quot;such as the trajectory&quot;, to better note the kind of simulation aimed for. ♪" Text="What is a good technique to enable an object to move between to points in a nice curved motion?&#xD;&#xA;&#xD;&#xA;The end position could also be in motion, such as the trajectory of a homing missile." />
  <row Id="26353" PostHistoryTypeId="6" PostId="12032" RevisionGUID="1e4fa10d-9cac-4d8b-be15-400fcf7b2ddf" CreationDate="2011-05-09T20:14:58.963" UserId="3588" Comment="Added the [movement] tag for objects in motion, and then rephrased &quot;giving the effect&quot; to &quot;such as the trajectory&quot;, to better note the kind of simulation aimed for. ♪" Text="&lt;xna&gt;&lt;2d&gt;&lt;movement&gt;" />
  <row Id="26354" PostHistoryTypeId="24" PostId="12032" RevisionGUID="1e4fa10d-9cac-4d8b-be15-400fcf7b2ddf" CreationDate="2011-05-09T20:14:58.963" Comment="Proposed by 3588 approved by 14 edit id of 420" />
  <row Id="26355" PostHistoryTypeId="5" PostId="12091" RevisionGUID="1c0bc203-3acf-459d-82f9-0e0dfc38edfd" CreationDate="2011-05-09T20:20:12.630" UserId="51" Comment="added 2754 characters in body; edited tags; edited title" Text="Sorry about the poor question title, it's just that this seems to big for a title. So here's the dirt:&#xD;&#xA;&#xD;&#xA;I am making a game (obviously) and I want the enemies to shoot (not necessarily at the player). I want the shoot method to be in the Enemies file, so as not to clutter up my HelloWorldLayer.m file even more. Here's what I'm using right now:&#xD;&#xA;&#xD;&#xA;HelloWorldLayer.m&#xD;&#xA;&#xD;&#xA;    -(void)addEnemy:(BigAndStrongEnemy *)enemy {&#xD;&#xA;    enemy = nil;&#xD;&#xA;    if((arc4random() % 4) == 3) {&#xD;&#xA;        enemy = [BigAndStrongEnemy enemy];&#xD;&#xA;    } else {&#xD;&#xA;        enemy = [SmallAndFastEnemy enemy];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    if(buffDude.position.y &gt; character.position.y || buffDude.position.y &lt; (character.position.y + 10)) {&#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    int rand = arc4random() % 320;&#xD;&#xA;    &#xD;&#xA;    if((arc4random() % 2 == 1)) {&#xD;&#xA;        [enemy setPosition:ccp(0,rand)];&#xD;&#xA;    }else{&#xD;&#xA;        [enemy setPosition:ccp(480,rand)];&#xD;&#xA;    }&#xD;&#xA;    [self animateEnemy:enemy];&#xD;&#xA;    [self addChild:enemy];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void)animateEnemy:(BigAndStrongEnemy *)enemy2 {&#xD;&#xA;        float randX = arc4random() % 480;&#xD;&#xA;        float randY = arc4random() % 320;&#xD;&#xA;        int rand = arc4random() % 320;&#xD;&#xA;    &#xD;&#xA;    CGPoint moveToPoint = CGPointMake(randX, (randY - rand));&#xD;&#xA;    &#xD;&#xA;    [enemies addObject:enemy2];&#xD;&#xA;    &#xD;&#xA;    action = [CCSequence actions:&#xD;&#xA;              [CCMoveBy actionWithDuration:1 position:ccpMult(ccpNormalize(ccpSub(moveToPoint, enemy2.position)), 75)],&#xD;&#xA;              [CCMoveBy actionWithDuration:3 position:ccp(buffDude.position.x,buffDude.position.y)],&#xD;&#xA;              nil];&#xD;&#xA;    &#xD;&#xA;    CCCallFuncO *a = [CCCallFuncO actionWithTarget:self selector:(@selector(shoot:)) object:enemy2];&#xD;&#xA;    CCSequence *s = [CCSequence actions:action,a, nil];&#xD;&#xA;    &#xD;&#xA;    CCRepeatForever *repeat = [CCRepeatForever actionWithAction:s];&#xD;&#xA;    &#xD;&#xA;    [enemy2 runAction:repeat];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And here's the Shoot info from the Enemies class:&#xD;&#xA;&#xD;&#xA;Enemies.m:&#xD;&#xA;&#xD;&#xA;        -(void)shoot:(id)sender {&#xD;&#xA;        self = (BigAndStrongEnemy *)sender;&#xD;&#xA;        [self shoot];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    -(void)spriteMoveFinished:(id)sender {&#xD;&#xA;        CCSprite *b = (CCSprite *)sender;&#xD;&#xA;        [self removeChild:b cleanup:YES];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void)shoot {&#xD;&#xA;        self = [CCSprite spriteWithFile:@&quot;bigAndStrongEnemy.gif&quot;];&#xD;&#xA;        CCSprite *b = [CCSprite spriteWithFile:@&quot;bullet.gif&quot;];&#xD;&#xA;        b.position = ccp(self.position.x,self.position.y);&#xD;&#xA;        b.tag = 2;&#xD;&#xA;        [self addChild:b];&#xD;&#xA;        [bullets addObject:b];&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    CGSize winSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    &#xD;&#xA;    CGPoint point = CGPointMake((winSize.width - (winSize.width - self.position.x)),0);&#xD;&#xA;    &#xD;&#xA;    [b runAction:[CCSequence actions:&#xD;&#xA;                  [CCMoveBy actionWithDuration:0.5 position:point],&#xD;&#xA;                  [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)],&#xD;&#xA;                  nil]];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Every time the 3 seconds goes by, the app crashes, and goes to the breakpoint in the CCCallFuncO file. I haven't touched it, is the thing. I am completely confused. Any help is greatly appreciated. &#xD;&#xA;" />
  <row Id="26356" PostHistoryTypeId="4" PostId="12091" RevisionGUID="1c0bc203-3acf-459d-82f9-0e0dfc38edfd" CreationDate="2011-05-09T20:20:12.630" UserId="51" Comment="added 2754 characters in body; edited tags; edited title" Text="Crash when using Cocos2d" />
  <row Id="26357" PostHistoryTypeId="6" PostId="12091" RevisionGUID="1c0bc203-3acf-459d-82f9-0e0dfc38edfd" CreationDate="2011-05-09T20:20:12.630" UserId="51" Comment="added 2754 characters in body; edited tags; edited title" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="26358" PostHistoryTypeId="5" PostId="12088" RevisionGUID="fa4c8df6-2e8b-4720-aa32-ad35a9fee949" CreationDate="2011-05-09T20:22:09.447" UserId="51" Comment="deleted 10 characters in body; edited tags" Text="Which book is more a beginner to learn to program in c++ (or GML) and more fun: &quot;Game Maker 8 Cookbook&quot; (available for pre-order), or &quot;The Game Maker's Companion&quot; ?" />
  <row Id="26359" PostHistoryTypeId="6" PostId="12088" RevisionGUID="fa4c8df6-2e8b-4720-aa32-ad35a9fee949" CreationDate="2011-05-09T20:22:09.447" UserId="51" Comment="deleted 10 characters in body; edited tags" Text="&lt;programming&gt;" />
  <row Id="26360" PostHistoryTypeId="2" PostId="12092" RevisionGUID="55b822bd-80fa-47eb-8609-8e5a014966af" CreationDate="2011-05-09T20:29:06.153" UserId="3175" Text="I think your problem comes from multiple collisions.&#xD;&#xA;&#xD;&#xA;Consider three spheres A, B &amp; C.&#xD;&#xA;&#xD;&#xA;A sits there.&#xD;&#xA;&#xD;&#xA;B hits A.  Fine.&#xD;&#xA;&#xD;&#xA;C hits B.  B is nudged into A.  Oops." />
  <row Id="26361" PostHistoryTypeId="2" PostId="12093" RevisionGUID="869fce1a-24e7-4d1e-afb3-d53eb0bd7e3f" CreationDate="2011-05-09T20:30:48.870" UserId="7136" Text="You can take a look at Steering Behaviors, as defined by Craig Reynolds: http://red3d.com/cwr/steer/&#xD;&#xA;&#xD;&#xA;This is often used in AI to have NPCs move toward their target." />
  <row Id="26362" PostHistoryTypeId="2" PostId="12094" RevisionGUID="4cf11b99-54fe-48a7-a74d-9171ee70f0bc" CreationDate="2011-05-09T20:38:14.023" UserId="5401" Text="We are making a small FPS, and want people to be able to play it online and fetch a list of all servers from a master server. We only have experience in C#, and we have already written a master server that tracks all the servers.&#xD;&#xA;&#xD;&#xA;However we realize that we'd have to host it on a windows application server. These are expensive, and making our master server completely reliable and watertight may be a lot of work. Also it seems a waste to have a server out there running windows and our tiny application that only tracks a list of servers...&#xD;&#xA;&#xD;&#xA;Should we make the effort to learn PHP and SQL and make our master server that way? Does anyone know of any master servers written in PHP to get us started?" />
  <row Id="26363" PostHistoryTypeId="1" PostId="12094" RevisionGUID="4cf11b99-54fe-48a7-a74d-9171ee70f0bc" CreationDate="2011-05-09T20:38:14.023" UserId="5401" Text="Best platform for a master server." />
  <row Id="26364" PostHistoryTypeId="3" PostId="12094" RevisionGUID="4cf11b99-54fe-48a7-a74d-9171ee70f0bc" CreationDate="2011-05-09T20:38:14.023" UserId="5401" Text="&lt;c#&gt;&lt;multiplayer&gt;&lt;server&gt;&lt;php&gt;" />
  <row Id="26365" PostHistoryTypeId="2" PostId="12095" RevisionGUID="1dc315c9-5d76-4d57-b805-4cf4910647b0" CreationDate="2011-05-09T20:47:50.287" UserId="6937" Text="This code is taking the collision between two spheres and moving them based on their masses and velocity.&#xD;&#xA;&#xD;&#xA;Here's a really basic illustration to show why there is penetration between a blue ball and a green wall.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;In this example the center of the ball is 5 feet from the edge of the wall. The ball is moving at 1 foot per second and you are running at a framerate of 1 frame per second. At frame 4 there is no penetration, but frame 5 will have penetration. There's no way of knowing that frame 5 will collide so you can't just say stop when it gets to the wall. Instead you check every frame if the ball is partially inside the wall. If it is, move it back by the amount of penetration and apply the reflective velocity. This is how most collision detection algorithms work. The alternative is to check each frame how far you are from colliding in a certain direction. The problem with that is you need to know what direction to check. This would not work in your situation so the route you are taking is the right one.&#xD;&#xA;&#xD;&#xA;The drawback of this approach is the jitteriness that you are probably experiencing. When this script tells a ball to move based on the last collision, then it may be moving to penetrate into another ball, which will then send the ball back to collide with the first. Making it jump back and forth. You can modify the mass of the objects to help with this. That will cause them to jump back slightly less drastically, or reduce the speed in which they collide in the first place. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/TmZgo.jpg" />
  <row Id="26366" PostHistoryTypeId="2" PostId="12096" RevisionGUID="2c94e420-def6-4298-9136-6113f1e44a8e" CreationDate="2011-05-09T20:56:56.803" UserId="1430" Text="I would write the server in the language/toolchain you know best, rather than learn a new one for that purpose, especially if you have any concerns about making the server &quot;watertight.&quot; You're more likely to make mistakes with technology you are unfamiliar with. Unless the cost is prohibitively more to run a Windows server, I would stick with that platform.&#xD;&#xA;&#xD;&#xA;However, you may also be able to find hosting providers that will run *nix servers with [mono][1] available, so you can run your master server that way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Main_Page" />
  <row Id="26367" PostHistoryTypeId="2" PostId="12097" RevisionGUID="4571de50-62a9-427c-bd3c-d62d193eaaaf" CreationDate="2011-05-09T21:08:12.267" UserId="4410" Text="I'd recommend either using the debugger (to set a breakpoint on the 'set' function) or add some debug output (in the 'set' function and a few other places), to see what's going on. To get '9#5#5#5#5#5#5#5' the three lines of code you have to modify the existing value (and add on '#' plus the new value) must be getting called 7 times.&#xD;&#xA;&#xD;&#xA;The debugger should be the easiest method of finding out what's going on." />
  <row Id="26368" PostHistoryTypeId="25" PostId="12086" RevisionGUID="414efd87-af34-456e-ba42-16105b94c5ac" CreationDate="2011-05-09T21:11:36.087" Comment="http://twitter.com/#!/StackGameDev/status/67698252748820480" />
  <row Id="26369" PostHistoryTypeId="2" PostId="12098" RevisionGUID="22a95269-73df-4d5a-8a30-36d23becee2a" CreationDate="2011-05-09T21:13:16.180" UserId="5259" Text="You might find [this][1] article to be of particular value.&#xD;&#xA;&#xD;&#xA;Long story short, you can get an Amazon server set up running *nix and Mono, and so have a cheap C# server to do your server stuff.&#xD;&#xA;&#xD;&#xA;If you are just doing a master server list, this shouldn't be too hard--hell, even just a servers.txt that gets polled might do it for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://altdevblogaday.org/2011/05/08/hosting-a-game-server-on-aws/" />
  <row Id="26370" PostHistoryTypeId="2" PostId="12099" RevisionGUID="30443f36-0f78-488a-9f2e-292bc892b293" CreationDate="2011-05-09T21:27:24.090" UserId="2845" Text="This could work, however `WebWorker`s follow the [observer pattern][1], the `document` (html page that owns the worker) can only listen and post messages to/from a worker. From that, there's a few options, I guess. In all cases I think you will need to find someway to determine the optimal FPS of the user agent in order to optimize the information. Then you could either:&#xD;&#xA;&#xD;&#xA; * Tell the workers to post messages at those time intervals&#xD;&#xA;  * Downside(s?): you have to assume that the `document` will be ready for the response when it happens.&#xD;&#xA; * Tell the `document` to send a message to the worker requesting physics at time interval `x`, then the worker would post a response (hopefully) shortly after that.&#xD;&#xA;  * Downside(s?): since all posts and responses are asyncronous, there may be delays between the request and response from the worker. In this case you would also have to null out the `onmessage` event to prevent your `document` from listening when it doesn't expect to be.&#xD;&#xA;&#xD;&#xA;I'm sure there's other things I missed or ways to handle communications as well. I'll be looking forward to other answers on the subject myself!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Observer_pattern" />
  <row Id="26371" PostHistoryTypeId="2" PostId="12100" RevisionGUID="2ffa9381-df4d-45c3-902b-a62876c41b79" CreationDate="2011-05-09T21:45:40.280" UserId="5259" Text="You may find [JAGaToo][1] to be useful. It has loaders for MD2/3/5, OBJ, and some other model formats.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/jagatoo/" />
  <row Id="26372" PostHistoryTypeId="2" PostId="12101" RevisionGUID="d31d1ae4-e5b6-46a6-93d6-70a189de7e04" CreationDate="2011-05-09T23:15:18.473" UserId="7191" Text="I created a game in game maker long ago, and was frustrated with the lack of control over many of the game elements. They try to take the programming out of game making. So I'm afraid you won't find game maker to be much help if you're trying to learn c++.&#xD;&#xA;I would recommend going with &lt;a href=&quot;http://www.amazon.com/gp/product/1435457420/ref=as_li_tf_tl?ie=UTF8&amp;tag=byte56-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399349&amp;creativeASIN=1435457420&quot;&gt;Beginning C++ Through Game Programming, Third Edition&lt;/a&gt; if you want to achieve your intended goal." />
  <row Id="26373" PostHistoryTypeId="5" PostId="12101" RevisionGUID="10378789-455a-4baf-86a3-1f8dfa4a42e5" CreationDate="2011-05-09T23:32:54.447" UserId="7191" Comment="added 34 characters in body; edited body" Text="I created a game in Game Maker long ago, and was frustrated with the lack of control over many of the game elements. They try to take the programming out of game making. So I'm afraid you won't find Game Maker to be much help if you're trying to learn C++, or really programming in general.&#xD;&#xA;I would recommend going with &lt;a href=&quot;http://www.amazon.com/gp/product/1435457420/ref=as_li_tf_tl?ie=UTF8&amp;tag=byte56-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399349&amp;creativeASIN=1435457420&quot;&gt;Beginning C++ Through Game Programming, Third Edition&lt;/a&gt; if you want to achieve your intended goal." />
  <row Id="26374" PostHistoryTypeId="2" PostId="12102" RevisionGUID="406fa777-93a1-4888-a1b0-4065a3a57d03" CreationDate="2011-05-09T23:44:04.057" UserId="7191" Text="Yep, sockets would work just fine. There's a great tutorial using Java, that not only shows you how to use the sockets, but also teaches you about the underlying fundamentals. The tutorial can be found here: &#xD;&#xA;&#xD;&#xA;[http://www.gamasutra.com/view/feature/3218/java_network_game_programming.php][1]&#xD;&#xA;&#xD;&#xA;Make sure you look at all 3 of the tutorial.&#xD;&#xA;&#xD;&#xA;And the entire source code for the tutorial is found here:&#xD;&#xA;&#xD;&#xA;[http://www.gamasutra.com/features/19970812/netcon4.zip][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3218/java_network_game_programming.php&#xD;&#xA;  [2]: http://www.gamasutra.com/features/19970812/netcon4.zip" />
  <row Id="26375" PostHistoryTypeId="2" PostId="12103" RevisionGUID="871bb3c5-ee9c-430f-86de-f46185a7a350" CreationDate="2011-05-09T23:52:44.900" UserId="891" Text="So typically **Havok** works best with normal human sized objects with a gravity of **9.8m/s^2** and dealing with everything in meters.&#xD;&#xA;&#xD;&#xA;In my Game though there will be a large variety of scales **from millimeter sized objects to meter sized objects**.&#xD;&#xA;&#xD;&#xA;Typically this rules out running a standard Havok setup and dealing with things in a meter scale.&#xD;&#xA;&#xD;&#xA;Would it be best to increase everything by 10x or some scalar like this and increase gravity likewise?&#xD;&#xA;&#xD;&#xA;I understand this would also decrease how far objects can be away from the origin but for the sake of this question assume everything is relatively close to the origin, a hundred meters max.&#xD;&#xA;&#xD;&#xA;**Issues of concern**&#xD;&#xA;&#xD;&#xA;Object penetration - Havok usually allows some object penetration in the 2-3cm range in the meter scale.&#xD;&#xA;&#xD;&#xA;Floating point precision - Issues dealing with distances of objects etc, typically physics breaks down at the kilometer scale in Havok.&#xD;&#xA;&#xD;&#xA;Unseen - other unseen issues that may result with such large differences in scale.&#xD;&#xA;" />
  <row Id="26376" PostHistoryTypeId="1" PostId="12103" RevisionGUID="871bb3c5-ee9c-430f-86de-f46185a7a350" CreationDate="2011-05-09T23:52:44.900" UserId="891" Text="Havok physics with a wide range of object scales" />
  <row Id="26377" PostHistoryTypeId="3" PostId="12103" RevisionGUID="871bb3c5-ee9c-430f-86de-f46185a7a350" CreationDate="2011-05-09T23:52:44.900" UserId="891" Text="&lt;physics&gt;&lt;physics-engine&gt;&lt;havok&gt;" />
  <row Id="26378" PostHistoryTypeId="2" PostId="12104" RevisionGUID="9675f4c3-eda7-416e-a4c0-09bf3426af54" CreationDate="2011-05-10T00:05:35.210" UserId="7191" Text="Since it looks like the only place you're adding a `#` to your string is in the lines you say you're using to call the functions in your class, I'd say the issue isn't in your class functions.&#xD;&#xA;&#xD;&#xA;`string TileName = tileNumber + &quot;#&quot; + numForm.actualNumber.Text;`&#xD;&#xA;&#xD;&#xA;The line above is getting called more than you want it to. The previous answer is excellent, use your debugger and place a break point on the line I mentioned above. I imagine you'll find that it's your problem. [This site][1] should give you basic debugging skills if you're not sure how to use the Visual Studio debugger.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.dotnetperls.com/debugging" />
  <row Id="26379" PostHistoryTypeId="2" PostId="12105" RevisionGUID="e5ff2a30-85cd-45d0-8b04-188585e487d9" CreationDate="2011-05-10T00:10:48.657" UserId="7200" Text="Is Unity3 (free) + dev account sufficient to get an app on the MAC app store? Or, do I require the pro version? " />
  <row Id="26380" PostHistoryTypeId="1" PostId="12105" RevisionGUID="e5ff2a30-85cd-45d0-8b04-188585e487d9" CreationDate="2011-05-10T00:10:48.657" UserId="7200" Text="Is Unity3D (free) sufficient to publish to the Mac App Store?" />
  <row Id="26381" PostHistoryTypeId="3" PostId="12105" RevisionGUID="e5ff2a30-85cd-45d0-8b04-188585e487d9" CreationDate="2011-05-10T00:10:48.657" UserId="7200" Text="&lt;unity&gt;" />
  <row Id="26382" PostHistoryTypeId="25" PostId="12094" RevisionGUID="75dfb868-dd67-43ee-b216-d61cd0ba73be" CreationDate="2011-05-10T00:11:36.567" Comment="http://twitter.com/#!/StackGameDev/status/67743553304014848" />
  <row Id="26383" PostHistoryTypeId="2" PostId="12106" RevisionGUID="a72edba2-6599-4bc0-92a1-785e14ec2d3c" CreationDate="2011-05-10T00:38:47.167" UserId="7201" Text="I've looked through Google and none of the solutions seem to pinpoint my idea. Ultimately, I want to create a level editor where I can draw lines and have them exported to a file for my engine to read. I'm having trouble getting path-rectangle to work. I'm using this in the context of a platformer, so I'm also interested in knowing which direction and distance the collision came from so I can resolve it. Which is the best algorithm for doing this? I'm only concerned about axis aligned rectangles. " />
  <row Id="26384" PostHistoryTypeId="1" PostId="12106" RevisionGUID="a72edba2-6599-4bc0-92a1-785e14ec2d3c" CreationDate="2011-05-10T00:38:47.167" UserId="7201" Text="Path-Rectangle Collision Detection and Response" />
  <row Id="26385" PostHistoryTypeId="3" PostId="12106" RevisionGUID="a72edba2-6599-4bc0-92a1-785e14ec2d3c" CreationDate="2011-05-10T00:38:47.167" UserId="7201" Text="&lt;collision-detection&gt;" />
  <row Id="26386" PostHistoryTypeId="2" PostId="12107" RevisionGUID="16de04c8-7fb1-4ddc-bbc8-8b8c755ed54f" CreationDate="2011-05-10T00:40:55.933" UserId="7150" Text="Here is one suggest that I've seen that I thought was pretty good...&#xD;&#xA;&#xD;&#xA;[http://www.realityprime.com/articles/scenegraphs-past-present-and-future][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realityprime.com/articles/scenegraphs-past-present-and-future&#xD;&#xA;&#xD;&#xA;-Chenz" />
  <row Id="26388" PostHistoryTypeId="5" PostId="12087" RevisionGUID="f21673d5-0247-4308-9d98-c1edc68723f9" CreationDate="2011-05-10T00:42:42.890" UserId="891" Comment="Fixed grammatical errors." Text="I have a simple game with 20-30 physics bodies (static, and dynamic)&#xD;&#xA;&#xD;&#xA;If I add some additional Dynamic bodies and joints (over 80-90 item), then JBox2D will become very laggy, and a little slow.&#xD;&#xA;&#xD;&#xA;Am I doing something wrong, or is this the limit of JBox2D? If I change to Box2D JNI via java native calls, will it be faster?" />
  <row Id="26389" PostHistoryTypeId="4" PostId="12087" RevisionGUID="f21673d5-0247-4308-9d98-c1edc68723f9" CreationDate="2011-05-10T00:42:42.890" UserId="891" Comment="Fixed grammatical errors." Text="JBox2D becomes very slow on mobile phones after 80-90 dynamic and static bodies" />
  <row Id="26390" PostHistoryTypeId="24" PostId="12087" RevisionGUID="f21673d5-0247-4308-9d98-c1edc68723f9" CreationDate="2011-05-10T00:42:42.890" Comment="Proposed by 891 approved by 51 edit id of 421" />
  <row Id="26391" PostHistoryTypeId="2" PostId="12109" RevisionGUID="c3d35cdf-e4e5-4070-ae1f-b48dddfb820d" CreationDate="2011-05-10T00:45:02.390" UserId="51" Text="It should be fine.  You'll have to do some command line stuff to get it to sign appropriately regardless of pro or free, and that's all documented here: http://technology.blurst.com/unity-games-and-mac-app-store/" />
  <row Id="26393" PostHistoryTypeId="5" PostId="12106" RevisionGUID="7d573720-9f9a-4abf-a9fa-f6f461a8f1d3" CreationDate="2011-05-10T02:09:32.893" UserId="7201" Comment="added 203 characters in body" Text="I've looked through Google and none of the solutions seem to pinpoint my idea. Ultimately, I want to create a level editor where I can draw lines and have them exported to a file for my engine to read. I'm having trouble getting path-rectangle to work. I'm using this in the context of a platformer, so I'm also interested in knowing which direction and distance the collision came from so I can resolve it. Which is the best algorithm for doing this? I'm only concerned about axis aligned rectangles. &#xD;&#xA;&#xD;&#xA;EDIT: My character is represented as a rectangle and the level is represented by lines. The tools really do not matter as I'm looking for the mathematics behind it, not necessarily an implementation." />
  <row Id="26394" PostHistoryTypeId="2" PostId="12110" RevisionGUID="e309be54-d49a-438c-84b0-bd96d63c0f50" CreationDate="2011-05-10T03:06:13.990" UserId="5021" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;." />
  <row Id="26395" PostHistoryTypeId="25" PostId="12105" RevisionGUID="e78cb89d-b5d6-4bb9-927e-0fd0194e3ffa" CreationDate="2011-05-10T03:11:37.030" Comment="http://twitter.com/#!/StackGameDev/status/67788852621877248" />
  <row Id="26396" PostHistoryTypeId="5" PostId="12110" RevisionGUID="4474a975-27d2-4078-960c-c59ca60ac2b2" CreationDate="2011-05-10T03:14:31.947" UserId="5021" Comment="added 1103 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments." />
  <row Id="26397" PostHistoryTypeId="5" PostId="12110" RevisionGUID="ddef05f9-17dd-4ae4-a24a-5821c06c9a96" CreationDate="2011-05-10T03:28:11.833" UserId="5021" Comment="added 69 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments." />
  <row Id="26398" PostHistoryTypeId="5" PostId="12110" RevisionGUID="33dc945e-e725-4536-ad82-162af6ef37df" CreationDate="2011-05-10T03:38:57.107" UserId="5021" Comment="added 1160 characters in body; deleted 3 characters in body; added 70 characters in body; deleted 166 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For axis aligned level lines vs AABB player:&#xD;&#xA;&#xD;&#xA;Each line segment of your level is made up of a Y value (the height of the line on the screen) and two X values (the left and right extents of the line). Say these lines are stored in an array called lines[]. A line is a struct/class that stores X1, X2, Y.&#xD;&#xA;&#xD;&#xA;Your AABB player is represented by two points, bottom left and top right (call them bottom_left and top_right).&#xD;&#xA;&#xD;&#xA;C-like pseudo code:&#xD;&#xA;&#xD;&#xA;    bool test_line_intersection(lines, bottom_left, top_right){&#xD;&#xA;&#xD;&#xA;        if(bottom_right.X &lt; lines[0].X){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.X &gt; lines[0].X){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.Y &lt; lines[0].Y &amp;&amp; top_right.Y &gt; lines[0].Y){&#xD;&#xA;            // bottom of player is below line 0, and player is intersecting line&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // player is not intersecting line.&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="26399" PostHistoryTypeId="5" PostId="12110" RevisionGUID="1bde49aa-cc4f-4acf-a518-fe364347e12d" CreationDate="2011-05-10T03:44:45.140" UserId="5021" Comment="deleted 70 characters in body; added 78 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For axis aligned level lines vs AABB player:&#xD;&#xA;&#xD;&#xA;Each line segment of your level is made up of a Y value (the height of the line on the screen) and two X values (the left and right extents of the line). A line is a struct/class that stores X1, X2, Y.&#xD;&#xA;&#xD;&#xA;Your AABB player is represented by two points, bottom left and top right (call them bottom_left and top_right).&#xD;&#xA;&#xD;&#xA;C-like pseudo code:&#xD;&#xA;&#xD;&#xA;    bool test_line_intersection(line, bottom_left, top_right, out intersect_amount){&#xD;&#xA;&#xD;&#xA;        if(bottom_right.X &lt; line.X1){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.X &gt; line.X2){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.Y &lt; line.Y &amp;&amp; top_right.Y &gt; line.Y){&#xD;&#xA;            // bottom of player is below line 0, and player is intersecting line&#xD;&#xA;            intersect_amount = bottom_left.Y - line.Y;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // player is not intersecting line.&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="26400" PostHistoryTypeId="5" PostId="12110" RevisionGUID="2f752618-b918-4ac6-bafc-4d45589ca622" CreationDate="2011-05-10T03:50:53.377" UserId="5021" Comment="added 182 characters in body; added 1 characters in body; added 15 characters in body; added 31 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For axis aligned level lines vs AABB player:&#xD;&#xA;&#xD;&#xA;Each line segment of your level is made up of a Y value (the height of the line on the screen) and two X values (the left and right extents of the line). A line is a struct/class that stores X1, X2, Y.&#xD;&#xA;&#xD;&#xA;Your AABB player is represented by two points, bottom left and top right (call them bottom_left and top_right).&#xD;&#xA;&#xD;&#xA;C# code:&#xD;&#xA;&#xD;&#xA;    bool test_line_intersection(Line line, Vector2 bottom_left, Vector2 top_right, out float intersect_amount){&#xD;&#xA;        intersect_amount = 0;&#xD;&#xA;&#xD;&#xA;        if(bottom_right.X &lt; line.X1){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.X &gt; line.X2){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.Y &lt; line.Y &amp;&amp; top_right.Y &gt; line.Y){&#xD;&#xA;            // bottom of player is below line 0, and player is intersecting line&#xD;&#xA;            intersect_amount = line.Y - bottom_left.Y;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // player is not intersecting line.&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If this function returns true then there is an intersection. In that case, add intersect_amount to the player position, and the player will no longer be intersecting with the line." />
  <row Id="26401" PostHistoryTypeId="5" PostId="12110" RevisionGUID="0848ab19-ab46-4d8c-8e8a-0f9b5299b7fd" CreationDate="2011-05-10T03:56:22.783" UserId="5021" Comment="added 14 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For axis aligned level lines vs AABB player:&#xD;&#xA;&#xD;&#xA;Each line segment of your level is made up of a Y value (the height of the line on the screen) and two X values (the left and right extents of the line). A line is a struct/class that stores X1, X2, Y.&#xD;&#xA;&#xD;&#xA;Your AABB player is represented by two points, bottom left and top right (call them bottom_left and top_right).&#xD;&#xA;&#xD;&#xA;C# code:&#xD;&#xA;&#xD;&#xA;    bool test_line_intersection(Line line, Vector2 bottom_left, &#xD;&#xA;            Vector2 top_right, out float intersect_amount){&#xD;&#xA;        intersect_amount = 0;&#xD;&#xA;&#xD;&#xA;        if(bottom_right.X &lt; line.X1){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.X &gt; line.X2){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.Y &lt; line.Y &amp;&amp; top_right.Y &gt; line.Y){&#xD;&#xA;            // bottom of player is below line 0, and player is intersecting line&#xD;&#xA;            intersect_amount = line.Y - bottom_left.Y;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // player is not intersecting line.&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If this function returns true then there is an intersection. In that case, add intersect_amount to the player position, and the player will no longer be intersecting with the line." />
  <row Id="26402" PostHistoryTypeId="5" PostId="12110" RevisionGUID="d1dd89e9-8456-4619-81a4-52554246f5d6" CreationDate="2011-05-10T04:14:01.737" UserId="5021" Comment="deleted 3 characters in body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For axis aligned level lines vs AABB player:&#xD;&#xA;&#xD;&#xA;Each line segment of your level is made up of a Y value (the height of the line on the screen) and two X values (the left and right extents of the line). A line is a struct/class that stores X1, X2, Y.&#xD;&#xA;&#xD;&#xA;Your AABB player is represented by two points, bottom left and top right (call them bottom_left and top_right).&#xD;&#xA;&#xD;&#xA;C# code:&#xD;&#xA;&#xD;&#xA;    bool test_line_intersection(Line line, Vector2 bottom_left, &#xD;&#xA;            Vector2 top_right, out float intersect_amount){&#xD;&#xA;        intersect_amount = 0;&#xD;&#xA;&#xD;&#xA;        if(top_right.X &lt; line.X1){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.X &gt; line.X2){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.Y &lt; line.Y &amp;&amp; top_right.Y &gt; line.Y){&#xD;&#xA;            // bottom of player is below line 0, and player is intersecting line&#xD;&#xA;            intersect_amount = line.Y - bottom_left.Y;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // player is not intersecting line.&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If this function returns true then there is an intersection. In that case, add intersect_amount to the player position, and the player will no longer be intersecting with the line." />
  <row Id="26403" PostHistoryTypeId="2" PostId="12111" RevisionGUID="a4d26c05-5218-4189-9cd7-5e8f1daf7cb8" CreationDate="2011-05-10T05:26:29.763" UserId="721" Text="Response for Android devices. Jbox2D is so bad... Since NDK is available, i use it with native Box2D. January 2010, there was a 3X factor without garbage collector lags. There is many NDK ports as in [libGDX][1]&#xD;&#xA;&#xD;&#xA;note: With 2.3 devices, the new GC fixes lags...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://libgdx.badlogicgames.com/" />
  <row Id="26404" PostHistoryTypeId="25" PostId="12080" RevisionGUID="ef347bbe-6933-432d-997e-85d18aebf088" CreationDate="2011-05-10T06:11:37.483" Comment="http://twitter.com/#!/StackGameDev/status/67834153625853952" />
  <row Id="26405" PostHistoryTypeId="2" PostId="12112" RevisionGUID="6a3e872a-8d1d-4bea-baea-8fd1a2a3a37c" CreationDate="2011-05-10T06:52:46.777" UserId="7001" Text="Hai&#xD;&#xA;&#xD;&#xA;      Am a new android game developer and am having a very less knowledge about game development and all . Whats the plan in my mind is to create a game just like Farmville&#xD;&#xA;and i heard that tile map is the method used to code this game but i dont have support from others so i request u all to help me if u can .If possible plz tell me how can i create such a game using eclipse and android SDK if possible let me know if their is any game engine that can be a support to my game and how to use it too. I refereed cocos2d android but its very complicated for a starter point of view. " />
  <row Id="26406" PostHistoryTypeId="1" PostId="12112" RevisionGUID="6a3e872a-8d1d-4bea-baea-8fd1a2a3a37c" CreationDate="2011-05-10T06:52:46.777" UserId="7001" Text="Tile map using in game development" />
  <row Id="26407" PostHistoryTypeId="3" PostId="12112" RevisionGUID="6a3e872a-8d1d-4bea-baea-8fd1a2a3a37c" CreationDate="2011-05-10T06:52:46.777" UserId="7001" Text="&lt;tiles&gt;" />
  <row Id="26409" PostHistoryTypeId="5" PostId="12112" RevisionGUID="df476b62-e921-4250-936e-704cd3a4b447" CreationDate="2011-05-10T07:18:58.767" UserId="20" Comment="spelling, formatting changed" Text="I am a new Android game developer and I have only a limited knowledge about game development and all. I'd like to create a game just like Farmville&#xD;&#xA;and I heard that tile map is the method used to code this game but I dont have support from others so I request you all to help me if you can. Please tell me how I could create such a game using eclipse and android SDK and let me know if there is any game engine that can be a support to my game and how to use it too. I looked at cocos2d android but its very complicated for a starter point of view. " />
  <row Id="26410" PostHistoryTypeId="5" PostId="1668" RevisionGUID="6b471117-c028-4393-9156-719482f59c28" CreationDate="2011-05-10T07:35:21.533" UserId="2050" Comment="Fixed a typo" Text="There's another option - decouple Game update and physics update. Trying to tailor the physics engine to the game timestep leads to problem if you fix your timestep (the problem of spinning out of control because integration needs more timesteps which take more time which needs more timesteps), or make it variable and get wonky physics.&#xD;&#xA;&#xD;&#xA;The solution that I see a lot is to have the physics run on a fixed timestep, in a different thread (on a different core). The game interpolates or extrapolates given the two most recent valid frames it can grab. Interpolation adds some lag, extrapolation adds some uncertainty, but your physics will be stable and not spin your timestep out of control.&#xD;&#xA;&#xD;&#xA;This is not trivial to implement, but might prove itself future proof." />
  <row Id="26411" PostHistoryTypeId="24" PostId="1668" RevisionGUID="6b471117-c028-4393-9156-719482f59c28" CreationDate="2011-05-10T07:35:21.533" Comment="Proposed by 2050 approved by 51 edit id of 422" />
  <row Id="26412" PostHistoryTypeId="5" PostId="12085" RevisionGUID="42e8908f-f908-4da3-8164-883410571f99" CreationDate="2011-05-10T07:37:26.553" UserId="51" Comment="added 173 characters in body" Text="I need to develop a simple multiplayer card game. For example, a poker game; this is only for study. I am going to develop it in Java.&#xD;&#xA;&#xD;&#xA;How I can I manage communication between the server and clients? Can I use sockets for this game?&#xD;&#xA;&#xD;&#xA;Edit: Thanks, I know socket programming. I know the programming socket. I just wanted to know if it was the correct technique for a multiplayer game like online poker.&#xD;&#xA;" />
  <row Id="26414" PostHistoryTypeId="2" PostId="12114" RevisionGUID="74dcef2b-10b7-45ba-b1ee-6d3e4d272b9b" CreationDate="2011-05-10T07:41:04.010" UserId="1868" Text="I found this [experiment][1]. It runs Box2d physics on a web worker. I haven't yet checked in the detail how it gets around issues mentioned in Vincent Scheib's comments.&#xD;&#xA;&#xD;&#xA;  [1]: http://extremelysatisfactorytotalitarianism.com/blog/?p=932" />
  <row Id="26415" PostHistoryTypeId="2" PostId="12115" RevisionGUID="3f7bce4d-418e-4a72-8c95-c20bcfebeefa" CreationDate="2011-05-10T07:47:28.653" UserId="51" Text="This question is very broad.  It would be better if you asked something like &quot;are there any support libraries for tile based games using cocos2d android&quot;.  &#xD;&#xA;&#xD;&#xA;With that question in mind, it *seems* that cocos2d supports the TMX map format.  The &lt;a href=&quot;http://www.mapeditor.org/&quot;&gt;Tiled Map Editor&lt;/a&gt; can export to that format.  There seems to be a tutorial on how to get started &lt;a href=&quot;http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d&quot;&gt;here&lt;/a&gt; (I just did google search).  I realize that it specifically is referring to the iPhone version of cocos2d but I imagine it wouldn't be too hard to adapt over.&#xD;&#xA;" />
  <row Id="26416" PostHistoryTypeId="2" PostId="12116" RevisionGUID="b2fbd7d6-1f26-477b-b970-b34d46bd1b43" CreationDate="2011-05-10T08:02:05.910" UserId="7207" Text="&#xD;&#xA;How would one go about gradually fading a sprite from one color to another?" />
  <row Id="26417" PostHistoryTypeId="1" PostId="12116" RevisionGUID="b2fbd7d6-1f26-477b-b970-b34d46bd1b43" CreationDate="2011-05-10T08:02:05.910" UserId="7207" Text="Fade from one Color to another" />
  <row Id="26418" PostHistoryTypeId="3" PostId="12116" RevisionGUID="b2fbd7d6-1f26-477b-b970-b34d46bd1b43" CreationDate="2011-05-10T08:02:05.910" UserId="7207" Text="&lt;xna&gt;&lt;windows-phone-7&gt;" />
  <row Id="26419" PostHistoryTypeId="2" PostId="12117" RevisionGUID="a1ea53d2-8b84-4ad6-a6ae-498219f1a68c" CreationDate="2011-05-10T08:17:46.847" UserId="1542" Text="I am curious about how storyline-based games are written.&#xD;&#xA;&#xD;&#xA;For example: if the character done Event A, then he meets an NPC and result in Event B.&#xD;&#xA; &#xD;&#xA;On the other hand: if the character didn't do Event A, then he meets an NPC and result in Event C.&#xD;&#xA;&#xD;&#xA;From the code structure that I've thought up, the NPC should be an object of a class, and there should be a status variable that mark if character have done Event A or not.&#xD;&#xA;However, what if there's thousand of similar type of Event as Event A? How'd I handle huge, complex storyline game in coding?&#xD;&#xA;&#xD;&#xA;I just want to know exactly how the trick was done to keep in check of what Events have happened. &#xD;&#xA;&#xD;&#xA;Another thing that I'm curious about is how Event is kept in. An object? or just a function?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;Event A might have some flashy effect played in non-fmv ,while maybe Event B is an fmv, and Event C might be a battle.&#xD;&#xA;&#xD;&#xA;and there may be variety of them. Therefore, how would I handle variety of Events with a consistence method? or maybe, at the very least, contain them in a consistence way (function? or Object?) I just want to know how the trick was done." />
  <row Id="26420" PostHistoryTypeId="1" PostId="12117" RevisionGUID="a1ea53d2-8b84-4ad6-a6ae-498219f1a68c" CreationDate="2011-05-10T08:17:46.847" UserId="1542" Text="What are the code structures for storyline based game?" />
  <row Id="26421" PostHistoryTypeId="3" PostId="12117" RevisionGUID="a1ea53d2-8b84-4ad6-a6ae-498219f1a68c" CreationDate="2011-05-10T08:17:46.847" UserId="1542" Text="&lt;game-design&gt;" />
  <row Id="26422" PostHistoryTypeId="25" PostId="12117" RevisionGUID="b4c67295-f9ab-4603-9b26-060052f60a5d" CreationDate="2011-05-10T09:11:36.777" Comment="http://twitter.com/#!/StackGameDev/status/67879449500188672" />
  <row Id="26423" PostHistoryTypeId="2" PostId="12118" RevisionGUID="6174967e-5cc1-4bc1-a823-f049d1cd8d40" CreationDate="2011-05-10T09:20:52.183" UserId="4559" Text="This question should be tagged with opentk because I use the `OpenTK` library.  &#xD;&#xA;I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;I cannot provide any code now it's just a hobby project at home, and I'm at work now. Any help is appreciated.  &#xD;&#xA;I must warn you that I'm a noob at opengl and graphics in general so probably I am doing something wrong.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26424" PostHistoryTypeId="1" PostId="12118" RevisionGUID="6174967e-5cc1-4bc1-a823-f049d1cd8d40" CreationDate="2011-05-10T09:20:52.183" UserId="4559" Text="OpenTK - How do I use TexSubImage2D to replace a part of the texture" />
  <row Id="26425" PostHistoryTypeId="3" PostId="12118" RevisionGUID="6174967e-5cc1-4bc1-a823-f049d1cd8d40" CreationDate="2011-05-10T09:20:52.183" UserId="4559" Text="&lt;opengl&gt;&lt;c#&gt;" />
  <row Id="26426" PostHistoryTypeId="5" PostId="12059" RevisionGUID="9a833676-cf5a-4c4d-a073-ae2d7530e414" CreationDate="2011-05-10T09:26:51.237" UserId="5021" Comment="added 54 characters in body" Text="The code below is from a Microsoft XNA sample [here][1].&#xD;&#xA;This is quite a simple rigid body simulation that ignores many physical effects (such as angular momentum), but it does try to push objects (spheres) apart so that they are not penetrating one-another.&#xD;&#xA;&#xD;&#xA;However, the simulation allows spheres not only to penetrate, but when many spheres are stacked on top of each other, small spheres can be almost completely inside of larger spheres. If I make all spheres have the same radius and mass, then the simulation performs reasonably well (with minimal interpenetration).&#xD;&#xA;&#xD;&#xA;Can someone explain why there is any interpenetration at all? Since it moves the positions of the spheres, it seems like interpenetration should be impossible.&#xD;&#xA;&#xD;&#xA;For each sphere in the simulation, this method is called on every other sphere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    // Given 2 spheres with velocity, mass and size, evaluate whether&#xD;&#xA;    // a collision occured, and if so, excatly where, and move sphere 2&#xD;&#xA;    // at the contact point with sphere 1, and generate new velocities.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    private void SphereCollisionImplicit(Sphere sphere1, Sphere sphere2)&#xD;&#xA;    {&#xD;&#xA;        const float K_ELASTIC = 0.75f;&#xD;&#xA;    &#xD;&#xA;        Vector3 relativepos = sphere2.Position - sphere1.Position;&#xD;&#xA;        float distance = relativepos.Length();&#xD;&#xA;        float radii = sphere1.Radius + sphere2.Radius;&#xD;&#xA;        if (distance &gt;= radii)&#xD;&#xA;        {&#xD;&#xA;            return; // No collision&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // Add epsilon to avoid NaN.&#xD;&#xA;        distance += 0.000001f;&#xD;&#xA;    &#xD;&#xA;        Vector3 relativeUnit = relativepos * (1.0f / distance);&#xD;&#xA;        Vector3 penetration = relativeUnit * (radii - distance);&#xD;&#xA;    &#xD;&#xA;        // Adjust the spheres' relative positions&#xD;&#xA;        float mass1 = sphere1.Mass;&#xD;&#xA;        float mass2 = sphere2.Mass;&#xD;&#xA;    &#xD;&#xA;        float m_inv = 1.0f / (mass1 + mass2);&#xD;&#xA;        float weight1 = mass1 * m_inv; // relative weight of sphere 1&#xD;&#xA;        float weight2 = mass2 * m_inv; // relative weight of sphere 2. w1+w2==1.0&#xD;&#xA;    &#xD;&#xA;        sphere1.Position -= weight2 * penetration;&#xD;&#xA;        sphere2.Position += weight1 * penetration;&#xD;&#xA;    &#xD;&#xA;        // Adjust the objects’ relative velocities, if they are&#xD;&#xA;        // moving toward each other.&#xD;&#xA;        //&#xD;&#xA;        // Note that we're assuming no friction, or equivalently, no angular momentum.&#xD;&#xA;        //&#xD;&#xA;        // velocityTotal = velocity of v2 in v1 stationary ref. frame&#xD;&#xA;        // get reference frame of common center of mass&#xD;&#xA;        Vector3 velocity1 = sphere1.Velocity;&#xD;&#xA;        Vector3 velocity2 = sphere2.Velocity;&#xD;&#xA;    &#xD;&#xA;        Vector3 velocityTotal = velocity1 * weight1 + velocity2 * weight2;&#xD;&#xA;        Vector3 i2 = (velocity2 - velocityTotal) * mass2;&#xD;&#xA;        if (Vector3.Dot(i2, relativeUnit) &lt; 0)&#xD;&#xA;        {&#xD;&#xA;            // i1+i2 == 0, approx&#xD;&#xA;            Vector3 di = Vector3.Dot(i2, relativeUnit) * relativeUnit;&#xD;&#xA;            i2 -= di * (K_ELASTIC + 1);&#xD;&#xA;            sphere1.Velocity = (-i2) / mass1 + velocityTotal;&#xD;&#xA;            sphere2.Velocity = i2 / mass2 + velocityTotal;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In particular, I though that this:&#xD;&#xA;&#xD;&#xA;    sphere1.Position -= weight2 * penetration;&#xD;&#xA;    sphere2.Position += weight1 * penetration;&#xD;&#xA;&#xD;&#xA;Should completely disallow any interpenetration, why doesn't it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/sample/bounce" />
  <row Id="26427" PostHistoryTypeId="5" PostId="12118" RevisionGUID="b8ab2338-faa8-4d88-a7a6-0dcc6f77108f" CreationDate="2011-05-10T09:40:06.043" UserId="4559" Comment="added 114 characters in body" Text="This question should be tagged with opentk because I use the `OpenTK` library.  &#xD;&#xA;I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is, my guess is that somehow the number of rows/columns to replace are incorrect, at least that is how it looks like. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;I cannot provide any code now it's just a hobby project at home, and I'm at work now. Any help is appreciated.  &#xD;&#xA;I must warn you that I'm a noob at opengl and graphics in general so probably I am doing something wrong.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26428" PostHistoryTypeId="2" PostId="12119" RevisionGUID="c689da44-3e8b-46a0-9dd8-d327a3c8b88c" CreationDate="2011-05-10T09:47:19.800" UserId="288" Text="Use `Color.Lerp` to interpolate between two colours. See the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.color.lerp.aspx&quot;&gt;MSDN documentation&lt;/a&gt;. Pass this as the color to `SpriteBatch.Draw`.&#xD;&#xA;&#xD;&#xA;The arguments to `Color.Lerp` are the two colours you want to fade between, and a fade amount between 0 and 1." />
  <row Id="26429" PostHistoryTypeId="2" PostId="12120" RevisionGUID="604dc765-f4c2-486d-b96f-b3cc4aebadd5" CreationDate="2011-05-10T10:38:57.487" UserId="7210" Text="Use the XCode debugger and do a stack track to see the last line of your code where the crash happened. That should give you a clue on what is causing the error" />
  <row Id="26430" PostHistoryTypeId="5" PostId="12118" RevisionGUID="5b843bcd-99cf-48fb-b1d6-97c456a55999" CreationDate="2011-05-10T10:49:59.543" UserId="4559" Comment="deleted 89 characters in body" Text="This question should be tagged with opentk because I use the `OpenTK` library.  &#xD;&#xA;I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is, my guess is that somehow the number of rows/columns to replace are incorrect, at least that is how it looks like. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. I must warn you that I'm a noob at opengl and graphics in general so probably I am doing something wrong.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26431" PostHistoryTypeId="6" PostId="12118" RevisionGUID="d2a21667-6ab9-4a20-a175-be99bd2f7858" CreationDate="2011-05-10T11:56:30.583" UserId="20" Comment="added opentk tag" Text="&lt;opengl&gt;&lt;c#&gt;&lt;opentk&gt;" />
  <row Id="26432" PostHistoryTypeId="25" PostId="12075" RevisionGUID="8bc7263b-1acd-4fca-b825-981fc8eac0ae" CreationDate="2011-05-10T12:11:37.293" Comment="http://twitter.com/#!/StackGameDev/status/67924749258473472" />
  <row Id="26433" PostHistoryTypeId="2" PostId="12121" RevisionGUID="3b725dbf-7f4b-4e13-9e8f-98bbfb655963" CreationDate="2011-05-10T12:14:27.917" UserId="7035" Text="I'm trying to put together 2D game on Flash ActionScript. Game objects positions are updated by physics library and I'm trying to control them applying forces and updating these forces every frame.  &#xD;&#xA;&#xD;&#xA;Right now I'm pondering how to control a helicopter. I'm using concept of throttle and target height. To make heli float on constant height, I'm applying force of  &#xD;&#xA;&lt;p&gt;F&lt;sub&gt;0&lt;/sub&gt; = -m * g&lt;sub&gt;y&lt;/sub&gt;&lt;/p&gt;  &#xD;&#xA;which negates gravity for it. To make it move up or down, target height is used - it is increased with up key and decreased with down key, then the heli should ascend or descend to it. The problem is **transitional** process - right now the heli misses target height and then oscillates around it.  &#xD;&#xA;&#xD;&#xA;In short: how to control body with forces to make it move from point A to point B and stop there?&#xD;&#xA;Here's how I'm controlling it now:&#xD;&#xA;&#xD;&#xA;		public function update(time:int):void&#xD;&#xA;		{&#xD;&#xA;			lastUpdate = time;&#xD;&#xA;			var deltaY:Number = targetHeight - body.graphic.y;&#xD;&#xA;			throttleMark.y = targetHeight;&#xD;&#xA;            //force for stable floating&#xD;&#xA;			var antigrav:Number = -body.gmass * body.space.gravityy;&#xD;&#xA;            //made-up damping factor&#xD;&#xA;            //   (in fact, too small, but higher scale make heli move very slowly)&#xD;&#xA;			var damping:Number = -body.vy * body.vy * body.vy * 0.5;&#xD;&#xA;			var attraction:Number = deltaY * 1000.0;&#xD;&#xA;			var totalForce:Number = antigrav + attraction + damping;&#xD;&#xA;			body.applyRelativeForce(_strafe, totalForce, 0.0, 0.0);&#xD;&#xA;		}" />
  <row Id="26434" PostHistoryTypeId="1" PostId="12121" RevisionGUID="3b725dbf-7f4b-4e13-9e8f-98bbfb655963" CreationDate="2011-05-10T12:14:27.917" UserId="7035" Text="Controls for physics-enabled game object" />
  <row Id="26435" PostHistoryTypeId="3" PostId="12121" RevisionGUID="3b725dbf-7f4b-4e13-9e8f-98bbfb655963" CreationDate="2011-05-10T12:14:27.917" UserId="7035" Text="&lt;physics&gt;&lt;actionscript&gt;" />
  <row Id="26436" PostHistoryTypeId="2" PostId="12122" RevisionGUID="6046b7c9-df9d-4cd7-957e-b9fbee4c9a55" CreationDate="2011-05-10T12:16:26.917" UserId="4432" Text="Did any one Know about Renderscript in android 3.0&#xD;&#xA;&#xD;&#xA;if you know provide me some good example or demo link&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26437" PostHistoryTypeId="1" PostId="12122" RevisionGUID="6046b7c9-df9d-4cd7-957e-b9fbee4c9a55" CreationDate="2011-05-10T12:16:26.917" UserId="4432" Text="Android Render Script for GameDevelopment" />
  <row Id="26438" PostHistoryTypeId="3" PostId="12122" RevisionGUID="6046b7c9-df9d-4cd7-957e-b9fbee4c9a55" CreationDate="2011-05-10T12:16:26.917" UserId="4432" Text="&lt;android&gt;" />
  <row Id="26439" PostHistoryTypeId="2" PostId="12123" RevisionGUID="5dfbd17f-ad1e-44ad-a3ba-c3880acf867d" CreationDate="2011-05-10T12:30:08.437" UserId="721" Text="Don't use Renderscript for gamedev. It doesn't use GPU today and it is not portable.&#xD;&#xA;libgdx author has tried Renderscript and there is an [interesting debate][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.badlogicgames.com/wordpress/?p=1561" />
  <row Id="26440" PostHistoryTypeId="2" PostId="12124" RevisionGUID="3bdf6335-0458-432d-a3d6-90ff971b4856" CreationDate="2011-05-10T12:42:10.777" UserId="6469" Text="Your question is very similar to mine and I think the answers [here][1] may help you understand.&#xD;&#xA;&#xD;&#xA;Basically you use game states and have the npc run a switch on the current state. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/10533/game-story-event-programming" />
  <row Id="26441" PostHistoryTypeId="2" PostId="12125" RevisionGUID="5dc3762c-0b0a-4b9c-b73e-7c9de068b2c8" CreationDate="2011-05-10T12:48:34.850" UserId="7212" Text="You should read up on [Speculative Contacts][1] for catching when collisions will happen before you end up with this kind of penetration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/ &quot;Speculative Contacts&quot;" />
  <row Id="26446" PostHistoryTypeId="2" PostId="12127" RevisionGUID="b8bdb3b3-f87a-4520-8e4a-5413d51b4417" CreationDate="2011-05-10T13:34:30.333" UserId="7215" Text="Hey, I'm trying to make a mastermind game. I'm having trouble figuring how to design the game board for the guesses. The board must consist of four columns and 8 rows. I'm having trouble figuring out how to go about printing the game board on screen. I know i could use a two dimensional array to store the letters and guesses, but I need to print the game board on the screen as well as the guesses inside the game board.&#xD;&#xA;&#xD;&#xA;I hope this was clear enough, if not i can explain more, I just need help with this game board situation. " />
  <row Id="26447" PostHistoryTypeId="1" PostId="12127" RevisionGUID="b8bdb3b3-f87a-4520-8e4a-5413d51b4417" CreationDate="2011-05-10T13:34:30.333" UserId="7215" Text="Designing a mastermind game" />
  <row Id="26448" PostHistoryTypeId="3" PostId="12127" RevisionGUID="b8bdb3b3-f87a-4520-8e4a-5413d51b4417" CreationDate="2011-05-10T13:34:30.333" UserId="7215" Text="&lt;c++&gt;" />
  <row Id="26449" PostHistoryTypeId="2" PostId="12128" RevisionGUID="a32ee40b-5091-499f-9853-a640536353ac" CreationDate="2011-05-10T13:58:15.210" UserId="5966" Text="I tested *Newton Game Dynamics* and this problem does not happen in there. I recommend using this engine people who experiencing this problem." />
  <row Id="26450" PostHistoryTypeId="2" PostId="12129" RevisionGUID="683fb383-58e7-4647-b71d-2ec32c06090b" CreationDate="2011-05-10T14:09:23.330" UserId="7217" Text="You may want to be more specific.  Do you not know how to draw anything to the screen?&#xD;&#xA;&#xD;&#xA;If so, there are a lot of ways to do it.  Based on the tag, I assume you're using C++.  You could write text in a console window, you could use GDI or GDI+ to draw graphics, or you could use DirectX or OpenGL.  &#xD;&#xA;&#xD;&#xA;I suggest taking a smaller step first.  You can forget the game for a moment and just try to draw something to a screen, like a circle.  Then, for instance, you can use loops to draw more circles and organize it so it does what you want for the game.&#xD;&#xA;&#xD;&#xA;Hope this helps a bit." />
  <row Id="26451" PostHistoryTypeId="2" PostId="12130" RevisionGUID="be785c55-31a1-4499-9fce-d7c288feadc2" CreationDate="2011-05-10T14:22:44.033" UserId="6616" Text="I have published a free game on Android Market called AstroTennis. This is like a classic pong game, but it has an asteroid moving in the middle which deflects the ball making it sometimes harder to defend ones position. It plays against computer or human.&#xD;&#xA;&#xD;&#xA;![AstroTennis android game][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yjnpd.jpg&#xD;&#xA;On the bases of received feedback on the market I can see that some people are not too impressed while some like it (50%).&#xD;&#xA;&#xD;&#xA;The question of course is how two spice up this game so that almost everyone likes it? Since this is a free game and it will stay free, I cannot invest too much in it and develop many levels at the moment, but still I feel that something interesting can be added to it.&#xD;&#xA;If you have an android device then you can check it out easily since it is free.&#xD;&#xA;&#xD;&#xA;If any designer wants to cooperate and produce a more exciting graphics I would be glad to do something together. It has about thousands downloads per week at the moment, hence it could be something on your port-folio, plus you would be credited.&#xD;&#xA;If you are interested send your design before 1st July 2011 to &#xD;&#xA;support (at) lumisvision.co.uk&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26452" PostHistoryTypeId="1" PostId="12130" RevisionGUID="be785c55-31a1-4499-9fce-d7c288feadc2" CreationDate="2011-05-10T14:22:44.033" UserId="6616" Text="How to improve my Pong like game" />
  <row Id="26453" PostHistoryTypeId="3" PostId="12130" RevisionGUID="be785c55-31a1-4499-9fce-d7c288feadc2" CreationDate="2011-05-10T14:22:44.033" UserId="6616" Text="&lt;game-design&gt;&lt;android&gt;" />
  <row Id="26454" PostHistoryTypeId="2" PostId="12131" RevisionGUID="5c7c1583-8253-409a-a8ce-8bed8bc355e5" CreationDate="2011-05-10T14:29:05.980" UserId="6465" Text="So from what i've gathered around the internet and various sources is that DirectX has pretty much taken a stronghold grip onto the Graphics API. And too be honest, I gave learning DX10 a chance.....but I just cannot stand how things are initialized, it made it very difficult to really learn the actual 3D portion.&#xD;&#xA;&#xD;&#xA;OpenGL on the other hand makes soooo much more sense from a &quot;coding&quot; perspective to me, but Im not sure if I want to invest time into something that &quot;isn't going to last&quot;, but obviously I don't keep up with the latest news......nor know much about the 'war' that goes on between OpenGL and DX. So.....with that being said is OpenGL going away anytime soon? The thing I like about OpenGL is their are SOOO many more resources available (whether through books/tutorials/samples) than DX so it's alot easier to learn.&#xD;&#xA;&#xD;&#xA;So is it still a good time to learn OpenGL, or is DirectX just the future. Now I know there are 100000 topics talking about which is better but thats not what Im asking, im just asking if OpenGL is gonna stick around.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="26455" PostHistoryTypeId="1" PostId="12131" RevisionGUID="5c7c1583-8253-409a-a8ce-8bed8bc355e5" CreationDate="2011-05-10T14:29:05.980" UserId="6465" Text="is it a Waste to learn OpenGL?" />
  <row Id="26456" PostHistoryTypeId="3" PostId="12131" RevisionGUID="5c7c1583-8253-409a-a8ce-8bed8bc355e5" CreationDate="2011-05-10T14:29:05.980" UserId="6465" Text="&lt;opengl&gt;" />
  <row Id="26457" PostHistoryTypeId="2" PostId="12132" RevisionGUID="3b53e916-6770-4b1f-b44e-4136e278774a" CreationDate="2011-05-10T14:37:17.097" UserId="7217" Text="This is a question that only you can answer really.  But,&#xD;&#xA;&#xD;&#xA; - Do you actually want to make something and find OpenGL more fun or productive?  Then maybe you want to learn OpenGL.&#xD;&#xA; - Will learning OpenGL make it harder to learn DirectX later if you needed to or wanted to?  I don't think so.&#xD;&#xA;&#xD;&#xA;I don't think anyone can predict which one will stick around, I'd say use whatever is best for your purposes now, and you can always pick up the other later.  I've only used DirectX, just because it suited my purposes, but if I found OpenGL was easier for me to use in my game, I would have used it.&#xD;&#xA;&#xD;&#xA;If you *like* using it or accomplish something with it, it's not a waste." />
  <row Id="26458" PostHistoryTypeId="2" PostId="12133" RevisionGUID="862a1d05-d09b-40a5-a5bd-b9fde49bd48d" CreationDate="2011-05-10T14:39:02.397" UserId="4604" Text="Not quite useless.  It is worth pointing out that Mac systems still only support OpenGL, and only up to OpenGL 2.1.  This means that any game you see on Mac (including some source engine games such as Portal, Left 4 Dead, Left 4 Dead 2) has been written using OpenGL.  Given that Valve was able to adapt the source engine to use OpenGL 2.1 and do some amazing things with it, you are probably pretty safe to start there." />
  <row Id="26459" PostHistoryTypeId="5" PostId="12131" RevisionGUID="83298f3c-03dc-4261-8d14-f61178181ea4" CreationDate="2011-05-10T14:50:56.233" UserId="1430" Comment="deleted 7 characters in body; edited title; added 1 characters in body" Text="So from what i've gathered around the internet and various sources is that DirectX has pretty much taken a stronghold grip onto the graphics API domain. And too be honest, I gave learning DX10 a chance... but I just cannot stand how things are initialized, it made it very difficult to really learn the actual 3D portion.&#xD;&#xA;&#xD;&#xA;OpenGL on the other hand makes much more sense from a &quot;coding&quot; perspective to me, but Im not sure if I want to invest time into something that &quot;isn't going to last&quot;, but obviously I don't keep up with the latest news... nor know much about the 'war' that goes on between OpenGL and DX. So... with that being said is OpenGL going away anytime soon? The thing I like about OpenGL is their are many more resources available (whether through books/tutorials/samples) than DX so it's alot easier to learn.&#xD;&#xA;&#xD;&#xA;So is it still a good time to learn OpenGL, or is DirectX just the future. Now I know there are 100000 topics talking about which is better but thats not what I'm asking, I'm just asking if OpenGL is gonna stick around.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="26460" PostHistoryTypeId="4" PostId="12131" RevisionGUID="83298f3c-03dc-4261-8d14-f61178181ea4" CreationDate="2011-05-10T14:50:56.233" UserId="1430" Comment="deleted 7 characters in body; edited title; added 1 characters in body" Text="is it a waste to learn OpenGL?" />
  <row Id="26461" PostHistoryTypeId="2" PostId="12134" RevisionGUID="9efa085f-5f6e-47e9-b8bd-fd615137fba6" CreationDate="2011-05-10T14:54:23.407" UserId="1430" Text="&gt; Now I know there are 100000 topics&#xD;&#xA;&gt; talking about which is better but&#xD;&#xA;&gt; thats not what I'm asking, I'm just&#xD;&#xA;&gt; asking if OpenGL is gonna stick&#xD;&#xA;&gt; around.&#xD;&#xA;&#xD;&#xA;**Yes.**&#xD;&#xA;&#xD;&#xA;Technology never just vanishes -- once it has reached some critical mass, it's there to stay for a long time even if it never gets actively developed much any longer. It will be a very long time before the statement &quot;it is a waste of time to learn OpenGL&quot; is true.&#xD;&#xA;&#xD;&#xA;Although I find your motivation and reasoning somewhat suspect, there's nothing wrong with learning OpenGL and it will allow you to learn exactly as much about 3D graphics theory and programming as D3D would. Really, in fact, it might be worthwhile to use it as a learning medium even if it were useless as a practical platform because the fundamental concepts transfer between APIs, so as long as it helps you acquire those concepts it's a good choice." />
  <row Id="26462" PostHistoryTypeId="5" PostId="12122" RevisionGUID="616f2e60-9edf-4c3d-bf05-93843a592356" CreationDate="2011-05-10T14:55:57.677" UserId="1430" Comment="added 44 characters in body; edited tags; edited title" Text="Does any one know anything about using Renderscript for game development in Android 3.0. If you know, can you provide some good examples or demo links?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26463" PostHistoryTypeId="4" PostId="12122" RevisionGUID="616f2e60-9edf-4c3d-bf05-93843a592356" CreationDate="2011-05-10T14:55:57.677" UserId="1430" Comment="added 44 characters in body; edited tags; edited title" Text="Using Renderscript for game development on android" />
  <row Id="26464" PostHistoryTypeId="6" PostId="12122" RevisionGUID="616f2e60-9edf-4c3d-bf05-93843a592356" CreationDate="2011-05-10T14:55:57.677" UserId="1430" Comment="added 44 characters in body; edited tags; edited title" Text="&lt;android&gt;&lt;renderscript&gt;" />
  <row Id="26465" PostHistoryTypeId="2" PostId="12135" RevisionGUID="1768f49f-1eb3-4f62-af19-adf5b2f36de8" CreationDate="2011-05-10T15:01:39.337" UserId="6961" Text="Suppose i have model of simple 3d ball made in 3ds max. i just want to make simple game for fun . the scene will have only one ball , which will move with cursor.&#xD;&#xA;&#xD;&#xA;I know there may be other tools for game but i just want to know how to export 3ds max model in game" />
  <row Id="26466" PostHistoryTypeId="1" PostId="12135" RevisionGUID="1768f49f-1eb3-4f62-af19-adf5b2f36de8" CreationDate="2011-05-10T15:01:39.337" UserId="6961" Text="How to make simple game from max model" />
  <row Id="26467" PostHistoryTypeId="3" PostId="12135" RevisionGUID="1768f49f-1eb3-4f62-af19-adf5b2f36de8" CreationDate="2011-05-10T15:01:39.337" UserId="6961" Text="&lt;game-design&gt;&lt;3dsmax&gt;" />
  <row Id="26468" PostHistoryTypeId="2" PostId="12136" RevisionGUID="ed78a767-e7a3-4be4-a742-b00c202b7a2e" CreationDate="2011-05-10T15:10:11.653" UserId="7219" Text="The asteroid could exert gravity. Maybe it can start to break up as its hit, each piece with its own gravity.  If you did that i think it would be best to make the breaks not be the same each time you play the game(so some sort of dependency on where you hit it).  You could have &quot;wormholes&quot; appear/move randomly, once the ball goes in one side to comes out the other with the same angle and velocity(heres a big surprise the worm holes could also exert gravity)." />
  <row Id="26469" PostHistoryTypeId="2" PostId="12137" RevisionGUID="3ed5bf3c-2dfe-4971-89dd-ade601182d3a" CreationDate="2011-05-10T15:10:17.660" UserId="1430" Text="Essentially a your board is a 32-element array (eight rows, four slots per row). You don't strictly speaking need to use a 2D array to represent this, as you can use a 1D array just fine with a bit of indexing math (it's useful to understand how to do so, because in some cases it can be a huge benefit; in this case it's likely to be a &quot;six of one, half-dozen of the other&quot; type of trade off though).&#xD;&#xA;&#xD;&#xA;Each slot in the board can be empty, or a color. You could thus represent the value of a slot with the following enumeration:&#xD;&#xA;&#xD;&#xA;    enum SlotState {&#xD;&#xA;      SS_EMPTY,&#xD;&#xA;      SS_RED,&#xD;&#xA;      SS_GREEN,&#xD;&#xA;      SS_BLUE,&#xD;&#xA;      // ...however many colors there are...&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;and represent the board itself with a simple class with the following minimal interface:&#xD;&#xA;&#xD;&#xA;    class Board {&#xD;&#xA;      public: &#xD;&#xA;        static const int COLUMNS = 4;&#xD;&#xA;        static const int ROWS = 8;&#xD;&#xA;&#xD;&#xA;        Board() {&#xD;&#xA;          std::fill_n(slots, ROWS * COLUMNS, SS_EMPTY);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        SlotState getSlot(int row, int column) const {&#xD;&#xA;          return slots[row * COLUMNS + column];&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        void setSlot(int row, int column, SlotState state) { &#xD;&#xA;          slots[row * COLUMNS + column] = state;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;      private:&#xD;&#xA;        SlotState[ROWS * COLUMNS] slots;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Then, given any board, you can print it by simply iterating through the rows/columns of the board, asking the board for the value of the slot at that position, and rendering it. For example, to do so using the standard C++ console output object might look something like:&#xD;&#xA;&#xD;&#xA;    void printBoard(const Board&amp; board) {&#xD;&#xA;      for(int row = 0; row &lt; Board::ROWS; ++row) {&#xD;&#xA;        for(int column = 0; column &lt; Board::COLUMNS; ++column) {&#xD;&#xA;          switch( board.getSlot( row, column ) ) {&#xD;&#xA;            case SS_RED:&#xD;&#xA;              std::cout &lt;&lt; 'R';&#xD;&#xA;              break;&#xD;&#xA;&#xD;&#xA;            case SS_GREEN:&#xD;&#xA;              std::cout &lt;&lt; 'G';&#xD;&#xA;              break;&#xD;&#xA;&#xD;&#xA;            // ..et cetera...&#xD;&#xA;&#xD;&#xA;            default:&#xD;&#xA;              std::cout &lt;&lt; ' ';&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        std::cout &lt;&lt; &quot;\n&quot;;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You could just as easily be telling your graphics API to enqueue sprites or colored triangles/quads at that point, though, instead of printing characters.&#xD;&#xA;&#xD;&#xA;The reason I suggest this approach is that, as you can see, the board itself ends up only knowing about the board's logical state... the size of the board and the value of every slot in the board. It also provides a relatively minimal (but functional) interface to manipulating the board. It has a [single responsibility][1] -- to represent the board. There's nothing in there about rules for what colors must go where (although a real-world class should perform some bounds checking that I have eschewed here for brevity). And there's nothing in there for rendering the board -- [that is accomplished entirely by an external, non-member function and can be done entirely via the public interface of the board object][2]. &#xD;&#xA;&#xD;&#xA;This keeps the class lightweight and reusable and helps to increase it's maintainability as well -- it's a good habit to get in to trying to approach designs like this (and also to, in general, keep logical interfaces and rendering interfaces distinct).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.objectmentor.com/resources/articles/srp.pdf&#xD;&#xA;  [2]: http://drdobbs.com/184401197" />
  <row Id="26470" PostHistoryTypeId="25" PostId="12131" RevisionGUID="d09458c2-ce26-467b-9f26-b879ead5762c" CreationDate="2011-05-10T15:11:37.727" Comment="http://twitter.com/#!/StackGameDev/status/67970049931096064" />
  <row Id="26471" PostHistoryTypeId="5" PostId="12127" RevisionGUID="04d4e7c4-7c57-45d5-acd2-584ccc2feae8" CreationDate="2011-05-10T15:19:30.957" UserId="1430" Comment="added 4 characters in body; edited title" Text="Hey, I'm trying to make a Mastermind game. I'm having trouble figuring how to design the game board for the guesses. The board must consist of four columns and eight rows. I'm having trouble figuring out how to go about printing the game board on screen. I know I could use a two dimensional array to store the letters and guesses, but I need to print the game board on the screen as well as the guesses inside the game board.&#xD;&#xA;&#xD;&#xA;I hope this was clear enough, if not i can explain more, I just need help with this game board situation. " />
  <row Id="26472" PostHistoryTypeId="4" PostId="12127" RevisionGUID="04d4e7c4-7c57-45d5-acd2-584ccc2feae8" CreationDate="2011-05-10T15:19:30.957" UserId="1430" Comment="added 4 characters in body; edited title" Text="Modelling the board in a Mastermind game" />
  <row Id="26473" PostHistoryTypeId="5" PostId="12118" RevisionGUID="334b1cfc-7c53-4271-b631-ad458892b296" CreationDate="2011-05-10T15:31:00.357" UserId="1156" Comment="deleted 104 characters in body" Text="I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is, my guess is that somehow the number of rows/columns to replace are incorrect, at least that is how it looks like. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. I'm new to opengl, and graphics in general, so I am probably doing something wrong.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26474" PostHistoryTypeId="2" PostId="12138" RevisionGUID="7c667d53-564f-4035-921c-aef6b3ea6ad5" CreationDate="2011-05-10T15:32:04.553" UserId="6702" Text="It's not likely that OpenGL will stop being an actively developed or targeted technology any time soon. Comparing platforms where each API is nativity available, D3D has primarily Xbox, Windows and Windows Phone 7. OpenGL will also work on Windows, in addition to Mac OS X and Linux. OpenGL ES is on Android and iOS. &#xD;&#xA;&#xD;&#xA;If your just looking for skills to get a well paying job you will probably need to learn DX as most of the mainstream game developers are targeting Windows and/or Xbox. Although the rapidly expanding mobile games market is increasing the relevance of OpenGL ES knowledge." />
  <row Id="26475" PostHistoryTypeId="5" PostId="12130" RevisionGUID="6cc0e44d-860e-403c-9399-c59f053d83f4" CreationDate="2011-05-10T15:55:32.927" UserId="6616" Comment="edited body" Text="I have published a free game on Android Market called AstroTennis. This is like a classic pong game, but it has an asteroid moving in the middle which deflects the ball making it sometimes harder to defend ones position. It plays against computer or human.&#xD;&#xA;&#xD;&#xA;![AstroTennis android game][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yjnpd.jpg&#xD;&#xA;On the bases of received feedback on the market I can see that some people are not too impressed while some like it (50%).&#xD;&#xA;&#xD;&#xA;The question of course is how two spice up this game so that almost everyone likes it? Since this is a free game and it will stay free, I cannot invest too much in it and develop many levels at the moment, but still I feel that something interesting can be added to it.&#xD;&#xA;If you have an android device then you can check it out easily since it is free.&#xD;&#xA;&#xD;&#xA;If any designer wants to cooperate and produce a more exciting graphics I would be glad to do something together. It has about thousands downloads per week at the moment, hence it could be something on your port-folio, plus you would be credited.&#xD;&#xA;If you are interested send your design before 1st June 2011 to &#xD;&#xA;support (at) lumisvision.co.uk&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26476" PostHistoryTypeId="2" PostId="12139" RevisionGUID="2901b991-6ca3-4666-a05f-b790f82be2d6" CreationDate="2011-05-10T15:58:25.243" UserId="7220" Text="Do you have a water simulation? &#xD;&#xA;&#xD;&#xA;My suggestions are&#xD;&#xA;&#xD;&#xA; - fake it with springs. Each vertex on the water surface is couled together into a spring mesh. Pull one down and they all start oscilating. You could constrain x,z motion and only allow y (or up/down motion)&#xD;&#xA; - fake it by summing sinewaves of harmonic (?) frequencies. &#xD;&#xA;Some thing like this:&#xD;&#xA;&#xD;&#xA;       for(i=-32; i&lt;32; i++)&#xD;&#xA;       for(j=-32; j&lt;32; j++)&#xD;&#xA;       {&#xD;&#xA;          yofs = 0;&#xD;&#xA;          yofs += 1.0*sin( 1*t + j/2 + i/16);&#xD;&#xA;          yofs += 2.0*sin( 1*t + (32-j)/4 + (i)/8 );&#xD;&#xA;          yofs += 2.0*sin( 1*t + (j)/4 + (32-i)/4 );&#xD;&#xA;          yofs += .5*sin( 1*t + (32+j)/4 + (32+i)/4 );&#xD;&#xA;          glVertex(i/32.0,yofs,j/32.0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - simulate the 2D wave equation, this can be very fast on the GPU. See [this page for a java applet and some pseudo code][1]. Also check [this version, the same but even simpler. A processing sketch with code.][2]&#xD;&#xA;&#xD;&#xA;From the wave equation sim you can get the direction (dx,dz) of the wave is traveling in&#xD;&#xA;&#xD;&#xA;    dx = h[x-1][z] - h[x+1][z] &#xD;&#xA;    dz = h[x][z-1]- h[x][x+1] &#xD;&#xA;&#xD;&#xA;where h a 2D array with the height of the wave at [x][z]&#xD;&#xA;&#xD;&#xA;You could add this to the boats position to make it travel with the wave... I've tried, but the movement becomes jerky, so I smoothed it out with a simple 3x3 box filter (smoothing the differences/velocities dx dz)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://beltoforion.de/java_applets/waves/wave_equation_de.html&#xD;&#xA;  [2]: http://www.openprocessing.org/visuals/?visualID=7022" />
  <row Id="26477" PostHistoryTypeId="5" PostId="12118" RevisionGUID="851fa878-4211-47df-bd38-e44929c8968a" CreationDate="2011-05-10T16:29:06.923" UserId="4559" Comment="added 877 characters in body" Text="I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is, my guess is that somehow the number of rows/columns to replace are incorrect, at least that is how it looks like. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. I'm new to opengl, and graphics in general, so I am probably doing something wrong.&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;        private void drawHole(int x, int y, int r) {&#xD;&#xA;            Rectangle rect = new Rectangle(x - r, y - r, r * 2, r * 2);&#xD;&#xA;            Graphics gfx = Graphics.FromImage(texture);&#xD;&#xA;            gfx.CompositingMode = CompositingMode.SourceCopy;&#xD;&#xA;            gfx.FillEllipse(Brushes.Transparent, rect);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            GL.BindTexture(TextureTarget.Texture2D, texId);&#xD;&#xA;&#xD;&#xA;            BitmapData bmp_data = texture.LockBits(rect,&#xD;&#xA;                ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);&#xD;&#xA;&#xD;&#xA;             GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.X, rect.Y,&#xD;&#xA;                rect.Width, rect.Height, OpenTK.Graphics.OpenGL.PixelFormat.Bgra,&#xD;&#xA;                PixelType.UnsignedByte, bmp_data.Scan0);&#xD;&#xA;&#xD;&#xA;            texture.UnlockBits(bmp_data);&#xD;&#xA;            texture.Save(&quot;szar.png&quot;, ImageFormat.Png);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;" />
  <row Id="26478" PostHistoryTypeId="2" PostId="12140" RevisionGUID="f770add3-1050-483e-8284-057bfde3d51f" CreationDate="2011-05-10T16:31:15.173" UserId="-1" Text="" />
  <row Id="26479" PostHistoryTypeId="2" PostId="12141" RevisionGUID="071974e3-6b8c-4015-968b-ce3fcc658deb" CreationDate="2011-05-10T16:31:15.173" UserId="-1" Text="" />
  <row Id="26480" PostHistoryTypeId="2" PostId="12142" RevisionGUID="5fdb2c32-54a7-4c48-8772-0ede37acf65e" CreationDate="2011-05-10T16:37:02.967" UserId="4662" Text="Initialization code is a tiny, tiny fraction of all code that deals with a sub-system like this kind of renderer. You're throwing away the vastly superior object orientation and that kind of advantage offered by DirectX because you don't like the first two hundred lines. I don't want to sound like I'm trivializing your opinion here, but the reality is that compared to all the code you might write that deals with any rendering subsystem, not ot mention whatever other subsystems you need, initialization is a triviality.&#xD;&#xA;&#xD;&#xA;Secondly, you could always try DX9- it's much, *much* less than DX10." />
  <row Id="26481" PostHistoryTypeId="5" PostId="12130" RevisionGUID="c92cc7c1-e545-49e0-990b-a564576d34e7" CreationDate="2011-05-10T16:37:35.103" UserId="6616" Comment="deleted 345 characters in body" Text="I have published a free game on Android Market called AstroTennis. This is like a classic pong game, but it has an asteroid moving in the middle which deflects the ball making it sometimes harder to defend ones position. It plays against computer or human.&#xD;&#xA;&#xD;&#xA;![AstroTennis android game][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yjnpd.jpg&#xD;&#xA;On the bases of received feedback on the market I can see that some people are not too impressed while some like it (50%).&#xD;&#xA;&#xD;&#xA;The question of course is how two spice up this game so that almost everyone likes it? Since this is a free game and it will stay free, I cannot invest too much in it and develop many levels at the moment, but still I feel that something interesting can be added to it.&#xD;&#xA;If you have an android device then you can check it out easily since it is free.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26482" PostHistoryTypeId="2" PostId="12143" RevisionGUID="1dba5e55-cd1d-4ebc-a40c-4a2b931f1612" CreationDate="2011-05-10T16:44:12.653" UserId="7191" Text="Would something like this work? &#xD;&#xA;&#xD;&#xA;[http://www.humus.name/index.php?page=3D&amp;ID=32][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.humus.name/index.php?page=3D&amp;ID=32" />
  <row Id="26483" PostHistoryTypeId="2" PostId="12144" RevisionGUID="e8769075-4d46-4864-91b7-11afcebbf4e3" CreationDate="2011-05-10T17:10:05.117" UserId="3327" Text="I think your biggest problem as far as impressing people is that your game is Pong. Everyone has played a thousand pong games and games in general don't get much simpler (or more over done). As far as what I liked, your game feels solid (no immediately noticeable glitches, nice framerate, good overall look and feel), the asteroid mechanic definitely changes it up a bit, and I especially like the multi-touch two-player mode.&#xD;&#xA;My suggestions:  &#xD;&#xA;&#xD;&#xA;**Add some options!**  &#xD;&#xA;The ball is moving quite fast and at first, it caught me off guard. It would be nice to be able to adjust this myself or maybe have it start out slow and get faster. I would also like to be able to adjust (or atleast see a difference in) your main mechanic, the asteroid. Adding the option to change the number of asteroids (2+) would be great! If you don't want to allow the player to adjust these, you could adjust them yourself by adding multiple difficulty levels. On easy, the ball would move very slowly with 0 or 1 asteroids while on hard, the ball would move much fast with maybe 4 or 5 asteroids. Even the number of balls in play could be adjusted. I would say that some form of options is absolutely necessary for your game.&#xD;&#xA;&#xD;&#xA;**More game modes.**  &#xD;&#xA;When I first played the 2 player mode (by myself) it gave me the idea for a &quot;training&quot; mode where you played against the game (instead of an opponent) to get the highest score you could. In this mode, you would hold the device landscape with a thumb on each paddle and keep the ball in play, scoring a point each time you successfully rebounded the ball (kept it in play). With this mode, the ball might get faster the higher your score got. Then, you could even add leaderboards for people to post their high scores too. Another mode could be an &quot;asteroid destroyer&quot; game where you played against an opponent or against yourself with two paddle (like training mode). The objective would be to destroy as many asteroids as possible, earning a point for each one. Every time you hit an asteroid with the ball, it would explode and another one (or 2 or more!) would appear until your ball escaped (entered a goal). Be creative and most importantly (IMHO), get as far away from simple pong as possible. You could make the greatest pong game with the best graphics and music and extras in the entire world and it would still just be pong and no one would be impressed.&#xD;&#xA;&#xD;&#xA;**Music**  &#xD;&#xA;I like your sound effects, but some simple backgrounds music could go a long way towards making your game feel more complete.&#xD;&#xA;&#xD;&#xA;**Power-ups**  &#xD;&#xA;Many pong clones have them, they're fun but not original. Try to make you own, unique power ups that no one has done before! Power ups that manipulate your asteroids would definitely be original!&#xD;&#xA;&#xD;&#xA;To summarize, your game is pretty good and has lots of potential! But it's still pong, and people have been playing pong since video game were invented. For your next game do something more original, you'll enjoy it more! As far as ratings and comments, don't let them bother you too much. Let your downloads do the talking.&#xD;&#xA;&#xD;&#xA;As a side note, I would change the collisions of the asteroid so that it doesn't bounce all the way into the players goal, but instead stayed in maybe the middle 60% (or whatever you decided on). That was the only frustrating thing that happened to me to make me feel &quot;cheated&quot;." />
  <row Id="26484" PostHistoryTypeId="5" PostId="12141" RevisionGUID="18e6c11a-31c7-4cfd-b45f-2c1a9ed43538" CreationDate="2011-05-10T17:17:54.273" UserId="4559" Comment="added 60 characters in body" Text="OpenTK is a C# library that wraps OpenGL, OpenCL and OpenAL." />
  <row Id="26485" PostHistoryTypeId="24" PostId="12141" RevisionGUID="18e6c11a-31c7-4cfd-b45f-2c1a9ed43538" CreationDate="2011-05-10T17:17:54.273" Comment="Proposed by 4559 approved by 14 edit id of 424" />
  <row Id="26486" PostHistoryTypeId="5" PostId="12140" RevisionGUID="2b29cfee-62dd-4872-b6b6-16f5688c3d4c" CreationDate="2011-05-10T17:17:53.527" UserId="4559" Comment="added 222 characters in body" Text="The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenCL and OpenAL. It is suitable for games, scientific applications and any other project that requires 3d graphics, audio or compute functionality." />
  <row Id="26487" PostHistoryTypeId="24" PostId="12140" RevisionGUID="2b29cfee-62dd-4872-b6b6-16f5688c3d4c" CreationDate="2011-05-10T17:17:53.527" Comment="Proposed by 4559 approved by 14 edit id of 423" />
  <row Id="26488" PostHistoryTypeId="5" PostId="12118" RevisionGUID="410bff9d-ff21-4fc5-a5e9-23010c014d54" CreationDate="2011-05-10T17:19:45.087" UserId="4559" Comment="added 194 characters in body" Text="I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is, my guess is that somehow the number of rows/columns to replace are incorrect, at least that is how it looks like. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. I'm new to opengl, and graphics in general, so I am probably doing something wrong.&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;        private void drawHole(int x, int y, int r) {&#xD;&#xA;            Rectangle rect = new Rectangle(x - r, y - r, r * 2, r * 2);&#xD;&#xA;            Graphics gfx = Graphics.FromImage(texture);&#xD;&#xA;            gfx.CompositingMode = CompositingMode.SourceCopy;&#xD;&#xA;            gfx.FillEllipse(Brushes.Transparent, rect);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            GL.BindTexture(TextureTarget.Texture2D, texId);&#xD;&#xA;&#xD;&#xA;            BitmapData bmp_data = texture.LockBits(rect,&#xD;&#xA;                ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);&#xD;&#xA;&#xD;&#xA;             GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.X, rect.Y,&#xD;&#xA;                rect.Width, rect.Height, OpenTK.Graphics.OpenGL.PixelFormat.Bgra,&#xD;&#xA;                PixelType.UnsignedByte, bmp_data.Scan0);&#xD;&#xA;&#xD;&#xA;            texture.UnlockBits(bmp_data);&#xD;&#xA;            texture.Save(&quot;szar.png&quot;, ImageFormat.Png);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;[HERE][1] is what I get. The whole screen is one quad with a texture in it, white is solid, blue is the opengl clearColor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://imageshack.us/photo/my-images/508/texturefg.jpg/" />
  <row Id="26489" PostHistoryTypeId="2" PostId="12145" RevisionGUID="b45f90d1-4fab-4f36-83c0-77c8ab94d724" CreationDate="2011-05-10T17:37:11.320" UserId="6558" Text="Open GL is the basis for [Web GL][1], and while Web GL is still in infancy, if/when it becomes wide spread, it will be a useful thing to know.  So along with generally being more cross platform than DirectX (covered in other answers), it will eventually be one of the  options for making a 3d web browser game.&#xD;&#xA;&#xD;&#xA;So, to answer your question, assuming webGL becomes a standard, openGL will stick around for a good, long time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/WebGL &quot;Web GL&quot;" />
  <row Id="26491" PostHistoryTypeId="5" PostId="12118" RevisionGUID="6c2dc372-f1f3-4a21-b5a9-6bbf35cbfc61" CreationDate="2011-05-10T17:38:33.727" UserId="4559" Comment="added 82 characters in body" Text="I want to change a part of the texture with `GL.TexSubImage2D`. I know how this method works in C and I've used it, but in C# it only works if I replace the whole texture if I replace only a small part (which I need) it replaces it with some garbage, I really can't figure it out what that is, my guess is that somehow the number of rows/columns to replace are incorrect, at least that is how it looks like. I don't know if this is a bug or am I doing something wrong. I want the texture to have a transparent hole in it, so:&#xD;&#xA;&#xD;&#xA;- I have a `Bitmap` object with the texture. &#xD;&#xA;&#xD;&#xA;- I draw the circle, using the transparent brush/color/whatever, I save to a file to verify that everything is ok, and it IS.&#xD;&#xA;&#xD;&#xA;- After this I do `LockBits` specifying the rectangle I want.&#xD;&#xA;&#xD;&#xA;- Get the `IntPtr` with the data, and call `TexSubImage2D`.&#xD;&#xA;&#xD;&#xA;Any help is appreciated. I'm new to opengl, and graphics in general, so I am probably doing something wrong.&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;        private void drawHole(int x, int y, int r) {&#xD;&#xA;            Rectangle rect = new Rectangle(x - r, y - r, r * 2, r * 2);&#xD;&#xA;            Graphics gfx = Graphics.FromImage(texture);&#xD;&#xA;            gfx.CompositingMode = CompositingMode.SourceCopy;&#xD;&#xA;            gfx.FillEllipse(Brushes.Transparent, rect);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            GL.BindTexture(TextureTarget.Texture2D, texId);&#xD;&#xA;&#xD;&#xA;            BitmapData bmp_data = texture.LockBits(rect,&#xD;&#xA;                ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);&#xD;&#xA;&#xD;&#xA;             GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.X, rect.Y,&#xD;&#xA;                rect.Width, rect.Height, OpenTK.Graphics.OpenGL.PixelFormat.Bgra,&#xD;&#xA;                PixelType.UnsignedByte, bmp_data.Scan0);&#xD;&#xA;&#xD;&#xA;            texture.UnlockBits(bmp_data);&#xD;&#xA;            texture.Save(&quot;szar.png&quot;, ImageFormat.Png);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;[HERE][1] is what I get. The whole screen is one quad with a texture in it, white is solid, blue is the opengl clearColor. There should be a blue circle there instead of a rectangle with some stuff in it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://imageshack.us/photo/my-images/508/texturefg.jpg/" />
  <row Id="26492" PostHistoryTypeId="6" PostId="12135" RevisionGUID="a2390eee-74d4-431e-b0c6-2379bf047bfa" CreationDate="2011-05-10T17:40:43.740" UserId="51" Comment="edited tags" Text="&lt;3dsmax&gt;" />
  <row Id="26493" PostHistoryTypeId="5" PostId="12135" RevisionGUID="4e4b8362-0ea8-4ff4-a2cd-ee0572f1d0c5" CreationDate="2011-05-10T17:42:24.880" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Are there any video tutorials available for game programming with Max?](http://gamedev.stackexchange.com/questions/11757/are-there-any-video-tutorials-available-for-game-programming-with-max)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Suppose i have model of simple 3d ball made in 3ds max. i just want to make simple game for fun . the scene will have only one ball , which will move with cursor.&#xD;&#xA;&#xD;&#xA;I know there may be other tools for game but i just want to know how to export 3ds max model in game" />
  <row Id="26494" PostHistoryTypeId="10" PostId="12135" RevisionGUID="b548d0cc-84ab-46e6-a454-f4a3d5c6609a" CreationDate="2011-05-10T17:42:24.240" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="26495" PostHistoryTypeId="2" PostId="12146" RevisionGUID="e029a937-3f36-44f5-bf9d-ec1fa71e4b37" CreationDate="2011-05-10T17:54:42.820" UserId="7191" Text="I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven input. Perhaps even having both, using event driven for the UI and polling for the &quot;world&quot; input. I'm curious on what the best way to go is.&#xD;&#xA;&#xD;&#xA;I'm defining polling as: each update loop I check what keys are press, where the mouse is, buttons pressed, then run through them and do actions based on the info collected.&#xD;&#xA;&#xD;&#xA;I'm defining event driven as: interrupt based events, when an event happens and interrupt is triggered and a code block is run based on the event.&#xD;&#xA;&#xD;&#xA;Do you think it's best to go all event driven, all polling, or is a combination of both acceptable? If you have pros and cons for either please list them. Thanks.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26496" PostHistoryTypeId="1" PostId="12146" RevisionGUID="e029a937-3f36-44f5-bf9d-ec1fa71e4b37" CreationDate="2011-05-10T17:54:42.820" UserId="7191" Text="Polling vs event driven input" />
  <row Id="26497" PostHistoryTypeId="3" PostId="12146" RevisionGUID="e029a937-3f36-44f5-bf9d-ec1fa71e4b37" CreationDate="2011-05-10T17:54:42.820" UserId="7191" Text="&lt;input&gt;" />
  <row Id="26498" PostHistoryTypeId="2" PostId="12147" RevisionGUID="a21a5e68-7641-4e2c-bb64-182154f322d7" CreationDate="2011-05-10T18:09:15.480" UserId="5473" Text="You likely will want to model this as a graph, a logical, traversable structure consisting of nodes which can represent your story events or places where the story branches. Learn a bit of graph theory, get yourself a good graph library like Boost or JGraphT (depending on your development language), and get cracking modelling your story flow as a graph. Note that I refer to graph algorithm libraries, not graph drawing / &quot;graphing&quot; libraries. The former provide an abstract way of constructing a topology (which is what you want) vs the former which provide different ways to draw you graph -- which may prove useful for your own visualisation but is not going to help your game to traverse its story as the player progresses." />
  <row Id="26499" PostHistoryTypeId="25" PostId="12146" RevisionGUID="c7b8ad98-11fd-4aec-a828-0d4d5f25d931" CreationDate="2011-05-10T18:11:37.903" Comment="http://twitter.com/#!/StackGameDev/status/68015349995548673" />
  <row Id="26500" PostHistoryTypeId="5" PostId="12147" RevisionGUID="13905dac-44ea-4997-91b3-cb8d4093d48f" CreationDate="2011-05-10T18:14:29.627" UserId="5473" Comment="added 218 characters in body; added 222 characters in body; deleted 4 characters in body" Text="You likely will want to model this as a graph, a logical, traversable structure consisting of nodes representing your story events or points at which the story branches. Learn a bit of graph theory, get yourself a good graph library like Boost or JGraphT (depending on your development language), and get cracking modelling your story flow as a graph. Note that I refer to graph algorithm libraries, not graph drawing / &quot;graphing&quot; libraries. The former provide an abstract way of constructing a topology (which is what you want) vs the former which provide different ways to draw you graph -- which may prove useful for your own visualisation but is not going to help your game to traverse its story as the player progresses. You would need a directed acyclic graph (DAG) for this. With a DAG, as long as you keep track of the node representing your current point in the story, you will not be able to go back to an earlier point in the story. Note, it is possible to use a directed cyclic graph, meaning your player could go around in &quot;story circles&quot;, this is how the  &quot;choose your own adventure&quot; books sometimes work. But it's probably not the most desirable way." />
  <row Id="26501" PostHistoryTypeId="2" PostId="12148" RevisionGUID="2a031cf2-4103-4bc2-b6a3-a7f037ebe8e3" CreationDate="2011-05-10T18:21:17.077" UserId="7221" Text="It depends on the requirements of your game and hardware. Most games are usually interested in changes to input state, i.e. user presses the fire key and their weapon starts firing, user releases the fire key and their weapon stops firing, user presses the move key and starts moving, releases the move key and stops moving, etc., so an event-driven input system makes the most sense in those cases since the information is already in a suitable format. Plus on the Windows platform, you already receive events for changes to keyboard and mouse state, so it's often a 1:1 conversion from low-level input events to high-level game events. With polling, you'll often find yourself having to generate such events manually by comparing state between the current and last frame. Basically, &quot;which buttons are pressed now?&quot; tends to be far less useful information than &quot;which buttons have been pressed/released this frame?&quot;, and given an initial keyboard/mouse state when you initialize your input subsystem, the former can be inferred from the latter anyway for those cases when you need it.&#xD;&#xA;&#xD;&#xA;That being said, on certain platforms you're stuck with polling input at a low-level and there's no way around doing the edge checking yourself. However, I've always achieved the best results using events for all high-level logic since that's naturally how those systems tend to operate." />
  <row Id="26502" PostHistoryTypeId="5" PostId="12146" RevisionGUID="45d48449-21ad-47e4-82ba-314b9c645b82" CreationDate="2011-05-10T18:26:18.307" UserId="7191" Comment="added 186 characters in body" Text="I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven input. Perhaps even having both, using event driven for the UI and polling for the &quot;world&quot; input. I'm curious on what the best way to go is.&#xD;&#xA;&#xD;&#xA;I'm defining polling as: each update loop I check what keys are press, where the mouse is, buttons pressed, then run through them and do actions based on the info collected.&#xD;&#xA;&#xD;&#xA;I'm defining event driven as: interrupt based events, when an event happens and interrupt is triggered and a code block is run based on the event.&#xD;&#xA;&#xD;&#xA;Do you think it's best to go all event driven, all polling, or is a combination of both acceptable? If you have pros and cons for either please list them. Thanks.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;The game is Java/OpenGL based, so will be released to Windows/Mac/Linux. The possibility of extending that to mobile devices is low. The game is RTS style, 3rd person 3D.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26503" PostHistoryTypeId="6" PostId="12146" RevisionGUID="3977edc4-6a72-4fe1-8e56-20f44f5e0b64" CreationDate="2011-05-10T18:44:17.153" UserId="51" Comment="edited tags" Text="&lt;input&gt;&lt;events&gt;&lt;polling&gt;" />
  <row Id="26504" PostHistoryTypeId="2" PostId="12149" RevisionGUID="4657572a-0abd-4c70-83d1-305b95b9c4d1" CreationDate="2011-05-10T19:34:07.450" UserId="4496" Text="Consider increasing your dampening as you get closer to the target height or making a boolean switch for a fixed increase once you've reached the target and until another height is set.  That would allow you to have faster movement without sacrificing your ability to stop or requiring much change in code.&#xD;&#xA;&#xD;&#xA;Hope that helps!" />
  <row Id="26505" PostHistoryTypeId="2" PostId="12150" RevisionGUID="c4d40a70-5922-4bef-a84d-8fb69e445cb1" CreationDate="2011-05-10T19:44:34.883" UserId="7224" Text="Please take a look at the screenshot below, from the old classic Space Harrier.  My question regards the curved perspective on the chequerboard 'ground'.  It's got a strangely curved geometry (I remember seeing this in a few old games/demos).  I reminds me somewhat of a moire effect, but I think this is just coincidence.  &#xD;&#xA;&#xD;&#xA;So...&#xD;&#xA;&#xD;&#xA;- **Why the curvature?**&#xD;&#xA;- **Did they do this on purpose, or is it a side effect of some technique?**&#xD;&#xA;- **How is it achieved?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![Space Harrier][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/VaDoB.png" />
  <row Id="26506" PostHistoryTypeId="1" PostId="12150" RevisionGUID="c4d40a70-5922-4bef-a84d-8fb69e445cb1" CreationDate="2011-05-10T19:44:34.883" UserId="7224" Text="Perspective in early pseudo-3d games" />
  <row Id="26507" PostHistoryTypeId="3" PostId="12150" RevisionGUID="c4d40a70-5922-4bef-a84d-8fb69e445cb1" CreationDate="2011-05-10T19:44:34.883" UserId="7224" Text="&lt;3d&gt;&lt;geometry&gt;&lt;old-school&gt;" />
  <row Id="26508" PostHistoryTypeId="5" PostId="12150" RevisionGUID="b16f79ce-42bb-4f1a-ac1b-7bb4633af994" CreationDate="2011-05-10T19:52:26.123" UserId="7224" Comment="added 257 characters in body" Text="Please take a look at the screenshot below, from the old classic Space Harrier.  My question regards the curved perspective on the chequerboard 'ground'.  It's got a strangely curved geometry (I remember seeing this in a few old games/demos).  I reminds me somewhat of a moire effect, and I think some of it (in the background) is just that - but I don't think its the full story.  Compare with the screen shot from the Sega version, which shows moire effects in the distance, but not the same curvature.&#xD;&#xA;&#xD;&#xA;So...&#xD;&#xA;&#xD;&#xA;- **Why the curvature?**&#xD;&#xA;- **Did they do this on purpose, or is it a side effect of some technique?**&#xD;&#xA;- **How is it achieved?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![Space Harrier - C64][2]&#xD;&#xA;![Space Harrier - Sega][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/IAjUP.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/VaDoB.png" />
  <row Id="26509" PostHistoryTypeId="2" PostId="12151" RevisionGUID="56bb32c4-b76c-47b5-9490-25910a1e5d89" CreationDate="2011-05-10T19:55:26.583" UserId="7191" Text="This has to do with [Mip Mapping][1] textures. This texture has not been mip mapped. See the before and after mip mapping on this image:&#xD;&#xA;&#xD;&#xA;[http://warsztat.gd/files/articles/texatlas/mip-map2.png][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So it's a side effect of the game trying to draw textures far away at an angle. Mip mapping fixes this, so the way to achieve it is to not use mip mapping.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Mipmap&#xD;&#xA;  [2]: http://warsztat.gd/files/articles/texatlas/mip-map2.png" />
  <row Id="26510" PostHistoryTypeId="2" PostId="12152" RevisionGUID="47c78db9-1f4c-472f-8488-d9566ad20504" CreationDate="2011-05-10T20:17:29.173" UserId="3289" Text="You could consider running a simple [PID controller][1] in your game. It's [simple to implement][2] in a function like the one you have already. &#xD;&#xA;&#xD;&#xA;By tweaking the parameters (or computing them, there are many techniques) you should be able to get a pretty neat behaviour.&#xD;&#xA;&#xD;&#xA;Be sure to run your physics loop with a fixed time step though, as this is necessary to achieve stable regulation when implemented with discrete/digital logic (as oppossed to analog circuits....)&#xD;&#xA;&#xD;&#xA;However, some non-linear daming that Lunin suggests might be an option. That would allow the chopper to &quot;soft-snap&quot; to the target height. It depends on how &quot;physics-y&quot; you want your game to behave. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/PID_controller&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/PID_controller#Pseudocode" />
  <row Id="26511" PostHistoryTypeId="5" PostId="12147" RevisionGUID="4aa7cbc6-29fa-46ec-8b7d-250123ab2b75" CreationDate="2011-05-10T20:44:08.157" UserId="5473" Comment="bulleted; added 20 characters in body; deleted 54 characters in body" Text="You likely will want to model this as a directed acyclic graph (or DAG), a logical, traversable structure consisting of nodes representing your story events or points at which the story branches. &#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - You have the perfect structure with which to model complexity and branching. In fact, a tree is just a special type of graph, but while a tree might work for your game, a graph will be better as it will allow you to come to &quot;nexus&quot; points in your story (eg. the end of a chapter) where all prior story branches come together, and a new set of choices begin.&#xD;&#xA; - A graph is easy to visualise on paper or in your head. Simply construct your story as a branching/remerging sequence of nodes.&#xD;&#xA; - There are many useful algorithms for graphs, allowing you to do many cool (but advanced) things with your story graph.&#xD;&#xA; - Using a DAG, as long as you mark a node as traversed each time you finish the relevant part of the story, you will not be able to go back to an earlier point in the story.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - You'll need to figure out how to use graphs.&#xD;&#xA; - You'll need to get yourself a suitable graph library like JGraphT, Boost, or LEDA depending on what is available for your language (Java and C++ are the traditional &quot;academic's languages&quot; so most of the good ones will be found in these) or write your own simple implementation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PS. I refer above to graph algorithm libraries, not graph drawing / &quot;graphing&quot; libraries. The former provide an abstract way of constructing a topology (which is what you want) vs the former which provide different ways to draw you graph -- which may prove useful for your own visualisation but is not going to help your game to traverse its story as the player progresses. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PPS. It is possible to use a directed *cyclic* graph, meaning your player could go around in &quot;story circles&quot;, this is how the &quot;choose your own adventure&quot; books sometimes work. But it's probably not the most desirable way." />
  <row Id="26512" PostHistoryTypeId="2" PostId="12153" RevisionGUID="96f64e23-0c06-4489-8c4d-a6bdd76aa3d8" CreationDate="2011-05-10T20:57:06.990" UserId="1198" Text="I see no reason that you cannot do both, and get the best of both worlds. &#xD;&#xA;&#xD;&#xA;Input Events are generated by polling (at some level the driver polls the hardware to see what state its in), and since your main loop polls all input devices, you can easily implement your own. Something simple like below is what I've used in the past.&#xD;&#xA;&#xD;&#xA;    mouseInput = GetMouse();&#xD;&#xA;    kbInput = GetKeyboard();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // refactor this out to its own method if it makes sense&#xD;&#xA;    if menuState == Showing&#xD;&#xA;        if mouseInput.LeftButton == State.Pressed&#xD;&#xA;            LeftButton(mouseInput.X, mouseInput.Y)&#xD;&#xA;&#xD;&#xA;    // rest of game input code processing&#xD;&#xA;&#xD;&#xA;    void LeftButton(int x, int y)&#xD;&#xA;    {&#xD;&#xA;        // left button event handler&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;I know that you defined events to be interrupts and what I've put here is not &quot;truely event based&quot;, but I don't see what the above doesn't give you that interrupts do give you -- most users will not notice the single frame lost, unless your game runs at very low frame rate." />
  <row Id="26513" PostHistoryTypeId="2" PostId="12154" RevisionGUID="fa0c1754-72eb-41bf-ab15-ef8dd843d155" CreationDate="2011-05-10T20:57:56.827" UserId="3289" Text="I used the textures in the [GLUT Caustics Example][1] for a game I did ten years ago. Might work for you too.&#xD;&#xA;&#xD;&#xA;It's a texture animation. Load them as a 3d texture for smooth interpolation when rendering. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/code/samples/mjktips/caustics/" />
  <row Id="26514" PostHistoryTypeId="2" PostId="12155" RevisionGUID="43a8b1c2-bc77-40d0-b776-f86b74b778f4" CreationDate="2011-05-10T21:05:57.623" UserId="3289" Text="[This thread][1]  talks about rendering a laser beam. It sounds as if you're trying to do something similar.&#xD;&#xA;&#xD;&#xA;The basic idea is to extrude the line into a polygon, but do it like you'd billboard a point sprite (but for a line segment).&#xD;&#xA;&#xD;&#xA;On page two in the link I gave they have this texture, which gives a good clue on how to do it:&#xD;&#xA;&#xD;&#xA;![laser beam effect texture][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.goldenstudios.or.id/forum/showthread.php?tid=2711&amp;page=1&#xD;&#xA;  [2]: http://i.stack.imgur.com/UmR4H.jpg" />
  <row Id="26515" PostHistoryTypeId="25" PostId="12150" RevisionGUID="8bf7a14c-d4da-4c1b-adea-a1ee792858bc" CreationDate="2011-05-10T21:11:38.700" Comment="http://twitter.com/#!/StackGameDev/status/68060651356045312" />
  <row Id="26516" PostHistoryTypeId="2" PostId="12156" RevisionGUID="90205d74-6615-44ce-b73a-2e0c683067ba" CreationDate="2011-05-10T21:13:53.317" UserId="3289" Text="There are two different issues here:&#xD;&#xA;&#xD;&#xA; 1. How do you read user input from the OS/hardware?&#xD;&#xA;&#xD;&#xA; 2. How do you process user input in your engine?&#xD;&#xA;&#xD;&#xA;For reading, it clearly depends on your platform, and what kind of input you want to read. Note that it's easy to convert one thing to another in your input layer. (I.e. poll and emit events to the engine, or listen to events and emit state to the engine.)&#xD;&#xA;&#xD;&#xA;For processing, there are a few different options:&#xD;&#xA;&#xD;&#xA; * For player movement control (and similar schemes), polling might be simpler as you need to recompute speed each frame. It's very likely that your inner loop will be polling based:&#xD;&#xA;&#xD;&#xA;     i.e. something like `speed += 1 if button.down else -1; clamp(speed, 0, 42);`&#xD;&#xA;&#xD;&#xA; * For discrete events (fire missile, pause game, teleport to other side of planet), event processing is preferrable, otherwise your code will be littered with `maybeLaunchMissile(key_state);` calls, and that's just ... bad, m'kay. ;)&#xD;&#xA;&#xD;&#xA;Hope it helps. " />
  <row Id="26517" PostHistoryTypeId="5" PostId="11706" RevisionGUID="36537edb-db21-4fdd-b2d7-e82b0f7808f5" CreationDate="2011-05-10T21:15:49.447" UserId="3289" Comment="formatting" Text="I have a few hundred VBOs, and I want to only draw a subset of the VBOs each frame.&#xD;&#xA;&#xD;&#xA;Is there anything faster than binding and drawing each VBO? Is there a batched draw command for multiple VBOs?&#xD;&#xA;&#xD;&#xA; 1. How do I bind multiple VBOs?&#xD;&#xA;&#xD;&#xA; 2. Is there a version of glMultiDrawElements for sets of VBOs?" />
  <row Id="26518" PostHistoryTypeId="24" PostId="11706" RevisionGUID="36537edb-db21-4fdd-b2d7-e82b0f7808f5" CreationDate="2011-05-10T21:15:49.447" Comment="Proposed by 3289 approved by 51 edit id of 426" />
  <row Id="26519" PostHistoryTypeId="6" PostId="11949" RevisionGUID="0888007a-6460-4d21-9557-b898e325fb89" CreationDate="2011-05-10T21:15:54.643" UserId="3588" Comment="Saw Tetrad create the polling tag. Well, if anything is a question about polling, it'd be one that's specifically asking about polling-based input. ♪" Text="&lt;input&gt;&lt;keyboard&gt;&lt;polling&gt;" />
  <row Id="26520" PostHistoryTypeId="24" PostId="11949" RevisionGUID="0888007a-6460-4d21-9557-b898e325fb89" CreationDate="2011-05-10T21:15:54.643" Comment="Proposed by 3588 approved by 51 edit id of 425" />
  <row Id="26521" PostHistoryTypeId="2" PostId="12157" RevisionGUID="e60d04f3-dc04-4c49-91ae-f4b549bf5205" CreationDate="2011-05-10T21:23:43.627" UserId="51" Text="I think it's more correct to say that the effect you're seeing is called &lt;a href=&quot;http://en.wikipedia.org/wiki/Aliasing&quot;&gt;Aliasing&lt;/a&gt;.  Specifically a &lt;a href=&quot;http://en.wikipedia.org/wiki/Moir%C3%A9_pattern&quot;&gt;Moiré pattern&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Basically for speed there was a naive method of picking which pixel from a texture to draw at a given pixel given the perspective of the world and the camera resolution, and the curvature you see is a side effect of the grid pattern.&#xD;&#xA;&#xD;&#xA;So no, it wasn't intentional.&#xD;&#xA;&#xD;&#xA;Mipmapping helps fix this issue as well as improves speed of rendering (as picking adjacent pixels from a lower res texture is faster due to cache coherency than picking far apart pixels on a larger texture).  But, as you can see from mipmap examples, it doesn't make the texture look &quot;right&quot;.  For that you need &lt;a href=&quot;http://en.wikipedia.org/wiki/Anisotropic_filtering&quot;&gt;anisotropic filtering&lt;/a&gt;." />
  <row Id="26522" PostHistoryTypeId="5" PostId="12157" RevisionGUID="ea768d57-a6b1-4b12-b840-2f27df5f69c6" CreationDate="2011-05-10T21:32:25.123" UserId="51" Comment="deleted 12 characters in body" Text="I think it's more correct to say that the effect you're seeing is called &lt;a href=&quot;http://en.wikipedia.org/wiki/Aliasing&quot;&gt;Aliasing&lt;/a&gt;.  Specifically a &lt;a href=&quot;http://en.wikipedia.org/wiki/Moir%C3%A9_pattern&quot;&gt;Moiré pattern&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Basically for speed there was a naive method of picking which pixel from a texture to draw at a given pixel on screen given the camera you're rendering from, and the curvature you see is a side effect of the grid pattern.&#xD;&#xA;&#xD;&#xA;So no, it wasn't intentional.&#xD;&#xA;&#xD;&#xA;Mipmapping helps fix this issue as well as improves speed of rendering (as picking adjacent pixels from a lower res texture is faster due to cache coherency than picking far apart pixels on a larger texture).  But, as you can see from mipmap examples, it doesn't make the texture look &quot;right&quot;.  For that you need &lt;a href=&quot;http://en.wikipedia.org/wiki/Anisotropic_filtering&quot;&gt;anisotropic filtering&lt;/a&gt;." />
  <row Id="26523" PostHistoryTypeId="5" PostId="12154" RevisionGUID="377e8d15-7d6a-49f0-9290-96a499077d05" CreationDate="2011-05-10T21:34:04.330" UserId="3289" Comment="added 125 characters in body; added 177 characters in body" Text="I used the textures from [this file][2] used in the [GLUT Caustics Example][1] for a game I did ten years ago. Might work for you too.&#xD;&#xA;&#xD;&#xA;It's an animation as a set of textures. Load them as a 3d texture for smooth interpolation when rendering, then use projective texturing to compute texture coordinates. The technique explained in the article (albeit with a pretty old OpenGL version, today you'd use a shader instead).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/code/samples/mjktips/caustics/&#xD;&#xA;  [2]: http://www.opengl.org/resources/code/samples/mjktips/caustics/caustics.tar.gz" />
  <row Id="26524" PostHistoryTypeId="2" PostId="12158" RevisionGUID="22a470c5-0309-4926-88c7-cf6df396f385" CreationDate="2011-05-10T22:10:57.237" UserId="7229" Text="User7032 said it right.  The problem with EVERY SINGLE MMORPG -- is the INFLUX or INPUT of items/currency.  I will collectively refer to this as &quot;value.&quot;&#xD;&#xA;&#xD;&#xA;Value, in most MMORPG's (referred to hereafter as &quot;games&quot;) is ALWAYS available.  Take old Everquest, you kill a bat, you get some items.  These items are the bat's harvestables + some common currency.  This can be done endlessly as the bats will continually respawn.  Value enters the game in this fashion so long as people are still online to gather it.&#xD;&#xA;&#xD;&#xA;Therefore, the answer to dealing with inflation/deflation -- should NOT be Value sinks.  While Value sinks are important for ensuring a level of realism to your game, they should not be viewed as the sole means of removing excess Value.  Games such as Fallensword.com tried to do this.  It fails.&#xD;&#xA;&#xD;&#xA;Instead, build the game in such a manner that players WANT to spend their Value.&#xD;&#xA;&#xD;&#xA;1)  Instead of allowing for an infinite amount of Value to enter the game, randomize the amounts that enter; and the location to where it enters.  Subsequently require certain skills and levels of that skill in order for each player to even access the given resource.&#xD;&#xA;&#xD;&#xA;2)  Completely remove influxes of &quot;currency&quot; from Farmable sources.  For example -- do not allow players to gain currency Value from killing monsters, instead only allow them to gain currency from selling the harvest to either A) players or B) NPCs though at a much lower value.&#xD;&#xA;&#xD;&#xA;3)  Introduce enough types of skills that even more advanced players will have need of other, possibly less-experienced players, to harvest all the necessary Value for whatever it is they want to have.  If it takes three harvesting skills to gather the necessary Value to produce a powerful item -- the more experienced player will likely pay a newer, poorer player for one of those harvests instead of trying to do all three himself/herself." />
  <row Id="26525" PostHistoryTypeId="5" PostId="12149" RevisionGUID="3c6d40b8-e8df-46df-8b11-9262d4ecca80" CreationDate="2011-05-10T22:25:13.633" UserId="1198" Comment="deleted 20 characters in body" Text="Consider increasing your dampening as you get closer to the target height or making a boolean switch for a fixed increase once you've reached the target and until another height is set.  That would allow you to have faster movement without sacrificing your ability to stop or requiring much change in code." />
  <row Id="26526" PostHistoryTypeId="5" PostId="12158" RevisionGUID="7f565c5c-b737-4936-8ba5-b8bd39943a8c" CreationDate="2011-05-10T22:26:49.343" UserId="1198" Comment="edited body" Text="User7032 said it right.  The problem with EVERY SINGLE MMORPG -- is the INFLUX or INPUT of items/currency.  I will collectively refer to this as &quot;value.&quot;&#xD;&#xA;&#xD;&#xA;Value, in most MMORPG's (referred to hereafter as &quot;games&quot;) is ALWAYS available.  Take old Everquest, you kill a bat, you get some items.  These items are the bat's harvestables + some common currency.  This can be done endlessly as the bats will continually respawn.  Value enters the game in this fashion so long as people are still online to gather it.&#xD;&#xA;&#xD;&#xA;Therefore, the answer to dealing with inflation/deflation -- should NOT be Value sinks.  While Value sinks are important for ensuring a level of realism to your game, they should not be viewed as the sole means of removing excess Value.  Games such as Fallensword.com tried to do this.  It fails.&#xD;&#xA;&#xD;&#xA;Instead, build the game in such a manner that players WANT to spend their Value.&#xD;&#xA;&#xD;&#xA; 1. Instead of allowing for an infinite amount of Value to enter the game, randomize the amounts that enter; and the location to where it enters.  Subsequently require certain skills and levels of that skill in order for each player to even access the given resource.&#xD;&#xA;&#xD;&#xA; 2. Completely remove influxes of &quot;currency&quot; from Farmable sources.  For example -- do not allow players to gain currency Value from killing monsters, instead only allow them to gain currency from selling the harvest to either A) players or B) NPCs though at a much lower value.&#xD;&#xA;&#xD;&#xA; 3. Introduce enough types of skills that even more advanced players will have need of other, possibly less-experienced players, to harvest all the necessary Value for whatever it is they want to have.  If it takes three harvesting skills to gather the necessary Value to produce a powerful item -- the more experienced player will likely pay a newer, poorer player for one of those harvests instead of trying to do all three himself/herself." />
  <row Id="26527" PostHistoryTypeId="4" PostId="12106" RevisionGUID="f0b0c3e5-4500-4712-984d-9ecea0d03e18" CreationDate="2011-05-10T23:02:34.183" UserId="7201" Comment="edited title" Text="Line-Rectangle Collision Detection and Response" />
  <row Id="26528" PostHistoryTypeId="2" PostId="12159" RevisionGUID="72401b78-baa0-454d-a7bb-0c55fba8fda2" CreationDate="2011-05-10T23:37:17.320" UserId="6465" Text="So.....Ok i understand the Syntax of HLSL.&#xD;&#xA;like for example let pretend I have this as my HLSL&#xD;&#xA;&#xD;&#xA;    struct VOut&#xD;&#xA;    {&#xD;&#xA;        float4 position : SV_POSITION;&#xD;&#xA;        float4 color : COLOR;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    VOut VShader(float4 position : POSITION, float4 color : COLOR)&#xD;&#xA;    {&#xD;&#xA;        VOut output;&#xD;&#xA;    &#xD;&#xA;        output.position = position;&#xD;&#xA;        output.position.xy *= 0.7f;    // &quot;shrink&quot; the vertex on the x and y axes&#xD;&#xA;        output.color = color;&#xD;&#xA;    &#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    float4 PShader(float4 position : SV_POSITION, float4 color : COLOR) : SV_TARGET&#xD;&#xA;    {&#xD;&#xA;        return color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I compile them like this:&#xD;&#xA;&#xD;&#xA;    D3DX11CompileFromFile(L&quot;shaders.hlsl&quot;, 0, 0, &quot;VShader&quot;, &quot;vs_5_0&quot;, 0, 0, 0, &amp;VS, 0, 0);&#xD;&#xA;    D3DX11CompileFromFile(L&quot;shaders.hlsl&quot;, 0, 0, &quot;PShader&quot;, &quot;ps_5_0&quot;, 0, 0, 0, &amp;PS, 0, 0);&#xD;&#xA;&#xD;&#xA;How does it like......know to change....Im confused exactly at the pipeline between HLSL and the actual Pixels/Vertex on the screen.&#xD;&#xA;&#xD;&#xA;is this what actually &quot;applies&quot; them:&#xD;&#xA;&#xD;&#xA;    dev-&gt;CreateVertexShader(VS-&gt;GetBufferPointer(), VS-&gt;GetBufferSize(), NULL, &amp;pVS);&#xD;&#xA;    dev-&gt;CreatePixelShader(PS-&gt;GetBufferPointer(), PS-&gt;GetBufferSize(), NULL, &amp;pPS);&#xD;&#xA;    &#xD;&#xA;    // set the shader objects&#xD;&#xA;    devcon-&gt;VSSetShader(pVS, 0, 0);&#xD;&#xA;    devcon-&gt;PSSetShader(pPS, 0, 0);&#xD;&#xA;&#xD;&#xA;keep in mind im like a literal BEGINNER at this stuff. Can someone maybe explain WHAT it's doing, im assuming the Vertex HLSL function goes through every vertex (as the input Position:POSITION and color: COLOR) and then changes them to whatever I have in the function, and the output is what was changed....(same goes for Pixel Shader).&#xD;&#xA;&#xD;&#xA;Another confusion, I know what a pixel is, and I understand what a vertex is.....but what exactly does the Pixel shader do......" />
  <row Id="26529" PostHistoryTypeId="1" PostId="12159" RevisionGUID="72401b78-baa0-454d-a7bb-0c55fba8fda2" CreationDate="2011-05-10T23:37:17.320" UserId="6465" Text="So im not sure I Understand HLSL" />
  <row Id="26530" PostHistoryTypeId="3" PostId="12159" RevisionGUID="72401b78-baa0-454d-a7bb-0c55fba8fda2" CreationDate="2011-05-10T23:37:17.320" UserId="6465" Text="&lt;directx&gt;&lt;hlsl&gt;" />
  <row Id="26531" PostHistoryTypeId="25" PostId="12159" RevisionGUID="3684cb9f-37e8-4df8-b837-636608dd6938" CreationDate="2011-05-11T00:11:40.383" Comment="http://twitter.com/#!/StackGameDev/status/68105951827333120" />
  <row Id="26532" PostHistoryTypeId="2" PostId="12160" RevisionGUID="ceaed704-cac2-4c5d-8ff5-e7c04fd00f3f" CreationDate="2011-05-11T00:48:40.067" UserId="1430" Text="&gt; How does it like......know to&#xD;&#xA;&gt; change....Im confused exactly at the&#xD;&#xA;&gt; pipeline between HLSL and the actual&#xD;&#xA;&gt; Pixels/Vertex on the screen.&#xD;&#xA;&#xD;&#xA;It works roughly like this: when you issue a draw call (DrawPrimitives, DrawIndexedPrimitives in D3D, Draw in 10+, et cetera), the geometry data you've bound to the pipeline (your vertex buffers) are processed. For every vertex, the vertex shader is executed to produce an output vertex in clip space.&#xD;&#xA;&#xD;&#xA;The GPU then performs some fixed functions on that clip space vertex such as clipping/culling and bringing the vertex into screen space, where it begins to rasterize the triangles. During rasterization of each triangle, the GPU interpolates vertex attributes across the surface of that triangle, feeding each interpolated attribute to the pixel shader to produce a semi-final color for that pixel (blending is applied after the pixel shader executes, thus &quot;semi-final&quot;).&#xD;&#xA;&#xD;&#xA;&gt; is this what actually &quot;applies&quot; them:&#xD;&#xA;&#xD;&#xA;The code you posted first compiles the shaders, then binds them to the pipeline where they remain active for any subsequent draw calls until changed. It doesn't actually cause them to be executed.&#xD;&#xA;&#xD;&#xA;&gt; Can someone maybe explain WHAT it's&#xD;&#xA;&gt; doing, im assuming the Vertex HLSL&#xD;&#xA;&gt; function goes through every vertex (as&#xD;&#xA;&gt; the input Position:POSITION and color:&#xD;&#xA;&gt; COLOR) and then changes them to&#xD;&#xA;&gt; whatever I have in the function, and&#xD;&#xA;&gt; the output is what was&#xD;&#xA;&gt; changed....(same goes for Pixel&#xD;&#xA;&gt; Shader).&#xD;&#xA;&gt; &#xD;&#xA;&gt; Another confusion, I know what a pixel&#xD;&#xA;&gt; is, and I understand what a vertex&#xD;&#xA;&gt; is.....but what exactly does the Pixel&#xD;&#xA;&gt; shader do......&#xD;&#xA;&#xD;&#xA;The vertex shader is responsible for transforming vertices from model space to clip space.&#xD;&#xA;&#xD;&#xA;The pixel shader is responsible for computing the penultimate color/depth for a pixel based on interpolated vertex attributes.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26533" PostHistoryTypeId="5" PostId="12159" RevisionGUID="00805022-d4d6-418e-a25e-e1d560a9f346" CreationDate="2011-05-11T00:58:31.937" UserId="1430" Comment="deleted 47 characters in body; edited title" Text="I understand the syntax of HLSL, for example let's pretend I have this as my HLSL:&#xD;&#xA;&#xD;&#xA;    struct VOut&#xD;&#xA;    {&#xD;&#xA;        float4 position : SV_POSITION;&#xD;&#xA;        float4 color : COLOR;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    VOut VShader(float4 position : POSITION, float4 color : COLOR)&#xD;&#xA;    {&#xD;&#xA;        VOut output;&#xD;&#xA;    &#xD;&#xA;        output.position = position;&#xD;&#xA;        output.position.xy *= 0.7f;    // &quot;shrink&quot; the vertex on the x and y axes&#xD;&#xA;        output.color = color;&#xD;&#xA;    &#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    float4 PShader(float4 position : SV_POSITION, float4 color : COLOR) : SV_TARGET&#xD;&#xA;    {&#xD;&#xA;        return color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I compile it like this:&#xD;&#xA;&#xD;&#xA;    D3DX11CompileFromFile(L&quot;shaders.hlsl&quot;, 0, 0, &quot;VShader&quot;, &quot;vs_5_0&quot;, 0, 0, 0, &amp;VS, 0, 0);&#xD;&#xA;    D3DX11CompileFromFile(L&quot;shaders.hlsl&quot;, 0, 0, &quot;PShader&quot;, &quot;ps_5_0&quot;, 0, 0, 0, &amp;PS, 0, 0);&#xD;&#xA;&#xD;&#xA;How does it like... know to change... I'm confused about exactly what the pipeline between HLSL and the actual pixels/vertices on the screen is.&#xD;&#xA;&#xD;&#xA;Is this what actually &quot;applies&quot; them?&#xD;&#xA;&#xD;&#xA;    dev-&gt;CreateVertexShader(VS-&gt;GetBufferPointer(), VS-&gt;GetBufferSize(), NULL, &amp;pVS);&#xD;&#xA;    dev-&gt;CreatePixelShader(PS-&gt;GetBufferPointer(), PS-&gt;GetBufferSize(), NULL, &amp;pPS);&#xD;&#xA;    &#xD;&#xA;    // set the shader objects&#xD;&#xA;    devcon-&gt;VSSetShader(pVS, 0, 0);&#xD;&#xA;    devcon-&gt;PSSetShader(pPS, 0, 0);&#xD;&#xA;&#xD;&#xA;Keep in mind I'm like a literal *beginner* at this stuff. Can someone maybe explain *what* it's doing? I'm assuming the vertex HLSL function goes through every vertex and then changes them to whatever I have in the function, and the output is what was changed... and similarly for the pixel shader?&#xD;&#xA;&#xD;&#xA;Another confusion, I know what a pixel is, and I understand what a vertex is... but what exactly does the pixel shader do?" />
  <row Id="26534" PostHistoryTypeId="4" PostId="12159" RevisionGUID="00805022-d4d6-418e-a25e-e1d560a9f346" CreationDate="2011-05-11T00:58:31.937" UserId="1430" Comment="deleted 47 characters in body; edited title" Text="I'm not sure I understand HLSL" />
  <row Id="26535" PostHistoryTypeId="5" PostId="12110" RevisionGUID="4cb3241f-ebc8-4cd7-8b50-a78ae2527879" CreationDate="2011-05-11T01:03:26.743" UserId="5021" Comment="added 98 characters in body; edited body" Text="Well, a simple way to test the intersection of a line segment against a rectangle is to do a line segment test against each line segment that the rectangle is made of.&#xD;&#xA;&#xD;&#xA;However for axis aligned boxes we can do things more efficiently.&#xD;&#xA;&#xD;&#xA;Here is the easiest to understand code that I could find:&#xD;&#xA;&#xD;&#xA;http://www.garagegames.com/community/blogs/view/309&#xD;&#xA;&#xD;&#xA;There are slightly more efficient ways, but that should suit you fine.&#xD;&#xA;&#xD;&#xA;There are dozens of implementations of this all over the internet. Search for &quot;line AABB intersection&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, you say that your box is an axis aligned box (AABB), so does this mean that your lines are also axis aligned?&#xD;&#xA;&#xD;&#xA;In that case, all you really need to test is whether each of the Y values of the four points of the AABB are above or below the Y value defined by your line, and whether each of those point's X values are within the X values defined by the segment ends of the line.&#xD;&#xA;&#xD;&#xA;As I said in the comment on your question, explain to us what you're trying to do, because as it stands your question doesn't make very much sense.&#xD;&#xA;&#xD;&#xA;If you're trying to make a game where you have lines that are not axis aligned, but the player *is* axis aligned, i.e., you have a box player that has only one corner of the box touching the lines, then my advice is to not make that game.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the box is lined up with the line, then my answer needs to change because then you want to know about OBB vs line intersection instead.&#xD;&#xA;&#xD;&#xA;If you want to make a game where the lines of the level are axis aligned, then you don't need to test the player box against the level lines, you only need to test the box points agains the level line segments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For axis aligned level lines vs AABB player:&#xD;&#xA;&#xD;&#xA;![Player position and bounding box diagram.][1]&#xD;&#xA;&#xD;&#xA;Each line segment of your level is made up of a Y value (the height of the line on the screen) and two X values (the left and right extents of the line). A line is a struct/class that stores X1, X2, Y.&#xD;&#xA;&#xD;&#xA;Your AABB player is represented by two points, bottom left and top right (call them bottom_left and top_right).&#xD;&#xA;&#xD;&#xA;C# code:&#xD;&#xA;&#xD;&#xA;    bool test_line_intersection(Line line, Vector2 bottom_left, &#xD;&#xA;            Vector2 top_right, out float intersect_amount){&#xD;&#xA;        intersect_amount = 0;&#xD;&#xA;&#xD;&#xA;        if(top_right.X &lt; line.X1){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.X &gt; line.X2){&#xD;&#xA;            // player is not intersecting line.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if(bottom_left.Y &lt; line.Y &amp;&amp; top_right.Y &gt; line.Y){&#xD;&#xA;            // bottom of player is below line 0, and player is intersecting line&#xD;&#xA;            intersect_amount = line.Y - bottom_left.Y;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // player is not intersecting line.&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If this function returns true then there is an intersection. In that case, add intersect_amount to the player position, and the player will no longer be intersecting with the line.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/v0euM.png" />
  <row Id="26536" PostHistoryTypeId="2" PostId="12161" RevisionGUID="e15a1069-ffce-4657-ad1f-c2466ff1bf9c" CreationDate="2011-05-11T01:10:13.647" UserId="7136" Text="Tile maps are quite simple.  View them as a 2D array of properties:&#xD;&#xA;&#xD;&#xA; - Sprite to display&#xD;&#xA; - World position (you can simply use your X,Y position in your 2D array and multiply it by your sprite width and height)&#xD;&#xA; - Blocks movement or&#xD;&#xA;   not (never played Farmville, so not&#xD;&#xA;   sure if this is necessary)&#xD;&#xA; - Pathfinding cost to traverse if you want to support NPCs&#xD;&#xA; - Actors&#xD;&#xA;   (either characters, items, etc...)&#xD;&#xA;   standing on the tile&#xD;&#xA;&#xD;&#xA;A basic approach to render them is calculate what fits the view of the camera, if it's a top down view this is trivial, if you're going for a 3/4 view, you will have some maths to compute which tiles to render.  If you're not going for top down, render from back to front including actors standing on the tiles, so that they gradually fill the screen and overlap objects that are further away.&#xD;&#xA;&#xD;&#xA;As a &quot;starter&quot;, I would start simple, learn how to render sprites on the target hardware and move from there." />
  <row Id="26537" PostHistoryTypeId="25" PostId="12121" RevisionGUID="212b0a1d-a52c-45be-8222-8c43fcc6fd1f" CreationDate="2011-05-11T03:11:42.153" Comment="http://twitter.com/#!/StackGameDev/status/68151261488357376" />
  <row Id="26538" PostHistoryTypeId="2" PostId="12162" RevisionGUID="c09d70f5-045d-490c-900b-791d8f3f1453" CreationDate="2011-05-11T04:22:00.007" UserId="7232" Text="[HGE][1]&#xD;&#xA;  [1]: http://hge.relishgames.com&#xD;&#xA;Seems Great.It have Particle Editor,GUI Editor,And used by pro programmers." />
  <row Id="26539" PostHistoryTypeId="16" PostId="536" RevisionGUID="e6eb1e17-11a5-4507-90cf-0e70efd6ab3f" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26540" PostHistoryTypeId="16" PostId="537" RevisionGUID="f2024e40-0890-49b7-833e-7cd8ed8833c5" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26541" PostHistoryTypeId="16" PostId="542" RevisionGUID="c555e115-a25e-4dc9-a505-981c1d7f7e3b" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26542" PostHistoryTypeId="16" PostId="545" RevisionGUID="2014fbac-03f6-4885-bbb4-add48df936ee" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26543" PostHistoryTypeId="16" PostId="563" RevisionGUID="20fb7f5b-9ef8-4ab4-bfc8-f66d64343de7" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26544" PostHistoryTypeId="16" PostId="741" RevisionGUID="b94b9da8-df37-406a-a810-84d4e17e8640" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26545" PostHistoryTypeId="16" PostId="996" RevisionGUID="7892e1f5-7a73-4eb3-b091-c8801707c468" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26546" PostHistoryTypeId="16" PostId="998" RevisionGUID="c24cc3c4-3b74-41c8-a224-62acc8a1530d" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26547" PostHistoryTypeId="16" PostId="1004" RevisionGUID="c32e3d43-caaa-456c-840d-e76437f5b0f3" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26548" PostHistoryTypeId="16" PostId="1016" RevisionGUID="4569b1bf-48ee-46cb-91fd-7467d5b546d6" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26549" PostHistoryTypeId="16" PostId="1018" RevisionGUID="bce47872-cdbd-47ca-b9dc-4bac1cd58336" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26550" PostHistoryTypeId="16" PostId="1146" RevisionGUID="3d7ebfa4-9cdd-4893-93e6-17ab2c28d2a3" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26551" PostHistoryTypeId="16" PostId="1148" RevisionGUID="390b2af4-bd2b-4185-b90e-d0d369b295bd" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26552" PostHistoryTypeId="16" PostId="1348" RevisionGUID="c9c9f371-1bb9-4001-9086-cc28571a5523" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26553" PostHistoryTypeId="16" PostId="1865" RevisionGUID="792372da-b05d-4f57-856e-9a5e04815d70" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26554" PostHistoryTypeId="16" PostId="1872" RevisionGUID="1422cac2-ee16-484d-be44-8e3a257e06ad" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26555" PostHistoryTypeId="16" PostId="2152" RevisionGUID="4c1224d4-f5c9-498d-a37e-68fef4a1841a" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26556" PostHistoryTypeId="16" PostId="3723" RevisionGUID="8066b0cd-49e6-46e1-ad7b-2932182b62e4" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26557" PostHistoryTypeId="16" PostId="7844" RevisionGUID="764d4565-01d5-45d3-9943-d0ed2f01bd1b" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26558" PostHistoryTypeId="16" PostId="10726" RevisionGUID="d160518c-75e8-46dd-b0e7-dc54409dd7ee" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26559" PostHistoryTypeId="16" PostId="11369" RevisionGUID="05d77444-2292-4339-82c0-4d81b07264f4" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26560" PostHistoryTypeId="16" PostId="11372" RevisionGUID="d816f9bc-9250-4b4b-a8a5-437918739efe" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26561" PostHistoryTypeId="16" PostId="12162" RevisionGUID="91f965b3-5219-4d0a-ba93-2c93e4fdfbaf" CreationDate="2011-05-11T04:38:21.590" UserId="51" />
  <row Id="26562" PostHistoryTypeId="2" PostId="12163" RevisionGUID="5727f6ce-3066-40a9-8ec3-0b44fab42f0d" CreationDate="2011-05-11T05:44:13.137" UserId="4459" Text="I'm an experienced developer but recently I've been wanting to get into game programming but as you know game development is an entirely different beast from most other forms of programming (perhaps only bested by operating system development).&#xD;&#xA;That being said I've been reading Game Coding Complete (ISBN 978-1-58450-680-5) by Mike McShaffry.&#xD;&#xA;Originally I was going to try developing with a component model with the assortment of usual components (e.g. SpacialComponent, VisualComponent, EntityLogicComponent, etc..) however Mr. McShaffry recommends using the MVC model which looks very attractive but I'm not sure how I can make it work with the component model if at possible but without components the MVC model looks sort of the evil monolithic inheritance monster and not very flexible which I'm not really interested in.&#xD;&#xA;I'm really confused about where to go from this point.&#xD;&#xA;&#xD;&#xA;Do you more experienced game coding voodoo experts have any thoughts or recommendations?&#xD;&#xA;Thank you so much!" />
  <row Id="26563" PostHistoryTypeId="1" PostId="12163" RevisionGUID="5727f6ce-3066-40a9-8ec3-0b44fab42f0d" CreationDate="2011-05-11T05:44:13.137" UserId="4459" Text="MVC or Components, or both?" />
  <row Id="26564" PostHistoryTypeId="3" PostId="12163" RevisionGUID="5727f6ce-3066-40a9-8ec3-0b44fab42f0d" CreationDate="2011-05-11T05:44:13.137" UserId="4459" Text="&lt;engine&gt;&lt;architecture&gt;&lt;design-patterns&gt;&lt;component-based&gt;" />
  <row Id="26565" PostHistoryTypeId="25" PostId="12163" RevisionGUID="0ffe10b6-d4d8-4beb-8c5b-51669ad59c39" CreationDate="2011-05-11T06:11:42.197" Comment="http://twitter.com/#!/StackGameDev/status/68196561611530241" />
  <row Id="26566" PostHistoryTypeId="2" PostId="12164" RevisionGUID="02234eb4-586d-400d-a0d7-ee8eb3b1611d" CreationDate="2011-05-11T09:05:17.273" UserId="3289" Text="[This question][1] on StackOverflow talks about component based design, it might help you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1901251/component-based-game-engine-design" />
  <row Id="26567" PostHistoryTypeId="25" PostId="12130" RevisionGUID="29eddc84-79a2-483d-8136-87336e8b7d27" CreationDate="2011-05-11T09:11:42.633" Comment="http://twitter.com/#!/StackGameDev/status/68241861499822081" />
  <row Id="26568" PostHistoryTypeId="2" PostId="12165" RevisionGUID="8b797c8b-f9f8-4ea8-84a2-89ec1a9e86db" CreationDate="2011-05-11T09:15:38.937" UserId="6783" Text="With the precious little knowledge we have , and the infinite amount of information in the universe you are going to have to look at that question as simple and selfish as possible.&#xD;&#xA;&#xD;&#xA;What do I have to gain from doing that?&#xD;&#xA;&#xD;&#xA;You already set the landmark for yourself saying this: &quot;but Im not sure if I want to invest time into something that &quot;isn't going to last&quot;&quot;&#xD;&#xA;&#xD;&#xA;So the real question you wanted to ask was: &quot;Which is going to last longer&quot;&#xD;&#xA;&#xD;&#xA;And why ask that?&#xD;&#xA;&#xD;&#xA;To know which you can use more for work/income right?&#xD;&#xA;&#xD;&#xA;I would not recommend setting either in stone based on clairvoyance, instead browse for factual information on the net, look what companies and trends are going to last or find those that actually know that. I myself wouldn't have the foggiest idea and I care not to find out, I would burn that bridge when I get there. If I need to learn something new I would say: &quot;Hurray!&quot; rather than &quot;Oh no!&quot;" />
  <row Id="26569" PostHistoryTypeId="2" PostId="12166" RevisionGUID="d2825978-8548-4ae6-94cd-c5bc15d62c19" CreationDate="2011-05-11T09:45:07.200" UserId="7237" Text="I'm considering implementing a talent-tree system for an online RPG, similar to that seen in World of Warcraft, where acquiring a skill unlocks the next &quot;tier&quot; beneath it in the tree.&#xD;&#xA;&#xD;&#xA;Does anyone know of the best way of implementing this structurally in the database/code?" />
  <row Id="26570" PostHistoryTypeId="1" PostId="12166" RevisionGUID="d2825978-8548-4ae6-94cd-c5bc15d62c19" CreationDate="2011-05-11T09:45:07.200" UserId="7237" Text="Talent Tree structure (Diablo/WoW style)" />
  <row Id="26571" PostHistoryTypeId="3" PostId="12166" RevisionGUID="d2825978-8548-4ae6-94cd-c5bc15d62c19" CreationDate="2011-05-11T09:45:07.200" UserId="7237" Text="&lt;mmo&gt;&lt;rpg&gt;&lt;data-structure&gt;" />
  <row Id="26573" PostHistoryTypeId="2" PostId="12168" RevisionGUID="ba226d28-060b-4b46-8d4c-c16903599a03" CreationDate="2011-05-11T09:56:07.527" UserId="6783" Text="In one word. &quot;Shatter&quot;&#xD;&#xA;&#xD;&#xA;That game is your go to place for modern arkanoid. Toss the whole pong idea aside in my opinion.&#xD;&#xA;&#xD;&#xA;the previous answers already clearly explain the problem with pong." />
  <row Id="26574" PostHistoryTypeId="2" PostId="12169" RevisionGUID="0c609e8f-e5ed-430b-8081-1574ae2160a7" CreationDate="2011-05-11T09:59:10.710" UserId="1582" Text="[FlatredBall][1]&#xD;&#xA;It's free (not open source) 2.5D (2d with 3d primitives) game engine for XNA and Silverlight. More in [features][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com/frb/blog/&#xD;&#xA;  [2]: http://www.flatredball.com/frb/docs/index.php?title=FlatRedBall_Features" />
  <row Id="26575" PostHistoryTypeId="16" PostId="12169" RevisionGUID="5842e037-f67a-44a5-acf6-3fdf400bb250" CreationDate="2011-05-11T09:59:10.710" UserId="1582" />
  <row Id="26576" PostHistoryTypeId="2" PostId="12170" RevisionGUID="3be0a7e1-91be-48a3-9e8e-1801e12255ef" CreationDate="2011-05-11T10:02:29.387" UserId="4559" Text="I found the problem I think.&#xD;&#xA;&#xD;&#xA;This is my theory only I don't know what happens actually.&#xD;&#xA;Here is a representation of the image in memory. Every pixel is a 0, and X marks the rectangle where I draw and that needs to be uploaded to video memory. &#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;00000000000000000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;00000000000000000000000000&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;If I do `LockBits` I lock everything from A to B, so I get something like this in memory:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;....&#xD;&#xA;          A   &#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;....         B&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;or&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;          xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Notice I have a bunch of 0-s INTERLEAVED there and not just x, and probably that causes the problem when I upload the data to video memory, this is why it is distorted.&#xD;&#xA;&#xD;&#xA;If I do the following lock it works ok. Notice that I lock 3 FULL ROWS of pixels.&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;....&#xD;&#xA;A&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;0000000000xxxx000000000000&#xD;&#xA;....                     B&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;So the solution is to only upload the X-es without any zeroes or to upload full rows, or everything. I was lazy and I also needed all the (locked) bytes for collision detection anyways so I uploaded everything.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="26577" PostHistoryTypeId="2" PostId="12171" RevisionGUID="365da39b-7da5-4d71-8229-44a6241628c1" CreationDate="2011-05-11T10:44:33.847" UserId="5508" Text="I would recommend using an [directed acyclic graph][1], where each node represents a specific talent/skill. Based on whether or not the player has earned a talent, its child talents can be earned. For example the following data structure&#xD;&#xA;&#xD;&#xA;    class Talent {&#xD;&#xA;        Talent* children;&#xD;&#xA;        int childCount;&#xD;&#xA;        bool earned;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;To determine which talents a player has, you take the root talent and walk down&#xD;&#xA;the graph until you reach the talent nodes where earned is false. This will also&#xD;&#xA; reveal which talents are available for obtaining: the first talent in each branch down from the root talent where earned is false.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Directed_acyclic_graph" />
  <row Id="26578" PostHistoryTypeId="2" PostId="12172" RevisionGUID="e7c8f41a-075a-4df6-ab65-9bd85dcdcad5" CreationDate="2011-05-11T12:00:06.660" UserId="6465" Text="So im still learning but I think i've got a grasp of most things DX11 (Well....beginner things) And I REALLY do apologize for all the questions.....but I'd rather understand EVERYTHING before I move on.&#xD;&#xA;I have 2 main functions (well 3 technically) that set up everything. I have Initgraphics(), InitD3D(), and Initpipeline()&#xD;&#xA;&#xD;&#xA;D3D sets up the swap chain, viewport, depth buffer and back buffer.&#xD;&#xA;Initgraphics() Creates the Verticies (for the cube/whatever im drawing) and then creates the vertex buffer and copies it in.&#xD;&#xA;&#xD;&#xA;    // create the vertex buffer&#xD;&#xA;    D3D11_BUFFER_DESC bd;&#xD;&#xA;    ZeroMemory(&amp;bd, sizeof(bd));&#xD;&#xA;    &#xD;&#xA;    bd.Usage = D3D11_USAGE_DYNAMIC;&#xD;&#xA;    bd.ByteWidth = sizeof(VERTEX) * 24;&#xD;&#xA;    bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;&#xD;&#xA;    bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;    &#xD;&#xA;    dev-&gt;CreateBuffer(&amp;bd, NULL, &amp;pVBuffer);&#xD;&#xA;    &#xD;&#xA;    // copy the vertices into the buffer&#xD;&#xA;    D3D11_MAPPED_SUBRESOURCE ms;&#xD;&#xA;    devcon-&gt;Map(pVBuffer, NULL, D3D11_MAP_WRITE_DISCARD, NULL, &amp;ms);    // map the buffer&#xD;&#xA;    memcpy(ms.pData, OurVertices, sizeof(OurVertices));                 // copy the data&#xD;&#xA;    devcon-&gt;Unmap(pVBuffer, NULL);&#xD;&#xA;&#xD;&#xA;it also does the same thing for the Index buffer.&#xD;&#xA;&#xD;&#xA;I also have initpipeline() (see code below)&#xD;&#xA;&#xD;&#xA;    // compile the shaders&#xD;&#xA;    ID3D10Blob *VS, *PS;&#xD;&#xA;    D3DX11CompileFromFile(L&quot;shaders.hlsl&quot;, 0, 0, &quot;VShader&quot;, &quot;vs_5_0&quot;, 0, 0, 0, &amp;VS, 0, 0);&#xD;&#xA;    D3DX11CompileFromFile(L&quot;shaders.hlsl&quot;, 0, 0, &quot;PShader&quot;, &quot;ps_5_0&quot;, 0, 0, 0, &amp;PS, 0, 0);&#xD;&#xA;    &#xD;&#xA;    // create the shader objects&#xD;&#xA;    dev-&gt;CreateVertexShader(VS-&gt;GetBufferPointer(), VS-&gt;GetBufferSize(), NULL, &amp;pVS);&#xD;&#xA;    dev-&gt;CreatePixelShader(PS-&gt;GetBufferPointer(), PS-&gt;GetBufferSize(), NULL, &amp;pPS);&#xD;&#xA;    &#xD;&#xA;    // set the shader objects&#xD;&#xA;    devcon-&gt;VSSetShader(pVS, 0, 0);&#xD;&#xA;    devcon-&gt;PSSetShader(pPS, 0, 0);&#xD;&#xA;    &#xD;&#xA;    // create the input element object&#xD;&#xA;      D3D11_INPUT_ELEMENT_DESC ied[] =&#xD;&#xA;    {&#xD;&#xA;        {&quot;POSITION&quot;, 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},&#xD;&#xA;        {&quot;NORMAL&quot;, 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},&#xD;&#xA;        {&quot;TEXCOORD&quot;, 0, DXGI_FORMAT_R32G32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0},&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // use the input element descriptions to create the input layout&#xD;&#xA;    dev-&gt;CreateInputLayout(ied, 3, VS-&gt;GetBufferPointer(), VS-&gt;GetBufferSize(), &amp;pLayout);&#xD;&#xA;    devcon-&gt;IASetInputLayout(pLayout);&#xD;&#xA;    &#xD;&#xA;    // create the constant buffer&#xD;&#xA;    D3D11_BUFFER_DESC bd;&#xD;&#xA;    ZeroMemory(&amp;bd, sizeof(bd));&#xD;&#xA;    &#xD;&#xA;    bd.Usage = D3D11_USAGE_DEFAULT;&#xD;&#xA;    bd.ByteWidth = 176;&#xD;&#xA;    bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;    &#xD;&#xA;    dev-&gt;CreateBuffer(&amp;bd, NULL, &amp;pCBuffer);&#xD;&#xA;    &#xD;&#xA;    devcon-&gt;VSSetConstantBuffers(0, 1, &amp;pCBuffer);&#xD;&#xA;&#xD;&#xA;Which from my understanding, compiles the shaders, makes the shader objects, creates the elements object and descriptions (Can someone explain what exactly this is?) and the Constant Buffer (which I only somewhat understand).&#xD;&#xA;&#xD;&#xA;I guess my question(s) is.....when do these things need to change. I have a grip on the vertex and index buffers.....like I understand WHAT they are, but when would you change them? Same goes for Depth buffer, when would I ever want to change that (I understand back buffer). I know in my RenderFrame() function I select which ones to use using: right?&#xD;&#xA;&#xD;&#xA;       devcon-&gt;IASetVertexBuffers(0, 1, &amp;pVBuffer, &amp;stride, &amp;offset);&#xD;&#xA;       devcon-&gt;IASetIndexBuffer(pIBuffer, DXGI_FORMAT_R32_UINT, 0);&#xD;&#xA;&#xD;&#xA;Secondly, Do I only need to compile the shaders once and make the objects once? (unless I use different shader files presumably...maybe one for lights for one object and one for textures for a different object)....and what the heck does this:&#xD;&#xA;&#xD;&#xA;    // create the input element object&#xD;&#xA;      D3D11_INPUT_ELEMENT_DESC ied[] =&#xD;&#xA;    {&#xD;&#xA;        {&quot;POSITION&quot;, 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},&#xD;&#xA;        {&quot;NORMAL&quot;, 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},&#xD;&#xA;        {&quot;TEXCOORD&quot;, 0, DXGI_FORMAT_R32G32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0},&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // use the input element descriptions to create the input layout&#xD;&#xA;    dev-&gt;CreateInputLayout(ied, 3, VS-&gt;GetBufferPointer(), VS-&gt;GetBufferSize(), &amp;pLayout);&#xD;&#xA;    devcon-&gt;IASetInputLayout(pLayout);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Stuff mean?. Also what is a Stencil Buffer.....im not really sure I understand why you create it (Does it ever need to change for that matter?)" />
  <row Id="26579" PostHistoryTypeId="1" PostId="12172" RevisionGUID="e7c8f41a-075a-4df6-ab65-9bd85dcdcad5" CreationDate="2011-05-11T12:00:06.660" UserId="6465" Text="How Often do you change Vertex/Index/etc Buffers?" />
  <row Id="26580" PostHistoryTypeId="3" PostId="12172" RevisionGUID="e7c8f41a-075a-4df6-ab65-9bd85dcdcad5" CreationDate="2011-05-11T12:00:06.660" UserId="6465" Text="&lt;directx&gt;&lt;directx11&gt;" />
  <row Id="26581" PostHistoryTypeId="2" PostId="12173" RevisionGUID="e6f92268-c350-4565-be44-2b7195be1613" CreationDate="2011-05-11T12:11:27.257" UserId="3656" Text="Useful questions:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/7713/mvc-model-view-controller-game-engine-architecture-yes-or-no&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/3426/why-are-mvc-tdd-not-employed-more-in-game-architecture&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/5372/mvc-like-compartmentalization-in-games&#xD;&#xA;&#xD;&#xA;For me, I have a RenderComponent base class and then a few that inherit from that (GameSprite, UISprite, or if you're doing 3d StaticModel, DynamicModel, BillboardModel, etc.) and if the object wants itself rendered, the object submits its RenderComponent member to the rendering system. No need for the rendering system to know what kind of object submitted the RenderComponent. It just knows it's got something to render and it better do it, or else!&#xD;&#xA;&#xD;&#xA;Keep it basic and centered around composition rather than inheritance. Separating logic, data, and representation isn't incompatible with a component system." />
  <row Id="26582" PostHistoryTypeId="25" PostId="12172" RevisionGUID="26b0280e-f2e5-46e9-ac2b-423cefbe8b33" CreationDate="2011-05-11T12:11:43.373" Comment="http://twitter.com/#!/StackGameDev/status/68287163711762432" />
  <row Id="26583" PostHistoryTypeId="2" PostId="12174" RevisionGUID="3ead270f-20d4-4d54-9b16-0742638cc6fb" CreationDate="2011-05-11T12:52:03.777" UserId="1101" Text="I'd recommend ignoring components for your first game because they solve some types of complexity by adding more complexity in other areas, and if you've not already made a game you have no idea whether this trade-off is worth it or not.&#xD;&#xA;&#xD;&#xA;For the most part though, don't get bogged down in programming paradigms and just code a game. There are no right or wrong ways, otherwise nobody would need to ask this sort of question. Work it out as you go along." />
  <row Id="26584" PostHistoryTypeId="5" PostId="12171" RevisionGUID="7d39f5eb-2514-42ae-bbe9-cd167cdebdd4" CreationDate="2011-05-11T12:56:31.963" UserId="5508" Comment="horrible C/C++ mixup with regards to arrays" Text="I would recommend using an [directed acyclic graph][1], where each node represents a specific talent/skill. Based on whether or not the player has earned a talent, its child talents can be earned. For example the following data structure&#xD;&#xA;&#xD;&#xA;    class Talent {&#xD;&#xA;        std::vector&lt;Talent*&gt; children;&#xD;&#xA;        bool earned;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;To determine which talents a player has, you take the root talent and walk down&#xD;&#xA;the graph until you reach the talent nodes where earned is false. This will also&#xD;&#xA; reveal which talents are available for obtaining: the first talent in each branch down from the root talent where earned is false.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Directed_acyclic_graph" />
  <row Id="26585" PostHistoryTypeId="2" PostId="12175" RevisionGUID="8fbb385f-2db2-4650-9e84-31c718cf0dc0" CreationDate="2011-05-11T12:57:20.500" UserId="7237" Text="I had a similar problem with &quot;CCCallFunc&quot;. It turned out I needed to be using &quot;CCCallFuncN&quot; instead, confusing because they are so similarly named. I would try replacing the line of code it's tripping up on with&#xD;&#xA;&#xD;&#xA;    CCCallFuncN *a = [CCCallFuncN actionWithTarget:self selector:(@selector(shoot:)) object:enemy2];&#xD;&#xA;" />
  <row Id="26586" PostHistoryTypeId="2" PostId="12176" RevisionGUID="13d4955a-ff18-4130-9f7a-4940e3a69bfd" CreationDate="2011-05-11T13:11:27.927" UserId="6655" Text="Use a structure like this to represent a tree in a database:&#xD;&#xA;&#xD;&#xA;    #Talent&#xD;&#xA;    id  parent  description&#xD;&#xA;    1   0       Tackle&#xD;&#xA;    2   1       Kick&#xD;&#xA;    3   1       Punch&#xD;&#xA;    4   3       Fire Punch&#xD;&#xA;&#xD;&#xA;And another table to represent acquired talents per user&#xD;&#xA;&#xD;&#xA;    #UserTalent&#xD;&#xA;    id  user  talent&#xD;&#xA;    1   4     1&#xD;&#xA;    2   4     3&#xD;&#xA;    3   4     4&#xD;&#xA;&#xD;&#xA;You can check for talent dependencies programatically by querying the complete talent table, and building a linked tree. You can also do that with SQL but it will require either recursive subselects or lots of queries. Better do it in your code.&#xD;&#xA;&#xD;&#xA;If there are multiple dependencies, like for example `Fire Punch` depends on `Punch` AND `Immolation` use two tables to represent the dependency graph:&#xD;&#xA;&#xD;&#xA;    #Talent&#xD;&#xA;    id  description&#xD;&#xA;    1   Tackle&#xD;&#xA;    2   Kick&#xD;&#xA;    3   Punch&#xD;&#xA;    4   Fire Punch&#xD;&#xA;    5   Immolation&#xD;&#xA;&#xD;&#xA;    #Depedency&#xD;&#xA;    id  parent  child&#xD;&#xA;    1   0       1&#xD;&#xA;    2   0       5&#xD;&#xA;    3   1       2&#xD;&#xA;    4   1       3&#xD;&#xA;    5   3       4&#xD;&#xA;    6   5       4&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26587" PostHistoryTypeId="2" PostId="12177" RevisionGUID="02b238a2-5bac-4313-aeda-c5ada0184d46" CreationDate="2011-05-11T04:17:55.120" UserDisplayName="LightWing" Text="I am looking for a good 2d game engine.In the past year i have used Haaf's Game Engine.It is really great but it seem that it does't support now.Its last update back to 2008.I don't want game engines such as LOVE that you must develope your game completly in lua.I need something like Haaf's Game Engine.&#xD;&#xA;You can see it at:&#xD;&#xA;http://hge.relishgames.com/&#xD;&#xA;&#xD;&#xA;In HGE (Haaf's Game Engine) I can develope my game in c++.&#xD;&#xA;I am looking for a game engine that support now." />
  <row Id="26588" PostHistoryTypeId="1" PostId="12177" RevisionGUID="02b238a2-5bac-4313-aeda-c5ada0184d46" CreationDate="2011-05-11T04:17:55.120" UserDisplayName="LightWing" Text="2d game engine like Haaf's Game Engine (HGE)" />
  <row Id="26589" PostHistoryTypeId="3" PostId="12177" RevisionGUID="02b238a2-5bac-4313-aeda-c5ada0184d46" CreationDate="2011-05-11T04:17:55.120" UserDisplayName="LightWing" Text="&lt;c++&gt;&lt;engine&gt;" />
  <row Id="26590" PostHistoryTypeId="17" PostId="12177" RevisionGUID="5dbd73dd-2347-4d56-9cf7-0ddc6cf9ec09" CreationDate="2011-05-11T13:26:04.790" UserId="-1" Comment="from http://stackoverflow.com/questions/5959193/2d-game-engine-like-haafs-game-engine-hge" Text="" />
  <row Id="26591" PostHistoryTypeId="2" PostId="12178" RevisionGUID="873a5d04-696d-478e-9c96-9205202390b8" CreationDate="2011-05-11T13:47:35.380" UserId="6465" Text="Quick easy question. When setting a Rasterizer State (like for example wireframe).....does that affect every object (model) on the screen.&#xD;&#xA;&#xD;&#xA;Like for example lets pretend I have 2 cubes........and then I use:                  devcon-&gt;RSSetState(pRSWireframe);&#xD;&#xA;&#xD;&#xA;will that effect all the objects on the screen?" />
  <row Id="26592" PostHistoryTypeId="1" PostId="12178" RevisionGUID="873a5d04-696d-478e-9c96-9205202390b8" CreationDate="2011-05-11T13:47:35.380" UserId="6465" Text="Rasterizer State Question" />
  <row Id="26593" PostHistoryTypeId="3" PostId="12178" RevisionGUID="873a5d04-696d-478e-9c96-9205202390b8" CreationDate="2011-05-11T13:47:35.380" UserId="6465" Text="&lt;directx11&gt;" />
  <row Id="26594" PostHistoryTypeId="2" PostId="12179" RevisionGUID="a2458253-931a-4ac7-8d3b-66e6729191b1" CreationDate="2011-05-11T13:52:16.623" UserId="4662" Text="It will only affect objects rendered after the state is changed." />
  <row Id="26596" PostHistoryTypeId="5" PostId="12177" RevisionGUID="ffc18c8d-952a-4207-ad8a-119a01533985" CreationDate="2011-05-11T14:26:03.010" UserId="51" Comment="deleted 130 characters in body; edited tags; edited title" Text="I am looking for a good 2d game engine. In the past year I have used &lt;a href=&quot;http://hge.relishgames.com/&quot;&gt;Haaf's Game Engine&lt;/a&gt;. It is really great but it seems that it supported anymore. Its last update was in 2008. I don't want to use a game engine such as LOVE that you must develop your game completely in lua. I want to use C++." />
  <row Id="26597" PostHistoryTypeId="4" PostId="12177" RevisionGUID="ffc18c8d-952a-4207-ad8a-119a01533985" CreationDate="2011-05-11T14:26:03.010" UserId="51" Comment="deleted 130 characters in body; edited tags; edited title" Text="2d game engine written in C++" />
  <row Id="26598" PostHistoryTypeId="6" PostId="12177" RevisionGUID="ffc18c8d-952a-4207-ad8a-119a01533985" CreationDate="2011-05-11T14:26:03.010" UserId="51" Comment="deleted 130 characters in body; edited tags; edited title" Text="&lt;c++&gt;&lt;2d&gt;&lt;engine&gt;" />
  <row Id="26599" PostHistoryTypeId="2" PostId="12180" RevisionGUID="70f46e22-1dda-48b2-8b35-8a94d7724788" CreationDate="2011-05-11T14:31:47.510" UserId="1732" Text="We are a small developer company planing to create our first social game. Social games look like a promising genre for monetization, but looking at the actual market (dominated by big players) and revenue needed, it actually appears like a very, very risky business, besides games being a hit-business anyway.&#xD;&#xA;&#xD;&#xA;costs: 4 devs x 5 months x 3k$ + ads+gfx+sfx+server ~200k$&#xD;&#xA;using an optimistic ARPU of 1$/m, we have to keep about 20k DAU per month for one year&#xD;&#xA;&#xD;&#xA;This only sounds viable with a very simplistic (costs!) but engaging game ... and lot of luck.&#xD;&#xA;&#xD;&#xA;Are there any examples of simple but successful social games - not necessarily indie - besides games such as card games, casino games or lucky strikes like Pocket Frogs?&#xD;&#xA;" />
  <row Id="26600" PostHistoryTypeId="1" PostId="12180" RevisionGUID="70f46e22-1dda-48b2-8b35-8a94d7724788" CreationDate="2011-05-11T14:31:47.510" UserId="1732" Text="Examples for simple, succesful social games" />
  <row Id="26601" PostHistoryTypeId="3" PostId="12180" RevisionGUID="70f46e22-1dda-48b2-8b35-8a94d7724788" CreationDate="2011-05-11T14:31:47.510" UserId="1732" Text="&lt;business&gt;&lt;facebook&gt;&lt;social&gt;" />
  <row Id="26602" PostHistoryTypeId="2" PostId="12181" RevisionGUID="58dbace5-7c71-4ba0-ae39-c629eb6cdf1a" CreationDate="2011-05-11T14:37:50.473" UserId="2228" Text="Wouldn't it be better (just cpu performance) this formula:&#xD;&#xA;&#xD;&#xA;    Vector3D displacement = ((CurrentVelocity + (direction * Acceleration * 0.5f * elapsedTime)) * elapsedTime);&#xD;&#xA;&#xD;&#xA;Instead of given one&#xD;&#xA;&#xD;&#xA;    Vector3D displacement = (CurrentVelocity * elapsedTime) + (direction * Acceleration * 0.5f * elapsedTime * elapsedTime);&#xD;&#xA;&#xD;&#xA;as it has 1 less operation?" />
  <row Id="26603" PostHistoryTypeId="2" PostId="12182" RevisionGUID="7577e914-2934-47a6-88c4-1b10fe4fe56b" CreationDate="2011-05-11T14:40:41.733" UserId="5401" Text="Batch, batch, batch!!&#xD;&#xA;(Ab)use the GPU to render as much as possible in each draw call.&#xD;&#xA;Games are mostly limited by the amount of state changes, not so much by the amount of triangles." />
  <row Id="26604" PostHistoryTypeId="16" PostId="12182" RevisionGUID="4a1e98d5-8f5f-4291-98cb-21c7e927b757" CreationDate="2011-05-11T14:40:41.733" UserId="5401" />
  <row Id="26605" PostHistoryTypeId="2" PostId="12183" RevisionGUID="b5b7c483-6067-4f4b-b0f2-e7873cb06089" CreationDate="2011-05-11T14:55:22.053" UserId="4410" Text="I'd recommend reading the Direct3D documentation as it will do a fantastic job at explaining most of your questions. For example, the page on [Constant Buffers][1].&#xD;&#xA;&#xD;&#xA;Stencil Buffers are described very elequantly on [Wikipedia][2]. You only need to create one if you plan on doing operations that involve creating and using masks to control the pixels to apply an operation to (much like a stencil in painting).&#xD;&#xA;&#xD;&#xA;As with most API calls, the less you can call them the better. Most static resources (i.e. those that don't change during the course of the application running) are created once (for vertex buffers this can also involve populating with the vertices) and then set whenever they're needed. There are dynamic resources (again such as vertex buffers) that you might want to create the resource, but then you may change the contents of on a regular basis (such as for rendering UI or dynamic particles among other things).&#xD;&#xA;&#xD;&#xA;You might want to change to a different depth buffer if you want to render to a different render target such as a dynamic cubemap, reflection, etc.&#xD;&#xA;&#xD;&#xA;That last part where you create the InputLayout, you're basically telling D3D where to find the vertex data inside the vertex buffer. You can put whatever you want in the buffer, all D3D asks is you tell it how many bytes it needs to skip to the next vertex and what offset important bits are from the start of the vertex (such as position, normal and texture coordinates). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb205133%28v=VS.85%29.aspx#Buffer_Types&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Stencil_buffer" />
  <row Id="26606" PostHistoryTypeId="5" PostId="12180" RevisionGUID="31a0b0d8-3378-49fa-9ebe-4af2b4753cd2" CreationDate="2011-05-11T15:04:32.063" UserId="1732" Comment="added 124 characters in body" Text="We are a small developer company planing to create our first social game. Social games look like a promising genre for monetization, but looking at the actual market (dominated by big players) and revenue needed, it actually appears like a very, very risky business, besides games being a hit-business anyway.&#xD;&#xA;&#xD;&#xA;costs: 4 devs x 5 months x 3k$ + ads+gfx+sfx+server ~200k$&#xD;&#xA;using an optimistic ARPU of 1$/m, we have to keep about 20k DAU per month for one year&#xD;&#xA;&#xD;&#xA;This only sounds viable with a very simplistic (costs!) but engaging game ... and lot of luck.&#xD;&#xA;&#xD;&#xA;Are there any examples of fast to develop but successful social games - not necessarily indie - besides games such as card games, casino games? There is Pocket Frogs and Doodle God, which look simple to develop compared to content-rich game like FarmTown, but it seems these are the exception.&#xD;&#xA;" />
  <row Id="26607" PostHistoryTypeId="25" PostId="12166" RevisionGUID="53745c2d-fdea-4e1b-bd4c-2ee6bbbc5e91" CreationDate="2011-05-11T15:11:45.977" Comment="http://twitter.com/#!/StackGameDev/status/68332472689098752" />
  <row Id="26608" PostHistoryTypeId="2" PostId="12184" RevisionGUID="940a862f-182d-490e-805a-a191a216f3a7" CreationDate="2011-05-11T15:30:18.893" UserId="6937" Text="Farmville has the best development time to success ratio that I know of in any game development in any genre. &#xD;&#xA;&#xD;&#xA;It took them [5 weeks][1]&#xD;&#xA;&#xD;&#xA;I have no idea how much they've made as that's not public knowledge as far as I know. I can say that Zynga's latest valuation is around 10 billion USD and farmville was the catalyst that brought their company into the billion mark. They have about 58 million monthly active users.&#xD;&#xA;&#xD;&#xA;I'm sure you've thought of farmville in asking this question, but if you look at most of the games from Zynga, you will get the short development time with high success. From appearances, I'de say most of their games initial releases cost less than 200k. Cityville is now their most active game with slightly over 60 million users.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/news/view/98990-How-FarmVille-Was-Written-In-Five-Weeks" />
  <row Id="26609" PostHistoryTypeId="2" PostId="12185" RevisionGUID="c8e7057b-bed6-4afb-92da-147fa1024e06" CreationDate="2011-05-11T15:36:41.547" UserId="1430" Text="There's [SFML][1], but that may not be &quot;engine-enough&quot; for your needs. There's also [ClanLib][2], which is probably still too much of a toolkit for your you, and [FIFE][3]. Overall I think FIFE would be my strongest recommendation for an &quot;engine&quot; of the three, but *it* might be too geared towards isometric graphics.&#xD;&#xA;&#xD;&#xA;[DevMaster has a list of engines][4] (mostly 3D, but some may be suitable for 2D) if that's not enough [Wikipedia has a list][5], and [so does GPWiki][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/&#xD;&#xA;  [2]: http://clanlib.org/wiki/Main_Page&#xD;&#xA;  [3]: http://fifengine.net/&#xD;&#xA;  [4]: http://www.devmaster.net/engines/&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/List_of_game_engines&#xD;&#xA;  [6]: http://gpwiki.org/index.php/Game_Engines" />
  <row Id="26610" PostHistoryTypeId="2" PostId="12186" RevisionGUID="a2af3660-8156-4210-9bf7-30ea4892def1" CreationDate="2011-05-11T15:49:17.770" UserId="7242" Text="I'm currently doing some pathfinding research and my simulation is the following:&#xD;&#xA;I have a 3d scene with a start and end point represented, i'm capable of creating navigational meshes, waypoints and polygons to aid with pathfinding.&#xD;&#xA;&#xD;&#xA;I've tried an A* algorithm and some of its variants and they work perfectly.&#xD;&#xA;However, now i'm more interested in 'dynamic' pathfinding. &#xD;&#xA;For example, while finding a path from point A to point B, if a new obstacle suddenly appears, i want my algorithm to immediately be able to replan a path and not start searching from scratch again.&#xD;&#xA;&#xD;&#xA;I've done some reading on the D* algorithm and wondering if this would be appropriate for what I need or would this seem like an overkill.&#xD;&#xA;&#xD;&#xA;So my questions basically are:&#xD;&#xA;What algorithm would be best for Real Time Dynamic Pathfinding?&#xD;&#xA;OR what combination of techniques could I use instead?" />
  <row Id="26611" PostHistoryTypeId="1" PostId="12186" RevisionGUID="a2af3660-8156-4210-9bf7-30ea4892def1" CreationDate="2011-05-11T15:49:17.770" UserId="7242" Text="Real Time Dynamic Pathfinding?" />
  <row Id="26612" PostHistoryTypeId="3" PostId="12186" RevisionGUID="a2af3660-8156-4210-9bf7-30ea4892def1" CreationDate="2011-05-11T15:49:17.770" UserId="7242" Text="&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="26613" PostHistoryTypeId="5" PostId="12177" RevisionGUID="aa9d6399-e660-4e97-a3c8-e2ea1dab0643" CreationDate="2011-05-11T16:01:30.200" UserId="7041" Comment="added negative text" Text="I am looking for a good 2d game engine. In the past year I have used &lt;a href=&quot;http://hge.relishgames.com/&quot;&gt;Haaf's Game Engine&lt;/a&gt;. It is really great but it seems that it is not supported anymore. Its last update was in 2008. I don't want to use a game engine such as LOVE that you must develop your game completely in lua. I want to use C++." />
  <row Id="26614" PostHistoryTypeId="24" PostId="12177" RevisionGUID="aa9d6399-e660-4e97-a3c8-e2ea1dab0643" CreationDate="2011-05-11T16:01:30.200" Comment="Proposed by 7041 approved by 51 edit id of 427" />
  <row Id="26615" PostHistoryTypeId="5" PostId="12131" RevisionGUID="9171dd39-c153-4b92-bdc9-49b46cb2c20d" CreationDate="2011-05-11T16:02:06.083" UserId="3588" Comment="Revising a lot of the grammar, for the most part, and expanded DX → DirectX. Also put the main question in bold. It's repeated oft, but it helps make the question stand out nonetheless." Text="What I've gathered around the internet and various sources is that DirectX has pretty much taken a stronghold grip onto the graphics API domain. And to be honest, I gave learning DirectX10 a chance, but I just cannot stand how things are initialized; it made it very difficult to really learn the actual 3D portion.&#xD;&#xA;&#xD;&#xA;OpenGL on the other hand makes much more sense from a &quot;coding&quot; perspective to me, but I'm not sure if I want to invest time into something that &quot;isn't going to last&quot;. I don't keep up with the latest news, nor know much about the &quot;war&quot; that goes on between OpenGL and DirectX. With that being said, **is OpenGL going away anytime soon?** The thing I like about OpenGL is that there are many more resources available (whether through books/tutorials/samples) than for DirectX, so it's a lot easier to learn.&#xD;&#xA;&#xD;&#xA;So is it still a good time to learn OpenGL, or is DirectX just the future? Now I know there are 100,000 topics talking about which is better but that's not what I'm asking. I'm just asking if OpenGL is gonna stick around." />
  <row Id="26616" PostHistoryTypeId="4" PostId="12131" RevisionGUID="9171dd39-c153-4b92-bdc9-49b46cb2c20d" CreationDate="2011-05-11T16:02:06.083" UserId="3588" Comment="Revising a lot of the grammar, for the most part, and expanded DX → DirectX. Also put the main question in bold. It's repeated oft, but it helps make the question stand out nonetheless." Text="Is it a waste to learn OpenGL?" />
  <row Id="26617" PostHistoryTypeId="24" PostId="12131" RevisionGUID="9171dd39-c153-4b92-bdc9-49b46cb2c20d" CreationDate="2011-05-11T16:02:06.083" Comment="Proposed by 3588 approved by 51 edit id of 428" />
  <row Id="26618" PostHistoryTypeId="2" PostId="12187" RevisionGUID="93bd7e4e-15b3-403b-b32a-04c361aef8d5" CreationDate="2011-05-11T16:05:03.603" UserId="2674" Text="You may want to take a look at [Monocle Engine][1]. It's a (still in development) open source engine started by Alec Holowka (of [Aquaria][2] fame)&#xD;&#xA;&#xD;&#xA;As it is in development stage it might have some rough corners, but it grows day by day and is already pretty usable.&#xD;&#xA;&#xD;&#xA;  [1]: http://monoclepowered.org/ &quot;Monocle Engine&quot;&#xD;&#xA;  [2]: http://www.bit-blot.com/aquaria/" />
  <row Id="26619" PostHistoryTypeId="2" PostId="12188" RevisionGUID="438dfb0e-44e5-48b0-8700-a3c817e10cb4" CreationDate="2011-05-11T16:05:52.667" UserId="7198" Text="I'm using Maya 2008 Complete and 03/11 build of UDK as well as 07/10 build (haven't got around to installing newer version on other computer). I am using ActorX to export.&#xD;&#xA;&#xD;&#xA;I have a character that I have rigged and animated, I'm not using UDK rigs. Early on in the process, I had other objects skinned to the character's skeleton. I hid those objects while weighting the character and decided later that I wanted to delete them. I tested my psk in both udk builds with those objects hidden and noticed that they still showed up in udk so I went back into Maya, detached the skin on those objects and deleted history, then deleted them. I then re-exported my .psk and now when I try and import, it crashes.&#xD;&#xA;&#xD;&#xA;Here are my input/output connections for one of the objects before detaching the skin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/hoDdv.jpg&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;**Here is my log:**&#xD;&#xA;&#xD;&#xA;0002.77] Log: &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Initial startup: 2.77s &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&#xD;&#xA;[0002.81] Cmd: MODE MAPEXT=udk&#xD;&#xA;[0002.87] SourceControl: Source Control disabled in GAMEEditorUserSettings.ini.  [SourceControl] has Disabled=False&#xD;&#xA;[0005.61] Log: TIMER ALL OF INIT : [5.028131]&#xD;&#xA;[0070.42] Log: FactoryCreateBinary: SkeletalMesh with SkeletalMeshFactory (0 0 Z:\websterProject2\EXPORTTESTING\SK_snailMesh01.PSK)&#xD;&#xA;[0070.42] Log:  * Skeletal skin VPoints            : 812&#xD;&#xA;[0070.42] Log:  * Skeletal skin VVertices          : 1166&#xD;&#xA;[0070.42] Log:  * Skeletal skin VTriangles         : 1596&#xD;&#xA;[0070.42] Log:  * Skeletal skin VMaterials         : 1&#xD;&#xA;[0070.42] Log:  * Skeletal skin VBones             : 73&#xD;&#xA;[0070.42] Log:  * Skeletal skin VRawBoneInfluences : 1520&#xD;&#xA;[0070.42] Log:  * Skeletal skin VertexColors		  : 0&#xD;&#xA;[0070.42] Log:  * Skeletal skin Num Tex Coords	  : 1&#xD;&#xA;[0070.42] Log:  Mesh material not found among currently loaded ones: lambert3SG&#xD;&#xA;[0070.42] Log: Bones digested - 73  Depth of hierarchy - 15&#xD;&#xA;[0070.49] Critical: appError called: Assertion failed: Wedges.Num() == WedgeInfluenceIndices.Num() [File:c:\depot\UnrealEngine3\Development\Src\Engine\Src\UnSkeletalTools.cpp] [Line: 301]&#xD;&#xA;&#xD;&#xA;Stack: Address = 0x402228f9 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;Address = 0x40924bb1 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;Address = 0x412bfbc8 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;Address = 0x401a178d (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;Address = 0x412964a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;Address = 0x412823a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;Address = 0x983633   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;Address = 0x983d73   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;Address = 0x983e30   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;Address = 0x800a34c6 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_core_vc_custom_64.dll]&#xD;&#xA;Address = 0x800aec65 (filename not found) [in C&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wqt1J.jpg&#xD;&#xA;&#xD;&#xA;Thanks very much for your time." />
  <row Id="26620" PostHistoryTypeId="1" PostId="12188" RevisionGUID="438dfb0e-44e5-48b0-8700-a3c817e10cb4" CreationDate="2011-05-11T16:05:52.667" UserId="7198" Text="Deleting Objects Before Export Causes PSK Crash in UDK" />
  <row Id="26621" PostHistoryTypeId="3" PostId="12188" RevisionGUID="438dfb0e-44e5-48b0-8700-a3c817e10cb4" CreationDate="2011-05-11T16:05:52.667" UserId="7198" Text="&lt;udk&gt;&lt;unreal&gt;&lt;maya&gt;" />
  <row Id="26622" PostHistoryTypeId="5" PostId="12188" RevisionGUID="2ee5d9e7-7321-4a96-9bd5-194e3683cd54" CreationDate="2011-05-11T16:12:08.663" UserId="6480" Comment="formatting stuff" Text="I'm using Maya 2008 Complete and 03/11 build of UDK as well as 07/10 build (haven't got around to installing newer version on other computer). I am using ActorX to export.&#xD;&#xA;&#xD;&#xA;I have a character that I have rigged and animated, I'm not using UDK rigs. Early on in the process, I had other objects skinned to the character's skeleton. I hid those objects while weighting the character and decided later that I wanted to delete them. I tested my psk in both udk builds with those objects hidden and noticed that they still showed up in udk so I went back into Maya, detached the skin on those objects and deleted history, then deleted them. I then re-exported my .psk and now when I try and import, it crashes.&#xD;&#xA;&#xD;&#xA;Here are my input/output connections for one of the objects before detaching the skin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/hoDdv.jpg&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;**Here is my log:**&#xD;&#xA;&#xD;&#xA;    0002.77] Log: &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Initial startup: 2.77s &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&#xD;&#xA;    [0002.81] Cmd: MODE MAPEXT=udk&#xD;&#xA;    [0002.87] SourceControl: Source Control disabled in GAMEEditorUserSettings.ini.  [SourceControl] has Disabled=False&#xD;&#xA;    [0005.61] Log: TIMER ALL OF INIT : [5.028131]&#xD;&#xA;    [0070.42] Log: FactoryCreateBinary: SkeletalMesh with SkeletalMeshFactory (0 0 Z:\websterProject2\EXPORTTESTING\SK_snailMesh01.PSK)&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VPoints            : 812&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VVertices          : 1166&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VTriangles         : 1596&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VMaterials         : 1&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VBones             : 73&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VRawBoneInfluences : 1520&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VertexColors		  : 0&#xD;&#xA;    [0070.42] Log:  * Skeletal skin Num Tex Coords	  : 1&#xD;&#xA;    [0070.42] Log:  Mesh material not found among currently loaded ones: lambert3SG&#xD;&#xA;    [0070.42] Log: Bones digested - 73  Depth of hierarchy - 15&#xD;&#xA;    [0070.49] Critical: appError called: Assertion failed: Wedges.Num() == WedgeInfluenceIndices.Num() [File:c:\depot\UnrealEngine3\Development\Src\Engine\Src\UnSkeletalTools.cpp] [Line: 301]&#xD;&#xA;    Stack: Address = 0x402228f9 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x40924bb1 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412bfbc8 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x401a178d (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412964a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412823a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x983633   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983d73   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983e30   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800a34c6 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_core_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800aec65 (filename not found) [in C&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wqt1J.jpg&#xD;&#xA;&#xD;&#xA;Thanks very much for your time." />
  <row Id="26623" PostHistoryTypeId="24" PostId="12188" RevisionGUID="2ee5d9e7-7321-4a96-9bd5-194e3683cd54" CreationDate="2011-05-11T16:12:08.663" Comment="Proposed by 6480 approved by 7198 edit id of 429" />
  <row Id="26624" PostHistoryTypeId="5" PostId="12188" RevisionGUID="643f6ea4-a567-48c0-b9b6-52cf98ee8290" CreationDate="2011-05-11T16:15:11.780" UserId="7198" Comment="added 112 characters in body" Text="I'm using Maya 2008 Complete and 03/11 build of UDK as well as 07/10 build (haven't got around to installing newer version on other computer). I am using ActorX to export.&#xD;&#xA;&#xD;&#xA;I have a character that I have rigged and animated, I'm not using UDK rigs. Early on in the process, I had other objects skinned to the character's skeleton. I hid those objects while weighting the character and decided later that I wanted to delete them. I tested my psk in both udk builds with those objects hidden and noticed that they still showed up in udk so I went back into Maya, detached the skin on those objects and deleted history, then deleted them. I then re-exported my .psk and now when I try and import, it crashes.&#xD;&#xA;&#xD;&#xA;Here are my input/output connections for one of the objects before detaching the skin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/hoDdv.jpg&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;**Here is my log:**&#xD;&#xA;&#xD;&#xA;    0002.77] Log: &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Initial startup: 2.77s &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&#xD;&#xA;    [0002.81] Cmd: MODE MAPEXT=udk&#xD;&#xA;    [0002.87] SourceControl: Source Control disabled in GAMEEditorUserSettings.ini.  [SourceControl] has Disabled=False&#xD;&#xA;    [0005.61] Log: TIMER ALL OF INIT : [5.028131]&#xD;&#xA;    [0070.42] Log: FactoryCreateBinary: SkeletalMesh with SkeletalMeshFactory (0 0 Z:\websterProject2\EXPORTTESTING\SK_snailMesh01.PSK)&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VPoints            : 812&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VVertices          : 1166&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VTriangles         : 1596&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VMaterials         : 1&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VBones             : 73&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VRawBoneInfluences : 1520&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VertexColors		  : 0&#xD;&#xA;    [0070.42] Log:  * Skeletal skin Num Tex Coords	  : 1&#xD;&#xA;    [0070.42] Log:  Mesh material not found among currently loaded ones: lambert3SG&#xD;&#xA;    [0070.42] Log: Bones digested - 73  Depth of hierarchy - 15&#xD;&#xA;    [0070.49] Critical: appError called: Assertion failed: Wedges.Num() == WedgeInfluenceIndices.Num() [File:c:\depot\UnrealEngine3\Development\Src\Engine\Src\UnSkeletalTools.cpp] [Line: 301]&#xD;&#xA;    Stack: Address = 0x402228f9 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x40924bb1 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412bfbc8 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x401a178d (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412964a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412823a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x983633   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983d73   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983e30   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800a34c6 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_core_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800aec65 (filename not found) [in C&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wqt1J.jpg&#xD;&#xA;&#xD;&#xA;I would like to know why deleting these objects is causing the .psk to crash on import and how I can fix it.&#xD;&#xA;&#xD;&#xA;Thanks very much for your time." />
  <row Id="26625" PostHistoryTypeId="5" PostId="12188" RevisionGUID="01a24048-dac5-4e6d-bf4b-754e55c82f42" CreationDate="2011-05-11T16:21:30.057" UserId="6480" Comment="fixed formatting" Text="I'm using Maya 2008 Complete and 03/11 build of UDK as well as 07/10 build (haven't got around to installing newer version on other computer). I am using ActorX to export.&#xD;&#xA;&#xD;&#xA;I have a character that I have rigged and animated (I'm not using UDK rigs).&#xD;&#xA;&#xD;&#xA;**Here was my process:**&#xD;&#xA;&#xD;&#xA; - Early on in the process, I had other objects skinned to the character's skeleton. &#xD;&#xA; - I hid those objects while weighting the character &#xD;&#xA; - I decided later that I wanted to delete them. &#xD;&#xA; - I tested my .psk in both UDK builds with those objects hidden and noticed that they still showed up (in UDK) &#xD;&#xA; - So, I went back into Maya, detached the skin on those objects and deleted history, then deleted them. &#xD;&#xA; - I then re-exported my .psk and now when I try and import.&#xD;&#xA;&#xD;&#xA;Now, it crashes&#xD;&#xA;&#xD;&#xA;Here are my input/output connections for one of the objects before detaching the skin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/hoDdv.jpg&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;**Here is my log:**&#xD;&#xA;&#xD;&#xA;    0002.77] Log: &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Initial startup: 2.77s &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&#xD;&#xA;    [0002.81] Cmd: MODE MAPEXT=udk&#xD;&#xA;    [0002.87] SourceControl: Source Control disabled in GAMEEditorUserSettings.ini.  [SourceControl] has Disabled=False&#xD;&#xA;    [0005.61] Log: TIMER ALL OF INIT : [5.028131]&#xD;&#xA;    [0070.42] Log: FactoryCreateBinary: SkeletalMesh with SkeletalMeshFactory (0 0 Z:\websterProject2\EXPORTTESTING\SK_snailMesh01.PSK)&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VPoints            : 812&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VVertices          : 1166&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VTriangles         : 1596&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VMaterials         : 1&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VBones             : 73&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VRawBoneInfluences : 1520&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VertexColors		  : 0&#xD;&#xA;    [0070.42] Log:  * Skeletal skin Num Tex Coords	  : 1&#xD;&#xA;    [0070.42] Log:  Mesh material not found among currently loaded ones: lambert3SG&#xD;&#xA;    [0070.42] Log: Bones digested - 73  Depth of hierarchy - 15&#xD;&#xA;    [0070.49] Critical: appError called: Assertion failed: Wedges.Num() == WedgeInfluenceIndices.Num() [File:c:\depot\UnrealEngine3\Development\Src\Engine\Src\UnSkeletalTools.cpp] [Line: 301]&#xD;&#xA;    Stack: Address = 0x402228f9 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x40924bb1 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412bfbc8 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x401a178d (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412964a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412823a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x983633   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983d73   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983e30   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800a34c6 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_core_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800aec65 (filename not found) [in C&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wqt1J.jpg&#xD;&#xA;&#xD;&#xA;I would like to know why deleting these objects is causing the .psk to crash on import and how I can fix it. &#xD;&#xA;&#xD;&#xA;Thanks very much for your time." />
  <row Id="26626" PostHistoryTypeId="24" PostId="12188" RevisionGUID="01a24048-dac5-4e6d-bf4b-754e55c82f42" CreationDate="2011-05-11T16:21:30.057" Comment="Proposed by 6480 approved by -1 edit id of 431" />
  <row Id="26627" PostHistoryTypeId="5" PostId="12188" RevisionGUID="8007c7e1-0fb4-4ef2-ae7f-490f8bd35528" CreationDate="2011-05-11T16:21:30.697" UserId="7198" Comment="deleted 4 characters in body" Text="I'm using Maya 2008 Complete and 03/11 build of UDK as well as 07/10 build (haven't got around to installing newer version on other computer). I am using ActorX to export.&#xD;&#xA;&#xD;&#xA;I have a character that I have rigged and animated (I'm not using UDK rigs).&#xD;&#xA;&#xD;&#xA;**Here was my process:**&#xD;&#xA;&#xD;&#xA; - Early on in the process, I had other objects skinned to the character's skeleton. &#xD;&#xA; - I hid those objects while weighting the character &#xD;&#xA; - I decided later that I wanted to delete them. &#xD;&#xA; - I tested my .psk in both UDK builds with those objects hidden and noticed that they still showed up (in UDK) &#xD;&#xA; - So, I went back into Maya, detached the skin on those objects and deleted history, then deleted them. &#xD;&#xA; - I then re-exported my .psk and now when I try and import, udk crashes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are my input/output connections for one of the objects before detaching the skin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/hoDdv.jpg&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;**Here is my log:**&#xD;&#xA;&#xD;&#xA;    0002.77] Log: &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Initial startup: 2.77s &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&#xD;&#xA;    [0002.81] Cmd: MODE MAPEXT=udk&#xD;&#xA;    [0002.87] SourceControl: Source Control disabled in GAMEEditorUserSettings.ini.  [SourceControl] has Disabled=False&#xD;&#xA;    [0005.61] Log: TIMER ALL OF INIT : [5.028131]&#xD;&#xA;    [0070.42] Log: FactoryCreateBinary: SkeletalMesh with SkeletalMeshFactory (0 0 Z:\websterProject2\EXPORTTESTING\SK_snailMesh01.PSK)&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VPoints            : 812&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VVertices          : 1166&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VTriangles         : 1596&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VMaterials         : 1&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VBones             : 73&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VRawBoneInfluences : 1520&#xD;&#xA;    [0070.42] Log:  * Skeletal skin VertexColors		  : 0&#xD;&#xA;    [0070.42] Log:  * Skeletal skin Num Tex Coords	  : 1&#xD;&#xA;    [0070.42] Log:  Mesh material not found among currently loaded ones: lambert3SG&#xD;&#xA;    [0070.42] Log: Bones digested - 73  Depth of hierarchy - 15&#xD;&#xA;    [0070.49] Critical: appError called: Assertion failed: Wedges.Num() == WedgeInfluenceIndices.Num() [File:c:\depot\UnrealEngine3\Development\Src\Engine\Src\UnSkeletalTools.cpp] [Line: 301]&#xD;&#xA;    Stack: Address = 0x402228f9 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x40924bb1 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412bfbc8 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x401a178d (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412964a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x412823a4 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\UDK.exe]&#xD;&#xA;    Address = 0x983633   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983d73   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x983e30   (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800a34c6 (filename not found) [in C:\UDK\UDK-2010-07\Binaries\Win64\wxmsw28u_core_vc_custom_64.dll]&#xD;&#xA;    Address = 0x800aec65 (filename not found) [in C&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wqt1J.jpg&#xD;&#xA;&#xD;&#xA;I would like to know why deleting these objects is causing the .psk to crash on import and how I can fix it. &#xD;&#xA;&#xD;&#xA;Thanks very much for your time." />
  <row Id="26628" PostHistoryTypeId="5" PostId="12186" RevisionGUID="be105b8a-8149-4986-ab26-c04e6d1338cb" CreationDate="2011-05-11T16:28:33.723" UserId="962" Comment="deleted 5 characters in body" Text="I'm currently doing some pathfinding research and my simulation is the following:&#xD;&#xA;I have a 3d scene with a start and end point represented, I'm capable of creating navigational meshes, waypoints and polygons to aid with pathfinding.&#xD;&#xA;&#xD;&#xA;I've tried an A* algorithm and some of its variants and they work perfectly.&#xD;&#xA;However, now I'm more interested in 'dynamic' pathfinding. &#xD;&#xA;For example, while finding a path from point A to point B, if a new obstacle suddenly appears, i want my algorithm to immediately be able to re-plan a path and not start searching from scratch again.&#xD;&#xA;&#xD;&#xA;I've done some reading on the D* algorithm and wondering if this would be appropriate for what I need or would this seem like an overkill.&#xD;&#xA;&#xD;&#xA;So my questions basically are:&#xD;&#xA;What algorithm would be best for Real Time Dynamic Pathfinding?&#xD;&#xA;OR what combination of techniques could I use instead?" />
  <row Id="26629" PostHistoryTypeId="5" PostId="11872" RevisionGUID="09db7910-3e81-4044-8c57-0646ec32d748" CreationDate="2011-05-11T16:37:56.500" UserId="3588" Comment="Saw &quot;completley&quot;, so I made a couple additional formatting, grammar, and structural changes. Also added the orientation tag, as this is about rotational position moreso than rotational movement." Text="This is probably a simple vector question, but I'm not sure how to do it. &#xD;&#xA;&#xD;&#xA;I have an object at vector position `(ox,oy)`. Potentially every update, the user walks around the screen, and will be at position `(px,py)` at any given moment. How do I make it so that the object is always facing the player? I need to get the angle in degrees. &#xD;&#xA;&#xD;&#xA;This is what I've been messing around with, but the direction doesn't immediately point to where the user is located. Instead, it slowly increments in the direction the user is walking in.&#xD;&#xA;&#xD;&#xA;     objVec.Normalize(); &#xD;&#xA;     playerVec.Normalize();&#xD;&#xA;&#xD;&#xA;     obj.Rotation = MathHelper.ToDegrees((float)Math.Acos(Vector2.Dot(objVec, playerVec)));&#xD;&#xA;&#xD;&#xA;I might be going about it completely wrong, so any help is appreciated!" />
  <row Id="26630" PostHistoryTypeId="6" PostId="11872" RevisionGUID="09db7910-3e81-4044-8c57-0646ec32d748" CreationDate="2011-05-11T16:37:56.500" UserId="3588" Comment="Saw &quot;completley&quot;, so I made a couple additional formatting, grammar, and structural changes. Also added the orientation tag, as this is about rotational position moreso than rotational movement." Text="&lt;2d&gt;&lt;c#&gt;&lt;math&gt;&lt;vector&gt;&lt;orientation&gt;" />
  <row Id="26631" PostHistoryTypeId="24" PostId="11872" RevisionGUID="09db7910-3e81-4044-8c57-0646ec32d748" CreationDate="2011-05-11T16:37:56.500" Comment="Proposed by 3588 approved by 14 edit id of 430" />
  <row Id="26632" PostHistoryTypeId="2" PostId="12189" RevisionGUID="0ee4295d-a3d9-4bca-b1eb-2648079ab1d1" CreationDate="2011-05-11T16:39:42.280" UserId="7248" Text="Don't worry about a pixel shader right now.  If you're complete beginner, you should being hello world of GLSL / HLSL with vertex and fragment shaders only.  Once you're familiar and you start to understand variable movement and such, then expand your horizons. &#xD;&#xA;&#xD;&#xA;I highly recommend a text book to get the nitty gritty as to how the API works.  OpenGL books also do a good job illustrating how things have **changed** over the years from the fixed pipeline to the dynamic programmable pipeline.&#xD;&#xA;&#xD;&#xA;Go champion!" />
  <row Id="26633" PostHistoryTypeId="2" PostId="12190" RevisionGUID="d48c8433-0f29-4e2e-be9a-f50e3aa95d87" CreationDate="2011-05-11T17:01:46.187" UserId="7136" Text="Since your post is in the &quot;Game Development&quot; part of stack exchange, here's what most game programmers would answer you: It's not about Real Time Dynamic Pathfinding, it's about Real Time Dynamic Path**following**!&#xD;&#xA;&#xD;&#xA;Some edge cases where an edge on your navigation graph is totally obstructed would require the pathfinder to recompute another path, but most of the time you can simply steer your entities around the obstacles, doing position prediction and avoid in the right direction. For most games, it would be too heavyweight to have to predict over time the position of dynamic agents, especially since you can't predict accurately player actions or agent decisions.&#xD;&#xA;&#xD;&#xA;So, my advice would be to start by implementing Steering Behaviors (http://red3d.com/cwr/steer/), handle cases where the path becomes impossible and then add a layer on top of it to handle edge cases that aren't handled by the two previous solutions.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="26634" PostHistoryTypeId="2" PostId="12191" RevisionGUID="267b36fa-d549-4196-9a41-287e5e3d4522" CreationDate="2011-05-11T17:05:00.423" UserId="1263" Text="It could be worthwhile considering [Angel][1]. It's designed to be a tightly engineered foundation for prototyping games in 48 hours, but I would be very surprised if it couldn't be expanded into a more general purpose game engine without much effort.&#xD;&#xA;&#xD;&#xA;Another possibility is [Gosu][2]. Gosu also has Ruby bindings, so it would be possible to prototype your game in Ruby very quickly, then rewrite it in C++ with the same base engine still intact.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/angel-engine/&#xD;&#xA;  [2]: http://www.libgosu.org/" />
  <row Id="26635" PostHistoryTypeId="2" PostId="12192" RevisionGUID="e3875885-d048-4e54-a541-f0b579dfcd14" CreationDate="2011-05-11T17:10:10.903" UserId="1868" Text="Rovio just announced web version of Angry Birds at Google I/O 2011. It uses WebGL with fallback to Canvas2D. So I think it is fair to say the technology starts to be ready." />
  <row Id="26636" PostHistoryTypeId="5" PostId="12146" RevisionGUID="2de3f9ce-6354-48ac-9711-c4c49d3f4ad8" CreationDate="2011-05-11T17:33:00.053" UserId="7191" Comment="Added additional information on the direction I went." Text="I'm developing a game using polling for the input method. However, now that I'm delving deeper into the game menus and other UI components, I'm finding that I'd probably like to have event driven input. Perhaps even having both, using event driven for the UI and polling for the &quot;world&quot; input. I'm curious on what the best way to go is.&#xD;&#xA;&#xD;&#xA;I'm defining polling as: each update loop I check what keys are press, where the mouse is, buttons pressed, then run through them and do actions based on the info collected.&#xD;&#xA;&#xD;&#xA;I'm defining event driven as: interrupt based events, when an event happens and interrupt is triggered and a code block is run based on the event.&#xD;&#xA;&#xD;&#xA;Do you think it's best to go all event driven, all polling, or is a combination of both acceptable? If you have pros and cons for either please list them. Thanks.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;The game is Java/OpenGL based, so will be released to Windows/Mac/Linux. The possibility of extending that to mobile devices is low. The game is RTS style, 3rd person 3D.&#xD;&#xA;&#xD;&#xA;**EDIT 2**&#xD;&#xA;&#xD;&#xA;I'm still not totally happy with the way I've implemented this, but what I'm moving toward is catching events in my UI and if they're not handled by any of my UI components, I pass the event on to the &quot;World&quot; for picking/selection. Something like:&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-java --&gt;&#xD;&#xA;&#xD;&#xA;    @Override  &#xD;&#xA;    private boolean handleEvent(Event event) {  &#xD;&#xA;        if(hud.handleEvent(event)) {  &#xD;&#xA;            return true;  &#xD;&#xA;        }  &#xD;&#xA;        return WORLD.handleEvent(event);  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This way I don't get clicks leaking through the UI to select objects behind buttons and what not.&#xD;&#xA;&#xD;&#xA;Currently my camera controls are still based on polling, and that seems to be working for now, but I may update that later on.&#xD;&#xA;&#xD;&#xA;I appreciate all the answers, sorry I could only pick one!" />
  <row Id="26637" PostHistoryTypeId="6" PostId="12146" RevisionGUID="2de3f9ce-6354-48ac-9711-c4c49d3f4ad8" CreationDate="2011-05-11T17:33:00.053" UserId="7191" Comment="Added additional information on the direction I went." Text="&lt;java&gt;&lt;input&gt;&lt;events&gt;&lt;polling&gt;" />
  <row Id="26638" PostHistoryTypeId="2" PostId="12193" RevisionGUID="a1329a10-4e97-4e5c-8f7d-75b10886b753" CreationDate="2011-05-11T18:01:16.423" UserId="7249" Text="Havok has a few spatial constants you will want to tweak for the size of your world, but otherwise the scale of the world shouldn't matter. Rather, the scale of the objects relative to one another matters quite a bit. Below I've tried to address the issues you will need to be aware of:&#xD;&#xA;&#xD;&#xA;Collision 'tolerance' - When rigid bodies touch they do not rest exactly touching but are kept at a separating distance. This is because Havok has a more difficult time simulating bodies that are inter-penetrating. You will need to tweak this value to be appropriate for your world, so that the separating distance is not noticeable. It is also typical to shrink the collision shapes a bit so the separating boundary aligns more closely with the visible surfaces.&#xD;&#xA;&#xD;&#xA;Maximum velocity - When creating your world and your rigid bodies you may define a maximum linear velocity. You will want to scale this value up or down to be appropriate to the size of the world.&#xD;&#xA;&#xD;&#xA;The bullet-through-paper problem - When you scale an object to be very small, you also want to consider of the maximum possible speed of the object relative to its size. Because havok simulates in discrete time steps a small and fast object may move several times its length in a single timestep, and so it may travel through a thin surface without detecting the collision, or worse, it will become stuck inside. To alleviate this, you can enable continuous collision for rigid bodies that are small and fast, but CCD is expensive, and causes bad performance spikes if you accidentally teleport a CCD body into another body. Another approach is set the maximum linear velocity (see above) to something ok relative to the object's size... however varying maximum linear velocities can cause problems (imagine a fast moving truck full of small objects... the small objects cannot move as fast as the truck so they will tunnel through it).&#xD;&#xA;&#xD;&#xA;The level of detail problem - The cost of detecting a collision is generally relative to the number of polygons that are near touching on each side. When you have objects that are very large relative to the player, they tend to have many polygons to look sufficiently detailed at the player's scale. If two large high detail objects collide, you may have a 100 polygon surface collide with another 100 polygon surface, which requires 10,000 collision tests. One solution is to have multiple shapes in the rigid body with different levels of detail (two levels of detail is usually enough) and set the collision filters on those shapes so that two large colliding bodies only detect collisions between their lower detailed shapes.&#xD;&#xA;&#xD;&#xA;Mass and momentum - Larger objects need to have much larger mass, which means that when they are moving and collide with objects of much smaller size/mass, the momentum transferred to those smaller objects will make them move very fast. Small fast moving objects cause the bullet-through-paper problem I mentioned above, and may also look undesirable, as your objects go hurtling out of the world. You can deal with the bullet-through-paper problem as I mentioned above, or you can fudge collision and explosion forces so that they are constrained to a manageable range.&#xD;&#xA;&#xD;&#xA;Floating-point precision - If your world is very large relative to the smallest object, motion will begin to stutter visibly when viewed at the smallest scale and those objects are very far from the origin. This is because the margin of error on large floating point values (positions) will be large relative to very small floating point values (small velocities and small differences in position). One way to fix this is to only keep a relevant area of rigid bodies in the world, and occasionally translate all of those objects toward the origin when the player wanders too far away. As long as you maintain the relative positions of all the objects, the player won't notice.&#xD;&#xA;&#xD;&#xA;Other spatial constants - Look at the parameters you can adjust when setting up the world, rigid bodies, and constraints... there are probably some other constant values in units of length that need to be adjusted to fit the scale of the world." />
  <row Id="26639" PostHistoryTypeId="25" PostId="12188" RevisionGUID="b1df8b43-4817-460a-9a20-6c5945cf2ce4" CreationDate="2011-05-11T18:11:47.130" Comment="http://twitter.com/#!/StackGameDev/status/68377774481620992" />
  <row Id="26640" PostHistoryTypeId="2" PostId="12194" RevisionGUID="72be6078-0516-4c38-93a9-ef2a234ffb25" CreationDate="2011-05-11T18:14:01.447" UserId="6440" Text="We solved the problem by modifying the integral using some approximations. For example, the `0.99^x` part has been approximated by a linear decay function. This produced very similar results to the original solution and was solvable analytically in one step.&#xD;&#xA;&#xD;&#xA;	float a = dot(lightPos - nearPlane , distance_to_wall);&#xD;&#xA;	a /= length_distancetowall;&#xD;&#xA;	if (a &lt;= -1/dust_factor) {&#xD;&#xA;		float b = length(cameraPos + direction*a - lightPos);&#xD;&#xA;		float c = 1;&#xD;&#xA;		float d = -0.25/30;&#xD;&#xA;		float x = length_distancetowall;&#xD;&#xA;		if (x &gt; -1/dust_factor)&#xD;&#xA;			x = -1/dust_factor;&#xD;&#xA;		float integral = (c+a*d)/b*(atan(a/b)-atan((a-x)/b)) + d/2*(log(a*a+b*b)+log(a*a+b*b-2*a*x+x*x));&#xD;&#xA;		float lightIntensity=0.0042 * lightRad;&#xD;&#xA;		outColor += float4(integral*(lightColor * lightIntensity), 1);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;With this method, the framerate could be improved drastically. Thanks to [notabene][1] for giving the first input and his help at this point again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/3794/notabene" />
  <row Id="26641" PostHistoryTypeId="2" PostId="12195" RevisionGUID="d7c88ede-37b7-4eb0-84bc-f35877a600e3" CreationDate="2011-05-11T19:06:52.083" UserId="7254" Text="I'm running into some issues using EventSoundTrigger in Pushbutton Engine&#xD;&#xA;&#xD;&#xA;I am able to make it work using xml like this:&#xD;&#xA;&#xD;&#xA;     &lt;component type=&quot;com.pblabs.components.basic.EventSoundTrigger&quot; name=&quot;Sounds&quot;&gt;&#xD;&#xA;         &lt;startSound filename=&quot;/assets/explosion.mp3&quot; /&gt;&#xD;&#xA;       &lt;/component&gt;&#xD;&#xA;&#xD;&#xA;But if I try to write actionscript to do the same I throughs errors.  I can't find any examples online to explain how to initialize or use EventSoundTrigger directly in ActionScript.&#xD;&#xA;&#xD;&#xA;The following throws an error that the sound object is null when the component is created.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				var testEntity:IEntity = PBE.allocateEntity() ;&#xD;&#xA;				var eventSoundTrigger:EventSoundTrigger = new EventSoundTrigger();&#xD;&#xA;				eventSoundTrigger.startSound = new MP3Resource(); &#xD;&#xA;				eventSoundTrigger.startSound.filename = &quot;/assets/explosion.mp3&quot; ; &#xD;&#xA;				&#xD;&#xA;				testEntity.addComponent( eventSoundTrigger , &quot;Sound&quot; ); &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26642" PostHistoryTypeId="1" PostId="12195" RevisionGUID="d7c88ede-37b7-4eb0-84bc-f35877a600e3" CreationDate="2011-05-11T19:06:52.083" UserId="7254" Text="Pushbutton Engine EventSoundTrigger question" />
  <row Id="26643" PostHistoryTypeId="3" PostId="12195" RevisionGUID="d7c88ede-37b7-4eb0-84bc-f35877a600e3" CreationDate="2011-05-11T19:06:52.083" UserId="7254" Text="&lt;engine&gt;&lt;sound&gt;&lt;actionscript&gt;" />
  <row Id="26644" PostHistoryTypeId="2" PostId="12196" RevisionGUID="bef5304d-7ef1-499d-b03a-cfb514f003a9" CreationDate="2011-05-11T19:23:50.133" UserId="5473" Text="I'm aware your language of choice is C++, but why not just make your life simpler and write the game for XNA 4.0 in C#? These days it's not as if C++ is going to really bring you any major performance benefits over such an approach. XNA has what you need, and XNA Game Studio has a free version." />
  <row Id="26645" PostHistoryTypeId="2" PostId="12197" RevisionGUID="e8c16696-f5c6-4c6e-9945-312d5bc4f222" CreationDate="2011-05-11T19:45:55.733" UserId="7191" Text="If your game is 3D you can implement picking, which is described here: [http://create.msdn.com/en-US/education/catalog/sample/picking_triangle][1]. Basically this creates a ray from the camera to where the mouse clicks (with a little matrix unprojecting in there), then you check to see if any of your objects were intersected by the ray.&#xD;&#xA;&#xD;&#xA;If your game is 2D, you should be able to translate window coordinates to game coordinates fairly easily. Then check to see if the selected coordinates are within the bounds of any of your objects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/picking_triangle" />
  <row Id="26646" PostHistoryTypeId="2" PostId="12198" RevisionGUID="ce3f0414-03cb-4fb3-b98b-c3a03641eadb" CreationDate="2011-05-11T19:56:10.117" UserId="7191" Text=" I know it's hard to use the debugger to find these kinds of issues.  From your question it sounds like you also have some network communication tasks inside the input and painting thread, I'd recommend pushing that functionality to a different thread. Network communication is unreliable, and having the painting and input threads possibly getting hung up on network time-outs would be bad news.&#xD;&#xA;&#xD;&#xA; Try to figure out how to reproduce the failure, it will be much easier to solve if you can find a cause. Another way to find the offending bit of code is to try breaking the threads tasks down, or temporarily disabling some of it's functions. Then try to break it again.&#xD;&#xA;&#xD;&#xA;Lastly, try posting the code you think is at fault so we can look at it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26647" PostHistoryTypeId="5" PostId="12139" RevisionGUID="03fdad0c-acd6-4934-a3bf-400a0d71a01f" CreationDate="2011-05-11T20:25:34.823" UserId="7220" Comment="formatting; added 40 characters in body" Text="Do you have a water simulation? &#xD;&#xA;&#xD;&#xA;My suggestions are&#xD;&#xA;&#xD;&#xA; - fake it with springs. Each vertex on the water surface is coupled together into a spring mesh. Pull one down and they all start oscillating. You could constrain x,z motion and only allow y (or up/down motion)&#xD;&#xA; - fake it by summing sinewaves of different amplitudes and frequencies. &#xD;&#xA;Some thing like this:&#xD;&#xA;&#xD;&#xA;       rez = 32;&#xD;&#xA;       for(i=-rez; i&lt;rez; i++)&#xD;&#xA;       for(j=-rez; j&lt;rez; j++)&#xD;&#xA;       {&#xD;&#xA;          yofs = 0;&#xD;&#xA;          yofs += 1.0 * sin( t + j*0.5 + i*0.125);&#xD;&#xA;          yofs += 2.0 * sin( t + (rez-j)*0.125 + i*0.25 );&#xD;&#xA;          yofs += 2.0 * sin( t + (j)*0.125 + (rez-i)*0.125 );&#xD;&#xA;          yofs += 0.5 * sin( t + (rez+j)*0.125 + (rez+i)*0.125 );&#xD;&#xA;          glVertex(i/rez, yofs, j/rez);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - simulate the 2D wave equation, this can be very fast on the GPU. See [this page for a java applet and some pseudo code][1]. Also check [this version, the same but even simpler. A processing sketch with code.][2]&#xD;&#xA;&#xD;&#xA;From the wave equation sim you can get the direction (dx,dz) of the wave is traveling in&#xD;&#xA;&#xD;&#xA;    dx = h[x-1][z] - h[x+1][z] &#xD;&#xA;    dz = h[x][z-1]- h[x][x+1] &#xD;&#xA;&#xD;&#xA;where h a 2D array with the height of the wave at [x][z]&#xD;&#xA;&#xD;&#xA;You could add this to the boats position to make it travel with the wave... I've tried, but the movement becomes jerky, so I smoothed it out with a simple 3x3 box filter (smoothing the differences/velocities dx dz)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://beltoforion.de/java_applets/waves/wave_equation_de.html&#xD;&#xA;  [2]: http://www.openprocessing.org/visuals/?visualID=7022" />
  <row Id="26648" PostHistoryTypeId="2" PostId="12199" RevisionGUID="d24f468d-ba7d-4903-bd26-90ab41807972" CreationDate="2011-05-11T20:26:42.217" UserId="7198" Text="I agree with what the first poster suggested. I haven't read Hourences' book, but I have gone through some of his video tutorials and his website is highly informative so I would bet his book is excellent.&#xD;&#xA;&#xD;&#xA;The Art of Game Design:A Book of Lenses is a great book and takes you through the game design process but doesn't delve too much into level design specifically as I recall. It covers how to get started designing a game all the way through pitching your ideas to a publisher.&#xD;&#xA;&#xD;&#xA;Scott Roger's book Level Up is another fantastic book in my opinion. This book has a a section specific to level design. That section includes things like hand drawn level maps that were used to concept actual levels, what makes a level fun/boring, how to draw the attention of the player, and the different types of level layouts. There are a lot of other interesting topics in the book as well and it was entertaining to read.&#xD;&#xA;&#xD;&#xA;Hope that helps. Good luck!" />
  <row Id="26649" PostHistoryTypeId="16" PostId="12199" RevisionGUID="8232707c-9c57-489a-a426-8fc178c701d1" CreationDate="2011-05-11T20:26:42.217" UserId="7198" />
  <row Id="26654" PostHistoryTypeId="2" PostId="12202" RevisionGUID="a82b6df2-7ef4-4df2-8a39-240bb3acde7f" CreationDate="2011-05-11T21:06:03.680" UserId="6042" Text="I'll try to explain how things work without using much jargon.&#xD;&#xA;&#xD;&#xA;If simplicity rather than interactive speed is your concern, a 3D surface in the computer would be just a huge cloud of points in space, dense enough so we can just render each point individually, without gaps between them.&#xD;&#xA;&#xD;&#xA;You want to store a model only once in memory, but you need to display it at various sizes and from various angles, so when you render a 3D model, you need to &quot;transform&quot; all the points as you read them from memory. For example, to render the model 50% as big, you need to scale the positions of the points by half:&#xD;&#xA;&#xD;&#xA;    out.position = in.position * 0.5;&#xD;&#xA;    out.color = in.color;&#xD;&#xA;&#xD;&#xA;This is almost the simplest &quot;vertex shader&quot; one can conceive: in goes a vertex position from memory, and out comes a new vertex position, half-as-big. The half-as-big vertex is not stored back to memory - it's used immediately for rendering and then thrown away.&#xD;&#xA;&#xD;&#xA;Though a *gross oversimplification that lacks key concepts*, this *in spirit* describes aspects of how movies do graphics.&#xD;&#xA;&#xD;&#xA;Interactive graphics (games) can't afford to be this simple, because they need to render graphics several orders of magnitude more quickly than a movie.&#xD;&#xA;&#xD;&#xA;In games, we can't afford to render one point for each pixel on screen, plus extras to cover the gaps. So as a compromise, the gap between each three nearby points is rendered as a triangle, which for various technical reasons prefers to be at least 10 pixels big on the screen.&#xD;&#xA;&#xD;&#xA;A 3D triangle can be *projected* onto a 2D screen, then divided into a stack of 1D lines, which can each be divided into a stack of 0D pixels. We can thus divide-and-conquer the problem of rendering a 3D triangle into the simpler problem of rendering a lot of 0D pixels in isolation. A computer can solve simpler problems in less time.&#xD;&#xA;&#xD;&#xA;A pixel shader is a little program that we run on each pixel so generated from disassembling a triangle.&#xD;&#xA;&#xD;&#xA;    out.color = in.color;&#xD;&#xA;&#xD;&#xA;This is almost the simplest &quot;pixel shader&quot; one can conceive: in goes a blend of the colors of three triangle vertices, and out goes the same color. The inputs come from the outputs of the &quot;vertex shader&quot; and the outputs are written to the screen in memory.&#xD;&#xA; &#xD;&#xA;So - the &quot;vertex shader&quot; is a program that runs inside the GPU chip. Its input is a &quot;vertex buffer&quot; in GPU memory, and its output is fed directly into a &quot;pixel shader.&quot; A &quot;pixel shader&quot; is also a program that runs inside the GPU chip. Its inputs are a blend of three vertices from the vertex shader, and its output is a pixel on the screen." />
  <row Id="26656" PostHistoryTypeId="2" PostId="12203" RevisionGUID="b8fc9adf-7c14-43e9-814c-1fd7c3f47286" CreationDate="2011-05-11T21:52:51.960" UserId="2845" Text="I'm doing a little bit of research and I'm hoping you can help me track down any games, other than [Diplomacy][1] (online version [here][2]), that employ all or some of the mechanics in [Diplomacy][3] ([rules, short form][4]). Examples I'm looking for:&#xD;&#xA;&#xD;&#xA;* Simultaneous orders given prior to execution of orders&#xD;&#xA; * In Diplomacy, players &quot;write down&quot; their moves and execute them &quot;at the same time&quot;&#xD;&#xA;* Support, in terms of supporting an attacker or defender &quot;take&quot; a territory.&#xD;&#xA; * In Diplomacy, no one unit is stronger than another you need to combine the strength of multiple units to attack other territories.&#xD;&#xA;* Rules for how move conflicts are resolved&#xD;&#xA; * Example, 2 units move into a space, but only one is allowed, what happens.&#xD;&#xA;&#xD;&#xA;I may add to this list later, but these are the primary things I'm looking for. If you need clarification on anything just let me know.&#xD;&#xA;&#xD;&#xA;&gt; **Note**: I tried asking this on GamingSE, but it was shot down. So, I am unsure where else I could post this. Since I am researching this for game development purposes, I assume this post is on topic. Please let me know if this is not the case. Please also feel free to re-categorize this. Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Diplomacy_%28game%29&#xD;&#xA;  [2]: http://playdiplomacy.com/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Diplomacy_%28game%29&#xD;&#xA;  [4]: http://www.playdiplomacy.com/help.php" />
  <row Id="26657" PostHistoryTypeId="1" PostId="12203" RevisionGUID="b8fc9adf-7c14-43e9-814c-1fd7c3f47286" CreationDate="2011-05-11T21:52:51.960" UserId="2845" Text="Looking for games that employ some mechanics of Diplomacy" />
  <row Id="26658" PostHistoryTypeId="3" PostId="12203" RevisionGUID="b8fc9adf-7c14-43e9-814c-1fd7c3f47286" CreationDate="2011-05-11T21:52:51.960" UserId="2845" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="26659" PostHistoryTypeId="5" PostId="12199" RevisionGUID="9416f5ae-cda6-4a4a-bb50-a7843cb8baa0" CreationDate="2011-05-11T21:56:04.627" UserId="7198" Comment="deleted 1 characters in body" Text="I agree with what Clinton Freeman suggested. I haven't read Hourences' book, but I have gone through some of his video tutorials and his website is highly informative so I would bet his book is excellent.&#xD;&#xA;&#xD;&#xA;The Art of Game Design:A Book of Lenses is a great book and takes you through the game design process but doesn't delve too much into level design specifically as I recall. It covers how to get started designing a game all the way through pitching your ideas to a publisher.&#xD;&#xA;&#xD;&#xA;Scott Roger's book Level Up is another fantastic book in my opinion. This book has a a section specific to level design. That section includes things like hand drawn level maps that were used to concept actual levels, what makes a level fun/boring, how to draw the attention of the player, and the different types of level layouts. There are a lot of other interesting topics in the book as well and it was entertaining to read.&#xD;&#xA;&#xD;&#xA;Hope that helps. Good luck!" />
  <row Id="26660" PostHistoryTypeId="2" PostId="12204" RevisionGUID="cd0837b3-585f-4bed-90b3-acdf6f9093b5" CreationDate="2011-05-11T23:28:03.090" UserId="1021" Text="I'm making a game for iPhone and iPad w/ Cocos2D and Box2D.  I scale the size of square objects (&quot;blocks&quot;) using a pixel-to-meters ratio depending on the particular device.  **Can I stretch or shrink the textures and CCSprites as well**?  I was considering having just one &quot;blockImage.png&quot; file and scaling it up/down depending on the device.&#xD;&#xA;&#xD;&#xA;The alternative is having 2-3 sets of images for iPhone, iPhone 4, iPad etc.&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="26661" PostHistoryTypeId="1" PostId="12204" RevisionGUID="cd0837b3-585f-4bed-90b3-acdf6f9093b5" CreationDate="2011-05-11T23:28:03.090" UserId="1021" Text="Stretching textures for CCSprites in Cocos2D" />
  <row Id="26662" PostHistoryTypeId="3" PostId="12204" RevisionGUID="cd0837b3-585f-4bed-90b3-acdf6f9093b5" CreationDate="2011-05-11T23:28:03.090" UserId="1021" Text="&lt;graphics&gt;&lt;textures&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;&lt;ccsprite&gt;" />
  <row Id="26663" PostHistoryTypeId="2" PostId="12205" RevisionGUID="c84c11b2-24f2-4350-896b-3fae0ceaa971" CreationDate="2011-05-12T00:00:28.033" UserId="7258" Text="I'm doing a diploma thesis about the developement of games with freedom to choose or open world.&#xD;&#xA;Topics will be ie. Development issues in programming and the design itself, mechanics etc.&#xD;&#xA;&#xD;&#xA;For that I need literature and lot's of it. Do you have any suggestions?" />
  <row Id="26664" PostHistoryTypeId="1" PostId="12205" RevisionGUID="c84c11b2-24f2-4350-896b-3fae0ceaa971" CreationDate="2011-05-12T00:00:28.033" UserId="7258" Text="Literature about Open World Games, Freedom to Choose (Developement)" />
  <row Id="26665" PostHistoryTypeId="3" PostId="12205" RevisionGUID="c84c11b2-24f2-4350-896b-3fae0ceaa971" CreationDate="2011-05-12T00:00:28.033" UserId="7258" Text="&lt;game-design&gt;&lt;programming&gt;&lt;game-mechanics&gt;&lt;books&gt;" />
  <row Id="26666" PostHistoryTypeId="25" PostId="12205" RevisionGUID="33713fc4-d97e-4adc-9987-a700f02db953" CreationDate="2011-05-12T00:11:47.783" Comment="http://twitter.com/#!/StackGameDev/status/68468375847837696" />
  <row Id="26667" PostHistoryTypeId="2" PostId="12206" RevisionGUID="e16b4daa-628f-4fd1-9343-059a9b185043" CreationDate="2011-05-12T00:25:36.630" UserId="4410" Text="I'd recommend offline creating your assets at the highest resolution possible, then for your purposes create a PNG for each target platform requirements separately. It'll be more efficient on memory and it'll also be faster for the graphics hardware not having to scale things down (and process unnecessary texels). It seems a relatively trivial amount of work to create a couple of different sized versions and having the loading code look for and load a version that matches the platform your running on.&#xD;&#xA;&#xD;&#xA;You can more than likely just get away with just scaling down however (scaling up would just look blocky), I don't think if you're just doing 2D you'd probably see any artefacts that 3D would suffer with when using a large texture for a small area of the screen (the way the hardware samples from the texture isn't consistent as a polygon moves and you can see weird sampling issues - problems improved by more complex filtering algorithms and mipmaps)." />
  <row Id="26668" PostHistoryTypeId="5" PostId="12128" RevisionGUID="361dbb00-b6bb-4609-a241-79ff9997a36e" CreationDate="2011-05-12T00:28:23.467" UserId="5966" Comment="added 373 characters in body; added 88 characters in body" Text="Several solutions.&#xD;&#xA;&#xD;&#xA;1. For Box2D, set `b2_velocityThreshold` in `b2Settings.h` file. In my case, I set it to `0.0f` and it worked! Mass, friction, damping were NOT problem.&#xD;&#xA;Check this discussion thread for more details.&#xD;&#xA;http://www.box2d.org/forum/viewtopic.php?f=3&amp;t=6906&amp;p=30782#p30782&#xD;&#xA;&#xD;&#xA;2. Using other physics engine.&#xD;&#xA;*Newton Game Dynamics* configured performing this correctly by default.&#xD;&#xA;However using Newton dynamics in iOS is possible but it's somewhat harder than others. I used several days configuring it for iOS.&#xD;&#xA;&#xD;&#xA;I'm asking on Bullet3D forums. I'll update this when I got a solution." />
  <row Id="26669" PostHistoryTypeId="2" PostId="12207" RevisionGUID="05332214-226c-47b9-8a6e-2727f50ec5b7" CreationDate="2011-05-12T01:55:48.350" UserId="7217" Text="[Medieval Total War][1] is one that fits the bill.  Unless multiplayer in this strategic portion is required.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.totalwar.com/medieval" />
  <row Id="26670" PostHistoryTypeId="16" PostId="12203" RevisionGUID="3759f1df-e10f-41ae-a755-f87f94cf94c7" CreationDate="2011-05-12T02:48:59.007" UserId="51" />
  <row Id="26671" PostHistoryTypeId="16" PostId="12207" RevisionGUID="5e596c29-b4e9-476d-8299-afa9c1ceee1f" CreationDate="2011-05-12T02:48:59.007" UserId="51" />
  <row Id="26672" PostHistoryTypeId="25" PostId="12177" RevisionGUID="2df1dbef-d90b-4509-a722-b2b8ce444538" CreationDate="2011-05-12T03:11:48.873" Comment="http://twitter.com/#!/StackGameDev/status/68513677619372033" />
  <row Id="26673" PostHistoryTypeId="4" PostId="12188" RevisionGUID="52997da9-dafa-4ac6-88c8-41b8ee04f3b3" CreationDate="2011-05-12T03:45:19.080" UserId="7198" Comment="edited title" Text="Deleting Objects Before Export from Maya Causes .PSK to Crash UDK on Import" />
  <row Id="26674" PostHistoryTypeId="2" PostId="12208" RevisionGUID="516fe565-b457-46fe-8ee8-d2e09468eb1e" CreationDate="2011-05-12T03:55:40.743" UserId="5021" Text="D* is quite involved -- I don't recommend trying to implement it. Even when projects that are well funded, and being developed by smart/experienced people, D* lite is used, because D* is such a pain to get right.&#xD;&#xA;&#xD;&#xA;You may be interested in this presentation, which includes discussion of Left 4 Dead's pathfinding:&#xD;&#xA;&#xD;&#xA;http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf&#xD;&#xA;&#xD;&#xA;Their approach is basically to use a coarse level A* search to get a general path for an agent, and then to do a fine detail level A* search for their local environment. This works as long as your obstacles cannot block out multiple course detail graph nodes, which is fine for most games. This is the method I recommend if you have less than 100 agents.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to support hundreds, or thousands of agents, then you can implement something like continuum crowds. See this research:&#xD;&#xA;http://grail.cs.washington.edu/projects/crowd-flows/&#xD;&#xA;That discusses a purely CPU based method that can support thousands of actors in a dynamic environment.&#xD;&#xA;&#xD;&#xA;If you want to support tens of thousands, or hundreds of thousands of agents, then you can implement something like continuum crowds, with GPU assistance.&#xD;&#xA;See here for the relevant research:&#xD;&#xA;https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/misc/siggraph_asia_08/GPUCrowdSimulation_SLIDES.pdf&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26675" PostHistoryTypeId="5" PostId="12208" RevisionGUID="053b8487-c1c4-4dd8-a218-f06fe08507c0" CreationDate="2011-05-12T04:03:08.930" UserId="5021" Comment="added 225 characters in body; added 205 characters in body" Text="D* is quite involved -- I don't recommend trying to implement it. Even when projects that are well funded, and being developed by smart/experienced people, D* lite is used, because D* is such a pain to get right.&#xD;&#xA;&#xD;&#xA;You may be interested in this presentation, which includes discussion of Left 4 Dead's pathfinding:&#xD;&#xA;&#xD;&#xA;http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf&#xD;&#xA;&#xD;&#xA;Their approach is basically to use a coarse level A* search to get a general path for an agent, and then to do a fine detail level A* search for an agent's local environment. This way, you can quickly recompute the course detail A* search if the terrain changes, and then quickly recompute the fine detail A* search for a small segment of the environment. This is not perfect. It works as long as your obstacles cannot block out multiple course detail graph nodes, which is fine for most games. This is the method I recommend if you have less than 100 agents.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to support hundreds, or thousands of agents, then you can implement something like continuum crowds. See this research:&#xD;&#xA;http://grail.cs.washington.edu/projects/crowd-flows/&#xD;&#xA;That discusses a purely CPU based method that can support thousands of actors in a dynamic environment.&#xD;&#xA;&#xD;&#xA;If you want to support tens of thousands, or hundreds of thousands of agents, then you can implement something like continuum crowds, with GPU assistance.&#xD;&#xA;See here for the relevant research:&#xD;&#xA;https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/misc/siggraph_asia_08/GPUCrowdSimulation_SLIDES.pdf&#xD;&#xA;&#xD;&#xA;Here is a video demonstrating continuum crowds in action:&#xD;&#xA;http://www.youtube.com/watch?v=lGOvYyJ6r1c&#xD;&#xA;(Skip to 4:10 to see large dynamic obstacles like cars and stoplights affecting hundreds of people walking around a city.)" />
  <row Id="26676" PostHistoryTypeId="5" PostId="12208" RevisionGUID="d9e524eb-6af4-4a2d-891c-8e18c5a3c4ba" CreationDate="2011-05-12T04:44:20.557" UserId="5021" Comment="deleted 10 characters in body" Text="D* is quite involved -- I don't recommend trying to implement it. Even when projects that are well funded, and being developed by smart/experienced people, D* lite is used, because D* is such a pain to get right.&#xD;&#xA;&#xD;&#xA;You may be interested in this presentation, which includes discussion of Left 4 Dead's pathfinding:&#xD;&#xA;&#xD;&#xA;http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One approach is to use a coarse level A* search to get a general path for an agent, and then to do a fine detail level A* search for an agent's local environment. This way, you can quickly recompute the course detail A* search if the terrain changes, and then quickly recompute the fine detail A* search for a small segment of the environment. This is not perfect. It works as long as your obstacles cannot block out multiple course detail graph nodes, which is fine for most games. This is the method I recommend if you have less than 100 agents.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to support hundreds, or thousands of agents, then you can implement something like continuum crowds. See this research:&#xD;&#xA;http://grail.cs.washington.edu/projects/crowd-flows/&#xD;&#xA;That discusses a purely CPU based method that can support thousands of actors in a dynamic environment.&#xD;&#xA;&#xD;&#xA;If you want to support tens of thousands, or hundreds of thousands of agents, then you can implement something like continuum crowds, with GPU assistance.&#xD;&#xA;See here for the relevant research:&#xD;&#xA;https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/misc/siggraph_asia_08/GPUCrowdSimulation_SLIDES.pdf&#xD;&#xA;&#xD;&#xA;Here is a video demonstrating continuum crowds in action:&#xD;&#xA;http://www.youtube.com/watch?v=lGOvYyJ6r1c&#xD;&#xA;(Skip to 4:10 to see large dynamic obstacles like cars and stoplights affecting hundreds of people walking around a city.)" />
  <row Id="26677" PostHistoryTypeId="5" PostId="11887" RevisionGUID="779fd2a0-495e-4780-ba65-191e390cacd4" CreationDate="2011-05-12T05:52:47.007" UserId="5508" Comment="added 2 characters in body" Text="I imagine a battle sequence as a minigame within your game. Update ticks (or turn ticks) are directed to a component handling these events. This approach encapsulates the battle sequence logic in a separate class, leaving your main game loop free to transition between game states.&#xD;&#xA;&#xD;&#xA;    void gameLoop() {&#xD;&#xA;        while(gameRunning) {&#xD;&#xA;            if (state == EXPLORATION) {&#xD;&#xA;                // Perform actions for when player is simply walking around&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_BATTLE) {&#xD;&#xA;                // Perform actions for when player is in battle&#xD;&#xA;                currentBattle.HandleTurn()&#xD;&#xA;            }&#xD;&#xA;            else if (state == IN_DIALOGUE) {&#xD;&#xA;                // Perform actions for when player is talking with npcs&#xD;&#xA;                // ...&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The battle sequence class would look like this:&#xD;&#xA;&#xD;&#xA;    class BattleSequence {&#xD;&#xA;        public:&#xD;&#xA;            BattleSequence(Entity player, Entity enemy);&#xD;&#xA;            void HandleTurn();&#xD;&#xA;            bool battleFinished();&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity currentlyAttacking;&#xD;&#xA;            Entity currentlyReceiving;&#xD;&#xA;            bool finished;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your Troll and Warrior both inherit from a common superclass called Entity. Within HandleTurn, the attacking entity is allowed to move. This is equivalent to an AI think routine.&#xD;&#xA;&#xD;&#xA;    void HandleTurn() {&#xD;&#xA;        // Perform turn actions&#xD;&#xA;        currentlyAttacking.fight(currentlyReceiving);&#xD;&#xA;&#xD;&#xA;        // Switch sides&#xD;&#xA;        Entity temp = currentlyAttacking;&#xD;&#xA;        currentlyAttacking = currentlyReceiving;&#xD;&#xA;        currentlyReceiving = temp;&#xD;&#xA;&#xD;&#xA;        // Battle end condition&#xD;&#xA;        if (currentlyReceiving.isDead() || currentlyAttacking.hasFled()) {&#xD;&#xA;            finished = true;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fight method decides what the entity is going to do. Note that this does not need to involve the opposing entity, like drinking a potion or running away.&#xD;&#xA;&#xD;&#xA;**Update:** To support multiple monsters and a player party, you introducte a Group class:&#xD;&#xA;&#xD;&#xA;    class Group {&#xD;&#xA;        public:&#xD;&#xA;            void fight(Group opponents) {&#xD;&#xA;                // Loop through all group members so everyone gets&#xD;&#xA;                // a shot at the opponents&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    Entity attacker = members[i];&#xD;&#xA;                    attacker.fight(opponents);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            Entity get(int targetID) {&#xD;&#xA;                // TODO: Bounds checking&#xD;&#xA;                return members[targetID];&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            bool isDead() {&#xD;&#xA;                bool dead = true;&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    dead = dead &amp;&amp; members[i].isDead();&#xD;&#xA;                }&#xD;&#xA;                return dead;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            bool hasFled() {&#xD;&#xA;                bool fled = true;&#xD;&#xA;                for (int i = 0; i &lt; memberCount; i++) {&#xD;&#xA;                    fled = fled &amp;&amp; members[i].hasFled();&#xD;&#xA;                }&#xD;&#xA;                return fled;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;        private:&#xD;&#xA;            Entity[] members;&#xD;&#xA;            int memberCount;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The Group class will replace all occurences of Entity in the class BattleSequence. Selecting and attacking will be handled by the Entity class itself, so the AI can take the whole group into account when selecting the best course of action.&#xD;&#xA;&#xD;&#xA;    class Entity {&#xD;&#xA;        public:&#xD;&#xA;            void fight(Group opponents) {&#xD;&#xA;                // Algorithm for selecting an entity from the group&#xD;&#xA;                // ...&#xD;&#xA;                int targetID = 0; // Or just pick the first one&#xD;&#xA;&#xD;&#xA;                Entity target = opponents.get(targetID);&#xD;&#xA;&#xD;&#xA;                // Fighting algorithm&#xD;&#xA;                target.applyDamage(10);&#xD;&#xA;            }&#xD;&#xA;    }" />
  <row Id="26678" PostHistoryTypeId="2" PostId="12209" RevisionGUID="9aa8e31f-1be2-471a-ac8e-fe0be6b54f55" CreationDate="2011-05-12T06:01:35.273" UserId="2162" Text="Have you looked at simple steering behaviors?  &#xD;&#xA;&#xD;&#xA;http://www.red3d.com/cwr/steer/&#xD;&#xA;&#xD;&#xA;You can use them to veer from your A* path in order to do local obstacle avoidance, and then steer back onto your path once you are done.&#xD;&#xA;&#xD;&#xA;Its also fairly easy to combine multiple behaviors." />
  <row Id="26679" PostHistoryTypeId="25" PostId="12186" RevisionGUID="5a781a08-57a5-440c-9ea1-e49c2f9827fe" CreationDate="2011-05-12T06:11:49.130" Comment="http://twitter.com/#!/StackGameDev/status/68558978715623424" />
  <row Id="26680" PostHistoryTypeId="2" PostId="12210" RevisionGUID="0899416f-f937-4787-952f-c15629c31c55" CreationDate="2011-05-12T06:30:20.777" UserId="2162" Text="I wouldn't use a strict MVC pattern, but I would separate your rendering from your simulation, and stick it on another thread.  &#xD;&#xA;&#xD;&#xA;I think components are very useful actually, but I often see people just ignore them and write their code directly into the &quot;main&quot; component whatever that may be.  You have to remember that games are full of hacks because the are often written on a deadline with the assumption that code wont be re-used.  &#xD;&#xA;&#xD;&#xA;I'm a little confused as to why you think these approaches are incompatible.  What game code have you looked at?&#xD;&#xA;&#xD;&#xA;Personally, I think games do require some up front design.  I've seen a couple of code bases that were nightmares because of the &quot;just code it mentality&quot;.&#xD;&#xA;&#xD;&#xA;That said, I think that you should just jump in and code a game.  You'll make so many mistakes writing your first game that these kinds of problems wont matter much.  Once you have a better grasp of whats required, then you can go back and start looking at architecture and seeing how it solves the problems you encountered." />
  <row Id="26681" PostHistoryTypeId="2" PostId="12211" RevisionGUID="857c31e7-0941-4e94-8f51-ba722e18b63d" CreationDate="2011-05-12T06:43:08.087" UserId="2162" Text="The &quot;right&quot; way to do this is probably with swept collisions.  &#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php?page=3&#xD;&#xA;&#xD;&#xA;Was the result of 5 seconds of googling, but if you look for swept and AABB, you should be able to find a lot of resources." />
  <row Id="26682" PostHistoryTypeId="5" PostId="12192" RevisionGUID="ba4c64c1-398e-483f-8bff-39b6ba6213aa" CreationDate="2011-05-12T07:33:58.330" UserId="1868" Comment="added 72 characters in body" Text="Rovio just announced web version of Angry Birds at Google I/O 2011. Built on GWT, it uses WebGL with fallback to Canvas2D. The only thing it uses Flash is the sound effect playing. So I think it is fair to say the technology starts to be ready." />
  <row Id="26683" PostHistoryTypeId="25" PostId="12203" RevisionGUID="032bdc6c-22bc-480e-8ae3-b97a79261aee" CreationDate="2011-05-12T09:11:49.770" Comment="http://twitter.com/#!/StackGameDev/status/68604279010754560" />
  <row Id="26686" PostHistoryTypeId="2" PostId="12214" RevisionGUID="636e8a7a-3c58-4ef3-9d1d-01316119f7a1" CreationDate="2011-05-12T09:41:20.967" UserId="7268" Text="I have no experience of any of the above solutions but I would like to suggest a solution that fits your need.&#xD;&#xA;&#xD;&#xA;Take a look at http://www.gamooga.com/. Its a hosted communication framework for realtime apps and multiplayer games. You will need to just upload your server side code to Gamooga website, no infrastructure or hosting required.&#xD;&#xA;&#xD;&#xA;It provides you with Flash API that you can use to connect from your frontend to Gamooga backend. On the server side, you have to implement your logic in Lua, and there are good demos that you can look at for help." />
  <row Id="26687" PostHistoryTypeId="2" PostId="12215" RevisionGUID="8dd4bbfc-1990-4db2-9843-60a1aa9a2c22" CreationDate="2011-05-12T10:11:40.947" UserId="7271" Text="It's all about [projection][1], a geometric operation that lets you define a space from another space of superior dimension (basically, in your case, you're describing a 2D image from a 3D environment).&#xD;&#xA;Basically, a projection &#xD;&#xA;&#xD;&#xA;Simply put, this is how 3D rendering engines generate an image (given a 3D scene &amp; a projection) :&#xD;&#xA;&#xD;&#xA;For each pixel of the resulting image&#xD;&#xA;&#xD;&#xA;* Compute the looking direction (according to the projection), it's basically a 3D vector&#xD;&#xA;* Find the nearest object in your scene that is &quot;seen&quot; in this direction (simply guess what objects are intersected with the vector, and keep the nearest one)&#xD;&#xA;* Compute the color of this object, you have the color of the pixel !&#xD;&#xA;&#xD;&#xA;Of course this is a simple model, I'm not talking about reflective/refractive/translucent objects of special effects such as smoke...&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graphical_projection" />
  <row Id="26688" PostHistoryTypeId="2" PostId="12216" RevisionGUID="77054af5-b7bf-4b05-8e76-54c962ec9cf4" CreationDate="2011-05-12T11:44:39.470" UserId="6395" Text="I want to create a wall: &#xD;&#xA;&lt;br /&gt;width  6 cubes&#xD;&#xA;&lt;br /&gt;height 7 cubes&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;therefore I have 22 cubes on the margins and 20 cubes inside. For each of the margins cubes(except the corners) I have to set 3 fixed joints, and for the cubes inside the wall I have to set 4 fixed joints - all this to have good physics behavior.&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;**Pretty much I have to create a fixed joint between a cube and all his neighbors =&gt; and that's a lot! &lt;br /&gt;&#xD;&#xA;Is there a way to automatically create these fixed joints?  &#xD;&#xA;&lt;br /&gt;&#xD;&#xA;Is there another way to create a physics friendly wall? I want to simulate a wall of bricks hited by a projectile.**" />
  <row Id="26689" PostHistoryTypeId="1" PostId="12216" RevisionGUID="77054af5-b7bf-4b05-8e76-54c962ec9cf4" CreationDate="2011-05-12T11:44:39.470" UserId="6395" Text="in Unity3d, how to automatically create fixed joints in a wall of cubes?" />
  <row Id="26690" PostHistoryTypeId="3" PostId="12216" RevisionGUID="77054af5-b7bf-4b05-8e76-54c962ec9cf4" CreationDate="2011-05-12T11:44:39.470" UserId="6395" Text="&lt;physics&gt;&lt;unity&gt;" />
  <row Id="26691" PostHistoryTypeId="25" PostId="12216" RevisionGUID="ec9e62dd-2590-460f-8a44-a05cc4a1e6ff" CreationDate="2011-05-12T12:11:49.707" Comment="http://twitter.com/#!/StackGameDev/status/68649577472991232" />
  <row Id="26693" PostHistoryTypeId="2" PostId="12218" RevisionGUID="ff6f4caf-3c2d-4658-ac29-c8f2fee2e9ee" CreationDate="2011-05-12T12:55:03.837" UserId="3956" Text="First, Diplomacy is a board game. The question might have more chance getting great answers on http://boardgames.stackexchange.com&#xD;&#xA;&#xD;&#xA;(not enough rep, please someone edit the links)&#xD;&#xA;&#xD;&#xA;-[A Game of Thrones][1]&#xD;&#xA;&#xD;&#xA;-Quo Vadis (http://boardgamegeek.com/boardgame/122/quo-vadis)&#xD;&#xA;&#xD;&#xA;-Intrigue (http://boardgamegeek.com/boardgame/265/intrigue)&#xD;&#xA;&#xD;&#xA;-Maybe you already know about [Diplomacy variants][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boardgamegeek.com/boardgame/6472/a-game-of-thrones&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Diplomacy_%28game%29#Commercially_published_Diplomacy_variants" />
  <row Id="26694" PostHistoryTypeId="16" PostId="12218" RevisionGUID="5cc9cd88-bac6-4c4a-8181-3cd1053f98c2" CreationDate="2011-05-12T12:55:03.837" UserId="3956" />
  <row Id="26695" PostHistoryTypeId="2" PostId="12219" RevisionGUID="6c748b47-f43d-4947-ba95-57f78546ee11" CreationDate="2011-05-12T13:00:22.970" UserId="2332" Text="Judging from the gameplay you've suggested [Frozen Synapse][1] might be one to watch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.frozensynapse.com/" />
  <row Id="26696" PostHistoryTypeId="16" PostId="12219" RevisionGUID="df925ade-72fa-4ea3-9c42-2f00136aadc6" CreationDate="2011-05-12T13:00:22.970" UserId="2332" />
  <row Id="26697" PostHistoryTypeId="5" PostId="12218" RevisionGUID="2abd1e02-e5e0-4a4a-83de-c2e65e56aac3" CreationDate="2011-05-12T13:11:33.570" UserId="50" Comment="deleted 17 characters in body" Text="First, Diplomacy is a board game. The question might have more chance getting great answers on http://boardgames.stackexchange.com&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  - [A Game of Thrones][1]&#xD;&#xA;&#xD;&#xA;  - [Quo Vadis][2]&#xD;&#xA;  - [Intrigue][3]&#xD;&#xA;  - Maybe you already know about [Diplomacy variants][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boardgamegeek.com/boardgame/6472/a-game-of-thrones&#xD;&#xA;  [2]: http://boardgamegeek.com/boardgame/122/quo-vadis&#xD;&#xA;  [3]: http://boardgamegeek.com/boardgame/265/intrigue&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Diplomacy_%28game%29#Commercially_published_Diplomacy_variants" />
  <row Id="26701" PostHistoryTypeId="2" PostId="12221" RevisionGUID="ebb56d88-05f0-49ff-8e56-342e11e45469" CreationDate="2011-05-12T13:26:02.553" UserId="6937" Text="I usually don't write code for these questions, but I'm bored. I don't have unity on this computer so I'm just guessing, it should give you an idea even if it doesn't compile. I just added each blocks right and top joint as long as it's not on the top row or far right column. In a real situation you would add the parent transforms x and y position and do all positioning in local space so it can accept the parents transform, but you get the idea I hope.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    int x = 6;&#xD;&#xA;    int y = 7;&#xD;&#xA;    float hSpacing = 0.5f;&#xD;&#xA;    float vSpacing = 0.5f;&#xD;&#xA;    GameObject[,] wall = new GameObject[x,y];&#xD;&#xA;    &#xD;&#xA;    for(int i = 0;i&lt;width;i++)&#xD;&#xA;    {&#xD;&#xA;        for(int j = 0;j&lt;height;j++)&#xD;&#xA;        {&#xD;&#xA;             //Add the Cube&#xD;&#xA;             wall[i,j] = (GameObject)Instantiate(cube,&#xD;&#xA;                         new Vector3(i*(cube.lossyScale.x+hSpacing),&#xD;&#xA;                         j*(cube.lossyScale.y+vSpacing),0);&#xD;&#xA;&#xD;&#xA;             //Add right joint&#xD;&#xA;             if(i+1&lt;width)&#xD;&#xA;             {&#xD;&#xA;                  FixedJoint fjR = wall[i,j].AddComponent(&quot;FixedJoint&quot;) as FixedJoint;&#xD;&#xA;                  fjR.connectedBody = wall[i+1,j].rigidbody;&#xD;&#xA;             }&#xD;&#xA;&#xD;&#xA;             //Add top joint&#xD;&#xA;             if(j+1&lt;height)&#xD;&#xA;             {&#xD;&#xA;                  FixedJoint fjT = wall[i,j].AddComponent(&quot;FixedJoint&quot;) as FixedJoint;&#xD;&#xA;                  fjT.connectedBody = wall[i,j+1].rigidbody;&#xD;&#xA;             }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="26702" PostHistoryTypeId="2" PostId="12222" RevisionGUID="9ef7457c-333d-4ca3-b4b2-36d7fe5ef782" CreationDate="2011-05-12T13:52:48.213" UserId="1087" Text="I have a terrain, which is defined by [mesh][1]. And there are a lot of other polygonal faces scattered throughout the terrain, they can be located above, or below or cutting through the terrain. You can think of those faces as platforms. &#xD;&#xA;&#xD;&#xA;A screenshot below should clarify what I mean. Despite looking smooth, all the mesh are actually consist of small elements (number&gt; 10k) combined together, giving the false appearance of smoothness. The obvious disconnected area are platforms.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;My question is, how can I generate slopes that connect between the platforms and other platforms/ terrain? The slope plane is defined as a series of piecemeal planes, starting from the edge of platforms, going down or up, depending on where is the nearest platforms or terrain elements. &#xD;&#xA;&#xD;&#xA;I'm thinking about using collision detection engines to do things like this, but&#xD;&#xA;&#xD;&#xA; 1. I'm not too sure whether this is the right idea&#xD;&#xA; 2. if this was the right idea, any open source collision detection engines ( C or C++ or C#) I can use?&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Polygon_mesh&#xD;&#xA;  [2]: http://i.stack.imgur.com/6CsVv.jpg" />
  <row Id="26703" PostHistoryTypeId="1" PostId="12222" RevisionGUID="9ef7457c-333d-4ca3-b4b2-36d7fe5ef782" CreationDate="2011-05-12T13:52:48.213" UserId="1087" Text="How to generate slopes that meet the plane, is using collision detection a good idea?" />
  <row Id="26704" PostHistoryTypeId="3" PostId="12222" RevisionGUID="9ef7457c-333d-4ca3-b4b2-36d7fe5ef782" CreationDate="2011-05-12T13:52:48.213" UserId="1087" Text="&lt;geometry&gt;&lt;computational-geometry&gt;" />
  <row Id="26705" PostHistoryTypeId="4" PostId="10030" RevisionGUID="051978de-65a3-448c-9dbf-79f1981933e9" CreationDate="2011-05-12T14:19:31.100" UserId="51" Comment="edited title" Text="How do 3d game engines render 3d environments to 2d screen?" />
  <row Id="26706" PostHistoryTypeId="2" PostId="12223" RevisionGUID="22e22dfa-8a77-4fbe-8eb2-da1cc9094e94" CreationDate="2011-05-12T15:02:18.840" UserId="6894" Text="I am working on a Flash Tower Defense game. I have a main game loop which is an eventListener for each frame. Whenever you gain money or lose a life, I want the GameUI to be updated to display this change. Right now, it checks every frame for a change. How can I create an event to only change this information whenever the lives or money changes?" />
  <row Id="26707" PostHistoryTypeId="1" PostId="12223" RevisionGUID="22e22dfa-8a77-4fbe-8eb2-da1cc9094e94" CreationDate="2011-05-12T15:02:18.840" UserId="6894" Text="Flash Custom Events" />
  <row Id="26708" PostHistoryTypeId="3" PostId="12223" RevisionGUID="22e22dfa-8a77-4fbe-8eb2-da1cc9094e94" CreationDate="2011-05-12T15:02:18.840" UserId="6894" Text="&lt;game-design&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;gameloop&gt;&lt;events&gt;" />
  <row Id="26709" PostHistoryTypeId="25" PostId="12223" RevisionGUID="59b47cca-d174-4121-9bfc-49f3378f076c" CreationDate="2011-05-12T15:11:49.543" Comment="http://twitter.com/#!/StackGameDev/status/68694876115582976" />
  <row Id="26710" PostHistoryTypeId="2" PostId="12224" RevisionGUID="f383b963-72cb-42a8-aa9a-24e689f87c95" CreationDate="2011-05-12T15:26:43.270" UserId="3659" Text="I am looking to test a network game with say, 10 or more users, on a mobile device. Think of it like an MMO with a lot less users. (Assuming I can get 10 running, I'd test for more users later)&#xD;&#xA;&#xD;&#xA;The test is for two reasons :&#xD;&#xA;&#xD;&#xA; 1. To see if and how the server will handle that many users&#xD;&#xA; 2. To see the performance on the client side (seeing how it has to update/render all these objects on a mobile device)&#xD;&#xA;&#xD;&#xA;How would I go about testing 10 or more users? Unfortunately I do not have 10 devices to test on, only one. I've seen a few MMOs available on Android/iPhone. How do these developers go about test their game on devices?" />
  <row Id="26711" PostHistoryTypeId="1" PostId="12224" RevisionGUID="f383b963-72cb-42a8-aa9a-24e689f87c95" CreationDate="2011-05-12T15:26:43.270" UserId="3659" Text="How to test a network game on a mobile device" />
  <row Id="26712" PostHistoryTypeId="3" PostId="12224" RevisionGUID="f383b963-72cb-42a8-aa9a-24e689f87c95" CreationDate="2011-05-12T15:26:43.270" UserId="3659" Text="&lt;iphone&gt;&lt;android&gt;&lt;network&gt;&lt;mmo&gt;" />
  <row Id="26713" PostHistoryTypeId="2" PostId="12225" RevisionGUID="af54b509-d2fd-4931-9f69-bd5b65276a32" CreationDate="2011-05-12T15:33:17.723" UserId="1430" Text="I'm not sure about the Android platform as I have no experience with it. However, for the iOS you may be able to use something like [TestFlight][1]. You can also generate ad hoc distributions to beta users manually (you need their device UUIDs, I believe).&#xD;&#xA;&#xD;&#xA;Also, since you're testing the server, you should be able to do load/stress/packet loss testing with fake clients that run on desktops (and thus you can run multiple clients per desktop machine to get a higher stress level). You can build packet loss simulation into those fake clients as well.&#xD;&#xA;&#xD;&#xA;You could also implement game state recording/playback, play the game yourself for a little while, and then play back that session over multiple connections (starting each new connection at an offset time). &#xD;&#xA;&#xD;&#xA;Artificial methods of testing are, of course, not going to reveal the same problems as real users. But they can still help and they're much easier to do as early phase testing since you don't need to involve so many real people.&#xD;&#xA;&#xD;&#xA;  [1]: https://testflightapp.com/" />
  <row Id="26717" PostHistoryTypeId="2" PostId="12227" RevisionGUID="4dadc18e-c2c9-4bf2-b56b-549cff438bac" CreationDate="2011-05-12T15:59:07.353" UserId="6813" Text="you can create a custom event class this way:&#xD;&#xA;&#xD;&#xA;1 / In a new .as file (say GUIEvent.as) create the following class&#xD;&#xA;&#xD;&#xA;	package {&#xD;&#xA;	&#xD;&#xA;		import flash.events.*;&#xD;&#xA;	&#xD;&#xA;		public class GUIEvent extends Event {&#xD;&#xA;		&#xD;&#xA;			public static const DEFAULT_NAME:String = &quot;GUIEvent&quot;;&#xD;&#xA;			public var _params:*;&#xD;&#xA;&#xD;&#xA;			// your events types&#xD;&#xA;			public static const GET_LIFE:String = &quot;getLife&quot;;&#xD;&#xA;			public static const GET_MONEY:String = &quot;getMoney&quot;;&#xD;&#xA;			public static const GET_GLOBAL:String = &quot;getGlobal&quot;;&#xD;&#xA;			public static const GET_ETCETERA:String = &quot;getEtc&quot;;&#xD;&#xA;		&#xD;&#xA;			public function GUIEvent($type:String, $params=null , $bubbles:Boolean=false, $cancelable:Boolean = false){&#xD;&#xA;				super($type, $bubbles, $cancelable);&#xD;&#xA;				this._params = $params;&#xD;&#xA;			}&#xD;&#xA;	&#xD;&#xA;			public override function clone():Event{&#xD;&#xA;				return new GUIEvent(type, this._params, bubbles, cancelable);&#xD;&#xA;			}&#xD;&#xA;	&#xD;&#xA;			public override function toString():String{&#xD;&#xA;				return formatToString(&quot;GUIEvent&quot;, &quot;_params&quot;, &quot;type&quot;, &quot;bubbles&quot;, &quot;cancelable&quot;);&#xD;&#xA;			}	&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;2/ In the place you want to register for the events (probably your MainClass.as)&#xD;&#xA;&#xD;&#xA;	import GUIEvent;&#xD;&#xA;&#xD;&#xA;	YourGuiObjectWaitingForTheUpdates.addEventListener(GUIEvent.GET_LIFE, GUIupdateHandler);&#xD;&#xA;	YourGuiObjectWaitingForTheUpdates.addEventListener(GUIEvent.GET_MONEY, GUIupdateHandler);&#xD;&#xA;	YourGuiObjectWaitingForTheUpdates.addEventListener(GUIEvent.GET_GLOBAL, GUIupdateHandler);&#xD;&#xA;&#xD;&#xA;3/ Place the function provided to the addEventListener where it should be (still probably in your MainClass.as)&#xD;&#xA;&#xD;&#xA;	private function GUIupdateHandler(evt:GUIEvent):void&#xD;&#xA;	{&#xD;&#xA;		switch(evt.type) { &#xD;&#xA;			case GUIEvent.GET_LIFE:&#xD;&#xA;				//modify lives on the GUI&#xD;&#xA;				break;&#xD;&#xA;			case GUIEvent.GET_MONEY:&#xD;&#xA;				//modify money value on the GUI&#xD;&#xA;				break;&#xD;&#xA;			case GUIEvent.GET_GLOBAL:&#xD;&#xA;				//modify lives AND money value on the GUI&#xD;&#xA;				break;&#xD;&#xA;			default:&#xD;&#xA;				//nothing ?&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;4/ Finally, dispatch the events when you need to update you GUI...&#xD;&#xA;&#xD;&#xA;	this.dispatchEvent(new GUIEvent(GUIEvent.GET_LIFE, {life:3}, true));&#xD;&#xA;	//or&#xD;&#xA;	this.dispatchEvent(new GUIEvent(GUIEvent.GET_MONEY, {money:333}, true));&#xD;&#xA;	//or&#xD;&#xA;	this.dispatchEvent(new GUIEvent(GUIEvent.GET_GLOBAL, {life:3, money:333}, true));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I do not practice AS3 anymore, but I have played with it for years so it should be almost OK... but I could have forgotten something through." />
  <row Id="26718" PostHistoryTypeId="5" PostId="12227" RevisionGUID="819105f8-d8d9-4d99-a796-f7fec71445ed" CreationDate="2011-05-12T16:10:37.633" UserId="6813" Comment="added 93 characters in body; deleted 1 characters in body" Text="you can create a custom event class this way:&#xD;&#xA;&#xD;&#xA;1 / In a new .as file (say GUIEvent.as) create the following class&#xD;&#xA;&#xD;&#xA;	package {&#xD;&#xA;	&#xD;&#xA;		import flash.events.*;&#xD;&#xA;	&#xD;&#xA;		public class GUIEvent extends Event {&#xD;&#xA;		&#xD;&#xA;			public static const DEFAULT_NAME:String = &quot;GUIEvent&quot;;&#xD;&#xA;			public var _params:*;&#xD;&#xA;&#xD;&#xA;			// your events types&#xD;&#xA;			public static const GET_LIFE:String = &quot;getLife&quot;;&#xD;&#xA;			public static const GET_MONEY:String = &quot;getMoney&quot;;&#xD;&#xA;			public static const GET_GLOBAL:String = &quot;getGlobal&quot;;&#xD;&#xA;			public static const GET_ETCETERA:String = &quot;getEtc&quot;;&#xD;&#xA;		&#xD;&#xA;			public function GUIEvent($type:String, $params=null , $bubbles:Boolean=false, $cancelable:Boolean = false){&#xD;&#xA;				super($type, $bubbles, $cancelable);&#xD;&#xA;				this._params = $params;&#xD;&#xA;			}&#xD;&#xA;	&#xD;&#xA;			public override function clone():Event{&#xD;&#xA;				return new GUIEvent(type, this._params, bubbles, cancelable);&#xD;&#xA;			}&#xD;&#xA;	&#xD;&#xA;			public override function toString():String{&#xD;&#xA;				return formatToString(&quot;GUIEvent&quot;, &quot;_params&quot;, &quot;type&quot;, &quot;bubbles&quot;, &quot;cancelable&quot;);&#xD;&#xA;			}	&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;2/ In the place you want to register for the events (probably your MainClass.as)&#xD;&#xA;&#xD;&#xA;	import GUIEvent;&#xD;&#xA;&#xD;&#xA;	YourGuiObjectWaitingForTheUpdates.addEventListener(GUIEvent.GET_LIFE, GUIupdateHandler);&#xD;&#xA;	YourGuiObjectWaitingForTheUpdates.addEventListener(GUIEvent.GET_MONEY, GUIupdateHandler);&#xD;&#xA;	YourGuiObjectWaitingForTheUpdates.addEventListener(GUIEvent.GET_GLOBAL, GUIupdateHandler);&#xD;&#xA;&#xD;&#xA;3/ Place the function provided to the addEventListener where it should be (still probably in your MainClass.as)&#xD;&#xA;&#xD;&#xA;	private function GUIupdateHandler(evt:GUIEvent):void&#xD;&#xA;	{&#xD;&#xA;		switch(evt.type) { &#xD;&#xA;			case GUIEvent.GET_LIFE:&#xD;&#xA;				//modify lives on the GUI using evt._params.life&#xD;&#xA;				break;&#xD;&#xA;			case GUIEvent.GET_MONEY:&#xD;&#xA;				//modify money value on the GUI using evt._params.money&#xD;&#xA;				break;&#xD;&#xA;			case GUIEvent.GET_GLOBAL:&#xD;&#xA;				//modify lives AND money value on the GUI using evt._params.life and evt._params.money&#xD;&#xA;				break;&#xD;&#xA;			default:&#xD;&#xA;				//nothing ?&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;4/ Finally, dispatch the events when you need to update you GUI...&#xD;&#xA;&#xD;&#xA;	this.dispatchEvent(new GUIEvent(GUIEvent.GET_LIFE, {life:3}, true));&#xD;&#xA;	//or&#xD;&#xA;	this.dispatchEvent(new GUIEvent(GUIEvent.GET_MONEY, {money:333}, true));&#xD;&#xA;	//or&#xD;&#xA;	this.dispatchEvent(new GUIEvent(GUIEvent.GET_GLOBAL, {life:3, money:333}, true));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I do not practice AS3 anymore, but I have played with it for years so it should be almost OK... but I could have forgotten something through." />
  <row Id="26719" PostHistoryTypeId="5" PostId="12128" RevisionGUID="0f0c0951-0678-42b4-b79e-fe24a6cbfbdd" CreationDate="2011-05-12T16:13:21.593" UserId="5966" Comment="added 5 characters in body" Text="Several solutions.&#xD;&#xA;&#xD;&#xA;1. For Box2D, set `b2_velocityThreshold` in `b2Settings.h` file. In my case, I set it to `0.0f` and it worked! Mass, friction, damping were NOT problem.&#xD;&#xA;Check this discussion thread for more details.&#xD;&#xA;http://www.box2d.org/forum/viewtopic.php?f=3&amp;t=6906&amp;p=30782#p30782&#xD;&#xA;&#xD;&#xA;2. Using other physics engine.&#xD;&#xA;*Newton Game Dynamics* configured performing this correctly by default.&#xD;&#xA;However using Newton dynamics in iOS is possible but it's somewhat harder than others. I used several days configuring it for iOS.&#xD;&#xA;&#xD;&#xA;I'm also asking on Bullet3D forums. I'll update this when I got a solution." />
  <row Id="26720" PostHistoryTypeId="2" PostId="12228" RevisionGUID="a4ba931d-efb7-440c-b579-a223a6b707ab" CreationDate="2011-05-12T16:21:22.243" UserId="6465" Text="I know yall are probably going to hate me.....but I can't figure out what im doing wrong, im trying to make a SIMPLE Vertex Grid (for Terrain) but I get a black screen for some reason And I can't figure out why. It does run, but I just get a black screen afterwards....I hate posting such huge code on this site but I figure if anyone can explain what the heck I did wrong i'd be able to understand a little bit better.&#xD;&#xA;&#xD;&#xA;I think the problem....may be in the matrix, but my code is simple and im 100% sure im doing the Grid right because I took it from a working tutorial that does grids (but it's large and VERY confusing for a beginner, so I just took the appropriate code).&#xD;&#xA;&#xD;&#xA;I know it's alot to look at (vars.h is very small) and main.cpp is pretty small too but I know it's still alot.....but im just completely stuck.&#xD;&#xA;&#xD;&#xA;vars.h&#xD;&#xA;http://pastebin.com/SupcqB8N&#xD;&#xA;&#xD;&#xA;main.cpp&#xD;&#xA;http://pastebin.com/vAnSUTpp&#xD;&#xA;&#xD;&#xA;shaders.hlsl&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer&#xD;&#xA;    {&#xD;&#xA;        float4x4 matFinal;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    struct VOut&#xD;&#xA;    {&#xD;&#xA;        float4 position : SV_POSITION;&#xD;&#xA;        float4 color : COLOR;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    VOut VShader(float4 position : POSITION, float4 color : COLOR)&#xD;&#xA;    {&#xD;&#xA;        VOut output;&#xD;&#xA;    &#xD;&#xA;        output.position = mul(matFinal, position);&#xD;&#xA;        output.color = color;&#xD;&#xA;    &#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    float4 PShader(float4 position : SV_POSITION, float4 color : COLOR) : SV_TARGET&#xD;&#xA;    {&#xD;&#xA;        return color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26721" PostHistoryTypeId="1" PostId="12228" RevisionGUID="a4ba931d-efb7-440c-b579-a223a6b707ab" CreationDate="2011-05-12T16:21:22.243" UserId="6465" Text="Simple Terrain Grid (not working)" />
  <row Id="26722" PostHistoryTypeId="3" PostId="12228" RevisionGUID="a4ba931d-efb7-440c-b579-a223a6b707ab" CreationDate="2011-05-12T16:21:22.243" UserId="6465" Text="&lt;terrain-rendering&gt;&lt;directx11&gt;" />
  <row Id="26723" PostHistoryTypeId="2" PostId="12229" RevisionGUID="cb54f3df-2e02-485f-b99c-efc579d486e3" CreationDate="2011-05-12T16:58:28.440" UserId="7191" Text="I'm not sure I know exactly what you want to do, but I'm fairly sure you don't need a collision detection engine. You'll want to use some of the principles of a collision detection engine, but don't need a full blown engine. I assume that after you find these slopes they won't change? This terrain is going to be static?&#xD;&#xA;&#xD;&#xA;You've got a few problems here.&#xD;&#xA;&#xD;&#xA; 1. Find out where and what the closest surface to &quot;connect&quot; to is. This can probably be solved following the normal of the edge out (like a ray) to see what is out there (up first then down?). If you bump into a platform, find the top edge that's closest (the edge you bumped into) and move to problem 2. If it's terrain, move to problem 2.&#xD;&#xA;&#xD;&#xA; 2. How to connect to two surfaces. Likely this can be done almost the same way as problem 1. You found the direction you need to go in problem 1, now create a normal on each end of the edge in that direction. Now the ends where you started and the points where those normals bump into something else are your 4 points for a quad.&#xD;&#xA;&#xD;&#xA; 3. Finding how when you bump into something. I'm assuming you have some height map you can reference. Hopefully you'd be able to use that along with your ray to find if something exists at that point in 3D space. Otherwise you'll have to check all the primitives (triangles? quads?) in the area to see if there was a intersection.&#xD;&#xA;&#xD;&#xA;Not sure that's really clear, but it's somewhat difficult to explain. Good luck!" />
  <row Id="26724" PostHistoryTypeId="2" PostId="12230" RevisionGUID="95c2dbeb-a498-4801-97e6-327ec025c662" CreationDate="2011-05-12T17:35:38.827" UserId="20" Text="While Valke answered your question regarding custom events perfectly, I usually try to avoid Events in Flash for game-development. Robert Penner [lists some good points why Events are bad][1].&#xD;&#xA;&#xD;&#xA;Custom events are especially bad, when you're dispatching them very frequently (a common scenario in games), because every time you dispatch the event a new `Event` object will be allocated and also has to be garbage-collected later on.&#xD;&#xA;&#xD;&#xA;I found the signal/slot pattern to be a very good replacement for most event-related stuff. There's the excellent [as3-signals][2] library or the fast [turbosignals][3] library for flash.&#xD;&#xA;&#xD;&#xA;With as3-signals, your game class could look something like this (I omitted any irrelevant stuff):&#xD;&#xA;&#xD;&#xA;    public class Game&#xD;&#xA;    {&#xD;&#xA;        // the signal that will dispatch whenever the money changes&#xD;&#xA;        public var moneyChanged:Signal = new Signal(int);&#xD;&#xA;    &#xD;&#xA;        // ENTER_FRAME listener&#xD;&#xA;        private function handleEnterFrame(e:Event):void {&#xD;&#xA;            // the player collected money.. we can dispatch an &quot;event&quot;&#xD;&#xA;            if(player.hasCollectedMoney){&#xD;&#xA;                // dispatch the collected money amount&#xD;&#xA;                moneyChanged.dispatch(player.collectedMoneyAmount);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Your GameUI class would simply have a method to update the money:&#xD;&#xA;&#xD;&#xA;    public class GameUI&#xD;&#xA;    {&#xD;&#xA;        public function updateMoney(amount:int):void {&#xD;&#xA;            // .. update money...&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;All that is left to do, is to connect the signal to the update method (slot). You usually do this somewhere at initialization time, but you can also add/remove listeners/slots during runtime. eg.&#xD;&#xA;&#xD;&#xA;    var game:Game = new Game();&#xD;&#xA;    var gui:GameUI = new GameUI();&#xD;&#xA;    game.moneyChanged.add(gui.updateMoney);&#xD;&#xA;&#xD;&#xA;Done! Whenever the game dispatches &quot;moneyChanged&quot;, the gui will be updated.&#xD;&#xA;This also works nicely with multiple listeners, so you could also have a `ScoreManager`class, that also listens to `moneyChanged` updates.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://flashblog.robertpenner.com/2009/08/my-critique-of-as3-events-part-1.html&#xD;&#xA;  [2]: https://github.com/robertpenner/as3-signals&#xD;&#xA;  [3]: http://jacksondunstan.com/turbosignals" />
  <row Id="26725" PostHistoryTypeId="2" PostId="12231" RevisionGUID="5a04ef06-9aec-4963-ae02-755278ca891c" CreationDate="2011-05-12T17:51:14.240" UserId="229" Text="**3D sprites get a new Z axis that stores depth, scaling size and movements in the X/Y plane.** A sprite that is farther away has a bigger Z value. Now, divide sprite's size and X/Y axis movements by the Z axis. As others have noted, this is a [3D perspective projection][1]. Here is the best illustration I could find:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;This makes sense conceptually because things that are farther away look smaller. Their apparent movements also look smaller.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/3D_projection#Perspective_projection&#xD;&#xA;  [2]: http://i.stack.imgur.com/iU3Dl.gif" />
  <row Id="26726" PostHistoryTypeId="5" PostId="12231" RevisionGUID="c1ec5e67-bc20-4cf4-83cf-3fda9a9a1ae2" CreationDate="2011-05-12T17:58:53.500" UserId="229" Comment="added 334 characters in body" Text="**3D sprites get a new Z axis that stores depth, scaling size and movements in the X/Y plane.** A sprite that is farther away has a bigger Z value. Now, divide sprite's size and X/Y axis movements by the Z axis. As others have noted, this is a [3D perspective projection][1]. Here is the best illustration I could find:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;This makes sense conceptually because things that are farther away look smaller. Their apparent movements also look smaller.&#xD;&#xA;&#xD;&#xA;In addition, near objects need to be drawn on top of far objects. Again, this makes sense conceptually because near objects occlude the view of objects behind them.&#xD;&#xA;&#xD;&#xA;These techniques can be implemented at the sprite level. However, for the most realistic projection each sprite has a 3D model and is rendered at the pixel level.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/3D_projection#Perspective_projection&#xD;&#xA;  [2]: http://i.stack.imgur.com/iU3Dl.gif" />
  <row Id="26727" PostHistoryTypeId="25" PostId="12224" RevisionGUID="bf374363-22f0-40e6-9046-80a218a926c3" CreationDate="2011-05-12T18:11:50.057" Comment="http://twitter.com/#!/StackGameDev/status/68740175852863488" />
  <row Id="26728" PostHistoryTypeId="2" PostId="12232" RevisionGUID="bbcc4448-63fc-4ab1-8e5c-978039963bce" CreationDate="2011-05-12T18:43:59.123" UserId="6894" Text="I have a Flash game running on a Google Sites web page right now. My main goal is to eventually convert it to an Android app. For testing and for my friends to play though, I want to store high scores on the Google Sites version.&#xD;&#xA;&#xD;&#xA;Right now I am using SharedObjects but that is only local. What is the best way to store high scores so I can see other's scores. I've been searching for a while and I found some stuff about PHP and MySQL but I don't know a lot about that or if its possible with Google Sites.&#xD;&#xA;&#xD;&#xA;I am not really worried about people hacking the scores, I just want something quick and simple, especially since it probably won't be used when I convert it to an Android app." />
  <row Id="26729" PostHistoryTypeId="1" PostId="12232" RevisionGUID="bbcc4448-63fc-4ab1-8e5c-978039963bce" CreationDate="2011-05-12T18:43:59.123" UserId="6894" Text="Flash High Scores" />
  <row Id="26730" PostHistoryTypeId="3" PostId="12232" RevisionGUID="bbcc4448-63fc-4ab1-8e5c-978039963bce" CreationDate="2011-05-12T18:43:59.123" UserId="6894" Text="&lt;game-design&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;leaderboards&gt;" />
  <row Id="26734" PostHistoryTypeId="6" PostId="12232" RevisionGUID="2b077df5-1662-4e44-b329-fe236018bc52" CreationDate="2011-05-12T18:59:23.233" UserId="51" Comment="edited tags; edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;leaderboards&gt;" />
  <row Id="26735" PostHistoryTypeId="6" PostId="12223" RevisionGUID="dbde6208-ef8b-40ae-ace6-74bb1a91ba40" CreationDate="2011-05-12T18:59:54.653" UserId="51" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;gameloop&gt;&lt;events&gt;" />
  <row Id="26736" PostHistoryTypeId="2" PostId="12233" RevisionGUID="c838856e-9e27-4bae-b030-33c6ca3587a5" CreationDate="2011-05-12T19:41:40.277" UserId="6558" Text="Simply put, you need some sort of server side scripting support to be able to handle a 'true' high score table like you're talking about.  A bit of research turned up that google sites does **not** support any server side languages.&#xD;&#xA;&#xD;&#xA;However, depending on the abilities of flash, and google docs spreadsheets, you might be able to hack something together where your game 'submits' a form to google docs, and then reads it back.  This is a completely untested idea, and if it is possible, it's almost certainly a really hacky solution, and might be more complex than simply getting a web server to handle the scores.&#xD;&#xA;&#xD;&#xA;Alternate option: set up a web server on your local machine, and use that for the high score list.  There's other potential issues if you do this, but it would work if your game doesn't get found by something like reddit." />
  <row Id="26737" PostHistoryTypeId="2" PostId="12234" RevisionGUID="1b2b3b36-31ea-4390-b51f-9382dbb8e7d6" CreationDate="2011-05-12T19:45:46.777" UserId="853" Text="I've messed around with iPhone development for a couple years now. I've done some contract work. I want to get into Cocos2D to develop a game idea that I have. &#xD;&#xA;&#xD;&#xA;I was wondering what might be the best/quickest way to get up in running in cocos2d? &#xD;&#xA;&#xD;&#xA;I've thought about a book, but I wondering if that is needed? I'm the type of guy that just wants to know what everything does and is suppose to be used for. &#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="26738" PostHistoryTypeId="1" PostId="12234" RevisionGUID="1b2b3b36-31ea-4390-b51f-9382dbb8e7d6" CreationDate="2011-05-12T19:45:46.777" UserId="853" Text="Best Way to Learn Cocos2D?" />
  <row Id="26739" PostHistoryTypeId="3" PostId="12234" RevisionGUID="1b2b3b36-31ea-4390-b51f-9382dbb8e7d6" CreationDate="2011-05-12T19:45:46.777" UserId="853" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="26740" PostHistoryTypeId="2" PostId="12235" RevisionGUID="56cc721f-c92e-4e89-8428-e0ff77ad859c" CreationDate="2011-05-12T20:10:19.000" UserId="7191" Text="Have you tried building up from example code you know works? Incrementally adding to it? I think that's your best solution. Start with drawing a triangle and make sure that shows up, then add textures, then make it two triangles drawn from a loop, then make it into your whole grid.&#xD;&#xA;&#xD;&#xA;For your current code, I can only suggest the basic 3D troubleshooting stuff. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - Make sure your camera is pointing the right direction&#xD;&#xA; - Disable lighting, depth buffer, clipping, textures and special effects&#xD;&#xA; - Check that your objects are properly formed&#xD;&#xA; - Make sure your camera has it's bounds set up correctly&#xD;&#xA;&#xD;&#xA; Good luck!" />
  <row Id="26741" PostHistoryTypeId="2" PostId="12236" RevisionGUID="eaa24c2b-9ff4-46ac-8c78-92774f1fdea6" CreationDate="2011-05-12T20:12:20.147" UserId="7198" Text="I wasn't sure if this was something to do with UDK or ActorX but the problem ended up being some extra inputs on the character in Maya. &#xD;&#xA;&#xD;&#xA;I had a blend shape on the character that must have had a connection with those objects. I deleted all inputs except for the skin cluster on the character and everything works fine now.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26742" PostHistoryTypeId="5" PostId="12207" RevisionGUID="f637a9a2-b5f3-4edb-bd51-04314530b549" CreationDate="2011-05-12T20:45:18.943" UserId="7217" Comment="deleted 3 characters in body" Text="[Medieval Total War][1] has all three of those.  Unless multiplayer in this strategic portion is required.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.totalwar.com/medieval" />
  <row Id="26743" PostHistoryTypeId="2" PostId="12237" RevisionGUID="b4f957fe-7173-4f21-94f0-0362a7b116e7" CreationDate="2011-05-12T20:55:10.727" UserId="4212" Text="[Shiva 3D][1] does iPhone, Android, WebOS and Airplay.  It also has many non-mobile options.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stonetrip.com/" />
  <row Id="26744" PostHistoryTypeId="2" PostId="12238" RevisionGUID="7e03ec01-fac3-4eb4-8eee-a628d5e11eef" CreationDate="2011-05-12T21:11:28.277" UserId="141" Text="This question got closed on gaming SE as off topic. I hope it's on topic here.&#xD;&#xA;&#xD;&#xA;Many years ago, a friend and I prototyped a simple 2d rpg with what we thought was a unique idea for the combat mechanics. It used wandering monsters and a cutaway battle screen system. We added a bunch of effects like &quot;conditions&quot; that could affect your player - the standard stuff like blind, dazed, weak, etc.&#xD;&#xA;&#xD;&#xA;The unique part is that we wanted to make the combat as close to you, the player actually fighting, and not just you commanding a character to do stuff. So we made it so what the character experiences, you experience. The basic combat screen included an outline of the enemy, and one of you. At randomized times, targets would appear on either figure, and begin to shrink. On the enemy, these were &quot;openings&quot; and you had to click them before they disappear, the closer to center, the better the hit. On your figure, you had to click to defend from an attack before the target shrank.&#xD;&#xA;&#xD;&#xA;The conditions on your character made this interesting. Like I said, they were intended to affect the player literally. So blindness literally dimmed the screen 90%. If you were dazed, the targets would wobble randomly. If you were weak, your mouse cursor would lag and glide around. Everything translated to an actual impairment in your gameplay, not some arbitrary &quot;your attacks do half damage&quot;.&#xD;&#xA;&#xD;&#xA;This would have logically extended into a spell system, where you actually have to remember spell words and combine them into creative combinations and type them real time. I know some games have done variants of this kind of spell system.&#xD;&#xA;&#xD;&#xA;Looking back, I think this was still a fun idea, but it seems awful from an accessibility standpoint. Players like their games to make them feel powerful, not to acknowledge and emphasize their real life flaws. So have any games attempted something like this and had some success? What came of it? If not does it seem like a reasonable and creative idea to try?" />
  <row Id="26745" PostHistoryTypeId="1" PostId="12238" RevisionGUID="7e03ec01-fac3-4eb4-8eee-a628d5e11eef" CreationDate="2011-05-12T21:11:28.277" UserId="141" Text="Do any games have this type of mechanic?" />
  <row Id="26746" PostHistoryTypeId="3" PostId="12238" RevisionGUID="7e03ec01-fac3-4eb4-8eee-a628d5e11eef" CreationDate="2011-05-12T21:11:28.277" UserId="141" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="26747" PostHistoryTypeId="25" PostId="12234" RevisionGUID="72d83ab6-5911-4fb5-8d08-8d394bf7a0da" CreationDate="2011-05-12T21:11:50.447" Comment="http://twitter.com/#!/StackGameDev/status/68785475472736256" />
  <row Id="26748" PostHistoryTypeId="2" PostId="12239" RevisionGUID="fcb6d7ae-11e6-4ab7-b3c5-64776a1d22f8" CreationDate="2011-05-12T21:29:00.787" UserId="3289" Text="There's been similar stuff in various games, where you character becomes harder to control when you're drunk or on drugs (GTA3 et. al.), where aim stability is affected by experience/etc and also where the screen display is severely affected by different things (many RPG-FPS:es has this).&#xD;&#xA;&#xD;&#xA;I suggest you research that and see if it makes for a good gameplay component. It will make users be frustrated if done improperly, so careful tuning is required. &#xD;&#xA;&#xD;&#xA;Usually challenging, but overcome-able (...) gameplay mechanics are good. So a dim view, or laggy/overshooting (but predictable) mouse pointer may work well, but be careful with randomness. Game outcome based too much on chance aren't that fun (for most of us at least, some people enjoy bingo... but these rarely buy videogames).&#xD;&#xA; &#xD;&#xA;Personally, I enjoy &quot;bad control&quot; or &quot;random jittery targets&quot; as an occasional change to the regular gameplay, but I don't think I'd enjoy having it as a core gameplay feature." />
  <row Id="26749" PostHistoryTypeId="2" PostId="12240" RevisionGUID="db2f7359-a730-4532-8a3d-69a2764c37a0" CreationDate="2011-05-12T22:18:25.557" UserId="20" Text="There's the *SexyApp*, or [PopCap framework][1], that was developed by PopCap. As far as I know it's windows only and no longer actively developed though.&#xD;&#xA;&#xD;&#xA;Here's a link to the (unofficial) [forum][2] and to a [Linux/Mac port][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/popcapframework&#xD;&#xA;  [2]: http://forum.fischeronline.de/&#xD;&#xA;  [3]: http://sourceforge.net/projects/tuxcap/" />
  <row Id="26750" PostHistoryTypeId="2" PostId="12241" RevisionGUID="73093d90-6454-4bf4-9462-be5c50231215" CreationDate="2011-05-12T22:30:50.020" UserId="4662" Text="Something to that extent is certainly nothing I've heard of before. However, you should be *careful* when implementing it. The number one thing players expect from their game is control. Actions or sequences that remove control from the player are the most universally derided gameplay mechanics. A player expects to have complete and total control, within interface limitations.&#xD;&#xA;&#xD;&#xA;It would certainly be an interesting idea, and objectively a great mechanic, but I think you'll find that in reality, human players will hate it." />
  <row Id="26751" PostHistoryTypeId="2" PostId="12242" RevisionGUID="d96cf22a-5253-425f-b1fb-2a59eafbf25c" CreationDate="2011-05-12T22:46:54.743" UserId="51" Text="Try this: http://www.learn-cocos2d.com/" />
  <row Id="26753" PostHistoryTypeId="25" PostId="12238" RevisionGUID="82532bae-377f-4be9-838c-c551a5f3812e" CreationDate="2011-05-13T00:11:51.383" Comment="http://twitter.com/#!/StackGameDev/status/68830779295285248" />
  <row Id="26754" PostHistoryTypeId="2" PostId="12243" RevisionGUID="5c14f912-340c-4e0b-9b7e-ef23c0ec30a4" CreationDate="2011-05-13T00:21:47.807" UserId="7282" Text="I have a bounding box on my character, its position in the previous frame an the current frame.  The bounding box is axis aligned.&#xD;&#xA;&#xD;&#xA;My character is running around inside a cave, I have a list of points (lines) that represents the wall of the cave (not axis aligned)&#xD;&#xA;&#xD;&#xA;I've got a coarse grained algorithm that tells me when some part of my character is likely to have collided with some part of the cave wall.&#xD;&#xA;&#xD;&#xA;I do not have a fine grained algorithm to tell me specifically which line of the wall was collided with and at which point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My current thought was that I could just create a line for each corner of the bounding box from its position in the previous frame, to its position in the current frame, then test each of these lines for intersections with any of the lines in the cave wall.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My google fu however hasn't shown me an easy formula for calculating intersections.  Have I picked a bad way to do this, or am I just bad at search?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My game is written in scala, however I can read/translate most any c style language and many scripting languages, whatever you feel like answering in" />
  <row Id="26755" PostHistoryTypeId="1" PostId="12243" RevisionGUID="5c14f912-340c-4e0b-9b7e-ef23c0ec30a4" CreationDate="2011-05-13T00:21:47.807" UserId="7282" Text="How do I find the intersection of two lines" />
  <row Id="26756" PostHistoryTypeId="3" PostId="12243" RevisionGUID="5c14f912-340c-4e0b-9b7e-ef23c0ec30a4" CreationDate="2011-05-13T00:21:47.807" UserId="7282" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;linear-algebra&gt;" />
  <row Id="26757" PostHistoryTypeId="2" PostId="12244" RevisionGUID="38ad872b-f948-4195-8e41-f0cf308fe2a8" CreationDate="2011-05-13T00:39:38.533" UserId="1923" Text="googling &quot; intersection test line segment line segment&quot; produced this:&#xD;&#xA;&#xD;&#xA;[http://paulbourke.net/geometry/lineline2d/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://paulbourke.net/geometry/lineline2d/" />
  <row Id="26758" PostHistoryTypeId="2" PostId="12245" RevisionGUID="78822e64-4abf-4c87-9b98-9f70ab48d53d" CreationDate="2011-05-13T00:54:28.000" UserId="4235" Text="This seems to me to be the type of problem that you would solve by using the current mesh as the rendering mesh, and creating a separate mesh for collisions where you connect the appropriate surfaces inside of the modeling application. I'm not sure investing the time into coming up with an algorithm would be worthwhile unless you're going to continually run into this problem over and over." />
  <row Id="26759" PostHistoryTypeId="2" PostId="12246" RevisionGUID="13c4133f-c919-47d5-85df-a87159a500a5" CreationDate="2011-05-13T01:48:55.073" UserId="6813" Text="You can do that with different approaches;&#xD;&#xA;&#xD;&#xA;- segment vs segment using parametric lines plus some verifications (because lines are not segments).&#xD;&#xA;&#xD;&#xA;- segment vs box&#xD;&#xA;&#xD;&#xA;- segment vs circle (this one would be my favorite)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;. But as you request for a segment vs segment intersection test, here is a pseudo C++ example extracted from the very interesting book &quot;Real time collision detection&quot;: &#xD;&#xA;&#xD;&#xA;	float Signed2DTriArea(Point a, Point b, Point c)&#xD;&#xA;	{&#xD;&#xA;		return (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	int Test2DSegmentSegment(Point a, Point b, Point c, Point d, float &amp;t, Point &amp;p)&#xD;&#xA;	{&#xD;&#xA;		float a1 = Signed2DTriArea(a,b,d); // Compute winding of abd (+ or -)&#xD;&#xA;		float a2 = Signed2DTriArea(a,b,c); // To intersect, must have sign opposite of a1&#xD;&#xA;&#xD;&#xA;		if( a1 * a2 &lt; 0.0f ) // require unsigned x &amp; y values.&#xD;&#xA;		{&#xD;&#xA;			float a3 = Signed2DTriArea(c,d,a);&#xD;&#xA;			float a4 = a3 + a2 - a1;&#xD;&#xA;&#xD;&#xA;			if( a3 * a4 &lt; 0.0f )&#xD;&#xA;			{&#xD;&#xA;				t = a3 / (a3 - a4);&#xD;&#xA;				p = a + t * (b - a); // the point of intersection&#xD;&#xA;				return 1;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		// Segments not intersecting or collinear&#xD;&#xA;		return 0;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Software license agreement of the book ask to include the following credit to use the code examples:&#xD;&#xA;&#xD;&#xA;*code example &quot;from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmaan Publishers, © 2005 Elvesier Inc&quot;*&#xD;&#xA;" />
  <row Id="26760" PostHistoryTypeId="5" PostId="12246" RevisionGUID="d3921f1f-a088-4947-a636-ef642deb32dc" CreationDate="2011-05-13T01:54:32.670" UserId="6813" Comment="added 252 characters in body; added 153 characters in body" Text="You can do that with different approaches;&#xD;&#xA;&#xD;&#xA;- segment vs segment using parametric lines plus some verifications (because lines are not segments).&#xD;&#xA;&#xD;&#xA;- segment vs box&#xD;&#xA;&#xD;&#xA;- segment vs circle (this one would be my favorite)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;. But as you request for a segment vs segment intersection test, here is a pseudo C++ example extracted from the very interesting book &quot;Real time collision detection&quot;: &#xD;&#xA;&#xD;&#xA;	float Signed2DTriArea(Point a, Point b, Point c)&#xD;&#xA;	{&#xD;&#xA;		return (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	int Test2DSegmentSegment(Point a, Point b, Point c, Point d, float &amp;t, Point &amp;p)&#xD;&#xA;	{&#xD;&#xA;		// signs of areas correspond to which side of ab points c and d are&#xD;&#xA;		float a1 = Signed2DTriArea(a,b,d); // Compute winding of abd (+ or -)&#xD;&#xA;		float a2 = Signed2DTriArea(a,b,c); // To intersect, must have sign opposite of a1&#xD;&#xA;&#xD;&#xA;		// If c and d are on different sides of ab, areas have different signs&#xD;&#xA;		if( a1 * a2 &lt; 0.0f ) // require unsigned x &amp; y values.&#xD;&#xA;		{&#xD;&#xA;			float a3 = Signed2DTriArea(c,d,a); // Compute winding of cda (+ or -)&#xD;&#xA;			float a4 = a3 + a2 - a1; // Since area is constant a1 - a2 = a3 - a4, or a4 = a3 + a2 - a1&#xD;&#xA;&#xD;&#xA;			// Points a and b on different sides of cd if areas have different signs&#xD;&#xA;			if( a3 * a4 &lt; 0.0f )&#xD;&#xA;			{&#xD;&#xA;				// Segments intersect. Find intersection point along L(t) = a + t * (b - a).&#xD;&#xA;				t = a3 / (a3 - a4);&#xD;&#xA;				p = a + t * (b - a); // the point of intersection&#xD;&#xA;				return 1;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		// Segments not intersecting or collinear&#xD;&#xA;		return 0;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Software license agreement of the book ask to include the following credit to use the code examples:&#xD;&#xA;&#xD;&#xA;*code example &quot;from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmaan Publishers, © 2005 Elvesier Inc&quot;*&#xD;&#xA;" />
  <row Id="26761" PostHistoryTypeId="2" PostId="12247" RevisionGUID="1ea26fc3-02d2-43c8-981e-9806ebdb8b99" CreationDate="2011-05-13T02:49:16.653" UserId="4235" Text="Although someone has already provided an answer deemed satisfactory, I'm unsure the method you described will yield an accurate time of impact (TOI). My first inclination is that to find an exact answer to the question, &quot;how far can the player move before colliding with a part of the cave, if a collision occurs at all?&quot; requires resorting to continuous collision detection techniques (CCD). &#xD;&#xA;&#xD;&#xA;Specifically, there is a technique whereby you can effectively &quot;shrink&quot; your AABB into a single point, and at the same time &quot;grow&quot; the line segments of the cave by the same amount by using Minkowski Addition. Then, the problem can be seen as casting a ray against a convex object, or set of convex objects (since a point moving through time with constant velocity becomes a ray). The earliest distance along the ray that intersects with the &quot;bloated&quot; cave will represent the earliest time of impact (TOI).&#xD;&#xA;&#xD;&#xA;Most commonly literature on how to accomplish this deals with three dimensions, but still applies to two dimensions, and ought to transfer easily. I don't have time at the moment to spell out all the details or provide psuedo code, but maybe someone else will be able to verify and expand upon what I'm referring to. For now, here are a couple of papers that explain the process, and some terms you might be interested in Googling.&#xD;&#xA;&#xD;&#xA; - *&quot;Ray Casting against General Convex Objects with Application to&#xD;&#xA;   Continuous Collision Detection&quot;* by&#xD;&#xA;   Gino van den Bergen&#xD;&#xA;   http://www.bulletphysics.com/ftp/pub/test/physics/papers/jgt04raycast.pdf&#xD;&#xA;&#xD;&#xA; - *&quot;Dynamic Plane Shifting BSP Traversal&quot;* by Stan Melax (BioWare) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.9.5036 &#xD;&#xA;&#xD;&#xA; - *Configuration space object (CSO)*&#xD;&#xA;&#xD;&#xA; - *Minkowski Addition*&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26762" PostHistoryTypeId="5" PostId="12247" RevisionGUID="b33bf50f-9a78-40c2-8d04-3e8f92f14477" CreationDate="2011-05-13T02:55:49.047" UserId="4235" Comment="added 2 characters in body" Text="Although someone has already provided an answer deemed satisfactory, I'm unsure the method you described will yield an accurate time of impact (TOI). My first inclination is that to find an exact answer to the question, &quot;how far can the player move before colliding with a part of the cave, if a collision occurs at all?&quot; requires resorting to continuous collision detection techniques (CCD). &#xD;&#xA;&#xD;&#xA;Specifically, there is a technique whereby you can effectively &quot;shrink&quot; your AABB into a single point, and at the same time &quot;grow&quot; the line segments of the cave by the same amount by using Minkowski Addition. Then, the problem can be seen as casting a ray against a convex object, or set of convex objects (since a point moving through time with constant velocity becomes a ray). The earliest distance along the ray that intersects with the &quot;bloated&quot; cave will represent the earliest time of impact (TOI).&#xD;&#xA;&#xD;&#xA;Most commonly literature on how to accomplish this deals with three dimensions, but still applies to two dimensions, and ought to transfer easily. I don't have time at the moment to spell out all the details or provide psuedo code, but maybe someone else will be able to verify and expand upon what I'm referring to. For now, here are a couple of papers that explain the process, and some terms you might be interested in Googling.&#xD;&#xA;&#xD;&#xA; - *&quot;Ray Casting against General Convex Objects with Application to&#xD;&#xA;   Continuous Collision Detection&quot;* by&#xD;&#xA;   Gino van den Bergen&#xD;&#xA;   http://www.bulletphysics.com/ftp/pub/test/physics/papers/jgt04raycast.pdf&#xD;&#xA;&#xD;&#xA; - *&quot;Dynamic Plane Shifting BSP Traversal&quot;* by Stan Melax (BioWare) http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.9.5036 &#xD;&#xA;&#xD;&#xA; - *Configuration space obstacle (CSO)*&#xD;&#xA;&#xD;&#xA; - *Minkowski Addition*&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26763" PostHistoryTypeId="2" PostId="12248" RevisionGUID="30340ae4-6631-40c6-902a-ed3aeafd55a6" CreationDate="2011-05-13T02:57:30.017" UserId="6465" Text="To make a long story short im going to be away for a little bit, bringing my little netbook with me to do some VERY VERY basic DirectX 10 stuff (were talking super basic here)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyways the Integrated Card supports 9.0c, So.....What do I need to change (I think it's in the swapchain) to make it Software rendering so my DX10 stuff can be run on a card that does DX9.0c&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(also I realize it's going to be SUPER slow, but im doing VERY VERY basic stuff)" />
  <row Id="26764" PostHistoryTypeId="1" PostId="12248" RevisionGUID="30340ae4-6631-40c6-902a-ed3aeafd55a6" CreationDate="2011-05-13T02:57:30.017" UserId="6465" Text="What needs to be changed for Software Rendering?" />
  <row Id="26765" PostHistoryTypeId="3" PostId="12248" RevisionGUID="30340ae4-6631-40c6-902a-ed3aeafd55a6" CreationDate="2011-05-13T02:57:30.017" UserId="6465" Text="&lt;directx10&gt;" />
  <row Id="26766" PostHistoryTypeId="2" PostId="12249" RevisionGUID="a607e786-2f37-42a1-8618-e7f27a73badb" CreationDate="2011-05-13T03:08:08.487" UserId="4662" Text="Direct3D no longer ships with a software rasterizer. You could, however, check out WARP. http://msdn.microsoft.com/en-us/library/gg615082.aspx" />
  <row Id="26767" PostHistoryTypeId="25" PostId="12243" RevisionGUID="179a9af5-d01d-47a4-808e-7e2f36f9473d" CreationDate="2011-05-13T03:11:52.257" Comment="http://twitter.com/#!/StackGameDev/status/68876080836120576" />
  <row Id="26768" PostHistoryTypeId="2" PostId="12250" RevisionGUID="c6e017eb-ea84-4183-8dcf-04d52edc754f" CreationDate="2011-05-13T03:21:02.650" UserId="962" Text="[Windows Advanced Rasterization Platform (WARP)][1]&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;WARP is a high speed, fully conformant software rasterizer. It is a component of the DirectX graphics technology that was introduced by the DirectX 11 runtime. The DirectX 11 runtime is installed on Windows 7, Windows Server 2008 R2, and Windows Vista with the [KB971644] update.&#xD;&#xA;&#xD;&#xA;**To use WARP**&#xD;&#xA;&#xD;&#xA;Direct3D 10, 10.1, and 11 components can use an additional driver type that you can specify when you create the device (for example, when you call the `D3D11CreateDevice` function). This driver type is `D3D10_DRIVER_TYPE_WARP` or `D3D_DRIVER_TYPE_WARP`. When you specify this driver type, the runtime creates a WARP device and does not initialize a hardware device.&#xD;&#xA;&#xD;&#xA;Because WARP uses the same software interface to Direct3D as the reference rasterizer does, any Direct3D 10 or 10.1 application that can support running with the reference rasterizer can be tested by using WARP. To use WARP, rename `D3d10warp.dll` to `D3d10ref.dll` and place it in the same folder as the sample or application. Next, when you switch to ref, you will see WARP rendering.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I copied all of that from the article, but looks like the most relevant and useful part. You probably should read the entire article though. &#xD;&#xA;&#xD;&#xA;I was pretty sure that doing this was impossible when I read your question. A little digging and I was surprised.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/gg615082.aspx#introduction" />
  <row Id="26769" PostHistoryTypeId="2" PostId="12251" RevisionGUID="2f4a4321-a339-4637-820a-d3ddf4e255c2" CreationDate="2011-05-13T03:27:00.117" UserId="962" Text="[Corona SDK][1]&#xD;&#xA;---------------&#xD;&#xA;I am surprised that no one has mentioned this one yet. It is a high performance 2d game engine that runs on LUA and is [really easy to use.][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.anscamobile.com/corona/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=WMZ7R92glQ4" />
  <row Id="26770" PostHistoryTypeId="16" PostId="4725" RevisionGUID="c9560c1c-0594-4091-81f5-5c7eaaeb9d7c" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26771" PostHistoryTypeId="16" PostId="4727" RevisionGUID="ea1bc029-a3f3-418f-b90d-835a78f54ed6" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26772" PostHistoryTypeId="16" PostId="4735" RevisionGUID="e58e3d99-ef39-4f79-a3fb-6536b1aa0f3e" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26773" PostHistoryTypeId="16" PostId="4745" RevisionGUID="4b8d0cdb-5332-4322-98e5-51d49978affc" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26774" PostHistoryTypeId="16" PostId="4747" RevisionGUID="f71a759d-9e9a-4fe7-adf9-3b03a395e540" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26775" PostHistoryTypeId="16" PostId="4755" RevisionGUID="43d17611-146d-48ba-89b1-e333d1c1873a" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26776" PostHistoryTypeId="16" PostId="4821" RevisionGUID="22a42717-236e-49e5-97d8-4b4d6f3e2c9f" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26777" PostHistoryTypeId="16" PostId="4861" RevisionGUID="ba1bbf5d-1007-4cf6-8093-62d6e17463bc" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26778" PostHistoryTypeId="16" PostId="4892" RevisionGUID="bf260a43-00e4-48b4-b5de-0a3af82bd0aa" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26779" PostHistoryTypeId="16" PostId="9582" RevisionGUID="64f21c9f-72a7-4842-9853-233f8703bd49" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26780" PostHistoryTypeId="16" PostId="12237" RevisionGUID="2b829724-a089-4e31-80f9-dd8b9b6c6540" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26781" PostHistoryTypeId="16" PostId="12251" RevisionGUID="ae2049a6-d7ba-4997-8588-853fc37362ce" CreationDate="2011-05-13T04:08:12.560" UserId="51" />
  <row Id="26782" PostHistoryTypeId="2" PostId="12252" RevisionGUID="59ecc540-a8d9-4ac4-9917-23415111f3c8" CreationDate="2011-05-13T04:18:02.470" UserId="7287" Text="Terribly sorry if this is in the wrong StackExchange site, but it looked closest to my question.&#xD;&#xA;&#xD;&#xA;I have an idea or two floating around in my programmer's brain for mobile apps on Android or iOS. Thing is, I can't spend months programming it after my day job just to see someone else go to market first. In the same vein, I don't want to dump tens of thousands of dollars to pay someone to do it outright. I know that in other industries, you can often get paid by offering up the idea as intellectual property, allowing another company to do the work while you collect royalty checks for coming up with the idea in the first place, assuming the developing company went ahead with it and it became successful.&#xD;&#xA;&#xD;&#xA;Does such a thing exist in the mobile application development world? If so, any recommendations for trustworthy companies? Let's assume that it actually IS a decent idea, is well vetted out and planned, and does not exist in the marketplace yet." />
  <row Id="26783" PostHistoryTypeId="1" PostId="12252" RevisionGUID="59ecc540-a8d9-4ac4-9917-23415111f3c8" CreationDate="2011-05-13T04:18:02.470" UserId="7287" Text="Outsourcing mobile app development, but royalty-based?" />
  <row Id="26784" PostHistoryTypeId="3" PostId="12252" RevisionGUID="59ecc540-a8d9-4ac4-9917-23415111f3c8" CreationDate="2011-05-13T04:18:02.470" UserId="7287" Text="&lt;mobile&gt;" />
  <row Id="26785" PostHistoryTypeId="2" PostId="12253" RevisionGUID="c4188a8a-1759-41f2-84f0-64526753bbc3" CreationDate="2011-05-13T04:42:04.353" UserId="627" Text="**The Matrix**. Or rather, lots of matrix math.&#xD;&#xA;&#xD;&#xA;It's scary stuff for the uninitiated. There's typically three 4x4 matrices involved in turning a bunch of 3D coordinates in space into 2D coordinates on the screen (including the depth into the screen as Z).&#xD;&#xA;&#xD;&#xA;3D matrices are a set of 16 floating point values arranged in a 4x4 grid. Algorithms are used to generate the required values and then using matrix-vector multiplication, these numbers transform a 3-dimensional vector (X, Y, Z).&#xD;&#xA;&#xD;&#xA;    [ 1, 0, 0, 0 ]&#xD;&#xA;    [ 0, 1, 0, 0 ]&#xD;&#xA;    [ 0, 0, 1, 0 ]&#xD;&#xA;    [ 0, 0, 0, 1 ]&#xD;&#xA;&#xD;&#xA;This is the **identity** matrix. It essentially *does nothing* to a vector's coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Model&#xD;&#xA;-&#xD;&#xA;The first is the **world** or **model** matrix. This matrix takes the vertices in an individual model (such as a crate) modelled around the origin (0, 0, 0) and transforms them into world vertex coordinates. This might include scaling the object, rotating it around it's origin and finally translating it across to where it's located in the scene.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;View&#xD;&#xA;-&#xD;&#xA;The second matrix is the **view** matrix. This takes the world coordinates and transforms them so that they are within the context of the view. The concept of a camera is typically used to generate this matrix.&#xD;&#xA;&#xD;&#xA;The camera usually contains a **position** vector, a **direction** or **target** vector, and an **up** vector. This **up** vector describes the 'spin' of the camera.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;These vectors are used to generate what's called a **look at** matrix.&#xD;&#xA;&#xD;&#xA;The affect this has is similar to the **world** matrix in the fact that it is essentially rotating and translating the world *around the camera* to &quot;position&quot; the camera.&#xD;&#xA;&#xD;&#xA;A camera that is 10 units along the X axis will translate world coordinates 10 units in the other direction.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Projection&#xD;&#xA;--&#xD;&#xA;The final piece of the puzzle is the **projection** matrix. In a camera-like perspective projection, the matrix transforms the *almost* screen coordinates to give the illusion of a perspective with a field of view of x degrees.&#xD;&#xA;&#xD;&#xA;If you think in terms of corners of the screen (for a 640x480 game), this is how projection &quot;aligns&quot; the coordinates along the Z axis within the 2D coordinates of the screen. For orthographic projection, no scaling takes place along the Z axis into the screen. For perspective, the further away the object, the smaller it becomes in relation to the screen's extents.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/vtkKX.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/tRdPv.png" />
  <row Id="26786" PostHistoryTypeId="2" PostId="12254" RevisionGUID="89e48566-1b07-41de-92ba-c43149ef955e" CreationDate="2011-05-13T05:25:09.670" UserId="2710" Text="In roguelikes, blindness makes your character disappear (so you don't know where you are, unless you're counting steps) and confusion makes him move in random direction. In Morrowind (and I think other Elder Scrolls games) blindness made the screen totally black. A lot of games where bow is used make crosshair wobble when the bow is tightened for too long (Thief did that, for example). Many games that have booze in them made screen wobble when the character is drunk (GTA, Deus Ex); Carmageddon had drugs that messed with the palette, transforming the picture into a mess of clashing colors. Metro 2033 makes mouse cursor lag when your character is under heavy burden. Note that many players considered this a bug and were very frustrated!&#xD;&#xA;&#xD;&#xA;However, I'm not aware of any game where this stuff was a central mechanic. It might be interesting if the effects are varied enough and not TOO challenging." />
  <row Id="26787" PostHistoryTypeId="2" PostId="12255" RevisionGUID="05edf2df-adf3-4c1a-9f9d-e7e62bd5a4cd" CreationDate="2011-05-13T05:43:02.367" UserId="5687" Text="I'm an immense fan of the Jesse Schell book (A Book Of Lenses), though as noted it's not the best book specifically for level design (it does have some discussion on that front, though, particularly on how to force player paths without making them feel forced).&#xD;&#xA;&#xD;&#xA;You should note that puzzle design (for games like Cut The Rope and arguably Angry Birds-style games) is a drastically different thing than level design; level design often concerns itself with the _physical_ space of a level, and while games like Cut The Rope have some elements of this, if what you're looking for is puzzles, that's really a different topic (and sadly, one that doesn't have a lot of literature on it!).&#xD;&#xA;" />
  <row Id="26788" PostHistoryTypeId="16" PostId="12255" RevisionGUID="9e2be99a-d385-41fe-9c6c-0e29e15d7c61" CreationDate="2011-05-13T05:43:02.367" UserId="5687" />
  <row Id="26789" PostHistoryTypeId="25" PostId="12248" RevisionGUID="cd2edac6-770c-494c-bbab-d1cd3a76f017" CreationDate="2011-05-13T06:11:53.333" Comment="http://twitter.com/#!/StackGameDev/status/68921383727542272" />
  <row Id="26790" PostHistoryTypeId="2" PostId="12256" RevisionGUID="756c3b75-0a78-4d83-ba0a-109b7f8e2ad3" CreationDate="2011-05-13T06:44:57.187" UserId="7035" Text="&gt; Does such a thing exist in the mobile application development world?&#xD;&#xA;&#xD;&#xA;I guess it's not. I remember reading this [post][1] about similar case, it's pretty much sums it all.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://t-machine.org/index.php/2011/03/04/ive-got-an-idea-ill-give-you-25/" />
  <row Id="26791" PostHistoryTypeId="2" PostId="12257" RevisionGUID="38ccdb6a-58d1-4a96-9ba7-5d01ad0f74c1" CreationDate="2011-05-13T06:45:19.897" UserId="7120" Text="If you start with graphics programming the technology matters, but if you become familiar with it only concepts start to matter and they are the same on Direct3D or OpenGL. As programmable pipeline programming opposed to fixed function pipeline is becoming the standard, the part where you interact with the graphics API is small part of all the work.&#xD;&#xA;&#xD;&#xA;The other thing is, OpenGL is really big on mobile phones. It is called OpenGL ES and it is on a lot of levels exactly the same as OpenGL 4.1/4.0/3.3/3.2." />
  <row Id="26792" PostHistoryTypeId="5" PostId="12256" RevisionGUID="515b1d17-c7eb-4d40-bd1f-2a1f2df1bb8e" CreationDate="2011-05-13T07:14:51.547" UserId="7035" Comment="added 104 characters in body" Text="&gt; Does such a thing exist in the mobile application development world?&#xD;&#xA;&#xD;&#xA;I guess it's not. I remember reading this [post][1] about similar case, it's pretty much sums it all.  &#xD;&#xA;Essentially you want developer to take the risks while not taking any yourself (or so I understand.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://t-machine.org/index.php/2011/03/04/ive-got-an-idea-ill-give-you-25/" />
  <row Id="26793" PostHistoryTypeId="2" PostId="12258" RevisionGUID="36fbee1e-dbd3-4a85-b35d-c9b877f01e88" CreationDate="2011-05-13T07:17:29.323" UserId="7120" Text="There are a lot of good books on OpenGL Programming. One I like is the OpenGL SuperBible 5th edition as it explains a lot using the programmable pipeline and using the somewhat deprecated fixed function pipeline.&#xD;&#xA;&#xD;&#xA;A very good introduction on OpenGL programming on the internet is the following:&#xD;&#xA;http://www.arcsynthesis.org/gltut/index.html&#xD;&#xA;&#xD;&#xA;Next to using an API I suggest you to first start reading on 3D graphics concepts like Matrices and Vectors. This one is very good in explaining them: http://www.songho.ca/opengl/&#xD;&#xA;&#xD;&#xA;Google fixed/programmable function pipeline for explanation. In short fixed function means a lot of OpenGL functions instantiate a standard sort of pipeline on the GPU and programmable is that you have to do it yourself using shaders. (Vertex Shader/Fragment Shader). It is not as hard as it seems though. The upside is that you really understands how a graphics card works." />
  <row Id="26794" PostHistoryTypeId="16" PostId="12258" RevisionGUID="a0fe0dd4-62ce-40b5-b730-75df402c01f1" CreationDate="2011-05-13T07:17:29.323" UserId="7120" />
  <row Id="26795" PostHistoryTypeId="5" PostId="12222" RevisionGUID="bfccb136-c9b8-4c37-b3bd-1f95615a0d2b" CreationDate="2011-05-13T07:18:13.383" UserId="1087" Comment="added 231 characters in body" Text="I have a terrain, which is defined by [mesh][1]. And there are a lot of other polygonal faces scattered throughout the terrain, they can be located above, or below or cutting through the terrain. You can think of those faces as platforms. &#xD;&#xA;&#xD;&#xA;A screenshot below should clarify what I mean. Despite looking smooth, all the mesh are actually consist of small elements (number&gt; 10k) combined together, giving the false appearance of smoothness. The obvious disconnected area are platforms.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;My question is, how can I generate slopes that connect between the platforms and other platforms/ terrain? The slope plane is defined as a series of piecemeal planes, starting from the edge of platforms, going down or up, depending on where is the nearest platforms or terrain elements. &#xD;&#xA;&#xD;&#xA;I would need to generate he slope planes so that I can compute the volume difference between the slopes and the terrains, it's not just for visualization purpose.&#xD;&#xA;&#xD;&#xA;I'm thinking about using collision detection engines to do things like this, but&#xD;&#xA;&#xD;&#xA; 1. I'm not too sure whether this is the right idea&#xD;&#xA; 2. if this was the right idea, any open source collision detection engines ( C or C++ or C#) I can use?&#xD;&#xA;&#xD;&#xA;Edit: Any open source framework that can do this is desired. &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Polygon_mesh&#xD;&#xA;  [2]: http://i.stack.imgur.com/6CsVv.jpg" />
  <row Id="26796" PostHistoryTypeId="2" PostId="12259" RevisionGUID="61a7d136-cdd1-418c-8a65-698272531d04" CreationDate="2011-05-13T07:50:03.400" UserId="2080" Text="Take a look at http://playtomic.com/ or http://gamersafe.com/&#xD;&#xA;&#xD;&#xA;Both of them offer online leaderboards and are very simple to integrate with a Flash game (both require registration though, but it's free)." />
  <row Id="26797" PostHistoryTypeId="2" PostId="12260" RevisionGUID="a7256a9f-d406-4872-bb93-f5f24d475b7f" CreationDate="2011-05-13T07:56:22.957" UserId="3956" Text="Carmaggedon had some psychadelic colors on the screen and the camera moving everywhere when taking a drug power up.&#xD;&#xA;&#xD;&#xA;Anyway, how would this system work when you cast a blind spell on a computer controlled enemy for example? You would need different impairing rules for the AI." />
  <row Id="26798" PostHistoryTypeId="5" PostId="12260" RevisionGUID="35fb5225-813c-4b4d-a089-84d747efbb5a" CreationDate="2011-05-13T08:05:03.293" UserId="3956" Comment="added 161 characters in body" Text="Carmaggedon had some psychadelic colors on the screen and the camera moving everywhere when taking a drug power up.&#xD;&#xA;&#xD;&#xA;RPG like Bladur's gate also reduce the player's field of vision by increasing the 'fog of war' when you're blinded. (the interface is not affected though...)&#xD;&#xA;&#xD;&#xA;Anyway, how would this system work when you cast a blind spell on a computer controlled enemy for example? You would need different impairing rules for the AI." />
  <row Id="26799" PostHistoryTypeId="5" PostId="12258" RevisionGUID="6b2d854f-7400-49cb-9d5c-014bdac2ed49" CreationDate="2011-05-13T09:10:21.780" UserId="7120" Comment="deleted 58 characters in body" Text="There are a lot of good books on OpenGL Programming. One I like is the OpenGL SuperBible 5th edition as it explains a lot using the programmable pipeline.&#xD;&#xA;&#xD;&#xA;A very good introduction on OpenGL programming on the internet is the following:&#xD;&#xA;http://www.arcsynthesis.org/gltut/index.html&#xD;&#xA;&#xD;&#xA;Next to using an API I suggest you to first start reading on 3D graphics concepts like Matrices and Vectors. This one is very good in explaining them: http://www.songho.ca/opengl/&#xD;&#xA;&#xD;&#xA;Google fixed/programmable function pipeline for explanation. In short fixed function means a lot of OpenGL functions instantiate a standard sort of pipeline on the GPU and programmable is that you have to do it yourself using shaders. (Vertex Shader/Fragment Shader). It is not as hard as it seems though. The upside is that you really understands how a graphics card works." />
  <row Id="26800" PostHistoryTypeId="25" PostId="12252" RevisionGUID="f210228b-7caa-4b1a-94b5-614589b39a2c" CreationDate="2011-05-13T09:11:53.807" Comment="http://twitter.com/#!/StackGameDev/status/68966684895100928" />
  <row Id="26801" PostHistoryTypeId="2" PostId="12261" RevisionGUID="dc41af38-3edc-42d4-8602-841ab245ffdf" CreationDate="2011-05-13T09:15:52.217" UserId="1251" Text="I am using Actionscript 3.0 to make games and I fall into the category of programmers who use `ball.x+=5;`&#xD;&#xA;`ball.y+=5;`&#xD;&#xA;in order to move a ball by 5 pixels horizontally and vertically.&#xD;&#xA;&#xD;&#xA;Well, now i seem to have an issue with a game I am making, it has a 3-body vehicle and each has its own translation and rotation. The three bodies: front, back1,back2 exist inside the top movieclip called vehicle. So each of them has a different coordinate system compared to the top movieclip. Well, when the vehicle crashes onto an obstacle in my game, I have to reset the movieclip, this is done by taking apart all the x,y,rotation of each movieclip into an array at the beginning of the game and restoring it to the beginning position after crash.&#xD;&#xA;&#xD;&#xA;Well , but ,now  I have stumbled upon this &#xD;&#xA;&#xD;&#xA;&gt; transform.matrix&#xD;&#xA;&gt; &#xD;&#xA;&#xD;&#xA;feature in flash, which allows me to perform mathematical transformations on the movieclip's transformation matrix, and now on applying mathematical transformations on the top level movieclip, all the inside movieclips are affected, It is a huge advantage to me.&#xD;&#xA;&#xD;&#xA;*But, I would like to know, IF i use this technique by breaking apart my whole code written as of now and re-writing it into using transformation matrices for every single horizontal, vertical or rotation of the vehicle. Will it affect my performance?*&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26802" PostHistoryTypeId="1" PostId="12261" RevisionGUID="dc41af38-3edc-42d4-8602-841ab245ffdf" CreationDate="2011-05-13T09:15:52.217" UserId="1251" Text="Is there a memory read/write or performance difference when applying affine transformations on a movieclip rather basic elementary math" />
  <row Id="26803" PostHistoryTypeId="3" PostId="12261" RevisionGUID="dc41af38-3edc-42d4-8602-841ab245ffdf" CreationDate="2011-05-13T09:15:52.217" UserId="1251" Text="&lt;flash&gt;&lt;math&gt;&lt;actionscript-3&gt;&lt;matrix&gt;&lt;coordinates&gt;" />
  <row Id="26804" PostHistoryTypeId="2" PostId="12262" RevisionGUID="6af75ef5-c1b1-4ac6-a17c-ee5ea1f62a12" CreationDate="2011-05-13T09:39:16.860" UserId="7297" Text="Since you won't risk your own time, or your own money on it, your idea hasn't totally convinced even you.  I doubt you will find anyone else to sell it to. &#xD;&#xA;&#xD;&#xA;This is a very common line of reasoning.  Paul Graham wrote an essay on the topic.&#xD;&#xA;&#xD;&#xA;&gt; People ... overvalue ideas. They&#xD;&#xA;&gt; think creating a startup is just a&#xD;&#xA;&gt; matter of implementing some fabulous&#xD;&#xA;&gt; initial idea. And since a successful&#xD;&#xA;&gt; startup is worth millions of dollars,&#xD;&#xA;&gt; a good idea is therefore a million&#xD;&#xA;&gt; dollar idea.&#xD;&#xA;&gt; &#xD;&#xA;&gt; ...&#xD;&#xA;&gt; &#xD;&#xA;&gt; Actually, startup ideas are not&#xD;&#xA;&gt; million dollar ideas, and here's an&#xD;&#xA;&gt; experiment you can try to prove it:&#xD;&#xA;&gt; just try to sell one. Nothing evolves&#xD;&#xA;&gt; faster than markets. The fact that&#xD;&#xA;&gt; there's no market for startup ideas&#xD;&#xA;&gt; suggests there's no demand. Which&#xD;&#xA;&gt; means, in the narrow sense of the&#xD;&#xA;&gt; word, that startup ideas are&#xD;&#xA;&gt; worthless.&#xD;&#xA;&#xD;&#xA;http://www.paulgraham.com/ideas.html" />
  <row Id="26805" PostHistoryTypeId="5" PostId="12049" RevisionGUID="2a41e6fa-6f2b-4dbf-8ac1-39516edcd942" CreationDate="2011-05-13T09:49:34.863" UserId="7160" Comment="Added the code in EDIT1 presenting client/GUI class." Text="I recently returned to face a problem I had with a game client of mine, i.e. the client's thread responsible for input &amp; painting becomes unable to run after some while. &#xD;&#xA;&#xD;&#xA;I suspect that it has something to do with server sent massages. Possibly client is unable to handle old ones before new ones are arriving. But when I am printing inQueue size after dequeue it always reaches 0.&#xD;&#xA;&#xD;&#xA;**What else could possibly be the reason of this block?**&#xD;&#xA;&#xD;&#xA;I was debugging using NetBeans and it says there is no deadlocks?&#xD;&#xA;&#xD;&#xA;Are there other tools which I should/might use to find the reason.&#xD;&#xA;&#xD;&#xA;I have tried lots of things and I think the code of my client is now in a state of disaster :) &#xD;&#xA;&#xD;&#xA;I am using [the engine coded][1] by Bret Barker which I got from the book by David Brackeen titled [&quot;Developing Games in Java&quot;][2].&#xD;&#xA;&#xD;&#xA;If you guys would need some code I can paste some snippets of bits which you would suspect the problem is since the whole code is big &amp; fat. Plus the last thing all wants to do here is read and debug someone's code, right? :) Thus I think we can do it by need basic.&#xD;&#xA;&#xD;&#xA;*I am stuck and all your help/suggestions of stuff I should look after, even an article about similar issues, etc. is much appreciated.*&#xD;&#xA;&#xD;&#xA;  [1]: http://www.brackeen.com/javagamebook/ch06src.zip&#xD;&#xA;  [2]: http://www.brackeen.com/javagamebook/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT1: Here is presented a test class which combines client for server communication and GUI/frame for display &amp; user input.&#xD;&#xA;&#xD;&#xA;    public class NetworkingTest2 extends GameCore implements IGameFrame&#xD;&#xA;    {&#xD;&#xA;    	private static final long serialVersionUID = 1L;&#xD;&#xA;    	private float _scrollSpeed = 0.35f;&#xD;&#xA;    	private InputManager inputManager;&#xD;&#xA;    	//mouse Actions&#xD;&#xA;    	protected GameAction leftMouseClick;&#xD;&#xA;    	protected GameAction rightMouseClick;&#xD;&#xA;    	//keyboard Actions&#xD;&#xA;    	protected GameAction scrollMapUpKey;&#xD;&#xA;    	protected GameAction scrollMapDownKey;&#xD;&#xA;    	protected GameAction scrollMapLeftKey;&#xD;&#xA;    	protected GameAction scrollMapRightKey;&#xD;&#xA;    	//robot moves&#xD;&#xA;    	protected GameAction moveForwardKey;&#xD;&#xA;    	protected GameAction moveBackwardKey;&#xD;&#xA;    	protected GameAction moveLeftKey;&#xD;&#xA;    	protected GameAction moveRightKey;&#xD;&#xA;    	private RoboClient client;&#xD;&#xA;    	//your/client's bot&#xD;&#xA;    	private IUnit unit;&#xD;&#xA;    &#xD;&#xA;    	private RoboGame game = null;&#xD;&#xA;    	public NetworkingTest2(String playerName, String password)&#xD;&#xA;    	{&#xD;&#xA;    		addWindowListener(new WindowAdapter()&#xD;&#xA;    		{&#xD;&#xA;    			@Override&#xD;&#xA;    			public void windowClosing(WindowEvent e)&#xD;&#xA;    			{&#xD;&#xA;    				System.out.println(&quot;NetworkingTest2 windowClosing&quot;);&#xD;&#xA;    				//used to call disconect once and then wait for it to finish&#xD;&#xA;    				Runnable doWork = new Runnable()&#xD;&#xA;    				{&#xD;&#xA;    					public void run()&#xD;&#xA;    					{&#xD;&#xA;    						System.out.println(&quot;Stops client if it is still running.&quot;);&#xD;&#xA;    						if(client.isRunning())&#xD;&#xA;    							client.disconnect();&#xD;&#xA;    					}&#xD;&#xA;    				};&#xD;&#xA;    				SwingUtilities.invokeLater(doWork);&#xD;&#xA;    			}&#xD;&#xA;    		});&#xD;&#xA;    		initializeInput();&#xD;&#xA;    		this.client = new RoboClient(this)&#xD;&#xA;    		{&#xD;&#xA;    			@Override&#xD;&#xA;    			public void onSuccessfulLogin()&#xD;&#xA;    			{&#xD;&#xA;    				System.out.println(&quot;././././onSuccessfulLogin././././&quot;);&#xD;&#xA;    				// 0 becaue we assume that there is only one game&#xD;&#xA;    				client.createAndEnqueueJoinGameEvent(0);&#xD;&#xA;    			}&#xD;&#xA;    		};&#xD;&#xA;    		boolean isConnected = client.connectToServer(GameConstants.SERVER_IP, playerName, password);&#xD;&#xA;    		System.out.println(&quot;isConnected with server (doesn't mean the player is logged)=&quot; + isConnected);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	private void initializeInput()&#xD;&#xA;    	{&#xD;&#xA;    		this.inputManager = new InputManager(this);&#xD;&#xA;    		// mouse&#xD;&#xA;    		this.leftMouseClick = new GameAction(&quot;left mouse click&quot;);//, GameAction.DETECT_INITIAL_PRESS_ONLY);&#xD;&#xA;    		this.rightMouseClick = new GameAction(&quot;righ mouse click&quot;, GameAction.DETECT_INITIAL_PRESS_ONLY);&#xD;&#xA;    		// key&#xD;&#xA;    		this.scrollMapDownKey = new GameAction(&quot;scrollDown&quot;, GameAction.NORMAL);&#xD;&#xA;    		this.scrollMapUpKey = new GameAction(&quot;scrollUp&quot;, GameAction.NORMAL);&#xD;&#xA;    		this.scrollMapLeftKey = new GameAction(&quot;scrollLeft&quot;, GameAction.NORMAL);&#xD;&#xA;    		this.scrollMapRightKey = new GameAction(&quot;scrollRight&quot;, GameAction.NORMAL);&#xD;&#xA;    &#xD;&#xA;    		this.moveForwardKey = new GameAction(&quot;Move yout robot Forawrd/North&quot;);&#xD;&#xA;    		this.moveBackwardKey = new GameAction(&quot;Move yout robot Back/South&quot;);&#xD;&#xA;    		this.moveLeftKey = new GameAction(&quot;Move yout robot Left/West&quot;);&#xD;&#xA;    		this.moveRightKey = new GameAction(&quot;Move yout robot Right/East&quot;);&#xD;&#xA;    		// key mouse assigment&#xD;&#xA;    		inputManager.mapToMouse(leftMouseClick, InputManager.MOUSE_BUTTON_1);&#xD;&#xA;    		inputManager.mapToMouse(rightMouseClick, InputManager.MOUSE_BUTTON_3);&#xD;&#xA;    		// keybard assignment&#xD;&#xA;    		inputManager.mapToKey(scrollMapDownKey, KeyEvent.VK_DOWN);&#xD;&#xA;    		inputManager.mapToKey(scrollMapUpKey, KeyEvent.VK_UP);&#xD;&#xA;    		inputManager.mapToKey(scrollMapLeftKey, KeyEvent.VK_LEFT);&#xD;&#xA;    		inputManager.mapToKey(scrollMapRightKey, KeyEvent.VK_RIGHT);&#xD;&#xA;    &#xD;&#xA;    		inputManager.mapToKey(moveForwardKey, KeyEvent.VK_W);&#xD;&#xA;    		inputManager.mapToKey(moveBackwardKey, KeyEvent.VK_S);&#xD;&#xA;    		inputManager.mapToKey(moveLeftKey, KeyEvent.VK_A);&#xD;&#xA;    		inputManager.mapToKey(moveRightKey, KeyEvent.VK_D);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	public void setUnit(IUnit robot)&#xD;&#xA;    	{&#xD;&#xA;    		setTitle(getTitle() + &quot; for playerName=&quot; + robot.getPlayer().getPlayerId());&#xD;&#xA;    		this.unit = robot;&#xD;&#xA;    		//center view on the player's robot&#xD;&#xA;    		System.out.println(&quot;screenWidth=&quot; + screenWidth + &quot;;;screenHeight=&quot; + screenHeight);&#xD;&#xA;    		int initialOffsetX = (int) ((robot.getCenterPoint().getX() - getFrameWidth() / 2));&#xD;&#xA;    		int initialOffsetY = (int) ((robot.getCenterPoint().getY() - getFrameHeight() / 2));&#xD;&#xA;    		game = client.getGame();&#xD;&#xA;    		game.getGameLevel().getMap().setMapOffsetX(-initialOffsetX);&#xD;&#xA;    		game.getGameLevel().getMap().setMapOffsetY(-initialOffsetY);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	@Override&#xD;&#xA;    	public void update(long elapsedTime)&#xD;&#xA;    	{&#xD;&#xA;    		System.out.println(&quot;NetworkingTest2	public void update(long elapsedTime)&quot;);&#xD;&#xA;    		checkInput(elapsedTime);&#xD;&#xA;    		if(game != null)&#xD;&#xA;    		{&#xD;&#xA;    			GameLevel gameLevel = game.getGameLevel();&#xD;&#xA;    			if(gameLevel != null)&#xD;&#xA;    			{&#xD;&#xA;    				List&lt;IShot&gt; shotList = gameLevel.getShotList();&#xD;&#xA;    				//update all animated projectiles -- thus user sees their animation&#xD;&#xA;    				for(int i = 0; i &lt; shotList.size(); i++)&#xD;&#xA;    					if(shotList.get(i).getProjectile() instanceof IAnimatedProjectile)&#xD;&#xA;    					{&#xD;&#xA;    						IAnimatedProjectile ap = (IAnimatedProjectile) shotList.get(i).getProjectile();&#xD;&#xA;    						ap.update(elapsedTime);&#xD;&#xA;    					}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    	// for debug purpose&#xD;&#xA;    	private String _clickedObjectName = &quot;None&quot;;&#xD;&#xA;    	private String _clickedObjectToughness = &quot;None&quot;;&#xD;&#xA;    	private long drawCounter = 0;&#xD;&#xA;    &#xD;&#xA;    	@Override&#xD;&#xA;    	public void draw(Graphics2D g2)&#xD;&#xA;    	{&#xD;&#xA;    		g2.setColor(Color.BLACK);&#xD;&#xA;    		g2.fillRect(0, 0, this.getWidth(), this.getHeight());&#xD;&#xA;    &#xD;&#xA;    		if(game != null)&#xD;&#xA;    		{&#xD;&#xA;    			GameLevel gameLevel = game.getGameLevel();&#xD;&#xA;    			if(gameLevel != null)&#xD;&#xA;    			{&#xD;&#xA;    				WorldMap map = gameLevel.getMap();&#xD;&#xA;    				//center view on the unit -- this way arrow key are not working as map offset is set again here&#xD;&#xA;    				int initialOffsetX = (int) ((unit.getCenterPoint().getX() - getFrameWidth() / 2));&#xD;&#xA;    				int initialOffsetY = (int) ((unit.getCenterPoint().getY() - getFrameHeight() / 2));&#xD;&#xA;    				map.setMapOffsetX(-initialOffsetX);&#xD;&#xA;    				map.setMapOffsetY(-initialOffsetY);&#xD;&#xA;    				gameLevel.draw(g2);//, offsetX, offsetY);//(g2, map.getMapOffsetX(), map.getMapOffsetY());&#xD;&#xA;    				g2.setColor(Color.YELLOW);&#xD;&#xA;    				g2.drawString(&quot;MapOffset X: &quot; + map.getMapOffsetX(), 10, 100);&#xD;&#xA;    				g2.drawString(&quot;MapOffset Y: &quot; + map.getMapOffsetY(), 10, 120);&#xD;&#xA;    &#xD;&#xA;    				g2.drawString(&quot;Mouse X: &quot; + inputManager.getMouseX(), 10, 160);&#xD;&#xA;    				g2.drawString(&quot;Mouse Y: &quot; + inputManager.getMouseY(), 10, 180);&#xD;&#xA;    &#xD;&#xA;    				g2.drawString(&quot;Mouse on Map X: &quot; + (inputManager.getMouseX() + map.getMapOffsetX()), 10, 220);&#xD;&#xA;    				g2.drawString(&quot;Mouse on Map Y:&quot; + (inputManager.getMouseY() + map.getMapOffsetY()), 10, 240);&#xD;&#xA;    			}&#xD;&#xA;    			//unit display update&#xD;&#xA;    			g2.setColor(Color.RED);&#xD;&#xA;    			IShootingClipWeapon head = (IShootingClipWeapon) unit.getEquipmentAtLocation(Robot.EQUIPMENT_ON_HEAD);&#xD;&#xA;    			g2.drawString(&quot;Ammo on head: &quot;&#xD;&#xA;    					+ head.getClip().getCurrentAmmoAmount() + &quot;/&quot; + head.getClip().getMaximumAmmoCapacity(), 10, 450);&#xD;&#xA;    			g2.drawString(&quot;Money: &quot; + unit.getPlayer().getMoney(), 10, 480);&#xD;&#xA;    			g2.drawString(&quot;Hp: &quot; + unit.getHpCurrent() + &quot;/&quot; + unit.getHpMax(), 10, 510);&#xD;&#xA;    			g2.drawString(&quot;Speed: &quot; + unit.getSpeed(), 10, 540);&#xD;&#xA;    		}&#xD;&#xA;    		g2.setColor(Color.YELLOW);&#xD;&#xA;    		g2.drawString(&quot;ClickedObjectName: &quot; + _clickedObjectName, 10, 260);&#xD;&#xA;    		g2.drawString(&quot;ClickedObjectToughness: &quot; + _clickedObjectToughness, 10, 290);&#xD;&#xA;    		g2.drawString(&quot;drawCounter= &quot; + (drawCounter++), 10, 320);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	@Override&#xD;&#xA;    	public void clean()&#xD;&#xA;    	{&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	private void checkInput(long elapsedTime)&#xD;&#xA;    	{&#xD;&#xA;    		int step = Math.round(_scrollSpeed * elapsedTime);&#xD;&#xA;    		if(game != null)&#xD;&#xA;    		{&#xD;&#xA;    			GameLevel gameLevel = game.getGameLevel();&#xD;&#xA;    			if(gameLevel != null)&#xD;&#xA;    			{&#xD;&#xA;    				WorldMap map = gameLevel.getMap();&#xD;&#xA;    &#xD;&#xA;    				if(scrollMapRightKey.isPressed())&#xD;&#xA;    				{&#xD;&#xA;    					map.scroll(WorldMapDirection.EAST, step);&#xD;&#xA;    					System.out.println(&quot;Pressed:&quot; + scrollMapRightKey.getName());&#xD;&#xA;    				}&#xD;&#xA;    				if(scrollMapLeftKey.isPressed())&#xD;&#xA;    				{&#xD;&#xA;    					map.scroll(WorldMapDirection.WEST, step);&#xD;&#xA;    					System.out.println(&quot;Pressed:&quot; + scrollMapLeftKey.getName());&#xD;&#xA;    				}&#xD;&#xA;    				if(scrollMapUpKey.isPressed())&#xD;&#xA;    				{&#xD;&#xA;    					map.scroll(WorldMapDirection.NORTH, step);&#xD;&#xA;    					System.out.println(&quot;Pressed:&quot; + scrollMapRightKey.getName());&#xD;&#xA;    				}&#xD;&#xA;    				if(scrollMapDownKey.isPressed())&#xD;&#xA;    				{&#xD;&#xA;    					map.scroll(WorldMapDirection.SOUTH, step);&#xD;&#xA;    					System.out.println(&quot;Pressed:&quot; + scrollMapLeftKey.getName());&#xD;&#xA;    				}&#xD;&#xA;    				if(client.isInGame() &amp;&amp; unit != null)&#xD;&#xA;    				{&#xD;&#xA;    					Point2D mousePoint = new Point2D.Double(&#xD;&#xA;    							inputManager.getMouseX() - map.getMapOffsetX(),&#xD;&#xA;    							inputManager.getMouseY() - map.getMapOffsetY());&#xD;&#xA;    					double angleBetweenDirectionAndAxisX =&#xD;&#xA;    							GeometricOperations.calculateAngleOfRotation(&#xD;&#xA;    							unit.getCenterPoint(), mousePoint, 0.0);&#xD;&#xA;    					if(unit.isAlive() &amp;&amp; Math.abs(unit.getFaceAngle() - angleBetweenDirectionAndAxisX) &gt;= 5.0)&#xD;&#xA;    						client.createAndEnqueueTurnActionEvent(unit, mousePoint);&#xD;&#xA;    					boolean isMoving = false;&#xD;&#xA;    					double modX = 0;&#xD;&#xA;    					double modY = 0;&#xD;&#xA;    					boolean isForwardMove = false;&#xD;&#xA;    					boolean isBackwardMove = false;&#xD;&#xA;    					boolean isLeftMove = false;&#xD;&#xA;    					boolean isRightMove = false;&#xD;&#xA;    					if(moveLeftKey.isPressed())&#xD;&#xA;    					{&#xD;&#xA;    						isLeftMove = true;&#xD;&#xA;    						isMoving = true;&#xD;&#xA;    						modX = modX - 100 - unit.getSpeed();&#xD;&#xA;    					}&#xD;&#xA;    					if(moveRightKey.isPressed())&#xD;&#xA;    					{&#xD;&#xA;    						isRightMove = true;&#xD;&#xA;    						isMoving = true;&#xD;&#xA;    						modX = modX + 100 + unit.getSpeed();&#xD;&#xA;    					}&#xD;&#xA;    					if(moveForwardKey.isPressed())&#xD;&#xA;    					{&#xD;&#xA;    						isForwardMove = true;&#xD;&#xA;    						isMoving = true;&#xD;&#xA;    						modY = modY - 100 - unit.getSpeed();&#xD;&#xA;    					}&#xD;&#xA;    					if(moveBackwardKey.isPressed())&#xD;&#xA;    					{&#xD;&#xA;    						isBackwardMove = true;&#xD;&#xA;    						isMoving = true;&#xD;&#xA;    						modY = modY + 100 + unit.getSpeed();&#xD;&#xA;    					}&#xD;&#xA;    &#xD;&#xA;    					if(isMoving &amp;&amp; unit.isAlive())&#xD;&#xA;    					{&#xD;&#xA;    						if(unit.isMoving() == false || unit.isMoveFlagsStateChanged(&#xD;&#xA;    								isForwardMove, isBackwardMove, isLeftMove, isRightMove))&#xD;&#xA;    						{&#xD;&#xA;    							unit.startMoving();&#xD;&#xA;    							unit.setMoveFlags(isForwardMove, isBackwardMove, isLeftMove, isRightMove);&#xD;&#xA;    							client.createAndEnqueueMoveMessageEvent(unit,&#xD;&#xA;    									isForwardMove, isBackwardMove, isLeftMove, isRightMove);&#xD;&#xA;    						}&#xD;&#xA;    					}//start and stop move/shoot are controlled by server&#xD;&#xA;    					else if(unit.isMoving())&#xD;&#xA;    					{&#xD;&#xA;    						unit.stopMoving();&#xD;&#xA;    						client.createAndEnqueueMoveStopEvent(unit);&#xD;&#xA;    					}&#xD;&#xA;    &#xD;&#xA;    					if(leftMouseClick.isPressed())&#xD;&#xA;    					{&#xD;&#xA;    						if(unit.isFiring() == false &amp;&amp; unit.isAlive())&#xD;&#xA;    						{&#xD;&#xA;    							Iterator&lt;String&gt; it = unit.getEquipmentLocationMap().keySet().iterator();&#xD;&#xA;    							while(it.hasNext())&#xD;&#xA;    							{&#xD;&#xA;    								String key = it.next();&#xD;&#xA;    								IEquipment eq = unit.getEquipmentAtLocation(key);&#xD;&#xA;    								if(eq instanceof IClipWeapon)&#xD;&#xA;    								{&#xD;&#xA;    									IClipWeapon cw = ((IClipWeapon) eq);&#xD;&#xA;    									if(cw.isEnoughAmmoToAttack() == true)&#xD;&#xA;    										((IWeaponMR) cw.getMapRepresentation()).attack();&#xD;&#xA;    								}&#xD;&#xA;    							}&#xD;&#xA;    							&#xD;&#xA;    							unit.startFiring();&#xD;&#xA;    							client.createAndEnqueueFireActionEvent(unit, IUnit.EQUIPMENT_ON_ALL_SLOTS);&#xD;&#xA;    						}&#xD;&#xA;    					}&#xD;&#xA;    					else if(unit.isFiring())&#xD;&#xA;    					{&#xD;&#xA;    						System.out.println(&quot;stop firing&quot;);&#xD;&#xA;    						unit.stopFiring();&#xD;&#xA;    						client.createAndEnqueueFireStopEvent(unit);&#xD;&#xA;    					}&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	public static void main(String[] args)&#xD;&#xA;    	{&#xD;&#xA;    		BasicConfigurator.configure();&#xD;&#xA;    		NetworkingTest2 nft = new NetworkingTest2(&quot;Alegroth2&quot;, &quot;ElBoro&quot;);&#xD;&#xA;    		nft.setCoreFrameSize(600, 600);&#xD;&#xA;    		nft.run();&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26806" PostHistoryTypeId="2" PostId="12263" RevisionGUID="69934d0c-ce11-4012-930e-a21067079c9c" CreationDate="2011-05-13T09:53:11.230" UserId="7299" Text="[the bottom feeder](http://jeff-vogel.blogspot.com/) by jeff vogel. it's less about programming and more about game design and indie game developement in general. his company [spiderweb software](http://www.spiderwebsoftware.com/) published several very impressive old school rpgs (turn based combat, lots of text, uh, story).&#xD;&#xA;&#xD;&#xA;some recent examples:&#xD;&#xA;&#xD;&#xA;* [Three Rules For Difficulty In RPGs](http://jeff-vogel.blogspot.com/2011/02/three-rules-for-difficulty-in-rpgs.html)&#xD;&#xA;* [Three Reasons Creators Should Never Read Their Forums](http://jeff-vogel.blogspot.com/2011/01/three-reasons-creators-should-never.html)&#xD;&#xA;* [Should Games Sell For Donations? Or, Is Setting a Fixed Price For Losers?](http://jeff-vogel.blogspot.com/2010/10/should-games-sell-for-donations-or-is.html)" />
  <row Id="26807" PostHistoryTypeId="16" PostId="12263" RevisionGUID="5e439e1a-ddb2-4c3a-8ffb-2d45f6efea43" CreationDate="2011-05-13T09:53:11.230" UserId="7299" />
  <row Id="26808" PostHistoryTypeId="2" PostId="12264" RevisionGUID="b324ba37-0d85-45fc-863c-65e3663b975c" CreationDate="2011-05-13T09:55:17.230" UserId="20" Text="Using matrices for transformation isn't exclusive to using `x`, `y` and `rotation` properties. These actually all map to the same thing.&#xD;&#xA;If you update `x`, `y` or `rotation`, the matrix will also change.&#xD;&#xA;&#xD;&#xA;So you can freely mix these things. You can store the initial position matrix somewhere, to easily restore it later on, but you can also still do things like `ball.x += 5`&#xD;&#xA;&#xD;&#xA;There's no negative impact in using the matrix for transforms. I guess it's probably even faster, since you set all transformations at once instead of setting each property individually. " />
  <row Id="26809" PostHistoryTypeId="2" PostId="12265" RevisionGUID="0ebb0b89-19b3-4ad9-8258-b30866a75470" CreationDate="2011-05-13T10:24:41.693" UserId="7300" Text="I will add a vote for mochi and kongregate. They both have very simple to integrate highscore lists, and are both free." />
  <row Id="26810" PostHistoryTypeId="2" PostId="12266" RevisionGUID="3bc35de1-1096-40fd-a876-0490a15486c3" CreationDate="2011-05-13T11:05:20.193" UserId="7301" Text="I would recommend starting with some basic linear algebra, if you haven't done so already, — it is essential for any kind of serious graphics programming. For that, I would recommend [Paul Bourke's site](http://paulbourke.net/geometry). It is also really inspiring.&#xD;&#xA;&#xD;&#xA;As dm.skt correctly noted, you don't want to read a book that is not written with modern OpenGL in mind from the beginning — most of them would focus on fixed-function pipeline, which is not just no longer used, it is *emulated*. Here, I can recommend a great (and free) online book [Learning Modern 3D Graphics Programming](http://www.arcsynthesis.org/gltut/) by *Jason L. McKesson*. From the intro:&#xD;&#xA;&#xD;&#xA;&gt; Virtually all of the aforementioned&#xD;&#xA;&gt; sources instruct beginners using&#xD;&#xA;&gt; something called “fixed&#xD;&#xA;&gt; functionality.” This represents&#xD;&#xA;&gt; configurations in older graphics&#xD;&#xA;&gt; processors that define how a&#xD;&#xA;&gt; particular rendering operation will&#xD;&#xA;&gt; proceed. It is generally considered&#xD;&#xA;&gt; easiest to teach neophyte graphics&#xD;&#xA;&gt; programmers using the fixed function&#xD;&#xA;&gt; pipeline.&#xD;&#xA;&gt; &#xD;&#xA;&gt; This is considered true because it is&#xD;&#xA;&gt; easy to get something to happen with&#xD;&#xA;&gt; fixed functionality. It's simpler to&#xD;&#xA;&gt; make pictures that look like something&#xD;&#xA;&gt; real. The fixed function pipeline is&#xD;&#xA;&gt; like training wheels for a bicycle.&#xD;&#xA;&gt; &#xD;&#xA;&gt; There are downsides to this approach.&#xD;&#xA;&gt; First, much of what is learned with&#xD;&#xA;&gt; this approach must be inevitably&#xD;&#xA;&gt; abandoned when the user encounters a&#xD;&#xA;&gt; graphics problem that must be solved&#xD;&#xA;&gt; with programmability. Programmability&#xD;&#xA;&gt; wipes out almost all of the fixed&#xD;&#xA;&gt; function pipeline, so the knowledge&#xD;&#xA;&gt; does not easily transfer.&#xD;&#xA;&gt; &#xD;&#xA;&gt; A more insidious problem is that the&#xD;&#xA;&gt; fixed function pipeline can give the&#xD;&#xA;&gt; illusion of knowledge. A user can&#xD;&#xA;&gt; think they understand what they are&#xD;&#xA;&gt; doing, but they're really just&#xD;&#xA;&gt; copy-and-pasting code around.&#xD;&#xA;&gt; Programming thus becomes akin to&#xD;&#xA;&gt; magical rituals: you put certain bits&#xD;&#xA;&gt; of code before other bits, and&#xD;&#xA;&gt; everything seems to work.&#xD;&#xA;&#xD;&#xA;This should give you a good starting point." />
  <row Id="26811" PostHistoryTypeId="16" PostId="12266" RevisionGUID="52423040-b2b4-4be9-9bfe-82af7272ff63" CreationDate="2011-05-13T11:05:20.193" UserId="7301" />
  <row Id="26812" PostHistoryTypeId="2" PostId="12267" RevisionGUID="4f692cf9-a07a-48f3-ab99-1b3c0818b002" CreationDate="2011-05-13T12:08:51.700" UserId="6655" Text="Look out for Nintendo DS titles. They tend to use the stylus for game mechanics similar to yours.&#xD;&#xA;&#xD;&#xA;There are rhythm games like &lt;a href=&quot;http://en.wikipedia.org/wiki/Elite_Beat_Agents&quot;&gt;Elite Beat Agents&lt;/a&gt; employing something similar to your attack/defend game mechanics but based on music. Elite Beat Agents is actually quite challenging but fun to play.&#xD;&#xA;&#xD;&#xA;I'd also recommend playing &lt;a href=&quot;http://en.wikipedia.org/wiki/The_World_Ends_with_You&quot;&gt;The World Ends with You&lt;/a&gt;! It's an action RPG with very similar combat mechanics. It's also quite innovative and unique.&#xD;&#xA;&#xD;&#xA;Regarding crippling the player (controls) I'd always advise not to. I haven't seen a single game where not-being-in-control due to darkness, staggering, impairing effects, etc. was adding fun. Realism != Fun != Immersion." />
  <row Id="26813" PostHistoryTypeId="25" PostId="12261" RevisionGUID="c28d0f1e-2b41-4314-a482-c5897ef9422d" CreationDate="2011-05-13T12:11:54.260" Comment="http://twitter.com/#!/StackGameDev/status/69011984858877952" />
  <row Id="26814" PostHistoryTypeId="2" PostId="12268" RevisionGUID="d90a8706-ca84-4c75-b6df-de0bd39dd30d" CreationDate="2011-05-13T12:12:42.540" UserId="2231" Text="I'm writing a shooter (like 1942, classic 2D graphics) and I'd like to use a component based approch. So far I thought about the following design:&#xD;&#xA;&#xD;&#xA;1) Each game element (airship, projectile, powerup, enemy) is an Entity&#xD;&#xA;&#xD;&#xA;2) Each Entity is a set of components which can added or removed at run-time. Examples are Position, Sprite, Health, IA, Damage, BoundingBox etc.&#xD;&#xA;&#xD;&#xA;The idea is that Airship, Projectile, Enemy, Powerup are NOT game classes. An entity is only defined by the components it owns (and that can change during time).&#xD;&#xA;So the player Airship starts with  Sprite, Position, Health and Input components.&#xD;&#xA;A powerup has the Sprite, Position, BoundingBox.&#xD;&#xA;And so on.&#xD;&#xA;&#xD;&#xA;The main loop manages the game &quot;physics&quot;, i.e. how the components interact each other:&#xD;&#xA;&#xD;&#xA;    foreach(entity (let it be entity1) with a Damage component)&#xD;&#xA;    	foreach(entity (let it be entity2) with a Health component)&#xD;&#xA;    	if(the entity1.BoundingBox collides with entity2.BoundingBox)&#xD;&#xA;    	{&#xD;&#xA;    		entity2.Health.decrease(entity1.Damage.amount());&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    foreach(entity with a IA component)&#xD;&#xA;    	entity.IA.update(); &#xD;&#xA;    &#xD;&#xA;    foreach(entity with a Sprite component)&#xD;&#xA;    	draw(entity.Sprite.surface()); &#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Components are hardcoded in the main C++ application. Entities can be defined in an XML file (the IA part in a lua or python file).&#xD;&#xA;&#xD;&#xA;The main loop doesn't care a lot about entities: it only manages components. The software design should allow to:&#xD;&#xA;&#xD;&#xA;1) Given a component, get the entity it belongs to&#xD;&#xA;2) Given an entity, get the component of type &quot;type&quot;&#xD;&#xA;3) For all entities, do something&#xD;&#xA;4) For all entity's component, do something (e.g: serialize)&#xD;&#xA;&#xD;&#xA;I was thinking about the following:&#xD;&#xA;&#xD;&#xA;    class Entity;&#xD;&#xA;    class Component { Entity* entity; ... virtual void serialize(filestream, op) = 0; ...}&#xD;&#xA;    class Sprite : public Component {...};&#xD;&#xA;    class Position : public Component {...};&#xD;&#xA;    class IA : public Component {... virtual void update() = 0; };&#xD;&#xA;    &#xD;&#xA;    // I don't remember exactly the boost::fusion map syntax right now, sorry.&#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;       int id; // entity id&#xD;&#xA;       boost::fusion::map&lt; pair&lt;Sprite, Sprite*&gt;, pair&lt;Position, Position*&gt; &gt; components;&#xD;&#xA;       template &lt;class C&gt; bool has_component() { return components.at&lt;C&gt;() != 0; }&#xD;&#xA;       template &lt;class C&gt; C* get_component() { return components.at&lt;C&gt;(); }&#xD;&#xA;       template &lt;class C&gt; void add_component(C* c) { components.at&lt;C&gt;() = c; }&#xD;&#xA;       template &lt;class C&gt; void remove_component(C* c) { components.at&lt;C&gt;() = 0; }&#xD;&#xA;       void serialize(filestream, op) { /* Serialize all componets*/ }&#xD;&#xA;    ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    std::list&lt;Entity*&gt; entity_list;&#xD;&#xA;&#xD;&#xA;With this design I can get #1, #2, #3 (thanks to boost::fusion::map algorithms) and #4. Also everything is O(1) (ok, not exactly, but it's still very fast).&#xD;&#xA;&#xD;&#xA;There is also a more &quot;common&quot; approch:&#xD;&#xA;&#xD;&#xA;    class Entity;&#xD;&#xA;    class Component { Entity* entity; ... virtual void serialize(filestream, op) = 0; ...}&#xD;&#xA;    class Sprite : public Component { static const int type_id = 0; };&#xD;&#xA;    class Position : public Component { static const int type_id = 1; };&#xD;&#xA;    &#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;       int id; // entity id&#xD;&#xA;       std::vector&lt;Component*&gt; components;&#xD;&#xA;       bool has_component() { return components[i] != 0; }&#xD;&#xA;       template &lt;class C&gt; C* get_component() { return dynamic_cast&lt;C&gt; components[C::id](); } // It's actually quite safe&#xD;&#xA;    ...&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Another approch is to get rid of the Entity class: each Component type lives in its own list. So there is a Sprite list, a Health list, a Damage list etc. I know they belong to the same logic entity because of the entity id. This is simpler, but slower: the IA components needs access basically to all other entity's components and that would require searching each other component's list at each step.&#xD;&#xA;&#xD;&#xA;Which approch do you think is better? &#xD;&#xA;is boost::fusion map suited to be used in that way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26815" PostHistoryTypeId="1" PostId="12268" RevisionGUID="d90a8706-ca84-4c75-b6df-de0bd39dd30d" CreationDate="2011-05-13T12:12:42.540" UserId="2231" Text="Designing a component based game" />
  <row Id="26816" PostHistoryTypeId="3" PostId="12268" RevisionGUID="d90a8706-ca84-4c75-b6df-de0bd39dd30d" CreationDate="2011-05-13T12:12:42.540" UserId="2231" Text="&lt;c++&gt;&lt;design-patterns&gt;" />
  <row Id="26817" PostHistoryTypeId="2" PostId="12269" RevisionGUID="14f111fa-769e-4571-9191-f553e1235ee4" CreationDate="2011-05-13T12:23:23.057" UserId="6272" Text="I have a two objects colliding with each other. I am testing for the collision with `if(ob1.hitTestObject(ob2)){//do something }`. Is there a way to determine which side of the object was hit, i.e. if ob2 is a square, which side of the square was collided with?" />
  <row Id="26818" PostHistoryTypeId="1" PostId="12269" RevisionGUID="14f111fa-769e-4571-9191-f553e1235ee4" CreationDate="2011-05-13T12:23:23.057" UserId="6272" Text="Actionscript 3: Which side of object is hit?" />
  <row Id="26819" PostHistoryTypeId="3" PostId="12269" RevisionGUID="14f111fa-769e-4571-9191-f553e1235ee4" CreationDate="2011-05-13T12:23:23.057" UserId="6272" Text="&lt;programming&gt;&lt;collision-detection&gt;&lt;actionscript-3&gt;" />
  <row Id="26820" PostHistoryTypeId="2" PostId="12270" RevisionGUID="357f8bb8-ecd9-4e68-ad4e-911a5ed2e171" CreationDate="2011-05-13T12:37:54.527" UserId="7308" Text="Successful indie dev Introversion has made many in-depth posts about the development of their newest game, and some other posts about game development in general.  Definitely worth checking out, especially if you're interested in procedural generation.&#xD;&#xA;&#xD;&#xA;http://www.introversion.co.uk/blog" />
  <row Id="26821" PostHistoryTypeId="16" PostId="12270" RevisionGUID="03a869eb-2a8e-441a-95e2-96e6f4dedb19" CreationDate="2011-05-13T12:37:54.527" UserId="7308" />
  <row Id="26822" PostHistoryTypeId="2" PostId="12271" RevisionGUID="53f51b8a-cfe7-4e6f-b89b-8619b1fe40e0" CreationDate="2011-05-13T12:38:26.423" UserId="6788" Text="I've started writing an [Android Game Development Blog][1], I'm a full-time game developer who has decided to create a game for Android in my spare time. I'll be making weekly posts in about all the new things I learn as I develop my first-ever Android game.&#xD;&#xA;&#xD;&#xA;These are some the topics I hope to cover over the next year or so:&#xD;&#xA;&#xD;&#xA; - Touchscreen Input, the Audio API, Android events&#xD;&#xA; - Performance, loading speed, memory management&#xD;&#xA; - Resolution/Aspect ratio, and SDK versions/fragmentation&#xD;&#xA; - Finding free art/audio, or hiring artists for assets I can't find for free&#xD;&#xA; - Translation and other types of dynamic resources&#xD;&#xA; - In-game Advertising, marketing my game, and releasing on the market&#xD;&#xA; - And if I get that far, sales figures and stats&#xD;&#xA;&#xD;&#xA;  [1]: http://www.brokenteapotstudios.com/android-game-development-blog/" />
  <row Id="26823" PostHistoryTypeId="16" PostId="12271" RevisionGUID="613da631-9bc0-4a2b-8b3a-338f3ad6b65a" CreationDate="2011-05-13T12:38:26.423" UserId="6788" />
  <row Id="26824" PostHistoryTypeId="2" PostId="12272" RevisionGUID="91c79a35-e228-433b-ba56-40607b12c70e" CreationDate="2011-05-13T13:15:48.113" UserId="20" Text="Tetris-Tiles are stored as a 4x4 boolean matrix. Each rotation step has it's own matrix, the representation of the **T**-Block would look like this:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;        0, 0, 0, 0,&#xD;&#xA;        0, 1, 1, 1,&#xD;&#xA;        0, 0, 1, 0,&#xD;&#xA;        0, 0, 0, 0&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;        0, 0, 1, 0,&#xD;&#xA;        0, 0, 1, 1,&#xD;&#xA;        0, 0, 1, 0,&#xD;&#xA;        0, 0, 0, 0&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;        0, 0, 1, 0,&#xD;&#xA;        0, 1, 1, 1,&#xD;&#xA;        0, 0, 0, 0,&#xD;&#xA;        0, 0, 0, 0&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;        0, 0, 1, 0,&#xD;&#xA;        0, 1, 1, 0,&#xD;&#xA;        0, 0, 1, 0,&#xD;&#xA;        0, 0, 0, 0&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;I'm trying to find a way to calculate the position of the block when it's being rotated and collides with the board (the board is also a matrix). The original Tetris would simply not allow rotation of a block when the rotation would result in a collision. Modern variants of the game will resolve the collision and move the block to a valid position.&#xD;&#xA;&#xD;&#xA;Here are some situations that should be solved. The board is 6x6, **red** = active block, **grey** = placed/occupied blocks. Each time, a counter-clockwise rotation should be performed. The green overlay indicates the matrix for the block. The arrow indicates the resulting correction to resolve the rotation:&#xD;&#xA;&#xD;&#xA;![tetris block rotation][1]&#xD;&#xA;&#xD;&#xA; 1. Block is at the left side of the board. Since the block cannot leave the board, it should be moved back inside after a rotation.&#xD;&#xA; 2. Block hits &quot;ground&quot;, but isn't placed/committed yet. In this case, the tile must be moved up to resolve the collision (in case of a &quot;I&quot;-Block, the movement would be 2 cells up).&#xD;&#xA; 3. Tile would hit occupied blocks, must be moved left to resolve collision.&#xD;&#xA; 4. Tile cannot be rotated.&#xD;&#xA;&#xD;&#xA;What would be the best approach to tackle this problem? Optimally, the solution should be generic, eg. work with arbitrary 4x4 matrix blocks on an arbitrarily sized and populated board.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/cjz1w.png" />
  <row Id="26825" PostHistoryTypeId="1" PostId="12272" RevisionGUID="91c79a35-e228-433b-ba56-40607b12c70e" CreationDate="2011-05-13T13:15:48.113" UserId="20" Text="Determine position of a rotated element in Tetris" />
  <row Id="26826" PostHistoryTypeId="3" PostId="12272" RevisionGUID="91c79a35-e228-433b-ba56-40607b12c70e" CreationDate="2011-05-13T13:15:48.113" UserId="20" Text="&lt;programming&gt;&lt;algorithm&gt;&lt;puzzle&gt;" />
  <row Id="26827" PostHistoryTypeId="2" PostId="12273" RevisionGUID="d5c1ddd9-65cb-4bac-8674-c4b71cce5a0d" CreationDate="2011-05-13T13:34:47.390" UserId="20" Text="The hitTest method provided by flash won't give you such an information.&#xD;&#xA;&#xD;&#xA;If you have two squares, you can simply calculate the vector between their center-points and use that to determine the side. For arbitrarily shaped objects, this won't work though.&#xD;&#xA;&#xD;&#xA;Another option is to have &quot;sensor&quot; points on your object, eg. *top*, *left*, *right*, *bottom*, and do a hit-test for each of these points against the other shape." />
  <row Id="26828" PostHistoryTypeId="2" PostId="12274" RevisionGUID="fbeb0136-7390-48e5-9e23-bd5aac7ab8e8" CreationDate="2011-05-13T14:08:01.830" UserId="7319" Text="**[Hungry Gamer][1]**&#xD;&#xA;&#xD;&#xA;There are so many amazing blogs out there already, I felt I needed a place to keep track of the best of the best. Hungry Gamer is blog I do where I link to lots of incredible articles on games and game design with quotes and commentary. I also recently started a [video podcast][2] about my own struggles and successes with game design where I document a two-week sprint of work, then go back and see what worked and what didn't. It's 100% for developers, both new and experienced, so I hope you guys will check it out!&#xD;&#xA;&#xD;&#xA;I'll also be checking out all of these amazing blogs. Thanks for asking this question! Lots of amazing information here.&#xD;&#xA;&#xD;&#xA;  [1]: http://hungrygamer.net/&#xD;&#xA;  [2]: http://hungrygamer.net/gdip" />
  <row Id="26829" PostHistoryTypeId="16" PostId="12274" RevisionGUID="f79981f8-c4e0-467b-98a7-38f401e5fae3" CreationDate="2011-05-13T14:08:01.830" UserId="7319" />
  <row Id="26830" PostHistoryTypeId="2" PostId="12275" RevisionGUID="0c971a47-e3c2-4328-bda7-468bd8aecf07" CreationDate="2011-05-13T14:28:46.510" UserId="7320" Text="[Flax Game Development][1] &#xD;&#xA;&#xD;&#xA;[Flax.ie][2] is a game development blog, brimming with a passion for programming and technology in general, by two Irish Game Development students, Ciarán McCann and Carl Lange. The blogs current main focus is on the development dairies of the Flax HTML5 Game Engine which we are currently developing.Topics range from web-based technology like GWT and HTML5 (+CSS+Javascript) to C++, OpenGL, Java, PHP and Game development for Windows Phone 7. &#xD;&#xA;&#xD;&#xA;  [1]: http://flax.ie/&#xD;&#xA;  [2]: http://flax.ie/" />
  <row Id="26831" PostHistoryTypeId="16" PostId="12275" RevisionGUID="db3c9ab8-301d-49f8-a754-52caaec447c2" CreationDate="2011-05-13T14:28:46.510" UserId="7320" />
  <row Id="26832" PostHistoryTypeId="2" PostId="12276" RevisionGUID="61334ac1-98ba-4345-89be-bdaf54e73cab" CreationDate="2011-05-13T14:29:37.570" UserId="2229" Text="I have quite **large 2D game scene**. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene.&#xD;&#xA;&#xD;&#xA;**What is the correct way of moving viewport over the scene, in Orthogonal (2D) projection, please?**&#xD;&#xA;&#xD;&#xA;*There are two solutions coming to my mind:*&#xD;&#xA;&#xD;&#xA; 1. Using **GluLookAt()**, which is designed to move camera moslty in Perspective Projection, but coudl work well for 2D as well. However, not all of the GluLookAt() parameters would be utilized in Ortho configuration.&#xD;&#xA; 2. Using **opposite View Translate transformation**. This would mean, if I need to move my 2D camera 10 units to right(positive x axis), I would apply opposite Translate transformation to every scene vertex (negative x axis). This way, I woudl create illusion, the camera moves to the right.&#xD;&#xA;&#xD;&#xA;These are the solutions coming from my mind. However, because, i am self taught, is there any **correct and recommended way of moving camera over the 2D scene**, please?" />
  <row Id="26833" PostHistoryTypeId="1" PostId="12276" RevisionGUID="61334ac1-98ba-4345-89be-bdaf54e73cab" CreationDate="2011-05-13T14:29:37.570" UserId="2229" Text="OpenGL ES 2.0: Moving Camera in Orthogonal (2D) Projection" />
  <row Id="26834" PostHistoryTypeId="3" PostId="12276" RevisionGUID="61334ac1-98ba-4345-89be-bdaf54e73cab" CreationDate="2011-05-13T14:29:37.570" UserId="2229" Text="&lt;game-design&gt;&lt;opengl&gt;&lt;opengl-es&gt;" />
  <row Id="26835" PostHistoryTypeId="5" PostId="12276" RevisionGUID="2535e607-4e34-4e74-ad6b-b38366562130" CreationDate="2011-05-13T14:36:12.137" UserId="2229" Comment="added 4 characters in body" Text="I have quite **large 2D game scene**. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene.&#xD;&#xA;&#xD;&#xA;**What is the correct way of moving viewport over the scene, in Orthogonal (2D) projection, please?**&#xD;&#xA;&#xD;&#xA;*There are two solutions coming to my mind:*&#xD;&#xA;&#xD;&#xA; 1. Using **GluLookAt()**, which is designed to move camera moslty in Perspective Projection, but coudl work well for 2D as well. However, not all of the GluLookAt() parameters would be utilized in Ortho configuration.&#xD;&#xA; 2. Using **opposite View Translate transformation**. This would mean, if I need to move my 2D camera 10 units to the right(positive x axis), I would apply opposite Translate transformation to every scene vertex (negative x axis). This way, I would create illusion, the camera moves to the right.&#xD;&#xA;&#xD;&#xA;These are the solutions coming from my mind. However, because, i am self taught, is there any **correct and recommended way of moving camera over the 2D scene**, please?" />
  <row Id="26836" PostHistoryTypeId="2" PostId="12277" RevisionGUID="2dcc4649-09ab-43db-b816-350ab00f5837" CreationDate="2011-05-13T14:42:54.883" UserId="7237" Text="I've recently been experimenting with a simple Voxel-based 3d engine (think Minecraft) which uses heightmaps to define terrain in the following format:&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Heightmap&#xD;&#xA;&#xD;&#xA;Does anyone know of the best software for producing these kind of maps? Preferably with the ability to define a texturemap also. Are terrogen and picogen the only real alternatives?" />
  <row Id="26837" PostHistoryTypeId="1" PostId="12277" RevisionGUID="2dcc4649-09ab-43db-b816-350ab00f5837" CreationDate="2011-05-13T14:42:54.883" UserId="7237" Text="Voxel heightmap terrain editor" />
  <row Id="26838" PostHistoryTypeId="3" PostId="12277" RevisionGUID="2dcc4649-09ab-43db-b816-350ab00f5837" CreationDate="2011-05-13T14:42:54.883" UserId="7237" Text="&lt;level-design&gt;&lt;terrain-rendering&gt;&lt;voxels&gt;&lt;minecraft&gt;&lt;heightmap&gt;" />
  <row Id="26839" PostHistoryTypeId="2" PostId="12278" RevisionGUID="5a624254-d4f4-4d5b-b709-2001d7b2b8d0" CreationDate="2011-05-13T14:57:37.360" UserId="229" Text="The situation you describe is called a &quot;[wall kick][1]&quot;.&#xD;&#xA;&#xD;&#xA;&gt; A wall kick happens when a player&#xD;&#xA;&gt; rotates a piece when no space exists&#xD;&#xA;&gt; in the squares where that tetromino&#xD;&#xA;&gt; would normally occupy after the&#xD;&#xA;&gt; rotation.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&gt; The simplest wall kick algorithm ...&#xD;&#xA;&gt; is to try moving the tetromino one&#xD;&#xA;&gt; space to the right, and then one space&#xD;&#xA;&gt; to the left, and fail if neither can&#xD;&#xA;&gt; be done.&#xD;&#xA;&#xD;&#xA;There are various Tetris rotation systems, all documented on Wikia: [Rotation Systems][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tetris.wikia.com/wiki/Wall_kick&#xD;&#xA;  [2]: http://tetris.wikia.com/wiki/Category:Rotation_Systems" />
  <row Id="26840" PostHistoryTypeId="2" PostId="12279" RevisionGUID="c0ac74d9-117d-4342-86cb-1a0e1d2c30f0" CreationDate="2011-05-13T15:02:26.583" UserId="6813" Text="In 2D you can know which side of a segment is a point using the signed area of a triangle.&#xD;&#xA;&#xD;&#xA;Let :&#xD;&#xA;&#xD;&#xA;- P any point to test against the segment&#xD;&#xA;&#xD;&#xA;- AB the segment formed by points A &amp; B.&#xD;&#xA;&#xD;&#xA;&gt;     SignedArea = (Bx-Ax) * (Py-Ay) - (Px-Ax) * (By-Ay);&#xD;&#xA;&#xD;&#xA;The SignedArea will be positive if ABP are oriented counterclockwise around the triangle, and negative if oriented clockwise.&#xD;&#xA;&#xD;&#xA;Thus,&#xD;&#xA;&#xD;&#xA;- if **SignedArea is positive**, the point P is on the **LEFT side** of the segment AB (seen from A to B)&#xD;&#xA;&#xD;&#xA;- if **SignedArea is negative**, the point P is on the **RIGHT side** of the segment AB (seen from A to B)&#xD;&#xA;&#xD;&#xA;- if SignedArea is 0, the point P is on somewhere one the &quot;line&quot; (not necessarily the segment)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In 3D you can know which side of a surface is a point using dot product and cross product. But as I guess your problem is a 2D problem, this should not be required.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26841" PostHistoryTypeId="5" PostId="12278" RevisionGUID="d7af6838-8a3f-43ff-9ce9-7736df60c049" CreationDate="2011-05-13T15:10:47.067" UserId="229" Comment="added 243 characters in body" Text="The situation you describe is called a &quot;[wall kick][1]&quot;.&#xD;&#xA;&#xD;&#xA;&gt; A wall kick happens when a player&#xD;&#xA;&gt; rotates a piece when no space exists&#xD;&#xA;&gt; in the squares where that tetromino&#xD;&#xA;&gt; would normally occupy after the&#xD;&#xA;&gt; rotation.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&gt; The simplest wall kick algorithm ...&#xD;&#xA;&gt; is to try moving the tetromino one&#xD;&#xA;&gt; space to the right, and then one space&#xD;&#xA;&gt; to the left, and fail if neither can&#xD;&#xA;&gt; be done.&#xD;&#xA;&#xD;&#xA;There are various Tetris rotation systems, all documented on Wikia: [Rotation Systems][2]&#xD;&#xA;&#xD;&#xA;SRS is the &quot;official&quot; Tetris specification, and it has quite a [complex algorithm for wall kicks][3] involving tables. The final piece may not even overlap the original piece at all!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tetris.wikia.com/wiki/Wall_kick&#xD;&#xA;  [2]: http://tetris.wikia.com/wiki/Category:Rotation_Systems&#xD;&#xA;  [3]: http://www.tetrisconcept.net/wiki/SRS#Wall_Kicks" />
  <row Id="26842" PostHistoryTypeId="25" PostId="12272" RevisionGUID="28590c2a-782b-407c-8367-c7ccda04874c" CreationDate="2011-05-13T15:11:55.100" Comment="http://twitter.com/#!/StackGameDev/status/69057286462636032" />
  <row Id="26843" PostHistoryTypeId="2" PostId="12280" RevisionGUID="69220337-f64a-420f-80dc-2211dd1eef6a" CreationDate="2011-05-13T15:13:38.357" UserId="6469" Text="Game development is a different ball game form application programming.&#xD;&#xA;&#xD;&#xA;In the world of games it is all about speed. When pushing the envelope with 1080p HD graphics, high sampling sound and nex gen AI every last processor cycle counts.&#xD;&#xA;&#xD;&#xA;Historically C and C++ have been the fasts but java is now comparable to c++ in terms of speed in some circumstances.  &#xD;&#xA;&#xD;&#xA;C++ allows you greater control over the architectural you design on than any other language.&#xD;&#xA;&#xD;&#xA;Most senior game developer are well senior meaning they were taught the old school way as they were invented an as such are very proficient in older technologies.&#xD;&#xA;&#xD;&#xA;But the most major reason that commercial game development favours C++ is that it has been used for over 15 years in the games industry and there are literally billions of in house and public access library's for it. If you want it chances are someone has built it in c++.&#xD;&#xA;&#xD;&#xA;Having said that java is becoming more and more popular as it makes it easier to develop on the wide spread and constantly changing mobile architectural but bleeding edge games will continue to have there core written in c++ for some time to come. " />
  <row Id="26844" PostHistoryTypeId="6" PostId="12276" RevisionGUID="2edb19c9-be53-44bf-a088-55b2faab6c65" CreationDate="2011-05-13T15:39:03.147" UserId="51" Comment="edited tags" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;camera&gt;" />
  <row Id="26845" PostHistoryTypeId="2" PostId="12281" RevisionGUID="f5be17f7-a37b-4bb1-8f27-0a6ba73aa45a" CreationDate="2011-05-13T15:46:17.350" UserId="1430" Text="There are several correct ways -- both of the methods you described are fine. I would suggest the first method, using gluLookAt or otherwise directly manipulating the view transformation matrix to transform it sideways. All parameters to gluLookAt are still going to be used, it's simply that certain combinations of values for those parameters will end up appearing to have an equivalent impact on the scene given that you eventually apply an orthographic projection.&#xD;&#xA;&#xD;&#xA;GL combines the world and view matrices into one, so depending on the level to which you abstract that yourself it may not matter if you manipulate the &quot;view&quot; matrix or the &quot;object&quot; matrix (since they're the same). If you do maintain a separation of these concepts in your own code, I would say that it's more readable to manipulate the view matrix (via gluLookAt or more direct transformation) than the object matrix, even the math would end up being equivalent." />
  <row Id="26846" PostHistoryTypeId="5" PostId="12278" RevisionGUID="5bcd7cb1-fccd-42e2-80fa-e19c85d4e525" CreationDate="2011-05-13T16:02:49.033" UserId="229" Comment="added 236 characters in body; deleted 1 characters in body" Text="The situation you describe is called a &quot;[wall kick][1]&quot;.&#xD;&#xA;&#xD;&#xA;&gt; A wall kick happens when a player&#xD;&#xA;&gt; rotates a piece when no space exists&#xD;&#xA;&gt; in the squares where that tetromino&#xD;&#xA;&gt; would normally occupy after the&#xD;&#xA;&gt; rotation.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&gt; The simplest wall kick algorithm ...&#xD;&#xA;&gt; is to try moving the tetromino one&#xD;&#xA;&gt; space to the right, and then one space&#xD;&#xA;&gt; to the left, and fail if neither can&#xD;&#xA;&gt; be done.&#xD;&#xA;&#xD;&#xA;There are various Tetris rotation systems, all documented on Wikia: [Rotation Systems][2]&#xD;&#xA;&#xD;&#xA;SRS is the &quot;official&quot; Tetris specification, and it has quite a [complex algorithm for wall kicks][3] involving tables. The final piece may not even overlap the original piece at all!&#xD;&#xA;&#xD;&#xA;The [DTET rotation system][4] extends the simplest algorithm by checking five other wall kicks besides just right and left. All pieces follow the same rules.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tetris.wikia.com/wiki/Wall_kick&#xD;&#xA;  [2]: http://tetris.wikia.com/wiki/Category:Rotation_Systems&#xD;&#xA;  [3]: http://www.tetrisconcept.net/wiki/SRS#Wall_Kicks&#xD;&#xA;  [4]: http://www.tetrisconcept.net/wiki/DTET_Rotation_System#Wall_Kicks" />
  <row Id="26847" PostHistoryTypeId="2" PostId="12282" RevisionGUID="dc6255ef-9765-4916-8f19-c6fe77c7097e" CreationDate="2011-05-13T16:13:20.057" UserId="7191" Text="Rolling your own is nice, since then you can just create maps, without needing to supply an image, or at least make the image optional. I use Perlin noise in my voxel game for terrain generation. It works pretty well, but is fairly plain compared to the maps that Minecraft produces. I imagine Notch does a lot more than just Perlin noise. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Perlin noise is a pretty standard way to go:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain][1]&#xD;&#xA;&#xD;&#xA;Then this guy Paul Martz has an application that makes such maps, and the source code for doing so.&#xD;&#xA;&#xD;&#xA;[http://www.gameprogrammer.com/fractal.html][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain&#xD;&#xA;  [2]: http://www.gameprogrammer.com/fractal.html" />
  <row Id="26848" PostHistoryTypeId="5" PostId="12276" RevisionGUID="c4772c6c-f082-4e9c-b0f8-71f648b7d687" CreationDate="2011-05-13T16:16:24.967" UserId="2229" Comment="spelling" Text="I have quite **large 2D game scene**. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene.&#xD;&#xA;&#xD;&#xA;**What is the correct way of moving viewport over the scene, in Orthogonal (2D) projection, please?**&#xD;&#xA;&#xD;&#xA;*There are two solutions coming to my mind:*&#xD;&#xA;&#xD;&#xA; 1. Using **GluLookAt()**, which is designed to move camera moslty in Perspective Projection, but it could work well for 2D as well. However, not all of the GluLookAt() parameters would be utilized in Ortho configuration.&#xD;&#xA; 2. Using **opposite View Translate transformation**. This would mean, if I need to move my 2D camera 10 units to the right(positive x axis), I would apply opposite Translate transformation to every scene vertex (negative x axis). This way, I would create illusion, the camera moves to the right.&#xD;&#xA;&#xD;&#xA;These are the solutions coming from my mind. However, because, i am self taught, is there any **correct and recommended way of moving camera over the 2D scene**, please?" />
  <row Id="26849" PostHistoryTypeId="5" PostId="12281" RevisionGUID="4b2d86fd-829e-4091-8f69-b72d508985b5" CreationDate="2011-05-13T16:29:48.653" UserId="1430" Comment="deleted 193 characters in body" Text="There are several correct ways -- both of the methods you described are fine. I would suggest the first method, using gluLookAt or otherwise directly manipulating the view transformation matrix to transform it sideways. All parameters to gluLookAt are still going to be used.&#xD;&#xA;&#xD;&#xA;GL combines the world and view matrices into one, so depending on the level to which you abstract that yourself it may not matter if you manipulate the &quot;view&quot; matrix or the &quot;object&quot; matrix (since they're the same). If you do maintain a separation of these concepts in your own code, I would say that it's more readable to manipulate the view matrix (via gluLookAt or more direct transformation) than the object matrix, even the math would end up being equivalent." />
  <row Id="26850" PostHistoryTypeId="2" PostId="12283" RevisionGUID="dc46b799-a166-4c93-bc4d-9cef533b2a36" CreationDate="2011-05-13T16:48:06.917" UserId="5021" Text="I'm a little confused about what you're trying to do. If you represent your terrain as a single 2D heightmap, then you won't be able to form the same kind of terrain as minecraft, as it is a 3D terrain (i.e. arbitrary placement of cubes anywhere in 3D).&#xD;&#xA;&#xD;&#xA;One benefit of voxels is that you can have overhangs, which are impossible with a heightmap like you describe.&#xD;&#xA;&#xD;&#xA;In terms of minecraft, a single 2D texture can only provide you with information about a single layer of blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you really do want to create a 2D heightmap, Vue has excellent tools for doing so:&#xD;&#xA;&#xD;&#xA;http://www.e-onsoftware.com/products/vue/vue_9.5_infinite/&#xD;&#xA;&#xD;&#xA;Although it is quite expensive." />
  <row Id="26851" PostHistoryTypeId="5" PostId="12282" RevisionGUID="eed9d609-8109-4da8-98a4-668e403d0bbc" CreationDate="2011-05-13T17:15:41.557" UserId="7191" Comment="added 232 characters in body" Text="Rolling your own is nice, since then you can just create maps, without needing to supply an image, or at least make the image optional. I use Perlin noise in my voxel game for terrain generation. It works pretty well, but is fairly plain compared to the maps that Minecraft produces. I imagine Notch does a lot more than just Perlin noise. &#xD;&#xA;&#xD;&#xA;In my game I use 2D Perlin noise to generate the basic flow of the landscape. Then do some carving with another grid of 2D Perlin noise to make a more rugged look. Then I carve tunnels using a wandering path through the terrain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Perlin noise is a pretty standard way to go:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain][1]&#xD;&#xA;&#xD;&#xA;Then this guy Paul Martz has an application that makes such maps, and the source code for doing so.&#xD;&#xA;&#xD;&#xA;[http://www.gameprogrammer.com/fractal.html][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain&#xD;&#xA;  [2]: http://www.gameprogrammer.com/fractal.html" />
  <row Id="26852" PostHistoryTypeId="5" PostId="12283" RevisionGUID="afae1b35-43f9-4c8a-8f79-0f63f47a81f2" CreationDate="2011-05-13T17:19:56.177" UserId="5021" Comment="added 42 characters in body; added 2 characters in body" Text="I'm a little confused about what you're trying to do. If you represent your terrain as a single 2D heightmap, then you won't be able to form the same kind of terrain as minecraft, as it is a 3D voxel terrain (i.e. arbitrary placement of cubes anywhere in 3D).&#xD;&#xA;&#xD;&#xA;One benefit of voxels is that you can have overhangs and tunnels and floating blocks, which are all impossible with a heightmap like you describe.&#xD;&#xA;&#xD;&#xA;In terms of minecraft, a single 2D texture can only provide you with information about a single layer of blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you really do want to create a 2D heightmap, Vue has excellent tools for doing so:&#xD;&#xA;&#xD;&#xA;http://www.e-onsoftware.com/products/vue/vue_9.5_infinite/&#xD;&#xA;&#xD;&#xA;(Although it is quite expensive.)" />
  <row Id="26853" PostHistoryTypeId="5" PostId="12283" RevisionGUID="d7075bcc-cf33-4283-a944-e2135da06d5b" CreationDate="2011-05-13T17:25:21.943" UserId="5021" Comment="added 401 characters in body" Text="I'm a little confused about what you're trying to do. If you represent your terrain as a single 2D heightmap, then you won't be able to form the same kind of terrain as minecraft, as it is a 3D voxel terrain (i.e. arbitrary placement of cubes anywhere in 3D).&#xD;&#xA;&#xD;&#xA;One benefit of voxels is that you can have overhangs and tunnels and floating blocks, which are all impossible with a heightmap like you describe.&#xD;&#xA;&#xD;&#xA;In terms of minecraft, a single 2D texture can only provide you with information about a single layer of blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you really do want to create a 2D heightmap, Vue has excellent tools for doing so:&#xD;&#xA;&#xD;&#xA;http://www.e-onsoftware.com/products/vue/vue_9.5_infinite/&#xD;&#xA;&#xD;&#xA;(Although it is quite expensive.)&#xD;&#xA;&#xD;&#xA;If you want to generate an interesting 3D terrain from scratch consider this often quoted GPU Gems article, and simply ignore all the hard parts of generating a mesh from the voxels, and just use the voxel generation method by itself (just a combination of trig functions).&#xD;&#xA;http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html&#xD;&#xA;&#xD;&#xA;Texture colors can be generated based on slope and height." />
  <row Id="26854" PostHistoryTypeId="5" PostId="11969" RevisionGUID="366fa70e-b511-4549-b27c-f1bf7c30d4fa" CreationDate="2011-05-13T17:26:42.630" UserId="962" Comment="edited body" Text="In my research for a stuttering problem in my game engine, I think, I have found the problem, but don't have any idea why this is happening, that's why I ask you if you have an idea !&#xD;&#xA;&#xD;&#xA;The situation :&#xD;&#xA;DirectX10 under win7 simple engine. If running fullscreen (and only in fullscreen), with Vsync On and the rendering loop going much more faster than the vsync ==&gt; Stutter (Frame dropped by the driver).&#xD;&#xA;&#xD;&#xA;My base solution at this moment : Make the call to device.present() not faster than the Vsync !&#xD;&#xA;&#xD;&#xA;My questions :&#xD;&#xA;- What is happening here ? It seems that the called to .present() &quot;is caching&quot; frames, and if the cache is full, it can go to throw away a frame ==&gt; It makes the stutter !&#xD;&#xA;- Why is it not happening in windowed mode under the exact same situation (back buffer resolution, scene, ...) ???&#xD;&#xA;&#xD;&#xA;Edit : &#xD;&#xA;Here is a Pix debugging screen (big picture), showing the stuttering :&#xD;&#xA;http://www.s33m3.be/PIX/PIX3.png&#xD;&#xA;You can see that frame 912, that did exactly the same amount of work as other frames, wasn't processed by the GPU. (No GPU start/Duration). And after debugging, it just that for this frame the call to .Present() was really low (more then 10 times faster than the average .Present() of the other frames !&#xD;&#xA;&#xD;&#xA;So how can I disable in DirectX10  this &quot;feature&quot; to throw aways frames ? I would prefer the Present method to hold instead of dropping a frame !" />
  <row Id="26856" PostHistoryTypeId="5" PostId="12282" RevisionGUID="511d4435-bc47-42f0-8e80-e4b32790efbf" CreationDate="2011-05-13T17:28:02.863" UserId="7191" Comment="added 306 characters in body" Text="Rolling your own is nice, since then you can just create maps, without needing to supply an image, or at least make the image optional. I use Perlin noise in my voxel game for terrain generation. It works pretty well, but is fairly plain compared to the maps that Minecraft produces. I imagine Notch does a lot more than just Perlin noise. &#xD;&#xA;&#xD;&#xA;In my game I use 2D Perlin noise to generate the basic flow of the landscape. Then do some carving with another grid of 2D Perlin noise to make a more rugged look. Then I carve tunnels using a wandering path through the terrain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Perlin noise is a pretty standard way to go:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain][1]&#xD;&#xA;&#xD;&#xA;Then this guy Paul Martz has an application that makes such maps, and the source code for doing so.&#xD;&#xA;&#xD;&#xA;[http://www.gameprogrammer.com/fractal.html][2]&#xD;&#xA;&#xD;&#xA;There's also a nice article in Game Developer that goes into procedurally generating voxel terrain. It goes into 2D height maps, and 3D noise for generating maps.&#xD;&#xA;&#xD;&#xA;[http://gamedeveloper.texterity.com/gamedeveloper/201104/#pg23][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain&#xD;&#xA;  [2]: http://www.gameprogrammer.com/fractal.html&#xD;&#xA;  [3]: http://gamedeveloper.texterity.com/gamedeveloper/201104/#pg23" />
  <row Id="26859" PostHistoryTypeId="2" PostId="12285" RevisionGUID="9377eb20-6cc3-48fb-acc1-ac175e293f2d" CreationDate="2011-05-13T17:50:33.433" UserId="7328" Text="if i were to write such a code i would rather ot use this approch (and i'm not using any boost if it's important for you), since it can do all the thing you want but the problem is when there are too many enteties which do not share some componnet, finding those which have it will consume some time. other than that there is no other problem i can thing of :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// declare components here------------------------------&#xD;&#xA;	class component&#xD;&#xA;	{&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class health:public component&#xD;&#xA;	{&#xD;&#xA;	public:&#xD;&#xA;		int value;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class boundingbox:public component&#xD;&#xA;	{&#xD;&#xA;	public :&#xD;&#xA;		int left,right,top,bottom;&#xD;&#xA;		bool collision(boundingbox&amp; other)&#xD;&#xA;		{&#xD;&#xA;			if (left &lt; other.right || right &gt; other.left)&#xD;&#xA;				if (top &lt; other.bottom || bottom &gt; other.top)&#xD;&#xA;					return true;&#xD;&#xA;			return false;&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class damage : public component&#xD;&#xA;	{&#xD;&#xA;	public:&#xD;&#xA;		int value;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	// declare enteties here------------------------------&#xD;&#xA;&#xD;&#xA;	class entity&#xD;&#xA;	{&#xD;&#xA;		virtual int id() = 0;&#xD;&#xA;		virtual int size() = 0;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class aircraft :public entity, public health,public boundingbox&#xD;&#xA;	{&#xD;&#xA;		virtual int id(){return 1;}&#xD;&#xA;		virtual int size() {return sizeof(*this);};&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class bullet :public entity, public damage, public boundingbox&#xD;&#xA;	{&#xD;&#xA;		virtual int id(){return 2;}&#xD;&#xA;		virtual int size() {return sizeof(*this);};&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	int main()&#xD;&#xA;	{&#xD;&#xA;		entity* gameobjects[3];&#xD;&#xA;		gameobjects[0] = new aircraft;&#xD;&#xA;		gameobjects[1] = new bullet;&#xD;&#xA;		gameobjects[2] = new bullet;&#xD;&#xA;		for (int i=0;i&lt;3;i++)&#xD;&#xA;			for(int j=0;j&lt;3;j++)&#xD;&#xA;				if (dynamic_cast&lt;boundingbox*&gt;(gameobjects[i]) &amp;&amp; dynamic_cast&lt;boundingbox*&gt;(gameobjects[j]) &amp;&amp;&#xD;&#xA;					dynamic_cast&lt;boundingbox*&gt;(gameobjects[i])-&gt;collision(*dynamic_cast&lt;boundingbox*&gt;(gameobjects[j])))&#xD;&#xA;					if (dynamic_cast&lt;health*&gt;(gameobjects[i]) &amp;&amp; dynamic_cast&lt;damage*&gt;(gameobjects[j]))&#xD;&#xA;						dynamic_cast&lt;health*&gt;(gameobjects[i])-&gt;value -= dynamic_cast&lt;damage*&gt;(gameobjects[j])-&gt;value;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;in this approch every component is a base for an entity so given the component it's pointer is also an entity! the second thing you ask for is to have a direct access to some entity's components eg. when i need to access damage in one of my entities i use `dynamic_cast&lt;damage*&gt;(entity)-&gt;value`, so if `entity` has damage component it will return the value. if you are not sure whether `entity` has component damage or not you can easily check `if (dynamic_cast&lt;damage*&gt; (entity))` return value of `dynamic_cast` is always NULL if the cast is not valid and a same pointer but with the requested type if it's valid. so to do something with all the `entities` which has some `component` you can do it like below &#xD;&#xA;&#xD;&#xA;	for (int i=0;i&lt;enteties.size();i++)&#xD;&#xA;		if (dynamic_cast&lt;component*&gt;(enteties[i]))&#xD;&#xA;			//do somthing here&#xD;&#xA;&#xD;&#xA;if there any other questions i'll be glad to answer." />
  <row Id="26860" PostHistoryTypeId="5" PostId="12198" RevisionGUID="d398e308-9fee-4f3d-a354-6f9eab54fba7" CreationDate="2011-05-13T17:58:50.330" UserId="7191" Comment="Edit to match ops edit" Text=" I know it's hard to use the debugger to find these kinds of issues.  From your question it sounds like you also have some network communication tasks inside the input and painting thread, I'd recommend pushing that functionality to a different thread. Network communication is unreliable, and having the painting and input threads possibly getting hung up on network time-outs would be bad news.&#xD;&#xA;&#xD;&#xA; Try to figure out how to reproduce the failure, it will be much easier to solve if you can find a cause. Another way to find the offending bit of code is to try breaking the threads tasks down, or temporarily disabling some of it's functions. Then try to break it again.&#xD;&#xA;&#xD;&#xA;Lastly, try posting the code you think is at fault so we can look at it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit** That code is a bit much to look at. Try placing break points at all your exit points for the thread, see if the thread is ending prematurely. Step through the thread a few times with the debugger, to make sure it's following the path you think it should. Make sure it's not getting hung up on network issues.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26861" PostHistoryTypeId="5" PostId="12282" RevisionGUID="544f65b3-714e-4f1c-9bed-16b3dbfcffb9" CreationDate="2011-05-13T18:03:26.977" UserId="7191" Comment="added 191 characters in body; added 72 characters in body" Text="Rolling your own is nice, since then you can just create maps, without needing to supply an image, or at least make the image optional. I use Perlin noise in my voxel game for terrain generation. It works pretty well, but is fairly plain compared to the maps that Minecraft produces. I imagine Notch does a lot more than just Perlin noise. &#xD;&#xA;&#xD;&#xA;In my game I use 2D Perlin noise to generate the basic flow of the landscape. Then do some carving with another grid of 2D Perlin noise to make a more rugged look. Then I carve tunnels using a wandering path through the terrain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Perlin noise is a pretty standard way to go:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain][1]&#xD;&#xA;&#xD;&#xA;Then this guy Paul Martz has an application that makes such maps, and the source code for doing so.&#xD;&#xA;&#xD;&#xA;[http://www.gameprogrammer.com/fractal.html][2]&#xD;&#xA;&#xD;&#xA;There's also a nice article in Game Developer that goes into procedurally generating voxel terrain. It goes into 2D height maps, and 3D noise for generating maps.&#xD;&#xA;&#xD;&#xA;Updated link, hope that works. If not, the article is in the [April issue on page 21 (Creator of Worlds)][3]. I thought it was a free subscription since I have a free one... sorry.&#xD;&#xA;&#xD;&#xA;[http://gamedeveloper.texterity.com/gamedeveloper/201104/?pg=23&amp;pm=2&amp;u1=friend][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain&#xD;&#xA;  [2]: http://www.gameprogrammer.com/fractal.html&#xD;&#xA;  [3]: http://www.gdmag.com/archive/apr11.htm&#xD;&#xA;  [4]: http://gamedeveloper.texterity.com/gamedeveloper/201104/?pg=23&amp;pm=2&amp;u1=friend" />
  <row Id="26862" PostHistoryTypeId="25" PostId="12277" RevisionGUID="d2eedbbc-05f1-461c-b260-3ef0e1c69e91" CreationDate="2011-05-13T18:12:03.417" Comment="http://twitter.com/#!/StackGameDev/status/69102620740030464" />
  <row Id="26863" PostHistoryTypeId="5" PostId="12248" RevisionGUID="d2548b08-23b6-4ee6-b86c-07bb97e82ac2" CreationDate="2011-05-13T18:16:28.130" UserId="962" Comment="Removed fluff. Directly to the question. chagned the title." Text="I'm going to be away for a little bit, bringing my netbook with me to do some basic DirectX10 stuff.&#xD;&#xA;&#xD;&#xA;**How can I run DX10 on DX9.0c hardware?**" />
  <row Id="26864" PostHistoryTypeId="4" PostId="12248" RevisionGUID="d2548b08-23b6-4ee6-b86c-07bb97e82ac2" CreationDate="2011-05-13T18:16:28.130" UserId="962" Comment="Removed fluff. Directly to the question. chagned the title." Text="How to run DirectX10 on non-compatible hardware?" />
  <row Id="26865" PostHistoryTypeId="5" PostId="12268" RevisionGUID="5cee95d2-977c-4c8b-bb61-b4527cf37831" CreationDate="2011-05-13T18:21:17.987" UserId="2231" Comment="added 8 characters in body" Text="I'm writing a shooter (like 1942, classic 2D graphics) and I'd like to use a component based approch. So far I thought about the following design:&#xD;&#xA;&#xD;&#xA;1) Each game element (airship, projectile, powerup, enemy) is an Entity&#xD;&#xA;&#xD;&#xA;2) Each Entity is a set of components which can added or removed at run-time. Examples are Position, Sprite, Health, IA, Damage, BoundingBox etc.&#xD;&#xA;&#xD;&#xA;The idea is that Airship, Projectile, Enemy, Powerup are NOT game classes. An entity is only defined by the components it owns (and that can change during time).&#xD;&#xA;So the player Airship starts with  Sprite, Position, Health and Input components.&#xD;&#xA;A powerup has the Sprite, Position, BoundingBox.&#xD;&#xA;And so on.&#xD;&#xA;&#xD;&#xA;The main loop manages the game &quot;physics&quot;, i.e. how the components interact each other:&#xD;&#xA;&#xD;&#xA;    foreach(entity (let it be entity1) with a Damage component)&#xD;&#xA;    	foreach(entity (let it be entity2) with a Health component)&#xD;&#xA;    	if(the entity1.BoundingBox collides with entity2.BoundingBox)&#xD;&#xA;    	{&#xD;&#xA;    		entity2.Health.decrease(entity1.Damage.amount());&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    foreach(entity with a IA component)&#xD;&#xA;    	entity.IA.update(); &#xD;&#xA;    &#xD;&#xA;    foreach(entity with a Sprite component)&#xD;&#xA;    	draw(entity.Sprite.surface()); &#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Components are hardcoded in the main C++ application. Entities can be defined in an XML file (the IA part in a lua or python file).&#xD;&#xA;&#xD;&#xA;The main loop doesn't care a lot about entities: it only manages components. The software design should allow to:&#xD;&#xA;&#xD;&#xA;1) Given a component, get the entity it belongs to&#xD;&#xA;&#xD;&#xA;2) Given an entity, get the component of type &quot;type&quot;&#xD;&#xA;&#xD;&#xA;3) For all entities, do something&#xD;&#xA;&#xD;&#xA;4) For all entity's component, do something (e.g: serialize)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I was thinking about the following:&#xD;&#xA;&#xD;&#xA;    class Entity;&#xD;&#xA;    class Component { Entity* entity; ... virtual void serialize(filestream, op) = 0; ...}&#xD;&#xA;    class Sprite : public Component {...};&#xD;&#xA;    class Position : public Component {...};&#xD;&#xA;    class IA : public Component {... virtual void update() = 0; };&#xD;&#xA;    &#xD;&#xA;    // I don't remember exactly the boost::fusion map syntax right now, sorry.&#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;       int id; // entity id&#xD;&#xA;       boost::fusion::map&lt; pair&lt;Sprite, Sprite*&gt;, pair&lt;Position, Position*&gt; &gt; components;&#xD;&#xA;       template &lt;class C&gt; bool has_component() { return components.at&lt;C&gt;() != 0; }&#xD;&#xA;       template &lt;class C&gt; C* get_component() { return components.at&lt;C&gt;(); }&#xD;&#xA;       template &lt;class C&gt; void add_component(C* c) { components.at&lt;C&gt;() = c; }&#xD;&#xA;       template &lt;class C&gt; void remove_component(C* c) { components.at&lt;C&gt;() = 0; }&#xD;&#xA;       void serialize(filestream, op) { /* Serialize all componets*/ }&#xD;&#xA;    ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    std::list&lt;Entity*&gt; entity_list;&#xD;&#xA;&#xD;&#xA;With this design I can get #1, #2, #3 (thanks to boost::fusion::map algorithms) and #4. Also everything is O(1) (ok, not exactly, but it's still very fast).&#xD;&#xA;&#xD;&#xA;There is also a more &quot;common&quot; approch:&#xD;&#xA;&#xD;&#xA;    class Entity;&#xD;&#xA;    class Component { Entity* entity; ... virtual void serialize(filestream, op) = 0; ...}&#xD;&#xA;    class Sprite : public Component { static const int type_id = 0; };&#xD;&#xA;    class Position : public Component { static const int type_id = 1; };&#xD;&#xA;    &#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;       int id; // entity id&#xD;&#xA;       std::vector&lt;Component*&gt; components;&#xD;&#xA;       bool has_component() { return components[i] != 0; }&#xD;&#xA;       template &lt;class C&gt; C* get_component() { return dynamic_cast&lt;C&gt; components[C::id](); } // It's actually quite safe&#xD;&#xA;    ...&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Another approch is to get rid of the Entity class: each Component type lives in its own list. So there is a Sprite list, a Health list, a Damage list etc. I know they belong to the same logic entity because of the entity id. This is simpler, but slower: the IA components needs access basically to all other entity's components and that would require searching each other component's list at each step.&#xD;&#xA;&#xD;&#xA;Which approch do you think is better? &#xD;&#xA;is boost::fusion map suited to be used in that way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26866" PostHistoryTypeId="2" PostId="12286" RevisionGUID="e115dc2d-1bcd-4d5a-976c-30506ce76c35" CreationDate="2011-05-13T18:28:46.490" UserId="7336" Text="I'm reading a paper on terrain rendering LOD and there's some math notation there I'm not clear on.&#xD;&#xA;&#xD;&#xA;When talking about how triangles are split into pairs of smaller triangles where more detail is needed on the mesh they have an equation along the lines of&#xD;&#xA;&#xD;&#xA;large triangle = left triangle ⊕ right triangle&#xD;&#xA;&#xD;&#xA;From the context of the rest of the paragraph, I get that they're saying that the bigger triangle contains/is made up of the two smaller triangle.  But what specifically does that symbol mean in terms of triangles &amp; trigonometry?&#xD;&#xA;&#xD;&#xA;Should that be interpreted as the direct sum of two triangles?  If so, what does that operation actually entail?  Performing a direct sum of the matrices of the triangle vertices?&#xD;&#xA;&#xD;&#xA;Paper in question is here btw, page 4, section 4.1 has the notation I'm talking about:&#xD;&#xA;http://smartech.gatech.edu/handle/1853/3488&#xD;&#xA;" />
  <row Id="26867" PostHistoryTypeId="1" PostId="12286" RevisionGUID="e115dc2d-1bcd-4d5a-976c-30506ce76c35" CreationDate="2011-05-13T18:28:46.490" UserId="7336" Text="Circled plus math symbol - Direct sum of triangles?" />
  <row Id="26868" PostHistoryTypeId="3" PostId="12286" RevisionGUID="e115dc2d-1bcd-4d5a-976c-30506ce76c35" CreationDate="2011-05-13T18:28:46.490" UserId="7336" Text="&lt;math&gt;" />
  <row Id="26869" PostHistoryTypeId="5" PostId="12268" RevisionGUID="bd3853ce-acc4-4d8d-84e9-51dfacd01e0d" CreationDate="2011-05-13T18:42:54.540" UserId="1198" Comment="added 4 characters in body" Text="I'm writing a shooter (like 1942, classic 2D graphics) and I'd like to use a component based approch. So far I thought about the following design:&#xD;&#xA;&#xD;&#xA; 1. Each game element (airship, projectile, powerup, enemy) is an Entity&#xD;&#xA;&#xD;&#xA; 2. Each Entity is a set of components which can added or removed at run-time. Examples are Position, Sprite, Health, IA, Damage, BoundingBox etc.&#xD;&#xA;&#xD;&#xA;The idea is that Airship, Projectile, Enemy, Powerup are NOT game classes. An entity is only defined by the components it owns (and that can change during time).&#xD;&#xA;So the player Airship starts with  Sprite, Position, Health and Input components.&#xD;&#xA;A powerup has the Sprite, Position, BoundingBox.&#xD;&#xA;And so on.&#xD;&#xA;&#xD;&#xA;The main loop manages the game &quot;physics&quot;, i.e. how the components interact each other:&#xD;&#xA;&#xD;&#xA;    foreach(entity (let it be entity1) with a Damage component)&#xD;&#xA;    	foreach(entity (let it be entity2) with a Health component)&#xD;&#xA;    	if(the entity1.BoundingBox collides with entity2.BoundingBox)&#xD;&#xA;    	{&#xD;&#xA;    		entity2.Health.decrease(entity1.Damage.amount());&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    foreach(entity with a IA component)&#xD;&#xA;    	entity.IA.update(); &#xD;&#xA;    &#xD;&#xA;    foreach(entity with a Sprite component)&#xD;&#xA;    	draw(entity.Sprite.surface()); &#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Components are hardcoded in the main C++ application. Entities can be defined in an XML file (the IA part in a lua or python file).&#xD;&#xA;&#xD;&#xA;The main loop doesn't care a lot about entities: it only manages components. The software design should allow to:&#xD;&#xA;&#xD;&#xA; 1. Given a component, get the entity it belongs to&#xD;&#xA;&#xD;&#xA; 2. Given an entity, get the component of type &quot;type&quot;&#xD;&#xA;&#xD;&#xA; 3. For all entities, do something&#xD;&#xA;&#xD;&#xA; 4. For all entity's component, do something (e.g: serialize)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I was thinking about the following:&#xD;&#xA;&#xD;&#xA;    class Entity;&#xD;&#xA;    class Component { Entity* entity; ... virtual void serialize(filestream, op) = 0; ...}&#xD;&#xA;    class Sprite : public Component {...};&#xD;&#xA;    class Position : public Component {...};&#xD;&#xA;    class IA : public Component {... virtual void update() = 0; };&#xD;&#xA;    &#xD;&#xA;    // I don't remember exactly the boost::fusion map syntax right now, sorry.&#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;       int id; // entity id&#xD;&#xA;       boost::fusion::map&lt; pair&lt;Sprite, Sprite*&gt;, pair&lt;Position, Position*&gt; &gt; components;&#xD;&#xA;       template &lt;class C&gt; bool has_component() { return components.at&lt;C&gt;() != 0; }&#xD;&#xA;       template &lt;class C&gt; C* get_component() { return components.at&lt;C&gt;(); }&#xD;&#xA;       template &lt;class C&gt; void add_component(C* c) { components.at&lt;C&gt;() = c; }&#xD;&#xA;       template &lt;class C&gt; void remove_component(C* c) { components.at&lt;C&gt;() = 0; }&#xD;&#xA;       void serialize(filestream, op) { /* Serialize all componets*/ }&#xD;&#xA;    ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    std::list&lt;Entity*&gt; entity_list;&#xD;&#xA;&#xD;&#xA;With this design I can get #1, #2, #3 (thanks to boost::fusion::map algorithms) and #4. Also everything is O(1) (ok, not exactly, but it's still very fast).&#xD;&#xA;&#xD;&#xA;There is also a more &quot;common&quot; approch:&#xD;&#xA;&#xD;&#xA;    class Entity;&#xD;&#xA;    class Component { Entity* entity; ... virtual void serialize(filestream, op) = 0; ...}&#xD;&#xA;    class Sprite : public Component { static const int type_id = 0; };&#xD;&#xA;    class Position : public Component { static const int type_id = 1; };&#xD;&#xA;    &#xD;&#xA;    class Entity&#xD;&#xA;    {&#xD;&#xA;       int id; // entity id&#xD;&#xA;       std::vector&lt;Component*&gt; components;&#xD;&#xA;       bool has_component() { return components[i] != 0; }&#xD;&#xA;       template &lt;class C&gt; C* get_component() { return dynamic_cast&lt;C&gt; components[C::id](); } // It's actually quite safe&#xD;&#xA;    ...&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Another approch is to get rid of the Entity class: each Component type lives in its own list. So there is a Sprite list, a Health list, a Damage list etc. I know they belong to the same logic entity because of the entity id. This is simpler, but slower: the IA components needs access basically to all other entity's components and that would require searching each other component's list at each step.&#xD;&#xA;&#xD;&#xA;Which approch do you think is better? is boost::fusion map suited to be used in that way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26870" PostHistoryTypeId="2" PostId="12287" RevisionGUID="4f0cb11a-382a-4b79-b4e8-82db13ed7376" CreationDate="2011-05-13T18:43:52.783" UserId="4235" Text="Probably referring to Minkowski Addition?:&#xD;&#xA;&#xD;&#xA;http://www.cut-the-knot.org/do_you_know/add_shape.shtml&#xD;&#xA;&#xD;&#xA;(Scroll down a little ways to find where they use the same symbol.)&#xD;&#xA;&#xD;&#xA;&quot;Every element of A added to every element of B,&quot; meaning that if A had 4 vertices and B and 3 vertices, the resulting shape would have 12 vertices." />
  <row Id="26871" PostHistoryTypeId="2" PostId="12288" RevisionGUID="2b1900a9-2c18-487f-9eac-784dd98d4db7" CreationDate="2011-05-13T18:44:07.330" UserId="7339" Text="[Biting the Hand][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.skotos.net/articles/bth.html&#xD;&#xA;&#xD;&#xA;Written by Jessica Mulligan from 1997 to 2003, so it's a bit dated now, but it contains excellent content for folks interested in (massively multiplayer) online game design.&#xD;&#xA;&#xD;&#xA;&gt; That first five minutes of play is a critical time for an online game; the customer will make up his or her mind in that time whether or not to spend money on playing. If there is a sysop present to get new players started, the chances are good that they'll decide to play long term, and pay for the privilege. Or, in the words of online games expert Bridgette Patrovsky, &quot;The first five minutes customers are in your game, they're interviewing you. If you don't make a good first impression, you're unlikely to get the 'job.'&quot;" />
  <row Id="26872" PostHistoryTypeId="16" PostId="12288" RevisionGUID="cfdff33c-c995-4847-b2dd-f3cc2a65440e" CreationDate="2011-05-13T18:44:07.330" UserId="7339" />
  <row Id="26873" PostHistoryTypeId="2" PostId="12289" RevisionGUID="3999c99c-9b01-4ded-a5f6-57176c2d7da3" CreationDate="2011-05-13T18:57:14.270" UserId="7221" Text="I've found that component-based design and data-oriented design go hand in hand. You say that having homogeneous lists of components and eliminating the first-class entity object (instead opting for an entity ID on components themselves) will be &quot;slower&quot;, but that's neither here nor there since you haven't actually profiled any real code that implements both approaches to arrive at that conclusion. As a matter of fact, I can almost guarantee you that homogenizing your components and avoiding the traditional heavy virtualization will be *faster* due to the various advantages of data-oriented design -- easier parallelization, cache utilization, modularity, etc.&#xD;&#xA;&#xD;&#xA;I'm not saying this approach is ideal for everything, but component systems which are basically collections of data that need the same transformations performed upon them every frame, simply scream to be data-oriented. There will be times when components need to communicate with other components of different types, but this is going to be a necessary evil either way. It shouldn't drive the design, however, since there are ways to solve this issue even in the extreme case that all components are processed in parallel such as message queues and [futures][1].&#xD;&#xA;&#xD;&#xA;Definitely Google around for data-oriented design as it relates to component-based systems, because this topic comes up a lot and there is quite a bit of discussion and anecdotal data out there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Futures_and_promises" />
  <row Id="26874" PostHistoryTypeId="2" PostId="12290" RevisionGUID="0db0b37b-9749-46a3-bce9-31f0cd1a05f7" CreationDate="2011-05-13T19:04:34.240" UserId="7191" Text="It could be Exclusive Or.&#xD;&#xA;&#xD;&#xA;[http://en.wikipedia.org/wiki/Exclusive_or][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Exclusive_or" />
  <row Id="26875" PostHistoryTypeId="5" PostId="12282" RevisionGUID="c66016ca-e94a-4360-b660-0ccd1d507276" CreationDate="2011-05-13T19:14:22.507" UserId="7191" Comment="deleted 179 characters in body" Text="Rolling your own is nice, since then you can just create maps, without needing to supply an image, or at least make the image optional. I use Perlin noise in my voxel game for terrain generation. It works pretty well, but is fairly plain compared to the maps that Minecraft produces. I imagine Notch does a lot more than just Perlin noise. &#xD;&#xA;&#xD;&#xA;In my game I use 2D Perlin noise to generate the basic flow of the landscape. Then do some carving with another grid of 2D Perlin noise to make a more rugged look. Then I carve tunnels using a wandering path through the terrain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Perlin noise is a pretty standard way to go:&#xD;&#xA;&#xD;&#xA;[http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain][1]&#xD;&#xA;&#xD;&#xA;Then this guy Paul Martz has an application that makes such maps, and the source code for doing so.&#xD;&#xA;&#xD;&#xA;[http://www.gameprogrammer.com/fractal.html][2]&#xD;&#xA;&#xD;&#xA;There's also a nice article in Game Developer that goes into procedurally generating voxel terrain. It goes into 2D height maps, and 3D noise for generating maps.&#xD;&#xA;&#xD;&#xA;There is an article in the [April issue on page 21 (Creator of Worlds)][3] That's rather good, however it looks like it's paid access if you don't already have a subscription.&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4753055/perlin-noise-generation-for-terrain&#xD;&#xA;  [2]: http://www.gameprogrammer.com/fractal.html&#xD;&#xA;  [3]: http://www.gdmag.com/archive/apr11.htm" />
  <row Id="26876" PostHistoryTypeId="5" PostId="12250" RevisionGUID="0b215f3f-60df-405e-ba2c-d61c7ff313cc" CreationDate="2011-05-13T19:22:09.177" UserId="744" Comment="Quoting things without quotes is plagiarism." Text="[Windows Advanced Rasterization Platform (WARP)][1]&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;&gt; WARP is a high speed, fully conformant software rasterizer. It is a component of the DirectX graphics technology that was introduced by the DirectX 11 runtime. The DirectX 11 runtime is installed on Windows 7, Windows Server 2008 R2, and Windows Vista with the [KB971644] update.&#xD;&#xA;&#xD;&#xA;&gt; **To use WARP**&#xD;&#xA;&#xD;&#xA;&gt; Direct3D 10, 10.1, and 11 components can use an additional driver type that you can specify when you create the device (for example, when you call the `D3D11CreateDevice` function). This driver type is `D3D10_DRIVER_TYPE_WARP` or `D3D_DRIVER_TYPE_WARP`. When you specify this driver type, the runtime creates a WARP device and does not initialize a hardware device.&#xD;&#xA;&#xD;&#xA;&gt; Because WARP uses the same software interface to Direct3D as the reference rasterizer does, any Direct3D 10 or 10.1 application that can support running with the reference rasterizer can be tested by using WARP. To use WARP, rename `D3d10warp.dll` to `D3d10ref.dll` and place it in the same folder as the sample or application. Next, when you switch to ref, you will see WARP rendering.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I copied all of that from the article, but looks like the most relevant and useful part. You probably should read the entire article though. &#xD;&#xA;&#xD;&#xA;I was pretty sure that doing this was impossible when I read your question. A little digging and I was surprised.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/gg615082.aspx#introduction" />
  <row Id="26877" PostHistoryTypeId="6" PostId="8607" RevisionGUID="8cbce319-36ef-467c-ba50-8e0ea52eb3e6" CreationDate="2011-05-13T20:00:09.850" UserId="14" Comment="edited tags" Text="&lt;engine&gt;&lt;android&gt;&lt;client-server&gt;&lt;google-app-engine&gt;" />
  <row Id="26878" PostHistoryTypeId="2" PostId="12291" RevisionGUID="25285ce9-5c4d-4f54-948c-d8c7d331eb75" CreationDate="2011-05-13T20:46:54.127" UserId="891" Text="## World Machine ##&#xD;&#xA;&#xD;&#xA;http://www.world-machine.com/&#xD;&#xA;&#xD;&#xA;World Machine has a non-commercial free version which only has a few limitations compared to the commercial version.  I can't speak highly enough about this software.&#xD;&#xA;&#xD;&#xA;Produces both a heightmap and texturemap procedurally.&#xD;&#xA;&#xD;&#xA;I used it to create the island and texturemap for this techdemo &#xD;&#xA;http://vimeo.com/dayoung/paradise&#xD;&#xA;&#xD;&#xA;&gt; Forget what you know about editing terrains. Unlike many other terrain editors that function like paint programs, World Machine operates on a procedural level. A World Machine world file is not the terrain, but the steps that creates the terrain. This is the source of both its power and its complexity.&#xD;&#xA;&#xD;&#xA;&gt;When working in World Machine, your role is to determine the overall appearance and characteristics of the terrain, and then allow the generators and effects to create and detail the appearance of your world. This way of working and thinking at a higher level takes some getting used to, but the rewards are huge: You can create impressive terrains with relatively little work, and once you have created a terrain that you like, you can use the same world file with different random &quot;seeds&quot; to produce a different terrain with the same feel." />
  <row Id="26879" PostHistoryTypeId="2" PostId="12292" RevisionGUID="53228225-763a-493f-bc27-8d604b08083f" CreationDate="2011-05-13T20:50:09.970" UserId="7345" Text="i want to create a big multiplayer world in UDK&#xD;&#xA;and im having a few difcultis&#xD;&#xA;1.i created the bigest terrian posible but then any terian related action i do takes forever but i have seen videos of people make same size terrain and working without a problem&#xD;&#xA;(my pc is defiantly strong enough) so maybe someone can tell me what im doing wrong&#xD;&#xA;&#xD;&#xA;2.i want to make it even bigger then the biggest terrain size&#xD;&#xA;so i was thinking of doing level streaming but then i read that thats working server side&#xD;&#xA;which means if i have a player on every terrain all terrains will still be loaded&#xD;&#xA;and i want to save as much memory possible so online will work well&#xD;&#xA;&#xD;&#xA;ill appreciate any help" />
  <row Id="26880" PostHistoryTypeId="1" PostId="12292" RevisionGUID="53228225-763a-493f-bc27-8d604b08083f" CreationDate="2011-05-13T20:50:09.970" UserId="7345" Text="creating big multiplayer world in UDK" />
  <row Id="26881" PostHistoryTypeId="3" PostId="12292" RevisionGUID="53228225-763a-493f-bc27-8d604b08083f" CreationDate="2011-05-13T20:50:09.970" UserId="7345" Text="&lt;mmo&gt;&lt;multiplayer&gt;&lt;terrain-rendering&gt;&lt;udk&gt;&lt;terrain&gt;" />
  <row Id="26882" PostHistoryTypeId="2" PostId="12293" RevisionGUID="54f81666-8652-49e5-8f0b-57ca7c093623" CreationDate="2011-05-13T20:50:24.453" UserId="7346" Text="I have some detailed articles on the Making of Crash Bandicoot at my blog:&#xD;&#xA;[Game Articles][1] or the first of the [Crash series][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://all-things-andy-gavin.com/category/games&#xD;&#xA;  [2]: http://all-things-andy-gavin.com/2011/02/02/making-crash-bandicoot-part-1/" />
  <row Id="26883" PostHistoryTypeId="16" PostId="12293" RevisionGUID="77231715-aad4-4331-83e8-7175274d818f" CreationDate="2011-05-13T20:50:24.453" UserId="7346" />
  <row Id="26884" PostHistoryTypeId="5" PostId="12291" RevisionGUID="46aea4f2-c738-4d63-a7be-4ecb61fe3838" CreationDate="2011-05-13T20:53:42.997" UserId="891" Comment="added 113 characters in body" Text="## World Machine ##&#xD;&#xA;&#xD;&#xA;http://www.world-machine.com/&#xD;&#xA;&#xD;&#xA;World Machine has a non-commercial free version which only has a few limitations compared to the commercial version.  I can't speak highly enough about this software.&#xD;&#xA;&#xD;&#xA;Produces both a heightmap and texturemap procedurally.&#xD;&#xA;&#xD;&#xA;I used it to create the island and texturemap for this techdemo &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![USC GamePipe Island Tech Demo &quot;Paradise&quot;][1]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Forget what you know about editing terrains. Unlike many other terrain editors that function like paint programs, World Machine operates on a procedural level. A World Machine world file is not the terrain, but the steps that creates the terrain. This is the source of both its power and its complexity.&#xD;&#xA;&#xD;&#xA;&gt;When working in World Machine, your role is to determine the overall appearance and characteristics of the terrain, and then allow the generators and effects to create and detail the appearance of your world. This way of working and thinking at a higher level takes some getting used to, but the rewards are huge: You can create impressive terrains with relatively little work, and once you have created a terrain that you like, you can use the same world file with different random &quot;seeds&quot; to produce a different terrain with the same feel.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/FLOON.png&#xD;&#xA;  [2]: http://vimeo.com/dayoung/paradise" />
  <row Id="26885" PostHistoryTypeId="25" PostId="12268" RevisionGUID="ce1c9773-1694-4ade-a4a1-a03cc80d4126" CreationDate="2011-05-13T21:12:03.980" Comment="http://twitter.com/#!/StackGameDev/status/69147921051942912" />
  <row Id="26886" PostHistoryTypeId="5" PostId="12263" RevisionGUID="df4353e5-8084-43d9-9cf5-adfd2d10de51" CreationDate="2011-05-13T21:25:38.577" UserId="3830" Comment="Reformatted to match other posts linking.  Least I could do for one of my favorite blogs :)" Text="**[The Bottom Feeder](http://jeff-vogel.blogspot.com/)**&#xD;&#xA;&#xD;&#xA;By jeff vogel. &#xD;&#xA;&#xD;&#xA;It's less about programming and more about game design and indie game developement in general. his company [spiderweb software](http://www.spiderwebsoftware.com/) published several very impressive old school rpgs (turn based combat, lots of text, uh, story).&#xD;&#xA;&#xD;&#xA;some recent examples:&#xD;&#xA;&#xD;&#xA;* [Three Rules For Difficulty In RPGs](http://jeff-vogel.blogspot.com/2011/02/three-rules-for-difficulty-in-rpgs.html)&#xD;&#xA;* [Three Reasons Creators Should Never Read Their Forums](http://jeff-vogel.blogspot.com/2011/01/three-reasons-creators-should-never.html)&#xD;&#xA;* [Should Games Sell For Donations? Or, Is Setting a Fixed Price For Losers?](http://jeff-vogel.blogspot.com/2010/10/should-games-sell-for-donations-or-is.html)" />
  <row Id="26887" PostHistoryTypeId="5" PostId="12270" RevisionGUID="101b3779-2105-43d2-b09a-b2d1cdfa7748" CreationDate="2011-05-13T21:26:40.400" UserId="3830" Comment="Main link reformatting to match style of other posts" Text="**[The Bottom Feeder](http://www.introversion.co.uk/blog)**&#xD;&#xA;&#xD;&#xA;Successful indie dev Introversion has made many in-depth posts about the development of their newest game, and some other posts about game development in general.  Definitely worth checking out, especially if you're interested in procedural generation.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="26888" PostHistoryTypeId="5" PostId="6929" RevisionGUID="a11a32b1-6be3-4192-99ea-6486e770ee91" CreationDate="2011-05-13T21:27:06.813" UserId="3830" Comment="added 4 characters in body" Text="**[TIGSource][1]** &#xD;&#xA;&#xD;&#xA;This is a prominent indie game dev community, with its own interesting RSS feed!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tigsource.com/" />
  <row Id="26889" PostHistoryTypeId="2" PostId="12294" RevisionGUID="beb634db-9921-4d54-aabd-04e30e45333c" CreationDate="2011-05-13T22:35:49.650" UserId="7350" Text="I'm making a javascript game engine for fun and one thing I noticed was that my laptop runs super hot with the simplest game mechanics and that my game is doing about 600 updates per second.&#xD;&#xA;&#xD;&#xA;The graphics is already capped at 60 fps, but I'm wondering if I should limit the update cycles so my processor doesn't get owned on the simplest games.&#xD;&#xA;&#xD;&#xA;I think the answer is yes, it is just that I've never heard of anyone doing this before, so I wanted others opinions." />
  <row Id="26890" PostHistoryTypeId="1" PostId="12294" RevisionGUID="beb634db-9921-4d54-aabd-04e30e45333c" CreationDate="2011-05-13T22:35:49.650" UserId="7350" Text="JS: Should I have an upper limit to the number of update cycles per sec?" />
  <row Id="26891" PostHistoryTypeId="3" PostId="12294" RevisionGUID="beb634db-9921-4d54-aabd-04e30e45333c" CreationDate="2011-05-13T22:35:49.650" UserId="7350" Text="&lt;engine&gt;&lt;javascript&gt;&lt;gameloop&gt;" />
  <row Id="26892" PostHistoryTypeId="2" PostId="12295" RevisionGUID="d035e5d5-570d-4cda-9d77-e51984cbad82" CreationDate="2011-05-13T22:48:29.250" UserId="2229" Text="I **export my 3D geometry** from a 3D authoring application. It is possible to export the vertex coordinates as full triangle arrays.&#xD;&#xA;&#xD;&#xA;On ther other hand, **triangle strips are more efficient** for the OpengGL to render. This is especially true for OpenGL ES, which is very sensitive for performance.&#xD;&#xA;&#xD;&#xA;**Is it therefore possible to convert GL_TRIANGLES arrays into GL_TRIANGLE_STRIP, please?**&#xD;&#xA;&#xD;&#xA;Could anybody provide me with working algorithm? Thank you." />
  <row Id="26893" PostHistoryTypeId="1" PostId="12295" RevisionGUID="d035e5d5-570d-4cda-9d77-e51984cbad82" CreationDate="2011-05-13T22:48:29.250" UserId="2229" Text="OpenGL ES 2.0: Converting GL_TRIANGLES into GL_TRIANGLE_STRIP" />
  <row Id="26894" PostHistoryTypeId="3" PostId="12295" RevisionGUID="d035e5d5-570d-4cda-9d77-e51984cbad82" CreationDate="2011-05-13T22:48:29.250" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;" />
  <row Id="26895" PostHistoryTypeId="2" PostId="12296" RevisionGUID="fcf8858a-e0ad-4dfb-94f3-5092a59c3a58" CreationDate="2011-05-13T23:04:46.370" UserId="7191" Text="Looks like you may have an answer here: [http://www.gamedev.net/topic/456455-convert-triangle-list-to-triangle-strip/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/456455-convert-triangle-list-to-triangle-strip/" />
  <row Id="26896" PostHistoryTypeId="2" PostId="12297" RevisionGUID="e72ecf76-093f-4014-93f2-9db8a8b8b0c3" CreationDate="2011-05-13T23:05:04.740" UserId="7136" Text="1) You need to think about a streaming solution, stream in and out parts of your level as you require them (radial streaming, streaming volumes, etc...)&#xD;&#xA;&#xD;&#xA;2) I think you need to rethink your plan.  Unreal isn't made to support the MMO type of games (it's one of your tags)." />
  <row Id="26897" PostHistoryTypeId="2" PostId="12298" RevisionGUID="2cc1badd-0e8d-4988-851b-ffdf15e821d2" CreationDate="2011-05-13T23:32:07.757" UserId="6813" Text="600 updates per second is far too much for any game I can think of.&#xD;&#xA;Some games require a very intensive update rate, but most of the games can do all they need to be done, with a 25-30 updates rate per second. (We speak about the game state updates, not about the display updates)&#xD;&#xA;&#xD;&#xA;There is different methods to limit the number of game state update per second...&#xD;&#xA;and as *Koen Witters* wrote a very interesting, clear and simple paper on this question I recommend you the following article: http://www.koonsolo.com/news/dewitters-gameloop/ instead of trying to explain myself the same ideas with my bad English ;)&#xD;&#xA;&#xD;&#xA;This paper will present you four approaches of game loops, and for each one it will expose the pros, the cons and explain how it can be done." />
  <row Id="26898" PostHistoryTypeId="5" PostId="12298" RevisionGUID="2feb2e53-0500-444b-8ec3-da38212bd5e5" CreationDate="2011-05-13T23:38:07.333" UserId="6813" Comment="added 3 characters in body; added 10 characters in body; deleted 1 characters in body" Text="600 updates per second is far too much for any game I can think of.&#xD;&#xA;Some games require a very intensive update rate, but most of the games can do all they need to be done, with a 25-30 update rate per second. (We speak about the game state updates, not about the display updates)&#xD;&#xA;&#xD;&#xA;There is different methods to limit the number of game state update per second...&#xD;&#xA;and as *Koen Witters* wrote a very interesting, clear and simple paper on this question I recommend you the following article ( http://www.koonsolo.com/news/dewitters-gameloop/ ) instead of trying to explain myself the same ideas with my approximative English ;)&#xD;&#xA;&#xD;&#xA;This paper will present you four approaches of game loops, and for each one it will expose the pros, the cons and explain how it can be done." />
  <row Id="26899" PostHistoryTypeId="2" PostId="12299" RevisionGUID="edf6e2da-c6cc-4a97-95fb-ce89b7e471d7" CreationDate="2011-05-14T00:03:02.890" UserId="7352" Text="The best book on the nitty gritty of graphics that I've found is Computer Graphics: Principles and Practice http://www.amazon.com/Computer-Graphics-Principles-James-Foley/dp/0201121107&#xD;&#xA;&#xD;&#xA;However, as this was written in the early 90s, it is a little out of date.&#xD;&#xA;&#xD;&#xA;Are there some similar books which go over the more recent developments?" />
  <row Id="26900" PostHistoryTypeId="1" PostId="12299" RevisionGUID="edf6e2da-c6cc-4a97-95fb-ce89b7e471d7" CreationDate="2011-05-14T00:03:02.890" UserId="7352" Text="What are some good books which detail the fundamentals of graphics processing?" />
  <row Id="26901" PostHistoryTypeId="3" PostId="12299" RevisionGUID="edf6e2da-c6cc-4a97-95fb-ce89b7e471d7" CreationDate="2011-05-14T00:03:02.890" UserId="7352" Text="&lt;graphics&gt;&lt;books&gt;" />
  <row Id="26902" PostHistoryTypeId="25" PostId="12295" RevisionGUID="7698f98c-e295-4633-a6db-d7e672757656" CreationDate="2011-05-14T00:12:04.460" Comment="http://twitter.com/#!/StackGameDev/status/69193220302700545" />
  <row Id="26903" PostHistoryTypeId="2" PostId="12300" RevisionGUID="4dfab1f2-8035-41bc-a572-39cc84e60c01" CreationDate="2011-05-14T00:20:15.020" UserId="891" Text="[Real-Time Rendering][1]&#xD;&#xA;-------------------&#xD;&#xA;&#xD;&#xA;*Not for the fient of heart.*&#xD;&#xA;&#xD;&#xA;![Real-Time Rendering][2]&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/ref=sr_1_1?ie=UTF8&amp;qid=1305332085&amp;sr=8-1&#xD;&#xA;  [2]: http://i.stack.imgur.com/QELOj.jpg" />
  <row Id="26904" PostHistoryTypeId="2" PostId="12301" RevisionGUID="a9b3d2a4-20ec-41eb-a5e1-6e26c690e03a" CreationDate="2011-05-14T01:12:28.123" UserId="4212" Text="You may want to look at some of the common javascript game loop patterns that exist.  Most folks use a timer to schedule the game loop.  This resource is excellent:&#xD;&#xA;http://codeofrob.com/archive/2011/03/17/a-javascript-game-loop-for-multiplayer-webgl.aspx&#xD;&#xA;&#xD;&#xA;If your game isn't multiplayer you can likely use what the author calls &quot;another naive game loop&quot;." />
  <row Id="26905" PostHistoryTypeId="2" PostId="12302" RevisionGUID="586e63ad-5157-44a9-82ea-188316ade583" CreationDate="2011-05-14T01:51:08.757" UserId="7353" Text="Jesse Schell's book is good, though it doesn't work for me strictly as a 'level design' book. What really helps is reading breakdowns of the level design of famous games; for example, try reading some articles about [Super Mario's level design](http://www.google.ca/search?aq=f&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=super+mario+level+design). In addition, a good thing I always remember from Schell's book and almost every game I've ever loved is to remember to give the player visual/auditory rewards for progress which don't need to impact the goal of the game (score). This just seems to increase the game's fun. :)" />
  <row Id="26906" PostHistoryTypeId="16" PostId="12302" RevisionGUID="211a11bb-695a-43bd-9833-d384d3b4bba7" CreationDate="2011-05-14T01:51:08.757" UserId="7353" />
  <row Id="26907" PostHistoryTypeId="16" PostId="12299" RevisionGUID="cbb68819-93b6-4242-a0bb-83d634eabaf9" CreationDate="2011-05-14T02:01:41.453" UserId="51" />
  <row Id="26908" PostHistoryTypeId="16" PostId="12300" RevisionGUID="8c5ade92-bf2e-4ba5-9689-456a10935398" CreationDate="2011-05-14T02:01:41.453" UserId="51" />
  <row Id="26909" PostHistoryTypeId="25" PostId="12299" RevisionGUID="ec1bd76a-4c06-4795-96cf-4cf6f7cefdee" CreationDate="2011-05-14T03:12:04.890" Comment="http://twitter.com/#!/StackGameDev/status/69238522262990848" />
  <row Id="26910" PostHistoryTypeId="2" PostId="12303" RevisionGUID="50901536-1188-4fcd-98df-d12c22467769" CreationDate="2011-05-14T03:27:09.160" UserId="2229" Text="Could I kindly ask, to suggest me a repository of **high quality OpenGL (OpenGL ES 2.0) vertex and fragment shaders**, please?&#xD;&#xA;&#xD;&#xA;I am looking for **pixel based ligting shaders** (such as **phong**) and simmilar. It would be nice to see more of them, to be able to choose between quality vs shader performance." />
  <row Id="26911" PostHistoryTypeId="1" PostId="12303" RevisionGUID="50901536-1188-4fcd-98df-d12c22467769" CreationDate="2011-05-14T03:27:09.160" UserId="2229" Text="OpenGL ES 2.0: Repository of Quality Shaders" />
  <row Id="26912" PostHistoryTypeId="3" PostId="12303" RevisionGUID="50901536-1188-4fcd-98df-d12c22467769" CreationDate="2011-05-14T03:27:09.160" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="26913" PostHistoryTypeId="25" PostId="12303" RevisionGUID="27cd1941-485f-4bf3-a985-8c8a4e7fc858" CreationDate="2011-05-14T06:12:04.670" Comment="http://twitter.com/#!/StackGameDev/status/69283819496280064" />
  <row Id="26914" PostHistoryTypeId="2" PostId="12304" RevisionGUID="9de518d6-5b94-4af3-b0b4-0411533cf9e2" CreationDate="2011-05-14T06:13:55.993" UserId="2229" Text="Could I kindly ask to **confirm**, that the **calculated normals are correct**, please? I have calculated them on my own, but my testcube is still strangely lighted within OpenGLES 2.0. &#xD;&#xA;&#xD;&#xA; - The **vertices** were exported from 3D authoring application.&#xD;&#xA; - The **vertex normals** were calculated using matrix cross product. &#xD;&#xA; - The **vertex and fragment shaders** I were exact copies from the book, so there should not be a bug.&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;The output in OpenGL looks like the sphere is lighted from its bottom. Moreover, it looks, like the box is visible from inside, as the top part is always transparent. Any idea, where can be a problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #begin 8 vertices&#xD;&#xA;    vs 24&#xD;&#xA;    v -25.000000 -25.000000 -25.000000&#xD;&#xA;    v 25.000000 -25.000000 -25.000000&#xD;&#xA;    v -25.000000 25.000000 -25.000000&#xD;&#xA;    v 25.000000 25.000000 -25.000000&#xD;&#xA;    v -25.000000 -25.000000 25.000000&#xD;&#xA;    v 25.000000 -25.000000 25.000000&#xD;&#xA;    v -25.000000 25.000000 25.000000&#xD;&#xA;    v 25.000000 25.000000 25.000000&#xD;&#xA;    #end 8 vertices&#xD;&#xA;           &#xD;&#xA;    #begin 12 faces&#xD;&#xA;    fs 36&#xD;&#xA;    f 0 2 3&#xD;&#xA;    f 0 3 1&#xD;&#xA;    f 0 1 5&#xD;&#xA;    f 0 5 4&#xD;&#xA;    f 0 4 6&#xD;&#xA;    f 0 6 2&#xD;&#xA;    f 1 3 7&#xD;&#xA;    f 1 7 5&#xD;&#xA;    f 2 6 7&#xD;&#xA;    f 2 7 3&#xD;&#xA;    f 4 5 7&#xD;&#xA;    f 4 7 6&#xD;&#xA;    #end 12 faces&#xD;&#xA;        &#xD;&#xA;    #begin 8 calculated normals&#xD;&#xA;    ns 24&#xD;&#xA;    n -0.577350 -0.577350 -0.577350&#xD;&#xA;    n 0.816497 -0.408248 -0.408248&#xD;&#xA;    n -0.408248 0.816497 -0.408248&#xD;&#xA;    n 0.408248 0.408248 -0.816497&#xD;&#xA;    n -0.408248 -0.408248 0.816497&#xD;&#xA;    n 0.408248 -0.816497 0.408248&#xD;&#xA;    n -0.816497 0.408248 0.408248&#xD;&#xA;    n 0.577350 0.577350 0.577350&#xD;&#xA;    #end 8 calculated normals&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*I use OpenGL ES 2.0, but that should not be relevant at this moment.*" />
  <row Id="26915" PostHistoryTypeId="1" PostId="12304" RevisionGUID="9de518d6-5b94-4af3-b0b4-0411533cf9e2" CreationDate="2011-05-14T06:13:55.993" UserId="2229" Text="OpenGL: Calculated Normals Verification Please" />
  <row Id="26916" PostHistoryTypeId="3" PostId="12304" RevisionGUID="9de518d6-5b94-4af3-b0b4-0411533cf9e2" CreationDate="2011-05-14T06:13:55.993" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;shaders&gt;" />
  <row Id="26917" PostHistoryTypeId="2" PostId="12305" RevisionGUID="0d772563-d4d0-4530-a0a0-02f48a411475" CreationDate="2011-05-14T06:29:35.417" UserId="5459" Text="When I was looking how to implement fog under OpenGL ES 2.0, I have found link to [OpenGL ES 2.0 backward compatible][1] project implementing functionality, which is not in OpenGL ES 2.0, For example fog, per vertex, per fragment(pixel) shading. You can look directly into [shaders source][2].&#xD;&#xA;&#xD;&#xA;I have been implementing per fragment lighting too, modifying this example created by [ClockworkCoders][3] (not OpenGL ES 2.0).&#xD;&#xA;&#xD;&#xA;You can also take a look on these great tutorials by [lighthouse3D][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/gles2-bc/&#xD;&#xA;  [2]: http://code.google.com/p/gles2-bc/source/browse/trunk/trunk/Sources/OpenGLES/OpenGLES20/?r=2#OpenGLES20/shaders&#xD;&#xA;  [3]: http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting.php&#xD;&#xA;  [4]: http://www.lighthouse3d.com/opengl/glsl/" />
  <row Id="26918" PostHistoryTypeId="4" PostId="12304" RevisionGUID="dc5e7148-6372-4c4f-a003-ae7a28237d5a" CreationDate="2011-05-14T06:31:26.073" UserId="2229" Comment="edited title" Text="OpenGL: Calculated Normals Verification" />
  <row Id="26919" PostHistoryTypeId="2" PostId="12306" RevisionGUID="a183238d-7158-42d5-86bb-b38bf71c92cb" CreationDate="2011-05-14T06:46:20.333" UserId="4897" Text="I doubt GL ES has geometry shaders but just in case it does (or if you can test your data on something with a full OpenGL 3 and above), [my answer to this question on SO][1] provides a geometry shader to visualize your normals. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4703432/why-does-my-opengl-phong-shader-behave-like-a-flat-shader/5143141#5143141" />
  <row Id="26920" PostHistoryTypeId="2" PostId="12307" RevisionGUID="e3ac1ad0-dbad-40ba-9016-f9dd6d6882f3" CreationDate="2011-05-14T07:21:54.400" UserId="6633" Text="I am making an iphone opengl es 1.0 game. I am using a fixed timestep with interpolation on the end. One thread only. I am using CADisplayLink to fire the game loop.&#xD;&#xA;&#xD;&#xA;First question: is it okay to use CADisplayLink to fire the game loop? i am targeting &gt; 3.1 so that's not an issue.&#xD;&#xA;&#xD;&#xA;Real question: What's the proper way to handle user touch input as it relates to my gameloop and adding state to my game. For example lets say when the user touches the screen i want to fire a bullet. I've read that I don't want to actually update my game state in my touch handler function. But I should instead record that touch in an array or something and then on the next gameloop update(dt) i go through the array and updated my game state based on the array items.&#xD;&#xA;&#xD;&#xA;is this correct? shouldn't i be storing a timestamp of each touch so i know exactly how to inject it into my game?" />
  <row Id="26921" PostHistoryTypeId="1" PostId="12307" RevisionGUID="e3ac1ad0-dbad-40ba-9016-f9dd6d6882f3" CreationDate="2011-05-14T07:21:54.400" UserId="6633" Text="How to handle input from user" />
  <row Id="26922" PostHistoryTypeId="3" PostId="12307" RevisionGUID="e3ac1ad0-dbad-40ba-9016-f9dd6d6882f3" CreationDate="2011-05-14T07:21:54.400" UserId="6633" Text="&lt;input&gt;&lt;gameloop&gt;" />
  <row Id="26924" PostHistoryTypeId="2" PostId="12309" RevisionGUID="7eb7387e-83de-4395-a76b-c38e227bc9c9" CreationDate="2011-05-14T07:57:07.447" UserId="1400" Text="First answer: AFAIK using the CADisplayLink should work just fine (I use it and haven't had a problem with it yet).  The CADisplayLink simply makes sure that your OpenGL view only receives update calls when the hardware is ready for a new frame.  Based on your assumptions, however, this may make your game skip or lag at some points.  You may consider moving to a variable-step time-based approach to smoothly update your game between frames (example can be found [here][1]).&#xD;&#xA;&#xD;&#xA;Real answer: This is a tough one to answer directly, as everyone has their own opinion on how this works.  In general, I would say yes: place the input events into a queue that is processed at the end of every frame.  This ensures a few things: 1) user input is processed in the same order it was received; 2) input processing is executed at a known point in time, making mutation of iterated arrays and other potential hazards a non-issue; 3) significantly cuts down on input-related bugs as you now have a single point in your update loop that you can easily step through to see what's happening.&#xD;&#xA;&#xD;&#xA;I'm sure there are some who disagree, but this approach has worked well for me in the past, especially for keystrokes and other state-based input.  Please let me know what approach you decide to take and if this answer helped out.  Until then, good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sacredsoftware.net/tutorials/Animation/TimeBasedAnimation.xhtml" />
  <row Id="26925" PostHistoryTypeId="2" PostId="12310" RevisionGUID="0b3c75d4-2332-4af7-a83f-3055546d9c03" CreationDate="2011-05-14T07:59:53.333" UserId="3644" Text="Say I'm having a multiplayer RTS game. There's a main server for each individual game and several clients connected to it. All packets are sent to server first and then server retransmits them back to specified clients.&#xD;&#xA;&#xD;&#xA;I'm thinking of 2 ways:&#xD;&#xA;&#xD;&#xA;* List of **Client-Server** pings, which will be the same, no matter which Client asked for it&#xD;&#xA;* List of **Client-Client** pings, which will vary for every Client&#xD;&#xA;&#xD;&#xA;My question is how should I calculate and display ping info to players?&#xD;&#xA;&#xD;&#xA;_I will add more details to my question if necessary_" />
  <row Id="26926" PostHistoryTypeId="1" PostId="12310" RevisionGUID="0b3c75d4-2332-4af7-a83f-3055546d9c03" CreationDate="2011-05-14T07:59:53.333" UserId="3644" Text="How should I display ping in a server-based multiplayer?" />
  <row Id="26927" PostHistoryTypeId="3" PostId="12310" RevisionGUID="0b3c75d4-2332-4af7-a83f-3055546d9c03" CreationDate="2011-05-14T07:59:53.333" UserId="3644" Text="&lt;multiplayer&gt;&lt;client-server&gt;&lt;ping&gt;" />
  <row Id="26928" PostHistoryTypeId="4" PostId="12310" RevisionGUID="d947f171-5f9f-4c4b-8f55-87e5a50aba29" CreationDate="2011-05-14T08:20:50.603" UserId="3644" Comment="edited title" Text="How should I display ping in a client-server-client multiplayer?" />
  <row Id="26929" PostHistoryTypeId="2" PostId="12311" RevisionGUID="a1578b50-1259-4e52-a45e-3d3a8baec60a" CreationDate="2011-05-14T08:21:39.397" UserId="1400" Text="Client to Server ping:  This one's pretty easy.  Simply timestamp your packets and find the difference between the times when the packets arrive.  Take the average of these times over some period (say 1 second) and that's your lag from Client to Server.  As far as display, that's totally up to you and your game layout.  In general, it's a good idea to display lag as part of the &quot;score breakdown&quot; screen, where each player's public information can be accessed.  Also, you may consider color-coding lag levels; such as green for &lt;100ms, yellow for &lt;200ms, and red for 200ms+.&#xD;&#xA;&#xD;&#xA;Client to Client ping:  I'm not sure this is implemented very often, and probably for good reason: it's unimportant.  Actually, ideally, there is no Client to Client ping because there is no Client to Client interaction; all interaction takes place on the Server.  If you did have Clients connecting to each other, you would probably display that information in much the same way you would as a Client to Server connection.  However, if you wanted to display ALL of the pings between ALL of the Clients, a table would work.&#xD;&#xA;&#xD;&#xA;Hope that helps!" />
  <row Id="26930" PostHistoryTypeId="25" PostId="12307" RevisionGUID="3bb21e16-2954-4543-8a3a-9d9ebe0553b8" CreationDate="2011-05-14T09:12:04.670" Comment="http://twitter.com/#!/StackGameDev/status/69329117664903168" />
  <row Id="26932" PostHistoryTypeId="6" PostId="12307" RevisionGUID="851cbe51-8e14-40bb-9e4a-c16894288b1f" CreationDate="2011-05-14T09:13:48.677" UserId="51" Comment="edited tags" Text="&lt;iphone&gt;&lt;input&gt;&lt;gameloop&gt;" />
  <row Id="26933" PostHistoryTypeId="5" PostId="12265" RevisionGUID="ed7a0611-920d-4af3-9532-d616595f65a5" CreationDate="2011-05-14T09:23:15.670" UserId="20" Comment="added links" Text="I will add a vote for [mochi][1] and [kongregate][2]. They both have very simple to integrate highscore lists, and are both free.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mochimedia.com/developers/scores.html&#xD;&#xA;  [2]: http://www.kongregate.com/developer_center/docs/kongregate-api" />
  <row Id="26934" PostHistoryTypeId="2" PostId="12312" RevisionGUID="ad8cdec9-78b6-4d62-9023-df1283d45b8e" CreationDate="2011-05-14T10:09:52.087" UserId="4410" Text="Without a picture I'll have a rough guess on some of your problems.&#xD;&#xA;&#xD;&#xA;Normals: If this is a cube, I'd expect all the normal component values to be +/- 0.577350 in different combinations depending on the vertex. Where you have other values the normal is no longer being properly averaged from the three faces that share it and it'll be tending more in one direction. Because you're using shared vertices for the faces then despite it being a cube, it's trying to be lit as if it's a sphere. If you wanted it to look like an actual cube you'll need to duplicate up the vertices and have unique normals for them.&#xD;&#xA;&#xD;&#xA;&quot;visible from inside&quot;: This sounds like a winding order issue. Graphics hardware tends to have [Backface Culling][1] enabled as a speed optimisation, depending on the order of the vertices given to the hardware it makes a decision as to whether it thinks a polygon faces towards or away from the viewer. It's possible you can fix this problem by changing the order of the vertices in your faces, so the first face would become &quot;0 3 2&quot; instead of &quot;0 2 3&quot;.&#xD;&#xA;&#xD;&#xA;A picture of the output would help to be more specific, as would a more accurate description of what problems you actually have, for example, you say it's lit from below, is this a problem or was that just stating how it looks?&#xD;&#xA;&#xD;&#xA;Quick update:&#xD;&#xA;&#xD;&#xA;You can display the normals manually by drawing some simple lines, just use the vertex position as the start point, then add the normal value (scaled by some constant factor to ensure it's the length you want) and add this to the original vertex position to generate an end point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Back-face_culling" />
  <row Id="26935" PostHistoryTypeId="25" PostId="12304" RevisionGUID="f9b5ed59-1ce1-4f45-9228-136805fbf71f" CreationDate="2011-05-14T12:12:05.053" Comment="http://twitter.com/#!/StackGameDev/status/69374418438197248" />
  <row Id="26936" PostHistoryTypeId="5" PostId="12298" RevisionGUID="51df2cae-60d6-4d09-b99c-8c16988ff0b2" CreationDate="2011-05-14T13:32:26.300" UserId="1198" Comment="deleted 10 characters in body" Text="600 updates per second is far too much for any game I can think of.&#xD;&#xA;Some games require a very intensive update rate, but most of the games can do all they need to be done, with a 25-30 update rate per second. (We speak about the game state updates, not about the display updates)&#xD;&#xA;&#xD;&#xA;There is different methods to limit the number of game state update per second...&#xD;&#xA;and as *Koen Witters* wrote a very interesting, clear and simple paper on this question I recommend you the following article ( http://www.koonsolo.com/news/dewitters-gameloop/ ) instead of trying to explain myself the same ideas with my approximative English ;)&#xD;&#xA;&#xD;&#xA;This paper will present you four approaches of game loops, and for each one it will expose the pros, the cons and explain how it can be done." />
  <row Id="26940" PostHistoryTypeId="25" PostId="12310" RevisionGUID="2fd0b0ec-7da8-4fed-a46f-7ba5972350e2" CreationDate="2011-05-14T15:12:05.643" Comment="http://twitter.com/#!/StackGameDev/status/69419717844152320" />
  <row Id="26941" PostHistoryTypeId="5" PostId="12304" RevisionGUID="e3c69d0d-6c16-4100-a784-b65f0e181eae" CreationDate="2011-05-14T15:40:25.833" UserId="2229" Comment="added more information" Text="Could I kindly ask to **confirm**, that the **calculated normals are correct**, please? I have calculated them on my own, but my testcube is still strangely lighted within OpenGLES 2.0. &#xD;&#xA;&#xD;&#xA; - The **vertices** were exported from 3D authoring application.&#xD;&#xA; - The **vertex normals** were calculated using matrix cross product. &#xD;&#xA; - The **vertex and fragment shaders** I were exact copies from the book, so there should not be a bug.&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;The output in OpenGL looks like the sphere is lighted from its bottom. Moreover, it looks, like the box is visible from inside, as the top part is always transparent. Any idea, where can be a problem?&#xD;&#xA;&#xD;&#xA;Added:&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;The vertex normals are calculated based on **triangulated** quad-polygons. The triangulation is performed internally, by the 3d application. Vertices/ indices are generated by calling API calls of that application.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #begin 8 vertices&#xD;&#xA;    vs 24&#xD;&#xA;    v -25.000000 -25.000000 -25.000000&#xD;&#xA;    v 25.000000 -25.000000 -25.000000&#xD;&#xA;    v -25.000000 25.000000 -25.000000&#xD;&#xA;    v 25.000000 25.000000 -25.000000&#xD;&#xA;    v -25.000000 -25.000000 25.000000&#xD;&#xA;    v 25.000000 -25.000000 25.000000&#xD;&#xA;    v -25.000000 25.000000 25.000000&#xD;&#xA;    v 25.000000 25.000000 25.000000&#xD;&#xA;    #end 8 vertices&#xD;&#xA;           &#xD;&#xA;    #begin 12 faces&#xD;&#xA;    fs 36&#xD;&#xA;    f 0 2 3&#xD;&#xA;    f 0 3 1&#xD;&#xA;    f 0 1 5&#xD;&#xA;    f 0 5 4&#xD;&#xA;    f 0 4 6&#xD;&#xA;    f 0 6 2&#xD;&#xA;    f 1 3 7&#xD;&#xA;    f 1 7 5&#xD;&#xA;    f 2 6 7&#xD;&#xA;    f 2 7 3&#xD;&#xA;    f 4 5 7&#xD;&#xA;    f 4 7 6&#xD;&#xA;    #end 12 faces&#xD;&#xA;        &#xD;&#xA;    #begin 8 calculated normals&#xD;&#xA;    ns 24&#xD;&#xA;    n -0.577350 -0.577350 -0.577350&#xD;&#xA;    n 0.816497 -0.408248 -0.408248&#xD;&#xA;    n -0.408248 0.816497 -0.408248&#xD;&#xA;    n 0.408248 0.408248 -0.816497&#xD;&#xA;    n -0.408248 -0.408248 0.816497&#xD;&#xA;    n 0.408248 -0.816497 0.408248&#xD;&#xA;    n -0.816497 0.408248 0.408248&#xD;&#xA;    n 0.577350 0.577350 0.577350&#xD;&#xA;    #end 8 calculated normals&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*I use OpenGL ES 2.0, but that should not be relevant at this moment.*" />
  <row Id="26942" PostHistoryTypeId="2" PostId="12314" RevisionGUID="ccc4d6d2-cbc7-4915-a7c0-809f9fb2529b" CreationDate="2011-05-14T16:28:17.227" UserId="1430" Text="Shaders of any complexity aren't generally the kind of thing you can download and drop in to your project like interchangeable cogs. Typically the more interesting effects require a fair bit of coupling to the CPU-side rendering subsystem in order to achieve their results. The same is generally true of performance -- performance tradeoffs with respect to accuracy and quality over instruction count or pipelining tend to be rooted in application-specific requirements.&#xD;&#xA;&#xD;&#xA;As a result there really isn't much in the way of the kind of repositories you are thinking of. The GPU Gems books offer a good collection of cookbook-style descriptions of techniques with both game and shaded code examples that you may want to take a look at, though. So do the Shader X books." />
  <row Id="26943" PostHistoryTypeId="5" PostId="12304" RevisionGUID="7b6ba6d7-b06a-4f48-9c9e-868fc53801e9" CreationDate="2011-05-14T17:27:42.543" UserId="2229" Comment="added more information; added 4 characters in body" Text="Could I kindly ask to **confirm**, that the **calculated normals are correct**, please? I have calculated them on my own, but my testcube is still strangely lighted within OpenGLES 2.0. &#xD;&#xA;&#xD;&#xA; - The **vertices** were exported from 3D authoring application.&#xD;&#xA; - The **vertex normals** were calculated using matrix cross product. &#xD;&#xA; - The **vertex and fragment shaders** I were exact copies from the book, so there should not be a bug.&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;The output in OpenGL looks like the sphere is lighted from its bottom. Moreover, it looks, like the box is visible from inside, as the top part is always transparent. Any idea, where can be a problem?&#xD;&#xA;&#xD;&#xA;Added:&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;The vertex normals are calculated based on **triangulated** quad-polygons. The triangulation is performed internally, by the 3d application. Vertices/ indices are generated by calling API calls of that application.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #begin 8 vertices&#xD;&#xA;    vs 24&#xD;&#xA;    v -25.000000 -25.000000 -25.000000&#xD;&#xA;    v 25.000000 -25.000000 -25.000000&#xD;&#xA;    v -25.000000 25.000000 -25.000000&#xD;&#xA;    v 25.000000 25.000000 -25.000000&#xD;&#xA;    v -25.000000 -25.000000 25.000000&#xD;&#xA;    v 25.000000 -25.000000 25.000000&#xD;&#xA;    v -25.000000 25.000000 25.000000&#xD;&#xA;    v 25.000000 25.000000 25.000000&#xD;&#xA;    #end 8 vertices&#xD;&#xA;           &#xD;&#xA;    #begin 12 faces&#xD;&#xA;    fs 36&#xD;&#xA;    f 0 2 3&#xD;&#xA;    f 0 3 1&#xD;&#xA;    f 0 1 5&#xD;&#xA;    f 0 5 4&#xD;&#xA;    f 0 4 6&#xD;&#xA;    f 0 6 2&#xD;&#xA;    f 1 3 7&#xD;&#xA;    f 1 7 5&#xD;&#xA;    f 2 6 7&#xD;&#xA;    f 2 7 3&#xD;&#xA;    f 4 5 7&#xD;&#xA;    f 4 7 6&#xD;&#xA;    #end 12 faces&#xD;&#xA;        &#xD;&#xA;    #begin 8 calculated normals&#xD;&#xA;    ns 24&#xD;&#xA;    n -0.577350 -0.577350 -0.577350&#xD;&#xA;    n 0.816497 -0.408248 -0.408248&#xD;&#xA;    n -0.408248 0.816497 -0.408248&#xD;&#xA;    n 0.408248 0.408248 -0.816497&#xD;&#xA;    n -0.408248 -0.408248 0.816497&#xD;&#xA;    n 0.408248 -0.816497 0.408248&#xD;&#xA;    n -0.816497 0.408248 0.408248&#xD;&#xA;    n 0.577350 0.577350 0.577350&#xD;&#xA;    #end 8 calculated normals&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*I use OpenGL ES 2.0, but that should not be relevant at this moment.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;I can confirm now, that the **calculated vertex normals are correct**, and can therefore be used by others, to verify correctness of their triangulated cube vertex normals calculations.&#xD;&#xA;&#xD;&#xA;However, I still have a problem that all the **vertices, which are in positive z axis, are not rendered**. Not sure if they are culled, but I have pretty large frustum. Vertices in the -z axis are kept, so the rendered mesh looks like cut in half, as it is position in 0 z-axis.&#xD;&#xA;&#xD;&#xA;This lines below show that I should not concsicously setup small render area:&#xD;&#xA;&#xD;&#xA;    mProjection = glm::perspective (45.0f, (float)WINDOW_WIDTH / (float)WINDOW_HEIGHT, 1130.0f, -1130.0f);&#xD;&#xA;    &#xD;&#xA;    mViewTransformation = glm::lookAt(glm::vec3(vIntCamera.x, vIntCamera.y, 1130.0f), glm::vec3(vIntCamera.x, vIntCamera.y, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Any ideas, please, what else should I check?**" />
  <row Id="26944" PostHistoryTypeId="4" PostId="12304" RevisionGUID="4d414d3e-7729-4d34-9f7b-49165de436ba" CreationDate="2011-05-14T17:39:01.113" UserId="2229" Comment="edited title" Text="OpenGL: Calculated Cube Vertex Normals Verification" />
  <row Id="26945" PostHistoryTypeId="2" PostId="12315" RevisionGUID="bd2007d0-9548-4ed6-8f9f-72b0020adac0" CreationDate="2011-05-14T17:46:39.643" UserId="7363" Text="As the web browsers evolve, HTML5 game development with JavaScript, Canvas, webgl is increasingly becoming popular. The advantage of web-based games compared to native apps is that they run on multiple platforms, and you don't have to fiddle with OS-specific libraries or programming environments.&#xD;&#xA;&#xD;&#xA;You can already sell your web games via the [chrome web store][1], but I think it's too unpopular yet for being profitable for indie game developers. &#xD;&#xA;&#xD;&#xA;I think you may reach a larger crowd by selling your games at the Mac App Store or Steam, but therefore you have to bundle it as standalone application. &#xD;&#xA;&#xD;&#xA;For mac, you can easily bundle your HTML5 games as native app by using the Apple's WebView component. [Here is an example on how to do that][2].&#xD;&#xA;&#xD;&#xA;Now I wonder: is there an equivalent way for Windows platform?&#xD;&#xA;&#xD;&#xA;  [1]: https://chrome.google.com/webstore&#xD;&#xA;  [2]: http://blog.lostdecadegames.com/how-to-embed-html5-into-a-native-mac-osx-app" />
  <row Id="26946" PostHistoryTypeId="1" PostId="12315" RevisionGUID="bd2007d0-9548-4ed6-8f9f-72b0020adac0" CreationDate="2011-05-14T17:46:39.643" UserId="7363" Text="How to bundle a HTML5 JavaScript game as native Windows application?" />
  <row Id="26947" PostHistoryTypeId="3" PostId="12315" RevisionGUID="bd2007d0-9548-4ed6-8f9f-72b0020adac0" CreationDate="2011-05-14T17:46:39.643" UserId="7363" Text="&lt;html5&gt;" />
  <row Id="26948" PostHistoryTypeId="25" PostId="12315" RevisionGUID="9be88b9f-cf47-47da-88a6-f482d425243f" CreationDate="2011-05-14T18:12:06.487" Comment="http://twitter.com/#!/StackGameDev/status/69465019934441472" />
  <row Id="26949" PostHistoryTypeId="2" PostId="12316" RevisionGUID="8725c9a8-9936-4abd-8f37-166edc117324" CreationDate="2011-05-14T18:15:54.783" UserId="3644" Text="Say I'm having a multiplayer RTS game. There's a main server for each individual game and several clients connected to it. All packets are sent to server first and then server retransmits them back to clients.&#xD;&#xA;&#xD;&#xA;Say Server is located in one time-zone and all of the clients are in different time-zones. &#xD;&#xA;ClientA send a text message in chat at 12:03, what times should be stamped for other clients? Should his message be uniformely timestamped by Server (12:02) or each client should timestamp the message whenever it is recieved (12:04, 16:04, 03:03, etc..). Bear in mind, that all the messages are to be in the same order on all clients, server takes care of that.&#xD;&#xA;&#xD;&#xA;So thats the question - use local time for each client or use global server time to timestamp chat messages?" />
  <row Id="26950" PostHistoryTypeId="1" PostId="12316" RevisionGUID="8725c9a8-9936-4abd-8f37-166edc117324" CreationDate="2011-05-14T18:15:54.783" UserId="3644" Text="What time to display in text messages in multiplayer game?" />
  <row Id="26951" PostHistoryTypeId="3" PostId="12316" RevisionGUID="8725c9a8-9936-4abd-8f37-166edc117324" CreationDate="2011-05-14T18:15:54.783" UserId="3644" Text="&lt;multiplayer&gt;&lt;client-server&gt;&lt;time-management&gt;" />
  <row Id="26952" PostHistoryTypeId="5" PostId="12304" RevisionGUID="0895fc37-a236-43c2-b2ed-9aa4710e906e" CreationDate="2011-05-14T18:30:10.787" UserId="2229" Comment="added update" Text="Could I kindly ask to **confirm**, that the **calculated normals are correct**, please? I have calculated them on my own, but my testcube is still strangely lighted within OpenGLES 2.0. &#xD;&#xA;&#xD;&#xA; - The **vertices** were exported from 3D authoring application.&#xD;&#xA; - The **vertex normals** were calculated using matrix cross product. &#xD;&#xA; - The **vertex and fragment shaders** I were exact copies from the book, so there should not be a bug.&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;The output in OpenGL looks like the sphere is lighted from its bottom. Moreover, it looks, like the box is visible from inside, as the top part is always transparent. Any idea, where can be a problem?&#xD;&#xA;&#xD;&#xA;Added:&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;The vertex normals are calculated based on **triangulated** quad-polygons. The triangulation is performed internally, by the 3d application. Vertices/ indices are generated by calling API calls of that application.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #begin 8 vertices&#xD;&#xA;    vs 24&#xD;&#xA;    v -25.000000 -25.000000 -25.000000&#xD;&#xA;    v 25.000000 -25.000000 -25.000000&#xD;&#xA;    v -25.000000 25.000000 -25.000000&#xD;&#xA;    v 25.000000 25.000000 -25.000000&#xD;&#xA;    v -25.000000 -25.000000 25.000000&#xD;&#xA;    v 25.000000 -25.000000 25.000000&#xD;&#xA;    v -25.000000 25.000000 25.000000&#xD;&#xA;    v 25.000000 25.000000 25.000000&#xD;&#xA;    #end 8 vertices&#xD;&#xA;           &#xD;&#xA;    #begin 12 faces&#xD;&#xA;    fs 36&#xD;&#xA;    f 0 2 3&#xD;&#xA;    f 0 3 1&#xD;&#xA;    f 0 1 5&#xD;&#xA;    f 0 5 4&#xD;&#xA;    f 0 4 6&#xD;&#xA;    f 0 6 2&#xD;&#xA;    f 1 3 7&#xD;&#xA;    f 1 7 5&#xD;&#xA;    f 2 6 7&#xD;&#xA;    f 2 7 3&#xD;&#xA;    f 4 5 7&#xD;&#xA;    f 4 7 6&#xD;&#xA;    #end 12 faces&#xD;&#xA;        &#xD;&#xA;    #begin 8 calculated normals&#xD;&#xA;    ns 24&#xD;&#xA;    n -0.577350 -0.577350 -0.577350&#xD;&#xA;    n 0.816497 -0.408248 -0.408248&#xD;&#xA;    n -0.408248 0.816497 -0.408248&#xD;&#xA;    n 0.408248 0.408248 -0.816497&#xD;&#xA;    n -0.408248 -0.408248 0.816497&#xD;&#xA;    n 0.408248 -0.816497 0.408248&#xD;&#xA;    n -0.816497 0.408248 0.408248&#xD;&#xA;    n 0.577350 0.577350 0.577350&#xD;&#xA;    #end 8 calculated normals&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*I use OpenGL ES 2.0, but that should not be relevant at this moment.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;I can confirm now, that the **calculated vertex normals are correct**, and can therefore be used by others, to verify correctness of their triangulated cube vertex normals calculations.&#xD;&#xA;&#xD;&#xA;However, I still have a problem that all the **vertices, which are in positive z axis, are not rendered**. Not sure if they are culled, but I have pretty large frustum. Vertices in the -z axis are kept, so the rendered mesh looks like cut in half, as it is position in 0 z-axis.&#xD;&#xA;&#xD;&#xA;This lines below show that I should not concsicously setup small render area:&#xD;&#xA;&#xD;&#xA;    mProjection = glm::perspective (45.0f, (float)WINDOW_WIDTH / (float)WINDOW_HEIGHT, 1130.0f, -1130.0f);&#xD;&#xA;    &#xD;&#xA;    mViewTransformation = glm::lookAt(glm::vec3(vIntCamera.x, vIntCamera.y, 1130.0f), glm::vec3(vIntCamera.x, vIntCamera.y, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Any ideas, please, what else should I check?**&#xD;&#xA;&#xD;&#xA;Solved:&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;Eye position of the camera (in glm::lookAt() function) should be above the top of the perspective frustum, defined by glm::perspective().&#xD;&#xA;&#xD;&#xA;Thanks for your support guys, especially with the upper part of my question." />
  <row Id="26953" PostHistoryTypeId="2" PostId="12317" RevisionGUID="c790f2c0-aa3f-4400-adb6-1d0043c0cb61" CreationDate="2011-05-14T19:19:35.467" UserId="5508" Text="Since you use a central server, the server will keep track of game events and clients will sync their state with the server state. When a message is received by the server at 12:02, the message should show up at the client as being sent at 12:02. However, when dealing with different timezones, you want the client to display local times. This is more convenient and natural to read for the user, as he does not need to think about all the time differences.&#xD;&#xA;&#xD;&#xA;The approach I would recommend is timestamping each message in UTC (a method for creating an UTC timestamp is present in almost every class or system library). When the client has to display the message time, the time is converted to the local time zone before being rendered to the screen." />
  <row Id="26954" PostHistoryTypeId="2" PostId="12318" RevisionGUID="d6b16a1e-e905-4d5a-be37-384b8ff864f7" CreationDate="2011-05-14T20:04:48.207" UserId="7281" Text="I've already programmed a 2d based collision system for a previous game. It was my first collision system and it was ugly. I was looking for collision between objects by checking all objects with all objects. I've already heard about a grid system with cells where an object will only look the collision with other objects from its current cell(s). Is it really a good way to check collision? &#xD;&#xA;&#xD;&#xA;I'd like to have a good technique to loop trough all my items in a 3d world. " />
  <row Id="26955" PostHistoryTypeId="1" PostId="12318" RevisionGUID="d6b16a1e-e905-4d5a-be37-384b8ff864f7" CreationDate="2011-05-14T20:04:48.207" UserId="7281" Text="Best/Efficient way to implement a 3d Collision." />
  <row Id="26956" PostHistoryTypeId="3" PostId="12318" RevisionGUID="d6b16a1e-e905-4d5a-be37-384b8ff864f7" CreationDate="2011-05-14T20:04:48.207" UserId="7281" Text="&lt;collision-detection&gt;" />
  <row Id="26957" PostHistoryTypeId="2" PostId="12319" RevisionGUID="f1ddd45a-095f-423f-9923-a82100a3cbb7" CreationDate="2011-05-14T20:28:41.247" UserId="2229" Text="I woud like to **move an object along a curve**. At particular points on the curve, I wish the object to change speed and rotate itself along its axis.&#xD;&#xA;&#xD;&#xA;Imagine an airplane flying to a destination. It has its path, it must follow, plus, it adjusts its speed and orientation all the way (heading, pith, bank).&#xD;&#xA;&#xD;&#xA;*Could I kindly ask for a **startup information** on the following:*&#xD;&#xA;&#xD;&#xA; - What **kind of curves** to use to smoothly interpolate an object&#xD;&#xA; - What **formulas** to use for reliable interpolation, where I could control the speed of moving oject, and the transition between curve knots would be seamless&#xD;&#xA; - What **information** should be **exported** from a 3D authoring application&#xD;&#xA; - Should I use quaternions **slerp()** for this?&#xD;&#xA;&#xD;&#xA;If you know about a **book that covers this topic efficiently**, that would hlep the most. Thank you." />
  <row Id="26958" PostHistoryTypeId="1" PostId="12319" RevisionGUID="f1ddd45a-095f-423f-9923-a82100a3cbb7" CreationDate="2011-05-14T20:28:41.247" UserId="2229" Text="Moving an Object along a Curve and Rotating it" />
  <row Id="26959" PostHistoryTypeId="3" PostId="12319" RevisionGUID="f1ddd45a-095f-423f-9923-a82100a3cbb7" CreationDate="2011-05-14T20:28:41.247" UserId="2229" Text="&lt;game-design&gt;&lt;math&gt;&lt;game-mechanics&gt;&lt;animation&gt;&lt;quaternion&gt;" />
  <row Id="26960" PostHistoryTypeId="6" PostId="12319" RevisionGUID="14d5b885-f3c7-4f5d-af46-e505c6d01122" CreationDate="2011-05-14T20:32:07.203" UserId="51" Comment="edited tags" Text="&lt;math&gt;&lt;game-mechanics&gt;&lt;animation&gt;&lt;quaternion&gt;" />
  <row Id="26961" PostHistoryTypeId="4" PostId="12319" RevisionGUID="846f98e6-edca-4d50-92d5-e18322b735c3" CreationDate="2011-05-14T20:32:46.237" UserId="2229" Comment="edited title" Text="Moving an Object along a Curve while Rotating it" />
  <row Id="26962" PostHistoryTypeId="2" PostId="12320" RevisionGUID="d7706ba1-b1a0-4c0b-a784-5c652362ca01" CreationDate="2011-05-14T20:37:52.970" UserId="5224" Text="You're going to need a good space-partitioning algorithm, commonly used in 3D are [octrees][1]. &#xD;&#xA;&#xD;&#xA;After that you could surround models etc with bounding spheres in which they fit neatly because a collision between bounding spheres is very easy to calculate. After you know that two bounding spheres collide you can either iteratively make the bounding spheres smaller and adding bounding spheres to keep the object covered in them, or us another smart algorithm to calculate collisions between two complex objects.&#xD;&#xA;&#xD;&#xA;See this image: ![multiple bounding spheres][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Octree&#xD;&#xA;  [2]: http://i.stack.imgur.com/vOGLU.jpg" />
  <row Id="26963" PostHistoryTypeId="4" PostId="12304" RevisionGUID="987f32c1-1940-4115-8e97-5d80a6dcb0b8" CreationDate="2011-05-14T20:48:47.737" UserId="2229" Comment="edited title" Text="OpenGL ES 2.0: Calculated Cube Vertex Normals Verification" />
  <row Id="26967" PostHistoryTypeId="25" PostId="12318" RevisionGUID="5dd31d75-e21b-49d7-ad2e-f5636d3430dc" CreationDate="2011-05-14T21:12:06.853" Comment="http://twitter.com/#!/StackGameDev/status/69510320669999104" />
  <row Id="26968" PostHistoryTypeId="5" PostId="12319" RevisionGUID="b83e08cc-09db-41c9-9fcc-1fd6491e85c4" CreationDate="2011-05-14T21:19:44.447" UserId="2229" Comment="deleted 1 characters in body" Text="I woud like to **move an object along a curve**. At particular points on the curve, I wish the object to change speed and rotate itself along its axis.&#xD;&#xA;&#xD;&#xA;Imagine an airplane flying to a destination. It has its path it must follow, plus, it adjusts its speed and orientation all the way (heading, pith, bank).&#xD;&#xA;&#xD;&#xA;*Could I kindly ask for a **startup information** on the following:*&#xD;&#xA;&#xD;&#xA; - What **kind of curves** to use to smoothly interpolate an object&#xD;&#xA; - What **formulas** to use for reliable interpolation, where I could control the speed of moving oject, and the transition between curve knots would be seamless&#xD;&#xA; - What **information** should be **exported** from a 3D authoring application&#xD;&#xA; - Should I use quaternions **slerp()** for this?&#xD;&#xA;&#xD;&#xA;If you know about a **book that covers this topic efficiently**, that would hlep the most. Thank you." />
  <row Id="26969" PostHistoryTypeId="2" PostId="12322" RevisionGUID="929f79f5-fb19-46cb-8fe6-ca568199bc6e" CreationDate="2011-05-14T21:20:13.853" UserId="4235" Text="Ultimately I think the answer to your question is going to depend upon the needs of your particular application, as there isn't a one-size-fits all solution. Additionally, there are a good deal of difficult mathematical and conceptual problems involved in creating your own collision detection system, which is going to require much patience, reading, and thinking. Although there are a number of decent resources on the web, you'll save yourself a lot of time and frustration by picking up Christer Ericson's [Real-time Collision Detection][1], which lays out in great detail a wide variety of techniques and algorithms, with example C++ code. &#xD;&#xA;&#xD;&#xA;I'd recommend also taking baby steps before jumping into trying to build a grand system. Try to write a function to determine if a point is in a plane, then if a point is in a triangle, if a ray is in a triangle, etc. Then move onto static tests of various convex solids: AABB vs. Triangle, etc. With time things that seem impenetrable (forgive the pun) at first will become less daunting. Here is a listing of a good number of tests, with example code:&#xD;&#xA;&#xD;&#xA;http://www.realtimerendering.com/intersections.html&#xD;&#xA;&#xD;&#xA;In the meantime, since I know not everyone can just fork out 70-80$ for a book at will, here are some terms you might want to look into:&#xD;&#xA;&#xD;&#xA;  - Spatial Partitioning, Octrees, Quadtrees, BSP trees&#xD;&#xA;  - [BIH Trees][2]&#xD;&#xA;  - Bounding Volumes and Bounding Volume Hierarchies&#xD;&#xA;  - Discrete vs. Continuous Collision Detection&#xD;&#xA;  - Separating Axis Theorem&#xD;&#xA;  - GJK Algorithm&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net&#xD;&#xA;  [2]: http://ainc.de/Research/BIH.pdf" />
  <row Id="26970" PostHistoryTypeId="2" PostId="12323" RevisionGUID="7c44b710-13d0-45ac-bda3-aa6100583a5c" CreationDate="2011-05-14T21:54:34.947" UserId="2229" Text="I develop a game for mobile platform. I am on my own, therefore using concepts of tv movie characters/creatures would make my life a bit easier.&#xD;&#xA;&#xD;&#xA;Can you advise please, whether it is ok, if I use famous movie-like creatures (ex: Alien, Predator) in my game? As the game is for mobile platform, it is not going to generate huge revenues. &#xD;&#xA;&#xD;&#xA;What about songs? Can I use a song into my game?&#xD;&#xA;&#xD;&#xA;What are the threats of breaching copyright law? Can I feel a bit more safe, if I develop in non-US country? &#xD;&#xA;&#xD;&#xA;To be honest, I think, I can predict what responses to expect. Most likely, they will sound that I am not permitted to use the intelectual property without author's approval. Instead, I I would like to know, if there is a way to use this intellectual property under special circumstances (freeware game, not exceeding certain revenues, if 20% of the work is different etc..)&#xD;&#xA;&#xD;&#xA;Is there any way to find out, how to contact a producer of particular intellectual property? What if I can not find a contact to a specific producer on the internet? " />
  <row Id="26971" PostHistoryTypeId="1" PostId="12323" RevisionGUID="7c44b710-13d0-45ac-bda3-aa6100583a5c" CreationDate="2011-05-14T21:54:34.947" UserId="2229" Text="Copyrights and Usage of 3rd Party Intellectual Property" />
  <row Id="26972" PostHistoryTypeId="3" PostId="12323" RevisionGUID="7c44b710-13d0-45ac-bda3-aa6100583a5c" CreationDate="2011-05-14T21:54:34.947" UserId="2229" Text="&lt;game-design&gt;&lt;copyright&gt;&lt;intellectual-property&gt;&lt;concepts&gt;" />
  <row Id="26973" PostHistoryTypeId="2" PostId="12324" RevisionGUID="0a71c940-4e17-4fd7-a9cd-f1c0a2fc5cbb" CreationDate="2011-05-14T21:57:12.187" UserId="4191" Text="I'm considering creating a position in an online RPG where the responsibilities would mainly involve conceiving roleplaying-oriented events and plotlines and executing on them using developer tools such as the ability to create instances of NPCs/items and the ability to control NPCs.  Examples of events/plotlines might be &quot;ancient god of evil breaks loose from his prison and attacks the realm&quot; or &quot;upcoming marriage between offspring of powerful dynasties has political opponents trying to disrupt it&quot;.&#xD;&#xA;&#xD;&#xA;What is the best job title for this sort of position?&#xD;&#xA;&#xD;&#xA;The first thing that popped into my head was &quot;customer experience associate&quot;, but this appears to have an established meaning in retail where it's a way of dressing up &quot;salesperson&quot;.  &quot;Game master&quot; positions in MMOs are generally helpdesk positions with no creative duties or authority.  I want to select something that neither exaggerates nor undersells this person's level of responsibility." />
  <row Id="26974" PostHistoryTypeId="1" PostId="12324" RevisionGUID="0a71c940-4e17-4fd7-a9cd-f1c0a2fc5cbb" CreationDate="2011-05-14T21:57:12.187" UserId="4191" Text="Job title for a roleplaying event gamemaster in an online RPG?" />
  <row Id="26975" PostHistoryTypeId="3" PostId="12324" RevisionGUID="0a71c940-4e17-4fd7-a9cd-f1c0a2fc5cbb" CreationDate="2011-05-14T21:57:12.187" UserId="4191" Text="&lt;jobs&gt;&lt;job-hierarchy&gt;" />
  <row Id="26976" PostHistoryTypeId="6" PostId="12268" RevisionGUID="69277933-1dcc-42be-ad56-38e86a1a56fd" CreationDate="2011-05-14T21:59:44.167" UserId="4443" Comment="edited tags" Text="&lt;c++&gt;&lt;design-patterns&gt;&lt;component-based&gt;" />
  <row Id="26977" PostHistoryTypeId="5" PostId="12323" RevisionGUID="2e3563d5-9c5b-4bcd-977c-91bca524c7d2" CreationDate="2011-05-14T21:59:49.937" UserId="2229" Comment="added 24 characters in body" Text="I develop a **game for mobile platform**. I am on my own, therefore using concepts of tv movie characters/creatures would make my life a bit easier.&#xD;&#xA;&#xD;&#xA;Can you advise please, if it is ok, if **I use famous movie-like creatures** (ex: Alien, Predator) in my game? As the game is for mobile platform, it is not going to generate huge revenues. &#xD;&#xA;&#xD;&#xA;What about **songs**? Can I use a song into my game?&#xD;&#xA;&#xD;&#xA;**What are the threats** of breaching copyright law? Can I feel a bit more safe, if I develop in non-US country? &#xD;&#xA;&#xD;&#xA;To be honest, I think, I can predict what responses to expect. Most likely, they will sound that I am not permitted to use the intelectual property without author's approval. Instead, I I would like to know, if there is a way to use this intellectual property under **special circumstances** (freeware game, not exceeding certain revenues, if 20% of the work is different etc..)&#xD;&#xA;&#xD;&#xA;Is there any way on finding a **holder of particular intellectual property**(ex: a central database)? What if I can not find a contact to a specific producer on the internet? " />
  <row Id="26978" PostHistoryTypeId="5" PostId="12323" RevisionGUID="b0a6b74c-c2a3-425a-adb6-5f367281a294" CreationDate="2011-05-14T22:11:30.253" UserId="2229" Comment="deleted 34 characters in body" Text="I develop a **game for mobile platform**. I am on my own, therefore using concepts of tv movie characters/creatures would make my life a bit easier.&#xD;&#xA;&#xD;&#xA;Can you advise please, if it is ok, if **I use famous movie-like creatures** (ex: Alien, Predator) in my game? What about **songs**? As the game is for mobile platform, it is not going to generate huge revenues. &#xD;&#xA;&#xD;&#xA;**What are the threats** of breaching copyright law? Can I feel a bit more safe, if I develop in non-US country? &#xD;&#xA;&#xD;&#xA;To be honest, I think, I can predict what responses to expect. Most likely, they will sound that I am not permitted to use the intelectual property without author's approval. Instead, I I would like to know, if there is a way to use this intellectual property under **special circumstances** (freeware game, not exceeding certain revenues, if 20% of the work is different etc..)&#xD;&#xA;&#xD;&#xA;Is there any way on finding a **holder of particular intellectual property**(ex: a central database)? What if I can not find a contact to a specific producer on the internet? " />
  <row Id="26979" PostHistoryTypeId="5" PostId="6318" RevisionGUID="2197c46e-22b2-4bf9-8868-97114592a788" CreationDate="2011-05-14T23:14:38.443" UserId="721" Comment="added 433 characters in body" Text="**Updated May 2011.**&#xD;&#xA;&#xD;&#xA;To develop on Android, you need many devices. But if you need one, buy a Nexus S (S or One), because it is an official Google Phone. You will have GingerBread (Android 2.3). And you must know that Debug on NDK with Android is bugged. You can't debug easily multi-thread programs (OpenGL). There is a fix in NDK r5 but its needs a Gingerbread phone.&#xD;&#xA;&#xD;&#xA;To check your Android games, i recommend to have one device per GPU family at minimum.&#xD;&#xA;&#xD;&#xA;So in May 2011, I recommend to have these phones:&#xD;&#xA;&#xD;&#xA; - Galaxy S or Nexus S (for PowerVR 540 and Android 2.3.3)&#xD;&#xA; - Motorola Xoom, Acer Iconia, Asus transformer, Galaxy 8.9 or 10.1 (Tegra2 + Honeycomb)&#xD;&#xA; - Galaxy S2 (for Mali 400)&#xD;&#xA; - HTC Sensation (Andreno 220), Sony Ericsson Xperia Play, HTC Desire HD, Z or S (Andreno 205)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But, i check on these devices too:&#xD;&#xA;&#xD;&#xA; - Nexus One (Andreno 200) or Droid (PowerVR 530): same GPU performance. I aim framerate &gt; 25fps on these devices&#xD;&#xA; - A101IT archos (tablet resolution 1024*600) 20 fps&#xD;&#xA;&#xD;&#xA;I have many other devices.. but there are too old or too bugged, so i didn't use them:&#xD;&#xA;&#xD;&#xA; - Spica, Moment, Naos &amp; Taos: OpenGL are so bugged... to be compatible with these devices you should verify each OpenGL command;&#xD;&#xA; - HTC G1, HTC Magic or HTC Hero: if you plan to develop OpenGL ES 1.x, verify on these devices&#xD;&#xA; - Wildfire (small resolutions) &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;I'm one of developper of Moblox (a featured Android game) and i needed all these phones. If you don't use OpenGL, you can have only one Phone.&#xD;&#xA;&#xD;&#xA;Ps: i made a collections of OGL 2.0 extensions on this [page][1]&#xD;&#xA;&#xD;&#xA;ps2: my gpubench can give hints about GPU on Android ([results][2])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices/4380884#4380884&#xD;&#xA;  [2]: http://gpubench.appspot.com/top/by-phone/version-1" />
  <row Id="26980" PostHistoryTypeId="2" PostId="12325" RevisionGUID="87b997a0-4ba6-4167-a22f-fa40df9f8acf" CreationDate="2011-05-15T00:02:54.090" UserId="7091" Text="If I'm not mistaken, the Winforms API in the .NET Framework has a web browser component that you can add to an application, to display HTML content, and modify via a simple interface. It relies on an already installed web browser (usually IE), so you'd have to verify that the user has everything necessary to view your game, but other than that, I don't see why it wouldn't work.&#xD;&#xA;&#xD;&#xA;[This](http://frazzleddad.blogspot.com/2007/07/working-with-webbrowser-control-in.html) looks promising. Hope I helped :)" />
  <row Id="26981" PostHistoryTypeId="25" PostId="12319" RevisionGUID="36b7de42-bbe6-4f30-88f6-bec3ef274bfb" CreationDate="2011-05-15T00:12:07.443" Comment="http://twitter.com/#!/StackGameDev/status/69555622064046080" />
  <row Id="26982" PostHistoryTypeId="5" PostId="12322" RevisionGUID="e08da464-08af-4986-9945-83396d456b59" CreationDate="2011-05-15T00:24:04.423" UserId="4235" Comment="made it sound less know-it-all-y" Text="Ultimately I think the answer to your question is going to depend upon the needs of your particular application, as there isn't a one-size-fits all solution. Although there are a number of decent resources on the web, you'll save yourself a lot of time and frustration by picking up Christer Ericson's [Real-time Collision Detection][1], which lays out in great detail a wide variety of techniques and algorithms, with example C++ code. &#xD;&#xA;&#xD;&#xA;It helped me to take baby steps before jumping into trying to build a grand system. Writing a function to determine if a point is in a plane, then if a point is in a triangle, if a ray is in a triangle, etc. Then moving onto static tests of various convex solids: AABB vs. Triangle, etc. With time things that seemed impenetrable (forgive the pun) at first became less daunting. Here is a listing of a good number of tests, with example code:&#xD;&#xA;&#xD;&#xA;http://www.realtimerendering.com/intersections.html&#xD;&#xA;&#xD;&#xA;In the meantime, since I know not everyone can just fork out 70-80$ for a book at will, here are some terms you might want to look into:&#xD;&#xA;&#xD;&#xA;  - Spatial Partitioning, Octrees, Quadtrees, BSP trees&#xD;&#xA;  - [BIH Trees][2]&#xD;&#xA;  - Bounding Volumes and Bounding Volume Hierarchies&#xD;&#xA;  - Discrete vs. Continuous Collision Detection&#xD;&#xA;  - Separating Axis Theorem&#xD;&#xA;  - GJK Algorithm&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://realtimecollisiondetection.net&#xD;&#xA;  [2]: http://ainc.de/Research/BIH.pdf" />
  <row Id="26983" PostHistoryTypeId="2" PostId="12326" RevisionGUID="a73955a7-ac9b-438b-b0ce-5970ad85e0bc" CreationDate="2011-05-15T00:27:49.053" UserId="7366" Text="I've heard that the GPU Gems series of books are a really great read. You can purchase them (a quick search on amazon.com will bring up some results), but they are also free to read online:&#xD;&#xA;&#xD;&#xA;http://http.developer.nvidia.com/GPUGems/gpugems_pref02.html" />
  <row Id="26984" PostHistoryTypeId="16" PostId="12326" RevisionGUID="6373d580-9eb1-4a89-bee4-4f54390d9f0d" CreationDate="2011-05-15T00:27:49.053" UserId="7366" />
  <row Id="26985" PostHistoryTypeId="5" PostId="12323" RevisionGUID="e6a6f79f-3692-4c7e-a3a3-541dc88c61dc" CreationDate="2011-05-15T00:27:56.690" UserId="2229" Comment="deleted 252 characters in body" Text="I develop a **game for mobile platform**. Sometimes, I have a wish to implement creature from TV/movies into the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*I wish to ask about Copyrights:*&#xD;&#xA;&#xD;&#xA;Is it acceptable, if **I implement famous movie-like creatures** (ex: Alien, Predator) into my game? Occasionally, I see games based on movies: &quot;Star Trek, Star Wars, James Bond, etc..&quot;. If I wish to create a game based on successful movie, do I have to obtain approval? &#xD;&#xA;&#xD;&#xA;What about **songs**? If I legaly purchase a CD in the store, can I use the song into my game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Are there any conditions, under which I can use movie-like characters in my game? For example, if the game is going to be shareware/freeware, if the reneues does not exceed certain amount, or if some percentage of the original character look is modified?" />
  <row Id="26986" PostHistoryTypeId="5" PostId="12323" RevisionGUID="cff09757-5e42-4f88-8a72-a3809e40caf2" CreationDate="2011-05-15T00:53:22.487" UserId="2229" Comment="added 27 characters in body; deleted 12 characters in body; added 12 characters in body" Text="I develop a **game for a mobile platform**. I would like to implement a movie figure/creature/character/vehicle into the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*I wish to ask about Copyrights:*&#xD;&#xA;&#xD;&#xA;Is it acceptable, if **I implement famous movie-like creatures** (ex: Alien, Predator, Star Ship vehicle) into my game? Occasionally, I see games based on movies: &quot;Star Trek, Star Wars, James Bond, etc..&quot;. If I wish to create a game based on successful movie, do I have to obtain approval? &#xD;&#xA;&#xD;&#xA;What about **songs**? If I legaly purchase a CD in the store, can I use the song into my game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Are there any conditions, under which I can use movie-like characters in my game? For example, if the game is going to be shareware/freeware, if the reneues does not exceed certain amount, or if some percentage of the original character look is modified?" />
  <row Id="26987" PostHistoryTypeId="2" PostId="12327" RevisionGUID="9b5718b1-e155-47f7-8b8b-53187cf8bf1f" CreationDate="2011-05-15T01:23:46.143" UserId="2698" Text="I am not a lawyer. I intend only to give you a basic overview.&#xD;&#xA;&#xD;&#xA;**Music:** Read the license on your music. You've purchased it for personal use on personal devices, not for distribution. Movies featuring a popular song didn't buy a CD from a store and copy it into their movie; they sought a license from the publisher and you'll need to do that too.&#xD;&#xA;&#xD;&#xA;**Characters:** In most cases, the kind of characters/races/etc you mentioned will be the [intellectual property](http://en.wikipedia.org/wiki/Intellectual_property) of some person, company, etc. You will probably not have any permission whatsoever to use it in any way. The exception is anything covered by [fair use](http://en.wikipedia.org/wiki/Fair_use): for instance, by creating a character who is completely original, but also a parody or reference to someone else covered by IP.&#xD;&#xA;&#xD;&#xA;Bear in mind there is [public domain](http://en.wikipedia.org/wiki/Public_domain) material, which is material for which intellectual property rights were forfeited or expired (e.g. a lot of music before the 1930s is no longer covered by copyright). You can use public domain material without restriction.&#xD;&#xA;&#xD;&#xA;If there are more specifics I'll leave someone else to address them." />
  <row Id="26988" PostHistoryTypeId="5" PostId="12327" RevisionGUID="6f2b6a06-6c55-44b8-a4f8-43f089110bf8" CreationDate="2011-05-15T01:32:49.393" UserId="2698" Comment="added 79 characters in body" Text="I am not a lawyer. This is not legal advice. What follows is a basic overview of the issues that may surround the material you've brought up.&#xD;&#xA;&#xD;&#xA;**Music:** Read the license on your music. You've purchased it for personal use on personal devices, not for distribution. Movies featuring a popular song didn't buy a CD from a store and copy it into their movie; they sought a license from the publisher and you'll need to do that too.&#xD;&#xA;&#xD;&#xA;**Characters:** In most cases, the kind of characters/races/etc you mentioned will be the [intellectual property](http://en.wikipedia.org/wiki/Intellectual_property) of some person, company, etc. You will probably not have any permission whatsoever to use it in any way. The exception is anything covered by [fair use](http://en.wikipedia.org/wiki/Fair_use): for instance, by creating a character who is completely original, but also a parody or reference to someone else covered by IP.&#xD;&#xA;&#xD;&#xA;Bear in mind there is [public domain](http://en.wikipedia.org/wiki/Public_domain) material, which is material for which intellectual property rights were forfeited or expired (e.g. a lot of music before the 1930s is no longer covered by copyright). You can use public domain material without restriction.&#xD;&#xA;&#xD;&#xA;If there are more specifics I'll leave someone else to address them." />
  <row Id="26989" PostHistoryTypeId="2" PostId="12328" RevisionGUID="6d68ffb8-bdd7-4f51-9f12-191bb87eabf3" CreationDate="2011-05-15T01:36:44.393" UserId="2228" Text="Well, as we talked in comments, the way to fix it was to reset transform matrix with the Xforms modifier." />
  <row Id="26990" PostHistoryTypeId="5" PostId="12327" RevisionGUID="3ca13f12-653c-4482-a629-4ff90f909627" CreationDate="2011-05-15T01:39:31.090" UserId="2698" Comment="added 385 characters in body" Text="I am not a lawyer. This is not legal advice. What follows is a basic overview of the issues that may surround the material you've brought up.&#xD;&#xA;&#xD;&#xA;**Music:** Read the license on your music. You've purchased it for personal use on personal devices, not for distribution. Movies featuring a popular song didn't buy a CD from a store and copy it into their movie; they sought a license from the publisher and you'll need to do that too.&#xD;&#xA;&#xD;&#xA;**Characters:** In most cases, the kind of characters/races/etc you mentioned will be the [intellectual property](http://en.wikipedia.org/wiki/Intellectual_property) of some person, company, etc. You will probably not have any permission whatsoever to use it in any way. The exception is anything covered by [fair use](http://en.wikipedia.org/wiki/Fair_use): for instance, by creating a character who is completely original, but also a parody or reference to someone else covered by IP.&#xD;&#xA;&#xD;&#xA;Bear in mind there is [public domain](http://en.wikipedia.org/wiki/Public_domain) material, which is material for which intellectual property rights were forfeited or expired (e.g. a lot of music before the 1930s is no longer covered by copyright). You can use public domain material without restriction.&#xD;&#xA;&#xD;&#xA;Ultimately, it is up to you to determine whether the thing you want to use is the intellectual property of someone, and if so, what permissions they extend to you (assume none until proven otherwise). For instance, Blizzard will often permit third parties use of their content so long as it is beneficial to Blizzard (e.g. webcomics, machinimas - it's all just publicity for them).&#xD;&#xA;&#xD;&#xA;If there are more specifics I'll leave someone else to address them." />
  <row Id="26991" PostHistoryTypeId="6" PostId="12323" RevisionGUID="882c4970-b7d3-4bd4-8774-fba3bc917ef0" CreationDate="2011-05-15T02:54:19.777" UserId="51" Comment="edited tags" Text="&lt;copyright&gt;&lt;intellectual-property&gt;" />
  <row Id="26992" PostHistoryTypeId="25" PostId="12316" RevisionGUID="7263dbeb-da84-40ae-9a09-e05ddd9b56d8" CreationDate="2011-05-15T03:12:07.520" Comment="http://twitter.com/#!/StackGameDev/status/69600921268662272" />
  <row Id="26993" PostHistoryTypeId="2" PostId="12329" RevisionGUID="d09b70de-a26a-41c5-8b52-4975f6bb7b86" CreationDate="2011-05-15T03:46:09.493" UserId="7369" Text="For the motion curve, I'd suggest using Hermite curves. You simply give a starting point/velocity and an ending point/velocity, and it creates a nice and smooth curve between those two. Use the ending point/velocity of the first pair of points as the starting point/velocity of the next pair of points and you have a nice long and winding curve that is seamless. &#xD;&#xA;&#xD;&#xA;This perfectly handles the requirement to manage the speed: you give a list of points in time with velocities you choose, and it gives you the seamlessly interpolated position and velocity values. If you want to go with this, all you need to extract from the 3D authoring application is points and velocities in the path that you desire. You can also generate them in runtime, perhaps based on user input. &#xD;&#xA;&#xD;&#xA;To adjust the orientation, you have a number of options. If the airplane will always point towards where it's going (which is the case that makes sense) you can use the interpolated velocity vector from the Hermite curve to find where your ship should point towards. If you know the up vector (it's moving in a plane, or you know which direction should be up) you can calculate the third axis by cross(front, up) and there you have your orientation. &#xD;&#xA;&#xD;&#xA;If you want a somehow &quot;wobbly&quot; orientation so that the plane sometimes deviates from the front direction in the path, you can use the front direction as the desired direction, and successively do one-step slerp between the current orientation and the desired orientation. &#xD;&#xA;&#xD;&#xA;If you want custom orientations that have nothing to do with the path, you can of course supply a list of  orientation quaternion to this. Then your points become (point, velocity, quaternion). Then you can use slerp between two successive quaternions to set your orientations along the way. Don't forget that slerp is a *linear* interpolation method. However, it should usually be fine. If you find that the rotations are not smooth enough in the seams, you can try interpolating the list of quaternions with a Bezier curve, as explained [here](http://embots.dfki.de/doc/seminar_ca/Kremer_Quaternions.pdf) on section 7. &#xD;&#xA;&#xD;&#xA;[Here](http://willperone.net/Code/quaternion.php) is some source code that can help you get started. It has a number of smooth interpolation techniques for a list of quaternions (squad, bezier, etc). &#xD;&#xA;&#xD;&#xA;Let me know if you have any questions!" />
  <row Id="26994" PostHistoryTypeId="25" PostId="12324" RevisionGUID="d76db5ed-4be3-4647-ab51-9b814ea58dda" CreationDate="2011-05-15T06:12:07.680" Comment="http://twitter.com/#!/StackGameDev/status/69646220603305984" />
  <row Id="26995" PostHistoryTypeId="2" PostId="12330" RevisionGUID="5563d50b-cfc6-4504-b3a9-7c73332f2050" CreationDate="2011-05-15T09:10:02.227" UserId="5224" Text="How about Dungeon Master (DM) to borrow from games like D&amp;D here the DM is the one driving the story and inserting interesting events." />
  <row Id="26996" PostHistoryTypeId="25" PostId="12294" RevisionGUID="5faa1b24-a275-4337-8984-20850d45c5d1" CreationDate="2011-05-15T09:12:08.440" Comment="http://twitter.com/#!/StackGameDev/status/69691522207055872" />
  <row Id="26998" PostHistoryTypeId="6" PostId="12324" RevisionGUID="6b4cb689-ca66-4ccf-8e74-7879a703819a" CreationDate="2011-05-15T09:14:32.203" UserId="1156" Comment="edited tags" Text="&lt;mmo&gt;&lt;rpg&gt;&lt;online&gt;" />
  <row Id="26999" PostHistoryTypeId="2" PostId="12332" RevisionGUID="92e46184-524f-4276-96e9-809116f554cc" CreationDate="2011-05-15T09:16:33.693" UserId="1156" Text="Something to do with controlling would work, since it shows they are actually doing something.&#xD;&#xA;&#xD;&#xA;Perhaps a Quest Controller?" />
  <row Id="27001" PostHistoryTypeId="5" PostId="12329" RevisionGUID="a68f8fd2-87ea-454a-988d-f2e16e55e59e" CreationDate="2011-05-15T10:10:22.217" UserId="7369" Comment="edited body" Text="For the motion curve, I'd suggest using Hermite curves. You simply give a starting point/velocity and an ending point/velocity, and it creates a nice and smooth curve between those two. Use the ending point/velocity of the first pair of points as the starting point/velocity of the next pair of points and you have a nice long and winding curve that is seamless. &#xD;&#xA;&#xD;&#xA;This perfectly handles the requirement to manage the speed: you give a list of points in time with velocities you choose, and it gives you the seamlessly interpolated position and velocity values. If you want to go with this, all you need to extract from the 3D authoring application is points and velocities in the path that you desire. You can also generate them in runtime, perhaps based on user input. &#xD;&#xA;&#xD;&#xA;To adjust the orientation, you have a number of options. If the airplane will always point towards where it's going (which is the case that makes sense) you can use the interpolated velocity vector from the Hermite curve to find where your ship should point towards. If you know the up vector (it's moving in a plane, or you know which direction should be up) you can calculate the third axis by cross(front, up) and there you have your orientation. &#xD;&#xA;&#xD;&#xA;If you want a somehow &quot;wobbly&quot; orientation so that the plane sometimes deviates from the front direction in the path, you can use the front direction as the desired direction, and successively do one-step slerp between the current orientation and the desired orientation. &#xD;&#xA;&#xD;&#xA;If you want custom orientations that have nothing to do with the path, you can of course supply a list of orientation quaternions to this. Then your points become (point, velocity, quaternion). Then you can use slerp between two successive quaternions to set your orientations along the way. Don't forget that slerp is a *linear* interpolation method. However, it should usually be fine. If you find that the rotations are not smooth enough in the seams, you can try interpolating the list of quaternions with a Bezier curve, as explained [here](http://embots.dfki.de/doc/seminar_ca/Kremer_Quaternions.pdf) on section 7. &#xD;&#xA;&#xD;&#xA;[Here](http://willperone.net/Code/quaternion.php) is some source code that can help you get started. It has a number of smooth interpolation techniques for a list of quaternions (squad, bezier, etc). &#xD;&#xA;&#xD;&#xA;Let me know if you have any questions!" />
  <row Id="27002" PostHistoryTypeId="5" PostId="11147" RevisionGUID="59d8e2ef-badf-4c59-b017-634942bf5ae1" CreationDate="2011-05-15T11:21:23.787" UserId="3794" Comment="added link" Text="first of all, i don't know any particular website for this, but i can help you out.&#xD;&#xA;&#xD;&#xA;What file types does you current 3d environment support?&#xD;&#xA;search [Google sketch-up library online][1], it has lots of 3d models.&#xD;&#xA;&#xD;&#xA;if you found what you need, then check if you 3d apps file type is supported in Google sketch-up.&#xD;&#xA;&#xD;&#xA;if yes download Google sketch-up, download the model from Google site and do the conversion manually.&#xD;&#xA;&#xD;&#xA;the reason i suggest this is that Google sketch-up has lots of models you can download free, depending on the owners terms.&#xD;&#xA;&#xD;&#xA;if you have any problem converting, let me know&#xD;&#xA;i have done lots of conversion like these when doing 3d games&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sketchup.google.com/3dwarehouse/search?q=supermarket&amp;styp=m&amp;btnG=Vyhledat&amp;reps=2&amp;start=0" />
  <row Id="27003" PostHistoryTypeId="2" PostId="12333" RevisionGUID="d87458a5-20e0-4d45-9219-b1350d53ef46" CreationDate="2011-05-15T12:10:36.797" UserId="3689" Text="i need to make simple education games in 3d for that i need GUI and editor like function &#xD;&#xA;this is no problem . but the openGL stuff i need to learn by example.  &#xD;&#xA;do you know places where i see example of simple 3d games made with Qt ?   &#xD;&#xA;Thanks" />
  <row Id="27004" PostHistoryTypeId="1" PostId="12333" RevisionGUID="d87458a5-20e0-4d45-9219-b1350d53ef46" CreationDate="2011-05-15T12:10:36.797" UserId="3689" Text="looking for simple 3d games made with Qt" />
  <row Id="27005" PostHistoryTypeId="3" PostId="12333" RevisionGUID="d87458a5-20e0-4d45-9219-b1350d53ef46" CreationDate="2011-05-15T12:10:36.797" UserId="3689" Text="&lt;qt&gt;" />
  <row Id="27006" PostHistoryTypeId="25" PostId="12323" RevisionGUID="3dffb91a-6d66-444b-8f2a-a73a6019cee9" CreationDate="2011-05-15T12:12:08.803" Comment="http://twitter.com/#!/StackGameDev/status/69736822242164736" />
  <row Id="27007" PostHistoryTypeId="2" PostId="12334" RevisionGUID="406c916b-7915-4719-bac9-db7dacdad2c6" CreationDate="2011-05-15T13:11:49.340" UserId="7375" Text="You can use Qt with the QtWebkit widget, which will work on all major platforms." />
  <row Id="27008" PostHistoryTypeId="2" PostId="12335" RevisionGUID="4825cfcd-8139-4702-bf3d-8d5299e8d728" CreationDate="2011-05-15T14:10:27.203" UserId="6813" Text="I don't know any 3D game made with Qt, but here are some useful links about creating 3D scenes and animations using the Qt 3D rendering api (QtGL is based upon OpenGL) or about game creation with Qt.&#xD;&#xA;&#xD;&#xA;First, here is very interesting step by step tutorial/demo to present QML and 3D. Which I think could be very helpful for you, because all you need (for the 3D part) is in there:&#xD;&#xA;&#xD;&#xA;- http://labs.qt.nokia.com/2010/08/10/qml3d-demo/&#xD;&#xA;&#xD;&#xA;Next one is about using QML for creating simple game (non 3D), but it can be interesting even if you want to create a 3D game, and particularly for the &quot;Implementing the game logic&quot; part:&#xD;&#xA;&#xD;&#xA;- http://doc.qt.nokia.com/4.7-snapshot/qml-advtutorial.html&#xD;&#xA;- http://labs.qt.nokia.com/2010/08/12/a-guide-to-writing-games-with-qml/ (article related to the tutorial)&#xD;&#xA;&#xD;&#xA;Finally you can search read the forum section dedicated to game on the Nokia's forum, and the QTGL documentation:&#xD;&#xA;&#xD;&#xA;- http://developer.qt.nokia.com/forums/viewforum/17/&#xD;&#xA;- http://doc.qt.nokia.com/latest/painting-3d.html&#xD;&#xA;" />
  <row Id="27009" PostHistoryTypeId="5" PostId="12335" RevisionGUID="20685a59-f0b2-4d4c-b1e4-0903b9832c74" CreationDate="2011-05-15T14:16:00.397" UserId="6813" Comment="added 1 characters in body; added 2 characters in body" Text="I don't know any 3D game made with Qt, but here are some useful links about creating 3D scenes and animations using the Qt 3D rendering api (QtGL is based upon OpenGL) or about game creation with Qt.&#xD;&#xA;&#xD;&#xA;First, here is a very interesting step by step tutorial/demo to present QML and 3D. Which I think could be very helpful for you, because all you need (for the 3D part) is in there:&#xD;&#xA;&#xD;&#xA;- http://labs.qt.nokia.com/2010/08/10/qml3d-demo/&#xD;&#xA;&#xD;&#xA;Next one is about using QML for creating simple game (non 3D), but it can be interesting even if you want to create a 3D game, and particularly for the &quot;Implementing the game logic&quot; part:&#xD;&#xA;&#xD;&#xA;- http://doc.qt.nokia.com/4.7-snapshot/qml-advtutorial.html&#xD;&#xA;- http://labs.qt.nokia.com/2010/08/12/a-guide-to-writing-games-with-qml/ (article related to the tutorial)&#xD;&#xA;&#xD;&#xA;Finally you can search read the forum section dedicated to games on the Nokia's forum, and the QTGL documentation:&#xD;&#xA;&#xD;&#xA;- http://developer.qt.nokia.com/forums/viewforum/17/&#xD;&#xA;- http://doc.qt.nokia.com/latest/painting-3d.html&#xD;&#xA;" />
  <row Id="27010" PostHistoryTypeId="5" PostId="12294" RevisionGUID="5f60e465-cbd6-4999-9e21-2874a00018a4" CreationDate="2011-05-15T14:34:47.683" UserId="7350" Comment="added 124 characters in body" Text="I'm making a javascript game engine for fun and one thing I noticed was that my laptop runs super hot with the simplest game mechanics and that my game is doing about 600 updates per second.&#xD;&#xA;&#xD;&#xA;The graphics is already capped at 60 fps, but I'm wondering if I should limit the update cycles so my processor doesn't get owned on the simplest games.&#xD;&#xA;&#xD;&#xA;I think the answer is yes, it is just that I've never heard of anyone doing this before, so I wanted others opinions.&#xD;&#xA;&#xD;&#xA;EDIT: the answerers have led me to realize that the update cycle should be limited on all platforms not just JavaScript." />
  <row Id="27011" PostHistoryTypeId="25" PostId="12333" RevisionGUID="4a1c315b-e223-4f2a-a0e1-7984109bbac5" CreationDate="2011-05-15T15:12:09.167" Comment="http://twitter.com/#!/StackGameDev/status/69782121434193920" />
  <row Id="27012" PostHistoryTypeId="2" PostId="12336" RevisionGUID="2ab69208-9e89-4af3-8c49-e78af8827b1c" CreationDate="2011-05-15T15:19:17.870" UserId="2792" Text="We used Computer Graphics with OpenGL (Hearn &amp; Baker) when I was in university and I liked it a lot. Despite its name, it gives the fundamentals of 2D and 3D graphics and rendering. OpenGL is used as example when doing 3D graphics, but only after the fundamental maths and algorithms have been presented.&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Computer-Graphics-OpenGL-Donald-Hearn/dp/0130153907&#xD;&#xA;&#xD;&#xA;After that, Real Time Rendering as already suggested." />
  <row Id="27013" PostHistoryTypeId="16" PostId="12336" RevisionGUID="664287b5-035d-4558-8825-891996a00aa4" CreationDate="2011-05-15T15:19:17.870" UserId="2792" />
  <row Id="27014" PostHistoryTypeId="2" PostId="12337" RevisionGUID="7a48be73-6b0f-4c1c-9635-358f10fbebf2" CreationDate="2011-05-15T15:31:18.910" UserId="1021" Text="In my basic Cocos2D + Box2D iPhone app I have a bunch of circular Box2D bodies.  I'd like to change the color of the circles programatically.  **What's the easiest way to do this?**&#xD;&#xA;&#xD;&#xA;So far I'm just assigning a CCSprite* to the b2body-&gt;userData.  So perhaps I can change the colors in my sprite sheet programmatically?  Seems like there's an easier way.  I'm just not sure what it is.&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="27015" PostHistoryTypeId="1" PostId="12337" RevisionGUID="7a48be73-6b0f-4c1c-9635-358f10fbebf2" CreationDate="2011-05-15T15:31:18.910" UserId="1021" Text="Programmatically set color of Box2D body's sprite or image" />
  <row Id="27016" PostHistoryTypeId="3" PostId="12337" RevisionGUID="7a48be73-6b0f-4c1c-9635-358f10fbebf2" CreationDate="2011-05-15T15:31:18.910" UserId="1021" Text="&lt;box2d&gt;&lt;cocos2d&gt;&lt;color&gt;&lt;ccsprite&gt;" />
  <row Id="27017" PostHistoryTypeId="2" PostId="12338" RevisionGUID="b66b7f25-b60d-4825-baea-0cdfe238e86f" CreationDate="2011-05-15T17:36:21.443" UserId="7376" Text="Not much, but at least a couple of basic shaders to get started with can also be found between my open sorce engines files:&#xD;&#xA;&#xD;&#xA;- [general stuff][1]&#xD;&#xA;- [specialized stuff][2]&#xD;&#xA;&#xD;&#xA;the .vsh files contain the vertex shaders and the .fsh files the fragment shaders, but I guess thats selfexplaining...&#xD;&#xA;&#xD;&#xA;On current mobile hardware, you should do as much as possible within the vertex shader and the trick for great looking and fast games is to write many very specialized shaders doing always just exactly what is needed to make something look the way it is meant to.&#xD;&#xA;At least thats my experience with my iPhone 3GS, which features the same gpu as the iPhone 4 but has less pixels to do deliver data for. This is most probably already much better with tegra 2 and even better with apples A5 chip, but for now, this means that you should not try to port shaders for desktop gpus to mobile phones and expect a great performance :P&#xD;&#xA;This also means that fullscreen effects, especially on devices with a high resolution display tend to be slow.&#xD;&#xA;&#xD;&#xA;Hope this also helps a bit :).&#xD;&#xA;&#xD;&#xA;[1]:http://isdge.git.sourceforge.net/git/gitweb.cgi?p=isdge/isdge;a=tree;f=Engine/Graphics/Shaders;h=56519816048a5c2cb4116307b78ab3246de7c131;hb=f17c2b59bf62ef07d26472156ccf496c3469e29a&#xD;&#xA;[2]:http://isdge.git.sourceforge.net/git/gitweb.cgi?p=isdge/isdge;a=tree;f=Media/Shaders;h=c1b0c4c39a01ccea3579d4224db7aeec5e51f116;hb=f17c2b59bf62ef07d26472156ccf496c3469e29a" />
  <row Id="27018" PostHistoryTypeId="25" PostId="12337" RevisionGUID="5dca7e29-c351-4948-a6fa-67f08db988a5" CreationDate="2011-05-15T18:12:09.770" Comment="http://twitter.com/#!/StackGameDev/status/69827423151210496" />
  <row Id="27019" PostHistoryTypeId="2" PostId="12339" RevisionGUID="bbb794b1-58af-415d-9ccb-17c9699fcda3" CreationDate="2011-05-15T18:45:48.587" UserId="4191" Text="The best thing I've come up with since I wrote this question is Dynamic Content Coordinator." />
  <row Id="27020" PostHistoryTypeId="2" PostId="12340" RevisionGUID="c1ba7085-5ebf-4b20-a560-0b2a8ae32825" CreationDate="2011-05-15T19:41:14.873" UserId="744" Text="If you're going to pay them as a GM/CSR, the title needs to reflect that. Community Event Manager.&#xD;&#xA;&#xD;&#xA;On the other hand, if you're expecting them to use the developer tools to design new content, you're probably not going to find anyone willing to take that kind of pay for that responsibility (and do a good job of it)." />
  <row Id="27021" PostHistoryTypeId="2" PostId="12341" RevisionGUID="8324dc8e-6ce8-4a0b-b8dc-aaf315b6cd21" CreationDate="2011-05-15T20:17:31.313" UserId="744" Text="&lt;a href=&quot;http://www.cocos2d-iphone.org/api-ref/0.99.0/interface_c_c_sprite.html#ab7c1fe8d2419d19873095f2070d758f5&quot;&gt;cocos2d CCSprites have a three byte color property&lt;/a&gt;. You can use it like `sprite.color = ccc3(r, g, b)`." />
  <row Id="27022" PostHistoryTypeId="2" PostId="12342" RevisionGUID="79e8c4b5-4333-42a2-b00e-f7bde775fc15" CreationDate="2011-05-15T20:24:05.737" UserId="7283" Text="I'm discussing the art style for a game I'd like to make with a friend. I'm trying to describe what I'm thinking, and I know I've seen a character sprite in an older game that typifies what I'm envisioning. Unfortunately, I can't remember what game I am thinking of. &#xD;&#xA;My best guess at the description:&#xD;&#xA;&#xD;&#xA; - more cartoon styled than realistic&#xD;&#xA; - properly proportioned body vs. head (as opposed to Final Fantasy style with enormous heads vs. body size)&#xD;&#xA; - smallish eyes, mostly closed&#xD;&#xA; - largish mouth, mostly square shaped when talking&#xD;&#xA; - heavily shaded&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I know this is a 1-in-a-million shot an someone having an idea of what I'm describing, but if that rings any bells for anyone, please point me in the right direction.&#xD;&#xA;&#xD;&#xA;Additionally: I want to say it was in an adventure game, but maybe it was an RPG. Certainly not a platformer, shooter, action game, etc.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27023" PostHistoryTypeId="1" PostId="12342" RevisionGUID="79e8c4b5-4333-42a2-b00e-f7bde775fc15" CreationDate="2011-05-15T20:24:05.737" UserId="7283" Text="Help identify a game by remembered description of sprite" />
  <row Id="27024" PostHistoryTypeId="3" PostId="12342" RevisionGUID="79e8c4b5-4333-42a2-b00e-f7bde775fc15" CreationDate="2011-05-15T20:24:05.737" UserId="7283" Text="&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="27025" PostHistoryTypeId="2" PostId="12343" RevisionGUID="2c16b62c-397a-4179-81e3-f1b2ab778074" CreationDate="2011-05-15T20:35:47.193" UserId="5401" Text="We are looking for a good 3D sound engine for a game written in C#.&#xD;&#xA;We know of irrKlang, which looks great but isn't free for commercial uses, nor is it open source.&#xD;&#xA;XNA has an alright one, but it binds us to DirectX and therefore, windows.&#xD;&#xA;Are there any other good free ones out there?" />
  <row Id="27026" PostHistoryTypeId="1" PostId="12343" RevisionGUID="2c16b62c-397a-4179-81e3-f1b2ab778074" CreationDate="2011-05-15T20:35:47.193" UserId="5401" Text="What are the most suitable 3D sound engines out there for a FPS?" />
  <row Id="27027" PostHistoryTypeId="3" PostId="12343" RevisionGUID="2c16b62c-397a-4179-81e3-f1b2ab778074" CreationDate="2011-05-15T20:35:47.193" UserId="5401" Text="&lt;c#&gt;&lt;sound&gt;" />
  <row Id="27028" PostHistoryTypeId="2" PostId="12344" RevisionGUID="d8062e56-beef-4c58-b16b-acae639df4a7" CreationDate="2011-05-15T20:42:24.267" UserId="6982" Text="I am developing 2d game, where maps are tile based, small about 20x20 tiles and player can travel between a lot of maps (in my game rooms) like this. The maps are connected sometimes verticaly and sometimes horizontaly and together they make one big cave.&#xD;&#xA;&#xD;&#xA;Should I create a class where one 2d array holds all the maps (another 2d arrays), or is there any other way? Whats the most efficient way to create them in this class? Thank you for your help." />
  <row Id="27029" PostHistoryTypeId="1" PostId="12344" RevisionGUID="d8062e56-beef-4c58-b16b-acae639df4a7" CreationDate="2011-05-15T20:42:24.267" UserId="6982" Text="More smaller maps among which player can travel" />
  <row Id="27030" PostHistoryTypeId="3" PostId="12344" RevisionGUID="d8062e56-beef-4c58-b16b-acae639df4a7" CreationDate="2011-05-15T20:42:24.267" UserId="6982" Text="&lt;java&gt;&lt;tiles&gt;&lt;maps&gt;" />
  <row Id="27031" PostHistoryTypeId="25" PostId="12342" RevisionGUID="236e80e0-653d-4908-a2e2-af6a8ecbd006" CreationDate="2011-05-15T21:12:09.987" Comment="http://twitter.com/#!/StackGameDev/status/69872722578124800" />
  <row Id="27032" PostHistoryTypeId="2" PostId="12345" RevisionGUID="f0790f13-3a77-4c3f-8fb4-dc084f827137" CreationDate="2011-05-16T00:04:34.673" UserId="2698" Text="Use a 2D array that links a set of coordinates to a map object. When you get down to it, the only operation you'll be performing here is &quot;get me the map at coordinates (X,Y)&quot; and a 2D array is in a very literal sense _made_ for that.&#xD;&#xA;&#xD;&#xA;Each map should also know its own coordinates so that when the player exits right, you can say &quot;get me the map at coordinates (X+1, Y)&quot;." />
  <row Id="27033" PostHistoryTypeId="25" PostId="12343" RevisionGUID="9fe3f3f7-b3ae-4d69-b8df-de34fa0569d4" CreationDate="2011-05-16T00:12:10.993" Comment="http://twitter.com/#!/StackGameDev/status/69918023603060736" />
  <row Id="27034" PostHistoryTypeId="5" PostId="12345" RevisionGUID="2fe77a5d-3350-43d7-a963-5bac590d83d2" CreationDate="2011-05-16T00:23:00.530" UserId="2698" Comment="Added region issue; added 125 characters in body; deleted 26 characters in body" Text="Use a 2D array that links a set of coordinates to a map object. When you get down to it, the only operation you'll be performing here is &quot;get me the map at coordinates (X,Y)&quot; and a 2D array is in a very literal sense _made_ for that.&#xD;&#xA;&#xD;&#xA;Each map should also know its own coordinates so that when the player exits right, you can say &quot;get me the map at coordinates (X+1, Y)&quot;.&#xD;&#xA;&#xD;&#xA;To make it easy to move maps around, map objects should not know their own coordinates until the first time they're requested from that 2D world array. At that point, the 2D world array tells it its coordinates.&#xD;&#xA;&#xD;&#xA;###A space concern###&#xD;&#xA;Since you seem to be making a winding cave network, you may become concerned once you run into a situation like this:&#xD;&#xA;&#xD;&#xA;![Winding cave network with a lot of wasted tiles][1]&#xD;&#xA;&#xD;&#xA;Lots of wasted space in the array, right? Only a _fraction_ of coordinates are used. At this point, you're only wasting, maybe, a few kilobytes of data on unused coordinates. At this scale you shouldn't even be remotely concerned. If, however, the space wastage somehow becomes an issue, you can potentially trim a tremendous amount of fat by splitting your world into regions:&#xD;&#xA;&#xD;&#xA;![Split into regions][2]&#xD;&#xA;&#xD;&#xA;_All the black space: Some saved kilobytes._&#xD;&#xA;&#xD;&#xA;Each region is a small world in itself. To pass between regions, a region transition would say &quot;go to region X, coordinates (X,Y).&quot; Since your regions have no particular arrangement in space, put them in a 1D array.&#xD;&#xA;&#xD;&#xA;[1]:http://i52.tinypic.com/1685qba.gif&#xD;&#xA;[2]:http://i54.tinypic.com/6s8hus.gif" />
  <row Id="27039" PostHistoryTypeId="2" PostId="12347" RevisionGUID="dffb00f6-f491-4295-bc0f-3e602df63ea4" CreationDate="2011-05-16T01:47:46.727" UserId="6633" Text="I am making an iphone shmup and am trying to decide what type of game loop to use. I want to use either semi-fixed timestep or fully-fixed timestep.&#xD;&#xA;&#xD;&#xA;With semi-fixed timestep I will make zero or more update(FIXED_INTERVAL) calls followed by one update(dt) call where dt &lt;= FIXED_INTERVAL per game loop. As I understand it the drawbacks with this method are that my physics update(dt) logic is going to be more difficult to program because I basically have to assume a variable dt for every update. And then I've also heard that each run of my game will be slightly different due to floating point values not being the same every time.&#xD;&#xA;&#xD;&#xA;Then with fully-fixed timestep I am making zero or more update(FIXED_INTERVAL) calls followed by one interpolation(dt/FIXED_INTERVAL) call where dt &lt; FIXED_INTERVAL per game loop.&#xD;&#xA;&#xD;&#xA;So it seems like the big decision I really have to make is: do I want to tackle the challenge of implementing an update(dt) with a variable dt or do I want to tackle the challenge of implementing interpolation?&#xD;&#xA;&#xD;&#xA;Now from what I've read the majority of people are saying to use fully-fixed and do the interpolation. But when I think about implementing interpolation it seems like I'd be a lot more complex than an update(dt) with variable dt. This is because if I use interpolation I have to remember both the previous state and the current state. So if I want to use interpolation I have to come up with an additional layer of indirection that abstracts out entire individual game states. Whereas with semi-fixed timestep where I don't have to use interpolation I don't have to come up with a game state abstraction because there's always only one game state and it's simply the &quot;global arrays&quot; that represent my enemies, and enemy bullets etc.&#xD;&#xA;&#xD;&#xA;So what's the more practical choice: do I implement it semi-fixed knowing that my physics updates could get complicated with the variable dt. Or do I use fully-fixed and try to come up with a game state abstraction so that I can keep track of previous state and current state in order to perform interpolation?" />
  <row Id="27040" PostHistoryTypeId="1" PostId="12347" RevisionGUID="dffb00f6-f491-4295-bc0f-3e602df63ea4" CreationDate="2011-05-16T01:47:46.727" UserId="6633" Text="Semi-fixed or Fully-fixed timestep?" />
  <row Id="27041" PostHistoryTypeId="3" PostId="12347" RevisionGUID="dffb00f6-f491-4295-bc0f-3e602df63ea4" CreationDate="2011-05-16T01:47:46.727" UserId="6633" Text="&lt;gameloop&gt;" />
  <row Id="27042" PostHistoryTypeId="25" PostId="12347" RevisionGUID="fa00e244-3b34-4763-a9df-7579088fc195" CreationDate="2011-05-16T03:12:11.440" Comment="http://twitter.com/#!/StackGameDev/status/69963325676589056" />
  <row Id="27043" PostHistoryTypeId="2" PostId="12348" RevisionGUID="a94fb95d-3c53-46dc-a5f0-199e3de3f4b6" CreationDate="2011-05-16T03:40:14.480" UserId="7383" Text="I have always been a software developer, but lately I've been wanting to get into games. The only thing stopping me is the fact that I'm a programmer, not an artist. I've made some simple stuff, Tetris, 2D chess things like that but I can't do much art and that's really what holds me back. Now the problem is, I've yet to go to college so most commercial projects wouldn't accept me even to work for free and learn a bit especially with my lack of experience in games and any indie projects I've looked into really have an issue with responding to people interested, or actually completing (or starting really, most don't get past the ideas on paper) the project they want to do. I've looked around locally for artists, anyone who can do modeling, textures or animating or even anyone with some ability to make some more advanced 2D assets to get something like a side-scrolling RPG or something but haven't been able to find anyone.&#xD;&#xA;&#xD;&#xA;So how do you guys do it? Do I really just have to wait until I can go to college to see if I like working with games or is there some way I can get art (for free, anything I do is just going to be for fun so I don't want to have to sink money into it) and just start messing around on my own? Or am I just having bad luck and not looking in the right places for other people interested in having me help? I'm not looking for anything in particular, just something to fill some time with and see if I like making games. If not, well I'll go back to my software projects. I just have one more year of highschool and I'd like to try a few different areas before I go to college." />
  <row Id="27044" PostHistoryTypeId="1" PostId="12348" RevisionGUID="a94fb95d-3c53-46dc-a5f0-199e3de3f4b6" CreationDate="2011-05-16T03:40:14.480" UserId="7383" Text="How does a single programmer make a game?" />
  <row Id="27045" PostHistoryTypeId="3" PostId="12348" RevisionGUID="a94fb95d-3c53-46dc-a5f0-199e3de3f4b6" CreationDate="2011-05-16T03:40:14.480" UserId="7383" Text="&lt;art&gt;&lt;assets&gt;&lt;free&gt;" />
  <row Id="27046" PostHistoryTypeId="2" PostId="12349" RevisionGUID="210ac132-acdc-4d40-8437-9173b20c2408" CreationDate="2011-05-16T03:55:05.380" UserId="7382" Text="FMOD and OpenAL are two very powerful alternatives to using DirectX directly. The [Tao libraries](http://www.mono-project.com/Tao) include OpenAL .NET implementations (as well as OpenGL and other game libraries), but FMOD will need to be used via P/Invoke. &#xD;&#xA;&#xD;&#xA;Additionally, OpenAL is free, and FMOD is only free as long as your application is free (see FMOD Non-Commercial License [here](http://www.fmod.org/index.php/sales))." />
  <row Id="27047" PostHistoryTypeId="2" PostId="12350" RevisionGUID="89d91d52-f8f2-48f9-8c56-57ad465adf4a" CreationDate="2011-05-16T04:16:59.520" UserId="7191" Text="I work full time doing security software, and in my &quot;free&quot; time I work on [my game][1]. I'm not spending any money on making my game, I'm only using free software and making my own art. Don't get me wrong, I'm NOT an artist, just a programmer. It's not stopping me though. I just keep chugging away on my game, and I'll worry about making it look really pretty later. Or just make it good enough that the art doesn't matter. For now it's ordained with what I call &quot;Programmer Art&quot;. Depending on the type of game you want to make, the art can be really important. But for a lot of games, it's all about the game play. Look at [Dwarf Fortress][2]. Not really a lot of &quot;art&quot; involved, but the game play is great!&#xD;&#xA;&#xD;&#xA;If anything, you can get your game built with Microsoft Paint textures and sprites, then you'd have something to show off to get an artist interested.&#xD;&#xA;&#xD;&#xA;You should definitely try your hand at making a game. I'm loving making my game. It's the most fun I've ever had programming. Every aspect is a new interesting thing to learn. &#xD;&#xA;&#xD;&#xA;Not everyone can do it all, so we just have to make do with the skills we have. Our skill is programming, so that's what we do. I think it's been proven more often than not that it's the game play (programming) that makes or breaks games, not the art.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://byte56.com&#xD;&#xA;  [2]: http://www.bay12games.com/dwarves/" />
  <row Id="27048" PostHistoryTypeId="2" PostId="12351" RevisionGUID="b9acb65e-1509-4efc-8f6b-3e8a67139bc2" CreationDate="2011-05-16T04:50:16.977" UserId="3656" Text="If you want to sell your game but not pay for a 3d audio library, you're pretty much stuck with OpenAL.&#xD;&#xA;&#xD;&#xA;It may cost money, but FMOD has an extremely well thought out API. Something else to consider is the added value of their EventSystem. It's not as robust as Wwise, but being able to define high-level sound events in an external authoring tool makes achieving high quality audio a lot easier. Stuff you would have to spend time coding is easily defined in terms of parameters and sound instances in FMOD.&#xD;&#xA;&#xD;&#xA;If only they allowed you to add events as well as sound instances to event layers.&#xD;&#xA;&#xD;&#xA;BASS from [Un4Seen][1] is another free-to-try, pay-to-sell library that supports Windows and OS X.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.un4seen.com/" />
  <row Id="27049" PostHistoryTypeId="2" PostId="12352" RevisionGUID="dbf36337-a4ac-47d9-aecf-2dbad0366b13" CreationDate="2011-05-16T05:36:08.610" UserId="211" Text="What you refer to as &quot;semi-fixed&quot; and &quot;fully-fixed&quot; timestep are, in my mind, *both* fixed timestep -- the *dt* that you are passing to your `update` call doesn't change between frames.&#xD;&#xA;&#xD;&#xA;So, your question is actually &quot;do I want to implement interpolation for the purposes of rendering?&quot; The answer is: *probably not*.&#xD;&#xA;&#xD;&#xA;Interpolation is something you would only want to do if your fixed `update` timestep is markedly different to your target `render` timestep. It's not uncommon for games that have a strenuous `update` phase to only call `update` at, say, 10Hz, but render at full framerate.&#xD;&#xA;&#xD;&#xA;Since you're writing an iPhone shmup, neither your `update` nor your `render` need be particularly CPU intensive; you can easily lock your framerate to 30Hz or 60Hz, not bother with implementation, and still have a smooth-looking game." />
  <row Id="27050" PostHistoryTypeId="25" PostId="12348" RevisionGUID="30e55512-f2aa-401d-bb62-a23b345bc9be" CreationDate="2011-05-16T06:12:12.070" Comment="http://twitter.com/#!/StackGameDev/status/70008626508611584" />
  <row Id="27051" PostHistoryTypeId="2" PostId="12353" RevisionGUID="07d6ef05-ef28-45c0-b149-6e3487359cb6" CreationDate="2011-05-16T06:30:47.413" UserId="7369" Text="It seems you are at the &quot;twiddling your thumb&quot; stage and not in the &quot;what should we use to code our next engine on&quot; stage, I would suggest neither learning OpenGL nor learning Direct3D. &#xD;&#xA;&#xD;&#xA;Find a higher-level library that makes things easy for you, and start doing rather than staring at the mountains of things that you think you need to learn first. &#xD;&#xA;&#xD;&#xA;You need to be comfortable with higher level concepts such as vector math, texture mapping, etc. before you are productive in OpenGL. So, pick a library, such as Ogre3D, Unity, Panda3D, etc. that makes sense for your platform, and start creating things. Once you are *doing* and not *staring*, then you can see what's the next thing to learn that would make sense. &#xD;&#xA;&#xD;&#xA;I bet OpenGL or Direct3D will pop up very late in that list of things to learn. &#xD;&#xA;" />
  <row Id="27052" PostHistoryTypeId="2" PostId="12354" RevisionGUID="7bf482c1-3a80-4623-91ec-3b61c69cc974" CreationDate="2011-05-16T06:36:09.687" UserId="6258" Text="So I'm thinking about making a small rpg, mainly to test out different design patterns I've been learning about. But the one question that I'm not too sure on how to approach is how to store an array of character moves in the best way possible.&#xD;&#xA;&#xD;&#xA;So lets say I have arrays of different sprites&#xD;&#xA;&#xD;&#xA;This is how I'm thinking about implementing it:&#xD;&#xA;array attack = new array (10);&#xD;&#xA;array attack2 = new array(5);&#xD;&#xA;&#xD;&#xA;(loop)&#xD;&#xA;//blit some image&#xD;&#xA;attack.push(imageInstance);&#xD;&#xA;(end loop)&#xD;&#xA;&#xD;&#xA;now every time I want the animation I call on attack or attack2, is there a better structure?&#xD;&#xA;the problem with that is lets say there are 100 different attacks, and a player can have up to 10 attacks equipped so how do I tell which attack the user has, should I use a hash map?" />
  <row Id="27053" PostHistoryTypeId="1" PostId="12354" RevisionGUID="7bf482c1-3a80-4623-91ec-3b61c69cc974" CreationDate="2011-05-16T06:36:09.687" UserId="6258" Text="How to store character moves (sprite animations)?" />
  <row Id="27054" PostHistoryTypeId="3" PostId="12354" RevisionGUID="7bf482c1-3a80-4623-91ec-3b61c69cc974" CreationDate="2011-05-16T06:36:09.687" UserId="6258" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;flash&gt;" />
  <row Id="27056" PostHistoryTypeId="10" PostId="12342" RevisionGUID="1e10f452-8c5a-436a-b8a8-b0919ffc8a29" CreationDate="2011-05-16T07:14:49.233" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;notabene&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="27057" PostHistoryTypeId="2" PostId="12356" RevisionGUID="2f220446-5d7f-4e7d-8423-ec3ec4f7825a" CreationDate="2011-05-16T08:34:06.403" UserId="1829" Text="I don't think the fact you are not an artist is that much of a downer, programmer are essential to make a game, and if you don't have content, it's not really a problem:&#xD;&#xA; - Do the game without content, and try to find artists after the game has more features: you will have more leverage, and you will have much less pressure to add those features.&#xD;&#xA; - Use an user-friendly 3D modeling tool, like sketchup." />
  <row Id="27058" PostHistoryTypeId="25" PostId="12354" RevisionGUID="b804eafe-7d4d-4ff4-96a2-080403200614" CreationDate="2011-05-16T09:12:12.873" Comment="http://twitter.com/#!/StackGameDev/status/70053927483219968" />
  <row Id="27059" PostHistoryTypeId="2" PostId="12357" RevisionGUID="2aa6dcb4-a34b-4811-869e-68ebf87741d4" CreationDate="2011-05-16T09:46:55.290" UserId="6365" Text="*Let's throw the skeptics about JavaScript games to dogs, look EA has done MMORTS in JavaScript [here][1] -- what!? If you are one of the skeptics [here][2], please, move to other question. -Yes, it is amazing!* &#xD;&#xA;&#xD;&#xA;So suppose I want to do a MMORTS in JavaScript. I have a small group of developers. I have sketched many scenes, players, groups, units and plots for a simple never-ending slow strategy game. What do I need to do anything like LoU, the massive multiplayer game?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lordofultima.com/en/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1396/essential-knowledge-for-making-html-javascript-based-games/1411#1411" />
  <row Id="27060" PostHistoryTypeId="1" PostId="12357" RevisionGUID="2aa6dcb4-a34b-4811-869e-68ebf87741d4" CreationDate="2011-05-16T09:46:55.290" UserId="6365" Text="What do I need to do a MMORTS in JavaScript with small amount of Developers?" />
  <row Id="27061" PostHistoryTypeId="3" PostId="12357" RevisionGUID="2aa6dcb4-a34b-4811-869e-68ebf87741d4" CreationDate="2011-05-16T09:46:55.290" UserId="6365" Text="&lt;multiplayer&gt;&lt;mmo&gt;&lt;javascript&gt;" />
  <row Id="27062" PostHistoryTypeId="2" PostId="12358" RevisionGUID="3d56d635-b944-4881-9b92-1019cefe3ce4" CreationDate="2011-05-16T10:28:00.647" UserId="5824" Text="To get some free artwork have a look at these other questions:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/2400/open-source-3d-models-easily-usable-in-ogre3d-jmonkeyengine&#xD;&#xA;&#xD;&#xA;This of course probably won't look as good as artwork made specifically for your game, but you can always replace it later on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another option is to take photos of things and use those. It's fairly simple to create a [texture][1] or [cubemap][2] from a photo for example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escalight.com/tutorials/photoshop-tutorials/creating-seamless-texture-from-a-photo.html&#xD;&#xA;  [2]: http://blogs.msdn.com/b/shawnhar/archive/2008/03/04/cubemaps-the-salt-of-computer-graphics.aspx" />
  <row Id="27063" PostHistoryTypeId="5" PostId="12354" RevisionGUID="9c3ab04e-dc70-424b-92e9-cb94f8c1ddab" CreationDate="2011-05-16T10:48:26.933" UserId="1156" Comment="added 42 characters in body; edited tags" Text="So I'm thinking about making a small rpg, mainly to test out different design patterns I've been learning about. But the one question that I'm not too sure on how to approach is how to store an array of character moves in the best way possible.&#xD;&#xA;&#xD;&#xA;So let's say I have arrays of different sprites.&#xD;&#xA;&#xD;&#xA;This is how I'm thinking about implementing it:&#xD;&#xA;&#xD;&#xA;    array attack = new array (10); &#xD;&#xA;    array attack2 = new array(5);&#xD;&#xA;        &#xD;&#xA;    (loop) &#xD;&#xA;    //blit some image &#xD;&#xA;    attack.push(imageInstance); &#xD;&#xA;    (end loop)&#xD;&#xA;&#xD;&#xA;Now every time I want the animation I call on attack or attack2; is there a better structure?&#xD;&#xA;The problem with this is let's say there are 100 different attacks, and a player can have up to 10 attacks equipped. So how do I tell which attack the user has; should I use a hash map?" />
  <row Id="27064" PostHistoryTypeId="6" PostId="12354" RevisionGUID="9c3ab04e-dc70-424b-92e9-cb94f8c1ddab" CreationDate="2011-05-16T10:48:26.933" UserId="1156" Comment="added 42 characters in body; edited tags" Text="&lt;architecture&gt;&lt;flash&gt;&lt;animation&gt;&lt;sprites&gt;&lt;rpg&gt;" />
  <row Id="27065" PostHistoryTypeId="5" PostId="12348" RevisionGUID="4effa755-d6f6-4831-8177-3d851576a4b8" CreationDate="2011-05-16T10:49:03.717" UserId="1156" Comment="added 8 characters in body" Text="I have always been a software developer, but lately I've been wanting to get into games. The only thing stopping me is the fact that I'm a programmer, not an artist. I've made some simple stuff, Tetris, 2D chess things like that but I can't do much art and that's really what holds me back. &#xD;&#xA;&#xD;&#xA;Now the problem is, I've yet to go to college so most commercial projects wouldn't accept me even to work for free and learn a bit especially with my lack of experience in games and any indie projects I've looked into really have an issue with responding to people interested, or actually completing (or starting really, most don't get past the ideas on paper) the project they want to do. I've looked around locally for artists, anyone who can do modeling, textures or animating or even anyone with some ability to make some more advanced 2D assets to get something like a side-scrolling RPG or something but haven't been able to find anyone.&#xD;&#xA;&#xD;&#xA;So how do you guys do it? Do I really just have to wait until I can go to college to see if I like working with games or is there some way I can get art (for free, anything I do is just going to be for fun so I don't want to have to sink money into it) and just start messing around on my own? Or am I just having bad luck and not looking in the right places for other people interested in having me help? &#xD;&#xA;&#xD;&#xA;I'm not looking for anything in particular, just something to fill some time with and see if I like making games. If not, well I'll go back to my software projects. I just have one more year of highschool and I'd like to try a few different areas before I go to college." />
  <row Id="27066" PostHistoryTypeId="2" PostId="12359" RevisionGUID="e7677629-9e99-4020-a1d1-625059e15d59" CreationDate="2011-05-16T12:00:26.740" UserId="3289" Text="You could always go for the &quot;less is more&quot; approach and use as little and as simple artwork  as possible. &#xD;&#xA;&#xD;&#xA;Retro-style vector graphics are pretty popular these days, so there's plenty of inspiration to get there. Just draw some lines and make 'em glow a bit." />
  <row Id="27067" PostHistoryTypeId="25" PostId="12357" RevisionGUID="b7da63b4-088a-472d-8fd8-5aa9c8390dc5" CreationDate="2011-05-16T12:12:13.100" Comment="http://twitter.com/#!/StackGameDev/status/70099227895803904" />
  <row Id="27068" PostHistoryTypeId="2" PostId="12360" RevisionGUID="8e1b1bbd-948c-433d-b996-5ce83b862067" CreationDate="2011-05-16T12:24:40.687" UserId="1072" Text="Title pretty much says it all. I'm working on a simple 'lets get used to lwjgl' project involving manipulation of a rubik's cube, and I can't figure out how to tell which side/square the user's pointing at." />
  <row Id="27069" PostHistoryTypeId="1" PostId="12360" RevisionGUID="8e1b1bbd-948c-433d-b996-5ce83b862067" CreationDate="2011-05-16T12:24:40.687" UserId="1072" Text="How do you determine which object/surface the user's pointing at with lwjgl?" />
  <row Id="27070" PostHistoryTypeId="3" PostId="12360" RevisionGUID="8e1b1bbd-948c-433d-b996-5ce83b862067" CreationDate="2011-05-16T12:24:40.687" UserId="1072" Text="&lt;interface&gt;&lt;lwjgl&gt;" />
  <row Id="27071" PostHistoryTypeId="2" PostId="12361" RevisionGUID="0bce0484-a497-4263-b0d8-fe526a866eeb" CreationDate="2011-05-16T12:27:21.810" UserId="4410" Text="You can write any kind of game in any language you like. Whether you should or not is a different question and is up to you to judge.&#xD;&#xA;&#xD;&#xA;It's also not all Javascript, from their own [Q&amp;A][1] (under Tech Info), &quot;The game client is written directly in JavaScript, using Qooxdoo as base user interface library. The server software is written in C#. Our game servers are running Windows Server/IIS.&quot;&#xD;&#xA;&#xD;&#xA;If you've got a small number of developers I'd use as much middleware as possible to cut down development time, you can then focus your time on making the game rather than on making tech.&#xD;&#xA;&#xD;&#xA;I'd also recommend starting small, trying to jump in and write a full blown MMO is a big task and requires an incredible amount of effort (both on the development side for client and server, balancing and maintenance). Unless you've got an experienced development team on hand I'd just focus on making an RTS first, then maybe add some multiplayer functionality to it, then try and make it into an MMO.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lordofultima.com/en/wiki/view/developer+q&amp;a" />
  <row Id="27072" PostHistoryTypeId="6" PostId="12360" RevisionGUID="ae309199-c295-4b81-aa52-f440628ecbbf" CreationDate="2011-05-16T12:43:22.637" UserId="1072" Comment="added more tags." Text="&lt;opengl&gt;&lt;java&gt;&lt;interface&gt;&lt;lwjgl&gt;" />
  <row Id="27073" PostHistoryTypeId="2" PostId="12362" RevisionGUID="3825f2e8-70a3-43ac-88f4-a3b011581304" CreationDate="2011-05-16T12:48:31.933" UserId="7375" Text="I've been looking for a formula to plot (world-&gt;screen) and mouse pick (world-&gt;screen) isometric tiles in a diamond-shaped world.&#xD;&#xA;The ones I've tried always seem to be, well, off.&#xD;&#xA;What's the usual/correct way to do this?" />
  <row Id="27074" PostHistoryTypeId="1" PostId="12362" RevisionGUID="3825f2e8-70a3-43ac-88f4-a3b011581304" CreationDate="2011-05-16T12:48:31.933" UserId="7375" Text="Isometric rendering and picking?" />
  <row Id="27075" PostHistoryTypeId="3" PostId="12362" RevisionGUID="3825f2e8-70a3-43ac-88f4-a3b011581304" CreationDate="2011-05-16T12:48:31.933" UserId="7375" Text="&lt;rendering&gt;&lt;tiles&gt;&lt;isometric&gt;&lt;mouse&gt;" />
  <row Id="27076" PostHistoryTypeId="2" PostId="12363" RevisionGUID="92bd83f5-f506-46bc-9a24-391c6229da29" CreationDate="2011-05-16T13:05:10.357" UserId="7389" Text="Here's a thread that contains a ton of links that you'll find useful; everything from legal, to art to music, etc.&#xD;&#xA;http://www.mangatutorials.com/forum/showthread.php?742-The-Ultimate-Indie-Game-Developer-Resource-List&#xD;&#xA;&#xD;&#xA;It's mentioned in other answers, but while you're looking for an artist etc, you should be developing your game at the same time. Use programmer art, stand-ins, free sprites anything. Most of the time, before even thinking about final assets, I just want something up and running quickly to see if it's fun. Prototype the crap out of it and find the game. Then, when the gameplay's locked down, you can start putting in the proper art. Doing it the other way around leads to lost money, and work that needs to be redone multiple times, which aside from harming your project, sucks your motivation to finish it (and if you're making a game to get a job, showing that you can finish a project is a good thing).&#xD;&#xA;&#xD;&#xA;If you still can't find an artist, then make the graphics yourself. Dwarf Fortress was mentioned, but there's also games like Geometry Wars, where the graphics are created through math. Anything is possible to get around if you put your mind to it." />
  <row Id="27077" PostHistoryTypeId="2" PostId="12364" RevisionGUID="3a36d49b-c2f6-48d2-b6ed-e480c1c58dc5" CreationDate="2011-05-16T13:14:02.680" UserId="6937" Text="I wouldn't worry about art so much at your current state. The first game I ever managed to get to a satisfactory level of completion, I did completely without an artist and it was before I started college. &#xD;&#xA;&#xD;&#xA;In my view, you have four good options depending on your level of game programming:&#xD;&#xA;&#xD;&#xA; 1. You can find a good game programming book that has a project which includes all of the art and you can get a feel of if you like the work involved in game programming&#xD;&#xA; 2. You can find a game engine that lets you write mods on using their artwork&#xD;&#xA; 3. Use Unity3d or Torque Game Engine, look those up, both have asset stores with some free art&#xD;&#xA; 4. You can take my route which I think is the best :) You can start programming a game and write the main functionality of the engine. Use extremely ugly art for it, like blocks or stick figure sprites. Then once you have a working engine, post it up on GameDev.net's help wanted forums. I got my first two artists this way. They liked the gameplay of my flight sim even though the plane was made up of 4 blocks and the terrain was painted in a terrain editor." />
  <row Id="27078" PostHistoryTypeId="2" PostId="12365" RevisionGUID="5a1c2441-c521-4776-a9ec-e1dbd1105290" CreationDate="2011-05-16T13:21:28.247" UserId="7392" Text="I agree with the previous comment. Programming a very simple game engine will take you somewhere between 200-1000 man-hours minimum. Low poly 3D models will take 2-days to a month (full time work) each, depending on the quality required. For my game I used a top-down view and deliberatly crappy hand-drawn 2D sprites so that I only have to draw one view of each monster etc (1 hour each). I'm making my own 3D engine (it's taken about 300 hours of programming so far) but a better shortcut would be to use an existing engine for 3D (e.g. Unreal or Quake III) or a 2D game maker like Yoyo's GameMaker. Avoid free sample sounds/textures/models as these often require loads of post-processing work just to get them to load into your game nicely - better to use a home-made placeholder. http://antongerdelan.net/crongdor/" />
  <row Id="27079" PostHistoryTypeId="6" PostId="5199" RevisionGUID="402656f8-2fbd-4be1-b590-ee96649d7bb2" CreationDate="2011-05-16T13:40:36.330" UserId="2698" Comment="edited tags" Text="&lt;game-design&gt;&lt;graphics&gt;&lt;tiles&gt;&lt;isometric&gt;" />
  <row Id="27080" PostHistoryTypeId="6" PostId="1228" RevisionGUID="5e3c89d4-87af-4b50-ab25-c08f1f8f2363" CreationDate="2011-05-16T13:40:54.443" UserId="2698" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;planning&gt;&lt;isometric&gt;" />
  <row Id="27081" PostHistoryTypeId="6" PostId="3454" RevisionGUID="dec5ea47-9f5b-4af4-8df8-08f4fcba6f03" CreationDate="2011-05-16T13:42:06.313" UserId="2698" Comment="edited tags" Text="&lt;3d&gt;&lt;actionscript-3&gt;&lt;isometric&gt;" />
  <row Id="27082" PostHistoryTypeId="5" PostId="651" RevisionGUID="ef1d6827-8af3-4fbd-9f6e-c5288dce51cb" CreationDate="2011-05-16T14:12:04.200" UserId="3588" Comment="Added the missing [gameloop] tag. Also, touched up the last sentence to not drag on like it did." Text="Can anyone recommend some good tips, articles, sites, etc. for writing the main game loop?  What are some things that you should do in the game loop, and what are some things that you shouldn't do in the game loop?  &#xD;&#xA;&#xD;&#xA;I've written plenty of these, but I've never really read up on game loops. I'm sure I could improve them considerably if I read more about them." />
  <row Id="27083" PostHistoryTypeId="6" PostId="651" RevisionGUID="ef1d6827-8af3-4fbd-9f6e-c5288dce51cb" CreationDate="2011-05-16T14:12:04.200" UserId="3588" Comment="Added the missing [gameloop] tag. Also, touched up the last sentence to not drag on like it did." Text="&lt;engine&gt;&lt;architecture&gt;&lt;gameloop&gt;" />
  <row Id="27084" PostHistoryTypeId="24" PostId="651" RevisionGUID="ef1d6827-8af3-4fbd-9f6e-c5288dce51cb" CreationDate="2011-05-16T14:12:04.200" Comment="Proposed by 3588 approved by 51 edit id of 432" />
  <row Id="27085" PostHistoryTypeId="2" PostId="12366" RevisionGUID="cfabc6d4-14c8-4900-ae7c-e341011108f3" CreationDate="2011-05-16T14:19:40.543" UserId="6117" Text="I think it's a great to see actual pretty things happen on the screen in the development process. Small projects often follow graphical artistic / lore concepts from the beginning as a guideline and a it's very strong motivator.&#xD;&#xA;&#xD;&#xA;I might be wrong about this but from the perception i get, most indie projects that actually ever see the light of day are either made by single devs who do the whole thing both art and programming (i hate them) or small teams who have someone on the art, but rarely a programmer who hired someone in the end of development to replace the placeholders - even though this method should work in theory.&#xD;&#xA;&#xD;&#xA;Try to find a friend, co worker, a girlfriend, wife, whatever, someone who can DRAW. They don't have to know how to work with any software or use a mouse.  Tell them you want to make a game and need someone to do the drawing while you do the programming. If not someone you know from your life find some artist online or in forums. Work on an idea together. &#xD;&#xA;I actually had the same dilemma as you until i saw some drawings a friend made on his Facebook page, anyway, I posted [this][1] question that may seem relevant. &#xD;&#xA;&#xD;&#xA;An alternative could be doing a game with some abstract graphics concept thingy that anyone could draw. Like stickman games, but can easily be more than that. Or some abstract 3D in a level that could be created after 2 days of learning from Lynda. It worked for MineCraft :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/11792/teaching-a-coder-to-draw-his-own-2d-assets" />
  <row Id="27086" PostHistoryTypeId="2" PostId="12367" RevisionGUID="b5e9f28c-922e-4dc1-b9f7-8382c8cd3d06" CreationDate="2011-05-16T14:58:36.950" UserId="1430" Text="The technique you're looking for is called &quot;picking&quot; or &quot;3D picking.&quot; There are several ways to do it; one of the more common ones is to transform a 2D point on the screen into eye space by using the inverse of the projection transformation. This will allow you to generate a ray in view space, which you can use to test for collision with the physical representation of your various bits of scene geometry to determine which object the user 'hit.' &#xD;&#xA;&#xD;&#xA;You can also use a &quot;picking buffer&quot; (or &quot;selection buffer&quot;) which GL has support for. This basically involves writing some unique object identifier into a buffer for every pixel and then simply testing that buffer. &#xD;&#xA;&#xD;&#xA;[The OpenGL FAQ has brief discussions on both][1] (it focuses more on the selection buffer since that's entirely a GL feature; ray picking is API agnostic except perhaps for extracting the active matrices from the pipeline). [Here is a more specific example of the ray picking technique][2] (for iOS, but it should translate easily enough). [This site][3] has some source code to some of the OpenGL Red Book examples ported to LWJGL, which include a picking demo.&#xD;&#xA;&#xD;&#xA;See also [this question][4] on SO.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/faq/technical/selection.htm&#xD;&#xA;  [2]: http://eigenclass.blogspot.com/2008/10/opengl-es-picking-using-ray-boundingbox.html&#xD;&#xA;  [3]: http://ciardhubh.de/node/13&#xD;&#xA;  [4]: http://stackoverflow.com/questions/2093096/implementing-ray-picking" />
  <row Id="27087" PostHistoryTypeId="2" PostId="12368" RevisionGUID="e2d89bdc-e3d6-476b-b690-44ae3740bfe1" CreationDate="2011-05-16T15:02:13.283" UserId="370" Text="**Fully Fixed**&#xD;&#xA;&#xD;&#xA;You loose most of the benefits of a fixed timestep when you throw in a variable step once each frame.&#xD;&#xA;&#xD;&#xA;Noel Lopis has a [great write up][1] on how he implemented a fixed time step in his game [Casey's Contraptions][2].  As bonus to you he is an iphone developer, though his technique is not iphone specific.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/casey-and-the-clearly-deterministic-contraptions&#xD;&#xA;  [2]: http://www.caseyscontraptions.com/" />
  <row Id="27088" PostHistoryTypeId="25" PostId="12362" RevisionGUID="93d5f360-54cb-4829-9ae5-30b7dfa60aa7" CreationDate="2011-05-16T15:12:12.640" Comment="http://twitter.com/#!/StackGameDev/status/70144524420259841" />
  <row Id="27089" PostHistoryTypeId="5" PostId="12368" RevisionGUID="94328629-1dfa-48ee-87b0-903726320b54" CreationDate="2011-05-16T15:39:09.913" UserId="370" Comment="added article summary" Text="**Fully Fixed**&#xD;&#xA;&#xD;&#xA;You loose most of the benefits of a fixed timestep when you throw in a variable step once each frame.&#xD;&#xA;&#xD;&#xA;Noel Lopis has a [great write up][1] on how he implemented a fixed time step in his game [Casey's Contraptions][2].  As bonus to you he is an iphone developer, though his technique is not iphone specific.&#xD;&#xA;&#xD;&#xA;Some highlights from the article&#xD;&#xA;&#xD;&#xA;* Use a time accumulator.&#xD;&#xA;* Use 120Hz physics rate for a 60Hz frame rate.&#xD;&#xA;* Simulate one fixed step into future and use left over time accumulation to lerp drawing code between current physics state and future physics state.&#xD;&#xA;* various gotchas&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesfromwithin.com/casey-and-the-clearly-deterministic-contraptions&#xD;&#xA;  [2]: http://www.caseyscontraptions.com/" />
  <row Id="27090" PostHistoryTypeId="2" PostId="12369" RevisionGUID="9c881442-b382-4b37-8c4d-8c66d5cea753" CreationDate="2011-05-16T15:44:46.867" UserId="7398" Text="Never implemented this before but...&#xD;&#xA;&#xD;&#xA;Send scores incrementally with timestamps. This gives you a log to see how often the score improved as well as a way to trace the highscore's &quot;momentum&quot;.&#xD;&#xA;&#xD;&#xA;You would then set milestones/criteria for your scores.&#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;A score greater than 20,000 can not arrive in first 20secs of a game.&#xD;&#xA;An score greater than 250,000 can not arrive without an entry greater than 200,000. &#xD;&#xA;&#xD;&#xA;This is not exactly the same as sending a game state, but close to it. &#xD;&#xA;&#xD;&#xA;Side Benefit: Think of all the useful game play statistics you would get from this. Someone would prob pay good money for that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27091" PostHistoryTypeId="6" PostId="1228" RevisionGUID="2a7cde52-bc5f-4048-ba66-96bfabe81a8c" CreationDate="2011-05-16T15:50:11.357" UserId="51" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;isometric&gt;" />
  <row Id="27092" PostHistoryTypeId="2" PostId="12370" RevisionGUID="1f5cd1e7-e013-44a3-82ac-5ea41905f071" CreationDate="2011-05-16T15:59:38.653" UserId="7191" Text="You'll want to use 3D picking. Here's some code I use in [my game][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I cast a ray from my camera, using the mouse to unproject a position in 3D space. This is that code from my camera class:&#xD;&#xA;&#xD;&#xA;    public Ray GetPickRay() {&#xD;&#xA;        int mouseX = Mouse.getX();&#xD;&#xA;        int mouseY = WORLD.Byte56Game.getHeight() - Mouse.getY();&#xD;&#xA;&#xD;&#xA;        float windowWidth = WORLD.Byte56Game.getWidth();&#xD;&#xA;        float windowHeight = WORLD.Byte56Game.getHeight();&#xD;&#xA;&#xD;&#xA;        double screenSpaceX = ((float) mouseX / (windowWidth / 2) - 1.0f) * aspectRatio;&#xD;&#xA;        double screenSpaceY = (1.0f - (float) mouseY / (windowHeight / 2));&#xD;&#xA;        double viewRatio = Math.tan((float) Math.PI / 4.0f / 2.00f);&#xD;&#xA;&#xD;&#xA;        screenSpaceX = screenSpaceX * viewRatio;&#xD;&#xA;        screenSpaceY = screenSpaceY * viewRatio;&#xD;&#xA;&#xD;&#xA;        Vector4f cameraSpaceNear = new Vector4f((float) (screenSpaceX * NearPlane), (float) (screenSpaceY * NearPlane), (float) (-NearPlane), 1);&#xD;&#xA;        Vector4f cameraSpaceFar = new Vector4f((float) (screenSpaceX * FarPlane), (float) (screenSpaceY * FarPlane), (float) (-FarPlane), 1);&#xD;&#xA;&#xD;&#xA;        Matrix4f tmpView = Matrix4f(view);&#xD;&#xA;        Matrix4f invView = (Matrix4f) tmpView.invert();&#xD;&#xA;        Vector4f worldSpaceNear = new Vector4f();&#xD;&#xA;        Matrix4f.transform(invView, cameraSpaceNear, worldSpaceNear);&#xD;&#xA;&#xD;&#xA;        Vector4f worldSpaceFar = new Vector4f();&#xD;&#xA;&#xD;&#xA;        Matrix4f.transform(invView, cameraSpaceFar, worldSpaceFar);&#xD;&#xA;&#xD;&#xA;        Vector3f rayPosition = new Vector3f(worldSpaceNear.x, worldSpaceNear.y, worldSpaceNear.z);&#xD;&#xA;        Vector3f rayDirection = new Vector3f(worldSpaceFar.x - worldSpaceNear.x, worldSpaceFar.y - worldSpaceNear.y, worldSpaceFar.z - worldSpaceNear.z);&#xD;&#xA;&#xD;&#xA;        rayDirection.normalise();&#xD;&#xA;&#xD;&#xA;        return new Ray(rayPosition, rayDirection);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then I follow out the ray until it intersects with an object, you can do this with bounding boxes or something similar, since this is specific to your game, I'll let you handle that. Generally this is done by following the ray out (adding the direction of the ray to it's starting point over and over 'till you bump into something).&#xD;&#xA;&#xD;&#xA;Next you want to see which face is being picked, you can do that by iterating over the triangles in your cube to see if the ray intersects them. The following function does that and returns the distance to the picked face, then I just use the intersected face that's closest to the camera (so you're not picking the back face).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public static float RayIntersectsTriangle(Ray R, Vector3f vertex1, Vector3f vertex2, Vector3f vertex3) {&#xD;&#xA;        // Compute vectors along two edges of the triangle.&#xD;&#xA;        Vector3f edge1 = null, edge2 = null;&#xD;&#xA;        &#xD;&#xA;        edge1 = Vector3f.sub(vertex2, vertex1, edge1);&#xD;&#xA;        edge2 = Vector3f.sub(vertex3, vertex1, edge2);&#xD;&#xA;&#xD;&#xA;        // Compute the determinant.&#xD;&#xA;        Vector3f directionCrossEdge2 = null;&#xD;&#xA;        directionCrossEdge2 = Vector3f.cross(R.Direction, edge2, directionCrossEdge2);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float determinant = Vector3f.dot(directionCrossEdge2, edge1);&#xD;&#xA;        // If the ray and triangle are parallel, there is no collision.&#xD;&#xA;        if (determinant &gt; -.0000001f &amp;&amp; determinant &lt; .0000001f) {&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        float inverseDeterminant = 1.0f / determinant;&#xD;&#xA;&#xD;&#xA;        // Calculate the U parameter of the intersection point.&#xD;&#xA;        Vector3f distanceVector = null;&#xD;&#xA;        distanceVector = Vector3f.sub(R.Position, vertex1, distanceVector);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float triangleU = Vector3f.dot(directionCrossEdge2, distanceVector);&#xD;&#xA;        triangleU *= inverseDeterminant;&#xD;&#xA;&#xD;&#xA;        // Make sure the U is inside the triangle.&#xD;&#xA;        if (triangleU &lt; 0 || triangleU &gt; 1) {&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Calculate the V parameter of the intersection point.&#xD;&#xA;        Vector3f distanceCrossEdge1 = null;&#xD;&#xA;        distanceCrossEdge1 = Vector3f.cross(distanceVector, edge1, distanceCrossEdge1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float triangleV = Vector3f.dot(R.Direction, distanceCrossEdge1);&#xD;&#xA;        triangleV *= inverseDeterminant;&#xD;&#xA;&#xD;&#xA;        // Make sure the V is inside the triangle.&#xD;&#xA;        if (triangleV &lt; 0 || triangleU + triangleV &gt; 1) {&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Get the distance to the face from our ray origin&#xD;&#xA;        float rayDistance = Vector3f.dot(distanceCrossEdge1, edge2);&#xD;&#xA;        rayDistance *= inverseDeterminant;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        // Is the triangle behind us?&#xD;&#xA;        if (rayDistance &lt; 0) {&#xD;&#xA;            rayDistance *= -1;&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        return rayDistance;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The triangle with the shortest distance is the picked triangle.&#xD;&#xA;&#xD;&#xA;  [1]: http://byte56.com" />
  <row Id="27094" PostHistoryTypeId="2" PostId="12371" RevisionGUID="1d72f6b3-08a3-437e-a78f-b9d3fdc1b9cb" CreationDate="2011-05-16T16:27:20.357" UserId="34" Text="Personally, I have the Red Book (OpenGL Programming Guide) and the OpenGL SuperBible around as my go to references, along with the OpenGL ES Programming Guide as well since I am focused more on iOS.&#xD;&#xA;&#xD;&#xA;I initially tried learning with various intro to OpenGL books over the years, but none of them really helped at all.  What really ended up being helpful was looking at various blogs and tutorials and slowly building up to what I was trying to do. I re-wrote whole parts of my engine early on as I discovered new techniques -- so don't get caught up with trying to find a book that covers exactly what you think you need early on.  Just get some good references and then use online content to get you moving.  Don't neglect reading articles focused on Direct X either -- most of the concepts can be translated between the two APIs with the help of a good reference." />
  <row Id="27095" PostHistoryTypeId="16" PostId="12371" RevisionGUID="552f7aa9-40c4-4aaa-9ce6-89b0cd1b1b06" CreationDate="2011-05-16T16:27:20.357" UserId="34" />
  <row Id="27096" PostHistoryTypeId="2" PostId="12372" RevisionGUID="359f5f60-3ad8-4771-b4dc-b0207de2d5d5" CreationDate="2011-05-16T16:33:42.133" UserId="696" Text="We're in a similar situation when it comes to art, me and a friend build [games][1] in our spare time. We're both developers who love games, we must've started a dozen game projects.&#xD;&#xA;&#xD;&#xA;The projects that have stuck, we've approached a number of people on artist community sites whose art styles have matched our ideas.&#xD;&#xA;&#xD;&#xA;Having a project up and running, ready to show you're serious and to demonstrate your passion for the project has been enough for us to generate some interest.&#xD;&#xA;&#xD;&#xA;Give it a go :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cryodefense.com" />
  <row Id="27097" PostHistoryTypeId="12" PostId="12370" RevisionGUID="68b52846-01e7-4379-ab1d-207b18a465a2" CreationDate="2011-05-16T16:35:55.703" UserId="7191" Text="[{&quot;Id&quot;:7191,&quot;DisplayName&quot;:&quot;Byte56&quot;}]" />
  <row Id="27098" PostHistoryTypeId="5" PostId="12370" RevisionGUID="7cc35ba4-f494-41f7-97c1-5f66cd002eb3" CreationDate="2011-05-16T16:42:05.607" UserId="7191" Comment="added 308 characters in body; added 143 characters in body" Text="You'll want to use 3D picking. Here's some code I use in my game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I cast a ray from my camera. I'm using the mouse, but if you're just using where the user is looking, you can just use the center of the window. This is that code from my camera class:&#xD;&#xA;&#xD;&#xA;    public Ray GetPickRay() {&#xD;&#xA;        int mouseX = Mouse.getX();&#xD;&#xA;        int mouseY = WORLD.Byte56Game.getHeight() - Mouse.getY();&#xD;&#xA;&#xD;&#xA;        float windowWidth = WORLD.Byte56Game.getWidth();&#xD;&#xA;        float windowHeight = WORLD.Byte56Game.getHeight();&#xD;&#xA;&#xD;&#xA;        //get the mouse position in screenSpace coords&#xD;&#xA;        double screenSpaceX = ((float) mouseX / (windowWidth / 2) - 1.0f) * aspectRatio;&#xD;&#xA;        double screenSpaceY = (1.0f - (float) mouseY / (windowHeight / 2));&#xD;&#xA;&#xD;&#xA;        double viewRatio = Math.tan((float) Math.PI / 4.0f / 2.00f);&#xD;&#xA;&#xD;&#xA;        screenSpaceX = screenSpaceX * viewRatio;&#xD;&#xA;        screenSpaceY = screenSpaceY * viewRatio;&#xD;&#xA;&#xD;&#xA;        //Find the far and near camera spaces&#xD;&#xA;        Vector4f cameraSpaceNear = new Vector4f((float) (screenSpaceX * NearPlane), (float) (screenSpaceY * NearPlane), (float) (-NearPlane), 1);&#xD;&#xA;        Vector4f cameraSpaceFar = new Vector4f((float) (screenSpaceX * FarPlane), (float) (screenSpaceY * FarPlane), (float) (-FarPlane), 1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        //Unproject the 2D window into 3D to see where in 3D we're actually clicking&#xD;&#xA;        Matrix4f tmpView = Matrix4f(view);&#xD;&#xA;        Matrix4f invView = (Matrix4f) tmpView.invert();&#xD;&#xA;        Vector4f worldSpaceNear = new Vector4f();&#xD;&#xA;        Matrix4f.transform(invView, cameraSpaceNear, worldSpaceNear);&#xD;&#xA;&#xD;&#xA;        Vector4f worldSpaceFar = new Vector4f();&#xD;&#xA;&#xD;&#xA;        Matrix4f.transform(invView, cameraSpaceFar, worldSpaceFar);&#xD;&#xA;&#xD;&#xA;        //calculate the ray position and direction&#xD;&#xA;        Vector3f rayPosition = new Vector3f(worldSpaceNear.x, worldSpaceNear.y, worldSpaceNear.z);&#xD;&#xA;        Vector3f rayDirection = new Vector3f(worldSpaceFar.x - worldSpaceNear.x, worldSpaceFar.y - worldSpaceNear.y, worldSpaceFar.z - worldSpaceNear.z);&#xD;&#xA;&#xD;&#xA;        rayDirection.normalise();&#xD;&#xA;&#xD;&#xA;        return new Ray(rayPosition, rayDirection);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then I follow out the ray until it intersects with an object, you can do this with bounding boxes or something similar, since this is specific to your game, I'll let you handle that. Generally this is done by following the ray out (adding the direction of the ray to it's starting point over and over 'till you bump into something).&#xD;&#xA;&#xD;&#xA;Next you want to see which face is being picked, you can do that by iterating over the triangles in your cube to see if the ray intersects them. The following function does that and returns the distance to the picked face, then I just use the intersected face that's closest to the camera (so you're not picking the back face).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public static float RayIntersectsTriangle(Ray R, Vector3f vertex1, Vector3f vertex2, Vector3f vertex3) {&#xD;&#xA;        // Compute vectors along two edges of the triangle.&#xD;&#xA;        Vector3f edge1 = null, edge2 = null;&#xD;&#xA;        &#xD;&#xA;        edge1 = Vector3f.sub(vertex2, vertex1, edge1);&#xD;&#xA;        edge2 = Vector3f.sub(vertex3, vertex1, edge2);&#xD;&#xA;&#xD;&#xA;        // Compute the determinant.&#xD;&#xA;        Vector3f directionCrossEdge2 = null;&#xD;&#xA;        directionCrossEdge2 = Vector3f.cross(R.Direction, edge2, directionCrossEdge2);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float determinant = Vector3f.dot(directionCrossEdge2, edge1);&#xD;&#xA;        // If the ray and triangle are parallel, there is no collision.&#xD;&#xA;        if (determinant &gt; -.0000001f &amp;&amp; determinant &lt; .0000001f) {&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        float inverseDeterminant = 1.0f / determinant;&#xD;&#xA;&#xD;&#xA;        // Calculate the U parameter of the intersection point.&#xD;&#xA;        Vector3f distanceVector = null;&#xD;&#xA;        distanceVector = Vector3f.sub(R.Position, vertex1, distanceVector);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float triangleU = Vector3f.dot(directionCrossEdge2, distanceVector);&#xD;&#xA;        triangleU *= inverseDeterminant;&#xD;&#xA;&#xD;&#xA;        // Make sure the U is inside the triangle.&#xD;&#xA;        if (triangleU &lt; 0 || triangleU &gt; 1) {&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Calculate the V parameter of the intersection point.&#xD;&#xA;        Vector3f distanceCrossEdge1 = null;&#xD;&#xA;        distanceCrossEdge1 = Vector3f.cross(distanceVector, edge1, distanceCrossEdge1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float triangleV = Vector3f.dot(R.Direction, distanceCrossEdge1);&#xD;&#xA;        triangleV *= inverseDeterminant;&#xD;&#xA;&#xD;&#xA;        // Make sure the V is inside the triangle.&#xD;&#xA;        if (triangleV &lt; 0 || triangleU + triangleV &gt; 1) {&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Get the distance to the face from our ray origin&#xD;&#xA;        float rayDistance = Vector3f.dot(distanceCrossEdge1, edge2);&#xD;&#xA;        rayDistance *= inverseDeterminant;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        // Is the triangle behind us?&#xD;&#xA;        if (rayDistance &lt; 0) {&#xD;&#xA;            rayDistance *= -1;&#xD;&#xA;            return Float.MAX_VALUE;&#xD;&#xA;        }&#xD;&#xA;        return rayDistance;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The triangle with the shortest distance is the picked triangle. Also, shameless plug for my game, you should check it out, follow it and vote in the polls I put out occasionally. Thanks! [http://byte56.com][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://byte56.com" />
  <row Id="27099" PostHistoryTypeId="13" PostId="12370" RevisionGUID="858cecc8-3e92-4ae0-9a1b-15f1d121ddd2" CreationDate="2011-05-16T16:43:43.593" UserId="7191" Text="[{&quot;Id&quot;:7191,&quot;DisplayName&quot;:&quot;Byte56&quot;}]" />
  <row Id="27100" PostHistoryTypeId="2" PostId="12373" RevisionGUID="45673076-f38b-4d67-a220-fd1545b66813" CreationDate="2011-05-16T16:52:52.060" UserId="34" Text="I don't see in your code where you are calling drawRect: (also related, you have it in your example as drawView: -- the method is drawRect:) explicitly, which leads me to believe that you are letting the OS call you when it thinks it is needed.  By default, UIViews will keep the contents of the backing CALayer in memory, so when the OS needs to scroll your view around, it simply blits the contents of the CALayer again instead of calling drawView:.  What you should be doing is calling setNeedsDisplay anytime you have determined that you need to zoom or change the contents.  This tells the OS that it should be call drawRect: at the next chance it gets.&#xD;&#xA;&#xD;&#xA;Also, you should not extend UIScrollView for this.  You should extend UIView and then place that view inside of a UIScrollView.  That is how the API was intended to work.  You are basically mucking around the innards of the UIScrollView and replacing it's CALayer with a CAEAGLLayer, which is not what it is expecting.  Even if it works now, it may be broken with a future SDK release.&#xD;&#xA;&#xD;&#xA;My recommendation for now would be to get it working properly without the UIScrollView, just to make sure you have everything in order.  Once you get that working, drop it back inside a UIScrollView and make sure it still works." />
  <row Id="27101" PostHistoryTypeId="2" PostId="12374" RevisionGUID="ea8a9676-e661-4599-96e8-76b8853e09d9" CreationDate="2011-05-16T17:21:22.870" UserId="1217" Text="I'm trying to figure out if I should refurbish and refactor a game I and some friends have made. It's released on kongregate and wasn't a super hit but I feel there's a lot of interesting techniques and solutions going on that new or intermediate developers would like to see. The only thing that's holding me back is that I don't know if people are interested in it at all. Would you be interested in buying the source code and assets for [this game][1]?&#xD;&#xA;&#xD;&#xA;Check it out and you'll see that there's a lot of things happening in the game. If we packaged it and sold it, we would of course tidy it up a bit which would involve more work so I would really appreciate your honest opinion.&#xD;&#xA;&#xD;&#xA;We've looked around and haven't found actual released games in the unity3d asset store. Maybe we just didn't look enough though. We're thinking of setting a price tag of between 150 and 200€. What's your opinion on this price?&#xD;&#xA;&#xD;&#xA;And in general, what's your opinion on selling assets and source code? Should I be wary of any legal implications (like my customer licensing my stuff and then forbidding me from selling it)? &#xD;&#xA;&#xD;&#xA;I posted this over at [UnityAnswers][2] as well but I know I rather go here for gamedev questions so I'm hoping other unity devs will drop by here too. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kongregate.com/games/irradiance_se/roids&#xD;&#xA;  [2]: http://answers.unity3d.com/questions/59154/should-i-package-and-sell-my-game-on-the-asset-store" />
  <row Id="27102" PostHistoryTypeId="1" PostId="12374" RevisionGUID="ea8a9676-e661-4599-96e8-76b8853e09d9" CreationDate="2011-05-16T17:21:22.870" UserId="1217" Text="Should I package and sell my game on the unity3d asset store?" />
  <row Id="27103" PostHistoryTypeId="3" PostId="12374" RevisionGUID="ea8a9676-e661-4599-96e8-76b8853e09d9" CreationDate="2011-05-16T17:21:22.870" UserId="1217" Text="&lt;unity&gt;&lt;assets&gt;&lt;marketing&gt;&lt;release&gt;" />
  <row Id="27104" PostHistoryTypeId="2" PostId="12375" RevisionGUID="4edb084b-2112-40c6-b88f-5592111c7eb8" CreationDate="2011-05-16T17:33:11.173" UserId="5224" Text="For a solar system simulation project I'm looking for a good (semi-accurate) set of textures to texture the skybox.&#xD;&#xA;&#xD;&#xA;I've already found these http://paulbourke.net/miscellaneous/starfield/ and we implemented a quick skysphere instead of a skybox but after testing we found out that the 2048x1024 resolution image was too low-res for our application, and we can't use the higher resolution version because of GPU limitations (we're developing this for a specific platform).&#xD;&#xA;&#xD;&#xA;So we came up with using 6 separate 2048x2048 textures on a skybox to have everything look pretty. However I cant seem to find any solar system star textures that are made for a skybox. &#xD;&#xA;&#xD;&#xA;So basically what I'm asking:&#xD;&#xA;&#xD;&#xA;-Does someone know where to find skybox textures for our solar system&#xD;&#xA;&#xD;&#xA;-Or alternatively does someone know a free program to convert 1 spherically mapped texture to 6 box mapped textures?" />
  <row Id="27105" PostHistoryTypeId="1" PostId="12375" RevisionGUID="4edb084b-2112-40c6-b88f-5592111c7eb8" CreationDate="2011-05-16T17:33:11.173" UserId="5224" Text="Skybox textures for our solar system" />
  <row Id="27106" PostHistoryTypeId="3" PostId="12375" RevisionGUID="4edb084b-2112-40c6-b88f-5592111c7eb8" CreationDate="2011-05-16T17:33:11.173" UserId="5224" Text="&lt;art&gt;&lt;skybox&gt;&lt;google-fu&gt;" />
  <row Id="27107" PostHistoryTypeId="6" PostId="12360" RevisionGUID="3a88b86b-3164-4ead-a5ee-872a7dbbe4bd" CreationDate="2011-05-16T17:37:24.497" UserId="7191" Comment="edited tags" Text="&lt;opengl&gt;&lt;java&gt;&lt;interface&gt;&lt;lwjgl&gt;&lt;picking&gt;" />
  <row Id="27108" PostHistoryTypeId="6" PostId="12375" RevisionGUID="c088a1fe-7cfe-4512-a57b-91771fa47a52" CreationDate="2011-05-16T17:45:27.330" UserId="51" Comment="edited tags" Text="&lt;art&gt;&lt;skybox&gt;" />
  <row Id="27109" PostHistoryTypeId="2" PostId="12376" RevisionGUID="8f7fdacf-1121-4973-8cdc-fe9c6c0cc2ac" CreationDate="2011-05-16T18:07:39.320" UserId="1430" Text="Without actually being able to see the code and source assets, et cetera, it's hard to actually evaluate whether or not the whole package would be worth the price you're asking. From playing the game briefly, however, **my initial opinion is that the product isn't worth the price**.&#xD;&#xA;&#xD;&#xA;While it seems like an interesting spin on Asteroids, that's all it is -- a spin on Asteroids. The gameplay you've added to the system isn't terribly unique, and the code to achieve those features shouldn't be all that clever or complex. Examples of such are likely to be found all over the internet already, for free. Perhaps you could argue that there is some value-add in that you're offering an example of the code already packaged up, implemented and integrated, but I personally don't believe that source code (alone) is a very valuable learning resource (certainly not one I'd ever advocate paying for).&#xD;&#xA;&#xD;&#xA;The most interesting thing the package contains is the source assets (the art in particular, which is quite good for the price). However, you aren't clear on what the licensing restrictions for that art would be -- or indeed, for the rest of the source material. If you're granting a license to re-use the art/code/etc in whatever manner the purchaser sees fit, without further compensation (except perhaps giving credit to the original artist), then from the perspective of an art pack it might be something you could sell." />
  <row Id="27110" PostHistoryTypeId="5" PostId="12375" RevisionGUID="1fc27bf2-44ba-4e6b-86ee-8fa648217afe" CreationDate="2011-05-16T18:11:24.760" UserId="3588" Comment="We currently have [sky] that applies to [skybox] questions, though this may inspire a change for that. Also did some other touch ups to the question. ♪" Text="For a solar system simulation project I'm looking for a good (semi-accurate) set of textures to texture the skybox.&#xD;&#xA;&#xD;&#xA;I've already found these http://paulbourke.net/miscellaneous/starfield/ and we implemented a quick skysphere instead of a skybox. But after testing we found out that the 2048x1024 resolution image was too low-res for our application, and we can't use the higher resolution version because of GPU limitations (we're developing this for a specific platform).&#xD;&#xA;&#xD;&#xA;So we came up with using 6 separate 2048x2048 textures on a skybox to have everything look pretty. However I can't seem to find any solar system star textures that are made for a skybox. &#xD;&#xA;&#xD;&#xA;So basically what I'm asking:&#xD;&#xA;&#xD;&#xA;- Does someone know where to find skybox textures for our solar system?&#xD;&#xA;&#xD;&#xA;- Alternatively, does someone know a free program to convert a spherically-mapped texture to 6 box-mapped textures?" />
  <row Id="27111" PostHistoryTypeId="6" PostId="12375" RevisionGUID="1fc27bf2-44ba-4e6b-86ee-8fa648217afe" CreationDate="2011-05-16T18:11:24.760" UserId="3588" Comment="We currently have [sky] that applies to [skybox] questions, though this may inspire a change for that. Also did some other touch ups to the question. ♪" Text="&lt;textures&gt;&lt;art&gt;&lt;sky&gt;" />
  <row Id="27112" PostHistoryTypeId="24" PostId="12375" RevisionGUID="1fc27bf2-44ba-4e6b-86ee-8fa648217afe" CreationDate="2011-05-16T18:11:24.760" Comment="Proposed by 3588 approved by 51 edit id of 433" />
  <row Id="27113" PostHistoryTypeId="25" PostId="12374" RevisionGUID="cf38decc-c014-4cc2-9bce-b7de0bc46093" CreationDate="2011-05-16T18:12:13.120" Comment="http://twitter.com/#!/StackGameDev/status/70189825139015681" />
  <row Id="27114" PostHistoryTypeId="5" PostId="12376" RevisionGUID="3252c782-0d4c-42f5-b23f-09c67b43391c" CreationDate="2011-05-16T18:15:16.880" UserId="1430" Comment="added 1069 characters in body" Text="&gt; We've looked around and haven't found&#xD;&#xA;&gt; actual released games in the unity3d&#xD;&#xA;&gt; asset store. Maybe we just didn't look&#xD;&#xA;&gt; enough though. We're thinking of&#xD;&#xA;&gt; setting a price tag of between 150 and&#xD;&#xA;&gt; 200€. What's your opinion on this&#xD;&#xA;&gt; price?&#xD;&#xA;&#xD;&#xA;Without actually being able to see the code and source assets, et cetera, it's hard to actually evaluate whether or not the whole package would be worth the price you're asking. From playing the game briefly, however, **my initial opinion is that the product isn't worth the price**.&#xD;&#xA;&#xD;&#xA;While it seems like an interesting spin on Asteroids, that's all it is -- a spin on Asteroids. The gameplay you've added to the system isn't terribly unique, and the code to achieve those features shouldn't be all that clever or complex. Examples of such are likely to be found all over the internet already, for free. Perhaps you could argue that there is some value-add in that you're offering an example of the code already packaged up, implemented and integrated, but I personally don't believe that source code (alone) is a very valuable learning resource (certainly not one I'd ever advocate paying for).&#xD;&#xA;&#xD;&#xA;The most interesting thing the package contains is the source assets (the art in particular, which is quite good for the price). However, you aren't clear on what the licensing restrictions for that art would be -- or indeed, for the rest of the source material. If you're granting a license to re-use the art/code/etc in whatever manner the purchaser sees fit, without further compensation (except perhaps giving credit to the original artist), then from the perspective of an art pack it might be something you could sell.&#xD;&#xA;&#xD;&#xA;&gt; And in general, what's your opinion on&#xD;&#xA;&gt; selling assets and source code? Should&#xD;&#xA;&gt; I be wary of any legal implications&#xD;&#xA;&gt; (like my customer licensing my stuff&#xD;&#xA;&gt; and then forbidding me from selling&#xD;&#xA;&gt; it)?&#xD;&#xA;&#xD;&#xA;I don't think there is much of a market for selling code, as I alluded to above. Art is another matter. You can draw up a license to restrict the purchaser in whatever manner you see fit, but do note that the licensing is something a potential buyer will consider in determining the value of the product.&#xD;&#xA;&#xD;&#xA;Although it's always possible for somebody to purchase your product and then violate your license, so you need to be prepare to defend whatever license you use, which can be costly.&#xD;&#xA;&#xD;&#xA;Also you should probably have a real lawyer (which I am not) answer legal questions w.r.t to licensing issues." />
  <row Id="27115" PostHistoryTypeId="2" PostId="12377" RevisionGUID="1f166114-56e1-4666-ad88-4e8c28ddf91e" CreationDate="2011-05-16T18:47:09.367" UserId="2289" Text="I have a sprite sheet loaded as an OpenGL texture, and I'd like to draw a portion of that texture sequentially for animation. Is there an actual OpenGL command to draw part of a texture? I can get it done by modifying the U and V components when drawing the texture, but I'm not sure if there's a more elegant/correct method of doing this." />
  <row Id="27116" PostHistoryTypeId="1" PostId="12377" RevisionGUID="1f166114-56e1-4666-ad88-4e8c28ddf91e" CreationDate="2011-05-16T18:47:09.367" UserId="2289" Text="How do I draw a portion of a texture onscreen in OpenGL?" />
  <row Id="27117" PostHistoryTypeId="3" PostId="12377" RevisionGUID="1f166114-56e1-4666-ad88-4e8c28ddf91e" CreationDate="2011-05-16T18:47:09.367" UserId="2289" Text="&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="27118" PostHistoryTypeId="2" PostId="12378" RevisionGUID="7f840f3c-6863-4057-b8ab-b0c7dbe443c2" CreationDate="2011-05-16T18:51:00.657" UserId="2792" Text="Using a part of the UV space is the &quot;correct&quot; way. Avoid blitting and tex copy as much as you can." />
  <row Id="27119" PostHistoryTypeId="2" PostId="12379" RevisionGUID="8872121e-660f-4933-a571-8eb4690b7ff3" CreationDate="2011-05-16T19:01:43.613" UserId="6813" Text="&gt; We're thinking of setting a price tag&#xD;&#xA;&gt; of between 150 and 200€. What's your&#xD;&#xA;&gt; opinion on this price?&#xD;&#xA;&#xD;&#xA;To my opinion, it's easier to sell 5000+ copies of a game sold 10-15 euros than to sell 100 copies of a game sold 150-200 euros even if assets and source code are provided with it.&#xD;&#xA;&#xD;&#xA;    5000 * 10€ = 50k€&#xD;&#xA;    5000 * 15€ = 75k€&#xD;&#xA;&#xD;&#xA;    100 * 150€ = 15k€&#xD;&#xA;    100 * 200€ = 20k€&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As you can see with this example, low price can be really more interesting to make money than high price... And as selling &quot;digital&quot; copies doesn't cost any materials, you can sell an infinite number of copies without any cents more from your pockets.&#xD;&#xA;&#xD;&#xA;Finally, if you fix your price at 150 euros, normals players for most of them won't buy your game even if it looks fun (there is plenty of fun games for less than 150 euros), thus you will target the micro market of people searching for sources codes and assets (for THIS kind of assets), and that mean probably very very few persons.&#xD;&#xA;&#xD;&#xA;Personally, I prefer having lots of people playing my game even if I earn few money, than having a &quot;cool&quot; game that nobody plays because it's too expensive.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27120" PostHistoryTypeId="5" PostId="12378" RevisionGUID="81df2683-dbee-472c-89a6-3dfb2979c8b9" CreationDate="2011-05-16T19:02:28.197" UserId="2792" Comment="Fleshed answer out." Text="Using a part of the UV space is the &quot;correct&quot; way. It's used for almost every full screen operation (except clear and some resolve ops). Avoid blitting and tex copy as much as you can.&#xD;&#xA;&#xD;&#xA;Using UV and geometry gives you a lot of flexibility, you can rotate/zoom images and batch together sprites that share the same atlas. Just be careful about pixel center and filtering so that sprites don't bleed into each other. " />
  <row Id="27121" PostHistoryTypeId="2" PostId="12380" RevisionGUID="8bcbda15-887c-4161-8b15-f90a1302f871" CreationDate="2011-05-16T19:02:31.130" UserId="4235" Text="Not 100% certain this will satisfy your needs, but it sounds similar to what you want:&#xD;&#xA;&#xD;&#xA;http://alexcpeterson.com/spacescape" />
  <row Id="27122" PostHistoryTypeId="2" PostId="12381" RevisionGUID="d531dac8-b1ae-4c04-9e2f-b485dfbfa93e" CreationDate="2011-05-16T19:19:02.287" UserId="2710" Text="I don't think this is worth 150-200 euros. A competent developer probably can make this kind of game without any outside resources, and incompetent/beginner is unlikely to shell out this much.&#xD;&#xA;&#xD;&#xA;I know you want to earn money on your game, but Asset Store is hardly the place to do this. Now, if you offered your game on Asset Store for 5 euros or even free, as an example for less skilled developers.. that certainly won't bring any money, but is good for your karma! (-8" />
  <row Id="27123" PostHistoryTypeId="2" PostId="12382" RevisionGUID="ce5c1bde-9614-488a-9e20-903e3e59c608" CreationDate="2011-05-16T19:22:23.073" UserId="6813" Text="Why don't you use softwares like &quot;Celestia&quot; to capture your own skybox ?&#xD;&#xA;&#xD;&#xA;If you don't know it,&#xD;&#xA;&gt; Celestia is a free space simulation in 3D:&#xD;&#xA;&gt; http://www.shatters.net/celestia/&#xD;&#xA;&#xD;&#xA;Using options, you can hide almost all you need (planets, names, constellations etc.) and using the &quot;Render&quot; menu, you can adjust the screen resolution, the stars radiance, the texture quality etc.&#xD;&#xA;&#xD;&#xA;It's not &quot;easy&quot; to use, but it's &quot;not difficult&quot; either, and there is some tutorials on how to &quot;navigate&quot; into Celestia if you need some help. You can use scripts to manipulate the camera and capture images.&#xD;&#xA;&#xD;&#xA;Finally, here is a forum thread where someone ask some help to make a skybox using Celestia:&#xD;&#xA;&gt; Generating a skybox with Celestia: http://www.shatters.net/forum/viewtopic.php?f=9&amp;t=11079&#xD;&#xA;&#xD;&#xA;It is probably not the &quot;easier&quot; way to get what you want, but this way it will be exactly what you want because you can set lots of options. It is maybe not enough realistic tough but I think it could be ok." />
  <row Id="27124" PostHistoryTypeId="2" PostId="12383" RevisionGUID="3b2d1383-66c4-4601-9552-85de822c5b2b" CreationDate="2011-05-16T19:27:06.660" UserId="7191" Text="If you're looking for spherical to cubic projection, [this site][1] seems to have an answer. It looks like [HDR Shop][2] has some panoramic transformations that will work for this.&#xD;&#xA;&#xD;&#xA;Additionally there is at least one [Photoshop plugin][3] that will do this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.vfxtalk.com/forum/spherical-cubic-map-conversion-t15080.html?s=fc1a40c715d3f5789d721427c525c7aa&amp;amp;&#xD;&#xA;  [2]: http://projects.ict.usc.edu/graphics/HDRShop/&#xD;&#xA;  [3]: http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Plugins/Spherical-to-cubic-to-spherical-conversion.shtml" />
  <row Id="27125" PostHistoryTypeId="2" PostId="12384" RevisionGUID="9e83f609-8a25-4444-807e-8b022b90ec56" CreationDate="2011-05-16T20:15:56.050" UserId="6592" Text="I've had some experience writing my own games, both open source and commercial indie-style. Like you, I encountered problems with assets (images, animations, audio, ...). You have a few options:&#xD;&#xA;&#xD;&#xA; 1. Do it yourself&#xD;&#xA; 2. Find someone to volunteer their time&#xD;&#xA;    for you&#xD;&#xA; 3. Find something that you can legally&#xD;&#xA;    use for free/for a fee&#xD;&#xA; 4. Pay someone [probably good money] to&#xD;&#xA;    give you a decent product&#xD;&#xA;&#xD;&#xA;Without much money, all these options can be frustrating. You can find artists to volunteer their time, but in my experience they don't like to sit around and wait for you to develop and fix a new game/rendering engine, so here is my advice (I'm assuming you aren't willing to spend any money):&#xD;&#xA;&#xD;&#xA;Create some very simple graphics to test with. In one game I created, I made some very simple stick figure graphics that were merely sufficient to indicate what action / state my character was currently in. Later, when the game/rendering engine is compelling, it will hopefully be inspiring and you will have less trouble finding artists willing to help out." />
  <row Id="27126" PostHistoryTypeId="2" PostId="12385" RevisionGUID="73d971ee-49e5-4a44-bef7-eda61de2e132" CreationDate="2011-05-16T20:24:37.713" UserId="2683" Text="You can always replace your sounds and art later on. In my opinion the important thing is the game itself.&#xD;&#xA;&#xD;&#xA;It can be an excellent 3D shooting game even if the walls are all brown and the characters are cubic block people.&#xD;&#xA;&#xD;&#xA;It can be a wonderful sandbox world and look like Minecraft.&#xD;&#xA;&#xD;&#xA;The sound effects are easy to make. Just record yourself making the sounds with your mouth. I've played some really fun tower defense games where it's quite obvious the shooting sound is a guy going, &quot;Pew! Pew!&quot; into a microphone. :-)&#xD;&#xA;&#xD;&#xA;The really important thing is to finish the game. It doesn't have to be perfect. It doesn't have to have every feature you planned out. But once you finish a limited version of the game, no matter how many features it's missing and no matter how crap the art and sound is, then you have a basis for making changes and improvements, and you have something to show clients or potential employers as a code demonstration." />
  <row Id="27127" PostHistoryTypeId="5" PostId="12374" RevisionGUID="11f75c55-c14c-49db-9928-cdc19ac8284c" CreationDate="2011-05-16T20:40:22.583" UserId="1217" Comment="added 687 characters in body" Text="I'm trying to figure out if I should refurbish and refactor a game I and some friends have made. It's released on kongregate and wasn't a super hit but I feel there's a lot of interesting techniques and solutions going on that new or intermediate developers would like to see. The only thing that's holding me back is that I don't know if people are interested in it at all. Would you be interested in buying the source code and assets for [this game][1]?&#xD;&#xA;&#xD;&#xA;Check it out and you'll see that there's a lot of things happening in the game. If we packaged it and sold it, we would of course tidy it up a bit which would involve more work so I would really appreciate your honest opinion.&#xD;&#xA;&#xD;&#xA;We've looked around and haven't found actual released games in the unity3d asset store. Maybe we just didn't look enough though. We're thinking of setting a price tag of between 150 and 200€. What's your opinion on this price?&#xD;&#xA;&#xD;&#xA;And in general, what's your opinion on selling assets and source code? Should I be wary of any legal implications (like my customer licensing my stuff and then forbidding me from selling it)? &#xD;&#xA;&#xD;&#xA;I posted this over at [UnityAnswers][2] as well but I know I rather go here for gamedev questions so I'm hoping other unity devs will drop by here too. &#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;Reconsidering after getting some great advice we'll probably rip out the assets only and market those as space stuff or something. We'll then market the assets with the help of some free classes of code showing off some of the examples that were hard for us to do when we were (more) beginners. The unify wiki might benefit from having some of the code that we've done and that isn't all that hard but a bit tedious.&#xD;&#xA;&#xD;&#xA;If we actually &quot;finish&quot; the game (it is indeed an asteroids spinoff and was never intended to be anything else, apart from some sandbox modes we've been experimenting with) we'll probably sell it with a decent price tag for an indie game like this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kongregate.com/games/irradiance_se/roids&#xD;&#xA;  [2]: http://answers.unity3d.com/questions/59154/should-i-package-and-sell-my-game-on-the-asset-store" />
  <row Id="27128" PostHistoryTypeId="25" PostId="12375" RevisionGUID="351cbdbe-c764-4ced-b07e-09b2b6a410a1" CreationDate="2011-05-16T21:12:14.050" Comment="http://twitter.com/#!/StackGameDev/status/70235126386278400" />
  <row Id="27129" PostHistoryTypeId="17" PostId="12387" RevisionGUID="291346c9-4613-4db0-8dbd-eb81b27e0d43" CreationDate="2011-05-16T22:33:48.133" UserId="-1" Comment="from http://stackoverflow.com/questions/6023402/in-a-2d-tile-based-game-what-is-a-good-method-for-scrolling/6023601#6023601" Text="" />
  <row Id="27130" PostHistoryTypeId="2" PostId="12387" RevisionGUID="261745f1-096d-41f9-9ec1-67d50d49f94a" CreationDate="2011-05-16T21:21:32.683" UserDisplayName="Andrei" Text="It's probably best to do all updates and calculations in &quot;real&quot;, world units and move the camera.&#xD;&#xA;Your spriteBatch may perform culling itself but if it's too slow you can try to determine what tiles need to be displayed on screen and only draw those." />
  <row Id="27131" PostHistoryTypeId="2" PostId="12386" RevisionGUID="c16bb67b-b391-45dc-a8ba-045fdb3ddf57" CreationDate="2011-05-16T21:02:43.537" UserDisplayName="Kaije" Text="I am using Direct3D with the D3DXSPRITE wrapper to draw the tiles to the screen. I have a tile class which contains members such as collision and tile type, then i have an array of tiles e.g.&#xD;&#xA;&#xD;&#xA;Tile grid[256][256];&#xD;&#xA;&#xD;&#xA;Which would be a better method?&#xD;&#xA;&#xD;&#xA;-Draw the player in the center of the screen and offset where the map draws.&#xD;&#xA;&#xD;&#xA;-Move the player with the camera following.&#xD;&#xA;&#xD;&#xA;I was using the first method, but its getting really complicated when you get to the top left edge of the map, and when other players/enemies are on the map and moving at the same time&#xD;&#xA;&#xD;&#xA;if i make the camera follow the player, would i have to call spriteBatch-&gt;Draw(...) for every single grid tile even though only a few can fit on the screen?&#xD;&#xA;" />
  <row Id="27132" PostHistoryTypeId="1" PostId="12386" RevisionGUID="c16bb67b-b391-45dc-a8ba-045fdb3ddf57" CreationDate="2011-05-16T21:02:43.537" UserDisplayName="Kaije" Text="In a 2d tile based game, what is a good method for scrolling?" />
  <row Id="27133" PostHistoryTypeId="3" PostId="12386" RevisionGUID="c16bb67b-b391-45dc-a8ba-045fdb3ddf57" CreationDate="2011-05-16T21:02:43.537" UserDisplayName="Kaije" Text="&lt;c++&gt;&lt;directx&gt;&lt;directx9&gt;" />
  <row Id="27134" PostHistoryTypeId="17" PostId="12386" RevisionGUID="15695f41-7885-4dd5-95b1-f091db50e3d4" CreationDate="2011-05-16T22:33:48.133" UserId="-1" Comment="from http://stackoverflow.com/questions/6023402/in-a-2d-tile-based-game-what-is-a-good-method-for-scrolling" Text="" />
  <row Id="27135" PostHistoryTypeId="25" PostId="12386" RevisionGUID="9a8fd994-01f1-4a04-ac30-7a438a1c0edf" CreationDate="2011-05-17T00:12:13.687" Comment="http://twitter.com/#!/StackGameDev/status/70280424433262592" />
  <row Id="27136" PostHistoryTypeId="2" PostId="12388" RevisionGUID="8da1e078-656f-4259-a5d5-7e29b41e3310" CreationDate="2011-05-17T02:00:19.347" UserId="7410" Text="I've been through a year of programming and have the tools to create a cool, simple 3d game using Java.&#xD;&#xA;&#xD;&#xA;The biggest problem I have is ideas. When you have no idea how programming works, you want to create extravagant games and then you realize it doesn't work that way. &#xD;&#xA;&#xD;&#xA;I just need a simple game to create. I don't have many models (sphere or block guy) to work with, just a 3d environment my professor created. I can also create a very limited multiplayer aspect (leaderboard, perhaps a 2 player co-op). &#xD;&#xA;&#xD;&#xA;So please, throw out some ideas! Or allow me to join your team as an intern. :D" />
  <row Id="27137" PostHistoryTypeId="1" PostId="12388" RevisionGUID="8da1e078-656f-4259-a5d5-7e29b41e3310" CreationDate="2011-05-17T02:00:19.347" UserId="7410" Text="Need Ideas for Game" />
  <row Id="27138" PostHistoryTypeId="3" PostId="12388" RevisionGUID="8da1e078-656f-4259-a5d5-7e29b41e3310" CreationDate="2011-05-17T02:00:19.347" UserId="7410" Text="&lt;game-design&gt;&lt;3d&gt;&lt;java&gt;" />
  <row Id="27139" PostHistoryTypeId="2" PostId="12389" RevisionGUID="4aa4e364-d30b-4743-a14d-a72434087d16" CreationDate="2011-05-17T02:09:55.910" UserId="6558" Text="Based on your comment, here's the code I'm using to convert tile x,y values to on screen coordinates.  Now, it doesn't take into account &quot;3d tiles&quot;, everything is considered as being on the same plane, so if you're writing a game where that matters, this code will not work.&#xD;&#xA;&#xD;&#xA;    //this converts a map x/y coordinate into screen coordinates&#xD;&#xA;    //public, static method, so can be called outside the Tile object&#xD;&#xA;    point Tile::convertToScreen(int x, int y, int offsetX, int offsetY)&#xD;&#xA;    {&#xD;&#xA;            point screen;&#xD;&#xA;            //calculate the screen coordinates&#xD;&#xA;            //note: these will then be modified by the camera&#xD;&#xA;            screen.x = offsetX - (y * TILE_WIDTH/2) + (x * TILE_WIDTH/2) - (TILE_WIDTH/2);&#xD;&#xA;            screen.y = offsetY + (y * TILE_DEPTH/2) + (x * TILE_DEPTH/2);&#xD;&#xA;            return screen;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;point is simply a structure containing x and y ints, TILE_WIDTH would be 64 in your case, TILE_DEPTH is kind of badly named (it is actually the height of the tile graphics), but it would be 32 in your case.  The offsets are if you want your tile map to &quot;start&quot; at a different x,y location (such as if you want tiles to be above another set of tiles).  Typically the offset can be 0,0.&#xD;&#xA;&#xD;&#xA;This will generate a map with 0,0 on top, middle, like this:&#xD;&#xA;&#xD;&#xA;            0,0&#xD;&#xA;        0,1     1,0&#xD;&#xA;    0,2     1,1     2,1&#xD;&#xA;&#xD;&#xA;As for finding the tile x,y of the cursor:&#xD;&#xA;&#xD;&#xA;    point selectedTile;&#xD;&#xA;    int x = mX - camera.x;&#xD;&#xA;    int y = mY - camera.y;&#xD;&#xA;    selectedTile.x = (y + x/2)/TILE_DEPTH;&#xD;&#xA;    selectedTile.y = (y - x/2)/TILE_DEPTH;&#xD;&#xA;&#xD;&#xA;In this bit of code, mX and mY are the mouse screen coordinates, which we're combining with the camera values to find out where we are in &quot;world coordinates&quot;.  Everything else is the same as the previous code example.&#xD;&#xA;&#xD;&#xA;Once again, this assumes a flat 2d isometric tile map.  There's some additional work if you want to use a semi-3d view of the map, and this all assumes that you're working in 2d anyway." />
  <row Id="27140" PostHistoryTypeId="2" PostId="12390" RevisionGUID="fb87c319-d0d7-488d-8d0e-8e85fdb11f4d" CreationDate="2011-05-17T02:16:15.657" UserId="6558" Text="Start small.  Clone pong, breakout, or tetris. Or make a simple game where you explore an island (Myst, anyone?)  If you want a challenge, make an FPS, or a on rail shooter game.  If you want to do something really fun and crazy, make a racing game where you can make the car better not by buying a new engine or upgrading the car, but by adding lightning bolts and flame decals.&#xD;&#xA;&#xD;&#xA;Or make a game from your favourite genre (favourite genre may vary, fans of MMOs or Dwarf Fortress may go insane trying to recreate their favourite genre)" />
  <row Id="27141" PostHistoryTypeId="16" PostId="12390" RevisionGUID="d6226267-036f-4110-885e-daced5f14f5d" CreationDate="2011-05-17T02:16:15.657" UserId="6558" />
  <row Id="27142" PostHistoryTypeId="2" PostId="12391" RevisionGUID="571b6b31-e3ea-4714-bad2-3d67047016a3" CreationDate="2011-05-17T02:22:54.640" UserId="3794" Text="getting an intern is the best what you can do in your case. Enthusiasm (and you have it) is one of the biggest values for getting one. It will help you grow proffesionaly and personally as well. And last thing to say, if there is no company offering interns, just write that who are not and say about you and your skills and how much you are interested in game programming and see what happen. It should work." />
  <row Id="27143" PostHistoryTypeId="5" PostId="12391" RevisionGUID="3763c335-ea4d-4987-a1f6-f696525c0a73" CreationDate="2011-05-17T02:24:42.847" UserId="1198" Comment="deleted 8 characters in body" Text="Getting an intern is the best what you can do in your case. Enthusiasm (and you have it) is one of the biggest values for getting one. It will help you grow proffesionaly and personally as well. And last thing to say, if there is no company offering interns, just write that who are not and say about you and your skills and how much you are interested in game programming and see what happen. It should work." />
  <row Id="27144" PostHistoryTypeId="2" PostId="12392" RevisionGUID="30b5c6dc-31f2-431c-84bd-361a66f4cc80" CreationDate="2011-05-17T02:51:48.397" UserId="1134" Text="The [Real Time Rendering][1] authors [keep a blog][2] that attempts to track this sort of thing for rendering.  The opening notes to the 3rd Edition Real Time Rendering book were also helpful in this regard, for me.&#xD;&#xA;&#xD;&#xA;Look where these authors look:&#xD;&#xA;&#xD;&#xA;* GDC, SIGGRAPH, and other conference proceedings (including the marvelous [GDC Vault][3]; there's both a free section and a paid section -- Llopis recommends watching one session over each lunchbreak, a practice I heartily recommend),&#xD;&#xA;* game industry publications (e.g. [Game Developer Magazine][4]),&#xD;&#xA;* various graphics blogs (a subset of the answers to the [Game Development Blogs question][5] will be very applicable here), and&#xD;&#xA;* the &quot;collection of articles&quot; books such as the ShaderX series, anything with &quot;Gems&quot; in the title, et cetera.&#xD;&#xA;* (You'll find other non-article books, e.g. [Game Engine Architecture][6], will come up repeatedly; go back and read those as you hear about them multiple times or are specifically recommended to, especially if they have relatively current editions.)&#xD;&#xA;&#xD;&#xA;&quot;Game development techniques&quot;, especially the combination of rendering and engine design you're specifically calling out here, is a big and constantly (daily!) evolving category.  It's also necessarily subjective.  You're likely not going to find any one resource that will cover what you want and stay remotely current.  This isn't to discourage you from trying to create such a resource, but first...&#xD;&#xA;&#xD;&#xA;It may be better for you to try to find the forefront of the industry and attempt to be &quot;swept along&quot; a bit.&#xD;&#xA;&#xD;&#xA;Follow the industry greats: influential coders and/or writers (overlapping sets, there).  In addition to the aforementioned sources, watching twitter can give you a hint of what they're thinking about and doing _now_ -- stuff they're perhaps not ready to write about in detail.  Some I've found to be consistently interesting:&#xD;&#xA;&#xD;&#xA;* [John Carmack (Id Software - @ID_AA_Carmack)][7]&#xD;&#xA;* [Daniel Vogel (Epic Games- @DanDaDaDanDan)][8]&#xD;&#xA;* [Ryan C. Gordon (icculus.org - @icculus)][9]&#xD;&#xA;* [Tom Forsyth (Intel - @tom_forsyth)][10]&#xD;&#xA;* [Naty Hoffman (Activision - @renderwonk)][11]&#xD;&#xA;* [Glenn Fiedler (Sony - @gafferongames)][12]&#xD;&#xA;* [Noel Llopis (Snappy Touch - @noel_llopis)][13]&#xD;&#xA;* (and many, many others -- most of these I followed on a lark either because I admired something they'd worked on, or they wrote a great book or article)&#xD;&#xA;&#xD;&#xA;There are also very meaningful conversations about what tech and practices people are using, have stopped using, are trying out, et cetera -- see for instance Carmack's recent [response regarding the usage of trees in rendering][14].  Terse (as is usual for twitter), but interesting, and there's a lot of other writing about this issue once you start looking.&#xD;&#xA;&#xD;&#xA;Watch these people and who they communicate with, and you'll start to feel a sort of pulse of the industry.&#xD;&#xA;&#xD;&#xA;Surround yourself, and be willing to branch out.  (Immersion learning isn't just for spoken languages.)  Don't rely entirely on any one medium.  Subscribe to some &quot;push&quot; media (e.g. blogs, twitter, magazines, conferences) in addition to whatever you do to &quot;pull&quot; information.&#xD;&#xA;&#xD;&#xA;Develop a sense of who might be interesting and useful to watch or read over time (finding the [gafferongames blog][15] was an exemplary moment for me -- a lot of distilled wisdom and technique there).&#xD;&#xA;&#xD;&#xA;Don't be too fixated on history or evolution -- it's interesting and useful, but it will come as a byproduct of this immersion in industry sources.&#xD;&#xA;&#xD;&#xA;Regarding specific techniques: if you're curious whether they've been replaced with something newer/better, or if there are alternatives, dig a bit on a per-case basis.  It often doesn't take more than 10-15 minutes of searching around, especially if you have a decent list of good sources already.  It's daunting to hit a million seemingly undifferentiated pages on google regarding e.g. scenegraphs or game loops, half with wrongheaded, obsolete, or incomplete (and yet touted as the be-all-and-end-all) recommendations.  But if you happen to know authors or tech from other places, you can assign more value to those results.&#xD;&#xA;&#xD;&#xA;It won't be overnight.  It may be occasionally overwhelming (don't worry about that too much, learn to trust yourself to pick out the interesting bits).  But it will be rewarding.  When you've done this for a while, you can share some of the resources you've found and valuations you've made with others.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimerendering.com/&#xD;&#xA;  [2]: http://www.realtimerendering.com/blog/&#xD;&#xA;  [3]: http://www.gdcvault.com/&#xD;&#xA;  [4]: http://www.gdmag.com/homepage.htm&#xD;&#xA;  [5]: http://gamedev.stackexchange.com/questions/3223/game-development-blogs&#xD;&#xA;  [6]: http://www.gameenginebook.com/&#xD;&#xA;  [7]: https://twitter.com/#!/ID_AA_Carmack&#xD;&#xA;  [8]: https://twitter.com/#!/DanDaDaDanDan&#xD;&#xA;  [9]: https://twitter.com/#!/icculus&#xD;&#xA;  [10]: https://twitter.com/#!/tom_forsyth&#xD;&#xA;  [11]: https://twitter.com/#!/renderwonk&#xD;&#xA;  [12]: https://twitter.com/#!/gafferongames&#xD;&#xA;  [13]: https://twitter.com/#!/noel_llopis&#xD;&#xA;  [14]: https://twitter.com/#!/ID_AA_Carmack/statuses/69232152654524416&#xD;&#xA;  [15]: http://gafferongames.com/" />
  <row Id="27145" PostHistoryTypeId="2" PostId="12393" RevisionGUID="88e352db-a408-40ec-9a6d-6398b245745b" CreationDate="2011-05-17T03:11:09.467" UserId="7412" Text="I'm currently a student game programmer working on an indie project. We have a team of eleven people (five programmers, four artists, and two audio designers) aboard, all working hard to help design this game. We've been meeting for months now and so far we have a pretty buffed out Game Design Document as well as much audio/visual concept art. Our programmers are itching to progress on our own end.  &#xD;&#xA;&#xD;&#xA;Each person in our programming team is well versed in C++, but is very familiar with C#. We have enough experience and skill that we're confident that we will be successful with our game, and we're looking to build our own game engine in XNA as it seems like it would be worth our time and effort in the end.&#xD;&#xA;&#xD;&#xA;The game itself will be a 2D beat 'em up style game to be released over xbox live and the PC. It's play style will be similar to that of Castle Crashers or Scott Pilgrim vs The World. We want to design the game engine to allow us to better implement our assets into the game as well as to simplify the creation of design elements/mechanics. &#xD;&#xA;&#xD;&#xA;Currently between our programmers, we have books such as &quot;XNA 4.0&quot; and &quot;Game Coding Complete, Third Edition,&quot; but we'd still like more information on both XNA and (especially) building a game engine from scratch. If anyone could suggest good books, websites, or any other tips/resources it would be greatly appreciated. " />
  <row Id="27146" PostHistoryTypeId="1" PostId="12393" RevisionGUID="88e352db-a408-40ec-9a6d-6398b245745b" CreationDate="2011-05-17T03:11:09.467" UserId="7412" Text="What are some good resources for creating a game engine in XNA?" />
  <row Id="27147" PostHistoryTypeId="3" PostId="12393" RevisionGUID="88e352db-a408-40ec-9a6d-6398b245745b" CreationDate="2011-05-17T03:11:09.467" UserId="7412" Text="&lt;xna&gt;&lt;2d&gt;&lt;engine&gt;&lt;programming&gt;&lt;indie&gt;" />
  <row Id="27148" PostHistoryTypeId="25" PostId="12388" RevisionGUID="856153ab-7ce8-4797-8c80-5d8bc34818b9" CreationDate="2011-05-17T03:12:14.097" Comment="http://twitter.com/#!/StackGameDev/status/70325724749369344" />
  <row Id="27149" PostHistoryTypeId="5" PostId="12393" RevisionGUID="67333441-7650-4685-919f-f033b9097a9f" CreationDate="2011-05-17T03:42:48.847" UserId="7412" Comment="Changed the format of the last sentence to be more of a question." Text="I'm currently a student game programmer working on an indie project. We have a team of eleven people (five programmers, four artists, and two audio designers) aboard, all working hard to help design this game. We've been meeting for months now and so far we have a pretty buffed out Game Design Document as well as much audio/visual concept art. Our programmers are itching to progress on our own end.  &#xD;&#xA;&#xD;&#xA;Each person in our programming team is well versed in C++, but is very familiar with C#. We have enough experience and skill that we're confident that we will be successful with our game, and we're looking to build our own game engine in XNA as it seems like it would be worth our time and effort in the end.&#xD;&#xA;&#xD;&#xA;The game itself will be a 2D beat 'em up style game to be released over xbox live and the PC. It's play style will be similar to that of Castle Crashers or Scott Pilgrim vs The World. We want to design the game engine to allow us to better implement our assets into the game as well as to simplify the creation of design elements/mechanics. &#xD;&#xA;&#xD;&#xA;Currently between our programmers, we have books such as &quot;XNA 4.0&quot; and &quot;Game Coding Complete, Third Edition,&quot; but we'd still like more information on both XNA and (especially) building a game engine from scratch. What are any other good books, websites, or resources we could use to further map out and program our game engine? " />
  <row Id="27150" PostHistoryTypeId="2" PostId="12394" RevisionGUID="9d25cee5-1669-4acf-a628-a4457b59d06c" CreationDate="2011-05-17T04:09:17.997" UserId="7413" Text="http://www.sc2mapster.com/maps/tpsfps_battle_rts/&#xD;&#xA;I think this might help. Its a link to a site for one of the more popular maps that have this feature. I think they have a how to on the site." />
  <row Id="27151" PostHistoryTypeId="2" PostId="12395" RevisionGUID="a230a3ca-ca52-4450-be55-53cfa627f32d" CreationDate="2011-05-17T04:42:22.510" UserId="2698" Text="Stop reading and stop writing your game design doc _right now_. You need an engine, and all the reading in the world won't give you one. You need to know if your game is fun and _works_ and a one-week hacky prototype will tell you more about that than even the nicest game design doc.&#xD;&#xA;&#xD;&#xA;Ever played Super Meat boy? It never even _had_ a design doc! To quote the [Super Meat Boy postmortem][1] from Gamasutra (something you _should_ be reading):&#xD;&#xA;&gt; Super Meat Boy is Super Mario Bros. if Tommy and I made it. If we had made a design doc, it would have been as simple as that.&#xD;&#xA;&#xD;&#xA;**What you need to do is actually start writing a game engine.** Find a tutorial/walkthrough that _hands_ you the code and write it out (manually, line by line, so you become intimately familiar with your engine).&#xD;&#xA;&#xD;&#xA;[Here's one!][2] It's designed for an older version of XNA, so [here's an XNA 3.1 to 4.0 cheat sheet][3], and it uses a dead physics engine project I replaced with [Farseer Physics][4] fairly early on. It might not be the best tutorial avaliable (the author sure needs to get his act together) but the engine is excellent, and the bits I _don't_ find excellent (subjectively speaking) I'm finding it easy enough to gut and rewrite to suit my own needs.&#xD;&#xA;&#xD;&#xA;Now get to work. Time's a-wasting!&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamasutra.com/view/feature/6348/postmortem_team_meats_super_meat_.php?page=2&#xD;&#xA;[2]:http://www.innovativegames.net/blog/blog/2009/10/19/game-engine-tutorial-part-i-introduction/&#xD;&#xA;[3]:http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/&#xD;&#xA;[4]:http://farseerphysics.codeplex.com/" />
  <row Id="27152" PostHistoryTypeId="2" PostId="12396" RevisionGUID="20993894-c968-43e1-8a3a-3522bdf1baad" CreationDate="2011-05-17T04:46:36.033" UserId="7191" Text="I'd say the team you have is considerably more than resources that most have setting out to do an indie project. If your programmers are itching to get started, then do so! Start implementing the design plan you have now. The best way to learn more is to start doing! You'll get so many more ideas just by working out the finer details." />
  <row Id="27153" PostHistoryTypeId="5" PostId="12395" RevisionGUID="2bf06e77-66fa-4517-8dcf-ff8557577a91" CreationDate="2011-05-17T04:48:47.873" UserId="2698" Comment="added 175 characters in body; added 190 characters in body" Text="Stop reading and stop writing your game design doc _right now_. You need an engine, and all the reading in the world won't give you one. You need to know if your game is fun and _works_ and a one-week hacky prototype will tell you more about that than even the nicest game design doc.&#xD;&#xA;&#xD;&#xA;Ever played Super Meat boy? It never even _had_ a design doc! To quote the [Super Meat Boy postmortem][1] from Gamasutra (something you _should_ be reading):&#xD;&#xA;&gt; Super Meat Boy is Super Mario Bros. if Tommy and I made it. If we had made a design doc, it would have been as simple as that.&#xD;&#xA;&#xD;&#xA;By no means am I saying reading is bad, or that you shouldn't have a game design doc. At this point however _you are wasting your time and not getting what matters: a game you can play_.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##What you need to do is actually start writing a game engine.&#xD;&#xA;&#xD;&#xA;Find a tutorial/walkthrough that _hands_ you the code and write it out (manually, line by line, so you become intimately familiar with your engine).&#xD;&#xA;&#xD;&#xA;[Here's one I used for a while][2]. Things to note about it:&#xD;&#xA;&#xD;&#xA;1. It's designed for an older version of XNA, so [here's an XNA 3.1 to 4.0 cheat sheet][3].&#xD;&#xA;2. It uses JigLibX, a dead physics engine project. Once I had a comfortable understanding of InnovativeGames' physics actors, I threw them out and rewrote them for [Farseer Physics][4].&#xD;&#xA;3. It might not be the best tutorial avaliable - in truth it's the only one I could find when I was looking - but the engine has some excellent design work put into it. The bits that don't suit my needs I'm finding easy enough to gut and replace with my own code and classes.&#xD;&#xA;&#xD;&#xA;Now get to work. Time's a-wasting!&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamasutra.com/view/feature/6348/postmortem_team_meats_super_meat_.php?page=2&#xD;&#xA;[2]:http://www.innovativegames.net/blog/blog/2009/10/19/game-engine-tutorial-part-i-introduction/&#xD;&#xA;[3]:http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/&#xD;&#xA;[4]:http://farseerphysics.codeplex.com/" />
  <row Id="27154" PostHistoryTypeId="5" PostId="12395" RevisionGUID="1901d528-9b4c-4d1e-84e0-b618d0ca3799" CreationDate="2011-05-17T04:54:14.250" UserId="2698" Comment="added 106 characters in body" Text="Stop reading and stop writing your game design doc _right now_. You need an engine, and all the reading in the world won't give you one. You need to know if your game is fun and _works_ and a one-week hacky prototype will tell you more about that than even the nicest game design doc.&#xD;&#xA;&#xD;&#xA;Ever played Super Meat boy? It never even _had_ a design doc! To quote the [Super Meat Boy postmortem][1] from Gamasutra (something you _should_ be reading):&#xD;&#xA;&gt; Super Meat Boy is Super Mario Bros. if Tommy and I made it. If we had made a design doc, it would have been as simple as that.&#xD;&#xA;&#xD;&#xA;Don't get me wrong. Reading is _brilliant_ and design docs are very helpful. But _you need a game you can play!_ Time to get productive, and stop doing the stuff that's just wasting time. Get back to that stuff _once the game is underway_ - if you're not too consumed by creating the game! :)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##What you need to do is actually start writing a game engine.&#xD;&#xA;&#xD;&#xA;Find a tutorial/walkthrough that _hands_ you the code and write it out (manually, line by line, so you become intimately familiar with your engine).&#xD;&#xA;&#xD;&#xA;[Here's one I used for a while][2]. Things to note about it:&#xD;&#xA;&#xD;&#xA;1. It's designed for an older version of XNA, so [here's an XNA 3.1 to 4.0 cheat sheet][3].&#xD;&#xA;2. It uses JigLibX, a dead physics engine project. Once I had a comfortable understanding of InnovativeGames' physics actors, I threw them out and rewrote them for [Farseer Physics][4].&#xD;&#xA;3. It might not be the best tutorial avaliable - in truth it's the only one I could find when I was looking - but the engine has some excellent design work put into it. The bits that don't suit my needs I'm finding easy enough to gut and replace with my own code and classes.&#xD;&#xA;&#xD;&#xA;Now get to work. Time's a-wasting!&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamasutra.com/view/feature/6348/postmortem_team_meats_super_meat_.php?page=2&#xD;&#xA;[2]:http://www.innovativegames.net/blog/blog/2009/10/19/game-engine-tutorial-part-i-introduction/&#xD;&#xA;[3]:http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/&#xD;&#xA;[4]:http://farseerphysics.codeplex.com/" />
  <row Id="27155" PostHistoryTypeId="5" PostId="12395" RevisionGUID="dd8bc4ba-91cb-45b4-b07e-83add1b98b5e" CreationDate="2011-05-17T05:04:35.073" UserId="2698" Comment="smaller head plx" Text="###What you need to do is actually start writing a game engine.&#xD;&#xA;&#xD;&#xA;Find a tutorial/walkthrough that _hands_ you the code and write it out (manually, line by line, so you become intimately familiar with your engine).&#xD;&#xA;&#xD;&#xA;Reading stuff and writing your game design doc are both helpful, but this far into the project without a prototype you're just wasting time. You need to know if your game is fun and _works_ and a one-week hacky prototype will tell you more about that than even the nicest game design doc.&#xD;&#xA;&#xD;&#xA;Ever played Super Meat boy? It never even _had_ a design doc! To quote the [Super Meat Boy postmortem][1] from Gamasutra (something you _should_ be reading):&#xD;&#xA;&gt; Super Meat Boy is Super Mario Bros. if Tommy and I made it. If we had made a design doc, it would have been as simple as that.&#xD;&#xA;&#xD;&#xA;Once your game is smoothly underway, _then_ you can return to your design doc and your reading - if you're not too consumed by development. ;)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Here's a game engine walkthrough I used for a while][2]. Things to note about it:&#xD;&#xA;&#xD;&#xA;1. It's designed for an older version of XNA, so [here's an XNA 3.1 to 4.0 cheat sheet][3].&#xD;&#xA;2. I would replace its physics engine (JigLibX) with [Farseer Physics][4] as soon as you have a decent understanding of the tutorial's physics actors.&#xD;&#xA;3. _As a tutorial_ it isn't the greatest (the author doesn't really have his act together). _As an engine_, however, it's very good. I've learned quite a bit from how it's designed. The bits that don't suit my needs I've found easy enough to rewrite or altogether gut and replace.&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamasutra.com/view/feature/6348/postmortem_team_meats_super_meat_.php?page=2&#xD;&#xA;[2]:http://www.innovativegames.net/blog/blog/2009/10/19/game-engine-tutorial-part-i-introduction/&#xD;&#xA;[3]:http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/&#xD;&#xA;[4]:http://farseerphysics.codeplex.com/" />
  <row Id="27156" PostHistoryTypeId="5" PostId="12395" RevisionGUID="f7803ed2-033e-43cb-beda-ee2c233bbeb3" CreationDate="2011-05-17T05:54:09.153" UserId="2698" Comment="A bit of rewording" Text="###What you need to do is actually start writing a game engine.&#xD;&#xA;&#xD;&#xA;Find a tutorial/walkthrough that _hands_ you the code and write it out (manually, line by line, so you become intimately familiar with your engine).&#xD;&#xA;&#xD;&#xA;Reading stuff and writing your game design doc are both helpful, but this far into the project without a prototype you're just wasting time. You need to know if your game is fun and _works_ and a hacky prototype built in a week with a minimal feature-set and rectangles for graphics will tell you more about that than even the nicest game design doc.&#xD;&#xA;&#xD;&#xA;Ever played Super Meat boy? It never even _had_ a design doc! To quote the [Super Meat Boy postmortem][1] from Gamasutra:&#xD;&#xA;&gt; Super Meat Boy is Super Mario Bros. if Tommy and I made it. If we had made a design doc, it would have been as simple as that.&#xD;&#xA;&#xD;&#xA;Once your game is smoothly underway, _then_ you can return to your design doc and your reading - if you're not too consumed by development. ;)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Here's a game engine walkthrough I used for a while][2]. Things to note about it:&#xD;&#xA;&#xD;&#xA;1. It's designed for an older version of XNA, so [here's an XNA 3.1 to 4.0 cheat sheet][3].&#xD;&#xA;2. I would replace its physics engine (JigLibX) with [Farseer Physics][4] as soon as you have a decent understanding of the tutorial's physics actors.&#xD;&#xA;3. _As a tutorial_ it isn't the greatest (the author doesn't really have his act together). _As an engine_, however, it's very good. I've learned quite a bit from how it's designed. The bits that don't suit my needs I've found easy enough to rewrite or altogether gut and replace.&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamasutra.com/view/feature/6348/postmortem_team_meats_super_meat_.php?page=2&#xD;&#xA;[2]:http://www.innovativegames.net/blog/blog/2009/10/19/game-engine-tutorial-part-i-introduction/&#xD;&#xA;[3]:http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/&#xD;&#xA;[4]:http://farseerphysics.codeplex.com/" />
  <row Id="27157" PostHistoryTypeId="2" PostId="12397" RevisionGUID="967c2eb3-47a3-40d6-8ffc-215ccf5aed47" CreationDate="2011-05-17T06:11:03.897" UserId="7415" Text="I'm writing an android app and am looking for some ideas on how to render a ramp (or possibly speed bump) that will launch an object into the air. Probably something with gradients. This is for a top down 2d game using opengl. Thanks! &#xD;&#xA;" />
  <row Id="27158" PostHistoryTypeId="1" PostId="12397" RevisionGUID="967c2eb3-47a3-40d6-8ffc-215ccf5aed47" CreationDate="2011-05-17T06:11:03.897" UserId="7415" Text="How to render a ramp for a top down 2D perspective?" />
  <row Id="27159" PostHistoryTypeId="3" PostId="12397" RevisionGUID="967c2eb3-47a3-40d6-8ffc-215ccf5aed47" CreationDate="2011-05-17T06:11:03.897" UserId="7415" Text="&lt;opengl&gt;&lt;graphics&gt;" />
  <row Id="27160" PostHistoryTypeId="25" PostId="12393" RevisionGUID="d954d0bc-7132-4639-a685-45227ae4c45d" CreationDate="2011-05-17T06:12:13.980" Comment="http://twitter.com/#!/StackGameDev/status/70371022041395200" />
  <row Id="27161" PostHistoryTypeId="4" PostId="12397" RevisionGUID="7db7692e-d730-45f6-beba-f689f7783f57" CreationDate="2011-05-17T06:35:43.440" UserId="7415" Comment="edited title" Text="How to depict a ramp for a top down 2D perspective?" />
  <row Id="27162" PostHistoryTypeId="2" PostId="12398" RevisionGUID="877e0cf1-7925-40aa-b733-ee0a497b6baa" CreationDate="2011-05-17T07:20:30.110" UserId="1199" Text="I'm in the same position as you and your team, I just bought these with the certain thought that they would help us out in our endeavour:&#xD;&#xA;&#xD;&#xA;* [Beginning Game Programming 3rd Edition Book/CD...][1] (9781435454279)&#xD;&#xA;* [Advanced 2D Game Development][2] (9781598633429)&#xD;&#xA;* [Real-Time Rendering][3] (9781568814247)&#xD;&#xA;* [Multi-Threaded Game Engine Design][4] (9781435454170)&#xD;&#xA;* [Game Programming Gems 4][5] (9781584502951)&#xD;&#xA;* [Game Programming Gems 5 Book/CD Package][6] (9781584503521)&#xD;&#xA;* [Game Programming Gems 7 Book/CD Package][7] (9781584505273)&#xD;&#xA;* [Game Programming Gems 6 Book/CD Package][8] (9781584504504)&#xD;&#xA;* [Real-Time Collision Detection Book/CD Package][9] (9781558607323)&#xD;&#xA;* [Game Programming Gems 8 Book/CD Package][10] (9781584507024)&#xD;&#xA;* [Game Programming Gems 3][11] (9781584502333)&#xD;&#xA;* [Game Programming Gems 2][12] (9781584500544)&#xD;&#xA;* [Game Programming Gems 1][13] (9781584500490)&#xD;&#xA;* [Game Coding Complete][14] (9781584506805)&#xD;&#xA;* [Game Engine Architecture][15] (9781568814131)&#xD;&#xA;* [Best of Game Programming Gems Book/CD Package][16] (9781584505716)&#xD;&#xA;&#xD;&#xA;Check them out, and see if they contain solutions to problems you might meet!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-Game-Programming-Jonathan-Harbour/dp/1435454278/&#xD;&#xA;  [2]: http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/&#xD;&#xA;  [3]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/&#xD;&#xA;  [4]: http://www.amazon.com/Multi-Threaded-Engine-Design-Jonathan-Harbour/dp/1435454170/&#xD;&#xA;  [5]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/&#xD;&#xA;  [6]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584503521/&#xD;&#xA;  [7]: http://www.amazon.com/Game-Programming-Gems/dp/1584505273/&#xD;&#xA;  [8]: http://www.amazon.com/Game-Programming-Gems-Book-CD-ROM/dp/1584504501/&#xD;&#xA;  [9]: http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/&#xD;&#xA;  [10]: http://www.amazon.com/Game-Programming-Gems-Adam-Lake/dp/1584507020/&#xD;&#xA;  [11]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584502339/&#xD;&#xA;  [12]: http://www.amazon.com/Game-Programming-Gems-CD-Vol/dp/1584500549/&#xD;&#xA;  [13]: http://www.amazon.com/Game-Programming-Gems-CD/dp/1584500492/&#xD;&#xA;  [14]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/&#xD;&#xA;  [15]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/&#xD;&#xA;  [16]: http://www.amazon.com/Best-Game-Programming-Gems-DeLoura/dp/1584505710/" />
  <row Id="27163" PostHistoryTypeId="5" PostId="12398" RevisionGUID="22506ab9-e090-4f49-bb1c-93d2c18dfa47" CreationDate="2011-05-17T07:26:01.917" UserId="1199" Comment="Reordered the books" Text="I'm in the same position as you and your team, I just bought these with the certain thought that they would help us out in our endeavour:&#xD;&#xA;&#xD;&#xA;* [Game Coding Complete][14] (9781584506805)&#xD;&#xA;* [Game Engine Architecture][15] (9781568814131)&#xD;&#xA;* [Real-Time Rendering][3] (9781568814247)&#xD;&#xA;* [Multi-Threaded Game Engine Design][4] (9781435454170)&#xD;&#xA;* [Game Programming Gems 1][13] (9781584500490)&#xD;&#xA;* [Game Programming Gems 2][12] (9781584500544)&#xD;&#xA;* [Game Programming Gems 3][11] (9781584502333)&#xD;&#xA;* [Game Programming Gems 4][5] (9781584502951)&#xD;&#xA;* [Game Programming Gems 5 Book/CD Package][6] (9781584503521)&#xD;&#xA;* [Game Programming Gems 6 Book/CD Package][8] (9781584504504)&#xD;&#xA;* [Game Programming Gems 7 Book/CD Package][7] (9781584505273)&#xD;&#xA;* [Game Programming Gems 8 Book/CD Package][10] (9781584507024&#xD;&#xA;* [Best of Game Programming Gems Book/CD Package][16] (9781584505716)&#xD;&#xA;* [Real-Time Collision Detection Book/CD Package][9] (9781558607323))&#xD;&#xA;* [Beginning Game Programming 3rd Edition Book/CD...][1] (9781435454279)&#xD;&#xA;* [Advanced 2D Game Development][2] (9781598633429)&#xD;&#xA;&#xD;&#xA;Check them out, and see if they contain solutions to problems you might meet!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-Game-Programming-Jonathan-Harbour/dp/1435454278/&#xD;&#xA;  [2]: http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/&#xD;&#xA;  [3]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/&#xD;&#xA;  [4]: http://www.amazon.com/Multi-Threaded-Engine-Design-Jonathan-Harbour/dp/1435454170/&#xD;&#xA;  [5]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/&#xD;&#xA;  [6]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584503521/&#xD;&#xA;  [7]: http://www.amazon.com/Game-Programming-Gems/dp/1584505273/&#xD;&#xA;  [8]: http://www.amazon.com/Game-Programming-Gems-Book-CD-ROM/dp/1584504501/&#xD;&#xA;  [9]: http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/&#xD;&#xA;  [10]: http://www.amazon.com/Game-Programming-Gems-Adam-Lake/dp/1584507020/&#xD;&#xA;  [11]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584502339/&#xD;&#xA;  [12]: http://www.amazon.com/Game-Programming-Gems-CD-Vol/dp/1584500549/&#xD;&#xA;  [13]: http://www.amazon.com/Game-Programming-Gems-CD/dp/1584500492/&#xD;&#xA;  [14]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/&#xD;&#xA;  [15]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/&#xD;&#xA;  [16]: http://www.amazon.com/Best-Game-Programming-Gems-DeLoura/dp/1584505710/" />
  <row Id="27164" PostHistoryTypeId="5" PostId="12391" RevisionGUID="4c60f2fe-35a5-4369-929c-09d339c96f66" CreationDate="2011-05-17T07:34:47.663" UserId="20" Comment="changed intern to internship, some other minor changes" Text="Getting an internship is the best what you can do in your case. Enthusiasm (and you have it) is one of the biggest values for getting one. It will help you grow professionally and personally as well. And last thing to say, if there is no company offering internships, just write them and tell them about you and your skills and how much you are interested in game programming and see what happens. It should work." />
  <row Id="27165" PostHistoryTypeId="2" PostId="12399" RevisionGUID="97c34dbb-2f05-4f84-b3bd-cd197a210f0c" CreationDate="2011-05-17T08:00:33.120" UserId="7419" Text="Moving the camera in world coordinates and have your character move around the world is the easiest way to approach this problem, working in world coordinates means you dont need to do any extra calculations when it boils down to all the other systems which must work on a relative coordinates system and also understand where they are in world coordinates.&#xD;&#xA;&#xD;&#xA;Since you are working in 2D another good tip is to do some spatial partitioning the easiest way would be to create a virtual world grid system, this will allow you to manage each tile individually by associating sprites and other resources on a per tile basis, so in essence the process would be:&#xD;&#xA;&#xD;&#xA;- create some tile class which can hold the boundary coordinates for the tile and whatever resources that specific tile may need ( sprites, enemies, etc.. ).&#xD;&#xA;&#xD;&#xA;- decide on the size of your world and create a 2D array ( you could use one dimension and access it as 2D ) of tiles each one representing a bit of your world with all of its associated resources.&#xD;&#xA;&#xD;&#xA;- only draw resources from the tile the player is in and its neighbours.&#xD;&#xA;&#xD;&#xA;With a grid you can easily find out which tile the player is in based on it's position relative to the start of the grid.&#xD;&#xA;&#xD;&#xA;To work around the problem you mentioned about the camera you need to make the player and the camera two independent systems where the camera wont travel any further than the centre of the edge tiles so when the player travels to that tile he can still travel throughout the entire tile as he is bound by world coordinates ( i.e. no longer centered on the screen ) but the camera is locked.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27166" PostHistoryTypeId="2" PostId="12400" RevisionGUID="54c75429-0898-4028-ab88-46185187f0a4" CreationDate="2011-05-17T08:08:03.390" UserId="7420" Text="I was working on J2ME games in the past, when draw a large backgroud, i always use the Carmack 2d scroll algorithm, keep a image buffer a little larger than device screen, draw the changed small tiles to this buffer, then draw the buffer to device screen. This can reduce the number of times to call drawImage().&#xD;&#xA;Now we need to prepare for opengles 2D games for iphone and android. I am new about opengl, but i have try to read some engine code and keep learning opengl. There isn't much problem about 2d graphic system, except the tile buffer, there is no image buffer any more, so what size of the tile should i use? The screen size maybe 800*480, if i keep the 32*32 tile, i need to draw about 400 tiles per frame, will this be ok? &#xD;&#xA;" />
  <row Id="27167" PostHistoryTypeId="1" PostId="12400" RevisionGUID="54c75429-0898-4028-ab88-46185187f0a4" CreationDate="2011-05-17T08:08:03.390" UserId="7420" Text="Is there any scroll algorithm for opengles?" />
  <row Id="27168" PostHistoryTypeId="3" PostId="12400" RevisionGUID="54c75429-0898-4028-ab88-46185187f0a4" CreationDate="2011-05-17T08:08:03.390" UserId="7420" Text="&lt;opengl-es&gt;" />
  <row Id="27169" PostHistoryTypeId="2" PostId="12401" RevisionGUID="5ab4adc0-5b16-461b-84e8-71d02067ae9a" CreationDate="2011-05-17T08:24:28.950" UserId="1156" Text="[I think this post needs to appear.][1]&#xD;&#xA;&#xD;&#xA;If you have all your game docs organised, what is stopping you making the game? Why bother with a game engine if you already know exactly what you need to do? &#xD;&#xA;&#xD;&#xA;Build the game, and then when you start writing another you'll be able to pull out the reusable bits.&#xD;&#xA;&#xD;&#xA;Give it a bit of polish, and you have several decent indie games AND an engine/codebase that **does what you want**, rather than **what you think it should**.&#xD;&#xA;&#xD;&#xA;  [1]: http://scientificninja.com/blog/write-games-not-engines" />
  <row Id="27170" PostHistoryTypeId="5" PostId="12398" RevisionGUID="31974b7b-c52d-4c7f-9886-132bfeccd2f0" CreationDate="2011-05-17T08:46:37.650" UserId="1199" Comment="added 58 characters in body; added 5 characters in body; added 1 characters in body" Text="&lt;h1&gt;Write your game, and you will have your engine.&lt;/h1&gt;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;I'm in the same position as you and your team, I just bought these with the certain thought that they would help us out in our endeavour:&#xD;&#xA;&#xD;&#xA;* [Game Coding Complete][14] (9781584506805)&#xD;&#xA;* [Game Engine Architecture][15] (9781568814131)&#xD;&#xA;* [Real-Time Rendering][3] (9781568814247)&#xD;&#xA;* [Multi-Threaded Game Engine Design][4] (9781435454170)&#xD;&#xA;* [Game Programming Gems 1][13] (9781584500490)&#xD;&#xA;* [Game Programming Gems 2][12] (9781584500544)&#xD;&#xA;* [Game Programming Gems 3][11] (9781584502333)&#xD;&#xA;* [Game Programming Gems 4][5] (9781584502951)&#xD;&#xA;* [Game Programming Gems 5 Book/CD Package][6] (9781584503521)&#xD;&#xA;* [Game Programming Gems 6 Book/CD Package][8] (9781584504504)&#xD;&#xA;* [Game Programming Gems 7 Book/CD Package][7] (9781584505273)&#xD;&#xA;* [Game Programming Gems 8 Book/CD Package][10] (9781584507024&#xD;&#xA;* [Best of Game Programming Gems Book/CD Package][16] (9781584505716)&#xD;&#xA;* [Real-Time Collision Detection Book/CD Package][9] (9781558607323))&#xD;&#xA;* [Beginning Game Programming 3rd Edition Book/CD...][1] (9781435454279)&#xD;&#xA;* [Advanced 2D Game Development][2] (9781598633429)&#xD;&#xA;&#xD;&#xA;Check them out, and see if they contain solutions to problems you might meet!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-Game-Programming-Jonathan-Harbour/dp/1435454278/&#xD;&#xA;  [2]: http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/&#xD;&#xA;  [3]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/&#xD;&#xA;  [4]: http://www.amazon.com/Multi-Threaded-Engine-Design-Jonathan-Harbour/dp/1435454170/&#xD;&#xA;  [5]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/&#xD;&#xA;  [6]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584503521/&#xD;&#xA;  [7]: http://www.amazon.com/Game-Programming-Gems/dp/1584505273/&#xD;&#xA;  [8]: http://www.amazon.com/Game-Programming-Gems-Book-CD-ROM/dp/1584504501/&#xD;&#xA;  [9]: http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/&#xD;&#xA;  [10]: http://www.amazon.com/Game-Programming-Gems-Adam-Lake/dp/1584507020/&#xD;&#xA;  [11]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584502339/&#xD;&#xA;  [12]: http://www.amazon.com/Game-Programming-Gems-CD-Vol/dp/1584500549/&#xD;&#xA;  [13]: http://www.amazon.com/Game-Programming-Gems-CD/dp/1584500492/&#xD;&#xA;  [14]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/&#xD;&#xA;  [15]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/&#xD;&#xA;  [16]: http://www.amazon.com/Best-Game-Programming-Gems-DeLoura/dp/1584505710/" />
  <row Id="27171" PostHistoryTypeId="25" PostId="12400" RevisionGUID="e42f165c-2225-40b0-bf3f-7d99b0a89ade" CreationDate="2011-05-17T09:12:13.710" Comment="http://twitter.com/#!/StackGameDev/status/70416320084189184" />
  <row Id="27172" PostHistoryTypeId="2" PostId="12402" RevisionGUID="118ced5f-34a1-4db9-ab13-40928102f122" CreationDate="2011-05-17T09:18:31.400" UserId="6395" Text="Doom classic source code for iOS was released by id software, and has a download link on this page: http://www.idsoftware.com/doom-classic/. The issue is that the url doesn't work, I sent an email to their support but no answer. Do you know an alternative source to download the Doom Game for iOS?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27173" PostHistoryTypeId="1" PostId="12402" RevisionGUID="118ced5f-34a1-4db9-ab13-40928102f122" CreationDate="2011-05-17T09:18:31.400" UserId="6395" Text="Where can I download the Doom Classic source code, the iOS port?" />
  <row Id="27174" PostHistoryTypeId="3" PostId="12402" RevisionGUID="118ced5f-34a1-4db9-ab13-40928102f122" CreationDate="2011-05-17T09:18:31.400" UserId="6395" Text="&lt;engine&gt;&lt;open-source&gt;&lt;first-person-shooter&gt;" />
  <row Id="27175" PostHistoryTypeId="2" PostId="12403" RevisionGUID="e9fe08d4-3d9d-492c-9718-e0b44dc96e0b" CreationDate="2011-05-17T09:32:15.137" UserId="6813" Text="You can get it from &quot;http://www.doomworld.com&quot;&#xD;&#xA;&#xD;&#xA;&gt; http://www.doomworld.com/idgames/index.php?id=15906&#xD;&#xA;&#xD;&#xA;But getting it from idsoftware directly would be better. I hope they will read your mail and fix the problem." />
  <row Id="27176" PostHistoryTypeId="2" PostId="12404" RevisionGUID="3237d7d2-b1d2-4d9d-a15d-6db76eb804b9" CreationDate="2011-05-17T09:44:51.467" UserId="7421" Text="I want to start developing a browser game. Not for success, just for the sake of doing it and learning something from it.&#xD;&#xA;&#xD;&#xA;Now, a point where I have serious problems figuring out how to deal with it is; how does one player receive message of another player does something that is somehow time-critical.&#xD;&#xA;&#xD;&#xA;Easy example for a trading card game; Player 1 plays `The devious flames of hell` and Player 2 has to react to this card by playing `Watery waves` directly afterwards, before the card of Player 1 takes effect (so to say a counter-card).&#xD;&#xA;&#xD;&#xA;Of course, I could just request the server every second and see if the other player did something, but I was hoping for a less request-frequent solution, like the server pushes the event of Player 1 playing a card to Player 2." />
  <row Id="27177" PostHistoryTypeId="1" PostId="12404" RevisionGUID="3237d7d2-b1d2-4d9d-a15d-6db76eb804b9" CreationDate="2011-05-17T09:44:51.467" UserId="7421" Text="Browser-board-game and server push" />
  <row Id="27178" PostHistoryTypeId="3" PostId="12404" RevisionGUID="3237d7d2-b1d2-4d9d-a15d-6db76eb804b9" CreationDate="2011-05-17T09:44:51.467" UserId="7421" Text="&lt;javascript&gt;&lt;events&gt;&lt;php&gt;&lt;server-push&gt;" />
  <row Id="27179" PostHistoryTypeId="2" PostId="12405" RevisionGUID="678e000f-825f-422b-9afb-eabee16c6426" CreationDate="2011-05-17T09:49:32.477" UserId="3630" Text="We made a flash game with a big screen size(1000x600), and the terrain graphic will jitter while the screen scrolling(that's, camera moving with player) continuously.&#xD;&#xA;&#xD;&#xA;What's the root cause? Or if you know how to eliminate this problem, please tell me. Any help is appreciated." />
  <row Id="27180" PostHistoryTypeId="1" PostId="12405" RevisionGUID="678e000f-825f-422b-9afb-eabee16c6426" CreationDate="2011-05-17T09:49:32.477" UserId="3630" Text="How to eliminate screen jitter in Flash game?" />
  <row Id="27181" PostHistoryTypeId="3" PostId="12405" RevisionGUID="678e000f-825f-422b-9afb-eabee16c6426" CreationDate="2011-05-17T09:49:32.477" UserId="3630" Text="&lt;flash&gt;" />
  <row Id="27182" PostHistoryTypeId="2" PostId="12406" RevisionGUID="36dc5c2e-43b8-4310-86a0-ab1ba09802a9" CreationDate="2011-05-17T10:18:35.933" UserId="5049" Text="The above answers are pretty nice and enough for your question.&#xD;&#xA;&#xD;&#xA;So, I want to recommand two great books: &quot;[Getting Real][1]&quot; and &quot;[Rework][2]&quot; which are 37signals great products. I don't know you've heard about these two books or not. But I'm sure these two books will not only solve your problems but will also help in your entire life.&#xD;&#xA;&#xD;&#xA;You should read &quot;Getting Real&quot; first. And there, you will learn about &quot;building the real thing&quot; by skipping all &quot;unnecessary&quot; stuff and the method of promoting your app to spread the world. And read &quot;Rework&quot;. It is really nice book too.&#xD;&#xA;I'm sure, you'll surely love these books. :D&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gettingreal.37signals.com/&#xD;&#xA;  [2]: http://37signals.com/rework/&#xD;&#xA;  [3]: http://37signals.com" />
  <row Id="27183" PostHistoryTypeId="5" PostId="12395" RevisionGUID="b5af8a81-6add-4255-b55c-c7119eb03346" CreationDate="2011-05-17T10:19:59.363" UserId="2698" Comment="deleted 87 characters in body" Text="###What you need to do is actually start writing your game!&#xD;&#xA;&#xD;&#xA;You don't need more resources. It's time to start producing - learn by getting your hands dirty.&#xD;&#xA;&#xD;&#xA;Write the lightest-weight engine you can. If you [follow this tutorial series][2] until #9 (and since it's written for XNA 2 or 3, translate it in a couple of places to XNA 4.0 using [this cheat sheet][3]) you'll have a fully working component framework that gets out of your way. What I just described took me a few hours a day for a week and a half on my own.&#xD;&#xA;&#xD;&#xA;Then you can get on with your game. You'll have an engine that takes care of rendering and updating for you so long as you provide an update/draw method on each component you write, so just focus on making your game's content. As you require, go back and hack the engine to bits and make it your own. Among the improvements, I'd recommend replacing its JigLibX physics with [Farseer Physics][4] since JigLibX is a dead project.&#xD;&#xA;&#xD;&#xA;Reading stuff and writing your game design doc are both helpful but what you need to know is if your game is fun and if it _works_ and a hacky prototype built in a week with a minimal feature-set and rectangles for graphics will tell you more about that than even the nicest game design doc.&#xD;&#xA;&#xD;&#xA;Ever played Super Meat boy? It never even _had_ a design doc! To quote the [Super Meat Boy postmortem][1] from Gamasutra:&#xD;&#xA;&gt; Super Meat Boy is Super Mario Bros. if Tommy and I made it. If we had made a design doc, it would have been as simple as that.&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamasutra.com/view/feature/6348/postmortem_team_meats_super_meat_.php?page=2&#xD;&#xA;[2]:http://www.innovativegames.net/blog/blog/2009/10/19/game-engine-tutorial-part-i-introduction/&#xD;&#xA;[3]:http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/&#xD;&#xA;[4]:http://farseerphysics.codeplex.com/" />
  <row Id="27184" PostHistoryTypeId="5" PostId="12406" RevisionGUID="4964d0b9-a3b8-4c3f-b5fd-a205503f7fe9" CreationDate="2011-05-17T10:28:24.110" UserId="5049" Comment="deleted 29 characters in body" Text="The above answers are pretty nice and enough for your question.&#xD;&#xA;&#xD;&#xA;So, I want to recommand two great books: &quot;[Getting Real][1]&quot; and &quot;[Rework][2]&quot; which are 37signals great products. I don't know you've heard about these two books or not. But I'm sure these two books will not only solve your problems but will also help in your entire life.&#xD;&#xA;&#xD;&#xA;You should read &quot;Getting Real&quot; first. And there, you will learn about &quot;building the real thing&quot; by skipping all &quot;unnecessary&quot; stuff and the method of promoting your app to spread the world. And read &quot;Rework&quot;. It is really nice book too.&#xD;&#xA;I'm sure, you'll surely love these books. :D&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gettingreal.37signals.com/&#xD;&#xA;  [2]: http://37signals.com/rework/" />
  <row Id="27185" PostHistoryTypeId="2" PostId="12407" RevisionGUID="0478f708-568b-4462-9388-dfe33085269c" CreationDate="2011-05-17T10:40:22.137" UserId="6469" Text="I use a surface. I create the entire world on an off screen surface and keep an x and y  coordinate. I alter these as the player moves and each frame draw a 1028 x 768 rectangle from the surface to the backbuffer using x and y. &#xD;&#xA;&#xD;&#xA;as for other people I give them an x and y and let them move around the world as they please, when drawing I check if there x and y is in the 1028 x 768 rectangle and if so draw them (I use textures for people). &#xD;&#xA;&#xD;&#xA;I have the player in the centre of the screen and check if the edge of the world has reached the edge of the screen. In this circumstance the player moves about the screen to the edge of the world and back to the centre then the world starts moving again. it seems hard and took me a while but is not to bad to do.&#xD;&#xA;&#xD;&#xA;I use 64 x 64 tiles and the biggest world I have used so far is 50 x 60 tiles. &#xD;&#xA;&#xD;&#xA;This is all done in direct x with c++" />
  <row Id="27186" PostHistoryTypeId="25" PostId="12402" RevisionGUID="91bf735e-d7c2-44ee-aa35-287894706af7" CreationDate="2011-05-17T12:12:13.763" Comment="http://twitter.com/#!/StackGameDev/status/70461618609328128" />
  <row Id="27187" PostHistoryTypeId="5" PostId="12405" RevisionGUID="4b8f07ef-49bc-4e99-8f72-c7e6e45615bc" CreationDate="2011-05-17T14:37:07.830" UserId="3630" Comment="added 425 characters in body" Text="We made a flash game with a big screen size(1000x600), and the terrain graphic will jitter while the screen scrolling(that's, camera moving with player) continuously.&#xD;&#xA;&#xD;&#xA;What's the root cause? Or if you know how to eliminate this problem, please tell me. Any help is appreciated.&#xD;&#xA;&#xD;&#xA;UPDATE: &#xD;&#xA;&#xD;&#xA;The map's size is more bigger than screen, e.g 6000x1200. And the map has more than one layer, generally it has 3 layers. Terrain is composed by tiles. And FPS is 24.&#xD;&#xA;&#xD;&#xA;If the FPS is set to 60, things will be better. But any way, it should work well at 24 FPS. I'm not sure if it is a natural problem of flash player, because some times a terrain object(e.g a house) look like a little bit distorted.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27188" PostHistoryTypeId="25" PostId="12397" RevisionGUID="2d860e6f-38e3-42f5-a815-53eb807acea7" CreationDate="2011-05-17T15:12:14.053" Comment="http://twitter.com/#!/StackGameDev/status/70506918262738945" />
  <row Id="27189" PostHistoryTypeId="2" PostId="12408" RevisionGUID="0b5829c8-b041-4d95-b9a3-6da99aefa606" CreationDate="2011-05-17T15:29:45.197" UserId="-1" Text="" />
  <row Id="27190" PostHistoryTypeId="2" PostId="12409" RevisionGUID="395ae5ea-5e6a-4eab-8db1-c326f30d8063" CreationDate="2011-05-17T15:29:45.197" UserId="-1" Text="" />
  <row Id="27191" PostHistoryTypeId="5" PostId="12409" RevisionGUID="acdd8c3b-1ebf-47dd-8eb7-8e8b94f8daf0" CreationDate="2011-05-17T15:57:28.837" UserId="2994" Comment="added 123 characters in body" Text="WebGL is extension to Javascript available in modern browser for 3D application development. It is based on OpenGL ES 2.0. " />
  <row Id="27192" PostHistoryTypeId="24" PostId="12409" RevisionGUID="acdd8c3b-1ebf-47dd-8eb7-8e8b94f8daf0" CreationDate="2011-05-17T15:57:28.837" Comment="Proposed by 2994 approved by 51 edit id of 434" />
  <row Id="27193" PostHistoryTypeId="10" PostId="12388" RevisionGUID="cb1c3281-2464-4534-a9d3-8ed5aaf9773a" CreationDate="2011-05-17T16:08:35.400" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="27194" PostHistoryTypeId="2" PostId="12410" RevisionGUID="664c5c64-0e97-42ee-9e78-0fd9058163ee" CreationDate="2011-05-17T16:11:49.760" UserId="3830" Text="I just stumbled on it the other day. Check out NowJS at [http://nowjs.com/][1] as I think it will give you a nice solution.   &#xD;&#xA;&#xD;&#xA;From the site...&#xD;&#xA;&#xD;&#xA;&gt; NowJS creates a magic namespace &quot;now&quot;,&#xD;&#xA;&gt; accessible by server and client. &#xD;&#xA;&gt; Functions and variables added to now&#xD;&#xA;&gt; are automatically synced, in&#xD;&#xA;&gt; real-time.  Call client functions from&#xD;&#xA;&gt; the server and server functions from&#xD;&#xA;&gt; client&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nowjs.com/" />
  <row Id="27195" PostHistoryTypeId="5" PostId="12410" RevisionGUID="a9a7a2a7-2fa2-4d88-a766-ba2e505cb16c" CreationDate="2011-05-17T16:48:03.707" UserId="3830" Comment="added 4 characters in body" Text="I just stumbled on this the other day -- check out NowJS at [http://nowjs.com/][1] as I think it will give you a nice solution.   &#xD;&#xA;&#xD;&#xA;From the site...&#xD;&#xA;&#xD;&#xA;&gt; NowJS creates a magic namespace &quot;now&quot;,&#xD;&#xA;&gt; accessible by server and client. &#xD;&#xA;&gt; Functions and variables added to now&#xD;&#xA;&gt; are automatically synced, in&#xD;&#xA;&gt; real-time.  Call client functions from&#xD;&#xA;&gt; the server and server functions from&#xD;&#xA;&gt; client&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nowjs.com/" />
  <row Id="27196" PostHistoryTypeId="2" PostId="12411" RevisionGUID="0ee908c0-c65e-45c8-af42-b24a4bdb3c5b" CreationDate="2011-05-17T17:44:42.350" UserId="6592" Text="When you are drawing using raw OpenGL ES, you will be drawing your tiles as pairs of triangles. Imagine one of your tiles, now draw a line from any corner to the opposite -- this is effectively what you will be doing. So for each tile, you will draw 2 triangles each frame. 400 tiles * 2 = 800 per frame, or 800 * 60 = 48,000 per second, which is a very small amount considering most modern phones can handle millions of triangles per second.&#xD;&#xA;&#xD;&#xA;There are lots of optimizations you can make as well to avoid changing the current texture binding more often than you need to, and drawing multiple objects in one GL call. I'll be happy to elaborate if you want, but your original question seems concerned with performance, and I don't think you need to worry about that at all.&#xD;&#xA;&#xD;&#xA;I have a font rendering system that renders each character in much the same way you would draw your tiles. I look up the coordinates of the particular character in a bitmap font file and draw it as a quad (two triangles in &quot;GL_TRIANGLE_STRIP&quot; mode.) For efficiency, I add all of the characters that I will draw into one large array and pass that to the GPU in one single command. I can render thousands of characters per frame, and that's being alpha blended on top of my game. This is all consistently done at 60 FPS. So I think you'll be just fine :)" />
  <row Id="27197" PostHistoryTypeId="2" PostId="12412" RevisionGUID="8e56016a-e54c-4e6d-b29d-0a852709b937" CreationDate="2011-05-17T18:11:24.653" UserId="6605" Text="This is an odd one.  When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first).  If I do this once, all textures load as expected, but if I do it **twice or more** one of my textures doesn't load (the texture is white).&#xD;&#xA;&#xD;&#xA;I have checked glGetError and there are no errors (assuming GLES10.glGetError() is the correct way to do this)&#xD;&#xA;&#xD;&#xA;Do I need to do any tidying up when home is pressed?  I currently call myGlView.onPause() and myGlView.onResume() when the onPause/Resume activity events are triggered.  I was under the impression that's all that's needed.  Is there anything else (perhaps non-openGL) that needs to be cleaned up?  Perhaps I'm hitting a limit of some kind  &#xD;&#xA;&#xD;&#xA;I am also using the NDK for some physics and rendering functions if that is relevant, but all resources are loaded using java.&#xD;&#xA;&#xD;&#xA;Thanks for your help!&#xD;&#xA;&#xD;&#xA;Ash" />
  <row Id="27198" PostHistoryTypeId="1" PostId="12412" RevisionGUID="8e56016a-e54c-4e6d-b29d-0a852709b937" CreationDate="2011-05-17T18:11:24.653" UserId="6605" Text="Android : Some textures not loading after resuming twice" />
  <row Id="27199" PostHistoryTypeId="3" PostId="12412" RevisionGUID="8e56016a-e54c-4e6d-b29d-0a852709b937" CreationDate="2011-05-17T18:11:24.653" UserId="6605" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;textures&gt;&lt;ndk&gt;" />
  <row Id="27200" PostHistoryTypeId="5" PostId="12412" RevisionGUID="73a531ba-f7ce-4b43-be73-2f96f289819e" CreationDate="2011-05-17T18:11:41.100" UserId="1198" Comment="deleted 32 characters in body" Text="This is an odd one.  When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first).  If I do this once, all textures load as expected, but if I do it **twice or more** one of my textures doesn't load (the texture is white).&#xD;&#xA;&#xD;&#xA;I have checked glGetError and there are no errors (assuming GLES10.glGetError() is the correct way to do this)&#xD;&#xA;&#xD;&#xA;Do I need to do any tidying up when home is pressed?  I currently call myGlView.onPause() and myGlView.onResume() when the onPause/Resume activity events are triggered.  I was under the impression that's all that's needed.  Is there anything else (perhaps non-openGL) that needs to be cleaned up?  Perhaps I'm hitting a limit of some kind  &#xD;&#xA;&#xD;&#xA;I am also using the NDK for some physics and rendering functions if that is relevant, but all resources are loaded using java." />
  <row Id="27201" PostHistoryTypeId="25" PostId="12412" RevisionGUID="a634abdf-50f4-4dab-b2df-cae9e61a87dd" CreationDate="2011-05-17T18:12:13.827" Comment="http://twitter.com/#!/StackGameDev/status/70552216007737344" />
  <row Id="27202" PostHistoryTypeId="2" PostId="12413" RevisionGUID="b5d4267d-d804-4d99-995e-4ffbd9db8e78" CreationDate="2011-05-17T18:57:43.700" UserId="2469" Text="what are the steps to perform downsampling on a texture ?&#xD;&#xA;I've got as far as rendering the scene to a render target, but I'm not sure as to how to then render that to a smaller texture in order to blur it.&#xD;&#xA;I can't seem to find in good explanation or tutorial about this technique." />
  <row Id="27203" PostHistoryTypeId="1" PostId="12413" RevisionGUID="b5d4267d-d804-4d99-995e-4ffbd9db8e78" CreationDate="2011-05-17T18:57:43.700" UserId="2469" Text="downsampling algorithm" />
  <row Id="27204" PostHistoryTypeId="3" PostId="12413" RevisionGUID="b5d4267d-d804-4d99-995e-4ffbd9db8e78" CreationDate="2011-05-17T18:57:43.700" UserId="2469" Text="&lt;c++&gt;&lt;directx&gt;&lt;hlsl&gt;" />
  <row Id="27205" PostHistoryTypeId="2" PostId="12414" RevisionGUID="7a3659a0-9896-4ec2-8a54-4a3a103d0adf" CreationDate="2011-05-17T19:12:55.187" UserId="3289" Text="Render a large quad (with your texture) to a smaller render target, performing whatever blur/downsampling algorithm is appropriate.&#xD;&#xA;&#xD;&#xA;I.e. for each target pixel, sample the number of texels from the source you'd want to combine.&#xD;&#xA;&#xD;&#xA;The simplest (and thus fastest, but ugliest) is the box filter, which usually uses 4 samples from the large texture and put their average into a single texel/pixel in the target. Repeat this step until destination is 2x2 to get all mip-map levels for a texture.&#xD;&#xA;&#xD;&#xA;There are two-pass techniques that are more efficient if you don't need the intermediate textures, and just a result, see [this gamasutra article][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/2107/realtime_glow.php" />
  <row Id="27206" PostHistoryTypeId="2" PostId="12415" RevisionGUID="272fdb76-03f7-4004-886e-d857a981bc80" CreationDate="2011-05-17T19:18:40.783" UserId="3289" Text="As stephelton says, OpenGL hardware is pretty fast, so maybe you don't need to worry too much about tiling and scrolling. Just re-draw everything each frame and see if it's fast enough.&#xD;&#xA;&#xD;&#xA;Now, if you really want/need to do Carmack-style scrolling/buffering (in case your background is a complex scene with many bells and whistles), I suggest you look into Frame Buffer Objects (google for 'opengl fbo'), which allows you to render to memory (i.e. a texture). That texture (or a portion of it) can then be drawn pretty fast to the screen each frame, with &quot;sprites&quot; added on top." />
  <row Id="27207" PostHistoryTypeId="2" PostId="12416" RevisionGUID="e319f949-1a7d-4e4f-a99f-ee75b96a5322" CreationDate="2011-05-17T19:21:42.497" UserId="7103" Text="I am creating an application which downloads names from server. These names can be any  unicode language text which I need to render in XNA on WP7. The biggest problem I see here is WP7 xna system can't render unicode (especially complex script) well. I tried few asian scripts and it looks ridiculous. Some aisan scripts render a character differently depending on neighbor character (generally vowels). Spritefont just renders them one after another without giving any consideration to vowels.&#xD;&#xA;&#xD;&#xA;I think I need something like freetype library. Unfortunately nuclex dont work on WP7. I wish to know if there are any alternatives to overcome this issue. " />
  <row Id="27208" PostHistoryTypeId="1" PostId="12416" RevisionGUID="e319f949-1a7d-4e4f-a99f-ee75b96a5322" CreationDate="2011-05-17T19:21:42.497" UserId="7103" Text="Showing Unicode in XNA on Windows Phone 7" />
  <row Id="27209" PostHistoryTypeId="3" PostId="12416" RevisionGUID="e319f949-1a7d-4e4f-a99f-ee75b96a5322" CreationDate="2011-05-17T19:21:42.497" UserId="7103" Text="&lt;xna&gt;&lt;windows-phone-7&gt;&lt;fonts&gt;" />
  <row Id="27210" PostHistoryTypeId="2" PostId="12417" RevisionGUID="cbbc2a22-af2d-41ec-a379-408b04d8fc48" CreationDate="2011-05-17T19:48:05.043" UserId="1110" Text="This sounds like a VSYNC issue.&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/989471/vsync-in-flex-flash-as3&#xD;&#xA;" />
  <row Id="27211" PostHistoryTypeId="5" PostId="12417" RevisionGUID="6957d055-6a6c-4c53-9fcc-bd964de14304" CreationDate="2011-05-17T20:01:59.653" UserId="1110" Comment="added 203 characters in body" Text="This sounds like a VSYNC issue.&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/989471/vsync-in-flex-flash-as3&#xD;&#xA;&#xD;&#xA;This may also be worth a browse, but without more details it's really not possible to provide better information.&#xD;&#xA;&#xD;&#xA;http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/" />
  <row Id="27212" PostHistoryTypeId="5" PostId="12416" RevisionGUID="041363c8-7290-482f-b041-beee1d2eeb87" CreationDate="2011-05-17T20:14:39.740" UserId="1198" Comment="added 4 characters in body" Text="I am creating an application which downloads names from server. These names can be any  unicode language text which I need to render in XNA on WP7. The biggest problem I see here is WP7 xna system can't render unicode (especially complex script) well. I tried few asian scripts and it looks ridiculous. Some aisan scripts render a character differently depending on neighbor character (generally vowels). Spritefont just renders them one after another without giving any consideration to vowels.&#xD;&#xA;&#xD;&#xA;I think I need something like freetype library. Unfortunately nuclex does not work on WP7. I wish to know if there are any alternatives to overcome this issue. " />
  <row Id="27213" PostHistoryTypeId="2" PostId="12418" RevisionGUID="914ea2aa-ed34-44b1-bda9-d80b2467fb97" CreationDate="2011-05-17T20:48:18.103" UserId="6728" Text="I'm working on a tile-based Mario clone. I have implemented the tile based collision method from the tutorial http://www.tonypa.pri.ee/tbw/tut05.html.&#xD;&#xA;&#xD;&#xA;This works all fine when walking and falling. But when the player jumps near a wall and walks to the right in the air, then the player get stuck on the wall. The player sprite falls again when the player releases the key.&#xD;&#xA;&#xD;&#xA;The setup is pretty easy and i can't find the problem. The map is build up as a 2D array with map blocks. A block can be solid or not. Player can't move trough solid objects, duh..&#xD;&#xA;&#xD;&#xA;In the game loop:&#xD;&#xA;&#xD;&#xA;- the player's location gets updated (gravity, movement ect.)&#xD;&#xA;- check the map on collisions. When a collision is found in the Y, then the player location gets updated so it's above or below the block (depending the direction of the player), then the collision box gets updated with the new location. Then the same process for the X.&#xD;&#xA;- The collision box gets updated to the new location (a free location). The box is adjusted so that it's little higher to get the block below the player to check if he's landed.&#xD;&#xA;&#xD;&#xA;[Here's](http://imageshack.us/m/52/1614/schermafbeelding2011051f.png) a image of the collision box of the player.&#xD;&#xA;&#xD;&#xA;I also tried to switch the X and Y check so that the player is moved on the X line. Then when the player moves the movement goes very laggy. When i push and release the button to move, then the player moves faster but in chucks. Very trippy.. &#xD;&#xA;&#xD;&#xA;Does anyone sees the error or can give me a better collision algorithm for this? &#xD;&#xA;&#xD;&#xA;Map class update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            //update entities&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                entity.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //update objects&#xD;&#xA;            for(MapObject mapObt : _mapObjects) {&#xD;&#xA;                mapObt.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //check for collisions&#xD;&#xA;            checkMapCollision();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Entity (abstract) update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            _velocity = new Vector2d(0.0F, 0.0F);&#xD;&#xA;    &#xD;&#xA;            //add gravity&#xD;&#xA;            _velocity.y = Map._GRAVITY_PER_SEC * timeElapsed;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Mario (extends entity) update methos:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public void update(int timeElapsed) {&#xD;&#xA;            super.update(timeElapsed);&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.IDLE) {&#xD;&#xA;                &#xD;&#xA;            } else if(_isMoving) {&#xD;&#xA;                _marioSmallWalk.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.JUMPING) {&#xD;&#xA;                setVelocityY(getVelocity().y + _jumpSpeed);&#xD;&#xA;    &#xD;&#xA;                _jumpSpeed += _JUMP_DECREASE * timeElapsed;&#xD;&#xA;    &#xD;&#xA;                //falling?&#xD;&#xA;                if(getVelocity().y &gt; 0) {&#xD;&#xA;                    setState(STATES.FALLING);&#xD;&#xA;                }&#xD;&#xA;            } &#xD;&#xA;            &#xD;&#xA;            if(_isMoving) {&#xD;&#xA;                double walkSpd = (_WALK_SPEED_SEC * timeElapsed);&#xD;&#xA;    &#xD;&#xA;                if(getFacing() == FACING.LEFT) {&#xD;&#xA;                    walkSpd = -walkSpd;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                setVelocityX(getVelocity().x + walkSpd);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //falling?&#xD;&#xA;            if(getVelocity().y &gt; (Map._GRAVITY_PER_SEC * timeElapsed) + 1.0F) {&#xD;&#xA;                setState(STATES.FALLING);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            setPosition((int)(getX() + getVelocity().x), (int)(getY() + getVelocity().y));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Map class CheckMapCollision method:&#xD;&#xA;&#xD;&#xA;    public void checkMapCollision() {&#xD;&#xA;            //enteties move so check it&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                //get the corners&#xD;&#xA;                Rectangle bounds = entity.getBounds();&#xD;&#xA;                Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;                Vector2d dir = entity.getDirection();&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[1].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y + blkBounds.height + bounds.height);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = entity.getBounds();&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving to the right&#xD;&#xA;                if(dir.x &gt; 0) {&#xD;&#xA;                    if(corners[1].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[1].isSolid()) {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x - (bounds.width-entity.getCurrentSprite().getOffsetX())-1);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[2].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x + blkBounds.width + (bounds.width/2));&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height+1);&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y);&#xD;&#xA;                        entity.landed();&#xD;&#xA;                        System.out.println(&quot;landed&quot;);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="27214" PostHistoryTypeId="1" PostId="12418" RevisionGUID="914ea2aa-ed34-44b1-bda9-d80b2467fb97" CreationDate="2011-05-17T20:48:18.103" UserId="6728" Text="Tiled based map collision detection problem" />
  <row Id="27215" PostHistoryTypeId="3" PostId="12418" RevisionGUID="914ea2aa-ed34-44b1-bda9-d80b2467fb97" CreationDate="2011-05-17T20:48:18.103" UserId="6728" Text="&lt;java&gt;&lt;collision-detection&gt;&lt;tiles&gt;" />
  <row Id="27216" PostHistoryTypeId="5" PostId="12418" RevisionGUID="fd3253ba-7b41-466b-9a69-5bb273be6645" CreationDate="2011-05-17T20:54:26.120" UserId="6728" Comment="added 76 characters in body" Text="I'm working on a tile-based Mario clone. I have implemented the tile based collision method from the tutorial http://www.tonypa.pri.ee/tbw/tut05.html.&#xD;&#xA;&#xD;&#xA;This works all fine when walking and falling. But when the player jumps near a wall and walks to the right in the air, then the player get stuck on the wall. The player sprite falls again when the player releases the key.&#xD;&#xA;&#xD;&#xA;The setup is pretty easy and i can't find the problem. The map is build up as a 2D array with map blocks. A block can be solid or not. Player can't move trough solid objects, duh..&#xD;&#xA;&#xD;&#xA;In the game loop:&#xD;&#xA;&#xD;&#xA;- the player's location gets updated (gravity, movement ect.)&#xD;&#xA;- check the map on collisions. When a collision is found in the Y, then the player location gets updated so it's above or below the block (depending the direction of the player), then the collision box gets updated with the new location. Then the same process for the X.&#xD;&#xA;- The collision box gets updated to the new location (a free location). The box is adjusted so that it's little higher to get the block below the player to check if he's landed. This is to change the state of the player, from flying sprite to idle ect. &#xD;&#xA;&#xD;&#xA;[Here's](http://imageshack.us/m/52/1614/schermafbeelding2011051f.png) a image of the collision box of the player.&#xD;&#xA;&#xD;&#xA;I also tried to switch the X and Y check so that the player is moved on the X line. Then when the player moves the movement goes very laggy. When i push and release the button to move, then the player moves faster but in chucks. Very trippy.. &#xD;&#xA;&#xD;&#xA;Does anyone sees the error or can give me a better collision algorithm for this? &#xD;&#xA;&#xD;&#xA;Map class update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            //update entities&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                entity.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //update objects&#xD;&#xA;            for(MapObject mapObt : _mapObjects) {&#xD;&#xA;                mapObt.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //check for collisions&#xD;&#xA;            checkMapCollision();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Entity (abstract) update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            _velocity = new Vector2d(0.0F, 0.0F);&#xD;&#xA;    &#xD;&#xA;            //add gravity&#xD;&#xA;            _velocity.y = Map._GRAVITY_PER_SEC * timeElapsed;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Mario (extends entity) update methos:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public void update(int timeElapsed) {&#xD;&#xA;            super.update(timeElapsed);&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.IDLE) {&#xD;&#xA;                &#xD;&#xA;            } else if(_isMoving) {&#xD;&#xA;                _marioSmallWalk.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.JUMPING) {&#xD;&#xA;                setVelocityY(getVelocity().y + _jumpSpeed);&#xD;&#xA;    &#xD;&#xA;                _jumpSpeed += _JUMP_DECREASE * timeElapsed;&#xD;&#xA;    &#xD;&#xA;                //falling?&#xD;&#xA;                if(getVelocity().y &gt; 0) {&#xD;&#xA;                    setState(STATES.FALLING);&#xD;&#xA;                }&#xD;&#xA;            } &#xD;&#xA;            &#xD;&#xA;            if(_isMoving) {&#xD;&#xA;                double walkSpd = (_WALK_SPEED_SEC * timeElapsed);&#xD;&#xA;    &#xD;&#xA;                if(getFacing() == FACING.LEFT) {&#xD;&#xA;                    walkSpd = -walkSpd;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                setVelocityX(getVelocity().x + walkSpd);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //falling?&#xD;&#xA;            if(getVelocity().y &gt; (Map._GRAVITY_PER_SEC * timeElapsed) + 1.0F) {&#xD;&#xA;                setState(STATES.FALLING);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            setPosition((int)(getX() + getVelocity().x), (int)(getY() + getVelocity().y));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Map class CheckMapCollision method:&#xD;&#xA;&#xD;&#xA;    public void checkMapCollision() {&#xD;&#xA;            //enteties move so check it&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                //get the corners&#xD;&#xA;                Rectangle bounds = entity.getBounds();&#xD;&#xA;                Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;                Vector2d dir = entity.getDirection();&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[1].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y + blkBounds.height + bounds.height);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = entity.getBounds();&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving to the right&#xD;&#xA;                if(dir.x &gt; 0) {&#xD;&#xA;                    if(corners[1].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[1].isSolid()) {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x - (bounds.width-entity.getCurrentSprite().getOffsetX())-1);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[2].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x + blkBounds.width + (bounds.width/2));&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height+1);&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y);&#xD;&#xA;                        entity.landed();&#xD;&#xA;                        System.out.println(&quot;landed&quot;);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="27217" PostHistoryTypeId="2" PostId="12419" RevisionGUID="d4bdc160-f834-46c2-b8f0-2a4b7fd45b58" CreationDate="2011-05-17T21:09:54.177" UserId="5281" Text="I was given a model by an artist and it was boned and skinned for me. The .max file that he provided also included an animation to show what he would be able to do. (A basic running animation.)&#xD;&#xA;&#xD;&#xA;However, this was the last I heard from him and I want to construct my own animation. I was wondering if there was any quick and easy way of removing the rotation animation on the bones, back to default values. (Ie, 0 on all axis or to the default biped positions.) &#xD;&#xA;&#xD;&#xA;I have removed all the keyframes and the default pose seems to be the first frame of the animation that was created by the artist. I have tried setting the values in the X, Y, Z boxes at the bottom, nothing happens, I think its relative to the current position? &#xD;&#xA;&#xD;&#xA;I have also tried setting the biped to figure mode, copying the pose and pasting the pose back to the original biped. That only seemed to work in bits and pieces, some of the bones didn't seem rotate, like the pelvis and the spine bones, and also after a while the bones seemed to revert back to the default running stance, or some bones would just take on a weird, random rotation.&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="27218" PostHistoryTypeId="1" PostId="12419" RevisionGUID="d4bdc160-f834-46c2-b8f0-2a4b7fd45b58" CreationDate="2011-05-17T21:09:54.177" UserId="5281" Text="Remove rotation on bones in 3DS Max 2009" />
  <row Id="27219" PostHistoryTypeId="3" PostId="12419" RevisionGUID="d4bdc160-f834-46c2-b8f0-2a4b7fd45b58" CreationDate="2011-05-17T21:09:54.177" UserId="5281" Text="&lt;3dsmax&gt;&lt;rotation&gt;" />
  <row Id="27220" PostHistoryTypeId="25" PostId="12416" RevisionGUID="21cffa52-14bf-4019-9263-d1c439553024" CreationDate="2011-05-17T21:12:14.333" Comment="http://twitter.com/#!/StackGameDev/status/70597516378378241" />
  <row Id="27221" PostHistoryTypeId="2" PostId="12420" RevisionGUID="deb7ff93-32bf-4f10-b22a-751a2d10082f" CreationDate="2011-05-17T21:30:02.850" UserId="6540" Text="Lets say you have a high scoring game like geometry wars, why type would you use for the score and how should you handle overflow?" />
  <row Id="27222" PostHistoryTypeId="1" PostId="12420" RevisionGUID="deb7ff93-32bf-4f10-b22a-751a2d10082f" CreationDate="2011-05-17T21:30:02.850" UserId="6540" Text="What type should you use for keeping game score" />
  <row Id="27223" PostHistoryTypeId="3" PostId="12420" RevisionGUID="deb7ff93-32bf-4f10-b22a-751a2d10082f" CreationDate="2011-05-17T21:30:02.850" UserId="6540" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="27224" PostHistoryTypeId="2" PostId="12421" RevisionGUID="41d30a83-0c3b-4684-aef3-326767b7d15c" CreationDate="2011-05-17T21:33:38.463" UserId="1163" Text="Depending of the kind of Jitter you are getting, this could be the large images snapping to pixels when they move. This will be most noticeable when it is moving slowly.&#xD;&#xA;&#xD;&#xA;Try turning smoothing on for your bitmaps, and/or turn cache and bitmap on." />
  <row Id="27225" PostHistoryTypeId="2" PostId="12422" RevisionGUID="5d410854-5ae7-4bd9-a1e9-32af2226cd77" CreationDate="2011-05-17T21:45:46.573" UserId="4410" Text="Depending on the scoring system in your game and the type you use you may never need to wrap. For example, an unsigned 64-bit integer can hold a maximum value of 9,223,372,036,854,775,807. Long before games get close to that most would start displaying problems rendering a number that long in the UI. It would also take an awfully long time to rack up a score that big so it's not really worth worrying about.&#xD;&#xA;&#xD;&#xA;Depending on how you implement a leaderboard (i.e. use a third-party system for online scoreboards) then the format of the score may already be decided for you on their servers. " />
  <row Id="27226" PostHistoryTypeId="5" PostId="12400" RevisionGUID="380fa92c-9bac-4c53-8a65-5be330ae8665" CreationDate="2011-05-17T21:57:27.203" UserId="1198" Comment="deleted 3 characters in body" Text="I was working on J2ME games in the past, when draw a large backgroud, i always use the Carmack 2d scroll algorithm, keep a image buffer a little larger than device screen, draw the changed small tiles to this buffer, then draw the buffer to device screen. This can reduce the number of times to call drawImage().&#xD;&#xA;&#xD;&#xA;Now we need to prepare for opengles 2D games for iphone and android. I am new about opengl, but i have try to read some engine code and keep learning opengl. There isn't much problem about 2d graphic system, except the tile buffer, there is no image buffer any more, so what size of the tile should i use? The screen size maybe 800*480, if i keep the 32*32 tile, i need to draw about 400 tiles per frame, will this be ok? &#xD;&#xA;" />
  <row Id="27227" PostHistoryTypeId="25" PostId="12420" RevisionGUID="c02fdada-be93-4f46-bd7f-4cf5a06d876d" CreationDate="2011-05-18T00:12:14.840" Comment="http://twitter.com/#!/StackGameDev/status/70642816954540032" />
  <row Id="27228" PostHistoryTypeId="2" PostId="12423" RevisionGUID="161c729b-89b8-47dd-8da2-922a4a2982ea" CreationDate="2011-05-18T00:56:19.810" UserId="7394" Text="It can be non-open-source but must be free.&#xD;&#xA;&#xD;&#xA;I've heard panda3d is good, what do you guys think?" />
  <row Id="27229" PostHistoryTypeId="1" PostId="12423" RevisionGUID="161c729b-89b8-47dd-8da2-922a4a2982ea" CreationDate="2011-05-18T00:56:19.810" UserId="7394" Text="What open-source 3d engine should I use if I want to make a tiny 3d indie game (by myself)?" />
  <row Id="27230" PostHistoryTypeId="3" PostId="12423" RevisionGUID="161c729b-89b8-47dd-8da2-922a4a2982ea" CreationDate="2011-05-18T00:56:19.810" UserId="7394" Text="&lt;3d-engines&gt;" />
  <row Id="27231" PostHistoryTypeId="2" PostId="12424" RevisionGUID="abba7633-0ce7-4442-8337-af9c35747690" CreationDate="2011-05-18T01:20:03.580" UserId="7282" Text="I have an arbitrary line segment, which may or may not be axis aligned along with its normal &#xD;&#xA;eg: Segment(Coord(-1,-1), Coord(1,1), Coord(-1, 1).normalize) which represents a line segment with a 45 degree angle.&#xD;&#xA;&#xD;&#xA;My desire is to transform that line to Segment(a:Coord, b:Coord, Coord(0,1))&#xD;&#xA;&#xD;&#xA;I have a beginners understanding of how transformation matrixes work, in that I know I can get a rotation matrix and apply it to each of the Coords and I'll be left with my segment in the coordinate space I want.&#xD;&#xA;&#xD;&#xA;I do not however, know how to calculate that rotation matrix given I know the start normal and the desired end normal." />
  <row Id="27232" PostHistoryTypeId="1" PostId="12424" RevisionGUID="abba7633-0ce7-4442-8337-af9c35747690" CreationDate="2011-05-18T01:20:03.580" UserId="7282" Text="How do I rotate a segment + normal so that the normal is (0,-1) and the segment is now axis aligned" />
  <row Id="27233" PostHistoryTypeId="3" PostId="12424" RevisionGUID="abba7633-0ce7-4442-8337-af9c35747690" CreationDate="2011-05-18T01:20:03.580" UserId="7282" Text="&lt;2d&gt;&lt;physics&gt;&lt;geometry&gt;" />
  <row Id="27234" PostHistoryTypeId="2" PostId="12425" RevisionGUID="9a83661d-a083-418c-ad08-b6ae0233ae62" CreationDate="2011-05-18T02:11:44.200" UserId="6813" Text="There is plenty of free 3D engines, and Panda3D is a good one to my mind, but as you ask for informations about other 3D engines, I would suggest the following competitors on top of Panda3D:&#xD;&#xA;&#xD;&#xA;- Ogre3D: http://www.ogre3d.org/&#xD;&#xA;- Irrlicht : http://irrlicht.sourceforge.net/&#xD;&#xA;&#xD;&#xA;The choice depends mostly of your feeling. You should try some tutorials for each one and read some threads on their community forums." />
  <row Id="27235" PostHistoryTypeId="2" PostId="12426" RevisionGUID="9a6d596b-0df9-412a-8c4c-787dca9e8b07" CreationDate="2011-05-18T02:42:35.730" UserId="312" Text="I am working on a game and would like to add motion blur to videos that I export from the engine. Right now, I play back gameplay at 1/16th the original speed, giving me 16x more frames (e.g. instead of 60 frames per second, it's 960 frames per second) and averaging the frames. I am curious though, is this the proper weight or should I give frame samples closer to the middle more alpha? Also, should the frames sampled be sampled uniformly?" />
  <row Id="27236" PostHistoryTypeId="1" PostId="12426" RevisionGUID="9a6d596b-0df9-412a-8c4c-787dca9e8b07" CreationDate="2011-05-18T02:42:35.730" UserId="312" Text="What weight should each frame have in motion blur?" />
  <row Id="27237" PostHistoryTypeId="3" PostId="12426" RevisionGUID="9a6d596b-0df9-412a-8c4c-787dca9e8b07" CreationDate="2011-05-18T02:42:35.730" UserId="312" Text="&lt;graphics&gt;&lt;video&gt;&lt;blur&gt;" />
  <row Id="27238" PostHistoryTypeId="2" PostId="12427" RevisionGUID="b8e1c06b-67f6-4247-bb5a-dda771f8e228" CreationDate="2011-05-18T03:05:09.090" UserId="6813" Text="The classical 2D (row) matrix is:&#xD;&#xA;&#xD;&#xA;&gt;    R(θ) = [ cosθ, sinθ ]&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-sinθ, cosθ ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thus, using your example (45°) the (row) matrix would be:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    R(-45°) = [ 0,7071, -0,7071 ]&#xD;&#xA;              [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;And if we consider your points [-1,-1] and [1,1] the result would be:&#xD;&#xA;&#xD;&#xA;    P([-1,-1])R(-45°) = [ -1, -1 ][ 0,7071, -0,7071 ] &#xD;&#xA;                                  [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;                      = [(-1*0.7071)+(-1*0.7071), (-1*-0.7071)+(-1*0.7071)]&#xD;&#xA;                      = [ -1.41, 0 ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    P([1,1])R(-45°) = [ 1, 1 ][ 0,7071, -0,7071 ] &#xD;&#xA;                              [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;                    = [(1*0.7071)+(1*0.7071), (1*-0.7071)+(1*0.7071)]&#xD;&#xA;                    = [ 1.41, 0 ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;But I guess you need to calculate the angle too.&#xD;&#xA;&#xD;&#xA;You can do it using the dot product of the vector representing the line and an axis (say [1,0]).&#xD;&#xA;&#xD;&#xA;Let:&#xD;&#xA;&#xD;&#xA;- A the ray vector obtained from (Point2 - Point1)&#xD;&#xA;- B the base axis used as reference [1, 0]&#xD;&#xA;&#xD;&#xA;&gt; A·B = ||A|| ||B|| cosθ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;===&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;θ = acos( A·B / (||A|| ||B||) )&#xD;&#xA;&#xD;&#xA;&gt;   - ||A|| = square_root( Ax² + Ay² )&lt;br&gt;&#xD;&#xA;&gt;   - ||B|| = square_root( Bx² + By² )&lt;br&gt;&#xD;&#xA;&gt;   - A·B = (Ax*Bx)+(Ay*By)&lt;br&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Thus, using your example again:&#xD;&#xA;&#xD;&#xA;    A = Point2 - Point1 = [1-(-1), 1-(-1)] = [2, 2]&#xD;&#xA;    B = the x axis = [1, 0]&#xD;&#xA;    &#xD;&#xA;    ||A|| = square_root( 2² + 2² ) = 2,8284...&#xD;&#xA;    ||B|| = square_root( 1² + 0² ) = 1&#xD;&#xA;    A·B = (2*1)+(2*0) = 2&#xD;&#xA;    &#xD;&#xA;    θ = acos( 2 / (2,8284 * 1) ) = acos( 0.7071 ) = 45°&#xD;&#xA;&#xD;&#xA;The line was rotated by 45°, so you need to rotate -45° to realign with axis." />
  <row Id="27239" PostHistoryTypeId="5" PostId="12427" RevisionGUID="d6072594-bc91-49f7-bc43-816661bd6382" CreationDate="2011-05-18T03:11:52.363" UserId="6813" Comment="added 188 characters in body" Text="The classical 2D (row) matrix is:&#xD;&#xA;&#xD;&#xA;&gt;    R(θ) = [ cosθ, sinθ ]&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-sinθ, cosθ ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thus, using your example (45°) the (row) matrix would be:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    R(-45°) = [ 0,7071, -0,7071 ]&#xD;&#xA;              [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;And if we consider your points [-1,-1] and [1,1] the result would be:&#xD;&#xA;&#xD;&#xA;    P([-1,-1])R(-45°) = [ -1, -1 ][ 0,7071, -0,7071 ] &#xD;&#xA;                                  [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;                      = [(-1*0.7071)+(-1*0.7071), (-1*-0.7071)+(-1*0.7071)]&#xD;&#xA;                      = [ -1.41, 0 ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    P([1,1])R(-45°) = [ 1, 1 ][ 0,7071, -0,7071 ] &#xD;&#xA;                              [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;                    = [(1*0.7071)+(1*0.7071), (1*-0.7071)+(1*0.7071)]&#xD;&#xA;                    = [ 1.41, 0 ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;But I guess you need to calculate the angle too.&#xD;&#xA;&#xD;&#xA;You can do it using the dot product of the vector representing the line and an axis (say [1,0]).&#xD;&#xA;&#xD;&#xA;Let:&#xD;&#xA;&#xD;&#xA;- A the ray vector obtained from (Point2 - Point1)&#xD;&#xA;- B the base axis used as reference [1, 0]&#xD;&#xA;&#xD;&#xA;&gt; A·B = ||A|| ||B|| cosθ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;===&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;θ = acos( A·B / (||A|| ||B||) )&#xD;&#xA;&#xD;&#xA;&gt;   - ||A|| = square_root( Ax² + Ay² )&lt;br&gt;&#xD;&#xA;&gt;   - ||B|| = square_root( Bx² + By² )&lt;br&gt;&#xD;&#xA;&gt;   - A·B = (Ax*Bx)+(Ay*By)&lt;br&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Thus, using your example again:&#xD;&#xA;&#xD;&#xA;    A = Point2 - Point1 = [1-(-1), 1-(-1)] = [2, 2]&#xD;&#xA;    B = the x axis = [1, 0]&#xD;&#xA;    &#xD;&#xA;    ||A|| = square_root( 2² + 2² ) = 2,8284...&#xD;&#xA;    ||B|| = square_root( 1² + 0² ) = 1&#xD;&#xA;    A·B = (2*1)+(2*0) = 2&#xD;&#xA;    &#xD;&#xA;    θ = acos( 2 / (2,8284 * 1) ) = acos( 0.7071 ) = 45°&#xD;&#xA;&#xD;&#xA;The line was rotated by 45°, so you need to rotate -45° to realign with axis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Edit: hum I used [0,1] as targeted normal as this is what you gave in your text, now I see that you specified [0,-1] in your title. Anyway the technique should remain OK." />
  <row Id="27240" PostHistoryTypeId="25" PostId="12423" RevisionGUID="3bf98d93-fca6-4d31-81d9-3384ce6f2a50" CreationDate="2011-05-18T03:12:15.700" Comment="http://twitter.com/#!/StackGameDev/status/70688119304888320" />
  <row Id="27241" PostHistoryTypeId="5" PostId="12427" RevisionGUID="bd8c5eb8-a925-4600-9f8a-c441f92564f5" CreationDate="2011-05-18T03:21:03.513" UserId="6813" Comment="added 54 characters in body" Text="The classical 2D (row) matrix is:&#xD;&#xA;&#xD;&#xA;&gt;    R(θ) = [ cosθ, sinθ ]&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-sinθ, cosθ ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thus, using your example (45°) the (row) matrix would be:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    R(-45°) = [ 0,7071, -0,7071 ]&#xD;&#xA;              [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;And if we consider your points [-1,-1] and [1,1] the result would be:&#xD;&#xA;&#xD;&#xA;    P([-1,-1])R(-45°) = [ -1, -1 ][ 0,7071, -0,7071 ] &#xD;&#xA;                                  [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;                      = [(-1*0.7071)+(-1*0.7071), (-1*-0.7071)+(-1*0.7071)]&#xD;&#xA;                      = [ -1.41, 0 ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    P([1,1])R(-45°) = [ 1, 1 ][ 0,7071, -0,7071 ] &#xD;&#xA;                              [ 0,7071,  0,7071 ]&#xD;&#xA;&#xD;&#xA;                    = [(1*0.7071)+(1*0.7071), (1*-0.7071)+(1*0.7071)]&#xD;&#xA;                    = [ 1.41, 0 ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;But I guess you need to calculate the angle too.&#xD;&#xA;&#xD;&#xA;You can do it using the dot product of the vector representing the line and an axis (say [1,0]).&#xD;&#xA;&#xD;&#xA;Let:&#xD;&#xA;&#xD;&#xA;- A the ray vector obtained from [Point2 - Point1] (take care to avoid zero vector)&#xD;&#xA;- B the base axis used as reference [1, 0] or [0, 1]&#xD;&#xA;&#xD;&#xA;&gt; A·B = ||A|| ||B|| cosθ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;===&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;θ = acos( A·B / (||A|| ||B||) )&#xD;&#xA;&#xD;&#xA;&gt;   - ||A|| = square_root( Ax² + Ay² )&lt;br&gt;&#xD;&#xA;&gt;   - ||B|| = square_root( Bx² + By² )&lt;br&gt;&#xD;&#xA;&gt;   - A·B = (Ax*Bx)+(Ay*By)&lt;br&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Thus, using your example again:&#xD;&#xA;&#xD;&#xA;    A = Point2 - Point1 = [1-(-1), 1-(-1)] = [2, 2]&#xD;&#xA;    B = the x axis = [1, 0]&#xD;&#xA;    &#xD;&#xA;    ||A|| = square_root( 2² + 2² ) = 2,8284...&#xD;&#xA;    ||B|| = square_root( 1² + 0² ) = 1&#xD;&#xA;    A·B = (2*1)+(2*0) = 2&#xD;&#xA;    &#xD;&#xA;    θ = acos( 2 / (2,8284 * 1) ) = acos( 0.7071 ) = 45°&#xD;&#xA;&#xD;&#xA;The line was rotated by 45°, so you need to rotate -45° to realign with axis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Edit: hum I used [0,1] as normal target, because this is what we can read in your text, but now I see that you specified [0,-1] in your title. Anyway the technique should remain OK." />
  <row Id="27242" PostHistoryTypeId="5" PostId="12400" RevisionGUID="b61c10d1-ab49-4284-842a-065e96ef43bd" CreationDate="2011-05-18T03:24:54.340" UserId="962" Comment="edited body; edited title" Text="I was working on J2ME games in the past, when draw a large backgroud, I always use the Carmack 2d scroll algorithm, keep a image buffer a little larger than device screen, draw the changed small tiles to this buffer, then draw the buffer to device screen. This can reduce the number of times to call drawImage().&#xD;&#xA;&#xD;&#xA;Now we need to prepare for opengles 2D games for iphone and android. I am new about opengl, but i have try to read some engine code and keep learning opengl. There isn't much problem about 2d graphic system, except the tile buffer, there is no image buffer any more, so what size of the tile should i use? The screen size maybe 800*480, if i keep the 32*32 tile, i need to draw about 400 tiles per frame, will this be ok? &#xD;&#xA;" />
  <row Id="27243" PostHistoryTypeId="4" PostId="12400" RevisionGUID="b61c10d1-ab49-4284-842a-065e96ef43bd" CreationDate="2011-05-18T03:24:54.340" UserId="962" Comment="edited body; edited title" Text="Is there any scroll algorithm for OpenGL ES?" />
  <row Id="27244" PostHistoryTypeId="5" PostId="9490" RevisionGUID="4f48611c-3921-4b15-abf8-3d53d58ff61a" CreationDate="2011-05-18T03:29:28.583" UserId="962" Comment="Removed &quot;fluff&quot; text" Text="I have one large bitmap that has four frames drawn on it and I only draw one at a time by looping through the bitmap by increments to animate walking. I can get the bitmap to rotate correctly when it is not moving but once the animation starts it starts to cut off alot of the image and sometimes becomes very fuzzy.  I have tried &#xD;&#xA;&#xD;&#xA;    public void draw(Canvas canvas,int pointerX, int pointerY) { &#xD;&#xA;        Matrix m;&#xD;&#xA;&#xD;&#xA;        if (setRotation){&#xD;&#xA;        //  canvas.save();&#xD;&#xA;        m = new Matrix();&#xD;&#xA;        m.reset();&#xD;&#xA;    &#xD;&#xA;        // spriteWidth and spriteHeight are for just the current frame showed &#xD;&#xA;        m.setTranslate(spriteWidth / 2, spriteHeight / 2);&#xD;&#xA;&#xD;&#xA;        //get and set rotation for ninja based off of joystick&#xD;&#xA;        m.preRotate((float) GameControls.getRotation());&#xD;&#xA;&#xD;&#xA;        //create the rotated bitmap&#xD;&#xA;        flipedSprite = Bitmap.createBitmap(bitmap , 0, 0,bitmap.getWidth(),bitmap.getHeight() , m, true);&#xD;&#xA;        //set new bitmap to rotated ninja&#xD;&#xA;        setBitmap(flipedSprite);    //  canvas.restore(); &#xD;&#xA;        Log.d(&quot;Ninja View&quot;, &quot;angle of rotation= &quot; +(float) GameControls.getRotation());&#xD;&#xA;        setRotation = false;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And then the Draw Method here  &#xD;&#xA;&#xD;&#xA;    // create the destination rectangle for the ninjas current animation frame&#xD;&#xA;    // pointerX and pointerY are from the joystick moving the ninja around&#xD;&#xA;    destRect = new Rect(pointerX, pointerY, pointerX + spriteWidth, pointerY + spriteHeight);&#xD;&#xA;&#xD;&#xA;    canvas.drawBitmap(bitmap, getSourceRect(), destRect, null);&#xD;&#xA;&#xD;&#xA;The animation is four frames long and gets incremented by 66 (the size of one of the frames on the bitmap) for every frame and then back to 0 at the end of the loop." />
  <row Id="27245" PostHistoryTypeId="5" PostId="12418" RevisionGUID="554d2b01-3122-4c5c-aeda-f28aaef689cf" CreationDate="2011-05-18T04:23:12.920" UserId="6728" Comment="deleted 59 characters in body" Text="I'm working on a tile-based Mario clone. I have implemented the tile based collision method from the tutorial http://www.tonypa.pri.ee/tbw/tut05.html.&#xD;&#xA;&#xD;&#xA;This works all fine when walking and falling. But when the player jumps near a wall and walks to the right in the air, then the player get stuck on the wall. The player sprite falls again when the player releases the key.&#xD;&#xA;&#xD;&#xA;The setup is pretty easy and i can't find the problem. The map is build up as a 2D array with map blocks. A block can be solid or not. Player can't move trough solid objects, duh..&#xD;&#xA;&#xD;&#xA;In the game loop:&#xD;&#xA;&#xD;&#xA;- the player's location gets updated (gravity, movement ect.)&#xD;&#xA;- check the map on collisions. When a collision is found in the Y, then the player location gets updated so it's above or below the block (depending the direction of the player), then the collision box gets updated with the new location. Then the same process for the X.&#xD;&#xA;- The collision box gets updated to the new location (a free location). The box is adjusted so that it's little higher to get the block below the player to check if he's landed. This is to change the state of the player, from flying sprite to idle ect. &#xD;&#xA;&#xD;&#xA;[Here's](http://imageshack.us/m/52/1614/schermafbeelding2011051f.png) a image of the collision box of the player.&#xD;&#xA;&#xD;&#xA;I also tried to switch the X and Y check so that the player is moved on the X line. Then when the player moves the movement goes very laggy. When i push and release the button to move, then the player moves faster but in chucks. Very trippy.. &#xD;&#xA;&#xD;&#xA;Does anyone sees the error or can give me a better collision algorithm for this? &#xD;&#xA;&#xD;&#xA;Map class update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            //update entities&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                entity.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //update objects&#xD;&#xA;            for(MapObject mapObt : _mapObjects) {&#xD;&#xA;                mapObt.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //check for collisions&#xD;&#xA;            checkMapCollision();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Entity (abstract) update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            _velocity = new Vector2d(0.0F, 0.0F);&#xD;&#xA;    &#xD;&#xA;            //add gravity&#xD;&#xA;            _velocity.y = Map._GRAVITY_PER_SEC * timeElapsed;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Mario (extends entity) update methos:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public void update(int timeElapsed) {&#xD;&#xA;            super.update(timeElapsed);&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.IDLE) {&#xD;&#xA;                &#xD;&#xA;            } else if(_isMoving) {&#xD;&#xA;                _marioSmallWalk.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.JUMPING) {&#xD;&#xA;                setVelocityY(getVelocity().y + _jumpSpeed);&#xD;&#xA;    &#xD;&#xA;                _jumpSpeed += _JUMP_DECREASE * timeElapsed;&#xD;&#xA;    &#xD;&#xA;                //falling?&#xD;&#xA;                if(getVelocity().y &gt; 0) {&#xD;&#xA;                    setState(STATES.FALLING);&#xD;&#xA;                }&#xD;&#xA;            } &#xD;&#xA;            &#xD;&#xA;            if(_isMoving) {&#xD;&#xA;                double walkSpd = (_WALK_SPEED_SEC * timeElapsed);&#xD;&#xA;    &#xD;&#xA;                if(getFacing() == FACING.LEFT) {&#xD;&#xA;                    walkSpd = -walkSpd;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                setVelocityX(getVelocity().x + walkSpd);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //falling?&#xD;&#xA;            if(getVelocity().y &gt; (Map._GRAVITY_PER_SEC * timeElapsed) + 1.0F) {&#xD;&#xA;                setState(STATES.FALLING);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            setPosition((int)(getX() + getVelocity().x), (int)(getY() + getVelocity().y));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Map class CheckMapCollision method:&#xD;&#xA;&#xD;&#xA;    public void checkMapCollision() {&#xD;&#xA;            //enteties move so check it&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                //get the corners&#xD;&#xA;                Rectangle bounds = entity.getBounds();&#xD;&#xA;                Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;                Vector2d dir = entity.getDirection();&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[1].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y + blkBounds.height + bounds.height);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = entity.getBounds();&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving to the right&#xD;&#xA;                if(dir.x &gt; 0) {&#xD;&#xA;                    if(corners[1].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[1].isSolid()) {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x - (bounds.width-entity.getCurrentSprite().getOffsetX())-1);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[2].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x + blkBounds.width + (bounds.width/2));&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height+1);&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.landed();&#xD;&#xA;                        System.out.println(&quot;landed&quot;);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="27246" PostHistoryTypeId="2" PostId="12428" RevisionGUID="7d97377d-9270-48ca-9f27-1294532f722d" CreationDate="2011-05-18T04:40:25.503" UserId="627" Text="Set UI transformation matrices, set U/V/vertex coordinates for quad, draw. Nothing more to it, really." />
  <row Id="27247" PostHistoryTypeId="2" PostId="12429" RevisionGUID="42a7e6df-357d-455e-9c97-bb203ef108c7" CreationDate="2011-05-18T05:20:37.173" UserId="1400" Text="And here I am again, looking for help with my OpenGL camera once again.  This is starting to get embarrassing.  Anyway, here's the deal: I think my OpenGL First Person free roaming camera is starting to work correctly.  I can draw objects, see them, and my coordinate system is set up as expected.  Great.  I solved the gimbal lock issue by fixing the UP vector to be the Y unit vector and restricted the camera's rotation to no more than PI/2 and -PI/2 up/down.  All of this is used to build the modelview matrix, which I invert and set at the beginning of every frame.  Sweet.  It can move in all directions and seems to work just fine.&#xD;&#xA;&#xD;&#xA;That is until I try to change the projection settings.  For whatever reason, no matter what I do, my clipping plane is always around +50.0 Z, regardless of the OpenGL calls I attempt.  If I move the camera around and move it into certain positions, rotating the camera causes my objects to disappear and reappear.  They tend to appear on the edges of the screen, and disappear near the center.  In order to facilitate a better answer, allow me to state my assumptions:&#xD;&#xA;&#xD;&#xA; - glFrustum only needs to be called ONCE.  OpenGL maintains the Projection Matrix and AUTOMATICALLY multiplies the Modelview and Projection Matrices during rendering.&#xD;&#xA; - The math on the gluPerspective page and glFrustum pages is correct, despite the gluPerspective matrix listing seemingly containing 19 elements when OpenGL only uses 16 of those.&#xD;&#xA; - I'm assuming that the INVERSION of my camera's Modelview Matrix is somehow screwing with my Projection frustum.  I have to bet it's something to do with how the rotation is being calculated.&#xD;&#xA;&#xD;&#xA;Has anyone seen this kind of behavior before?  Where should I look to start tracking down the problem?  Am I doing this completely wrong?  Thanks in advance!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27248" PostHistoryTypeId="1" PostId="12429" RevisionGUID="42a7e6df-357d-455e-9c97-bb203ef108c7" CreationDate="2011-05-18T05:20:37.173" UserId="1400" Text="OpenGL 3D Camera" />
  <row Id="27249" PostHistoryTypeId="3" PostId="12429" RevisionGUID="42a7e6df-357d-455e-9c97-bb203ef108c7" CreationDate="2011-05-18T05:20:37.173" UserId="1400" Text="&lt;opengl&gt;&lt;3d&gt;&lt;graphics&gt;&lt;graphics-programming&gt;&lt;camera&gt;" />
  <row Id="27250" PostHistoryTypeId="2" PostId="12430" RevisionGUID="7d963d40-06ff-4de6-9cf3-a823cca03a63" CreationDate="2011-05-18T05:52:50.477" UserId="2792" Text="You might want to rethink motion blur and only do it for one frame, not blending between several. This will help you avoid a lot of edge cases where your frame rate is stuttering and you have to decide on which frames to blend and how much.&#xD;&#xA;&#xD;&#xA;A common way to do this is using motion vectors, where you render your scene again, with extra data for each mesh, and render screen space velocity into a separate buffer. This buffer can then be used as a blur direction control. to compose the final blurred image.&#xD;&#xA;&#xD;&#xA;You can also build depth of field information at the same time using this technique." />
  <row Id="27251" PostHistoryTypeId="2" PostId="12431" RevisionGUID="3f195810-ec4e-489c-a261-e16d282b0f0d" CreationDate="2011-05-18T05:53:26.950" UserId="7432" Text="I am making a android game, it's a tower/base defense like type of game(yea I know it is kind of confusing), I was wandering if anyone knows a good to have the attacking sprites randomly generate with out the number of sprites being higher than the level. " />
  <row Id="27252" PostHistoryTypeId="1" PostId="12431" RevisionGUID="3f195810-ec4e-489c-a261-e16d282b0f0d" CreationDate="2011-05-18T05:53:26.950" UserId="7432" Text="Populating Sprites" />
  <row Id="27253" PostHistoryTypeId="3" PostId="12431" RevisionGUID="3f195810-ec4e-489c-a261-e16d282b0f0d" CreationDate="2011-05-18T05:53:26.950" UserId="7432" Text="&lt;java&gt;&lt;android&gt;&lt;game-mechanics&gt;" />
  <row Id="27254" PostHistoryTypeId="25" PostId="12429" RevisionGUID="4c28d4fb-3da9-45bf-b7e2-85ce421401fb" CreationDate="2011-05-18T06:12:16.893" Comment="http://twitter.com/#!/StackGameDev/status/70733422611533824" />
  <row Id="27255" PostHistoryTypeId="17" PostId="12433" RevisionGUID="fb5b53e6-2f84-4aed-bdcd-7e333b29c80f" CreationDate="2011-05-18T08:25:35.153" UserId="-1" Comment="from http://stackoverflow.com/questions/6007108/rts-game-ai-thread/6007207#6007207" Text="" />
  <row Id="27256" PostHistoryTypeId="17" PostId="12434" RevisionGUID="650e0be8-74df-46ed-a518-be51aba42e43" CreationDate="2011-05-18T08:25:35.153" UserId="-1" Comment="from http://stackoverflow.com/questions/6007108/rts-game-ai-thread/6007778#6007778" Text="" />
  <row Id="27257" PostHistoryTypeId="17" PostId="12435" RevisionGUID="3c5fc6ba-5f5e-4072-9482-796294ff9158" CreationDate="2011-05-18T08:25:35.153" UserId="-1" Comment="from http://stackoverflow.com/questions/6007108/rts-game-ai-thread/6008341#6008341" Text="" />
  <row Id="27258" PostHistoryTypeId="2" PostId="12433" RevisionGUID="b3f42d99-58c2-4a29-9ec3-cda3197df89c" CreationDate="2011-05-15T07:56:28.267" UserDisplayName="Savas Alp" Text="Have a separate thread for AI. But not for every unit since it would consume too much OS resources and synchronization would be a nightmare.&#xD;&#xA;&#xD;&#xA;Make sure the AI thread would find an opportunity to execute. Don't take it lightly, if the main thread does too many things, it may never find that opportunity! If you simply give higher priority to AI thread, then the game becomes unresponsive, which is unacceptable.&#xD;&#xA;&#xD;&#xA;So, carefully select sync points and/or events in main loop and allow the AI thread to complete its calculations while the main thread stops. For example, if the user unit sees another AI unit, sync it, so your unit sees an updated unit vice versa." />
  <row Id="27259" PostHistoryTypeId="2" PostId="12434" RevisionGUID="a973b3b8-09a8-4cc0-b740-f4ff9f0708b0" CreationDate="2011-05-15T10:17:00.130" UserDisplayName="Yoel Veinger" Text="I am also working on a RTS game from scratch. I haven't tested it yet, but my idea was to run unit AI in the main game loop for all units that are currently visible to the player (in the part of the screen that the player actually see's or near the border of that screen), as it is more likely that the player will move the screen a bit.&#xD;&#xA;&#xD;&#xA;The other units are checked in a separate thread, and I have two priorities:&#xD;&#xA;1. Units that are in places which are visible to the user if he moves the screen there.&#xD;&#xA;2. Units that are in hidden areas (not yet explored and &quot;fog of war&quot;).&#xD;&#xA;&#xD;&#xA;For units in the seconds priority, i run the loop less often, and compensate by moving them retrospectively when needed. &#xD;&#xA;" />
  <row Id="27260" PostHistoryTypeId="2" PostId="12435" RevisionGUID="cb9488af-c79c-4596-8f58-3857421d0d0a" CreationDate="2011-05-15T12:24:06.513" UserDisplayName="Andrei" Text="What does &quot;from scratch&quot; mean? Can you use something like XNA instead with DirectX?&#xD;&#xA;&#xD;&#xA;You should be rendering something between 30 and 60 frames per second to have fluid motion.&#xD;&#xA;There is really no need to have more fps.&#xD;&#xA;&#xD;&#xA;If rendering + logic takes less less than the 16ms that 60fps gives you, then there should be no need for an AI thread.&#xD;&#xA;&#xD;&#xA;If you won't have enough time between rendering the frames then you are going to have to think really carefully on what *must* be updated every frame and what does not.&#xD;&#xA;&#xD;&#xA;I'd guesstimate that the &quot;doctrines&quot; part should be as simple and efficient as possible so that it can be updated every frame, at least for visible units and other units nearby.&#xD;&#xA;The units that do not influence the visible units directly can be updated less frequently (and, correspondingly, with a greater delta T).&#xD;&#xA;&#xD;&#xA;The main AI has more work to perform, as it has to process all the units on the map and figure out a strategy, so it should require most of the computation time. It is the first candidate for a separate thread.&#xD;&#xA;&#xD;&#xA;Note that you might want to add another layer between the two, something like an squad level AI. &#xD;&#xA;Basically, each unit's AI should make sure the unit responds &quot;intelligently&quot; to the immediate situation, so it needs to be fast and responsive. The squad AI is responsible for the &quot;intelligent&quot; actions of several units, spread across several seconds, like finding a bridge if the squad needs to cross a river. And the main AI should direct the actions of lots of squads over a long period of time.&#xD;&#xA;&#xD;&#xA;Especially if you don't have a lot of experience, don't do threading if you don't have to.&#xD;&#xA;This will be complicated as it is without an extra burden. &#xD;&#xA;You can learn multithreading as a separate project, or as an extension of this one once it is in a *working* state.&#xD;&#xA;Good luck!&#xD;&#xA;" />
  <row Id="27261" PostHistoryTypeId="2" PostId="12432" RevisionGUID="2a2336cc-7b00-4c5b-9fb9-bf7af19a9d6d" CreationDate="2011-05-15T07:30:52.083" UserDisplayName="Mathieu" Text="I have a project to make a real-time strategy game from scratch. I am still at the early planning stage, but I have been programming a little to see the mechanics.&#xD;&#xA;&#xD;&#xA;I know how to program. I also have a good idea of how I will structure the game classes and the Rule-Based (state-machine) AI for the computer player.&#xD;&#xA;&#xD;&#xA;I want to develop Doctrines, which will give a specific behavior to a specific unit (but can be used on many units at the same time), such as Scout, Follow Mission Route, hold Position (attack any approching enemy or retreat if overwhelmed), etc...&#xD;&#xA;&#xD;&#xA;The doctrines will only apply to the units, so it will have a unit perspective, and not be aware on the whole map sitatuation.&#xD;&#xA;&#xD;&#xA;The Computer AI will analyse the entire visible map and decide on which soctrine to assign each unit depending on another set of rules.&#xD;&#xA;&#xD;&#xA;I am doing this in C# with OpenGL.&#xD;&#xA;&#xD;&#xA;For now, I don't have much, only a few things in tests before I begin my main conception. I have a game loop where all the game processing (where I will call the update mouvement, combat, rendering, etc, one after the other) will happen, it is called very often if the Application.Idle event.&#xD;&#xA;&#xD;&#xA;Now, I was wondering. Since there will be a lot of things to process in the gameloop, should the Computer AI and the Units select their actions in that loop or will it be too slow?&#xD;&#xA;&#xD;&#xA;If I want all things to be simultaneous, Should I create a separate Thread for the computer AI? Or even a separate thread for every unit?&#xD;&#xA;&#xD;&#xA;I don't have much experience with multi-threading. What would be the best approach for this?" />
  <row Id="27262" PostHistoryTypeId="1" PostId="12432" RevisionGUID="2a2336cc-7b00-4c5b-9fb9-bf7af19a9d6d" CreationDate="2011-05-15T07:30:52.083" UserDisplayName="Mathieu" Text="RTS Game AI Thread" />
  <row Id="27263" PostHistoryTypeId="3" PostId="12432" RevisionGUID="2a2336cc-7b00-4c5b-9fb9-bf7af19a9d6d" CreationDate="2011-05-15T07:30:52.083" UserDisplayName="Mathieu" Text="&lt;c#&gt;&lt;multithreading&gt;" />
  <row Id="27264" PostHistoryTypeId="17" PostId="12432" RevisionGUID="197ed3aa-e70d-41c7-aaa6-3f27e4823693" CreationDate="2011-05-18T08:25:35.153" UserId="-1" Comment="from http://stackoverflow.com/questions/6007108/rts-game-ai-thread" Text="" />
  <row Id="27265" PostHistoryTypeId="2" PostId="12436" RevisionGUID="1bf64d2f-c46c-4632-8430-5a57ddbb36c0" CreationDate="2011-05-18T08:42:13.880" UserId="6395" Text="I'm testing unity for a game that I'm building, and I've touched its limit.&#xD;&#xA;&#xD;&#xA;My test scenario: A wanna be house with 200 elements (cubes rescaled) no texture, box colliders and rigid bodies for each &quot;cube&quot; and fixed joints to hold them together (400+ fixed joints).&#xD;&#xA;&#xD;&#xA;The house is on a plane, and above it I put 2 sphere at different altitudes, spheres which will crash in the poor house. &#xD;&#xA;/My test scenario&#xD;&#xA;&#xD;&#xA;This moves very slow on an iPod Touch 3rd generation.&#xD;&#xA;Therefore I'm looking for some documentation to create a reasonable budget for the number of polygons, physics collisions and so on.&#xD;&#xA;&#xD;&#xA;What is your recommendation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27266" PostHistoryTypeId="1" PostId="12436" RevisionGUID="1bf64d2f-c46c-4632-8430-5a57ddbb36c0" CreationDate="2011-05-18T08:42:13.880" UserId="6395" Text="what is your unity3d physics engine budget for iOS games? what are the best practices for unity3d iOS?" />
  <row Id="27267" PostHistoryTypeId="3" PostId="12436" RevisionGUID="1bf64d2f-c46c-4632-8430-5a57ddbb36c0" CreationDate="2011-05-18T08:42:13.880" UserId="6395" Text="&lt;physics&gt;&lt;unity&gt;&lt;testing&gt;" />
  <row Id="27268" PostHistoryTypeId="2" PostId="12437" RevisionGUID="c6f0d479-79e4-4cf8-9f52-6eec5300a3dd" CreationDate="2011-05-18T08:58:00.963" UserId="5508" Text="You sprite character gets snagged on the intersections between two tiles. See the following diagram, which depicts the situation at the start of your collision routine.&#xD;&#xA;&#xD;&#xA;![Collision with a wall][1]&#xD;&#xA;&#xD;&#xA;Mario was moved to the right due to player controls. This will place the sprite in the three tiles. Then, you perform the collision detection on downwards Y. Notice the point in the blue circle: this will detect a collision with the second block and tries to resolve it by setting the Y coordinate to the upper bound of that block, effectively suspending Mario in mid-air.&#xD;&#xA;&#xD;&#xA;As soon as the player releases the key to move Mario to the right, the sprite will not move into the wall, and the point that previously would detect a collision, will not register a hit. This will allow Mario to fall to the ground.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ouEUb.png" />
  <row Id="27269" PostHistoryTypeId="2" PostId="12438" RevisionGUID="7774dcf7-175b-45bb-a299-6336ce8b12a8" CreationDate="2011-05-18T09:07:47.030" UserId="5113" Text="I am creating a simple map engine that will automatically expand in any direction with procedurally-generated content as needed.&#xD;&#xA;&#xD;&#xA;What is a good way to store map data, anchored at a 0,0 origin so that a rectangular subset of map data can be loaded quickly and efficiently from any point on the map?&#xD;&#xA;&#xD;&#xA;I have an idea that maybe I should chunkify the map into distinct sectors and then use some sort of header format to identify where in the file a specific sector is stored. Is this a good technique or are there better, more efficient techniques that I can look at?" />
  <row Id="27270" PostHistoryTypeId="1" PostId="12438" RevisionGUID="7774dcf7-175b-45bb-a299-6336ce8b12a8" CreationDate="2011-05-18T09:07:47.030" UserId="5113" Text="What is a good flat file format for storing a 2D tile map that can grow infinitely in any direction?" />
  <row Id="27271" PostHistoryTypeId="3" PostId="12438" RevisionGUID="7774dcf7-175b-45bb-a299-6336ce8b12a8" CreationDate="2011-05-18T09:07:47.030" UserId="5113" Text="&lt;tiles&gt;&lt;maps&gt;" />
  <row Id="27272" PostHistoryTypeId="25" PostId="12436" RevisionGUID="4eefe1f6-3a72-4382-a208-101adfdad7e2" CreationDate="2011-05-18T09:12:17.823" Comment="http://twitter.com/#!/StackGameDev/status/70778724764749824" />
  <row Id="27273" PostHistoryTypeId="5" PostId="12437" RevisionGUID="d983b5d5-d7e3-4b1b-8725-c5b822d6947e" CreationDate="2011-05-18T09:24:47.680" UserId="5508" Comment="Added a solution to the problem" Text="You sprite character gets snagged on the intersections between two tiles. See the following diagram, which depicts the situation at the start of your collision routine.&#xD;&#xA;&#xD;&#xA;![Collision with a wall][1]&#xD;&#xA;&#xD;&#xA;Mario was moved to the right due to player controls. This will place the sprite in the three tiles. Then, you perform the collision detection on downwards Y. Notice the point in the blue circle: this will detect a collision with the second block and tries to resolve it by setting the Y coordinate to the upper bound of that block, effectively suspending Mario in mid-air.&#xD;&#xA;&#xD;&#xA;As soon as the player releases the key to move Mario to the right, the sprite will not move into the wall, and the point that previously would detect a collision, will not register a hit. This will allow Mario to fall to the ground.&#xD;&#xA;&#xD;&#xA;The quick and dirty resolution to this problem is resolving X collisions first, and only apply gravity when the player is not on the ground. If you would keep the gravity, the same problem would occur when walking around (this is the 'trippy' behaviour you have seen already after swapping the X and Y check ;) ).&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ouEUb.png" />
  <row Id="27274" PostHistoryTypeId="2" PostId="12439" RevisionGUID="6b6cdf03-e484-49fb-a46c-36cf1efe31fa" CreationDate="2011-05-18T10:13:13.597" UserId="7436" Text="we are trying to make a small 2d game which requires an excessive amount of sprites spawning and moving around the screen at the same time. We did try doing this in python but it started choking at around the 500 mark. Are there any specific engines that you would recommend for this sort of project or a good way to handle this in python?&#xD;&#xA;&#xD;&#xA;Thanks for your time." />
  <row Id="27275" PostHistoryTypeId="1" PostId="12439" RevisionGUID="6b6cdf03-e484-49fb-a46c-36cf1efe31fa" CreationDate="2011-05-18T10:13:13.597" UserId="7436" Text="How can I handle a 2d game with tens of thousands of sprites rendering at the same time?" />
  <row Id="27276" PostHistoryTypeId="3" PostId="12439" RevisionGUID="6b6cdf03-e484-49fb-a46c-36cf1efe31fa" CreationDate="2011-05-18T10:13:13.597" UserId="7436" Text="&lt;2d&gt;&lt;engine&gt;&lt;sprites&gt;" />
  <row Id="27277" PostHistoryTypeId="2" PostId="12440" RevisionGUID="d930f394-b131-43d0-b94f-4d990ec3015a" CreationDate="2011-05-18T10:21:51.063" UserId="1742" Text="The solution used most often seems to be to split into lots of files, however your question does imply a single file only. The only sensible option for this (in my opinion) is to emulate a very simple file system inside that single file. It's not actually terriby hard to do, but you really should consider using multiple files if you can.&#xD;&#xA;&#xD;&#xA;If you have to stick to one file, then you might find inspiration for your implementation from the ext2 fs. http://en.wikipedia.org/wiki/Ext2 I know it helped me make some good decisions when I had to implement a simple FS for a game.&#xD;&#xA;&#xD;&#xA;But really, for any growing map, it's usually better just to use a file for each &quot;accessed&quot; chunk." />
  <row Id="27278" PostHistoryTypeId="2" PostId="12441" RevisionGUID="c71af3ad-1912-4f8e-a8ea-14fe9a653698" CreationDate="2011-05-18T10:22:15.030" UserId="2229" Text="Because, I haven't received any answer so far, to provide you with some solution, let me tell you how I solved it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the beginning, I use text file format. It is easier to read and debug my application. The text format is based on [WaveFront .obj][1] file architecture, and I simply add the tags, as needed.&#xD;&#xA;&#xD;&#xA;When I have complete text file format, I will create binary format, that will reflect the data stored directly in my application, so I will minimize the need for parsing, to make the format as fast as possible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Wavefront_.obj_file" />
  <row Id="27279" PostHistoryTypeId="2" PostId="12442" RevisionGUID="76c7f467-aace-44fc-b918-e2d363b21899" CreationDate="2011-05-18T10:32:52.023" UserId="7437" Text="I'm building a top down shooter but i have a little issue with my camera and mouse.&#xD;&#xA;When i add the camera that i use to my game(&lt;http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/&gt;) My mouse pointer seems to be in the wrong location.&#xD;&#xA;when i call my &lt;i&gt;Mouse.GetState().X&lt;/i&gt; or Y the location seems to be about 300pixels off.&#xD;&#xA;I've looked all over the net but i just can't find the solution.&#xD;&#xA;&#xD;&#xA;I'm pretty new to coding, so i'll just post my main and my camera class.&#xD;&#xA;My objective is to get the green circle on the actual position of my mouse.&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;using System.Collections.Generic;&#xD;&#xA;using System.Linq;&#xD;&#xA;using Microsoft.Xna.Framework;&#xD;&#xA;using Microsoft.Xna.Framework.Audio;&#xD;&#xA;using Microsoft.Xna.Framework.Content;&#xD;&#xA;using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;using Microsoft.Xna.Framework.Input;&#xD;&#xA;using Microsoft.Xna.Framework.Media;&#xD;&#xA;using Microsoft.Xna.Framework.Net;&#xD;&#xA;using Microsoft.Xna.Framework.Storage;&#xD;&#xA;&#xD;&#xA;namespace ZombieSurvival&#xD;&#xA;{&#xD;&#xA;    public class Camera2D&#xD;&#xA;    {&#xD;&#xA;            protected float _zoom; // Camera Zoom&#xD;&#xA;            public Matrix _transform; // Matrix Transform&#xD;&#xA;            public Vector2 _pos; // Camera Position&#xD;&#xA;            protected float _rotation; // Camera Rotation&#xD;&#xA;&#xD;&#xA;            public Camera2D()&#xD;&#xA;            {&#xD;&#xA;                _zoom = 1.0f;&#xD;&#xA;                _rotation = 0.0f;&#xD;&#xA;                _pos = Vector2.Zero;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // Sets and gets zoom&#xD;&#xA;            public float Zoom&#xD;&#xA;            {&#xD;&#xA;                get { return _zoom; }&#xD;&#xA;                set { _zoom = value; if (_zoom &lt; 0.1f) _zoom = 0.1f; } // Negative zoom will flip image&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            public float Rotation&#xD;&#xA;            {&#xD;&#xA;                get { return _rotation; }&#xD;&#xA;                set { _rotation = value; }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // Auxiliary function to move the camera&#xD;&#xA;            public void Move(Vector2 amount)&#xD;&#xA;            {&#xD;&#xA;                _pos += amount;&#xD;&#xA;            }&#xD;&#xA;            // Get set position&#xD;&#xA;            public Vector2 Pos&#xD;&#xA;            {&#xD;&#xA;                get { return _pos; }    &#xD;&#xA;                set { _pos = value; }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            public Matrix get_transformation(GraphicsDevice graphicsDevice)&#xD;&#xA;            {&#xD;&#xA;                _transform =       // Thanks to o KB o for this solution&#xD;&#xA;                  Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;                                             Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;                                             Matrix.CreateScale(new Vector3(Zoom, Zoom, 1)) *&#xD;&#xA;                                             Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0));&#xD;&#xA;                return _transform;&#xD;&#xA;            }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this is my camera class`using System;&#xD;&#xA;using System.Collections.Generic;&#xD;&#xA;using System.Linq;&#xD;&#xA;using Microsoft.Xna.Framework;&#xD;&#xA;using Microsoft.Xna.Framework.Audio;&#xD;&#xA;using Microsoft.Xna.Framework.Content;&#xD;&#xA;using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;using Microsoft.Xna.Framework.Input;&#xD;&#xA;using Microsoft.Xna.Framework.Media;&#xD;&#xA;using Microsoft.Xna.Framework.Net;&#xD;&#xA;using Microsoft.Xna.Framework.Storage;&#xD;&#xA;//using Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetCursorProperties;&#xD;&#xA;&#xD;&#xA;namespace ZombieSurvival&#xD;&#xA;{&#xD;&#xA;    public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        GraphicsDeviceManager graphics;&#xD;&#xA;        SpriteBatch spriteBatch;&#xD;&#xA;        int cursorX, cursorY;&#xD;&#xA;&#xD;&#xA;        Camera2D camera;&#xD;&#xA;&#xD;&#xA;        Player player;&#xD;&#xA;        Texture2D playertex;&#xD;&#xA;        Texture2D bulletTex;&#xD;&#xA;        Texture2D zombieTex;&#xD;&#xA;&#xD;&#xA;        public Game1()&#xD;&#xA;        {&#xD;&#xA;            graphics = new GraphicsDeviceManager(this);&#xD;&#xA;            Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        protected override void Initialize()&#xD;&#xA;        {&#xD;&#xA;            this.IsMouseVisible = true;&#xD;&#xA;            graphics.IsFullScreen = true;&#xD;&#xA;            graphics.ApplyChanges();&#xD;&#xA;            Mouse.SetPosition(0, 0);&#xD;&#xA;            cursorX = Window.ClientBounds.X + Mouse.GetState().X;&#xD;&#xA;            cursorY = Window.ClientBounds.Y + Mouse.GetState().Y;&#xD;&#xA;            &#xD;&#xA;            //graphics.&#xD;&#xA;&#xD;&#xA;            base.Initialize();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            // Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;            spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;            playertex = Content.Load &lt;Texture2D&gt;(&quot;player&quot;);&#xD;&#xA;            bulletTex = Content.Load&lt;Texture2D&gt;(&quot;bullet&quot;);&#xD;&#xA;            zombieTex = Content.Load&lt;Texture2D&gt;(&quot;zombie&quot;);&#xD;&#xA;            &#xD;&#xA;            player = new Player(new Rectangle(100, 100, 50, 50), playertex, 5, bulletTex);&#xD;&#xA;&#xD;&#xA;            // TODO: use this.Content to load your game content here&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        protected override void UnloadContent()&#xD;&#xA;        {&#xD;&#xA;            // TODO: Unload any non ContentManager content here&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        protected override void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            player.Update();&#xD;&#xA;            &#xD;&#xA;            /*if (IsActive)&#xD;&#xA;            {&#xD;&#xA;                MouseState mouseState = Mouse.GetState();&#xD;&#xA;                int cx = graphics.GraphicsDevice.Viewport.Width / 2;&#xD;&#xA;                int cy = graphics.GraphicsDevice.Viewport.Height / 2;&#xD;&#xA;                int x = mouseState.X - cx;&#xD;&#xA;                int y = mouseState.Y - cy;&#xD;&#xA;                Mouse.SetPosition(cx, cy);&#xD;&#xA;            }*/&#xD;&#xA;            &#xD;&#xA;            base.Update(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            Camera2D cam = new Camera2D();&#xD;&#xA;            cam.Pos = new Vector2(player.playerPosition.X, player.playerPosition.Y);&#xD;&#xA;            // cam.Zoom = 2.0f // Example of Zoom in&#xD;&#xA;            cam.Zoom = 0.5f; // Example of Zoom out&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;            //// if using XNA 3.1&#xD;&#xA;            spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                                    SpriteSortMode.Immediate,&#xD;&#xA;                                    SaveStateMode.SaveState,&#xD;&#xA;                                    cam.get_transformation(graphics.GraphicsDevice));&#xD;&#xA;&#xD;&#xA;            player.Draw(spriteBatch);&#xD;&#xA;            spriteBatch.Draw(zombieTex, new Rectangle(Mouse.GetState().X, Mouse.GetState().Y, 50, 50), Color.White);&#xD;&#xA;            // Draw Everything&#xD;&#xA;            // You can draw everything in their positions since the cam matrix has already done the maths for you &#xD;&#xA;&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;            //Console.WriteLine(camera.Pos);&#xD;&#xA;            &#xD;&#xA;            /*if (camera._pos.X - player.PlayerRect.X &gt;= 100)&#xD;&#xA;            {&#xD;&#xA;                camera.Pos = new Vector2(camera.Pos.X - player._PlayerSpeed, camera.Pos.Y);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (camera._pos.X - player.PlayerRect.X &lt;= -300)&#xD;&#xA;            {&#xD;&#xA;                camera.Pos = new Vector2(camera.Pos.X + player._PlayerSpeed, camera.Pos.Y);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (camera._pos.Y - player.PlayerRect.Y &gt;= 0)&#xD;&#xA;            {&#xD;&#xA;                camera.Pos = new Vector2(camera.Pos.X, camera.Pos.Y - player._PlayerSpeed);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (camera._pos.Y - player.PlayerRect.Y &lt;= 250)&#xD;&#xA;            {&#xD;&#xA;                camera.Pos = new Vector2(camera.Pos.X, camera.Pos.Y + player._PlayerSpeed);&#xD;&#xA;            }*/&#xD;&#xA;&#xD;&#xA;            /*spriteBatch.Begin();&#xD;&#xA;            player.Draw(spriteBatch);   &#xD;&#xA;                                 &#xD;&#xA;            spriteBatch.End();*/&#xD;&#xA;            &#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;I realy hope someone has a solution for this, becaus i'm stuck right now.&#xD;&#xA;I'd realy apreciate the help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27280" PostHistoryTypeId="1" PostId="12442" RevisionGUID="76c7f467-aace-44fc-b918-e2d363b21899" CreationDate="2011-05-18T10:32:52.023" UserId="7437" Text="Mouse location is off due to camera" />
  <row Id="27281" PostHistoryTypeId="3" PostId="12442" RevisionGUID="76c7f467-aace-44fc-b918-e2d363b21899" CreationDate="2011-05-18T10:32:52.023" UserId="7437" Text="&lt;camera&gt;&lt;mouse&gt;" />
  <row Id="27282" PostHistoryTypeId="2" PostId="12443" RevisionGUID="56de92c9-034a-448b-b380-df679f28a601" CreationDate="2011-05-18T10:34:59.603" UserId="7435" Text="I'm researching game development, and I know that there are two options for asset creation: create them yourself, or outsource the assets(by getting them custom made, or finding them on sites such as the unity asset store).&#xD;&#xA;&#xD;&#xA;What are some other main sources of assets, such as websites for contracting, royalty free asset libraries, or other asset stores?&#xD;&#xA;&#xD;&#xA;As an extra, what are some other methods of getting assets if there are any other methods at all?" />
  <row Id="27283" PostHistoryTypeId="1" PostId="12443" RevisionGUID="56de92c9-034a-448b-b380-df679f28a601" CreationDate="2011-05-18T10:34:59.603" UserId="7435" Text="What is the best legal way to get game assets?" />
  <row Id="27284" PostHistoryTypeId="3" PostId="12443" RevisionGUID="56de92c9-034a-448b-b380-df679f28a601" CreationDate="2011-05-18T10:34:59.603" UserId="7435" Text="&lt;assets&gt;&lt;development-speed&gt;" />
  <row Id="27285" PostHistoryTypeId="2" PostId="12444" RevisionGUID="ec53d6c7-5cdd-4f46-9157-533de8120d26" CreationDate="2011-05-18T11:01:51.883" UserId="1742" Text="If you have a very large number of sprites, it might be time to let hardware handle it and move your sprite rendering into VBOs via pygl or the like. Realistically though, massive numbers of sprites can usually be turned on it's head as a &quot;find the sprite under this pixel&quot; problem instead. Maybe not so easy in python, but you might find a library already written for &quot;particles&quot; that handles this situation better. Collecting your sprites by wich frame they are on for example.&#xD;&#xA;&#xD;&#xA;A good answer to this question would require a bit more knowledge about the type, speed, clumping, or even how regular the sprites might be. Do you have thousands of sprites because there are that many entities? or is it moving land-pieces? do they move in groups? Each assumption we can make about the sprites can offer a better / faster rendering solution.&#xD;&#xA;&#xD;&#xA;As usual, what is your input data, and what do you want out." />
  <row Id="27286" PostHistoryTypeId="2" PostId="12445" RevisionGUID="d4dcc875-9ec6-46ea-850c-55258cbb5112" CreationDate="2011-05-18T11:10:16.857" UserId="5896" Text="Quite a few topics handling (free) assests already:&#xD;&#xA;&#xD;&#xA; - http://gamedev.stackexchange.com/questions/12348/how-does-a-single-programmer-make-a-game&#xD;&#xA; - http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA; - http://gamedev.stackexchange.com/questions/2400/open-source-3d-models-easily-usable-in-ogre3d-jmonkeyengine&#xD;&#xA;&#xD;&#xA;Only covers part of the question, but I'm sure it's usefull.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27287" PostHistoryTypeId="25" PostId="12439" RevisionGUID="8108176e-cab3-45fa-85e7-1d7a06da388e" CreationDate="2011-05-18T12:12:19.150" Comment="http://twitter.com/#!/StackGameDev/status/70824028180455425" />
  <row Id="27288" PostHistoryTypeId="5" PostId="12442" RevisionGUID="27bba046-879d-4b09-bb13-a42b1d7b6bef" CreationDate="2011-05-18T12:13:05.657" UserId="2698" Comment="Four-space indents, sir! Not backticks. And some other improvements." Text="I'm building a top down shooter but I have a little issue with my camera and mouse.&#xD;&#xA;When I add the camera that I use to my game ([see here](http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/)) my mouse pointer seems to be in the wrong location.&#xD;&#xA;When I call my `Mouse.GetState().X` or `Y` the location seems to be about 300 pixels off.&#xD;&#xA;I've looked all over the net but I just can't find the solution.&#xD;&#xA;&#xD;&#xA;I'm pretty new to coding, so I'll just post my main and my camera class.&#xD;&#xA;My objective is to get the green circle on the actual position of my mouse.&#xD;&#xA;&#xD;&#xA;### Camera class:&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Audio;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Media;&#xD;&#xA;    using Microsoft.Xna.Framework.Net;&#xD;&#xA;    using Microsoft.Xna.Framework.Storage;&#xD;&#xA;&#xD;&#xA;    namespace ZombieSurvival&#xD;&#xA;    {&#xD;&#xA;        public class Camera2D&#xD;&#xA;        {&#xD;&#xA;                protected float _zoom; // Camera Zoom&#xD;&#xA;                public Matrix _transform; // Matrix Transform&#xD;&#xA;                public Vector2 _pos; // Camera Position&#xD;&#xA;                protected float _rotation; // Camera Rotation&#xD;&#xA;&#xD;&#xA;                public Camera2D()&#xD;&#xA;                {&#xD;&#xA;                    _zoom = 1.0f;&#xD;&#xA;                    _rotation = 0.0f;&#xD;&#xA;                    _pos = Vector2.Zero;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                // Sets and gets zoom&#xD;&#xA;                public float Zoom&#xD;&#xA;                {&#xD;&#xA;                    get { return _zoom; }&#xD;&#xA;                    set { _zoom = value; if (_zoom &lt; 0.1f) _zoom = 0.1f; } // Negative zoom will flip image&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                public float Rotation&#xD;&#xA;                {&#xD;&#xA;                    get { return _rotation; }&#xD;&#xA;                    set { _rotation = value; }&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                // Auxiliary function to move the camera&#xD;&#xA;                public void Move(Vector2 amount)&#xD;&#xA;                {&#xD;&#xA;                    _pos += amount;&#xD;&#xA;                }&#xD;&#xA;                // Get set position&#xD;&#xA;                public Vector2 Pos&#xD;&#xA;                {&#xD;&#xA;                    get { return _pos; }    &#xD;&#xA;                    set { _pos = value; }&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                public Matrix get_transformation(GraphicsDevice graphicsDevice)&#xD;&#xA;                {&#xD;&#xA;                    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;                      Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;                                                 Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;                                                 Matrix.CreateScale(new Vector3(Zoom, Zoom, 1)) *&#xD;&#xA;                                                 Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0));&#xD;&#xA;                    return _transform;&#xD;&#xA;                }&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Game:&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Audio;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Media;&#xD;&#xA;    using Microsoft.Xna.Framework.Net;&#xD;&#xA;    using Microsoft.Xna.Framework.Storage;&#xD;&#xA;    //using Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetCursorProperties;&#xD;&#xA;&#xD;&#xA;    namespace ZombieSurvival&#xD;&#xA;    {&#xD;&#xA;        public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;        {&#xD;&#xA;            GraphicsDeviceManager graphics;&#xD;&#xA;            SpriteBatch spriteBatch;&#xD;&#xA;            int cursorX, cursorY;&#xD;&#xA;&#xD;&#xA;            Camera2D camera;&#xD;&#xA;&#xD;&#xA;            Player player;&#xD;&#xA;            Texture2D playertex;&#xD;&#xA;            Texture2D bulletTex;&#xD;&#xA;            Texture2D zombieTex;&#xD;&#xA;&#xD;&#xA;            public Game1()&#xD;&#xA;            {&#xD;&#xA;                graphics = new GraphicsDeviceManager(this);&#xD;&#xA;                Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            protected override void Initialize()&#xD;&#xA;            {&#xD;&#xA;                this.IsMouseVisible = true;&#xD;&#xA;                graphics.IsFullScreen = true;&#xD;&#xA;                graphics.ApplyChanges();&#xD;&#xA;                Mouse.SetPosition(0, 0);&#xD;&#xA;                cursorX = Window.ClientBounds.X + Mouse.GetState().X;&#xD;&#xA;                cursorY = Window.ClientBounds.Y + Mouse.GetState().Y;&#xD;&#xA;                &#xD;&#xA;                //graphics.&#xD;&#xA;&#xD;&#xA;                base.Initialize();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            protected override void LoadContent()&#xD;&#xA;            {&#xD;&#xA;                // Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;                spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;                playertex = Content.Load &lt;Texture2D&gt;(&quot;player&quot;);&#xD;&#xA;                bulletTex = Content.Load&lt;Texture2D&gt;(&quot;bullet&quot;);&#xD;&#xA;                zombieTex = Content.Load&lt;Texture2D&gt;(&quot;zombie&quot;);&#xD;&#xA;                &#xD;&#xA;                player = new Player(new Rectangle(100, 100, 50, 50), playertex, 5, bulletTex);&#xD;&#xA;&#xD;&#xA;                // TODO: use this.Content to load your game content here&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            protected override void UnloadContent()&#xD;&#xA;            {&#xD;&#xA;                // TODO: Unload any non ContentManager content here&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            protected override void Update(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                player.Update();&#xD;&#xA;                &#xD;&#xA;                /*if (IsActive)&#xD;&#xA;                {&#xD;&#xA;                    MouseState mouseState = Mouse.GetState();&#xD;&#xA;                    int cx = graphics.GraphicsDevice.Viewport.Width / 2;&#xD;&#xA;                    int cy = graphics.GraphicsDevice.Viewport.Height / 2;&#xD;&#xA;                    int x = mouseState.X - cx;&#xD;&#xA;                    int y = mouseState.Y - cy;&#xD;&#xA;                    Mouse.SetPosition(cx, cy);&#xD;&#xA;                }*/&#xD;&#xA;                &#xD;&#xA;                base.Update(gameTime);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            protected override void Draw(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                Camera2D cam = new Camera2D();&#xD;&#xA;                cam.Pos = new Vector2(player.playerPosition.X, player.playerPosition.Y);&#xD;&#xA;                // cam.Zoom = 2.0f // Example of Zoom in&#xD;&#xA;                cam.Zoom = 0.5f; // Example of Zoom out&#xD;&#xA;                &#xD;&#xA;&#xD;&#xA;                //// if using XNA 3.1&#xD;&#xA;                spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                                        SpriteSortMode.Immediate,&#xD;&#xA;                                        SaveStateMode.SaveState,&#xD;&#xA;                                        cam.get_transformation(graphics.GraphicsDevice));&#xD;&#xA;&#xD;&#xA;                player.Draw(spriteBatch);&#xD;&#xA;                spriteBatch.Draw(zombieTex, new Rectangle(Mouse.GetState().X, Mouse.GetState().Y, 50, 50), Color.White);&#xD;&#xA;                // Draw Everything&#xD;&#xA;                // You can draw everything in their positions since the cam matrix has already done the maths for you &#xD;&#xA;&#xD;&#xA;                spriteBatch.End();&#xD;&#xA;&#xD;&#xA;                //Console.WriteLine(camera.Pos);&#xD;&#xA;                &#xD;&#xA;                /*if (camera._pos.X - player.PlayerRect.X &gt;= 100)&#xD;&#xA;                {&#xD;&#xA;                    camera.Pos = new Vector2(camera.Pos.X - player._PlayerSpeed, camera.Pos.Y);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (camera._pos.X - player.PlayerRect.X &lt;= -300)&#xD;&#xA;                {&#xD;&#xA;                    camera.Pos = new Vector2(camera.Pos.X + player._PlayerSpeed, camera.Pos.Y);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (camera._pos.Y - player.PlayerRect.Y &gt;= 0)&#xD;&#xA;                {&#xD;&#xA;                    camera.Pos = new Vector2(camera.Pos.X, camera.Pos.Y - player._PlayerSpeed);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (camera._pos.Y - player.PlayerRect.Y &lt;= 250)&#xD;&#xA;                {&#xD;&#xA;                    camera.Pos = new Vector2(camera.Pos.X, camera.Pos.Y + player._PlayerSpeed);&#xD;&#xA;                }*/&#xD;&#xA;&#xD;&#xA;                /*spriteBatch.Begin();&#xD;&#xA;                player.Draw(spriteBatch);   &#xD;&#xA;                                     &#xD;&#xA;                spriteBatch.End();*/&#xD;&#xA;                &#xD;&#xA;                base.Draw(gameTime);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I realy hope someone has a solution for this, because I'm stuck right now.&#xD;&#xA;I'd really appreciate the help." />
  <row Id="27289" PostHistoryTypeId="24" PostId="12442" RevisionGUID="27bba046-879d-4b09-bb13-a42b1d7b6bef" CreationDate="2011-05-18T12:13:05.657" Comment="Proposed by 2698 approved by 7437 edit id of 435" />
  <row Id="27290" PostHistoryTypeId="6" PostId="12442" RevisionGUID="2533defd-c1c9-4794-b571-b0ca59ff8e76" CreationDate="2011-05-18T12:16:24.860" UserId="7437" Comment="edited tags; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;programming&gt;&lt;camera&gt;&lt;mouse&gt;" />
  <row Id="27291" PostHistoryTypeId="2" PostId="12446" RevisionGUID="3ed81cea-a185-40eb-ac91-c3438c9be4e6" CreationDate="2011-05-18T12:34:51.223" UserId="2111" Text="The position that you store holds the position of the cursor **relative to top left corner of your screen monitor** (since you add the ClientBounds to it). I'd guess that you used that exact position when drawing the circle, and since the *Draw* function takes a position **relative to the top left corner of the game window**, you'd be off by the position of the ClientBounds." />
  <row Id="27292" PostHistoryTypeId="5" PostId="12446" RevisionGUID="1e56bc65-b374-47c3-a6fc-0bd16395a2c0" CreationDate="2011-05-18T12:42:51.993" UserId="2111" Comment="added 254 characters in body" Text="The positions that you store within *cursorX* and *cursorY* hold the position of the cursor **relative to top left corner of your screen monitor** (since you add the ClientBounds to it). I'd guess that you used that exact position when drawing the circle, and since the *Draw* function takes a position **relative to the top left corner of the game window**, you'd be off by the position of the ClientBounds.&#xD;&#xA;&#xD;&#xA;But I have to ask: why are you holding the &quot;real&quot; value of the mouse position? Is there any particular reason why you're storing it instead of the usual positions return by *Mouse.GetState().X* and *Mouse.GetState().Y*?" />
  <row Id="27293" PostHistoryTypeId="2" PostId="12447" RevisionGUID="5bcb33a7-db79-4bde-b268-59c5f77edb4a" CreationDate="2011-05-18T12:43:05.610" UserId="7233" Text="Am working on a game, in that i have to fill color over a closed region. &#xD;&#xA;Currently am using `&#xD;&#xA;&#xD;&#xA;&gt; floodfill non recursive scanline&#xD;&#xA;&gt; algorithm.&#xD;&#xA;&#xD;&#xA;` But in my case it is slow. Can anyone provide me the Quickest, efficient Floodfill algorithm code or link.&#xD;&#xA;" />
  <row Id="27294" PostHistoryTypeId="1" PostId="12447" RevisionGUID="5bcb33a7-db79-4bde-b268-59c5f77edb4a" CreationDate="2011-05-18T12:43:05.610" UserId="7233" Text="Can anyone provide me the Efficient, quickest floodfill algorithm?" />
  <row Id="27295" PostHistoryTypeId="3" PostId="12447" RevisionGUID="5bcb33a7-db79-4bde-b268-59c5f77edb4a" CreationDate="2011-05-18T12:43:05.610" UserId="7233" Text="&lt;iphone&gt;&lt;android&gt;" />
  <row Id="27296" PostHistoryTypeId="2" PostId="12448" RevisionGUID="0db88698-1810-4aa4-a16d-c0ef33be5dd0" CreationDate="2011-05-18T12:58:42.893" UserId="7439" Text="Do you set the correct current matrix prior to update the projection matrix (using glMatrixMode())? Please provide a snippet of your code where you set the projection / modelview matrices.&#xD;&#xA;&#xD;&#xA;It should look something like this:&#xD;&#xA;&#xD;&#xA;    // Setup projection - needs to be done only if the projection&#xD;&#xA;    // params change, but doesn't hurt to do on every frame&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPerspective(...);&#xD;&#xA;&#xD;&#xA;    // Setup view tranform for matrix (the view part from model-view)&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt(...);&#xD;&#xA;&#xD;&#xA;    // Draw scene&#xD;&#xA;    for each object:&#xD;&#xA;&#xD;&#xA;    // Setup model matrix (the model part of model-view)&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glPushMatrix();&#xD;&#xA;&#xD;&#xA;    glTranslate(); // finally, translate object into position&#xD;&#xA;    glScale(); // then scale object&#xD;&#xA;    glRotate(); // first rotate object&#xD;&#xA;&#xD;&#xA;    [draw object]&#xD;&#xA;  &#xD;&#xA;    // optionally draw subobjects (if you have a scene graph / transform hierchy)&#xD;&#xA;&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27297" PostHistoryTypeId="5" PostId="12448" RevisionGUID="4daaba34-2e70-4097-9bf8-5f02ff8e7ec2" CreationDate="2011-05-18T13:11:14.210" UserId="7439" Comment="added 1 characters in body; added 7 characters in body" Text="Do you set the correct current matrix prior to update the projection matrix (using glMatrixMode())? Please provide a snippet of your code where you set the projection / modelview matrices.&#xD;&#xA;&#xD;&#xA;It should look something like this:&#xD;&#xA;&#xD;&#xA;    // Setup projection - needs to be done only if the projection&#xD;&#xA;    // params change, but doesn't hurt to do on every frame&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluPerspective(...);&#xD;&#xA;&#xD;&#xA;    // Setup view transform matrix (the view part from model-view)&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt(...);&#xD;&#xA;&#xD;&#xA;    // Draw scene&#xD;&#xA;    for each object:&#xD;&#xA;&#xD;&#xA;    // Setup model transform matrix (the model part of model-view)&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glPushMatrix();&#xD;&#xA;&#xD;&#xA;    glTranslate(); // finally, translate object into position&#xD;&#xA;    glRotate(); // then rotate object&#xD;&#xA;    glScale(); // first scale object&#xD;&#xA;&#xD;&#xA;    [draw object]&#xD;&#xA;  &#xD;&#xA;    // optionally draw sub-objects (if you have a scene graph / transform hierchy)&#xD;&#xA;&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27298" PostHistoryTypeId="6" PostId="12222" RevisionGUID="193e3664-ff28-4109-a46b-67539a32d7a2" CreationDate="2011-05-18T13:25:23.407" UserId="1087" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;geometry&gt;&lt;computational-geometry&gt;" />
  <row Id="27299" PostHistoryTypeId="2" PostId="12449" RevisionGUID="15a94277-a44d-4c61-99c5-a515518e04df" CreationDate="2011-05-18T13:37:41.387" UserId="4513" Text="![MDP][1]![MDP][2]&#xD;&#xA;&#xD;&#xA;This question has come mainly out of **sheer desperation**, after spending several hours trying to figure out the problem.&#xD;&#xA;&#xD;&#xA;If you cast your eyes to the picture above, you should see that my midpoint displacement algorithm algorithm is working (somewhat) successfully; in producing a somewhat coherent noise pattern.&#xD;&#xA;&#xD;&#xA;However, it is leaving behind a black dotted grid on the image, and I have no idea why. I can foresee this being an issue in the math, but I just cannot see it; nor was this pointed out in any online resources as a possible issue; so any help will be appreciated as to hunting down this bug.&#xD;&#xA;&#xD;&#xA;    unsigned char** mdp(unsigned char** base, unsigned base_n, unsigned char r) {&#xD;&#xA;    	size_t n = (2 * base_n) - 1;&#xD;&#xA;    &#xD;&#xA;    	unsigned char** map = new unsigned char*[n];&#xD;&#xA;    	for (unsigned i = 0; i &lt; n; ++i) map[i] = new unsigned char[n];&#xD;&#xA;    &#xD;&#xA;    	// Resize&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	for (size_t i = 0; i &lt; n; i += 2) {&#xD;&#xA;    		for (size_t j = !(i % 2 == 0); j &lt; n; j += 2) {&#xD;&#xA;    			map[i][j] = base[i / 2][j / 2];&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Diamond algorithm&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	// 0 X 0&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	for (size_t i = 1; i &lt; n; i += 2) {&#xD;&#xA;    		for (size_t j = 1; j &lt; n; j += 2) {&#xD;&#xA;    			unsigned char&amp; map_ij = map[i][j];&#xD;&#xA;    &#xD;&#xA;    			unsigned char a = map[i - 1][j - 1];&#xD;&#xA;    			unsigned char b = map[i - 1][j + 1];&#xD;&#xA;    			unsigned char c = map[i + 1][j - 1];&#xD;&#xA;    			unsigned char d = map[i + 1][j + 1];&#xD;&#xA;    			map_ij = (a + b + c + d) / 4;&#xD;&#xA;    &#xD;&#xA;    			unsigned char rv = std::rand() % r;&#xD;&#xA;    			if (map_ij + r &lt; 255) map_ij += rv;&#xD;&#xA;    			else map_ij = 255;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Square algorithm&#xD;&#xA;    	// 0 1 0&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	// 0 1 0&#xD;&#xA;    	for (size_t i = 0; i &lt; n; ++i) {&#xD;&#xA;    		for (size_t j = (i % 2 == 0); j &lt; n; j += 2) {&#xD;&#xA;    			unsigned char&amp; map_ij = map[i][j];&#xD;&#xA;    &#xD;&#xA;    			// get surrounding values&#xD;&#xA;    			unsigned char a = 0, b = a, c = a, d = a;&#xD;&#xA;    			if (i != 0) a = map[i - 1][j];&#xD;&#xA;    			if (j != 0) b = map[i][j - 1];&#xD;&#xA;    			if (j + 1 != n) c = map[i][j + 1];&#xD;&#xA;    			if (i + 1 != n) d = map[i + 1][j];&#xD;&#xA;    &#xD;&#xA;    			// average calculation&#xD;&#xA;    			if (i == 0) map_ij = (b + c + d) / 3;&#xD;&#xA;    			else if (j == 0) map_ij = (a + c + d) / 3;&#xD;&#xA;    			else if (j + 1 == n) map_ij = (a + b + d) / 3;&#xD;&#xA;    			else if (i + 1 == n) map_ij = (a + b + c) / 3;&#xD;&#xA;    			else map_ij = (a + b + c + d) / 4;&#xD;&#xA;    &#xD;&#xA;    			unsigned char rv = std::rand() % r;&#xD;&#xA;    			if (map_ij + r &lt; 255) map_ij += rv;&#xD;&#xA;    			else map_ij = 255;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	return map;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/akI5K.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/dWKVu.jpg&#xD;&#xA;&#xD;&#xA;If you have any tips or resources other than http://www.gameprogrammer.com/fractal.html and http://www.lighthouse3d.com/opengl/terrain/index.php?mpd2 for fractal based terrain generation, I would appreciate them as comments also." />
  <row Id="27300" PostHistoryTypeId="1" PostId="12449" RevisionGUID="15a94277-a44d-4c61-99c5-a515518e04df" CreationDate="2011-05-18T13:37:41.387" UserId="4513" Text="Midpoint Displacement Algorithm" />
  <row Id="27301" PostHistoryTypeId="3" PostId="12449" RevisionGUID="15a94277-a44d-4c61-99c5-a515518e04df" CreationDate="2011-05-18T13:37:41.387" UserId="4513" Text="&lt;c++&gt;&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="27302" PostHistoryTypeId="2" PostId="12450" RevisionGUID="9df17b9e-4fb5-47cc-bde9-6407007a6a8b" CreationDate="2011-05-18T14:37:48.583" UserId="1742" Text="The algorithm is recursive, you need to do the square and diamond steps alternating through the levels, not in two seperate blocks." />
  <row Id="27304" PostHistoryTypeId="5" PostId="12447" RevisionGUID="d2e401df-96d6-4f33-8a6a-fb1f50a8d538" CreationDate="2011-05-18T14:57:49.427" UserId="1430" Comment="added 4 characters in body; edited title" Text="I am working on a game in which I have to fill a closed region with color. Currently I'm using a non-recursive, scanline-based flood filling algorithm. But in my case it is slow. Can anyone provide me the quickest, most efficient floodfill algorithm code or link?&#xD;&#xA;" />
  <row Id="27305" PostHistoryTypeId="4" PostId="12447" RevisionGUID="d2e401df-96d6-4f33-8a6a-fb1f50a8d538" CreationDate="2011-05-18T14:57:49.427" UserId="1430" Comment="added 4 characters in body; edited title" Text="What is an efficient flood-fill algorithm?" />
  <row Id="27306" PostHistoryTypeId="2" PostId="12452" RevisionGUID="b5fe8f98-ff4c-4999-8d87-f57e796a1630" CreationDate="2011-05-18T15:01:01.360" UserId="1430" Text="Google provides several links that may be starting points: [here][1], [here][2] and [here][3] for example.&#xD;&#xA;&#xD;&#xA;There isn't likely to be an actual &quot;fastest&quot; or &quot;best&quot; algorithm -- there rarely is. Rather you'll find some are more suited for particular scenarios. You have not provided enough information about your scenario or [what you have tried yourself][4] in order for us to provide really directed answers. Also, have you profiled your code and identified the bottleneck(s)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeproject.com/KB/GDI/QuickFill.aspx&#xD;&#xA;  [2]: http://www.crbond.com/papers/floodfill.pdf&#xD;&#xA;  [3]: http://www.codeproject.com/KB/GDI-plus/queuelinearfloodfill.aspx&#xD;&#xA;  [4]: http://mattgemmell.com/2008/12/08/what-have-you-tried" />
  <row Id="27307" PostHistoryTypeId="5" PostId="12436" RevisionGUID="bb0350c3-7084-4542-9192-2e9ec0809a53" CreationDate="2011-05-18T15:04:05.023" UserId="1430" Comment="deleted 25 characters in body; edited title" Text="I'm testing Unity for a game that I'm building, and I've touched its limit.&#xD;&#xA;&#xD;&#xA;My test scenario: a wanna-be house with 200 elements (cubes rescaled) no textures, box colliders and rigid bodies for each &quot;cube&quot; and fixed joints to hold them together (400+ fixed joints). The house is on a plane, and above it I put 2 sphere at different altitudes, spheres which will crash in the poor house. &#xD;&#xA;&#xD;&#xA;This moves very slow on an iPod Touch 3rd generation. Therefore I'm looking for some documentation to create a reasonable budget for the number of polygons, physics collisions and so on. What is your recommendation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27308" PostHistoryTypeId="4" PostId="12436" RevisionGUID="bb0350c3-7084-4542-9192-2e9ec0809a53" CreationDate="2011-05-18T15:04:05.023" UserId="1430" Comment="deleted 25 characters in body; edited title" Text="What is your Unity 3D physics engine budget for iOS games?" />
  <row Id="27309" PostHistoryTypeId="25" PostId="12443" RevisionGUID="f5e87569-adbf-4fdb-b209-89dfd5eacfee" CreationDate="2011-05-18T15:12:18.690" Comment="http://twitter.com/#!/StackGameDev/status/70869325464080385" />
  <row Id="27310" PostHistoryTypeId="10" PostId="12397" RevisionGUID="9337a56c-b494-4288-8c08-7c1006a48ed5" CreationDate="2011-05-18T15:26:40.870" UserId="189" CloseReasonId="4" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27311" PostHistoryTypeId="2" PostId="12453" RevisionGUID="c2c69cf2-3ea0-42c3-86ab-573f19da3eee" CreationDate="2011-05-18T15:53:59.927" UserId="2776" Text="Is [Chrome AngryBirds game][1] was made on html5 canvas? And if yes: what kind of engine they have used?&#xD;&#xA;&#xD;&#xA;Thank you!!!:)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chrome.angrybirds.com/" />
  <row Id="27312" PostHistoryTypeId="1" PostId="12453" RevisionGUID="c2c69cf2-3ea0-42c3-86ab-573f19da3eee" CreationDate="2011-05-18T15:53:59.927" UserId="2776" Text="Chrome Angry Birds engine?" />
  <row Id="27313" PostHistoryTypeId="3" PostId="12453" RevisionGUID="c2c69cf2-3ea0-42c3-86ab-573f19da3eee" CreationDate="2011-05-18T15:53:59.927" UserId="2776" Text="&lt;engine&gt;&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="27314" PostHistoryTypeId="5" PostId="12450" RevisionGUID="b28b4d64-d324-44f7-8b89-9dab88c4bcea" CreationDate="2011-05-18T15:56:43.333" UserId="1742" Comment="almost complete rewrite as I had epiphany as to real answer" Text="The algorithm recursively adds a value, but the value can be positive or negative (normally +-1 / (2^octave) )&#xD;&#xA;&#xD;&#xA;If you start at zero and only add positive values, then you can only go up, and that is why you're seeing the vertices pulled down.&#xD;&#xA;&#xD;&#xA;try starting at 127 rather than zero for the four corners, and also try signed char (then checking your bounds both top and bottom)&#xD;&#xA;" />
  <row Id="27315" PostHistoryTypeId="5" PostId="12453" RevisionGUID="a650dca1-1771-4d8d-8bc7-a687a51543e4" CreationDate="2011-05-18T16:02:51.620" UserId="2776" Comment="added 6 characters in body" Text="Is [Chrome AngryBirds game][1] was made on html5 canvas? And if yes: what kind of engine developers have used?&#xD;&#xA;&#xD;&#xA;Thank you!!!:)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chrome.angrybirds.com/" />
  <row Id="27316" PostHistoryTypeId="5" PostId="12453" RevisionGUID="fbd8fef1-6af2-47c3-ac93-e599be17ba1c" CreationDate="2011-05-18T16:07:37.213" UserId="51" Comment="deleted 34 characters in body" Text="Was [Chrome AngryBirds game][1] made using html5 canvas? And if yes: what kind of engine did they use?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chrome.angrybirds.com/" />
  <row Id="27317" PostHistoryTypeId="2" PostId="12454" RevisionGUID="ab27472d-a231-4354-b873-cf81830a0e6b" CreationDate="2011-05-18T16:19:10.763" UserId="1477" Text="sites like http://www.medialoot.com/ might be useful for some UI assets, especially for mobile games&#xD;&#xA;&#xD;&#xA;For people developing with Unity, they have their own asset store which includes models, scripts, and a ton of other resources: [Unity Asset store][1]&#xD;&#xA;&#xD;&#xA;Some sites like thesuperfluid.org have people offering services for a virtual bartering-facilitating currency.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/editor/asset-store.html" />
  <row Id="27318" PostHistoryTypeId="2" PostId="12455" RevisionGUID="4d31ccf7-56f3-4033-bcd2-1ee3dc4fba5a" CreationDate="2011-05-18T16:51:59.843" UserId="1156" Text="Inspecting the page element gives me `&lt;canvas width=&quot;1024&quot; height=&quot;768&quot;&gt;&lt;/canvas&gt;` so I guess that means it is canvas.&#xD;&#xA;&#xD;&#xA;As for the engine, I assume they ported their iOS one." />
  <row Id="27319" PostHistoryTypeId="2" PostId="12456" RevisionGUID="64143bc8-6d57-4e5d-af48-889e7f484d8f" CreationDate="2011-05-18T16:56:00.713" UserId="337" Text="It is based on WebGL (which means canvas is used, but not the standard canvas environment).&#xD;&#xA;As iOS uses OpenGL I think they ported that to javascript." />
  <row Id="27320" PostHistoryTypeId="2" PostId="12457" RevisionGUID="52ffb6c2-b64e-4b15-89d1-f8d651de1cbb" CreationDate="2011-05-18T17:41:13.813" UserId="7444" Text="It really depends on the types of the game. If everything in the game is static, &#xD;&#xA;it's more efficient to use A* search. However, if there are other human players&#xD;&#xA;moving in the same area, A* search is guaranteed failure since A* search&#xD;&#xA;has no idea about where other players are heading. On the other hand,&#xD;&#xA;RL can model other players' behavior and find a better path which takes other players&#xD;&#xA;movement into consideration." />
  <row Id="27321" PostHistoryTypeId="5" PostId="12457" RevisionGUID="1d44ce96-2607-409c-9cc4-ca17503b9218" CreationDate="2011-05-18T18:03:13.023" UserId="7444" Comment="deleted 5 characters in body" Text="It really depends on the types of the game. If everything in the game is static, &#xD;&#xA;it's more efficient to use A* search. However, if there are other human players&#xD;&#xA;moving in the same area, A* search is guaranteed failure. A* search&#xD;&#xA;has no idea about where other players are heading. On the other hand,&#xD;&#xA;RL can model other players' behavior and find a better path which takes other players&#xD;&#xA;movement into consideration." />
  <row Id="27323" PostHistoryTypeId="25" PostId="12453" RevisionGUID="9485fc27-6314-4f87-8f40-ae1b7b51779e" CreationDate="2011-05-18T18:12:19.197" Comment="http://twitter.com/#!/StackGameDev/status/70914624911974400" />
  <row Id="27324" PostHistoryTypeId="2" PostId="12458" RevisionGUID="0eeb91d0-64c6-41c0-8394-4e72baa9a0e4" CreationDate="2011-05-18T18:29:00.290" UserId="7445" Text="I'm writing a simple MMO, and currently have the the server-client architecture in place for multiple users to see each other and be able to move around together...now its time to add enemies. &#xD;&#xA;&#xD;&#xA;Was wondering if anyone had links to articles that discussed how to best handle the hundreds of NPC objects that need to be managed in the world. I've done some searching and couldn't find much info about how this is typically done.&#xD;&#xA;&#xD;&#xA;The two methods of structuring the implementation I can think of: &#xD;&#xA;&#xD;&#xA; 1. Holding all the instantiated NPC objects in a list, and having an NPC Thread loop through them sequentially and see if each has any logic that needs to be processed and perform necessary actions. I'm not sure if the performance of this design would be sufficient? &#xD;&#xA; 2. Event based system. Create a method in the NPC class that processes AI/Logic on it, have this method be called when an associated event is signaled, either on a timer for non interacted AI functionality (such as wandering), or signal the event externally from the packet handler (player moving nearby, or player attacking within range).&#xD;&#xA;&#xD;&#xA;Is either of these approaches the correct way? What other methods of doing this exist?" />
  <row Id="27325" PostHistoryTypeId="1" PostId="12458" RevisionGUID="0eeb91d0-64c6-41c0-8394-4e72baa9a0e4" CreationDate="2011-05-18T18:29:00.290" UserId="7445" Text="How to manage all the NPC/AI objects on the server?" />
  <row Id="27326" PostHistoryTypeId="3" PostId="12458" RevisionGUID="0eeb91d0-64c6-41c0-8394-4e72baa9a0e4" CreationDate="2011-05-18T18:29:00.290" UserId="7445" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;ai&gt;&lt;mmo&gt;&lt;server&gt;" />
  <row Id="27327" PostHistoryTypeId="6" PostId="12458" RevisionGUID="cdc350ce-293d-455f-ab94-dc9a303f2b3d" CreationDate="2011-05-18T18:33:37.363" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;ai&gt;&lt;mmo&gt;&lt;server&gt;&lt;entity-system&gt;" />
  <row Id="27328" PostHistoryTypeId="2" PostId="12459" RevisionGUID="178aca92-5a65-45f5-8cd3-4e8208f8fa7b" CreationDate="2011-05-18T18:35:37.947" UserId="1198" Text="It will depend on the number of enemies you have and how active they will be.&#xD;&#xA;&#xD;&#xA;If you have lots of enemies, but they don't do much most of the time, an event system might be better. If you have enemies that are usually doing something the loop may work best since it factors out the complexity  of the event system and because if events were in place they would be constantly firing anyway." />
  <row Id="27329" PostHistoryTypeId="6" PostId="12432" RevisionGUID="3cde0e2b-9f8b-40fc-9fea-ee148c4588f0" CreationDate="2011-05-18T19:03:32.607" UserId="259" Comment="added ai tag" Text="&lt;c#&gt;&lt;ai&gt;&lt;multithreading&gt;" />
  <row Id="27330" PostHistoryTypeId="2" PostId="12460" RevisionGUID="bb219e61-4d67-4148-b219-c7642855fac8" CreationDate="2011-05-18T19:21:52.143" UserId="259" Text="Whether you need to multithread or not, it might be a good idea to prepare the AI to be multithreaded. &#xD;&#xA;&#xD;&#xA;Your main thread would update the world, tick the physics, etc, and then would populate a data structure that represents the AI's view of the world: position of units, state of resources, etc. This data structure would cache the main systems, rather than just hold pointers to them. This is sometimes called a synchronisation point.&#xD;&#xA;&#xD;&#xA;Pass this data structure to the AI, and only allow it to reason on the contents of this structure. If you find the AI needing more info, add it to the structure. In AI parlance this is often called a blackboard but could also be referred to as a cache. Never let the AI write to the cache, the output should come through a seperate data structure.&#xD;&#xA;&#xD;&#xA;This setup will allow you to parallelise the game because the AI no longer has any direct dependency on the other game systems. Those systems don't need to be threadsafe and you should never get locks. You can safely run the renderer or something while the AI whirrs away.&#xD;&#xA;&#xD;&#xA;As a secondary benefit, you can in future extend the cache by decaying the information you get from the other systems over time, simulating uncertainty rather than exact knowledge." />
  <row Id="27331" PostHistoryTypeId="5" PostId="12432" RevisionGUID="86bdc0ad-a9ad-46b1-861d-0f65fd605e24" CreationDate="2011-05-18T19:36:21.560" UserId="1198" Comment="deleted 9 characters in body" Text="I have a project to make a real-time strategy game from scratch. I am still at the early planning stage, but I have been programming a little to see the mechanics.&#xD;&#xA;&#xD;&#xA;I know how to program. I also have a good idea of how I will structure the game classes and the Rule-Based (state-machine) AI for the computer player.&#xD;&#xA;&#xD;&#xA;I want to develop Doctrines, which will give a specific behavior to a specific unit (but can be used on many units at the same time), such as Scout, Follow Mission Route, hold Position (attack any approching enemy or retreat if overwhelmed), etc...&#xD;&#xA;&#xD;&#xA;The doctrines will only apply to the units, so it will have a unit perspective, and not be aware on the whole map sitatuation.&#xD;&#xA;&#xD;&#xA;The Computer AI will analyse the entire visible map and decide on which soctrine to assign each unit depending on another set of rules.&#xD;&#xA;&#xD;&#xA;I am doing this in C# with OpenGL.&#xD;&#xA;&#xD;&#xA;For now, I don't have much, only a few things in tests before I begin my main conception. I have a game loop where all the game processing (where I will call the update mouvement, combat, rendering, etc, one after the other) will happen, it is called very often if the Application.Idle event.&#xD;&#xA;&#xD;&#xA;Now, I was wondering. Since there will be a lot of things to process in the gameloop, should the Computer AI and the Units select their actions in that loop or will it be too slow?&#xD;&#xA;&#xD;&#xA;If I want all things to be simultaneous, Should I create a separate Thread for the computer AI? Or even a separate thread for every unit?&#xD;&#xA;&#xD;&#xA;I don't have much experience with multi-threading. What would be the best approach for this?" />
  <row Id="27332" PostHistoryTypeId="5" PostId="12431" RevisionGUID="d9fe0c5c-4ed4-4297-8317-e7d92ebe33c2" CreationDate="2011-05-18T19:44:48.993" UserId="7432" Comment="added 283 characters in body" Text="I am making a android game, it's a tower/base defense like type of game(yea I know it is kind of confusing), I was wandering if anyone knows a good way to have the attacking sprites randomly generate with out the number of sprites being higher than the level. I want the attack sprites to equal the level. I have 2 sprite types that I want to be generated, I just don't know how to make it to where one of the two randomly comes. Ex: you on level 4 and Sprite A spawns and then 3 others right after it but which version you get is random. " />
  <row Id="27333" PostHistoryTypeId="5" PostId="12431" RevisionGUID="8c38e2ea-c889-4344-827b-a9b2d7fc93df" CreationDate="2011-05-18T20:04:32.673" UserId="1198" Comment="edited body" Text="I am making a android game, it's a tower/base defense like type of game (yea I know it is kind of confusing), I was wondering if anyone knows a good way to have the attacking sprites randomly generate without the number of sprites being higher than the level. I want the attack sprites to equal the level. I have 2 sprite types that I want to be generated, I just don't know how to make it to where one of the two randomly comes. Ex: you on level 4 and Sprite A spawns and then 3 others right after it but which version you get is random. " />
  <row Id="27334" PostHistoryTypeId="2" PostId="12461" RevisionGUID="66fff66e-eb60-4c7e-934e-47bd7b9f5d66" CreationDate="2011-05-18T20:10:41.670" UserId="1198" Text="I presume you're running in Android's flavor of Java, so &#xD;&#xA;&#xD;&#xA;For generating random numbers, see [this][1].&#xD;&#xA;&#xD;&#xA;You'll need to setup a loop, which will load your extra sprites:&#xD;&#xA;&#xD;&#xA;    // you may wish to use a seed, so you can re-generate these numbers later, this depends on your use&#xD;&#xA;    Random gen = new Random(); &#xD;&#xA;    for(int i = 0; i &lt; currentLevelNumber; i++)&#xD;&#xA;    {&#xD;&#xA;        double r = generator.nextGaussian();&#xD;&#xA;        &#xD;&#xA;        if(r &gt; 0)&#xD;&#xA;            // sprite type A&#xD;&#xA;        else&#xD;&#xA;            // sprite type B&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm assuming you already know how to load, draw, and update sprites. If not, start [here][2].&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/1.4.2/docs/api/java/util/Random.html&#xD;&#xA;  [2]: http://androidwizard.net/2010/06/game-development-part-i-loops-and-sprites/" />
  <row Id="27335" PostHistoryTypeId="5" PostId="12429" RevisionGUID="bade36cf-9c7a-4943-a5fa-1113e0b8a5b8" CreationDate="2011-05-18T20:18:33.007" UserId="1400" Comment="LOTS OF EXAMPLE CODE, I JUST GAVE MY RENDERING ENGINE AWAY FOR FREE...; added 56 characters in body" Text="And here I am again, looking for help with my OpenGL camera once again.  This is starting to get embarrassing.  Anyway, here's the deal: I think my OpenGL First Person free roaming camera is starting to work correctly.  I can draw objects, see them, and my coordinate system is set up as expected.  Great.  I solved the gimbal lock issue by fixing the UP vector to be the Y unit vector and restricted the camera's rotation to no more than PI/2 and -PI/2 up/down.  All of this is used to build the modelview matrix, which I invert and set at the beginning of every frame.  Sweet.  It can move in all directions and seems to work just fine.&#xD;&#xA;&#xD;&#xA;That is until I try to change the projection settings.  For whatever reason, no matter what I do, my clipping plane is always around +50.0 Z, regardless of the OpenGL calls I attempt.  If I move the camera around and move it into certain positions, rotating the camera causes my objects to disappear and reappear.  They tend to appear on the edges of the screen, and disappear near the center.  In order to facilitate a better answer, allow me to state my assumptions:&#xD;&#xA;&#xD;&#xA; - glFrustum only needs to be called ONCE.  OpenGL maintains the Projection Matrix and AUTOMATICALLY multiplies the Modelview and Projection Matrices during rendering.&#xD;&#xA; - The math on the gluPerspective page and glFrustum pages is correct, despite the gluPerspective matrix listing seemingly containing 19 elements when OpenGL only uses 16 of those.&#xD;&#xA; - I'm assuming that the INVERSION of my camera's Modelview Matrix is somehow screwing with my Projection frustum.  I have to bet it's something to do with how the rotation is being calculated.&#xD;&#xA;&#xD;&#xA;Has anyone seen this kind of behavior before?  Where should I look to start tracking down the problem?  Am I doing this completely wrong?&#xD;&#xA;&#xD;&#xA;Here is the step-by-step code:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;// -[[ When my application is ready, this code is run only once ]]-&#xD;&#xA;&#xD;&#xA;glMatrixMode(GL_PROJECTION);&#xD;&#xA;glLoadIdentity();&#xD;&#xA;&#xD;&#xA;fieldOfVision = 60.0f;&#xD;&#xA;aspect = 1.5f;&#xD;&#xA;near = 0.1f;&#xD;&#xA;far = 100.0f;&#xD;&#xA;	&#xD;&#xA;ymax = near * tan(degreesToRadians(fieldOfVisionY));&#xD;&#xA;ymin = -ymax;&#xD;&#xA;xmin = ymin * aspect;&#xD;&#xA;xmax = ymax * aspect;&#xD;&#xA;&#xD;&#xA;glFrustum(xmin, xmax, ymin, ymax, near, far);&#xD;&#xA;&#xD;&#xA;glEnable(GL_DEPTH_TEST);&#xD;&#xA;&#xD;&#xA;// -[[ That should setup the viewing volume such that the field of view is 120.0 degrees, the near plane is at 0.1 and the far plane is at 100.0.  For whatever reason, my clipping plane is ALWAYS around 50.0, even if I set the far plane to 1000.0.  Additionally, I can move around objects using this camera and cause them to clip out by rotating the camera. Does this code snippet need to be run more than once?  I was pretty sure that OpenGL takes care of storing the Projection Matrix for the pipeline. ]]-&#xD;&#xA;&#xD;&#xA;// -[[ The next chunk of code is performed at every frame. ]]-&#xD;&#xA;&#xD;&#xA;glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);&#xD;&#xA;glMatrixMode(GL_MODELVIEW);&#xD;&#xA;glLoadIdentity();&#xD;&#xA;&#xD;&#xA;// Pos, forward, and up are 3D vectors and forward and up are normalized before the modelview matrix is processed.&#xD;&#xA;&#xD;&#xA;side = crossProduct(forward, up);&#xD;&#xA;&#xD;&#xA;GLfloat m[] =&#xD;&#xA;{&#xD;&#xA;side.x, side.y, side.z, 0,&#xD;&#xA;up.x, up.y, up.z, 0,&#xD;&#xA;-forward.x, -forward.y, -forward.z, 0&#xD;&#xA;pos.x, pos.y, pos.z, 1&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;m = matrixInvert(m);&#xD;&#xA;&#xD;&#xA;// Multing onto the Modelview Identity&#xD;&#xA;glMultMatrix(m);&#xD;&#xA;&#xD;&#xA;foreach object&#xD;&#xA;{&#xD;&#xA;glPushMatrix();&#xD;&#xA;object.translate();&#xD;&#xA;object.rotate();&#xD;&#xA;object.scale();&#xD;&#xA;object.draw();&#xD;&#xA;glPopMatrix();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;glPushMatrix();&#xD;&#xA;renderInterface();&#xD;&#xA;glPopMatrix();&#xD;&#xA;&#xD;&#xA;GLenum err = glGetError();&#xD;&#xA;if (err != GL_NO_ERROR)&#xD;&#xA;{&#xD;&#xA;reportError();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;glFlush();&#xD;&#xA;&#xD;&#xA;// -[[ End per-frame drawing.  It looks right to me, but please let me know what I am doing wrong!  Thank you very much for your time and consideration! ]]-&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27336" PostHistoryTypeId="2" PostId="12462" RevisionGUID="50775507-3e7c-4ba3-a2bf-a141ba4eb09c" CreationDate="2011-05-18T20:33:13.493" UserId="2531" Text="I recently was looking for a programmer for a game project and stumbled upon Kongregate's [collaboration forum](http://www.kongregate.com/forums/8-collaborations). Seems like it's flooded with artists and musicians. I'm sure you could find someone to work with there." />
  <row Id="27337" PostHistoryTypeId="5" PostId="12429" RevisionGUID="9212d8b8-f396-4b9a-8d22-8f56e293f883" CreationDate="2011-05-18T20:54:39.290" UserId="1156" Comment="added 274 characters in body" Text="And here I am again, looking for help with my OpenGL camera once again.  This is starting to get embarrassing.  Anyway, here's the deal: I think my OpenGL First Person free roaming camera is starting to work correctly.  I can draw objects, see them, and my coordinate system is set up as expected.  Great.  I solved the gimbal lock issue by fixing the UP vector to be the Y unit vector and restricted the camera's rotation to no more than PI/2 and -PI/2 up/down.  All of this is used to build the modelview matrix, which I invert and set at the beginning of every frame.  Sweet.  It can move in all directions and seems to work just fine.&#xD;&#xA;&#xD;&#xA;That is until I try to change the projection settings.  For whatever reason, no matter what I do, my clipping plane is always around +50.0 Z, regardless of the OpenGL calls I attempt.  If I move the camera around and move it into certain positions, rotating the camera causes my objects to disappear and reappear.  They tend to appear on the edges of the screen, and disappear near the center.  In order to facilitate a better answer, allow me to state my assumptions:&#xD;&#xA;&#xD;&#xA; - glFrustum only needs to be called ONCE.  OpenGL maintains the Projection Matrix and AUTOMATICALLY multiplies the Modelview and Projection Matrices during rendering.&#xD;&#xA; - The math on the gluPerspective page and glFrustum pages is correct, despite the gluPerspective matrix listing seemingly containing 19 elements when OpenGL only uses 16 of those.&#xD;&#xA; - I'm assuming that the INVERSION of my camera's Modelview Matrix is somehow screwing with my Projection frustum.  I have to bet it's something to do with how the rotation is being calculated.&#xD;&#xA;&#xD;&#xA;Has anyone seen this kind of behavior before?  Where should I look to start tracking down the problem?  Am I doing this completely wrong?&#xD;&#xA;&#xD;&#xA;Here is the step-by-step code:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;&#xD;&#xA;    // -[[ When my application is ready, this code is run only once ]]-&#xD;&#xA;    &#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    &#xD;&#xA;    fieldOfVision = 60.0f;&#xD;&#xA;    aspect = 1.5f;&#xD;&#xA;    near = 0.1f;&#xD;&#xA;    far = 100.0f;&#xD;&#xA;    	&#xD;&#xA;    ymax = near * tan(degreesToRadians(fieldOfVisionY));&#xD;&#xA;    ymin = -ymax;&#xD;&#xA;    xmin = ymin * aspect;&#xD;&#xA;    xmax = ymax * aspect;&#xD;&#xA;    &#xD;&#xA;    glFrustum(xmin, xmax, ymin, ymax, near, far);&#xD;&#xA;    &#xD;&#xA;    glEnable(GL_DEPTH_TEST);&#xD;&#xA;    &#xD;&#xA;    // -[[ That should setup the viewing volume such that the field of view is 120.0 degrees, the near plane is at 0.1 and the far plane is at 100.0.  For whatever reason, my clipping plane is ALWAYS around 50.0, even if I set the far plane to 1000.0.  Additionally, I can move around objects using this camera and cause them to clip out by rotating the camera. Does this code snippet need to be run more than once?  I was pretty sure that OpenGL takes care of storing the Projection Matrix for the pipeline. ]]-&#xD;&#xA;    &#xD;&#xA;    // -[[ The next chunk of code is performed at every frame. ]]-&#xD;&#xA;    &#xD;&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    &#xD;&#xA;    // Pos, forward, and up are 3D vectors and forward and up are normalized before the modelview matrix is processed.&#xD;&#xA;    &#xD;&#xA;    side = crossProduct(forward, up);&#xD;&#xA;    &#xD;&#xA;    GLfloat m[] =&#xD;&#xA;    {&#xD;&#xA;    side.x, side.y, side.z, 0,&#xD;&#xA;    up.x, up.y, up.z, 0,&#xD;&#xA;    -forward.x, -forward.y, -forward.z, 0&#xD;&#xA;    pos.x, pos.y, pos.z, 1&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    m = matrixInvert(m);&#xD;&#xA;    &#xD;&#xA;    // Multing onto the Modelview Identity&#xD;&#xA;    glMultMatrix(m);&#xD;&#xA;    &#xD;&#xA;    foreach object&#xD;&#xA;    {&#xD;&#xA;    glPushMatrix();&#xD;&#xA;    object.translate();&#xD;&#xA;    object.rotate();&#xD;&#xA;    object.scale();&#xD;&#xA;    object.draw();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    glPushMatrix();&#xD;&#xA;    renderInterface();&#xD;&#xA;    glPopMatrix();&#xD;&#xA;    &#xD;&#xA;    GLenum err = glGetError();&#xD;&#xA;    if (err != GL_NO_ERROR)&#xD;&#xA;    {&#xD;&#xA;    reportError();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    glFlush();&#xD;&#xA;    &#xD;&#xA;    // -[[ End per-frame drawing.  It looks right to me, but please let me know what I am doing wrong!  Thank you very much for your time and consideration! ]]-&#xD;&#xA;    &lt;/code&gt;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27338" PostHistoryTypeId="4" PostId="12423" RevisionGUID="69d49e03-0d0b-40c0-84b5-b1012e233d0e" CreationDate="2011-05-18T20:59:24.857" UserId="962" Comment="edited title" Text="What open-source 3d engine should I use  to make a tiny 3d game (by myself)?" />
  <row Id="27339" PostHistoryTypeId="2" PostId="12463" RevisionGUID="77a4b73a-c049-4680-a740-cf401fb40573" CreationDate="2011-05-18T21:02:08.893" UserId="7191" Text="I implemented a chunking system for my game when I was fiddling with infinite worlds (not sure if I'll keep them or not). For use with a single file, at first I used the chunk's world position to calculate a byte offset into the file. This assumes a static chunk size, or at least a static maximum. However, if the user were to head off in one direction for a while, this file would become pretty sparse for it's size, since there were large areas of land that hadn't been generated yet so there was blank spaces in the file.&#xD;&#xA;&#xD;&#xA; I also tried a two file system. One file holds a map of &quot;chunk position&quot; to &quot;chunk file offset&quot; pairs. The second holds all the chunks. When a new chunk is generated, it simply goes on the end of the chunk file, and it's offset is stored in the position-&gt;offset file. This one was an issue when you had a LOT of chunks and finding the offset in the position-&gt;offset file took a bit of time. If you find it feasible, you can load the position-&gt;offset data into a hash-map on load, to have quick access.&#xD;&#xA;&#xD;&#xA;I'm using the second one option for now, but may switch to something else if I find that the performance is lacking. Maybe with this information you'll be able to create something that works for you. Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27340" PostHistoryTypeId="25" PostId="12458" RevisionGUID="a2d808ef-fb81-46fe-b4a8-e737b931ea4f" CreationDate="2011-05-18T21:12:19.403" Comment="http://twitter.com/#!/StackGameDev/status/70959925517496321" />
  <row Id="27341" PostHistoryTypeId="2" PostId="12464" RevisionGUID="00e23c60-7d6d-471f-a3bf-e24fd1bdb091" CreationDate="2011-05-18T21:48:36.973" UserId="7450" Text="Or do you have to provide your own? How essential are tablets for game design? " />
  <row Id="27342" PostHistoryTypeId="1" PostId="12464" RevisionGUID="00e23c60-7d6d-471f-a3bf-e24fd1bdb091" CreationDate="2011-05-18T21:48:36.973" UserId="7450" Text="Do game companies usually provide their artists/modelers with drawing tablets?" />
  <row Id="27343" PostHistoryTypeId="3" PostId="12464" RevisionGUID="00e23c60-7d6d-471f-a3bf-e24fd1bdb091" CreationDate="2011-05-18T21:48:36.973" UserId="7450" Text="&lt;game-design&gt;&lt;art&gt;&lt;game-industry&gt;&lt;business&gt;&lt;jobs&gt;" />
  <row Id="27344" PostHistoryTypeId="2" PostId="12465" RevisionGUID="30c12907-148d-4a9e-8466-25a6ae3a3452" CreationDate="2011-05-18T22:01:43.370" UserId="2698" Text="You cannot use a single flat file for this.&#xD;&#xA;&#xD;&#xA;If you have a theoretically infinite amount of data then you need **random access**, which means **multiple files or a database**.&#xD;&#xA;&#xD;&#xA;If you spread your chunks across multiple files, getting the chunk at (-110, 5000) is just a matter of saying &quot;%APPDATA%/game/map/-110/5000.dat&quot; (or some other filename if you want to begin compressing them). Databases just need a query. If a chunk doesn't have any data, you just don't store anything. A single flat file doesn't offer the speed and convenience of random access.&#xD;&#xA;&#xD;&#xA;Consider: In a single file of arbitrary size, you _cannot_ guarantee the position of any chunk of data without also having filler slots for every &quot;unused&quot; chunk - and then you run into [the problem Byte56 described][1] which becomes exponentially worse as the map size increases. However without this guarantee the only way to find a chunk is to run a binary search until you find it, which can become torturous for the farthest data (or even just the origin if you've placed all your negative coords before it).&#xD;&#xA;&#xD;&#xA;Once you've decided &#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/12438/what-is-a-good-flat-file-format-for-storing-a-2d-tile-map-that-can-grow-infinitel/12463#12463" />
  <row Id="27345" PostHistoryTypeId="2" PostId="12466" RevisionGUID="1d9d53ab-e2ed-4eca-8051-72ea8eacadce" CreationDate="2011-05-18T22:02:29.490" UserId="7191" Text="Totally depends on the company. I doubt there's a standard for this, since this would be up to the artists preference. My work provided me with a ergonomic keyboard when I asked for one. So the  best you can do is ask when you're hired, or if it's critical to you, make it a condition of your employment." />
  <row Id="27346" PostHistoryTypeId="5" PostId="12465" RevisionGUID="cc3de420-fea1-4043-8a2e-6da517219dfa" CreationDate="2011-05-18T22:08:11.443" UserId="2698" Comment="lolwhoops" Text="You cannot use a single flat file for this.&#xD;&#xA;&#xD;&#xA;If you have a theoretically infinite amount of data then you need **random access**, which means **multiple files** or a database.&#xD;&#xA;&#xD;&#xA;If you spread your chunks across multiple files, getting the chunk at (-110, 5000) is just a matter of saying &quot;%APPDATA%/game/map/-110/5000.dat&quot; (or some other filename if you want to begin compressing them). Databases just need a query. If a chunk doesn't have any data, you can just not store anything. A single flat file doesn't offer the speed and convenience of random access.&#xD;&#xA;&#xD;&#xA;Consider: In a single file of arbitrary size, you _cannot_ guarantee the position of any chunk of data without also having filler slots for every &quot;unused&quot; chunk - and then you run into [the problem Byte56 described][1] which becomes exponentially worse as the map size increases. However without this guarantee the only way to find a chunk is to run a binary search until you find it, which can become torturous for the farthest data (or even just the origin if you've placed all your negative coords before it).&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/12438/what-is-a-good-flat-file-format-for-storing-a-2d-tile-map-that-can-grow-infinitel/12463#12463" />
  <row Id="27347" PostHistoryTypeId="2" PostId="12467" RevisionGUID="409a30f6-754a-4c97-b567-5a33a401bb99" CreationDate="2011-05-18T22:23:24.077" UserId="7453" Text="I would like to introduce you to our own game engine [SvEngine](http://simvector.com/index.php?page=svengine). It's an advanced 2D game engine for Windows® PC and use Direct3D® for hardware accelerated rendering. It's robust, fully object oriented, designed for easy use and suitable for making all types of 2D games and other graphic simulations. There is support for surfaces, textures, sprites, audio, streams, archives, configuration files, render targets, swap chains, databases and much more.&#xD;&#xA;&#xD;&#xA;It's very solid and robust. Still working on docs and more examples. See our site for more information and media. Feel free to contact us any time with questions and/or concerns.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="27348" PostHistoryTypeId="2" PostId="12468" RevisionGUID="262213f8-d79c-446c-817f-ed51529bda06" CreationDate="2011-05-18T22:54:19.297" UserId="6562" Text="I am writing an app for Android, using OpenGL ES 1.x&#xD;&#xA;&#xD;&#xA;I am confused as to whether I should use GL_FLOAT or GL_FIXED, the priority being performance regarding GPU operations(does GL_FIXED need to be converted etc. ex: GL_FIXED fits EXACTLY with the precision I need but if it is converted to a float then using it is pointless).&#xD;&#xA;&#xD;&#xA;This book seems to say that it is ALWAYS preferable to use GL_FIXED for vertices: &quot;The major exception is with vertex data, which should never be given in floating point...&quot;&#xD;&#xA;[Here] (paragraph right above the subtitle &quot;Vertex data&quot;)&#xD;&#xA;&#xD;&#xA;But I have seen others saying floating point is better..&#xD;&#xA;&#xD;&#xA;[Here]: http://books.google.ca/books?id=anzTkO5xJWsC&amp;pg=PA162&amp;lpg=PA162&amp;dq=glfixed+signed&amp;source=bl&amp;ots=4fFDLQIMjK&amp;sig=hZRe9OReOQrJGrmBdX29Ei2xiFw&amp;hl=en&amp;ei=AgvTTZnxB-fu0gGNgYHWCw&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=6&amp;ved=0CDcQ6AEwBQ#v=onepage&amp;q=glfixed%20signed&amp;f=false" />
  <row Id="27349" PostHistoryTypeId="1" PostId="12468" RevisionGUID="262213f8-d79c-446c-817f-ed51529bda06" CreationDate="2011-05-18T22:54:19.297" UserId="6562" Text="OpenGL ES GL_FIXED versus GL_FLOAT" />
  <row Id="27350" PostHistoryTypeId="3" PostId="12468" RevisionGUID="262213f8-d79c-446c-817f-ed51529bda06" CreationDate="2011-05-18T22:54:19.297" UserId="6562" Text="&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="27351" PostHistoryTypeId="2" PostId="12469" RevisionGUID="44608199-c2b6-4572-8c59-9558c8a307f9" CreationDate="2011-05-18T22:56:50.883" UserId="3794" Text="Of course tablets are essential for cg artists. Even in the smallest company artist have company (and big) tablets. &#xD;&#xA;&#xD;&#xA;I can't imagine company which would ask you for bringing your own, maybe some garage startup...&#xD;&#xA;&#xD;&#xA;As a employe you will make money to your company, they will take care about your equipment - so you are optimized and comfortable to make even more money for them :-)" />
  <row Id="27352" PostHistoryTypeId="2" PostId="12470" RevisionGUID="f9db0015-30bd-4f6e-9864-781ef47cf0d3" CreationDate="2011-05-18T22:57:48.683" UserId="4443" Text="I am going to try and suggest the underlying question is along the lines of &quot;What technologies are good for an artist who wants to get into game design/development&quot; as opposed to do companies provide tablets.&#xD;&#xA;&#xD;&#xA;In general use whatever technologies allow you to do your best work. If that is a tablet drawing surface then so be it. If a company likes your work they will hire you and provide the interface you are most comfortable with.&#xD;&#xA;&#xD;&#xA;Now to wrap it around to the originally posted question, the company I previously worked for Did buy tablets for the artists who requested them which was just under half of them. But this did extend to every department with their interfaces. Natural keyboards, mice even displays and audio devices as needed were provided." />
  <row Id="27353" PostHistoryTypeId="5" PostId="12449" RevisionGUID="39da29b4-6fbd-46f1-8748-d10aabfe2b7d" CreationDate="2011-05-18T22:58:07.640" UserId="4513" Comment="added 338 characters in body; added 6 characters in body" Text="![MDP][1]![MDP][2]&#xD;&#xA;&#xD;&#xA;This question has come mainly out of **sheer desperation**, after spending several hours trying to figure out the problem.&#xD;&#xA;&#xD;&#xA;If you cast your eyes to the picture above, you should see that my midpoint displacement algorithm algorithm is working (somewhat) successfully; in producing a somewhat coherent noise pattern.&#xD;&#xA;&#xD;&#xA;However, it is leaving behind a black dotted grid on the image, and I have no idea why. I can foresee this being an issue in the math, but I just cannot see it; nor was this pointed out in any online resources as a possible issue; so any help will be appreciated as to hunting down this bug.&#xD;&#xA;&#xD;&#xA;    unsigned char** mdp(unsigned char** base, unsigned base_n, unsigned char r) {&#xD;&#xA;    	size_t n = (2 * base_n) - 1;&#xD;&#xA;    &#xD;&#xA;    	unsigned char** map = new unsigned char*[n];&#xD;&#xA;    	for (unsigned i = 0; i &lt; n; ++i) map[i] = new unsigned char[n];&#xD;&#xA;    &#xD;&#xA;    	// Resize&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	for (size_t i = 0; i &lt; n; i += 2) {&#xD;&#xA;    		for (size_t j = !(i % 2 == 0); j &lt; n; j += 2) {&#xD;&#xA;    			map[i][j] = base[i / 2][j / 2];&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Diamond algorithm&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	// 0 X 0&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	for (size_t i = 1; i &lt; n; i += 2) {&#xD;&#xA;    		for (size_t j = 1; j &lt; n; j += 2) {&#xD;&#xA;    			unsigned char&amp; map_ij = map[i][j];&#xD;&#xA;    &#xD;&#xA;    			unsigned char a = map[i - 1][j - 1];&#xD;&#xA;    			unsigned char b = map[i - 1][j + 1];&#xD;&#xA;    			unsigned char c = map[i + 1][j - 1];&#xD;&#xA;    			unsigned char d = map[i + 1][j + 1];&#xD;&#xA;    			map_ij = (a + b + c + d) / 4;&#xD;&#xA;    &#xD;&#xA;    			unsigned char rv = std::rand() % r;&#xD;&#xA;    			if (map_ij + r &lt; 255) map_ij += rv;&#xD;&#xA;    			else map_ij = 255;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Square algorithm&#xD;&#xA;    	// 0 1 0&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	// 0 1 0&#xD;&#xA;    	for (size_t i = 0; i &lt; n; ++i) {&#xD;&#xA;    		for (size_t j = (i % 2 == 0); j &lt; n; j += 2) {&#xD;&#xA;    			unsigned char&amp; map_ij = map[i][j];&#xD;&#xA;    &#xD;&#xA;    			// get surrounding values&#xD;&#xA;    			unsigned char a = 0, b = a, c = a, d = a;&#xD;&#xA;    			if (i != 0) a = map[i - 1][j];&#xD;&#xA;    			if (j != 0) b = map[i][j - 1];&#xD;&#xA;    			if (j + 1 != n) c = map[i][j + 1];&#xD;&#xA;    			if (i + 1 != n) d = map[i + 1][j];&#xD;&#xA;    &#xD;&#xA;    			// average calculation&#xD;&#xA;    			if (i == 0) map_ij = (b + c + d) / 3;&#xD;&#xA;    			else if (j == 0) map_ij = (a + c + d) / 3;&#xD;&#xA;    			else if (j + 1 == n) map_ij = (a + b + d) / 3;&#xD;&#xA;    			else if (i + 1 == n) map_ij = (a + b + c) / 3;&#xD;&#xA;    			else map_ij = (a + b + c + d) / 4;&#xD;&#xA;    &#xD;&#xA;    			unsigned char rv = std::rand() % r;&#xD;&#xA;    			if (map_ij + r &lt; 255) map_ij += rv;&#xD;&#xA;    			else map_ij = 255;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	return map;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have any tips or resources other than http://www.gameprogrammer.com/fractal.html and http://www.lighthouse3d.com/opengl/terrain/index.php?mpd2 for fractal based terrain generation, I would appreciate them as comments also.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;![MDP][3]&#xD;&#xA;&#xD;&#xA;This is the new image, as per Fabians suggestion (ty), however it still has some strange quirks, which you should be able to see straight away (small 'dimples' everywhere).&#xD;&#xA;&#xD;&#xA;What could be causing this strange behavior? Updated source code: http://www.pastie.org/1924223&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/akI5K.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/dWKVu.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/BMo7g.jpg" />
  <row Id="27354" PostHistoryTypeId="5" PostId="12465" RevisionGUID="7f9a19a9-6b5f-47b2-9a0b-64b96056f4d1" CreationDate="2011-05-18T23:26:28.913" UserId="2698" Comment="added 629 characters in body" Text="I would advise against using a single flat file for theoretically infinite amounts of data.&#xD;&#xA;&#xD;&#xA;If you have a theoretically infinite amount of data then you need **random access**, which means **multiple files** or a database - or an indexed flat-file format, which involves re-solving the indexing problems _already solved_ by file systems or a database.&#xD;&#xA;&#xD;&#xA;If you spread your chunks across multiple files, getting the chunk at (-110, 5000) is just a matter of saying &quot;%APPDATA%/game/map/-110/5000.dat&quot; (or some other filename if you want to begin compressing them). Databases just need a query. If a chunk doesn't have any data, you can just not store anything. A single flat file doesn't offer the speed and convenience of random access.&#xD;&#xA;&#xD;&#xA;In a single file of arbitrary size, for fast random access you must have a guarantee for the position of any chunk of data, which means using an index (since a raw binary search through your data chunks hurts performance, and creating a grid in your file with &quot;blank&quot; spots gives you [Byte56's problem][1]). Once you develop an indexing system, give it efficiency and write yourself an API, you've recreated something like the file system or a database. Unless you actually gain something out of doing that it probably isn't worth the investment. For instance, Steam benefits massively from their GCF/NCF file formats.&#xD;&#xA;&#xD;&#xA;If you want some security on your saves, it's still possible to do that. For instance, you can encrypt each individual chunk. In order to prevent them getting deleted, you could have a central hash based on existing saved data. If the saved data doesn't match up to the hash (and your program didn't cause the change), a chunk's been deleted.&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/12438/what-is-a-good-flat-file-format-for-storing-a-2d-tile-map-that-can-grow-infinitel/12463#12463" />
  <row Id="27355" PostHistoryTypeId="5" PostId="12465" RevisionGUID="6062590f-ecb3-4812-9669-243ce3cdff4c" CreationDate="2011-05-18T23:33:13.507" UserId="2698" Comment="added 18 characters in body" Text="I would advise against using a single flat file for theoretically infinite amounts of data.&#xD;&#xA;&#xD;&#xA;If you have a theoretically infinite amount of data then you need **random access**, which means **multiple files** or a database - or an indexed flat-file format, which involves re-solving the indexing problems _already solved_ by file systems or a database.&#xD;&#xA;&#xD;&#xA;If you spread your chunks across multiple files, getting the chunk at (-110, 5000) is just a matter of saying &quot;%APPDATA%/game/map/-110/5000.dat&quot; (or some other filename if you want to begin compressing them). Databases just need a query. If a chunk doesn't have any data, you can just not store anything. A single flat file doesn't offer the speed and convenience of random access right off the bat.&#xD;&#xA;&#xD;&#xA;In a single file of arbitrary size, for fast random access you must have a guarantee for the position of any chunk of data, which means using an index (since a raw binary search through your data chunks hurts performance, and creating a grid in your file with &quot;blank&quot; spots gives you [Byte56's problem][1]). Once you develop an indexing system, give it efficiency and write yourself an API, you've recreated something like the file system or a database. Unless you actually gain something out of doing that it probably isn't worth the investment. For instance, Steam benefits massively from their GCF/NCF file formats.&#xD;&#xA;&#xD;&#xA;If you want some security on your saves, it's still possible to do that. For instance, you can encrypt each individual chunk. In order to prevent them getting deleted, you could have a central hash based on existing saved data. If the saved data doesn't match up to the hash (and your program didn't cause the change), a chunk's been deleted.&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/12438/what-is-a-good-flat-file-format-for-storing-a-2d-tile-map-that-can-grow-infinitel/12463#12463" />
  <row Id="27356" PostHistoryTypeId="2" PostId="12471" RevisionGUID="6df781e9-d7bc-4f70-b825-92fd984e32a2" CreationDate="2011-05-18T23:40:16.280" UserId="3505" Text="I think maybe you shouldn't write a 3D game at all.&#xD;&#xA;&#xD;&#xA;I can only guess at how experienced a game developer you are, but everything I can learn about you make me believe that you are very green.&#xD;&#xA;&#xD;&#xA;Setting up a 3D rendering environment in something like Blitz3D is very easy. (It's not free, but it's absolutely the easiest tool that I know.) Making something that looks good and works for a game is however a relatively big job.&#xD;&#xA;&#xD;&#xA;So, stick to 2D for now." />
  <row Id="27357" PostHistoryTypeId="2" PostId="12472" RevisionGUID="201a8886-8206-41f8-842d-6af5cae1bee2" CreationDate="2011-05-18T23:49:19.610" UserId="7455" Text="I would also like to hear from your results. I've been trying to do the same thing. I found that doing lots of math is fine but soon as you put a canvas in there its goes mental and frame rates fall.&#xD;&#xA;&#xD;&#xA;I had an foreground overlay that displayed effects. It was a very high quality image but the alpha stuff slowed it down so much that I dropped it completely in return for more frames per second.&#xD;&#xA;&#xD;&#xA;Another thing I did was to use PHP to work out some of the heavy maths. I had large datasets but rather than get JavaScript to compute and show the data, i decided to let PHP do the work and let JavaScript show results. This didn't save much time because JavaScript is &quot;sehr gut &quot; with maths.&#xD;&#xA;&#xD;&#xA;I take it your whole site is in HTML5 so try playing with the background worker.&#xD;&#xA;&#xD;&#xA;Hope I helped and please share your results." />
  <row Id="27358" PostHistoryTypeId="2" PostId="12473" RevisionGUID="74420920-806e-4f76-9ab1-00b609017bd8" CreationDate="2011-05-18T23:56:59.373" UserId="7454" Text="I'm doing some research and I really don't want a physics engine when a simple mechanism will do.  I have a ball that will be balanced on a plane.  The ball will always be &quot;stuck&quot; to the plane and never roll off of it.  The player/user will be moving this plane vertically up and down, changing its angle (rotating it some) and changing it's length.  What I want is for the ball to roll along the plane as the user is interacting with the plane. &#xD;&#xA;&#xD;&#xA;For example, player touches a surface with two fingers, touch 1 is the plane starting vector and touch 2 is the plane ending vector.  The player can then move the two fingers around (increasing/decreasing the length of the plane) as well as move their fingers vertically and horizontally changing the planes position in 2d space.  While doing this the ball moves along the plane with normal gravity trying to pull the ball down to the ground.&#xD;&#xA;&#xD;&#xA;Does anyone have any idea on how to approach this?  I started to think that this would be simple but then figuring in the dynamically changing length of the plane I got a bit lost.&#xD;&#xA;&#xD;&#xA;I'll be doing this in XNA or Silverlight." />
  <row Id="27359" PostHistoryTypeId="1" PostId="12473" RevisionGUID="74420920-806e-4f76-9ab1-00b609017bd8" CreationDate="2011-05-18T23:56:59.373" UserId="7454" Text="How to balance a ball on a rotating plane?" />
  <row Id="27360" PostHistoryTypeId="3" PostId="12473" RevisionGUID="74420920-806e-4f76-9ab1-00b609017bd8" CreationDate="2011-05-18T23:56:59.373" UserId="7454" Text="&lt;xna&gt;&lt;c#&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;game-mechanics&gt;" />
  <row Id="27361" PostHistoryTypeId="25" PostId="12464" RevisionGUID="61873da8-27f7-499e-a229-efc8f67b97ca" CreationDate="2011-05-19T00:12:19.180" Comment="http://twitter.com/#!/StackGameDev/status/71005223031816192" />
  <row Id="27362" PostHistoryTypeId="2" PostId="12474" RevisionGUID="6f8bb3ef-054f-418a-9be5-46ab0b1ec027" CreationDate="2011-05-19T00:13:02.517" UserId="7456" Text="I've been trying to figure out how to do this but I have a bunch of screens, each with their own `Draw` method. However, I'd like to render all sprites offset by the screen position without altering their locations before I do the drawing.&#xD;&#xA;&#xD;&#xA;So, if I render a sprite on a screen at 0,0 but the screen itself is offset to 50,50 it still renders to a window position of 0,0 instead of to the window position of 50,50.&#xD;&#xA;&#xD;&#xA;I've been thinking about rendering each screen to their own texture and then rendering that texture to the main spriteBatch - but reading another question you could lose a lot of information such as alpha transparency&#xD;&#xA;&#xD;&#xA;Any help will be appreciated to get me on the right path. Thanks." />
  <row Id="27363" PostHistoryTypeId="1" PostId="12474" RevisionGUID="6f8bb3ef-054f-418a-9be5-46ab0b1ec027" CreationDate="2011-05-19T00:13:02.517" UserId="7456" Text="rendering a spritebatch to a temporary buffer and then offset that to the main screen" />
  <row Id="27364" PostHistoryTypeId="3" PostId="12474" RevisionGUID="6f8bb3ef-054f-418a-9be5-46ab0b1ec027" CreationDate="2011-05-19T00:13:02.517" UserId="7456" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="27365" PostHistoryTypeId="2" PostId="12475" RevisionGUID="e9efe8a1-3686-4824-856b-e5982735e82b" CreationDate="2011-05-19T00:16:32.700" UserId="2111" Text="I don't know if I understand your problem correctly, but here is how I would go with the constraints that I understood:&#xD;&#xA;&#xD;&#xA;I guess you could simply apply gravity to the ball, then resolve the collision with the plane by moving the ball above the plane perpendicularly to the surface, making the ball move along the plane based on the orientation of the surface.&#xD;&#xA;&#xD;&#xA;If you want to prevent the ball from falling from the plane, then just restrict its position when it gets to the borders of the plane.&#xD;&#xA;&#xD;&#xA;As for the dynamic changing length, the only problem that I would see is when the user would want to make the plane smaller than it actually is when the ball is at the border. You could just solve this by moving the ball along with the new border." />
  <row Id="27366" PostHistoryTypeId="2" PostId="12476" RevisionGUID="27901e01-0a65-4b28-9124-d8b69dfb92de" CreationDate="2011-05-19T00:51:08.583" UserId="5460" Text="So, what's the difference between the notion bonus and power-ups?&#xD;&#xA;&#xD;&#xA;I have in game some objects and the player that has ability to pick up some bonuses/power-ups that allow the player to explode all around or item that teleports the player form one place to another - is it all power-ups?" />
  <row Id="27367" PostHistoryTypeId="1" PostId="12476" RevisionGUID="27901e01-0a65-4b28-9124-d8b69dfb92de" CreationDate="2011-05-19T00:51:08.583" UserId="5460" Text="Difference between bonus and power-ups" />
  <row Id="27368" PostHistoryTypeId="3" PostId="12476" RevisionGUID="27901e01-0a65-4b28-9124-d8b69dfb92de" CreationDate="2011-05-19T00:51:08.583" UserId="5460" Text="&lt;game-design&gt;" />
  <row Id="27369" PostHistoryTypeId="2" PostId="12477" RevisionGUID="77e5f251-1f7b-4c0f-a7a8-e4561162bd89" CreationDate="2011-05-19T00:59:11.310" UserId="3327" Text="&quot;Bonus&quot; is usually used to describe something that effects the score or the outcome of the game (such as a score multiplier). &quot;Power-ups&quot; generally refer to things that give the game extra abilities/mechanics like increased speed or power. However, whoever you are talking to will probably understand what you mean no matter which word you use." />
  <row Id="27370" PostHistoryTypeId="5" PostId="12474" RevisionGUID="2bfb5c49-3819-430d-ab5d-b4a9fae534d2" CreationDate="2011-05-19T01:04:47.920" UserId="7456" Comment="added 108 characters in body" Text="I've been trying to figure out how to do this but I have a bunch of screens, each with their own `Draw` method. However, I'd like to render all sprites offset by the screen position without altering their locations before I do the drawing.&#xD;&#xA;&#xD;&#xA;So, if I render a sprite on a screen at 0,0 but the screen itself is offset to 50,50 it still renders to a window position of 0,0 instead of to the window position of 50,50.&#xD;&#xA;&#xD;&#xA;I've been thinking about rendering each screen to their own texture and then rendering that texture to the main spriteBatch - but reading another question you could lose a lot of information such as alpha transparency&#xD;&#xA;&#xD;&#xA;Any help will be appreciated to get me on the right path. Thanks.&#xD;&#xA;&#xD;&#xA;Update: Also I'd prefer it to be recursive so that screens within screens are also offset appropriately." />
  <row Id="27371" PostHistoryTypeId="2" PostId="12478" RevisionGUID="203ec9e1-3377-4d72-8cdf-812c9f1537f1" CreationDate="2011-05-19T01:06:30.417" UserId="6813" Text="From my point of view,&#xD;&#xA;&#xD;&#xA;- &quot;power-ups&quot; are items/abilities that can be gathered while playing (like a super temporary shield),&#xD;&#xA;- whereas &quot;bonus&quot; is something given because you were good enough to deserve it (like a bonus stage).&#xD;&#xA;&#xD;&#xA;But power-ups are often called bonus and vice-versa." />
  <row Id="27372" PostHistoryTypeId="5" PostId="12478" RevisionGUID="e159e1c8-3721-4b69-804a-4aad2010b463" CreationDate="2011-05-19T01:12:18.323" UserId="6813" Comment="added 8 characters in body" Text="From my point of view,&#xD;&#xA;&#xD;&#xA;- &quot;power-ups&quot; are items/abilities that can be gathered while playing (like a super temporary shield) to help,&#xD;&#xA;- whereas &quot;bonus&quot; is something given because you were good enough to deserve it (like a bonus stage).&#xD;&#xA;&#xD;&#xA;But power-ups are often called bonus and vice-versa." />
  <row Id="27373" PostHistoryTypeId="2" PostId="12479" RevisionGUID="1176988c-1dcc-4c15-aa61-68d521a83fee" CreationDate="2011-05-19T01:26:05.087" UserId="5708" Text="Two things that jump out:&#xD;&#xA;&#xD;&#xA; 1. Do you have a compelling reason to do this in fixed-point?  There's nothing wrong with it per se, and there are plenty of reasons for using it (most notably memory requirements if you're planning on going up towards a HUGE map), but I would definitely start with a floating-point version of the algorithm and convert it to fixed-point after you've got it working; that should, if nothing else, eliminate one plausible source of errors (in particular, I suspect your clamping may be causing problems, and the conditions for when to add/substract rv).&#xD;&#xA; 2. While it's hard to tell from the code I see, it doesn't seem like your randomized height displacement is scaling with the level, and that combined with the issue in (1) may be causing some of the problems - you shouldn't be displacing by the same amount at each level.&#xD;&#xA;&#xD;&#xA;Oh, and one non-algorithmic thing: I strongly recommend not doing allocations in your mdp() function; pass in two different already-allocated arrays and do the iteration 'in-place', going from one to the other.  If nothing else, this'll let you ping-pong back and forth as you do the layers rather than having to allocate a new array each time out.&#xD;&#xA;" />
  <row Id="27374" PostHistoryTypeId="2" PostId="12480" RevisionGUID="6ba34d0b-5b3d-4c67-92da-d908ecca7d7a" CreationDate="2011-05-19T01:59:39.633" UserId="6042" Text="In commercial game development for TV game consoles, we never store vertex positions on disc or network as floats, because if more than 8 or 10 bits of precision is needed, a model can be subdivided until each piece requires only 8 or 10 bits.&#xD;&#xA;&#xD;&#xA;So for speed of download or loading from a disc, floats lose out to fixed point.&#xD;&#xA;&#xD;&#xA;As for speed of rendering, this is an issue only when vertex shading is bottlenecked by vertex buffer read bandwidth, which is actually not likely unless your vertices are really fat beyond just the position being 3x32 bits.&#xD;&#xA;" />
  <row Id="27375" PostHistoryTypeId="2" PostId="12481" RevisionGUID="0f51bcc0-99cb-44a3-9494-e080134c9ea2" CreationDate="2011-05-19T02:39:39.873" UserId="3547" Text="I think you could change the view port between calls. This would do exactly what your asking (window position would be shifted)." />
  <row Id="27376" PostHistoryTypeId="25" PostId="12476" RevisionGUID="399ffda5-6a9d-4245-80f9-01997e3ec262" CreationDate="2011-05-19T03:12:19.263" Comment="http://twitter.com/#!/StackGameDev/status/71050521783451648" />
  <row Id="27377" PostHistoryTypeId="2" PostId="12482" RevisionGUID="46a03de9-6ba0-49c6-8edf-766f9733ede7" CreationDate="2011-05-19T04:36:10.793" UserId="3689" Text="say i have desktop game and i like to make it social , for that i need browser component &#xD;&#xA;embedded into my game  ( c++ openGL) for the Authentication part . is there any framework &#xD;&#xA;for that ? " />
  <row Id="27378" PostHistoryTypeId="1" PostId="12482" RevisionGUID="46a03de9-6ba0-49c6-8edf-766f9733ede7" CreationDate="2011-05-19T04:36:10.793" UserId="3689" Text="Is there any way to embed browser component into game for facebook Authentication?" />
  <row Id="27379" PostHistoryTypeId="3" PostId="12482" RevisionGUID="46a03de9-6ba0-49c6-8edf-766f9733ede7" CreationDate="2011-05-19T04:36:10.793" UserId="3689" Text="&lt;facebook&gt;" />
  <row Id="27380" PostHistoryTypeId="5" PostId="12482" RevisionGUID="ac85e10d-7614-4d2d-86dd-8474d2efbcbf" CreationDate="2011-05-19T04:38:47.110" UserId="1198" Comment="deleted 8 characters in body" Text="Say I have desktop game and I like to make it social, for that I need browser component &#xD;&#xA;embedded into my game  ( c++ openGL) for the Authentication part. Is there any framework &#xD;&#xA;for that? " />
  <row Id="27381" PostHistoryTypeId="2" PostId="12483" RevisionGUID="c88ca4ad-6144-43d6-abf9-25cd39309793" CreationDate="2011-05-19T04:47:46.243" UserId="6813" Text="I never tried myself, but you can find some C++ libraries.&#xD;&#xA;&#xD;&#xA;- C++ FaceBook REST Client (which seems very simple to use.):&lt;br&gt; http://projects.seligstein.com/facebook/ &#xD;&#xA;- Facebook cpp Api:&lt;br&gt; http://code.google.com/p/facebook-cpp-graph-api/" />
  <row Id="27382" PostHistoryTypeId="5" PostId="12483" RevisionGUID="858148df-4430-4fc5-badb-d92bf1e6123e" CreationDate="2011-05-19T04:52:47.177" UserId="6813" Comment="added 99 characters in body" Text="I never tried myself, but you can find some C++ libraries.&#xD;&#xA;&#xD;&#xA;- C++ FaceBook REST Client (which seems very simple to use.):&lt;br&gt; http://projects.seligstein.com/facebook/ &#xD;&#xA;- Facebook cpp Api (which seems to use Qt):&lt;br&gt; http://code.google.com/p/facebook-cpp-graph-api/&#xD;&#xA;- Fantasma (which seems to use Qt too):&lt;br&gt; http://launchpad.net/fantasma" />
  <row Id="27383" PostHistoryTypeId="2" PostId="12484" RevisionGUID="feaa4182-7f1c-4983-adce-61493e665de4" CreationDate="2011-05-19T06:05:03.350" UserId="111" Text="Yes. ForPlay.&#xD;&#xA;&#xD;&#xA;WebGL and Canvas 2D code paths exist for maximum performance and platform support respectively. The [ForPlay][1] GWT library helps with the abstraction. See the Google IO presentation [Kick-Ass Game Programming with Google Web Toolkit][2] for details.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/forplay/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=F_sbusEUz5w" />
  <row Id="27384" PostHistoryTypeId="25" PostId="12482" RevisionGUID="87975d52-e4d1-449a-ba3d-b4fe5ce00fb5" CreationDate="2011-05-19T06:12:19.760" Comment="http://twitter.com/#!/StackGameDev/status/71095821965344769" />
  <row Id="27385" PostHistoryTypeId="2" PostId="12485" RevisionGUID="47755552-5025-438c-83c9-cd15b9d664ea" CreationDate="2011-05-19T06:17:27.587" UserId="3689" Text="Does anyone here have experience in implementing in game payments , does such thing is possible ?&#xD;&#xA;Where should I look in to?&#xD;&#xA;" />
  <row Id="27386" PostHistoryTypeId="1" PostId="12485" RevisionGUID="47755552-5025-438c-83c9-cd15b9d664ea" CreationDate="2011-05-19T06:17:27.587" UserId="3689" Text="What I need to do to integrate in game micro payments for virtual gods in desktop games?" />
  <row Id="27387" PostHistoryTypeId="3" PostId="12485" RevisionGUID="47755552-5025-438c-83c9-cd15b9d664ea" CreationDate="2011-05-19T06:17:27.587" UserId="3689" Text="&lt;casual-games&gt;" />
  <row Id="27388" PostHistoryTypeId="2" PostId="12486" RevisionGUID="e3e67fb5-2fd9-4368-aab6-7e7570e930b5" CreationDate="2011-05-19T08:27:42.490" UserId="7271" Text="Personnaly, I'd see :&#xD;&#xA;&#xD;&#xA; - a &quot;power-up&quot; as something that makes you more &quot;potent&quot;&#xD;&#xA; - a &quot;bonus&quot; as a reward" />
  <row Id="27389" PostHistoryTypeId="25" PostId="12473" RevisionGUID="ff8028af-fcd5-4962-9042-f7e835553f65" CreationDate="2011-05-19T09:12:19.690" Comment="http://twitter.com/#!/StackGameDev/status/71141120696008704" />
  <row Id="27390" PostHistoryTypeId="2" PostId="12487" RevisionGUID="63852786-b5b4-443c-b098-4995822bd6f4" CreationDate="2011-05-19T09:24:21.803" UserId="7471" Text="1. a. SDL (Simple Direct Layer) Has a fairly simple and extensible 3D rendering engine which is open-source. However C++ is efficient it's a steep learning curve.&#xD;&#xA;&#xD;&#xA;   b.  sdlbasic is a small, efficient and multiplatform BASIC interpreter for creating&#xD;&#xA; games using the power of SDL library. It was inspired by the old and glorious&#xD;&#xA; AMOS. - it is in the Ubuntu repository and probably others as well.&#xD;&#xA;&#xD;&#xA;   c. ?&#xD;&#xA;&#xD;&#xA;2. a. i agree with your sentiments although &quot;casual gaming&quot; like 2d puzzles, and easy going amusement games online and as collector packs seem to have acquired more real-estate in the gaming market than the hardware intensive kind simply due to the practical nature of a game with low system requirements. it would be good to see some more creativity in the lower substrates of the inventive 3d creations hemisphere of games world inc." />
  <row Id="27391" PostHistoryTypeId="5" PostId="12450" RevisionGUID="9630c82f-8a76-4817-9864-d714ba5e2963" CreationDate="2011-05-19T11:10:55.153" UserId="1742" Comment="final solution" Text="The algorithm recursively adds a value, but the value can be positive or negative (normally +-1 / (2^octave) )&#xD;&#xA;&#xD;&#xA;If you start at zero and only add positive values, then you can only go up, and that is why you're seeing the vertices pulled down.&#xD;&#xA;&#xD;&#xA;try starting at 127 rather than zero for the four corners, and also try signed char (then checking your bounds both top and bottom)&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;so, two more things need to change in the main (64&gt;&gt;i) to get the half effect at each octave, and also your output function (the one that maps the final[][] tp the imgdta[], you just need to put in&#xD;&#xA;&#xD;&#xA;&gt; imgdta[(i * n) + j] = 128 + final[i][j];&#xD;&#xA;&#xD;&#xA;rather than the if else block.&#xD;&#xA;&#xD;&#xA;another thing, I'm not sure why, but your bounds check is failing (that's lines 38 and 65) if you remove the check totally, you notice some new dark blobs too, so i reckon you might need to promote to a larger type before doing the bounds check if you want the more noisy picture you get with &quot;64/i&quot;." />
  <row Id="27392" PostHistoryTypeId="25" PostId="12485" RevisionGUID="c8c9047c-933e-41cc-8dce-18735eccf029" CreationDate="2011-05-19T12:12:20.460" Comment="http://twitter.com/#!/StackGameDev/status/71186422287175680" />
  <row Id="27393" PostHistoryTypeId="2" PostId="12488" RevisionGUID="2f1e7507-8ba0-4a0b-9e8d-dd56419a8a98" CreationDate="2011-05-19T13:43:55.690" UserId="853" Text="I've been a software developer for 5 years now and wanting to get into iOS game development. I've played around with the iOS SDK for about 2 years now, attending cocoaheads meetings and feel I have a good grasp on objective-c/cocoa and even c/c++.&#xD;&#xA;&#xD;&#xA;I have a game idea and know that I will use Box2D but I'm wondering if I should use cocos2D or not. The main reasons are:&#xD;&#xA;&#xD;&#xA;1. I may want to do things graphics wise that aren't available in cocos2d.&#xD;&#xA;2. If I roll my own game engine I'll have more control. &#xD;&#xA;&#xD;&#xA;Of course the main reason for using a already existing game engine is the time it saves and it makes the hard stuff easier, but for someone who has the technical chops to roll his own does it make since? " />
  <row Id="27394" PostHistoryTypeId="1" PostId="12488" RevisionGUID="2f1e7507-8ba0-4a0b-9e8d-dd56419a8a98" CreationDate="2011-05-19T13:43:55.690" UserId="853" Text="When to roll your own game engine?" />
  <row Id="27395" PostHistoryTypeId="3" PostId="12488" RevisionGUID="2f1e7507-8ba0-4a0b-9e8d-dd56419a8a98" CreationDate="2011-05-19T13:43:55.690" UserId="853" Text="&lt;engine&gt;" />
  <row Id="27396" PostHistoryTypeId="2" PostId="12489" RevisionGUID="65380d5e-136d-4f3d-a3e8-bee72bed3232" CreationDate="2011-05-19T13:58:02.377" UserId="2792" Text="Don't roll you own engine. Roll you own game. If you happen to write an engine at the same time then good for you, if not you can always refactor whatever parts you might want to reuse to make it more &quot;engine&quot; like.&#xD;&#xA;&#xD;&#xA;People often over estimate what it takes to write the &quot;engine&quot; part of a game. If you only do what you need it won't take that long. The hard part is to not get stuck writing infrastructure and to only write what you absolutely must to solver your problem.&#xD;&#xA;&#xD;&#xA;I would use an existing engine when:&#xD;&#xA;&#xD;&#xA; - I have a tight deadline&#xD;&#xA; - I have a known fixed feature set so that I can chose an engine for that" />
  <row Id="27397" PostHistoryTypeId="5" PostId="12418" RevisionGUID="24d4f4d3-421c-4f30-aa21-c860ded760c0" CreationDate="2011-05-19T14:07:35.223" UserId="6728" Comment="added 345 characters in body" Text="I'm working on a tile-based Mario clone. I have implemented the tile based collision method from the tutorial http://www.tonypa.pri.ee/tbw/tut05.html.&#xD;&#xA;&#xD;&#xA;This works all fine when walking and falling. But when the player jumps near a wall and walks to the right in the air, then the player get stuck on the wall. The player sprite falls again when the player releases the key.&#xD;&#xA;&#xD;&#xA;The setup is pretty easy and i can't find the problem. The map is build up as a 2D array with map blocks. A block can be solid or not. Player can't move trough solid objects, duh..&#xD;&#xA;&#xD;&#xA;In the game loop:&#xD;&#xA;&#xD;&#xA;- the player's location gets updated (gravity, movement ect.)&#xD;&#xA;- check the map on collisions. When a collision is found in the Y, then the player location gets updated so it's above or below the block (depending the direction of the player), then the collision box gets updated with the new location. Then the same process for the X.&#xD;&#xA;- The collision box gets updated to the new location (a free location). The box is adjusted so that it's little higher to get the block below the player to check if he's landed. This is to change the state of the player, from flying sprite to idle ect. &#xD;&#xA;&#xD;&#xA;[Here's](http://imageshack.us/m/52/1614/schermafbeelding2011051f.png) a image of the collision box of the player.&#xD;&#xA;&#xD;&#xA;I also tried to switch the X and Y check so that the player is moved on the X line. Then when the player moves the movement goes very laggy. When i push and release the button to move, then the player moves faster but in chucks. Very trippy.. &#xD;&#xA;&#xD;&#xA;Does anyone sees the error or can give me a better collision algorithm for this? &#xD;&#xA;&#xD;&#xA;UPDATE (didn't updated the code)&#xD;&#xA;--------------&#xD;&#xA;I swaped the x and y check method and implemented the isonland variable. So when walking and jumping against walls works perfect. Only now, when the player jumps Mario get set back when landed. This because the X check method goes first and adjust Mario's position.&#xD;&#xA;&#xD;&#xA;How can I solve that? &#xD;&#xA;&#xD;&#xA;Map class update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            //update entities&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                entity.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //update objects&#xD;&#xA;            for(MapObject mapObt : _mapObjects) {&#xD;&#xA;                mapObt.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //check for collisions&#xD;&#xA;            checkMapCollision();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Entity (abstract) update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            _velocity = new Vector2d(0.0F, 0.0F);&#xD;&#xA;    &#xD;&#xA;            //add gravity&#xD;&#xA;            _velocity.y = Map._GRAVITY_PER_SEC * timeElapsed;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Mario (extends entity) update methos:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public void update(int timeElapsed) {&#xD;&#xA;            super.update(timeElapsed);&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.IDLE) {&#xD;&#xA;                &#xD;&#xA;            } else if(_isMoving) {&#xD;&#xA;                _marioSmallWalk.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.JUMPING) {&#xD;&#xA;                setVelocityY(getVelocity().y + _jumpSpeed);&#xD;&#xA;    &#xD;&#xA;                _jumpSpeed += _JUMP_DECREASE * timeElapsed;&#xD;&#xA;    &#xD;&#xA;                //falling?&#xD;&#xA;                if(getVelocity().y &gt; 0) {&#xD;&#xA;                    setState(STATES.FALLING);&#xD;&#xA;                }&#xD;&#xA;            } &#xD;&#xA;            &#xD;&#xA;            if(_isMoving) {&#xD;&#xA;                double walkSpd = (_WALK_SPEED_SEC * timeElapsed);&#xD;&#xA;    &#xD;&#xA;                if(getFacing() == FACING.LEFT) {&#xD;&#xA;                    walkSpd = -walkSpd;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                setVelocityX(getVelocity().x + walkSpd);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //falling?&#xD;&#xA;            if(getVelocity().y &gt; (Map._GRAVITY_PER_SEC * timeElapsed) + 1.0F) {&#xD;&#xA;                setState(STATES.FALLING);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            setPosition((int)(getX() + getVelocity().x), (int)(getY() + getVelocity().y));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Map class CheckMapCollision method:&#xD;&#xA;&#xD;&#xA;    public void checkMapCollision() {&#xD;&#xA;            //enteties move so check it&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                //get the corners&#xD;&#xA;                Rectangle bounds = entity.getBounds();&#xD;&#xA;                Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;                Vector2d dir = entity.getDirection();&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[1].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionY(blkBounds.y + blkBounds.height + bounds.height);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = entity.getBounds();&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving to the right&#xD;&#xA;                if(dir.x &gt; 0) {&#xD;&#xA;                    if(corners[1].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[1].isSolid()) {&#xD;&#xA;                            blkBounds = corners[1].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x - (bounds.width-entity.getCurrentSprite().getOffsetX())-1);&#xD;&#xA;                    }&#xD;&#xA;                } else {&#xD;&#xA;                    if(corners[0].isSolid() || corners[2].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                        if(corners[0].isSolid()) {&#xD;&#xA;                            blkBounds = corners[0].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.setPositionX(blkBounds.x + blkBounds.width + (bounds.width/2));&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                bounds = new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height+1);&#xD;&#xA;                corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;                //moving down&#xD;&#xA;                if(dir.y &gt; 0) {&#xD;&#xA;                    if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                        Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                        if(corners[2].isSolid()) {&#xD;&#xA;                            blkBounds = corners[2].getBounds();&#xD;&#xA;                        } else {&#xD;&#xA;                            blkBounds = corners[3].getBounds();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        entity.landed();&#xD;&#xA;                        System.out.println(&quot;landed&quot;);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="27398" PostHistoryTypeId="2" PostId="12490" RevisionGUID="a9a15830-51a3-4041-b508-17b3dad810fb" CreationDate="2011-05-19T14:19:44.933" UserId="3081" Text="Use `GraphicsDevice.Viewport` to set the current viewport, which is effectively a canvas with its own coordinate space (i.e. `SpriteBatch.Draw()` will use the viewport's coordinates).&#xD;&#xA;&#xD;&#xA;The viewport is defined in terms of window coordinates, so in order to have a recursive solution you'll need a class which keeps track of the translation of its own coordinate space to the window coordinates.&#xD;&#xA;&#xD;&#xA;Something like the following:&#xD;&#xA;&#xD;&#xA;    Class CustomWindow&#xD;&#xA;    {&#xD;&#xA;      CustomWindow mParent;&#xD;&#xA;      int mX, mY, mWidth, mHeight; // Relative to the parent window&#xD;&#xA;      Viewport mViewport; // Must be absolute coordinates, relative to the main window.&#xD;&#xA;      void OnCustomWindowMoved()&#xD;&#xA;      {&#xD;&#xA;        mViewport.Width = mWidth;&#xD;&#xA;        mViewport.Height = mHeight;&#xD;&#xA;        if (mParent == null)&#xD;&#xA;        {&#xD;&#xA;          mViewport.X = mX;&#xD;&#xA;          mViewport.Y = mY;&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;          mViewport.X = (mParent.mViewport.X + mX);&#xD;&#xA;          mViewport.Y = (mParent.mViewport.Y + mY);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;      " />
  <row Id="27399" PostHistoryTypeId="2" PostId="12491" RevisionGUID="cf69df3f-1d19-4f7e-a4b6-0a41295bfc4f" CreationDate="2011-05-19T14:37:19.890" UserId="7478" Text="I have been experimenting with away3D for a week or two now and I have a problem now. I have been searching for a way of implementing physics in my application by using the jiglib library. &#xD;&#xA;&#xD;&#xA;I basically have two cubes that rotate around a central pivotpoint. When they hit, they should stop rotating. Since jiglib is poorly documented (according to me anyhow) I wanted to ask here if anyone could provide me with an example (with source code) of how to implement physics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The cubes have some properties i need, so i tried extending the Away3DPhysics class to create cubes, but that won't work. When i update the position of the rigidBodies, the visual cubes won't update. code can be found below.&#xD;&#xA;&#xD;&#xA;    override public function createCube(initObject:Object):RigidBody&#xD;&#xA;	{&#xD;&#xA;		var _container:ObjectContainer3D = initObject.container as ObjectContainer3D;&#xD;&#xA;		var w:Number = (initObject.hasOwnProperty(&quot;width&quot;)) ? initObject[&quot;width&quot;] : 50;&#xD;&#xA;		var d:Number = (initObject.hasOwnProperty(&quot;depth&quot;)) ? initObject[&quot;depth&quot;] : 0;&#xD;&#xA;		var h:Number = (initObject.hasOwnProperty(&quot;height&quot;)) ? initObject[&quot;height&quot;] : 100;&#xD;&#xA;		var _material:String = (initObject.hasOwnProperty(&quot;material&quot;)) ? initObject[&quot;material&quot;] : Chili3DMaterial.regular_paper;&#xD;&#xA;			&#xD;&#xA;		var _face:Chili3DPanel = new Chili3DPanel(_material);&#xD;&#xA;		_face.width = initObject.width;&#xD;&#xA;		_face.height = initObject.height;&#xD;&#xA;		_face.rotationX = initObject.rotationX;&#xD;&#xA;		_face.rotationY = initObject.rotationY;&#xD;&#xA;		_face.cubeMaterials.front = initObject.front;&#xD;&#xA;		_face.cubeMaterials.back = initObject.back;&#xD;&#xA;		_container.addChild(_face);&#xD;&#xA;		&#xD;&#xA;		var jbox:JBox = new JBox(new Away3dMesh(_face), w, d, h);&#xD;&#xA;		addBody(jbox);&#xD;&#xA;		&#xD;&#xA;		return jbox;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;The next idea was to convert the cubes in runtime when they had to be tested, but this won't work either. The rigidbodies that are created don't inherit the x, y, z or rotation properties of the cubes.&#xD;&#xA;&#xD;&#xA;    var _m1:Away3dMesh = new Away3dMesh(_targetCube);&#xD;&#xA;	var _rb1:RigidBody = new RigidBody(_m1);&#xD;&#xA;	&#xD;&#xA;	var _collider:Chili3DPanel;&#xD;&#xA;	var _m2:Away3dMesh;&#xD;&#xA;	var _rb2:RigidBody;&#xD;&#xA;	_physics.step();&#xD;&#xA;	&#xD;&#xA;	//Now we check if folding is allowed.&#xD;&#xA;	for(var i:uint = 0; i &lt; _3DContent.children.length; i++)&#xD;&#xA;	{&#xD;&#xA;		_collider = _3DContent.children[i] as Chili3DPanel;&#xD;&#xA;		_m2 = new Away3dMesh(_collider);&#xD;&#xA;		_rb2 = new RigidBody(_m2);&#xD;&#xA;		_rb1.enableCollisions(_rb2);&#xD;&#xA;		&#xD;&#xA;		if(_targetCube != _collider &amp;&amp; _rb1.collisions.length != 0)&#xD;&#xA;		{&#xD;&#xA;			_foldAllowed = false;&#xD;&#xA;			break;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;this is about it i guess. Any idea is welcome!" />
  <row Id="27400" PostHistoryTypeId="1" PostId="12491" RevisionGUID="cf69df3f-1d19-4f7e-a4b6-0a41295bfc4f" CreationDate="2011-05-19T14:37:19.890" UserId="7478" Text="Problem implementing physics in away3D using jiglib." />
  <row Id="27401" PostHistoryTypeId="3" PostId="12491" RevisionGUID="cf69df3f-1d19-4f7e-a4b6-0a41295bfc4f" CreationDate="2011-05-19T14:37:19.890" UserId="7478" Text="&lt;3d&gt;&lt;flash&gt;&lt;physics&gt;&lt;actionscript-3&gt;" />
  <row Id="27402" PostHistoryTypeId="4" PostId="12485" RevisionGUID="67d186e1-01b8-4c63-bcfc-2aa5b4df5876" CreationDate="2011-05-19T14:48:31.680" UserId="4191" Comment="fix (fairly epic) typo in question" Text="What I need to do to integrate in game micro payments for virtual goods in desktop games?" />
  <row Id="27403" PostHistoryTypeId="24" PostId="12485" RevisionGUID="67d186e1-01b8-4c63-bcfc-2aa5b4df5876" CreationDate="2011-05-19T14:48:31.680" Comment="Proposed by 4191 approved by 51 edit id of 436" />
  <row Id="27404" PostHistoryTypeId="6" PostId="12485" RevisionGUID="89e0cfb8-230f-4599-92fe-7190220a403a" CreationDate="2011-05-19T14:50:53.730" UserId="51" Comment="edited tags" Text="&lt;monetization&gt;&lt;casual-games&gt;" />
  <row Id="27405" PostHistoryTypeId="2" PostId="12492" RevisionGUID="23bba648-66c6-4b5a-9a4a-38b06aabc97e" CreationDate="2011-05-19T14:58:03.543" UserId="1430" Text="I think you should just [write your game, and perhaps you'll end up with an engine later][1]. Writing the graphics engine (which is all it sounds like you're talking about) from scratch using nothing but OpenGL is likely only going to waste your time. It is a relatively well-solved problem so generally you'd only be changing the shape of the API without adding much in the way of significant new features relative to any other available third-party solution out there.&#xD;&#xA;&#xD;&#xA;If Cocos2D or some other graphics layer meets your requirements now, then use it. If your requirements change during development, you can swap out the rendering back end relatively easily -- if you truly believe you have the experience and wherewithal to create an engine yourself, you should certainly have what it takes to structure your game such that swapping out the rendering back end is a relatively trivial operation.&#xD;&#xA;&#xD;&#xA;Build your game, allow its specific needs to drive the feature set of the code you write, and write code with reusability and good architecture in mind. You will naturally end up with an &quot;engine&quot; after you finish a few projects like this, and you'll finish those projects faster because you're disallowing yourself from getting bogged down in framework-level feature creep.&#xD;&#xA;&#xD;&#xA;  [1]: http://scientificninja.com/blog/write-games-not-engines" />
  <row Id="27406" PostHistoryTypeId="5" PostId="12488" RevisionGUID="75868c97-c1f2-4f3b-9e2f-5a38a4ba3ca8" CreationDate="2011-05-19T15:05:05.020" UserId="1430" Comment="edited body" Text="I've been a software developer for 5 years now and wanting to get into iOS game development. I've played around with the iOS SDK for about 2 years now, attending cocoaheads meetings and feel I have a good grasp on objective-c/cocoa and even c/c++.&#xD;&#xA;&#xD;&#xA;I have a game idea and know that I will use Box2D but I'm wondering if I should use cocos2D or not. The main reasons are:&#xD;&#xA;&#xD;&#xA;1. I may want to do things graphics wise that aren't available in cocos2d.&#xD;&#xA;2. If I roll my own game engine I'll have more control. &#xD;&#xA;&#xD;&#xA;Of course the main reason for using a already existing game engine is the time it saves and it makes the hard stuff easier, but for someone who has the technical chops to roll his own does it make sense? " />
  <row Id="27407" PostHistoryTypeId="5" PostId="12450" RevisionGUID="33f8e894-aa5f-4aee-bf64-fd3d03bfd200" CreationDate="2011-05-19T15:06:07.863" UserId="1742" Comment="fixed the code directly" Text="The algorithm recursively adds a value, but the value can be positive or negative (normally +-1 / (2^octave) )&#xD;&#xA;&#xD;&#xA;If you start at zero and only add positive values, then you can only go up, and that is why you're seeing the vertices pulled down.&#xD;&#xA;&#xD;&#xA;try starting at 127 rather than zero for the four corners, and also try signed char (then checking your bounds both top and bottom)&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;so, two more things need to change in the main (64&gt;&gt;i) to get the half effect at each octave, and also your output function (the one that maps the final[][] tp the imgdta[], you just need to put in&#xD;&#xA;&#xD;&#xA;&gt; imgdta[(i * n) + j] = 128 + final[i][j];&#xD;&#xA;&#xD;&#xA;rather than the if else block.&#xD;&#xA;&#xD;&#xA;another thing, I'm not sure why, but your bounds check is failing (that's lines 38 and 65) if you remove the check totally, you notice some new dark blobs too, so i reckon you might need to promote to a larger type before doing the bounds check if you want the more noisy picture you get with &quot;64/i&quot;.&#xD;&#xA;&#xD;&#xA;ANOTHER EDIT&#xD;&#xA;&#xD;&#xA;just found out what it was, you're comparing against 'r', not 'rv', in the bounds check.&#xD;&#xA;Here's the fixed code:&#xD;&#xA;http://pastie.org/1927076&#xD;&#xA;" />
  <row Id="27408" PostHistoryTypeId="2" PostId="12493" RevisionGUID="f3daf8b6-8bae-460d-8bad-6540c879c57c" CreationDate="2011-05-19T15:08:18.300" UserId="51" Text="Most of the other posts will be &quot;make a game not an engine&quot;, but I'm going to assume that you have a particular game in mind you want to make and want to know when it's a good idea to start with somebody else's code base or start from scratch.&#xD;&#xA;&#xD;&#xA;**You shouldn't roll your own tech unless you *know* you need to roll your own**.  That may sound flippant but it's really the only correct answer.  As with most decisions, there are tradeoffs.  Only you can determine for your particular situation the cost/benefit analysis. &#xD;&#xA;&#xD;&#xA;You should have an understanding of the following things (this list is hardly all inclusive).&#xD;&#xA;&#xD;&#xA;* What middleware is already out there that you could use (&quot;engine&quot; or otherwise)&#xD;&#xA;* What that middleware brings to the table, feature wise. &#xD;&#xA;* How mature/proven the middleware is, especially if you care about multiplatform support&#xD;&#xA;* What kind of tools the middleware provides, or doesn't provide, to help speed up development (don't discount tools with your own tech)&#xD;&#xA;* What limitations that middleware has (as a simple example, Unity doesn't do real time shadows from dynamic lights on iOS)&#xD;&#xA;* What specific features your particular game *has to have*.&#xD;&#xA;* What your deadlines are, and how much time you will have to spend to get up to the point of where the middleware will get you vs. how much the middleware costs.&#xD;&#xA;* How extensible the middleware is (for example, you can get around the shadow problem on iOS in Unity by using blob shadows.  Or maybe projection shadows.)&#xD;&#xA;&#xD;&#xA;(Notice that I specifically didn't put &quot;more control&quot; up there.  That's a loaded phrase that could range from &quot;I don't like code I don't write&quot; to &quot;I need to be able to see, understand, and tweak all the variables in the physics engine to achieve this particular effect.&quot;   The first one isn't really a valid consideration, but the second is.)&#xD;&#xA;&#xD;&#xA;Personally, I find that rolling your own tech for a low-budget game is hardly ever worth the effort.  The amount of power you get the cheap engines these days is ridiculous.  You're not at a point where you're deciding on a multimillion dollar triple A engine license or not.  You're not going to be able to beat what, say, Unity offers to you for $3k.  Or Cocos2d for whatever it costs (isn't it free?).  &#xD;&#xA;&#xD;&#xA;Now, if your game is mostly focused around some kind of tech that other engines can't provide, or can't provide at a reasonable framerate, then it might be worth investigating what you can do.  That doesn't mean you throw out the other middelware entirely, though.  Just because you need your own, say, renderer, doesn't mean you can't use some other middleware for physics or sound or UI or what have you." />
  <row Id="27409" PostHistoryTypeId="25" PostId="12488" RevisionGUID="c4eb6657-1814-46ae-9842-7c7c999548a9" CreationDate="2011-05-19T15:12:24.833" Comment="http://twitter.com/#!/StackGameDev/status/71231739346948099" />
  <row Id="27410" PostHistoryTypeId="2" PostId="12494" RevisionGUID="eb520fdb-ea37-47d2-bfd6-6bb09f915eef" CreationDate="2011-05-19T15:32:10.237" UserId="6469" Text="If the company feels it will make you more productive and in turn that this enhanced productivity will recoup the cost in a reasonable amount of time they will buy you almost anything job related. " />
  <row Id="27411" PostHistoryTypeId="2" PostId="12495" RevisionGUID="3a4e4d89-0e97-4a3f-8152-f43284ca555f" CreationDate="2011-05-19T16:06:08.193" UserId="6813" Text="You should be able to implement Paypal payment using their SOAP API ( http://tinyurl.com/6k447de ) and any C++ SOAP library such as Apache Axis ( http://ws.apache.org/axis in C++/Java ) or gSOAP ( http://www.cs.fsu.edu/~engelen/soap.html in C/C++ ). Google Checkout doesn't seem to support SOAP at the moment through.&#xD;&#xA;&#xD;&#xA;However, I think that the easiest and comfortable way to implement in game payments is by adding an html layer into you game ( Qt Webkit is such an example: http://doc.qt.nokia.com/4.7/qtwebkit.html ) , and to develop an online item store on your website. Thus players can browse and buy items from inside our from outside your game using their account.&#xD;&#xA;&#xD;&#xA;Anyway you will have to connect your server to save the items bought by players, so they can delete/crash and reinstall their game without loosing what they paid for.&#xD;&#xA;&#xD;&#xA;Note: I never tried it myself, those are only hints to help you in your quest as nobody answered yet." />
  <row Id="27412" PostHistoryTypeId="5" PostId="12495" RevisionGUID="a97401e9-581b-47b1-9cc0-2cd8d3a89f1e" CreationDate="2011-05-19T17:07:02.627" UserId="6813" Comment="added 296 characters in body; added 41 characters in body; deleted 2 characters in body" Text="You should be able to implement Paypal payment using their SOAP API ( http://tinyurl.com/6k447de ) and any C++ SOAP library such as Apache Axis ( http://ws.apache.org/axis in C++/Java ) or gSOAP ( http://www.cs.fsu.edu/~engelen/soap.html in C/C++ ). Google Checkout doesn't seem to support SOAP at the moment through.&#xD;&#xA;&#xD;&#xA;However, I think that the easiest and comfortable way to implement in game payments is by adding an html layer into you game ( Qt Webkit is such an example: http://doc.qt.nokia.com/4.7/qtwebkit.html, and Awesomium: http://awesomium.com ) , and to develop an online item store on your website. Thus players can browse and buy items from inside and from outside your game using their account.&#xD;&#xA;&#xD;&#xA;Anyway you will have to connect your server to save the items bought by players, so they can delete/crash and reinstall their game without loosing what they paid for.&#xD;&#xA;&#xD;&#xA;Note: I never tried it myself, those are only hints to help you in your quest as nobody answered yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: I added Awesomium ( http://awesomium.com ) as example for html layer api. &quot;Awesomium, is the first full featured, windowless web-browser framework&quot;. It seems very interesting, powerful and clean. Furthermore it's Free for Indies companies (under $100k income last year)." />
  <row Id="27413" PostHistoryTypeId="5" PostId="12416" RevisionGUID="8212ff09-37f8-4186-a59e-8998c176a4ac" CreationDate="2011-05-19T18:05:08.117" UserId="7103" Comment="deleted 9 characters in body" Text="I am creating an application which downloads names from server. These names can be any  unicode language text which I need to render in XNA on WP7. The biggest problem I see here is WP7 xna system can't render unicode (especially complex script) well. I tried few asian scripts and it looks ridiculous. Some aisan scripts render a character differently depending on neighbor character (generally vowels). Spritefont just renders them one after another without giving any consideration to vowels.&#xD;&#xA;&#xD;&#xA;I think I need something like freetype library to render vector fonts on runtime. I wish to know if there are any alternatives to overcome this issue. " />
  <row Id="27414" PostHistoryTypeId="25" PostId="12449" RevisionGUID="382a12f1-4ddd-4f9f-bf34-5cfacb52bbef" CreationDate="2011-05-19T18:12:25.527" Comment="http://twitter.com/#!/StackGameDev/status/71277040703250432" />
  <row Id="27415" PostHistoryTypeId="5" PostId="12476" RevisionGUID="86eacdb8-9d1e-48fd-9454-f21bd6487d19" CreationDate="2011-05-19T18:13:39.473" UserId="14" Comment="deleted 16 characters in body" Text="What is the difference between the notion bonus and power-ups?&#xD;&#xA;&#xD;&#xA;I have in game some objects and the player that has ability to pick up some bonuses/power-ups that allow the player to explode all around or item that teleports the player form one place to another - is it all power-ups?" />
  <row Id="27416" PostHistoryTypeId="2" PostId="12496" RevisionGUID="91b7a639-5daf-4b4b-957d-de2794b03d6a" CreationDate="2011-05-19T18:27:11.687" UserId="6690" Text="This is a bit of a long shot, but can your game operate on DIV sprites with CSS transforms instead? I say this because I'm getting some wonderful performance with moving things around on iOS devices with CSS transforms and transitions.&#xD;&#xA;&#xD;&#xA;These appear to be properly hardware accelerated, with the bizarre caveat that you must use the 3D form for the transforms (i.e. translate3D, rather than translate) for the acceleration to kick in. It's really really buttery smooth, and the iOS browser implementation supports the form where you just set a 16 element float matrix directly, which is very convenient for me.&#xD;&#xA;&#xD;&#xA;I'm so impressed with how smooth it ends up being, that I've been meaning to try a simple game project written this way." />
  <row Id="27417" PostHistoryTypeId="2" PostId="12497" RevisionGUID="1664eb54-b813-46a7-bb1c-afff1b5a5cb9" CreationDate="2011-05-19T18:48:24.763" UserId="6728" Text="I have found out what I was doing wrong. &#xD;&#xA;&#xD;&#xA;The key lies in **when** you update the position. What i did wrong was that I did the 'change positions first and then check and adjust' method, and I had to do it in the order, check and then update.&#xD;&#xA;&#xD;&#xA;My previous code did the following:&#xD;&#xA;&#xD;&#xA;- update entities locations with velocity.&#xD;&#xA;- check for collisions and update the entities locations.&#xD;&#xA;&#xD;&#xA;This resulted in that after the player jumped, Mario's location was changed in the update method so that the collision box would be in the ground tiles. Then the collision method changed the X position to the x of the left bottom corner and then the y would move it to above the ground tile.&#xD;&#xA;This means that Mario get shifted back a few pixels every time the player would land from a jump.&#xD;&#xA;&#xD;&#xA;I have tried to swap the X and Y check methods, but then the problem just changes to something else (the wall hug).&#xD;&#xA;&#xD;&#xA;Now the solution, I have changed it to the following:&#xD;&#xA;&#xD;&#xA;- update entities velocity.&#xD;&#xA;- collision method&#xD;&#xA;   - try to place the entity on the X with the velocity, if failed, change it as best as posible.&#xD;&#xA;   - try to place the entity on the Y with the velocity, if failed, change it as best as posible.&#xD;&#xA;&#xD;&#xA;Now the X get checked/changed first and then the collision box is updated with the new entity location. Then the Y get checked/changed.&#xD;&#xA;&#xD;&#xA;This works like a charm :) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27418" PostHistoryTypeId="2" PostId="12498" RevisionGUID="28f1f73b-288f-4e2c-96f5-963254d73da1" CreationDate="2011-05-19T18:58:44.453" UserId="539" Text="While I have high hopes for Mono and the iPhone I would probably wait to adopt that platform for iPhone / Android development at the moment. Attachment, the company which currently owns MonoTouch, recently laid off the developers responsible for Mono. They are starting a new company and plan to create a second product in the same vein as and compatible with MonoTouch[1]. But things are obviously in flux, so investing in MonoTouch today may be unwise.&#xD;&#xA;&#xD;&#xA;1: http://tirania.org/blog/archive/2011/May-16.html" />
  <row Id="27419" PostHistoryTypeId="2" PostId="12499" RevisionGUID="71801671-2874-4527-8676-a63d11e237cf" CreationDate="2011-05-19T19:09:33.893" UserId="4586" Text="Further to the above, you're currently not deleting the memory that you're allocating. To remedy this, change line 104 from:&#xD;&#xA;&#xD;&#xA;    for (unsigned i = 1; i &lt; 6; ++i) final = mdp(final, n, 64 / i);&#xD;&#xA;&#xD;&#xA;to&#xD;&#xA;&#xD;&#xA;    for (unsigned i = 1; i &lt; 6; ++i) {&#xD;&#xA;      signed char** new_final = mdp(final, n, 64 / i);&#xD;&#xA;      for (unsigned i = 0; i &lt; n; ++i)&#xD;&#xA;        delete[] final[i];&#xD;&#xA;      delete[] final;&#xD;&#xA;      final = new_final;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and add this after writing out to the tga file:&#xD;&#xA;&#xD;&#xA;    for (unsigned i = 0; i &lt; n; ++i)&#xD;&#xA;      delete[] final[i];&#xD;&#xA;    delete[] final;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27420" PostHistoryTypeId="2" PostId="12500" RevisionGUID="e481cc17-ed66-4235-a79e-5f42d3f78781" CreationDate="2011-05-19T19:13:20.303" UserId="7482" Text="I'm at the planning stages for a facebook game, it will be similar to farmville, but will feature parks. I've been a Flash game dev for many years but all this database stuff is new to me so I'm having trouble getting my head around what's the best way to handle the data.&#xD;&#xA;&#xD;&#xA;I know I need a table for the players, so that's straightforward.&#xD;&#xA;&#xD;&#xA;Each player can grow crops/flowers and/or harvest trees etc that are already in the parks. The way I'm setting it up is that the parks are made up of 2 layers, or 2 2D arrays, the bottom array or ground tile array is just big tiles, and in a 8x8 grid, so that seems pretty straightforward as well, just store 16 entries for each part in a &quot;parks ground tile table&quot;, but first question about that. Those 16 entries would correspond to each park, so would I still use the auto increment on the ID, or some other kind of ID to represent them as a group somehow? I'm just thinking of what's the fastest way to grab those 16 from the database.&#xD;&#xA;&#xD;&#xA;Next onto the trickier stuff which is the 2nd layer of the park or the items/objects/crops 2d array. Each player has to have their own version of this 2D array, so first qusetion is how do I set that up in the database? I was thinking maybe having a &quot;park items array&quot; and then each feature (tree, crop) etc for each player would just be stored in that array, but I can see that getting huge really quick, so not sure how to do that? or if the size of that would be an issue?&#xD;&#xA;&#xD;&#xA;Then on top of that, each player can maintain multiple parks :p...again what would be the best database design to maintain all of those?&#xD;&#xA;&#xD;&#xA;Thanks for any help!" />
  <row Id="27421" PostHistoryTypeId="1" PostId="12500" RevisionGUID="e481cc17-ed66-4235-a79e-5f42d3f78781" CreationDate="2011-05-19T19:13:20.303" UserId="7482" Text="MySql Database design for Facebook game" />
  <row Id="27422" PostHistoryTypeId="3" PostId="12500" RevisionGUID="e481cc17-ed66-4235-a79e-5f42d3f78781" CreationDate="2011-05-19T19:13:20.303" UserId="7482" Text="&lt;game-design&gt;" />
  <row Id="27423" PostHistoryTypeId="2" PostId="12501" RevisionGUID="eb26433d-6513-4805-9ebd-8ec175d71751" CreationDate="2011-05-19T19:22:51.487" UserId="6937" Text="I would make a table called &quot;park_ground_state&quot; in that table, you would have:&#xD;&#xA;&#xD;&#xA; - park_ground_state_ID int auto-increment&#xD;&#xA; - state_data char[16] not nullable&#xD;&#xA; - player_ID int foreign key to the player table&#xD;&#xA;&#xD;&#xA;Since you probably don't need to query the park cells separately, you can just grab them all at the same time from a char array.&#xD;&#xA;&#xD;&#xA;It seems odd to some people to store separate entities in the same field, but in reality, the park state is a datastructure. In this case an array. You just want to grab the whole array at once and you never query on elements of the array from the database." />
  <row Id="27424" PostHistoryTypeId="2" PostId="12502" RevisionGUID="04d25c5a-4f3e-4436-95b1-173bd059d9dd" CreationDate="2011-05-19T19:34:05.490" UserId="4338" Text="What sort of design patterns and ideas might one use to build a somewhat general purpose card game framework? &#xD;&#xA;&#xD;&#xA;This stems from I made an attempt to build a clone of the popular Steve Jackson game &quot;Munchkin&quot;.  Because of the nature of that game I ended having to hard code so many card functionalities that the development became chaotic and over-bearing.  I had wanted to build something general but ended up with just to many classes with to many overridden functions and switch statements to determine behavior.&#xD;&#xA;&#xD;&#xA;I was curious what someone with more experience in design would handle such a task of building a general purpose card game framework, or at least something that could be extended.  Or is it best that if I want to make a simulation of a card game like Munchkin, i'm stuck making a specific framework.&#xD;&#xA;&#xD;&#xA;I would like to use C#." />
  <row Id="27425" PostHistoryTypeId="1" PostId="12502" RevisionGUID="04d25c5a-4f3e-4436-95b1-173bd059d9dd" CreationDate="2011-05-19T19:34:05.490" UserId="4338" Text="Developing a card game framework" />
  <row Id="27426" PostHistoryTypeId="3" PostId="12502" RevisionGUID="04d25c5a-4f3e-4436-95b1-173bd059d9dd" CreationDate="2011-05-19T19:34:05.490" UserId="4338" Text="&lt;game-design&gt;&lt;c#&gt;&lt;card-game&gt;" />
  <row Id="27427" PostHistoryTypeId="2" PostId="12503" RevisionGUID="09952e64-800f-44d0-9ffc-e15ad20f9a4a" CreationDate="2011-05-19T19:39:20.697" UserId="6813" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and report the cards particularities to some small and easily editable scripts." />
  <row Id="27428" PostHistoryTypeId="5" PostId="12503" RevisionGUID="065f6273-27af-496c-9b20-8a2a6509871a" CreationDate="2011-05-19T19:44:55.233" UserId="6813" Comment="added 25 characters in body; added 90 characters in body" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and keep the cards particularities away from the main code, into some small and easily editable scripts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Here is a LUA wrapper for C#: http://luaforge.net/projects/luainterface/" />
  <row Id="27429" PostHistoryTypeId="2" PostId="12504" RevisionGUID="d177dcf9-c7fb-4825-953e-8aa28b93b500" CreationDate="2011-05-19T20:04:20.727" UserId="3830" Text="I'd really suggest teaming up with someone who's got database experience and have them work this out with you.  If you're out to create a Facebook game, it's not just about data storage formats like you are talking about, but also how your database is designed for security, stability and performance.  &#xD;&#xA;&#xD;&#xA;The best thing you could have happen as a game developer is have a big success on your hands with lots of players.  The worst thing you can have happen as a game developer is a big success with lots of players, and a back-end system that's not designed to handle it." />
  <row Id="27430" PostHistoryTypeId="5" PostId="12503" RevisionGUID="40fcae2e-0279-47c8-8425-ff4a60a991e3" CreationDate="2011-05-19T20:04:48.313" UserId="6813" Comment="added 183 characters in body" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and keep the cards particularities away from the main code, into some small and easily editable scripts.&#xD;&#xA;&#xD;&#xA;The main advantage of script languages over XML or some other &quot;static&quot; data is that script languages can &quot;create&quot; their own behaviors using the public methods offered by the engine.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Here is a LUA wrapper for C#: http://luaforge.net/projects/luainterface/" />
  <row Id="27431" PostHistoryTypeId="5" PostId="12503" RevisionGUID="c0fe8e50-5042-4ec2-9bbb-c91e467a8874" CreationDate="2011-05-19T20:10:40.090" UserId="6813" Comment="added 837 characters in body; added 22 characters in body; added 117 characters in body; added 2 characters in body" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and keep the cards particularities away from the main code, into some small and easily editable scripts.&#xD;&#xA;&#xD;&#xA;The main advantage of script languages over XML or some other &quot;static&quot; data is that script languages can &quot;create&quot; their own behaviors using the public methods offered by the engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Example: suppose your engine offer the methods &quot;setDommage(target,dmg)&quot; and &quot;setVisualEffect(nameOfFxLuaScript)&quot; etc.&#xD;&#xA;You can have a card doing something like this peuso-code*&#xD;&#xA;&#xD;&#xA;    ------Card1 -- A simple fireball-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;    &#xD;&#xA;    ------Card2 -- A multitype ball (outch it hurts!)-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;&#xD;&#xA;    // Ice ball&#xD;&#xA;    if( player.protectionAgainstIce == false )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 102);&#xD;&#xA;        setVisualEffect(&quot;iceBall.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // thunderbolt&#xD;&#xA;    while( player.Alive )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 1005);&#xD;&#xA;        setVisualEffect(&quot;thunderBolt.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;**The both cards use the same engine methods**, *but they don't do the same things. The behaviors can also use data gathered from the engine (like the player list to loop over them) and for, if etc. statements.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Here is a LUA wrapper for C#: http://luaforge.net/projects/luainterface/" />
  <row Id="27432" PostHistoryTypeId="5" PostId="12504" RevisionGUID="fe0d1717-7200-4737-be5d-7957e96993e9" CreationDate="2011-05-19T20:12:34.747" UserId="3830" Comment="added 435 characters in body" Text="I'd really suggest teaming up with someone who's got database experience and have them work this out with you.  If you're out to create a Facebook game, it's not just about data storage formats like you are talking about, but also how your database is designed for security, stability and performance.  &#xD;&#xA;&#xD;&#xA;The best thing you could have happen as a game developer is have a big success on your hands with lots of players.  The worst thing you can have happen as a game developer is a big success with lots of players, and a back-end system that's not designed to handle it.&#xD;&#xA;&#xD;&#xA;Put it another way.  You don't need a MySQL database for your game, you need a system your game can communicate with *in a secure way* to get and set data values related to a game session.  This may or may not be via MySQL.  Your game *definitely* shouldn't be written to directly talk to the database, but rather go via a web services (or other) proxy that can authenticate all requests and handle them in an appropriate manner.  " />
  <row Id="27433" PostHistoryTypeId="5" PostId="12503" RevisionGUID="52dd1ff2-8d80-4b9d-bda1-84c47190aaeb" CreationDate="2011-05-19T20:17:48.637" UserId="6813" Comment="added 1 characters in body" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and keep the cards particularities away from the main code, into some small and easily editable scripts.&#xD;&#xA;&#xD;&#xA;The main advantage of script languages over XML or some other &quot;static&quot; data is that script languages can &quot;create&quot; their own behaviors using the public methods offered by the engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Example: suppose your engine offer the methods &quot;setDommage(target,dmg)&quot; and &quot;setVisualEffect(nameOfFxLuaScript)&quot; etc.&#xD;&#xA;You can have a cards doing something like this peuso-code*&#xD;&#xA;&#xD;&#xA;    ------Card1 -- A simple fireball-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;    &#xD;&#xA;    ------Card2 -- A multitype ball (outch it hurts!)-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;&#xD;&#xA;    // Ice ball&#xD;&#xA;    if( player.protectionAgainstIce == false )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 102);&#xD;&#xA;        setVisualEffect(&quot;iceBall.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // thunderbolt&#xD;&#xA;    while( player.Alive )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 1005);&#xD;&#xA;        setVisualEffect(&quot;thunderBolt.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;**The both cards use the same engine methods**, *but they don't do the same things. The behaviors can also use data gathered from the engine (like the player list to loop over them) and for, if etc. statements.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Here is a LUA wrapper for C#: http://luaforge.net/projects/luainterface/" />
  <row Id="27434" PostHistoryTypeId="2" PostId="12505" RevisionGUID="4f0baa70-412c-4f4c-b71b-216c9f234364" CreationDate="2011-05-19T20:21:03.303" UserId="7483" Text="I'm currently developing a 2D, top-down Windows Phone 7 game involving the surface of a pond.  I'm trying to make the surface feel like actual water (as opposed to just a blue background with sprites drawn on top of it), and one of the effects I'm looking into is a sort of aquatic distortion effect.  Basically, something similar to the first few seconds of this: http://youtu.be/1BpRsjF7QTM?t=3m17s&#xD;&#xA;&#xD;&#xA;Any idea on how to do this in XNA? I'm sure I could figure out how to apply the answer to my particular application, but if it helps, my game involves a lot of ripples and I'd like to specifically distort the areas around and just behind the expanding sprite-based ripples.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="27435" PostHistoryTypeId="1" PostId="12505" RevisionGUID="4f0baa70-412c-4f4c-b71b-216c9f234364" CreationDate="2011-05-19T20:21:03.303" UserId="7483" Text="XNA Aquatic Distortion Effect" />
  <row Id="27436" PostHistoryTypeId="3" PostId="12505" RevisionGUID="4f0baa70-412c-4f4c-b71b-216c9f234364" CreationDate="2011-05-19T20:21:03.303" UserId="7483" Text="&lt;xna&gt;&lt;c#&gt;&lt;effects&gt;" />
  <row Id="27437" PostHistoryTypeId="5" PostId="12503" RevisionGUID="ccc5ed8e-264c-4b2a-8b49-510603fdbcbc" CreationDate="2011-05-19T20:24:43.780" UserId="6813" Comment="added 239 characters in body" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and keep the cards particularities away from the main code, into some small and easily editable scripts.&#xD;&#xA;&#xD;&#xA;The main advantage of script languages over XML or some other &quot;static&quot; data is that script languages can &quot;create&quot; their own behaviors using the public methods offered by the engine.&#xD;&#xA;&#xD;&#xA;*Example: suppose your engine offer the methods &quot;setDommage(target,dmg)&quot; and &quot;setVisualEffect(nameOfFxLuaScript)&quot; etc.&#xD;&#xA;You can have a cards doing something like this peuso-code*&#xD;&#xA;&#xD;&#xA;    ------Card1 -- A simple fireball-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;    &#xD;&#xA;    ------Card2 -- A multitype ball (outch it hurts!)-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;&#xD;&#xA;    // Ice ball&#xD;&#xA;    if( player.protectionAgainstIce == false )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 102);&#xD;&#xA;        setVisualEffect(&quot;iceBall.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // thunderbolt&#xD;&#xA;    while( player.Alive )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 1005);&#xD;&#xA;        setVisualEffect(&quot;thunderBolt.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;**The both cards use the same engine methods**, *but they don't do the same things. The behaviors can also use data gathered from the engine (like the player list to loop over them) and for, if etc. statements.*&#xD;&#xA;&#xD;&#xA;The second but not the least advantage, is that it doesn't need to be compiled. You can modify you LUA script and reload it directly without recompiling your game. It's very nice for testing and iterating until you find the good settings. &#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Here is a LUA wrapper for C#: http://luaforge.net/projects/luainterface/" />
  <row Id="27438" PostHistoryTypeId="6" PostId="12502" RevisionGUID="e7269b7c-9db3-46d5-b44d-68c2b3e546d2" CreationDate="2011-05-19T20:26:35.417" UserId="1156" Comment="edited tags" Text="&lt;c#&gt;&lt;architecture&gt;&lt;card-game&gt;" />
  <row Id="27439" PostHistoryTypeId="5" PostId="12503" RevisionGUID="a378b907-3073-448a-abe6-e1c1e3f8e5c7" CreationDate="2011-05-19T20:34:05.647" UserId="6813" Comment="added 217 characters in body; added 82 characters in body; added 1 characters in body" Text="I would have used some kind of script language as LUA or Python to define each special behaviors or card.&#xD;&#xA;&#xD;&#xA;- http://www.lua.org/&#xD;&#xA;- http://www.python.org/&#xD;&#xA;&#xD;&#xA;This way you can define a &quot;generic&quot; engine, and keep the cards particularities away from the main code, into some small and easily editable scripts.&#xD;&#xA;&#xD;&#xA;The main advantage of script languages over XML or some other &quot;static&quot; data is that script languages can &quot;create&quot; their own behaviors using the public methods offered by the engine.&#xD;&#xA;&#xD;&#xA;*Example: suppose your engine offer the methods &quot;setDommage(target,dmg)&quot; and &quot;setVisualEffect(nameOfFxLuaScript)&quot; etc.&#xD;&#xA;You can have a cards doing something like this peuso-code*&#xD;&#xA;&#xD;&#xA;    ------Card1 -- A simple fireball-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;    &#xD;&#xA;    ------Card2 -- A multitype ball (outch it hurts!)-----&#xD;&#xA;    // Fire ball&#xD;&#xA;    setDommage(target, 37);&#xD;&#xA;    setVisualEffect(&quot;fireBall.lua&quot;);&#xD;&#xA;&#xD;&#xA;    // Ice ball&#xD;&#xA;    if( player.protectionAgainstIce == false )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 102);&#xD;&#xA;        setVisualEffect(&quot;iceBall.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // thunderbolt&#xD;&#xA;    while( player.Alive )&#xD;&#xA;    {&#xD;&#xA;        setDommage(target, 1005);&#xD;&#xA;        setVisualEffect(&quot;thunderBolt.lua&quot;);&#xD;&#xA;    }&#xD;&#xA;**The both cards use the same engine methods**, *but they don't do the same things. The behaviors can also use data gathered from the engine (like the player list to loop over them) and for, if etc. statements.*&#xD;&#xA;&#xD;&#xA;The second but not the least advantage, is that it doesn't need to be compiled. You can modify you LUA script and reload it directly without recompiling your game. It's very nice for testing and iterating until you find the good settings. &#xD;&#xA;&#xD;&#xA;The third advantage is that, anyone that can learn script language can create new cards/behaviors as long as you provide a list of the public methods shared by the engine (and as long as you don't encode the LUAs). And as anyone knows, the community is incredible when you give them nice tools ;)&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Here is a LUA wrapper for C#: http://luaforge.net/projects/luainterface/" />
  <row Id="27440" PostHistoryTypeId="6" PostId="12500" RevisionGUID="4643b2c8-6880-4035-a892-9d27b2137641" CreationDate="2011-05-19T20:45:32.087" UserId="6937" Comment="edited tags" Text="&lt;game-design&gt;&lt;facebook&gt;&lt;data-structure&gt;&lt;casual-games&gt;" />
  <row Id="27441" PostHistoryTypeId="6" PostId="12500" RevisionGUID="0e28a0fb-e337-41ca-85e1-b24a6cb9793a" CreationDate="2011-05-19T20:46:10.323" UserId="6937" Comment="edited tags" Text="&lt;game-design&gt;&lt;data-structure&gt;&lt;casual-games&gt;&lt;databases&gt;" />
  <row Id="27442" PostHistoryTypeId="5" PostId="12449" RevisionGUID="fec04d1d-e091-4921-ab53-acdb72f571b9" CreationDate="2011-05-19T21:02:06.587" UserId="4513" Comment="added 196 characters in body; added 72 characters in body" Text="![MDP][1]![MDP][2]&#xD;&#xA;&#xD;&#xA;This question has come mainly out of **sheer desperation**, after spending several hours trying to figure out the problem.&#xD;&#xA;&#xD;&#xA;If you cast your eyes to the picture above, you should see that my midpoint displacement algorithm algorithm is working (somewhat) successfully; in producing a somewhat coherent noise pattern.&#xD;&#xA;&#xD;&#xA;However, it is leaving behind a black dotted grid on the image, and I have no idea why. I can foresee this being an issue in the math, but I just cannot see it; nor was this pointed out in any online resources as a possible issue; so any help will be appreciated as to hunting down this bug.&#xD;&#xA;&#xD;&#xA;    unsigned char** mdp(unsigned char** base, unsigned base_n, unsigned char r) {&#xD;&#xA;    	size_t n = (2 * base_n) - 1;&#xD;&#xA;    &#xD;&#xA;    	unsigned char** map = new unsigned char*[n];&#xD;&#xA;    	for (unsigned i = 0; i &lt; n; ++i) map[i] = new unsigned char[n];&#xD;&#xA;    &#xD;&#xA;    	// Resize&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	for (size_t i = 0; i &lt; n; i += 2) {&#xD;&#xA;    		for (size_t j = !(i % 2 == 0); j &lt; n; j += 2) {&#xD;&#xA;    			map[i][j] = base[i / 2][j / 2];&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Diamond algorithm&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	// 0 X 0&#xD;&#xA;    	// 0 0 0&#xD;&#xA;    	for (size_t i = 1; i &lt; n; i += 2) {&#xD;&#xA;    		for (size_t j = 1; j &lt; n; j += 2) {&#xD;&#xA;    			unsigned char&amp; map_ij = map[i][j];&#xD;&#xA;    &#xD;&#xA;    			unsigned char a = map[i - 1][j - 1];&#xD;&#xA;    			unsigned char b = map[i - 1][j + 1];&#xD;&#xA;    			unsigned char c = map[i + 1][j - 1];&#xD;&#xA;    			unsigned char d = map[i + 1][j + 1];&#xD;&#xA;    			map_ij = (a + b + c + d) / 4;&#xD;&#xA;    &#xD;&#xA;    			unsigned char rv = std::rand() % r;&#xD;&#xA;    			if (map_ij + r &lt; 255) map_ij += rv;&#xD;&#xA;    			else map_ij = 255;&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Square algorithm&#xD;&#xA;    	// 0 1 0&#xD;&#xA;    	// 1 0 1&#xD;&#xA;    	// 0 1 0&#xD;&#xA;    	for (size_t i = 0; i &lt; n; ++i) {&#xD;&#xA;    		for (size_t j = (i % 2 == 0); j &lt; n; j += 2) {&#xD;&#xA;    			unsigned char&amp; map_ij = map[i][j];&#xD;&#xA;    &#xD;&#xA;    			// get surrounding values&#xD;&#xA;    			unsigned char a = 0, b = a, c = a, d = a;&#xD;&#xA;    			if (i != 0) a = map[i - 1][j];&#xD;&#xA;    			if (j != 0) b = map[i][j - 1];&#xD;&#xA;    			if (j + 1 != n) c = map[i][j + 1];&#xD;&#xA;    			if (i + 1 != n) d = map[i + 1][j];&#xD;&#xA;    &#xD;&#xA;    			// average calculation&#xD;&#xA;    			if (i == 0) map_ij = (b + c + d) / 3;&#xD;&#xA;    			else if (j == 0) map_ij = (a + c + d) / 3;&#xD;&#xA;    			else if (j + 1 == n) map_ij = (a + b + d) / 3;&#xD;&#xA;    			else if (i + 1 == n) map_ij = (a + b + c) / 3;&#xD;&#xA;    			else map_ij = (a + b + c + d) / 4;&#xD;&#xA;    &#xD;&#xA;    			unsigned char rv = std::rand() % r;&#xD;&#xA;    			if (map_ij + r &lt; 255) map_ij += rv;&#xD;&#xA;    			else map_ij = 255;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	return map;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have any tips or resources other than http://www.gameprogrammer.com/fractal.html and http://www.lighthouse3d.com/opengl/terrain/index.php?mpd2 for fractal based terrain generation, I would appreciate them as comments also.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;![MDP][3]&#xD;&#xA;&#xD;&#xA;This is the new image, as per Fabians suggestion (ty), however it still has some strange quirks, which you should be able to see straight away (small 'dimples' everywhere).&#xD;&#xA;&#xD;&#xA;What could be causing this strange behavior? Updated source code: http://www.pastie.org/1924223&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;Many thanks to Fabian in finding the bounds check error, for those interested, here is the current solution as 512x512 png. And current source code (modified by Fabian) http://pastie.org/1927076.&#xD;&#xA;![MDP][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/akI5K.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/dWKVu.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/BMo7g.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/2RsOk.jpg" />
  <row Id="27443" PostHistoryTypeId="5" PostId="12502" RevisionGUID="7ef58947-9157-43c1-9af6-2c6bfc13ed74" CreationDate="2011-05-19T21:03:45.027" UserId="4338" Comment="added 764 characters in body" Text="What sort of design patterns and ideas might one use to build a somewhat general purpose card game framework? &#xD;&#xA;&#xD;&#xA;This stems from I made an attempt to build a clone of the popular Steve Jackson game &quot;Munchkin&quot;.  Because of the nature of that game I ended having to hard code so many card functionalities that the development became chaotic and over-bearing.  I had wanted to build something general but ended up with just to many classes with to many overridden functions and switch statements to determine behavior.&#xD;&#xA;&#xD;&#xA;I was curious what someone with more experience in design would handle such a task of building a general purpose card game framework, or at least something that could be extended.  Or is it best that if I want to make a simulation of a card game like Munchkin, i'm stuck making a specific framework.&#xD;&#xA;&#xD;&#xA;I would like to use C#.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I would like to clarify somewhat of what i'd eventually like to achieve.  I'd like a framework where I can basically implement phases with custom functionality (phase 1: draw cards, phase 2: apply upkeep rules, phase 3: play cards, phase 4: resolve, etc).&#xD;&#xA;&#xD;&#xA;I think then defining a ruleset would be wise which would be coupled with both the cards and the phases.&#xD;&#xA;&#xD;&#xA;Then, the cards would be defined and I suppose tied to the rules so for instance a rule might be &quot;During upkeep phase, lose 1 token&quot;.  However, a card that the player has might provide &quot;Don't lose any tokens during the upkeep phase&quot;.  So it would be nice to be able to tie this together but within the guts of the framework.&#xD;&#xA;&#xD;&#xA;I suppose this might be way out of my league as well." />
  <row Id="27444" PostHistoryTypeId="25" PostId="12505" RevisionGUID="cc033f58-de8f-4ef9-808b-328995d472cd" CreationDate="2011-05-19T21:12:25.927" Comment="http://twitter.com/#!/StackGameDev/status/71322340788678656" />
  <row Id="27445" PostHistoryTypeId="5" PostId="11734" RevisionGUID="f0145c2e-0c02-4309-bd06-1ed5ac409f22" CreationDate="2011-05-19T22:24:07.110" UserId="3056" Comment="added 259 characters in body" Text="I found a good [GDC presentation][1] on how they did it in Halo Reach.&#xD;&#xA;&#xD;&#xA;EDIT: Found another method, for upsampling in 1 pass without redrawing the effects. It uses [Bilateral Upsampling][2], but that one upsampling pass is apparently very expensive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdcvault.com/play/1014348/HALO-REACH-Effects&#xD;&#xA;  [2]: http://developer.amd.com/gpu_assets/ShopfMixedResolutionRendering.pdf" />
  <row Id="27446" PostHistoryTypeId="5" PostId="11734" RevisionGUID="f132289b-f662-470a-b3c8-066d4e427d6c" CreationDate="2011-05-19T22:52:17.300" UserId="3056" Comment="added 287 characters in body" Text="I found a good [GDC presentation][1] on how they did it in Halo Reach.&#xD;&#xA;&#xD;&#xA;EDIT: Found another method, for upsampling in 1 pass without redrawing the effects. It uses [Bilateral Upsampling][2], but that one upsampling pass is apparently very expensive.&#xD;&#xA;&#xD;&#xA;And yet another method: [Nearest-Depth Upsampling][3]. This one looks more promising, faster than Bilateral Upsampling, and it claims it was actually used in Batman: Arkham Asylum.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdcvault.com/play/1014348/HALO-REACH-Effects&#xD;&#xA;  [2]: http://developer.amd.com/gpu_assets/ShopfMixedResolutionRendering.pdf&#xD;&#xA;  [3]: http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/OpacityMappingSDKWhitePaper.pdf" />
  <row Id="27447" PostHistoryTypeId="25" PostId="12502" RevisionGUID="e3fd8d6d-c028-413a-b903-83b28ec70686" CreationDate="2011-05-20T00:12:26.000" Comment="http://twitter.com/#!/StackGameDev/status/71367639712284673" />
  <row Id="27448" PostHistoryTypeId="2" PostId="12506" RevisionGUID="da7e7429-4dcb-4e4a-9e62-0c451b056461" CreationDate="2011-05-20T02:27:54.033" UserId="6985" Text="I'm working on a 2D iPhone game using Corona (Trial version, so I can't use their forums). The game involves the character falling through the sky, and I'm trying to implement a &quot;double jump&quot; for the character, for him to be able jump up while falling. I'm using Corona's physics library to have the character fall, and so far the best method of having him jump is using the vertical impulse method&#xD;&#xA;&#xD;&#xA;    object:applyLinearImpulse(0, -0.4, object.x, object.y)&#xD;&#xA;&#xD;&#xA;The problem I face is that when the character is just starting out (vertical velocity is low), he jumps really high, and when he's been falling for a while (vertical velocity is high), the jump is negligible. I'm guessing that the best solution is to use some sort of equation with the velocity as input to make the jump the same regardless of velocity, but I can't figure out what that equation would be.&#xD;&#xA;&#xD;&#xA;Okay, so that's all my thoughts. The end question is, how exactly do you implement a double jump with physics? Is there a proper equation for my problem? Should I take a different approach? It's been done before in games like Smash Bros, so there's a repeatable solution, right?" />
  <row Id="27449" PostHistoryTypeId="1" PostId="12506" RevisionGUID="da7e7429-4dcb-4e4a-9e62-0c451b056461" CreationDate="2011-05-20T02:27:54.033" UserId="6985" Text="Correctly Implementing a &quot;Double Jump&quot;" />
  <row Id="27450" PostHistoryTypeId="3" PostId="12506" RevisionGUID="da7e7429-4dcb-4e4a-9e62-0c451b056461" CreationDate="2011-05-20T02:27:54.033" UserId="6985" Text="&lt;2d&gt;&lt;physics&gt;" />
  <row Id="27451" PostHistoryTypeId="25" PostId="12506" RevisionGUID="1f8d414e-730b-45c6-a8cd-404dbfb84a16" CreationDate="2011-05-20T03:12:26.117" Comment="http://twitter.com/#!/StackGameDev/status/71412938518429696" />
  <row Id="27452" PostHistoryTypeId="2" PostId="12507" RevisionGUID="d4712aa2-a0dc-4d65-b065-d8beeef99748" CreationDate="2011-05-20T03:16:49.293" UserId="1163" Text="Just set the vertical velocity to zero, and just call the same code you use to do the first jump." />
  <row Id="27453" PostHistoryTypeId="2" PostId="12508" RevisionGUID="c532b9bf-cc8f-4a1f-8970-4958a8d9ffcb" CreationDate="2011-05-20T03:17:05.147" UserId="288" Text="Render your scene to a render target.&#xD;&#xA;&#xD;&#xA;Render your render target to the screen on a procedurally-generated full-screen mesh with animated vertices or texture coordinates." />
  <row Id="27454" PostHistoryTypeId="2" PostId="12509" RevisionGUID="60bf7f03-585e-4335-aa3d-65f65c1190f0" CreationDate="2011-05-20T04:16:16.980" UserId="5119" Text="Currently i'm working on a sprite system which will have frames which make animations.&#xD;&#xA;&#xD;&#xA;Usually a sprite contains current position, current frame number to be displayed in the running animation, etc... This is what I mean is STATE.&#xD;&#xA;&#xD;&#xA;Let's say there are 100 NPC characters in a game which will have different animations running at any time.If we are maintaining the state in Sprite class, we usually create 100 sprites and draw it as each sprite has its own state.&#xD;&#xA;&#xD;&#xA;But I feel the same thing can be done like this,&#xD;&#xA;             Imagine, position and animation state is separated from the Sprite class.When ever we want to draw we will just set it and draw the frame at certain position.With this approach there is no need to have 100 sprite  instances.We can make the exact above situation with one single sprite instance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For me I feel separating the &quot;state&quot; kills encapsulation.But at the same time it will have a benefit in terms of huge memory!&#xD;&#xA;&#xD;&#xA;Please give your Pros/Cons on this kind of approach?" />
  <row Id="27455" PostHistoryTypeId="1" PostId="12509" RevisionGUID="60bf7f03-585e-4335-aa3d-65f65c1190f0" CreationDate="2011-05-20T04:16:16.980" UserId="5119" Text="How optimal do you think maintianing states in a sprite class?" />
  <row Id="27456" PostHistoryTypeId="3" PostId="12509" RevisionGUID="60bf7f03-585e-4335-aa3d-65f65c1190f0" CreationDate="2011-05-20T04:16:16.980" UserId="5119" Text="&lt;sprites&gt;&lt;design-patterns&gt;" />
  <row Id="27457" PostHistoryTypeId="2" PostId="12510" RevisionGUID="98353610-d596-46dc-b209-31f5c69690ed" CreationDate="2011-05-20T06:03:49.197" UserId="20" Text="I assume all your classes use a pointer to the sprite-sheet/texture, so that the actual sprite-bitmap-data takes up memory space just once.&#xD;&#xA;&#xD;&#xA;Assuming this, it really isn't going to help you much (concerning memory usage) to have the `NPC` and the `Sprite` class separated. Although I think separating the two can still be a good idea if you look at it the following way:&#xD;&#xA;&#xD;&#xA;`Sprite` or `SpriteSheet` class: &#xD;&#xA;&#xD;&#xA; - is a helper class that will be initiated with a pointer to the sprite-sheet data and the desired frame-size&#xD;&#xA; - allows definition of &quot;animations&quot; which are basically collections of frames (or UV coordinates)&#xD;&#xA; - handles playback/looping of animations &#xD;&#xA; - doesn't know anything about game states &#xD;&#xA;&#xD;&#xA;`NPC` class&#xD;&#xA;&#xD;&#xA; - depending on your design, this could either be a subclass of `Sprite` or hold a pointer to a `Sprite` instance (I would choose the latter).&#xD;&#xA; - implements the NPC behavior&#xD;&#xA; - will trigger/play animations depending on state (utilizing a `Sprite` instance)&#xD;&#xA;&#xD;&#xA;I think this is quite the opposite of &quot;killing&quot; encapsulation.&#xD;&#xA;So in summary: I would recommend to separate your classes, but not because of memory-concerns..." />
  <row Id="27458" PostHistoryTypeId="25" PostId="12509" RevisionGUID="1aa37b78-b3da-4513-8b80-00763b0ee45b" CreationDate="2011-05-20T06:12:26.407" Comment="http://twitter.com/#!/StackGameDev/status/71458238197006336" />
  <row Id="27459" PostHistoryTypeId="2" PostId="12511" RevisionGUID="2f0b4315-f740-433f-8f77-846004721b0f" CreationDate="2011-05-20T06:14:48.860" UserId="7453" Text="You are correct. We do the same type of thing in our engine. There is a sprite object that can organize your images into pages (texture file) and groups. A group has frames of animation taken from the texture from a grid or if you want to pack more data into the optimal space, you can specify the sprite via a rect. There is an entity object which is made from a sprite group and they exist as instances in the game world having position and size. This allows for efficient management of objects for your game. Multiple entities can efficiently use the one sprite object." />
  <row Id="27460" PostHistoryTypeId="2" PostId="12512" RevisionGUID="c8e6cd5f-5c38-47b5-857c-e947eb32d953" CreationDate="2011-05-20T06:16:40.373" UserId="2710" Text="As always, architecture depends on your requirements. How many mobs are you going to have? How complex is their AI? What does it react to? How often does it change its state?&#xD;&#xA;Answer these questions, and you'll have a much better understanding of what you want and how to get that.&#xD;&#xA;&#xD;&#xA;Generally, you'd want to have at least some kind of event system. AI is usually defined in terms of events: &quot;When A happens, do B&quot;; and if you don't have events in actual code, you'd have to somehow translate these definitions.&#xD;&#xA;&#xD;&#xA;In my experience, you can get away with a simple loop implementation when you have few and really simple mobs (contrary to what the other answer seems to suggest). For example, in our current game we have hundreds of small instances with each having 10 mobs at most. And these mobs are dead-stupid; AI of 99% of them can be described in one sentence: &quot;Am I attacking anyone? If not, attack closest player.&quot; In this case a simple loop is more than enough - twice a second we check for a new target (and a few other things for the rare &quot;smart&quot; mobs), and that does it.&#xD;&#xA;&#xD;&#xA;However, when you have more and/or smarter mobs, naive approach stops working. For AI to react to some stimulus, you'd have to write code that detects it inside your AI loop. For example: suppose your mob should do something &quot;when hit by a player&quot;. With a loop approach, there's no easy way to determine the mob was hit. When the AI is running, you can check that mob's health diminished since last tick, or that the mob is currently targeted by someone. But you cannot detect actual hits without resorting to hacks, like saving each hit info somewhere for AI to access it later.&#xD;&#xA;&#xD;&#xA;Secondly, a naive loop always runs, no matter what happens. When you have lots of mobs, you want the AI to run as fast as possible.. and the fastest code is the code that never runs at all. If you have mobs that are not active, you want them to not run AI, or only run it sporadically (as in, wandering mob AI should only run when it decides where to go next).&#xD;&#xA;&#xD;&#xA;With event-based approach, you can have you other subsystems send AI events whenever convenient, eliminating problem of &quot;detecting hits&quot;. Of course, some events would still require detecting code: most notorious example is the &quot;approach&quot; event. And when you don't run your AI routine in a loop when nothing happens, you gain performance.&#xD;&#xA;&#xD;&#xA;You can also use a hybrid approach. Instead of handling AI events immediately, you can stuff them into some kind of queue. Then, when AI routine runs (in a loop), it removes events from this queue and handles them one by one. With this architecture, AI performance might be a bit slower, but it is more predictable; also, you can guarantee that all AI runs on a single thread (which might be tricky otherwise). This kind of loop can also be easily throttled by skipping some events (for example, each AI iteration only handles three most recent events, discarding the rest). Or events might be prioritized, and less-important ones discarded if AI is found to be lagging.&#xD;&#xA;&#xD;&#xA;Overall, the &quot;loop with events queue&quot; approach is probably the most flexible. But I want to reiterate: don't just choose it blindly as &quot;the best&quot;. Think about your requirements first, and some simpler approach may turn out to be better." />
  <row Id="27461" PostHistoryTypeId="2" PostId="12513" RevisionGUID="8a12d5ed-348e-4fc9-9ef0-1ae1ed4b4c38" CreationDate="2011-05-20T06:23:14.843" UserId="20" Text="I would probably design it like this (you can add more fields where required..):&#xD;&#xA;&#xD;&#xA;`Player`&#xD;&#xA;&#xD;&#xA; - *PlayerID*&#xD;&#xA; - Nickname &#xD;&#xA;&#xD;&#xA;`Park`&#xD;&#xA;&#xD;&#xA; - *ParkID*&#xD;&#xA; - *PlayerID* (Foreign Key)&#xD;&#xA; - Name&#xD;&#xA;&#xD;&#xA;`ParkObject`&#xD;&#xA;&#xD;&#xA; - *ObjectID*&#xD;&#xA; - Flash Class identifier&#xD;&#xA;&#xD;&#xA;`GroundLayer` is a many-many relation table between `Park` and `ParkObject`&#xD;&#xA;&#xD;&#xA; - *ParkID* (Foreign Key)&#xD;&#xA; - *ObjectID* (Foreign Key)&#xD;&#xA;&#xD;&#xA;`UpperLayer` again, a many-many relation between `Park` and `ParkObject`&#xD;&#xA;&#xD;&#xA; - *ParkID* (Foreign Key)&#xD;&#xA; - *ObjectID* (Foreign Key)&#xD;&#xA;&#xD;&#xA;Depending on your way to store data, you might have to add a *position* field to the `GroundLayer` and `UpperLayer` relation tables to specify the index/position of a tile inside the 2D array." />
  <row Id="27462" PostHistoryTypeId="5" PostId="12513" RevisionGUID="b5a3a778-c252-4be4-bfc7-8b177b3aa982" CreationDate="2011-05-20T06:41:05.030" UserId="20" Comment="clarification added" Text="I would probably design it like this (you can add more fields where required..):&#xD;&#xA;&#xD;&#xA;`Player`&#xD;&#xA;&#xD;&#xA; - *PlayerID*&#xD;&#xA; - Nickname &#xD;&#xA;&#xD;&#xA;`Park`&#xD;&#xA;&#xD;&#xA; - *ParkID*&#xD;&#xA; - *PlayerID* (Foreign Key)&#xD;&#xA; - Name&#xD;&#xA;&#xD;&#xA;`ParkObject`&#xD;&#xA;&#xD;&#xA; - *ObjectID*&#xD;&#xA; - Flash Class identifier&#xD;&#xA;&#xD;&#xA;`GroundLayer` is a many-many relation table between `Park` and `ParkObject`&#xD;&#xA;&#xD;&#xA; - *ParkID* (Foreign Key)&#xD;&#xA; - *ObjectID* (Foreign Key)&#xD;&#xA; - Index (position in the array)&#xD;&#xA;&#xD;&#xA;`UpperLayer` again, a many-many relation between `Park` and `ParkObject`&#xD;&#xA;&#xD;&#xA; - *ParkID* (Foreign Key)&#xD;&#xA; - *ObjectID* (Foreign Key)&#xD;&#xA; - Index (position in the array)&#xD;&#xA;&#xD;&#xA;**Edit:** Edited in the index/position for `GroundLayer` and `UpperLayer` (this is to determine the location of the tile in the 2D array)" />
  <row Id="27463" PostHistoryTypeId="2" PostId="12514" RevisionGUID="a3172ed5-136a-45d1-8c0c-ef6e1a3058e9" CreationDate="2011-05-20T06:45:51.320" UserId="7488" Text="http://blenderartists.org/forum/showthread.php?96131-Tutorial-Creating-Skybox-Textures-*Template-Included!*&#xD;&#xA;&#xD;&#xA;This tutorial might seem useful" />
  <row Id="27464" PostHistoryTypeId="2" PostId="12515" RevisionGUID="7caec096-dc33-4cdb-8715-bd106b0fabbe" CreationDate="2011-05-20T08:07:09.810" UserId="1868" Text="In case of line drawing, combine as many lineTo commands before calling stroke.&#xD;&#xA;&#xD;&#xA;This and some other tips:&#xD;&#xA;http://dt.deviantart.com/blog/38471599/" />
  <row Id="27465" PostHistoryTypeId="25" PostId="12500" RevisionGUID="c47eadfa-3fdc-4464-9f20-8e01f600fa5d" CreationDate="2011-05-20T09:12:26.220" Comment="http://twitter.com/#!/StackGameDev/status/71503535921053696" />
  <row Id="27466" PostHistoryTypeId="6" PostId="12500" RevisionGUID="0641840b-0300-4ceb-9707-2be26058e07c" CreationDate="2011-05-20T09:34:10.717" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;facebook&gt;&lt;data-structure&gt;&lt;casual-games&gt;&lt;databases&gt;" />
  <row Id="27467" PostHistoryTypeId="2" PostId="12516" RevisionGUID="0982cce2-d951-402a-8d29-17c160f40089" CreationDate="2011-05-20T09:48:08.677" UserId="7490" Text="Is GML script is clipped in C/C++ language, and GML wrote the code to Visual Studio C++, it will always be correct, because it is just under C++ language features? &#xD;&#xA;&#xD;&#xA;I think that a bit wrong to have written that question could be to ask yet another generation of weeks. But if correct, is not need to ask again." />
  <row Id="27468" PostHistoryTypeId="1" PostId="12516" RevisionGUID="0982cce2-d951-402a-8d29-17c160f40089" CreationDate="2011-05-20T09:48:08.677" UserId="7490" Text="GML script and c/c++ language question" />
  <row Id="27469" PostHistoryTypeId="3" PostId="12516" RevisionGUID="0982cce2-d951-402a-8d29-17c160f40089" CreationDate="2011-05-20T09:48:08.677" UserId="7490" Text="&lt;c++&gt;&lt;c&gt;" />
  <row Id="27470" PostHistoryTypeId="5" PostId="12516" RevisionGUID="b268ee73-a811-45cc-af4f-46bfab0f97e5" CreationDate="2011-05-20T09:54:31.333" UserId="7490" Comment="added 34 characters in body" Text="Is GML (Game Maker Language, yoyo games) script is clipped in C/C++ language, and GML wrote the code to Visual Studio C++, it will always be correct, because it is just under C++ language features? &#xD;&#xA;&#xD;&#xA;I think that a bit wrong to have written that question could be to ask yet another generation of weeks. But if correct, is not need to ask again." />
  <row Id="27471" PostHistoryTypeId="2" PostId="12517" RevisionGUID="523af6a3-3f97-4a39-af56-7f056918d5bf" CreationDate="2011-05-20T10:11:54.867" UserId="7491" Text="My engine uses a component-based entity system internally, and I want to bind it to Lua for scripting.&#xD;&#xA;&#xD;&#xA;Now, I want to save people who write scripts for it typing work. In C++, to set the position of an entity, you'd do the following:&#xD;&#xA;&#xD;&#xA;    pEntity-&gt;GetComponent&lt; CPoint &gt;()-&gt;SetPos( Vector( X, Y ) );&#xD;&#xA;&#xD;&#xA;That means, if I'd bind it to Lua 1:1 you'd also have to:&#xD;&#xA;&#xD;&#xA;    ent:GetComponent( CP_POINT ):SetPos( 123, 456 )&#xD;&#xA;&#xD;&#xA;**But let's be honest, would you want to type so much just to set an entities' position?**&#xD;&#xA;&#xD;&#xA;I don't think so, that's why I &quot;hid&quot; the component system from Lua:&#xD;&#xA;&#xD;&#xA;Right now, what you do is &#xD;&#xA;&#xD;&#xA;    ent:SetPos( 123, 456 )&#xD;&#xA;&#xD;&#xA;The component stuff is handled internally. You can still manually add and remove components from Lua with ent:AddComponent and ent:RemoveComponent, etc.&#xD;&#xA;&#xD;&#xA;Now, this doesn't seem perfect either:&#xD;&#xA;&#xD;&#xA;- The Entity metatable gets cluttered because it has to take all functions of all components&#xD;&#xA;&#xD;&#xA;- Naming problems: `ent:SetJointMotorEnabled()` again seems kind of bad&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Do you have any ideas how I could find a better naming scheme for component functions, without risking the scripting comfortability?**" />
  <row Id="27472" PostHistoryTypeId="1" PostId="12517" RevisionGUID="523af6a3-3f97-4a39-af56-7f056918d5bf" CreationDate="2011-05-20T10:11:54.867" UserId="7491" Text="Component based entity system API naming problems" />
  <row Id="27473" PostHistoryTypeId="3" PostId="12517" RevisionGUID="523af6a3-3f97-4a39-af56-7f056918d5bf" CreationDate="2011-05-20T10:11:54.867" UserId="7491" Text="&lt;c++&gt;&lt;lua&gt;&lt;component-based&gt;&lt;api&gt;" />
  <row Id="27474" PostHistoryTypeId="6" PostId="12517" RevisionGUID="2e28c99c-11ca-4829-ae4e-23326480cecf" CreationDate="2011-05-20T10:21:42.193" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;lua&gt;&lt;component-based&gt;&lt;api&gt;&lt;entity-system&gt;" />
  <row Id="27475" PostHistoryTypeId="25" PostId="12517" RevisionGUID="d8d7866a-e43c-43da-b669-307bd71f2910" CreationDate="2011-05-20T12:12:26.120" Comment="http://twitter.com/#!/StackGameDev/status/71548834001596416" />
  <row Id="27476" PostHistoryTypeId="2" PostId="12518" RevisionGUID="244dd56d-a626-416f-b1fc-b8f0b47437b0" CreationDate="2011-05-20T12:32:19.493" UserId="7490" Text="Is there a C++ programming language knowledge to check the little tool where the introduction of C++ code would be nice to get something on the screen, similar to the &quot;Processing&quot; http://www.processing.org only with C++ language. I know the &quot;Cinder&quot; http://libcinder.org, but perhaps there should be a lot of code to write something to the screen? I just want to continue to learn C++ and tested by the knowledge I have, but I still can not write a complete program. Game Maker would be very appropriate, but the GML is a different language than C++" />
  <row Id="27477" PostHistoryTypeId="1" PostId="12518" RevisionGUID="244dd56d-a626-416f-b1fc-b8f0b47437b0" CreationDate="2011-05-20T12:32:19.493" UserId="7490" Text="c++ visualization" />
  <row Id="27478" PostHistoryTypeId="3" PostId="12518" RevisionGUID="244dd56d-a626-416f-b1fc-b8f0b47437b0" CreationDate="2011-05-20T12:32:19.493" UserId="7490" Text="&lt;c++&gt;&lt;visualization&gt;" />
  <row Id="27479" PostHistoryTypeId="5" PostId="12518" RevisionGUID="9147077c-3bd8-4891-b960-c8cad4ded7a5" CreationDate="2011-05-20T12:42:11.263" UserId="7490" Comment="edited body" Text="Is there a C++ programming language knowledge to check the little tool where the introduction of C++ code would be nice to get something on the screen, similar to the &quot;Processing&quot; http://www.processing.org only with C++ language? I know the &quot;Cinder&quot; http://libcinder.org, but perhaps there should be a lot of code to write something to the screen? I just want to continue to learn C++ and tested by the knowledge I have, but I still can not write a complete program. Game Maker would be very appropriate, but the GML is a different language than C++" />
  <row Id="27480" PostHistoryTypeId="5" PostId="12467" RevisionGUID="624b612c-017e-4907-9136-12258f8d4688" CreationDate="2011-05-20T13:06:35.167" UserId="7453" Comment="deleted 246 characters in body" Text="[SvEngine](http://simvector.com/index.php?page=svengine). It's an advanced 2D game engine for Windows® PC and use Direct3D® for hardware accelerated rendering. It's robust, fully object oriented, designed for easy use and suitable for making all types of 2D games and other graphic simulations. There is support for surfaces, textures, sprites, audio, streams, archives, configuration files, render targets, swap chains, databases and much more." />
  <row Id="27481" PostHistoryTypeId="12" PostId="12467" RevisionGUID="a62e14cb-8e64-4fc2-85b0-7062d553f205" CreationDate="2011-05-20T13:14:24.863" UserId="7453" Text="[{&quot;Id&quot;:7453,&quot;DisplayName&quot;:&quot;Simvector Games&quot;}]" />
  <row Id="27482" PostHistoryTypeId="13" PostId="12467" RevisionGUID="b0d3147c-013d-4a7f-a528-c8ecb85b86dd" CreationDate="2011-05-20T13:15:11.243" UserId="7453" Text="[{&quot;Id&quot;:7453,&quot;DisplayName&quot;:&quot;Simvector Games&quot;}]" />
  <row Id="27483" PostHistoryTypeId="5" PostId="12467" RevisionGUID="1d134fff-948d-4739-96bc-bde7715495fc" CreationDate="2011-05-20T13:21:52.720" UserId="7453" Comment="added 62 characters in body" Text="[SvEngine](http://simvector.com/index.php?page=svengine). It's an advanced 2D game engine for Windows® PC and use Direct3D® for hardware accelerated rendering. It's robust, fully object oriented, designed for easy use and suitable for making all types of 2D games and other graphic simulations. There is support for surfaces, textures, sprites, audio, streams, archives, configuration files, render targets, swap chains, databases and much more.&#xD;&#xA;&#xD;&#xA;We are using it to make all of our upcoming game projects." />
  <row Id="27484" PostHistoryTypeId="2" PostId="12519" RevisionGUID="631f830f-5e20-4949-8db5-0c3a207a0375" CreationDate="2011-05-20T14:20:21.303" UserId="7496" Text="I have a lot of complex objects in a scene and im looking for an efficient way to find which object a fired bullet hits and to find the hit coordinates.&#xD;&#xA;It would be best if there was a lightweight library to do this.&#xD;&#xA;it seems that PhysX can do this, but i didnt find a way except to give every face in every mesh a physX system and that seems to become a bottleneck.&#xD;&#xA;&#xD;&#xA;thanks in advance. " />
  <row Id="27485" PostHistoryTypeId="1" PostId="12519" RevisionGUID="631f830f-5e20-4949-8db5-0c3a207a0375" CreationDate="2011-05-20T14:20:21.303" UserId="7496" Text="detecting the coordinates where a bullet hits a mesh" />
  <row Id="27486" PostHistoryTypeId="3" PostId="12519" RevisionGUID="631f830f-5e20-4949-8db5-0c3a207a0375" CreationDate="2011-05-20T14:20:21.303" UserId="7496" Text="&lt;opengl&gt;&lt;c++&gt;" />
  <row Id="27487" PostHistoryTypeId="2" PostId="12520" RevisionGUID="8ba3f105-ea83-48c4-b1a9-4bb48b91b9be" CreationDate="2011-05-20T14:25:03.590" UserId="1183" Text="I'm getting this error &quot;The application bundle does not contain a valid identifier&quot; after my application successfully compiles.This error prevents my game from launching on the phone or the simulator. I have no idea how to fix this as I was following this tutorial [How To Make A Space Shooter iPhone Game][1] using Cocos2d.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.raywenderlich.com/3611/how-to-make-a-space-shooter-iphone-game" />
  <row Id="27488" PostHistoryTypeId="1" PostId="12520" RevisionGUID="8ba3f105-ea83-48c4-b1a9-4bb48b91b9be" CreationDate="2011-05-20T14:25:03.590" UserId="1183" Text="ERROR: The application bundle does not contain a valid identifier." />
  <row Id="27489" PostHistoryTypeId="3" PostId="12520" RevisionGUID="8ba3f105-ea83-48c4-b1a9-4bb48b91b9be" CreationDate="2011-05-20T14:25:03.590" UserId="1183" Text="&lt;cocos2d-iphone&gt;&lt;ios&gt;" />
  <row Id="27490" PostHistoryTypeId="2" PostId="12521" RevisionGUID="35c426cd-07b8-4c31-aa1e-aa8dc6ba7109" CreationDate="2011-05-20T14:26:05.620" UserId="7497" Text="I was wondering around, searching internet about particle system and fire effects but I haven't found any good answers. On some games I have realized that some sort of movie is being shown as the fire, which is pretty good but not for the fires which are close to the viewer. Please let me know how to make realistic fire and smoke effect in a game. Also if you have a good sample code or good description of how to make these kinds of cool fires please note them too.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;" />
  <row Id="27491" PostHistoryTypeId="1" PostId="12521" RevisionGUID="35c426cd-07b8-4c31-aa1e-aa8dc6ba7109" CreationDate="2011-05-20T14:26:05.620" UserId="7497" Text="How do games make fire and smoke effects?" />
  <row Id="27492" PostHistoryTypeId="3" PostId="12521" RevisionGUID="35c426cd-07b8-4c31-aa1e-aa8dc6ba7109" CreationDate="2011-05-20T14:26:05.620" UserId="7497" Text="&lt;opengl&gt;&lt;c&gt;&lt;effects&gt;&lt;particles&gt;" />
  <row Id="27493" PostHistoryTypeId="2" PostId="12522" RevisionGUID="2b10f2b5-0d63-498b-bd68-07d48d87b134" CreationDate="2011-05-20T14:34:19.937" UserId="6588" Text="Such effects are done with particle systems. Basically it's a big collection of 2D images that move as a group.&#xD;&#xA;&#xD;&#xA;In both cases the individual images have alpha transparency so that they look like blobs instead of squares. For fire the sprites usually have add blend while smoke particles generally don't." />
  <row Id="27494" PostHistoryTypeId="2" PostId="12523" RevisionGUID="78d90d3b-c4a6-4998-84fd-2716ba982d8b" CreationDate="2011-05-20T14:40:31.017" UserId="1386" Text="I presume this is because the bundle identifier (the fully qualified, unique name for your application) has invalid characters in it. The bundle identifier is found in the Info.plist file.&#xD;&#xA;&#xD;&#xA;I'll tidy this answer up in a bit." />
  <row Id="27495" PostHistoryTypeId="5" PostId="12523" RevisionGUID="0fa90a6c-356f-46cb-ba2d-0e11c178be63" CreationDate="2011-05-20T14:50:05.080" UserId="1386" Comment="added 1130 characters in body; added 23 characters in body; added 18 characters in body" Text="This could be because the bundle identifier has invalid characters in it or no characters in it. The bundle identifier is found in the Info.plist file.&#xD;&#xA;&#xD;&#xA;This is what constitues a valid application bundle identifier:&#xD;&#xA;&#xD;&#xA;&gt; The bundle identifier string&#xD;&#xA;&gt; identifies your application to the&#xD;&#xA;&gt; system. This string must be a uniform&#xD;&#xA;&gt; type identifier (UTI) that contains&#xD;&#xA;&gt; only alphanumeric (A-Z,a-z,0-9),&#xD;&#xA;&gt; hyphen (-), and period (.) characters.&#xD;&#xA;&gt; The string should also be in&#xD;&#xA;&gt; reverse-DNS format. For example, if&#xD;&#xA;&gt; your company’s domain is Ajax.com and&#xD;&#xA;&gt; you create an application named Hello,&#xD;&#xA;&gt; you could assign the string&#xD;&#xA;&gt; com.Ajax.Hello as your application’s&#xD;&#xA;&gt; bundle identifier. The bundle&#xD;&#xA;&gt; identifier is used in validating the&#xD;&#xA;&gt; application signature.&#xD;&#xA;[source (apple developer)][1]&#xD;&#xA;&#xD;&#xA;This may also be of use:&#xD;&#xA;&#xD;&#xA;&gt; An identifier used by iOS and Mac OS X&#xD;&#xA;&gt; to recognize any future updates to&#xD;&#xA;&gt; your app. Your Bundle ID must be&#xD;&#xA;&gt; registered with Apple and unique to&#xD;&#xA;&gt; your app. Bundle IDs are app-type&#xD;&#xA;&gt; specific (either iOS or Mac OS X). The&#xD;&#xA;&gt; same Bundle ID cannot be used for both&#xD;&#xA;&gt; iOS and Mac OS X apps.&#xD;&#xA;[source][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.apple.com/library/ios/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1&#xD;&#xA;  [2]: https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf" />
  <row Id="27496" PostHistoryTypeId="17" PostId="12525" RevisionGUID="f0f1f29d-e55c-467a-a3a6-833866a46850" CreationDate="2011-05-20T14:55:53.613" UserId="-1" Comment="from http://stackoverflow.com/questions/6073145/detecting-the-coordinates-where-a-bullet-hits-a-mesh/6073586#6073586" Text="" />
  <row Id="27497" PostHistoryTypeId="2" PostId="12525" RevisionGUID="27137aec-be76-48e9-8388-f366ee9234f9" CreationDate="2011-05-20T14:44:16.347" UserDisplayName="Constantinius" Text="I really can recommend the [OpenDynamics][1], an open source physics library, with loads of examples and its pretty straightforward. It also works easily with plain old C.&#xD;&#xA;&#xD;&#xA;As far as I can remember, OpenDynamics supports some kind of mesh loading. Otherwise, you have to create the faces for the physics themselves. &#xD;&#xA;&#xD;&#xA;There are other nice free physics engines I have looked through (did not try them yet):&#xD;&#xA;&#xD;&#xA; - [Havok][2] (not free as I can recall)&#xD;&#xA; - [Newton][3]&#xD;&#xA; - [Bullet][4]&#xD;&#xA;&#xD;&#xA;There are also some pyhsics engine for 2D only: [Box2D][5] and [chipmunk][6] I tried and are great also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ode.org/&#xD;&#xA;  [2]: http://www.havok.com/&#xD;&#xA;  [3]: http://newtondynamics.com/forum/newton.php&#xD;&#xA;  [4]: http://bulletphysics.org/wordpress/&#xD;&#xA;  [5]: http://www.box2d.org/&#xD;&#xA;  [6]: http://code.google.com/p/chipmunk-physics/" />
  <row Id="27498" PostHistoryTypeId="2" PostId="12524" RevisionGUID="65ffb38f-8411-4d63-871e-398861430c8e" CreationDate="2011-05-20T14:08:29.583" UserId="7496" Text="I have a lot of complex objects in a scene and im looking for an efficient way to find which object a fired bullet hits and to find the hit coordinates.&#xD;&#xA;It would be best if there was a lightweight library to do this.&#xD;&#xA;it seems that PhysX can do this, but i didnt find a way except to give every face in every mesh a physX system and that seems to become a bottleneck.&#xD;&#xA;&#xD;&#xA;thanks in advance." />
  <row Id="27499" PostHistoryTypeId="1" PostId="12524" RevisionGUID="65ffb38f-8411-4d63-871e-398861430c8e" CreationDate="2011-05-20T14:08:29.583" UserId="7496" Text="detecting the coordinates where a bullet hits a mesh" />
  <row Id="27500" PostHistoryTypeId="3" PostId="12524" RevisionGUID="65ffb38f-8411-4d63-871e-398861430c8e" CreationDate="2011-05-20T14:08:29.583" UserId="7496" Text="&lt;3d&gt;" />
  <row Id="27501" PostHistoryTypeId="17" PostId="12524" RevisionGUID="0b65843a-3300-48f4-bc76-84ca4d4bf081" CreationDate="2011-05-20T14:55:53.613" UserId="-1" Comment="from http://stackoverflow.com/questions/6073145/detecting-the-coordinates-where-a-bullet-hits-a-mesh" Text="" />
  <row Id="27502" PostHistoryTypeId="2" PostId="12526" RevisionGUID="f1e1241c-3756-4c92-b23c-32be400193da" CreationDate="2011-05-20T14:59:55.420" UserId="1430" Text="GML is a distinct language developed for Game Maker. It bears some similarity to C and C++ on the surface, in terms of its syntax (keywords, grammar and structure), but it is otherwise unrelated to C++ -- it certainly is not a sub- or super-set of the C or C++ languages. GML differs from C(++) in a lot of ways... for example it does not require variable declaration, has a much simpler memory allocation model, and several additional extra language constructs (such as the &quot;with&quot; block).&#xD;&#xA;&#xD;&#xA;You could write your GML code within Visual Studio, but it wouldn't work well. You might get syntax hilighting, but VS could not compile GML in general and using Game Maker itself to author GML is a far better idea since the tool and the language are tightly integrated.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27503" PostHistoryTypeId="5" PostId="12516" RevisionGUID="b5f682c5-8c83-4953-b709-e7c484450957" CreationDate="2011-05-20T15:00:29.180" UserId="1430" Comment="deleted 12 characters in body; edited title" Text="Is GML (Game Maker Language) script is clipped in C/C++ language, and GML wrote the code to Visual Studio C++, it will always be correct, because it is just under C++ language features? &#xD;&#xA;&#xD;&#xA;I think that a bit wrong to have written that question could be to ask yet another generation of weeks. But if correct, is not need to ask again." />
  <row Id="27504" PostHistoryTypeId="4" PostId="12516" RevisionGUID="b5f682c5-8c83-4953-b709-e7c484450957" CreationDate="2011-05-20T15:00:29.180" UserId="1430" Comment="deleted 12 characters in body; edited title" Text="GML and C/C++ language question" />
  <row Id="27505" PostHistoryTypeId="2" PostId="12527" RevisionGUID="aa1c65be-2bba-401c-8583-b12e267f1a49" CreationDate="2011-05-20T15:11:45.473" UserId="1430" Text="I can't really tell if you're asking for a simple windowing/graphics API or an API to assist in the procedural generation of images / &quot;creative coding.&quot; C++ doesn't have either as part of its standard library.&#xD;&#xA;&#xD;&#xA;If its the first thing, [GLUT and its ilk][1] allow you to get a window up and running for using OpenGL relatively quickly and is useful for quick-and-dirty prototyping. [SFML][2] is the modern de-facto successor to the popular [SDL][3] library... and there's [this one][4] I just stumbled across while doing some quick research for this question.&#xD;&#xA;&#xD;&#xA;For the second case, I'm not aware of many. In addition to Cinder, there's [openFrameworks][5] and (maybe) [this haXe thing][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freeglut.sourceforge.net/&#xD;&#xA;  [2]: http://www.sfml-dev.org/&#xD;&#xA;  [3]: http://www.libsdl.org/&#xD;&#xA;  [4]: http://code.google.com/p/angel-engine/&#xD;&#xA;  [5]: http://www.openframeworks.cc/&#xD;&#xA;  [6]: http://blog.onthewings.net/2010/05/06/haxe-for-interactivitycreative-coding/" />
  <row Id="27506" PostHistoryTypeId="25" PostId="12521" RevisionGUID="da99e077-21bc-4fbc-9f81-548c545a77c3" CreationDate="2011-05-20T15:12:26.407" Comment="http://twitter.com/#!/StackGameDev/status/71594133361393664" />
  <row Id="27507" PostHistoryTypeId="5" PostId="12467" RevisionGUID="251067fd-43ac-4622-a36c-560ae8dd48df" CreationDate="2011-05-20T15:22:26.097" UserId="7453" Comment="added 92 characters in body; deleted 15 characters in body" Text="[SvEngine](http://simvector.com/index.php?page=svengine). It's an advanced 2D game engine for Windows® PC and use Direct3D® for hardware accelerated rendering. It's robust, fully object oriented, designed for easy use and suitable for making all types of 2D games and other graphic simulations. There is support for surfaces, textures, sprites, audio, streams, archives, configuration files, render targets, swap chains, databases and much more.&#xD;&#xA;&#xD;&#xA;**NOTE: It's our own 2D game engine middleware that we develop and support. We will be using SvEngine for all our up coming products.**" />
  <row Id="27508" PostHistoryTypeId="2" PostId="12528" RevisionGUID="ca9dd43e-5438-47bb-8ca6-cb6af2e304d0" CreationDate="2011-05-20T15:29:48.507" UserId="2469" Text="I'm trying to understand what HDR is and how it works.&#xD;&#xA;I understand the basic concepts and have an slight idea of how it is implemented with D3D/hlsl.&#xD;&#xA;However it's still pretty foggy.&#xD;&#xA;&#xD;&#xA;Say I'm rendering a sphere with a texture of the earth and a small point list of vertices to act as stars, how would I render this in HDR ?&#xD;&#xA;&#xD;&#xA;Here are a few things I'm confused about:&#xD;&#xA;&#xD;&#xA;- I'm guessing, I can't use just any basic image format for the texture as the values would be limited to [0, 255] and clamped to [0, 1] in a shader. Same goes for the back buffer, I take it the format needs to be a float point format ?&#xD;&#xA;&#xD;&#xA;- What are the other steps involved ? Surely there has to be more than just using floating point formats to render to a render target and then apply some bloom as a post process ? (considering the output will be 8bpp anyway)&#xD;&#xA;&#xD;&#xA;Basically, what are the steps for HDR ? How does it work ? I can't seem to find any good papers / articles that describe the process, other than [this one][1], but it seems to skim over the basics a little, so it's confusing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xnainfo.com/content.php?content=28" />
  <row Id="27509" PostHistoryTypeId="1" PostId="12528" RevisionGUID="ca9dd43e-5438-47bb-8ca6-cb6af2e304d0" CreationDate="2011-05-20T15:29:48.507" UserId="2469" Text="how does HDR work ?" />
  <row Id="27510" PostHistoryTypeId="3" PostId="12528" RevisionGUID="ca9dd43e-5438-47bb-8ca6-cb6af2e304d0" CreationDate="2011-05-20T15:29:48.507" UserId="2469" Text="&lt;c++&gt;&lt;hlsl&gt;&lt;directx11&gt;&lt;hdr&gt;" />
  <row Id="27511" PostHistoryTypeId="2" PostId="12529" RevisionGUID="899bad54-90a3-4071-bb16-25ea6ea1dea6" CreationDate="2011-05-20T15:30:00.923" UserId="1156" Text="I've been interested in the component based entity system for a while, and read countless articles on it (The [Insomiac games][1], the pretty standard [Evolve Your Hierarchy][2], the [T-Machine][3], [Chronoclast][4]..just to name a few).&#xD;&#xA;&#xD;&#xA;They all seem to have a structure on the outside of something like:&#xD;&#xA;&#xD;&#xA;    Entity e = Entity.Create();&#xD;&#xA;    e.AddComponent(RenderComponent, ...);&#xD;&#xA;    //do lots of stuff&#xD;&#xA;    e.GetComponent&lt;PositionComponent&gt;(...).SetPos(4,5,6);&#xD;&#xA;&#xD;&#xA;And if you bring in the idea of shared data (this is the best design I've seen so far, in terms of not duplicating data everywhere)&#xD;&#xA;&#xD;&#xA;    e.GetProperty&lt;string&gt;(&quot;Name&quot;).Value = &quot;blah&quot;;&#xD;&#xA;&#xD;&#xA;Yes, this is very efficient. However, it isn't exactly the easiest to read or write; it feels very clunky and working-against-you.&#xD;&#xA;&#xD;&#xA;I personally would like to do something like:&#xD;&#xA;&#xD;&#xA;    e.SetPosition(4,5,6);&#xD;&#xA;    e.Name = &quot;Blah&quot;;&#xD;&#xA;&#xD;&#xA;Though of course the only way to get to that kind of design is back in the Entity-&gt;NPC-&gt;Enemy-&gt;FlyingEnemy-&gt;FlyingEnemyWithAHatOn kind of hierarchy this design tries to avoid.&#xD;&#xA;&#xD;&#xA;Has anyone seen a design for this kind of component system which is still flexible, yet maintains a level of user friendliness? And for that matter, manages to get around the (probably the hardest problem) data storage in a good way?&#xD;&#xA;&#xD;&#xA;***tl;dr What designs are there for a component system that are user friendly but still flexible?***&#xD;&#xA;&#xD;&#xA;  [1]: http://www.insomniacgames.com/assets/filesadynamiccomponentarchitectureforhighperformancegameplay.pdf&#xD;&#xA;  [2]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;  [3]: http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/&#xD;&#xA;  [4]: http://blog.chronoclast.com/search/label/Entity%20Systems" />
  <row Id="27512" PostHistoryTypeId="1" PostId="12529" RevisionGUID="899bad54-90a3-4071-bb16-25ea6ea1dea6" CreationDate="2011-05-20T15:30:00.923" UserId="1156" Text="A component based entity-system with user-friendliness in mind" />
  <row Id="27513" PostHistoryTypeId="3" PostId="12529" RevisionGUID="899bad54-90a3-4071-bb16-25ea6ea1dea6" CreationDate="2011-05-20T15:30:00.923" UserId="1156" Text="&lt;c#&gt;&lt;architecture&gt;&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="27514" PostHistoryTypeId="2" PostId="12530" RevisionGUID="922f1221-1796-4139-b80b-105db3d499a5" CreationDate="2011-05-20T15:34:01.763" UserId="1386" Text="PhysX can pre-process your collision meshes into it's own optimised collision structures (probably a series of convex meshes). The process is called cooking, and it is described in a blog here:&#xD;&#xA;http://actuated.wordpress.com/2010/06/26/mesh-collision-in-physx/" />
  <row Id="27515" PostHistoryTypeId="2" PostId="12531" RevisionGUID="b12d6b1d-21e6-405a-8f6a-34478caa1776" CreationDate="2011-05-20T15:52:48.503" UserId="1386" Text="HDR allows you to simulate a greater range of colors that you can view on screen. You can  compare it to how the eye behaves when exposed to different amounts of light - when there's too much light the eye lets less light in so things are still in your visible range. When there is not enough light, the iris opens more so more details can be seen.&#xD;&#xA;&#xD;&#xA;The basic steps are:&#xD;&#xA;&#xD;&#xA; 1. Render your scene to floating point texture using&#xD;&#xA;    other floating point textures on your models, and/or lights&#xD;&#xA;    that have a brightness greater than&#xD;&#xA;    1.0f.&#xD;&#xA;&#xD;&#xA; 2. To display this texture the range of&#xD;&#xA;    visible colors needs to be converted&#xD;&#xA;    to something displayable on your&#xD;&#xA;    screen - this process is called&#xD;&#xA;    [tone mapping][1], and a variety of&#xD;&#xA;    different tone mapping equations can&#xD;&#xA;    be used to get different effects.&#xD;&#xA;    This is a must since monitors can't&#xD;&#xA;    display the full range of colors/brightness we&#xD;&#xA;    can store in a floating point&#xD;&#xA;    textures (it would be cool if it was&#xD;&#xA;    possible, but it would also be a&#xD;&#xA;    blinding hazard...).&#xD;&#xA;    &#xD;&#xA; 3. Bloom and other after effects are&#xD;&#xA;    added to further exaggerate the&#xD;&#xA;    difference in brightness of the&#xD;&#xA;    things rendered.&#xD;&#xA;&#xD;&#xA;*Hope that helps, I know my language is a bit rough - I'll tidy it up later.*&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tone_mapping" />
  <row Id="27516" PostHistoryTypeId="5" PostId="12524" RevisionGUID="b51f1cc2-1a08-444f-9f59-cfe94c77be35" CreationDate="2011-05-20T15:55:23.423" UserId="3588" Comment="Migration tagging ♪" Text="I have a lot of complex objects in a scene and I'm looking for an efficient way to find which object a fired bullet hits, and to find the hit coordinates.&#xD;&#xA;&#xD;&#xA;It would be best if there was a lightweight library to do this.&#xD;&#xA;&#xD;&#xA;It seems that PhysX can do this, but I didn't find a way except to give every face in every mesh a PhysX system, and that seems to become a bottleneck." />
  <row Id="27517" PostHistoryTypeId="6" PostId="12524" RevisionGUID="b51f1cc2-1a08-444f-9f59-cfe94c77be35" CreationDate="2011-05-20T15:55:23.423" UserId="3588" Comment="Migration tagging ♪" Text="&lt;3d&gt;&lt;collision-detection&gt;&lt;coordinates&gt;" />
  <row Id="27518" PostHistoryTypeId="24" PostId="12524" RevisionGUID="b51f1cc2-1a08-444f-9f59-cfe94c77be35" CreationDate="2011-05-20T15:55:23.423" Comment="Proposed by 3588 approved by 14 edit id of 438" />
  <row Id="27519" PostHistoryTypeId="5" PostId="4640" RevisionGUID="24fab146-0317-4f5c-9e76-120c6ff19d1a" CreationDate="2011-05-20T15:55:35.340" UserId="4209" Comment="minor grammar" Text="Okay, I hate to say it, but Delphi is effectively dead. I know, I know - it's depressing.  Fear not, however: even better languages have evolved that have 99% of the advantages of Delphi, but are *gasp* still  (REALLY) supported and enjoying widespread industry adoption. You're not doing your career any favors by sticking with Delphi. I worked with Delphi for about six wonderful years before following Anders over to the dark side. &#xD;&#xA;&#xD;&#xA;If you're already playing with C#, you've no doubt noticed the incredible similarities between it and Delphi. Your Delphi experience will help a great deal given the similar object models, exception handling, etc. &#xD;&#xA;&#xD;&#xA;The only advantage that Delphi has over C# is that it is compiled to native code. The only other game in town for that these days seems to be C and C++. &#xD;&#xA;&#xD;&#xA;I'm having fantastic success with C# and XNA. The performance of managed code these days is very near that of native code. If you want to code for multiple platforms (windows, xbox, ps3, etc), you'll need to stick with c++ because it's the only thing that will build for everything. &#xD;&#xA;&#xD;&#xA;If you're sticking with Windows and the Xbox, XNA is a great tool. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="27520" PostHistoryTypeId="24" PostId="4640" RevisionGUID="24fab146-0317-4f5c-9e76-120c6ff19d1a" CreationDate="2011-05-20T15:55:35.340" Comment="Proposed by 4209 approved by 14 edit id of 437" />
  <row Id="27521" PostHistoryTypeId="5" PostId="12531" RevisionGUID="47507651-13c6-4f49-8185-0099c4b5bcbd" CreationDate="2011-05-20T15:58:33.507" UserId="1386" Comment="added 78 characters in body; added 96 characters in body; edited body" Text="HDR allows you to simulate a greater range of detail than you can view on screen than with traditional lighting/textures. You can  compare it to how the eye behaves when exposed to different amounts of light - when there's too much light the eye lets less light in so things are still in your visible range. When there is not enough light, the iris opens more so more details can be seen.&#xD;&#xA;&#xD;&#xA;The basic steps are:&#xD;&#xA;&#xD;&#xA; 1. Render your scene to floating point texture (with a format such as A16B16G16R16F) using&#xD;&#xA;    other floating point textures on your models, and/or lights&#xD;&#xA;    that have a brightness greater than&#xD;&#xA;    1.0f.&#xD;&#xA;&#xD;&#xA; 2. To display this texture the range of&#xD;&#xA;    visible colors needs to be converted&#xD;&#xA;    to something displayable on your&#xD;&#xA;    screen - this process is called&#xD;&#xA;    [tone mapping][1], and a variety of&#xD;&#xA;    different tone mapping equations can&#xD;&#xA;    be used to get different effects.&#xD;&#xA;    This is a must since monitors can't&#xD;&#xA;    display the full range of colors/brightness we&#xD;&#xA;    can store in a floating point&#xD;&#xA;    textures (it would be cool if it was&#xD;&#xA;    possible, but it would also be a&#xD;&#xA;    blinding hazard...).&#xD;&#xA;    &#xD;&#xA; 3. Bloom and other after effects are&#xD;&#xA;    added to further exaggerate the&#xD;&#xA;    difference in brightness of the&#xD;&#xA;    things rendered. The bloom is calculated from the floating point buffer and combined with the tone mapped image.&#xD;&#xA;&#xD;&#xA;*Hope that helps, I know my language is a bit rough - I'll tidy it up later.*&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tone_mapping" />
  <row Id="27522" PostHistoryTypeId="5" PostId="12531" RevisionGUID="a21c85c9-cb32-45c0-add5-181830701ed6" CreationDate="2011-05-20T16:15:07.253" UserId="1386" Comment="added 10 characters in body; added 2 characters in body" Text="HDR allows you to simulate a greater range of detail than you can view on screen than with traditional lighting/textures. You can  compare it to how the eye behaves when exposed to different amounts of light - when there's too much light the eye lets less light in so things are still in your visible range. When there is not enough light, the iris opens more so more details can be seen.&#xD;&#xA;&#xD;&#xA;The basic steps are:&#xD;&#xA;&#xD;&#xA; 1. Render your scene to floating point texture (with a format such as A16B16G16R16F) using&#xD;&#xA;    other floating point textures on your models, and/or lights&#xD;&#xA;    that have a brightness greater than&#xD;&#xA;    1.0f.&#xD;&#xA;&#xD;&#xA; 2. To display this texture the range of&#xD;&#xA;    visible colors needs to be converted&#xD;&#xA;    to something displayable on your&#xD;&#xA;    screen - this process is called&#xD;&#xA;    [tone mapping][1], and a variety of&#xD;&#xA;    different tone mapping equations can&#xD;&#xA;    be used to get different effects.&#xD;&#xA;    This is a must since monitors can't&#xD;&#xA;    display the full range of colors or luminescence that we&#xD;&#xA;    can store in a floating point&#xD;&#xA;    textures (it would be cool if it was&#xD;&#xA;    possible, but it would also be a&#xD;&#xA;    blinding hazard...).&#xD;&#xA;    &#xD;&#xA; 3. Bloom and other after effects are&#xD;&#xA;    added to further exaggerate the&#xD;&#xA;    difference in luminescence of the&#xD;&#xA;    things rendered. The bloom is calculated from the floating point buffer and combined with the tone mapped image.&#xD;&#xA;&#xD;&#xA;*Hope that helps, I know my language is a bit rough - I'll tidy it up later.*&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tone_mapping" />
  <row Id="27523" PostHistoryTypeId="5" PostId="12467" RevisionGUID="fb01ee10-ed0d-4d88-a267-2d7f6d0d17f2" CreationDate="2011-05-20T16:28:02.607" UserId="7453" Comment="deleted 4 characters in body; added 1 characters in body" Text="[SvEngine](http://simvector.com/index.php?page=svengine). It's an advanced 2D game engine for Windows® PC and use Direct3D® for hardware accelerated rendering. It's robust, fully object oriented, designed for easy use and suitable for making all types of 2D games and other graphic simulations. There is support for surfaces, textures, sprites, audio, streams, archives, configuration files, render targets, swap chains, databases and much more.&#xD;&#xA;&#xD;&#xA;**NOTE: It's our own 2D game engine middleware that we develop and support. We will be using it to make all our upcoming projects.**" />
  <row Id="27524" PostHistoryTypeId="5" PostId="12528" RevisionGUID="62341f2a-885f-407f-ade1-3c2a4cc6d5f7" CreationDate="2011-05-20T16:53:39.877" UserId="1198" Comment="edited body" Text="I'm trying to understand what HDR is and how it works.&#xD;&#xA;&#xD;&#xA;I understand the basic concepts and have an slight idea of how it is implemented with D3D/hlsl.&#xD;&#xA;&#xD;&#xA;However it's still pretty foggy.&#xD;&#xA;&#xD;&#xA;Say I'm rendering a sphere with a texture of the earth and a small point list of vertices to act as stars, how would I render this in HDR ?&#xD;&#xA;&#xD;&#xA;Here are a few things I'm confused about:&#xD;&#xA;&#xD;&#xA;- I'm guessing, I can't use just any basic image format for the texture as the values would be limited to [0, 255] and clamped to [0, 1] in a shader. Same goes for the back buffer, I take it the format needs to be a float point format ?&#xD;&#xA;&#xD;&#xA;- What are the other steps involved ? Surely there has to be more than just using floating point formats to render to a render target and then apply some bloom as a post process ? (considering the output will be 8bpp anyway)&#xD;&#xA;&#xD;&#xA;Basically, what are the steps for HDR ? How does it work ? I can't seem to find any good papers / articles that describe the process, other than [this one][1], but it seems to skim over the basics a little, so it's confusing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xnainfo.com/content.php?content=28" />
  <row Id="27525" PostHistoryTypeId="2" PostId="12532" RevisionGUID="44ded0f2-9c20-4a57-b1f0-2e6c758db636" CreationDate="2011-05-20T17:03:45.300" UserId="4443" Text="I would suggest some kind of Interface class for your Entity objects would be nice. It could do the error handling with checking to make sure an entity contains a component of the appropriate value as well in one location so you would not have to do it everywhere you access the values. Alternately, most of the designs I have ever done with a component based system, I deal with the components directly, requesting, for example, their positional component and then accessing/updating the properties of that component directly.&#xD;&#xA;&#xD;&#xA;Very basic at a high level, the class takes in the entity in question and provides easy-to-use interface to the underlying component parts as follows:&#xD;&#xA;&#xD;&#xA;    public class EntityInterface&#xD;&#xA;    {&#xD;&#xA;        private Entity entity { get; set };&#xD;&#xA;        public EntityInterface(Entity e)&#xD;&#xA;        {&#xD;&#xA;            entity = e;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public Vector3 Position&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return entity.GetProperty&lt;Vector3&gt;(&quot;Position&quot;);&#xD;&#xA;            }&#xD;&#xA;            set&#xD;&#xA;            {&#xD;&#xA;                entity.GetProperty&lt;Vector3&gt;(&quot;Position&quot;) = value;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27526" PostHistoryTypeId="2" PostId="12533" RevisionGUID="ee8dece2-c5a4-4be7-a8e3-d986b6a6bca1" CreationDate="2011-05-20T17:39:02.670" UserId="1101" Text="In Python you can intercept the 'setPosition' part of `e.SetPosition(4,5,6)` via declaring a `__getattr__` function on Entity. This function can iterate through the components and find the appropriate method or property and return that, so that the function call or assignment goes to the right place. Perhaps C# has a similar system, but it might not be possible due to it being statically typed - it presumably can't compile `e.setPosition` unless e has setPosition in the interface somewhere.&#xD;&#xA;&#xD;&#xA;You could also perhaps make all your entities implement the relevant interfaces for all components you might ever add to them, with stub methods that raise an exception. Then when you call addComponent, you just redirect the entity's functions for that component's interface to the component. A bit fiddly though.&#xD;&#xA;&#xD;&#xA;But perhaps easiest would be to overload the [] operator on your Entity class to search the attached components for the presence of a valid property and return that, so it can be assigned to like so: `e[&quot;Name&quot;] = &quot;blah&quot;`. Each component will need to implement its own GetPropertyByName and the Entity calls each one in turn until it finds the component responsible for the property in question." />
  <row Id="27527" PostHistoryTypeId="2" PostId="12534" RevisionGUID="5ca4f793-bf45-49aa-9a0c-2a2a6e12ba6e" CreationDate="2011-05-20T17:48:57.390" UserId="1101" Text="Technically, HDR merely means using a larger range of possible values for your graphics. Usually you're restricted to 256 discrete values for the red, green, and blue channels, which means that if you have 2 items, one twice as bright as the other, and a 3rd which is 10,000 times brighter than the first, there's no way you can represent all 3 in the same scene correctly - you either make the bright object only 256x brighter than the first instead, or you make both the dull objects completely black (losing the contrast between them) and then the bright object is infinitely brighter than them both.&#xD;&#xA;&#xD;&#xA;This is easy to fix by using floating point values for the red/green/blue values - but now you have the problem of how to display that on a graphics device that only handles a fixed number of discrete values per channel (eg. 256). So the second part of the problem is how to map your floating point values back to the limited range. The trivial solution is to scale all the values proportionately into the discrete range, but this would mean that 1 very bright pixel could make the rest of the screen black, etc. Sometimes this is what you want, sometimes it's not - see CiscoIPPhone's tone mapping link for examples of how you can approach this.&#xD;&#xA;&#xD;&#xA;It's generally not your textures that need to be stored in a new format - it's when the lighting is applied to them that you need to be able to accommodate larger values. Obviously however if you have light sources baked into a texture - eg. a starry background - you might want a higher resolution format there. Or just have the shader scale the values of such materials up when the time comes to render them." />
  <row Id="27528" PostHistoryTypeId="18" PostId="12519" RevisionGUID="ae386ea1-cd2b-4da8-9c69-539c49a819eb" CreationDate="2011-05-20T18:08:50.937" UserId="189" Comment="to http://gamedev.stackexchange.com/questions/12524/detecting-the-coordinates-where-a-bullet-hits-a-mesh" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27529" PostHistoryTypeId="18" PostId="12530" RevisionGUID="ae386ea1-cd2b-4da8-9c69-539c49a819eb" CreationDate="2011-05-20T18:08:50.937" UserId="189" Comment="from http://gamedev.stackexchange.com/questions/12519/detecting-the-coordinates-where-a-bullet-hits-a-mesh" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27530" PostHistoryTypeId="18" PostId="12524" RevisionGUID="ae386ea1-cd2b-4da8-9c69-539c49a819eb" CreationDate="2011-05-20T18:08:50.937" UserId="189" Comment="from http://gamedev.stackexchange.com/questions/12519/detecting-the-coordinates-where-a-bullet-hits-a-mesh" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27531" PostHistoryTypeId="14" PostId="12519" RevisionGUID="3d11e179-d45b-4224-bbd0-99205b844bd9" CreationDate="2011-05-20T18:08:51.857" UserId="189" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27532" PostHistoryTypeId="25" PostId="12529" RevisionGUID="b85c2190-532a-439a-b229-bee6d33efb9a" CreationDate="2011-05-20T18:12:27.033" Comment="http://twitter.com/#!/StackGameDev/status/71639433547481088" />
  <row Id="27533" PostHistoryTypeId="2" PostId="12535" RevisionGUID="57249d45-54bf-43f6-8a3d-c64fac633355" CreationDate="2011-05-20T18:36:15.483" UserId="6042" Text="Computers traditionally represented each pixel on screen as only 24 bits in memory: 8 for red, 8 for green, and 8 for blue. This is almost enough bits that a human wouldn't notice if you added more, and the 8-bit byte is very convenient for microprocessors, so that's what stuck.&#xD;&#xA;&#xD;&#xA;While 8 bits is almost enough precision to *display* an image, it is definitely not enough precision to *compute* an image. At various points while computing an image, at least 32 bits of precision is required. &#xD;&#xA;&#xD;&#xA;This is why pixel shaders compute colors in 32-bit precision, even when you are rendering to an 8-bit precision image. Otherwise, you couldn't for example divide a value by 1000, and then later multiply it by 1000, because dividing *any* 8-bit value by 1000 results in zero. &#xD;&#xA;&#xD;&#xA;There has been a trend in realtime 3D graphics toward keeping all graphics in &gt;8 bit precision until the last possible moment, at which time the &gt;8 bits of red are downsampled to 8 bits, and so forth for green and blue.&#xD;&#xA;&#xD;&#xA;HDR refers to the act of rendering to images which have higher than 8-bit precision. In contemporary TV videogames, 16-bit precision is the norm, and this may be &quot;enough&quot; in videogames for years to come.&#xD;&#xA;" />
  <row Id="27534" PostHistoryTypeId="5" PostId="12531" RevisionGUID="3e66b7f3-3097-49c9-8be0-035cacb37fe0" CreationDate="2011-05-20T18:52:43.250" UserId="1386" Comment="deleted 56 characters in body; deleted 2 characters in body; added 11 characters in body" Text="HDR techniques allows you to simulate a greater range of detail than you can view on screen than with traditional lighting/textures. You can  compare it to how the eye behaves when exposed to different amounts of light - when there's too much light the eye lets less light in so things are still in your visible range. When there is not enough light, the iris opens more so more details can be seen.&#xD;&#xA;&#xD;&#xA;The basic steps are:&#xD;&#xA;&#xD;&#xA; 1. Render your scene to floating point texture (with a format such as A16B16G16R16F) using&#xD;&#xA;    other floating point textures on your models, and/or lights&#xD;&#xA;    that may have a brightness greater than&#xD;&#xA;    1.0f.&#xD;&#xA;&#xD;&#xA; 2. To display this texture the range of&#xD;&#xA;    visible colors needs to be converted&#xD;&#xA;    to something displayable on your&#xD;&#xA;    screen - this process is called&#xD;&#xA;    [tone mapping][1], and a variety of&#xD;&#xA;    different tone mapping equations can&#xD;&#xA;    be used to get different effects.&#xD;&#xA;    This is a must since monitors can't&#xD;&#xA;    display the full range of colors or luminescence that we&#xD;&#xA;    can store in floating point&#xD;&#xA;    textures (it would be cool if it was&#xD;&#xA;    possible, but it would also be a&#xD;&#xA;    blinding hazard...).&#xD;&#xA;    &#xD;&#xA; 3. Bloom and other after effects are&#xD;&#xA;    added to further exaggerate the&#xD;&#xA;    difference in luminescence of the&#xD;&#xA;    things rendered. The bloom is calculated from the floating point buffer and combined with the tone mapped image.&#xD;&#xA;&#xD;&#xA;*Hope that helps*&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tone_mapping" />
  <row Id="27535" PostHistoryTypeId="5" PostId="12531" RevisionGUID="2a7f2bb2-45d7-416b-a9c2-a1567036e255" CreationDate="2011-05-20T19:26:47.447" UserId="1386" Comment="added 328 characters in body; deleted 28 characters in body" Text="HDR techniques allows you to simulate a greater range of detail than you can view on screen than with traditional lighting/textures. You can  compare it to how the eye behaves when exposed to different amounts of light - when there's too much light the eye lets less light in so things are still in your visible range. When there is not enough light, the iris opens more so more details can be seen.&#xD;&#xA;&#xD;&#xA;![bit-tech.net HDR comparison][2]&#xD;&#xA;&#xD;&#xA;The right hand side of this image is using HDR. It makes more use of the range of colors, the darks are darker and the bright areas are brighter. In comparison the left hand side of the image looks a little flat.&#xD;&#xA;&#xD;&#xA;The basic steps are:&#xD;&#xA;&#xD;&#xA; 1. Render your scene to floating point texture (with a format such as A16B16G16R16F) using&#xD;&#xA;    other floating point textures on your models, and/or lights&#xD;&#xA;    that may have a brightness greater than&#xD;&#xA;    1.0f.&#xD;&#xA;&#xD;&#xA; 2. To display this texture the range of&#xD;&#xA;    visible colors needs to be converted&#xD;&#xA;    to something displayable on your&#xD;&#xA;    screen - this process is called&#xD;&#xA;    [tone mapping][1], and a variety of&#xD;&#xA;    different tone mapping equations can&#xD;&#xA;    be used to get different effects.&#xD;&#xA;    This is a must since monitors can't&#xD;&#xA;    display the full range of colors or luminescence that we&#xD;&#xA;    can store in floating point&#xD;&#xA;    textures (it would be cool if it was&#xD;&#xA;    possible, but it would also be a&#xD;&#xA;    blinding hazard...).&#xD;&#xA;    &#xD;&#xA; 3. Bloom and other after effects are&#xD;&#xA;    added to further exaggerate the&#xD;&#xA;    difference in luminescence of the&#xD;&#xA;    things rendered. The bloom is calculated from the floating point buffer and combined with the tone mapped image.&#xD;&#xA;&#xD;&#xA;*Hope that helps*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tone_mapping&#xD;&#xA;  [2]: http://i.stack.imgur.com/TM3yV.jpg" />
  <row Id="27536" PostHistoryTypeId="2" PostId="12536" RevisionGUID="f991acea-bf7c-42b7-a28a-9b2d3f278763" CreationDate="2011-05-20T20:24:29.553" UserId="4481" Text="I'm developping a card game. My custom control work great but I need an help for best solve this:&#xD;&#xA;&#xD;&#xA;When i move a card (my customcontrol) over another card I need to know which card is under.&#xD;&#xA;&#xD;&#xA;Then I'll be able to put logic for game rules.&#xD;&#xA;&#xD;&#xA;Thank for any help!" />
  <row Id="27537" PostHistoryTypeId="1" PostId="12536" RevisionGUID="f991acea-bf7c-42b7-a28a-9b2d3f278763" CreationDate="2011-05-20T20:24:29.553" UserId="4481" Text="card game: card control." />
  <row Id="27538" PostHistoryTypeId="3" PostId="12536" RevisionGUID="f991acea-bf7c-42b7-a28a-9b2d3f278763" CreationDate="2011-05-20T20:24:29.553" UserId="4481" Text="&lt;c#&gt;&lt;card-game&gt;" />
  <row Id="27539" PostHistoryTypeId="5" PostId="12536" RevisionGUID="8b1602fb-053d-43d4-89d5-82fad83d3c01" CreationDate="2011-05-20T20:52:01.887" UserId="1430" Comment="edited body; edited title" Text="I'm developing a card game. My custom control works great, but I need help to solve this:&#xD;&#xA;&#xD;&#xA;When I move a card (my custom control) over another card I need to know which card is underneath. Once I know that, I'll be able to put in logic for game rules.&#xD;&#xA;&#xD;&#xA;Thank for any help!" />
  <row Id="27540" PostHistoryTypeId="4" PostId="12536" RevisionGUID="8b1602fb-053d-43d4-89d5-82fad83d3c01" CreationDate="2011-05-20T20:52:01.887" UserId="1430" Comment="edited body; edited title" Text="How do I determine which card is underneath the currently-dragged card in a card game?" />
  <row Id="27541" PostHistoryTypeId="25" PostId="12528" RevisionGUID="0ab71ac4-9e27-429b-a0f0-11af3111be0c" CreationDate="2011-05-20T21:12:26.760" Comment="http://twitter.com/#!/StackGameDev/status/71684732152324096" />
  <row Id="27542" PostHistoryTypeId="2" PostId="12537" RevisionGUID="24e15b1d-f29c-4351-873c-6f2f19cda6f9" CreationDate="2011-05-20T21:13:35.780" UserId="7328" Text="if i understood is what is game goning to look like, i suggest you keep some kind of stack in for each pile of cards you have in the screen, then use your custom control to move cards from one stack to another, using stacks would also have prevent you from unwanted changes where you pick a card from the ones underneath others" />
  <row Id="27543" PostHistoryTypeId="5" PostId="12536" RevisionGUID="69debb02-ea1b-4d50-a0b7-eb1c18f5e222" CreationDate="2011-05-20T21:13:53.223" UserId="4481" Comment="added 128 characters in body; edited body" Text="I'm developing a card game. My custom control works great, but I need help to solve this:&#xD;&#xA;&#xD;&#xA;When I move a card (my custom control) over another card I need to know which card is underneath. Once I know that, I'll be able to put in logic for game rules.&#xD;&#xA;&#xD;&#xA;Thank for any help!&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;I'd like to have some event in cardcontrol like: OnOtherCardControlOver() but I have some difficulty to figure it out." />
  <row Id="27544" PostHistoryTypeId="2" PostId="12538" RevisionGUID="20c0d357-d324-40a4-a1d9-e35c86c48b0b" CreationDate="2011-05-20T21:21:38.533" UserId="7328" Text="I just once stuck with some collision testing like this and the answer was to pack object near each other into groups, then check a simple sphere collision test for every group and if the bullet hits a specific group then check if it realy hits acual object(now using faces) it may still take some time but is far more optimized than a standard face collision checking. and you can make some groups of groups and so on to speedup your collision testing even more." />
  <row Id="27545" PostHistoryTypeId="5" PostId="12514" RevisionGUID="841c449d-e6e3-4d08-ba13-8daf823bee12" CreationDate="2011-05-20T21:29:24.473" UserId="1198" Comment="added 84 characters in body" Text="[http://blenderartists.org/forum/showthread.php?96131-Tutorial-Creating-Skybox-Textures][1]&#xD;&#xA;&#xD;&#xA;This tutorial might seem useful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blenderartists.org/forum/showthread.php?96131-Tutorial-Creating-Skybox-Textures" />
  <row Id="27546" PostHistoryTypeId="5" PostId="12537" RevisionGUID="fbe53dd7-f48e-433e-97d0-76c2844d239b" CreationDate="2011-05-20T21:29:54.923" UserId="7328" Comment="new method based on the new information was givven" Text="if i understood is what is game goning to look like, i suggest you keep some kind of stack in for each pile of cards you have in the screen, then use your custom control to move cards from one stack to another, using stacks would also have prevent you from unwanted changes where you pick a card from the ones underneath others,&#xD;&#xA;&#xD;&#xA;with the new information you gave i think you could still use some kind of stack but now every control has a stack of other controls underneath it. you can also make an array of all your card controllers and when trying to check if some card is underneath another see if their bounding boxes collide. and if so which one was there first (you can use time for the second check)" />
  <row Id="27547" PostHistoryTypeId="2" PostId="12539" RevisionGUID="d7c98bc6-2ce1-4c2d-8197-93044e0c2d76" CreationDate="2011-05-20T21:48:22.653" UserId="51" Text="Since you said your game is free form (i.e. no predefined stacks) your problem basically turns into a collision detection one.  &#xD;&#xA;&#xD;&#xA;Basically your cards are going to have a position on the board and a size.  From there you need to iterate over all the other cards on the board and determine what cards you're overlapping.  &#xD;&#xA;&#xD;&#xA;If you define your cards to be rectangles and don't allow rotation, the problem gets pretty easy.&#xD;&#xA;&#xD;&#xA;Basically you would calculate the 4 corners of your card by offsetting from the card's position half the size of the card, and plugging those numbers in to this formula: http://stackoverflow.com/questions/306316/determine-if-two-rectangles-overlap-each-other/2696876#2696876.  You can either decide to go for a naive solution (i.e. &quot;do they overlap at all&quot;, or go for the area calculation to figure out which card is the &quot;most&quot; covered and use that one.&#xD;&#xA;&#xD;&#xA;The problem gets a little more difficult if you can have cards stacking on top of each other.  You'd basically have to do the same test but in order from top to bottom, where every time you put a card down you assume it's on a higher layer." />
  <row Id="27548" PostHistoryTypeId="5" PostId="12536" RevisionGUID="f212f93e-e24b-405d-a129-42c9b1e37e07" CreationDate="2011-05-20T22:00:59.173" UserId="1198" Comment="deleted 17 characters in body" Text="I'm developing a card game. My custom control works great, but I need help to solve this:&#xD;&#xA;&#xD;&#xA;When I move a card (my custom control) over another card I need to know which card is underneath. Once I know that, I'll be able to put in logic for game rules.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I'd like to have some event in cardcontrol like: OnOtherCardControlOver() but I have some difficulty to figure it out." />
  <row Id="27549" PostHistoryTypeId="5" PostId="12521" RevisionGUID="d506f4b0-991d-4ca9-b521-1adf8c02be32" CreationDate="2011-05-20T22:01:45.757" UserId="1198" Comment="deleted 21 characters in body" Text="I was wondering around, searching internet about particle system and fire effects but I haven't found any good answers. On some games I have realized that some sort of movie is being shown as the fire, which is pretty good but not for the fires which are close to the viewer. Please let me know how to make realistic fire and smoke effect in a game. Also if you have a good sample code or good description of how to make these kinds of cool fires please note them too." />
  <row Id="27550" PostHistoryTypeId="2" PostId="12540" RevisionGUID="f7962da9-fce0-44fe-93eb-fcd8ed0b9396" CreationDate="2011-05-20T22:02:28.733" UserId="51" Text="One of the things that Unity does is provide some helper accessors on the parent game object to provide a more user friendly access to common components.&#xD;&#xA;&#xD;&#xA;For example, you might have your position stored in a Transform component.  Using your example you would have to write something like&#xD;&#xA;&#xD;&#xA;    e.GetComponent&lt;Transform&gt;().position = new Vector3( whatever );&#xD;&#xA;&#xD;&#xA;But in Unity, that gets simplified to&#xD;&#xA;&#xD;&#xA;    e.transform.position = ....;&#xD;&#xA;&#xD;&#xA;Where `transform` is literally just a simple helper method in the base `GameObject` class (`Entity` class in your case) that does&#xD;&#xA;&#xD;&#xA;    Transform transform&#xD;&#xA;    { &#xD;&#xA;        get { return this.GetComponent&lt;Transform&gt;(); }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Unity also does a few other things, like setting a &quot;Name&quot; property on the game object itself instead of in its child components.  &#xD;&#xA;&#xD;&#xA;Personally I don't like the idea of your shared-data-by-name design.  Accessing properties by name instead of by a variable and having the user *also* have to know what type it is just seems really error prone to me.  What Unity does is that they use similar methods as the `GameObject` `transform` property within the `Component` classes to access sibling components.  So any arbitrary component you write can simply do this:&#xD;&#xA;&#xD;&#xA;    var myPos = this.transform.position;&#xD;&#xA;&#xD;&#xA;To access the position.  Where that `transform` property does something like this&#xD;&#xA;&#xD;&#xA;    Transform transform&#xD;&#xA;    {&#xD;&#xA;        get { return this.gameObject.GetComponent&lt;Transform&gt;(); }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Sure, it's a *little* more verbose than just saying `e.position = whatever`, but you get used to it, and it doesn't look as nasty as the generic properties.  And yes, you would have to do it the roundabout way for your client components, but the idea is that all your common &quot;engine&quot; components (renderers, colliders, audio sources, transforms, etc) have the easy accessors." />
  <row Id="27551" PostHistoryTypeId="2" PostId="12541" RevisionGUID="0da7e587-2162-4e14-b34d-bf916fe66712" CreationDate="2011-05-20T22:19:42.150" UserId="7328" Text="i guess you can also use [winBGIm][1] it's very simple (only if you are trying to work with MinGW) and you can also find it's port here [http://www.cs.colorado.edu/~main/bgi/visual/][2]&#xD;&#xA;and if you want to work with specificaly with cisual studio 2010 i think the best way is to use windows GDI it's also as you can see an easy to learn visual tool (this program directly draw on the screen you can also add some code to create a window first!):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	/* *********************************************&#xD;&#xA;	* A simple gdi program&#xD;&#xA;	* ***********************************************/&#xD;&#xA;&#xD;&#xA;	#include &lt;Windows.h&gt;&#xD;&#xA;&#xD;&#xA;	void GdiOut(HDC hdc);&#xD;&#xA;&#xD;&#xA;	int WINAPI WinMain(&#xD;&#xA;	  HINSTANCE hInstance,&#xD;&#xA;	  HINSTANCE hPrevInstance,&#xD;&#xA;	  LPSTR lpCmdLine,&#xD;&#xA;	  int nCmdShow&#xD;&#xA;	  )&#xD;&#xA;	{&#xD;&#xA;	 HDC hdc = GetDC(NULL);&#xD;&#xA;	 GdiOut(hdc);&#xD;&#xA;	 ReleaseDC(NULL, hdc);&#xD;&#xA;&#xD;&#xA;	 return 0;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/* Show how to use the basic GDI functions */&#xD;&#xA;	void GdiOut(HDC hdc)&#xD;&#xA;	{&#xD;&#xA;	 HPEN hPen, hPenOld;&#xD;&#xA;	 HBRUSH hBrush, hBrushOld;&#xD;&#xA;&#xD;&#xA;	 //Initial colors&#xD;&#xA;	 BYTE bRed = 0;&#xD;&#xA;	 BYTE bGreen = 0;&#xD;&#xA;	 BYTE bBlue = 0;&#xD;&#xA;&#xD;&#xA;	 //Pen color&#xD;&#xA;	 COLORREF cPen = RGB(bRed, bGreen, bBlue);&#xD;&#xA;	 //Set the brush color based on the pen color. It is purple partial to blue.&#xD;&#xA;	 COLORREF cBrush = RGB(233,GetGValue(cPen), 255);&#xD;&#xA;	 //Create the pen.&#xD;&#xA;	 hPen = CreatePen(PS_SOLID, 10, cPen);&#xD;&#xA;	 //Create the brush.&#xD;&#xA;	 hBrush = CreateSolidBrush(cBrush);&#xD;&#xA;	 //Select the pen and brush. Just like set the drawing arguments.&#xD;&#xA;	 hPenOld = (HPEN)SelectObject(hdc, hPen);&#xD;&#xA;	 hBrushOld = (HBRUSH)SelectObject(hdc, hBrush);&#xD;&#xA;&#xD;&#xA;	 //Draw a triangle&#xD;&#xA;	 MoveToEx(hdc, 30, 10, NULL);&#xD;&#xA;	 LineTo(hdc, 10, 50);&#xD;&#xA;	 LineTo(hdc, 50, 50);&#xD;&#xA;	 LineTo(hdc, 30, 10);&#xD;&#xA;	 //Use the old pen&#xD;&#xA;	 SelectObject(hdc,hPenOld);&#xD;&#xA;	 //Draw and fill an ellipse&#xD;&#xA;	 Ellipse(hdc, 10, 60, 110, 160);&#xD;&#xA;&#xD;&#xA;	 //Release the resources&#xD;&#xA;	 DeleteObject(hPen);&#xD;&#xA;	 SelectObject(hdc, hBrushOld);&#xD;&#xA;	 DeleteObject(hBrush);&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://winbgim.codecutter.org/&#xD;&#xA;  [2]:http://www.cs.colorado.edu/~main/bgi/visual/&#xD;&#xA;" />
  <row Id="27552" PostHistoryTypeId="2" PostId="12542" RevisionGUID="e0edb3ec-676f-4ee9-b9c2-8bdea025608f" CreationDate="2011-05-20T23:17:03.460" UserId="1230" Text="I have an array of sprites that I are displayed in-order to make an animation. There is code in an update loop that has access to a value 'time' indicating how far along the animation is. Time is a float between 0 and 1 inclusive. It uses this value to calculate which frame to display.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    update(time) {&#xD;&#xA;      frames // An array of animation frames&#xD;&#xA;      current_frame_index = time / animation_length&#xD;&#xA;      display_frame(frame[current_frame_index])&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This works if you assume that each frame is displayed for the same amount of time.&#xD;&#xA;&#xD;&#xA;I would like to enhance this by allowing frames to have arbitrarily defined durations. So if I have a set of frames and durations:&#xD;&#xA;&#xD;&#xA;    name           duration&#xD;&#xA;&#xD;&#xA;    frame_one      0.2&#xD;&#xA;    frame_two      1.1&#xD;&#xA;    frame_three    1.0&#xD;&#xA;    frame_four     0.75&#xD;&#xA;    frame_five     1.4&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and a value indicating the animation's progress, how can I determine which frame to display?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;" />
  <row Id="27553" PostHistoryTypeId="1" PostId="12542" RevisionGUID="e0edb3ec-676f-4ee9-b9c2-8bdea025608f" CreationDate="2011-05-20T23:17:03.460" UserId="1230" Text="Determine animation frame from interval" />
  <row Id="27554" PostHistoryTypeId="3" PostId="12542" RevisionGUID="e0edb3ec-676f-4ee9-b9c2-8bdea025608f" CreationDate="2011-05-20T23:17:03.460" UserId="1230" Text="&lt;2d&gt;&lt;animation&gt;&lt;cocos2d-iphone&gt;&lt;timer&gt;" />
  <row Id="27555" PostHistoryTypeId="2" PostId="12543" RevisionGUID="3070626a-f75a-446c-9191-62da566fc19b" CreationDate="2011-05-20T23:40:39.713" UserId="51" Text="Usually what I do in these kinds of situations is basically do what you do in the first loop, but insert an abstraction between &quot;frame number&quot; and &quot;texture asset&quot; (or UVs, if you will).&#xD;&#xA;&#xD;&#xA;Basically, change `frames[current_frame_index]` to do a lookup in a table that you define for a given animation.  You can set up a data structure that still works in &quot;frames&quot;, but maybe with a higher frame rate to give you more precision.  &#xD;&#xA;&#xD;&#xA;A simple example would be something like this:&#xD;&#xA;&#xD;&#xA;    animation_frame | texture_index&#xD;&#xA;    0               | 0&#xD;&#xA;    1-8             | 1&#xD;&#xA;    9-12            | 2&#xD;&#xA;    etc&#xD;&#xA;&#xD;&#xA;You can convert that to a list so you can do a lookup by animation frame index into texture index." />
  <row Id="27556" PostHistoryTypeId="2" PostId="12544" RevisionGUID="909ee107-347b-4d1a-bd3e-b912072462fb" CreationDate="2011-05-20T23:43:34.550" UserId="4443" Text="While probably not that optimized, this would move to the next frame when the time value was beyond the sum of the durations of each frame.&#xD;&#xA;&#xD;&#xA;    update(time)&#xD;&#xA;    {&#xD;&#xA;        frames // an array of animation frames&#xD;&#xA;        fFrameLength = 0;&#xD;&#xA;        foreach(frame in frames)&#xD;&#xA;        {&#xD;&#xA;            fFrameLength += frame.duration&#xD;&#xA;            if ( fFrameLength &gt; time )&#xD;&#xA;                display_frame(frame)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="27557" PostHistoryTypeId="25" PostId="12542" RevisionGUID="bdf8cf52-0cc2-42ca-81da-1febcb6dac73" CreationDate="2011-05-21T00:12:27.563" Comment="http://twitter.com/#!/StackGameDev/status/71730033911283712" />
  <row Id="27559" PostHistoryTypeId="25" PostId="12524" RevisionGUID="3185a100-d5d0-4060-bb64-f2bba619d891" CreationDate="2011-05-21T03:12:28.457" Comment="http://twitter.com/#!/StackGameDev/status/71775335888326656" />
  <row Id="27561" PostHistoryTypeId="2" PostId="12546" RevisionGUID="4b12638d-6ed9-4a6d-9a32-efe312422ffe" CreationDate="2011-05-21T04:38:59.643" UserId="7460" Text="http://roguebasin.roguelikedevelopment.org/index.php?title=Roguelike_Dev_FAQ#How_are_dungeons_generated.3F" />
  <row Id="27562" PostHistoryTypeId="25" PostId="12536" RevisionGUID="ed419ace-9f32-4765-a8dc-b86e1fccb50d" CreationDate="2011-05-21T06:12:27.780" Comment="http://twitter.com/#!/StackGameDev/status/71820631615868928" />
  <row Id="27563" PostHistoryTypeId="2" PostId="12547" RevisionGUID="a52efbdc-7467-437a-a06d-95cd8a05535e" CreationDate="2011-05-21T07:18:06.850" UserId="7328" Text="though james answer is right you can also get to where you want using my implementation&#xD;&#xA;&#xD;&#xA;	void update(float dt)&#xD;&#xA;	{&#xD;&#xA;		nextframe -= dt;&#xD;&#xA;		if (nextframe &lt; 0)&#xD;&#xA;		{&#xD;&#xA;			nextframe += frametime[frame_index];&#xD;&#xA;			display_frame(frame[frame_index]);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27564" PostHistoryTypeId="2" PostId="12548" RevisionGUID="328d594a-ad6a-459f-b114-36e290dcd7ee" CreationDate="2011-05-21T08:57:44.160" UserId="3794" Text="How to create prerendered effect is another question. You can create fires, smoke etc in Autodesk Maya. It has very strong fluid solver (fluids means fire, smoke, nebulas or even fog ...). This can be also putted into sequence of files and played.&#xD;&#xA;&#xD;&#xA;**For real smoke/fire etc. simulation**, you can implement physically correct (or very near to it) fluid solver is based on 3D grid and Navier-Stokes equations - which refers to volumetric rendering. Lots of techniques exists, but to make long story short - it is possible on the gpu - and it is very fast. &#xD;&#xA;&#xD;&#xA;Simulation is little harder, but basicly it is computing new values for each voxel based on some settings - Great for gpgpu computing. &#xD;&#xA;Volume rendering is that possible with taking lights in scene into account. Using opacity maps, such Fourier opacity maps, which are one of the newest (paper from 2010). Result can be see here (this is volumetric rendering in our engine, with shadows using Fourier opacity maps, number in the left upper corner says number of FFT coefficients):&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/bXYP6.png" />
  <row Id="27565" PostHistoryTypeId="25" PostId="12518" RevisionGUID="025506ec-d545-4ed5-a020-374132de413e" CreationDate="2011-05-21T09:12:28.410" Comment="http://twitter.com/#!/StackGameDev/status/71865932502413312" />
  <row Id="27566" PostHistoryTypeId="2" PostId="12549" RevisionGUID="33005afd-7615-4a9b-b752-bd2b11e92425" CreationDate="2011-05-21T09:23:54.163" UserId="1588" Text="Ask for payment but allow people to download it without paying.&#xD;&#xA;&#xD;&#xA;That way people can try the full game easily, and they know you wish to be paid, and they know you respect them as you've allowed them to try and keep the entire game at no risk to themselves.  If they have a **happy experience** they may be come back to give you money. (This is the model I'll be using for my game.)&#xD;&#xA;&#xD;&#xA;Keep the purchase price above $5, there is a lot of fraud/hassle with credit card purchases $5 and under." />
  <row Id="27570" PostHistoryTypeId="2" PostId="12551" RevisionGUID="d5ecda7a-dd06-48d5-a63f-b37c8cbe3a43" CreationDate="2011-05-21T09:46:51.510" UserId="7505" Text="0 down vote favorite&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;Hello&#xD;&#xA;&#xD;&#xA;I want to pick up a language that will allow me to create 2d/3d game environments.&#xD;&#xA;&#xD;&#xA;I'm considering Java/ Actionscript 3 / some variant of C.&#xD;&#xA;&#xD;&#xA;I'm pretty good at picking new languages up so that isn't a consideration.&#xD;&#xA;&#xD;&#xA;I have briefly tried Java and ActionScript 3 and the problem is that I'm having difficulty seeing what the strengths of each language are (that is without learning the entire language anyway).&#xD;&#xA;&#xD;&#xA;So if a few people could champion their tool of choice, what strengths/weaknesses it offers for game development (feel free to include commercial advantages!), that would certainly help me, it may help others too.&#xD;&#xA;" />
  <row Id="27571" PostHistoryTypeId="1" PostId="12551" RevisionGUID="d5ecda7a-dd06-48d5-a63f-b37c8cbe3a43" CreationDate="2011-05-21T09:46:51.510" UserId="7505" Text="Languages for creating 3d / 2.5d enviroments" />
  <row Id="27572" PostHistoryTypeId="3" PostId="12551" RevisionGUID="d5ecda7a-dd06-48d5-a63f-b37c8cbe3a43" CreationDate="2011-05-21T09:46:51.510" UserId="7505" Text="&lt;language-choice&gt;" />
  <row Id="27573" PostHistoryTypeId="5" PostId="12551" RevisionGUID="cea10d87-a263-477a-b270-b1040cf76e7f" CreationDate="2011-05-21T09:48:56.833" UserId="1156" Comment="deleted 34 characters in body; edited tags" Text="I want to pick up a language that will allow me to create 2d/3d game environments.&#xD;&#xA;&#xD;&#xA;I'm considering Java, Actionscript 3, or some variant of C.&#xD;&#xA;&#xD;&#xA;I'm pretty good at picking new languages up so that isn't a consideration.&#xD;&#xA;&#xD;&#xA;I have briefly tried Java and ActionScript 3 and the problem is that I'm having difficulty seeing what the strengths of each language are (that is without learning the entire language anyway).&#xD;&#xA;&#xD;&#xA;So if a few people could champion their tool of choice, what strengths/weaknesses it offers for game development (feel free to include commercial advantages!), that would certainly help me, it may help others too.&#xD;&#xA;" />
  <row Id="27574" PostHistoryTypeId="6" PostId="12551" RevisionGUID="cea10d87-a263-477a-b270-b1040cf76e7f" CreationDate="2011-05-21T09:48:56.833" UserId="1156" Comment="deleted 34 characters in body; edited tags" Text="&lt;3d&gt;&lt;language-choice&gt;&lt;2.5d&gt;" />
  <row Id="27575" PostHistoryTypeId="5" PostId="12551" RevisionGUID="4bf2be32-80df-4a64-b0f8-ae1b6e47f5cd" CreationDate="2011-05-21T09:53:37.213" UserId="7505" Comment="added 257 characters in body" Text="I want to pick up a language that will allow me to create 2d/3d game environments. I come from web development using PHP, JS, XML and ideally I want to be able to integrate with those languages. I want to deploy to the web and to PC / Mac.&#xD;&#xA;&#xD;&#xA;I'm considering Java, Actionscript 3, or some variant of C.&#xD;&#xA;&#xD;&#xA;I'm pretty good at picking new languages up so that isn't a consideration.&#xD;&#xA;&#xD;&#xA;I have briefly tried Java and ActionScript 3 and the problem is that I'm having difficulty seeing what the strengths of each language are (that is without learning the entire language anyway).&#xD;&#xA;&#xD;&#xA;So if a few people could champion their tool of choice, what strengths/weaknesses it offers for game development (feel free to include commercial advantages!), that would certainly help me, it may help others too.&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;communistduck - you edited before I even added some afterthoughts? How fast do you work?!" />
  <row Id="27576" PostHistoryTypeId="2" PostId="12552" RevisionGUID="51370e85-f88e-426a-a168-60600bccf493" CreationDate="2011-05-21T09:55:41.090" UserId="1156" Text="I would firmly vote for [Unity3D][1]. The environment is great, it is fast, it can deploy to all of those platforms (plus iOS I believe).&#xD;&#xA;&#xD;&#xA;You can also reuse your JavaScript skills to script it (as well as C#, if you want).&#xD;&#xA;&#xD;&#xA;In terms of 2.5D, you'll just want to fix the camera along an axis.&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="27578" PostHistoryTypeId="2" PostId="12553" RevisionGUID="d9423cee-999d-4f05-a40a-c145107f890e" CreationDate="2011-05-21T10:02:08.713" UserId="1588" Text="Designing Ethical Dilemmas - Slides and Audio&#xD;&#xA;http://designrampage.blogspot.com/2009/06/designing-ethical-dilemmas-slides-and.html&#xD;&#xA;&#xD;&#xA;Interesting Mechanics by Brian Green&#xD;&#xA;http://psychochild.org/?cat=248&#xD;&#xA;&#xD;&#xA;Design lessons by Brian Green&#xD;&#xA;http://psychochild.org/?cat=12&#xD;&#xA;&#xD;&#xA;Games and storytelling, includes controlled branches - Ruben R. Puentedura, Ph.D&#xD;&#xA;http://hippasus.com/resources/gameandlearn/slides/7_GamesAndStorytelling.pdf&#xD;&#xA;&#xD;&#xA;Permanent Death - The Complete Saga (play-through with one life in an open world, no restart)&#xD;&#xA;http://drgamelove.blogspot.com/2009/12/permanent-death-complete-saga.html" />
  <row Id="27579" PostHistoryTypeId="2" PostId="12554" RevisionGUID="29ce2587-3695-43a1-861c-42eeef97fd17" CreationDate="2011-05-21T11:26:48.403" UserId="7507" Text="As the developer of ChatBlade we don't know of any current competitors.  Many MMOs can ship with excellent, hand rolled chat such as Rift or SWG, but other AAA titles such as Age of Conan or DC Universe Online release with broken chat and can lose subscribers due to this.  &#xD;&#xA;&#xD;&#xA;Before creating ChatBlade I worked on Chat for another MMO initially using IRC.  The public IRC source I found at the time was terrible.  Incredibly ancient C (so old the parameter types were put after the parentheses in the function declarations).  A message would go in and sometimes take 5 minutes to come out, from a server across the room.  If you go with an IRC base try and use a more modern release.  &#xD;&#xA;&#xD;&#xA;If you are interested in ChatBlade we can offer deferred payments or other pricing flexibility.  &#xD;&#xA;&#xD;&#xA;Full ChatBlade documentation is online so if you want to use that as an outline to roll your own Chat, feel free as well.  &#xD;&#xA;http://www.chatblade.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27580" PostHistoryTypeId="2" PostId="12555" RevisionGUID="7f8b65e3-ce26-419b-93bc-de2715a854a3" CreationDate="2011-05-21T11:36:34.497" UserId="6728" Text="I'm creating a side scroller and I'm have a problem with my collision detection.&#xD;&#xA;&#xD;&#xA;The collision detection works perfect when the player is falling in a constant speed, but when I implement more realistic gravity, then the player falls to fast. Resulting in that the collision will be checked with the tiles under the floor/platform causing that the player can jump trough platforms.&#xD;&#xA;&#xD;&#xA;The way my update and collision works is like following:&#xD;&#xA;&#xD;&#xA;- Update entities velocity (no position change)&#xD;&#xA;- Check for collisions (first x, then y)&#xD;&#xA;  - if collision, then move the entity as close as possible, otherwise set the position with the velocity.&#xD;&#xA;&#xD;&#xA;The collision method works like this:&#xD;&#xA;&#xD;&#xA;- Get the four corners of the player.&#xD;&#xA;- Get from that four corners the tiles.&#xD;&#xA;- Collision check.&#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27581" PostHistoryTypeId="1" PostId="12555" RevisionGUID="7f8b65e3-ce26-419b-93bc-de2715a854a3" CreationDate="2011-05-21T11:36:34.497" UserId="6728" Text="Tile based collision detection: Failing when player is going to fast." />
  <row Id="27582" PostHistoryTypeId="3" PostId="12555" RevisionGUID="7f8b65e3-ce26-419b-93bc-de2715a854a3" CreationDate="2011-05-21T11:36:34.497" UserId="6728" Text="&lt;collision-detection&gt;&lt;tiles&gt;" />
  <row Id="27583" PostHistoryTypeId="2" PostId="12556" RevisionGUID="b312c0e6-0a48-4bae-8fc6-687b046255b7" CreationDate="2011-05-21T11:54:43.803" UserId="1258" Text="To expand on Kylotan's answer, if you're using C# 4.0, you can statically type a variable to be [dynamic](http://en.wikipedia.org/wiki/C_Sharp_4.0#Dynamic_member_lookup).&#xD;&#xA;&#xD;&#xA;If you inherit from System.Dynamic.DynamicObject, you can override TryGetMember and TrySetMember (among the many virtual methods) to intercept component names and return the requested component.&#xD;&#xA;&#xD;&#xA;    dynamic entity = EntityRegistry.Entities[1000];&#xD;&#xA;    entity.MyComponent.MyValue = 100;&#xD;&#xA;&#xD;&#xA;I wrote a bit about entity systems over the years, but I assume I can't compete with the giants. [Some ES notes](http://rainweaver.codeplex.com/documentation) (somewhat outdated and do not necessarily reflect my current understanding of entity systems, but it's worth a read, imho)." />
  <row Id="27584" PostHistoryTypeId="2" PostId="12557" RevisionGUID="ad193fd0-41ff-4bc6-83f2-45afc1f11ec6" CreationDate="2011-05-21T11:57:14.160" UserId="1386" Text="I know of two ways that will solve this problem.&#xD;&#xA;&#xD;&#xA;**First method**&#xD;&#xA;&#xD;&#xA;You can use fixed timestep physics with a high enough frequency that you will detect all the collisions.&#xD;&#xA;&#xD;&#xA;What this means is that you will decide on a physics update delta, e.g. 1/60th of a second. Then for each frame of your game you'll calculate how much time has passed since the last frame, divide this by the physics update delta. This is how many physics updates you have to do that frame. In other words, instead of doing a single physics update and then collision check, you will be doing many smaller updates. This is probably the easiest solution to implement, but may not be practical, depending on how small your collision items are, and how fast they move.&#xD;&#xA;&#xD;&#xA;[See this question][1] which compares fixed and variable timestep (and there's some useful links in the question itself).&#xD;&#xA;&#xD;&#xA;**Second method**&#xD;&#xA;&#xD;&#xA;You can to calculate the vector between the current position of the player and the projected position of the player, and do your collisions between this line and the platforms.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="27585" PostHistoryTypeId="5" PostId="12555" RevisionGUID="7415c224-14c6-49be-97ec-4c17eaaf3cc2" CreationDate="2011-05-21T12:05:44.543" UserId="1156" Comment="added 2 characters in body; edited title" Text="I'm creating a side scroller and I'm have a problem with my collision detection.&#xD;&#xA;&#xD;&#xA;The collision detection works perfect when the player is falling at a constant speed, but when I implement more realistic gravity the player falls too fast - resulting in that the collision will be checked with the tiles under the floor/platform causing the player to be able to jump through platforms.&#xD;&#xA;&#xD;&#xA;The way my update and collision works is like following:&#xD;&#xA;&#xD;&#xA;- Update entities velocity (no position change)&#xD;&#xA;- Check for collisions (first x, then y)&#xD;&#xA;  - if collision, then move the entity as close as possible, otherwise set the position with the velocity.&#xD;&#xA;&#xD;&#xA;The collision method works like this:&#xD;&#xA;&#xD;&#xA;- Get the four corners of the player.&#xD;&#xA;- Get from that four corners the tiles.&#xD;&#xA;- Collision check.&#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27586" PostHistoryTypeId="4" PostId="12555" RevisionGUID="7415c224-14c6-49be-97ec-4c17eaaf3cc2" CreationDate="2011-05-21T12:05:44.543" UserId="1156" Comment="added 2 characters in body; edited title" Text="Tile based collision detection failing when player is going too fast" />
  <row Id="27587" PostHistoryTypeId="5" PostId="12557" RevisionGUID="fb9e367f-0adf-4412-a895-21f2a1daa8c5" CreationDate="2011-05-21T12:11:38.700" UserId="1386" Comment="added 343 characters in body" Text="I know of two ways that will solve this problem.&#xD;&#xA;&#xD;&#xA;**First method: Fixed Time Step Physics**&#xD;&#xA;&#xD;&#xA;You can use fixed timestep physics with a high enough frequency that you will detect all the collisions.&#xD;&#xA;&#xD;&#xA;What this means is that you will decide on a physics update delta, e.g. 1/60th of a second. Then for each frame of your game you'll calculate how much time has passed since the last frame, divide this by the physics update delta. This is how many physics updates you have to do that frame. In other words, instead of doing a single physics update and then collision check, you will be doing many smaller updates.&#xD;&#xA;&#xD;&#xA; - **Pros:** This is probably the easiest solution to implement&#xD;&#xA; - **Cons:** May not be practical, depending on how small your collision&#xD;&#xA;   items are, and how fast they move.&#xD;&#xA;&#xD;&#xA;[See this question][1] which compares fixed and variable timestep (and there's some useful links in the question itself).&#xD;&#xA;&#xD;&#xA;**Second method: Swept Collision Detection**&#xD;&#xA;&#xD;&#xA;You can to calculate the vector between the current position of the player and the projected position of the player, and do your collisions between this line and the platforms.&#xD;&#xA;&#xD;&#xA; - **Pros:** Would work even with very very fast moving and small bodies.&#xD;&#xA; - **Cons:** Movement in reality due to gravity won't be a straight line,&#xD;&#xA;   sweeping/integrating the path of multiple accelerating bodies is&#xD;&#xA;   potentially a difficult maths problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="27588" PostHistoryTypeId="25" PostId="12555" RevisionGUID="7da5facc-d446-4ff5-ac17-359fc5081be6" CreationDate="2011-05-21T12:12:28.427" Comment="http://twitter.com/#!/StackGameDev/status/71911231631532032" />
  <row Id="27589" PostHistoryTypeId="5" PostId="12555" RevisionGUID="8dccdb00-4bab-490a-a355-147b11f7084b" CreationDate="2011-05-21T12:49:20.797" UserId="6728" Comment="added 6079 characters in body" Text="I'm creating a side scroller and I'm have a problem with my collision detection.&#xD;&#xA;&#xD;&#xA;The collision detection works perfect when the player is falling at a constant speed, but when I implement more realistic gravity the player falls too fast - resulting in that the collision will be checked with the tiles under the floor/platform causing the player to be able to jump through platforms.&#xD;&#xA;&#xD;&#xA;The way my update and collision works is like following:&#xD;&#xA;&#xD;&#xA;- Update entities velocity (no position change)&#xD;&#xA;- Check for collisions (first x, then y)&#xD;&#xA;  - if collision, then move the entity as close as possible, otherwise set the position with the velocity.&#xD;&#xA;&#xD;&#xA;The collision method works like this:&#xD;&#xA;&#xD;&#xA;- Get the four corners of the player.&#xD;&#xA;- Get from that four corners the tiles.&#xD;&#xA;- Collision check.&#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;UPDATE&#xD;&#xA;-----&#xD;&#xA;Added the code to make it more clear.&#xD;&#xA;&#xD;&#xA;The main loop:&#xD;&#xA;&#xD;&#xA;    _frames_a_sec = 20;    &#xD;&#xA;    public void run() {&#xD;&#xA;            while(true) {&#xD;&#xA;                long timeElapsed = System.currentTimeMillis() - _lastUpdate;&#xD;&#xA;                _lastUpdate = System.currentTimeMillis();&#xD;&#xA;    &#xD;&#xA;                if(timeElapsed &gt; 80) {&#xD;&#xA;                    timeElapsed = 80;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                update((int)timeElapsed);&#xD;&#xA;    &#xD;&#xA;                try {&#xD;&#xA;                    Thread.sleep((1000/_FRAMES_A_SEC));&#xD;&#xA;                } catch(Exception ex) { }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Map update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            //update entities&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                entity.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //check for collisions&#xD;&#xA;            checkMapCollision();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Entity (abstract) update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            _velocity.x = 0.0F;&#xD;&#xA;    &#xD;&#xA;            if(!_isOnLand) {&#xD;&#xA;            //add gravity&#xD;&#xA;            _velocity.y += Map._GRAVITY_PER_SEC * timeElapsed;&#xD;&#xA;        } else {&#xD;&#xA;            _velocity.y = 0.0F;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Mario (extends Entity) update method:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public void update(int timeElapsed) {&#xD;&#xA;            super.update(timeElapsed);&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.IDLE) {&#xD;&#xA;                &#xD;&#xA;            } else if(_isMoving) {&#xD;&#xA;                _marioSmallWalk.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.JUMPING) {&#xD;&#xA;                setVelocityY(getVelocity().y + _jumpSpeed);&#xD;&#xA;    &#xD;&#xA;                _jumpSpeed += _JUMP_DECREASE * timeElapsed;&#xD;&#xA;    &#xD;&#xA;                //falling?&#xD;&#xA;                if(getVelocity().y &gt; 0) {&#xD;&#xA;                    setState(STATES.FALLING);&#xD;&#xA;                }&#xD;&#xA;            } &#xD;&#xA;            &#xD;&#xA;            if(_isMoving) {&#xD;&#xA;                double walkSpd = (_WALK_SPEED_SEC * timeElapsed);&#xD;&#xA;    &#xD;&#xA;                if(getFacing() == FACING.LEFT) {&#xD;&#xA;                    walkSpd = -walkSpd;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                setVelocityX(getVelocity().x + walkSpd);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //falling?&#xD;&#xA;            if(getVelocity().y &gt; (Map._GRAVITY_PER_SEC * timeElapsed) + 1.0F) {&#xD;&#xA;                setState(STATES.FALLING);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Map Collsion check method:&#xD;&#xA;&#xD;&#xA;    public void checkMapCollision() {&#xD;&#xA;        for(Entity entity : _mapEntities) {&#xD;&#xA;            placeEntityAtX(entity);&#xD;&#xA;            placeEntityAtY(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;X check method:&#xD;&#xA;&#xD;&#xA;    private void placeEntityAtX(Entity entity) {&#xD;&#xA;            Vector2d dir = entity.getDirection();&#xD;&#xA;            Rectangle bounds = entity.getBounds();&#xD;&#xA;            boolean positionSet = false;&#xD;&#xA;    &#xD;&#xA;            bounds = new Rectangle((int)(bounds.x + dir.x), bounds.y, bounds.width, bounds.height);&#xD;&#xA;            Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;            if(dir.x &gt; 0) {&#xD;&#xA;                if(corners[1].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                    if(corners[3].isSolid()) {&#xD;&#xA;                        blkBounds = corners[3].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[1].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionX(blkBounds.x - (bounds.width-entity.getCurrentSprite().getOffsetX())-1);&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                }&#xD;&#xA;            } else if(dir.x &lt; 0) {&#xD;&#xA;                if(corners[0].isSolid() || corners[2].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                    if(corners[2].isSolid()) {&#xD;&#xA;                        blkBounds = corners[2].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[0].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionX(blkBounds.x + blkBounds.width + (bounds.width/2) + 1);&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(!positionSet) {&#xD;&#xA;                //set the original position&#xD;&#xA;                entity.setPositionX((int)(entity.getX() + dir.x));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and the y:&#xD;&#xA;&#xD;&#xA;    private void placeEntityAtY(Entity entity) {&#xD;&#xA;            Vector2d dir = entity.getDirection();&#xD;&#xA;            Rectangle bounds = entity.getBounds();&#xD;&#xA;            boolean positionSet = false;&#xD;&#xA;    &#xD;&#xA;            bounds = new Rectangle(bounds.x, (int)(bounds.y + dir.y), bounds.width, bounds.height);&#xD;&#xA;            Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;            //moving down&#xD;&#xA;            if(dir.y &gt; 0) {&#xD;&#xA;                if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                    if(corners[2].isSolid()) {&#xD;&#xA;                        blkBounds = corners[2].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[3].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionY(blkBounds.y);&#xD;&#xA;                    entity.landed();&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                } &#xD;&#xA;            } else if (dir.y &lt; 0) {&#xD;&#xA;                if(corners[0].isSolid() || corners[1].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                    if(corners[0].isSolid()) {&#xD;&#xA;                        blkBounds = corners[0].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[1].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionY(blkBounds.y + blkBounds.height + bounds.height);&#xD;&#xA;                    entity.roof();&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                }&#xD;&#xA;            } else {&#xD;&#xA;                if(!corners[2].isSolid() &amp;&amp; !corners[3].isSolid()) {&#xD;&#xA;                    entity.falling();&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(!positionSet) {&#xD;&#xA;                //set the original position&#xD;&#xA;                entity.setPositionY((int)(entity.getY() + dir.y));&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="27590" PostHistoryTypeId="5" PostId="12555" RevisionGUID="f4606d97-382e-404d-96cd-fc318113e71e" CreationDate="2011-05-21T12:57:21.337" UserId="6728" Comment="edited body" Text="I'm creating a side scroller and I'm have a problem with my collision detection.&#xD;&#xA;&#xD;&#xA;The collision detection works perfect when the player is falling at a constant speed, but when I implement more realistic gravity the player falls too fast - resulting in that the collision will be checked with the tiles under the floor/platform causing the player to be able to jump through platforms.&#xD;&#xA;&#xD;&#xA;The way my update and collision works is like following:&#xD;&#xA;&#xD;&#xA;- Update entities velocity (no position change)&#xD;&#xA;- Check for collisions (first x, then y)&#xD;&#xA;  - if collision, then move the entity as close as possible, otherwise set the position with the velocity.&#xD;&#xA;&#xD;&#xA;The collision method works like this:&#xD;&#xA;&#xD;&#xA;- Get the four corners of the player.&#xD;&#xA;- Get from that four corners the tiles.&#xD;&#xA;- Collision check.&#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;UPDATE&#xD;&#xA;-----&#xD;&#xA;Added the code to make it more clear.&#xD;&#xA;&#xD;&#xA;The main loop:&#xD;&#xA;&#xD;&#xA;    _frames_a_sec = 60;    &#xD;&#xA;    public void run() {&#xD;&#xA;            while(true) {&#xD;&#xA;                long timeElapsed = System.currentTimeMillis() - _lastUpdate;&#xD;&#xA;                _lastUpdate = System.currentTimeMillis();&#xD;&#xA;    &#xD;&#xA;                if(timeElapsed &gt; 80) {&#xD;&#xA;                    timeElapsed = 80;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                update((int)timeElapsed);&#xD;&#xA;    &#xD;&#xA;                try {&#xD;&#xA;                    Thread.sleep((1000/_FRAMES_A_SEC));&#xD;&#xA;                } catch(Exception ex) { }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Map update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            //update entities&#xD;&#xA;            for(Entity entity : _mapEntities) {&#xD;&#xA;                entity.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //check for collisions&#xD;&#xA;            checkMapCollision();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Entity (abstract) update method:&#xD;&#xA;&#xD;&#xA;    public void update(int timeElapsed) {&#xD;&#xA;            _velocity.x = 0.0F;&#xD;&#xA;    &#xD;&#xA;            if(!_isOnLand) {&#xD;&#xA;            //add gravity&#xD;&#xA;            _velocity.y += Map._GRAVITY_PER_SEC * timeElapsed;&#xD;&#xA;        } else {&#xD;&#xA;            _velocity.y = 0.0F;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Mario (extends Entity) update method:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;        public void update(int timeElapsed) {&#xD;&#xA;            super.update(timeElapsed);&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.IDLE) {&#xD;&#xA;                &#xD;&#xA;            } else if(_isMoving) {&#xD;&#xA;                _marioSmallWalk.update(timeElapsed);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(_state == STATES.JUMPING) {&#xD;&#xA;                setVelocityY(getVelocity().y + _jumpSpeed);&#xD;&#xA;    &#xD;&#xA;                _jumpSpeed += _JUMP_DECREASE * timeElapsed;&#xD;&#xA;    &#xD;&#xA;                //falling?&#xD;&#xA;                if(getVelocity().y &gt; 0) {&#xD;&#xA;                    setState(STATES.FALLING);&#xD;&#xA;                }&#xD;&#xA;            } &#xD;&#xA;            &#xD;&#xA;            if(_isMoving) {&#xD;&#xA;                double walkSpd = (_WALK_SPEED_SEC * timeElapsed);&#xD;&#xA;    &#xD;&#xA;                if(getFacing() == FACING.LEFT) {&#xD;&#xA;                    walkSpd = -walkSpd;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                setVelocityX(getVelocity().x + walkSpd);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            //falling?&#xD;&#xA;            if(getVelocity().y &gt; (Map._GRAVITY_PER_SEC * timeElapsed) + 1.0F) {&#xD;&#xA;                setState(STATES.FALLING);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Map Collsion check method:&#xD;&#xA;&#xD;&#xA;    public void checkMapCollision() {&#xD;&#xA;        for(Entity entity : _mapEntities) {&#xD;&#xA;            placeEntityAtX(entity);&#xD;&#xA;            placeEntityAtY(entity);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;X check method:&#xD;&#xA;&#xD;&#xA;    private void placeEntityAtX(Entity entity) {&#xD;&#xA;            Vector2d dir = entity.getDirection();&#xD;&#xA;            Rectangle bounds = entity.getBounds();&#xD;&#xA;            boolean positionSet = false;&#xD;&#xA;    &#xD;&#xA;            bounds = new Rectangle((int)(bounds.x + dir.x), bounds.y, bounds.width, bounds.height);&#xD;&#xA;            Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;            if(dir.x &gt; 0) {&#xD;&#xA;                if(corners[1].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                    if(corners[3].isSolid()) {&#xD;&#xA;                        blkBounds = corners[3].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[1].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionX(blkBounds.x - (bounds.width-entity.getCurrentSprite().getOffsetX())-1);&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                }&#xD;&#xA;            } else if(dir.x &lt; 0) {&#xD;&#xA;                if(corners[0].isSolid() || corners[2].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds;&#xD;&#xA;    &#xD;&#xA;                    if(corners[2].isSolid()) {&#xD;&#xA;                        blkBounds = corners[2].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[0].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionX(blkBounds.x + blkBounds.width + (bounds.width/2) + 1);&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(!positionSet) {&#xD;&#xA;                //set the original position&#xD;&#xA;                entity.setPositionX((int)(entity.getX() + dir.x));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and the y:&#xD;&#xA;&#xD;&#xA;    private void placeEntityAtY(Entity entity) {&#xD;&#xA;            Vector2d dir = entity.getDirection();&#xD;&#xA;            Rectangle bounds = entity.getBounds();&#xD;&#xA;            boolean positionSet = false;&#xD;&#xA;    &#xD;&#xA;            bounds = new Rectangle(bounds.x, (int)(bounds.y + dir.y), bounds.width, bounds.height);&#xD;&#xA;            Block[] corners = getCornerBlocks(bounds);&#xD;&#xA;    &#xD;&#xA;            //moving down&#xD;&#xA;            if(dir.y &gt; 0) {&#xD;&#xA;                if(corners[2].isSolid() || corners[3].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                    if(corners[2].isSolid()) {&#xD;&#xA;                        blkBounds = corners[2].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[3].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionY(blkBounds.y);&#xD;&#xA;                    entity.landed();&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                } &#xD;&#xA;            } else if (dir.y &lt; 0) {&#xD;&#xA;                if(corners[0].isSolid() || corners[1].isSolid()) {&#xD;&#xA;                    Rectangle blkBounds = null;&#xD;&#xA;    &#xD;&#xA;                    if(corners[0].isSolid()) {&#xD;&#xA;                        blkBounds = corners[0].getBounds();&#xD;&#xA;                    } else {&#xD;&#xA;                        blkBounds = corners[1].getBounds();&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    entity.setPositionY(blkBounds.y + blkBounds.height + bounds.height);&#xD;&#xA;                    entity.roof();&#xD;&#xA;                    positionSet = true;&#xD;&#xA;                }&#xD;&#xA;            } else {&#xD;&#xA;                if(!corners[2].isSolid() &amp;&amp; !corners[3].isSolid()) {&#xD;&#xA;                    entity.falling();&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            if(!positionSet) {&#xD;&#xA;                //set the original position&#xD;&#xA;                entity.setPositionY((int)(entity.getY() + dir.y));&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="27591" PostHistoryTypeId="2" PostId="12558" RevisionGUID="9f7ceadb-e661-4474-b2c7-f9967f909e1f" CreationDate="2011-05-21T13:19:11.023" UserId="7359" Text="I am writing a game in XNA 4 and I want to have something like a corridor. Do you think that is better to use one big and solid model or use small parts (window, stairs, door...)?" />
  <row Id="27592" PostHistoryTypeId="1" PostId="12558" RevisionGUID="9f7ceadb-e661-4474-b2c7-f9967f909e1f" CreationDate="2011-05-21T13:19:11.023" UserId="7359" Text="Do you think that is better one big level model or more smaller level models?" />
  <row Id="27593" PostHistoryTypeId="3" PostId="12558" RevisionGUID="9f7ceadb-e661-4474-b2c7-f9967f909e1f" CreationDate="2011-05-21T13:19:11.023" UserId="7359" Text="&lt;xna-4.0&gt;&lt;models&gt;" />
  <row Id="27594" PostHistoryTypeId="2" PostId="12559" RevisionGUID="df361045-d178-4174-9d2e-a70f98796be9" CreationDate="2011-05-21T13:25:15.507" UserId="1156" Text="In terms of graphics rendering, one large mesh is faster to draw than several smaller meshes.&#xD;&#xA;&#xD;&#xA;If you're talking about something like a corridor, it's probably not going to be that intensive for the GPU if you send it in as a door and a floor and some walls. The smaller meshes also allow you to fiddle with positioning more easily.&#xD;&#xA;&#xD;&#xA;If your drawing becomes a bottleneck, then consider it." />
  <row Id="27595" PostHistoryTypeId="5" PostId="12446" RevisionGUID="cc709cef-76c4-4e6f-a682-50d433dc9ced" CreationDate="2011-05-21T13:28:01.023" UserId="2111" Comment="added 7173 characters in body" Text="&#xD;&#xA;The positions that you store within *cursorX* and *cursorY* hold the position of the cursor **relative to top left corner of your screen monitor** (since you add the ClientBounds to it). I'd guess that you used that exact position when drawing the circle, and since the *Draw* function takes a position **relative to the top left corner of the game window**, you'd be off by the position of the ClientBounds.&#xD;&#xA;&#xD;&#xA;But I have to ask: why are you holding the &quot;real&quot; value of the mouse position? Is there any particular reason why you're storing it instead of the usual positions return by *Mouse.GetState().X* and *Mouse.GetState().Y*?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA; &#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;After looking at your code, I think I found where the main problem is.&#xD;&#xA;&#xD;&#xA;When defining the transformation matrix for your camera, you apply a translation to the center of the screen, like so:&#xD;&#xA;&#xD;&#xA;    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;        Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;        Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)) *&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Height * 0.5f,&#xD;&#xA;                                             graphicsDevice.Viewport.Width * 0.5f, 0));&#xD;&#xA;&#xD;&#xA;the relevant part being:&#xD;&#xA;&#xD;&#xA;&gt; **Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Height * 0.5f, graphicsDevice.Viewport.Width * 0.5f,  0));**&#xD;&#xA;&#xD;&#xA;From the comment I'm guessing that someone proposed this solution and it probably is perfectly fine but here is how I've changed your code to make it work:&#xD;&#xA;&#xD;&#xA;Ok, so I changed a couple of things.&#xD;&#xA;&#xD;&#xA;First, I removed the translation to the center, making the camera point at the top left corner, like so (removed the last translation):&#xD;&#xA;&#xD;&#xA;    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;        Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;        Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)));&#xD;&#xA;&#xD;&#xA;Then, in your *Game1.cs* file, I put the *player.Draw(spriteBatch)* call within the *spriteBatch.Begin()* call affected by the camera's transformations, since the player should be affected by the camera. Like so:&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                      SpriteSortMode.Immediate,&#xD;&#xA;                      SaveStateMode.SaveState,&#xD;&#xA;                      cam.get_transformation(GraphicsDevice));&#xD;&#xA;    &#xD;&#xA;    player.Draw(spriteBatch);&#xD;&#xA;    &#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;Basically, you just have to think differently from usual. It's all about understanding the difference between **screen** positions and **world** positions (well, that's how I call them). &#xD;&#xA;&#xD;&#xA;**Screen** positions are those that you use when you call *spriteBatch.Draw()*. They represent positions on your screen monitor.&#xD;&#xA;&#xD;&#xA;**World** positions are those within your virtual world. You have to convert these to screen positions before drawing (by using the camera transformation matrix with a *spriteBatch.Draw()* call).&#xD;&#xA;&#xD;&#xA;To illustrate the difference, here is an example:&#xD;&#xA;Let's say that you have a map with a size of 2500 x 2500. Your game window has a size of 500 x 500. Here is a quick drawing of that game world:&#xD;&#xA;![][1]&#xD;&#xA;&#xD;&#xA;The green rectangle represents your game world (the one with a 2500 x 2500 size). The red rectangle represents the camera view (the size of the game screen). The blue rectangle represents an object within the world.&#xD;&#xA;&#xD;&#xA;Now, the **world position** of that object would be (600, 600), because the world position is independent of where the camera is.&#xD;&#xA;&#xD;&#xA;The **screen position**, however, is relative to the top left camera position. So it's screen position (where it is drawn) would be (100, 100).&#xD;&#xA;&#xD;&#xA;I think it's pretty clear with that example that to convert from a screen position to a world position, you must add the camera's position. To convert from world position to screen position, you must subtract the camera's position. &#xD;&#xA;&#xD;&#xA;So, anything that is *part* of your world holds a world position (like a player or bullets). Anything that is part of the user interface holds a screen position (like the amount of ammo left or the aim of the player). All you have to do is put all the objects drawn using world positions within the *spriteBatch.Draw()* call using the camera. All objects independent of the camera should be drawn on the next *spriteBatch.Draw()* call. &#xD;&#xA;&#xD;&#xA;So, let's go ahead and hide these implementation details within your Camera2D class:&#xD;&#xA;&#xD;&#xA;    public Vector2 GetScreenPosition(Vector2 worldPosition)&#xD;&#xA;    {&#xD;&#xA;        return worldPosition - Pos;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetWorldPosition(Vector2 screenPosition)&#xD;&#xA;    {&#xD;&#xA;        return screenPosition + Pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I guess that you were using a translation to the center of the screen to keep the player centered. So let's place the player to the center within the *LoadContent()* function:&#xD;&#xA;&#xD;&#xA;    player = new Player(new Rectangle(&#xD;&#xA;                            (int)(GraphicsDevice.Viewport.Width / 2f), &#xD;&#xA;                            (int)(GraphicsDevice.Viewport.Height / 2f), 50, 50), &#xD;&#xA;                        playertex, 5, bulletTex);&#xD;&#xA;&#xD;&#xA;Next, let's add camera movement support (I changed the code you were using since I'm not applying the center-screen camera translation anymore):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector2 cameraDirection = Vector2.Zero;&#xD;&#xA;            const int TO_MOVE_SIDE_DISTANCE = 150; // the distance to the side required to move.&#xD;&#xA;&#xD;&#xA;    Vector2 playerScreenPosition = cam.GetScreenPosition(new Vector2(&#xD;&#xA;                player.PlayerRect.X, player.PlayerRect.Y));&#xD;&#xA;    Rectangle playerScreenRect = new Rectangle((int)playerScreenPosition.X,&#xD;&#xA;                (int)playerScreenPosition.Y, player.PlayerRect.Width, player.PlayerRect.Height);&#xD;&#xA;&#xD;&#xA;    //We make the camera follow the player if he goes too close to the sides.&#xD;&#xA;    if (playerScreenRect.Left &lt; TO_MOVE_SIDE_DISTANCE) // move to the left&#xD;&#xA;    {&#xD;&#xA;        --cameraDirection.X;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Right &gt; GraphicsDevice.Viewport.Width - TO_MOVE_SIDE_DISTANCE) // move to the right&#xD;&#xA;    {&#xD;&#xA;        ++cameraDirection.X;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Top &lt; TO_MOVE_SIDE_DISTANCE) // move up&#xD;&#xA;    {&#xD;&#xA;        --cameraDirection.Y;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Bottom &gt; GraphicsDevice.Viewport.Height - TO_MOVE_SIDE_DISTANCE) // move down&#xD;&#xA;    {&#xD;&#xA;        ++cameraDirection.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    cam.Pos += cameraDirection * player._PlayerSpeed; // move with the player.&#xD;&#xA;&#xD;&#xA;So now the camera works. There's a new bug though: bullets start at the player's position, but are not aiming at the right place when the camera has been moved.&#xD;&#xA;&#xD;&#xA;This is because we're aiming using the **screen position** (the cursor position, actually), when really we're aiming within the world. So, we have to convert the cursor's position to a world position to be able to aim properly. The shooting happens inside the Player class:&#xD;&#xA;&#xD;&#xA;    Vector2 targetWorldPosition = cam.GetWorldPosition(&#xD;&#xA;        new Vector2(Mouse.GetState().X, Mouse.GetState().Y)); // we're aiming at an object within the world.&#xD;&#xA;&#xD;&#xA;    BulletList.Add(new Bullet(new Vector2(_PlayerRect.X, _PlayerRect.Y),&#xD;&#xA;        targetWorldPosition, 5, bulletTex, &#xD;&#xA;        new Rectangle(_PlayerRect.X, _PlayerRect.Y, bulletTex.Width,bulletTex.Height), 90));&#xD;&#xA;&#xD;&#xA;Notice that we're passing the target world position to the Bullet constructor now.&#xD;&#xA;&#xD;&#xA;There you go, you have a working camera system.&#xD;&#xA;&#xD;&#xA;I'm sure you could go with the centered transformation that you had at first, but I'm not used to that system. If you ever want to change system, just change the GetWorldPosition function, the GetScreenPosition function and the matrix transformation. Since those are hidden within the Camera2D class, changing will be easy.&#xD;&#xA;&#xD;&#xA;I hope this helped!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/muLSV.png" />
  <row Id="27596" PostHistoryTypeId="2" PostId="12560" RevisionGUID="040926e3-93ee-4dfb-9e5f-ed1afcc5d156" CreationDate="2011-05-21T14:41:25.530" UserId="7345" Text="im trying to add a new element to the hud&#xD;&#xA;its spoused to be a compass the should function like the minimap&#xD;&#xA;&#xD;&#xA;Ive add this code to the main hud.swd&#xD;&#xA;&#xD;&#xA;        var DcompassContainer:MovieClip = this.createEmptyMovieClip(&quot;DcompassContainer&quot;, this.getNextHighestDepth());&#xD;&#xA;    DcompassContainer._x = 280;&#xD;&#xA;    DcompassContainer._y = 8;&#xD;&#xA;    DcompassContainer.loadMovie(&quot;udk_compass.swf&quot;);&#xD;&#xA;&#xD;&#xA;so far all is good&#xD;&#xA;this is the info on the main MC in flash&#xD;&#xA;&#xD;&#xA;name directional&#xD;&#xA;instence name directional&#xD;&#xA;identifier directional&#xD;&#xA;class com.scaleform.directional&#xD;&#xA;&#xD;&#xA;in the class file&#xD;&#xA;&#xD;&#xA;    import flash.external.ExternalInterface;&#xD;&#xA;    import gfx.core.UIComponent;&#xD;&#xA;    &#xD;&#xA;    class com.scaleform.directional extends UIComponent {&#xD;&#xA;    	&#xD;&#xA;    	// The entities, layers and controls of the minimap&#xD;&#xA;    	public var directionshow:MovieClip;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    	public function directional() {&#xD;&#xA;        //&#xD;&#xA;        }	&#xD;&#xA;    	&#xD;&#xA;    	public function configUI():Void {	&#xD;&#xA;    		// Register compass values with the app&#xD;&#xA;    		//&#xD;&#xA;    		// Params: &#xD;&#xA;    		//			compass movieclip (this),&#xD;&#xA;    		//&#xD;&#xA;    		ExternalInterface.call(&quot;registerDcompassView&quot;, this);&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;in the GFxMinimapHud.uc ive added this code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    function registerDcompassView(GFxDcompass dc)&#xD;&#xA;    {&#xD;&#xA;    	GetPC().ClientMessage(&quot;DCopmass Registered&quot;);&#xD;&#xA;        Dcompass = dc;&#xD;&#xA;    	Dcompass.Init(self);&#xD;&#xA;    	Dcompass.SetVisible(false);&#xD;&#xA;    	Dcompass.SetFloat(&quot;_xscale&quot;, 85);&#xD;&#xA;    	Dcompass.SetFloat(&quot;_yscale&quot;, 85);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;after adding all swf to the content browser and running the game&#xD;&#xA;the swf does appear on thew screen&#xD;&#xA;but the code is not working&#xD;&#xA;im not getting the ClientMessage&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27597" PostHistoryTypeId="1" PostId="12560" RevisionGUID="040926e3-93ee-4dfb-9e5f-ed1afcc5d156" CreationDate="2011-05-21T14:41:25.530" UserId="7345" Text="UDK HUD problem" />
  <row Id="27598" PostHistoryTypeId="3" PostId="12560" RevisionGUID="040926e3-93ee-4dfb-9e5f-ed1afcc5d156" CreationDate="2011-05-21T14:41:25.530" UserId="7345" Text="&lt;flash&gt;&lt;udk&gt;&lt;unreal&gt;&lt;actionscript&gt;" />
  <row Id="27599" PostHistoryTypeId="5" PostId="12560" RevisionGUID="8ed1f703-5039-4d27-bc88-acade5c1eba5" CreationDate="2011-05-21T14:52:35.160" UserId="7345" Comment="added 1 characters in body" Text="im trying to add a new element to the hud&#xD;&#xA;its spoused to be a compass that should function like the minimap&#xD;&#xA;&#xD;&#xA;Ive add this code to the main hud.swf&#xD;&#xA;&#xD;&#xA;        var DcompassContainer:MovieClip = this.createEmptyMovieClip(&quot;DcompassContainer&quot;, this.getNextHighestDepth());&#xD;&#xA;    DcompassContainer._x = 280;&#xD;&#xA;    DcompassContainer._y = 8;&#xD;&#xA;    DcompassContainer.loadMovie(&quot;udk_compass.swf&quot;);&#xD;&#xA;&#xD;&#xA;so far all is good&#xD;&#xA;this is the info on the main MC in flash&#xD;&#xA;&#xD;&#xA;name directional&#xD;&#xA;instence name directional&#xD;&#xA;identifier directional&#xD;&#xA;class com.scaleform.directional&#xD;&#xA;&#xD;&#xA;in the class file&#xD;&#xA;&#xD;&#xA;    import flash.external.ExternalInterface;&#xD;&#xA;    import gfx.core.UIComponent;&#xD;&#xA;    &#xD;&#xA;    class com.scaleform.directional extends UIComponent {&#xD;&#xA;    	&#xD;&#xA;    	// The entities, layers and controls of the minimap&#xD;&#xA;    	public var directionshow:MovieClip;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    	public function directional() {&#xD;&#xA;        //&#xD;&#xA;        }	&#xD;&#xA;    	&#xD;&#xA;    	public function configUI():Void {	&#xD;&#xA;    		// Register compass values with the app&#xD;&#xA;    		//&#xD;&#xA;    		// Params: &#xD;&#xA;    		//			compass movieclip (this),&#xD;&#xA;    		//&#xD;&#xA;    		ExternalInterface.call(&quot;registerDcompassView&quot;, this);&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;in the GFxMinimapHud.uc ive added this code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    function registerDcompassView(GFxDcompass dc)&#xD;&#xA;    {&#xD;&#xA;    	GetPC().ClientMessage(&quot;DCopmass Registered&quot;);&#xD;&#xA;        Dcompass = dc;&#xD;&#xA;    	Dcompass.Init(self);&#xD;&#xA;    	Dcompass.SetVisible(false);&#xD;&#xA;    	Dcompass.SetFloat(&quot;_xscale&quot;, 85);&#xD;&#xA;    	Dcompass.SetFloat(&quot;_yscale&quot;, 85);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;after adding all swf to the content browser and running the game&#xD;&#xA;the swf does appear on thew screen&#xD;&#xA;but the code is not working&#xD;&#xA;im not getting the ClientMessage&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27600" PostHistoryTypeId="25" PostId="12558" RevisionGUID="9af36f17-35d0-4829-828b-1cc50756edb9" CreationDate="2011-05-21T15:12:27.717" Comment="http://twitter.com/#!/StackGameDev/status/71956526994165760" />
  <row Id="27601" PostHistoryTypeId="2" PostId="12561" RevisionGUID="8f08d34d-8341-4d25-9429-94a2cbd74ea9" CreationDate="2011-05-21T13:16:52.470" UserDisplayName="Brandon" Text="Ok so this is mind boggling to me. Every time I've used something similiar before it works.  I added messages to be displayed before everything happened to see where it would, and it never got past the wait.&#xD;&#xA;&#xD;&#xA;    Events&#xD;&#xA;         Unit - A unit Begins casting an ability&#xD;&#xA;    Conditions&#xD;&#xA;         (Ability being cast) Equal to Berserking Power [E]&#xD;&#xA;    Actions&#xD;&#xA;         Unit Group - Add(Triggering unit) to heroSpellUG[(Player number of (Owner of (Triggering unit)))]&#xD;&#xA;         -Unit Group - Pick every unit in heroSpellUG[(Player number of (Owner of (Triggering unit)))]&#xD;&#xA;               Unit - Add Berserking Power Damage to (Picked Unit)&#xD;&#xA;               Unit - Set level of Berserking Power Damage for (Picked Unit) to (Level of Berserking Power [E] for (Picked Unit))&#xD;&#xA;               Wait (5.00 + (Real((Level of Berserking Power [E] for (Picked Unit))))) game-time seconds&#xD;&#xA;               Unit - Remove Berserking Power Damage from (Picked Unit)&#xD;&#xA;               Unit Group - Remove (Picked Unit) from heroSpellUG[(Player number of (Owner of (Picked Unit)))]&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;So I guess my question is, why is the Wait not completing.  I had it display what the time to wait was and it said 6 seconds at level one. Any help would be appreciated." />
  <row Id="27602" PostHistoryTypeId="1" PostId="12561" RevisionGUID="8f08d34d-8341-4d25-9429-94a2cbd74ea9" CreationDate="2011-05-21T13:16:52.470" UserDisplayName="Brandon" Text="Warcraft 3 Editor - Not triggering the Wait action?" />
  <row Id="27603" PostHistoryTypeId="3" PostId="12561" RevisionGUID="8f08d34d-8341-4d25-9429-94a2cbd74ea9" CreationDate="2011-05-21T13:16:52.470" UserDisplayName="Brandon" Text="&lt;untagged&gt;" />
  <row Id="27604" PostHistoryTypeId="17" PostId="12561" RevisionGUID="5b4072c3-f305-4d51-8a97-e17651f1b082" CreationDate="2011-05-21T15:51:13.297" UserId="-1" Comment="from http://stackoverflow.com/questions/6081985/warcraft-3-editor-not-triggering-the-wait-action" Text="" />
  <row Id="27605" PostHistoryTypeId="2" PostId="12562" RevisionGUID="63873e30-30a2-473c-a3fa-c110b4f45f4f" CreationDate="2011-05-21T16:18:41.903" UserId="1580" Text="So I guess that your initial attempt is to iterate through all meshes in your scene, for each mesh, check all triangles if they intersect, right? The brute-force way.&#xD;&#xA;&#xD;&#xA;I'm not sure if there's a lightweight library for you to solve your problem, but the problem is quite a large discussing area.&#xD;&#xA;&#xD;&#xA;I would suggest using a bounding-volume structure, such as a KD-Tree used in 3 dimensions. Christer Ericsson suggests an implementation in his book &quot;Realtime Collision Detection&quot; which is cache-friendly and memory efficient. I've implemented his suggestion in a project and indeed it did turn out very well. The task of creating a KD-tree together with splitting your meshes into well-balanced tree's is covered in depth by Ingo Wald ([http://www.sci.utah.edu/~wald/Publications/index.html][1]). I suggest you read up on there. The Surface Area Heurestic (SAH) is considered (one of?) the best algorithms for KD-splitting, Ingo Wald covers it in one of his publications ([http://www.sci.utah.edu/~wald/PhD/index.html][2]).&#xD;&#xA;&#xD;&#xA;There are a variety of freeware KD-tree's out there, I haven't really looked into kdtree at google-code ([http://code.google.com/p/kdtree/][3]) but it looks pretty decent. There's some interesting tutorials ([http://www.autonlab.org/autonweb/14665/version/2/part/5/data/moore-tutorial.pdf?branch=main&amp;language=en][4]) that you can read. &#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sci.utah.edu/~wald/Publications/index.html&#xD;&#xA;  [2]: http://www.sci.utah.edu/~wald/PhD/index.html&#xD;&#xA;  [3]: http://code.google.com/p/kdtree/&#xD;&#xA;  [4]: http://www.autonlab.org/autonweb/14665/version/2/part/5/data/moore-tutorial.pdf?branch=main&amp;language=en" />
  <row Id="27606" PostHistoryTypeId="2" PostId="12563" RevisionGUID="6ca6b504-edd1-48c3-b25e-8c8bec21c0cc" CreationDate="2011-05-21T17:27:22.893" UserId="2798" Text="If your level has too much detail you should split it in parts and apply some frustum culling to draw only currently visible meshes." />
  <row Id="27607" PostHistoryTypeId="2" PostId="12564" RevisionGUID="5173b585-f392-4c39-a52e-2bfffcb75f71" CreationDate="2011-05-21T18:10:01.283" UserId="3505" Text="Up the physics update rate until it works, it doesn't have to coincide with the framerate. I'd always do my timing like:&#xD;&#xA;&#xD;&#xA;    physicsStep=10&#xD;&#xA;    nextUpdate=currentTime()&#xD;&#xA;    while(1){&#xD;&#xA;        while(nextUpdate&lt;currentTime()){&#xD;&#xA;            doPhysics()&#xD;&#xA;            nextUpdate+=physicsStep&#xD;&#xA;        }&#xD;&#xA;        doRender()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Even on a mobile phone you'll probably get away with a pretty high update rate." />
  <row Id="27608" PostHistoryTypeId="25" PostId="12561" RevisionGUID="d70bb631-a1bd-44da-a9d0-a6e8d776de6b" CreationDate="2011-05-21T18:12:28.537" Comment="http://twitter.com/#!/StackGameDev/status/72001828920885248" />
  <row Id="27609" PostHistoryTypeId="2" PostId="12565" RevisionGUID="e9f6757e-29dc-4485-8308-89cee90ae164" CreationDate="2011-05-21T09:06:54.900" UserId="7505" Text="I asked this at stackoverflow and got re-directed here, so...&#xD;&#xA;&#xD;&#xA;Hello&#xD;&#xA;&#xD;&#xA;I want to pick up a language that will allow me to create 2d/3d game environments.&#xD;&#xA;&#xD;&#xA;I'm considering Java/ Actionscript 3 / some variant of C.&#xD;&#xA;&#xD;&#xA;I'm pretty good at picking new languages up so that isn't a consideration.&#xD;&#xA;&#xD;&#xA;I have briefly tried Java and ActionScript 3 and the problem is that I'm having difficulty seeing what the strengths of each language are (that is without learning the entire language anyway).&#xD;&#xA;&#xD;&#xA;So if a few people could champion their tool of choice, what strengths/weaknesses it offers for game development (feel free to include commercial advantages!), that would certainly help me, it may help others too.&#xD;&#xA;" />
  <row Id="27610" PostHistoryTypeId="1" PostId="12565" RevisionGUID="e9f6757e-29dc-4485-8308-89cee90ae164" CreationDate="2011-05-21T09:06:54.900" UserId="7505" Text="Languages for creating 3d / 2.5d enviroments" />
  <row Id="27611" PostHistoryTypeId="3" PostId="12565" RevisionGUID="e9f6757e-29dc-4485-8308-89cee90ae164" CreationDate="2011-05-21T09:06:54.900" UserId="7505" Text="&lt;untagged&gt;" />
  <row Id="27612" PostHistoryTypeId="17" PostId="12565" RevisionGUID="fdf9e9e2-3e8e-4571-9447-24142e8eaa39" CreationDate="2011-05-21T19:05:18.717" UserId="-1" Comment="from http://meta.gamedev.stackexchange.com/questions/446/languages-for-creating-3d-2-5d-enviroments" Text="" />
  <row Id="27613" PostHistoryTypeId="18" PostId="12565" RevisionGUID="716526d1-7580-4eac-880d-d3ae8b922226" CreationDate="2011-05-21T19:06:28.873" UserId="189" Comment="to http://gamedev.stackexchange.com/questions/12551/languages-for-creating-3d-2-5d-enviroments" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27614" PostHistoryTypeId="18" PostId="12551" RevisionGUID="716526d1-7580-4eac-880d-d3ae8b922226" CreationDate="2011-05-21T19:06:28.873" UserId="189" Comment="from http://gamedev.stackexchange.com/questions/12565/languages-for-creating-3d-2-5d-enviroments" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27615" PostHistoryTypeId="14" PostId="12565" RevisionGUID="0dc5dddb-026b-47e0-9343-1e4ead79be24" CreationDate="2011-05-21T19:06:29.560" UserId="189" Text="[{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="27616" PostHistoryTypeId="2" PostId="12566" RevisionGUID="1ad03772-8c09-48f5-95da-194fd06fc8d9" CreationDate="2011-05-21T19:13:32.867" UserId="5824" Text="I'd suggest keeping the door as a separate model, unless you're certain you never want to be able to open it.&#xD;&#xA;&#xD;&#xA;Windows if they are transparent also want to be separate models so they can be depth sorted appropriately for rendering.&#xD;&#xA;&#xD;&#xA;Everything else should probably be a single model and texture for best performance, and to eliminate any cracks where they join together." />
  <row Id="27617" PostHistoryTypeId="6" PostId="12565" RevisionGUID="7eea75e9-3cbf-4d57-bf51-8582084f31a1" CreationDate="2011-05-21T19:49:36.310" UserId="51" Comment="edited tags" Text="&lt;language-choice&gt;" />
  <row Id="27618" PostHistoryTypeId="6" PostId="12561" RevisionGUID="d6f2a598-6e48-4568-a1c1-2409954b8920" CreationDate="2011-05-21T19:50:09.227" UserId="51" Comment="edited tags" Text="&lt;mods&gt;&lt;warcraft-3&gt;" />
  <row Id="27619" PostHistoryTypeId="5" PostId="12205" RevisionGUID="6c450946-19b1-414f-9730-ad7ca4b8b84b" CreationDate="2011-05-21T19:53:47.413" UserId="51" Comment="added 2 characters in body; edited title" Text="I'm doing a diploma thesis about the development of games with freedom to choose or open world.&#xD;&#xA;&#xD;&#xA;Topics will be i.e. development issues in programming and the design itself, mechanics etc.&#xD;&#xA;&#xD;&#xA;For that I need literature and lot's of it. Do you have any suggestions?" />
  <row Id="27620" PostHistoryTypeId="4" PostId="12205" RevisionGUID="6c450946-19b1-414f-9730-ad7ca4b8b84b" CreationDate="2011-05-21T19:53:47.413" UserId="51" Comment="added 2 characters in body; edited title" Text="Literature about Open World Games, Freedom to Choose" />
  <row Id="27621" PostHistoryTypeId="16" PostId="12205" RevisionGUID="9318dcd0-9b43-491e-8ae4-9f5695b073a4" CreationDate="2011-05-21T19:53:52.560" UserId="51" />
  <row Id="27622" PostHistoryTypeId="16" PostId="12553" RevisionGUID="e5d7991c-c7ab-4efd-bc89-12690673e46b" CreationDate="2011-05-21T19:53:52.560" UserId="51" />
  <row Id="27623" PostHistoryTypeId="25" PostId="12560" RevisionGUID="94f41c17-8708-41d9-882e-85cc662b9bb8" CreationDate="2011-05-21T21:12:29.817" Comment="http://twitter.com/#!/StackGameDev/status/72047133016076288" />
  <row Id="27624" PostHistoryTypeId="2" PostId="12567" RevisionGUID="c3cdae7d-871d-4ea0-b021-96099b8fbc3f" CreationDate="2011-05-21T21:15:36.163" UserId="7514" Text="You see, especially in FPS games, when a bullet hits a wall or a character, etc. You end up with the bullet hole.&#xD;&#xA;&#xD;&#xA;Is this usually done with the actual skin temporarily changing, or just an overlay of another image (or something totally different)?&#xD;&#xA;&#xD;&#xA;Could anyone give me pointers on how to go about this? I'm using XNA (C#)" />
  <row Id="27625" PostHistoryTypeId="1" PostId="12567" RevisionGUID="c3cdae7d-871d-4ea0-b021-96099b8fbc3f" CreationDate="2011-05-21T21:15:36.163" UserId="7514" Text="Skin Editing/Overlaying XNA C#" />
  <row Id="27626" PostHistoryTypeId="3" PostId="12567" RevisionGUID="c3cdae7d-871d-4ea0-b021-96099b8fbc3f" CreationDate="2011-05-21T21:15:36.163" UserId="7514" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="27627" PostHistoryTypeId="5" PostId="12446" RevisionGUID="3da406fb-3807-4dc5-b035-4276c7d78061" CreationDate="2011-05-21T21:24:32.097" UserId="2111" Comment="added 15 characters in body" Text="The positions that you store within *cursorX* and *cursorY* hold the position of the cursor **relative to top left corner of your screen monitor** (since you add the ClientBounds to it). I'd guess that you used that exact position when drawing the circle, and since the *Draw* function takes a position **relative to the top left corner of the game window**, you'd be off by the position of the ClientBounds.&#xD;&#xA;&#xD;&#xA;But I have to ask: why are you holding the &quot;real&quot; value of the mouse position? Is there any particular reason why you're storing it instead of the usual positions return by *Mouse.GetState().X* and *Mouse.GetState().Y*?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA; &#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;After looking at your code, I think I found where the main problem is.&#xD;&#xA;&#xD;&#xA;When defining the transformation matrix for your camera, you apply a translation to the center of the screen, like so:&#xD;&#xA;&#xD;&#xA;    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;        Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;        Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)) *&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Height * 0.5f,&#xD;&#xA;                                             graphicsDevice.Viewport.Width * 0.5f, 0));&#xD;&#xA;&#xD;&#xA;the relevant part being:&#xD;&#xA;&#xD;&#xA;&gt; **Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Height * 0.5f, graphicsDevice.Viewport.Width * 0.5f,  0));**&#xD;&#xA;&#xD;&#xA;From the comment I'm guessing that someone proposed this solution and it probably is perfectly fine but here is how I've changed your code to make it work:&#xD;&#xA;&#xD;&#xA;Ok, so I changed a couple of things.&#xD;&#xA;&#xD;&#xA;First, I removed the translation to the center, making the camera point at the top left corner, like so (removed the last translation):&#xD;&#xA;&#xD;&#xA;    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;        Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;        Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)));&#xD;&#xA;&#xD;&#xA;Then, in your *Game1.cs* file, I put the *player.Draw(spriteBatch)* call within the *spriteBatch.Begin()* call affected by the camera's transformations, since the player should be affected by the camera. Like so:&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                      SpriteSortMode.Immediate,&#xD;&#xA;                      SaveStateMode.SaveState,&#xD;&#xA;                      cam.get_transformation(GraphicsDevice));&#xD;&#xA;    &#xD;&#xA;    player.Draw(spriteBatch);&#xD;&#xA;    &#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;Basically, you just have to think differently from usual. It's all about understanding the difference between **screen** positions and **world** positions (well, that's how I call them). &#xD;&#xA;&#xD;&#xA;**Screen** positions are those that you use when you call *spriteBatch.Draw()*. They represent positions on your screen monitor.&#xD;&#xA;&#xD;&#xA;**World** positions are those within your virtual world. You have to convert these to screen positions before drawing (by using the camera transformation matrix with a *spriteBatch.Draw()* call).&#xD;&#xA;&#xD;&#xA;To illustrate the difference, here is an example:&#xD;&#xA;Let's say that you have a map with a size of 2500 x 2500. Your game window has a size of 500 x 500. Here is a quick drawing of that game world:&#xD;&#xA;![][1]&#xD;&#xA;&#xD;&#xA;The green rectangle represents your game world (the one with a 2500 x 2500 size). The red rectangle represents the camera view (the size of the game screen). The blue rectangle represents an object within the world.&#xD;&#xA;&#xD;&#xA;Now, the **world position** of that object would be (600, 600), because the world position is independent of where the camera is.&#xD;&#xA;&#xD;&#xA;The **screen position**, however, is relative to the top left camera position. So its screen position (where it is drawn) would be (100, 100).&#xD;&#xA;&#xD;&#xA;I think it's pretty clear with that example that to convert from a screen position to a world position, you must add the camera's position. To convert from world position to screen position, you must subtract the camera's position. &#xD;&#xA;&#xD;&#xA;So, anything that is *part* of your world holds a world position (like a player or bullets). Anything that is part of the user interface holds a screen position (like the amount of ammo left or the aim of the player). All you have to do is put all the objects drawn using world positions within the *spriteBatch.Draw()* call using the camera. All objects independent of the camera should be drawn on the next *spriteBatch.Draw()* call. &#xD;&#xA;&#xD;&#xA;So, let's go ahead and hide these implementation details within your Camera2D class:&#xD;&#xA;&#xD;&#xA;    public Vector2 GetScreenPosition(Vector2 worldPosition)&#xD;&#xA;    {&#xD;&#xA;        return worldPosition - Pos;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetWorldPosition(Vector2 screenPosition)&#xD;&#xA;    {&#xD;&#xA;        return screenPosition + Pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I guess that you were using a translation to the center of the screen to keep the player centered. So let's place the player to the center within the *LoadContent()* function:&#xD;&#xA;&#xD;&#xA;    player = new Player(new Rectangle(&#xD;&#xA;                            (int)(GraphicsDevice.Viewport.Width / 2f), &#xD;&#xA;                            (int)(GraphicsDevice.Viewport.Height / 2f), 50, 50), &#xD;&#xA;                        playertex, 5, bulletTex);&#xD;&#xA;&#xD;&#xA;Next, let's add camera movement support (I changed the code you were using since I'm not applying the center-screen camera translation anymore):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector2 cameraDirection = Vector2.Zero;&#xD;&#xA;    const int TO_MOVE_SIDE_DISTANCE = 150; // the distance to the side required to move.&#xD;&#xA;&#xD;&#xA;    Vector2 playerScreenPosition = cam.GetScreenPosition(new Vector2(&#xD;&#xA;                player.PlayerRect.X, player.PlayerRect.Y));&#xD;&#xA;    Rectangle playerScreenRect = new Rectangle((int)playerScreenPosition.X,&#xD;&#xA;                (int)playerScreenPosition.Y, player.PlayerRect.Width, player.PlayerRect.Height);&#xD;&#xA;&#xD;&#xA;    //We make the camera follow the player if he goes too close to the sides.&#xD;&#xA;    if (playerScreenRect.Left &lt; TO_MOVE_SIDE_DISTANCE) // move to the left&#xD;&#xA;    {&#xD;&#xA;        --cameraDirection.X;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Right &gt; GraphicsDevice.Viewport.Width - TO_MOVE_SIDE_DISTANCE) // move to the right&#xD;&#xA;    {&#xD;&#xA;        ++cameraDirection.X;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Top &lt; TO_MOVE_SIDE_DISTANCE) // move up&#xD;&#xA;    {&#xD;&#xA;        --cameraDirection.Y;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Bottom &gt; GraphicsDevice.Viewport.Height - TO_MOVE_SIDE_DISTANCE) // move down&#xD;&#xA;    {&#xD;&#xA;        ++cameraDirection.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    cam.Pos += cameraDirection * player._PlayerSpeed; // move with the player.&#xD;&#xA;&#xD;&#xA;So now the camera works. There's a new bug though: bullets start at the player's position, but are not aimed at the right place when the camera has been moved.&#xD;&#xA;&#xD;&#xA;This is because we're aiming using the **screen position** (the cursor position, actually), when really we're aiming within the world. So, we have to convert the cursor's position to a world position to be able to aim properly. The shooting happens inside the Player class:&#xD;&#xA;&#xD;&#xA;    Vector2 targetWorldPosition = cam.GetWorldPosition(&#xD;&#xA;        new Vector2(Mouse.GetState().X, Mouse.GetState().Y)); // we're aiming at an object within the world.&#xD;&#xA;&#xD;&#xA;    BulletList.Add(new Bullet(new Vector2(_PlayerRect.X, _PlayerRect.Y),&#xD;&#xA;        targetWorldPosition, 5, bulletTex, &#xD;&#xA;        new Rectangle(_PlayerRect.X, _PlayerRect.Y, bulletTex.Width,bulletTex.Height), 90));&#xD;&#xA;&#xD;&#xA;Notice that we're passing the target world position to the Bullet constructor now.&#xD;&#xA;&#xD;&#xA;There you go, you have a working camera system.&#xD;&#xA;&#xD;&#xA;I'm sure you could go with the centered transformation that you had at first, but I'm not used to that system. If you ever want to change system, just change the GetWorldPosition function, the GetScreenPosition function and the matrix transformation. Since those are hidden within the Camera2D class, changing the implementation details will be easy.&#xD;&#xA;&#xD;&#xA;I hope this helped!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/muLSV.png" />
  <row Id="27628" PostHistoryTypeId="2" PostId="12568" RevisionGUID="a6479f27-074b-4f2e-9a21-0fd098e844e2" CreationDate="2011-05-21T21:54:02.060" UserId="51" Text="A naive solution would be to use a small quad positioned and rotated to match the surface where the bullet hit with a transparent texture of a bullet hole.  &#xD;&#xA;&#xD;&#xA;There are some more advanced techniques involved if you want the hole to clip properly if you shoot near an edge of a wall, or if you shoot something rounded.&#xD;&#xA;&#xD;&#xA;These are called &quot;decals&quot; if you want to look into more details.  Here's a blog post that goes into some of those techniques. http://blog.wolfire.com/2009/06/how-to-project-decals/" />
  <row Id="27629" PostHistoryTypeId="4" PostId="12567" RevisionGUID="e1d2d49f-73e7-4c73-a8cb-100946a07626" CreationDate="2011-05-21T22:14:17.533" UserId="51" Comment="edited title" Text="Skin Editing/Overlaying bullet holes" />
  <row Id="27630" PostHistoryTypeId="2" PostId="12569" RevisionGUID="2b7e7235-ebb3-4c48-942a-bd4b43a7a0a1" CreationDate="2011-05-21T23:08:56.100" UserId="7517" Text="If you intend to deploy to the Web and to make it multiplatform there is no better choice than X3D (formerly VRML), see [Web3D][1]. &#xD;&#xA;It is ISO for Web3D graphics, all mayor 3D tools have export for that format and being an international standard longevity is guaranteed and, what is most important, it is royalty free. Even WebGL will be supported. Internal scripting is subset of JavaScript and there is EAI for virtually any programming language but most of code online is Java and C++. Leading X3D engine, [Bitmanagement][2] Contact3D is on line with latest game engines (multitexturing, shaders, nurbs etc.) can be used as standalone app or as a plugin for all mayor web browsers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.web3d.org/&#xD;&#xA;  [2]: http://www.bitmanagement.com/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27631" PostHistoryTypeId="5" PostId="12560" RevisionGUID="335aa2a0-a8c9-469c-ab38-19a57d95b0cc" CreationDate="2011-05-21T23:09:25.083" UserId="3505" Comment="Corrected the language." Text="I'm trying to add a new element to the hud, it's supposed to be a compass that should function like the minimap.&#xD;&#xA;&#xD;&#xA;I've added this code to the main hud.swf:&#xD;&#xA;&#xD;&#xA;        var DcompassContainer:MovieClip = this.createEmptyMovieClip(&quot;DcompassContainer&quot;, this.getNextHighestDepth());&#xD;&#xA;    DcompassContainer._x = 280;&#xD;&#xA;    DcompassContainer._y = 8;&#xD;&#xA;    DcompassContainer.loadMovie(&quot;udk_compass.swf&quot;);&#xD;&#xA;&#xD;&#xA;So far all is good, this is the info on the main MC in flash:&#xD;&#xA;&#xD;&#xA;    name directional&#xD;&#xA;    instence name directional&#xD;&#xA;    identifier directional&#xD;&#xA;    class com.scaleform.directional&#xD;&#xA;&#xD;&#xA;In the class file:&#xD;&#xA;&#xD;&#xA;    import flash.external.ExternalInterface;&#xD;&#xA;    import gfx.core.UIComponent;&#xD;&#xA;    &#xD;&#xA;    class com.scaleform.directional extends UIComponent {&#xD;&#xA;    	&#xD;&#xA;    	// The entities, layers and controls of the minimap&#xD;&#xA;    	public var directionshow:MovieClip;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    	public function directional() {&#xD;&#xA;        //&#xD;&#xA;        }	&#xD;&#xA;    	&#xD;&#xA;    	public function configUI():Void {	&#xD;&#xA;    		// Register compass values with the app&#xD;&#xA;    		//&#xD;&#xA;    		// Params: &#xD;&#xA;    		//			compass movieclip (this),&#xD;&#xA;    		//&#xD;&#xA;    		ExternalInterface.call(&quot;registerDcompassView&quot;, this);&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In the GFxMinimapHud.uc I've added this code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    function registerDcompassView(GFxDcompass dc)&#xD;&#xA;    {&#xD;&#xA;    	GetPC().ClientMessage(&quot;DCopmass Registered&quot;);&#xD;&#xA;        Dcompass = dc;&#xD;&#xA;    	Dcompass.Init(self);&#xD;&#xA;    	Dcompass.SetVisible(false);&#xD;&#xA;    	Dcompass.SetFloat(&quot;_xscale&quot;, 85);&#xD;&#xA;    	Dcompass.SetFloat(&quot;_yscale&quot;, 85);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;After adding all swf's to the content browser and running the game the swf does appear on thew screen, but the code is not working, I'm not getting the ClientMessage." />
  <row Id="27632" PostHistoryTypeId="24" PostId="12560" RevisionGUID="335aa2a0-a8c9-469c-ab38-19a57d95b0cc" CreationDate="2011-05-21T23:09:25.083" Comment="Proposed by 3505 approved by 51 edit id of 439" />
  <row Id="27633" PostHistoryTypeId="5" PostId="12270" RevisionGUID="ccc43227-3494-4f88-9d30-1aa2226d3149" CreationDate="2011-05-21T23:26:15.620" UserId="7299" Comment="wrong blog title; seems tim holt had the wrong text in his clipboard" Text="**[The Introversion Blog](http://www.introversion.co.uk/blog)**&#xD;&#xA;&#xD;&#xA;Successful indie dev Introversion has made many in-depth posts about the development of their newest game, and some other posts about game development in general.  Definitely worth checking out, especially if you're interested in procedural generation.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27634" PostHistoryTypeId="25" PostId="12567" RevisionGUID="acf8bbcf-acde-4f0a-a739-ff2380a253f2" CreationDate="2011-05-22T00:12:30.497" Comment="http://twitter.com/#!/StackGameDev/status/72092434221367296" />
  <row Id="27635" PostHistoryTypeId="2" PostId="12570" RevisionGUID="43ccdedb-73e4-42b4-b720-71010b14f738" CreationDate="2011-05-22T00:19:58.177" UserId="7709" Text="I am new to game physics, i am trying to adapt a simple 2d balls Simulation code for the 3d simulation with java3D library, but i have this problem:&#xD;&#xA;&#xD;&#xA;Two things i noted down the values generated by engine, for ***X/Y*** are too high and ***minX/minY/maxY/maxX*** values are causing troubles &#xD;&#xA;&#xD;&#xA;*some time the balls are drawing but not moving*&#xD;&#xA;&#xD;&#xA;*some time going out of the panel*&#xD;&#xA;&#xD;&#xA;*some time moving on little area*&#xD;&#xA;&#xD;&#xA;*some time just stick at one place...*&#xD;&#xA;&#xD;&#xA;and i m unable to select/define/set the default correct/suitable values considering the 3D graphics scaling/resolution while they are set with respect to 2d screen coordinates, that is my only problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;please help,&#xD;&#xA;&#xD;&#xA;this is code :&#xD;&#xA;&#xD;&#xA;    public class Ball extends GameObject {&#xD;&#xA;    	private float x, y; // Ball's center (x, y)&#xD;&#xA;    	private float speedX, speedY; // Ball's speed per step in x and y&#xD;&#xA;    	private float radius; // Ball's radius&#xD;&#xA;    	// Collision detected by collision detection and response algorithm?&#xD;&#xA;    	boolean collisionDetected = false;&#xD;&#xA;    	&#xD;&#xA;	    // If collision detected, the next state of the ball.&#xD;&#xA;	    // Otherwise, meaningless.&#xD;&#xA;	    private float nextX, nextY;&#xD;&#xA;	    private float nextSpeedX, nextSpeedY;&#xD;&#xA;	&#xD;&#xA;	    private static final float BOX_WIDTH = 640;&#xD;&#xA;	    private static final float BOX_HEIGHT = 480;&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Constructor The velocity is specified in polar coordinates of speed and&#xD;&#xA;	 * moveAngle (for user friendliness), in Graphics coordinates with an&#xD;&#xA;	 * inverted y-axis.&#xD;&#xA;	 */&#xD;&#xA;	public Ball(String name1,float x, float y, float radius, float speed,&#xD;&#xA;			float angleInDegree, Color color) {&#xD;&#xA;		this.x = x;&#xD;&#xA;		this.y = y;&#xD;&#xA;		// Convert velocity from polar to rectangular x and y.&#xD;&#xA;		this.speedX = speed * (float) Math.cos(Math.toRadians(angleInDegree));&#xD;&#xA;		this.speedY = speed * (float) Math.sin(Math.toRadians(angleInDegree));&#xD;&#xA;		this.radius = radius;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void move()  {&#xD;&#xA;		if (collisionDetected) {&#xD;&#xA;			// Collision detected, use the values computed.&#xD;&#xA;			x = nextX;&#xD;&#xA;			y = nextY;&#xD;&#xA;			speedX = nextSpeedX;&#xD;&#xA;			speedY = nextSpeedY;&#xD;&#xA;		} else {&#xD;&#xA;			// No collision, move one step and no change in speed.&#xD;&#xA;			x += speedX;&#xD;&#xA;			y += speedY;&#xD;&#xA;		}&#xD;&#xA;		collisionDetected = false; // Clear the flag for the next step&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void collideWith()  {&#xD;&#xA;		// Get the ball's bounds, offset by the radius of the ball&#xD;&#xA;		float minX = 0.0f + radius;&#xD;&#xA;		float minY = 0.0f + radius;&#xD;&#xA;		float maxX = 0.0f + BOX_WIDTH - 1.0f - radius;&#xD;&#xA;		float maxY = 0.0f + BOX_HEIGHT - 1.0f - radius;&#xD;&#xA;&#xD;&#xA;		double gravAmount = 0.9811111f;&#xD;&#xA;		double gravDir = (90 / 57.2960285258);&#xD;&#xA;&#xD;&#xA;		// Try moving one full step&#xD;&#xA;		nextX = x + speedX;&#xD;&#xA;		nextY = y + speedY;&#xD;&#xA;		System.out.println(&quot;In serializedBall in collision.&quot;);&#xD;&#xA;&#xD;&#xA;		// If collision detected. Reflect on the x or/and y axis&#xD;&#xA;		// and place the ball at the point of impact.&#xD;&#xA;		if (speedX != 0) {&#xD;&#xA;			if (nextX &gt; maxX) { // Check maximum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = maxX;&#xD;&#xA;				nextY = (maxX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			} else if (nextX &lt; minX) { // Check minimum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = minX;&#xD;&#xA;				nextY = (minX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		// In case the ball runs over both the borders.&#xD;&#xA;		if (speedY != 0) {&#xD;&#xA;			if (nextY &gt; maxY) { // Check maximum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = maxY;&#xD;&#xA;				nextX = (maxY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			} else if (nextY &lt; minY) { // Check minimum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = minY;&#xD;&#xA;				nextX = (minY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		speedX += Math.cos(gravDir) * gravAmount;&#xD;&#xA;		speedY += Math.sin(gravDir) * gravAmount;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;        public float getSpeed()  {&#xD;&#xA;		return (float) Math.sqrt(speedX * speedX + speedY * speedY);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getMoveAngle()  {&#xD;&#xA;		return (float) Math.toDegrees(Math.atan2(speedY, speedX));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getRadius()  {&#xD;&#xA;		return radius;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public float getX() {&#xD;&#xA;		return x;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getY() {&#xD;&#xA;		return y;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void setX(float f) {&#xD;&#xA;		x =  f;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setY(float f) {&#xD;&#xA;		y =  f;&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; here how i m drawing the balls:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;    			printTG(objTrans[i], &quot;SteerTG&quot;);&#xD;&#xA;    			trans[i]&#xD;&#xA;    					.setTranslation(new Vector3f(ball[i].getX(), ball[i].getY(), 0.0f));&#xD;&#xA;    			objTrans[i].setTransform(trans[i]);&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27636" PostHistoryTypeId="1" PostId="12570" RevisionGUID="43ccdedb-73e4-42b4-b720-71010b14f738" CreationDate="2011-05-22T00:19:58.177" UserId="7709" Text="Converting 2D Physics to 3D." />
  <row Id="27637" PostHistoryTypeId="3" PostId="12570" RevisionGUID="43ccdedb-73e4-42b4-b720-71010b14f738" CreationDate="2011-05-22T00:19:58.177" UserId="7709" Text="&lt;3d&gt;&lt;graphics&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;physics-engine&gt;" />
  <row Id="27638" PostHistoryTypeId="25" PostId="12570" RevisionGUID="931ac628-54da-4bbb-84d6-290401816501" CreationDate="2011-05-22T03:12:31.537" Comment="http://twitter.com/#!/StackGameDev/status/72137737393799168" />
  <row Id="27639" PostHistoryTypeId="5" PostId="3191" RevisionGUID="84bd370d-cdb6-4419-99fc-37c5d098986f" CreationDate="2011-05-22T03:58:07.147" UserId="1272" Comment="Fixed broken link." Text="I stumbled across this tutorial a while back, which looks to be a good resource:&#xD;&#xA;&#xD;&#xA;http://archive.gamedev.net/reference/articles/article2701.asp" />
  <row Id="27640" PostHistoryTypeId="2" PostId="12571" RevisionGUID="3e90c8b5-f691-4cda-bac7-093bfcb0bda5" CreationDate="2011-05-22T05:44:52.660" UserId="3212" Text="Since I have started finding a good third party libraries for game development on android platform, Im getting confused. So want to know from the people who are already using some of the game libraries themselves (no googled resources please).  &#xD;&#xA;&#xD;&#xA;So my question is : What are some of best Android Game libraries(2D/3D)?&#xD;&#xA;&#xD;&#xA;Note: to keep this poll as useful as possible, please remember:&#xD;&#xA;&#xD;&#xA;  When adding a new library, provide a short summary of what it does / why you think it's useful. Please make sure the answers are not repeated.&#xD;&#xA;&#xD;&#xA;One link/source per answer is preferable." />
  <row Id="27641" PostHistoryTypeId="1" PostId="12571" RevisionGUID="3e90c8b5-f691-4cda-bac7-093bfcb0bda5" CreationDate="2011-05-22T05:44:52.660" UserId="3212" Text="Most useful free third party Android Game libraries?" />
  <row Id="27642" PostHistoryTypeId="3" PostId="12571" RevisionGUID="3e90c8b5-f691-4cda-bac7-093bfcb0bda5" CreationDate="2011-05-22T05:44:52.660" UserId="3212" Text="&lt;android&gt;&lt;libraries&gt;" />
  <row Id="27643" PostHistoryTypeId="25" PostId="12571" RevisionGUID="f4b0081b-f220-46c0-8fae-c856640e25b4" CreationDate="2011-05-22T06:12:31.997" Comment="http://twitter.com/#!/StackGameDev/status/72183037516984320" />
  <row Id="27644" PostHistoryTypeId="16" PostId="12571" RevisionGUID="a8503025-d7e1-4a2d-adbb-754e513e5543" CreationDate="2011-05-22T06:15:48.217" UserId="51" />
  <row Id="27645" PostHistoryTypeId="2" PostId="12572" RevisionGUID="144d0f81-bdf6-4479-8ac4-7e4e33429631" CreationDate="2011-05-22T06:36:11.407" UserId="962" Text="http://www.anscamobile.com/corona/&#xD;&#xA;&#xD;&#xA;Extremely easy to use. Has BOX2d implemented in an easy to use way. Can build native IOS and Android applications." />
  <row Id="27646" PostHistoryTypeId="16" PostId="12572" RevisionGUID="be964988-9cc5-41db-9548-81b4fc2db44e" CreationDate="2011-05-22T06:36:11.407" UserId="962" />
  <row Id="27647" PostHistoryTypeId="5" PostId="12544" RevisionGUID="521024bc-526a-4abe-8191-078ee41f324b" CreationDate="2011-05-22T06:36:17.263" UserId="4443" Comment="Added in changes pointed out in comments" Text="While probably not that optimized, this would move to the next frame when the time value was beyond the sum of the durations of each frame.&#xD;&#xA;&#xD;&#xA;    update(time)&#xD;&#xA;    {&#xD;&#xA;        frames // an array of animation frames&#xD;&#xA;        fFrameLength = 0;&#xD;&#xA;        foreach(frame in frames)&#xD;&#xA;        {&#xD;&#xA;            fFrameLength += frame.duration&#xD;&#xA;            if ( time * animation_length &lt; fFrameLength )&#xD;&#xA;                display_frame(frame)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="27648" PostHistoryTypeId="2" PostId="12573" RevisionGUID="16058556-2126-4fd2-95e1-39dcab4358c2" CreationDate="2011-05-22T06:44:51.090" UserId="4129" Text="A shader has values that are per vextex and values that are per call.&#xD;&#xA;&#xD;&#xA;Can you have values that vary only per triangle or quad&#xD;&#xA;&#xD;&#xA;And can you have values that vary only per pair. Of indicies in a glmultielementsdraw or equiv?" />
  <row Id="27649" PostHistoryTypeId="1" PostId="12573" RevisionGUID="16058556-2126-4fd2-95e1-39dcab4358c2" CreationDate="2011-05-22T06:44:51.090" UserId="4129" Text="varying by triangle and index" />
  <row Id="27650" PostHistoryTypeId="3" PostId="12573" RevisionGUID="16058556-2126-4fd2-95e1-39dcab4358c2" CreationDate="2011-05-22T06:44:51.090" UserId="4129" Text="&lt;glsl&gt;" />
  <row Id="27651" PostHistoryTypeId="2" PostId="12574" RevisionGUID="8250af5e-ada0-4527-9b40-a409ca16c469" CreationDate="2011-05-22T08:24:20.883" UserId="5612" Text="Lets say you make a game engine, and you have several GameObjects and every GameObject have a list of components that you can add or remove.&#xD;&#xA;&#xD;&#xA;Lets say there is a MeshComponent who has vertices, normals etc. If several GameObjects have the same MeshComponent, there will be a lot of memory waste. Of course there are many ways to implements this but I want some good advice how to solve this? How do components share data that is not going to be modified?&#xD;&#xA;" />
  <row Id="27652" PostHistoryTypeId="1" PostId="12574" RevisionGUID="8250af5e-ada0-4527-9b40-a409ca16c469" CreationDate="2011-05-22T08:24:20.883" UserId="5612" Text="Component based game design" />
  <row Id="27653" PostHistoryTypeId="3" PostId="12574" RevisionGUID="8250af5e-ada0-4527-9b40-a409ca16c469" CreationDate="2011-05-22T08:24:20.883" UserId="5612" Text="&lt;game-design&gt;&lt;component-based&gt;" />
  <row Id="27654" PostHistoryTypeId="6" PostId="12574" RevisionGUID="7f44dfd7-05b7-48cc-9a72-a96795a44c8e" CreationDate="2011-05-22T08:42:45.670" UserId="51" Comment="edited tags; edited title" Text="&lt;component-based&gt;" />
  <row Id="27655" PostHistoryTypeId="4" PostId="12574" RevisionGUID="7f44dfd7-05b7-48cc-9a72-a96795a44c8e" CreationDate="2011-05-22T08:42:45.670" UserId="51" Comment="edited tags; edited title" Text="Component based game design and sharing mesh data" />
  <row Id="27656" PostHistoryTypeId="2" PostId="12575" RevisionGUID="f75a4195-5f05-471a-8936-7d34e39aaac9" CreationDate="2011-05-22T08:45:26.727" UserId="51" Text="You need to make the distinction between &quot;component&quot; and &quot;asset&quot;.  &#xD;&#xA;&#xD;&#xA;Basically, you would have some kind of renderer component attached to your game object that references a mesh (by a handle or by pointer or whatever) and uses that.  It's just like how you reference textures by ID instead of having everything that needs a texture have all the pixel data." />
  <row Id="27657" PostHistoryTypeId="25" PostId="12574" RevisionGUID="e2083ecc-c356-457b-bdbb-369da4509b55" CreationDate="2011-05-22T09:12:31.790" Comment="http://twitter.com/#!/StackGameDev/status/72228335052263424" />
  <row Id="27658" PostHistoryTypeId="2" PostId="12576" RevisionGUID="88db76f1-dd23-4e9b-9dc9-7a3ef739c664" CreationDate="2011-05-22T09:20:39.257" UserId="7168" Text="i have begun creating a very simple game engine and i am trying to work out how to create a time scale for the game.by time scale i mean some way of increasing and decreasing the speed of the game(not the fps) like creating a slow motion effect ... &#xD;&#xA;i have no idea how this could be accomplished so any help would be appreciated. &#xD;&#xA;if this help im using windows, Opengl and C++ in the game engine..." />
  <row Id="27659" PostHistoryTypeId="1" PostId="12576" RevisionGUID="88db76f1-dd23-4e9b-9dc9-7a3ef739c664" CreationDate="2011-05-22T09:20:39.257" UserId="7168" Text="C++ Game engine time scale" />
  <row Id="27660" PostHistoryTypeId="3" PostId="12576" RevisionGUID="88db76f1-dd23-4e9b-9dc9-7a3ef739c664" CreationDate="2011-05-22T09:20:39.257" UserId="7168" Text="&lt;opengl&gt;&lt;c++&gt;&lt;game-mechanics&gt;&lt;gameloop&gt;" />
  <row Id="27661" PostHistoryTypeId="2" PostId="12577" RevisionGUID="a40faed8-45d1-4a0f-adfe-6e4677ab993a" CreationDate="2011-05-22T09:31:05.017" UserId="2132" Text="The essence of this question is basically this: consider a strategy, RTS or a tower-defence game, where you have the choice to build a new unit or to upgrade an existing one. The upgraded unit is definitely worth more than a non-upgraded one, but by how much?&#xD;&#xA;&#xD;&#xA;In designing a upgrade path, how do design it such that&#xD;&#xA;&#xD;&#xA;1. Upgrading is worth the time and effort&#xD;&#xA;2. However, upgrading doesn't becomes too uber that the player forgo building new units?&#xD;&#xA;&#xD;&#xA;For example, for Defence Grid, a glance at a number shows that two Level 1 Gun turrets does less damage output than a Level 2 Gun turret; however there are advantages to having 2 tower than 1 (say, you need to cover two different paths).&#xD;&#xA;&#xD;&#xA; " />
  <row Id="27662" PostHistoryTypeId="1" PostId="12577" RevisionGUID="a40faed8-45d1-4a0f-adfe-6e4677ab993a" CreationDate="2011-05-22T09:31:05.017" UserId="2132" Text="Balancing upgraded units vs. non-upgraded ones" />
  <row Id="27663" PostHistoryTypeId="3" PostId="12577" RevisionGUID="a40faed8-45d1-4a0f-adfe-6e4677ab993a" CreationDate="2011-05-22T09:31:05.017" UserId="2132" Text="&lt;game-design&gt;" />
  <row Id="27664" PostHistoryTypeId="2" PostId="12578" RevisionGUID="51f74d65-aabd-49d5-bdae-fa03334ab204" CreationDate="2011-05-22T09:36:21.997" UserId="2132" Text="I'm not sure about the architecture of your game, so what's follow is a rather generic answer. Usually there are two different 'rates' in the game - the screen refresh or draw rate, and the logic update rate.&#xD;&#xA;&#xD;&#xA;The draw rate is the FPS - some game engines will try to draw as often as possible, while others will try to draw at a fixed rate. Regardless, it is not a good idea to tie logic updating to the draw rate of your game.&#xD;&#xA;&#xD;&#xA;Most game engines instead will have a update loop, which is governed by the logic update rate. This is the rate you you to speed up, slow down, or pause the game. To pause, you simple stop updating. To slow down, you increase the time between each update, and so on.&#xD;&#xA;&#xD;&#xA;As an example, Unity3D has a variable called `Time.timeScale`, which affects the `Time.deltaTime` variable used by all most logic functions to determine the elapsed time each frame. By setting the time scale to 1.0f, the game runs at normal speed. Setting it at 0.5f will run it half the speed." />
  <row Id="27665" PostHistoryTypeId="5" PostId="12576" RevisionGUID="f71d5515-0cb1-4313-90a9-0f6a4c254d55" CreationDate="2011-05-22T09:46:21.030" UserId="7168" Comment="added 147 characters in body" Text="i have begun creating a very simple game engine and i am trying to work out how to create a time scale for the game.by time scale i mean some way of increasing and decreasing the speed of the game(not the fps) like creating a slow motion effect ... &#xD;&#xA;i have no idea how this could be accomplished so any help would be appreciated. &#xD;&#xA;if this help im using windows, Opengl and C++ in the game engine...&#xD;&#xA;&#xD;&#xA;How my engine is setup&#xD;&#xA;i have an update and draw function...update is called 25 times per second while display is called as much as possible. " />
  <row Id="27666" PostHistoryTypeId="2" PostId="12579" RevisionGUID="cec7f631-bdd9-48f4-b1b6-a73876347a1f" CreationDate="2011-05-22T09:54:12.463" UserId="1479" Text="Umm, i have a few things to mention here ...&#xD;&#xA;&#xD;&#xA;First you're using GUI which is in WC3 really weak and not useful, try to learn Jass and vJass they're more powerful&#xD;&#xA;&#xD;&#xA;Second, there are plenty of forums made for Wc3 the best i know is [a wc3c](www.wc3c.net). They can help you better than we can do.&#xD;&#xA;&#xD;&#xA;Third, it seems that you are trying to do something like a berserk skill, you should try to create a dummy unit add it an ability with the buff and the duration you want and let it cast the ability on all units u want to have the buff.&#xD;&#xA;&#xD;&#xA;Forth, waits in picks are stupid, because they will go like this: First unit gets buffed - 6 seconds wait - debuff - Second unit gets buffed - 6 seconds wait - etc. I guess you don't want it to happen like this" />
  <row Id="27667" PostHistoryTypeId="2" PostId="12580" RevisionGUID="627a103c-3069-4b0a-b2fe-01d9b2a536f1" CreationDate="2011-05-22T10:04:48.823" UserId="7522" Text="I want to develop a 3D multiplayer game for android , what is the best game engine , what is the best software to create 3d objects to import them to android ?&#xD;&#xA;&#xD;&#xA;Thank you ." />
  <row Id="27668" PostHistoryTypeId="1" PostId="12580" RevisionGUID="627a103c-3069-4b0a-b2fe-01d9b2a536f1" CreationDate="2011-05-22T10:04:48.823" UserId="7522" Text="Want to develop android game" />
  <row Id="27669" PostHistoryTypeId="3" PostId="12580" RevisionGUID="627a103c-3069-4b0a-b2fe-01d9b2a536f1" CreationDate="2011-05-22T10:04:48.823" UserId="7522" Text="&lt;android&gt;&lt;3d-engines&gt;&lt;3d-meshes&gt;" />
  <row Id="27670" PostHistoryTypeId="2" PostId="12581" RevisionGUID="02c89341-312e-4ac3-bea5-eaacc99056bb" CreationDate="2011-05-22T10:12:16.660" UserId="1156" Text="I would assume you want a different structure for a MeshComponent than, say, a HealthComponent.&#xD;&#xA;&#xD;&#xA;Consider some kind of AssetManager or ResourceManager that holds the resources - be it a mesh, a map, or a texture (probably different managers) - and your MeshComponent holds a reference or a pointer. All the meshes will share the same actual mesh.&#xD;&#xA;&#xD;&#xA;You may have some system like this: (since there is no language given, this is C# -  C++ or other non managed languages would need pointers somewhere)&#xD;&#xA;&#xD;&#xA;    ResourceCache&lt;Mesh&gt; meshManager = new ResourceCache&lt;Mesh&gt;();&#xD;&#xA;    meshManager.Load(&quot;sphere&quot;);&#xD;&#xA;    Entity e = Entity.Create(); //Factory&#xD;&#xA;    e.AddComponent(&quot;Mesh&quot;, new MeshComponent(meshManager.GetReferenceTo(&quot;sphere&quot;));&#xD;&#xA;&#xD;&#xA;The only problem arises if you want any kind of mesh deformation. You'll probably either want to store a list of changed vertex data OR a whole new set of mesh data. Probably the former." />
  <row Id="27671" PostHistoryTypeId="2" PostId="12582" RevisionGUID="26bc9dbf-df35-4c93-a25a-0e7a14c6a36f" CreationDate="2011-05-22T10:16:13.023" UserId="1156" Text="[This][1] question explains how to load models into android.&#xD;&#xA;&#xD;&#xA;A quick google search for Android 3D Engines gave me:&#xD;&#xA;&#xD;&#xA;[jPCT-AE][2]&#xD;&#xA;&#xD;&#xA;[Unity3D][3] now does Android - this is a great option, but I believe you have to pay. It probably is the 'best' engine by any means..except cost.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/204363/is-there-a-way-to-import-a-3d-model-into-android&#xD;&#xA;  [2]: http://www.jpct.net/jpct-ae/&#xD;&#xA;  [3]: http://unity3d.com/" />
  <row Id="27672" PostHistoryTypeId="2" PostId="12583" RevisionGUID="00ba5713-1cb8-4f29-9e7f-94d527021dc8" CreationDate="2011-05-22T10:19:27.053" UserId="1479" Text="You should consider the price and the time it takes to upgrade, if you have a fixed upgrade/build time for every unit you can ignore that.  &#xD;&#xA;The value(for the player) should scale with the price he pays for it.&#xD;&#xA;&#xD;&#xA;You should also consider how much time it needs to gain a certain amount of money.&#xD;&#xA;&#xD;&#xA;Just a few thoughts." />
  <row Id="27673" PostHistoryTypeId="2" PostId="12584" RevisionGUID="a2c5b14f-646e-44c9-8159-bb7091fd946e" CreationDate="2011-05-22T10:32:47.337" UserId="7328" Text="upgrading usualy doesn't consume space but putting new guns need some more spac so if I were to balance them i would put higher price for upgrades, and besides i think it's logical that upgrades take less time than new building but that's for you to decide, so i think for an upgrade that duplicate a tower's power i would ask for 1.2 of the tower original price and set 0.9 of building time for upgrade time. the same senario goes for rts games, except map size limit it's usualy population limit that prevents you from building lots of things." />
  <row Id="27674" PostHistoryTypeId="2" PostId="12585" RevisionGUID="a71d8b16-2bbb-4c92-b740-24ba11c79390" CreationDate="2011-05-22T10:38:07.507" UserId="7328" Text="i guess the easiest way is to change delta_time value you pass to your update functions, for example if you tell your update functions that the last fram took 1/120s but having 1/60s for a real frame, it makes your game to update half normal speed (it doesn't affect controls but may couse some side effect like delaying buttons and etc.)" />
  <row Id="27675" PostHistoryTypeId="2" PostId="12586" RevisionGUID="75872441-b33b-4e49-86e5-a785045aa700" CreationDate="2011-05-22T10:46:21.820" UserId="7328" Text="i think the easiest way to solve your problem is to change your camera type from prespective to isometric, that will solve the problem you are facing, but if you want to realy render tour scene with perspective features you have to change your set position function, the whole idea is to find a position where a ray hits a plane right in front of the camera, you have to compute what ray is using x/y your physics engine (ray's starting point is your camera and it's direction is based on the x/y of your object) and the plane it hits is perpendicular to camera direction right in from of it." />
  <row Id="27676" PostHistoryTypeId="2" PostId="12587" RevisionGUID="1cdf2f4f-87fc-4fb2-a5a4-86b1de885062" CreationDate="2011-05-22T11:31:51.533" UserId="3505" Text="In Sanctum (tower defence) you get the most damage for your money by building low level turrets. However, depending on how you build your maze not all turret positions will be equal, some will be able to shoot for long periods of time, others not so much, so the optimal strategy would be to build high level towers at the best points, low level towers at the lesser points, and nothing at the very worst points.&#xD;&#xA;&#xD;&#xA;RTS games are quite different, the whole position aspect doesn't exist for mobile units. A typical formula is to make the high level units overall better for their price, but make it so that you have to do an initial investment in order to be able to build them, that could be do some research that takes time and cost money, or build a structure to enable the construction. So the player will have to balance when to move for the higher level units, which at that point will decrease the immediate unit output and thus temporarily weaken the player. Another thing to do is make the strengths of the units different rather than one just being stronger than another, they will have different perks making a strategy that combines them and is capable of adjusting depending on what the enemy does optimal. This is for instance very typical for Blizzard RTS games, but it takes a lot of skill, time and testing to do just right.&#xD;&#xA;&#xD;&#xA;And finally an anecdote:  &#xD;&#xA;The optimal multiplayer strategy in the RTS game Earth 2150 is to choose the Lunar faction and build nothing but Lunars equipped with machine guns. This is basically the cheapest fighting capable unit in the game, whenever taking fire it's gone almost instantly. But it's cheap, and very quickly produced, so you can field an abundance before the opponent has a chance to do anything serious.&#xD;&#xA;&#xD;&#xA;Not a lot of people ever discovered this on their own, everyone just presume that it's a worthless unit, because that is what a lot of other games and campaign mode has taught them.&#xD;&#xA;&#xD;&#xA;Balancing is a really tough job, and it's very easy to fail in anticipating a simple winning strategy." />
  <row Id="27677" PostHistoryTypeId="2" PostId="12588" RevisionGUID="7e0c01ed-9f37-41ae-bcb7-6496cc648b06" CreationDate="2011-05-22T11:53:33.473" UserId="5401" Text="In all of the code samples that I have looked at, the game loop looks something like this:&#xD;&#xA;&#xD;&#xA;    while(true)&#xD;&#xA;    {&#xD;&#xA;       InputAndUpdate();&#xD;&#xA;       Draw();&#xD;&#xA;&#xD;&#xA;       SwapBuffers();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However doesn't this destroy parallelism between the CPU and the GPU? After the swap buffers call, the GPU will be sitting there idly while the CPU is handling input and updating. Then when the CPU has finished issuing draw commands, it waits until the CPU is finished.&#xD;&#xA;Why isn't it done like this? :&#xD;&#xA;&#xD;&#xA;    while(true)&#xD;&#xA;    {&#xD;&#xA;       Draw(); //First issue the draw commands&#xD;&#xA;       InputAndUpdate(); //Update while the GPU is busy rendering&#xD;&#xA;    &#xD;&#xA;       SwapBuffers(); //Now block and wait for the GPU to finish&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27678" PostHistoryTypeId="1" PostId="12588" RevisionGUID="7e0c01ed-9f37-41ae-bcb7-6496cc648b06" CreationDate="2011-05-22T11:53:33.473" UserId="5401" Text="Draw and update order in 3d graphics." />
  <row Id="27679" PostHistoryTypeId="3" PostId="12588" RevisionGUID="7e0c01ed-9f37-41ae-bcb7-6496cc648b06" CreationDate="2011-05-22T11:53:33.473" UserId="5401" Text="&lt;opengl&gt;&lt;graphics&gt;&lt;directx&gt;&lt;3d-engines&gt;" />
  <row Id="27680" PostHistoryTypeId="5" PostId="12588" RevisionGUID="f56f251e-a38a-4865-8dd8-c07620910626" CreationDate="2011-05-22T12:01:54.520" UserId="5401" Comment="added 10 characters in body" Text="In all of the code samples that I have looked at, the game loop looks something like this:&#xD;&#xA;&#xD;&#xA;    while(true)&#xD;&#xA;    {&#xD;&#xA;       InputAndUpdate();&#xD;&#xA;       Draw();&#xD;&#xA;&#xD;&#xA;       SwapBuffers();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However doesn't this destroy parallelism between the CPU and the GPU? After the swap buffers call, the GPU will be sitting there idly while the CPU is handling input and updating. Then when the CPU has finished issuing draw commands, it waits until the GPU is finished rendering.&#xD;&#xA;Why isn't it done like this? :&#xD;&#xA;&#xD;&#xA;    while(true)&#xD;&#xA;    {&#xD;&#xA;       Draw(); //First issue the draw commands&#xD;&#xA;       InputAndUpdate(); //Update while the GPU is busy rendering&#xD;&#xA;    &#xD;&#xA;       SwapBuffers(); //Now block and wait for the GPU to finish&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27681" PostHistoryTypeId="6" PostId="12588" RevisionGUID="ec35172d-0c8c-425e-a11c-b5fbd5c25463" CreationDate="2011-05-22T12:06:17.010" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;graphics&gt;&lt;3d-engines&gt;&lt;gameloop&gt;" />
  <row Id="27682" PostHistoryTypeId="2" PostId="12589" RevisionGUID="f84440b7-17f0-44eb-a1bb-7510878d8438" CreationDate="2011-05-22T12:11:37.290" UserId="5275" Text="I've got a camera that places the character about a 1/4 way into the screen. The problem I'm having is that when the character moves left the character stays in place now placing the character 3/4 the way into the screen. I tried rectifying the issue with the following code.&#xD;&#xA;&#xD;&#xA;    public Vector2 Position = Vector2.Zero;&#xD;&#xA;            public Matrix TransformMatrix&#xD;&#xA;            {&#xD;&#xA;                get&#xD;&#xA;                {&#xD;&#xA;                    return Matrix.CreateTranslation(new Vector3(-Position, 0f));&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void LockToTarget(Vector2 charPosition,Rectangle bounds, int screenWidth, int screenHeight, bool direction)&#xD;&#xA;            {&#xD;&#xA;                float multiplyBy = 0;&#xD;&#xA;    &#xD;&#xA;                 if(direction)&#xD;&#xA;                     multiplyBy = 0.25f;&#xD;&#xA;                 else if(!direction)&#xD;&#xA;                     multiplyBy = 0.75f;&#xD;&#xA;    &#xD;&#xA;                 Position.X = charPosition.X + (bounds.Width * multiplyBy) - (screenWidth * multiplyBy);&#xD;&#xA;                 Position.Y = charPosition.Y + (bounds.Height / 2) - (screenHeight / 2);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;it pretty much gets a boolean value telling it if the character is moving towards the left or right (true = right, false = left), the problem is that the when the character starts moving from on direction to another he simply jumps to the other side of the screen and I'm not sure how to get the camera to move position instead. &#xD;&#xA;&#xD;&#xA;any help with this would be really great. " />
  <row Id="27683" PostHistoryTypeId="1" PostId="12589" RevisionGUID="f84440b7-17f0-44eb-a1bb-7510878d8438" CreationDate="2011-05-22T12:11:37.290" UserId="5275" Text="moving 2D camera" />
  <row Id="27684" PostHistoryTypeId="3" PostId="12589" RevisionGUID="f84440b7-17f0-44eb-a1bb-7510878d8438" CreationDate="2011-05-22T12:11:37.290" UserId="5275" Text="&lt;xna&gt;&lt;camera&gt;" />
  <row Id="27685" PostHistoryTypeId="25" PostId="12588" RevisionGUID="98bd84c6-5708-4781-bb9d-d517005af47f" CreationDate="2011-05-22T12:12:32.500" Comment="http://twitter.com/#!/StackGameDev/status/72273635582283776" />
  <row Id="27686" PostHistoryTypeId="2" PostId="12590" RevisionGUID="ab65898b-a9a2-476d-b272-4ddc1f194624" CreationDate="2011-05-22T12:15:08.100" UserId="4410" Text="This would be true unless you have an extra back buffer to render into (double-buffering). That allows the CPU to carry on and do stuff without having to wait for the actual buffer swap to occur (which would normally be the case as you couldn't start modifying the back buffer until it had been copied to the front buffer without risk of corrupting what you just rendered). When a draw call or swap is made, the request goes into a buffer of commands that the GPU can process, allowing the CPU to get on with doing other things while the GPU runs behind. This is how modern hardware gets parallelism. I believe D3D has a limit on just how many frames you can render ahead before a &quot;Swap&quot; will block (you'd need multiple back buffers to achieve this - also the more you buffer up the more latency you can potentially introduce between the input method and what is appearing on screen).&#xD;&#xA;&#xD;&#xA;The concept of a game loop like either example above is quite dated. With the introduction of multiple processing units on the CPU you could potentially be doing rendering on one thread while doing some &quot;update&quot; work on one or more others. You might want to look into the concept of job queues to help maximise all the CPU processing power available." />
  <row Id="27687" PostHistoryTypeId="6" PostId="12589" RevisionGUID="0ea0187e-d931-40c6-8a42-c2f00b685b33" CreationDate="2011-05-22T12:20:26.527" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;&lt;camera&gt;" />
  <row Id="27688" PostHistoryTypeId="5" PostId="12570" RevisionGUID="9998926c-ede2-4083-98a0-6b895ab75197" CreationDate="2011-05-22T12:34:11.960" UserId="7709" Comment="added 2605 characters in body" Text="I am new to game physics, i am trying to adapt a simple 2d balls Simulation code for the 3d simulation with java3D library, but i have this problem:&#xD;&#xA;&#xD;&#xA;Two things i noted down the values generated by engine, for ***X/Y*** are too high and ***minX/minY/maxY/maxX*** values are causing troubles &#xD;&#xA;&#xD;&#xA;*some time the balls are drawing but not moving*&#xD;&#xA;&#xD;&#xA;*some time going out of the panel*&#xD;&#xA;&#xD;&#xA;*some time moving on little area*&#xD;&#xA;&#xD;&#xA;*some time just stick at one place...*&#xD;&#xA;&#xD;&#xA;and i m unable to select/define/set the default correct/suitable values considering the 3D graphics scaling/resolution while they are set with respect to 2d screen coordinates, that is my only problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;please help,&#xD;&#xA;&#xD;&#xA;this is code :&#xD;&#xA;&#xD;&#xA;    public class Ball extends GameObject {&#xD;&#xA;    	private float x, y; // Ball's center (x, y)&#xD;&#xA;    	private float speedX, speedY; // Ball's speed per step in x and y&#xD;&#xA;    	private float radius; // Ball's radius&#xD;&#xA;    	// Collision detected by collision detection and response algorithm?&#xD;&#xA;    	boolean collisionDetected = false;&#xD;&#xA;    	&#xD;&#xA;	    // If collision detected, the next state of the ball.&#xD;&#xA;	    // Otherwise, meaningless.&#xD;&#xA;	    private float nextX, nextY;&#xD;&#xA;	    private float nextSpeedX, nextSpeedY;&#xD;&#xA;	&#xD;&#xA;	    private static final float BOX_WIDTH = 640;&#xD;&#xA;	    private static final float BOX_HEIGHT = 480;&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Constructor The velocity is specified in polar coordinates of speed and&#xD;&#xA;	 * moveAngle (for user friendliness), in Graphics coordinates with an&#xD;&#xA;	 * inverted y-axis.&#xD;&#xA;	 */&#xD;&#xA;	public Ball(String name1,float x, float y, float radius, float speed,&#xD;&#xA;			float angleInDegree, Color color) {&#xD;&#xA;		this.x = x;&#xD;&#xA;		this.y = y;&#xD;&#xA;		// Convert velocity from polar to rectangular x and y.&#xD;&#xA;		this.speedX = speed * (float) Math.cos(Math.toRadians(angleInDegree));&#xD;&#xA;		this.speedY = speed * (float) Math.sin(Math.toRadians(angleInDegree));&#xD;&#xA;		this.radius = radius;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void move()  {&#xD;&#xA;		if (collisionDetected) {&#xD;&#xA;			// Collision detected, use the values computed.&#xD;&#xA;			x = nextX;&#xD;&#xA;			y = nextY;&#xD;&#xA;			speedX = nextSpeedX;&#xD;&#xA;			speedY = nextSpeedY;&#xD;&#xA;		} else {&#xD;&#xA;			// No collision, move one step and no change in speed.&#xD;&#xA;			x += speedX;&#xD;&#xA;			y += speedY;&#xD;&#xA;		}&#xD;&#xA;		collisionDetected = false; // Clear the flag for the next step&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void collideWith()  {&#xD;&#xA;		// Get the ball's bounds, offset by the radius of the ball&#xD;&#xA;		float minX = 0.0f + radius;&#xD;&#xA;		float minY = 0.0f + radius;&#xD;&#xA;		float maxX = 0.0f + BOX_WIDTH - 1.0f - radius;&#xD;&#xA;		float maxY = 0.0f + BOX_HEIGHT - 1.0f - radius;&#xD;&#xA;&#xD;&#xA;		double gravAmount = 0.9811111f;&#xD;&#xA;		double gravDir = (90 / 57.2960285258);&#xD;&#xA;&#xD;&#xA;		// Try moving one full step&#xD;&#xA;		nextX = x + speedX;&#xD;&#xA;		nextY = y + speedY;&#xD;&#xA;		System.out.println(&quot;In serializedBall in collision.&quot;);&#xD;&#xA;&#xD;&#xA;		// If collision detected. Reflect on the x or/and y axis&#xD;&#xA;		// and place the ball at the point of impact.&#xD;&#xA;		if (speedX != 0) {&#xD;&#xA;			if (nextX &gt; maxX) { // Check maximum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = maxX;&#xD;&#xA;				nextY = (maxX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			} else if (nextX &lt; minX) { // Check minimum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = minX;&#xD;&#xA;				nextY = (minX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		// In case the ball runs over both the borders.&#xD;&#xA;		if (speedY != 0) {&#xD;&#xA;			if (nextY &gt; maxY) { // Check maximum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = maxY;&#xD;&#xA;				nextX = (maxY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			} else if (nextY &lt; minY) { // Check minimum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = minY;&#xD;&#xA;				nextX = (minY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		speedX += Math.cos(gravDir) * gravAmount;&#xD;&#xA;		speedY += Math.sin(gravDir) * gravAmount;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;        public float getSpeed()  {&#xD;&#xA;		return (float) Math.sqrt(speedX * speedX + speedY * speedY);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getMoveAngle()  {&#xD;&#xA;		return (float) Math.toDegrees(Math.atan2(speedY, speedX));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getRadius()  {&#xD;&#xA;		return radius;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public float getX() {&#xD;&#xA;		return x;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getY() {&#xD;&#xA;		return y;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void setX(float f) {&#xD;&#xA;		x =  f;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setY(float f) {&#xD;&#xA;		y =  f;&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; here how i m drawing the balls:&#xD;&#xA;&#xD;&#xA;       public 3DmovingBodies() {&#xD;&#xA;    &#xD;&#xA;    		rand = new Random();&#xD;&#xA;    		float angleInDegree = rand.nextInt(360);&#xD;&#xA;    &#xD;&#xA;    		setLayout(new BorderLayout());&#xD;&#xA;    		GraphicsConfiguration config = SimpleUniverse&#xD;&#xA;    				.getPreferredConfiguration();&#xD;&#xA;    		Canvas3D c = new Canvas3D(config);&#xD;&#xA;    		add(&quot;Center&quot;, c);&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		ball[0] = new Ball(0.5f, 0.0f, 0.5f, 0.4f, angleInDegree, Color.yellow);&#xD;&#xA;    	     // ball[1] = new Ball(1.0f, 0.0f, 0.25f, 0.8f, angleInDegree, Color.red);&#xD;&#xA;    	     // ball[2] = new Ball(0.0f, 1.0f, 0.15f, 0.11f, angleInDegree Color.blue);&#xD;&#xA;    &#xD;&#xA;    		trans[0] = new Transform3D();&#xD;&#xA;    		// trans[1] = new Transform3D();&#xD;&#xA;    		// trans[2] = new Transform3D();&#xD;&#xA;    &#xD;&#xA;    		sphere[0] = new Sphere(0.5f);&#xD;&#xA;    		// sphere[1] = new Sphere(0.25f);&#xD;&#xA;    		// sphere[2] = new Sphere(0.15f);&#xD;&#xA;    &#xD;&#xA;    		// Create a simple scene and attach it to the virtual universe&#xD;&#xA;    		BranchGroup scene = createSceneGraph();&#xD;&#xA;    &#xD;&#xA;    		SimpleUniverse u = new SimpleUniverse(c);&#xD;&#xA;    		u.getViewingPlatform().setNominalViewingTransform();&#xD;&#xA;    &#xD;&#xA;    		u.addBranchGraph(scene);&#xD;&#xA;    &#xD;&#xA;    		startSimulation();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	public BranchGroup createSceneGraph() {&#xD;&#xA;    		// Create the root of the branch graph&#xD;&#xA;    		BranchGroup objRoot = new BranchGroup();&#xD;&#xA;    &#xD;&#xA;    		for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;    &#xD;&#xA;    			// Create a simple shape leaf node, add it to the scene graph.&#xD;&#xA;    &#xD;&#xA;    			objTrans[i] = new TransformGroup();&#xD;&#xA;    			objTrans[i].setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&#xD;&#xA;    			Transform3D pos1 = new Transform3D();&#xD;&#xA;    			pos1.setTranslation(randomPos());&#xD;&#xA;    			objTrans[i].setTransform(pos1);&#xD;&#xA;    			objTrans[i].addChild(sphere[i]);&#xD;&#xA;    &#xD;&#xA;    			objRoot.addChild(objTrans[i]);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),&#xD;&#xA;    				100.0);&#xD;&#xA;    &#xD;&#xA;    		Color3f light1Color = new Color3f(1.0f, 0.0f, 0.2f);&#xD;&#xA;    		Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);&#xD;&#xA;    		DirectionalLight light1 = new DirectionalLight(light1Color,&#xD;&#xA;    				light1Direction);&#xD;&#xA;    		light1.setInfluencingBounds(bounds);&#xD;&#xA;    		objRoot.addChild(light1);&#xD;&#xA;    &#xD;&#xA;    		// Set up the ambient light&#xD;&#xA;    		Color3f ambientColor = new Color3f(1.0f, 1.0f, 1.0f);&#xD;&#xA;    		AmbientLight ambientLightNode = new AmbientLight(ambientColor);&#xD;&#xA;    		ambientLightNode.setInfluencingBounds(bounds);&#xD;&#xA;    		objRoot.addChild(ambientLightNode);&#xD;&#xA;    &#xD;&#xA;    		return objRoot;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	public void drawworld() {&#xD;&#xA;    		System.out.println(&quot;Ball = &quot; + ball.toString());&#xD;&#xA;    &#xD;&#xA;    		for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;    			printTG(objTrans[i], &quot;SteerTG&quot;);&#xD;&#xA;    			trans[i].setTranslation(new Vector3f(ball[i].getX(),&#xD;&#xA;    					ball[i].getY(), 0.0f));&#xD;&#xA;    			objTrans[i].setTransform(trans[i]);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27689" PostHistoryTypeId="2" PostId="12591" RevisionGUID="5204a0d6-2c87-449f-9191-43c13c42ec1e" CreationDate="2011-05-22T12:39:34.827" UserId="2111" Text="This is because you're setting the position of the camera right away. This will make the camera jump from one position to another when you change direction, therefore giving the illusion that your player is jumping. &#xD;&#xA;&#xD;&#xA;Since you're using XNA, you could use the magic of MathHelper.Lerp to progressively change from one position to another:&#xD;&#xA;&#xD;&#xA;    const float CAM_LERP_FACTOR = 0.2f; // change this to what you prefer&#xD;&#xA;    float newX = charPosition.X + (bounds.Width * multiplyBy) - (screenWidth * multiplyBy);&#xD;&#xA;    Position.X = MathHelper.Lerp(Position.X, newX, CAM_LERP_FACTOR);&#xD;&#xA;&#xD;&#xA;By playing with the values of the lerp factor (I usually choose a value between 0.1f and 0.2f) you should get an interesting effect.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27690" PostHistoryTypeId="5" PostId="12570" RevisionGUID="b7dea1ae-a512-4a8f-bbff-63d2573eacbe" CreationDate="2011-05-22T12:40:15.700" UserId="7709" Comment="added 469 characters in body" Text="I am new to game physics, i am trying to adapt a simple 2d balls Simulation code for the 3d simulation with java3D library, but i have this problem:&#xD;&#xA;&#xD;&#xA;Two things i noted down the values generated by engine, for ***X/Y*** are too high and ***minX/minY/maxY/maxX*** values are causing troubles &#xD;&#xA;&#xD;&#xA;*some time the balls are drawing but not moving*&#xD;&#xA;&#xD;&#xA;*some time going out of the panel*&#xD;&#xA;&#xD;&#xA;*some time moving on little area*&#xD;&#xA;&#xD;&#xA;*some time just stick at one place...*&#xD;&#xA;&#xD;&#xA;and i m unable to select/define/set the default correct/suitable values considering the 3D graphics scaling/resolution while they are set with respect to 2d screen coordinates, that is my only problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;please help,&#xD;&#xA;&#xD;&#xA;this is code :&#xD;&#xA;&#xD;&#xA;    public class Ball extends GameObject {&#xD;&#xA;    	private float x, y; // Ball's center (x, y)&#xD;&#xA;    	private float speedX, speedY; // Ball's speed per step in x and y&#xD;&#xA;    	private float radius; // Ball's radius&#xD;&#xA;    	// Collision detected by collision detection and response algorithm?&#xD;&#xA;    	boolean collisionDetected = false;&#xD;&#xA;    	&#xD;&#xA;	    // If collision detected, the next state of the ball.&#xD;&#xA;	    // Otherwise, meaningless.&#xD;&#xA;	    private float nextX, nextY;&#xD;&#xA;	    private float nextSpeedX, nextSpeedY;&#xD;&#xA;	&#xD;&#xA;	    private static final float BOX_WIDTH = 640;&#xD;&#xA;	    private static final float BOX_HEIGHT = 480;&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Constructor The velocity is specified in polar coordinates of speed and&#xD;&#xA;	 * moveAngle (for user friendliness), in Graphics coordinates with an&#xD;&#xA;	 * inverted y-axis.&#xD;&#xA;	 */&#xD;&#xA;	public Ball(String name1,float x, float y, float radius, float speed,&#xD;&#xA;			float angleInDegree, Color color) {&#xD;&#xA;		this.x = x;&#xD;&#xA;		this.y = y;&#xD;&#xA;		// Convert velocity from polar to rectangular x and y.&#xD;&#xA;		this.speedX = speed * (float) Math.cos(Math.toRadians(angleInDegree));&#xD;&#xA;		this.speedY = speed * (float) Math.sin(Math.toRadians(angleInDegree));&#xD;&#xA;		this.radius = radius;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void move()  {&#xD;&#xA;		if (collisionDetected) {&#xD;&#xA;			// Collision detected, use the values computed.&#xD;&#xA;			x = nextX;&#xD;&#xA;			y = nextY;&#xD;&#xA;			speedX = nextSpeedX;&#xD;&#xA;			speedY = nextSpeedY;&#xD;&#xA;		} else {&#xD;&#xA;			// No collision, move one step and no change in speed.&#xD;&#xA;			x += speedX;&#xD;&#xA;			y += speedY;&#xD;&#xA;		}&#xD;&#xA;		collisionDetected = false; // Clear the flag for the next step&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void collideWith()  {&#xD;&#xA;		// Get the ball's bounds, offset by the radius of the ball&#xD;&#xA;		float minX = 0.0f + radius;&#xD;&#xA;		float minY = 0.0f + radius;&#xD;&#xA;		float maxX = 0.0f + BOX_WIDTH - 1.0f - radius;&#xD;&#xA;		float maxY = 0.0f + BOX_HEIGHT - 1.0f - radius;&#xD;&#xA;&#xD;&#xA;		double gravAmount = 0.9811111f;&#xD;&#xA;		double gravDir = (90 / 57.2960285258);&#xD;&#xA;&#xD;&#xA;		// Try moving one full step&#xD;&#xA;		nextX = x + speedX;&#xD;&#xA;		nextY = y + speedY;&#xD;&#xA;		System.out.println(&quot;In serializedBall in collision.&quot;);&#xD;&#xA;&#xD;&#xA;		// If collision detected. Reflect on the x or/and y axis&#xD;&#xA;		// and place the ball at the point of impact.&#xD;&#xA;		if (speedX != 0) {&#xD;&#xA;			if (nextX &gt; maxX) { // Check maximum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = maxX;&#xD;&#xA;				nextY = (maxX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			} else if (nextX &lt; minX) { // Check minimum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = minX;&#xD;&#xA;				nextY = (minX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		// In case the ball runs over both the borders.&#xD;&#xA;		if (speedY != 0) {&#xD;&#xA;			if (nextY &gt; maxY) { // Check maximum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = maxY;&#xD;&#xA;				nextX = (maxY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			} else if (nextY &lt; minY) { // Check minimum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = minY;&#xD;&#xA;				nextX = (minY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		speedX += Math.cos(gravDir) * gravAmount;&#xD;&#xA;		speedY += Math.sin(gravDir) * gravAmount;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;        public float getSpeed()  {&#xD;&#xA;		return (float) Math.sqrt(speedX * speedX + speedY * speedY);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getMoveAngle()  {&#xD;&#xA;		return (float) Math.toDegrees(Math.atan2(speedY, speedX));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getRadius()  {&#xD;&#xA;		return radius;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public float getX() {&#xD;&#xA;		return x;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getY() {&#xD;&#xA;		return y;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void setX(float f) {&#xD;&#xA;		x =  f;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setY(float f) {&#xD;&#xA;		y =  f;&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; here how i m drawing the balls:&#xD;&#xA;&#xD;&#xA;       public 3DmovingBodies() {&#xD;&#xA;    &#xD;&#xA;    		rand = new Random();&#xD;&#xA;    		float angleInDegree = rand.nextInt(360);&#xD;&#xA;    &#xD;&#xA;    		setLayout(new BorderLayout());&#xD;&#xA;    		GraphicsConfiguration config = SimpleUniverse&#xD;&#xA;    				.getPreferredConfiguration();&#xD;&#xA;    		Canvas3D c = new Canvas3D(config);&#xD;&#xA;    		add(&quot;Center&quot;, c);&#xD;&#xA;    		&#xD;&#xA;    		&#xD;&#xA;    		ball[0] = new Ball(0.5f, 0.0f, 0.5f, 0.4f, angleInDegree, Color.yellow);&#xD;&#xA;    	     // ball[1] = new Ball(1.0f, 0.0f, 0.25f, 0.8f, angleInDegree, Color.red);&#xD;&#xA;    	     // ball[2] = new Ball(0.0f, 1.0f, 0.15f, 0.11f, angleInDegree Color.blue);&#xD;&#xA;    &#xD;&#xA;    		trans[0] = new Transform3D();&#xD;&#xA;    		// trans[1] = new Transform3D();&#xD;&#xA;    		// trans[2] = new Transform3D();&#xD;&#xA;    &#xD;&#xA;    		sphere[0] = new Sphere(0.5f);&#xD;&#xA;    		// sphere[1] = new Sphere(0.25f);&#xD;&#xA;    		// sphere[2] = new Sphere(0.15f);&#xD;&#xA;    &#xD;&#xA;    		// Create a simple scene and attach it to the virtual universe&#xD;&#xA;    		BranchGroup scene = createSceneGraph();&#xD;&#xA;    &#xD;&#xA;    		SimpleUniverse u = new SimpleUniverse(c);&#xD;&#xA;    		u.getViewingPlatform().setNominalViewingTransform();&#xD;&#xA;    &#xD;&#xA;    		u.addBranchGraph(scene);&#xD;&#xA;    &#xD;&#xA;    		startSimulation();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	public BranchGroup createSceneGraph() {&#xD;&#xA;    		// Create the root of the branch graph&#xD;&#xA;    		BranchGroup objRoot = new BranchGroup();&#xD;&#xA;    &#xD;&#xA;    		for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;    &#xD;&#xA;    			// Create a simple shape leaf node, add it to the scene graph.&#xD;&#xA;    &#xD;&#xA;    			objTrans[i] = new TransformGroup();&#xD;&#xA;    			objTrans[i].setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&#xD;&#xA;    			Transform3D pos1 = new Transform3D();&#xD;&#xA;    			pos1.setTranslation(randomPos());&#xD;&#xA;    			objTrans[i].setTransform(pos1);&#xD;&#xA;    			objTrans[i].addChild(sphere[i]);&#xD;&#xA;    &#xD;&#xA;    			objRoot.addChild(objTrans[i]);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),&#xD;&#xA;    				100.0);&#xD;&#xA;    &#xD;&#xA;    		Color3f light1Color = new Color3f(1.0f, 0.0f, 0.2f);&#xD;&#xA;    		Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);&#xD;&#xA;    		DirectionalLight light1 = new DirectionalLight(light1Color,&#xD;&#xA;    				light1Direction);&#xD;&#xA;    		light1.setInfluencingBounds(bounds);&#xD;&#xA;    		objRoot.addChild(light1);&#xD;&#xA;    &#xD;&#xA;    		// Set up the ambient light&#xD;&#xA;    		Color3f ambientColor = new Color3f(1.0f, 1.0f, 1.0f);&#xD;&#xA;    		AmbientLight ambientLightNode = new AmbientLight(ambientColor);&#xD;&#xA;    		ambientLightNode.setInfluencingBounds(bounds);&#xD;&#xA;    		objRoot.addChild(ambientLightNode);&#xD;&#xA;    &#xD;&#xA;    		return objRoot;&#xD;&#xA;    	}&#xD;&#xA;   &#xD;&#xA;     private Vector3f randomPos()&#xD;&#xA;    	/*&#xD;&#xA;    	 * Return a random position vector. The numbers are hardwired to be within&#xD;&#xA;    	 * the confines of the box.&#xD;&#xA;    	 */&#xD;&#xA;    	{&#xD;&#xA;    		Vector3f pos = new Vector3f();&#xD;&#xA;    		pos.x = rand.nextFloat() * 5.0f - 2.5f; // -2.5 to 2.5&#xD;&#xA;    		pos.y = rand.nextFloat() * 2.0f + 0.5f; // 0.5 to 2.5&#xD;&#xA;    		pos.z = rand.nextFloat() * 5.0f - 2.5f; // -2.5 to 2.5&#xD;&#xA;    		return pos;&#xD;&#xA;    	} // end of randomPos()&#xD;&#xA;    	&#xD;&#xA;               public void drawworld() {&#xD;&#xA;        		System.out.println(&quot;Ball = &quot; + ball.toString());&#xD;&#xA;    &#xD;&#xA;    		for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;    			printTG(objTrans[i], &quot;SteerTG&quot;);&#xD;&#xA;    			trans[i].setTranslation(new Vector3f(ball[i].getX(),&#xD;&#xA;    					ball[i].getY(), 0.0f));&#xD;&#xA;    			objTrans[i].setTransform(trans[i]);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27691" PostHistoryTypeId="2" PostId="12592" RevisionGUID="6e047ab8-09c2-4add-9472-2f86238d0acf" CreationDate="2011-05-22T14:53:36.680" UserId="1923" Text="Damage to the enemy from a tower is a combination of damage amount * field of fire area.&#xD;&#xA;&#xD;&#xA;As a player, when deciding to either upgrade an existing tower or build a new tower, you would do a rough calc of field of fire area * damage strength * cost. For towers that have small field of fire area, it is usually better to build new elsewhere, but for well located towers with above average field of fire area, you would want to upgrade.&#xD;&#xA;&#xD;&#xA;As a designer, create opportunities for both so your players will have to strategize about it or experiment with it or at least mentally engage himself in that concept. Create some borderline locations too to try to trip up the player a bit before they catch on.&#xD;&#xA;" />
  <row Id="27692" PostHistoryTypeId="25" PostId="12576" RevisionGUID="d6542756-3bf7-43ca-8206-3a6eb980302d" CreationDate="2011-05-22T15:12:33.457" Comment="http://twitter.com/#!/StackGameDev/status/72318938968637440" />
  <row Id="27693" PostHistoryTypeId="2" PostId="12593" RevisionGUID="2294f5d2-74f2-4a2a-a6bd-ccba43ba3c9c" CreationDate="2011-05-22T16:24:22.610" UserId="7328" Text="the solution you sied doesn't accualy make CPU and GPU to work parrarel, it just changes the order they are waiting for each other, since as the other answer implys draw always put it's results into a backbuffer and using swapbuffers you only change what is monitor shoing with the latest thing drawn, to take full potential of both CPU and GPU you have to call draw and update in two diffrent threads and use another second buffer for what CPU is doing (so that when CPu is generating update results in buffer 2 GPU read from Buffer 1 and when CPU is working with Buffer 1 GPu use Buffer 2 just like swap buffers GPU uses to prevent changes in frame already drawn)" />
  <row Id="27694" PostHistoryTypeId="2" PostId="12594" RevisionGUID="75b0e08a-f848-4899-906f-a63229693b5c" CreationDate="2011-05-22T16:39:50.393" UserId="1156" Text="I decided to use C#'s excellent reflection system. I based it off the general component system, plus a mixture of the answers here.&#xD;&#xA;&#xD;&#xA;Components are added very easily:&#xD;&#xA;&#xD;&#xA;    Entity e = new Entity(); //No templates/archetypes yet.&#xD;&#xA;    e.AddComponent(new HealthComponent(100));&#xD;&#xA;&#xD;&#xA;And can be queried either by name, type, or (if common ones like Health and Position) by properties:&#xD;&#xA;&#xD;&#xA;    e[&quot;Health&quot;] //This, unfortunately, is a bit slower since it requires a dict search&#xD;&#xA;    e.GetComponent&lt;HealthComponent&gt;()&#xD;&#xA;    e.Health&#xD;&#xA;&#xD;&#xA;And removed:&#xD;&#xA;&#xD;&#xA;    e.RemoveComponent&lt;HealthComponent&gt;();&#xD;&#xA;&#xD;&#xA;Data is, again, accessed commonly by properties:&#xD;&#xA;&#xD;&#xA;    e.MaxHP&#xD;&#xA;&#xD;&#xA;Which is stored component-side; less overhead if it doesn't have HP:&#xD;&#xA;&#xD;&#xA;    public int? MaxHP&#xD;&#xA;    {&#xD;&#xA;    get&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;        return this.Health.MaxHP; //Error handling returns null if health isn't here. Excluded for clarity&#xD;&#xA;    }&#xD;&#xA;    set&#xD;&#xA;    {&#xD;&#xA;    this.Health.MaxHP = value;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The large amount of typing is aided by Intellisense in VS, but for the most part there is little typing - the thing I was looking for.&#xD;&#xA;&#xD;&#xA;Behind the scenes, I am storing a `Dictionary&lt;Type, Component&gt;` and having `Components` override the `ToString` method for name checking. My original design used primarily strings for names and things, but it became a pig to work with (oh look, I have to cast everywhere as well the lack of easy to access properties)." />
  <row Id="27695" PostHistoryTypeId="25" PostId="12589" RevisionGUID="766168e6-c9a7-42a6-b997-df43ab74197a" CreationDate="2011-05-22T18:12:33.313" Comment="http://twitter.com/#!/StackGameDev/status/72364236667486208" />
  <row Id="27696" PostHistoryTypeId="2" PostId="12595" RevisionGUID="cd323c85-04ae-4f69-887e-fe8752898754" CreationDate="2011-05-22T18:26:43.833" UserId="7136" Text="I haven't worked with Lua in a while, but couldn't you let your components themselves change the entity interface through the Lua wrapper (last time I used Lua in a game was in 2005, the wrappers must have evolved since then)?&#xD;&#xA;&#xD;&#xA;By having it at the components level, you could have your position component register a &quot;SetPos&quot; function on the entity that calls the component directly and have a JointMotor component register an object in entity with a function &quot;SetEnabled&quot;, this way it's &quot;data driven&quot; and support both ent:SetPos(123, 456) and ent:JointMotor:SetEnabled()?&#xD;&#xA;&#xD;&#xA;As long as the registering of subobjects and functions validates that there is no name clash, you should be alright." />
  <row Id="27697" PostHistoryTypeId="2" PostId="12596" RevisionGUID="109e9679-3da0-434f-9a86-05cb626d5e91" CreationDate="2011-05-22T18:40:49.233" UserId="4662" Text="The fundamental problem here is that you've exposed the component system to the API. You need to encapsulate that stuff behind your interface." />
  <row Id="27698" PostHistoryTypeId="5" PostId="12584" RevisionGUID="e283ca3d-dd66-4dc2-b9f5-36db7dd68e7f" CreationDate="2011-05-22T19:28:22.163" UserId="7328" Comment="some gramatical corrections" Text="upgrading usualy doesn't consume space but building some new guns need more space so if I were to balance them i would put higher price for upgrades, and besides i think it's logical that upgrades take less time than new building, but that's for you to decide, so i think for an upgrade that duplicate a tower's power i would set 1.2 of the tower original price and 0.9 of it's building time. the same senario goes for rts games, except map size limit and it's usualy population limit that prevents you from building lots of things." />
  <row Id="27699" PostHistoryTypeId="5" PostId="12570" RevisionGUID="42ef52bc-b69d-45eb-abdf-fcc19c8c1b94" CreationDate="2011-05-22T19:48:21.463" UserId="7709" Comment="added 1422 characters in body; deleted 102 characters in body" Text="I am new to game physics, i am trying to adapt a simple 2d balls Simulation code for the 3d simulation with java3D library, but i have this problem:&#xD;&#xA;&#xD;&#xA;Two things i noted down the values generated by engine, for ***X/Y*** are too high and ***minX/minY/maxY/maxX*** values are causing troubles &#xD;&#xA;&#xD;&#xA;*some time the balls are drawing but not moving*&#xD;&#xA;&#xD;&#xA;*some time going out of the panel*&#xD;&#xA;&#xD;&#xA;*some time moving on little area*&#xD;&#xA;&#xD;&#xA;*some time just stick at one place...*&#xD;&#xA;&#xD;&#xA;and i m unable to select/define/set the default correct/suitable values considering the 3D graphics scaling/resolution while they are set with respect to 2d screen coordinates, that is my only problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;please help,&#xD;&#xA;&#xD;&#xA;this is code :&#xD;&#xA;&#xD;&#xA;    public class Ball extends GameObject {&#xD;&#xA;    	private float x, y; // Ball's center (x, y)&#xD;&#xA;    	private float speedX, speedY; // Ball's speed per step in x and y&#xD;&#xA;    	private float radius; // Ball's radius&#xD;&#xA;    	// Collision detected by collision detection and response algorithm?&#xD;&#xA;    	boolean collisionDetected = false;&#xD;&#xA;    	&#xD;&#xA;	    // If collision detected, the next state of the ball.&#xD;&#xA;	    // Otherwise, meaningless.&#xD;&#xA;	    private float nextX, nextY;&#xD;&#xA;	    private float nextSpeedX, nextSpeedY;&#xD;&#xA;	&#xD;&#xA;	    private static final float BOX_WIDTH = 640;&#xD;&#xA;	    private static final float BOX_HEIGHT = 480;&#xD;&#xA;&#xD;&#xA;	/**&#xD;&#xA;	 * Constructor The velocity is specified in polar coordinates of speed and&#xD;&#xA;	 * moveAngle (for user friendliness), in Graphics coordinates with an&#xD;&#xA;	 * inverted y-axis.&#xD;&#xA;	 */&#xD;&#xA;	public Ball(String name1,float x, float y, float radius, float speed,&#xD;&#xA;			float angleInDegree, Color color) {&#xD;&#xA;		this.x = x;&#xD;&#xA;		this.y = y;&#xD;&#xA;		// Convert velocity from polar to rectangular x and y.&#xD;&#xA;		this.speedX = speed * (float) Math.cos(Math.toRadians(angleInDegree));&#xD;&#xA;		this.speedY = speed * (float) Math.sin(Math.toRadians(angleInDegree));&#xD;&#xA;		this.radius = radius;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void move()  {&#xD;&#xA;		if (collisionDetected) {&#xD;&#xA;			// Collision detected, use the values computed.&#xD;&#xA;			x = nextX;&#xD;&#xA;			y = nextY;&#xD;&#xA;			speedX = nextSpeedX;&#xD;&#xA;			speedY = nextSpeedY;&#xD;&#xA;		} else {&#xD;&#xA;			// No collision, move one step and no change in speed.&#xD;&#xA;			x += speedX;&#xD;&#xA;			y += speedY;&#xD;&#xA;		}&#xD;&#xA;		collisionDetected = false; // Clear the flag for the next step&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void collideWith()  {&#xD;&#xA;		// Get the ball's bounds, offset by the radius of the ball&#xD;&#xA;		float minX = 0.0f + radius;&#xD;&#xA;		float minY = 0.0f + radius;&#xD;&#xA;		float maxX = 0.0f + BOX_WIDTH - 1.0f - radius;&#xD;&#xA;		float maxY = 0.0f + BOX_HEIGHT - 1.0f - radius;&#xD;&#xA;&#xD;&#xA;		double gravAmount = 0.9811111f;&#xD;&#xA;		double gravDir = (90 / 57.2960285258);&#xD;&#xA;&#xD;&#xA;		// Try moving one full step&#xD;&#xA;		nextX = x + speedX;&#xD;&#xA;		nextY = y + speedY;&#xD;&#xA;		System.out.println(&quot;In serializedBall in collision.&quot;);&#xD;&#xA;&#xD;&#xA;		// If collision detected. Reflect on the x or/and y axis&#xD;&#xA;		// and place the ball at the point of impact.&#xD;&#xA;		if (speedX != 0) {&#xD;&#xA;			if (nextX &gt; maxX) { // Check maximum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = maxX;&#xD;&#xA;				nextY = (maxX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			} else if (nextX &lt; minX) { // Check minimum-X bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = -speedX; // Reflect&#xD;&#xA;				nextSpeedY = speedY; // Same&#xD;&#xA;				nextX = minX;&#xD;&#xA;				nextY = (minX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		// In case the ball runs over both the borders.&#xD;&#xA;		if (speedY != 0) {&#xD;&#xA;			if (nextY &gt; maxY) { // Check maximum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = maxY;&#xD;&#xA;				nextX = (maxY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			} else if (nextY &lt; minY) { // Check minimum-Y bound&#xD;&#xA;				collisionDetected = true;&#xD;&#xA;				nextSpeedX = speedX; // Same&#xD;&#xA;				nextSpeedY = -speedY; // Reflect&#xD;&#xA;				nextY = minY;&#xD;&#xA;				nextX = (minY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		speedX += Math.cos(gravDir) * gravAmount;&#xD;&#xA;		speedY += Math.sin(gravDir) * gravAmount;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;        public float getSpeed()  {&#xD;&#xA;		return (float) Math.sqrt(speedX * speedX + speedY * speedY);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getMoveAngle()  {&#xD;&#xA;		return (float) Math.toDegrees(Math.atan2(speedY, speedX));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getRadius()  {&#xD;&#xA;		return radius;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public float getX() {&#xD;&#xA;		return x;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public float getY() {&#xD;&#xA;		return y;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void setX(float f) {&#xD;&#xA;		x =  f;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void setY(float f) {&#xD;&#xA;		y =  f;&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; here how i m drawing the balls:&#xD;&#xA;&#xD;&#xA;       public class 3DMovingBodies extends Applet implements Runnable {&#xD;&#xA;&#xD;&#xA;           private static final int BOX_WIDTH = 800;&#xD;&#xA;	private static final int BOX_HEIGHT = 600;&#xD;&#xA;	private int currentNumBalls = 1; // number currently active&#xD;&#xA;&#xD;&#xA;	private volatile boolean playing;&#xD;&#xA;	private long mFrameDelay;&#xD;&#xA;	private JFrame frame;&#xD;&#xA;&#xD;&#xA;	private int currentFrameRate;&#xD;&#xA;	private Ball[] ball = new Ball[currentNumBalls];&#xD;&#xA;	&#xD;&#xA;	private Random rand;&#xD;&#xA;	private Sphere[] sphere = new Sphere[currentNumBalls];&#xD;&#xA;	private Transform3D[] trans = new Transform3D[currentNumBalls];&#xD;&#xA;	private TransformGroup[] objTrans = new TransformGroup[currentNumBalls];&#xD;&#xA;&#xD;&#xA;	public 3DMovingBodies() {&#xD;&#xA;&#xD;&#xA;		rand = new Random();&#xD;&#xA;		float angleInDegree = rand.nextInt(360);&#xD;&#xA;&#xD;&#xA;		setLayout(new BorderLayout());&#xD;&#xA;		GraphicsConfiguration config = SimpleUniverse&#xD;&#xA;				.getPreferredConfiguration();&#xD;&#xA;		Canvas3D c = new Canvas3D(config);&#xD;&#xA;		add(&quot;Center&quot;, c);&#xD;&#xA;		&#xD;&#xA;		ball[0] = new Ball(0.5f, 0.0f, 0.5f, 0.4f, angleInDegree, Color.yellow);&#xD;&#xA;		// ball[1] = new Ball(1.0f, 0.0f, 0.25f, 0.8f, angleInDegree,&#xD;&#xA;		// Color.yellow);&#xD;&#xA;		// ball[2] = new Ball(0.0f, 1.0f, 0.15f, 0.11f, angleInDegree,&#xD;&#xA;		// Color.yellow);&#xD;&#xA;&#xD;&#xA;		trans[0] = new Transform3D();&#xD;&#xA;		// trans[1] = new Transform3D();&#xD;&#xA;		// trans[2] = new Transform3D();&#xD;&#xA;&#xD;&#xA;		sphere[0] = new Sphere(0.5f);&#xD;&#xA;		// sphere[1] = new Sphere(0.25f);&#xD;&#xA;		// sphere[2] = new Sphere(0.15f);&#xD;&#xA;		// Create a simple scene and attach it to the virtual universe&#xD;&#xA;		BranchGroup scene = createSceneGraph();&#xD;&#xA;&#xD;&#xA;		SimpleUniverse u = new SimpleUniverse(c);&#xD;&#xA;		u.getViewingPlatform().setNominalViewingTransform();&#xD;&#xA;&#xD;&#xA;		u.addBranchGraph(scene);&#xD;&#xA;&#xD;&#xA;		startSimulation();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public BranchGroup createSceneGraph() {&#xD;&#xA;		// Create the root of the branch graph&#xD;&#xA;		BranchGroup objRoot = new BranchGroup();&#xD;&#xA;&#xD;&#xA;		for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;&#xD;&#xA;			// Create a simple shape leaf node, add it to the scene graph.&#xD;&#xA;&#xD;&#xA;			objTrans[i] = new TransformGroup();&#xD;&#xA;			objTrans[i].setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&#xD;&#xA;			Transform3D pos1 = new Transform3D();&#xD;&#xA;			pos1.setTranslation(randomPos());&#xD;&#xA;			objTrans[i].setTransform(pos1);&#xD;&#xA;			objTrans[i].addChild(sphere[i]);&#xD;&#xA;&#xD;&#xA;			objRoot.addChild(objTrans[i]);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),&#xD;&#xA;				100.0);&#xD;&#xA;&#xD;&#xA;		Color3f light1Color = new Color3f(1.0f, 0.0f, 0.2f);&#xD;&#xA;		Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);&#xD;&#xA;		DirectionalLight light1 = new DirectionalLight(light1Color,&#xD;&#xA;				light1Direction);&#xD;&#xA;		light1.setInfluencingBounds(bounds);&#xD;&#xA;		objRoot.addChild(light1);&#xD;&#xA;&#xD;&#xA;		// Set up the ambient light&#xD;&#xA;		Color3f ambientColor = new Color3f(1.0f, 1.0f, 1.0f);&#xD;&#xA;		AmbientLight ambientLightNode = new AmbientLight(ambientColor);&#xD;&#xA;		ambientLightNode.setInfluencingBounds(bounds);&#xD;&#xA;		objRoot.addChild(ambientLightNode);&#xD;&#xA;&#xD;&#xA;		return objRoot;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void startSimulation() {&#xD;&#xA;		playing = true;&#xD;&#xA;		Thread t = new Thread(this);&#xD;&#xA;		t.start();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void stop() {&#xD;&#xA;		playing = false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void run() {&#xD;&#xA;&#xD;&#xA;		long previousTime = System.currentTimeMillis();&#xD;&#xA;		long currentTime = previousTime;&#xD;&#xA;		long elapsedTime;&#xD;&#xA;		long totalElapsedTime = 0;&#xD;&#xA;		int frameCount = 0;&#xD;&#xA;&#xD;&#xA;		while (true) {&#xD;&#xA;			currentTime = System.currentTimeMillis();&#xD;&#xA;			elapsedTime = (currentTime - previousTime); // elapsed time in&#xD;&#xA;			// seconds&#xD;&#xA;			totalElapsedTime += elapsedTime;&#xD;&#xA;			if (totalElapsedTime &gt; 1000) {&#xD;&#xA;				currentFrameRate = frameCount;&#xD;&#xA;				frameCount = 0;&#xD;&#xA;				totalElapsedTime = 0;&#xD;&#xA;			}&#xD;&#xA;			for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;				ball[i].move();&#xD;&#xA;				ball[i].collideWith();&#xD;&#xA;				drawworld();&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			try {&#xD;&#xA;				Thread.sleep(88);&#xD;&#xA;			} catch (Exception e) {&#xD;&#xA;				e.printStackTrace();&#xD;&#xA;			}&#xD;&#xA;			previousTime = currentTime;&#xD;&#xA;			frameCount++;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void drawworld() {&#xD;&#xA;&#xD;&#xA;		for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;			printTG(objTrans[i], &quot;SteerTG&quot;);&#xD;&#xA;			trans[i].setTranslation(new Vector3f(ball[i].getX(),&#xD;&#xA;					ball[i].getY(), 0.0f));&#xD;&#xA;			objTrans[i].setTransform(trans[i]);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	private Vector3f randomPos()&#xD;&#xA;	/*&#xD;&#xA;	 * Return a random position vector. The numbers are hardwired to be within&#xD;&#xA;	 * the confines of the box.&#xD;&#xA;	 */&#xD;&#xA;	{&#xD;&#xA;		Vector3f pos = new Vector3f();&#xD;&#xA;		pos.x = rand.nextFloat() * 5.0f - 2.5f; // -2.5 to 2.5&#xD;&#xA;		pos.y = rand.nextFloat() * 2.0f + 0.5f; // 0.5 to 2.5&#xD;&#xA;		pos.z = rand.nextFloat() * 5.0f - 2.5f; // -2.5 to 2.5&#xD;&#xA;		return pos;&#xD;&#xA;	} // end of randomPos()&#xD;&#xA;&#xD;&#xA;	public static void main(String[] args) {&#xD;&#xA;		System.out.println(&quot;Program Started&quot;);&#xD;&#xA;		3DMovingBodiesbb = new 3DMovingBodies();&#xD;&#xA;		bb.addKeyListener(bb);&#xD;&#xA;		MainFrame mf = new MainFrame(bb, 600, 400);&#xD;&#xA;	}&#xD;&#xA;}" />
  <row Id="27700" PostHistoryTypeId="6" PostId="12570" RevisionGUID="2f682046-eace-42d9-b579-28c199321765" CreationDate="2011-05-22T20:14:07.613" UserId="7709" Comment="edited tags" Text="&lt;3d&gt;&lt;java&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;physics-engine&gt;" />
  <row Id="27701" PostHistoryTypeId="2" PostId="12597" RevisionGUID="8e07355e-eb66-46c2-925e-873e4a13c9a6" CreationDate="2011-05-22T20:20:06.860" UserId="7496" Text="in most cases using small parts are worth it because it gives your code reusability and flexibility; and in case of a corridor or something similar that does not include MANY (many would mean a number like at least 40) smaller parts, the performance gain of using a big and solid models is negligible(except if you are drawing the object many times per frame).&#xD;&#xA;&#xD;&#xA;if you care about the performance i recommend precomputing the lighting or using some kind of vertex arrays(vertex buffers?) which would actually make a difference. ( if those things are possible in XNA - i dont know a lot about XNA )&#xD;&#xA;&#xD;&#xA;p.s. : the first paragraph of this post is correct only about drawing ( not about for example using separate physics models for parts of the corridor )" />
  <row Id="27702" PostHistoryTypeId="2" PostId="12598" RevisionGUID="e8b9dadb-2663-4e5a-9ec3-96679c8d0eb5" CreationDate="2011-05-22T21:00:09.070" UserId="2921" Text="When I am working with cocos2d I can add CCSprites to the layer or 'stage' and manipulate them.&#xD;&#xA;&#xD;&#xA;Now, to do my ongoing calculations for movement AI and such, things that will always run, should I:&#xD;&#xA;&#xD;&#xA;subclass CCSprites and add methods to manipulate themselves and run schedules?&#xD;&#xA;&#xD;&#xA;-OR-&#xD;&#xA;&#xD;&#xA;create a controller class that 'owns' all of the CCSprites and manipulate them from the 'outside'? I am not really sure what would be accessible from the outside though.&#xD;&#xA;&#xD;&#xA;My guess is that I should probably subclass the CCSprite object, I could have a different object that inherits from CCSprite for each type of sprite needed.&#xD;&#xA;&#xD;&#xA;Player, Enemy, PowerUp, Bullet, etc...&#xD;&#xA;&#xD;&#xA;Or what do you think?" />
  <row Id="27703" PostHistoryTypeId="1" PostId="12598" RevisionGUID="e8b9dadb-2663-4e5a-9ec3-96679c8d0eb5" CreationDate="2011-05-22T21:00:09.070" UserId="2921" Text="Should I be subclassing CCSprites?" />
  <row Id="27704" PostHistoryTypeId="3" PostId="12598" RevisionGUID="e8b9dadb-2663-4e5a-9ec3-96679c8d0eb5" CreationDate="2011-05-22T21:00:09.070" UserId="2921" Text="&lt;sprites&gt;&lt;cocos2d&gt;&lt;ccsprite&gt;" />
  <row Id="27705" PostHistoryTypeId="25" PostId="12577" RevisionGUID="77aafa9c-d93f-485c-a27b-7fb6fdce3cc5" CreationDate="2011-05-22T21:12:34.737" Comment="http://twitter.com/#!/StackGameDev/status/72409541274378240" />
  <row Id="27706" PostHistoryTypeId="2" PostId="12599" RevisionGUID="13548f27-4d11-45da-af32-0a412c12b30c" CreationDate="2011-05-22T22:04:00.463" UserId="1430" Text="It's often better to prefer composition to inheritance.&#xD;&#xA;&#xD;&#xA;In this specific case, I would strongly advise against using inheritance to arrive at a solution. What you are trying to do is take a sprite, which is naturally a rendering entity, and inject into it some methods and data for handling responsibilities outside its domain -- namely what sounds like AI and pathfinding. This is violating the [single responsibility principle][1].&#xD;&#xA;&#xD;&#xA;A far superior solution would be to have some kind of object (for things dealing with AI and scheduling, such objects are often called &quot;actors&quot;) that *contains* a pointer or reference to a sprite and manipulates that sprite as-needed based on its own logic. This sounds more similar to your second, &quot;controller&quot; type approach.&#xD;&#xA;&#xD;&#xA;However I would also advise, along the same lines, against creating a subclass of this controller type for each classification of actor (player, enemy, bullet). The behavior of those different types of controllers tend to differ in data, not in code, so there's little reason to create a complex inheritance hierarchy where no hierarchy is required at all. The differences between a player and a bullet are probably all things that can be altered by altering properties of the controller or sprite -- the image used, its bounded, and perhaps the name of the script that controls motion behavior. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Single_responsibility_principle" />
  <row Id="27707" PostHistoryTypeId="2" PostId="12600" RevisionGUID="b691cdbe-51c9-4eda-821f-7df2b03a1550" CreationDate="2011-05-22T22:37:36.610" UserId="6587" Text="I want to develop a game in unity, but I come from a programming background. I'll have a problem getting 3d assets (I've read through some of the questions discussing that subject and suggesting using temporary assets).   &#xD;&#xA;What I'm looking for is a book or a guide that will direct me to 3d modelling/animation for gaming, most tutorials will go for lengths about things I don't really need for games and I want to get to the chops of making the game, like many developers have said-the best way to get experience is finish a game!   &#xD;&#xA;So what good books/tutorials are there on modelling for games?" />
  <row Id="27708" PostHistoryTypeId="1" PostId="12600" RevisionGUID="b691cdbe-51c9-4eda-821f-7df2b03a1550" CreationDate="2011-05-22T22:37:36.610" UserId="6587" Text="Getting started at 3D for games" />
  <row Id="27709" PostHistoryTypeId="3" PostId="12600" RevisionGUID="b691cdbe-51c9-4eda-821f-7df2b03a1550" CreationDate="2011-05-22T22:37:36.610" UserId="6587" Text="&lt;3d&gt;&lt;unity&gt;&lt;animation&gt;&lt;models&gt;" />
  <row Id="27710" PostHistoryTypeId="2" PostId="12601" RevisionGUID="5cac9a1c-b225-467e-8eeb-6f6256c37e78" CreationDate="2011-05-22T22:53:43.793" UserId="7523" Text="I use Visual Studio with DiretX XNA math library.&#xD;&#xA;Now, I use GNU compiler collection. Advise me a SIMD math library with a good documentation." />
  <row Id="27711" PostHistoryTypeId="1" PostId="12601" RevisionGUID="5cac9a1c-b225-467e-8eeb-6f6256c37e78" CreationDate="2011-05-22T22:53:43.793" UserId="7523" Text="SIMD C++ library" />
  <row Id="27712" PostHistoryTypeId="3" PostId="12601" RevisionGUID="5cac9a1c-b225-467e-8eeb-6f6256c37e78" CreationDate="2011-05-22T22:53:43.793" UserId="7523" Text="&lt;c++&gt;&lt;library&gt;" />
  <row Id="27713" PostHistoryTypeId="2" PostId="12602" RevisionGUID="05f93dec-ba28-4183-86c2-c61a000027fd" CreationDate="2011-05-22T23:15:30.750" UserId="7328" Text="by a little seraching i think you can use bullet's math library, bullet itself is an opensource physics engine and it seems to have a powerfull math library beside it. here is a shortcut to download link http://sourceforge.net/projects/bullet/files/SIMD%20and%20amp_%20Vector%20Math%20library/simd%20math%201.02%20and%20vector%20math%201.01/simdvectormath.tgz/download" />
  <row Id="27714" PostHistoryTypeId="2" PostId="12603" RevisionGUID="b433d8d7-2da4-47cd-a077-403fea2d0158" CreationDate="2011-05-22T23:25:42.293" UserId="3128" Text="I can wrap my head around using a 2d perlin noise function to generate the height value but I don't understand why a 3d perlin noise function would be used. In Notch's blog, http://notch.tumblr.com/post/3746989361/terrain-generation-part-1, he mentioned using a 3d perlin noise function for the terrain generation on Minecraft. Does anyone know how that would be done and why it would be useful? If you are passing x,y, and z values doesn't that imply you already have the height?" />
  <row Id="27715" PostHistoryTypeId="1" PostId="12603" RevisionGUID="b433d8d7-2da4-47cd-a077-403fea2d0158" CreationDate="2011-05-22T23:25:42.293" UserId="3128" Text="How is a 3d perlin noise function used to generate terrain?" />
  <row Id="27716" PostHistoryTypeId="3" PostId="12603" RevisionGUID="b433d8d7-2da4-47cd-a077-403fea2d0158" CreationDate="2011-05-22T23:25:42.293" UserId="3128" Text="&lt;procedural-generation&gt;&lt;terrain&gt;&lt;minecraft&gt;" />
  <row Id="27717" PostHistoryTypeId="2" PostId="12604" RevisionGUID="2b7eb321-497a-496c-b1f0-75d8a470b7d2" CreationDate="2011-05-22T23:46:07.170" UserId="51" Text="My guess, in that particular example, is that he used the z value to determine what type of material: bedrock, stone, dirt, or air." />
  <row Id="27718" PostHistoryTypeId="2" PostId="12605" RevisionGUID="e4c74495-bd30-43a4-a1df-29f4ea2fcc02" CreationDate="2011-05-22T23:49:28.703" UserId="263" Text="AMD has the open source [SSEPlus][1] project, although I have never used it so I can't comment on its quality or applicability.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.amd.com/cpu/Libraries/sseplus/Pages/default.aspx" />
  <row Id="27719" PostHistoryTypeId="25" PostId="12598" RevisionGUID="705ff652-c50e-4e81-8b56-fe86440cce2a" CreationDate="2011-05-23T00:12:35.823" Comment="http://twitter.com/#!/StackGameDev/status/72454844320985089" />
  <row Id="27720" PostHistoryTypeId="2" PostId="12606" RevisionGUID="0bf683f0-ddeb-46d5-9cc5-01345493f99f" CreationDate="2011-05-23T00:31:29.603" UserId="6813" Text="You can also do it &quot;yourself&quot; using the **SSE (Streaming SIMD Extensions) instructions** and the **intrinsics** ( *mmintrin.h files ) of your compiler/proc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Tutorials**&#xD;&#xA;&#xD;&#xA;Here is an example of how to use SSE instructions with assembly:&lt;br&gt;&#xD;&#xA;http://neilkemp.us/src/sse_tutorial/sse_tutorial.html&#xD;&#xA;&#xD;&#xA;And here is a tutorial on how to use SSE instructions with intrinsics:&lt;br&gt;&#xD;&#xA;http://www.codeproject.com/KB/recipes/sseintro.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Useful informations**&#xD;&#xA;&#xD;&#xA;Intel C++ Intrinsics reference (useful to get the list of instructions):&lt;br&gt;&#xD;&#xA;http://cache-www.intel.com/cd/00/00/34/76/347603_347603.pdf&#xD;&#xA;&#xD;&#xA;Intrinsic support for the enhanced instruction sets supported by Intel and AMD processors (useful to all kinds of informations relative to SSE and SIMD):&lt;br&gt;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/y0dh78ez%28v=vs.71%29.aspx" />
  <row Id="27721" PostHistoryTypeId="5" PostId="12606" RevisionGUID="d32ed47a-535e-4d2e-bcf0-3655b617d2b7" CreationDate="2011-05-23T00:41:36.580" UserId="6813" Comment="added 214 characters in body; added 11 characters in body; added 106 characters in body" Text="You can also do it &quot;yourself&quot; using the **SSE (Streaming SIMD Extensions) instructions** and the **intrinsics** ( *mmintrin.h files ) of your compiler/proc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Tutorials**&#xD;&#xA;&#xD;&#xA;Here is an example of how to use SSE instructions with assembly:&lt;br&gt;&#xD;&#xA;http://neilkemp.us/src/sse_tutorial/sse_tutorial.html&#xD;&#xA;&#xD;&#xA;And here is a tutorial on how to use SSE instructions with intrinsics:&lt;br&gt;&#xD;&#xA;http://www.codeproject.com/KB/recipes/sseintro.aspx&#xD;&#xA;&#xD;&#xA;A practical guide to using SSE SIMD with C++:&lt;br&gt;&#xD;&#xA;http://sci.tuomastonteri.fi/programming/sse/printable&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Useful informations**&#xD;&#xA;&#xD;&#xA;Intel C++ Intrinsics reference (useful to get the list of instructions):&lt;br&gt;&#xD;&#xA;http://cache-www.intel.com/cd/00/00/34/76/347603_347603.pdf&#xD;&#xA;&#xD;&#xA;SSE &amp; SSE2 Intrinsic support for the enhanced instruction sets supported by Intel and AMD processors (useful to all kinds of informations relative to SSE and SIMD):&lt;br&gt;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/y0dh78ez%28v=vs.71%29.aspx&#xD;&#xA;&#xD;&#xA;Overall instructions list and informations about SSE, SSE2, SSE3, SSSE3, SSE4, 3DNow etc (different versions of SSE for different proc architecture):&lt;br&gt;&#xD;&#xA;http://softpixel.com/~cwright/programming/simd/sse.php " />
  <row Id="27722" PostHistoryTypeId="5" PostId="12606" RevisionGUID="eebf0a3e-d54c-4ba1-856f-3690700d3fc4" CreationDate="2011-05-23T01:28:52.227" UserId="6813" Comment="added 200 characters in body; added 122 characters in body; deleted 26 characters in body" Text="You can also do it &quot;yourself&quot; using the **SSE (Streaming SIMD Extensions) instructions** and the **intrinsics** ( *mmintrin.h files ) of your compiler/proc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Tutorials**&#xD;&#xA;&#xD;&#xA;Here is an example of how to use SSE instructions with assembly:&lt;br&gt;&#xD;&#xA;http://neilkemp.us/src/sse_tutorial/sse_tutorial.html&#xD;&#xA;&#xD;&#xA;And here is a tutorial on how to use SSE instructions with intrinsics:&lt;br&gt;&#xD;&#xA;http://www.codeproject.com/KB/recipes/sseintro.aspx&#xD;&#xA;&#xD;&#xA;A practical guide to using SSE SIMD with C++:&lt;br&gt;&#xD;&#xA;http://sci.tuomastonteri.fi/programming/sse/printable&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Useful informations**&#xD;&#xA;&#xD;&#xA;Intel C++ Intrinsics reference (useful to get the list of instructions):&lt;br&gt;&#xD;&#xA;http://cache-www.intel.com/cd/00/00/34/76/347603_347603.pdf&#xD;&#xA;&#xD;&#xA;SSE &amp; SSE2 Intrinsic support for the enhanced instruction sets supported by Intel and AMD processors (useful to all kinds of informations relative to SSE and SIMD):&lt;br&gt;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/y0dh78ez%28v=vs.71%29.aspx&#xD;&#xA;&#xD;&#xA;Overall instructions list and informations about SSE, SSE2, SSE3, SSSE3, SSE4, 3DNow etc (different versions of SSE for different proc architecture):&lt;br&gt;&#xD;&#xA;http://softpixel.com/~cwright/programming/simd/sse.php&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;If you prefer a math framework I eared about Eigen: &lt;br&gt;&#xD;&#xA;http://eigen.tuxfamily.org/&#xD;&#xA;&#xD;&#xA;And finally if you need more answers about C++ SIMD Frameworks, here is a StackOverflow link. (C++ SSE SIMD framework) :&lt;br&gt;&#xD;&#xA;http://stackoverflow.com/questions/4953121/c-sse-simd-framework&#xD;&#xA; " />
  <row Id="27723" PostHistoryTypeId="5" PostId="12601" RevisionGUID="de3cbf0f-fe8d-41e3-a742-33e4d0dc7e65" CreationDate="2011-05-23T01:31:56.657" UserId="1430" Comment="added 19 characters in body; edited tags" Text="I've use Visual Studio with the DirectX XNA math library. Now, I use the GNU compiler collection. Can anyone advise a SIMD math library with a good documentation?" />
  <row Id="27724" PostHistoryTypeId="6" PostId="12601" RevisionGUID="de3cbf0f-fe8d-41e3-a742-33e4d0dc7e65" CreationDate="2011-05-23T01:31:56.657" UserId="1430" Comment="added 19 characters in body; edited tags" Text="&lt;c++&gt;&lt;math&gt;&lt;library&gt;&lt;simd&gt;" />
  <row Id="27725" PostHistoryTypeId="5" PostId="12600" RevisionGUID="5460a3ed-82dc-4f7e-9044-6cebe3fe2334" CreationDate="2011-05-23T01:33:01.180" UserId="1430" Comment="added 7 characters in body" Text="I want to develop a game in Unity, but I come from a programming background. I'll have a problem getting 3D assets (I've read through some of the questions discussing that subject and suggesting using temporary assets).  &#xD;&#xA; &#xD;&#xA;What I'm looking for is a book or a guide that will direct me to 3D modelling/animation for gaming, most tutorials will go for lengths about things I don't really need for games and I want to get to the chops of making the game -- like many developers have said: the best way to get experience is finish a game!  &#xD;&#xA; &#xD;&#xA;So what good books/tutorials are there on modelling for games?" />
  <row Id="27726" PostHistoryTypeId="5" PostId="12606" RevisionGUID="c471c4b9-c90a-49af-b12d-498cbfb15068" CreationDate="2011-05-23T01:34:02.680" UserId="6813" Comment="added 66 characters in body; added 8 characters in body" Text="You can also do it &quot;yourself&quot; using the **SSE (Streaming SIMD Extensions) instructions** and the **intrinsics** ( *mmintrin.h files ) of your compiler/proc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Tutorials**&#xD;&#xA;&#xD;&#xA;Here is an example of how to use SSE instructions with assembly:&lt;br&gt;&#xD;&#xA;http://neilkemp.us/src/sse_tutorial/sse_tutorial.html&#xD;&#xA;&#xD;&#xA;And here is a tutorial on how to use SSE instructions with intrinsics:&lt;br&gt;&#xD;&#xA;http://www.codeproject.com/KB/recipes/sseintro.aspx&#xD;&#xA;&#xD;&#xA;A practical guide to using SSE SIMD with C++:&lt;br&gt;&#xD;&#xA;http://sci.tuomastonteri.fi/programming/sse/printable&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Useful informations**&#xD;&#xA;&#xD;&#xA;Intel C++ Intrinsics reference (useful to get the list of instructions):&lt;br&gt;&#xD;&#xA;http://cache-www.intel.com/cd/00/00/34/76/347603_347603.pdf&#xD;&#xA;&#xD;&#xA;SSE &amp; SSE2 Intrinsic support for the enhanced instruction sets supported by Intel and AMD processors (useful to all kinds of informations relative to SSE and SIMD):&lt;br&gt;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/y0dh78ez%28v=vs.71%29.aspx&#xD;&#xA;&#xD;&#xA;Overall instructions list and informations about SSE, SSE2, SSE3, SSSE3, SSE4, 3DNow etc (different versions of SSE for different proc architecture):&lt;br&gt;&#xD;&#xA;http://softpixel.com/~cwright/programming/simd/sse.php&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;If you prefer a **math framework** I eared about Eigen: &lt;br&gt;&#xD;&#xA;http://eigen.tuxfamily.org/&lt;br&gt;&#xD;&#xA;http://eigen.tuxfamily.org/index.php?title=FAQ#Vectorization&#xD;&#xA;&#xD;&#xA;And finally if you need more answers about C++ SIMD Frameworks, here is a **StackOverflow link**. (C++ SSE SIMD framework) :&lt;br&gt;&#xD;&#xA;http://stackoverflow.com/questions/4953121/c-sse-simd-framework&#xD;&#xA; " />
  <row Id="27727" PostHistoryTypeId="2" PostId="12607" RevisionGUID="070c81d4-1355-4be5-9202-f1ceac60bf0d" CreationDate="2011-05-23T01:36:02.293" UserId="1430" Text="[Blender][1]'s site has a lot of [decent documentation and tutorials][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org&#xD;&#xA;  [2]: http://www.blender.org/education-help/" />
  <row Id="27728" PostHistoryTypeId="5" PostId="12606" RevisionGUID="62653b22-067e-4327-92b0-8585e2d07fa3" CreationDate="2011-05-23T01:39:20.960" UserId="6813" Comment="added 10 characters in body; added 21 characters in body" Text="You can also do it &quot;yourself&quot; using the **SSE (Streaming SIMD Extensions) instructions** and the **intrinsics** ( *mmintrin.h files ) of your compiler/proc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Tutorials**&#xD;&#xA;&#xD;&#xA;Here is an example of how to use SSE instructions with assembly:&lt;br&gt;&#xD;&#xA;http://neilkemp.us/src/sse_tutorial/sse_tutorial.html&#xD;&#xA;&#xD;&#xA;And here is a tutorial on how to use SSE instructions with intrinsics:&lt;br&gt;&#xD;&#xA;http://www.codeproject.com/KB/recipes/sseintro.aspx&#xD;&#xA;&#xD;&#xA;A practical guide to using SSE SIMD with C++:&lt;br&gt;&#xD;&#xA;http://sci.tuomastonteri.fi/programming/sse/printable&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Useful informations**&#xD;&#xA;&#xD;&#xA;Intel C++ Intrinsics reference (useful to get the list of instructions):&lt;br&gt;&#xD;&#xA;http://cache-www.intel.com/cd/00/00/34/76/347603_347603.pdf&#xD;&#xA;&#xD;&#xA;SSE &amp; SSE2 Intrinsic support for the enhanced instruction sets supported by Intel and AMD processors (useful to all kinds of informations relative to SSE and SIMD):&lt;br&gt;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/y0dh78ez%28v=vs.71%29.aspx&#xD;&#xA;&#xD;&#xA;Overall instructions list and informations about SSE, SSE2, SSE3, SSSE3, SSE4, 3DNow etc (different versions of SSE for different proc architecture):&lt;br&gt;&#xD;&#xA;http://softpixel.com/~cwright/programming/simd/sse.php&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;If you prefer a **linear algebra framework** I eared about Eigen: &lt;br&gt;&#xD;&#xA;http://eigen.tuxfamily.org/&lt;br&gt;&#xD;&#xA;http://eigen.tuxfamily.org/index.php?title=FAQ#Vectorization (about SIMD support)&#xD;&#xA;&#xD;&#xA;And finally if you need more answers about C++ SIMD Frameworks, here is a **StackOverflow link**. (C++ SSE SIMD framework) :&lt;br&gt;&#xD;&#xA;http://stackoverflow.com/questions/4953121/c-sse-simd-framework&#xD;&#xA; " />
  <row Id="27729" PostHistoryTypeId="5" PostId="12600" RevisionGUID="de5c1385-2c65-479e-91d6-3184e7b3e8f6" CreationDate="2011-05-23T01:44:01.060" UserId="51" Comment="remove unnecessary backstory" Text="I'm looking for  book or a guide that will direct me to 3D modelling/animation for gaming.  Most tutorials will go for lengths about things I don't really need for games and I want to get to the chops of making assets for my games -- like many developers have said: the best way to get experience is finish a game!  &#xD;&#xA; &#xD;&#xA;So what good books/tutorials are there on modelling for games?" />
  <row Id="27730" PostHistoryTypeId="4" PostId="12600" RevisionGUID="de5c1385-2c65-479e-91d6-3184e7b3e8f6" CreationDate="2011-05-23T01:44:01.060" UserId="51" Comment="remove unnecessary backstory" Text="Getting started at 3D modelling and animation" />
  <row Id="27731" PostHistoryTypeId="6" PostId="12600" RevisionGUID="de5c1385-2c65-479e-91d6-3184e7b3e8f6" CreationDate="2011-05-23T01:44:01.060" UserId="51" Comment="remove unnecessary backstory" Text="&lt;3d&gt;&lt;animation&gt;&lt;models&gt;" />
  <row Id="27732" PostHistoryTypeId="16" PostId="12600" RevisionGUID="62d97498-c86b-4bc2-97ad-b41baf856aa3" CreationDate="2011-05-23T01:44:09.483" UserId="51" />
  <row Id="27733" PostHistoryTypeId="16" PostId="12607" RevisionGUID="305f12a7-ee1b-4014-81ef-967adf71d938" CreationDate="2011-05-23T01:44:09.483" UserId="51" />
  <row Id="27734" PostHistoryTypeId="2" PostId="12608" RevisionGUID="18e600bb-25bb-4de9-b271-eb22fdfeb2cb" CreationDate="2011-05-23T01:50:52.943" UserId="6588" Text="Here's one I have personally read and recommend:&#xD;&#xA;http://www.amazon.com/Game-Artists-Guide-Maya/dp/0782143768/ref=sr_1_6?ie=UTF8&amp;qid=1306115253&amp;sr=8-6&#xD;&#xA;&#xD;&#xA;Note however that this book is about Maya and is specific to character art. If you want to learn on a different 3D tool and are more interested in environment art, well then you need to specify that.&#xD;&#xA;&#xD;&#xA;(There are also a few other books about game art by that same author listed on that page. I haven't personally read any of the others, but having the same author is a good sign.)" />
  <row Id="27735" PostHistoryTypeId="16" PostId="12608" RevisionGUID="de031c08-2a11-426d-bdaa-d5db5c66911f" CreationDate="2011-05-23T01:50:52.943" UserId="6588" />
  <row Id="27736" PostHistoryTypeId="2" PostId="12609" RevisionGUID="7c7fce40-b465-431a-8b8a-1d15d1deb78f" CreationDate="2011-05-23T02:04:24.300" UserId="6813" Text="I totally agree with the *Josh Petrie's* recommendation of using Blender tutorials. Blender is a great free tool and those tutorials can't be useless.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;But as you asked for 3D modeling/animation for *gaming*, I recommend you to search for **low polygon** 3D or modeling informations, which is the type of 3D modeling often used in video games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is an interesting website, where you can see a professional at work in videos (with explanations) and read some interesting text tutorials about 3D modeling for video games(partially):&lt;br&gt;&#xD;&#xA;http://poopinmymouth.com/tutorial/tutorial.htm&#xD;&#xA;&#xD;&#xA;And, If you are really a beginner, I recommend its very old but still interesting tutorial *Character Modeling for Game Design*:&lt;br&gt;&#xD;&#xA;http://poopinmymouth.com/process/character_tutorial/character_process.htm&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27737" PostHistoryTypeId="16" PostId="12609" RevisionGUID="b9231813-a05d-41b9-bcab-4ef2e7909d61" CreationDate="2011-05-23T02:04:24.300" UserId="6813" />
  <row Id="27738" PostHistoryTypeId="5" PostId="12609" RevisionGUID="dc8d5d9e-3ddb-46e1-b5e9-400500afc024" CreationDate="2011-05-23T02:09:59.607" UserId="6813" Comment="added 62 characters in body" Text="I totally agree with the *Josh Petrie's* recommendation of using Blender tutorials. Blender is a great free tool and those tutorials can't be useless even if they do not focus on modeling and animation for games.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;But as you asked for 3D modeling/animation for *games*, I recommend you to search for **low polygon** 3D or modeling informations, which is the type of 3D modeling often used in video games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is an interesting website, where you can see a professional at work in videos (with explanations) and read some interesting text tutorials about 3D modeling for video games (partially):&lt;br&gt;&#xD;&#xA;http://poopinmymouth.com/tutorial/tutorial.htm&#xD;&#xA;&#xD;&#xA;And, If you are really a beginner, I recommend its very old but still interesting tutorial *Character Modeling for Game Design*:&lt;br&gt;&#xD;&#xA;http://poopinmymouth.com/process/character_tutorial/character_process.htm&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27739" PostHistoryTypeId="2" PostId="12610" RevisionGUID="68193eab-88c7-4f8f-843a-d18f7733e9e7" CreationDate="2011-05-23T02:39:34.667" UserId="7525" Text="I'm currently building a small 2D game in Processing (and it has to be Processing) for a school project. The basic makeup of the game is 4 different cells: An avatar, controlled by the player, a number of cowardly cells fleeing from all other cells, huntercells hunting and attempting to eat everything, and passive disruptorcells which will burst apart other cells in differnt ways depending on what they hit. Also, whether one cell is bigger than another affects the outcome of collisions. All these different cells are child classes of the cell superclass, all stored in a cells ArrayList, which is handled inside a World class, which is updated/displayed in the main Draw loop.&#xD;&#xA;&#xD;&#xA;My main problem right now is how I should handle the outcome of all these different collisions, without too much code-duplication: My idea is to do it through a double for-loop, which would then again need 16 different if-like methods to figure out who's colliding with who, and what to do about it.&#xD;&#xA;&#xD;&#xA;E.g. if a predator cell collides with prey cell, the latter will be eaten and the predator will grow a certain amount in size and speed. The outcome should be the same (predator grows, prey dies) if the tested subjects are found in reverse order through the for-loops.&#xD;&#xA;&#xD;&#xA;Any thoughts/suggestions on best practices and how to do this most efficiently are much appreciated." />
  <row Id="27740" PostHistoryTypeId="1" PostId="12610" RevisionGUID="68193eab-88c7-4f8f-843a-d18f7733e9e7" CreationDate="2011-05-23T02:39:34.667" UserId="7525" Text="Testing for 2D collision outcome" />
  <row Id="27741" PostHistoryTypeId="3" PostId="12610" RevisionGUID="68193eab-88c7-4f8f-843a-d18f7733e9e7" CreationDate="2011-05-23T02:39:34.667" UserId="7525" Text="&lt;collision-detection&gt;" />
  <row Id="27742" PostHistoryTypeId="2" PostId="12611" RevisionGUID="454541d1-ea9b-40c0-89c1-10405830ca7f" CreationDate="2011-05-23T02:55:17.950" UserId="6813" Text="To test for the collision in 2D, I would recommend something like this :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    struct AABB&#xD;&#xA;    {&#xD;&#xA;        int x;&#xD;&#xA;        int width;&#xD;&#xA;        int y;&#xD;&#xA;        int height;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( AABB box1, AABB box2 )&#xD;&#xA;    {&#xD;&#xA;        if( box1.x + box1.width &lt; box2.x || box1.x &gt; box2.x + box2.width ) return false;&#xD;&#xA;        if( box1.y + box1.height &lt; box2.y || box1.y &gt; box2.y + box2.eight ) return false;&#xD;&#xA;    &#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Thus you can test the collision with small or big entities, and they can evolve in size and position.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And to avoid testing all entities over all others entities, I would split the &quot;game area&quot; in some smaller areas. Thus when you move the entities, you record in which &quot;small&quot; area of your game area they currently are (by adding a zone ID to the entity), and next you can test only the entities which are registered to be in the same &quot;small&quot; area (you need to test multiple area when an entity is at the edge of 2+ small areas)." />
  <row Id="27743" PostHistoryTypeId="25" PostId="12610" RevisionGUID="c52d4e5f-8d80-49fb-8608-ebb73d303ed3" CreationDate="2011-05-23T03:12:36.410" Comment="http://twitter.com/#!/StackGameDev/status/72500145031360513" />
  <row Id="27744" PostHistoryTypeId="2" PostId="12612" RevisionGUID="6bf85530-7fd9-4925-8303-dcb742e1167f" CreationDate="2011-05-23T03:20:49.047" UserId="7526" Text="http://www.catalinzima.com/samples/12-months-12-samples-2008/lightning-sample/&#xD;&#xA;&#xD;&#xA;and for XNA 4.0:&#xD;&#xA;http://www.hatchingdisaster.com/LightningSampleXNA4.zip&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27745" PostHistoryTypeId="5" PostId="12611" RevisionGUID="3d56b593-84fc-48a8-b442-99a3962ca37c" CreationDate="2011-05-23T03:23:27.460" UserId="6813" Comment="added 836 characters in body; added 5 characters in body; added 9 characters in body" Text="To test for the collision in 2D, I would recommend something like this :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    struct AABB { int x, y, width, height; }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( AABB box1, AABB box2 )&#xD;&#xA;    {&#xD;&#xA;        if( box1.x + box1.width &lt; box2.x || box1.x &gt; box2.x + box2.width ) return false;&#xD;&#xA;        if( box1.y + box1.height &lt; box2.y || box1.y &gt; box2.y + box2.eight ) return false;&#xD;&#xA;    &#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Thus you can test the collision with small or big entities, and they can evolve in size and position.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also use a circle test collision using a circle center and a radius if circles are most adapted to the context of your game.&#xD;&#xA;&#xD;&#xA;    struct Circle { int x, y, radius; }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( Circle cir1, Circle cir2 )&#xD;&#xA;    {&#xD;&#xA;        // Calculate the vector from cir1 center to cir2 center&#xD;&#xA;        // then calculate the (non root-squared) distance using cross product to compare with radius&#xD;&#xA;        int distX = cir2.x - cir1.x;&#xD;&#xA;        int distY = cir2.y - cir1.y;&#xD;&#xA;        int distanceCenters = distX * distX  + distY * distY;&#xD;&#xA;        &#xD;&#xA;        int radiusSum = cir1.radius + cir2.radius;&#xD;&#xA;        return (distanceCenters &lt; radiusSum*radiusSum );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The distance is not square-rooted as it should, square-root operations are often expensive compared to products. Thus we don't use square-root on distanceCenters, but we use product with itself for radiusSum)&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, **to avoid testing all entities over all others entities**, I would split the &quot;game area&quot; in some smaller areas. Thus when you move the entities, you record in which &quot;small&quot; area of your game area they currently are (by adding a zone ID to the entity), and next you can test only the entities which are registered to be in the same &quot;small&quot; area (you need to test multiple area when an entity is at the edge of 2+ small areas)." />
  <row Id="27746" PostHistoryTypeId="6" PostId="12610" RevisionGUID="97208b80-9ac6-461d-8c7c-cd918b691dba" CreationDate="2011-05-23T03:25:57.977" UserId="6813" Comment="edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="27747" PostHistoryTypeId="5" PostId="12610" RevisionGUID="d86d29fd-342b-4269-879c-a50c73e40972" CreationDate="2011-05-23T03:27:20.520" UserId="7525" Comment="added 148 characters in body; edited tags" Text="I'm currently building a small 2D game in Processing (and it has to be Processing) for a school project. The basic makeup of the game is 4 different cells (objects, all are circles): An avatar, controlled by the player, a number of cowardly cells fleeing from all other cells, huntercells hunting and attempting to eat everything, and passive disruptorcells which will burst apart other cells in differnt ways depending on what they hit. Also, whether one cell is bigger than another affects the outcome of collisions. All these different cells are child classes of the cell superclass, all stored in a cells ArrayList, which is handled inside a World class, which is updated/displayed in the main Draw loop.&#xD;&#xA;&#xD;&#xA;My main problem right now is how I should handle the outcome of all these different collisions, without too much code-duplication: My idea is to do it through a double for-loop, which would then again need 16 different if-like methods to figure out who's colliding with who, and what to do about it.&#xD;&#xA;&#xD;&#xA;E.g. if a predator cell collides with prey cell, the latter will be eaten and the predator will grow a certain amount in size and speed. The outcome should be the same (predator grows, prey dies) if the tested subjects are found in reverse order through the for-loops. Cells also need to know where they are in relation to eachother all the time, so they know when/what to flee from/chase.&#xD;&#xA;&#xD;&#xA;Any thoughts/suggestions on best practices and how to do this most efficiently are much appreciated." />
  <row Id="27748" PostHistoryTypeId="6" PostId="12610" RevisionGUID="d86d29fd-342b-4269-879c-a50c73e40972" CreationDate="2011-05-23T03:27:20.520" UserId="7525" Comment="added 148 characters in body; edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="27749" PostHistoryTypeId="5" PostId="12611" RevisionGUID="f7f5e04d-2639-4d66-b704-e645cb526d44" CreationDate="2011-05-23T03:30:47.790" UserId="6813" Comment="added 8 characters in body; added 246 characters in body" Text="To test for the collision in 2D, I would recommend something like this :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    struct AABB { int x, y, width, height; }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( AABB box1, AABB box2 )&#xD;&#xA;    {&#xD;&#xA;        if( box1.x + box1.width &lt; box2.x || box1.x &gt; box2.x + box2.width ) return false;&#xD;&#xA;        if( box1.y + box1.height &lt; box2.y || box1.y &gt; box2.y + box2.eight ) return false;&#xD;&#xA;    &#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Thus you can test the collision with small or big entities, and they can evolve in size and position.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also use a circle test collision using a circle center and a radius if circles are most adapted to the context of your game.&#xD;&#xA;&#xD;&#xA;    struct Circle { int x, y, radius; }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( Circle cir1, Circle cir2 )&#xD;&#xA;    {&#xD;&#xA;        // Calculate the vector from cir1 center to cir2 center&#xD;&#xA;        // then calculate the (non root-squared) distance using cross product to compare with radius&#xD;&#xA;        int distX = cir2.x - cir1.x;&#xD;&#xA;        int distY = cir2.y - cir1.y;&#xD;&#xA;        int distanceCenters = distX * distX  + distY * distY;&#xD;&#xA;        &#xD;&#xA;        int radiusSum = cir1.radius + cir2.radius;&#xD;&#xA;        return (distanceCenters &lt; radiusSum*radiusSum );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The distance is not square-rooted as it should, because square-root operations are often expensive compared to products. Thus we don't use square-root on distanceCenters, but we use product with itself for radiusSum.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**To avoid testing all entities over all others entities**, I would split the &quot;game area&quot; in some smaller areas. Thus when you move the entities, you record in which &quot;small&quot; area of your game area they currently are (by adding a zone ID to the entity), and next you can test only the entities which are registered to be in the same &quot;small&quot; area (you need to test multiple area when an entity is at the edge of 2+ small areas).&#xD;&#xA;&#xD;&#xA;Finally, as you need to know &quot;where they are in relation to eachother all the time, so they know when/what to flee from/chase&quot;, I would recommend to test for the nearest cells of each types using small areas once again (and greater area if not found)." />
  <row Id="27750" PostHistoryTypeId="5" PostId="12611" RevisionGUID="459797b8-ff85-43ce-b95f-692689e5e4cf" CreationDate="2011-05-23T03:37:40.177" UserId="6813" Comment="added 69 characters in body" Text="To test for the collision in 2D, I would recommend something like this :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    struct AABB { int x, y, width, height; }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( AABB box1, AABB box2 )&#xD;&#xA;    {&#xD;&#xA;        if( box1.x + box1.width &lt; box2.x || box1.x &gt; box2.x + box2.width ) return false;&#xD;&#xA;        if( box1.y + box1.height &lt; box2.y || box1.y &gt; box2.y + box2.eight ) return false;&#xD;&#xA;    &#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Thus you can test the collision with small or big entities, and they can evolve in size and position.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also use a circle test collision using a circle center and a radius if circles are most adapted to the context of your game.&#xD;&#xA;&#xD;&#xA;    struct Circle { int x, y, radius; }&#xD;&#xA;    &#xD;&#xA;    bool isColliding( Circle cir1, Circle cir2 )&#xD;&#xA;    {&#xD;&#xA;        // Calculate the vector from cir1 center to cir2 center&#xD;&#xA;        // then calculate the (non root-squared) distance using cross product to compare with radius&#xD;&#xA;        int distX = cir2.x - cir1.x;&#xD;&#xA;        int distY = cir2.y - cir1.y;&#xD;&#xA;        int distanceCenters = distX * distX  + distY * distY;&#xD;&#xA;        &#xD;&#xA;        int radiusSum = cir1.radius + cir2.radius;&#xD;&#xA;        return (distanceCenters &lt; radiusSum*radiusSum );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The distance is not square-rooted as it should, because square-root operations are often expensive compared to products. Thus we don't use square-root on distanceCenters, but we use product with itself for radiusSum.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**To avoid testing all entities over all others entities**, I would split the &quot;game area&quot; in some smaller areas. Thus when you move the entities, you record in which &quot;small&quot; area of your game area they currently are (by adding a zone ID to the entity), and next you can test only the entities which are registered to be in the same &quot;small&quot; area (you need to test multiple area when an entity is at the edge of 2+ small areas).&#xD;&#xA;&#xD;&#xA;Finally, as you need to know &quot;where they are in relation to eachother all the time, so they know when/what to flee from/chase&quot;, I would recommend to test for the nearest cells of each types using small areas once again (and greater area if not found) and distance from center to center (as in the circle collision test)." />
  <row Id="27751" PostHistoryTypeId="2" PostId="12613" RevisionGUID="5ae77ae5-4dc7-4647-bcb2-20669cf25301" CreationDate="2011-05-23T05:05:22.293" UserId="5680" Text="It is not here yet. But there will be a boost.simd library (hopefully). Take look at this presentation (given last week at boostcon)&#xD;&#xA;&#xD;&#xA;https://github.com/boostcon/2011_presentations/blob/master/thu/simd.pdf&#xD;&#xA;" />
  <row Id="27752" PostHistoryTypeId="2" PostId="12614" RevisionGUID="e8487d37-0c0d-466c-866f-3b00c60ef7f1" CreationDate="2011-05-23T05:08:08.393" UserId="2158" Text="2D perlin noise is good for height maps, but in this case it seems that he is not using a height map. Instead he has a 3D grid, where any cell can be empty. This allows caves and such formations, where the ground height is not a single value for given 2D location." />
  <row Id="27753" PostHistoryTypeId="2" PostId="12615" RevisionGUID="585e8c0d-8735-4bfe-ac03-439df7e0f3db" CreationDate="2011-05-23T06:09:31.593" UserId="20" Text="Checking collision on circles should be easy and has been described very well by Valkea. If your entity amount doesn't go into the thousands, checking *all* collisions shouldn't be a performance problem, since circle vs. circle tests are very fast.&#xD;&#xA;&#xD;&#xA;As for the resolving of the collisions: *Don't* write if-statements for all possible collision types. Consider something like this instead: Each of your *Cell-classes* has a method `handleCollision` which takes a cell-class as parameter. Your collision check could look like this:&#xD;&#xA;&#xD;&#xA;    // perform a circle vs. circle test&#xD;&#xA;    if(checkCollision(cellA, cellB)){&#xD;&#xA;        cellA.handleCollision(cellB);&#xD;&#xA;        cellB.handleCollision(cellA);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So it's in the responsibility of the cell class to react to a collision. The `handleCollision` method of the `Predator` cell could look like this:&#xD;&#xA;&#xD;&#xA;    public void handleCollision(Cell otherCell){&#xD;&#xA;        switch(otherCell.type){&#xD;&#xA;            case PREY:&#xD;&#xA;                speed += SOME_SPEED_INCREASE;&#xD;&#xA;                size += SOME_SIZE_INCREASE;&#xD;&#xA;                break;&#xD;&#xA;            case DISRUPTOR:&#xD;&#xA;                // other stuff...&#xD;&#xA;                break;&#xD;&#xA;            default:&#xD;&#xA;                // handle anything else&#xD;&#xA;                break;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If your cells are dependent on the current state of the other cell during collision (eg. if the predator gains more speed if he &quot;eats&quot; bigger prey), then you can't apply effects of the collision directly. Here's why:&#xD;&#xA;&#xD;&#xA;    // prey cell will be eaten, size = 0&#xD;&#xA;    prey.handleCollision(predator); &#xD;&#xA;    &#xD;&#xA;    // predator won't have anything to eat.. prey is already marked as eaten&#xD;&#xA;    predator.handleCollision(prey); &#xD;&#xA;&#xD;&#xA;So instead of directly applying state-changes in the `handleCollision` method, you should store the result and apply it after all collisions have been resolved." />
  <row Id="27754" PostHistoryTypeId="25" PostId="12603" RevisionGUID="1caab9ac-0131-47c8-a876-701482dc11ce" CreationDate="2011-05-23T06:12:37.650" Comment="http://twitter.com/#!/StackGameDev/status/72545448442867712" />
  <row Id="27755" PostHistoryTypeId="2" PostId="12616" RevisionGUID="ac07e3a3-9d7b-4cad-a74b-e6364420ed1f" CreationDate="2011-05-23T06:25:19.527" UserId="4241" Text="We have a similar situtation in our project, and we solved the problem by saving components (not functions) to LUA metatables. Basically, when we are creating an entity (or game object as we call them) on LUA side, code looks something like:&#xD;&#xA;&#xD;&#xA;    function createShip()&#xD;&#xA;        ...&#xD;&#xA;    &#xD;&#xA;        self.transform = registerToComponent(&quot;transform&quot;)&#xD;&#xA;        self.sprite = registerToComponent(&quot;sprite)&#xD;&#xA;    &#xD;&#xA;        ...&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;Now, we can use simply&#xD;&#xA;&#xD;&#xA;    entity.transform:setPosition(5.2, 4.8)&#xD;&#xA;    entity.sprite:setTexture(&quot;ship.png&quot;)&#xD;&#xA;&#xD;&#xA;to set position (and texture). And we are totally happy with this! &#xD;&#xA;&#xD;&#xA;(And actually I think this is better than having just entity:setPosition and entity:setTexture since when you have lots of components, resulting entity API would be just a big mess.)" />
  <row Id="27756" PostHistoryTypeId="5" PostId="12616" RevisionGUID="270c71fa-077d-4922-9a43-e00ef20c3143" CreationDate="2011-05-23T06:34:10.827" UserId="51" Comment="added 1 characters in body" Text="We have a similar situtation in our project, and we solved the problem by saving components (not functions) to LUA metatables. Basically, when we are creating an entity (or game object as we call them) on LUA side, code looks something like:&#xD;&#xA;&#xD;&#xA;    function createShip()&#xD;&#xA;        ...&#xD;&#xA;    &#xD;&#xA;        self.transform = registerToComponent(&quot;transform&quot;)&#xD;&#xA;        self.sprite = registerToComponent(&quot;sprite&quot;)&#xD;&#xA;    &#xD;&#xA;        ...&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;Now, we can use simply&#xD;&#xA;&#xD;&#xA;    entity.transform:setPosition(5.2, 4.8)&#xD;&#xA;    entity.sprite:setTexture(&quot;ship.png&quot;)&#xD;&#xA;&#xD;&#xA;to set position (and texture). And we are totally happy with this! &#xD;&#xA;&#xD;&#xA;(And actually I think this is better than having just entity:setPosition and entity:setTexture since when you have lots of components, resulting entity API would be just a big mess.)" />
  <row Id="27757" PostHistoryTypeId="2" PostId="12617" RevisionGUID="55b825a0-d1b9-40ed-86be-d061039cd332" CreationDate="2011-05-23T07:34:17.877" UserId="7528" Text="When building a game server intended to accomodate large numbers of simultanous games (e.g. table card games), where the server manages lots of tables and each table has up to a small handful of users, what metrics are most useful to collect and why?" />
  <row Id="27758" PostHistoryTypeId="1" PostId="12617" RevisionGUID="55b825a0-d1b9-40ed-86be-d061039cd332" CreationDate="2011-05-23T07:34:17.877" UserId="7528" Text="What are useful server metrics to gather for a table card game?" />
  <row Id="27759" PostHistoryTypeId="3" PostId="12617" RevisionGUID="55b825a0-d1b9-40ed-86be-d061039cd332" CreationDate="2011-05-23T07:34:17.877" UserId="7528" Text="&lt;server&gt;" />
  <row Id="27760" PostHistoryTypeId="2" PostId="12618" RevisionGUID="afb77764-176e-4a51-a96d-cd8336dc425e" CreationDate="2011-05-23T08:25:16.343" UserId="2710" Text="&gt;  Instead of sampling the “ground height”, I treated the noise value as the “density”, where anything lower than 0 would be air, and anything higher than or equal to 0 would be ground. &#xD;&#xA;&#xD;&#xA;Simply put, for every place where a block can be, a noise function is evaluated, and if it is &gt;0, a block is placed. Notch's noise function is skewed by adding height from water level to its value, that's why lower areas are mostly solid (height is large negative, so height+noise is negative too) and higher areas are mostly empty (height is large positive, so height+noise is positive too).&#xD;&#xA;&#xD;&#xA;There's probably some additional alchemy to decide what *kind* of block gets generated, and to carve caves. But I guess it's not directly related to this noise function.&#xD;&#xA;&#xD;&#xA;Also note that this method works for Notch because Minecraft has a voxel-based terrain. If you tried to pull that off in a polygon-based world, simply sampling noise function would not be enough. You' have to use some algorithm to turn samples into a surface, and create polygons that approximate this surface. One such algorithm is [marching cubes][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Marching_cubes" />
  <row Id="27761" PostHistoryTypeId="2" PostId="12619" RevisionGUID="502486e8-fb9e-4912-b3d8-1eeb1f67bf03" CreationDate="2011-05-23T08:40:28.943" UserId="1839" Text="Both of these vector/matrix-libs have optimized SSE2 code, Sony also has an Altivec for PowerPC compile switch:&#xD;&#xA;&#xD;&#xA; 1. [Sony's vectormath][1]  SSE2 and Altivec&#xD;&#xA;&#xD;&#xA; 2. [Bullet's Linearmath][2] SSE2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/Extras/vectormathlibrary&#xD;&#xA;  [2]: http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/src/LinearMath" />
  <row Id="27762" PostHistoryTypeId="2" PostId="12620" RevisionGUID="64606b22-5127-4fa9-a3b5-a09e24dffb37" CreationDate="2011-05-23T08:48:48.787" UserId="6395" Text="I have a scene with lots of houses and other objects. These objects will be bombarded from the sky. How to you handle these kind of sets having in mind that you want the physics to be as realistic as posible.&#xD;&#xA;&#xD;&#xA;In Unity3D, if I set all the objects with isKinematic=true and on Collision I set it to false, than the physics isn't as realistic as I want to... Can you have these kind of scenes on iPhone? Should I have animated objects? I really don't know what is the best practice in this kind of scenes....&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27763" PostHistoryTypeId="1" PostId="12620" RevisionGUID="64606b22-5127-4fa9-a3b5-a09e24dffb37" CreationDate="2011-05-23T08:48:48.787" UserId="6395" Text="[iOS] Should I use animated objects or I should fall on the Physic engine, on iOS scenes with lots of rigidbodies?" />
  <row Id="27764" PostHistoryTypeId="3" PostId="12620" RevisionGUID="64606b22-5127-4fa9-a3b5-a09e24dffb37" CreationDate="2011-05-23T08:48:48.787" UserId="6395" Text="&lt;physics&gt;&lt;unity&gt;&lt;animation&gt;&lt;ios&gt;" />
  <row Id="27765" PostHistoryTypeId="5" PostId="12620" RevisionGUID="7d3d5106-1758-4047-a775-7ea70e451587" CreationDate="2011-05-23T08:51:02.703" UserId="20" Comment="cleaned up title, minor changes" Text="I have a scene with lots of houses and other objects. These objects will be bombarded from the sky. How to you handle these kind of settings having in mind that you want the physics to be as realistic as possible.&#xD;&#xA;&#xD;&#xA;In Unity3D, if I set all the objects with isKinematic=true and on collision I set it to false, then the physics isn't as realistic as I want it to be... Can you have these kind of scenes on iPhone? Should I have animated objects? I really don't know what is the best practice in this kind of scenes....&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27766" PostHistoryTypeId="4" PostId="12620" RevisionGUID="7d3d5106-1758-4047-a775-7ea70e451587" CreationDate="2011-05-23T08:51:02.703" UserId="20" Comment="cleaned up title, minor changes" Text="Should I use animated objects or use the physics engine on iOS scenes with lots of rigidbodies?" />
  <row Id="27767" PostHistoryTypeId="25" PostId="12620" RevisionGUID="7a078583-d311-4cea-a2e5-ead1290a1156" CreationDate="2011-05-23T09:12:38.523" Comment="http://twitter.com/#!/StackGameDev/status/72590750541557761" />
  <row Id="27768" PostHistoryTypeId="2" PostId="12621" RevisionGUID="ddd17f3e-0ef1-43c9-bafd-690941e487f5" CreationDate="2011-05-23T10:09:03.650" UserId="5824" Text="For metrics regarding the gameplay I'd suggest simply recording a full history of each game, with each action timestamped.&#xD;&#xA;&#xD;&#xA;As card games tend to be fairly slow paced that shouldn't generate too much data and it lets you do any other analysis of the games you want to at a later date by just using that history data." />
  <row Id="27769" PostHistoryTypeId="2" PostId="12622" RevisionGUID="051b66fe-5b80-4127-bf06-43ea9dd25e19" CreationDate="2011-05-23T10:27:42.317" UserId="685" Text="LibGDX - http://libgdx.badlogicgames.com/features.php&#xD;&#xA;&#xD;&#xA;LibGDX is a game engine with a more low-level approach. It is very fast and flexible, has a really good Box2d-JNI wrapper, and lots of extensions and tools built around it.&#xD;&#xA;&#xD;&#xA;It is free open source software with very active developers and a helpful community, a lot of games in the market use it already.&#xD;&#xA;&#xD;&#xA;You can run the same code on Android and on Desktop, which helps in development, as you don't have to use the emulator or adb too often, which helps with turn-around times.&#xD;&#xA;&#xD;&#xA;There is even a tool to fetch input events on your phone while using the desktop-version of your game, so you can develop and test control schemes fast too. ( https://market.android.com/details?id=com.badlogic.gdx.remote )" />
  <row Id="27770" PostHistoryTypeId="16" PostId="12622" RevisionGUID="fcc05543-7d31-4aa6-988b-9d0600be5f27" CreationDate="2011-05-23T10:27:42.317" UserId="685" />
  <row Id="27771" PostHistoryTypeId="5" PostId="12564" RevisionGUID="b8c60a6b-5103-4c18-9f38-40a1770e83df" CreationDate="2011-05-23T10:59:57.213" UserId="3505" Comment="added 1082 characters in body" Text="Up the physics update rate until it works, it doesn't have to coincide with the framerate. I'd always do my timing like:&#xD;&#xA;&#xD;&#xA;    physicsStep=25&#xD;&#xA;    physicsdivider=3&#xD;&#xA;    nextUpdate=currentTime()*physicsdivider&#xD;&#xA;    while(1){&#xD;&#xA;        while(nextUpdate&lt;currentTime()*physicsdivider){&#xD;&#xA;            doPhysics()&#xD;&#xA;            nextUpdate+=physicsStep&#xD;&#xA;        }&#xD;&#xA;        doRender()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Edit: Updated the code to do 120 rather than 100 Hz as that will be a little smoother on screens running 60 Hz.&#xD;&#xA;&#xD;&#xA;What happens is that the inner loop repeats until the physics have caught up with the current time, only then is frame rendered. With v-Sync enabled on a 60 Hz monitor the result should be this:&#xD;&#xA;&#xD;&#xA;    render   00 ms&#xD;&#xA;    physics&#xD;&#xA;    physics&#xD;&#xA;    render   17 ms&#xD;&#xA;    physics&#xD;&#xA;    physics&#xD;&#xA;    render   33 ms&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;With exactly 120 physics updates per second, and 60 render updates per second&#xD;&#xA;&#xD;&#xA;If the video card is too slow to do 60 Hz some of the render updates will be dropped, but the physics will still be exactly the same with 120 updates per second.&#xD;&#xA;&#xD;&#xA;This only works well as long as the physics can stay comfortably within the allotted time of 8 1/3 ms per updated. You should try timing a physics update to get an idea of how close to being a problem this is.&#xD;&#xA;&#xD;&#xA;By the way, I can't find the render and flip commands in your code. In any case, simply calling a sleep 16 ms once for every update is a very poor method of timing, that way you are invariably going to drop frames." />
  <row Id="27772" PostHistoryTypeId="2" PostId="12623" RevisionGUID="9d96277f-3cca-49d4-9f5d-73b5d92334b4" CreationDate="2011-05-23T11:19:38.410" UserId="7328" Text="the problem with the kinematic object is that physics engine doesn't check if 2 kinematic object have collision and even if it collide with a dynamic object there won't be any change in kinematic object's speed, so basically you have to set all your game objects as dynamic, on the other hand you have to define all your objects as simple as possible for performance issue, you have to use only rects and ellipses, and at most triangles, and there are too many games with your base concept available in iphone now (remember `angry birds`?)" />
  <row Id="27773" PostHistoryTypeId="5" PostId="12620" RevisionGUID="2aa2ec1a-b1fb-4f26-a7e6-82b042e0fd12" CreationDate="2011-05-23T11:58:39.880" UserId="6395" Comment="deleted 4 characters in body" Text="I have a scene with lots of houses and other objects. These objects will be bombarded from the sky. How to handle these kind of settings having in mind that you want the physics to be as realistic as possible.&#xD;&#xA;&#xD;&#xA;In Unity3D, if I set all the objects with isKinematic=true and on collision I set it to false, then the physics isn't as realistic as I want it to be... Can you have these kind of scenes on iPhone? Should I have animated objects? I really don't know what is the best practice in this kind of scenes....&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27774" PostHistoryTypeId="25" PostId="12617" RevisionGUID="4cb7163f-911c-4248-8202-640b13f9eeaa" CreationDate="2011-05-23T12:12:37.983" Comment="http://twitter.com/#!/StackGameDev/status/72636045577031681" />
  <row Id="27775" PostHistoryTypeId="2" PostId="12624" RevisionGUID="517d58c6-b1fa-48c8-957f-671ab0f5153c" CreationDate="2011-05-23T12:16:11.823" UserId="7533" Text="I would like to create some level of abstraction above math in my code. I mean I don't want to be dependant on the implementation of math operations or even on class names, which are provided by some math library. I will show you a simple example.&#xD;&#xA;&#xD;&#xA;Let's assume that we have 2 math libraries. Let's consider 3D-vector classes:&#xD;&#xA;&#xD;&#xA;Library A has 3D-vector class as &quot;Vector3D&quot; and its method &quot;Subtract&quot;.&#xD;&#xA;&#xD;&#xA;Library B has 3D-vector class as &quot;vector3&quot; and its method &quot;subtr&quot;.&#xD;&#xA;&#xD;&#xA;Now I want to be able to swtich between these 2 different implementations, but without changing any line of code. For, instance I would like to have it like this:&#xD;&#xA;&#xD;&#xA;My 3D-vector class name will be &quot;vec3&quot; and its method &quot;sub&quot;. But behind &quot;vec3&quot; and &quot;sub&quot; it can be implementation from library A or library B, depending on what I choose with 1 line of code in the beginning of program or even on compilation stage.&#xD;&#xA;&#xD;&#xA;In other words it should look like a plugable system for math libraries.&#xD;&#xA;&#xD;&#xA;I think it's about programming patterns here right? It look like delegation or factory. Could make clear for me how to implement this approach and is it worth it?" />
  <row Id="27776" PostHistoryTypeId="1" PostId="12624" RevisionGUID="517d58c6-b1fa-48c8-957f-671ab0f5153c" CreationDate="2011-05-23T12:16:11.823" UserId="7533" Text="Abstracting multiple math libraries with C++" />
  <row Id="27777" PostHistoryTypeId="3" PostId="12624" RevisionGUID="517d58c6-b1fa-48c8-957f-671ab0f5153c" CreationDate="2011-05-23T12:16:11.823" UserId="7533" Text="&lt;c++&gt;&lt;math&gt;&lt;libraries&gt;" />
  <row Id="27779" PostHistoryTypeId="2" PostId="12626" RevisionGUID="7a755bba-f3c9-41c2-98bf-6ff25691413a" CreationDate="2011-05-23T12:29:15.287" UserId="1386" Text="The design pattern you are looking for is the [adapter pattern][1].&#xD;&#xA;One way to implement the adapter pattern is to create a generic interface for the vector class, and then you could derive classes from it that call the correct functions.&#xD;&#xA;To switch between the concrete derived classes you could use a typedef.&#xD;&#xA;e.g. you would define&#xD;&#xA;&#xD;&#xA;    typedef VectorDirectX Vector&#xD;&#xA;&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    typedef VectorOpenGL Vector&#xD;&#xA;&#xD;&#xA;and then you would only use Vector in your code. Of course this would only work if you weren't planning on switched Vector classes at runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In practice though, I'd rather rely on refactoring tools to rename functions and classes unless I'm working on a massive project or there's a legitimate reason why the classes would need to frequently change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adapter_pattern" />
  <row Id="27780" PostHistoryTypeId="5" PostId="12626" RevisionGUID="bafaafd4-3eb8-46d6-bebe-59b8c0a72b1d" CreationDate="2011-05-23T12:35:11.160" UserId="1386" Comment="more detail" Text="The design pattern you are looking for is the [adapter pattern (wikipedia)][1].&#xD;&#xA;One way to implement the adapter pattern is to create a generic interface (abstract) for the vector class, and then you could derive classes from it that call the correct functions.&#xD;&#xA;&#xD;&#xA;To switch between the concrete derived classes you could use a typedef.&#xD;&#xA;e.g. you would define&#xD;&#xA;&#xD;&#xA;    typedef VectorDirectX Vector&#xD;&#xA;&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    typedef VectorOpenGL Vector&#xD;&#xA;&#xD;&#xA;and then you would only use Vector in your code. Of course this would only work if you weren't planning on switching Vector classes at runtime.&#xD;&#xA;&#xD;&#xA;If you did need to switch between them at runtime you could use a factory, which would create the required class and return a pointer/reference to the abstract class.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In practice though, I'd rather rely on refactoring tools (e.g. [Visual Assist][2]) to rename functions and classes unless I'm working on a massive project or there's a legitimate reason why the classes would need to frequently change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adapter_pattern&#xD;&#xA;  [2]: http://www.wholetomato.com/" />
  <row Id="27782" PostHistoryTypeId="2" PostId="12627" RevisionGUID="7c40b85d-d250-4ca1-a9aa-f6e93b551808" CreationDate="2011-05-23T12:49:07.933" UserId="1839" Text="I strongly recommend not to put a layer of abstraction between your application and the math-lib, neither high level factories nor inheritance for different platforms, nor delegation nor similar patterns.   &#xD;&#xA;&#xD;&#xA;You want your vector math code as **optimized** as possible.   &#xD;&#xA;&#xD;&#xA;Unfortunetely layers of abstraction that make your design more user-friendly, have massive performance impacts, especially in low level code such as math libraries. &#xD;&#xA;&#xD;&#xA;**So what can you do?**&#xD;&#xA;&#xD;&#xA;Either use those libraries that do all the dirty work for you like: multi platform implementation, passing vectors via registers rather than the stack if possible, etc:&#xD;&#xA;&#xD;&#xA; 1. [Sony's vectormath][1] SSE2 and Altivec&#xD;&#xA; 2. [Bullet's Linearmath][2] SSE2&#xD;&#xA;&#xD;&#xA;Or use them as the inspiration for your own. Forget about fancy design patterns in this case, here performance is priority No. 1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/Extras/vectormathlibrary/&#xD;&#xA;  [2]: http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/src/LinearMath/" />
  <row Id="27783" PostHistoryTypeId="5" PostId="12626" RevisionGUID="a71ce265-abc4-4806-a159-2eadef61d740" CreationDate="2011-05-23T12:52:40.547" UserId="1386" Comment="added 195 characters in body; deleted 7 characters in body; added 24 characters in body" Text="The design pattern you are looking for is the [adapter pattern (wikipedia)][1].&#xD;&#xA;&#xD;&#xA;&gt; The adapter pattern (often referred to&#xD;&#xA;&gt; as the wrapper pattern or simply a&#xD;&#xA;&gt; wrapper) is a design pattern that&#xD;&#xA;&gt; translates one interface for a class&#xD;&#xA;&gt; into a compatible interface...&#xD;&#xA;&#xD;&#xA;One way to implement the adapter pattern is to create a generic interface (abstract) for the vector class, and then you could derive classes from it that call the correct functions.&#xD;&#xA;&#xD;&#xA;To switch between the concrete derived classes you could use a typedef.&#xD;&#xA;e.g. you would define&#xD;&#xA;&#xD;&#xA;    typedef VectorDirectX Vector&#xD;&#xA;&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    typedef VectorOpenGL Vector&#xD;&#xA;&#xD;&#xA;and then you would only use Vector in your code. This would only work if you weren't planning on switching Vector classes at runtime.&#xD;&#xA;&#xD;&#xA;If you did need to switch between them at runtime you could use a factory, which would create the required class and return a pointer/reference to the base abstract class.&#xD;&#xA;&#xD;&#xA;In practice though, for performance reasons I'd rather rely on refactoring tools (e.g. [Visual Assist][2]) to rename functions and classes unless I'm working on a massive project or there's a legitimate reason why the classes would need to frequently change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adapter_pattern&#xD;&#xA;  [2]: http://www.wholetomato.com/" />
  <row Id="27784" PostHistoryTypeId="5" PostId="12626" RevisionGUID="e4a1dd06-d457-4a93-867c-c82d8b240598" CreationDate="2011-05-23T12:57:55.187" UserId="1386" Comment="deleted 4 characters in body" Text="The design pattern you are looking for is the [adapter pattern (wikipedia)][1].&#xD;&#xA;&#xD;&#xA;&gt; The adapter pattern (often referred to&#xD;&#xA;&gt; as the wrapper pattern or simply a&#xD;&#xA;&gt; wrapper) is a design pattern that&#xD;&#xA;&gt; translates one interface for a class&#xD;&#xA;&gt; into a compatible interface...&#xD;&#xA;&#xD;&#xA;One way to implement the adapter pattern is to create a generic interface (abstract) for the vector class, and then you could derive classes from it that call the correct functions.&#xD;&#xA;&#xD;&#xA;To switch between the concrete derived classes you could use a typedef.&#xD;&#xA;e.g. you would define&#xD;&#xA;&#xD;&#xA;    typedef VectorDirectX Vector&#xD;&#xA;&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    typedef VectorOpenGL Vector&#xD;&#xA;&#xD;&#xA;and then you would only use Vector in your code. This would only work if you weren't planning on switching Vector classes at runtime.&#xD;&#xA;&#xD;&#xA;If you did need to switch between them at runtime you could use a factory, which would create the required class and return a pointer/reference to the base abstract class.&#xD;&#xA;&#xD;&#xA;**In practice** for performance reasons I'd rather rely on refactoring tools (e.g. [Visual Assist][2]) to rename functions and classes unless I'm working on a massive project or there's a legitimate reason why the classes would need to frequently change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adapter_pattern&#xD;&#xA;  [2]: http://www.wholetomato.com/" />
  <row Id="27785" PostHistoryTypeId="5" PostId="12558" RevisionGUID="82a3e05c-4586-495a-96de-a48060bf0e41" CreationDate="2011-05-23T14:29:04.907" UserId="3588" Comment="Small revisions on the body. Added the [assets] tag as this deals with management of model assets (as one versus many), and the [level-design] tag as this pertains to theory/practice of level development. ♪" Text="I am writing a game in XNA 4 and I want to have something like a corridor. Do you think that is better to use one big and solid model, or to use multiple small parts (window, stairs, door...)?" />
  <row Id="27786" PostHistoryTypeId="4" PostId="12558" RevisionGUID="82a3e05c-4586-495a-96de-a48060bf0e41" CreationDate="2011-05-23T14:29:04.907" UserId="3588" Comment="Small revisions on the body. Added the [assets] tag as this deals with management of model assets (as one versus many), and the [level-design] tag as this pertains to theory/practice of level development. ♪" Text="Which is better, one big level model or multiple smaller level models?" />
  <row Id="27787" PostHistoryTypeId="6" PostId="12558" RevisionGUID="82a3e05c-4586-495a-96de-a48060bf0e41" CreationDate="2011-05-23T14:29:04.907" UserId="3588" Comment="Small revisions on the body. Added the [assets] tag as this deals with management of model assets (as one versus many), and the [level-design] tag as this pertains to theory/practice of level development. ♪" Text="&lt;xna-4.0&gt;&lt;models&gt;&lt;assets&gt;&lt;level-design&gt;" />
  <row Id="27788" PostHistoryTypeId="24" PostId="12558" RevisionGUID="82a3e05c-4586-495a-96de-a48060bf0e41" CreationDate="2011-05-23T14:29:04.907" Comment="Proposed by 3588 approved by 14 edit id of 440" />
  <row Id="27789" PostHistoryTypeId="2" PostId="12628" RevisionGUID="06411d3c-ebd8-4801-9443-354ef08c198d" CreationDate="2011-05-23T14:42:48.983" UserId="6894" Text="I am making a tower defense game in Flash and I have a slow tower that is built directly on the path. I have it setup to use a hitTestObject function.&#xD;&#xA;&#xD;&#xA;The tower is in its own class and the enemies are in their own class.&#xD;&#xA;&#xD;&#xA;In the update function for the tower, it has&#xD;&#xA;&#xD;&#xA;    if (this.hitTestObject(enemy)) &#xD;&#xA;    {&#xD;&#xA;        enemy.slow = true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In the enemy class update function, I have:&#xD;&#xA;&#xD;&#xA;    if (slow == true)&#xD;&#xA;    {&#xD;&#xA;        finalSpeed = speed/2;&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        finalSpeed = speed;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This seems to work fine until I build a second slow tower. Whenever I build the second one, it works, but the first &#xD;&#xA;" />
  <row Id="27790" PostHistoryTypeId="1" PostId="12628" RevisionGUID="06411d3c-ebd8-4801-9443-354ef08c198d" CreationDate="2011-05-23T14:42:48.983" UserId="6894" Text="Slow Tower for a Tower Defense Game" />
  <row Id="27791" PostHistoryTypeId="3" PostId="12628" RevisionGUID="06411d3c-ebd8-4801-9443-354ef08c198d" CreationDate="2011-05-23T14:42:48.983" UserId="6894" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;tower-defense&gt;" />
  <row Id="27792" PostHistoryTypeId="2" PostId="12629" RevisionGUID="3bce98c8-dbc9-4e93-9e18-a6d829135887" CreationDate="2011-05-23T15:08:50.003" UserId="788" Text="The Android documentation says:&#xD;&#xA;&#xD;&#xA;&gt; There are situations where the EGL&#xD;&#xA;&gt; rendering context will be lost. This&#xD;&#xA;&gt; typically happens when device wakes up&#xD;&#xA;&gt; after going to sleep. When the EGL&#xD;&#xA;&gt; context is lost, all OpenGL resources&#xD;&#xA;&gt; (such as textures) that are associated&#xD;&#xA;&gt; with that context will be&#xD;&#xA;&gt; automatically deleted. In order to&#xD;&#xA;&gt; keep rendering correctly, a renderer&#xD;&#xA;&gt; must recreate any lost resources that&#xD;&#xA;&gt; it still needs. The&#xD;&#xA;&gt; onSurfaceCreated(GL10, EGLConfig)&#xD;&#xA;&gt; method is a convenient place to do&#xD;&#xA;&gt; this.&#xD;&#xA;&#xD;&#xA;But having to reload all the textures in the OpenGL context is both a pain and hurts the game experience for the user when reentering the app after a pause. I know that &quot;Angry Birds&quot; somehow avoids this, I'm looking for suggestions on how to accomplish the same?&#xD;&#xA;&#xD;&#xA;I'm working with the Android NDK r5 (CrystaX version.) I did find [this possible hack][1] to the problem but I'm trying to avoid building an entire custom SDK version.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.anddev.org/android-2d-3d-graphics-opengl-problems-f55/minimizing-opengl-texture-reloads-on-pause-resume-t52932.html" />
  <row Id="27793" PostHistoryTypeId="1" PostId="12629" RevisionGUID="3bce98c8-dbc9-4e93-9e18-a6d829135887" CreationDate="2011-05-23T15:08:50.003" UserId="788" Text="Workaround to loosing the OpenGL context when Android pauses?" />
  <row Id="27794" PostHistoryTypeId="3" PostId="12629" RevisionGUID="3bce98c8-dbc9-4e93-9e18-a6d829135887" CreationDate="2011-05-23T15:08:50.003" UserId="788" Text="&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="27795" PostHistoryTypeId="25" PostId="12624" RevisionGUID="153433ec-25ee-4a99-8d95-d85348353ea3" CreationDate="2011-05-23T15:12:38.773" Comment="http://twitter.com/#!/StackGameDev/status/72681347705077760" />
  <row Id="27796" PostHistoryTypeId="2" PostId="12630" RevisionGUID="a31d40e6-4d82-4131-8bff-0d76e1e67510" CreationDate="2011-05-23T15:28:59.417" UserId="7536" Text="I'm currently a (happily employed) automated software tester that's curious about game testing/QA. Do game companies hire dedicated testers for pay? If yes, then what are the job prospects like? If no, then how does becoming a game tester work (volunteers? mixed roles? crowdsourcing?). Obviously game companies have full-time devs, artists, designers, managers, etc. but what does QA look like? " />
  <row Id="27797" PostHistoryTypeId="1" PostId="12630" RevisionGUID="a31d40e6-4d82-4131-8bff-0d76e1e67510" CreationDate="2011-05-23T15:28:59.417" UserId="7536" Text="Job prospects for game QA/testers" />
  <row Id="27798" PostHistoryTypeId="3" PostId="12630" RevisionGUID="a31d40e6-4d82-4131-8bff-0d76e1e67510" CreationDate="2011-05-23T15:28:59.417" UserId="7536" Text="&lt;testing&gt;&lt;jobs&gt;&lt;job-hierarchy&gt;" />
  <row Id="27799" PostHistoryTypeId="2" PostId="12631" RevisionGUID="36a33201-9300-4124-b65a-6e774692ebdd" CreationDate="2011-05-23T15:47:12.433" UserId="6813" Text="Yes, there is some professional companies dedicated to game testing.&#xD;&#xA;&#xD;&#xA;The biggest one I know of, is Enzyme, a Canadian company:&lt;br&gt;&#xD;&#xA;http://www.enzyme.org&#xD;&#xA;&#xD;&#xA;Lutin Userlab in France is another one:&lt;br&gt;&#xD;&#xA;http://www.lutin-userlab.fr/_pages/english&#xD;&#xA;&#xD;&#xA;But there is probably a lot of other companies doing the same king of work all over the world and particularly in USA.&#xD;&#xA;&#xD;&#xA;The &quot;Game testing&quot; wikipedia page could provide you some useful informations too:&lt;br&gt;&#xD;&#xA;http://en.wikipedia.org/wiki/Game_testing#Employment&#xD;&#xA;&#xD;&#xA;As far as I know, Game testers used to be paid hourly, they don't earn a huge amount of money, but hey they have fun at work ;)" />
  <row Id="27800" PostHistoryTypeId="2" PostId="12632" RevisionGUID="9e3f8a4f-693a-4a64-a7c2-4847c8c51ccc" CreationDate="2011-05-23T15:48:52.137" UserId="1430" Text="Testing/QA in the games industry is basically just like anywhere else, albeit with a tendency towards less process and formal methodology than in non-game work. Companies will hire for full-time QA as well as contract staff; the ratio of each will vary based on the culture of the studio and the needs of their current project or projects (typically contract QA positions are staffed up in the lead out to a release, for example).&#xD;&#xA;&#xD;&#xA;Some studios will interact with QA contracting services like Volt, some will hire directly, some will do both. Volunteers are typically only used for one-off usability tests.&#xD;&#xA;&#xD;&#xA;As of the [Game Developer 2010 salary survey][1], QA remains a relatively low-compensated domain relative to other areas in the industry (which is, admittedly, low-compensated on average). Average salaries reported for the 2010 survey period were around 50k.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/news/34304/Game_Developer_Reveals_2010_Game_Industry_Salary_Survey_Results.php" />
  <row Id="27801" PostHistoryTypeId="5" PostId="12631" RevisionGUID="04afc362-fc7d-48d4-a78f-03dcce450834" CreationDate="2011-05-23T15:53:05.290" UserId="6813" Comment="deleted 5 characters in body" Text="There is some professional companies dedicated to game testing.&#xD;&#xA;&#xD;&#xA;The biggest one I know of, is Enzyme, a Canadian company:&lt;br&gt;&#xD;&#xA;http://www.enzyme.org&#xD;&#xA;&#xD;&#xA;Lutin Userlab in France is another one:&lt;br&gt;&#xD;&#xA;http://www.lutin-userlab.fr/_pages/english&#xD;&#xA;&#xD;&#xA;But there is probably a lot of other companies doing the same king of work all over the world and particularly in USA.&#xD;&#xA;&#xD;&#xA;The &quot;Game testing&quot; wikipedia page could provide you some useful informations too:&lt;br&gt;&#xD;&#xA;http://en.wikipedia.org/wiki/Game_testing#Employment&#xD;&#xA;&#xD;&#xA;As far as I know, Game testers used to be paid hourly, they don't earn a huge amount of money, but hey they have fun at work ;)" />
  <row Id="27802" PostHistoryTypeId="2" PostId="12633" RevisionGUID="50eaffd5-3d3e-42a0-9ac0-4e1aaceba784" CreationDate="2011-05-23T16:02:02.277" UserId="7328" Text="i guess for some reason the first `if` statement which should be working for every tower is only working for the latest tower build, (maybe it's just an instancing problem, eg. you just create an instance for tower shape but not from the whole tower class)&#xD;&#xA;" />
  <row Id="27803" PostHistoryTypeId="2" PostId="12634" RevisionGUID="363b0e69-59e8-41ca-a836-d1198995d467" CreationDate="2011-05-23T16:16:44.317" UserId="7328" Text="since you are coding with c++ you can use some advance template features like this :&#xD;&#xA;&#xD;&#xA;	struct vector3&#xD;&#xA;	{&#xD;&#xA;		void subtr(vector3 p){};&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	struct vector3D&#xD;&#xA;	{&#xD;&#xA;		void Subtract(vector3D p){};&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	template &lt;bool t&gt; class Vector3DWrapper{&#xD;&#xA;		vector3D v3d;&#xD;&#xA;	public:&#xD;&#xA;		void subtract(Vector3DWrapper pv) {v3d.Subtract(pv.v3d);};&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	template &lt;&gt; class Vector3DWrapper&lt;true&gt; {&#xD;&#xA;		vector3 v3;&#xD;&#xA;	public:&#xD;&#xA;		void subtract(Vector3DWrapper pv) {v3.subtr(pv.v3);};&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;now if you declare some vector from `Vector3DWrapper&lt;true&gt;` type it'll use all vector3d features and other wise it'll all be Vector3D features, the only thing is that this code will generate errors if want to set some `Vector3DWrapper&lt;false&gt;` variable to `Vector3DWrapper&lt;true&gt;` value, but this can also be solved by just implementing cast operators for these classes." />
  <row Id="27804" PostHistoryTypeId="2" PostId="12635" RevisionGUID="dc1f8061-1ddd-4f84-9e5b-400dd555af4e" CreationDate="2011-05-23T16:27:13.570" UserId="7050" Text="i am currently working on a 2d puzzle game in the unity engine. One of the aspect of this game is the possibility to rotate the level of 90°. It also rotate the gravity.&#xD;&#xA;&#xD;&#xA;The main character is not directly controlled by the player, but instead fall when the level is rotated.&#xD;&#xA;&#xD;&#xA;When the main character hit a wall, he should stop to move. If i do not stop it, it kind of blink ans shake against the wall.&#xD;&#xA;&#xD;&#xA;To stop it i detect collision and depending on the current rotation state, the player will stop at &quot;vertical&quot; or &quot;horizontal&quot; tags when a OnCollisonEnter occurs. I must do that because when the player fall on his relative ground, He must not stop like if he had touch a wall.&#xD;&#xA;&#xD;&#xA;My problem is the 'side' of platform, or the 'top' of wall, they use the same tag and thus do not give the correct tag to my character. I tried to put a very small invisible box on top/side of elements but the collision occurs nevertheless. It seems when the player falls and hit something he go through a bit before being replaced at correct position by unity.&#xD;&#xA;&#xD;&#xA;Is there a way :&#xD;&#xA;&#xD;&#xA;1 ) to doesn't stop my character but to make it appear immobile on screen&#xD;&#xA;&#xD;&#xA;2 ) To detect a &quot;i cannot move anymore&quot; collision other than by using collision?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27805" PostHistoryTypeId="1" PostId="12635" RevisionGUID="dc1f8061-1ddd-4f84-9e5b-400dd555af4e" CreationDate="2011-05-23T16:27:13.570" UserId="7050" Text="Unity, changing gravity game &amp; stopping character when he hit a wall." />
  <row Id="27806" PostHistoryTypeId="3" PostId="12635" RevisionGUID="dc1f8061-1ddd-4f84-9e5b-400dd555af4e" CreationDate="2011-05-23T16:27:13.570" UserId="7050" Text="&lt;collision-detection&gt;&lt;unity&gt;" />
  <row Id="27807" PostHistoryTypeId="5" PostId="12628" RevisionGUID="e19d9651-0807-4bce-8d30-b12113856264" CreationDate="2011-05-23T16:36:52.793" UserId="962" Comment="added 168 characters in body; deleted 1 characters in body" Text="I am making a tower defense game in Flash and I have a slow tower that is built directly on the path. I have it setup to use a hitTestObject function.&#xD;&#xA;&#xD;&#xA;The tower is in its own class and the enemies are in their own class.&#xD;&#xA;&#xD;&#xA;In the update function for the tower, it has&#xD;&#xA;&#xD;&#xA;    if (this.hitTestObject(enemy)) &#xD;&#xA;    {&#xD;&#xA;        enemy.slow = true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In the enemy class update function, I have:&#xD;&#xA;&#xD;&#xA;    if (slow == true)&#xD;&#xA;    {&#xD;&#xA;        finalSpeed = speed/2;&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        finalSpeed = speed;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This seems to work fine until I build a second slow tower. Whenever I build the second one, it works, but the  first one stops working (it no longer slows enemies). However, it is still detecting the collisions with the enemies. I don't understand why it doesn't slow them down though." />
  <row Id="27808" PostHistoryTypeId="2" PostId="12636" RevisionGUID="0a6dd298-d2da-49c2-9dea-d2998d148172" CreationDate="2011-05-23T16:50:46.210" UserId="1198" Text="Since you're already tracking the state change of the game for each move, I don't see what else you might monitor in relation to the &quot;game&quot; itself; however, many commonly tracked server metrics include:&#xD;&#xA;&#xD;&#xA; - CPU Load&#xD;&#xA; - Physical Memory Use&#xD;&#xA; - DISK IOPS&#xD;&#xA;  - Read Queue Length&#xD;&#xA;  - Write Queue Length&#xD;&#xA;  - Average Service Time&#xD;&#xA; - Network IO Use&#xD;&#xA;&#xD;&#xA;Depending on your server platform there are different tools to monitor this data. The reason to monitor these, is because they directly impact performance and they are all finite resources on any given server. If you start maxing one of these out, you need do either, add more of that resource, re-write some of your application to work within the limits on your server." />
  <row Id="27809" PostHistoryTypeId="2" PostId="12637" RevisionGUID="04fa4eec-e8e8-4379-b8da-71dd76dc7471" CreationDate="2011-05-23T17:29:01.667" UserId="4496" Text="I can't tell for sure without seeing more of the code, but what it *sounds* like is that something involving the later tower is setting the .slow of enemies it's not hitting back to false.  &#xD;&#xA;&#xD;&#xA;I haven't really worked with actionscript, but I'd look into watching when that variable changes to false.  If it's getting set to true but when the enemies movement comes around it is back to false, something between the two has to be resetting it." />
  <row Id="27810" PostHistoryTypeId="2" PostId="12638" RevisionGUID="bbee2c8b-415f-4c44-ac8f-a344c3ad8569" CreationDate="2011-05-23T18:01:42.433" UserId="4037" Text="i am currently contributing to a particle emitting system for our game and developing some emitter shapes.&#xD;&#xA;my uniform random distribution along a line or along a rectangular area works fine - no problem.&#xD;&#xA;but now i would like to have something like a 1 dimensional gradient in this distribution.&#xD;&#xA;this would mean for example values on the left are much more likely than on the right ...&#xD;&#xA;&#xD;&#xA;i don't know what would be appropriate mathematical terms for this problem, so my search skills are rather useless with this one. also i want the computation be cheap and simple, so i thought i could ask it here. i am sure some people would know how to achieve the result i want.&#xD;&#xA;&#xD;&#xA;thanks in advance" />
  <row Id="27811" PostHistoryTypeId="1" PostId="12638" RevisionGUID="bbee2c8b-415f-4c44-ac8f-a344c3ad8569" CreationDate="2011-05-23T18:01:42.433" UserId="4037" Text="how to randomly distribute &quot;along&quot; a linear gradient" />
  <row Id="27812" PostHistoryTypeId="3" PostId="12638" RevisionGUID="bbee2c8b-415f-4c44-ac8f-a344c3ad8569" CreationDate="2011-05-23T18:01:42.433" UserId="4037" Text="&lt;math&gt;&lt;random&gt;&lt;distribution&gt;" />
  <row Id="27813" PostHistoryTypeId="25" PostId="12630" RevisionGUID="67a3dd84-421d-4357-ac8d-b5f257721cb6" CreationDate="2011-05-23T18:12:39.877" Comment="http://twitter.com/#!/StackGameDev/status/72726651112402944" />
  <row Id="27814" PostHistoryTypeId="2" PostId="12639" RevisionGUID="f0fb0708-6e67-4166-a018-203bd6749648" CreationDate="2011-05-23T18:30:06.817" UserId="4496" Text="You'd probably get a close approximation to what you want by utilizing an exponential system.  &#xD;&#xA;&#xD;&#xA;Make the x based on something like 1-(rnd^value) (Assuming rnd is between 0 and 1) and you'll get a few different behaviors of left to right skewing based on what you use.  A higher value will get you a more skewed distribution  &#xD;&#xA;&#xD;&#xA;You can use an online graphing tool to get some rough ideas on the behaviors different equations will give you before placing them in, or you can just fiddle with the equations directly in your particle system, depending what style is more to your tastes.&#xD;&#xA;" />
  <row Id="27815" PostHistoryTypeId="2" PostId="12640" RevisionGUID="2e7deb3f-49b2-4281-9df5-cd07e02bc6c4" CreationDate="2011-05-23T18:31:08.447" UserId="3505" Text="I think what you ask for is the distribution achieved using a square root function.&#xD;&#xA;&#xD;&#xA;    [position] = sqrt(rand(0, 1))&#xD;&#xA;&#xD;&#xA;This will give a distribution in the single dimension field `[0, 1]` where the probability for a position is equivalent to that position, i.e. a &quot;triangular distribution&quot;." />
  <row Id="27816" PostHistoryTypeId="2" PostId="12641" RevisionGUID="a8a7c834-c9b0-4372-a551-bce6a7d0e8cd" CreationDate="2011-05-23T18:38:14.220" UserId="962" Text="The term you are looking for is `Weighted Random Numbers`, most of the algorithms I have seen use trig functions, but I think I figured out a way that will be efficient.&#xD;&#xA;&#xD;&#xA;Create a table/array/List(whatever) that holds a multiplier value for the random function. Fill it out by hand or programatically&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    randMulti= {.1,.1,.1,.1,.1,.1,.2,.2,.3,.3,.9,1,1,1,} &#xD;&#xA;&#xD;&#xA;then Multiply `random` by a randomly chosen `randMulti`and finally by the max Value of the distrobution&#xD;&#xA;&#xD;&#xA;    weightedRandom = math.random()*randMulti[Math.random(randMulti.length)]*maxValue&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I do believe that this will be much faster than using sqrt, or other more computational complex functions, and will allow for more custom grouping patterns." />
  <row Id="27817" PostHistoryTypeId="2" PostId="12642" RevisionGUID="6be7d373-447d-4fb4-ad44-f3b4886e45f1" CreationDate="2011-05-23T18:38:18.413" UserId="6715" Text="[Eigen][1] is a C++ header only math library that supports SSE, AltiVec and ARM Neon vectorisation.&#xD;&#xA;&#xD;&#xA;  [1]: http://eigen.tuxfamily.org/index.php?title=Main_Page&#xD;&#xA;" />
  <row Id="27818" PostHistoryTypeId="5" PostId="12638" RevisionGUID="6ad1f60c-16e5-4983-b776-65a53b4fb11c" CreationDate="2011-05-23T18:43:48.653" UserId="962" Comment="Fixed title, removed fluff, fixed capitalization, fixed formatting, made more readable" Text="I am currently contributing to a particle system for our game and developing some emitter shapes.&#xD;&#xA;&#xD;&#xA;My uniform random distribution along a line or along a rectangular area works fine - no problem.&#xD;&#xA;&#xD;&#xA;But now I would like to have something like a 1 dimensional gradient in this distribution.&#xD;&#xA;This would mean for example lower values are more common than higher values.&#xD;&#xA;&#xD;&#xA;I don't know what would be appropriate mathematical terms for this problem, so my search skills are rather useless with this one. I need something that is computationally simple, as the particle system needs to be efficient." />
  <row Id="27819" PostHistoryTypeId="4" PostId="12638" RevisionGUID="6ad1f60c-16e5-4983-b776-65a53b4fb11c" CreationDate="2011-05-23T18:43:48.653" UserId="962" Comment="Fixed title, removed fluff, fixed capitalization, fixed formatting, made more readable" Text="Weighted Random Distribution" />
  <row Id="27820" PostHistoryTypeId="2" PostId="12643" RevisionGUID="58cef411-9f4e-4f6e-9ad7-e48697255471" CreationDate="2011-05-23T19:08:26.993" UserId="7328" Text="1) i'm not sure but if you change you object from dynamic to static should do the trick, since static objects can't move even if they have some speed&#xD;&#xA;&#xD;&#xA;2) not knowing a way to tell flag &quot;i cannot move anymore&quot; but you can always check wheather the speed or at least average speed of 1 past second is less than somthing that would happen only if you spot the character or it stuck somewhere in walls." />
  <row Id="27821" PostHistoryTypeId="5" PostId="12633" RevisionGUID="14da74f9-41a6-4f78-a9d2-bc06c50bc834" CreationDate="2011-05-23T19:13:02.073" UserId="7328" Comment="added 182 characters in body" Text="i guess for some reason the first `if` statement which should be working for every tower is only working for the latest tower build, (maybe it's just an instancing problem, eg. you just create an instance for tower shape but not from the whole tower class)&#xD;&#xA;&#xD;&#xA;some new ideas : what if you just unmark slow flag whenever enemy is not near a tower (you know some if/else statement) and that is cuasing tower 2 overwrite what tower 1 flaged?&#xD;&#xA;" />
  <row Id="27822" PostHistoryTypeId="2" PostId="12644" RevisionGUID="af02a037-a52f-4f41-96f6-fb83d5e6ae46" CreationDate="2011-05-23T19:27:24.640" UserId="51" Text="Perhaps your &quot;walls&quot; should be made of 4 planes, each of which has the appropriate horizontal or vertical tags." />
  <row Id="27823" PostHistoryTypeId="2" PostId="12645" RevisionGUID="4d5ce668-686b-46f8-9dae-9ff257366806" CreationDate="2011-05-23T19:49:39.343" UserId="6558" Text="There's two major &quot;types&quot; of game testing/QA.  Publisher and developer.&#xD;&#xA;&#xD;&#xA;Publisher QA is like AttackingHobo's comment, where you're mostly sitting in front of a game in a cubicle with tons of other people around you, and you're turning the game on and off to make sure it doesn't crash.  Or you're running into every single wall to make sure there's no seams in the geometry.  And you're doing this for 12 hours straight, and getting paid $8/hour, and you better show up early tomorrow if you want to keep the job.  This is the game industry equivalent of a retail position.  Low pay, long hours, not much chance for advancement unless you're promoted to manager of the team.  It's often a temp job where you might not work for 3 months because there's no games to test.&#xD;&#xA;&#xD;&#xA;Developer QA is more in line with the automated software tester position you have now.  You work with the team who is developing the game, pointing out major bugs, being able to provide useful feedback that could impact the game, and possibly deal with build issues, or other things.  Developer QA is generally full time, salaried, and will be hired by studios like all the other jobs.  You're probably not going to find too many QA positions at small indie studios, but a &quot;larger&quot; studio might have openings.&#xD;&#xA;&#xD;&#xA;This is just a broad overview, and as always, there's going to be differences depending on your location and other things.  Josh's answer covers salary and job prospects fairly well.  Realise that the game industry is competitive, and less stable than a typical software job." />
  <row Id="27824" PostHistoryTypeId="2" PostId="12646" RevisionGUID="35acc252-3a43-426d-a1ba-b68da8ea21da" CreationDate="2011-05-23T20:48:04.697" UserId="4229" Text="I want to make a plane shape (surface) that have a gaussian blur applied to it and this plane is transperant, so all objects behind it looks like they are having a gaussian blur effect." />
  <row Id="27825" PostHistoryTypeId="1" PostId="12646" RevisionGUID="35acc252-3a43-426d-a1ba-b68da8ea21da" CreationDate="2011-05-23T20:48:04.697" UserId="4229" Text="How to make a gaussian blur effect in UDK" />
  <row Id="27826" PostHistoryTypeId="3" PostId="12646" RevisionGUID="35acc252-3a43-426d-a1ba-b68da8ea21da" CreationDate="2011-05-23T20:48:04.697" UserId="4229" Text="&lt;udk&gt;&lt;unreal&gt;&lt;blur&gt;&lt;shaders&gt;" />
  <row Id="27827" PostHistoryTypeId="2" PostId="12647" RevisionGUID="8ee1dde0-f628-4f17-9115-307bc26e2cad" CreationDate="2011-05-23T20:57:12.830" UserId="5677" Text="Sorry for the strange topic name, couldn´t think of a good way to describe it.&#xD;&#xA;I´m basically trying to achieve the following:&#xD;&#xA;&#xD;&#xA;I'm placing items randomly on the screen, but these items shouldn't be placed near eachother at a given distance. &#xD;&#xA;This is the process I have in my head right now:&#xD;&#xA;&#xD;&#xA; - generate a random location&#xD;&#xA; - check if this location is not near any other objects&#xD;&#xA; - it is near -&gt; start the process over to generate a new item (till it is not near anymore)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've run into this scenario multiple times but could never think of a way to efficiently do this, while I do feel that there is a simple way to do it. Here is the implementation I have right now. I feel like I should use a while loop but I can't get my around how to do it. &#xD;&#xA;The code is in AS3 but that shouldn't matter.&#xD;&#xA;&#xD;&#xA;    public function generatePlanetsFromXML(xml:XML):void &#xD;&#xA;		{&#xD;&#xA;			planets = new Array();&#xD;&#xA;			&#xD;&#xA;			for (var i:int = 0; i &lt; xml.projects.project.length(); i++) {&#xD;&#xA;&#xD;&#xA;				var planet:Planet = new Planet();&#xD;&#xA;				planet.data = xml.projects.project[i];&#xD;&#xA;				planet.radius = (Math.random() * 20) + 20;&#xD;&#xA;				addChild(planet);&#xD;&#xA;				addObject(planet);&#xD;&#xA;				&#xD;&#xA;				planets.push(planet);&#xD;&#xA;				&#xD;&#xA;				calculatePlanetLocation(planet, i);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function calculatePlanetLocation(planet:Planet, i:int):void &#xD;&#xA;		{&#xD;&#xA;			var randomX:int = (Math.random() * (worldwidth - planet.width)) + 20;&#xD;&#xA;			var randomY:int = (Math.random() * (worldheight - planet.height)) + 20;&#xD;&#xA;				&#xD;&#xA;				//get a location that isn't close to another planet&#xD;&#xA;				//keep looping till the distance is higher than minimum distance&#xD;&#xA;				for (var j:int = 0; j &lt; planets.length; j++) {&#xD;&#xA;					&#xD;&#xA;					if (i != j) {&#xD;&#xA;						&#xD;&#xA;						var dx:int = planets[j].x - randomX;&#xD;&#xA;						var dy:int = planets[j].y - randomY;&#xD;&#xA;						var distance:int = Math.sqrt((dx * dx) + (dy * dy));&#xD;&#xA;						&#xD;&#xA;						&#xD;&#xA;						if (distance &lt; minPlanetDistance) {&#xD;&#xA;							&#xD;&#xA;							trace(&quot;retry getting location..&quot;);&#xD;&#xA;							planet.alpha = 0.3;&#xD;&#xA;							calculatePlanetLocation(planet, i);&#xD;&#xA;							&#xD;&#xA;						}else {&#xD;&#xA;							&#xD;&#xA;							//distance is fine, planet can be placed!&#xD;&#xA;							planet.x = randomX;&#xD;&#xA;							planet.y = randomY;&#xD;&#xA;						}&#xD;&#xA;						&#xD;&#xA;						&#xD;&#xA;					}else if (i == 0) {&#xD;&#xA;						&#xD;&#xA;						//first planet should always be placed&#xD;&#xA;						planet.x = randomX;&#xD;&#xA;						planet.y = randomY;&#xD;&#xA;					}&#xD;&#xA;					&#xD;&#xA;				}&#xD;&#xA;		}" />
  <row Id="27828" PostHistoryTypeId="1" PostId="12647" RevisionGUID="8ee1dde0-f628-4f17-9115-307bc26e2cad" CreationDate="2011-05-23T20:57:12.830" UserId="5677" Text="Generating random values, keep trying till value within bounds are generated" />
  <row Id="27829" PostHistoryTypeId="3" PostId="12647" RevisionGUID="8ee1dde0-f628-4f17-9115-307bc26e2cad" CreationDate="2011-05-23T20:57:12.830" UserId="5677" Text="&lt;algorithm&gt;&lt;random&gt;&lt;generated&gt;" />
  <row Id="27830" PostHistoryTypeId="25" PostId="12638" RevisionGUID="abd1afec-809f-484d-8001-78dfc4e94144" CreationDate="2011-05-23T21:12:39.947" Comment="http://twitter.com/#!/StackGameDev/status/72771950413492224" />
  <row Id="27831" PostHistoryTypeId="2" PostId="12648" RevisionGUID="0183ebc8-f609-4715-a7cd-67a57d323114" CreationDate="2011-05-23T21:28:08.017" UserId="51" Text="As you can probably imagine, the biggest problem with that approach is that you don't have any idea how long it's going to take to populate the world.  If you're unlucky, the random number generator can make you do several times the amount of calculations than you would need to do given a strict iterative approach.&#xD;&#xA;&#xD;&#xA;One way you could work around it in this situation is by using a grid.  Maintain a list of all the valid grid coords to place a world at, and every time you place a new world you remove the coords that are no longer valid from this master list.  That way you only have to pick a random spot once since all spots you are picking from are valid.&#xD;&#xA;&#xD;&#xA;Basically, the algorithm would look something like this (in really rough pseudo code):&#xD;&#xA;&#xD;&#xA;    int[] validGridCoords = AllGridCoords();&#xD;&#xA;    &#xD;&#xA;    function PopulateUniverse()&#xD;&#xA;        for( 0..NumPlanetsRequired )&#xD;&#xA;            var CoordToPlaceAt = validGridCoords.RandomElement();&#xD;&#xA;            SpawnPlanetAt( CoordToPlaceAt );&#xD;&#xA;    &#xD;&#xA;    function SpawnPlanetAt( int coordToSpawnAt )&#xD;&#xA;        var planet = new Planet();&#xD;&#xA;        // initialize planet&#xD;&#xA;        foreach( var gridCoord in validGridCoords )&#xD;&#xA;            if( gridCoord is close to new planet )  // you could use Manhattan distance here&#xD;&#xA;                validGridCoords.Remove( gridCoord )&#xD;&#xA;" />
  <row Id="27832" PostHistoryTypeId="2" PostId="12649" RevisionGUID="a79f4ebf-0b49-4ebf-b1fa-dcfaaafdbfe3" CreationDate="2011-05-23T21:33:41.993" UserId="721" Text="Use honeycomb API. There is an option do preserve your OGL context. Otherwise, you need to reload your context. It is not difficult nor painful. " />
  <row Id="27833" PostHistoryTypeId="4" PostId="12629" RevisionGUID="3f2c25cf-4c79-45e1-b90e-d49c29d5098e" CreationDate="2011-05-23T21:44:30.813" UserId="51" Comment="edited title" Text="Workaround to losing the OpenGL context when Android pauses?" />
  <row Id="27834" PostHistoryTypeId="5" PostId="12640" RevisionGUID="519a239e-ee46-4536-b12f-0586447eeb46" CreationDate="2011-05-23T22:29:49.823" UserId="3505" Comment="added 494 characters in body" Text="I think what you ask for is the distribution achieved using a square root function.&#xD;&#xA;&#xD;&#xA;    [position] = sqrt(rand(0, 1))&#xD;&#xA;&#xD;&#xA;This will give a distribution in the single dimension field `[0, 1]` where the probability for a position is equivalent to that position, i.e. a &quot;triangular distribution&quot;.&#xD;&#xA;&#xD;&#xA;Alternate squareroot-free generation:&#xD;&#xA;&#xD;&#xA;    [position] = 1-abs(rand(0, 1)-rand(0, 1))&#xD;&#xA;&#xD;&#xA;A square root in optimal implementation is just a few multiplication and sum commands with no branches. (See: http://en.wikipedia.org/wiki/Fast_inverse_square_root). Which one of these two functions are faster may vary depending on platform and random generator. On an x86 platform for instance it would take only a few unpredictable branches in the random generator to make the second method slower." />
  <row Id="27835" PostHistoryTypeId="5" PostId="12648" RevisionGUID="ea1d1cd6-17c3-463a-a427-257a42d2e9f6" CreationDate="2011-05-23T22:50:53.637" UserId="4443" Comment="Avoiding a potential infinite loop and explicitly showing the planet using the coords to spawn at (Not sure of the format as I am not an action scripter thought)." Text="As you can probably imagine, the biggest problem with that approach is that you don't have any idea how long it's going to take to populate the world.  If you're unlucky, the random number generator can make you do several times the amount of calculations than you would need to do given a strict iterative approach.&#xD;&#xA;&#xD;&#xA;One way you could work around it in this situation is by using a grid.  Maintain a list of all the valid grid coords to place a world at, and every time you place a new world you remove the coords that are no longer valid from this master list.  That way you only have to pick a random spot once since all spots you are picking from are valid.&#xD;&#xA;&#xD;&#xA;Basically, the algorithm would look something like this (in really rough pseudo code):&#xD;&#xA;&#xD;&#xA;    int[] validGridCoords = AllGridCoords();&#xD;&#xA;    &#xD;&#xA;    function PopulateUniverse()&#xD;&#xA;        for( 0..NumPlanetsRequired )&#xD;&#xA;            if ( validGridCoords.Count &lt; 1 )&#xD;&#xA;              break for loop;&#xD;&#xA;            var CoordToPlaceAt = validGridCoords.RandomElement();&#xD;&#xA;            SpawnPlanetAt( CoordToPlaceAt );&#xD;&#xA;    &#xD;&#xA;    function SpawnPlanetAt( int coordToSpawnAt )&#xD;&#xA;        // initialize planet&#xD;&#xA;        var planet = new Planet( coordToSpawnAt );&#xD;&#xA;        foreach( var gridCoord in validGridCoords )&#xD;&#xA;            if( gridCoord is close to new planet )  // you could use Manhattan distance here&#xD;&#xA;                validGridCoords.Remove( gridCoord )&#xD;&#xA;" />
  <row Id="27836" PostHistoryTypeId="24" PostId="12648" RevisionGUID="ea1d1cd6-17c3-463a-a427-257a42d2e9f6" CreationDate="2011-05-23T22:50:53.637" Comment="Proposed by 4443 approved by 51 edit id of 441" />
  <row Id="27837" PostHistoryTypeId="2" PostId="12650" RevisionGUID="7ad54cf4-7a77-4657-87bc-0082829913c4" CreationDate="2011-05-23T22:55:40.597" UserId="7542" Text="I was designing games in unity with some friends but none of us have a mac so none of us can download the apple sdk.  To use the sdk, we will have to run a virtual machine with osx on it.  Virtualization is disabled on most PCs by default and I was wondering if there was any way to change that without rebooting into the bios.  If not, how would I change it in the bios?  Thanks for your help." />
  <row Id="27838" PostHistoryTypeId="1" PostId="12650" RevisionGUID="7ad54cf4-7a77-4657-87bc-0082829913c4" CreationDate="2011-05-23T22:55:40.597" UserId="7542" Text="Enabling virtualization on a PC" />
  <row Id="27839" PostHistoryTypeId="3" PostId="12650" RevisionGUID="7ad54cf4-7a77-4657-87bc-0082829913c4" CreationDate="2011-05-23T22:55:40.597" UserId="7542" Text="&lt;ios&gt;&lt;virtual-machines&gt;" />
  <row Id="27840" PostHistoryTypeId="2" PostId="12651" RevisionGUID="7fab6804-8acc-48c0-9d65-2177c0d48484" CreationDate="2011-05-23T23:30:47.847" UserId="6813" Text="You can't run &quot;legally&quot; OSX on a virtual machine. Apple grant licenses for their stuff only.&#xD;&#xA;&#xD;&#xA;But there is some way to do it using **Virtual Box** or **VMWare** and a slightly modified version of osx...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For more informations, here is a StackOverflow link,&lt;br&gt;&#xD;&#xA;**Is it possible to run OSX in a virtual machine?**:&lt;br&gt;&#xD;&#xA;http://stackoverflow.com/questions/39159/is-it-possible-to-run-osx-in-a-virtual-machine" />
  <row Id="27841" PostHistoryTypeId="5" PostId="12651" RevisionGUID="e6515a71-be7c-4555-8611-9744e84c5ebe" CreationDate="2011-05-23T23:36:58.223" UserId="6813" Comment="added 70 characters in body; added 80 characters in body" Text="You can't run &quot;legally&quot; OSX on a virtual machine. In fact, Apple grant licenses for their stuff only, so you can't run OSX on a non Apple computer, even if it is virtually.&#xD;&#xA;&#xD;&#xA;But there is some way to do it using **Virtual Box** or **VMWare** and a slightly modified version of osx...&#xD;&#xA;&#xD;&#xA;- Virtual Box: http://www.virtualbox.org/&#xD;&#xA;- VMWare: http://www.vmware.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For more informations, see this StackOverflow link, &quot;**Is it possible to run OSX in a virtual machine?**&quot;: http://stackoverflow.com/questions/39159/is-it-possible-to-run-osx-in-a-virtual-machine" />
  <row Id="27842" PostHistoryTypeId="2" PostId="12652" RevisionGUID="7df84911-6a2f-42ee-8ea4-bce0072cc603" CreationDate="2011-05-23T23:44:02.203" UserId="2472" Text="A longer explanation:&#xD;&#xA;&#xD;&#xA;If you have a desired [probability distribution][1] such as the gradient didito asked for, you can describe is as a function. Let's say you want a triangular distribution, where the probability at 0 is 0.0, and you want to pick a random number from 0 to 1.  We might write it as y = x.&#xD;&#xA;&#xD;&#xA;The next step is to calculate the integral of this function. In this case, it's ∫x = ½x². Evaluated from 0 to 1, that's ½.  That makes sense — it's a triangle with base 1 and height 1, so its area is ½.&#xD;&#xA;&#xD;&#xA;You then pick a random point uniformly from 0 to the area (½ in our example).  Let's call this z.  (We're picking uniformly from the [cumulative distribution][2].)&#xD;&#xA;&#xD;&#xA;The next step is to go backwards, to find what value of x (we'll call it x̂) corresponds to an area of z.  We're looking for ∫x = ½x², evaluated from 0 to x̂, being equal to z.  When you solve for ½x̂² = z, you get x̂ = sqrt(2z).&#xD;&#xA;&#xD;&#xA;In this example, you pick z from 0 to ½ and then the desired random number is sqrt(2z).  Simplified, you can write it as sqrt(rand(0, 1)) — exactly what eBusiness recommended.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Probability_density_function&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Cumulative_distribution_function" />
  <row Id="27843" PostHistoryTypeId="25" PostId="12647" RevisionGUID="9cfcf3da-3730-4e8f-9f25-c55e7524487d" CreationDate="2011-05-24T00:12:39.887" Comment="http://twitter.com/#!/StackGameDev/status/72817248884105216" />
  <row Id="27844" PostHistoryTypeId="2" PostId="12653" RevisionGUID="e5ffafc1-a913-4ea8-829b-c520e28bbc18" CreationDate="2011-05-24T02:32:34.783" UserId="7546" Text="I want to learn the basic concepts like collision detection, rendering and others in a general way (keeping the library usage minimum). I believe that once my basic concepts are clear, it would help me in learning different libraries easily, like OpenGL, etc. &#xD;&#xA;&#xD;&#xA;I know without libraries it will take long time to build things. I am doing this for learning so I don't care about productivity. &#xD;&#xA;" />
  <row Id="27845" PostHistoryTypeId="1" PostId="12653" RevisionGUID="e5ffafc1-a913-4ea8-829b-c520e28bbc18" CreationDate="2011-05-24T02:32:34.783" UserId="7546" Text="How to begin with game development using basic concepts?" />
  <row Id="27846" PostHistoryTypeId="3" PostId="12653" RevisionGUID="e5ffafc1-a913-4ea8-829b-c520e28bbc18" CreationDate="2011-05-24T02:32:34.783" UserId="7546" Text="&lt;game-design&gt;" />
  <row Id="27847" PostHistoryTypeId="2" PostId="12654" RevisionGUID="45c473ef-4afd-4489-9b1f-0112a6d488f6" CreationDate="2011-05-24T03:00:22.507" UserId="7547" Text="You should care about productivity.  I can guess that if you intend to do everything yourself you're looking at at least two years to develop this, you will slack off and walk away and your alleged game will never get made.&#xD;&#xA;&#xD;&#xA;Learning how to use an API is an invaluable skill and by using someone else's work - especially an open-source library - you can spend more time developing your game than building the underlying components necessary to implement it.&#xD;&#xA;&#xD;&#xA;As for answering your question, you need the mathematical background of the concept of &quot;slope-intercept&quot; to understand collisions.  I don't have the mathematical background; I just use a physics package where someone who is better than this than I am has already done the math.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27848" PostHistoryTypeId="10" PostId="12650" RevisionGUID="bb511a46-be7c-4717-8f7d-66150b5519fe" CreationDate="2011-05-24T03:02:58.413" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="27849" PostHistoryTypeId="2" PostId="12655" RevisionGUID="e01d1a9c-ef5e-487f-9e17-3e9849542f12" CreationDate="2011-05-24T03:07:45.563" UserId="6813" Text="I would recommend practicing a lot of experiments AND reading good resources on the subject.&#xD;&#xA;&#xD;&#xA;- **Books**: A good starting book about game mechanics is [Game Engine Architecture][1], and [Game Coding Complete][2] is another.&#xD;&#xA;&#xD;&#xA;- **Blogs**: You can find some real great articles on [game development blogs][3]&#xD;&#xA;&#xD;&#xA;- **Portals**: And there is some nice portals dedicated to game development which offers incredibly useful articles, such as [Gamasutra][4], [GameDev][5] or [DevMaster][6]&#xD;&#xA;&#xD;&#xA;However, there is a lot of great resources to read (while practicing) and I couldn't list them all. But there is some questions about this subject [here on gamedev.stackexchange.com][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Beside this, I'm following the path you decided to follow (no lib/all by myself). And I can confirm that this is a very long and hard path, but it's very interesting and rewarding (well not with money trough). I work on my first game since 2 years, and it won't be done before the end of the year, but I learned and still learn tons of useful things for the next one (and this one), even if I was already developing since 10 years.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gameenginebook.com/&#xD;&#xA;[2]: http://www.mcshaffry.com/GameCode/&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/3223/game-development-blogs&#xD;&#xA;[4]: http://www.gamasutra.com/&#xD;&#xA;[5]: http://www.gamedev.net&#xD;&#xA;[6]: http://www.devmaster.net/&#xD;&#xA;[7]: http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games" />
  <row Id="27850" PostHistoryTypeId="5" PostId="12653" RevisionGUID="9fc9a7d7-9761-4384-9523-23929431e8c7" CreationDate="2011-05-24T03:11:26.637" UserId="7546" Comment="Added more info" Text="I want to learn the basic concepts like collision detection, rendering and others in a general way (keeping the library usage minimum). I believe that once my basic concepts are clear, it would help me in learning different libraries easily, like OpenGL, etc.&#xD;&#xA;&#xD;&#xA;I know without libraries it will take long time to build things. I am doing this for learning so I don't care about productivity.&#xD;&#xA;&#xD;&#xA;I would love if the solution is using JavaScript (HTML5 Canvas) or C/C++ (DOS mode) since I believe I will have to deal with a bit of low level stuff which would help me in learning. Other solutions are also welcome. I know Java as well.&#xD;&#xA;&#xD;&#xA;Note: 2D games are sufficient for me." />
  <row Id="27851" PostHistoryTypeId="25" PostId="12653" RevisionGUID="d55f57af-e720-4699-9bc1-5f79c0594589" CreationDate="2011-05-24T03:12:40.477" Comment="http://twitter.com/#!/StackGameDev/status/72862549942607872" />
  <row Id="27852" PostHistoryTypeId="6" PostId="12653" RevisionGUID="1c5e34ba-1b66-49f5-9078-505db55b7d7e" CreationDate="2011-05-24T03:14:47.977" UserId="51" Comment="edited tags" Text="&lt;learning&gt;" />
  <row Id="27853" PostHistoryTypeId="5" PostId="12655" RevisionGUID="e7d6023f-4ab6-49c3-87c7-b8c8eaeb5c20" CreationDate="2011-05-24T03:16:00.510" UserId="6813" Comment="added 50 characters in body; added 12 characters in body" Text="I would recommend practicing a lot of experiments AND reading good resources on the subject.&#xD;&#xA;&#xD;&#xA;- **Books**: A good starting book about game mechanics is [Game Engine Architecture][1], and [Game Coding Complete][2] is another *must read*.&#xD;&#xA;&#xD;&#xA;- **Blogs**: You can find some real great articles on [game development blogs][3]&#xD;&#xA;&#xD;&#xA;- **Portals**: And there is some nice portals dedicated to game development which offers incredibly useful articles, such as [Gamasutra][4], [GameDev][5] or [DevMaster][6]&#xD;&#xA;&#xD;&#xA;However, there is a lot of great resources to read (while practicing) and I couldn't list them all. But there is some questions about this subject [here on gamedev.stackexchange.com][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;*Beside this, I'm following the path you decided to follow (no lib/all by myself). And I can confirm that this is a very long and hard path, but it's very interesting and rewarding (well not with money trough). I already spent 2 years at full time to work on my first game, and it won't be done before the end of this year, but I learned and still learn tons of useful things for the next one (and this one) even if I was already developing (outside game industry) since 10 years.*&#xD;&#xA;&#xD;&#xA;[1]: http://www.gameenginebook.com/&#xD;&#xA;[2]: http://www.mcshaffry.com/GameCode/&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/3223/game-development-blogs&#xD;&#xA;[4]: http://www.gamasutra.com/&#xD;&#xA;[5]: http://www.gamedev.net&#xD;&#xA;[6]: http://www.devmaster.net/&#xD;&#xA;[7]: http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games" />
  <row Id="27854" PostHistoryTypeId="5" PostId="12655" RevisionGUID="09ddc8c8-852d-4a8b-b08f-0da68a7f7045" CreationDate="2011-05-24T03:31:09.797" UserId="6813" Comment="deleted 499 characters in body" Text="I would recommend practicing a lot of experiments AND reading good resources on the subject.&#xD;&#xA;&#xD;&#xA;- **Books**: A good starting book about game mechanics is [Game Engine Architecture][1], and [Game Coding Complete][2] is another *must read*.&#xD;&#xA;&#xD;&#xA;- **Blogs**: You can find some real great articles on [game development blogs][3]&#xD;&#xA;&#xD;&#xA;- **Portals**: And there is some nice portals dedicated to game development which offers incredibly useful articles, such as [Gamasutra][4], [GameDev][5] or [DevMaster][6]&#xD;&#xA;&#xD;&#xA;However, there is a lot of great resources to read (while practicing) and I couldn't list them all. But there is some questions about this subject [here on gamedev.stackexchange.com][7]&#xD;&#xA;&#xD;&#xA;[1]: http://www.gameenginebook.com/&#xD;&#xA;[2]: http://www.mcshaffry.com/GameCode/&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/3223/game-development-blogs&#xD;&#xA;[4]: http://www.gamasutra.com/&#xD;&#xA;[5]: http://www.gamedev.net&#xD;&#xA;[6]: http://www.devmaster.net/&#xD;&#xA;[7]: http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games" />
  <row Id="27855" PostHistoryTypeId="2" PostId="12656" RevisionGUID="a3fea2cf-39f7-4e60-be96-d3ee990c3acb" CreationDate="2011-05-24T03:40:54.610" UserId="7384" Text="Your solution is fine provided that you never end up placing so many planets that the number of valid locations falls to, say, below 10% of the locations (which is very very dense.)&#xD;&#xA;&#xD;&#xA;Let's figure out how many operations you will end up doing to place a planet given&#xD;&#xA;&#xD;&#xA; - `x` planets already placed&#xD;&#xA; - `p` the probability that a randomly chosen location is valid.&#xD;&#xA;&#xD;&#xA;Then, the number of retries is geometrically distributed with probability `p`, and therefore the expected number of operations is `1/p`.&#xD;&#xA;&#xD;&#xA;So, if you keep `p` above 10%, you expect no more than `10x` operations on average for each planet, or `10x^2` in total.&#xD;&#xA;&#xD;&#xA;One optimization you can make is to keep the planets sorted by radius, and check in that order.  The sorting cost will be offset by the savings from being able to stop early." />
  <row Id="27856" PostHistoryTypeId="2" PostId="12657" RevisionGUID="45c1fc4e-f25f-4779-b68e-a5bb57867fb7" CreationDate="2011-05-24T03:44:24.453" UserId="7384" Text="Just use a Beta distribution:&#xD;&#xA;&#xD;&#xA; - Beta(1,1) is flat&#xD;&#xA; - Beta(1,2) is a linear gradient&#xD;&#xA; - Beta(1,3) is quadratic&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;The two shape parameters need not be integers." />
  <row Id="27857" PostHistoryTypeId="5" PostId="12641" RevisionGUID="424ca3c9-056f-4cf0-86b9-0f57969e70f0" CreationDate="2011-05-24T03:46:25.490" UserId="7548" Comment="Spelling corrections." Text="The term you are looking for is `Weighted Random Numbers`, most of the algorithms I have seen use trig functions, but I think I figured out a way that will be efficient:&#xD;&#xA;&#xD;&#xA;Create a table/array/List(whatever) that holds a multiplier value for the random function. Fill it out by hand or programatically...&#xD;&#xA;&#xD;&#xA;    randMulti= {.1,.1,.1,.1,.1,.1,.2,.2,.3,.3,.9,1,1,1,} &#xD;&#xA;&#xD;&#xA;...then Multiply `random` by a randomly chosen `randMulti`and finally by the max Value of the distribution...&#xD;&#xA;&#xD;&#xA;    weightedRandom = math.random()*randMulti[Math.random(randMulti.length)]*maxValue&#xD;&#xA;&#xD;&#xA;I do believe that this will be much faster than using `sqrt`, or other more computationally complex functions, and will allow for more custom grouping patterns." />
  <row Id="27858" PostHistoryTypeId="24" PostId="12641" RevisionGUID="424ca3c9-056f-4cf0-86b9-0f57969e70f0" CreationDate="2011-05-24T03:46:25.490" Comment="Proposed by 7548 approved by 51 edit id of 442" />
  <row Id="27859" PostHistoryTypeId="5" PostId="12649" RevisionGUID="a8f849fa-5fae-4d5f-ad7f-b5170d65cbd3" CreationDate="2011-05-24T06:01:02.633" UserId="721" Comment="added 205 characters in body; added 220 characters in body" Text="Use honeycomb API. There is an option do preserve your OGL context. Otherwise, you need to reload your context. It is not difficult nor painful.&#xD;&#xA;&#xD;&#xA;You need to understand that there is a two cases (Android 2.1):&#xD;&#xA;&#xD;&#xA; - Screen Pause: your application is always the front one =&gt; hack available&#xD;&#xA; - Application Pause: there is another front application  =&gt; No Solution&#xD;&#xA;&#xD;&#xA;Note: old android gpus don't support multi context. So the opengl context is lost when you switch to another application =&gt; no solution available (You can hack to preserve your context on screen pause)." />
  <row Id="27860" PostHistoryTypeId="25" PostId="12629" RevisionGUID="7659d61f-ee64-4327-8f1f-9f280a498026" CreationDate="2011-05-24T06:12:42.370" Comment="http://twitter.com/#!/StackGameDev/status/72907856000720896" />
  <row Id="27861" PostHistoryTypeId="2" PostId="12658" RevisionGUID="3361e9b4-5892-4014-8923-9682185bf9ea" CreationDate="2011-05-24T06:39:15.560" UserId="7141" Text="I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real animated character.&#xD;&#xA;&#xD;&#xA;I downloaded a free sprite sheet it has 12 (3x4) character sprites.&#xD;&#xA;&#xD;&#xA;What is the general reasoning to animate the character?&#xD;&#xA;&#xD;&#xA;I see why having all the character animations in one file can be useful but I don't understand how it would be done. I don't want code or anything, I just want to know how you normally use the sprite sheet to animate a character so I code it afterwards.&#xD;&#xA;" />
  <row Id="27862" PostHistoryTypeId="1" PostId="12658" RevisionGUID="3361e9b4-5892-4014-8923-9682185bf9ea" CreationDate="2011-05-24T06:39:15.560" UserId="7141" Text="How to animate a character sprite sheet?" />
  <row Id="27863" PostHistoryTypeId="3" PostId="12658" RevisionGUID="3361e9b4-5892-4014-8923-9682185bf9ea" CreationDate="2011-05-24T06:39:15.560" UserId="7141" Text="&lt;sprites&gt;&lt;character&gt;&lt;spritesheet&gt;" />
  <row Id="27864" PostHistoryTypeId="2" PostId="12659" RevisionGUID="7e3312bd-a20e-485f-aff7-b6d3d9682ea2" CreationDate="2011-05-24T07:13:21.550" UserId="20" Text="The answer to **why** to use a sprite-sheet has already been answered in this [question][1].&#xD;&#xA;&#xD;&#xA;How you use a sprite-sheet in your game is quite simple. Usually you have a class that keeps track of the elapsed time and displays another frame once a given threshold has been reached (eg. if *1/25th* of a second has passed or similar).&#xD;&#xA;&#xD;&#xA;How to display a new frame depends on your underlying graphics API. You might have to copy the new pixel data to a pixel-buffer, or modify UV coordinates of a quad, so that it shows another portion of the sprite-sheet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7069/2d-graphics-why-use-spritesheets" />
  <row Id="27865" PostHistoryTypeId="2" PostId="12660" RevisionGUID="47538efe-504b-43bd-b5d8-84f3994469aa" CreationDate="2011-05-24T08:05:45.707" UserId="2710" Text="Take a look at this picture:&#xD;&#xA;&#xD;&#xA;![Curve mapping][1]&#xD;&#xA;&#xD;&#xA;It shows the process of mapping a (random) value to a curve. Suppose you generate a uniformly-distributed random value X, ranging from 0 to 1. By mapping this value to a curve - or, in other words, using f(X) instead of X - you can skew your distribution in whatever way you like.&#xD;&#xA;&#xD;&#xA;In this picture, first curve makes higher values more likely; second makes lower values more likely; and the third one makes values cluster in the middle. The exact formula of the curve is not really important, and can be chosen as you like.&#xD;&#xA;&#xD;&#xA;For example, first curve looks a bit like square root, and second - like square. Third one is a bit like cube, only translated. If you consider square root to be too slow, first curve also looks like f(X)=1-(1-X)^2 - an inversion of square. Or a hyperbole: f(X)=2X/(1+X).&#xD;&#xA;&#xD;&#xA;As a fourth curve shows, you can simply use a precomputed lookup table. Is looks ugly as a curve, but will probably be good enough for a particle system.&#xD;&#xA;&#xD;&#xA;This general technique is very simple and powerful. Whatever distribution you need, just imagine a curve mapping, and you'll devise a formula in no time. Or, if your engine has an editor, just make a visual editor for the curve!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/x7UYk.png" />
  <row Id="27866" PostHistoryTypeId="2" PostId="12661" RevisionGUID="a851cd45-19cb-4ee2-9dcb-fc896fb0a655" CreationDate="2011-05-24T08:37:19.000" UserId="6210" Text="Usually, to animate a sprite, you have to keep track of three things: time of course to handle animation speed, current animation (which can be the 'line' in an unoptimized sheet) and current frame in animation (which can be the 'column' in an unoptimized sheet).&#xD;&#xA;&#xD;&#xA;Depending on your needs, you might also have a variable 'hotspot' which is the reference point from which the sprite will be drawn. This is useful especially for human character walk and run animations, to avoid 'sliding' effects.&#xD;&#xA;&#xD;&#xA;Now, to actually draw your sprite, you want to draw only a region of your sprite sheet, which will be either computed (x = current frame * frame width, y = current animation * frame height), or stored in some data structure created by a tool. &#xD;&#xA;&#xD;&#xA;Anyway, at this point, you should have a mapping from state (animation + frame) to a rectangle in your sheet. Depending on your technology stack, you might draw a clipped version of the image (GDI+, Java, etc...) or texture a quad with the proper UVs (OpenGL, ...), or use SpriteBatch with a source Rectangle (XNA)." />
  <row Id="27867" PostHistoryTypeId="2" PostId="12662" RevisionGUID="b23ed1b8-e028-4617-aca4-ab1979426e7d" CreationDate="2011-05-24T09:11:45.530" UserId="18" Text="Replica Island has a [modified version](http://code.google.com/p/replicaisland/source/browse/trunk/src/com/replica/replicaisland/GLSurfaceView.java) of GLSurfaceView that deals with this issue (and works with earlier Android versions). According to [Chris Pruett](https://groups.google.com/group/replica-island-coding-community/browse_thread/thread/45bf454a3ee25136/b9dc4e26fc127d50):&#xD;&#xA;&#xD;&#xA;&gt; Basically, I hacked up the original&#xD;&#xA;&gt; GLSurfaceView to solve a very specific&#xD;&#xA;&gt; problem: I wanted to go to different&#xD;&#xA;&gt; Activities within my app without&#xD;&#xA;&gt; throwing all of my OpenGL state away. &#xD;&#xA;&gt; The major change was to separate the&#xD;&#xA;&gt; EGLSurface from the EGLContext, and to&#xD;&#xA;&gt; throw the former away onPause(), but&#xD;&#xA;&gt; preserve the latter until the context&#xD;&#xA;&gt; is explicitly lost.  The default&#xD;&#xA;&gt; implementation of GLSurfaceView (which&#xD;&#xA;&gt; I didn't write, by the way), throws&#xD;&#xA;&gt; all GL state away when the activity is&#xD;&#xA;&gt; paused, and calls onSurfaceCreated()&#xD;&#xA;&gt; when it is resumed.  That meant that,&#xD;&#xA;&gt; when a dialog box popped up in my&#xD;&#xA;&gt; game, closing it incurred a delay&#xD;&#xA;&gt; because all the textures had to be&#xD;&#xA;&gt; reloaded.&#xD;&#xA;&gt; &#xD;&#xA;&gt; You should use the default&#xD;&#xA;&gt; GLSurfaceView.  If you must have the&#xD;&#xA;&gt; same functionality that mine has, you&#xD;&#xA;&gt; can look at mine.  But doing what I&#xD;&#xA;&gt; did exposed all sorts of awful driver&#xD;&#xA;&gt; bugs in some handsets (see the very&#xD;&#xA;&gt; long comments near the end of that&#xD;&#xA;&gt; file), and you can avoid all that mess&#xD;&#xA;&gt; by just using the default one.&#xD;&#xA;&#xD;&#xA;Edit: I just realized you already posted the link to a similar hack. I don't think there is any built-in solution prior to honeycomb. Replica Island is a popular game working on many devices and you might find Chris's implementation and comments helpful." />
  <row Id="27868" PostHistoryTypeId="12" PostId="12662" RevisionGUID="76bf78b7-c7e3-4640-a81d-9cdc9d53b5ea" CreationDate="2011-05-24T09:12:14.783" UserId="18" Text="[{&quot;Id&quot;:18,&quot;DisplayName&quot;:&quot;Firas Assaad&quot;}]" />
  <row Id="27869" PostHistoryTypeId="25" PostId="12658" RevisionGUID="0fd0aa36-13d9-403e-bb0f-3e6f8f916805" CreationDate="2011-05-24T09:12:43.470" Comment="http://twitter.com/#!/StackGameDev/status/72953159366082560" />
  <row Id="27870" PostHistoryTypeId="13" PostId="12662" RevisionGUID="73bec35e-3056-4cca-a9ea-b35670020b3a" CreationDate="2011-05-24T09:16:08.763" UserId="18" Text="[{&quot;Id&quot;:18,&quot;DisplayName&quot;:&quot;Firas Assaad&quot;}]" />
  <row Id="27871" PostHistoryTypeId="2" PostId="12663" RevisionGUID="b2d61730-4a8f-47df-a1ed-61deb1558d98" CreationDate="2011-05-24T09:48:41.723" UserId="7096" Text="Its a 2D platformer side scroller game,i am giving high impulse to player, the player starts moving and if it hits a slope on terrain, it gets a vertical movement and starts to fly over ( Box2D physics). What i need is , the player should always be on the terrain and move along the terrain.&#xD;&#xA;&#xD;&#xA;I would like to know if its possible using Box2D engine.&#xD;&#xA;&#xD;&#xA;Thanks in Advance." />
  <row Id="27872" PostHistoryTypeId="1" PostId="12663" RevisionGUID="b2d61730-4a8f-47df-a1ed-61deb1558d98" CreationDate="2011-05-24T09:48:41.723" UserId="7096" Text="Make player to always move along the terrain." />
  <row Id="27873" PostHistoryTypeId="3" PostId="12663" RevisionGUID="b2d61730-4a8f-47df-a1ed-61deb1558d98" CreationDate="2011-05-24T09:48:41.723" UserId="7096" Text="&lt;box2d&gt;" />
  <row Id="27874" PostHistoryTypeId="2" PostId="12664" RevisionGUID="b2893887-061c-457b-b941-690c558d0d3d" CreationDate="2011-05-24T10:33:56.490" UserId="7168" Text="I have been attempting to make a game engine in C++ and have come across the dilemma of game state management...i have done a lot of research and found numerous ways of accomplishing from game engine with derived classes...to enums...I would like to no the most effective/efficient way of managing game states.&#xD;&#xA;(im using C++ and opengl)&#xD;&#xA;" />
  <row Id="27875" PostHistoryTypeId="1" PostId="12664" RevisionGUID="b2893887-061c-457b-b941-690c558d0d3d" CreationDate="2011-05-24T10:33:56.490" UserId="7168" Text="C++ GameState management" />
  <row Id="27876" PostHistoryTypeId="3" PostId="12664" RevisionGUID="b2893887-061c-457b-b941-690c558d0d3d" CreationDate="2011-05-24T10:33:56.490" UserId="7168" Text="&lt;game-design&gt;&lt;c++&gt;&lt;gameloop&gt;" />
  <row Id="27877" PostHistoryTypeId="6" PostId="12664" RevisionGUID="bb2ec336-d858-4619-a6a3-39cd329b2810" CreationDate="2011-05-24T10:41:55.463" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;gameloop&gt;&lt;state&gt;" />
  <row Id="27878" PostHistoryTypeId="2" PostId="12665" RevisionGUID="321ab6fe-cb14-48a8-aa18-50912d7d957d" CreationDate="2011-05-24T10:51:32.813" UserId="1156" Text="I think you've got two different things going on here. You want to learn, and I am assuming you mean 'learn to develop games'.&#xD;&#xA;&#xD;&#xA;If so, you are going to hinder yourself by trying to avoid libraries. There's two probable scenarios I can make up:&#xD;&#xA;&#xD;&#xA;***Using libraries***&#xD;&#xA;&#xD;&#xA; - You'll start off with most of it done for you. &#xD;&#xA; - You actually will finish games much faster. You may not care about them, but you are so much more likely to keep going if you've got something done.&#xD;&#xA; - You'll therefore learn at a high level. You will know how to organise your collision code and your rendering code, even if you aren't organising the vertex buffers.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA; - You'll become more used to what the functions and classes do under the hood, either by learning about them or generally by practice.&#xD;&#xA; - Now you can go back and write your own collision testing and OpenGL engine and know what you're doing - since you understand, it will work and you will learn.&#xD;&#xA;&#xD;&#xA;***Not using libraries (jumping in)***&#xD;&#xA;&#xD;&#xA; - You'll have little idea of what you're actually doing.&#xD;&#xA;&#xD;&#xA; - You can learn from the examples, but it's very likely you'll just go 'oh, that works but I don't know why'.&#xD;&#xA;&#xD;&#xA; - You will not learn to structure and fit everything together so easily, since your focus is building each component separately.&#xD;&#xA;&#xD;&#xA; - Overall, you are likely to lose motivation and give up..or at least act slower than the other method.&#xD;&#xA;&#xD;&#xA;An analogy is collecting and painting model figures. Using libraries is equivalent to getting mostly done figurines for you, or ones with few pieces and learning to paint them. Not using libraries is like trying to sculpt your own from a reference.&#xD;&#xA;&#xD;&#xA;As for libraries (you say 2D), I would check out [SDL][1] which is older, mature, has a wide userbase but written in C, or [SFML][2] which is newer and as such less mature, but uses OpenGL (hardware acceleration) and is, in my opinion, better structured in terms of API.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.sfml-dev.org/" />
  <row Id="27879" PostHistoryTypeId="2" PostId="12666" RevisionGUID="95e1d5ba-c46e-4a09-bfcb-c35f1075c6dd" CreationDate="2011-05-24T11:03:47.340" UserId="1839" Text="Here are 2:&#xD;&#xA;&#xD;&#xA;  1. [Sony's vectormath][1]&#xD;&#xA;  2. [Bullet's Linearmath][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/Extras/vectormathlibrary/&#xD;&#xA;  [2]: http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/src/LinearMath/" />
  <row Id="27880" PostHistoryTypeId="2" PostId="12667" RevisionGUID="8c4f4199-73bc-4f00-a1f2-675536b0a4c5" CreationDate="2011-05-24T11:27:02.140" UserId="7514" Text="I'm not sure if i perfectly get the problem here, nor have i used Box2d. Actually... if its for flash i might have...&#xD;&#xA;&#xD;&#xA;But anyway, try calculating the direction the player is to the terrain (if the terrain is within 10 pixels say), and move it closer to the terrain if possible.&#xD;&#xA;&#xD;&#xA;Of course this isn't a full proof method, and you might want to only do this if you have first checked that the player was actually running in a recent step.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sorry if i didn't answer the question 100%. More detail could be good." />
  <row Id="27881" PostHistoryTypeId="2" PostId="12668" RevisionGUID="e620f553-7b23-441b-98e8-c87378d23e23" CreationDate="2011-05-24T11:51:07.527" UserId="1141" Text="Two possible solutions I can think of:&#xD;&#xA;&#xD;&#xA;1. Don't apply physics to the player character. Unless they jump or fall, I guess - not sure if this is possible in your game.&#xD;&#xA;&#xD;&#xA;2. Add a lot of &quot;fake gravity&quot; (a force pointing down) to the player character only. It won't make him move along the terrain *perfectly*, but it might be close enough. Again, this force shouldn't be applied when the character is *supposed* to be jumping or falling." />
  <row Id="27882" PostHistoryTypeId="2" PostId="12669" RevisionGUID="22b4cf73-d160-41fc-a85a-581030002fc1" CreationDate="2011-05-24T11:54:18.790" UserId="7514" Text="I am working on a project where a world consists of a large quantity of cubes (i would give you a number, but it is user defined worlds). My test one is around (48 x 32 x 48) blocks.&#xD;&#xA;&#xD;&#xA;Basically these blocks don't do anything in themselves. They just sit there.&#xD;&#xA;&#xD;&#xA;They start being used when it comes to player interaction.&#xD;&#xA;&#xD;&#xA;I need to check what cubes the users mouse interacts with (mouse over, clicking, etc.), and for collision detecting as the player moves.&#xD;&#xA;&#xD;&#xA;Now i had a massive amount of lag at first, looping through every block.&#xD;&#xA;&#xD;&#xA;I have managed to decrease that lag, by looping through all the blocks, and finding which blocks are within a particular range of the character, and then only looping through those blocks for the collision detection, etc.&#xD;&#xA;&#xD;&#xA;However, i am still going at a depressing 2fps.&#xD;&#xA;&#xD;&#xA;Does anyone have any other ideas on how i could decrease this lag?&#xD;&#xA;&#xD;&#xA;Btw, i am using XNA (C#) and yes, it is 3d." />
  <row Id="27883" PostHistoryTypeId="1" PostId="12669" RevisionGUID="22b4cf73-d160-41fc-a85a-581030002fc1" CreationDate="2011-05-24T11:54:18.790" UserId="7514" Text="Working with lots of cubes. Decreasing lag?" />
  <row Id="27884" PostHistoryTypeId="3" PostId="12669" RevisionGUID="22b4cf73-d160-41fc-a85a-581030002fc1" CreationDate="2011-05-24T11:54:18.790" UserId="7514" Text="&lt;xna&gt;&lt;3d&gt;&lt;frame-rate&gt;" />
  <row Id="27885" PostHistoryTypeId="25" PostId="12663" RevisionGUID="c37c87f9-ede3-4de5-bdf5-8bff3b7cb72b" CreationDate="2011-05-24T12:12:44.210" Comment="http://twitter.com/#!/StackGameDev/status/72998460353294337" />
  <row Id="27886" PostHistoryTypeId="6" PostId="12669" RevisionGUID="34fe247a-7d3a-4abb-8c3d-083cafc1e577" CreationDate="2011-05-24T12:18:34.337" UserId="1156" Comment="edited tags; edited title" Text="&lt;xna&gt;&lt;3d&gt;&lt;frame-rate&gt;&lt;voxels&gt;" />
  <row Id="27887" PostHistoryTypeId="4" PostId="12669" RevisionGUID="34fe247a-7d3a-4abb-8c3d-083cafc1e577" CreationDate="2011-05-24T12:18:34.337" UserId="1156" Comment="edited tags; edited title" Text="Working with lots of cubes. Decreasing lag in a voxel game?" />
  <row Id="27888" PostHistoryTypeId="5" PostId="12669" RevisionGUID="a5d5309c-b9f4-4809-bc4b-b5e8e832e492" CreationDate="2011-05-24T12:20:03.457" UserId="7514" Comment="added 237 characters in body; edited title" Text="**Edit:** To sum the question up, i have a voxel based world (Minecraft style (Thanks Communist Duck)) which is causing large amounts of lag. I am not positive on the source but would like any possible advice on how to get rid of it.&#xD;&#xA;&#xD;&#xA;I am working on a project where a world consists of a large quantity of cubes (i would give you a number, but it is user defined worlds). My test one is around (48 x 32 x 48) blocks.&#xD;&#xA;&#xD;&#xA;Basically these blocks don't do anything in themselves. They just sit there.&#xD;&#xA;&#xD;&#xA;They start being used when it comes to player interaction.&#xD;&#xA;&#xD;&#xA;I need to check what cubes the users mouse interacts with (mouse over, clicking, etc.), and for collision detecting as the player moves.&#xD;&#xA;&#xD;&#xA;Now i had a massive amount of lag at first, looping through every block.&#xD;&#xA;&#xD;&#xA;I have managed to decrease that lag, by looping through all the blocks, and finding which blocks are within a particular range of the character, and then only looping through those blocks for the collision detection, etc.&#xD;&#xA;&#xD;&#xA;However, i am still going at a depressing 2fps.&#xD;&#xA;&#xD;&#xA;Does anyone have any other ideas on how i could decrease this lag?&#xD;&#xA;&#xD;&#xA;Btw, i am using XNA (C#) and yes, it is 3d." />
  <row Id="27889" PostHistoryTypeId="4" PostId="12669" RevisionGUID="a5d5309c-b9f4-4809-bc4b-b5e8e832e492" CreationDate="2011-05-24T12:20:03.457" UserId="7514" Comment="added 237 characters in body; edited title" Text="Working with lots of cubes. Decreasing lag?" />
  <row Id="27890" PostHistoryTypeId="2" PostId="12670" RevisionGUID="3408f44d-0fc1-4a86-bf70-e2285921043b" CreationDate="2011-05-24T12:24:22.170" UserId="6894" Text="In my tower defense game and every tile has its own mouse event listener. I am wondering, would it be better to use one event listener (MouseEvent.CLICK) and then when it runs the function, should I just use evt.target to determine what was clicked, and then run an appropriate function?&#xD;&#xA;&#xD;&#xA;I am programming the game for web and phone and I started to notice some lag on my phone so I am trying to optimize my code. Any other tips to speed up code would help too." />
  <row Id="27891" PostHistoryTypeId="1" PostId="12670" RevisionGUID="3408f44d-0fc1-4a86-bf70-e2285921043b" CreationDate="2011-05-24T12:24:22.170" UserId="6894" Text="Flash AS3 Tower Defense MouseEvents" />
  <row Id="27892" PostHistoryTypeId="3" PostId="12670" RevisionGUID="3408f44d-0fc1-4a86-bf70-e2285921043b" CreationDate="2011-05-24T12:24:22.170" UserId="6894" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;optimization&gt;&lt;events&gt;&lt;tower-defense&gt;" />
  <row Id="27893" PostHistoryTypeId="2" PostId="12671" RevisionGUID="351b9178-574c-4c09-bc65-65f6ff2df7ab" CreationDate="2011-05-24T12:47:06.493" UserId="4513" Text="Sounds like your looking to learn about Trees!&#xD;&#xA;&#xD;&#xA;And I'm being serious, if your looping over all your blocks at the moment, then you need to learn how to limit your blocks into sections. The best way to break this down without fragmenting your data is to think about your world data as a tree.&#xD;&#xA;&#xD;&#xA;Rather than moving your 'collision' detection block sets every time the player moves, you should have them all in pre-calculated zones. That way, only as the player moves around, does he move into these *zones*; instead of the collision detection zone following him.&#xD;&#xA;&#xD;&#xA;But how is this relevant to a tree data structure?&#xD;&#xA;&#xD;&#xA;Lets say your player position (in terms of blocks, not rendering position) is 24,16,24.&#xD;&#xA;If your world is separated in zones of 8 blocks, that is 6 zones horizontally, 4 zones vertically (48 / 8 == 6, 32 / 8 == 4), and 6 zones on the Z axis.&#xD;&#xA;&#xD;&#xA;Now if you were to check which zone the player is in, you would only have to iterate 144 (6 * 4 * 6) times; but now lets zoom out even further, and pack these zones into larger zones. The common multiple of 6 and 4 is 2, so lets have larger zones of 2*2 size, that means you only have to iterate 18 times (3 * 2 * 3) to figure out which larger zone the player is in, and then 4 times (2 * 2) to figure which medium zone, and then only iterating over the mini zone (8 * 8).&#xD;&#xA;&#xD;&#xA;This is why it is like a tree, each zone, is a branch on the tree, and you a simply traversing the tree to find where the player is at, to minimize overall calculations.&#xD;&#xA;&#xD;&#xA;A diagram below should help you visualize (image from [Wikipedia:Octrees][2]):&#xD;&#xA;![Octree][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bn33y.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="27894" PostHistoryTypeId="5" PostId="12671" RevisionGUID="b21c14e6-110c-4d3a-ae8c-907879db81b3" CreationDate="2011-05-24T12:55:35.690" UserId="4513" Comment="added 2 characters in body" Text="Sounds like your looking to learn about Trees!&#xD;&#xA;&#xD;&#xA;And I'm being serious, if your looping over all your blocks at the moment, then you need to learn how to limit your blocks into sections. The best way to break this down without fragmenting your data is to think about your world data as a tree.&#xD;&#xA;&#xD;&#xA;Rather than moving your 'collision' detection block sets every time the player moves, you should have them all in pre-calculated zones. That way, only as the player moves around, does he move into these *zones*; instead of the collision detection zone following him.&#xD;&#xA;&#xD;&#xA;But how is this relevant to a tree data structure?&#xD;&#xA;&#xD;&#xA;Lets say your player position (in terms of blocks, not rendering position) is 24,16,24.&#xD;&#xA;If your world is separated in zones of 8 blocks, that is 6 zones horizontally, 4 zones vertically (48 / 8 == 6, 32 / 8 == 4), and 6 zones on the Z axis.&#xD;&#xA;&#xD;&#xA;Now if you were to check which zone the player is in, you would only have to iterate 144 (6 * 4 * 6) times; but now lets zoom out even further, and pack these zones into larger zones. The common multiple of 6 and 4 is 2, so lets have larger zones of 2*2 size, that means you only have to iterate 18 times (3 * 2 * 3) to figure out which larger zone the player is in, and then 4 times (2 * 2) to figure which medium zone, and then only iterating over the mini zone (8 * 8).&#xD;&#xA;&#xD;&#xA;This is why it is like a tree, each zone, is a branch on the tree, and you a simply traversing the tree to find where the player is at, to minimize overall calculations.&#xD;&#xA;&#xD;&#xA;The diagram below should help you visualize (image from [Wikipedia:Octrees][2]):&#xD;&#xA;![Octree][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bn33y.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="27895" PostHistoryTypeId="5" PostId="12671" RevisionGUID="1e31e2de-31b3-46e0-87ed-5dd78d1d4f0c" CreationDate="2011-05-24T13:18:19.653" UserId="4513" Comment="added 282 characters in body" Text="Sounds like your looking to learn about Trees!&#xD;&#xA;&#xD;&#xA;And I'm being serious, if your looping over all your blocks at the moment, then you need to learn how to limit your blocks into sections. The best way to break this down without fragmenting your data is to think about your world data as a tree.&#xD;&#xA;&#xD;&#xA;Rather than moving your 'collision' detection block sets every time the player moves, you should have them all in pre-calculated zones. That way, only as the player moves around, does he move into these *zones*; instead of the collision detection zone following him.&#xD;&#xA;&#xD;&#xA;But how is this relevant to a tree data structure?&#xD;&#xA;d&#xD;&#xA;Lets say your player position (in terms of blocks, not rendering position) is 32,32,32; and that your world is separated into zones of 8 blocks.&#xD;&#xA;&#xD;&#xA;This means that in your world, you will have 8 zones per axis (X, Y, Z); with each of these zones containing 8 blocks.&#xD;&#xA;If each of these 8 blocks were the collision detection zone for your player, then to determine which zone to use, rather than iterating over each block, you could simply iterate over each zone. This is breaking down the maximum number of iterations from 262144 (64 * 64 * 64), to 512 (8 * 8 * 8).&#xD;&#xA;&#xD;&#xA;Now zoom out from world of zones, and place those zones into larger &quot;super-zones&quot;; wherein each super-zone contains 2*2 regular zones. Applying the same logic from above, this would break the maximum iterations from 512 to ((4 * 4 * 4) + (2 * 2 * 2)) 72! You can see how this is saving you a lot of looping already.&#xD;&#xA;&#xD;&#xA;Therein, this is why you need to learn about trees. Each zone is a branch on the tree, with a super-zone a preceding branch.&#xD;&#xA;You are simply traversing the tree to find where the player is at; to determine what collision detection zone to use, therein minimizing overall calculations.&#xD;&#xA;&#xD;&#xA;The diagram below should help you visualize (image from [Wikipedia:Octrees][2]):&#xD;&#xA;![Octree][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bn33y.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="27896" PostHistoryTypeId="5" PostId="12671" RevisionGUID="72099d32-3362-4e33-a5e3-d15cef585c2c" CreationDate="2011-05-24T13:24:40.643" UserId="4513" Comment="added 213 characters in body" Text="Sounds like your looking to learn about Trees!&#xD;&#xA;&#xD;&#xA;And I'm being serious, if your looping over all your blocks at the moment, then you need to learn how to limit your blocks into sections. The best way to break this down without fragmenting your data is to think about your world data as a tree.&#xD;&#xA;&#xD;&#xA;Rather than moving your 'collision' detection block sets every time the player moves, you should have them all in pre-calculated zones. That way, only as the player moves around, does he move into these *zones*; instead of the collision detection zone following him.&#xD;&#xA;&#xD;&#xA;But how is this relevant to a tree data structure?&#xD;&#xA;d&#xD;&#xA;Lets say your player position (in terms of blocks, not rendering position) is 32,32,32; and that your world is separated into zones of 8 blocks.&#xD;&#xA;&#xD;&#xA;This means that in your world, you will have 8 zones per axis (X, Y, Z); with each of these zones containing 8 blocks.&#xD;&#xA;If each of these 8 blocks were the collision detection zone for your player, then to determine which zone to use, rather than iterating over each block, you could simply iterate over each zone. This is breaking down the maximum number of iterations from 262144 (64 * 64 * 64), to 512 (8 * 8 * 8).&#xD;&#xA;&#xD;&#xA;Now zoom out from this world of zones, and place the zones into larger &quot;super-zones&quot;; wherein each super-zone contains 2*2*2 regular zones. As you world currently contains 512 (8 * 8 * 8) zones, dividing that 8 by 2 gives you a total of 64 (4*4*4) total zones. Applying the same logic from above, this would break the maximum iterations from 512 to 8 to find the super zone, then a maximum of 64 to find the collision zone (total max 72)! You can see how this is saving you a lot of possible looping already (262144 : 72).&#xD;&#xA;&#xD;&#xA;Therein, this is why you need to learn about trees. Each zone is a branch on the tree, with each super-zone as a preceding branch.&#xD;&#xA;You are simply traversing the tree to find where the player is at; to determine what collision detection zone to use, therein minimizing overall calculations.&#xD;&#xA;&#xD;&#xA;The diagram below should help you visualize (image from [Wikipedia:Octrees][2]):&#xD;&#xA;![Octree][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bn33y.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="27897" PostHistoryTypeId="5" PostId="12671" RevisionGUID="e3e74dca-147c-4923-ae09-21af08bf58d9" CreationDate="2011-05-24T13:30:36.347" UserId="4513" Comment="added 533 characters in body" Text="Sounds like your looking to learn about Trees!&#xD;&#xA;&#xD;&#xA;And I'm being serious, if your looping over all your cubes at the moment, then you need to learn how to limit your cubes into sections. The best way to break this down without fragmenting your data is to think about your world data as a tree.&#xD;&#xA;&#xD;&#xA;Rather than moving your 'collision' detection zones sets every time the player moves, you should have them all in pre-calculated zones. That way, only as the player moves around, does he move into these *zones*; instead of the collision detection zone following him.&#xD;&#xA;&#xD;&#xA;Lets say your player position is in terms of cubes (not floating point for the renderer), to determine where the player is, you may use the notation 32,32,32 (smack in the middle of your world). But if you wanted to use a collision zone around the player at this position, you would have to calculate it based on the players position, and re-calculate it every time the player moved. This is very inefficient. So why not just pre-calculate it as collision 'zones', and when the player moves from one zone to another, it is purely switches to the next data set; this means you never have to iterate fully over your entire set of cubes for this operation. But, how to implement this?&#xD;&#xA; &#xD;&#xA;Imagine your world is to be seperate into 8*8*8 zones; this means that in your world, you will have 8 zones per axis (X, Y, Z); with each of these zones containing 8 cubes.&#xD;&#xA;If each of these 8 zones were the collision detection zone for your player, then to determine which zone to use, rather than iterating over each cube, you could simply iterate over each zone. This is breaking down the maximum number of iterations from 262144 (64 * 64 * 64), to 512 (8 * 8 * 8).&#xD;&#xA;&#xD;&#xA;Now zoom out from this world of zones, and place the zones into larger &quot;super-zones&quot;; wherein each super-zone contains 2*2*2 regular zones. As you world currently contains 512 (8 * 8 * 8) zones, dividing that 8 by 2 gives you a total of 64 (4*4*4) total zones. Applying the same logic from above, this would break the maximum iterations from 512 to 8 to find the super zone, then a maximum of 64 to find the collision zone (total max 72)! You can see how this is saving you a lot of possible looping already (262144 : 72).&#xD;&#xA;&#xD;&#xA;Therein, this is why you need to learn about trees. Each zone is a branch on the tree, with each super-zone as a preceding branch.&#xD;&#xA;You are simply traversing the tree to find where the player is at; to determine what collision detection zone to use, therein minimizing overall calculations.&#xD;&#xA;&#xD;&#xA;The diagram below should help you visualize (image from [Wikipedia:Octrees][2]):&#xD;&#xA;![Octree][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bn33y.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="27898" PostHistoryTypeId="5" PostId="12658" RevisionGUID="9be4ee86-434b-4d94-bd99-0549858a6955" CreationDate="2011-05-24T13:35:10.957" UserId="3588" Comment="Touched up the question a tiny bit while I was here, but I was mostly here just to add the rather fitting [animation] tag. ♪" Text="I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real, animated character.&#xD;&#xA;&#xD;&#xA;I downloaded a free sprite sheet which has 12 (3x4) character sprites.&#xD;&#xA;&#xD;&#xA;What is the general method to animate the character?&#xD;&#xA;&#xD;&#xA;I see why having all the character animations in one file can be useful, but I don't understand how it would be done. I don't want code or anything, I just want to know how you normally use the sprite sheet to animate a character so I code it afterwards.&#xD;&#xA;" />
  <row Id="27899" PostHistoryTypeId="4" PostId="12658" RevisionGUID="9be4ee86-434b-4d94-bd99-0549858a6955" CreationDate="2011-05-24T13:35:10.957" UserId="3588" Comment="Touched up the question a tiny bit while I was here, but I was mostly here just to add the rather fitting [animation] tag. ♪" Text="How to animate a character from a sprite sheet?" />
  <row Id="27900" PostHistoryTypeId="6" PostId="12658" RevisionGUID="9be4ee86-434b-4d94-bd99-0549858a6955" CreationDate="2011-05-24T13:35:10.957" UserId="3588" Comment="Touched up the question a tiny bit while I was here, but I was mostly here just to add the rather fitting [animation] tag. ♪" Text="&lt;animation&gt;&lt;sprites&gt;&lt;character&gt;&lt;spritesheet&gt;" />
  <row Id="27901" PostHistoryTypeId="24" PostId="12658" RevisionGUID="9be4ee86-434b-4d94-bd99-0549858a6955" CreationDate="2011-05-24T13:35:10.957" Comment="Proposed by 3588 approved by 14 edit id of 444" />
  <row Id="27902" PostHistoryTypeId="5" PostId="12663" RevisionGUID="5522b6fc-5385-4b58-863b-f3fb35c7c301" CreationDate="2011-05-24T13:35:14.780" UserId="3588" Comment="Added a slew of tags to highlight the content of the question, and also revised the question body a small bit. ♪" Text="I'm working on a 2D platformer side scroller game. I am giving high impulse to player, the player starts moving and if it hits a slope on terrain, it gets a vertical movement and starts to fly over (Box2D physics). &#xD;&#xA;&#xD;&#xA;What I need is that the player should always be on the terrain and move along the ground.&#xD;&#xA;&#xD;&#xA;I would like to know if it's possible using Box2D engine." />
  <row Id="27903" PostHistoryTypeId="6" PostId="12663" RevisionGUID="5522b6fc-5385-4b58-863b-f3fb35c7c301" CreationDate="2011-05-24T13:35:14.780" UserId="3588" Comment="Added a slew of tags to highlight the content of the question, and also revised the question body a small bit. ♪" Text="&lt;box2d&gt;&lt;movement&gt;&lt;terrain&gt;&lt;platform-games&gt;" />
  <row Id="27904" PostHistoryTypeId="24" PostId="12663" RevisionGUID="5522b6fc-5385-4b58-863b-f3fb35c7c301" CreationDate="2011-05-24T13:35:14.780" Comment="Proposed by 3588 approved by 14 edit id of 443" />
  <row Id="27905" PostHistoryTypeId="5" PostId="12671" RevisionGUID="37cba67e-4b8f-4688-a5dc-5d7f8a8a8897" CreationDate="2011-05-24T13:42:33.757" UserId="4513" Comment="added 38 characters in body" Text="Sounds like your looking to learn about Trees!&#xD;&#xA;&#xD;&#xA;And I'm being serious, if your looping over all your cubes at the moment, then you need to learn how to limit your cubes into sections. The best way to break this down without fragmenting your data is to think about your world data as a tree.&#xD;&#xA;&#xD;&#xA;Rather than moving your 'collision' detection zones sets every time the player moves, you should have them all in pre-calculated zones. That way, only as the player moves around, does he move into these *zones*; instead of the collision detection zone following him.&#xD;&#xA;&#xD;&#xA;Lets say your player position is in terms of cubes (not floating point for the renderer), to determine where the player is, you may use the notation 32,32,32 (smack in the middle of your world). But if you wanted to use a collision zone around the player at this position, you would have to calculate it based on the players position, and re-calculate it every time the player moved. This is very inefficient. So why not just pre-calculate it as collision 'zones', and when the player moves from one zone to another, it is purely switches to the next data set; this means you never have to iterate fully over your entire set of cubes for this operation. But, how to implement this?&#xD;&#xA; &#xD;&#xA;Imagine your world is to be separated into 8*8*8 zones; this means that in your world, you will have 8 zones per axis (X, Y, Z); with each of these zones containing 8 voxel-type cubes.&#xD;&#xA;If each of these 8 zones were to be a collision detection zone for your player, then to determine which zone to use, rather than iterating over each cube, you could simply iterate over each zone. This is breaking down the maximum number of iterations from 262144 (64 * 64 * 64 cubes), to 512 (8 * 8 * 8 zones).&#xD;&#xA;&#xD;&#xA;Now zoom out from this world of zones, and place the zones into larger &quot;super-zones&quot;; wherein each super-zone contains 2*2*2 regular zones. As you world currently contains 512 (8 * 8 * 8) zones, dividing that 8 by 2 gives you a total of 64 (4*4*4) total super-zones. Applying the same logic from above, this would break the maximum iterations from 512 to 8 to find the super-zone; and then a maximum of 64 to find the collision zone (total max 72)! You can see how this is saving you a lot of possible looping already (262144 : 72).&#xD;&#xA;&#xD;&#xA;Therein, this is why you need to learn about trees. Each zone is a branch on the tree, with each super-zone as a preceding branch.&#xD;&#xA;You are simply traversing the tree to find where the player is at; to determine what collision detection zone to use, therein minimizing overall calculations.&#xD;&#xA;&#xD;&#xA;The diagram below should help you visualize (image from [Wikipedia:Octrees][2]):&#xD;&#xA;![Octree][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bn33y.png&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="27906" PostHistoryTypeId="2" PostId="12672" RevisionGUID="b6983985-45aa-432f-9d37-d05818091c49" CreationDate="2011-05-24T13:43:17.403" UserId="7328" Text="The most common approch to GameState algorithm is to have some game states and program can freely choose to run which one of them, this means there is a GameDirector which has a pointer to current running state, and in each update cycle it'll call 'currentState-&gt;run()`.&#xD;&#xA;in thins approch GameDirector is a singleton and every one can access it, and also every one can change game state." />
  <row Id="27907" PostHistoryTypeId="2" PostId="12673" RevisionGUID="cb528eb7-aee3-4af8-b7f9-8e6becdfe7d8" CreationDate="2011-05-24T13:49:56.620" UserId="1386" Text="I agree with Daniels answer, in that iterating through large amounts of boxes is the most likely cause, and that by using spacial partitioning you could speed the game up a lot - but the problem *could* also be elsewhere, and you could be wasting your time.&#xD;&#xA;&#xD;&#xA;**In order to increase the speed of your game significantly you need to profile your code.** Identify where the bottleneck is, this will allow you to make the biggest improvements.&#xD;&#xA;&#xD;&#xA;There are lots of ways to profile your code, you could roll your own performance analysis class (which could make use of the [Stopwatch class (MSDN)][1]), or you could use PIX to get a general idea of how busy the CPU/GPU is.&#xD;&#xA;&#xD;&#xA;You can also put [PIX event markers][2] in your code, which will show up as colored regions in PIX's readouts. There isn't an official C# interface to these functions, but [this thread][3] shows how you can make a C# interface yourself.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.reference.d3dperf_beginevent%28v=vs.85%29.aspx&#xD;&#xA;  [3]: http://forums.create.msdn.com/forums/p/16667/86975.aspx" />
  <row Id="27908" PostHistoryTypeId="2" PostId="12674" RevisionGUID="a735dbbe-dc29-4594-b7c1-6284950c7716" CreationDate="2011-05-24T14:10:40.953" UserId="6813" Text="I doubt that the event listeners are the main bottleneck of your applications. However there is some useful informations to know about events alternatives and performances.&#xD;&#xA;&#xD;&#xA;The main alternatives to the Events are the Signals &amp; Slots and indeed the direct Callbacks.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;*Performance tests and articles:*&#xD;&#xA;&#xD;&#xA;- [Callback Strategies][8]&#xD;&#xA;- [TurboSignal vs As3Signal vs Events][6] (also an introduction to TubroEvent. Tests at the bottom)&lt;br&gt;&lt;br&gt;&#xD;&#xA;- [Events vs AS3signal][2]&#xD;&#xA;- [Events vs AS3signal vs Callbacks][3]&#xD;&#xA;- [Another Event vs AS3signal][4]&#xD;&#xA;&#xD;&#xA;&lt;br&gt;*AS3 Signal libraries:*&#xD;&#xA;&#xD;&#xA;- [Robert Penner’s as3signals][1]&#xD;&#xA;- [Jackson Dunstan's TubroSignal][5]&#xD;&#xA;- probably others I don't know of...&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Finally, you can check this [video tutorial about how to use as3signal][7]&#xD;&#xA;&#xD;&#xA;[1]: https://github.com/robertpenner/as3-signals/wiki/&#xD;&#xA;[2]: http://alecmce.com/as3/events-and-signals-performance-tests&#xD;&#xA;[3]: http://va.lent.in/blog/2010/01/27/omg-as3-signals-are-faster-than-events1&#xD;&#xA;[4]: http://www.rossgerbasi.com/2010/09/as3signals-vs-events/&#xD;&#xA;[5]: http://jacksondunstan.com/turbosignals&#xD;&#xA;[6]: http://jacksondunstan.com/articles/585&#xD;&#xA;[7]: http://johnlindquist.com/2010/01/21/as3-signals-tutorial/&#xD;&#xA;[8]: http://jacksondunstan.com/articles/573" />
  <row Id="27909" PostHistoryTypeId="5" PostId="12674" RevisionGUID="b159ebdd-92e1-4892-b84f-b9f8c49df386" CreationDate="2011-05-24T14:20:45.370" UserId="6813" Comment="added 97 characters in body; edited body; added 41 characters in body" Text="I doubt that the event listeners are the main bottleneck of your applications. However as you are trying to optimize your code, here are some useful informations to know about Events alternatives and performances.&#xD;&#xA;&#xD;&#xA;The main alternatives to the Events are the Signals &amp; Slots, Observers and indeed the direct Callbacks.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;*Performance tests and articles:*&#xD;&#xA;&#xD;&#xA;- [Callback Strategies][8]&#xD;&#xA;- [TurboSignal vs As3Signal vs Events][6] (also an introduction to TubroEvent. Tests at the bottom)&lt;br&gt;&lt;br&gt;&#xD;&#xA;- [Events vs AS3signal][2]&#xD;&#xA;- [Events vs AS3signal vs Callbacks][3]&#xD;&#xA;- [Another Event vs AS3signal][4]&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;- [Runnables (Observers)][9]&#xD;&#xA;&#xD;&#xA;&lt;br&gt;*AS3 Signal libraries:*&#xD;&#xA;&#xD;&#xA;- [Robert Penner’s as3signals][1]&#xD;&#xA;- [Jackson Dunstan's TubroSignal][5]&#xD;&#xA;- probably others I don't know of...&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Finally, you can check this [video tutorial about how to use as3signal][7]&#xD;&#xA;&#xD;&#xA;[1]: https://github.com/robertpenner/as3-signals/wiki/&#xD;&#xA;[2]: http://alecmce.com/as3/events-and-signals-performance-tests&#xD;&#xA;[3]: http://va.lent.in/blog/2010/01/27/omg-as3-signals-are-faster-than-events1&#xD;&#xA;[4]: http://www.rossgerbasi.com/2010/09/as3signals-vs-events/&#xD;&#xA;[5]: http://jacksondunstan.com/turbosignals&#xD;&#xA;[6]: http://jacksondunstan.com/articles/585&#xD;&#xA;[7]: http://johnlindquist.com/2010/01/21/as3-signals-tutorial/&#xD;&#xA;[8]: http://jacksondunstan.com/articles/573&#xD;&#xA;[9]:  http://jacksondunstan.com/articles/323" />
  <row Id="27910" PostHistoryTypeId="5" PostId="12669" RevisionGUID="1b6da498-48f0-4caa-8996-0028dde6b02a" CreationDate="2011-05-24T15:04:03.317" UserId="1198" Comment="edited body" Text="**Edit:** To sum the question up, I have a voxel based world (Minecraft style (Thanks Communist Duck)) which is causing large amounts of lag. I am not positive on the source but would like any possible advice on how to get rid of it.&#xD;&#xA;&#xD;&#xA;I am working on a project where a world consists of a large quantity of cubes (I would give you a number, but it is user defined worlds). My test one is around (48 x 32 x 48) blocks.&#xD;&#xA;&#xD;&#xA;Basically these blocks don't do anything in themselves. They just sit there.&#xD;&#xA;&#xD;&#xA;They start being used when it comes to player interaction.&#xD;&#xA;&#xD;&#xA;I need to check what cubes the users mouse interacts with (mouse over, clicking, etc.), and for collision detecting as the player moves.&#xD;&#xA;&#xD;&#xA;Now I had a massive amount of lag at first, looping through every block.&#xD;&#xA;&#xD;&#xA;I have managed to decrease that lag, by looping through all the blocks, and finding which blocks are within a particular range of the character, and then only looping through those blocks for the collision detection, etc.&#xD;&#xA;&#xD;&#xA;However, I am still going at a depressing 2fps.&#xD;&#xA;&#xD;&#xA;Does anyone have any other ideas on how i could decrease this lag?&#xD;&#xA;&#xD;&#xA;Btw, I am using XNA (C#) and yes, it is 3d." />
  <row Id="27911" PostHistoryTypeId="25" PostId="12669" RevisionGUID="f2b6c6da-0971-463c-b5ee-fb9243284be6" CreationDate="2011-05-24T15:12:44.043" Comment="http://twitter.com/#!/StackGameDev/status/73043757368475648" />
  <row Id="27912" PostHistoryTypeId="5" PostId="12648" RevisionGUID="6f8d4c78-b013-4d42-b7a7-d1dbbd59c69f" CreationDate="2011-05-24T15:29:36.090" UserId="51" Comment="added 1525 characters in body" Text="As you can probably imagine, the biggest problem with that approach is that you don't have any idea how long it's going to take to populate the world.  If you're unlucky, the random number generator can make you do several times the amount of calculations than you would need to do given a strict iterative approach.&#xD;&#xA;&#xD;&#xA;One way you could work around it in this situation is by using a grid.  Maintain a list of all the valid grid coords to place a world at, and every time you place a new world you remove the coords that are no longer valid from this master list.  That way you only have to pick a random spot once since all spots you are picking from are valid.&#xD;&#xA;&#xD;&#xA;Basically, the algorithm would look something like this (in really rough pseudo code):&#xD;&#xA;&#xD;&#xA;    int[] validGridCoords = AllGridCoords();&#xD;&#xA;    &#xD;&#xA;    function PopulateUniverse()&#xD;&#xA;        for( 0..NumPlanetsRequired )&#xD;&#xA;            if ( validGridCoords.Count &lt; 1 )&#xD;&#xA;              break for loop;&#xD;&#xA;            var CoordToPlaceAt = validGridCoords.RandomElement();&#xD;&#xA;            SpawnPlanetAt( CoordToPlaceAt );&#xD;&#xA;    &#xD;&#xA;    function SpawnPlanetAt( int coordToSpawnAt )&#xD;&#xA;        // initialize planet&#xD;&#xA;        var planet = new Planet( coordToSpawnAt );&#xD;&#xA;        foreach( var gridCoord in validGridCoords )&#xD;&#xA;            if( gridCoord is close to new planet )  // you could use Manhattan distance here&#xD;&#xA;                validGridCoords.Remove( gridCoord )&#xD;&#xA;&#xD;&#xA;**Update**: as NeilG rightly is alluding to in the comments, this naive solution has a few problems.  For one, if your &quot;is close&quot; number is relatively small (i.e. around the radius of your largest allowed planet) or proportional to the radius of the planet, you can run into situations where you place a &quot;large&quot; planet on the edge of the valid areas and it might reach far enough into the prepopulated area to either overlap into the &quot;too close&quot; area or even overlap an entire planet.  There are a handful of fixes for this:&#xD;&#xA;&#xD;&#xA;1) Sort your incoming planets by largest to smallest.  That way, if your &quot;is close to new planet&quot; distance is at least the radius of the largest planet you won't actually get any overlaps.  You might get touching planets though, unless you also do...&#xD;&#xA;&#xD;&#xA;2) Instead of picking a single point, pick an area of points that your planet fills.  This is more computationally expensive, but the effect is that your planets won't bleed into the prepicked &quot;not valid&quot; areas.&#xD;&#xA;&#xD;&#xA;Either way, you probably want to do #1 if your distance between is small and your planets are varying in size dramatically.  You'd be doing a lot of computation, but the real value with an iterative algorithm like this is knowing when you can stop.  With a pure random solution, if your density is high, your placing function is non-deterministic.  Knowing that your map is too full (by not having any valid spots to pick from) means that you can handle that error condition, as opposed to blindly throwing darts at a board.  " />
  <row Id="27913" PostHistoryTypeId="16" PostId="8234" RevisionGUID="5d01f341-cc72-4650-9668-d45699f6d2b7" CreationDate="2011-05-24T15:35:39.577" UserId="51" />
  <row Id="27914" PostHistoryTypeId="16" PostId="8235" RevisionGUID="f46e8b54-9304-4fdd-9599-349a5580aa56" CreationDate="2011-05-24T15:35:39.577" UserId="51" />
  <row Id="27915" PostHistoryTypeId="16" PostId="12642" RevisionGUID="a703adca-f024-412d-a7e9-19bbbf53598d" CreationDate="2011-05-24T15:35:39.577" UserId="51" />
  <row Id="27916" PostHistoryTypeId="16" PostId="12666" RevisionGUID="0555faf9-d2a9-4c65-841c-8da369ab4526" CreationDate="2011-05-24T15:35:39.577" UserId="51" />
  <row Id="27917" PostHistoryTypeId="5" PostId="12664" RevisionGUID="c2b1a887-e6dd-4439-8b68-80e8c8358799" CreationDate="2011-05-24T15:38:34.003" UserId="51" Comment="deleted 20 characters in body" Text="I have been attempting to make a game engine in C++ and have come across the dilemma of game state management. I have done a lot of research and found numerous ways of accomplishing from game engine with derived classes to using enums and I would like to know the most effective/efficient way of managing game states.&#xD;&#xA;" />
  <row Id="27918" PostHistoryTypeId="2" PostId="12675" RevisionGUID="dd1530fb-de9a-4923-85de-ac76cf9b617b" CreationDate="2011-05-24T15:46:44.420" UserId="7555" Text="I draw some text on screen using ID3DXFont::DrawText. This text should be displayed the same regardless of screen resolution. &#xD;&#xA;&#xD;&#xA;For example, if screen resolution is low, text wrapped and when it is higher text is not wrapped. How can I avoid such situation? I want text size to be connected to screen resolution so if resolution is lower I want the text to be relatively smaller so that no wrapping happens. Is there any way?&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="27919" PostHistoryTypeId="1" PostId="12675" RevisionGUID="dd1530fb-de9a-4923-85de-ac76cf9b617b" CreationDate="2011-05-24T15:46:44.420" UserId="7555" Text="How do I display same “proportional” text size on different resolutions?" />
  <row Id="27920" PostHistoryTypeId="3" PostId="12675" RevisionGUID="dd1530fb-de9a-4923-85de-ac76cf9b617b" CreationDate="2011-05-24T15:46:44.420" UserId="7555" Text="&lt;directx&gt;&lt;rendering&gt;&lt;text&gt;" />
  <row Id="27921" PostHistoryTypeId="2" PostId="12676" RevisionGUID="52081638-2195-4e20-823c-195da217c7e0" CreationDate="2011-05-24T15:49:46.587" UserId="4662" Text="You will have to manually get the size of the screen and scale down the requested text size." />
  <row Id="27922" PostHistoryTypeId="5" PostId="12672" RevisionGUID="3fa7559d-8748-4c65-8bc1-1b1c7d8e040a" CreationDate="2011-05-24T16:20:49.660" UserId="7328" Comment="added 52 characters in body" Text="The most common approch to GameState algorithm is to have some game states and program can freely choose to run any one of them, this means there is a GameDirector which has a pointer to current running state, and in each update cycle it'll call 'currentState-&gt;run()`.&#xD;&#xA;in this approch GameDirector is a singleton and every one can access it, and also every one can change game state. also gameDirector is responsible for game's main loop." />
  <row Id="27923" PostHistoryTypeId="2" PostId="12677" RevisionGUID="4c1d4a19-2736-4064-a6de-1f561a2a1024" CreationDate="2011-05-24T16:47:18.993" UserId="6275" Text="its been a while since I have asked a question, but i got one now.&#xD;&#xA;&#xD;&#xA;My question, in my opinion, is rather simple..&#xD;&#xA;&#xD;&#xA;Im wondering if there is a simple way to convert 3D coordinates to 2D coordinates.&#xD;&#xA;Also if its possible, to send them back.&#xD;&#xA;&#xD;&#xA;Im using Opengl(GLUT) in my C++ project.&#xD;&#xA;&#xD;&#xA;I am also using SFML for the 2D information(sprites text etc.)&#xD;&#xA;&#xD;&#xA;I found out that I can use [gluProject()](http://www.opengl.org/sdk/docs/man/xhtml/gluProject.xml), but I have no idea how to use this...&#xD;&#xA;&#xD;&#xA;So again, my question is asking for a simple example of using gluProject() or another example to convert 3D coordinates(from i guess the player) to 2D coordinates.&#xD;&#xA;&#xD;&#xA;If i cant get the simple process im confident that i can figure out the rest.&#xD;&#xA;&#xD;&#xA;Thanks for reading!&#xD;&#xA;&#xD;&#xA;-Molma" />
  <row Id="27924" PostHistoryTypeId="1" PostId="12677" RevisionGUID="4c1d4a19-2736-4064-a6de-1f561a2a1024" CreationDate="2011-05-24T16:47:18.993" UserId="6275" Text="Converting 3D coordinates to 2D(and back?)" />
  <row Id="27925" PostHistoryTypeId="3" PostId="12677" RevisionGUID="4c1d4a19-2736-4064-a6de-1f561a2a1024" CreationDate="2011-05-24T16:47:18.993" UserId="6275" Text="&lt;opengl&gt;&lt;c++&gt;&lt;sfml&gt;&lt;glut&gt;" />
  <row Id="27926" PostHistoryTypeId="5" PostId="12630" RevisionGUID="024b390b-9024-4a38-be34-e579345ecad2" CreationDate="2011-05-24T16:59:48.000" UserId="-1" Comment="clarifying what I'm looking for in answers" Text="I'm currently a (happily employed) automated software tester that's curious about game testing/QA. Do game companies hire dedicated testers for pay? If yes, then what are the job prospects like? If no, then how does becoming a game tester work (volunteers? mixed roles? crowdsourcing?). Obviously game companies have full-time devs, artists, designers, managers, etc. but what does QA look like? &#xD;&#xA;&#xD;&#xA;NOTE: I'm curious about how QA works in a game dev setting, but I'm not really looking for job tips or &quot;Do this if you want to get into game QA&quot;. " />
  <row Id="27927" PostHistoryTypeId="24" PostId="12630" RevisionGUID="024b390b-9024-4a38-be34-e579345ecad2" CreationDate="2011-05-24T16:59:48.000" Comment="Proposed by 206.223.185.131|3c3b3c21-ca80-48e6-b68b-0b14775d34b1 approved by 51 edit id of 445" />
  <row Id="27928" PostHistoryTypeId="2" PostId="12678" RevisionGUID="e1c17cea-b1a4-401d-9ab8-2b38bc71524e" CreationDate="2011-05-24T17:01:33.917" UserId="1430" Text="You can convert between 3D and 2D coordinates in a variety of ways, some of which have more meaning than others (for example you could just drop the Z coordinate, yielding an (x,y) pair, but that probably doesn't do what you want semantically).&#xD;&#xA;&#xD;&#xA;But your specifically asking how to convert between model, world or view space 3D and screen space 2D as used by your graphics API, it sounds like. This primarily involves application of the appropriate transformation matrix, as well as performing the perspective division by W and any viewport transformations that may be warranted. gluProject does exactly this operation, all you have to do is provide it with input coordinates and matrices.&#xD;&#xA;&#xD;&#xA;gluProject assumes the input coordinates `objX`, `objY`, and `objZ` to be in model space, but they can be anywhere as long as the matrices you provide it via the `model` and `proj` parameters have associated meaningful values. The format of the `model` and `proj` matrices is an array of 16 floating point values, the same kind of data you'd get from `glGetFloatv` and such. The `view` parameter is an array of 4 integers representing the position and size of your viewport (from `glGetIntegerv` for example).&#xD;&#xA;&#xD;&#xA;To perform the operation in reverse, you can use gluUnproject. Note that since you'll have a 2D coordinate, you'll have manually specify an arbitrary depth value (the 3D -&gt; 2D conversion perforce loses data, so you must invent new data when going the other direction)." />
  <row Id="27929" PostHistoryTypeId="2" PostId="12679" RevisionGUID="7f191058-ddd7-4a5e-9c29-eef7e49ad530" CreationDate="2011-05-24T17:42:51.997" UserId="5021" Text="If your player is large relative to the size of the cubes, then you probably want an octree or other spatial partitioning structure, as other's have suggested.&#xD;&#xA;&#xD;&#xA;However, if your player is small relative to the size of the cubes, then probably the fastest way to detect collision with the cubes is to do a simple linear search of the area around the player.&#xD;&#xA;&#xD;&#xA;If the player is, for example, the same size as 1 cube, then you only need to test for collision against the neighboring 27 cubes, at most.&#xD;&#xA;&#xD;&#xA;This assumes that you store the cubes in an array that you can index into, with one slot in the array for every cube.&#xD;&#xA;&#xD;&#xA;As other's have pointed out, you need to profile your code to see what is actually slowing you down.&#xD;&#xA;&#xD;&#xA;If I had to guess though, I'd say that you are probably doing a draw call for every cube, which would be your bottleneck by far.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So to make this answer more complete, why don't you tell us how you store your cubes, and how large your player's character is, in terms of the number of cubes he can occupy." />
  <row Id="27930" PostHistoryTypeId="5" PostId="12679" RevisionGUID="cf367973-42f6-40ee-b06b-41d173d5f7f3" CreationDate="2011-05-24T17:50:03.877" UserId="5021" Comment="added 68 characters in body" Text="If your player is large relative to the size of the cubes, then you probably want an octree or other spatial partitioning structure, as other's have suggested.&#xD;&#xA;&#xD;&#xA;However, if your player is small relative to the size of the cubes, then probably the fastest way to detect collision with the cubes is to do a simple linear search of the area around the player.&#xD;&#xA;&#xD;&#xA;If the player is, for example, the same size as 1 cube, then you only need to test for collision against the neighboring 27 cubes, at most.&#xD;&#xA;&#xD;&#xA;This assumes that you store the cubes in an array that you can index into, with one slot in the array for every cube.&#xD;&#xA;&#xD;&#xA;As other's have pointed out, you need to profile your code to see what is actually slowing you down.&#xD;&#xA;&#xD;&#xA;If I had to guess though, I'd say that you are probably doing a draw call for every cube, which would be your bottleneck by far.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So to make this answer more complete, why don't you tell us how you store your cubes, how large your player's character is, in terms of the number of cubes he can occupy, and tell us how you are drawing your cubes (maybe with a code snippet)." />
  <row Id="27931" PostHistoryTypeId="5" PostId="12639" RevisionGUID="b6a8fb36-88a3-4552-a646-09c7448bce11" CreationDate="2011-05-24T18:09:04.243" UserId="4496" Comment="Discovered relevent information about the computation time of exponents; added 61 characters in body" Text="You'd probably get a close approximation to what you want by utilizing an exponential system.  &#xD;&#xA;&#xD;&#xA;Make the x based on something like 1-(rnd^value) (Assuming rnd is between 0 and 1) and you'll get a few different behaviors of left to right skewing based on what you use.  A higher value will get you a more skewed distribution  &#xD;&#xA;&#xD;&#xA;You can use an online graphing tool to get some rough ideas on the behaviors different equations will give you before placing them in, or you can just fiddle with the equations directly in your particle system, depending what style is more to your tastes.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;For something like a particle system where CPU time per particle is very important, using Math.Pow (or language equivalent) directly can lead to a decrease in performance.  If more performance is desired, and value isn't being changed in run-time, consider switching to an equivalent function such as x*x instead of x^2.&#xD;&#xA;&#xD;&#xA;(Fractional exponents could be more of an issue, but someone with a stronger math background than I could probably come up with a good way to create an approximation function)" />
  <row Id="27932" PostHistoryTypeId="25" PostId="12677" RevisionGUID="925bebe8-10a7-4d05-984f-e3696ee143b9" CreationDate="2011-05-24T18:12:43.947" Comment="http://twitter.com/#!/StackGameDev/status/73089056577302528" />
  <row Id="27933" PostHistoryTypeId="2" PostId="12680" RevisionGUID="bf91f67f-df6e-4aa0-a2cb-a2e11f9c7862" CreationDate="2011-05-24T18:17:31.110" UserId="1198" Text="In most of my games (that are all small in scope) I have used an `enum` and a `switch` (in some cases an `if..else if...`) and it has always been sufficiently fast. I've never had more than a few states, which helps.&#xD;&#xA;&#xD;&#xA;    enum GameStates&#xD;&#xA;    {&#xD;&#xA;        Running = 1,&#xD;&#xA;        Menu = 2,&#xD;&#xA;        Credits = 3&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // update loop&#xD;&#xA;    &#xD;&#xA;    switch(this.CurrentState)&#xD;&#xA;    {&#xD;&#xA;        case GameStates.Running:&#xD;&#xA;            UpdateRunning(gameTime);&#xD;&#xA;            break;&#xD;&#xA;        case GameStates.Menu:&#xD;&#xA;            UpdateMenu(gameTime);&#xD;&#xA;            break;&#xD;&#xA;        case GameStates.Credits:&#xD;&#xA;            UpdateCredits(gameTime);&#xD;&#xA;            break;&#xD;&#xA;        // add more states here&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void UpdateRunning(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        if(running == null) LoadRunning(); // &#xD;&#xA;        // perform the rest of your game logic&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This gives you a few things worth mentioning:&#xD;&#xA;&#xD;&#xA; 1. You can change state anywhere, as long as you have a pointer to your main class.&#xD;&#xA; 2. You can load/unload as necessary to save memory (if your game is big it might be nice)&#xD;&#xA; 3. ***You've kept your very simple and easy to follow. This is the single most important thing a programmer can do IMO.***&#xD;&#xA;&#xD;&#xA;(Please excuse my C#/XNA style this was copy/pasted and tweaked, shouldn't be to hard to adapt to C++)" />
  <row Id="27934" PostHistoryTypeId="2" PostId="12681" RevisionGUID="93f46251-e0ba-4125-9b3d-d565fae6453d" CreationDate="2011-05-24T18:26:02.867" UserId="141" Text="This is related to http://gamedev.stackexchange.com/questions/2166/mmo-performance except that question is about bandwidth. This is about cpu load.&#xD;&#xA;&#xD;&#xA;I put together a simple FPS using node.js and webGL. It's extremely simple, a lot like the BuddyMaze clone of MIDI Maze. There's very little going on, everyone moves in two dimensions (no height), shoots simple projectiles, and runs into walls.&#xD;&#xA;&#xD;&#xA;Right now, if I make multiple connections to the server where every player shoots rapidly while spinning in circles, I can get about 15 - 20 players in the game before the server maxes out a core and slows way down. And this is when running at 30 fps on the server. At 10 fps, I get about 25 - 30 connections. This is pretty bad, since the game is going to have a lot more to do soon and I'll need to fit more players for this to be a feasible endeavor.&#xD;&#xA;&#xD;&#xA;My brother just pointed out some stats about his coworker's TF2 server. His server is lower specs than ours, yet it runs TF2, obviously a much more complex game, at a whopping 500 ticks per second, with 36 users per core. Also, we currently consume much more bandwidth than they do, but we haven't been trying to lower that much yet.&#xD;&#xA;&#xD;&#xA;How is this possible? What sort of tricks are there to increase server performance to this magnitude? Some things that I know of include:&#xD;&#xA;&#xD;&#xA;   * Lowering framerate on the server, and interpolate positions on the client. I got some benefit, but clearly the TF2 server doesn't even bother with this.&#xD;&#xA;   * Doing expensive things like collision detection on the client, and verify it infrequently on the server. I haven't moved this over just yet, I will tonight. Even so I don't expect such an enormous gain.&#xD;&#xA;   * Break the playing field into regions (quad trees) to minimize calculations. Haven't had an opportunity for this yet.&#xD;&#xA;   * I've considered the unfortunate possibility that node.js is just way slower than whatever TF2 is using, and may not be suited for this kind of high intensity task.&#xD;&#xA;   * Is it all in the server configuration magic?&#xD;&#xA;&#xD;&#xA;So what are the other tricks of the industry to do only the minimum required on the server but still have a flawless game experience? There's a big conflict between &quot;defer to client to save cpu time&quot; and &quot;don't trust the client&quot;, so maybe it helps to know where the line is drawn in various situations?" />
  <row Id="27935" PostHistoryTypeId="1" PostId="12681" RevisionGUID="93f46251-e0ba-4125-9b3d-d565fae6453d" CreationDate="2011-05-24T18:26:02.867" UserId="141" Text="Multiplayer FPS server side performance" />
  <row Id="27936" PostHistoryTypeId="3" PostId="12681" RevisionGUID="93f46251-e0ba-4125-9b3d-d565fae6453d" CreationDate="2011-05-24T18:26:02.867" UserId="141" Text="&lt;performance&gt;&lt;client-server&gt;&lt;first-person-shooter&gt;" />
  <row Id="27937" PostHistoryTypeId="2" PostId="12682" RevisionGUID="570c8bf7-ebbc-43ec-ba5a-880a7313630e" CreationDate="2011-05-24T18:30:57.943" UserId="7557" Text="i have fair experience with java game programming,&lt;br&gt;&#xD;&#xA;i already made a simple mario game (side-Scrolling) &lt;br&gt;&#xD;&#xA;i'm wondering how can i make a &quot;Java&quot; Game like that &#xD;&#xA;&lt;br&gt;&#xD;&#xA;http://www.youtube.com/watch?v=utwtXEYW1L0&lt;br&gt;&#xD;&#xA;or that&lt;br&gt;&#xD;&#xA;http://www.youtube.com/watch?v=uqz4dunlhX4&lt;br&gt;&#xD;&#xA;the main problem is that i don't know how to make a 2D game looks like 3D &lt;br&gt;&#xD;&#xA;i just need a tutorial or the idea behind such things.&#xD;&#xA;Thanks in Advance :)" />
  <row Id="27938" PostHistoryTypeId="1" PostId="12682" RevisionGUID="570c8bf7-ebbc-43ec-ba5a-880a7313630e" CreationDate="2011-05-24T18:30:57.943" UserId="7557" Text="Java 2D Game looks like 3D" />
  <row Id="27939" PostHistoryTypeId="3" PostId="12682" RevisionGUID="570c8bf7-ebbc-43ec-ba5a-880a7313630e" CreationDate="2011-05-24T18:30:57.943" UserId="7557" Text="&lt;2d&gt;&lt;3d&gt;&lt;java&gt;" />
  <row Id="27940" PostHistoryTypeId="5" PostId="12677" RevisionGUID="17ce0961-66ad-4b51-9a5d-2680ab6fd85b" CreationDate="2011-05-24T18:54:06.987" UserId="3588" Comment="Whew, lotsa tags. Also did a lot of fixing for capitalization, and removed all of those salutations. I still don't actually understand the last sentence on account of it contradicting itself, but I figure it's not my place to decide that one. ♪" Text="I'm wondering if there is a simple way to convert 3D coordinates to 2D coordinates. Also, if it's possible, to convert in the reverse direction.&#xD;&#xA;&#xD;&#xA;I'm using OpenGL(GLUT) in my C++ project.&#xD;&#xA;&#xD;&#xA;I am also using SFML for the 2D information (sprites text etc.)&#xD;&#xA;&#xD;&#xA;I found out that I can use [gluProject()](http://www.opengl.org/sdk/docs/man/xhtml/gluProject.xml), but I have no idea how to use this.&#xD;&#xA;&#xD;&#xA;I'm asking for a simple example of using gluProject() or another example to convert 3D coordinates (such as from the player) to 2D coordinates.&#xD;&#xA;&#xD;&#xA;If I can't get the simple process I'm confident that I can figure out the rest." />
  <row Id="27941" PostHistoryTypeId="4" PostId="12677" RevisionGUID="17ce0961-66ad-4b51-9a5d-2680ab6fd85b" CreationDate="2011-05-24T18:54:06.987" UserId="3588" Comment="Whew, lotsa tags. Also did a lot of fixing for capitalization, and removed all of those salutations. I still don't actually understand the last sentence on account of it contradicting itself, but I figure it's not my place to decide that one. ♪" Text="Converting 3D coordinates to 2D and back?" />
  <row Id="27942" PostHistoryTypeId="6" PostId="12677" RevisionGUID="17ce0961-66ad-4b51-9a5d-2680ab6fd85b" CreationDate="2011-05-24T18:54:06.987" UserId="3588" Comment="Whew, lotsa tags. Also did a lot of fixing for capitalization, and removed all of those salutations. I still don't actually understand the last sentence on account of it contradicting itself, but I figure it's not my place to decide that one. ♪" Text="&lt;opengl&gt;&lt;c++&gt;&lt;coordinates&gt;&lt;sfml&gt;&lt;glut&gt;" />
  <row Id="27943" PostHistoryTypeId="24" PostId="12677" RevisionGUID="17ce0961-66ad-4b51-9a5d-2680ab6fd85b" CreationDate="2011-05-24T18:54:06.987" Comment="Proposed by 3588 approved by 51 edit id of 446" />
  <row Id="27944" PostHistoryTypeId="5" PostId="12678" RevisionGUID="74e946d3-40fe-4e9e-a20e-560499125047" CreationDate="2011-05-24T18:54:13.773" UserId="3588" Comment="Just some general grammar fixes, mostly inspired to start from your → you're ♪" Text="You can convert between 3D and 2D coordinates in a variety of ways, some of which have more meaning than others. For example you could just drop the Z coordinate, yielding an (x,y) pair, but that probably doesn't do what you want semantically.&#xD;&#xA;&#xD;&#xA;But you're specifically asking how to convert between model, world or view space 3D and screen space 2D as used by your graphics API, it sounds like. This primarily involves application of the appropriate transformation matrix, as well as performing the perspective division by W and any viewport transformations that may be warranted. gluProject does exactly this operation, all you have to do is provide it with input coordinates and matrices.&#xD;&#xA;&#xD;&#xA;gluProject assumes the input coordinates `objX`, `objY`, and `objZ` to be in model space, but they can be anywhere as long as the matrices you provide it via the `model` and `proj` parameters have associated meaningful values. The format of the `model` and `proj` matrices is an array of 16 floating point values, the same kind of data you'd get from `glGetFloatv` and such. The `view` parameter is an array of 4 integers representing the position and size of your viewport (from `glGetIntegerv` for example).&#xD;&#xA;&#xD;&#xA;To perform the operation in reverse, you can use gluUnproject. Note that since you'll have a 2D coordinate you'll have manually specify an arbitrary depth value. The 3D → 2D conversion perforce loses data, so you must invent new data when going in the other direction." />
  <row Id="27945" PostHistoryTypeId="24" PostId="12678" RevisionGUID="74e946d3-40fe-4e9e-a20e-560499125047" CreationDate="2011-05-24T18:54:13.773" Comment="Proposed by 3588 approved by 51 edit id of 447" />
  <row Id="27946" PostHistoryTypeId="5" PostId="12669" RevisionGUID="4a65420b-8821-4443-bd7b-141a694932b3" CreationDate="2011-05-24T19:06:16.867" UserId="51" Comment="added 3 characters in body; edited title" Text="**Edit:** To sum the question up, I have a voxel based world (Minecraft style (Thanks Communist Duck)) which is suffering from poor performance. I am not positive on the source but would like any possible advice on how to get rid of it.&#xD;&#xA;&#xD;&#xA;I am working on a project where a world consists of a large quantity of cubes (I would give you a number, but it is user defined worlds). My test one is around (48 x 32 x 48) blocks.&#xD;&#xA;&#xD;&#xA;Basically these blocks don't do anything in themselves. They just sit there.&#xD;&#xA;&#xD;&#xA;They start being used when it comes to player interaction.&#xD;&#xA;&#xD;&#xA;I need to check what cubes the users mouse interacts with (mouse over, clicking, etc.), and for collision detecting as the player moves.&#xD;&#xA;&#xD;&#xA;Now I had a massive amount of lag at first, looping through every block.&#xD;&#xA;&#xD;&#xA;I have managed to decrease that lag, by looping through all the blocks, and finding which blocks are within a particular range of the character, and then only looping through those blocks for the collision detection, etc.&#xD;&#xA;&#xD;&#xA;However, I am still going at a depressing 2fps.&#xD;&#xA;&#xD;&#xA;Does anyone have any other ideas on how I could decrease this lag?&#xD;&#xA;&#xD;&#xA;Btw, I am using XNA (C#) and yes, it is 3d." />
  <row Id="27947" PostHistoryTypeId="4" PostId="12669" RevisionGUID="4a65420b-8821-4443-bd7b-141a694932b3" CreationDate="2011-05-24T19:06:16.867" UserId="51" Comment="added 3 characters in body; edited title" Text="Working with lots of cubes. Improving performance?" />
  <row Id="27948" PostHistoryTypeId="2" PostId="12683" RevisionGUID="430644a5-9994-4b1d-8239-e905bd31a645" CreationDate="2011-05-24T19:10:32.293" UserId="6558" Text="&gt; I've considered the unfortunate&#xD;&#xA;&gt; possibility that node.js is just way&#xD;&#xA;&gt; slower than whatever TF2 is using, and&#xD;&#xA;&gt; may not be suited for this kind of&#xD;&#xA;&gt; high intensity task.&#xD;&#xA;&#xD;&#xA;It's probably this.  TF2's server is written using C/C++, and thus, is going to be faster than node.js (which if I remember correctly, uses Javascript interpreted in Java)&#xD;&#xA;&#xD;&#xA;Google's WebGL based Quake uses java for the server, and the source code is found here: http://code.google.com/p/quake2-gwt-port/.  It might be worth looking through that to see how it's done.  I also wonder what you mean when you talk about having a framerate on the server.  There's no reason to render anything on the server, it should just be there for processing commands sent by the client.&#xD;&#xA;&#xD;&#xA;Finally, the rule &quot;do not trust the client&quot; is more important than offloading expensive calculations onto the client in hopes of improving performance.  Especially something as important as collision detection.  Doubly so when your game is Javascript based, and thus fairly easy to hack (compared to something like TF2 which is compiled).&#xD;&#xA;&#xD;&#xA;I know this isn't much of an answer, but hopefully it'll point you in a few directions that might help improve performance." />
  <row Id="27949" PostHistoryTypeId="2" PostId="12684" RevisionGUID="7dc7a50d-1496-42c1-a8a3-014b26933137" CreationDate="2011-05-24T19:51:25.710" UserId="7559" Text="If your serious about making proper games with java then you need to stop using stuff like Swing, AWT and Java2D and pick up a proper OpenGL binding, e.g. LWJGL or use a games library built on top of an OpenGL binding, like Slick2D, Ardor3D, jMonkeyEngine, jPCT, Xith3D or LibGDX." />
  <row Id="27950" PostHistoryTypeId="2" PostId="12685" RevisionGUID="1317e20d-836a-4f3a-aa9f-cb0e3e4a332d" CreationDate="2011-05-24T20:55:05.377" UserId="7561" Text="To elaborate on Valkea's comment, the trick is to use 2D sprites just as you would in a &quot;true&quot; 2D game, but shade and style them to give a sense of depth.  The game feels 2D because your character has realistic shading that appears 3D, and because the map is constructed so that your character can go behind objects. This is achieved by making your character walk on a 2D space, but partially obscuring your view of him when he goes behind a wall (such as the wall transparency shown from your first link).&#xD;&#xA;&#xD;&#xA;Dynamic shadows like those shown in your second link are trickier and uncommon. I would look into the &quot;Sunburn Engine&quot; mentioned in the description of that second video for more details." />
  <row Id="27951" PostHistoryTypeId="2" PostId="12686" RevisionGUID="c9e899a0-b76a-4cb6-8395-9a80c77e95d3" CreationDate="2011-05-24T20:57:42.550" UserId="6467" Text="What contributed to the decline of sales of 3D platformers over the past decade?  (Other than Microsoft's acquisition of Rareware.)  Would it be a mistake for a developer other than Nintendo (or indie developer) to start working on one in 2011?" />
  <row Id="27952" PostHistoryTypeId="1" PostId="12686" RevisionGUID="c9e899a0-b76a-4cb6-8395-9a80c77e95d3" CreationDate="2011-05-24T20:57:42.550" UserId="6467" Text="The Decline of 3D Platformers" />
  <row Id="27953" PostHistoryTypeId="3" PostId="12686" RevisionGUID="c9e899a0-b76a-4cb6-8395-9a80c77e95d3" CreationDate="2011-05-24T20:57:42.550" UserId="6467" Text="&lt;platformer&gt;" />
  <row Id="27954" PostHistoryTypeId="2" PostId="12687" RevisionGUID="aa36c44d-b417-4faf-a312-4507fd40954c" CreationDate="2011-05-24T21:07:03.390" UserId="1258" Text="I'm not really a graphics programmer, but I used to toy around with Truevision3D 6.5 a few years ago. It wasn't too bad, but TV3D was just going nowhere so my foray into 3d game dev ended there.&#xD;&#xA;&#xD;&#xA;I know nothing of XNA. I think it's time to get up to date.&#xD;&#xA;&#xD;&#xA;My goal is to be able to render chunks of terrain from heightmaps (big huge terrain a la Morrowind) and BSP-like indoor areas (think Quake, so moveable objects like doors included). &#xD;&#xA;&#xD;&#xA;I googled for &quot;xna engine&quot;, &quot;best xna engine&quot; but the quantity of results is a bit scary for a xna-impaired like me.&#xD;&#xA;&#xD;&#xA;Can anyone recommend an engine (or a combination of libraries) to achieve the desired result? If you targeted similar features, can you share your experience?&#xD;&#xA;&#xD;&#xA;(and for a laugh, has anyone tried TV3D 6.5 here?)&#xD;&#xA;&#xD;&#xA;Thanks for your time.&#xD;&#xA;" />
  <row Id="27955" PostHistoryTypeId="1" PostId="12687" RevisionGUID="aa36c44d-b417-4faf-a312-4507fd40954c" CreationDate="2011-05-24T21:07:03.390" UserId="1258" Text="Engine with Terrain and Indoor Areas (BSP-like)" />
  <row Id="27956" PostHistoryTypeId="3" PostId="12687" RevisionGUID="aa36c44d-b417-4faf-a312-4507fd40954c" CreationDate="2011-05-24T21:07:03.390" UserId="1258" Text="&lt;xna&gt;&lt;c#&gt;&lt;terrain&gt;&lt;levels&gt;&lt;bsp&gt;" />
  <row Id="27957" PostHistoryTypeId="2" PostId="12688" RevisionGUID="6dcfec32-ace6-4a2f-8b24-9451e976a0c6" CreationDate="2011-05-24T21:11:22.207" UserId="7328" Text="I guess not, there are some 3d platformers being developed right now, eg. `bionic commando rearmed 2`, is going to be released feb2011 exclusive on ps3/xbox360. or there was another 3D platformer named `shadow complex` released at 2009 for xbox." />
  <row Id="27958" PostHistoryTypeId="25" PostId="12686" RevisionGUID="abea4208-d329-4185-a5b7-ab42cf762a18" CreationDate="2011-05-24T21:12:44.483" Comment="http://twitter.com/#!/StackGameDev/status/73134356989878272" />
  <row Id="27959" PostHistoryTypeId="2" PostId="12689" RevisionGUID="427cd252-3406-4604-8587-66d7fb1b42ca" CreationDate="2011-05-24T21:26:17.733" UserId="7562" Text="Getting started on a 2d platforming project in java. I've decided on using LWJGL and OpenGL, but I don't quite know where to start. What is typically the first thing one would work on with a platforming game?&#xD;&#xA;&#xD;&#xA;I've never done any game development before, but I'm hoping this will be good practice and hopefully fun to implement and eventually play.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="27960" PostHistoryTypeId="1" PostId="12689" RevisionGUID="427cd252-3406-4604-8587-66d7fb1b42ca" CreationDate="2011-05-24T21:26:17.733" UserId="7562" Text="Starting Java 2D Platformer using LWJGL" />
  <row Id="27961" PostHistoryTypeId="3" PostId="12689" RevisionGUID="427cd252-3406-4604-8587-66d7fb1b42ca" CreationDate="2011-05-24T21:26:17.733" UserId="7562" Text="&lt;opengl&gt;&lt;2d&gt;&lt;java&gt;&lt;lwjgl&gt;&lt;platformer&gt;" />
  <row Id="27962" PostHistoryTypeId="5" PostId="12672" RevisionGUID="3ca0099e-3fb9-447d-ac71-eed054401a19" CreationDate="2011-05-24T21:28:10.080" UserId="7328" Comment="added sample Director class" Text="The most common approch to GameState algorithm is to have some game states and program can freely choose to run any one of them, this means there is a GameDirector which has a pointer to current running state, and in each update cycle it'll call 'currentState-&gt;run()`.&#xD;&#xA;in this approch GameDirector is a singleton and every one can access it, and also every one can change game state. also gameDirector is responsible for game's main loop.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	class Director&#xD;&#xA;	{&#xD;&#xA;	private :&#xD;&#xA;		RendererEngine* rEngine;&#xD;&#xA;		SoundEngine* sEngine;&#xD;&#xA;		PhysicsEngine* pEngine;&#xD;&#xA;		GameState* gState;&#xD;&#xA;		static Director* instance;&#xD;&#xA;		Director()&#xD;&#xA;		{&#xD;&#xA;			rEngine = sEngine = pEngine = gState = NULL;&#xD;&#xA;		}&#xD;&#xA;	public :&#xD;&#xA;		static Director* GetDirector()&#xD;&#xA;		{&#xD;&#xA;			if (instance == NULL)&#xD;&#xA;				instance = new Director;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		RenderEngine* getRenderEngine() {return rEngine;};&#xD;&#xA;		SoundEngine* getSoundEngine() {return sEngine;};&#xD;&#xA;		PhysicsEngine* getPhysicsEngine() {return pEngine;};&#xD;&#xA;			&#xD;&#xA;		void runGame(GameState* pState)&#xD;&#xA;		{&#xD;&#xA;			return instace;&#xD;&#xA;			rEngine = new RenderEngine;&#xD;&#xA;			sEngine = new SoundEngine;&#xD;&#xA;			pEngine = new PhysicsEngine;&#xD;&#xA;			gState = pState;&#xD;&#xA;			gState-&gt;onEnter();&#xD;&#xA;			while (gState)&#xD;&#xA;			{&#xD;&#xA;				gState-&gt;onUpdate();&#xD;&#xA;				gState-&gt;onDraw();&#xD;&#xA;				rEngine-&gt;swapBuffers();&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		void changeState(GameState* pState)&#xD;&#xA;		{&#xD;&#xA;			gState -&gt; onEnd();&#xD;&#xA;			gState = pState;&#xD;&#xA;			if (gState)&#xD;&#xA;				gState -&gt; onEnter();&#xD;&#xA;		}&#xD;&#xA;	}" />
  <row Id="27963" PostHistoryTypeId="2" PostId="12690" RevisionGUID="98333ff0-7589-4bbc-b8e2-85dfd70d2597" CreationDate="2011-05-24T22:02:27.807" UserId="6558" Text="I think there's a few reasons behind 3d platformers declining in popularity, and thus, declining in sales (and since sales is the defining metric for what types of games are made, you can draw your conclusions from that).&#xD;&#xA;&#xD;&#xA;First, Jeff's comment about people simply not comprehending 3d too well on a 2d screen.  Now, you could argue that FPS games are 3d on 2d screens, and they've been around for ages.  But the key factor there is the camera position.  People can translate a first person view better than over the shoulder camera.  Now, there's open world games (GTA/Just Cause, etc) that use an over the shoulder camera, and they're still around.  But how many times do you need to do precision platforming in those games?  Rarely, if ever.&#xD;&#xA;&#xD;&#xA;So, the camera is a problem, especially combined with precision platforming that is the stable of most platformer games in general.  Which brings up the question of controls.  You need good, solid controls, otherwise your game will be considered hard, or frustrating, or just plain bad.  This is a problem with any game, but it's definitely true of platformers.&#xD;&#xA;&#xD;&#xA;Finally, all those games mentioned in your original question likely were too much.  Specifically, I'm talking about Donkey Kong 64.  It's a game with too many bad worlds and too many characters who have little to no variety in control or theme.  Overall, it's a chore to get through and there's very few 'good' parts.  For the same reason adventure games died because of terrible puzzle design, 3d platformers died because they were all collectathons.&#xD;&#xA;&#xD;&#xA;Now, all of that said, they're not *completely* dead (Mario Galaxy has sections of 'true 3d').  But creating a good 3d platformer is hard, and the asset creation time would be better spent on creating a more popular game type (like an FPS, at the moment).  2d platformers (even 2.5d like Shadow Complex) are still cheaper to make, and it's too much of a risk to make a full sized 3d platformer at the moment." />
  <row Id="27964" PostHistoryTypeId="2" PostId="12691" RevisionGUID="735aff91-b2c9-4f44-84de-4e75c5ded79a" CreationDate="2011-05-24T22:41:16.713" UserId="7548" Text="A few things come to mind for me:&#xD;&#xA;&#xD;&#xA;1. Recent global economic problems -- people buy less when they don't have money, and in recent years this factor seems to have especially effected many industries that provide &quot;want&quot; products rather than &quot;need&quot; products (it's important to note, however, that a few vendors have been very successful at creating a perceived &quot;need&quot; factor for their products such as Apple with their iPhone, which serves to skew this even further).&#xD;&#xA;&#xD;&#xA;2. Lack of variation -- to many people, 3D games are all essentially the same, just with different wepaons/tools and scenery, with the occasional different rule.  So you buy a new 3D game, is it really as exciting as it used to be after playing dozens of other 3D games over the past few years?&#xD;&#xA;&#xD;&#xA;3. MMORPG addiction -- a lot of people got addicted to some very popular games like World of Warcraft, and spent most of their time on these games instead of purchasing and exploring new titles.  When users find a game they really like, they tend to dedicate a lot more time to it, and as long as they continue to be entertained there is far less motive to look elsewhere for new gaming experiences.&#xD;&#xA;" />
  <row Id="27965" PostHistoryTypeId="25" PostId="12687" RevisionGUID="c23d6bc7-e3b0-4f86-b14f-1d5a3461fa7b" CreationDate="2011-05-25T00:12:44.210" Comment="http://twitter.com/#!/StackGameDev/status/73179653610803200" />
  <row Id="27966" PostHistoryTypeId="2" PostId="12692" RevisionGUID="58aa4736-b6e5-499e-b0e4-2151bf98e191" CreationDate="2011-05-25T01:15:05.877" UserId="7561" Text="Have you looked into [Ogre3D][1]? Ogre is a fairly intuitive hardware-accelerated graphics rendering engine. Not a full game engine, but it doesn't sound like you really need much beyond graphics drawing and basic manipulation, which it can handle. There's an incredibly informative wiki with plenty of tutorials [here][2]; the beginner's project is preconfigured with basic camera movement controls. &#xD;&#xA;&#xD;&#xA;It uses a mesh format for it's model data, but there are plugins for most (if not all) of the major 3D modeling software for converting their formats to Ogre's.&#xD;&#xA;&#xD;&#xA;There are bindings for Ogre in quite a few different languages, including Python and C++, as well as an experimental port for .NET called [Axiom3D][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/&#xD;&#xA;  [2]: http://www.ogre3d.org/tikiwiki/&#xD;&#xA;  [3]: http://axiom3d.net/wiki/index.php/Main_Page" />
  <row Id="27967" PostHistoryTypeId="2" PostId="12693" RevisionGUID="008d22a8-9c35-4c8c-be13-afbf1d77adae" CreationDate="2011-05-25T02:49:39.280" UserId="7563" Text="I'd add an invisible object just after the slope that uses gravity to pull down your character to avoid the character flying off like you said. &#xD;&#xA;&#xD;&#xA;Yes this is possible in box2d but I am unable to tell you how without more information on your project.&#xD;&#xA;&#xD;&#xA;(You'll need to learn box2d engine and look at what you can change to the players characters physics when they come off the slope or what you can do to prevent the actions occuring). &#xD;&#xA;" />
  <row Id="27968" PostHistoryTypeId="5" PostId="12681" RevisionGUID="6b9e01ef-6c54-4869-80d3-dac42a7f652a" CreationDate="2011-05-25T03:09:29.317" UserId="141" Comment="added 989 characters in body" Text="This is related to http://gamedev.stackexchange.com/questions/2166/mmo-performance except that question is about bandwidth. This is about cpu load.&#xD;&#xA;&#xD;&#xA;I put together a simple FPS using node.js and webGL. It's extremely simple, a lot like the BuddyMaze clone of MIDI Maze. There's very little going on, everyone moves in two dimensions (no height), shoots simple projectiles, and runs into walls.&#xD;&#xA;&#xD;&#xA;Right now, if I make multiple connections to the server where every player shoots rapidly while spinning in circles, I can get about 15 - 20 players in the game before the server maxes out a core and slows way down. And this is when running at 30 fps on the server. At 10 fps, I get about 25 - 30 connections. This is pretty bad, since the game is going to have a lot more to do soon and I'll need to fit more players for this to be a feasible endeavor.&#xD;&#xA;&#xD;&#xA;My brother just pointed out some stats about his coworker's TF2 server. His server is lower specs than ours, yet it runs TF2, obviously a much more complex game, at a whopping 500 ticks per second, with 36 users per core. Also, we currently consume much more bandwidth than they do, but we haven't been trying to lower that much yet.&#xD;&#xA;&#xD;&#xA;How is this possible? What sort of tricks are there to increase server performance to this magnitude? Some things that I know of include:&#xD;&#xA;&#xD;&#xA;   * Lowering framerate on the server, and interpolate positions on the client. I got some benefit, but clearly the TF2 server doesn't even bother with this.&#xD;&#xA;   * Doing expensive things like collision detection on the client, and verify it infrequently on the server. I haven't moved this over just yet, I will tonight. Even so I don't expect such an enormous gain.&#xD;&#xA;   * Break the playing field into regions (quad trees) to minimize calculations. Haven't had an opportunity for this yet.&#xD;&#xA;   * I've considered the unfortunate possibility that node.js is just way slower than whatever TF2 is using, and may not be suited for this kind of high intensity task.&#xD;&#xA;   * Is it all in the server configuration magic?&#xD;&#xA;&#xD;&#xA;So what are the other tricks of the industry to do only the minimum required on the server but still have a flawless game experience? There's a big conflict between &quot;defer to client to save cpu time&quot; and &quot;don't trust the client&quot;, so maybe it helps to know where the line is drawn in various situations?&#xD;&#xA;&#xD;&#xA;Update&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;Profiling really is the only mantra I've ever found that's absolutely infallible. I quickly wrapped some timing functions around my code (thanks, FP!) and discovered what I never expected: the act of broadcasting the data to clients accounts for nearly all of the execution time. Specifically, around 90% of it. Further testing showed that this time is dependent on both the number of clients and the size of the data, but more so the latter. On a 20 user load, I cut my broadcast time 90%, from 24ms down to just over 2ms by sending only &quot;{}&quot; instead of the full data. But with only 5 users, broadcasting takes around 0.5 ms. So I clearly need to do some optimization here.&#xD;&#xA;&#xD;&#xA;The first most obvious improvement is line of sight checking. This would decrease both the number of people who care about data, and also the amount of data sent to interested parties. Are there other tricks in this realm I can try, which focus on minimizing the cost of my broadcast operation?" />
  <row Id="27969" PostHistoryTypeId="25" PostId="12681" RevisionGUID="903f70c3-4da9-48eb-a57c-87696606a5d7" CreationDate="2011-05-25T03:12:44.440" Comment="http://twitter.com/#!/StackGameDev/status/73224954526703616" />
  <row Id="27970" PostHistoryTypeId="2" PostId="12694" RevisionGUID="636dc21b-d0a4-40a1-8dfd-c4a0934fbbf1" CreationDate="2011-05-25T03:31:29.157" UserId="1588" Text="Blender (the 3D editor) may be useful, it has an interactive game feature and python scripting.  http://blender.org/features-gallery/features/" />
  <row Id="27971" PostHistoryTypeId="2" PostId="12695" RevisionGUID="2de5781d-11b9-4708-a85a-4909744384a3" CreationDate="2011-05-25T04:23:17.253" UserId="2710" Text="Look into Unity3D. It's a nice engine that uses C#, and it has nice terrain engine and can work with &quot;indoor&quot; maps (no BSP though, as far as I know). Although you'd have to jump through a *lot* of hoops if you want to use them both simultaneously in the same scene." />
  <row Id="27975" PostHistoryTypeId="2" PostId="12697" RevisionGUID="71302ffb-b0d2-42f3-960e-808a1e335f87" CreationDate="2011-05-25T05:33:04.740" UserId="1173" Text="Something I found interesting when looking around was the Advanced Ogre Framework which has a state management implementation. It is designed for the Ogre3D rendering engine but that part can be replaced pretty easily.&#xD;&#xA;&#xD;&#xA;http://www.ogre3d.org/tikiwiki/Advanced%20Ogre%20Framework" />
  <row Id="27977" PostHistoryTypeId="25" PostId="12675" RevisionGUID="ea37e775-4f09-4c7d-babb-58ab813257cd" CreationDate="2011-05-25T06:12:45.820" Comment="http://twitter.com/#!/StackGameDev/status/73270258105974784" />
  <row Id="27978" PostHistoryTypeId="5" PostId="12687" RevisionGUID="e6238f5a-3b9b-4f7f-9859-cfb660b13c83" CreationDate="2011-05-25T08:01:28.207" UserId="1258" Comment="info" Text="I'm not really a graphics programmer, but I used to toy around with Truevision3D 6.5 a few years ago. It wasn't too bad, but TV3D was just going nowhere so my foray into 3d game dev ended there.&#xD;&#xA;&#xD;&#xA;I know nothing of XNA. I think it's time to get up to date.&#xD;&#xA;&#xD;&#xA;My goal is to be able to render chunks of terrain from heightmaps (big huge terrain a la Morrowind) and BSP-like indoor areas (think Quake, so moveable objects like doors included). &#xD;&#xA;&#xD;&#xA;I googled for &quot;xna engine&quot;, &quot;best xna engine&quot; but the quantity of results is a bit scary for a xna-impaired like me.&#xD;&#xA;&#xD;&#xA;Can anyone recommend a _xna_ engine (or a combination of libraries) to achieve the desired result? If you targeted similar features, can you share your experience?&#xD;&#xA;&#xD;&#xA;(and for a laugh, has anyone tried TV3D 6.5 here?)&#xD;&#xA;&#xD;&#xA;Thanks for your time.&#xD;&#xA;&#xD;&#xA;Edit: I'm looking for something xna-related." />
  <row Id="27980" PostHistoryTypeId="25" PostId="12670" RevisionGUID="de702a22-c458-4f33-858f-618e5ae5b968" CreationDate="2011-05-25T09:12:46.747" Comment="http://twitter.com/#!/StackGameDev/status/73315559747489792" />
  <row Id="27981" PostHistoryTypeId="5" PostId="12664" RevisionGUID="a7aa632d-5348-4a14-8f68-2dc079fb92f9" CreationDate="2011-05-25T09:19:50.897" UserId="7168" Comment="added 267 characters in body" Text="I have been attempting to make a game engine in C++ and have come across the dilemma of game state management. I have done a lot of research and found numerous ways of accomplishing from game engine with derived classes to using enums and I would like to know the most effective/efficient way of managing game states.&#xD;&#xA;&#xD;&#xA;EDIT  &#xD;&#xA;i just wonted to quickly rephrase my question...i would like to now how u implement your game state management...what you like the most and why you like it..also any tutorials/code examples generally about game state that would also be much appreciated.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27982" PostHistoryTypeId="2" PostId="12698" RevisionGUID="e1e05cb2-b079-45ff-9cf2-15545b706615" CreationDate="2011-05-25T09:29:12.887" UserId="3212" Text="I  have also developed a casual game for Android version 1.6. As you have done, i have also used a imageview as the background, added custom views to accomodate my gameplay area. &#xD;&#xA;  &#xD;&#xA;This is working very fine for my game. Because, first thing, the views are not complex, second thing, the responsiveness is good, and third, the game flow is also maintained efficiently.  &#xD;&#xA;&#xD;&#xA;But this is okay for a casual games like board games, games where only 2/3 activities are used (my game uses only 2 activities, with complete game life cycle) or simple puzzle games.  &#xD;&#xA;&#xD;&#xA;So depending on the complexity of the project the views must be defined. It is better to keep the flow simple and responsive. " />
  <row Id="27983" PostHistoryTypeId="2" PostId="12699" RevisionGUID="90b9dfff-73e2-4e14-b631-7e59023a4a9e" CreationDate="2011-05-25T09:46:40.233" UserId="1156" Text="One I have heard good things about is the [Sunburn engine][1]. (Site seems down currently)&#xD;&#xA;&#xD;&#xA;Chances are you're not going to get all you want out the box. However, Riemer has a great tutorial about heightmaps [here][2] - in XNA!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: www.synapsegaming.com/products/sunburn/engine/&#xD;&#xA;  [2]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Terrain_from_file.php" />
  <row Id="27984" PostHistoryTypeId="5" PostId="12679" RevisionGUID="afa5e745-f9c9-4ba2-8a75-41a6f477cffb" CreationDate="2011-05-25T09:49:40.707" UserId="5021" Comment="deleted 262 characters in body; added 55 characters in body" Text="If your player is large relative to the size of the cubes, then you probably want an octree or other spatial partitioning structure, as other's have suggested.&#xD;&#xA;&#xD;&#xA;However, if your player is small relative to the size of the cubes, then probably the fastest way to detect collision with the cubes is to do a simple linear search of the area around the player.&#xD;&#xA;&#xD;&#xA;Since your player is smaller than 1 cube, then you only need to test for collision against the neighboring 27 cubes, at most.&#xD;&#xA;&#xD;&#xA;This assumes that you store the cubes in an array that you can index into, with one slot in the array for every cube.&#xD;&#xA;&#xD;&#xA;As other's have pointed out, you need to profile your code to see what is actually slowing you down.&#xD;&#xA;&#xD;&#xA;If I had to guess though, I'd say that you are probably doing a draw call for every cube, which would be your bottleneck by far. To fix that, you should look into geometry instancing." />
  <row Id="27985" PostHistoryTypeId="2" PostId="12700" RevisionGUID="4a76aa35-58c2-4124-bd44-5298281a832a" CreationDate="2011-05-25T10:07:57.127" UserId="5021" Text="If you want perfect terrain contact at all times then you need to stop applying Box2D collision response to the player, and apply your own physics rules, because what you describe is not compatible with newtonian physics rules, which are the rules that Box2D follows.&#xD;&#xA;&#xD;&#xA;However, you can get pretty close, while still using newtonian physics.&#xD;&#xA;&#xD;&#xA;Increase the mass of the player to something large, and apply some downward force to the player.&#xD;&#xA;&#xD;&#xA;Do not make the player's mass too large relative to other objects though, as large mass differences can result in large floating point errors and poor collision response.&#xD;&#xA;&#xD;&#xA;Start with a small amount of mass, and gradually increase it until you find something that works while the simulation remains stable.&#xD;&#xA;&#xD;&#xA;As you increase the mass of the player, increase the amount of downward force applied to the player at each frame. I'm not very familiar with Box2D, but this can probably be done with an impulse that is applied to the player every physics update.&#xD;&#xA;&#xD;&#xA;Keep in mind that this means that all objects interacting with the player are not going to move the player very much unless they are also heavy, like your player is.&#xD;&#xA;&#xD;&#xA;Note that you're going to have to increase the size of the impulse you apply to the player to make him move, as you increase the mass of the player, if you want him to continue at the same speed.&#xD;&#xA;&#xD;&#xA;Keep in mind that the hero will have higher inertia with higher mass, so you have to decide if you want the hero to keep moving after the player moves him to the right a little. If not, try increasing friction forces on the player." />
  <row Id="27986" PostHistoryTypeId="2" PostId="12701" RevisionGUID="fa0bd5a1-67de-4e77-92ee-c842c917bac2" CreationDate="2011-05-25T10:19:36.410" UserId="7328" Text="i'm just wondering what is XNA missing to be considered as a GameEngine? it does all the thing a GameEngine should do (except the physics part), it has a support for every aspect defined in defenition of [GameEngine](http://en.wikipedia.org/wiki/Game_engine)." />
  <row Id="27987" PostHistoryTypeId="1" PostId="12701" RevisionGUID="fa0bd5a1-67de-4e77-92ee-c842c917bac2" CreationDate="2011-05-25T10:19:36.410" UserId="7328" Text="Why XNA is not considered as a GameEngine?" />
  <row Id="27988" PostHistoryTypeId="3" PostId="12701" RevisionGUID="fa0bd5a1-67de-4e77-92ee-c842c917bac2" CreationDate="2011-05-25T10:19:36.410" UserId="7328" Text="&lt;xna&gt;" />
  <row Id="27989" PostHistoryTypeId="2" PostId="12702" RevisionGUID="e6e9c7c2-f14f-4bb9-87e9-0eb9995591e8" CreationDate="2011-05-25T10:22:24.040" UserId="7558" Text="I'm going to write online game, not MMO, but something like a lot of Flash game. But with OpenGL rendering, because Flash is using CPU for rendering.&#xD;&#xA;&#xD;&#xA;What are advantages of pure Java or c++ with Java that only create window." />
  <row Id="27990" PostHistoryTypeId="1" PostId="12702" RevisionGUID="e6e9c7c2-f14f-4bb9-87e9-0eb9995591e8" CreationDate="2011-05-25T10:22:24.040" UserId="7558" Text="OpenGL web game: C++ with Java vs pure Java ?" />
  <row Id="27991" PostHistoryTypeId="3" PostId="12702" RevisionGUID="e6e9c7c2-f14f-4bb9-87e9-0eb9995591e8" CreationDate="2011-05-25T10:22:24.040" UserId="7558" Text="&lt;c++&gt;&lt;java&gt;&lt;language-choice&gt;" />
  <row Id="27992" PostHistoryTypeId="2" PostId="12703" RevisionGUID="05d5a829-b998-4579-9d84-02dd452c52a8" CreationDate="2011-05-25T10:30:39.043" UserId="7375" Text="I have a 2D side scroller whose levels are stored as vectors (that is, a bunch of lines) which looks like this:&#xD;&#xA;&#xD;&#xA;![example level][1]&#xD;&#xA;&#xD;&#xA;How would I detect that I'm colliding with one of these lines, and react accordingly (say, slide down the slope, or stand still on a flat platform)? We can assume the player uses an AABB.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Oq15Z.png" />
  <row Id="27993" PostHistoryTypeId="1" PostId="12703" RevisionGUID="05d5a829-b998-4579-9d84-02dd452c52a8" CreationDate="2011-05-25T10:30:39.043" UserId="7375" Text="Collision Detection/Response in Vector-based levels" />
  <row Id="27994" PostHistoryTypeId="3" PostId="12703" RevisionGUID="05d5a829-b998-4579-9d84-02dd452c52a8" CreationDate="2011-05-25T10:30:39.043" UserId="7375" Text="&lt;collision-detection&gt;&lt;physics&gt;&lt;vector&gt;&lt;side-scroller&gt;" />
  <row Id="27995" PostHistoryTypeId="5" PostId="12699" RevisionGUID="ddc2fa96-eb96-4f9c-9652-6f9984e752ee" CreationDate="2011-05-25T10:39:40.683" UserId="1156" Comment="added 422 characters in body" Text="One I have heard good things about is the [Sunburn engine][1]. (Site seems down currently)&#xD;&#xA;&#xD;&#xA;Chances are you're not going to get all you want out the box. However, Riemer has a great tutorial about heightmaps [here][2] - in XNA!&#xD;&#xA;&#xD;&#xA;EDIT: This is probably a little off what you want, but Sean James has a great (well, I'm not a fan of the architecture of gamescreen/component but other than that I love it) tutorial on [writing a simple 3D engine in XNA][3] - it's pretty concise. The advantage is it's free to do by yourself, and if your goal is learning it would be good.&#xD;&#xA;&#xD;&#xA;  [1]: www.synapsegaming.com/products/sunburn/engine/&#xD;&#xA;  [2]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Terrain_from_file.php&#xD;&#xA;  [3]: http://www.innovativegames.net/blog/blog/category/game-engine-tutorial/" />
  <row Id="27996" PostHistoryTypeId="2" PostId="12704" RevisionGUID="c29648fd-de37-42a3-b656-22545c9153e6" CreationDate="2011-05-25T10:45:29.910" UserId="1156" Text="&gt; Microsoft XNA is **a set of tools** with a&#xD;&#xA;&gt; managed runtime environment provided&#xD;&#xA;&gt; by Microsoft that facilitates computer&#xD;&#xA;&gt; game development and management. **XNA&#xD;&#xA;&gt; attempts to free game developers from&#xD;&#xA;&gt; writing &quot;repetitive boilerplate&#xD;&#xA;&gt; code&quot;** and to bring different&#xD;&#xA;&gt; aspects of game production into a&#xD;&#xA;&gt; single system.&#xD;&#xA;&#xD;&#xA;It is designed as a framework - in fact, XNA is the Microsoft XNA Framework - so technically it's not an engine by name. &#xD;&#xA;&#xD;&#xA;There is no 'engine' - if you notice, you derive your main class from XNA.Framework.Game and have to override the draw and update functions yourself. There is no central rendering system, or input system, or audio system ready out of the box. There is SpriteBatch and the vertex classes, there is KeyboardState, and there are some audio classes..but they are only abstractions over the low level drawing code.&#xD;&#xA;&#xD;&#xA;EDIT: For the sake of usefulness, why does something matter if it's labelled as an engine, framework, library, or toolset?" />
  <row Id="27997" PostHistoryTypeId="2" PostId="12705" RevisionGUID="8d85b553-7bda-44df-ae14-bb84436e58f0" CreationDate="2011-05-25T10:51:21.893" UserId="7328" Text="for each line (represented by ax+by+c = 0) and each object(which moved from x0,y0 to x1 y1) you have to check if the result of this product is negetive `(a*x0+b*y0+c)*(a*x1+b*y1+c)`. negetive value means there is a collision somewhere(it may be after the both end of line) and the possitive value means there are no collisions. if there realy was a collision then you have to calculate collision point using these formulas and check if that's somewhere between two ends of your line.&#xD;&#xA;&#xD;&#xA;we want to calculate the collision point of these 2 lines :&#xD;&#xA;&#xD;&#xA;    ax+bx+c = 0&#xD;&#xA;    (x1-x0)x+(y1-y0)y - (x1-x0)x0+(y1-y0)y0 = 0&#xD;&#xA;&#xD;&#xA;so we set these 3 parameters for comuting ease:&#xD;&#xA;&#xD;&#xA;    a' = x1 - x0&#xD;&#xA;    b' = y1 - y0&#xD;&#xA;    c' = -(a' * x0 + b' * y0)&#xD;&#xA;&#xD;&#xA;and now our problem is :&#xD;&#xA;&#xD;&#xA;    ax +bx +c  = 0;&#xD;&#xA;    a'x+b'y+c' = 0;&#xD;&#xA;&#xD;&#xA;and then you can have x',y'(collision coordinates)&#xD;&#xA;&#xD;&#xA;after that to check if it's inside the line fragment you have to check if `(x0-x')*(x1-x')+(y0-y')*(y1-y')` is a negetive value, if yes you have a real collision if not the object is past from sides of your line.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27998" PostHistoryTypeId="5" PostId="12705" RevisionGUID="6d192f09-5f33-4ebd-81cf-9b3a0be9eb9d" CreationDate="2011-05-25T10:57:35.660" UserId="7328" Comment="edited body" Text="for each line (represented by ax+by+c = 0) and each object(which moved from x0,y0 to x1 y1) you have to check if the result of this product is negetive `(a*x0+b*y0+c)*(a*x1+b*y1+c)`. negetive value means there is a collision somewhere(it may be after the both end of line) and the possitive value means there are no collisions. if there realy was a collision then you have to calculate collision point using these formulas and check if that's somewhere between two ends of your line.&#xD;&#xA;&#xD;&#xA;we want to calculate the collision point of these 2 lines :&#xD;&#xA;&#xD;&#xA;    ax+bx+c = 0&#xD;&#xA;    (x1-x0)x+(y1-y0)y - (x1-x0)x0+(y1-y0)y0 = 0&#xD;&#xA;&#xD;&#xA;so we set these 3 parameters for comuting ease:&#xD;&#xA;&#xD;&#xA;    a' = x1 - x0&#xD;&#xA;    b' = y1 - y0&#xD;&#xA;    c' = -(a' * x0 + b' * y0)&#xD;&#xA;&#xD;&#xA;and now our problem is :&#xD;&#xA;&#xD;&#xA;    ax +by +c  = 0;&#xD;&#xA;    a'x+b'y+c' = 0;&#xD;&#xA;&#xD;&#xA;and then you can have x',y'(collision coordinates)&#xD;&#xA;&#xD;&#xA;after that to check if it's inside the line fragment you have to check if `(x0-x')*(x1-x')+(y0-y')*(y1-y')` is a negetive value, if yes you have a real collision if not the object is past from sides of your line.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="27999" PostHistoryTypeId="2" PostId="12706" RevisionGUID="6a8070f4-e3a4-467e-a907-7784013574ec" CreationDate="2011-05-25T10:59:53.417" UserId="1839" Text="You might want to use a physics engine that does the work for you. Even if you get the collision detection right, there is still the problem of the collision response that let's the character slide down a slope, which can be even harder than the actual collision detection. &#xD;&#xA;&#xD;&#xA;[Box2D][1] can do it for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/" />
  <row Id="28000" PostHistoryTypeId="5" PostId="12705" RevisionGUID="fe583c00-7bd5-4c6a-94aa-de91b4f30716" CreationDate="2011-05-25T11:06:32.110" UserId="7328" Comment="added 70 characters in body" Text="for each line (represented by ax+by+c = 0) and each object(which moved from x0,y0 to x1 y1) you have to check if the result of this product is negetive `(a*x0+b*y0+c)*(a*x1+b*y1+c)`. negetive value means there is a collision somewhere(it may be after the both end of line) and the possitive value means there are no collisions. if there realy was a collision then you have to calculate collision point using these formulas and check if that's somewhere between two ends of your line.&#xD;&#xA;&#xD;&#xA;we want to calculate the collision point of these 2 lines :&#xD;&#xA;&#xD;&#xA;    ax+bx+c = 0&#xD;&#xA;    (x1-x0)x+(y1-y0)y - (x1-x0)x0+(y1-y0)y0 = 0&#xD;&#xA;&#xD;&#xA;so we set these 3 parameters for comuting ease:&#xD;&#xA;&#xD;&#xA;    a' = x1 - x0&#xD;&#xA;    b' = y1 - y0&#xD;&#xA;    c' = -(a' * x0 + b' * y0)&#xD;&#xA;&#xD;&#xA;and now our problem is :&#xD;&#xA;&#xD;&#xA;    ax +by +c  = 0;&#xD;&#xA;    a'x+b'y+c' = 0;&#xD;&#xA;&#xD;&#xA;and then you can have x',y'(collision coordinates)&#xD;&#xA;&#xD;&#xA;	x' = -(c/b + c') /(a' + b'/b*a)&#xD;&#xA;	y' = -(c/a + c') /(b' + a'/a*b)&#xD;&#xA;&#xD;&#xA;after that to check if it's inside the line fragment you have to check if `(x0-x')*(x1-x')+(y0-y')*(y1-y')` is a negetive value, if yes you have a real collision if not the object is past from sides of your line.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28001" PostHistoryTypeId="5" PostId="12704" RevisionGUID="61e7f2f6-d014-4594-8b13-25f777f2efbe" CreationDate="2011-05-25T11:26:59.053" UserId="1156" Comment="added 763 characters in body" Text="&gt; Microsoft XNA is **a set of tools** with a&#xD;&#xA;&gt; managed runtime environment provided&#xD;&#xA;&gt; by Microsoft that facilitates computer&#xD;&#xA;&gt; game development and management. **XNA&#xD;&#xA;&gt; attempts to free game developers from&#xD;&#xA;&gt; writing &quot;repetitive boilerplate&#xD;&#xA;&gt; code&quot;** and to bring different&#xD;&#xA;&gt; aspects of game production into a&#xD;&#xA;&gt; single system.&#xD;&#xA;&#xD;&#xA;It is designed as a framework - in fact, XNA is the Microsoft XNA Framework - so technically it's not an engine by name. &#xD;&#xA;&#xD;&#xA;There is no 'engine' - if you notice, you derive your main class from XNA.Framework.Game and have to override the draw and update functions yourself. There is no central rendering system, or input system, or audio system ready out of the box. There is SpriteBatch and the vertex classes, there is KeyboardState, and there are some audio classes..but they are only abstractions over the low level drawing code.&#xD;&#xA;&#xD;&#xA;EDIT: For the sake of usefulness, why does something matter if it's labelled as an engine, framework, library, or toolset?&#xD;&#xA;&#xD;&#xA;To clear things up somewhat: I am developing an engine in XNA. Obviously I can't do that in something like Unreal, like Jonathan has mentioned. However, there are a few things I feel are important that XNA just doesn't have:&#xD;&#xA;&#xD;&#xA;Plug-n-play: I want to be able to make some kind of template - have this HP, this mesh, this animation and BOOM! I have an NPC in my game.&#xD;&#xA;&#xD;&#xA;Hidden low level - XNA does this already, but I don't want to fiddle around with GameServiceProviders. I just want to shove stuff together.&#xD;&#xA;&#xD;&#xA;Game separated from engine - There may be a 'game' class, but I want to separate my logic and my code from the base system. I don't want `if(player.hasitem(Item.SECRET_SWORD_OF_SECRETNESS)` mixed with updating the buffers on my graphics renderer." />
  <row Id="28002" PostHistoryTypeId="5" PostId="12701" RevisionGUID="f54b0649-160a-473f-9305-805bc6836fcb" CreationDate="2011-05-25T11:36:22.240" UserId="1156" Comment="Grammar, spelling, clean up; edited tags" Text="I'm just wondering what XNA is missing to be considered as a game engine? It does all the things a game engine should do (except the physics part); it also has support for every aspect defined on wikipedia's article on [game engines](http://en.wikipedia.org/wiki/Game_engine)." />
  <row Id="28003" PostHistoryTypeId="4" PostId="12701" RevisionGUID="f54b0649-160a-473f-9305-805bc6836fcb" CreationDate="2011-05-25T11:36:22.240" UserId="1156" Comment="Grammar, spelling, clean up; edited tags" Text="Why XNA is not considered a game engine?" />
  <row Id="28004" PostHistoryTypeId="6" PostId="12701" RevisionGUID="f54b0649-160a-473f-9305-805bc6836fcb" CreationDate="2011-05-25T11:36:22.240" UserId="1156" Comment="Grammar, spelling, clean up; edited tags" Text="&lt;xna&gt;&lt;engine&gt;" />
  <row Id="28005" PostHistoryTypeId="25" PostId="12701" RevisionGUID="66b8ce8b-b936-4efd-8256-e65a782c2be8" CreationDate="2011-05-25T12:12:47.727" Comment="http://twitter.com/#!/StackGameDev/status/73360863284838400" />
  <row Id="28006" PostHistoryTypeId="2" PostId="12707" RevisionGUID="ed9858eb-4258-4f85-a20c-6d11780beae2" CreationDate="2011-05-25T12:52:00.877" UserId="7328" Text="There are many optimization tricks that you can apply to your c++ code that can help speed up your program, and there are more Game-related tweaks poping out every day, eg. i've just heard where you are trying to draw some meshes with same texture it's faster to draw them all in one call (or something like that which mean to pass texture once and for all of them). is there any books or weblogs or ... which demonstrate these things? (and i'm working with c++ if there are any general advises about optimization i'll be glad to hear about them)" />
  <row Id="28007" PostHistoryTypeId="1" PostId="12707" RevisionGUID="ed9858eb-4258-4f85-a20c-6d11780beae2" CreationDate="2011-05-25T12:52:00.877" UserId="7328" Text="are there any resources about performance tweaks?" />
  <row Id="28008" PostHistoryTypeId="3" PostId="12707" RevisionGUID="ed9858eb-4258-4f85-a20c-6d11780beae2" CreationDate="2011-05-25T12:52:00.877" UserId="7328" Text="&lt;c++&gt;&lt;optimization&gt;" />
  <row Id="28009" PostHistoryTypeId="2" PostId="12708" RevisionGUID="74aae1c0-11eb-456e-886a-0b9ac6279f75" CreationDate="2011-05-25T13:01:49.643" UserId="1839" Text="&gt; general advises about optimization&#xD;&#xA;&#xD;&#xA;1. The most important thing when optimizing is: **Profiling**. Learn your code from the hard profiling-facts. Don't make any assumptions about your code, profile it!&#xD;&#xA;&#xD;&#xA;2. Make automated profiling runs and compare the results in a machine readable format, make them easy accessable in graphical performance charts, so you will more likely know which checkin caused new hitches, or whether optimizations were good or not.&#xD;&#xA;" />
  <row Id="28010" PostHistoryTypeId="2" PostId="12709" RevisionGUID="7402d62c-fcdf-4518-bc3f-27d42df5f5a5" CreationDate="2011-05-25T13:06:48.507" UserId="1379" Text="When working with any mesh, you get an XYZ point somewhere on it. If you just want to move the mesh in any direction, it doesn't matter where this point is located.&#xD;&#xA;&#xD;&#xA;However, I want to rotate a door. This requires the point of rotation to be very specific. I can't find anywhere how to change the location of the point. Can anyone help?" />
  <row Id="28011" PostHistoryTypeId="1" PostId="12709" RevisionGUID="7402d62c-fcdf-4518-bc3f-27d42df5f5a5" CreationDate="2011-05-25T13:06:48.507" UserId="1379" Text="Move the location of the XYZ point on a mesh in UDK" />
  <row Id="28012" PostHistoryTypeId="3" PostId="12709" RevisionGUID="7402d62c-fcdf-4518-bc3f-27d42df5f5a5" CreationDate="2011-05-25T13:06:48.507" UserId="1379" Text="&lt;level-design&gt;&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="28013" PostHistoryTypeId="4" PostId="12709" RevisionGUID="8bd464cc-a9c3-45cd-a168-e5d9fa83649e" CreationDate="2011-05-25T13:49:08.953" UserId="1379" Comment="edited title" Text="Move the location of the XYZ pivot point on a mesh in UDK" />
  <row Id="28014" PostHistoryTypeId="2" PostId="12710" RevisionGUID="7c5751e3-ae35-42f8-8d8e-d51b7681fd19" CreationDate="2011-05-25T13:55:53.497" UserId="51" Text="As far as I know that is in the model itself. You have to open that model on whatever editing package you used to make the door in the first place and move the pivot there. " />
  <row Id="28015" PostHistoryTypeId="5" PostId="11594" RevisionGUID="38856956-0503-463c-92af-710ef42f38ef" CreationDate="2011-05-25T14:22:29.593" UserId="1198" Comment="deleted 10 characters in body" Text="I have a Matrix of a player &amp; I want to create a second location a set distance away from the first location but I want the second matrix to be set a set distance based on the rotation of the first matrix e.g. A player looking in a certain direction fires a gun, I want the bullet to start it's existence out side of the players mesh but in the direction the player is facing.&#xD;&#xA;&#xD;&#xA;I've uploaded a video of what's happening:&#xD;&#xA;http://www.youtube.com/watch?v=9aThUZ94Edo&#xD;&#xA;&#xD;&#xA;Ideally I would like to just apply the players rotation Matrix to the Offset amount to get the proper offset Matrix, based in the world space co-ordinates to then be able to apply back to the object.&#xD;&#xA;&#xD;&#xA;It's obvious at the end of the video that it's wrong when I am able to shoot the player model from his bullet :-)" />
  <row Id="28016" PostHistoryTypeId="2" PostId="12711" RevisionGUID="8bad9047-b9d2-4739-974d-146745880209" CreationDate="2011-05-25T14:23:16.003" UserId="6469" Text="Profit. It always comes back to the money.&#xD;&#xA;&#xD;&#xA;You make a game sell it for the asking price and start again. this cycle has been broken in the last decade. as consoled have moved online it has offered the opportunity to sell expansions to games in the same way pc games have done for years.&#xD;&#xA;&#xD;&#xA;think how long a 3d platformer takes to make and then think how long it takes to make an update for it and how limited the update will be. now consider an fps like cod, they can knock out a half dozen maps in a few weeks and sell them for a few quid to millions all over the world. I don't have numerical proof but I would be willing to bet they have made almost as much on the map packs as they have the game itself if you account for production time.&#xD;&#xA;&#xD;&#xA;3D platformers do not lend themselves well to this production model, yes it is possible but not nearly as profitable. &#xD;&#xA;&#xD;&#xA;Edit: to your other question there is no reason an indie developer should not make a 3d platformer it just is not the most profitable way of working. having said that as there are so few 3d platformers if you make a good one it may succeed through lack of competition. " />
  <row Id="28017" PostHistoryTypeId="5" PostId="12687" RevisionGUID="0c1e7c6d-a803-44af-b2da-fa073f629978" CreationDate="2011-05-25T14:25:52.010" UserId="1198" Comment="deleted 33 characters in body" Text="I'm not really a graphics programmer, but I used to toy around with Truevision3D 6.5 a few years ago. It wasn't too bad, but TV3D was just going nowhere so my foray into 3d game dev ended there.&#xD;&#xA;&#xD;&#xA;I know nothing of XNA. I think it's time to get up to date.&#xD;&#xA;&#xD;&#xA;My goal is to be able to render chunks of terrain from heightmaps (big huge terrain a la Morrowind) and BSP-like indoor areas (think Quake, so moveable objects like doors included). &#xD;&#xA;&#xD;&#xA;I googled for &quot;xna engine&quot;, &quot;best xna engine&quot; but the quantity of results is a bit scary for a xna-impaired like me.&#xD;&#xA;&#xD;&#xA;Can anyone recommend a _xna_ engine (or a combination of libraries) to achieve the desired result? If you targeted similar features, can you share your experience?&#xD;&#xA;&#xD;&#xA;(and for a laugh, has anyone tried TV3D 6.5 here?)&#xD;&#xA;&#xD;&#xA;Edit: I'm looking for something xna-related." />
  <row Id="28018" PostHistoryTypeId="25" PostId="12703" RevisionGUID="d9720771-c108-47f8-8afa-33b9df079df5" CreationDate="2011-05-25T15:12:48.247" Comment="http://twitter.com/#!/StackGameDev/status/73406163487694848" />
  <row Id="28019" PostHistoryTypeId="5" PostId="12702" RevisionGUID="5f66f3de-e141-4058-a519-97cab34473e7" CreationDate="2011-05-25T15:16:58.577" UserId="7558" Comment="better specification; added 16 characters in body" Text="I'm going to write **browser online game**, **not MMO**, but something like a lot of Flash game. But with OpenGL rendering, because Flash is using CPU for rendering.&#xD;&#xA;&#xD;&#xA;What are advantages of pure Java or c++ with Java that only create window.&#xD;&#xA;&#xD;&#xA;My requirements are:&#xD;&#xA;&#xD;&#xA; - **good performance** - low overhead when calling OpenGL functions&#xD;&#xA; - short code( if possible ) - so, Java is fully object oriented language, which can require usage of object for each called OpenGL function&#xD;&#xA; - basic **portability - Linux, Mac, Windows** - multiple builds for each platform aren't problem&#xD;&#xA; - little communication with server for saves, top score,... not multiplayer - may be slow&#xD;&#xA; - game should be downloadable" />
  <row Id="28020" PostHistoryTypeId="2" PostId="12712" RevisionGUID="713bca96-396b-4dc3-9ef0-e27b5ca26ee8" CreationDate="2011-05-25T15:23:34.683" UserId="1430" Text="Situational awareness.&#xD;&#xA;&#xD;&#xA;Measure your product, both by manual on-demand profiling with external profiling tools when you see something that acts more slowly than you'd like, any by instrumenting your code with automatic metrics gathering so that you can have some kind of measurements even when your code is running unattended by a developer -- these latter metrics can also be used to create a history of the execution profile of your application and thus provide hints into what changed to make things drop in performance.&#xD;&#xA;&#xD;&#xA;There are very few &quot;general solutions&quot; to performance problems other than this (situational awareness). Things that are oft hailed as such can just as often have exactly no effect, or worse, harm either the performance of the application or the quality of the code. Especially in languages like C++, it's really not possible to reason *in general* about how the shape of a bit of C++ code will translate to the machine instructions actually executed. Too much of the language is undefined and too much is up to the compilers which are usually much better than humans at balancing and pipelining a lot of subtle, multi-factored variables.&#xD;&#xA;&#xD;&#xA;Situational awareness is just as important when applying the handful of general advice that is out there -- consider, for example, your note about swapping array indexing order that you mention in a comment to Maik's answer. Do you know why this is (sometimes) true? Do you know what will make it not true, or have no impact? If you can't explain it it can be a dangerous thing to go and try to do. Don't trust, know.&#xD;&#xA;&#xD;&#xA;Furthermore, many of these so-called general performance techniques apply in very small and localized contexts and can usually be used for little more than providing performance band-aids rather than full-fledged solutions to performance problems (which may be algorithmic in nature). The way to write high-performance code is to understand the scope and shape of the problem your code must solve and the context-specific tweaks and enhancements you can make. Looking for band-aids won't really help you in the long run, it will just give you a false sense of accomplishment." />
  <row Id="28021" PostHistoryTypeId="2" PostId="12713" RevisionGUID="34cff25f-a525-4a45-93f9-efca7573d4bd" CreationDate="2011-05-25T15:24:07.240" UserId="5021" Text="Gajet, you are asking us to tell you about all of the millions of possible cases where modifying your C++ code can yield a performance improvement.&#xD;&#xA;&#xD;&#xA;A performance improvement at the low level you're describing on one type of hardware is not necessarily a performance improvement on another type of hardware.&#xD;&#xA;&#xD;&#xA;For example, your C++ code running on a processor with a 12MB L1 cache might benefit from using a method that consumes a great deal of memory, where that same method yields slower code on a processor with a 512kb cache.&#xD;&#xA;&#xD;&#xA;Judging by your question, low level optimizations like this should be the least of your priorities.&#xD;&#xA;&#xD;&#xA;If you want to write fast code, first consider learning about different **algorithms**.&#xD;&#xA;&#xD;&#xA;Here's a book on the subject:&#xD;&#xA;http://mitpress.mit.edu/algorithms/&#xD;&#xA;&#xD;&#xA;The algorithm you choose will often affect your runtime speed much more than any low level optimizations of particular operations in your C++ code.&#xD;&#xA;&#xD;&#xA;My program written in Python might run 100x slower than your program written in C++ for small amounts of input data. However, if I choose a better algorithm than you (e.g. heap sort), then my Python code will always run much faster than your C++ code (e.g. insertion sort), no matter how well you optimize it, when the input data size is large.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you are just getting started with programming (i.e. you have less than 1000 hours of experience) then by far your priority right now should just be building things that actually work, efficiently or not. Otherwise, either start reading about alrgorithms, or profile your code and come here with a specific question about how to make a particular solution go faster on some particular hardware. We can't address all of the millions of possible cases for you here in advance." />
  <row Id="28022" PostHistoryTypeId="5" PostId="12707" RevisionGUID="7e5dd13a-79c7-4752-8d58-da5b5cc5f17f" CreationDate="2011-05-25T15:25:08.830" UserId="1430" Comment="added 15 characters in body; edited title" Text="There are many optimization tricks that you can apply to your C++ code that can help speed up your program, and there are more game-related tweaks poping out every day. For example, I've just heard where you are trying to draw some meshes with same texture it's faster to draw them all in one call (or something like that which mean to pass texture once and for all of them).&#xD;&#xA;&#xD;&#xA;Are there any books or weblogs or something which demonstrate these things? I'm working with C++ if there are any general advises about optimization, I'll be glad to hear about them." />
  <row Id="28023" PostHistoryTypeId="4" PostId="12707" RevisionGUID="7e5dd13a-79c7-4752-8d58-da5b5cc5f17f" CreationDate="2011-05-25T15:25:08.830" UserId="1430" Comment="added 15 characters in body; edited title" Text="Are there any resources about performance tweaks?" />
  <row Id="28024" PostHistoryTypeId="5" PostId="11519" RevisionGUID="607dc2d2-5b43-40a8-914e-cf19d4c7c6c9" CreationDate="2011-05-25T15:28:25.943" UserId="2306" Comment="spelling, capitalization" Text="Yes and no. &#xD;&#xA;&#xD;&#xA;Officially, the only thing you can use on the 360 with XNA is C#. You can't ship any unmanaged DLLs with an app on xbox live, and if you want to write your game in C, you need a dev kit and an impossible-to-get contract with Redmond. &#xD;&#xA;&#xD;&#xA;That said, anything you can compile into CIL that will run on the compact framework will be okay. If you can convince your code to compile as managed c++, you should be able to get it to work. " />
  <row Id="28025" PostHistoryTypeId="2" PostId="12714" RevisionGUID="6e5d613b-35f2-452e-a428-8c87b797f2eb" CreationDate="2011-05-25T15:29:15.053" UserId="1430" Text="Just use Java, don't bother with anything else. If it becomes necessary to start augmenting the program with C++ bolt-ons, you can do so later once you've proven it to be to true. &#xD;&#xA;&#xD;&#xA;Until then, you'll be able to build a perfectly excellent game in Java that meets all your requirements and has the advantage of being significantly easier to build and deploy since you won't have to deal with the hassle that is C++'s lack of *binary* portability.&#xD;&#xA;&#xD;&#xA;If you're into it, it looks like it's also possible to use a [developer preview version of Flash][1] to get the hardware accelerated features bummzack mentions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://labs.adobe.com/downloads/flashplatformruntimes_incubator.html" />
  <row Id="28026" PostHistoryTypeId="2" PostId="12715" RevisionGUID="ad846e6a-6d99-43a7-9d05-8012100b863d" CreationDate="2011-05-25T15:36:58.457" UserId="1156" Text="If you're writing it for the browser, C++ is not an option; you would have to use Java. Alternately, look at [Unity][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="28027" PostHistoryTypeId="2" PostId="12716" RevisionGUID="b5144a50-6b46-490c-8e00-6bd05e57885a" CreationDate="2011-05-25T17:49:39.620" UserId="7578" Text="I'm currently working on a c# online multiplayer game in real-time. The aim is to have client/server based connection using the UDP protocol. So far I've used UDP for players' movements and TCP for events (a player shooting, a player losing life) because I need to be sure such data will arrive to all players connected to the server. I know that UDP is said 'unreliable' and some packets may be lost. But I've read everywhere to never mix TCP and UDP because it can affect the connection.&#xD;&#xA;&#xD;&#xA;The main question is how should I organize my network?&#xD;&#xA;&#xD;&#xA;UDP is connectionless, how should I save who's is who? Should I save ip adresses of the clients in a list?&#xD;&#xA;&#xD;&#xA;Should I use TCP for important events or use UDP? If I need to use UDP, how can I make sure that data will not be lost?&#xD;&#xA;&#xD;&#xA;By using both TCP and UDP, I need to save for each player their IP in a list (for UDP) and the TcpClient which is connected in another list (for the UDP). How could I change that to be more effective?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;Lowip&#xD;&#xA;" />
  <row Id="28028" PostHistoryTypeId="1" PostId="12716" RevisionGUID="b5144a50-6b46-490c-8e00-6bd05e57885a" CreationDate="2011-05-25T17:49:39.620" UserId="7578" Text="[C#] Online Multiplayer Game Basics" />
  <row Id="28029" PostHistoryTypeId="3" PostId="12716" RevisionGUID="b5144a50-6b46-490c-8e00-6bd05e57885a" CreationDate="2011-05-25T17:49:39.620" UserId="7578" Text="&lt;c#&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;websocket&gt;" />
  <row Id="28030" PostHistoryTypeId="5" PostId="12716" RevisionGUID="66dea937-3c2e-4efd-8aad-564afb81c548" CreationDate="2011-05-25T17:53:23.287" UserId="1156" Comment="deleted 33 characters in body; edited title" Text="I'm currently working on a c# online multiplayer game in real-time. The aim is to have client/server based connection using the UDP protocol. So far I've used UDP for players' movements and TCP for events (a player shooting, a player losing life) because I need to be sure such data will arrive to all players connected to the server. I know that UDP is said 'unreliable' and some packets may be lost. But I've read everywhere to never mix TCP and UDP because it can affect the connection.&#xD;&#xA;&#xD;&#xA;The main question is how should I organize my network?&#xD;&#xA;&#xD;&#xA;UDP is connectionless, how should I save who's is who? Should I save ip adresses of the clients in a list?&#xD;&#xA;&#xD;&#xA;Should I use TCP for important events or use UDP? If I need to use UDP, how can I make sure that data will not be lost?&#xD;&#xA;&#xD;&#xA;By using both TCP and UDP, I need to save for each player their IP in a list (for UDP) and the TcpClient which is connected in another list (for the UDP). How could I change that to be more effective?&#xD;&#xA;" />
  <row Id="28031" PostHistoryTypeId="4" PostId="12716" RevisionGUID="66dea937-3c2e-4efd-8aad-564afb81c548" CreationDate="2011-05-25T17:53:23.287" UserId="1156" Comment="deleted 33 characters in body; edited title" Text="Online multiplayer game basics" />
  <row Id="28032" PostHistoryTypeId="2" PostId="12717" RevisionGUID="a4d5c62d-6c24-4eba-b46b-e4c530c421b0" CreationDate="2011-05-25T17:57:05.127" UserId="7331" Text="For a psychology project we're looking for resources we can use to design a series of short (ca. 5 minute) games.&#xD;&#xA;&#xD;&#xA;We want to use these games to tap into participant's motives. A motive is a psychological construct that determine where people focus their energy on and what makes them happy if they achieve important outcomes. We want to focus on 3 such outcomes: **power**, **achievement** and **affiliation**. Power involves obtaining social status and influencing other people. Achievement involves mastering difficult goals. Affiliation involves being emotionally close to others and establishing new relationships.&#xD;&#xA;&#xD;&#xA;The basic requirement for each game is that it needs to isolate one of these three motives. They should thus be as &quot;clean&quot; as possible... So a game in which people can earn points (achievement) when they beat other players (power) would not be ideal because it creates a confound between two motives. The games need to allow for multiple (more than 10) discrete motive-related events, so that we can measure players' reactions to them.&#xD;&#xA;&#xD;&#xA;Now, we hope to find resources we can re-use for our games. We don't have the ambition to create new games and many games already suit our needs. Because we're low on time and have just one programmer (and no designers) on staff, we want to adapt existing material as much as possible. For example, we are thinking about using Tetris as a game that allows for numerous opportunities for achievement.&#xD;&#xA;&#xD;&#xA;Probably many quite simple games have been lost in the drawers of computer science students who made them as finger exercises and homework. We would only use these games in our research setting, so there is no commercial interest involved.&#xD;&#xA;&#xD;&#xA;Any guidance on how to find such resources, or resources themselves would be highly appreciated.&#xD;&#xA;&#xD;&#xA;We can of course provide more specific information and we have also created a list of possible games we could use, but we didn't want to jam so much information in here just yet.&#xD;&#xA;&#xD;&#xA;Best wishes from the whole lab!" />
  <row Id="28033" PostHistoryTypeId="1" PostId="12717" RevisionGUID="a4d5c62d-6c24-4eba-b46b-e4c530c421b0" CreationDate="2011-05-25T17:57:05.127" UserId="7331" Text="Power, achievement and affiliation games for psychology research project" />
  <row Id="28034" PostHistoryTypeId="3" PostId="12717" RevisionGUID="a4d5c62d-6c24-4eba-b46b-e4c530c421b0" CreationDate="2011-05-25T17:57:05.127" UserId="7331" Text="&lt;game-design&gt;&lt;open-source&gt;" />
  <row Id="28035" PostHistoryTypeId="25" PostId="12716" RevisionGUID="9d1b8479-74de-4fea-83f3-72147cd26afe" CreationDate="2011-05-25T18:12:56.880" Comment="http://twitter.com/#!/StackGameDev/status/73451497505030144" />
  <row Id="28036" PostHistoryTypeId="2" PostId="12718" RevisionGUID="12ae2283-89ab-4cda-b730-dcea9f52b634" CreationDate="2011-05-25T18:21:22.463" UserId="5021" Text="I have an almost unmodified copy of the [bloom sample][1] in my project. I pass it a texture to apply the bloom post process on.&#xD;&#xA;&#xD;&#xA;The only modification is that, instead of calling BeginDraw() (to set a render target) in the bloom sample and then doing all of my drawing, I simply do all of my drawing to a rendertarget outside of the bloom sample, and then pass that rendertarget to the bloom sample's Draw() method, which the bloom sample can then use to perform the bloom postprocess.&#xD;&#xA;&#xD;&#xA;The texture that I pass to the bloom sample Draw() has format Color, according to the debugger (and by code inspection).&#xD;&#xA;&#xD;&#xA;However, on the first draw call in the bloom sample, I get the following error:&#xD;&#xA;&#xD;&#xA;The framework produces the error &quot;XNA Framework HiDef profile requires TextureFilter to be Point when using texture format Single.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The code that produces this is as follows:&#xD;&#xA;&#xD;&#xA;    1 	public void Draw(RenderTarget2D sceneRenderTarget) &#xD;&#xA;    2 	{ &#xD;&#xA;    3 	    GraphicsDevice gd = Game3.GDM.GraphicsDevice; &#xD;&#xA;    4 	 &#xD;&#xA;    5 	    gd.SamplerStates[1] = SamplerState.LinearClamp; &#xD;&#xA;    6 	 &#xD;&#xA;    7 	    //gd.SamplerStates[1] = SamplerState.PointClamp; &#xD;&#xA;    8 	 &#xD;&#xA;    9 	    // Pass 1: draw the scene into rendertarget 1, using a &#xD;&#xA;    10 	    // shader that extracts only the brightest parts of the image. &#xD;&#xA;    11 	    _bloomExtractEffect.Parameters[&quot;BloomThreshold&quot;].SetValue( &#xD;&#xA;    12 	    Settings.BloomThreshold); &#xD;&#xA;    13 	 &#xD;&#xA;    14 	    DrawFullscreenQuad(sceneRenderTarget, _renderTarget1, &#xD;&#xA;    15 	               _bloomExtractEffect, &#xD;&#xA;    16 	               IntermediateBuffer.PreBloom); &#xD;&#xA;&#xD;&#xA;If I uncomment line 7 above, then the code runs without error (as point sampling will be enabled), but this should be unnecessary (and is not desired) as all rendertargets involved here are SurfaceFormat.Color -- which is not a floating point format!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone have any idea what might be going on? Perhaps someone has seen this before, and can give me a clue where to look next.&#xD;&#xA;&#xD;&#xA;I have some experience with PIX, but I don't know how to use PIX to debug when the program crashes (basically I only know how to take single frame captures in PIX).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/bloom" />
  <row Id="28037" PostHistoryTypeId="1" PostId="12718" RevisionGUID="12ae2283-89ab-4cda-b730-dcea9f52b634" CreationDate="2011-05-25T18:21:22.463" UserId="5021" Text="When applying Bloom postprocess, error: &quot;XNA...requires TextureFilter to be Point when using texture format Single.&quot;" />
  <row Id="28038" PostHistoryTypeId="3" PostId="12718" RevisionGUID="12ae2283-89ab-4cda-b730-dcea9f52b634" CreationDate="2011-05-25T18:21:22.463" UserId="5021" Text="&lt;xna-4.0&gt;" />
  <row Id="28039" PostHistoryTypeId="5" PostId="12547" RevisionGUID="eafaa144-a00e-4665-91bb-6eedae30327f" CreationDate="2011-05-25T18:28:09.083" UserId="7328" Comment="change if to while in responce to Chris Subagio comment" Text="though james answer is right you can also get to where you want using my implementation&#xD;&#xA;&#xD;&#xA;	void update(float dt)&#xD;&#xA;	{&#xD;&#xA;		nextframe -= dt;&#xD;&#xA;		while (nextframe &lt; 0)&#xD;&#xA;		{&#xD;&#xA;			nextframe += frametime[frame_index];&#xD;&#xA;			display_frame(frame[frame_index]);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28040" PostHistoryTypeId="2" PostId="12719" RevisionGUID="beb665da-d229-469a-9765-ffd717d97edb" CreationDate="2011-05-25T18:45:13.833" UserId="4443" Text="For general C++ optimization considerations I can not recommend the Effective C++ and More Effective C++ books. &#xD;&#xA;&#xD;&#xA;I will also add in that I have contacted this author a few times and he has not only been very forth coming with additional clarifications if need be, but genuine interest in the information." />
  <row Id="28041" PostHistoryTypeId="5" PostId="871" RevisionGUID="d586ca2d-ae35-42e9-a544-2e5d0badbf5d" CreationDate="2011-05-25T18:53:46.343" UserId="323" Comment="fix my ability to spell" Text="A very, very low-level tip, but one that can come in handy:&#xD;&#xA;&#xD;&#xA;Most compilers support some form of explicit conditional hinting. GCC has a function called __builtin_expect which lets you inform the compiler what the value of a result probably is. GCC can use that data to optimize conditionals to perform as quickly as possible in the expected case, with slightly slower execution in the unexpected case.&#xD;&#xA;&#xD;&#xA;    if(__builtin_expect(entity-&gt;extremely_unlikely_flag, 0)) {&#xD;&#xA;      // code that is rarely run&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I've seen a 10-20% speedup with proper use of this." />
  <row Id="28042" PostHistoryTypeId="6" PostId="12709" RevisionGUID="76567876-4b93-446e-ae20-9e1ebaaef87a" CreationDate="2011-05-25T19:20:59.567" UserId="3588" Comment="Question's not so much about level design, and more about rotating 3d-meshes, so changed the tags accordingly. ♪" Text="&lt;3d-meshes&gt;&lt;udk&gt;&lt;unreal&gt;" />
  <row Id="28043" PostHistoryTypeId="24" PostId="12709" RevisionGUID="76567876-4b93-446e-ae20-9e1ebaaef87a" CreationDate="2011-05-25T19:20:59.567" Comment="Proposed by 3588 approved by 51 edit id of 448" />
  <row Id="28044" PostHistoryTypeId="2" PostId="12720" RevisionGUID="bfc6801e-db07-4aac-9ced-163299e7a512" CreationDate="2011-05-25T19:52:13.507" UserId="7580" Text="Do not listen to them!&#xD;&#xA;&#xD;&#xA;You do not have to recreate WoW in 7 days. That's BS. As is BS everyone who says a motivated person can't do something.&#xD;&#xA;&#xD;&#xA;start small. read about decentralized systems.  and other success histories.&#xD;&#xA;&#xD;&#xA;one good example, done in 48hours... yes, H O U R S.&#xD;&#xA;&#xD;&#xA;http://www.startupmonkeys.com/2010/09/building-a-scrabble-mmo-in-48-hours/&#xD;&#xA;&#xD;&#xA;learn from that, add some weeks to create a basic 3D client, and you're on.&#xD;&#xA;&#xD;&#xA;Have fun." />
  <row Id="28045" PostHistoryTypeId="5" PostId="12717" RevisionGUID="72d18f85-4217-47ca-a5e0-39a2fc6d1f03" CreationDate="2011-05-25T20:24:49.920" UserId="7331" Comment="added 79 characters in body" Text="For a psychology project we're looking for resources we can use to design a series of short (ca. 5 minute) games.&#xD;&#xA;&#xD;&#xA;We want to use these games to tap into participant's motives. A motive is a psychological construct that determine where people focus their energy on and what makes them happy if they achieve important outcomes. We want to focus on 3 such outcomes: **power**, **achievement** and **affiliation**. Power involves obtaining social status and influencing other people. Achievement involves mastering difficult goals. Affiliation involves being emotionally close to others and establishing new relationships.&#xD;&#xA;&#xD;&#xA;The basic requirement for each game is that it needs to **isolate** one of these three motives. They should thus be as &quot;clean&quot; as possible... So a game in which people can earn points (achievement) when they beat other players (power) would not be ideal because it creates a confound between two motives. The games need to allow for multiple (more than 10) discrete motive-related events, so that we can measure players' reactions to them.&#xD;&#xA;&#xD;&#xA;Now, we hope to find resources we can re-use for our games. We don't have the ambition to create new games and many games already suit our needs. Because we're low on time and have just one programmer (and no designers) on staff, we want to adapt existing material as much as possible. For example, we are thinking about using Tetris as a game that allows for numerous opportunities for achievement.&#xD;&#xA;&#xD;&#xA;Probably many quite simple games have been lost in the drawers of computer science students who made them as finger exercises and homework. We would only use these games in our research setting, so there is no commercial interest involved.&#xD;&#xA;&#xD;&#xA;Any guidance on how to find such resources, or resources themselves would be highly appreciated. If you know a specific game that would work, that would of course be best.&#xD;&#xA;&#xD;&#xA;We can of course provide more specific information and we have also created a list of possible games we could use, but we didn't want to jam so much information in here just yet.&#xD;&#xA;&#xD;&#xA;Best wishes from the whole lab!" />
  <row Id="28046" PostHistoryTypeId="25" PostId="12718" RevisionGUID="f3b2de8c-0c1d-4243-9b49-e0704808315d" CreationDate="2011-05-25T21:12:57.347" Comment="http://twitter.com/#!/StackGameDev/status/73496799196889088" />
  <row Id="28047" PostHistoryTypeId="2" PostId="12721" RevisionGUID="9a05092c-7513-4d21-a7e8-eb7097572d12" CreationDate="2011-05-25T21:15:32.377" UserId="5824" Text="Minimize dependency chains to make better use of the CPU pipleline.&#xD;&#xA;&#xD;&#xA;In simple cases the compiler may do this for you if you enable loop unrolling. However it often won't do it, especially when there's floats involved as reordering the expressions changes the result.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;    float *data = ...;&#xD;&#xA;    int length = ...;&#xD;&#xA;&#xD;&#xA;    // Slow version&#xD;&#xA;    float total = 0.0f;&#xD;&#xA;    int i;&#xD;&#xA;    for (i=0; i &lt; length; i++)&#xD;&#xA;    {&#xD;&#xA;      total += data[i]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Fast version&#xD;&#xA;    float total1, total2, total3, total4;&#xD;&#xA;    for (i=0; i &lt; length-3; i += 4)&#xD;&#xA;    {&#xD;&#xA;      total1 += data[i];&#xD;&#xA;      total2 += data[i+1];&#xD;&#xA;      total3 += data[i+2];&#xD;&#xA;      total4 += data[i+3];&#xD;&#xA;    }&#xD;&#xA;    for (; i &lt; length; i++)&#xD;&#xA;    {&#xD;&#xA;      total += data[i]&#xD;&#xA;    }&#xD;&#xA;    total += (total1 + total2) + (total3 + total4);" />
  <row Id="28048" PostHistoryTypeId="16" PostId="12721" RevisionGUID="84c6eb8e-4c96-4998-80f8-30e422137fcf" CreationDate="2011-05-25T21:15:32.377" UserId="5824" />
  <row Id="28049" PostHistoryTypeId="5" PostId="12717" RevisionGUID="1fe58479-145e-4bec-b837-2f6f4203a9d6" CreationDate="2011-05-25T22:12:15.900" UserId="7331" Comment="reacted to demands for clarification" Text="For a psychology project we're looking for resources we can use to design a series of short (ca. 5 minute) games.&#xD;&#xA;&#xD;&#xA;We want to use these games to tap into participant's motives. A motive is a psychological construct that determine where people focus their energy on and what makes them happy if they achieve important outcomes. We want to focus on 3 such outcomes: **power**, **achievement** and **affiliation**. Power involves obtaining social status and influencing other people. Achievement involves mastering difficult goals. Affiliation involves being emotionally close to others and establishing new relationships.&#xD;&#xA;&#xD;&#xA;The basic requirement for each game is that it needs to **isolate** one of these three motives. They should thus be as &quot;clean&quot; as possible... So a game in which people can earn points (achievement) when they beat other players (power) would not be ideal because it creates a confound between two motives. The games need to allow for multiple (more than 10) discrete motive-related events, so that we can measure players' reactions to them.&#xD;&#xA;&#xD;&#xA;Now, we hope to find resources we can re-use for our games. We don't have the ambition to create new games and many games already suit our needs. Because we're low on time and have just one programmer (and no designers) on staff, we want to adapt existing material as much as possible. For example, we are thinking about using Tetris as a game that allows for numerous opportunities for achievement.&#xD;&#xA;&#xD;&#xA;Probably many quite simple games have been lost in the drawers of computer science students who made them as finger exercises and homework. We would only use these games in our research setting, so there is no commercial interest involved.&#xD;&#xA;&#xD;&#xA;Any guidance on how to find such resources, or resources themselves would be highly appreciated. If you know a specific game that would work, that would of course be best.&#xD;&#xA;&#xD;&#xA;We can of course provide more specific information and we have also created a list of possible games we could use, but we didn't want to jam so much information in here just yet.&#xD;&#xA;&#xD;&#xA;Best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;### Isolating the motives &#xD;&#xA;In response to several comments, we wanted to elaborate on what we mean by isolating motives. It is of course true that many (if not most) games cater to two or more motives at the same time.&#xD;&#xA;&#xD;&#xA;For example Tetris has a high score table, so you can win against others. For us, this is problematic, because we want to measure players' reactions to one and *only one* motive. In the example of Tetris, we would define clearing a row, getting to the next level and improving (over your previous scores) as achievement-related events. We would simply remove the social comparison inherent in a high score by not using a high score table with comparisons to others.  &#xD;&#xA;&#xD;&#xA;Similarly when it comes to power games, the relevant events would be those where you exert influence on others (such as bossing around little islanders in a god game) and we would try to keep out the competitive/achievement component as well as the affiliation component.  &#xD;&#xA;It is probably the main difficulty that most games mix motives. In cases where it is easy, we can remove the confounding component (like in a god game where you can score, we would change it so it becomes more of a idle bossing-around game)." />
  <row Id="28050" PostHistoryTypeId="2" PostId="12722" RevisionGUID="044b7652-fae7-48f0-9d43-0c1ec2ef8d15" CreationDate="2011-05-25T22:24:40.253" UserId="6894" Text="I am not sure if I will be able to provide enough information for someone to answer this question, but any ideas might help.&#xD;&#xA;&#xD;&#xA;I am creating a tower defense game in Flash and I eventually want to make it run on Android. Just for testing purposes, I have been running it on Android's browser and different Android .swf player apps.&#xD;&#xA;&#xD;&#xA;Recently, the game stopped working correctly. When it gets to the second wave of enemies, they get about four tiles in and stop moving. I can get them to start moving again by constantly clicking on parts of the screen. It's almost like the game loop has quit updating.&#xD;&#xA;&#xD;&#xA;Trying to solve the problem, I have updated the gameloop from Flash's standard events to a NativeSignal event (didn't solve the problem but the game runs much faster overall).&#xD;&#xA;&#xD;&#xA;The game works fine on my PC, I can't figure out the Android problem though. Any ideas or help would be appreciated. I didn't want to supply code since I wouldn't know where to start that would be helpful." />
  <row Id="28051" PostHistoryTypeId="1" PostId="12722" RevisionGUID="044b7652-fae7-48f0-9d43-0c1ec2ef8d15" CreationDate="2011-05-25T22:24:40.253" UserId="6894" Text="Flash Game not working on Android" />
  <row Id="28052" PostHistoryTypeId="3" PostId="12722" RevisionGUID="044b7652-fae7-48f0-9d43-0c1ec2ef8d15" CreationDate="2011-05-25T22:24:40.253" UserId="6894" Text="&lt;flash&gt;&lt;android&gt;&lt;actionscript-3&gt;&lt;gameloop&gt;&lt;tower-defense&gt;" />
  <row Id="28053" PostHistoryTypeId="2" PostId="12723" RevisionGUID="ab5e62bb-1ee6-4b60-be20-3db481aa45ee" CreationDate="2011-05-25T22:28:10.260" UserId="7328" Text="maybe it just stuck in some function in the main loop so that any other event(like touch event) make them step one point but the main loop event doesn't happen any more." />
  <row Id="28054" PostHistoryTypeId="2" PostId="12724" RevisionGUID="af572ced-ae52-4689-b3e5-f3ba1ec72321" CreationDate="2011-05-25T22:44:13.410" UserId="6887" Text="This is not a direct answer to your question, but gafferongames has some really nice articles on network games: http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/" />
  <row Id="28055" PostHistoryTypeId="2" PostId="12725" RevisionGUID="794489ba-316a-4dac-8dd0-58c2918393e4" CreationDate="2011-05-25T22:56:56.207" UserId="6887" Text="Your server should not send the state of all players to all players at every tick. Instead it should send a specially crafted message to each client say every 500 ms saying &quot;these x players in your view port should be at these coordinates in 500 ms.&quot;&#xD;&#xA;Most of the time this will work fine, but if the server realizes it has given wrong information it just sends an extra message.&#xD;&#xA;&#xD;&#xA;This will decrease network traffic dramatically.&#xD;&#xA;&#xD;&#xA;Another thing to consider is to not have game ticks on the server, but instead have the client send messages only when an action occurs (changed direction, shot fired) and then calculate ahead on the server when an action is received." />
  <row Id="28056" PostHistoryTypeId="2" PostId="12726" RevisionGUID="9ed32441-3ff7-433b-a705-eb36f7ff3750" CreationDate="2011-05-26T00:00:59.957" UserId="2229" Text="Setting the **Perspective projection matrix** in Open GL (including OpenGL ES 2.0) has the following general format:&#xD;&#xA;&#xD;&#xA;    glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar);&#xD;&#xA;&#xD;&#xA;Notice the **last two parameters**; First one specifies **zNear** plane, which is the plane closer to the camera. The second one specifies **zFar** plane which is far from the camera.&#xD;&#xA;&#xD;&#xA;It is common knowledge that, in OpenGL, things that are further, in other words &quot;deeper into the screen&quot;, have **negative Z axis**. Why then all the OpenGL examples, that set perspective projection  matrix (taken from reliable sources like **OpenGL SuperBible** and simmilar) look like the two above mentioned parameters (zNear, zFar) of Perspective projection funcion are swapped?&#xD;&#xA;&#xD;&#xA;*This example is taken from [GLM(OpenGL Math) webiste][1]:*&#xD;&#xA;&#xD;&#xA;    glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); &#xD;&#xA;&#xD;&#xA;You can see, that the zNear parameter is actually frurther from the camera, than zFar parameter, which is 100 points closer to the camera/viewer.&#xD;&#xA;&#xD;&#xA;Can you provide **easy to understand explanation**, please? I it is not just one but all the examples, which pass zFar as higher positive value than zNear. Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/code.html" />
  <row Id="28057" PostHistoryTypeId="1" PostId="12726" RevisionGUID="9ed32441-3ff7-433b-a705-eb36f7ff3750" CreationDate="2011-05-26T00:00:59.957" UserId="2229" Text="OpenGL ES 2.0: Understanding Perspective Projection Matrix" />
  <row Id="28058" PostHistoryTypeId="3" PostId="12726" RevisionGUID="9ed32441-3ff7-433b-a705-eb36f7ff3750" CreationDate="2011-05-26T00:00:59.957" UserId="2229" Text="&lt;opengl&gt;&lt;3d&gt;&lt;math&gt;&lt;opengl-es&gt;&lt;3d-engines&gt;" />
  <row Id="28059" PostHistoryTypeId="5" PostId="12726" RevisionGUID="df95e165-046d-4cdb-ad68-e84de2f0ba9b" CreationDate="2011-05-26T00:10:58.150" UserId="2229" Comment="added my example; added 3 characters in body; added 50 characters in body" Text="Setting the **Perspective projection matrix** in Open GL (including OpenGL ES 2.0) has the following general format:&#xD;&#xA;&#xD;&#xA;    glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar);&#xD;&#xA;&#xD;&#xA;Notice the **last two parameters**; First one specifies **zNear** plane, which is the plane closer to the camera. The second one specifies **zFar** plane which is far from the camera.&#xD;&#xA;&#xD;&#xA;It is common knowledge that, in OpenGL, things that are further, in other words &quot;deeper into the screen&quot;, have **negative Z axis**. Why then all the OpenGL examples, that set perspective projection  matrix (taken from reliable sources like **OpenGL SuperBible** and simmilar) look like the two above mentioned parameters (zNear, zFar) of Perspective projection funcion are swapped?&#xD;&#xA;&#xD;&#xA;*This example is taken from [GLM(OpenGL Math) webiste][1]:*&#xD;&#xA;&#xD;&#xA;    glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); &#xD;&#xA;&#xD;&#xA;You can see, that the zNear parameter is actually frurther from the camera, than zFar parameter, which is 100 points closer to the camera/viewer.&#xD;&#xA;&#xD;&#xA;Can you provide **easy to understand explanation**, please? I it is not just one but all the examples, which pass zFar as higher positive value than zNear. Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;My Example:&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;In my code, when I set:&#xD;&#xA;&#xD;&#xA;    glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 1000.0f, -500.0f); &#xD;&#xA;&#xD;&#xA;I assume my frustum being **1000 points long in z-positive** direction and **500 points long in z-negative** direction. &#xD;&#xA;&#xD;&#xA;When I set things like this, I can see at least some object, althought things are not perfect: for some reaons I see only object positioned on negative z coordinates. &#xD;&#xA;&#xD;&#xA;This might relate to my incorrect understaind of perspective projection function.&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/code.html" />
  <row Id="28060" PostHistoryTypeId="25" PostId="12722" RevisionGUID="33d268ec-ad2a-4fe3-be91-ff3166e16f95" CreationDate="2011-05-26T00:12:57.977" Comment="http://twitter.com/#!/StackGameDev/status/73542098397310976" />
  <row Id="28061" PostHistoryTypeId="2" PostId="12727" RevisionGUID="f10abb67-d411-43d9-9484-110013585519" CreationDate="2011-05-26T00:28:14.570" UserId="7548" Text="UDP has less overhead, but at the cost of losing packets without knowing about it (the overhead with TCP ensures that lost packets get re-sent).&#xD;&#xA;&#xD;&#xA;However, the big problem with using UDP is that there are many sites that block all UDP traffic (except for DNS) because many administrators believe it's a good security practice.&#xD;&#xA;&#xD;&#xA;Also, don't assume that every one of your players will have a different IP address -- there are many situations where multiple users share the same internet connection, and if school kids get hooked on your game you can bet that they're probably going to figure out how to install and run it during class instead of doing their work (and wouldn't you rather that they be spending this precious time on your game instead of someone else's?).&#xD;&#xA;&#xD;&#xA;Once your TCP stream is open, it's still pretty efficient.  The next step is to minimize the amount of data you're sending/receiving, and this is where protocol design comes into play.  If you just send a few bytes for each command (e.g., &quot;move forward&quot;) instead of, for example, wrapping the same command in hundreds of bytes of XML code, then your overall network bandwidth consumption will be lower AND fewer CPU cycles will be required to process the information (a few bytes are easily compared versus dismantling and interpreting and syntax-checking a big chunk of XML).&#xD;&#xA;&#xD;&#xA;You certainly can open multiple TCP streams and use them for different purposes, such as one for commands, another for graphics transfers, another for audio-based chat, etc.  That way, if you're transferring a large graphic that takes 5-10 seconds to download, at least player command movements won't lag because they'll be on a different stream (and you can display a default sprite until the new sprite is finished downloading, which is always more fun than waiting).&#xD;&#xA;" />
  <row Id="28062" PostHistoryTypeId="2" PostId="12728" RevisionGUID="1b605639-aef4-4390-a568-33d80491102e" CreationDate="2011-05-26T01:23:37.327" UserId="1430" Text="The method in question (`glm::perspective`) and its ilk are essentially wrappers or re-implementations of [gluPerspective][1]. As you can see from the documentation of that function, the near/far values are distances from the view plane, and are always positive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml" />
  <row Id="28063" PostHistoryTypeId="5" PostId="12727" RevisionGUID="748ada61-678d-4318-a373-83871822ccda" CreationDate="2011-05-26T02:15:24.577" UserId="7548" Comment="added 8 characters in body" Text="UDP has less overhead, but at the cost of losing packets without knowing about it (part of the overhead with TCP ensures that lost packets get re-sent).&#xD;&#xA;&#xD;&#xA;However, the big problem with using UDP is that there are many sites that block all UDP traffic (except for DNS) because many administrators believe it's a good security practice.&#xD;&#xA;&#xD;&#xA;Also, don't assume that every one of your players will have a different IP address -- there are many situations where multiple users share the same internet connection, and if school kids get hooked on your game you can bet that they're probably going to figure out how to install and run it during class instead of doing their work (and wouldn't you rather that they be spending this precious time on your game instead of someone else's?).&#xD;&#xA;&#xD;&#xA;Once your TCP stream is open, it's still pretty efficient.  The next step is to minimize the amount of data you're sending/receiving, and this is where protocol design comes into play.  If you just send a few bytes for each command (e.g., &quot;move forward&quot;) instead of, for example, wrapping the same command in hundreds of bytes of XML code, then your overall network bandwidth consumption will be lower AND fewer CPU cycles will be required to process the information (a few bytes are easily compared versus dismantling and interpreting and syntax-checking a big chunk of XML).&#xD;&#xA;&#xD;&#xA;You certainly can open multiple TCP streams and use them for different purposes, such as one for commands, another for graphics transfers, another for audio-based chat, etc.  That way, if you're transferring a large graphic that takes 5-10 seconds to download, at least player command movements won't lag because they'll be on a different stream (and you can display a default sprite until the new sprite is finished downloading, which is always more fun than waiting).&#xD;&#xA;" />
  <row Id="28064" PostHistoryTypeId="2" PostId="12729" RevisionGUID="e9c4d5f7-bf70-4eef-829e-08b6e9788a41" CreationDate="2011-05-26T02:32:11.750" UserId="2229" Text="**Prespective Projection** has features that could be very well used even in **2D games**. At least two very beneficial characteristics that come to my mind are: &#xD;&#xA;&#xD;&#xA; 1. Using Perspective Projection to substitute **Parallax Scrolling**&#xD;&#xA; 2. Using Perspective Projection to perform **Depth Order** of 2D sprites&#xD;&#xA;&#xD;&#xA;On the other hand, **perspective projection resizes objects** (including 2D sprites in our case) with distance. This is why Mip Mapping has been developed. Mip mapping, however, does not always produce perfect results, as it relies on interpolation between two neighbouring mip-mapped frames. This might not be sufficient for a 2D game, where developers are sensitive for **pixel based precision and detail**.&#xD;&#xA;&#xD;&#xA;My question therefore is, whether it makes sense to **apply Perspective Projection for a 2D game.** What will be the **cost paid** for that? Will the **cost paid overweight benefits** gained from 3rd dimension?&#xD;&#xA;&#xD;&#xA;Has **anybody applied Perspective Projection** into 2D sprite based computer game? What were the results? Was the **degradation** of 2D graphics significant? Thank you very much." />
  <row Id="28065" PostHistoryTypeId="1" PostId="12729" RevisionGUID="e9c4d5f7-bf70-4eef-829e-08b6e9788a41" CreationDate="2011-05-26T02:32:11.750" UserId="2229" Text="OpenGL ES 2.0: Perspective Projection for 2D Games" />
  <row Id="28066" PostHistoryTypeId="3" PostId="12729" RevisionGUID="e9c4d5f7-bf70-4eef-829e-08b6e9788a41" CreationDate="2011-05-26T02:32:11.750" UserId="2229" Text="&lt;opengl&gt;&lt;3d&gt;&lt;opengl-es&gt;&lt;3d-engines&gt;" />
  <row Id="28067" PostHistoryTypeId="25" PostId="12726" RevisionGUID="fa7141c5-fd1c-4266-8e1b-484d6f021b96" CreationDate="2011-05-26T03:12:58.527" Comment="http://twitter.com/#!/StackGameDev/status/73587400097538048" />
  <row Id="28068" PostHistoryTypeId="2" PostId="12730" RevisionGUID="a2c4ba9b-dbbc-45c0-9800-21a066aa3de0" CreationDate="2011-05-26T04:22:24.350" UserId="1430" Text="It's not really a huge win in general.&#xD;&#xA;&#xD;&#xA;You can use a perspective projection into a true 3D scene to get an effect like parallax scrolling background layers from classic 2D games, sure. But it's not really an easier to implement that than it is to implement scrolling layers.&#xD;&#xA;&#xD;&#xA;You don't get any benefits with respect to depth ordering -- you'd still need to give each sprite an appropriate depth (Z coordinate) and this is no different in practice than assigning the sprite a depth layer. You get slightly smoother transitions between depth layers because they aren't discrete layers, but that's about it. You can use the depth buffer and test to get properly rendered sprites regardless of whether or not you use a perspective (versus orthographic) transform -- and either way that's a wash since you generally have to manually sort sprites back-to-front for rendering any that have alpha. You actually get that basically for free with a regular background layer index.&#xD;&#xA;&#xD;&#xA;You can counter the resizing by pre-scaling the sprites based on depth, typically in a shader. This avoids the need to try to rely on mip-mapping to fix up the appearance (mip-mapping is a bit of a red herring here, as it only improves the visual quality of the resulting textured quad and does not fix the fundamental resizing problem and it's not why it was developed). On the other hand, you may find this scaling desirable if you're going for an obvious &quot;2D in 3D&quot; look, like Shadow Complex, versus an obvious 2D look like Super Mario World.&#xD;&#xA;&#xD;&#xA;In short, like all things, *it depends*. If your game is meant to be a 3D game constrained to a 2D field of play, it makes sense. If it's not, and you don't need any of the small benefits (such as smooth layer transitions), it's probably not worth doing just because exactly equivalent results can be obtained with less work in another fashion.&#xD;&#xA;&#xD;&#xA;If, on the other hand, your frameworks and toolchains are only set up for a perspective projection and cannot be changed or swapped out, and you are only doing a simple 2D game, you can certainly make it work. There's no clear answer to this and the differences between options are pretty minor.&#xD;&#xA;&#xD;&#xA;Go with the option that involves the least work." />
  <row Id="28069" PostHistoryTypeId="2" PostId="12731" RevisionGUID="9eb3cfec-1e54-414a-affd-fe7dfac60c2f" CreationDate="2011-05-26T04:51:07.893" UserId="2132" Text="Are there frameworks and processes for HTMl5 that can be used for the rapid prototyping of 2D games?" />
  <row Id="28070" PostHistoryTypeId="1" PostId="12731" RevisionGUID="9eb3cfec-1e54-414a-affd-fe7dfac60c2f" CreationDate="2011-05-26T04:51:07.893" UserId="2132" Text="Is HTML5 and Canvas good for rapid prototyping of games?" />
  <row Id="28071" PostHistoryTypeId="3" PostId="12731" RevisionGUID="9eb3cfec-1e54-414a-affd-fe7dfac60c2f" CreationDate="2011-05-26T04:51:07.893" UserId="2132" Text="&lt;html5&gt;" />
  <row Id="28072" PostHistoryTypeId="2" PostId="12732" RevisionGUID="aa38e270-5987-4c62-8266-88396ffb02d1" CreationDate="2011-05-26T05:05:19.587" UserId="1430" Text="Well, a cursory Google search produces several results:&#xD;&#xA;&#xD;&#xA;* [Isogenic Engine][1]&#xD;&#xA;* [Akihabara][2]&#xD;&#xA;* [Impact][3]&#xD;&#xA;* [LimeJS][4]&#xD;&#xA;&#xD;&#xA;I don't know anything about them specifically, but I would think that in general HTML5 is probably a decent way to prototype games even without a framework or engine: quick, direct, low overhead and easy to iterate on.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.isogenicengine.com/&#xD;&#xA;  [2]: http://www.kesiev.com/akihabara/&#xD;&#xA;  [3]: http://impactjs.com/&#xD;&#xA;  [4]: http://www.limejs.com/" />
  <row Id="28073" PostHistoryTypeId="25" PostId="12731" RevisionGUID="040519f0-5cde-4f4b-9bb2-c50442431412" CreationDate="2011-05-26T06:12:59.573" Comment="http://twitter.com/#!/StackGameDev/status/73632704394043392" />
  <row Id="28074" PostHistoryTypeId="2" PostId="12733" RevisionGUID="6d8d65e0-4d0a-41b4-8b7c-2a34b5fc1e67" CreationDate="2011-05-26T06:17:12.473" UserId="4241" Text="I am currently developing a sprite-based 2D game where we are using perspective projection instead of orthogonal one. Obvious reason for using perspective projection was that we wanted to have multiple layers with parallax scrolling and we didn't want to adjust properties for each layer (movement speed, scale) manually. &#xD;&#xA;&#xD;&#xA;Using perspective projection in 2D game does not mean that you cannot render 2D images with full quality. We have defined a plane (Z=0) in which one texel from texture equals exactly one pixel on screen, and basically all elements that are relevant to game logic are places on this plane. Placing elements on other planes will scale the sprites as you would except. Also, note that using perspective projection does not deform sprites if they are facing the camera (as they should be). That is, a square sprite on plane Z=0 is a aquare also on any other plane (at least when you set up the projection properly; I'm not 100% sure if you can set up a projection that deforms sprites).&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - You get layers and parallax scrolling&#xD;&#xA;   for free &#xD;&#xA; - You can add 3D objects to&#xD;&#xA;   your scene so that they appear&#xD;&#xA;   realistic (regarding to perspection)&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - More mathematics involved (you have&#xD;&#xA;   to calculate plane where one texel&#xD;&#xA;   equals one pixel)" />
  <row Id="28075" PostHistoryTypeId="5" PostId="12733" RevisionGUID="59406c2a-f2bf-4c74-94f1-93acb30108cf" CreationDate="2011-05-26T06:22:22.797" UserId="4241" Comment="added 362 characters in body" Text="I am currently developing a sprite-based 2D game where we are using perspective projection instead of orthogonal one. Obvious reason for using perspective projection was that we wanted to have multiple layers with parallax scrolling and we didn't want to adjust properties for each layer (movement speed, scale) manually. &#xD;&#xA;&#xD;&#xA;Using perspective projection in 2D game does not mean that you cannot render 2D images with full quality. We have defined a plane (Z=0) in which one texel from texture equals exactly one pixel on screen, and basically all elements that are relevant to game logic are places on this plane. Placing elements on other planes will scale the sprites as you would except. Also, note that using perspective projection does not deform sprites if they are facing the camera (as they should be). That is, a square sprite on plane Z=0 is a aquare also on any other plane (at least when you set up the projection properly; I'm not 100% sure if you can set up a projection that deforms sprites).&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; - You get layers and parallax scrolling&#xD;&#xA;   for free &#xD;&#xA; - You can add 3D objects to&#xD;&#xA;   your scene so that they appear&#xD;&#xA;   realistic (regarding to perspection)&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - More mathematics involved (you have&#xD;&#xA;   to calculate plane where one texel&#xD;&#xA;   equals one pixel)&#xD;&#xA;&#xD;&#xA;And now, the most important thing: should you use it? Well, it's up to you. I'm very happy with our solution and it is really helping us to achieve the effect we want. On the other hand, if you simply want to draw some sprites and maybe a one background layer, then there might be too much overhead for using perspective projection instead of orthogonal one." />
  <row Id="28076" PostHistoryTypeId="2" PostId="12734" RevisionGUID="35aa1170-a94a-4db2-bf6a-5aa3be656d4d" CreationDate="2011-05-26T06:44:42.810" UserId="20" Text="I'm not familiar with running flash content on Android, but I can think of two things that could cause your issue:&#xD;&#xA;&#xD;&#xA; 1. Make sure your code is error free. The flash player that's usually installed in desktop browsers is quite forgiving in that regard and sometimes continues to run, even if an error was thrown. Install the debug-version of the flash player for your browser and check if you get any error messages (usually they will open in a popup-window).&#xD;&#xA;&#xD;&#xA; 2. Mobile devices tend to have a lot less memory available for apps than the average desktop PC. Make sure your game is memory efficient and doesn't leak memory! You can leak memory with flash pretty easily, even though it's managed code.&#xD;&#xA;&#xD;&#xA;I don't know what software you use to develop that game. If you're using FlashDevelop or FlashBuilder, you can profile/debug your game and look for memory-leaks and errors." />
  <row Id="28077" PostHistoryTypeId="2" PostId="12735" RevisionGUID="892d9ea3-907c-4fa1-9ac0-f4a66d89e44d" CreationDate="2011-05-26T08:04:56.863" UserId="4413" Text="I built http://gamejs.org partly for this purpose. It follows the PyGame API which I know is sometimes used for prototyping.&#xD;&#xA;&#xD;&#xA;I would argue that JavaScript lends itself very well to writing game code quickly; for a more elaborate argument to this effect see http://gamedev.stackexchange.com/questions/9850/capitalizing-on-javascripts-prototypal-inheritance/9862&#xD;&#xA;&#xD;&#xA;Other advantages if you stay with simple technologies, like html5 &amp; js:&#xD;&#xA;&#xD;&#xA;  * every computer has an interpreter and a debugger for JS installed (even mobile devices)&#xD;&#xA;  * easy to pickup for newcomers&#xD;&#xA;  * well documented language, still evolving&#xD;&#xA;  * open technologies through &amp; through&#xD;&#xA;&#xD;&#xA;Whether html5 is more suitable than, say, Flash or even pen&amp;paper depends on your game and how evolved your concept is." />
  <row Id="28078" PostHistoryTypeId="5" PostId="12717" RevisionGUID="50a84e17-d95e-4e83-ab89-18e485b7a2e4" CreationDate="2011-05-26T08:53:13.687" UserId="7331" Comment="we made some edits to clarify meaning &amp; structure and tried to take a less psychologist-oriented viewpoint" Text="For a psychology research project we're looking for several **short** (ca. 5 minute) **games**.&#xD;&#xA;&#xD;&#xA;### Basic requirements&#xD;&#xA;The games need to allow for multiple (more than 10) discrete motive-related events, so that we can measure players' reactions to them. They need to be logged with a high temporal resolution (seconds/milliseconds). We can't use multiplayer games for our research design.&#xD;&#xA;&#xD;&#xA;If there are existing games which fulfill these requirements and conform to one of the following scenarios, we'd love to hear about them. If there is something we can adapt for our needs (adding logging / changing the scenario), that's cool too, we might even hire devs via SO careers when we know what we want. We would also consider designing our own games, but we're low on time, so it would always be best to build on something existing.&#xD;&#xA;&#xD;&#xA;## Three game types&#xD;&#xA;The basic requirement for each game is that it needs to **isolate** one of these three motives. They should thus be as &quot;clean&quot; as possible. It's ok if the motive is both frustrated and stimulated at times.&#xD;&#xA;&gt; A motive is a psychological construct that determine where people focus their energy on and what makes them happy if they achieve important outcomes.&#xD;&#xA;&#xD;&#xA;### Affiliation&#xD;&#xA;Affiliation involves being emotionally close to others and establishing new relationships. The game should revolve around meeting other characters. I.e. through simple means (clicking certain actions) one can explore possibilities to meet friends. Friend requests should be accepted in most cases, because the player is well-liked. This is not related to status or performance, but to the warm fuzzy feeling of friendliness. When getting to know each other, many commonalities between player and character emerge and are happily acknowledged.&#xD;&#xA;&#xD;&#xA;### Achievement&#xD;&#xA;Achievement involves mastering difficult goals. In achievement games you would solve several quests by using some ability (speed, spatial thinking, strategy use). It should adapt to the player's ability, so that it is always possible to solve 60-70% of the quests. Player's should be able to improve their abilities and results with some training. Results should always be related to the individual performance, so there is no high score ranking with others or some such. &#xD;&#xA;&#xD;&#xA;### Power&#xD;&#xA;Power involves obtaining social status and influencing other people. A power game would involve influencing characters and yielding reactions. It should have a low difficulty and work without *points* (kind of like a cheat mode maybe).&#xD;&#xA;&#xD;&#xA;Probably many quite simple games have been lost in the drawers of computer science students who made them as finger exercises and homework. We would only use these games in our research setting, so there is no commercial interest involved.&#xD;&#xA;&#xD;&#xA;Any guidance would be highly appreciated. If you know a specific game that would work, that would of course be best.&#xD;&#xA;&#xD;&#xA;We can of course provide more specific information and we have also created a list of possible games we could use, but we didn't want to jam so much information in here just yet.&#xD;&#xA;&#xD;&#xA;Best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;we edited this in structure to clarify the meaning" />
  <row Id="28079" PostHistoryTypeId="25" PostId="12707" RevisionGUID="0a928e25-3abc-4798-8c55-eb704dd8b8e4" CreationDate="2011-05-26T09:13:00.403" Comment="http://twitter.com/#!/StackGameDev/status/73678005628715008" />
  <row Id="28080" PostHistoryTypeId="2" PostId="12736" RevisionGUID="5dbdeffd-4ccd-4514-8561-c6e6143e2af6" CreationDate="2011-05-26T11:13:47.537" UserId="7497" Text="I've been wondering about this issue for a while. How to find the bottleneck of the graphical pipeline. Recently I've been using a program to draw massive amount of polygons in a simple scene with alpha blending (AKA grass scene). I've used two programs, one uses static coordinates and another uses rotation and translation. Both run at 60 FPS with no other heavy processes running. But when I use them together (Two windows each having same amount of grasses and grass positions) the one that uses translation and rotation runs at 10 FPS but the other one is about 55 FPS. My question is why are both running @ 60 FPS and when such thing happens why does the second one(Rotation and translation of each grass) drop about 50 FPS but the second is still 55? Sounds like a bottle-neck to me. Please let me know if you have any idea, or in a more general answer if you have an idea or paper about finding bottleneck of GPU(or GPGPU), or optimizing the graphical code for running on GPU?" />
  <row Id="28081" PostHistoryTypeId="1" PostId="12736" RevisionGUID="5dbdeffd-4ccd-4514-8561-c6e6143e2af6" CreationDate="2011-05-26T11:13:47.537" UserId="7497" Text="How to find the bottleneck of the graphical pipeline" />
  <row Id="28082" PostHistoryTypeId="3" PostId="12736" RevisionGUID="5dbdeffd-4ccd-4514-8561-c6e6143e2af6" CreationDate="2011-05-26T11:13:47.537" UserId="7497" Text="&lt;opengl&gt;&lt;3d&gt;&lt;graphics-programming&gt;&lt;c&gt;&lt;gpu&gt;" />
  <row Id="28083" PostHistoryTypeId="2" PostId="12737" RevisionGUID="7d47f663-7325-4a01-9c1c-b4fbe5ccc040" CreationDate="2011-05-26T11:17:54.173" UserId="5021" Text="The problem is that although spritebatch only uses texture sampler 0, XNA still complains if texture sampler 1 is set to a floating point format texture.&#xD;&#xA;&#xD;&#xA;So when spritebatch was called, to draw using sampler0 as input, XNA produced an error complaining about sampler1 using linear sampling (even though spritebatch wouldn't have used sampler1).&#xD;&#xA;&#xD;&#xA;The solution is to make sure that all texture samplers that are bound to floating point textures are set to linear sampling before calling spritebatch.&#xD;&#xA;&#xD;&#xA;I.e.:&#xD;&#xA;&#xD;&#xA;    graphicsDevice.SamplerStates[1] = SamplerState.LinearClamp;&#xD;&#xA;&#xD;&#xA;To me this is pretty silly as it causes unecessary sampler state changes and complexity. Hopefully this is being changed in the next version of XNA." />
  <row Id="28084" PostHistoryTypeId="2" PostId="12738" RevisionGUID="609e9270-974e-43ea-a705-c9b3fe654f52" CreationDate="2011-05-26T11:24:33.333" UserId="7594" Text="I've had exactly the same problem with a game of my own.  In my case it seemed to happen at random moments.  I think this happens when the enterFrame handler does not finish the frame before new enterFrame events happen.  In that case the result is not displayed properly unless other events also happen.  &#xD;&#xA;&#xD;&#xA;I lowered the frame rate, and the problem seemed to have gone away (I didn't test it thoroughly, because I eventually ported the game to Java).  I didn't test on Flash 10.3 yet, though.  Maybe they fixed the problem there.  I am interested to see if this works for you.&#xD;&#xA;" />
  <row Id="28085" PostHistoryTypeId="2" PostId="12739" RevisionGUID="4201477e-9e76-4491-b926-fb092d83602f" CreationDate="2011-05-26T11:33:41.303" UserId="3505" Text="This is a really bad question, you are asking about efficiency while your real problem is that your code simply doesn't work.&#xD;&#xA;&#xD;&#xA;In applicable situations discard and retry is a great method for heuristic generation. You can't beat the simplicity, and it's not bad performance in all cases.&#xD;&#xA;&#xD;&#xA;Basically you try to place the planet when you have done just one check, rather than after doing all the checks. Your code is broken beyond that, but I'll leave out the details.&#xD;&#xA;&#xD;&#xA;What you need to do, in pseudocode:&#xD;&#xA;&#xD;&#xA;    function calculatePlanetLocation(){&#xD;&#xA;        validposition=false&#xD;&#xA;        while(!validposition){&#xD;&#xA;            position=generateposition()&#xD;&#xA;            validposition=true&#xD;&#xA;            for each planet{&#xD;&#xA;                if(too close){&#xD;&#xA;                    validposition=false&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        planet.position=position&#xD;&#xA;    }" />
  <row Id="28086" PostHistoryTypeId="2" PostId="12740" RevisionGUID="e06a9e92-68e6-420c-9b06-a152609d7e93" CreationDate="2011-05-26T11:59:53.713" UserId="7328" Text="both running at 60FPS doesn't neccesorily mean they can both run with the same speed, there is usually a fps limiter in game engines that doesn't let fps go higher than 60fps (and that's somthing you can spot that and remove easily), so in your case maybe without this limiter the static fps wuold be around 120 and the dynamic one would be around 70, with them both running gpu can't handle both processes, assuming that your test shows even half of gpu's power is almost enough for static scene, but isn't near enough for dynamic one. and if you want to find bottleneck in your pipeline ,assuming that you have access to all your shaders source codes, you can use &quot;nvidia fx composer&quot;. in that program you can draw your pipeline, give it all your shaders and it'll show how much time is consumed in each stage for each shader." />
  <row Id="28087" PostHistoryTypeId="25" PostId="12736" RevisionGUID="641fd589-ada2-48a9-a508-2aeb0a1f505b" CreationDate="2011-05-26T12:13:00.240" Comment="http://twitter.com/#!/StackGameDev/status/73723302690029570" />
  <row Id="28088" PostHistoryTypeId="2" PostId="12741" RevisionGUID="488ecb0e-0928-4971-827a-bf7a1eb67438" CreationDate="2011-05-26T12:19:13.567" UserId="4947" Text="You can find some information in these materials:&#xD;&#xA;&#xD;&#xA;Randima Fernando. GPU Gems: Programming Techniques, Tips and Tricks for&#xD;&#xA;Real-Time Graphics. Addison-Wesley Professional, 2004. **Chapter 28**&#xD;&#xA;&#xD;&#xA;David Blythe, Brad Grantham, Tom Mcreynolds, and Scott R. Nelson. Advanced&#xD;&#xA;Graphics Programming Techniques Using OpenGL. Course Notes for&#xD;&#xA;SIGGRAPH ’99. ACM, 1999." />
  <row Id="28089" PostHistoryTypeId="2" PostId="12742" RevisionGUID="ec802108-209d-4845-b2b4-fc5ac8e0a834" CreationDate="2011-05-26T12:46:09.937" UserId="7050" Text="I have a 2d game with a boss represented as a plane with a texture. Around the plane there is a collision box. There is another empty gameobject with a collision box as a child of my boss.&#xD;&#xA;&#xD;&#xA;The 2nd box is the area where shoots damage the boss, the rest is an invincible zone.&#xD;&#xA;&#xD;&#xA;To implement it i tried to attach another script to the 2nd collision box, but when thi box is collided it trigger the OnCollisionenter of the parent and not of the child.&#xD;&#xA;&#xD;&#xA;How can i implement in unity, an element reacting different from the collider triggered?" />
  <row Id="28090" PostHistoryTypeId="1" PostId="12742" RevisionGUID="ec802108-209d-4845-b2b4-fc5ac8e0a834" CreationDate="2011-05-26T12:46:09.937" UserId="7050" Text="In Unity, how to have a shmup boss with invicible zone and target zone?" />
  <row Id="28091" PostHistoryTypeId="3" PostId="12742" RevisionGUID="ec802108-209d-4845-b2b4-fc5ac8e0a834" CreationDate="2011-05-26T12:46:09.937" UserId="7050" Text="&lt;collision-detection&gt;&lt;unity&gt;" />
  <row Id="28092" PostHistoryTypeId="2" PostId="12743" RevisionGUID="e41310a3-7f93-4398-a3a4-c6433087292f" CreationDate="2011-05-26T12:54:36.333" UserId="7594" Text="I am using Java with JOGL to create OpenGL enhanced 2D graphics.  The graphics operations I use are nothing fancy, and should be supported by almost any recent graphics card.  For example, my game runs great on a Netbook.&#xD;&#xA;&#xD;&#xA;I was hoping the game would run on most computers.  It runs fine on my own computers.  However, I found some computers have very slow performance (apparently software fallback, yielding about 2 frames per second).  I ran a LWJGL app on one such computer. It doesn't run at all (it reports something like&#xD;&#xA;org.lwjgl.LWJGLException: Pixel format not accelerated, you can find various forum threads complaining about this but no apparent solutions, except the suggestion that it is a driver problem).  Other OpenGL software does not seem to work, either.  I also found that my Flash version of the game with exactly the same graphical effects performs pretty well full-screen on that same computer.  The computer in question has a recent ATI card but unfortunately I have no access to the driver manager.&#xD;&#xA;&#xD;&#xA;The problem appears fairly widespread.  I think it is very unfortunate that OpenGL does not always provide access to graphics features found on most computers.  This makes it less attractive for casual 2D games, which I expect to run on any computer.&#xD;&#xA;&#xD;&#xA;Did any of you run into this problem and manage to fix it?  AFAIK, both NVidia and ATI provide OpenGL as part of their standard driver sets, but maybe there are some exceptions?  Is this problem caused by third party drivers not supporting OpenGL, and can the problem be fixed by installing better drivers?  How many other graphics cards are out there without OpenGL drivers?  &#xD;&#xA;" />
  <row Id="28093" PostHistoryTypeId="1" PostId="12743" RevisionGUID="e41310a3-7f93-4398-a3a4-c6433087292f" CreationDate="2011-05-26T12:54:36.333" UserId="7594" Text="What causes some computers to have no or slow OpenGL, and how to fix it?" />
  <row Id="28094" PostHistoryTypeId="3" PostId="12743" RevisionGUID="e41310a3-7f93-4398-a3a4-c6433087292f" CreationDate="2011-05-26T12:54:36.333" UserId="7594" Text="&lt;opengl&gt;&lt;lwjgl&gt;&lt;jogl&gt;" />
  <row Id="28095" PostHistoryTypeId="2" PostId="12744" RevisionGUID="ebcc7578-82fd-4c81-91a0-2fc475066afa" CreationDate="2011-05-26T13:29:33.583" UserId="2792" Text="The general answer is to do a frame capture and profile. Use something like [NV PerfHUD][1] or other GPU performance counters to see what the GPU is doing, and which draw calls takes time. You can then get information about what the bottle neck that draw call had.&#xD;&#xA;&#xD;&#xA;Your case seems to be something like two programs interacting and context switching the GPU?&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.nvidia.com/nvidia-perfhud &quot;NV PerfHUD&quot;" />
  <row Id="28096" PostHistoryTypeId="2" PostId="12745" RevisionGUID="516a8bca-f2f0-4b87-912c-fbe434be2f9b" CreationDate="2011-05-26T14:13:58.820" UserId="7595" Text="Every programming languages have strengths and weaknesses across a range of factors. Examples of these factors are:&#xD;&#xA;&#xD;&#xA; - Speed on a particular platform&#xD;&#xA; - Memory usage on a particular platform&#xD;&#xA; - What functionality it exposes more readily&#xD;&#xA; - What platforms it exists on&#xD;&#xA; - What considerations a programmer has to take on-board&#xD;&#xA;&#xD;&#xA;One of the most important factors a game programmer cares about is performance. They want to produce an interactive experience, which means it has to be reactive and able to output as much useful (or interesting) data as possible. You want to know how much health you have at any time and don't want to wait for it. And if you click a button, you expect a gun to fire or your character to jump when you say so. A little lag can interfere with this interactivity so you need performance.&#xD;&#xA;&#xD;&#xA;Another important factor is preferring to program in the language of the problem, rather the language of the implementation. A game programmer wants to deal with humans, orcs and race-cars, not memory register ED0. They still want the option of diving into the implementation details if they need performance, but it'd be great if for the most part they can deal on the level of the entities in their game world. They have enough to worry about simulating the game world without having to always care about how a linked list works.&#xD;&#xA;&#xD;&#xA;C++ fits these two primary factors very well. You can have the performance benefits of assembly or C code with the expressiveness of objects. To see why this is a natural fit for games, compare with some other language options:&#xD;&#xA;&#xD;&#xA; - **Assembly:** This is raw power. What you write is basically what the CPU does. But at every stage you need to know what is going on with registers and the effect of this, and it never looks like the entities in your game world. The programmer has to make the mental correspondence of what their code does versus what happens in the game. This can be quite a mental overhead.&#xD;&#xA; - **C:** Here we have good performance, but we can leverage the experience of gurus to get standard things done (like allocate memory, operate on strings and use standard mathematical functions). We get closer to expressiveness here, but the language more or less forces you to focus on the implementation because you can really only operate on normal data types. Everything is really a char, an int or the like. structs, pointers and arrays can hold things together, but still have to think about the internals.&#xD;&#xA; - **Java:** We leapfrog over C++ and get to Java. Java pushes further away from implementation details. In fact, much of the time you don't get access to the lower levels. Java abstracts away much of the implementation details (eg. what CPU or OS you're using) for the reason that it wants to be cross-platform. You can't access the details because they are not there. You don't program for the computer, you program for the platform (the Java platform, which happens to exist on most computers). Moreover, Java has an arguably better language for dealing in the language of the problem than C++. The trade-off is you can't optimize for a particular computer. Whether this makes a practical difference or not comes down to the specifics of the program and the computer.&#xD;&#xA; - **Game scripting language:** By this I mean something like [UnrealScript][1], or custom scripting languages strapped onto a game engine. In these you have no access to the underlying engine. You delegate performance considerations to the engine, leaving yourself free to worry about making a game. It's easier to write the game, harder to optimize its performance yourself.&#xD;&#xA; - **Haskell (or your favourite obscure language):** Any [Turing-complete][2] programming language is equivalent to any other. So while you *can* write any program in any language, you make tradeoffs, some objective, some subjective. A language like Haskell is more focussed on working in a mathematical spirit. The problems it is geared towards are somewhat different the problems faced in games. It doesn't mean it can't or shouldn't be used for games, it's just its not easily suited to it.&#xD;&#xA;&#xD;&#xA;The last point is that some of this is historical and political. Many flame wars have been fought between the different programming languages. C# for example might be just as suitable to games development, but it came after C++. Or people don't like that it's from Microsoft. Some people made the move to C#, some didn't. Some people still program games in BASIC, Pascal, and C. Whatever programmers are comfortable with, they'll stick to. Games programmers have mostly been comfortable with C++, possibly because they grew up with C and C++, and it met their needs. If the computer industry is in a state where Java's performance and uptake satisfies enough people, then maybe Java would be the de facto standard game development language.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/UnrealScript&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Turing_complete" />
  <row Id="28097" PostHistoryTypeId="2" PostId="12746" RevisionGUID="7f0e33a9-6a15-4911-acd8-2b5ce7744761" CreationDate="2011-05-26T14:58:19.377" UserId="163" Text="I don't know if it supports all the fonts you're interested in, and it's rather old so there will certainly be some translation effort if you want to use it. But I figured I may as well post it in case it's useful:&#xD;&#xA;&#xD;&#xA;[http://blogs.msdn.com/b/manders/archive/2007/01/12/stroke-based-text-rendering-in-xna.aspx][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/manders/archive/2007/01/12/stroke-based-text-rendering-in-xna.aspx" />
  <row Id="28098" PostHistoryTypeId="25" PostId="12743" RevisionGUID="4bcbee4e-9db9-4b82-b202-d8c455d578eb" CreationDate="2011-05-26T15:13:00.187" Comment="http://twitter.com/#!/StackGameDev/status/73768602318286849" />
  <row Id="28099" PostHistoryTypeId="2" PostId="12747" RevisionGUID="cab3e462-e9c6-41a1-823e-0968b06bce0a" CreationDate="2011-05-26T15:40:11.070" UserId="7482" Text="I'm creating a game which uses 320x160 sized isometric tiles. I've got an editor that allows me to take loaded in tiles and plot them. The map size is 8x8, and instead of placing down 64 movieclips, and then moving them around, I thought I'd use the bitmapData.draw function to plot these mc's directly to a bitmap (as i'm not doing anything with them after they are put down anyway), that works fine apart from there's a small line appearing between the tiles, along the edges. I think this has something to do with anti-aliasing, because when I export the tile as a .png with no smooth, and use that tile in my editor, there's no feint line between the tiles, but that also makes the tile overall look pixely, so I'm at a bit of a loss. I want the edges to fit perfectly together so need to be pixel perfect, but I want the interior of the tiles to be smoothed, any ideas? unless there's a way to solve this with the bitmapData approach in itself? The only thing I can think of right now is to make the tiles slightly bigger than they need to be so they overlap slightly, but that's a bit of a fudge, which I want to avoid if possible." />
  <row Id="28100" PostHistoryTypeId="1" PostId="12747" RevisionGUID="cab3e462-e9c6-41a1-823e-0968b06bce0a" CreationDate="2011-05-26T15:40:11.070" UserId="7482" Text="Perfect fit for iso tiles in as3 with bitmapdata" />
  <row Id="28101" PostHistoryTypeId="3" PostId="12747" RevisionGUID="cab3e462-e9c6-41a1-823e-0968b06bce0a" CreationDate="2011-05-26T15:40:11.070" UserId="7482" Text="&lt;actionscript-3&gt;" />
  <row Id="28102" PostHistoryTypeId="5" PostId="12747" RevisionGUID="a18ddc7c-21a5-46e9-9b9d-bed3932d63e6" CreationDate="2011-05-26T15:52:47.060" UserId="1156" Comment="added 7 characters in body; edited tags; edited title" Text="I'm creating a game which uses 320x160 sized isometric tiles. I've got an editor that allows me to take loaded in tiles and plot them. The map size is 8x8, and instead of placing down 64 movieclips, and then moving them around, I thought I'd use the bitmapData.draw function to plot these mc's directly to a bitmap (as I'm not doing anything with them after they are put down anyway).&#xD;&#xA;&#xD;&#xA;That works fine apart from there's a small line appearing between the tiles, along the edges. I think this has something to do with anti-aliasing, because when I export the tile as a .png with no smooth, and use that tile in my editor, there's no faint line between the tiles, but that also makes the tile overall look pixely, so I'm at a bit of a loss. &#xD;&#xA;&#xD;&#xA;I want the edges to fit perfectly together so need to be pixel perfect, but I want the interior of the tiles to be smoothed, any ideas? unless there's a way to solve this with the bitmapData approach in itself? The only thing I can think of right now is to make the tiles slightly bigger than they need to be so they overlap slightly, but that's a bit of a fudge, which I want to avoid if possible." />
  <row Id="28103" PostHistoryTypeId="4" PostId="12747" RevisionGUID="a18ddc7c-21a5-46e9-9b9d-bed3932d63e6" CreationDate="2011-05-26T15:52:47.060" UserId="1156" Comment="added 7 characters in body; edited tags; edited title" Text="Perfect fit for isometric tiles in AS3 with BitmapData" />
  <row Id="28104" PostHistoryTypeId="6" PostId="12747" RevisionGUID="a18ddc7c-21a5-46e9-9b9d-bed3932d63e6" CreationDate="2011-05-26T15:52:47.060" UserId="1156" Comment="added 7 characters in body; edited tags; edited title" Text="&lt;actionscript-3&gt;&lt;tiles&gt;&lt;isometric&gt;" />
  <row Id="28105" PostHistoryTypeId="2" PostId="12748" RevisionGUID="da5191c9-10b4-4965-ac31-14426374e36b" CreationDate="2011-05-26T15:54:57.713" UserId="6894" Text="I just thought of this, you could try using a game engine or tiling engine like Flixel or FlashPunk. I haven't used them yet myself, but I have been looking into it." />
  <row Id="28106" PostHistoryTypeId="5" PostId="12742" RevisionGUID="e2ed505d-65bf-4b52-91ab-5d12375a3cef" CreationDate="2011-05-26T15:56:15.080" UserId="3588" Comment="Added the shmup tag, restructured the title, and some minor touch-ups on the post body. ♪" Text="I have a 2d game with a boss represented as a plane with a texture. Around the plane there is a collision box. There is another empty gameobject with a collision box as a child of my boss.&#xD;&#xA;&#xD;&#xA;The 2nd box is the area where shots damage the boss, the rest is an invincible zone.&#xD;&#xA;&#xD;&#xA;To implement it, I tried to attach another script to the 2nd collision box, but when this box is collided it triggers the OnCollisionenter of the parent and not of the child.&#xD;&#xA;&#xD;&#xA;How can I implement an element reacting different from the collider triggered in Unity?" />
  <row Id="28107" PostHistoryTypeId="4" PostId="12742" RevisionGUID="e2ed505d-65bf-4b52-91ab-5d12375a3cef" CreationDate="2011-05-26T15:56:15.080" UserId="3588" Comment="Added the shmup tag, restructured the title, and some minor touch-ups on the post body. ♪" Text="In Unity, how do I implement a shmup boss with invincible zone and target zone?" />
  <row Id="28108" PostHistoryTypeId="6" PostId="12742" RevisionGUID="e2ed505d-65bf-4b52-91ab-5d12375a3cef" CreationDate="2011-05-26T15:56:15.080" UserId="3588" Comment="Added the shmup tag, restructured the title, and some minor touch-ups on the post body. ♪" Text="&lt;collision-detection&gt;&lt;unity&gt;&lt;shoot-em-up&gt;" />
  <row Id="28109" PostHistoryTypeId="24" PostId="12742" RevisionGUID="e2ed505d-65bf-4b52-91ab-5d12375a3cef" CreationDate="2011-05-26T15:56:15.080" Comment="Proposed by 3588 approved by 51 edit id of 449" />
  <row Id="28110" PostHistoryTypeId="2" PostId="12749" RevisionGUID="bfd6e257-ae07-4e5f-acd6-dd3e4784f443" CreationDate="2011-05-26T16:03:52.177" UserId="20" Text="You should make sure the alpha channel of your tile is crisp.&#xD;&#xA;&#xD;&#xA;So if we zoom in a bit, the alpha should look like this:&#xD;&#xA;&#xD;&#xA;![alpha aliased][1]&#xD;&#xA;&#xD;&#xA;Not like this:&#xD;&#xA;&#xD;&#xA;![alpha antialiased][2]&#xD;&#xA;&#xD;&#xA;If you have anti-aliased alpha edges like before, you'll always see bits of the background shining through where edges meet. A good way to get the transparency right, is by using &quot;layer masks&quot; in Photoshop or use the polygonal-lasso tool and disable &quot;Anti-Alias&quot;.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/oDm1j.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/8OZ5f.png" />
  <row Id="28111" PostHistoryTypeId="2" PostId="12750" RevisionGUID="fe6a0508-65c8-4f8e-8677-071ba1bc9d3e" CreationDate="2011-05-26T16:13:29.220" UserId="51" Text="I'm just guessing here, but are you using shaders?  What video card was in the computer you tested on that threw the exception? A lot of older built-in Intel cards don't have pixel shader support.&#xD;&#xA;&#xD;&#xA;Your only real recourse, if that's the case, is to provide a fixed function fallback." />
  <row Id="28112" PostHistoryTypeId="5" PostId="12749" RevisionGUID="18e77860-74df-42d5-873d-a1addb390101" CreationDate="2011-05-26T16:54:06.670" UserId="20" Comment="added some more information" Text="You should make sure the alpha channel of your tile is crisp.&#xD;&#xA;&#xD;&#xA;So if we zoom in a bit, the alpha should look like this:&#xD;&#xA;&#xD;&#xA;![alpha aliased][1]&#xD;&#xA;&#xD;&#xA;Not like this:&#xD;&#xA;&#xD;&#xA;![alpha antialiased][2]&#xD;&#xA;&#xD;&#xA;If you have anti-aliased alpha edges like before, you'll always see bits of the background shining through where edges meet. A good way to get the transparency right, is by using &quot;layer masks&quot; in Photoshop or use the polygonal-lasso tool and disable &quot;Anti-Alias&quot;.&#xD;&#xA;&#xD;&#xA;**Edit:** I'm sorry, I just re-read your question and saw that your tiles are actually MovieClips, and not Bitmaps. One option (as indicated in the comment below) is to save the image as PNG, with a aliased alpha channel. Another option would be to use the [BitmapData.copyPixels][3] method and provide a separate (aliased) alpha channel as the `alphaBitmapData` parameter. That works best, if your tiles don't come with an alpha initially and are filled with the border-color, as in the following image:&#xD;&#xA;&#xD;&#xA;![tile rgb and alpha][4]&#xD;&#xA;&#xD;&#xA;On the left, there's the tile color (which can still be a MovieClip) and on the right, there's the alpha channel which is aliased and can be provided separately to the `copyPixels` method.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/oDm1j.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/8OZ5f.png&#xD;&#xA;  [3]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#copyPixels%28%29&#xD;&#xA;  [4]: http://i.stack.imgur.com/D88cQ.png" />
  <row Id="28113" PostHistoryTypeId="2" PostId="12751" RevisionGUID="1d681506-86dd-4093-bdea-f504d9a63342" CreationDate="2011-05-26T18:06:25.987" UserId="6894" Text="I am not sure what was happening. I am sure one of the answers was probably the problem, but I couldn't find it specifically. I rewrote my game loop and a lot of the other code that worked with it and the problem is gone." />
  <row Id="28114" PostHistoryTypeId="25" PostId="12747" RevisionGUID="7c40138e-27f3-4f91-82cd-6cb6577f0cea" CreationDate="2011-05-26T18:13:00.720" Comment="http://twitter.com/#!/StackGameDev/status/73813902537920513" />
  <row Id="28115" PostHistoryTypeId="2" PostId="12752" RevisionGUID="44357580-d7e4-478a-818e-ce0f22b2338b" CreationDate="2011-05-26T18:29:59.587" UserId="3644" Text="This is a common problem even on new GPUs when drivers are not installed. OpenGL version is 1.0 1.1 and is running in software mode. &#xD;&#xA;&#xD;&#xA;Install/update GPU drivers and add version query to your application. If returned OpenGL version is below 1.1 then it is definitely missing drivers." />
  <row Id="28116" PostHistoryTypeId="10" PostId="12742" RevisionGUID="c7b47a77-2cf0-4ba2-b57f-e3609caf3c53" CreationDate="2011-05-26T19:58:57.507" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="28117" PostHistoryTypeId="2" PostId="12753" RevisionGUID="45f9c426-20f7-4ba0-9e49-41a50f35ca0c" CreationDate="2011-05-26T20:23:08.860" UserId="7603" Text="I'm trying to find useful information on creating game levels in a reasonably efficient way.&#xD;&#xA;Additionally, information in setting up a fairly painless way to edit this information would be handy. (The closest I've come is some monstrosity in flash. I would place the parts onto the stage, and run a script reading all the platforms, triggers and what have you, into an XML document)&#xD;&#xA;&#xD;&#xA;Google hasn't been to terribly helpful in finding what I need (probably what terms I'm using as I'm not sure exactly how I would refer to this.) I'm hoping there may be someone here who knows of a good solid article on handling the data for a level.&#xD;&#xA;&#xD;&#xA;I've made a few attempts in previous projects (the latest being in flash using XML), and I often run into issues with performance. (In my case, I narrowed it down to having to many objects loaded, and started culling what was outside my view, was still slow though...)" />
  <row Id="28118" PostHistoryTypeId="1" PostId="12753" RevisionGUID="45f9c426-20f7-4ba0-9e49-41a50f35ca0c" CreationDate="2011-05-26T20:23:08.860" UserId="7603" Text="Storing, loading and editing a Level" />
  <row Id="28119" PostHistoryTypeId="3" PostId="12753" RevisionGUID="45f9c426-20f7-4ba0-9e49-41a50f35ca0c" CreationDate="2011-05-26T20:23:08.860" UserId="7603" Text="&lt;levels&gt;&lt;map-editor&gt;" />
  <row Id="28120" PostHistoryTypeId="2" PostId="12754" RevisionGUID="2f6b83c3-29b4-4332-9239-a293a9ace872" CreationDate="2011-05-26T20:24:57.343" UserId="962" Text="What is the best pattern to create a system that all the objects positions to be interpolated between two ticks? " />
  <row Id="28121" PostHistoryTypeId="1" PostId="12754" RevisionGUID="2f6b83c3-29b4-4332-9239-a293a9ace872" CreationDate="2011-05-26T20:24:57.343" UserId="962" Text="How to Interpolate between two game states?" />
  <row Id="28122" PostHistoryTypeId="3" PostId="12754" RevisionGUID="2f6b83c3-29b4-4332-9239-a293a9ace872" CreationDate="2011-05-26T20:24:57.343" UserId="962" Text="&lt;design-patterns&gt;&lt;interpolation&gt;&lt;fixed-timestep&gt;" />
  <row Id="28123" PostHistoryTypeId="5" PostId="12754" RevisionGUID="672fe0ca-d7b2-4d4a-aaed-80b1a7c07ffd" CreationDate="2011-05-26T20:50:00.143" UserId="962" Comment="added more information." Text="What is the best pattern to create a system that all the objects positions to be interpolated between two update states?&#xD;&#xA;&#xD;&#xA;The update will always run at the same frequency, but I want to be able to render at any FPS. So the rendering will be as smooth as possible no matter the frames per second, whether its lower, or higher than the update frequency." />
  <row Id="28124" PostHistoryTypeId="5" PostId="210" RevisionGUID="4a2087d6-3fda-4396-ae41-1245db7040aa" CreationDate="2011-05-26T20:58:32.190" UserId="2061" Comment="do --&gt; don't.  Fixed up grammar to meet the 6-character requirement." Text="I dont know much about java, so this is from the point of view of a .net dev.&#xD;&#xA;&#xD;&#xA;The biggest one by far is garbage. the .net garbage collector on windows does a fantastic job, and you can get away without baby sitting it for the most part. On the xbox/winPhone7 that's a different matter. If you get stalls every few frames, garbage collection might be causing you problems. At the moment it triggers after every 1mb allocation.&#xD;&#xA;&#xD;&#xA;Heres some tips for dealing with garbage. You shouldn't have to worry about most of these in reality, but they may come in handy one day.&#xD;&#xA;&#xD;&#xA; - Draw the contents of `GC.GetTotalMemory()` to the screen. This gives you an approximation of the amount of allocated bytes your game uses. If it hardly moves, you're doing ok. If it's going up fast, you have issues.&#xD;&#xA; - try to allocate all your *heap* objects up front. If you don't allocate everything before the game starts, everytime you hit a meg of allocations, your going to stall. No allocations, no collections.  As simple as that.&#xD;&#xA; - After loading, call GC.Collect(). If you know most of your big allocations are out the way, it's only nice to let the system know.&#xD;&#xA; - DO NOT CALL `GC.Collect()` every frame. It might seem like a good idea, keeping on top of your garbage and all that, but remember the only with worse than a garbage collection is over garbage collection. &#xD;&#xA; - Look for where your garbage is coming from. There are some common causes like concatenating strings instead of using [`StringBuilder`][1] (beware, `StringBuilder` isn't a magic bullet, and can still [cause allocations!][2]. This means simple operations like adding a number to the end of a string can create surprising amounts of garbage) or using `foreach` loops over collections that use the `IEnumerable` interface can also create garbage without you knowing (for example, `foreach (EffectPass pass in effect.CurrentTechnique.Passes)` is a common one)&#xD;&#xA; - Use tools like the [CLR memory profiler][3] to figure out where memory is being allocated. There are loads of tutorials out there on how to use this tool.&#xD;&#xA; - When you know where your allocating during gameplay, see if you can use tricks like pooling objects to lower that allocation count.&#xD;&#xA; - If all else fails, make your collections run faster! The GC on the compact framework follows every reference in your code to figure out what objects are not in use anymore. Refactor your code use less references!&#xD;&#xA; - Remember to use `IDisposable` on classes that contain unmanaged resources. You can use these to clean up memory the GC cannot free up itself.&#xD;&#xA;&#xD;&#xA;The other thing to think about is floating point performance. While the .Net JITer does a fair amount of processor-specific optimizations, it cannot use SSE or any other SIMD instruction sets to speed up your floating point maths. This can cause quite a big speed difference between C++ and C# for games. If your using mono, they have some special SIMD maths libraries you can take advantage of.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx&#xD;&#xA;  [2]: http://www.musictomakegamesby.com/2010/04/01/xnac-avoiding-garbage-when-working-with-stringbuilder/&#xD;&#xA;  [3]: http://www.microsoft.com/downloads/details.aspx?FamilyID=a362781c-3870-43be-8926-862b40aa0cd0&amp;DisplayLang=en" />
  <row Id="28125" PostHistoryTypeId="24" PostId="210" RevisionGUID="4a2087d6-3fda-4396-ae41-1245db7040aa" CreationDate="2011-05-26T20:58:32.190" Comment="Proposed by 2061 approved by 51 edit id of 450" />
  <row Id="28126" PostHistoryTypeId="5" PostId="7471" RevisionGUID="ddecbcef-9f60-4eb2-be30-b0d5a43c63b7" CreationDate="2011-05-26T21:01:53.593" UserId="962" Comment="deleted 875 characters in body; edited tags; edited title" Text="My main goal is avoid using an external program like SpriteSheetPacker.&#xD;&#xA;&#xD;&#xA;I would like to just use sequenced PNGs and have the sprite sheets be made, updated, and saved automatically when I build my game." />
  <row Id="28127" PostHistoryTypeId="4" PostId="7471" RevisionGUID="ddecbcef-9f60-4eb2-be30-b0d5a43c63b7" CreationDate="2011-05-26T21:01:53.593" UserId="962" Comment="deleted 875 characters in body; edited tags; edited title" Text="Spritesheets From Individual Images in Content Pipeline?" />
  <row Id="28128" PostHistoryTypeId="6" PostId="7471" RevisionGUID="ddecbcef-9f60-4eb2-be30-b0d5a43c63b7" CreationDate="2011-05-26T21:01:53.593" UserId="962" Comment="deleted 875 characters in body; edited tags; edited title" Text="&lt;2d&gt;&lt;xna-4.0&gt;&lt;spritesheet&gt;&lt;pipeline&gt;" />
  <row Id="28129" PostHistoryTypeId="5" PostId="12709" RevisionGUID="47018650-9116-425c-9ee3-f708885454bb" CreationDate="2011-05-26T21:06:09.133" UserId="1379" Comment="added 165 characters in body" Text="When working with any mesh, you get an XYZ point somewhere on it. If you just want to move the mesh in any direction, it doesn't matter where this point is located.&#xD;&#xA;&#xD;&#xA;However, I want to rotate a door. This requires the point of rotation to be very specific. I can't find anywhere how to change the location of the point. Can anyone help?&#xD;&#xA;&#xD;&#xA;EDIT: solved, to change the pivot point, right click on the mesh, go to &quot;Pivot&quot; and move it. Then right click again and this time select &quot;Save PrePivot to Pivot&quot;" />
  <row Id="28130" PostHistoryTypeId="25" PostId="12754" RevisionGUID="9d9d64a7-da54-408d-bc9e-fea303810c4c" CreationDate="2011-05-26T21:13:01.540" Comment="http://twitter.com/#!/StackGameDev/status/73859203546099712" />
  <row Id="28131" PostHistoryTypeId="2" PostId="12755" RevisionGUID="9905db8f-e626-4f8f-aaa2-ffa185f3127a" CreationDate="2011-05-26T21:31:18.407" UserId="7607" Text="http://theussner.wordpress.com/2010/09/13/rts-level-design-the-layout-part-1/#comment-28&#xD;&#xA;&#xD;&#xA;This link is to a German (in English) game designer's blog. He has only done part 1 so far but makes some good points as to how RTS map's should be conceptualized. Leaving some comments will no doubt encourage him to complete the series on RTS map design." />
  <row Id="28132" PostHistoryTypeId="16" PostId="12755" RevisionGUID="5f014056-a0f5-4aa2-8241-e1af0fa45fe7" CreationDate="2011-05-26T21:31:18.407" UserId="7607" />
  <row Id="28135" PostHistoryTypeId="5" PostId="7471" RevisionGUID="58daca91-6f88-4830-8ba7-f972bf6d8325" CreationDate="2011-05-26T21:46:09.363" UserId="962" Comment="added 218 characters in body" Text="My main goal is avoid using an external program like SpriteSheetPacker.&#xD;&#xA;&#xD;&#xA;I would like to just use sequenced PNGs and have the sprite sheets be made, updated, and saved automatically when I build my game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit: The old answers I upvoted, but I updated the question and specifically asked how to do this automatically with the Content Pipeline. Please do not give an answer that involves using an external program.**" />
  <row Id="28136" PostHistoryTypeId="5" PostId="12754" RevisionGUID="d00ba652-95fa-4ab7-8e40-3b15508bb117" CreationDate="2011-05-26T21:52:22.517" UserId="962" Comment="added 259 characters in body" Text="What is the best pattern to create a system that all the objects positions to be interpolated between two update states?&#xD;&#xA;&#xD;&#xA;The update will always run at the same frequency, but I want to be able to render at any FPS. So the rendering will be as smooth as possible no matter the frames per second, whether its lower, or higher than the update frequency.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would want to update 1 frame into the future interpolate from the current frame to the future frame. This answer has a link that talks about doing this:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12347/semi-fixed-or-fully-fixed-timestep/12368#12368" />
  <row Id="28137" PostHistoryTypeId="2" PostId="12757" RevisionGUID="550a8d44-0b9d-4424-9de0-9b9bd29828f0" CreationDate="2011-05-26T22:07:11.133" UserId="3545" Text="In addition to the EA game mentioned in amitp's comment, Rovio used GWT to port [&quot;Angry Birds&quot;][1] to the web (with a bit of Flash to work around HTML5's sad audio situation).&#xD;&#xA;&#xD;&#xA;There was a dzone article about it not to long ago: [&quot;Web Gaming Technologies: Angry Birds' Cross-compiled Java Versus Native JavaScript&quot;][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://chrome.google.com/webstore/detail/aknpkdffaafgjchaibgeefbgmgeghloj&#xD;&#xA;  [2]: http://css.dzone.com/articles/web-gaming-technologies-angry" />
  <row Id="28138" PostHistoryTypeId="5" PostId="121" RevisionGUID="6dbd8fc7-3aeb-4e5d-a313-432d491b59e6" CreationDate="2011-05-26T22:57:06.430" UserId="2061" Comment="out ways --&gt; outweighs" Text="Neither Java nor C# are interpreted. Both of them get compiled into native machine code.&#xD;&#xA;&#xD;&#xA;The biggest problem with both of them and games is having to code in such a way that they never garbage collect during game play. The number of hoops you have to jump through to accomplish that nearly outweighs the benefits of using them in the first place. Most of the features that make those language fun to use for application or server programming have to be avoided for game programming otherwise you'll get long pauses during game play as they go off and garbage collect." />
  <row Id="28139" PostHistoryTypeId="24" PostId="121" RevisionGUID="6dbd8fc7-3aeb-4e5d-a313-432d491b59e6" CreationDate="2011-05-26T22:57:06.430" Comment="Proposed by 2061 approved by 51 edit id of 451" />
  <row Id="28140" PostHistoryTypeId="2" PostId="12758" RevisionGUID="f665a838-5136-4e2d-94af-9043a0a470ad" CreationDate="2011-05-26T23:00:11.910" UserId="2229" Text="The following is the OpenGL ES 2.0 simple **GLSL Fragment Shader**, I use to place textures on polygons, to render 2D sprites.&#xD;&#xA;&#xD;&#xA;    varying mediump vec2 TextureCoordOut;&#xD;&#xA;    uniform sampler2D Sampler;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    gl_FragColor = texture2D(Sampler, TextureCoordOut);&#xD;&#xA;	//gl_FragColor = vec4(texture2D(Sampler, TextureCoordOut).xyz, TextureCoordOut.w * 0.5);&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fragment shader places voxels with alpha information taken from the source 2D texutre(.png image). Apart from alpha information, I need to control overall polygon/sprite transparency to achieve **Fade In/Fade Out** effects.&#xD;&#xA;&#xD;&#xA;Could you show me, please, how to **modify the above shader** to control the overall transparency, besides the alpha information?&#xD;&#xA;&#xD;&#xA;_Note: The commented out line is used for my attempts to achieve the transparency. I wish to **combine** both the alpha information with the overall polygon/sprite transparency._  &#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="28141" PostHistoryTypeId="1" PostId="12758" RevisionGUID="f665a838-5136-4e2d-94af-9043a0a470ad" CreationDate="2011-05-26T23:00:11.910" UserId="2229" Text="OpenGL ES 2.0: Controlling Transparency in Fragment Shader" />
  <row Id="28142" PostHistoryTypeId="3" PostId="12758" RevisionGUID="f665a838-5136-4e2d-94af-9043a0a470ad" CreationDate="2011-05-26T23:00:11.910" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;glsl&gt;" />
  <row Id="28143" PostHistoryTypeId="2" PostId="12759" RevisionGUID="f8bf57ce-0a7d-46c0-88ce-110d0ee35b67" CreationDate="2011-05-26T23:06:50.077" UserId="2229" Text="Apparently, I found the soultion. &#xD;&#xA;&#xD;&#xA;_This is the correct line in Fragment Shader:_&#xD;&#xA;&#xD;&#xA;    	gl_FragColor = vec4(texture2D(Sampler, TextureCoordOut).xyz, texture2D(Sampler, TextureCoordOut).w * 0.5);&#xD;&#xA;&#xD;&#xA;Thanks anyway." />
  <row Id="28144" PostHistoryTypeId="2" PostId="12760" RevisionGUID="7101823a-992f-4bc2-adeb-8b96dfb0e3cd" CreationDate="2011-05-27T00:03:20.227" UserId="5021" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's predicted position at the next frame. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick." />
  <row Id="28145" PostHistoryTypeId="25" PostId="12758" RevisionGUID="66714217-8d73-4d8d-a7ab-5c18e78ea091" CreationDate="2011-05-27T00:13:02.277" Comment="http://twitter.com/#!/StackGameDev/status/73904506055823360" />
  <row Id="28146" PostHistoryTypeId="5" PostId="12760" RevisionGUID="6eeceec7-9f59-4891-a331-ebf3f6503391" CreationDate="2011-05-27T00:13:41.310" UserId="5021" Comment="added 553 characters in body; added 25 characters in body; added 130 characters in body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28147" PostHistoryTypeId="5" PostId="12760" RevisionGUID="e77bfe02-790e-47e9-92df-deb923f84d90" CreationDate="2011-05-27T00:19:37.967" UserId="5021" Comment="added 10 characters in body; added 12 characters in body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the (predicted) position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28148" PostHistoryTypeId="2" PostId="12761" RevisionGUID="8d57709c-1167-4d62-a989-3cd739d90475" CreationDate="2011-05-27T01:06:11.917" UserId="263" Text="You might be interested in a talk from this year's Google I/O about [using GWT, WebGL, and App Engine to build game tools](http://www.youtube.com/watch?v=NNmoEOpGJdk). I would never have imagined that could be a really killer combination but was really surprised at how awesome it looked." />
  <row Id="28149" PostHistoryTypeId="2" PostId="12762" RevisionGUID="e2d77f6d-2e62-4e90-a507-feba7847f0ad" CreationDate="2011-05-27T01:57:12.387" UserId="3794" Text="This is probably cleaner solution, which also doesn't require to ask texture unit two times. &#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;      gl_FragColor = texture2D(Sampler, TextureCoordOut);&#xD;&#xA;      gl_FragColor.a *= 0.5;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(maybe compiler does that for you, but what if not. Especially on the opengl-es device performance difference *may be observed*)" />
  <row Id="28150" PostHistoryTypeId="25" PostId="12753" RevisionGUID="cee80788-0fcb-4839-bcc1-d9c4b6c9ce9f" CreationDate="2011-05-27T03:13:03.093" Comment="http://twitter.com/#!/StackGameDev/status/73949807768645632" />
  <row Id="28151" PostHistoryTypeId="2" PostId="12763" RevisionGUID="3a6cacff-30c8-4c48-b23f-a08f89b6afec" CreationDate="2011-05-27T03:52:42.033" UserId="7613" Text="Been having a difficult time transforming 2D screen coordinates to 3D isometric space. This is the situation where I am working in 3D but I have an orthographic camera. Then my camera is positioned at (100, 200, 100), Where the xz plane is flat and y is up and down.&#xD;&#xA;&#xD;&#xA;I've been able to get a sort of working solution, but I feel like there must be a better way. &#xD;&#xA;&#xD;&#xA;Here's what I'm doing:&#xD;&#xA;&#xD;&#xA;With my camera at (0, 1, 0) I can translate my screen coordinates directly to 3D coordinates by doing:&#xD;&#xA;&#xD;&#xA;    mouse2D.z = (( event.clientX / window.innerWidth ) * 2 - 1) * -(window.innerWidth /2);&#xD;&#xA;    mouse2D.x = (( event.clientY / window.innerHeight) * 2 + 1) * -(window.innerHeight);&#xD;&#xA;    mouse2D.y = 0;&#xD;&#xA;&#xD;&#xA;Everything okay so far. Now when I change my camera back to (100, 200, 100) my 3D space has been rotated 45 degrees around the y axis and then rotated about 54 degrees around a vector Q that runs along the xz plane at a 45 degree angle between the positive z axis and the negative x axis.&#xD;&#xA;&#xD;&#xA;So what I do to find the point is first rotate my point by 45 degrees using a matrix around the y axis. Now I'm close.&#xD;&#xA;&#xD;&#xA;So then I rotate my point around the vector Q. But my point is closer to the origin than it should be, since the Y value is not 0 anymore. What I want is that after the rotation my Y value is 0. So now I exchange my X and Z coordinates of my rotated vector with the X and Z coordinates of my non-rotated vector. So basically I have my old vector but it's y value is at an appropriate rotated amount.&#xD;&#xA;&#xD;&#xA;Now I use another matrix to rotate my point around the vector Q in the opposite direction, and I end up with the point where I clicked.&#xD;&#xA;&#xD;&#xA;Is there a better way? &#xD;&#xA;&#xD;&#xA;I feel like I must be missing something. Also my method isn't completely accurate. I feel like it's within 5-10 coordinates of where I click, maybe because of rounding from many calculations. Sorry for such a long question.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28152" PostHistoryTypeId="1" PostId="12763" RevisionGUID="3a6cacff-30c8-4c48-b23f-a08f89b6afec" CreationDate="2011-05-27T03:52:42.033" UserId="7613" Text="Isometric screen to 3D world coordinates efficiently" />
  <row Id="28153" PostHistoryTypeId="3" PostId="12763" RevisionGUID="3a6cacff-30c8-4c48-b23f-a08f89b6afec" CreationDate="2011-05-27T03:52:42.033" UserId="7613" Text="&lt;3d&gt;&lt;coordinates&gt;&lt;isometric&gt;&lt;screen&gt;" />
  <row Id="28154" PostHistoryTypeId="2" PostId="12764" RevisionGUID="f39e5cd5-85b0-47a8-8e74-d17d073ddf5f" CreationDate="2011-05-27T04:42:43.090" UserId="6106" Text="What is the actual term for the 'top-down' style of the Super Nintendo games such as Final Fantasy 6, Chrono Trigger, etc. I'm looking for the equivalent term of:&#xD;&#xA;&#xD;&#xA; - 'isometric' - (Jaggered Alliance, Final Fantasy Tactics, Fallout), &#xD;&#xA; - 'first person' - (Half Life, Doom, Quake), &#xD;&#xA; - 'birds eye' - (Grand Theft Auto)&#xD;&#xA; - ? insert term here ? - (Final Fantasy 6, Chrono Trigger)&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="28155" PostHistoryTypeId="1" PostId="12764" RevisionGUID="f39e5cd5-85b0-47a8-8e74-d17d073ddf5f" CreationDate="2011-05-27T04:42:43.090" UserId="6106" Text="What graphic is Final Fantasy 6, Chrono Trigger, Alundra, etc" />
  <row Id="28156" PostHistoryTypeId="3" PostId="12764" RevisionGUID="f39e5cd5-85b0-47a8-8e74-d17d073ddf5f" CreationDate="2011-05-27T04:42:43.090" UserId="6106" Text="&lt;graphics&gt;&lt;graphics-design&gt;" />
  <row Id="28157" PostHistoryTypeId="2" PostId="12765" RevisionGUID="c558ac55-831f-42bd-ab24-d376834fce90" CreationDate="2011-05-27T05:09:29.960" UserId="2539" Text="I'd personally call that an overhead view." />
  <row Id="28158" PostHistoryTypeId="2" PostId="12766" RevisionGUID="e2f67e33-906f-4ddf-96ae-3454dae9563d" CreationDate="2011-05-27T05:28:43.727" UserId="2080" Text="I've stumbled into the very same problem lately. The game advanced only when touching the screen. From what I have found in various articles, it may have something to do with the CPU throttling that the Flash Player uses on mobile devices. Going into fullscreen removed the problem for me." />
  <row Id="28159" PostHistoryTypeId="16" PostId="12766" RevisionGUID="a3d873fc-91aa-4a38-96da-2af9a69357ea" CreationDate="2011-05-27T05:28:43.727" UserId="2080" />
  <row Id="28160" PostHistoryTypeId="2" PostId="12767" RevisionGUID="3ac903d4-06f0-4219-8ef9-38e1042b4525" CreationDate="2011-05-27T05:53:18.970" UserId="1694" Text="I am working on a terrain in XNA/C#. My intention is to be able to render multiple textures on the ground across the terrain. However, all tutorials like [this][1] are only capable of doing it with about 3-4 textures.&#xD;&#xA;&#xD;&#xA;My idea is currently that I create a texture map in TGA that has different colors (RGBA) where each color represent a particular texture. The amount of Alpha in the color describes how much alpha the vertex on the position should have. And there would be a base texture.&#xD;&#xA;&#xD;&#xA;However, I am a newbie in this area so I really need some getting started guides. So far I've managed to found none. All tutorials and resources are limited in terms of how many textures they support even though all modern games have many.&#xD;&#xA;&#xD;&#xA;My game is an RTS, and having played a lot RTS games, I've noticed they all support lots of textures across the terrain. For example, the world editor for Command &amp; Conquer 3 allows you to place any amount of any texture anywhere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Multitexturing.php" />
  <row Id="28161" PostHistoryTypeId="1" PostId="12767" RevisionGUID="3ac903d4-06f0-4219-8ef9-38e1042b4525" CreationDate="2011-05-27T05:53:18.970" UserId="1694" Text="Rendering multiple textures on a terrain in XNA / C#" />
  <row Id="28162" PostHistoryTypeId="3" PostId="12767" RevisionGUID="3ac903d4-06f0-4219-8ef9-38e1042b4525" CreationDate="2011-05-27T05:53:18.970" UserId="1694" Text="&lt;xna&gt;&lt;c#&gt;&lt;textures&gt;&lt;terrain&gt;" />
  <row Id="28165" PostHistoryTypeId="25" PostId="12764" RevisionGUID="8d9b75d8-6ec8-4204-80b6-8c62f6d98de9" CreationDate="2011-05-27T06:13:03.270" Comment="http://twitter.com/#!/StackGameDev/status/73995106482536448" />
  <row Id="28166" PostHistoryTypeId="5" PostId="12765" RevisionGUID="3ecaa2d4-88e7-4381-a201-591b78ad234a" CreationDate="2011-05-27T06:50:33.920" UserId="2539" Comment="added 116 characters in body" Text="I'd personally call that an overhead view.&#xD;&#xA;&#xD;&#xA;Relevent - [Wikipedia - Video game graphics][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Top-down_perspective#2D" />
  <row Id="28167" PostHistoryTypeId="2" PostId="12769" RevisionGUID="a104fc52-fc26-44f9-93ed-59a56e0af709" CreationDate="2011-05-27T07:21:58.783" UserId="7437" Text="i have a little problem in my solution, i'm trying to make a prety big map for the players to walk around in.&#xD;&#xA;so i decided to use a tile-engine, but when i move my character i move faster than my tile-engine draws the ground so i catch up to the edge.&#xD;&#xA;it's quite hard to explain so i've added the solution at the end just keep walking down or right and you'll see the problem while the world keeps generating slowly my character moves faster.&#xD;&#xA;sounds like it's just a matter of changing my characters movement speed, but that doesn't help at all.&#xD;&#xA;&#xD;&#xA;[The Solution](http://dl.dropbox.com/u/15532091/ZombieSurvival2.rar) &#xD;&#xA;I hope you guys can help me out.&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Bert" />
  <row Id="28168" PostHistoryTypeId="1" PostId="12769" RevisionGUID="a104fc52-fc26-44f9-93ed-59a56e0af709" CreationDate="2011-05-27T07:21:58.783" UserId="7437" Text="How do i get my tilemap to move at the same speed as my character." />
  <row Id="28169" PostHistoryTypeId="3" PostId="12769" RevisionGUID="a104fc52-fc26-44f9-93ed-59a56e0af709" CreationDate="2011-05-27T07:21:58.783" UserId="7437" Text="&lt;xna&gt;&lt;c#&gt;&lt;programming&gt;&lt;tiles&gt;" />
  <row Id="28170" PostHistoryTypeId="2" PostId="12770" RevisionGUID="3ed494b2-4263-4f0b-a364-3b389807550d" CreationDate="2011-05-27T07:24:26.970" UserId="7616" Text="I am building a gaming system where many players can play together some sort of table game. There could be hundreds of game tables at the same time. The system consists of several components where main components are gaming servers and DBworker and in between there is rabbitMQ. DBWorker is something that takes care about databases.&#xD;&#xA;&#xD;&#xA;So, I need to make sure that each game has unique ID to properly track results of the games. I would love to have some sort of auto-increment solution. Of course I can do some sort of sequence in PostgreSQL DB and pull new ID every time but for me it seems as an obvious bottleneck (I don't want to be linked to DB all the time. In case DB goes down show must go on while our engineers recover DB).&#xD;&#xA;&#xD;&#xA;So, any ideas or personal experience of implementing something similar?&#xD;&#xA;&#xD;&#xA;p.s. I am thinking about timestamp as ID but real ID would be better. Cannot figure out why - if I am wrong, please correct me.&#xD;&#xA;&#xD;&#xA;Thank in advance for everyone!" />
  <row Id="28171" PostHistoryTypeId="1" PostId="12770" RevisionGUID="3ed494b2-4263-4f0b-a364-3b389807550d" CreationDate="2011-05-27T07:24:26.970" UserId="7616" Text="Best way to create bullet-prof counter" />
  <row Id="28172" PostHistoryTypeId="3" PostId="12770" RevisionGUID="3ed494b2-4263-4f0b-a364-3b389807550d" CreationDate="2011-05-27T07:24:26.970" UserId="7616" Text="&lt;architecture&gt;" />
  <row Id="28173" PostHistoryTypeId="2" PostId="12771" RevisionGUID="f42ec9ff-2b63-4637-a1df-353311dfa633" CreationDate="2011-05-27T07:49:38.120" UserId="7437" Text="Hej,&#xD;&#xA;&#xD;&#xA;i don't know if you still need help, but maybe you should look at [this](http://rpg-exploiters.com/guides-strategies/starcraft-2-galaxyedit-complete-hero-tutorial/) for your skill problems.&#xD;&#xA;i don't know if it covers your problems but it could be of some use.&#xD;&#xA;&#xD;&#xA;I don't know a lot about map editing for starcraft, so i can't be of more use than this.&#xD;&#xA;&#xD;&#xA;Cheers, Bert" />
  <row Id="28174" PostHistoryTypeId="2" PostId="12772" RevisionGUID="9797f7a9-a757-49be-8fc7-dc1136aaaeb2" CreationDate="2011-05-27T07:51:21.320" UserId="288" Text="First of all, allow me to poke some holes in your suggested method for expanding on that method:&#xD;&#xA;&#xD;&#xA;First of all, you have a maximum of 16 texture samplers to use (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb172920(v=VS.85).aspx&quot;&gt;ps_3_0 registers&lt;/a&gt;). So that is the limit of the expandability of the method you linked.&#xD;&#xA;&#xD;&#xA;Second of all, each texture sampler in use will add to the texture bandwidth usage of your shader. (You may be able to mitigate this with conditionals in your shader - but I will leave you to do the experiment to see if it actually works.)&#xD;&#xA;&#xD;&#xA;Finally, if you embed your &quot;what texture to use&quot; data in a texture, rather than as vertex data (as the tutorial you linked does), then you introduce a dependent texture read, which can have performance implications. Also it uses up an available texture slot.&#xD;&#xA;&#xD;&#xA;So, what are these games doing? I am going to take an educated guess:&#xD;&#xA;&#xD;&#xA;First of all, they are probably using a multi-texturing technique similar to the one described in your link. They are possibly doing some tricks with this, for example: using different texture resolutions for detail and &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2011/03/25/technical-term-that-should-exist-quot-scrottox-quot.aspx&quot;&gt;scrottox&lt;/a&gt; layers.&#xD;&#xA;&#xD;&#xA;It also seems (I've been skimming &lt;a href=&quot;http://www.cncarchive.com/cnc3_tools/Worldbuilder%20Manual.pdf&quot;&gt;this PDF&lt;/a&gt;) that their map builder is automatically chopping up the terrain mesh to allow different sections to use different textures, providing they are in different parts of the map. Thus increasing the number of available textures by increasing the number of batches rather than the number of samplers used (which seems like it would be better for performance).&#xD;&#xA;&#xD;&#xA;I must admit - I am not sure how they're getting sharp edges in places - like the roads, while having blended edges elsewhere. But apparently roads are baked into the terrain texture.&#xD;&#xA;&#xD;&#xA;And finally, they are possibly also using *decals* to add fine detail to the map." />
  <row Id="28175" PostHistoryTypeId="2" PostId="12773" RevisionGUID="9bff70ab-9b2f-4109-b5c2-6ac0be948124" CreationDate="2011-05-27T07:57:30.117" UserId="7437" Text="This one is prety good too [drshnaps](http://sdb.drshnaps.com/)" />
  <row Id="28176" PostHistoryTypeId="16" PostId="12773" RevisionGUID="9bf9b0fc-136d-4eec-8213-0811fa22bd69" CreationDate="2011-05-27T07:57:30.117" UserId="7437" />
  <row Id="28177" PostHistoryTypeId="2" PostId="12774" RevisionGUID="a32e8528-e674-4527-b329-2aa695827976" CreationDate="2011-05-27T07:57:42.717" UserId="1694" Text="The problem was that the assembly name contained a space." />
  <row Id="28179" PostHistoryTypeId="2" PostId="12775" RevisionGUID="2a3ecf23-bf4a-4345-b486-1c5bfecba5fa" CreationDate="2011-05-27T08:04:40.140" UserId="1839" Text="That's the domain of GUID's which are not normal counters and supposed to be globally unique. Since you didn't mention the language and framework you use, I throw in this: [How to create a GUID/UUID in Javascript][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascrip&#xD;&#xA;&#xD;&#xA;For other frameworks just google your framework + GUID" />
  <row Id="28180" PostHistoryTypeId="5" PostId="12549" RevisionGUID="08f75d80-0750-4a7d-9d92-859e6db1a451" CreationDate="2011-05-27T08:22:38.747" UserId="1588" Comment="added 4 characters in body" Text="**Ask for payment but allow people to download it without paying**.&#xD;&#xA;&#xD;&#xA;That way people can try the full game easily, and they know you wish to be paid, and they know you respect them as you've allowed them to try and keep the entire game at no risk to themselves.  If they have a **happy experience** they may be come back to give you money. (This is the model I'll be using for my game.)&#xD;&#xA;&#xD;&#xA;Keep the purchase price above $5, there is a lot of fraud/hassle with credit card purchases $5 and under." />
  <row Id="28181" PostHistoryTypeId="25" PostId="12767" RevisionGUID="bcc424dd-076c-4049-92cd-ebbf5d8b7e4a" CreationDate="2011-05-27T09:13:03.190" Comment="http://twitter.com/#!/StackGameDev/status/74040404881833984" />
  <row Id="28182" PostHistoryTypeId="5" PostId="12769" RevisionGUID="8a1442ec-fda0-4d68-a10f-6047c9267b4c" CreationDate="2011-05-27T09:13:28.650" UserId="7437" Comment="added 4478 characters in body" Text="i have a little problem in my solution, i'm trying to make a prety big map for the players to walk around in.&#xD;&#xA;so i decided to use a tile-engine, but when i move my character i move faster than my tile-engine draws the ground so i catch up to the edge.&#xD;&#xA;it's quite hard to explain so i've added the solution at the end just keep walking down or right and you'll see the problem while the world keeps generating slowly my character moves faster.&#xD;&#xA;sounds like it's just a matter of changing my characters movement speed, but that doesn't help at all.&#xD;&#xA;&#xD;&#xA;This is for drawing the tiles&#xD;&#xA;&#xD;&#xA;` Vector2 firstSquare = new Vector2(cam.Pos.X / Tile.TileWidth, cam.Pos.Y / Tile.TileHeight);&#xD;&#xA;            //Vector2 worldFirstSquare = cam.GetWorldPosition(firstSquare);&#xD;&#xA;            int firstX = (int)firstSquare.X;&#xD;&#xA;            int firstY = (int)firstSquare.Y;&#xD;&#xA;&#xD;&#xA;            Vector2 squareOffset = new Vector2(cam.Pos.X % Tile.TileWidth, cam.Pos.Y % Tile.TileHeight);&#xD;&#xA;            //Vector2 worldSquareOffset = cam.GetWorldPosition(squareOffset);&#xD;&#xA;            int offsetX = (int)squareOffset.X;&#xD;&#xA;            int offsetY = (int)squareOffset.Y;&#xD;&#xA;&#xD;&#xA;            if (Mouse.GetState().LeftButton == ButtonState.Pressed)&#xD;&#xA;            {&#xD;&#xA;                Console.WriteLine(firstSquare + &quot; &quot; + squareOffset);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            for (int y = 0; y &lt; squaresDown; y++)&#xD;&#xA;            {&#xD;&#xA;                for (int x = 0; x &lt; squaresAcross; x++)&#xD;&#xA;                {&#xD;&#xA;                    if(firstY &gt;=0 &amp;&amp; firstX &gt;=0)&#xD;&#xA;                    foreach (int tileID in myMap.Rows[y + firstY].Columns[x + firstX].BaseTiles)&#xD;&#xA;                    {&#xD;&#xA;                        spriteBatch.Draw(&#xD;&#xA;                            Tile.TileSetTexture,&#xD;&#xA;                            new Rectangle(&#xD;&#xA;                                (x * Tile.TileWidth) - offsetX, (y * Tile.TileHeight) - offsetY,&#xD;&#xA;                                Tile.TileWidth, Tile.TileHeight),&#xD;&#xA;                            Tile.GetSourceRectangle(tileID),&#xD;&#xA;                            Color.White);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;This is for moving my character&#xD;&#xA;&#xD;&#xA;` &#xD;&#xA;if (keystate.IsKeyDown(Keys.W))&#xD;&#xA;            {&#xD;&#xA;                if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X -= _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else if (keystate.IsKeyDown(Keys.D))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X += _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.S))&#xD;&#xA;            {&#xD;&#xA;                if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X -= _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else if(keystate.IsKeyDown(Keys.D))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X += _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;            {&#xD;&#xA;                _PlayerRect.X -= _PlayerSpeed;&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.D))&#xD;&#xA;            {&#xD;&#xA;                _PlayerRect.X += _PlayerSpeed;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            playerPosition.X = _PlayerRect.X;&#xD;&#xA;            playerPosition.Y = _PlayerRect.Y;&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;And this is the update for my camera &#xD;&#xA;&#xD;&#xA;`&#xD;&#xA; Vector2 cameraDirection = Vector2.Zero;&#xD;&#xA;            const int TO_MOVE_SIDE_DISTANCE = 300; // the distance to the side required to move.&#xD;&#xA;&#xD;&#xA;            Vector2 playerScreenPosition = cam.GetScreenPosition(new Vector2(&#xD;&#xA;                        player.PlayerRect.X, player.PlayerRect.Y));&#xD;&#xA;            Rectangle playerScreenRect = new Rectangle((int)playerScreenPosition.X,&#xD;&#xA;                        (int)playerScreenPosition.Y, player.PlayerRect.Width, player.PlayerRect.Height);&#xD;&#xA;&#xD;&#xA;            //We make the camera follow the player if he goes too close to the sides.&#xD;&#xA;            &#xD;&#xA;            if (playerScreenRect.Left &lt; TO_MOVE_SIDE_DISTANCE) // move to the left&#xD;&#xA;            {&#xD;&#xA;                --cameraDirection.X;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Right &gt; GraphicsDevice.Viewport.Width - TO_MOVE_SIDE_DISTANCE) // move to the right&#xD;&#xA;            {&#xD;&#xA;                ++cameraDirection.X;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Top &lt; TO_MOVE_SIDE_DISTANCE) // move up&#xD;&#xA;            {&#xD;&#xA;                --cameraDirection.Y;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Bottom &gt; GraphicsDevice.Viewport.Height - TO_MOVE_SIDE_DISTANCE) // move down&#xD;&#xA;            {&#xD;&#xA;                ++cameraDirection.Y;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cam.Pos += cameraDirection * player._PlayerSpeed; // move with the player.&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;[The Solution](http://dl.dropbox.com/u/15532091/ZombieSurvival2.rar) &#xD;&#xA;I hope you guys can help me out.&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Bert" />
  <row Id="28183" PostHistoryTypeId="2" PostId="12776" RevisionGUID="4f8b21fa-9a17-4f06-8183-e0676621e0ad" CreationDate="2011-05-27T09:38:22.040" UserId="5660" Text="AFAIK, there is no way to be absolutely 100% safe from collision but you could make it very, very unlikely. Take for example the algorithm John Millikin posted in Maik Semder's  link above and attach a hashed timestamp at the end. &#xD;&#xA;&#xD;&#xA;That way, even if two user's manage to log in at precisely the same millisecond, the chances of them getting the same ID would be one in 22,300,745,198,530,623,141,535,718,272,648,361,505,980,416&#xD;&#xA;&#xD;&#xA;:-)" />
  <row Id="28184" PostHistoryTypeId="5" PostId="12769" RevisionGUID="6f2109a6-7127-4ae8-b3ac-fc3036df05df" CreationDate="2011-05-27T10:01:57.557" UserId="7618" Comment="Fixed code formatting" Text="i have a little problem in my solution, i'm trying to make a prety big map for the players to walk around in.&#xD;&#xA;so i decided to use a tile-engine, but when i move my character i move faster than my tile-engine draws the ground so i catch up to the edge.&#xD;&#xA;it's quite hard to explain so i've added the solution at the end just keep walking down or right and you'll see the problem while the world keeps generating slowly my character moves faster.&#xD;&#xA;sounds like it's just a matter of changing my characters movement speed, but that doesn't help at all.&#xD;&#xA;&#xD;&#xA;This is for drawing the tiles&#xD;&#xA;&#xD;&#xA;     Vector2 firstSquare = new Vector2(cam.Pos.X / Tile.TileWidth, cam.Pos.Y / Tile.TileHeight);&#xD;&#xA;&#xD;&#xA;            //Vector2 worldFirstSquare = cam.GetWorldPosition(firstSquare);&#xD;&#xA;            int firstX = (int)firstSquare.X;&#xD;&#xA;            int firstY = (int)firstSquare.Y;&#xD;&#xA;&#xD;&#xA;            Vector2 squareOffset = new Vector2(cam.Pos.X % Tile.TileWidth, cam.Pos.Y % Tile.TileHeight);&#xD;&#xA;            //Vector2 worldSquareOffset = cam.GetWorldPosition(squareOffset);&#xD;&#xA;            int offsetX = (int)squareOffset.X;&#xD;&#xA;            int offsetY = (int)squareOffset.Y;&#xD;&#xA;&#xD;&#xA;            if (Mouse.GetState().LeftButton == ButtonState.Pressed)&#xD;&#xA;            {&#xD;&#xA;                Console.WriteLine(firstSquare + &quot; &quot; + squareOffset);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            for (int y = 0; y &lt; squaresDown; y++)&#xD;&#xA;            {&#xD;&#xA;                for (int x = 0; x &lt; squaresAcross; x++)&#xD;&#xA;                {&#xD;&#xA;                    if(firstY &gt;=0 &amp;&amp; firstX &gt;=0)&#xD;&#xA;                    foreach (int tileID in myMap.Rows[y + firstY].Columns[x + firstX].BaseTiles)&#xD;&#xA;                    {&#xD;&#xA;                        spriteBatch.Draw(&#xD;&#xA;                            Tile.TileSetTexture,&#xD;&#xA;                            new Rectangle(&#xD;&#xA;                                (x * Tile.TileWidth) - offsetX, (y * Tile.TileHeight) - offsetY,&#xD;&#xA;                                Tile.TileWidth, Tile.TileHeight),&#xD;&#xA;                            Tile.GetSourceRectangle(tileID),&#xD;&#xA;                            Color.White);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is for moving my character&#xD;&#xA; &#xD;&#xA;    if (keystate.IsKeyDown(Keys.W))&#xD;&#xA;            {&#xD;&#xA;                if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X -= _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else if (keystate.IsKeyDown(Keys.D))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X += _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.S))&#xD;&#xA;            {&#xD;&#xA;                if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X -= _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else if(keystate.IsKeyDown(Keys.D))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X += _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;            {&#xD;&#xA;                _PlayerRect.X -= _PlayerSpeed;&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.D))&#xD;&#xA;            {&#xD;&#xA;                _PlayerRect.X += _PlayerSpeed;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            playerPosition.X = _PlayerRect.X;&#xD;&#xA;            playerPosition.Y = _PlayerRect.Y;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the update for my camera &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector2 cameraDirection = Vector2.Zero;&#xD;&#xA;            const int TO_MOVE_SIDE_DISTANCE = 300; // the distance to the side required to move.&#xD;&#xA;&#xD;&#xA;            Vector2 playerScreenPosition = cam.GetScreenPosition(new Vector2(&#xD;&#xA;                        player.PlayerRect.X, player.PlayerRect.Y));&#xD;&#xA;            Rectangle playerScreenRect = new Rectangle((int)playerScreenPosition.X,&#xD;&#xA;                        (int)playerScreenPosition.Y, player.PlayerRect.Width, player.PlayerRect.Height);&#xD;&#xA;&#xD;&#xA;            //We make the camera follow the player if he goes too close to the sides.&#xD;&#xA;            &#xD;&#xA;            if (playerScreenRect.Left &lt; TO_MOVE_SIDE_DISTANCE) // move to the left&#xD;&#xA;            {&#xD;&#xA;                --cameraDirection.X;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Right &gt; GraphicsDevice.Viewport.Width - TO_MOVE_SIDE_DISTANCE) // move to the right&#xD;&#xA;            {&#xD;&#xA;                ++cameraDirection.X;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Top &lt; TO_MOVE_SIDE_DISTANCE) // move up&#xD;&#xA;            {&#xD;&#xA;                --cameraDirection.Y;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Bottom &gt; GraphicsDevice.Viewport.Height - TO_MOVE_SIDE_DISTANCE) // move down&#xD;&#xA;            {&#xD;&#xA;                ++cameraDirection.Y;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cam.Pos += cameraDirection * player._PlayerSpeed; // move with the player.&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;[The Solution](http://dl.dropbox.com/u/15532091/ZombieSurvival2.rar) &#xD;&#xA;I hope you guys can help me out.&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Bert&#xD;&#xA;" />
  <row Id="28185" PostHistoryTypeId="24" PostId="12769" RevisionGUID="6f2109a6-7127-4ae8-b3ac-fc3036df05df" CreationDate="2011-05-27T10:01:57.557" Comment="Proposed by 7618 approved by 7437 edit id of 453" />
  <row Id="28186" PostHistoryTypeId="4" PostId="12770" RevisionGUID="df0b2105-ca6c-4dff-8467-6660552c8d21" CreationDate="2011-05-27T10:26:33.913" UserId="7618" Comment="Fixed title" Text="Best way to create bullet-proof counter" />
  <row Id="28187" PostHistoryTypeId="24" PostId="12770" RevisionGUID="df0b2105-ca6c-4dff-8467-6660552c8d21" CreationDate="2011-05-27T10:26:33.913" Comment="Proposed by 7618 approved by 1156 edit id of 452" />
  <row Id="28188" PostHistoryTypeId="2" PostId="12777" RevisionGUID="26e29af5-b6cc-473e-9cdb-e3cdc419d450" CreationDate="2011-05-27T10:44:34.373" UserId="7588" Text="Im currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate.&#xD;&#xA;&#xD;&#xA;I know a lot of people use a Singleton design but I believe that this is more of a &quot;counter-architecture&quot; way of doing things, as every class will have access to the Singleton.&#xD;&#xA;&#xD;&#xA;I was comtemplating using a Service-type architecture to allow for my Input, Sound, etc Manager classes to be available, but this is essentially the same problem as the Singleton as all the Classes are available to 'whoever' wants them.&#xD;&#xA;&#xD;&#xA;I could of course pass references to the objects when they are needed, but this is bloated.&#xD;&#xA;&#xD;&#xA;I wonder if making the 'Services' only allow certain objects to subscribe would be possible?&#xD;&#xA;&#xD;&#xA;So is there a better way to make your classes available?&#xD;&#xA;&#xD;&#xA;Or am I searching for an answer that doesn't have a question?" />
  <row Id="28189" PostHistoryTypeId="1" PostId="12777" RevisionGUID="26e29af5-b6cc-473e-9cdb-e3cdc419d450" CreationDate="2011-05-27T10:44:34.373" UserId="7588" Text="Making classes available to others" />
  <row Id="28190" PostHistoryTypeId="3" PostId="12777" RevisionGUID="26e29af5-b6cc-473e-9cdb-e3cdc419d450" CreationDate="2011-05-27T10:44:34.373" UserId="7588" Text="&lt;xna&gt;&lt;c#&gt;&lt;architecture&gt;" />
  <row Id="28191" PostHistoryTypeId="2" PostId="12778" RevisionGUID="340ab77f-2526-4d83-91b2-ed17b0339fed" CreationDate="2011-05-27T10:58:24.043" UserId="7588" Text="I would have posted a comment but I don't have enough Rep. to :(.&#xD;&#xA;Having working with Unity3D on PC we came into problems with the phsics engine when there were too many fixed joints; suprisingly there are very greedy, I'd guess even more-so on iOS as the Physics is CPU dependant.&#xD;&#xA;&#xD;&#xA;The guidelines for Unity are generally quite good, you could check out [this link](http://unity3d.com/support/documentation/Manual/iphone-performance.html) for optimizing performance in iOS.&#xD;&#xA;&#xD;&#xA;They obviously tell you to use the Profiler, which I also recommend, if you can't go Pro, you'll just have to keep on testing :/.&#xD;&#xA;&#xD;&#xA;Oh and as you are using fixed joints to attach the walls, you could maybe use capsule colliders with high friction to simulate the bricks and change this at real time with a box collider once the brick is not longer attatched to any others. (Any two bricks attached should still have a decent simulation even with capsule colliders.)" />
  <row Id="28192" PostHistoryTypeId="2" PostId="12779" RevisionGUID="e9d5d90f-e3fb-4f83-a5e9-51ed9e1df6be" CreationDate="2011-05-27T11:05:54.643" UserId="7328" Text="I think you can use mutiple inhertence for your need and have some game object like these :&#xD;&#xA;&#xD;&#xA;	class KeyboardReader&#xD;&#xA;	{&#xD;&#xA;		static KeyBoard* keyboard;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class MouseReader&#xD;&#xA;	{&#xD;&#xA;		static Mouse* mouse;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	class gamecontroller:public KeyboardReader, public MouseReader&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;	}" />
  <row Id="28193" PostHistoryTypeId="2" PostId="12780" RevisionGUID="d460882f-aa40-44ff-875a-d9c297ff41d5" CreationDate="2011-05-27T11:10:01.987" UserId="2766" Text="The major difference between the singleton approach and the service locator approach is that the components are more loosely coupled. If Foo accesses Bar as a singleton, any changes to Bar affect Foo indirectly.&#xD;&#xA;&#xD;&#xA;With a service locator you can communicate through an interface though, IBar say. You can change Bar all you want as long as it fulfills the IBar contract. If you decide that the class Baz should now fulfill the IBar contract, you can just swap it out. With the singleton, you can't do that so easily." />
  <row Id="28194" PostHistoryTypeId="2" PostId="12781" RevisionGUID="65914c9f-b67c-4b69-9334-9985a8c3ec88" CreationDate="2011-05-27T11:44:34.590" UserId="4662" Text="    I could of course pass references to the objects when they are needed, but this is bloated.&#xD;&#xA;&#xD;&#xA;No, that's completely how it should be done. If you find doing this untenable, then your design is broken." />
  <row Id="28195" PostHistoryTypeId="5" PostId="12781" RevisionGUID="adf707c6-fd1f-4689-bede-b1481886672b" CreationDate="2011-05-27T11:49:51.857" UserId="4662" Comment="added 85 characters in body; added 144 characters in body" Text="    I could of course pass references to the objects when they are needed, but this is bloated.&#xD;&#xA;&#xD;&#xA;No, that's completely how it should be done. If you find doing this untenable, then your design is broken.&#xD;&#xA;&#xD;&#xA;Passing references makes for the easiest, most obvious control and encapsulation. Global data is bad, whether you want to call it a &quot;Singleton&quot; or a static Manager. You shouldn't even *need* an InputManager or a SoundManager." />
  <row Id="28196" PostHistoryTypeId="5" PostId="12760" RevisionGUID="aa1e75f4-9c21-4975-a452-5185a039eedb" CreationDate="2011-05-27T12:08:24.830" UserId="5021" Comment="added 232 characters in body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the (predicted) position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor. This will still result in poor behavior when fast moving objects suddenly change location, and you might want to handle that special case. Everything said in this paragraph are the reasons why you *don't* want to use extrapolation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28197" PostHistoryTypeId="5" PostId="12772" RevisionGUID="087e57de-8215-4e24-ae6c-237e36591a68" CreationDate="2011-05-27T12:10:32.150" UserId="288" Comment="Whoops... that was totally incorrect." Text="First of all, allow me to poke some holes in your suggested method for expanding on that method:&#xD;&#xA;&#xD;&#xA;First of all, you have a maximum of 16 texture samplers to use (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb172920(v=VS.85).aspx&quot;&gt;ps_3_0 registers&lt;/a&gt;). So that is the limit of the expandability of the method you linked.&#xD;&#xA;&#xD;&#xA;Second of all, each texture sampler in use will add to the texture bandwidth usage of your shader. (You may be able to mitigate this with conditionals in your shader - but I will leave you to do the experiment to see if it actually works.)&#xD;&#xA;&#xD;&#xA;Finally, if you embed your &quot;what texture to use&quot; data in a texture, rather than as vertex data (as the tutorial you linked does), then you use up an available texture slot.&#xD;&#xA;&#xD;&#xA;So, what are these games doing? I am going to take an educated guess:&#xD;&#xA;&#xD;&#xA;First of all, they are probably using a multi-texturing technique similar to the one described in your link. They are possibly doing some tricks with this, for example: using different texture resolutions for detail and &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2011/03/25/technical-term-that-should-exist-quot-scrottox-quot.aspx&quot;&gt;scrottox&lt;/a&gt; layers.&#xD;&#xA;&#xD;&#xA;It also seems (I've been skimming &lt;a href=&quot;http://www.cncarchive.com/cnc3_tools/Worldbuilder%20Manual.pdf&quot;&gt;this PDF&lt;/a&gt;) that their map builder is automatically chopping up the terrain mesh to allow different sections to use different textures, providing they are in different parts of the map. Thus increasing the number of available textures by increasing the number of batches rather than the number of samplers used (which seems like it would be better for performance).&#xD;&#xA;&#xD;&#xA;I must admit - I am not sure how they're getting sharp edges in places - like the roads, while having blended edges elsewhere. But apparently roads are baked into the terrain texture somehow.&#xD;&#xA;&#xD;&#xA;And finally, they are possibly also using *decals* to add fine detail to the map." />
  <row Id="28198" PostHistoryTypeId="25" PostId="12777" RevisionGUID="26062669-67d4-4616-a4d1-23180e3572eb" CreationDate="2011-05-27T12:13:03.697" Comment="http://twitter.com/#!/StackGameDev/status/74085705936150528" />
  <row Id="28200" PostHistoryTypeId="2" PostId="12783" RevisionGUID="8a104bc5-8d0b-476f-8d63-57c01fc7edcc" CreationDate="2011-05-27T12:36:25.310" UserId="1101" Text="The terms you have used in your question are more colloquial than precise or definitive, so comparing against them is not necessarily useful. Technically you're comparing different types of 'projection', plus the viewpoint that the projection is done onto.&#xD;&#xA;&#xD;&#xA;Final Fantasy 6 uses an [oblique projection][1] (albeit a degenerate one where the receding surfaces are drawn at a 0&amp;deg; angle rather than a more illustrative 30&amp;deg; or 45&amp;deg; (as in [Ultima VII][2])). The viewpoint is typically from above and offset somewhat from the area being viewed.&#xD;&#xA;&#xD;&#xA;GTA1 uses an [orthographic projection][3]. The viewpoint is directly above the subject.&#xD;&#xA;&#xD;&#xA;First person games use [perspective projection][4]. This projection is also used for most third person games rendered in 3D. In 1st person games the viewpoint is placed at roughly head height on a notional person, but in 3rd person games the viewpoint might be placed behind a person's shoulder, or high above the world, or in any arbitrary position.&#xD;&#xA;&#xD;&#xA;Isometric games are, of course, in an [isometric projection][6]. However, Fallout 1 and 2 are not technically isometric - they are [trimetric projections][5]. You can see the difference in how Fallout is slightly rotated compared to a typical isometric game. For a game to be isometric, the angles between the 3 axes need to be equal, ie. 120&amp;deg; Examples are Final Fantasy Tactics and Sim City 2000. The viewpoint is pretty much the same as for the oblique projections.&#xD;&#xA;&#xD;&#xA;Oblique, orthographic, and isometric are all types of [parallel projection][7] where lines that would appear to converge in real life when viewed in perspective, are rendered as parallel lines instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Oblique_projection&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Ultima_VII&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Orthographic_projection&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/3D_projection#Perspective_projection&#xD;&#xA;  [5]: http://www.significant-bits.com/a-laymans-guide-to-projection-in-videogames&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Isometric_projection&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Parallel_projection" />
  <row Id="28201" PostHistoryTypeId="2" PostId="12784" RevisionGUID="a22993c9-52a1-4857-ae69-ad1ff340971b" CreationDate="2011-05-27T12:37:54.700" UserId="288" Text="When you're writing a game, you're better of *writing a game* than worrying too much about having the perfect architecture. There's nothing really wrong with having singletons and global variables in a game. Far better to have *less* and *more flexible* code than for it to be perfect.&#xD;&#xA;&#xD;&#xA;I personally find that Singleton is a pattern to be avoided simply because most of the time you should be using a static class or member (or not be using a singleton anyway). See, for example, the `Mouse` and `Keyboard` and `MediaPlayer` classes in XNA. These are all simply static classes which are globally accessible.&#xD;&#xA;&#xD;&#xA;I would query your need for a &quot;sound manager&quot;, seeing as `SoundEffect`s are stand-alone. And `ContentManager` is already the only thing you need to &quot;manage&quot; them.&#xD;&#xA;&#xD;&#xA;You don't really need to write a services architecture, because XNA already provides one (see `Game.Services`).&#xD;&#xA;&#xD;&#xA;If it seems like it would help, there's no reason why you can't just add a `public static MyGame theGame` member to your `Game` class and access that globally. For the simple reason that there will never *reasonably* going to be more than one instance of your game class. Then you can make its members public and access them globally, if it makes sense. This is simple. You can always change it to something more complicated later!&#xD;&#xA;&#xD;&#xA;Making your `Game` class a globally accessible singleton also keeps the &quot;singleton-ness&quot; (which isn't ideal from a SE perspective) localised to one place in your code.&#xD;&#xA;&#xD;&#xA;What I would **very much avoid** is making the *Singleton-ness* built into a class. For example: don't make a map class that you can only create one instance of: what if you want to add background loading of the next map later? (Or the player class - for multiplayer, and so on).&#xD;&#xA;&#xD;&#xA;To give you another example from XNA itself: the `Game.Content` member is effectively global. But you can also create more instances of `ContentManager`, which can be owned by whatever you like (levels, screens, whatever) and will operate independently." />
  <row Id="28202" PostHistoryTypeId="5" PostId="12783" RevisionGUID="0036a011-c8db-48cd-9b5d-761f37b140af" CreationDate="2011-05-27T12:41:32.777" UserId="1101" Comment="I'd pasted the wrong link..." Text="The terms you have used in your question are more colloquial than precise or definitive, so comparing against them is not necessarily useful. Technically you're comparing different types of 'projection', plus the viewpoint that the projection is done onto.&#xD;&#xA;&#xD;&#xA;Final Fantasy 6 uses an [oblique projection][1] (albeit a degenerate one where the receding surfaces are drawn at a 0&amp;deg; angle rather than a more illustrative 30&amp;deg; or 45&amp;deg; (as in [Ultima VII][2])). The viewpoint is typically from above and offset somewhat from the area being viewed.&#xD;&#xA;&#xD;&#xA;GTA1 uses an [orthographic projection][3]. The viewpoint is directly above the subject.&#xD;&#xA;&#xD;&#xA;First person games use [perspective projection][4]. This projection is also used for most third person games rendered in 3D. In 1st person games the viewpoint is placed at roughly head height on a notional person, but in 3rd person games the viewpoint might be placed behind a person's shoulder, or high above the world, or in any arbitrary position.&#xD;&#xA;&#xD;&#xA;Isometric games are, of course, in an [isometric projection][6]. However, Fallout 1 and 2 are not technically isometric - they are [trimetric projections][5]. You can see the difference in how Fallout is slightly rotated compared to a typical isometric game. For a game to be isometric, the angles between the 3 axes need to be equal, ie. 120&amp;deg; Examples are Final Fantasy Tactics and Sim City 2000. The viewpoint is pretty much the same as for the oblique projections.&#xD;&#xA;&#xD;&#xA;Oblique, orthographic, and isometric are all types of [parallel projection][7] where lines that would appear to converge in real life when viewed in perspective, are rendered as parallel lines instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Oblique_projection&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Ultima_VII&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Orthographic_projection&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/3D_projection#Perspective_projection&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Trimetric_projection#Three_types_of_axonometric_projections&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Isometric_projection&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Parallel_projection" />
  <row Id="28203" PostHistoryTypeId="5" PostId="12784" RevisionGUID="b18c7bb1-26a8-48a8-8ecb-bceec0e33432" CreationDate="2011-05-27T12:43:05.123" UserId="288" Comment="added 37 characters in body; added 1 characters in body" Text="When you're writing a game, you're better off *writing a game* than worrying too much about having the perfect architecture. There's nothing really wrong with having singletons and global variables in a game. Far better to have *less* and *more flexible* code than for it to be perfect.&#xD;&#xA;&#xD;&#xA;I personally find that Singleton is a pattern to be avoided simply because most of the time you should be using a static class or member (or not be using a singleton anyway). See, for example, the `Mouse` and `Keyboard` and `MediaPlayer` classes in XNA. These are all simply static classes which are globally accessible.&#xD;&#xA;&#xD;&#xA;I would query your need for a &quot;sound manager&quot;, seeing as `SoundEffect`s are stand-alone. And `ContentManager` is already the only thing you need to &quot;manage&quot; them.&#xD;&#xA;&#xD;&#xA;You don't really need to write a services architecture, because XNA already provides one (see `Game.Services`).&#xD;&#xA;&#xD;&#xA;If it seems like it would help, there's no reason why you can't just add a `public static MyGame theGame` member to your `Game` class and access that globally. For the simple reason that there is never *reasonably* going to be more than one instance of your game class. Then you can make its members public (`Content` and `Services` already are) and access them globally, if it makes sense. This is simple. You can always change it to something more complicated later!&#xD;&#xA;&#xD;&#xA;Making your `Game` class a globally accessible singleton also keeps the &quot;singleton-ness&quot; (which isn't ideal from a SE perspective) localised to one place in your code.&#xD;&#xA;&#xD;&#xA;What I would **very much avoid** is making the *Singleton-ness* built into a class. For example: don't make a map class that you can only create one instance of: what if you want to add background loading of the next map later? (Or the player class - for multiplayer, and so on).&#xD;&#xA;&#xD;&#xA;To give you another example from XNA itself: the `Game.Content` member is effectively global. But you can also create more instances of `ContentManager`, which can be owned by whatever you like (levels, screens, whatever) and will operate independently." />
  <row Id="28204" PostHistoryTypeId="5" PostId="12760" RevisionGUID="1db6a6fb-f831-4ccd-af05-4c0ad1031c8f" CreationDate="2011-05-27T12:47:19.150" UserId="5021" Comment="added 1350 characters in body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the (predicted) position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor. This will still result in poor behavior when fast moving objects suddenly change location, and you might want to handle that special case. Everything said in this paragraph are the reasons why you *don't* want to use extrapolation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;In case the above isn't enough to allow you to perform an implementation, here is an example of how to do the interpolation method I've described. I won't cover extrapolation, because I can't think of any real-world scenario in which you should prefer it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you create a drawable object, it will store the properties needed to be drawn (i.e., the *state* information needed to draw it).&#xD;&#xA;&#xD;&#xA;For this example, we will store position and rotation. You may also want to store other properties like color or texture coordinate position (i.e. if a texture scrolls).&#xD;&#xA;&#xD;&#xA;To prevent data from being modified while the render thread is drawing it, (i.e. one object's location is changed while the render thread draws, but all others have not been updated yet), we need to implement some type of double buffering.&#xD;&#xA;&#xD;&#xA;An object stores two copies of it's `previous_state`. I will put them in an array and refer to them as `previous_state[0]` and `previous_state[1]`. It similarly needs two copies of it's `current_state`.&#xD;&#xA;&#xD;&#xA;An object then stores which `previous_state` is the one that is not currently being updated, in a variable called `state_index`. When the update thread is done updating an objects state, it sets `state_index` to `1 - state_index`, flipping the state index to the other copy of the `state_index`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28205" PostHistoryTypeId="5" PostId="12784" RevisionGUID="5ec146f1-692b-4c46-8d72-da47e11a7d0e" CreationDate="2011-05-27T12:51:54.190" UserId="288" Comment="added 60 characters in body" Text="When you're writing a game, you're better off *writing a game* than worrying too much about having the perfect architecture. There's nothing really wrong with having singletons and global variables in a game. Far better to have *less* and *more flexible* code than for it to be perfect.&#xD;&#xA;&#xD;&#xA;I personally find that Singleton is a pattern to be avoided. Most of the time you should be using a static class or member instead of a singleton. See, for example, the `Mouse` and `Keyboard` and `MediaPlayer` classes in XNA. These are all simply static classes which are globally accessible.&#xD;&#xA;&#xD;&#xA;I would query your need for a &quot;sound manager&quot;, seeing as `SoundEffect`s are stand-alone. And `ContentManager` is already the only thing you need to &quot;manage&quot; them.&#xD;&#xA;&#xD;&#xA;You don't really need to write a services architecture, because XNA already provides one (see `Game.Services`).&#xD;&#xA;&#xD;&#xA;If it seems like it would help, there's no reason why you can't just add a `public static MyGame theGame` member to your `Game` class and access that globally. For the simple reason that there is never *reasonably* going to be more than one instance of your game class. Then you can make its members public (`Content` and `Services` already are) and access them globally, if it makes sense. This is simple. You can always change it to something more complicated later!&#xD;&#xA;&#xD;&#xA;Making your `Game` class a globally accessible also keeps the global access point localised to one place in the code, making it easier to locate when you want to &quot;un-globalify&quot; something later.&#xD;&#xA;&#xD;&#xA;What I would **very much avoid** is making the true *Singleton* classes that can only be instanced once. For example: don't make a map class that you can only create one instance of: what if you want to add background loading of the next map later? (Or the player class - for multiplayer, and so on).&#xD;&#xA;&#xD;&#xA;The best example of this &quot;global but not singleton&quot; in XNA is `ContentManager`. You've got `Game.Content` which is effectively global. But you can also create more instances of `ContentManager`, which can be owned by whatever you like (levels, screens, whatever) and will operate independently." />
  <row Id="28206" PostHistoryTypeId="5" PostId="12760" RevisionGUID="ac9b30aa-24c0-483d-a9ca-944ea81c54fc" CreationDate="2011-05-27T12:58:43.787" UserId="5021" Comment="added 71 characters in body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the (predicted) position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor. This will still result in poor behavior when fast moving objects suddenly change location, and you might want to handle that special case. Everything said in this paragraph are the reasons why you *don't* want to use extrapolation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;In case the above isn't enough to allow you to perform an implementation, here is an example of how to do the interpolation method I've described. I won't cover extrapolation, because I can't think of any real-world scenario in which you should prefer it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you create a drawable object, it will store the properties needed to be drawn (i.e., the *state* information needed to draw it).&#xD;&#xA;&#xD;&#xA;For this example, we will store position and rotation. You may also want to store other properties like color or texture coordinate position (i.e. if a texture scrolls).&#xD;&#xA;&#xD;&#xA;To prevent data from being modified while the render thread is drawing it, (i.e. one object's location is changed while the render thread draws, but all others have not been updated yet), we need to implement some type of double buffering.&#xD;&#xA;&#xD;&#xA;An object stores two copies of it's `previous_state`. I will put them in an array and refer to them as `previous_state[0]` and `previous_state[1]`. It similarly needs two copies of it's `current_state`.&#xD;&#xA;&#xD;&#xA;The update thread first computes all properties of an object using it's own data. Then, it  copies `current_state[state_index]` to `previous_state[state_index]`, and copies the new data relevant for drawing, `position` and `rotation` into `current_state[state_index]`. Then it does `state_index = 1 - state_index`, to flip the currently used copy of the double buffer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28207" PostHistoryTypeId="5" PostId="12760" RevisionGUID="6f595834-eaa9-436f-94c1-e0e1b253916d" CreationDate="2011-05-27T13:04:03.060" UserId="5021" Comment="added 897 characters in body; added 246 characters in body; added 26 characters in body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the (predicted) position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor. This will still result in poor behavior when fast moving objects suddenly change location, and you might want to handle that special case. Everything said in this paragraph are the reasons why you *don't* want to use extrapolation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;In case the above isn't enough to allow you to perform an implementation, here is an example of how to do the interpolation method I've described. I won't cover extrapolation, because I can't think of any real-world scenario in which you should prefer it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you create a drawable object, it will store the properties needed to be drawn (i.e., the *state* information needed to draw it).&#xD;&#xA;&#xD;&#xA;For this example, we will store position and rotation. You may also want to store other properties like color or texture coordinate position (i.e. if a texture scrolls).&#xD;&#xA;&#xD;&#xA;To prevent data from being modified while the render thread is drawing it, (i.e. one object's location is changed while the render thread draws, but all others have not been updated yet), we need to implement some type of double buffering.&#xD;&#xA;&#xD;&#xA;An object stores two copies of it's `previous_state`. I will put them in an array and refer to them as `previous_state[0]` and `previous_state[1]`. It similarly needs two copies of it's `current_state`.&#xD;&#xA;&#xD;&#xA;To keep track of which copy of the double buffer is used we store a variable `state_index`, which is available to both the update and draw thread.&#xD;&#xA;&#xD;&#xA;The update thread first computes all properties of an object using it's own data (any data structures you want). Then, it  copies `current_state[state_index]` to `previous_state[state_index]`, and copies the new data relevant for drawing, `position` and `rotation` into `current_state[state_index]`. Then it does `state_index = 1 - state_index`, to flip the currently used copy of the double buffer.&#xD;&#xA;&#xD;&#xA;Everything in the above paragraph has to be done with a lock taken out on `current_state`. The draw and render threads both take out this lock. The lock is only taken out for the duration of the copying of state information, which is fast.&#xD;&#xA;&#xD;&#xA;In the render thread, you then do a linear interpolation on position and rotation like so:&#xD;&#xA;&#xD;&#xA;`current_position = Lerp(previous_state[state_index].position, current_state[state_index].position, elapsed/update_tick_length)`&#xD;&#xA;&#xD;&#xA;Where `elapsed` is the amount of time that has passed in the render thread, since the last update tick, and `update_tick_length` is the amount of time that your fixed update rate takes per tick (e.g. at 20FPS updates, `update_tick_length = 0.05`).&#xD;&#xA;&#xD;&#xA;If you don't know what the `Lerp` function above is, then checkout wikipedia's article on the subject: [Linear Interpolation][1]. However, if you dont know what lerping is, then you probably aren't ready to implement decoupled update/drawing with interpolated drawing.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28209" PostHistoryTypeId="5" PostId="12784" RevisionGUID="9a9ee2d7-72d8-4592-a9bc-883b267203fd" CreationDate="2011-05-27T13:08:35.723" UserId="288" Comment="added 21 characters in body; deleted 4 characters in body" Text="When you're writing a game, you're better off *writing a game* than worrying too much about having the perfect architecture. There's nothing really wrong with having singletons and global variables in a game. Far better to have *less* and *more flexible* code than for it to be perfect.&#xD;&#xA;&#xD;&#xA;I personally find that Singleton is a pattern to be avoided. Most of the time you should be using a static class or member instead of a singleton. See, for example, the `Mouse` and `Keyboard` and `MediaPlayer` classes in XNA. These are all simply static classes which are globally accessible.&#xD;&#xA;&#xD;&#xA;I would query your need for a &quot;sound manager&quot;, seeing as `SoundEffect`s are stand-alone. And `ContentManager` is already the only thing you need to &quot;manage&quot; them.&#xD;&#xA;&#xD;&#xA;You don't really need to write a services architecture, because XNA already provides one (see `Game.Services`).&#xD;&#xA;&#xD;&#xA;If it seems like it would help, there's no reason why you can't just add a `public static MyGame theGame` member to your `Game` class and effectively turn it into a singleton. For the simple reason that there is never *reasonably* going to be more than one instance of your game class. Then you can make its members public (`Content` and `Services` already are) and access them globally, if it makes sense. This is simple. You can always change it to something more complicated later!&#xD;&#xA;&#xD;&#xA;Making only your `Game` class a globally accessible also keeps the global access point localised to one place in the code, making it easier to locate when you want to &quot;un-globalify&quot; something later.&#xD;&#xA;&#xD;&#xA;What I would **very much avoid** is making true *Singleton* classes that can only be instanced once. For example: don't make a map class that you can only create one instance of: what if you want to add background loading of the next map later? (Or the player class - for multiplayer, and so on).&#xD;&#xA;&#xD;&#xA;The best example of this &quot;global but not singleton&quot; in XNA is `ContentManager`. You've got `Game.Content` which is effectively global. But you can also create more instances of `ContentManager`, which can be owned by whatever you like (levels, screens, whatever) and will operate independently." />
  <row Id="28210" PostHistoryTypeId="5" PostId="12779" RevisionGUID="f4fcf178-cc46-45b6-b26e-40d3e9e3b5dd" CreationDate="2011-05-27T13:11:11.337" UserId="7328" Comment="added 41 characters in body" Text="I think you can use mutiple inhertence for your need and have some game object like these :&#xD;&#xA;&#xD;&#xA;	class KeyboardReader&#xD;&#xA;	{&#xD;&#xA;		protected :&#xD;&#xA;        static KeyBoard* keyboard;&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	class MouseReader&#xD;&#xA;	{&#xD;&#xA;        protected:&#xD;&#xA;		static Mouse* mouse;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	class gamecontroller:public KeyboardReader, public MouseReader&#xD;&#xA;	{&#xD;&#xA;		&#xD;&#xA;	}" />
  <row Id="28211" PostHistoryTypeId="2" PostId="12785" RevisionGUID="34b0aa0d-fb92-471b-ac4e-7b47afef8491" CreationDate="2011-05-27T13:15:36.373" UserId="7375" Text="I hear it called 3/4 perspective." />
  <row Id="28212" PostHistoryTypeId="5" PostId="12760" RevisionGUID="b4e685b5-f566-4281-9db6-5d44c2ebae94" CreationDate="2011-05-27T13:19:58.720" UserId="5021" Comment="edited body" Text="You want to separate update (logic tick) and draw (render tick) rates.&#xD;&#xA;&#xD;&#xA;Your updates will produce the position of all objects in the world to be drawn.&#xD;&#xA;&#xD;&#xA;I will cover two different possibilities here, the one you requested, extrapolation, and also another method, interpolation.&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;&#xD;&#xA;**Extrapolation** is where we will compute the (predicted) position of the object at the next frame, and then interpolate between the current objects position, and the position that the object will be at next frame.&#xD;&#xA;&#xD;&#xA;To do this, each object to be drawn must have an associated `velocity` and `position`. To find the position that the object will be at next frame, we simply add `velocity * draw_timestep` to the object's current position, to find the next frame's predicted position. `draw_timestep` is the amount of time that has passed since the previous render tick (aka the previous draw call).&#xD;&#xA;&#xD;&#xA;If you leave it at this, you'll find that objects &quot;flicker&quot; when their predicted position didn't match the actual position at the next frame. To remove flickering, you can store the predicted position, and [lerp][1] between the previously predicted position and the new predicted position at each draw step, using the elapsed time since the previous update tick as the lerp factor. This will still result in poor behavior when fast moving objects suddenly change location, and you might want to handle that special case. Everything said in this paragraph are the reasons why you *don't* want to use extrapolation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;&#xD;&#xA;**Interpolation** is where we store the state of the last two updates, and interpolate between them based on the current amount of time that has passed since the update before last. In this setup, each object must have an associated `position` and `previous_position`. In this case, our drawing will represent at worst one update tick behind the current gamestate, and at best, at the exact same state as the the current update tick.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my opinion, you probably want interpolation as I've described it, as it's the easier of the two to implement, and drawing a tiny fraction of a second (e.g. 1/60 second) behind your current updated state is fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;In case the above isn't enough to allow you to perform an implementation, here is an example of how to do the interpolation method I've described. I won't cover extrapolation, because I can't think of any real-world scenario in which you should prefer it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you create a drawable object, it will store the properties needed to be drawn (i.e., the *state* information needed to draw it).&#xD;&#xA;&#xD;&#xA;For this example, we will store position and rotation. You may also want to store other properties like color or texture coordinate position (i.e. if a texture scrolls).&#xD;&#xA;&#xD;&#xA;To prevent data from being modified while the render thread is drawing it, (i.e. one object's location is changed while the render thread draws, but all others have not been updated yet), we need to implement some type of double buffering.&#xD;&#xA;&#xD;&#xA;An object stores two copies of it's `previous_state`. I will put them in an array and refer to them as `previous_state[0]` and `previous_state[1]`. It similarly needs two copies of it's `current_state`.&#xD;&#xA;&#xD;&#xA;To keep track of which copy of the double buffer is used we store a variable `state_index`, which is available to both the update and draw thread.&#xD;&#xA;&#xD;&#xA;The update thread first computes all properties of an object using it's own data (any data structures you want). Then, it  copies `current_state[state_index]` to `previous_state[state_index]`, and copies the new data relevant for drawing, `position` and `rotation` into `current_state[state_index]`. Then it does `state_index = 1 - state_index`, to flip the currently used copy of the double buffer.&#xD;&#xA;&#xD;&#xA;Everything in the above paragraph has to be done with a lock taken out on `current_state`. The update and draw threads both take out this lock. The lock is only taken out for the duration of the copying of state information, which is fast.&#xD;&#xA;&#xD;&#xA;In the render thread, you then do a linear interpolation on position and rotation like so:&#xD;&#xA;&#xD;&#xA;`current_position = Lerp(previous_state[state_index].position, current_state[state_index].position, elapsed/update_tick_length)`&#xD;&#xA;&#xD;&#xA;Where `elapsed` is the amount of time that has passed in the render thread, since the last update tick, and `update_tick_length` is the amount of time that your fixed update rate takes per tick (e.g. at 20FPS updates, `update_tick_length = 0.05`).&#xD;&#xA;&#xD;&#xA;If you don't know what the `Lerp` function above is, then checkout wikipedia's article on the subject: [Linear Interpolation][1]. However, if you dont know what lerping is, then you probably aren't ready to implement decoupled update/drawing with interpolated drawing.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_interpolation" />
  <row Id="28213" PostHistoryTypeId="5" PostId="12783" RevisionGUID="7345a052-356b-4b45-9786-e37f3e763ff5" CreationDate="2011-05-27T13:37:18.853" UserId="1101" Comment="added 1 characters in body" Text="The terms you have used in your question are more colloquial than precise or definitive, so comparing against them is not necessarily useful. Technically you're comparing different types of 'projection', plus the viewpoint that the projection is done onto.&#xD;&#xA;&#xD;&#xA;Final Fantasy 6 uses an [oblique projection][1] (albeit a degenerate one where the receding surfaces are drawn at a 0&amp;deg; angle rather than a more illustrative 30&amp;deg; or 45&amp;deg; (as in [Ultima VII][2])). The viewpoint is typically from above and offset somewhat from the area being viewed.&#xD;&#xA;&#xD;&#xA;GTA1 uses an [orthographic projection][3]. The viewpoint is directly above the subject.&#xD;&#xA;&#xD;&#xA;First person games use [perspective projection][4]. This projection is also used for most third person games rendered in 3D. In 1st person games the viewpoint is placed at roughly head height on a notional person, but in 3rd person games the viewpoint might be placed behind a person's shoulder, or high above the world, or in any arbitrary position.&#xD;&#xA;&#xD;&#xA;Isometric games are, of course, in an [isometric projection][6]. However, Fallout 1 and 2 are not technically isometric - they are [trimetric projections][5]. You can see the difference in how Fallout is slightly rotated compared to a typical isometric game. For a game to be isometric, the angles between the 3 axes need to be equal, ie. 120&amp;deg;. Examples are Final Fantasy Tactics and Sim City 2000. The viewpoint is pretty much the same as for the oblique projections.&#xD;&#xA;&#xD;&#xA;Oblique, orthographic, and isometric are all types of [parallel projection][7] where lines that would appear to converge in real life when viewed in perspective, are rendered as parallel lines instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Oblique_projection&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Ultima_VII&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Orthographic_projection&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/3D_projection#Perspective_projection&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Trimetric_projection#Three_types_of_axonometric_projections&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Isometric_projection&#xD;&#xA;  [7]: http://en.wikipedia.org/wiki/Parallel_projection" />
  <row Id="28214" PostHistoryTypeId="2" PostId="12786" RevisionGUID="35da7b87-24ff-4f77-ad17-ab3ad045432c" CreationDate="2011-05-27T14:21:47.490" UserId="7616" Text="So far I've decided to use lovely rabbitMQ in the following way:&#xD;&#xA;&#xD;&#xA; 1. I will create a service that will put 1, 2, 3 etc. messages into the rabbitMQ. It will also sometimes check if there are enough numbers or not (let's say in one hour 1000 games in average, so for one day I won't need more that 24000 numbers).&#xD;&#xA; 2. When a new game starts gameKeeper will pull new number from the rabbitMQ and use it.&#xD;&#xA;&#xD;&#xA;Since rabbitMQ is extremely stable and many other very important things are linked on it - it is ok. If rabbit dies - no problem with number, because whole system will die. So, for me it seems ok.&#xD;&#xA;&#xD;&#xA;Why I don't use UUID? UUID is not really good for me for few reasons:&#xD;&#xA;&#xD;&#xA; 1. I cannot know order of the games (of course I can add extra fields in DB like timestamp or something like this)&#xD;&#xA; 2. It is not nice to tell to players something like this: &quot;Yo bro, you are laying game:XXXXX-XXXXXXXXXXXXXX-XXXXXXXXXXXXX-XXXXXXXXX-XXXX&quot; :-)&#xD;&#xA;&#xD;&#xA;So, I think my dummy approach will work for me for some while. Thank you for your advices! Ups in you reputations." />
  <row Id="28215" PostHistoryTypeId="2" PostId="12787" RevisionGUID="23c2543a-3eb0-4e17-85c6-1a0868a73193" CreationDate="2011-05-27T14:25:36.933" UserId="7624" Text="I am now studying C#, and also know a bit of C++ and some A.S. 3.0 (adobe flash), so I was wondering which language should I choose to start making games with?&#xD;&#xA;&#xD;&#xA;For now I only intend to do it for fun and a bit of learning.&#xD;&#xA;&#xD;&#xA;Also, kind of a side-question, apart from the programming language, which program itself would you recommend me to start with?&#xD;&#xA;&#xD;&#xA;I know this may be similar to some posts but what I've read didn't quite said what I wanted to know." />
  <row Id="28216" PostHistoryTypeId="1" PostId="12787" RevisionGUID="23c2543a-3eb0-4e17-85c6-1a0868a73193" CreationDate="2011-05-27T14:25:36.933" UserId="7624" Text="What is the best programming language to create a game?" />
  <row Id="28217" PostHistoryTypeId="3" PostId="12787" RevisionGUID="23c2543a-3eb0-4e17-85c6-1a0868a73193" CreationDate="2011-05-27T14:25:36.933" UserId="7624" Text="&lt;game-design&gt;&lt;language-choice&gt;&lt;languages&gt;" />
  <row Id="28219" PostHistoryTypeId="2" PostId="12789" RevisionGUID="1bf06f0c-e00d-4b86-8639-876b82265896" CreationDate="2011-05-27T15:01:26.957" UserId="744" Text="I think &lt;a href=&quot;http://en.wikipedia.org/wiki/AWK&quot;&gt;AWK&lt;/a&gt; is probably the best language for games. I don't know any other language that lets you write &lt;a href=&quot;http://www.netilium.org/~tnn/awktris.awk&quot;&gt;Tetris in 19 lines&lt;/a&gt;, cross-platform, and with such clarity." />
  <row Id="28220" PostHistoryTypeId="2" PostId="12790" RevisionGUID="cd6c2d83-2da9-4d73-9ab1-609fda55fee6" CreationDate="2011-05-27T15:04:22.357" UserId="2306" Text="If you like C#, go with it. XNA is fantastic. &#xD;&#xA;&#xD;&#xA;The most appropriate language to use is largely a function of your target platform. If you're interested in xbox, XNA is the only accessible game in town, pun intended. For the web, Java and flash, though if you're targeting mobile devices, that gets tricky. &#xD;&#xA;&#xD;&#xA;Most&#xD;&#xA; game development concepts transcend your choice of language or platform, and any experience you gain will be useful if you decide to switch in the future. &#xD;&#xA;&#xD;&#xA;I recommend starting with XNA. Play with the examples, write pong, and go from there. " />
  <row Id="28221" PostHistoryTypeId="2" PostId="12791" RevisionGUID="164721ff-41f2-4b51-afaa-f1b7da1b9c6d" CreationDate="2011-05-27T15:05:18.490" UserId="1024" Text="If your goal is to become a good engineer in general, then I would recommend you focus on C/C++, Scala/Haskell, and Ruby/Python. They are wildly different, and if you can master those three, most other languages will be easy to pickup.&#xD;&#xA;&#xD;&#xA;If you just want to make a game, then just make one. Finding the right hammer is not the going to help you build a house." />
  <row Id="28222" PostHistoryTypeId="25" PostId="12787" RevisionGUID="28c31164-2380-40ce-817a-283508f9317b" CreationDate="2011-05-27T15:13:04.293" Comment="http://twitter.com/#!/StackGameDev/status/74131006239678464" />
  <row Id="28223" PostHistoryTypeId="2" PostId="12792" RevisionGUID="03171369-059f-4ec4-9181-2af88da7d7d4" CreationDate="2011-05-27T15:19:37.213" UserId="7328" Text="I think it's not the language that is important but the technology that you want to use to create your game. althogh you can always find some engines that may help you create games with a language that you like the most but usualy there are some limitations if that's not the native language. for example you can try xna and write your programs using c# that you are already familiar with but ther will be some problems if you want to port your game to some handheld devices or consoles other than xbox. or if you want to create a game for iphone/ipad as apple recommends it's the best if you use objective-c since almost all of libraries out there for iphone are written with it. if you want to Create a game for browsers and/or cellphones java or flash(action script) and if you want to create some games that is easily portable to any console, i would recommend c/c++ since almost every console has a goood support for it. or at least there are people everywhere trying to create some useful libraries to support it. again I say it's all base on what you want from your game that make a language better than other." />
  <row Id="28224" PostHistoryTypeId="2" PostId="12793" RevisionGUID="a59fa9e1-08e2-495d-9835-72ec57772ce1" CreationDate="2011-05-27T15:23:52.770" UserId="1430" Text="&gt; I am now studying C#, and also know a&#xD;&#xA;&gt; bit of C++ and some A.S. 3.0 (adobe&#xD;&#xA;&gt; flash), so I was wondering which&#xD;&#xA;&gt; language should I choose to start&#xD;&#xA;&gt; making games with?&#xD;&#xA;&#xD;&#xA;Any of them -- generally, I would suggest the one that you know best or feel the most comfortable with. You can make amazing games with any other languages -- the limiting factor is generally you, the programmer, and not the technology. &#xD;&#xA;&#xD;&#xA;Of the three you listed, I would recommend C# and recommend against C++ (especially if you only know a bit of it). But ultimately it matters more that you pick something and start writing code, so go with whichever you like the most.&#xD;&#xA;&#xD;&#xA;&gt; Also, kind of a side-question, apart&#xD;&#xA;&gt; from the programming language, which&#xD;&#xA;&gt; program itself would you recommend me&#xD;&#xA;&gt; to start with?&#xD;&#xA;&#xD;&#xA;I assume you are asking about IDEs and toolchains here -- this depends on the language. For C++ and C#, on Windows, there is very little better than the Visual Studio environment and you can get the Express edition (which will do everything you need and probably more) for free from Microsoft.&#xD;&#xA;&#xD;&#xA;Unfortunately I have no advice to offer with respect to tools for Flash." />
  <row Id="28225" PostHistoryTypeId="2" PostId="12794" RevisionGUID="12117e95-3eaa-4726-8d88-d476567af1ac" CreationDate="2011-05-27T15:58:27.727" UserId="7588" Text="For simple tiled games, [**mappy**](http://www.tilemap.co.uk/) is quite useful and allows you to create multiple tile layers and export them into many different formats.&#xD;&#xA;&#xD;&#xA;A quick Google gives a couple of other editors http://www.mapeditor.org/ and http://tilemapeditor.com/.&#xD;&#xA;&#xD;&#xA;I think it's often a good idea to choose an editor that already exists, you can check whether the editor works for you and if the output data is good enough for your game engine.&#xD;&#xA;&#xD;&#xA;You can them choose what suits you best before making your own editor, should you need it.&#xD;&#xA;&#xD;&#xA;XML will generally produce a larger file format that will also take longer to load but is often used for its flexibility. If you are running into runtime problems though, maybe you should reconsider how your objects are defined.&#xD;&#xA;&#xD;&#xA;For example you can create bigger blocks where possible, this will crete fewer objecs. You can also optimize some things at load time to 'cluster' tiles together." />
  <row Id="28226" PostHistoryTypeId="2" PostId="12795" RevisionGUID="81acd9b7-c43e-4ac1-95eb-97b60b5845d0" CreationDate="2011-05-27T16:01:33.843" UserId="1430" Text="My recommendation is to utilize a profiler or some other form of metrics gathering, that way the physics budget you arrive at will be tuned for your specific game -- the numbers others provide for their games may not apply so well for your game. This is especially true in general, but it tends to hold even if you're using common technology like Unity.&#xD;&#xA;&#xD;&#xA;Xcode ships with Sampler and Shark, which can be used to profile applications (although maybe not Unity ones, at least not usefully). You may be able to inject home-grown profiling/timing gathering solutions into your code as well, provided you have any.&#xD;&#xA;&#xD;&#xA;Failing that, I'd take a divide-and-conquer approach. You say your initially-described scenario runs poorly, so I'd start with that and halve one of the numbers (either the number of cubes, the number of joints, et cetera), and see how that performs. Try to change only one variable at a time. It's pretty ad hoc, but it might be what you need to do if you can't get the pro trial that comes with the Unity profiler." />
  <row Id="28227" PostHistoryTypeId="6" PostId="12787" RevisionGUID="140df233-5448-43f9-82eb-9c30dcad5fc1" CreationDate="2011-05-27T16:02:01.780" UserId="51" Comment="edited tags" Text="&lt;language-choice&gt;&lt;languages&gt;" />
  <row Id="28228" PostHistoryTypeId="2" PostId="12796" RevisionGUID="d4f708b1-e128-426c-8924-442bac72c027" CreationDate="2011-05-27T16:16:57.153" UserId="6469" Text="Its not really an answer you want to hear but a lot of commercial games companies spend as much time on the tools as they do the game. &#xD;&#xA;&#xD;&#xA;In a book I recently read the author stated that the team spent a year and a half on the tool such as level editors and graphic tools before they started the game engine.&#xD;&#xA;&#xD;&#xA;Blizzard have a department of 30+ people full time developing tools for the programmers. Its a career choice in itself. &#xD;&#xA;&#xD;&#xA;Try looking for &quot;game resource editing tools&quot; and derivatives of that but most of the ones out there that are any good output specific file types. " />
  <row Id="28229" PostHistoryTypeId="2" PostId="12797" RevisionGUID="815231f7-d2ef-4a0a-828b-8dbf9e3b6066" CreationDate="2011-05-27T16:30:39.073" UserId="1430" Text="What you use to create levels -- and assets, in general -- for your game will vary wildly depending on the type of game you are making and the technology you are making it with. Sometimes the most efficient thing to do is leverage tools that other people have written, such as the aforementioned [mappy][1]. If your levels are simplistic enough you might even be able to do them in something like MS Paint, assigning particular tile values to particular colors and basically just painting the image. You could even do layers like this (with different images) -- it's not elegant, but it works.&#xD;&#xA;&#xD;&#xA;Of course this assumes you're building a 2D, tile-oriented game. When you get into the realm of 3D, there are far fewer decent generic level editors -- commercial games tend either build proprietary level construction tools, or use 3D modelling software and heavily massage the output via exporter scripts or build-time processes. So you, too, may need to roll your own.&#xD;&#xA;&#xD;&#xA;In doing so its important to select a language and toolchain that is well-suited to the task (and that you know, or can learn reasonably quickly). C++, for example, probably is a poor choice for building a rich GUI experience due to the relative low-level nature of the language and even of the available third-party GUI APIs. Flash probably isn't the best choice because it's designed as a content presentation system first and foremost, and probably won't be ideal at overly complex interactions -- you may need to write a lot of code to make it do the things you want. The cost of this can be amortized a bit if your game is also in Flash and you're tying directly into code or functionality the game needs anyhow, though.&#xD;&#xA;&#xD;&#xA;I build most of my tools in C# using Windows Forms or WPF (I'd recommend the former, as the latter has a much more painful relative learning curve and once you get beyond Happy Exampleville in WPF, things tend to get pear shaped real quick). You can usually throw something together in a matter of a few minutes and make it fairly robust within a few hours.&#xD;&#xA;&#xD;&#xA;The advantage to choosing a tech platform different than your game is that you can choose one that lets you develop the tools far more quickly. The disadvantage is that the tools are disconnected from the game (for example, they don't share the same renderer so in-game previews aren't possible) *unless* you also spend the (nontrivial) effort to develop an interop layer for your game framework.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tilemap.co.uk/" />
  <row Id="28230" PostHistoryTypeId="5" PostId="12753" RevisionGUID="b9e950f1-c621-494c-bb09-5b1d2b1f8c2b" CreationDate="2011-05-27T16:31:30.193" UserId="1430" Comment="edited body; edited title" Text="I'm trying to find useful information on creating game levels in a reasonably efficient way.&#xD;&#xA;Additionally, information in setting up a fairly painless way to edit this information would be handy (the closest I've come is some monstrosity in Flash; I would place the parts onto the stage, and run a script reading all the platforms, triggers and what have you, into an XML document).&#xD;&#xA;&#xD;&#xA;Google hasn't been to terribly helpful in finding what I need (probably what terms I'm using as I'm not sure exactly how I would refer to this). I'm hoping there may be someone here who knows of a good solid article on handling the data for a level.&#xD;&#xA;&#xD;&#xA;I've made a few attempts in previous projects (the latest being in Flash using XML), and I often run into issues with performance (in my case, I narrowed it down to having to many objects loaded, and started culling what was outside my view, was still slow though...)." />
  <row Id="28231" PostHistoryTypeId="4" PostId="12753" RevisionGUID="b9e950f1-c621-494c-bb09-5b1d2b1f8c2b" CreationDate="2011-05-27T16:31:30.193" UserId="1430" Comment="edited body; edited title" Text="Storing, loading and editing a level" />
  <row Id="28232" PostHistoryTypeId="5" PostId="12797" RevisionGUID="e246e2db-f96a-454d-868d-9780670c200e" CreationDate="2011-05-27T16:36:56.340" UserId="1430" Comment="added 489 characters in body" Text="**The Tools**&#xD;&#xA;&#xD;&#xA;What you use to create levels -- and assets, in general -- for your game will vary wildly depending on the type of game you are making and the technology you are making it with. Sometimes the most efficient thing to do is leverage tools that other people have written, such as the aforementioned [mappy][1]. If your levels are simplistic enough you might even be able to do them in something like MS Paint, assigning particular tile values to particular colors and basically just painting the image. You could even do layers like this (with different images) -- it's not elegant, but it works.&#xD;&#xA;&#xD;&#xA;Of course this assumes you're building a 2D, tile-oriented game. When you get into the realm of 3D, there are far fewer decent generic level editors -- commercial games tend either build proprietary level construction tools, or use 3D modelling software and heavily massage the output via exporter scripts or build-time processes. So you, too, may need to roll your own.&#xD;&#xA;&#xD;&#xA;In doing so its important to select a language and toolchain that is well-suited to the task (and that you know, or can learn reasonably quickly). C++, for example, probably is a poor choice for building a rich GUI experience due to the relative low-level nature of the language and even of the available third-party GUI APIs. Flash probably isn't the best choice because it's designed as a content presentation system first and foremost, and probably won't be ideal at overly complex interactions -- you may need to write a lot of code to make it do the things you want. The cost of this can be amortized a bit if your game is also in Flash and you're tying directly into code or functionality the game needs anyhow, though.&#xD;&#xA;&#xD;&#xA;I build most of my tools in C# using Windows Forms or WPF (I'd recommend the former, as the latter has a much more painful relative learning curve and once you get beyond Happy Exampleville in WPF, things tend to get pear shaped real quick). You can usually throw something together in a matter of a few minutes and make it fairly robust within a few hours.&#xD;&#xA;&#xD;&#xA;The advantage to choosing a tech platform different than your game is that you can choose one that lets you develop the tools far more quickly. The disadvantage is that the tools are disconnected from the game (for example, they don't share the same renderer so in-game previews aren't possible) *unless* you also spend the (nontrivial) effort to develop an interop layer for your game framework.&#xD;&#xA;&#xD;&#xA;**The Data**&#xD;&#xA;&#xD;&#xA;XML or JSON (I prefer the latter) is actually a reasonably good choice to start out, because they are both text-based, human-parsable data and you can iterate on the format quickly as you develop it. If you're not sure what exactly to put *in* the format at first, one way to approach the problem is to think of what information you'd like to have when rendering or interacting with the level in your gameplay logic code, and then make that what you store.&#xD;&#xA;  [1]: http://www.tilemap.co.uk/" />
  <row Id="28233" PostHistoryTypeId="5" PostId="12777" RevisionGUID="c39ed16a-30f2-4789-acc6-d8a131428908" CreationDate="2011-05-27T16:44:47.537" UserId="1198" Comment="added 1 characters in body" Text="I'm currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate.&#xD;&#xA;&#xD;&#xA;I know a lot of people use a Singleton design but I believe that this is more of a &quot;counter-architecture&quot; way of doing things, as every class will have access to the Singleton.&#xD;&#xA;&#xD;&#xA;I was comtemplating using a Service-type architecture to allow for my Input, Sound, etc Manager classes to be available, but this is essentially the same problem as the Singleton as all the Classes are available to 'whoever' wants them.&#xD;&#xA;&#xD;&#xA;I could of course pass references to the objects when they are needed, but this is bloated.&#xD;&#xA;&#xD;&#xA;I wonder if making the 'Services' only allow certain objects to subscribe would be possible?&#xD;&#xA;&#xD;&#xA;So is there a better way to make your classes available?&#xD;&#xA;&#xD;&#xA;Or am I searching for an answer that doesn't have a question?" />
  <row Id="28234" PostHistoryTypeId="5" PostId="12754" RevisionGUID="29b73b53-61f4-43a2-9267-fd7a4c998c22" CreationDate="2011-05-27T16:57:32.233" UserId="962" Comment="added extra details" Text="What is the best pattern to create a system that all the objects positions to be interpolated between two update states?&#xD;&#xA;&#xD;&#xA;The update will always run at the same frequency, but I want to be able to render at any FPS. So the rendering will be as smooth as possible no matter the frames per second, whether its lower, or higher than the update frequency.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would want to update 1 frame into the future interpolate from the current frame to the future frame. This answer has a link that talks about doing this:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12347/semi-fixed-or-fully-fixed-timestep/12368#12368&#xD;&#xA;&#xD;&#xA;Edit: How could I also use the last and current speed in the interpolation? It would be helpful for low FPS simulations like particle effects." />
  <row Id="28237" PostHistoryTypeId="2" PostId="12798" RevisionGUID="0f0124e1-3f60-4b21-ae3b-f99d786f9432" CreationDate="2011-05-27T17:30:01.077" UserId="7627" Text="This problem requires you to think about your definitions of start and finish a little differently. Beginning programmers often think of change in position per frame and that is a fine way to go in the beginning. For the sake of my response, let's consider a one dimensional answer.&#xD;&#xA;&#xD;&#xA;Let's say you have a monkey at position x. Now you also have a &quot;addX&quot; to which you add to the monkey's position per frame based on the keyboard or some other control. This will work as long as you have a guaranteed frame rate.&#xD;&#xA;&#xD;&#xA;Now, instead of addX, when you have a variable frame rate, you should think in terms of velocity and acceleration. " />
  <row Id="28238" PostHistoryTypeId="5" PostId="12798" RevisionGUID="a585f221-b4d4-4a76-9d49-5eaeab8689f0" CreationDate="2011-05-27T17:40:47.957" UserId="7627" Comment="added 1179 characters in body; added 4 characters in body; added 1 characters in body" Text="This problem requires you to think about your definitions of start and finish a little differently. Beginning programmers often think of change in position per frame and that is a fine way to go in the beginning. For the sake of my response, let's consider a one dimensional answer.&#xD;&#xA;&#xD;&#xA;Let's say you have a monkey at position x. Now you also have a &quot;addX&quot; to which you add to the monkey's position per frame based on the keyboard or some other control. This will work as long as you have a guaranteed frame rate. Let's say that your x is 100 and your addX is 10. After 10 frames, your x += addX should accumulate to 200.&#xD;&#xA;&#xD;&#xA;Now, instead of addX, when you have a variable frame rate, you should think in terms of velocity and acceleration. I will walk you through all of this arithmetic but is is super simple. What we want to know is how far you want to travel per millisecond (1/1000th of a second) &#xD;&#xA;&#xD;&#xA;If you are shooting for 30 FPS, then your velX should be 1/3rd of a second (10 frames from the last example at 30 FPS) and you know that you want to travel 100 'x' in that time so set your velX to 100 distance / 10 FPS or 10 distance per frame. In milliseconds, that works out to 1 distance x per 3.3 milliseconds or 0.3 'x' per millisecond.&#xD;&#xA;&#xD;&#xA;Now, everytime you update, all you need to do is figure out the time elapsed. Whether 33 ms have passed (1/30th of a second) or whatever, you just multiply the distance 0.3 by the number of milliseconds passed. This means that you need a timer that gives you ms (millisecond) accuracy but most timers give you this. Simply do something like this:&#xD;&#xA;&#xD;&#xA;var beginTime = getTimeInMillisecond()&#xD;&#xA;&#xD;&#xA;... later ...&#xD;&#xA;&#xD;&#xA;var time = getTimeInMillisecond()&#xD;&#xA;&#xD;&#xA;var elapsedTime = time-beginTime&#xD;&#xA;&#xD;&#xA;beginTime = time&#xD;&#xA;&#xD;&#xA;... now use this elapsedTime to calculate all of your distances." />
  <row Id="28239" PostHistoryTypeId="2" PostId="12799" RevisionGUID="eb1f95db-b29a-49c4-b413-0008e3b75324" CreationDate="2011-05-27T17:52:46.830" UserId="2061" Text="When designing a networked multiplayer-game where one player hosts and others connect, there are two strategies I'm aware of:&#xD;&#xA;&#xD;&#xA;* **Have the host-player's game be the authority**, with all other players as dumb-clients trying to catch up with the current game-state.  In the code, there will have to be lots of special cases, depending on if the current player is the host or not.&#xD;&#xA;* **Make the host a dumb-client** like everyone else by running a hidden dedicated server on another thread.  The dedicated-server will be the authority, and the host will connect to it like everyone else (through localhost).&#xD;&#xA;&#xD;&#xA;What are the advantages/disadvantages of each of these?  Which is used most often (or does it vary by game type/size)?" />
  <row Id="28240" PostHistoryTypeId="1" PostId="12799" RevisionGUID="eb1f95db-b29a-49c4-b413-0008e3b75324" CreationDate="2011-05-27T17:52:46.830" UserId="2061" Text="Should the game host be the authority, or another dumb client?" />
  <row Id="28241" PostHistoryTypeId="3" PostId="12799" RevisionGUID="eb1f95db-b29a-49c4-b413-0008e3b75324" CreationDate="2011-05-27T17:52:46.830" UserId="2061" Text="&lt;game-design&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="28242" PostHistoryTypeId="2" PostId="12800" RevisionGUID="add3d15c-63e2-4ee1-b1c4-3c4b8e7f90c9" CreationDate="2011-05-27T17:55:31.497" UserId="4662" Text="The dumb-client approach is best from a pure design point of view- it heavily limits the amount of different code you need between host and clients, and allows the server to run asynchronously. The downside is that the host's machine requires extra resources- but I guess it always did." />
  <row Id="28243" PostHistoryTypeId="25" PostId="12799" RevisionGUID="bddfc47e-ec35-4a48-a80c-17d07686afd1" CreationDate="2011-05-27T18:13:04.667" Comment="http://twitter.com/#!/StackGameDev/status/74176307633721344" />
  <row Id="28244" PostHistoryTypeId="2" PostId="12801" RevisionGUID="2a7e18d0-ffac-42ca-b975-af70836e61cc" CreationDate="2011-05-27T18:19:01.203" UserId="3971" Text="Foreword: I am posting this on answers.onstartups and gamedev.stackexchange because the expertise from each area will likely contribute useful information. Also, I saw similar questions to this, but I still want advice. So I'll change this question to: where should I go from here? What's the next step?&#xD;&#xA;&#xD;&#xA;So this morning I'm taking a shower, when suddenly I have an epiphany! The greatest idea I ever had, and it's about a dynamic 3D persistent-world MMORPG that breaks from the classic MMO in all senses (for business reasons I will not share any details). So I ran out of the shower, grabbed the graph paper in my room, and started jotting everything down.&#xD;&#xA;&#xD;&#xA;Then I got stuck on something. I realized I REALLY want to make this happen, but don't know where to start. I'm going to college as a freshman in the fall, and I think that by the time I get out, it will be too late. Someone else will already have done it or be making it (long development process). I thought, do I go to a big game company, take out a big loan, go to California and get workers?&#xD;&#xA;&#xD;&#xA;So this brings us back, what does it REALLY take to make a Massively Multiplayer Online Roleplaying Game? (considering, 3D, dynamic world, servers, sites, marketing, and everything else I'm missing). What's the next step?&#xD;&#xA;" />
  <row Id="28245" PostHistoryTypeId="1" PostId="12801" RevisionGUID="2a7e18d0-ffac-42ca-b975-af70836e61cc" CreationDate="2011-05-27T18:19:01.203" UserId="3971" Text="What does it really take to make an MMORPG/Where should I go from here?" />
  <row Id="28246" PostHistoryTypeId="3" PostId="12801" RevisionGUID="2a7e18d0-ffac-42ca-b975-af70836e61cc" CreationDate="2011-05-27T18:19:01.203" UserId="3971" Text="&lt;mmo&gt;&lt;game-industry&gt;&lt;marketing&gt;" />
  <row Id="28247" PostHistoryTypeId="5" PostId="12717" RevisionGUID="7e0ed7b4-d202-4d42-88f2-b10d33767356" CreationDate="2011-05-27T18:31:11.010" UserId="7331" Comment="in response to comments" Text="For a psychology research project we're looking for **short** (ca. 5 minute) **single-player games** to observe people's basic motivation. Because the members of this forum probably have a broad knowledge of existing games, we would like to ask people to list games that provide the closest possible (even if not perfect) fit to each description. We need 2-3 promising candidates for each of the following 3 categories.&#xD;&#xA;&#xD;&#xA;### A) Game that taps into affiliation&#xD;&#xA;&#xD;&#xA;Affiliation involves being emotionally close to others and establishing new relationships. The game should revolve around meeting other characters. I.e. through simple means (clicking certain actions) one can explore possibilities to meet friends. Requests to establish relationships should be accepted in most cases, because the player is well-liked. This liking not related to status or performance, but to the warm fuzzy feeling of friendliness. When getting to know each other, many commonalities between player and character emerge and are happily acknowledged.&#xD;&#xA;&#xD;&#xA;### B) Game that taps into achievement&#xD;&#xA;&#xD;&#xA;Achievement involves mastering difficult goals. In achievement games you would solve several quests by using some ability (speed, spatial thinking, strategy use). It should adapt to the player's ability, so that it is always possible to solve 60-70% of the quests. Player's should be able to improve their abilities and results with some training. Results should always be related to the individual performance, so there is no high score ranking with others or some such.The goal of this game should simply be to remain focused on a task of moderate difficulty, trying to become better at it.&#xD;&#xA;&#xD;&#xA;### C) Game that taps into power&#xD;&#xA;&#xD;&#xA;Power involves obtaining social status and influencing other people. A power game would involve influencing characters and yielding reactions. It should have a low difficulty and work without points (kind of like a cheat mode maybe). In other words: Influencing other people should be easy, not dependent on achievement or liking. For example, the ability to change the lives of others could be due to insurmountable and unquestionable status differences between the person playing (e.g., a deity, a biologist) and the characters of the game (sticking to the example: mortals, ants).&#xD;&#xA;&#xD;&#xA;If possible, it would be nice to receive answers like:&#xD;&#xA;&#xD;&#xA;A) game1, game2, game3,&#xD;&#xA;&#xD;&#xA;B) game4, game5, game6,&#xD;&#xA;&#xD;&#xA;C) game7, game8, game9.&#xD;&#xA;&#xD;&#xA;Many thanks in advance and best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;we edited this in response to some comments" />
  <row Id="28248" PostHistoryTypeId="2" PostId="12802" RevisionGUID="09fa187b-d6a7-458d-99fa-c9c90e0b9993" CreationDate="2011-05-27T18:54:07.003" UserId="6887" Text="My sincere advice to you: Start a blog where you in detail describe every aspect of the game you want to make.&#xD;&#xA;If you are lucky you will be able to gain a following during the next couple of years, and might even be noticed by some of the people in the industry who can help you further.&#xD;&#xA;&#xD;&#xA;The rationale here is that if you can come up with one good idea, you can also come up with another, and as such the idea itself is not really of value for you unless you are able to translate it into something more tangible like connections and reputation.&#xD;&#xA;&#xD;&#xA;If you a uncomfortable sharing your idea, write the blog anyway and just keep the posts private. This will help you articulate the idea, and expose flaws and missing parts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The thing is that in your position it is very unlikely that you will receive any serious help from the industry. They don't need new ideas, they need solid products that will generate revenue year after year." />
  <row Id="28249" PostHistoryTypeId="2" PostId="12803" RevisionGUID="fc1c4da2-3e84-45ee-8fab-3351faf02715" CreationDate="2011-05-27T19:08:36.883" UserId="6887" Text="If you don't have a great deal of experience in programming i would recommend starting out with javascript games. The advantage with javascript is that it is a dynamic language with a runtime that is available almost everywhere, which removes a lot of the pain of compiling and distribution.&#xD;&#xA;&#xD;&#xA;If you pick a game library like Impact or Crafty a lot of the low level stuff is already done for you and you can create fun games in a couple hundred lines of code.&#xD;&#xA;&#xD;&#xA;[List of javascript game engines][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gitcp.com/sorenbs/jsgames-articles/resources" />
  <row Id="28250" PostHistoryTypeId="2" PostId="12804" RevisionGUID="9665180f-3e09-4433-9ae7-d84b38d4689b" CreationDate="2011-05-27T19:09:50.097" UserId="7631" Text="In Cocos2D for iPhone, I want the latest touch event to interrupt another and ignore the last touch. Let me know if I need to elaborate more, but basically my game consists of a lot of finger dragging, and if the player ever switched fingers, there may be some overlap, and for the way things are setup, it may detect it as a new touch. &#xD;&#xA;&#xD;&#xA;I think I have things almost on the right track, but my third touch does not work correctly. For instance:&#xD;&#xA;&#xD;&#xA;Touch A beings and held&#xD;&#xA;Touch B beings and held&#xD;&#xA;Touch A let go&#xD;&#xA;Touch A beings and held &lt;-This should interrupt Touch B&#xD;&#xA;&#xD;&#xA;In my delegate I put [glView setMultipleTouchEnabled:YES]; because I believe I need multiple touches enabled.&#xD;&#xA;&#xD;&#xA;In my CCLayer class with my added map and sprite I am using targeted touch delegate (i.e. ccTouchBegan NOT ccTouchesBegan, etc) &#xD;&#xA;&#xD;&#xA;I am accessing a touch object with touch = [[[event allTouches] allObjects] objectAtIndex:0];, however I don't have much understanding what index is considered the latest touch or even a process to always get the latest touch." />
  <row Id="28251" PostHistoryTypeId="1" PostId="12804" RevisionGUID="9665180f-3e09-4433-9ae7-d84b38d4689b" CreationDate="2011-05-27T19:09:50.097" UserId="7631" Text="Retrieving latest touch to interrupt another" />
  <row Id="28252" PostHistoryTypeId="3" PostId="12804" RevisionGUID="9665180f-3e09-4433-9ae7-d84b38d4689b" CreationDate="2011-05-27T19:09:50.097" UserId="7631" Text="&lt;cocos2d-iphone&gt;&lt;touch&gt;&lt;multitouch&gt;" />
  <row Id="28253" PostHistoryTypeId="5" PostId="12767" RevisionGUID="24b9d2f3-2cf3-4ad1-ab7c-0b07c89a61f5" CreationDate="2011-05-27T19:15:11.770" UserId="1198" Comment="deleted 7 characters in body" Text="I am working on a terrain in XNA/C#. My intention is to be able to render multiple textures on the ground across the terrain. However, all tutorials like [this][1] are only capable of doing it with about 3-4 textures.&#xD;&#xA;&#xD;&#xA;My idea is currently that I create a texture map in TGA that has different colors (RGBA) where each color represent a particular texture. The amount of Alpha in the color describes how much alpha the vertex on the position should have. And there would be a base texture.&#xD;&#xA;&#xD;&#xA;However, I am a newbie in this area so I really need some getting started guides. So far I've managed to found none. All tutorials and resources are limited in terms of how many textures they support even though all modern games have many.&#xD;&#xA;&#xD;&#xA;My game is an RTS, and having played a lot RTS games, I've noticed they all support lots of textures across the terrain. For example, the world editor for Command &amp; Conquer 3 allows you to place any amount of any texture anywhere.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Multitexturing.php" />
  <row Id="28254" PostHistoryTypeId="5" PostId="12804" RevisionGUID="42421c42-e58c-44ff-8b99-72ab11008522" CreationDate="2011-05-27T19:15:14.450" UserId="7631" Comment="added 16 characters in body; edited body" Text="In Cocos2D for iPhone, I want the latest touch event to interrupt another and ignore the last touch. Let me know if I need to elaborate more, but basically my game consists of a lot of finger dragging, and if the player ever switched fingers, there may be some overlap, and for the way things are setup, it may detect it as a new touch. &#xD;&#xA;&#xD;&#xA;I think I have things almost on the right track, but my third touch does not work correctly. For instance:&#xD;&#xA;&#xD;&#xA; - Touch A begins and held&#xD;&#xA; - Touch B begins and held&#xD;&#xA; - Touch A let go&#xD;&#xA; - Touch A begins and held &lt;-This should&#xD;&#xA;   interrupt Touch B&#xD;&#xA;&#xD;&#xA;In my delegate I put [glView setMultipleTouchEnabled:YES]; because I believe I need multiple touches enabled.&#xD;&#xA;&#xD;&#xA;In my CCLayer class with my added map and sprite I am using targeted touch delegate (i.e. ccTouchBegan NOT ccTouchesBegan, etc) &#xD;&#xA;&#xD;&#xA;I am accessing a touch object with touch = [[[event allTouches] allObjects] objectAtIndex:0];, however I don't have much understanding what index is considered the latest touch or even a process to always get the latest touch." />
  <row Id="28255" PostHistoryTypeId="2" PostId="12805" RevisionGUID="3236d833-9ef5-45c4-a26d-21c24c109643" CreationDate="2011-05-27T19:19:47.167" UserId="7630" Text="Another thing not mentioned of course is rate of fire / recharge speed.&#xD;&#xA;&#xD;&#xA;This can apply offensively or defensively (ie shields).&#xD;&#xA;&#xD;&#xA;Falling back on the tower examples noted already, and just being quick and loose with costs (no analysis, just off the cuff) you could have more low level towers at fire power 1, rate of fire 1, range 1 for cost 3 or you can have an upgrade with fp 2, rof .75, range 1.25 for cost 4.&#xD;&#xA;&#xD;&#xA;Now the scenario where more low level is better is the scenario where you have swarms of enemies.  That 3/4 rate of fire might just require you to build more towers at more cost.&#xD;&#xA;&#xD;&#xA;The high level becomes more effective as enemies requiring multiple hits start to appear, now you're getting 2 shots for the price of 1.&#xD;&#xA;&#xD;&#xA;To turn this into a defence strategy think about varying hit points or shielding (tower defence where the enemies attempt to destroy your towers, not just bypass them?)&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="28256" PostHistoryTypeId="5" PostId="12577" RevisionGUID="add138bf-a7b0-478f-bab0-9005b7de8ee8" CreationDate="2011-05-27T19:28:00.103" UserId="3588" Comment="Added the [balance] tag and made some toning on the question. Also, fünf ♪" Text="The essence of this question is basically this: consider a strategy, RTS or a tower defence game, where you have the choice to build a new unit or to upgrade an existing one. The upgraded unit is definitely worth more than a non-upgraded one, but by how much?&#xD;&#xA;&#xD;&#xA;In designing a upgrade path, how do I design it such that&#xD;&#xA;&#xD;&#xA;1. Upgrading is worth the time and effort&#xD;&#xA;2. However, upgrading doesn't becomes too über that the player forgo building new units?&#xD;&#xA;&#xD;&#xA;For example, in *Defence Grid*, a glance at a number shows that two Level 1 Gun turrets do less damage output than a Level 2 Gun turret; however there are advantages to having 2 towers over 1 (say, you need to cover two different paths).&#xD;&#xA;&#xD;&#xA; " />
  <row Id="28257" PostHistoryTypeId="6" PostId="12577" RevisionGUID="add138bf-a7b0-478f-bab0-9005b7de8ee8" CreationDate="2011-05-27T19:28:00.103" UserId="3588" Comment="Added the [balance] tag and made some toning on the question. Also, fünf ♪" Text="&lt;game-design&gt;&lt;balance&gt;" />
  <row Id="28258" PostHistoryTypeId="24" PostId="12577" RevisionGUID="add138bf-a7b0-478f-bab0-9005b7de8ee8" CreationDate="2011-05-27T19:28:00.103" Comment="Proposed by 3588 approved by 51 edit id of 454" />
  <row Id="28259" PostHistoryTypeId="2" PostId="12806" RevisionGUID="96149954-5662-449a-83c9-f1ca06a307c6" CreationDate="2011-05-27T19:29:42.473" UserId="5021" Text="Ideas are worthless in the capitalist sense of the term.&#xD;&#xA;&#xD;&#xA;You can't sell an idea; there is no demand for them.&#xD;&#xA;&#xD;&#xA;There have been many ideas for all different forms of MMOs. However, the enormous cost of building an MMO can bankrupt companies even fairly large companies. Deviating too far from the norm when tens or hundreds of millions of dollars are on the line is hard to justify. There are thousands upon thousands of successful games. There are only a handful of successful MMOs.&#xD;&#xA;&#xD;&#xA;Your idea might be awesome, and it might be the concept for the greatest game ever, but that alone is perhaps 0.1% of what's needed to produce a successful game.&#xD;&#xA;&#xD;&#xA;My best advice for you, is to go to college, get a job, learn to work in a big company on a team, and then start working on a smaller version of your game that isolates the &quot;toy&quot; concept that makes your game fun and unique. At that point, you'll be in a better position to decide what's necessary to build your amazing game -- and I promise you, your idea of what constitutes an amazing game will be very different at that point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have a binder with over 100 pages of documentation for a game that I started writing years ago. It is very comprehensive -- from hundreds of possibilities for abilities, to the foundations of skill systems, to concept art for NPCs, to implementation level algorithms. &#xD;&#xA;&#xD;&#xA;http://www.olhovsky.com/2011/03/dbp-2011-entry-started/&#xD;&#xA;&#xD;&#xA;Two years later, I've sobered up about how hard it is to make a fun game concept. It requires iteration on design and testing -- lots of it. If you think that you know that your game is fun after a few minutes in the shower, then I'm sorry, but you don't know!" />
  <row Id="28260" PostHistoryTypeId="2" PostId="12807" RevisionGUID="021e8973-8bbd-4176-ab78-9a409ea1d001" CreationDate="2011-05-27T19:33:32.087" UserId="5540" Text="The best advice that I've ever seen is to SHARE your ideas. Game companies with the resources to steal your game idea are more unlikely to steal it the more original it is simply because your idea isn't proven. &#xD;&#xA;&#xD;&#xA;The more you share it and keep people updated on the progress the more likely it is that you'll find people who are also interested and will help you build it, even if it's just by letting you bounce your ideas off them.&#xD;&#xA;&#xD;&#xA;You can not work in a vacuum. Get your idea out as fast as possible and get feedback as early as possible. &#xD;&#xA;&#xD;&#xA;If you're talking the 3D type WoW MMO that everybody seems to think they can improve then you'll need a team of 40+ people to start, including highly experienced game logic programmers/designers, graphic designers, network admins, testers, etc. It's far from a small or casual undertaking.&#xD;&#xA;&#xD;&#xA;Start with a very light skinned down version of your game that you can make yourself and develop it from there. Use open source libraries and resources as much as possible so you're not reinventing the wheel at every turn. If you start to make it big then you'll be able to afford rebuilding your standin work, but if you spend 50 weeks making all the different kinds of plants you need, and that puts you only 20% of the way done with a beta launch, then you'll get nowhere in a hurry because you'll lose all your inertia." />
  <row Id="28261" PostHistoryTypeId="5" PostId="12806" RevisionGUID="12f6d9e7-aaf5-48bc-a933-e4a1cdc907e1" CreationDate="2011-05-27T19:35:48.037" UserId="5021" Comment="deleted 10 characters in body; deleted 2 characters in body; added 72 characters in body; added 3 characters in body" Text="Ideas are worthless in the capitalist sense of the term.&#xD;&#xA;&#xD;&#xA;You can't sell an idea; there is no demand for them.&#xD;&#xA;&#xD;&#xA;There have been many ideas for all different forms of MMOs. However, the enormous cost of building an MMO can bankrupt even fairly large companies. Deviating too far from the norm when tens or hundreds of millions of dollars are on the line is hard to justify. There are thousands upon thousands of successful games. There are only a handful of successful MMOs.&#xD;&#xA;&#xD;&#xA;**That is why it's easy to think of radically different MMO concepts.**&#xD;&#xA;&#xD;&#xA;Your idea might be awesome, and it might be the concept for the greatest game ever, but that alone is perhaps 0.1% of what's needed to produce a successful game.&#xD;&#xA;&#xD;&#xA;My best advice for you, is to go to college, get a job, learn to work with a team in a company, and then start working on a smaller version of your game that isolates the &quot;toy&quot; concept that makes your game fun and unique. At that point, you'll be in a better position to decide what's necessary to build your amazing game -- and I promise you, your idea of what constitutes an amazing game will be very different at that point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have a binder with over 100 pages of documentation for a game that I started writing years ago. It is very comprehensive -- from hundreds of possibilities for abilities, to the foundations of skill systems, to concept art for NPCs, to implementation level algorithms. &#xD;&#xA;&#xD;&#xA;http://www.olhovsky.com/2011/03/dbp-2011-entry-started/&#xD;&#xA;&#xD;&#xA;Two years later, I've sobered up about how hard it is to make a fun game concept. It requires iteration on design and testing -- lots of it. If you think that you know that your game is fun after a few minutes in the shower, then I'm sorry, but you don't know!" />
  <row Id="28262" PostHistoryTypeId="2" PostId="12808" RevisionGUID="795ec5c0-7267-4d65-8366-7237ec6dc0ff" CreationDate="2011-05-27T19:36:16.813" UserId="7630" Text="In the past I used bit fields to keep track of quests/events which a player had experienced.  I then had the (ie) NPC do a check against the player's set of acquired flags and respond accordingly.&#xD;&#xA;&#xD;&#xA;One advantage is that you can encode a tremendous amount of flags in a small structure.  Another was that multiple, independent story lines could be encoded in a few separate variables.&#xD;&#xA;&#xD;&#xA;One disadvantage was that I was only able to encode pass/fail style results.&#xD;&#xA;&#xD;&#xA;http://www.nwnlexicon.com/compiled/primer.bitwiseoperators.html talks about this exact sort of thing and might be helpful.  The logic of story line direction is then controlled by the events on locations/characters.&#xD;&#xA;&#xD;&#xA;I really like the idea of a directed graph, but, I don't really think it's needed beyond a planning tool. " />
  <row Id="28263" PostHistoryTypeId="2" PostId="12809" RevisionGUID="03065de3-a7cf-4c5a-b62a-335b890931d2" CreationDate="2011-05-27T19:49:38.330" UserId="5021" Text="Texture splatting is one approach.&#xD;&#xA;&#xD;&#xA;[A gamedev paper explaining (the relatively simple) concept is here.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It has some drawbacks, but it works for World of Warcraft, and I suspect it will for you too.&#xD;&#xA;&#xD;&#xA;It really depends what you're trying to achieve.&#xD;&#xA;&#xD;&#xA;To permit the use of many different textures across the terrain, typically you want to split the terrain into chunks, and then assign a splatting texture to each chunk.&#xD;&#xA;&#xD;&#xA;![Terrain split into chunks.][2]&#xD;&#xA;&#xD;&#xA;If you want to draw decal textures over top of the terrain (e.g. blood splatter), you might need to draw a second terrain pass that only draws the transparent decals.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you're curious about more advanced techniques, you can read about the Frostbite 1 engine's approach to procedural texture splatting here:&#xD;&#xA;http://publications.dice.se/attachments/Chapter5-Andersson-Terrain_Rendering_in_Frostbite.pdf&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_//183/403/texture-splatting-in-direct3d-r2238&#xD;&#xA;  [2]: http://i.stack.imgur.com/SCRK5.png" />
  <row Id="28264" PostHistoryTypeId="5" PostId="12806" RevisionGUID="f10fcd7d-8c1d-42b8-ac55-2d3cbe6b1140" CreationDate="2011-05-27T20:07:09.027" UserId="5021" Comment="added 9 characters in body" Text="Ideas are worthless in the (narrow) capitalist sense of the term.&#xD;&#xA;&#xD;&#xA;You can't sell an idea; there is no demand for them.&#xD;&#xA;&#xD;&#xA;There have been many ideas for all different forms of MMOs. However, the enormous cost of building an MMO can bankrupt even fairly large companies. Deviating too far from the norm when tens or hundreds of millions of dollars are on the line is hard to justify. There are thousands upon thousands of successful games. There are only a handful of successful MMOs.&#xD;&#xA;&#xD;&#xA;**That is why it's easy to think of radically different MMO concepts.**&#xD;&#xA;&#xD;&#xA;Your idea might be awesome, and it might be the concept for the greatest game ever, but that alone is perhaps 0.1% of what's needed to produce a successful game.&#xD;&#xA;&#xD;&#xA;My best advice for you, is to go to college, get a job, learn to work with a team in a company, and then start working on a smaller version of your game that isolates the &quot;toy&quot; concept that makes your game fun and unique. At that point, you'll be in a better position to decide what's necessary to build your amazing game -- and I promise you, your idea of what constitutes an amazing game will be very different at that point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have a binder with over 100 pages of documentation for a game that I started writing years ago. It is very comprehensive -- from hundreds of possibilities for abilities, to the foundations of skill systems, to concept art for NPCs, to implementation level algorithms. &#xD;&#xA;&#xD;&#xA;http://www.olhovsky.com/2011/03/dbp-2011-entry-started/&#xD;&#xA;&#xD;&#xA;Two years later, I've sobered up about how hard it is to make a fun game concept. It requires iteration on design and testing -- lots of it. If you think that you know that your game is fun after a few minutes in the shower, then I'm sorry, but you don't know!" />
  <row Id="28265" PostHistoryTypeId="5" PostId="12809" RevisionGUID="d0abb896-3db0-4c5b-be1c-9d7c8f6d4b1b" CreationDate="2011-05-27T20:29:14.367" UserId="5021" Comment="added 612 characters in body; added 154 characters in body" Text="First, I want to point out that the approach you linked to is capable of doing it with much more than 4 textures. In a SM 3 shader, you have 16 texture registers. You can use all of those registers if you want. Riemer's method just happens to pass 4 weighted values for textures from the vertex shader to the pixel shader. You could choose to pass 8 or 12 or whatever.&#xD;&#xA;&#xD;&#xA;That said, as Andrew has pointed out, you probably don't want to just start using 12 textures for every part of your terrain.&#xD;&#xA;&#xD;&#xA;Whatever method you choose, you're going to want to break your terrain down into chunks (see below).&#xD;&#xA;&#xD;&#xA;Start by reading about texture splatting.&#xD;&#xA;&#xD;&#xA;[A gamedev paper explaining (the relatively simple) concept is here.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It has some drawbacks, but it works for World of Warcraft, and I suspect it will for you too.&#xD;&#xA;&#xD;&#xA;It really depends what you're trying to achieve.&#xD;&#xA;&#xD;&#xA;To permit the use of many different textures across the terrain, typically you want to split the terrain into chunks, and then assign texture information to each chunk to be drawn.&#xD;&#xA;&#xD;&#xA;Below is a terrain split linearly into chunks. However, a common approach is to use a quadtree, so that chunks vary in size with distance.&#xD;&#xA;&#xD;&#xA;![Terrain split into chunks.][2]&#xD;&#xA;&#xD;&#xA;If you want to draw decal textures over top of the terrain (e.g. blood splatter), you might need to draw a second terrain pass that only draws the transparent decals.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you're curious about more advanced techniques, you can read about the Frostbite 1 engine's approach to procedural texture splatting here:&#xD;&#xA;http://publications.dice.se/attachments/Chapter5-Andersson-Terrain_Rendering_in_Frostbite.pdf&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_//183/403/texture-splatting-in-direct3d-r2238&#xD;&#xA;  [2]: http://i.stack.imgur.com/SCRK5.png" />
  <row Id="28266" PostHistoryTypeId="5" PostId="12542" RevisionGUID="3d6767f8-babd-46ac-8a7e-75781ac05c65" CreationDate="2011-05-27T20:38:13.477" UserId="1230" Comment="Typo" Text="I have an array of sprites that are displayed in-order to make an animation. There is code in an update loop that has access to a value 'time' indicating how far along the animation is. Time is a float between 0 and 1 inclusive. It uses this value to calculate which frame to display.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    update(time) {&#xD;&#xA;      frames // An array of animation frames&#xD;&#xA;      current_frame_index = time / animation_length&#xD;&#xA;      display_frame(frame[current_frame_index])&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This works if you assume that each frame is displayed for the same amount of time.&#xD;&#xA;&#xD;&#xA;I would like to enhance this by allowing frames to have arbitrarily defined durations. So if I have a set of frames and durations:&#xD;&#xA;&#xD;&#xA;    name           duration&#xD;&#xA;&#xD;&#xA;    frame_one      0.2&#xD;&#xA;    frame_two      1.1&#xD;&#xA;    frame_three    1.0&#xD;&#xA;    frame_four     0.75&#xD;&#xA;    frame_five     1.4&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and a value indicating the animation's progress, how can I determine which frame to display?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;" />
  <row Id="28270" PostHistoryTypeId="2" PostId="12811" RevisionGUID="e35a1f4d-58cf-4694-a420-d7f050a866e4" CreationDate="2011-05-27T21:09:10.163" UserId="7623" Text="Between these two options the dumb-client approach is certainly best for the reasons DeadMG mentions.&#xD;&#xA;&#xD;&#xA;There is another option which is make every client an authority, it has the advantage of the dumb-client that all peers share the same code. The other advantage is that it might be a lot more fair if you set the right rules because no one has the 0-lag-to-server advantage.&#xD;&#xA;&#xD;&#xA;This can ofcourse be rather tricky to implement depending on the game type. Your protocol will have to deal with solving conflicts between peers, probably using some kind of ownership scheme. Leaving only the conflicts where 2 peers claim ownership of the same game object.&#xD;&#xA;&#xD;&#xA;Googling Peer-2-Peer multiplayer protocols might give you some more details about this approach." />
  <row Id="28272" PostHistoryTypeId="4" PostId="10905" RevisionGUID="4c696ac4-788b-4c6e-a672-7726a690bf29" CreationDate="2011-05-27T22:11:42.817" UserId="2061" Comment="Grammar edit (title)" Text="XNA captures mouse clicks when the game doesn't have focus" />
  <row Id="28273" PostHistoryTypeId="24" PostId="10905" RevisionGUID="4c696ac4-788b-4c6e-a672-7726a690bf29" CreationDate="2011-05-27T22:11:42.817" Comment="Proposed by 2061 approved by 14 edit id of 455" />
  <row Id="28274" PostHistoryTypeId="2" PostId="12812" RevisionGUID="c8f0cbd2-8266-4c64-bc8a-4c8e680eeead" CreationDate="2011-05-27T22:26:42.603" UserId="2566" Text="I'm working on a little game that uses Irrlicht. I'm pretty new to Irrlicht and I was wondering how I could enable multisampling. The device driver is `EDT_OPENGL` initiated as such:&#xD;&#xA;&#xD;&#xA;    IrrlichtDevice *device = createDevice(video::EDT_OPENGL,&#xD;&#xA;                                            core::dimension2d&lt;u32&gt;(800, 700),&#xD;&#xA;                                            16,&#xD;&#xA;                                            NO);&#xD;&#xA;&#xD;&#xA;How do I enable multisampling? Thanks in advance. :)" />
  <row Id="28275" PostHistoryTypeId="1" PostId="12812" RevisionGUID="c8f0cbd2-8266-4c64-bc8a-4c8e680eeead" CreationDate="2011-05-27T22:26:42.603" UserId="2566" Text="Enabling multisampling in Irrlicht?" />
  <row Id="28276" PostHistoryTypeId="3" PostId="12812" RevisionGUID="c8f0cbd2-8266-4c64-bc8a-4c8e680eeead" CreationDate="2011-05-27T22:26:42.603" UserId="2566" Text="&lt;opengl&gt;&lt;c++&gt;&lt;irrlicht&gt;&lt;antialiasing&gt;" />
  <row Id="28277" PostHistoryTypeId="5" PostId="12754" RevisionGUID="44bd87cd-6cc6-4a04-8b9e-775548af2317" CreationDate="2011-05-27T22:58:08.743" UserId="962" Comment="added 248 characters in body" Text="What is the best pattern to create a system that all the objects positions to be interpolated between two update states?&#xD;&#xA;&#xD;&#xA;The update will always run at the same frequency, but I want to be able to render at any FPS. So the rendering will be as smooth as possible no matter the frames per second, whether its lower, or higher than the update frequency.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would want to update 1 frame into the future interpolate from the current frame to the future frame. This answer has a link that talks about doing this:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12347/semi-fixed-or-fully-fixed-timestep/12368#12368&#xD;&#xA;&#xD;&#xA;Edit: How could I also use the last and current speed in the interpolation? For example with just linear interpolation, it will move at the same speed between positions. **I need a way to have it interpolate the position between the two points, but take into consideration the speed at each points for the interpolation.** It would be helpful for low rate simulations like particle effects." />
  <row Id="28278" PostHistoryTypeId="5" PostId="12812" RevisionGUID="1fe65ceb-adc2-4053-b7fa-56d538481746" CreationDate="2011-05-27T23:04:07.840" UserId="962" Comment="removed fluff" Text="I'm working on a little game that uses Irrlicht. I'm pretty new to Irrlicht and I was wondering how I could enable multisampling. The device driver is `EDT_OPENGL` initiated as such:&#xD;&#xA;&#xD;&#xA;    IrrlichtDevice *device = createDevice(video::EDT_OPENGL,&#xD;&#xA;                                            core::dimension2d&lt;u32&gt;(800, 700),&#xD;&#xA;                                            16,&#xD;&#xA;                                            NO);&#xD;&#xA;&#xD;&#xA;How do I enable multisampling?" />
  <row Id="28279" PostHistoryTypeId="2" PostId="12813" RevisionGUID="fa931be6-f8ac-42b8-950a-8ef2b7d9f032" CreationDate="2011-05-27T23:31:40.703" UserId="3128" Text="At this point the platform and programming language don't matter I would just like to know if something out there exists for this.  Any help is appreciated." />
  <row Id="28280" PostHistoryTypeId="1" PostId="12813" RevisionGUID="fa931be6-f8ac-42b8-950a-8ef2b7d9f032" CreationDate="2011-05-27T23:31:40.703" UserId="3128" Text="Is there a 2d physics engine that can model fluids and gases?" />
  <row Id="28281" PostHistoryTypeId="3" PostId="12813" RevisionGUID="fa931be6-f8ac-42b8-950a-8ef2b7d9f032" CreationDate="2011-05-27T23:31:40.703" UserId="3128" Text="&lt;2d&gt;&lt;physics&gt;" />
  <row Id="28282" PostHistoryTypeId="25" PostId="12813" RevisionGUID="a5f34a80-f6c4-41fb-90a8-88c451c9a901" CreationDate="2011-05-28T00:13:06.083" Comment="http://twitter.com/#!/StackGameDev/status/74266908224000000" />
  <row Id="28283" PostHistoryTypeId="25" PostId="12812" RevisionGUID="1a6dcf3b-554c-47b5-a7c7-e481487c9575" CreationDate="2011-05-28T03:13:07.427" Comment="http://twitter.com/#!/StackGameDev/status/74312214231781376" />
  <row Id="28284" PostHistoryTypeId="2" PostId="12814" RevisionGUID="0c990014-3f1b-4635-b554-a1bdcbca1865" CreationDate="2011-05-28T03:57:19.360" UserId="1446" Text="[This][1] tutorial at 8bitrocket offers a good method of maintaining smooth movement and a fairly constant framerate, for many applications this is more than necessary, but built into it is a method of changing the framerate on the fly with a great deal of precision.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.8bitrocket.com/2008/04/08/tutorial-creating-an-optimized-as3-game-timer-loop/" />
  <row Id="28285" PostHistoryTypeId="2" PostId="12815" RevisionGUID="6c6bc8ce-1158-43a0-9c57-103b52dd4ba0" CreationDate="2011-05-28T05:06:42.140" UserId="7640" Text="Alright so i'm making a **vertical side scroller where you are an '8' character traveling downward while avoiding my randomly generated walls (*the &quot;generation&quot; function*) on the left and right sides of the screen, and made of 'X's. you can collide with this wall 4 times before losing.** &#xD;&#xA;&#xD;&#xA;When you collide with the wall you can no longer move, and are basically are stuck in that column of the screen until you pop out into an open space, known as a ' ' (space) character. You lose *one life* for each **INITIAL** collision with the X wall, and do not lose another until you have popped out and been freed from it.&#xD;&#xA;&#xD;&#xA;As an added touch i have made it so after you collide while traveling down the randomly generated map (or rather as the walls move uppward while your character stays put) the X chars you've collided with are deleted. However I am having trouble getting the INITIAL COLLISION with the wall to be detected correctly. the result is the playe incorrectly losing 4 lives after hitting 1 wall and traveling throug it. This is due to some odd reason for the &quot;numb_collisions&quot;, which is used to count how many collisions have occured since initial collision (if it's 0 it means it *IS* the **initial collision occuring= -1 shield**), keeps getting reset to 0. The detect_collision function seems to having some sort of problems as the returned value is allowing the if statement to pretend there is no collision, reseting &quot;numb_coll&quot; to 0 and screwing the lives/shields up. **All this nonsense is located at the bottom of the main function**&#xD;&#xA;&#xD;&#xA;Finally the **Screen.Insert()** *function and others like it simply saves the data into a vector &lt;string&gt; which represents the console window. It is later used to print the &quot;screen&quot; to the console at a set rate (long double speed), as seen in the for loop after the map drawings in the main function *&#xD;&#xA;&#xD;&#xA;not Finally.. but i believe that te numb_coll problem has something to do with the time and framrate. When running full speed i quickly die upon entering a wall as numb_coll doesn't change or gets changed back to 0 somehow. When putting a stop in my msVS++ it works perfectly... and when holding F5 (shortcut for &quot;continue&quot;) it partly works but numb_coll still gets set to 0 every 3 or 4 X's down in the wall... &#xD;&#xA;&#xD;&#xA;I hope this is enough explination, Thanks for any Help, and &#xD;&#xA;**LOOK AT PREVIOUS POST ABOUT COLLISION DETECTION FOR MORE SPECIFIC FUNCTION PROBLEMS**&#xD;&#xA;otherwise, heres all the code: Thanks again!&#xD;&#xA;&#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;time.h&gt; // or &quot;ctime&quot;&#xD;&#xA;    #include &lt;stdio.h&gt; // for &#xD;&#xA;    #include &lt;cstdlib&gt; &#xD;&#xA;    // Windows stuff&#xD;&#xA;    #include &lt;Windows.h&gt; // GOD DAMMNIT WINDOWS WHY????&#xD;&#xA;    #include &lt;conio.h&gt;&#xD;&#xA;    // Ncurses&#xD;&#xA;    #include&lt;curses.h&gt;&#xD;&#xA;    // STL stuff&#xD;&#xA;    #include &lt;algorithm&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    //String/Int conversion&#xD;&#xA;    #include &lt;sstream&gt;&#xD;&#xA;    // gives access to rand function&#xD;&#xA;    #include &lt;cstdlib&gt;&#xD;&#xA;    //gives access to time functions&#xD;&#xA;    #include &lt;ctime&gt;&#xD;&#xA;    &#xD;&#xA;    // mySTOPWATCH   i think i'm gonna cry.... =')&#xD;&#xA;    #include &lt;myStopwatch.h&gt; // for keeping times&#xD;&#xA;    #include &lt;myMath.h&gt;		 // numb_digits() and digit_val();&#xD;&#xA;    using namespace std;&#xD;&#xA;    enum{ NUMB_LINES= 24, SEC= 1000};					// time stuff&#xD;&#xA;    enum{TIME= 345, HEALTH = 346, MAP= 247};	// for Refresh() command&#xD;&#xA;    enum{NONE= 256};									// for Refresh() transition&#xD;&#xA;    enum{NEW = 590, OLD = 591};							// for the old/new screen command&#xD;&#xA;    &#xD;&#xA;    // Some nCurses setup&#xD;&#xA;     int r = 0,&#xD;&#xA;    	 c = 0; // current row and column (upper-left is (0,0))&#xD;&#xA;     const int nrows = 56, // number of rows in window&#xD;&#xA;    		   ncols = 79; // number of columns in window&#xD;&#xA;    // Timer Setup&#xD;&#xA;     Stopwatch myStopwatch(3, START);&#xD;&#xA;    &#xD;&#xA;     ///////////////////////////		RandNumb()	///////////////////////////////////////&#xD;&#xA;    int RandNumb(int scope){&#xD;&#xA;    	srand(GetTickCount());&#xD;&#xA;    	return rand() % scope;};&#xD;&#xA;    //////////////////////////		GeneratePathStart()	///////////////////////////////&#xD;&#xA;    void GeneratePathStart(vector&lt;string&gt;&amp; buff){&#xD;&#xA;    	int wall= RandNumb(80)/2, &#xD;&#xA;    		space = (RandNumb(75)/2)+5,&#xD;&#xA;    		wall2= 80- (wall+space);&#xD;&#xA;    	buff.push_back(&quot;&quot;);&#xD;&#xA;    	for(;wall&gt; 0; wall--){&#xD;&#xA;    		buff[0].push_back('X');}&#xD;&#xA;    	for(;space&gt; 0; space--){&#xD;&#xA;    		buff[0].push_back(' ');}&#xD;&#xA;    	for(; wall2 &gt; 0; wall2--){&#xD;&#xA;    		buff[0].push_back('X');}&#xD;&#xA;    	};&#xD;&#xA;    &#xD;&#xA;    //////////////////////////		GeneratePath()	////////////////////////////////////&#xD;&#xA;    void GeneratePath( vector&lt;string&gt;&amp; buff){// the buff is the seed  too&#xD;&#xA;    	int wall= RandNumb(80)/2, &#xD;&#xA;    		space = (RandNumb(75)/2)+5,&#xD;&#xA;    		wall2= 80-(space+wall);&#xD;&#xA;    	int swall= 0;&#xD;&#xA;    		for(char i= '0'; i!= ' ';swall++)&#xD;&#xA;    			i= buff[buff.size()-1][swall+1];&#xD;&#xA;    	int sspace= 0; int I= swall+1;&#xD;&#xA;    		for(char i= '0'; i!= 'X';sspace++, I++)&#xD;&#xA;    			i= buff[buff.size()-1][I];&#xD;&#xA;    	int swall2 = 80-(sspace+swall);&#xD;&#xA;    &#xD;&#xA;    	// now the actual generation&#xD;&#xA;    	int cwall= wall-swall; &#xD;&#xA;    	int cspace= space-sspace; &#xD;&#xA;    	int cwall2= wall2-swall2;&#xD;&#xA;    	for(;cwall!= 0 || cspace!= 0 /*|| cwall2 != 0*/;){&#xD;&#xA;    			buff.push_back(&quot;&quot;);&#xD;&#xA;    //cwall&#xD;&#xA;    			if(cwall!= 0){&#xD;&#xA;    				if(cwall&gt;0){&#xD;&#xA;    					swall++;&#xD;&#xA;    					cwall--;}&#xD;&#xA;    				else{ // cwall is negative&#xD;&#xA;    					swall--;&#xD;&#xA;    					cwall++;}}&#xD;&#xA;    			for(int w= 0; w &lt;swall; w++)&#xD;&#xA;    				buff[buff.size()-1].push_back('X');&#xD;&#xA;    // cspace&#xD;&#xA;    			if(cspace!= 0){&#xD;&#xA;    				if(cspace&gt;0){&#xD;&#xA;    					sspace++;&#xD;&#xA;    					cspace--;}&#xD;&#xA;    				else{ // cspace is negative&#xD;&#xA;    					sspace--;&#xD;&#xA;    					cspace++;}}&#xD;&#xA;    			for(int s= 0; s &lt;sspace; s++)&#xD;&#xA;    				buff[buff.size()-1].push_back(' ');&#xD;&#xA;    // cwall2&#xD;&#xA;    			//if(cwall2!= 0){				&#xD;&#xA;    			//	if(cwall2&gt;0){&#xD;&#xA;    			//		wall2++;&#xD;&#xA;    			//		cwall2--;}&#xD;&#xA;    			//	else{ // cspace is negative&#xD;&#xA;    			//		wall2--;&#xD;&#xA;    			//		cwall2++;}}&#xD;&#xA;    			for(int w2= 0; w2 &lt;80- (swall+sspace); w2++)&#xD;&#xA;    				buff[buff.size()-1].push_back('X');&#xD;&#xA;    	}}// end of function&#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    ////////////////////////////	Sprite Class	///////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    class Sprite&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    private:&#xD;&#xA;    	string name;&#xD;&#xA;    	char symbol;&#xD;&#xA;    	float shield;&#xD;&#xA;    	int location[2];&#xD;&#xA;    	bool alive;&#xD;&#xA;    &#xD;&#xA;    public:&#xD;&#xA;    ///////////////////// Get and SET all the privates	///////&#xD;&#xA;    	Sprite(){};&#xD;&#xA;    	Sprite(string a_name, char a_symbol, float a_health){&#xD;&#xA;    		name = a_name;&#xD;&#xA;    		symbol = a_symbol;&#xD;&#xA;    		shield = a_health;};&#xD;&#xA;    &#xD;&#xA;    	char get_symbol() {return symbol;};&#xD;&#xA;    	void set_symbol(char sym) {symbol = sym;};&#xD;&#xA;    &#xD;&#xA;    	float get_shield() {return shield;};&#xD;&#xA;    	void set_shield(float numb) {shield = numb;};&#xD;&#xA;    	void add_shield (float numb) {shield += numb;};&#xD;&#xA;    	void destroy_shield() {shield--; if(shield&lt;0) alive= false;}&#xD;&#xA;    &#xD;&#xA;    	string get_name() {return name;};&#xD;&#xA;    	string set_name(string aName) {name = aName;};&#xD;&#xA;    &#xD;&#xA;    	int* get_location(){return location;};&#xD;&#xA;    	void set_location(int X, int Y) {&#xD;&#xA;    		location[0] = X;&#xD;&#xA;    		location[1] = Y;};&#xD;&#xA;    &#xD;&#xA;    	bool Alive() {return alive;};&#xD;&#xA;    	void SetLife(bool f) {alive= f;};&#xD;&#xA;    		&#xD;&#xA;    ////////////////////////////////	Move	////////////&#xD;&#xA;    	bool move(int X, int Y) {&#xD;&#xA;    				location[0] += X;&#xD;&#xA;    				location[1] += Y;&#xD;&#xA;    				return true;};&#xD;&#xA;    };// end of sprite&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    /////////////////////////////////	Player Class	///////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    class Player : public Sprite&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;    	Player(string name,int X, int Y, float health){&#xD;&#xA;    		set_symbol('8');&#xD;&#xA;    		set_name(name);&#xD;&#xA;    		set_location(X,Y);&#xD;&#xA;    		set_shield(100);};&#xD;&#xA;    private:&#xD;&#xA;    	// none?&#xD;&#xA;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    //////////////////////////////////////////		Map class	///////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    class Map&#xD;&#xA;    {&#xD;&#xA;    private:&#xD;&#xA;    ///////////////////////////////////////////		Map Variables ///////////////&#xD;&#xA;    	string name;&#xD;&#xA;    	vector &lt;string&gt; contents;&#xD;&#xA;    	vector &lt;string&gt; save;&#xD;&#xA;    &#xD;&#xA;    public:&#xD;&#xA;    	Map(){};&#xD;&#xA;    	Map(string* lines, int i, string name= &quot;map&quot;){name = name;&#xD;&#xA;    										   contents.resize(56);&#xD;&#xA;    										   Insert(lines, i);};&#xD;&#xA;    	~Map(){};&#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////		generate	////////////////////&#xD;&#xA;    	void generate(){GeneratePath(contents);};&#xD;&#xA;    ///////////////////////////////////////////		Return()	////////////////////&#xD;&#xA;    	string Name()				{return name;};&#xD;&#xA;    	vector &lt;string&gt; Contents()	{return contents;};&#xD;&#xA;    	string Contents(int Y)		{return contents[Y];};&#xD;&#xA;    	char Contents(int Y, int X)	{return contents[Y][X];};&#xD;&#xA;    	vector &lt;string&gt; Save()		{return save;};&#xD;&#xA;    	int size()					{return contents.size();};&#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////		Insert()	////////////////////&#xD;&#xA;    			//  string* to an array of 24 strings;&#xD;&#xA;    	void Insert(string* lines, int i)			 &#xD;&#xA;    	{contents.assign(lines, lines+i);}; //insert lines 1-24&#xD;&#xA;    &#xD;&#xA;    	void Insert(string astring, int Y)	 {contents[Y] = astring;};&#xD;&#xA;    &#xD;&#xA;    	void Insert(char achar, int X, int Y){contents[Y][X] = achar;};&#xD;&#xA;    &#xD;&#xA;    	void Saveline(string line)			 {save.push_back(line);}; &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    /////////////////////////	SCREEN CLASS		///////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    class Screen&#xD;&#xA;    {&#xD;&#xA;    private:&#xD;&#xA;    ///////////////////////////////////////////		Screen Variables ///////////////&#xD;&#xA;    	string _name;&#xD;&#xA;    	vector &lt;string&gt; new_map;&#xD;&#xA;    	vector &lt;string&gt; old_map;&#xD;&#xA;    	vector &lt;Sprite*&gt; sprites_p;&#xD;&#xA;    &#xD;&#xA;    public:&#xD;&#xA;    	Screen(string name){_name = name;&#xD;&#xA;    						new_map.resize(nrows);&#xD;&#xA;    						old_map.resize(nrows);};&#xD;&#xA;    	~Screen(){};&#xD;&#xA;    &#xD;&#xA;    ////////////////////////////////////////////	Get contents	///////////////////////////&#xD;&#xA;    	vector &lt;string&gt; get_contents(int comm= NEW)				 {switch(comm){ case NEW: return new_map; break;&#xD;&#xA;    																			case OLD: return old_map; break;}};&#xD;&#xA;    	string get_contents			(int Y, int comm= NEW)		 {switch(comm){ case NEW: return new_map[Y]; break;&#xD;&#xA;    																			case OLD: return old_map[Y]; break;}};&#xD;&#xA;    	char get_contents			(int X, int Y, int comm= NEW){switch(comm){ case NEW: return new_map[Y][X]; break;&#xD;&#xA;    																			case OLD: return old_map[Y][X]; break;}};&#xD;&#xA;    &#xD;&#xA;    ////////////////////////////////////////////	Refresh 	///////////////////////////&#xD;&#xA;    void Refresh(int command= ALL, int transition= NONE)&#xD;&#xA;    {&#xD;&#xA;    	//old_map = new_map;	// update the old map&#xD;&#xA;    	for(int r= 0; r&lt; nrows; r++){ move(r,0); &#xD;&#xA;    								  addstr((char*)new_map[r].c_str());}					// make sure this works later&#xD;&#xA;    	// Insert Time &#xD;&#xA;    	if(command== ALL || command== TIME){&#xD;&#xA;    	enum{ time_loc_y= 22, &#xD;&#xA;    		  time_loc_x= 38 };&#xD;&#xA;    	mvaddstr(time_loc_y, time_loc_x, myStopwatch.ClockTime().c_str());}&#xD;&#xA;    &#xD;&#xA;    refresh();}; // end of function&#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////		Insert	////////////////////////&#xD;&#xA;    															///////////////////	Map&#xD;&#xA;    	void Insert(Map&amp; map, int y1, int y2)	{for ( int mc = y1, nm= 0; mc&lt; map.size() &amp;&amp; mc&lt; y2; mc++, nm++){&#xD;&#xA;    												new_map[nm] = map.Contents(mc);}&#xD;&#xA;    	};&#xD;&#xA;    															/////////////////// string&#xD;&#xA;    	void Insert(string astring, int Y)		{new_map[Y] = astring;};&#xD;&#xA;    															///////////////////// char&#xD;&#xA;    	void Insert(char achar, int X, int Y)	{new_map[Y][X] = achar;};&#xD;&#xA;    															////////////////////  sprite&#xD;&#xA;    	void Insert(Sprite&amp; sprite)			{new_map[sprite.get_location()[1]][sprite.get_location()[0]] = sprite.get_symbol();&#xD;&#xA;    										 sprites_p.push_back(&amp;sprite);};	// save a pointer to the sprite&#xD;&#xA;    &#xD;&#xA;    ///////////////////////////////////////////		Collision Detection	///////////&#xD;&#xA;    	bool check_collision(Sprite&amp; sprite,int X, int Y, char&amp; buff) &#xD;&#xA;    	{&#xD;&#xA;    	////////////////////// check whats already there /////&#xD;&#xA;    		char newloc = new_map[sprite.get_location()[1]+Y]&#xD;&#xA;    			                 [sprite.get_location()[0]+X];&#xD;&#xA;    	    if(newloc == '|' || newloc == '/' || newloc == '_' || newloc == '=' || newloc == 'X' || newloc == '-' || newloc == 'x' ) {&#xD;&#xA;    			buff = newloc;&#xD;&#xA;    			sprite.destroy_shield();&#xD;&#xA;    			return true;}&#xD;&#xA;    			&#xD;&#xA;    		else return false;&#xD;&#xA;    	};&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    /////////////////////////	MAIN	////////////////////////////////////  MAIN  ////////////////////////////////////////////////////////////////////////&#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;    cout &lt;&lt; &quot;Maximize the screen for optimum experience!... type ok when done&quot; &lt;&lt; endl;&#xD;&#xA;    char response; cin &gt;&gt; response;&#xD;&#xA;    &#xD;&#xA;    	WINDOW *wnd;&#xD;&#xA;     wnd = initscr(); // curses call to initialize window and curses mode&#xD;&#xA;     //cbreak(); // curses call to set no waiting for Enter key&#xD;&#xA;     noecho(); // curses call to set no echoing&#xD;&#xA;     //curs_set(a number); (0 = invisible, 1 = normal, 2 = very visible)&#xD;&#xA;     int row,col; getmaxyx(stdscr,row,col);		/* get the number of rows and columns */&#xD;&#xA;     clear(); // curses call to clear screen, send cursor to position (0,0)&#xD;&#xA;    &#xD;&#xA;     Screen theScreen(&quot;ascreen&quot;);&#xD;&#xA;    &#xD;&#xA;    		string splashScreen[24] = {    // HERE&quot;S THE SPLASH !&#xD;&#xA;    //					  1        2		3		4		 5		   6        7        8        &#xD;&#xA;    //                         123456789		 123456789         123456789         123456789&#xD;&#xA;    //               0123456789		    123456789         123456789		    123456789         1234567&#xD;&#xA;    /* 0 */			&quot;________________________________________________________________________________&quot;, &#xD;&#xA;    /* 1 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;,  &#xD;&#xA;    /* 2 */     	&quot;|XXXXXXX   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 3 */     	&quot;|XXXXXX  /  XXXXXXXXXXXXXXXXXXXXX     xXXXXXXXXXX  XXXXXXXXXXXx  xXXXXXXx  xXXX|&quot;, &#xD;&#xA;    /* 4 */     	&quot;|XXXXX  /0}  XXXXXXXXXXXXXXXXX   /XXXXx  XXXXXXx /X xXXXXXXXXX    XXXXXX    XXX|&quot;, &#xD;&#xA;    /* 5 */     	&quot;|XXXX  /000}  XXXXXXXXXXXXXX   /XXXXXXXx  XXXXX  /X  XXXXXXXX  /X  XXXX  /X  XX|&quot;, &#xD;&#xA;    /* 6 */     	&quot;|XXX           XXXXXXXXXXXX   /XXXXXXXXxx XXXX  /XXX  XXXXXXX /XX  XXXX  |X  XX|&quot;, &#xD;&#xA;    /* 7 */     	&quot;|XX   /XXXXXX   XXXXXXXXXX   /XXXXXXXXXXXXXXXX  /XXX  XXXXXX  |XXX  XX   /X  xX|&quot;, &#xD;&#xA;    /* 8 */     	&quot;|X   /XXXXXXXX   X*X*X*XXX  /XXXXx        xXX          XXXXX  |XXX      /XXX  X|&quot;, &#xD;&#xA;    /* 9 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXX   XXXXXXXXXXX   XX  /XXXXX  XXXX   |XXXX    /XXXX  X|&quot;, &#xD;&#xA;    /* 10 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXX   XXXXXXXXX    Xx /XXXXXXX xXXX   |XXXXx  /XXXX   X|&quot;, &#xD;&#xA;    /* 11*/     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXX            XXXx /XXXXXXX xXX     XXXXXxxXXXX    x|&quot;, &#xD;&#xA;    /* 12 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 13 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxxxxxxxxxxxxxxXXXX|&quot;, &#xD;&#xA;    /* 14 */     	&quot;|XXX  XXxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                  XXX|&quot;, &#xD;&#xA;    /* 15 */     	&quot;|XXX  XXXx  XX/  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_____XX     XXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 16 */     	&quot;|XXX    XXX  /  XXXXXXXXXXXXXXXXXXXX  XXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 17 */     	&quot;|XXX /0] XX/  XXXXx      xXX  XXXXXXXXXXX    xXXX    xXXXX                 xXXX|&quot;, &#xD;&#xA;    /* 18 */     	&quot;|XXX    XX/  XXXXX  XXXXXXXX    xXXX  XXX  XXXXXX  XXXXXXX                 xXXX|&quot;, &#xD;&#xA;    /* 19 */     	&quot;|XXXXXXXX  XXXXXXX  XXx  xXX  XXXXXX  XXX    xXXX    xXXXX     XXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 20 */     	&quot;|XXXXXXXXXXXXXXXXX  XXXX  XX  XXXXXX  XXX  XXXXXX  XXXXXXX     XXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 21 */     	&quot;|XXXXXXXXXXXXXXXXXx      xXXxxXXXXXXxxXXX xXXXXXX xXXXXXXX                  XXX|&quot;, &#xD;&#xA;    /* 22 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxxxxxxxxxxxxxxxxXXX|&quot;, &#xD;&#xA;    /* 23 */		&quot;|______________________________________________________________________________|&quot;,};&#xD;&#xA;    &#xD;&#xA;    	string _lines_[56] = {   &#xD;&#xA;    //					  1        2		3		4		 5		   6        7        8        &#xD;&#xA;    //                         123456789		 123456789         123456789         123456789&#xD;&#xA;    //               0123456789		    123456789         123456789		    123456789         1234567&#xD;&#xA;    /* 0 */			&quot;________________________________________________________________________________&quot;, &#xD;&#xA;    /* 1 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;,  &#xD;&#xA;    /* 2 */			&quot;|XXXXXXXX                    XXXXXXXXXXXXX              XXXXXXXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 3 */			&quot;|XXXXX                 XXXXXXXXXXXXXXXX     XXXXXXXXX     XXXXXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 4 */			&quot;|XXXX      XXXXXXXXXXXXXXXXXXXXXXXXXX    XXXXXXXXXXXXXXX    XXXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 5 */			&quot;|XXX      XXXXXXXXXXXXXXXXXXXXXXXXXXX    XXXXXXXXXXXXXXX    XXXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 6 */			&quot;|XX       XXXXXXXXXXXXXXXXXXXXXXXXXX    XXXXXXXXXXXXXXXXX    XXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 7 */			&quot;|XX       XXXXXXXX           XXXXXXX    XXXXXXXXXXXXXXXXX    XXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 8 */			&quot;|XXX       XXXXXXXXXX         XXXXX    XXXXXXXXXXXXXXXXXXX    XXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 9 */			&quot;|XXXX        XXXXXXXXXXXX     XXXXX    XXXXXXXXXXXXXXXXXXX    XXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 10 */		&quot;|XXXXX        XXXXXXXXXXX     XXXXX    XXXXXXXXXXXXXXXXXXX    XXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 11 */		&quot;|XXXXXXX        XXXXXXXXX     XXXXXX    XXXXXXXXXXXXXXXXX    XXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 12 */		&quot;|XXXXXXXX        XXXXXXX      XXXXXX    XXXXXXXXXXXXXXXXX    XXXXXXX   XXXXXXXX|&quot;,&#xD;&#xA;    /* 13 */		&quot;|XXXXXXXXXX       XXXXX       XXXXXXX    XXXXXXXXXXXXXXX    XXXXXXXX___XXXXXXXX|&quot;,&#xD;&#xA;    /* 14 */		&quot;|XXXXXXXXXXX                XXXXXXXXX    XXXXXXXXXXXXXXX    XXXXXXXXxxxXXXXXXXX|&quot;,&#xD;&#xA;    /* 15 */		&quot;|XXXXXXXXXXXX              XXXXXXXXXXXX     XXXXXXXXX    XXXXXXXXXXx   xXXXXXXX|&quot;,&#xD;&#xA;    /* 16 */		&quot;|XXXXXXXXXXXXXXXXX       XXXXXXXXXXXXXXXXX              XXXXXXXXXXXx   xXXXXXXX|&quot;,&#xD;&#xA;    /* 17 */		&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;,&#xD;&#xA;    /* 18 */		&quot;|    MOVE USING 'WASD' |=|  avoid the walls |=|  SURVIVE!!  |=|  press 'O' quit|&quot;,&#xD;&#xA;    /* 19 */		&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;,&#xD;&#xA;    /* 20 */		&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;,&#xD;&#xA;    /* 21 */		&quot;|XXX                                                                        XXX|&quot;,&#xD;&#xA;    /* 22 */		&quot;|XXX                                                                        XXX|&quot;,&#xD;&#xA;    /* 23 */		&quot;|XXX                                                                        XXX|&quot;,&#xD;&#xA;    /* 0 */			&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 1 */     	&quot;|XXX                                                                        XXX|&quot;,  &#xD;&#xA;    /* 2 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 3 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 4 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 5 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 6 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 7 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 8 */     	&quot;|XXX                                                                        XXX|&quot;, &#xD;&#xA;    /* 9 */     	&quot;|XXXX                                                                      XXXX|&quot;, &#xD;&#xA;    /* 10 */     	&quot;|XXXXX                                                                    XXXXX|&quot;, &#xD;&#xA;    /* 11*/     	&quot;|XXXXXX                                                                  XXXXXX|&quot;, &#xD;&#xA;    /* 12 */     	&quot;|XXXXXXX                                                                XXXXXXX|&quot;, &#xD;&#xA;    /* 13 */     	&quot;|XXXXXXXX                                                              XXXXXXXX|&quot;, &#xD;&#xA;    /* 14 */     	&quot;|XXXXXXXXX                                                            XXXXXXXXX|&quot;, &#xD;&#xA;    /* 15 */     	&quot;|XXXXXXXXXX                                                          XXXXXXXXXX|&quot;, &#xD;&#xA;    /* 16 */     	&quot;|XXXXXXXXXXX                                                        XXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 17 */     	&quot;|XXXXXXXXXXX                                                        XXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 18 */     	&quot;|XXXXXXXXXXXX                                                      XXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 19 */     	&quot;|XXXXXXXXXXXX                                                      XXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 20 */     	&quot;|XXXXXXXXXXXXX                                                    XXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 21 */     	&quot;|XXXXXXXXXXXXX                                                    XXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 22 */     	&quot;|XXXXXXXXXXXXXX                                                  XXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 23 */		&quot;|XXXXXXXXXXXXXX                                                  XXXXXXXXXXXXXX|&quot;&#xD;&#xA;    /* 24 */     	&quot;|XXXXXXXXXXXXXXX                                                XXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 25 */     	&quot;|XXXXXXXXXXXXXXXXX                                            XXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 26 */     	&quot;|XXXXXXXXXXXXXXXXXX                                          XXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 27 */     	&quot;|XXXXXXXXXXXXXXXXXXXX                                      XXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 28 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXX                                XXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 29 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXX                              XXXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 30 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXX                            XXXXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 31*/     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXX                      XXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    /* 32 */     	&quot;|XXXXXXXXXXXXXXXXXXXXXXXXXXXX                      XXXXXXXXXXXXXXXXXXXXXXXXXXXX|&quot;, &#xD;&#xA;    };    &#xD;&#xA;    &#xD;&#xA;    	//////////////////////////////////	Splash Screen	/////////////////////////////	&#xD;&#xA;    	Map splashScreen_map(splashScreen, 24);&#xD;&#xA;    	theScreen.Insert(splashScreen_map, 0, nrows);&#xD;&#xA;    	theScreen.Refresh(MAP);&#xD;&#xA;    	myStopwatch.Wait(3);&#xD;&#xA;    	myStopwatch.Restart();&#xD;&#xA;    	/////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;    &#xD;&#xA;    	Map L1(_lines_, nrows, &quot;L1&quot;);&#xD;&#xA;    	theScreen.Insert(L1, 0, nrows);&#xD;&#xA;    	Sprite player(&quot;Player&quot;,'8', 5);   //(8, 12, 16);&#xD;&#xA;    	player.set_location(47, 22);&#xD;&#xA;    &#xD;&#xA;    	////////////////////// Check if new line is needed;&#xD;&#xA;    	double refreshes= 0;&#xD;&#xA;    	int newlines= 0;&#xD;&#xA;    	const double speed= .1;&#xD;&#xA;    &#xD;&#xA;    	int numb_coll= 0;&#xD;&#xA;    	bool dead= false;&#xD;&#xA;    /////////////////////////	start of the for loop&#xD;&#xA;    	for (bool quit = false; quit != true &amp;&amp; dead== false;)&#xD;&#xA;    	{	double newTime= myStopwatch.ElapsedTime()- refreshes;&#xD;&#xA;    		if(newTime &gt;= speed){&#xD;&#xA;    			theScreen.Insert(L1, 0+newlines, nrows+newlines);&#xD;&#xA;    			refreshes+= speed;&#xD;&#xA;    			newlines++;&#xD;&#xA;    			if(L1.size()&lt;= nrows+newlines+2)&#xD;&#xA;    				L1.generate();}&#xD;&#xA;    	/////////////////	Keypress	///////////&#xD;&#xA;    	int xMove = 0;&#xD;&#xA;    	int yMove = 0;&#xD;&#xA;    	if (kbhit()){&#xD;&#xA;    		int key = getch(); &#xD;&#xA;    		key = toupper(key); // makes whatever key uppercase&#xD;&#xA;    &#xD;&#xA;    						int stepSize = 1;&#xD;&#xA;    						bool validPress = true;&#xD;&#xA;    		switch(key){&#xD;&#xA;    	// update health here............&#xD;&#xA;    		case 'W': yMove = -stepSize;break;&#xD;&#xA;    		case 'S': yMove = stepSize; break;&#xD;&#xA;    		case 'A': xMove = -stepSize;break;&#xD;&#xA;    		case 'D': xMove = stepSize; break;&#xD;&#xA;    &#xD;&#xA;    		case 'P': getch();			break;&#xD;&#xA;    		case 'O': quit = true;&#xD;&#xA;    	&#xD;&#xA;    		default: validPress = false;}&#xD;&#xA;    &#xD;&#xA;    		if(validPress == true){/*do something here or i might not need it.....*/}&#xD;&#xA;    		} /* end of if(kbhit())*/ &#xD;&#xA;     &#xD;&#xA;    		char coll; // the buffer for the collided char&#xD;&#xA;    		theScreen.check_collision(player, xMove, yMove, coll);&#xD;&#xA;    		if(coll== 'X'){ &#xD;&#xA;    			if(player.Alive()== false){}&#xD;&#xA;    				// do something about it &#xD;&#xA;    				// if there is life&#xD;&#xA;    			else{&#xD;&#xA;    				for(int I= 0; I&lt; numb_coll &amp;&amp; numb_coll&lt; player.get_location()[1]; I++){&#xD;&#xA;    					theScreen.Insert(' ',player.get_location()[0], player.get_location()[1]-(I+1));}&#xD;&#xA;    				if(numb_coll&gt;0)&#xD;&#xA;    					player.add_shield(1);&#xD;&#xA;    				numb_coll++;&#xD;&#xA;    				theScreen.Insert(player);}}&#xD;&#xA;    		else if(coll != 'X'){&#xD;&#xA;    			theScreen.Insert(' ', player.get_location()[0],player.get_location()[1]);// get rid of old player placing&#xD;&#xA;    			player.move(xMove, yMove);												 // put in new charater placing&#xD;&#xA;    			theScreen.Insert(player);&#xD;&#xA;    			numb_coll= 0;}&#xD;&#xA;    &#xD;&#xA;    	theScreen.Refresh();}// so refresh and restart the for loop&#xD;&#xA;    if(dead== true){&#xD;&#xA;    //	theScreen.Insert(a gameover map);&#xD;&#xA;    			   }&#xD;&#xA;    endwin(); // curses call to restore the original window and leave&#xD;&#xA;    return 0;&#xD;&#xA;    }" />
  <row Id="28286" PostHistoryTypeId="1" PostId="12815" RevisionGUID="6c6bc8ce-1158-43a0-9c57-103b52dd4ba0" CreationDate="2011-05-28T05:06:42.140" UserId="7640" Text="Console Text game: Vertical Scroller collision problems" />
  <row Id="28287" PostHistoryTypeId="3" PostId="12815" RevisionGUID="6c6bc8ce-1158-43a0-9c57-103b52dd4ba0" CreationDate="2011-05-28T05:06:42.140" UserId="7640" Text="&lt;c++&gt;&lt;gameloop&gt;&lt;console&gt;" />
  <row Id="28288" PostHistoryTypeId="2" PostId="12816" RevisionGUID="38aefb59-9b98-4586-a290-8af67229f23b" CreationDate="2011-05-28T05:13:47.523" UserId="7514" Text="I actually disagree with the 100% even game.&#xD;&#xA;&#xD;&#xA;Games such as travian and tribalwars demonstrate a bad example of unevenness. Your position almost completely determines whether you will live or die in the first few weeks.&#xD;&#xA;&#xD;&#xA;However if your game is just a team vs team game, which will only go for half an hour to an hour, then you will find that having a randomly generated situation is sometimes quite fun (although it must not be too unbalanced).&#xD;&#xA;&#xD;&#xA;The &quot;Pro's&quot; at the game, will be excited by the idea of winning even if it was unfair for them, and when it is easier for them, well big deal, its only half an hour.&#xD;&#xA;&#xD;&#xA;The not noobs or pro's people will thrive when advantaged, and learn more when disadvantaged.&#xD;&#xA;&#xD;&#xA;And the noobs will enjoy a higher success when it is an easier situation, but will have the excuse of &quot;well i'm still learning&quot; when they get flogged.&#xD;&#xA;&#xD;&#xA;This works especially well, when people are matched up to someone of a similar &quot;Level&quot; or &quot;Experience&quot;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;Just my 2c" />
  <row Id="28289" PostHistoryTypeId="16" PostId="12816" RevisionGUID="b858ee7a-f161-492e-9860-66a292f045a1" CreationDate="2011-05-28T05:13:47.523" UserId="7514" />
  <row Id="28290" PostHistoryTypeId="2" PostId="12817" RevisionGUID="7369187a-2dee-4ffb-bd4c-54fa7dc9321e" CreationDate="2011-05-28T05:16:10.210" UserId="7641" Text="Look into what Q-Games used for Pixeljunk Shooter. It is a 2d game with pretty involved fluid physics. I'm not sure if they used a homegrown or middleware physics engine, but the information is probably out there somewhere." />
  <row Id="28291" PostHistoryTypeId="2" PostId="12818" RevisionGUID="e206dc61-093d-468f-9cea-f50416844fae" CreationDate="2011-05-28T05:18:48.863" UserId="7514" Text="Well i havn't looked into this, but i know for a fact that almost any physics engine can emulate the idea. Box2D, etc.&#xD;&#xA;&#xD;&#xA;Basically have particles bouncing around, off surfaces and eachother (faster for gasses) but also give them a constant gravity like effect (liquids would all have the same, but some gases you might want to rise slowly).&#xD;&#xA;&#xD;&#xA;If you link up the outer particles you will get a polygonal shape representing the mass&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;if you simply draw a pixel or particle graphic over each particle, you can achieve a cloud effect for the mass instead." />
  <row Id="28292" PostHistoryTypeId="25" PostId="12815" RevisionGUID="5e52193c-8420-41bf-a93b-8af844005443" CreationDate="2011-05-28T06:13:08.353" Comment="http://twitter.com/#!/StackGameDev/status/74357516368224257" />
  <row Id="28293" PostHistoryTypeId="2" PostId="12819" RevisionGUID="85d80b1a-6eed-4aa2-873d-24f131fd1f2a" CreationDate="2011-05-28T06:14:12.213" UserId="51" Text="This code is a mess, but after a cursory glance I'm going to go out on a limb and say you probably want to check against the value of check_collision.  The char you pass by reference into the function is uninitialized (albeit probably zeroed out in debug builds) and you don't set it in the false case of the function, but you immediately check it afterwards.&#xD;&#xA;&#xD;&#xA;Really what you need to do is attach a debugger to it and step through it to see what's going on." />
  <row Id="28294" PostHistoryTypeId="2" PostId="12820" RevisionGUID="b96f5710-540d-4490-b620-4d860a787e12" CreationDate="2011-05-28T07:56:52.000" UserId="6054" Text="I've just about started with a project I've had in mind for ages. I don't quite know how to start such big projects (bigger than Pong, anyway), so I thought I would get started by making a basic organization.&#xD;&#xA;&#xD;&#xA;Now, in games like Freelancer and X feature large, open spaces. I ma aware that these have to be organised, to ensure collision testing don't happen continuously anywhere but only where the player can see it.&#xD;&#xA;&#xD;&#xA;I thought first about a general scene graph, I am familiar with those, but it would just have almost all objects directly in the root node. The next idea was a Quad/Octree, but the objects are not quite static, and I don't know if it would make sense if you have to change the tree's organisation every second frame.&#xD;&#xA;&#xD;&#xA;So, how is this done in real games? I'm using C# with XNA, if that matters, and would like to run the game on the XBox as well." />
  <row Id="28295" PostHistoryTypeId="1" PostId="12820" RevisionGUID="b96f5710-540d-4490-b620-4d860a787e12" CreationDate="2011-05-28T07:56:52.000" UserId="6054" Text="How to efficiently organise all object in a large space" />
  <row Id="28296" PostHistoryTypeId="3" PostId="12820" RevisionGUID="b96f5710-540d-4490-b620-4d860a787e12" CreationDate="2011-05-28T07:56:52.000" UserId="6054" Text="&lt;collision-detection&gt;&lt;scene-graph&gt;&lt;octree&gt;" />
  <row Id="28297" PostHistoryTypeId="2" PostId="12821" RevisionGUID="231fe61a-7f59-42d2-af66-2455005bc42f" CreationDate="2011-05-28T08:31:14.683" UserId="1839" Text="Given the minimal information in the question, there is no general answer to that. &#xD;&#xA;&#xD;&#xA;Except this:  _Real_ games use engines that implement features as scene-graphs and proper data structures for collsion-detection and -optimizations, rendering, network, input, serializing and much more.&#xD;&#xA;&#xD;&#xA;The idea is: write a game, not an engine. &#xD;&#xA;&#xD;&#xA;[Unity3D][1] is such an engine for C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="28298" PostHistoryTypeId="2" PostId="12822" RevisionGUID="4a7cba3b-e709-412f-993d-a8d4b935d22e" CreationDate="2011-05-28T08:59:31.863" UserId="7514" Text="I know this isn't a &quot;Is this legal&quot; website, but because Marching Cubes is definitely a large subject in game development, and isn't really about a specific graphic/item, it would pass...&#xD;&#xA;&#xD;&#xA;To the point!&#xD;&#xA;&#xD;&#xA;Does anyone know whether Marching Cubes is allowed in a commercial game? If so is there anything i must do? Credit to someone/company etc?&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Randomman159" />
  <row Id="28299" PostHistoryTypeId="1" PostId="12822" RevisionGUID="4a7cba3b-e709-412f-993d-a8d4b935d22e" CreationDate="2011-05-28T08:59:31.863" UserId="7514" Text="Marching Cubes - Legalities?" />
  <row Id="28300" PostHistoryTypeId="3" PostId="12822" RevisionGUID="4a7cba3b-e709-412f-993d-a8d4b935d22e" CreationDate="2011-05-28T08:59:31.863" UserId="7514" Text="&lt;legal&gt;" />
  <row Id="28301" PostHistoryTypeId="25" PostId="12820" RevisionGUID="a88617b3-f7ea-40d4-b978-d386bf116b69" CreationDate="2011-05-28T09:13:08.280" Comment="http://twitter.com/#!/StackGameDev/status/74402813832204288" />
  <row Id="28302" PostHistoryTypeId="2" PostId="12823" RevisionGUID="2fc949d5-e6cf-4853-ad2e-d820b981f242" CreationDate="2011-05-28T09:15:07.660" UserId="1839" Text="[Wikipedia][1] says: &#xD;&#xA;&#xD;&#xA;&gt; This patent expired in 2005, and it is now legal for the graphics community to use it without royalties since more than 17 years have passed from its issue date (December 1, 1987[2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Still it's always a good idea to double-check with your lawyer.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Marching_cubes" />
  <row Id="28303" PostHistoryTypeId="5" PostId="12821" RevisionGUID="f3a6a70d-37af-4bba-b055-f36dbcb56d42" CreationDate="2011-05-28T10:36:22.597" UserId="1839" Comment="added 2 characters in body" Text="Given the minimal information in the question, there is no general answer to that. &#xD;&#xA;&#xD;&#xA;Except this:  _Real_ games use engines that implement features as scene-graphs and proper data structures for collsion-detection and -optimizations, rendering, network, input, serializing and much more.&#xD;&#xA;&#xD;&#xA;The idea is to write a game, not an engine. &#xD;&#xA;&#xD;&#xA;[Unity3D][1] is such an engine for C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="28304" PostHistoryTypeId="2" PostId="12824" RevisionGUID="cf6ab6b8-8795-475f-9ee8-e26b4a120eb6" CreationDate="2011-05-28T11:34:52.533" UserId="5473" Text="A framework provides a minimal architecture built for a specific type of application. It minimises assumptions about implementation details beyond the stated goals of the architecture. While a cross-platform game development framework might have the goal of providing &quot;what is common to (nearly) all computer games, irrespective of platform&quot;, and might implement only such abstract factors as timing and entity management, the XNA Framework (implicitly) has a goal of providing &quot;what is common to (nearly) all computer games written for execution on the XNA CLR&quot;. Given that this focus is so narrow, they have been able to included engine features with impunity. They bundle it all under the heading of &quot;Framework&quot;, since this indicates a certain freedom of implementation which you as the game developer will enjoy.&#xD;&#xA;&#xD;&#xA;Roughly speaking, a framework should be as unrestrictive as possible while still providing useful foundations. An engine, on the other hand, is typically more focused toward specific features, and in using it, you accept that there are certain limitations which you will be tied to." />
  <row Id="28305" PostHistoryTypeId="25" PostId="12822" RevisionGUID="121c8f44-13cf-4180-94fa-3464baf9b46d" CreationDate="2011-05-28T12:13:08.293" Comment="http://twitter.com/#!/StackGameDev/status/74448113825353728" />
  <row Id="28306" PostHistoryTypeId="2" PostId="12825" RevisionGUID="b77b4b1a-b472-468b-b472-fdf6e9c9b7d0" CreationDate="2011-05-28T13:33:22.793" UserId="5343" Text="I'm having some problems porting my D3D code to OpenGL ES. I have a Graphics Device class that encapsulates all rendering commands. The code below is in an ObjC++ file.&#xD;&#xA;&#xD;&#xA;The problem code is the called to get the render buffer width and height. It doesn't actually return any value in the w or h GLints.&#xD;&#xA;&#xD;&#xA;It should be noted that the code below is from an older iPhone project, and it works there. Am I missing something really stupid?&#xD;&#xA;&#xD;&#xA;Checking the framebuffer status returns a value of complete, since OpenGL ES seems quite happy to initialize a depth buffer with the garbage w and h values I pass to it!&#xD;&#xA;&#xD;&#xA;    bool GraphicsDevice::Initialize(id&lt;EAGLDrawable&gt; eaglLayer)  &#xD;&#xA;    {&#xD;&#xA;       EAGLContext *context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];&#xD;&#xA;       if(context == nil)&#xD;&#xA;       { &#xD;&#xA;          return false;&#xD;&#xA;       }&#xD;&#xA;       &#xD;&#xA;       [EAGLContext setCurrentContext:context];&#xD;&#xA;       &#xD;&#xA;       this-&gt;eaglContext = context;&#xD;&#xA;       &#xD;&#xA;       glGenFramebuffers(1, &amp;frameBuffer);&#xD;&#xA;       glBindBuffer(GL_FRAMEBUFFER, frameBuffer);&#xD;&#xA;       glGenRenderbuffers(1, &amp;renderBuffer);&#xD;&#xA;       glBindBuffer(GL_RENDERBUFFER, renderBuffer);&#xD;&#xA;       [eaglContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:eaglLayer];&#xD;&#xA;       &#xD;&#xA;       GLint w, h;&#xD;&#xA;       glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &amp;w);&#xD;&#xA;       glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &amp;h);&#xD;&#xA;       &#xD;&#xA;       SetWidth(static_cast&lt;unsigned int&gt;(w));&#xD;&#xA;       SetHeight(static_cast&lt;unsigned int&gt;(h));&#xD;&#xA;      &#xD;&#xA;      glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER,    renderBuffer);&#xD;&#xA;   &#xD;&#xA;       glGenRenderbuffers(1, &amp;depthBuffer);&#xD;&#xA;       glBindBuffer(GL_RENDERBUFFER, depthBuffer);&#xD;&#xA;       glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, w, h);&#xD;&#xA;       &#xD;&#xA;       glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthBuffer);&#xD;&#xA;   &#xD;&#xA;       GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);&#xD;&#xA;       if(status != GL_FRAMEBUFFER_COMPLETE)&#xD;&#xA;       {&#xD;&#xA;          System::Log(&quot;Framebuffer not complete&quot;);&#xD;&#xA;          return false;&#xD;&#xA;       }&#xD;&#xA;       &#xD;&#xA;       return true;&#xD;&#xA;    }" />
  <row Id="28307" PostHistoryTypeId="1" PostId="12825" RevisionGUID="b77b4b1a-b472-468b-b472-fdf6e9c9b7d0" CreationDate="2011-05-28T13:33:22.793" UserId="5343" Text="OpenGL ES Framebuffer creation problem." />
  <row Id="28308" PostHistoryTypeId="3" PostId="12825" RevisionGUID="b77b4b1a-b472-468b-b472-fdf6e9c9b7d0" CreationDate="2011-05-28T13:33:22.793" UserId="5343" Text="&lt;c++&gt;&lt;opengl-es&gt;&lt;objective-c&gt;" />
  <row Id="28309" PostHistoryTypeId="5" PostId="12822" RevisionGUID="7b80db8a-d458-4ab2-bc94-1b5ed382de4c" CreationDate="2011-05-28T13:41:30.083" UserId="2188" Comment="nitpick: removed redundant signature" Text="I know this isn't a &quot;Is this legal&quot; website, but because Marching Cubes is definitely a large subject in game development, and isn't really about a specific graphic/item, it would pass...&#xD;&#xA;&#xD;&#xA;To the point!&#xD;&#xA;&#xD;&#xA;Does anyone know whether Marching Cubes is allowed in a commercial game? If so is there anything i must do? Credit to someone/company etc?&#xD;&#xA;&#xD;&#xA;Cheers." />
  <row Id="28310" PostHistoryTypeId="24" PostId="12822" RevisionGUID="7b80db8a-d458-4ab2-bc94-1b5ed382de4c" CreationDate="2011-05-28T13:41:30.083" Comment="Proposed by 2188 approved by 189 edit id of 456" />
  <row Id="28311" PostHistoryTypeId="5" PostId="12821" RevisionGUID="0dfc6845-1d13-4e3e-8bbe-f96ced3b5e4c" CreationDate="2011-05-28T14:07:28.100" UserId="1839" Comment="deleted 5 characters in body" Text="Given the minimal information in the question, there is no general answer to that. &#xD;&#xA;&#xD;&#xA;Except:  _Real_ games use engines that implement features as scene-graphs and proper data structures for collsion-detection and -optimizations, rendering, network, input, serializing and much more.&#xD;&#xA;&#xD;&#xA;The idea is to write a game, not an engine. &#xD;&#xA;&#xD;&#xA;[Unity3D][1] is such an engine for C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="28312" PostHistoryTypeId="2" PostId="12826" RevisionGUID="0c2c4807-4022-408a-9ce5-8d5883e7a937" CreationDate="2011-05-28T14:14:28.873" UserId="6867" Text="What do you suggest would be the best algorithm for a tower-defense game? It's a 2D based tile game, where there is walls and towers blocking the way, between spawnpoints and their destination points.&#xD;&#xA;&#xD;&#xA;Constantly, as the player places a new tower to block the way, or to help shoot spawning units before they reach their destination, a new path for the affected spawnpoint's path will have to be recalculated, and the units must be re-routed to that new path.&#xD;&#xA;&#xD;&#xA;Therefore, I need performance.&#xD;&#xA;&#xD;&#xA;I tried the A* algorithm, but everytime the player places a new tower, and path has to be recalculated, the existing units who haven't gone past the tower yet, get lost, and stand still, since they were a part of the old path that has now lost its pathing information." />
  <row Id="28313" PostHistoryTypeId="1" PostId="12826" RevisionGUID="0c2c4807-4022-408a-9ce5-8d5883e7a937" CreationDate="2011-05-28T14:14:28.873" UserId="6867" Text="Best pathfinding algorithm for a tower-defense game?" />
  <row Id="28314" PostHistoryTypeId="3" PostId="12826" RevisionGUID="0c2c4807-4022-408a-9ce5-8d5883e7a937" CreationDate="2011-05-28T14:14:28.873" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;directx&gt;&lt;path-finding&gt;" />
  <row Id="28315" PostHistoryTypeId="25" PostId="12826" RevisionGUID="3db281f2-0b70-4612-ab05-2b1996b74628" CreationDate="2011-05-28T15:13:09.437" Comment="http://twitter.com/#!/StackGameDev/status/74493416255389696" />
  <row Id="28316" PostHistoryTypeId="2" PostId="12827" RevisionGUID="3ca5df0b-134b-49b0-ae72-13dc4eb8b799" CreationDate="2011-05-28T15:43:17.463" UserId="4662" Text="You need to compute a new path for each existing unit, *and* a new one for the newly-spawning units." />
  <row Id="28317" PostHistoryTypeId="2" PostId="12828" RevisionGUID="d104b0a4-e0c7-492b-99d3-3b3bd389b53a" CreationDate="2011-05-28T15:47:42.827" UserId="3689" Text="looking for super simple casual game in open source done in openGL , i need it for learning and to implement some other stuff in to it . where can i find one ?&#xD;&#xA;hu yeah in c++ ..." />
  <row Id="28318" PostHistoryTypeId="1" PostId="12828" RevisionGUID="d104b0a4-e0c7-492b-99d3-3b3bd389b53a" CreationDate="2011-05-28T15:47:42.827" UserId="3689" Text="looking for simple casual open source openGL game for implement other things" />
  <row Id="28319" PostHistoryTypeId="3" PostId="12828" RevisionGUID="d104b0a4-e0c7-492b-99d3-3b3bd389b53a" CreationDate="2011-05-28T15:47:42.827" UserId="3689" Text="&lt;opengl&gt;&lt;c++&gt;&lt;open-source&gt;" />
  <row Id="28320" PostHistoryTypeId="5" PostId="12828" RevisionGUID="484f1d32-64cb-4a25-8956-5ae9d65b72ba" CreationDate="2011-05-28T16:07:10.670" UserId="1156" Comment="deleted 10 characters in body; edited tags; edited title" Text="I am looking for a simple casual game (open source) done in openGL. I need it to learn and to implement some other stuff into it. Where can I find one?&#xD;&#xA;(I am using C++)" />
  <row Id="28321" PostHistoryTypeId="4" PostId="12828" RevisionGUID="484f1d32-64cb-4a25-8956-5ae9d65b72ba" CreationDate="2011-05-28T16:07:10.670" UserId="1156" Comment="deleted 10 characters in body; edited tags; edited title" Text="Simple, casual open source OpenGL games to implement other things in" />
  <row Id="28322" PostHistoryTypeId="6" PostId="12828" RevisionGUID="484f1d32-64cb-4a25-8956-5ae9d65b72ba" CreationDate="2011-05-28T16:07:10.670" UserId="1156" Comment="deleted 10 characters in body; edited tags; edited title" Text="&lt;opengl&gt;&lt;c++&gt;&lt;open-source&gt;&lt;casual-games&gt;" />
  <row Id="28323" PostHistoryTypeId="2" PostId="12829" RevisionGUID="4a92b09e-6361-4b8f-b034-5198ea3e4f97" CreationDate="2011-05-28T16:07:50.123" UserId="1156" Text="Check out [this question][1]. Not only C++, but you still should be able to get some ideas.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1944/very-simple-open-source-games-in-various-languages" />
  <row Id="28324" PostHistoryTypeId="2" PostId="12830" RevisionGUID="8332c457-b7ce-4e51-8fe4-7cefb24dda31" CreationDate="2011-05-28T16:09:48.410" UserId="1430" Text="I don't think reading another game's source code in isolation is going to help you learn much; there's a pretty severe lack of context in most code, so you won't know why particular programming design or implementation decisions were made. You can very easily pick up bad habits or the wrong idea.&#xD;&#xA;&#xD;&#xA;That said, a s[imilar question has been asked here before][1]. Also, here is a [list of open source games from Wikipedia][2], and [this website][3] is dedicated to open-source game development news and you might be able to find some examples there. Beyond that, it's a little difficult to provide what you've asked for since you haven't offered very many guidelines as to what you're trying to learn.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1944/very-simple-open-source-games-in-various-languages&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/List_of_open-source_video_games&#xD;&#xA;  [3]: http://freegamer.blogspot.com/" />
  <row Id="28325" PostHistoryTypeId="2" PostId="12831" RevisionGUID="9a42214b-65ad-4e60-a851-ccc5b5133278" CreationDate="2011-05-28T16:46:13.507" UserId="6867" Text="What is the fastest way to get all adjacent tiles in a two-dimensional array of tiles, converted into a single-dimensional array?&#xD;&#xA;&#xD;&#xA;If you don't know the answer, then the fastest way to do it in a two-dimensional array would be fine as well.&#xD;&#xA;&#xD;&#xA;I tried the following, but it does 9 calculations, which is 1 too much when it comes to optimization.&#xD;&#xA;&#xD;&#xA;    for(int x = -1; x &lt;= 1; x++) {&#xD;&#xA;      for(int y = -1; y &lt;= 1; y++) {&#xD;&#xA;        if(x != 0 || y != 0) {&#xD;&#xA;          Tile adjacent = Tiles[current.x + x, current.y + y];&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="28326" PostHistoryTypeId="1" PostId="12831" RevisionGUID="9a42214b-65ad-4e60-a851-ccc5b5133278" CreationDate="2011-05-28T16:46:13.507" UserId="6867" Text="Fastest way to get all adjacent tiles?" />
  <row Id="28327" PostHistoryTypeId="3" PostId="12831" RevisionGUID="9a42214b-65ad-4e60-a851-ccc5b5133278" CreationDate="2011-05-28T16:46:13.507" UserId="6867" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;performance&gt;" />
  <row Id="28328" PostHistoryTypeId="2" PostId="12832" RevisionGUID="9b4fd472-8683-4815-982e-18831bd3e41e" CreationDate="2011-05-28T16:47:49.070" UserId="7652" Text="I am looking for a starting place to develop a crossplatform OpenGL game that runs on Mac, PC and potentially Linux.  The difficulty is that I don't want to use an existing graphics library.&#xD;&#xA;&#xD;&#xA;I've done a lot of work with OpenGL in C++ for Windows.  I have never developed anything for Mac.  I plan to develop most of the Windows game and leave my project open with abstraction so that I can later implement Mac-specific code.&#xD;&#xA;&#xD;&#xA;Is there anything that works radically different in Mac and Linux than in Windows?  With Windows for example, I use DirectInput and XInput to capture controllers and keyboard, window messages to capture mouse and typing.  Where can I find some type of &quot;translation guide&quot;?  Also, do I still need to consider endianness?&#xD;&#xA;&#xD;&#xA;How can I design my project so that I can load it up in Visual Studio 2008 and easily compile it in OSX and Linux IDEs?  Since I own Visual Studio, I'd like to use that for my Windows development, rather than switch to a cross-platform IDE." />
  <row Id="28329" PostHistoryTypeId="1" PostId="12832" RevisionGUID="9b4fd472-8683-4815-982e-18831bd3e41e" CreationDate="2011-05-28T16:47:49.070" UserId="7652" Text="Getting started with cross-platform game development" />
  <row Id="28330" PostHistoryTypeId="3" PostId="12832" RevisionGUID="9b4fd472-8683-4815-982e-18831bd3e41e" CreationDate="2011-05-28T16:47:49.070" UserId="7652" Text="&lt;opengl&gt;&lt;windows&gt;&lt;cross-platform&gt;&lt;linux&gt;&lt;macos&gt;" />
  <row Id="28331" PostHistoryTypeId="2" PostId="12833" RevisionGUID="ac56d245-93d1-44df-8946-bd9417ddbb63" CreationDate="2011-05-28T17:39:50.137" UserId="6813" Text="I don't know if this worth to be an answer but as it's too long to be a comment... here are some informations that might help you.&#xD;&#xA;&#xD;&#xA;- You should take a look at this [small article][1].&lt;br&gt;&lt;br&gt;&#xD;&#xA;It enumerate 10 rules to write cross-platform C/C++ code. And one idea that particularly pushed me to change my development organization, is that it would be  more &quot;optimized&quot; (from his experience) to develop all platforms at the same time instead of porting to other platforms later.&lt;br&gt;&lt;br&gt;&#xD;&#xA;So I decided to apply this idea (among others) with my game, and despite the fact that it was a bit long to configure the 3 operating systems to make them compile my code (and to feel good using them), it's now really easy to test each new version on the 3 platforms. Al the others ideas in this article are indeed very interesting, but this one is the most important to me.&#xD;&#xA;&#xD;&#xA;- As for the endianness question, as far as I know, it depends more of the processor architecture than of the operating system: [Endianness and operating systems on architectures][2]&#xD;&#xA;&#xD;&#xA;[1]: http://www.ski-epic.com/source_code_essays/ten_rules_for_writing_cross_platform_c_source_code.html&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Endianness#Endianness_and_operating_systems_on_architectures&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28332" PostHistoryTypeId="2" PostId="12834" RevisionGUID="a94732d5-7deb-4564-ac1b-ec27ae8d0746" CreationDate="2011-05-28T17:40:14.897" UserId="7613" Text="I finally found the answer.&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/912418/unprojecting-an-on-screen-point-back-to-an-isometrically-projected-world" />
  <row Id="28333" PostHistoryTypeId="5" PostId="12833" RevisionGUID="3f9fffb2-5bcf-40f2-928b-66fb7d33bc9e" CreationDate="2011-05-28T17:46:39.777" UserId="6813" Comment="added 1 characters in body; added 1 characters in body" Text="I don't know if this worth to be an answer but as it's too long to be a comment... here are some informations that might help you.&#xD;&#xA;&#xD;&#xA;- You should take a look at this [small article][1].&lt;br&gt;&lt;br&gt;&#xD;&#xA;It enumerates 10 rules to write cross-platform C/C++ code. And one idea that particularly pushed me to change my development organization, is that it would be  more &quot;optimized&quot; (from his experience) to develop all platforms at the same time instead of porting to other platforms later.&lt;br&gt;&lt;br&gt;&#xD;&#xA;So I decided to apply this idea (among others) with my game, and despite the fact that it was a bit long to configure the 3 operating systems to make them compile my code (and to feel good using them), it's now really easy to test each new version on the 3 platforms. All the others ideas in this article are indeed very interesting, but this one is the most important to me.&#xD;&#xA;&#xD;&#xA;- As for the endianness question, as far as I know, it depends more of the processor architecture than of the operating system: [Endianness and operating systems on architectures][2]&#xD;&#xA;&#xD;&#xA;[1]: http://www.ski-epic.com/source_code_essays/ten_rules_for_writing_cross_platform_c_source_code.html&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Endianness#Endianness_and_operating_systems_on_architectures&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28334" PostHistoryTypeId="2" PostId="12835" RevisionGUID="c34c8c37-7049-4cab-ae2c-e3b3839ab01b" CreationDate="2011-05-28T17:52:54.197" UserId="7191" Text="A* should be plenty fast enough. Each time a tower is placed you should calculate a new path for each spawn point, and assign that path to each unit that is spawned there. You should also calculate a new path for the units &quot;in the field&quot;. Units in the field can have their paths calculated as the shortest path to get back on track, as in a path to the new path. Or the units can have their path calculated from their current position to the destination. &#xD;&#xA;&#xD;&#xA;You can likely save calculations by grouping units in the field and calculate a common path for them all. For example if you have a group of units in tile (4,7), they can all use the same path, so you just have to calculate it once.&#xD;&#xA;&#xD;&#xA;Additionally (depending on what your rules are) you should consider doing these calculations as a check before the tower is placed. This will disallow the player from placing towers that block all paths. Or as some tower defense games work, if the play blocks all paths, the units just ignore towers when path finding." />
  <row Id="28335" PostHistoryTypeId="2" PostId="12836" RevisionGUID="fee91048-257e-4d09-884a-a73de998dca1" CreationDate="2011-05-28T18:01:34.800" UserId="3042" Text="I'm trying to write some collision detection code.&#xD;&#xA;&#xD;&#xA;ATM i have the code properly resolving Ellipsoid v. Ellipsoid collisions, and Box v. Box collisions, but Ellipsoid v. Box collisions doesnt work.&#xD;&#xA;&#xD;&#xA;In general how do you test for interesection between these two.&#xD;&#xA;&#xD;&#xA;What i've been doing is: &#xD;&#xA;&#xD;&#xA;Finding the closest point on the ellipsoid to the box, and vice versa. &#xD;&#xA;&#xD;&#xA;    vector3 closestVertexOnBox = // Closest vertex on the box to the ellipsoid;&#xD;&#xA;    vector3 closestPointOnEllipsoid = // Closest vertex on the ellipsoid to the box&#xD;&#xA;&#xD;&#xA;In this case ( ellipsoid v. box ) you have 4 axes.&#xD;&#xA;&#xD;&#xA; - The axis from the center of the circle to the nearest point on the box.&#xD;&#xA; - The X,Y,Z standard axes ( assuming its an AABB ) -&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Put them all in an array&#xD;&#xA;&#xD;&#xA;     vector3[] axes = { normalize( closestVertexOnBox - ellipsoid.origin ), unitX, unitY, unitZ }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then for each axis in that array, Project the vector from the center of each shape, to its vertex closest to the other shape; onto each axis to find the projected half widths.&#xD;&#xA;&#xD;&#xA;    float minOverlap = infinity&#xD;&#xA;    vector3 overlapAxis;&#xD;&#xA;&#xD;&#xA;    for each axis in axes&#xD;&#xA;    {&#xD;&#xA;        float prjBoxHalfWidth = Dot ( axis , closestVertexOnBox - box.origin )&#xD;&#xA;        float prjEllipsoidHalfWidth = Dot ( axis , closestPointOnEllipsoid - ellipsoid.origin )&#xD;&#xA;&#xD;&#xA;If the sum of any of the projected half widths are smaller than the projected distance between the two, then their is no collision&#xD;&#xA;&#xD;&#xA;        float prjDistance = Dot( axis , box.origin - ellipsoid.origin )&#xD;&#xA;&#xD;&#xA;        if(prjBoxHalfWidth + prjEllipsoidHalfWidth &lt; prjDistance) return // no collision&#xD;&#xA;&#xD;&#xA;Now get the axis with the least overlap out of all of them&#xD;&#xA;&#xD;&#xA;        float overlap = prjBoxHalfWidth + prjEllipsoidHalfWidth - prjDistance&#xD;&#xA;        &#xD;&#xA;        if(overlap &lt; minOverlap) {&#xD;&#xA;        &#xD;&#xA;             minOverlap = overlap;&#xD;&#xA;             overlapAxis = axis;&#xD;&#xA;&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;Then resolve the overlap&#xD;&#xA;&#xD;&#xA;    ellipsoid.origin += overlapAxis * minOverlap/2&#xD;&#xA;    box.origin -= overlapAxis * minOverlap/2&#xD;&#xA;&#xD;&#xA;Thats pretty much my ( pseduofied ) code. If thats good, then i might have an error, but thats wrong, then what am i not taking into consideration or forgetting." />
  <row Id="28336" PostHistoryTypeId="1" PostId="12836" RevisionGUID="fee91048-257e-4d09-884a-a73de998dca1" CreationDate="2011-05-28T18:01:34.800" UserId="3042" Text="Ellipsoid v. Box collision detection" />
  <row Id="28337" PostHistoryTypeId="3" PostId="12836" RevisionGUID="fee91048-257e-4d09-884a-a73de998dca1" CreationDate="2011-05-28T18:01:34.800" UserId="3042" Text="&lt;collision-detection&gt;&lt;intersection&gt;" />
  <row Id="28338" PostHistoryTypeId="25" PostId="12832" RevisionGUID="68cc88cb-9338-47df-8977-6150e8db0024" CreationDate="2011-05-28T18:13:09.397" Comment="http://twitter.com/#!/StackGameDev/status/74538714029756416" />
  <row Id="28339" PostHistoryTypeId="2" PostId="12837" RevisionGUID="c626356a-ac7e-472b-bc29-126193fafb36" CreationDate="2011-05-28T18:14:39.053" UserId="3505" Text="Rather than calculating a path from one point to another you could calculate the movement direction for each separate tile. Start from the exit, mark each adjacent tile with a pointer to the exit, then from each of these tiles let all adjacent unmarked tiles point to that tile etc.&#xD;&#xA;&#xD;&#xA;The maths are really the same as A*, you just don't throw away any data and therefore end up with a many-to-one path.&#xD;&#xA;&#xD;&#xA;You should end up with a data-array that looks something like this, generated in linear time:&#xD;&#xA;&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    |   |   |   |   |&#xD;&#xA;    | | | X | -&gt;| e |&#xD;&#xA;    | v |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    |   |   | ^ | ^ |&#xD;&#xA;    | | | X | | | | |&#xD;&#xA;    | v |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    |   |   | ^ | ^ |&#xD;&#xA;    | -&gt;| -&gt;| | | | |&#xD;&#xA;    |   |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    | ^ | ^ |   | ^ |&#xD;&#xA;    | | | | | X | | |&#xD;&#xA;    |   |   |   |   |&#xD;&#xA;    |---|---|---|---|" />
  <row Id="28340" PostHistoryTypeId="2" PostId="12838" RevisionGUID="7f039aca-71f2-4cbe-85ac-cdc471c50204" CreationDate="2011-05-28T18:36:17.017" UserId="3015" Text="What you are proposing is pretty much the fastest; as determining wether or not you are on the same tile would probably be more costly than just doing it. Doing it 9 times.&#xD;&#xA;&#xD;&#xA;But as an alternative; consider if you will a space/time tradeoff.&#xD;&#xA;&#xD;&#xA;Instead of doing this calculations at a critical time, do them when you are reading the map into memory; storing in each tile the location of their neighbours. It requires more space in memory per tile; but it does save time when doing lookups. If you have an application-wide enum (or similar) for directions, even better; then you could do something like:&#xD;&#xA;&#xD;&#xA;    aNeighboringTile = current.neighbors[NORTH];&#xD;&#xA;&#xD;&#xA;The tradeoff can be tuned to use either cardinal neighbours only, or both cardinal and diagonal neighbours; the former being tighter and the latter being faster.&#xD;&#xA;&#xD;&#xA;A question that you seriously need to consider, of course, is wether or not this is *actually* necessary, or if your current approach in practice is fast enough.&#xD;&#xA;&#xD;&#xA;If you are *already* facing slowdowns due to the extra calculation; then it is likely that the only thing that will give any speedup is pre-calculating neighbors.&#xD;&#xA;&#xD;&#xA;**Edit:** This can of course be compined with Gajet's suggestion to use a constant array of the index deltas to search to eliminate the extra calculations during generation/loading." />
  <row Id="28343" PostHistoryTypeId="2" PostId="12840" RevisionGUID="78dd73cc-2272-4adc-8ba2-e9aa508a63ef" CreationDate="2011-05-28T19:13:18.727" UserId="7281" Text="It really depends on the type of tower defence you are developing.&#xD;&#xA;&#xD;&#xA;Case 1: If your towers can't block your runners (so you can't change the path), you can simply develop a simple region system. It is really easy to implement:&#xD;&#xA;&#xD;&#xA;Unit1 enters region1 -&gt; run to region2&#xD;&#xA;Unit1 enters region2 -&gt; go to region3&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;All you need is to position you regions in way that there is no blocking objects between two linked regions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Case 2 (Your case): Your towers can block. If its the case you will need to design a A* algorithm system. The system can be harder to implement for beginners but don't worry, there is a lot of A* pathfinding system on the web that you can reuse. You will need to recalculate the path every time something change the actual path. But don't worry, a good A* system can recalculate the path of thousand of units in a blink of an eye!" />
  <row Id="28344" PostHistoryTypeId="5" PostId="12840" RevisionGUID="d2224b24-7bcf-4ec4-9039-70d595eaa32b" CreationDate="2011-05-28T19:19:06.187" UserId="7281" Comment="added 200 characters in body" Text="It really depends on the type of tower defence you are developing.&#xD;&#xA;&#xD;&#xA;Case 1: If your towers can't block your runners (so you can't change the path), you can simply develop a simple region system. It is really easy to implement:&#xD;&#xA;&#xD;&#xA;Unit1 enters region1 -&gt; run to region2&#xD;&#xA;Unit1 enters region2 -&gt; go to region3&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;All you need is to position you regions in way that there is no blocking objects between two linked regions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Case 2 (Your case): Your towers can block. If its the case you will need to design a A* algorithm system. The system can be harder to implement for beginners but don't worry, there is a lot of A* pathfinding system on the web that you can reuse. You will need to recalculate the path every time something change the actual path. But don't worry, a good A* system can recalculate the path of thousand of units in a blink of an eye!&#xD;&#xA;&#xD;&#xA;You can mix the region system and the A* path finding for a faster results! You will only have to calculate the path to the next region and not to the endpoint so you will improve you performance." />
  <row Id="28345" PostHistoryTypeId="2" PostId="12841" RevisionGUID="def2998d-9e09-4910-b4fd-8671bbd5effe" CreationDate="2011-05-28T19:54:13.257" UserId="7656" Text="Check out [BatteryTech][1] by Battery Powered Games.  It's a library that handles all OS stuff so you just write your game code in C++ and build out for iOS, Android, Windows, Mac, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.batterypoweredgames.com/batterytech" />
  <row Id="28346" PostHistoryTypeId="16" PostId="12841" RevisionGUID="686d588c-9a9f-4fd8-ad2d-3a62f1aedf5f" CreationDate="2011-05-28T19:54:13.257" UserId="7656" />
  <row Id="28347" PostHistoryTypeId="2" PostId="12842" RevisionGUID="9c7c7bb8-2500-413c-a236-97c613bcbdf8" CreationDate="2011-05-28T19:59:03.347" UserId="7656" Text="I dove head-first into cross platform game development last year and my company ended up creating a library that we use to develop for Android, iPhone, Windows and Mac (but no linux support yet, though it is planned to be added at some point). You don't need to know any platform-specific code to develop.  You just write your game in portable C++ and let it handle the nitty gritty.&#xD;&#xA;&#xD;&#xA;Check out [BatteryTech][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.batterypoweredgames.com/batterytech" />
  <row Id="28348" PostHistoryTypeId="2" PostId="12843" RevisionGUID="2fb43bf3-4aac-4239-82f0-6ab592064c99" CreationDate="2011-05-28T20:05:33.953" UserId="7656" Text="Another good option is [BatteryTech][1].  It's a cross-platform lib that lets you develop just portable C++ game code and it handles the details of Android, iOS, Windows, Mac, UI, Sound, Networking, GL, etc.. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.batterypoweredgames.com/batterytech" />
  <row Id="28349" PostHistoryTypeId="2" PostId="12844" RevisionGUID="c7322ce2-b5e9-497d-8ef3-4f0bf92d55c1" CreationDate="2011-05-28T20:32:49.357" UserId="7077" Text="I've been developing a first person shooter/massive multiplayer online roleplaying game for my small business, and was wondering if it would be feasible to use peer-to-peer technology to communicate between players, without the use of an intermediary server (as our company does not have enough funds for a high-speed connection to run a game server on). How would such Peer-to-peer technology be best implemented in such a game? Here's a few of the options I've been considering:&#xD;&#xA;&lt;br /&gt;a) Divide the game into segments, and have each segment be played on a separate P2P &quot;mesh&quot; (currently named XRevolution)&#xD;&#xA;&lt;br /&gt;b) Have one mesh for all portions of the game, and place all of the players on a single grid&#xD;&#xA;&lt;br /&gt;c) Some other P2P solution&#xD;&#xA;&lt;br /&gt;I've already used option A (considering only one area of the game is done) on a small scale (4 computers), but am wondering how well that would scale when thousands of computers would potentially be bound to the same mesh.&#xD;&#xA;&lt;br /&gt;Here's a list of possible concerns with P2P technology&#xD;&#xA;&lt;bl&gt;&#xD;&#xA;&lt;li&gt;During penetration testing, it was identified that a client could spoof packets to lie about the state of the game to other peers, allowing people to cheat. This is identified as &quot;medium&quot; risk, as it could be prevented to a certain extent through various security routines that would be integrated within the game (such as encryption, movement prediction, double-checking state with other peers, AI, etc.)&lt;/li&gt;&#xD;&#xA;&lt;li&gt;Lag was originally a problem on slower networks, but now movement prediction and other techniques are used to reduce the effect of lag, and disconnect peers whose lag is too high. However, a problem which remains is the amount of time it would take on a larger-scale network to find peers (other players), and establish connections. Due to the amount of time it would take to connect to so many peers, solution A would seem optimal to solve this particular problem&lt;/li&gt;&#xD;&#xA;&lt;li&gt;A problem with solution A, would be in-game chat between meshes (as no two peers in different meshes can communicate with each other, except for the purpose of relaying), however, this problem could be potentially solved by using something in-between solutions A and B (such as creating a separate mesh for inter-mesh communication, which would be specific to each player or something)&lt;/li&gt;&#xD;&#xA;&lt;br /&gt;What's the best way to do something like this? Solution A, or B, something in-between the two, or an entirely different solution altogether. Due to our budget, using a server to facilitate communication between players is completely out of the question, so it would be nice to use a P2P solution, otherwise the project would have to be abandoned.&#xD;&#xA;&lt;/bl&gt;" />
  <row Id="28350" PostHistoryTypeId="1" PostId="12844" RevisionGUID="c7322ce2-b5e9-497d-8ef3-4f0bf92d55c1" CreationDate="2011-05-28T20:32:49.357" UserId="7077" Text="Peer-to-peer first person shooter" />
  <row Id="28351" PostHistoryTypeId="3" PostId="12844" RevisionGUID="c7322ce2-b5e9-497d-8ef3-4f0bf92d55c1" CreationDate="2011-05-28T20:32:49.357" UserId="7077" Text="&lt;opengl&gt;&lt;network&gt;&lt;security&gt;&lt;peer-to-peer&gt;" />
  <row Id="28352" PostHistoryTypeId="2" PostId="12845" RevisionGUID="258961ed-3bd1-41ea-bd67-ebea3b0d03ab" CreationDate="2011-05-28T20:43:41.843" UserId="4662" Text="One of the major problems about peer-to-peer is connectivity. I mean, really- a *lot* of customers just won't be able to connect to each other. Symmetric NAT, firewalls, and all this kind of thing is something that your customer will *not* want to deal with, the average customer just *can't*. Lag is also going to be an incredible problem as the number of players speeds up, and you're going to significantly increase your minimum hardware requirements as every player is running a server, effectively.&#xD;&#xA;&#xD;&#xA;I would say, fundamentally, there's a reason that most FPS games are hosted on servers, and it's client-server works far better. If you can't afford to host your own servers, then get the users to host them- but don't go for BitTorrent-style mass peer-to-peer. That just won't work.&#xD;&#xA;&#xD;&#xA;Develop as a client/server architecture, allow players to host both dedicated and non-dedicated, is the best way you can go. Most FPS games don't have significant server quantities provided by the developer themselves- it's nearly all third party servers. If you can't afford to host even a few servers for yourself, then it's time to seriously re-consider if you have genuinely considered the budgetary requirements for developing a first-person shooter." />
  <row Id="28353" PostHistoryTypeId="5" PostId="12845" RevisionGUID="f183e048-a1ee-4b7e-9174-e079c71c2135" CreationDate="2011-05-28T20:49:08.953" UserId="4662" Comment="added 254 characters in body; added 56 characters in body" Text="One of the major problems about peer-to-peer is connectivity. I mean, really- a *lot* of customers just won't be able to connect to each other. Symmetric NAT, firewalls, and all this kind of thing is something that your customer will *not* want to deal with, the average customer just *can't*. Lag is also going to be an incredible problem as the number of players speeds up, and you're going to significantly increase your minimum hardware requirements as every player is running a server, effectively.&#xD;&#xA;&#xD;&#xA;I would say, fundamentally, there's a reason that most FPS games are hosted on servers, and it's client-server works far better. If you can't afford to host your own servers, then get the users to host them- but don't go for BitTorrent-style mass peer-to-peer. That just won't work.&#xD;&#xA;&#xD;&#xA;Develop as a client/server architecture, allow players to host both dedicated and non-dedicated, is the best way you can go. Most FPS games don't have significant server quantities provided by the developer themselves- it's nearly all third party servers. If you can't afford to host even a few servers for yourself, then it's time to seriously re-consider if you have genuinely considered the budgetary requirements for developing a first-person shooter.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Ok, so hang on, let me get this straight. You can't afford to host a server for yourself, but you still want to have centralized server worlds, a'la an MMORPG. User hardware and user software configurations are not up to that kind of strain. I think that what you want is fundamentally impossible." />
  <row Id="28354" PostHistoryTypeId="25" PostId="12844" RevisionGUID="cefb61a9-5707-4bd4-b0f1-8fb0ef470bd2" CreationDate="2011-05-28T21:13:09.377" Comment="http://twitter.com/#!/StackGameDev/status/74584013179858944" />
  <row Id="28355" PostHistoryTypeId="2" PostId="12846" RevisionGUID="d1fa9202-9278-4a8c-b773-3107ffb4ab46" CreationDate="2011-05-28T21:15:42.280" UserId="7657" Text="Where's a good place to post to find a decent game artist to create a small number of 32-bit sprites? This is for an internal code war framework so it's minimal work - maybe a couple of hours. &#xD;&#xA;&#xD;&#xA;Any suggestions where I should post to find someone to do this?&#xD;&#xA; " />
  <row Id="28356" PostHistoryTypeId="1" PostId="12846" RevisionGUID="d1fa9202-9278-4a8c-b773-3107ffb4ab46" CreationDate="2011-05-28T21:15:42.280" UserId="7657" Text="Where can I go to find a game graphic artist?" />
  <row Id="28357" PostHistoryTypeId="3" PostId="12846" RevisionGUID="d1fa9202-9278-4a8c-b773-3107ffb4ab46" CreationDate="2011-05-28T21:15:42.280" UserId="7657" Text="&lt;sprites&gt;" />
  <row Id="28358" PostHistoryTypeId="2" PostId="12847" RevisionGUID="fa35b900-9028-4d10-8987-fa85b70f5bd8" CreationDate="2011-05-28T21:18:54.537" UserId="102" Text="One idea, borrowed from distributed communication models, is to use a gossip-like approach. [Gossip protocols][3] are mostly concerned with scalability and reliability. The nice thing, however, is that they all use a very low bandwidth, which is crucial for P2P systems. The cost is latency, but read on, it might be solvable.&#xD;&#xA;&#xD;&#xA;The main idea of gossip protocols is that each client sends a message to a small number of peers - let's say log(n) - and whenever a client receives a message it sends it against to log(n) peers. This creates redundancy (a client can receive a message more than once) which is good for reliability but bad for you - but on the other hand, this can lead to very fast broadcasts.&#xD;&#xA;&#xD;&#xA;The question is, *how* to choose those log(n) clients in a way that will&#xD;&#xA;&#xD;&#xA;1. Guarantee all clients will eventually get the message in X time.&#xD;&#xA;2. Minimize the travel time of messages between two clients *that are close to each other in the game world*.&#xD;&#xA;&#xD;&#xA;Point (2) above is - in my opinion - the key here. As long as not all peers can affect each other immediately in the game world, having high latency between them is less of an issue. A FPS in a small arena is a poor candidate here, but a massively-multiplayer online game is a great candidate.&#xD;&#xA;&#xD;&#xA;So, how do you choose which peers will be connected to which? What you want is to build a [small world network][1] (also called small world graph). You can find some algorithms used to create it (see [Harari Graph][2]), as well as algorithms that will allow you to change it on-the-fly according to user data (I recall something involving darknet which can change links according to location). I wouldn't just use a plain Harari Graph - instead, you're probably better off with a variation that takes super nodes into consideration, I'm just not familiar with any.&#xD;&#xA;&#xD;&#xA;I think using these kinds of protocols is a better approach than the less-scalable (and more discrete - what happens in edge boundaries?) local mesh concept.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Small-world_network&#xD;&#xA;[2]:http://mathworld.wolfram.com/HararyGraph.html&#xD;&#xA;[3]:http://en.wikipedia.org/wiki/Gossip_protocol" />
  <row Id="28359" PostHistoryTypeId="5" PostId="12837" RevisionGUID="206d17f7-7b86-42b6-b7c2-7d445c197919" CreationDate="2011-05-28T21:31:48.867" UserId="3505" Comment="added 738 characters in body" Text="###Answer:###&#xD;&#xA;Rather than calculating a path from one point to another you could calculate the movement direction for each separate tile. Start from the exit, mark each adjacent tile with a pointer to the exit, then from each of these tiles let all adjacent unmarked tiles point to that tile etc.&#xD;&#xA;&#xD;&#xA;The maths are really the same as Dijkstra's algorithm (A* without distance optimization), you just don't throw away any data and therefore end up with a many-to-one path.&#xD;&#xA;&#xD;&#xA;You should end up with a data-array that looks something like this, generated in linear time:&#xD;&#xA;&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    |   |   |   |   |&#xD;&#xA;    | | | X | -&gt;| e |&#xD;&#xA;    | v |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    |   |   | ^ | ^ |&#xD;&#xA;    | | | X | | | | |&#xD;&#xA;    | v |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    |   |   | ^ | ^ |&#xD;&#xA;    | -&gt;| -&gt;| | | | |&#xD;&#xA;    |   |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;    | ^ | ^ |   | ^ |&#xD;&#xA;    | | | | | X | | |&#xD;&#xA;    |   |   |   |   |&#xD;&#xA;    |---|---|---|---|&#xD;&#xA;&#xD;&#xA;###Somewhat related random ramblings:###&#xD;&#xA;Regarding point-to-point pathfinding it's worth noting that A* lose a lot of it's advantage to the simpler Dijkstra algorithm when operating in a twisted maze. A* will probably still search fewer nodes, but it is also slower per node than Dijkstra.&#xD;&#xA;&#xD;&#xA;For the typical tower defence maze, entry and exit points are placed at the edge of the field, this means that Dijkstra won't as otherwise waste time by searching a big field in the wrong direction. In conjunction with the maze this means that Dijkstra and A* will search almost the same number of nodes, thus Dijkstra takes the win in this case for being faster per node." />
  <row Id="28360" PostHistoryTypeId="2" PostId="12848" RevisionGUID="44c9b31e-af86-4a0d-aff1-9f9842c7e4ba" CreationDate="2011-05-28T22:46:52.400" UserId="7546" Text="I am writing a 2D game engine for fun. I am able to perform animation using the engine. However, if I change the frame rate (frames per second) the speed of the animation changes.&#xD;&#xA;&#xD;&#xA;I have never used any game engine. I want to know whether other game engines handle this issue or not. If not, what is the ideal frame rate for a 2D game?" />
  <row Id="28361" PostHistoryTypeId="1" PostId="12848" RevisionGUID="44c9b31e-af86-4a0d-aff1-9f9842c7e4ba" CreationDate="2011-05-28T22:46:52.400" UserId="7546" Text="Should frame rate affect the speed in a game engine?" />
  <row Id="28362" PostHistoryTypeId="3" PostId="12848" RevisionGUID="44c9b31e-af86-4a0d-aff1-9f9842c7e4ba" CreationDate="2011-05-28T22:46:52.400" UserId="7546" Text="&lt;frame-rate&gt;" />
  <row Id="28364" PostHistoryTypeId="2" PostId="12850" RevisionGUID="bd4fb1d6-a278-44c1-a98e-b1ca4b75053f" CreationDate="2011-05-28T22:54:48.003" UserId="1929" Text="This is a frequent problem that game developers encounter that's hard to surmount. Unless you can get someone on-board full-time for free (like a partner on your development team), I would really recommend learning how to create basic artwork yourself.&#xD;&#xA;&#xD;&#xA;With tutorials and basic stuff available on the internet (sprites, textures, icons, etc.) you can quickly learn to create polished *technical* art -- not the most beautiful, but good enough to launch.&#xD;&#xA;&#xD;&#xA;I also personally find that Flash is a great tool for creating (vector) art assets. It has a simple but sufficiently diverse toolset to allow you to create good technical art. (Technical means not necessarily creative or polished or stylistic; but technically clean.)" />
  <row Id="28365" PostHistoryTypeId="2" PostId="12851" RevisionGUID="0eaf06dd-65fa-4ad5-8933-a36d9c6d2911" CreationDate="2011-05-28T23:10:34.013" UserId="6813" Text="The answer depends on your intention to pay or not to pay for this work, but whatever is the answer you can try on &quot;art &amp; design&quot; forums such as:&#xD;&#xA;&#xD;&#xA;- [CGsociety][3] ( [paid][4] | [unpaid][5] )&#xD;&#xA;- [DeviantArt][0] ( [paid][1] | [unpaid][2] )&#xD;&#xA;- etc.&#xD;&#xA;&#xD;&#xA;[0]: http://www.deviantart.com&#xD;&#xA;[1]: http://forum.deviantart.com/jobs/offers/&#xD;&#xA;[2]: http://forum.deviantart.com/community/projects/&#xD;&#xA;&#xD;&#xA;[3]: http://www.cgsociety.org&#xD;&#xA;[4]: http://forums.cgsociety.org/forumdisplay.php?f=319&#xD;&#xA;[5]: http://forums.cgsociety.org/forumdisplay.php?f=73&#xD;&#xA;&#xD;&#xA;or &quot;game creation&quot; forums:&#xD;&#xA;&#xD;&#xA;- [indiegamer][10] ( [paid][11] )&#xD;&#xA;- [devmaster][12] ( [paid][13] )&#xD;&#xA;- etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[10]: http://forums.indiegamer.com&#xD;&#xA;[11]: http://forums.indiegamer.com/forumdisplay.php?15-Help-Wanted&amp;s=62b4f7ed342add66929e719ae3b5d6df&#xD;&#xA;&#xD;&#xA;[12]: http://www.devmaster.net&#xD;&#xA;[13]: http://www.devmaster.net/forums/forumdisplay.php?f=43&#xD;&#xA;&#xD;&#xA;Finally you can ask on &quot;pixel art&quot; forums:&#xD;&#xA;&#xD;&#xA;- [pixeljoint][20] ( [paid &amp; unpaid][21] )&#xD;&#xA;- [wayofthepixel][22] ( [paid][23] | [unpaid][24] )&#xD;&#xA;- etc.&#xD;&#xA;&#xD;&#xA;[22]: http://www.wayofthepixel.net&#xD;&#xA;[23]: http://www.wayofthepixel.net/pixelation/index.php?board=6.0&#xD;&#xA;[24]: http://www.wayofthepixel.net/pixelation/index.php?board=14.0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[20]: http://www.pixeljoint.com&#xD;&#xA;[21]: http://www.pixeljoint.com/forum/forum_topics.asp?FID=11&#xD;&#xA;&#xD;&#xA;However, it's indeed harder to find people ready to work for free (not impossible trough) and if you can't afford for this kind of small help you can also consider to make it yourself as ashes999 suggested.&#xD;&#xA;" />
  <row Id="28366" PostHistoryTypeId="5" PostId="12831" RevisionGUID="8c587ba7-01da-4b74-bc4b-34457dd7032c" CreationDate="2011-05-28T23:14:46.473" UserId="6867" Comment="edited body" Text="What is the fastest way to get all adjacent tiles in a two-dimensional array of tiles, converted into a single-dimensional array?&#xD;&#xA;&#xD;&#xA;If you don't know the answer, then the fastest way to do it in a two-dimensional array would be fine as well.&#xD;&#xA;&#xD;&#xA;I tried the following, but it does 9 calculations, which is 1 too much when it comes to optimization.&#xD;&#xA;&#xD;&#xA;    for(int x = -1; x &lt;= 1; x++) {&#xD;&#xA;      for(int y = -1; y &lt;= 1; y++) {&#xD;&#xA;        if(x != 0 &amp;&amp; y != 0) {&#xD;&#xA;          Tile adjacent = Tiles[current.x + x, current.y + y];&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="28367" PostHistoryTypeId="2" PostId="12852" RevisionGUID="5f72ad2b-d918-448f-b27e-5d2eed67c82d" CreationDate="2011-05-28T23:48:33.140" UserId="2698" Text="No, frame rate should not affect the speed - the gameplay will hinge entirely on their video performance, which is disastrous (even if you limit the speed, you can't control people whose systems will run the game at half speed).&#xD;&#xA;&#xD;&#xA;You're experiencing this problem because you did something wrong: Your update/render routines run one after the other as fast as possible, with objects updating on a per-call basis (thus when the call speed deviates, so does theirs).&#xD;&#xA;&#xD;&#xA;### A time-based approach&#xD;&#xA;&#xD;&#xA;The correct way to do this is to update objects on a _per-second_ basis.&#xD;&#xA;&#xD;&#xA;Somewhere in your engine you should keep track of your game time* - the number of milliseconds since the game began. You store this _before_ you update all objects, then all objects use that game time as a frame of reference for the point they should update to, so that all objects can update to exactly the same millisecond and keep in synch.&#xD;&#xA;&#xD;&#xA;As for how your objects should update/draw, consider a bullet for instance: Right now it probably knows how much it needs to move per frame. You need to turn this into how much it moves _per second_. In each update call it checks the time since it last updated: this is called the _delta time_, normally `dt` for short. Let's say the dt is 16 milliseconds, which is about average for 60fps: if the bullet moves 12 metres per second, you move it `(16.0/1000.0) * 12.0` metres in this update.&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;* Look to the core libraries offered by your language to get this. If you're using C#, for instance, `System.Environment.TickCount` will return the milliseconds since the application began.&lt;/sup&gt;" />
  <row Id="28368" PostHistoryTypeId="2" PostId="12853" RevisionGUID="765c62a7-7a39-4691-bd23-321fe0e35ac5" CreationDate="2011-05-28T23:50:54.913" UserId="7453" Text="No it should not. One type of timing you can do in your game is frame-based timing. The idea is to let the game loop run as fast as your computer can run it thereby having the bast overall experience and you control the rate at which your simulation runs. Now you've decoupled your updating from rendering and have precise control over it.&#xD;&#xA;&#xD;&#xA;In this scenario, your game loop can be running at say 60 fps on one machine and maybe 45 or something different on another, but your simulation will always run at the precise specified rate between them.&#xD;&#xA;&#xD;&#xA;You game now is divided into two section, one to render your graphics and the other to updating your simulation. You set your desired simulation rate at game start and at the top of your game loop, you get the elapsed time. Note, this elapsed time is a time quantity based on your desired simulation rate. This value is then used as a multiplier against your game objects to keep them moving at/or very close to your desired simulation rate. For example, if you want your simulation to update at 30 fps and your game loop is currently running at 60 fps, the elapsed time value for this frame will be 0.5. When you multiply this by the speed of your moving objects it will cause them to move at 30 fps. Know that from frame to frame your game loop speed will vary greatly and frame base timing can keep your simulation running at a known and predictable rate.&#xD;&#xA;&#xD;&#xA;The result is silky smooth animation." />
  <row Id="28369" PostHistoryTypeId="25" PostId="12846" RevisionGUID="246a9580-28f4-441d-a20d-62ef51a178b9" CreationDate="2011-05-29T00:13:10.630" Comment="http://twitter.com/#!/StackGameDev/status/74629316884967424" />
  <row Id="28370" PostHistoryTypeId="2" PostId="12854" RevisionGUID="17675d56-9ad8-4c85-a17f-cdb6f0237c5d" CreationDate="2011-05-29T01:31:19.437" UserId="7640" Text="alright i figured it out: i was &quot;**colliding with myself**&quot; as the check collision function saw my character sprite in the location it was checking, even if it was still in the wall... This happened in-between the map scrolling and changes." />
  <row Id="28371" PostHistoryTypeId="2" PostId="12855" RevisionGUID="c7983e10-14a7-44f4-bb37-d48ddff4135c" CreationDate="2011-05-29T01:51:11.583" UserId="6867" Text="In XNA I am building my own textbox, and listbox.&#xD;&#xA;&#xD;&#xA;For the textbox, I want it to render all text it can, and then cut off at the end of the textbox. But I don't want it to cut whole letters. I want it to cut exactly where the pixel limit is, so that if I write &quot;SPAAAAAAAACE&quot;, and the size is 50 for instance, then it will only render &quot;SPAAAA&quot; and then a half A, or whatever is remaining in the pixels.&#xD;&#xA;&#xD;&#xA;For my listbox, it's kind of the same thing. If I am scrolled half down, one element needs to be only half-visible.&#xD;&#xA;&#xD;&#xA;How can I do this? Is it possible to add something to a buffer, and then before drawing it, clearing a specific rectangle from the buffer again?" />
  <row Id="28372" PostHistoryTypeId="1" PostId="12855" RevisionGUID="c7983e10-14a7-44f4-bb37-d48ddff4135c" CreationDate="2011-05-29T01:51:11.583" UserId="6867" Text="Render only some of graphics?" />
  <row Id="28373" PostHistoryTypeId="3" PostId="12855" RevisionGUID="c7983e10-14a7-44f4-bb37-d48ddff4135c" CreationDate="2011-05-29T01:51:11.583" UserId="6867" Text="&lt;xna&gt;&lt;directx&gt;&lt;xna-4.0&gt;" />
  <row Id="28374" PostHistoryTypeId="2" PostId="12856" RevisionGUID="e3f6becc-3d9f-44e0-b849-40f3dd49f4f8" CreationDate="2011-05-29T02:16:51.573" UserId="288" Text="Set your `GraphicsDevice.Viewport` or `GraphicsDevice.ScissorRectangle` so that you are only drawing over the top of your text area. You must be outside of a sprite-batch when you do this (ie: between end and begin). Remember to set it back when you're done.&#xD;&#xA;&#xD;&#xA;Remember that `SpriteBatch`'s drawing area covers the viewport (so (0,0) is the top-left of the viewport)." />
  <row Id="28375" PostHistoryTypeId="2" PostId="12857" RevisionGUID="f418b9da-1943-478b-b6ad-1fd35a2f7b67" CreationDate="2011-05-29T02:17:25.997" UserId="3547" Text="You could use a scissor rectangle. It's a property on the GraphicsDevice class that you can set. Scissor testing must also be enabled.&#xD;&#xA;&#xD;&#xA;The scissor rectangle only allows draws in a certain area (a rectangle). This would cut off the pixels, not the letters, of the text you are trying to draw. There are other ways to do this, but you might find this to be the easiest." />
  <row Id="28376" PostHistoryTypeId="25" PostId="12848" RevisionGUID="b567d206-23c2-4550-a9fb-ddb7a7a0a9de" CreationDate="2011-05-29T03:13:11.557" Comment="http://twitter.com/#!/StackGameDev/status/74674618505494528" />
  <row Id="28377" PostHistoryTypeId="2" PostId="12858" RevisionGUID="ea3bd32a-cbf6-4e0b-945a-c7857f178b38" CreationDate="2011-05-29T04:06:25.507" UserId="284" Text="When making an npc combatant, it's &lt;strike&gt;easy&lt;/strike&gt; _obvious what to do to_ get a robot deathmachine by optimizing combat tactics, timing and attack types, but harder (and more interesting in a fight fight) to get an idiosyncratic, inpredictable enemy.  What behaviors (algorithms?) are useful for creating a more organic, unconventional enemy?" />
  <row Id="28378" PostHistoryTypeId="1" PostId="12858" RevisionGUID="ea3bd32a-cbf6-4e0b-945a-c7857f178b38" CreationDate="2011-05-29T04:06:25.507" UserId="284" Text="What behaviors should go into making a &quot;non-perfect&quot; AI combatant?" />
  <row Id="28379" PostHistoryTypeId="3" PostId="12858" RevisionGUID="ea3bd32a-cbf6-4e0b-945a-c7857f178b38" CreationDate="2011-05-29T04:06:25.507" UserId="284" Text="&lt;ai&gt;&lt;npc&gt;&lt;combat&gt;" />
  <row Id="28380" PostHistoryTypeId="2" PostId="12859" RevisionGUID="408ce0e5-76d3-4d68-807b-54ee6738e079" CreationDate="2011-05-29T04:58:49.540" UserId="7662" Text="Ive been working on a tile based game with a 2d array as fundamental ground for my tiles. Now my next step is to have the wall tiles be impenetrable, so that the player can walk ontop of them and collide against their sides/bottom.&#xD;&#xA;&#xD;&#xA;So as this is loosely based on tonyPa tutorial, it uses the corners of the player character (top-left, top-right, bottom-left, bottom-right corners) to check if any corner hits a wall (walls are assigned as &quot;1&quot; in the 2d array). When a corner touches a tile that is recognized as &quot;1&quot; (wall), I want to check from what side the player is hitting, and then move the player next to the tiles side, to simulate a collision.&#xD;&#xA;&#xD;&#xA;Now what I've noticed is, it's easy to check if any corner is touching a wall, but its harder to determine which side the corner is hitting. Because of this, my current code is not simulating a satisfying collision detection. As my hero walks on the ground, he randomly stops because the bottom corners not only touch the top of the tiles, but also the sides it seems.&#xD;&#xA;&#xD;&#xA;Here is the code (all collision code is within &quot;collisioCheck&quot; function)&#xD;&#xA;&#xD;&#xA;    private function onKEYDOWN(event:KeyboardEvent):void{&#xD;&#xA;			var pressedKey = event.keyCode;&#xD;&#xA;			&#xD;&#xA;			if(pressedKey == Keyboard.RIGHT){&#xD;&#xA;				rightKey = true;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(pressedKey == Keyboard.LEFT){&#xD;&#xA;				leftKey = true;&#xD;&#xA;			}&#xD;&#xA;			if(pressedKey == Keyboard.Z){&#xD;&#xA;				runKey = true;&#xD;&#xA;			}&#xD;&#xA;			if(pressedKey == Keyboard.X){&#xD;&#xA;				jumpKey = true;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function onKEYUP(event:KeyboardEvent):void{&#xD;&#xA;			var releasedKey = event.keyCode;&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.RIGHT){&#xD;&#xA;				rightKey = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.LEFT){&#xD;&#xA;				leftKey = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.X){&#xD;&#xA;				jumpKey = false;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		private function collisionCheck():void{&#xD;&#xA;			&#xD;&#xA;			top = Math.floor(theHero.y / ts);&#xD;&#xA;			bottom = Math.floor((theHero.y + theHero.height) / ts);&#xD;&#xA;			left = Math.floor(theHero.x / ts);&#xD;&#xA;			right = Math.floor((theHero.x + theHero.width) / ts);&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			if(vy &gt; 0){&#xD;&#xA;				if(curMap[bottom][left] != 0 || curMap[bottom][right] != 0){&#xD;&#xA;					theHero.y = ((bottom - 1) * ts) +1.8 ; // 1.8 so it doesnt touch the ground...&#xD;&#xA;					gravity = 0;&#xD;&#xA;					vy = 0;&#xD;&#xA;					onGround = true;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vy &lt; 0){&#xD;&#xA;				if(curMap[top][left] != 0 || curMap[top][right] != 0){&#xD;&#xA;					theHero.y = (top + 1) * ts;&#xD;&#xA;					gravity = 3;&#xD;&#xA;					vy = 0;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			if(vx &lt; 0){&#xD;&#xA;				if(curMap[top][left] != 0 || curMap[bottom][left] != 0){&#xD;&#xA;					theHero.x = (left + 1) * ts;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vx &gt; 0){&#xD;&#xA;				if(curMap[top][right] != 0 || curMap[bottom][right] != 0){&#xD;&#xA;					theHero.x = ((right - 1) * ts )+ 2; // + 2 because hero width is 14 and tile size is 16, if we just stepped back tile size we get a gap&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		private function moveChar():void{&#xD;&#xA;			&#xD;&#xA;			if(rightKey){&#xD;&#xA;				&#xD;&#xA;				vx = 6;&#xD;&#xA;			}&#xD;&#xA;			if(leftKey){&#xD;&#xA;				vx = -6;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(!leftKey &amp;&amp; !rightKey &amp;&amp; onGround){&#xD;&#xA;				vx = 0;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(jumpKey){&#xD;&#xA;				vy = -10;&#xD;&#xA;				gravity = 3;&#xD;&#xA;				onGround = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			vy += gravity;&#xD;&#xA;&#xD;&#xA;			if(vy &gt; 14){&#xD;&#xA;				vy = 14;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function onENTERFRAME(event:Event):void{&#xD;&#xA;			&#xD;&#xA;			moveChar();&#xD;&#xA;&#xD;&#xA;			theHero.y += vy;&#xD;&#xA;			theHero.x += vx;&#xD;&#xA;&#xD;&#xA;			collisionCheck();&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is by far not the smartest way to check collisons, but I think it might work well enough. I just need someone to throw me in the right direction for making a solid collision detection engine for a simple tile based game.&#xD;&#xA;" />
  <row Id="28381" PostHistoryTypeId="1" PostId="12859" RevisionGUID="408ce0e5-76d3-4d68-807b-54ee6738e079" CreationDate="2011-05-29T04:58:49.540" UserId="7662" Text="[AS3] Collision Detection for sidescrolling Tile based Game" />
  <row Id="28382" PostHistoryTypeId="3" PostId="12859" RevisionGUID="408ce0e5-76d3-4d68-807b-54ee6738e079" CreationDate="2011-05-29T04:58:49.540" UserId="7662" Text="&lt;collision-detection&gt;&lt;actionscript-3&gt;&lt;tiles&gt;" />
  <row Id="28383" PostHistoryTypeId="2" PostId="12860" RevisionGUID="56567e53-2abe-4e8e-b4ac-0183e2b8523c" CreationDate="2011-05-29T05:19:19.333" UserId="1588" Text="If you wish to pay an artist to create custom sprites try:&#xD;&#xA;&#xD;&#xA; - http://pixeljoint.com&#xD;&#xA;&#xD;&#xA; - http://www.wayofthepixel.net/pixelation/index.php&#xD;&#xA;&#xD;&#xA;Alternatively, for internal work that will not be demoed in public you could just use **sprite sheets** that are floating around on the net as a temporary solution." />
  <row Id="28384" PostHistoryTypeId="2" PostId="12861" RevisionGUID="8133cb2a-02e0-4aea-9924-2a4ff241f16c" CreationDate="2011-05-29T05:27:40.400" UserId="163" Text="The key concept is to avoid giving the NPC &quot;perfect knowledge&quot;.&#xD;&#xA;&#xD;&#xA; - Randomized margin of error on any decisions or actions that involve a calculation. obvious example being aiming (ie. stormtrooper snipers). If they don't always hit you, it's more realistic.&#xD;&#xA; - Line of Sight ... if they can't see you, it can make an interesting game of cat and mouse.&#xD;&#xA; - Team tactics, depending on your type of game, enemies that adapt to the situation can be way more interesting. For example, if you're getting shot at, you wouldn't charge in blindly, you'd take cover until incoming fire lets up. Or perhaps you would feel more comfortable with rushing in if you've got team-mates nearby ... you can simulate those behaviors to make the NPCs behave as if they were alive.&#xD;&#xA;&#xD;&#xA;I'm sure there's a ton more examples that will be given, maybe you could tell us about your game and we can get more specific :-)" />
  <row Id="28385" PostHistoryTypeId="25" PostId="12858" RevisionGUID="605065ae-b2aa-491f-9c8b-199b98090006" CreationDate="2011-05-29T06:13:12.367" Comment="http://twitter.com/#!/StackGameDev/status/74719921833115648" />
  <row Id="28386" PostHistoryTypeId="2" PostId="12862" RevisionGUID="83e80432-a9d0-4e19-8b6f-b28a336c7c9c" CreationDate="2011-05-29T06:26:33.000" UserId="5902" Text="You could use [HI/LO algorithm](http://stackoverflow.com/questions/282099/whats-the-hi-lo-algorithm) with database sequences. Obtain sequence value, multiply by N and keep internal counter running from 0 to N-1 and add it to multiplied value. When the counter hits N, you get a new value from database sequence. The you'll hit the database only at every Nth ID. Of course this will not help if your database goes down for too long time." />
  <row Id="28387" PostHistoryTypeId="5" PostId="12859" RevisionGUID="f8a24613-ed54-4ae7-b1c9-d2936d9e44b9" CreationDate="2011-05-29T07:46:32.723" UserId="20" Comment="removed tag from title, minor changes" Text="I've been working on a tile based game with a 2d array as fundamental ground for my tiles. Now my next step is to have the wall tiles be impenetrable, so that the player can walk ontop of them and collide against their sides/bottom.&#xD;&#xA;&#xD;&#xA;So as this is loosely based on tonyPa tutorial, it uses the corners of the player character (top-left, top-right, bottom-left, bottom-right corners) to check if any corner hits a wall (walls are assigned as &quot;1&quot; in the 2d array). When a corner touches a tile that is recognized as &quot;1&quot; (wall), I want to check from what side the player is hitting, and then move the player next to the tiles side, to simulate a collision.&#xD;&#xA;&#xD;&#xA;Now what I've noticed is, it's easy to check if any corner is touching a wall, but its harder to determine which side the corner is hitting. Because of this, my current code is not simulating a satisfying collision detection. As my hero walks on the ground, he randomly stops because the bottom corners not only touch the top of the tiles, but also the sides it seems.&#xD;&#xA;&#xD;&#xA;Here is the code (all collision code is within &quot;collisioCheck&quot; function)&#xD;&#xA;&#xD;&#xA;    private function onKEYDOWN(event:KeyboardEvent):void{&#xD;&#xA;			var pressedKey = event.keyCode;&#xD;&#xA;			&#xD;&#xA;			if(pressedKey == Keyboard.RIGHT){&#xD;&#xA;				rightKey = true;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(pressedKey == Keyboard.LEFT){&#xD;&#xA;				leftKey = true;&#xD;&#xA;			}&#xD;&#xA;			if(pressedKey == Keyboard.Z){&#xD;&#xA;				runKey = true;&#xD;&#xA;			}&#xD;&#xA;			if(pressedKey == Keyboard.X){&#xD;&#xA;				jumpKey = true;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function onKEYUP(event:KeyboardEvent):void{&#xD;&#xA;			var releasedKey = event.keyCode;&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.RIGHT){&#xD;&#xA;				rightKey = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.LEFT){&#xD;&#xA;				leftKey = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.X){&#xD;&#xA;				jumpKey = false;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		private function collisionCheck():void{&#xD;&#xA;			&#xD;&#xA;			top = Math.floor(theHero.y / ts);&#xD;&#xA;			bottom = Math.floor((theHero.y + theHero.height) / ts);&#xD;&#xA;			left = Math.floor(theHero.x / ts);&#xD;&#xA;			right = Math.floor((theHero.x + theHero.width) / ts);&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			if(vy &gt; 0){&#xD;&#xA;				if(curMap[bottom][left] != 0 || curMap[bottom][right] != 0){&#xD;&#xA;					theHero.y = ((bottom - 1) * ts) +1.8 ; // 1.8 so it doesnt touch the ground...&#xD;&#xA;					gravity = 0;&#xD;&#xA;					vy = 0;&#xD;&#xA;					onGround = true;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vy &lt; 0){&#xD;&#xA;				if(curMap[top][left] != 0 || curMap[top][right] != 0){&#xD;&#xA;					theHero.y = (top + 1) * ts;&#xD;&#xA;					gravity = 3;&#xD;&#xA;					vy = 0;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			if(vx &lt; 0){&#xD;&#xA;				if(curMap[top][left] != 0 || curMap[bottom][left] != 0){&#xD;&#xA;					theHero.x = (left + 1) * ts;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vx &gt; 0){&#xD;&#xA;				if(curMap[top][right] != 0 || curMap[bottom][right] != 0){&#xD;&#xA;					theHero.x = ((right - 1) * ts )+ 2; // + 2 because hero width is 14 and tile size is 16, if we just stepped back tile size we get a gap&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		private function moveChar():void{&#xD;&#xA;			&#xD;&#xA;			if(rightKey){&#xD;&#xA;				&#xD;&#xA;				vx = 6;&#xD;&#xA;			}&#xD;&#xA;			if(leftKey){&#xD;&#xA;				vx = -6;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(!leftKey &amp;&amp; !rightKey &amp;&amp; onGround){&#xD;&#xA;				vx = 0;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(jumpKey){&#xD;&#xA;				vy = -10;&#xD;&#xA;				gravity = 3;&#xD;&#xA;				onGround = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			vy += gravity;&#xD;&#xA;&#xD;&#xA;			if(vy &gt; 14){&#xD;&#xA;				vy = 14;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function onENTERFRAME(event:Event):void{&#xD;&#xA;			&#xD;&#xA;			moveChar();&#xD;&#xA;&#xD;&#xA;			theHero.y += vy;&#xD;&#xA;			theHero.x += vx;&#xD;&#xA;&#xD;&#xA;			collisionCheck();&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is by far not the smartest way to check collisons, but I think it might work well enough. I just need someone to throw me in the right direction for making a solid collision detection engine for a simple tile based game.&#xD;&#xA;" />
  <row Id="28388" PostHistoryTypeId="4" PostId="12859" RevisionGUID="f8a24613-ed54-4ae7-b1c9-d2936d9e44b9" CreationDate="2011-05-29T07:46:32.723" UserId="20" Comment="removed tag from title, minor changes" Text="Collision Detection for sidescrolling Tile based Game" />
  <row Id="28389" PostHistoryTypeId="2" PostId="12863" RevisionGUID="09a9a7cf-8054-4c40-bd39-c03d7367e44a" CreationDate="2011-05-29T07:59:19.757" UserId="20" Text="Instead of checking the corners of your sprite, I suggest you check the midpoints. Like in this image:&#xD;&#xA;&#xD;&#xA;![collision points][1]&#xD;&#xA;&#xD;&#xA;The bottom &quot;sensor&quot; checks for ground collisions, the front checks for &quot;wall&quot; collisions. Usually you'll need maximum two active sensors. Examples: &#xD;&#xA;&#xD;&#xA; - Player walks forward, *FRONT* and *BOTTOM* must be checked&#xD;&#xA; - Player stands still: *BOTTOM* must be checked&#xD;&#xA; - Player performs forward jump. While moving upward, *FRONT* and *TOP* must be checked, when falling, *FRONT* and *BOTTOM* must be checked.&#xD;&#xA; - etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/E2LFP.png" />
  <row Id="28390" PostHistoryTypeId="2" PostId="12864" RevisionGUID="c3d2e563-2594-43c8-a424-f7b217ea4492" CreationDate="2011-05-29T08:03:38.430" UserId="2188" Text="Make it &quot;**pay what you want**&quot;, i.e. ask for payment to unlock full version, but allow the user to decide how much to pay. Bear in mind to set a minimum price to cover the transaction fees (if you use paypal it's ~.40¢).&#xD;&#xA;&#xD;&#xA;**Don't give full version asking for donations**, because — as [Jeff Vogel][1] often points out — users are lazy and will just &quot;delay&quot; paying you if they can.&#xD;&#xA;&#xD;&#xA;*Of course* the game should be worth buying in the first place (if it isn't, it doesn't really matter which system you chose).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jeff-vogel.blogspot.com/" />
  <row Id="28391" PostHistoryTypeId="2" PostId="12865" RevisionGUID="315f9257-1964-4edf-ba1d-97ed96141404" CreationDate="2011-05-29T08:07:54.693" UserId="6210" Text="I'd recommend TIG Source as a nice place to visit. There are many good people in this Indy gaming and gamedev community.&#xD;&#xA;&#xD;&#xA;- [Jobs forum (paid contributions)][1]&#xD;&#xA;&#xD;&#xA;- [Unpaid contributions forum][2]&#xD;&#xA;&#xD;&#xA;If you go there, please remember to [introduce yourself][3]!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: if it's XNA related, you could also ask/look at the XNA forums:&#xD;&#xA;[team positions/services wanted/offered][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/index.php?board=40.0&#xD;&#xA;  [2]: http://forums.tigsource.com/index.php?board=41.0&#xD;&#xA;  [3]: http://forums.tigsource.com/index.php?topic=45.0&#xD;&#xA;  [4]: http://forums.create.msdn.com/forums/42.aspx" />
  <row Id="28392" PostHistoryTypeId="2" PostId="12866" RevisionGUID="734ba703-adb6-43ea-9e05-468e1bab613f" CreationDate="2011-05-29T08:19:16.690" UserId="6210" Text="One quick way to render a perfect AI fightable is to have it make unperfect decisions by adding some 'noise' to either its inputs or its outputs. By noise I mean some random factors.&#xD;&#xA;&#xD;&#xA;Here's a small example for output:&#xD;&#xA;&#xD;&#xA; - Perfect algorithm yields three possible actions ranked with a score.&#xD;&#xA; - Add a random value to each score.&#xD;&#xA; - Pick best score.&#xD;&#xA;&#xD;&#xA;Here are some ideas for input:&#xD;&#xA;&#xD;&#xA; - If actions are based on opponent's health, add a random factor (say +/- 10 for a 0-100 health bar) to perceived state by AI.&#xD;&#xA; - Same for rating of actions, if AI knows some attacks are stronger than others, randomly add/subtract some values there.&#xD;&#xA;&#xD;&#xA;One obvious thing to take into consideration is the speed of the AI. In most games, AIs can react *MUCH* faster than humans (especially in fighting) and do apparent multitasking (very visible in RTS games). So you have to act on that, by keeping the AI a bit slow (maybe adaptively so), and limiting the amount of things it can do in a determined frame of time (ie one action each half-second).&#xD;&#xA;&#xD;&#xA;Hope this helps, and good luck!&#xD;&#xA;" />
  <row Id="28393" PostHistoryTypeId="2" PostId="12867" RevisionGUID="331dfa50-da19-4f73-a3e5-278880c73bb6" CreationDate="2011-05-29T09:05:10.523" UserId="7199" Text="Did the first generation Pokemon games for gameboy poll for the d-pad state or was the input state done based on events?&#xD;&#xA;&#xD;&#xA;I'm currently trying to implement a similar control and I'm interested in comparing my input with that of the gameboy and Pokemon. &#xD;&#xA;&#xD;&#xA;I'm using SneakyInput and cocos2d. " />
  <row Id="28394" PostHistoryTypeId="1" PostId="12867" RevisionGUID="331dfa50-da19-4f73-a3e5-278880c73bb6" CreationDate="2011-05-29T09:05:10.523" UserId="7199" Text="Did first generation Pokemon games use event driven input or poll based input?" />
  <row Id="28395" PostHistoryTypeId="3" PostId="12867" RevisionGUID="331dfa50-da19-4f73-a3e5-278880c73bb6" CreationDate="2011-05-29T09:05:10.523" UserId="7199" Text="&lt;input&gt;&lt;cocos2d&gt;" />
  <row Id="28396" PostHistoryTypeId="2" PostId="12868" RevisionGUID="af3f1206-88df-4685-a6f8-2f3b0199787d" CreationDate="2011-05-29T09:08:41.857" UserId="1839" Text="How do you store the ellipsoid? &#xD;&#xA;&#xD;&#xA;If it has a position and the radius in x- and y-axis, it might be easier to calculate the inverse transformation matrix, that transforms the ellipsoid to a circle, transform the box into that space too, then you can make simple triangle-sphere collision tests." />
  <row Id="28397" PostHistoryTypeId="25" PostId="12855" RevisionGUID="317ed57f-abfd-49a1-b0fb-418616393e86" CreationDate="2011-05-29T09:13:13.217" Comment="http://twitter.com/#!/StackGameDev/status/74765223147470848" />
  <row Id="28398" PostHistoryTypeId="5" PostId="12868" RevisionGUID="0b4bf575-b242-4b53-8b29-b311b06c1beb" CreationDate="2011-05-29T09:53:25.287" UserId="1839" Comment="added 361 characters in body" Text="How do you store the ellipsoid? &#xD;&#xA;&#xD;&#xA;If it has a position and the radius in x- and y-axis, it might be easier to calculate the inverse transformation matrix, that transforms the ellipsoid to a circle, transform the box into that space too, then you can make simple triangle-sphere collision tests.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: In the left image you see the original ellipsoid with the axis aligned box. On the right image both objects are transformed be the ellipsoid's inverse matrix, so the ellipsoid becomes a circle and the AABB becomes 2 triangles. Now its only a matter of circle-tríangle-tests.&#xD;&#xA;&#xD;&#xA;![Ellipsoid-Box Test][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m5uPl.png" />
  <row Id="28399" PostHistoryTypeId="5" PostId="12868" RevisionGUID="f2e6987e-019c-4f83-9ff0-1a8514a378d3" CreationDate="2011-05-29T10:02:47.490" UserId="1839" Comment="added 6 characters in body; edited body" Text="How do you store the ellipsoid? &#xD;&#xA;&#xD;&#xA;If it has a position and the radius in x- and y-axis, it might be easier to calculate the inverse transformation matrix, that transforms the ellipsoid to a circle, transform the box into that space too, then you can make simple triangle-circle collision tests.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: In the left image you see the original ellipsoid with the axis aligned box. In the right image both objects are transformed by the ellipsoid's inverse matrix, so the ellipsoid becomes a circle and the AABB becomes 2 triangles. Now its only a matter of 2 triangle-circle tests.&#xD;&#xA;    &#xD;&#xA;![Ellipsoid-Box Test][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m5uPl.png" />
  <row Id="28400" PostHistoryTypeId="2" PostId="12869" RevisionGUID="c6bfd322-3ade-4d9f-a40c-fb959c9d2de4" CreationDate="2011-05-29T10:39:57.543" UserId="1163" Text="This is all known as the [Elastic Racetrack][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/" />
  <row Id="28401" PostHistoryTypeId="5" PostId="12831" RevisionGUID="99a4ac4f-10c3-40a1-942f-aa64ffde95f8" CreationDate="2011-05-29T10:59:29.860" UserId="6867" Comment="edited body" Text="What is the fastest way to get all adjacent tiles in a two-dimensional array of tiles, converted into a single-dimensional array?&#xD;&#xA;&#xD;&#xA;If you don't know the answer, then the fastest way to do it in a two-dimensional array would be fine as well.&#xD;&#xA;&#xD;&#xA;I tried the following, but it does 9 calculations, which is 1 too much when it comes to optimization.&#xD;&#xA;&#xD;&#xA;    for(int x = -1; x &lt;= 1; x++) {&#xD;&#xA;      for(int y = -1; y &lt;= 1; y++) {&#xD;&#xA;        if(x != 0 || y != 0) {&#xD;&#xA;          Tile adjacent = Tiles[current.x + x, current.y + y];&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="28402" PostHistoryTypeId="5" PostId="12868" RevisionGUID="24321769-2e44-4d59-857a-60b50bef7fab" CreationDate="2011-05-29T11:10:48.790" UserId="1839" Comment="added 19 characters in body" Text="How do you store the ellipsoid? &#xD;&#xA;&#xD;&#xA;If it has a position and the radius in x- and y-axis, it might be easier to calculate the inverse transformation matrix, that transforms the ellipsoid to a circle. Transform the AABB into that space too using that matrix, then you can make simple triangle-circle collision tests.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: In the left image you see the original ellipsoid with the axis aligned box. In the right image both objects are transformed by the ellipsoid's inverse matrix, so the ellipsoid becomes a circle and the AABB becomes 2 triangles. Now its only a matter of 2 triangle-circle tests.&#xD;&#xA;    &#xD;&#xA;![Ellipsoid-Box Test][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m5uPl.png" />
  <row Id="28405" PostHistoryTypeId="2" PostId="12871" RevisionGUID="abfd1713-7701-492f-9262-9b21592e6e4f" CreationDate="2011-05-29T11:43:35.547" UserId="7514" Text="I actually wrote a game once which did this sort of thing perfectly. And the amount of recalculation was very little compared to A*.&#xD;&#xA;&#xD;&#xA;In a grid base map (even if the characters don't move in a grid base way), you have a 2dimensional array, and mark the finish with 0,0.&#xD;&#xA;&#xD;&#xA;Add the four adjacent squares to a list.&#xD;&#xA;&#xD;&#xA;Then using a for or while loop, iterate through the list, and simply give each square a value of the minimum of the four surrounding squares + 1.&#xD;&#xA;&#xD;&#xA;Then add the four surrounding squares to that square to the list (if their value is still not set).&#xD;&#xA;&#xD;&#xA;basically, on an empty map, you could receive an effect like this in the array:&#xD;&#xA;&#xD;&#xA; - 3,2,1,2,3,4&#xD;&#xA; - 2,1,0,1,2,3&#xD;&#xA; - 3,2,1,2,3,4&#xD;&#xA; - 4,3,2,3,4,5&#xD;&#xA; - 5,4,3,4,5,6&#xD;&#xA;&#xD;&#xA;However on a map with obstacles...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - 3,2,1,2,3,4&#xD;&#xA; - 2,1,0,X,4,5&#xD;&#xA; - 3,2,1,X,5,6&#xD;&#xA; - 4,X,2,X,6,X&#xD;&#xA; - 5,4,3,X,7,8&#xD;&#xA;&#xD;&#xA;Now this method has 3 main benefits.&#xD;&#xA;&#xD;&#xA;If i place a block on a 4 for example. Then only the squares with a value of 5 or higher need to be updated! I simply have a loop which goes through the values of 5 upwards (make sure you have all the 5's done before you do the 6's, and all the 6's before the 7's, etc.&#xD;&#xA;&#xD;&#xA;Or you could do it from an empty array again. It's extremely fast!&#xD;&#xA;&#xD;&#xA;The second benefit, is that the grid is exactly the same for all enemies! Every enemy in the map follows this array. If it is on a 7, then it wants to move to a 6! Doesn't matter which 6 it takes, because they all are the same distance (6 squares) away from the end!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thirdly, if, during your loop to work out the values of this array, if a square doesn't get reached, (if the value stays unset, and there isn't a tower there), then it means that part of the map is cut off from the base. In most tower defenses, this isn't allowed. So if you check this before confirming a towers placement, it means you know whether it is a legal or illegal build.&#xD;&#xA;&#xD;&#xA;Hope this helped,&#xD;&#xA;Randomman159" />
  <row Id="28406" PostHistoryTypeId="5" PostId="12868" RevisionGUID="2d89fdbb-2d94-46f6-bdd5-489cef0532a0" CreationDate="2011-05-29T11:57:10.127" UserId="1839" Comment="added 19 characters in body" Text="How do you store the ellipsoid? &#xD;&#xA;&#xD;&#xA;If it has a position, orientation and the radius in local x- and y-axis, it might be easier to calculate the inverse transformation matrix, that transforms the ellipsoid to a circle. Transform the AABB into that space too using that matrix, then you can make simple triangle-circle collision tests.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: In the left image you see the original ellipsoid with the axis aligned box. In the right image both objects are transformed by the ellipsoid's inverse matrix, so the ellipsoid becomes a circle and the AABB becomes 2 triangles. Now its only a matter of 2 triangle-circle tests.&#xD;&#xA;    &#xD;&#xA;![Ellipsoid-Box Test][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m5uPl.png" />
  <row Id="28407" PostHistoryTypeId="25" PostId="12867" RevisionGUID="70db11d4-046d-4aa4-9d17-a16d7aa075c9" CreationDate="2011-05-29T12:13:13.393" Comment="http://twitter.com/#!/StackGameDev/status/74810521668419584" />
  <row Id="28408" PostHistoryTypeId="2" PostId="12872" RevisionGUID="2d0832f9-ff34-4ae2-a063-60a0c7455b7d" CreationDate="2011-05-29T12:35:11.067" UserId="2643" Text="I've been using the skinned sample from XNA tutorials to understand and play FBX files animation. While the animation in all my tests runs correctly, I fail to understand the technic to calculate time versus keyframes.&#xD;&#xA;&#xD;&#xA;Most of the models I found so far for free and testing purpose on google store all animations into one &quot;take&quot; and split frames into all animations. So, walk would be frame 1 to 14, run 15 to 30, jump 32 to 48, etc. On the other hand, the skinning sample loads all frames and store a calculated time which it will be using to loop the animation.&#xD;&#xA;&#xD;&#xA;The part where I'm getting confused is on the keyframe part. For example a model I've been trying to load gives me a 12 seconds timespan with 20160 keyframes. While the timespan seems right, the keyframe count seems to have been altered in some way since in Milkshape and in the Autodesk converter the frame count is at 300. What is it doing?&#xD;&#xA;&#xD;&#xA;Here's my setup for model conversion.&#xD;&#xA;&#xD;&#xA;1. I use Milkshape 3D to export a model and its animation to an FBX binary file.&#xD;&#xA;2. Then, I use the Autodesk file converter to convert the file into an ASCII FBX (so far I tried and tested the FBX2012 and version 6.1, which is the same as the &quot;dude.fbx&quot; given with the skinning sample).&#xD;&#xA;3. Processing model inside XNA with the SkinnedModelProcessor given with the skinning sample.&#xD;&#xA;&#xD;&#xA;What I'm really trying to achieve here is to split animation into smaller clips so I can switch depending on the user action. I'm perfectly fine with counting keyframes, but as you can see, the keyframe count is way too high." />
  <row Id="28409" PostHistoryTypeId="1" PostId="12872" RevisionGUID="2d0832f9-ff34-4ae2-a063-60a0c7455b7d" CreationDate="2011-05-29T12:35:11.067" UserId="2643" Text="XNA: Skinning sample, keyframes and time" />
  <row Id="28410" PostHistoryTypeId="3" PostId="12872" RevisionGUID="2d0832f9-ff34-4ae2-a063-60a0c7455b7d" CreationDate="2011-05-29T12:35:11.067" UserId="2643" Text="&lt;xna&gt;&lt;animation&gt;&lt;models&gt;" />
  <row Id="28411" PostHistoryTypeId="5" PostId="12858" RevisionGUID="8fac4aac-4412-43ef-a6a6-88097916e2a1" CreationDate="2011-05-29T12:44:56.050" UserId="284" Comment="typo fix" Text="When making an npc combatant, it's &lt;strike&gt;easy&lt;/strike&gt; _obvious what to do_ to get a robot deathmachine by optimizing combat tactics, timing and attack types, but harder (and more interesting in a fight) to get an idiosyncratic, inpredictable enemy.  What behaviors (algorithms?) are useful for creating a more organic, unconventional enemy?" />
  <row Id="28412" PostHistoryTypeId="2" PostId="12873" RevisionGUID="a2053670-f33e-4548-8faf-de0ecada956c" CreationDate="2011-05-29T13:19:58.267" UserId="3042" Text="I need to know how to get the closest point on the surface of an ellipsoid to another point.&#xD;&#xA;&#xD;&#xA;I had an idea, but apparently i was wrong, and oversimplfying.&#xD;&#xA;&#xD;&#xA;What i did was squash the ellipsoid and point into local space, so the ellispoid is a unit circle&#xD;&#xA;&#xD;&#xA;    vector3 pointLocalCoord = ( pointOriginal - ellipsoid.origin ) / ellipsoid.radii&#xD;&#xA;&#xD;&#xA;Then from there, the closest point should be 1, in the  direction of the transformed point from the origin&#xD;&#xA;&#xD;&#xA;    vector3 closestPointOnEllipsoidLocal = norm ( pointLocalCoord )&#xD;&#xA;&#xD;&#xA;Then get back into standard space&#xD;&#xA;&#xD;&#xA;    vector3 closestPointOnEllipsoidWorld = closestPointOnEllipsoidLocal * ellipsoid.radius + ellipsoid.origin&#xD;&#xA;&#xD;&#xA;But of course, all of this seems not to work, i was curious if any body could point me in the direction of some pre-existing code or such; as some of the articles i've tried reading kinda go a bit out of my scope of knowledge.&#xD;&#xA;&#xD;&#xA;Also, if that seems right to you, please do tell. I'm pretty sure its wrong though." />
  <row Id="28413" PostHistoryTypeId="1" PostId="12873" RevisionGUID="a2053670-f33e-4548-8faf-de0ecada956c" CreationDate="2011-05-29T13:19:58.267" UserId="3042" Text="Closest point on an ellipsoid" />
  <row Id="28414" PostHistoryTypeId="3" PostId="12873" RevisionGUID="a2053670-f33e-4548-8faf-de0ecada956c" CreationDate="2011-05-29T13:19:58.267" UserId="3042" Text="&lt;xna&gt;&lt;collision-detection&gt;&lt;intersection&gt;" />
  <row Id="28415" PostHistoryTypeId="2" PostId="12874" RevisionGUID="bbf6ff0a-b6f3-4bab-ad5e-2f42ae6d6c7c" CreationDate="2011-05-29T13:26:03.377" UserId="7199" Text="**Short Version:** &#xD;&#xA;&#xD;&#xA;I am trying to move a player around on a tilemap, keeping it centered on its tile, while smoothly controlling it with SneakyInput virtual Joystick. My movement is jumpy and hard to control. What's a good way to implement this?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Long Version:**&#xD;&#xA;&#xD;&#xA;I'm trying to get a tilemap based RPG &quot;layer&quot; working on top of cocos2d-iphone. I'm using SneakyInput as the input right now, but I've run into a bit of a snag.&#xD;&#xA;&#xD;&#xA;Initially, I followed [Steffen Itterheim][1]'s [book][2] and [Ray Wenderlich][3]'s [tutorial][4], and I got jumpy movement working. My player now moves from tile to tile, without any animation whatsoever.&#xD;&#xA;&#xD;&#xA;So, I took it a step further. I changed my `player.position` to a `CCMoveTo` action. Combined with `CCfollow`, my player moves pretty smoothly. Here's the problem, though: Between each `CCMoveTo`, the movement stops, so there's a bit of a jumpiness introduced between movements.&#xD;&#xA;&#xD;&#xA;To deal with that, I changed my `CCmoveTo` into a `CCMoveBy`, and instead of running it once, I decided to have it `CCRepeatForever`. My plan was to stop the repeating action whenever the player changed directions or released the d-pad. &#xD;&#xA;&#xD;&#xA;However, when the movement stops, the player is not necessarily centered along the tiles, as it should be. To correctly position the player, I use a `CCMoveTo` and get the closest position that would put the player back into the proper position. This reintroduces an earlier problem of jumpiness between actions. &#xD;&#xA;&#xD;&#xA;What is the correct way to implement a smooth joystick while smoothly animating the player and keeping it on the &quot;grid&quot; of tiles?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.learn-cocos2d.com/&#xD;&#xA;  [2]: http://www.apress.com/9781430233039&#xD;&#xA;  [3]: http://www.raywenderlich.com/&#xD;&#xA;  [4]: http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d" />
  <row Id="28416" PostHistoryTypeId="1" PostId="12874" RevisionGUID="bbf6ff0a-b6f3-4bab-ad5e-2f42ae6d6c7c" CreationDate="2011-05-29T13:26:03.377" UserId="7199" Text="Help implementing virtual d-pad" />
  <row Id="28417" PostHistoryTypeId="3" PostId="12874" RevisionGUID="bbf6ff0a-b6f3-4bab-ad5e-2f42ae6d6c7c" CreationDate="2011-05-29T13:26:03.377" UserId="7199" Text="&lt;iphone&gt;&lt;cocos2d&gt;&lt;joystick&gt;" />
  <row Id="28418" PostHistoryTypeId="25" PostId="12873" RevisionGUID="d148af22-a985-477e-b958-7631adbe0c27" CreationDate="2011-05-29T15:13:13.277" Comment="http://twitter.com/#!/StackGameDev/status/74855821024051201" />
  <row Id="28419" PostHistoryTypeId="2" PostId="12875" RevisionGUID="bed272c4-a75f-47b2-b583-f876f0325129" CreationDate="2011-05-29T16:53:39.083" UserId="3128" Text="I have a 3d moving box and a stationary box.  I can detect collisions ok but now I would like to slide the moving box against the stationary box as a collision response.  For this I need the normal of the face that collides with the moving box.  Does anyone know how I figure this out?  It doesn't seem like the collision test gives me this information.  Any help is appreciated." />
  <row Id="28420" PostHistoryTypeId="1" PostId="12875" RevisionGUID="bed272c4-a75f-47b2-b583-f876f0325129" CreationDate="2011-05-29T16:53:39.083" UserId="3128" Text="How do I determine the collision normal in an axis aligned bounding box collision?" />
  <row Id="28421" PostHistoryTypeId="3" PostId="12875" RevisionGUID="bed272c4-a75f-47b2-b583-f876f0325129" CreationDate="2011-05-29T16:53:39.083" UserId="3128" Text="&lt;collision-detection&gt;&lt;geometry&gt;&lt;normals&gt;&lt;bounding-boxes&gt;" />
  <row Id="28422" PostHistoryTypeId="25" PostId="12875" RevisionGUID="51863807-a63b-4944-8b2b-a677c9a531b5" CreationDate="2011-05-29T18:13:14.657" Comment="http://twitter.com/#!/StackGameDev/status/74901124603318273" />
  <row Id="28423" PostHistoryTypeId="2" PostId="12876" RevisionGUID="2520f4c8-97e7-4474-aac1-501a004dc1a0" CreationDate="2011-05-29T18:43:25.523" UserId="6813" Text="In order to calculate the normal to a plane (the collided AABB face) you need:&#xD;&#xA;&#xD;&#xA;- 3 points of this plane (2 non parallel edges).&#xD;&#xA;- The cross product of two edge vectors of this plane (usually from the same point of origin).&#xD;&#xA;&#xD;&#xA;This will produce a vector perpendicular to this side.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Here is an example of how to calculate the cross product.&#xD;&#xA;&#xD;&#xA;Let A, B, C and D be the four points of your AABB collided side.&#xD;&#xA;&#xD;&#xA;    [B]---[C]&#xD;&#xA;     |     |&#xD;&#xA;    [A]---(D)&#xD;&#xA;&#xD;&#xA;If we use ABC, then the normal to the plane is&#xD;&#xA;&#xD;&#xA;    ADxAB (if we want a normal pointing out of the screen)&#xD;&#xA;    ABxAD (if we want a normal pointing inside the screen)&#xD;&#xA;&#xD;&#xA;*(it's just because our example is facing the screen, if the plane is seen from left side, the fist normal will point right and the second will point left)*&#xD;&#xA;&#xD;&#xA;As you can see the order in which you take the points will impact the side the normal will point to. That's why developers usually store their points in a specified order (clockwise or counter-clockwise, but the same for all faces) so they know in which order to use them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See this on more details now:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    AB = [ Bx-Ax, By-Ay, Bz-Az ]&#xD;&#xA;    AD = [ Dx-Ax, Dy-Ay, Dz-Az ]&#xD;&#xA;&#xD;&#xA;Here is how to get the first normal&#xD;&#xA;&#xD;&#xA;    ADxAB = [ ADx, ADy, ADz ] X  [ ABx, ABy, ABz ]&#xD;&#xA;          = [ (ADy*ABz - ADz*ABy), (ADz*ABx - ADx*ABz), (ADx*ABy - ADy*ABx) ]&#xD;&#xA;&#xD;&#xA;And here come the second normal pointing to the other side&#xD;&#xA;&#xD;&#xA;    ABxAD = [ ABx, ABy, ABz ] X  [ ADx, ADy, ADz ]&#xD;&#xA;          = [ (ABy*ADz - ABz*ADy), (ABz*ADx - ABx*ADz), (ABx*ADy - ABy*ADx) ]&#xD;&#xA;&#xD;&#xA;If you replace the ABx, ABy, ABz etc. values with the the differences calculated just before (Bx-Ax, By-Ay, Bz-Az) the cross products you will get the normal vectors.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28424" PostHistoryTypeId="2" PostId="12877" RevisionGUID="4d98ebdb-35d2-48f7-b2ae-720abf7d3c96" CreationDate="2011-05-29T18:46:56.563" UserId="7709" Text="How can i check/inspect the performance of some network application via observing the port it used,i want to test the performance of my network game. is it some way, or is it some practice like this?&#xD;&#xA;&#xD;&#xA;If my game is connect to port 1009, how can i check the different parameters data outflow , inflow and other metrics on this port.&#xD;&#xA;&#xD;&#xA;any ideas,&#xD;&#xA;&#xD;&#xA;thanks,&#xD;&#xA;&#xD;&#xA;Jibbylala&#xD;&#xA;" />
  <row Id="28425" PostHistoryTypeId="1" PostId="12877" RevisionGUID="4d98ebdb-35d2-48f7-b2ae-720abf7d3c96" CreationDate="2011-05-29T18:46:56.563" UserId="7709" Text="Observing particular Port for measuring network game performance." />
  <row Id="28426" PostHistoryTypeId="3" PostId="12877" RevisionGUID="4d98ebdb-35d2-48f7-b2ae-720abf7d3c96" CreationDate="2011-05-29T18:46:56.563" UserId="7709" Text="&lt;java&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;performance&gt;&lt;testing&gt;" />
  <row Id="28427" PostHistoryTypeId="5" PostId="12876" RevisionGUID="5163e83b-5af4-400c-8117-1c86163d6f41" CreationDate="2011-05-29T18:49:16.197" UserId="6813" Comment="added 28 characters in body; edited body; added 1 characters in body" Text="In order to calculate the normal to a plane (the collided AABB face) you need:&#xD;&#xA;&#xD;&#xA;- 3 points of this plane (2 non parallel edges).&#xD;&#xA;- The cross product of two edge vectors of this plane (usually from the same point of origin).&#xD;&#xA;&#xD;&#xA;This will produce a vector perpendicular to this plane (but a plane have 2 sides).&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Here is an example of how to calculate the cross product.&#xD;&#xA;&#xD;&#xA;Let A, B, C and D be the four points of your AABB collided side.&#xD;&#xA;&#xD;&#xA;    [B]---(c)&#xD;&#xA;     |     |&#xD;&#xA;    [A]---[D]&#xD;&#xA;&#xD;&#xA;If we use ABC, then the normal to the plane is&#xD;&#xA;&#xD;&#xA;    ADxAB (if we want a normal pointing out of the screen)&#xD;&#xA;    ABxAD (if we want a normal pointing inside the screen)&#xD;&#xA;&#xD;&#xA;*(it's just because our example is facing the screen, if the plane is seen from left side, the fist normal will point right and the second will point left)*&#xD;&#xA;&#xD;&#xA;As you can see the order in which you take the points will impact the side the normal will point to. That's why developers usually store their points in a specified order (clockwise or counter-clockwise, but the same for all faces) so they know in which order to use them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See this on more details now:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    AB = [ Bx-Ax, By-Ay, Bz-Az ]&#xD;&#xA;    AD = [ Dx-Ax, Dy-Ay, Dz-Az ]&#xD;&#xA;&#xD;&#xA;Here is how to get the first normal&#xD;&#xA;&#xD;&#xA;    ADxAB = [ ADx, ADy, ADz ] X  [ ABx, ABy, ABz ]&#xD;&#xA;          = [ (ADy*ABz - ADz*ABy), (ADz*ABx - ADx*ABz), (ADx*ABy - ADy*ABx) ]&#xD;&#xA;&#xD;&#xA;And here come the second normal pointing to the other side&#xD;&#xA;&#xD;&#xA;    ABxAD = [ ABx, ABy, ABz ] X  [ ADx, ADy, ADz ]&#xD;&#xA;          = [ (ABy*ADz - ABz*ADy), (ABz*ADx - ABx*ADz), (ABx*ADy - ABy*ADx) ]&#xD;&#xA;&#xD;&#xA;If you replace the ABx, ABy, ABz etc. values with the differences calculated just before (Bx-Ax, By-Ay, Bz-Az etc.) the cross products you will get the normal vectors.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28428" PostHistoryTypeId="4" PostId="12877" RevisionGUID="e3f2f387-e558-4e9c-bfd2-6198e53cbe82" CreationDate="2011-05-29T18:54:48.633" UserId="7709" Comment="edited title" Text="Measuring network game performance." />
  <row Id="28429" PostHistoryTypeId="4" PostId="12877" RevisionGUID="83af6422-6c26-493d-bca1-b73091b4b005" CreationDate="2011-05-29T19:00:07.947" UserId="7709" Comment="edited title" Text="Observing particular Port for measuring network game performance." />
  <row Id="28430" PostHistoryTypeId="2" PostId="12878" RevisionGUID="cd6423c7-b710-41fb-b425-442fb19c906e" CreationDate="2011-05-29T19:12:11.583" UserId="6813" Text="I would suggest Wireshark (ex Ethereal) as an interesting solution.&#xD;&#xA;&#xD;&#xA;- [Wireshark][1] is free and open source.&#xD;&#xA;&#xD;&#xA;I worked with Ethereal (before it changed to Wireshark) in the past, and I must admit that it was a very powerful tool. So WireShark is probably as powerful as Ethereal was and is probably more user friendly than it was in old days.&#xD;&#xA;&#xD;&#xA;According to [Wikipedia][3]&#xD;&#xA;&#xD;&#xA;&gt; Wireshark is a free and open-source&#xD;&#xA;&gt; packet analyzer. It is used for&#xD;&#xA;&gt; network troubleshooting, analysis,&#xD;&#xA;&gt; software and communications protocol&#xD;&#xA;&gt; development, and education. Originally&#xD;&#xA;&gt; named Ethereal, in May 2006 the&#xD;&#xA;&gt; project was renamed Wireshark due to&#xD;&#xA;&gt; trademark issues.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Wireshark is cross-platform, using the&#xD;&#xA;&gt; GTK+ widget toolkit to implement its&#xD;&#xA;&gt; user interface, and using pcap to&#xD;&#xA;&gt; capture packets; it runs on various&#xD;&#xA;&gt; Unix-like operating systems including&#xD;&#xA;&gt; Linux, Mac OS X, BSD, and Solaris, and&#xD;&#xA;&gt; on Microsoft Windows. There is also a&#xD;&#xA;&gt; terminal-based (non-GUI) version&#xD;&#xA;&gt; called TShark. Wireshark, and the&#xD;&#xA;&gt; other programs distributed with it&#xD;&#xA;&gt; such as TShark, are free software,&#xD;&#xA;&gt; released under the terms of the GNU&#xD;&#xA;&gt; General Public License.&#xD;&#xA;&#xD;&#xA;Here is a [video introduction][2] to quickly have an idea of the interface and how it can be used.&#xD;&#xA;&#xD;&#xA;[1]: http://www.wireshark.org&#xD;&#xA;[2]: http://wiresharkdownloads.riverbed.com/video/wireshark/introduction-to-wireshark/&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Wireshark" />
  <row Id="28431" PostHistoryTypeId="5" PostId="12878" RevisionGUID="63d5324b-9dae-4dca-ada6-f1152020bf14" CreationDate="2011-05-29T19:27:38.313" UserId="6813" Comment="added 310 characters in body; added 12 characters in body" Text="I would suggest Wireshark (ex Ethereal) as an interesting solution.&#xD;&#xA;&#xD;&#xA;- [Wireshark][1] is free and open source.&#xD;&#xA;&#xD;&#xA;I worked with Ethereal (before it changed to Wireshark) in the past, and I must admit that it was a very powerful tool. So WireShark is probably as powerful as Ethereal was and is probably more user friendly than it was in old days.&#xD;&#xA;&#xD;&#xA;According to [Wikipedia][3]&#xD;&#xA;&#xD;&#xA;&gt; Wireshark is a free and open-source&#xD;&#xA;&gt; packet analyzer. It is used for&#xD;&#xA;&gt; network troubleshooting, analysis,&#xD;&#xA;&gt; software and communications protocol&#xD;&#xA;&gt; development, and education. Originally&#xD;&#xA;&gt; named Ethereal, in May 2006 the&#xD;&#xA;&gt; project was renamed Wireshark due to&#xD;&#xA;&gt; trademark issues.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Wireshark is cross-platform, using the&#xD;&#xA;&gt; GTK+ widget toolkit to implement its&#xD;&#xA;&gt; user interface, and using pcap to&#xD;&#xA;&gt; capture packets; it runs on various&#xD;&#xA;&gt; Unix-like operating systems including&#xD;&#xA;&gt; Linux, Mac OS X, BSD, and Solaris, and&#xD;&#xA;&gt; on Microsoft Windows. There is also a&#xD;&#xA;&gt; terminal-based (non-GUI) version&#xD;&#xA;&gt; called TShark. Wireshark, and the&#xD;&#xA;&gt; other programs distributed with it&#xD;&#xA;&gt; such as TShark, are free software,&#xD;&#xA;&gt; released under the terms of the GNU&#xD;&#xA;&gt; General Public License.&#xD;&#xA;&#xD;&#xA;Here is a [video introduction][2] to quickly have an idea of the interface and how it can be used and another one [that shows you the ins and outs of advanced graphing][4].&#xD;&#xA;&#xD;&#xA;Finally, here is the [Wireshark User's Guide][5].&#xD;&#xA;&#xD;&#xA;[1]: http://www.wireshark.org&#xD;&#xA;[2]: http://wiresharkdownloads.riverbed.com/video/wireshark/introduction-to-wireshark/&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Wireshark&#xD;&#xA;[4]: http://www.novell.com/common/flash/play.php?media=http://www.novell.com/recording/videos/connectionmagazine/novell_connection1007.flv&#xD;&#xA;[5]: http://www.wireshark.org/docs/wsug_html_chunked/" />
  <row Id="28432" PostHistoryTypeId="2" PostId="12879" RevisionGUID="2c6c91a6-32ee-4757-afe3-4da0f5d1ead5" CreationDate="2011-05-29T19:42:11.577" UserId="7328" Text="If you only want to check how much data is passed trough that specific port and suming that you are using windows vista or windows 7 you can also use windows resource manager, in network tab there is tcp connections which show you how much data is passed trough specific connection at time you are monitoring, you can also filter connections by process in that tab." />
  <row Id="28434" PostHistoryTypeId="2" PostId="12881" RevisionGUID="62428358-1824-4661-98dc-bda0b9e4d5ea" CreationDate="2011-05-29T20:01:58.900" UserId="7328" Text="There are three ways to solve this problem :&#xD;&#xA;&#xD;&#xA;1. you can just implement update function for your player class and move it in that update function, this approch will eliminate use of CCMoveBy or CCMoveTo classes and you can easily control how you want the movement be applied, for example just wait until x or y is just in center of tile and then stop moving.&#xD;&#xA;2. The second approch is to just eliminate CCRepeatForever when you want to stop our player and then add CCMoveBy Directly to the player action list, this way you'll be sure that CCMoveBy will finish what all the movement you requested.&#xD;&#xA;3. And the last choice is to Implement your code to do what CCRepeatForever does, this is how CCRepeat for ever is implemented in c++, and I also added another if to make sure you have to repeat CCMoveBy just one more time.(sorry for c++ code I hope you can convert it to objective-c)&#xD;&#xA;&#xD;&#xA;		void myCCRepeatForever::step(ccTime dt)&#xD;&#xA;		{&#xD;&#xA;			CCMoveByInstance-&gt;step(dt);&#xD;&#xA;			if (direction is still the same)&#xD;&#xA;				if (CCMoveByInstance-&gt;isDone())&#xD;&#xA;				{&#xD;&#xA;					ccTime diff = dt + CCMoveByInstance-&gt;getDuration() - CCMoveByInstance-&gt;getElapsed();&#xD;&#xA;					CCMoveByInstance-&gt;startWithTarget(m_pTarget);&#xD;&#xA;					CCMoveByInstance-&gt;step(diff);&#xD;&#xA;				}&#xD;&#xA;		}&#xD;&#xA;" />
  <row Id="28435" PostHistoryTypeId="5" PostId="12877" RevisionGUID="88d6e2de-71d0-4dc8-a4f6-b1286096d6ce" CreationDate="2011-05-29T20:17:50.173" UserId="962" Comment="deleted 101 characters in body" Text="How can I check/inspect the performance of some network application via observing the port it used, I want to test the performance of my network game.&#xD;&#xA;&#xD;&#xA;If my game is using port 1009, how can I check the different parameters, like data outflow, inflow and other metrics on this port?" />
  <row Id="28437" PostHistoryTypeId="5" PostId="12878" RevisionGUID="4c225d31-3646-46c5-bda3-68182b590a00" CreationDate="2011-05-29T20:49:44.000" UserId="6813" Comment="added 16 characters in body" Text="I would suggest Wireshark (ex Ethereal) as an interesting solution.&#xD;&#xA;&#xD;&#xA;- [Wireshark][1] is free, open source and cross-platform.&#xD;&#xA;&#xD;&#xA;I worked with Ethereal (before it changed to Wireshark) in the past, and I must admit that it was a very powerful tool. So WireShark is probably as powerful as Ethereal was and is probably more user friendly than it was in old days.&#xD;&#xA;&#xD;&#xA;According to [Wikipedia][3]&#xD;&#xA;&#xD;&#xA;&gt; Wireshark is a free and open-source&#xD;&#xA;&gt; packet analyzer. It is used for&#xD;&#xA;&gt; network troubleshooting, analysis,&#xD;&#xA;&gt; software and communications protocol&#xD;&#xA;&gt; development, and education. Originally&#xD;&#xA;&gt; named Ethereal, in May 2006 the&#xD;&#xA;&gt; project was renamed Wireshark due to&#xD;&#xA;&gt; trademark issues.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Wireshark is cross-platform, using the&#xD;&#xA;&gt; GTK+ widget toolkit to implement its&#xD;&#xA;&gt; user interface, and using pcap to&#xD;&#xA;&gt; capture packets; it runs on various&#xD;&#xA;&gt; Unix-like operating systems including&#xD;&#xA;&gt; Linux, Mac OS X, BSD, and Solaris, and&#xD;&#xA;&gt; on Microsoft Windows. There is also a&#xD;&#xA;&gt; terminal-based (non-GUI) version&#xD;&#xA;&gt; called TShark. Wireshark, and the&#xD;&#xA;&gt; other programs distributed with it&#xD;&#xA;&gt; such as TShark, are free software,&#xD;&#xA;&gt; released under the terms of the GNU&#xD;&#xA;&gt; General Public License.&#xD;&#xA;&#xD;&#xA;Here is a [video introduction][2] to quickly have an idea of the interface and how it can be used and another one [that shows you the ins and outs of advanced graphing][4].&#xD;&#xA;&#xD;&#xA;Finally, here is the [Wireshark User's Guide][5].&#xD;&#xA;&#xD;&#xA;[1]: http://www.wireshark.org&#xD;&#xA;[2]: http://wiresharkdownloads.riverbed.com/video/wireshark/introduction-to-wireshark/&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Wireshark&#xD;&#xA;[4]: http://www.novell.com/common/flash/play.php?media=http://www.novell.com/recording/videos/connectionmagazine/novell_connection1007.flv&#xD;&#xA;[5]: http://www.wireshark.org/docs/wsug_html_chunked/" />
  <row Id="28438" PostHistoryTypeId="25" PostId="12877" RevisionGUID="fb689084-5801-4bea-95ab-1869104e1aab" CreationDate="2011-05-29T21:13:16.427" Comment="http://twitter.com/#!/StackGameDev/status/74946429927424000" />
  <row Id="28439" PostHistoryTypeId="2" PostId="12882" RevisionGUID="ea39b667-df60-4dc3-97ec-8abd333c2dfd" CreationDate="2011-05-29T22:08:26.373" UserId="7676" Text="Java + 2D + LWJGL = Use [Slick][1] library. It's based on LWJGL library and makes it much easier to use for 2D :)&#xD;&#xA;In Slick website, they've very easy and quick tutorials, try it out! I'm sure you will LOVE it! ;)&#xD;&#xA;&#xD;&#xA;Since your main question is &quot;Where to start&quot;, start from [Slick Wiki page][2]!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://slick.cokeandcode.com/&#xD;&#xA;  [2]: http://slick.cokeandcode.com/wiki/doku.php" />
  <row Id="28440" PostHistoryTypeId="5" PostId="12859" RevisionGUID="6be73db6-d1bf-43a5-ba7f-6b66fb92f1ca" CreationDate="2011-05-29T22:18:07.523" UserId="7662" Comment="added 2128 characters in body" Text="I've been working on a tile based game with a 2d array as fundamental ground for my tiles. Now my next step is to have the wall tiles be impenetrable, so that the player can walk ontop of them and collide against their sides/bottom.&#xD;&#xA;&#xD;&#xA;&lt;strike&gt;So as this is loosely based on tonyPa tutorial, it uses the corners of the player character (top-left, top-right, bottom-left, bottom-right corners) to check if any corner hits a wall (walls are assigned as &quot;1&quot; in the 2d array). When a corner touches a tile that is recognized as &quot;1&quot; (wall), I want to check from what side the player is hitting, and then move the player next to the tiles side, to simulate a collision.&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;Now what I've noticed is, it's easy to check if any corner is touching a wall, but its harder to determine which side the corner is hitting. Because of this, my current code is not simulating a satisfying collision detection. As my hero walks on the ground, he randomly stops because the bottom corners not only touch the top of the tiles, but also the sides it seems.&#xD;&#xA;&#xD;&#xA;###**UPDATE**###&#xD;&#xA;So I changed my code based on the first answer by **bummzack**. Using center points of each side of player entity instead of each corner. And now my character slides down walls without getting stuck and walks across grounds fairly smoothly, but another problem arises. If the player jumps on a tile, and the center part of the bottom is NOT within the tiles width, he falls right through. And this is because I am just comparing a POINT (the center point specifically) and not the full bottom side against the top of the tile beneath the player.&#xD;&#xA;&#xD;&#xA;Here's a link to the **SWF-file**, http://dl.dropbox.com/u/28271061/_TileGameFLA.swf  , X to JUMP, Z to RUN, ARROWKEYS to MOVE, which should give you a visual example of what's happening:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the **UPDATED** code (all collision code is within &quot;collisionCheck&quot; function)&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;		private function onKEYDOWN(event:KeyboardEvent):void{&#xD;&#xA;			var pressedKey = event.keyCode;&#xD;&#xA;			&#xD;&#xA;			if(pressedKey == Keyboard.RIGHT){&#xD;&#xA;				rightKey = true;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(pressedKey == Keyboard.LEFT){&#xD;&#xA;				leftKey = true;&#xD;&#xA;			}&#xD;&#xA;			if(pressedKey == Keyboard.Z){&#xD;&#xA;				runKey = true;&#xD;&#xA;			}&#xD;&#xA;			if(pressedKey == Keyboard.X){&#xD;&#xA;				jumpKey = true;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function onKEYUP(event:KeyboardEvent):void{&#xD;&#xA;			var releasedKey = event.keyCode;&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.RIGHT){&#xD;&#xA;				rightKey = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(releasedKey == Keyboard.LEFT){&#xD;&#xA;				leftKey = false;&#xD;&#xA;			}&#xD;&#xA;			if(releasedKey == Keyboard.Z){&#xD;&#xA;				runKey = false;&#xD;&#xA;			}&#xD;&#xA;			if(releasedKey == Keyboard.X){&#xD;&#xA;				jumpKey = false;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		private function collisionCheck():void{&#xD;&#xA;			&#xD;&#xA;			centerY = Math.floor((theHero.y + (theHero.width/2))/ts);&#xD;&#xA;			centerX = Math.floor((theHero.x + (theHero.width/2))/ts);&#xD;&#xA;			top = Math.floor(theHero.y / ts);&#xD;&#xA;			bottom = Math.floor((theHero.y + theHero.height) / ts);&#xD;&#xA;			left = Math.floor(theHero.x / ts);&#xD;&#xA;			right = Math.floor((theHero.x + theHero.width) / ts);&#xD;&#xA;			&#xD;&#xA;			//If there is no ground under the player, start falling.&#xD;&#xA;			if(curMap[bottom][centerX] != 1 &amp;&amp; curMap[bottom][centerX] != 1){&#xD;&#xA;				gravity = 3;&#xD;&#xA;				onGround = false;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vy &gt; 0 &amp;&amp; oldBottom &lt; bottom){&#xD;&#xA;				&#xD;&#xA;				if(curMap[bottom][centerX] != 0){//If either on of the bottom corners are touching a &quot;1&quot;-tile (a wall)&#xD;&#xA;					&#xD;&#xA;					theHero.y = ((bottom - 1) * ts) + 2 ;&#xD;&#xA;					gravity = 0;&#xD;&#xA;					vy = 0;&#xD;&#xA;					onGround = true;&#xD;&#xA;					jumped = false;&#xD;&#xA;					jumpSpeed = 9;&#xD;&#xA;					&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vy &lt; 0 &amp;&amp; oldTop &gt; top){&#xD;&#xA;				if(curMap[top][centerX] != 0){&#xD;&#xA;					theHero.y = (top + 1) * ts; &#xD;&#xA;					gravity = 3;&#xD;&#xA;					vy = 0;&#xD;&#xA;					jumpSpeed = 0;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(vx &lt; 0 &amp;&amp; oldLeft &gt; left ){&#xD;&#xA;				if(curMap[centerY][left] != 0){&#xD;&#xA;					vx = 0;&#xD;&#xA;					theHero.x = (left + 1) * ts;&#xD;&#xA;					&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			trace(curMap[bottom][centerX]);&#xD;&#xA;			if(vx &gt; 0 &amp;&amp; oldRight &lt; right ){&#xD;&#xA;				if(curMap[centerY][right] != 0 ){&#xD;&#xA;					vx = 0;&#xD;&#xA;					theHero.x = ((right - 1) * ts )+ 1.8; // 1.8 so it doesnt touch wall, it goes right through if its the accurate 2.0&#xD;&#xA;					&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		private function moveChar():void{&#xD;&#xA;			&#xD;&#xA;			if(rightKey){&#xD;&#xA;				if(runKey){&#xD;&#xA;					vx = 7;&#xD;&#xA;				}else{&#xD;&#xA;					vx = 4;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			if(leftKey){&#xD;&#xA;				if(runKey){&#xD;&#xA;					vx = -7;&#xD;&#xA;				}else{&#xD;&#xA;					vx = -4;&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			//Stand still if you're not pressing left or right ON THE GROUND (in air you should after one key press)&#xD;&#xA;			if(!leftKey &amp;&amp; !rightKey &amp;&amp; onGround){&#xD;&#xA;				vx = 0;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			if(jumpKey &amp;&amp; jumpSpeed &gt; 1 &amp;&amp; !jumped){&#xD;&#xA;				vy -= jumpSpeed;&#xD;&#xA;				jumpSpeed *= 0.8;&#xD;&#xA;				onGround = false;&#xD;&#xA;				gravity = 3;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			vy += gravity;&#xD;&#xA;			&#xD;&#xA;			if(vy &gt; 14){&#xD;&#xA;				vy = 14;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		private function onENTERFRAME(event:Event):void{&#xD;&#xA;			&#xD;&#xA;			if(myStage.stage.focus != myStage){&#xD;&#xA;				myStage.stage.focus = myStage;&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			//These variables represent where the hero WAS before being moved&#xD;&#xA;			//, this helps to see if hero approached the tile from the left/right/top/bottom&#xD;&#xA;			//, thus gives us an additional way to check where player is coming from&#xD;&#xA;			oldBottom = Math.floor((theHero.y + theHero.height) / ts);&#xD;&#xA;			oldLeft = Math.floor(theHero.x / ts);&#xD;&#xA;			oldRight = Math.floor(theHero.x + theHero.width) / ts;&#xD;&#xA;			oldTop = Math.floor(theHero.y / ts);&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			moveChar();&#xD;&#xA;			&#xD;&#xA;			theHero.y += vy;&#xD;&#xA;			theHero.x += vx;&#xD;&#xA;			&#xD;&#xA;			collisionCheck();&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is by far not the smartest way to check collisons, but I think it might work well enough. I just need someone to throw me in the right direction for making a solid collision detection engine for a simple tile based game.&#xD;&#xA;" />
  <row Id="28441" PostHistoryTypeId="2" PostId="12883" RevisionGUID="fb582e2d-62b3-4159-a5a2-b5557892eff9" CreationDate="2011-05-29T23:05:46.097" UserId="5932" Text="So I'm starting work on a multi-player space shooter. And I've run into some issues. As I type this, my system is currently:&#xD;&#xA;&#xD;&#xA;    //Main While Loop&#xD;&#xA;    Gather Input&#xD;&#xA;    Update Own Sprites Based on Input&#xD;&#xA;    Send Position Information to Server. [Owner,Obj#,Image,X,Y,Theta] (TCP)&#xD;&#xA;    Receive All Position Information for All Objects From Server&#xD;&#xA;    Update Game Screen.&#xD;&#xA;&#xD;&#xA;Now I won't end up using this, it's for the initial networking testing phase. I'll probably end up using dead reckoning. However I have a couple questions:&#xD;&#xA;&#xD;&#xA;*1:* I am using TCP for all my networking. However it jumps and skips if you drop any packets at all, so I'd like to switch to UDP and have a numbering mechanism to make sure all packets arrive. Is there a preferred Networking Schema for game communication?&#xD;&#xA;&#xD;&#xA;*2:* For critical things like object hits with bullets Should I implement a second port for these important events, or just use the same UDP proto? &#xD;&#xA;&#xD;&#xA;*3:* (Side Question) How should I regulate my framerate with the networked game? I don't want to have an unnecessary Sleep in each frame..." />
  <row Id="28442" PostHistoryTypeId="1" PostId="12883" RevisionGUID="fb582e2d-62b3-4159-a5a2-b5557892eff9" CreationDate="2011-05-29T23:05:46.097" UserId="5932" Text="Networking SFML Berkley Sockets" />
  <row Id="28443" PostHistoryTypeId="3" PostId="12883" RevisionGUID="fb582e2d-62b3-4159-a5a2-b5557892eff9" CreationDate="2011-05-29T23:05:46.097" UserId="5932" Text="&lt;game-design&gt;&lt;c++&gt;&lt;programming&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="28444" PostHistoryTypeId="25" PostId="12883" RevisionGUID="135b0c8e-cb66-4bf6-b602-99e6f58180e0" CreationDate="2011-05-30T00:13:16.650" Comment="http://twitter.com/#!/StackGameDev/status/74991729954136064" />
  <row Id="28445" PostHistoryTypeId="2" PostId="12884" RevisionGUID="35ed5df3-a4a0-44f6-879f-9f5734f44613" CreationDate="2011-05-30T00:31:29.363" UserId="7652" Text="If I am iterating through a 3D array of tiles and I care about the neighbors, I maintain an index of each neighbor for quick access.  I also store an empty row for neighbors outside of the array.  Your code would only be more simple with a 2D array.  I apologize for the mess, this is prototyping code.  Most complex conditionals is only performed for the first cell of each row.  It also has code for reading neighbors cells of neighboring arrays.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		static short empties[256] = {0};&#xD;&#xA;		short *down, *up, *east, *west, *north, *south;&#xD;&#xA;		short *tiles = this-&gt;tiles, *tile = this-&gt;tiles, *empty = &amp;empties[0];&#xD;&#xA;		int index = 0, skip; // Skip is cells skipped.&#xD;&#xA;		&#xD;&#xA;		for (int z = 0; z &lt; SEGMENT_DEPTH; ++z)&#xD;&#xA;		{&#xD;&#xA;			down = (z == 0) ? empty : (tile - SEGMENT_WIDTH * SEGMENT_HEIGHT);&#xD;&#xA;			up = (z == SEGMENT_DEPTH-1) ? empty : (tile + SEGMENT_WIDTH * SEGMENT_HEIGHT);&#xD;&#xA;&#xD;&#xA;			for (int y = 0; y &lt; SEGMENT_HEIGHT; ++y)&#xD;&#xA;			{&#xD;&#xA;				south = (y == 0) ? ( (this-&gt;south) ? &amp;this-&gt;south-&gt;tiles[z * SEGMENT_WIDTH * SEGMENT_HEIGHT + SEGMENT_WIDTH * (SEGMENT_WIDTH-1)] : empty ) : (tile - SEGMENT_HEIGHT);&#xD;&#xA;				north = (y == SEGMENT_HEIGHT-1) ? ( (this-&gt;north) ? &amp;this-&gt;north-&gt;tiles[z * SEGMENT_WIDTH * SEGMENT_HEIGHT] : empty ) : (tile + SEGMENT_HEIGHT);&#xD;&#xA;				skips = 0;&#xD;&#xA;&#xD;&#xA;				for (int x = 0; x &lt; SEGMENT_WIDTH; ++x, ++tile, ++skips)&#xD;&#xA;				{&#xD;&#xA;					if (*tile == 0)&#xD;&#xA;						continue; // skip empty tiles&#xD;&#xA;&#xD;&#xA;					up += skips, down += skips, south += skips, north += skips;&#xD;&#xA;					west = (x == 0) ? ( (this-&gt;west) ? &amp;this-&gt;west-&gt;tiles[z * SEGMENT_WIDTH * SEGMENT_HEIGHT + y * SEGMENT_HEIGHT + SEGMENT_WIDTH - 1] : empty ) : (tile - 1);&#xD;&#xA;					east = (x == SEGMENT_WIDTH-1) ? ( (this-&gt;east) ? &amp;this-&gt;east-&gt;tiles[z * SEGMENT_WIDTH * SEGMENT_HEIGHT + y * SEGMENT_HEIGHT + 0] : empty ) : (tile + 1);					&#xD;&#xA;					skips = 0;&#xD;&#xA;&#xD;&#xA;					if (*up != 0 &amp;&amp; *down != 0 &amp;&amp; *west != 0 &amp;&amp; *east != 0 &amp;&amp; *north != 0 &amp;&amp; *south != 0)&#xD;&#xA;						continue;&#xD;&#xA;    &#xD;&#xA;					// . . . DO WORK HERE . . .&#xD;&#xA;&#xD;&#xA;				}&#xD;&#xA;				up += skips, down += skips;&#xD;&#xA;			}" />
  <row Id="28446" PostHistoryTypeId="6" PostId="12883" RevisionGUID="30233caf-cd64-4e7e-82c5-e452b518fe7e" CreationDate="2011-05-30T00:49:08.520" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="28447" PostHistoryTypeId="2" PostId="12885" RevisionGUID="0a92a905-27e3-4bfe-aa85-8b8858ff506d" CreationDate="2011-05-30T01:41:36.507" UserId="7679" Text="  I am fairly new to openGL( 3 months ) and am asking for assistance in understanding the fundamentals behind gluLookAt(). &#xD;&#xA;&#xD;&#xA;  Currently I have spent most of my time with openGL modeling scenes with fixed views, and I wanted to begin using gluLookAt combined with keyboard and mouse callbacks to &quot;explore&quot; my scenes. I created a simple program to play around with the functionality of gluLookAt when I first realized I may not understand fully what is happening.&#xD;&#xA;&#xD;&#xA;  My program creates a world using glOrtho(-4,4, -4,4, -4,4) confining my area somewhat around the origin (0,0,0) upon which I place the standard glutSolidTeapot(0.5). Then in an attempt to create a &quot;camera&quot; revolve around the teapot, in an idle callback function I write this&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt( cos(business), 0, sin(business), 0.0,0.0,0.0, 0.0,1.0,0.0 /*up vector*/ );&#xD;&#xA;    glutPostRedisplay();&#xD;&#xA;&#xD;&#xA;Turns out, this worked. The view shows a revolving teapot. So I take another step and attempt to create an elliptical path around the teapot, multiplying either cos() or sin() (not both) by 2. This works as well but does not have the same effect I was expecting. The view rotates around the teapot, but I imagined along the path the teapot would &quot;appear&quot; to be closer at points, a zooming in effect of sorts. This leads to my question.&#xD;&#xA;&#xD;&#xA;What exactly do I not understand about this?&#xD;&#xA;  or.. &#xD;&#xA;Why is this not doing what I am expecting? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="28448" PostHistoryTypeId="1" PostId="12885" RevisionGUID="0a92a905-27e3-4bfe-aa85-8b8858ff506d" CreationDate="2011-05-30T01:41:36.507" UserId="7679" Text="Help understanding gluLookAt()" />
  <row Id="28449" PostHistoryTypeId="3" PostId="12885" RevisionGUID="0a92a905-27e3-4bfe-aa85-8b8858ff506d" CreationDate="2011-05-30T01:41:36.507" UserId="7679" Text="&lt;opengl&gt;&lt;c++&gt;" />
  <row Id="28450" PostHistoryTypeId="2" PostId="12886" RevisionGUID="96378857-b0cf-46d3-8910-3f5779d8db93" CreationDate="2011-05-30T02:11:13.593" UserId="3794" Text="That is simple. You are using ortho graphic projection (viewing rays are paralel), so it doesn't make any difference if you are at distance 1 or 100.&#xD;&#xA;&#xD;&#xA;Use [gluPerspective][1] and it will work how you expect. &#xD;&#xA;&#xD;&#xA;*(left img ortho projection, right img perspective proj)*&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Gk6rg.gif&quot; width=&quot;300&quot;&gt;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/tnM8y.gif&quot; width=&quot;300&quot;&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[img source][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml&#xD;&#xA;  [2]: http://www.felixgers.de/teaching/jogl/orthoProjection.html" />
  <row Id="28451" PostHistoryTypeId="5" PostId="12886" RevisionGUID="5457ad48-bafd-4e1a-a28a-201503d8ac6e" CreationDate="2011-05-30T02:17:10.413" UserId="3794" Comment="added 349 characters in body; added 1 characters in body" Text="That is simple. You are using ortho graphic projection (viewing rays are parallel), so it doesn't make any difference if you are at distance 1 or 100.&#xD;&#xA;&#xD;&#xA;Use [gluPerspective][1] and it will work how you expect. &#xD;&#xA;&#xD;&#xA;*(left img ortho projection, right img perspective proj)*&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Gk6rg.gif&quot; width=&quot;300&quot;&gt;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/tnM8y.gif&quot; width=&quot;300&quot;&gt;&#xD;&#xA;&#xD;&#xA;your code may look like this:&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    gluPerspective(	PI / 3.0f, window_width/window_height, zNear, zFar);&#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt( cos(business) * radius, 0, sin(business) * radius, 0.0,0.0,0.0, 0.0,1.0,0.0 /*up vector*/ );&#xD;&#xA;    glutPostRedisplay();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[img source][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml&#xD;&#xA;  [2]: http://www.felixgers.de/teaching/jogl/orthoProjection.html" />
  <row Id="28452" PostHistoryTypeId="5" PostId="12885" RevisionGUID="567db00c-fec8-4ba5-9525-da7177fdf676" CreationDate="2011-05-30T02:20:54.017" UserId="3794" Comment="added tags" Text="  I am fairly new to openGL( 3 months ) and am asking for assistance in understanding the fundamentals behind gluLookAt(). &#xD;&#xA;&#xD;&#xA;  Currently I have spent most of my time with openGL modeling scenes with fixed views, and I wanted to begin using gluLookAt combined with keyboard and mouse callbacks to &quot;explore&quot; my scenes. I created a simple program to play around with the functionality of gluLookAt when I first realized I may not understand fully what is happening.&#xD;&#xA;&#xD;&#xA;  My program creates a world using `glOrtho(-4,4, -4,4, -4,4)` confining my area somewhat around the origin (0,0,0) upon which I place the standard `glutSolidTeapot(0.5)`. Then in an attempt to create a &quot;camera&quot; revolve around the teapot, in an idle callback function I write this&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt( cos(business), 0, sin(business), 0.0,0.0,0.0, 0.0,1.0,0.0 /*up vector*/ );&#xD;&#xA;    glutPostRedisplay();&#xD;&#xA;&#xD;&#xA;Turns out, this worked. The view shows a revolving teapot. So I take another step and attempt to create an elliptical path around the teapot, multiplying either cos() or sin() (not both) by 2. This works as well but does not have the same effect I was expecting. The view rotates around the teapot, but I imagined along the path the teapot would &quot;appear&quot; to be closer at points, a zooming in effect of sorts. This leads to my question.&#xD;&#xA;&#xD;&#xA;What exactly do I not understand about this?&#xD;&#xA;  or.. &#xD;&#xA;Why is this not doing what I am expecting? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="28453" PostHistoryTypeId="6" PostId="12885" RevisionGUID="567db00c-fec8-4ba5-9525-da7177fdf676" CreationDate="2011-05-30T02:20:54.017" UserId="3794" Comment="added tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;matrix&gt;&lt;projection&gt;" />
  <row Id="28454" PostHistoryTypeId="2" PostId="12887" RevisionGUID="abbe20cc-f473-4b40-b1fe-a4aceaa4ba4c" CreationDate="2011-05-30T02:26:21.480" UserId="1101" Text="&gt; 1: I am using TCP for all my networking. However it jumps and skips if you drop any packets at all, so I'd like to switch to UDP and have a numbering mechanism to make sure all packets arrive. &#xD;&#xA;&#xD;&#xA;Then you will just have reimplemented TCP on top of UDP, and will get exactly the same symptoms you describe.&#xD;&#xA;&#xD;&#xA;If you really can't cope with TCP - and most games can - the solution is not to code your own method of resending packets, but to ensure that most of your data can be lost without a problem. For example, object positions are rarely important enough to require a resend unless they reflect a final destination after which no further movement will be sent. `Receive All Position Information for All Objects From Server` is generally not practical. `Receive whatever movement information is available` is what you'd typically do instead.&#xD;&#xA;&#xD;&#xA;&gt; Is there a preferred Networking Schema for game communication?&#xD;&#xA;&#xD;&#xA;No.&#xD;&#xA;&#xD;&#xA;&gt; 2: For critical things like object hits with bullets Should I implement a second port for these important events, or just use the same UDP proto?&#xD;&#xA;&#xD;&#xA;Use the same port. Your messages should have a flag in them that indicates whether they are reliable or unreliable. The reliable messages (ie. the important ones) will also contain a sequence number, allowing you to spot if any are missing. If one does appear to be missing (ie. the incoming sequence number is bigger than the last sequence number plus 1) then buffer the message and wait. Allow a certain amount of time for reordering (eg. 50ms, 100ms, whatever) and then ask the other side to resend whatever is missing. It's best if you can include this information inside a message you were going to send anyway, to avoid sending extra packets (which is the last thing you want to be doing when the network connection is poor).&#xD;&#xA;&#xD;&#xA;More info here: http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/&#xD;&#xA;&#xD;&#xA;&gt; 3: (Side Question) How should I regulate my framerate with the networked game? I don't want to have an unnecessary Sleep in each frame...&#xD;&#xA;&#xD;&#xA;The network is just an input source like any other - it has no effect on how you handle your rendering frame rate. It's often wise to separate out the logic updates so that they happen the same number of times per second no matter how fast your rendering is going: see http://gafferongames.com/game-physics/fix-your-timestep/ for more details." />
  <row Id="28455" PostHistoryTypeId="2" PostId="12888" RevisionGUID="df48aefb-8d7b-4214-b737-3ad29ad22b7e" CreationDate="2011-05-30T02:38:26.473" UserId="7432" Text="I am building a tower defense game for android where you have to defend the base from mobsters who have a bounty on your head. You start out with a certain amount of life, every time an enemy reaches your base you lose 1 health till you shoot them. I keep score cause later I plan on implementing that into the game as currency. You touch where you want to shoot. I have been looking at LunarView, JetBoyView, CanvasSurfaceView (SpriteMethodTest) files to try and come up with a good canvas structure for the game. I used the bits and pieces I could from all three. The thing that has me a little confused is that in the Jet Boy and Lunar Lander projects the game is done in the Views while with the Sprite Method Test it is split up between the CanvasSurfaceView and CanvasTestActivity. I was wandering as to how I should structure my View file. Should I run everything in my View class or split between the View and Game class.&#xD;&#xA;&#xD;&#xA;Current Methods in View:&#xD;&#xA;&#xD;&#xA; - MobView(Context context, AttributeSet attrs)&#xD;&#xA; - getThread()&#xD;&#xA; - surfaceChanged&#xD;&#xA; - SurfaceDestroyed&#xD;&#xA; - SurfaceCreated&#xD;&#xA; - onWindowFocusChange&#xD;&#xA; - MobThread&#xD;&#xA;&#xD;&#xA;Methods in Thread:&#xD;&#xA;onRun, onPause, onResume, setRunning, setMode, setSurfacesize, MobThread, doDraw, updateGame&#xD;&#xA;&#xD;&#xA;I have the Game AI code written is pseudo code till I figure out where I would have to put it at and whether I should use a While loop or If-else statement (it's set up for either one)." />
  <row Id="28456" PostHistoryTypeId="1" PostId="12888" RevisionGUID="df48aefb-8d7b-4214-b737-3ad29ad22b7e" CreationDate="2011-05-30T02:38:26.473" UserId="7432" Text="Tower Defense Game SurfaceView Structure" />
  <row Id="28457" PostHistoryTypeId="3" PostId="12888" RevisionGUID="df48aefb-8d7b-4214-b737-3ad29ad22b7e" CreationDate="2011-05-30T02:38:26.473" UserId="7432" Text="&lt;java&gt;&lt;android&gt;&lt;tower-defense&gt;" />
  <row Id="28458" PostHistoryTypeId="25" PostId="12885" RevisionGUID="8ccae15b-b8cb-4730-bf22-e689b9d3f718" CreationDate="2011-05-30T03:13:17.903" Comment="http://twitter.com/#!/StackGameDev/status/75037033852186624" />
  <row Id="28463" PostHistoryTypeId="2" PostId="12891" RevisionGUID="01e0cc2b-352b-47b6-a754-55bc82fecf0d" CreationDate="2011-05-30T05:34:10.293" UserId="284" Text="In a game, I would recommend replacing &quot;captcha&quot; with &quot;puzzle mini-game&quot;.  The difference being the level of fun involved.  There're really little reason for a captcha in a game unless you have tried a custom mini-game and that is still getting botted.  In which case make it require more intelligent tactics." />
  <row Id="28465" PostHistoryTypeId="5" PostId="12886" RevisionGUID="5a3942b3-bc97-498f-b1c3-86addbdf4d3a" CreationDate="2011-05-30T06:21:19.033" UserId="3794" Comment="deleted 1 characters in body" Text="That is simple. You are using orthographic projection (viewing rays are parallel), so it doesn't make any difference if you are at distance 1 or 100.&#xD;&#xA;&#xD;&#xA;Use [gluPerspective][1] and it will work how you expect. &#xD;&#xA;&#xD;&#xA;*(left img ortho projection, right img perspective proj)*&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/Gk6rg.gif&quot; width=&quot;300&quot;&gt;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/tnM8y.gif&quot; width=&quot;300&quot;&gt;&#xD;&#xA;&#xD;&#xA;your code may look like this:&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_PROJECTION);&#xD;&#xA;    gluPerspective(	PI / 3.0f, window_width/window_height, zNear, zFar);&#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    glLoadIdentity();&#xD;&#xA;    gluLookAt( cos(business) * radius, 0, sin(business) * radius, 0.0,0.0,0.0, 0.0,1.0,0.0 /*up vector*/ );&#xD;&#xA;    glutPostRedisplay();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[img source][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml&#xD;&#xA;  [2]: http://www.felixgers.de/teaching/jogl/orthoProjection.html" />
  <row Id="28471" PostHistoryTypeId="5" PostId="12398" RevisionGUID="93c03840-2db4-4147-90e0-f11d38eb75c4" CreationDate="2011-05-30T07:47:03.157" UserId="1199" Comment="added 133 characters in body" Text="&lt;h1&gt;Write your game, and you will have your engine.&lt;/h1&gt;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;I'm in the same position as you and your team, I just bought these with the certain thought that they would help us out in our endeavour:&#xD;&#xA;&#xD;&#xA;* [Game Coding Complete][14] (9781584506805)&#xD;&#xA;* [Game Engine Architecture][15] (9781568814131)&#xD;&#xA;* [Real-Time Rendering][3] (9781568814247)&#xD;&#xA;* [Multi-Threaded Game Engine Design][4] (9781435454170)&#xD;&#xA;* [Game Programming Gems 1][13] (9781584500490)&#xD;&#xA;* [Game Programming Gems 2][12] (9781584500544)&#xD;&#xA;* [Game Programming Gems 3][11] (9781584502333)&#xD;&#xA;* [Game Programming Gems 4][5] (9781584502951)&#xD;&#xA;* [Game Programming Gems 5 Book/CD Package][6] (9781584503521)&#xD;&#xA;* [Game Programming Gems 6 Book/CD Package][8] (9781584504504)&#xD;&#xA;* [Game Programming Gems 7 Book/CD Package][7] (9781584505273)&#xD;&#xA;* [Game Programming Gems 8 Book/CD Package][10] (9781584507024&#xD;&#xA;* [Best of Game Programming Gems Book/CD Package][16] (9781584505716)&#xD;&#xA;* [Real-Time Collision Detection Book/CD Package][9] (9781558607323))&#xD;&#xA;* [Beginning Game Programming 3rd Edition Book/CD...][1] (9781435454279)&#xD;&#xA;* [Advanced 2D Game Development][2] (9781598633429)&#xD;&#xA;&#xD;&#xA;Check them out, and see if they contain solutions to problems you might meet!&#xD;&#xA;&#xD;&#xA;*(For a complete Table of Contents for the GPG series, look [here](http://zolomon.com/game-programming-gems-table-of-contents/))*&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-Game-Programming-Jonathan-Harbour/dp/1435454278/&#xD;&#xA;  [2]: http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/&#xD;&#xA;  [3]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/&#xD;&#xA;  [4]: http://www.amazon.com/Multi-Threaded-Engine-Design-Jonathan-Harbour/dp/1435454170/&#xD;&#xA;  [5]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/&#xD;&#xA;  [6]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584503521/&#xD;&#xA;  [7]: http://www.amazon.com/Game-Programming-Gems/dp/1584505273/&#xD;&#xA;  [8]: http://www.amazon.com/Game-Programming-Gems-Book-CD-ROM/dp/1584504501/&#xD;&#xA;  [9]: http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/&#xD;&#xA;  [10]: http://www.amazon.com/Game-Programming-Gems-Adam-Lake/dp/1584507020/&#xD;&#xA;  [11]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584502339/&#xD;&#xA;  [12]: http://www.amazon.com/Game-Programming-Gems-CD-Vol/dp/1584500549/&#xD;&#xA;  [13]: http://www.amazon.com/Game-Programming-Gems-CD/dp/1584500492/&#xD;&#xA;  [14]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/&#xD;&#xA;  [15]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/&#xD;&#xA;  [16]: http://www.amazon.com/Best-Game-Programming-Gems-DeLoura/dp/1584505710/" />
  <row Id="28475" PostHistoryTypeId="5" PostId="12398" RevisionGUID="634bd050-b1c4-4a34-9b34-7d1624bb7e35" CreationDate="2011-05-30T08:11:33.890" UserId="1199" Comment="added 5 characters in body" Text="&lt;h1&gt;Write your game, and you will have your engine.&lt;/h1&gt;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;I'm in the same position as you and your team, I just bought these with the certain thought that they would help us out in our endeavour:&#xD;&#xA;&#xD;&#xA;* [Game Coding Complete][14] (9781584506805)&#xD;&#xA;* [Game Engine Architecture][15] (9781568814131)&#xD;&#xA;* [Real-Time Rendering][3] (9781568814247)&#xD;&#xA;* [Multi-Threaded Game Engine Design][4] (9781435454170)&#xD;&#xA;* [Game Programming Gems 1][13] (9781584500490)&#xD;&#xA;* [Game Programming Gems 2][12] (9781584500544)&#xD;&#xA;* [Game Programming Gems 3][11] (9781584502333)&#xD;&#xA;* [Game Programming Gems 4][5] (9781584502951)&#xD;&#xA;* [Game Programming Gems 5 Book/CD Package][6] (9781584503521)&#xD;&#xA;* [Game Programming Gems 6 Book/CD Package][8] (9781584504504)&#xD;&#xA;* [Game Programming Gems 7 Book/CD Package][7] (9781584505273)&#xD;&#xA;* [Game Programming Gems 8 Book/CD Package][10] (9781584507024&#xD;&#xA;* [Best of Game Programming Gems Book/CD Package][16] (9781584505716)&#xD;&#xA;* [Real-Time Collision Detection Book/CD Package][9] (9781558607323))&#xD;&#xA;* [Beginning Game Programming 3rd Edition Book/CD...][1] (9781435454279)&#xD;&#xA;* [Advanced 2D Game Development][2] (9781598633429)&#xD;&#xA;&#xD;&#xA;Check them out, and see if they contain solutions to problems you might meet!&#xD;&#xA;&#xD;&#xA;&gt; *(For a complete Table of Contents for the GPG series, look&#xD;&#xA;&gt; [here](http://zolomon.com/game-programming-gems-table-of-contents/))*&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-Game-Programming-Jonathan-Harbour/dp/1435454278/&#xD;&#xA;  [2]: http://www.amazon.com/Advanced-Game-Development-Jonathan-Harbour/dp/1598633422/&#xD;&#xA;  [3]: http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/&#xD;&#xA;  [4]: http://www.amazon.com/Multi-Threaded-Engine-Design-Jonathan-Harbour/dp/1435454170/&#xD;&#xA;  [5]: http://www.amazon.com/Game-Programming-Gems-v/dp/1584502959/&#xD;&#xA;  [6]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584503521/&#xD;&#xA;  [7]: http://www.amazon.com/Game-Programming-Gems/dp/1584505273/&#xD;&#xA;  [8]: http://www.amazon.com/Game-Programming-Gems-Book-CD-ROM/dp/1584504501/&#xD;&#xA;  [9]: http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/&#xD;&#xA;  [10]: http://www.amazon.com/Game-Programming-Gems-Adam-Lake/dp/1584507020/&#xD;&#xA;  [11]: http://www.amazon.com/Game-Programming-Gems-CD-v/dp/1584502339/&#xD;&#xA;  [12]: http://www.amazon.com/Game-Programming-Gems-CD-Vol/dp/1584500549/&#xD;&#xA;  [13]: http://www.amazon.com/Game-Programming-Gems-CD/dp/1584500492/&#xD;&#xA;  [14]: http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/dp/1584506806/&#xD;&#xA;  [15]: http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/&#xD;&#xA;  [16]: http://www.amazon.com/Best-Game-Programming-Gems-DeLoura/dp/1584505710/" />
  <row Id="28477" PostHistoryTypeId="2" PostId="12895" RevisionGUID="85a2863a-592a-4b70-9460-e59437509529" CreationDate="2011-05-30T08:26:22.670" UserId="674" Text="There is a very interesting article on the matter on Gamasutra: [Intelligent Mistakes: How to Incorporate Stupidity Into Your AI Code][1], by Mick West.&#xD;&#xA;&#xD;&#xA;This article talks about a Pool game AI. When implementing such an AI, it's quite easy to make it pot a ball at each shoot. A simplistic way to make the AI less &quot;smart&quot; is, as suggested on other answers, to add a random factor to the calculation, making the AI miss more.&#xD;&#xA;&#xD;&#xA;But there is two major flaws with such an approach. First, it's unpredictable. For a player playing in &quot;Easy&quot; mode, it's unacceptable that the AI gets &quot;lucky&quot;. What if your random factor makes the AI do an even better shot, hitting a more valuable ball, or doing a combo? You don't know what is going to happen, and being lucky shouldn't be an option for the AI on an easy mode.&#xD;&#xA;&#xD;&#xA;The other flaw is that the player will try to identify a pattern in the AI behaviors. And with a simple random factor, there is no pattern. But that doesn't mean the player won't see any pattern, quite the opposite, in fact. As soon as the AI gets lucky, the AI will see a strategy in its behavior. In the article, the players are complaining about the AI playing a position strategy. *When there's just a random factor in the angular precision*.&#xD;&#xA;&#xD;&#xA;From my point of view, after reading this eye-opening article, a non-perfect AI should never use randomization as a simplification factor. It's quite the opposite. **An easier AI should be smarter, but trying to help the player.**&#xD;&#xA;&#xD;&#xA;In the article Pool game example, the best option for implementing an &quot;easy mode&quot; AI was in fact to remove all random factor, and to add a positioning strategy. The AI would try to hit balls in order to prepare an easy and awesome shot *for the player*.&#xD;&#xA;&#xD;&#xA;This way, the player will think *he* got lucky. And that's what you're expecting for a game when playing it easy.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3947/intelligent_mistakes_how_to_.php" />
  <row Id="28480" PostHistoryTypeId="25" PostId="12888" RevisionGUID="ecee93c3-55bb-4b01-b224-85405cc31398" CreationDate="2011-05-30T09:13:19.023" Comment="http://twitter.com/#!/StackGameDev/status/75127636149534720" />
  <row Id="28481" PostHistoryTypeId="2" PostId="12897" RevisionGUID="1163b6e2-3e98-4b56-9a66-5d87100bab7b" CreationDate="2011-05-30T09:14:42.923" UserId="7684" Text="I'm looking for how to make 3D gauge on Windows Phone 7, that's mean a 3D object (a watch for example) with a basic 2D texture (= Numbers of my watch) and a rotating 2D texture (=neddle of my watch). The shaders can't be used for this (WP7 !!).&#xD;&#xA;&#xD;&#xA;I did not find anything on this (books or internet).&#xD;&#xA;&#xD;&#xA;There are 2 big problems for me :&#xD;&#xA;   1) load 2 textures on the same object.&#xD;&#xA;   2) rotating one of this 2D texture and update it on the 3D model.&#xD;&#xA;&#xD;&#xA;algorithmic I use for is:&#xD;&#xA;&#xD;&#xA; In LoadContent()&#xD;&#xA;&#xD;&#xA; 1) load 3D model + Final 2Dtexture  + Basic 2Dtexture and rotating 2Dtextures  &#xD;&#xA; 2) Apply final 2Dtexture on 3D object&#xD;&#xA; 3) Load RenderTarget2D and SpriteBatch&#xD;&#xA;&#xD;&#xA; In Draw()&#xD;&#xA;&#xD;&#xA; 1)Use TargetRender as back buffer&#xD;&#xA; 2)draw Basic 2dTexture and Rotate Rotating 2Dtexture with spritebatch&#xD;&#xA; 3)put the back buffer into my Final 2DTexture&#xD;&#xA; 4) free the back buffer&#xD;&#xA;&#xD;&#xA;But that's not working at all !!!&#xD;&#xA;&#xD;&#xA;If you have idea or interesting links, thanks for help.&#xD;&#xA;&#xD;&#xA;JeanGil" />
  <row Id="28482" PostHistoryTypeId="1" PostId="12897" RevisionGUID="1163b6e2-3e98-4b56-9a66-5d87100bab7b" CreationDate="2011-05-30T09:14:42.923" UserId="7684" Text="How to make animated 2D texture on 3D cube with XNA 4" />
  <row Id="28483" PostHistoryTypeId="3" PostId="12897" RevisionGUID="1163b6e2-3e98-4b56-9a66-5d87100bab7b" CreationDate="2011-05-30T09:14:42.923" UserId="7684" Text="&lt;xna-4.0&gt;" />
  <row Id="28484" PostHistoryTypeId="2" PostId="12898" RevisionGUID="328934de-b88b-4101-9a0e-c305a2e46167" CreationDate="2011-05-30T09:20:09.780" UserId="5508" Text="The only library I could come up with that specifically deals with fluids is [Fluidic][1]. It is pretty alpha and only has one release, though.&#xD;&#xA;&#xD;&#xA;My recommendation would be, as I already mentioned in some comments on other answers, to use a standard physics engine like Box2D or Chipmunk and use a number of circles to model the water (with gravity) or gas (without gravity) and combine these together into one water or gas body. You can apply some constraints on the individual bodies to make them 'clump' together so you can simulate viscosity. Have a look at [this video][2] to see how the individual bodies (modelled as squares in the video) work together.&#xD;&#xA;&#xD;&#xA;The interesting part comes when you want combine multiple circles into body of water. The most straightforward solution I can come up with is drawing each circle as a [metaball][3] so they appear as part of a larger body. You can find the math and some example code behind these bodies [here][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/fluidic/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=0bL80G1HX9w&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Metaballs&#xD;&#xA;  [4]: http://www.niksula.hut.fi/~hkankaan/Homepages/metaballs.html" />
  <row Id="28485" PostHistoryTypeId="2" PostId="12899" RevisionGUID="319a4e46-2c8b-4955-8bff-c3b28cac16bc" CreationDate="2011-05-30T09:42:19.397" UserId="1839" Text="Since we can't solve all your requests in one question, my best advice is: search for tutorials with example programs. &#xD;&#xA;&#xD;&#xA;[Here][1] is one for XNA on Windows 7 including texture-loading and rendering. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively, please ask one specific question to focus on.&#xD;&#xA;&#xD;&#xA;  [1]: http://mobile.tutsplus.com/tutorials/windows/introduction-to-xna-on-windows-phone-7/" />
  <row Id="28486" PostHistoryTypeId="2" PostId="12900" RevisionGUID="143097fd-e9e7-4188-b715-e99447a7dff2" CreationDate="2011-05-30T09:42:28.537" UserId="7588" Text="I would create a seperate quad for the watch needle and rotate that instead.&#xD;&#xA;Remember you need to translate, rotate and then -translate to rotate around a specific point.&#xD;&#xA;&#xD;&#xA;If you do this, your first question should be invalid. If you still wish to do this however, you could pack the two textures into one file, then play around with the UV's to get the right texture at the right part." />
  <row Id="28488" PostHistoryTypeId="6" PostId="12769" RevisionGUID="822a3bd1-d3ab-4d4f-86cf-c2089210f219" CreationDate="2011-05-30T09:50:31.593" UserId="7437" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;programming&gt;&lt;tiles&gt;&lt;movement&gt;" />
  <row Id="28489" PostHistoryTypeId="2" PostId="12901" RevisionGUID="d154e094-0829-44cf-99c3-8265ea90064e" CreationDate="2011-05-30T11:05:06.220" UserId="4662" Text="I've seen people who've written in code where the graphics of a scene are rendered in response to WM_PAINT. I only ever rendered the scene once all Windows messages were done translating, and then rendered the scene. Is this the wrong way to go about it, or should I only use DirectX rendering in response to WM_PAINT?" />
  <row Id="28490" PostHistoryTypeId="1" PostId="12901" RevisionGUID="d154e094-0829-44cf-99c3-8265ea90064e" CreationDate="2011-05-30T11:05:06.220" UserId="4662" Text="WM_PAINT and Direct3D" />
  <row Id="28491" PostHistoryTypeId="3" PostId="12901" RevisionGUID="d154e094-0829-44cf-99c3-8265ea90064e" CreationDate="2011-05-30T11:05:06.220" UserId="4662" Text="&lt;directx&gt;&lt;windows&gt;" />
  <row Id="28492" PostHistoryTypeId="2" PostId="12902" RevisionGUID="eb84e1bd-afb7-4106-91da-77b5e2896d21" CreationDate="2011-05-30T11:20:15.207" UserId="7686" Text="As suggested by Tchalvak, I would go the 'puzzle mini-game' route, however I would reward a few points for passing it so as to make it more user-friendly" />
  <row Id="28493" PostHistoryTypeId="25" PostId="12901" RevisionGUID="55763ecb-343a-4ee0-8520-d3a960536a45" CreationDate="2011-05-30T12:13:19.293" Comment="http://twitter.com/#!/StackGameDev/status/75172935094108160" />
  <row Id="28494" PostHistoryTypeId="12" PostId="12825" RevisionGUID="08938221-ea9c-4777-a831-319e6f6f34ae" CreationDate="2011-05-30T12:16:55.613" UserId="5343" Text="[{&quot;Id&quot;:5343,&quot;DisplayName&quot;:&quot;Neil M&quot;}]" />
  <row Id="28495" PostHistoryTypeId="13" PostId="12825" RevisionGUID="bd8fcf7c-2b21-4a04-8096-576052d593df" CreationDate="2011-05-30T12:17:06.377" UserId="5343" Text="[{&quot;Id&quot;:5343,&quot;DisplayName&quot;:&quot;Neil M&quot;}]" />
  <row Id="28496" PostHistoryTypeId="5" PostId="12446" RevisionGUID="1ee9dd12-9048-4608-b9c7-fb3698611b8d" CreationDate="2011-05-30T12:58:31.863" UserId="2111" Comment="added 3510 characters in body" Text="The positions that you store within *cursorX* and *cursorY* hold the position of the cursor **relative to top left corner of your screen monitor** (since you add the ClientBounds to it). I'd guess that you used that exact position when drawing the circle, and since the *Draw* function takes a position **relative to the top left corner of the game window**, you'd be off by the position of the ClientBounds.&#xD;&#xA;&#xD;&#xA;But I have to ask: why are you holding the &quot;real&quot; value of the mouse position? Is there any particular reason why you're storing it instead of the usual positions return by *Mouse.GetState().X* and *Mouse.GetState().Y*?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA; &#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;After looking at your code, I think I found where the main problem is.&#xD;&#xA;&#xD;&#xA;When defining the transformation matrix for your camera, you apply a translation to the center of the screen, like so:&#xD;&#xA;&#xD;&#xA;    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;        Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;        Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)) *&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Height * 0.5f,&#xD;&#xA;                                             graphicsDevice.Viewport.Width * 0.5f, 0));&#xD;&#xA;&#xD;&#xA;the relevant part being:&#xD;&#xA;&#xD;&#xA;&gt; **Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Height * 0.5f, graphicsDevice.Viewport.Width * 0.5f,  0));**&#xD;&#xA;&#xD;&#xA;From the comment I'm guessing that someone proposed this solution and it probably is perfectly fine but here is how I've changed your code to make it work:&#xD;&#xA;&#xD;&#xA;Ok, so I changed a couple of things.&#xD;&#xA;&#xD;&#xA;First, I removed the translation to the center, making the camera point at the top left corner, like so (removed the last translation):&#xD;&#xA;&#xD;&#xA;    _transform =       // Thanks to o KB o for this solution&#xD;&#xA;        Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *&#xD;&#xA;        Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;        Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)));&#xD;&#xA;&#xD;&#xA;Then, in your *Game1.cs* file, I put the *player.Draw(spriteBatch)* call within the *spriteBatch.Begin()* call affected by the camera's transformations, since the player should be affected by the camera. Like so:&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                      SpriteSortMode.Immediate,&#xD;&#xA;                      SaveStateMode.SaveState,&#xD;&#xA;                      cam.get_transformation(GraphicsDevice));&#xD;&#xA;    &#xD;&#xA;    player.Draw(spriteBatch);&#xD;&#xA;    &#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;Basically, you just have to think differently from usual. It's all about understanding the difference between **screen** positions and **world** positions (well, that's how I call them). &#xD;&#xA;&#xD;&#xA;**Screen** positions are those that you use when you call *spriteBatch.Draw()*. They represent positions on your screen monitor.&#xD;&#xA;&#xD;&#xA;**World** positions are those within your virtual world. You have to convert these to screen positions before drawing (by using the camera transformation matrix with a *spriteBatch.Draw()* call).&#xD;&#xA;&#xD;&#xA;To illustrate the difference, here is an example:&#xD;&#xA;Let's say that you have a map with a size of 2500 x 2500. Your game window has a size of 500 x 500. Here is a quick drawing of that game world:&#xD;&#xA;![][1]&#xD;&#xA;&#xD;&#xA;The green rectangle represents your game world (the one with a 2500 x 2500 size). The red rectangle represents the camera view (the size of the game screen). The blue rectangle represents an object within the world.&#xD;&#xA;&#xD;&#xA;Now, the **world position** of that object would be (600, 600), because the world position is independent of where the camera is.&#xD;&#xA;&#xD;&#xA;The **screen position**, however, is relative to the top left camera position. So its screen position (where it is drawn) would be (100, 100).&#xD;&#xA;&#xD;&#xA;I think it's pretty clear with that example that to convert from a screen position to a world position, you must add the camera's position. To convert from world position to screen position, you must subtract the camera's position. &#xD;&#xA;&#xD;&#xA;So, anything that is *part* of your world holds a world position (like a player or bullets). Anything that is part of the user interface holds a screen position (like the amount of ammo left or the aim of the player). All you have to do is put all the objects drawn using world positions within the *spriteBatch.Draw()* call using the camera. All objects independent of the camera should be drawn on the next *spriteBatch.Draw()* call. &#xD;&#xA;&#xD;&#xA;So, let's go ahead and hide these implementation details within your Camera2D class:&#xD;&#xA;&#xD;&#xA;    public Vector2 GetScreenPosition(Vector2 worldPosition)&#xD;&#xA;    {&#xD;&#xA;        return worldPosition - Pos;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetWorldPosition(Vector2 screenPosition)&#xD;&#xA;    {&#xD;&#xA;        return screenPosition + Pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I guess that you were using a translation to the center of the screen to keep the player centered. So let's place the player to the center within the *LoadContent()* function:&#xD;&#xA;&#xD;&#xA;    player = new Player(new Rectangle(&#xD;&#xA;                            (int)(GraphicsDevice.Viewport.Width / 2f), &#xD;&#xA;                            (int)(GraphicsDevice.Viewport.Height / 2f), 50, 50), &#xD;&#xA;                        playertex, 5, bulletTex);&#xD;&#xA;&#xD;&#xA;Next, let's add camera movement support (I changed the code you were using since I'm not applying the center-screen camera translation anymore):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector2 cameraDirection = Vector2.Zero;&#xD;&#xA;    const int TO_MOVE_SIDE_DISTANCE = 150; // the distance to the side required to move.&#xD;&#xA;&#xD;&#xA;    Vector2 playerScreenPosition = cam.GetScreenPosition(new Vector2(&#xD;&#xA;                player.PlayerRect.X, player.PlayerRect.Y));&#xD;&#xA;    Rectangle playerScreenRect = new Rectangle((int)playerScreenPosition.X,&#xD;&#xA;                (int)playerScreenPosition.Y, player.PlayerRect.Width, player.PlayerRect.Height);&#xD;&#xA;&#xD;&#xA;    //We make the camera follow the player if he goes too close to the sides.&#xD;&#xA;    if (playerScreenRect.Left &lt; TO_MOVE_SIDE_DISTANCE) // move to the left&#xD;&#xA;    {&#xD;&#xA;        --cameraDirection.X;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Right &gt; GraphicsDevice.Viewport.Width - TO_MOVE_SIDE_DISTANCE) // move to the right&#xD;&#xA;    {&#xD;&#xA;        ++cameraDirection.X;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Top &lt; TO_MOVE_SIDE_DISTANCE) // move up&#xD;&#xA;    {&#xD;&#xA;        --cameraDirection.Y;&#xD;&#xA;    }&#xD;&#xA;    if (playerScreenRect.Bottom &gt; GraphicsDevice.Viewport.Height - TO_MOVE_SIDE_DISTANCE) // move down&#xD;&#xA;    {&#xD;&#xA;        ++cameraDirection.Y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    cam.Pos += cameraDirection * player._PlayerSpeed; // move with the player.&#xD;&#xA;&#xD;&#xA;So now the camera works. There's a new bug though: bullets start at the player's position, but are not aimed at the right place when the camera has been moved.&#xD;&#xA;&#xD;&#xA;This is because we're aiming using the **screen position** (the cursor position, actually), when really we're aiming within the world. So, we have to convert the cursor's position to a world position to be able to aim properly. The shooting happens inside the Player class:&#xD;&#xA;&#xD;&#xA;    Vector2 targetWorldPosition = cam.GetWorldPosition(&#xD;&#xA;        new Vector2(Mouse.GetState().X, Mouse.GetState().Y)); // we're aiming at an object within the world.&#xD;&#xA;&#xD;&#xA;    BulletList.Add(new Bullet(new Vector2(_PlayerRect.X, _PlayerRect.Y),&#xD;&#xA;        targetWorldPosition, 5, bulletTex, &#xD;&#xA;        new Rectangle(_PlayerRect.X, _PlayerRect.Y, bulletTex.Width,bulletTex.Height), 90));&#xD;&#xA;&#xD;&#xA;Notice that we're passing the target world position to the Bullet constructor now.&#xD;&#xA;&#xD;&#xA;There you go, you have a working camera system.&#xD;&#xA;&#xD;&#xA;I'm sure you could go with the centered transformation that you had at first, but I'm not used to that system. If you ever want to change system, just change the GetWorldPosition function, the GetScreenPosition function and the matrix transformation. Since those are hidden within the Camera2D class, changing the implementation details will be easy.&#xD;&#xA;&#xD;&#xA;I hope this helped!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**EDIT 2**&#xD;&#xA;&#xD;&#xA;To remove the problem where the camera transformation is applied twice when drawing the tile map, you must change this part of the code:&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                      SpriteSortMode.Immediate,&#xD;&#xA;                      SaveStateMode.SaveState,&#xD;&#xA;                      cam.get_transformation(GraphicsDevice));&#xD;&#xA;    &#xD;&#xA;    #region mapDrawing&#xD;&#xA;    &#xD;&#xA;    Vector2 firstSquare = new Vector2(cam.Pos.X / Tile.TileWidth, cam.Pos.Y / Tile.TileHeight);&#xD;&#xA;    int firstX = (int)firstSquare.X;&#xD;&#xA;    int firstY = (int)firstSquare.Y;&#xD;&#xA;    &#xD;&#xA;    Vector2 squareOffset = new Vector2(cam.Pos.X % Tile.TileWidth, cam.Pos.Y % Tile.TileHeight);&#xD;&#xA;    int offsetX = (int)squareOffset.X;&#xD;&#xA;    int offsetY = (int)squareOffset.Y;&#xD;&#xA;    &#xD;&#xA;    if (Mouse.GetState().LeftButton == ButtonState.Pressed)&#xD;&#xA;    {&#xD;&#xA;        Console.WriteLine(firstSquare + &quot; &quot; + squareOffset);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    for (int y = 0; y &lt; squaresDown; y++)&#xD;&#xA;    {&#xD;&#xA;        for (int x = 0; x &lt; squaresAcross; x++)&#xD;&#xA;        {&#xD;&#xA;            if(firstY &gt;=0 &amp;&amp; firstX &gt;=0)&#xD;&#xA;            foreach (int tileID in myMap.Rows[y + firstY].Columns[x + firstX].BaseTiles)&#xD;&#xA;            {&#xD;&#xA;                spriteBatch.Draw(&#xD;&#xA;                    Tile.TileSetTexture,&#xD;&#xA;                    new Rectangle(&#xD;&#xA;                        (x * Tile.TileWidth) - offsetX, (y * Tile.TileHeight) - offsetY,&#xD;&#xA;                        Tile.TileWidth, Tile.TileHeight),&#xD;&#xA;                    Tile.GetSourceRectangle(tileID),&#xD;&#xA;                    Color.White);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #endregion&#xD;&#xA;&#xD;&#xA;    player.Draw(spriteBatch, cam);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;The whole problem is that you tell the spriteBatch to use your camera's transformation with this statement:&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                      SpriteSortMode.Immediate,&#xD;&#xA;                      SaveStateMode.SaveState,&#xD;&#xA;                      cam.get_transformation(GraphicsDevice));&#xD;&#xA;&#xD;&#xA;but then you use the camera's position to find `firstSquare` and `squareOffset` (`cam.Pos.X / Tile.TileWidth`, `cam.Pos.Y % Tile.TileHeight`, etc).&#xD;&#xA;&#xD;&#xA;To avoid applying the transformation twice, you must use the camera's transformation only once by either moving that `Draw` call on a different `spriteBatch.Begin` call that doesn't apply the transformation, or by removing all the calculations involving the camera's position. I chose the latter since it makes simpler code:&#xD;&#xA;&#xD;&#xA;    spriteBatch.Begin(SpriteBlendMode.AlphaBlend,&#xD;&#xA;                      SpriteSortMode.Immediate,&#xD;&#xA;                      SaveStateMode.SaveState,&#xD;&#xA;                      cam.get_transformation(GraphicsDevice));&#xD;&#xA;    &#xD;&#xA;    #region mapDrawing&#xD;&#xA;    &#xD;&#xA;    for (int y = 0; y &lt; squaresDown; y++)&#xD;&#xA;    {&#xD;&#xA;        for (int x = 0; x &lt; squaresAcross; x++)&#xD;&#xA;        {&#xD;&#xA;            foreach (int tileID in myMap.Rows[y].Columns[x].BaseTiles)&#xD;&#xA;            {&#xD;&#xA;                spriteBatch.Draw(&#xD;&#xA;                    Tile.TileSetTexture,&#xD;&#xA;                    new Rectangle(&#xD;&#xA;                        (x * Tile.TileWidth), (y * Tile.TileHeight),&#xD;&#xA;                        Tile.TileWidth, Tile.TileHeight),&#xD;&#xA;                    Tile.GetSourceRectangle(tileID),&#xD;&#xA;                    Color.White);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #endregion&#xD;&#xA;&#xD;&#xA;    player.Draw(spriteBatch, cam);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;This should work. If you prefer the other method, just us another `spriteBatch.Begin()` call without the matrix parameter and use the code you already have.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/muLSV.png" />
  <row Id="28497" PostHistoryTypeId="2" PostId="12903" RevisionGUID="43866c47-f324-4ae7-b1de-facc3b6e9366" CreationDate="2011-05-30T13:08:46.100" UserId="6867" Text="I am having an issue with XNA, where I want to execute some code in my Update method, but only at a given interval, and only once. I would like to avoid booleans to check if I've already called it once, if possible.&#xD;&#xA;&#xD;&#xA;My code is here:&#xD;&#xA;&#xD;&#xA;        if ((gameTime.TotalGameTime.TotalMilliseconds % 500) == 0)&#xD;&#xA;        {&#xD;&#xA;            Caret.Visible = !Caret.Visible;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;As you may have guessed, it's for a TextBox control, to animate the caret between invisible and visible states. I just have reason to believe that it is called twice or maybe even 3 times in a single update-call, which is bad, and makes it look unstable and jumpy." />
  <row Id="28498" PostHistoryTypeId="1" PostId="12903" RevisionGUID="43866c47-f324-4ae7-b1de-facc3b6e9366" CreationDate="2011-05-30T13:08:46.100" UserId="6867" Text="Execute code at specific intervals, only once?" />
  <row Id="28499" PostHistoryTypeId="3" PostId="12903" RevisionGUID="43866c47-f324-4ae7-b1de-facc3b6e9366" CreationDate="2011-05-30T13:08:46.100" UserId="6867" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;timer&gt;&lt;time-management&gt;&lt;control&gt;" />
  <row Id="28500" PostHistoryTypeId="2" PostId="12904" RevisionGUID="97ae9897-507e-400b-aa1a-7e2a296ccb4a" CreationDate="2011-05-30T13:23:29.760" UserId="7375" Text="Your update function probably isn't called in multiples of 500ms every time, which is what your modulus would imply.&#xD;&#xA;&#xD;&#xA;You could save the last time it was called, then compare it with the current time , like&#xD;&#xA;&#xD;&#xA;    int lastcaret = gameTime.TotalGameTime.TotalMilliseconds;&#xD;&#xA;    // in loop&#xD;&#xA;    if((gameTime.TotalGameTime.TotalMilliseconds - lastcaret) &gt;= 500)&#xD;&#xA;      ToggleCaret();&#xD;&#xA;      Lastcaret = gameTime.TotalGameTime.TotalMilliseconds;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28501" PostHistoryTypeId="2" PostId="12905" RevisionGUID="6214b7b1-cf40-4f91-86e1-55184847c953" CreationDate="2011-05-30T13:23:36.427" UserId="288" Text="`TotalMilliseconds` is a `double`, so you should not be doing an equality comparison there. There is every chance that the timer gets a fraction of a millisecond off, and your conditional never triggers. Also, there is no mechanism in your description for that code to run more than once per update.&#xD;&#xA;&#xD;&#xA;I recommend storing an integer frame number somewhere: `int frameNumber;`&#xD;&#xA;&#xD;&#xA;Then, in your update function, simply do this:&#xD;&#xA;&#xD;&#xA;    frameNumber++;&#xD;&#xA;    Caret.Visible = (((frameNumber / 30) % 2) == 0);&#xD;&#xA;&#xD;&#xA;30 frames, at 60 frames per second, is 500 milliseconds.&#xD;&#xA;&#xD;&#xA;The alternative method, which is more useful for things that must be triggers (rather than the pulsing, as in your code), is to store a countdown timer: `double timeLeft;`&#xD;&#xA;&#xD;&#xA;And then do something like this:&#xD;&#xA;&#xD;&#xA;    timeLeft += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    const double triggerTime = 500;&#xD;&#xA;    if(timeLeft &gt; triggerTime)&#xD;&#xA;    {&#xD;&#xA;        timeLeft -= triggerTime;&#xD;&#xA;        Caret.Visible = !Caret.Visible;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;By the way: 500 milliseconds seems like a very fast rate for a caret blink? Perhaps slow it down a bit." />
  <row Id="28502" PostHistoryTypeId="5" PostId="12905" RevisionGUID="82e0ec7b-0a78-44c6-906d-ad4c8a82f871" CreationDate="2011-05-30T13:28:44.807" UserId="288" Comment="added 160 characters in body" Text="`TotalMilliseconds` is a `double`, so you should not be doing an equality comparison there. There is every chance that the timer gets a fraction of a millisecond off, and your conditional never triggers. Also, there is no mechanism in your description for that code to run more than once per update.&#xD;&#xA;&#xD;&#xA;I recommend storing an integer frame number somewhere: `int frameNumber;`&#xD;&#xA;&#xD;&#xA;Then, in your update function, simply do this:&#xD;&#xA;&#xD;&#xA;    frameNumber++;&#xD;&#xA;    Caret.Visible = (((frameNumber / 30) % 2) == 0);&#xD;&#xA;&#xD;&#xA;30 frames, at 60 frames per second, is 500 milliseconds.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The alternative method, which is more generally useful, is to store a countdown timer: `double timeLeft;`&#xD;&#xA;&#xD;&#xA;And then do something like this:&#xD;&#xA;&#xD;&#xA;    timeLeft += gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    const double triggerTime = 500;&#xD;&#xA;    if(timeLeft &gt; triggerTime)&#xD;&#xA;    {&#xD;&#xA;        timeLeft -= triggerTime;&#xD;&#xA;        Caret.Visible = !Caret.Visible;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Just to comment on your code, and on mpnk121's answer: It's fine in this case, but in general the downside of using `TotalGameTime` (instead of `ElapsedGameTime`) is that you have no mechanism for pausing it.&#xD;&#xA;&#xD;&#xA;By the way: 500 milliseconds seems like a very fast rate for a caret blink? Perhaps slow it down a bit." />
  <row Id="28503" PostHistoryTypeId="25" PostId="12903" RevisionGUID="2efa304d-a990-4bd1-bb06-ec0b7604617f" CreationDate="2011-05-30T15:13:19.847" Comment="http://twitter.com/#!/StackGameDev/status/75218234898513920" />
  <row Id="28504" PostHistoryTypeId="2" PostId="12906" RevisionGUID="f61eb268-9c83-417e-8b7c-a4f3e55e6246" CreationDate="2011-05-30T15:17:52.557" UserId="7361" Text="WM_PAIN response code is a convenient place to put rendering routines, especialy when rendering in window, but I believe - it is not the best.&#xD;&#xA;&#xD;&#xA;WM_PAINT message is recieved by window message loop when system wants to update its contents, eg. during moving or resising window or when window content is showed again due to closing other overlapping window. Rendering in response to WM_PAINT assures that rendered content stays accurate. It is up to programmer to assure that WM_PAINT is posted to window's message queue often enough, to keep up to the desired rendering framerate. It can be achieved by calling&#xD;&#xA;&#xD;&#xA;    BOOL InvalidateRect(__in  HWND hWnd, __in  const RECT *lpRect, __in  BOOL bErase);&#xD;&#xA;&#xD;&#xA;function.&#xD;&#xA;&#xD;&#xA;It is not necessary to do it that way, as in fact- posting and processing window messages can introduce a significant delay to rendering pipeline.&#xD;&#xA;&#xD;&#xA;Better way is to call rendering routines from the message loop itself, something like this:&#xD;&#xA;&#xD;&#xA;    BOOL done = false;&#xD;&#xA;    while (!done)&#xD;&#xA;    {&#xD;&#xA;        if PeekMessage(&amp;msg, wnd, 0, 0, false)&#xD;&#xA;        {&#xD;&#xA;            int result = GetMessage(&amp;msg, wnd, 0, 0);&#xD;&#xA;&#xD;&#xA;            if (result == -1)&#xD;&#xA;            {&#xD;&#xA;                 // process GetMessage() error&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                 if (msg.message == WM_QUIT)&#xD;&#xA;                     done = true;&#xD;&#xA;&#xD;&#xA;                 TranslateMessage(&amp;msg);&#xD;&#xA;                 DispatchMessage(&amp;msg);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        DoTheUpdatingHere();&#xD;&#xA;        DoTheRenderingHere();&#xD;&#xA;    }" />
  <row Id="28505" PostHistoryTypeId="2" PostId="12907" RevisionGUID="a1941357-7098-49d9-babd-115a501a1903" CreationDate="2011-05-30T15:51:45.133" UserId="7690" Text="In addition to the Free Sound Project, I've used sounds from http://www.get-sounds.com" />
  <row Id="28506" PostHistoryTypeId="16" PostId="12907" RevisionGUID="8634ccef-470d-429c-afa0-6f99e0be4152" CreationDate="2011-05-30T15:51:45.133" UserId="7690" />
  <row Id="28507" PostHistoryTypeId="2" PostId="12908" RevisionGUID="e18cd74a-2052-4923-9b24-a1aa47c5c870" CreationDate="2011-05-30T16:55:05.880" UserId="4039" Text="I'm working on my first simple game for release. I'm going to have it to a point of being playable, interface complete, but very few if any graphics, and no overall style aside from the basic Android white text on black. Should I go ahead and release this game, with a graphics upgrade to come in the next week or two, or should I just wait until I have the better graphics?" />
  <row Id="28508" PostHistoryTypeId="1" PostId="12908" RevisionGUID="e18cd74a-2052-4923-9b24-a1aa47c5c870" CreationDate="2011-05-30T16:55:05.880" UserId="4039" Text="Is it okay to release a playable, but not graphical, game to the Android Marketplace?" />
  <row Id="28509" PostHistoryTypeId="3" PostId="12908" RevisionGUID="e18cd74a-2052-4923-9b24-a1aa47c5c870" CreationDate="2011-05-30T16:55:05.880" UserId="4039" Text="&lt;android&gt;&lt;graphics&gt;" />
  <row Id="28510" PostHistoryTypeId="2" PostId="12909" RevisionGUID="90c51a4a-9ea8-467c-9590-dc87a64d4522" CreationDate="2011-05-30T17:01:06.093" UserId="5864" Text="As your feared, you are oversimplifying. If you transform your scene so that the ellipse becomes a circle, you are using a non-[isometric][1] transformation and relative distance is not preserved. This can be best seen in the following diagram, where the point closest to the black point clearly changes:&#xD;&#xA;&#xD;&#xA;![closest point on an ellipse][2]&#xD;&#xA;&#xD;&#xA;Finding the closest point on an ellipse is a non-trivial problem. It requires the root of a 4th-degree polynomial that usually does not have a computable answer. However, you can refine an approximate answer with Newton's method and converge reasonably well.&#xD;&#xA;&#xD;&#xA;I suggest you read David Eberly's *[Distance from a Point to an Ellipse in 2D][3]* for both a written proof of the formula, and 50 to 100 lines of code that you can reuse to solve your problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Isometry&#xD;&#xA;  [2]: http://zoy.org/~sam/ellipse-point.png&#xD;&#xA;  [3]: http://www.geometrictools.com/Documentation/DistancePointToEllipse2.pdf" />
  <row Id="28511" PostHistoryTypeId="2" PostId="12910" RevisionGUID="b85cda23-14ce-4a25-affd-3b500af15e3d" CreationDate="2011-05-30T17:08:40.780" UserId="7548" Text="The downside will be that if people get turned off by the lack of graphics that they may just assume that any future releases won't have any graphics (even if you make it clear to them when they first try it), and so you could lose many of them as potential members of your audience in the future.&#xD;&#xA;&#xD;&#xA;I suggest you release it with a different title the first time, such as &quot;_name-of-game_ pre-graphical beta&quot; if you do decide to release early, then later you can release a newer one called &quot;_name-of-game_ beta&quot; once you're satisfied that the graphics have improved enough, and then (eventually?) release it again as simply &quot;_name-of-game_.&quot;&#xD;&#xA;&#xD;&#xA;On a note about text-mode games, these tend to be adventure games and there still is a serious following for them, so you may get some interest from that crowd as well.  The point is that if the gameplay is entertaining/enticing enough, the graphics may be able to take a backseat anyway (South Park would be an example of a television cartoon that is certainly better known for its content than its graphics).&#xD;&#xA;" />
  <row Id="28512" PostHistoryTypeId="5" PostId="12908" RevisionGUID="46eaeeb6-6b58-4fbf-aa2f-e25681b3703f" CreationDate="2011-05-30T17:14:04.983" UserId="4039" Comment="added 209 characters in body" Text="I'm working on my first simple game for release. I'm going to have it to a point of being playable, interface complete, but very few if any graphics, and no overall style aside from the basic Android white text on black. Should I go ahead and release this game, with a graphics upgrade to come in the next week or two, or should I just wait until I have the better graphics?&#xD;&#xA;&#xD;&#xA;The name doesn't require any graphics to play, it's a simple causal type. The graphics won't matter really for play, but will include things like a logo, screen when you die, enhanced opening screen, etc. " />
  <row Id="28513" PostHistoryTypeId="5" PostId="12910" RevisionGUID="135f905c-7415-4a48-82a2-e85456605369" CreationDate="2011-05-30T17:30:00.737" UserId="7548" Comment="added 9 characters in body" Text="The downside will be that if people get turned off by the lack of graphics that they may just assume that any future releases won't have any graphics (even if you make it clear to them when they first try it), and so you could lose many of them as potential members of your audience in the future.&#xD;&#xA;&#xD;&#xA;I suggest you release it with a different title the first time, such as &quot;_name-of-game_ pre-graphical beta&quot; if you do decide to release early, then later you can release a newer one called &quot;_name-of-game_ beta&quot; once you're satisfied that the graphics have improved enough, and then (eventually?) release it again as simply &quot;_name-of-game_.&quot;&#xD;&#xA;&#xD;&#xA;On a note about text-mode games, these tend to be adventure games and there still is a serious following for them, so you may get some interest from that crowd as well.  The point is that if the gameplay is entertaining/enticing enough, the graphics may be able to take a backseat anyway (South Park would be an example of a television cartoon that is certainly better known for its content than its graphical prowess).&#xD;&#xA;" />
  <row Id="28514" PostHistoryTypeId="25" PostId="12908" RevisionGUID="01dd92b1-7018-4e71-ade5-32db397c0dc6" CreationDate="2011-05-30T18:13:19.130" Comment="http://twitter.com/#!/StackGameDev/status/75263532052135936" />
  <row Id="28515" PostHistoryTypeId="2" PostId="12911" RevisionGUID="ba1bc5e3-723d-477d-8af9-89bbbf4bb6b9" CreationDate="2011-05-30T19:08:30.513" UserId="7199" Text="In my game, does my player object control the movement, or does the map object control it? (Or some other object?) &#xD;&#xA;&#xD;&#xA;The player doesn't know about the map's contents to stop at solids, interact with objects etc. Am I doing it wrong?&#xD;&#xA;&#xD;&#xA;I'm currently dispatching data from a virtual joypad.&#xD;&#xA;" />
  <row Id="28516" PostHistoryTypeId="1" PostId="12911" RevisionGUID="ba1bc5e3-723d-477d-8af9-89bbbf4bb6b9" CreationDate="2011-05-30T19:08:30.513" UserId="7199" Text="Who controls my player's movement?" />
  <row Id="28517" PostHistoryTypeId="3" PostId="12911" RevisionGUID="ba1bc5e3-723d-477d-8af9-89bbbf4bb6b9" CreationDate="2011-05-30T19:08:30.513" UserId="7199" Text="&lt;game-design&gt;&lt;cocos2d-iphone&gt;&lt;movement&gt;" />
  <row Id="28518" PostHistoryTypeId="2" PostId="12912" RevisionGUID="df041f05-7309-4968-9d95-0ec1701379dc" CreationDate="2011-05-30T19:24:42.270" UserId="7328" Text="you can implement your object control in map calss,  but that would create some god object and it'll be too difficult to debug or add features your program in future. there are two approches for this problem :&#xD;&#xA;&#xD;&#xA;1- one is to handle all the inputs in the player class, and then ask map to move your player as player calculated, this can also be applied for any other dynamic or static objects in your scene. note that in this apprich map class only check for collision or other similar things , and doesn't care how or why is the object moving.&#xD;&#xA;&#xD;&#xA;2- you can also share all map data with other dynamic classes (using physics engine and creating an object for every child of map is a way of doing this) and check all the thing you have to consider while moving objects inside their own class.&#xD;&#xA;&#xD;&#xA;the first approch is much more simpler and take less time to implement, because you consider all your object the same and move them in a same manner, but in the second aproch you have much more flexibility with your obejects moving (for example you can make some object to ignore collsion)" />
  <row Id="28519" PostHistoryTypeId="5" PostId="12911" RevisionGUID="6615bf10-7b8b-4ba2-8bca-70840c11ddf0" CreationDate="2011-05-30T19:31:06.183" UserId="7199" Comment="added 178 characters in body" Text="In my game, does my player object control the movement, or does the map object control it? (Or some other object?) &#xD;&#xA;&#xD;&#xA;The player doesn't know about the map's contents to stop at solids, interact with objects etc. Am I doing it wrong?&#xD;&#xA;&#xD;&#xA;I'm currently dispatching data from a virtual joypad.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;What if I dispatched movement notifications to my player and had it check with the map before moving, but the player would do the actual moving? Would that work?&#xD;&#xA;" />
  <row Id="28520" PostHistoryTypeId="2" PostId="12913" RevisionGUID="3769e31f-9679-4ecb-9740-de1699ade14e" CreationDate="2011-05-30T19:57:34.990" UserId="6587" Text="I'm about to graduate from high school and go to the army and I've been thinking about the future. I'd really like to make videogames for a living, I have been playing with some tools (about to finally start a real project with unity now) and have some good programming experience.   &#xD;&#xA;What worries me about such a career is the risk factor, to just get started I'll probably have to go live abroad (I really want to live in England for a while) because there are few game dev companies here and most of them are making cash cows for dumbphones and interactive televisions.    &#xD;&#xA;&#xD;&#xA;THE dream is to work in a medium sized company for a couple of years and go back to Israel with some experience and try to go indie.   &#xD;&#xA;&#xD;&#xA;My question is, will I survive? A lot of people say you barely make money in videogame jobs and I was wondering if it's a field worth pursuing considering the major risks involved.   &#xD;&#xA;Is there anyone here who develops indie games and can vouch for ANY money making? it seems like such a tough field.... How about the big companies? How would you describe your life quality? (I understand that in big companies there's also the issue of crunch time...)" />
  <row Id="28521" PostHistoryTypeId="1" PostId="12913" RevisionGUID="3769e31f-9679-4ecb-9740-de1699ade14e" CreationDate="2011-05-30T19:57:34.990" UserId="6587" Text="Is game development a no money field?" />
  <row Id="28522" PostHistoryTypeId="3" PostId="12913" RevisionGUID="3769e31f-9679-4ecb-9740-de1699ade14e" CreationDate="2011-05-30T19:57:34.990" UserId="6587" Text="&lt;indie&gt;&lt;career&gt;" />
  <row Id="28523" PostHistoryTypeId="2" PostId="12914" RevisionGUID="ecec78e9-856b-4332-90a2-172626193dad" CreationDate="2011-05-30T20:57:22.323" UserId="4662" Text="I've got a Windows API Window. I've managed to make it windowed, and &quot;fullscreen windowed&quot;. But I can't seem to make the window just full-screen- for example, even if I specify `WS_POPUP`, I can still freely move the cursor to my second screen. However, if I launch full-screen games, they don't permit it, and exist only exclusively or minimized. How can I make a window that behaves this way?&#xD;&#xA;&#xD;&#xA;Or is this a setting in DirectX itself?" />
  <row Id="28524" PostHistoryTypeId="1" PostId="12914" RevisionGUID="ecec78e9-856b-4332-90a2-172626193dad" CreationDate="2011-05-30T20:57:22.323" UserId="4662" Text="Creating a full-screen window in Windows API" />
  <row Id="28525" PostHistoryTypeId="3" PostId="12914" RevisionGUID="ecec78e9-856b-4332-90a2-172626193dad" CreationDate="2011-05-30T20:57:22.323" UserId="4662" Text="&lt;c++&gt;&lt;winapi&gt;" />
  <row Id="28526" PostHistoryTypeId="5" PostId="12914" RevisionGUID="23e50cd7-010b-4a7d-a630-eec5b084c037" CreationDate="2011-05-30T21:04:02.757" UserId="4662" Comment="added 38 characters in body; edited tags" Text="I've got a Windows API Window. I've managed to make it windowed, and &quot;fullscreen windowed&quot;. But I can't seem to make the window just full-screen- for example, even if I specify `WS_POPUP`, I can still freely move the cursor to my second screen. However, if I launch full-screen games, they don't permit it, and exist only exclusively or minimized. How can I make a window that behaves this way?&#xD;&#xA;&#xD;&#xA;Or is this *set* in the D3DPRESENT_PARAMETERS, rather than just communicated?" />
  <row Id="28527" PostHistoryTypeId="6" PostId="12914" RevisionGUID="23e50cd7-010b-4a7d-a630-eec5b084c037" CreationDate="2011-05-30T21:04:02.757" UserId="4662" Comment="added 38 characters in body; edited tags" Text="&lt;c++&gt;&lt;directx9&gt;&lt;winapi&gt;" />
  <row Id="28528" PostHistoryTypeId="2" PostId="12915" RevisionGUID="96f95856-2f8f-4f48-9744-a701d2a70278" CreationDate="2011-05-30T21:11:24.103" UserId="7104" Text="Here's a solution, but you'll need to call **createDeviceEx** instead of the current function.&#xD;&#xA;&#xD;&#xA;You'll have to pass a **SIrrlichtCreationParameters** structure to the above function, with the AntiAlias member set to *true* (or another value ? It seems that the variable is an unsigned integer, and not a bool, never noticed that). Of course you'll have to define some other structure members in order to have the same IrrlichtDevice as the one in your question. ;)&#xD;&#xA;&#xD;&#xA;Here's a piece of code if you prefer : (warning : I've not used Irrlicht since 1 year now)&#xD;&#xA;&#xD;&#xA;    SIrrlichtCreationParameters params = SIrrlichtCreationParameters();&#xD;&#xA;    params.AntiAlias = true;&#xD;&#xA;    params.DriverType = video::EDT_OPENGL;&#xD;&#xA;    params.WindowSize = core::dimension2d&lt;u32&gt;(800, 700);&#xD;&#xA;    IrrlichtDevice *device = createDeviceEx(params);&#xD;&#xA;&#xD;&#xA;See [here](http://irrlicht.sourceforge.net/docu/structirr_1_1_s_irrlicht_creation_parameters.html#a50602e6ae0cc3d79ca7df0aa8114e75a) for (unfortunately not much) information. (the Irrlicht doc is in fact not very helpful, unfortunately)&#xD;&#xA;&#xD;&#xA;Hope this helps, good night ! :-)" />
  <row Id="28529" PostHistoryTypeId="2" PostId="12916" RevisionGUID="8e7a7e49-c556-4384-992e-0bb68497c5e8" CreationDate="2011-05-30T21:12:16.887" UserId="7709" Text="I am sorry if my question is obvious, but i need the expert suggestion/views, i want to test my Client/Server game for which currently, i am using localhost same machine for both Client and Server.&#xD;&#xA;&#xD;&#xA;that's why i not getting any fluctuation in data and measure idea of performance, and in other parameters, what i wanted to ask to have a real world scenario:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if i create a little network with two computers or &#xD;&#xA;&#xD;&#xA;if check that on LAN on which i am or &#xD;&#xA;&#xD;&#xA;**ARE THESE THREE CASES (localhost included) ARE EQUIVALENT?**&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I really need to test that on different LANs to have reliable testing data and realistic data,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; **How these different network setups will influence the testing process?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can somebody please suggest, which could be the ideal way or enough for testing?&#xD;&#xA;&#xD;&#xA;Note: The game is suppose to play on the LAN but it is capable of more.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Jibbylala&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;P.S: i m newbie in network stuff so if u used the wrong terms vocabulary pardon me &#xD;&#xA;&#xD;&#xA;" />
  <row Id="28530" PostHistoryTypeId="1" PostId="12916" RevisionGUID="8e7a7e49-c556-4384-992e-0bb68497c5e8" CreationDate="2011-05-30T21:12:16.887" UserId="7709" Text="Suitable Client Server setup for Network Game testing." />
  <row Id="28531" PostHistoryTypeId="3" PostId="12916" RevisionGUID="8e7a7e49-c556-4384-992e-0bb68497c5e8" CreationDate="2011-05-30T21:12:16.887" UserId="7709" Text="&lt;java&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;performance&gt;&lt;testing&gt;" />
  <row Id="28532" PostHistoryTypeId="25" PostId="12913" RevisionGUID="29a98d9a-d7cf-4339-abe7-2d701a5759ad" CreationDate="2011-05-30T21:13:19.740" Comment="http://twitter.com/#!/StackGameDev/status/75308832213045248" />
  <row Id="28533" PostHistoryTypeId="2" PostId="12917" RevisionGUID="dd1d3b49-abf3-4884-abd0-8e725370ed2f" CreationDate="2011-05-30T21:15:58.383" UserId="4410" Text="Limiting the mouse movement has previously been discussed here: http://gamedev.stackexchange.com/questions/7812/mouse-aim-in-an-fps" />
  <row Id="28534" PostHistoryTypeId="5" PostId="12906" RevisionGUID="66bc9607-dba4-4a63-b1d1-c379ab21ca9a" CreationDate="2011-05-30T21:23:27.167" UserId="7361" Comment="added 2 characters in body" Text="WM_PAIN response code is a convenient place to put rendering routines, especialy when rendering in window, but I believe - it is not the best.&#xD;&#xA;&#xD;&#xA;WM_PAINT message is recieved by window message loop when system wants to update its contents, eg. during moving or resising window or when window content is showed again due to closing other overlapping window. Rendering in response to WM_PAINT assures that rendered content stays accurate. It is up to programmer to assure that WM_PAINT is posted to window's message queue often enough, to keep up to the desired rendering framerate. It can be achieved by calling&#xD;&#xA;&#xD;&#xA;    BOOL InvalidateRect(__in  HWND hWnd, __in  const RECT *lpRect, __in  BOOL bErase);&#xD;&#xA;&#xD;&#xA;function.&#xD;&#xA;&#xD;&#xA;It is not necessary to do it that way, as in fact- posting and processing window messages can introduce a significant delay to rendering pipeline.&#xD;&#xA;&#xD;&#xA;Better way is to call rendering routines from the message loop itself, something like this:&#xD;&#xA;&#xD;&#xA;    BOOL done = false;&#xD;&#xA;    while (!done)&#xD;&#xA;    {&#xD;&#xA;        if (PeekMessage(&amp;msg, wnd, 0, 0, false))&#xD;&#xA;        {&#xD;&#xA;            int result = GetMessage(&amp;msg, wnd, 0, 0);&#xD;&#xA;&#xD;&#xA;            if (result == -1)&#xD;&#xA;            {&#xD;&#xA;                 // process GetMessage() error&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                 if (msg.message == WM_QUIT)&#xD;&#xA;                     done = true;&#xD;&#xA;&#xD;&#xA;                 TranslateMessage(&amp;msg);&#xD;&#xA;                 DispatchMessage(&amp;msg);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        DoTheUpdatingHere();&#xD;&#xA;        DoTheRenderingHere();&#xD;&#xA;    }" />
  <row Id="28535" PostHistoryTypeId="5" PostId="12906" RevisionGUID="b5b2b5a3-9fcd-49a1-be81-1b682d0951f0" CreationDate="2011-05-30T21:36:59.267" UserId="51" Comment="added 4 characters in body" Text="WM_PAINT response code is a convenient place to put rendering routines, especially when rendering in a window, but I believe - it is not the best.&#xD;&#xA;&#xD;&#xA;WM_PAINT message is recieved by window message loop when system wants to update its contents, eg. during moving or resising window or when window content is showed again due to closing other overlapping window. Rendering in response to WM_PAINT assures that rendered content stays accurate. It is up to programmer to assure that WM_PAINT is posted to window's message queue often enough, to keep up to the desired rendering framerate. It can be achieved by calling&#xD;&#xA;&#xD;&#xA;    BOOL InvalidateRect(__in  HWND hWnd, __in  const RECT *lpRect, __in  BOOL bErase);&#xD;&#xA;&#xD;&#xA;function.&#xD;&#xA;&#xD;&#xA;It is not necessary to do it that way, as in fact- posting and processing window messages can introduce a significant delay to rendering pipeline.&#xD;&#xA;&#xD;&#xA;Better way is to call rendering routines from the message loop itself, something like this:&#xD;&#xA;&#xD;&#xA;    BOOL done = false;&#xD;&#xA;    while (!done)&#xD;&#xA;    {&#xD;&#xA;        if (PeekMessage(&amp;msg, wnd, 0, 0, false))&#xD;&#xA;        {&#xD;&#xA;            int result = GetMessage(&amp;msg, wnd, 0, 0);&#xD;&#xA;&#xD;&#xA;            if (result == -1)&#xD;&#xA;            {&#xD;&#xA;                 // process GetMessage() error&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                 if (msg.message == WM_QUIT)&#xD;&#xA;                     done = true;&#xD;&#xA;&#xD;&#xA;                 TranslateMessage(&amp;msg);&#xD;&#xA;                 DispatchMessage(&amp;msg);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        DoTheUpdatingHere();&#xD;&#xA;        DoTheRenderingHere();&#xD;&#xA;    }" />
  <row Id="28536" PostHistoryTypeId="5" PostId="12916" RevisionGUID="597d9663-6cc5-4e2c-900d-718f70c9c5df" CreationDate="2011-05-30T21:42:58.197" UserId="51" Comment="some attempt at improving the english" Text="I want to test my Client/Server game for which, currently, I am using localhost for both Client and Server.&#xD;&#xA;&#xD;&#xA;Obviously I'm not getting any fluctuation in data and measure idea of performance, and in other parameters, what I wanted to ask how I would test a real world scenario:&#xD;&#xA;&#xD;&#xA;if i create a little network with two computers or &#xD;&#xA;&#xD;&#xA;if check that on LAN on which i am or &#xD;&#xA;&#xD;&#xA;**Are these cases (localhost included) equivalent?**&#xD;&#xA;&#xD;&#xA;or do I really need to test my game on different LANs to have reliable and realistic testing data?&#xD;&#xA;&#xD;&#xA;**How these different network setups influence the testing process?**&#xD;&#xA;&#xD;&#xA;Can somebody please suggest methods for testing the effect of network latency and packet loss on my game?&#xD;&#xA;&#xD;&#xA;The game is supposed to be played on a LAN but it should be capable of more." />
  <row Id="28537" PostHistoryTypeId="5" PostId="12914" RevisionGUID="84518a10-9584-465c-bdb9-7dbe0332f9a7" CreationDate="2011-05-30T21:44:39.350" UserId="4662" Comment="added 198 characters in body" Text="I've got a Windows API Window. I've managed to make it windowed, and &quot;fullscreen windowed&quot;. But I can't seem to make the window just full-screen- for example, even if I specify `WS_POPUP`, I can still freely move the cursor to my second screen. However, if I launch full-screen games, they don't permit it, and exist only exclusively or minimized. How can I make a window that behaves this way?&#xD;&#xA;&#xD;&#xA;Edit: Excuse me. Limiting the mouse movement was just one example of how a full-screen window behaves differently to a non-fullscreen window, I'm not looking for how to limit the mouse movement.&#xD;&#xA;&#xD;&#xA;Or is this *set* in the D3DPRESENT_PARAMETERS, rather than just communicated?" />
  <row Id="28538" PostHistoryTypeId="5" PostId="12913" RevisionGUID="3e5bdbc2-6470-4268-b22b-24eca17f6a19" CreationDate="2011-05-30T21:44:48.287" UserId="51" Comment="removed bit about crunch" Text="I'm about to graduate from high school and go to the army and I've been thinking about the future. I'd really like to make videogames for a living, I have been playing with some tools (about to finally start a real project with unity now) and have some good programming experience.   &#xD;&#xA;&#xD;&#xA;What worries me about such a career is the risk factor, to just get started I'll probably have to go live abroad (I really want to live in England for a while) because there are few game dev companies here and most of them are making cash cows for dumbphones and interactive televisions.    &#xD;&#xA;&#xD;&#xA;THE dream is to work in a medium sized company for a couple of years and go back to Israel with some experience and try to go indie.   &#xD;&#xA;&#xD;&#xA;My question is, will I survive? A lot of people say you barely make money in videogame jobs and I was wondering if it's a field worth pursuing considering the major risks involved.   &#xD;&#xA;&#xD;&#xA;Is there anyone here who develops indie games and can vouch for ANY money making? it seems like such a tough field.... How about the big companies? " />
  <row Id="28539" PostHistoryTypeId="2" PostId="12918" RevisionGUID="eea752c7-f8f2-4d05-b20d-5318e78277dd" CreationDate="2011-05-30T21:48:37.300" UserId="1198" Text="Its hard to tell exactly what you're asking, but there's my thoughts.&#xD;&#xA;&#xD;&#xA;When testing networking code, its perfectly acceptable to use `localhost` for both client and server to get it working, because its quick to debug and you can easily debug both client and server. It is important to note, that this is NOT sufficient for testing and final development.&#xD;&#xA;&#xD;&#xA;In order for your testing to have maximum impact, you must test as many situations as you can. The minimum you can get away with are (IMO) these:&#xD;&#xA;&#xD;&#xA; 1. One client and server on same computer&#xD;&#xA; 2. One client and server on the same SUBNET&#xD;&#xA; 3. One client and server on the same SUBNET with additional players from other SUBNETS (Internet, etc) connecting to server via NAT&#xD;&#xA; 4. Server on the Internet and multiple additional Internet clients connected" />
  <row Id="28540" PostHistoryTypeId="2" PostId="12919" RevisionGUID="88f5c3c2-3318-4127-a444-2649753a9339" CreationDate="2011-05-30T21:53:00.673" UserId="4662" Text="You can download software emulators that will artifically add packet loss, network latency, and whatever else you might like into the connection. On reflection, I actually don't know where to get these packages, but I know that they do exist." />
  <row Id="28541" PostHistoryTypeId="5" PostId="12916" RevisionGUID="f37ec1de-b690-4dc6-987c-93513c12e2f8" CreationDate="2011-05-30T21:54:27.523" UserId="7709" Comment="added 105 characters in body; deleted 7 characters in body" Text="I want to test my Client/Server game for which, currently, I am using localhost for both Client and Server.&#xD;&#xA;&#xD;&#xA;Obviously I'm not getting any fluctuation in data and measure idea of performance, and in other parameters, what I wanted to ask how I would test a real world scenario:&#xD;&#xA;&#xD;&#xA;if i create a little network with two computers or &#xD;&#xA;&#xD;&#xA;if check that on LAN on which i am or &#xD;&#xA;&#xD;&#xA;**Are these cases (localhost included) equivalent?**&#xD;&#xA;&#xD;&#xA;or do I really need to test my game on different LANs to have reliable and realistic testing data?&#xD;&#xA;&#xD;&#xA;**How these different network setups influence the testing process?**&#xD;&#xA;&#xD;&#xA;Can somebody please suggest methods for testing the effect of network latency and packet loss on my game?&#xD;&#xA;&#xD;&#xA;**which above setup will give me more up and downs in number with LEAST setup/implementing efforts.**&#xD;&#xA;&#xD;&#xA;The game is supposed to be played on a LAN but it IS capable of more." />
  <row Id="28542" PostHistoryTypeId="2" PostId="12920" RevisionGUID="c67090ea-f39d-4e55-90af-92f6be3d1fd2" CreationDate="2011-05-30T21:57:00.050" UserId="51" Text="I don't think the answer to this question is any different than any other business related field.&#xD;&#xA;&#xD;&#xA;&gt;  Will I survive?&#xD;&#xA;&#xD;&#xA;How am I supposed to know?&#xD;&#xA;&#xD;&#xA;* Have you actually tried making games before?&#xD;&#xA;* Do you actually *like* making games?&#xD;&#xA;* Are you any good at what you do?&#xD;&#xA;* Do you know the right people to help you get to where you want to be?&#xD;&#xA;* Do you know the right people to get you business opportunities?&#xD;&#xA;* Do you know how to network if not?&#xD;&#xA;* Do you have the creativity to design a product to fill a market need?&#xD;&#xA;* Do you have the business sense to budget a project and estimate revenue?&#xD;&#xA;* Do you have the management capabilities to actually ship a project on time?&#xD;&#xA;&#xD;&#xA;Game development as a business isn't fundamentally any different from any other business.  There are material costs.  There are internal management problems.  There are revenue projection models.  There are contract negotiation problems.  You can't just make a product and expect to make money.  &#xD;&#xA;&#xD;&#xA;Sure, a lot of those questions go away if you go work for somebody else (because they take on the business risk and provide the management infrastructure), but then you have to deal with the fact that it's hard to get hired in the first place.  There's more info on that bit of it here: http://gamedev.stackexchange.com/questions/263/how-to-go-about-getting-hired-by-a-game-company&#xD;&#xA;" />
  <row Id="28543" PostHistoryTypeId="5" PostId="12753" RevisionGUID="18e95893-60bc-4e39-bfcc-24217e993f01" CreationDate="2011-05-30T22:33:09.617" UserId="7603" Comment="Clarification" Text="I'm trying to find useful information on creating game levels in a reasonably efficient way.&#xD;&#xA;Additionally, information in setting up a fairly painless way to edit this information would be handy (the closest I've come is some monstrosity in Flash; I would place the parts onto the stage, and run a script reading all the platforms, triggers and what have you, into an XML document).&#xD;&#xA;&#xD;&#xA;Google hasn't been to terribly helpful in finding what I need (probably what terms I'm using as I'm not sure exactly how I would refer to this). I'm hoping there may be someone here who knows of a good solid article on handling the data for a level.&#xD;&#xA;&#xD;&#xA;I've made a few attempts in previous projects (the latest being in Flash using XML), and I often run into issues with performance (in my case, I narrowed it down to having to many objects loaded, and started culling what was outside my view, was still slow though...).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;To clarify a bit. I'm not afraid of investing time in developing tools. I don't have a specific game I am making this for so much as I am wanting to learn about the theory behind a level editor and the files it would generate to be used as a level. I'm looking to understand what goes on in a program and thus far have been un-successful in finding anything to help educate me on what makes such a system tick.&#xD;&#xA;&#xD;&#xA;I am particularly interested in knowing how to make one that's 'good' rather than 'works'. I've already gotten something working in XML on my own, however it was poorly structured and excessively slow for relatively small levels. I am sure there are better ways to organize the information for loading and using on the screen, its more a matter of me being unsure what to use. I've heard talk of using binary space trees, quad or oct trees, however I haven't found much related to using them in a tool. (Most of what I have found is academic and more or less to abstract to make use of outside of theory)" />
  <row Id="28544" PostHistoryTypeId="2" PostId="12921" RevisionGUID="621dd911-668e-4401-b652-ecd5f3f09000" CreationDate="2011-05-30T22:43:52.553" UserId="5932" Text="**Local Host:**  &#xD;&#xA;All the network testing I've done on localhost has been completely misleading. Since it's a perfect environment it's useless... &#xD;&#xA;&#xD;&#xA;**Packet Loss:**  &#xD;&#xA;The packet loss and latency you experience will differ based on your current lan set up. I've set up on several separate routers, and gotten completely different results.&#xD;&#xA;&#xD;&#xA;**Recommendation:**  &#xD;&#xA;It would be horrifically slow to compile, throw the executable elsewhere, recompile (in the beginning, before menus and such) run it on your compie, and connect, then test.&#xD;&#xA;What I've done lately is have a persistant server (on another computer) that simply forwards whatever is sent over any port to a partner, and use set my program up as a client, so there's no further config necessary. It's a path that's treated me well so far." />
  <row Id="28545" PostHistoryTypeId="2" PostId="12922" RevisionGUID="06aa5ccc-b26e-46c0-9b05-716675d8d879" CreationDate="2011-05-31T00:01:29.817" UserId="1101" Text="&gt; A lot of people say you barely make money in videogame jobs&#xD;&#xA;&#xD;&#xA;Pretty much all game programmers I know here in the UK earn more than the national median wage. There are no starving employed game programmers.&#xD;&#xA;&#xD;&#xA;&gt; Is there anyone here who develops indie games and can vouch for ANY money making?&#xD;&#xA;&#xD;&#xA;That's quite a different proposition. Thousands of people want to be able to make their own games and sell them, but probably only 5% of them actually finish their games, and maybe only 1/5 of those are able to make a profit, due to failings in promotion, distribution, the absence of a target audience, etc." />
  <row Id="28546" PostHistoryTypeId="25" PostId="12916" RevisionGUID="a999a0c8-8bf4-4b9d-a219-884d0b60fa23" CreationDate="2011-05-31T00:13:20.993" Comment="http://twitter.com/#!/StackGameDev/status/75354135465172992" />
  <row Id="28547" PostHistoryTypeId="2" PostId="12923" RevisionGUID="c4181221-2e99-4bdc-bdcd-a0a9ff120a87" CreationDate="2011-05-31T00:26:55.857" UserId="163" Text="My approach to this is two-fold&#xD;&#xA;&#xD;&#xA; - First, I abstract the source of control for every game object. That lets me implement a &quot;user controlled entity&quot;, which takes input from gamepad/keyboard/mouse/etc for the player entity, and implement AI routines for NPCs.&#xD;&#xA; - Second, each entity can only express an &quot;intent&quot; ... so the output from the abstracted control object in point 1 only says, &quot;I want to move in that direction&quot;. That intent is then implemented by some other routine which checks against map details, does collision, etc." />
  <row Id="28548" PostHistoryTypeId="2" PostId="12924" RevisionGUID="68a36265-5007-4787-bbe5-bce5b7a49849" CreationDate="2011-05-31T00:51:38.123" UserId="163" Text="The easiest way to solve this issue is, to put it simply, draw more :-) it's usually ok if you draw stuff just outside of the viewport. That reduces instances where the visible area &quot;catches up&quot; with the edge of the screen before it redraws. &#xD;&#xA;&#xD;&#xA;You can of course get more complex with it where you increase the drawing distance only in the direction that you're moving ... but usually this is overkill." />
  <row Id="28549" PostHistoryTypeId="2" PostId="12925" RevisionGUID="a38e1521-9682-441d-b8c5-0483a5c4f68a" CreationDate="2011-05-31T00:56:57.497" UserId="6275" Text="Right now im working on my c++ game, and im having alot of trouble using [GLM](http://www.3dcodingtutorial.com/Working-with-3D-models/Getting-GLM.html) and Bullet Physics to create my world correctly.&#xD;&#xA;&#xD;&#xA;The main problem is that when i export my physics with [Blender](http://blender.org)v2.57, and export my models for GLM, the models never line up with the physics correctly...&#xD;&#xA;&#xD;&#xA;Im wondering if there are any model loaders that would be good to use with Bullet Physics, and I can export the vertices,texture coords, etc. from Blender to be loaded and used as btTriangleMeshes.." />
  <row Id="28550" PostHistoryTypeId="1" PostId="12925" RevisionGUID="a38e1521-9682-441d-b8c5-0483a5c4f68a" CreationDate="2011-05-31T00:56:57.497" UserId="6275" Text="What would be a good model loader for Bullet Physics?" />
  <row Id="28551" PostHistoryTypeId="3" PostId="12925" RevisionGUID="a38e1521-9682-441d-b8c5-0483a5c4f68a" CreationDate="2011-05-31T00:56:57.497" UserId="6275" Text="&lt;opengl&gt;&lt;c++&gt;&lt;3d-meshes&gt;&lt;blender&gt;&lt;bullet-physics&gt;" />
  <row Id="28552" PostHistoryTypeId="2" PostId="12926" RevisionGUID="91850c71-e7c6-4e63-afcb-5a0bccb8fbf3" CreationDate="2011-05-31T01:17:43.430" UserId="1923" Text="&gt; Is there anyone here who develops&#xD;&#xA;&gt; indie games and can vouch for ANY&#xD;&#xA;&gt; money making?&#xD;&#xA;&#xD;&#xA;[This indie][1] feller has cleared over 1/2 million dollars in the last 8 weeks. If you look at the credits, it looks like he had less than 10 folks on his team, and most of them were probably contracted for small bits here and there. That's a pretty darned good for a small indie studio. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xbligdb.com/game.asp?year=&amp;qtr=2&amp;id=19" />
  <row Id="28553" PostHistoryTypeId="5" PostId="12921" RevisionGUID="dc1134b4-e1b3-49c8-910b-445f44d9dc43" CreationDate="2011-05-31T03:13:03.517" UserId="5932" Comment="grammar" Text="**Local Host:**  &#xD;&#xA;All the network testing I've done on localhost has been completely misleading. Since it's a perfect environment it's useless... &#xD;&#xA;&#xD;&#xA;**Packet Loss:**  &#xD;&#xA;The packet loss and latency you experience will differ based on your current lan set up. I've set up on several separate routers, and gotten completely different results.&#xD;&#xA;&#xD;&#xA;**Recommendation:**  &#xD;&#xA;It would be horrifically slow to compile, throw the executable elsewhere, recompile (in the beginning, before menus and such) run it on your compie, and connect, then test.&#xD;&#xA;What I've done lately is have a persistant server (on another computer) that simply forwards whatever is sent over any port to a partner, and set my program up as a client, so there's no further config necessary. It's a path that's treated me well so far." />
  <row Id="28554" PostHistoryTypeId="25" PostId="12911" RevisionGUID="717c693d-2f7b-422c-ad9f-a50fd321f094" CreationDate="2011-05-31T03:13:21.310" Comment="http://twitter.com/#!/StackGameDev/status/75399436586586112" />
  <row Id="28557" PostHistoryTypeId="2" PostId="12928" RevisionGUID="2e61b0a6-1d87-45a6-b310-2b652acff693" CreationDate="2011-05-31T04:17:43.033" UserId="2710" Text="I don't know about UK or Israel, but in Russia being an employed game programmer pays the bills all right. I'd imagine it's not that different in other countries.&#xD;&#xA;&#xD;&#xA;but if we're talking about indies: there are indie developers making profits. There are some indie developers making HUGE profits. But there never was an indie developer who'd made profits with his first project ever! You need a lot of experience to succeed. To get it, you can either work at a game company, or try indie way from the start... but don't expect having any profits.&#xD;&#xA;&#xD;&#xA;When you've worked on several game projects, you'd have enough experience to ask this question again.. or rather, _answer_ it for yourself." />
  <row Id="28559" PostHistoryTypeId="25" PostId="12914" RevisionGUID="b8285756-b0e2-4f97-9b06-626da549baa1" CreationDate="2011-05-31T06:13:22.760" Comment="http://twitter.com/#!/StackGameDev/status/75444740610457600" />
  <row Id="28560" PostHistoryTypeId="2" PostId="12929" RevisionGUID="d217da6b-8d82-4d21-99cc-fdd13b926ac6" CreationDate="2011-05-31T06:14:25.757" UserId="3057" Text="Any career that a lot of young people really want to go into is probably going to suck unless it has high barriers to entrance. The reason is, when a field is full of qualified, young talent they will put up with a lot of crap.&#xD;&#xA;&#xD;&#xA;From what I've heard, game development is the worst conditions and payment in the programming world (on average)--with the possible exception of &quot;Overseas Consultant&quot;.&#xD;&#xA;&#xD;&#xA;The same is going to be true of starting a new rock band (hard, crappy conditions, low pay), becoming an astronot (HARD), a policeman (somewhat hard, low pay), ...&#xD;&#xA;&#xD;&#xA;I'd read around for some stories about what it's like to be a game developer." />
  <row Id="28561" PostHistoryTypeId="2" PostId="12930" RevisionGUID="19ed5ee5-95bb-42ad-8a0e-90e94e0085a0" CreationDate="2011-05-31T06:16:09.850" UserId="7697" Text="You definitely can make money doing indie games.  I myself am a co-owner of an indie game startup, and I'm definitely not in danger of starving.  :)&#xD;&#xA;&#xD;&#xA;There are two things to consider.  First, indie games are risky, as is any startup.  You need funds to get started, there's a high chance of failure for any of a hundred different reasons, and if you try to fund yourself then that failure can be quite catastrophic for you personally in terms of debt and finances.&#xD;&#xA;&#xD;&#xA;Second, in the industry at large as a programmer, you will make less on average than a programmer of similar skill working in a non-game CS field.  It's sometimes called the &quot;game tax&quot; that you pay for being able to work on games for a living.  That's not to say you'll make peanuts or have trouble getting by.  Plus, if you're a talented/skilled developer then you'll still make the big bucks; exceptional talent doesn't have trouble getting exceptional job offers.  But if you're an average programmer you'll probably be making less in games than you would be in Web programming or general business programming." />
  <row Id="28562" PostHistoryTypeId="2" PostId="12931" RevisionGUID="920d0e31-c00c-4709-b17f-bd8d71c23445" CreationDate="2011-05-31T06:27:21.090" UserId="7698" Text="I'm self employed and only 16 years old. I make well over $100,000 a year. And I only work 3 hours a month AT MOST.... The games sell them selves, I just sit back and let the internet do it's thing. " />
  <row Id="28563" PostHistoryTypeId="2" PostId="12932" RevisionGUID="97560fdb-78ec-41c6-8397-2e46203e377b" CreationDate="2011-05-31T06:42:06.217" UserId="7697" Text="It's difficult to give a directly useful answer without knowing what exactly you're trying to do.&#xD;&#xA;&#xD;&#xA;I have two things to say on the subject that might help you out.&#xD;&#xA;&#xD;&#xA;First thing (and this is by far the most important one), if you're trying to make the enemy feel more interesting and human then your combat tactics are irrelevant.  The trick to making players &quot;believe&quot; an enemy is alive is to use animation, sounds, and little details to imply human behavior.  The perfect AI might walk around a corner, see a player, and shoot.  A human AI might walk around a corner, see a player, have a surprised look on his face and shout out in alarm, and shoot.  The first one seems robotic.  The second one seems human.  Both are using identical AI in every way, other than the insertion of the animation just before shooting (or, to keep the tactical behavior the same, _during_ shooting).&#xD;&#xA;&#xD;&#xA;Second, avoid randomizing.  Players don't appreciate it as much as designers want to think they will.  Players don't see &quot;computer generated a 1 out of 100, followed by a 5, 3, and 4, so the error factors for the last four shots were only 1%, 5%, 3%, and 4%, and that's why you died in half a second this round.&quot;  The players just see enemies that sometimes wildly miss and other times nail them repeatedly for no discernible reason, which is incredibly frustrating.  Good game design is largely about building patterns that human players _can_ observe, learn, and beat, and making the player's success based on his own judgement and skills and intuition rather than making it about whether the player got lucky.  The urge to randomize comes from experience with table-top games and gambling games, both of which are incredibly different mediums than video games (and what works in one medium often does not make sense in another)." />
  <row Id="28564" PostHistoryTypeId="2" PostId="12933" RevisionGUID="e2a9a4e0-e779-438e-8f79-c6bfc49995ff" CreationDate="2011-05-31T07:29:40.163" UserId="1588" Text="Our civilization is collapsing, **gardening, food security is more important than gaming**, once you've got the food security and no debt then become a game designer." />
  <row Id="28565" PostHistoryTypeId="2" PostId="12934" RevisionGUID="b15bec86-c03c-40af-a8ca-e06fa4f2994a" CreationDate="2011-05-31T07:32:00.137" UserId="7419" Text="There is really no right way to do this, because you are talking collisions and character control it really boils down to exactly the problem you are trying to solve, as no matter your approach you are going to have to look at your game mechanics and see if it fits ( order of resolution etc.. ).&#xD;&#xA;&#xD;&#xA;My approach to this problem and as it seems you want to keep a certain level of abstraction would be to different layers that process the player data, so if your player controlled object has a velocity and a direction then these would be updated based on the input, these inputs are not checked against anything, the input knows about the player object and simply updates its values, this would be your first layer.&#xD;&#xA;&#xD;&#xA;After this first stage is done, your map system then needs to scan through the data and validate it, at this point all controller input has been resolved, the map can then decide to accept or change the forces ( velocity and direction ) associated with player entity based on collisions, wind, whatever can affect the player movement, this is your second layer that affects the data.&#xD;&#xA;&#xD;&#xA;The last and final stage would be to simply update any entities position based on their direction and velocity ( as is ), this movement is assumed correct, this could mean the velocity is 0 because he collided with a wall, or he is now being taken on the opposite direction by a river he stepped in.&#xD;&#xA;&#xD;&#xA;The key in this type of solution is to have different layers that affect your data, after each successive stage your data is assumed correct and valid for all previous stages, which means each processing stage could be designed to be plugged in and out at run time and even re-ordered.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28566" PostHistoryTypeId="2" PostId="12935" RevisionGUID="2e8b07d6-e224-4fe2-b2a5-d310e4281b3b" CreationDate="2011-05-31T07:39:14.487" UserId="1588" Text="ccMixter - samples and music http://ccmixter.org&#xD;&#xA;" />
  <row Id="28567" PostHistoryTypeId="16" PostId="12935" RevisionGUID="cbc620f4-c206-4d4f-996e-e69b40de4712" CreationDate="2011-05-31T07:39:14.487" UserId="1588" />
  <row Id="28568" PostHistoryTypeId="2" PostId="12936" RevisionGUID="c1bd4b53-0b19-46c0-837b-88a0f70578a9" CreationDate="2011-05-31T08:14:46.797" UserId="7697" Text="Depends on the type of game.  For a platformer, your movement is basically a large series of hacks, comprised of a lot of ray tests and highly specialized logic.  For a top-down action game, you should have a basic physics/collision system that's independent of any particular type of game object, and player controls just set velocities/forces that move the avatar in the indicated direction.  Other types of games have other types of controls and use less or more physics engine as appropriate.&#xD;&#xA;&#xD;&#xA;In general, though, you have some kind of concept of a physics object.  Players, enemies, items, etc. all have a physics component.  This component in tandem with the physics engine (which knows about the level layout, among other things) will &quot;correct&quot; motion in response to collision.  The player component then responds to movement requests by setting forces, which push the player around, and the physics component deals with things like &quot;the object is moving into a wall, push it back out again and adjust accordingly.&quot;&#xD;&#xA;&#xD;&#xA;If you provide more information on what exactly you're trying to do, someone may be able to provide a more detailed answer." />
  <row Id="28569" PostHistoryTypeId="2" PostId="12937" RevisionGUID="8b6f6f01-7b2b-4341-b215-c6072c500b91" CreationDate="2011-05-31T09:05:53.683" UserId="7702" Text="Got a VERY simple existing project, that basically contains a lot of cubes. Now I am wanting to add a physics system to it and JiglibX seemed like the simplest one with some tutorials out there.&#xD;&#xA;&#xD;&#xA;My main problem is that the physics dont seem to be working how I imagined, I expected my tower of cubes to come crashing down, but they dont seem to do anything.&#xD;&#xA;&#xD;&#xA;I think my problem is that my cubes do not inherit DrawableGameComponentor, they are managed by a world object that will update and render them. So they are at no point put into the games component list. I am not sure if this means that JiglibX will not be able to interact with them as in all the tutorials there are no explicit calls to add the Body objects to the physics system, so I can only presume that they are using a static/singleton under the hood which automagically hooks in all things, or they use the game objects component list somehow.&#xD;&#xA;&#xD;&#xA;I also noticed that in alot of the tutorials they use the following when setting up the physics system:&#xD;&#xA;&#xD;&#xA;    float timeStep = (float)gameTime.ElapsedGameTime.Ticks / TimeSpan.TicksPerSecond;&#xD;&#xA;    PhysicsSystem.CurrentPhysicsSystem.Integrate(timeStep);&#xD;&#xA;&#xD;&#xA;Would it not be better to keep a local instance of the created PhysicsSystem object and just call myPhysicsSystem.Integrate(timeStep)?" />
  <row Id="28570" PostHistoryTypeId="1" PostId="12937" RevisionGUID="8b6f6f01-7b2b-4341-b215-c6072c500b91" CreationDate="2011-05-31T09:05:53.683" UserId="7702" Text="JiglibX addition to existing project questions" />
  <row Id="28571" PostHistoryTypeId="3" PostId="12937" RevisionGUID="8b6f6f01-7b2b-4341-b215-c6072c500b91" CreationDate="2011-05-31T09:05:53.683" UserId="7702" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;physics-engine&gt;" />
  <row Id="28572" PostHistoryTypeId="25" PostId="12937" RevisionGUID="b851ae63-5f57-4fa5-8c36-a91dfed08a87" CreationDate="2011-05-31T09:13:23.797" Comment="http://twitter.com/#!/StackGameDev/status/75490042700771329" />
  <row Id="28573" PostHistoryTypeId="2" PostId="12938" RevisionGUID="cb1e8050-383c-4f27-8bc6-493243369633" CreationDate="2011-05-31T09:21:34.563" UserId="7702" Text="After playing minecraft I was marvelling a bit at their large worlds but at the same time finding it extremely slow to navigate, even with a quad core and meaty graphics card.&#xD;&#xA;&#xD;&#xA;Now I assume its fairly slow because:&#xD;&#xA;&#xD;&#xA;A) Its written in Java, and as most of the actual spatial partitioning and other memory management activities happen in there it would be slower than a native C++ version.&#xD;&#xA;&#xD;&#xA;B) They are not partitioning their world very well&#xD;&#xA;&#xD;&#xA;I could be wrong on both assumptions, however it got me thinking about the best way to manage large worlds. As it is more of a true 3d world, where a block can exist in any part of the world, it is basically a big 3d array [x][y][z], where each block in the world has a type (i.e BlockType.Empty = 0, BlockType.Dirt = 1 etc).&#xD;&#xA;&#xD;&#xA;Now I am assuming to make this sort of world performant you would need to:&#xD;&#xA;&#xD;&#xA;a) Use a tree of some variety (oct/kd/bsp) to split all the cubes out, it seems like an oct/kd would be the better option as you can just partition on a per cube level not a per triangle level.&#xD;&#xA;&#xD;&#xA;b) Use some algorithm to work out if the blocks within the scene can currently be seen, as blocks closer to the user could obfuscate the blocks behind, making it pointless to render them.&#xD;&#xA;&#xD;&#xA;c) Keep the block object themselves lightweight, so it is quick to add and remove them from the trees&#xD;&#xA;&#xD;&#xA;I guess there is no *right* answer to this, but I would be interested to see peoples opinions on the subject." />
  <row Id="28574" PostHistoryTypeId="1" PostId="12938" RevisionGUID="cb1e8050-383c-4f27-8bc6-493243369633" CreationDate="2011-05-31T09:21:34.563" UserId="7702" Text="Managing large 3d worlds (i.e minecraft style)" />
  <row Id="28575" PostHistoryTypeId="3" PostId="12938" RevisionGUID="cb1e8050-383c-4f27-8bc6-493243369633" CreationDate="2011-05-31T09:21:34.563" UserId="7702" Text="&lt;terrain&gt;&lt;minecraft&gt;&lt;tree&gt;" />
  <row Id="28576" PostHistoryTypeId="2" PostId="12939" RevisionGUID="d74d9938-0347-4657-96c7-8de589e40afc" CreationDate="2011-05-31T09:41:55.793" UserId="1839" Text="&gt; What would be a good model loader for Bullet Physics?&#xD;&#xA;&#xD;&#xA;Bullet has a build-in model/world-loader. Export everything in blender to `.bullet` and simply load it using `btBulletWorldImporter`&#xD;&#xA;&#xD;&#xA;[Here is a wiki explaining the details][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bulletphysics.org/mediawiki-1.5.8/index.php/Bullet_binary_serialization#Loading_a_.bullet_file.2C_creating_objects_and_adding_them_to_the_world" />
  <row Id="28577" PostHistoryTypeId="2" PostId="12940" RevisionGUID="2336092a-adb5-49c9-aa65-ce3d0fcd1f90" CreationDate="2011-05-31T11:08:56.510" UserId="3505" Text="Your code is really hard to read, and I can't get it to run, so I'm not sure what is actually going on.&#xD;&#xA;&#xD;&#xA;But as far as I can tell you are both moving around the camera and changing the place where the tiles are drawn depending on player position, you should only do one of those." />
  <row Id="28578" PostHistoryTypeId="5" PostId="12940" RevisionGUID="610b41f4-db9c-4f7b-ac18-9c7ea635f7c9" CreationDate="2011-05-31T11:32:57.093" UserId="3505" Comment="added 110 characters in body" Text="Your code is really hard to read, and I can't get it to run, so I'm not sure what is actually going on.&#xD;&#xA;&#xD;&#xA;But as far as I can tell you are both moving around the camera and changing the place where the tiles are drawn depending on player position, you should only do one of those.&#xD;&#xA;&#xD;&#xA;Edit: I got it running, no performance problems, this is a simple case of camera/object position mismatch." />
  <row Id="28579" PostHistoryTypeId="25" PostId="12938" RevisionGUID="dcbd989f-7b90-4695-bf2a-57189d6db438" CreationDate="2011-05-31T12:13:23.697" Comment="http://twitter.com/#!/StackGameDev/status/75535340852609024" />
  <row Id="28580" PostHistoryTypeId="2" PostId="12941" RevisionGUID="05fc87e9-114c-4230-8ec0-1efbe3afdb98" CreationDate="2011-05-31T12:32:37.453" UserId="7588" Text="The thing is to think about how you would first of all load the data. If you stream your map data into memory when needed, there is abivously a natural limit to what you can render, this is already a rendering performance upgrade.&#xD;&#xA;&#xD;&#xA;What you do with this data is then up to you. For GFX performance, you can then use [Clipping](http://en.wikipedia.org/wiki/Clipping_%28computer_graphics%29) to clip hidden objects, objects that are too small to be visible, etc.&#xD;&#xA;&#xD;&#xA;If you are then just looking for Graphics Performance techniques I'm sure you can find mountains of stuff on the net." />
  <row Id="28581" PostHistoryTypeId="5" PostId="12911" RevisionGUID="17cf50b0-f9dd-4258-b93e-7491502eafb2" CreationDate="2011-05-31T13:22:17.150" UserId="7199" Comment="Adde details" Text="In my game, does my player object control the movement, or does the map object control it? (Or some other object?) &#xD;&#xA;&#xD;&#xA;The player doesn't know about the map's contents to stop at solids, interact with objects etc. Am I doing it wrong?&#xD;&#xA;&#xD;&#xA;I'm currently dispatching data from a virtual joypad.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;What if I dispatched movement notifications to my player and had it check with the map before moving, but the player would do the actual moving? Would that work?&#xD;&#xA;&#xD;&#xA;**EDIT2:**&#xD;&#xA;&#xD;&#xA;At this point I'm thinking about a top down game. Just to clarify, I want the player to move in 4 directions, not 8, and to be centered on the tile which they are standing on.  &#xD;&#xA;" />
  <row Id="28582" PostHistoryTypeId="5" PostId="12776" RevisionGUID="3affac09-f59a-49f3-8632-8f6a0fb31880" CreationDate="2011-05-31T14:00:25.337" UserId="5660" Comment="deleted 1 characters in body" Text="AFAIK, there is no way to be absolutely 100% safe from collision but you could make it very, very unlikely. Take for example the algorithm John Millikin posted in Maik Semder's  link above and attach a hashed timestamp at the end. &#xD;&#xA;&#xD;&#xA;That way, even if two users manage to log in at precisely the same millisecond, the chances of them getting the same ID would be one in 22,300,745,198,530,623,141,535,718,272,648,361,505,980,416&#xD;&#xA;&#xD;&#xA;:-)" />
  <row Id="28583" PostHistoryTypeId="5" PostId="12769" RevisionGUID="34a9639e-e056-4932-9890-d145cf0bbe68" CreationDate="2011-05-31T14:21:54.613" UserId="3588" Comment="Lotsa capitalization and grammar fixes, and removed the salutations. ♪" Text="I have a little problem in my solution, i'm trying to make a pretty big map for the players to walk around in.&#xD;&#xA;&#xD;&#xA;I decided to use a tile-engine, but when I move my character it moves faster than my tile-engine draws the ground so I end up catching up to the edge. It's quite hard to explain so I've added the solution at the end. Just keep walking down or right and you'll see the problem: while the world keeps generating slowly my character moves faster. Sounds like it's just a matter of changing my characters movement speed, but that doesn't help at all.&#xD;&#xA;&#xD;&#xA;This is the code for drawing the tiles&#xD;&#xA;&#xD;&#xA;     Vector2 firstSquare = new Vector2(cam.Pos.X / Tile.TileWidth, cam.Pos.Y / Tile.TileHeight);&#xD;&#xA;&#xD;&#xA;            //Vector2 worldFirstSquare = cam.GetWorldPosition(firstSquare);&#xD;&#xA;            int firstX = (int)firstSquare.X;&#xD;&#xA;            int firstY = (int)firstSquare.Y;&#xD;&#xA;&#xD;&#xA;            Vector2 squareOffset = new Vector2(cam.Pos.X % Tile.TileWidth, cam.Pos.Y % Tile.TileHeight);&#xD;&#xA;            //Vector2 worldSquareOffset = cam.GetWorldPosition(squareOffset);&#xD;&#xA;            int offsetX = (int)squareOffset.X;&#xD;&#xA;            int offsetY = (int)squareOffset.Y;&#xD;&#xA;&#xD;&#xA;            if (Mouse.GetState().LeftButton == ButtonState.Pressed)&#xD;&#xA;            {&#xD;&#xA;                Console.WriteLine(firstSquare + &quot; &quot; + squareOffset);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            for (int y = 0; y &lt; squaresDown; y++)&#xD;&#xA;            {&#xD;&#xA;                for (int x = 0; x &lt; squaresAcross; x++)&#xD;&#xA;                {&#xD;&#xA;                    if(firstY &gt;=0 &amp;&amp; firstX &gt;=0)&#xD;&#xA;                    foreach (int tileID in myMap.Rows[y + firstY].Columns[x + firstX].BaseTiles)&#xD;&#xA;                    {&#xD;&#xA;                        spriteBatch.Draw(&#xD;&#xA;                            Tile.TileSetTexture,&#xD;&#xA;                            new Rectangle(&#xD;&#xA;                                (x * Tile.TileWidth) - offsetX, (y * Tile.TileHeight) - offsetY,&#xD;&#xA;                                Tile.TileWidth, Tile.TileHeight),&#xD;&#xA;                            Tile.GetSourceRectangle(tileID),&#xD;&#xA;                            Color.White);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is for moving my character&#xD;&#xA; &#xD;&#xA;    if (keystate.IsKeyDown(Keys.W))&#xD;&#xA;            {&#xD;&#xA;                if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X -= _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else if (keystate.IsKeyDown(Keys.D))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X += _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y -= _PlayerSpeed;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.S))&#xD;&#xA;            {&#xD;&#xA;                if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X -= _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else if(keystate.IsKeyDown(Keys.D))&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed -2;&#xD;&#xA;                    _PlayerRect.X += _PlayerSpeed -2;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    _PlayerRect.Y += _PlayerSpeed;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.A))&#xD;&#xA;            {&#xD;&#xA;                _PlayerRect.X -= _PlayerSpeed;&#xD;&#xA;            }&#xD;&#xA;            else if (keystate.IsKeyDown(Keys.D))&#xD;&#xA;            {&#xD;&#xA;                _PlayerRect.X += _PlayerSpeed;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            playerPosition.X = _PlayerRect.X;&#xD;&#xA;            playerPosition.Y = _PlayerRect.Y;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the update for my camera &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector2 cameraDirection = Vector2.Zero;&#xD;&#xA;            const int TO_MOVE_SIDE_DISTANCE = 300; // the distance to the side required to move.&#xD;&#xA;&#xD;&#xA;            Vector2 playerScreenPosition = cam.GetScreenPosition(new Vector2(&#xD;&#xA;                        player.PlayerRect.X, player.PlayerRect.Y));&#xD;&#xA;            Rectangle playerScreenRect = new Rectangle((int)playerScreenPosition.X,&#xD;&#xA;                        (int)playerScreenPosition.Y, player.PlayerRect.Width, player.PlayerRect.Height);&#xD;&#xA;&#xD;&#xA;            //We make the camera follow the player if he goes too close to the sides.&#xD;&#xA;            &#xD;&#xA;            if (playerScreenRect.Left &lt; TO_MOVE_SIDE_DISTANCE) // move to the left&#xD;&#xA;            {&#xD;&#xA;                --cameraDirection.X;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Right &gt; GraphicsDevice.Viewport.Width - TO_MOVE_SIDE_DISTANCE) // move to the right&#xD;&#xA;            {&#xD;&#xA;                ++cameraDirection.X;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Top &lt; TO_MOVE_SIDE_DISTANCE) // move up&#xD;&#xA;            {&#xD;&#xA;                --cameraDirection.Y;&#xD;&#xA;            }&#xD;&#xA;            if (playerScreenRect.Bottom &gt; GraphicsDevice.Viewport.Height - TO_MOVE_SIDE_DISTANCE) // move down&#xD;&#xA;            {&#xD;&#xA;                ++cameraDirection.Y;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            cam.Pos += cameraDirection * player._PlayerSpeed; // move with the player.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[The Solution is here](http://dl.dropbox.com/u/15532091/ZombieSurvival2.rar)." />
  <row Id="28584" PostHistoryTypeId="24" PostId="12769" RevisionGUID="34a9639e-e056-4932-9890-d145cf0bbe68" CreationDate="2011-05-31T14:21:54.613" Comment="Proposed by 3588 approved by 51 edit id of 458" />
  <row Id="28585" PostHistoryTypeId="5" PostId="12858" RevisionGUID="2d7a1d04-90a1-41ad-8bd8-aa568b80a405" CreationDate="2011-05-31T14:27:47.250" UserId="284" Comment="added 196 characters in body; added 4 characters in body" Text="When making an npc combatant, it's &lt;strike&gt;easy&lt;/strike&gt; _obvious what to do_ to get a robot deathmachine by optimizing combat tactics, timing and attack types, but harder (and more interesting in a fight) to get an idiosyncratic, inpredictable enemy.  What behaviors (algorithms?) are useful for creating a more organic, unconventional enemy?&#xD;&#xA;&#xD;&#xA;**Edit:** My specific use case is with MMO-like enemies, e.g. World of Warcraft, although with less graphics involved.  Note that that means both human and inhuman enemies (animals, monsters, etc)" />
  <row Id="28586" PostHistoryTypeId="5" PostId="12898" RevisionGUID="772ce8f4-b6f7-40de-b65b-4336778e6ad2" CreationDate="2011-05-31T14:28:49.353" UserId="5508" Comment="added 571 characters in body" Text="The only library I could come up with that specifically deals with fluids is [Fluidic][1]. It is pretty alpha and only has one release, though. The physics library [Bullet][5] supports 'smoothed-particle hydrodynamics', a technique used to model fluids. Although the library is geared towards 3D, you could apply constraints to one axis to make it work in 2D.&#xD;&#xA;&#xD;&#xA;My recommendation would be, as I already mentioned in some comments on other answers, to use a standard physics engine like Box2D or Chipmunk and use a number of circles to model the water (with gravity) or gas (without gravity) and combine these together into one water or gas body. You can apply some constraints on the individual bodies to make them 'clump' together so you can simulate viscosity. Have a look at [this video][2] to see how the individual bodies (modelled as squares in the video) work together.&#xD;&#xA;&#xD;&#xA;The interesting part comes when you want combine multiple circles into body of water. The most straightforward solution I can come up with is drawing each circle as a [metaball][3] so they appear as part of a larger body. You can find the math and some example code behind these bodies [here][4].&#xD;&#xA;&#xD;&#xA;**Update:** as a commenter below correctly points out, the video actually uses a different technique than I suggested in the second paragraph. I intended the video to be an illustration on how to model fluids as separate particles using standard physics bodies, not as an example of the suggested technique.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/fluidic/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=0bL80G1HX9w&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Metaballs&#xD;&#xA;  [4]: http://www.niksula.hut.fi/~hkankaan/Homepages/metaballs.html&#xD;&#xA;  [5]: http://bulletphysics.org/wordpress/" />
  <row Id="28587" PostHistoryTypeId="5" PostId="12898" RevisionGUID="d1e4940f-2b99-4ab2-9a73-0f54f7d15797" CreationDate="2011-05-31T14:34:53.990" UserId="5508" Comment="deleted 55 characters in body" Text="The only library I could come up with that specifically deals with fluids is [Fluidic][1]. It is pretty alpha and only has one release, though. The physics library [Bullet][5] supports 'smoothed-particle hydrodynamics', a technique used to model fluids. Although the library is geared towards 3D, you could apply constraints to one axis to make it work in 2D.&#xD;&#xA;&#xD;&#xA;My recommendation would be, as I already mentioned in some comments on other answers, to use a standard physics engine like Box2D or Chipmunk and use a number of circles to model the water (with gravity) or gas (without gravity) and combine these together into one water or gas body. You can apply some constraints on the individual bodies to make them 'clump' together so you can simulate viscosity. Have a look at [this video][2] to see how the individual bodies (modelled as squares in the video) work together. Note, however, the technique used in this video is not the same as mentioned in this paragraph. You can use the video to get a feel of how the circles interact with each other and try to mimic this with the constraints present in the physics library used.&#xD;&#xA;&#xD;&#xA;The interesting part comes when you want combine multiple circles into body of water. The most straightforward solution I can come up with is drawing each circle as a [metaball][3] so they appear as part of a larger body. You can find the math and some example code behind these bodies [here][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/fluidic/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=0bL80G1HX9w&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Metaballs&#xD;&#xA;  [4]: http://www.niksula.hut.fi/~hkankaan/Homepages/metaballs.html&#xD;&#xA;  [5]: http://bulletphysics.org/wordpress/" />
  <row Id="28588" PostHistoryTypeId="25" PostId="12925" RevisionGUID="d4c3c66c-df01-4a3a-8704-583dbc3c8ed7" CreationDate="2011-05-31T15:13:24.763" Comment="http://twitter.com/#!/StackGameDev/status/75580644444471296" />
  <row Id="28589" PostHistoryTypeId="17" PostId="12942" RevisionGUID="f40570d0-107d-42d8-90da-6da8d7fe9803" CreationDate="2011-05-31T15:18:01.640" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/23609/looking-for-tech-specs-on-the-genesis-console-to-create-an-emulator" Text="" />
  <row Id="28590" PostHistoryTypeId="2" PostId="12942" RevisionGUID="4eda00ae-40ee-4746-8a3f-9b8324c0138a" CreationDate="2011-05-30T23:19:10.167" UserDisplayName="James Cadd" Text="Does anyone have links to technical documentation on the Sega Genesis including memory maps for the processors &amp; expansion ports?  The more documentation the better!" />
  <row Id="28591" PostHistoryTypeId="1" PostId="12942" RevisionGUID="4eda00ae-40ee-4746-8a3f-9b8324c0138a" CreationDate="2011-05-30T23:19:10.167" UserDisplayName="James Cadd" Text="Looking for tech specs on the Genesis console to create an emulator" />
  <row Id="28592" PostHistoryTypeId="3" PostId="12942" RevisionGUID="4eda00ae-40ee-4746-8a3f-9b8324c0138a" CreationDate="2011-05-30T23:19:10.167" UserDisplayName="James Cadd" Text="&lt;untagged&gt;" />
  <row Id="28593" PostHistoryTypeId="6" PostId="12942" RevisionGUID="6ac72368-3dc4-4eb8-a18c-1cb86fd85371" CreationDate="2011-05-31T15:21:56.903" UserId="14" Comment="edited tags" Text="&lt;emulation&gt;" />
  <row Id="28594" PostHistoryTypeId="5" PostId="347" RevisionGUID="06340265-6421-4f7f-af38-f653bd07081b" CreationDate="2011-05-31T15:31:44.880" UserId="51" Comment="updated link due to unity answer's change to quora" Text="There's a giant community wiki of tutorials and resources on Unity's answer's site:&#xD;&#xA;&#xD;&#xA;http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html" />
  <row Id="28595" PostHistoryTypeId="2" PostId="12943" RevisionGUID="16183330-b003-4673-834e-56426cdee9a5" CreationDate="2011-05-31T15:33:08.533" UserId="7361" Text="There was a Wolfire Games Blog entry about voxelization of one of their complex rabbit meshes, you can findt it [here](http://blog.wolfire.com/2009/11/Triangle-mesh-voxelization).&#xD;&#xA;&#xD;&#xA;I think it'll give you some insights on how can be the voxelization process performed." />
  <row Id="28600" PostHistoryTypeId="2" PostId="12945" RevisionGUID="b650062c-2e22-48ed-9198-69667fa31e17" CreationDate="2011-05-31T15:57:19.203" UserId="1839" Text="&gt; And when doing so, the models that are textured do not line up with the collision meshes that the .bullet file provides&#xD;&#xA;&#xD;&#xA;How much off are they? Bullet adds a little margin to the boundaries of each body depending of the collision shape, that's ok and pretty small (~0.04) This is what the [Docs][1] say:&#xD;&#xA;&#xD;&#xA;**Collision Margin**&#xD;&#xA;&#xD;&#xA;*Bullet uses a small collision margin for collision shapes, to improve performance and reliability of the collision detection. It is best not to modify the default collision margin, and if you do use a positive value: zero margin might introduce problems. By default this collision margin is set to 0.04, which is 4 centimeter if your units are in meters (recommended).*  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Dependent on which collision shapes, the margin has different meaning. Generally the collision margin will expand the object. This will create a small gap. To compensate for this, some shapes will subtract the margin from the actual size. For example, the btBoxShape subtracts the collision margin from the half extents. For a btSphereShape, the entire radius is collision margin so no gap will occur. Don’t override the collision margin for spheres. For convex hulls, cylinders and cones, the margin is added to the extents of the object, so a gap will occur, unless you adjust the graphics mesh or collision size. For convex hull objects, there is a method to remove the gap introduced by the margin, by shrinking the object. See the Demos/BspDemo for this advanced use*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bulletphysics.com/ftp/pub/test/physics/Bullet_User_Manual.pdf" />
  <row Id="28601" PostHistoryTypeId="6" PostId="12911" RevisionGUID="bb8c32e1-eff9-4622-b84b-8031ef860bee" CreationDate="2011-05-31T16:01:44.577" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;cocos2d-iphone&gt;&lt;movement&gt;" />
  <row Id="28602" PostHistoryTypeId="2" PostId="12946" RevisionGUID="3dcabb35-08f9-4fe3-bbd2-15eeaea80d89" CreationDate="2011-05-31T16:05:09.913" UserId="1156" Text="There is a vast resource of info [here][1], and a technical doc link in .zip format [here][2]. Memory maps are [here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eidolons-inn.net/old/sega/gen_dev.html&#xD;&#xA;  [2]: http://eidolon.dnsalias.net/eifiles/filesgtn3.zip&#xD;&#xA;  [3]: http://eidolon.dnsalias.net/eifiles/tech/SEG-SCHE.zip" />
  <row Id="28603" PostHistoryTypeId="2" PostId="12947" RevisionGUID="b9e81501-2b8d-40ea-9ead-09c95c883288" CreationDate="2011-05-31T16:08:56.467" UserId="6803" Text="I've recently started reading about VBOs.&#xD;&#xA;&#xD;&#xA;If, for example, I want to draw a cube using VBOs, can I use one VBO to hold the coordinates for the 8 vertices, and another one as an index array, to specify the order in which the vertices are drawn? &#xD;&#xA;&#xD;&#xA;If it's possible I'd appreciate some help on the matter, or a link to good tutorial you may know on the subject.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="28604" PostHistoryTypeId="1" PostId="12947" RevisionGUID="b9e81501-2b8d-40ea-9ead-09c95c883288" CreationDate="2011-05-31T16:08:56.467" UserId="6803" Text="Using index arrays with OpenGL VBOs" />
  <row Id="28605" PostHistoryTypeId="3" PostId="12947" RevisionGUID="b9e81501-2b8d-40ea-9ead-09c95c883288" CreationDate="2011-05-31T16:08:56.467" UserId="6803" Text="&lt;opengl&gt;&lt;vertex-arrays&gt;" />
  <row Id="28606" PostHistoryTypeId="5" PostId="12895" RevisionGUID="eee5b54b-1523-4b6e-ac5b-4afde2fbe42b" CreationDate="2011-05-31T16:11:09.313" UserId="674" Comment="added 4 characters in body" Text="There is a very interesting article on the matter on Gamasutra: [Intelligent Mistakes: How to Incorporate Stupidity Into Your AI Code][1], by Mick West.&#xD;&#xA;&#xD;&#xA;This article talks about a Pool game AI. When implementing such an AI, it's quite easy to make it pot a ball at each shoot. A simplistic way to make the AI less &quot;smart&quot; is, as suggested on other answers, to add a random factor to the calculation, making the AI miss more.&#xD;&#xA;&#xD;&#xA;But there is two major flaws with such an approach. First, it's unpredictable. For a player playing in &quot;Easy&quot; mode, it's unacceptable that the AI gets &quot;lucky&quot;. What if your random factor makes the AI do an even better shot, hitting a more valuable ball, or doing a combo? You don't know what is going to happen, and being lucky shouldn't be an option for the AI on an easy mode.&#xD;&#xA;&#xD;&#xA;The other flaw is that the player will try to identify a pattern in the AI behaviors. And with a simple random factor, there is no pattern. But that doesn't mean the player won't see any pattern, quite the opposite, in fact. As soon as the AI gets lucky, the player will see a strategy in its behavior. In the article, the players are complaining about the AI playing a position strategy. *When there's just a random factor in the angular precision*.&#xD;&#xA;&#xD;&#xA;From my point of view, after reading this eye-opening article, a non-perfect AI should never use randomization as a simplification factor. It's quite the opposite. **An easier AI should be smarter, but trying to help the player.**&#xD;&#xA;&#xD;&#xA;In the article Pool game example, the best option for implementing an &quot;easy mode&quot; AI was in fact to remove all random factor, and to add a positioning strategy. The AI would try to hit balls in order to prepare an easy and awesome shot *for the player*.&#xD;&#xA;&#xD;&#xA;This way, the player will think *he* got lucky. And that's what you're expecting for a game when playing it easy.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3947/intelligent_mistakes_how_to_.php" />
  <row Id="28607" PostHistoryTypeId="2" PostId="12948" RevisionGUID="6e6903cd-d854-4c5c-a2a7-0d8e13977cbb" CreationDate="2011-05-31T16:24:48.093" UserId="7588" Text="From [OpenGL.org](http://www.opengl.org/wiki/Vertex_Buffer_Object) :&#xD;&#xA;&#xD;&#xA;    Vertex data can be either vertex attributes and/or indices.'&#xD;&#xA;&#xD;&#xA;So yes, you can store vertices and indices on your VBO's.&#xD;&#xA;&#xD;&#xA;NeHe tutorials are generally a good resource, for tutorials, maybe you can find your joy [here](http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=45)." />
  <row Id="28608" PostHistoryTypeId="2" PostId="12949" RevisionGUID="c38365d4-8aa9-43d4-a179-e9976fcb22aa" CreationDate="2011-05-31T16:47:44.623" UserId="2792" Text="You want to do something like:&#xD;&#xA;&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, vertex_id);&#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_id);&#xD;&#xA;    glDrawElements(GL_TRIANGLES, num_indices, index_type, 0 /*index_offset*/);&#xD;&#xA;&#xD;&#xA;where index_type is something like GL_UNSIGNED_SHORT, depending on what kind of data your index buffer contains.&#xD;&#xA;&#xD;&#xA;This asumes you have created your two buffers and filled them with data already, and are using the builtin glsl attributes or fixed function pipeline.&#xD;&#xA;&#xD;&#xA;Filling is done with&#xD;&#xA;&#xD;&#xA;    glGenBuffers(1, &amp;vertex_id);&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, vertex_id);&#xD;&#xA;    glBufferData(GL_ARRAY_BUFFER, num_bytes, data, GL_STATIC_DRAW);&#xD;&#xA;&#xD;&#xA;You can change GL_STATIC_DRAW to something else depending on your usage patterns." />
  <row Id="28609" PostHistoryTypeId="5" PostId="12949" RevisionGUID="c954ddf8-512d-4d8f-9383-8eb171ef688d" CreationDate="2011-05-31T17:03:59.577" UserId="2792" Comment="added 388 characters in body; added 4 characters in body" Text="You want to do something like:&#xD;&#xA;&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, vertex_id);&#xD;&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_id);&#xD;&#xA;    glDrawElements(GL_TRIANGLES, num_indices, index_type, 0 /*index_offset*/);&#xD;&#xA;&#xD;&#xA;where index_type is something like GL_UNSIGNED_SHORT, depending on what kind of data your index buffer contains.&#xD;&#xA;&#xD;&#xA;This asumes you have created your two buffers and filled them with data already, and are using the builtin glsl attributes or fixed function pipeline. If you have specified your own attribs in the vertex program you will need to call&#xD;&#xA;&#xD;&#xA;    glBindAttribLocation(program_id, 0 /*index*/, &quot;position&quot;);&#xD;&#xA;&#xD;&#xA;before linking the program to register position as attrib 0, and then call&#xD;&#xA;&#xD;&#xA;    glVertexAttribPointer(0 /*index*/, 3 /*num_elems*/, GL_FLOAT, GL_FALSE, 0, 0);&#xD;&#xA;&#xD;&#xA;Filling is done with&#xD;&#xA;&#xD;&#xA;    glGenBuffers(1, &amp;vertex_id);&#xD;&#xA;    glBindBuffer(GL_ARRAY_BUFFER, vertex_id);&#xD;&#xA;    glBufferData(GL_ARRAY_BUFFER, num_bytes, data, GL_STATIC_DRAW);&#xD;&#xA;&#xD;&#xA;Same thing for index data, but with GL_ELEMENT_ARRAY_BUFFER as target instead. You can change GL_STATIC_DRAW to something else depending on your usage patterns." />
  <row Id="28610" PostHistoryTypeId="2" PostId="12950" RevisionGUID="08d0fbe4-7885-482b-a3b7-4e7ec6bd289b" CreationDate="2011-05-31T17:16:43.223" UserId="7715" Text="I've been working on a 2d RPG for awhile now, and I've come to realize I've made some bad design decisions. Theres a few things in particular that are causing me problems, so I was wondering what sort of designs other people used to overcome them, or would use. &#xD;&#xA;&#xD;&#xA;For a little background, I started working on it in my free time last summer. I was initially making the game in C#, but about 3 months ago, decided to switch to C++. I wanted to get a good handle on C++ since it's been awhile since I used it heavily, and figured an interesting project like this would be a good motivator. I've been using the boost library extensively and have been using SFML for graphics and FMOD for audio.  &#xD;&#xA;&#xD;&#xA;I have a fair bit of code written, but am considering scrapping it and starting over.&#xD;&#xA;&#xD;&#xA;Here's the major areas of concern I have and wanted to get some opinions on the proper way others have solved them or would solve them.&#xD;&#xA;&#xD;&#xA;1. Cyclical Dependencies&#xD;&#xA;When I was doing the game in C#, I didn't really have to worry about this since it isn't an issue there. Moving to C++, this has become a fairly major problem and made me think I may have designed things incorrectly. I can't really imagine how to decouple my classes and still have them do what I want. Here's a few examples of a dependency chain:&#xD;&#xA;&#xD;&#xA;I have a status effect class. The class has a number of methods (Apply/Unapply, Tick, etc.) to apply it's effects against a character. For instance,&#xD;&#xA;&#xD;&#xA;    virtual void TickCharacter(Character::BaseCharacter* character, Battles::BattleField *field, int ticks = 1);&#xD;&#xA;&#xD;&#xA;This functions would be called everytime the character inflicted with the status effect takes a turn. It'd be use to implement effects such as Regen, Poison, etc. However, it also introduces dependencies on the BaseCharacter class and the BattleField class. Naturally, the BaseCharacter class needs to keep track of what status effects are currently active on them so that's a cyclical dependency. Battlefield needs to keep track of the fighting parties, and the party class has a list of BaseCharacters introducing another cyclical dependency. &#xD;&#xA;&#xD;&#xA;2 - Events&#xD;&#xA;&#xD;&#xA;In C# I made extensive use of delegates to hook into events on characters, battle fields etc. (for an example, there was a delegate for when the character's health change, when a stat changed, when a status effect was added/removed, etc.) and the battlefield/graphical components would hook into those delegates to enforce their effects. In C++, I did something similar. Obviously there's no direct equivalent to C# delegates, so instead I created something like this: &#xD;&#xA;&#xD;&#xA;    typedef boost::function&lt;void(BaseCharacter*, int oldvalue, int newvalue)&gt; StatChangeFunction;&#xD;&#xA;&#xD;&#xA;and in my character class&#xD;&#xA;&#xD;&#xA;    std::map&lt;std::string, StatChangeFunction&gt; StatChangeEventHandlers;&#xD;&#xA;&#xD;&#xA;whenever the character's stat changed, I'd iterate and call every StatChangeFunction on the map. While it works, I'm worried this is a bad approach to doing things.&#xD;&#xA;&#xD;&#xA;3 - Graphics&#xD;&#xA;&#xD;&#xA;This is the big thing. It isn't related to the graphics library I'm using, but is more of a conceptual thing. In C#, I coupled graphics in with alot of my classes which i know is a terrible idea. Wanting to do it decoupled this time I tried a different approach. &#xD;&#xA;&#xD;&#xA;In order to implement my graphics, I was imagining everything graphics related in the game as a series of screens. I.e. there's a title screen, a character status screen, a map screen, an inventory screen, a battle screen, a battle GUI screen, and basically I could stack these screens on top of each other as necessary to create the game graphics. Whatever the active screen is owns the game input.&#xD;&#xA;&#xD;&#xA;I designed a screen manager that would push and pop screens based on user input.&#xD;&#xA;&#xD;&#xA;For instance, if you were on a map screen (an input handler/visualizer for a Tile Map) and pressed the start button, it'd issue a call to screen manager to push a Main Menu screen over the map screen and mark the map screen to not be drawn/updated. The player would navigate around the menu, which would issue more commands to the screen manager as appropriate to push new screens onto the screen stack, then pop them as the user changes screens/cancels. Finally when the player exits the main menu, I'd pop it off and get back to the map screen, remark it to be drawn/updated and go from there.&#xD;&#xA;&#xD;&#xA;Battle screens would be more complex. I'd have a screen to act as the background, a screen to visualize each party in the battle, and a screen to visualize the UI for the battle. The UI would hook into the character events and use those to determine when to update/redraw the UI components. Finally, every attack that has an available animation script would call an additional layer to animate itself before popping off the screen stack. In this case, every layer is consistently marked as drawable and updatable and I get a stack of screens handling my battle graphics.&#xD;&#xA;&#xD;&#xA;While I haven't been able to get the screen manager to work perfectly yet, I think I can with some time. My question about it is, is this a worthwhile approach at all? If it's a bad design I want to know now before I invest too much more time making all the screens I'm going to need. How do you build up the graphics for your game?" />
  <row Id="28611" PostHistoryTypeId="1" PostId="12950" RevisionGUID="08d0fbe4-7885-482b-a3b7-4e7ec6bd289b" CreationDate="2011-05-31T17:16:43.223" UserId="7715" Text="Advice on game design/design patterns" />
  <row Id="28612" PostHistoryTypeId="3" PostId="12950" RevisionGUID="08d0fbe4-7885-482b-a3b7-4e7ec6bd289b" CreationDate="2011-05-31T17:16:43.223" UserId="7715" Text="&lt;game-design&gt;&lt;c++&gt;&lt;rpg&gt;" />
  <row Id="28613" PostHistoryTypeId="5" PostId="12950" RevisionGUID="3db40f15-5a9e-4b02-91ce-29d6ac0f6f34" CreationDate="2011-05-31T17:33:58.283" UserId="1156" Comment="added 12 characters in body; edited tags; edited title" Text="I've been working on a 2d RPG for awhile now, and I've come to realize I've made some bad design decisions. Theres a few things in particular that are causing me problems, so I was wondering what sort of designs other people used to overcome them, or would use. &#xD;&#xA;&#xD;&#xA;For a little background, I started working on it in my free time last summer. I was initially making the game in C#, but about 3 months ago, decided to switch to C++. I wanted to get a good handle on C++ since it's been awhile since I used it heavily, and figured an interesting project like this would be a good motivator. I've been using the boost library extensively and have been using SFML for graphics and FMOD for audio.  &#xD;&#xA;&#xD;&#xA;I have a fair bit of code written, but am considering scrapping it and starting over.&#xD;&#xA;&#xD;&#xA;Here's the major areas of concern I have and wanted to get some opinions on the proper way others have solved them or would solve them.&#xD;&#xA;&#xD;&#xA;**1. Cyclical Dependencies**&#xD;&#xA;When I was doing the game in C#, I didn't really have to worry about this since it isn't an issue there. Moving to C++, this has become a fairly major problem and made me think I may have designed things incorrectly. I can't really imagine how to decouple my classes and still have them do what I want. Here's a few examples of a dependency chain:&#xD;&#xA;&#xD;&#xA;I have a status effect class. The class has a number of methods (Apply/Unapply, Tick, etc.) to apply it's effects against a character. For instance,&#xD;&#xA;&#xD;&#xA;    virtual void TickCharacter(Character::BaseCharacter* character, Battles::BattleField *field, int ticks = 1);&#xD;&#xA;&#xD;&#xA;This functions would be called everytime the character inflicted with the status effect takes a turn. It'd be use to implement effects such as Regen, Poison, etc. However, it also introduces dependencies on the BaseCharacter class and the BattleField class. Naturally, the BaseCharacter class needs to keep track of what status effects are currently active on them so that's a cyclical dependency. Battlefield needs to keep track of the fighting parties, and the party class has a list of BaseCharacters introducing another cyclical dependency. &#xD;&#xA;&#xD;&#xA;**2 - Events**&#xD;&#xA;&#xD;&#xA;In C# I made extensive use of delegates to hook into events on characters, battle fields etc. (for an example, there was a delegate for when the character's health change, when a stat changed, when a status effect was added/removed, etc.) and the battlefield/graphical components would hook into those delegates to enforce their effects. In C++, I did something similar. Obviously there's no direct equivalent to C# delegates, so instead I created something like this: &#xD;&#xA;&#xD;&#xA;    typedef boost::function&lt;void(BaseCharacter*, int oldvalue, int newvalue)&gt; StatChangeFunction;&#xD;&#xA;&#xD;&#xA;and in my character class&#xD;&#xA;&#xD;&#xA;    std::map&lt;std::string, StatChangeFunction&gt; StatChangeEventHandlers;&#xD;&#xA;&#xD;&#xA;whenever the character's stat changed, I'd iterate and call every StatChangeFunction on the map. While it works, I'm worried this is a bad approach to doing things.&#xD;&#xA;&#xD;&#xA;**3 - Graphics**&#xD;&#xA;&#xD;&#xA;This is the big thing. It isn't related to the graphics library I'm using, but is more of a conceptual thing. In C#, I coupled graphics in with alot of my classes which i know is a terrible idea. Wanting to do it decoupled this time I tried a different approach. &#xD;&#xA;&#xD;&#xA;In order to implement my graphics, I was imagining everything graphics related in the game as a series of screens. I.e. there's a title screen, a character status screen, a map screen, an inventory screen, a battle screen, a battle GUI screen, and basically I could stack these screens on top of each other as necessary to create the game graphics. Whatever the active screen is owns the game input.&#xD;&#xA;&#xD;&#xA;I designed a screen manager that would push and pop screens based on user input.&#xD;&#xA;&#xD;&#xA;For instance, if you were on a map screen (an input handler/visualizer for a Tile Map) and pressed the start button, it'd issue a call to screen manager to push a Main Menu screen over the map screen and mark the map screen to not be drawn/updated. The player would navigate around the menu, which would issue more commands to the screen manager as appropriate to push new screens onto the screen stack, then pop them as the user changes screens/cancels. Finally when the player exits the main menu, I'd pop it off and get back to the map screen, remark it to be drawn/updated and go from there.&#xD;&#xA;&#xD;&#xA;Battle screens would be more complex. I'd have a screen to act as the background, a screen to visualize each party in the battle, and a screen to visualize the UI for the battle. The UI would hook into the character events and use those to determine when to update/redraw the UI components. Finally, every attack that has an available animation script would call an additional layer to animate itself before popping off the screen stack. In this case, every layer is consistently marked as drawable and updatable and I get a stack of screens handling my battle graphics.&#xD;&#xA;&#xD;&#xA;While I haven't been able to get the screen manager to work perfectly yet, I think I can with some time. My question about it is, is this a worthwhile approach at all? If it's a bad design I want to know now before I invest too much more time making all the screens I'm going to need. How do you build up the graphics for your game?" />
  <row Id="28614" PostHistoryTypeId="4" PostId="12950" RevisionGUID="3db40f15-5a9e-4b02-91ce-29d6ac0f6f34" CreationDate="2011-05-31T17:33:58.283" UserId="1156" Comment="added 12 characters in body; edited tags; edited title" Text="Advice on game architecture/design patterns" />
  <row Id="28615" PostHistoryTypeId="6" PostId="12950" RevisionGUID="3db40f15-5a9e-4b02-91ce-29d6ac0f6f34" CreationDate="2011-05-31T17:33:58.283" UserId="1156" Comment="added 12 characters in body; edited tags; edited title" Text="&lt;c++&gt;&lt;architecture&gt;&lt;rpg&gt;" />
  <row Id="28616" PostHistoryTypeId="2" PostId="12951" RevisionGUID="a60786a8-d453-4bdf-8299-5153f782756c" CreationDate="2011-05-31T17:41:38.717" UserId="7717" Text="Yeah, D3DPRESENT_PARAMETERS has a BOOL called &quot;Windowed&quot; in it; you want to set that to false at the time you make your call to CreateDevice on your IDirect3D9 pointer." />
  <row Id="28617" PostHistoryTypeId="2" PostId="12952" RevisionGUID="a2b2bf02-40e9-47f5-970f-ce8821bbaa81" CreationDate="2011-05-31T17:43:05.917" UserId="4443" Text="Overall I would not say anything you listed should cause you to scrap the system and start over. This is something every programmer wants to do about 50-75% of the way through any project they are working on, but it leads to a never ending cycle of development and never finishing anything. So, to that end, some feed back on each section.&#xD;&#xA;&#xD;&#xA;1. This can be a problem but is usually more of an annoyance than anything else. Are  you using the #pragma once or #ifndef __MY_HEADER_FILE_H #define __MY_HEADER_FILE_H ... #endif at the top or surrounding your .h files respectively? This way the .h file only exists once within each scope? If you are, my recommendation then becomes removing all #include statements and compiling, adding in the ones as needed to compile the game again.&#xD;&#xA;&#xD;&#xA;2. I am a fan of these types of systems and see nothing wrong with it. What is an Event in C# is commonly replaced with an Event System or Messaging System (can search the questions here for those things to find more information). The key here is to keep these to a minimum when things Need to happen, which it already sounds like you are doing so should be no to minimal worries here.&#xD;&#xA;&#xD;&#xA;3. This also seems on the right track to me and is what I do for my own engines, both personally and professionally. This makes the menu system into a state system that either has the root menu (before the game starts) or the player HUD as the 'root' screen displayed, depending on how you set it up. &#xD;&#xA;&#xD;&#xA;So to sum up, I see nothing restart worthy in what you are running into. You may want a more formal Event system replacement down the road but that will come in time. Cyclic includes is a hurdle all C/C++ programmers constantly have to jump through, and working to decouple the graphics all seem like logical 'next steps'.&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="28618" PostHistoryTypeId="2" PostId="12953" RevisionGUID="e0fcf7b1-4f91-4e2e-95fe-6274f7502785" CreationDate="2011-05-31T18:07:30.790" UserId="7718" Text="As @Vaishakh said, there are games for App Inventor, including Mole Mash (which I wrote).  I've also written a game in which you can move a sprite by tilting the phone, having it chase or avoid other sprites.&#xD;&#xA;&#xD;&#xA;@stonemetal was right on about the pitfalls and limitations.  At least for now, there's no way of extending App Inventor, so if you want to do something not built in to the system, such as 3D graphics, you are totally out of luck.  There are also limits on the language, such as the inability to pass a component as a parameter or to have local variables, which provide a practical, if not theoretical, limit on the size of a program.  The App Inventor implementation is also not optimized for high-performance games.&#xD;&#xA;&#xD;&#xA;I'd recommend App Inventor as a way to help someone new to computing or intimidated by the SDK to get started with creating games.  It can also be good for creating mock-ups or prototypes.  Some games (such as quizzes) can be implemented just fine in App Inventor, but I'd recommend the Java SDK if you want to build a complex game with lots of objects and high performance.  The App Inventor team (which I'm part of) has just released a library to help ease the transition from App Inventor to the Java SDK [http://groups.google.com/group/app-inventor-instructors/browse_thread/thread/10a64e64b7886afb]." />
  <row Id="28619" PostHistoryTypeId="2" PostId="12954" RevisionGUID="991a7496-1695-488e-ab4e-d896a5fd18e6" CreationDate="2011-05-31T18:09:11.757" UserId="3598" Text="You could use sqlite, with it you can create databases in memory and on hard storage." />
  <row Id="28620" PostHistoryTypeId="25" PostId="12950" RevisionGUID="d0bc3015-f60a-4c4e-bcfb-ab82dc22619b" CreationDate="2011-05-31T18:13:26.173" Comment="http://twitter.com/#!/StackGameDev/status/75625947264589824" />
  <row Id="28621" PostHistoryTypeId="2" PostId="12955" RevisionGUID="0f94ceac-7984-4a3e-9027-7fe1619fd12c" CreationDate="2011-05-31T18:19:31.683" UserId="4360" Text="Have a look at this framework I created specifically for creating realtime multiplayer html5 games using node.js in a Client/Server approach. Where the server runs the game simulation, and players only send inputs.&#xD;&#xA;&#xD;&#xA;demo:&#xD;&#xA;http://vimeo.com/24149718&#xD;&#xA;&#xD;&#xA;repo:&#xD;&#xA;https://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28622" PostHistoryTypeId="2" PostId="12956" RevisionGUID="ea1665c2-00d3-45ec-8587-dd56d9d3e110" CreationDate="2011-05-31T18:45:46.847" UserId="4191" Text="Let's say I have a large number of conceptual objects of some kind, each of which occupies a pre-known set of points in a Cartesian 3-space.&#xD;&#xA;&#xD;&#xA;1) What is the best combination of data structure (for modeling these objects, their occupied points, and/or the enclosing space) and algorithm for the purpose of being able to retrieve only the point within each object that lies *closest* to an arbitrarily selected point, with speed the first concern and memory footprint secondary (but still important)?&#xD;&#xA;&#xD;&#xA;2) Let's say that that a point may be visually occluded with respect to another point, according to a black-box true/false rule, and I now want to retrieve the closest *visible* point of each object.  Asking the same question as in #1, is the answer the same or is something else now advisable?&#xD;&#xA;&#xD;&#xA;3) Let's say that the pre-known set of points for each conceptual object may potentially change somewhat frequently, enough so for computational expense in data structure management to be a concern.  Are the answers to #1 and #2 still good, or are they expensive enough in setup/teardown to be likely to cause problems under this condition?&#xD;&#xA;&#xD;&#xA;(I really do want to know the answers to these items separately, if they have distinct answers.)" />
  <row Id="28623" PostHistoryTypeId="1" PostId="12956" RevisionGUID="ea1665c2-00d3-45ec-8587-dd56d9d3e110" CreationDate="2011-05-31T18:45:46.847" UserId="4191" Text="Finding closest coordinate of a pre-known set" />
  <row Id="28624" PostHistoryTypeId="3" PostId="12956" RevisionGUID="ea1665c2-00d3-45ec-8587-dd56d9d3e110" CreationDate="2011-05-31T18:45:46.847" UserId="4191" Text="&lt;3d&gt;&lt;math&gt;&lt;algorithm&gt;&lt;data-structure&gt;" />
  <row Id="28625" PostHistoryTypeId="2" PostId="12957" RevisionGUID="8d993003-ff7b-497f-9363-a4c492ecab13" CreationDate="2011-05-31T18:47:35.170" UserId="51" Text="Your cyclical dependencies shouldn't be a problem as long as you're forward declaring the classes where you can in the header files and actually #including them in the .cpp (or whatever) files.&#xD;&#xA;&#xD;&#xA;For the event system, two suggestions:&#xD;&#xA;&#xD;&#xA;1) If you want to keep the pattern you're using now, consider switching to a boost::unordered_map instead of std::map.  Mapping with strings as keys is slow, especially since .NET does some nice things under the hood to help speed things up.  Using unordered_map hashes the strings so comparisons are generally faster.&#xD;&#xA;&#xD;&#xA;2) Consider switching to something more powerful like boost::signals.  If you do that, you can do nice things like make your game objects trackable by deriving from boost::signals::trackable, and let the destructor take care of cleaning up everything instead of having to manually unregister from the event system.  You can also have multiple signals pointing to each slot (or vice versa, I don't remember the exact nomenclature) so it's very similar to doing `+=` on a `delegate` in C#.  The biggest problem with boost::signals is that it has to be compiled, it's not just headers, so depending on your platform it might be a pain to get up and running." />
  <row Id="28626" PostHistoryTypeId="5" PostId="12956" RevisionGUID="2d59c6bf-b217-48e6-8e5a-57b5550fb0f4" CreationDate="2011-05-31T18:53:43.817" UserId="4191" Comment="added 80 characters in body; edited tags; edited title; edited title" Text="Let's say I have a large number of conceptual objects of some kind, each of which occupies a pre-known set of points in a Cartesian 3-space.&#xD;&#xA;&#xD;&#xA;1) What is the best combination of data structure (for modeling these objects, their occupied points, and/or the enclosing space) and algorithm for the purpose of being able to retrieve only the point within each object that lies *closest* to an arbitrarily selected point, with speed the first concern and memory footprint secondary (but still important)?&#xD;&#xA;&#xD;&#xA;2) Let's say that that a point may be visually occluded with respect to another point, according to a black-box true/false rule, and I now want to retrieve the closest *visible* point of each object.  Asking the same question as in #1, is the answer the same or is something else now advisable?&#xD;&#xA;&#xD;&#xA;3) Let's say that the pre-known set of points for each conceptual object may potentially change somewhat frequently, enough so for computational expense in data structure management to be a concern.  Are the answers to #1 and #2 still good, or are they expensive enough in setup/teardown to be likely to cause problems under this condition?&#xD;&#xA;&#xD;&#xA;(I really do want to know the answers to these items separately, if they have distinct answers.  Mega bonus points for any answers that generalize well to a Cartesian 4-space.)" />
  <row Id="28627" PostHistoryTypeId="4" PostId="12956" RevisionGUID="2d59c6bf-b217-48e6-8e5a-57b5550fb0f4" CreationDate="2011-05-31T18:53:43.817" UserId="4191" Comment="added 80 characters in body; edited tags; edited title; edited title" Text="Finding closest coordinate of a pre-known set" />
  <row Id="28628" PostHistoryTypeId="6" PostId="12956" RevisionGUID="2d59c6bf-b217-48e6-8e5a-57b5550fb0f4" CreationDate="2011-05-31T18:53:43.817" UserId="4191" Comment="added 80 characters in body; edited tags; edited title; edited title" Text="&lt;3d&gt;&lt;math&gt;&lt;algorithm&gt;&lt;data-structure&gt;&lt;4d&gt;" />
  <row Id="28629" PostHistoryTypeId="5" PostId="12925" RevisionGUID="d643bf74-cfec-4829-a849-88f3c0433768" CreationDate="2011-05-31T19:02:38.367" UserId="6275" Comment="added code, updated problem" Text="Right now im working on my c++ game, and im having alot of trouble using [GLM](http://www.3dcodingtutorial.com/Working-with-3D-models/Getting-GLM.html) and Bullet Physics to create my world correctly.&#xD;&#xA;&#xD;&#xA;The main problem is that when i export my physics with [Blender](http://blender.org)v2.57, and export my models for GLM, the models never line up with the physics correctly...&#xD;&#xA;&#xD;&#xA;Im wondering if there are any model loaders that would be good to use with Bullet Physics, and I can export the vertices,texture coords, etc. from Blender to be loaded and used as btTriangleMeshes..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I managed to make a `btBvhTriangleMesh` with my GLM model, but I think its falling, or my character is not picking it up correctly..&#xD;&#xA;&#xD;&#xA;heres the code:&#xD;&#xA;`void BulletifyContinent(GLMmodel* mesh,float x,float y,float z,float scale)&#xD;&#xA;{&#xD;&#xA;    btTriangleMesh* trimesh = new btTriangleMesh();&#xD;&#xA;    for(int t=0;t&lt;mesh-&gt;numtriangles;++t)&#xD;&#xA;    {&#xD;&#xA;        GLuint index0 =3*mesh-&gt;triangles[t].vindices[0];&#xD;&#xA;        GLuint index1 =3*mesh-&gt;triangles[t].vindices[1];&#xD;&#xA;        GLuint index2 =3*mesh-&gt;triangles[t].vindices[2];&#xD;&#xA;&#xD;&#xA;        GLfloat* p0 = &amp;mesh-&gt;vertices[index0];&#xD;&#xA;        GLfloat* p1 = &amp;mesh-&gt;vertices[index1];&#xD;&#xA;        GLfloat* p2 = &amp;mesh-&gt;vertices[index2];&#xD;&#xA;&#xD;&#xA;        btVector3* v0 = new btVector3( p0[0], p0[1], p0[2] );&#xD;&#xA;        btVector3* v1 = new btVector3( p1[0], p1[1], p1[2] );&#xD;&#xA;        btVector3* v2 = new btVector3( p2[0], p2[1], p2[2] );&#xD;&#xA;        *v0 *= scale;&#xD;&#xA;        *v1 *= scale;&#xD;&#xA;        *v2 *= scale;&#xD;&#xA;        trimesh-&gt;addTriangle( *v0, *v1, *v2 );&#xD;&#xA;        ///trimesh-&gt;addTriangle(mesh-&gt;triangles[t].vindices[0]*100,mesh-&gt;triangles[t].vindices[1]*100,mesh-&gt;triangles[t].vindices[2]*100);&#xD;&#xA;    }&#xD;&#xA;    btCollisionShape* shape = 0;&#xD;&#xA;    bool useQuantization = true;&#xD;&#xA;    shape = new btBvhTriangleMeshShape(trimesh,useQuantization);&#xD;&#xA;    btDefaultMotionState *StillStateMOT = new btDefaultMotionState(btTransform(btQuaternion(0,0,0,0),btVector3(x,y,z)));&#xD;&#xA;    btScalar Mass = 1;&#xD;&#xA;    btVector3 FallInertia(0,0,0);&#xD;&#xA;    btRigidBody::btRigidBodyConstructionInfo StillRigidCI(Mass,StillStateMOT,shape,FallInertia);&#xD;&#xA;    btRigidBody *ContiRigid = new btRigidBody(StillRigidCI);&#xD;&#xA;    PhysicsWorld-&gt;addRigidBody(ContiRigid);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28630" PostHistoryTypeId="2" PostId="12958" RevisionGUID="a3e15633-ab65-437b-88fd-02b5de6046eb" CreationDate="2011-05-31T19:22:24.753" UserId="5399" Text="In my Maxscript exporter I have the ability to flip the Z/Y axis by simply swapping the Z and Y co-ordinates.&#xD;&#xA;&#xD;&#xA;When swapping the axis this way, what is the correct thing to do to the UV coordinates? (e.g. do I need to swap the U or V, or invert one or both?)&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="28631" PostHistoryTypeId="1" PostId="12958" RevisionGUID="a3e15633-ab65-437b-88fd-02b5de6046eb" CreationDate="2011-05-31T19:22:24.753" UserId="5399" Text="What to do to UV coordinates, when swapping Z/Y coordinates (axis) of the geometry?" />
  <row Id="28632" PostHistoryTypeId="3" PostId="12958" RevisionGUID="a3e15633-ab65-437b-88fd-02b5de6046eb" CreationDate="2011-05-31T19:22:24.753" UserId="5399" Text="&lt;coordinates&gt;&lt;3dsmax&gt;&lt;uvw-mapping&gt;" />
  <row Id="28633" PostHistoryTypeId="2" PostId="12959" RevisionGUID="18d909de-388f-49f9-8d6f-f8b6ec09a117" CreationDate="2011-05-31T19:38:04.407" UserId="4828" Text="I'm making hack&amp;slash game and I want my characters move like for example in Torchlight, Diablo, etc.&#xD;&#xA;Currently I generate set of nodes for all walkable areas of a floor. When I click somewhere player goes there&#xD;&#xA;through interpolated path of nodes. This doesn't look very natural. Player moves like a robot.&#xD;&#xA;Enemies also use this node system for movement and share the same issue but I have one more problem with them.&#xD;&#xA;When enemies detect player they go to him by a shortest path. Sometimes they use the same path and line up&#xD;&#xA;to the player instead of surrounding him. I don't know how to make enemies choose different paths and surround the player.&#xD;&#xA;Do you know how can I solve this problems?&#xD;&#xA;Maybe I should use different approach for character movement?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;My current technique:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Torchlight screenshot:![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ykkPC.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/pEyWG.jpg" />
  <row Id="28634" PostHistoryTypeId="1" PostId="12959" RevisionGUID="18d909de-388f-49f9-8d6f-f8b6ec09a117" CreationDate="2011-05-31T19:38:04.407" UserId="4828" Text="Looking for a good technique for character movement in hack&amp;slash game." />
  <row Id="28635" PostHistoryTypeId="3" PostId="12959" RevisionGUID="18d909de-388f-49f9-8d6f-f8b6ec09a117" CreationDate="2011-05-31T19:38:04.407" UserId="4828" Text="&lt;ai&gt;&lt;rpg&gt;&lt;movement&gt;" />
  <row Id="28636" PostHistoryTypeId="2" PostId="12960" RevisionGUID="fcf3b42e-8f73-458e-88d1-01a442d40ce5" CreationDate="2011-05-31T19:40:12.550" UserId="890" Text="Assuming the following:&#xD;&#xA;&#xD;&#xA; - the game will be cracked at some pont no matter what&#xD;&#xA; - players are pushing to the limits&#xD;&#xA; - trolls exist&#xD;&#xA;&#xD;&#xA;What happens when these 3 combines? &#xD;&#xA;&#xD;&#xA;Regulating a troll can be handled if the device / game is not cracked, i.e. kick out, ban etc.&#xD;&#xA;&#xD;&#xA;But how to handle someone who comes online with different identities and ruins others fun?&#xD;&#xA;&#xD;&#xA;Do you check patterns? (same IP, being cooperative instead of competitive?)&#xD;&#xA;Should this be crowd sourced like in wikipedia and add rights to trusted users?&#xD;&#xA;&#xD;&#xA;We are having these issues, even though our game has only a small community.&#xD;&#xA;" />
  <row Id="28637" PostHistoryTypeId="1" PostId="12960" RevisionGUID="fcf3b42e-8f73-458e-88d1-01a442d40ce5" CreationDate="2011-05-31T19:40:12.550" UserId="890" Text="How to deal with crackers who are also trolls?" />
  <row Id="28638" PostHistoryTypeId="3" PostId="12960" RevisionGUID="fcf3b42e-8f73-458e-88d1-01a442d40ce5" CreationDate="2011-05-31T19:40:12.550" UserId="890" Text="&lt;community-management&gt;" />
  <row Id="28640" PostHistoryTypeId="2" PostId="12962" RevisionGUID="b3364fcd-05f8-49a2-ad22-238ac2d589e7" CreationDate="2011-05-31T19:50:10.960" UserId="5824" Text="I'd suggest a [kd tree][1].&#xD;&#xA;&#xD;&#xA;The nearest neighbour search is O(log Npoints) for randomly distributed points and you can easily extend the nearest neighbour search to account for occlusion.&#xD;&#xA;&#xD;&#xA;However it's not ideal if lots of points move frequently. This may or may not make the kd-tree more expensive than other options depending on how often you need to rebuild it vs how many queries are done.&#xD;&#xA;&#xD;&#xA;It will generalize to N dimensions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Kd-tree" />
  <row Id="28641" PostHistoryTypeId="2" PostId="12963" RevisionGUID="a15b1893-7084-42a9-b02a-8e8488fc5a2c" CreationDate="2011-05-31T19:50:55.950" UserId="7548" Text="Can you elaborate on &quot;cracked?&quot;  How have they &quot;cracked your game?&quot;&#xD;&#xA;&#xD;&#xA;As far as players pushing the limits, this is normal.  This is why you need to test your game as extensively as possible, and then also fix problems as they come up -- once the game is finished testing, firing the developers is the wrong thing to do because players will often still find other problems.  And then when you add features in the future (because players might request something reasonable, or you wish to expand the story, etc.), it's possible to inadvertently introduce new problems that the developers will then have to fix (and then their fixes could break something else, ad infinitum...).&#xD;&#xA;&#xD;&#xA;Trolls are a social problem.  The technological things you can do will be helpful tools in dealing with trolls, but because it's really a social problem the solution will always require at least some level of human intervention (e.g., players in the game who are volunteers or staff that have powers to kick disruptive users off the system).&#xD;&#xA;" />
  <row Id="28642" PostHistoryTypeId="2" PostId="12964" RevisionGUID="95983b64-474d-45ef-8810-e7758789c3d9" CreationDate="2011-05-31T19:51:05.080" UserId="51" Text="Basically for enemies what you want to do is do pathfinding on a macro level (think about generating convex areas and pathing to the area the player is in), and do some boid-style steering behaviors on the micro level (once you're close to the player).&#xD;&#xA;&#xD;&#xA;Here's an example of boid behavior: http://www.red3d.com/cwr/boids/&#xD;&#xA;&#xD;&#xA;For the player I think torchlight does pathfinding on a nav mesh for where you click/drag, and that works pretty well.  It may feel a bit more disconnected than direct control, but it does lead to better results for the player.  " />
  <row Id="28643" PostHistoryTypeId="5" PostId="12952" RevisionGUID="ffda8372-59ec-48b2-ba09-af47bd29a225" CreationDate="2011-05-31T19:54:54.800" UserId="744" Comment="Make example valid C++." Text="Overall I would not say anything you listed should cause you to scrap the system and start over. This is something every programmer wants to do about 50-75% of the way through any project they are working on, but it leads to a never ending cycle of development and never finishing anything. So, to that end, some feed back on each section.&#xD;&#xA;&#xD;&#xA;1. This can be a problem but is usually more of an annoyance than anything else. Are  you using the #pragma once or #ifndef MY_HEADER_FILE_H #define MY_HEADER_FILE_H ... #endif at the top or surrounding your .h files respectively? This way the .h file only exists once within each scope? If you are, my recommendation then becomes removing all #include statements and compiling, adding in the ones as needed to compile the game again.&#xD;&#xA;&#xD;&#xA;2. I am a fan of these types of systems and see nothing wrong with it. What is an Event in C# is commonly replaced with an Event System or Messaging System (can search the questions here for those things to find more information). The key here is to keep these to a minimum when things Need to happen, which it already sounds like you are doing so should be no to minimal worries here.&#xD;&#xA;&#xD;&#xA;3. This also seems on the right track to me and is what I do for my own engines, both personally and professionally. This makes the menu system into a state system that either has the root menu (before the game starts) or the player HUD as the 'root' screen displayed, depending on how you set it up. &#xD;&#xA;&#xD;&#xA;So to sum up, I see nothing restart worthy in what you are running into. You may want a more formal Event system replacement down the road but that will come in time. Cyclic includes is a hurdle all C/C++ programmers constantly have to jump through, and working to decouple the graphics all seem like logical 'next steps'.&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="28644" PostHistoryTypeId="2" PostId="12965" RevisionGUID="ebe26768-c85d-4204-968b-0021775ce046" CreationDate="2011-05-31T19:58:18.887" UserId="2332" Text="***Steering Behaviours*** in combination with a ***navigation data structure***.&#xD;&#xA;&#xD;&#xA;There are a number of ways to do this, but that's the basic concept. It might be easier to use a [navigation mesh][1] so that you can apply pathfinding within each convex section.&#xD;&#xA;&#xD;&#xA;If you're adamant about keeping a graph, you can use a [Seek][2] behaviour to each node in the path, rather than rigidly following a path from node to node.&#xD;&#xA;&#xD;&#xA;Another method you could employ is [Path Smoothing][3] but bear in mind that this is fairly computationally expensive.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ai-blog.net/archives/000152.html&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/SeekFlee.html&#xD;&#xA;  [3]: http://www.gamasutra.com/view/feature/3096/toward_more_realistic_pathfinding.php" />
  <row Id="28646" PostHistoryTypeId="2" PostId="12966" RevisionGUID="0be2f3f4-e8f8-4a02-b930-efcd95271e31" CreationDate="2011-05-31T20:13:34.040" UserId="5824" Text="Unless you're trying to change how the object is textured you shouldn't need to adjust the UVs at all." />
  <row Id="28647" PostHistoryTypeId="5" PostId="12960" RevisionGUID="b30e0ca8-4103-4ec2-b578-28084bf2bbe4" CreationDate="2011-05-31T20:17:49.487" UserId="890" Comment="added 327 characters in body" Text="Assuming the following:&#xD;&#xA;&#xD;&#xA; - the game will be cracked at some pont no matter what&#xD;&#xA; - players are pushing to the limits&#xD;&#xA; - trolls exist&#xD;&#xA;&#xD;&#xA;What happens when these 3 combines? &#xD;&#xA;&#xD;&#xA;Regulating a troll can be handled if the device / game is not cracked, i.e. kick out, ban etc.&#xD;&#xA;&#xD;&#xA;But how to handle someone who comes online with different identities and ruins others fun?&#xD;&#xA;&#xD;&#xA;Do you check patterns? (same IP, being cooperative instead of competitive?)&#xD;&#xA;Should this be crowd sourced like in wikipedia and add rights to trusted users?&#xD;&#xA;&#xD;&#xA;We are having these issues, even though our game has only a small community.&#xD;&#xA;&#xD;&#xA;Is the game free, or is a subscription / purchase required? Is the online element peer to peer or does it go through a server under your control? – Adam 5 mins ago&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Answers to Adam's comment:&#xD;&#xA;&#xD;&#xA;  - iOS game. Free version is available without multiplayer&#xD;&#xA;  - Traffic goes through a server and is under our control&#xD;&#xA;" />
  <row Id="28648" PostHistoryTypeId="2" PostId="12967" RevisionGUID="824fe98f-d1b8-4481-aebd-fe6267323669" CreationDate="2011-05-31T20:18:09.567" UserId="7588" Text="On a community based game, my honest opinion is that if you give the community the power, the game will regulate itself.&#xD;&#xA;&#xD;&#xA;For example, an online arena zone with hackers is really annoying for everyone, therefore you should give people the power to kick hackers out of the current game. Obviously certain models owe themselves better to this, and it can be exploited in the opposite way also, but this is just an example.&#xD;&#xA;&#xD;&#xA;By &quot;cracking&quot; I guess you mean that people have found a way to exploit your game and give themselves un unfair advantage. These can be dealt with by user regulation also, but more likely to better your security and heuristics.&#xD;&#xA;&#xD;&#xA;Unfortunately, people will always try, and generally succeed, to find a way around your system. The only real way is to have active moderators and make it easier for users to spot and flag players who look like cheaters.&#xD;&#xA;" />
  <row Id="28649" PostHistoryTypeId="2" PostId="12968" RevisionGUID="31669212-2336-42a6-93ca-09148c349be2" CreationDate="2011-05-31T20:22:13.883" UserId="7328" Text="I'm developing a game in which player can use ropes to swing(just like what spider man or bionic commando did) and I'm having problem implementing this behavior. Can anyone help me how to do this, I mean physics formulas and ect. till now I've came up with 3 ideas, one is using spring but it consumes a lot of time and sometimes is jumpy and two are trying to calculate next step (one via calculating potential energy and one via calculating torque) and both of them almost crash whenever the actor is trying to swing." />
  <row Id="28650" PostHistoryTypeId="1" PostId="12968" RevisionGUID="31669212-2336-42a6-93ca-09148c349be2" CreationDate="2011-05-31T20:22:13.883" UserId="7328" Text="an easy way to implement swinging in a platformer game?" />
  <row Id="28651" PostHistoryTypeId="3" PostId="12968" RevisionGUID="31669212-2336-42a6-93ca-09148c349be2" CreationDate="2011-05-31T20:22:13.883" UserId="7328" Text="&lt;2d-physics&gt;" />
  <row Id="28652" PostHistoryTypeId="2" PostId="12969" RevisionGUID="1c2b15fe-6661-41da-91b9-02ebef5d4d34" CreationDate="2011-05-31T20:27:59.273" UserId="7548" Text="Have you considered slowing down the speed of the swing movement based on how far the rope is from the plumb line (the centre)?&#xD;&#xA;" />
  <row Id="28653" PostHistoryTypeId="2" PostId="12970" RevisionGUID="54115922-e16d-44ae-8b9a-6c850315cf50" CreationDate="2011-05-31T20:29:11.597" UserId="4443" Text="I am pretty sure every iOS device out there has a unique ID that you could register with the system when it connects. You could put something in your EULA that states clearly that if you play outside of the rules intended of the game then your multi-player access will be revoked at the decision of your company. Build in a little reporting mechanism for the game and that should be good enough for the community to find the people who appear to be having an unfair advantage due to outside means, giving you the ultimate control to remove their access to the network while still letting them play the game on their own. If you want to be Really nice, then you can also consider finding a way for people to put their game back in order and play normally, but that is going above and beyond.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="28654" PostHistoryTypeId="2" PostId="12971" RevisionGUID="2c5efac1-2fea-41b1-8636-a32e1ef9b15c" CreationDate="2011-05-31T20:30:49.867" UserId="7719" Text="I try to export an animation from Maya 2011 (Mac) in FBX and I got 4 errors messages so here it is:&#xD;&#xA;&#xD;&#xA;Animation curve tangent type changged to User (45): The plug-in has changed some animation curves tangents type to User to ensure interoperability.  This mode change will not affect the animation curves' values&#xD;&#xA;&#xD;&#xA;Unsupported map(s) (1): The plug-in does not support the following maps and will not export them. To learn how to convert them so they export correctly, see Edit &gt; Convert to File Texture in the Maya documentation.&#xD;&#xA;	TS_plancher:ramp1&#xD;&#xA;&#xD;&#xA;Complex animation baked (1): &#xD;&#xA;	34 attributes had complex animation. Complex animation was exported as baked curves. (10200 evaluations done)&#xD;&#xA;&#xD;&#xA;Invalid selection set (1): The FBX plug-in cannot export the Geometry Cache for the following reason(s): No set is selected for geometry cache export, the selected set is empty, or the selection set is applied to the shape node of the object instead of its transform node: &#xD;&#xA;&#xD;&#xA;Thanks for your help!" />
  <row Id="28655" PostHistoryTypeId="1" PostId="12971" RevisionGUID="2c5efac1-2fea-41b1-8636-a32e1ef9b15c" CreationDate="2011-05-31T20:30:49.867" UserId="7719" Text="Problem exportation FBX from Maya Mac." />
  <row Id="28656" PostHistoryTypeId="3" PostId="12971" RevisionGUID="2c5efac1-2fea-41b1-8636-a32e1ef9b15c" CreationDate="2011-05-31T20:30:49.867" UserId="7719" Text="&lt;maya&gt;" />
  <row Id="28657" PostHistoryTypeId="5" PostId="11938" RevisionGUID="2923a238-1e2f-4909-950f-3a8d31c6e558" CreationDate="2011-05-31T20:52:28.873" UserId="1156" Comment="deleted 56 characters in body; edited tags" Text="I'm creating a small text RPG as a way to practice python and I'm running into a question about how to load data.  The game is a wild west game, though that isn't too relevant, and I need to store lists of weapons and their properties, as well as lists of characters, scenarios, etc.  I've got a good idea of how to represent this data as classes but I'm not as clear on how to store and load the data.  &#xD;&#xA;&#xD;&#xA;My main question revolves around the relationship between data and classes.  I have read through some posts here on SE and many of them relate to storage, so I have some good information there.&#xD;&#xA;&#xD;&#xA;When should I load that data in?  For example, the player chooses from several weapons when the game starts.  Should I load in all the weapons and instantiate all the weapon objects at that point?  Should the weapon class have the ability to show weapons from the database without instantiating them?&#xD;&#xA;&#xD;&#xA;Thanks for any help." />
  <row Id="28658" PostHistoryTypeId="6" PostId="11938" RevisionGUID="2923a238-1e2f-4909-950f-3a8d31c6e558" CreationDate="2011-05-31T20:52:28.873" UserId="1156" Comment="deleted 56 characters in body; edited tags" Text="&lt;architecture&gt;&lt;python&gt;&lt;rpg&gt;&lt;file-format&gt;" />
  <row Id="28659" PostHistoryTypeId="2" PostId="12972" RevisionGUID="f2517566-401f-4277-9b04-b4cfa4adc083" CreationDate="2011-05-31T20:56:41.120" UserId="7722" Text="I need to write an openGL program to generate and display a piecewise quadratic Bezier curve that interpolates each set of data points.&#xD;&#xA;&#xD;&#xA;0.1 0, 0 0, 0 5, 0.25 5, 0.25 0, 5 0, 5 5, 10 5, 10 0, 9.5 0&#xD;&#xA;&#xD;&#xA;The curve should have continuous tangent directions, the tangent direction at each data point being a convex combination of the two adjacent chord directions.&#xD;&#xA;&#xD;&#xA;I am not good at math, can anyone give me some suggestions about what formula I can use to calculate control point for Bezier curve if I have a starting point and an ending point.&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;" />
  <row Id="28660" PostHistoryTypeId="1" PostId="12972" RevisionGUID="f2517566-401f-4277-9b04-b4cfa4adc083" CreationDate="2011-05-31T20:56:41.120" UserId="7722" Text="find control point on Piecewise quadratic Bezier curve" />
  <row Id="28661" PostHistoryTypeId="3" PostId="12972" RevisionGUID="f2517566-401f-4277-9b04-b4cfa4adc083" CreationDate="2011-05-31T20:56:41.120" UserId="7722" Text="&lt;splines&gt;" />
  <row Id="28662" PostHistoryTypeId="25" PostId="12968" RevisionGUID="0bfa385b-7a92-4d20-a388-ced279fa3c74" CreationDate="2011-05-31T21:13:26.413" Comment="http://twitter.com/#!/StackGameDev/status/75671247530377216" />
  <row Id="28663" PostHistoryTypeId="2" PostId="12973" RevisionGUID="c7738ba5-833b-4b8d-b4d9-a269ac180c5e" CreationDate="2011-05-31T21:47:11.067" UserId="3830" Text="Ignore them.  They are a minor, trivial part of your user base." />
  <row Id="28664" PostHistoryTypeId="2" PostId="12974" RevisionGUID="18a51b8d-2473-439b-a8f8-3d68e8ad18ba" CreationDate="2011-05-31T21:49:45.637" UserId="6831" Text="For my masters thesis I'm going to develop a scalable multiplayer server for locationbased games. It's going to be a &quot;service oriented architecture&quot; e.g. one dedicated service for positions, one for the database, login etc. However 1..n frontend services for the clients to connect to. Scalability will be tested with simulated clients on some other machines. However, I'm still undecided on how my services will talk to each other. &#xD;&#xA;&#xD;&#xA;On the one hand, there is publish/subscribe. And even there are different ways to implement it, using Multicast or let each subscriber subscribe directly with the publisher. The good thing with pub/sub is, that each message will be sent to every service that is interested, e.g. the Logger-Service receives a position update as well as the position service. I can also have some &quot;shadow&quot; services that keep in sync in case the major services crashes. Depending on the implementation pub/sub feels like flooding my internal network with messages. And flooding is never a good idea.&#xD;&#xA;&#xD;&#xA;Then there is message passing. When the Frontend-Service receives a message, it finds out what type of message it is, finds the service that deals with this type and forwards the message to it. But there has to be a service discovery first, which requires some multicast or service directory.&#xD;&#xA;&#xD;&#xA;There are pros and cons for each type. In an [article][1] on high scalability I read that Playfish uses the message passing method. But using pub/sub sound appealing too. Maybe someone can tell me which way is better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://highscalability.com/blog/2010/9/21/playfishs-social-gaming-architecture-50-million-monthly-user.html" />
  <row Id="28665" PostHistoryTypeId="1" PostId="12974" RevisionGUID="18a51b8d-2473-439b-a8f8-3d68e8ad18ba" CreationDate="2011-05-31T21:49:45.637" UserId="6831" Text="Pub/Sub or message passing in multiplayer server backend?" />
  <row Id="28666" PostHistoryTypeId="3" PostId="12974" RevisionGUID="18a51b8d-2473-439b-a8f8-3d68e8ad18ba" CreationDate="2011-05-31T21:49:45.637" UserId="6831" Text="&lt;architecture&gt;&lt;java&gt;&lt;network&gt;&lt;mmo&gt;&lt;server&gt;" />
  <row Id="28667" PostHistoryTypeId="2" PostId="12975" RevisionGUID="e5c92da0-188a-4946-9bbe-a572f7854f2f" CreationDate="2011-05-31T22:13:51.200" UserId="2061" Text="If you want a rigid-swing, so the distance to the rotation-point is constant, just treat the character as a point on a circle centered at the rotation point.  Give him a one-dimensional (along the circle) angular-velocity.  Each frame the angular-acceleration should be `accelerationDueToGravity * cos(angleOfPlayerOnCircle)` (with 0-degrees pointing right).&#xD;&#xA;&#xD;&#xA;If you want the rope to get longer/shorter, you could use the above scheme and just vary the radius each frame." />
  <row Id="28668" PostHistoryTypeId="5" PostId="12968" RevisionGUID="49030a45-a624-4f66-949c-9dd2cd5e4c08" CreationDate="2011-05-31T22:37:47.930" UserId="7328" Comment="added 581 characters in body" Text="I'm developing a game in which player can use ropes to swing(just like what spider man or bionic commando did) and I'm having problem implementing this behavior. Can anyone help me how to do this, I mean physics formulas and ect. till now I've came up with 3 ideas, one is using spring but it consumes a lot of time and sometimes is jumpy and two are trying to calculate next step (one via calculating potential energy and one via calculating torque) and both of them almost crash whenever the actor is trying to swing.&#xD;&#xA;&#xD;&#xA;here is the code I wrote to calculate Torque :&#xD;&#xA;&#xD;&#xA;	float dx = Runner-&gt;getPosition().x - ancher.x; &#xD;&#xA;	float dy = Runner-&gt;getPosition().y - ancher.y;&#xD;&#xA;	float t0 = atan2(dy,dx); //my current angle&#xD;&#xA;	float k = ((dy) *vx - (dx) * vy) / (dx * dx+dy * dy); //previus angular velocity&#xD;&#xA;	k -= gravity * cos(t0) *dt; // new angular velocity (gravity is positive)&#xD;&#xA;	t0 += k * dt - acc * cos(t0) *dt * dt / 2; // rotate the rope&#xD;&#xA;	float dx1 = r0 * cos(t0); // new position (r0 is rope length)&#xD;&#xA;	float dy1 = r0 * sin(t0);&#xD;&#xA;	vx = (dx1 - dx) / dt; //calculate velocity&#xD;&#xA;	vy = (dy1 - dy) / dt;" />
  <row Id="28669" PostHistoryTypeId="2" PostId="12976" RevisionGUID="bf5c7aa4-977c-4d95-a929-e4e45b9c031f" CreationDate="2011-05-31T22:46:20.103" UserId="7725" Text="The answer from Michael Zehnich is indeed correct. However I stumbled upon another problem that cause the same exception.&#xD;&#xA;&#xD;&#xA;The problem for me was that I was missing the ID_CAP_MEDIALIB capability in my WMAppManifest.xml.&#xD;&#xA;&#xD;&#xA;    &lt;Capability Name=&quot;ID_CAP_MEDIALIB&quot;/&gt;&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="28670" PostHistoryTypeId="2" PostId="12977" RevisionGUID="afad76ca-237b-436b-b180-2943b4604795" CreationDate="2011-05-31T22:49:00.333" UserId="1101" Text="These aren't opposing paradigms, just different aspects of the same thing. Publish/subscribe can send messages. And service directories may be filled only with services that have subscribed to that directory. And if your subscriptions are 'flooding' anything then presumably you aren't subscribing to something fine-grained enough. So it's not really clear what you're asking." />
  <row Id="28671" PostHistoryTypeId="2" PostId="12978" RevisionGUID="7ac8fe70-bdd8-43f0-9297-66a7f3cf580a" CreationDate="2011-05-31T23:07:28.363" UserId="2643" Text="It's been a couple of days, and I'm still searching for a perfect solution. I did, however, find something to work with for now. My main problem was to work with time span instead of frame span. Also, I think the models I'm using aren't rigged correctly. So, I still can't get the &quot;walk&quot; animation to play right.&#xD;&#xA;&#xD;&#xA;I'm using this method to split up the clips at the PROCESSING time: http://forums.create.msdn.com/forums/t/1415.aspx?PageIndex=2 (see Spacedude's post in the middle of the thread).&#xD;&#xA;&#xD;&#xA;Here's what I'm doing to test this out. SplitAnimations() is called in the Process() method after it has been processed.&#xD;&#xA;&#xD;&#xA;    Dictionary&lt;string, AnimationClip&gt; animationClips;&#xD;&#xA;    animationClips = ProcessAnimations(skeleton.Animations, bones);&#xD;&#xA;    animationClips = SplitAnimations(animationClips[&quot;Animation&quot;], @&quot;C:\defs.txt&quot;);&#xD;&#xA;&#xD;&#xA;Then, in my component, I do this to start a clip:&#xD;&#xA;&#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            base.LoadContent();&#xD;&#xA;            var data = Model.Tag as SkinningData;&#xD;&#xA;&#xD;&#xA;            AnimationPlayer = new AnimationPlayer(data);&#xD;&#xA;&#xD;&#xA;            if (!string.IsNullOrEmpty(CurrentClip) &amp;&amp; data != null)&#xD;&#xA;            {&#xD;&#xA;                var clip = data.AnimationClips[CurrentClip];&#xD;&#xA;                AnimationPlayer.StartClip(clip);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;It'as all testing code for now. More to come. I won't flag this as an answer just yet. Waiting to see if some people could shed some light on this.&#xD;&#xA;" />
  <row Id="28672" PostHistoryTypeId="5" PostId="12973" RevisionGUID="a1227085-e096-427e-91a0-545119ee5412" CreationDate="2011-05-31T23:46:03.517" UserId="3830" Comment="added 506 characters in body" Text="Ignore them.  They are a minor, trivial part of your user base.&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;OK based on your comment to my post, you don't have a cracker/troll problem, you have a design problem.  I assumed you meant you had the typical hacker/cheater issue about every game has.&#xD;&#xA;&#xD;&#xA;You need to start thinking about blocking HOW they are hacking you, not WHO is hacking you.  Determine how they are creating fake scores and dominating your top 50 list, and block the method.  When the cheater count goes below a certain level, then just ignore them as there will always be cheaters." />
  <row Id="28673" PostHistoryTypeId="25" PostId="12960" RevisionGUID="8c397413-9ef3-4098-9734-6663e2f86523" CreationDate="2011-06-01T00:13:26.790" Comment="http://twitter.com/#!/StackGameDev/status/75716547989094400" />
  <row Id="28674" PostHistoryTypeId="2" PostId="12979" RevisionGUID="6b2b1ff9-9330-4523-bd16-69bc7493f895" CreationDate="2011-06-01T01:11:00.493" UserId="7729" Text="You could try [Allegro][1], it is a game engine written in C and supports C++. The latest version(5.0) supports the following platforms:&#xD;&#xA;&#xD;&#xA;* Unix/Linux&#xD;&#xA;* Windows (MSVC, MinGW)&#xD;&#xA;* MacOS X&#xD;&#xA;* iPhone&#xD;&#xA;&#xD;&#xA;and has [excellent documentation][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://alleg.sourceforge.net/&#xD;&#xA;  [2]: http://alleg.sourceforge.net/a5docs/5.0.3/" />
  <row Id="28675" PostHistoryTypeId="2" PostId="12980" RevisionGUID="2e1e3602-f9b9-477d-9ee0-f807055ebbb0" CreationDate="2011-06-01T01:17:56.793" UserId="7728" Text="If you'd rather stick with a nodegraph rather than switch to a nav mesh as others have suggested, then you can solve the &quot;line up to the player instead of surrounding him&quot; problem by assigning each enemy to attack from a particular direction.&#xD;&#xA;&#xD;&#xA;There are many ways to accomplish this, but I usually use a 'token' system to assign unique directions to monsters, where the player object possesses one token for each direction (north, northeast, east, etc).  When an enemy wants to path to the player, it must first acquire a token from him.  The direction specified by the token tells the monster which side of the player it is allowed to pathfind to.&#xD;&#xA;&#xD;&#xA;Additionally, when calculating the &quot;shortest path&quot; to the player, apply a small penalty to every node which is the wrong direction from the player.  (That is, if the monster only has the token which allows it to attack from the east, then for the purpose of determining the &quot;shortest path&quot;, treat any path nodes which are north/west/south of the player as if they are several nodes, instead of just one).  This will make monsters separate faster and try to flank the player, instead of marching up to the player in single-file and only spreading at the last step." />
  <row Id="28676" PostHistoryTypeId="2" PostId="12981" RevisionGUID="3ca5b451-66ef-42c9-ba95-2f6d03360b50" CreationDate="2011-06-01T01:31:53.190" UserId="7731" Text="&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[simple shooter Qt project][3]&#xD;&#xA;&#xD;&#xA;  [3]: http://sourceforge.net/projects/qute3d/" />
  <row Id="28677" PostHistoryTypeId="2" PostId="12982" RevisionGUID="af5f804b-e0d8-45f0-ba18-383e38cb178c" CreationDate="2011-06-01T03:05:46.740" UserId="7732" Text="Using XNA's built in Intersects() on two Rectangles, I can detect a collision and set my velocity to zero. However, the object is stuck there and can't get out! How can I resolve this collision properly?" />
  <row Id="28678" PostHistoryTypeId="1" PostId="12982" RevisionGUID="af5f804b-e0d8-45f0-ba18-383e38cb178c" CreationDate="2011-06-01T03:05:46.740" UserId="7732" Text="Stuck in Wall after rectangle bounding box collision" />
  <row Id="28679" PostHistoryTypeId="3" PostId="12982" RevisionGUID="af5f804b-e0d8-45f0-ba18-383e38cb178c" CreationDate="2011-06-01T03:05:46.740" UserId="7732" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="28680" PostHistoryTypeId="25" PostId="12959" RevisionGUID="4b33f316-4ecb-40c0-9bc9-0029ac9bc31d" CreationDate="2011-06-01T03:13:28.027" Comment="http://twitter.com/#!/StackGameDev/status/75761851308310530" />
  <row Id="28681" PostHistoryTypeId="2" PostId="12983" RevisionGUID="5c992752-2916-4e94-90a8-7c020b8c5ff6" CreationDate="2011-06-01T03:18:32.087" UserId="2111" Text="This is because once your object gets into the wall and you find the collision, you're simply stopping the object's movement by setting its velocity to zero, but the object is **still** within that wall.&#xD;&#xA;&#xD;&#xA;To fix it, you have to **resolve** the collision by moving the object. You have two options here:&#xD;&#xA;&#xD;&#xA; - Move the object back to its old position, by applying the opposite of the velocity to cancel the movement as soon as you detect a collision. This will prevent the object from moving in any direction that would cause a collision (so you won't be able to slide along a wall for example).&#xD;&#xA; - Find from where the object is and resolve the collision accordingly. For example, if the object came from the left and collided on the left side of the wall, you would simply move the object just to the left of the wall. By repeating this to all the sides of the rectangles, the object would be allowed to keep moving towards its desired velocity but would still avoid collisions." />
  <row Id="28682" PostHistoryTypeId="5" PostId="12983" RevisionGUID="0f3febcf-a86b-43b2-b96b-5f35ff320ebb" CreationDate="2011-06-01T03:26:17.170" UserId="2111" Comment="added 106 characters in body" Text="This is because once your object gets into the wall and you find the collision, you're simply stopping the object's movement by setting its velocity to zero, but the object is **still** within that wall.&#xD;&#xA;&#xD;&#xA;To fix it, you have to **resolve** the collision by moving the object. You have two options here:&#xD;&#xA;&#xD;&#xA; - Move the object back to its old position, by applying the opposite of the velocity to cancel the movement as soon as you detect a collision. **Pros:** extremely easy to implement. If it doesn't affect your game play go with this option. **Cons:** This will prevent the object from moving in any direction that would cause a collision (so you won't be able to slide along a wall for example).&#xD;&#xA; - Find from where the object is and resolve the collision accordingly. For example, if the object came from the left and collided on the left side of the wall, you would simply move the object just to the left of the wall. By repeating this to all the sides of the rectangles, the object would be allowed to keep moving towards its desired velocity but would still avoid collisions." />
  <row Id="28683" PostHistoryTypeId="2" PostId="12984" RevisionGUID="cd87fb7e-32c9-4e73-87c7-b4bd7c387e31" CreationDate="2011-06-01T03:27:46.890" UserId="7733" Text="You can do this in various ways.&#xD;&#xA;&#xD;&#xA;One method is storing the previous position of the Rectangle every frame. So, when your rectangles Intersects, just set the object position to the older one that not collided. This method is not the best, because if the Rectangle velocity is high, you may see the reposition that you made via code.&#xD;&#xA;&#xD;&#xA;Another method is testing the collision with a Raycast, so you can preview a collision before it ever happens.&#xD;&#xA;&#xD;&#xA;Take a look at msdn for documentation for Raycast collision, and you'll be able to do that." />
  <row Id="28684" PostHistoryTypeId="5" PostId="12983" RevisionGUID="4ada05d8-97ef-4764-93a8-eedb6835f939" CreationDate="2011-06-01T03:37:46.620" UserId="2111" Comment="added 1199 characters in body" Text="This is because once your object gets into the wall and you find the collision, you're simply stopping the object's movement by setting its velocity to zero, but the object is **still** within that wall.&#xD;&#xA;&#xD;&#xA;To fix it, you have to **resolve** the collision by moving the object. You have two options here:&#xD;&#xA;&#xD;&#xA; - Move the object back to its old position, by applying the opposite of the velocity to cancel the movement as soon as you detect a collision. **Pros:** extremely easy to implement. If it doesn't affect your game play go with this option. **Cons:** This will prevent the object from moving in any direction that would cause a collision (so you won't be able to slide along a wall for example).&#xD;&#xA; - Find from where the object is and resolve the collision accordingly. For example, if the object came from the left and collided on the left side of the wall, you would simply move the object just to the left of the wall. By repeating this to all the sides of the rectangles, the object would be allowed to keep moving towards its desired velocity but would still avoid collisions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Implementation of second option**&#xD;&#xA;&#xD;&#xA;Here I'll assume that the velocity represents the direction in which the object is going (basically that you are **not** changing the velocity between the object's position change and the collision check). I'll also assume that your origin is positioned at the top-left of the image (so when moving the object to resolve the collision I'll position the top-left corner).&#xD;&#xA;&#xD;&#xA;Here is how I would do:&#xD;&#xA;&#xD;&#xA;    if (objRect.Intersects(wallRect)) // If there is a collision&#xD;&#xA;    {&#xD;&#xA;        Vector2 newPos = obj.Position;&#xD;&#xA;&#xD;&#xA;        if (obj.Velocity.X &gt; 0) // object came from the left&#xD;&#xA;            newPos.X = wallRect.Left - objRect.Width;&#xD;&#xA;        else if (obj.Velocity.X &lt; 0) // object came from the right&#xD;&#xA;            newPos.X = wallRect.Right;&#xD;&#xA;        if (obj.Velocity.Y &gt; 0) // object came from the top&#xD;&#xA;            newPos.Y = wallRect.Top - objRect.Height;&#xD;&#xA;        else if (obj.Velocity.Y &lt; 0) // object came from the bottom&#xD;&#xA;            newPos.Y = wallRect.Bottom;&#xD;&#xA;&#xD;&#xA;        obj.Position = newPos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You could also use the old object's position to find where the object is from, but using the velocity is simpler in this case.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28685" PostHistoryTypeId="5" PostId="12980" RevisionGUID="9165a806-cdd5-437a-8ed6-daddd22bc271" CreationDate="2011-06-01T04:16:39.683" UserId="7728" Comment="Minor restructure for clarity and for shorter sentence length.  Added a sentence explicitly stating that two monsters can't have the same token (which was only implied, before)." Text="If you'd rather stick with a nodegraph rather than switch to a nav mesh as others have suggested, then you can solve the &quot;line up to the player instead of surrounding him&quot; problem by assigning each enemy to attack from a particular direction.&#xD;&#xA;&#xD;&#xA;There are many ways to accomplish this, but I usually use a 'token' system to assign unique directions to monsters, where the player object possesses one token for each direction (north, northeast, east, etc).  When an enemy wants to path to the player, it must first acquire a token from him.  The direction specified by the token tells the monster which side of the player it is allowed to pathfind to.  Since the player only has one token for each direction, and monsters need a token before they can attack, multiple monsters won't all try to path to the same side of the player, which should break up their paths a bit.&#xD;&#xA;&#xD;&#xA;Additionally you might also want to apply a small penalty to nodes during the process of finding paths, to encourage monsters to approach from a direction that matches the token they have.  (That is, if a monster has the token which allows it to attack from the east, then for the purpose of determining the &quot;shortest path&quot; for that monster, treat any path nodes which are north/west/south of the player as if they are several nodes, instead of just one).  This will make monsters separate faster and try to flank the player, instead of marching up to the player in single-file and only spreading at the last step." />
  <row Id="28686" PostHistoryTypeId="2" PostId="12985" RevisionGUID="c711717c-3cb1-4521-9ba4-d5a69a4c5f3b" CreationDate="2011-06-01T05:14:49.043" UserId="7548" Text="For interface, efficient navigation will definitely be a high priority, and I suggest you take a look at how Google Earth makes it possible to view any part of our world with a minimal amount of &quot;mousing around&quot; -- need to go from Canada to China?  Simple, zoom out from some street view in Canada, drag the world to view China, click a few times to zoom in to the desired province, city, etc., and you've travelled across the world faster than the grumpy customs official at the aeroport can say &quot;Today is your lucky day, for you've been randomly selected for a private search session...&quot;&#xD;&#xA;&#xD;&#xA;For data format, providing more options is definitely better.  If you can let the output be tab-delimited format file (.tab), comma-delimited format file (.csv), or a series of SQL INSERT statements (.sql) that will work in major SQL servers like PostgreSQL, MySQL, Oracle, SQLite, etc., that would be great.  The option for the developer to decide what information is output, and in what order, will be important too (default should be something that you choose which is sensible, starts with X and Y {and even Z if you're supporting multi-level buildings, basements, dungeons, etc.} co-ordinates, and includes all other fields).&#xD;&#xA;&#xD;&#xA;Now, being able to attach arbitrary labels will be important.  A reference to graphical images, which can be used in your editor, will help too.  Of course, for the references to graphical images, if developers have the choice of using the filename (the default) or specifying an arbitrary ID number (which can alternatively be output in the resulting data files), this would certainly be helpful.&#xD;&#xA;&#xD;&#xA;There should also be an &quot;explore mode&quot; that allows the developer to run around the world, even if the character is only a stick man (make sure you provide a stick woman as well, which should also be easy to draw because all she'll need is a triangular shaped dress and long hair).  Even if the character can run through walls and drifts around like a ghost, that will still be okay because the main point is to just give a feel of some simple navigation which is valuable to world builders.&#xD;&#xA;&#xD;&#xA;I hope this is helpful to you.  Please let me know if you do release something as I would like to take a look at it and would be happy to provide you with some feedback if you like.&#xD;&#xA;" />
  <row Id="28690" PostHistoryTypeId="25" PostId="12982" RevisionGUID="ee7a6f94-976b-4cef-8375-4478cdf91efa" CreationDate="2011-06-01T06:13:28.330" Comment="http://twitter.com/#!/StackGameDev/status/75807150517125120" />
  <row Id="28691" PostHistoryTypeId="2" PostId="12987" RevisionGUID="2eceb26f-4098-44a6-95ec-959b7954a11b" CreationDate="2011-06-01T06:23:23.693" UserId="7737" Text="I am making an image slide show using slimdx and c#. Till now I have done transitions using the matrix transformation but now I am trying to make transitions using some gray scale background image.&#xD;&#xA;Can any body please give me an idea how can i perform that or can post some code to give me an idea. " />
  <row Id="28692" PostHistoryTypeId="1" PostId="12987" RevisionGUID="2eceb26f-4098-44a6-95ec-959b7954a11b" CreationDate="2011-06-01T06:23:23.693" UserId="7737" Text="How to do gradient transitions using slimdx??" />
  <row Id="28693" PostHistoryTypeId="3" PostId="12987" RevisionGUID="2eceb26f-4098-44a6-95ec-959b7954a11b" CreationDate="2011-06-01T06:23:23.693" UserId="7737" Text="&lt;directx&gt;" />
  <row Id="28701" PostHistoryTypeId="2" PostId="12989" RevisionGUID="bace759b-861b-4833-98f9-25d7a15634b8" CreationDate="2011-06-01T08:53:57.827" UserId="7588" Text="Generally for a fade-in/out transition you can use a quad with a texture or just a plain color, and using the 'tint' Color, you can make the quad more or less transparent." />
  <row Id="28702" PostHistoryTypeId="25" PostId="12987" RevisionGUID="18763707-3ace-4f8e-8c66-89a8a638a313" CreationDate="2011-06-01T09:13:28.477" Comment="http://twitter.com/#!/StackGameDev/status/75852450283794432" />
  <row Id="28703" PostHistoryTypeId="5" PostId="12989" RevisionGUID="543575cb-3e17-4043-8d00-11c5a7078fff" CreationDate="2011-06-01T09:16:14.617" UserId="7588" Comment="added 290 characters in body" Text="Looking at the SlimDx documentation, I think more information could be useful like what classes you are using to diplay your images?&#xD;&#xA;&#xD;&#xA;Generally for a fade-in/out transition you can use a quad with a texture or just a plain color, and using the 'tint' Color, you can make the quad more or less transparent.&#xD;&#xA;&#xD;&#xA;If you are familiar with shaders, you can make a shader take multiple Textures and a float as input, and you can then easily calculate the needed mix." />
  <row Id="28704" PostHistoryTypeId="2" PostId="12990" RevisionGUID="77529eba-80e8-4e2e-bd1a-10a65cf8d8fe" CreationDate="2011-06-01T09:35:51.130" UserId="7734" Text="I'm developing a game with large obstacle and sprites(in cocos2d+box2d for iPhone), then after zooming out my sprites and layer (by increasing cameraZ), I make my game to play by user, which causes some problem in touch detection of dynamic objects.  &#xD;&#xA;&#xD;&#xA;Can it be said a good approach to work with? If No then what will be the solution to work properly(consider that I have traveled so far with this approach)?" />
  <row Id="28705" PostHistoryTypeId="1" PostId="12990" RevisionGUID="77529eba-80e8-4e2e-bd1a-10a65cf8d8fe" CreationDate="2011-06-01T09:35:51.130" UserId="7734" Text="Is it any good to make play game in zoom condition?" />
  <row Id="28706" PostHistoryTypeId="3" PostId="12990" RevisionGUID="77529eba-80e8-4e2e-bd1a-10a65cf8d8fe" CreationDate="2011-06-01T09:35:51.130" UserId="7734" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="28707" PostHistoryTypeId="2" PostId="12991" RevisionGUID="b849ce8d-036d-4282-8319-59a45e685812" CreationDate="2011-06-01T09:40:29.830" UserId="7588" Text="I'm not quite sure I understand your question entirely.&#xD;&#xA;&#xD;&#xA;I'm guessing you're having problems because the Z of your camera changes and makes all your collision detection off.&#xD;&#xA;&#xD;&#xA;If this is the case, you could try changing the FOV of the camera for the 'zoom' effect, this will remove any problems with the axis." />
  <row Id="28708" PostHistoryTypeId="25" PostId="12990" RevisionGUID="b7692821-41b2-46ab-94b2-439e7b62d364" CreationDate="2011-06-01T12:13:28.793" Comment="http://twitter.com/#!/StackGameDev/status/75897750054645760" />
  <row Id="28709" PostHistoryTypeId="6" PostId="12987" RevisionGUID="e76f46c2-b1cb-4d1e-be27-cda7e63f2cc4" CreationDate="2011-06-01T12:20:44.537" UserId="7588" Comment="Added c# and slimdx tags" Text="&lt;c#&gt;&lt;directx&gt;&lt;slimdx&gt;" />
  <row Id="28710" PostHistoryTypeId="24" PostId="12987" RevisionGUID="e76f46c2-b1cb-4d1e-be27-cda7e63f2cc4" CreationDate="2011-06-01T12:20:44.537" Comment="Proposed by 7588 approved by 14 edit id of 461" />
  <row Id="28711" PostHistoryTypeId="2" PostId="12992" RevisionGUID="faf488ee-5924-41c0-9cfb-e096937fe65d" CreationDate="2011-06-01T13:03:31.743" UserId="7630" Text="Lots of great points have already been made, but I think that one of the keys is asking yourself &quot;Do I know anything about programming, the software life cycle, leadership and running a business or do I just have some raw talent that I want to develop?&quot;&#xD;&#xA;&#xD;&#xA;The flat answer is yes, there is a ton of money to be realized in game development, iirc the industry had higher gross sales than the motion picture industry last year.  The question always becomes &quot;how&quot; to a achieve income in a stable way that lets you plan for the future... when I was 19 living pay cheque was fine, when the cash came in, the bills got paid.  Now, that kind of stress would be a serious problem.&#xD;&#xA;&#xD;&#xA;Some advice based on my own experience and opinions goes something like this:&#xD;&#xA;&#xD;&#xA;- if you've never completed a major progrmaming project, do that first.&#xD;&#xA;- don't quit your day job until the money is rolling in stably enough to support yourself... if you're determined to achieve success there are always enough hours in the day to make progress on a project, be it ever so small.  Time management (and setting priorities) is a skill that can help you life long in many areas.&#xD;&#xA;- university can help you understand the concepts in a very detailed way, but college will get you up and coding faster: there's nothing wrong with either&#xD;&#xA;- write and release a game, and get a better feel for what's actually involved... a lot of people I've known over the years could write interesting games, story lines etc but absolutely failed when it came to customer support and software updates&#xD;&#xA;- examine your skill set and recognize that you probably don't have all the skills to do it all yourself.  For early projects though, it's quite acceptable for your product to have less than the professional finish... many of my sound effects were recorded at opportune times with my phone and polished up a bit at home -- don't be afraid to accept less than perfect if it means completion, you can always revise the sounds/graphics/etc later when you have a better budget to hire someone who knows what they're doing (or you've learned how to do it better)&#xD;&#xA;- if you don't want to work 60 hrs/wk, don't.  There are lots of programming positions in the world that will give you an good income and leave you with free time.  If they don't exist in the game dev world, indie is always an option.&#xD;&#xA;- Working more is not working better... the guys I know who work 60+ hours fall into 2 categories: insanely talented and committed and will end up quitting and working for themselves because they have the skills to pay the bills ... and finally the facebookers.... these are the guys who are at work 60 hours but only really work about 30... between distractions, coffee breaks, the new iphone app that you gotta see, etc etc etc.&#xD;&#xA;&#xD;&#xA;Anyways, meeting's starting and I don't want to be here for 60 hours :-)  Hope there's something of value in here for you.&#xD;&#xA;" />
  <row Id="28712" PostHistoryTypeId="2" PostId="12993" RevisionGUID="851a922f-33d5-4135-93b9-9be8547443c0" CreationDate="2011-06-01T13:14:31.700" UserId="1929" Text="I'm creating a bunch of games similar in style to [RPG Maker XP][1] -- 2D, top-down style adventure/action/RPG. I used RPG Maker XP in the past, and their sprites are great. Their content is packaged into something called an &quot;RTP&quot;, which is a collection of sprites, tilesets, etc. which is available for *exclusive* for use with their tool.&#xD;&#xA;&#xD;&#xA;Is there an alternative, free RTP I can use out there? Or, is there a large collection of freely-available material I can use? The standard RTP comes with most common tilesets (forest, grassland, desert, snow, 100 types of people, etc.) so I need something similarly comprehensive.&#xD;&#xA;&#xD;&#xA;(To summarize, my question is: **is there an existing, free to use collection of RPG Maker XP style assets I can use somewhere out on the web?**)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rpgmakerweb.com/product/rpg-maker-xp" />
  <row Id="28713" PostHistoryTypeId="1" PostId="12993" RevisionGUID="851a922f-33d5-4135-93b9-9be8547443c0" CreationDate="2011-06-01T13:14:31.700" UserId="1929" Text="Alternate &quot;RTP&quot; -- RPG Maker XP Style Sprites" />
  <row Id="28714" PostHistoryTypeId="3" PostId="12993" RevisionGUID="851a922f-33d5-4135-93b9-9be8547443c0" CreationDate="2011-06-01T13:14:31.700" UserId="1929" Text="&lt;art&gt;" />
  <row Id="28715" PostHistoryTypeId="5" PostId="274" RevisionGUID="1e2cbf10-3063-4ed9-bca5-fa4e5b8866a1" CreationDate="2011-06-01T13:15:16.410" UserId="30" Comment="Updated answer to reflect the fact that answers.unity3d.com no longer runs on StackExchange" Text="In addition to the documentation and the unity forums, I recommend the Unity question &amp; answer site:&#xD;&#xA;&#xD;&#xA;[http://answers.unity3d.com/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com/" />
  <row Id="28716" PostHistoryTypeId="2" PostId="12994" RevisionGUID="18ce89e8-7886-4a8a-97c9-87e30d7fd36a" CreationDate="2011-06-01T13:48:11.723" UserId="4828" Text="Look at this http://www.tonypa.pri.ee/vectors/tut07.html" />
  <row Id="28717" PostHistoryTypeId="2" PostId="12995" RevisionGUID="9a3e8c02-12b7-4c93-9d26-c3371f72ea26" CreationDate="2011-06-01T13:57:34.333" UserId="3874" Text="I want to make a simple game where I have some characters fighting on a plane (level). I find the trickiest part as figuring out who should do what here.&#xD;&#xA;&#xD;&#xA;I want my terrain to have friction (so you could play on ice).&#xD;&#xA;&#xD;&#xA;I also want fairly customizable characters.&#xD;&#xA;&#xD;&#xA;At first I was thinking of a mediator pattern where the game gathers information about the current player state and modifies them based on that, but I do not think this offers enough flexibility.&#xD;&#xA;&#xD;&#xA;I was thinking more along the lines of each player / character does have some logic.&#xD;&#xA;&#xD;&#xA;The Input from the game gives it the command the player pressed, then the character would load the correct animation for this.&#xD;&#xA;&#xD;&#xA;As for friction and whatnot, I was thinking that the world would somehow need to multiply the player's velocity vector by its coefficient of friction. Because I don't think the player needs to know about the level (and preferably the level does not know about characters)&#xD;&#xA;&#xD;&#xA;It's in these little design aspects that I get a bit confused.&#xD;&#xA;&#xD;&#xA;Is this a good design? What could be improved / changed / added given what I want to do?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="28718" PostHistoryTypeId="1" PostId="12995" RevisionGUID="9a3e8c02-12b7-4c93-9d26-c3371f72ea26" CreationDate="2011-06-01T13:57:34.333" UserId="3874" Text="Communication between objects in games?" />
  <row Id="28719" PostHistoryTypeId="3" PostId="12995" RevisionGUID="9a3e8c02-12b7-4c93-9d26-c3371f72ea26" CreationDate="2011-06-01T13:57:34.333" UserId="3874" Text="&lt;game-design&gt;&lt;c++&gt;&lt;2d&gt;" />
  <row Id="28720" PostHistoryTypeId="6" PostId="12995" RevisionGUID="27f6bd8b-c2fe-4425-bc72-1e7cd871164c" CreationDate="2011-06-01T14:00:17.633" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;2d&gt;&lt;architecture&gt;" />
  <row Id="28721" PostHistoryTypeId="2" PostId="12996" RevisionGUID="ee173585-9d0e-4df1-bb4c-eb7db0f227cd" CreationDate="2011-06-01T14:27:44.200" UserId="4191" Text="Well, it's not how I would do it.  Since the velocity of the character is a property of the character, I would attach that information to the character.  In fact, I would have the character know both its position and velocity, Heisenberg be damned.  If that means the character needs to &quot;know about&quot; the level, at least insofar as being able to ask what the coefficient of friction is at its position so as to be able to update its velocity, then so be it.  Radical decoupling is a virtue only toward a particular purpose, not in and of itself.&#xD;&#xA;&#xD;&#xA;I think you were on the right track to some extent with your mediator pattern, though.  Pushing the control input directly to the character object and making it solely responsible for animation makes it awkward to, for example, have an action interrupted by external interference.  I would make the character object responsible for modeling what it's *attempting* to do, while being open to being told that something else is actually happening by the mediator, and for providing animation information to a view which would do the actual management of the animation (rather than the character model doing so itself).&#xD;&#xA;&#xD;&#xA;This isn't to say that I think all logic should live in the mediator.  As implied above, I would make the character model responsible for logic that's *about it*.  The mediator should be responsible for resolving things in a broader scope." />
  <row Id="28722" PostHistoryTypeId="6" PostId="12993" RevisionGUID="2762d1df-26e9-4d5d-ba57-3d1dcb8a211d" CreationDate="2011-06-01T14:30:32.913" UserId="1929" Comment="edited tags" Text="&lt;art&gt;&lt;rpg-maker-xp&gt;" />
  <row Id="28723" PostHistoryTypeId="2" PostId="12997" RevisionGUID="36c2264c-e9fa-4d98-b62d-5f42090c5090" CreationDate="2011-06-01T14:39:12.157" UserId="7588" Text="I'm currently porting a game to a new platform, the problem being that the old platform accepted non power of two textures and this new platform doesn't.&#xD;&#xA;&#xD;&#xA;To add to the headache, the new platform has much less memory so we want to use the tools provided by the vendor to compress them; which of course only takes power of two textures.&#xD;&#xA;&#xD;&#xA;The current workflow is to convert the non power of tho textures to dds with 'texconv', then use the vendors compression tools in a batch.&#xD;&#xA;&#xD;&#xA;So, does anyone know of a tool to convert textures to their nearest 'power of two' counterparts?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="28724" PostHistoryTypeId="1" PostId="12997" RevisionGUID="36c2264c-e9fa-4d98-b62d-5f42090c5090" CreationDate="2011-06-01T14:39:12.157" UserId="7588" Text="Tool to convert Textures to power of two?" />
  <row Id="28725" PostHistoryTypeId="3" PostId="12997" RevisionGUID="36c2264c-e9fa-4d98-b62d-5f42090c5090" CreationDate="2011-06-01T14:39:12.157" UserId="7588" Text="&lt;textures&gt;&lt;tools&gt;" />
  <row Id="28726" PostHistoryTypeId="2" PostId="12998" RevisionGUID="157a3375-ffaf-45dc-b31c-a475d2e76659" CreationDate="2011-06-01T14:47:17.607" UserId="7745" Text="I'm creating a game inside of a game called &quot;ROBLOX&quot;.  The game gives you some scripting tools to allow me to basically create anything I want.  The world is created up by decently large blocks.  There are few exceptions to this (such as ramps, spheres, tubes, etc.)&#xD;&#xA;&#xD;&#xA;I want to create a subtle hint of wind.  It will be affecting the game play a little bit and I want the wind to be predictable.  I first thought of creating a flag, but, a flag isn't very well made in such a game as ROBLOX.&#xD;&#xA;&#xD;&#xA;So my question is, what different kinds of way can I imply that there is wind?  What other methods will provide me with a natural representation of wind (I don’t want to put a meter or something, I want them to have to find it/figure it out for themselves).&#xD;&#xA;" />
  <row Id="28727" PostHistoryTypeId="1" PostId="12998" RevisionGUID="157a3375-ffaf-45dc-b31c-a475d2e76659" CreationDate="2011-06-01T14:47:17.607" UserId="7745" Text="Representing Wind in a Block-Based Game..." />
  <row Id="28728" PostHistoryTypeId="3" PostId="12998" RevisionGUID="157a3375-ffaf-45dc-b31c-a475d2e76659" CreationDate="2011-06-01T14:47:17.607" UserId="7745" Text="&lt;animation&gt;" />
  <row Id="28729" PostHistoryTypeId="25" PostId="12995" RevisionGUID="16aef4ac-81fb-4bc3-8923-f15462365af0" CreationDate="2011-06-01T15:13:29.223" Comment="http://twitter.com/#!/StackGameDev/status/75943047707369472" />
  <row Id="28730" PostHistoryTypeId="2" PostId="12999" RevisionGUID="2771a381-3027-40ca-b97e-9faf228a790f" CreationDate="2011-06-01T15:13:56.323" UserId="7588" Text="Often games will use semi-transparent blocks with that good old 'wisp' effect that gives the impression of wind. A kind of white swirl in the direction the wind is, I'll try to find a sprite sheet to show you what I mean later." />
  <row Id="28732" PostHistoryTypeId="2" PostId="13001" RevisionGUID="20bc8c60-867b-45f9-8682-a994eae3c6d0" CreationDate="2011-06-01T15:23:42.947" UserId="7746" Text="If you can muster to pay 9$, there is a bulk of 1000+ legal sprites here you can use :&#xD;&#xA;[RPG Sprite Set](http://graphicriver.net/item/ultimate-game-sprite-set/121857?ref=sirgecko)&#xD;&#xA;&#xD;&#xA;(Not made by me tho, but i have bought a copy myself and they look fair enough.)" />
  <row Id="28733" PostHistoryTypeId="2" PostId="13002" RevisionGUID="d4a1b56a-60d5-466a-8056-32863bc698fe" CreationDate="2011-06-01T15:46:45.487" UserId="6875" Text="What is the difference between ambient and skylight lighting? Please give me a detailed description of the differences." />
  <row Id="28734" PostHistoryTypeId="1" PostId="13002" RevisionGUID="d4a1b56a-60d5-466a-8056-32863bc698fe" CreationDate="2011-06-01T15:46:45.487" UserId="6875" Text="What is the difference between ambient lighting and skylight?" />
  <row Id="28735" PostHistoryTypeId="3" PostId="13002" RevisionGUID="d4a1b56a-60d5-466a-8056-32863bc698fe" CreationDate="2011-06-01T15:46:45.487" UserId="6875" Text="&lt;lighting&gt;" />
  <row Id="28736" PostHistoryTypeId="2" PostId="13003" RevisionGUID="932a193c-4a99-411a-86c6-7e45ed99948c" CreationDate="2011-06-01T15:54:39.443" UserId="2792" Text="Ambient lighting is just a constant term modulated by surface color.&#xD;&#xA;&#xD;&#xA;Sky light can mean many different things, it might depend a bit on engine/library/app:&#xD;&#xA;&#xD;&#xA; * Directional light casting shadows. This gives you the direct illumination from a sun&#xD;&#xA; * Multi directional ambient light, where incoming is sampled along world normal from some kind of data structure, usually a 4x4x6 cubemap or just an equation. This will give you an overall ambient term that is brighter in the suns direction, blue in the sky and brown/green from the ground.&#xD;&#xA;&#xD;&#xA;Usually it is just the latter, or a combination of the two." />
  <row Id="28737" PostHistoryTypeId="2" PostId="13004" RevisionGUID="4c759182-be77-4a3e-beaa-80c8b8ed3235" CreationDate="2011-06-01T15:57:09.677" UserId="7546" Text="I am developing a small 2D game engine. The characters have a paint method which currently does the following:&#xD;&#xA;&#xD;&#xA;1. Calculate the new position of the character as per its speed, etc.&#xD;&#xA;2. Update the collision grid cell **&#xD;&#xA;3. Draw the character at the new position&#xD;&#xA;&#xD;&#xA;** I have created a collision grid to reduce the number of intersection checks&#xD;&#xA;&#xD;&#xA;Now the basic algorithm which I have thought for detecting collision is: &#xD;&#xA;&#xD;&#xA;    For Each Character&#xD;&#xA;        Check intersection with characters in surrounding 8 cells&#xD;&#xA;&#xD;&#xA;I can simply place this code in the paint method. But here is the problem I anticipate.&#xD;&#xA;&#xD;&#xA;Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.&#xD;&#xA;&#xD;&#xA;But I have an idea that when A detects that it has collied with B it should inform B that it has collided with A. This would save lot of comparisons if there are more then 2 actors colliding. But I am not sure how to handle this. I think instead of the every character checking for its collision, I should check for the collision inside the game loop. &#xD;&#xA;&#xD;&#xA;Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic?" />
  <row Id="28738" PostHistoryTypeId="1" PostId="13004" RevisionGUID="4c759182-be77-4a3e-beaa-80c8b8ed3235" CreationDate="2011-06-01T15:57:09.677" UserId="7546" Text="Where should collision detection logic be placed?" />
  <row Id="28739" PostHistoryTypeId="3" PostId="13004" RevisionGUID="4c759182-be77-4a3e-beaa-80c8b8ed3235" CreationDate="2011-06-01T15:57:09.677" UserId="7546" Text="&lt;collision-detection&gt;" />
  <row Id="28740" PostHistoryTypeId="2" PostId="13005" RevisionGUID="e427245c-e746-4245-8a2b-e3ac1d33566d" CreationDate="2011-06-01T15:59:27.623" UserId="1101" Text="Ambient light is an abstract concept. Typical computer light simulations divide light into 4 categories: specular (light from a specific source reflecting directly off an object), diffuse (light from a specific source reflecting indirectly off the object), emissive (light being created by the object itself), and ambient (light from all other sources being reflected off the object). You blend these 4 (although emissive is rarely used) to simulate the effects of the various lights in the scene. A material or part of a material will have different reflectivity values for these 4 light types to determine how it appears - eg. a shiny surface will favour the specular, whereas a soft surface will favour the diffuse.&#xD;&#xA;&#xD;&#xA;As such, you might use the ambient lighting to simulate some light from the sky, but you will probably simulate more of that light by a directional light that is seen as specular and diffuse reflections. The ambient light helps to simulate the daylight that hits the object from random angles due to bouncing off other objects. However there are a variety of different ways to achieve this, all more realistic than simply setting a simple ambient light level." />
  <row Id="28741" PostHistoryTypeId="4" PostId="12938" RevisionGUID="0432f4a3-687a-4436-b422-b70ef7ae4c65" CreationDate="2011-06-01T16:00:19.050" UserId="3830" Comment="Rephrased title as question" Text="What is the best way to manage large 3d worlds (i.e minecraft style)?" />
  <row Id="28742" PostHistoryTypeId="2" PostId="13006" RevisionGUID="e169cea2-9540-4073-8f82-3c162cf3e199" CreationDate="2011-06-01T16:13:06.330" UserId="6469" Text="I run a loop for all my characters in the game loop like you say.&#xD;&#xA;&#xD;&#xA;The way I do it is with a state on each of my characters, so if A and B collide while A is checking collision A and B are set to hit. at the beginning of B's loop it checks to see if it is already hit, if so id doesn't run the loop.&#xD;&#xA;&#xD;&#xA;I put the affect code in the loop so any action that should be taken on B has happened in A's loop so there should be no reason for B to check as this would mess up the outcome of the collision, this may be different for you though. " />
  <row Id="28743" PostHistoryTypeId="2" PostId="13007" RevisionGUID="878e9e2e-7e6e-4885-879f-5377e375dee4" CreationDate="2011-06-01T16:14:24.237" UserId="3830" Text="You might check out [this ImageMagick forum post][1] where someone goes into detail on power of two rescaling via some extended features of ImageMagick. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&amp;t=11979#p39254" />
  <row Id="28744" PostHistoryTypeId="2" PostId="13008" RevisionGUID="a1727f30-2db4-4e23-9364-03f8c336e296" CreationDate="2011-06-01T16:33:54.417" UserId="7751" Text="I have mouselooking and walking in my game, but they are veeeeeeeery slow and hard to use. I think it's because I'm using fixed speed. I heard that in big projects developers uses delta time. How to calculate it in glut? How to calculate speed using delta time?&#xD;&#xA;Thanks." />
  <row Id="28745" PostHistoryTypeId="1" PostId="13008" RevisionGUID="a1727f30-2db4-4e23-9364-03f8c336e296" CreationDate="2011-06-01T16:33:54.417" UserId="7751" Text="How to use delta time and how to get it? / GLUT" />
  <row Id="28746" PostHistoryTypeId="3" PostId="13008" RevisionGUID="a1727f30-2db4-4e23-9364-03f8c336e296" CreationDate="2011-06-01T16:33:54.417" UserId="7751" Text="&lt;mouse&gt;" />
  <row Id="28747" PostHistoryTypeId="2" PostId="13009" RevisionGUID="d23b2931-283d-4728-966f-473ae9ac908c" CreationDate="2011-06-01T16:35:42.047" UserId="7749" Text="I've been working on a 2D (tile based) 2D platformer for iOS and I've got basic entity collision detection working, but there's just something *not right* about it and I can't quite figure out how to solve it.&#xD;&#xA;&#xD;&#xA;There are 2 forms of collision between player entities as I can tell, either the two players (human controlled) are hitting each other side-to-side (i. e. pushing against one another), or one player has jumped on the head of the other player (naturally, if I wanted to expand this to player vs enemy, the effects would be different, but the types of collisions would be identical, just the reaction should be a little different).&#xD;&#xA;&#xD;&#xA;In my code I believe I've got the side-to-side code working: If two entities press against one another, then they are both moved back on either side of the intersection rectangle so that they are just pushing on each other.&#xD;&#xA;&#xD;&#xA;I also have the &quot;landed on the other player's head&quot; part working.&#xD;&#xA;&#xD;&#xA;The real problem is, if the two players are currently pushing up against each other, and one player jumps, then at one point as they're jumping, the height-difference threshold that counts as a &quot;land on head&quot; is passed and then it registers as a jump. As a life-long player of 2D Mario Bros style games, this feels incorrect to me, but I can't quite figure out how to solve it.&#xD;&#xA;&#xD;&#xA;My code: (it's really Objective-C but I've put it in pseudo C-style code just to be simpler for non ObjC readers)&#xD;&#xA;&#xD;&#xA;    void checkCollisions() {&#xD;&#xA;        &#xD;&#xA;        // For each entity in the scene, compare it with all other entities (but not with one it's already compared against)&#xD;&#xA;        for (int i = 0; i &lt; _allGameObjects.count(); i++) {&#xD;&#xA;                &#xD;&#xA;                // GameObject is an Entity&#xD;&#xA;                GEGameObject *firstGameObject = _allGameObjects.objectAtIndex(i);&#xD;&#xA;                &#xD;&#xA;                &#xD;&#xA;                // Don't check against yourself or any previous entity&#xD;&#xA;                for (int j = i+1; j &lt; _allGameObjects.count(); j++) {&#xD;&#xA;                        &#xD;&#xA;                        &#xD;&#xA;                        GEGameObject *secondGameObject = _allGameObjects.objectAtIndex(j);&#xD;&#xA;                        &#xD;&#xA;                        // Get the collision bounds for both entities, then see if they intersect&#xD;&#xA;                        // CGRect is a C-struct with an origin Point (x, y) and a Size (w, h)&#xD;&#xA;                        &#xD;&#xA;                        CGRect firstRect = firstGameObject.collisionBounds();&#xD;&#xA;                        CGRect secondRect = secondGameObject.collisionBounds();&#xD;&#xA;                        &#xD;&#xA;                        // Collision of any sort&#xD;&#xA;                        if (CGRectIntersectsRect(firstRect, secondRect)) {&#xD;&#xA;                                &#xD;&#xA;                                ////////////////////////////////&#xD;&#xA;                                //                            //&#xD;&#xA;                                // Check for jumping first (???)&#xD;&#xA;                                //                            //&#xD;&#xA;                                ////////////////////////////////&#xD;&#xA;                                if (firstRect.origin.y &gt; (secondRect.origin.y + (secondRect.size.height * 0.7))) {&#xD;&#xA;                                        &#xD;&#xA;                                        // the top entity could be pretty far down/in to the bottom entity....&#xD;&#xA;                                        firstGameObject.didLandOnEntity(secondGameObject);&#xD;&#xA;                                        &#xD;&#xA;                                } else if (secondRect.origin.y &gt; (firstRect.origin.y + (firstRect.size.height * 0.7))) {&#xD;&#xA;                                        &#xD;&#xA;                                        // second entity was actually on top....&#xD;&#xA;                                        secondGameObject.didLandOnEntity.(firstGameObject);&#xD;&#xA;                                        &#xD;&#xA;                                } else if (firstRect.origin.x &gt; secondRect.origin.x &amp;&amp; firstRect.origin.x &lt; (secondRect.origin.x + secondRect.size.width)) {&#xD;&#xA;                                         &#xD;&#xA;                                        // Hit from the RIGHT&#xD;&#xA;                                        &#xD;&#xA;                                        CGRect intersection = CGRectIntersection(firstRect, secondRect);&#xD;&#xA;&#xD;&#xA;                                        // The NUDGE just offsets either object back to the left or right&#xD;&#xA;                                        // After the nudging, they are exactly pressing against each other with no intersection&#xD;&#xA;                                        firstGameObject.nudgeToRightOfIntersection(intersection);&#xD;&#xA;                                        secondGameObject.nudgeToLeftOfIntersection(intersection);&#xD;&#xA;                                        &#xD;&#xA;                                        &#xD;&#xA;                                } else if ((firstRect.origin.x + firstRect.size.width) &gt; secondRect.origin.x) {&#xD;&#xA;                                        // hit from the LEFT&#xD;&#xA;                                        &#xD;&#xA;                                        CGRect intersection = CGRectIntersection(firstRect, secondRect);&#xD;&#xA;                                        secondGameObject.nudgeToRightOfIntersection(intersection);&#xD;&#xA;                                        firstGameObject.nudgeToLeftOfIntersection(intersection);&#xD;&#xA;                                        &#xD;&#xA;                                        &#xD;&#xA;                                }&#xD;&#xA;                        }&#xD;&#xA;                        &#xD;&#xA;                }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I think my collision detection code is pretty close, but obviously I'm doing something a little wrong. I really think it's to do with the way my jumps are checked (I wanted to make sure that a jump could happen from an angle (instead of if the falling player had been at a right angle to the player below).&#xD;&#xA;&#xD;&#xA;Can someone please help me here? I haven't been able to find many resources on how to do this properly (and thinking like a game developer is new for me). Thanks in advance! " />
  <row Id="28748" PostHistoryTypeId="1" PostId="13009" RevisionGUID="d23b2931-283d-4728-966f-473ae9ac908c" CreationDate="2011-06-01T16:35:42.047" UserId="7749" Text="Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)" />
  <row Id="28749" PostHistoryTypeId="3" PostId="13009" RevisionGUID="d23b2931-283d-4728-966f-473ae9ac908c" CreationDate="2011-06-01T16:35:42.047" UserId="7749" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;game-mechanics&gt;&lt;sprites&gt;&lt;platformer&gt;" />
  <row Id="28750" PostHistoryTypeId="2" PostId="13010" RevisionGUID="3d1fc1d5-abd8-4f30-97cd-43b8f727438e" CreationDate="2011-06-01T17:02:08.483" UserId="962" Text="When the player is further than the length of the rope, the player will be immediately pushed back with a force equal to the distance that he has passed it. This should work without feeling springy, and should feel intuitive to the player. You may have to tweak your physics to get the best results for your game though.&#xD;&#xA;&#xD;&#xA;When the rope is attached. Save a `maxLength` value.&#xD;&#xA;&#xD;&#xA;Each update, check the `distance` between the `player`, and the `attachPoint`&#xD;&#xA;&#xD;&#xA;If the `distance` is less than the `maxLength` update normally, no effects from rope.&#xD;&#xA;&#xD;&#xA;If the distance is greater than the `maxLength`, find the `normal` from the `attachPoint` to the player. Get the difference between the `distance` and `maxLength`. Add to the `playerVelocity`, `normal` multiplied by the difference.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: To create an normal with A and B:&#xD;&#xA;   &#xD;&#xA;    dx = (B.x - A.x) / Distance&#xD;&#xA;    dy = (B.y - A.y) / Distance&#xD;&#xA;    normal = {dx,dy} //point, or vector2&#xD;&#xA;&#xD;&#xA;To get the distance with A and B:&#xD;&#xA;&#xD;&#xA;    dx = (A.x-B.x)&#xD;&#xA;    dy = (A.y-B.y)&#xD;&#xA;    distance = sqrt(dx*dx*dy*dy)&#xD;&#xA;" />
  <row Id="28751" PostHistoryTypeId="2" PostId="13011" RevisionGUID="3058964f-d617-41da-a2bc-efbc7486a5a3" CreationDate="2011-06-01T17:05:41.480" UserId="6813" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts).&#xD;&#xA;&#xD;&#xA;You get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line return the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/" />
  <row Id="28752" PostHistoryTypeId="5" PostId="13011" RevisionGUID="d8b6c5b1-4de2-479e-b838-170df9c0df01" CreationDate="2011-06-01T17:11:31.417" UserId="6813" Comment="added 50 characters in body; added 4 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line return the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/" />
  <row Id="28759" PostHistoryTypeId="5" PostId="13011" RevisionGUID="f12836df-1876-4ad0-aaf1-e8a7d6f687e5" CreationDate="2011-06-01T17:20:47.130" UserId="6813" Comment="added 290 characters in body; deleted 1 characters in body; deleted 104 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line return the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;Here is a small example: suppose you want to move something by 10 units each seconds on the x axis. You could do something like this.&#xD;&#xA;&#xD;&#xA;    Position.x += 10/1000 * deltaTime;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/" />
  <row Id="28760" PostHistoryTypeId="5" PostId="13011" RevisionGUID="02592269-2ac4-462f-8991-c11cb7105668" CreationDate="2011-06-01T17:26:48.257" UserId="6813" Comment="added 39 characters in body; added 119 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line return the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;Here is a small example: suppose you want to move something by 10 units each seconds on the x axis. You could do something like this (if deltaTime use milliseconds indeed).&#xD;&#xA;&#xD;&#xA;    Position.x += 10/1000 * deltaTime;&#xD;&#xA;&#xD;&#xA;This way, whether your program updated 2 times or 100 times, 1 second later the position should be almost the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/" />
  <row Id="28761" PostHistoryTypeId="2" PostId="13013" RevisionGUID="bfe1b2de-1eb3-4c86-979c-4e57e51dd40e" CreationDate="2011-06-01T17:30:40.907" UserId="4496" Text="What you could do is set a flag when you collide with a sprite that contains what kind of collision you are currently involved in.  Then, if the jumping while touching sideways situation happens, you can tell because the sideways collision flag is still up, which means you can safely ignore the top down collision effect with that sprite.&#xD;&#xA;&#xD;&#xA;Make sure to drop whichever flag you aren't using at the moment (so if you are pressing sideways and you jump above the other sprite, once you are no longer colliding sideways a top down collision should be possible) otherwise you could get some non-registering collision going directly from one to the other.  You can also add a delay or dead-zone to making the flag reset depending on how much clearance you want before the changed collision behavior.&#xD;&#xA;&#xD;&#xA;All of this would have the benefit of having whichever collision side happens first override the others, regardless of the number of sides you have unique behavior for.&#xD;&#xA;&#xD;&#xA;Another option would be to make sure that sideways collision always takes precedent over top down collision, so if both are true it acts like a sideways collision, but how effective this would be would depend on the collision logic.  It could easily flip your problem to counting as side collision when on top if you are not careful." />
  <row Id="28762" PostHistoryTypeId="5" PostId="13011" RevisionGUID="adf7d244-ab91-4a17-a25f-e86c9d32c5d6" CreationDate="2011-06-01T17:32:33.623" UserId="6813" Comment="added 140 characters in body; added 48 characters in body; added 86 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line return the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;Here is a small example: suppose you want to move something by 10 units each seconds on the x axis. You could do something like this (if deltaTime use milliseconds indeed).&#xD;&#xA;&#xD;&#xA;    Position.x += 10/1000 * deltaTime;&#xD;&#xA;&#xD;&#xA;This way, whether your program updated 2 times or 100 times, 1 second later the position should be almost the same, and the game-play is less impacted by the low fps of a small computer than if it use fixed values.&#xD;&#xA;&#xD;&#xA;- With fixed values ==&gt; low fps = less updates = slow movements whereas high fps = more updates = very fast movements.&#xD;&#xA;&#xD;&#xA;- With deltaTime ==&gt; &quot;almost&quot; the same movements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/" />
  <row Id="28763" PostHistoryTypeId="4" PostId="12925" RevisionGUID="3cd7a459-2fc9-413a-9829-7cc7696588eb" CreationDate="2011-06-01T17:38:11.847" UserId="6275" Comment="changed to a better title" Text="How would I use GLM for Bullet Physics?" />
  <row Id="28764" PostHistoryTypeId="5" PostId="13011" RevisionGUID="310533ab-ba5a-4c43-b444-aab8151f633b" CreationDate="2011-06-01T17:41:04.920" UserId="6813" Comment="added 230 characters in body; deleted 24 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line return the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;Here is a small example: suppose you want to move something by 10 units each seconds on the x axis. You could do something like this (if deltaTime use milliseconds indeed).&#xD;&#xA;&#xD;&#xA;    Position.x += 10/1000 * deltaTime;&#xD;&#xA;&#xD;&#xA;This way, whether your program updated 2 times or 100 times, 1 second later the position should be almost the same, and the game-play is less impacted by the low fps of a small computer than if it use fixed values.&#xD;&#xA;&#xD;&#xA;- With fixed values ==&gt; low fps = less updates = slow movements whereas high fps = more updates = very fast movements.&#xD;&#xA;&#xD;&#xA;- With deltaTime ==&gt; &quot;almost&quot; the same movements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, you should read [Fixed time step vs Variable time step][5] on  gamedev.stackexchange.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/&#xD;&#xA;[5]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="28765" PostHistoryTypeId="2" PostId="13014" RevisionGUID="66502923-ffb4-4c57-a288-85bc29c62ec0" CreationDate="2011-06-01T17:42:13.190" UserId="4496" Text="SFX can strongly improve the illusion of wind, especially when used in conjunction with a subtle visual effect.  &#xD;&#xA;&#xD;&#xA;You can even use the volume of the sound in comparison with the background sounds/music to imply strength of wind.  (You don't necessarily have to keep raising the volume of the wind for this, having the background sounds/music fade slightly as you reach more intense wind can have just as much if not more of an effect without simultaneously making your game too loud)" />
  <row Id="28766" PostHistoryTypeId="5" PostId="12968" RevisionGUID="30cf771d-87ee-4d72-a3d4-9da1fa10345f" CreationDate="2011-06-01T17:50:26.373" UserId="3588" Comment="Did some formatting of the question. Spiderman is a proper name, but not necessarily a game name so I avoided italicizing it. Also added the rope and platform tags. ♪" Text="I'm developing a game in which player can use ropes to swing (just like what Spiderman or *Bionic Commando* did) and I'm having problem implementing this behavior. Can anyone help me how to do this, I mean physics formulas and etc. Till now I've come up with 3 ideas. One is using spring, but it consumes a lot of time and sometimes it is jumpy. The other two are trying to calculate next step (one via calculating potential energy and one via calculating torque) and both of them almost crash whenever the actor is trying to swing.&#xD;&#xA;&#xD;&#xA;Here is the code I wrote to calculate torque:&#xD;&#xA;&#xD;&#xA;	float dx = Runner-&gt;getPosition().x - ancher.x; &#xD;&#xA;	float dy = Runner-&gt;getPosition().y - ancher.y;&#xD;&#xA;	float t0 = atan2(dy,dx); //my current angle&#xD;&#xA;	float k = ((dy) *vx - (dx) * vy) / (dx * dx+dy * dy); //previus angular velocity&#xD;&#xA;	k -= gravity * cos(t0) *dt; // new angular velocity (gravity is positive)&#xD;&#xA;	t0 += k * dt - acc * cos(t0) *dt * dt / 2; // rotate the rope&#xD;&#xA;	float dx1 = r0 * cos(t0); // new position (r0 is rope length)&#xD;&#xA;	float dy1 = r0 * sin(t0);&#xD;&#xA;	vx = (dx1 - dx) / dt; //calculate velocity&#xD;&#xA;	vy = (dy1 - dy) / dt;" />
  <row Id="28767" PostHistoryTypeId="4" PostId="12968" RevisionGUID="30cf771d-87ee-4d72-a3d4-9da1fa10345f" CreationDate="2011-06-01T17:50:26.373" UserId="3588" Comment="Did some formatting of the question. Spiderman is a proper name, but not necessarily a game name so I avoided italicizing it. Also added the rope and platform tags. ♪" Text="How can I easily implement swinging in a platformer game?" />
  <row Id="28768" PostHistoryTypeId="6" PostId="12968" RevisionGUID="30cf771d-87ee-4d72-a3d4-9da1fa10345f" CreationDate="2011-06-01T17:50:26.373" UserId="3588" Comment="Did some formatting of the question. Spiderman is a proper name, but not necessarily a game name so I avoided italicizing it. Also added the rope and platform tags. ♪" Text="&lt;2d-physics&gt;&lt;platform-games&gt;&lt;rope-physics&gt;" />
  <row Id="28769" PostHistoryTypeId="24" PostId="12968" RevisionGUID="30cf771d-87ee-4d72-a3d4-9da1fa10345f" CreationDate="2011-06-01T17:50:26.373" Comment="Proposed by 3588 approved by 51 edit id of 463" />
  <row Id="28770" PostHistoryTypeId="5" PostId="13004" RevisionGUID="d581eddc-5efe-4993-b87b-a26d80eeb18f" CreationDate="2011-06-01T17:50:38.217" UserId="3588" Comment="Added the architecture tag and the gameloop tag. Also made some pretty minor adjustments in the question body. ♪" Text="I am developing a small 2D game engine. The characters have a paint method which currently does the following:&#xD;&#xA;&#xD;&#xA;1. Calculate the new position of the character as per its speed, etc.&#xD;&#xA;2. Update the collision grid cell **&#xD;&#xA;3. Draw the character at the new position&#xD;&#xA;&#xD;&#xA;** I have created a collision grid to reduce the number of intersection checks&#xD;&#xA;&#xD;&#xA;Now the basic algorithm which I have thought for detecting collision is: &#xD;&#xA;&#xD;&#xA;    For Each Character&#xD;&#xA;        Check intersection with characters in surrounding 8 cells&#xD;&#xA;&#xD;&#xA;I can simply place this code in the paint method. But here is the problem I anticipate.&#xD;&#xA;&#xD;&#xA;Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.&#xD;&#xA;&#xD;&#xA;But I have an idea that when A detects that it has collided with B, it should inform B that it has collided with A. This would save lot of comparisons when there are more than 2 actors colliding. But I am not sure how to handle this. I think instead of the every character checking for its collision, I should check for the collision inside the game loop. &#xD;&#xA;&#xD;&#xA;Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic?" />
  <row Id="28771" PostHistoryTypeId="6" PostId="13004" RevisionGUID="d581eddc-5efe-4993-b87b-a26d80eeb18f" CreationDate="2011-06-01T17:50:38.217" UserId="3588" Comment="Added the architecture tag and the gameloop tag. Also made some pretty minor adjustments in the question body. ♪" Text="&lt;architecture&gt;&lt;collision-detection&gt;&lt;gameloop&gt;" />
  <row Id="28772" PostHistoryTypeId="24" PostId="13004" RevisionGUID="d581eddc-5efe-4993-b87b-a26d80eeb18f" CreationDate="2011-06-01T17:50:38.217" Comment="Proposed by 3588 approved by 51 edit id of 464" />
  <row Id="28773" PostHistoryTypeId="5" PostId="13011" RevisionGUID="dadef642-ec9a-4ba4-b20e-38d7fc3daaac" CreationDate="2011-06-01T18:04:14.053" UserId="6813" Comment="added 1 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line returns the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;Here is a small example: suppose you want to move something by 10 units each seconds on the x axis. You could do something like this (if deltaTime use milliseconds indeed).&#xD;&#xA;&#xD;&#xA;    Position.x += 10/1000 * deltaTime;&#xD;&#xA;&#xD;&#xA;This way, whether your program updated 2 times or 100 times, 1 second later the position should be almost the same, and the game-play is less impacted by the low fps of a small computer than if it use fixed values.&#xD;&#xA;&#xD;&#xA;- With fixed values ==&gt; low fps = less updates = slow movements whereas high fps = more updates = very fast movements.&#xD;&#xA;&#xD;&#xA;- With deltaTime ==&gt; &quot;almost&quot; the same movements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, you should read [Fixed time step vs Variable time step][5] on  gamedev.stackexchange.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/&#xD;&#xA;[5]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="28774" PostHistoryTypeId="25" PostId="13004" RevisionGUID="41b1edda-dd03-40a1-a44d-094d84c990c6" CreationDate="2011-06-01T18:13:29.673" Comment="http://twitter.com/#!/StackGameDev/status/75988351475392512" />
  <row Id="28775" PostHistoryTypeId="5" PostId="13011" RevisionGUID="06e27dc1-095f-425e-adc7-f13e137d4092" CreationDate="2011-06-01T18:19:37.913" UserId="6813" Comment="deleted 1 characters in body" Text="The &quot;delta time&quot; used to be the time elapsed between two frame updates (but it can also be used in other contexts; this is usually the result of a time subtraction).&#xD;&#xA;&#xD;&#xA;You can get the delta time in glut using the [glutGet][1] method and the GLUT_ELAPSED_TIME parameter, plus some operations.&lt;br&gt;&lt;br&gt; The following line returns the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)) :&#xD;&#xA;&#xD;&#xA;    int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;&#xD;&#xA;So if you register the current timeSinceStart at each rendering loop, you can know the deltaTime by subtracting the old one to the new one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    int oldTimeSinceStart = 0;&#xD;&#xA;&#xD;&#xA;    while( ... )&#xD;&#xA;    {&#xD;&#xA;         int timeSinceStart = glutGet(GLUT_ELAPSED_TIME);&#xD;&#xA;         int deltaTime = timeSinceStart - oldTimeSinceStart;&#xD;&#xA;         oldTimeSinceStart = timeSinceStart;&#xD;&#xA;&#xD;&#xA;         //... stuff to update using deltaTime&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can also do it almost the same way, using the C/C++ [ctime library][4] with [clock()][2] and the macro constant expression [CLOCKS_PER_SEC][3] that specifies the relation between a clock tick and a second.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Basically, you can use deltaTime to update your movements in ratio to this elapsed time instead of using a fixed time value. This way, the movement speed of your character should be almost the same if your program runs at 60 fps or if it runs at 10 fps.&#xD;&#xA;&#xD;&#xA;&lt;br&gt;Here is a small example: suppose you want to move something by 10 units each second on the x axis. You could do something like this (if deltaTime use milliseconds indeed).&#xD;&#xA;&#xD;&#xA;    Position.x += 10/1000 * deltaTime;&#xD;&#xA;&#xD;&#xA;This way, whether your program updated 2 times or 100 times, 1 second later the position should be almost the same, and the game-play is less impacted by the low fps of a small computer than if it use fixed values.&#xD;&#xA;&#xD;&#xA;- With fixed values ==&gt; low fps = less updates = slow movements whereas high fps = more updates = very fast movements.&#xD;&#xA;&#xD;&#xA;- With deltaTime ==&gt; &quot;almost&quot; the same movements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, you should read [Fixed time step vs Variable time step][5] on  gamedev.stackexchange.&#xD;&#xA;&#xD;&#xA;[1]: http://www.opengl.org/documentation/specs/glut/spec3/node70.html&#xD;&#xA;[2]: http://www.cplusplus.com/reference/clibrary/ctime/clock/&#xD;&#xA;[3]: http://www.cplusplus.com/reference/clibrary/ctime/CLOCKS_PER_SEC/&#xD;&#xA;[4]: http://www.cplusplus.com/reference/clibrary/ctime/&#xD;&#xA;[5]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="28776" PostHistoryTypeId="2" PostId="13015" RevisionGUID="661ceace-1e05-49be-a437-c23e445ba62f" CreationDate="2011-06-01T18:31:03.673" UserId="7591" Text="the last month I experimented a lot on game development using cocos2d for the iphone especially on moving and modifing sprites. However vertices, polygons are still new stuff for me.&#xD;&#xA;&#xD;&#xA;I developed an algorithm that creates a set of points. I now want to use them to create my 2D terrain. Here is how it looks like when I connect the points in java so that you can get the idea&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The points are connected with lines. However a real game terrain is a shape that is colored or has a texture overlayed, right? E.g.:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;**How could I use my points to create such a terrain?** &#xD;&#xA;&#xD;&#xA;What I tried so far is I created an array and filled it with my points. I pass this array to this method&#xD;&#xA;&#xD;&#xA;    void ccDrawPoly ( const CGPoint *  vertices,&#xD;&#xA;    	NSUInteger  numOfVertices,&#xD;&#xA;    	BOOL  closePolygon	 &#xD;&#xA;    ) 	&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;&gt; draws a poligon given a pointer to&#xD;&#xA;&gt; CGPoint coordiantes and the number of&#xD;&#xA;&gt; vertices measured in points. The&#xD;&#xA;&gt; polygon can be closed or open&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This actually draws a plain shape. But from the blue picture it looks like there is not one shape but many.&#xD;&#xA;&#xD;&#xA;Please share you knowleadge how to create 2d game terrain.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wyRjN.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/jtDCb.png" />
  <row Id="28777" PostHistoryTypeId="1" PostId="13015" RevisionGUID="661ceace-1e05-49be-a437-c23e445ba62f" CreationDate="2011-06-01T18:31:03.673" UserId="7591" Text="How is 2d game terrain created?" />
  <row Id="28778" PostHistoryTypeId="3" PostId="13015" RevisionGUID="661ceace-1e05-49be-a437-c23e445ba62f" CreationDate="2011-06-01T18:31:03.673" UserId="7591" Text="&lt;2d&gt;&lt;cocos2d-iphone&gt;&lt;terrain&gt;&lt;polygon&gt;" />
  <row Id="28782" PostHistoryTypeId="2" PostId="13017" RevisionGUID="f4e901c7-2158-49c2-9b8c-b0f3f10d1826" CreationDate="2011-06-01T18:35:56.763" UserId="5275" Text="I'm checking to see if I've created is intersecting with a rectangle. I'm using the boundingbox class to pass the rectangle into the intersect method in the Ray class, but unfortunately it isn't working I'm wondering if it has something to do with how I constructed either the boundingbox or the Ray. &#xD;&#xA;&#xD;&#xA;The code is below, any help with this would be great.&#xD;&#xA;&#xD;&#xA;      Ray bulletRay = new Ray(new Vector3(lensPosition, 0.0f), (new Vector3(lensPosition, 0.0f) - new Vector3(level.Player.Position.X, level.Player.Position.Y - 32.0f, 0.0f)));&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    Rectangle tileBounds = Level.GetBounds(x, y);&#xD;&#xA;                            BoundingBox box = new BoundingBox(&#xD;&#xA;                            new Vector3(tileBounds.Left, tileBounds.Top, 0), // Front = 0&#xD;&#xA;                            new Vector3(tileBounds.Right, tileBounds.Bottom, 0)); // Back = 0&#xD;&#xA;                         &#xD;&#xA;                            float? output;&#xD;&#xA;    &#xD;&#xA;                            bulletRay.Intersects(ref box,out output);&#xD;&#xA;                            if (output.HasValue)&#xD;&#xA;                            {&#xD;&#xA;                              wallInWay = true;&#xD;&#xA;                            }           " />
  <row Id="28783" PostHistoryTypeId="1" PostId="13017" RevisionGUID="f4e901c7-2158-49c2-9b8c-b0f3f10d1826" CreationDate="2011-06-01T18:35:56.763" UserId="5275" Text="XNA boundingbox 2d rectangle" />
  <row Id="28784" PostHistoryTypeId="3" PostId="13017" RevisionGUID="f4e901c7-2158-49c2-9b8c-b0f3f10d1826" CreationDate="2011-06-01T18:35:56.763" UserId="5275" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="28785" PostHistoryTypeId="2" PostId="13018" RevisionGUID="79b753e6-7c50-453f-b361-ca3fca56bff4" CreationDate="2011-06-01T19:28:50.317" UserId="7754" Text="I'm new to developing Android games, but not new to developing mobile games (J2ME). I'm currently developing a board game, for a school project, with 2 things - a board and a spinning wheel (both are displayed at the same time). The user is able to zoom in/out and scroll around the board and spin the wheel. The wheel is also animated - resized during game. The board is build using tiles (2-4 different tiles on one image per board ) and the wheel is a image with numbers draw on it, using graphics.&#xD;&#xA;&#xD;&#xA;My questions is what is the best practice to achive the best performance of the game (game has to run on every possible Android version)?&#xD;&#xA;&#xD;&#xA;- Should i use Android canvas or open GL?&#xD;&#xA;- Is there a mechanism for drawing tiles, animations or should i just implement it my self using drawImage()?&#xD;&#xA;- Should i separate the wheel and the board into two different threads? Should i separate the wheel and the board in to 2 activities or put it in 1 activity and draw each part separatly?&#xD;&#xA;- What would be the best way to resize the wheel during gameplay? Scale the wheel image (but the animation has to be smooth - opengl vs canvas)?&#xD;&#xA;- What would be the best way to make the board zoomable - should i scale every image on the board when the zoom is detected or does android have some better way to do this?&#xD;&#xA;- What would be the best way to make the board scrollable - should i implement a Camera that displays just a piece of the board or does android have some better way to do this?&#xD;&#xA;&#xD;&#xA;Thanks for all your reply's,&#xD;&#xA;&#xD;&#xA;Chers, J.&#xD;&#xA;" />
  <row Id="28786" PostHistoryTypeId="1" PostId="13018" RevisionGUID="79b753e6-7c50-453f-b361-ca3fca56bff4" CreationDate="2011-06-01T19:28:50.317" UserId="7754" Text="android board game devopment - best practice" />
  <row Id="28787" PostHistoryTypeId="3" PostId="13018" RevisionGUID="79b753e6-7c50-453f-b361-ca3fca56bff4" CreationDate="2011-06-01T19:28:50.317" UserId="7754" Text="&lt;opengl&gt;&lt;android&gt;" />
  <row Id="28788" PostHistoryTypeId="5" PostId="13015" RevisionGUID="e0e1dbcc-cf95-4b75-8061-cc1ef37ba17b" CreationDate="2011-06-01T19:47:42.900" UserId="3588" Comment="Made some fixes to the grammar and spelling in various points. I'm not really sure about the tags, so I'll leave them be for now. ♪" Text="Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me.&#xD;&#xA;&#xD;&#xA;I developed an algorithm that creates a set of points. I now want to use them to create my 2D terrain. Here is how it looks like when I connect the points in java, so that you can get the idea&#xD;&#xA;&#xD;&#xA;![A line graph of connected dots][1]&#xD;&#xA;&#xD;&#xA;The points are connected with lines. However a real game terrain is a shape that is colored or has a texture overlayed, right? For example:&#xD;&#xA;&#xD;&#xA;![An image of in-game terrain looking pretty][2]&#xD;&#xA;&#xD;&#xA;**How could I use my points to create such a terrain?** &#xD;&#xA;&#xD;&#xA;What I tried so far is I created an array and filled it with my points. I pass this array to this method&#xD;&#xA;&#xD;&#xA;    void ccDrawPoly ( const CGPoint *  vertices,&#xD;&#xA;    	NSUInteger  numOfVertices,&#xD;&#xA;    	BOOL  closePolygon	 &#xD;&#xA;    ) 	&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;&gt; draws a poligon given a pointer to&#xD;&#xA;&gt; CGPoint coordiantes and the number of&#xD;&#xA;&gt; vertices measured in points. The&#xD;&#xA;&gt; polygon can be closed or open&#xD;&#xA;&#xD;&#xA;This actually draws a plain shape. But from the blue picture it looks like there is not one shape but many.&#xD;&#xA;&#xD;&#xA;Please share you knowledge on how to create 2d game terrain.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wyRjN.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/jtDCb.png" />
  <row Id="28789" PostHistoryTypeId="24" PostId="13015" RevisionGUID="e0e1dbcc-cf95-4b75-8061-cc1ef37ba17b" CreationDate="2011-06-01T19:47:42.900" Comment="Proposed by 3588 approved by 1156 edit id of 465" />
  <row Id="28790" PostHistoryTypeId="5" PostId="13010" RevisionGUID="eb5e46bc-3882-4687-8df1-2c1e5268b028" CreationDate="2011-06-01T20:36:21.727" UserId="7328" Comment="fixed a mistake in code" Text="When the player is further than the length of the rope, the player will be immediately pushed back with a force equal to the distance that he has passed it. This should work without feeling springy, and should feel intuitive to the player. You may have to tweak your physics to get the best results for your game though.&#xD;&#xA;&#xD;&#xA;When the rope is attached. Save a `maxLength` value.&#xD;&#xA;&#xD;&#xA;Each update, check the `distance` between the `player`, and the `attachPoint`&#xD;&#xA;&#xD;&#xA;If the `distance` is less than the `maxLength` update normally, no effects from rope.&#xD;&#xA;&#xD;&#xA;If the distance is greater than the `maxLength`, find the `normal` from the `attachPoint` to the player. Get the difference between the `distance` and `maxLength`. Add to the `playerVelocity`, `normal` multiplied by the difference.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: To create an normal with A and B:&#xD;&#xA;   &#xD;&#xA;    dx = (B.x - A.x) / Distance&#xD;&#xA;    dy = (B.y - A.y) / Distance&#xD;&#xA;    normal = {dx,dy} //point, or vector2&#xD;&#xA;&#xD;&#xA;To get the distance with A and B:&#xD;&#xA;&#xD;&#xA;    dx = (A.x-B.x)&#xD;&#xA;    dy = (A.y-B.y)&#xD;&#xA;    distance = sqrt(dx*dx*dy*dy)&#xD;&#xA;&#xD;&#xA;so this is how the code will look like:&#xD;&#xA;&#xD;&#xA;	dx = (attachPoint.x - player.x)&#xD;&#xA;	dy = (attachPoint.y - player.y)&#xD;&#xA;&#xD;&#xA;	distance = sqrt(dx*dx+dy*dy);&#xD;&#xA;&#xD;&#xA;	if (distance &gt; maxDistance)&#xD;&#xA;	{&#xD;&#xA;		float dx1 = dx / distance * maxDistance;&#xD;&#xA;		float dy1 = dy / distance * maxDistance;&#xD;&#xA;		v.x += (dx1 - dx) / dt;&#xD;&#xA;		v.y += (dy1 - dy) / dt;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	player += v * dt;&#xD;&#xA;" />
  <row Id="28791" PostHistoryTypeId="24" PostId="13010" RevisionGUID="eb5e46bc-3882-4687-8df1-2c1e5268b028" CreationDate="2011-06-01T20:36:21.727" Comment="Proposed by 7328 approved by -1 edit id of 466" />
  <row Id="28792" PostHistoryTypeId="5" PostId="13010" RevisionGUID="4d997581-6855-4cdf-ac26-2232692ff5f1" CreationDate="2011-06-01T20:36:22.180" UserId="962" Comment="Approved edit, fixed a few things" Text="When the player is further than the length of the rope, the player will be immediately pushed back with a force equal to the distance that he has passed it. This should work without feeling springy, and should feel intuitive to the player. You may have to tweak your physics to get the best results for your game though.&#xD;&#xA;&#xD;&#xA;When the rope is attached. Save a `maxLength` value.&#xD;&#xA;&#xD;&#xA;Each update, check the `distance` between the `player`, and the `attachPoint`&#xD;&#xA;&#xD;&#xA;If the `distance` is less than the `maxLength` update normally, no effects from rope.&#xD;&#xA;&#xD;&#xA;If the distance is greater than the `maxLength`, find the `normal` from the `attachPoint` to the player. Get the difference between the `distance` and `maxLength`. Add to the `playerVelocity`, `normal` multiplied by the difference.&#xD;&#xA;&#xD;&#xA;Pseudo Code:&#xD;&#xA;&#xD;&#xA;	dx = (attachPoint.x - player.x)&#xD;&#xA;	dy = (attachPoint.y - player.y)&#xD;&#xA;&#xD;&#xA;	distance = sqrt(dx*dx+dy*dy);&#xD;&#xA;&#xD;&#xA;	if (distance &gt; maxDistance)&#xD;&#xA;	{&#xD;&#xA;		float dx1 = dx / distance * maxDistance;&#xD;&#xA;		float dy1 = dy / distance * maxDistance;&#xD;&#xA;		v.x += (dx1 - dx) / dt;&#xD;&#xA;		v.y += (dy1 - dy) / dt;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	playerVel += v * dt;&#xD;&#xA;" />
  <row Id="28793" PostHistoryTypeId="2" PostId="13019" RevisionGUID="6ef3b773-5ebf-434a-8485-2fa3b282fe70" CreationDate="2011-06-01T20:40:27.410" UserId="5021" Text="Draw small transparent particles that move in the direction of the wind.&#xD;&#xA;&#xD;&#xA;Like snow particles, except they could just be (very) small grey puffs. Apply a combination of sin functions to the particle positions to offset them from their usual path, to make them swirve around a bit (e.g. move upward sometimes), so that they don't always simply fall in one direction (which would make them look like rain/snow instead).&#xD;&#xA;&#xD;&#xA;If you want to maintain a blocky look, just make the particles small transparent squares (or cubes)." />
  <row Id="28796" PostHistoryTypeId="2" PostId="13020" RevisionGUID="ff657a2f-668b-4925-a1db-5f21abcd5ba7" CreationDate="2011-06-01T21:10:00.397" UserId="7746" Text="Decent camera, macro lens, lots of coffee and patience with tutorial, and you can get much about anything :]" />
  <row Id="28797" PostHistoryTypeId="25" PostId="12998" RevisionGUID="2005b29d-de37-415e-a6d5-5989c757b207" CreationDate="2011-06-01T21:13:30.677" Comment="http://twitter.com/#!/StackGameDev/status/76033653460836353" />
  <row Id="28798" PostHistoryTypeId="2" PostId="13021" RevisionGUID="60133eb1-2f61-40e3-afde-4d1505d4f38b" CreationDate="2011-06-01T21:25:23.313" UserId="853" Text="I'm wanting to create the digital painting type of effect that you see in Braid for a game I'm creating. I was wondering if someone can point me in the right direction? I'm most familiar with OpenGL ES 2.0. &#xD;&#xA;&#xD;&#xA;I'm wanting to have the background move like Braid does as well. &#xD;&#xA;&#xD;&#xA;If anyone can get me started I would really appreciate it. &#xD;&#xA;" />
  <row Id="28799" PostHistoryTypeId="1" PostId="13021" RevisionGUID="60133eb1-2f61-40e3-afde-4d1505d4f38b" CreationDate="2011-06-01T21:25:23.313" UserId="853" Text="How to do Digital Painting type of graphics art like in Braid?" />
  <row Id="28800" PostHistoryTypeId="3" PostId="13021" RevisionGUID="60133eb1-2f61-40e3-afde-4d1505d4f38b" CreationDate="2011-06-01T21:25:23.313" UserId="853" Text="&lt;graphics&gt;&lt;effect&gt;" />
  <row Id="28801" PostHistoryTypeId="2" PostId="13022" RevisionGUID="98350f97-b391-4d88-9443-40a32e41d2c9" CreationDate="2011-06-01T21:53:56.727" UserId="962" Text="It's not an effect. The art in brain is hand created digital art. It is time consuming and requires a great amount of artistic ability.&#xD;&#xA;&#xD;&#xA; - Learn color theory.&#xD;&#xA;&#xD;&#xA; - Learn how to paint.&#xD;&#xA;&#xD;&#xA; - Learn how to use raster art programs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Here is a page that has a lot of braid art explained, it has snapshots over-time to show the evolution.][1] &#xD;&#xA;&#xD;&#xA;To make the background move like braid, I think you are referring to parallax movement, where an object in the background moves slower than the foreground objects giving the illusion of distance. For that just link the background images to the camera movement, but with a multiplier from 0-1, 0 being infinite distance and not moving at all, 1 moving the same speed as the foreground.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.davidhellman.net/blog/the-art-of-braid-index/" />
  <row Id="28802" PostHistoryTypeId="2" PostId="13023" RevisionGUID="de0bf518-63c3-47f4-9d07-933838a1a3f7" CreationDate="2011-06-01T22:06:11.607" UserId="5021" Text="Here is a refactoring of your code (this does the exact same thing as what you posted in your question, I just wrote it a little differently):&#xD;&#xA;&#xD;&#xA;    Vector3 rayStart = new Vector3(lensPosition, 0.0f);&#xD;&#xA;    Vector3 pointOffset = new Vector3(level.Player.Position.X, &#xD;&#xA;        level.Player.Position.Y - 32.0f, 0.0f);&#xD;&#xA;    Vector3 direction = rayStart - pointOffset;&#xD;&#xA;    Ray bulletRay = new Ray(rayStart, direction);&#xD;&#xA;&#xD;&#xA;This ray always points straight down, which is not what you want.&#xD;&#xA;&#xD;&#xA;Since you didn't tell us how your ray should be defined, I can't tell you exactly what code will fix your issue.&#xD;&#xA;&#xD;&#xA;However, you should fix the above code so that `pointOffset` is a position that satisfies the following:&#xD;&#xA;&#xD;&#xA; - It is on the ray. &#xD;&#xA; - It is not the same&#xD;&#xA;   as the player position.&#xD;&#xA; - It is between&#xD;&#xA;   the player and the desired box to&#xD;&#xA;   collide the ray with." />
  <row Id="28804" PostHistoryTypeId="5" PostId="13017" RevisionGUID="50f6cdf6-0811-4164-8b3d-dd8f8e1164f9" CreationDate="2011-06-01T22:12:01.257" UserId="5021" Comment="fixed typo" Text="I'm checking to see if the ray that I've created is intersecting with a rectangle. I'm using the boundingbox class to pass the rectangle into the intersect method in the Ray class, but unfortunately it isn't working I'm wondering if it has something to do with how I constructed either the boundingbox or the Ray. &#xD;&#xA;&#xD;&#xA;The code is below, any help with this would be great.&#xD;&#xA;&#xD;&#xA;      Ray bulletRay = new Ray(new Vector3(lensPosition, 0.0f), (new Vector3(lensPosition, 0.0f) - new Vector3(level.Player.Position.X, level.Player.Position.Y - 32.0f, 0.0f)));&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    Rectangle tileBounds = Level.GetBounds(x, y);&#xD;&#xA;                            BoundingBox box = new BoundingBox(&#xD;&#xA;                            new Vector3(tileBounds.Left, tileBounds.Top, 0), // Front = 0&#xD;&#xA;                            new Vector3(tileBounds.Right, tileBounds.Bottom, 0)); // Back = 0&#xD;&#xA;                         &#xD;&#xA;                            float? output;&#xD;&#xA;    &#xD;&#xA;                            bulletRay.Intersects(ref box,out output);&#xD;&#xA;                            if (output.HasValue)&#xD;&#xA;                            {&#xD;&#xA;                              wallInWay = true;&#xD;&#xA;                            }           " />
  <row Id="28805" PostHistoryTypeId="24" PostId="13017" RevisionGUID="50f6cdf6-0811-4164-8b3d-dd8f8e1164f9" CreationDate="2011-06-01T22:12:01.257" Comment="Proposed by 5021 approved by 51 edit id of 467" />
  <row Id="28806" PostHistoryTypeId="5" PostId="13023" RevisionGUID="fbd50577-5d4c-44f0-a450-3297268d42cf" CreationDate="2011-06-01T22:12:20.290" UserId="5021" Comment="added 115 characters in body" Text="Here is a refactoring of your code (this does the exact same thing as what you posted in your question, I just wrote it a little differently):&#xD;&#xA;&#xD;&#xA;    Vector3 rayStart = new Vector3(lensPosition, 0.0f);&#xD;&#xA;    Vector3 pointOffset = new Vector3(level.Player.Position.X, &#xD;&#xA;        level.Player.Position.Y - 32.0f, 0.0f);&#xD;&#xA;    Vector3 direction = rayStart - pointOffset;&#xD;&#xA;    Ray bulletRay = new Ray(rayStart, direction);&#xD;&#xA;&#xD;&#xA;This ray always points straight down, which is not what you want.&#xD;&#xA;&#xD;&#xA;Since you didn't tell us how your ray should be defined, I can't tell you exactly what code will fix your issue.&#xD;&#xA;&#xD;&#xA;However, you should fix the above code so that `pointOffset` is a position that satisfies the following:&#xD;&#xA;&#xD;&#xA; - It is on the ray. &#xD;&#xA; - It is not the same&#xD;&#xA;   as the player position.&#xD;&#xA; - It is between&#xD;&#xA;   the player and the desired box to&#xD;&#xA;   collide the ray with.&#xD;&#xA;&#xD;&#xA;![Diagram describing the function of the two Vector3 points.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Xn4vY.png" />
  <row Id="28807" PostHistoryTypeId="5" PostId="13022" RevisionGUID="a3ca6df8-a894-41fc-9ff3-48457af5f3b7" CreationDate="2011-06-01T22:12:37.887" UserId="51" Comment="edited body" Text="It's not an effect. The art in Braid is hand created digital art. It is time consuming and requires a great amount of artistic ability.&#xD;&#xA;&#xD;&#xA; - Learn color theory.&#xD;&#xA;&#xD;&#xA; - Learn how to paint.&#xD;&#xA;&#xD;&#xA; - Learn how to use raster art programs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Here is a page that has a lot of braid art explained, it has snapshots over-time to show the evolution.][1] &#xD;&#xA;&#xD;&#xA;To make the background move like braid, I think you are referring to parallax movement, where an object in the background moves slower than the foreground objects giving the illusion of distance. For that just link the background images to the camera movement, but with a multiplier from 0-1, 0 being infinite distance and not moving at all, 1 moving the same speed as the foreground.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.davidhellman.net/blog/the-art-of-braid-index/" />
  <row Id="28811" PostHistoryTypeId="2" PostId="13024" RevisionGUID="64addb82-94eb-4fbd-bd21-7083d7d3fb79" CreationDate="2011-06-01T22:23:48.450" UserId="51" Text="The easy/naive solution would simply be to take your existing points, and for each point have a corresponding point that's at the same Y position but off screen.  From there, create your polygon by taking, say, points 0, 1, 1's pair, and 0's pair and pass that to your DrawPoly method.  Then continue on with (1, 2, 2's pair, 1's pair), etc." />
  <row Id="28812" PostHistoryTypeId="2" PostId="13025" RevisionGUID="abcac91e-5cda-45cf-aabb-aa58a3ee6a50" CreationDate="2011-06-01T22:33:37.497" UserId="7759" Text="I want to make a game where the character is a rectangular prism that can be rotated, and the rest of the map are axis-aligned rectangular prisms. Everything other than the character will be static, so I was wondering what would be the best algorithm for finding if the character is colliding with any parts in the map. Any tutorials/code/advice would be much appreciated :)&#xD;&#xA;&#xD;&#xA;Also, the character will only be rotated on the Y axis, if that helps." />
  <row Id="28813" PostHistoryTypeId="1" PostId="13025" RevisionGUID="abcac91e-5cda-45cf-aabb-aa58a3ee6a50" CreationDate="2011-06-01T22:33:37.497" UserId="7759" Text="Rectangular Prism Collision" />
  <row Id="28814" PostHistoryTypeId="3" PostId="13025" RevisionGUID="abcac91e-5cda-45cf-aabb-aa58a3ee6a50" CreationDate="2011-06-01T22:33:37.497" UserId="7759" Text="&lt;java&gt;&lt;math&gt;&lt;geometry&gt;" />
  <row Id="28815" PostHistoryTypeId="12" PostId="13020" RevisionGUID="fd72fe7b-6cd3-4f1f-9c60-45aed869c25c" CreationDate="2011-06-01T22:46:07.023" UserId="7746" Text="[{&quot;Id&quot;:7746,&quot;DisplayName&quot;:&quot;Nils Munch&quot;}]" />
  <row Id="28816" PostHistoryTypeId="2" PostId="13026" RevisionGUID="d41b99b1-3e41-4e31-8771-06e2682a3547" CreationDate="2011-06-01T22:49:19.583" UserId="7328" Text="First of all calculate a bounding sphere for all the objects in the scene (that wouldn't be too hard since every shape in you scene is a rectangular prism). then knowing that only character can move you only have to check if any of the object's bounding spheres collied with the player's sphere. again this one is rather easy you just check if the distance between two centers of spheres is less than sum of their radiuses or not. until here every thing you did was just to optimize your collision detection. At the end if you could find an object colliding with the player's sphere you have to check if these two boxes accualy collied or not. that is achived with a little math work(I'll try doing it now and posting a full tutorial on how to check that). if you say you only have rotation on y axis I think you can simply you problem to a 2D collision detection so that you can use circles instead of spheres and use polygons instead of rectangular prism." />
  <row Id="28817" PostHistoryTypeId="5" PostId="13020" RevisionGUID="8f71a21a-c773-4e32-a239-fbf2f46481aa" CreationDate="2011-06-01T22:52:11.800" UserId="7746" Comment="My post earlier was a downright accident. Was writing several posts in several tabs, and got them mixed up which were ready." Text="Decent camera, macro lens, lots of coffee and patience with tutorial, and you can get much about anything :]&#xD;&#xA;&#xD;&#xA;But seriously, as importing objects straight form a photo is still just experimental, theres is nothing better than modeling after reference photos of the object in a neutral pose (t-pose or similar for humanoids) and have photos of the back, the front, the side, and if needed, top-down.&#xD;&#xA;&#xD;&#xA;There are some good photoshop plugins to take square photos taken straight down on your target, and then make either a loop-able texture or a good texture atlas out of them.&#xD;&#xA;&#xD;&#xA;But how much detail do you need ? Are we talking main characters for cutscenes or ingame characters for  &#xD;&#xA;&#xD;&#xA;My favorite engine is Unity3D, which uses a variety of formats. Even though .fbx is not the best, it has worked for me so far, on both mobile devices, desktop computers and playstation3" />
  <row Id="28818" PostHistoryTypeId="13" PostId="13020" RevisionGUID="cc3ccc67-8e5c-4184-a9cb-c3719987e7e1" CreationDate="2011-06-01T22:52:17.587" UserId="7746" Text="[{&quot;Id&quot;:7746,&quot;DisplayName&quot;:&quot;Nils Munch&quot;}]" />
  <row Id="28819" PostHistoryTypeId="5" PostId="13026" RevisionGUID="c584a8c4-b403-4370-ac45-f0532d6533f5" CreationDate="2011-06-01T23:10:14.643" UserId="7328" Comment="added 384 characters in body" Text="First of all calculate a bounding sphere for all the objects in the scene (that wouldn't be too hard since every shape in you scene is a rectangular prism). then knowing that only character can move you only have to check if any of objects bounding spheres collied with the player's sphere. again this one is rather easy, you just check if the distance between two centers of spheres is less than sum of their radiuses or not. until here every thing you did was just to optimize your collision detection. At the end if you could find a sphere colliding with the player's sphere you have to check if these two boxes accualy collied or not. that is achived with a little math work. if you say you only have rotation on y axis I think you can simplify you problem to a 2D collision detection so that you can use circles instead of spheres and use polygons(rectangles) instead of rectangular prism.&#xD;&#xA;&#xD;&#xA;so if you can reduce your problem to a 2D collision test you can easily check if either one of the four point of one rectangle is inside another or not, knowing that the object are always axis aligned you can check for each of point of the players box if their x and y value are inside object or not.&#xD;&#xA;&#xD;&#xA;if you can't reduce your problem please leave a comment for me to start calculating all the possible forms of 3d prism collision for you!&#xD;&#xA;" />
  <row Id="28820" PostHistoryTypeId="2" PostId="13027" RevisionGUID="62a478ef-9ceb-476f-a7fb-96a699d96e70" CreationDate="2011-06-01T23:28:54.053" UserId="3830" Text="I would do it something like this, assuming I wanted to specifically control the grab locations...&#xD;&#xA;&#xD;&#xA; 1. Use a player model that can be a ragdoll&#xD;&#xA; 2. Place a small invisible entity at spots that can be grabbed.&#xD;&#xA; 3. When the player jumps up, have their hands go upwards &#xD;&#xA; 4. If the player's hands come within a certain trigger distance of an invisible grab spot, a &quot;grab&quot; occurs&#xD;&#xA;&#xD;&#xA;To handle a grab...&#xD;&#xA;&#xD;&#xA; 1. Let the player's body model keep moving on it's normal jump course&#xD;&#xA; 2. Ragdoll move the hands to the grab location&#xD;&#xA; 3. When the hands reach the grab location, lock them in place (they &quot;grab&quot;)&#xD;&#xA; 4. Let the body now become a ragdoll with the hands pinned to the grab spot&#xD;&#xA;&#xD;&#xA;To handle a pull up from a ledge...&#xD;&#xA;&#xD;&#xA; 1. Since the player's hands are pinned at the exact climb spot, you are all set for a &quot;climb up&quot; animation&#xD;&#xA; 2. Play the &quot;climb up&quot; animation&#xD;&#xA;&#xD;&#xA;I'm playing pretty loose here with the details of how one moves &amp; controls the ragdoll I admit.  The idea though is to get those hands pinned onto the grab spot and let the player hang there pinned by the hands to the grab spot." />
  <row Id="28821" PostHistoryTypeId="2" PostId="13028" RevisionGUID="5a5cac27-2c9a-4189-b5e2-30f37e2f8274" CreationDate="2011-06-01T23:50:19.543" UserId="1163" Text="The latest Overgrowth dev changes video show an example of how to do edge holding in a 3D game. This might be a little complex for your needs, but might give you a good idea of how other achieve this.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=GFu44oeLYPI&amp;feature=relmfu" />
  <row Id="28822" PostHistoryTypeId="25" PostId="13021" RevisionGUID="f05fd555-a3a9-4e7d-b280-2a967689cbc5" CreationDate="2011-06-02T00:13:30.310" Comment="http://twitter.com/#!/StackGameDev/status/76078949721059328" />
  <row Id="28823" PostHistoryTypeId="2" PostId="13029" RevisionGUID="ce54c032-4a03-45b0-b9d6-0a6d53296a78" CreationDate="2011-06-02T00:40:47.453" UserId="7728" Text="The simplest way to get you approximately correct beahviour would be to have your CheckCollisions() function consider the relative velocities of the two objects, in addition to their current positions.&#xD;&#xA;&#xD;&#xA;Basically, you do this:&#xD;&#xA;&#xD;&#xA;Vector3 RelativeVelocity = secondVelocity - firstVelocity;&#xD;&#xA;&#xD;&#xA;And then only treat it as a &quot;didJumpOnEntity&quot; event if the resulting RelativeVelocity.y is less than zero.  (And reverse this when you're testing the other case, whether SecondRect has jumped on top of FirstRect).&#xD;&#xA;&#xD;&#xA;Conceptually, what this is doing is checking whether the objects are moving toward or away from each other on the y axis at the time of collision.  If they're moving away from each other (as is the case when objects are bumping into each other from the side, and one jumps), then it doesn't trigger the &quot;jump on&quot; event.  It'll only trigger once the first entity starts descending toward the second one, which matches what you see in most platformers.  This approach also works in the (much less common) &quot;I'm still moving upward, but the other entity is moving up faster than me, and hits me from beneath&quot; situation, which a naive &quot;am I moving up or down&quot; test would fail on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;A correct solution for this would require a much more complicated set of collision checks.  But just adding this simple velocity check should be more than enough for a standard 2D platformer." />
  <row Id="28824" PostHistoryTypeId="5" PostId="13005" RevisionGUID="06c93dd7-2621-449e-807d-394ff48b3530" CreationDate="2011-06-02T01:00:14.637" UserId="1101" Comment="soft was an ambiguous word to use, changed it to &quot;rough or fuzzy&quot;" Text="Ambient light is an abstract concept. Typical computer light simulations divide light into 4 categories: specular (light from a specific source reflecting directly off an object), diffuse (light from a specific source reflecting indirectly off the object), emissive (light being created by the object itself), and ambient (light from all other sources being reflected off the object). You blend these 4 (although emissive is rarely used) to simulate the effects of the various lights in the scene. A material or part of a material will have different reflectivity values for these 4 light types to determine how it appears - eg. a shiny surface will favour the specular, whereas a rough or fuzzy surface will favour the diffuse.&#xD;&#xA;&#xD;&#xA;As such, you might use the ambient lighting to simulate some light from the sky, but you will probably simulate more of that light by a directional light that is seen as specular and diffuse reflections. The ambient light helps to simulate the daylight that hits the object from random angles due to bouncing off other objects. However there are a variety of different ways to achieve this, all more realistic than simply setting a simple ambient light level." />
  <row Id="28825" PostHistoryTypeId="2" PostId="13030" RevisionGUID="45133a82-334f-4f63-8b2e-01c3e538e4ad" CreationDate="2011-06-02T02:24:28.437" UserId="953" Text="The background animation is done through a complicated combination of particle effects (snow, clouds, and so on) and what looks like a layering of many translucent layers that are not only parallaxed; they also slowly scale and rotate to give a feeling of drifting movement. When combined with traditional frame-by-frame animation, this has a very rich effect." />
  <row Id="28826" PostHistoryTypeId="2" PostId="13031" RevisionGUID="22fa881f-d7da-42cf-9d37-1266bf646b24" CreationDate="2011-06-02T02:40:05.830" UserId="7728" Text="The usual approach for collision detection is to not have either A or B detect collisions on their own.&#xD;&#xA;&#xD;&#xA;Instead, you first move all objects, then have a separate collision system look for collisions between all pairs of objects, telling every object about the things that it has collided with, and then finally render all objects.&#xD;&#xA;&#xD;&#xA;So in essence, instead of doing &quot;move, check for collisions, draw&quot; inside your Paint() function, you split up &quot;move&quot; and &quot;draw&quot; into separate functions which you call separately (first &quot;move&quot; for every object, then &quot;draw&quot; for every object).  And between those, check for collisions.&#xD;&#xA;&#xD;&#xA;Advanced note:  If any of your objects move themselves in reaction to detected collisions, then you may need to repeat the &quot;look for collisions between all pairs of objects&quot; step, in case an object's collision-response causes another collision." />
  <row Id="28827" PostHistoryTypeId="2" PostId="13032" RevisionGUID="ec3c61bf-391c-45b5-88c6-a6fb1994da9d" CreationDate="2011-06-02T03:06:52.360" UserId="7761" Text="I am unable to wrap my mind around designing a good way to manage resources in my game.&#xD;&#xA;For instance, a vertex buffer in DirectX or OpenGL would lead me to believe I should have one central buffer in which I would adapt to my game. But how would I efficiently manage this?&#xD;&#xA;If I had 2 game objects which used the same model but with different properties such as color or position, I would I assume reading from the same section of memory for geometry and having them each passing there own properties to the vertex/pixel shader. But what boggles me is having them read from the same section of the vertex buffer and having the vertex buffer manage the streaming of new data.&#xD;&#xA;&#xD;&#xA;Textures and sound surface the same problem to me." />
  <row Id="28828" PostHistoryTypeId="1" PostId="13032" RevisionGUID="ec3c61bf-391c-45b5-88c6-a6fb1994da9d" CreationDate="2011-06-02T03:06:52.360" UserId="7761" Text="Proper asset management?" />
  <row Id="28829" PostHistoryTypeId="3" PostId="13032" RevisionGUID="ec3c61bf-391c-45b5-88c6-a6fb1994da9d" CreationDate="2011-06-02T03:06:52.360" UserId="7761" Text="&lt;opengl&gt;&lt;c++&gt;&lt;directx&gt;&lt;management&gt;&lt;asset-management&gt;" />
  <row Id="28830" PostHistoryTypeId="25" PostId="13002" RevisionGUID="e03c32b8-e8cd-45d8-891e-0772e6d764eb" CreationDate="2011-06-02T03:13:30.350" Comment="http://twitter.com/#!/StackGameDev/status/76124249739370496" />
  <row Id="28831" PostHistoryTypeId="5" PostId="12873" RevisionGUID="93107e1c-caa9-45a6-b2da-44264754caff" CreationDate="2011-06-02T03:52:42.413" UserId="3042" Comment="added 136 characters in body" Text="I need to know how to get the closest point on the surface of an ellipsoid to another point.&#xD;&#xA;&#xD;&#xA;I had an idea, but apparently i was wrong, and oversimplfying.&#xD;&#xA;&#xD;&#xA;What i did was squash the ellipsoid and point into local space, so the ellispoid is a unit circle&#xD;&#xA;&#xD;&#xA;    vector3 pointLocalCoord = ( pointOriginal - ellipsoid.origin ) / ellipsoid.radii&#xD;&#xA;&#xD;&#xA;Then from there, the closest point should be 1, in the  direction of the transformed point from the origin&#xD;&#xA;&#xD;&#xA;    vector3 closestPointOnEllipsoidLocal = norm ( pointLocalCoord )&#xD;&#xA;&#xD;&#xA;Then get back into standard space&#xD;&#xA;&#xD;&#xA;    vector3 closestPointOnEllipsoidWorld = closestPointOnEllipsoidLocal * ellipsoid.radius + ellipsoid.origin&#xD;&#xA;&#xD;&#xA;But of course, all of this seems not to work, i was curious if any body could point me in the direction of some pre-existing code or such; as some of the articles i've tried reading kinda go a bit out of my scope of knowledge.&#xD;&#xA;&#xD;&#xA;Also, if that seems right to you, please do tell. I'm pretty sure its wrong though.&#xD;&#xA;&#xD;&#xA;**Edit: Sorry for the unresponsiveness with this and my other question. They're different, i was axperimenting with something else**" />
  <row Id="28832" PostHistoryTypeId="2" PostId="13033" RevisionGUID="74bcd4de-66f1-49b6-8d50-224ef442572b" CreationDate="2011-06-02T04:16:44.333" UserId="2698" Text="People who build in Unity or UDK have immediate access to a 3D level editor. People who build their games in XNA or from scratch have no such thing. I'm looking for 3D level development tools available to these people.&#xD;&#xA;&#xD;&#xA;* It must be free, or affordable to an indie developer. I leave the term &quot;affordable&quot; open to interpretation.&#xD;&#xA;* It must not be restricted to a specific game engine. I should be able to build my game from scratch and use this level editor to construct my levels.&#xD;&#xA;* It should have a file format that comes with an interpreter, or sufficient documentation for me to be able to build my own interpreter.&#xD;&#xA;&#xD;&#xA;I know beggars can't always be choosers, but I'm hoping there's something high quality out there.&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;If there isn't, maybe someone would like to jump on that opportunity and fill the void.&lt;/sup&gt;" />
  <row Id="28833" PostHistoryTypeId="1" PostId="13033" RevisionGUID="74bcd4de-66f1-49b6-8d50-224ef442572b" CreationDate="2011-06-02T04:16:44.333" UserId="2698" Text="What 3D level development tools are available to indie developers?" />
  <row Id="28834" PostHistoryTypeId="3" PostId="13033" RevisionGUID="74bcd4de-66f1-49b6-8d50-224ef442572b" CreationDate="2011-06-02T04:16:44.333" UserId="2698" Text="&lt;3d&gt;&lt;tools&gt;&lt;level-design&gt;" />
  <row Id="28835" PostHistoryTypeId="6" PostId="13033" RevisionGUID="d8f49ca0-ffec-46b3-a099-7582b3d38ccc" CreationDate="2011-06-02T04:31:22.867" UserId="2698" Comment="edited tags; added 80 characters in body" Text="&lt;3d&gt;&lt;tools&gt;&lt;level-design&gt;&lt;indie&gt;" />
  <row Id="28836" PostHistoryTypeId="5" PostId="13033" RevisionGUID="d8f49ca0-ffec-46b3-a099-7582b3d38ccc" CreationDate="2011-06-02T04:31:22.867" UserId="2698" Comment="edited tags; added 80 characters in body" Text="People who build in Unity or UDK have immediate access to a 3D level editor. People who build their games in XNA or from scratch have no such thing. I'm looking for 3D level development tools available to these people.&#xD;&#xA;&#xD;&#xA;* It must be free, or affordable to an indie developer. I leave the term &quot;affordable&quot; open to interpretation.&#xD;&#xA;* It must not be restricted to a specific game engine. I should be able to build my game from scratch and use this level editor to construct my levels.&#xD;&#xA;* It should have a file format that comes with an interpreter, or sufficient documentation for me to be able to build my own interpreter.&#xD;&#xA;* Open source and/or modifiable/customisable is a plus, but not a requirement.&#xD;&#xA;&#xD;&#xA;I know beggars can't always be choosers, but I'm hoping there's something high quality out there.&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;If there isn't, maybe someone would like to jump on that opportunity and fill the void.&lt;/sup&gt;" />
  <row Id="28837" PostHistoryTypeId="2" PostId="13034" RevisionGUID="5bd51a7f-ae69-47d1-afa4-2c44086fecf3" CreationDate="2011-06-02T05:04:18.080" UserId="4235" Text="[GtkRadiant][1], the primary editor for the Quake family of engines, is an open source level editor that may be something you want to look into. &#xD;&#xA;&#xD;&#xA;  - 100% free, licensed under GPL&#xD;&#xA;  - Not restricted to a specific engine&#xD;&#xA;  - Generates .map files which can be compiled using Q3map2 (also open source) into the Quake 3 BSP format. BSP loading code from the Q3 engine can be utilized in your own software.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://robotrenegade.com/radiant/" />
  <row Id="28838" PostHistoryTypeId="2" PostId="13035" RevisionGUID="23c45b9a-2437-4020-9fa0-31e0e0961bfb" CreationDate="2011-06-02T05:55:58.930" UserId="7035" Text="[Blender][1] is probably the most advanced of free 3D editors, featuring modeling, IK, rendering, physics, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org" />
  <row Id="28839" PostHistoryTypeId="25" PostId="13033" RevisionGUID="c4f10967-39ac-4575-b048-5225ed99fc42" CreationDate="2011-06-02T06:13:30.917" Comment="http://twitter.com/#!/StackGameDev/status/76169549774454784" />
  <row Id="28840" PostHistoryTypeId="2" PostId="13036" RevisionGUID="881c95ca-70f9-417e-85d1-8638dbd7b565" CreationDate="2011-06-02T06:54:05.260" UserId="7764" Text="Which in your opinion is the programming language of choice for game development?  &#xD;&#xA;&#xD;&#xA;Any special mention for Dot Net developers?  &#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;" />
  <row Id="28841" PostHistoryTypeId="1" PostId="13036" RevisionGUID="881c95ca-70f9-417e-85d1-8638dbd7b565" CreationDate="2011-06-02T06:54:05.260" UserId="7764" Text="Suitable programming language" />
  <row Id="28842" PostHistoryTypeId="3" PostId="13036" RevisionGUID="881c95ca-70f9-417e-85d1-8638dbd7b565" CreationDate="2011-06-02T06:54:05.260" UserId="7764" Text="&lt;programming&gt;" />
  <row Id="28843" PostHistoryTypeId="2" PostId="13037" RevisionGUID="c4a63bd8-0355-4a51-8ac9-37a5487e5568" CreationDate="2011-06-02T07:09:25.340" UserId="4496" Text="It depends on your platform of choice, but C++ is fairly standard in industry with occasional other languages on top." />
  <row Id="28844" PostHistoryTypeId="2" PostId="13038" RevisionGUID="d2423bc2-203f-4d60-8fcd-c0586fae85e9" CreationDate="2011-06-02T07:20:14.247" UserId="4947" Text="For .Net developers - I think you should try C# and XNA - it's based on .Net Framework. It's primarly for XBox, but you can develop also for Windows Phone 7 and of course Windows. &#xD;&#xA;&#xD;&#xA;It's really easy and it gives you a lot of usable functions. " />
  <row Id="28845" PostHistoryTypeId="2" PostId="13039" RevisionGUID="17e3c7cd-114d-47c8-9b2b-0a68541b20d9" CreationDate="2011-06-02T07:20:42.077" UserId="7591" Text="The `tick` method is called on every frame. So this is actually what you call your `update` function.&#xD;&#xA;&#xD;&#xA;So calling the apply force method in the tick method is right, since the force has to be applied continuously (every frame) to make the object move.&#xD;&#xA;&#xD;&#xA;As a contrast you could try the apply impulse method that accelerates your object. But you should not call this method in the tick method because the impulse would be added many times." />
  <row Id="28846" PostHistoryTypeId="4" PostId="13015" RevisionGUID="9f9ac3c1-b4da-4af2-b8d7-0230fdd84fcc" CreationDate="2011-06-02T07:44:04.903" UserId="7591" Comment="edited title" Text="How to create 2D game terrain?" />
  <row Id="28847" PostHistoryTypeId="5" PostId="11300" RevisionGUID="9dcf67d4-5672-47c4-97ba-d8c9a5cdbb79" CreationDate="2011-06-02T08:27:48.677" UserId="1156" Comment="deleted 11 characters in body" Text="I have some small circles just rolling across the bottom of the screen in my Cocos2D/Box2D iOS app.  The bodies are dynamic... so I make them roll by applying a horizontal force to the center of mass (when the linear velocity is below the max velocity).&#xD;&#xA;&#xD;&#xA;Currently I apply this force in `-(void) tick: (ccTime) dt`.  Is this the best place to apply it?  Or should I subclass something and implement an update function somewhere?  Please keep in mind I'm very new to Cocos2D/Box2D." />
  <row Id="28848" PostHistoryTypeId="2" PostId="13040" RevisionGUID="73294d15-b457-4b6a-bb33-a1aed99d9cfc" CreationDate="2011-06-02T08:31:31.440" UserId="1156" Text="A quick google gave me [Getic][1] - you can browse the source, and I can't tell if it's free or something like $5 CAD per license.&#xD;&#xA;&#xD;&#xA;A slightly out-of-the-box solution is to implement your own. There's a chapter on doing it in [Game Coding Complete][2], and it really isn't too difficult. It's also guranteed to be free (except the book which earns that back via general usefulness) and does exactly what you want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.zalsoft.com/getic-project/index.php&#xD;&#xA;  [2]: http://www.amazon.co.uk/Game-Coding-Complete-Mike-McShaffry/dp/1584506806" />
  <row Id="28849" PostHistoryTypeId="2" PostId="13041" RevisionGUID="cea38c1a-b734-4be2-bdc4-d40d44c2a475" CreationDate="2011-06-02T08:36:56.090" UserId="1156" Text="It really doesn't matter, if you're trying to choose a language. Anything with graphical bindings can work - so close to anything. Early console games were hand-coded in Assembler, for instance. &#xD;&#xA;&#xD;&#xA;Nowadays, the industry mostly uses C++. Some indie devs use C# (Terraria and Xbox Live Community Games for instance) and the XNA framework.&#xD;&#xA;&#xD;&#xA;If it's .NET you want, I believe you can use C# or F# (or another .NET language, minus IronPython) with either Microsoft's XNA framework or with SlimDX. Again, since you seem to be of the opinion that you need the best language to use, I'm assuming you're going to find C# more comfortable..unless you know FP." />
  <row Id="28850" PostHistoryTypeId="25" PostId="13032" RevisionGUID="2c5d8b20-c3f0-4da1-ae51-64e8019edd18" CreationDate="2011-06-02T09:13:31.313" Comment="http://twitter.com/#!/StackGameDev/status/76214849398505472" />
  <row Id="28851" PostHistoryTypeId="2" PostId="13042" RevisionGUID="a848df4a-4170-4cd2-9a65-e67ff7e673b3" CreationDate="2011-06-02T09:21:32.003" UserId="5224" Text="You need some raw data models. For example let's consider that you've made a model in blender of a sphere, let's call this sphere_model.&#xD;&#xA;&#xD;&#xA;On of your game classes is represented by a brown coloured sphere, the other one is represented by a blue sphere.&#xD;&#xA;&#xD;&#xA;You first initialize the brown sphere, the asset manager checks it's cache and sees that the sphere_model hasn't been loaded yet, it loads it for you and returns a pointer to a model primitive to the brown sphere.&#xD;&#xA;&#xD;&#xA;The primitive type has a vertex buffer assoctiated and should have some methods to make it actual.&#xD;&#xA;&#xD;&#xA;You then initialize the blue sphere, the asset manager sees that the sphere_model has already been loaded and directy returns a pointer to the model primitive.&#xD;&#xA;&#xD;&#xA;When drawing the brown sphere, you do something like SetVertexBuffer(my_model_primitive); after that you set the shader options (like colour = brown).&#xD;&#xA;&#xD;&#xA;When drawing the blue sphere you do again SetVertexBuffer(my_model_primitive) which sets the same vertex buffer, however by setting different shader options, (like colour, texture, WorldMatrix, etc..) the sphere will look different.&#xD;&#xA;&#xD;&#xA;In general proper asset management will need to statisfy the following:&#xD;&#xA;&#xD;&#xA; - Content primitives are only loaded once (model files, texture files, sound files)&#xD;&#xA; - Content primitives are mapped to a primitive class, like model_primitive, texture2d, soundEffect, etc...)&#xD;&#xA; - Primitive classes only retain the raw&#xD;&#xA;   data, and methods to do something&#xD;&#xA;   with this data, like actualizing the&#xD;&#xA;   vertex buffer, but don't contain&#xD;&#xA;   state.&#xD;&#xA; - Higher level classes contain the&#xD;&#xA;   state and use the primitive classes. They can contain (visual) state like scale, tinting, etc..&#xD;&#xA;&#xD;&#xA;I hope this makes a bit of sense, feel free to ask more questions!" />
  <row Id="28852" PostHistoryTypeId="2" PostId="13043" RevisionGUID="91fcb5f1-730a-4451-bdf3-0dfece35c200" CreationDate="2011-06-02T10:00:19.670" UserId="7768" Text="I want to start games development for the first time, i have a good information in math and also good information in C# and computer in general, so can anyone help me to start developing a small game like tetris or something like that its just to get start because i dont have any idea about that..." />
  <row Id="28853" PostHistoryTypeId="1" PostId="13043" RevisionGUID="91fcb5f1-730a-4451-bdf3-0dfece35c200" CreationDate="2011-06-02T10:00:19.670" UserId="7768" Text="get started games development with C#" />
  <row Id="28854" PostHistoryTypeId="3" PostId="13043" RevisionGUID="91fcb5f1-730a-4451-bdf3-0dfece35c200" CreationDate="2011-06-02T10:00:19.670" UserId="7768" Text="&lt;c#&gt;" />
  <row Id="28855" PostHistoryTypeId="2" PostId="13044" RevisionGUID="e5af105c-88e8-468a-aa69-3269f5fb184a" CreationDate="2011-06-02T10:23:58.620" UserId="5122" Text="Not a direct answer to your question but if you want too make a game in C# I highly recommend using [XNA][1]. It is fairly easy to use and it is very powerful.&#xD;&#xA;&#xD;&#xA;[Download XNA][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb200104.aspx&#xD;&#xA;  [2]: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9ac86eca-206f-4274-97f2-ef6c8b1f478f" />
  <row Id="28856" PostHistoryTypeId="2" PostId="13045" RevisionGUID="90d3f3e8-96c2-4c0b-87e8-9ad0533376d4" CreationDate="2011-06-02T11:00:35.107" UserId="4662" Text="You store per-instance data in a vertex buffer too. You read from one section of GPU memory for the per-model data like the vertices and stuff, and then you read from a different section of GPU memory to determine the per-instance data.&#xD;&#xA;&#xD;&#xA;The general rule is, you should only be sending commands to the GPU, not data- except when your data changes, of course." />
  <row Id="28857" PostHistoryTypeId="4" PostId="12993" RevisionGUID="3762da81-fed3-4818-a92a-af0db2dac3f5" CreationDate="2011-06-02T11:12:19.687" UserId="1929" Comment="edited title; added 83 characters in body" Text="RPG Maker XP Style (2D Top-Down RPG) Sprites and Tilesets Collection" />
  <row Id="28858" PostHistoryTypeId="5" PostId="12993" RevisionGUID="3762da81-fed3-4818-a92a-af0db2dac3f5" CreationDate="2011-06-02T11:12:19.687" UserId="1929" Comment="edited title; added 83 characters in body" Text="I'm creating a bunch of games similar in style to [RPG Maker XP][1] -- 2D, top-down style adventure/action/RPG. I used RPG Maker XP in the past, and their sprites are great. Their content is packaged into something called an &quot;RTP&quot;, which is a collection of sprites, tilesets, etc. which is available for *exclusive* for use with their tool.&#xD;&#xA;&#xD;&#xA;Is there an alternative, free RTP I can use out there? Or, is there a large collection of freely-available material I can use? The standard RTP comes with most common tilesets (forest, grassland, desert, snow, 100 types of people, etc.) so I need something similarly comprehensive.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;(To summarize, my question is: **is there an existing, free to use collection of RPG Maker XP style assets I can use somewhere out on the web?**)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rpgmakerweb.com/product/rpg-maker-xp&#xD;&#xA;  [2]: http://i.stack.imgur.com/m1VQA.gif" />
  <row Id="28859" PostHistoryTypeId="2" PostId="13046" RevisionGUID="646e5530-ab57-4160-9399-428992608457" CreationDate="2011-06-02T11:23:23.293" UserId="1929" Text="Excellent choice. C# is a great language to test out gaming with. If you're interested in web (Silverlight) or console (XBox360) dev, I recommend Flat Red Ball. It allows you to create projects that work in either situation, and it's free; it's simple enough that you can learn it in a few hours.&#xD;&#xA;&#xD;&#xA;You've already picked a good project (Tetris), so write some design out, then pick up an engine and start building your game. That's the best way to learn." />
  <row Id="28860" PostHistoryTypeId="17" PostId="13047" RevisionGUID="50efc13d-4de7-45b6-8c83-4210cbeaeb87" CreationDate="2011-06-02T12:03:23.067" UserId="-1" Comment="from http://stackoverflow.com/questions/6195178/help-computing-visibility-in-old-3d-game-format" Text="" />
  <row Id="28861" PostHistoryTypeId="17" PostId="13048" RevisionGUID="1cc5abe9-9e3f-43b5-891d-01ca2c4f842c" CreationDate="2011-06-02T12:03:23.067" UserId="-1" Comment="from http://stackoverflow.com/questions/6195178/help-computing-visibility-in-old-3d-game-format" Text="" />
  <row Id="28862" PostHistoryTypeId="17" PostId="13049" RevisionGUID="ebeefdb3-65d4-431f-9d63-f386dd4920ce" CreationDate="2011-06-02T12:03:23.067" UserId="-1" Comment="from http://stackoverflow.com/questions/6195178/help-computing-visibility-in-old-3d-game-format" Text="" />
  <row Id="28863" PostHistoryTypeId="2" PostId="13048" RevisionGUID="7d0ae9b5-52da-434e-bdaf-f64ae7408108" CreationDate="2011-06-01T01:31:25.820" UserDisplayName="Kanopus" Text="Assuming your polygons should only be rendered in one of its faces (i.e. you should not render one if it's facing backwards), a &quot;simple&quot; approach would be:&#xD;&#xA;&#xD;&#xA;1º Detect all polygons that are facing away from you and discard them from the rendering (use the surface normal of each polygon). Chances are that the 3D format selects the points of the polygons in such a way that the direction of the surface normal is consistent with where it is facing. This should roughly cut the number of polygons to be rendered to half.&#xD;&#xA;&#xD;&#xA;2º Use a rendering algorithm. A &quot;simple&quot; one would be the [Painter's algorithm][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Painters_algorithm &quot;Painter's algorithm&quot;" />
  <row Id="28864" PostHistoryTypeId="2" PostId="13049" RevisionGUID="182545d3-2055-4541-9c20-85851ef06e4f" CreationDate="2011-06-01T01:44:42.977" UserId="3305" Text="If you're looking for a way to *build* a PVS, I wrote a couple of articles about it at one point that you might find helpful:&#xD;&#xA;&#xD;&#xA;http://accu.org/var/uploads/journals/overload89.pdf&#xD;&#xA;&#xD;&#xA;http://accu.org/var/uploads/journals/overload90.pdf&#xD;&#xA;&#xD;&#xA;The method I've described is the fairly well-known portal-based one.&#xD;&#xA;&#xD;&#xA;An easy-to-implement alternative I saw once is to generate lots of random points in the various BSP leaves and do line of sight-testing between them -- that relies on having lots and lots of points, though, and isn't necessarily guaranteed to produce an accurate PVS." />
  <row Id="28865" PostHistoryTypeId="2" PostId="13047" RevisionGUID="b12e9744-16ee-4ff6-901d-26a262ed5ec6" CreationDate="2011-06-01T00:58:34.107" UserDisplayName="Judas Knowles" Text="I am trying to compute visibility in an old 3d file format. I am using a BSP tree have finally gotten everything built and traversable.&#xD;&#xA;&#xD;&#xA;Now I don't have any sort of PVS, potentially visible set to work with so I need to know the most efficient way to choose what polygons to render as there are literally thousands of them. I should ideally only render the polygons that are near me and then cull the non visible ones. &#xD;&#xA;&#xD;&#xA;Does anyone have experience with this?" />
  <row Id="28866" PostHistoryTypeId="1" PostId="13047" RevisionGUID="b12e9744-16ee-4ff6-901d-26a262ed5ec6" CreationDate="2011-06-01T00:58:34.107" UserDisplayName="Judas Knowles" Text="Help computing visibility in old 3d game format" />
  <row Id="28867" PostHistoryTypeId="3" PostId="13047" RevisionGUID="b12e9744-16ee-4ff6-901d-26a262ed5ec6" CreationDate="2011-06-01T00:58:34.107" UserDisplayName="Judas Knowles" Text="&lt;c++&gt;&lt;opengl&gt;&lt;tree&gt;&lt;bsp&gt;" />
  <row Id="28868" PostHistoryTypeId="2" PostId="13050" RevisionGUID="ff019c16-f205-4b6e-83f8-9b094014b4d5" CreationDate="2011-06-02T12:09:43.757" UserId="2111" Text="I would highly recommend learning XNA. It is relatively easy, quite clean and you can get something up and running fairly quickly. Learning the basics of XNA is not that hard if you have the right ressources:&#xD;&#xA;&#xD;&#xA; - http://create.msdn.com/en-US/education/tutorial/2dgame/getting_started - Tutorials that teach you slowwwwly how to use XNA. They helped me out when I starter though. The site also contains a lot of tutorials specific to one subject (like collision detection, making height-maps ,etc.)&#xD;&#xA; - http://www.xnadevelopment.com/tutorials.shtml - Great tutorials to start out.&#xD;&#xA; - http://rbwhitaker.wikidot.com/xna-tutorials - Also great tutorials to start out.&#xD;&#xA; - http://www.riemers.net/ - Riemer's tutorials are awesome, you'll learn a lot from those (and you'll make games at the same time!).&#xD;&#xA; - http://www.xnaresources.com/default.asp - I didn't take a look at all the tutorials there, but the tile map tutorials are wonderful.&#xD;&#xA; - http://digitalerr0r.wordpress.com/ - Has a lot of XNA Shader Programming tutorials. I did not read them yet but they certainly look interesting.&#xD;&#xA; - http://www.innovativegames.net/blog/blog/2009/10/18/innovation-engine-roadmap-2009-2010/ - When you'll know the basics of XNA and you'll have a couple of games under your belt, you can make your own engine to speed up the development process. I would only recommend doing so after making a couple of games though.&#xD;&#xA;&#xD;&#xA;Happy coding!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28869" PostHistoryTypeId="25" PostId="13043" RevisionGUID="4ffdd357-c66e-4c21-bfe9-01151289c005" CreationDate="2011-06-02T12:13:31.343" Comment="http://twitter.com/#!/StackGameDev/status/76260149391659008" />
  <row Id="28870" PostHistoryTypeId="5" PostId="13004" RevisionGUID="79d20267-4517-47e2-96d5-eda788fc1e24" CreationDate="2011-06-02T12:18:13.517" UserId="7546" Comment="Grammar - removed &quot;the&quot; " Text="I am developing a small 2D game engine. The characters have a paint method which currently does the following:&#xD;&#xA;&#xD;&#xA;1. Calculate the new position of the character as per its speed, etc.&#xD;&#xA;2. Update the collision grid cell **&#xD;&#xA;3. Draw the character at the new position&#xD;&#xA;&#xD;&#xA;** I have created a collision grid to reduce the number of intersection checks&#xD;&#xA;&#xD;&#xA;Now the basic algorithm which I have thought for detecting collision is: &#xD;&#xA;&#xD;&#xA;    For Each Character&#xD;&#xA;        Check intersection with characters in surrounding 8 cells&#xD;&#xA;&#xD;&#xA;I can simply place this code in the paint method. But here is the problem I anticipate.&#xD;&#xA;&#xD;&#xA;Suppose two characters A and B lie in adjacent cells in the collision grid. Now as per the above algorithm in the iteration of character A it will detect that it has collided with B. In the iteration for character B it will detect that it has collided with A.&#xD;&#xA;&#xD;&#xA;But I have an idea that when A detects that it has collided with B, it should inform B that it has collided with A. This would save lot of comparisons when there are more than 2 actors colliding. But I am not sure how to handle this. I think instead of every character checking for its collision, I should check for the collision inside the game loop. &#xD;&#xA;&#xD;&#xA;Would this approach be correct? How have you handled this kind of problem? I thought of the collision grid thing myself. Are there any alternatives to collision grid logic?" />
  <row Id="28871" PostHistoryTypeId="5" PostId="13036" RevisionGUID="9c4b1a48-0a34-40b5-833e-438d9c7ea9b0" CreationDate="2011-06-02T12:41:43.520" UserId="1198" Comment="deleted 22 characters in body" Text="Which in your opinion is the programming language of choice for game development?  &#xD;&#xA;&#xD;&#xA;Any special mention for .NET developers? &#xD;&#xA;" />
  <row Id="28872" PostHistoryTypeId="2" PostId="13051" RevisionGUID="d0a8ba60-89bd-4bc4-8f8a-dadd475fe4f4" CreationDate="2011-06-02T13:16:28.757" UserId="1868" Text="Found this recently - steering behaviors in JavaScript &amp; Processing:&#xD;&#xA;&#xD;&#xA;http://shawnldoria.com/works/steering-behaviors.html" />
  <row Id="28873" PostHistoryTypeId="2" PostId="13052" RevisionGUID="ef69942e-a836-4e5c-9cee-de5511e148dc" CreationDate="2011-06-02T13:31:22.377" UserId="7770" Text="I'm trying to retrieve the names of the texture files (or their locations) on a mesh.&#xD;&#xA;&#xD;&#xA;I realize that the texture file name information is not preserved when the model is loaded. &#xD;&#xA;&#xD;&#xA;I've been doing tons of searching and some experimenting but I've been met with no luck. I've gathered that I need to [extended the content pipeline][1] and store the file location in somewhere like ModelMeshPart.Tag.&#xD;&#xA;&#xD;&#xA;My problem is, even when I'm trying to make my own custom processor, I still can't figure out where the texture file name is. :(&#xD;&#xA;&#xD;&#xA;Any thoughts? Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.create.msdn.com/forums/p/60237/370577.aspx" />
  <row Id="28874" PostHistoryTypeId="1" PostId="13052" RevisionGUID="ef69942e-a836-4e5c-9cee-de5511e148dc" CreationDate="2011-06-02T13:31:22.377" UserId="7770" Text="XNA: Retrieve texture file name during runtime" />
  <row Id="28875" PostHistoryTypeId="3" PostId="13052" RevisionGUID="ef69942e-a836-4e5c-9cee-de5511e148dc" CreationDate="2011-06-02T13:31:22.377" UserId="7770" Text="&lt;xna&gt;&lt;textures&gt;&lt;pipeline&gt;" />
  <row Id="28876" PostHistoryTypeId="5" PostId="12717" RevisionGUID="e36cdc66-0def-47a8-8245-11f1f9ddd380" CreationDate="2011-06-02T13:37:50.727" UserId="7331" Comment="added 104 characters in body" Text="For a psychology research project we're looking for **short** (ca. 5 minute) **single-player games** to observe people's basic motivation. Because the members of this forum probably have a broad knowledge of existing games, we would like to ask people to list games that provide the closest possible (even if not perfect) fit to each description. We need 2-3 promising candidates for each of the following 3 categories.&#xD;&#xA;&#xD;&#xA;We would be happy with anything we can use, build on, mod, change slightly etc. to fit our purposes.&#xD;&#xA;&#xD;&#xA;### A) Game that taps into affiliation&#xD;&#xA;&#xD;&#xA;Affiliation involves being emotionally close to others and establishing new relationships. The game should revolve around meeting other characters. I.e. through simple means (clicking certain actions) one can explore possibilities to meet friends. Requests to establish relationships should be accepted in most cases, because the player is well-liked. This liking not related to status or performance, but to the warm fuzzy feeling of friendliness. When getting to know each other, many commonalities between player and character emerge and are happily acknowledged.&#xD;&#xA;&#xD;&#xA;### B) Game that taps into achievement&#xD;&#xA;&#xD;&#xA;Achievement involves mastering difficult goals. In achievement games you would solve several quests by using some ability (speed, spatial thinking, strategy use). It should adapt to the player's ability, so that it is always possible to solve 60-70% of the quests. Player's should be able to improve their abilities and results with some training. Results should always be related to the individual performance, so there is no high score ranking with others or some such.The goal of this game should simply be to remain focused on a task of moderate difficulty, trying to become better at it.&#xD;&#xA;&#xD;&#xA;### C) Game that taps into power&#xD;&#xA;&#xD;&#xA;Power involves obtaining social status and influencing other people. A power game would involve influencing characters and yielding reactions. It should have a low difficulty and work without points (kind of like a cheat mode maybe). In other words: Influencing other people should be easy, not dependent on achievement or liking. For example, the ability to change the lives of others could be due to insurmountable and unquestionable status differences between the person playing (e.g., a deity, a biologist) and the characters of the game (sticking to the example: mortals, ants).&#xD;&#xA;&#xD;&#xA;If possible, it would be nice to receive answers like:&#xD;&#xA;&#xD;&#xA;A) game1, game2, game3,&#xD;&#xA;&#xD;&#xA;B) game4, game5, game6,&#xD;&#xA;&#xD;&#xA;C) game7, game8, game9.&#xD;&#xA;&#xD;&#xA;Many thanks in advance and best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;we edited this in response to some comments" />
  <row Id="28877" PostHistoryTypeId="5" PostId="12717" RevisionGUID="e3cd7535-3059-4a6e-b0f5-b96d6448a5ca" CreationDate="2011-06-02T13:48:10.417" UserId="7331" Comment="&quot;forum&quot; sorry about that" Text="For a psychology research project we're looking for **short** (ca. 5 minute) **single-player games** to observe people's basic motivation. We would like to ask people to list games that provide the closest possible (even if not perfect) fit to each description. We need 2-3 promising candidates for each of the following 3 categories.&#xD;&#xA;&#xD;&#xA;We would be happy with anything we can use, build on, mod, change slightly etc. to fit our purposes.&#xD;&#xA;&#xD;&#xA;### A) Game that taps into affiliation&#xD;&#xA;&#xD;&#xA;Affiliation involves being emotionally close to others and establishing new relationships. The game should revolve around meeting other characters. I.e. through simple means (clicking certain actions) one can explore possibilities to meet friends. Requests to establish relationships should be accepted in most cases, because the player is well-liked. This liking not related to status or performance, but to the warm fuzzy feeling of friendliness. When getting to know each other, many commonalities between player and character emerge and are happily acknowledged.&#xD;&#xA;&#xD;&#xA;### B) Game that taps into achievement&#xD;&#xA;&#xD;&#xA;Achievement involves mastering difficult goals. In achievement games you would solve several quests by using some ability (speed, spatial thinking, strategy use). It should adapt to the player's ability, so that it is always possible to solve 60-70% of the quests. Player's should be able to improve their abilities and results with some training. Results should always be related to the individual performance, so there is no high score ranking with others or some such.The goal of this game should simply be to remain focused on a task of moderate difficulty, trying to become better at it.&#xD;&#xA;&#xD;&#xA;### C) Game that taps into power&#xD;&#xA;&#xD;&#xA;Power involves obtaining social status and influencing other people. A power game would involve influencing characters and yielding reactions. It should have a low difficulty and work without points (kind of like a cheat mode maybe). In other words: Influencing other people should be easy, not dependent on achievement or liking. For example, the ability to change the lives of others could be due to insurmountable and unquestionable status differences between the person playing (e.g., a deity, a biologist) and the characters of the game (sticking to the example: mortals, ants).&#xD;&#xA;&#xD;&#xA;If possible, it would be nice to receive answers like:&#xD;&#xA;&#xD;&#xA;A) game1, game2, game3,&#xD;&#xA;&#xD;&#xA;B) game4, game5, game6,&#xD;&#xA;&#xD;&#xA;C) game7, game8, game9.&#xD;&#xA;&#xD;&#xA;Many thanks in advance and best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;we edited this in response to some comments" />
  <row Id="28878" PostHistoryTypeId="2" PostId="13053" RevisionGUID="699b0a01-1988-4bc7-b849-2f252f7ba461" CreationDate="2011-06-02T13:57:08.533" UserId="6056" Text="I need to create an engine that will allow me to add content to a website. The website is a browser-based game. This is a verbose engine that should be able to handle many different aspects of the project.&#xD;&#xA;&#xD;&#xA;For an example, I want the developers to be able to insert &quot;dreams&quot; into the game. A dream is called each night for the player, and upon login they will see the dream they had. A developer will write up a cool dream for the game and insert it... but to where?&#xD;&#xA;&#xD;&#xA;That's what I'm struggling with. Naturally, I think to myself that all content for the game will enter a database once a developer is done with it. However, the amount of content could be potentially very high, and it may be too hard on the server's resources once the game grows bigger - userbase included. The other way to do it to simply hardcode everything in: a simple &quot;dreams&quot; file that a developer would append their dream to. I cannnot have such a system, however, if this project were to have five casual developers that don't know how to even open a PHP tag! ;)&#xD;&#xA;&#xD;&#xA;Presently the best way I can imagine a player receiving a dream is to have a developer write it and then the database pulls the dream the player receives from the database. It seems unnecessarily arduous and I'm hoping that if I still must use a database, that you folks can steer me into the right direction for how to execute this efficiently." />
  <row Id="28879" PostHistoryTypeId="1" PostId="13053" RevisionGUID="699b0a01-1988-4bc7-b849-2f252f7ba461" CreationDate="2011-06-02T13:57:08.533" UserId="6056" Text="Using an engine to create content with PHP - but how should it happen?" />
  <row Id="28880" PostHistoryTypeId="3" PostId="13053" RevisionGUID="699b0a01-1988-4bc7-b849-2f252f7ba461" CreationDate="2011-06-02T13:57:08.533" UserId="6056" Text="&lt;engine&gt;&lt;php&gt;&lt;databases&gt;" />
  <row Id="28881" PostHistoryTypeId="2" PostId="13054" RevisionGUID="fdfa5305-1800-418f-a9b9-d19b39ac9d8f" CreationDate="2011-06-02T14:05:36.603" UserId="163" Text="a) [The Sims][1], [FaceBook][2]? (I know it's silly, but based on the stated requirements, I think facebook fits the bill :-P )  &#xD;&#xA;b) [EA Skate][3] (again, based on stated requirements, I think this fits. The game is very focused on the individual skills of the player)  &#xD;&#xA;c) [Black &amp; White][4], [SimAnt][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/The_sims&#xD;&#xA;  [2]: http://facebook.com&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Skate_%28video_game%29&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Black_&amp;_White_%28video_game%29&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/SimAnt" />
  <row Id="28882" PostHistoryTypeId="2" PostId="13055" RevisionGUID="db2dcdb6-1538-4cab-9b7c-ad2f3e5a147c" CreationDate="2011-06-02T14:07:05.930" UserId="1101" Text="&gt; However, the amount of content could be potentially very high, and it may be too hard on the server's resources once the game grows bigger - userbase included. The other way to do it to simply hardcode everything in:&#xD;&#xA;&#xD;&#xA;What makes you think that a system can cope with it in hardcoded form, but not when it's stored in a database? Databases are designed to store far, far, FAR more information than you would find in any typical code base.&#xD;&#xA;&#xD;&#xA;Most online games, and indeed most sites, use a database these days. It shouldn't be arduous if you use a reasonable database API for it." />
  <row Id="28883" PostHistoryTypeId="2" PostId="13056" RevisionGUID="115af9d0-ffdc-4281-8985-d163e7bbcc42" CreationDate="2011-06-02T14:12:57.077" UserId="7772" Text="I'm having a tremendous time getting the second (or additional) sprites in my game engine to render properly.  The first one always works great: it is positioned and sized properly in screen coords, and its texture is mapped properly.  When I add a second sprite to the world, its texture does not get mapped properly.  If I reverse the two sprites render orders, the sprite that was rendered second previously (and had corrupt texture mapping) is now correct, and the other sprite is now corrupt.&#xD;&#xA;&#xD;&#xA;I think it has to do with something in my shader not getting cleared out properly before it is used again.  I have to admit, I'm fairly new to shaders.  Interestingly, I'm building this engine to support both ES1.1 and ES2.0, and the same code works great in ES1.1 for multiple sprites.&#xD;&#xA;&#xD;&#xA;I'll attempt to provide relevant code snippets below.  Any suggestions would be great - I've browsed dozens of good forums and Stack Exchange.  Is there perhaps a call I should be making between primitive renders to clean out the shaders?&#xD;&#xA;    &#xD;&#xA;Here's the snippet for rendering in ES2.0&#xD;&#xA;&#xD;&#xA;    void Sprite::Render(GLuint shaderProgram, UniformHandles* uniforms, AttributeHandles* attributes)&#xD;&#xA;    {&#xD;&#xA;    // Use the shader we were sent&#xD;&#xA;    glUseProgram(shaderProgram);&#xD;&#xA;    &#xD;&#xA;    // Enable transparent blending&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;    &#xD;&#xA;    // Performance: could pull this out and only recalculate when moved&#xD;&#xA;    PVRTVec2 bottomLeftPos = PVRTVec2((m_viewDims.x - m_position.x) / m_viewDims.x,&#xD;&#xA;                                          ((m_viewDims.y - (m_position.y - m_drawDims.y)) / m_viewDims.y));&#xD;&#xA;        &#xD;&#xA;    PVRTVec2 topRightPos = PVRTVec2((m_viewDims.x - (m_position.x + m_drawDims.x)) / m_viewDims.x,&#xD;&#xA;                                        (m_viewDims.y - m_position.y) / m_viewDims.y);&#xD;&#xA;        &#xD;&#xA;    // Draw the quad for ES2 (positioning is not based on these values: do not change)&#xD;&#xA;    DrawQuad((bottomLeftPos.x * 2.0f) - 1.0f, (bottomLeftPos.y * 2.0f) - 1.0f, (topRightPos.x * 2.0f) - 1.0f, (topRightPos.y * 2.0f) - 1.0f, m_textureResource-&gt;texture, uniforms, attributes);&#xD;&#xA;    &#xD;&#xA;    // Turn off blending&#xD;&#xA;    glDisable(GL_BLEND);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;And here's the snippet for DrawQuad()&#xD;&#xA;    &#xD;&#xA;    void Sprite::DrawQuad(float x1, float y1, float x2, float y2, GLuint texture,&#xD;&#xA;                      UniformHandles* uniforms, AttributeHandles* attributes)&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;        // Set the uniforms for rectangle position and width&#xD;&#xA;        // Landscape&#xD;&#xA;        glUniform2f(uniforms-&gt;LowerLeft, -y1, x1);&#xD;&#xA;        float scaleMatrix[4] = { 0, x2 - x1, y1 - y2, 0 };&#xD;&#xA;        glUniformMatrix2fv(uniforms-&gt;ScaleMatrix, 1, GL_FALSE, scaleMatrix);&#xD;&#xA;&#xD;&#xA;        // Use the given texture&#xD;&#xA;        glActiveTexture(GL_TEXTURE0);&#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, texture);&#xD;&#xA;        &#xD;&#xA;        // Bind the vertex buffer object&#xD;&#xA;        glBindBuffer(GL_ARRAY_BUFFER, m_vbo);&#xD;&#xA;        glEnableVertexAttribArray(attributes-&gt;in2DVertex);&#xD;&#xA;        glEnableVertexAttribArray(attributes-&gt;inSpriteTexCoord);&#xD;&#xA;        glVertexAttribPointer(attributes-&gt;in2DVertex, 2, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 4, 0);&#xD;&#xA;        glVertexAttribPointer(attributes-&gt;inSpriteTexCoord, 2, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 4, (unsigned char*) (sizeof(GL_FLOAT) * 2));&#xD;&#xA;        &#xD;&#xA;        // Draws a short triangle strip&#xD;&#xA;        glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;        &#xD;&#xA;        glDisableVertexAttribArray(attributes-&gt;in2DVertex);&#xD;&#xA;        glDisableVertexAttribArray(attributes-&gt;inSpriteTexCoord);&#xD;&#xA;        glBindBuffer(GL_ARRAY_BUFFER, 0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And finally the vertex shader and fragment shader for 2D sprites:&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;    attribute highp vec2    in2DVertex;&#xD;&#xA;    attribute highp vec2    inSpriteTexCoord;&#xD;&#xA;&#xD;&#xA;    uniform highp vec2      LowerLeft;&#xD;&#xA;    uniform highp mat2      ScaleMatrix; // Width/height and screen rotation&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;       gl_Position = vec4(ScaleMatrix * in2DVertex + LowerLeft, 0, 1);&#xD;&#xA;       TexCoord = inSpriteTexCoord; // formerly in2DVertex&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader&#xD;&#xA;    uniform sampler2D  sTexture;&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_FragColor = texture2D(sTexture, TexCoord);&#xD;&#xA;    }" />
  <row Id="28884" PostHistoryTypeId="1" PostId="13056" RevisionGUID="115af9d0-ffdc-4281-8985-d163e7bbcc42" CreationDate="2011-06-02T14:12:57.077" UserId="7772" Text="OpenGLES 2.0: Rendering Multiple Sprites - Texel Corruption" />
  <row Id="28885" PostHistoryTypeId="3" PostId="13056" RevisionGUID="115af9d0-ffdc-4281-8985-d163e7bbcc42" CreationDate="2011-06-02T14:12:57.077" UserId="7772" Text="&lt;opengl-es&gt;&lt;textures&gt;&lt;shaders&gt;&lt;rendering&gt;&lt;sprites&gt;" />
  <row Id="28886" PostHistoryTypeId="5" PostId="13052" RevisionGUID="a8323de1-4592-48cc-a239-54c9f7280d0d" CreationDate="2011-06-02T14:43:08.143" UserId="7770" Comment="added 558 characters in body" Text="I'm trying to retrieve the names of the texture files (or their locations) on a mesh.&#xD;&#xA;&#xD;&#xA;I realize that the texture file name information is not preserved when the model is loaded. &#xD;&#xA;&#xD;&#xA;I've been doing tons of searching and some experimenting but I've been met with no luck. I've gathered that I need to [extended the content pipeline][1] and store the file location in somewhere like ModelMeshPart.Tag.&#xD;&#xA;&#xD;&#xA;My problem is, even when I'm trying to make my own custom processor, I still can't figure out where the texture file name is. :(&#xD;&#xA;&#xD;&#xA;Any thoughts? Thanks!&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;Okay, so I found something kind of promising. [NodeContent.Identity.SourceFilename][2], only that returns the location of my .X model. When I go down the node tree he is always null. Then there's the [ContentItem.Name][3] property. It seems to have names of my mesh, but not my actual texture file names. :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.create.msdn.com/forums/p/60237/370577.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.pipeline.contentidentity.sourcefilename.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.pipeline.contentitem.name.aspx" />
  <row Id="28887" PostHistoryTypeId="25" PostId="13056" RevisionGUID="de732cdd-337e-4b0f-b3a1-fdc595f4fbeb" CreationDate="2011-06-02T15:13:32.300" Comment="http://twitter.com/#!/StackGameDev/status/76305451045761026" />
  <row Id="28888" PostHistoryTypeId="2" PostId="13057" RevisionGUID="3a3836d0-37a7-4369-8a45-78aaf365925b" CreationDate="2011-06-02T15:18:21.247" UserId="7770" Text="Alright, I think I figured it out. Maybe not the best solution (so I would still appreciate other answers ;) )&#xD;&#xA;&#xD;&#xA;    public override ModelContent Process(NodeContent input, ContentProcessorContext context)&#xD;&#xA;    {&#xD;&#xA;        ModelContent model = base.Process(input, context);&#xD;&#xA;        foreach(ModelMeshContent modelMesh in model.Meshes)&#xD;&#xA;        {&#xD;&#xA;            foreach(ModelMeshPartContent meshPart in modelMesh.MeshParts)&#xD;&#xA;            {&#xD;&#xA;                MaterialContent materialContent = meshPart.Material;&#xD;&#xA;                &#xD;&#xA;                foreach(var texture in materialContent.Textures)&#xD;&#xA;                {&#xD;&#xA;                    if(texture.Value != null)&#xD;&#xA;                        meshPart.Tag = texture.Value.Filename;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        return model;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The Tag property of my ModelMeshPart the file points to the .xnb file in the output directory. " />
  <row Id="28889" PostHistoryTypeId="2" PostId="13058" RevisionGUID="642278d1-da9c-497e-bf18-076f7f48d87a" CreationDate="2011-06-02T15:49:28.800" UserId="4191" Text="I would like to introduce you to this neat concept we call a [content management system][1].&#xD;&#xA;&#xD;&#xA;Also, listen to Kylotan.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Content_management_system" />
  <row Id="28890" PostHistoryTypeId="2" PostId="13059" RevisionGUID="48d0070f-51c3-4219-b3df-30c06d38b6e9" CreationDate="2011-06-02T16:20:30.390" UserId="7777" Text="How many need know(learn) Math for Game Developer? for 2D and 3D games?&#xD;&#xA;And where best learn Math for game development? in Wikipedia or maybe Books?&#xD;&#xA;&#xD;&#xA;Thanks for answers." />
  <row Id="28891" PostHistoryTypeId="1" PostId="13059" RevisionGUID="48d0070f-51c3-4219-b3df-30c06d38b6e9" CreationDate="2011-06-02T16:20:30.390" UserId="7777" Text="Math for Game Developer's" />
  <row Id="28892" PostHistoryTypeId="3" PostId="13059" RevisionGUID="48d0070f-51c3-4219-b3df-30c06d38b6e9" CreationDate="2011-06-02T16:20:30.390" UserId="7777" Text="&lt;math&gt;" />
  <row Id="28893" PostHistoryTypeId="2" PostId="13060" RevisionGUID="b6d3b168-bd0f-4bb3-b094-404a625c0510" CreationDate="2011-06-02T16:23:15.683" UserId="4276" Text="i'm currently coding a 2D game in Java, and I would like to have some clues on how-to build this system :&#xD;&#xA;&#xD;&#xA;the screen is moving on a grander map, for instance, the screen represent 800*600 units on a 100K*100K map.&#xD;&#xA;&#xD;&#xA;When you command your unit to go to another position, the screen move on this map AND when you move your mouse on a side or another of the screen, you move the screen on the map.&#xD;&#xA;&#xD;&#xA;Not sure that i'm clear, but we can retrieve this system in most RTS games (warcraft/starcraft for example).&#xD;&#xA;&#xD;&#xA;I'm currently using Slick 2D.&#xD;&#xA;&#xD;&#xA;Any idea ? &#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="28894" PostHistoryTypeId="1" PostId="13060" RevisionGUID="b6d3b168-bd0f-4bb3-b094-404a625c0510" CreationDate="2011-06-02T16:23:15.683" UserId="4276" Text="2D basic map system" />
  <row Id="28895" PostHistoryTypeId="3" PostId="13060" RevisionGUID="b6d3b168-bd0f-4bb3-b094-404a625c0510" CreationDate="2011-06-02T16:23:15.683" UserId="4276" Text="&lt;2d&gt;&lt;java&gt;&lt;maps&gt;&lt;slick&gt;" />
  <row Id="28896" PostHistoryTypeId="5" PostId="13026" RevisionGUID="8c349e20-706e-463f-a99c-f6156e555bc4" CreationDate="2011-06-02T16:47:49.910" UserId="7328" Comment="deleted some wrong idea about 2d collision test." Text="First of all calculate a bounding sphere for all the objects in the scene (that wouldn't be too hard since every shape in you scene is a rectangular prism). then knowing that only character can move you only have to check if any of objects bounding spheres collied with the player's sphere. again this one is rather easy, you just check if the distance between two centers of spheres is less than sum of their radiuses or not. until here every thing you did was just to optimize your collision detection. At the end if you could find a sphere colliding with the player's sphere you have to check if these two boxes accualy collied or not. that is achived with a little math work. if you say you only have rotation on y axis I think you can simplify you problem to a 2D collision detection so that you can use circles instead of spheres and use polygons(rectangles) instead of rectangular prism.&#xD;&#xA;" />
  <row Id="28897" PostHistoryTypeId="17" PostId="13061" RevisionGUID="ca2de4ab-fcbf-44ee-949f-37d29a6d3c79" CreationDate="2011-06-02T16:57:40.310" UserId="-1" Comment="from http://stackoverflow.com/questions/6217510/are-game-programmers-aware-of-all-the-physics-derivatives" Text="" />
  <row Id="28898" PostHistoryTypeId="2" PostId="13061" RevisionGUID="8dd87791-ff92-424c-b1a0-2a89f44252b2" CreationDate="2011-06-02T16:44:43.633" UserId="4362" Text="I am trying to study Xna for game programming. Xna has many methods that can simplify developer's life for example reflecting the vector when it hits a solid plane etc. I know these are good and developers almost always work at an abstracted level which is also the basic fundamental of OOP. I am not comfortable with physics neither I studied physics anytime during my schooling and so it gets all the more difficult for me of how these abstracted methods work. My question is do developers need to be a physics guru in order to make good games(not excellent!!). Are all professional game developers good at physics? Put simply, are they all Einstein types? Or is it just fine even we are not aware of what goes under the hood in abstracted Xna methods?&#xD;&#xA;&#xD;&#xA;Thanks in advance :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28899" PostHistoryTypeId="1" PostId="13061" RevisionGUID="8dd87791-ff92-424c-b1a0-2a89f44252b2" CreationDate="2011-06-02T16:44:43.633" UserId="4362" Text="Are game programmers aware of all the physics derivatives?" />
  <row Id="28900" PostHistoryTypeId="3" PostId="13061" RevisionGUID="8dd87791-ff92-424c-b1a0-2a89f44252b2" CreationDate="2011-06-02T16:44:43.633" UserId="4362" Text="&lt;xna&gt;" />
  <row Id="28901" PostHistoryTypeId="2" PostId="13062" RevisionGUID="6ce78fdf-0c92-4b9c-9eb2-ae0fc56ed327" CreationDate="2011-06-02T17:02:05.613" UserId="229" Text="I highly recommend Daniel Kodicek's [Mathematics &amp; Physics for Programmers][1]. Great sample code and detailed, illustrated explanations of everything. Note an [updated 2nd edition][2] is going to be released by July 21, 2011.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=8qBYYWbpLMUC&amp;lpg=PP1&amp;dq=Mathematics%20and%20Physics%20for%20Programmers&amp;pg=PP1#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [2]: http://www.amazon.com/dp/1435457331/?tag=stackoverfl08-20" />
  <row Id="28902" PostHistoryTypeId="5" PostId="13056" RevisionGUID="bb0f0b55-33ab-401e-8a3e-cd4b4524d375" CreationDate="2011-06-02T17:05:16.800" UserId="7772" Comment="added 1837 characters in body" Text="**Updated with Solution / Workaround below dashed line**&#xD;&#xA;&#xD;&#xA;I'm having a tremendous time getting the second (or additional) sprites in my game engine to render properly.  The first one always works great: it is positioned and sized properly in screen coords, and its texture is mapped properly.  When I add a second sprite to the world, its texture does not get mapped properly.  If I reverse the two sprites render orders, the sprite that was rendered second previously (and had corrupt texture mapping) is now correct, and the other sprite is now corrupt.&#xD;&#xA;&#xD;&#xA;I think it has to do with something in my shader not getting cleared out properly before it is used again.  I have to admit, I'm fairly new to shaders.  Interestingly, I'm building this engine to support both ES1.1 and ES2.0, and the same code works great in ES1.1 for multiple sprites.&#xD;&#xA;&#xD;&#xA;I'll attempt to provide relevant code snippets below.  Any suggestions would be great - I've browsed dozens of good forums and Stack Exchange.  Is there perhaps a call I should be making between primitive renders to clean out the shaders?&#xD;&#xA;    &#xD;&#xA;Here's the snippet for rendering in ES2.0&#xD;&#xA;&#xD;&#xA;    void Sprite::Render(GLuint shaderProgram, UniformHandles* uniforms, AttributeHandles* attributes)&#xD;&#xA;    {&#xD;&#xA;    // Use the shader we were sent&#xD;&#xA;    glUseProgram(shaderProgram);&#xD;&#xA;    &#xD;&#xA;    // Enable transparent blending&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;    &#xD;&#xA;    // Performance: could pull this out and only recalculate when moved&#xD;&#xA;    PVRTVec2 bottomLeftPos = PVRTVec2((m_viewDims.x - m_position.x) / m_viewDims.x,&#xD;&#xA;                                          ((m_viewDims.y - (m_position.y - m_drawDims.y)) / m_viewDims.y));&#xD;&#xA;        &#xD;&#xA;    PVRTVec2 topRightPos = PVRTVec2((m_viewDims.x - (m_position.x + m_drawDims.x)) / m_viewDims.x,&#xD;&#xA;                                        (m_viewDims.y - m_position.y) / m_viewDims.y);&#xD;&#xA;        &#xD;&#xA;    // Draw the quad for ES2 (positioning is not based on these values: do not change)&#xD;&#xA;    DrawQuad((bottomLeftPos.x * 2.0f) - 1.0f, (bottomLeftPos.y * 2.0f) - 1.0f, (topRightPos.x * 2.0f) - 1.0f, (topRightPos.y * 2.0f) - 1.0f, m_textureResource-&gt;texture, uniforms, attributes);&#xD;&#xA;    &#xD;&#xA;    // Turn off blending&#xD;&#xA;    glDisable(GL_BLEND);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;And here's the snippet for DrawQuad()&#xD;&#xA;    &#xD;&#xA;    void Sprite::DrawQuad(float x1, float y1, float x2, float y2, GLuint texture,&#xD;&#xA;                      UniformHandles* uniforms, AttributeHandles* attributes)&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;        // Set the uniforms for rectangle position and width&#xD;&#xA;        // Landscape&#xD;&#xA;        glUniform2f(uniforms-&gt;LowerLeft, -y1, x1);&#xD;&#xA;        float scaleMatrix[4] = { 0, x2 - x1, y1 - y2, 0 };&#xD;&#xA;        glUniformMatrix2fv(uniforms-&gt;ScaleMatrix, 1, GL_FALSE, scaleMatrix);&#xD;&#xA;&#xD;&#xA;        // Use the given texture&#xD;&#xA;        glActiveTexture(GL_TEXTURE0);&#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, texture);&#xD;&#xA;        &#xD;&#xA;        // Bind the vertex buffer object&#xD;&#xA;        glBindBuffer(GL_ARRAY_BUFFER, m_vbo);&#xD;&#xA;        glEnableVertexAttribArray(attributes-&gt;in2DVertex);&#xD;&#xA;        glEnableVertexAttribArray(attributes-&gt;inSpriteTexCoord);&#xD;&#xA;        glVertexAttribPointer(attributes-&gt;in2DVertex, 2, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 4, 0);&#xD;&#xA;        glVertexAttribPointer(attributes-&gt;inSpriteTexCoord, 2, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 4, (unsigned char*) (sizeof(GL_FLOAT) * 2));&#xD;&#xA;        &#xD;&#xA;        // Draws a short triangle strip&#xD;&#xA;        glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;        &#xD;&#xA;        glDisableVertexAttribArray(attributes-&gt;in2DVertex);&#xD;&#xA;        glDisableVertexAttribArray(attributes-&gt;inSpriteTexCoord);&#xD;&#xA;        glBindBuffer(GL_ARRAY_BUFFER, 0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And finally the vertex shader and fragment shader for 2D sprites:&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;    attribute highp vec2    in2DVertex;&#xD;&#xA;    attribute highp vec2    inSpriteTexCoord;&#xD;&#xA;&#xD;&#xA;    uniform highp vec2      LowerLeft;&#xD;&#xA;    uniform highp mat2      ScaleMatrix; // Width/height and screen rotation&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;       gl_Position = vec4(ScaleMatrix * in2DVertex + LowerLeft, 0, 1);&#xD;&#xA;       TexCoord = inSpriteTexCoord; // formerly in2DVertex&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader&#xD;&#xA;    uniform sampler2D  sTexture;&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_FragColor = texture2D(sTexture, TexCoord);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;-----------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;**UPDATE Solution / Workaround:**&#xD;&#xA;&#xD;&#xA;Although I don't have a solution to the problem I was encountering, I did find a workaround and I am posting it if anyone else ever sees something similar.&#xD;&#xA;&#xD;&#xA;For reference, the rendering code I was basing the above snippets on (esp the shaders) came from PowerVR's OpenGLES2.0 SDK (I think the Alpha Blending demo).  I mostly understand the coordinate system it is using to render sprites, but I think it's pretty funky.  At least, I sure don't think that way when I consider graphics!&#xD;&#xA;&#xD;&#xA;SO, I switched it over from that system to a much more &quot;3D&quot;-oriented shader.  Here's the new vertex shader:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    attribute highp vec4    inSpriteVertex;&#xD;&#xA;    attribute highp vec2    inSpriteTexCoord;&#xD;&#xA;                                           &#xD;&#xA;    uniform highp mat4      OrthoProjectionMatrix;&#xD;&#xA;    uniform highp mat4      ModelviewSpriteMatrix;&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_Position = OrthoProjectionMatrix * ModelviewSpriteMatrix * inSpriteVertex;&#xD;&#xA;        //gl_Position = vec4(ScaleMatrix * in2DVertex + LowerLeft, 0, 1);&#xD;&#xA;        TexCoord = inSpriteTexCoord; // formerly in2DVertex&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Notice I'm still using a 2D texture coordinate but have now upgraded to a 4D position vector for the given vertex and a including two matrices for transformation: an orthographic view matrix and a model view matrix that contains the scale/rotation/translation transforms that have been applied to this sprite.&#xD;&#xA;&#xD;&#xA;Again, I wish I knew what I was doing wrong in the original snippets, but this approach seems much more sensible.  Probably not as fast at render time, but I think it is reasonable.  Hope this helps someone!" />
  <row Id="28903" PostHistoryTypeId="5" PostId="13062" RevisionGUID="2b8561a4-7dcb-4ba0-8740-cf0ba661872a" CreationDate="2011-06-02T17:10:07.077" UserId="229" Comment="added 938 characters in body" Text="I highly recommend Daniel Kodicek's [Mathematics &amp; Physics for Programmers][1]. Great sample code and detailed, illustrated explanations of everything. Note an [updated 2nd edition][2] is going to be released by July 21, 2011.&#xD;&#xA;&#xD;&#xA;Table of contents to give an idea of topics covered:&#xD;&#xA;&#xD;&#xA;- Part I  General Techniques &#xD;&#xA;  -  Numbers &#xD;&#xA;  -  Arithmetic &#xD;&#xA;  -  Algebra &#xD;&#xA;  -  Trigonometry and Pythagoras &#xD;&#xA;  -  Vectors &#xD;&#xA;  - Calculus &#xD;&#xA;&#xD;&#xA;- Part II  Ballistics and Collisions &#xD;&#xA;  - Acceleration, Mass, and Energy &#xD;&#xA;  -  Detecting Collisions Between Simple Shapes &#xD;&#xA;  - Resolving Collisions &#xD;&#xA;  -  Detecting Collisions Between Complex Shapes &#xD;&#xA;  - A Simple Pool Game &#xD;&#xA;&#xD;&#xA;- Part III  More Complex Motion &#xD;&#xA;  -  Force and Newton's Laws &#xD;&#xA;  -  Angular Motion &#xD;&#xA;  -  Friction &#xD;&#xA;  -  Strings, Pulleys, and Conveyor Belts &#xD;&#xA;  -  Oscillations &#xD;&#xA;&#xD;&#xA;- Part IV  3D Mathematics &#xD;&#xA;  -  3D Geometry &#xD;&#xA;  -  Transforms &#xD;&#xA;  -  Collision Detection in Three Dimensions &#xD;&#xA;  -  Lighting and Textures &#xD;&#xA;  -  Modeling Techniques &#xD;&#xA;&#xD;&#xA;- Part V  Game Algorithms &#xD;&#xA;  -  Speeding Things Up &#xD;&#xA;  -  Tile-Based Games &#xD;&#xA;  -  Mazes &#xD;&#xA;  -  Game Theory and AI &#xD;&#xA;  -  Search Techniques &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://books.google.com/books?id=8qBYYWbpLMUC&amp;lpg=PP1&amp;dq=Mathematics%20and%20Physics%20for%20Programmers&amp;pg=PP1#v=onepage&amp;q&amp;f=false&#xD;&#xA;  [2]: http://www.amazon.com/dp/1435457331/?tag=stackoverfl08-20&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;" />
  <row Id="28904" PostHistoryTypeId="2" PostId="13063" RevisionGUID="1e50c9d8-b0ab-4543-93e4-8e606df45993" CreationDate="2011-06-02T17:12:26.090" UserId="163" Text="You can't get much better than the answers to this question :-)  &#xD;&#xA;[http://gamedev.stackexchange.com/questions/2029/what-math-should-all-game-programmers-know][1]&#xD;&#xA;&#xD;&#xA;Also, just to be clear, XNA itself doesn't provide any physics functionality. For that, you will need to look to an engine like [Farseer Physics][2] which is based on Box2D&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2029/what-math-should-all-game-programmers-know&#xD;&#xA;  [2]: http://farseerphysics.codeplex.com/" />
  <row Id="28905" PostHistoryTypeId="2" PostId="13064" RevisionGUID="8159f5bd-aa49-4b15-8c15-015513d10233" CreationDate="2011-06-02T17:13:27.653" UserId="7779" Text="Lets step back a bit - as much as it might seem challenging to implement physics in games (or not, depending on your experience), this is really basic physics we are talking about here - usually nothing much more complicated than equations of motions + gravity or thermodynamics equations.&#xD;&#xA;&#xD;&#xA;Einstein developed general relativity (with a heavy dosage of tensor math) and quantum mechanics, which are orders of magnitude more difficult to understand and calculate compared to those classical and usually simplified topics covered in games. In fact, most of the physics covered in computer games can be learned at the high-school level (at least, where I went to it was being taught). &#xD;&#xA;&#xD;&#xA;If you finished a degree in CS (or even if you didn't), getting those equations down and understanding how they work shouldn't be a problem for a decent programmer." />
  <row Id="28908" PostHistoryTypeId="6" PostId="13061" RevisionGUID="6d78b65f-d966-4093-952f-1567cf033b23" CreationDate="2011-06-02T17:20:54.770" UserId="163" Comment="added math/physics tags" Text="&lt;xna&gt;&lt;math&gt;&lt;physics&gt;" />
  <row Id="28909" PostHistoryTypeId="24" PostId="13061" RevisionGUID="6d78b65f-d966-4093-952f-1567cf033b23" CreationDate="2011-06-02T17:20:54.770" Comment="Proposed by 163 approved by 1156 edit id of 469" />
  <row Id="28910" PostHistoryTypeId="6" PostId="13025" RevisionGUID="0d7fe234-321a-4208-acba-f2d5541bf032" CreationDate="2011-06-02T17:21:12.633" UserId="1156" Comment="edited tags" Text="&lt;java&gt;&lt;collision-detection&gt;&lt;math&gt;&lt;geometry&gt;" />
  <row Id="28912" PostHistoryTypeId="10" PostId="13036" RevisionGUID="3caaf51c-6209-41db-8e96-0048b02f483f" CreationDate="2011-06-02T18:00:04.773" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="28913" PostHistoryTypeId="5" PostId="13061" RevisionGUID="49f05f11-a6bb-4055-be96-a1a6d65e4d74" CreationDate="2011-06-02T18:03:13.417" UserId="3588" Comment="Capitalization, and some major restructuring of sentences. Also removed salutations ♪" Text="I am trying to study XNA for game programming. XNA has many methods that can simplify developer's life, such as reflecting the vector when it hits a solid plane. &#xD;&#xA;&#xD;&#xA;I know these are good and developers almost always work at an abstracted level, which is also the basic fundamental of OOP. I am not comfortable with physics, nor have I studied physics anytime during my schooling and so it gets difficult for me to understand how these abstracted methods work. &#xD;&#xA;&#xD;&#xA;Do developers need to be physics gurus in order to make good, not necessarily excellent, games? Are all professional game developers good at physics? Put simply, are they all Einstein types? Or is it just fine even we are not aware of what goes under the hood in abstracted XNA methods?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28914" PostHistoryTypeId="24" PostId="13061" RevisionGUID="49f05f11-a6bb-4055-be96-a1a6d65e4d74" CreationDate="2011-06-02T18:03:13.417" Comment="Proposed by 3588 approved by 51 edit id of 470" />
  <row Id="28915" PostHistoryTypeId="2" PostId="13066" RevisionGUID="313acb23-a76b-43f2-bc9f-f66c6df479cf" CreationDate="2011-06-02T18:11:37.623" UserId="7591" Text="currently I am working with cocos2d for the iphone. I want to make my game structured and  consequential. So I think about how to manage all the game components.&#xD;&#xA;&#xD;&#xA;What do I mean with game components? A game component is e.g. the terrain or any other object like a character that is drawn on the scene. These components have attributes and duties like &quot;let's clean up that place&quot; or something similar.&#xD;&#xA;&#xD;&#xA;So actually I want to wrap a component with all its attributes to make the code reusable. E.g. think of terrain. There may be a terrain in the front. Behind this terrain there is another terrain, e.g. hills, it's still terrain but just with maybe another color.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How do I accomplish that in cocos2d? In my scene there is a draw method where I normally would draw the terrain. But if I would put everything that is drawn in that method it would get confusing.&#xD;&#xA;&#xD;&#xA;It would be cool to create an object of a terrain class and add this to the scene which would draw the terrain automatically. How do I do that? What would be the parent class of the terrain class?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28916" PostHistoryTypeId="1" PostId="13066" RevisionGUID="313acb23-a76b-43f2-bc9f-f66c6df479cf" CreationDate="2011-06-02T18:11:37.623" UserId="7591" Text="How to manage game components and their attributes?" />
  <row Id="28917" PostHistoryTypeId="3" PostId="13066" RevisionGUID="313acb23-a76b-43f2-bc9f-f66c6df479cf" CreationDate="2011-06-02T18:11:37.623" UserId="7591" Text="&lt;game-design&gt;&lt;game-mechanics&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="28918" PostHistoryTypeId="25" PostId="13061" RevisionGUID="aa5506ab-7c36-406b-8e86-5e85c861cb4c" CreationDate="2011-06-02T18:13:32.117" Comment="http://twitter.com/#!/StackGameDev/status/76350748190965761" />
  <row Id="28919" PostHistoryTypeId="5" PostId="13066" RevisionGUID="6251f097-b3e9-40bd-a4d6-ce3c11585eb4" CreationDate="2011-06-02T18:16:48.750" UserId="962" Comment="deleted 24 characters in body" Text="Currently I am working with cocos2d for the iPhone. I want to make my game structured and  consequential. How to manage all the game components?&#xD;&#xA;&#xD;&#xA;What do I mean with game components? A game component is e.g. the terrain or any other object like a character that is drawn on the scene. These components have attributes and duties like &quot;let's clean up that place&quot; or something similar.&#xD;&#xA;&#xD;&#xA;So actually I want to wrap a component with all its attributes to make the code reusable. E.g. think of terrain. There may be a terrain in the front. Behind this terrain there is another terrain, e.g. hills, it's still terrain but just with maybe another color.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How do I accomplish that in cocos2d? In my scene there is a draw method where I normally would draw the terrain. But if I would put everything that is drawn in that method it would get confusing.&#xD;&#xA;&#xD;&#xA;It would be cool to create an object of a terrain class and add this to the scene which would draw the terrain automatically. How do I do that? What would be the parent class of the terrain class?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28920" PostHistoryTypeId="2" PostId="13067" RevisionGUID="20ae205e-385b-4020-87a6-064b90eda1b4" CreationDate="2011-06-02T18:20:57.230" UserId="3598" Text="You might try your luck on [opengameart][1]  &#xD;&#xA;They also have an IRC channel on freenode (#opengameart), you might ask there if someone is interested in making tiles for you.&#xD;&#xA;&#xD;&#xA;  [1]: http://opengameart.org/" />
  <row Id="28921" PostHistoryTypeId="2" PostId="13068" RevisionGUID="e7f1519d-d4ff-472a-83aa-9bb3c8d6dff0" CreationDate="2011-06-02T18:27:46.853" UserId="3598" Text="You can use [Blender 3D][1] as level editor. In new version, it can export scene in COLLADA format which is very easy to parse. For special objects, just add tags, and then search for such tags in level loading script.&#xD;&#xA;&#xD;&#xA;With similar workflow, you can use any ordinary 3D tool, just add tags to objects and then do something in your game about this tags.&#xD;&#xA;&#xD;&#xA;I use this workflow in panda3D and it is very good!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/" />
  <row Id="28922" PostHistoryTypeId="16" PostId="13033" RevisionGUID="61f26684-07e4-4c4b-ba18-fb9456304114" CreationDate="2011-06-02T18:45:55.677" UserId="51" />
  <row Id="28923" PostHistoryTypeId="16" PostId="13034" RevisionGUID="d1a9aeba-9885-4d4f-88ad-41063a5ce412" CreationDate="2011-06-02T18:45:55.677" UserId="51" />
  <row Id="28924" PostHistoryTypeId="16" PostId="13035" RevisionGUID="fa672345-f1e8-4dfc-af1a-0a39f38c85d8" CreationDate="2011-06-02T18:45:55.677" UserId="51" />
  <row Id="28925" PostHistoryTypeId="16" PostId="13040" RevisionGUID="1be37075-bb81-4449-9923-0ae30a68dfce" CreationDate="2011-06-02T18:45:55.677" UserId="51" />
  <row Id="28926" PostHistoryTypeId="16" PostId="13068" RevisionGUID="16e3f060-32f2-42cb-9899-e1b79320043c" CreationDate="2011-06-02T18:45:55.677" UserId="51" />
  <row Id="28927" PostHistoryTypeId="10" PostId="13043" RevisionGUID="0ba99a7e-adf9-4ed6-9527-91bc575c4799" CreationDate="2011-06-02T18:52:58.073" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="28928" PostHistoryTypeId="5" PostId="12717" RevisionGUID="f5164598-8ef3-400d-9deb-fcd9ceb84757" CreationDate="2011-06-02T18:56:42.310" UserId="7331" Comment="reverted a little" Text="For a psychology research project we're looking for **short** (ca. 5 minute) **single-player games** to observe people's basic motivation. We would like to ask people to list games that provide the closest possible (even if not perfect) fit to each description. We need 2-3 promising candidates for each of the following 3 categories.&#xD;&#xA;&#xD;&#xA;We would be happy with anything we can use, build on, mod, change slightly etc. to fit our purposes.&#xD;&#xA;&#xD;&#xA;### A) Game that taps into affiliation&#xD;&#xA;&#xD;&#xA;Affiliation involves being emotionally close to others and establishing new relationships. The game should revolve around meeting other characters. I.e. through simple means (clicking certain actions) one can explore possibilities to meet friends. Requests to establish relationships should be accepted in most cases, because the player is well-liked. This liking not related to status or performance, but to the warm fuzzy feeling of friendliness. When getting to know each other, many commonalities between player and character emerge and are happily acknowledged.&#xD;&#xA;&#xD;&#xA;### B) Game that taps into achievement&#xD;&#xA;&#xD;&#xA;Achievement involves mastering difficult goals. In achievement games you would solve several quests by using some ability (speed, spatial thinking, strategy use). It should adapt to the player's ability, so that it is always possible to solve 60-70% of the quests. Player's should be able to improve their abilities and results with some training. Results should always be related to the individual performance, so there is no high score ranking with others or some such.The goal of this game should simply be to remain focused on a task of moderate difficulty, trying to become better at it.&#xD;&#xA;&#xD;&#xA;### C) Game that taps into power&#xD;&#xA;&#xD;&#xA;Power involves obtaining social status and influencing other people. A power game would involve influencing characters and yielding reactions. It should have a low difficulty and work without points (kind of like a cheat mode maybe). In other words: Influencing other people should be easy, not dependent on achievement or liking. For example, the ability to change the lives of others could be due to insurmountable and unquestionable status differences between the person playing (e.g., a deity, a biologist) and the characters of the game (sticking to the example: mortals, ants).&#xD;&#xA;&#xD;&#xA;Now, we hope to find resources we can re-use for our games. We don't have the ambition to create new games and many games already suit our needs. &#xD;&#xA;&#xD;&#xA;Probably many quite simple games have been lost in the drawers of computer science students who made them as finger exercises and homework. We would only use these games in our research setting, so there is no commercial interest involved.&#xD;&#xA;&#xD;&#xA;Many thanks in advance and best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;we edited this in response to some comments" />
  <row Id="28929" PostHistoryTypeId="2" PostId="13069" RevisionGUID="fb3ff2bb-2fc1-4f58-9161-8b7f8b67f4a9" CreationDate="2011-06-02T19:01:45.860" UserId="7781" Text="You probably want a **component-entity system**. It's a lot like [mixins](http://en.wikipedia.org/wiki/Mixin) (versus interface and inheritance).&#xD;&#xA;&#xD;&#xA;From [Evolve Your Hierarchy](http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/): &#xD;&#xA;&#xD;&#xA;&gt; Up until fairly recent years, game programmers have consistently used a deep class hierarchy to represent game entities. The tide is beginning to shift from this use of deep hierarchies to a variety of methods that compose a game entity object as an aggregation of components. This article explains what this means, and explores some of the benefits and practical considerations of such an approach. I will describe my personal experience in implementing this system on a large code base, including how to sell the idea to other programmers and management.&#xD;&#xA;&#xD;&#xA;One JavaScript library which implements this is [Crafty](http://www.craftyjs.com/). _Entities_, like players, trees, and bullets, are made up of _components_, like 2D, collidable, spritemap, text, etc. &#xD;&#xA;&#xD;&#xA;Maybe this helps." />
  <row Id="28930" PostHistoryTypeId="5" PostId="12717" RevisionGUID="3fd9eceb-0d58-4ba6-9115-48ac31392817" CreationDate="2011-06-02T19:04:03.440" UserId="7331" Comment="added some clarifications" Text="For a psychology research project we're looking for **short** (ca. 5 minute) **single-player games** to observe people's basic motivation. We would like to ask people to list games that provide the closest possible (even if not perfect) fit to each description. We need 2-3 promising candidates for each of the following 3 categories.&#xD;&#xA;&#xD;&#xA;We would be happy with anything we can use, build on, mod, change slightly etc. to fit our purposes.&#xD;&#xA;&#xD;&#xA;### A) Game that taps into affiliation&#xD;&#xA;&#xD;&#xA;Affiliation involves being emotionally close to others and establishing new relationships. The game should revolve around meeting other characters. I.e. through simple means (clicking certain actions) one can explore possibilities to meet friends. Requests to establish relationships should be accepted in most cases, because the player is well-liked. This liking not related to status or performance, but to the warm fuzzy feeling of friendliness. When getting to know each other, many commonalities between player and character emerge and are happily acknowledged.&#xD;&#xA;&#xD;&#xA;### B) Game that taps into achievement&#xD;&#xA;&#xD;&#xA;Achievement involves mastering difficult goals. In achievement games you would solve several quests by using some ability (speed, spatial thinking, strategy use). It should adapt to the player's ability, so that it is always possible to solve 60-70% of the quests. Player's should be able to improve their abilities and results with some training. Results should always be related to the individual performance, so there is no high score ranking with others or some such.The goal of this game should simply be to remain focused on a task of moderate difficulty, trying to become better at it.&#xD;&#xA;&#xD;&#xA;### C) Game that taps into power&#xD;&#xA;&#xD;&#xA;Power involves obtaining social status and influencing other people. A power game would involve influencing characters and yielding reactions. It should have a low difficulty and work without points (kind of like a cheat mode maybe). In other words: Influencing other people should be easy, not dependent on achievement or liking. For example, the ability to change the lives of others could be due to insurmountable and unquestionable status differences between the person playing (e.g., a deity, a biologist) and the characters of the game (sticking to the example: mortals, ants).&#xD;&#xA;&#xD;&#xA;Now, we hope to find resources we can re-use for our games. We don't have the ambition to create new games and many games already suit our needs. We only need the game to have at least 10 events relevant to the motive and to log these events (so we can align it with the reactions of our participants). If we can change it to do that, that'd be cool too.&#xD;&#xA;&#xD;&#xA;Probably many quite simple games have been lost in the drawers of computer science students who made them as finger exercises and homework. We would only use these games in our research setting, so there is no commercial interest involved.&#xD;&#xA;&#xD;&#xA;Many thanks in advance and best wishes from the whole lab!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;we edited this in response to some comments" />
  <row Id="28931" PostHistoryTypeId="6" PostId="13066" RevisionGUID="cdf816f9-e6ed-4154-88c0-3b42e73c9a9d" CreationDate="2011-06-02T19:05:14.610" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;game-mechanics&gt;&lt;cocos2d-iphone&gt;&lt;entity-system&gt;" />
  <row Id="28932" PostHistoryTypeId="2" PostId="13070" RevisionGUID="73e46cbe-fe4c-40c1-b474-e1463ac0904e" CreationDate="2011-06-02T19:06:53.467" UserId="7756" Text="Developers don't need to be physics experts to make good games. If you're developing a physics based game like [Gish][1] for example, at a minimum you need to understand how to properly use your physics library.&#xD;&#xA;&#xD;&#xA;There are tons of great physics libraries out there and IMO it's more important that you understand how use a library and iterate on your implementation to make something fun than understand the math at a deep level. Of course understanding the math helps too :)&#xD;&#xA;&#xD;&#xA;I made [my own][2] soft body physics game for XBLIG a couple years ago and my physics code was mostly based around implementing the math for springs and pressure bodies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fun-motion.com/physics-games/gish/&#xD;&#xA;  [2]: http://marketplace.xbox.com/en-US/Product/Balloon-Blocks/66acd000-77fe-1000-9115-d80258550380" />
  <row Id="28933" PostHistoryTypeId="2" PostId="13071" RevisionGUID="6adb56e9-862f-4001-b85f-4c6f041c2d52" CreationDate="2011-06-02T19:58:16.993" UserId="7328" Text="I'm having some difficulties with box2d DistanceJoints, I'm trying to create a rope using DistanceJoints connecting some bodies together but the length of joints between bodies change due to weight of bodies, is there anyway to prevent joint lengths from changing?" />
  <row Id="28934" PostHistoryTypeId="1" PostId="13071" RevisionGUID="6adb56e9-862f-4001-b85f-4c6f041c2d52" CreationDate="2011-06-02T19:58:16.993" UserId="7328" Text="fix joint length in box2d?" />
  <row Id="28935" PostHistoryTypeId="3" PostId="13071" RevisionGUID="6adb56e9-862f-4001-b85f-4c6f041c2d52" CreationDate="2011-06-02T19:58:16.993" UserId="7328" Text="&lt;box2d&gt;" />
  <row Id="28936" PostHistoryTypeId="5" PostId="13059" RevisionGUID="0df5558c-c183-4c37-a4d6-ea2ec448c629" CreationDate="2011-06-02T20:28:15.707" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What math should all game programmers know?](http://gamedev.stackexchange.com/questions/2029/what-math-should-all-game-programmers-know)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;How many need know(learn) Math for Game Developer? for 2D and 3D games?&#xD;&#xA;And where best learn Math for game development? in Wikipedia or maybe Books?&#xD;&#xA;&#xD;&#xA;Thanks for answers." />
  <row Id="28937" PostHistoryTypeId="10" PostId="13059" RevisionGUID="c39f3f3d-fe74-456e-9342-eab5960aa93d" CreationDate="2011-06-02T20:28:14.443" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;notabene&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="28938" PostHistoryTypeId="6" PostId="13066" RevisionGUID="c89beccb-e3a0-488a-91e2-4194256e51db" CreationDate="2011-06-02T20:38:17.630" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;cocos2d-iphone&gt;&lt;entity-system&gt;" />
  <row Id="28939" PostHistoryTypeId="5" PostId="12978" RevisionGUID="13103745-80d3-4a30-9525-b03c471bc15c" CreationDate="2011-06-02T20:53:31.967" UserId="2643" Comment="deleted 102 characters in body" Text="It's been a couple of days, and I'm still searching for a perfect solution. I did, however, find something to work with for now. My main problem was to work with time span instead of frame span. Also, I think the models I'm using aren't rigged correctly. So, I still can't get the &quot;walk&quot; animation to play right.&#xD;&#xA;&#xD;&#xA;I'm using this method to split up the clips at the PROCESSING time: http://forums.create.msdn.com/forums/t/1415.aspx?PageIndex=2 (see Spacedude's post in the middle of the thread).&#xD;&#xA;&#xD;&#xA;Here's what I'm doing to test this out. SplitAnimations() is called in the Process() method after it has been processed.&#xD;&#xA;&#xD;&#xA;    Dictionary&lt;string, AnimationClip&gt; animationClips;&#xD;&#xA;    animationClips = ProcessAnimations(skeleton.Animations, bones);&#xD;&#xA;    animationClips = SplitAnimations(animationClips[&quot;Animation&quot;], @&quot;C:\defs.txt&quot;);&#xD;&#xA;&#xD;&#xA;Then, in my component, I do this to start a clip:&#xD;&#xA;&#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            base.LoadContent();&#xD;&#xA;            var data = Model.Tag as SkinningData;&#xD;&#xA;&#xD;&#xA;            AnimationPlayer = new AnimationPlayer(data);&#xD;&#xA;&#xD;&#xA;            if (!string.IsNullOrEmpty(CurrentClip) &amp;&amp; data != null)&#xD;&#xA;            {&#xD;&#xA;                var clip = data.AnimationClips[CurrentClip];&#xD;&#xA;                AnimationPlayer.StartClip(clip);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;It'as all testing code for now. More to come.&#xD;&#xA;" />
  <row Id="28943" PostHistoryTypeId="2" PostId="13073" RevisionGUID="521104c6-f929-45fc-b340-69094fa6f425" CreationDate="2011-06-02T21:02:17.417" UserId="51" Text="You only need as much physics as your game needs.  Some games don't have &quot;physics&quot; at all.  At most you'll find games use at most your standard F=ma type algorithms.  The hard part is not the physics itself, but how to make it so your simulations are fast, stable, and predictable." />
  <row Id="28944" PostHistoryTypeId="25" PostId="13053" RevisionGUID="b163cd80-7953-44a1-9d6a-afee7cef4a30" CreationDate="2011-06-02T21:13:32.727" Comment="http://twitter.com/#!/StackGameDev/status/76396050411302912" />
  <row Id="28945" PostHistoryTypeId="2" PostId="13074" RevisionGUID="7f1de2b4-e11d-4a06-b2f4-b3d54bd0dd29" CreationDate="2011-06-02T21:29:23.307" UserId="7328" Text="for those who may encounter this problem in future: I just changes my approch, I used some `Revolute Joint` to connect bodies together and mark all bodies as sensor so that they don't collied with each other (tell me if you any better way to avoid collision of the rope parts), and ues boxes to fill the space between joints (previosly it was Distance joints connecting circle shapes). having density set to non-zero value the result looks like a real rope.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28946" PostHistoryTypeId="2" PostId="13075" RevisionGUID="96ea9a66-1979-46e1-9e5d-afc1193b3d5b" CreationDate="2011-06-02T21:31:59.173" UserId="5021" Text="DistanceJoints can be soft spring like joints, depending on your choice of `frequencyHz` and `dampingRatio`.&#xD;&#xA;&#xD;&#xA;Set `dampingRatio` to 1.0 for zero oscillations (i.e. inflexible distance).&#xD;&#xA;&#xD;&#xA;You may need to set `frequencyHz` to 0 as well." />
  <row Id="28947" PostHistoryTypeId="5" PostId="12925" RevisionGUID="70fc3ccf-91d5-4c0e-b913-1d3a9a1091b6" CreationDate="2011-06-02T21:47:50.910" UserId="1839" Comment="Added code corrections" Text="Right now im working on my c++ game, and im having alot of trouble using [GLM](http://www.3dcodingtutorial.com/Working-with-3D-models/Getting-GLM.html) and Bullet Physics to create my world correctly.&#xD;&#xA;&#xD;&#xA;The main problem is that when i export my physics with [Blender](http://blender.org)v2.57, and export my models for GLM, the models never line up with the physics correctly...&#xD;&#xA;&#xD;&#xA;Im wondering if there are any model loaders that would be good to use with Bullet Physics, and I can export the vertices,texture coords, etc. from Blender to be loaded and used as btTriangleMeshes..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I managed to make a `btBvhTriangleMesh` with my GLM model, but I think its falling, or my character is not picking it up correctly..&#xD;&#xA;&#xD;&#xA;heres the code:&#xD;&#xA;&#xD;&#xA;    void BulletifyContinent(GLMmodel* mesh,float x,float y,float z,float scale)&#xD;&#xA;    {&#xD;&#xA;        btTriangleMesh* trimesh = new btTriangleMesh();&#xD;&#xA;        for(int t=0;t&lt;mesh-&gt;numtriangles;++t)&#xD;&#xA;        {&#xD;&#xA;            GLuint index0 =3*mesh-&gt;triangles[t].vindices[0];&#xD;&#xA;            GLuint index1 =3*mesh-&gt;triangles[t].vindices[1];&#xD;&#xA;            GLuint index2 =3*mesh-&gt;triangles[t].vindices[2];&#xD;&#xA;    &#xD;&#xA;            GLfloat* p0 = &amp;mesh-&gt;vertices[index0];&#xD;&#xA;            GLfloat* p1 = &amp;mesh-&gt;vertices[index1];&#xD;&#xA;            GLfloat* p2 = &amp;mesh-&gt;vertices[index2];&#xD;&#xA;    &#xD;&#xA;            btVector3* v0 = new btVector3( p0[0], p0[1], p0[2] );&#xD;&#xA;            btVector3* v1 = new btVector3( p1[0], p1[1], p1[2] );&#xD;&#xA;            btVector3* v2 = new btVector3( p2[0], p2[1], p2[2] );&#xD;&#xA;            *v0 *= scale;&#xD;&#xA;            *v1 *= scale;&#xD;&#xA;            *v2 *= scale;&#xD;&#xA;            trimesh-&gt;addTriangle( *v0, *v1, *v2 );&#xD;&#xA;            ///trimesh-&gt;addTriangle(mesh-&gt;triangles[t].vindices[0]*100,mesh-&gt;triangles[t].vindices[1]*100,mesh-&gt;triangles[t].vindices[2]*100);&#xD;&#xA;        }&#xD;&#xA;        btCollisionShape* shape = 0;&#xD;&#xA;        bool useQuantization = true;&#xD;&#xA;        shape = new btBvhTriangleMeshShape(trimesh,useQuantization);&#xD;&#xA;        btDefaultMotionState *StillStateMOT = new btDefaultMotionState(btTransform(btQuaternion(0,0,0,0),btVector3(x,y,z)));&#xD;&#xA;        btScalar Mass = 1;&#xD;&#xA;        btVector3 FallInertia(0,0,0);&#xD;&#xA;        btRigidBody::btRigidBodyConstructionInfo StillRigidCI(Mass,StillStateMOT,shape,FallInertia);&#xD;&#xA;        btRigidBody *ContiRigid = new btRigidBody(StillRigidCI);&#xD;&#xA;        PhysicsWorld-&gt;addRigidBody(ContiRigid);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit 1:&#xD;&#xA;&#xD;&#xA;    btScalar Mass = 1;&#xD;&#xA;    btVector3 FallInertia(0,0,0);&#xD;&#xA;    // This line is missing in your code&#xD;&#xA;    shape-&gt;calculateLocalInertia(Mass, FallInertia);&#xD;&#xA;    btRigidBody::btRigidBodyConstructionInfo StillRigidCI(Mass,StillStateMOT,shape,FallInertia);&#xD;&#xA;    btRigidBody *ContiRigid = new btRigidBody(StillRigidCI);&#xD;&#xA;    PhysicsWorld-&gt;addRigidBody(ContiRigid);&#xD;&#xA;&#xD;&#xA;Edit 2:&#xD;&#xA;&#xD;&#xA;There is no need to create the bullet vertices on the heap with new:&#xD;&#xA;&#xD;&#xA;    btVector3 v0( p0[0], p0[1], p0[2] );&#xD;&#xA;    btVector3 v1( p1[0], p1[1], p1[2] );&#xD;&#xA;    btVector3 v2( p2[0], p2[1], p2[2] );&#xD;&#xA;    v0 *= scale;&#xD;&#xA;    v1 *= scale;&#xD;&#xA;    v2 *= scale;&#xD;&#xA;    trimesh-&gt;addTriangle( v0, v1, v2 );&#xD;&#xA;&#xD;&#xA;Edit 3:&#xD;&#xA;&#xD;&#xA;This is not a proper identity quaternion:&#xD;&#xA;&#xD;&#xA;    btDefaultMotionState(btTransform(btQuaternion(0,0,0,0),btVector3(x,y,z)));&#xD;&#xA;&#xD;&#xA;either do it this way:&#xD;&#xA;&#xD;&#xA;    btTransform trans;&#xD;&#xA;    trans.setIdentity();&#xD;&#xA;    trans.setOrigin(btVector3(x,y,z));&#xD;&#xA;    btDefaultMotionState *StillStateMOT = new btDefaultMotionState(trans);&#xD;&#xA;&#xD;&#xA;or by passing a proper identity quaternion either yourself:&#xD;&#xA;&#xD;&#xA;    btDefaultMotionState *StillStateMOT = &#xD;&#xA;        new btDefaultMotionState(btTransform(btQuaternion(0,0,0,1),btVector3(x,y,z)));&#xD;&#xA;&#xD;&#xA;or using quaternion's identity member function:&#xD;&#xA;&#xD;&#xA;    btDefaultMotionState *StillStateMOT = &#xD;&#xA;        new btDefaultMotionState(btTransform(btQuaternion::getIdentity(),btVector3(x,y,z)));" />
  <row Id="28948" PostHistoryTypeId="24" PostId="12925" RevisionGUID="70fc3ccf-91d5-4c0e-b913-1d3a9a1091b6" CreationDate="2011-06-02T21:47:50.910" Comment="Proposed by 1839 approved by 14 edit id of 471" />
  <row Id="28949" PostHistoryTypeId="5" PostId="13075" RevisionGUID="d2e44252-4713-4cbe-b8ee-7223c112c890" CreationDate="2011-06-02T21:48:19.357" UserId="5021" Comment="added 25 characters in body" Text="DistanceJoints can be soft spring like joints, or rigid and firm joints depending on your choice of `frequencyHz` and `dampingRatio`.&#xD;&#xA;&#xD;&#xA;Set `dampingRatio` to 1.0 for zero oscillations (i.e. inflexible distance).&#xD;&#xA;&#xD;&#xA;You may need to set `frequencyHz` to 0 as well." />
  <row Id="28950" PostHistoryTypeId="2" PostId="13076" RevisionGUID="5d3cd2da-7547-4fa4-814f-489ae8ee82d8" CreationDate="2011-06-02T22:02:09.583" UserId="7546" Text="I am writing a collision detection system which uses the logic mentioned by Trevor [here](http://gamedev.stackexchange.com/questions/13004/where-should-collision-detection-logic-be-placed)&#xD;&#xA;&#xD;&#xA;But I have anticipated a problem which I have shown as a diagram [here](http://imageshack.us/photo/my-images/219/collision.png/)&#xD;&#xA;&#xD;&#xA;How do we handle this problem?" />
  <row Id="28951" PostHistoryTypeId="1" PostId="13076" RevisionGUID="5d3cd2da-7547-4fa4-814f-489ae8ee82d8" CreationDate="2011-06-02T22:02:09.583" UserId="7546" Text="How to avoid collision detection to enter infinite loop in this case?" />
  <row Id="28952" PostHistoryTypeId="3" PostId="13076" RevisionGUID="5d3cd2da-7547-4fa4-814f-489ae8ee82d8" CreationDate="2011-06-02T22:02:09.583" UserId="7546" Text="&lt;collision-detection&gt;" />
  <row Id="28953" PostHistoryTypeId="2" PostId="13077" RevisionGUID="ffe5d2c3-8b8b-46ed-8577-2cd6a923973b" CreationDate="2011-06-02T22:12:28.470" UserId="4443" Text="This is actually an age old issue with collision... Have you ever seen the game where you can wedge something between a wall and eventually it will shoot out Very Very fast? That is this issue.. The perfect situation that you describe where you will constantly move it from one object to another and lock up the system shows bad design of the environment, not the physics system as it is doing exactly what it should be doing. I would say however,t hat you only want to move the object back to the point of contact, not so far away from what it collided with that objects with space clearly between them could cause this issue.&#xD;&#xA;&#xD;&#xA;LOL, Forgot the solution: You only check for collision on an object ONCE per frame. This is enough of a disconnect to get the object shooting out described above. ie: do not recheck collision after you have handled one, wait for the Next frame to check for it again.&#xD;&#xA;&#xD;&#xA;Sorry!" />
  <row Id="28954" PostHistoryTypeId="2" PostId="13078" RevisionGUID="6de6c410-c5b8-4258-a666-a5a7897bdc49" CreationDate="2011-06-02T22:21:56.657" UserId="4662" Text="The reason that this situation happens is because you didn't take away any kinetic energy from the object, which is unrealistic- you even added it and made it go further. When an object impacts a spring, it doesn't rebound further or even as far as it came from- it rebounds less. By simply returning the object with *less* velocity/force/energy than it came in with, you should be able to ensure that this case never happens." />
  <row Id="28955" PostHistoryTypeId="2" PostId="13079" RevisionGUID="0869ecc0-5123-4fc1-a3f1-f515b4c4deb9" CreationDate="2011-06-02T22:23:53.143" UserId="6588" Text="After using some modeling tool to build the geometry, a great tool for lighting your level is gile[s]&#xD;&#xA;&#xD;&#xA;http://www.frecle.net/index.php?show=giles.about" />
  <row Id="28956" PostHistoryTypeId="16" PostId="13079" RevisionGUID="6a57a20e-2544-4e38-a3c6-32491f1b8043" CreationDate="2011-06-02T22:23:53.143" UserId="6588" />
  <row Id="28957" PostHistoryTypeId="2" PostId="13080" RevisionGUID="01b89322-7e12-4d47-adec-61655082f5e0" CreationDate="2011-06-02T22:24:48.790" UserId="7785" Text="I am making the collision resolution system for my 2d top-down game, and I managed to find a solution where I query which surfaces of other AABBs the current entity can collide with in the next frame.&#xD;&#xA;&#xD;&#xA;To resolve the new location of the player however, I need to find which surface the entity collides with first.&#xD;&#xA;&#xD;&#xA;I have a list of lines, which is `LinkedList&lt;int[4]&gt; collidedLines`. a line is `{x1,y1,x2,y1}`, however in this case, they are axis-aligned, so either x1==x2 or y1==y2.&#xD;&#xA;&#xD;&#xA;I also have the entity, which has the following properties:&#xD;&#xA;&#xD;&#xA;    int posX&#xD;&#xA;    int posY&#xD;&#xA;    int speedX  // The amount to move in the&#xD;&#xA;    int speedY  // next step of the game.&#xD;&#xA;    int size  // The halfwidth of the square AABB.&#xD;&#xA;&#xD;&#xA;How can I find the first line the entity collides with? Thanks for your help!&#xD;&#xA; " />
  <row Id="28958" PostHistoryTypeId="1" PostId="13080" RevisionGUID="01b89322-7e12-4d47-adec-61655082f5e0" CreationDate="2011-06-02T22:24:48.790" UserId="7785" Text="Which axis-aligned line does an AABB collide with first?" />
  <row Id="28959" PostHistoryTypeId="3" PostId="13080" RevisionGUID="01b89322-7e12-4d47-adec-61655082f5e0" CreationDate="2011-06-02T22:24:48.790" UserId="7785" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="28960" PostHistoryTypeId="2" PostId="13081" RevisionGUID="913da510-03d9-44e3-982f-a131b4504de5" CreationDate="2011-06-02T22:47:02.650" UserId="6592" Text="Can anyone point me to some information on what a modern video card architecture looks like? I'm particularly interested in understanding how my rendering engine will be executed by the GPU.&#xD;&#xA;&#xD;&#xA;Ideally, I'd get two answers: one related to today's monster video cards and one related to today's mobile GPU's." />
  <row Id="28961" PostHistoryTypeId="1" PostId="13081" RevisionGUID="913da510-03d9-44e3-982f-a131b4504de5" CreationDate="2011-06-02T22:47:02.650" UserId="6592" Text="video card architecture" />
  <row Id="28962" PostHistoryTypeId="3" PostId="13081" RevisionGUID="913da510-03d9-44e3-982f-a131b4504de5" CreationDate="2011-06-02T22:47:02.650" UserId="6592" Text="&lt;architecture&gt;&lt;hardware&gt;&lt;visualization&gt;" />
  <row Id="28963" PostHistoryTypeId="2" PostId="13082" RevisionGUID="c2b0d897-a292-465a-84d6-9a9ddd6e1fca" CreationDate="2011-06-02T22:47:37.457" UserId="6450" Text="I would loop through your array two points at a time, extrapolating two more points (by using the X value for each of the two and making the Y value 0) to give you the bottom of your shape.  Pass those four points into ccDrawPoly() and repeat until you run out of array values.&#xD;&#xA;&#xD;&#xA;so, if you have say:&#xD;&#xA;&#xD;&#xA;    P1 = (0, 25)&#xD;&#xA;    P2 = (5, 30)&#xD;&#xA;    P3 = (10, 20)&#xD;&#xA;    P4 = (15, 25)&#xD;&#xA;    for the first shape, you pass in P1, P2, (0, 0), and (5, 0)&#xD;&#xA;    second shape is P2, P3, (5, 0), (10, 0)&#xD;&#xA;    third shape is P3, P4, (10, 0), (15, 0)&#xD;&#xA;    etc...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="28964" PostHistoryTypeId="2" PostId="13083" RevisionGUID="1631663d-f4cf-4f5e-b552-a3ada712c23f" CreationDate="2011-06-02T23:19:51.847" UserId="189" Text="From reading your question and comments, I get the sense that you don't quite understand relational databases. So I guess my biggest recommendation to you, is for you to make sure you understand their strengths; the concepts of a primary key and a foreign key are especially important.&#xD;&#xA;&#xD;&#xA;It is also difficult to discern exactly the question here - I think you're not even sure exactly what you are asking. Your actual question is &quot;how should it happen?&quot; and from the description you seem to be weighing the use of a database against hardcoding these dreams. And somewhere in there you seem to have a notion that a database won't be able to handle a large amount of data - which, I mean, isn't that sort of the point of a database? So if you think a database somehow can't handle some magnitude of data, you must not have much experience in the corporate world. Let me tell you, databases handle ungodly amounts of data and they retrieve it faster than you would think possible. They're made for that kind of thing.&#xD;&#xA;&#xD;&#xA;Anyway, all of the above is subjective, and if you're dead set on storing these dreams in files, by all means do so. Just make sure you know your reasons, and that they are true, measured reasons. To guess that a database is slower is simply unfounded (or I'd like to know where you got that idea).&#xD;&#xA;&#xD;&#xA;So go read about relational databases, know what a primary key and a foreign key are, and then look at this simple schema that I think is basically what you need:&#xD;&#xA;&#xD;&#xA;	table 'users'&#xD;&#xA;	  id int primary key&#xD;&#xA;	  ...&#xD;&#xA;&#xD;&#xA;	table 'dreams'&#xD;&#xA;	  id int primary key&#xD;&#xA;	  description text&#xD;&#xA;	  ...&#xD;&#xA;&#xD;&#xA;	table 'userdreams'&#xD;&#xA;	  id int primary key&#xD;&#xA;	  userid int foreign key on users.id&#xD;&#xA;	  dreamid int foreign key on dreams.id&#xD;&#xA;	  ... (maybe some data about whether the user has read the dream, or a timestamp)&#xD;&#xA;&#xD;&#xA;(the above is, of course, pseudocode)&#xD;&#xA;&#xD;&#xA;So the users table is where user details are stored - username, hashed password, etc. The dreams table is added to by the designers, and you can make a nice designer-friendly form that lets them write dreams and submit them into this table. And then the userdreams table is what ties the two together; each night you insert one row into this table per user, which has their userid and the id of the dream the user has (or more likely, when an user logs in you check if they haven't logged in since the previous day, and if not then assign them a dream and pretend as if the dream had been given to them overnight - but that's an answer to a different question).&#xD;&#xA;&#xD;&#xA;Does this sound like the appropriate answer to your question? If not, please try to clarify a bit more. As I said, it's difficult to tell exactly what needs answering." />
  <row Id="28965" PostHistoryTypeId="5" PostId="13077" RevisionGUID="88eefecf-3960-445e-8348-3774cd39c83c" CreationDate="2011-06-03T00:04:09.017" UserId="4443" Comment="Was done to provide the clear answer instead of the more informal conversational approach initially taken" Text="Solution: You only detect and react to a collision on an object once per frame. This would move the second collision detection in step 3 to the next frame so that it will not enter an infinite loop and freeze.&#xD;&#xA;&#xD;&#xA;Problems with the solution: If the two objects are not springs, but are instead solid objects you will see an age-old problem where it will look like the object shoots out at very high velocities from where it was. This may or may not be an issue either by the design of the game in question or simply because it would not matter if it does happen. Two common solutions when this happen, both of which require detection of the situation, is to remove the object either outright, or apply damage to it or the like or to alternately scan for the nearest 'open' area and move the object to that location.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="28966" PostHistoryTypeId="25" PostId="13076" RevisionGUID="daf958f7-c816-4814-a2a7-9ac103ccc564" CreationDate="2011-06-03T00:13:33.497" Comment="http://twitter.com/#!/StackGameDev/status/76441351356559360" />
  <row Id="28967" PostHistoryTypeId="2" PostId="13084" RevisionGUID="bd2466f3-4f14-4416-aa86-5200337de03a" CreationDate="2011-06-03T00:13:59.113" UserId="7728" Text="As James says, in many types of games, this sort of issue doesn't really matter much.  But in others;  particularly in games with fast-moving objects, it's critically important to get this right to handle complicated bounces in corners.  So probably the smart thing to do is to ignore the problem unless it's actively causing problems for you.  If it's causing problems, then here's how you handle it:&#xD;&#xA;&#xD;&#xA;When your collision system is checking for collisions, instead of simply resolving collisions as you find them, you instead make a big list of all the collisions you find during the frame, and sort them according to the time-within-the-frame at which the collisions occurred.  (your collision system will need to know about object velocities in order to calculate the time within the frame at which the collision occurred)&#xD;&#xA;&#xD;&#xA;Once you have this sorted list, you resolve those collisions in order, from first to last.  When performing the collision resolution, you need to use the &quot;remaining frame time&quot; as a parameter to the collision resolution function.&#xD;&#xA;&#xD;&#xA;So here's a step-by-step version of this process, in the case of the situation shown in your diagram:&#xD;&#xA;&#xD;&#xA; 1. Find the collision between Obj and Spring2, which happened at (let's say) 3 milliseconds out of our 16 millisecond frame duration.  No other collisions found.&#xD;&#xA; 2. No other collisions, so resolve that first collision, which results in Obj moving left from the collision point, with 13 milliseconds left of frame time remaining.&#xD;&#xA; 3. Since an object moved, we now need to check for collisions for the remaining 13 milliseconds of frame time.  We find that now, Obj is colliding with Spring1, which happened at (let's say) 8 milliseconds out of our 16 millisecond frame duration.&#xD;&#xA; 4. No other collisions, so resolve the one collision we have, which results in Obj moving back to the right from the collision point, with 10 milliseconds of frame time remaining.&#xD;&#xA; 5. Repeat&#xD;&#xA;&#xD;&#xA;Note that if implemented correctly, Obj should be moving a smaller and smaller distance with each bounce, because the collision resolution is covering a shorter period of time within the frame at each iteration, and so eventually, Obj will be bouncing a small enough distance to no longer collide with the opposite spring within the frame duration.  &#xD;&#xA;&#xD;&#xA;Also note that it's still possible to get into an infinite loop if Spring1 and Spring2 are immobile objects and are placed so closely together that Obj doesn't actually fit between them, so it's important to have some maximum number of times that your collision system will iterate per frame.  The faster your objects can move, the more iterations you need to support, to handle common &quot;complicated bounce&quot; situations.  But in general, four or five iterations is a reasonable maximum for most games." />
  <row Id="28968" PostHistoryTypeId="2" PostId="13085" RevisionGUID="eccb2fec-8bc4-425e-8dcc-3d75df6405e2" CreationDate="2011-06-03T00:56:18.500" UserId="7548" Text="You need some sort of a viewport into the larger area.  Then, when the viewable area is changed you will need to draw it based on what should be displayed there (you can obtain this information from a database, for example -- in particular, PostgreSQL has some specialized indexing features available that are optimized for the needed types of queries).&#xD;&#xA;&#xD;&#xA;&amp;nbsp; PostgreSQL (free and open source)&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.postgresql.org/&#xD;&#xA;&#xD;&#xA;You'll also want to make sure the areas that are no longer needed will not remain in memory for too long, otherwise a player who likes to explore with the **&quot;run 20 times faster&quot; boots** will fill up their computer's memory quickly.&#xD;&#xA;&#xD;&#xA;One problem you might experience will be that as you load the tiles that are in view, the player will see blanks at first that get filled in shortly after.  One strategy you can use to resolve this problem is to also load tiles that are slightly out of view; that way, when the player moves, those next tiles will already be pre-loaded while your code starts loading other slightly-out-of-view tiles in preparation for the next moves (no matter what direction the player goes since you can't accurately predict this anyway, especially if the player suddenly sees a **dangerous giant spider that likes to eat speed-boosting-boots**).&#xD;&#xA;&#xD;&#xA;The beauty of using a database to load up on the nearby areas is that you have the option of increasing the size of your world far beyond 100k-by-100k.&#xD;&#xA;&#xD;&#xA;For your database, you'll need to have two columns that represent the X and Y positions.  If your player can move their character up (e.g., onto a rooftop) or down (e.g., into a dungeon), then you'll need to have a third column that represents the Z position as well.&#xD;&#xA;" />
  <row Id="28969" PostHistoryTypeId="2" PostId="13086" RevisionGUID="11f20a50-2fab-4a9b-a965-955935c9a25c" CreationDate="2011-06-03T01:05:50.063" UserId="7789" Text="I created a javascript game for browsers.&lt;br&gt;&#xD;&#xA;Do you know easy ways to promote it?&lt;br&gt;&#xD;&#xA;" />
  <row Id="28970" PostHistoryTypeId="1" PostId="13086" RevisionGUID="11f20a50-2fab-4a9b-a965-955935c9a25c" CreationDate="2011-06-03T01:05:50.063" UserId="7789" Text="How to promote my free javascript game?" />
  <row Id="28971" PostHistoryTypeId="3" PostId="13086" RevisionGUID="11f20a50-2fab-4a9b-a965-955935c9a25c" CreationDate="2011-06-03T01:05:50.063" UserId="7789" Text="&lt;javascript&gt;&lt;marketing&gt;&lt;free&gt;" />
  <row Id="28972" PostHistoryTypeId="2" PostId="13087" RevisionGUID="987e945f-61f8-492c-8fee-3b1bfefe5a87" CreationDate="2011-06-03T01:18:08.367" UserId="7548" Text="Google has an excellent advertising network that reaches many very large audiences.  You can do some advertising with it for very low cost that you are in complete control of, and there's no limit to the number of keywords/phrases you can specify that will trigger your ads to appear.&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Google AdWords&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://adwords.google.com/&#xD;&#xA;&#xD;&#xA;I suggest starting off with a minimal amount with them, such as $100.00 (or whatever you think seems reasonable), and try to stretch it out over the course of 1-3 months (you can specify the maximum per day with their system).&#xD;&#xA;&#xD;&#xA;I've had a few clients experiment with this, and for some it worked out really well, yet for others it resulted in no new traffic or sales.  I've found the staff at Google to be very helpful too.&#xD;&#xA;" />
  <row Id="28973" PostHistoryTypeId="5" PostId="13076" RevisionGUID="70a09264-7a4d-4abf-8270-6eb6a22b4775" CreationDate="2011-06-03T01:27:08.117" UserId="4443" Comment="Embedded the image directly in the post instead of requiring you to go to an external site." Text="I am writing a collision detection system which uses the logic mentioned by Trevor [here](http://gamedev.stackexchange.com/questions/13004/where-should-collision-detection-logic-be-placed)&#xD;&#xA;&#xD;&#xA;But I have anticipated a problem which I have shown as a diagram ![Collision Diagram][1]&#xD;&#xA;&#xD;&#xA;How do we handle this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/q4s0B.png" />
  <row Id="28974" PostHistoryTypeId="24" PostId="13076" RevisionGUID="70a09264-7a4d-4abf-8270-6eb6a22b4775" CreationDate="2011-06-03T01:27:08.117" Comment="Proposed by 4443 approved by 51 edit id of 472" />
  <row Id="28975" PostHistoryTypeId="5" PostId="13086" RevisionGUID="6a95782a-385b-4a1d-8479-5b8791496b32" CreationDate="2011-06-03T01:31:00.980" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Effective marketing strategies for independent game projects](http://gamedev.stackexchange.com/questions/489/effective-marketing-strategies-for-independent-game-projects)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I created a javascript game for browsers.&lt;br&gt;&#xD;&#xA;Do you know easy ways to promote it?&lt;br&gt;&#xD;&#xA;" />
  <row Id="28976" PostHistoryTypeId="10" PostId="13086" RevisionGUID="17e581d9-3e19-498b-8b7b-37127f591dfa" CreationDate="2011-06-03T01:30:59.593" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="28977" PostHistoryTypeId="2" PostId="13088" RevisionGUID="19b1878d-2a34-45cc-9563-cad3f89c395c" CreationDate="2011-06-03T01:40:07.373" UserId="7787" Text="Basically, what I'm trying to do is apply a shader to my background image and only the background image. The problem is: the background is actually made up of tiles that are picked out of a list of images. The background code loads and draws the tiles according to a map (an int[,].) I've been reading up on using RenderTarget2d, but I haven't found anything that suggests I'd be able to use specific images (let alone images set up according to a map.) So here's my question: is there a way to render my backgrounds to a texture so I can apply a shader or is there another way for me to apply a shader that I might want to try?" />
  <row Id="28978" PostHistoryTypeId="1" PostId="13088" RevisionGUID="19b1878d-2a34-45cc-9563-cad3f89c395c" CreationDate="2011-06-03T01:40:07.373" UserId="7787" Text="How can I apply a shader to images in a map in XNA?" />
  <row Id="28979" PostHistoryTypeId="3" PostId="13088" RevisionGUID="19b1878d-2a34-45cc-9563-cad3f89c395c" CreationDate="2011-06-03T01:40:07.373" UserId="7787" Text="&lt;xna&gt;&lt;tiles&gt;&lt;maps&gt;&lt;shaders&gt;" />
  <row Id="28980" PostHistoryTypeId="2" PostId="13089" RevisionGUID="730ad631-28ee-49ea-acac-8a1a17bd30d3" CreationDate="2011-06-03T02:19:00.250" UserId="7732" Text="I've read [this wall jumping question][1] but I'm having trouble implementing it. I've gotten as far as implementing a timer that controls when wall jumping is possible. Right now, if I go up against a wall, then jump, I'll have a timer that will later run out (and then I won't be able to wall jump in mid air). However, I'm not sure how to implement it. I see two problems here - one is to determine the direction the player should go, and how to cancel out the effects of holding down a directional arrow key and counteracting the velocity I would apply when I jump off the wall. Also, I'm having troubles of determining when I hit _another_ wall, so I can wall jump again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8320/wall-jump-for-2d-platformer" />
  <row Id="28981" PostHistoryTypeId="1" PostId="13089" RevisionGUID="730ad631-28ee-49ea-acac-8a1a17bd30d3" CreationDate="2011-06-03T02:19:00.250" UserId="7732" Text="Implementing Wall Jumping" />
  <row Id="28982" PostHistoryTypeId="3" PostId="13089" RevisionGUID="730ad631-28ee-49ea-acac-8a1a17bd30d3" CreationDate="2011-06-03T02:19:00.250" UserId="7732" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="28983" PostHistoryTypeId="2" PostId="13090" RevisionGUID="3d9b92a7-2645-4011-afa1-74d1c051da10" CreationDate="2011-06-03T02:54:41.000" UserId="7790" Text="&#xD;&#xA;When hiring programmers, we ensure they understand and can solve problems with basic 3D vector math: dot products, cross products, simulating simple trajectories, etc.  Reflecting a vector is a perfect example of a question we might ask.  A working knowledge of basic 3D math is crucial for developing 3D games.&#xD;&#xA;&#xD;&#xA;That said, very few professional game developers have the knowledge to write a good physics engine.  This is still a very specialized skill.&#xD;&#xA;&#xD;&#xA;If you want to go pro, I strongly recommend that you learn to be comfortable with basic vector algebra.  If you don't, you will eventually struggle to keep up, even in 2D games.&#xD;&#xA;" />
  <row Id="28984" PostHistoryTypeId="2" PostId="13091" RevisionGUID="fe4611ad-2d1c-454f-ace3-a091a74b3f21" CreationDate="2011-06-03T03:11:49.480" UserId="4406" Text="Consider using a job server such as Gearman. Your services are workers that pull jobs from the job server, do some work, and put a result back which is forwarded to the job submitter. If you find that some service has a high number of jobs per unit time, simply add more workers to handle the load." />
  <row Id="28985" PostHistoryTypeId="25" PostId="13089" RevisionGUID="37492809-15af-4039-b513-b1baf640e2f5" CreationDate="2011-06-03T03:13:33.830" Comment="http://twitter.com/#!/StackGameDev/status/76486650821214208" />
  <row Id="28986" PostHistoryTypeId="2" PostId="13092" RevisionGUID="16415aae-5dfd-4826-8215-6f2842269dee" CreationDate="2011-06-03T03:25:46.657" UserId="288" Text="You seem to have already figured out how to do this. Here's the process:&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.SetRenderTarget(myRenderTarget);&#xD;&#xA;    RenderMyBackground();&#xD;&#xA;    GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;    spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, myShaderEffect);&#xD;&#xA;    spriteBatch.Draw(myRenderTarget, Vector2.Zero, Color.White);&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;    RenderEverythingElse();&#xD;&#xA;&#xD;&#xA;You may want to have a look at the &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/bloom&quot;&gt;Bloom Postprocess&lt;/a&gt; sample. There's no reason you have to apply a post-process effect to your entire scene. You can apply it to just your background and then draw the rest of your scene over the top." />
  <row Id="28987" PostHistoryTypeId="6" PostId="11474" RevisionGUID="3cd93866-ff89-46fc-8758-bb76943e9edd" CreationDate="2011-06-03T04:12:13.650" UserId="2698" Comment="edited tags" Text="&lt;math&gt;&lt;hlsl&gt;&lt;vector&gt;&lt;linear-algebra&gt;&lt;shaders&gt;" />
  <row Id="28988" PostHistoryTypeId="2" PostId="13093" RevisionGUID="c5f9b3ab-8bfb-415e-85ec-6e005fa3712a" CreationDate="2011-06-03T05:55:36.963" UserId="999" Text="[DeleD][1] is a level editor for Windows. It saves to its own format and COLLADA so it's easy to read the levels to your own game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.delgine.com/index.php?filename=product_deled" />
  <row Id="28989" PostHistoryTypeId="16" PostId="13093" RevisionGUID="d096eec1-2d79-44d2-af2e-e5fb4ddc80b4" CreationDate="2011-06-03T05:55:36.963" UserId="999" />
  <row Id="28990" PostHistoryTypeId="25" PostId="13071" RevisionGUID="41b15114-8572-4223-a0fc-b9f6b2b05220" CreationDate="2011-06-03T06:13:34.187" Comment="http://twitter.com/#!/StackGameDev/status/76531952173322240" />
  <row Id="28991" PostHistoryTypeId="2" PostId="13094" RevisionGUID="057d1a97-4713-4e63-a8d9-6320614ff3cb" CreationDate="2011-06-03T06:26:20.133" UserId="7792" Text="I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with.&#xD;&#xA;&#xD;&#xA;The superhero bitmap is created on the fly by rotating the original bitmap between -90 and 90 degrees. As a result of the rotation, the bounding box is much, much larger than the non-rotated version. I have code to detect if the bounding box of the player hits any object, but visually this creates a problem when the object comes in contact with the skewed bounding box.&#xD;&#xA;&#xD;&#xA;I need a solution that computes pixel-perfect hit detection between the player and the object, not just the bounding boxes.&#xD;&#xA;&#xD;&#xA;I have been searching for the past 5 days for examples, tutorials, code snippets, or anything that could help me, but I haven't found a solution. The solution I'm looking for would be simply one function call similar to public boolean(obstacle theobject), where the obstacle's bitmap. coordinates, width, and height are returned with obstacle.getbitmap, obstacle.getx, obstacle.gety, obstacle.getwidth, and obstacle.getheight. The bitmap of the player is named rotatedbm and has global variables playerx, playery, playerh, and playerw.&#xD;&#xA;&#xD;&#xA;I do not wish to implement external game engines or libraries.&#xD;&#xA;&#xD;&#xA;I have read much on using int arrays with Bitmap.getPixels, and then comparing the arrays, but I cannot grasp the math behind comparing the arrays nor sorting out alpha values. I cannot afford to stay stuck on this one problem much long for the sake of development.&#xD;&#xA;&#xD;&#xA;I will pay $50 paypal or money order to anyone who can come up with an implementable solution. Please contact me at corey.crossman@gmail.com for any further information or questions.&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="28992" PostHistoryTypeId="1" PostId="13094" RevisionGUID="057d1a97-4713-4e63-a8d9-6320614ff3cb" CreationDate="2011-06-03T06:26:20.133" UserId="7792" Text="Java/Android pixel perfect hit detection" />
  <row Id="28993" PostHistoryTypeId="3" PostId="13094" RevisionGUID="057d1a97-4713-4e63-a8d9-6320614ff3cb" CreationDate="2011-06-03T06:26:20.133" UserId="7792" Text="&lt;java&gt;&lt;collision-detection&gt;&lt;android&gt;" />
  <row Id="28994" PostHistoryTypeId="2" PostId="13095" RevisionGUID="5f06e3b2-9f90-426b-b870-f5ebb85ccd6d" CreationDate="2011-06-03T07:41:19.133" UserId="6690" Text="I believe you're over thinking your problem. &#xD;&#xA;&#xD;&#xA;To get back to standard normal mapping, you normally have 3 vectors: the surface normal, a tangent vector perpendicular to that one, and a cotangent perpendicular to both of those. Together, these form the tangent space in which the normal map describes a direction. With this setup, you just have to multiply each component read of the normal map with its respective tangent space axis, and sum the results.&#xD;&#xA;&#xD;&#xA;So you have a terrain, and a normal map you'd like to apply to it. You've already worked out how to take the delta height and generate a surface normal. You're now looking for the tangent and cotangent.&#xD;&#xA;&#xD;&#xA;So what IS a tangent? Well, from the description above, it's actually the 3D direction described by one of the UV axes in your texture mapping. After all, that's what it gets used for, right? So how do you find this direction? Well, given an arbitrary mesh, it's a little tricky; but given a regular grid terrain, it's self evident: if you have a regular grid with regular UVs, then the tangent and cotangent directions are just the two axis aligned edges leaving your vertex. &#xD;&#xA;&#xD;&#xA;So, you know what the heights of points around you are. You can pass in how far away these points are on the plane. Subtract those from the point you're on, normalize, and there you go: instant tangent space." />
  <row Id="28995" PostHistoryTypeId="2" PostId="13096" RevisionGUID="fc89960f-8fbe-49a0-a3b4-9caa74762005" CreationDate="2011-06-03T09:00:37.510" UserId="7663" Text="If I were to solve this problem, I'd take these two steps.&#xD;&#xA;&#xD;&#xA;**Step1: Infinite collision detection:**&#xD;&#xA;This scenario occurs when the Object repeats its collision with the same set of springs for unreasonable amount of time. So for every collision with a spring, I would check whether the last X no. of collisions(say 50 times), has occurred between the same set of springs. I'd just check between the current 2 collided springs with the last 2 collided springs and maintain a counter and when the counter reaches X, I'd call it as infinite loop.&#xD;&#xA;&#xD;&#xA;**Step2: Preventing the infinite loop:**&#xD;&#xA;Once we identify the infinite loop, we can handle it however we want. Eg. Restarting the game or Stop the object from moving further or bringing the object to the starting position.&#xD;&#xA;&#xD;&#xA;I'm new to game development. Feel free to correct me." />
  <row Id="28996" PostHistoryTypeId="25" PostId="13094" RevisionGUID="5891c618-32c0-4144-90c7-4c2796b36f26" CreationDate="2011-06-03T09:13:34.643" Comment="http://twitter.com/#!/StackGameDev/status/76577251411505152" />
  <row Id="28997" PostHistoryTypeId="5" PostId="13035" RevisionGUID="91f489d9-e75b-458f-9fb3-84f5e992e534" CreationDate="2011-06-03T10:32:42.077" UserId="7035" Comment="added 261 characters in body" Text="[Blender][1] is probably the most advanced of free 3D editors, featuring modeling, IK, rendering, physics, etc.  &#xD;&#xA;**Update:** it is extensible with Python, and supports many output formats (see [Import/Export page][2]), including md5 (Doom 3), Neverwinter Nights and Crystal Space engine file formats.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org&#xD;&#xA;  [2]: http://www.blender.org/download/python-scripts/import-export/" />
  <row Id="28998" PostHistoryTypeId="17" PostId="13097" RevisionGUID="5f1da546-8d5f-47a0-a8af-1031872e4a1a" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="28999" PostHistoryTypeId="17" PostId="13098" RevisionGUID="cd681671-e686-44d6-babd-db86b897a3ee" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29000" PostHistoryTypeId="17" PostId="13099" RevisionGUID="cdd9f7fc-015b-4172-b038-f9465a42a242" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29001" PostHistoryTypeId="17" PostId="13100" RevisionGUID="db2a09b9-2465-464f-a22a-1cae6e00e672" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29002" PostHistoryTypeId="17" PostId="13101" RevisionGUID="69341c63-ba1f-42a8-bef3-fa36a6bb75a8" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29003" PostHistoryTypeId="17" PostId="13102" RevisionGUID="48c892ed-28df-4b5c-9a2b-ceb3c93535da" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29004" PostHistoryTypeId="17" PostId="13103" RevisionGUID="c3aa7ff8-11ff-40f0-98fe-63c938050730" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29005" PostHistoryTypeId="17" PostId="13104" RevisionGUID="7df4e2f1-8e4e-4173-8d8d-19934f9e52f5" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29006" PostHistoryTypeId="17" PostId="13105" RevisionGUID="efe9c4e5-94fe-4c2b-b2eb-92046f00b444" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29007" PostHistoryTypeId="17" PostId="13106" RevisionGUID="55d5aaf5-af7f-4429-82d2-b2dbdc60974e" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29009" PostHistoryTypeId="17" PostId="13108" RevisionGUID="cdab43de-df06-4243-8219-9aee76737cef" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29010" PostHistoryTypeId="17" PostId="13109" RevisionGUID="e02ace43-aece-4f51-8565-090e7b2e4b7a" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29011" PostHistoryTypeId="17" PostId="13110" RevisionGUID="9d8bcd0d-e03c-449f-8551-e0f011be2f97" CreationDate="2011-06-03T10:38:40.063" UserId="-1" Comment="from http://stackoverflow.com/questions/828531/how-to-generate-a-universe" Text="" />
  <row Id="29012" PostHistoryTypeId="2" PostId="13098" RevisionGUID="5fdf7673-4bf4-40e2-bf8d-4ecd2debe20f" CreationDate="2009-05-06T08:10:39.953" UserDisplayName="sybreon" Text="I would think that fractals would be a good start. So, maybe some sort of fractal algorithm with some random parameters thrown in for variety." />
  <row Id="29013" PostHistoryTypeId="2" PostId="13099" RevisionGUID="fd19acea-40fe-4621-a446-6ed1f5714054" CreationDate="2009-05-06T08:10:56.753" UserDisplayName="DR" Text="[Conway's Game of Life][1] may be a good starting point.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" />
  <row Id="29014" PostHistoryTypeId="2" PostId="13100" RevisionGUID="1cbd2971-6084-4975-97ab-b72d5900251d" CreationDate="2009-05-06T08:13:18.217" UserDisplayName="shoosh" Text="I would bet on [L-Systems][1] to be able to generate something like this.  &#xD;&#xA;Ofcourse saying this is like saying &quot;you can write it in C++&quot;. L-Systems is a huge subject and you probably need to know what you're doing to get any result at all.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/L-systems" />
  <row Id="29015" PostHistoryTypeId="2" PostId="13101" RevisionGUID="f496f2e9-b82b-43bd-a736-f4732c3ffcf2" CreationDate="2009-05-06T08:15:48.520" UserId="3517" Text="You probably want to create only as much of your universe as you currently need. So I'd go for a generator that is able to generate a new element of the universe based on some rules and a randomized choice of parameters for these rules.&#xD;&#xA;&#xD;&#xA;The generator should not need to examine the whole universe to generate a new element. Ideally only a small neighborhood should be sufficient.&#xD;&#xA;&#xD;&#xA;Without more details what you wanna do, I don't think you can get much more detailed answers." />
  <row Id="29016" PostHistoryTypeId="2" PostId="13102" RevisionGUID="11ad39e4-26cc-47e1-b8e7-4c9261c09041" CreationDate="2009-05-06T08:20:02.660" UserDisplayName="Unsliced" Text="Are you trying to generate a new universe or a simulation of ours? &#xD;&#xA;&#xD;&#xA;Re-imagining our universe with different fundamental constants would be interesting, but unless you're an astronomy or physics department of a major university, I would imagine it might be beyond most people's skillz. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29017" PostHistoryTypeId="2" PostId="13103" RevisionGUID="ae3220fa-8a2e-4397-b989-1b4e968ebf80" CreationDate="2009-05-06T08:22:17.493" UserDisplayName="1800 INFORMATION" Text="All these other answers are boring. Why not copy the [real thing][1]? You can extract the data from [DSS][2] or [SuperCOSMOS][3]. Then just turn it into a cool space game. Simple.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://galaxymap.org/&#xD;&#xA;  [2]: http://stdatu.stsci.edu/dss/&#xD;&#xA;  [3]: http://www-wfau.roe.ac.uk/sss/pixel.html" />
  <row Id="29018" PostHistoryTypeId="2" PostId="13104" RevisionGUID="101a7991-135b-426f-8c51-f1fc1ad109b9" CreationDate="2009-05-06T08:23:23.963" UserId="1809" Text="I think that the hardest part (and the one which requires most creativity) is likely to be generating interesting, uniquely recognisable names for all the places you will be creating." />
  <row Id="29019" PostHistoryTypeId="2" PostId="13106" RevisionGUID="a3b6fa48-7f38-477f-9989-bdf93f35209c" CreationDate="2009-05-06T08:28:32.827" UserDisplayName="Brian Agnew" Text="I wouldn't take too much inspiration from the Elite universe. They were built with all the limitations of a 8-bit computer with tiny amounts of memory available. See [Elite][1] (particularly the section on technological limitations)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Elite_%28computer_game%29" />
  <row Id="29020" PostHistoryTypeId="2" PostId="13108" RevisionGUID="fe4eace9-590a-4a3e-a6d0-e7fcc5923f7c" CreationDate="2009-05-06T09:24:09.497" UserDisplayName="Jonathan C Dickinson" Text="You should read up on [procedural content generation][1].&#xD;&#xA;&#xD;&#xA;**Idea 1**&#xD;&#xA;&#xD;&#xA;1. Create a variety of P[RNG][2]s that always return the same sequence of numbers when given a duplicate seed.&#xD;&#xA;2. Create a universe seed number (you can use a standard (P)RNG to do this).&#xD;&#xA;3. Save this seed.&#xD;&#xA;4. Use the PRNGs that *you* created to populate the universe with stars and planets. You will need to create at least five properties for each: X,Y,Z,Mass,Seed - add more as you see fit (e.g. Spore would have GroundColor, AtmosphereColor, Temperature, e.t.c.)&#xD;&#xA;5. When you draw near to a planet use it's seed to create the heightmap and features on it.&#xD;&#xA;&#xD;&#xA;Any changes that the player makes will need to be persisted somewhere. Basically you will need a transactional store (with CRUD operations) to indicate what the player has done.&#xD;&#xA;&#xD;&#xA;Tree #44072:&#xD;&#xA;&#xD;&#xA; - Eaten&#xD;&#xA; - Deleted&#xD;&#xA;&#xD;&#xA;Planet #14325:&#xD;&#xA;&#xD;&#xA; - Changed to blue&#xD;&#xA;&#xD;&#xA;**Idea 2**&#xD;&#xA;&#xD;&#xA;Instead of using a PNRG to create positions you could use [perlin noise][3]. If you create a few image filters (with deterministic outcomes) you could use the results as:&#xD;&#xA;&#xD;&#xA; - Star density maps&#xD;&#xA; - Planet seeds&#xD;&#xA; - Properties&#xD;&#xA;&#xD;&#xA;By getting really clever you could even create specific filters that could:&#xD;&#xA;&#xD;&#xA; - Make stars in the center of galaxies hotter&#xD;&#xA; - Make different types of galaxies&#xD;&#xA;&#xD;&#xA;The advantage of this is obviously the speed - you won't be creating or storing (in RAM) the whole universe in one shot (you simply work out the relevant 'quadrant' you are in).&#xD;&#xA;&#xD;&#xA;You will obviously still need to store player modifications.&#xD;&#xA;&#xD;&#xA;Hope this gives you a good head start!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Procedural_generation &quot;Wikipedia Article&quot;&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/RNG &quot;Wikipedia Article&quot;&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Perlin_noise &quot;Wikipedia Article&quot;" />
  <row Id="29021" PostHistoryTypeId="2" PostId="13109" RevisionGUID="39fe77d0-acd5-4064-932b-e6b6d5aab990" CreationDate="2009-05-07T18:22:06.450" UserId="5902" Text="Well, you can get  the actual &lt;a href=&quot;http://www.iancgbell.clara.net/elite/text/index.htm&quot;&gt;Elite's trading engine&lt;/a&gt; implemented in C. If I remember correctly it contains also the universe generation part minus the graphics part. &#xD;&#xA;&#xD;&#xA;The basic idea is that you take a random number generator and seed it with fixed value. Then you build your galaxy/star system based on random values from the generator. After eight hyperspace jumps or so you reseed the generator with the original value.    " />
  <row Id="29022" PostHistoryTypeId="2" PostId="13105" RevisionGUID="0917766b-0b72-4919-9ac3-59c2e1d8e978" CreationDate="2009-05-06T08:27:51.473" UserDisplayName="Nick Allen" Text="It makes me giggle a bit that we think as human beings we are anywhere close to understanding what a universe IS to the point where we think we can start simulating one. I'm not saying It's bad to aim high and attempt to understand such higher level topics, it just makes me giggle" />
  <row Id="29024" PostHistoryTypeId="2" PostId="13110" RevisionGUID="2caf8426-6a41-4898-b595-ec51c477cb2d" CreationDate="2010-12-24T10:49:32.787" UserId="2134" Text="Most likely you'll have to **generate some random numbers** but wish to create the same universe from the same seed. See *Jonathan C Dickinson* answer for more on that.&#xD;&#xA;&#xD;&#xA;The tough part though is to use those random numbers and generate a procedural environment that is looking like you wish. **Perlin noise** can be used to generate lanscapes and some textures but not all. Most texture will have to be generated vie other **procedural** algorithms. A good place for procedural worlds are very tiny sized demo from the **demo scene** (like the [1K demo on Pouet.net](http://pouet.net/prodlist.php).&#xD;&#xA;&#xD;&#xA;*Spore* had to focus on the 3-D textures and so on. Let's say you wish to create a universe and focus on the *big picture* instead. There's the easy way and the hard way:&#xD;&#xA;&#xD;&#xA; - **Easiest**: Random mass, size, color, texture among your gallery of textures, etc. plus a few ad-hoc checking that you don't create two planets at the same position. You won't get anything near realistic though.&#xD;&#xA; - **Harder**: Generate a star and a number of planets. Then for each generate a random mass and size wich will give you it position in the system and define it's composition (gaz, solid...). Do that at every level using existing knowledge. This gives something much more realistic.&#xD;&#xA; - **Hardest**: Use some physics. Create particles and laws that nearly follow those of the creation of stars and galaxies and planets. From the randoms particles should come all your universe. Once you have the rough universe generated, refine the details using another techique (after all you can't simulate an entire universe up to real details LOL - *yet*)&#xD;&#xA;&#xD;&#xA;Those of the big pictures. If you wish to go in the details on the planet, you can follow a somewhat similar approach.&#xD;&#xA;&#xD;&#xA;Last but not least, remember your focus. In Spore the focus was the game fun and not the scientific realism. Any mechanic that fits is good, and with random numbers there is already a lot of unpredictability." />
  <row Id="29025" PostHistoryTypeId="2" PostId="13097" RevisionGUID="2d28d1d8-b0c9-48d4-b6cb-c7896a835899" CreationDate="2009-05-06T08:07:11.960" UserId="3441" Text="If I wanted to generate a universe/galaxy like that of Elite or Spore, what would be some good programming reference materials and algorithms to take into account?" />
  <row Id="29026" PostHistoryTypeId="1" PostId="13097" RevisionGUID="2d28d1d8-b0c9-48d4-b6cb-c7896a835899" CreationDate="2009-05-06T08:07:11.960" UserId="3441" Text="How to generate a universe?" />
  <row Id="29027" PostHistoryTypeId="3" PostId="13097" RevisionGUID="2d28d1d8-b0c9-48d4-b6cb-c7896a835899" CreationDate="2009-05-06T08:07:11.960" UserId="3441" Text="&lt;random&gt;" />
  <row Id="29028" PostHistoryTypeId="2" PostId="13111" RevisionGUID="19c82e87-3c86-4746-b4f3-6dfd36b4c6e0" CreationDate="2011-06-03T12:05:40.220" UserId="4413" Text="&quot;somehow time-critical&quot; as in low latency?&#xD;&#xA;&#xD;&#xA;WebSocket is the only way https://developer.mozilla.org/en/WebSockets" />
  <row Id="29029" PostHistoryTypeId="25" PostId="13081" RevisionGUID="341aa95c-a80e-439a-bb62-d1bd15377df6" CreationDate="2011-06-03T12:13:34.323" Comment="http://twitter.com/#!/StackGameDev/status/76622548380561408" />
  <row Id="29030" PostHistoryTypeId="2" PostId="13112" RevisionGUID="989f0e6c-d1e8-4fb1-ba83-c1e43cfc6353" CreationDate="2011-06-03T13:10:46.210" UserId="163" Text="This is pretty dependent on how you're doing your collision detection. For example, for the &quot;direction&quot; question ... if you define your levels as polygons and do your collision detection that way, then it would be pretty trivial to determine the perpendicular vector to the line that you are colliding with ... that would be the direction that you would &quot;jump&quot; in.&#xD;&#xA;&#xD;&#xA;For the effects of holding down the arrow key, ideally you would do nothing. Once you determine the direction of the jump, you would change the player's velocity in that direction to propel them. Once they are in the air after they've done the wall jump, why shouldn't the arrow keys affect their trajectory? I mean, of course that entirely matters on your game's control scheme since some games don't let you control the character in the air ... but even in that case, the default behavior *should* handle it because input would be disabled while in the air.&#xD;&#xA;&#xD;&#xA;as to the question about how to determine when you hit another wall ... this shouldn't be a problem, and if it is it's indicative of an issue with the code's design. You should really put this logic inside of some sort of &quot;Entity&quot;. Good object oriented design isn't a panacea, but it can go a long way to mitigating the complexities of a system like a game." />
  <row Id="29031" PostHistoryTypeId="2" PostId="13113" RevisionGUID="f7ee8f70-f605-4d65-9643-ffa15389515c" CreationDate="2011-06-03T13:11:32.197" UserId="6441" Text="I eventually figured out, I was reading the data in wrong. All the code above is correct.&#xD;&#xA;" />
  <row Id="29032" PostHistoryTypeId="2" PostId="13114" RevisionGUID="0ab34be2-1ca3-4d8a-8cfd-d7ca76595c77" CreationDate="2011-06-03T13:51:18.450" UserId="7797" Text="I am trying to make a simple sync between two box2d rooms, where you can drag boxes using the mouse. One player example here: http://code.google.com/p/box2dweb/&#xD;&#xA;&#xD;&#xA;So every time player clicks (and holds the mousedown) a box, I try send joint parameters to server, and server sends them to other clients. When mouseup occurs, I send command to delete joint.&#xD;&#xA;&#xD;&#xA;The problem is that sync breaks too often. Is my way radically wrong, or it just needs some tweaks?" />
  <row Id="29033" PostHistoryTypeId="1" PostId="13114" RevisionGUID="0ab34be2-1ca3-4d8a-8cfd-d7ca76595c77" CreationDate="2011-06-03T13:51:18.450" UserId="7797" Text="Box2D networking" />
  <row Id="29034" PostHistoryTypeId="3" PostId="13114" RevisionGUID="0ab34be2-1ca3-4d8a-8cfd-d7ca76595c77" CreationDate="2011-06-03T13:51:18.450" UserId="7797" Text="&lt;network&gt;&lt;box2d&gt;" />
  <row Id="29035" PostHistoryTypeId="2" PostId="13115" RevisionGUID="0e670f8d-b9d6-43d6-9a92-184915edc64f" CreationDate="2011-06-03T14:37:17.640" UserId="7777" Text="I'm newbie in programming and game programming.&#xD;&#xA;I reading something about Vector's, Math, but have question where is using Vector's in game programming? maybe anyone can give simple simple simple example in where is using Vector's(2D)?&#xD;&#xA;&#xD;&#xA;I'm find examples but more is in console where output number's and big examples where I'm more don't understand.&#xD;&#xA;&#xD;&#xA;Thanks, Sorry for newbie questions." />
  <row Id="29036" PostHistoryTypeId="1" PostId="13115" RevisionGUID="0e670f8d-b9d6-43d6-9a92-184915edc64f" CreationDate="2011-06-03T14:37:17.640" UserId="7777" Text="Vector's in Game Development" />
  <row Id="29037" PostHistoryTypeId="3" PostId="13115" RevisionGUID="0e670f8d-b9d6-43d6-9a92-184915edc64f" CreationDate="2011-06-03T14:37:17.640" UserId="7777" Text="&lt;vector&gt;" />
  <row Id="29038" PostHistoryTypeId="5" PostId="13115" RevisionGUID="12e783e2-f802-4372-a492-116171a49a10" CreationDate="2011-06-03T14:47:57.710" UserId="1156" Comment="cleaned it up; edited title" Text="I'm new to programming and game programming.&#xD;&#xA;I've reading something about vectors and math, but I have a question - where do I use vectors in game programming? Maybe anyone can give a simple example where you are using vectors (in 2D)?&#xD;&#xA;&#xD;&#xA;I've found examples but mostly they are in the console where they output numbers, and big examples which I don't understand." />
  <row Id="29039" PostHistoryTypeId="4" PostId="13115" RevisionGUID="12e783e2-f802-4372-a492-116171a49a10" CreationDate="2011-06-03T14:47:57.710" UserId="1156" Comment="cleaned it up; edited title" Text="Vectors in game development" />
  <row Id="29040" PostHistoryTypeId="5" PostId="13089" RevisionGUID="8b3a4ee5-efef-4d37-ad40-5652358867e0" CreationDate="2011-06-03T14:49:12.097" UserId="1156" Comment="added 4 characters in body; edited tags" Text="I've read [this wall jumping question][1] but I'm having trouble implementing it. I've gotten as far as implementing a timer that controls when wall jumping is possible. Right now, if I go up against a wall, then jump, I'll have a timer that will later run out (and then I won't be able to wall jump in mid air). &#xD;&#xA;&#xD;&#xA;However, I'm not sure how to implement it. I see two problems here - one is to determine the direction the player should go, and how to cancel out the effects of holding down a directional arrow key and counteracting the velocity I would apply when I jump off the wall. Also, I'm having troubles of determining when I hit _another_ wall, so I can wall jump again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/8320/wall-jump-for-2d-platformer" />
  <row Id="29041" PostHistoryTypeId="6" PostId="13089" RevisionGUID="8b3a4ee5-efef-4d37-ad40-5652358867e0" CreationDate="2011-06-03T14:49:12.097" UserId="1156" Comment="added 4 characters in body; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;game-mechanics&gt;" />
  <row Id="29042" PostHistoryTypeId="5" PostId="13015" RevisionGUID="a3189cae-d1d6-4556-a718-d7f25def1558" CreationDate="2011-06-03T14:51:04.567" UserId="7591" Comment="added 399 characters in body" Text="Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me.&#xD;&#xA;&#xD;&#xA;I developed an algorithm that creates a set of points. I now want to use them to create my 2D terrain. Here is how it looks like when I connect the points in java, so that you can get the idea&#xD;&#xA;&#xD;&#xA;![A line graph of connected dots][1]&#xD;&#xA;&#xD;&#xA;The points are connected with lines. However a real game terrain is a shape that is colored or has a texture overlayed, right? For example:&#xD;&#xA;&#xD;&#xA;![An image of in-game terrain looking pretty][2]&#xD;&#xA;&#xD;&#xA;**How could I use my points to create such a terrain?** &#xD;&#xA;&#xD;&#xA;What I tried so far is I created an array and filled it with my points. I pass this array to this method&#xD;&#xA;&#xD;&#xA;    void ccDrawPoly ( const CGPoint *  vertices,&#xD;&#xA;    	NSUInteger  numOfVertices,&#xD;&#xA;    	BOOL  closePolygon	 &#xD;&#xA;    ) 	&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;&gt; draws a poligon given a pointer to&#xD;&#xA;&gt; CGPoint coordiantes and the number of&#xD;&#xA;&gt; vertices measured in points. The&#xD;&#xA;&gt; polygon can be closed or open&#xD;&#xA;&#xD;&#xA;This actually draws a plain shape. But from the blue picture it looks like there is not one shape but many.&#xD;&#xA;&#xD;&#xA;Please share you knowledge on how to create 2d game terrain.&#xD;&#xA;&#xD;&#xA;**Update 03.06.2011**&#xD;&#xA;&#xD;&#xA;Based on the two good answer I have following result&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;However when I fill the polygons with a solid color not everything is e.g. white:&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;How can I fill the entire terrain with a color or even a texture?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wyRjN.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/jtDCb.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/gp7m1.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/4qAfQ.png" />
  <row Id="29043" PostHistoryTypeId="2" PostId="13116" RevisionGUID="3e3f03d6-beef-416f-af3d-e17cdc17159e" CreationDate="2011-06-03T14:56:38.543" UserId="3505" Text="Anywhere where you have a number for each dimension to represent something, the collection of these numbers can be considered a vector. Position, speed and acceleration are the prime examples of vectors. It can in some cases also be practical to represent direction of facing as a vector.&#xD;&#xA;&#xD;&#xA;For basic stuff it doesn't really matter whether or not you consider these numbers to be vectors, but if you want to do any kind of physics you ought to look into vector maths." />
  <row Id="29044" PostHistoryTypeId="2" PostId="13117" RevisionGUID="8178f79c-dda5-4c12-aab4-601489189d32" CreationDate="2011-06-03T14:56:43.187" UserId="4391" Text="1) Calculate the screen-space AABBs of the two potentially colliding objects. Note that this needs to be done after you've applied all rotations (there are very fast ways of obtaining AABBs from OBBs if you need to).&#xD;&#xA;You can represent AABBs in many different ways (e.g. vector2 and two floats - center and extents or two vector2s - bottom left, top right corner). I will assume the second representation - two vector2s for bottom left and top right corner.&#xD;&#xA;&#xD;&#xA;    struct AABB {&#xD;&#xA;        Vector2 bottomLeft;&#xD;&#xA;        Vector2 topRight;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;2) Do a basic AABB intersection test for an early out.&#xD;&#xA;&#xD;&#xA;3) Translate both AABBs to the coordinate space of the first one.&#xD;&#xA;&#xD;&#xA;    aabb2.bottomLeft -= aabb1.bottomLeft;  &#xD;&#xA;    aabb2.topRight -= aabb1.bottomLeft;  &#xD;&#xA;    aabb1.topRight -= aabb1.bottomLeft;  &#xD;&#xA;    aabb1.bottomLeft -= aabb1.bottomLeft;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;4) As the AABBs are in screen-space they (should) correspond directly to the bitmap representation of your objects on-screen. You get something like:&#xD;&#xA;&#xD;&#xA;![this][1]&#xD;&#xA;&#xD;&#xA;Now you have to iterate through the red pixels and compare the values from the two images you have. I am assuming you would wish to compare only the alpha values so you would need to mask them out from the ints you get from getPixels(). An example in pseudo C:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    int start_x = aabb2.bottomLeft.x;&#xD;&#xA;    int start_y = aabb2.topRight.y;&#xD;&#xA;    int end_x = aabb1.topRight.x;&#xD;&#xA;    int end_y = aabb1.bottomLeft.y;&#xD;&#xA;&#xD;&#xA;    int ALPHAMASK = 0xFF&lt;&lt;24; // assuming colors are represented as 0xAARRBBGG&#xD;&#xA;    Bitmap sprite1;&#xD;&#xA;    Bitmap sprite2;&#xD;&#xA;&#xD;&#xA;    for(int x = start_x; x &lt; end_x; x++) {  &#xD;&#xA;    for(int y = start_y; y &lt; end_y; y++) {  &#xD;&#xA;      alpha1 = sprite1.pixels[x+y*sprite1.width] &amp; ALPHAMASK;  &#xD;&#xA;      alpha2 = sprite2.pixels[(x+aabb2.bottomLeft.x)+((y+aabb2.topRight.y)*sprite2.width)] &amp; ALPHAMASK;&#xD;&#xA;      if(alpha1 != 0 &amp;&amp; alpha 2 != 0) {&#xD;&#xA;        // pixel is colliding&#xD;&#xA;        return; // you'd probably wish to return after a colliding pixel has been found&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://i.stack.imgur.com/1NntM.png" />
  <row Id="29045" PostHistoryTypeId="2" PostId="13118" RevisionGUID="acb41445-4e90-4ca6-b342-96ad923a8acf" CreationDate="2011-06-03T15:05:25.467" UserId="7754" Text="I'm developing a Android board game and have a question regarding creating a board that is zoomable and scrollable. The board contains a static background, characters (players) and  the actual &quot;level&quot; which is drawn using tiles.&#xD;&#xA;&#xD;&#xA;My solutions is to have a collection of elements (tiles, figures, all game elements - all have x,y coordinates and width + height), a camera and a renderer that draws the collection according to cameraX,cameraY, cameraWidth and cameraHeight. So if a user would scroll to the right, the camera would just set the cameraX appropriately - and the surface is scrollable. And if a user would zoom in/out the renderer would just scale every element image appropriately.&#xD;&#xA;&#xD;&#xA;Example code for the renderer with scrollable surface and zoom in/out&#xD;&#xA;&#xD;&#xA;        protected function draw(Canvas c){&#xD;&#xA;          Collection elements = collection.getElements(cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;          if(elements.size() &gt; 0) {&#xD;&#xA;             for(int i = 0; i &lt; elements.size(); i++) {&#xD;&#xA;                  elements.get(i).drawElement(c);&#xD;&#xA;             }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;        .&#xD;&#xA;        .&#xD;&#xA;        .&#xD;&#xA;        // element class drawElement function&#xD;&#xA;        protected drawElement function(Canvas c) {&#xD;&#xA;            if(this.image != null) {            &#xD;&#xA;              int w = this.width;&#xD;&#xA;              int h = this.height;&#xD;&#xA;              if(this.zoomFactor &lt; 1) {&#xD;&#xA;                 w*=this.zoomFactor;&#xD;&#xA;                 h*=this.zoomFactor;&#xD;&#xA;              }&#xD;&#xA;              c.drawBitmap(this.image,this.x,this.y,w,h);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;- Is this the best solutions?&#xD;&#xA;- Could it be achived somehow else? &#xD;&#xA;- Could scrolling be achived using a ScrollView? &#xD;&#xA;&#xD;&#xA;I dont wanna use any engine, because this is for a school project.&#xD;&#xA;&#xD;&#xA;Thanks for the reply's!&#xD;&#xA;&#xD;&#xA;Regards, J" />
  <row Id="29046" PostHistoryTypeId="1" PostId="13118" RevisionGUID="acb41445-4e90-4ca6-b342-96ad923a8acf" CreationDate="2011-06-03T15:05:25.467" UserId="7754" Text="android zoomable and scrollable board game" />
  <row Id="29047" PostHistoryTypeId="3" PostId="13118" RevisionGUID="acb41445-4e90-4ca6-b342-96ad923a8acf" CreationDate="2011-06-03T15:05:25.467" UserId="7754" Text="&lt;game-design&gt;&lt;2d&gt;&lt;android&gt;&lt;rendering&gt;" />
  <row Id="29048" PostHistoryTypeId="5" PostId="13015" RevisionGUID="937823e8-b9a3-44b0-91a2-870202c198cd" CreationDate="2011-06-03T15:11:48.753" UserId="7591" Comment="deleted 235 characters in body" Text="Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me.&#xD;&#xA;&#xD;&#xA;I developed an algorithm that creates a set of points. I now want to use them to create my 2D terrain. Here is how it looks like when I connect the points in java, so that you can get the idea&#xD;&#xA;&#xD;&#xA;![A line graph of connected dots][1]&#xD;&#xA;&#xD;&#xA;The points are connected with lines. However a real game terrain is a shape that is colored or has a texture overlayed, right? For example:&#xD;&#xA;&#xD;&#xA;![An image of in-game terrain looking pretty][2]&#xD;&#xA;&#xD;&#xA;**How could I use my points to create such a terrain?** &#xD;&#xA;&#xD;&#xA;What I tried so far is I created an array and filled it with my points. I pass this array to this method&#xD;&#xA;&#xD;&#xA;    void ccDrawPoly ( const CGPoint *  vertices,&#xD;&#xA;    	NSUInteger  numOfVertices,&#xD;&#xA;    	BOOL  closePolygon	 &#xD;&#xA;    ) 	&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;&gt; draws a poligon given a pointer to&#xD;&#xA;&gt; CGPoint coordiantes and the number of&#xD;&#xA;&gt; vertices measured in points. The&#xD;&#xA;&gt; polygon can be closed or open&#xD;&#xA;&#xD;&#xA;This actually draws a plain shape. But from the blue picture it looks like there is not one shape but many.&#xD;&#xA;&#xD;&#xA;Please share you knowledge on how to create 2d game terrain.&#xD;&#xA;&#xD;&#xA;**Update 03.06.2011**&#xD;&#xA;&#xD;&#xA;Based on the two good answer I have following result&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/wyRjN.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/jtDCb.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/eWohR.png" />
  <row Id="29049" PostHistoryTypeId="25" PostId="13114" RevisionGUID="8f4d09c1-0e83-43b8-aba2-67ef9da8a96a" CreationDate="2011-06-03T15:13:34.380" Comment="http://twitter.com/#!/StackGameDev/status/76667848621166592" />
  <row Id="29050" PostHistoryTypeId="2" PostId="13119" RevisionGUID="16a90c41-0b87-4732-9480-637c5aab6bfc" CreationDate="2011-06-03T15:13:46.847" UserId="6803" Text="I'm learning how to use VBOs and I'm following up on the [tutorial at the bottom of this page][1].&#xD;&#xA;&#xD;&#xA;So I went ahead and created a structure Vertex to hold vertex data.(coordinates and normals).&#xD;&#xA;&#xD;&#xA;    struct Vertex  {&#xD;&#xA;      GLfloat  x,  y,  z;&#xD;&#xA;      GLfloat nx, ny, nz;&#xD;&#xA;      GLfloat   r, g,  b;&#xD;&#xA;      GLfloat padding[7];&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For the moment I'm trying to draw a cube.So I created an array with 8 vertices.&#xD;&#xA;My question is how do I set the normals?&#xD;&#xA;&#xD;&#xA;When I used immediate rendering, I would just do a `glNormal3f` and proceeded to draw the vertices for that face.&#xD;&#xA;Now that the normals are defined on a per-vertex basis, and a vertex practically belongs to 3 faces, I'm somewhat confused as what I should do here.&#xD;&#xA;&#xD;&#xA;Have I taken a wrong approach on making that structure, or I am missing something else.&#xD;&#xA;&#xD;&#xA;I would also like to note that I want to make something more generic, so I don't want it to be limited to just drawing cubes.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;  [1]: http://www.opengl.org/wiki/Vertex_Buffer_Object#Inner_Workings" />
  <row Id="29051" PostHistoryTypeId="1" PostId="13119" RevisionGUID="16a90c41-0b87-4732-9480-637c5aab6bfc" CreationDate="2011-06-03T15:13:46.847" UserId="6803" Text="A little bit confused on how to set normals in this case." />
  <row Id="29052" PostHistoryTypeId="3" PostId="13119" RevisionGUID="16a90c41-0b87-4732-9480-637c5aab6bfc" CreationDate="2011-06-03T15:13:46.847" UserId="6803" Text="&lt;opengl&gt;&lt;normals&gt;&lt;normal-mapping&gt;" />
  <row Id="29053" PostHistoryTypeId="2" PostId="13120" RevisionGUID="cb3bd25e-338a-4065-b870-2db18be562a0" CreationDate="2011-06-03T15:14:07.263" UserId="7779" Text="A vector is an entity that has both a value and a direction. Examples of vectors in the real world and physics based games include speed, acceleration and momentum. Properties that have only values but no direction are called scalars and include location, mass, density and so forth. &#xD;&#xA;&#xD;&#xA;Vectors are needed for games that emulate physical properties that are vector like (as mentioned - speed, acceleration and so forth). The mathematics that are used for vector calculations are called [linear algebra][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_algebra" />
  <row Id="29054" PostHistoryTypeId="2" PostId="13121" RevisionGUID="957d710d-c28d-472e-bed6-f597c9ce017c" CreationDate="2011-06-03T15:14:30.137" UserId="7328" Text="I think this is because of some parameters which differ in two computers, for example they are not computing your scene with same speed (their delta_time values are not same), and simulation result is based on them. you either have to sync all these parameters in 2 computers or everyonce in a while send a snapshot of your whole scene, to sync results. the later is much more easier to implement ( at least I think so), be the former has much less network load. you can combine both ideas somehow and increase the time between sending snapshots to take benefit from both. for the diffrence in delta_times I can suggest the following code :&#xD;&#xA;&#xD;&#xA;	void update(float delta_time)&#xD;&#xA;	{&#xD;&#xA;		static float total_elapsed_time = 0;&#xD;&#xA;		total_elapsed_time += delta_time;&#xD;&#xA;		while (total_elapsed_time &gt; 1.0/30)&#xD;&#xA;		{&#xD;&#xA;			total_elapsed_time -= 1.0/30;&#xD;&#xA;			world.step(1.0/30,10,10);&#xD;&#xA;			other_updates(1/30);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;in this code you are somehow syncing all the timers between two computers. of course you can change 1/30 or other parameters as you like but they should be same in both computers (and also they should be somthing logical not much less than actual processing power)" />
  <row Id="29055" PostHistoryTypeId="5" PostId="13120" RevisionGUID="cb53d848-dd96-4eb8-8c86-bda045484b24" CreationDate="2011-06-03T15:33:38.377" UserId="7779" Comment="deleted 11 characters in body" Text="A vector is an entity that has both a value and a direction. Examples of vectors in the real world and physics based games include velocity and momentum. Properties that have only values but no direction are called scalars and include location, mass, density and so forth. &#xD;&#xA;&#xD;&#xA;Vectors are needed for games that emulate physical properties that are vector like (as mentioned - speed, acceleration and so forth). The mathematics that are used for vector calculations are called [linear algebra][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_algebra" />
  <row Id="29056" PostHistoryTypeId="5" PostId="13116" RevisionGUID="712c6011-ecdf-4a83-8232-ff58ef02549e" CreationDate="2011-06-03T15:36:22.870" UserId="3505" Comment="added 3 characters in body" Text="Anywhere where you have a number for each dimension to represent something, the collection of these numbers can be considered a vector. Position, velocity and acceleration are the prime examples of vectors. It can in some cases also be practical to represent direction of facing as a vector.&#xD;&#xA;&#xD;&#xA;For basic stuff it doesn't really matter whether or not you consider these numbers to be vectors, but if you want to do any kind of physics you ought to look into vector maths." />
  <row Id="29057" PostHistoryTypeId="2" PostId="13122" RevisionGUID="cc4996f0-e2ba-4536-a64d-ad7a89d8ddc5" CreationDate="2011-06-03T15:36:58.190" UserId="1839" Text="A 2D example are screen coordinates, it identifies a pixel on the screen and has an x- and an y-component [x, y] i.e. Left upper screen position [0, 0]" />
  <row Id="29058" PostHistoryTypeId="5" PostId="13094" RevisionGUID="3aaa63ef-7fe2-4e81-8b35-ed9c86571411" CreationDate="2011-06-03T15:40:11.230" UserId="4391" Comment="Removed cash offer" Text="I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with.&#xD;&#xA;&#xD;&#xA;The superhero bitmap is created on the fly by rotating the original bitmap between -90 and 90 degrees. As a result of the rotation, the bounding box is much, much larger than the non-rotated version. I have code to detect if the bounding box of the player hits any object, but visually this creates a problem when the object comes in contact with the skewed bounding box.&#xD;&#xA;&#xD;&#xA;I need a solution that computes pixel-perfect hit detection between the player and the object, not just the bounding boxes.&#xD;&#xA;&#xD;&#xA;I have been searching for the past 5 days for examples, tutorials, code snippets, or anything that could help me, but I haven't found a solution. The solution I'm looking for would be simply one function call similar to public boolean(obstacle theobject), where the obstacle's bitmap. coordinates, width, and height are returned with obstacle.getbitmap, obstacle.getx, obstacle.gety, obstacle.getwidth, and obstacle.getheight. The bitmap of the player is named rotatedbm and has global variables playerx, playery, playerh, and playerw.&#xD;&#xA;&#xD;&#xA;I do not wish to implement external game engines or libraries.&#xD;&#xA;&#xD;&#xA;I have read much on using int arrays with Bitmap.getPixels, and then comparing the arrays, but I cannot grasp the math behind comparing the arrays nor sorting out alpha values. I cannot afford to stay stuck on this one problem much long for the sake of development.&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="29059" PostHistoryTypeId="24" PostId="13094" RevisionGUID="3aaa63ef-7fe2-4e81-8b35-ed9c86571411" CreationDate="2011-06-03T15:40:11.230" Comment="Proposed by 4391 approved by 51 edit id of 473" />
  <row Id="29060" PostHistoryTypeId="5" PostId="12974" RevisionGUID="2b1aeabb-624d-447f-934a-676ec3ad3e06" CreationDate="2011-06-03T15:53:09.990" UserId="6831" Comment="Tried to clarify my problem/question" Text="For my masters thesis I'm going to develop a scalable multiplayer server for locationbased games. It's going to be a &quot;service oriented architecture&quot; e.g. one dedicated service for positions, one for the database, login etc. However 1..n frontend services for the clients to connect to. Scalability will be tested with simulated clients on some other machines. However, I'm still undecided on how my services will talk to each other. &#xD;&#xA;&#xD;&#xA;On the one hand, there is publish/subscribe. And even there are different ways to implement it, using Multicast or let each subscriber subscribe directly with the publisher. The good thing with pub/sub is, that each message will be sent to every service that is interested, e.g. the Logger-Service receives a position update as well as the position service. I can also have some &quot;shadow&quot; services that keep in sync in case the major services crashes. Depending on the implementation pub/sub feels like flooding my internal network with messages. And flooding is never a good idea.&#xD;&#xA;&#xD;&#xA;Then there is message passing. When the Frontend-Service receives a message, it finds out what type of message it is, finds the service that deals with this type and forwards the message to it. But there has to be a service discovery first, which requires some multicast or service directory.&#xD;&#xA;&#xD;&#xA;There are pros and cons for each type. In an [article][1] on high scalability I read that Playfish uses the message passing method. But using pub/sub sound appealing too. Maybe someone can tell me which way is better.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;I have to admit it isn't so clear what I'm asking.&#xD;&#xA;Imagine one frontend service receives a &quot;position update&quot; message from one of the clients. With a pub/sub system, I think about calling something like this: Network.publish(Topic,Message) or Network.publish(PositionUpdateType, Message).&#xD;&#xA;Using a message passing system I might call: Network.send(PositionManager, Message).&#xD;&#xA;I think pub/sub seems to be like &quot;fire and forget&quot;, where the message passing is some kind of &quot;direct&quot; connection. My question is: Which one is better suited for the job or should I even use a combination of both?&#xD;&#xA;&#xD;&#xA;  [1]: http://highscalability.com/blog/2010/9/21/playfishs-social-gaming-architecture-50-million-monthly-user.html" />
  <row Id="29061" PostHistoryTypeId="2" PostId="13123" RevisionGUID="523ed376-b606-4738-9a77-48e741459be8" CreationDate="2011-06-03T15:57:35.343" UserId="7532" Text="- Should i use Android canvas or open GL?&lt;br/&gt;&#xD;&#xA;OpenGL is faster, it makes use of GPU.&#xD;&#xA;- Is there a mechanism for drawing tiles, animations or should i just implement it my self using drawImage()?&lt;br/&gt;&#xD;&#xA;Take a look to this [tutorial][1]&#xD;&#xA;And check Android APIDemos graphics section. Also check LunarLander example.&lt;br/&gt;&#xD;&#xA;- Should i separate the wheel and the board into two different threads? &lt;br/&gt;&#xD;&#xA;Its not necesary, you should try to separate rendering from game logic, but one thread per object is not necesary because they will render at the same time.&#xD;&#xA;- Should i separate the wheel and the board in to 2 activities or put it in 1 activity and draw each part separatly?&lt;br/&gt;&#xD;&#xA;One Activity&#xD;&#xA;- What would be the best way to resize the wheel during gameplay? Scale the wheel image (but the animation has to be smooth - opengl vs canvas)?&lt;br/&gt;&#xD;&#xA;OpenGL, apply a matrix scale transformation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.droidnova.com/2d-sprite-animation-in-android,471.html" />
  <row Id="29062" PostHistoryTypeId="5" PostId="13122" RevisionGUID="52558455-c966-4bab-9db9-a1177dc08aa6" CreationDate="2011-06-03T16:01:09.253" UserId="1839" Comment="added 1371 characters in body; added 11 characters in body; added 61 characters in body" Text="A 2D example are screen coordinates, it identifies a pixel on the screen and has an x- and an y-component [x, y] i.e. Left upper screen position [0, 0]&#xD;&#xA;&#xD;&#xA;Another example: Imagine a text scrolling from right screen border to the left screen border. Now you need to define the velocity of the scrolling text in pixel per second, i.e. [-20, 0] which means the text scrolls 20 pixels to the left per second and never changes the height.&#xD;&#xA;&#xD;&#xA;Another more advanced example: Imagine a 2D game that is supposed to run on different screen resolutions 800x600, 1024x768 etc. This can easily be done by internally using a screen width from 0.0 to 1.0 and a height from 0.0 to 1.0 to decouple the game logic from the actual screen resolution. Now when you draw to the screen you just multiply the internal vector with the resolution vector:&#xD;&#xA;&#xD;&#xA;    screen_pos = internal_pos * screen_ressolution&#xD;&#xA;&#xD;&#xA;note, all 3 variables are 2D vectors here, they have an x- and an y-component, i.e. for this internal_pos [0.5, 0.25]:&#xD;&#xA;&#xD;&#xA;    [400, 150] = [0.5, 0.25] * [800, 600]&#xD;&#xA;&#xD;&#xA;So internal position [0.5, 0.25] is transformed to actual screen position [400, 150]&#xD;&#xA;&#xD;&#xA;This was the basic stuff. The real advantage of vectors is the application in [Linear Algebra][1] where you can use matrices to transform your vertices (rotate, scale, mirror etc), i.e. to easily rotate all your internal position by 90 degrees, or you have to swap the screen-y position 0 from top to the bottom of the screen, because i.e. a third party library that you use, uses this convention.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Linear_algebra" />
  <row Id="29063" PostHistoryTypeId="2" PostId="13124" RevisionGUID="894afcea-9a43-43a5-89fb-2ad1d1a60a48" CreationDate="2011-06-03T16:31:32.860" UserId="6588" Text="Here's a great explanation of vectors in game development on Wolfire Games blog:&#xD;&#xA;&#xD;&#xA;http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/" />
  <row Id="29064" PostHistoryTypeId="2" PostId="13125" RevisionGUID="72024c83-85c6-4da7-874d-f88a4a25e9c1" CreationDate="2011-06-03T16:51:51.490" UserId="5259" Text="&#xD;&#xA;**What are vectors?**&#xD;&#xA;&#xD;&#xA;Vectors are sets of coordinates of varying dimension. Each coordinate in a vector represents some absolute position in that direction of the space the vector is in.&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA; - A 1-D vector would be **{1}** . This could be, for example, a position at X = 1. Or a time t = 1.&#xD;&#xA; - A 2-D vector would be **{-4,3}**. This could be, for example, a position at -4 on the X-axis, and 3 on the Y-axis. It could also be the temperature (3 degrees) at a position (-4 meters) back on the X-axis.&#xD;&#xA; - A 3-D vector would be **{1,2,3}**. This could be a position in space 1 along the X-axis, 2 back on the Y-axis, and 3 up on the Z-axis. Or it could be 1 red, 2 green, and 3 blue in a color. Or, it could be an XY position (**{1,2}**) at some time T (**{3}**).&#xD;&#xA;&#xD;&#xA;Note that in all cases, we've assigned meaning to the vectors for our problem. While you will commonly find vectors being used for geometry in games, there is no reason you can't do something else with them.&#xD;&#xA;&#xD;&#xA;**Why do I use vectors?**&#xD;&#xA;&#xD;&#xA;First, you never *have* to use vectors. As long as you are keeping track of x and y, or whatever coordinates you care about, in some way you are fine.&#xD;&#xA;&#xD;&#xA;However, the advantage to using vectors is that they neatly represent things such as direction and position, and also have several mathematical operations defined on them that make your life easier.&#xD;&#xA;&#xD;&#xA;For a simple example of these, consider the *dot product*.&#xD;&#xA;&#xD;&#xA;Suppose you have a radar system in a top-down style game. Every enemy that appears in the sector of the radar (some pie-shaped wedge in 2D) should get a little red dot in your screen. So, you need to figure out what enemies are in your radar section.&#xD;&#xA;&#xD;&#xA;You could test if the enemies are inside a triangle. You could also test if the enemies are contained in the intersection of the two half-spaces of the planes/lines defining the two side of the radar sector.&#xD;&#xA;&#xD;&#xA;Or, you could just use a [dot product][1] to do the check. Here's how:&#xD;&#xA;&#xD;&#xA; 1. Create a vector going from the center of the radar out towards the &quot;front of the radar&quot;. Normalize it.&#xD;&#xA; 2. Create a vector going from the center of the radar out towards the object we want to check the radar visibility of. Normalize it.&#xD;&#xA; 3. Take the dot product of the two normalized vectors.&#xD;&#xA; 4. Take the arccosine of that product, and check if it is less than half the angle of the width of the radar. If it is, draw a blip.&#xD;&#xA;&#xD;&#xA;This is very handy, and also now lets you easily have radars that point in different directions (just change the forward vector) and have different widths (just change the radar width angle)--and you can reuse the same code for those cases too!&#xD;&#xA;&#xD;&#xA;**Why else do I use vectors?**&#xD;&#xA;&#xD;&#xA;If you are in 2D, perhaps the best way of achieving complex effects and motions (spinning, scaling, etc.) is to use a scene graph. A planet has an orbiting ship, the ship has an orbiting drone. The calculation for this without using vector math is really, really ugly.&#xD;&#xA;&#xD;&#xA;With vector math, we represent each as having a point and a 3x3 transform matrix. The planet uses its transform, the ship uses its transform and the planet's transform, and the drone uses its transform and the ship's transform and the planet's transform.&#xD;&#xA;&#xD;&#xA;When the planet moves, you change its transform, and the ship and drone automatically get positioned &quot;for free&quot;. Much cleaner code.&#xD;&#xA;&#xD;&#xA;**Still not convinced.**&#xD;&#xA;Vectors are also the native representation for position, geometry, and motion used by nearly all graphics libraries--and certainly OpenGL and DirectX. You aren't likely to get away without having to use them.&#xD;&#xA;&#xD;&#xA;**Conclusion**&#xD;&#xA;Vectors are a powerful tool for writing clear code that solves geometrical problems cleanly and elegantly.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dot_product#Geometric_interpretation" />
  <row Id="29065" PostHistoryTypeId="2" PostId="13126" RevisionGUID="546875d9-bb47-4d7a-b393-3be0ee9f4a6d" CreationDate="2011-06-03T17:09:26.973" UserId="51" Text="The answer for your &quot;cube&quot; problem is probably that you're probably going to need more than 8 vertices.  Make 4 for each face and set the normals for them to be the normal of the surface.  " />
  <row Id="29066" PostHistoryTypeId="2" PostId="13127" RevisionGUID="dd9c205d-9465-4e38-bad0-8f9d4aad37b0" CreationDate="2011-06-03T17:25:36.530" UserId="6588" Text="As you note, every vertex can only have one normal. That means that, depending on the lighting appearance you want, you may need to duplicate vertices. Specifically, if you want the edges of the cube to have a sharp boundary, then you will need to have separate vertices for each side. Make new vertices at the exact same position and use each duplicate for a different face.&#xD;&#xA;&#xD;&#xA;If however you want to keep the vertices shared between multiple faces and have the lighting smoothed out over the edge, then you should set the normal of the vertex to the average of the normals of its faces." />
  <row Id="29067" PostHistoryTypeId="25" PostId="13115" RevisionGUID="6d8ec31f-1006-40ed-9dd0-f13c7ab94469" CreationDate="2011-06-03T18:13:35.290" Comment="http://twitter.com/#!/StackGameDev/status/76713150292037633" />
  <row Id="29068" PostHistoryTypeId="5" PostId="13114" RevisionGUID="8588f233-75a5-47c8-aaae-66dbe642ed29" CreationDate="2011-06-03T18:24:47.280" UserId="7797" Comment="added 46 characters in body" Text="I am trying to make a simple sync between two box2d rooms, where you can drag boxes using the mouse. One player example here: http://code.google.com/p/box2dweb/&#xD;&#xA;&#xD;&#xA;So every time player clicks (and holds the mousedown) a box, I try send joint parameters to server, and server sends them to other clients. When mouseup occurs, I send command to delete joint.&#xD;&#xA;&#xD;&#xA;The problem is that sync breaks too often. Is my way radically wrong, or it just needs some tweaks?&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=eTN2Gwj6_Lc" />
  <row Id="29069" PostHistoryTypeId="5" PostId="13117" RevisionGUID="8f702a9f-415d-42d2-97e3-7acb99416d7b" CreationDate="2011-06-03T18:29:00.643" UserId="4391" Comment="deleted 3 characters in body" Text="1) Calculate the screen-space AABBs of the two potentially colliding objects. Note that this needs to be done after you've applied all rotations (there are very fast ways of obtaining AABBs from OBBs if you need to).&#xD;&#xA;You can represent AABBs in many different ways (e.g. vector2 and two floats - center and extents or two vector2s - bottom left, top right corner). I will assume the second representation - two vector2s for bottom left and top right corner.&#xD;&#xA;&#xD;&#xA;    struct AABB {&#xD;&#xA;        Vector2 bottomLeft;&#xD;&#xA;        Vector2 topRight;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;2) Do a basic AABB intersection test for an early out.&#xD;&#xA;&#xD;&#xA;3) Translate both AABBs to the coordinate space of the first one.&#xD;&#xA;&#xD;&#xA;    aabb2.bottomLeft -= aabb1.bottomLeft;  &#xD;&#xA;    aabb2.topRight -= aabb1.bottomLeft;  &#xD;&#xA;    aabb1.topRight -= aabb1.bottomLeft;  &#xD;&#xA;    aabb1.bottomLeft -= aabb1.bottomLeft;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;4) As the AABBs are in screen-space they (should) correspond directly to the bitmap representation of your objects on-screen. You get something like:&#xD;&#xA;&#xD;&#xA;![this][1]&#xD;&#xA;&#xD;&#xA;Now you have to iterate through the red pixels and compare the values from the two images you have. I am assuming you would wish to compare only the alpha values so you would need to mask them out from the ints you get from getPixels(). An example in pseudo C:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    int start_x = aabb2.bottomLeft.x;&#xD;&#xA;    int start_y = aabb2.topRight.y;&#xD;&#xA;    int end_x = aabb1.topRight.x;&#xD;&#xA;    int end_y = aabb1.bottomLeft.y;&#xD;&#xA;&#xD;&#xA;    int ALPHAMASK = 0xFF&lt;&lt;24; // assuming colors are represented as 0xAARRBBGG&#xD;&#xA;    Bitmap sprite1;&#xD;&#xA;    Bitmap sprite2;&#xD;&#xA;&#xD;&#xA;    for(int x = start_x; x &lt; end_x; x++) &#xD;&#xA;    for(int y = start_y; y &lt; end_y; y++) {  &#xD;&#xA;      alpha1 = sprite1.pixels[x+y*sprite1.width] &amp; ALPHAMASK;  &#xD;&#xA;      alpha2 = sprite2.pixels[(x+aabb2.bottomLeft.x)+((y+aabb2.topRight.y)*sprite2.width)] &amp; ALPHAMASK;&#xD;&#xA;      if(alpha1 != 0 &amp;&amp; alpha 2 != 0) {&#xD;&#xA;        // pixel is colliding&#xD;&#xA;        return; // you'd probably wish to return after a colliding pixel has been found&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://i.stack.imgur.com/1NntM.png" />
  <row Id="29070" PostHistoryTypeId="2" PostId="13128" RevisionGUID="98cf86d4-f091-41dd-b779-ad488b9c1b2a" CreationDate="2011-06-03T18:29:14.177" UserId="6825" Text="Since all the collision objects in your universe are axis-aligned, it might be easier to have separate lists of vertical lines and horizontal lines. And keep both lists sorted. Then it's relatively straightforward to figure out the first horizontal line that the actor actually hits; similarly for the first vertical line, and then all you have to worry about is which one of these two is actually first." />
  <row Id="29071" PostHistoryTypeId="2" PostId="13129" RevisionGUID="de29b159-2b13-4d20-85c9-3e7f4b1f375b" CreationDate="2011-06-03T18:50:19.220" UserId="1198" Text="I think @Gajet is on the right track; the other thing I think you may be missing, is that the server should define the state. Events should be sent to the server, who does world calculations and then updates each client.&#xD;&#xA;&#xD;&#xA;In other words, when a client clicks, it should send the data about that click to the server; the server then calculates where the box ends up, and sends that data to all clients. The client who actually performed the event can start &quot;predicting&quot; where the server is going to tell it to put the box.&#xD;&#xA;&#xD;&#xA;Put a different way, each client should tell the server &quot;the user just did X&quot; at the moment it knows that X happened. Then, the server goes about figuring out what that means, and updates all of the clients. As soon as the client finishes telling the server about X, it starts moving the box and when it gets the update from the server, it adjusts the box from its own calculation to the calculation received from the server." />
  <row Id="29072" PostHistoryTypeId="5" PostId="13114" RevisionGUID="aff56d83-ae81-4a7c-9186-9e31b30ada12" CreationDate="2011-06-03T19:13:40.403" UserId="7797" Comment="added 3 characters in body" Text="I am trying to make a simple sync between two box2d rooms, where you can drag boxes using the mouse.&#xD;&#xA;&#xD;&#xA;So every time player clicks (and holds the mousedown) a box, I try send joint parameters to server, and server sends them to other clients. When mouseup occurs, I send command to delete joint.&#xD;&#xA;&#xD;&#xA;The problem is that sync breaks too often. Is my way radically wrong, or it just needs some tweaks?&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=eTN2Gwj6_Lc&#xD;&#xA;&#xD;&#xA;Source code https://github.com/agentcooper/Box2d-networking" />
  <row Id="29074" PostHistoryTypeId="2" PostId="13131" RevisionGUID="774fbfce-8b1a-4c9c-a4a9-441b7e8d6b4e" CreationDate="2011-06-03T20:07:07.497" UserId="7661" Text="There are lots of choices to be made in the Mass Effect series, in fact every time there is a choice to be made there are options for doing the nice thing or the mean thing... To lie or not to lie ect...  The whole game is setup for kinda what you want really.  Though the games are hours long every few mins there is another choice to be made and you have to decide what kind of person you want to be.&#xD;&#xA;&#xD;&#xA;Its an RPG so theres plenty of achievement.  And lots of power issues going into the story as well." />
  <row Id="29075" PostHistoryTypeId="5" PostId="13018" RevisionGUID="f5707fa5-ab81-4ce7-925f-9987ddb59931" CreationDate="2011-06-03T20:07:17.170" UserId="1198" Comment="deleted 59 characters in body" Text="I'm new to developing Android games, but not new to developing mobile games (J2ME). I'm currently developing a board game, for a school project, with 2 things - a board and a spinning wheel (both are displayed at the same time). The user is able to zoom in/out and scroll around the board and spin the wheel. The wheel is also animated - resized during game. The board is build using tiles (2-4 different tiles on one image per board ) and the wheel is a image with numbers draw on it, using graphics.&#xD;&#xA;&#xD;&#xA;My questions is what is the best practice to achive the best performance of the game (game has to run on every possible Android version)?&#xD;&#xA;&#xD;&#xA;- Should i use Android canvas or open GL?&#xD;&#xA;- Is there a mechanism for drawing tiles, animations or should i just implement it my self using drawImage()?&#xD;&#xA;- Should i separate the wheel and the board into two different threads? Should i separate the wheel and the board in to 2 activities or put it in 1 activity and draw each part separatly?&#xD;&#xA;- What would be the best way to resize the wheel during gameplay? Scale the wheel image (but the animation has to be smooth - opengl vs canvas)?&#xD;&#xA;- What would be the best way to make the board zoomable - should i scale every image on the board when the zoom is detected or does android have some better way to do this?&#xD;&#xA;- What would be the best way to make the board scrollable - should i implement a Camera that displays just a piece of the board or does android have some better way to do this?" />
  <row Id="29076" PostHistoryTypeId="5" PostId="13131" RevisionGUID="0bd11f2f-8c5f-45e2-8e48-9d0bb74b0cb2" CreationDate="2011-06-03T20:17:42.367" UserId="7661" Comment="added 19 characters in body" Text="There are lots of choices to be made in the Mass Effect series, in fact every time there is a choice to be made there are options for doing the nice thing or the mean thing (and several more)... To lie or not to lie ect...  The whole game is setup for kinda what you want really.  Though the games are hours long every few mins there is another choice to be made and you have to decide what kind of person you want to be.&#xD;&#xA;&#xD;&#xA;Its an RPG so theres plenty of achievement.  And lots of power issues going into the story as well." />
  <row Id="29077" PostHistoryTypeId="2" PostId="13132" RevisionGUID="4cb0f1d6-1b31-4ba2-b480-7237908ecdb5" CreationDate="2011-06-03T20:50:37.880" UserId="7800" Text="I need the ability to order the drawing of sprites and fonts. Some sprites need to be drawn behind and some in front of text. My problem is that my sprites and fonts use separate Begin() End() calls so I can't simply order the draw calls.&#xD;&#xA;&#xD;&#xA;How is sorting generally done in DX9?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29078" PostHistoryTypeId="1" PostId="13132" RevisionGUID="4cb0f1d6-1b31-4ba2-b480-7237908ecdb5" CreationDate="2011-06-03T20:50:37.880" UserId="7800" Text="DX9 sprite / font draw depth order" />
  <row Id="29079" PostHistoryTypeId="3" PostId="13132" RevisionGUID="4cb0f1d6-1b31-4ba2-b480-7237908ecdb5" CreationDate="2011-06-03T20:50:37.880" UserId="7800" Text="&lt;sprites&gt;&lt;directx9&gt;&lt;fonts&gt;" />
  <row Id="29081" PostHistoryTypeId="25" PostId="13119" RevisionGUID="1c07d19c-7914-4779-b5a5-e6b5319eb234" CreationDate="2011-06-03T21:13:35.157" Comment="http://twitter.com/#!/StackGameDev/status/76758447571468288" />
  <row Id="29082" PostHistoryTypeId="2" PostId="13133" RevisionGUID="3439f7df-2247-4e24-b321-a623cade3219" CreationDate="2011-06-03T21:18:39.013" UserId="1258" Text="Pub/sub and message-based communication are not mutually exclusive. However, I think you're realizing that pub/sub abstracts the receiver, whereas message passing requires a recipient. They're both fire and forget unless structured otherwise (continuation-passing style comes to mind).&#xD;&#xA;&#xD;&#xA;All in all, the two are not so different, we might argue that publishing a message is nothing more than sending a &quot;publish&quot; message to the &quot;publisher&quot; actor, which in turns delivers the message to any recipient that sent a &quot;register&quot; message to the publisher in the first place.&#xD;&#xA;&#xD;&#xA;Anyway, to make it short: message-passing enables you to delay execution and share the load across workers. In our multicore age, this is handy, especially with task-stealing schedulers.&#xD;&#xA;&#xD;&#xA;Which language are you targeting? I might give more details." />
  <row Id="29083" PostHistoryTypeId="2" PostId="13134" RevisionGUID="4a1eb62d-601a-4d2c-b742-d73945fc18cc" CreationDate="2011-06-03T22:24:40.787" UserId="4947" Text="I have simple application. It has two threads. Each thread has it's own rendering context, but they share one VBO (this is working, I tested it). &#xD;&#xA;&#xD;&#xA;Now what I want: One thread is rendering some data from first half of VBO and the second thread is updating second part of VBO.&#xD;&#xA;&#xD;&#xA;When I don't update VBO, it's working fine.&#xD;&#xA;&#xD;&#xA;But I have some weird issues when updating. When I use glMapBuffer to update VBO (in second thread), it's most time rendering nothing (in first thread) - whole screen is clear (after glClear call). It looks like it can't touch data from VBO (this is understandable, because whole buffer is mapped and so it can be locked somehow). &#xD;&#xA;&#xD;&#xA;I tried to use glMapBufferRange, which has flag GL_MAP_UNSYNCHRONIZED_BIT. This should mean: don't wait and use VBO as you want, I will synchronize it by myself. Also - when I map only range of VBO and render data from other part, it shouldn't be waiting. But there are the same issues as with glMapBuffer.&#xD;&#xA;&#xD;&#xA;Can anybody explain why or help me, how to fix this? This is my first multi-thread OpenGL app :\" />
  <row Id="29084" PostHistoryTypeId="1" PostId="13134" RevisionGUID="4a1eb62d-601a-4d2c-b742-d73945fc18cc" CreationDate="2011-06-03T22:24:40.787" UserId="4947" Text="How to use multi-thread OpenGL application to update VBO and use it at the same time?" />
  <row Id="29085" PostHistoryTypeId="3" PostId="13134" RevisionGUID="4a1eb62d-601a-4d2c-b742-d73945fc18cc" CreationDate="2011-06-03T22:24:40.787" UserId="4947" Text="&lt;opengl&gt;&lt;multithreading&gt;&lt;vbo&gt;&lt;glmapbuffer&gt;&lt;glmapbufferrange&gt;" />
  <row Id="29086" PostHistoryTypeId="2" PostId="13135" RevisionGUID="426a956f-dab8-4803-ad35-ddd35581ef86" CreationDate="2011-06-03T22:25:12.533" UserId="7476" Text="Probably the most comprehensive tutorial style resource:&#xD;&#xA;&lt;br&gt;&#xD;&#xA;http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/  &#xD;&#xA;&lt;br&gt;&#xD;&#xA;See also these related articles from the same blog:&#xD;&#xA;&lt;br&gt;&#xD;&#xA;http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/&#xD;&#xA;&lt;br&gt;&#xD;&#xA;http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/" />
  <row Id="29087" PostHistoryTypeId="2" PostId="13136" RevisionGUID="d924c6a7-5f8b-410b-8d85-0a9f24ed7d9d" CreationDate="2011-06-03T22:47:19.240" UserId="4234" Text="Hey. I'm trying to create an enemy that travels at a speed `s` on screen but I'm having trouble with trying to make the speed vary in a smooth motion. Basically, I can get the enemy to move at a constant rate but at random intervals, I'd like it to speed up then slow back down to it's original speed, or slow down then speed up to it's original speed. I imagine I'd have to use a graph function of sorts, but I'm not great at maths so are there any suggestions on how this can be achieved? &#xD;&#xA;Feel free to let me know if my question is unclear.Thanks!" />
  <row Id="29088" PostHistoryTypeId="1" PostId="13136" RevisionGUID="d924c6a7-5f8b-410b-8d85-0a9f24ed7d9d" CreationDate="2011-06-03T22:47:19.240" UserId="4234" Text="Vary speed of enemy smoothly" />
  <row Id="29089" PostHistoryTypeId="3" PostId="13136" RevisionGUID="d924c6a7-5f8b-410b-8d85-0a9f24ed7d9d" CreationDate="2011-06-03T22:47:19.240" UserId="4234" Text="&lt;c#&gt;&lt;math&gt;&lt;animation&gt;&lt;graphs&gt;&lt;easing&gt;" />
  <row Id="29090" PostHistoryTypeId="5" PostId="13094" RevisionGUID="1b630257-6ef2-44ce-9a04-3c9e6fa1a1dd" CreationDate="2011-06-03T23:07:10.760" UserId="7792" Comment="added 941 characters in body" Text="I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with.&#xD;&#xA;&#xD;&#xA;The superhero bitmap is created on the fly by rotating the original bitmap between -90 and 90 degrees. As a result of the rotation, the bounding box is much, much larger than the non-rotated version. I have code to detect if the bounding box of the player hits any object, but visually this creates a problem when the object comes in contact with the skewed bounding box.&#xD;&#xA;&#xD;&#xA;I need a solution that computes pixel-perfect hit detection between the player and the object, not just the bounding boxes.&#xD;&#xA;&#xD;&#xA;I have been searching for the past 5 days for examples, tutorials, code snippets, or anything that could help me, but I haven't found a solution. The solution I'm looking for would be simply one function call similar to public boolean(obstacle theobject), where the obstacle's bitmap. coordinates, width, and height are returned with obstacle.getbitmap, obstacle.getx, obstacle.gety, obstacle.getwidth, and obstacle.getheight. The bitmap of the player is named rotatedbm and has global variables playerx, playery, playerh, and playerw.&#xD;&#xA;&#xD;&#xA;I do not wish to implement external game engines or libraries.&#xD;&#xA;&#xD;&#xA;I have read much on using int arrays with Bitmap.getPixels, and then comparing the arrays, but I cannot grasp the math behind comparing the arrays nor sorting out alpha values. I cannot afford to stay stuck on this one problem much long for the sake of development.&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;EDIT- This is my implementation of the pseudo code, but i probably got the vector-&gt;separate x/y values and the for for loops wrong.&#xD;&#xA;&#xD;&#xA;public boolean gethit(obstacle second){&#xD;&#xA;	int ox = second.obx;&#xD;&#xA;	int oy = second.oby;&#xD;&#xA;	int oh = second.obh;&#xD;&#xA;	int ow = second.obw;&#xD;&#xA;			&#xD;&#xA;	int AABBx, AABBy, AABBw, AABBh;&#xD;&#xA;			&#xD;&#xA;	int alpha1;&#xD;&#xA;	int alpha2;&#xD;&#xA;			&#xD;&#xA;	AABBw = playerw - ox - playerx;&#xD;&#xA;	AABBh = playerh - oy - playery;&#xD;&#xA;	AABBx = playerx + playerw - AABBw;&#xD;&#xA;	AABBy = playery + playery - AABBh;&#xD;&#xA;&#xD;&#xA;	int ALPHAMASK = 0xFF&lt;&lt;24; // assuming colors are represented as 0xAARRBBGG&#xD;&#xA;			&#xD;&#xA;	Bitmap sprite1 = rotatedbm;&#xD;&#xA;	Bitmap sprite2 = second.getgfx();&#xD;&#xA;&#xD;&#xA;	for(int x = 0; x &lt; Math.abs(AABBw); x++) &#xD;&#xA;	for(int y = 0; y &lt; Math.abs(AABBh); y++) {  &#xD;&#xA;		alpha1 = sprite1.getPixel(playerw-AABBw+x, playery-AABBh+y) &amp; ALPHAMASK;  &#xD;&#xA;		alpha2 = sprite2.getPixel(x, y) &amp; ALPHAMASK;&#xD;&#xA;&#xD;&#xA;		if(alpha1 != 0 &amp;&amp; alpha2 != 0) {&#xD;&#xA;			return true;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	return false;&#xD;&#xA;}" />
  <row Id="29091" PostHistoryTypeId="2" PostId="13137" RevisionGUID="c712a3b7-b5d2-431f-9ee1-4d5249f49363" CreationDate="2011-06-03T23:17:53.617" UserId="4360" Text="What I did for this same problem, javascript implementation Box2D networked system was to create a system in which the players send inputs to the server, and the server is the one running the simulation and sends world-updates to all players at discrete intervals.&#xD;&#xA;&#xD;&#xA;Repository:  &#xD;&#xA;https://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs&#xD;&#xA;&#xD;&#xA;You can see the box2d demo of this here:  &#xD;&#xA;http://vimeo.com/24149718" />
  <row Id="29092" PostHistoryTypeId="2" PostId="13138" RevisionGUID="b57853a1-b2d2-4195-82c9-904fc66f0ae4" CreationDate="2011-06-03T23:34:37.257" UserId="7679" Text="You might consider attributing an acceleration value with an enemy. So for each enemy you might associate a velocity(v) and acceleration(a) variable. This would handle the case of the enemy smoothly increasing speed from an initial velocity of zero. Of course you would then need to also associate a maximum speed for the enemy. As for slowing down, there are many ways one could handle this. Simply use the negative of the acceleration, or create your own deceleration variable. &#xD;&#xA;" />
  <row Id="29093" PostHistoryTypeId="2" PostId="13139" RevisionGUID="d083c974-ed0b-4515-b1ea-cba6d690ef3d" CreationDate="2011-06-03T23:52:17.623" UserId="7804" Text="You want the speed to increase smoothly from an initial value, let's call it `s1` and reach a final value, let's say that's `s2`.&#xD;&#xA;&#xD;&#xA;That sounds like a [Logisic Function][1] to me! A simple logistic function -- a smooth transition from 0 to 1 is `P(t) = 1 / (1 + e^(-t))`. It looks scary! Don't be afraid! Drawing it might make it clearer - you should get a flat-looking S-shape.&#xD;&#xA;&#xD;&#xA;Set up an increment for some variable, let's say `t`, from 0 to 1 and every step of the game, run something like&#xD;&#xA;&#xD;&#xA;    s = s1 + P(t) * (s2 - s1);&#xD;&#xA;&#xD;&#xA;until `s == s2`.&#xD;&#xA;&#xD;&#xA;See, when `t` reaches 1, `P(t)` will be 1 and the the expression on the right of the assignment will evaluate to exactly `s2`.&#xD;&#xA;&#xD;&#xA;The same code works if you want to reduce speed.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Logistic_function" />
  <row Id="29094" PostHistoryTypeId="25" PostId="13132" RevisionGUID="25ad9daa-a313-4960-9ff3-b05ef0ac86cf" CreationDate="2011-06-04T00:13:35.567" Comment="http://twitter.com/#!/StackGameDev/status/76803749007466496" />
  <row Id="29095" PostHistoryTypeId="5" PostId="13139" RevisionGUID="dd9e7ff4-472e-44ac-9fce-f0313b851ebb" CreationDate="2011-06-04T00:34:25.623" UserId="7804" Comment="ninja edit; hoping nobody notices I made really quite a gruesome mistake in the logic there" Text="You want the speed to increase smoothly from an initial value, let's call it `s1` and reach a final value, let's say that's `s2`.&#xD;&#xA;&#xD;&#xA;That sounds like a [Logisic Function][1] to me! A simple logistic function -- a smooth transition from 0 to 1 is `P(t) = 1 / (1 + e^(-t))`. It looks scary! Don't be afraid! Math is your friend! Drawing it might make it clearer -- you should get an S-shape with asymptotes (values of `P(x)` that the curve tends towards) of 0 and 1.&#xD;&#xA;&#xD;&#xA;Set up an increment for some variable, let's say `t`, from a small value (say -10; this will cause `P(x)` to approximate 0) to a large value (say 10; this will make `P(x)` approximate 1) and every step of the game, run something like&#xD;&#xA;&#xD;&#xA;    s = s1 + P(t) * (s2 - s1);&#xD;&#xA;&#xD;&#xA;until `t == 10` or whatever you chose the large value to be. At this point, you should also set `s = s2` since `s` will only be an *approximation* -- remember that the graph only *tends toward* 1, never quite reaching it.&#xD;&#xA;&#xD;&#xA;This is all based on the fact that when `t` reaches 1, `P(t)` will be roughly 1 and the the expression on the right of the assignment will evaluate to roughly `s2`.&#xD;&#xA;&#xD;&#xA;The same code works if you want to reduce speed.&#xD;&#xA;&#xD;&#xA;**EDIT:** I'd made a logical error with what to choose for `t`. Fixed.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Logistic_function" />
  <row Id="29096" PostHistoryTypeId="2" PostId="13140" RevisionGUID="e08e3133-2db0-4c82-98a1-97ce51a3cdee" CreationDate="2011-06-04T02:03:48.740" UserId="7661" Text="Very simply, anything with a position, or a direction, which is everywhere in a game they use vectors.  A vector is like a point&#xD;&#xA;&#xD;&#xA;    struct Point2&#xD;&#xA;    {&#xD;&#xA;    float x, y;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    struct Vector2&#xD;&#xA;    {&#xD;&#xA;    float x, y;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;However the difference really comes down to this.  A point is just a dot, while a vector is an Arrow.&#xD;&#xA;&#xD;&#xA;if you have &#xD;&#xA;&#xD;&#xA;    Point2.x = 5;&#xD;&#xA; &#xD;&#xA;    Point2.y = 10;&#xD;&#xA;&#xD;&#xA;your saying that I mean at this location x 5 and y 10.  &#xD;&#xA;&#xD;&#xA;however when you declare a vector...&#xD;&#xA;&#xD;&#xA;    Vector2.x = 5;&#xD;&#xA;&#xD;&#xA;    Vector2.y = 10; &#xD;&#xA;&#xD;&#xA;Your really saying im declaring an arrow from 0,0  to x 5 , y 10;&#xD;&#xA;&#xD;&#xA;you can even have the point from which your vector is pointing from be a point in space from anywhere, for example lets use a point and a vector to move our object we'll use a Point2 to store its location and a vector2 to move it.&#xD;&#xA;&#xD;&#xA;    point2.x = 10;&#xD;&#xA;&#xD;&#xA;    point2.y = 15;&#xD;&#xA;&#xD;&#xA;now you can use a vector to move this point, lets say we want to move this point up the x axis 10 units so you have&#xD;&#xA;&#xD;&#xA;    vector2.x = 10;&#xD;&#xA;&#xD;&#xA;    vector2.y = 0;&#xD;&#xA;&#xD;&#xA;    point2 += vector2;&#xD;&#xA;&#xD;&#xA;now point has moved where your vector arrow told it to.&#xD;&#xA;&#xD;&#xA;point now is&#xD;&#xA;&#xD;&#xA;    point2.x = 20;&#xD;&#xA;&#xD;&#xA;    point2.y = 15;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One last thing to note is sometimes a vector is used like a point and vice versa just because they hold the same type of data." />
  <row Id="29097" PostHistoryTypeId="2" PostId="13141" RevisionGUID="1712f864-e9a6-4524-af2b-dc67e2418d71" CreationDate="2011-06-04T02:06:56.210" UserId="6813" Text="You can also achieve this with the following steps:&#xD;&#xA;&#xD;&#xA;- 1/ Find the intersection points between the infinite lines passing though the four sides of the AABB and the infinite line passing through the entity position (pre-collision) which use the entity speed vector as slop. (You can either find a collision point or an undefined number, which corresponds to parallels or overlapping lines)&#xD;&#xA;&#xD;&#xA;- 2/ Once you know the intersection points (if they exist) you can search for those that are into the segment bounds.&#xD;&#xA;&#xD;&#xA;- 3/ Finally, if there is still multiple points on the list (the velocity vector can pass through multiple sides), you can search for the closest point from the entity origin using the magnitudes of the vector from the intersection to the entity origin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;More details using the following parameters as example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- 1/ Find intersections&#xD;&#xA; - a / Determine the implicit lines ( Ax + Bx = D ) using their parametric forms ( P(t) = Po + tD ).&#xD;&#xA;&gt; Point origin: Po = [posX, posY] &lt;br&gt;&#xD;&#xA;&gt; Direction vector: D = [speedX, speedY]&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; A = D.y = **speedY**&lt;br&gt;&#xD;&#xA;&gt; B = -D.x = **-speedX**&lt;br&gt;&#xD;&#xA;&gt; D = (Po.x * D.y) - (Po.y * D.x) = **(posX*speedY) - (posY*speedX)**&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; Ax + By = D &lt;====&gt; (speedY*x) + (-speedX*y) = (posX*speedY) - (posY*speedX)&#xD;&#xA;&#xD;&#xA;     **I used the entity point values to illustrate the method, but this is exactly the same method to determine the 4 side implicit lines** (Use Po = [x1,y1] and D = [ x2-x1 ; y2-y1 ] instead).&#xD;&#xA;&#xD;&#xA;  - b / Next, to find the intersection of two implicit lines we can solve the following system:&#xD;&#xA;&#xD;&#xA;     &gt; A1x + B1x = D1   &lt;== Line passing through the entity point with the speed vector as slop.&lt;br&gt;&#xD;&#xA;     &gt; A2x + B2x = D2   &lt;== One of the lines passing through the AABB sides.&#xD;&#xA;&#xD;&#xA;     which yields the following coordinates for the interception:&#xD;&#xA;&#xD;&#xA;     &gt; Interception **x** = ((B2*D1) - (B1*D2)) / ((A1*B2) - (A2*B1))&lt;br&gt;&#xD;&#xA;     &gt; Interception **y** = ((A1*D2) - (A2*D1)) / ((A1*B2) - (A2*B1))&#xD;&#xA;&#xD;&#xA;     If the denominator ((A1*B2) - (A2*B1)) equals zero, then the both lines are parallels or overlapping, otherwise you should find an intersection.&#xD;&#xA;&#xD;&#xA;- 2/ Test for the segment bounds. As this is straightforward to verify this, there is no needs for more details. &#xD;&#xA;&#xD;&#xA;- 3/ Search for the closest point. If there is still multiple points on the list, we can find which side is the closest to the entity origin point.&#xD;&#xA;  - a / Determine the vector going from the intersection point to the entity origin point&#xD;&#xA;  &gt; V = Po - Int = [Po.x - Int.x ; Po.y - Int.y ]&#xD;&#xA;  - b / Compute the vector magnitude&#xD;&#xA;  &gt; ||V|| = sqrt( V.x² + V.y² )&#xD;&#xA;  - c / find the smallest one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Note: this is probably not the most efficient way to do it, but as it still can helps some people i think it worth to be added." />
  <row Id="29098" PostHistoryTypeId="5" PostId="13141" RevisionGUID="4efbe6b9-56c2-4150-aaf9-fc41abe2a651" CreationDate="2011-06-04T02:13:42.327" UserId="6813" Comment="added 124 characters in body; added 12 characters in body" Text="You can also achieve this with the following steps:&#xD;&#xA;&#xD;&#xA;- 1/ Find the intersection points between the infinite lines passing though the four sides of the AABB and the infinite line passing through the entity position (pre-collision) which use the entity speed vector as slop. (You can either find a collision point or an undefined number, which corresponds to parallels or overlapping lines)&#xD;&#xA;&#xD;&#xA;- 2/ Once you know the intersection points (if they exist) you can search for those that are into the segment bounds.&#xD;&#xA;&#xD;&#xA;- 3/ Finally, if there is still multiple points on the list (the velocity vector can pass through multiple sides), you can search for the closest point from the entity origin using the magnitudes of the vector from the intersection to the entity origin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;More details using the following parameters as example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- 1/ Find intersections&#xD;&#xA; - a / Determine the implicit lines ( Ax + Bx = D ) using their parametric forms ( P(t) = Po + tD ).&#xD;&#xA;&gt; Point origin: Po = [posX, posY] &lt;br&gt;&#xD;&#xA;&gt; Direction vector: D = [speedX, speedY]&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **A** = D.y = **speedY**&lt;br&gt;&#xD;&#xA;&gt; **B** = -D.x = **-speedX**&lt;br&gt;&#xD;&#xA;&gt; **D** = (Po.x * D.y) - (Po.y * D.x) = **(posX*speedY) - (posY*speedX)**&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; Ax + By = D &lt;====&gt; (speedY*x) + (-speedX*y) = (posX*speedY) - (posY*speedX)&#xD;&#xA;&#xD;&#xA;     **I used the entity point values to illustrate the method, but this is exactly the same method to determine the 4 side implicit lines** (Use Po = [x1,y1] and D = [ x2-x1 ; y2-y1 ] instead).&#xD;&#xA;&#xD;&#xA;  - b / Next, to find the intersection of two implicit lines we can solve the following system:&#xD;&#xA;&#xD;&#xA;     &gt; A1x + B1x = D1   &lt;== Line passing through the entity point with the speed vector as slop.&lt;br&gt;&#xD;&#xA;     &gt; A2x + B2x = D2   &lt;== One of the lines passing through the AABB sides.&#xD;&#xA;&#xD;&#xA;     which yields the following coordinates for the interception:&#xD;&#xA;&#xD;&#xA;     &gt; Interception **x** = ((&lt;b&gt;B&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1) - (&lt;b&gt;B&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&lt;br&gt;&#xD;&#xA;     &gt; Interception **y** = ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&#xD;&#xA;&#xD;&#xA;     If the denominator ((A1*B2) - (A2*B1)) equals zero, then the both lines are parallels or overlapping, otherwise you should find an intersection.&#xD;&#xA;&#xD;&#xA;- 2/ Test for the segment bounds. As this is straightforward to verify this, there is no needs for more details. &#xD;&#xA;&#xD;&#xA;- 3/ Search for the closest point. If there is still multiple points on the list, we can find which side is the closest to the entity origin point.&#xD;&#xA;  - a / Determine the vector going from the intersection point to the entity origin point&#xD;&#xA;  &#xD;&#xA;     &gt; V = Po - Int = [Po.x - Int.x ; Po.y - Int.y ]&#xD;&#xA;  - b / Compute the vector magnitude&#xD;&#xA;&#xD;&#xA;     &gt; ||V|| = sqrt( V.x² + V.y² )&#xD;&#xA;  - c / find the smallest one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Note: this is probably not the most efficient way to do it, but as it still can helps some people i think it worth to be added." />
  <row Id="29099" PostHistoryTypeId="5" PostId="13141" RevisionGUID="dcc76697-d889-4e84-a57b-7f34b3f82e7d" CreationDate="2011-06-04T02:20:57.570" UserId="6813" Comment="deleted 5 characters in body" Text="You can also achieve this with the following steps:&#xD;&#xA;&#xD;&#xA;- 1/ Find the intersection points between the infinite lines passing though the four sides of the AABB and the infinite line passing through the entity position (pre-collision) which use the entity speed vector as slop. (You can either find a collision point or an undefined number, which corresponds to parallels or overlapping lines)&#xD;&#xA;&#xD;&#xA;- 2/ Once you know the intersection points (if they exist) you can search for those that are into the segment bounds.&#xD;&#xA;&#xD;&#xA;- 3/ Finally, if there is still multiple points on the list (the velocity vector can pass through multiple sides), you can search for the closest point from the entity origin using the magnitudes of the vector from the intersection to the entity origin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;More details using the following parameters as example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- 1/ Find intersections&#xD;&#xA; - a / Determine the implicit lines ( Ax + Bx = D ) using their parametric forms ( P(t) = Po + tD ).&#xD;&#xA;&gt; Point origin: Po = [posX, posY] &lt;br&gt;&#xD;&#xA;&gt; Direction vector: D = [speedX, speedY]&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **A** = D.y = **speedY**&lt;br&gt;&#xD;&#xA;&gt; **B** = -D.x = **-speedX**&lt;br&gt;&#xD;&#xA;&gt; **D** = (Po.x * D.y) - (Po.y * D.x) = **(posX*speedY) - (posY*speedX)**&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; Ax + By = D &lt;====&gt; (speedY*x) + (-speedX*y) = (posX*speedY) - (posY*speedX)&#xD;&#xA;&#xD;&#xA;     **I used the entity point values to illustrate the method, but this is exactly the same method to determine the 4 side implicit lines** (Use Po = [x1,y1] and D = [ x2-x1 ; y2-y1 ] instead).&#xD;&#xA;&#xD;&#xA;  - b / Next, to find the intersection of two implicit lines we can solve the following system:&#xD;&#xA;&#xD;&#xA;     &gt; A1x + B1x = D1   &lt;== Line passing through the entity point with the speed vector as slop.&lt;br&gt;&#xD;&#xA;     &gt; A2x + B2x = D2   &lt;== One of the lines passing through the AABB sides.&#xD;&#xA;&#xD;&#xA;     which yields the following coordinates for the interception:&#xD;&#xA;&#xD;&#xA;     &gt; Interception **x** = ((&lt;b&gt;B&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1) - (&lt;b&gt;B&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&lt;br&gt;&#xD;&#xA;     &gt; Interception **y** = ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&#xD;&#xA;&#xD;&#xA;     If the denominator ((A1*B2) - (A2*B1)) equals zero, then the both lines are parallels or overlapping, otherwise you should find an intersection.&#xD;&#xA;&#xD;&#xA;- 2/ Test for the segment bounds. As this is straightforward to verify, there is no needs for more details. &#xD;&#xA;&#xD;&#xA;- 3/ Search for the closest point. If there is still multiple points on the list, we can find which side is the closest to the entity origin point.&#xD;&#xA;  - a / Determine the vector going from the intersection point to the entity origin point&#xD;&#xA;  &#xD;&#xA;     &gt; V = Po - Int = [Po.x - Int.x ; Po.y - Int.y ]&#xD;&#xA;  - b / Compute the vector magnitude&#xD;&#xA;&#xD;&#xA;     &gt; ||V|| = sqrt( V.x² + V.y² )&#xD;&#xA;  - c / find the smallest one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Note: this is probably not the most efficient way to do it, but as it still can helps some people i think it worth to be added." />
  <row Id="29100" PostHistoryTypeId="2" PostId="13142" RevisionGUID="b8d65334-5d26-42f3-9048-fb1cfac90c5b" CreationDate="2011-06-04T02:56:41.157" UserId="4406" Text="From my estimates the MMO I'm designing can support 500000 concurrently connected non-idle users (and still be able to you know, do stuff) for about $1700/month in total hosting costs (includes bandwidth). No system admin is needed as the infrastructure auto-scales. Each additional 40000 users costs another $136/month. I've spent several months designing this backend and I'm curious how much other such systems cost. &#xD;&#xA;&#xD;&#xA;I should note that this does NOT include the cost of any assets used by the client game. Assume it's an iPhone game with bundled assets.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="29101" PostHistoryTypeId="1" PostId="13142" RevisionGUID="b8d65334-5d26-42f3-9048-fb1cfac90c5b" CreationDate="2011-06-04T02:56:41.157" UserId="4406" Text="What are some typical server/vps/colo hosting costs for deployed MMOs?" />
  <row Id="29102" PostHistoryTypeId="3" PostId="13142" RevisionGUID="b8d65334-5d26-42f3-9048-fb1cfac90c5b" CreationDate="2011-06-04T02:56:41.157" UserId="4406" Text="&lt;architecture&gt;&lt;mmo&gt;&lt;server&gt;&lt;costs&gt;" />
  <row Id="29103" PostHistoryTypeId="25" PostId="13136" RevisionGUID="52d787a4-be62-4b72-bf90-f9e45478124d" CreationDate="2011-06-04T03:13:36.353" Comment="http://twitter.com/#!/StackGameDev/status/76849049906577408" />
  <row Id="29104" PostHistoryTypeId="2" PostId="13143" RevisionGUID="9190aebb-424e-49c6-9763-028f0732a732" CreationDate="2011-06-04T03:30:52.017" UserId="7453" Text="Here is a function from our engine that I've used over the years. Maybe it can help. It will take aValue up to aMax by aAmount. If you then pass aAmount=0, it will then take it down to zero by aDrag amount... all smoothly. If you view the AstroBlaster video/demo on our site, it uses this routine to control the ship speed. Works great for us. It's Object Pascal but you should be able to adopt it easily to the language you use.&#xD;&#xA;&#xD;&#xA;    procedure TSvMath.SmoothMove(var aValue: Single; aAmount, aMax, aDrag: Single);&#xD;&#xA;    var&#xD;&#xA;      Amt: Single;&#xD;&#xA;    begin&#xD;&#xA;&#xD;&#xA;      Amt := aAmount;&#xD;&#xA;&#xD;&#xA;      if Amt &gt; 0 then&#xD;&#xA;      begin&#xD;&#xA;        aValue := aValue + Amt;&#xD;&#xA;        if aValue &gt; aMax then&#xD;&#xA;          aValue := aMax;&#xD;&#xA;      end else if Amt &lt; 0 then&#xD;&#xA;      begin&#xD;&#xA;        aValue := aValue + Amt;&#xD;&#xA;        if aValue &lt; -aMax then&#xD;&#xA;          aValue := -aMax;&#xD;&#xA;      end else&#xD;&#xA;      begin&#xD;&#xA;        if aValue &gt; 0 then&#xD;&#xA;        begin&#xD;&#xA;          aValue := aValue - aDrag;&#xD;&#xA;          if aValue &lt; 0 then&#xD;&#xA;            aValue := 0;&#xD;&#xA;        end else if aValue &lt; 0 then&#xD;&#xA;        begin&#xD;&#xA;          aValue := aValue + aDrag;&#xD;&#xA;          if aValue &gt; 0 then&#xD;&#xA;            aValue := 0;&#xD;&#xA;        end;&#xD;&#xA;      end;&#xD;&#xA;    end;&#xD;&#xA;" />
  <row Id="29105" PostHistoryTypeId="5" PostId="13141" RevisionGUID="7910861d-997f-41f8-b768-cb172d39a101" CreationDate="2011-06-04T04:46:43.573" UserId="6813" Comment="deleted 42 characters in body" Text="You can also achieve this with the following steps:&#xD;&#xA;&#xD;&#xA;- 1/ Find the intersection points between the infinite lines passing though the four sides of the AABB and the infinite line passing through the entity position (pre-collision) which use the entity speed vector as slop. (You can either find a collision point or an undefined number, which corresponds to parallels or overlapping lines)&#xD;&#xA;&#xD;&#xA;- 2/ Once you know the intersection points (if they exist) you can search for those that are into the segment bounds.&#xD;&#xA;&#xD;&#xA;- 3/ Finally, if there is still multiple points on the list (the velocity vector can pass through multiple sides), you can search for the closest point from the entity origin using the magnitudes of the vector from the intersection to the entity origin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;More details:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- 1/ Find intersections&#xD;&#xA; - a / Determine the implicit lines ( Ax + Bx = D ) using their parametric forms ( P(t) = Po + tD ).&#xD;&#xA;&gt; Point origin: Po = [posX, posY] &lt;br&gt;&#xD;&#xA;&gt; Direction vector: D = [speedX, speedY]&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **A** = D.y = **speedY**&lt;br&gt;&#xD;&#xA;&gt; **B** = -D.x = **-speedX**&lt;br&gt;&#xD;&#xA;&gt; **D** = (Po.x * D.y) - (Po.y * D.x) = **(posX*speedY) - (posY*speedX)**&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; Ax + By = D &lt;====&gt; (speedY*x) + (-speedX*y) = (posX*speedY) - (posY*speedX)&#xD;&#xA;&#xD;&#xA;     **I used the entity point values to illustrate the method, but this is exactly the same method to determine the 4 side implicit lines** (Use Po = [x1,y1] and D = [ x2-x1 ; y2-y1 ] instead).&#xD;&#xA;&#xD;&#xA;  - b / Next, to find the intersection of two implicit lines we can solve the following system:&#xD;&#xA;&#xD;&#xA;     &gt; A1x + B1x = D1   &lt;== Line passing through the entity point with the speed vector as slop.&lt;br&gt;&#xD;&#xA;     &gt; A2x + B2x = D2   &lt;== One of the lines passing through the AABB sides.&#xD;&#xA;&#xD;&#xA;     which yields the following coordinates for the interception:&#xD;&#xA;&#xD;&#xA;     &gt; Interception **x** = ((&lt;b&gt;B&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1) - (&lt;b&gt;B&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&lt;br&gt;&#xD;&#xA;     &gt; Interception **y** = ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&#xD;&#xA;&#xD;&#xA;     If the denominator ((A1*B2) - (A2*B1)) equals zero, then the both lines are parallels or overlapping, otherwise you should find an intersection.&#xD;&#xA;&#xD;&#xA;- 2/ Test for the segment bounds. As this is straightforward to verify, there is no needs for more details. &#xD;&#xA;&#xD;&#xA;- 3/ Search for the closest point. If there is still multiple points on the list, we can find which side is the closest to the entity origin point.&#xD;&#xA;  - a / Determine the vector going from the intersection point to the entity origin point&#xD;&#xA;  &#xD;&#xA;     &gt; V = Po - Int = [Po.x - Int.x ; Po.y - Int.y ]&#xD;&#xA;  - b / Compute the vector magnitude&#xD;&#xA;&#xD;&#xA;     &gt; ||V|| = sqrt( V.x² + V.y² )&#xD;&#xA;  - c / find the smallest one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Note: this is probably not the most efficient way to do it, but as it still can helps some people i think it worth to be added." />
  <row Id="29110" PostHistoryTypeId="2" PostId="13145" RevisionGUID="de81d2e1-5c3c-49dd-9be6-4973dc202af2" CreationDate="2011-06-04T05:39:51.777" UserId="5021" Text="One single pass way is to draw your font as 3D geometry (instead of billboards, see below) with depth writes on, and then draw your sprites, and the depth buffer will take care of the ordering issues for you.&#xD;&#xA;&#xD;&#xA;https://devel.nuclex.org/framework/wiki/VectorFonts" />
  <row Id="29111" PostHistoryTypeId="12" PostId="13145" RevisionGUID="3abf2ff9-7a0e-41ca-b63f-587e009d95f2" CreationDate="2011-06-04T05:40:05.147" UserId="5021" Text="[{&quot;Id&quot;:5021,&quot;DisplayName&quot;:&quot;Olhovsky&quot;}]" />
  <row Id="29112" PostHistoryTypeId="5" PostId="13145" RevisionGUID="5e6bd4bb-fd8e-44e5-9d05-b6fc3028b208" CreationDate="2011-06-04T05:46:26.327" UserId="5021" Comment="added 210 characters in body" Text="You say that you can't order your sprite drawing because they use separate begin/end calls.&#xD;&#xA;&#xD;&#xA;The solution is to separate them into as many begin/end blocks as you need in order to get the sprites into the sorted order that you need.&#xD;&#xA;&#xD;&#xA;If this is performance critical and you're trying to reduce state changes, then you can use the same shader to draw your fonts and sprites (fonts are also really just sprites). However, I'm guessing that this is premature optimization." />
  <row Id="29113" PostHistoryTypeId="13" PostId="13145" RevisionGUID="feb43e37-33bb-443c-9a47-f78d214f0fea" CreationDate="2011-06-04T05:46:30.087" UserId="5021" Text="[{&quot;Id&quot;:5021,&quot;DisplayName&quot;:&quot;Olhovsky&quot;}]" />
  <row Id="29114" PostHistoryTypeId="25" PostId="13134" RevisionGUID="6d688809-87bc-4e76-aa2b-559fb1c9f96d" CreationDate="2011-06-04T06:13:37.000" Comment="http://twitter.com/#!/StackGameDev/status/76894349924892672" />
  <row Id="29115" PostHistoryTypeId="2" PostId="13146" RevisionGUID="78abf01c-0986-40e5-8b4a-ac82d374bc4a" CreationDate="2011-06-04T06:52:46.403" UserId="4362" Text="When a ball is struck, how can we know in which direction both balls will go when ball is struck? I know the angle at which the ball strikes the other ball matters, but how can we calculate that angle?&#xD;&#xA;&#xD;&#xA;I've seen some of the videos to get started with elastic collision. Here is the link:&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=BZOkrCQRVWM&#xD;&#xA;&#xD;&#xA;But it assumes that we know the angle at which the ball strikes other ball. May be I am asking too basic question but I am not a Physics guy so I need to understand how to calculate the angle. &#xD;&#xA;&#xD;&#xA;Thanks in advance :)" />
  <row Id="29116" PostHistoryTypeId="1" PostId="13146" RevisionGUID="78abf01c-0986-40e5-8b4a-ac82d374bc4a" CreationDate="2011-06-04T06:52:46.403" UserId="4362" Text="How can I know in which direction 2 balls will go in billiard game?" />
  <row Id="29117" PostHistoryTypeId="3" PostId="13146" RevisionGUID="78abf01c-0986-40e5-8b4a-ac82d374bc4a" CreationDate="2011-06-04T06:52:46.403" UserId="4362" Text="&lt;collision-detection&gt;" />
  <row Id="29118" PostHistoryTypeId="2" PostId="13147" RevisionGUID="aeca2362-912d-47b1-b079-34bea51f62db" CreationDate="2011-06-04T07:18:46.880" UserId="51" Text="This should explain everything: &#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php" />
  <row Id="29119" PostHistoryTypeId="2" PostId="13148" RevisionGUID="93a552c4-e229-407e-82c4-4403bbff073a" CreationDate="2011-06-04T07:20:34.990" UserId="5021" Text="I've been playing around with [this tutorial/sample code][1] that demonstrates a simple implementation of light-pre-pass, which is a type of deferred lighting setup.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm in the process of implementing point light shadows, using dual-paraboloid shadow maps. I'm following this description of DPM:&#xD;&#xA;http://gamedevelop.eu/en/tutorials/dual-paraboloid-shadow-mapping.htm&#xD;&#xA;&#xD;&#xA;I am able to create the shadow maps, and they seem to look fine.&#xD;&#xA;&#xD;&#xA;I believe that the current problem I'm having is in my pixel shader that looks up a depth value in the shadow map when rendering point lights.&#xD;&#xA;&#xD;&#xA;Here is my point light shader code:&#xD;&#xA;http://olhovsky.com/shadow_mapping/PointLight.fx&#xD;&#xA;&#xD;&#xA;The pixel shader function of interest is `PointLightMeshShadowPS`.&#xD;&#xA;&#xD;&#xA;Does anyone see a glaring error in that function?&#xD;&#xA;&#xD;&#xA;Hopefully someone has tackled this problem before :)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jcoluna.wordpress.com/2011/04/27/xna-4-0-light-pre-pass-casting-shadows/&#xD;&#xA;  [2]: http://i.stack.imgur.com/kaDVD.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/fON2d.png&#xD;&#xA;&#xD;&#xA;As you can see in the images above, the post's shadows do not match up with the positions of the posts, so some transformation is wrong somewhere..." />
  <row Id="29120" PostHistoryTypeId="1" PostId="13148" RevisionGUID="93a552c4-e229-407e-82c4-4403bbff073a" CreationDate="2011-06-04T07:20:34.990" UserId="5021" Text="Dual paraboloid point light shadows in deferred lighting setup." />
  <row Id="29121" PostHistoryTypeId="3" PostId="13148" RevisionGUID="93a552c4-e229-407e-82c4-4403bbff073a" CreationDate="2011-06-04T07:20:34.990" UserId="5021" Text="&lt;shadow-mapping&gt;&lt;deferred-rendering&gt;&lt;light-pre-pass&gt;" />
  <row Id="29122" PostHistoryTypeId="2" PostId="13149" RevisionGUID="0e2bd4e6-e636-4558-b7d6-6dd35abd2409" CreationDate="2011-06-04T07:32:40.200" UserId="3794" Text="I will point you to the page, which is one of the best resources in NN-search (Nearest Neighbors). It contains slides and links to other resources. But KD-tree is probably best solution (but there are many variants):&#xD;&#xA;&#xD;&#xA;http://simsearch.yury.name/&#xD;&#xA;&#xD;&#xA;There are great on-topic slides from Data structures of computer graphics course on CTU in Prague, by Vlastimil Havran:&#xD;&#xA;&#xD;&#xA;http://dl.dropbox.com/u/5034466/dpg0904.pdf" />
  <row Id="29123" PostHistoryTypeId="5" PostId="13148" RevisionGUID="5b02ccd9-fd13-4af7-8eb9-bead5764b3c0" CreationDate="2011-06-04T07:56:02.450" UserId="5021" Comment="added 416 characters in body" Text="I've been playing around with [this tutorial/sample code][1] that demonstrates a simple implementation of light-pre-pass, which is a type of deferred lighting setup.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm in the process of implementing point light shadows, using dual-paraboloid shadow maps. I'm following this description of DPM:&#xD;&#xA;http://gamedevelop.eu/en/tutorials/dual-paraboloid-shadow-mapping.htm&#xD;&#xA;&#xD;&#xA;I am able to create the shadow maps, and they seem to look fine.&#xD;&#xA;&#xD;&#xA;I believe that the current problem I'm having is in my pixel shader that looks up a depth value in the shadow map when rendering point lights.&#xD;&#xA;&#xD;&#xA;Here is my point light shader code:&#xD;&#xA;http://olhovsky.com/shadow_mapping/PointLight.fx&#xD;&#xA;&#xD;&#xA;The pixel shader function of interest is `PointLightMeshShadowPS`.&#xD;&#xA;&#xD;&#xA;Does anyone see a glaring error in that function?&#xD;&#xA;&#xD;&#xA;Hopefully someone has tackled this problem before :)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As you can see in the images above, the post's shadows do not match up with the positions of the posts, so some transformation is wrong somewhere...&#xD;&#xA;&#xD;&#xA;This is what it looks like when the point light is very close to the ground (almost touching the ground).&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;As the point light moves closer to the ground, the shadows come together and touch along the line where the two shadow maps meet (that is, along the plane where the light camera was flipped to capture the two shadow maps).&#xD;&#xA;&#xD;&#xA;  [1]: http://jcoluna.wordpress.com/2011/04/27/xna-4-0-light-pre-pass-casting-shadows/&#xD;&#xA;  [2]: http://i.stack.imgur.com/kaDVD.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/fON2d.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/o4hqS.png" />
  <row Id="29124" PostHistoryTypeId="6" PostId="13142" RevisionGUID="e32428fb-d741-4aeb-8680-392b0d6286a9" CreationDate="2011-06-04T08:46:09.643" UserId="1156" Comment="edited tags" Text="&lt;mmo&gt;&lt;server&gt;&lt;costs&gt;" />
  <row Id="29125" PostHistoryTypeId="25" PostId="13148" RevisionGUID="a43b5ce4-c205-489c-96b0-85f5b4959917" CreationDate="2011-06-04T09:13:37.127" Comment="http://twitter.com/#!/StackGameDev/status/76939650962432000" />
  <row Id="29126" PostHistoryTypeId="2" PostId="13150" RevisionGUID="01f8df6a-ae84-4ad8-9d8f-09c0c0997535" CreationDate="2011-06-04T09:28:20.873" UserId="1156" Text="I am using an event-based input handling system with events and delegates. An example:&#xD;&#xA;&#xD;&#xA;    InputHander.AddEvent(Keys.LeftArrow, player.MoveLeft); //Very simplified code&#xD;&#xA;&#xD;&#xA;However, I started wondering about how to deal with 'nested' input. For example in Half-Life 2 (or any Source game, really), you can pick up items with `E`. When you've picked up an item, you cannot fire with `Left Mouse`, but instead you throw the object. You can still jump with `Space`.&#xD;&#xA;&#xD;&#xA;(I am saying nested input is where you press a certain key, and the actions you can do change. Not a menu.)&#xD;&#xA;&#xD;&#xA;The three cases are:&#xD;&#xA;&#xD;&#xA; - Being able to do the same action as before (like jumping)&#xD;&#xA; - Not being able to do the same action (like firing)&#xD;&#xA; - Doing a different action entirely (like in NetHack, where pressing the open door key means you do not move, but select a direction to open the door in)&#xD;&#xA;&#xD;&#xA;My original idea was to just change it after the input had been received:&#xD;&#xA;&#xD;&#xA;    Register input 'A' to function 'Activate Secret Cloak Mode'&#xD;&#xA;&#xD;&#xA;    In 'Secret Cloak Mode' function:&#xD;&#xA;    Unregister input 'Fire'&#xD;&#xA;    Unregister input 'Sprint'&#xD;&#xA;    ...&#xD;&#xA;    Register input 'Uncloak'&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;This suffers from large amounts of coupling, repetitive code, and other bad design signs.&#xD;&#xA;&#xD;&#xA;I guess the other option is to maintain some kind of input state system - perhaps another delegate on the register function to refactor out those numerous register/deregister into a cleaner place (with some kind of stack on the input system) or maybe arrays of what to keep and what not to.&#xD;&#xA;&#xD;&#xA;I'm sure someone here must've encountered this problem. How have you solved it?&#xD;&#xA;&#xD;&#xA;**tl;dr How can I deal with specific input received after another specific input in an event system?**" />
  <row Id="29127" PostHistoryTypeId="1" PostId="13150" RevisionGUID="01f8df6a-ae84-4ad8-9d8f-09c0c0997535" CreationDate="2011-06-04T09:28:20.873" UserId="1156" Text="Nested input in an event-driven system" />
  <row Id="29128" PostHistoryTypeId="3" PostId="13150" RevisionGUID="01f8df6a-ae84-4ad8-9d8f-09c0c0997535" CreationDate="2011-06-04T09:28:20.873" UserId="1156" Text="&lt;c#&gt;&lt;architecture&gt;&lt;input&gt;&lt;events&gt;" />
  <row Id="29129" PostHistoryTypeId="2" PostId="13151" RevisionGUID="a78ef9dc-b66f-40c9-a746-6a8bdc9eb525" CreationDate="2011-06-04T09:39:55.363" UserId="1258" Text="two options: if &quot;nested input&quot; cases are at most three, four, I'd just use flags. &quot;Holding an object? Can't fire.&quot; Anything else is overengineering it.&#xD;&#xA;&#xD;&#xA;Otherwise, you can keep a per-input-key stack of event handlers.&#xD;&#xA;&#xD;&#xA;    Actions.Empty = () =&gt; { return; };&#xD;&#xA;    if(IsPressed(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;    } else if (IsReleased(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Pop();&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;        keyEventHandlers[Keys.Space].Pop();        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    while(GetNextKeyInBuffer(out key)) {&#xD;&#xA;       keyEventHandlers[key].Invoke(); // we invoke the only last event handler&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Or something to this effect :)" />
  <row Id="29130" PostHistoryTypeId="5" PostId="13133" RevisionGUID="0c5a7708-421d-498a-b0c3-98276ea87ac9" CreationDate="2011-06-04T09:41:15.940" UserId="1258" Comment="added 66 characters in body" Text="Pub/sub and message-based communication are not mutually exclusive. However, I think you're realizing that pub/sub abstracts the receiver, whereas message passing requires a recipient. They're both fire and forget unless structured otherwise (continuation-passing style comes to mind).&#xD;&#xA;&#xD;&#xA;All in all, the two are not so different, we might argue that publishing a message is nothing more than sending a &quot;publish&quot; message to the &quot;publisher&quot; actor, which in turns delivers the message to any recipient that sent a &quot;register&quot; message to the publisher in the first place.&#xD;&#xA;&#xD;&#xA;Anyway, to make it short: message-passing enables you to delay execution and share the load across workers. In our multicore age, this is handy, especially with task-stealing schedulers.&#xD;&#xA;&#xD;&#xA;Which language are you targeting? I might give more details.&#xD;&#xA;&#xD;&#xA;Edit: I just noticed the &quot;Java&quot; tag. I know nothing of Java :)" />
  <row Id="29131" PostHistoryTypeId="2" PostId="13152" RevisionGUID="e01b6172-f699-4b86-ab72-8e9c58517562" CreationDate="2011-06-04T10:33:11.630" UserId="7728" Text="What you're talking about here is commonly called a &quot;lerp&quot;, short for interpolation.  You can find a lot of different implementations and specifics about this sort of operation on Google by searching for &quot;lerp&quot;, but here's a very basic one:&#xD;&#xA;&#xD;&#xA;    T Interpolate(float fraction, T startingValue, T endingValue)&#xD;&#xA;    {&#xD;&#xA;      T delta = endingValue - startingValue;&#xD;&#xA;      return startingValue + (delta * fraction);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In this, &quot;fraction&quot; should be a value between zero and one (inclusive), and the type T is anything that supports +, -, and * operators (So floats, vectors, etc).  In your case, you'd use one with 'float' instead of T, but this same approach works for interpolating lots of other mathematical types, so this will almost certainly be useful to you again in other situations in the future.  &#xD;&#xA;&#xD;&#xA;The simplest way to get your speed to increase smoothly will be to simply interpolate from the object's current speed toward its target speed each frame, using a low *fraction* value for the interpolation.  For example, like this:&#xD;&#xA;&#xD;&#xA;    float speedFraction = 0.1f;&#xD;&#xA;    object-&gt;SetSpeed( Interpolate( speedFraction, object-&gt;GetCurrentSpeed(), object-&gt;GetDesiredSpeed() );&#xD;&#xA;&#xD;&#xA;This will give what is referred to as a &quot;slam in, ease out&quot; curve;  the object will get a sudden burst of acceleration when it changes its desired speed, but that acceleration will taper off as it approaches that destination speed.  If you make *speedFraction* higher, the object will approach its final speed faster.  Lower, and it will reach that speed slower.&#xD;&#xA;&#xD;&#xA;This is almost certainly all that you'll need to have your character change speeds smoothly enough for you.  But be aware that this will produce different behaviours if it's being done 30 times per second than if it's being done 60 times per second.&#xD;&#xA;&#xD;&#xA;Advanced:  If you do want the object to accelerate even more smoothly than this (that is, to start accelerating slowly, instead of quickly), or if it's important that the object actually reaches that final speed (rather than approaching that speed asymptotically), or if you want to make sure that the acceleration works the same no matter what frame rate you're running at, then you can use that same interpolation function differently.&#xD;&#xA;&#xD;&#xA;If you keep track of when the object began to accelerate, and know how long you want the acceleration to take, then you can calculate:&#xD;&#xA;&#xD;&#xA;    if ( object-&gt;IsSpeedingUp() )&#xD;&#xA;    {&#xD;&#xA;      float fraction = (timeNow - object-&gt;GetAccelerationStartTime() ) / object-&gt;GetFullAccelerationDuration();&#xD;&#xA;      float easeInEaseOutFraction = 3*fraction*fraction - 2*fraction*fraction*fraction;&#xD;&#xA;      object-&gt;SetSpeed( Interpolate( easeInEaseOutFraction, object-&gt;GetSlowSpeed(), object-&gt;GetFastSpeed() );&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;In this, *easeInEaseOutFraction* is using a hermite interpolator on the value &quot;fraction&quot;, to convert it from a linear transition from zero to one, into a very smooth curve over that same range.  And since it still varies only between zero and one, that means that we can pass it into the same Interpolation function we've already been using, to make the interpolation extremely smooth.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You may find that you prefer this smoother behaviour over the simpler approach that I gave earlier.  Or you may find that it makes no difference in your case.  My advice is to do the simpler version first, and stick with it if it's good enough for your purposes.&#xD;&#xA;&#xD;&#xA;If you do go with the more advanced variation, just be aware that it's critical that the &quot;fraction&quot; value remains between zero and one.  If you're using interpolation in this way (by passing in a variable &quot;fraction&quot; value that changes over time), then you must stop interpolating once the object has actually reached its target speed, or else you'll get unexpected behaviour as &quot;fraction&quot; exceeds 1.&#xD;&#xA;" />
  <row Id="29132" PostHistoryTypeId="5" PostId="13133" RevisionGUID="ae1b55f1-22b1-4f14-8862-d7dd9f8a71f8" CreationDate="2011-06-04T11:55:47.347" UserId="1258" Comment="added 1899 characters in body" Text="Pub/sub and message-based communication are not mutually exclusive. However, I think you're realizing that pub/sub abstracts the receiver, whereas message passing requires a recipient. They're both fire and forget unless structured otherwise (continuation-passing style comes to mind).&#xD;&#xA;&#xD;&#xA;All in all, the two are not so different, we might argue that publishing a message is nothing more than sending a &quot;publish&quot; message to the &quot;publisher&quot; actor, which in turns delivers the message to any recipient that sent a &quot;register&quot; message to the publisher in the first place.&#xD;&#xA;&#xD;&#xA;Anyway, to make it short: message-passing enables you to delay execution and share the load across workers. In our multicore age, this is handy, especially with task-stealing schedulers.&#xD;&#xA;&#xD;&#xA;Which language are you targeting? I might give more details.&#xD;&#xA;&#xD;&#xA;Edit: I just noticed the &quot;Java&quot; tag. I know nothing of Java :)&#xD;&#xA;&#xD;&#xA;Edit 2:&#xD;&#xA;&#xD;&#xA;Sharing the workload across services is just the beginning. You have to find a way to max out these services, and when the services are maxed out, you also need strategies to spawn new services and share the workload again. If you're using one server to the max, you can't just spawn a new process, but you need another physical server, ready to crunch numbers until the next load peak. And even then, you have to be careful about the strategies you use to spawn new workers. &#xD;&#xA;&#xD;&#xA;Intra-server:&#xD;&#xA;&#xD;&#xA; 1. A main server broadcasts a discovery message.&#xD;&#xA; 2. Server 1 replies, says it can deal with logging&#xD;&#xA; 3. Server 2 replies, says it can handle player movement etc.&#xD;&#xA; 4. Server 3 replies, says it can handle trades and chat.&#xD;&#xA; 5. The main server will acknowledge the servers and subscribe them to specific service-dependant topics.&#xD;&#xA; 6. However, also server 1, 2, 3 will have to keep a list of subscribers, unless it's fine to let the main server do all the publishing.&#xD;&#xA; 7. Every n milliseconds, servers will have to show they're still alive by sending a message to the main server.&#xD;&#xA; 8. Intra-server and foreign events (from clients) will be dispatched to the correct subscribers.&#xD;&#xA; 9. At some point, the volume of events will cap the processing power of one or more servers, requiring more workers.&#xD;&#xA; 10. This is where things become messy; existing services will have to yield responsibility of a part of their processing to services on a different machine. Also, workload sharing criteria may be dynamic (you thought having workers per world region was enough, but turns out 90% of players is in the same city, in the very same region, nullifying your strategy).&#xD;&#xA;&#xD;&#xA;As for maxing out a service, you really want to divide your work in tasks and, while order matters, let a task-stealing scheduler process them as fast as they come.&#xD;&#xA;&#xD;&#xA;It's a wall of text already. Questions? Comments?" />
  <row Id="29134" PostHistoryTypeId="25" PostId="13142" RevisionGUID="e04cde12-a523-4d2a-a895-fd00842ca0f3" CreationDate="2011-06-04T12:13:37.537" Comment="http://twitter.com/#!/StackGameDev/status/76984950494199808" />
  <row Id="29135" PostHistoryTypeId="5" PostId="13151" RevisionGUID="0b6558e5-68f1-4d53-bcf6-a8978a2b56a9" CreationDate="2011-06-04T13:08:49.550" UserId="1258" Comment="typo" Text="two options: if &quot;nested input&quot; cases are at most three, four, I'd just use flags. &quot;Holding an object? Can't fire.&quot; Anything else is overengineering it.&#xD;&#xA;&#xD;&#xA;Otherwise, you can keep a per-input-key stack of event handlers.&#xD;&#xA;&#xD;&#xA;    Actions.Empty = () =&gt; { return; };&#xD;&#xA;    if(IsPressed(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;    } else if (IsReleased(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Pop();&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;        keyEventHandlers[Keys.Space].Pop();        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    while(GetNextKeyInBuffer(out key)) {&#xD;&#xA;       keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Or something to this effect :)" />
  <row Id="29136" PostHistoryTypeId="2" PostId="13154" RevisionGUID="ee9e5475-c63b-4726-8097-24b8e6f64dfb" CreationDate="2011-06-04T13:12:54.217" UserId="7663" Text="I'm not writing the exact code in any particular language. I'm giving you the idea.&#xD;&#xA;&#xD;&#xA;**1) Map your key actions to your events.**&#xD;&#xA;&#xD;&#xA;(Keys.LeftMouseButton, left_click_event), (Keys.E, e_key_event), (Keys.Space, space_key_event)&#xD;&#xA;&#xD;&#xA;**2) Assign/Modify your events as given below**&#xD;&#xA;&#xD;&#xA;    def left_click_event = fire();&#xD;&#xA;    def e_key_event = pick_item();&#xD;&#xA;    def space_key_event = jump();&#xD;&#xA;&#xD;&#xA;    pick_item() {&#xD;&#xA;     .....&#xD;&#xA;     left_click_action = throw_object();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    throw_object() {&#xD;&#xA;     ....&#xD;&#xA;     left_click_action = fire();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fire() {&#xD;&#xA;     ....&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    jump() {&#xD;&#xA;     ....&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Let your jump action remain decoupled with other events like jump and fire. &#xD;&#xA;&#xD;&#xA;Avoid if..else.. conditional checks here as it'd lead to unmanageable code." />
  <row Id="29137" PostHistoryTypeId="2" PostId="13155" RevisionGUID="b0d4309b-461c-47ee-bbaa-1ec38fa4f44f" CreationDate="2011-06-04T13:36:54.410" UserId="7809" Text="What is the best way of storing the character's inventory (consisting of each item having a value for type and quantity). The only methods I can think of is to use the &quot;text&quot; type of field then parse the value from that whenever the inventory is loaded. Is there a better method or data structure?" />
  <row Id="29138" PostHistoryTypeId="1" PostId="13155" RevisionGUID="b0d4309b-461c-47ee-bbaa-1ec38fa4f44f" CreationDate="2011-06-04T13:36:54.410" UserId="7809" Text="MySQL - Storing Character Inventory" />
  <row Id="29139" PostHistoryTypeId="3" PostId="13155" RevisionGUID="b0d4309b-461c-47ee-bbaa-1ec38fa4f44f" CreationDate="2011-06-04T13:36:54.410" UserId="7809" Text="&lt;character&gt;&lt;databases&gt;&lt;storage&gt;" />
  <row Id="29140" PostHistoryTypeId="2" PostId="13156" RevisionGUID="fc969c80-1f7f-47f3-8c1c-2e703bad0bc9" CreationDate="2011-06-04T13:39:59.153" UserId="545" Text="There's too many undefined or barely defined terms there.  MMO is such a loaded term.  Without knowing how much CPU processing a user needs, how much backend storage a user needs, etc... It's impossible to say.&#xD;&#xA;&#xD;&#xA;I mean just at a bare minimum assuming the hardware can support it, you would need 8 front end servers just to support 500,000 connections.  (TCP max of 65,536 ports per VPS rounded down to 65k.)  I assume you've read about the C10k problem (The difficulty in scaling a single server to 10,000 connections, and 8 front end servers assumes you're at 6 times that rate.)  If not take a look at http://www.kegel.com/c10k.html &#xD;&#xA;&#xD;&#xA;However, the metric I've used when it comes to MMO buildout was to assume 1 'CPU' per 100 connected users.  This worked out to be a good average from 2001-2005 but I haven't developed an MMO since.  This 1 CPU basically just encapsulates the cost of gameplay servers, front end servers, database servers, content distribution servers etc...  It worked whether it was a blade server with 10 CPUs or old dual Pentium Pros.  Of course as an added example those build-outs usually assumed one full time Network Operations person per 5,000 connected users.  (Both obviously scaling with the peak-tie ratio.)&#xD;&#xA;&#xD;&#xA;I'd advise getting to your scalability tests sooner than later because I think it's going to wake you up to some problems in your design.  Get 50,000 people on 1/10th the hardware you expect to run in production and see where the seems come apart.  (Ideally do that 12-18 months before you expect to ship.)" />
  <row Id="29141" PostHistoryTypeId="6" PostId="13155" RevisionGUID="db4faf06-2c67-48dc-90e9-b571aca04caf" CreationDate="2011-06-04T14:02:51.157" UserId="1156" Comment="edited tags" Text="&lt;character&gt;&lt;storage&gt;&lt;databases&gt;&lt;sql&gt;" />
  <row Id="29142" PostHistoryTypeId="2" PostId="13157" RevisionGUID="38f63b66-1152-4a88-af1a-e3946113c7de" CreationDate="2011-06-04T14:48:57.597" UserId="545" Text="Read up on standard database design.  Specifically normalized forms.  An approach would be to have 3 tables:&#xD;&#xA;&#xD;&#xA;character having a character_id and other data&#xD;&#xA;&#xD;&#xA;items having an item_id and other data (names, weight etc...)&#xD;&#xA;&#xD;&#xA;inventory having character_id, item_id, quantity.&#xD;&#xA;&#xD;&#xA;A player's inventory could be expressed as &quot;SELECT items.name FROM items, inventory WHERE inventory.character_id = 'THECHARSID'&quot;  Of course based on your other questions I'd much more likely suggest using an ORM that handles this for you.  Look at Relationships, and backrefs in something like SQLAlchemy.&#xD;&#xA;&#xD;&#xA;If you need the concept of inventory 'slots' then that's another column in the inventory table.  (IE: Character 32423 has an item of type 832 in slot 0 (The head slot))  If each item has unique stats (Durability/upgrades) Then you can do something like the item table contains the item specific data, and has a link to an item_base column that defines the base stats that all items of that type have in common." />
  <row Id="29143" PostHistoryTypeId="25" PostId="13155" RevisionGUID="e0c96ff1-fc33-4a96-811e-93a4043831ba" CreationDate="2011-06-04T15:13:37.417" Comment="http://twitter.com/#!/StackGameDev/status/77030247735889920" />
  <row Id="29144" PostHistoryTypeId="2" PostId="13158" RevisionGUID="767a95d5-8e65-4d0f-9c56-e2b54d877bd9" CreationDate="2011-06-04T15:29:48.027" UserId="7815" Text="With PIX you can debug pixels isolated, maybe you find the error in this way.&#xD;&#xA;FOV or a projection error is a hot hint." />
  <row Id="29145" PostHistoryTypeId="2" PostId="13159" RevisionGUID="e6bf0535-e4fd-46bc-b289-e4f8f2c4edfc" CreationDate="2011-06-04T15:42:15.413" UserId="7811" Text="I'm using `gluNurbsCurve` to draw some curves with some control points. I've got the basic setup as described in the red book working correctly and I'm trying to expand on it.  &#xD;&#xA;This sample looks like this:&#xD;&#xA;&#xD;&#xA;    float knots[8] = {0,0,0,0,1,1,1,1};&#xD;&#xA;    float pnts[4][3] = { {...},{...},{...},{...} };&#xD;&#xA;    GLUnurbsObj *m = gluNewNurbsRenderer();&#xD;&#xA;    gluBeginCurve(n);&#xD;&#xA;    gluNurbsCurve(n, 8, knots, 3, pnts, 4, GL_MAP1_VERTEX_3)&#xD;&#xA;    gluEndCurve(n);&#xD;&#xA;&#xD;&#xA;One thing I was wondering about is the meaning of the knots data. How does it affect the result? What other options can I experiment there?  &#xD;&#xA;For some reason I could not find any tutorial which properly explains this." />
  <row Id="29146" PostHistoryTypeId="1" PostId="13159" RevisionGUID="e6bf0535-e4fd-46bc-b289-e4f8f2c4edfc" CreationDate="2011-06-04T15:42:15.413" UserId="7811" Text="Meaning of knots when drawing a NURBS curve?" />
  <row Id="29147" PostHistoryTypeId="3" PostId="13159" RevisionGUID="e6bf0535-e4fd-46bc-b289-e4f8f2c4edfc" CreationDate="2011-06-04T15:42:15.413" UserId="7811" Text="&lt;opengl&gt;&lt;3d&gt;&lt;graphics&gt;" />
  <row Id="29148" PostHistoryTypeId="2" PostId="13160" RevisionGUID="896a1160-cade-42d7-a3cd-9aad7de4ba26" CreationDate="2011-06-04T16:06:05.250" UserId="1156" Text="[This][1] page has good explanations. &#xD;&#xA;&#xD;&#xA;&gt; The knots are a list of degree+N-1 numbers, where N is the number of&#xD;&#xA;&gt; control points. Sometimes this list of&#xD;&#xA;&gt; numbers is called the knot vector. In&#xD;&#xA;&gt; this term, the word vector does not&#xD;&#xA;&gt; mean 3‑D direction.&#xD;&#xA;&gt; &#xD;&#xA;&gt; This list of knot numbers must satisfy&#xD;&#xA;&gt; several technical conditions. The&#xD;&#xA;&gt; standard way to ensure that the&#xD;&#xA;&gt; technical conditions are satisfied is&#xD;&#xA;&gt; to require the numbers to stay the&#xD;&#xA;&gt; same or get larger as you go down the&#xD;&#xA;&gt; list and to limit the number of&#xD;&#xA;&gt; duplicate values to no more than the&#xD;&#xA;&gt; degree. For example, for a degree 3&#xD;&#xA;&gt; NURBS curve with 11 control points,&#xD;&#xA;&gt; the list of numbers&#xD;&#xA;&gt; 0,0,0,1,2,2,2,3,7,7,9,9,9 is a&#xD;&#xA;&gt; satisfactory list of knots. The list&#xD;&#xA;&gt; 0,0,0,1,2,2,2,2,7,7,9,9,9 is&#xD;&#xA;&gt; unacceptable because there are four 2s&#xD;&#xA;&gt; and four is larger than the degree.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The number of times a knot value is&#xD;&#xA;&gt; duplicated is called the knot’s&#xD;&#xA;&gt; multiplicity. In the preceding example&#xD;&#xA;&gt; of a satisfactory list of knots, the&#xD;&#xA;&gt; knot value 0 has multiplicity three,&#xD;&#xA;&gt; the knot value 1 has multiplicity one,&#xD;&#xA;&gt; the knot value 2 has multiplicity&#xD;&#xA;&gt; three, the knot value 3 has&#xD;&#xA;&gt; multiplicity one, the knot value 7 has&#xD;&#xA;&gt; multiplicity two, and the knot value 9&#xD;&#xA;&gt; has multiplicity three. A knot value&#xD;&#xA;&gt; is said to be a full-multiplicity knot&#xD;&#xA;&gt; if it is duplicated degree many times.&#xD;&#xA;&gt; In the example, the knot values 0, 2,&#xD;&#xA;&gt; and 9 have full multiplicity. A knot&#xD;&#xA;&gt; value that appears only once is called&#xD;&#xA;&gt; a simple knot. In the example, the&#xD;&#xA;&gt; knot values 1 and 3 are simple knots.&#xD;&#xA;&gt; &#xD;&#xA;&gt; If a list of knots starts with a full&#xD;&#xA;&gt; multiplicity knot, is followed by&#xD;&#xA;&gt; simple knots, terminates with a full&#xD;&#xA;&gt; multiplicity knot, and the values are&#xD;&#xA;&gt; equally spaced, then the knots are&#xD;&#xA;&gt; called uniform. For example, if a&#xD;&#xA;&gt; degree 3 NURBS curve with 7 control&#xD;&#xA;&gt; points has knots 0,0,0,1,2,3,4,4,4,&#xD;&#xA;&gt; then the curve has uniform knots. The&#xD;&#xA;&gt; knots 0,0,0,1,2,5,6,6,6 are not&#xD;&#xA;&gt; uniform. Knots that are not uniform&#xD;&#xA;&gt; are called non‑uniform. The N and U in&#xD;&#xA;&gt; NURBS stand for non‑uniform and&#xD;&#xA;&gt; indicate that the knots in a NURBS&#xD;&#xA;&gt; curve are permitted to be non-uniform.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Duplicate knot values in the middle of&#xD;&#xA;&gt; the knot list make a NURBS curve less&#xD;&#xA;&gt; smooth. At the extreme, a full&#xD;&#xA;&gt; multiplicity knot in the middle of the&#xD;&#xA;&gt; knot list means there is a place on&#xD;&#xA;&gt; the NURBS curve that can be bent into&#xD;&#xA;&gt; a sharp kink. For this reason, some&#xD;&#xA;&gt; designers like to add and remove knots&#xD;&#xA;&gt; and then adjust control points to make&#xD;&#xA;&gt; curves have smoother or kinkier&#xD;&#xA;&gt; shapes. Since the number of knots is&#xD;&#xA;&gt; equal to (N+degree‑1), where N is the&#xD;&#xA;&gt; number of control points, adding knots&#xD;&#xA;&gt; also adds control points and removing&#xD;&#xA;&gt; knots removes control points. Knots&#xD;&#xA;&gt; can be added without changing the&#xD;&#xA;&gt; shape of a NURBS curve. In general,&#xD;&#xA;&gt; removing knots will change the shape&#xD;&#xA;&gt; of a curve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rhino3d.com/nurbs.htm" />
  <row Id="29149" PostHistoryTypeId="2" PostId="13161" RevisionGUID="2b216b47-b114-4f08-b820-7d2831be31fc" CreationDate="2011-06-04T16:13:02.173" UserId="7813" Text="Best of the best: http://www.xnawiki.com/index.php?title=Physics_Engine" />
  <row Id="29150" PostHistoryTypeId="16" PostId="13161" RevisionGUID="c3281d1a-5e7e-4aed-8110-6b7fad4423fb" CreationDate="2011-06-04T16:13:02.173" UserId="7813" />
  <row Id="29151" PostHistoryTypeId="5" PostId="13158" RevisionGUID="7a2fe1bf-577c-4480-8efb-270ab2b26665" CreationDate="2011-06-04T17:03:12.003" UserId="7815" Comment="adding info" Text="With PIX you can debug pixels isolated, maybe you find the error in this way.&#xD;&#xA;FOV or a projection error is a hot hint.&#xD;&#xA;Or have you forgot the world transformation?!" />
  <row Id="29152" PostHistoryTypeId="24" PostId="13158" RevisionGUID="7a2fe1bf-577c-4480-8efb-270ab2b26665" CreationDate="2011-06-04T17:03:12.003" Comment="Proposed by 7815 approved by 51 edit id of 474" />
  <row Id="29153" PostHistoryTypeId="5" PostId="13151" RevisionGUID="08b27f02-6c31-4905-9751-ce08b688edab" CreationDate="2011-06-04T17:11:28.653" UserId="1258" Comment="added code" Text="two options: if &quot;nested input&quot; cases are at most three, four, I'd just use flags. &quot;Holding an object? Can't fire.&quot; Anything else is overengineering it.&#xD;&#xA;&#xD;&#xA;Otherwise, you can keep a per-input-key stack of event handlers.&#xD;&#xA;&#xD;&#xA;    Actions.Empty = () =&gt; { return; };&#xD;&#xA;    if(IsPressed(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;    } else if (IsReleased(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Pop();&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;        keyEventHandlers[Keys.Space].Pop();        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    while(GetNextKeyInBuffer(out key)) {&#xD;&#xA;       keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Or something to this effect :)&#xD;&#xA;&#xD;&#xA;Edit: someone mentioned unmanageable if-else constructs. are we going to go full data-driven for an input event handling routine? You surely could, but why?&#xD;&#xA;&#xD;&#xA;Anyway, for the heck of it:&#xD;&#xA;&#xD;&#xA;    void BuildOnKeyPressedEventHandlerTable() {&#xD;&#xA;        onKeyPressedHandlers[Key.E] = () =&gt; { &#xD;&#xA;            keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;            keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;            keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void BuildOnKeyReleasedEventHandlerTable() {&#xD;&#xA;        onKeyReleasedHandlers[Key.E] = () =&gt; { &#xD;&#xA;            keyEventHandlers[Keys.E].Pop();&#xD;&#xA;            keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;            keyEventHandlers[Keys.Space].Pop();              &#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /* get released keys */&#xD;&#xA;&#xD;&#xA;    foreach(var releasedKey in releasedKeys)&#xD;&#xA;        onKeyReleasedHandlers[releasedKey].Invoke();&#xD;&#xA;&#xD;&#xA;    /* get pressed keys */&#xD;&#xA;    foreach(var pressedKey in pressedKeys) &#xD;&#xA;        onKeyPressedHandlers[pressedKey].Invoke();&#xD;&#xA;&#xD;&#xA;    keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;" />
  <row Id="29154" PostHistoryTypeId="2" PostId="13162" RevisionGUID="cf87088c-6bd0-47de-a36d-21f025bb11e3" CreationDate="2011-06-04T17:15:40.057" UserId="7067" Text="Is it possible to keep a Windows Form inside a XNA project? I tried it but without success.&#xD;&#xA;&#xD;&#xA;Below I'm showing how my main file is.&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    &#xD;&#xA;    namespace JogoSuecaOnline&#xD;&#xA;    {&#xD;&#xA;    #if WINDOWS || XBOX&#xD;&#xA;        static class Program&#xD;&#xA;        {&#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// The main entry point for the application.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            static void Main(string[] args)&#xD;&#xA;            {&#xD;&#xA;                MainMenu menu = new MainMenu();&#xD;&#xA;                menu.Show();&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    #endif&#xD;&#xA;    }" />
  <row Id="29155" PostHistoryTypeId="1" PostId="13162" RevisionGUID="cf87088c-6bd0-47de-a36d-21f025bb11e3" CreationDate="2011-06-04T17:15:40.057" UserId="7067" Text="Windows Form inside XNA Project" />
  <row Id="29156" PostHistoryTypeId="3" PostId="13162" RevisionGUID="cf87088c-6bd0-47de-a36d-21f025bb11e3" CreationDate="2011-06-04T17:15:40.057" UserId="7067" Text="&lt;xna&gt;&lt;programming&gt;" />
  <row Id="29157" PostHistoryTypeId="2" PostId="13163" RevisionGUID="c1141db9-8ed7-4f9c-9222-a63f071527ff" CreationDate="2011-06-04T17:24:32.947" UserId="288" Text="There are two options. First of all you could embed an XNA view inside a WinForm. For information about how to do this: download, read through the documentation for, and play with the project files in:&#xD;&#xA;&#xD;&#xA; - &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/winforms_series_1&quot;&gt;XNA WinForms Sample 1&lt;/a&gt;&#xD;&#xA; - &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2&quot;&gt;XNA WinForms Sample 2&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The other thing you might want to do is to launch a WinForm from within an XNA game (so your game is running, and then the form is shown next to it). This is pretty easy: right click your game project -&gt; Add -&gt; Windows Form. This will set up the necessary references and create a template form for you.&#xD;&#xA;&#xD;&#xA;To launch your form, simply create and show it. Here's an example to launch the form when your `Game` starts:&#xD;&#xA;&#xD;&#xA;	Form1 form;&#xD;&#xA;	protected override void Initialize()&#xD;&#xA;	{&#xD;&#xA;		form = new Form1();&#xD;&#xA;		form.Show();&#xD;&#xA;		base.Initialize();&#xD;&#xA;	}" />
  <row Id="29158" PostHistoryTypeId="2" PostId="13164" RevisionGUID="d005643a-f8c1-4475-ac45-30c627d06e3c" CreationDate="2011-06-04T17:46:53.543" UserId="7328" Text="there is an algorithm named rrt which is used for realworld pathfinding problem. the surface your hero (or enemies) can walk on is an input along with the suface that objects can move, and using some optimization algorithm it finds a path to your destination. as much as I know this algorithm is greatly used in robocup leagues. it's fast, finds the shortest path and avoids collision and sharp turns. you can use this [powerpoint show](http://docs.google.com/viewer?a=v&amp;q=cache:sz2W4dD-c4EJ:www.cse.sc.edu/~mgv/csce580f09/gradPres/shepherd090914.ppt+rrt+path+finding&amp;hl=en&amp;pid=bl&amp;srcid=ADGEEShDx6IFkJZzXiTuv1e4FLLjtMcC1K1YvvYlfOi5XZDhm6j945IQREOGUFxItJIP1ISpkaCVTdFE3MZNmdNdTVLPGp9GSJtgOs9rz5y8cN7otxn8d5vhd7ZXVv8LazRXW1PUKQ0c&amp;sig=AHIEtbTfDIxFbn5R8tFbMf1kld4PJ9PgWA&amp;pli=1) to get a grasp on how it generates path." />
  <row Id="29159" PostHistoryTypeId="25" PostId="13159" RevisionGUID="f090024a-569b-404c-81c6-aa3618d2808e" CreationDate="2011-06-04T18:13:37.377" Comment="http://twitter.com/#!/StackGameDev/status/77075547355742209" />
  <row Id="29160" PostHistoryTypeId="5" PostId="12959" RevisionGUID="9e6a208e-cf9a-444f-8655-a9a98b38d00d" CreationDate="2011-06-04T18:54:46.313" UserId="4828" Comment="added 427 characters in body; deleted 35 characters in body" Text="I'm making hack&amp;slash game and I want my characters move like for example in Torchlight, Diablo, etc.&#xD;&#xA;Currently I generate set of nodes for all walkable areas of a floor. When I click somewhere player goes there&#xD;&#xA;through interpolated path of nodes. This doesn't look very natural. Player moves like a robot.&#xD;&#xA;Enemies also use this node system for movement and share the same issue but I have one more problem with them.&#xD;&#xA;When enemies detect player they go to him by a shortest path. Sometimes they use the same path and line up&#xD;&#xA;to the player instead of surrounding him. I don't know how to make enemies choose different paths and surround the player.&#xD;&#xA;Do you know how can I solve this problems?&#xD;&#xA;Maybe I should use different approach for character movement?&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;My current technique:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Torchlight screenshot:![enter image description here][2]&#xD;&#xA;&#xD;&#xA;---UPDATE---&#xD;&#xA;I want to know how to deal with these situations:&#xD;&#xA;----------&#xD;&#xA;Situation 1, I have dynamic/static obstalces on my way &#xD;&#xA;![enter image description here][3]&#xD;&#xA;----------&#xD;&#xA;Situation 2, Enemies have the sam path to player ( get into queue to fight with us )&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ykkPC.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/pEyWG.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/Dc2wJ.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/fV176.png" />
  <row Id="29161" PostHistoryTypeId="2" PostId="13165" RevisionGUID="c089e145-06d2-450c-af67-e08e93ed87a5" CreationDate="2011-06-04T19:15:33.480" UserId="4360" Text="I would like to create a 2D right triangle grid for a game I am working on. Currently I am creating creating a 2D square grid, and each square contains 2 triangles.&#xD;&#xA;&#xD;&#xA;I am wondering, is there a way to create and manage a right-triangle grid without having to contain 2 triangles in each square?" />
  <row Id="29162" PostHistoryTypeId="1" PostId="13165" RevisionGUID="c089e145-06d2-450c-af67-e08e93ed87a5" CreationDate="2011-06-04T19:15:33.480" UserId="4360" Text="Best way to create a 2D right-triangle grid" />
  <row Id="29163" PostHistoryTypeId="3" PostId="13165" RevisionGUID="c089e145-06d2-450c-af67-e08e93ed87a5" CreationDate="2011-06-04T19:15:33.480" UserId="4360" Text="&lt;2d&gt;&lt;grid&gt;" />
  <row Id="29164" PostHistoryTypeId="5" PostId="13148" RevisionGUID="5ce3af5b-f76d-4575-b513-2051b957cf6a" CreationDate="2011-06-04T19:21:08.043" UserId="5021" Comment="added 546 characters in body" Text="I've been playing around with [this tutorial/sample code][1] that demonstrates a simple implementation of light-pre-pass, which is a type of deferred lighting setup.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm in the process of implementing point light shadows, using dual-paraboloid shadow maps. I'm following this description of DPM:&#xD;&#xA;http://gamedevelop.eu/en/tutorials/dual-paraboloid-shadow-mapping.htm&#xD;&#xA;&#xD;&#xA;I am able to create the shadow maps, and they seem to look fine.&#xD;&#xA;&#xD;&#xA;I believe that the current problem I'm having is in my pixel shader that looks up a depth value in the shadow map when rendering point lights.&#xD;&#xA;&#xD;&#xA;Here is my point light shader code:&#xD;&#xA;http://olhovsky.com/shadow_mapping/PointLight.fx&#xD;&#xA;&#xD;&#xA;The pixel shader function of interest is `PointLightMeshShadowPS`.&#xD;&#xA;&#xD;&#xA;Does anyone see a glaring error in that function?&#xD;&#xA;&#xD;&#xA;Hopefully someone has tackled this problem before :)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As you can see in the images above, the post's shadows do not match up with the positions of the posts, so some transformation is wrong somewhere...&#xD;&#xA;&#xD;&#xA;This is what it looks like when the point light is very close to the ground (almost touching the ground).&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;As the point light moves closer to the ground, the shadows come together and touch along the line where the two shadow maps meet (that is, along the plane where the light camera was flipped to capture the two shadow maps).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Further information:&#xD;&#xA;&#xD;&#xA;![enter image description here][5]&#xD;&#xA;&#xD;&#xA;When I move the point light away from the origin, there is a line parallel to the light camera's &quot;right&quot; vector that clips the shadow. The above image shows the result of moving the point light to the left. If I move the point light to the right, there is an equivalent clipping line on the right instead. So I think this indicates that I'm transforming something incorrectly in the pixel shader, like I thought.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jcoluna.wordpress.com/2011/04/27/xna-4-0-light-pre-pass-casting-shadows/&#xD;&#xA;  [2]: http://i.stack.imgur.com/kaDVD.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/fON2d.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/o4hqS.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/QVFG6.png" />
  <row Id="29165" PostHistoryTypeId="2" PostId="13166" RevisionGUID="7fd04c0d-9950-4c7f-a500-9dc92c1a8960" CreationDate="2011-06-04T19:38:01.020" UserId="4828" Text="Try this in your main file:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       static void Main(string[] args)&#xD;&#xA;        {&#xD;&#xA;            Application.EnableVisualStyles();&#xD;&#xA;            Application.SetCompatibleTextRenderingDefault(false);&#xD;&#xA;            Application.Run(new EditorForm());&#xD;&#xA;        }" />
  <row Id="29166" PostHistoryTypeId="2" PostId="13167" RevisionGUID="8795b798-1d08-47e0-ae28-511f5677996a" CreationDate="2011-06-04T19:43:25.253" UserId="5021" Text="Do you want a &quot;grid&quot; of tiled triangles as in the image below?&#xD;&#xA;&#xD;&#xA;![Courtesy wikipedia.][1]&#xD;&#xA;&#xD;&#xA;Then you can index into this grid in the exact same way as a rectangular grid.&#xD;&#xA;&#xD;&#xA;The top left triangle will be (0,0), and the one to the right of it will be (1,0) then to the right of that will be (2,0), etc.&#xD;&#xA;&#xD;&#xA;The row below is (1, j).&#xD;&#xA;&#xD;&#xA;What other operations do you need on this grid?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2Z4U6.png&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29167" PostHistoryTypeId="2" PostId="13168" RevisionGUID="4a547f63-d567-402d-bbc1-99cfc1093444" CreationDate="2011-06-04T19:46:03.787" UserId="4947" Text="If someone is interested in this problem, you can find solution [here][1]. I have asked on opengl forum :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=298438&amp;#Post298438" />
  <row Id="29168" PostHistoryTypeId="5" PostId="13166" RevisionGUID="5cfb367c-e4c8-44be-8ae8-f16f4c3f9986" CreationDate="2011-06-04T19:50:14.130" UserId="4828" Comment="deleted 2 characters in body" Text="Try this in your main file:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       static void Main(string[] args)&#xD;&#xA;        {&#xD;&#xA;            Application.EnableVisualStyles();&#xD;&#xA;            Application.SetCompatibleTextRenderingDefault(false);&#xD;&#xA;            Application.Run(new YourForm());&#xD;&#xA;        }" />
  <row Id="29169" PostHistoryTypeId="5" PostId="13167" RevisionGUID="65177c39-d988-45fd-bd23-db19b4e0b5c7" CreationDate="2011-06-04T19:55:28.203" UserId="5021" Comment="added 13 characters in body; added 371 characters in body; added 75 characters in body" Text="At first I thought you wanted to switch to equilateral triangles like below&#xD;&#xA;&#xD;&#xA;![Courtesy wikipedia.][1]&#xD;&#xA;&#xD;&#xA;Then you can index into this grid in the exact same way as a rectangular grid.&#xD;&#xA;&#xD;&#xA;The top left triangle will be (0,0), and the one to the right of it will be (1,0) then to the right of that will be (2,0), etc.&#xD;&#xA;&#xD;&#xA;The row below is (1, j).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, I see now that you question is about right triangles.&#xD;&#xA;&#xD;&#xA;That is even more confusing, because two right triangles form a rectangle. So your coordinates will clearly still be rectangular, the same as above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have a 2D array storing your grid of triangles, you can just index directly into any triangle using a rectangular coordinate system (i.e., pretend that you just have a grid of squares).&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2Z4U6.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/HK423.png" />
  <row Id="29170" PostHistoryTypeId="5" PostId="13167" RevisionGUID="892123c6-4e49-43ea-9262-5aa332bb11ae" CreationDate="2011-06-04T20:02:11.910" UserId="5021" Comment="deleted 43 characters in body; added 43 characters in body; added 161 characters in body" Text="At first I thought you wanted to switch to equilateral triangles like below&#xD;&#xA;&#xD;&#xA;![Courtesy wikipedia.][1]&#xD;&#xA;&#xD;&#xA;Then you can index into this grid in the exact same way as a rectangular grid.&#xD;&#xA;&#xD;&#xA;The top left triangle will be (0,0), and the one to the right of it will be (1,0) then to the right of that will be (2,0), etc.&#xD;&#xA;&#xD;&#xA;The row below is (1, j).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, I see now that you question is about right triangles.&#xD;&#xA;&#xD;&#xA;That is just as easy, because two right triangles form a rectangle. So your coordinates will clearly still be rectangular, the same as above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have a 2D array storing your grid of triangles, you can just index directly into any triangle using a rectangular coordinate system (i.e., pretend that you just have a grid of squares).&#xD;&#xA;&#xD;&#xA;![Right triangles in a grid.][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So you'll have a 2D array that stores one triangle each. `array[0,0]` will be the top left triangle, and `array[0,1]` will be the triangle next to it.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2Z4U6.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/Of5Yd.png" />
  <row Id="29171" PostHistoryTypeId="5" PostId="13167" RevisionGUID="d281ece4-058a-4c84-875f-0a4aca6c0efe" CreationDate="2011-06-04T20:08:28.343" UserId="5021" Comment="added 2 characters in body; added 226 characters in body; added 16 characters in body; deleted 2 characters in body" Text="At first I thought you wanted to switch to equilateral triangles like below&#xD;&#xA;&#xD;&#xA;![Courtesy wikipedia.][1]&#xD;&#xA;&#xD;&#xA;Then you can index into this grid in the exact same way as a rectangular grid.&#xD;&#xA;&#xD;&#xA;The top left triangle will be (0,0), and the one to the right of it will be (1,0) then to the right of that will be (2,0), etc.&#xD;&#xA;&#xD;&#xA;The row below is (1, j).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, I see now that you question is about right triangles.&#xD;&#xA;&#xD;&#xA;That is just as easy, because two right triangles form a rectangle. So your coordinates will clearly still be rectangular, the same as above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have a 2D array storing your grid of triangles, you can just index directly into any triangle using a rectangular coordinate system (i.e., pretend that you just have a grid of squares).&#xD;&#xA;&#xD;&#xA;![Right triangles in a grid.][2]&#xD;&#xA;&#xD;&#xA;So you'll have a 2D array that stores one triangle each. `array[0,0]` stores nothing, to make the coordinate system simpler. &#xD;&#xA;&#xD;&#xA;There are multiple ways to index into these triangles, so I've just chosen the coordinate system that I think is easiest.&#xD;&#xA;&#xD;&#xA;This corresponds to a rectangular coordinate system that you're used to pretty closely. If it's still not clear, just ask me to elaborate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2Z4U6.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/C6J3W.png" />
  <row Id="29172" PostHistoryTypeId="2" PostId="13169" RevisionGUID="d9736965-39de-467b-b990-d22f2cade9a9" CreationDate="2011-06-04T20:17:25.870" UserId="1839" Text="Hey Olhovsky, nice challenging question. I know your pain, I implemented Deferred Shading, Inferred Lighting and shadows in my last job. It was really great fun, but lots of pain too when it didn't work as expected.&#xD;&#xA;&#xD;&#xA;I think the advice with PIX is actually a good one. You don't have to mess with the assembler instructions of the shader, but you can look at the shadow maps and other render targets, select a pixel and call its pixel shader and step through it and also its vertex-shader.&#xD;&#xA;&#xD;&#xA;General debug tricks for this kind of situations include simplification of the scene. &#xD;&#xA;&#xD;&#xA;One that comes to my mind is: put the camera at the same position as the light source with the same fovy and other attributes as in the lighting pass. Now you can easily compare the values in the pixel-shader. The pixel-xy in the normal render-pass for your current object should be the same as the calculated pixel-xy for the lookup in the shadowmap, as long as it has the same resolution.&#xD;&#xA;&#xD;&#xA;Another one is switch to orthographic projection, render something easy, predictable and checkable. The simpler the better you can check each calculation step.&#xD;&#xA;&#xD;&#xA;Other than that, can you show how you create the matrix that calculates the position in the shadow-map for the current pixel, that is the transformation from screen-space to light-space?" />
  <row Id="29173" PostHistoryTypeId="25" PostId="13165" RevisionGUID="183c64cb-45d3-4914-91bd-8e462edaef95" CreationDate="2011-06-04T21:13:37.897" Comment="http://twitter.com/#!/StackGameDev/status/77120847457955841" />
  <row Id="29174" PostHistoryTypeId="2" PostId="13170" RevisionGUID="c7b0a7cf-251d-48e1-a160-555e33946391" CreationDate="2011-06-04T21:57:21.750" UserId="7819" Text="The game is 2d, and the genre of this game is tower defense. &#xD;&#xA;&#xD;&#xA;I managed to get it moving to the cell and arrived in the cell. But it never arrives at the middle of a cell. &#xD;&#xA;&#xD;&#xA;Here's what I did...&#xD;&#xA;&#xD;&#xA;    public Enemy plotPath(Cell start, Enemy enemy, float deltaTime) {&#xD;&#xA;		&#xD;&#xA;		//Direction &#xD;&#xA;		int directionx = 0;&#xD;&#xA;		int directiony = 0;&#xD;&#xA;		if(enemy.position.x &lt; start.position.x) {&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_RIGHT;&#xD;&#xA;		}&#xD;&#xA;		else if(enemy.position.x &gt; position.x){&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_LEFT;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_NA;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		if(enemy.position.y &lt; start.position.y) {&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_DOWN;&#xD;&#xA;		}&#xD;&#xA;		else if(enemy.position.y &gt; start.position.y){&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_UP;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_NA;&#xD;&#xA;		}&#xD;&#xA;		enemy.position.add(velocity.x * deltaTime * directionx, velocity.y * deltaTime * directiony);&#xD;&#xA;		&#xD;&#xA;		return enemy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Then, the game would calculate the distance between the enemy and a point. If it is zero, then remove the cell from the enemy's list of cells (A*star algorithm). It looks like the enemy's position wouldn't never arrive at the point. &#xD;&#xA;&#xD;&#xA;I have the enemy positioned in (-0.1f, 3.5f). The velocity of the enemy is 2f. The cell is based 1f x 1f. The middle of a cell is (0.5f, 3.5f);&#xD;&#xA;&#xD;&#xA;I logged the calculations, here's the calculations -&#xD;&#xA;&#xD;&#xA;    -0.1	3.5&#xD;&#xA;    0.03482666	3.5&#xD;&#xA;    0.04385986	3.5&#xD;&#xA;    0.054541014	3.5&#xD;&#xA;    0.072546385	3.5&#xD;&#xA;    0.106665045	3.5&#xD;&#xA;    0.14072266	3.5&#xD;&#xA;    0.17520753	3.5&#xD;&#xA;    0.21030274	3.5&#xD;&#xA;    0.24313965	3.5&#xD;&#xA;    0.27927247	3.5&#xD;&#xA;    0.31210938	3.5&#xD;&#xA;    0.3467163	3.5&#xD;&#xA;    0.3805298	3.5&#xD;&#xA;    0.41867676	3.5&#xD;&#xA;    0.44882813	3.5&#xD;&#xA;    0.486792	3.5&#xD;&#xA;    0.5188354	3.5&#xD;&#xA;&#xD;&#xA;I'm thinking the velocity * deltaTime * direction isn't correct.  I tried to google around but couldn't find the solution.  Any ideas?" />
  <row Id="29175" PostHistoryTypeId="1" PostId="13170" RevisionGUID="c7b0a7cf-251d-48e1-a160-555e33946391" CreationDate="2011-06-04T21:57:21.750" UserId="7819" Text="How to calculate the enemy to arrive in the middle of cell?" />
  <row Id="29176" PostHistoryTypeId="3" PostId="13170" RevisionGUID="c7b0a7cf-251d-48e1-a160-555e33946391" CreationDate="2011-06-04T21:57:21.750" UserId="7819" Text="&lt;tower-defense&gt;" />
  <row Id="29177" PostHistoryTypeId="5" PostId="13170" RevisionGUID="f3b8ac7e-eece-440c-8bc6-9d29260e56ec" CreationDate="2011-06-04T22:02:28.193" UserId="7819" Comment="added 214 characters in body" Text="The game is 2d, and the genre of this game is tower defense. &#xD;&#xA;&#xD;&#xA;I managed to get it moving to the cell and arrived in the cell. But it never arrives at the middle of a cell. &#xD;&#xA;&#xD;&#xA;Here's what I did...&#xD;&#xA;&#xD;&#xA;    public Enemy plotPath(Cell start, Enemy enemy, float deltaTime) {&#xD;&#xA;		&#xD;&#xA;		//Direction &#xD;&#xA;		int directionx = 0;&#xD;&#xA;		int directiony = 0;&#xD;&#xA;		if(enemy.position.x &lt; start.position.x) {&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_RIGHT;&#xD;&#xA;		}&#xD;&#xA;		else if(enemy.position.x &gt; position.x){&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_LEFT;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_NA;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		if(enemy.position.y &lt; start.position.y) {&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_DOWN;&#xD;&#xA;		}&#xD;&#xA;		else if(enemy.position.y &gt; start.position.y){&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_UP;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_NA;&#xD;&#xA;		}&#xD;&#xA;		enemy.position.add(velocity.x * deltaTime * directionx, velocity.y * deltaTime * directiony);&#xD;&#xA;		&#xD;&#xA;		return enemy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Then, the game would calculate the distance between the enemy and a point. If it is zero, then remove the cell from the enemy's list of cells (A*star algorithm). The enemy position would be calculated by vector addition.  It looks like the enemy's position wouldn't never arrive at the point. &#xD;&#xA;&#xD;&#xA;Vector addition&#xD;&#xA;&#xD;&#xA;    public Vector2 add(float x, float y) {&#xD;&#xA;            this.x += x;&#xD;&#xA;            this.y += y;&#xD;&#xA;            return this;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I have the enemy positioned in (-0.1f, 3.5f). The velocity of the enemy is 2f. The cell is based 1f x 1f. The middle of a cell is (0.5f, 3.5f);&#xD;&#xA;&#xD;&#xA;I logged the calculations, here's the calculations -&#xD;&#xA;&#xD;&#xA;    -0.1	3.5&#xD;&#xA;    0.03482666	3.5&#xD;&#xA;    0.04385986	3.5&#xD;&#xA;    0.054541014	3.5&#xD;&#xA;    0.072546385	3.5&#xD;&#xA;    0.106665045	3.5&#xD;&#xA;    0.14072266	3.5&#xD;&#xA;    0.17520753	3.5&#xD;&#xA;    0.21030274	3.5&#xD;&#xA;    0.24313965	3.5&#xD;&#xA;    0.27927247	3.5&#xD;&#xA;    0.31210938	3.5&#xD;&#xA;    0.3467163	3.5&#xD;&#xA;    0.3805298	3.5&#xD;&#xA;    0.41867676	3.5&#xD;&#xA;    0.44882813	3.5&#xD;&#xA;    0.486792	3.5&#xD;&#xA;    0.5188354	3.5&#xD;&#xA;&#xD;&#xA;I'm thinking the velocity * deltaTime * direction isn't correct.  I tried to google around but couldn't find the solution.  Any ideas?" />
  <row Id="29178" PostHistoryTypeId="2" PostId="13171" RevisionGUID="579dd88a-93b5-4aa6-aeda-c50c45ed63e2" CreationDate="2011-06-04T22:09:07.647" UserId="1839" Text="Can you show the code where you check if it has arrived? Do you make a floating point comparison using `==` ? That would not work, check for `&gt;=` or `&lt;=`&#xD;&#xA;&#xD;&#xA;Edit: You are right, `velocity * deltaTime * direction` isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be `velocity * deltaTime`" />
  <row Id="29179" PostHistoryTypeId="5" PostId="13171" RevisionGUID="13f03ec0-d7ae-4dc0-987e-bd1ac35bad0d" CreationDate="2011-06-04T22:21:43.973" UserId="1839" Comment="added 86 characters in body" Text="Can you show the code where you check if it has arrived? Do you make a floating point comparison using `==` ? That would not work, check for `&gt;=` or `&lt;=`&#xD;&#xA;&#xD;&#xA;Edit: You are right, `velocity * deltaTime * direction` isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be `velocity * deltaTime`, but I dont think thats the problem, since it actually arrived as your logging shows." />
  <row Id="29180" PostHistoryTypeId="5" PostId="13170" RevisionGUID="2e6c83b8-2cad-426f-af7b-560e492d8dff" CreationDate="2011-06-04T23:21:52.943" UserId="7819" Comment="added 158 characters in body" Text="The game is 2d, and the genre of this game is tower defense. &#xD;&#xA;&#xD;&#xA;I managed to get it moving to the cell and arrived in the cell. But it never arrives at the middle of a cell. &#xD;&#xA;&#xD;&#xA;Here's what I did...&#xD;&#xA;&#xD;&#xA;    public Enemy plotPath(Cell start, Enemy enemy, float deltaTime) {&#xD;&#xA;		&#xD;&#xA;		//Direction &#xD;&#xA;		int directionx = 0;&#xD;&#xA;		int directiony = 0;&#xD;&#xA;		if(enemy.position.x &lt; start.position.x) {&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_RIGHT;&#xD;&#xA;		}&#xD;&#xA;		else if(enemy.position.x &gt; position.x){&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_LEFT;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			directionx = GraphConstants.X_DIRECTION_NA;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		if(enemy.position.y &lt; start.position.y) {&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_DOWN;&#xD;&#xA;		}&#xD;&#xA;		else if(enemy.position.y &gt; start.position.y){&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_UP;&#xD;&#xA;		}&#xD;&#xA;		else {&#xD;&#xA;			directiony = GraphConstants.Y_DIRECTION_NA;&#xD;&#xA;		}&#xD;&#xA;		enemy.position.add(velocity.x * deltaTime * directionx, velocity.y * deltaTime * directiony);&#xD;&#xA;		&#xD;&#xA;		return enemy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Then, the game would calculate the distance between the enemy and a point. If it is zero, then remove the cell from the enemy's list of cells (A*star algorithm). The enemy position would be calculated by vector addition.  It looks like the enemy's position wouldn't never arrive at the point. &#xD;&#xA;&#xD;&#xA;Vector addition&#xD;&#xA;&#xD;&#xA;    public Vector2 add(float x, float y) {&#xD;&#xA;            this.x += x;&#xD;&#xA;            this.y += y;&#xD;&#xA;            return this;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I have the enemy positioned in (-0.1f, 3.5f). The velocity of the enemy is 2f. The cell is based 1f x 1f. The middle of a cell is (0.5f, 3.5f);&#xD;&#xA;&#xD;&#xA;I logged the calculations, here's the calculations -&#xD;&#xA;&#xD;&#xA;    -0.1	3.5&#xD;&#xA;    0.03482666	3.5&#xD;&#xA;    0.04385986	3.5&#xD;&#xA;    0.054541014	3.5&#xD;&#xA;    0.072546385	3.5&#xD;&#xA;    0.106665045	3.5&#xD;&#xA;    0.14072266	3.5&#xD;&#xA;    0.17520753	3.5&#xD;&#xA;    0.21030274	3.5&#xD;&#xA;    0.24313965	3.5&#xD;&#xA;    0.27927247	3.5&#xD;&#xA;    0.31210938	3.5&#xD;&#xA;    0.3467163	3.5&#xD;&#xA;    0.3805298	3.5&#xD;&#xA;    0.41867676	3.5&#xD;&#xA;    0.44882813	3.5&#xD;&#xA;    0.486792	3.5&#xD;&#xA;    0.5188354	3.5&#xD;&#xA;&#xD;&#xA;I used distance between the enemy and the middle of a cell -&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    if(position.dist(start.position) == 0) {&#xD;&#xA;                	path.remove(0);&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm thinking the velocity * deltaTime * direction isn't correct.  I tried to google around but couldn't find the solution.  Any ideas?" />
  <row Id="29181" PostHistoryTypeId="2" PostId="13172" RevisionGUID="236ffc32-6696-4445-a1bc-779003d2a72a" CreationDate="2011-06-04T23:25:15.087" UserId="7328" Text="if you are going with a* algorithm there is no need for enemy to reach to exactly center of the cell, just check if it is near the center remove that cell from it's list. you can easily check that : `sqrt(sqr(enemy.x - cell.center.x) + sqr(enemy.y - cell.center.y)) &lt; closevalue`. you can also change velocity at every frame to move directly toward the center and if you are realy close, just set velocity to `distance / dt` or jump your character directly to the center. and as maik said having another variable as direction is wrong, since velocity already contains direction (it can be negetive or positive).&#xD;&#xA;" />
  <row Id="29182" PostHistoryTypeId="5" PostId="13171" RevisionGUID="46b1d639-b1ba-4520-a6ff-4f3393bb0f5c" CreationDate="2011-06-04T23:34:58.213" UserId="1839" Comment="briefly describe your changes (corrected spelling, fixed grammar, improved formatting)" Text="Can you show the code where you check if it has arrived? Do you make a floating point comparison using `==` ? That would not work, check for `&gt;=` or `&lt;=`&#xD;&#xA;&#xD;&#xA;Edit: You are right, `velocity * deltaTime * direction` isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be `velocity * deltaTime`, but I dont think thats the problem, since it actually arrived as your logging shows.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: Instead of:&#xD;&#xA;&#xD;&#xA;    if(position.dist(start.position) == 0)&#xD;&#xA;&#xD;&#xA;use something like:&#xD;&#xA;&#xD;&#xA;    if(position.dist(start.position) &lt; 0.3)" />
  <row Id="29183" PostHistoryTypeId="5" PostId="12965" RevisionGUID="ddf34641-a2c7-41b3-a685-8d3f80054726" CreationDate="2011-06-04T23:39:43.860" UserId="2332" Comment="added 152 characters in body" Text="***Steering Behaviours*** in combination with a ***navigation data structure***.&#xD;&#xA;&#xD;&#xA;There are a number of ways to do this, but that's the basic concept. It might be easier to use a [navigation mesh][1] so that you can apply pathfinding within each convex section.&#xD;&#xA;&#xD;&#xA;If you're adamant about keeping a graph, you can use a [Seek][2] behaviour to each node in the path, rather than rigidly following a path from node to node.&#xD;&#xA;&#xD;&#xA;Another method you could employ is [Path Smoothing][3] but bear in mind that this is fairly computationally expensive.&#xD;&#xA;&#xD;&#xA;Hope that helps.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;To help with your obstacle avoidance issues, use some sort of [Obstacle Avoidance][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ai-blog.net/archives/000152.html&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/SeekFlee.html&#xD;&#xA;  [3]: http://www.gamasutra.com/view/feature/3096/toward_more_realistic_pathfinding.php&#xD;&#xA;  [4]: http://www.red3d.com/cwr/steer/Obstacle.html" />
  <row Id="29184" PostHistoryTypeId="25" PostId="13170" RevisionGUID="b7e0ba38-287b-422b-9477-0ac1bc20d924" CreationDate="2011-06-05T00:13:38.620" Comment="http://twitter.com/#!/StackGameDev/status/77166148340297728" />
  <row Id="29185" PostHistoryTypeId="2" PostId="13173" RevisionGUID="6b651196-6a35-42db-9440-e0fea9730916" CreationDate="2011-06-05T00:22:58.437" UserId="7823" Text="To make pathfinding routes look more &quot;realistic&quot;, I suggest you check out the article about natural-looking A* in Game Programming Gems Vol.1" />
  <row Id="29186" PostHistoryTypeId="17" PostId="13174" RevisionGUID="19ccf87f-b5bc-47f5-b1cc-16ee1da88e00" CreationDate="2011-06-05T00:25:59.550" UserId="-1" Comment="from http://stackoverflow.com/questions/6237737/wavefront-obj-loader-in-c" Text="" />
  <row Id="29187" PostHistoryTypeId="17" PostId="13175" RevisionGUID="180084e4-55c1-4afe-a498-bf82246fc973" CreationDate="2011-06-05T00:25:59.550" UserId="-1" Comment="from http://stackoverflow.com/questions/6237737/wavefront-obj-loader-in-c" Text="" />
  <row Id="29188" PostHistoryTypeId="17" PostId="13176" RevisionGUID="b65b7246-acba-485b-8d0f-06e49b02a78e" CreationDate="2011-06-05T00:25:59.550" UserId="-1" Comment="from http://stackoverflow.com/questions/6237737/wavefront-obj-loader-in-c" Text="" />
  <row Id="29189" PostHistoryTypeId="2" PostId="13175" RevisionGUID="c8520b28-2e48-41b8-afd8-946cbb738f60" CreationDate="2011-06-04T16:08:18.633" UserId="6798" Text="Just because Blender offers you an exporter for Wavefront doesn't mean, that the whole animation will be exported as well. Wavefront OBJ doesn't know animation!&#xD;&#xA;&#xD;&#xA;On the other hand it's perfectly possible to implement a exporter Add On for md2 / md3, and AFAIK those already exist.&#xD;&#xA;&#xD;&#xA;That being said, as I understood it, you intend to store the full mesh for each animation frame. This is a very inefficient way to do animation. A better approach would be to just store keyframes and interpolate between those. Or even better: Implement a mesh deformation system that's compatible with Blender's animation system, or implement your own mesh deformation system for both Blender and your program. Animating simple whole object transformations is easy. Mesh deformations in Blender typically happen through the builtin Armature modifier, but it's perfectly possible to implement a own mesh deformation operator as stand in replacement for the Armature modifier.&#xD;&#xA;&#xD;&#xA;ATM I'm developing an export/import Blender Add-On that dumps all the currently loaded data into JSON format; either one big file or a single file for each data block. The main idea is to use it with WebGL (i.e. implementing a WebGL engine that allows to load stuff originally created for the Blender Game Engine). Maybe I can interest you in using JSON for storing model and information." />
  <row Id="29190" PostHistoryTypeId="2" PostId="13176" RevisionGUID="f713df69-262c-44a4-9427-745becb3519a" CreationDate="2011-06-04T16:09:50.447" UserId="4513" Text="OBJ Does not support animation, for more information read [this][1].&#xD;&#xA;&#xD;&#xA;For a simple OBJ loader, [lib-obj][2] comes to mind.&#xD;&#xA;If you want to home brew, and you can ensure the file only contains triangles; no quads etc, parsing an OBJ is arbitrary (its only text!):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    		char prefix[10] = {0};&#xD;&#xA;    		stream &gt;&gt; prefix;&#xD;&#xA;    &#xD;&#xA;    		switch (prefix[0]) {&#xD;&#xA;    			case 'v' : {&#xD;&#xA;    				switch (prefix[1]) {&#xD;&#xA;    					case 't' : {} break; // texcoords&#xD;&#xA;    					case 'n' : {} break; // normals&#xD;&#xA;    					default : { // points&#xD;&#xA;    						float x, y, z;&#xD;&#xA;    						stream &gt;&gt; x &gt;&gt; y &gt;&gt; z;&#xD;&#xA;    						// put in a mesh etc&#xD;&#xA;    					}&#xD;&#xA;    				}&#xD;&#xA;    			} break;&#xD;&#xA;    			case 'f' : {&#xD;&#xA;    				unsigned short a, b, c;&#xD;&#xA;    				stream &gt;&gt; a &gt;&gt; b &gt;&gt; c;&#xD;&#xA;    &#xD;&#xA;        			// etc&#xD;&#xA;    			} break;&#xD;&#xA;    			default : {} // skip&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;If in doubt, look to the [specification][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/757145/do-wavefront-obj-files-support-animation&#xD;&#xA;  [2]: http://code.google.com/p/lib-obj/&#xD;&#xA;  [3]: http://paulbourke.net/dataformats/obj/" />
  <row Id="29191" PostHistoryTypeId="2" PostId="13174" RevisionGUID="5c4388ef-e2a0-4cbc-a7f6-03fe0de82542" CreationDate="2011-06-04T15:48:29.990" UserDisplayName="jsvcycling" Text="I'm creating a game using OpenGL (via SDL) and C++ (via Visual Studios 2010 Professional). During the game, I will be using 3D character animation. I'd like to use wavefront *.obj files for all the 3D models (with the exception of terrain). The characters will need to have fluent movements (realistic), with as many as 250-500 frames (for walking, running, sprinting, jumping, crouching, crawling, etc.). I'd like to use either md2 or md3, but the 3D modelling/animation tool I'll be using (Blender 3D 2.57) doesn't support either one. The game will only be running on Windows.&#xD;&#xA;&#xD;&#xA;What I need is a small yet powerful *.obj loader and parser that supports animation. It must be written in C++ and be usable by SDL.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;**Alright, after looking at all the file formats that Blender can export to...I've decided to go with 3DS because it produces the smallest file format when I export the default cube. Thanks @Daniel For recommending 3DS!**" />
  <row Id="29192" PostHistoryTypeId="1" PostId="13174" RevisionGUID="5c4388ef-e2a0-4cbc-a7f6-03fe0de82542" CreationDate="2011-06-04T15:48:29.990" UserDisplayName="jsvcycling" Text="Wavefront *.obj loader in C++" />
  <row Id="29193" PostHistoryTypeId="3" PostId="13174" RevisionGUID="5c4388ef-e2a0-4cbc-a7f6-03fe0de82542" CreationDate="2011-06-04T15:48:29.990" UserDisplayName="jsvcycling" Text="&lt;c++&gt;&lt;opengl&gt;&lt;animation&gt;&lt;sdl&gt;" />
  <row Id="29194" PostHistoryTypeId="2" PostId="13177" RevisionGUID="42fcfdee-c2ff-42ad-ac85-7e4db3475bd3" CreationDate="2011-06-05T00:41:52.420" UserId="7823" Text="The best resource for learning game physics I have ever come across is due to Chris Hecker of &quot;Spy Party&quot; fame:&#xD;&#xA;&#xD;&#xA;http://chrishecker.com/Rigid_Body_Dynamics" />
  <row Id="29195" PostHistoryTypeId="5" PostId="13148" RevisionGUID="a68ecda3-7cb9-4805-af69-9bf93f8fff92" CreationDate="2011-06-05T01:54:01.830" UserId="5021" Comment="added 7868 characters in body" Text="I've been playing around with [this tutorial/sample code][1] that demonstrates a simple implementation of light-pre-pass, which is a type of deferred lighting setup.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm in the process of implementing point light shadows, using dual-paraboloid shadow maps. I'm following this description of DPM:&#xD;&#xA;http://gamedevelop.eu/en/tutorials/dual-paraboloid-shadow-mapping.htm&#xD;&#xA;&#xD;&#xA;I am able to create the shadow maps, and they seem to look fine.&#xD;&#xA;&#xD;&#xA;I believe that the current problem I'm having is in my pixel shader that looks up a depth value in the shadow map when rendering point lights.&#xD;&#xA;&#xD;&#xA;Here is my point light shader code:&#xD;&#xA;http://olhovsky.com/shadow_mapping/PointLight.fx&#xD;&#xA;&#xD;&#xA;The pixel shader function of interest is `PointLightMeshShadowPS`.&#xD;&#xA;&#xD;&#xA;Does anyone see a glaring error in that function?&#xD;&#xA;&#xD;&#xA;Hopefully someone has tackled this problem before :)&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As you can see in the images above, the post's shadows do not match up with the positions of the posts, so some transformation is wrong somewhere...&#xD;&#xA;&#xD;&#xA;This is what it looks like when the point light is very close to the ground (almost touching the ground).&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;As the point light moves closer to the ground, the shadows come together and touch along the line where the two shadow maps meet (that is, along the plane where the light camera was flipped to capture the two shadow maps).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Further information:&#xD;&#xA;&#xD;&#xA;![enter image description here][5]&#xD;&#xA;&#xD;&#xA;When I move the point light away from the origin, there is a line parallel to the light camera's &quot;right&quot; vector that clips the shadow. The above image shows the result of moving the point light to the left. If I move the point light to the right, there is an equivalent clipping line on the right instead. So I think this indicates that I'm transforming something incorrectly in the pixel shader, like I thought.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;To make this question more clear, here are a few pieces of code.&#xD;&#xA;&#xD;&#xA;Here is the code that I currently use to draw a shadowed **spot light**. This works, and uses shadow mapping as you'd expect.&#xD;&#xA;&#xD;&#xA;    VertexShaderOutputMeshBased SpotLightMeshVS(VertexShaderInput input)&#xD;&#xA;    {&#xD;&#xA;        VertexShaderOutputMeshBased output = (VertexShaderOutputMeshBased)0;	&#xD;&#xA;        output.Position = mul(input.Position, WorldViewProjection);&#xD;&#xA;    &#xD;&#xA;        //we will compute our texture coords based on pixel position further&#xD;&#xA;        output.TexCoordScreenSpace = output.Position;&#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    //////////////////////////////////////////////////////&#xD;&#xA;    // Pixel shader to compute spot lights with shadows&#xD;&#xA;    //////////////////////////////////////////////////////&#xD;&#xA;    float4 SpotLightMeshShadowPS(VertexShaderOutputMeshBased input) : COLOR0&#xD;&#xA;    {&#xD;&#xA;        //as we are using a sphere mesh, we need to recompute each pixel position into texture space coords&#xD;&#xA;        float2 screenPos = PostProjectionSpaceToScreenSpace(input.TexCoordScreenSpace) + GBufferPixelSize;&#xD;&#xA;        //read the depth value&#xD;&#xA;        float depthValue = tex2D(depthSampler, screenPos).r;&#xD;&#xA;        &#xD;&#xA;        //if depth value == 1, we can assume its a background value, so skip it&#xD;&#xA;        //we need this only if we are using back-face culling on our light volumes. Otherwise, our z-buffer&#xD;&#xA;        //will reject this pixel anyway&#xD;&#xA;        &#xD;&#xA;        //if depth value == 1, we can assume its a background value, so skip it&#xD;&#xA;        clip(-depthValue + 0.9999f);&#xD;&#xA;    &#xD;&#xA;        // Reconstruct position from the depth value, the FOV, aspect and pixel position&#xD;&#xA;        depthValue*=FarClip;&#xD;&#xA;    &#xD;&#xA;        //convert screenPos to [-1..1] range&#xD;&#xA;        float3 pos = float3(TanAspect*(screenPos*2 - 1)*depthValue, -depthValue);&#xD;&#xA;        &#xD;&#xA;        //light direction from current pixel to current light&#xD;&#xA;        float3 lDir = LightPosition - pos;&#xD;&#xA;    &#xD;&#xA;        //compute attenuation, 1 - saturate(d2/r2)&#xD;&#xA;        float atten = ComputeAttenuation(lDir);&#xD;&#xA;        &#xD;&#xA;        // Convert normal back with the decoding function&#xD;&#xA;        float4 normalMap = tex2D(normalSampler, screenPos);&#xD;&#xA;        float3 normal = DecodeNormal(normalMap);&#xD;&#xA;                &#xD;&#xA;        lDir = normalize(lDir);&#xD;&#xA;    &#xD;&#xA;        // N dot L lighting term, attenuated&#xD;&#xA;        float nl = saturate(dot(normal, lDir))*atten;&#xD;&#xA;    &#xD;&#xA;        //spot light cone&#xD;&#xA;        half spotAtten = min(1,max(0,dot(lDir,LightDir) - SpotAngle)*SpotExponent);&#xD;&#xA;        nl *= spotAtten;&#xD;&#xA;    &#xD;&#xA;        //reject pixels outside our radius or that are not facing the light&#xD;&#xA;        clip(nl -0.00001f);&#xD;&#xA;    &#xD;&#xA;        //compute shadow attenuation&#xD;&#xA;        &#xD;&#xA;        float4 lightPosition = mul(mul(float4(pos,1),CameraTransform), MatLightViewProjSpot);&#xD;&#xA;    &#xD;&#xA;        // Find the position in the shadow map for this pixel&#xD;&#xA;        float2 shadowTexCoord = 0.5 * lightPosition.xy / &#xD;&#xA;                                lightPosition.w + float2( 0.5, 0.5 );&#xD;&#xA;        shadowTexCoord.y = 1.0f - shadowTexCoord.y;&#xD;&#xA;        //offset by the texel size&#xD;&#xA;        shadowTexCoord += ShadowMapPixelSize;&#xD;&#xA;        &#xD;&#xA;        // Calculate the current pixel depth&#xD;&#xA;        // The bias is used to prevent floating point errors &#xD;&#xA;        float ourdepth = (lightPosition.z / lightPosition.w) - DepthBias;&#xD;&#xA;        &#xD;&#xA;        nl = ComputeShadowPCF7Linear(nl, shadowTexCoord, ourdepth);&#xD;&#xA;    &#xD;&#xA;        float4 finalColor;&#xD;&#xA;    &#xD;&#xA;        //As our position is relative to camera position, we dont need to use (ViewPosition - pos) here&#xD;&#xA;        float3 camDir = normalize(pos);&#xD;&#xA;        &#xD;&#xA;        // Calculate specular term&#xD;&#xA;        float3 h = normalize(reflect(lDir, normal));&#xD;&#xA;        float spec = nl*pow(saturate(dot(camDir, h)), normalMap.b*50);&#xD;&#xA;        finalColor = float4(LightColor * nl, spec);	&#xD;&#xA;        &#xD;&#xA;        //output light&#xD;&#xA;        return finalColor * LightBufferScale;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now here is the **point light** code that I'm using, which has some sort of bug in the transformation into light space when using the shadow maps:&#xD;&#xA;&#xD;&#xA;    VertexShaderOutputMeshBased PointLightMeshVS(VertexShaderInput input)&#xD;&#xA;    {&#xD;&#xA;        VertexShaderOutputMeshBased output = (VertexShaderOutputMeshBased)0;	&#xD;&#xA;        output.Position = mul(input.Position, WorldViewProjection);&#xD;&#xA;    &#xD;&#xA;        //we will compute our texture coords based on pixel position further&#xD;&#xA;        output.TexCoordScreenSpace = output.Position;&#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PointLightMeshShadowPS(VertexShaderOutputMeshBased input) : COLOR0&#xD;&#xA;    {&#xD;&#xA;        // as we are using a sphere mesh, we need to recompute each pixel position &#xD;&#xA;        // into texture space coords&#xD;&#xA;        float2 screenPos = &#xD;&#xA;            PostProjectionSpaceToScreenSpace(input.TexCoordScreenSpace) + GBufferPixelSize;&#xD;&#xA;        &#xD;&#xA;        // read the depth value&#xD;&#xA;        float depthValue = tex2D(depthSampler, screenPos).r;&#xD;&#xA;        &#xD;&#xA;        // if depth value == 1, we can assume its a background value, so skip it&#xD;&#xA;        // we need this only if we are using back-face culling on our light volumes. &#xD;&#xA;        // Otherwise, our z-buffer will reject this pixel anyway&#xD;&#xA;        clip(-depthValue + 0.9999f);&#xD;&#xA;        &#xD;&#xA;        // Reconstruct position from the depth value, the FOV, aspect and pixel position&#xD;&#xA;        depthValue *= FarClip;&#xD;&#xA;    &#xD;&#xA;        // convert screenPos to [-1..1] range&#xD;&#xA;        float3 pos = float3(TanAspect*(screenPos*2 - 1)*depthValue, -depthValue);&#xD;&#xA;        &#xD;&#xA;        // light direction from current pixel to current light&#xD;&#xA;        float3 lDir = LightPosition - pos;&#xD;&#xA;    &#xD;&#xA;        // compute attenuation, 1 - saturate(d2/r2)&#xD;&#xA;        float atten = ComputeAttenuation(lDir);&#xD;&#xA;        &#xD;&#xA;        // Convert normal back with the decoding function&#xD;&#xA;        float4 normalMap = tex2D(normalSampler, screenPos);&#xD;&#xA;        float3 normal = DecodeNormal(normalMap);&#xD;&#xA;                &#xD;&#xA;        lDir = normalize(lDir);&#xD;&#xA;    &#xD;&#xA;        // N dot L lighting term, attenuated&#xD;&#xA;        float nl = saturate(dot(normal, lDir))*atten;&#xD;&#xA;    &#xD;&#xA;        /* shadow stuff */&#xD;&#xA;    &#xD;&#xA;        float4 lightPosition = mul(mul(float4(pos,1),CameraTransform), LightViewProj);&#xD;&#xA;        &#xD;&#xA;        //float4 lightPosition = mul(float4(pos,1), LightViewProj);&#xD;&#xA;        float posLength = length(lightPosition);&#xD;&#xA;        lightPosition /= posLength;&#xD;&#xA;    &#xD;&#xA;        float ourdepth = (posLength - NearClip) / (FarClip - NearClip) - DepthBias;&#xD;&#xA;        //float ourdepth = (lightPosition.z / lightPosition.w) - DepthBias;&#xD;&#xA;    &#xD;&#xA;        if(lightPosition.z &gt; 0.0f)&#xD;&#xA;        {&#xD;&#xA;            float2 vTexFront;&#xD;&#xA;            vTexFront.x =  (lightPosition.x /  (1.0f + lightPosition.z)) * 0.5f + 0.5f; &#xD;&#xA;            vTexFront.y =  1.0f - ((lightPosition.y /  (1.0f + lightPosition.z)) * 0.5f + 0.5f); 	&#xD;&#xA;        &#xD;&#xA;            nl = ComputeShadow(FrontShadowMapSampler, nl, vTexFront, ourdepth);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            // for the back the z has to be inverted		&#xD;&#xA;            float2 vTexBack;&#xD;&#xA;            vTexBack.x =  (lightPosition.x /  (1.0f - lightPosition.z)) * 0.5f + 0.5f; &#xD;&#xA;            vTexBack.y =  1.0f - ((lightPosition.y /  (1.0f - lightPosition.z)) * 0.5f + 0.5f); &#xD;&#xA;            &#xD;&#xA;            nl = ComputeShadow(BackShadowMapSampler, nl, vTexBack, ourdepth);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        /* shadow stuff */&#xD;&#xA;    &#xD;&#xA;        // reject pixels outside our radius or that are not facing the light&#xD;&#xA;        clip(nl - 0.00001f);&#xD;&#xA;    &#xD;&#xA;        float4 finalColor;&#xD;&#xA;        //As our position is relative to camera position, we dont need to use (ViewPosition - pos) here&#xD;&#xA;        float3 camDir = normalize(pos);&#xD;&#xA;        &#xD;&#xA;        // Calculate specular term&#xD;&#xA;        float3 h = normalize(reflect(lDir, normal));&#xD;&#xA;        float spec = nl*pow(saturate(dot(camDir, h)), normalMap.b*100);&#xD;&#xA;        finalColor = float4(LightColor * nl, spec);&#xD;&#xA;           &#xD;&#xA;        return finalColor * LightBufferScale;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://jcoluna.wordpress.com/2011/04/27/xna-4-0-light-pre-pass-casting-shadows/&#xD;&#xA;  [2]: http://i.stack.imgur.com/kaDVD.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/fON2d.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/o4hqS.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/QVFG6.png" />
  <row Id="29196" PostHistoryTypeId="25" PostId="13162" RevisionGUID="a3102a97-0fec-41c5-814f-14781d2e0fd9" CreationDate="2011-06-05T03:13:39.717" Comment="http://twitter.com/#!/StackGameDev/status/77211452791984128" />
  <row Id="29197" PostHistoryTypeId="2" PostId="13178" RevisionGUID="180dfaef-1619-4e98-8f58-c1c42829d70e" CreationDate="2011-06-05T03:53:27.217" UserId="6814" Text="Programming in Java.  Tinkering around with physics.  My entities all have position and velocity.  In the main loop, all I'm doing is applying gravity and bouncing off the edges, like so:&#xD;&#xA;&#xD;&#xA;        //  add gravity vector&#xD;&#xA;        z.velocity.add(GRAVITY.cpy().mul(dt));&#xD;&#xA;                 &#xD;&#xA;        //  bounce off walls&#xD;&#xA;        if ((z.position.x&lt;0 &amp;&amp; z.velocity.x&lt;0) || (z.position.x&gt;WORLD_SIZE_X &amp;z.velocity.x&gt;0))&#xD;&#xA;            z.velocity.x*=-1;&#xD;&#xA;        &#xD;&#xA;        //  bounce off of ground&#xD;&#xA;        if (z.position.y&lt;=0.0f) {&#xD;&#xA;            z.position.y=0.0f;&#xD;&#xA;            if (z.velocity.y&lt;0)&#xD;&#xA;                z.velocity.y *= -1;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The x and y values of my vectors are just floats.&#xD;&#xA;&#xD;&#xA;For the first second it looks like it's working fine, but the vertical velocities slowly decay.  Any idea why?" />
  <row Id="29198" PostHistoryTypeId="1" PostId="13178" RevisionGUID="180dfaef-1619-4e98-8f58-c1c42829d70e" CreationDate="2011-06-05T03:53:27.217" UserId="6814" Text="Why is my velocity decaying?" />
  <row Id="29199" PostHistoryTypeId="3" PostId="13178" RevisionGUID="180dfaef-1619-4e98-8f58-c1c42829d70e" CreationDate="2011-06-05T03:53:27.217" UserId="6814" Text="&lt;java&gt;&lt;physics&gt;" />
  <row Id="29200" PostHistoryTypeId="2" PostId="13179" RevisionGUID="85c277a1-98b6-4f03-ab1f-64d8c39b03ad" CreationDate="2011-06-05T04:01:45.987" UserId="5021" Text="This code is using a bitwise AND `z.position.x&gt;WORLD_SIZE_X &amp;z.velocity.x&gt;0`.&#xD;&#xA;&#xD;&#xA;Replace that AND with a logical and (`&amp;&amp;`).&#xD;&#xA;&#xD;&#xA;By the way, you really shouldn't call your object `z`, that is really confusing." />
  <row Id="29201" PostHistoryTypeId="12" PostId="13179" RevisionGUID="9107fd19-e19b-4be7-8810-7ff9674a6a77" CreationDate="2011-06-05T04:06:49.847" UserId="5021" Text="[{&quot;Id&quot;:5021,&quot;DisplayName&quot;:&quot;Olhovsky&quot;}]" />
  <row Id="29202" PostHistoryTypeId="13" PostId="13179" RevisionGUID="1e7dbaaa-ef84-4814-91d7-a6ede37b6b79" CreationDate="2011-06-05T04:07:56.353" UserId="5021" Text="[{&quot;Id&quot;:5021,&quot;DisplayName&quot;:&quot;Olhovsky&quot;}]" />
  <row Id="29203" PostHistoryTypeId="5" PostId="13179" RevisionGUID="5fc8862a-23ed-4ac0-878f-b534a00f8121" CreationDate="2011-06-05T04:08:19.613" UserId="5021" Comment="added 85 characters in body; deleted 75 characters in body; added 73 characters in body" Text="This code is using a bitwise AND `z.position.x&gt;WORLD_SIZE_X &amp;z.velocity.x&gt;0`.&#xD;&#xA;&#xD;&#xA;Replace that AND with a logical and (`&amp;&amp;`).&#xD;&#xA;&#xD;&#xA;You also have another bug where you check for collision against the ground.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;By the way, you really shouldn't call your object `z`, that is really confusing.&#xD;&#xA;" />
  <row Id="29204" PostHistoryTypeId="12" PostId="13179" RevisionGUID="ef3bf6cb-c0a5-410b-9eab-73a4dba8c560" CreationDate="2011-06-05T04:11:23.180" UserId="5021" Text="[{&quot;Id&quot;:5021,&quot;DisplayName&quot;:&quot;Olhovsky&quot;}]" />
  <row Id="29205" PostHistoryTypeId="5" PostId="13178" RevisionGUID="4366b218-d52a-4243-a1db-8423f748a834" CreationDate="2011-06-05T04:11:50.093" UserId="6814" Comment="added 2 characters in body" Text="Programming in Java.  Tinkering around with physics.  My entities all have position and velocity.  In the main loop, all I'm doing is applying gravity and bouncing off the edges, like so:&#xD;&#xA;&#xD;&#xA;        //  add gravity vector&#xD;&#xA;        o.velocity.add(GRAVITY.cpy().mul(dt));&#xD;&#xA;                 &#xD;&#xA;        //  bounce off walls&#xD;&#xA;        if ((o.position.x&lt;0 &amp;&amp; o.velocity.x&lt;0) || (o.position.x&gt;WORLD_SIZE_X &amp;&amp; o.velocity.x&gt;0))&#xD;&#xA;            o.velocity.x*=-1;&#xD;&#xA;        &#xD;&#xA;        //  bounce off of ground&#xD;&#xA;        if (o.position.y&lt;=0.0f) {&#xD;&#xA;            o.position.y=0.0f;&#xD;&#xA;            if (o.velocity.y&lt;0)&#xD;&#xA;                o.velocity.y *= -1;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The x and y values of my vectors are just floats.&#xD;&#xA;&#xD;&#xA;For the first second it looks like it's working fine, but the vertical velocities slowly decay.  Any idea why?" />
  <row Id="29206" PostHistoryTypeId="5" PostId="13179" RevisionGUID="05b03d9d-a136-470e-ae90-4c32b38d9853" CreationDate="2011-06-05T04:28:28.260" UserId="5021" Comment="deleted 83 characters in body; added 258 characters in body; added 265 characters in body" Text="Your objects are bouncing with subsequently smaller bounces because you are applying basic newtonian physics rules to your objects, so they mimic behavior of such objects as you'd expect them to in real life.&#xD;&#xA;&#xD;&#xA;You are constantly applying gravity to the velocity of the objects.&#xD;&#xA;&#xD;&#xA;When you flip the direction of velocity, the object is now moving up, with an upward velocity, but you are removing some of this velocity with a downward gravity velocity application!&#xD;&#xA;&#xD;&#xA;So when your object hits the ground and velocity is flipped, it can't reach as high as it was before, because gravity has been working against it as it moves upward, until it stops. It stops long before it reaches the previous height. Then this process repeats." />
  <row Id="29207" PostHistoryTypeId="13" PostId="13179" RevisionGUID="c8d4071b-5d8e-4346-b432-9d0d59c1a1bb" CreationDate="2011-06-05T04:28:31.303" UserId="5021" Text="[{&quot;Id&quot;:5021,&quot;DisplayName&quot;:&quot;Olhovsky&quot;}]" />
  <row Id="29208" PostHistoryTypeId="5" PostId="13179" RevisionGUID="e96041d3-f124-4bb8-aa53-dcc2b2594617" CreationDate="2011-06-05T04:38:45.703" UserId="5021" Comment="added 126 characters in body; added 103 characters in body" Text="Your objects are bouncing with subsequently smaller bounces because you are applying basic newtonian physics rules to your objects, so they mimic behavior of such objects as you'd expect them to in real life.&#xD;&#xA;&#xD;&#xA;You are constantly applying gravity to the velocity of the objects.&#xD;&#xA;&#xD;&#xA;When you flip the direction of velocity, the object is now moving up, with an upward velocity, but you are removing some of this velocity with a downward gravity velocity application!&#xD;&#xA;&#xD;&#xA;The problem is that you are using [Euler integration][1] to approximate the integration of force.&#xD;&#xA;&#xD;&#xA;So when your object hits the ground and velocity is flipped, it can't reach as high as it was before, because the application of gravity is not perfectly accurately integrated (it would be if you had an infintesimally small timestep).&#xD;&#xA;&#xD;&#xA;Read &quot;Why Euler's is never good enough&quot;:&#xD;&#xA;http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Euler_method" />
  <row Id="29209" PostHistoryTypeId="5" PostId="13179" RevisionGUID="ea125de0-5636-425e-acb7-8e452ba41418" CreationDate="2011-06-05T05:00:17.317" UserId="5021" Comment="added 156 characters in body; added 88 characters in body" Text="Your objects are bouncing with subsequently smaller bounces because you are applying basic newtonian physics rules to your objects, so they mimic behavior of such objects as you'd expect them to in real life.&#xD;&#xA;&#xD;&#xA;You are constantly applying gravity to the velocity of the objects.&#xD;&#xA;&#xD;&#xA;When you flip the direction of velocity, the object is now moving up, with an upward velocity, but you are removing some of this velocity with a downward gravity velocity application. With perfect elasticity, and zero friction, you'd expect the object to reach the previous height, but...&#xD;&#xA;&#xD;&#xA;You are using [Euler integration][1] to approximate the integration of force. This approximation underestimates the effect of the force application.&#xD;&#xA;&#xD;&#xA;So when your object hits the ground and velocity is flipped, it can't reach as high as it was before, because the application of gravity is not perfectly accurately integrated (it would be if you had an infintesimally small timestep).&#xD;&#xA;&#xD;&#xA;Read &quot;Why Euler's is never good enough&quot;:&#xD;&#xA;http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;&#xD;&#xA;I think that Euler's actually **is** often good enough, but that's another matter...&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Euler_method" />
  <row Id="29210" PostHistoryTypeId="2" PostId="13180" RevisionGUID="ff63be38-8152-4ad9-a1a8-5f6e16f882f6" CreationDate="2011-06-05T06:07:38.403" UserId="5554" Text="OpenGL contexts before and after OpenGL 3.0 are rather different. So far I've really only worked with buffers on either side anyway, I do know the most notable difference is lack of Immediate Mode. &#xD;&#xA;&#xD;&#xA;Throwing out Immediate Mode considerations all together, what important differences should I look out for specifically when coding low-level two dimensional operations in a 2-D graphics engine?" />
  <row Id="29211" PostHistoryTypeId="1" PostId="13180" RevisionGUID="ff63be38-8152-4ad9-a1a8-5f6e16f882f6" CreationDate="2011-06-05T06:07:38.403" UserId="5554" Text="OpenGL 2 and back vs 3 and forward: What are the key differences for 2D graphics?" />
  <row Id="29212" PostHistoryTypeId="3" PostId="13180" RevisionGUID="ff63be38-8152-4ad9-a1a8-5f6e16f882f6" CreationDate="2011-06-05T06:07:38.403" UserId="5554" Text="&lt;opengl&gt;&lt;2d&gt;&lt;engine&gt;&lt;graphics-programming&gt;" />
  <row Id="29213" PostHistoryTypeId="25" PostId="13178" RevisionGUID="e5082dfc-2dc0-47f2-ad7b-8545e2f66ed7" CreationDate="2011-06-05T06:13:40.517" Comment="http://twitter.com/#!/StackGameDev/status/77256753951154176" />
  <row Id="29214" PostHistoryTypeId="2" PostId="13181" RevisionGUID="c048f3bc-db68-4ec5-b223-13a3500e909d" CreationDate="2011-06-05T06:52:38.500" UserId="7826" Text="I'm looking for a graphic engine programmer that knows both OpenGL and software rendering code to hire for a very short period (2 days). It's urgent and I'm willing to pay a very high amount of money. Any ideas where I could find one?" />
  <row Id="29215" PostHistoryTypeId="1" PostId="13181" RevisionGUID="c048f3bc-db68-4ec5-b223-13a3500e909d" CreationDate="2011-06-05T06:52:38.500" UserId="7826" Text="Having a hard time finding a graphic engine programmer" />
  <row Id="29216" PostHistoryTypeId="3" PostId="13181" RevisionGUID="c048f3bc-db68-4ec5-b223-13a3500e909d" CreationDate="2011-06-05T06:52:38.500" UserId="7826" Text="&lt;opengl&gt;&lt;c++&gt;&lt;graphics-programming&gt;&lt;hiring&gt;" />
  <row Id="29217" PostHistoryTypeId="2" PostId="13182" RevisionGUID="becee6d2-6f96-4650-828b-ad9669ec5471" CreationDate="2011-06-05T06:58:43.487" UserId="7328" Text="try http://careers.stackoverflow.com/" />
  <row Id="29218" PostHistoryTypeId="2" PostId="13183" RevisionGUID="c1fb439c-f7a2-490f-b1a0-9dc3407b427c" CreationDate="2011-06-05T07:01:08.443" UserId="7328" Text="after amny attempts I went with box2d." />
  <row Id="29219" PostHistoryTypeId="2" PostId="13184" RevisionGUID="46a0cd5b-9e10-4bb4-a4ca-2ccbe4c90afd" CreationDate="2011-06-05T07:15:56.787" UserId="51" Text="I'm not sure what kind of project that requires significant expertise you can actually do in 2 days, but your best bet is to probably look at the resumes posted on the gamasutra jobs board.&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/jobs/" />
  <row Id="29220" PostHistoryTypeId="2" PostId="13185" RevisionGUID="d5c7fca7-64b6-4109-99fe-5b5b2b53a8e7" CreationDate="2011-06-05T07:30:32.180" UserId="4443" Text="We used a state system, as you mentioned before.&#xD;&#xA;&#xD;&#xA;We would create a map that would contain all the keys for a specific state with a flag that would allow pass through of previously mapped keys or not. When we changed states the new map would be pushed on or a previous map would be popped off.&#xD;&#xA;&#xD;&#xA;Quick simple example of input states would be Default, In-Menu and Magic-Mode. Default is where you are running around and playing the game. In-Menu would be when you are at the start menu, or when you have opened up a shop menu, the pause menu, an options screen. In-Menu would contain the no pass through flag because as you navigate a menu you do not want your character moving around. On the other side, much like your example with the carrying of the item, the Magic-Mode would simply remap the action/item use keys to instead cast spells (we would also tie that to sound and particle effects but that is a bit beyond your question).&#xD;&#xA;&#xD;&#xA;What causes the maps to be pushed and popped is up to you, and I also will honestly say is we had certain 'clear' events to make sure the map stack was kept clean, level loading being the most obvious time (Cutscenes as well at times).&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;TL;DR - Use states and an input map that you can push and/or pop. Include a flag to say whether or not the map completely removes previous input or not." />
  <row Id="29221" PostHistoryTypeId="5" PostId="13181" RevisionGUID="cd145910-81a9-4e16-874a-b0c40a07d8fc" CreationDate="2011-06-05T07:50:33.823" UserId="7826" Comment="Added a clarifications section" Text="I'm looking for a graphic engine programmer that knows both OpenGL and software rendering code to hire for a very short period (2 days). It's urgent and I'm willing to pay a very high amount of money. Any ideas where I could find one keeping in mind the points mentioned below?&#xD;&#xA;&#xD;&#xA;**Clarifications**&#xD;&#xA;&#xD;&#xA; 1. I am not specifically looking for significant expertise, even intermediate knowledge in OpenGL and software rendering engine code will do.&#xD;&#xA; 2. I do not represent a company therefore I can't use gamasutra jobs, stackoverflow careers, etc." />
  <row Id="29222" PostHistoryTypeId="2" PostId="13186" RevisionGUID="ae1189f5-19bc-4ee0-bb17-ff0c1676cefc" CreationDate="2011-06-05T08:12:54.920" UserId="1839" Text="As long as you only apply only **constant acceleration** (you only seem to have gravity) **Eulers Method is ok** and the ball must bounce forever, reaching its initial position again after each bounce phase. There must be something wrong with the implementation. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity." />
  <row Id="29223" PostHistoryTypeId="5" PostId="13186" RevisionGUID="3fe977f0-3095-4c08-82c4-bc3a12f350a4" CreationDate="2011-06-05T08:20:33.777" UserId="1839" Comment="deleted 5 characters in body; added 6 characters in body" Text="As long as you only apply **constant acceleration** (you only seem to have gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. There must be something wrong with the implementation. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity." />
  <row Id="29224" PostHistoryTypeId="2" PostId="13187" RevisionGUID="ba057c37-e90b-41f4-ad8d-b60c5c69675d" CreationDate="2011-06-05T08:26:38.760" UserId="4947" Text="You can try: [OpenGL Job Classifieds][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/jobs/" />
  <row Id="29225" PostHistoryTypeId="2" PostId="13188" RevisionGUID="393d4a89-7447-4b33-9d30-52495d1971ee" CreationDate="2011-06-05T08:38:26.967" UserId="4947" Text="You can find a lot of information here: [OpenGL registry][1]. There is a lot of extensions. Each section (ARB, EXT, ...) are ordered according to adding date. New extensions are written against newer versions of OpenGL. For example - if I look at ARB section, almost every extension under ARB_timer_query (including) is written against OpenGL 3.2 or newer.&#xD;&#xA;&#xD;&#xA;You also mentioned buffers, so you can try extension GL_NV_vertex_buffer_unified_memory. Some info can be found [here][2] (there is also link to presentation). &#xD;&#xA;&#xD;&#xA;Also shader_buffer_load should be usefull, if you are using shaders, but I haven't read the specification yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/registry/&#xD;&#xA;  [2]: http://developer.nvidia.com/content/bindless-graphics" />
  <row Id="29226" PostHistoryTypeId="5" PostId="13186" RevisionGUID="4766daf6-4bd8-481c-8750-c12a16ee7fb1" CreationDate="2011-06-05T08:38:38.417" UserId="1839" Comment="added 64 characters in body" Text="As long as you only apply **constant acceleration** (you only seem to have gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. There must be something wrong with the implementation. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity." />
  <row Id="29227" PostHistoryTypeId="5" PostId="13186" RevisionGUID="47d7da97-3326-466c-82c8-939ac98cc843" CreationDate="2011-06-05T09:03:58.983" UserId="1839" Comment="deleted 8 characters in body" Text="As long as you only apply **constant acceleration** (i.e. constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. There must be something wrong with the implementation. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity." />
  <row Id="29228" PostHistoryTypeId="25" PostId="13180" RevisionGUID="87a2ba4b-fad9-4630-a3fc-4d9c1ebecfc7" CreationDate="2011-06-05T09:13:40.010" Comment="http://twitter.com/#!/StackGameDev/status/77302049632555008" />
  <row Id="29229" PostHistoryTypeId="6" PostId="4585" RevisionGUID="83e77fe3-ad37-4b65-935c-d050180c0c02" CreationDate="2011-06-05T09:22:12.133" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;2d-physics&gt;&lt;physics-engine&gt;" />
  <row Id="29230" PostHistoryTypeId="2" PostId="13189" RevisionGUID="63ef5772-c97c-4c46-bc2e-fe7cefcf77e0" CreationDate="2011-06-05T09:28:52.290" UserId="7103" Text="Recently Microsoft announced using silverlight to render unicode texts in XNA with its mango update for WP7. I think this might solve this issue. I think one just needs to render TextBlock control into XNA, which can handle unicode well." />
  <row Id="29231" PostHistoryTypeId="5" PostId="13186" RevisionGUID="9545081f-c950-4683-a249-54072542fb39" CreationDate="2011-06-05T09:37:35.037" UserId="1839" Comment="deleted 2 characters in body; added 2 characters in body; added 26 characters in body" Text="As long as you only apply **constant acceleration** (i.e. constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. If not, then there is something wrong with the implementation of Euler's Method. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity." />
  <row Id="29232" PostHistoryTypeId="2" PostId="13190" RevisionGUID="2241f25b-b8e5-4c45-ad97-dcf1761cf66f" CreationDate="2011-06-05T10:00:01.763" UserId="3505" Text="Olhovsky explains the problem, but he left out the simple fix. Apply gravity twice.&#xD;&#xA;&#xD;&#xA;Basically you are doing three things over and over.&#xD;&#xA;&#xD;&#xA;Gravity  &#xD;&#xA;Collision  &#xD;&#xA;Movement&#xD;&#xA;&#xD;&#xA;Swap the order of any two and you'd actually get the opposite problem. Do a halfway swap and you are even. In practice that means do half the gravity before collision checks, and half the gravity after.&#xD;&#xA;&#xD;&#xA;½ Gravity  &#xD;&#xA;Collision  &#xD;&#xA;½ Gravity  &#xD;&#xA;Movement" />
  <row Id="29233" PostHistoryTypeId="2" PostId="13191" RevisionGUID="37a01b41-dbea-4bf7-94fd-d20093e7e938" CreationDate="2011-06-05T10:07:56.463" UserId="6540" Text="What would be a good algorithm for the Fifteen puzzle, if the puzzle is slightly modified in that you only have a small number of pieces that should be placed correctly  and these correcly placed pieces can be located anywhere on the board&#xD;&#xA;&#xD;&#xA;Say we had the board&#xD;&#xA;&#xD;&#xA;1100  &#xD;&#xA;1000  &#xD;&#xA;0000  &#xD;&#xA;000  &#xD;&#xA;&#xD;&#xA;and we need the shape &#xD;&#xA;&#xD;&#xA;111 anywhere in the board so&#xD;&#xA;&#xD;&#xA;1110  &#xD;&#xA;0000  &#xD;&#xA;0000  &#xD;&#xA;000   &#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;0000  &#xD;&#xA;0010  &#xD;&#xA;0010  &#xD;&#xA;001    &#xD;&#xA;&#xD;&#xA;are winning results." />
  <row Id="29234" PostHistoryTypeId="1" PostId="13191" RevisionGUID="37a01b41-dbea-4bf7-94fd-d20093e7e938" CreationDate="2011-06-05T10:07:56.463" UserId="6540" Text="Fifteen puzzle modifications algorithm" />
  <row Id="29235" PostHistoryTypeId="3" PostId="13191" RevisionGUID="37a01b41-dbea-4bf7-94fd-d20093e7e938" CreationDate="2011-06-05T10:07:56.463" UserId="6540" Text="&lt;algorithm&gt;" />
  <row Id="29236" PostHistoryTypeId="5" PostId="13191" RevisionGUID="c2990ca9-6f79-4013-8eeb-c41596cb40b6" CreationDate="2011-06-05T10:30:52.067" UserId="6540" Comment="added 1 characters in body" Text="What would be a good algorithm for the Fifteen puzzle, if the puzzle is slightly modified in that you only have a small number of pieces that should be placed correctly  and these correctly placed pieces can be located anywhere on the board&#xD;&#xA;&#xD;&#xA;Say we had the board&#xD;&#xA;&#xD;&#xA;1100  &#xD;&#xA;1000  &#xD;&#xA;0000  &#xD;&#xA;000  &#xD;&#xA;&#xD;&#xA;and we need the shape &#xD;&#xA;&#xD;&#xA;111 anywhere in the board so&#xD;&#xA;&#xD;&#xA;1110  &#xD;&#xA;0000  &#xD;&#xA;0000  &#xD;&#xA;000   &#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;0000  &#xD;&#xA;0010  &#xD;&#xA;0010  &#xD;&#xA;001    &#xD;&#xA;&#xD;&#xA;are winning results." />
  <row Id="29237" PostHistoryTypeId="2" PostId="13192" RevisionGUID="39d378f6-cf36-4b0c-89c5-a4a15ecb1d14" CreationDate="2011-06-05T11:14:31.043" UserId="3505" Text="There are only 7280 different positions, you could easily make an index of all of them. Then you could build a solution tree, start from the legal solutions, work out all possible previous positions, put the move required in the index, then from these positions work out the previous positions, register the move in the index etc. It is important that when a position already has a registered move you do not overwrite it but instead just drop that branch.&#xD;&#xA;&#xD;&#xA;This way your index will contain the optimal move for every possible position." />
  <row Id="29238" PostHistoryTypeId="2" PostId="13193" RevisionGUID="1b37909f-b7a6-4de7-8eba-4d71bb526d03" CreationDate="2011-06-05T11:41:48.327" UserId="6188" Text="I have a very general question: In games, what use does the programming concept of a window have? Or, in other words, why do some game dev libraries offer interfaces through which to create multiple windows? &amp;mdash; Why would you need more than one windows in a game? &#xD;&#xA;&#xD;&#xA;Are multiple windows used as different views/states of the game? (I.e. in-game, main menu, pause menu, etc.)&#xD;&#xA; " />
  <row Id="29239" PostHistoryTypeId="1" PostId="13193" RevisionGUID="1b37909f-b7a6-4de7-8eba-4d71bb526d03" CreationDate="2011-06-05T11:41:48.327" UserId="6188" Text="What are windows used for?" />
  <row Id="29240" PostHistoryTypeId="3" PostId="13193" RevisionGUID="1b37909f-b7a6-4de7-8eba-4d71bb526d03" CreationDate="2011-06-05T11:41:48.327" UserId="6188" Text="&lt;programming&gt;&lt;design-patterns&gt;" />
  <row Id="29241" PostHistoryTypeId="2" PostId="13194" RevisionGUID="ccb059d4-ac99-463e-be70-980d129cb7e6" CreationDate="2011-06-05T12:06:36.353" UserId="4662" Text="Some devices can render to more than one window. It's increasingly common for desktop computers to have two screens, and there are platforms like the DS and 3DS that offer multiple screens." />
  <row Id="29242" PostHistoryTypeId="2" PostId="13195" RevisionGUID="fbde04b8-0d5c-49d4-849f-87ace433977d" CreationDate="2011-06-05T12:11:09.020" UserId="1156" Text="They are literally as you describe; a window is a window on the screen. It is separate from a 'View', which acts like a viewport (a part of the display) or a 'State' (which is more like a separate menu)." />
  <row Id="29243" PostHistoryTypeId="25" PostId="13193" RevisionGUID="47e3a27f-5934-4a7b-b523-b39630235b64" CreationDate="2011-06-05T12:13:40.177" Comment="http://twitter.com/#!/StackGameDev/status/77347350141607936" />
  <row Id="29244" PostHistoryTypeId="2" PostId="13196" RevisionGUID="e1944090-afed-4119-b831-c92b9990001c" CreationDate="2011-06-05T13:07:46.480" UserId="5824" Text="While most games don't use multiple windows, tools will often create more than one separate window that they want to render to." />
  <row Id="29245" PostHistoryTypeId="2" PostId="13197" RevisionGUID="36710c66-47e5-48cd-bdef-f5ed48b7cc3d" CreationDate="2011-06-05T13:34:11.323" UserId="7819" Text="I had a question about How to calculate the enemy to arrive in the middle of cell. &#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/13170/how-to-calculate-the-enemy-to-arrive-in-the-middle-of-cell&#xD;&#xA;&#xD;&#xA;The posters pointed out that the direction of the enemy isn't needed because the velocity already has a direction. I modified the code - &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;    if(position.x &lt; start.position.x) {&#xD;&#xA;    			velocity.x = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.x &gt; start.position.x){&#xD;&#xA;    			velocity.x = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.x = 0;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		if(position.y &lt; start.position.y) {&#xD;&#xA;    			velocity.y = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.y &gt; start.position.y){&#xD;&#xA;    			velocity.y = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.y = 0;&#xD;&#xA;    		}&#xD;&#xA;    		position.add(velocity.x * deltaTime, velocity.y * deltaTime);&#xD;&#xA;&#xD;&#xA;The enemy's movements were choppy after it go around the tower. I added the range of the middle of a cell but it looks like it'll stop in certain places. &#xD;&#xA;&#xD;&#xA;    public void plotPath(Cell start, float deltaTime) {&#xD;&#xA;    		&#xD;&#xA;    		if(position.x &lt; start.position.x &amp;&amp; Math.abs((start.position.x - position.x)) &gt; 0.01f) {&#xD;&#xA;    			velocity.x = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.x &gt; start.position.x &amp;&amp; Math.abs((position.x - start.position.x)) &gt; 0.01f){&#xD;&#xA;    			velocity.x = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.x = 0;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		if(position.y &lt; start.position.y &amp;&amp; Math.abs((start.position.x - position.x)) &gt; 0.01f) {&#xD;&#xA;    			velocity.y = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.y &gt; start.position.y &amp;&amp; Math.abs((position.y - start.position.y)) &gt; 0.01f){&#xD;&#xA;    			velocity.y = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.y = 0;&#xD;&#xA;    		}&#xD;&#xA;    		position.add(velocity.x * deltaTime, velocity.y * deltaTime);&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;I think Math.abs((position.y - start.position.y)) is a wrong way to calculate. I tried to fix 0.1f to different value, but it'll stop somewhere after passing the tower." />
  <row Id="29246" PostHistoryTypeId="1" PostId="13197" RevisionGUID="36710c66-47e5-48cd-bdef-f5ed48b7cc3d" CreationDate="2011-06-05T13:34:11.323" UserId="7819" Text="Choppy enemy movement" />
  <row Id="29247" PostHistoryTypeId="3" PostId="13197" RevisionGUID="36710c66-47e5-48cd-bdef-f5ed48b7cc3d" CreationDate="2011-06-05T13:34:11.323" UserId="7819" Text="&lt;tower-defense&gt;" />
  <row Id="29248" PostHistoryTypeId="5" PostId="13197" RevisionGUID="e0946aec-25bd-49e1-b8e1-54ec8dd7f6cc" CreationDate="2011-06-05T14:08:46.903" UserId="7819" Comment="added 54 characters in body" Text="I had a question about How to calculate the enemy to arrive in the middle of cell. &#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/13170/how-to-calculate-the-enemy-to-arrive-in-the-middle-of-cell&#xD;&#xA;&#xD;&#xA;The posters pointed out that the direction of the enemy isn't needed because the velocity already has a direction. I modified the code - &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;    if(position.x &lt; start.position.x) {&#xD;&#xA;    			velocity.x = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.x &gt; start.position.x){&#xD;&#xA;    			velocity.x = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.x = 0;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		if(position.y &lt; start.position.y) {&#xD;&#xA;    			velocity.y = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.y &gt; start.position.y){&#xD;&#xA;    			velocity.y = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.y = 0;&#xD;&#xA;    		}&#xD;&#xA;    		position.add(velocity.x * deltaTime, velocity.y * deltaTime);&#xD;&#xA;&#xD;&#xA;The enemy's movements were choppy after it go around the tower I added the range of the middle of a cell but it looks like it'll stop in certain places. &#xD;&#xA;&#xD;&#xA;    public void plotPath(Cell start, float deltaTime) {&#xD;&#xA;    		&#xD;&#xA;    		if(position.x &lt; start.position.x &amp;&amp; Math.abs((start.position.x - position.x)) &gt; 0.01f) {&#xD;&#xA;    			velocity.x = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.x &gt; start.position.x &amp;&amp; Math.abs((position.x - start.position.x)) &gt; 0.01f){&#xD;&#xA;    			velocity.x = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.x = 0;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		if(position.y &lt; start.position.y &amp;&amp; Math.abs((start.position.x - position.x)) &gt; 0.01f) {&#xD;&#xA;    			velocity.y = ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else if(position.y &gt; start.position.y &amp;&amp; Math.abs((position.y - start.position.y)) &gt; 0.01f){&#xD;&#xA;    			velocity.y = -ENEMY_VELOCITY;&#xD;&#xA;    		}&#xD;&#xA;    		else {&#xD;&#xA;    			velocity.y = 0;&#xD;&#xA;    		}&#xD;&#xA;    		position.add(velocity.x * deltaTime, velocity.y * deltaTime);&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;I think Math.abs((position.y - start.position.y)) is a wrong way to calculate. I tried to fix 0.1f to different value, but it'll stop somewhere after passing the tower or having choppy movements, it's much less than before." />
  <row Id="29249" PostHistoryTypeId="2" PostId="13198" RevisionGUID="96856b11-a463-4509-bf4f-d2b7c9cce65a" CreationDate="2011-06-05T14:16:31.443" UserId="7830" Text="I'm trying to build a uniform grid made of 3D points over the surface of an arbitrary mesh (we have texture-coordinates for each vertex...)&#xD;&#xA;&#xD;&#xA;Or to reformulate: imagine a mesh textured with a texture featuring equally spaced dots: I want to obtain the 3D coordinates of these dots.&#xD;&#xA;&#xD;&#xA;So far, I'm able to generate a normal for each triangle of the mesh but it is not enough.&#xD;&#xA;&#xD;&#xA;If I had the right matrix, or quaternion or even orthonormal-basis for each triangle, I guess that I could transform any 2D coordinates (on the triangle's plane) to 3D coordinates (in object space...)&#xD;&#xA;&#xD;&#xA;The problem is how to rotate properly in regards to texture coordinates?&#xD;&#xA;&#xD;&#xA;To be more specific: for each triangle, I can define a normal. It could serve as the x,y,z part of a quaternion. But how could I generate the w part?" />
  <row Id="29250" PostHistoryTypeId="1" PostId="13198" RevisionGUID="96856b11-a463-4509-bf4f-d2b7c9cce65a" CreationDate="2011-06-05T14:16:31.443" UserId="7830" Text="How to generate a rotation matrix or a quaternion (properly rotated in regards to texture coordinates) for each triangle of a mesh?" />
  <row Id="29251" PostHistoryTypeId="3" PostId="13198" RevisionGUID="96856b11-a463-4509-bf4f-d2b7c9cce65a" CreationDate="2011-06-05T14:16:31.443" UserId="7830" Text="&lt;opengl&gt;&lt;math&gt;&lt;geometry&gt;" />
  <row Id="29252" PostHistoryTypeId="2" PostId="13199" RevisionGUID="e272f615-5aa1-4e7d-a647-f5957d9ba7a4" CreationDate="2011-06-05T14:34:48.627" UserId="7830" Text="An attempt at answering my own question...&#xD;&#xA;&#xD;&#xA;Given a triangle defined with 3 texture coordinates represented by the following 2D points: t1, t2 and t3...&#xD;&#xA;&#xD;&#xA;Could it be just a matter of defining an angle via the dot product of vector t1-t2 with vector t2-t3?&#xD;&#xA;&#xD;&#xA;I will post the results in any-case." />
  <row Id="29253" PostHistoryTypeId="2" PostId="13200" RevisionGUID="d8415596-3bd7-4bcb-9589-6637a054f424" CreationDate="2011-06-05T14:48:59.633" UserId="1839" Text="You can just use the texture-coordinates to define the triangle points. Just put them into x and y of the point and leave z at zero.&#xD;&#xA;&#xD;&#xA;**Example:**  &#xD;&#xA;&#xD;&#xA;`texUV {u, v}` are the 3 texture-coordinates for 1 trangle&#xD;&#xA;&#xD;&#xA;`p` are the 3 associated euclidean points of the triangle&#xD;&#xA;&#xD;&#xA;    texUV0 = {0.0, 0.0}&#xD;&#xA;    texUV1 = {0.5, 0.5}&#xD;&#xA;    texUV2 = {0.5, 0.0}&#xD;&#xA;    &#xD;&#xA;    p0 = {texUV0.u, texUV0.v, 0.0}&#xD;&#xA;    p1 = {texUV1.u, texUV1.v, 0.0}&#xD;&#xA;    p2 = {texUV2.u, texUV2.v, 0.0}&#xD;&#xA;    &#xD;&#xA;    p0 = {0.0, 0.0, 0.0}&#xD;&#xA;    p1 = {0.5, 0.5, 0.0}&#xD;&#xA;    p2 = {0.5, 0.0, 0.0}&#xD;&#xA;&#xD;&#xA;The normal for this triangle is `{0.0, 0.0, 1.0}` or `{0.0, 0.0, -1.0}` depending on your definition of a front face, clockwise or counterclockwise.&#xD;&#xA;" />
  <row Id="29254" PostHistoryTypeId="25" PostId="13198" RevisionGUID="1aa23841-3a24-4cb9-b9f1-42a6ca6f0361" CreationDate="2011-06-05T15:13:40.383" Comment="http://twitter.com/#!/StackGameDev/status/77392648905818112" />
  <row Id="29255" PostHistoryTypeId="2" PostId="13201" RevisionGUID="c256f0cb-5b19-4e6d-9122-5db6997d6df3" CreationDate="2011-06-05T15:42:40.140" UserId="3128" Text="I would like to differentiate the look as much as I can but yet it has to be within the limits of what is reasonable for a single programmer can do.  I have alot of ideas that would make the game itself different but I'm afraid the look of the blocky world and blocky characters are going to be too much like Minecraft.  I've toyed around with the idea of giving the characters big heads, or skinny bodies, or elbows and knees.  " />
  <row Id="29256" PostHistoryTypeId="1" PostId="13201" RevisionGUID="c256f0cb-5b19-4e6d-9122-5db6997d6df3" CreationDate="2011-06-05T15:42:40.140" UserId="3128" Text="I'm a single developer making a game made of blocks. Can I make 3d characters made of blocks without looking like Minecraft?" />
  <row Id="29257" PostHistoryTypeId="3" PostId="13201" RevisionGUID="c256f0cb-5b19-4e6d-9122-5db6997d6df3" CreationDate="2011-06-05T15:42:40.140" UserId="3128" Text="&lt;game-design&gt;&lt;3d&gt;&lt;art&gt;&lt;voxels&gt;&lt;minecraft&gt;" />
  <row Id="29258" PostHistoryTypeId="5" PostId="13200" RevisionGUID="e3060a51-80e6-4238-a93a-adcd963304f8" CreationDate="2011-06-05T15:58:08.400" UserId="1839" Comment="added 741 characters in body" Text="**Edit new answer:**&#xD;&#xA;&#xD;&#xA;Ok this shows you how to calculate the rotation-matrix that rotates the triangle from its local space into world-space.&#xD;&#xA;&#xD;&#xA;Given `normalLocal` (the normal of the triangle in object-space) and `normalWorld` (the normal of the triangle in world-space)&#xD;&#xA;&#xD;&#xA;1. Find the rotation-axis by taking the cross-product of the 2 normals &#xD;&#xA;&#xD;&#xA;    `axis = normalLocal cross normalWorld`&#xD;&#xA;	&#xD;&#xA;2. Find the rotation angle by taking arccosine of the dot-product of both normals&#xD;&#xA;&#xD;&#xA;    `angle = acos(normalLocal dot normalWorld)`&#xD;&#xA;	&#xD;&#xA;3. Now create a [rotation-matrix][1] from those values .	&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---------------------&#xD;&#xA;**Old obsolete answer:**&#xD;&#xA;&#xD;&#xA;You can just use the texture-coordinates to define the triangle points. Just put them into x and y of the point and leave z at zero.&#xD;&#xA;&#xD;&#xA;**Example:**  &#xD;&#xA;&#xD;&#xA;`texUV {u, v}` are the 3 texture-coordinates for 1 trangle&#xD;&#xA;&#xD;&#xA;`p` are the 3 associated euclidean points of the triangle&#xD;&#xA;&#xD;&#xA;    texUV0 = {0.0, 0.0}&#xD;&#xA;    texUV1 = {0.5, 0.5}&#xD;&#xA;    texUV2 = {0.5, 0.0}&#xD;&#xA;    &#xD;&#xA;    p0 = {texUV0.u, texUV0.v, 0.0}&#xD;&#xA;    p1 = {texUV1.u, texUV1.v, 0.0}&#xD;&#xA;    p2 = {texUV2.u, texUV2.v, 0.0}&#xD;&#xA;    &#xD;&#xA;    p0 = {0.0, 0.0, 0.0}&#xD;&#xA;    p1 = {0.5, 0.5, 0.0}&#xD;&#xA;    p2 = {0.5, 0.0, 0.0}&#xD;&#xA;&#xD;&#xA;The normal for this triangle is `{0.0, 0.0, 1.0}` or `{0.0, 0.0, -1.0}` depending on your definition of a front face, clockwise or counterclockwise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle" />
  <row Id="29259" PostHistoryTypeId="2" PostId="13202" RevisionGUID="3e6e01f3-9cdc-44fa-b1a2-f2b63d1a186c" CreationDate="2011-06-05T16:15:50.810" UserId="4559" Text="I have an artillery game (hobby-learning project) and when the projectile hits it leaves a hole in the ground. I want this hole to have antialiased edges. I'm using `System.Drawing` for this. I've tried with clipping paths, and drawing with a transparent color using `gfx.CompositingMode = CompositingMode.SourceCopy`, but it gives me the same result. If I draw a circle with a solid color it works fine, but I need a hole, a circle with 0 alpha values. I have enabled these but they work only with solid colors.&#xD;&#xA;&#xD;&#xA;    gfx.CompositingQuality = CompositingQuality.HighQuality;&#xD;&#xA;    gfx.InterpolationMode = InterpolationMode.HighQualityBicubic;&#xD;&#xA;    gfx.SmoothingMode = SmoothingMode.AntiAlias;&#xD;&#xA;&#xD;&#xA; In the two pictures consider black as being transparent.&#xD;&#xA;&#xD;&#xA;This is what I have (zoomed in):  &#xD;&#xA;![What I have][1]&#xD;&#xA;&#xD;&#xA;And what I need is something like this (made with photoshop):  &#xD;&#xA;![What I need][2]&#xD;&#xA;&#xD;&#xA;This will be just a visual effect, in code for collision detection I still treat everything with alpha &gt; 128 as solid.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/dJdBL.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/YU9W5.jpg" />
  <row Id="29260" PostHistoryTypeId="1" PostId="13202" RevisionGUID="3e6e01f3-9cdc-44fa-b1a2-f2b63d1a186c" CreationDate="2011-06-05T16:15:50.810" UserId="4559" Text="How do I draw anti-aliased holes in a bitmap." />
  <row Id="29261" PostHistoryTypeId="3" PostId="13202" RevisionGUID="3e6e01f3-9cdc-44fa-b1a2-f2b63d1a186c" CreationDate="2011-06-05T16:15:50.810" UserId="4559" Text="&lt;c#&gt;&lt;.net&gt;&lt;antialiasing&gt;" />
  <row Id="29262" PostHistoryTypeId="2" PostId="13203" RevisionGUID="58141376-5d03-48af-b386-d3ecb6f992c9" CreationDate="2011-06-05T16:24:01.280" UserId="5497" Text="If you end up stuck with overall body shapes that look like Minecraft's, your textures can help you stand apart. Without knowing your game's goals and limitations, you could use:&#xD;&#xA;&#xD;&#xA;-Higher or lower resolution textures.&#xD;&#xA;&#xD;&#xA;-Animated textures.&#xD;&#xA;&#xD;&#xA;-High-contrast textures (think Tron)&#xD;&#xA;&#xD;&#xA;There are lots of games done in pixel-art style that have interesting characters that stand out. And this is an odd time, just after Minecraft came out. For a while, everything will be compared to it, but eventually it will just be the first in a series of games in this genre/style. Maybe yours could be the *other* game we all compare to. :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29263" PostHistoryTypeId="2" PostId="13204" RevisionGUID="53e7a37c-a52c-4634-a370-13fb6459a003" CreationDate="2011-06-05T16:44:47.323" UserId="7829" Text="I am preparing sounds system to my game in xna. I am using XACT Tools, and i got problem.&#xD;&#xA;&#xD;&#xA;There is class SoundCategory. I can change sound level for all sounds in that category easily.&#xD;&#xA;&#xD;&#xA;    SoundCategory category = engine.GetCategory(&quot;music&quot;);&#xD;&#xA;    category.SetVolume(float_value);&#xD;&#xA;&#xD;&#xA;But there is no such function like:&#xD;&#xA;&#xD;&#xA;    category.AddVolume(float_value);&#xD;&#xA;&#xD;&#xA;Which would increase or deacrease that value. There is also no function that get current volume so i can do thing like:&#xD;&#xA;&#xD;&#xA;    float vol = category.Add(float_value);&#xD;&#xA;    vol += 0.1;&#xD;&#xA;    category.SetVolume(vol);&#xD;&#xA;&#xD;&#xA;Is there some clever way to achive what i want without creating some additional variables which keep current volume for all sounds categories ?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29264" PostHistoryTypeId="1" PostId="13204" RevisionGUID="53e7a37c-a52c-4634-a370-13fb6459a003" CreationDate="2011-06-05T16:44:47.323" UserId="7829" Text="Sounds categories volume level in xna." />
  <row Id="29265" PostHistoryTypeId="3" PostId="13204" RevisionGUID="53e7a37c-a52c-4634-a370-13fb6459a003" CreationDate="2011-06-05T16:44:47.323" UserId="7829" Text="&lt;xna&gt;&lt;sound&gt;" />
  <row Id="29266" PostHistoryTypeId="2" PostId="13205" RevisionGUID="c7632d76-a198-4a19-ac26-2d47e0f0414f" CreationDate="2011-06-05T16:45:11.723" UserId="1156" Text="You shouldn't be worried if a game 'looks' like another. Take Terraria; early alpha screenshots, people were 'ZOMG IT IS A MINECRAFT CLONE'. It gets released - obviously not like Minecraft at all.&#xD;&#xA;&#xD;&#xA;Then take something like FortressCraft - that is obviously a Minecraft clone. It has the same features, pretty much. The graphics have changed, maybe.&#xD;&#xA;&#xD;&#xA;As long as the core concept is different, and the graphics are different enough so that you would not confuse the two, you will not have a problem. Maybe try a realistic style person, instead of a blocky one?" />
  <row Id="29269" PostHistoryTypeId="2" PostId="13207" RevisionGUID="cbc0d867-7eb5-4bc2-a47a-46b409943bfe" CreationDate="2011-06-05T17:07:06.590" UserId="7833" Text="I trying create simple Multi-player with HTML5 Canvas, JavaScript(too using John Resig simple Inheritance library) and Node.js with Socket.IO.&#xD;&#xA;My client code:&#xD;&#xA;&lt;pre&gt;var canvas  = document.getElementById('game');&#xD;&#xA;var context = canvas.getContext('2d');&#xD;&#xA;var socket  = new io.Socket('127.0.0.1', {port: 8080});&#xD;&#xA;&#xD;&#xA;var player = null;&#xD;&#xA;&#xD;&#xA;var UP    = 'UP',&#xD;&#xA;    LEFT  = 'LEFT',&#xD;&#xA;    DOWN  = 'DOWN',&#xD;&#xA;    RIGHT = 'RIGHT';&#xD;&#xA;&#xD;&#xA;socket.connect();&#xD;&#xA;&#xD;&#xA;socket.on('connect', function() {socket.send();&#xD;&#xA;    console.log('Connected!');&#xD;&#xA;    player = new Player(50, 50);&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;socket.on('message', function(msg) {&#xD;&#xA;    if(msg == 'UP') {&#xD;&#xA;        player.moveUP();&#xD;&#xA;    } else if(msg == 'LEFT') {&#xD;&#xA;        player.moveLEFT();&#xD;&#xA;    } else if(msg == 'DOWN') {&#xD;&#xA;        player.moveDOWN();&#xD;&#xA;    } else if(msg == 'RIGHT') {&#xD;&#xA;        player.moveRIGHT();&#xD;&#xA;    } else {&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;socket.on('disconnect', function() {&#xD;&#xA;    console.log('Disconnected!');&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;var Player = Class.extend({&#xD;&#xA;    init : function(x, y) {&#xD;&#xA;        this.x = x;&#xD;&#xA;        this.y = y;&#xD;&#xA;    },&#xD;&#xA;    setX : function(x){&#xD;&#xA;        this.x = x;&#xD;&#xA;    },&#xD;&#xA;    getX : function(){&#xD;&#xA;        return this.x;&#xD;&#xA;    },&#xD;&#xA;    setY : function(y){&#xD;&#xA;        this.y = y;&#xD;&#xA;    },&#xD;&#xA;    getY : function(){&#xD;&#xA;        return this.y;&#xD;&#xA;    },&#xD;&#xA;    draw : function(){&#xD;&#xA;        context.clearRect(0, 0, 350, 150);&#xD;&#xA;        context.fillRect(this.x, this.y, 15, 15);&#xD;&#xA;    },&#xD;&#xA;    move : function() {&#xD;&#xA;        this.x += 1;&#xD;&#xA;        this.y += 1;&#xD;&#xA;    },&#xD;&#xA;    moveUP : function() {&#xD;&#xA;        this.y--;&#xD;&#xA;    },&#xD;&#xA;    moveLEFT : function() {&#xD;&#xA;        this.x--;&#xD;&#xA;    },&#xD;&#xA;    moveDOWN : function() {&#xD;&#xA;        this.y++;&#xD;&#xA;    },&#xD;&#xA;    moveRIGHT : function() {&#xD;&#xA;        this.x++;&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;function checkKeyCode(event) {&#xD;&#xA;    var keyCode;&#xD;&#xA;    if(event == null) {&#xD;&#xA;        keyCode = window.event.keyCode;&#xD;&#xA;    } else {&#xD;&#xA;        keyCode = event.keyCode;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    switch(keyCode) {&#xD;&#xA;        case 38: // UP&#xD;&#xA;            player.moveUP();&#xD;&#xA;            socket.send(UP);&#xD;&#xA;        break;&#xD;&#xA;        case 37: // LEFT&#xD;&#xA;            player.moveLEFT();&#xD;&#xA;            socket.send(LEFT);&#xD;&#xA;        break;&#xD;&#xA;        case 40: //DOWN&#xD;&#xA;            player.moveDOWN();&#xD;&#xA;            socket.send(DOWN);&#xD;&#xA;        break;&#xD;&#xA;        case 39: // RIGHT&#xD;&#xA;            player.moveRIGHT();&#xD;&#xA;            socket.send(RIGHT);&#xD;&#xA;        break;&#xD;&#xA;        default:&#xD;&#xA;        break;&#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function update() {&#xD;&#xA;    player.draw();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;var FPS = 30;&#xD;&#xA;setInterval(function() {&#xD;&#xA;    update();&#xD;&#xA;    player.draw();&#xD;&#xA;}, 1000/FPS);&#xD;&#xA;&#xD;&#xA;function init() {&#xD;&#xA;    document.onkeydown = checkKeyCode;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;init();&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;And server code:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;var http = require('http'),&#xD;&#xA;    io = require('socket.io'),&#xD;&#xA;    buffer = new Array(),&#xD;&#xA;&#xD;&#xA;server = http.createServer(function(req, res){&#xD;&#xA;    res.writeHead(200, {'Content-Type': 'text/html'});&#xD;&#xA;    res.end('&lt;h1&gt;Hello world&lt;/h1&gt;');&#xD;&#xA;});&#xD;&#xA;server.listen(8080);&#xD;&#xA;&#xD;&#xA;var socket = io.listen(server);&#xD;&#xA;&#xD;&#xA;socket.on('connection', function(client){&#xD;&#xA;&#xD;&#xA;    client.on('message', function(message){&#xD;&#xA;        console.log(message);&#xD;&#xA;        client.broadcast(message);&#xD;&#xA;    })&#xD;&#xA;    client.on('disconnect', function(){&#xD;&#xA;&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;});&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;And when I run two client's I with first client can move second client Rect and with second client move first client rect and something like with third client can move first and second client rect's.&#xD;&#xA;&#xD;&#xA;I have question how to create real Multi-Player? something like:&#xD;&#xA;Open three client's and first client get rect1, second rect2 and last rect3. First client only can move rect1, client third can move only rect3.&#xD;&#xA;&#xD;&#xA;Maybe anyone have idea? I search in Google but don't find answer.&#xD;&#xA;&#xD;&#xA;Sorry for my English language, Thanks." />
  <row Id="29270" PostHistoryTypeId="1" PostId="13207" RevisionGUID="cbc0d867-7eb5-4bc2-a47a-46b409943bfe" CreationDate="2011-06-05T17:07:06.590" UserId="7833" Text="Multiplayer HTML5, Node.js, Socket.IO" />
  <row Id="29271" PostHistoryTypeId="3" PostId="13207" RevisionGUID="cbc0d867-7eb5-4bc2-a47a-46b409943bfe" CreationDate="2011-06-05T17:07:06.590" UserId="7833" Text="&lt;multiplayer&gt;&lt;html5&gt;&lt;canvas&gt;&lt;websocket&gt;&lt;node.js&gt;" />
  <row Id="29272" PostHistoryTypeId="2" PostId="13208" RevisionGUID="ec7db07d-f5e9-4390-8ed5-5f5d7c2f8088" CreationDate="2011-06-05T17:48:23.097" UserId="4360" Text="I have created a framework specifically for creating HTML5 realtime multiplayer games, based on the Client/Server model. In this model, players send only input to the server (keys being pressed) - and the game occurs on the server. &#xD;&#xA;&#xD;&#xA;The server sends timed world-snapshots to all clients, and clients render themselves say 75 ms back in time from the current time, by finding two known world updates their rendertime falls between.&#xD;&#xA;&#xD;&#xA;Repository (contains 3 demos)  &#xD;&#xA;https://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs&#xD;&#xA;&#xD;&#xA;Video Box2D demo in action:  &#xD;&#xA;http://vimeo.com/24149718&#xD;&#xA;&#xD;&#xA;Slides from JSConf 2011:  &#xD;&#xA;http://www.slideshare.net/MarioGonzalez15/realtime-html5-multiplayergameswithnodejs-7868336&#xD;&#xA;&#xD;&#xA;It's based on Quakeworld and Valve's Source engine whitepapers:  &#xD;&#xA;http://fabiensanglard.net/quakeSource/index.php &#xD;&#xA;http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking" />
  <row Id="29274" PostHistoryTypeId="25" PostId="13202" RevisionGUID="5966d669-0a1d-4bae-a3bd-6d220699bf70" CreationDate="2011-06-05T18:13:40.220" Comment="http://twitter.com/#!/StackGameDev/status/77437946030071808" />
  <row Id="29275" PostHistoryTypeId="2" PostId="13210" RevisionGUID="0187c1b8-6190-4550-968b-9c85e6541fa7" CreationDate="2011-06-05T18:22:38.827" UserId="51" Text="Conceptually, the problem you're running in to is that you want to stop at an exact point and don't know how to handle the problem with time sliced velocity calculation.&#xD;&#xA;&#xD;&#xA;One way to solve this is to consider not moving the enemy at only your `ENEMY_VELOCITY` number.  When the distance between your current position and your desired position is less than your per-frame velocity, set your velocity for that frame to the distance.  That'll put you pretty much where you want to be (of course with float inaccuracies) and you can stop at that frame." />
  <row Id="29276" PostHistoryTypeId="2" PostId="13211" RevisionGUID="e566420b-533b-4171-86db-5fced42d2c1e" CreationDate="2011-06-05T18:36:33.407" UserId="4828" Text="I propose to solve this with A*.&#xD;&#xA;You have your start state, then you get neighbours from this state. Put your neighbours into priorityty queue statesToCheck ( where more valuable is state which has got more pieces on destination places ), also store visited states ( or shortcut from them ) to not visit the same state. Where you have destination state, you must back to start state - you must store information about how this state was created ( for example L - state was created by moving blank piece left ), second you must store &quot;parent state&quot; to know what was previous state in solution.&#xD;&#xA;Pseudocode:&#xD;&#xA;&#xD;&#xA;    Dictionary&lt;StateShortcut, char &gt; moves;&#xD;&#xA;    Dictionary&lt;StateShortcut, StateShortcut&gt; previousStates;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    solve = false;&#xD;&#xA;    queue.Add(startState);&#xD;&#xA;    while(queue.count &gt; 0 and solve == false)&#xD;&#xA;    {&#xD;&#xA;    currentState = queue.top;&#xD;&#xA;    Visit(currentState);&#xD;&#xA;    if(IsSolverd(currentState))&#xD;&#xA;    {&#xD;&#xA;    solve = true;&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;    neighbours = GetNotVisitedNeighbours(currentState);&#xD;&#xA;    SetNeighboursValues ( for prioritytyqueue)&#xD;&#xA;    for(State state in neighbours)&#xD;&#xA;    {&#xD;&#xA;    previousStates[state] = currentState;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    queue.add(neighbours);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is only psudocode, but I think you can base on it.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29277" PostHistoryTypeId="2" PostId="13212" RevisionGUID="1fa78179-eb8d-488a-a708-c2daaebf4a2e" CreationDate="2011-06-05T18:38:20.053" UserId="4828" Text="I think you can get volume from category, beacouse various sound in this category can have various volumes. When you set volume for category, you set the same for all." />
  <row Id="29278" PostHistoryTypeId="6" PostId="13202" RevisionGUID="29ad99dc-679d-40db-ab8a-a3c83e2386e1" CreationDate="2011-06-05T18:42:45.573" UserId="4559" Comment="edited tags" Text="&lt;c#&gt;&lt;.net&gt;&lt;antialiasing&gt;&lt;opentk&gt;" />
  <row Id="29279" PostHistoryTypeId="5" PostId="13192" RevisionGUID="06bbeda2-c06d-4933-80e6-34475787b776" CreationDate="2011-06-05T18:49:05.543" UserId="3505" Comment="added 304 characters in body" Text="There are only 7280 different positions, you could easily make an index of all of them. Then you could build a solution tree, start from the legal solutions, work out all possible previous positions, put the move required in the index, then from these positions work out the previous positions, register the move in the index etc. It is important that when a position already has a registered move you do not overwrite it but instead just drop that branch.&#xD;&#xA;&#xD;&#xA;This way your index will contain the optimal move for every possible position.&#xD;&#xA;&#xD;&#xA;Assuming that there is plenty space you could solve the &quot;puzzle&quot; by choosing a solution where there is at least a double wide edge of 0's on the bottom and right side of the figure, then you can systematically build it starting from the upper left corner and working you way towards the bottom right." />
  <row Id="29280" PostHistoryTypeId="2" PostId="13213" RevisionGUID="c0eb1522-46f6-4e1a-b159-ab7191ad2b72" CreationDate="2011-06-05T19:01:12.527" UserId="1198" Text="I suspect what you are trying to implement is a slider control in your game that allows the user to select the SFX volume and the Music volume independently. &#xD;&#xA;&#xD;&#xA;Assuming that's the case, whatever volume the user picks IS the value you set in `.SetVolume(float);` For example, every time the Music Volume slider changes, it changes a float variable from 0.0 to 1.0 and at that time, you call `.SetVolume(sliderValue);` If you are trying to implement an Up/Down volume control which moves in increments, you don't need to add .05f to the current sound, you need to always know what it was before (storing the volume value outside the SoundCategory)." />
  <row Id="29281" PostHistoryTypeId="2" PostId="13214" RevisionGUID="380e7586-f1ed-4016-aecb-e652515666ba" CreationDate="2011-06-05T19:13:57.730" UserId="7836" Text="I converted my projects .xnbs to .pngs using a program and i cant seem to find a way to transform .png to .xnb :/ pls help i dont want my work to get ruined Thanks in advance&#xD;&#xA;P.S.:Dont tell me to use GXView it shows an error while i try to save as .xnb" />
  <row Id="29282" PostHistoryTypeId="1" PostId="13214" RevisionGUID="380e7586-f1ed-4016-aecb-e652515666ba" CreationDate="2011-06-05T19:13:57.730" UserId="7836" Text="Game Sprite Editting Help(PNG-XNB)" />
  <row Id="29283" PostHistoryTypeId="3" PostId="13214" RevisionGUID="380e7586-f1ed-4016-aecb-e652515666ba" CreationDate="2011-06-05T19:13:57.730" UserId="7836" Text="&lt;2d&gt;&lt;textures&gt;" />
  <row Id="29284" PostHistoryTypeId="2" PostId="13215" RevisionGUID="0ec98279-cf01-4a98-a10a-248270ddb90a" CreationDate="2011-06-05T19:15:58.270" UserId="7835" Text="I make games with flash and i am interested in making games in html but i haven't seen any companies or websites which are willing to buy these games (i.e game sponsorships). i was hoping somebody could tell me about a company who would do this or why people don't buy html games?" />
  <row Id="29285" PostHistoryTypeId="1" PostId="13215" RevisionGUID="0ec98279-cf01-4a98-a10a-248270ddb90a" CreationDate="2011-06-05T19:15:58.270" UserId="7835" Text="how do you make money from html 5 games (i.e sponsorships)?" />
  <row Id="29286" PostHistoryTypeId="3" PostId="13215" RevisionGUID="0ec98279-cf01-4a98-a10a-248270ddb90a" CreationDate="2011-06-05T19:15:58.270" UserId="7835" Text="&lt;flash&gt;&lt;html5&gt;" />
  <row Id="29287" PostHistoryTypeId="2" PostId="13216" RevisionGUID="d45478c4-a947-40d1-a715-d53a522f6c91" CreationDate="2011-06-05T19:23:53.400" UserId="7591" Text="I have developed an algorithm that generates 2D terrain coordinates for my iOS 2D game. This may be a possible visual output:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The coordinates are stored in a 2D array. &#xD;&#xA;&#xD;&#xA;    mVertices[i][0] = ccp(sx, sy);&#xD;&#xA;    mVertices[i][1] = ccp(sx, 0);&#xD;&#xA;E.g. `sx` is increased in steps of `30px` while `i` is the number of steps. For each step a `sy` is generated. To get the line straight down I need a second point which is the second line of code.&#xD;&#xA;&#xD;&#xA;Imagine in the game there will be a character on that terrain. The terrain scrolls to the left while you have to move your character. Now I want to figure out what would be the best way for me to draw the terrain.&#xD;&#xA;&#xD;&#xA;One way is to pre-load the terrain. So I would generate the points for say 5000px along the x-axis when the user starts the game while a loading spash is displayed. &#xD;&#xA;&#xD;&#xA;Another way is to generate the terrain in real-time. I think this is the best solution here. What do you think?&#xD;&#xA;&#xD;&#xA;When I take the real-time way, how I do the array stuff? I mean the part that goes out of screen has to be removed from the array and there is a new step that is added.&#xD;&#xA;&#xD;&#xA;Maybe a classic array is not good as data structure for that prupose. I introduced it in my project because I can pass it to the `ccDrawPoly` function that takes a `CGPoint` array.&#xD;&#xA;&#xD;&#xA;Please share your ideas.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ZlxVJ.png&#xD;&#xA;" />
  <row Id="29288" PostHistoryTypeId="1" PostId="13216" RevisionGUID="d45478c4-a947-40d1-a715-d53a522f6c91" CreationDate="2011-06-05T19:23:53.400" UserId="7591" Text="How to deal with procedural terrain, pre-load or real-time calculation?" />
  <row Id="29289" PostHistoryTypeId="3" PostId="13216" RevisionGUID="d45478c4-a947-40d1-a715-d53a522f6c91" CreationDate="2011-06-05T19:23:53.400" UserId="7591" Text="&lt;2d&gt;&lt;cocos2d-iphone&gt;&lt;terrain-rendering&gt;" />
  <row Id="29290" PostHistoryTypeId="2" PostId="13217" RevisionGUID="5203462d-2b24-40d3-9151-dff9032924af" CreationDate="2011-06-05T19:27:44.983" UserId="4598" Text="I was wondering. Suppose I have a 1000 grass meshes. They all have the same material, but I create them separately, because they look slightly different, because they have different heights.&#xD;&#xA;&#xD;&#xA;Does my GPU speed up if I only draw one mesh over and over again? Or is only the material switching and uniform setting the main problem?&#xD;&#xA;&#xD;&#xA;So: Should I consider going to only one mesh a 1000 times, or is it ok to have a lot of different meshes with only the same material?" />
  <row Id="29291" PostHistoryTypeId="1" PostId="13217" RevisionGUID="5203462d-2b24-40d3-9151-dff9032924af" CreationDate="2011-06-05T19:27:44.983" UserId="4598" Text="Drawing the same mesh or drawing the same material?" />
  <row Id="29292" PostHistoryTypeId="3" PostId="13217" RevisionGUID="5203462d-2b24-40d3-9151-dff9032924af" CreationDate="2011-06-05T19:27:44.983" UserId="4598" Text="&lt;graphics&gt;&lt;optimization&gt;" />
  <row Id="29293" PostHistoryTypeId="2" PostId="13218" RevisionGUID="288e912d-4fb1-4459-8c65-f59bc1f89c1c" CreationDate="2011-06-05T19:32:52.687" UserId="4947" Text="If you are using OpenGL, you can use DrawInstanced. This is useful for cases, where you have one model and want to draw it many times (for example grass). In vertex shader you will get unique ID, and according to this ID you can set per model transformation (for example take it from big array of transformation). &#xD;&#xA;&#xD;&#xA;It's really fast and useful. I think in DirectX there will be something similar.&#xD;&#xA;&#xD;&#xA;If you want to draw separate (but similar) models with different materials, it will slow your application down. Material switching is not too cheap operation (again - I'm talking about OpenGL)." />
  <row Id="29294" PostHistoryTypeId="2" PostId="13219" RevisionGUID="20797604-34d6-4dc4-9b7d-ac2847b568ca" CreationDate="2011-06-05T19:34:36.117" UserId="7328" Text="I'm not sure how it's done but I know you can send material data once for GPU and then ask GPU to draw multiple mesh using it. I know this because GameEngines usually have a flag or group which you can spicify every thing under that group has same texture and this speeds up your game(I'm saying this as written inside the manual) since you pass the material data once for as you say 1000 objects and it seems to be faster." />
  <row Id="29295" PostHistoryTypeId="5" PostId="13094" RevisionGUID="93ccaf0c-de37-4ceb-8ddd-f3beb2c114cd" CreationDate="2011-06-05T19:43:01.957" UserId="7792" Comment="pseudo code -&gt; java, but still not working as intended" Text="I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with.&#xD;&#xA;&#xD;&#xA;The superhero bitmap is created on the fly by rotating the original bitmap between -90 and 90 degrees. As a result of the rotation, the bounding box is much, much larger than the non-rotated version. I have code to detect if the bounding box of the player hits any object, but visually this creates a problem when the object comes in contact with the skewed bounding box.&#xD;&#xA;&#xD;&#xA;I need a solution that computes pixel-perfect hit detection between the player and the object, not just the bounding boxes.&#xD;&#xA;&#xD;&#xA;I have been searching for the past 5 days for examples, tutorials, code snippets, or anything that could help me, but I haven't found a solution. The solution I'm looking for would be simply one function call similar to public boolean(obstacle theobject), where the obstacle's bitmap. coordinates, width, and height are returned with obstacle.getbitmap, obstacle.getx, obstacle.gety, obstacle.getwidth, and obstacle.getheight. The bitmap of the player is named rotatedbm and has global variables playerx, playery, playerh, and playerw.&#xD;&#xA;&#xD;&#xA;I do not wish to implement external game engines or libraries.&#xD;&#xA;&#xD;&#xA;I have read much on using int arrays with Bitmap.getPixels, and then comparing the arrays, but I cannot grasp the math behind comparing the arrays nor sorting out alpha values. I cannot afford to stay stuck on this one problem much long for the sake of development.&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;EDIT- This is my implementation of the pseudo code. In the log, 'hit true' is never thrown but 'hit trying' is. Its not working as intended...&#xD;&#xA;&#xD;&#xA;	public boolean gethit(obstacle second){&#xD;&#xA;&#xD;&#xA;			int px,py,ph,pw;&#xD;&#xA;			&#xD;&#xA;			Bitmap sprite1 = rotatedbm;&#xD;&#xA;			Bitmap sprite2 = second.getgfx();&#xD;&#xA;			&#xD;&#xA;			px = playerx;&#xD;&#xA;			py = playery;&#xD;&#xA;			ph = sprite1.getHeight();&#xD;&#xA;			pw = sprite1.getWidth();&#xD;&#xA;			&#xD;&#xA;&#xD;&#xA;			int ox = second.obx;&#xD;&#xA;			int oy = second.oby;&#xD;&#xA;			int oh = second.obh;&#xD;&#xA;			int ow = second.obw;&#xD;&#xA;			&#xD;&#xA;			int [] AABB1bl = {px, py+ph};&#xD;&#xA;			int [] AABB1tr = {px+pw, py};&#xD;&#xA;			int [] AABB2bl = {ox, oy+oh};&#xD;&#xA;			int [] AABB2tr = {ox+ow, oy};&#xD;&#xA;			&#xD;&#xA;			AABB2bl[0] -= AABB1bl[0];&#xD;&#xA;			AABB2bl[1] -= AABB1bl[1]; &#xD;&#xA;			&#xD;&#xA;			AABB2tr[0] -= AABB1bl[0];&#xD;&#xA;			AABB2tr[1] -= AABB1bl[1];&#xD;&#xA;			&#xD;&#xA;			AABB1tr[0] -= AABB1bl[0];&#xD;&#xA;			AABB1tr[1] -= AABB1bl[1];&#xD;&#xA;			&#xD;&#xA;			AABB1bl[0] -= AABB1bl[0];&#xD;&#xA;			AABB1bl[1] -= AABB1bl[1];&#xD;&#xA;			&#xD;&#xA;			int start_x = AABB2bl[0];&#xD;&#xA;			int start_y = AABB2tr[1];&#xD;&#xA;			int end_x = AABB1tr[0];&#xD;&#xA;			int end_y = AABB1bl[1];&#xD;&#xA;			&#xD;&#xA;			int ALPHAMASK = 0xFF&lt;&lt;24; // assuming colors are represented as 0xAARRBBGG&#xD;&#xA;			&#xD;&#xA;			int alpha1;&#xD;&#xA;			int alpha2;&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;			Log.i(&quot;hit&quot;, &quot;trying&quot;);&#xD;&#xA;			for(int x = start_x; x &lt; end_x; x++) &#xD;&#xA;				for(int y = start_y; y &lt; end_y; y++) {  &#xD;&#xA;				  alpha1 = sprite1.getPixel(x , y*sprite1.getWidth()) &amp; ALPHAMASK;&#xD;&#xA;				  alpha2 = sprite2.getPixel(x + AABB2bl[0], (y+AABB2tr[1])*sprite2.getWidth()) &amp; ALPHAMASK;&#xD;&#xA;				  if(alpha1 != 0 &amp;&amp; alpha2 != 0) {&#xD;&#xA;				    Log.i(&quot;hit&quot;, &quot;true&quot;);&#xD;&#xA;				    return true; // you'd probably wish to return after a colliding pixel has been found&#xD;&#xA;				  }&#xD;&#xA;				}&#xD;&#xA;			return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29296" PostHistoryTypeId="2" PostId="13220" RevisionGUID="8ba51f2a-f6b0-4c6c-a528-41cfa9168879" CreationDate="2011-06-05T19:52:27.727" UserId="1839" Text="A proper data-structure for this situation is a [Ring-Buffer, aka Circular Buffer][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Circular_buffer" />
  <row Id="29297" PostHistoryTypeId="2" PostId="13221" RevisionGUID="3fdde779-81da-489c-aec5-ee2f9d144cbe" CreationDate="2011-06-05T19:54:01.037" UserId="7328" Text="I think the best Idea is to go with the real time generation since there are always some nerds who break every limit you put for yuor game. &#xD;&#xA;&#xD;&#xA;for example if you go with 5000 nodes there will be some people to player far past it just like what happen to [pacman](http://en.wikipedia.org/wiki/Pac-Man#Split-screen), none of the developers never tought of someone go beyond level 255, but there were geeks to break that limit! so you need realtime generation.&#xD;&#xA;&#xD;&#xA;Now how to generate levels in realtime: you are saying you are developing your game for IOS and as your sample shows you are going to create a landscape game so you have 480px screen to draw you game, considering your terrain is create by 30px pieces you need `480/30+2` piece ready at each frame. since there are always atleast 480/30 pieces inside screen and just by a little movement a part of another piece will come in your viewport. lets say we store one extra piece as reserved. some games doesn't have a feature that player can go back in levels (just like super mario bros) in these cases you can remove every tile that goes out of screen to free unused memmory, but if your game let's player to move freely inside levels you need to keep whatever was generated. just ignore them in drawing phase.&#xD;&#xA;&#xD;&#xA;to store the levels you may use both arrays and linked lists. since you usualy don't need a direct access to any of the pieces, linked lists doesn't slow your code down. in my case I usually try using queues to store my level information. if you know how many pieces are in your levels you can easily use an array and keep your all your data inside it, you may either shift data as new pieces are generated or you can keep head and tail of queu and use that array like a queue (circular buffer as maik suggested).&#xD;&#xA;&#xD;&#xA;then you need to draw them, ccDrawPoly is a good choice by I prefer to use ccSprite or ccTMXTileMap since you can't apply texture to what you are drawing. don't worry about your object may be out of screen since cocos2d handles these situations and draws only visible parts. I think for objects that are completely out of scene it even ignores drawing but it's better to remove objects that move outside. it help you organise your game better." />
  <row Id="29298" PostHistoryTypeId="2" PostId="13222" RevisionGUID="d6e0c4a2-dd84-454f-9855-3718241b7655" CreationDate="2011-06-05T20:03:36.067" UserId="3505" Text="Of course such sites won't buy HTML 5 games, they wouldn't work for a large part of their users. If you want at least a chance of convincing any of these sites to buy HTML games you better write IE6 compatible HTML 4.01.&#xD;&#xA;&#xD;&#xA;But you'd still have a heck of a job talking them to sense, so bring a hit game if you are serious about breaking the wall, they are certainly not going to change their way of business for anything that is merely good." />
  <row Id="29299" PostHistoryTypeId="2" PostId="13223" RevisionGUID="dbd83f78-7e01-40a1-8b7b-8d2a3ac3028c" CreationDate="2011-06-05T20:03:38.703" UserId="4662" Text="You should re-use the same geometry wherever possible. GPUs have hardware support for re-drawing the same meshes with different parameters. Re-using the same geometry means that you don't have to, for example, move the new geometry into the hardware registers, and that sort of thing, and it fundamentally reduces the number of calls to the GPU, which is a big bonus." />
  <row Id="29300" PostHistoryTypeId="5" PostId="13183" RevisionGUID="85ffb316-97ea-46fc-b71c-df3073738105" CreationDate="2011-06-05T20:11:29.427" UserId="7328" Comment="edited body" Text="after many attempts I went with box2d." />
  <row Id="29301" PostHistoryTypeId="6" PostId="13217" RevisionGUID="a4f19fce-9690-46f1-923d-ec4b0130aefd" CreationDate="2011-06-05T20:33:27.277" UserId="4598" Comment="added the jmonkeyengine tag" Text="&lt;graphics&gt;&lt;optimization&gt;&lt;jmonkeyengine&gt;" />
  <row Id="29302" PostHistoryTypeId="6" PostId="13217" RevisionGUID="68a66e2b-5e15-47ed-b99d-8c5f7f8529cc" CreationDate="2011-06-05T20:36:27.510" UserId="1156" Comment="edited tags" Text="&lt;graphics&gt;&lt;optimization&gt;&lt;3d-meshes&gt;&lt;gpu&gt;&lt;jmonkeyengine&gt;" />
  <row Id="29303" PostHistoryTypeId="5" PostId="13215" RevisionGUID="3687916f-e122-4e2c-bba6-2e345703baf7" CreationDate="2011-06-05T20:37:00.787" UserId="1156" Comment="edited body; edited tags; edited title" Text="I make games with flash and I am interested in making games in html but I haven't seen any companies or websites which are willing to buy these games (i.e game sponsorships). I was hoping somebody could tell me about a company who would do this or why people don't buy html games?" />
  <row Id="29304" PostHistoryTypeId="4" PostId="13215" RevisionGUID="3687916f-e122-4e2c-bba6-2e345703baf7" CreationDate="2011-06-05T20:37:00.787" UserId="1156" Comment="edited body; edited tags; edited title" Text="How do you make money from html5 games (i.e sponsorships)?" />
  <row Id="29305" PostHistoryTypeId="6" PostId="13215" RevisionGUID="3687916f-e122-4e2c-bba6-2e345703baf7" CreationDate="2011-06-05T20:37:00.787" UserId="1156" Comment="edited body; edited tags; edited title" Text="&lt;flash&gt;&lt;html5&gt;&lt;monetization&gt;" />
  <row Id="29306" PostHistoryTypeId="2" PostId="13224" RevisionGUID="8e8aaaf5-761a-4d98-a8f6-f515d1939ba6" CreationDate="2011-06-05T21:03:11.363" UserId="5224" Text="You can convert PNGS to XNBs by adding them to your content project in your XNA solution. You do this by right-clicking on the content project in the project explorer (right side) in Visual Studio and choosing Add-&gt;Existing. Now each time you build the solution (F5) the XNB files are created.&#xD;&#xA;&#xD;&#xA;As far as I know you can not (easily) manually create XNB files from PNGs (or other assets) because XNB files are associated with a specific game, XNB files are a sort of protected/compressed archive for a series of assets and thus can contain more than 1 file.&#xD;&#xA;&#xD;&#xA;About GXView, I don't know that program, but if you think that software could help you, but gives an error, could you post the error message, maybe we can help you out." />
  <row Id="29307" PostHistoryTypeId="25" PostId="13217" RevisionGUID="f321cff7-5134-4454-8296-643266aab30d" CreationDate="2011-06-05T21:13:40.330" Comment="http://twitter.com/#!/StackGameDev/status/77483246258110464" />
  <row Id="29308" PostHistoryTypeId="2" PostId="13225" RevisionGUID="3a0529c1-81bc-4ac5-9351-c0706fc3dcad" CreationDate="2011-06-05T21:40:35.983" UserId="6244" Text="For my multiplayer game server, I made a class inheriting from &quot;Microsoft.Xna.Framework.Game&quot;, just like I did for the client-side part.&#xD;&#xA;&#xD;&#xA;The thing is, I don't need any graphical display for the server, so the LoadContent/UnloadContent and Draw overrides are left empty. On the other hand, I still need to use Microsoft.Xna.Framework.Game for the game loop and logic update parts.&#xD;&#xA;&#xD;&#xA;So is there any special class in XNA made especially for the server-side part, or is everyone else doing it just like I do?" />
  <row Id="29309" PostHistoryTypeId="1" PostId="13225" RevisionGUID="3a0529c1-81bc-4ac5-9351-c0706fc3dcad" CreationDate="2011-06-05T21:40:35.983" UserId="6244" Text="Does XNA provide any special class to make a game server?" />
  <row Id="29310" PostHistoryTypeId="3" PostId="13225" RevisionGUID="3a0529c1-81bc-4ac5-9351-c0706fc3dcad" CreationDate="2011-06-05T21:40:35.983" UserId="6244" Text="&lt;xna&gt;&lt;client-server&gt;" />
  <row Id="29311" PostHistoryTypeId="6" PostId="13225" RevisionGUID="7b169895-cb82-4ecc-b81d-004565406968" CreationDate="2011-06-05T21:45:46.733" UserId="6244" Comment="edited tags" Text="&lt;xna&gt;&lt;server&gt;" />
  <row Id="29312" PostHistoryTypeId="5" PostId="13225" RevisionGUID="df8d62a8-f541-4ce3-a390-25688041e8bf" CreationDate="2011-06-05T21:51:55.537" UserId="6244" Comment="added 65 characters in body" Text="For my multiplayer game server, I made a class inheriting from &quot;Microsoft.Xna.Framework.Game&quot;, just like I did for the client-side part.&#xD;&#xA;&#xD;&#xA;The thing is, I don't need any graphical display for the server, so I end up with a useless blank game window floating around. Also, the LoadContent/UnloadContent and Draw overrides are left empty. On the other hand, I still need to use Microsoft.Xna.Framework.Game for the game loop and logic update parts.&#xD;&#xA;&#xD;&#xA;So is there any special class in XNA made especially for the server-side part, or is everyone else doing it just like I do?" />
  <row Id="29313" PostHistoryTypeId="2" PostId="13226" RevisionGUID="bdac7cc0-964f-4b64-8587-b07d7fb229b6" CreationDate="2011-06-05T21:57:15.087" UserId="7077" Text="An XNA application is a .NET application, just like any other. In your Program.cs on the server, don't call the constructor or Run() for the Game class; just run your server logic instead." />
  <row Id="29314" PostHistoryTypeId="2" PostId="13227" RevisionGUID="02e1786a-cd70-4dfc-aeac-22c7cf5f3dd9" CreationDate="2011-06-05T21:59:59.933" UserId="7077" Text="I am working on a FPS/MMORPG and ran into a problem at spawnpoints, when I enabled collision detection between players. Neither player would be able to move if both spawned at the same time, because both players would essentially be &quot;trapped&quot; within each other's meshes. What is the best way to resolve this problem? " />
  <row Id="29315" PostHistoryTypeId="1" PostId="13227" RevisionGUID="02e1786a-cd70-4dfc-aeac-22c7cf5f3dd9" CreationDate="2011-06-05T21:59:59.933" UserId="7077" Text="Collisions between players at spawnpoints" />
  <row Id="29316" PostHistoryTypeId="3" PostId="13227" RevisionGUID="02e1786a-cd70-4dfc-aeac-22c7cf5f3dd9" CreationDate="2011-06-05T21:59:59.933" UserId="7077" Text="&lt;opengl&gt;&lt;c#&gt;&lt;collision-detection&gt;&lt;physics&gt;&lt;opentk&gt;" />
  <row Id="29317" PostHistoryTypeId="2" PostId="13228" RevisionGUID="4115355a-7738-4933-8c50-291c2c99d334" CreationDate="2011-06-05T22:12:34.973" UserId="7728" Text="The usual way to avoid this problem is to do a collision check before spawning the player, to make sure that the spawning area is clear of obstacles before spawning.&#xD;&#xA;&#xD;&#xA;In general, you want to have several different spawning positions (as many as possible), so that if one of them is blocked, you can spawn the player at a different one.&#xD;&#xA;&#xD;&#xA;If all spawning positions are blocked, then you need to delay spawning the player until one of the spawning positions becomes clear.  (This is why you need lots of spawning positions, to keep a team of players from conspiring to grief their opponents by intentionally standing in all the available spawning positions and keeping their foes from respawning)" />
  <row Id="29318" PostHistoryTypeId="5" PostId="13228" RevisionGUID="c7398cce-bd9f-4683-8ae8-768ed47f6c19" CreationDate="2011-06-05T22:22:26.507" UserId="7728" Comment="Added mention of placing spawn points in clusters." Text="The usual way to avoid this problem is to do a collision check before spawning the player, to make sure that the spawning area is clear of obstacles before spawning.&#xD;&#xA;&#xD;&#xA;In general, you want to have several different spawning positions (as many as possible), so that if one of them is blocked, you can spawn the player at a different one.&#xD;&#xA;&#xD;&#xA;If all spawning positions are blocked, then you need to delay spawning the player until one of the spawning positions becomes clear.  (This is why you need lots of spawning positions, to keep a team of players from conspiring to grief their opponents by intentionally standing in all the available spawning positions and keeping their foes from respawning)&#xD;&#xA;&#xD;&#xA;Your extra spawning points don't even need to be in different parts of the world;  it's very, very common to make &quot;clusters&quot; of spawning points that are very close to each other.  This lets you still know approximately where players will spawn  (which can be useful from a design point of view), but still have spawnpoints available for immediate use when a player doesn't immediately move after spawning." />
  <row Id="29319" PostHistoryTypeId="2" PostId="13229" RevisionGUID="749285a7-66e5-4e19-9f57-fdcb51e61349" CreationDate="2011-06-05T22:52:09.797" UserId="4360" Text="Is there such an algorithm to sort an array of 2D points in clockwise order?  &#xD;&#xA;I'm specifically dealing with right triangle in my case so only 3 points.    &#xD;&#xA;&#xD;&#xA;However I'm interested in knowing if such an algorithm exist, if not what is a simple way to return the 3 points of my triangle in clockwise order?" />
  <row Id="29320" PostHistoryTypeId="1" PostId="13229" RevisionGUID="749285a7-66e5-4e19-9f57-fdcb51e61349" CreationDate="2011-06-05T22:52:09.797" UserId="4360" Text="Sorting array of points in clockwise order" />
  <row Id="29321" PostHistoryTypeId="3" PostId="13229" RevisionGUID="749285a7-66e5-4e19-9f57-fdcb51e61349" CreationDate="2011-06-05T22:52:09.797" UserId="4360" Text="&lt;2d&gt;&lt;math&gt;&lt;algorithm&gt;" />
  <row Id="29324" PostHistoryTypeId="2" PostId="13231" RevisionGUID="8525558e-1979-4256-98b3-9489c1d1c48d" CreationDate="2011-06-05T23:08:22.907" UserId="4947" Text="Can you give more info? You want CCW order of points, but what point should be center of ordering? &#xD;&#xA;&#xD;&#xA;If you have just triangle (3 points) in plane, you can compute determinant from matrix, where lines are coordinates of points (3rd coordinate is 1). If determinant is &gt; 0, points are in CCW order. If not, you can swith for example last two points and you will get CCW order.&#xD;&#xA;&#xD;&#xA;If you have points A, B, C, then your matrix looks like:&#xD;&#xA;&#xD;&#xA;    |xA, yA, 1|&#xD;&#xA;    |xB, yB, 1|&#xD;&#xA;    |xC, yC, 1|&#xD;&#xA;&#xD;&#xA;Determinant is: xA*yB + xB*yC + xC*yA - yB*xC - yC*xA - yA*xB. Then you can compare it with zero. If it's &gt; 0, return points A, B, C, if it isn't, return A, C, B.&#xD;&#xA;&#xD;&#xA;If you have set of points and know, they make convex polygon (all are part of convex hull), and want to get their order, you can use Graham Scan or Jarvis's March (these are algorithms to find convex hull from many points, but it should also work here :) )" />
  <row Id="29325" PostHistoryTypeId="2" PostId="13232" RevisionGUID="b25ce048-fd2d-42c9-acee-b14e8457c6e6" CreationDate="2011-06-05T23:25:31.777" UserId="5864" Text="Your question is not precise enough. An array of points is only « clockwise » or « anti-clockwise » relative to a reference point. Otherwise, any array of three points can always be either CW or CCW. In your case, I believe using the barycenter of the points as a reference point is reasonable.&#xD;&#xA;&#xD;&#xA;A good method for an unknown number of points could be the following one:&#xD;&#xA;&#xD;&#xA; - let `P[0], P[1], ... P[n-1]` be the list of points to sort&#xD;&#xA; - let M be the barycenter of all points&#xD;&#xA; - compute `a[0], a[1], ... a[n-1]` such as `a[i] = atan2(P[i].y - M.y, P[i].x - M.x);`&#xD;&#xA; - sort points relative to their `a` value, using `qsort` for instance.&#xD;&#xA;&#xD;&#xA;However, you can be sure that a good sorting algorithm will perform poorly with three input values compared to an ad-hoc method. Using `atan2` is still valid, but just don't use `qsort`." />
  <row Id="29326" PostHistoryTypeId="5" PostId="13232" RevisionGUID="3ab5ceba-16f6-4123-b4d6-ae2655f7c25a" CreationDate="2011-06-05T23:32:48.587" UserId="5864" Comment="add diagram" Text="Your question is not precise enough. An array of points is only « clockwise » or « anti-clockwise » relative to a reference point. Otherwise, any array of three points can always be either CW or CCW. See the following picture: on the left, the points are ordered clockwise; on the right, the exact same points are ordered anticlockwise.&#xD;&#xA;&#xD;&#xA;![clockwise or anticlockwise][1]&#xD;&#xA;&#xD;&#xA;In your case, I believe using the barycenter of the points as a reference point is reasonable.&#xD;&#xA;&#xD;&#xA;A good method for an unknown number of points could be the following one:&#xD;&#xA;&#xD;&#xA; - let `P[0], P[1], ... P[n-1]` be the list of points to sort&#xD;&#xA; - let M be the barycenter of all points&#xD;&#xA; - compute `a[0], a[1], ... a[n-1]` such as `a[i] = atan2(P[i].y - M.y, P[i].x - M.x);`&#xD;&#xA; - sort points relative to their `a` value, using `qsort` for instance.&#xD;&#xA;&#xD;&#xA;However, you can be sure that a good sorting algorithm will perform poorly with three input values compared to an ad-hoc method. Using `atan2` is still valid, but just don't use `qsort`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zoy.org/~sam/cw-ccw.png" />
  <row Id="29327" PostHistoryTypeId="2" PostId="13233" RevisionGUID="d874f29e-a46d-4bd7-9b4f-ed61e5130b1a" CreationDate="2011-06-05T23:33:11.737" UserId="5021" Text="Why is it a problem that your game doesn't draw anything?&#xD;&#xA;&#xD;&#xA;It seems like you're [tinting at windmills][1].&#xD;&#xA;&#xD;&#xA;If you want you can make a console application and then just import the XNA networking classes that you actually need, or make any other type of application, and import the XNA networking stuff. If you need a fixed time update loop, that is pretty trivial to implement.&#xD;&#xA;&#xD;&#xA;You can create a windows forms application, and use it with XNA, by following the information here:&#xD;&#xA;http://forums.create.msdn.com/forums/t/6471.aspx&#xD;&#xA;&#xD;&#xA;You probably want your server to draw *something* though, like the current status, or provide some sort of GUI controls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tilting_at_windmills" />
  <row Id="29328" PostHistoryTypeId="5" PostId="13229" RevisionGUID="b0015d76-4e2d-4510-9891-8ed9eaa6124f" CreationDate="2011-06-05T23:35:47.733" UserId="4360" Comment="added 112 characters in body" Text="Is there such an algorithm to sort an array of 2D points in clockwise order?  &#xD;&#xA;I'm specifically dealing with right triangle in my case so only 3 points.    &#xD;&#xA;&#xD;&#xA;However I'm interested in knowing if such an algorithm exist, if not what is a simple way to return the 3 points of my triangle in clockwise order?&#xD;&#xA;&#xD;&#xA;Edit: I am trying to compute the points clockwise relative to the centroid of the polygon, which  is convex." />
  <row Id="29329" PostHistoryTypeId="2" PostId="13234" RevisionGUID="baaf392c-af1b-420d-8efe-bf77948e9689" CreationDate="2011-06-05T23:46:37.957" UserId="7369" Text="1) Since speed is a concern, you may want to take a look at approximate nearest neighbor algorithms. I've used [ANN][1] in the past and it performed very well for around 12 dimensions. It lets you adjust desired precision so that you can have a trade off between speed and precision and find what works best. &#xD;&#xA;&#xD;&#xA;2) Since your visual occlusion is a black-box one (I'm assuming unpredictable moving obstacles), I'm not sure if you have much of a choice other than doing occlusion tests on the points that the NN algorithm returned. &#xD;&#xA;&#xD;&#xA;3) I don't believe ANN supports points changing, but I'm not sure since I didn't need that. It seems [Cgal][2] and [Pastel][3] support dynamic sets, but in terms of insertion/removal of points. Perhaps the papers [here][4] would also provide some insight. &#xD;&#xA;&#xD;&#xA;I don't know if you need this advice, but I found that reusing libraries for such problems almost always is a better idea. There are so many pitfalls one can fall into while implementing the details. Good luck!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.umd.edu/~mount/ANN/&#xD;&#xA;  [2]: http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Point_set_2/Chapter_main.html&#xD;&#xA;  [3]: http://kaba.hilvi.org/pastel/pastel/geometry/nearest_neighbors.htm&#xD;&#xA;  [4]: http://maven.smith.edu/~orourke/TOPP/P63.html" />
  <row Id="29330" PostHistoryTypeId="2" PostId="13235" RevisionGUID="ec4efbdf-ce5b-4a00-b602-798c0f48440f" CreationDate="2011-06-06T00:03:24.677" UserId="5916" Text="Good logic but use Matricies with scale transformations to implement zoom, do not try and calculate it everywhere yourself. &#xD;&#xA;&#xD;&#xA;That way you could write the following code:&#xD;&#xA;&#xD;&#xA;    canvas.save();&#xD;&#xA;    canvas.setMatrix(myMapMatrix);&#xD;&#xA;&#xD;&#xA;    // TODO write the rest of the drawing code here using map co-ordinates&#xD;&#xA;&#xD;&#xA;    canvas.restore();&#xD;&#xA;&#xD;&#xA;Where myMapMatrix is the matrix that lets you go from the screen viewport to the board game map. And if you get the inverse matrix then you can transform a map co-ordinate into a screen co-ordinate. I know because this is the way that I am currently doing it in my game.&#xD;&#xA;&#xD;&#xA;I will leave how to create the Matrix as an exercise for you but let me give you [a hint][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/reference/android/graphics/Matrix.html#preScale%28float,%20float,%20float,%20float%29" />
  <row Id="29332" PostHistoryTypeId="25" PostId="13229" RevisionGUID="9a608334-2ac5-424a-b5f8-3c648c803d94" CreationDate="2011-06-06T00:13:40.770" Comment="http://twitter.com/#!/StackGameDev/status/77528546016374784" />
  <row Id="29333" PostHistoryTypeId="2" PostId="13236" RevisionGUID="aff1252b-edbc-452f-b694-f7dd419bc816" CreationDate="2011-06-06T00:33:26.503" UserId="7728" Text="I believe that what you're actually asking about here is the triangle's winding order, which is actually pretty simple to test.  &#xD;&#xA;&#xD;&#xA;Since there are only three points in your triangle, your triangle is already in either a clockwise or counter-clockwise order, and so all you need to do is to check which of those two it is, and reverse the order of indices if the winding isn't the one you want.&#xD;&#xA;&#xD;&#xA;Here's the general idea, assuming that the three vertices of a triangle are *a*, *b*, and *c*, and that you have a simple vector subtraction operation:&#xD;&#xA;&#xD;&#xA;    Vector2 AToB = b - a;&#xD;&#xA;    Vector2 BToC = c - b;&#xD;&#xA;    float crossz = AToB.x * BToC.y - AToB.y * BToC.x;&#xD;&#xA;    if ( crossz &gt; 0.0f )&#xD;&#xA;    {&#xD;&#xA;      // clockwise&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;      // counter-clockwise.  Need to reverse the order of our vertices.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that depending upon which way you've oriented your +y axis (up or down), the &quot;clockwise&quot; and &quot;counter-clockwise&quot; cases may be reversed from how I've labelled them in the comments in this sample code.&#xD;&#xA;" />
  <row Id="29335" PostHistoryTypeId="5" PostId="13229" RevisionGUID="5bcca4ce-571e-40cd-b6bf-cbb09ff68d63" CreationDate="2011-06-06T00:42:25.600" UserId="4360" Comment="added 935 characters in body; added 13 characters in body" Text="Is there such an algorithm to sort an array of 2D points in clockwise order?  &#xD;&#xA;I'm specifically dealing with right triangle in my case so only 3 points.    &#xD;&#xA;&#xD;&#xA;However I'm interested in knowing if such an algorithm exist, if not what is a simple way to return the 3 points of my triangle in clockwise order?&#xD;&#xA;&#xD;&#xA;Edit: I am trying to compute the points clockwise relative to the centroid of the polygon, which  is convex.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Update:**&#xD;&#xA;This is the implementation I ended up using based on the chosen answer, it's not performance critical and only happens once in a while so it works out.&#xD;&#xA;	&#xD;&#xA;	ArrayList&lt;PVector&gt; pointList = new ArrayList&lt;PVector&gt;();&#xD;&#xA;	pointList.add(A);&#xD;&#xA;	pointList.add(B);&#xD;&#xA;	pointList.add(C);&#xD;&#xA;	Collections.sort( pointList, new TriangleVectorComparator(origin) );&#xD;&#xA;&#xD;&#xA;	return pointList;&#xD;&#xA;&#xD;&#xA;    // Comparator&#xD;&#xA;	package triangleeditor;&#xD;&#xA;	&#xD;&#xA;	import java.util.Comparator;&#xD;&#xA;	&#xD;&#xA;	import processing.core.PVector;&#xD;&#xA;	&#xD;&#xA;	public class TriangleVectorComparator implements Comparator&lt;PVector&gt;  {&#xD;&#xA;		private PVector M; &#xD;&#xA;		public TriangleVectorComparator(PVector origin) {&#xD;&#xA;			M = origin;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		public int compare(PVector o1, PVector o2) {&#xD;&#xA;			double angle1 = Math.atan2(o1.y - M.y, o1.x - M.x);&#xD;&#xA;			double angle2 = Math.atan2(o2.y - M.y, o2.x - M.x);&#xD;&#xA;			&#xD;&#xA;			if(angle1 &lt; angle2) return 1;&#xD;&#xA;			else if (angle2 &gt; angle1) return -1;&#xD;&#xA;			return 0;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;	}" />
  <row Id="29336" PostHistoryTypeId="2" PostId="13237" RevisionGUID="8a46ed2a-ffdf-4f2b-b1fe-20d5c23d311b" CreationDate="2011-06-06T00:44:16.443" UserId="4497" Text="There is no class that is part of the XNA library that acts as a game server.&#xD;&#xA;&#xD;&#xA;You probably should not use the framework to write the server code unless you are creating a peer to peer Xbox based game over Xbox Live. I assume that you are not doing so because you would then need to render things onto the screen.&#xD;&#xA;&#xD;&#xA;All C# programs start in the public static void Main method, including a program begun with the XNA framework.&#xD;&#xA;&#xD;&#xA;If you do not already know how to create a program and import the XNA libraries without using the framework, you may be in over your head when it comes to the creation of a multiplayer game." />
  <row Id="29337" PostHistoryTypeId="2" PostId="13238" RevisionGUID="c69dd735-59d9-4a2c-85db-334da7bbb239" CreationDate="2011-06-06T00:46:20.257" UserId="6275" Text="I am using [Bullet Physics](http://bulletphysics.org/wordpress/) v2.78. And Im trying to build this library to be used for [ogrebullet](http://www.ogre3d.org/addonforums/viewtopic.php?f=12&amp;t=4155). The main problem is that Im getting errors trying to find the Bullet Directory.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Im wondering if maybe my environment variables are setup wrong.&#xD;&#xA;&#xD;&#xA;I am using Windows Vista 32 bit, and here are my Environment variables:&#xD;&#xA;&#xD;&#xA;BULLET_ROOT: C:\BulletPhys&#xD;&#xA;&#xD;&#xA;BULLET_INCLUDE_DIR: C:\BulletPhys\src&#xD;&#xA;&#xD;&#xA;as other information I am trying to build these libraries in [cMake](http://www.cmake.org/cmake/resources/software.html). Bullet physics builds perfectly, but ogrebullet cant find the libraries needed to configure(Dynamics, Collision, LinearMath, etc.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So my question is: How would I setup the environment variables so ogrebullet can find them?&#xD;&#xA;&#xD;&#xA;If any other information is needed i will provide upon request.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;-Molma" />
  <row Id="29338" PostHistoryTypeId="1" PostId="13238" RevisionGUID="c69dd735-59d9-4a2c-85db-334da7bbb239" CreationDate="2011-06-06T00:46:20.257" UserId="6275" Text="How would I setup the Environment Variables for BulletPhysics?" />
  <row Id="29339" PostHistoryTypeId="3" PostId="13238" RevisionGUID="c69dd735-59d9-4a2c-85db-334da7bbb239" CreationDate="2011-06-06T00:46:20.257" UserId="6275" Text="&lt;c++&gt;&lt;ogre&gt;&lt;bullet-physics&gt;&lt;mingw&gt;" />
  <row Id="29340" PostHistoryTypeId="5" PostId="13118" RevisionGUID="2696a2a2-8d88-466a-ace7-4a20b28f6d71" CreationDate="2011-06-06T00:57:12.990" UserId="51" Comment="deleted 52 characters in body; edited tags" Text="I'm developing a Android board game and have a question regarding creating a board that is zoomable and scrollable. The board contains a static background, characters (players) and  the actual &quot;level&quot; which is drawn using tiles.&#xD;&#xA;&#xD;&#xA;My solutions is to have a collection of elements (tiles, figures, all game elements - all have x,y coordinates and width + height), a camera and a renderer that draws the collection according to cameraX,cameraY, cameraWidth and cameraHeight. So if a user would scroll to the right, the camera would just set the cameraX appropriately - and the surface is scrollable. And if a user would zoom in/out the renderer would just scale every element image appropriately.&#xD;&#xA;&#xD;&#xA;Example code for the renderer with scrollable surface and zoom in/out&#xD;&#xA;&#xD;&#xA;        protected function draw(Canvas c){&#xD;&#xA;          Collection elements = collection.getElements(cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;          if(elements.size() &gt; 0) {&#xD;&#xA;             for(int i = 0; i &lt; elements.size(); i++) {&#xD;&#xA;                  elements.get(i).drawElement(c);&#xD;&#xA;             }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;        .&#xD;&#xA;        .&#xD;&#xA;        .&#xD;&#xA;        // element class drawElement function&#xD;&#xA;        protected drawElement function(Canvas c) {&#xD;&#xA;            if(this.image != null) {            &#xD;&#xA;              int w = this.width;&#xD;&#xA;              int h = this.height;&#xD;&#xA;              if(this.zoomFactor &lt; 1) {&#xD;&#xA;                 w*=this.zoomFactor;&#xD;&#xA;                 h*=this.zoomFactor;&#xD;&#xA;              }&#xD;&#xA;              c.drawBitmap(this.image,this.x,this.y,w,h);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;- Is this the best solutions?&#xD;&#xA;- Could it be achived somehow else? &#xD;&#xA;- Could scrolling be achived using a ScrollView? &#xD;&#xA;&#xD;&#xA;I dont wanna use any engine, because this is for a school project." />
  <row Id="29341" PostHistoryTypeId="6" PostId="13118" RevisionGUID="2696a2a2-8d88-466a-ace7-4a20b28f6d71" CreationDate="2011-06-06T00:57:12.990" UserId="51" Comment="deleted 52 characters in body; edited tags" Text="&lt;2d&gt;&lt;android&gt;&lt;rendering&gt;" />
  <row Id="29343" PostHistoryTypeId="2" PostId="13239" RevisionGUID="27818779-63da-49bd-8516-7f1204d76f07" CreationDate="2011-06-06T01:04:47.847" UserId="2946" Text="For a 3D physics library, [BEPU physics][1] has just recently became free for both commercial and non-commerical use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bepu.squarespace.com/" />
  <row Id="29344" PostHistoryTypeId="16" PostId="13239" RevisionGUID="c438d7aa-331e-4606-a96a-f93fff71529a" CreationDate="2011-06-06T01:04:47.847" UserId="2946" />
  <row Id="29345" PostHistoryTypeId="25" PostId="13225" RevisionGUID="5cbf9460-f816-43bc-8e5e-3237a4dcc845" CreationDate="2011-06-06T03:13:40.980" Comment="http://twitter.com/#!/StackGameDev/status/77573844684124161" />
  <row Id="29346" PostHistoryTypeId="2" PostId="13240" RevisionGUID="4c2c8afa-28b8-4fe5-a271-4fcdbfb6bece" CreationDate="2011-06-06T05:08:28.063" UserId="3656" Text="What kind of multiplayer server you are going to write? Is this just a lobby server for setting up peer-to-peer games? Is this a full on multiplayer server that is dedicated to hosting the game and communicating with clients (like Counterstrike servers, for example)? Or are you wanting to add multiplayer capability to your game in which a player starts a game that others can join?&#xD;&#xA;&#xD;&#xA;If the last variant is what you want, XNA/.NET do provide some networking classes.&#xD;&#xA;&#xD;&#xA;If you want to create a dedicated multiplayer server, you should do as HydroxicAcid says and avoid using the entire XNA framework as you will not need much of what it provides. What you *should* do is isolate your logic from your rendering code (in separate assemblies!) so that you can reuse these classes in your server application. You'll want to look into serialization over a network of figure out some lightweight message format for transporting gameplay data. There may be some instances where a 1:1 match between how a game object is represented on the server must be very different from how that same object is represented on the client, so be prepared to deal with that.&#xD;&#xA;&#xD;&#xA;If you want to create a lobby server, you probably don't need to even write it in C# or use the .NET framework or even run it on a Microsoft platform. Its sole purpose is to find other people that want to play the game and tell them about each other, so there will likely be no need to reuse any existing game code for that.&#xD;&#xA;&#xD;&#xA;Whatever it is you're looking to do, you can find a lot of good resources on AppHub =&gt; http://create.msdn.com/en-us/education/catalog/?devarea=19" />
  <row Id="29347" PostHistoryTypeId="5" PostId="13233" RevisionGUID="214a5850-4e50-4992-93b5-21355322ff44" CreationDate="2011-06-06T05:24:35.963" UserId="189" Comment="corrected typo in &quot;tilting&quot;" Text="Why is it a problem that your game doesn't draw anything?&#xD;&#xA;&#xD;&#xA;It seems like you're [tilting at windmills][1].&#xD;&#xA;&#xD;&#xA;If you want you can make a console application and then just import the XNA networking classes that you actually need, or make any other type of application, and import the XNA networking stuff. If you need a fixed time update loop, that is pretty trivial to implement.&#xD;&#xA;&#xD;&#xA;You can create a windows forms application, and use it with XNA, by following the information here:&#xD;&#xA;http://forums.create.msdn.com/forums/t/6471.aspx&#xD;&#xA;&#xD;&#xA;You probably want your server to draw *something* though, like the current status, or provide some sort of GUI controls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tilting_at_windmills" />
  <row Id="29348" PostHistoryTypeId="2" PostId="13241" RevisionGUID="ade9bf56-a073-4055-8aa1-88545e0e0764" CreationDate="2011-06-06T05:28:55.697" UserId="3830" Text="You might also consider just not having players collide with each other. Besides simplifying the spawn problem it also eliminates griefing such as door blocking. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="29349" PostHistoryTypeId="2" PostId="13242" RevisionGUID="61b49c47-c98c-4053-9684-5eb04c0603f5" CreationDate="2011-06-06T05:31:52.657" UserId="3830" Text="Check out NowJS (http://nowjs.com/). It will simplify the task quite a bit.  " />
  <row Id="29350" PostHistoryTypeId="2" PostId="13243" RevisionGUID="7177dddf-0e88-4142-b11c-a3be392f714d" CreationDate="2011-06-06T05:41:31.240" UserId="3830" Text="Stop thinking in terms of servers and start thinking in terms of cloud computing. Build it with the Google App Engine for example.  It will automatically Scale to handle any traffic growth. Besides not stressing about CPUs, servers, databases, RAM and diskspace, you also pay for just what you use. " />
  <row Id="29351" PostHistoryTypeId="5" PostId="13202" RevisionGUID="ba3f3333-e867-42a6-bcaa-b68020129e81" CreationDate="2011-06-06T06:09:24.283" UserId="4559" Comment="added 163 characters in body; added 4 characters in body; added 6 characters in body" Text="I have an artillery game (hobby-learning project) and when the projectile hits it leaves a hole in the ground. I want this hole to have antialiased edges. I'm using `System.Drawing` for this. I've tried with clipping paths, and drawing with a transparent color using `gfx.CompositingMode = CompositingMode.SourceCopy`, but it gives me the same result. If I draw a circle with a solid color it works fine, but I need a hole, a circle with 0 alpha values. &#xD;&#xA;&#xD;&#xA;I have enabled these but they work only with solid colors:  &#xD;&#xA;&#xD;&#xA;    gfx.CompositingQuality = CompositingQuality.HighQuality;&#xD;&#xA;    gfx.InterpolationMode = InterpolationMode.HighQualityBicubic;&#xD;&#xA;    gfx.SmoothingMode = SmoothingMode.AntiAlias;&#xD;&#xA;&#xD;&#xA; In the two pictures consider black as being transparent.&#xD;&#xA;&#xD;&#xA;This is what I have (zoomed in):  &#xD;&#xA;![What I have][1]&#xD;&#xA;&#xD;&#xA;And what I need is something like this (made with photoshop):  &#xD;&#xA;![What I need][2]&#xD;&#xA;&#xD;&#xA;This will be just a visual effect, in code for collision detection I still treat everything with alpha &gt; 128 as solid.&#xD;&#xA;&#xD;&#xA;**Edit:** I'm usink [OpenTK][3] for this game. But for this question I think it doesn't really matter probably it is `gdi+` related.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/dJdBL.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/YU9W5.jpg&#xD;&#xA;  [3]: http://www.opentk.com/" />
  <row Id="29352" PostHistoryTypeId="25" PostId="13201" RevisionGUID="098cdb07-2aef-454c-b5fe-c3311ad5aee3" CreationDate="2011-06-06T06:13:40.937" Comment="http://twitter.com/#!/StackGameDev/status/77619144098455552" />
  <row Id="29353" PostHistoryTypeId="2" PostId="13244" RevisionGUID="c4c4bf14-ac81-4ff5-819a-cd2fa0c51146" CreationDate="2011-06-06T06:15:15.000" UserId="2735" Text="First off, I'm not referring to scene management; I'm defining game state loosely as any sort of state in a game which has implications about whether or not user input should be enabled, or if certain actors should be temporarily disabled, etc.&#xD;&#xA;&#xD;&#xA;As a concrete example, let's say it's a game of the classic Battlechess.  After I make a move to take another player's piece, a short battle sequence plays.  During this sequence, the player shouldn't be allowed to move pieces.  So how would you track this sort of state transition?  A finite state machine?  A simple boolean check?  It seems the latter would only work well for a game with very few state changes of this sort.&#xD;&#xA;&#xD;&#xA;I can think of a lot of straightforward ways of handling this using finite state machines, but I can also see them quickly getting out of hand.  I'm just curious if there's a more elegant way to keep track of game states/transitions." />
  <row Id="29354" PostHistoryTypeId="1" PostId="13244" RevisionGUID="c4c4bf14-ac81-4ff5-819a-cd2fa0c51146" CreationDate="2011-06-06T06:15:15.000" UserId="2735" Text="Game state management techniques?" />
  <row Id="29355" PostHistoryTypeId="3" PostId="13244" RevisionGUID="c4c4bf14-ac81-4ff5-819a-cd2fa0c51146" CreationDate="2011-06-06T06:15:15.000" UserId="2735" Text="&lt;state&gt;" />
  <row Id="29356" PostHistoryTypeId="12" PostId="13199" RevisionGUID="6feccdc9-91f4-44fb-8a6c-00433cf3a8b6" CreationDate="2011-06-06T07:41:46.897" UserId="7830" Text="[{&quot;Id&quot;:7830,&quot;DisplayName&quot;:&quot;Ariel Malka&quot;}]" />
  <row Id="29357" PostHistoryTypeId="13" PostId="13199" RevisionGUID="ff8c8bef-4616-4726-a3ed-1b49cf6dce49" CreationDate="2011-06-06T07:42:13.247" UserId="7830" Text="[{&quot;Id&quot;:7830,&quot;DisplayName&quot;:&quot;Ariel Malka&quot;}]" />
  <row Id="29358" PostHistoryTypeId="5" PostId="13199" RevisionGUID="6d977210-815a-4ac9-8099-4ba8dbed7a9d" CreationDate="2011-06-06T07:45:10.030" UserId="7830" Comment="added 1064 characters in body; added 72 characters in body" Text="I found [this answer][1] by user S1CA in the gamedev.net forum:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;A, B, C are the vertices of a particular triangle.  &#xD;&#xA;Auv, Buv, Cuv are the UV coordinates at the vertices.  &#xD;&#xA;Axyz, Bxyz, Cxyz are the positions of the vertices.  &#xD;&#xA;Puv are the UV coordinates of the point.  &#xD;&#xA;Pabc are the barycentric coordinates of the point [for that triangle]  &#xD;&#xA;Pxyz is the object space position of the point  &#xD;&#xA;&#xD;&#xA;aa = (Bu-Au) * (Cv-Av) - (Cu-Au) * (Bv-Av)  &#xD;&#xA;Pa = ((Bu-Pu) * (Cv-Pv) - (Cu-Pu) * (Bv-Pv)) / aa  &#xD;&#xA;Pb = ((Cu-Pu) * (Av-Pv) - (Au-Pu) * (Cv-Pv)) / aa  &#xD;&#xA;Pc = ((Au-Pu) * (Bv-Pv) - (Bu-Pu) * (Av-Pv)) / aa&#xD;&#xA;&#xD;&#xA;The above are just a bunch of 2D cross products. The 2D cross product happens to give you the area of a triangle. If you look at the [Wolfram reference][2] posted above, it notes that the areas of the sub triangles ABP ACP and BCP are proportional to the barycentric coordinates.&#xD;&#xA;&#xD;&#xA;The division of each sub triangle by the area of the main triangle is so we can get the useful property of areal coordinates that for any point which is *inside* the triangle, Pa+Pb+Pc=1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Once you have barycentric coordinates, you can use those to convert between texture units and object units by doing:&#xD;&#xA;&#xD;&#xA;Pxyz = Axyz*Pa + Bxyz*Pb + Cxyz*Pc&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/422150-getting-3d-coordinates-of-a-point-on-the-textureuv/page__view__findpost__p__3813014&#xD;&#xA;  [2]: http://mathworld.wolfram.com/BarycentricCoordinates.html" />
  <row Id="29359" PostHistoryTypeId="2" PostId="13245" RevisionGUID="18408e9f-bbab-44d1-a3b2-c26d10f90c9b" CreationDate="2011-06-06T08:02:53.797" UserId="5508" Text="I once came across an [article][1] that solves your problem quite elegantly. It is a basic FSM implementation, that is called in your main loop. I have outlined the basic rundown of the article in the rest of this answer.&#xD;&#xA;&#xD;&#xA;Your basic game state looks like this:&#xD;&#xA;&#xD;&#xA;    class CGameState&#xD;&#xA;    {&#xD;&#xA;        public:&#xD;&#xA;            // Setup and destroy the state&#xD;&#xA;            void Init();&#xD;&#xA;            void Cleanup();&#xD;&#xA;&#xD;&#xA;            // Used when temporarily transitioning to another state&#xD;&#xA;            void Pause();&#xD;&#xA;            void Resume();&#xD;&#xA;&#xD;&#xA;            // The three important actions within a game loop&#xD;&#xA;            void HandleEvents();&#xD;&#xA;            void Update();&#xD;&#xA;            void Draw();&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Each game state is represented by an implementation of this interface. For your Battlechess example, this could mean these states:&#xD;&#xA;&#xD;&#xA;* intro animation&#xD;&#xA;* main menu&#xD;&#xA;* chess board setup animation&#xD;&#xA;* player move input&#xD;&#xA;* player move animation&#xD;&#xA;* opponent move animation&#xD;&#xA;* pause menu&#xD;&#xA;* endgame screen&#xD;&#xA;&#xD;&#xA;States are managed in your state engine:&#xD;&#xA;&#xD;&#xA;    class CGameEngine&#xD;&#xA;    {&#xD;&#xA;        public:&#xD;&#xA;            // Creating and destroying the state machine&#xD;&#xA;            void Init();&#xD;&#xA;            void Cleanup();&#xD;&#xA;&#xD;&#xA;            // Transit between states&#xD;&#xA;            void ChangeState(CGameState* state);&#xD;&#xA;            void PushState(CGameState* state);&#xD;&#xA;            void PopState();&#xD;&#xA;&#xD;&#xA;            // The three important actions within a game loop&#xD;&#xA;            // (these will be handled by the top state in the stack)&#xD;&#xA;            void HandleEvents();&#xD;&#xA;            void Update();&#xD;&#xA;            void Draw();&#xD;&#xA;&#xD;&#xA;            // ...&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Note that each state needs a pointer to the CGameEngine at some point, so the state itself can decide whether a new state should be entered. The article suggest passing in the CGameEngine as a parameter for HandleEvents, Update and Draw.&#xD;&#xA;&#xD;&#xA;In the end, your main loop only deals with the state engine:&#xD;&#xA;&#xD;&#xA;    int main ( int argc, char *argv[] )&#xD;&#xA;    {&#xD;&#xA;        CGameEngine game;&#xD;&#xA;&#xD;&#xA;        // initialize the engine&#xD;&#xA;        game.Init( &quot;Engine Test v1.0&quot; );&#xD;&#xA;&#xD;&#xA;        // load the intro&#xD;&#xA;        game.ChangeState( CIntroState::Instance() );&#xD;&#xA;&#xD;&#xA;        // main loop&#xD;&#xA;        while ( game.Running() )&#xD;&#xA;        {&#xD;&#xA;            game.HandleEvents();&#xD;&#xA;            game.Update();&#xD;&#xA;            game.Draw();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // cleanup the engine&#xD;&#xA;        game.Cleanup();&#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; [1]:http://gamedevgeek.com/tutorials/managing-game-states-in-c/" />
  <row Id="29360" PostHistoryTypeId="2" PostId="13246" RevisionGUID="f321a02b-eed9-4b55-a1b1-deaecacb6ae5" CreationDate="2011-06-06T08:08:09.427" UserId="5059" Text="As you have noticed clipping or regions in GDI+ are not antialiased as they are both pixel based.&#xD;&#xA;&#xD;&#xA;To do what you want in GDI+ you can apply an alpha mask to the image yourself. Basically you fill a rectangle of the size of the area affected with black color and then draw the hole with white using the high quality settings for Antialiasing and smoothing. Then you apply the resulting image as an alpha mask  to the original image. (which means that you re-calculate the alpha value of the pixels involved based on the black/white image where completely white pixels will be transparent) To do this quickly you should use the fast pointer access to the pixel data via LockBits()..&#xD;&#xA;&#xD;&#xA;Here is a GDI+ example. This will only work if the images are 32bppArgb format - if you only need to apply an alpha mask to a small portion of the original image I would suggest you adjust the code to do that.&#xD;&#xA;&#xD;&#xA;    public static void ApplyAlphaMask(Bitmap bmp, Bitmap alphaMaskImage)&#xD;&#xA;    {    &#xD;&#xA;      int width = bmp.Width;&#xD;&#xA;      int height = bmp.Height;&#xD;&#xA;    &#xD;&#xA;      BitmapData dataAlphaMask = alphaMaskImage.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);&#xD;&#xA;      try&#xD;&#xA;      {&#xD;&#xA;        BitmapData data = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);&#xD;&#xA;        try&#xD;&#xA;        {&#xD;&#xA;          unsafe //using pointer requires the unsafe keyword&#xD;&#xA;          {&#xD;&#xA;            byte* pData0Mask = (byte*)dataAlphaMask.Scan0;&#xD;&#xA;            byte* pData0 = (byte*)data.Scan0;&#xD;&#xA;    &#xD;&#xA;            for (int x = 0; x &lt; width; x++)&#xD;&#xA;            {&#xD;&#xA;              for (int y = 0; y &lt; height; y++)&#xD;&#xA;              {&#xD;&#xA;                byte* pData = pData0 + (y * data.Stride) + (x * 4);&#xD;&#xA;                byte* pDataMask = pData0Mask + (y * dataAlphaMask.Stride) + (x * 4);&#xD;&#xA;    &#xD;&#xA;                byte maskBlue = pDataMask[0];&#xD;&#xA;                byte maskGreen = pDataMask[1];&#xD;&#xA;                byte maskRed = pDataMask[2];&#xD;&#xA;    &#xD;&#xA;                //the closer the color is to black the more opaque it will be.&#xD;&#xA;                byte alpha = (byte)(255 - (maskRed + maskBlue + maskGreen) / 3);&#xD;&#xA;    &#xD;&#xA;                //respect the original alpha value&#xD;&#xA;                byte originalAlpha = pData[3];&#xD;&#xA;                pData[3] = (byte)(((float)(alpha * originalAlpha)) / 255f);&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;        finally&#xD;&#xA;        {&#xD;&#xA;          bmp.UnlockBits(data);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      finally&#xD;&#xA;      {&#xD;&#xA;        alphaMaskImage.UnlockBits(dataAlphaMask);&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="29361" PostHistoryTypeId="5" PostId="13246" RevisionGUID="4f9f491d-33a9-4e11-9c4f-3c8bf0e9729b" CreationDate="2011-06-06T08:16:05.950" UserId="5059" Comment="added 27 characters in body" Text="As you have noticed clipping or regions in GDI+ are not antialiased as they are both pixel based.&#xD;&#xA;&#xD;&#xA;To do what you want in GDI+ you can apply an alpha mask to the image yourself. Basically you fill a rectangle of the size of the area affected with black color and then draw the hole with white using the high quality settings for Antialiasing and smoothing. Then you apply the resulting image as an alpha mask  to the original image. (which means that you re-calculate the alpha value of the pixels involved based on the black/white image where completely white pixels will be transparent) To do this quickly you should use the fast pointer access to the pixel data via LockBits()..&#xD;&#xA;&#xD;&#xA;Here is a GDI+ example. This will only work if the images are 32bppArgb format and both are the same size - if you only need to apply an alpha mask to a small portion of the original image I would suggest you adjust the code to do that.&#xD;&#xA;&#xD;&#xA;    public static void ApplyAlphaMask(Bitmap bmp, Bitmap alphaMaskImage)&#xD;&#xA;    {    &#xD;&#xA;      int width = bmp.Width;&#xD;&#xA;      int height = bmp.Height;&#xD;&#xA;    &#xD;&#xA;      BitmapData dataAlphaMask = alphaMaskImage.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);&#xD;&#xA;      try&#xD;&#xA;      {&#xD;&#xA;        BitmapData data = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);&#xD;&#xA;        try&#xD;&#xA;        {&#xD;&#xA;          unsafe //using pointer requires the unsafe keyword&#xD;&#xA;          {&#xD;&#xA;            byte* pData0Mask = (byte*)dataAlphaMask.Scan0;&#xD;&#xA;            byte* pData0 = (byte*)data.Scan0;&#xD;&#xA;    &#xD;&#xA;            for (int x = 0; x &lt; width; x++)&#xD;&#xA;            {&#xD;&#xA;              for (int y = 0; y &lt; height; y++)&#xD;&#xA;              {&#xD;&#xA;                byte* pData = pData0 + (y * data.Stride) + (x * 4);&#xD;&#xA;                byte* pDataMask = pData0Mask + (y * dataAlphaMask.Stride) + (x * 4);&#xD;&#xA;    &#xD;&#xA;                byte maskBlue = pDataMask[0];&#xD;&#xA;                byte maskGreen = pDataMask[1];&#xD;&#xA;                byte maskRed = pDataMask[2];&#xD;&#xA;    &#xD;&#xA;                //the closer the color is to black the more opaque it will be.&#xD;&#xA;                byte alpha = (byte)(255 - (maskRed + maskBlue + maskGreen) / 3);&#xD;&#xA;    &#xD;&#xA;                //respect the original alpha value&#xD;&#xA;                byte originalAlpha = pData[3];&#xD;&#xA;                pData[3] = (byte)(((float)(alpha * originalAlpha)) / 255f);&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;        finally&#xD;&#xA;        {&#xD;&#xA;          bmp.UnlockBits(data);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      finally&#xD;&#xA;      {&#xD;&#xA;        alphaMaskImage.UnlockBits(dataAlphaMask);&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="29362" PostHistoryTypeId="5" PostId="13246" RevisionGUID="3d62d1aa-4a8c-48f1-9e14-3dbdc87ba895" CreationDate="2011-06-06T08:22:36.620" UserId="5059" Comment="added 66 characters in body" Text="As you have noticed clipping or regions in GDI+ are not antialiased as they are both pixel based where a given pixel can either be completely included or excluded.&#xD;&#xA;&#xD;&#xA;To do what you want in GDI+ you can apply an alpha mask to the image yourself. Basically you fill a rectangle of the size of the area affected with black color and then draw the hole with white using the high quality settings for Antialiasing and smoothing. Then you apply the resulting image as an alpha mask  to the original image. (which means that you re-calculate the alpha value of the pixels involved based on the black/white image where completely white pixels will be transparent) To do this quickly you should use the fast pointer access to the pixel data via LockBits()..&#xD;&#xA;&#xD;&#xA;Here is a GDI+ example. This will only work if the images are 32bppArgb format and both are the same size - if you only need to apply an alpha mask to a small portion of the original image I would suggest you adjust the code to do that.&#xD;&#xA;&#xD;&#xA;    public static void ApplyAlphaMask(Bitmap bmp, Bitmap alphaMaskImage)&#xD;&#xA;    {    &#xD;&#xA;      int width = bmp.Width;&#xD;&#xA;      int height = bmp.Height;&#xD;&#xA;    &#xD;&#xA;      BitmapData dataAlphaMask = alphaMaskImage.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);&#xD;&#xA;      try&#xD;&#xA;      {&#xD;&#xA;        BitmapData data = bmp.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);&#xD;&#xA;        try&#xD;&#xA;        {&#xD;&#xA;          unsafe //using pointer requires the unsafe keyword&#xD;&#xA;          {&#xD;&#xA;            byte* pData0Mask = (byte*)dataAlphaMask.Scan0;&#xD;&#xA;            byte* pData0 = (byte*)data.Scan0;&#xD;&#xA;    &#xD;&#xA;            for (int x = 0; x &lt; width; x++)&#xD;&#xA;            {&#xD;&#xA;              for (int y = 0; y &lt; height; y++)&#xD;&#xA;              {&#xD;&#xA;                byte* pData = pData0 + (y * data.Stride) + (x * 4);&#xD;&#xA;                byte* pDataMask = pData0Mask + (y * dataAlphaMask.Stride) + (x * 4);&#xD;&#xA;    &#xD;&#xA;                byte maskBlue = pDataMask[0];&#xD;&#xA;                byte maskGreen = pDataMask[1];&#xD;&#xA;                byte maskRed = pDataMask[2];&#xD;&#xA;    &#xD;&#xA;                //the closer the color is to black the more opaque it will be.&#xD;&#xA;                byte alpha = (byte)(255 - (maskRed + maskBlue + maskGreen) / 3);&#xD;&#xA;    &#xD;&#xA;                //respect the original alpha value&#xD;&#xA;                byte originalAlpha = pData[3];&#xD;&#xA;                pData[3] = (byte)(((float)(alpha * originalAlpha)) / 255f);&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;        finally&#xD;&#xA;        {&#xD;&#xA;          bmp.UnlockBits(data);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      finally&#xD;&#xA;      {&#xD;&#xA;        alphaMaskImage.UnlockBits(dataAlphaMask);&#xD;&#xA;      }&#xD;&#xA;    }" />
  <row Id="29363" PostHistoryTypeId="5" PostId="13232" RevisionGUID="b3179125-fd97-45d2-ab95-464dc2dfe5bd" CreationDate="2011-06-06T08:43:40.363" UserId="5864" Comment="fixed grammar" Text="Your question is not precise enough. An array of points is only « clockwise » or « anti-clockwise » relative to a reference point. Otherwise, any array of three points can always be either CW or CCW. See the following picture: on the left, the points are ordered clockwise; on the right, the exact same points are ordered anticlockwise.&#xD;&#xA;&#xD;&#xA;![clockwise or anticlockwise][1]&#xD;&#xA;&#xD;&#xA;In your case, I believe using the barycenter of the points as a reference point is reasonable.&#xD;&#xA;&#xD;&#xA;A good method for an unknown number of points could be the following one:&#xD;&#xA;&#xD;&#xA; - let `P[0], P[1], ... P[n-1]` be the list of points to sort&#xD;&#xA; - let M be the barycenter of all points&#xD;&#xA; - compute `a[0], a[1], ... a[n-1]` such that `a[i] = atan2(P[i].y - M.y, P[i].x - M.x);`&#xD;&#xA; - sort points relative to their `a` value, using `qsort` for instance.&#xD;&#xA;&#xD;&#xA;However, you can be sure that a good sorting algorithm will perform poorly with three input values compared to an ad-hoc method. Using `atan2` is still valid, but just don't use `qsort`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zoy.org/~sam/cw-ccw.png" />
  <row Id="29364" PostHistoryTypeId="25" PostId="13244" RevisionGUID="3c4197f7-8c01-4890-aabf-6ecbd65e281a" CreationDate="2011-06-06T09:13:41.910" Comment="http://twitter.com/#!/StackGameDev/status/77664446306197504" />
  <row Id="29365" PostHistoryTypeId="2" PostId="13247" RevisionGUID="ae0582f0-464d-45a7-ae96-96bb8b363cfa" CreationDate="2011-06-06T10:30:35.287" UserId="7514" Text="I'm pretty sure it's possible but i have no idea how.&#xD;&#xA;&#xD;&#xA;Could anyone tell me how to make a custom semantic for a pixel shader.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="29366" PostHistoryTypeId="1" PostId="13247" RevisionGUID="ae0582f0-464d-45a7-ae96-96bb8b363cfa" CreationDate="2011-06-06T10:30:35.287" UserId="7514" Text="How to make a Custom Semantics HLSL for the pixel shader" />
  <row Id="29367" PostHistoryTypeId="3" PostId="13247" RevisionGUID="ae0582f0-464d-45a7-ae96-96bb8b363cfa" CreationDate="2011-06-06T10:30:35.287" UserId="7514" Text="&lt;hlsl&gt;" />
  <row Id="29368" PostHistoryTypeId="5" PostId="13186" RevisionGUID="007d450b-485e-4f84-8caa-a4fb523f64cc" CreationDate="2011-06-06T11:41:05.917" UserId="1839" Comment="added 607 characters in body; added 302 characters in body" Text="As long as you only apply **constant acceleration** (i.e. constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. If not, then there is something wrong with the implementation of Euler's Method. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;It seems both, the [article][1] on gaffergames and the code in the question uses the wrong Euler Method, namely:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;whereas the correct one would be this as shown in this [paper][2]:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;If you use the latter you will have the correct integration for constant accelerations.&#xD;&#xA;&#xD;&#xA;Note: This answer is not supposed to mean that the Euler Method is a good choice for complex physics, nor that you should stick to it once you want to add more physics dynamics to your scene. However, if the application will only use constant acceleration, then this method fits perfectly your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;  [2]: http://www.cfm.brown.edu/people/sg/AM35odes.pdf" />
  <row Id="29369" PostHistoryTypeId="5" PostId="13186" RevisionGUID="44f75e0a-2ee5-4b91-bb3a-be2125a2355f" CreationDate="2011-06-06T11:46:16.743" UserId="1839" Comment="edited body; added 6 characters in body" Text="As long as you only apply **constant acceleration** (i.e. constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. If not, then there is something wrong with the implementation of Euler's Method. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;It seems both, the [article on gaffergames][1] and the code in the question uses a simpler form of Euler's Method, namely:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;whereas this one as also shown in this [paper][2]:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;is still capable of correctly integratiing constant accelerations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: This answer is not supposed to mean that the Euler Method is a good choice for complex physics and non-constant accelerations, nor that you should stick to it once you want to add more physics dynamics to your scene. However, if the application will only use constant acceleration, then this method fits perfectly your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;  [2]: http://www.cfm.brown.edu/people/sg/AM35odes.pdf" />
  <row Id="29370" PostHistoryTypeId="5" PostId="13186" RevisionGUID="7629e3db-dd6e-46f0-863d-121812b12e79" CreationDate="2011-06-06T11:53:23.733" UserId="1839" Comment="edited body" Text="As long as you only apply **constant acceleration** (i.e. constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. If not, then there is something wrong with the implementation of Euler's Method. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;It seems both, the [article on gaffergames][1] and the code in the question uses a simpler form of Euler's Method, namely:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;whereas this one as also shown in this [paper][2]:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;is still capable of correctly integratiing constant accelerations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: This answer is not supposed to mean that the Euler Method is a good choice for complex physics and non-constant accelerations, nor that you should stick to it once you want to add more physics dynamics to your scene. However, if the application will only use constant acceleration, then this method perfectly fits your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;  [2]: http://www.cfm.brown.edu/people/sg/AM35odes.pdf" />
  <row Id="29371" PostHistoryTypeId="4" PostId="13247" RevisionGUID="3ba97fd4-b07c-480e-97ec-d8e9837fa774" CreationDate="2011-06-06T11:54:59.693" UserId="1156" Comment="edited tags; edited title" Text="How to make a custom semantics HLSL shader for the pixel shader" />
  <row Id="29372" PostHistoryTypeId="6" PostId="13247" RevisionGUID="3ba97fd4-b07c-480e-97ec-d8e9837fa774" CreationDate="2011-06-06T11:54:59.693" UserId="1156" Comment="edited tags; edited title" Text="&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="29373" PostHistoryTypeId="2" PostId="13248" RevisionGUID="c9f0d828-a90c-4b51-9373-1d9abe6c4ff9" CreationDate="2011-06-06T12:04:04.277" UserId="4662" Text="Typically, you just use `TEXCOORD` for any data that DX doesn't understand." />
  <row Id="29374" PostHistoryTypeId="25" PostId="13247" RevisionGUID="7aa6dd62-2bbf-4793-bf06-47af79f7ab13" CreationDate="2011-06-06T12:13:41.947" Comment="http://twitter.com/#!/StackGameDev/status/77709744067969024" />
  <row Id="29375" PostHistoryTypeId="2" PostId="13249" RevisionGUID="70409efd-708f-47bf-b8e7-e8e0c9045810" CreationDate="2011-06-06T12:39:49.583" UserId="1839" Text="After building bullet, you have to copy the libs to the ogre folder as explained [here][1]&#xD;&#xA;&#xD;&#xA;Particulary this part: **&quot;Put these files to ....\OgreBullet\lib\Debug\:&quot;**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/OgreBullet+Tutorial+1&amp;structure=Libraries" />
  <row Id="29376" PostHistoryTypeId="5" PostId="13248" RevisionGUID="05724407-5c8c-44f7-9363-7946b2445295" CreationDate="2011-06-06T12:42:15.083" UserId="4662" Comment="added 189 characters in body" Text="Typically, you just use `TEXCOORD` for any data that DX doesn't understand.&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb509647(VS.85).aspx&#xD;&#xA;&#xD;&#xA;This page suggests that the system doesn't give a crap, effectively, what semantics you give to your pixel shader inputs." />
  <row Id="29377" PostHistoryTypeId="2" PostId="13250" RevisionGUID="784e289b-d7dc-406e-8e4f-7b5a457c6e1e" CreationDate="2011-06-06T12:55:23.230" UserId="1101" Text="I start by handling this sort of thing the simplest way possible.&#xD;&#xA;&#xD;&#xA;    bool isPieceMoving;&#xD;&#xA;&#xD;&#xA;Then I'll add the checks against that boolean flag in the relevant places.&#xD;&#xA;&#xD;&#xA;If I later find I need more special cases than this - and only it - I re-factor into something better. There are usually 3 approaches I'll take:&#xD;&#xA;&#xD;&#xA; - Refactor any exclusive substate-representing flags into enums. eg. `enum { PRE_MOVE, MOVE, POST_MOVE }` and add the transitions wherever needed. Then I can check against this enum where I used to check against the boolean flag. This is a simple change but one which reduces the number of things you have to check against, allows you to use switch statements to manage behaviour effectively, etc.&#xD;&#xA; - Switch off individual subsystems as you need to. If the only difference during the battle sequence is that you can't move pieces, you can call `pieceSelectionManager-&gt;disable()` or similar at the start of the sequence, and `pieceSelectionManager-&gt;enable()`. You still essentially have flags, but now they're stored closer to the object they control, and you don't need to maintain any extra state in your game code.&#xD;&#xA; - The previous part implies the existence of a PieceSelectionManager: more generally, you can factor out parts of your game state and behaviour into smaller objects that handle a subset of the overall state in a coherent way. Each of these objects will have some of its own state which determines its behaviour but it's easy to manage since it's isolated from the other objects. Resist the urge to allow your gamestate object or main loop to become a dumping ground for pseudo-globals and factor that stuff out!&#xD;&#xA;&#xD;&#xA;Generally speaking I never need to go any further than this when it comes to special-case substates, so I don't think there is a risk of it 'quickly getting out of hand'." />
  <row Id="29378" PostHistoryTypeId="5" PostId="13056" RevisionGUID="340fc06a-8e9c-43ac-84ef-1ef9919981d3" CreationDate="2011-06-06T13:50:52.443" UserId="7772" Comment="deleted 1835 characters in body" Text="I'm having a tremendous time getting the second (or additional) sprites in my game engine to render properly.  The first one always works great: it is positioned and sized properly in screen coords, and its texture is mapped properly.  When I add a second sprite to the world, its texture does not get mapped properly.  If I reverse the two sprites render orders, the sprite that was rendered second previously (and had corrupt texture mapping) is now correct, and the other sprite is now corrupt.&#xD;&#xA;&#xD;&#xA;I think it has to do with something in my shader not getting cleared out properly before it is used again.  I have to admit, I'm fairly new to shaders.  Interestingly, I'm building this engine to support both ES1.1 and ES2.0, and the same code works great in ES1.1 for multiple sprites.&#xD;&#xA;&#xD;&#xA;I'll attempt to provide relevant code snippets below.  Any suggestions would be great - I've browsed dozens of good forums and Stack Exchange.  Is there perhaps a call I should be making between primitive renders to clean out the shaders?&#xD;&#xA;    &#xD;&#xA;Here's the snippet for rendering in ES2.0&#xD;&#xA;&#xD;&#xA;    void Sprite::Render(GLuint shaderProgram, UniformHandles* uniforms, AttributeHandles* attributes)&#xD;&#xA;    {&#xD;&#xA;    // Use the shader we were sent&#xD;&#xA;    glUseProgram(shaderProgram);&#xD;&#xA;    &#xD;&#xA;    // Enable transparent blending&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;    &#xD;&#xA;    // Performance: could pull this out and only recalculate when moved&#xD;&#xA;    PVRTVec2 bottomLeftPos = PVRTVec2((m_viewDims.x - m_position.x) / m_viewDims.x,&#xD;&#xA;                                          ((m_viewDims.y - (m_position.y - m_drawDims.y)) / m_viewDims.y));&#xD;&#xA;        &#xD;&#xA;    PVRTVec2 topRightPos = PVRTVec2((m_viewDims.x - (m_position.x + m_drawDims.x)) / m_viewDims.x,&#xD;&#xA;                                        (m_viewDims.y - m_position.y) / m_viewDims.y);&#xD;&#xA;        &#xD;&#xA;    // Draw the quad for ES2 (positioning is not based on these values: do not change)&#xD;&#xA;    DrawQuad((bottomLeftPos.x * 2.0f) - 1.0f, (bottomLeftPos.y * 2.0f) - 1.0f, (topRightPos.x * 2.0f) - 1.0f, (topRightPos.y * 2.0f) - 1.0f, m_textureResource-&gt;texture, uniforms, attributes);&#xD;&#xA;    &#xD;&#xA;    // Turn off blending&#xD;&#xA;    glDisable(GL_BLEND);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;And here's the snippet for DrawQuad()&#xD;&#xA;    &#xD;&#xA;    void Sprite::DrawQuad(float x1, float y1, float x2, float y2, GLuint texture,&#xD;&#xA;                      UniformHandles* uniforms, AttributeHandles* attributes)&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;        // Set the uniforms for rectangle position and width&#xD;&#xA;        // Landscape&#xD;&#xA;        glUniform2f(uniforms-&gt;LowerLeft, -y1, x1);&#xD;&#xA;        float scaleMatrix[4] = { 0, x2 - x1, y1 - y2, 0 };&#xD;&#xA;        glUniformMatrix2fv(uniforms-&gt;ScaleMatrix, 1, GL_FALSE, scaleMatrix);&#xD;&#xA;&#xD;&#xA;        // Use the given texture&#xD;&#xA;        glActiveTexture(GL_TEXTURE0);&#xD;&#xA;        glBindTexture(GL_TEXTURE_2D, texture);&#xD;&#xA;        &#xD;&#xA;        // Bind the vertex buffer object&#xD;&#xA;        glBindBuffer(GL_ARRAY_BUFFER, m_vbo);&#xD;&#xA;        glEnableVertexAttribArray(attributes-&gt;in2DVertex);&#xD;&#xA;        glEnableVertexAttribArray(attributes-&gt;inSpriteTexCoord);&#xD;&#xA;        glVertexAttribPointer(attributes-&gt;in2DVertex, 2, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 4, 0);&#xD;&#xA;        glVertexAttribPointer(attributes-&gt;inSpriteTexCoord, 2, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 4, (unsigned char*) (sizeof(GL_FLOAT) * 2));&#xD;&#xA;        &#xD;&#xA;        // Draws a short triangle strip&#xD;&#xA;        glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);&#xD;&#xA;        &#xD;&#xA;        glDisableVertexAttribArray(attributes-&gt;in2DVertex);&#xD;&#xA;        glDisableVertexAttribArray(attributes-&gt;inSpriteTexCoord);&#xD;&#xA;        glBindBuffer(GL_ARRAY_BUFFER, 0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And finally the vertex shader and fragment shader for 2D sprites:&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;    attribute highp vec2    in2DVertex;&#xD;&#xA;    attribute highp vec2    inSpriteTexCoord;&#xD;&#xA;&#xD;&#xA;    uniform highp vec2      LowerLeft;&#xD;&#xA;    uniform highp mat2      ScaleMatrix; // Width/height and screen rotation&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;       gl_Position = vec4(ScaleMatrix * in2DVertex + LowerLeft, 0, 1);&#xD;&#xA;       TexCoord = inSpriteTexCoord; // formerly in2DVertex&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Fragment Shader&#xD;&#xA;    uniform sampler2D  sTexture;&#xD;&#xA;&#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_FragColor = texture2D(sTexture, TexCoord);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="29379" PostHistoryTypeId="2" PostId="13251" RevisionGUID="1355bd43-ff21-4087-b874-7b0329dc855a" CreationDate="2011-06-06T13:51:27.717" UserId="7772" Text="Although I don't have a solution to the problem I was encountering, I did find a workaround and I am posting it if anyone else ever sees something similar.&#xD;&#xA;&#xD;&#xA;For reference, the rendering code I was basing the above snippets on (esp the shaders) came from PowerVR's OpenGLES2.0 SDK (I think the Alpha Blending demo). I mostly understand the coordinate system it is using to render sprites, but I think it's pretty funky. At least, I sure don't think that way when I consider graphics!&#xD;&#xA;&#xD;&#xA;SO, I switched it over from that system to a much more &quot;3D&quot;-oriented shader. Here's the new vertex shader:&#xD;&#xA;&#xD;&#xA;attribute highp vec4    inSpriteVertex;&#xD;&#xA;attribute highp vec2    inSpriteTexCoord;&#xD;&#xA;&#xD;&#xA;uniform highp mat4      OrthoProjectionMatrix;&#xD;&#xA;uniform highp mat4      ModelviewSpriteMatrix;&#xD;&#xA;&#xD;&#xA;varying mediump vec2    TexCoord;&#xD;&#xA;&#xD;&#xA;void main()&#xD;&#xA;{&#xD;&#xA;    gl_Position = OrthoProjectionMatrix * ModelviewSpriteMatrix * inSpriteVertex;&#xD;&#xA;    //gl_Position = vec4(ScaleMatrix * in2DVertex + LowerLeft, 0, 1);&#xD;&#xA;    TexCoord = inSpriteTexCoord; // formerly in2DVertex&#xD;&#xA;}&#xD;&#xA;Notice I'm still using a 2D texture coordinate but have now upgraded to a 4D position vector for the given vertex and a including two matrices for transformation: an orthographic view matrix and a model view matrix that contains the scale/rotation/translation transforms that have been applied to this sprite.&#xD;&#xA;&#xD;&#xA;Again, I wish I knew what I was doing wrong in the original snippets, but this approach seems much more sensible. Probably not as fast at render time, but I think it is reasonable. Hope this helps someone!" />
  <row Id="29380" PostHistoryTypeId="2" PostId="13252" RevisionGUID="1d8e0294-af96-457e-83fd-ddfcda0cfcb3" CreationDate="2011-06-06T14:25:38.157" UserId="7845" Text="&#xD;&#xA;&#xD;&#xA;I'm developing a game and i've ran into some questions about saving and resuming the game. Let's say i have 10 animated sprites drawn every frame (which move side to side) and everytime i press the home button or back button and then go back to my game, it starts drawing the sprites at the starting position rather than in the position before the back/home press.&#xD;&#xA;&#xD;&#xA;- Do i have to save every sprite and animation position in order to achive resuming the game where i left off (using Bundle, onSaveInstanceState and onRestoreInstanceState())? Or can this be achived some other simpler way. &#xD;&#xA;&#xD;&#xA;I'm using the lunarlander example which handles the drawing in a thread and when the user presses the home/back button(onPause) the state is saved and then reloaded on resume.But if i move all the drawing methods to SurfaceView (LunarView) and just call them from a thread(LunarView.draw()), the sprites stay in the exact same position as before the back/home button pressed without saving anything. Can someone explain why this happens? Is it something i should avoid(calling SurfaceView.draw() from a thread) or is this the anwser to my question how to save game state?&#xD;&#xA;&#xD;&#xA;Thanks for the reply's.&#xD;&#xA;&#xD;&#xA;Regards, J." />
  <row Id="29381" PostHistoryTypeId="1" PostId="13252" RevisionGUID="1d8e0294-af96-457e-83fd-ddfcda0cfcb3" CreationDate="2011-06-06T14:25:38.157" UserId="7845" Text="android game saving game state" />
  <row Id="29382" PostHistoryTypeId="3" PostId="13252" RevisionGUID="1d8e0294-af96-457e-83fd-ddfcda0cfcb3" CreationDate="2011-06-06T14:25:38.157" UserId="7845" Text="&lt;game-design&gt;&lt;2d&gt;&lt;android&gt;" />
  <row Id="29383" PostHistoryTypeId="5" PostId="13186" RevisionGUID="a0bfb84c-f89c-46ea-b3c4-20182f1df7ae" CreationDate="2011-06-06T14:35:19.090" UserId="1839" Comment="deleted 1 characters in body" Text="As long as you only apply **constant acceleration** (i.e. constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. If not, then there is something wrong with the implementation of Euler's Method. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;It seems both, the [article on gaffergames][1] and the code in the question use a simpler form of Euler's Method, namely:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;whereas this one as also shown in this [paper][2]:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;is still capable of correctly integratiing constant accelerations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: This answer is not supposed to mean that the Euler Method is a good choice for complex physics and non-constant accelerations, nor that you should stick to it once you want to add more physics dynamics to your scene. However, if the application will only use constant acceleration, then this method perfectly fits your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;  [2]: http://www.cfm.brown.edu/people/sg/AM35odes.pdf" />
  <row Id="29388" PostHistoryTypeId="2" PostId="13254" RevisionGUID="580f5e23-9510-4c09-af2b-f1106d2b1ed4" CreationDate="2011-06-06T15:17:20.677" UserId="853" Text="If you look at http://www.cocos2d-iphone.org/archives/1112 there is a implementation of a rope with a rigid body attached to the end of the rope. It uses Box2D for the physics engine. If you look at the source code, I'm sure you can implement it in any language you like. &#xD;&#xA;&#xD;&#xA;Also, the above link to the Rope question is mine and this demo(link provided) above really helped. " />
  <row Id="29389" PostHistoryTypeId="2" PostId="13255" RevisionGUID="beb1d27c-64cd-4511-8750-f45ca6e0ac22" CreationDate="2011-06-06T15:20:12.230" UserId="2268" Text="I found a good description of the engine in the Sonic games. It describes roughly how the engine works for people writing their own clones. In my case, I am simply interested in getting a general view of how the many 8-bit and 16-bit game engines worked on their respective consoles. So, this is a big-list style question asking, what other online descriptions of specific game engines have people found?" />
  <row Id="29390" PostHistoryTypeId="1" PostId="13255" RevisionGUID="beb1d27c-64cd-4511-8750-f45ca6e0ac22" CreationDate="2011-06-06T15:20:12.230" UserId="2268" Text="Textual descriptions of 8-bit and 16-bit game engines" />
  <row Id="29391" PostHistoryTypeId="3" PostId="13255" RevisionGUID="beb1d27c-64cd-4511-8750-f45ca6e0ac22" CreationDate="2011-06-06T15:20:12.230" UserId="2268" Text="&lt;engine&gt;" />
  <row Id="29392" PostHistoryTypeId="2" PostId="13256" RevisionGUID="2c94fcf8-91bd-4172-8edf-819bcc3d9035" CreationDate="2011-06-06T15:26:53.410" UserId="7328" Text="I was reading what service locator pattern is from [this article](http://gameprogrammingpatterns.com/service-locator.html), and now I'm just wondering if I merge service and locator classes is it still service locator patern or not? And if not do you think this implementation is usable enough as single or service locator pattern? (since example there was audio manager i'll give same example here)&#xD;&#xA;&#xD;&#xA;	class AudioManager{&#xD;&#xA;	private:&#xD;&#xA;		static AudioManager* instance;&#xD;&#xA;		static AudioManager _NULLINSTANCE;		&#xD;&#xA;	public:&#xD;&#xA;		AudioManager()&#xD;&#xA;		{&#xD;&#xA;			instance = &amp;NULLINSTANCE;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		AudioManager* getInstance() &#xD;&#xA;		{&#xD;&#xA;			return instance;&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		void registerInstance(AudioManager* pInstance) &#xD;&#xA;		{&#xD;&#xA;			instance = pInstance;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void load(char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void play(char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void stop(char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;		&#xD;&#xA;	&#xD;&#xA;and then I'll inherite classes I need from AudioManager and call registerInstance in my initialization funciton or just define something meaningful for virtual funcitons (which will create a singleton with rigister function). &#xD;&#xA;" />
  <row Id="29393" PostHistoryTypeId="1" PostId="13256" RevisionGUID="2c94fcf8-91bd-4172-8edf-819bcc3d9035" CreationDate="2011-06-06T15:26:53.410" UserId="7328" Text="is this one still service locator pattern" />
  <row Id="29394" PostHistoryTypeId="3" PostId="13256" RevisionGUID="2c94fcf8-91bd-4172-8edf-819bcc3d9035" CreationDate="2011-06-06T15:26:53.410" UserId="7328" Text="&lt;architecture&gt;&lt;design-patterns&gt;" />
  <row Id="29395" PostHistoryTypeId="2" PostId="13257" RevisionGUID="e39701f6-b653-4249-b970-848189c39485" CreationDate="2011-06-06T15:30:30.747" UserId="2132" Text="I notice that for several games on Kongregate, the copyright notice either uses the author's handle name (login name), the name of the group that produce it or a domain name.&#xD;&#xA;&#xD;&#xA;Are all those valid copyright notices? " />
  <row Id="29396" PostHistoryTypeId="1" PostId="13257" RevisionGUID="e39701f6-b653-4249-b970-848189c39485" CreationDate="2011-06-06T15:30:30.747" UserId="2132" Text="Copyrighting a web Flash/Unity3D game" />
  <row Id="29397" PostHistoryTypeId="3" PostId="13257" RevisionGUID="e39701f6-b653-4249-b970-848189c39485" CreationDate="2011-06-06T15:30:30.747" UserId="2132" Text="&lt;legal&gt;" />
  <row Id="29398" PostHistoryTypeId="2" PostId="13258" RevisionGUID="d45798fc-4ce7-473f-ba0f-8a4a3174acc6" CreationDate="2011-06-06T15:47:58.713" UserId="1198" Text="In general, your copyright notice should be either using your name or the name of your company. If the name of your company happens to include the TLD of your website, so be it." />
  <row Id="29399" PostHistoryTypeId="4" PostId="13257" RevisionGUID="feed1938-def2-4892-91f4-467e9086d22c" CreationDate="2011-06-06T16:01:16.870" UserId="51" Comment="edited title" Text="Copyright notices on a web game portal" />
  <row Id="29400" PostHistoryTypeId="16" PostId="13255" RevisionGUID="143dbaf5-d1aa-451e-8383-32ceb2e2bcf6" CreationDate="2011-06-06T16:20:00.963" UserId="51" />
  <row Id="29401" PostHistoryTypeId="2" PostId="13259" RevisionGUID="4b1653a2-826d-4d09-9e94-1314f7103748" CreationDate="2011-06-06T16:48:31.907" UserId="7630" Text="As a general rule I think a copyright notice would have to identify the legal name of the owner ... your name, your company's registered name, etc. if for no other reason than to be able to look it up in the event of a dispute.&#xD;&#xA;&#xD;&#xA;It is possible that a domain name may be appropriate (since they're registered), but a handle or other alias probably isn't valid (after all, you'd have to prove that you are the person the handle identifies).&#xD;&#xA;&#xD;&#xA;Strictly opinion." />
  <row Id="29402" PostHistoryTypeId="2" PostId="13260" RevisionGUID="6073168e-f7c6-49a6-95bb-5ed3a7091a23" CreationDate="2011-06-06T16:54:20.477" UserId="6558" Text="There's a few reasons that HTML5 games aren't making money via sponsorships in the same way that Flash games do.&#xD;&#xA;&#xD;&#xA; 1. HTML5/canvas/javascript is still fairly slow.  For some games (puzzle, turn based strategy), this isn't a huge problem, but it's still a concern, and for a large amount of browser, the canvas tag still isn't hardware accelerated.&#xD;&#xA;&#xD;&#xA; 2. There's no reliable way to prevent theft of the code/game/etc, or ways to prevent cheating.  This is a problem with Flash games, too, but it takes a bit more work to decompile Flash than Javascript (since Javascript has to be received as plain text for the browser to handle it)&#xD;&#xA;&#xD;&#xA; 3. Similar to the second point, there is no easy way to distribute an HTML5 game.  With Flash, it's a single .swf file.  With HTML5, there's an .html file, and at least one .js file, plus any assets used by the game.  There's some potential solutions to this, but no one has come up with a method to handle this yet.&#xD;&#xA;&#xD;&#xA;There's probably some other issues I haven't addressed, but those are the major ones that I see.  Note that there are ways to make money from HTML5 games, but the route is different from a typical flash game.  Chrome's app store is filled with HTML5 apps/games, many of which charge for extra levels or features.  There's also hosting a game on your own server and having ads in the hopes of generating some income." />
  <row Id="29403" PostHistoryTypeId="2" PostId="13261" RevisionGUID="96469b1c-d21a-4677-b845-89e587ded78b" CreationDate="2011-06-06T17:12:56.470" UserId="3505" Text="That probably depends upon the court, and in some countries to a great deal on how well the lawyers fight.&#xD;&#xA;&#xD;&#xA;In any case, do remember, copyright applies no matter such notices. They may make claiming damages easier, but a missing notice is in no way a carte blanche for copyright infringement." />
  <row Id="29404" PostHistoryTypeId="2" PostId="13262" RevisionGUID="4f4cd674-9da5-4184-bba8-b726c860f56e" CreationDate="2011-06-06T17:16:17.750" UserId="5224" Text="This is no longer the service locator pattern because anything that would like to talk to the audio service, now has to know about the class, it's location/package etc..&#xD;&#xA;&#xD;&#xA;Take a good look at this quote from the site you linked:&#xD;&#xA;&#xD;&#xA;&gt; These callsites, of course, have to be&#xD;&#xA;&gt; coupled to something in order to make&#xD;&#xA;&gt; a sound play, but letting them poke&#xD;&#xA;&gt; directly at the concrete audio&#xD;&#xA;&gt; implementation is like giving a&#xD;&#xA;&gt; hundred strangers directions to your&#xD;&#xA;&gt; house just so they can drop a letter&#xD;&#xA;&gt; on your doorstep. Not only is it a&#xD;&#xA;&gt; little bit too personal, it’s a real&#xD;&#xA;&gt; pain when you move and you have to&#xD;&#xA;&gt; tell each person the new directions.&#xD;&#xA;&#xD;&#xA;In the final example any game object that can ask for the audio engine only has to know about the IAudio interface and where the locator is. Not where the actual AudioService class is. By putting the locator inside the AudioService you violate this idea, and you just get a weird singleton." />
  <row Id="29405" PostHistoryTypeId="2" PostId="13263" RevisionGUID="aa47f6c4-68aa-464a-ac3e-e85a1f7d0af9" CreationDate="2011-06-06T17:25:05.350" UserId="1156" Text="First off, this is not gamedev related and as such is a more SO question. Also, why should it matter if you're using the service locator pattern? Why should it matter if your code is an observer, or a visitor? Design patterns are meant as structures that can be used for generic aim. It is unlikely you will need them in their raw form. &#xD;&#xA;&#xD;&#xA;Anyway, it is not. The idea of a service pattern is to act as a messenger. You, person `X`, want to get an object `Z`. The service provider `Y` simply has a reference to `Z`, and passes you that. The idea is that you do not need to know anything about `Z` (other than what it is). It could be a red object, a blue object, a yellow object - the service provider is simply giving you the object without having to reference it exactly.&#xD;&#xA;&#xD;&#xA;In this case, the load/play/stop functions are just showing this as a singleton. You want three classes; an interface `IAudio` which is what you program against, a `AudioServiceProvider` which has the `IAudio` pointer, and a number of `Audio` concrete classes that implement `IAudio`. You have missed out the middle step." />
  <row Id="29407" PostHistoryTypeId="5" PostId="13256" RevisionGUID="edbc60ea-b49d-48b9-9307-53894c3c1f7a" CreationDate="2011-06-06T17:39:33.637" UserId="1156" Comment="added 6 characters in body; edited tags; edited title" Text="I was reading what a service locator pattern is from [this article](http://gameprogrammingpatterns.com/service-locator.html), and now I'm just wondering if I merge service and locator classes is it still a service locator pattern or not? And if not, do you think this implementation is usable enough as single or service locator pattern? (since the example was an audio manager I'll give same example here)&#xD;&#xA;&#xD;&#xA;	class AudioManager{&#xD;&#xA;	private:&#xD;&#xA;		static AudioManager* instance;&#xD;&#xA;		static AudioManager _NULLINSTANCE;		&#xD;&#xA;	public:&#xD;&#xA;		AudioManager()&#xD;&#xA;		{&#xD;&#xA;			instance = &amp;NULLINSTANCE;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		AudioManager* getInstance() &#xD;&#xA;		{&#xD;&#xA;			return instance;&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		void registerInstance(AudioManager* pInstance) &#xD;&#xA;		{&#xD;&#xA;			instance = pInstance;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void load(char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void play(char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void stop(char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;		&#xD;&#xA;	&#xD;&#xA;And then I'll inherit classes I need from AudioManager and call registerInstance in my initialization function or just define something meaningful for virtual funcitons (which will create a singleton with register function). &#xD;&#xA;" />
  <row Id="29408" PostHistoryTypeId="4" PostId="13256" RevisionGUID="edbc60ea-b49d-48b9-9307-53894c3c1f7a" CreationDate="2011-06-06T17:39:33.637" UserId="1156" Comment="added 6 characters in body; edited tags; edited title" Text="Is this design a service locator design pattern?" />
  <row Id="29409" PostHistoryTypeId="6" PostId="13256" RevisionGUID="edbc60ea-b49d-48b9-9307-53894c3c1f7a" CreationDate="2011-06-06T17:39:33.637" UserId="1156" Comment="added 6 characters in body; edited tags; edited title" Text="&lt;c++&gt;&lt;architecture&gt;&lt;design-patterns&gt;" />
  <row Id="29410" PostHistoryTypeId="25" PostId="13257" RevisionGUID="dd6d4f5c-0525-4d27-adde-ed70c26a79c9" CreationDate="2011-06-06T18:13:42.307" Comment="http://twitter.com/#!/StackGameDev/status/77800343492239360" />
  <row Id="29411" PostHistoryTypeId="2" PostId="13264" RevisionGUID="5f7bb201-ff99-4acc-9b06-595854f42745" CreationDate="2011-06-06T19:31:44.060" UserId="7630" Text="A window is an organizational tool, as noted for separating and displaying information.  In a PC context you'd generally use this for (as example) a primary output window and a debug window (or a game window and a multiplayer lobby/chat).&#xD;&#xA;&#xD;&#xA;I don't see a lot of games that use multiple windows, generally I see view ports used to divide up the screen among a viewable game area, inventory, chat and so on though even that is somewhat out of vogue right now, with most controls simply overlaying the play area in a HUD like display.&#xD;&#xA;&#xD;&#xA;Hope this is what you were looking for." />
  <row Id="29412" PostHistoryTypeId="2" PostId="13265" RevisionGUID="12bc29be-9bae-49be-ac66-5446f3f3167f" CreationDate="2011-06-06T19:50:47.300" UserId="6340" Text="&#xA;&#xD;&#xA;Since you are using WinForms, I suggest that you drop the game loop (by&#xD;&#xA;the way, where exactly are you planning to put it?), add a timer&#xD;&#xA;component and process game logic in timer &quot;Tick&quot; event handler. Each&#xD;&#xA;tick should be equivalent to one iteration of the loop.&#xD;&#xA;&#xD;&#xA;And for the input handling you should probably do something like this:&#xD;&#xA;&#xD;&#xA; 1. Create a buffer where you store information about recently pressed&#xD;&#xA;keys. It can be as simple as an array with as many entries, as there&#xD;&#xA;are keys. Each entry should be a boolean value that indicates whether&#xD;&#xA;the specific key was pressed (where the index of the array is the same&#xD;&#xA;as the key code). Alternatively, you could create something like a&#xD;&#xA;HashSet. For each pressed key, you would then add it's key code.&#xD;&#xA; 2. Add event handlers to KeyDown/KeyUp or KeyPress events. Each handler should change the key press state information in the earlier mentioned buffer.&#xD;&#xA; 3. Each time the &quot;Tick&quot; event handler gets called, simply check the buffer for the state of the keys that you are interested in and run the appropriate game logic." />
  <row Id="29413" PostHistoryTypeId="5" PostId="13256" RevisionGUID="660233e3-8cc8-4e03-9c28-56e46d27ce7b" CreationDate="2011-06-06T20:34:50.747" UserId="7328" Comment="deleted 134 characters in body" Text="I was reading what a service locator pattern is from [this article](http://gameprogrammingpatterns.com/service-locator.html), and now I'm just wondering if I merge service and locator classes is it still a service locator pattern or not? And if not, do you think this implementation is usable enough as single or service locator pattern? (since the example was an audio manager I'll give same example here)&#xD;&#xA;&#xD;&#xA;	class IAudio{&#xD;&#xA;	private:&#xD;&#xA;		static IAudio* instance;&#xD;&#xA;		static IAudio _NULLINSTANCE;		&#xD;&#xA;	public:&#xD;&#xA;		IAudio()&#xD;&#xA;		{&#xD;&#xA;			instance = &amp;NULLINSTANCE;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		IAudio* getInstance() &#xD;&#xA;		{&#xD;&#xA;			return instance;&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		void registerInstance(IAudio* pInstance) &#xD;&#xA;		{&#xD;&#xA;			instance = pInstance;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void load(const char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void play(const char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		virtual void stop(const char* path) &#xD;&#xA;		{ &#xD;&#xA;			//do nothing&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;		&#xD;&#xA;	&#xD;&#xA;And then I'll inherit classes I need from AudioManager and call registerInstance in my initialization function." />
  <row Id="29414" PostHistoryTypeId="2" PostId="13266" RevisionGUID="682896bb-c648-4154-bb82-1c659fa93928" CreationDate="2011-06-06T20:56:28.813" UserId="7697" Text="As someone who is currently working on a commercial HTML5 game, I can give some possibly helpful insights.&#xD;&#xA;&#xD;&#xA;First, HTML5 and gaming is brand new.  HTML5 is really brand new, and WebGL and accelerated canvas are really really brand new.  Mobile platforms for instance still lack WebGL entirely, and accelerated canvas is only available in very recent Firefox and Chrome/Webkit builds.&#xD;&#xA;&#xD;&#xA;We're just now seeing the first conferences, books, and panels on HTML5 games.  There's been the stuff at the most recent Google I/O and some panels at PAX 2011, and aside from that there's very little information.&#xD;&#xA;&#xD;&#xA;One problem is that HTML5/JavaScript is still not quite ready for games.  There's no way to lock/bind the mouse cursor, for instance, which makes a lot of games impossible to make (FPS style games) or just somewhat obnoxious to play (any fast-paced game, puzzle or otherwise, where a player is moving the cursor around a lot and has a good chance of accidentally going outside the browser content area and clicking).  There's the WebGL support problem mentioned above.  The HTML5 sound API is entirely unsuitable for games, although Chrome has an experimental new API that works better for games.  Linear algebra libraries for JavaScript are largely slow (though they're getting better -- Chrome Canary has some amazing optimizations targeting libraries like Closure and glMatrix.js that make a huge difference) and the copy-by-reference nature of them makes it a pain to use (in a game, you often use vectors more than scalar numbers, so imagine a language where every single value/type was copy-by-reference and then you have an idea of what doing a game in JavaScript can be like).&#xD;&#xA;&#xD;&#xA;Things will improve.  There are some really big companies pushing to get the Web into a suitable state for games, which includes new specifications/APIs to correct deficiencies in the platform, browser performance and behavior improvements, and evangelization/education about the platform.  Until then, though, most companies are playing it safe and staying away from the risky, new, and largely experimental gaming platform that is HTML5, which is why you won't see a lot of them willing to invest in it." />
  <row Id="29415" PostHistoryTypeId="2" PostId="13267" RevisionGUID="594b31e0-aaf9-463e-86a3-2380658bf034" CreationDate="2011-06-06T21:04:44.510" UserId="7697" Text="In terms of the contexts specifically, there's little difference.  Most OpenGL implementations have most of the features of OpenGL 3.0+ even when using a legacy context, due to the way OpenGL extensions work.&#xD;&#xA;&#xD;&#xA;If you're specifically asking about what features in OpenGL 3.0 are worth using, some of the best ones are geometry shaders and instancing, both of which are useful even for 2D graphics in certain circumstances.  However, in most cases for simple 2D, all you're going to be doing is filling up a streaming vertex buffer every frame and making a single draw call, so there's really very little extra you're going to be doing.&#xD;&#xA;&#xD;&#xA;In terms of 2D in OpenGL in general, just make sure you have a texture atlas (sprite sheet) so you very rarely need to change texture states.  You want to avoid doing a draw call per sprite, as that is incredibly inefficient, and rather you want to batch together a lot of sprites and draw them all at once.  Render with painter's algorithm, where &quot;render&quot; means pushing the geometry into a vertex buffer, and draw it at the end.  Post-process as you see fit." />
  <row Id="29416" PostHistoryTypeId="25" PostId="13252" RevisionGUID="76fb5815-c6a8-4d8f-b8fb-6a5d811e26cc" CreationDate="2011-06-06T21:13:42.077" Comment="http://twitter.com/#!/StackGameDev/status/77845639672766464" />
  <row Id="29417" PostHistoryTypeId="2" PostId="13268" RevisionGUID="8743ce41-f9d0-43ef-a536-4921e7ed8bc4" CreationDate="2011-06-06T21:20:04.590" UserId="6867" Text="Is there any way that I can make rounded corners on a rectangle rendered in XNA through primitives (line-strips)? I want to make my UI a bit more fancy than it is already, and I would like the code to be flexible, without too many textures involved." />
  <row Id="29418" PostHistoryTypeId="1" PostId="13268" RevisionGUID="8743ce41-f9d0-43ef-a536-4921e7ed8bc4" CreationDate="2011-06-06T21:20:04.590" UserId="6867" Text="Rounded corners in XNA?" />
  <row Id="29419" PostHistoryTypeId="3" PostId="13268" RevisionGUID="8743ce41-f9d0-43ef-a536-4921e7ed8bc4" CreationDate="2011-06-06T21:20:04.590" UserId="6867" Text="&lt;xna&gt;" />
  <row Id="29420" PostHistoryTypeId="5" PostId="13255" RevisionGUID="10e92155-4c79-4730-bf3a-9b52d6f759c0" CreationDate="2011-06-06T21:26:40.777" UserId="2268" Comment="added 64 characters in body" Text="I found a good description of the engine in the Sonic games. It describes [roughly how the engine works][1] for people writing their own clones. In my case, I am simply interested in getting a general view of how the many 8-bit and 16-bit game engines worked on their respective consoles. So, this is a big-list style question asking, what other online descriptions of specific game engines have people found?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://info.sonicretro.org/Sonic_Physics_Guide" />
  <row Id="29422" PostHistoryTypeId="2" PostId="13269" RevisionGUID="8a302c25-6c54-444f-9b26-cb4f38046697" CreationDate="2011-06-06T22:02:54.833" UserId="6500" Text="It will depend upon the country where the copyright is held, and generally you dont have to file it anywhere. You should look into the jurisdiction where the website is located/hosted. &#xD;&#xA;&#xD;&#xA;If it is US based the copyright standards dont require it to be their given name, only something that connects the authors identity to the material work they are presenting. That could be their email, login, company name, domain, logo etc." />
  <row Id="29423" PostHistoryTypeId="2" PostId="13270" RevisionGUID="b0f572f0-4736-45e0-b0ce-e7dc2b95dc96" CreationDate="2011-06-06T22:21:14.873" UserId="5169" Text="I'm looking to create a fairly large environment, and as such would like to implement a quadtree and use LOD on it. I've looked through numerous examples and I get the basic idea of a quadtree. Start with a root node with 4 vertices covering the whole map and divide into 4 children nodes until I meet some criteria(max number of triangles)&#xD;&#xA;&#xD;&#xA;I'm looking for some very very basic algorithm or explanation with respect to drawing the quadtree. What vertices need to be stored per iteration? When do I determine what vertices to draw? When to update indices and vertices? Hope to integrate the bounding frustrum? Do I include parent and child vertices?&#xD;&#xA;&#xD;&#xA;I'm looking for very simple instruction on what to do. I've scoured the internet for days now looking, but everyone adds extra code and a different spin without explanation.&#xD;&#xA;&#xD;&#xA;I understand quadtrees, but not with respect to 3d rendering and lod. A link to an outside source will probably have been read by myself already and won't help.&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Byron." />
  <row Id="29424" PostHistoryTypeId="1" PostId="13270" RevisionGUID="b0f572f0-4736-45e0-b0ce-e7dc2b95dc96" CreationDate="2011-06-06T22:21:14.873" UserId="5169" Text="XNA Quadtree with LOD" />
  <row Id="29425" PostHistoryTypeId="3" PostId="13270" RevisionGUID="b0f572f0-4736-45e0-b0ce-e7dc2b95dc96" CreationDate="2011-06-06T22:21:14.873" UserId="5169" Text="&lt;xna&gt;&lt;c#&gt;&lt;terrain-rendering&gt;" />
  <row Id="29426" PostHistoryTypeId="2" PostId="13271" RevisionGUID="9a6a51bc-aee7-4607-bb52-2d0476f1d698" CreationDate="2011-06-06T22:43:52.333" UserId="7852" Text="&#xA;I taking my first steps with XNA. I'm building the old 2D tutorial that used to be posted on the XNA website. I got to the part where I display the cannon, but its not showing. Can someone please take a look and say what is wrong. The background texture is displaying fine.&#xD;&#xA;&#xD;&#xA;Main class:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Audio;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Media;&#xD;&#xA;    &#xD;&#xA;    namespace XNA2DTutorial&#xD;&#xA;    {&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// This is the main type for your game&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;        {&#xD;&#xA;            GraphicsDeviceManager graphics;&#xD;&#xA;            SpriteBatch spriteBatch;&#xD;&#xA;            Texture2D backgroundTexture;&#xD;&#xA;            Rectangle viewportRect;&#xD;&#xA;            GameObject cannon;&#xD;&#xA;    &#xD;&#xA;            public Game1()&#xD;&#xA;            {&#xD;&#xA;                graphics = new GraphicsDeviceManager(this);&#xD;&#xA;                Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Allows the game to perform any initialization it needs to before starting to run.&#xD;&#xA;            /// This is where it can query for any required services and load any non-graphic&#xD;&#xA;            /// related content.  Calling base.Initialize will enumerate through any components&#xD;&#xA;            /// and initialize them as well.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void Initialize()&#xD;&#xA;            {&#xD;&#xA;                // TODO: Add your initialization logic here&#xD;&#xA;    &#xD;&#xA;                base.Initialize();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// LoadContent will be called once per game and is the place to load&#xD;&#xA;            /// all of your content.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void LoadContent()&#xD;&#xA;            {&#xD;&#xA;                // Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;                spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;    &#xD;&#xA;                backgroundTexture = Content.Load&lt;Texture2D&gt;(&quot;Sprites\\background&quot;);&#xD;&#xA;    &#xD;&#xA;                cannon = new GameObject(Content.Load&lt;Texture2D&gt;(&quot;Sprites\\cannon&quot;));&#xD;&#xA;                cannon.position = new Vector2(120, graphics.GraphicsDevice.Viewport.Height - 80);&#xD;&#xA;    &#xD;&#xA;                viewportRect = new Rectangle(0, 0, &#xD;&#xA;                    graphics.GraphicsDevice.Viewport.Width, &#xD;&#xA;                    graphics.GraphicsDevice.Viewport.Height);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// UnloadContent will be called once per game and is the place to unload&#xD;&#xA;            /// all content.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void UnloadContent()&#xD;&#xA;            {&#xD;&#xA;                // TODO: Unload any non ContentManager content here&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Allows the game to run logic such as updating the world,&#xD;&#xA;            /// checking for collisions, gathering input, and playing audio.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;            protected override void Update(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                // Allows the game to exit&#xD;&#xA;                if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                    this.Exit();&#xD;&#xA;    #if !xbox&#xD;&#xA;                KeyboardState keyboardState = Keyboard.GetState();&#xD;&#xA;                if (keyboardState.IsKeyDown(Keys.Right))&#xD;&#xA;                {&#xD;&#xA;                    cannon.rotation -= 0.1f;&#xD;&#xA;                }&#xD;&#xA;                if (keyboardState.IsKeyDown(Keys.Left))&#xD;&#xA;                {&#xD;&#xA;                    cannon.rotation += 0.1f;&#xD;&#xA;                }&#xD;&#xA;    #endif&#xD;&#xA;                cannon.rotation = MathHelper.Clamp(cannon.rotation, -MathHelper.PiOver2, 0);&#xD;&#xA;    &#xD;&#xA;                base.Update(gameTime);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// This is called when the game should draw itself.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;            protected override void Draw(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;                spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);&#xD;&#xA;                spriteBatch.Draw(backgroundTexture, viewportRect, Color.White);&#xD;&#xA;    &#xD;&#xA;                spriteBatch.Draw(cannon.sprite, &#xD;&#xA;                    cannon.position, &#xD;&#xA;                    null, &#xD;&#xA;                    Color.White, &#xD;&#xA;                    cannon.rotation, &#xD;&#xA;                    cannon.center, &#xD;&#xA;                    1.0f, &#xD;&#xA;                    SpriteEffects.None, &#xD;&#xA;                    0);&#xD;&#xA;    &#xD;&#xA;                spriteBatch.End();&#xD;&#xA;    &#xD;&#xA;                base.Draw(gameTime);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Game object class:&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Audio;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Media;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    namespace XNA2DTutorial&#xD;&#xA;    {&#xD;&#xA;        public class GameObject&#xD;&#xA;        {&#xD;&#xA;            #region Attributes&#xD;&#xA;            public Texture2D sprite;&#xD;&#xA;            public Vector2 position;&#xD;&#xA;            public float rotation;&#xD;&#xA;            public Vector2 center;&#xD;&#xA;            #endregion Attributes&#xD;&#xA;    &#xD;&#xA;            #region Constructors&#xD;&#xA;            public GameObject(Texture2D loadedTexture)&#xD;&#xA;            {&#xD;&#xA;                rotation = 0.0f;&#xD;&#xA;                position = Vector2.Zero;&#xD;&#xA;                sprite = loadedTexture;&#xD;&#xA;                center = new Vector2(sprite.Width / 2, sprite.Height / 2);&#xD;&#xA;            }&#xD;&#xA;            #endregion Constructors&#xD;&#xA;    &#xD;&#xA;            #region Methods&#xD;&#xA;            #endregion Methods&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29427" PostHistoryTypeId="1" PostId="13271" RevisionGUID="9a6a51bc-aee7-4607-bb52-2d0476f1d698" CreationDate="2011-06-06T22:43:52.333" UserId="7852" Text="XNA beginner - can't display cannon in 2D tutorial" />
  <row Id="29428" PostHistoryTypeId="3" PostId="13271" RevisionGUID="9a6a51bc-aee7-4607-bb52-2d0476f1d698" CreationDate="2011-06-06T22:43:52.333" UserId="7852" Text="&lt;xna&gt;&lt;2d&gt;&lt;tutorials&gt;" />
  <row Id="29429" PostHistoryTypeId="2" PostId="13272" RevisionGUID="ec0e1ec9-ece6-4f44-bac7-12032b8917c7" CreationDate="2011-06-06T23:02:07.707" UserId="6440" Text="I want to render a depth map by importing it from a file, then creating an array of vertices and indices, and then displaying it using a basic shader (just apply the view and projection matrices on it and then display). I'm aware of GPU-based solutions, however, I want to perform additional calculations using the CPU on the vertices before rendering them.&#xD;&#xA;&#xD;&#xA;So, basically what I do is that I have my vertices with there depth in a grid, and then I import my triangles as follows:&#xD;&#xA;&#xD;&#xA;    +--+--+--+--+--+--+&#xD;&#xA;    ¦ \¦ \¦ \¦ \¦ \¦ \¦&#xD;&#xA;    +--+--+--+--+--+--+   meaning that I simply split every quad spanned by four pixels&#xD;&#xA;    ¦ \¦ \¦ \¦ \¦ \¦ \¦   into two triangles.&#xD;&#xA;    +--+--+--+--+--+--+&#xD;&#xA;    ¦ \¦ \¦ \¦ \¦ \¦ \¦&#xD;&#xA;    +--+--+--+--+--+--+&#xD;&#xA;&#xD;&#xA;When I took the first best depth map that I've found on google, I've got this result:&#xD;&#xA;[![Working][1]][2]&#xD;&#xA;&#xD;&#xA;However, as soon as I'm moving the camera up, strange things happen:&#xD;&#xA;[![Buggy pic][3]][4]&#xD;&#xA;[![Buggy pic 2][5]][5]&#xD;&#xA;&#xD;&#xA;The problem seems to only arise when multiple triangles are rendered behind each other. In this case, a triangle from the back (a black one at infinity depth or a wall behind the front object) seems to shine through. Also, when I use &quot;PIX for Windows&quot;, and I use the &quot;Debug this pixel&quot; functionality, I get two triangles for each of the buggy pixels I've checked.&#xD;&#xA;&#xD;&#xA;The rendering is done as follows:&#xD;&#xA;&#xD;&#xA;`Initialize`&#xD;&#xA;&#xD;&#xA;    graphics.PreferredBackBufferWidth = 1280;&#xD;&#xA;    graphics.PreferredBackBufferHeight = 720;&#xD;&#xA;    graphics.IsFullScreen = false;&#xD;&#xA;    graphics.ApplyChanges();&#xD;&#xA;    IsMouseVisible = true;&#xD;&#xA;&#xD;&#xA;`Draw`&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Clear(ClearOptions.DepthBuffer | ClearOptions.Target, Color.Black, 0, 0);&#xD;&#xA;    DrawModel();&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    DrawControls();&#xD;&#xA;    DrawFileBrowser();&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;    base.Draw(gameTime);&#xD;&#xA;&#xD;&#xA;`DrawModel`&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.RasterizerState =&#xD;&#xA;        new RasterizerState {&#xD;&#xA;            CullMode = CullMode.None&#xD;&#xA;        };&#xD;&#xA;    // [...]&#xD;&#xA;    // set up view and projection matrix&#xD;&#xA;    // [...]&#xD;&#xA;    GraphicsDevice.DrawUserIndexedPrimitives(&#xD;&#xA;        PrimitiveType.TriangleList,&#xD;&#xA;        vertices,&#xD;&#xA;        0,&#xD;&#xA;        vertices.Length,&#xD;&#xA;        indices,&#xD;&#xA;        0,&#xD;&#xA;        indices.Length / 3);&#xD;&#xA;&#xD;&#xA;What could be the problem in my rendering method? Do I have to somehow order my triangles from back to front? (no alpha-values are used) If yes, how can I order them?&#xD;&#xA;&#xD;&#xA;Is it maybe some problem with the depth buffer? How can I fix it?&#xD;&#xA;&#xD;&#xA;Any other ideas on how to fix the problem?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/44CKc.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/44CKc.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/TEUsM.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/TEUsM.jpg&#xD;&#xA;  [5]: http://i.stack.imgur.com/sKbIB.jpg" />
  <row Id="29430" PostHistoryTypeId="1" PostId="13272" RevisionGUID="ec0e1ec9-ece6-4f44-bac7-12032b8917c7" CreationDate="2011-06-06T23:02:07.707" UserId="6440" Text="Drawing a depth map properly" />
  <row Id="29431" PostHistoryTypeId="3" PostId="13272" RevisionGUID="ec0e1ec9-ece6-4f44-bac7-12032b8917c7" CreationDate="2011-06-06T23:02:07.707" UserId="6440" Text="&lt;xna&gt;&lt;c#&gt;&lt;rendering&gt;&lt;heightmap&gt;&lt;depth-buffer&gt;" />
  <row Id="29432" PostHistoryTypeId="2" PostId="13273" RevisionGUID="cb8bef33-d712-4350-8de6-74001f89c277" CreationDate="2011-06-06T23:19:13.737" UserId="2111" Text="The problem comes from your `spriteBatch.Begin` call. You're passing `SpriteSortMode.BackToFront` and since both of your `layerDepths` are equal to 0, I'd guess that the order would get mixed up, therefore drawing the background on top of the cannon. &#xD;&#xA;&#xD;&#xA;Try passing `SpriteSortMode.Immediate` instead. Works for me at least." />
  <row Id="29433" PostHistoryTypeId="5" PostId="13273" RevisionGUID="752e456c-011e-4552-8be1-426a16463851" CreationDate="2011-06-06T23:25:15.870" UserId="2111" Comment="added 176 characters in body; deleted 1 characters in body" Text="The problem comes from your `spriteBatch.Begin` call. &#xD;&#xA;&#xD;&#xA;You're passing `SpriteSortMode.BackToFront` and since both of your `layerDepths` are equal to 0, I'd guess that the order would get mixed up when the sprites get drawn on the `spriteBatch.End` call, therefore drawing the background on top of the cannon. &#xD;&#xA;&#xD;&#xA;Try passing `SpriteSortMode.Immediate` instead. This will draw the sprites immediately when you call `spriteBatch.Draw` and should draw them in the proper order. Works for me at least." />
  <row Id="29434" PostHistoryTypeId="2" PostId="13274" RevisionGUID="0a3b1a6c-fd4a-475b-a0ba-60dc39f24b24" CreationDate="2011-06-06T23:44:10.947" UserId="7377" Text="I was considering building a character creator/customizer program that would enable a player to create their own 3d model based off of a series of preset body parts. i.e. A player could choose to add the legs of a horse, the body of a man, wings of a falcon and the head of a snake. From there the player can then customize each body part by tweaking sliders responsible for length, thickness, color, position, etc. &#xD;&#xA;&#xD;&#xA;Ultimately this will give players the ability to customize their characters with infinite degrees of freedom (not like preset customizations we see in some MMORPGs i.e. 8 hair cuts, 10 faces, 8 body types, etc.). So as you can imagine this would most likely lead to ever player having a different character. &#xD;&#xA;&#xD;&#xA;**Would having thousands upon thousands of separate 3d character models some how slow the game down?** &#xD;&#xA;&#xD;&#xA;*I consider that it would not because the most characters that would be rendered in the game I am working on would be 25 to 50 if that.* " />
  <row Id="29435" PostHistoryTypeId="1" PostId="13274" RevisionGUID="0a3b1a6c-fd4a-475b-a0ba-60dc39f24b24" CreationDate="2011-06-06T23:44:10.947" UserId="7377" Text="Should there be a limit to how many in game models there is for a 3d MMORPG?" />
  <row Id="29436" PostHistoryTypeId="3" PostId="13274" RevisionGUID="0a3b1a6c-fd4a-475b-a0ba-60dc39f24b24" CreationDate="2011-06-06T23:44:10.947" UserId="7377" Text="&lt;3d&gt;&lt;rendering&gt;&lt;mmo&gt;&lt;character&gt;" />
  <row Id="29437" PostHistoryTypeId="25" PostId="13268" RevisionGUID="51991d18-8a8a-4d6d-9b75-f7fe2a1423ad" CreationDate="2011-06-07T00:13:41.760" Comment="http://twitter.com/#!/StackGameDev/status/77890938810269696" />
  <row Id="29438" PostHistoryTypeId="2" PostId="13275" RevisionGUID="db2d93a1-2364-4582-93d2-56d3548c610d" CreationDate="2011-06-07T00:14:35.877" UserId="1101" Text="You don't need to generate unique models in each case. Instead you can render a character as several models, one for each of the interchangeable parts you mention, with the tweakable aspects being applied to animation bones, or to shaders, etc.&#xD;&#xA;&#xD;&#xA;However, to answer your question more generally, it is almost always quicker to render the same model twice than to render 2 separate models. Obviously this is mitigated if you are only rendering a subset of those in a given time frame because the other ones effectively do not exist at that stage. But rendering 25 different models will almost always be slower than rendering 3 or 4 each duplicated 6 or 7 times over.&#xD;&#xA;&#xD;&#xA;But speed is relative - when does 'slower' become 'too slow'? If your characters are quite simple (ie. low number of polygons and small textures), then 50 on-screen at once is not a big deal. On the other hand, if they are complex, then even just 25 at once may be too much on some cards. It would be a shame to cancel a good feature because of performance concerns, so you need to know which end of the scale you would be at.&#xD;&#xA;&#xD;&#xA;Luckily this is something you can test quite easily, by generating sample geometry of the sort of complexity you expect to use (which can be any simple object tessellated appropriately), and performing some test rendering to observe the real-world performance.&#xD;&#xA;&#xD;&#xA;Interestingly, although you mention rendering as a bottleneck, potentially a worse problem is the networking aspect. Most MMOs store the majority of renderable assets on the client side and deploy them as part of the original install or the patching procedure. In your case, this would be impractical due to the number of permutations, so you'd have to stream them down during play. But this in turn means you can't easily render a character until all this data is on the client, which may be a problem when entering a busy area quickly (eg. teleporting or spawning in town). Again, this problem is reduced a bit if you just send a list of pre-existing model-parts that a character uses character instead of having to send a full model for each one." />
  <row Id="29439" PostHistoryTypeId="2" PostId="13276" RevisionGUID="9a2f4fa7-4d74-476a-b13c-5ceef361424e" CreationDate="2011-06-07T00:15:20.697" UserId="7328" Text="I guess not remember oblivion or sims3, they both featured more models that you can even imagine." />
  <row Id="29440" PostHistoryTypeId="5" PostId="13251" RevisionGUID="22a10368-19c9-45c0-8c1d-ecf61c962524" CreationDate="2011-06-07T00:37:55.423" UserId="370" Comment="added 58 characters in body" Text="Although I don't have a solution to the problem I was encountering, I did find a workaround and I am posting it if anyone else ever sees something similar.&#xD;&#xA;&#xD;&#xA;For reference, the rendering code I was basing the above snippets on (esp the shaders) came from PowerVR's OpenGLES2.0 SDK (I think the Alpha Blending demo). I mostly understand the coordinate system it is using to render sprites, but I think it's pretty funky. At least, I sure don't think that way when I consider graphics!&#xD;&#xA;&#xD;&#xA;SO, I switched it over from that system to a much more &quot;3D&quot;-oriented shader. Here's the new vertex shader:&#xD;&#xA;&#xD;&#xA;    attribute highp vec4    inSpriteVertex;&#xD;&#xA;    attribute highp vec2    inSpriteTexCoord;&#xD;&#xA;    &#xD;&#xA;    uniform highp mat4      OrthoProjectionMatrix;&#xD;&#xA;    uniform highp mat4      ModelviewSpriteMatrix;&#xD;&#xA;    &#xD;&#xA;    varying mediump vec2    TexCoord;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;        gl_Position = OrthoProjectionMatrix * ModelviewSpriteMatrix * inSpriteVertex;&#xD;&#xA;        //gl_Position = vec4(ScaleMatrix * in2DVertex + LowerLeft, 0, 1);&#xD;&#xA;        TexCoord = inSpriteTexCoord; // formerly in2DVertex&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Notice I'm still using a 2D texture coordinate but have now upgraded to a 4D position vector for the given vertex and a including two matrices for transformation: an orthographic view matrix and a model view matrix that contains the scale/rotation/translation transforms that have been applied to this sprite.&#xD;&#xA;&#xD;&#xA;Again, I wish I knew what I was doing wrong in the original snippets, but this approach seems much more sensible. Probably not as fast at render time, but I think it is reasonable. Hope this helps someone!" />
  <row Id="29441" PostHistoryTypeId="25" PostId="13270" RevisionGUID="5a9465e1-e102-4d5d-ac23-6667908c1ce0" CreationDate="2011-06-07T03:13:42.570" Comment="http://twitter.com/#!/StackGameDev/status/77936239340298240" />
  <row Id="29442" PostHistoryTypeId="2" PostId="13277" RevisionGUID="c86b22d6-a503-4900-9f81-fbd1bd10d095" CreationDate="2011-06-07T03:20:55.177" UserId="7853" Text="How can I have the player jump higher if the jump key is held down longer? I am currently just reducing gravity as long as the key is held and the player is jumping, but this looks odd." />
  <row Id="29443" PostHistoryTypeId="1" PostId="13277" RevisionGUID="c86b22d6-a503-4900-9f81-fbd1bd10d095" CreationDate="2011-06-07T03:20:55.177" UserId="7853" Text="Variable height jumping in side scrollers." />
  <row Id="29444" PostHistoryTypeId="3" PostId="13277" RevisionGUID="c86b22d6-a503-4900-9f81-fbd1bd10d095" CreationDate="2011-06-07T03:20:55.177" UserId="7853" Text="&lt;side-scroller&gt;" />
  <row Id="29445" PostHistoryTypeId="2" PostId="13278" RevisionGUID="264a38c2-21c5-4d49-b21e-040c3fea1500" CreationDate="2011-06-07T04:18:42.017" UserId="7855" Text="Hi all i am very new to here..give excuse if any mistake while asking my question..just now i found  [mobiforms][1] link.i am planning to do game for Iphone after looking above link i am trying to implement in all the mobile applications using with  the mobiforms.here my problem is i know only objective-c and i designed only one app which is also game placed in the app store can i learn any new things for mobiforms or shall i use any scripting many questions i am facing..can any one give much more idea about the mobiforms.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobiforms.com/" />
  <row Id="29446" PostHistoryTypeId="1" PostId="13278" RevisionGUID="264a38c2-21c5-4d49-b21e-040c3fea1500" CreationDate="2011-06-07T04:18:42.017" UserId="7855" Text="can i use MobiForms for my game development" />
  <row Id="29447" PostHistoryTypeId="3" PostId="13278" RevisionGUID="264a38c2-21c5-4d49-b21e-040c3fea1500" CreationDate="2011-06-07T04:18:42.017" UserId="7855" Text="&lt;game-design&gt;&lt;iphone&gt;" />
  <row Id="29448" PostHistoryTypeId="2" PostId="13279" RevisionGUID="15fdd972-4e77-4e10-a48e-0c724babe989" CreationDate="2011-06-07T04:32:51.440" UserId="5021" Text="First you need to decide what you want the jump to look like.&#xD;&#xA;&#xD;&#xA;In real life, the jump height is decided at the moment that you leave the ground. You can't keep jumping higher while you're already in mid-air.&#xD;&#xA;&#xD;&#xA;So if you can control your jump height while you're already in the air, you're going to get some sort of &quot;jet-pack&quot;-like effect.&#xD;&#xA;&#xD;&#xA;I seem to remember a sidescroller that had two different jump heights, I think it was one of the super mario games. The higher jump occured when you held the jump button, and the jump was then actually a two part jump, starting with the initial regular jump, followed by a second impulse that took you higher.&#xD;&#xA;&#xD;&#xA;So, what do you want your jump to look like? What sort of control do you want the player to have over the jump?" />
  <row Id="29449" PostHistoryTypeId="5" PostId="13279" RevisionGUID="fa0b3b49-f150-4478-93e5-036a16657a03" CreationDate="2011-06-07T04:44:55.107" UserId="5021" Comment="added 389 characters in body; added 24 characters in body" Text="First you need to decide what you want the jump to look like.&#xD;&#xA;&#xD;&#xA;In real life, the jump height is decided at the moment that you leave the ground. You can't keep jumping higher while you're already in mid-air.&#xD;&#xA;&#xD;&#xA;So if you can control your jump height while you're already in the air, you're going to get some sort of &quot;jet-pack&quot;-like effect.&#xD;&#xA;&#xD;&#xA;I seem to remember a sidescroller that had two different jump heights, I think it was one of the super mario games. The higher jump occured when you held the jump button, and the jump was then actually a two part jump, starting with the initial regular jump, followed by a second impulse that took you higher.&#xD;&#xA;&#xD;&#xA;So, what do you want your jump to look like? What sort of control do you want the player to have over the jump?&#xD;&#xA;&#xD;&#xA;What I would start with is this:&#xD;&#xA;&#xD;&#xA;Leave gravity alone (i.e. never change it). When a player presses the jump button, apply the jump force as long as the player is pressing the jump button (up to some time limit). Then when the player releases the jump button, he cannot apply any jump force again (i.e. he can't initiate a jump again) until he touches the ground first, at which point jumps are re-enabled. " />
  <row Id="29450" PostHistoryTypeId="2" PostId="13280" RevisionGUID="20313d4a-c585-4385-b626-1ed49c56d017" CreationDate="2011-06-07T05:09:56.853" UserId="7856" Text="I've developed some 3d experiences using unity3d and they are pretty much experimental at this level. Now the problem is that I need to make video captures in HD to showcase them. &#xD;&#xA;I've tried Camtasia 7 with divx compression, and still the quality is not Up to standard and number of dropframes are quite high. I'm running on a Core i7 cpu with geforce GT240. So I was thinking If it's possible to capturing the video remotely so one pc is in charge of capturing and one running the application. &#xD;&#xA;Or is there any better way to get the highest quality with least dropframes?&#xD;&#xA;Number of draw calls are around 2k(I know sounds crazy, but I can't make changes right now.)&#xD;&#xA;&#xD;&#xA;Grazies." />
  <row Id="29451" PostHistoryTypeId="1" PostId="13280" RevisionGUID="20313d4a-c585-4385-b626-1ed49c56d017" CreationDate="2011-06-07T05:09:56.853" UserId="7856" Text="HD video capture gameplay?" />
  <row Id="29452" PostHistoryTypeId="3" PostId="13280" RevisionGUID="20313d4a-c585-4385-b626-1ed49c56d017" CreationDate="2011-06-07T05:09:56.853" UserId="7856" Text="&lt;video&gt;&lt;gameplay&gt;" />
  <row Id="29453" PostHistoryTypeId="25" PostId="13277" RevisionGUID="48181e77-d117-4f2e-9f59-95b34d791144" CreationDate="2011-06-07T06:13:41.633" Comment="http://twitter.com/#!/StackGameDev/status/77981534421913600" />
  <row Id="29454" PostHistoryTypeId="2" PostId="13281" RevisionGUID="a40de58d-b1f7-4d44-9122-8a3061494b6a" CreationDate="2011-06-07T06:14:39.033" UserId="7640" Text="Hey so i've been looking into real time physics engines, which led me to the crazy[Laggoa multiphysics engine][1] by thiaga costa, and brought up the question of:&#xD;&#xA;&#xD;&#xA;**What are some possible ways, ideas that have or have not already been done to make a real time physics engine? How about non-real time?**&#xD;&#xA;&#xD;&#xA;I know the Lagoa engine uses meshes and a crapload of particles... and then there's the rigid body way of going about things.....&#xD;&#xA;Also i'm only at 2d level in creating games right now so any 2d physics ideas would be great too!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=MuWuTc5agVA&amp;wl_token=wuiDGtBIHzqOYVe23uzps-YQzzl8MTMwNzUxMjU1NUAxMzA3NDI2MTU1&amp;wl_id=MuWuTc5agVA" />
  <row Id="29455" PostHistoryTypeId="1" PostId="13281" RevisionGUID="a40de58d-b1f7-4d44-9122-8a3061494b6a" CreationDate="2011-06-07T06:14:39.033" UserId="7640" Text="ways to make a physics engine" />
  <row Id="29456" PostHistoryTypeId="3" PostId="13281" RevisionGUID="a40de58d-b1f7-4d44-9122-8a3061494b6a" CreationDate="2011-06-07T06:14:39.033" UserId="7640" Text="&lt;physics&gt;&lt;2d-physics&gt;&lt;3d-meshes&gt;&lt;particles&gt;" />
  <row Id="29457" PostHistoryTypeId="2" PostId="13282" RevisionGUID="889991b0-eabf-40fa-a8c9-c7f4b42b974e" CreationDate="2011-06-07T07:39:59.440" UserId="2792" Text="[Box2D][1] was written as a tutorial on how to write 2D physics engines. The site contains links to a lot of presentations on how the algorithms work and how to make it efficient.&#xD;&#xA;&#xD;&#xA;You might also want to look into this [presentation][2] done by the Pixeljunk Shooter team, describing how they did 2D fluids.&#xD;&#xA;&#xD;&#xA;If you are interesed in 3D, read [Realtime Collision Detection][3].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/ &quot;Box2D&quot;&#xD;&#xA;  [2]: http://www.gdcvault.com/play/1012447/Go-With-the-Flow-Fluid &quot;Go With The Flow&quot;&#xD;&#xA;  [3]: http://realtimecollisiondetection.net/ &quot;Realtime collision detection&quot;" />
  <row Id="29458" PostHistoryTypeId="2" PostId="13283" RevisionGUID="b18298a0-b0ee-4842-b24f-581fd03f25d1" CreationDate="2011-06-07T07:41:33.213" UserId="6867" Text="How can I make a black shadow/glow **around** my drawn rectangle made of primitives? Drop-shadowing is easy, but it's not exactly what I am looking for." />
  <row Id="29459" PostHistoryTypeId="1" PostId="13283" RevisionGUID="b18298a0-b0ee-4842-b24f-581fd03f25d1" CreationDate="2011-06-07T07:41:33.213" UserId="6867" Text="XNA black glow (shadow-ish)" />
  <row Id="29460" PostHistoryTypeId="3" PostId="13283" RevisionGUID="b18298a0-b0ee-4842-b24f-581fd03f25d1" CreationDate="2011-06-07T07:41:33.213" UserId="6867" Text="&lt;xna&gt;" />
  <row Id="29461" PostHistoryTypeId="2" PostId="13284" RevisionGUID="7cf25af0-3669-43ec-b5f0-16f8c7659548" CreationDate="2011-06-07T07:51:52.310" UserId="288" Text="Render your primitives to a render target, and then use a pixel shader to blur and blacken the render target when you draw it back onto the screen. Then simply draw your render target without a pixel shader (or render your original primitives) to the backbuffer.&#xD;&#xA;&#xD;&#xA;The &lt;a href=&quot;http://create.msdn.com/education/catalog/sample/bloom&quot;&gt;Bloom Postprocess sample&lt;/a&gt; on App Hub should provide a sufficient example of how to render to a render target and then post-process it with a blur, to implement your effect." />
  <row Id="29462" PostHistoryTypeId="5" PostId="13276" RevisionGUID="1c19d027-713a-443b-aacd-951b4d27c791" CreationDate="2011-06-07T08:04:34.853" UserId="7328" Comment="added 1 characters in body" Text="I guess not, remember oblivion or sims3, they both featured more models that you can even imagine." />
  <row Id="29463" PostHistoryTypeId="5" PostId="12828" RevisionGUID="f522750a-09ab-4c3e-bda4-496e83a40d58" CreationDate="2011-06-07T08:09:38.083" UserId="3689" Comment="added 77 characters in body" Text="I am looking for a simple casual game (open source) done in openGL. I need it to implement communication component i build this is not for learning opengl  and to implement some other stuff into it. Where can I find one?&#xD;&#xA;(I am using C++)&#xD;&#xA;Thanks" />
  <row Id="29464" PostHistoryTypeId="2" PostId="13285" RevisionGUID="4d26c529-e719-47f5-a19d-685ea5435365" CreationDate="2011-06-07T08:12:21.577" UserId="7328" Text="I don't know if there are any good capturing program or not but there are two ways to minimize framedrop: &#xD;&#xA;&#xD;&#xA;one is to attach your pc vga output to another device (like dvdplayer or satelite receiver or any other device that can capture video) and use that as a capturing device.&#xD;&#xA;&#xD;&#xA;second one is something that i won't go with it myself and it's to get a copy of video buffer in your code back to cpu and then save it. it also slows your program but much less compared to capturing applications." />
  <row Id="29465" PostHistoryTypeId="5" PostId="13282" RevisionGUID="f26fada3-fb0b-445a-9df2-35ab0548c6fa" CreationDate="2011-06-07T08:13:05.800" UserId="2792" Comment="Added part about offline solvers" Text="[Box2D][1] was written as a tutorial on how to write 2D physics engines. The site contains links to a lot of presentations on how the algorithms work and how to make it efficient.&#xD;&#xA;&#xD;&#xA;You might also want to look into this [presentation][2] done by the Pixeljunk Shooter team, describing how they did 2D fluids.&#xD;&#xA;&#xD;&#xA;If you are interesed in 3D, read [Realtime Collision Detection][3].&#xD;&#xA;&#xD;&#xA;For more cutting edge offline physics [this][4] might be a good presentation. It describes how a new solver was developed for Maya, and I remember our physics programmer going nuts over it some years ago.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/ &quot;Box2D&quot;&#xD;&#xA;  [2]: http://www.gdcvault.com/play/1012447/Go-With-the-Flow-Fluid &quot;Go With The Flow&quot;&#xD;&#xA;  [3]: http://realtimecollisiondetection.net/ &quot;Realtime collision detection&quot;&#xD;&#xA;  [4]: http://www.autodeskresearch.com/pdf/nucleus.pdf &quot;Towards a Unified Dynamics Solver&quot;" />
  <row Id="29466" PostHistoryTypeId="2" PostId="13286" RevisionGUID="2ebeeb13-083e-4c60-9b67-07e1fb96c6be" CreationDate="2011-06-07T08:15:29.040" UserId="7588" Text="So I checked out ImageMagick, it wasn't really for me, so I ended up using TheGimp's Script-Fu to first off write a batch procedure to convert all files in a folder to the nearest (bigger) power of two, and optionally scale the image down afterwards if it is too big. This is a simplified version (I can give anyone the batch if needed).&#xD;&#xA;&#xD;&#xA;    (define&#xD;&#xA;        (script-fu-resize-upper-pot	image drawable)&#xD;&#xA;        (let* &#xD;&#xA;            (&#xD;&#xA;                ;; Store upper power of two for height and width of image&#xD;&#xA;                (height (pow 2 (ceiling (/ (log (car (gimp-image-height image))) (log 2)))))	&#xD;&#xA;                (width (pow 2 (ceiling (/ (log (car (gimp-image-width image))) (log 2)))))&#xD;&#xA;            )&#xD;&#xA;		&#xD;&#xA;            ;; Resize the Image&#xD;&#xA;            (gimp-image-resize image width height 0 0)&#xD;&#xA;        )&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;Of course the big problem with this is that the Script-Fu command `file-glob` only allows you to cycle through one folder, and you have to use a very ugly batch call for it to work :&#xD;&#xA;&#xD;&#xA;    &quot;c:\Program Files\GIMP-2.0\bin\gimp-2.6.exe&quot; -i -b &quot;(script-fu-resize-upper-pot-batch \&quot;C:\\ImageData\\*.png\&quot; 0) (gimp-quit 0)&quot;&#xD;&#xA;&#xD;&#xA;So the next problem was to iterate through the folders to call the gimp script on all of them, after a bit of testing, I found this PowerShell script :&#xD;&#xA;&#xD;&#xA;    Clear-Host&#xD;&#xA;    $Directory = &quot;C:\PuddleSqData\&quot;&#xD;&#xA;    $Dirs = Get-ChildItem -path $Directory -recurse -include * | where {$_.PsIsContainer}&#xD;&#xA;&#xD;&#xA;    $Gimp = &quot;gimp-console-2.6.exe&quot;&#xD;&#xA;&#xD;&#xA;    foreach($Dir in $Dirs)&#xD;&#xA;    {&#xD;&#xA;        $SourcePath = $Dir.FullName&#xD;&#xA;        $GimpifiedSourcePath = $SourcePath -replace(&quot;\\&quot;, &quot;\\&quot;)&#xD;&#xA;        &#xD;&#xA;        $GimpParams = @(&quot;-i&quot;, &quot;-b&quot;, &quot;`&quot;(script-fu-resize-upper-pot-batch \`&quot;$GimpifiedSourcePath\\*.png\`&quot; 0)`&quot;&quot;, &quot;-b&quot;, &quot;`&quot;(gimp-quit 0)`&quot;&quot;)&#xD;&#xA;    &#xD;&#xA;        Write &quot;Calling $GIMP $GimpParams&quot;&#xD;&#xA;        $p = [diagnostics.process]::Start($Gimp, $GimpParams)&#xD;&#xA;        $p.WaitForExit()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And everything is now working!&#xD;&#xA;I guess that maybe ImageMagick would have been a better solution, it's just a shame that TheGimp proposes a batching process that really isn't powerful enough.&#xD;&#xA;&#xD;&#xA;Hope this helps someone!" />
  <row Id="29467" PostHistoryTypeId="2" PostId="13287" RevisionGUID="18a607c9-48ee-4e0d-907a-a247f7287b4b" CreationDate="2011-06-07T08:21:25.413" UserId="7588" Text="Everyone that I know (me included) uses [FRAPS](http://www.google.fr/search?q=fraps&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:fr:official&amp;client=firefox-a).&#xD;&#xA;It's generally very good but unfortunately not very free...&#xD;&#xA;We used FRAPS for our end of year project (shameless plug), no mocking!&#xD;&#xA;&#xD;&#xA;[Heart of Paper](http://www.youtube.com/watch?v=S96ICu-o7-Y)" />
  <row Id="29468" PostHistoryTypeId="2" PostId="13288" RevisionGUID="0f73ac74-6b4c-46cd-a9db-f9977c3a9afc" CreationDate="2011-06-07T08:54:12.413" UserId="2764" Text="What design pattern is best for implementing trophies in a game? I am not a games developer, but is it easy for each player's action to check and update conditions that satisfy 50-100 trophies at any time aside from everything that goes on in the game engine? How is it best done?" />
  <row Id="29469" PostHistoryTypeId="1" PostId="13288" RevisionGUID="0f73ac74-6b4c-46cd-a9db-f9977c3a9afc" CreationDate="2011-06-07T08:54:12.413" UserId="2764" Text="Trophies design pattern" />
  <row Id="29470" PostHistoryTypeId="3" PostId="13288" RevisionGUID="0f73ac74-6b4c-46cd-a9db-f9977c3a9afc" CreationDate="2011-06-07T08:54:12.413" UserId="2764" Text="&lt;game-design&gt;&lt;design-patterns&gt;" />
  <row Id="29471" PostHistoryTypeId="25" PostId="13281" RevisionGUID="8d3757c1-295a-4bb6-87cd-09c33aa9ae06" CreationDate="2011-06-07T09:13:41.527" Comment="http://twitter.com/#!/StackGameDev/status/78026833672667136" />
  <row Id="29472" PostHistoryTypeId="2" PostId="13289" RevisionGUID="d6aeb1d7-7b8b-4976-8ff9-95747d7b3e3b" CreationDate="2011-06-07T09:17:10.900" UserId="7588" Text="I think the best way to design something like this is first to inspire yourself from the best, [Assassins Creed 2](http://www.ps3trophies.org/game/assassins-creed-ii/trophies/) is a good example.&#xD;&#xA;&#xD;&#xA;You find a trophy for each chapter and one for completing the game on each difficulty. These are generally 'Complete Chapter x' or 'Defeat Boss xyz'.&#xD;&#xA;I would prefer having really exmplcit names eg 'Complete Chapter x', as you don't want the player to check his trophies every time he finishes a chapter because he thinks he got someting cool.&#xD;&#xA;&#xD;&#xA;You also should have trophies that will push the player to play how YOU want him to.&#xD;&#xA;&#xD;&#xA;For exploration you will have a collectible trophy, for fighting you will have a 'Kill x Guards' etc. These can help to force the player to explore more, and even learn to play better.&#xD;&#xA;&#xD;&#xA;The biggest difficulty in my sense is Hidden Trophies. The name needs to imply what needs to be done but without spoiling any of the game. You don't want for example 'Kill the Traitor' when you only have one Ally in the game. These should also be some of the hardest trophies where people could rarely get them without specifically trying for it.&#xD;&#xA;&#xD;&#xA;There can often be half of the total trophies that are secrets.&#xD;&#xA;&#xD;&#xA;Of course, 'Lolphies' are also good and will inspire or reward a certain type of play.&#xD;&#xA;&#xD;&#xA;Trophies are very game-dependant though and require a lot of thought!" />
  <row Id="29473" PostHistoryTypeId="2" PostId="13290" RevisionGUID="a37d51de-550c-48f0-8b67-5af2a683bc04" CreationDate="2011-06-07T09:22:04.253" UserId="4828" Text="You can render your primitive, and make shader that can make these rounded corners." />
  <row Id="29474" PostHistoryTypeId="2" PostId="13291" RevisionGUID="cb41653d-c42d-419e-8284-1c287a34defa" CreationDate="2011-06-07T09:28:35.440" UserId="4828" Text="Make two textures - foreground and background.&lt;br&gt;&#xD;&#xA;First draw your shapes in black color on first texture, and then blur this texture.&lt;br&gt;&#xD;&#xA;Next draw your shapes in normal color on second texture.&lt;br&gt;&#xD;&#xA;Draw first, then second.&lt;br&gt;&#xD;&#xA;Keywords: postprocessing, RenderTarget2D, gaussian blur&lt;br&gt;" />
  <row Id="29475" PostHistoryTypeId="2" PostId="13292" RevisionGUID="aa276a6b-5bfc-4932-ab4d-55e16feec420" CreationDate="2011-06-07T09:29:11.227" UserId="364" Text="I'm often tempted to break the game I'm working on to try a parallel-tasks based architecture, but that don't seem a big requirement for my project so I avoid this for the moment. I'm planning to just try it in a toy project first, to &quot;play with the concept&quot;.&#xD;&#xA;&#xD;&#xA;Now, what I'm asking is, as lot of (non AAA) games does not require really really high performance, it feels like using a task-based engine isn't worth bothering until... which cases?&#xD;&#xA;&#xD;&#xA;At the moment, I'm only guessing that it's necessary when you really need to exploit maximum performance of the (multi-core) hardware. Is there other cases where it's a good idea to use task-based engine? Or maybe, for new projects, it's always good to start with a task-based engine?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29476" PostHistoryTypeId="1" PostId="13292" RevisionGUID="aa276a6b-5bfc-4932-ab4d-55e16feec420" CreationDate="2011-06-07T09:29:11.227" UserId="364" Text="When does parallel-tasks engine becomes a good solution?" />
  <row Id="29477" PostHistoryTypeId="3" PostId="13292" RevisionGUID="aa276a6b-5bfc-4932-ab4d-55e16feec420" CreationDate="2011-06-07T09:29:11.227" UserId="364" Text="&lt;engine&gt;&lt;programming&gt;&lt;multithreading&gt;" />
  <row Id="29478" PostHistoryTypeId="2" PostId="13293" RevisionGUID="c0dedcc7-b34f-4e8a-b937-e558e34204a7" CreationDate="2011-06-07T09:40:23.177" UserId="7328" Text="there are two uses in multithreading, one is to enhance your program performace and the other is to let the program run when there is a large process in progress. for example when you are trying to load some data it's bothering if your program hangs up, so you may use another thread for loading and keep the main Thread free to continue main loop. enhancing performance using threads is on the other hand somthing really hard. since usually you do every thing in a linear process and that is something in contrast with parallel processing. and you always have to use your main thread for graphical device updates that makes it even harder to split tasks between threads." />
  <row Id="29479" PostHistoryTypeId="2" PostId="13294" RevisionGUID="4263dda9-c66e-4317-af21-49f8ef361fdf" CreationDate="2011-06-07T09:46:13.700" UserId="7697" Text="If your game is going to be remotely hardware intensive then you need threads to cope with all modern hardware; future CPUs coming out in the next year or two are starting to make 4 cores the minimum and up to 16 cores common for enthusiast/performance markets.  If you're doing any multi-threading at all, definitely do a task-oriented architecture as any other threading model is inherently broken for forward-looking game engines.&#xD;&#xA;&#xD;&#xA;Now keep in mind that by &quot;tasks&quot; I mean &quot;jobs&quot; and not &quot;separate threads for different engine subsystems.&quot;  You absolutely completely do not want to do something like having one graphics thread, one physics thread, one AI thread, etc.  That doesn't scale beyond a tiny handful of cores and it doesn't actually gain you any real parallelism anyway.  Physics shouldn't run more than one update per AI update (you want your AI to be able to react to physics events), and graphics has almost nothing new to render if physics hasn't run, so each subsystem naturally runs in a sequenced order.  You don't even get any benefits out of having physics update the next iteration of the simulation while graphics is running the current iteration because there is so much data shared between the two that you either need lots of duplicated data structures (and the costs of copying from one to the other) or you end up with bad lock contention in shared data structure synchronization code.&#xD;&#xA;&#xD;&#xA;What you want is to do is this.  Create a thread spool.  Run your game loop with the classic sequence of subsystem updates.  However, for each subsystem, separate the workload into distinct separable batches, and distribute those to the thread pool.  Wait for all jobs to complete before running the next state of the game update loop.  Some subsystems may have multiple substages; e.g., graphics may issue a series of jobs to do culling and then a second series of jobs to do render queue creation.  This approach avoids the synchronization problem of the first approach, scales to much larger numbers of cores, and frankly is just easier to code, debug, and maintain." />
  <row Id="29480" PostHistoryTypeId="5" PostId="13290" RevisionGUID="f223322b-d3b2-477e-bfab-d5d774b58506" CreationDate="2011-06-07T09:54:35.407" UserId="4828" Comment="added 417 characters in body" Text="You can render your primitive, and make shader that can make these rounded corners.&lt;br&gt;&#xD;&#xA;This is simple pixel shader in pseudocode that draw rounded suqre:&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    xDist = abs(x-0.5)&#xD;&#xA;    yDist = abs(y-0.5)&#xD;&#xA;    xD = xDist*xDist*4&#xD;&#xA;    yD = yDist*yDist*4&#xD;&#xA;    alpha = floor((1-xD)*(1-yD)*5)&#xD;&#xA;&#xD;&#xA;Result of this pixel shader:&lt;br&gt;&lt;br&gt;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you you shader, you can make really fancy UI, for example it can animating.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/K2VnS.png" />
  <row Id="29481" PostHistoryTypeId="4" PostId="13288" RevisionGUID="835232a3-f058-48a1-abfd-22e4e07e0704" CreationDate="2011-06-07T09:55:06.317" UserId="2764" Comment="edited title; edited tags" Text="Trophies programming design pattern" />
  <row Id="29482" PostHistoryTypeId="6" PostId="13288" RevisionGUID="835232a3-f058-48a1-abfd-22e4e07e0704" CreationDate="2011-06-07T09:55:06.317" UserId="2764" Comment="edited title; edited tags" Text="&lt;game-design&gt;&lt;programming&gt;&lt;design-patterns&gt;" />
  <row Id="29483" PostHistoryTypeId="5" PostId="2918" RevisionGUID="0f7a4c43-ef16-45c9-97ba-e536a8447e71" CreationDate="2011-06-07T10:05:47.590" UserId="1742" Comment="increased info" Text="The route algorithm I used on my TD was backwards from normal A* pathing due to the number of entities I had in the game. Instead of routing from the goal to the bad guys, I routed from the goal to every empty square on the board.&#xD;&#xA;&#xD;&#xA;This doesn't take very long, you just keep iterating the board until you've found your &quot;costs&quot;, and it provides good feedback for blocked routes (if you're doing those). Using Floyd's algorithm is fast and cache friendly compared to A* as it's not doing data dependent lookups, it's just loading in and operating on data in streams.&#xD;&#xA;&#xD;&#xA;Start with your board set to infinite cost, then set the goal square to cost zero, then iterate over the board checking to see if a neighbouring cell costs less than the current cost plus the travel cost. The travel cost is where you put your heuristic (in my case, the cost of travelling diagonally was infinite, but the cost of travelling through a tower was high, so they were allowed to eat through towers, but didn't unless they had no choice)&#xD;&#xA;&#xD;&#xA;Once you've got your costs grid, you can quickly build a &quot;flow&quot; grid from that by testing the steepest gradient of cost on the cells. This works really well for massive amounts of bad guys because none of them ever have to path find, they just follow the virtual signposts.&#xD;&#xA;&#xD;&#xA;Another benefit is that this way you only have to run this task every time you adjust the obstructions (or in my game, when a creep eats through one of your towers). Not every time a creep/mob enters the field (which with thousands of mobs and tens per second would have been quite a headache)." />
  <row Id="29484" PostHistoryTypeId="6" PostId="13288" RevisionGUID="7b875f8c-a56c-4e68-b4e6-e5f3657efc4a" CreationDate="2011-06-07T10:07:05.667" UserId="2764" Comment="edited tags; edited tags" Text="&lt;programming&gt;&lt;design-patterns&gt;&lt;efficiency&gt;" />
  <row Id="29485" PostHistoryTypeId="6" PostId="13288" RevisionGUID="e783c862-224c-4a77-8580-72ae861484c7" CreationDate="2011-06-07T10:17:36.217" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;design-patterns&gt;" />
  <row Id="29486" PostHistoryTypeId="5" PostId="13186" RevisionGUID="8a3ff3ed-3695-405a-a57e-3c0542bd2c93" CreationDate="2011-06-07T11:08:33.323" UserId="1839" Comment="added 5 characters in body" Text="As long as you only apply **constant acceleration** (i.e. from constant gravity) **Eulers Method is accurate** and the ball must bounce forever, reaching its initial position again after each bounce phase. If not, then there is something wrong with the implementation of Euler's Method. Here is how it should look like:&#xD;&#xA;&#xD;&#xA;    void update(float dt)&#xD;&#xA;    {&#xD;&#xA;        position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;        velocity += acceleration * dt;&#xD;&#xA;        // handling only the simple ground collision case here&#xD;&#xA;        if(position.x &lt; radius)&#xD;&#xA;        {&#xD;&#xA;            velocity = -velocity;&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note the acceleration is constant here, its simply the gravity.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;It seems both, the [article on gaffergames][1] and the code in the question use a simpler form of Euler's Method, namely:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;whereas this one as also shown in this [paper][2]:&#xD;&#xA;&#xD;&#xA;         position += velocity * dt + acceleration * 0.5 * dt * dt;&#xD;&#xA;         velocity += acceleration * dt;&#xD;&#xA;&#xD;&#xA;is still capable of correctly integratiing constant accelerations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: This answer is not supposed to mean that the Euler Method is a good choice for complex physics and non-constant accelerations, nor that you should stick to it once you want to add more physics dynamics to your scene. However, if the application will only use constant acceleration, then this method perfectly fits your needs.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/integration-basics/&#xD;&#xA;  [2]: http://www.cfm.brown.edu/people/sg/AM35odes.pdf" />
  <row Id="29487" PostHistoryTypeId="5" PostId="13272" RevisionGUID="86714b0c-ffa5-4a5d-a9b2-093e09bb9ce1" CreationDate="2011-06-07T11:12:47.610" UserId="6440" Comment="added 815 characters in body" Text="I want to render a depth map by importing it from a file, then creating an array of vertices and indices, and then displaying it using a basic shader (just apply the view and projection matrices on it and then display). I'm aware of GPU-based solutions, however, I want to perform additional calculations using the CPU on the vertices before rendering them.&#xD;&#xA;&#xD;&#xA;So, basically what I do is that I have my vertices with there depth in a grid, and then I import my triangles as follows:&#xD;&#xA;&#xD;&#xA;    +--+--+--+--+--+--+&#xD;&#xA;    ¦ \¦ \¦ \¦ \¦ \¦ \¦&#xD;&#xA;    +--+--+--+--+--+--+   meaning that I simply split every quad spanned by four pixels&#xD;&#xA;    ¦ \¦ \¦ \¦ \¦ \¦ \¦   into two triangles.&#xD;&#xA;    +--+--+--+--+--+--+&#xD;&#xA;    ¦ \¦ \¦ \¦ \¦ \¦ \¦&#xD;&#xA;    +--+--+--+--+--+--+&#xD;&#xA;&#xD;&#xA;When I took the first best depth map that I've found on google, I've got this result:&#xD;&#xA;[![Working][1]][2]&#xD;&#xA;&#xD;&#xA;However, as soon as I'm moving the camera up, strange things happen:&#xD;&#xA;[![Buggy pic][3]][4]&#xD;&#xA;[![Buggy pic 2][5]][5]&#xD;&#xA;&#xD;&#xA;The problem seems to only arise when multiple triangles are rendered behind each other. In this case, a triangle from the back (a black one at infinity depth or a wall behind the front object) seems to shine through. Also, when I use &quot;PIX for Windows&quot;, and I use the &quot;Debug this pixel&quot; functionality, I get two triangles for each of the buggy pixels I've checked.&#xD;&#xA;&#xD;&#xA;The rendering is done as follows:&#xD;&#xA;&#xD;&#xA;`Initialize`&#xD;&#xA;&#xD;&#xA;    graphics.PreferredBackBufferWidth = 1280;&#xD;&#xA;    graphics.PreferredBackBufferHeight = 720;&#xD;&#xA;    graphics.IsFullScreen = false;&#xD;&#xA;    graphics.ApplyChanges();&#xD;&#xA;    IsMouseVisible = true;&#xD;&#xA;&#xD;&#xA;`Draw`&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.Clear(ClearOptions.DepthBuffer | ClearOptions.Target, Color.Black, 0, 0);&#xD;&#xA;    DrawModel();&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    DrawControls();&#xD;&#xA;    DrawFileBrowser();&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;    base.Draw(gameTime);&#xD;&#xA;&#xD;&#xA;`DrawModel`&#xD;&#xA;&#xD;&#xA;    GraphicsDevice.RasterizerState =&#xD;&#xA;        new RasterizerState {&#xD;&#xA;            CullMode = CullMode.None&#xD;&#xA;        };&#xD;&#xA;    // [...]&#xD;&#xA;    // set up view and projection matrix&#xD;&#xA;    // [...]&#xD;&#xA;    GraphicsDevice.DrawUserIndexedPrimitives(&#xD;&#xA;        PrimitiveType.TriangleList,&#xD;&#xA;        vertices,&#xD;&#xA;        0,&#xD;&#xA;        vertices.Length,&#xD;&#xA;        indices,&#xD;&#xA;        0,&#xD;&#xA;        indices.Length / 3);&#xD;&#xA;&#xD;&#xA;What could be the problem in my rendering method? Do I have to somehow order my triangles from back to front? (no alpha-values are used) If yes, how can I order them?&#xD;&#xA;&#xD;&#xA;Is it maybe some problem with the depth buffer? How can I fix it?&#xD;&#xA;&#xD;&#xA;Any other ideas on how to fix the problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;Shader code is basic:&#xD;&#xA;&#xD;&#xA;    float4x4 View;&#xD;&#xA;    float4x4 Projection;&#xD;&#xA;    &#xD;&#xA;    void VS_Model(in  float4 inPosition            : POSITION,&#xD;&#xA;                  in  float4 inColor               : COLOR,&#xD;&#xA;                  out float4 outPosition           : POSITION,&#xD;&#xA;                  out float4 outColor              : TEXCOORD0) &#xD;&#xA;    {&#xD;&#xA;        outPosition = mul(mul(inPosition, View), Projection);&#xD;&#xA;        outColor = inColor;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    void PS_Model(in  float4 inColor               : TEXCOORD0,&#xD;&#xA;                  out float4 outColor              : COLOR)&#xD;&#xA;    {&#xD;&#xA;        outColor = inColor;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    technique Model&#xD;&#xA;    {&#xD;&#xA;        pass&#xD;&#xA;        {&#xD;&#xA;            VertexShader = compile vs_3_0 VS_Model();&#xD;&#xA;            PixelShader = compile ps_3_0 PS_Model();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/44CKc.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/44CKc.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/TEUsM.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/TEUsM.jpg&#xD;&#xA;  [5]: http://i.stack.imgur.com/sKbIB.jpg" />
  <row Id="29488" PostHistoryTypeId="2" PostId="13295" RevisionGUID="1faf1b27-a7c0-4906-90ab-46f7c81c248e" CreationDate="2011-06-07T11:28:12.500" UserId="4662" Text="Threading is used in two situations:&#xD;&#xA;&#xD;&#xA; 1. When you have heavy work to do but need user responsiveness to be maintained.&#xD;&#xA; 2. When you need the power of more than one processing core on your favourite platform/minimum requirement.&#xD;&#xA;&#xD;&#xA;If you can reasonably expect either or both of these things to be necessary, then go for it. Else, don't. Of course, nobody is going to stop you from threading for fun because you can, or to poke around and investigate it, but in terms of doing threadng for the benefits of actually gaining a multi-threaded application, then the two use cases above are pretty much it." />
  <row Id="29489" PostHistoryTypeId="5" PostId="13290" RevisionGUID="13bb161e-cd78-4d56-abd5-2931db7b7505" CreationDate="2011-06-07T11:51:49.670" UserId="7804" Comment="corrected spelling and grammar" Text="You can render your primitive, and make a shader that can create these rounded corners.&lt;br&gt;&#xD;&#xA;Here is a simple pixel shader in pseudocode that can draw a rounded square:&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    xDist = abs(x-0.5)&#xD;&#xA;    yDist = abs(y-0.5)&#xD;&#xA;    xD = xDist*xDist*4&#xD;&#xA;    yD = yDist*yDist*4&#xD;&#xA;    alpha = floor((1-xD)*(1-yD)*5)&#xD;&#xA;&#xD;&#xA;Result of this pixel shader:&lt;br&gt;&lt;br&gt;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you use shaders, you can make really fancy UI, even an animated one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/K2VnS.png" />
  <row Id="29490" PostHistoryTypeId="24" PostId="13290" RevisionGUID="13bb161e-cd78-4d56-abd5-2931db7b7505" CreationDate="2011-06-07T11:51:49.670" Comment="Proposed by 7804 approved by 4828 edit id of 476" />
  <row Id="29491" PostHistoryTypeId="25" PostId="13292" RevisionGUID="ddcd0ae6-5f92-4ef9-a37b-d7a0d42b86d7" CreationDate="2011-06-07T12:13:41.900" Comment="http://twitter.com/#!/StackGameDev/status/78072133292523520" />
  <row Id="29492" PostHistoryTypeId="2" PostId="13296" RevisionGUID="3ce50e8f-bf16-4eea-a1f4-cb724c1b5f9f" CreationDate="2011-06-07T12:18:18.560" UserId="2792" Text="You seems to render without depth test on. This might make triangles further away render on top of closer triangles since they might be rendered afterwards.&#xD;&#xA;&#xD;&#xA;The solution is to turn on depth testing in your render setup and set the depth compare function to Less or LessEqual. Remember to turn on depth write too if you happen to have that turned off." />
  <row Id="29493" PostHistoryTypeId="2" PostId="13297" RevisionGUID="c1951ad5-e7b4-413f-9903-29f29ab07a7c" CreationDate="2011-06-07T12:36:32.407" UserId="4661" Text="As Olhovsky has said, the jump height is decided the moment you leave the ground, not after that.&#xD;&#xA;&#xD;&#xA;If you really want to avoid the jetpack effect, I only see two ways: a key *combination* to jump higher, or fundamentally changing the way the jump key works:&#xD;&#xA;&#xD;&#xA;Instead of making the player jump as soon as the key is pressed, delay the jump until the key is *released*. So basically the duration of the key press controls how much spring tension in the player’s legs is built up, and subsequently released.&#xD;&#xA;&#xD;&#xA;Of course, this fundamentally alters the game mechanics and may be unfamiliar for the player. But the effect could be quite interesting and may well be worth the unfamiliarity." />
  <row Id="29494" PostHistoryTypeId="5" PostId="13290" RevisionGUID="abd789f6-7be0-4d34-9597-b8cbace2b181" CreationDate="2011-06-07T12:55:56.747" UserId="4828" Comment="added 70 characters in body" Text="You can render your primitive, and make a shader that can create these rounded corners.&lt;br&gt;&#xD;&#xA;Here is a simple pixel shader in pseudocode that can draw a rounded square:&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    xDist = abs(x-0.5)&#xD;&#xA;    yDist = abs(y-0.5)&#xD;&#xA;    xD = xDist*xDist*4&#xD;&#xA;    yD = yDist*yDist*4&#xD;&#xA;    alpha = floor((1-xD)*(1-yD)*5)&#xD;&#xA;&#xD;&#xA;Result of this pixel shader:&lt;br&gt;&lt;br&gt;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you use shaders, you can make really fancy UI, even an animated one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/K2VnS.png&#xD;&#xA;&#xD;&#xA;For me great to prototype simple pixel shaders is program EvalDraw" />
  <row Id="29495" PostHistoryTypeId="2" PostId="13298" RevisionGUID="dd2178c4-41f8-46f3-ada2-f249e69ba522" CreationDate="2011-06-07T12:56:10.803" UserId="2239" Text="If Fraps doesn't cut it, a hardware capture card should - something like the famous Blackmagic Intensity Pro card (or Shuttle USB 3.0) that can capture HDMI (hence also DVI) up to 1080i50/60 at a bargain-bin $199 price point.&#xD;&#xA;&#xD;&#xA;It's actually a lot more expensive to try and capture a VGA signal as far as I know... analog VGA capture beyond very low resolutions tend to be a lot more expensive than an Intensity card and not produce anywhere near as good a result." />
  <row Id="29496" PostHistoryTypeId="2" PostId="13299" RevisionGUID="4bc0c248-7a60-45a8-9c95-4049c28ac14f" CreationDate="2011-06-07T13:16:31.233" UserId="7514" Text="For a section of my game, instead of having a perspective projection, i would like to display an isometric view of an object.&#xD;&#xA;&#xD;&#xA;So i don't want things to appear smaller if in a distance, etc.&#xD;&#xA;&#xD;&#xA;Basically a proper isometric image.&#xD;&#xA;&#xD;&#xA;Is there any way to do this in XNA?" />
  <row Id="29497" PostHistoryTypeId="1" PostId="13299" RevisionGUID="4bc0c248-7a60-45a8-9c95-4049c28ac14f" CreationDate="2011-06-07T13:16:31.233" UserId="7514" Text="XNA - Non perspective projection?" />
  <row Id="29498" PostHistoryTypeId="3" PostId="13299" RevisionGUID="4bc0c248-7a60-45a8-9c95-4049c28ac14f" CreationDate="2011-06-07T13:16:31.233" UserId="7514" Text="&lt;xna&gt;&lt;isometric&gt;&lt;projection&gt;" />
  <row Id="29499" PostHistoryTypeId="2" PostId="13300" RevisionGUID="8a2df046-779b-4498-be82-6ede7cea0c92" CreationDate="2011-06-07T13:36:56.103" UserId="744" Text="City of Heroes and Champions Online already do the things you are talking about.&#xD;&#xA;&#xD;&#xA;Yes, it adversely affects performance in many areas - notably rendering and animation - as well as the art team (financial) budget. If you're trying to do this, you should make sure you have good performance budgeting tools throughout the entire art process, and good test cases." />
  <row Id="29500" PostHistoryTypeId="2" PostId="13301" RevisionGUID="e09a3ccb-e667-4fdb-aa66-896de3bd4325" CreationDate="2011-06-07T14:23:31.573" UserId="545" Text="Basically you want at least 3 types of data structures:&#xD;&#xA;&#xD;&#xA;Counters: This happened.  A gun was fired.  An enemy was killed.  This polygon was touched.&#xD;&#xA;&#xD;&#xA;Conditions: If Counter X &gt; 500.  If Counter Y = 0.&#xD;&#xA;&#xD;&#xA;Trophy:  If condition A is met, this condition is visible.  If condition Y is met, this condition is invisible.&#xD;&#xA;&#xD;&#xA;In your game code you sprinkle counters firing where appropriate and forget about it.&#xD;&#xA;&#xD;&#xA;Some other class either in response to an event of the counter firing or periodically will check the list of conditions and see if they've been met.  After, again either in response to an event or periodically trophy's will check if all their conditions are met.  If so it gets rewarded.&#xD;&#xA;&#xD;&#xA;Your UI can iterate all trophies and display the visible conditions.  If no conditions are visible, then the trophy is hidden.&#xD;&#xA;&#xD;&#xA;Everything is separate and during the update loop all you need to do is increase a number and maybe flag the data as changed, anything else can be deferred to when there's more time / even a separate thread." />
  <row Id="29501" PostHistoryTypeId="5" PostId="13278" RevisionGUID="85a30a77-4811-40bc-8980-4869b7de373c" CreationDate="2011-06-07T14:36:30.420" UserId="1430" Comment="deleted 165 characters in body; edited tags; deleted 31 characters in body; edited title" Text="I am very new here... Sorry for any mistakes in asking my question.&#xD;&#xA;&#xD;&#xA;Just now I found  [MobiForms][1]. I am planning to create a game for the iPhone using it.&#xD;&#xA;&#xD;&#xA;My problem is I know only Objective-C and I have designed only one app (which is also game) that's currently in the app store. Can I use MobiForms for game development?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobiforms.com/" />
  <row Id="29502" PostHistoryTypeId="6" PostId="13278" RevisionGUID="85a30a77-4811-40bc-8980-4869b7de373c" CreationDate="2011-06-07T14:36:30.420" UserId="1430" Comment="deleted 165 characters in body; edited tags; deleted 31 characters in body; edited title" Text="&lt;iphone&gt;" />
  <row Id="29503" PostHistoryTypeId="4" PostId="13278" RevisionGUID="85a30a77-4811-40bc-8980-4869b7de373c" CreationDate="2011-06-07T14:36:30.420" UserId="1430" Comment="deleted 165 characters in body; edited tags; deleted 31 characters in body; edited title" Text="Can I use MobiForms for my game development?" />
  <row Id="29504" PostHistoryTypeId="2" PostId="13302" RevisionGUID="ceca6742-4684-4151-9657-a095ef287da0" CreationDate="2011-06-07T14:39:35.817" UserId="1430" Text="MobiForms looks like it's designed for businesses to rapidly create domain specific business applications that basically look... like forms. It doesn't look like it's well-suited to making interesting games. &#xD;&#xA;&#xD;&#xA;So while I'm sure you could leverage MobiForms to create some kind of program that would resemble a game, since it's not really designed for it I would say that you shouldn't use it -- especially since it costs money. You'd be better off putting that money elsewhere, like towards a [Unity][1] license, perhaps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="29505" PostHistoryTypeId="2" PostId="13303" RevisionGUID="dd14ccdb-9979-40d1-a836-b138ddb66b52" CreationDate="2011-06-07T14:44:06.160" UserId="1430" Text="You can assign any arbitrary matrix to the pipeline's projection matrix in XNA, even one that doesn't perform a useful projection (you probably won't see useful results doing that, but you *can*).&#xD;&#xA;&#xD;&#xA;So you can construct an orthographic projection matrix yourself or use one of [XNA's helper methods][1] and use that. You'll also have to adjust the view matrix to position the camera from the angle you want, of course.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.matrix.createorthographic.aspx" />
  <row Id="29506" PostHistoryTypeId="2" PostId="13304" RevisionGUID="97200721-2cd2-460e-a4c8-b26703753590" CreationDate="2011-06-07T14:53:16.737" UserId="1021" Text="I'd like to pay an artist to create art assets for my game.  Is it common for the client (myself in this case) to exclusively own all the artwork that I pay the artist to create and deliver?  How can I make sure of this?" />
  <row Id="29507" PostHistoryTypeId="1" PostId="13304" RevisionGUID="97200721-2cd2-460e-a4c8-b26703753590" CreationDate="2011-06-07T14:53:16.737" UserId="1021" Text="Exclusive ownership of game artwork" />
  <row Id="29508" PostHistoryTypeId="3" PostId="13304" RevisionGUID="97200721-2cd2-460e-a4c8-b26703753590" CreationDate="2011-06-07T14:53:16.737" UserId="1021" Text="&lt;art&gt;&lt;outsourcing&gt;" />
  <row Id="29509" PostHistoryTypeId="2" PostId="13305" RevisionGUID="0bf8ff40-3221-4ef9-be07-2e62afb0698f" CreationDate="2011-06-07T14:56:17.827" UserId="1156" Text="IANAL.&#xD;&#xA;&#xD;&#xA;As long as the contract you agree states that you own the artwork and you make it clear to the artist that this is the case, you will have no problems.&#xD;&#xA;&#xD;&#xA;I believe it is common for the client to own it." />
  <row Id="29510" PostHistoryTypeId="2" PostId="13306" RevisionGUID="52772ca7-7bc3-4fbf-97be-b64eed8f0c87" CreationDate="2011-06-07T15:02:40.730" UserId="7845" Text="I'm developing a android game and i have a question about storing the game elements without firing garbage collector. &#xD;&#xA;&#xD;&#xA;My game needs a collection where the game elements are stored according to x,y positions (all game elements have x,y,width and height). The collection is then called every frame to retrive the elements according to cameraX,cameraY,camera width and height (user can scroll around the game). &#xD;&#xA;&#xD;&#xA;Example:  &#xD;&#xA;&#xD;&#xA;     function draw() {&#xD;&#xA;       tmp = collection.getElements(tmp,cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;         for(int i = 0; i &lt; tmp.size(); i++) {&#xD;&#xA;            tmp.get(i).draw();&#xD;&#xA;         } &#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;I'm currently using the Vector class to represent the collection elements, but the gc keeps firing every couple of minutes. I do all my allocations up front. I've also modified the getElements function to accept 1 more parameter - a temp vector(allocated upfront) which is filled with elements and then returned. &#xD;&#xA;  &#xD;&#xA;- With which class to store the game elements so the gc wont fire (i prefer never if possible)? &#xD;&#xA;- i also add elements to the collection during runtime, do i have to allocate them upfront also?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;Regards J." />
  <row Id="29511" PostHistoryTypeId="1" PostId="13306" RevisionGUID="52772ca7-7bc3-4fbf-97be-b64eed8f0c87" CreationDate="2011-06-07T15:02:40.730" UserId="7845" Text="android game - how to store game elements so gc wont fire" />
  <row Id="29512" PostHistoryTypeId="3" PostId="13306" RevisionGUID="52772ca7-7bc3-4fbf-97be-b64eed8f0c87" CreationDate="2011-06-07T15:02:40.730" UserId="7845" Text="&lt;game-design&gt;&lt;2d&gt;&lt;android&gt;&lt;gameloop&gt;" />
  <row Id="29513" PostHistoryTypeId="2" PostId="13307" RevisionGUID="d4a2489f-3301-4bd1-93d9-b92d9f775dd6" CreationDate="2011-06-07T15:10:35.380" UserId="7497" Text="I've been googling this around and yet nothing showed up but some articles from middle ages which were talking about Gforce mx and ... . My question is just this: what are the different memories in a high-end graphics card and what is their size and usage?" />
  <row Id="29514" PostHistoryTypeId="1" PostId="13307" RevisionGUID="d4a2489f-3301-4bd1-93d9-b92d9f775dd6" CreationDate="2011-06-07T15:10:35.380" UserId="7497" Text="Different types of memories which a graphics card has" />
  <row Id="29515" PostHistoryTypeId="3" PostId="13307" RevisionGUID="d4a2489f-3301-4bd1-93d9-b92d9f775dd6" CreationDate="2011-06-07T15:10:35.380" UserId="7497" Text="&lt;opengl&gt;&lt;programming&gt;&lt;graphics&gt;&lt;directx&gt;&lt;gpu&gt;" />
  <row Id="29516" PostHistoryTypeId="25" PostId="13304" RevisionGUID="3ffbf6e7-0a71-4256-a963-7492571438fe" CreationDate="2011-06-07T15:13:42.053" Comment="http://twitter.com/#!/StackGameDev/status/78117431960276992" />
  <row Id="29517" PostHistoryTypeId="2" PostId="13308" RevisionGUID="daad2644-0061-4d44-9bde-f7825fc4f393" CreationDate="2011-06-07T15:14:16.017" UserId="7588" Text="Dependant on the country you or your artist are in, the artist can still have certain rights to reproduce and use the work as he sees fit. The law applied will obviously depend on the country and hence there can be conflicting laws.&#xD;&#xA;Some countries stipulate that any creation remains the intellectual property of a person, and they cannot sell their intellectual property (at least not in it's entirety).&#xD;&#xA;I would recommend seeking a lawer's advice to make sure your contract is waterproof, and try to contract people in the same country as you.&#xD;&#xA;&#xD;&#xA;See : http://en.wikipedia.org/wiki/Authors%27_rights" />
  <row Id="29518" PostHistoryTypeId="5" PostId="13308" RevisionGUID="a2861c53-a29b-402e-bc05-76d80b26c914" CreationDate="2011-06-07T15:22:41.793" UserId="7588" Comment="added 177 characters in body" Text="Dependant on the country you or your artist are in, the artist can still have certain rights to reproduce and use the work as he sees fit. The law applied will obviously depend on the country and hence there can be conflicting laws.&#xD;&#xA;Some countries stipulate that any creation remains the intellectual property of a person, and they cannot sell their intellectual property (at least not in it's entirety).&#xD;&#xA;I would recommend seeking a lawer's advice to make sure your contract is waterproof, and try to contract people in the same country as you.&#xD;&#xA;&#xD;&#xA;See : http://en.wikipedia.org/wiki/Authors%27_rights&#xD;&#xA;&#xD;&#xA;Common law: employer owns the copyright in work created by employees&#xD;&#xA;&#xD;&#xA;Civil law: employer enjoys an exclusive licence to the economic rights in work created by employees&#xD;&#xA;" />
  <row Id="29519" PostHistoryTypeId="2" PostId="13309" RevisionGUID="69c02ceb-fff3-443c-987d-5430351aa73f" CreationDate="2011-06-07T15:28:47.013" UserId="7497" Text="The answer to what you seek is not *.obj because it is pretty much like a bitmap for animation (you can export it with Blender but you have to tell blender to export every frame, like a movie and it's frames). What you really seek is Collada. There is a mesh loader called assimp, and it loads like a million mesh formats (I am using it for my new engine). And what you said about *.3DS is not always true." />
  <row Id="29520" PostHistoryTypeId="2" PostId="13310" RevisionGUID="b398ab6c-95cd-425b-acff-e083074b22ad" CreationDate="2011-06-07T15:34:58.347" UserId="6867" Text="I often develop 2D games. I would like to know if there's a program like EvalDraw out there, that makes it easy to quickly make (for example) a square, out of a black quad, and then write some shader code, and see how that shader code modifies the square in realtime.&#xD;&#xA;&#xD;&#xA;That would be really great for my future development processes." />
  <row Id="29521" PostHistoryTypeId="1" PostId="13310" RevisionGUID="b398ab6c-95cd-425b-acff-e083074b22ad" CreationDate="2011-06-07T15:34:58.347" UserId="6867" Text="Great realtime shader tool?" />
  <row Id="29522" PostHistoryTypeId="3" PostId="13310" RevisionGUID="b398ab6c-95cd-425b-acff-e083074b22ad" CreationDate="2011-06-07T15:34:58.347" UserId="6867" Text="&lt;tools&gt;" />
  <row Id="29523" PostHistoryTypeId="5" PostId="13309" RevisionGUID="d542ea63-6e37-4f2e-9312-94986406f629" CreationDate="2011-06-07T15:36:19.093" UserId="7497" Comment="added 54 characters in body" Text="The answer to what you seek is not *.obj because it is pretty much like a bitmap for animation (you can export it with Blender but you have to tell blender to export every frame as a single *.obj file [NOT EFFICIENT IN ANY ASPECTS], like a movie and it's frames). What you really seek is Collada. There is a mesh loader called assimp, and it loads like a million mesh formats (I am using it for my new engine). And what you said about *.3DS is not always true." />
  <row Id="29524" PostHistoryTypeId="2" PostId="13311" RevisionGUID="8feb5f5d-64f3-41f0-9fab-24a39d9dccc4" CreationDate="2011-06-07T15:38:57.280" UserId="163" Text="Yes, if you allocate *anything* at runtime, it will eventually trigger the GC. Generally, you get around this by implementing an object pool ... that way, you can preallocate (or at least collect new instances for reuse) all objects like bullets and other entities to avoid triggering the GC.&#xD;&#xA;&#xD;&#xA;*edit:* You also might want to use a memory profiler (like the [eclipse memory analyzer][1]) which can help you figure out what routine is generating objects at runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eclipse.org/mat/" />
  <row Id="29525" PostHistoryTypeId="2" PostId="13312" RevisionGUID="1c070f96-1ba9-46eb-83c8-531991368a2e" CreationDate="2011-06-07T15:46:54.610" UserId="1430" Text="Most games of that era functioned very uniquely; there was very little engine-like code reuse.&#xD;&#xA;&#xD;&#xA;That said, you're fairly likely to find the kind of detailed descriptions of gameplay mechanics you want from games that are very big/popular like [Metroid][1], [Final Fantasy 6][2] or [Final Fantasy Tactics][3] -- people have been researching the mechanics of those games extensively and you can find a fair bit of information about them scattered arond. Also games that are popular among [tool-assist speed run][4] fans as they tend to have know (and thus, hopefully document) a lot of the interesting quirks of the game code used in the games they run.&#xD;&#xA;&#xD;&#xA;(Note that the TASVideos link was being really flaky at the time I wrote this and may not connect reliably.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metroid-database.com/m1/sourcecode.php&#xD;&#xA;  [2]: http://masterzed.cavesofnarshe.com/ff3.html&#xD;&#xA;  [3]: http://www.ffhacktics.com/&#xD;&#xA;  [4]: http://tasvideos.org/GameResources.html" />
  <row Id="29526" PostHistoryTypeId="16" PostId="13312" RevisionGUID="447c3fb2-bfb5-4ce3-81af-83ed5e1af0c7" CreationDate="2011-06-07T15:46:54.610" UserId="1430" />
  <row Id="29527" PostHistoryTypeId="2" PostId="13313" RevisionGUID="d7afaf38-e711-47e9-a637-d3b98827baa7" CreationDate="2011-06-07T15:49:09.883" UserId="1430" Text="[RenderMonkey][1] and [FX Composer][2] were both tools like this, although they've been relatively abandoned recently. 3D modelling tools like Max or Maya often usually have shader/effect/material pipelines built in, but they are probably prohibitively expensive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.amd.com/archive/gpu/rendermonkey/pages/default.aspx&#xD;&#xA;  [2]: http://developer.nvidia.com/fx-composer" />
  <row Id="29528" PostHistoryTypeId="5" PostId="13306" RevisionGUID="de6f8587-fe02-4570-9bf0-320956ae3806" CreationDate="2011-06-07T15:49:53.123" UserId="1198" Comment="deleted 21 characters in body" Text="I'm developing a android game and i have a question about storing the game elements without firing garbage collector. &#xD;&#xA;&#xD;&#xA;My game needs a collection where the game elements are stored according to x,y positions (all game elements have x,y,width and height). The collection is then called every frame to retrive the elements according to cameraX,cameraY,camera width and height (user can scroll around the game). &#xD;&#xA;&#xD;&#xA;Example:  &#xD;&#xA;&#xD;&#xA;     function draw() {&#xD;&#xA;       tmp = collection.getElements(tmp,cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;         for(int i = 0; i &lt; tmp.size(); i++) {&#xD;&#xA;            tmp.get(i).draw();&#xD;&#xA;         } &#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;I'm currently using the Vector class to represent the collection elements, but the gc keeps firing every couple of minutes. I do all my allocations up front. I've also modified the getElements function to accept 1 more parameter - a temp vector(allocated upfront) which is filled with elements and then returned. &#xD;&#xA;  &#xD;&#xA;- With which class to store the game elements so the gc wont fire (&#xD;&#xA;i prefer never if possible)? &#xD;&#xA;- &#xD;&#xA;i also add elements to the collection during runtime, do i have to allocate them upfront also?" />
  <row Id="29529" PostHistoryTypeId="2" PostId="13314" RevisionGUID="343f3b9e-baaf-45be-a614-a29ef28e71a2" CreationDate="2011-06-07T15:53:42.077" UserId="6440" Text="[Matrix.CreateOrthographic][1] should do the trick.&#xD;&#xA;&#xD;&#xA;[1]: http://msdn.microsoft.com/en-us/library/bb195662.aspx" />
  <row Id="29530" PostHistoryTypeId="2" PostId="13315" RevisionGUID="7919cd56-8d80-4449-9c5e-e8ae762d0937" CreationDate="2011-06-07T16:03:20.410" UserId="4828" Text="Try these:&#xD;&#xA;http://www.advsys.net/ken/polydraw.zip &lt; - author of EvalDraw&#xD;&#xA;http://www.iquilezles.org/apps/shadertoy/ &lt; - you must have right browser :)" />
  <row Id="29531" PostHistoryTypeId="5" PostId="13315" RevisionGUID="1d5807b9-8b28-4d3b-a706-51de49d7e771" CreationDate="2011-06-07T16:12:54.467" UserId="4828" Comment="deleted 1 characters in body" Text="Try these:&#xD;&#xA;http://www.advsys.net/ken/polydraw.zip &lt; - author of EvalDraw&#xD;&#xA;http://www.iquilezles.org/apps/shadertoy/ &lt; - you must have good browser :)" />
  <row Id="29532" PostHistoryTypeId="2" PostId="13316" RevisionGUID="841847f8-e3b9-40e9-86a7-83aa8ef4637b" CreationDate="2011-06-07T16:15:47.383" UserId="7861" Text="Thermite3D is a voxel-based game engine.  It isn't an editor per se.  It does, however, have a list of voxel editors on its wiki here: [Thermite-Recommended Voxel Editors][1].&#xD;&#xA;&#xD;&#xA;Of those, Sproxel, Voxel, and QBlock are all free.  Paint3d and Everygraph (Voxel3d) have trial versions, and one not on the list, [Qubicle Constructor][2], has a crippled trial as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.thermite3d.org/dokuwiki/voxel_editors&#xD;&#xA;  [2]: http://www.minddesk.com/" />
  <row Id="29533" PostHistoryTypeId="16" PostId="13316" RevisionGUID="3b3eb999-6263-4dbf-b580-41a2b844add7" CreationDate="2011-06-07T16:15:47.383" UserId="7861" />
  <row Id="29534" PostHistoryTypeId="5" PostId="13310" RevisionGUID="8edd30a7-97a6-42f5-97eb-b94a176fb277" CreationDate="2011-06-07T16:20:22.407" UserId="6867" Comment="added 51 characters in body" Text="I often develop 2D games. I would like to know if there's a program like EvalDraw out there, that makes it easy to quickly make (for example) a square, out of a black quad, and then write some shader code, and see how that shader code modifies the square in realtime.&#xD;&#xA;&#xD;&#xA;That would be really great for my future development processes.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;The shader tool must work with HLSL." />
  <row Id="29535" PostHistoryTypeId="5" PostId="12128" RevisionGUID="e0aa9dc8-38e1-4794-b2c9-15f1e1d10667" CreationDate="2011-06-07T16:30:12.647" UserId="5966" Comment="added 360 characters in body" Text="Several solutions.&#xD;&#xA;&#xD;&#xA;1. For Box2D, set `b2_velocityThreshold` in `b2Settings.h` file. In my case, I set it to `0.0f` and it worked! Mass, friction, damping were NOT problem.&#xD;&#xA;Check this discussion thread for more details.&#xD;&#xA;http://www.box2d.org/forum/viewtopic.php?f=3&amp;t=6906&amp;p=30782#p30782&#xD;&#xA;&#xD;&#xA;2. Using other physics engine.&#xD;&#xA;*Newton Game Dynamics* configured performing this correctly by default.&#xD;&#xA;However using Newton dynamics in iOS is possible but it's somewhat harder than others. I used several days configuring it for iOS.&#xD;&#xA;&#xD;&#xA;I'm also asking on BulletPhysics forums. I'll update this when I got a solution.&#xD;&#xA;&#xD;&#xA;-- (edit) --&#xD;&#xA;&#xD;&#xA;I asked on BulletPhysics forum, but nobody replied. However I figured out how I archive this. Use this method&#xD;&#xA;&#xD;&#xA;    btRigidBody-&gt;setContactProcessingThreshold(0.0f)&#xD;&#xA;&#xD;&#xA;This is danger because Bullet works strangely when it is zero. But my problem will be solved. If you know how can I make it work correctly please let mw know. Thanks." />
  <row Id="29536" PostHistoryTypeId="5" PostId="13306" RevisionGUID="f9291d85-315b-450d-88ab-b09a540950ab" CreationDate="2011-06-07T16:35:01.767" UserId="962" Comment="changed tags, fixed formatting, fixed spelling, fixed grammar" Text="I'm developing a android game and I have a question about storing the game elements without firing garbage collector. &#xD;&#xA;&#xD;&#xA;My game needs a collection where the game elements are stored according to x,y positions (all game elements have x,y,width and height). The collection is then called every frame to retrieve the elements according to cameraX, cameraY, camera width and height (user can scroll around the game). &#xD;&#xA;&#xD;&#xA;Example:  &#xD;&#xA;&#xD;&#xA;     function draw() {&#xD;&#xA;       tmp = collection.getElements(tmp,cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;         for(int i = 0; i &lt; tmp.size(); i++) {&#xD;&#xA;            tmp.get(i).draw();&#xD;&#xA;         } &#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;I'm currently using the Vector class to represent the collection elements, but the gc keeps firing every couple of minutes. I do all my allocations up front. I've also modified the getElements function to accept 1 more parameter - a temp vector(allocated upfront) which is filled with elements and then returned. &#xD;&#xA;&#xD;&#xA;**How should I store the game elements so the gc wont fire (I prefer never if possible)?** &#xD;&#xA;&#xD;&#xA;**I also add elements to the collection during runtime, do I have to allocate them upfront also?**" />
  <row Id="29537" PostHistoryTypeId="6" PostId="13306" RevisionGUID="f9291d85-315b-450d-88ab-b09a540950ab" CreationDate="2011-06-07T16:35:01.767" UserId="962" Comment="changed tags, fixed formatting, fixed spelling, fixed grammar" Text="&lt;2d&gt;&lt;android&gt;&lt;garbage-collection&gt;" />
  <row Id="29538" PostHistoryTypeId="2" PostId="13317" RevisionGUID="e94af933-b0b2-411c-8416-733c14ae40e4" CreationDate="2011-06-07T16:42:19.353" UserId="7548" Text="What's common isn't nearly as important as what you and the other party agree to.  It may be important, however, because an artist may wish to earn more if they also have to give all their rights away to their works.&#xD;&#xA;&#xD;&#xA;You might also consider some sort of joint ownership agreement where there are some restrictions on what the author does with their work, such as a limit on who they can sell to in order to prevent them from selling their same work to a competitor of yours while also leaving them free to sell it for uses that are not in the same industry (e.g., for packaging on some instant noodles), but this can get very complicated (e.g., the instant noodles are targeted at gamers -- this may or may not be beneficial to you).&#xD;&#xA;&#xD;&#xA;Hiring a competent lawyer with suitable experience in contract law would certainly be a wise choice on your part.&#xD;&#xA;" />
  <row Id="29539" PostHistoryTypeId="5" PostId="13315" RevisionGUID="886ae1b6-9120-4241-b204-f45c6070ed28" CreationDate="2011-06-07T16:48:50.080" UserId="4828" Comment="added 33 characters in body; added 13 characters in body" Text="Try these:&lt;br&gt;&#xD;&#xA;http://www.advsys.net/ken/polydraw.zip &lt; - author of EvalDraw&lt;br&gt;&#xD;&#xA;http://www.iquilezles.org/apps/shadertoy/ &lt; - you must have good browser :) &lt;br&gt;&#xD;&#xA;http://shazzam-tool.com &lt;- HLSL" />
  <row Id="29540" PostHistoryTypeId="5" PostId="13315" RevisionGUID="873cfbdf-3ea7-4975-8cd1-9263edb98dee" CreationDate="2011-06-07T17:02:23.927" UserId="4828" Comment="added 53 characters in body" Text="Try these:&lt;br&gt;&#xD;&#xA;http://www.advsys.net/ken/polydraw.zip &lt; - author of EvalDraw&lt;br&gt;&#xD;&#xA;http://www.iquilezles.org/apps/shadertoy/ &lt; - you must have good browser :) &lt;br&gt;&#xD;&#xA;http://shazzam-tool.com &lt;- HLSL &lt;br&gt;&#xD;&#xA;http://marino.boletus.hr/download.html &lt;- HLSL" />
  <row Id="29541" PostHistoryTypeId="5" PostId="13305" RevisionGUID="11992446-2a59-4d35-b488-cc8f5e282d26" CreationDate="2011-06-07T17:05:56.970" UserId="962" Comment="added 42 characters in body" Text="**I am not a lawyer; this is not legal advice.**&#xD;&#xA;&#xD;&#xA;As long as the contract you agree states that you own the artwork and you make it clear to the artist that this is the case, you will have no problems.&#xD;&#xA;&#xD;&#xA;I believe it is common for the client to own it." />
  <row Id="29542" PostHistoryTypeId="5" PostId="13280" RevisionGUID="5f23b789-3c5d-482a-908c-de7c349bf409" CreationDate="2011-06-07T17:13:33.683" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Tools to make a trailer&amp;hellip;](http://gamedev.stackexchange.com/questions/1603/tools-to-make-a-trailer)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I've developed some 3d experiences using unity3d and they are pretty much experimental at this level. Now the problem is that I need to make video captures in HD to showcase them. &#xD;&#xA;I've tried Camtasia 7 with divx compression, and still the quality is not Up to standard and number of dropframes are quite high. I'm running on a Core i7 cpu with geforce GT240. So I was thinking If it's possible to capturing the video remotely so one pc is in charge of capturing and one running the application. &#xD;&#xA;Or is there any better way to get the highest quality with least dropframes?&#xD;&#xA;Number of draw calls are around 2k(I know sounds crazy, but I can't make changes right now.)&#xD;&#xA;&#xD;&#xA;Grazies." />
  <row Id="29543" PostHistoryTypeId="10" PostId="13280" RevisionGUID="87c0d375-b573-41e2-aa4c-96a65358d634" CreationDate="2011-06-07T17:13:32.733" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="29544" PostHistoryTypeId="6" PostId="13304" RevisionGUID="382fb60a-177a-41a7-a7eb-6c37d140da0f" CreationDate="2011-06-07T17:25:49.703" UserId="14" Comment="edited tags" Text="&lt;art&gt;&lt;legal&gt;&lt;outsourcing&gt;" />
  <row Id="29545" PostHistoryTypeId="2" PostId="13318" RevisionGUID="826b77c3-2e05-4d3f-b1be-42dc750dec0a" CreationDate="2011-06-07T17:44:25.723" UserId="3659" Text="I also suggest reading through the source code for [Replica Island][1], which was developed by an Android engineer. He has a generic object pool class which can be extended for pools of custom objects. He also has a custom array class (with add/delete/search capabilities) to avoid having to use an iterator when traversing through an array of objects.&#xD;&#xA;&#xD;&#xA;Also would like to mention that the [DDMS][2] on the Android SDK in Eclipse can track memory allocations (see Allocation Tracker tab in the image).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/replicaisland/&#xD;&#xA;  [2]: http://developer.android.com/guide/developing/debugging/ddms.html" />
  <row Id="29546" PostHistoryTypeId="25" PostId="13306" RevisionGUID="fe4771b7-7da6-4ac7-bd00-314f225d1384" CreationDate="2011-06-07T18:14:30.073" Comment="http://twitter.com/#!/StackGameDev/status/78162932164329472" />
  <row Id="29547" PostHistoryTypeId="2" PostId="13319" RevisionGUID="b37cccdc-2b3d-476e-bd89-8a493607a324" CreationDate="2011-06-07T18:32:21.727" UserId="7863" Text="I see a lot of interest here in ES on C#. Check it out my port of the excellent ES implementation Artemis:&#xD;&#xA;&#xD;&#xA;https://github.com/thelinuxlich/artemis_CSharp&#xD;&#xA;&#xD;&#xA;Also, a example game to get you started on how it works(using XNA 4):&#xD;&#xA;https://github.com/thelinuxlich/starwarrior_CSharp&#xD;&#xA;&#xD;&#xA;Suggestions are welcome!" />
  <row Id="29549" PostHistoryTypeId="2" PostId="13321" RevisionGUID="21abb83f-a3c6-495f-af89-8cf0d0a7d1fd" CreationDate="2011-06-07T18:38:59.777" UserId="7863" Text="Take a look at Ploobs Engine, it supports XNA 4, opensource and has lots of features:&#xD;&#xA;&#xD;&#xA;www.ploobs.com.br" />
  <row Id="29550" PostHistoryTypeId="2" PostId="13322" RevisionGUID="b708f5b6-ad7d-42f8-a6f0-1439d4606c35" CreationDate="2011-06-07T18:41:20.727" UserId="7863" Text="Take a look at Ploobs Engine, right now it supports XNA 4, opensource and has a lot of cool features:&#xD;&#xA;&#xD;&#xA;www.ploobs.com.br" />
  <row Id="29552" PostHistoryTypeId="2" PostId="13324" RevisionGUID="f9ac7c5e-d6e9-4148-bc24-2c2ac1f82084" CreationDate="2011-06-07T18:45:29.993" UserId="7863" Text="take a look at Ploobs Engine, right now it supports XNA 4, it is opensource and has a lot of cool features: www.ploobs.com.br" />
  <row Id="29553" PostHistoryTypeId="16" PostId="13324" RevisionGUID="7118a368-53f1-4f4a-8e37-31dbef74dce3" CreationDate="2011-06-07T18:45:29.993" UserId="7863" />
  <row Id="29554" PostHistoryTypeId="5" PostId="13305" RevisionGUID="308c46cf-638c-4439-aefb-7449311c980b" CreationDate="2011-06-07T18:47:40.943" UserId="1156" Comment="added 154 characters in body" Text="**I am not a lawyer; this is not legal advice.**&#xD;&#xA;&#xD;&#xA;As long as the contract you agree states that you own the artwork and you make it clear to the artist that this is the case, you will have no problems.&#xD;&#xA;&#xD;&#xA;I believe it is common for the client to own it. **But with everything: explicit is better than implicit. If you are not 100% certain you will own the assets, make sure it is written in the agreement.**" />
  <row Id="29555" PostHistoryTypeId="2" PostId="13325" RevisionGUID="bf5ac098-43d4-4aba-9d92-6b0d98d70635" CreationDate="2011-06-07T19:15:33.077" UserId="3622" Text="I am a newbie to directx, but as I have been learning it I find it helpful that I do already know a little bit about video cards and that might be relevant.&#xD;&#xA;&#xD;&#xA;Directx makes you feel like you are creating typical programming resources, but I expect under the hood the important copies of those resources reside on the video card, i.e. your vertex buffer is probably created in memory, then copied to the video cards memory when you set it as the current vertex buffer. Your effect is probably loaded onto the video card.&#xD;&#xA;&#xD;&#xA;Moving stuff to and from the video card causes a certain performance hit. That's probably why directx is set up as a state machine, because by and large it represents states of your video card.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29556" PostHistoryTypeId="5" PostId="13183" RevisionGUID="51c67044-ff7f-4a51-af9e-195178742941" CreationDate="2011-06-07T19:17:18.243" UserId="7328" Comment="added 2004 characters in body" Text="after many attempts I went with box2d.&#xD;&#xA;&#xD;&#xA;there are generaly two approches to for this simulation or at least I found 2:&#xD;&#xA;&#xD;&#xA;1. one is to use some circle shapes and connect them using distant joints.&#xD;&#xA;2. and the other one is to rectangles for the chain itself and then attach them using revolute joints&#xD;&#xA;&#xD;&#xA;in each senario you have got to have a ancher (which in my case was an static box). it's better if you lower the weight of rope parts (either you use circle shapes or rectangle shapes), for example to have more realistic physics I set their density to 0.1 and for the box connected in the end of rope I used density 10. &#xD;&#xA;&#xD;&#xA;another thing you need to worry about how your rope segment react to each other. i just wanted my rope to move freely in scene so I marked all rope fixtures as sensors. you may need diffrent approch.&#xD;&#xA;&#xD;&#xA;the next thing you have to worry about is the number of iterations you are pasing to the world update: for low segment of rope( maybe 8 at most) there is no need to use a high iteration value maybe 10/10 which box2d itself suggested is enough but if you increase the number of segment for example i tried 30 segments, with low number of iterations your rope seems to increase it's length more that it should, so you need maybe areoung 40/40 iterations to solve those situations.&#xD;&#xA;&#xD;&#xA;after some testing it seems box 2d is designed for scenes with object sizes of 0.1m to 10m and the maximum size suggested for large scenes is somthing about 50mx50m. so basicaly you need to scale your object down to match these parameters. in my case I first tried to pass pixel positions directly to box2d but it seemed like there was some speed limits preventing world to move as fast is it should, so I had to scale my scene around 64 times to have the best results.  although i didn't test myself there are some limits in box2d that prevent you from using larger scenes. for example there is a defined value in `b2Setting.h` file `#define b2_maxTranslation			2.0f` you can change box2d settings but it seems not recommended." />
  <row Id="29557" PostHistoryTypeId="2" PostId="13326" RevisionGUID="1790238d-71bf-40e1-a1c5-50046df06f16" CreationDate="2011-06-07T20:33:43.153" UserId="5793" Text="I'm experimenting on a small top-down space shooter where the player controls a ship and he can shoot bullets toward the direction of the mouse cursor. My question is how can I shoot the bullets with the angle given by the mouse cursor ? &#xD;&#xA;&#xD;&#xA;Currently my bullets are created with random &quot;angle values&quot; ranging from -10 to 10 to each the X and Y axis so that way their position values are augmented or diminished each update giving the illusion that they follow an angle. But that just gives me a bullet that gets shot in a random direction and I need to shoot them in a specific direction (towards the mouse cursor). &#xD;&#xA;&#xD;&#xA;I get the feeling I'm missing something here." />
  <row Id="29558" PostHistoryTypeId="1" PostId="13326" RevisionGUID="1790238d-71bf-40e1-a1c5-50046df06f16" CreationDate="2011-06-07T20:33:43.153" UserId="5793" Text="How to generate projectiles with the direction of the mouse pointer" />
  <row Id="29559" PostHistoryTypeId="3" PostId="13326" RevisionGUID="1790238d-71bf-40e1-a1c5-50046df06f16" CreationDate="2011-06-07T20:33:43.153" UserId="5793" Text="&lt;xna&gt;&lt;c#&gt;&lt;.net&gt;" />
  <row Id="29560" PostHistoryTypeId="2" PostId="13327" RevisionGUID="643ec6cf-3bf2-4578-b0b9-57613e534197" CreationDate="2011-06-07T21:12:46.173" UserId="5135" Text="I'm Aistis and I'm 16 years old. **I'm planning my future career** and I'm standing on a doorstep and don't know **which way to go**. &#xD;&#xA;&#xD;&#xA;My dream was to create the best game ever. As I was growing up, I started to notice, how my passion for games didn't disappear for the whole 10 years and was/is still growing...&#xD;&#xA;Game development still seems too &quot;childish&quot; for my parents and for our family friends and they're stating that I should study something more serious.&#xD;&#xA;&#xD;&#xA;I don't exactly know what **I can do** and what I **want to do**. I know PHP, C++ (This year will be the second, when I'm learning this programming language at school), JavaScript and HTML. I had made many website designs, however, they weren't something you could actually call professional designs... I'm learning vector graphics, 3d modelling, music making... I tried to make a game several times, but I didn't accomplish anything yet... &#xD;&#xA;&#xD;&#xA;And... Well... Without a computer I can... Well, I can make pancakes... And... wash dishes I guess?&#xD;&#xA;&#xD;&#xA;I am writing a console based C++ game as my Summer Project for my school, which, I guess, will **be my first actual game** made from scratch (the other was some low level drag&amp;drop experiment in Game Maker 6).&#xD;&#xA;&#xD;&#xA;These **doubts** about what **I can actually do** can't let me decide whether I should study something related to game development...&#xD;&#xA;&#xD;&#xA;**So it would be great to know how to get rid of these doubts and have a stronger opinion in what carrier I want to follow** (game related or not)." />
  <row Id="29561" PostHistoryTypeId="1" PostId="13327" RevisionGUID="643ec6cf-3bf2-4578-b0b9-57613e534197" CreationDate="2011-06-07T21:12:46.173" UserId="5135" Text="What is necesary to get a job in the game industry?" />
  <row Id="29562" PostHistoryTypeId="3" PostId="13327" RevisionGUID="643ec6cf-3bf2-4578-b0b9-57613e534197" CreationDate="2011-06-07T21:12:46.173" UserId="5135" Text="&lt;career&gt;" />
  <row Id="29563" PostHistoryTypeId="25" PostId="13326" RevisionGUID="9b3f92f8-aad3-4d69-bdcb-c7243b58b004" CreationDate="2011-06-07T21:14:30.493" Comment="http://twitter.com/#!/StackGameDev/status/78208231138271232" />
  <row Id="29564" PostHistoryTypeId="5" PostId="13327" RevisionGUID="c100e33e-c07b-4b52-8544-15a109395963" CreationDate="2011-06-07T21:16:05.940" UserId="962" Comment="deleted 22 characters in body" Text="I'm 16 years old. **I'm planning my future career** and I'm standing on a doorstep and don't know **which way to go**. &#xD;&#xA;&#xD;&#xA;My dream was to create the best game ever. As I was growing up, I started to notice, how my passion for games didn't disappear for the whole 10 years and was/is still growing...&#xD;&#xA;Game development still seems too &quot;childish&quot; for my parents and for our family friends and they're stating that I should study something more serious.&#xD;&#xA;&#xD;&#xA;I don't exactly know what **I can do** and what I **want to do**. I know PHP, C++ (This year will be the second, when I'm learning this programming language at school), JavaScript and HTML. I had made many website designs, however, they weren't something you could actually call professional designs... I'm learning vector graphics, 3d modelling, music making... I tried to make a game several times, but I didn't accomplish anything yet... &#xD;&#xA;&#xD;&#xA;And... Well... Without a computer I can... Well, I can make pancakes... And... wash dishes I guess?&#xD;&#xA;&#xD;&#xA;I am writing a console based C++ game as my Summer Project for my school, which, I guess, will **be my first actual game** made from scratch (the other was a simple drag&amp;drop experiment in Game Maker 6).&#xD;&#xA;&#xD;&#xA;These **doubts** about what **I can actually do** can't let me decide whether I should study something related to game development...&#xD;&#xA;&#xD;&#xA;**So it would be great to know how to get rid of these doubts and have a stronger opinion in what career I want to follow** (game related or not)." />
  <row Id="29565" PostHistoryTypeId="4" PostId="13327" RevisionGUID="d502104e-a973-45af-8431-beb389c38a8e" CreationDate="2011-06-07T21:24:25.720" UserId="5135" Comment="edited title" Text="I need advice for my future career" />
  <row Id="29566" PostHistoryTypeId="2" PostId="13328" RevisionGUID="7dbd97a6-0cfc-4d52-8b41-725c6b3d2d77" CreationDate="2011-06-07T21:24:42.037" UserId="4828" Text="I don't work in game industry yet, but I think amount of finished projects can be important." />
  <row Id="29567" PostHistoryTypeId="2" PostId="13329" RevisionGUID="b0769f56-90a4-4938-b68b-2788996224f4" CreationDate="2011-06-07T21:27:36.097" UserId="6588" Text="You've already started so keep learning programming. Don't only learn about game programming, but work on some game projects. Don't tell your judgmental relatives that you're learning to make games, just tell them you're learning to program computers. Then when you graduate go work in a discipline of your choosing, maybe games or maybe not.&#xD;&#xA;&#xD;&#xA;&gt; So it would be great to know how to&#xD;&#xA;&gt; get rid of these doubts and have a&#xD;&#xA;&gt; stronger opinion in what career I want&#xD;&#xA;&gt; to follow&#xD;&#xA;&#xD;&#xA;You're 16. Don't worry about not being sure about your future career, just concentrate on learning as much as you can about as many different things as you can." />
  <row Id="29568" PostHistoryTypeId="2" PostId="13330" RevisionGUID="b4f0da74-c692-4479-9622-ec0fb2e89582" CreationDate="2011-06-07T21:53:05.773" UserId="4662" Text="If your parents think that game development is childish, you should point out that games make more money annually than films. Do they think that film creation would be childish? Games are art and entertainment, just like movies/music/books, and those are all plenty serious things to do.&#xD;&#xA;&#xD;&#xA;If you want a career in game development (programming by the sounds of things), then you will need a whole lot more formal education to get anywhere. In the meantime, the best thing to do would be to whack out completed projects." />
  <row Id="29569" PostHistoryTypeId="2" PostId="13331" RevisionGUID="9a27788c-e8fd-4698-ba76-f0ef7f6e17a1" CreationDate="2011-06-07T21:58:18.540" UserId="7328" Text="I'm now 20 and you are far passed me in your age (and maybe even passed beyond what I'm now), there are only two tips: read codes, write codes. just by doing these two and chalangeing yourself for better code with better performance with more reusability and ... everyday will lead you where you have never imagined. don't let other's oponios disappoint you. it's just they don't know what game making is.&#xD;&#xA;&#xD;&#xA;but it's too soon to be concerned about the your future career. at the very least you can have game developing as hobby even if your job isn't related to computers. and if i were you i would start with developing pc games, they are usually much more cheaper to start and is an easier platform to work on." />
  <row Id="29570" PostHistoryTypeId="5" PostId="13326" RevisionGUID="b818b55d-4a44-4510-993d-4a6a7c840c88" CreationDate="2011-06-07T22:00:10.253" UserId="5793" Comment="added 100 characters in body" Text="I'm experimenting on a small top-down space shooter where the player controls a ship and he can shoot bullets toward the direction of the mouse cursor. My question is how can I shoot the bullets with the angle given by the mouse cursor ? &#xD;&#xA;&#xD;&#xA;Currently my bullets are created with random &quot;angle values&quot; ranging from -10 to 10 to each the X and Y axis so that way their position values are augmented or diminished each update giving the illusion that they follow an angle. But that just gives me a bullet that gets shot in a random direction and I need to shoot them in a specific direction (towards the mouse cursor). &#xD;&#xA;&#xD;&#xA;I get the feeling I'm missing something here.&#xD;&#xA;&#xD;&#xA;**Edit :** To make things clearer I'm looking for ways to move the projectile alongside an angle" />
  <row Id="29571" PostHistoryTypeId="2" PostId="13332" RevisionGUID="48b73b79-95a2-471f-b2a4-69b0551eb86c" CreationDate="2011-06-07T22:03:46.783" UserId="2111" Text="If I understood your problem properly, you just want to shoot a bullet towards a mouse position. Here is how I would do:&#xD;&#xA;&#xD;&#xA;First of all, you must find the movement required for the bullet to get to the mouse, like so:&#xD;&#xA;&#xD;&#xA;    Vector2 movement = mousePosition - bulletStartPosition;&#xD;&#xA;&#xD;&#xA;Then, you should normalize it to have a vector with a length of 1 so that you can hold a vector which tells you in which direction to go, like so:&#xD;&#xA;&#xD;&#xA;    movement.Normalize();&#xD;&#xA;&#xD;&#xA;But here you have a little problem, if the direction is equal to `(0, 0)` (meaning that the mouse is on the bullet start position), then you'll divide by zero, so make sure you check for that with the last piece of code:&#xD;&#xA;&#xD;&#xA;    if (movement != Vector2.Zero)&#xD;&#xA;        movement.Normalize();&#xD;&#xA;&#xD;&#xA;So, you've got the movement required to move towards the mouse. You have to keep a `Vector2` within your bullet class which holds the `Direction` of the bullet.&#xD;&#xA;&#xD;&#xA;What's next? You have to actually move the bullet!&#xD;&#xA;&#xD;&#xA;In your bullet update code, do the following:&#xD;&#xA;&#xD;&#xA;    bullet.Position += bullet.Direction * bullet.Speed * gameTime.ElapsedGameTime.TotalSeconds; // multiply by delta seconds to keep a consistent speed on all computers.&#xD;&#xA;&#xD;&#xA;Where `bullet.Speed` is a float representing the bullet's speed in units per second.&#xD;&#xA;&#xD;&#xA;Basically, here are the things to change:&#xD;&#xA;&#xD;&#xA;Inside you bullet class, add a `float Speed` and a `Vector2 Direction`.&#xD;&#xA;&#xD;&#xA;When shooting, set your `bullet.Direction` to `mousePosition - bullet.Position` and safely normalize it (by checking for equality with `Vector2.Zero` first).&#xD;&#xA;&#xD;&#xA;When updating your bullet, do the following: `bullet.Position += bullet.Direction * bullet.Speed * gameTime.ElapsedGameTime.TotalSeconds;`.&#xD;&#xA;&#xD;&#xA;It should work." />
  <row Id="29572" PostHistoryTypeId="2" PostId="13333" RevisionGUID="3f282170-aa2c-4299-aeaf-a6af6f8c8023" CreationDate="2011-06-07T22:12:19.120" UserId="2332" Text="If you're having trouble calculating the angle, you can use this:&#xD;&#xA;&#xD;&#xA;    Vector2 target = mousePos - startPos;&#xD;&#xA;    float angle = Math.atan2( target.y, target.x );&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29573" PostHistoryTypeId="16" PostId="109" RevisionGUID="c7bf3e43-9c47-433f-b8ba-93d625b51453" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29574" PostHistoryTypeId="16" PostId="137" RevisionGUID="f3d76852-d155-4760-a11d-88e0fc6de947" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29575" PostHistoryTypeId="16" PostId="139" RevisionGUID="505041ed-13e9-4660-8a91-d6e2caf7a3a9" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29576" PostHistoryTypeId="16" PostId="140" RevisionGUID="1652859b-a34d-49f5-9c20-2cde42e7db98" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29577" PostHistoryTypeId="16" PostId="162" RevisionGUID="52c5973d-d129-4f38-9dcb-898d4a7e56a7" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29578" PostHistoryTypeId="16" PostId="174" RevisionGUID="fcab00d1-107e-4706-8255-64a82a4fcfae" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29579" PostHistoryTypeId="16" PostId="226" RevisionGUID="5881b746-da87-4404-af7b-50a900f8a627" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29580" PostHistoryTypeId="16" PostId="340" RevisionGUID="14b1cdb2-51f4-4e78-840d-0b22c952b66b" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29581" PostHistoryTypeId="16" PostId="367" RevisionGUID="a820281c-9af3-4290-a9ba-1d14094daaed" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29582" PostHistoryTypeId="16" PostId="375" RevisionGUID="fe1f9090-efb0-4a1b-9d9d-7c9bd1d7ae83" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29583" PostHistoryTypeId="16" PostId="705" RevisionGUID="5e465b6f-56f6-4c40-b918-83236a86ddaf" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29584" PostHistoryTypeId="16" PostId="3654" RevisionGUID="e8ed03d9-c633-45f9-8760-d78807e5ab36" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29585" PostHistoryTypeId="16" PostId="13322" RevisionGUID="915c2c9a-7785-4ec2-8657-64097e237512" CreationDate="2011-06-07T22:13:11.860" UserId="14" />
  <row Id="29588" PostHistoryTypeId="16" PostId="8440" RevisionGUID="56892b8a-bc29-42fd-a334-04ecae15a326" CreationDate="2011-06-07T22:17:25.997" UserId="14" />
  <row Id="29589" PostHistoryTypeId="16" PostId="8441" RevisionGUID="2e1b7dd1-8c2b-4a23-87e5-aa333d3cf1c9" CreationDate="2011-06-07T22:17:25.997" UserId="14" />
  <row Id="29590" PostHistoryTypeId="16" PostId="8460" RevisionGUID="d9787aad-e8b7-4d13-ad90-14b86287be20" CreationDate="2011-06-07T22:17:25.997" UserId="14" />
  <row Id="29591" PostHistoryTypeId="16" PostId="13321" RevisionGUID="f211c84b-49a3-4ee1-b950-7e60dfae8f64" CreationDate="2011-06-07T22:17:25.997" UserId="14" />
  <row Id="29592" PostHistoryTypeId="5" PostId="13330" RevisionGUID="2f788b1c-1ac6-410d-acab-f22f0f9f087e" CreationDate="2011-06-07T23:32:33.480" UserId="4662" Comment="added 130 characters in body" Text="If your parents think that game development is childish, you should point out that games make more money annually than films. Do they think that film creation would be childish? Games are art and entertainment, just like movies/music/books, and those are all plenty serious things to do.&#xD;&#xA;&#xD;&#xA;If you want a career in game development (programming by the sounds of things), then you will need a whole lot more formal education to get anywhere. In the meantime, the best thing to do would be to whack out completed projects. Completed is the operative word- prospective employers would want to see that you can finish a job and do the icky, un-fun parts." />
  <row Id="29593" PostHistoryTypeId="25" PostId="13327" RevisionGUID="c469dff1-13a2-44b0-8aad-a078389fea80" CreationDate="2011-06-08T00:14:31.147" Comment="http://twitter.com/#!/StackGameDev/status/78253532549099520" />
  <row Id="29594" PostHistoryTypeId="2" PostId="13334" RevisionGUID="2bf6a0a2-7043-4a9a-ba2e-9f15671a83bf" CreationDate="2011-06-08T01:53:33.190" UserId="7866" Text="calculating angles with x and y coordinates, meaning the mouse, is what trigonometry is all about. You can check it out here: http://en.wikipedia.org/wiki/Trigonometry " />
  <row Id="29595" PostHistoryTypeId="5" PostId="13331" RevisionGUID="d5009338-b6c7-4e94-83fc-845397311510" CreationDate="2011-06-08T01:59:29.093" UserId="2698" Comment="General editing. Correct me if I got the intent of your post wrong." Text="I'm now 20 and you are far passed me in your age (and maybe even passed beyond what I'm now), there are only two tips: read code, write code. Just by doing these two and challenging yourself to produce better code with better performance with more reusability and ... everyday will lead you where you have never imagined. Don't let other's opinions disappoint you. It's just they don't know what game making is.&#xD;&#xA;&#xD;&#xA;But it's too soon to be concerned about your future career. At the very least you can have game development as hobby even if your job isn't related to computers. If i were you I would start with developing PC games - they are usually much more cheaper to start and it's an easier platform to work on." />
  <row Id="29596" PostHistoryTypeId="24" PostId="13331" RevisionGUID="d5009338-b6c7-4e94-83fc-845397311510" CreationDate="2011-06-08T01:59:29.093" Comment="Proposed by 2698 approved by 3794 edit id of 477" />
  <row Id="29602" PostHistoryTypeId="2" PostId="13336" RevisionGUID="1f556764-2aa3-43d6-b279-51789d6d89ff" CreationDate="2011-06-08T02:39:18.577" UserId="5021" Text="I was going to draw my shadow map into one channel of a 16 bit texture and then draw a different shadow map into another channel of the same texture.&#xD;&#xA;&#xD;&#xA;I realized that this might not be possible to do efficiently since my targetted hardware (Xbox) does not support blending R16G16 formats. (Although the HDRBlendable might make it possible if I need a blendable format to do this.)&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Is it possible to mask one channel of a R16G16 texture on the Xbox? How do I do that?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29603" PostHistoryTypeId="1" PostId="13336" RevisionGUID="1f556764-2aa3-43d6-b279-51789d6d89ff" CreationDate="2011-06-08T02:39:18.577" UserId="5021" Text="Write to one channel of R16G16 texture on Xbox." />
  <row Id="29604" PostHistoryTypeId="3" PostId="13336" RevisionGUID="1f556764-2aa3-43d6-b279-51789d6d89ff" CreationDate="2011-06-08T02:39:18.577" UserId="5021" Text="&lt;xna-4.0&gt;&lt;hlsl&gt;" />
  <row Id="29605" PostHistoryTypeId="2" PostId="13337" RevisionGUID="c46ebd31-0497-4e4b-bc6e-bb96dd77321c" CreationDate="2011-06-08T02:49:54.663" UserId="5021" Text="No you can't mask a R16G16 channel in XNA.&#xD;&#xA;&#xD;&#xA;You can do it with a blendable format though, in my case, to use floating point the best I can do is to use HDRBlendable (R10G10B10A10 on the Xbox), and set ColorWriteChannels in the blendstate used appropriately, e.g.:&#xD;&#xA;&#xD;&#xA;        myBlendState = new BlendState() &#xD;&#xA;        { &#xD;&#xA;            AlphaSourceBlend = Blend.One, &#xD;&#xA;            ColorSourceBlend = Blend.One, &#xD;&#xA;            AlphaDestinationBlend = Blend.Zero, &#xD;&#xA;            ColorDestinationBlend = Blend.Zero, &#xD;&#xA;            ColorWriteChannels = ColorWriteChannels.Red &#xD;&#xA;        }; " />
  <row Id="29606" PostHistoryTypeId="25" PostId="13310" RevisionGUID="9ba75ded-6672-4c3e-a7da-30143cdd941d" CreationDate="2011-06-08T03:14:31.807" Comment="http://twitter.com/#!/StackGameDev/status/78298833179787265" />
  <row Id="29607" PostHistoryTypeId="2" PostId="13338" RevisionGUID="a6f1d2a5-bf05-40a9-bfe6-463990ff7154" CreationDate="2011-06-08T03:57:26.940" UserId="7630" Text="At 16 I thought I knew a lot about where I wanted to go, and it turned out I didn't.  I was very good with computers, but there wasn't a lot of support around (I was in high school from '91-'95).  I got involved with a lot of things, like you have, learned and kept on learning.&#xD;&#xA;&#xD;&#xA;After high school I went out and worked in a few different fields and discovered that I still really had a passion for programming and lots of ideas I thought would make fun games.  I also knew that I was lacking a proper background in this stuff :-)  I chose to go for a computer science degree, and went back at 27 to get it.&#xD;&#xA;&#xD;&#xA;What I didn't realize at that time was how much more I was going to learn about a ton of things I probably wouldn't have otherwise.  I worked on compilers and math libraries as a research assistant, and though I will probably never do that again, I gained a lot of insight into things that affect the way I program today.&#xD;&#xA;&#xD;&#xA;If I could give you only a few tips, it would go like this:&#xD;&#xA; - keep yourself general, and try to learn as much as you can&#xD;&#xA; - don't give up on math, because there are big payoffs that you won't see until&#xD;&#xA;   way after you're done those courses&#xD;&#xA; - school is way easier to do if you do it at the &quot;right&quot; age... you get more support&#xD;&#xA;   to help you succeed than trying to go back and do it&#xD;&#xA; - get involved with a project you enjoy and learn to be part of a team... every day&#xD;&#xA;   I hang around on stackoverflow I realize how much I don't know, and I think I'm&#xD;&#xA;   not bad at this :)&#xD;&#xA; - start and more importantly finish a few *small* projects... I wrote BBS games and&#xD;&#xA;   both loved and hated it.  The few small projects I'm working on now might one day&#xD;&#xA;   grow into something larger, but I can enjoy the process because they wrap up and&#xD;&#xA;   get released.&#xD;&#xA; - the difference between game physics and real physics is usually a question of&#xD;&#xA;   precision ... the line on where is close enough moves, but the principals are the same&#xD;&#xA; - get out and do some non-game non-computer things too&#xD;&#xA;&#xD;&#xA;I'm working today as a software developer, not in gaming, but I still do game design on the side and hope to head that way one day soon.  The work I do isn't going to make any miracles appear but it's challenging and engaging.  It's a LOT better than most of the other jobs I've ever had and pays better :-)&#xD;&#xA;&#xD;&#xA;If you enjoy it, computer science or software engineering can take you a long long way, regardless if you ever write a game or not.&#xD;&#xA;&#xD;&#xA;Hope this helps, sorry about the length" />
  <row Id="29608" PostHistoryTypeId="2" PostId="13339" RevisionGUID="4d7bdc91-80e4-4d39-a2ec-a5806c8ff7a2" CreationDate="2011-06-08T04:02:40.090" UserId="6403" Text="I have a pretty decent experience with tile based 2d games and I would like to try to create a mixed 3d-2d game. To 3d elements will be very simple (ground, walls and water), all other elements will be 2d sprites drawn onto this 3d map. (I am envisioning something similar to Final Fantasy III for iPad, top down view, always the same angle)&#xD;&#xA;&#xD;&#xA;Now, here is my question: What are the technical aspects of implementing a 3d tile engine? Are there some good examples on how to do this? Basically I would like to create the maps the same way that I would do in a 2d tile based game." />
  <row Id="29609" PostHistoryTypeId="1" PostId="13339" RevisionGUID="4d7bdc91-80e4-4d39-a2ec-a5806c8ff7a2" CreationDate="2011-06-08T04:02:40.090" UserId="6403" Text="Implementing a 3d tile engine" />
  <row Id="29610" PostHistoryTypeId="3" PostId="13339" RevisionGUID="4d7bdc91-80e4-4d39-a2ec-a5806c8ff7a2" CreationDate="2011-06-08T04:02:40.090" UserId="6403" Text="&lt;3d&gt;&lt;architecture&gt;&lt;tiles&gt;" />
  <row Id="29611" PostHistoryTypeId="25" PostId="13339" RevisionGUID="504fbba0-f554-4a53-96df-6bd56df83ede" CreationDate="2011-06-08T06:14:31.820" Comment="http://twitter.com/#!/StackGameDev/status/78344132753498112" />
  <row Id="29612" PostHistoryTypeId="2" PostId="13340" RevisionGUID="450c10fb-af5e-466c-bda4-f3ac2f17c476" CreationDate="2011-06-08T06:20:03.763" UserId="7869" Text="I'm not sure, but I think games like UT2K4 might use logic like this:  &#xD;&#xA;&lt;!-- language: lang-cpp --&gt;&#xD;&#xA;    if (jumped already &amp;&amp; !doubled jumped yet &amp;&amp; !touching ground &amp;&amp; velocity.up is approximately 0.0f) DoDoubleJump();  &#xD;&#xA;  &#xD;&#xA;Where up is your y or z component (Depending on which one is up)  &#xD;&#xA;This means that your player can only do a double jump when they are at the maximum height of their first jump and are just about to start come down again.  &#xD;&#xA;I like this method because it creates a little bit of skill (You have to time it to happen inside of &quot;velocity.up is approximately 0.0f&quot;).  &#xD;&#xA;Depending on what you want, you could bias &quot;approximately 0.0f&quot; towards positive numbers so they can only double jump when still moving up for example." />
  <row Id="29613" PostHistoryTypeId="2" PostId="13341" RevisionGUID="b43fee68-d635-487d-9a3a-edc6a3c919c1" CreationDate="2011-06-08T07:00:20.460" UserId="2792" Text="A lot of architecture information hare hidden behind NDA:s so it might be hard to give a good answer accurate to the current state. You might want to read [this][1] nvidia article that describes how the GeForce 6 works.&#xD;&#xA;&#xD;&#xA;Of course a lot has changed since, vertex/fragment units have been unified and can be load balanced, but the overall architecture (that you need to know about for writing general apps) is pretty much the same. More shading stages has been added, and a few more fixed function steps (tesselator etc.) These works very much the same way as the steps in the nvidia article, except that they pull computation resources from a pool of units.&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter30.html &quot;The GeForce 6 Series GPU Architecture&quot;" />
  <row Id="29614" PostHistoryTypeId="5" PostId="13278" RevisionGUID="9c5e7155-b4d8-4a82-a3e3-0c6855cbb62e" CreationDate="2011-06-08T07:03:56.090" UserId="7855" Comment="formatting text" Text="I am very new here... Sorry for any mistakes in asking my question.Just now I found  [MobiForms][1]. I am planning to create a game for the iPhone using it.My problem is I know only Objective-C and I have designed only one app (which is also game) that's currently in the app store. Can I use MobiForms for game development?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobiforms.com/" />
  <row Id="29615" PostHistoryTypeId="2" PostId="13342" RevisionGUID="b347534b-4dac-4248-b7eb-f87843b7826e" CreationDate="2011-06-08T07:33:47.403" UserId="7870" Text="I am trying to load premade .xnb files with the content pipeline.&#xD;&#xA;when I call contentManager.Load&lt;model&gt;(&quot;myModel&quot;); , which I have a &quot;myModel.xnb&quot; file for in the corresponding directory, It crashes with: &quot;Error loading &quot;grass_0&quot;. File not found.&quot;. Does anyone know why it could be adding a &quot;_0&quot; to the name?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="29616" PostHistoryTypeId="1" PostId="13342" RevisionGUID="b347534b-4dac-4248-b7eb-f87843b7826e" CreationDate="2011-06-08T07:33:47.403" UserId="7870" Text="Loading premade .xnb files with content manger" />
  <row Id="29617" PostHistoryTypeId="3" PostId="13342" RevisionGUID="b347534b-4dac-4248-b7eb-f87843b7826e" CreationDate="2011-06-08T07:33:47.403" UserId="7870" Text="&lt;xna&gt;" />
  <row Id="29620" PostHistoryTypeId="5" PostId="13342" RevisionGUID="aab3734f-e3a5-4b2a-b253-4a82137f5150" CreationDate="2011-06-08T07:50:46.213" UserId="2698" Comment="Minor improvements" Text="I am trying to load premade .xnb files with the content pipeline.&#xD;&#xA;when I call `contentManager.Load&lt;model&gt;(&quot;myModel&quot;);`, for which I have a &quot;myModel.xnb&quot; file in the corresponding directory, it crashes with: &quot;Error loading &quot;grass_0&quot;. File not found.&quot;&#xD;&#xA;&#xD;&#xA;Does anyone know why it could be adding a &quot;_0&quot; to the name?" />
  <row Id="29621" PostHistoryTypeId="24" PostId="13342" RevisionGUID="aab3734f-e3a5-4b2a-b253-4a82137f5150" CreationDate="2011-06-08T07:50:46.213" Comment="Proposed by 2698 approved by 7870 edit id of 478" />
  <row Id="29622" PostHistoryTypeId="5" PostId="13342" RevisionGUID="0dc2ac23-e73d-48fa-87cc-b5351182b00f" CreationDate="2011-06-08T07:58:10.557" UserId="7870" Comment="Cleared up some details" Text="I am trying to load premade .xnb files with the content pipeline.&#xD;&#xA;when I call `contentManager.Load&lt;model&gt;(&quot;grass&quot;);`, for which I have a &quot;grass.xnb&quot; file in the corresponding directory, it crashes with: &quot;Error loading &quot;grass_0&quot;. File not found.&quot;&#xD;&#xA;&#xD;&#xA;The grass.xnb file was created using a MSBuild wrapper to build the .fbx files.&#xD;&#xA;I initialized the content manager with : &#xD;&#xA;`contentManager = new ContentManager(mainXnaWindow.Services, projectFileOpen + &quot;../Assets/XNB/&quot;));`&#xD;&#xA;I am pretty sure the content manager has the right directory, because when I deleted &quot;grass.xnb&quot; from the directory, It just told me &quot;Error loading &quot;grass&quot; File not found&quot;&#xD;&#xA;&#xD;&#xA;Does anyone know why it could be adding a &quot;_0&quot; to the name?" />
  <row Id="29623" PostHistoryTypeId="2" PostId="13344" RevisionGUID="ee17217e-40fa-444b-b688-ebc0b3764dcc" CreationDate="2011-06-08T08:00:08.573" UserId="7591" Text="In my cocos2d iphone project I have one major layer, the game layer. When the user presses the pause button the scene is paused and another scene is pushed onto it, the pause scene. &#xD;&#xA;&#xD;&#xA;    [[CCDirector sharedDirector] pushScene:[PauseLayer node]];&#xD;&#xA;&#xD;&#xA;I realize the pause scene as a CCLayerColor. I want the layer to be transparent but I can't set both color and opacity. The layer is always black, although I can see my menu on it.&#xD;&#xA;&#xD;&#xA;    self = [super initWithColor:ccc4(255, 255, 255, 50)]&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="29624" PostHistoryTypeId="1" PostId="13344" RevisionGUID="ee17217e-40fa-444b-b688-ebc0b3764dcc" CreationDate="2011-06-08T08:00:08.573" UserId="7591" Text="CCLayerColor gets black when pushed onto the current scene" />
  <row Id="29625" PostHistoryTypeId="3" PostId="13344" RevisionGUID="ee17217e-40fa-444b-b688-ebc0b3764dcc" CreationDate="2011-06-08T08:00:08.573" UserId="7591" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="29626" PostHistoryTypeId="2" PostId="13345" RevisionGUID="1df5c733-3973-4d29-a6e0-29370b361c88" CreationDate="2011-06-08T08:13:14.697" UserId="1156" Text="I'm in the same position.&#xD;&#xA;&#xD;&#xA;You should have no problems as long as you avoid these 'game development' degrees. They are too specific - if that fails, you cannot get another software job without CS - and probably your parents will consider it a waste of money. From what I've heard, the content isn't much good either. Go for a Computer Science degree.&#xD;&#xA;&#xD;&#xA;Also, **finish a game.** Maybe a bit of backstory, but I was always pulling off projects too big for me. I have never finished a game, through 5 years of programming on and off. However, I've finally knuckled down to trying to make one, and my level of motivation has shot up to the stage where I'm coding over playing games because I want to, not because I feel I should (I still enjoyed it, but I would've preferred to play the games)." />
  <row Id="29627" PostHistoryTypeId="2" PostId="13346" RevisionGUID="5c61df65-dbcd-43e7-8fdd-ab2c08a2b105" CreationDate="2011-06-08T08:25:28.617" UserId="7697" Text="I'm not aware of any hardware-level design documentation, but there's plenty of information publicly available on hardware interfaces and behaviors that might help you out.&#xD;&#xA;&#xD;&#xA;AMD has programming information for their GPUs available on their developer portal, which in turn explains how the hardware works in a high level way.&#xD;&#xA;&#xD;&#xA;The Direct3D documentation from Microsoft also fairly clearly explains at a high level how the 3D pipeline used by basically all GPUs works.&#xD;&#xA;&#xD;&#xA;Finally, you can also look at Mesa3D, which is a complete Open Source implementation of software OpenGL, which basically means an &quot;emulator&quot; for a generic modern GPU.  (Plus Mesa includes hardware drivers for many modern GPUs, including most AMD and some NVIDIA GPUs, which you could also study if the public documentation isn't enough for you.)" />
  <row Id="29628" PostHistoryTypeId="2" PostId="13347" RevisionGUID="5fb40edd-dabf-4a63-a299-edcd1bbc39cd" CreationDate="2011-06-08T08:30:21.900" UserId="5473" Text="Learn how to write a custom camera. A camera simply translates 3D coordinates in world space, into 2D screen space. (It also performs view culling.) Then you can draw your billboard sprites at those particular coordinates. This is a common pattern and learning resources abound.&#xD;&#xA;&#xD;&#xA;I wrote a generalised version of this, a pseudo-3d tile engine that allows arbitrary rotation, tilt and zoom in real time using only affine transformation to create wall and floor perspectives, respectively. In this generalised version, the transformations and depth ordering were the hardest. Particularly if you plan a multi-storey approach, depth ordering will take a bit of time. In my case I used transformations for walls and floor specifically because I didn't want to be concerned with drawing angled tiles. In that sense, mine are more like textures than tiles. You might consider the benefits of this." />
  <row Id="29629" PostHistoryTypeId="2" PostId="13348" RevisionGUID="238e1874-99a5-4a6b-92ee-2f941426ab29" CreationDate="2011-06-08T08:31:47.907" UserId="7328" Text="when you are changing the scene, no function is called from your gameScene so CCLayerColor draw itself on a black screen. to solve this you have to either not change the scene or add your game scene to the background layer of puase scene. ar you can also override pause scene draw method and call [gamescene draw] inside it." />
  <row Id="29630" PostHistoryTypeId="5" PostId="13341" RevisionGUID="d498d1db-48f6-4823-a17e-1d0d6d06eec1" CreationDate="2011-06-08T08:34:26.673" UserId="2792" Comment="Added section about AMD specifications." Text="A lot of architecture information hare hidden behind NDA:s so it might be hard to give a good answer accurate to the current state. You might want to read [this][1] nvidia article that describes how the GeForce 6 works.&#xD;&#xA;&#xD;&#xA;Of course a lot has changed since, vertex/fragment units have been unified and can be load balanced, but the overall architecture (that you need to know about for writing general apps) is pretty much the same. More shading stages has been added, and a few more fixed function steps (tesselator etc.) These works very much the same way as the steps in the nvidia article, except that they pull computation resources from a pool of units.&#xD;&#xA;&#xD;&#xA;As said by seanmiddleditch in his answer, AMD has released a lot of specifications of their chips. You can find them [here][2]. Especially the [Radeon R6xx/R7xx Acceleration][3] PDF should be of interest to you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter30.html &quot;The GeForce 6 Series GPU Architecture&quot;&#xD;&#xA;  [2]: http://www.x.org/docs/AMD/ &quot;X.org repository of AMD specifications&quot;&#xD;&#xA;  [3]: http://www.x.org/docs/AMD/R6xx_R7xx_3D.pdf &quot;Radeon R6xx/R7xx Acceleration&quot;" />
  <row Id="29631" PostHistoryTypeId="5" PostId="13342" RevisionGUID="3fbe5321-7e09-4fc6-83eb-561bb45a0471" CreationDate="2011-06-08T08:45:10.840" UserId="7870" Comment="Put in solution." Text="I am trying to load premade .xnb files with the content pipeline.&#xD;&#xA;when I call `contentManager.Load&lt;model&gt;(&quot;grass&quot;);`, for which I have a &quot;grass.xnb&quot; file in the corresponding directory, it crashes with: &quot;Error loading &quot;grass_0&quot;. File not found.&quot;&#xD;&#xA;&#xD;&#xA;The grass.xnb file was created using a MSBuild wrapper to build the .fbx files.&#xD;&#xA;I initialized the content manager with : &#xD;&#xA;`contentManager = new ContentManager(mainXnaWindow.Services, projectFileOpen + &quot;../Assets/XNB/&quot;));`&#xD;&#xA;I am pretty sure the content manager has the right directory, because when I deleted &quot;grass.xnb&quot; from the directory, It just told me &quot;Error loading &quot;grass&quot; File not found&quot;&#xD;&#xA;&#xD;&#xA;Does anyone know why it could be adding a &quot;_0&quot; to the name?&#xD;&#xA;&#xD;&#xA;Edit: I forgot to include a built version of th texture associated with it. Problem Solved." />
  <row Id="29632" PostHistoryTypeId="25" PostId="13344" RevisionGUID="ffb9ba96-aea3-4895-975f-0d4e8aaa91cf" CreationDate="2011-06-08T09:14:32.240" Comment="http://twitter.com/#!/StackGameDev/status/78389431077318656" />
  <row Id="29633" PostHistoryTypeId="5" PostId="13337" RevisionGUID="1cceca2c-0976-417f-9bf4-f77ad755c96d" CreationDate="2011-06-08T10:41:48.543" UserId="5021" Comment="added 2 characters in body" Text="No you can't mask a R16G16 channel in XNA.&#xD;&#xA;&#xD;&#xA;You can do it with a blendable format though, in my case, to use floating point the best you can do is to use HDRBlendable (R10G10B10A10 on the Xbox), and set ColorWriteChannels in the blendstate used appropriately, e.g.:&#xD;&#xA;&#xD;&#xA;        myBlendState = new BlendState() &#xD;&#xA;        { &#xD;&#xA;            AlphaSourceBlend = Blend.One, &#xD;&#xA;            ColorSourceBlend = Blend.One, &#xD;&#xA;            AlphaDestinationBlend = Blend.Zero, &#xD;&#xA;            ColorDestinationBlend = Blend.Zero, &#xD;&#xA;            ColorWriteChannels = ColorWriteChannels.Red &#xD;&#xA;        }; " />
  <row Id="29634" PostHistoryTypeId="2" PostId="13349" RevisionGUID="d71f5478-90cb-4034-8edb-c2d1b03b987a" CreationDate="2011-06-08T12:03:21.313" UserId="7876" Text="I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong).&#xD;&#xA;All entity positions etc etc are chunk relevant and so there is no limit there.&#xD;&#xA;&#xD;&#xA;The problem I'm having is how to store and access these chunks without having thousands of files. Any ideas for a preferably quick &amp; low HD cost archive format that doesn't need to open everything at once?" />
  <row Id="29635" PostHistoryTypeId="1" PostId="13349" RevisionGUID="d71f5478-90cb-4034-8edb-c2d1b03b987a" CreationDate="2011-06-08T12:03:21.313" UserId="7876" Text="A way to store potentially infinite 2D map data?" />
  <row Id="29636" PostHistoryTypeId="3" PostId="13349" RevisionGUID="d71f5478-90cb-4034-8edb-c2d1b03b987a" CreationDate="2011-06-08T12:03:21.313" UserId="7876" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;&lt;maps&gt;&lt;platformer&gt;" />
  <row Id="29637" PostHistoryTypeId="2" PostId="13350" RevisionGUID="6690c397-b547-46e2-a392-8aa0aec5cdc7" CreationDate="2011-06-08T12:09:15.580" UserId="747" Text="Is there any way you can partition chunks (some kind of 'subcontinents / countries' in you world) ? So maybe you can have some kind of index files that let you quickly find which sub-file / part of bigger file you need to load to have a chunk in memory ... " />
  <row Id="29638" PostHistoryTypeId="25" PostId="13349" RevisionGUID="3c3a4bae-0a4c-40ce-8985-5d687e10434a" CreationDate="2011-06-08T12:14:32.917" Comment="http://twitter.com/#!/StackGameDev/status/78434735277342720" />
  <row Id="29639" PostHistoryTypeId="5" PostId="13337" RevisionGUID="e060bea1-798f-40f7-8ab8-8779947844fb" CreationDate="2011-06-08T12:32:48.417" UserId="5021" Comment="deleted 1 characters in body" Text="No you can't mask a R16G16 channel in XNA.&#xD;&#xA;&#xD;&#xA;You can do it with a blendable format though, in my case, to use floating point the best you can do is to use HDRBlendable (R10G10B10A2 on the Xbox), and set ColorWriteChannels in the blendstate used appropriately, e.g.:&#xD;&#xA;&#xD;&#xA;        myBlendState = new BlendState() &#xD;&#xA;        { &#xD;&#xA;            AlphaSourceBlend = Blend.One, &#xD;&#xA;            ColorSourceBlend = Blend.One, &#xD;&#xA;            AlphaDestinationBlend = Blend.Zero, &#xD;&#xA;            ColorDestinationBlend = Blend.Zero, &#xD;&#xA;            ColorWriteChannels = ColorWriteChannels.Red &#xD;&#xA;        }; " />
  <row Id="29640" PostHistoryTypeId="2" PostId="13351" RevisionGUID="aee2793c-215a-44eb-98ad-c657689c3a99" CreationDate="2011-06-08T12:32:49.937" UserId="1156" Text="You could take the idea from Minecraft. Originally they had a file per chunk. Now they use the MCRegion format, which groups chunks into 32x32 areas and stores one of those per file." />
  <row Id="29641" PostHistoryTypeId="2" PostId="13352" RevisionGUID="96eb41ef-0ea5-43e3-adc9-ad9a9815e751" CreationDate="2011-06-08T12:36:41.257" UserId="2437" Text="I'm coding a little casual game in Java using Slick2D. &#xD;&#xA;&#xD;&#xA;This game use a lot of different &quot;objects&quot;, managed in a composite way. So, firearms, furniture in the map, NPC and player character will be composites objects using components to define their behaviors.&#xD;&#xA;&#xD;&#xA;Since I'm going to need a lot of, for instance, &quot;shotgun&quot; object, I'm using a sort of prototype pattern. When the player starts the game, XML files are read, and from those XML, typical objects are built and stored in a &quot;EntityPool&quot; class' hashtable. Then, when I'll need a shotgun, for instance, I'll ask for it to the EntityPool, which will give me a clone of this object.&#xD;&#xA;&#xD;&#xA;My problem is as follow : I'm using JDOM to parse my XML. I don't know how many components I'm going to use, nor their exact methods. So I'd like to use reflexivity ; a Class.forName(nameOfMyClass) in order to get the exact component for this class, and then a Class.getMethod(&quot;set&quot; + propertyName) to fill the information I need.&#xD;&#xA;&#xD;&#xA;So my XML can be like that :&#xD;&#xA;&#xD;&#xA;    &lt;Entity name=&quot;window&quot;&gt;&#xD;&#xA;      &lt;Component class=&quot;Breakable&quot;&gt;&#xD;&#xA;        &lt;health&gt;12&lt;/health&gt;&#xD;&#xA;        &lt;newEntityAfterBeingBroken&gt;brokenWindow&lt;newEntityAfterBeingBroken&gt;&#xD;&#xA;      &lt;/Component&gt;&#xD;&#xA;      &lt;Component class=&quot;Renderer&quot;&gt;&#xD;&#xA;         &lt;tileset&gt;object.png&lt;/tileset&gt;&#xD;&#xA;         &lt;imgnum&gt;2&lt;/imgnum&gt;&#xD;&#xA;      &lt;/Component&gt;&#xD;&#xA;    &lt;/Entity&gt;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;There are obvious drawbacks to using reflexivity, particularly the lack in performances. But this is done only once, when loading the game. Do you see other problems with this method ? Would you do it differently, and how ? Thanks in advance for your advices !" />
  <row Id="29642" PostHistoryTypeId="1" PostId="13352" RevisionGUID="96eb41ef-0ea5-43e3-adc9-ad9a9815e751" CreationDate="2011-06-08T12:36:41.257" UserId="2437" Text="Drawbacks of using reflexity for a component based system at loading-time" />
  <row Id="29643" PostHistoryTypeId="3" PostId="13352" RevisionGUID="96eb41ef-0ea5-43e3-adc9-ad9a9815e751" CreationDate="2011-06-08T12:36:41.257" UserId="2437" Text="&lt;java&gt;&lt;component-based&gt;&lt;xml&gt;" />
  <row Id="29644" PostHistoryTypeId="2" PostId="13353" RevisionGUID="f134745d-1598-474a-8b76-3a88a911cc98" CreationDate="2011-06-08T12:47:36.860" UserId="7878" Text="Is there any list of game names anywhere, so i can choose a name for my game and avoid (legal) conflicts with other games as much as possible?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29645" PostHistoryTypeId="1" PostId="13353" RevisionGUID="f134745d-1598-474a-8b76-3a88a911cc98" CreationDate="2011-06-08T12:47:36.860" UserId="7878" Text="List of all games names?" />
  <row Id="29646" PostHistoryTypeId="3" PostId="13353" RevisionGUID="f134745d-1598-474a-8b76-3a88a911cc98" CreationDate="2011-06-08T12:47:36.860" UserId="7878" Text="&lt;legal&gt;&lt;game-industry&gt;" />
  <row Id="29647" PostHistoryTypeId="2" PostId="13354" RevisionGUID="f0e11832-bc54-485a-88a3-4d394216c70e" CreationDate="2011-06-08T12:56:48.923" UserId="364" Text="I'm not sure if it's complete but I guess you can complete it yourself if you want/need: &#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Lists_of_video_games&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Looks like there are TONS of pages *__*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For your licence problem, **a google search might be more useful**." />
  <row Id="29648" PostHistoryTypeId="2" PostId="13355" RevisionGUID="2cd19fb2-bd32-460f-8a88-445e9779849f" CreationDate="2011-06-08T13:03:37.580" UserId="7173" Text="Create a custom map format for your game. It's easier than you might think.&#xD;&#xA;Just use the BinaryWriter class.&#xD;&#xA;First write the header in a few ints or uints. Information to include in the header:&#xD;&#xA;&#xD;&#xA;- The magic string / magic number of you file format.&#xD;&#xA;- The start/end/size of the chunks described in this file&#xD;&#xA;&#xD;&#xA;and also (and here comes the performance critical part&#xD;&#xA;&#xD;&#xA;- ints that describe the starting position inside the file. So you don't have to search for specific chunks.&#xD;&#xA;&#xD;&#xA;With the above methode you can (and should) create an index of your files contents, containing some sort of description(a user specified name for the region/chunk, or just the coordinates) and as a second value the position in the file.&#xD;&#xA;&#xD;&#xA;Then, when you want to load a specific chunk, you'll just have to search inside the index. When you got the position just set fileStream.Position = PositionOfChunkFromIndex&#xD;&#xA;and you can load it.&#xD;&#xA;&#xD;&#xA;It's all about the design of the fileformat with the header describing the contents of the file most efficiently.&#xD;&#xA;&#xD;&#xA;Just save the files with a custom extension you made up and there you go.&#xD;&#xA;&#xD;&#xA;BONUS: Add BZip2 compression to specific regions of the file / the whole contents (not the header!!), so you can unpack specific chunks from the file, for a very small memory footprint." />
  <row Id="29649" PostHistoryTypeId="2" PostId="13356" RevisionGUID="0c9791db-674f-42db-bfd7-f2d4d67eba22" CreationDate="2011-06-08T13:09:27.640" UserId="1156" Text="There is a much easier way around this: go onto Google, or your favourite search engine, and search for `&lt;yourgamenamehere&gt; game`. If nothing comes up, it either a) does not exist, or b)is too obscure to worry about - it could be a small open source project that was abandoned for example. " />
  <row Id="29652" PostHistoryTypeId="2" PostId="13358" RevisionGUID="86ef4646-ccfd-40bd-ab19-38d27f531ca2" CreationDate="2011-06-08T13:18:30.557" UserId="3630" Text="Thanks for your answers, I just find some articles related to this problem :  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- After set 'wmode' to 'direct', the screen-tearing problem is resolved, see [Help me test! Flash VSync and Screen Tearing.][1]&#xD;&#xA;&#xD;&#xA;- And the screen jitter is caused by using fixed timestep without interpolation, see &#xD;&#xA;[Fixed time step vs Variable time step][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unitzeroone.com/blog/2009/11/30/help-me-test-flash-vsync-and-screen-tearing/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="29653" PostHistoryTypeId="6" PostId="13352" RevisionGUID="f519483d-b282-4751-9043-3f90397db89f" CreationDate="2011-06-08T13:21:59.060" UserId="1156" Comment="edited tags; deleted 4 characters in body; edited title" Text="&lt;java&gt;&lt;component-based&gt;&lt;xml&gt;&lt;entity-system&gt;&lt;data-driven&gt;" />
  <row Id="29654" PostHistoryTypeId="2" PostId="13359" RevisionGUID="a87084d7-6965-46a2-9bce-03418eeb107f" CreationDate="2011-06-08T13:22:32.060" UserId="7844" Text="I have 3 suggestions for you besides just computer science&#xD;&#xA;&#xD;&#xA;&lt;p&gt;Math, math, and math. &lt;/p&gt;&lt;p&gt; If you go computer science you will probably only be required to learn some college algebra maybe calc 1.  I really never applied calc in real life until i started doing games.  Even when I was doing engineering work most of what I did was college algebra or geometry.&lt;br/&gt;&#xD;&#xA;Take some business math as well, especially Statistics.  After the physics and graphics gamers love statistics.  Statistics will also be important when you are trying to balance a game.  Understanding and considering them ahead of time when building your game will save you trouble in the long run.&lt;/p&gt;&#xD;&#xA;" />
  <row Id="29655" PostHistoryTypeId="5" PostId="13352" RevisionGUID="f519483d-b282-4751-9043-3f90397db89f" CreationDate="2011-06-08T13:21:59.060" UserId="1156" Comment="edited tags; deleted 4 characters in body; edited title" Text="I'm coding a little casual game in Java using Slick2D. &#xD;&#xA;&#xD;&#xA;This game use a lot of different &quot;objects&quot;, managed in a composite way. So, firearms, furniture in the map, NPC and player character will be composites objects using components to define their behaviors.&#xD;&#xA;&#xD;&#xA;Since I'm going to need a lot of, for instance, &quot;shotgun&quot; object, I'm using a sort of prototype pattern. When the player starts the game, XML files are read, and from those XML, typical objects are built and stored in a &quot;EntityPool&quot; class' hashtable. Then, when I'll need a shotgun, for instance, I'll ask for it to the EntityPool, which will give me a clone of this object.&#xD;&#xA;&#xD;&#xA;My problem is as follow : I'm using JDOM to parse my XML. I don't know how many components I'm going to use, nor their exact methods. So I'd like to use reflection; a `Class.forName(nameOfMyClass)` in order to get the exact component for this class, and then a `Class.getMethod(&quot;set&quot; + propertyName)` to fill the information I need.&#xD;&#xA;&#xD;&#xA;So my XML can be like that :&#xD;&#xA;&#xD;&#xA;    &lt;Entity name=&quot;window&quot;&gt;&#xD;&#xA;      &lt;Component class=&quot;Breakable&quot;&gt;&#xD;&#xA;        &lt;health&gt;12&lt;/health&gt;&#xD;&#xA;        &lt;newEntityAfterBeingBroken&gt;brokenWindow&lt;newEntityAfterBeingBroken&gt;&#xD;&#xA;      &lt;/Component&gt;&#xD;&#xA;      &lt;Component class=&quot;Renderer&quot;&gt;&#xD;&#xA;         &lt;tileset&gt;object.png&lt;/tileset&gt;&#xD;&#xA;         &lt;imgnum&gt;2&lt;/imgnum&gt;&#xD;&#xA;      &lt;/Component&gt;&#xD;&#xA;    &lt;/Entity&gt;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;There are obvious drawbacks to using reflection, particularly the lack in performance. But this is done only once, when loading the game. Do you see other problems with this method? Would you do it differently, and how? Thanks in advance for your advice!" />
  <row Id="29656" PostHistoryTypeId="4" PostId="13352" RevisionGUID="f519483d-b282-4751-9043-3f90397db89f" CreationDate="2011-06-08T13:21:59.060" UserId="1156" Comment="edited tags; deleted 4 characters in body; edited title" Text="Drawbacks of using reflection for a component based system at loading-time" />
  <row Id="29657" PostHistoryTypeId="2" PostId="13360" RevisionGUID="6e45b323-ecc0-4a7c-b66c-c312a33b0252" CreationDate="2011-06-08T13:29:24.610" UserId="1156" Text="There is a slight loss in performance in using reflection in general, but if you claim it is only going to happen during loading you should have no problems (I can't say for Java, but I have seen benchmarks putting reflection at 10 million queries in 3 seconds in C#). Terraria has the slowest loading times I've ever seen (painfully slow), and that has been incredibly successful - thus showing slow loading times aren't a problem as long as your game meets standards.&#xD;&#xA;&#xD;&#xA;It has the advantage of making everything much more flexible - no `Register` methods to remember to call, no dictionary keys to add..you can just plug and play.&#xD;&#xA;&#xD;&#xA;The problem I can see in your design is that you will have to create one of every object at loading time. If you have 200,000 different objects, that's a lot of wasted memory. I personally am using a Factory method for mine, like:&#xD;&#xA;&#xD;&#xA;`Entity e = Entity.Create(&quot;shotgun&quot;); //load up the file and do it on the fly rather than at loading time`&#xD;&#xA;&#xD;&#xA;I may switch to just loading the XML into memory and arranging it as commands - XML is not hugely fast to load." />
  <row Id="29658" PostHistoryTypeId="5" PostId="13354" RevisionGUID="36895279-0066-4457-aa23-d507cb8eb325" CreationDate="2011-06-08T13:37:18.043" UserId="364" Comment="added 527 characters in body" Text="I'm not sure if it's complete but I guess you can complete it yourself if you want/need: &#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Lists_of_video_games&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Looks like there are TONS of pages *__*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For your licence problem, **a google search might be more useful**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, from comments :&#xD;&#xA;&#xD;&#xA;I think the only thing you can do to make sure you got a licence not registered is to register it. The laws of different countries and other things makes it hard to check if you have legal rights on a licence you're creating a name for. If you can't find anything on google, check again, check variants. Then if you don't find, maybe try a legal move. They will tell you if it's already taken. Or they should. &#xD;&#xA;&#xD;&#xA;Contact a lawyer for details relative to your country laws and international laws." />
  <row Id="29659" PostHistoryTypeId="2" PostId="13361" RevisionGUID="76b1c089-231c-40dd-97ec-281eb33fb3fc" CreationDate="2011-06-08T14:00:39.180" UserId="7532" Text="You can use Google to fast-discard some names, but if you are doing something seriously and professional I really encourage you to pay some legal advocates/experts to do that. There exists many registry for products and brand names, and all this stuff is too much complex to be managed by someone that is not expert.&#xD;&#xA;&#xD;&#xA;If you are starting a game I also suggest you to take a PROJECT name and leave the decision of the final PRODUCT game to a more advanced stage. " />
  <row Id="29660" PostHistoryTypeId="5" PostId="13360" RevisionGUID="a02952a3-2456-4a29-b7b0-2e754f014d2b" CreationDate="2011-06-08T14:23:23.797" UserId="1156" Comment="added 150 characters in body; added 87 characters in body" Text="There is a slight loss in performance in using reflection in general, but if you claim it is only going to happen during loading you should have no problems (I can't say for Java, but I have seen benchmarks putting reflection at 10 million queries in 3 seconds in C#). Terraria has the slowest loading times I've ever seen (painfully slow), and that has been incredibly successful - thus showing slow loading times aren't a problem as long as your game meets standards.&#xD;&#xA;&#xD;&#xA;It has the advantage of making everything much more flexible - no `Register` methods to remember to call, no dictionary keys to add..you can just plug and play.&#xD;&#xA;&#xD;&#xA;The problem I can see in your design is that you will have to create one of every object at loading time. If you have 200,000 different objects, that's a lot of wasted memory. I personally am using a Factory method for mine, like:&#xD;&#xA;&#xD;&#xA;`Entity e = Entity.Create(&quot;shotgun&quot;); //load up the file and do it on the fly rather than at loading time`&#xD;&#xA;&#xD;&#xA;I may switch to just loading the XML into memory and arranging it as commands - XML is not hugely fast to load.&#xD;&#xA;&#xD;&#xA;EDIT: You mentioned the speed of reflection. [This][1] benchmark shows the time may be 15x slower, but 1 million calls in 450 milliseconds is not slow.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/435553/java-reflection-performance" />
  <row Id="29661" PostHistoryTypeId="2" PostId="13362" RevisionGUID="bae375f4-29eb-4d49-94f0-0c8737a8a88f" CreationDate="2011-06-08T14:27:36.210" UserId="6588" Text="Assuming you want to work for a big established company, note that there is a lot of overlap between enterprise applications and games on the back-end. On the front-end they are very different domains, but on the back-end of a large MMO they have pretty much the same concerns going on with the database architecture, user data security, etc." />
  <row Id="29662" PostHistoryTypeId="5" PostId="13278" RevisionGUID="a21950fe-ff41-4d3b-8f4e-abe10ea2a6dd" CreationDate="2011-06-08T14:35:20.160" UserId="6210" Comment="A bit of formatting." Text="I am very new here... Sorry for any mistakes in asking my question.&#xD;&#xA;&#xD;&#xA;Just now I found [MobiForms][1]. I am planning to create a game for the iPhone using it.&#xD;&#xA;&#xD;&#xA;My problem is I know only Objective-C and I have designed only one app (which is also a game) that's currently in the AppStore. &#xD;&#xA;&#xD;&#xA;So, can I use MobiForms for game development?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobiforms.com/" />
  <row Id="29663" PostHistoryTypeId="24" PostId="13278" RevisionGUID="a21950fe-ff41-4d3b-8f4e-abe10ea2a6dd" CreationDate="2011-06-08T14:35:20.160" Comment="Proposed by 6210 approved by -1 edit id of 479" />
  <row Id="29664" PostHistoryTypeId="5" PostId="13278" RevisionGUID="1db12a52-4b20-4683-a684-37040276b69b" CreationDate="2011-06-08T14:35:21.097" UserId="1156" Comment="deleted 75 characters in body" Text="Just now I found [MobiForms][1]. I am planning to create a game for the iPhone using it.&#xD;&#xA;&#xD;&#xA;My problem is I know only Objective-C and I have designed only one app (which is also a game) that's currently in the AppStore. &#xD;&#xA;&#xD;&#xA;Can I use MobiForms for game development?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobiforms.com/" />
  <row Id="29665" PostHistoryTypeId="25" PostId="13353" RevisionGUID="1efc5318-5a91-451e-99af-8f517582ecab" CreationDate="2011-06-08T15:14:34.150" Comment="http://twitter.com/#!/StackGameDev/status/78480038617559040" />
  <row Id="29667" PostHistoryTypeId="2" PostId="13363" RevisionGUID="4ef2f79c-3ab8-454d-95da-5868085c90d3" CreationDate="2011-06-08T16:25:24.593" UserId="747" Text="I would second Raine suggestion to use a scripting language with a decent object literal syntax (Groovy, Lua, Javascript... anything that is supported on the JVM). It would save you having to write the mapping between your XML and Java beans (which is probably automated, for sure). &#xD;&#xA;" />
  <row Id="29668" PostHistoryTypeId="2" PostId="13364" RevisionGUID="248101b1-999f-465a-9de8-c7a9d17b03eb" CreationDate="2011-06-08T16:30:21.070" UserId="4443" Text="There are no drawbacks really. What you have described looks like not only a perfectly valid way to do it, but the way that I would recommend to many people when working with a component based system.. They are designed for situations just like this, where a new object can be created in an editor as opposed to in code.&#xD;&#xA;&#xD;&#xA;To chime in a bit with The Duck, you may want to look into an instancing-beyond-xml-definition method. Use the XML to load up base templates of components (default values instead of tracked values) then instanced versions placed in a level or an inventory or a characters save file.. whatever. This might just save you on the amount of processing you have to do. (This is more for memory concerns however, not load speed performance)&#xD;&#xA;&#xD;&#xA;Now, those are the main reasons to use this kind of system. Load speeds should not be a deterrent from this as there are many Many ways to improve load speeds. Having an asset pipeline and an engine that can understand the assets in a few ways is very handy for development. The raw text XML version is nice for editors as well as being human readable for quick iteration and debugging if need be. Having a production or compiled version of the assets (instead of raw text load binary data directly) will remove any concerns over load speed. If you still want to be faster then you compile assets to their complete run time format, they can be loaded into memory, their pointers fixed up, and away you go.&#xD;&#xA;&#xD;&#xA;While it is always good to try and look down the road, this one is free and clear with many solutions if your concerns ever do become an issue." />
  <row Id="29669" PostHistoryTypeId="2" PostId="13365" RevisionGUID="94a88548-4bec-4694-aa19-915714e2e8e4" CreationDate="2011-06-08T16:56:07.030" UserId="4662" Text="You're moving a bunch of error checking and such that could occur in the compiler to the run-time, which is both unsafe and slower, and you're going to have to waste serious time writing all the boilerplate code to make it work. Static typing and compilers exist for a reason, and it's because when your program compiles without error, then it ensures that it doesn't have certain kinds of error- something that you can no longer guarantee. Performance isn't the problem here- it's correctness.&#xD;&#xA;&#xD;&#xA;And for what benefit? You haven't mentioned any plans to change the file after deployment, so it may as well be static data anyway. I mean, what benefit are you hoping to get from the system, exactly? If you need an object pool, those exist independently of how you choose to define your objects.&#xD;&#xA;&#xD;&#xA;You need to pick a system that matches your *requirements*. You don't mention any requirements for dynamic entity definition, and the costs of doing it are very obvious, so logically, this system is way overkill for what you've said you *need*, and I can only recommend just getting a normal object pool and ditching the XML altogether." />
  <row Id="29670" PostHistoryTypeId="2" PostId="13366" RevisionGUID="ca4fab06-bb20-4db5-bcce-716a2f15222f" CreationDate="2011-06-08T17:00:26.950" UserId="7548" Text="You could use a database instead -- PostgreSQL has some special indexing capabilities optimized for this type of data which is located by X and Y coordinates.  You can also specify that the data returned is within a certain radius rather than in a square or oblong shaped area.&#xD;&#xA;&#xD;&#xA;&amp;nbsp; PostgreSQL (free and open source)&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.postgresql.org/&#xD;&#xA;&#xD;&#xA;There are other databases as well, and for the client-side you may find certain types to be better-suited to this since they can run stand-alone (initiated by your game client application) or can be included as part of a code library that you can &quot;just use.&quot;  The advantage is that you don't have to design an indexing scheme because most SQL database engines already do this quite well.&#xD;&#xA;&#xD;&#xA;An advantage with the database approach is that you can make your chunks smaller (or get rid of chunks completely and just use tiles directly, but the use of at least small chunks/groups of many tiles may be more efficient depending on your design), and then use the SQL query to bring in a larger area than is viewable.  By pre-loading to overlap nearby non-viewable areas, the tiles can be prepared _before_ the player moves their character, resulting in a better (hopefully smoother) gaming experience.&#xD;&#xA;&#xD;&#xA;I've noticed that some games keep a &quot;cache&quot; of the map data on the local hard drive after obtaining it the first time (this is undoubtedly to reduce network I/O), such as Ashen Empires:&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Ashen Empires (free to play, beautiful 2D implementation)&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.ashenempires.com/&#xD;&#xA;&#xD;&#xA;Keeping track of &quot;last updated&quot; timestamps with each chunk/tile will also be helpful since, for where locally stored data is available, the SQL query could include an additional &quot;WHERE timestamp_column &gt; $local_timestamp&quot; clause so that only updated chunks/tiles get downloaded (two benefits of saving bandwidth like this are lower connectivity costs, and less lag for your players, which will become more obvious when your game gets popular).&#xD;&#xA;" />
  <row Id="29671" PostHistoryTypeId="6" PostId="13178" RevisionGUID="1c4cb3e7-1187-4344-8155-09a016ba7397" CreationDate="2011-06-08T17:07:55.490" UserId="1839" Comment="edited tags" Text="&lt;java&gt;&lt;physics&gt;&lt;euler&gt;&lt;method&gt;" />
  <row Id="29672" PostHistoryTypeId="2" PostId="13367" RevisionGUID="d0377a3c-130f-4427-b86d-c4f7ce2f1e2c" CreationDate="2011-06-08T17:18:45.633" UserId="7548" Text="Using a longer name with more elements in it should open your options.  For example (and I have no idea if these are real game titles):&#xD;&#xA;&#xD;&#xA;* Potential conflict:  **Wizard Boxing**&#xD;&#xA;* More likely available:  **Wizards of the Kingdom of Norr Boxing Championships**&#xD;&#xA;&#xD;&#xA;Although it isn't a definitive way to check, &quot;Googling&quot; your game name ideas can help to prevent the majority of conflicts.  Reserving a matching internet domain name will usually do the trick though.&#xD;&#xA;&#xD;&#xA;**An important note about using Google to check names:**  If your game name includes multiple words, enclose it &quot;_within quotations marks_&quot; to instruct Google to handle your phrase as a single keyword.  This will save you a lot of time because fewer (if any) results, that are also more relevant, will be returned.&#xD;&#xA;&#xD;&#xA;**Study exercise:**  Try using Google to search for both the game names I suggested above, and try it with and without enclosing &quot;quotation marks.&quot;  You'll be running four queries in the end.&#xD;&#xA;" />
  <row Id="29673" PostHistoryTypeId="2" PostId="13368" RevisionGUID="eb253b7c-4aac-4c35-8a71-ebc66c561aeb" CreationDate="2011-06-08T17:21:23.913" UserId="7883" Text="I'm working on a simple 3D game. In the game, sometimes the players have to roll die (a D8 to be exact). I wish to represent the rolling die with a 3D model, and I'd like to animate it in 3D space as if it was really rolled.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can anyone help me describe the way the die spins around in real life?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PS: I'm working on this in WPF, using `Storyboards` and `Rotation3DAnimationUsingKeyFrames`" />
  <row Id="29674" PostHistoryTypeId="1" PostId="13368" RevisionGUID="eb253b7c-4aac-4c35-8a71-ebc66c561aeb" CreationDate="2011-06-08T17:21:23.913" UserId="7883" Text="Kinematics of a die roll?" />
  <row Id="29675" PostHistoryTypeId="3" PostId="13368" RevisionGUID="eb253b7c-4aac-4c35-8a71-ebc66c561aeb" CreationDate="2011-06-08T17:21:23.913" UserId="7883" Text="&lt;3d&gt;&lt;wpf&gt;&lt;rigid-body-dynamics&gt;" />
  <row Id="29676" PostHistoryTypeId="5" PostId="13367" RevisionGUID="f4788aea-b5f6-46b8-9024-e1cd6beb4b17" CreationDate="2011-06-08T17:23:53.443" UserId="7548" Comment="added 2 characters in body; added 2 characters in body; added 32 characters in body; added 59 characters in body" Text="Using a longer name with more elements in it should open your options.  For example (and I have no idea if these are real game titles):&#xD;&#xA;&#xD;&#xA;* Potential conflict:  **Wizard Boxing**&#xD;&#xA;* More likely available:  **Wizards of _the Kingdom of Norr_ Boxing Championships**&#xD;&#xA;&#xD;&#xA;Although it isn't a definitive way to check, &quot;Googling&quot; your game name ideas can help to prevent the majority of conflicts.  Reserving a matching internet domain name will usually do the trick though (especially for computer games).&#xD;&#xA;&#xD;&#xA;**An important note about using Google to check names:**  If your game name includes multiple words, enclose it &quot;_within quotations marks_&quot; to instruct Google to handle your phrase as a single keyword.  This will save you a lot of time because fewer (if any) results, that are also more relevant, will be returned.&#xD;&#xA;&#xD;&#xA;(_**Study exercise:**  Try using http://www.Google.com/ to search for both the game names I suggested above, or something similar of your own creation, and try it with and without enclosing &quot;quotation marks.&quot;  You'll be running four queries in total._)&#xD;&#xA;" />
  <row Id="29677" PostHistoryTypeId="5" PostId="13365" RevisionGUID="59a4a559-eb2c-469b-9e84-6b72d6693e8c" CreationDate="2011-06-08T17:27:37.233" UserId="4662" Comment="added 168 characters in body" Text="You're moving a bunch of error checking and such that could occur in the compiler to the run-time, which is both unsafe and slower, and you're going to have to waste serious time writing all the boilerplate code to make it work. Static typing and compilers exist for a reason, and it's because when your program compiles without error, then it ensures that it doesn't have certain kinds of error- something that you can no longer guarantee. Performance isn't the problem here- it's correctness. Oh, and performance is going to bite you in the ass when it comes to testing, because your testers are going to have to wait for your game to load in order to test it.&#xD;&#xA;&#xD;&#xA;And for what benefit? You haven't mentioned any plans to change the file after deployment, so it may as well be static data anyway. I mean, what benefit are you hoping to get from the system, exactly? If you need an object pool, those exist independently of how you choose to define your objects.&#xD;&#xA;&#xD;&#xA;You need to pick a system that matches your *requirements*. You don't mention any requirements for dynamic entity definition, and the costs of doing it are very obvious, so logically, this system is way overkill for what you've said you *need*, and I can only recommend just getting a normal object pool and ditching the XML altogether." />
  <row Id="29678" PostHistoryTypeId="2" PostId="13369" RevisionGUID="0eac1e52-d4aa-4bcc-b017-0e8dab7e9044" CreationDate="2011-06-08T17:38:51.483" UserId="7328" Text="I think since it's almost a very simple mesh (D8 means 16 triangles), you can directly give the mesh to your physics engine. if you want to draw some more complicated mesh you can still give some simple mesh to physics engine to do physics of dice." />
  <row Id="29679" PostHistoryTypeId="5" PostId="13367" RevisionGUID="3a679b24-66cd-4b4b-a3cc-4005064e2023" CreationDate="2011-06-08T17:46:34.710" UserId="7548" Comment="added 69 characters in body" Text="Using a longer name with more elements in it should open your options.  For example (and I have no idea if these are real game titles because I just pulled them out of my _ahem!!  Moving right along..._):&#xD;&#xA;&#xD;&#xA;* Potential conflict:  **Wizard Boxing**&#xD;&#xA;* More likely available:  **Wizards of _the Kingdom of Norr_ Boxing Championships**&#xD;&#xA;&#xD;&#xA;Although it isn't a definitive way to check, &quot;Googling&quot; your game name ideas can help to prevent the majority of conflicts.  Reserving a matching internet domain name will usually do the trick though (especially for computer games).&#xD;&#xA;&#xD;&#xA;**An important note about using Google to check names:**  If your game name includes multiple words, enclose it &quot;_within quotations marks_&quot; to instruct Google to handle your phrase as a single keyword.  This will save you a lot of time because fewer (if any) results, that are also more relevant, will be returned.&#xD;&#xA;&#xD;&#xA;(_**Study exercise:**  Try using http://www.Google.com/ to search for both the game names I suggested above, or something similar of your own creation, and try it with and without enclosing &quot;quotation marks.&quot;  You'll be running four queries in total._)&#xD;&#xA;" />
  <row Id="29680" PostHistoryTypeId="2" PostId="13370" RevisionGUID="2e4d15bb-9519-405b-8ff3-de2ae72b1071" CreationDate="2011-06-08T18:09:23.883" UserId="5365" Text="It's actually quite similar to a 2D tile engine. You need to create the level somehow (i.e.: procedural level generation or a map saved into a file that you created in an editor). Then you need to read that data, create the tiles and transform them to the appropriate locations and rotations. Draw only the tiles that are visible on screen (frustum culling) to keep the performance snappy.&#xD;&#xA;&#xD;&#xA;Depending on whether your play area includes tiles at varying heights, you will need to find a solution for defining the floor, platforms and walls. Either include collision data in each tile or, better yet, optimize that by simplifying the collision data and storing it elsewhere.&#xD;&#xA;&#xD;&#xA;I hope this answered your question!" />
  <row Id="29681" PostHistoryTypeId="2" PostId="13371" RevisionGUID="a7ebf74f-3647-4b2c-957f-7c4df4708396" CreationDate="2011-06-08T18:13:13.710" UserId="7885" Text="i´ve got one little question: Is there any code or sample which shows how the simplex noise works? I cannot find anything about it... How should i implement it, without the knowledge how the algorithm works?...&#xD;&#xA;&#xD;&#xA;The other question is: Is the simplex noise a good algorithm for island generation? I need huge islands (really huge), with different layers (sand, gras, stone) and clearly visible height-differences, which have soft-edges, so you can go out/into water without jumping over uneven surfaces.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks a lot :)" />
  <row Id="29682" PostHistoryTypeId="1" PostId="13371" RevisionGUID="a7ebf74f-3647-4b2c-957f-7c4df4708396" CreationDate="2011-06-08T18:13:13.710" UserId="7885" Text="Generating island terrains with Simplex Noise (C#/XNA)" />
  <row Id="29683" PostHistoryTypeId="3" PostId="13371" RevisionGUID="a7ebf74f-3647-4b2c-957f-7c4df4708396" CreationDate="2011-06-08T18:13:13.710" UserId="7885" Text="&lt;xna&gt;&lt;3d&gt;&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="29684" PostHistoryTypeId="2" PostId="13372" RevisionGUID="0fedb2cb-e7ec-471c-9b88-1678bdc32b0c" CreationDate="2011-06-08T18:14:47.897" UserId="5399" Text="I have read alot of interesting questions asking about XNA vs. OpenTK vs. SlimDX vs. OpenGL vs. DX, and while it is really useful to get others general impressions from 100s of hours using these various APIs/Frameworks, I haven't seen any answer which clearly defines what the scope of each is.&#xD;&#xA;&#xD;&#xA;It's understood what the difference between an API, Engine and Framework is in theory, but for someone who has limitied experience with graphics systems, its harder to see what on the practical side falls into each category. (Not made easier by all the overlap! e.g. XNA implementing a content pipeline as an integral part)&#xD;&#xA;&#xD;&#xA;Take for example face culling - XNA 'does' this in the background without the programmer needing to think about it, but where does it happen? Is there a 'cull face' function in DX that must be called, or perhaps above in XNA? Or does the GPU or its driver do it?&#xD;&#xA;&#xD;&#xA;I read in the documentation for one of the managed projects (annoyingly I can't remember which) about how difficult it was to implement efficient rendering code, and how that project abstracted it. This unnerved me a bit, and made me wonder just what XNA is doing beneath `DrawIndexedPrimitives` that would have to be done manually should the framework be left for something more flexible.&#xD;&#xA;&#xD;&#xA;In terms of graphics/audio/input, what kind of low level things would you be expected to do that would be abstracted away in a framework or engine?&#xD;&#xA;I.e. - ignoring the maths libraries - how much more would be involved in displaying a simple cube in SlimDX as opposed to XNA? (Without using the content pipeline) What _functionality_ does XNA have in that respect?&#xD;&#xA;&#xD;&#xA;How do the managed wrappers like OpenTK compare to the API they are encapsulating - memory management is taken care of but what other things do they do?" />
  <row Id="29685" PostHistoryTypeId="1" PostId="13372" RevisionGUID="0fedb2cb-e7ec-471c-9b88-1678bdc32b0c" CreationDate="2011-06-08T18:14:47.897" UserId="5399" Text="Where does the Framework (XNA) end and the API (DX) begin?" />
  <row Id="29686" PostHistoryTypeId="3" PostId="13372" RevisionGUID="0fedb2cb-e7ec-471c-9b88-1678bdc32b0c" CreationDate="2011-06-08T18:14:47.897" UserId="5399" Text="&lt;game-design&gt;&lt;graphics&gt;&lt;framework&gt;&lt;api&gt;" />
  <row Id="29687" PostHistoryTypeId="25" PostId="13352" RevisionGUID="0250a3c7-db5b-403a-8124-2aec4780e24d" CreationDate="2011-06-08T18:15:27.643" Comment="http://twitter.com/#!/StackGameDev/status/78525560908820480" />
  <row Id="29688" PostHistoryTypeId="6" PostId="13372" RevisionGUID="64253648-8d82-464a-8b28-68d9fc9cc34c" CreationDate="2011-06-08T18:16:41.073" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;engine&gt;&lt;framework&gt;&lt;api&gt;" />
  <row Id="29689" PostHistoryTypeId="5" PostId="13365" RevisionGUID="dec8eaa1-7fc2-4adb-b47d-69924ee6f92b" CreationDate="2011-06-08T18:19:46.663" UserId="4662" Comment="added 11 characters in body" Text="You're moving a bunch of error checking and such that could occur in the compiler to the run-time, which is both unsafe and slower, and you're going to have to waste serious time writing all the boilerplate code to make it work. Static typing and compilers exist for a reason, and it's because when your program compiles without error, then it ensures that it doesn't have certain kinds of error- something that you can no longer guarantee. Performance isn't the problem here- it's correctness. Oh, and performance is going to bite you in the ass (nom nom!) when it comes to testing, because your testers are going to have to wait for your game to load in order to test it.&#xD;&#xA;&#xD;&#xA;And for what benefit? You haven't mentioned any plans to change the file after deployment, so it may as well be static data anyway. I mean, what benefit are you hoping to get from the system, exactly? If you need an object pool, those exist independently of how you choose to define your objects.&#xD;&#xA;&#xD;&#xA;You need to pick a system that matches your *requirements*. You don't mention any requirements for dynamic entity definition, and the costs of doing it are very obvious, so logically, this system is way overkill for what you've said you *need*, and I can only recommend just getting a normal object pool and ditching the XML altogether." />
  <row Id="29690" PostHistoryTypeId="2" PostId="13373" RevisionGUID="4b892edf-0cbb-4c4d-b5e2-7ba05ba2d32b" CreationDate="2011-06-08T18:23:34.570" UserId="189" Text="I can think of a number of games you could make with it!&#xD;&#xA;&#xD;&#xA; - Press the button&#xD;&#xA; - Press the button X times in Y seconds&#xD;&#xA; - Press the button faster than anyone else&#xD;&#xA; - Press the button timed to the background music&#xD;&#xA; - Don't press the button&#xD;&#xA; - Press the button... IF YOU DARE&#xD;&#xA;&#xD;&#xA;These are sure winners, especially in the iPhone market!&#xD;&#xA;&#xD;&#xA;More seriously though, I can imagine Minesweeper, Tic-Tac-Toe, and the Guess the Number game are examples of games which could indeed be made with this library, along with most (if not all) puzzle games and many casual games.&#xD;&#xA;&#xD;&#xA;Games can exist on just about any medium in some form. Maybe not the games you're thinking of, but then you should perhaps look up the definitions of &quot;game&quot;." />
  <row Id="29691" PostHistoryTypeId="2" PostId="13374" RevisionGUID="e769ff9d-3b85-41a7-808e-d54356f52ef5" CreationDate="2011-06-08T18:28:52.977" UserId="4662" Text="Instead of unregistering, just make a state and then re-register.&#xD;&#xA;&#xD;&#xA;    In 'Secret Cloak Mode' function:&#xD;&#xA;    Grab the state of all bound keys- save somewhere&#xD;&#xA;    Unbind all keys&#xD;&#xA;    Re-register the keys/etc that we want to do.&#xD;&#xA;    &#xD;&#xA;    In `Unsecret Cloak Mode`:&#xD;&#xA;    Unbind all keys&#xD;&#xA;    Rebind the state that we saved earlier." />
  <row Id="29692" PostHistoryTypeId="5" PostId="13374" RevisionGUID="38869003-3fd7-4d15-a5b5-dde7d1825c1a" CreationDate="2011-06-08T18:34:20.010" UserId="4662" Comment="added 266 characters in body" Text="Instead of unregistering, just make a state and then re-register.&#xD;&#xA;&#xD;&#xA;    In 'Secret Cloak Mode' function:&#xD;&#xA;    Grab the state of all bound keys- save somewhere&#xD;&#xA;    Unbind all keys&#xD;&#xA;    Re-register the keys/etc that we want to do.&#xD;&#xA;    &#xD;&#xA;    In `Unsecret Cloak Mode`:&#xD;&#xA;    Unbind all keys&#xD;&#xA;    Rebind the state that we saved earlier.&#xD;&#xA;&#xD;&#xA;Of course, extending this simple idea would be that you might have separate states for moving, and such, and then instead of dictating &quot;Well, here's all the things I *can't* do whilst in Secret Cloak Mode, here's all the things I *can* do in Secret Cloak Mode.&quot;." />
  <row Id="29693" PostHistoryTypeId="2" PostId="13375" RevisionGUID="59b660c5-df0a-4cad-b6ec-5f06d934af1c" CreationDate="2011-06-08T18:34:28.593" UserId="1156" Text="My noise generator in C#, based off [this][1]:&#xD;&#xA;&#xD;&#xA;    static class NoiseGenerator&#xD;&#xA;    {&#xD;&#xA;        public static int Seed { get; private set; }&#xD;&#xA;&#xD;&#xA;        public static int Octaves { get; set; }&#xD;&#xA;&#xD;&#xA;        public static double Amplitude { get; set; }&#xD;&#xA;&#xD;&#xA;        public static double Persistence { get; set; }&#xD;&#xA;&#xD;&#xA;        public static double Frequency { get; set; }&#xD;&#xA;&#xD;&#xA;        static NoiseGenerator()&#xD;&#xA;        {&#xD;&#xA;            Random r = new Random();&#xD;&#xA;            //LOOOL&#xD;&#xA;            NoiseGenerator.Seed = r.Next(Int32.MaxValue);&#xD;&#xA;            NoiseGenerator.Octaves = 8;&#xD;&#xA;            NoiseGenerator.Amplitude = 1;&#xD;&#xA;            NoiseGenerator.Frequency = 0.015;&#xD;&#xA;            NoiseGenerator.Persistence = 0.65;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public static double Noise(int x, int y)&#xD;&#xA;        {&#xD;&#xA;            //returns -1 to 1&#xD;&#xA;            double total = 0.0;&#xD;&#xA;            double freq = NoiseGenerator.Frequency, amp = NoiseGenerator.Amplitude;&#xD;&#xA;            for (int i = 0; i &lt; NoiseGenerator.Octaves; ++i)&#xD;&#xA;            {&#xD;&#xA;                total = total + NoiseGenerator.Smooth(x * freq, y * freq) * amp;&#xD;&#xA;                freq *= 2;&#xD;&#xA;                amp *= NoiseGenerator.Persistence;&#xD;&#xA;            }&#xD;&#xA;            if (total &lt; -2.4) total = -2.4;&#xD;&#xA;            else if (total &gt; 2.4) total = 2.4;&#xD;&#xA;&#xD;&#xA;            return (total/ 2.4);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public static double NoiseGeneration(int x, int y)&#xD;&#xA;        {&#xD;&#xA;            int n = x + y * 57;&#xD;&#xA;            n = (n &lt;&lt; 13) ^ n;&#xD;&#xA;&#xD;&#xA;            return (1.0 - ((n * (n * n * 15731 + 789221) + NoiseGenerator.Seed) &amp; 0x7fffffff) / 1073741824.0);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private static double Interpolate(double x, double y, double a)&#xD;&#xA;        {&#xD;&#xA;            double value = (1 - Math.Cos(a * Math.PI)) * 0.5;&#xD;&#xA;            return x * (1 - value) + y * value;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private static double Smooth(double x, double y)&#xD;&#xA;        {&#xD;&#xA;            double n1 = NoiseGeneration((int)x, (int)y);&#xD;&#xA;            double n2 = NoiseGeneration((int)x + 1, (int)y);&#xD;&#xA;            double n3 = NoiseGeneration((int)x, (int)y + 1);&#xD;&#xA;            double n4 = NoiseGeneration((int)x + 1, (int)y + 1);&#xD;&#xA;&#xD;&#xA;            double i1 = Interpolate(n1, n2, x - (int)x);&#xD;&#xA;            double i2 = Interpolate(n3, n4, x - (int)x);&#xD;&#xA;&#xD;&#xA;            return Interpolate(i1, i2, y - (int)y);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It isn't commented, but the main parts:&#xD;&#xA;&#xD;&#xA;Seed is a value used to make it random - so you don't generate the same thing each time. Here I have put it in the NoiseGenerator.&#xD;&#xA;&#xD;&#xA;Amplitude, Frequency, Persistence, and Octaves are explained in the article - they basically affect what the resulting noise looks like. &#xD;&#xA;&#xD;&#xA;`NoiseGenerator` function is literally a PRNG - give it an input, and it generates a random number with that as a seed.&#xD;&#xA;&#xD;&#xA;`Noise` is what you call to get a noise value. I found the values were around -2.4 to 2.4 (actually about 2.40032483 or something so they are clamped) and I fixed them to doubles between `-1 and 1`.&#xD;&#xA;&#xD;&#xA;I have not had any speed problems with this. I was rendering a 400x400 grid of 1x1 sprites with values set by this and was getting only minor lag (and that was recalculating noise each frame).&#xD;&#xA;&#xD;&#xA;For the island generation, check out [this question][2] - in particular, [this link][3] is almost exactly what you want, albeit in AS3.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/4628/huge-procedurally-generated-wilderness-worlds&#xD;&#xA;  [3]: http://www.nolithius.com/game-development/world-generation-breakdown" />
  <row Id="29694" PostHistoryTypeId="5" PostId="13371" RevisionGUID="93d5b3a9-8d27-4fc9-9a0e-f2abdd462542" CreationDate="2011-06-08T18:37:18.200" UserId="1198" Comment="deleted 21 characters in body" Text="I've got one little question: Is there any code or sample which shows how the simplex noise works? I cannot find anything about it... How should I implement it, without the knowledge how the algorithm works?...&#xD;&#xA;&#xD;&#xA;The other question is: Is the simplex noise a good algorithm for island generation? I need huge islands (really huge), with different layers (sand, gras, stone) and clearly visible height-differences, which have soft-edges, so you can go out/into water without jumping over uneven surfaces." />
  <row Id="29695" PostHistoryTypeId="5" PostId="13372" RevisionGUID="e9060c00-9004-4199-a5a4-a6180d2c9da5" CreationDate="2011-06-08T18:42:27.853" UserId="5399" Comment="deleted 57 characters in body" Text="I have read alot of interesting questions asking about XNA vs. OpenTK vs. SlimDX vs. OpenGL vs. DX, and while it is really useful to get others general impressions from 100s of hours using these various APIs/Frameworks, I haven't seen any answer which clearly defines what the scope of each is.&#xD;&#xA;&#xD;&#xA;It's understood what the difference between an API, Engine and Framework is in theory, but for someone who has limitied experience with graphics systems, its harder to see what on the practical side falls into each category. (Not made easier by all the overlap! e.g. XNA implementing a content pipeline as an integral part)&#xD;&#xA;&#xD;&#xA;Take for example face culling - XNA 'does' this in the background without the programmer needing to think about it, but where does it happen? Is there a 'cull face' function in DX that must be called, or perhaps above in XNA? Or does the GPU or its driver do it?&#xD;&#xA;&#xD;&#xA;I read in the documentation for one of the managed projects (annoyingly I can't remember which) about how difficult it was to implement efficient rendering code, and how that project abstracted it. This unnerved me a bit, and made me wonder just what XNA is doing beneath DrawIndexedPrimitives that would have to be done manually should the framework be left for something more flexible.&#xD;&#xA;&#xD;&#xA;[This site][1] demonstrates how to draw a simple textured cube in XNA; it has all the basics such as vertex buffers and view matrices but certainly appears to be abstracting away a great deal if you look at the [rendering pipeline for OpenGL][2].&#xD;&#xA;&#xD;&#xA;What does XNA _do_ in the background, when rendering that cube, that a managed API would not? &#xD;&#xA;&#xD;&#xA;[1]: http://www.switchonthecode.com/tutorials/creating-a-textured-box-in-xna&#xD;&#xA;[2]: http://www.opentk.com/node/1342&#xD;&#xA; " />
  <row Id="29696" PostHistoryTypeId="2" PostId="13376" RevisionGUID="e3f25a02-d148-4add-b4bd-b1bf22d3167e" CreationDate="2011-06-08T18:55:26.063" UserId="51" Text="The framework starts... where the API ends.  The API is a limited set of functions/classes/whatever that you can use, and the framework just wraps all that stuff up. &#xD;&#xA;&#xD;&#xA;If you're asking about how much *stuff* goes on in between your call to whatever framework function you're using to get to whatever API method its calling, that really isn't answerable in the general case.  Some things are easy, some things are really abstracted away and may be hiding things that would be useful to know about (which is why I'm assuming you're asking this question).&#xD;&#xA;&#xD;&#xA;For XNA specifically, you can probably see the code by using a tool like &lt;a href=&quot;http://wiki.sharpdevelop.net/ILSpy.ashx&quot;&gt;ILSpy&lt;/a&gt; to break open the XNA DLLs and see what's going on under the hood.  " />
  <row Id="29697" PostHistoryTypeId="2" PostId="13377" RevisionGUID="7f5c6399-6c3b-4f6a-9e9b-ac0940a2577a" CreationDate="2011-06-08T18:59:40.120" UserId="2978" Text="This looks like a case where inheritance could solve your problem. You could have a base class with a bunch of methods that implement the default behavior. You could then extends this class and override some methods. Switching mode is then just a matter of switching the current implementation.&#xD;&#xA;&#xD;&#xA;Here's some pseudo-code&#xD;&#xA;&#xD;&#xA;    class DefaultMode&#xD;&#xA;        function handle(key) {/* call the right method based on the given key. */}&#xD;&#xA;        function run() { ... }&#xD;&#xA;        function pickup() { ... }&#xD;&#xA;        function fire() { ... }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class CarryingMode extends DefaultMode&#xD;&#xA;          function pickup() {} //empty method, so no pickup action in this mode&#xD;&#xA;          function fire() { /*throw object and switch to DefaultMode. */ }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is similar to what James proposed." />
  <row Id="29698" PostHistoryTypeId="2" PostId="13378" RevisionGUID="4fc2e89b-3f49-464f-9a44-25ab98cb516b" CreationDate="2011-06-08T19:09:42.750" UserId="1101" Text="A framework, essentially, provides an API. Often it uses or wraps other APIs in order to do this. The two terms are not necessarily distinct, there's no clear difference in scope, and it's not really important for you to be able to tell the difference - what is important is to know what level of abstraction any given API, library, framework, engine, platform, or package operates at. Finding this out varies on a case by case basis unfortunately." />
  <row Id="29699" PostHistoryTypeId="2" PostId="13379" RevisionGUID="075f602c-ecc6-41d8-aa4e-77cfb4c14a38" CreationDate="2011-06-08T19:46:57.090" UserId="7870" Text="The .xnb file wouldn't load because it was looking for another .xnb file, the texture to go with the model. &#xD;&#xA;&#xD;&#xA;I fixed this by making sure that all of the built .xnb files were in the directory I was loading from." />
  <row Id="29700" PostHistoryTypeId="5" PostId="10991" RevisionGUID="0d1e9902-8b95-412c-9392-5261c4e3389f" CreationDate="2011-06-08T20:36:40.910" UserId="6341" Comment="deleted 4 characters in body" Text="I cannot really figure out what causes one surface to overlap another. In a 3D engine I'm creating, my technique is failing in edge cases.&#xD;&#xA;&#xD;&#xA;My method is sorting the surfaces to be painted from the furthest to the closest. To determine the closeness, I'm comparing the average z values. Sometimes, however, an overlapping surface has a **higher** average z value than the one it is overlapping. Thus, the surface further away is painted over the closer one - resulting in bizarre rendering like this:&#xD;&#xA;&#xD;&#xA;![Large purple square with a section of red on the side][1]&#xD;&#xA;&#xD;&#xA;What one is meant to see is the purple front surface of the cube only, whilst the red side surface is painted over the purple one. The average z value of the purple surface is higher, and therefore 'further away'. So I'm having some doubt as to whether this technique is correct.&#xD;&#xA;&#xD;&#xA;What I also tried is getting the distance from the camera (i.e. origin) to the surface, but then I needed a point. I chose the middle of each surface but also this doesn't always seem to work because not all surfaces are as large as each other.&#xD;&#xA;&#xD;&#xA;Therefore, what is a reliable way to determine the order of closeness of surfaces towards the origin?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/AcOPu.png" />
  <row Id="29704" PostHistoryTypeId="2" PostId="13382" RevisionGUID="b8b3e0fa-d936-4c13-bede-341b4405f424" CreationDate="2011-06-08T20:46:20.260" UserId="7588" Text="I think the question would be better answered if you inversed it.&#xD;&#xA;How exactly does a graphics card work, and what calls are made by DirectX or OpenGL to utilise these features?&#xD;&#xA;&#xD;&#xA;This wouldn't answer your question per se, but as DirectX and OpenGL add a lot of higher level classes to simplify things for you I believe the difference is too vague with what XNA provides for example.&#xD;&#xA;&#xD;&#xA;For the basics you will find similarities in DirectX/XNA calls because at a certain (lower) level, things cannot be more abstacted and the calls will have to be made by yourself.&#xD;&#xA;&#xD;&#xA;So I'd say go create a __simple__ rendering engine in OpenGL (I'd say more accessible to get lower level) and see where that takes you!" />
  <row Id="29705" PostHistoryTypeId="5" PostId="13151" RevisionGUID="0845d872-2047-4e2c-92f5-474fe57b6f13" CreationDate="2011-06-08T21:07:39.087" UserId="1258" Comment="added second edit about keymapping" Text="two options: if &quot;nested input&quot; cases are at most three, four, I'd just use flags. &quot;Holding an object? Can't fire.&quot; Anything else is overengineering it.&#xD;&#xA;&#xD;&#xA;Otherwise, you can keep a per-input-key stack of event handlers.&#xD;&#xA;&#xD;&#xA;    Actions.Empty = () =&gt; { return; };&#xD;&#xA;    if(IsPressed(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;    } else if (IsReleased(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Pop();&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;        keyEventHandlers[Keys.Space].Pop();        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    while(GetNextKeyInBuffer(out key)) {&#xD;&#xA;       keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Or something to this effect :)&#xD;&#xA;&#xD;&#xA;**Edit**: someone mentioned unmanageable if-else constructs. are we going to go full data-driven for an input event handling routine? You surely could, but why?&#xD;&#xA;&#xD;&#xA;Anyway, for the heck of it:&#xD;&#xA;&#xD;&#xA;    void BuildOnKeyPressedEventHandlerTable() {&#xD;&#xA;        onKeyPressedHandlers[Key.E] = () =&gt; { &#xD;&#xA;            keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;            keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;            keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void BuildOnKeyReleasedEventHandlerTable() {&#xD;&#xA;        onKeyReleasedHandlers[Key.E] = () =&gt; { &#xD;&#xA;            keyEventHandlers[Keys.E].Pop();&#xD;&#xA;            keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;            keyEventHandlers[Keys.Space].Pop();              &#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /* get released keys */&#xD;&#xA;&#xD;&#xA;    foreach(var releasedKey in releasedKeys)&#xD;&#xA;        onKeyReleasedHandlers[releasedKey].Invoke();&#xD;&#xA;&#xD;&#xA;    /* get pressed keys */&#xD;&#xA;    foreach(var pressedKey in pressedKeys) &#xD;&#xA;        onKeyPressedHandlers[pressedKey].Invoke();&#xD;&#xA;&#xD;&#xA;    keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;&#xD;&#xA;**Edit 2**&#xD;&#xA;&#xD;&#xA;Kylotan mentioned key mapping, which is a basic feature every game should have (think about accessibility, too). Including keymapping is a different story. &#xD;&#xA;&#xD;&#xA;Changing behaviour depending on a key press combination or sequence is limiting. I overlooked that part.&#xD;&#xA;&#xD;&#xA;Behaviour is related to game logic and not input. Which is fairly obvious, coming to think of it.&#xD;&#xA;&#xD;&#xA;Therefore, I'm proposing the following solution:&#xD;&#xA;&#xD;&#xA;    // //&gt;&#xD;&#xA;&#xD;&#xA;    void Init() {&#xD;&#xA;        // from config file / UI&#xD;&#xA;        // -something events should be set automatically&#xD;&#xA;        // quake 1 ftw.&#xD;&#xA;        // name      family         key      keystate&#xD;&#xA;        &quot;+forward&quot; &quot;movement&quot;   Keys.UpArrow Pressed&#xD;&#xA;        &quot;-forward&quot;              Keys.UpArrow Released&#xD;&#xA;        &quot;+shoot&quot;   &quot;action&quot;     Keys.LMB     Pressed&#xD;&#xA;        &quot;-shoot&quot;                Keys.LMB     Released&#xD;&#xA;        &quot;jump&quot;     &quot;movement&quot;   Keys.Space   Pressed&#xD;&#xA;        &quot;+lstrafe&quot; &quot;movement&quot;   Keys.A       Pressed&#xD;&#xA;        &quot;-lstrafe&quot;              Keys.A       Released&#xD;&#xA;        &quot;cast&quot;     &quot;action&quot;     Keys.RMB     Pressed&#xD;&#xA;        &quot;picknose&quot; &quot;action&quot;     Keys.X       Pressed&#xD;&#xA;        &quot;lockpick&quot; &quot;action&quot;     Keys.G       Pressed&#xD;&#xA;        &quot;+crouch&quot;  &quot;movement&quot;   Keys.LShift  Pressed&#xD;&#xA;        &quot;-crouch&quot;               Keys.LShift  Released&#xD;&#xA;        &quot;chat&quot;     &quot;user&quot;       Keys.T       Pressed      &#xD;&#xA;    }  &#xD;&#xA;    &#xD;&#xA;    void ProcessInput() {&#xD;&#xA;        var pk = GetPressedKeys();&#xD;&#xA;        var rk = GetReleasedKeys();&#xD;&#xA;&#xD;&#xA;        var actions = TranslateToActions(pk + rk);&#xD;&#xA;        PerformActions(actions);&#xD;&#xA;    }                &#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;movement&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.isCasting)&#xD;&#xA;            InterruptCast();    &#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;cast&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.isSilenced) {&#xD;&#xA;            Message(&quot;Cannot do that when silenced.&quot;);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;picknose&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(!player.canPickNose) {&#xD;&#xA;            Message(&quot;Your avatar does not agree.&quot;);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;chat&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.isSilenced) {&#xD;&#xA;            Message(&quot;Cannot chat when silenced!&quot;);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;jump&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.canJump &amp;&amp; !player.isJumping)&#xD;&#xA;            player.PerformJump();&#xD;&#xA;&#xD;&#xA;        if(player.isJumping) {&#xD;&#xA;            if(player.CanDoubleJump())&#xD;&#xA;                player.PerformDoubleJump();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        player.canPickNose = false; // it's dangerous while jumping&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    void PerformActions(IList&lt;ActionEntry&gt; actions) {&#xD;&#xA;        foreach(var action in actions) {&#xD;&#xA;            // we pass both action name and family&#xD;&#xA;            // if we find no action handler, we look for an &quot;action family&quot; handler&#xD;&#xA;            // otherwise call an empty delegate&#xD;&#xA;            actionHandlers[action.Name, action.Family]();    &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // //&lt;&#xD;&#xA;&#xD;&#xA;This could be improved in many ways by people smarter than me, but I believe it's also a good starting point." />
  <row Id="29707" PostHistoryTypeId="25" PostId="13372" RevisionGUID="8a77c40a-e1c6-4b27-80ff-a74efc3a4af3" CreationDate="2011-06-08T21:15:27.480" Comment="http://twitter.com/#!/StackGameDev/status/78570859090026496" />
  <row Id="29708" PostHistoryTypeId="5" PostId="13370" RevisionGUID="abf95aea-9755-4048-9eb7-9b5296a79b39" CreationDate="2011-06-08T21:23:45.620" UserId="5365" Comment="Added &quot;or polygons&quot; to the last sentence of the first paragraph to be more general" Text="It's actually quite similar to a 2D tile engine. You need to create the level somehow (i.e.: procedural level generation or a map saved into a file that you created in an editor). Then you need to read that data, create the tiles and transform them to the appropriate locations and rotations. Draw only the tiles or polygons that are visible on screen (frustum culling) to keep the performance snappy.&#xD;&#xA;&#xD;&#xA;Depending on whether your play area includes tiles at varying heights, you will need to find a solution for defining the floor, platforms and walls. Either include collision data in each tile or, better yet, optimize that by simplifying the collision data and storing it elsewhere.&#xD;&#xA;&#xD;&#xA;I hope this answered your question!" />
  <row Id="29709" PostHistoryTypeId="2" PostId="13383" RevisionGUID="5792345b-2cc1-415b-935d-48122dd99334" CreationDate="2011-06-08T21:45:06.430" UserId="4443" Text="You could 'cheat' the system.. An 8 sided die only has 8 possible values. If you randomly pick a number you could then play 1 of 8 animations that end on the number that was randomly generated. You would not get it to look like a random roll every time, but it would roll to a randomly generated number.&#xD;&#xA;&#xD;&#xA;A second step to the canned animations would be randomizing the texture... If you can move which side of the die are the 'number' all you would need to do is have a random set of animations where the final side is known, and then a set of textures that you could choose from to make the final side be the known number. (I can expand on this if need be)" />
  <row Id="29710" PostHistoryTypeId="5" PostId="7097" RevisionGUID="2c9d01a1-1431-4c2e-9783-e198afcc0a58" CreationDate="2011-06-08T22:05:05.867" UserId="5365" Comment="grammatical errors and run-on sentences" Text="I remember, and I still think, that one cannot even make a prototyped 3D game to test just simple behaviors without using gigantic tools like unity or knowing extensive C++ programming, design patterns, a decent or basic 3D engine, etc.&#xD;&#xA;&#xD;&#xA;Now I'm wondering, since I know programming, whether I'm even more lucky than the ones who need to learn programming before knowing how to make something. Even scripted engines such as Unity are not for kids, and to my sense they tend to dictate their ways of doing things. This is not the case with engine like Ogre or Irrlicht.&#xD;&#xA;&#xD;&#xA;Now I'm thinking that character-driven games occupy a big part of the game market. Do you think it is a good idea to make a character-control oriented game engine which only allows building AI to the exclusion of anything else?&#xD;&#xA;&#xD;&#xA;When I say prototype, I also mean &quot;generic&quot; in the sense that one can quickly choose from a set of gameplay parameters such as the scene manager, the camera POV of the player, the controls, some very basic collisions/physics, and integration of basic steering (OpenSteer for example). The main idea is to make an AI sandbox but in 3D, so it can be demonstrated without the 2D constraints (and also make it more fit to prototype in 3D for a 3D project instead of 2D)." />
  <row Id="29711" PostHistoryTypeId="4" PostId="7097" RevisionGUID="2c9d01a1-1431-4c2e-9783-e198afcc0a58" CreationDate="2011-06-08T22:05:05.867" UserId="5365" Comment="grammatical errors and run-on sentences" Text="Is it a good idea to simplify a character-driven game engine to the point where it's unnecessary to learn scripting/programming?" />
  <row Id="29712" PostHistoryTypeId="24" PostId="7097" RevisionGUID="2c9d01a1-1431-4c2e-9783-e198afcc0a58" CreationDate="2011-06-08T22:05:05.867" Comment="Proposed by 5365 approved by 51 edit id of 481" />
  <row Id="29713" PostHistoryTypeId="2" PostId="13384" RevisionGUID="051dde3d-d79b-4846-b7b2-e626ff29485d" CreationDate="2011-06-08T22:08:48.270" UserId="962" Text="[Blender 3D][1] is open source, and free.&#xD;&#xA;&#xD;&#xA;It is a modeling and rendering application, but it comes with easy to use soft-body, fluid, and ridged-body physics solvers.&#xD;&#xA;&#xD;&#xA;You could set up a number of slightly different simulations, that match the dimensions of the area in your game, and export the animation data from blender to use in your engine.&#xD;&#xA;&#xD;&#xA;In the game, just use a regular pseudo random number generator, and select an animation that matches that number, use a few variations on each number to reduce monotony.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/" />
  <row Id="29714" PostHistoryTypeId="5" PostId="13370" RevisionGUID="714eedc7-a0bf-4b92-b399-23b3c42643bc" CreationDate="2011-06-08T22:18:38.347" UserId="5365" Comment="simple word swap. sounds better" Text="It's actually quite similar to a 2D tile engine. You need to create the level somehow (i.e.: procedural level generation or a map saved into a file that you created in an editor). Then you need to read that data, create the tiles and transform them to the appropriate locations and rotations. Draw only the tiles or polygons that are visible on screen (frustum culling) to keep the performance snappy.&#xD;&#xA;&#xD;&#xA;Depending on whether your play area includes tiles at varying heights, you will need to find a solution for defining the collision bounds of the floor, walls, and platforms. Either include collision data in each tile or, better yet, simplify that data and store it elsewhere to enjoy both memory and performance savings.&#xD;&#xA;&#xD;&#xA;I hope this answered your question!" />
  <row Id="29715" PostHistoryTypeId="2" PostId="13385" RevisionGUID="a82a8b5a-425e-4978-883d-981e65d7f93d" CreationDate="2011-06-08T22:29:07.943" UserId="7173" Text="Try it with just one unit triggering the effect.&#xD;&#xA;When multiple units trigger the effect the they will only receive your buff sequentially.&#xD;&#xA;Also unit groups and picks will create memory leaks, try to avoid them.&#xD;&#xA;Also try it with a static time, and add a message at the very end of the script to debug it." />
  <row Id="29716" PostHistoryTypeId="2" PostId="13386" RevisionGUID="081e56e1-2ed2-480f-8a40-fcb25678ec95" CreationDate="2011-06-08T23:02:50.777" UserId="7662" Text="So my environment is all set up and now im working on the movement physics of my character. I used blitting to copy over my tiles from a tilesheet. But since they are static, they are only copied over once. And with the Hero (main player character), I figured that I might blit him into his continuously changing position. But now, I'm not quite sure it's necessary?&#xD;&#xA;&#xD;&#xA;Is there a real big perfomance-save to copy the Hero sprite into a new position constantly using Blitting, OR, is it fine to just copy it into the game once, and simply move the Hero sprite as a movieclip? " />
  <row Id="29717" PostHistoryTypeId="1" PostId="13386" RevisionGUID="081e56e1-2ed2-480f-8a40-fcb25678ec95" CreationDate="2011-06-08T23:02:50.777" UserId="7662" Text="[AS3] TileBased Game: Blitting Hero or Sprite?" />
  <row Id="29718" PostHistoryTypeId="3" PostId="13386" RevisionGUID="081e56e1-2ed2-480f-8a40-fcb25678ec95" CreationDate="2011-06-08T23:02:50.777" UserId="7662" Text="&lt;flash&gt;&lt;sprites&gt;&lt;bit-blit&gt;" />
  <row Id="29719" PostHistoryTypeId="2" PostId="13387" RevisionGUID="de984b54-7504-410c-8192-69c9d1060e24" CreationDate="2011-06-08T23:20:16.813" UserId="962" Text="If you are moving 1 simple object around, blitting will not give you any performance increase.&#xD;&#xA;&#xD;&#xA;But if you want tons of complex objects, particles and enemies, you should probably use blitting for everything." />
  <row Id="29720" PostHistoryTypeId="5" PostId="13370" RevisionGUID="a2d969fe-df8f-4e6e-8abf-311f1b4e446f" CreationDate="2011-06-08T23:27:33.363" UserId="5365" Comment="minor edit" Text="It's actually quite similar to a 2D tile engine. You need to create the level somehow (i.e.: procedural generation or a map saved into a file that you created in an editor). Then you need to read that data, create the tiles and transform them to the appropriate locations and rotations. Draw only the tiles or polygons that are visible on screen (frustum culling) to keep the performance snappy.&#xD;&#xA;&#xD;&#xA;Depending on whether your play area includes tiles at varying heights, you will need to find a solution for defining the collision bounds of the floor, walls, and platforms. Include collision data in each tile or, better yet, simplify that data and store it elsewhere to enjoy both memory and performance savings.&#xD;&#xA;&#xD;&#xA;I hope this answered your question!" />
  <row Id="29721" PostHistoryTypeId="5" PostId="13386" RevisionGUID="ebc5be43-5823-4159-96e2-c0222a0006b8" CreationDate="2011-06-08T23:40:05.080" UserId="51" Comment="added 1 characters in body; edited tags; edited title" Text="So my environment is all set up and now I'm working on the movement physics of my character. I used blitting to copy over my tiles from a tilesheet. But since they are static, they are only copied over once. And with the Hero (main player character), I figured that I might blit him into his continuously changing position. But now, I'm not quite sure it's necessary?&#xD;&#xA;&#xD;&#xA;Is there a real big perfomance-save to copy the Hero sprite into a new position constantly using Blitting, OR, is it fine to just copy it into the game once, and simply move the Hero sprite as a movieclip? " />
  <row Id="29722" PostHistoryTypeId="4" PostId="13386" RevisionGUID="ebc5be43-5823-4159-96e2-c0222a0006b8" CreationDate="2011-06-08T23:40:05.080" UserId="51" Comment="added 1 characters in body; edited tags; edited title" Text="TileBased Game: Blitting Hero or Sprite?" />
  <row Id="29723" PostHistoryTypeId="6" PostId="13386" RevisionGUID="ebc5be43-5823-4159-96e2-c0222a0006b8" CreationDate="2011-06-08T23:40:05.080" UserId="51" Comment="added 1 characters in body; edited tags; edited title" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;sprites&gt;&lt;bit-blit&gt;" />
  <row Id="29724" PostHistoryTypeId="25" PostId="13386" RevisionGUID="4e4f4bf6-34ed-4913-b5a6-beff5e37880a" CreationDate="2011-06-09T00:15:28.397" Comment="http://twitter.com/#!/StackGameDev/status/78616161285189632" />
  <row Id="29725" PostHistoryTypeId="2" PostId="13388" RevisionGUID="11c6ff27-585e-4b54-89f8-b2902f2f4a79" CreationDate="2011-06-09T00:54:07.853" UserId="7881" Text="I ran into a similar problem and decided to create my own structure to handle the data. It's based loosely on a quadtree, but has infinite (at least as big as an Int) expandability in all directions. It was designed to handle grid-based data which expanded from a central point, much like Minecraft does now. It is space efficient in memory, and very fast.&#xD;&#xA;&#xD;&#xA;You can specify a minimum magnitude for each node (a magnitude of 7 would be 128x128) and once any node has a specified percentage of its subnodes populated, it automatically flattens itself into a two-dimensional array. This means that a very densely populated portion (e.g., a completely explored continent) will have the performance of an array (very fast) but a sparsely populated portion (e.g., a shoreline someone wandered up and down but didn't explore inland) will have good performance and a low memory usage.&#xD;&#xA;&#xD;&#xA;My code can be found [here][1]. The code is complete, tested (unit- and load-tests), and quite optimized. The inner workings aren't too well documented yet, however, but all the public methods are so it should be usable. If anyone decides to try it out, feel free to contact me with questions or comments.&#xD;&#xA;&#xD;&#xA;I've not yet used it to store data to a file, but it's an interesting problem and I may tackle that next.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dl.dropbox.com/u/832464/Code/MatrixSpacePartition.cs" />
  <row Id="29726" PostHistoryTypeId="2" PostId="13389" RevisionGUID="dec33843-0a47-4cb3-a98c-06f6dd88f4d9" CreationDate="2011-06-09T00:55:52.797" UserId="5021" Text="Simplex noise terrain demo:&#xD;&#xA;&#xD;&#xA;http://hazelmckendrick.com/demos/terrain-generation-tropical-island&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Here is the source:&#xD;&#xA;&#xD;&#xA;http://killercodingninjabunny.com/wp-content/uploads/2009/05/hazelmckendrickterrainsource.zip" />
  <row Id="29727" PostHistoryTypeId="25" PostId="13371" RevisionGUID="213a49e6-8ee5-472b-8c05-7cc580a432e5" CreationDate="2011-06-09T03:15:29.427" Comment="http://twitter.com/#!/StackGameDev/status/78661463702642688" />
  <row Id="29728" PostHistoryTypeId="2" PostId="13390" RevisionGUID="490df481-4a15-4a57-8c10-c20762e6a8f7" CreationDate="2011-06-09T04:28:55.567" UserId="4584" Text="So I've been toying around with creating a game in the XNA framework. A great place to start is simply being able to move and walk around.&#xD;&#xA;&#xD;&#xA;I kinda have looking around...&#xD;&#xA;&#xD;&#xA;I start off with the camera position/direction as follows:&#xD;&#xA;&#xD;&#xA;    cameraDirection = Matrix.CreateLookAt(new Vector3(0, 0, 1.5f), new Vector3(0, 1, -1), Vector3.Up);&#xD;&#xA;&#xD;&#xA;I also have a small cube rendered in a static location, on which I plan to walk around. I'm manipulating the cameraDirection from a controller as follows:&#xD;&#xA;&#xD;&#xA;    GamePadState one = GamePad.GetState(PlayerIndex.One);&#xD;&#xA;	if (one.Buttons.Back == ButtonState.Pressed)&#xD;&#xA;		this.Exit();&#xD;&#xA;	if (one.ThumbSticks.Right.Length() &gt; .1f) {//Deadzone, must push stick at least 10%&#xD;&#xA;		cameraDirection *= Matrix.CreateRotationY((float)(gameTime.ElapsedGameTime.TotalMilliseconds * (.002 * one.ThumbSticks.Right.X)));&#xD;&#xA;		cameraDirection *= Matrix.CreateRotationX((float)(gameTime.ElapsedGameTime.TotalMilliseconds * (-.002 * one.ThumbSticks.Right.Y)));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;And at first this appeared to work. Then I realized that the X and Y axes are relative to the camera's current orientation. If I turn left and right while looking straight forward, that appears to work. If I look straight down and then turn left and right, I'm rotating along a different axis. I want to look around in relation to the world's axes instead of the camera's... How can I do this?" />
  <row Id="29729" PostHistoryTypeId="1" PostId="13390" RevisionGUID="490df481-4a15-4a57-8c10-c20762e6a8f7" CreationDate="2011-06-09T04:28:55.567" UserId="4584" Text="XNA Framework and looking around relative to the world instead of camera?" />
  <row Id="29730" PostHistoryTypeId="3" PostId="13390" RevisionGUID="490df481-4a15-4a57-8c10-c20762e6a8f7" CreationDate="2011-06-09T04:28:55.567" UserId="4584" Text="&lt;c#&gt;&lt;xna-4.0&gt;&lt;first-person-shooter&gt;" />
  <row Id="29731" PostHistoryTypeId="2" PostId="13391" RevisionGUID="1414ff6c-f222-4fa9-b3d7-753f37af3e30" CreationDate="2011-06-09T05:51:29.257" UserId="6538" Text=" 1. Thief: The Dark Project&#xD;&#xA; 2. Looking Glass&#xD;&#xA; 3. 1996 - 1998&#xD;&#xA; 4. 2-ish years&#xD;&#xA; 5. [Postmortem][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3355/postmortem_thief_the_dark_project.php?print=1&#xD;&#xA;" />
  <row Id="29732" PostHistoryTypeId="16" PostId="13391" RevisionGUID="930bdd8d-5fe0-47ad-b529-2d80f768c9ca" CreationDate="2011-06-09T05:51:29.257" UserId="6538" />
  <row Id="29733" PostHistoryTypeId="2" PostId="13392" RevisionGUID="9b5be479-bcf6-4d84-ac27-83891f18086c" CreationDate="2011-06-09T06:13:07.337" UserId="2978" Text="A MovieClip still needs to be rendered by the Flash Player. If it's a animated vector shape, it will take longer than blitting a bitmap. But as AttackingHobo said, you might not see the difference with only one sprite." />
  <row Id="29734" PostHistoryTypeId="25" PostId="13368" RevisionGUID="463a1edc-203b-4e2e-a7d9-5d937f7d40d3" CreationDate="2011-06-09T06:15:29.473" Comment="http://twitter.com/#!/StackGameDev/status/78706763377025024" />
  <row Id="29735" PostHistoryTypeId="2" PostId="13393" RevisionGUID="960024bb-858f-4d09-9e10-baf3c1049720" CreationDate="2011-06-09T06:29:48.580" UserId="7891" Text="UT2003 Engine Compatibility with 32-bit Windows 7:&#xD;&#xA;&#xD;&#xA;My first post was deleted, I'm guessing it wasn't on-point enough.  If this post gets deleted, I won't make anymore here, I'll tell you that!&#xD;&#xA;In it, I said the first Unreal works in 32-bit Windows 7, (implying, that) you should probably have no problems with the newer UT2003 engine.  (Which turns out to basically be the case, please see the end.)&#xD;&#xA;So, I went to the trouble, to test the *ACTUAL* UT2003 engine for you, in 32-bit Windows 7 (Ultimate.)&#xD;&#xA;&#xD;&#xA;Testbed (my) hardware:  This, (the CPU,) actually turns out to matter, below...&#xD;&#xA;&#xD;&#xA; - Motherboard:  Asus M2R32-MVP&#xD;&#xA; - CPU:  AMD Athlon 64 X2 5200+ 2.6GHz Dual-Core&#xD;&#xA; - Memory:  Kingston 4GB DDR2 800 (PC2-6400) CL5&#xD;&#xA; - Video Card:  Sapphire ATI Radeon HD 4850 1GB w/ 11-5_vista32_win7_32_dd_ccc_ocl&#xD;&#xA; - Hard Drive 1:  Mushkin Callisto Deluxe 240GB SATA II MLC SSD&#xD;&#xA; - Hard Drive 2:  Western Digital 500GB 7200RPM 16MB Cache SATA&#xD;&#xA; - Optical Drive:  LG Black 12X BD-R SATA Super Multi WH12LS30&#xD;&#xA;&#xD;&#xA;(Windows Updates installed, up to 6/8/2011.  As well as various programs.)&#xD;&#xA;&#xD;&#xA;Testing and results:&#xD;&#xA;&#xD;&#xA;I installed &quot;Unreal Tournament 2003 Retail Version 2107&quot;, from three CDs.  (On C:\, the SSD.)&#xD;&#xA;It won't launch un-patched.  (Even before Windows 7.  It gives a serious Critical Error.)&#xD;&#xA;Then I applied the (last) official &quot;Unreal Tournament 2003 Retail Patch 2225 for Windows&quot;.&#xD;&#xA;(Epic's 2225 Patch also removes their own SecuROM CD-check, for their Play Disc (Disc 1.))&#xD;&#xA;The game launched flawlessly.  I cranked up all of the settings until it said, &quot;HOLY SH*T!&quot;&#xD;&#xA;I started &quot;SINGLE PLAYER&quot;, watched the intro, beat the first two levels, and entered the third.&#xD;&#xA;I quit the game, and then re-launched it, but it wouldn't re-launch!  It crashed, saying:&#xD;&#xA;&#xD;&#xA;Negative delta time!  History: UGameEngine::Tick &lt;- UpdateWorld &lt;- MainLoop&#xD;&#xA;&#xD;&#xA;It's a Known Compatibility Issue with AMD X2 Dual-Cores, here are three quickly found fixes:&#xD;&#xA;&#xD;&#xA;1) Run UT2003 in Windows 98 / Windows ME Compatibility mode.  (Very easy...)&#xD;&#xA;(Right-click the 'Play UT2003' icon &gt; Properties &gt; Compatibility, it's there, near the top.)&#xD;&#xA;&#xD;&#xA;2) Install &quot;AMD Dual-Core Optimizer Version 1.1.4&quot; from &#xD;&#xA;http://support.amd.com/us/Pages/dynamicDetails.aspx?ListID=c5cd2c08-1432-4756-aafa-4d9dc646342f&amp;ItemID=153&#xD;&#xA;It's basically an updated CPU driver, to compensate for incompatibilities with multi-core CPUs.&#xD;&#xA;&#xD;&#xA;3) Use &quot;Win2000 Launcher&quot; from http://www.majorgeeks.com/Win2000_Launcher_d438.html&#xD;&#xA;&#xD;&#xA;Oh, and 4) you could also use a single-core CPU.  NOT recommended.&#xD;&#xA;&#xD;&#xA;I tested 1), and it works.  I went to test number 2) for you...&#xD;&#xA;I turned off number 1), but, after two (very quick) launches, the launching problem DID NOT return.&#xD;&#xA;So I'm unable to test number 2), (without much trouble,) but I'm quite sure it'd also work...  Wait...&#xD;&#xA;After waiting (I waited about 30 minutes,) the problem DID return, at which time I tested number 2).&#xD;&#xA;Number 2) also works, independently of number 1).  It will (almost certainly) only work for AMD CPUs.&#xD;&#xA;I didn't bother testing number 3).  (Or 4).)&#xD;&#xA;&#xD;&#xA;Problem, Solved.  [Your two questions:  (1):  Issues are listed here.  (2):  UT2003 will run anywhere.]&#xD;&#xA;&#xD;&#xA;(Also know, versions of Unreal Tournament 2003 purchased from *Steam*, (by other users,) may not work.)&#xD;&#xA;&#xD;&#xA;I then also went &quot;ON-LINE&quot; and played on three different 2225 multi-player servers, without any problems.&#xD;&#xA;I went back, used my new ON-LINE account, and watched the single player tutorial which I skipped earlier.&#xD;&#xA;I have carefully tested most major functions of the program without experiencing any problems with it.**&#xD;&#xA;That's as completely as I can practically test it for you, without having your content.  Or getting paid!&#xD;&#xA;&#xD;&#xA;Summary and Solution:&#xD;&#xA;&#xD;&#xA;So great news, yes, the UT2003 2225 engine works perfectly fine in Windows 7 32-bit!  :O)&#xD;&#xA;**However, multi-core CPU drivers, may not work well with UT2003!  If your CPUs are AMD brand, install the &quot;AMD Dual-Core Optimizer&quot;, (OR, you can:)  If they're Intel:  Run it in Windows 98 / Windows ME Compatibility mode.&#xD;&#xA;&#xD;&#xA;If you have any other problems, they would be with the content that you purchased, in which case, see the content creators.  And if you can't get their help, there are easily thousands of capable &quot;3D content creators&quot; who would love to help you.  (Interview 5 or 10, and surely one (or two) of them will take care of you.)&#xD;&#xA;But, you SHOULDN'T have any problems.  Definitely not from Windows 7, anyway!  Good luck!  :O)&#xD;&#xA;&#xD;&#xA;Of course, you should test it on a single installation first.  Search newegg.com for Windows 7.  ($100.)&#xD;&#xA;I just did... (6/8/2011)&#xD;&#xA;Microsoft Windows 7 Home Premium SP1 32-bit - OEM    $99.99 + Free Shipping&#xD;&#xA;...looks good.  (I wouldn't think the difference between Ultimate and Home Premium would matter here.)&#xD;&#xA;&#xD;&#xA;P.S.  If you're Buying multiple new Computers to run this on, buy just one first, and test it like I did, (if not even more,) first.  (If they won't sell or lend you just one, to test with, buy them somewhere else.  Really.)&#xD;&#xA;P.P.S.  (Among other reasons,) to avoid Hardware Compatibility problems, I always strongly recommend avoiding Dell.  You said, &quot;However, we expect to run into compatibility issues that could be expensive to resolve.&quot;  With you using Dell, I totally believe that.&#xD;&#xA;" />
  <row Id="29736" PostHistoryTypeId="5" PostId="13393" RevisionGUID="3770a7f5-f5cf-4d20-985a-01d7b6ff424d" CreationDate="2011-06-09T06:43:53.930" UserId="7891" Comment="added 10 characters in body" Text="UT2003 Engine Compatibility with 32-bit Windows 7:&#xD;&#xA;&#xD;&#xA;My first post was deleted, I'm guessing it wasn't on-point enough.  If this post gets deleted, I won't make anymore here, I'll tell you that!&#xD;&#xA;In it, I said the first Unreal works in 32-bit Windows 7, (implying, that) you should probably have no problems with the newer UT2003 engine.  (Which turns out to basically be the case, please see the end.)&#xD;&#xA;So, I went to the trouble, to test the *ACTUAL* UT2003 engine for you, in 32-bit Windows 7 (Ultimate.)&#xD;&#xA;&#xD;&#xA;Testbed (my) hardware:  This, (the CPU,) actually turns out to matter, below...&#xD;&#xA;&#xD;&#xA; - Motherboard:  Asus M2R32-MVP&#xD;&#xA; - CPU:  AMD Athlon 64 X2 5200+ 2.6GHz Dual-Core&#xD;&#xA; - Memory:  Kingston 4GB DDR2 800 (PC2-6400) CL5&#xD;&#xA; - Video Card:  Sapphire ATI Radeon HD 4850 1GB w/ 11-5_vista32_win7_32_dd_ccc_ocl&#xD;&#xA; - Hard Drive 1:  Mushkin Callisto Deluxe 240GB SATA II MLC SSD&#xD;&#xA; - Hard Drive 2:  Western Digital 500GB 7200RPM 16MB Cache SATA&#xD;&#xA; - Optical Drive:  LG Black 12X BD-R SATA Super Multi WH12LS30&#xD;&#xA;&#xD;&#xA;(Windows Updates installed, up to 6/8/2011.  As well as various programs.)&#xD;&#xA;&#xD;&#xA;Testing and results:&#xD;&#xA;&#xD;&#xA;I installed &quot;Unreal Tournament 2003 Retail Version 2107&quot;, from three CDs.  (On C:\, the SSD.)&#xD;&#xA;It won't launch un-patched.  (Even before Windows 7.  It gives a serious Critical Error.)&#xD;&#xA;Then I applied the (last) official &quot;Unreal Tournament 2003 Retail Patch 2225 for Windows&quot;.&#xD;&#xA;(Epic's 2225 Patch also removes their own SecuROM CD-check, for their Play Disc (Disc 1.))&#xD;&#xA;The game launched flawlessly.  I cranked up all of the settings until it said, &quot;HOLY SH*T!&quot;&#xD;&#xA;I started &quot;SINGLE PLAYER&quot;, watched the intro, beat the first two levels, and entered the third.&#xD;&#xA;I quit the game, and then re-launched it, but it wouldn't re-launch!  It crashed, saying:&#xD;&#xA;&#xD;&#xA;Negative delta time!  History: UGameEngine::Tick &lt;- UpdateWorld &lt;- MainLoop&#xD;&#xA;&#xD;&#xA;It's a Known Compatibility Issue with AMD X2 Dual-Cores, here are three quickly found fixes:&#xD;&#xA;&#xD;&#xA;1) Run UT2003 in Windows 98 / Windows ME Compatibility mode.  (Very easy...)&#xD;&#xA;(Right-click the 'Play UT2003' icon &gt; Properties &gt; Compatibility, it's there, near the top.)&#xD;&#xA;&#xD;&#xA;2) Install &quot;AMD Dual-Core Optimizer Version 1.1.4&quot; from &#xD;&#xA;http://support.amd.com/us/Pages/dynamicDetails.aspx?ListID=c5cd2c08-1432-4756-aafa-4d9dc646342f&amp;ItemID=153&#xD;&#xA;It's basically an updated CPU driver, to compensate for incompatibilities with multi-core CPUs.&#xD;&#xA;&#xD;&#xA;3) Use &quot;Win2000 Launcher&quot; from http://www.majorgeeks.com/Win2000_Launcher_d438.html&#xD;&#xA;&#xD;&#xA;Oh, and 4) you could also use a single-core CPU.  NOT recommended.&#xD;&#xA;&#xD;&#xA;I tested 1), and it works.  I went to test number 2) for you...&#xD;&#xA;I turned off number 1), but, after two (very quick) launches, the launching problem DID NOT return.&#xD;&#xA;So I'm unable to test number 2), (without much trouble,) but I'm quite sure it'd also work...  Wait...&#xD;&#xA;After waiting (I waited about 30 minutes,) the problem DID return, at which time I tested number 2).&#xD;&#xA;Number 2) also works, independently of number 1).  It will (almost certainly) only work for AMD CPUs.&#xD;&#xA;I didn't bother testing number 3).  (Or 4).)&#xD;&#xA;&#xD;&#xA;Problem, Solved.  [Your two questions:  (1):  Issues are listed here.  (2):  UT2003 will run anywhere.]&#xD;&#xA;&#xD;&#xA;(Also know, versions of Unreal Tournament 2003 purchased from *Steam*, (by other users,) may not work.)&#xD;&#xA;&#xD;&#xA;I then also went &quot;ON-LINE&quot; and played on three different 2225 multi-player servers, without any problems.&#xD;&#xA;I went back, used my new ON-LINE account, and watched the single player tutorial which I skipped earlier.&#xD;&#xA;I have carefully tested most major functions of the program without experiencing any problems with it.**&#xD;&#xA;That's as completely as I can practically test it for you, without having your content.  Or getting paid!&#xD;&#xA;&#xD;&#xA;Summary and Solution:&#xD;&#xA;&#xD;&#xA;So great news, yes, the UT2003 2225 engine works perfectly fine in Windows 7 32-bit!  :O)&#xD;&#xA;**However, multi-core CPU drivers, may not work well with UT2003!  If your CPUs are AMD brand, install the &quot;AMD Dual-Core Optimizer&quot;, (OR, you can:)  If they're Intel:  Run it in Windows 98 / Windows ME Compatibility mode.&#xD;&#xA;&#xD;&#xA;If you have any other problems, they would be with the content that you purchased/developed, in which case, see the content creators.  And if you can't get their help, there are easily thousands of capable &quot;3D content creators&quot; who would love to help you.  (Interview 5 or 10, and surely one (or two) of them will take care of you.)&#xD;&#xA;But, you SHOULDN'T have any problems.  Definitely not from Windows 7, anyway!  Good luck!  :O)&#xD;&#xA;&#xD;&#xA;Of course, you should test it on a single installation first.  Search newegg.com for Windows 7.  ($100.)&#xD;&#xA;I just did... (6/8/2011)&#xD;&#xA;Microsoft Windows 7 Home Premium SP1 32-bit - OEM    $99.99 + Free Shipping&#xD;&#xA;...looks good.  (I wouldn't think the difference between Ultimate and Home Premium would matter here.)&#xD;&#xA;&#xD;&#xA;P.S.  If you're Buying multiple new Computers to run this on, buy just one first, and test it like I did, (if not even more,) first.  (If they won't sell or lend you just one, to test with, buy them somewhere else.  Really.)&#xD;&#xA;P.P.S.  (Among other reasons,) to avoid Hardware Compatibility problems, I always strongly recommend avoiding Dell.  You said, &quot;However, we expect to run into compatibility issues that could be expensive to resolve.&quot;  With you using Dell, I totally believe that.&#xD;&#xA;" />
  <row Id="29737" PostHistoryTypeId="2" PostId="13394" RevisionGUID="1f76d6ef-c3c3-4fea-b10b-cbe6469b25f1" CreationDate="2011-06-09T07:09:22.947" UserId="7898" Text="I want to build a system based from this idea. First, is it legal per se? Obviously, I don't know how they built theirs and I will be generating my own &quot;generator&quot;. But the idea itself of being able to randomly create a character or monster based on something..is it copyrighted? patented? &#xD;&#xA;&#xD;&#xA;" />
  <row Id="29738" PostHistoryTypeId="1" PostId="13394" RevisionGUID="1f76d6ef-c3c3-4fea-b10b-cbe6469b25f1" CreationDate="2011-06-09T07:09:22.947" UserId="7898" Text="Question about Monster Rancher/My Brute generators" />
  <row Id="29739" PostHistoryTypeId="3" PostId="13394" RevisionGUID="1f76d6ef-c3c3-4fea-b10b-cbe6469b25f1" CreationDate="2011-06-09T07:09:22.947" UserId="7898" Text="&lt;random&gt;&lt;generated&gt;" />
  <row Id="29740" PostHistoryTypeId="5" PostId="13151" RevisionGUID="54f6b6a2-c034-4b07-9cc2-1b2c5590fd3f" CreationDate="2011-06-09T07:42:11.603" UserId="1258" Comment="added 298 characters in body" Text="two options: if &quot;nested input&quot; cases are at most three, four, I'd just use flags. &quot;Holding an object? Can't fire.&quot; Anything else is overengineering it.&#xD;&#xA;&#xD;&#xA;Otherwise, you can keep a per-input-key stack of event handlers.&#xD;&#xA;&#xD;&#xA;    Actions.Empty = () =&gt; { return; };&#xD;&#xA;    if(IsPressed(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;        keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;    } else if (IsReleased(Keys.E)) {&#xD;&#xA;        keyEventHandlers[Keys.E].Pop();&#xD;&#xA;        keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;        keyEventHandlers[Keys.Space].Pop();        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    while(GetNextKeyInBuffer(out key)) {&#xD;&#xA;       keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Or something to this effect :)&#xD;&#xA;&#xD;&#xA;**Edit**: someone mentioned unmanageable if-else constructs. are we going to go full data-driven for an input event handling routine? You surely could, but why?&#xD;&#xA;&#xD;&#xA;Anyway, for the heck of it:&#xD;&#xA;&#xD;&#xA;    void BuildOnKeyPressedEventHandlerTable() {&#xD;&#xA;        onKeyPressedHandlers[Key.E] = () =&gt; { &#xD;&#xA;            keyEventHandlers[Keys.E].Push(Actions.Empty);&#xD;&#xA;            keyEventHandlers[Keys.LeftMouseButton].Push(Actions.Empty);&#xD;&#xA;            keyEventHandlers[Keys.Space].Push(Actions.Empty);&#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    void BuildOnKeyReleasedEventHandlerTable() {&#xD;&#xA;        onKeyReleasedHandlers[Key.E] = () =&gt; { &#xD;&#xA;            keyEventHandlers[Keys.E].Pop();&#xD;&#xA;            keyEventHandlers[Keys.LeftMouseButton].Pop();&#xD;&#xA;            keyEventHandlers[Keys.Space].Pop();              &#xD;&#xA;        };&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /* get released keys */&#xD;&#xA;&#xD;&#xA;    foreach(var releasedKey in releasedKeys)&#xD;&#xA;        onKeyReleasedHandlers[releasedKey].Invoke();&#xD;&#xA;&#xD;&#xA;    /* get pressed keys */&#xD;&#xA;    foreach(var pressedKey in pressedKeys) &#xD;&#xA;        onKeyPressedHandlers[pressedKey].Invoke();&#xD;&#xA;&#xD;&#xA;    keyEventHandlers[key].Invoke(); // we invoke only last event handler&#xD;&#xA;&#xD;&#xA;**Edit 2**&#xD;&#xA;&#xD;&#xA;Kylotan mentioned key mapping, which is a basic feature every game should have (think about accessibility, too). Including keymapping is a different story. &#xD;&#xA;&#xD;&#xA;Changing behaviour depending on a key press combination or sequence is limiting. I overlooked that part.&#xD;&#xA;&#xD;&#xA;Behaviour is related to game logic and not input. Which is fairly obvious, coming to think of it.&#xD;&#xA;&#xD;&#xA;Therefore, I'm proposing the following solution:&#xD;&#xA;&#xD;&#xA;    // //&gt;&#xD;&#xA;&#xD;&#xA;    void Init() {&#xD;&#xA;        // from config file / UI&#xD;&#xA;        // -something events should be set automatically&#xD;&#xA;        // quake 1 ftw.&#xD;&#xA;        // name      family         key      keystate&#xD;&#xA;        &quot;+forward&quot; &quot;movement&quot;   Keys.UpArrow Pressed&#xD;&#xA;        &quot;-forward&quot;              Keys.UpArrow Released&#xD;&#xA;        &quot;+shoot&quot;   &quot;action&quot;     Keys.LMB     Pressed&#xD;&#xA;        &quot;-shoot&quot;                Keys.LMB     Released&#xD;&#xA;        &quot;jump&quot;     &quot;movement&quot;   Keys.Space   Pressed&#xD;&#xA;        &quot;+lstrafe&quot; &quot;movement&quot;   Keys.A       Pressed&#xD;&#xA;        &quot;-lstrafe&quot;              Keys.A       Released&#xD;&#xA;        &quot;cast&quot;     &quot;action&quot;     Keys.RMB     Pressed&#xD;&#xA;        &quot;picknose&quot; &quot;action&quot;     Keys.X       Pressed&#xD;&#xA;        &quot;lockpick&quot; &quot;action&quot;     Keys.G       Pressed&#xD;&#xA;        &quot;+crouch&quot;  &quot;movement&quot;   Keys.LShift  Pressed&#xD;&#xA;        &quot;-crouch&quot;               Keys.LShift  Released&#xD;&#xA;        &quot;chat&quot;     &quot;user&quot;       Keys.T       Pressed      &#xD;&#xA;    }  &#xD;&#xA;    &#xD;&#xA;    void ProcessInput() {&#xD;&#xA;        var pk = GetPressedKeys();&#xD;&#xA;        var rk = GetReleasedKeys();&#xD;&#xA;&#xD;&#xA;        var actions = TranslateToActions(pk, rk);&#xD;&#xA;        PerformActions(actions);&#xD;&#xA;    }                &#xD;&#xA;&#xD;&#xA;    void TranslateToActions(pk, rk) {&#xD;&#xA;        // use what I posted above to switch actions depending &#xD;&#xA;        // on which keys have been pressed&#xD;&#xA;        // it's all about pushing and popping the right action &#xD;&#xA;        // depending on the &quot;context&quot; (it becomes a contextual action then)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;movement&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.isCasting)&#xD;&#xA;            InterruptCast();    &#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;cast&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.isSilenced) {&#xD;&#xA;            Message(&quot;Cannot do that when silenced.&quot;);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;picknose&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(!player.canPickNose) {&#xD;&#xA;            Message(&quot;Your avatar does not agree.&quot;);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;chat&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.isSilenced) {&#xD;&#xA;            Message(&quot;Cannot chat when silenced!&quot;);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    actionHandlers[&quot;jump&quot;] = (action, actionFamily) =&gt; {&#xD;&#xA;        if(player.canJump &amp;&amp; !player.isJumping)&#xD;&#xA;            player.PerformJump();&#xD;&#xA;&#xD;&#xA;        if(player.isJumping) {&#xD;&#xA;            if(player.CanDoubleJump())&#xD;&#xA;                player.PerformDoubleJump();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        player.canPickNose = false; // it's dangerous while jumping&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    void PerformActions(IList&lt;ActionEntry&gt; actions) {&#xD;&#xA;        foreach(var action in actions) {&#xD;&#xA;            // we pass both action name and family&#xD;&#xA;            // if we find no action handler, we look for an &quot;action family&quot; handler&#xD;&#xA;            // otherwise call an empty delegate&#xD;&#xA;            actionHandlers[action.Name, action.Family]();    &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // //&lt;&#xD;&#xA;&#xD;&#xA;This could be improved in many ways by people smarter than me, but I believe it's also a good starting point." />
  <row Id="29741" PostHistoryTypeId="5" PostId="13361" RevisionGUID="04254b20-789c-426e-aba9-707dc67c96fc" CreationDate="2011-06-09T08:02:29.823" UserId="7532" Comment="added 3 characters in body" Text="You can use Google to fast-discard some names, but if you are doing something seriously and professional I really encourage you to pay some legal advocates/experts to do that. There exists many registry for products and brand names, and all this stuff is too much complex to be managed by someone that is not an expert.&#xD;&#xA;&#xD;&#xA;If you are starting a game I also suggest you to take a PROJECT name and leave the decision of the final PRODUCT game to a more advanced stage. " />
  <row Id="29742" PostHistoryTypeId="2" PostId="13395" RevisionGUID="8f2963d1-ba3e-4d9b-9ab6-8e7907250259" CreationDate="2011-06-09T08:14:40.110" UserId="6867" Text="I am trying to render some elements in my game. First, I render the textures (the textures of the textboxes themselves etc). Then I render the primitives (borders around controls etc). Then I render the text.&#xD;&#xA;&#xD;&#xA;However, by doing so, this gives a weird result in my user-interface when showing tooltips (by hovering over a textfield), as seen in the screenshot below.&#xD;&#xA;&#xD;&#xA;![Screenshot][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/lzCzW.png&#xD;&#xA;&#xD;&#xA;Due to the order of drawing, borders around the window are drawn after textures, which (for the tooltip that appears when my mouse is over the textfield) makes it look weird." />
  <row Id="29743" PostHistoryTypeId="1" PostId="13395" RevisionGUID="8f2963d1-ba3e-4d9b-9ab6-8e7907250259" CreationDate="2011-06-09T08:14:40.110" UserId="6867" Text="A cool way of doing Z-index for XNA components?" />
  <row Id="29744" PostHistoryTypeId="3" PostId="13395" RevisionGUID="8f2963d1-ba3e-4d9b-9ab6-8e7907250259" CreationDate="2011-06-09T08:14:40.110" UserId="6867" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="29745" PostHistoryTypeId="2" PostId="13396" RevisionGUID="6f1eb1d5-998b-41de-9f1d-915738c30304" CreationDate="2011-06-09T08:23:07.217" UserId="4828" Text="http://msdn.microsoft.com/en-us/library/ff433989.aspx &lt;br&gt;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    public void Draw (&#xD;&#xA;             Texture2D texture,&#xD;&#xA;             Vector2 position,&#xD;&#xA;             Nullable&lt;Rectangle&gt; sourceRectangle,&#xD;&#xA;             Color color,&#xD;&#xA;             float rotation,&#xD;&#xA;             Vector2 origin,&#xD;&#xA;             Vector2 scale,&#xD;&#xA;             SpriteEffects effects,&#xD;&#xA;             float layerDepth&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;**layerDepth**&#xD;&#xA;The depth of a layer. By default, 0 represents the front layer and 1 represents a back layer. Use SpriteSortMode if you want sprites to be sorted during drawing.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;For example you have: Form, and in the form labels, buttons &lt;br&gt;&#xD;&#xA;So for children elements you can add to layerDepth some value &lt;br&gt;&#xD;&#xA;For example: Form A have children: Form B and some buttons, Form B have only button &lt;br&gt;&#xD;&#xA;Form A - 1.0 &lt;br&gt;&#xD;&#xA;Buttons in form A - 1.5 &lt;br&gt;&#xD;&#xA;Form B in Form A - 1.5 &lt;br&gt;&#xD;&#xA;Buttons in form B - 2 &lt;br&gt;&#xD;&#xA;&#xD;&#xA;For Dialogs - you can store some bigger value" />
  <row Id="29746" PostHistoryTypeId="5" PostId="13369" RevisionGUID="d9e3b826-3882-4c27-8069-069c07d11f27" CreationDate="2011-06-09T08:40:42.083" UserId="7328" Comment="deleted 1 characters in body" Text="I think since it's almost a very simple mesh (D8 means 8 triangles), you can directly give the mesh to your physics engine. if you want to draw some more complicated mesh you can still give some simple mesh to physics engine to do physics of dice." />
  <row Id="29747" PostHistoryTypeId="2" PostId="13397" RevisionGUID="02a298a4-68ed-4e62-bde7-91f420b2eb64" CreationDate="2011-06-09T09:03:22.163" UserId="5021" Text="I'm not a lawyer.&#xD;&#xA;&#xD;&#xA;You can't copyright game mechanics in the U.S. or Canada. The same likely applies to many other countries.&#xD;&#xA;&#xD;&#xA;Apart from that, cloning games happens all of the time. I wouldn't worry too much about copying game mechanics, especially if you are adding your own little spin.&#xD;&#xA;&#xD;&#xA;Using the same names as another game however, can be a different matter." />
  <row Id="29748" PostHistoryTypeId="25" PostId="13395" RevisionGUID="400a5b50-4b63-46ec-898f-b5397ea0e2dc" CreationDate="2011-06-09T09:15:30.207" Comment="http://twitter.com/#!/StackGameDev/status/78752064431329280" />
  <row Id="29749" PostHistoryTypeId="2" PostId="13398" RevisionGUID="466c2a25-28a0-48ca-9c71-656de6eb5aad" CreationDate="2011-06-09T09:17:25.110" UserId="5021" Text="First, you should be aware that there really is no such thing as a camera. There is only the camera view and projection matricies, which transform all the vertices in the world into a position relative to the camera.&#xD;&#xA;&#xD;&#xA;That said, your problem is due to the order of transformations applied to the camera view matrix.&#xD;&#xA;&#xD;&#xA;Instead of applying transformations to the camera view matrix over and over, which results in weird skewing of the view, and other fun unwanted stuff.&#xD;&#xA;&#xD;&#xA;The order of matrix multiplication matters. If you multiply by x and then by y, you get a different result from y by x. So multiplying many times in a row by different amounts along different axis produces a different result from what you were expecting.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Instead, try this:&#xD;&#xA;&#xD;&#xA;Store yaw, pitch (and roll) in 3 separate floats in your camera. Store position in a Vector3.&#xD;&#xA;&#xD;&#xA;Then at each camera update, do this:&#xD;&#xA;&#xD;&#xA;    cameraView = Matrix.CreateRotationX(Pitch);&#xD;&#xA;    cameraView *= Matrix.CreateRotationY(Yaw);&#xD;&#xA;&#xD;&#xA;Then just add to yaw/pitch like this:&#xD;&#xA;&#xD;&#xA;    float elapsed = (float)(gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    Yaw += elapsed * (.002 * one.ThumbSticks.Right.X));&#xD;&#xA;    &#xD;&#xA;    if(Yaw &gt; (MathHelper.Pi * 2)){&#xD;&#xA;        Yaw -= MathHelper.Pi * 2;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(And the same for pitch and roll.)&#xD;&#xA;&#xD;&#xA;This way you are recreating the camera view from yaw and pitch each frame, which will help you understand what is going on, and avoid incorrect transformations. It's also about equal in runtime efficiency, if you're worried about that." />
  <row Id="29750" PostHistoryTypeId="5" PostId="13398" RevisionGUID="e44562fa-cf9b-4cca-90e6-07caf34cd366" CreationDate="2011-06-09T09:29:19.463" UserId="5021" Comment="added 19 characters in body; added 24 characters in body; added 69 characters in body; added 182 characters in body; added 61 characters in body" Text="First, you should be aware that there really is no such thing as a camera. There is only the camera view and projection matricies, which transform all the vertices in the world into a position relative to the camera.&#xD;&#xA;&#xD;&#xA;That said, your problem is due to the order of transformations applied to the camera view matrix.&#xD;&#xA;&#xD;&#xA;Instead of applying transformations to the camera view matrix over and over, which results in weird skewing of the view, and other fun unwanted stuff (like gimbal lock, as [3nixios][1] pointed out).&#xD;&#xA;&#xD;&#xA;The order of matrix multiplication matters. If you multiply by x and then by y, you get a different result from y by x. So multiplying many times in a row by different amounts along different axis produces a different result from what you were expecting.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Instead, try this:&#xD;&#xA;&#xD;&#xA;Store yaw, pitch (and roll) in 3 separate floats in your camera. Store position in a Vector3.&#xD;&#xA;&#xD;&#xA;Then at each camera update, do this:&#xD;&#xA;&#xD;&#xA;    cameraView = Matrix.CreateRotationX(Pitch);&#xD;&#xA;    cameraView *= Matrix.CreateRotationY(Yaw);&#xD;&#xA;    cameraView *= Matrix.CreateTranslation(Position);&#xD;&#xA;&#xD;&#xA;Remember that the order of those multiplications matters!&#xD;&#xA;&#xD;&#xA;Then just add to yaw/pitch like this:&#xD;&#xA;&#xD;&#xA;    float elapsed = (float)(gameTime.ElapsedGameTime.TotalMilliseconds;&#xD;&#xA;    Yaw += elapsed * (.002 * one.ThumbSticks.Right.X));&#xD;&#xA;    &#xD;&#xA;    if(Yaw &gt; (MathHelper.Pi * 2)){&#xD;&#xA;        Yaw -= MathHelper.Pi * 2;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;(And the same for pitch and roll.)&#xD;&#xA;&#xD;&#xA;Add to position like this:&#xD;&#xA;&#xD;&#xA;    // Move up by 5 units per second.&#xD;&#xA;    Position += new Vector3(0, 1, 0) * elapsed * 5.0f;&#xD;&#xA;&#xD;&#xA;This way you are recreating the camera view from yaw and pitch each frame, which will help you understand what is going on, and avoid incorrect transformations. It's also about equal in runtime efficiency, if you're worried about that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/7588/3nixios" />
  <row Id="29751" PostHistoryTypeId="2" PostId="13399" RevisionGUID="52be2b67-8292-4706-9e77-78de87e22d1c" CreationDate="2011-06-09T09:34:49.570" UserId="7899" Text="This is probably the zillionth place where I try to get help in this, so please do bear with me, if I missed something with the local search engine - just need a short answer: a short suggestion.&#xD;&#xA;I am trying to use .X files (whoa.. huh? lol), but I found no good software for importing .X files then editing them then exporting them.. all this with animations, all this in text format (optional, but would be great), all this with having multiple meshes in one .X file. Found some good software to do the half of the jobs done, but is there any way to do it in one step? (I mean really - what do other programmers use at all? I found no good stuff on net.. am I to implement one myself, or such?)&#xD;&#xA;&#xD;&#xA;So any good suggestion would be great, and without garbage: .X files in text with animations with multiple meshes to import and then edit and then export.&#xD;&#xA;&#xD;&#xA;Thanks:&#xD;&#xA;Péter" />
  <row Id="29752" PostHistoryTypeId="1" PostId="13399" RevisionGUID="52be2b67-8292-4706-9e77-78de87e22d1c" CreationDate="2011-06-09T09:34:49.570" UserId="7899" Text="Tool for editing .X" />
  <row Id="29753" PostHistoryTypeId="3" PostId="13399" RevisionGUID="52be2b67-8292-4706-9e77-78de87e22d1c" CreationDate="2011-06-09T09:34:49.570" UserId="7899" Text="&lt;directx&gt;" />
  <row Id="29754" PostHistoryTypeId="2" PostId="13400" RevisionGUID="04f3a879-a0e6-48e5-a461-0e38e8548d79" CreationDate="2011-06-09T09:47:20.613" UserId="7588" Text="How about [blender](http://www.blender.org/features-gallery/features/)?" />
  <row Id="29755" PostHistoryTypeId="2" PostId="13401" RevisionGUID="27a236c1-57cf-4f6f-be39-529b774b37ff" CreationDate="2011-06-09T09:47:24.340" UserId="3100" Text="[Blender's website][1] lists DirectX as a supported file type&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/" />
  <row Id="29756" PostHistoryTypeId="2" PostId="13402" RevisionGUID="54ed7b69-a095-4636-8ddb-44a2750d3d9b" CreationDate="2011-06-09T09:52:33.620" UserId="1156" Text="I believe [Blender][1] allows for .x importing (it ships with the import script)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/" />
  <row Id="29757" PostHistoryTypeId="5" PostId="13394" RevisionGUID="64ceeda3-86b4-475c-806f-3f6f428bb890" CreationDate="2011-06-09T09:53:09.737" UserId="5021" Comment="clarified what the question actually is." Text="I want to build a system based on the idea of [Monster Rancher's monster generation system][1].&#xD;&#xA;&#xD;&#xA;First, is it legal per se?&#xD;&#xA;&#xD;&#xA;Obviously, I don't know how they built theirs and I will be generating my own &quot;generator&quot;. But the idea itself of being able to randomly create a character or monster based on something..is it copyrighted? patented? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Monster_Rancher#Monster_Generation" />
  <row Id="29758" PostHistoryTypeId="24" PostId="13394" RevisionGUID="64ceeda3-86b4-475c-806f-3f6f428bb890" CreationDate="2011-06-09T09:53:09.737" Comment="Proposed by 5021 approved by 1156 edit id of 482" />
  <row Id="29759" PostHistoryTypeId="5" PostId="13400" RevisionGUID="5c23a51f-c4b0-40c0-aeda-548bbbcad76e" CreationDate="2011-06-09T10:02:13.760" UserId="7588" Comment="added 207 characters in body; added 20 characters in body; added 169 characters in body" Text="How about [blender](http://www.blender.org/features-gallery/features/)?&#xD;&#xA;&#xD;&#xA;----- Edit -----&#xD;&#xA;&#xD;&#xA;Looking more into it, Blender now only support exporting .X files with a script that needs to be activated via User Preferences, see [this forum post](http://www.blender.org/forum/viewtopic.php?t=19681).&#xD;&#xA;&#xD;&#xA;You could try converting your .x files into another format to import them fo the tool you want, [Milkshape](http://chumbalum.swissquake.ch/ms3d/index.html) may work." />
  <row Id="29760" PostHistoryTypeId="2" PostId="13403" RevisionGUID="87ade8cc-8e97-4970-b671-3e9c84205d09" CreationDate="2011-06-09T10:20:20.470" UserId="6210" Text="You can try [Mobygames][1], they're trying to build a comprehensive index of all games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/" />
  <row Id="29761" PostHistoryTypeId="5" PostId="13400" RevisionGUID="39a72ddb-6213-4879-b099-82e830d3b2c5" CreationDate="2011-06-09T10:20:48.340" UserId="7588" Comment="added 332 characters in body" Text="How about [blender](http://www.blender.org/features-gallery/features/)?&#xD;&#xA;&#xD;&#xA;----- Edit -----&#xD;&#xA;&#xD;&#xA;Looking more into it, Blender now only support exporting .X files with a script that needs to be activated via User Preferences, see [this forum post](http://www.blender.org/forum/viewtopic.php?t=19681).&#xD;&#xA;&#xD;&#xA;You could try converting your .x files into another format to import them fo the tool you want, [Milkshape](http://chumbalum.swissquake.ch/ms3d/index.html) may work.&#xD;&#xA;&#xD;&#xA;----- Edit -----&#xD;&#xA;&#xD;&#xA;After looking even more into it, I see that people reccommend [TrueSpace 7.6](http://www.caligari.com/downloads.html) which is now completely free and should allow you to import .x files.&#xD;&#xA;&#xD;&#xA;If you don't like the modeller after that, you can just export to a different format and use your favourite modeller." />
  <row Id="29762" PostHistoryTypeId="2" PostId="13404" RevisionGUID="ee008e3a-e13e-4e9f-9f2d-16bf8e1d5859" CreationDate="2011-06-09T10:46:24.920" UserId="7630" Text="I'm not a lawyer either.&#xD;&#xA;&#xD;&#xA;While you cannot copyright the mechanics of a software design, you can patent them.  This is why IBM spends a fortune on patent discovery during their software development.&#xD;&#xA;&#xD;&#xA;You can search patents online, but it is tedious... I have my doubts a monster generator would make the grade but whoknows (tm).&#xD;&#xA;&#xD;&#xA;Much better to make sure you're not copying anything too closely... in this case pick a different prng seed method..." />
  <row Id="29763" PostHistoryTypeId="2" PostId="13405" RevisionGUID="04dd6152-7e20-49ba-bde8-25f9a081dc31" CreationDate="2011-06-09T11:09:05.580" UserId="7514" Text="Both books will teach you Game Maker's drag and drop, neither will teach you C++.&#xD;&#xA;Im not sure if the cookbook teaches you GML, though i know the companion does.&#xD;&#xA;Both books have their own style of teaching. So on that matter, purely subjective.&#xD;&#xA;The Cookbook is slightly cheaper (thought not much)&#xD;&#xA;The Companion is out already.&#xD;&#xA;The companion might (i'm not positive) require you to get the game makers apprentice as well.&#xD;&#xA;&#xD;&#xA;Overall i would say companion. The sooner the better, and it will teach everything you need to get started. The Game Makers apprentice might be needed first though.&#xD;&#xA;&#xD;&#xA;And regarding C++... Well thats a totally different area. If you want to jump straight into it, neither of these books will help. However if you want to learn the basics of using logic to do things before delving into the details of the language, well it might help to learn GML first.&#xD;&#xA;" />
  <row Id="29764" PostHistoryTypeId="5" PostId="13399" RevisionGUID="38c6db18-2917-41e6-b615-a38dfed94d4f" CreationDate="2011-06-09T11:09:45.033" UserId="7899" Comment="blender != solution" Text="This is probably the zillionth place where I try to get help in this, so please do bear with me, if I missed something with the local search engine - just need a short answer: a short suggestion.&#xD;&#xA;I am trying to use .X files (whoa.. huh? lol), but I found no good software for importing .X files then editing them then exporting them.. all this with animations, all this in text format (optional, but would be great), all this with having multiple meshes in one .X file. Found some good software to do the half of the jobs done, but is there any way to do it in one step? (I mean really - what do other programmers use at all? I found no good stuff on net.. am I to implement one myself, or such?)&#xD;&#xA;&#xD;&#xA;So any good suggestion would be great, and without garbage: .X files in text with animations with multiple meshes to import and then edit and then export.&#xD;&#xA;&#xD;&#xA;Thanks:&#xD;&#xA;Péter&#xD;&#xA;&#xD;&#xA;*edit: I already tried bleander. The 2.49b was the last version supporting import directx in text. After these versions blender is not even importing .x, only exports. 2.49b can export animated .x, but can not import animation. 2.49b can export multiple meshes but will only import one of the meshes - from the same export it did (unmodified). Thanks for the suggestion, but blender is no solution for this, unless you can suggest a working script too please?*" />
  <row Id="29765" PostHistoryTypeId="2" PostId="13406" RevisionGUID="afa0ff18-815e-44ec-8346-4d6f83b159b0" CreationDate="2011-06-09T11:18:20.583" UserId="7514" Text="i want to be able to loop through a hole bunch of textures, and render them on an object. I then want the rendered image to be placed onto a texture2D.&#xD;&#xA;&#xD;&#xA;The point? well hopefully i will end up with an array of Texture2D's containing a model with multiple skins.&#xD;&#xA;&#xD;&#xA;Here's my code:&#xD;&#xA;&#xD;&#xA;            for (byte i = 1; i &lt; allBlockIso.Count(); i++)&#xD;&#xA;            {&#xD;&#xA;                DisplayBox.SetValue(i);&#xD;&#xA;                GraphicsDevice.SetRenderTarget(cubeTarget);&#xD;&#xA;                GraphicsDevice.Clear(Color.Transparent);&#xD;&#xA;                DrawIsoCube();&#xD;&#xA;                GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;                allBlockIso[i] = (Texture2D)cubeTarget;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Pretty simple yet it's not working. It appears that whatever the last image being rendered is, is shown in every image of the allBlockIso array.&#xD;&#xA;&#xD;&#xA;Anyone know a fix?&#xD;&#xA;Cheers.&#xD;&#xA;&#xD;&#xA;P.S. sorry if this wan't explained well. I'm not very good at explaining :P&#xD;&#xA;" />
  <row Id="29766" PostHistoryTypeId="1" PostId="13406" RevisionGUID="afa0ff18-815e-44ec-8346-4d6f83b159b0" CreationDate="2011-06-09T11:18:20.583" UserId="7514" Text="Reusing a render target to create multiple Texture2D's (XNA)" />
  <row Id="29767" PostHistoryTypeId="3" PostId="13406" RevisionGUID="afa0ff18-815e-44ec-8346-4d6f83b159b0" CreationDate="2011-06-09T11:18:20.583" UserId="7514" Text="&lt;xna&gt;&lt;textures&gt;&lt;xna-4.0&gt;" />
  <row Id="29768" PostHistoryTypeId="5" PostId="13399" RevisionGUID="68051b75-b6e5-4662-9e98-29b086fd3788" CreationDate="2011-06-09T11:23:29.287" UserId="7899" Comment="typo" Text="This is probably the zillionth place where I try to get help in this, so please do bear with me, if I missed something with the local search engine - just need a short answer: a short suggestion.&#xD;&#xA;I am trying to use .X files (whoa.. huh? lol), but I found no good software for importing .X files then editing them then exporting them.. all this with animations, all this in text format (optional, but would be great), all this with having multiple meshes in one .X file. Found some good software to do the half of the jobs done, but is there any way to do it in one step? (I mean really - what do other programmers use at all? I found no good stuff on net.. am I to implement one myself, or such?)&#xD;&#xA;&#xD;&#xA;So any good suggestion would be great, and without garbage: .X files in text with animations with multiple meshes to import and then edit and then export.&#xD;&#xA;&#xD;&#xA;Thanks:&#xD;&#xA;Péter&#xD;&#xA;&#xD;&#xA;*edit: I already tried Blender. The 2.49b was the last version supporting import directx in text. After these versions blender is not even importing .x, only exports. 2.49b can export animated .x, but can not import animation. 2.49b can export multiple meshes but will only import one of the meshes - from the same export it did (unmodified). Thanks for the suggestion, but blender is no solution for this, unless you can suggest a working script too please?*" />
  <row Id="29769" PostHistoryTypeId="5" PostId="13406" RevisionGUID="9c46edb3-7398-4c9b-b4de-c75fe559b526" CreationDate="2011-06-09T11:30:31.433" UserId="7514" Comment="added 252 characters in body" Text="i want to be able to loop through a hole bunch of textures, and render them on an object. I then want the rendered image to be placed onto a texture2D.&#xD;&#xA;&#xD;&#xA;The point? well hopefully i will end up with an array of Texture2D's containing a model with multiple skins.&#xD;&#xA;&#xD;&#xA;Here's my code:&#xD;&#xA;&#xD;&#xA;            for (byte i = 1; i &lt; allBlockIso.Count(); i++)&#xD;&#xA;            {&#xD;&#xA;                DisplayBox.SetValue(i);&#xD;&#xA;                GraphicsDevice.SetRenderTarget(cubeTarget);&#xD;&#xA;                GraphicsDevice.Clear(Color.Transparent);&#xD;&#xA;                DrawIsoCube();&#xD;&#xA;                GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;                allBlockIso[i] = (Texture2D)cubeTarget;&#xD;&#xA;            }&#xD;&#xA;DisplayBox.SetValue is a function which goes through and sets the texture. This is working! DrawIsoCube() draws the cube (the test model) and this is working too.&#xD;&#xA;The problem is definitely something to do with the unreusability of the render target.&#xD;&#xA;&#xD;&#xA;Pretty simple yet it's not working. It appears that whatever the last image being rendered is, is shown in every image of the allBlockIso array.&#xD;&#xA;&#xD;&#xA;Anyone know a fix?&#xD;&#xA;Cheers.&#xD;&#xA;&#xD;&#xA;P.S. sorry if this wan't explained well. I'm not very good at explaining :P&#xD;&#xA;" />
  <row Id="29770" PostHistoryTypeId="25" PostId="13406" RevisionGUID="852512af-7ccd-4b45-8ea8-547500bc7189" CreationDate="2011-06-09T12:15:31.097" Comment="http://twitter.com/#!/StackGameDev/status/78797366341271552" />
  <row Id="29771" PostHistoryTypeId="2" PostId="13407" RevisionGUID="f40b85ac-94b4-4919-8efb-8c24aa3784b6" CreationDate="2011-06-09T12:19:39.050" UserId="288" Text="I'm going to give the simple and fairly obvious answer, and that is **just draw everything in the correct order in the first place**.&#xD;&#xA;&#xD;&#xA;To mock-up an example of what I mean:&#xD;&#xA;&#xD;&#xA;    // Assuming you have sorted windowList by Z-order, using one of the many&#xD;&#xA;    // existing sorting mechanisms provided by the framework such as List&lt;T&gt;.Sort().&#xD;&#xA;    foreach(var window in windowList)&#xD;&#xA;        window.Draw();&#xD;&#xA;&#xD;&#xA;    // in your Window class:&#xD;&#xA;    public void Draw()&#xD;&#xA;    {&#xD;&#xA;        this.DrawBackground();&#xD;&#xA;        this.DrawBorders();&#xD;&#xA;        this.DrawText();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Is there a particular, compelling reason why you are not already drawing your windows in this way?" />
  <row Id="29772" PostHistoryTypeId="5" PostId="12088" RevisionGUID="bb5aa004-dc21-4788-b055-00f4968dcb26" CreationDate="2011-06-09T12:27:54.760" UserId="1156" Comment="added 4 characters in body; edited tags; deleted 4 characters in body; edited tags" Text="Which book is more a beginner to learn to program in c++ (or GML) and more fun: &quot;Game Maker 8 Cookbook&quot; (available for pre-order), or &quot;The Game Maker's Companion&quot; ?" />
  <row Id="29773" PostHistoryTypeId="6" PostId="12088" RevisionGUID="bb5aa004-dc21-4788-b055-00f4968dcb26" CreationDate="2011-06-09T12:27:54.760" UserId="1156" Comment="added 4 characters in body; edited tags; deleted 4 characters in body; edited tags" Text="&lt;programming&gt;" />
  <row Id="29774" PostHistoryTypeId="6" PostId="12088" RevisionGUID="a4147836-fe84-4918-b89f-a75b3b260b06" CreationDate="2011-06-09T12:34:19.113" UserId="1156" Comment="edited tags" Text="&lt;programming&gt;&lt;books&gt;&lt;game-maker&gt;" />
  <row Id="29775" PostHistoryTypeId="2" PostId="13408" RevisionGUID="9b28bb8b-7e61-4261-b10f-8fdb2cab71f9" CreationDate="2011-06-09T12:34:32.280" UserId="288" Text="A `RenderTarget2D` is also a `Texture2D`. You don't ever &quot;convert&quot; it to a texture - it simply already *is* a texture. So you're simply passing the one object around and reusing it.&#xD;&#xA;&#xD;&#xA;(You can prove this in the Debugger by giving the object a marker - you will see that every texture in your array is the *same* object!)&#xD;&#xA;&#xD;&#xA;So you have two options:&#xD;&#xA;&#xD;&#xA; - You could create multiple `RenderTarget2D` objects and use one for each texture.&#xD;&#xA;&#xD;&#xA; - You could create multiple `Texture2D` objects, and copy your render target into that texture, using the `GetData` and `SetData` functions, after each time you render to it. (Your data will have to go through a buffer, which you *can* reuse because it is not used in the final result.)&#xD;&#xA;&#xD;&#xA;If you are doing this while your game is running (it is happening each frame or frequently), you should probably use the first approach. If you are doing this at load time (it happens once or occasionally), then you should probably use the second approach.&#xD;&#xA;&#xD;&#xA;See also &lt;a href=&quot;http://stackoverflow.com/questions/5509265/after-writing-to-a-rendertarget-how-to-efficiently-clone-the-output&quot;&gt;this question&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Also look into the difference between &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/s1ax56ch.aspx&quot;&gt;value types&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/490f96s2.aspx&quot;&gt;reference types&lt;/a&gt; (see &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173104.aspx&quot;&gt;this document&lt;/a&gt; for *lots* of information about the .NET type system). `Texture2D` is a reference type (which means that the variable you hold is a *reference* to the object - not the object itself)." />
  <row Id="29776" PostHistoryTypeId="5" PostId="13408" RevisionGUID="0f08b301-e66c-4835-9c54-d0acbddf75a6" CreationDate="2011-06-09T12:42:44.963" UserId="288" Comment="deleted 3 characters in body; added 37 characters in body; deleted 1 characters in body" Text="A `RenderTarget2D` is also a `Texture2D`. You don't ever &quot;convert&quot; it to a texture - it simply already *is* a texture. So you're simply passing the one object around and reusing it.&#xD;&#xA;&#xD;&#xA;(You can prove this in the Debugger by giving the object a marker - you will see that every texture in your array is the *same* object!)&#xD;&#xA;&#xD;&#xA;So you have two options:&#xD;&#xA;&#xD;&#xA; - You could create multiple `RenderTarget2D` objects and use one for each texture.&#xD;&#xA;&#xD;&#xA; - You could create multiple `Texture2D` objects, and copy your render target into a texture, using the `GetData` and `SetData` functions, after each time you render to it. (Your data will have to go through (copied into and then copied out of) a buffer, which you *can* reuse because it is not used in the final result.)&#xD;&#xA;&#xD;&#xA;If you are doing this while your game is running (it is happening each frame or frequently), you should probably use the first approach. If you are doing this at load time (it happens once or occasionally), then you should probably use the second approach.&#xD;&#xA;&#xD;&#xA;See also &lt;a href=&quot;http://stackoverflow.com/questions/5509265/after-writing-to-a-rendertarget-how-to-efficiently-clone-the-output&quot;&gt;this question&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;Also look into the difference between &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/s1ax56ch.aspx&quot;&gt;value types&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/490f96s2.aspx&quot;&gt;reference types&lt;/a&gt; (see &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms173104.aspx&quot;&gt;this document&lt;/a&gt; for *lots* of information about the .NET type system). `Texture2D` is a reference type, which means that the variable you hold is a *reference* to the object - not the object itself." />
  <row Id="29777" PostHistoryTypeId="5" PostId="13400" RevisionGUID="63c3b527-3f39-42f2-a6f3-0bd2dd60c5bf" CreationDate="2011-06-09T13:10:54.010" UserId="7588" Comment="added 417 characters in body" Text="How about [blender](http://www.blender.org/features-gallery/features/)?&#xD;&#xA;&#xD;&#xA;----- Edit -----&#xD;&#xA;&#xD;&#xA;Looking more into it, Blender now only support exporting .X files with a script that needs to be activated via User Preferences, see [this forum post](http://www.blender.org/forum/viewtopic.php?t=19681).&#xD;&#xA;&#xD;&#xA;You could try converting your .x files into another format to import them fo the tool you want, [Milkshape](http://chumbalum.swissquake.ch/ms3d/index.html) may work.&#xD;&#xA;&#xD;&#xA;----- Edit -----&#xD;&#xA;&#xD;&#xA;After looking even more into it, I see that people reccommend [TrueSpace 7.6](http://www.caligari.com/downloads.html) which is now completely free and should allow you to import .x files.&#xD;&#xA;&#xD;&#xA;If you don't like the modeller after that, you can just export to a different format and use your favourite modeller.&#xD;&#xA;&#xD;&#xA;----- Edit -----&#xD;&#xA;&#xD;&#xA;After managing to find [this](http://www.codeproject.com/KB/directx/Conv3ds_Utility_Helper.aspx) on CodeProject, DirectX apparently once provided a tool to convert from .x to .3ds. The link (not tested) should be a Dx8 Extras pack that comes with the conv3ds.exe utility. [Here it is](http://download.microsoft.com/download/DirectX/extras/8.1b/W982KMeXP/EN-US/DX81b_SDK_Extras.exe), good luck." />
  <row Id="29778" PostHistoryTypeId="5" PostId="13399" RevisionGUID="f8e1b7ea-28c8-40c0-8efc-b103507459a2" CreationDate="2011-06-09T13:51:39.527" UserId="7899" Comment="sum" Text="This is probably the zillionth place where I try to get help in this, so please do bear with me, if I missed something with the local search engine - just need a short answer: a short suggestion.&#xD;&#xA;I am trying to use .X files (whoa.. huh? lol), but I found no good software for importing .X files then editing them then exporting them.. all this with animations, all this in text format (optional, but would be great), all this with having multiple meshes in one .X file. Found some good software to do the half of the jobs done, but is there any way to do it in one step? (I mean really - what do other programmers use at all? I found no good stuff on net.. am I to implement one myself, or such?)&#xD;&#xA;&#xD;&#xA;So any good suggestion would be great, and without garbage: .X files in text with animations with multiple meshes to import and then edit and then export.&#xD;&#xA;&#xD;&#xA;Thanks:&#xD;&#xA;Péter&#xD;&#xA;&#xD;&#xA;*edit: I already tried Blender. The 2.49b was the last version supporting import directx in text. After these versions blender is not even importing .x, only exports. 2.49b can export animated .x, but can not import animation. 2.49b can export multiple meshes but will only import one of the meshes - from the same export it did (unmodified). Thanks for the suggestion, but blender is no solution for this, unless you can suggest a working script too please?*&#xD;&#xA;&#xD;&#xA;**solution:** for above mentioned problem there were some solutions. Here I try to sum up stuff:&#xD;&#xA;&#xD;&#xA; - Blender is a partially working solution; see edit above.&#xD;&#xA; - Milkshape seemed to work with directx files, but for my tests it showed up, that only preview worked well, on main screen the textures were bad and no animations were imported. Versions checked are: 1.7.0 and 1.8.4 or something like that, I don't remember.&#xD;&#xA; - TrueSpace seemed to not work for any of the .X files. No idea why; tried with tiny.x provided by the DirectX SDK, but nope.&#xD;&#xA; *- Good solution is to use quick converter - see post bellow, marked as good answer. Found this allright, because it is closest to my goal.&#xD;&#xA; - Found a program (**UU3D** - Ultimate Unwrap 3D) that loads .X well, with more meshes and multiple animations and the textures are just fine too. Because it is not free, I could not try that if it can save with text as well (saving is simply disabled in demo). For those, who can afford such I could only recommend, because it looks promising.*&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29779" PostHistoryTypeId="2" PostId="13409" RevisionGUID="94c19962-adf6-4393-a6e8-4b287db5c74f" CreationDate="2011-06-09T14:53:45.707" UserId="5864" Text="If you want PS3 programming skills, you may look for:&#xD;&#xA;&#xD;&#xA; * knowledge of the PPC architecture; this you can get by doing C/C++ development on a PowerPC machine, be it OS X on an old G5 Mac, or Linux on any PowerPC machine including the PS3.&#xD;&#xA; * knowledge of AltiVec; again, you can get this with a Mac or with Linux on a recent PowerPC machine, but knowledge of SSE3 might be enough.&#xD;&#xA; * knowledge of the SPU: you can only practice this on the PS3 using Linux.&#xD;&#xA;&#xD;&#xA;This won't teach you how to program the PS3 video chip, or how to use the official SDKs. Though for the video programming, generic OpenGL and DirectX skills will probably be enough, with some HLSL too. There is also a lot of information and material all around the Internet, not all of which is illegal to get ahold of (for instance, Sony's modified version of GCC for the PS3 is covered by the GPL).&#xD;&#xA;&#xD;&#xA;If you want X360 programming skills, you will look for:&#xD;&#xA;&#xD;&#xA; * knowledge of the PPC architecture: see above&#xD;&#xA;&#xD;&#xA; * knowledge of AltiVec: see above&#xD;&#xA;&#xD;&#xA; * knowledge of DirectX: this you can practice on Windows.&#xD;&#xA;&#xD;&#xA; * knowledge of the Xbox 360 SDK: the similarities are such that practicing XNA will help a lot.&#xD;&#xA;&#xD;&#xA;Other important skills probably include multithreaded programming (general knowledge, but also atomic operations, lock-free algorithms), portability (endianness, pointer sizes, video hardware features, etc.).&#xD;&#xA;&#xD;&#xA;So yes, as you mentioned, I believe DirectX will be the most rewarding skill you can master. However, be aware that the competition will go this way too, and a few extras may make a difference.&#xD;&#xA;&#xD;&#xA;***Source***: I did all of the above and got myself an awesome job in the industry." />
  <row Id="29780" PostHistoryTypeId="25" PostId="13399" RevisionGUID="8c7dd6bd-8b0d-4ae3-8a6b-00024fe0cac0" CreationDate="2011-06-09T15:15:31.937" Comment="http://twitter.com/#!/StackGameDev/status/78842668771311616" />
  <row Id="29781" PostHistoryTypeId="5" PostId="12999" RevisionGUID="b8e9ab64-bd35-4922-90ed-3c3082a7aad5" CreationDate="2011-06-09T15:23:51.847" UserId="7588" Comment="added 329 characters in body" Text="Often games will use semi-transparent blocks with that good old 'wisp' effect that gives the impression of wind. A kind of white swirl in the direction the wind is, I'll try to find a sprite sheet to show you what I mean later.&#xD;&#xA;&#xD;&#xA;Here is a screenshot of a tile-based game some friends of mine made, you can see the wind represented by the white 'swirls' and it tiled pretty well.&#xD;&#xA;&#xD;&#xA;http://www.thomas-planques.com/wp-content/uploads/Level%20Design%205%20-%20Jump%20Gap.jpg&#xD;&#xA;&#xD;&#xA;Obviously, I am still looking for a sprite sheet with this sort of effect... :/" />
  <row Id="29782" PostHistoryTypeId="5" PostId="12999" RevisionGUID="c47be217-70fd-44c0-b5f7-22d303f4266f" CreationDate="2011-06-09T15:30:14.913" UserId="7588" Comment="added 205 characters in body; added 56 characters in body" Text="Often games will use semi-transparent blocks with that good old 'wisp' effect that gives the impression of wind. A kind of white swirl in the direction the wind is, I'll try to find a sprite sheet to show you what I mean later.&#xD;&#xA;&#xD;&#xA;Here is a screenshot of a tile-based game some friends of mine made, you can see the wind represented by the white 'swirls' and it tiled pretty well.&#xD;&#xA;&#xD;&#xA;http://www.thomas-planques.com/wp-content/uploads/Level%20Design%205%20-%20Jump%20Gap.jpg&#xD;&#xA;&#xD;&#xA;Obviously, I am still looking for a sprite sheet with this sort of effect... :/&#xD;&#xA;&#xD;&#xA;As [Olhovsky](http://gamedev.stackexchange.com/users/5021/olhovsky) said, you could also use particles, this is really dependant on what type of 'feel' you want your game to have, you could mix particles with animated floor tiles (moving grass for example)." />
  <row Id="29783" PostHistoryTypeId="5" PostId="12999" RevisionGUID="3e8b3362-68ce-4807-a17c-18a78a1d3dde" CreationDate="2011-06-09T15:37:41.807" UserId="7588" Comment="added 137 characters in body" Text="Often games will use semi-transparent blocks with that good old 'wisp' effect that gives the impression of wind. A kind of white swirl in the direction the wind is, I'll try to find a sprite sheet to show you what I mean later.&#xD;&#xA;&#xD;&#xA;Here is a screenshot of a tile-based game some friends of mine made, you can see the wind represented by the white 'swirls' and it tiled pretty well.&#xD;&#xA;&#xD;&#xA;http://www.thomas-planques.com/wp-content/uploads/Level%20Design%205%20-%20Jump%20Gap.jpg&#xD;&#xA;&#xD;&#xA;[Here](http://www.panelmonkey.org/punbb/viewtopic.php?id=450) there are some prite sheets for special effects; the wind one looks more like a tornado, a bit of clever editing and transparency may help it 'calm down'.&#xD;&#xA;&#xD;&#xA;As [Olhovsky](http://gamedev.stackexchange.com/users/5021/olhovsky) said, you could also use particles, this is really dependant on what type of 'feel' you want your game to have, you could mix particles with animated floor tiles (moving grass for example)." />
  <row Id="29784" PostHistoryTypeId="6" PostId="13394" RevisionGUID="128df51f-bd25-40f9-9004-04b957af353b" CreationDate="2011-06-09T15:43:42.433" UserId="14" Comment="edited tags" Text="&lt;legal&gt;&lt;random&gt;&lt;generated&gt;" />
  <row Id="29785" PostHistoryTypeId="2" PostId="13410" RevisionGUID="8bd9fc8c-2a6d-4113-b4e2-1715bf646cf7" CreationDate="2011-06-09T15:59:45.813" UserId="7908" Text="If you need to promote your game for free, you can try appstrip.com, gamebarads.com or maudau.com" />
  <row Id="29786" PostHistoryTypeId="5" PostId="2761" RevisionGUID="a1618fea-8ba1-41d5-9082-22b42103d532" CreationDate="2011-06-09T16:11:53.400" UserId="51" Comment="deleted 100 characters in body" Text="Here is a pretty interesting article on [The Economics Of Facebook Games][1] that might help with monetizing your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://socialtimes.com/the-economics-of-facebook-games_b4280" />
  <row Id="29787" PostHistoryTypeId="5" PostId="13081" RevisionGUID="0a4b66f9-b3f0-42e7-90b0-3672195f4f6e" CreationDate="2011-06-09T16:33:10.577" UserId="6592" Comment="added 2013 characters in body" Text="Can anyone point me to some information on what a modern video card architecture looks like? I'm particularly interested in understanding how my rendering engine will be executed by the GPU.&#xD;&#xA;&#xD;&#xA;Ideally, I'd get two answers: one related to today's monster video cards and one related to today's mobile GPU's.&#xD;&#xA;&#xD;&#xA; -- edit follows&#xD;&#xA;&#xD;&#xA;Thanks for the input so far. Considering the proprietary and changing nature of video card hardware, it seems there's not the ideal answer that I was looking for. So I'll clarify and ask a couple very specific questions. (I guess I was hoping to get a resource similar to http://www.realityprime.com/articles/scenegraphs-past-present-and-future which would generally provide me with lots of information on hardware that might be relevant to me.)&#xD;&#xA;&#xD;&#xA;First off, I'm quite familiar with the OpenGL pipeline. A google-images search for my question title, &quot;video card architecture,&quot; reveals diagrams of various video cards which naturally seem to match the graphics pipeline. While this makes sense, and is helpful, it leaves out some details. I'll try to get at a couple specifics.&#xD;&#xA;&#xD;&#xA;1) What happens when a texture change (glBindTexture(), or new sampler specified) is issued? Obviously, the command is queued and later processed by the video card, but is the texture loaded immediately into cache, or not until something attempts to sample that texture? I would expect the latter, partly because the texture may not entirely fit into such caches to begin with. How big are these caches, anyway?&#xD;&#xA;&#xD;&#xA;2) Older video cards had hardware dedicated specifically for a given type of shader. Newer video cards reuse the same hardware for all types of shaders. Are these &quot;stream processors&quot; typically shared with other computations throughout the pipeline, such as culling?&#xD;&#xA;&#xD;&#xA;3) It seems that progress related to video card hardware has largely been lead by innovation in software. Are there any interesting cases where the opposite is true? I still hope that there might be some resource that gives a detailed history of video card design, similar to the scenegraphs article linked above.&#xD;&#xA;&#xD;&#xA;4) Mobile GPU was an ambiguous term. I'm hoping that eBusiness assumed I meant mobile as in laptop when he called me ignorant -- I was rather referring to the GPUs embedded in modern cell phones and tablets." />
  <row Id="29788" PostHistoryTypeId="2" PostId="13411" RevisionGUID="d875f241-8397-48be-a6c8-2a1e51b90806" CreationDate="2011-06-09T16:56:55.900" UserId="3622" Text="OK, [this](http://developer.download.nvidia.com/compute/cuda/2_0/docs/NVIDIA_CUDA_Programming_Guide_2.0.pdf) is the full blown programmers manual (and I think a dated one) for CUDA which gives a lot of details on the nvidia architecture. It seems overwhelming but if you just start going through it I think you will find that the diagrams along with the explanations of them can be very helpful. &#xD;&#xA;&#xD;&#xA;Its a single instruction multiple execution architecture (as I think all gpus are), meaning a single instruction is executed simultaneously on multiple threads. That makes it great for certain problems, like graphics, but not great for others (like your average cpu based program).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29789" PostHistoryTypeId="2" PostId="13412" RevisionGUID="a9c6e7e3-b910-484a-922e-4c77fdee8cbb" CreationDate="2011-06-09T16:58:05.757" UserId="1057" Text="As a casual flash gamer, I see lots of &quot;games&quot; released that are ... terrible. And that's an overstatement. But I'm wondering, are these developers onto something? Is this a comparatively good source of income, considering how much time a quality game takes to make? &#xD;&#xA;&#xD;&#xA;I'd like to consider it from a developer's perspective, though the concept may extend to all games and not just flash. Someone who wants to earn money - say, via sponsors (Amor Games, Crazy Monkey) or flash gaming sites (Kongregate, NewGrounds). (I don't think sponsors will sponsor a half-baked game, though). " />
  <row Id="29790" PostHistoryTypeId="1" PostId="13412" RevisionGUID="a9c6e7e3-b910-484a-922e-4c77fdee8cbb" CreationDate="2011-06-09T16:58:05.757" UserId="1057" Text="Game Publishing &amp; Income : Quality vs Quantity" />
  <row Id="29791" PostHistoryTypeId="3" PostId="13412" RevisionGUID="a9c6e7e3-b910-484a-922e-4c77fdee8cbb" CreationDate="2011-06-09T16:58:05.757" UserId="1057" Text="&lt;flash&gt;&lt;monetization&gt;&lt;development-speed&gt;" />
  <row Id="29792" PostHistoryTypeId="5" PostId="13411" RevisionGUID="6da9f0fa-3760-4a2a-a104-2087251e294f" CreationDate="2011-06-09T17:35:33.993" UserId="3622" Comment="deleted 285 characters in body" Text="OK, [this](http://developer.download.nvidia.com/compute/cuda/2_0/docs/NVIDIA_CUDA_Programming_Guide_2.0.pdf) is the full blown programmers manual (and I think a dated one) for CUDA which gives a lot of details on the nvidia architecture. It seems overwhelming but if you just start going through it I think you will find that the diagrams along with the explanations of them can be very helpful. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="29793" PostHistoryTypeId="2" PostId="13413" RevisionGUID="e5a40361-8340-4a60-9c2e-bc8bc19d40a7" CreationDate="2011-06-09T17:38:57.087" UserId="7910" Text="IIRC you can provide a mask to disable writes to specific channels.  Google 'D3DRS_COLORWRITEENABLE'." />
  <row Id="29794" PostHistoryTypeId="2" PostId="13414" RevisionGUID="93a00f73-6485-4ba4-9d23-b8c8bfb37f9b" CreationDate="2011-06-09T17:53:49.587" UserId="4584" Text="I'm pretty new to 3D development of any kind, nonetheless games. As I read through tutorials and examples, I find that the X/Y/Z coordinates seem a bit backwards than my first guess.&#xD;&#xA;&#xD;&#xA;I had imagined that if a person were walking around a field, their X/Y position would be changing and if they were to jump or walk up or down a hill, then their Z position would be changing. My assumptions appear to be wrong because walking around a field seems to change X/Z and jumping or going up/down a hill alters the Y.&#xD;&#xA;&#xD;&#xA;1) Are my observations correct? 3D is new to me and I may not be thinking about things properly.&#xD;&#xA;&#xD;&#xA;2) What's the logic behind horizontal movement being X/Z and vertical movement being Y?&#xD;&#xA;&#xD;&#xA;3) Would it be so wrong of me to use X/Y as horizontal movement and Z as vertical movement in the XNA Framework?" />
  <row Id="29795" PostHistoryTypeId="1" PostId="13414" RevisionGUID="93a00f73-6485-4ba4-9d23-b8c8bfb37f9b" CreationDate="2011-06-09T17:53:49.587" UserId="4584" Text="X, Y, Z coordinate standards?" />
  <row Id="29796" PostHistoryTypeId="3" PostId="13414" RevisionGUID="93a00f73-6485-4ba4-9d23-b8c8bfb37f9b" CreationDate="2011-06-09T17:53:49.587" UserId="4584" Text="&lt;orientation&gt;" />
  <row Id="29797" PostHistoryTypeId="2" PostId="13415" RevisionGUID="5260c18e-0d09-4f9d-a99e-5e06452095b6" CreationDate="2011-06-09T18:13:43.373" UserId="1156" Text="The idea is that the x and y axes stay the same - y is 'up' on the screen, and x is across. &#xD;&#xA;&#xD;&#xA;z - the third dimension, projects back into the screen (ignoring the issues of handedness here). In 3 dimensions this gets a bit odd, but for positioning things in screen space it makes more sense.&#xD;&#xA;&#xD;&#xA;3) You can if you want, but it would be painful and clunky. I would advise just to get used to the Z-projects-into/out of-the-monitor." />
  <row Id="29798" PostHistoryTypeId="2" PostId="13416" RevisionGUID="e5e8a0f1-96b6-4f32-884a-f06df7dfd9a8" CreationDate="2011-06-09T18:15:17.087" UserId="7911" Text="Imagine looking at a piece of paper held out in front of you with a chart on it, the axes are typically labeled X across the bottom and Y up the vertical; this leaves Z to be the outwards axis along the ground.&#xD;&#xA;&#xD;&#xA;It's merely a convention, but it's used a lot in graphics where we think of Z as the depth into the scene.&#xD;&#xA;&#xD;&#xA;In other fields like CAD your version would be more common.&#xD;&#xA;" />
  <row Id="29799" PostHistoryTypeId="25" PostId="13412" RevisionGUID="510b807c-1fa8-4f4c-b60c-20a44b9935af" CreationDate="2011-06-09T18:16:26.553" Comment="http://twitter.com/#!/StackGameDev/status/78888195894423552" />
  <row Id="29800" PostHistoryTypeId="2" PostId="13417" RevisionGUID="c80ecde9-a5c9-4af3-a50c-838e3f1dbc3a" CreationDate="2011-06-09T18:21:12.543" UserId="7630" Text="There has always been, and always will be, a market for schlock.&#xD;&#xA;&#xD;&#xA;REALLY terrible games will only appeal to the naive who get &quot;suckered&quot; ... not a good business model really.&#xD;&#xA;&#xD;&#xA;&quot;Low technical quality&quot; but fun little games can be good if they're priced right, a sort of &quot;how good does it have to be for a quarter&quot; (or whatever).&#xD;&#xA;&#xD;&#xA;Games that go beyond will do much better, imho.  There's enough schlock on the market that we have no need to go out of our way to generate any more ;-)&#xD;&#xA;&#xD;&#xA;In general ... in the iPhone app (etc) world especially I've found word of mouth to be one of the biggest drivers for popularity, and I've never recommended a &quot;terrible&quot; game.  To anyone.  Ever." />
  <row Id="29801" PostHistoryTypeId="2" PostId="13418" RevisionGUID="9b6d3802-abbe-4d36-8b55-76a130db2914" CreationDate="2011-06-09T18:32:34.873" UserId="1101" Text="Your assumptions aren't wrong: each engine treats these coordinates differently. Generally speaking X is almost always the East-West axis but whether Y or Z is the Altitude axis tends to vary. As I understand it, Quake 3, the Source Engine, and the Torque engine all have Z as up. So does the modelling tool 3DS Max. It's not uncommon.&#xD;&#xA;&#xD;&#xA;It makes sense to have a coordinate system that is ordered roughly in descending order of importance, so that flattening a representation into fewer dimensions is easier to understand. For example, if your game is set on a 2D height map, it makes sense for Z to be 'up', because then your X and Y coordinates in the 3D world map directly to the X and Y coordinates on the height map. On the other hand, if you think primarily in terms of rendering (and many game engine developers do), you're used to X and Y being the screen coordinates, so adding a 3rd axis naturally goes in or out of the screen.&#xD;&#xA;&#xD;&#xA;Use what is easiest for you, but be aware that any choice is arbitrary and that you may need to convert between them and use multiple coordinate systems within one program." />
  <row Id="29802" PostHistoryTypeId="2" PostId="13419" RevisionGUID="b93a610c-cb93-4735-9198-ceb151754d1c" CreationDate="2011-06-09T19:04:06.580" UserId="7914" Text="How can I rotate my view around a model? My model has a rotation. If this rotation changed, my view should also change.&#xD;&#xA;&#xD;&#xA;The camera should be behind the model everytime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you very much!" />
  <row Id="29803" PostHistoryTypeId="1" PostId="13419" RevisionGUID="b93a610c-cb93-4735-9198-ceb151754d1c" CreationDate="2011-06-09T19:04:06.580" UserId="7914" Text="Rotate the camera around the model in XNA?" />
  <row Id="29804" PostHistoryTypeId="3" PostId="13419" RevisionGUID="b93a610c-cb93-4735-9198-ceb151754d1c" CreationDate="2011-06-09T19:04:06.580" UserId="7914" Text="&lt;xna&gt;&lt;3d&gt;&lt;xna-4.0&gt;" />
  <row Id="29805" PostHistoryTypeId="2" PostId="13420" RevisionGUID="697c1eb6-8bef-4150-8a16-d089dfa5b74a" CreationDate="2011-06-09T19:06:05.490" UserId="7915" Text="Has anyone tried to develop, or now of an algorithm such as used in a typical turn based game like Advance Wars, where the number of objects and the number of moves per object may be too large to search through upto a reasonable depth like one would do in a game with a smaller search base like chess?&#xD;&#xA;&#xD;&#xA;There is some pathfinding to do to engage into combat or harvest, or move to an object, so that in the next move such actions are possible.&#xD;&#xA;&#xD;&#xA;With this you can build a search tree for each item, resulting in a large tree for all items. With a cost function one can determine the best moves.&#xD;&#xA;&#xD;&#xA;Then the board flips over to the player role (min/max) and the computer searches the best player move, and flips back etc. upto a number of cycles deep.&#xD;&#xA;&#xD;&#xA;Finally it has found the best move and now it's the players turn. But he may be asleep by now...&#xD;&#xA;&#xD;&#xA;So how is this done in practice?&#xD;&#xA;&#xD;&#xA;I have found several good sources on A*, DFS, BFS, evaluation / cost functions etc. But as of yet I do not see how I can put it all together.&#xD;&#xA;&#xD;&#xA;Jan" />
  <row Id="29806" PostHistoryTypeId="1" PostId="13420" RevisionGUID="697c1eb6-8bef-4150-8a16-d089dfa5b74a" CreationDate="2011-06-09T19:06:05.490" UserId="7915" Text="Which algorithm used in Advance Wars type turn based games" />
  <row Id="29807" PostHistoryTypeId="3" PostId="13420" RevisionGUID="697c1eb6-8bef-4150-8a16-d089dfa5b74a" CreationDate="2011-06-09T19:06:05.490" UserId="7915" Text="&lt;algorithm&gt;&lt;path-finding&gt;&lt;turn-based&gt;&lt;strategy&gt;&lt;chess&gt;" />
  <row Id="29808" PostHistoryTypeId="2" PostId="13421" RevisionGUID="484e8351-c12a-4215-93ac-92a8a49670f0" CreationDate="2011-06-09T19:10:57.907" UserId="7369" Text="1) Yes your observations are correct. &#xD;&#xA;&#xD;&#xA;2) The standard global XYZ coordinate system makes sense when you think in terms of a first person shooter, when you are looking through the eyes of a character in the scene with a blank(identity) transformation matrix. Like it would when you draw a coordinate system on a piece of paper, X points to right and Y points upwards. According to the right hand rule (x-&gt;thumb, y-&gt;index finger, z-&gt;middle finger), Z points towards you. &#xD;&#xA;&#xD;&#xA;3) It wouldn't be wrong, but it would be a diversion from standards. There are three problems that I can think of at the moment: (a) Let's say one day you want to use a physics library that uses the standard coordinate frame. If you did not follow the standard, now you have to think about the transformation that takes you from your world to the physics world. Can get annoying when you want to fix a bug. (b) When you want to share code with someone, or bring someone over to help with development, they have to get used to your convention. (c) When using standard 3D models, you always have to have a transformation above them to prevent them from looking sideways. &#xD;&#xA;&#xD;&#xA;Now to add to question 2, it is sooo useful to think of X, Y, and Z as not just three letters, but as right, up and backwards. Every character in the scene has a local coordinate system attached to them, and in their local coordinate frames X is always right, Y is up and Z is backwards. Once you have this, now you can make sense of vectors that you print out, or write your algorithms in a way that makes sense. Let's say you have two characters A and B, and you want to do something if one of them is facing the other. You can simply find B's location in A's coordinate frame (Ta^-1 * p_b), look at the vector you get and see if Z(backwards) is negative and X(right) and Y(up) are small, because that vector tells you how much backwards, right and up B is with respect to A. &#xD;&#xA;" />
  <row Id="29809" PostHistoryTypeId="2" PostId="13422" RevisionGUID="08b1bfd8-28c7-45d2-8ac7-05565b5a9ab5" CreationDate="2011-06-09T19:13:22.970" UserId="7916" Text="I'm developing a (scroll) game and i'm getting weird messages in LogCat:&#xD;&#xA;&#xD;&#xA;- lock_layer() timed out but didn't appear to need to be locked and we recovered(..)&#xD;&#xA;- lock_layer timed out (is the CPU pegged?)...&#xD;&#xA;- executeScheduledBrodcasts() skipped, contention on the client. We'll try again later.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it looks like the rendering takes too long and causes the warning (i'm drawing ~ 50 images every frame), but is this the emulator fault? When i test it on a device (sony ericsson xperia x8), running 1.6, i don't see any lag or any performance drops (i get ~ 60fps).&#xD;&#xA;I get this warning only in android 1.6.&#xD;&#xA;&#xD;&#xA;Should i ignore it? Could it cause the game to crash? Am i doing something horribly wrong or is it a bug? &#xD;&#xA;&#xD;&#xA;Run code:&#xD;&#xA;&#xD;&#xA;      while(running) {&#xD;&#xA;        try {&#xD;&#xA;           c = holder.lockCanvas(null);&#xD;&#xA;           synchronized(holder) {&#xD;&#xA;               // getElements - returns a Vector of elements to be drawn relative to camera&#xD;&#xA;               elements = collection.getElements(cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;               for(int i =0 ; i &lt; elements.size(); i++) {&#xD;&#xA;                  // draw the element according to camera&#xD;&#xA;                  c.drawBitmap(image,elements.get(i).x,elements.get(i).y);&#xD;&#xA;               }&#xD;&#xA;           }    &#xD;&#xA;&#xD;&#xA;        } finally {&#xD;&#xA;           holder.unloackCanvasAndPost(c);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for the reply's.&#xD;&#xA;&#xD;&#xA;Regards, J." />
  <row Id="29810" PostHistoryTypeId="1" PostId="13422" RevisionGUID="08b1bfd8-28c7-45d2-8ac7-05565b5a9ab5" CreationDate="2011-06-09T19:13:22.970" UserId="7916" Text="android game - lock_layer timed out" />
  <row Id="29811" PostHistoryTypeId="3" PostId="13422" RevisionGUID="08b1bfd8-28c7-45d2-8ac7-05565b5a9ab5" CreationDate="2011-06-09T19:13:22.970" UserId="7916" Text="&lt;game-design&gt;&lt;2d&gt;&lt;android&gt;" />
  <row Id="29812" PostHistoryTypeId="2" PostId="13423" RevisionGUID="04bbaa2b-41ac-4e30-bcc3-7490da481a58" CreationDate="2011-06-09T19:53:03.483" UserId="7709" Text="	&#xD;&#xA;&#xD;&#xA;How can i check/inspect the performance of my network game via Wireshark,i want to test the performance of my network game. which kind of graphs can be helpful and give me the idea of network performance of my game? i m really newbie to networking so i m unable to decide.&#xD;&#xA;&#xD;&#xA;any ideas,&#xD;&#xA;&#xD;&#xA;thanks,&#xD;&#xA;&#xD;&#xA;Jibbylala&#xD;&#xA;" />
  <row Id="29813" PostHistoryTypeId="1" PostId="13423" RevisionGUID="04bbaa2b-41ac-4e30-bcc3-7490da481a58" CreationDate="2011-06-09T19:53:03.483" UserId="7709" Text="Network Game testing via Wireshark." />
  <row Id="29814" PostHistoryTypeId="3" PostId="13423" RevisionGUID="04bbaa2b-41ac-4e30-bcc3-7490da481a58" CreationDate="2011-06-09T19:53:03.483" UserId="7709" Text="&lt;java&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;performance&gt;&lt;testing&gt;" />
  <row Id="29815" PostHistoryTypeId="2" PostId="13424" RevisionGUID="60c3e67f-d8d7-4f4c-afb1-3b17aa71e66e" CreationDate="2011-06-09T20:05:26.673" UserId="4496" Text="One thing you can do is to position your camera such that the mounting point is 0, 0 relative to the camera.  So a camera position of (0, 100, 50) would be up by 100 and back by 50 from the model you want it to follow.  &#xD;&#xA;&#xD;&#xA;From there, apply the rotation matrix for the model on the camera's position, this will rotate the offset to the proper position given the rotation of the model.  From here simply add the model's Position to the camera's and voila, you have the correct new position!&#xD;&#xA;&#xD;&#xA;Now your camera is positioned properly, but your camera is still pointing in the same direction it was before.  From here you can either set the LookAt to some position based on the model's world position or rotate your LookAt in a similar fashion to the method used on the camera's position.&#xD;&#xA;&#xD;&#xA;Make sure when you rotate your camera's Position or LookAt that it is based on a variable separate from the one you will use to construct your assorted camera matrices.  If you only store the current value for the position you are at, and you say to rotate 90 degrees, it can continue to spin every frame!  You can still change these starting values for camera effects, just make sure that they are relative changes (such as +y to make the camera go up or +x to view over the right side of your mounted model)" />
  <row Id="29816" PostHistoryTypeId="2" PostId="13425" RevisionGUID="b573cde5-7fd5-4ef1-b4df-e3131670ae13" CreationDate="2011-06-09T20:10:12.957" UserId="5497" Text="I think Dan Bunten's [Global Conquest][1] fits your definition. Players issued gave movement and action instructions to all of their units and then all of the orders were executed at once.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/global-conquest" />
  <row Id="29817" PostHistoryTypeId="5" PostId="13423" RevisionGUID="2ce1283f-45e5-4767-8640-8d6a0a9bb699" CreationDate="2011-06-09T20:50:27.960" UserId="51" Comment="deleted 92 characters in body" Text="I want to test the performance of my network game.	&#xD;&#xA;&#xD;&#xA;How can I check/inspect the performance of my network game via Wireshark?  Which kinds of graphs can be helpful and give me the idea of network performance of my game? &#xD;&#xA;" />
  <row Id="29818" PostHistoryTypeId="5" PostId="13422" RevisionGUID="3d58da5b-e707-4121-a86c-4b10250a4cb3" CreationDate="2011-06-09T20:51:03.607" UserId="51" Comment="deleted 42 characters in body; edited tags" Text="I'm developing a (scroll) game and i'm getting weird messages in LogCat:&#xD;&#xA;&#xD;&#xA;- lock_layer() timed out but didn't appear to need to be locked and we recovered(..)&#xD;&#xA;- lock_layer timed out (is the CPU pegged?)...&#xD;&#xA;- executeScheduledBrodcasts() skipped, contention on the client. We'll try again later.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it looks like the rendering takes too long and causes the warning (i'm drawing ~ 50 images every frame), but is this the emulator fault? When i test it on a device (sony ericsson xperia x8), running 1.6, i don't see any lag or any performance drops (i get ~ 60fps).&#xD;&#xA;I get this warning only in android 1.6.&#xD;&#xA;&#xD;&#xA;Should i ignore it? Could it cause the game to crash? Am i doing something horribly wrong or is it a bug? &#xD;&#xA;&#xD;&#xA;Run code:&#xD;&#xA;&#xD;&#xA;      while(running) {&#xD;&#xA;        try {&#xD;&#xA;           c = holder.lockCanvas(null);&#xD;&#xA;           synchronized(holder) {&#xD;&#xA;               // getElements - returns a Vector of elements to be drawn relative to camera&#xD;&#xA;               elements = collection.getElements(cameraX,cameraY,cameraWidth,cameraHeight);&#xD;&#xA;               for(int i =0 ; i &lt; elements.size(); i++) {&#xD;&#xA;                  // draw the element according to camera&#xD;&#xA;                  c.drawBitmap(image,elements.get(i).x,elements.get(i).y);&#xD;&#xA;               }&#xD;&#xA;           }    &#xD;&#xA;&#xD;&#xA;        } finally {&#xD;&#xA;           holder.unloackCanvasAndPost(c);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;" />
  <row Id="29819" PostHistoryTypeId="6" PostId="13422" RevisionGUID="3d58da5b-e707-4121-a86c-4b10250a4cb3" CreationDate="2011-06-09T20:51:03.607" UserId="51" Comment="deleted 42 characters in body; edited tags" Text="&lt;2d&gt;&lt;android&gt;" />
  <row Id="29820" PostHistoryTypeId="6" PostId="13178" RevisionGUID="21574be2-fd39-4eca-b535-8ed40d626e7f" CreationDate="2011-06-09T21:08:30.297" UserId="14" Comment="edited tags" Text="&lt;java&gt;&lt;physics&gt;&lt;euler-method&gt;" />
  <row Id="29821" PostHistoryTypeId="25" PostId="13414" RevisionGUID="8ec6813e-d3b4-4c10-8805-226f97791393" CreationDate="2011-06-09T21:16:27.583" Comment="http://twitter.com/#!/StackGameDev/status/78933498383175680" />
  <row Id="29822" PostHistoryTypeId="2" PostId="13426" RevisionGUID="0aa6b3fe-e71e-435c-9d1f-85aabec195a9" CreationDate="2011-06-09T22:01:46.643" UserId="7328" Text="if you are only asking about the path finding problem you can use your answer in [this question](http://gamedev.stackexchange.com/questions/12959/looking-for-a-good-technique-for-character-movement-in-hackslash-game/), but for the whole idea of how to implement an AI read the rest of my answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It's not always finding algorithm like A* that decide what AI should do, usually for games with too many possiblities they use some [state-machine](http://en.wikipedia.org/wiki/Finite-state_machine) that controls the actions and those search algorithm are used both to describe how choosed action should be done and to extrant usable information from all the game data.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for example i've been in robocup soccer simulatoin 3d team. the game is just like real soccer with some humanoid robots moving inside the field but the problem is you only have control over joints of robot body, so you have at first try not to lose your balance while moving! I think this problem is just as hard as implementing AI for an strategy game. in our team (and other teams in league) there was 3 stages of thinking: first to understand what server told us about the game field. server describes field using relative positions to the player so we have to transform all the input to undestand world position of object seen. then we had to choose which action should player do. should it run toward the ball? or is the robot already in possession of the ball and should kick it? or should he pass it to another player? and so on. this was decided using a state machine. and the last stage was to describe how the should we do the action state machine chose. for example if it's running how should I run to maintain my balance, or if I fall what should I do to stand up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;so to apply this approch to your AI problem, first we have gather all the input we can, in an strategy game it can be number units their position and their type. remember if you want your AI to act normal you can't give it any information on the map, if the player can't see what the AI is doing, AI shouldn't be able to know what's happening in player's base. then you have to extract useful information from that data. for example it's not really important if your opponent has many units far away from you, the only important ones are the ones near. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;next step is to decide about high concept of what your AI should do in the next turn. just think as a general, you have some information, and for any action you order, your soldiors know how they should obey. so based on the information you just give an order, it can be moving units to some specific point or constructng a building or what ever you think you have to do at the moment. so there is a list of data, and a list of possible high level actions. it's usual to use an state-machine to determine for each dataset which action is better. in this stage state machine can also use algorithm to generate new data to help itself decide. for example based on the position of the units you can use A* to determine minimum time needed to gather your soldiers around opponents base.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and for the last step you have to translate those high concept orders to game level commands. for example you've already defined for tanks how to move to the point a player assigns them using a click. so you can easily traslate what your state machine decides to the available user commands, like mouse clicks or keyboard shortcuts. you can also implement your AI version of controls like setting the exact position of AI units for the next step, but remember giving your AI much more abilies may lead to unrealistic AI opponent." />
  <row Id="29823" PostHistoryTypeId="2" PostId="13427" RevisionGUID="5aa4d566-6170-487c-9ee0-494bea953bb5" CreationDate="2011-06-09T22:04:05.127" UserId="6085" Text="In lots of multiplayer games there is the option for LAN play. My question though is how does a client know where a server is on the LAN?&#xD;&#xA;&#xD;&#xA;The only ways I can think of&#xD;&#xA;&#xD;&#xA; 1. Send out broadcasts over the broadcast address. This has the disadvantage of being filtered sometimes by routers or switches in different network environments. &#xD;&#xA; 2. Attempt to connect to a server on every IP in your subnet. This has the disadvantage of being slow (Especially if the network uses 10.XXX.XXX.XXX for their IPs) and a mini ddos attack, but isn't going to be filtered.&#xD;&#xA;&#xD;&#xA;How do games do this especially in other network environments?" />
  <row Id="29824" PostHistoryTypeId="1" PostId="13427" RevisionGUID="5aa4d566-6170-487c-9ee0-494bea953bb5" CreationDate="2011-06-09T22:04:05.127" UserId="6085" Text="How do game clients know that a server is running on their LAN?" />
  <row Id="29825" PostHistoryTypeId="3" PostId="13427" RevisionGUID="5aa4d566-6170-487c-9ee0-494bea953bb5" CreationDate="2011-06-09T22:04:05.127" UserId="6085" Text="&lt;multiplayer&gt;" />
  <row Id="29826" PostHistoryTypeId="2" PostId="13428" RevisionGUID="497b44eb-efd3-41e8-bc6d-1c4519d2e76c" CreationDate="2011-06-09T22:18:14.157" UserId="7728" Text="For games with LAN play, the standard thing to do is for the clients to send broadcast packets to discover servers.  (The client sends a broadcast, the server sends a direct reply to the client)  &#xD;&#xA;&#xD;&#xA;In general, the client will send somewhere between three and five broadcast messages, each about a second apart, and will then decide that there must be no server if it hasn't heard any reply within that time.  Sending multiple packets makes service discovery a little more packet-loss-tolerant (though that is pretty uncommon on LANs), and having time between them keeps them from disrupting other network traffic too much.  &#xD;&#xA;&#xD;&#xA;Nobody (to my knowledge) does your option #2, because it will degrade performance of the LAN (or will take quite a while, if you stagger the connection attempts).&#xD;&#xA;&#xD;&#xA;But to cope with cases where broadcast is filtered by the local LAN (which is quite unusual, but not unheard-of), most games will allow players to directly enter an IP address to connect to.  This allows players in these sorts of situations to connect to a known server, even it they can't broadcast to automatically find it.&#xD;&#xA;&#xD;&#xA;For games over the internet, clients will send a direct request to a static *meta server*, which replies with the addresses for known current server instances.  Servers, likewise, contact that meta server to inform them of their own location so that clients can be directed to them.  Due to the complexities of NAT, though, this approach usually does not work for servers hosted inside a LAN.  This is why this sort of approach is not typically used for LAN games." />
  <row Id="29827" PostHistoryTypeId="5" PostId="13428" RevisionGUID="326635c8-dd05-49a7-80fb-28df85704c90" CreationDate="2011-06-09T22:27:33.457" UserId="7728" Comment="Added extra side note." Text="For games with LAN play, the standard thing to do is for the clients to send broadcast packets to discover servers.  (The client sends a broadcast, the server sends a direct reply to the client)  &#xD;&#xA;&#xD;&#xA;In general, the client will send somewhere between three and five broadcast messages, each about a second apart, and will then decide that there must be no server if it hasn't heard any reply within that time.  Sending multiple packets makes service discovery a little more packet-loss-tolerant (though that is pretty uncommon on LANs), and having time between them keeps them from disrupting other network traffic too much.  &#xD;&#xA;&#xD;&#xA;Nobody (to my knowledge) does your option #2, because it will degrade performance of the LAN (or will take quite a while, if you stagger the connection attempts).&#xD;&#xA;&#xD;&#xA;But to cope with cases where broadcast is filtered by the local LAN (which is quite unusual, but not unheard-of), most games will allow players to directly enter an IP address to connect to.  This allows players in these sorts of situations to connect to a known server, even it they can't broadcast to automatically find it.&#xD;&#xA;&#xD;&#xA;For games over the internet, clients will send a direct request to a static **meta server**, which replies with the addresses for known current server instances.  Servers, likewise, contact that meta server to inform them of their own location so that clients can be directed to them.  Due to the complexities of NAT, though, this approach usually does not work for servers hosted inside a LAN.  This is why this sort of approach is not typically used for LAN games.&#xD;&#xA;&#xD;&#xA;Extra side note:  It's common practice for internet games to contact a **point server** first.  The point server tells the game on what address it can find the meta server, which will tell it where servers can be found.  Point servers are often (though certainly not always) implemented as a simple web server, and are the only piece of this system with an address that is hardcoded into the game.  This allows game developers to move their meta server around from one machine to another as required, simply by updating the address returned by the point server.  It can also be used to implement a simple form of load-balancing or region-switching by having the point server send users to different meta servers based upon server load or geographical proximity." />
  <row Id="29828" PostHistoryTypeId="5" PostId="13423" RevisionGUID="fc9d0879-edc9-489e-bdba-0a8cbf923b03" CreationDate="2011-06-09T22:32:24.233" UserId="7709" Comment="added 169 characters in body" Text="&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;How can i check/inspect the performance of my network game via **Wireshark** and **specifically the Graphs available in Wireshark**,i want to test the performance of my network game. which kind of graphs can be helpful and relevant  and give me the idea of network performance of my game? i m really newbie to networking so i m unable to decide.&#xD;&#xA;&#xD;&#xA;any ideas,&#xD;&#xA;&#xD;&#xA;thanks,&#xD;&#xA;&#xD;&#xA;Jibbylala&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29829" PostHistoryTypeId="5" PostId="13423" RevisionGUID="8cd45b7e-f3a9-4f16-a44b-de6f078b20b6" CreationDate="2011-06-09T23:59:54.933" UserId="51" Comment="deleted 47 characters in body" Text="How can i check/inspect the performance of my network game via **Wireshark** and **specifically the Graphs available in Wireshark**,i want to test the performance of my network game. which kind of graphs can be helpful and relevant  and give me the idea of network performance of my game? i m really newbie to networking so i m unable to decide.&#xD;&#xA;" />
  <row Id="29830" PostHistoryTypeId="25" PostId="13423" RevisionGUID="86029030-dd64-4671-ad5b-1993360d09f8" CreationDate="2011-06-10T00:16:28.017" Comment="http://twitter.com/#!/StackGameDev/status/78978798888042496" />
  <row Id="29831" PostHistoryTypeId="2" PostId="13429" RevisionGUID="419300b5-b579-460e-b673-01c8eb03d948" CreationDate="2011-06-10T00:30:00.540" UserId="7710" Text="I created a button class which draw a button on the screen. When I click on it, I want to see something happening. In WinForm, I would simply use the event OnClick of the button. What about XNA? &#xD;&#xA;&#xD;&#xA;Should I add an OnClick event to my button class? Is that a good practice? Otherwise, how do you handle events in your game loop? " />
  <row Id="29832" PostHistoryTypeId="1" PostId="13429" RevisionGUID="419300b5-b579-460e-b673-01c8eb03d948" CreationDate="2011-06-10T00:30:00.540" UserId="7710" Text="Should I use Events in a XNA Game?" />
  <row Id="29833" PostHistoryTypeId="3" PostId="13429" RevisionGUID="419300b5-b579-460e-b673-01c8eb03d948" CreationDate="2011-06-10T00:30:00.540" UserId="7710" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;.net&gt;&lt;events&gt;" />
  <row Id="29834" PostHistoryTypeId="2" PostId="13430" RevisionGUID="995517ed-024a-4e4e-acab-f9c709d50875" CreationDate="2011-06-10T00:50:15.110" UserId="7328" Text="There are three common approches I saw in game engines, I'm not sure about XNA supporting all three but here they are :&#xD;&#xA;&#xD;&#xA;1. you can inherite a class from your button class and override OnClickFunction in your CustomButton class. The benefit is you don't have to check if the button is pressed it informed you whenever it's clicked but it may cause to overuse of inheritence.&#xD;&#xA;&#xD;&#xA;2. you can define some function OnClick and pass it to OnClickEvent butten class (just like normal c# event handleing). this has the same benefit as the previous one and you don't need to worry for inheritence overuse.&#xD;&#xA;&#xD;&#xA;3. you have to check in your main loop if this button is clicked or not. in this method it's not realy event. so the disadvantage is you have to check yourself whenever you have to do somthing based on button inputs but it has a advantage that you can control where the buttons really are checked and take effect.&#xD;&#xA;" />
  <row Id="29835" PostHistoryTypeId="2" PostId="13431" RevisionGUID="47491ee7-9120-4ebd-8493-a46620da998d" CreationDate="2011-06-10T01:02:20.087" UserId="1430" Text="It's perfectly acceptable to use events to handle things like clicks and other interaction with your button interface; it's certainly a superior method to the one that involves subclassing the `Button` type to implement customized behavior. &#xD;&#xA;&#xD;&#xA;Another uncommon alternative is to attach scripts to buttons and other UI elements, but this is more involved (unless you already have a robust scripting system in place) and not neccessarily better anyhow.&#xD;&#xA;&#xD;&#xA;You may also want to look into the concept of &quot;[immediate mode GUIs][1],&quot; which provide for another way of handling input.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://mollyrocket.com/forums/viewtopic.php?t=134" />
  <row Id="29836" PostHistoryTypeId="2" PostId="13432" RevisionGUID="77fac6a1-3628-43dc-a273-ae93893e7750" CreationDate="2011-06-10T01:57:47.863" UserId="7548" Text="Tools like WireShark are excellent (partly because they're free and open source, but also because the functionality they offer is fantastic), but they'll only be useful with regards to knowing what's going on on your network.&#xD;&#xA;&#xD;&#xA;Some things to keep in mind when developing network communications for your network game:&#xD;&#xA;&#xD;&#xA;* Minimize the number of packets (e.g., send an error code with a text description in one packet instead of separating these items into two separate packets).&#xD;&#xA;&#xD;&#xA;* Send the smallest pieces of information possible (e.g., design your protocol to send a single byte code for &quot;use weapon&quot; or &quot;move forward one tile&quot; instead of sending a command like &quot;USE WEAPON&quot; or &quot;MOVE FORWARD&quot;).&#xD;&#xA;&#xD;&#xA;To test out your networking, set up some separate hosts on your network and start transferring large amounts of data between them to saturate your network (tools like WireShark will be very helpful here because you'll be able to see what's going on with your network during this time), then see how your game performs.&#xD;&#xA;&#xD;&#xA;What you want to do is to create a scenario where your game will lag, and then you want to see how your game works during these lag times.  I'd venture a guess that one very common scenario would be that the players are also running torrent transfers in the background (possibly without even realizing that they are, either because the application minimizes to a System Tray icon {out of sight, out of mind}, or they have SpyWare installed {anyone remember KaZaa?}), so you may want to test your game with these sorts of things running as well to see how your game performs.&#xD;&#xA;&#xD;&#xA;I recommend you put a lot of careful thought into your protocol.  Ask yourself questions like &quot;What commands will the player likely be triggering more often?&quot;  The less common commands could be two bytes or longer while the more common ones should be kept to one byte.  Another advantage of using byte codes for commands is that fewer CPU cycles are required for command generation and parsing, which means that the rest of the game play gets more processing power to make the overall experience just a little bit better for the players.&#xD;&#xA;" />
  <row Id="29837" PostHistoryTypeId="2" PostId="13433" RevisionGUID="6a694157-82a8-49b3-aa74-c8aba9e31acc" CreationDate="2011-06-10T02:56:49.053" UserId="2229" Text="I have created an **object movement path** in a *3D authoring application*. Then, I **exported the path** (100 frames) into my custom text file in the form of **Euler Angles**.&#xD;&#xA;&#xD;&#xA;The next point was loading the animation into my game. To make it smoother, I performed **linear interpolation** between all the animation frames. Because of the interpolation, the object was moving correctly and **smoothly, in about 80% of its path**. In the **remaining 20%**, it **jumps once to different orientation** for a moment. Then, it jumps back, and smoothly finishes remaining of the path.&#xD;&#xA;&#xD;&#xA;Do I face **Gimbal Lock** issue, please? Is there any way of fixing it? My tests have proven, that linear interpolation, which I perform, is correct. However, without linear interpolation, the object does not introduce this smoothness issue. Without interpolation, the object movement is obviously more aliased.&#xD;&#xA;&#xD;&#xA;*To summarize:* Could I kndly ask to confirm that the issue I have here is gimbal lock? Can I ask for practical solution, please? Thank you.&#xD;&#xA;&#xD;&#xA;*I am adding the animation data. The **issue occurs somewhere after frame 80**.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Animation Data&#xD;&#xA;--------------&#xD;&#xA;The *Animation data* might help you. It is stored in the format: `PosX, PosY, PosZ, RotX, RotY, RotZ, SclX, SclY, SclZ`.&#xD;&#xA;&#xD;&#xA;    #new animation###############&#xD;&#xA;    &lt;&#xD;&#xA;    no TopRightApproach&#xD;&#xA;    np Scene_Root&#xD;&#xA;    &#xD;&#xA;    #begin 100 animation frames&#xD;&#xA;    as 100&#xD;&#xA;    a 8.984154 9.694528 10009.996094 -180.001068 85.938065 -89.102135 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.987644 9.461698 10006.712891 -179.542618 85.955078 -89.218880 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.995170 8.773152 9996.920898 -178.195877 86.005127 -89.568436 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.998324 7.653935 9980.741211 -176.004623 86.085548 -90.150589 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.984107 6.137118 9958.277344 -173.016205 86.192795 -90.968750 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.935911 4.263794 9929.640625 -169.279999 86.322464 -92.028351 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.834530 2.078479 9894.919922 -164.849365 86.469925 -93.338814 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.659353 -0.368791 9854.232422 -159.778748 86.630211 -94.910629 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.389198 -3.028332 9807.674805 -154.125946 86.798615 -96.757645 1.000000 1.000000 1.000000&#xD;&#xA;    a 8.003077 -5.851116 9755.331055 -147.951019 86.970734 -98.895927 1.000000 1.000000 1.000000&#xD;&#xA;    a 7.481458 -8.786425 9697.345703 -141.313080 87.142395 -101.340607 1.000000 1.000000 1.000000&#xD;&#xA;    a 6.806078 -11.788560 9633.822266 -134.272385 87.310028 -104.107964 1.000000 1.000000 1.000000&#xD;&#xA;    a 5.960865 -14.813670 9564.890625 -126.886299 87.470482 -107.211334 1.000000 1.000000 1.000000&#xD;&#xA;    a 4.931985 -17.821638 9490.685547 -119.207855 87.621101 -110.659729 1.000000 1.000000 1.000000&#xD;&#xA;    a 3.707599 -20.777081 9411.324219 -111.282890 87.759743 -114.454948 1.000000 1.000000 1.000000&#xD;&#xA;    a 2.278911 -23.646814 9326.969727 -103.144257 87.884651 -118.585815 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.638988 -26.402788 9237.757813 -94.811073 87.994583 -123.027390 1.000000 1.000000 1.000000&#xD;&#xA;    a -1.216847 -29.020498 9143.830078 -86.285469 88.088776 -127.737762 1.000000 1.000000 1.000000&#xD;&#xA;    a -3.291077 -31.478796 9045.333984 -77.551552 88.166946 -132.656998 1.000000 1.000000 1.000000&#xD;&#xA;    a -5.583939 -33.759590 8942.430664 -68.577599 88.229309 -137.709320 1.000000 1.000000 1.000000&#xD;&#xA;    a -8.094282 -35.848312 8835.259766 -59.323414 88.276596 -142.810486 1.000000 1.000000 1.000000&#xD;&#xA;    a -10.819101 -37.732933 8723.966797 -49.746075 88.309952 -147.873535 1.000000 1.000000 1.000000&#xD;&#xA;    a -13.753524 -39.403763 8608.709961 -39.808613 88.330864 -152.817459 1.000000 1.000000 1.000000&#xD;&#xA;    a -16.891382 -40.853546 8489.634766 -29.487383 88.341103 -157.574615 1.000000 1.000000 1.000000&#xD;&#xA;    a -20.225103 -42.077068 8366.883789 -18.776186 88.342537 -162.094757 1.000000 1.000000 1.000000&#xD;&#xA;    a -23.745558 -43.070892 8240.607422 -7.687020 88.337074 -166.345886 1.000000 1.000000 1.000000&#xD;&#xA;    a -27.442255 -43.833294 8110.949707 3.750950 88.326576 -170.313156 1.000000 1.000000 1.000000&#xD;&#xA;    a -31.303263 -44.364086 7978.052734 15.494358 88.312828 -173.995956 1.000000 1.000000 1.000000&#xD;&#xA;    a -35.315113 -44.664520 7842.061035 27.489048 88.297478 -177.404449 1.000000 1.000000 1.000000&#xD;&#xA;    a -39.462746 -44.737206 7703.111328 39.673283 88.282089 -180.556396 1.000000 1.000000 1.000000&#xD;&#xA;    a -43.729130 -44.586052 7561.345215 51.980412 88.268150 -183.474457 1.000000 1.000000 1.000000&#xD;&#xA;    a -48.095078 -44.216312 7416.899902 64.340660 88.257141 -186.184448 1.000000 1.000000 1.000000&#xD;&#xA;    a -52.539017 -43.634575 7269.907227 76.681992 88.250580 -188.714432 1.000000 1.000000 1.000000&#xD;&#xA;    a -57.036156 -42.848896 7120.494141 88.930428 88.250122 -191.094437 1.000000 1.000000 1.000000&#xD;&#xA;    a -61.557461 -41.869068 6968.793457 101.009323 88.257713 -193.357132 1.000000 1.000000 1.000000&#xD;&#xA;    a -66.068169 -40.707054 6814.946777 112.837379 88.275726 -195.539856 1.000000 1.000000 1.000000&#xD;&#xA;    a -70.527527 -39.377113 6659.050781 124.323631 88.307304 -197.689606 1.000000 1.000000 1.000000&#xD;&#xA;    a -74.883102 -37.897480 6501.245605 135.359741 88.356773 -199.870743 1.000000 1.000000 1.000000&#xD;&#xA;    a -79.073669 -36.288589 6341.615723 145.780823 88.423538 -202.204208 1.000000 1.000000 1.000000&#xD;&#xA;    a -83.048775 -34.563198 6180.319824 155.424957 88.500549 -204.807938 1.000000 1.000000 1.000000&#xD;&#xA;    a -86.761948 -32.734024 6017.475098 164.176315 88.589706 -207.753723 1.000000 1.000000 1.000000&#xD;&#xA;    a -90.160110 -30.820969 5853.197266 171.880707 88.693443 -211.151733 1.000000 1.000000 1.000000&#xD;&#xA;    a -93.182159 -28.853851 5687.632324 178.311142 88.814514 -215.184875 1.000000 1.000000 1.000000&#xD;&#xA;    a -95.760071 -26.874413 5520.888672 183.514175 88.955826 -220.189575 1.000000 1.000000 1.000000&#xD;&#xA;    a -97.817413 -24.940729 5353.116211 187.123825 89.119591 -226.856110 1.000000 1.000000 1.000000&#xD;&#xA;    a -99.271843 -23.130093 5184.452637 187.359161 89.304878 -236.833206 1.000000 1.000000 1.000000&#xD;&#xA;    a -100.037704 -21.542662 5015.049316 179.437531 89.497887 -254.771408 1.000000 1.000000 1.000000&#xD;&#xA;    a -100.031853 -20.303196 4845.088379 151.451355 89.629776 -292.446320 1.000000 1.000000 1.000000&#xD;&#xA;    a -99.182739 -19.559208 4674.762695 291.944275 90.458984 -161.182373 1.000000 1.000000 1.000000&#xD;&#xA;    a -97.442368 -19.473804 4504.315918 273.930450 90.745369 -187.833755 1.000000 1.000000 1.000000&#xD;&#xA;    a -94.799210 -20.211189 4334.016113 268.405609 91.116585 -201.273117 1.000000 1.000000 1.000000&#xD;&#xA;    a -91.287979 -21.916485 4164.151367 267.106964 91.525215 -209.631729 1.000000 1.000000 1.000000&#xD;&#xA;    a -86.987350 -24.667471 3995.015137 267.965698 91.931450 -214.846268 1.000000 1.000000 1.000000&#xD;&#xA;    a -81.982269 -28.356201 3826.834717 270.173737 92.298965 -217.592072 1.000000 1.000000 1.000000&#xD;&#xA;    a -76.352097 -32.819702 3659.774414 272.429474 92.621109 -219.038483 1.000000 1.000000 1.000000&#xD;&#xA;    a -70.173721 -37.898491 3493.952393 274.095367 92.895790 -219.690750 1.000000 1.000000 1.000000&#xD;&#xA;    a -63.521225 -43.437111 3329.450684 274.800812 93.122452 -219.787338 1.000000 1.000000 1.000000&#xD;&#xA;    a -56.465767 -49.284065 3166.322266 274.642273 93.301178 -219.443222 1.000000 1.000000 1.000000&#xD;&#xA;    a -49.076012 -55.291142 3004.602539 273.902985 93.432320 -218.706345 1.000000 1.000000 1.000000&#xD;&#xA;    a -41.418377 -61.312618 2844.312744 272.626160 93.516396 -217.581085 1.000000 1.000000 1.000000&#xD;&#xA;    a -33.557667 -67.204132 2685.466797 270.890015 93.554153 -216.036774 1.000000 1.000000 1.000000&#xD;&#xA;    a -25.557846 -72.821381 2528.081299 268.807770 93.546745 -214.007919 1.000000 1.000000 1.000000&#xD;&#xA;    a -17.482519 -78.019058 2372.174316 266.533997 93.496086 -211.387970 1.000000 1.000000 1.000000&#xD;&#xA;    a -9.391724 -82.652771 2217.783691 264.253021 93.414352 -208.041183 1.000000 1.000000 1.000000&#xD;&#xA;    a -1.305104 -86.605675 2065.017334 262.132111 93.330910 -203.849457 1.000000 1.000000 1.000000&#xD;&#xA;    a 6.781445 -89.769653 1914.023193 260.402527 93.255775 -198.631531 1.000000 1.000000 1.000000&#xD;&#xA;    a 14.872069 -92.022461 1764.984375 259.315521 93.202789 -192.187439 1.000000 1.000000 1.000000&#xD;&#xA;    a 22.971615 -93.223053 1618.113037 259.088806 93.193535 -184.352234 1.000000 1.000000 1.000000&#xD;&#xA;    a 31.085062 -93.204956 1473.673706 259.803406 93.260254 -175.099915 1.000000 1.000000 1.000000&#xD;&#xA;    a 39.216648 -91.768005 1332.016479 261.265259 93.447968 -164.682587 1.000000 1.000000 1.000000&#xD;&#xA;    a 47.368805 -88.667946 1193.618896 262.938171 93.814819 -153.698944 1.000000 1.000000 1.000000&#xD;&#xA;    a 55.539368 -83.604195 1059.160889 264.085083 94.432259 -142.955521 1.000000 1.000000 1.000000&#xD;&#xA;    a 63.715828 -76.209015 929.650635 264.077515 95.391594 -133.161606 1.000000 1.000000 1.000000&#xD;&#xA;    a 71.863411 -66.050301 806.609619 262.599335 96.807785 -124.729851 1.000000 1.000000 1.000000&#xD;&#xA;    a 79.806870 -52.886086 691.773071 259.552643 98.523193 -117.801910 1.000000 1.000000 1.000000&#xD;&#xA;    a 87.138481 -36.938866 586.204651 255.640915 100.443077 -111.729950 1.000000 1.000000 1.000000&#xD;&#xA;    a 93.392937 -18.585585 490.532349 251.516113 102.569275 -105.945999 1.000000 1.000000 1.000000&#xD;&#xA;    a 98.084183 1.707072 404.999969 247.688187 104.917473 -100.041023 1.000000 1.000000 1.000000&#xD;&#xA;    a 100.718758 23.406570 329.519897 244.617203 107.524292 -93.681702 1.000000 1.000000 1.000000&#xD;&#xA;    a 100.808044 45.916389 263.785370 242.749939 110.458992 -86.582306 1.000000 1.000000 1.000000&#xD;&#xA;    a 97.899155 68.556969 207.378372 242.493729 113.836517 -78.531448 1.000000 1.000000 1.000000&#xD;&#xA;    a 91.653503 90.539482 159.840546 64.095169 62.185379 -249.486740 1.000000 1.000000 1.000000&#xD;&#xA;    a 82.035561 110.984665 120.341881 66.671341 58.309464 -239.938141 1.000000 1.000000 1.000000&#xD;&#xA;    a 69.303429 128.851440 86.450623 70.901794 55.979618 -228.105255 1.000000 1.000000 1.000000&#xD;&#xA;    a 52.973385 141.918472 55.832756 83.709579 55.103844 -205.541702 1.000000 1.000000 1.000000&#xD;&#xA;    a 33.546043 142.795471 29.466892 116.969391 46.180241 -154.715836 1.000000 1.000000 1.000000&#xD;&#xA;    a 19.857452 129.141251 15.259699 129.680740 25.349024 -120.760765 1.000000 1.000000 1.000000&#xD;&#xA;    a 12.343875 112.144974 8.724246 127.029526 14.333036 -108.347511 1.000000 1.000000 1.000000&#xD;&#xA;    a 7.821478 95.381325 5.209990 122.078331 8.939495 -102.264587 1.000000 1.000000 1.000000&#xD;&#xA;    a 4.932919 79.590408 3.140254 116.943588 5.913023 -98.623123 1.000000 1.000000 1.000000&#xD;&#xA;    a 3.046561 65.016060 1.870584 112.077103 4.031883 -96.189346 1.000000 1.000000 1.000000&#xD;&#xA;    a 1.816201 51.780125 1.082831 107.615768 2.781020 -94.455673 1.000000 1.000000 1.000000&#xD;&#xA;    a 1.027526 39.939304 0.597993 103.613441 1.909752 -93.170593 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.540331 29.559338 0.308290 100.096359 1.286182 -92.199020 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.255917 20.679609 0.143687 97.080849 0.833416 -91.459457 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.103634 13.330984 0.057448 94.579781 0.504789 -90.900986 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.032585 7.548802 0.017888 92.605690 0.271279 -90.491302 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.006448 3.381170 0.003515 91.172569 0.115071 -90.210548 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.000409 0.855556 0.000222 90.297157 0.024915 -90.045868 1.000000 1.000000 1.000000&#xD;&#xA;    a 0.000000 0.000000 0.000000 89.999992 0.004890 -90.009010 1.000000 1.000000 1.000000&#xD;&#xA;    #end 100 animation frames&#xD;&#xA;    &#xD;&#xA;    &gt;&#xD;&#xA;    #end animation" />
  <row Id="29838" PostHistoryTypeId="1" PostId="13433" RevisionGUID="6a694157-82a8-49b3-aa74-c8aba9e31acc" CreationDate="2011-06-10T02:56:49.053" UserId="2229" Text="Linear Interpolation Causing Gimal Lock?" />
  <row Id="29839" PostHistoryTypeId="3" PostId="13433" RevisionGUID="6a694157-82a8-49b3-aa74-c8aba9e31acc" CreationDate="2011-06-10T02:56:49.053" UserId="2229" Text="&lt;opengl&gt;&lt;opengl-es&gt;&lt;animation&gt;&lt;rotation&gt;&lt;gimbal-lock&gt;" />
  <row Id="29840" PostHistoryTypeId="4" PostId="13433" RevisionGUID="8b5de13d-90d4-4369-918d-23a651ea914f" CreationDate="2011-06-10T03:02:39.747" UserId="2229" Comment="edited title" Text="Linear Interpolation Causing Gimbal Lock?" />
  <row Id="29841" PostHistoryTypeId="25" PostId="13427" RevisionGUID="fbcd1aae-1bda-469f-8d09-80439d2d463a" CreationDate="2011-06-10T03:16:28.077" Comment="http://twitter.com/#!/StackGameDev/status/79024098474332160" />
  <row Id="29842" PostHistoryTypeId="2" PostId="13434" RevisionGUID="c4dee94e-b576-4403-a68c-077406c4a4be" CreationDate="2011-06-10T03:30:24.393" UserId="7728" Text="As you've noted, performing linear interpolation of the individual angles composing a set of euler angles (your &quot;rotX, rotY, rotZ&quot; values) does not result in a linear rotation.  This is partly because angles don't interpolate linearly to begin with (for example, 179 degrees and -179 degrees are nearly the same angle, but linearly interpolating from one to the other as if they were simple numbers would go the long way around), and partly because euler angles do suffer from gimbal lock, as you mentioned, where the order in which you apply the three rotations affects later rotations in the sequence.&#xD;&#xA;&#xD;&#xA;A better way to interpolate these orientations is to convert your euler angles into another representation before interpolating them;  quaternions are one extremely popular choice.  Rotation matrices are another.  These other representations of orientation will interpolate far more successfully than euler angles do." />
  <row Id="29843" PostHistoryTypeId="2" PostId="13435" RevisionGUID="fbeb3d39-edf2-4594-b43e-bc60ca51a369" CreationDate="2011-06-10T03:43:48.730" UserId="3874" Text="I've been looking everywhere and all I can find are tutorials on writing the shaders. None of them showed me how to incorporate them into my scene.&#xD;&#xA;&#xD;&#xA;So essentially:&#xD;&#xA;&#xD;&#xA;Given an hlsl shader, if I were to have a function called drawTexturedQuad() and I wanted the shader to be applied to the result, how exactly could I do this?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="29844" PostHistoryTypeId="1" PostId="13435" RevisionGUID="fbeb3d39-edf2-4594-b43e-bc60ca51a369" CreationDate="2011-06-10T03:43:48.730" UserId="3874" Text="Loading and using an HLSL shader?" />
  <row Id="29845" PostHistoryTypeId="3" PostId="13435" RevisionGUID="fbeb3d39-edf2-4594-b43e-bc60ca51a369" CreationDate="2011-06-10T03:43:48.730" UserId="3874" Text="&lt;c++&gt;&lt;directx&gt;&lt;shaders&gt;&lt;hlsl&gt;" />
  <row Id="29846" PostHistoryTypeId="25" PostId="13429" RevisionGUID="2fb1b1c7-6695-40f6-8f85-74b0c74720c7" CreationDate="2011-06-10T06:16:28.233" Comment="http://twitter.com/#!/StackGameDev/status/79069397326630912" />
  <row Id="29847" PostHistoryTypeId="2" PostId="13436" RevisionGUID="09c38e5c-e252-400d-ace6-47384fcb6874" CreationDate="2011-06-10T06:29:21.160" UserId="2229" Text="I hope you know **GL Mathematics** ([GLM][1]) because I've got a problem, I can not break:&#xD;&#xA;&#xD;&#xA;I have a set of **Eular Angles** and I need to perform **smooth interpolation** between them. The best way is converting them to **Quaternions** and applying **SLERP** alrogirthm.&#xD;&#xA;&#xD;&#xA;The issue I have is how to **initialize** glm::quaternion with Euler Angles, please?&#xD;&#xA;&#xD;&#xA;I read [GLM Documentation][2] over and over, but I can not find appropriate `Quaternion constructor signature`, that would take three Eular Angles. The closest one I found is &#xD;&#xA;[angleAxis()][3] function, taking angle value and an axis for that angle. Note, please, what I am looking for si a way, how to parse `RotX, RotY, RotZ`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/&#xD;&#xA;  [2]: http://glm.g-truc.net/api-0.9.2/index.html&#xD;&#xA;  [3]: http://glm.g-truc.net/api-0.9.0/a00184.html#a4412b01c376d9cfc9cc06b2d511d0f16" />
  <row Id="29848" PostHistoryTypeId="1" PostId="13436" RevisionGUID="09c38e5c-e252-400d-ace6-47384fcb6874" CreationDate="2011-06-10T06:29:21.160" UserId="2229" Text="GLM: Euler Angles to Quaternion" />
  <row Id="29849" PostHistoryTypeId="3" PostId="13436" RevisionGUID="09c38e5c-e252-400d-ace6-47384fcb6874" CreationDate="2011-06-10T06:29:21.160" UserId="2229" Text="&lt;opengl&gt;&lt;math&gt;&lt;opengl-es&gt;&lt;rotation&gt;&lt;glm&gt;" />
  <row Id="29850" PostHistoryTypeId="5" PostId="13436" RevisionGUID="db150bcc-84c2-4840-8775-bafe54d7928b" CreationDate="2011-06-10T06:35:14.287" UserId="2229" Comment="added 314 characters in body" Text="I hope you know **GL Mathematics** ([GLM][1]) because I've got a problem, I can not break:&#xD;&#xA;&#xD;&#xA;I have a set of **Eular Angles** and I need to perform **smooth interpolation** between them. The best way is converting them to **Quaternions** and applying **SLERP** alrogirthm.&#xD;&#xA;&#xD;&#xA;The issue I have is how to **initialize** glm::quaternion with Euler Angles, please?&#xD;&#xA;&#xD;&#xA;I read [GLM Documentation][2] over and over, but I can not find appropriate `Quaternion constructor signature`, that would take three Eular Angles. The closest one I found is &#xD;&#xA;[angleAxis()][3] function, taking angle value and an axis for that angle. Note, please, what I am looking for si a way, how to parse `RotX, RotY, RotZ`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;For your information, this is the above metnioned [angleAxis()][4] **function signature**:&#xD;&#xA;&#xD;&#xA;    detail::tquat&lt; valType &gt; angleAxis (valType const &amp;angle, valType const &amp;x, valType const &amp;y, valType const &amp;z)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/&#xD;&#xA;  [2]: http://glm.g-truc.net/api-0.9.2/index.html&#xD;&#xA;  [3]: http://glm.g-truc.net/api-0.9.0/a00184.html#a4412b01c376d9cfc9cc06b2d511d0f16&#xD;&#xA;  [4]: http://glm.g-truc.net/api-0.9.1/a00279.html#ga4412b01c376d9cfc9cc06b2d511d0f16" />
  <row Id="29851" PostHistoryTypeId="2" PostId="13437" RevisionGUID="93534d84-bd44-44a7-98fc-69d63b1512cf" CreationDate="2011-06-10T07:27:51.707" UserId="7357" Text="Depends if you want to use OpenGL or Direct3D.&#xD;&#xA;&#xD;&#xA;For D3D the [SDK][1] has all the gory details.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/directx/aa937781" />
  <row Id="29852" PostHistoryTypeId="2" PostId="13438" RevisionGUID="46ddf11a-986a-49fe-8f72-9212c82b9e28" CreationDate="2011-06-10T07:38:03.837" UserId="4662" Text="ID3DXEffect provides `Begin()` and `BeginPass()` methods. All you have to do is call DrawQuad() appropriately between them and their equivalent `End()` and `EndPass()` methods." />
  <row Id="29853" PostHistoryTypeId="2" PostId="13439" RevisionGUID="dd05017f-eeaa-493d-8e55-010f015f00a3" CreationDate="2011-06-10T07:41:27.257" UserId="7728" Text="I'm not familiar with GLM, but in the absence of a function to directly convert from eular angles into quaternions, you can use the &quot;rotation around an axis&quot; functions (such as &quot;angleAxis&quot;) to it yourself.&#xD;&#xA;&#xD;&#xA;Here's how (pseudocode):&#xD;&#xA;&#xD;&#xA;    Quaternion QuatAroundX = Quaternion( Vector3(1.0,0.0,0.0), EulerAngle.x );&#xD;&#xA;    Quaternion QuatAroundY = Quaternion( Vector3(0.0,1.0,0.0), EulerAngle.y );&#xD;&#xA;    Quaternion QuatAroundZ = Quaternion( Vector3(0.0,0.0,1.0), EulerAngle.z );&#xD;&#xA;    Quaternion finalOrientation = QuatAroundX * QuatAroundY * QuatAroundZ;&#xD;&#xA;&#xD;&#xA;(Or you may need to switch those quaternion multiplies around, depending on the order in which your euler angle rotations are intended to be applied)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternately, from looking through GLM's documentation, it appears that you may be able to convert euler angles -&gt; matrix3 -&gt; quaternion like this:&#xD;&#xA;&#xD;&#xA;    toQuat( orient3( EulerAngles ) )" />
  <row Id="29854" PostHistoryTypeId="2" PostId="13440" RevisionGUID="11b70ffc-1fd8-47c7-9fcd-9275a89802c5" CreationDate="2011-06-10T07:52:53.403" UserId="7924" Text="Yes, I'd they're valid copyright notices. IANAL but in the US works under a pseudoname are just as copyrighted as they would be under a legal name, however they'd have to be able to prove that you're 'insertnamehere'.&#xD;&#xA;&#xD;&#xA;Kongregate only attributes them that way because they don't require more information and I wouldn't recommend doing it for your own project. However I'd also recommend not to ignore the copyrights and snag the games from Kongregate since they're still copyrighted and that'd be highly illegal." />
  <row Id="29855" PostHistoryTypeId="2" PostId="13441" RevisionGUID="4aecf006-9fbd-4615-90a8-3de5a9c90f4d" CreationDate="2011-06-10T08:03:04.943" UserId="4513" Text="    glm::quat rotationQuat(angle.x, angle.y, angle.z);&#xD;&#xA;&#xD;&#xA;Where `angle` is a `glm::vec3` containing *pitch, yaw, roll* respectively.&#xD;&#xA;&#xD;&#xA;PS. If in doubt, just go to the headers and look. The definition can be found in glm/gtc/quaternion.hpp:&#xD;&#xA;&#xD;&#xA;    explicit tquat(tvec3&lt;T&gt; const &amp; eulerAngles);&#xD;&#xA;&#xD;&#xA;Where `quat` is a float typedef for `tquat`." />
  <row Id="29856" PostHistoryTypeId="2" PostId="13442" RevisionGUID="f0ca95ad-4b86-4fd9-a52a-51f23472a91a" CreationDate="2011-06-10T08:41:33.443" UserId="7532" Text="First you have to create the effect and assign the technique to it:&#xD;&#xA;      &#xD;&#xA;      LPD3DXEFFECT  mDSEGeometryStage; // Deferred Shading Effect Geometry Stage&#xD;&#xA;      ...&#xD;&#xA;      initEffects()&#xD;&#xA;      {&#xD;&#xA;      HR(D3DXCreateEffectFromFile( d3ddev, &quot;./DeferredEffect_MaterialsStage.fx&quot;, 0, 0, D3DXSHADER_DEBUG, 0, &amp;mDSEGeometryStage, &amp;errors);) &#xD;&#xA;		if( errors )&#xD;&#xA;		{&#xD;&#xA;			MessageBoxA(0, (char *)errors-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;			errors-&gt;Release();&#xD;&#xA;		}		&#xD;&#xA;		// TECHNIQUE&#xD;&#xA;		D3DXHANDLE mhTech = mDSEGeometryStage-&gt;GetTechniqueByName(&quot;MaterialsTech&quot;);&#xD;&#xA;		HR(mDSEGeometryStage-&gt;SetTechnique(mhTech));&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;Then, in the rendering stage you can pass data to the effect like that:&#xD;&#xA;&#xD;&#xA;    renderGeometryStage()&#xD;&#xA;    {&#xD;&#xA;        // Effect values handlers (String parameter is the name of a variable in your .fx file)&#xD;&#xA;	D3DXHANDLE mhView		= mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gView&quot;);			&#xD;&#xA;	D3DXHANDLE mhProjection = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gProjection&quot;);		&#xD;&#xA;	D3DXHANDLE mhNearClip = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gNearClip&quot;);&#xD;&#xA;	D3DXHANDLE mhFarClip = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gFarClip&quot;);&#xD;&#xA;        &#xD;&#xA;        // Set effect values indicating the handler and the data as paramters&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetMatrix(mhProjection, &amp;(camera-&gt;getProjectionMatrix())));&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetMatrix(mhView, &amp;(camera-&gt;getViewMatrix())));		&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetFloat(mhFarClip, camera-&gt;getFarClip()));&#xD;&#xA;     &#xD;&#xA;        ...&#xD;&#xA;	&#xD;&#xA;As said in a previous answer: &#xD;&#xA;&#xD;&#xA;&gt; ID3DXEffect provides Begin() and&#xD;&#xA;&gt; BeginPass() methods.&#xD;&#xA;&#xD;&#xA;So, in the same rendering method you can start to render by calling the device BeginScene() method and inside call the Begin or BeginPass methods of your effect.&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;	// Begin Scene  &#xD;&#xA;	HR(d3ddev-&gt;BeginScene());&#xD;&#xA;	{&#xD;&#xA;                    ...		&#xD;&#xA;&#xD;&#xA;		// Clear targets surface&#xD;&#xA;		d3ddev-&gt;Clear(0, NULL, D3DCLEAR_TARGET |D3DCLEAR_ZBUFFER, &#xD;&#xA;			D3DCOLOR_ARGB(0, 0,0,0), 1.0f, 0);    &#xD;&#xA;		&#xD;&#xA;		// Begin Effect passes.&#xD;&#xA;		UINT numPasses = 0;&#xD;&#xA;		HR(mDSEGeometryStage-&gt;Begin(&amp;numPasses, 0))&#xD;&#xA;		{&#xD;&#xA;			// Render your objects&#xD;&#xA;			for(RenderizableObjectsList::iterator it = visibleObjects.begin();&#xD;&#xA;				it != visibleObjects.end();&#xD;&#xA;				++it)&#xD;&#xA;			{&#xD;&#xA;				// Render&#xD;&#xA;				(*it)-&gt;render(mDSEGeometryStage, true, numPasses);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		// End Effect passes&#xD;&#xA;		HR(mDSEGeometryStage-&gt;End());&#xD;&#xA;	}	&#xD;&#xA;	// End scene rendering&#xD;&#xA;	HR(d3ddev-&gt;EndScene());    &#xD;&#xA;    }// End of renderGeometryStage method&#xD;&#xA;&#xD;&#xA;Hope it helps, but your question is not about a chunk of code that you can copy/paste, its more about &quot;basic&quot; concepts. So for this kind of things I really recommend you to follow some tutorial because you will understand all the underlying concepts better. Cheers!" />
  <row Id="29857" PostHistoryTypeId="5" PostId="13442" RevisionGUID="b1bc3cbb-d087-4e9e-a358-9b77bfe37e5c" CreationDate="2011-06-10T08:52:09.463" UserId="7532" Comment="added 284 characters in body" Text="There are three steps:&#xD;&#xA;&#xD;&#xA; 1. Load effect and set the technique&#xD;&#xA; 2. Provide data to the effect&#xD;&#xA; 3. Render &#xD;&#xA;&#xD;&#xA;1) Load effect and set the technique&#xD;&#xA;                &#xD;&#xA;      // Declaration of your effect variable&#xD;&#xA;      LPD3DXEFFECT  mDSEGeometryStage; &#xD;&#xA;      ...&#xD;&#xA;      initEffects()&#xD;&#xA;      {&#xD;&#xA;      //With this method you load your effect file&#xD;&#xA;      HR(**D3DXCreateEffectFromFile**( d3ddev, &quot;./DeferredEffect_MaterialsStage.fx&quot;, 0, 0, D3DXSHADER_DEBUG, 0, &amp;mDSEGeometryStage, &amp;errors);) &#xD;&#xA;                // Error checking   &#xD;&#xA;		if( errors )&#xD;&#xA;		{&#xD;&#xA;			MessageBoxA(0, (char *)errors-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;			errors-&gt;Release();&#xD;&#xA;		}		&#xD;&#xA;		// Retrieve a Technique from your effects handler&#xD;&#xA;		D3DXHANDLE mhTech = mDSEGeometryStage-&gt;**GetTechniqueByName**(&quot;MaterialsTech&quot;);&#xD;&#xA;                // Set the technique to be used &#xD;&#xA;		HR(mDSEGeometryStage-&gt;SetTechnique(mhTech));&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;2) Then, in the rendering stage you can pass data to the effect like that:&#xD;&#xA;&#xD;&#xA;    renderGeometryStage()&#xD;&#xA;    {&#xD;&#xA;        // Effect values handlers (String parameter is the name of a variable in your .fx file)&#xD;&#xA;	D3DXHANDLE mhView		= mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gView&quot;);			&#xD;&#xA;	D3DXHANDLE mhProjection = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gProjection&quot;);		&#xD;&#xA;	D3DXHANDLE mhNearClip = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gNearClip&quot;);&#xD;&#xA;	D3DXHANDLE mhFarClip = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gFarClip&quot;);&#xD;&#xA;        &#xD;&#xA;        // Set effect values indicating the handler and the data as paramters&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetMatrix(mhProjection, &amp;(camera-&gt;getProjectionMatrix())));&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetMatrix(mhView, &amp;(camera-&gt;getViewMatrix())));		&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetFloat(mhFarClip, camera-&gt;getFarClip()));&#xD;&#xA;     &#xD;&#xA;        ...&#xD;&#xA;	&#xD;&#xA;As said in a previous answer: &#xD;&#xA;&#xD;&#xA;&gt; ID3DXEffect provides Begin() and&#xD;&#xA;&gt; BeginPass() methods.&#xD;&#xA;&#xD;&#xA;So, in the same rendering method you can start to render by calling the device BeginScene() method and inside call the Begin or BeginPass methods of your effect.&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;	// Begin Scene  &#xD;&#xA;	HR(d3ddev-&gt;BeginScene());&#xD;&#xA;	{&#xD;&#xA;                    ...		&#xD;&#xA;&#xD;&#xA;		// Clear targets surface&#xD;&#xA;		d3ddev-&gt;Clear(0, NULL, D3DCLEAR_TARGET |D3DCLEAR_ZBUFFER, &#xD;&#xA;			D3DCOLOR_ARGB(0, 0,0,0), 1.0f, 0);    &#xD;&#xA;		&#xD;&#xA;		// Begin Effect passes.&#xD;&#xA;		UINT numPasses = 0;&#xD;&#xA;		HR(mDSEGeometryStage-&gt;Begin(&amp;numPasses, 0))&#xD;&#xA;		{&#xD;&#xA;			// Render your objects&#xD;&#xA;			for(RenderizableObjectsList::iterator it = visibleObjects.begin();&#xD;&#xA;				it != visibleObjects.end();&#xD;&#xA;				++it)&#xD;&#xA;			{&#xD;&#xA;				// Render&#xD;&#xA;				(*it)-&gt;render(mDSEGeometryStage, true, numPasses);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		// End Effect passes&#xD;&#xA;		HR(mDSEGeometryStage-&gt;End());&#xD;&#xA;	}	&#xD;&#xA;	// End scene rendering&#xD;&#xA;	HR(d3ddev-&gt;EndScene());    &#xD;&#xA;    }// End of renderGeometryStage method&#xD;&#xA;&#xD;&#xA;Hope it helps, but your question is not about a chunk of code that you can copy/paste, its more about &quot;basic&quot; concepts. So for this kind of things I really recommend you to follow some tutorial because you will understand all the underlying concepts better. Cheers!" />
  <row Id="29858" PostHistoryTypeId="2" PostId="13443" RevisionGUID="20a45245-507a-4b58-a457-37a5e84a8175" CreationDate="2011-06-10T09:12:50.893" UserId="7588" Text="Not all GPU architecture is that hidden, it really depends on the company.&#xD;&#xA;&#xD;&#xA;[Imagination](http://www.imgtec.com/powervr/VGX150.asp) for example :)&#xD;&#xA;&#xD;&#xA;Many mobile devices use the [PowerVR SGX](http://www.imgtec.com/images/blockdiagrams/powervr/large/POWERVR_SGX_lrg.gif), which you can see has a USSE where multiple shader processing units are added as necessary. These take care of your shaders, the culling, etc is generally done elsewhere.&#xD;&#xA;&#xD;&#xA;These GPU's often use [Tile Based Rendering](http://developer.amd.com/gpu_assets/gdc2008_ribble_maurice_TileBasedGpus.pdf) as it can allow optimizations especially in shader time.&#xD;&#xA;&#xD;&#xA;There is also a tendancy to make blending part of the programmable pipeline, where either you reprogram a specific blending chip, or the blending is included in the shaders, see the [VR Core](http://www.imgtec.com/images/blockdiagrams/powervr/large/POWERVR_VGX150_lrg.gif).&#xD;&#xA;&#xD;&#xA;You can get lots of info about their specific GPU, its definately a good start.&#xD;&#xA;&#xD;&#xA;I also found [this article](http://techreport.com/articles.x/8342/1) about the XBox360 chip layout.&#xD;&#xA;&#xD;&#xA;And for your other questions :&#xD;&#xA;1) I don't think it would be easy to see how the data is cached, I would guess the mentality is more 'load things into cache and keep what we think will be needed later', generally caches are small though, because it's very fast, expensive memory.&#xD;&#xA;&#xD;&#xA;2) As stated, you generally have many different things going on outside of the shaders (see [this](http://goanna.cs.rmit.edu.au/~gl/teaching/Interactive3D/2011/lecture2.html)). An easy example is the Rasterization &amp; Interpolation getting your from Vertex positions, to thousand of fragments with an interpolated color, which is done on the GPU.&#xD;&#xA;&#xD;&#xA;3) Shaders came from Pixar :)&#xD;&#xA;&#xD;&#xA;4) I didn't think it was ambiguous, what is also interesting are the Intel HD chips that are directly integrated into the Core ix's." />
  <row Id="29859" PostHistoryTypeId="25" PostId="13435" RevisionGUID="16c084cd-cc81-4cf1-ad55-71b7f4202672" CreationDate="2011-06-10T09:16:28.100" Comment="http://twitter.com/#!/StackGameDev/status/79114695746920448" />
  <row Id="29861" PostHistoryTypeId="2" PostId="13445" RevisionGUID="5b76aac5-59e0-4551-9b96-21a2c41a8622" CreationDate="2011-06-10T09:57:15.040" UserId="1742" Text="It looks like your problem lies in your exporter not producing continuous euler data. The discontinuity appears late, when the X and Z swap roles in the orientation, which is what gives you the odd looking interpolation. it's these lines:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    a 97.899155 68.556969 207.378372 242.493729 113.836517 -78.531448 1.000000 1.000000 1.000000&#xD;&#xA;    a 91.653503 90.539482 159.840546 64.095169 62.185379 -249.486740 1.000000 1.000000 1.000000&#xD;&#xA;&#xD;&#xA;you can solve this one of two ways, either make the exporter export continuous eulers (and then allow for euler elements outside the normal range), or interpolate as quaternions rather than as eulers.&#xD;&#xA;&#xD;&#xA;You don't need to export as quaternion as the euler to quaternion conversion isn't very expensive, and if you're interpolating over a number of frames you could even cache the quaternions and the information you have to generate to perform the interpolation (information such as which way round to interpolate)" />
  <row Id="29862" PostHistoryTypeId="2" PostId="13446" RevisionGUID="6e30a942-96f4-44f3-beb6-4d0c44136eed" CreationDate="2011-06-10T10:05:19.453" UserId="1742" Text="Solution is in wikipedia: http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles&#xD;&#xA;&#xD;&#xA;using that:&#xD;&#xA;&#xD;&#xA;    sx = sin(x/2); sy = sin(y/2); sz = sin(z/2);&#xD;&#xA;    cx = cos(x/2); cy = cos(y/2); cz = cos(z/2);&#xD;&#xA;    &#xD;&#xA;    q( cx*cy*cz + sx*sy*sz,&#xD;&#xA;       sx*cy*cz - cx*sy*sz,&#xD;&#xA;       cx*sy*cz + sx*cy*sz,&#xD;&#xA;       cx*cy*sz - sx*sy*cz )&#xD;&#xA;&#xD;&#xA;Constructor for a quaternion, given an Euler. However, it's only one of six possible combinations of Euler angles. You really need to find out what order the Euler angles are constructed when converting to transform matrix. Only then can the solution be defined." />
  <row Id="29866" PostHistoryTypeId="2" PostId="13448" RevisionGUID="497cff43-9d05-4793-97b8-50996c7d2302" CreationDate="2011-06-10T10:18:52.057" UserId="7925" Text="I want to write a 3D app (think about Maya for simplicity sake). It should allow common features you can find in any good 3D software.&#xD;&#xA;&#xD;&#xA;**Requirements**&#xD;&#xA;&#xD;&#xA; - Multiple viewports&#xD;&#xA; - Objects manipulation&#xD;&#xA; - Common File Format import/export&#xD;&#xA; - Written in C/C++&#xD;&#xA; - GUI in Qt&#xD;&#xA; - Embedding a scripting language (not sure though, optional)&#xD;&#xA; - etc (I think you get the point^^)&#xD;&#xA; &#xD;&#xA;**My background**&#xD;&#xA;&#xD;&#xA; - Strong mathematical skills;&#xD;&#xA; - Strong 3D animation algorithms knowledge;&#xD;&#xA; - Strong C/C++ backgroung;&#xD;&#xA; - Good Qt background;&#xD;&#xA; - good maya programming skills;&#xD;&#xA;&#xD;&#xA;Based on your experience, which 3D engine should I use? I saw that Ogre and Irrlicht are great...&#xD;&#xA;&#xD;&#xA;Thanks for any advice.&#xD;&#xA;&#xD;&#xA;Best regards." />
  <row Id="29867" PostHistoryTypeId="1" PostId="13448" RevisionGUID="497cff43-9d05-4793-97b8-50996c7d2302" CreationDate="2011-06-10T10:18:52.057" UserId="7925" Text="Which 3D engine for a 3D app like Maya?" />
  <row Id="29868" PostHistoryTypeId="3" PostId="13448" RevisionGUID="497cff43-9d05-4793-97b8-50996c7d2302" CreationDate="2011-06-10T10:18:52.057" UserId="7925" Text="&lt;c++&gt;&lt;3d-engines&gt;&lt;qt&gt;" />
  <row Id="29869" PostHistoryTypeId="5" PostId="13441" RevisionGUID="4300607e-4212-461c-a032-a9baf871e6dd" CreationDate="2011-06-10T10:29:11.983" UserId="4513" Comment="added 362 characters in body; deleted 30 characters in body" Text="    glm::quat rotationQuat(glm::vec3(angle.x, angle.y, angle.z));&#xD;&#xA;&#xD;&#xA;Where `angle` is a `glm::vec3` containing *pitch, yaw, roll* respectively.&#xD;&#xA;&#xD;&#xA;PS. If in doubt, just go to the headers and look. The definition can be found in glm/gtc/quaternion.hpp:&#xD;&#xA;&#xD;&#xA;    explicit tquat(tvec3&lt;T&gt; const &amp; eulerAngles) {&#xD;&#xA;    		tvec3&lt;T&gt; c = glm::cos(eulerAngle * value_type(0.5));&#xD;&#xA;		tvec3&lt;T&gt; s = glm::sin(eulerAngle * value_type(0.5));&#xD;&#xA;		&#xD;&#xA;		this-&gt;w = c.x * c.y * c.z + s.x * s.y * s.z;&#xD;&#xA;		this-&gt;x = s.x * c.y * c.z - c.x * s.y * s.z;&#xD;&#xA;		this-&gt;y = c.x * s.y * c.z + s.x * c.y * s.z;&#xD;&#xA;		this-&gt;z = c.x * c.y * s.z - s.x * s.y * c.z;	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Where `quat` is a float typedef for `tquat`." />
  <row Id="29870" PostHistoryTypeId="5" PostId="13446" RevisionGUID="e4ce34bb-75dc-41b6-ace5-d11973036faa" CreationDate="2011-06-10T10:31:07.377" UserId="1742" Comment="enforce Euler ordering importance" Text="Solution is in wikipedia: http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles&#xD;&#xA;&#xD;&#xA;using that:&#xD;&#xA;&#xD;&#xA;    sx = sin(x/2); sy = sin(y/2); sz = sin(z/2);&#xD;&#xA;    cx = cos(x/2); cy = cos(y/2); cz = cos(z/2);&#xD;&#xA;    &#xD;&#xA;    q( cx*cy*cz + sx*sy*sz,&#xD;&#xA;       sx*cy*cz - cx*sy*sz,&#xD;&#xA;       cx*sy*cz + sx*cy*sz,&#xD;&#xA;       cx*cy*sz - sx*sy*cz )&#xD;&#xA;&#xD;&#xA;Constructor for a quaternion, given an Euler (where application of rotation is XYZ). However, it's only one of six possible combinations of Euler angles. You really need to find out what order the Euler angles are constructed when converting to transform matrix. Only then can the solution be defined.&#xD;&#xA;&#xD;&#xA;In the old company I worked at, we had Z as forwards (like most graphics cards) so the application order was ZYX, and at my current company the Y axis is forwards and Z is up, so our application order is YZX. This order is the order you multiply your quaternions together in to generate your final transform, and the order matters for rotations are the multiplications are not commutative." />
  <row Id="29871" PostHistoryTypeId="5" PostId="13448" RevisionGUID="c8ab451a-43e7-4e63-961b-22097f103f5f" CreationDate="2011-06-10T11:45:59.063" UserId="7925" Comment="Edited requirements to add some more examples..." Text="I want to write a 3D app (think about Maya for simplicity sake) that would be able to import a scene from common packages and apply/run my own animation algorithms. It should allow common features you can find in any good 3D software.&#xD;&#xA;&#xD;&#xA;**Requirements**&#xD;&#xA;&#xD;&#xA; - Multiple viewports&#xD;&#xA; - Objects manipulation&#xD;&#xA; - Common File Format import/export&#xD;&#xA; - Common lighting support&#xD;&#xA; - Basic mesh animation (skinning, etc)&#xD;&#xA; - Lighting &#xD;&#xA; - Written in C/C++&#xD;&#xA; - GUI in Qt&#xD;&#xA; - Embedding a scripting language (not sure though, optional)&#xD;&#xA; - etc (I think you get the point^^)&#xD;&#xA; &#xD;&#xA;**My background**&#xD;&#xA;&#xD;&#xA; - Strong mathematical skills;&#xD;&#xA; - Strong 3D animation algorithms knowledge;&#xD;&#xA; - Strong C/C++ backgroung;&#xD;&#xA; - Good Qt background;&#xD;&#xA; - good maya programming skills;&#xD;&#xA;&#xD;&#xA;Based on your experience, which 3D engine should I use? I saw that Ogre and Irrlicht are great...&#xD;&#xA;&#xD;&#xA;Thanks for any advice.&#xD;&#xA;&#xD;&#xA;Best regards." />
  <row Id="29872" PostHistoryTypeId="25" PostId="13394" RevisionGUID="295f5edc-9f88-43d8-aaa0-592c2fa8bd5f" CreationDate="2011-06-10T12:16:28.270" Comment="http://twitter.com/#!/StackGameDev/status/79159994574053376" />
  <row Id="29873" PostHistoryTypeId="2" PostId="13449" RevisionGUID="5381fed4-a970-45cd-a1c9-d02e657314f9" CreationDate="2011-06-10T12:33:41.377" UserId="1374" Text="&gt; 1) What happens when a texture change&#xD;&#xA;&gt; is issued?&#xD;&#xA;&#xD;&#xA;Most chips simply change where the texture sampler requests memory from. I know of no chip that preloads textures in caches, simply because textures tend to be way bigger than the caches, and with multiple textures, it makes even less sense. Moreover, most PC chips have multiple texture samplers, with dedicated caches. And you certainly don't want to load all the caches with the same data. &#xD;&#xA;&#xD;&#xA;To give you an idea, with a back-of-the envelope math: preloading would mean transferring all the texture memory of all the active textures each frame (something along the line of 300MB for a mid-range title, 1GB+ for high-end titles). Whereas just loading the parts of the texture that are effectively used brings that down to about ~30MB-100MB / frame (very broad strokes, thinking 1-2 megapixel, with an average of 30B-50B/pixel texture data). The cost of preloading is higher than not by up to an order of magnitude, ignoring the issue of whether it can fit. &#xD;&#xA;&#xD;&#xA;The main issue with not preloading is hiding the latency of the memory fetches. GPUs are built to hide this latency (by typically running many threads at the same time on a single processor)&#xD;&#xA;&#xD;&#xA;&gt; 2) Are these &quot;stream processors&quot;&#xD;&#xA;&gt; typically shared with other&#xD;&#xA;&gt; computations throughout the pipeline,&#xD;&#xA;&gt; such as culling?&#xD;&#xA;&#xD;&#xA;It depends on the hardware. Some chips are known to do [clipping on the processors][1], e.g. (though culling is easy enough to do in pure h/w). Many mobile chips do the blending et al. alongside the fragment shader, as opposed to dedicate hardware for it. There's even an nvidia extension to do that yourself in the shader as opposed to use the fixed function state: [nv_shader_framebuffer_fetch][2].&#xD;&#xA;&#xD;&#xA;&gt; 3) It seems that progress related to&#xD;&#xA;&gt; video card hardware has largely been&#xD;&#xA;&gt; lead by innovation in software. Are&#xD;&#xA;&gt; there any interesting cases where the&#xD;&#xA;&gt; opposite is true?&#xD;&#xA;&#xD;&#xA;I'm not sure what you're after with this question. Hardware vendors do not add features on a whim. They do so because they see value in them being used by software (even if it's not today's software). Can you be more specific maybe ?&#xD;&#xA;&#xD;&#xA;&gt; 4) I was rather referring to the GPUs&#xD;&#xA;&gt; embedded in modern cell phones and&#xD;&#xA;&gt; tablets.&#xD;&#xA;&#xD;&#xA;GPUs in cellphones today are mostly Imagination or Tegra. Those 2 architectures already have very different structures. The Imagination ones (SGX parts) are fairly well documented on their websites (and use a tiled-base architecture. See 3nixios good answer on this). Tegra less so. All I could find was that [Tegra 2 is not unified][3], pointing to a hardware base that is ~DX9.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://intellinuxgraphics.org/Vol_2_G45_3dmedia.pdf&#xD;&#xA;  [2]: http://developer.download.nvidia.com/tegra/docs/tegra_gles2_development.pdf&#xD;&#xA;  [3]: http://www.anandtech.com/show/4144/lg-optimus-2x-nvidia-tegra-2-review-the-first-dual-core-smartphone/5" />
  <row Id="29874" PostHistoryTypeId="5" PostId="13448" RevisionGUID="6edece04-1603-4403-8917-9897931c2ac4" CreationDate="2011-06-10T12:38:04.770" UserId="7925" Comment="added 264 characters in body; added 28 characters in body; edited title; added 19 characters in body" Text="I want to write a 3D app (think about MotionBuilder for simplicity sake) that would be able to import a scene from common packages and apply/run my own character animation algorithms.&#xD;&#xA;&#xD;&#xA;It should allow common features you can find in any good 3D software.&#xD;&#xA;&#xD;&#xA;**Requirements**&#xD;&#xA;&#xD;&#xA; - Multiple viewports&#xD;&#xA; - Objects manipulation (positionning);&#xD;&#xA; - Common File Format import/export&#xD;&#xA; - Common lighting support (NO EDITING)&#xD;&#xA; - Basic mesh animation (skinning, etc) (NO EDITING)&#xD;&#xA; - Written in C/C++&#xD;&#xA; - GUI in Qt&#xD;&#xA; - Cross-platform&#xD;&#xA; - Embedding a scripting language (not sure though, optional)&#xD;&#xA; - etc (I think you get the point^^)&#xD;&#xA; &#xD;&#xA;**My background**&#xD;&#xA;&#xD;&#xA; - Strong mathematical skills;&#xD;&#xA; - Strong 3D animation algorithms knowledge;&#xD;&#xA; - Strong C/C++ backgroung;&#xD;&#xA; - Good Qt background;&#xD;&#xA; - Good maya programming skills;&#xD;&#xA; - Some (but old) OpenGL knowledge;&#xD;&#xA; - Absolutely NO graphics card programming skills;&#xD;&#xA; &#xD;&#xA;Based on your experience, which 3D engine should I use to write a MotionBuilder clone (without any mesh, light, shader editing capabilities) focusing on skeleton animation ONLY? I saw that Ogre and Irrlicht are great... Or should I write my own one?&#xD;&#xA;&#xD;&#xA;Thanks for any advice.&#xD;&#xA;&#xD;&#xA;Best regards." />
  <row Id="29875" PostHistoryTypeId="4" PostId="13448" RevisionGUID="6edece04-1603-4403-8917-9897931c2ac4" CreationDate="2011-06-10T12:38:04.770" UserId="7925" Comment="added 264 characters in body; added 28 characters in body; edited title; added 19 characters in body" Text="Which 3D engine for a 3D app like MotionBuilder (with only character animation editing capabilities)?" />
  <row Id="29876" PostHistoryTypeId="2" PostId="13450" RevisionGUID="14335a58-f6ae-4d43-ac49-fd4b92141731" CreationDate="2011-06-10T13:15:06.317" UserId="7772" Text="This one is truly bizarre...  I'm developing using both an iPhone 3GS and an iPad 2.  This symptom is repeatable on the older iPhone hardware much more readily than on the iPad 2.  Here's what happens:&#xD;&#xA;&#xD;&#xA;I start the game and the FPS is ticking at about 47 on the 3GS in OpenGLES2.0.  I have quite a lot on screen right now, so that is reasonable at this stage (I still have a few optimizations I can make too).&#xD;&#xA;&#xD;&#xA;If you put a break in touchesBegan, it takes roughly 4-5 seconds before the break occurs and the game halts.  This doesn't happen all of the time, and in fact, if you restart the app several times, it usually goes away.  Moreover, if I let the game sit for a bit, it will eventually &quot;sync.&quot;  Like I said, the iPad 2 rarely exhibits the problem (one out of every 15-20 test runs), but it is definitely still present.  If you perform a series of touches and accelerometer events in sequence, they are queued up and rendered just like you did them 4-5 seconds later.  Very reminiscent of 4-5s lag delays back in the day online :)&#xD;&#xA;&#xD;&#xA;I've tried a couple things like glFlush, or glFinish at the end of each render loop (doesn't seem to have any effect).  Here's the top game loop:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    - (void) drawView: (CADisplayLink*) displayLink&#xD;&#xA;    {&#xD;&#xA;    double dt = 0.0f; // Time in seconds since last loop&#xD;&#xA;    if (displayLink != nil) {&#xD;&#xA;        dt = displayLink.timestamp - m_timestamp;&#xD;&#xA;        m_timestamp = displayLink.timestamp;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Update the game&#xD;&#xA;    m_gameEngine-&gt;Update(dt);&#xD;&#xA;    &#xD;&#xA;    // Render the game&#xD;&#xA;    m_gameEngine-&gt;Render();&#xD;&#xA;    [m_context presentRenderbuffer:GL_RENDERBUFFER];&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="29877" PostHistoryTypeId="1" PostId="13450" RevisionGUID="14335a58-f6ae-4d43-ac49-fd4b92141731" CreationDate="2011-06-10T13:15:06.317" UserId="7772" Text="iPhone, iPad Rendering Ahead of Input (4-5 seconds)" />
  <row Id="29878" PostHistoryTypeId="3" PostId="13450" RevisionGUID="14335a58-f6ae-4d43-ac49-fd4b92141731" CreationDate="2011-06-10T13:15:06.317" UserId="7772" Text="&lt;iphone&gt;&lt;input&gt;&lt;ipad&gt;&lt;cadisplaylink&gt;" />
  <row Id="29879" PostHistoryTypeId="5" PostId="13446" RevisionGUID="5ef3c655-d8bd-4dca-8a18-5bd675e82481" CreationDate="2011-06-10T13:16:07.690" UserId="1742" Comment="added ZYX rotation ordering" Text="Solution is in wikipedia: http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles&#xD;&#xA;&#xD;&#xA;using that:&#xD;&#xA;&#xD;&#xA;    sx = sin(x/2); sy = sin(y/2); sz = sin(z/2);&#xD;&#xA;    cx = cos(x/2); cy = cos(y/2); cz = cos(z/2);&#xD;&#xA;    &#xD;&#xA;    q( cx*cy*cz + sx*sy*sz,&#xD;&#xA;       sx*cy*cz - cx*sy*sz,&#xD;&#xA;       cx*sy*cz + sx*cy*sz,&#xD;&#xA;       cx*cy*sz - sx*sy*cz ) // for XYZ application order&#xD;&#xA;&#xD;&#xA;    q( cx*cy*cz - sx*sy*sz,&#xD;&#xA;       sx*cy*cz + cx*sy*sz,&#xD;&#xA;       cx*sy*cz - sx*cy*sz,&#xD;&#xA;       cx*cy*sz + sx*sy*cz ) // for ZYX application order&#xD;&#xA;&#xD;&#xA;Constructors for a quaternion, given an Euler (where application of rotation is XYZ or ZYX). However, it's only two of six possible combinations of Euler angles. You really need to find out what order the Euler angles are constructed when converting to transform matrix. Only then can the solution be defined.&#xD;&#xA;&#xD;&#xA;In the old company I worked at, we had Z as forwards (like most graphics cards) so the application order was ZYX, and at my current company the Y axis is forwards and Z is up, so our application order is YZX. This order is the order you multiply your quaternions together in to generate your final transform, and the order matters for rotations are the multiplications are not commutative." />
  <row Id="29880" PostHistoryTypeId="2" PostId="13451" RevisionGUID="a06b187b-8a05-4a4f-b0af-c058a88c1823" CreationDate="2011-06-10T13:27:58.280" UserId="4662" Text="&gt; 1) What happens when a texture change&#xD;&#xA;&gt; (glBindTexture(), or new sampler&#xD;&#xA;&gt; specified) is issued? Obviously, the&#xD;&#xA;&gt; command is queued and later processed&#xD;&#xA;&gt; by the video card, but is the texture&#xD;&#xA;&gt; loaded immediately into cache, or not&#xD;&#xA;&gt; until something attempts to sample&#xD;&#xA;&gt; that texture? I would expect the&#xD;&#xA;&gt; latter, partly because the texture may&#xD;&#xA;&gt; not entirely fit into such caches to&#xD;&#xA;&gt; begin with. How big are these caches,&#xD;&#xA;&gt; anyway?&#xD;&#xA;&#xD;&#xA;I'm not sure of the size of the caches. However, everything pretty much is load-on-demand for the GPU- after all, what happens if I want to use that cache due to a queued command between now and when the that particular texture change is queued?&#xD;&#xA;&#xD;&#xA;&gt; 2) Older video cards had hardware&#xD;&#xA;&gt; dedicated specifically for a given&#xD;&#xA;&gt; type of shader. Newer video cards&#xD;&#xA;&gt; reuse the same hardware for all types&#xD;&#xA;&gt; of shaders. Are these &quot;stream&#xD;&#xA;&gt; processors&quot; typically shared with&#xD;&#xA;&gt; other computations throughout the&#xD;&#xA;&gt; pipeline, such as culling?&#xD;&#xA;&#xD;&#xA;As far as I know, every operation which is not explicitly shadable is implemented in hardware. This is faster, but also, the shaders in modern games can dominate the performance very strongly- you're mostly shader-limited.&#xD;&#xA;&#xD;&#xA;&gt; 3) It seems that progress related to&#xD;&#xA;&gt; video card hardware has largely been&#xD;&#xA;&gt; lead by innovation in software. Are&#xD;&#xA;&gt; there any interesting cases where the&#xD;&#xA;&gt; opposite is true? I still hope that&#xD;&#xA;&gt; there might be some resource that&#xD;&#xA;&gt; gives a detailed history of video card&#xD;&#xA;&gt; design, similar to the scenegraphs&#xD;&#xA;&gt; article linked above.&#xD;&#xA;&#xD;&#xA;Pretty much no. This is because every technique can be implemented in software before it can be implemented in hardware- and indeed, software implementation first would be necessary to learn about relative performance, what data it depends on, and things like that, and the output of compiling programs can be used to determine what kind of hardware is needed, gauging developer demand, that kind of thing. That's ignoring all the time it would take to implement in hardware, of course.&#xD;&#xA;&#xD;&#xA;One case that I *can* name, effectively, is concurrency in CPU design, where the necessity of moving to multiple cores in hardware has spawned massive concurrency efforts in software. Of course, software threads existed before, but concurrency was nothing like as it is now.&#xD;&#xA;&#xD;&#xA;&gt; 4) Mobile GPU was an ambiguous term.&#xD;&#xA;&gt; I'm hoping that eBusiness assumed I&#xD;&#xA;&gt; meant mobile as in laptop when he&#xD;&#xA;&gt; called me ignorant -- I was rather&#xD;&#xA;&gt; referring to the GPUs embedded in&#xD;&#xA;&gt; modern cell phones and tablets.&#xD;&#xA;&#xD;&#xA;They're basically just desktop GPUs, but downscaled. This is because desktop GPUs are still very optimized pieces of hardware performing a dedicated function, giving them much implementation experience and optimization, and developer existing knowledge. If you have a mobile GPU that works completely differently, then nobody is gonna figure out how to use it, it's gonna be much slower (relatively to how it would be), etc. Of course, some systems require changing to be mobile-feasible, but in the general case, it's the best idea to downscale what's available for desktop. This is not quite the same for CPUs, as mobile CPUs have also been around for a long time." />
  <row Id="29881" PostHistoryTypeId="2" PostId="13452" RevisionGUID="b6dcf96a-1080-4c16-b14a-c2e4fcbfcc2f" CreationDate="2011-06-10T13:29:17.703" UserId="7588" Text="I am looking for articles on level design and particularly for techniques to force the player to go in one direction, instead of another.&#xD;&#xA;&#xD;&#xA;Like which game mechanics can be used, how graphics, sound, etc. can influence the player to go where you want.&#xD;&#xA;&#xD;&#xA;If anyone has ideas, I'd be grateful to hear them too!" />
  <row Id="29882" PostHistoryTypeId="1" PostId="13452" RevisionGUID="b6dcf96a-1080-4c16-b14a-c2e4fcbfcc2f" CreationDate="2011-06-10T13:29:17.703" UserId="7588" Text="Level Design, Implying a path to the player" />
  <row Id="29883" PostHistoryTypeId="3" PostId="13452" RevisionGUID="b6dcf96a-1080-4c16-b14a-c2e4fcbfcc2f" CreationDate="2011-06-10T13:29:17.703" UserId="7588" Text="&lt;game-mechanics&gt;&lt;level-design&gt;" />
  <row Id="29884" PostHistoryTypeId="5" PostId="13442" RevisionGUID="ecf5787f-4e34-42ca-b20b-72e3d2056aa0" CreationDate="2011-06-10T13:53:15.937" UserId="7532" Comment="deleted 162 characters in body" Text="There are three steps:&#xD;&#xA;&#xD;&#xA; 1. Load effect and set the technique&#xD;&#xA; 2. Provide data to the effect&#xD;&#xA; 3. Render &#xD;&#xA;&#xD;&#xA;1) Load effect and set the technique&#xD;&#xA;                &#xD;&#xA;      // Declaration of your effect variable&#xD;&#xA;      LPD3DXEFFECT  mDSEGeometryStage; &#xD;&#xA;      ...&#xD;&#xA;      initEffects()&#xD;&#xA;      {&#xD;&#xA;      //With this method you load your effect file&#xD;&#xA;      HR(**D3DXCreateEffectFromFile**( d3ddev, &quot;./DeferredEffect_MaterialsStage.fx&quot;, 0, 0, D3DXSHADER_DEBUG, 0, &amp;mDSEGeometryStage, &amp;errors);) &#xD;&#xA;            // Some Error checking   &#xD;&#xA;		if( errors )&#xD;&#xA;		{&#xD;&#xA;			MessageBoxA(0, (char *)errors-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;			errors-&gt;Release();&#xD;&#xA;		}		&#xD;&#xA;		// Retrieve a Technique from your effects handler&#xD;&#xA;		D3DXHANDLE mhTech = mDSEGeometryStage-&gt;**GetTechniqueByName**(&quot;MaterialsTech&quot;);&#xD;&#xA;                // Set the technique to be used &#xD;&#xA;		HR(mDSEGeometryStage-&gt;SetTechnique(mhTech));&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;2) Provide data to the effect:&#xD;&#xA;&#xD;&#xA;    renderGeometryStage()&#xD;&#xA;    {&#xD;&#xA;        // Effect values handlers (String parameter is the name of a variable in your .fx file)&#xD;&#xA;	D3DXHANDLE mhView		= mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gView&quot;);			&#xD;&#xA;	D3DXHANDLE mhProjection = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gProjection&quot;);		&#xD;&#xA;	D3DXHANDLE mhNearClip = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gNearClip&quot;);&#xD;&#xA;	D3DXHANDLE mhFarClip = mDSEGeometryStage-&gt;GetParameterByName(0, &quot;gFarClip&quot;);&#xD;&#xA;        &#xD;&#xA;        // Set effect values indicating the handler and the data as paramters&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetMatrix(mhProjection, &amp;(camera-&gt;getProjectionMatrix())));&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetMatrix(mhView, &amp;(camera-&gt;getViewMatrix())));		&#xD;&#xA;	HR(mDSEGeometryStage-&gt;SetFloat(mhFarClip, camera-&gt;getFarClip()));&#xD;&#xA;     &#xD;&#xA;        ...&#xD;&#xA;	&#xD;&#xA;3) Render: &#xD;&#xA;As said in a previous answer &#xD;&#xA;&#xD;&#xA;&gt; ID3DXEffect provides Begin() and&#xD;&#xA;&gt; BeginPass() methods.&#xD;&#xA;&#xD;&#xA;So, in the same rendering method you can start to render by calling the device BeginScene() method and inside call the Begin or BeginPass methods of your effect.&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;	// Begin Scene  &#xD;&#xA;	HR(d3ddev-&gt;BeginScene());&#xD;&#xA;	{&#xD;&#xA;                    ...		&#xD;&#xA;&#xD;&#xA;		// Clear targets surface&#xD;&#xA;		d3ddev-&gt;Clear(0, NULL, D3DCLEAR_TARGET |D3DCLEAR_ZBUFFER, &#xD;&#xA;			D3DCOLOR_ARGB(0, 0,0,0), 1.0f, 0);    &#xD;&#xA;		&#xD;&#xA;		// Begin Effect passes.&#xD;&#xA;		UINT numPasses = 0;&#xD;&#xA;		HR(mDSEGeometryStage-&gt;Begin(&amp;numPasses, 0))&#xD;&#xA;		{&#xD;&#xA;           // PLACE HERE YOUR RENDERING STUFF &#xD;&#xA;           // like:  drawTexturedQuad();    &#xD;&#xA;		}&#xD;&#xA;		// End Effect passes&#xD;&#xA;		HR(mDSEGeometryStage-&gt;End());&#xD;&#xA;	}	&#xD;&#xA;	// End scene rendering&#xD;&#xA;	HR(d3ddev-&gt;EndScene());    &#xD;&#xA;    }// End of renderGeometryStage method&#xD;&#xA;&#xD;&#xA;Hope it helps, but your question is not about a chunk of code that you can copy/paste, its more about &quot;basic&quot; concepts. So for this kind of things I really recommend you to follow some tutorial because you will understand all the underlying concepts better. Cheers!" />
  <row Id="29885" PostHistoryTypeId="2" PostId="13453" RevisionGUID="8c7ae2ad-9e0c-4378-a5c0-cdad3b519f01" CreationDate="2011-06-10T14:07:44.050" UserId="1929" Text="If you want to **force** the player down a path, just create one path and let them go at it! Any other paths must logically end in dead-ends or else route back to the main path.&#xD;&#xA;&#xD;&#xA;It depends a lot on the type of game, too. In a rogue-like, for example, you can generate a single path of rooms leading to the exit, and just branch out dead-end rooms.&#xD;&#xA;&#xD;&#xA;In an RPG, you can (as is typically done) block wrong routes with objects/people/etc. so that the user can't take them." />
  <row Id="29886" PostHistoryTypeId="5" PostId="13452" RevisionGUID="c1d88849-3497-42ca-9a61-39f634ad70d3" CreationDate="2011-06-10T14:12:04.827" UserId="7588" Comment="added 155 characters in body" Text="I am looking for articles on level design and particularly for techniques to imply a direction the player to go in, instead of another.&#xD;&#xA;&#xD;&#xA;Like which game mechanics can be used, how graphics, sound, etc. can influence the player to go where you want.&#xD;&#xA;&#xD;&#xA;For example in Donkey Kong Country bananas were used to show other paths or hidden areas, in Alan Wake, there were orange markers to show weapons caches.&#xD;&#xA;&#xD;&#xA;If anyone has ideas, I'd be grateful to hear them too!" />
  <row Id="29887" PostHistoryTypeId="2" PostId="13454" RevisionGUID="b36701a3-9b46-4fb0-9f06-e04ff1089ca2" CreationDate="2011-06-10T14:28:16.077" UserId="6469" Text="Last night I showed my game to my friends and they said it was a bit jumpy. &#xD;&#xA;&#xD;&#xA;The example he gave was in the pokemon games when a battle starts music plays, the screen flashes then pixels out then the pokemon slide on from the side and the battle menu appears.&#xD;&#xA;&#xD;&#xA;In my game you are walking along and the all of a sudden you are staring at the battle menu, I do see his point. &#xD;&#xA;&#xD;&#xA;I am using a switch statement for my game loop, 1 is a fields and 2 is battle, in battle I run an if statement, if battle active do battle else display results screen/wait for user input.&#xD;&#xA;&#xD;&#xA;I thought about making a state for the transition but them I would need a stater for field -&gt; battle, battle -&gt; field, town -&gt; field and the list goes on an on seeming like lots of repeated code to me but I cant think of a way to pause the state while i play an animation like pokemon&#xD;&#xA;&#xD;&#xA;With that sort or architecture how would transition between screens smoothly like my mate suggests?   &#xD;&#xA;&#xD;&#xA;C++ and directX" />
  <row Id="29888" PostHistoryTypeId="1" PostId="13454" RevisionGUID="b36701a3-9b46-4fb0-9f06-e04ff1089ca2" CreationDate="2011-06-10T14:28:16.077" UserId="6469" Text="How to implement transition between screens" />
  <row Id="29889" PostHistoryTypeId="3" PostId="13454" RevisionGUID="b36701a3-9b46-4fb0-9f06-e04ff1089ca2" CreationDate="2011-06-10T14:28:16.077" UserId="6469" Text="&lt;c++&gt;&lt;directx9&gt;" />
  <row Id="29890" PostHistoryTypeId="2" PostId="13455" RevisionGUID="3e58c3e6-c653-46b7-a7dd-5373e0e91d05" CreationDate="2011-06-10T14:30:25.287" UserId="6588" Text="This isn't an article, but there is a chapter in the book *The Art of Game Design* by Jesse Schell that discusses a concept that Walt Disney referred to as &quot;weenies&quot; in reference to dog handlers holding up a hot dog to control where the dog is looking. The most famous weenie Disney used was the castle in the Magic Kingdom; visitors to that theme park were inexorably drawn toward the center by the castle visible right from the entrance and throughout the park. In the book, Schell talks about using this technique in the Magic Carpet VR ride by painting a stripe on the floor to guide player's to the throne.&#xD;&#xA;&#xD;&#xA;More generally, a &quot;weenie&quot; is anything that draws the player's attention. Once their attention is drawn in that direction, they tend to move in that direction. One of the best ways to draw attention is to place a desired item over there. Your example of the bananas falls under this; a lot of games will put gems or ammo or health packs on the path they want the player to take. In fact, the bananas in Donkey Kong Country are discussed at length in a couple articles on http://www.sirlin.net/&#xD;&#xA;&#xD;&#xA;Most of the other ways to draw the player's attention are specific examples of using contrast. For example, a bright spot in a mostly dark level will draw the player's attention. Similarly, a sudden change in the audio will draw the player's attention. If you think about those old Hannah Barbera cartoons then you'll recall how a different colored bush (or something in the scenery) told you something was about to happen there.&#xD;&#xA;&#xD;&#xA;When done sparingly, it can be fun to play with this trope. For example, when the player is suspicious that the desired item or differently colored door is tricking them into taking a more dangerous path. You don't want to overdo that though, or the player will feel like the level designer is just a sadist.&#xD;&#xA;&#xD;&#xA;ADDITION: Oh yeah and enemies can be used for the exact same purpose. Enemies are an interesting sort of guidance tool because they can be either attractive (the player tends to go towards the enemies) or repellent (the player tends to avoid the enemies) depending on context. How powerful the player is relative to the enemies, what kind of reward the player gets for defeating the enemies, etc. are all factors affecting how enemies affect the player's choices." />
  <row Id="29891" PostHistoryTypeId="2" PostId="13456" RevisionGUID="f3550f2b-004c-4a6b-82f0-e64384d4167c" CreationDate="2011-06-10T14:34:26.607" UserId="6469" Text="not sure if the is relevant to what your doing but I remember some games panning or jumping the camera the first time you enter an area showing you there were secret paths available if you wanted to go find them.&#xD;&#xA;&#xD;&#xA;another thing I remember from blue dragon was the enemy placement. a path to a treasure room or the like would have different types of enemies guarding it from the story path. &#xD;&#xA;&#xD;&#xA;having to unlock a path also works. finding a locked door but being told the key is here somewhere and I can get in there always drives me to explore.  " />
  <row Id="29892" PostHistoryTypeId="2" PostId="13457" RevisionGUID="87f0defc-ccba-4844-8cf5-fb2536d836ec" CreationDate="2011-06-10T14:36:51.097" UserId="7532" Text="You should specify a bit more about your game. Whats your game about? What genre?&#xD;&#xA;But a common technique is to use game elements to &quot;guide&quot; the player. For example, if your game is bloody, you can use blood splashes in the floor. If your game is dark you can use light spots. Yoy can also trigger some event that gets the camera attention. &#xD;&#xA;If the point is to avoid player to go somewhere, try always to do it with game elements or distracting the player. For instance, if you want to avoid the player to pay too much attention to one scenario that is not the best of your game, you can try to create a frenetic scene there, so the user don't have time to check the defects of the scenario.&#xD;&#xA;You can also place rewarding things to pick-up. You can place a bot calling your attention... &#xD;&#xA;" />
  <row Id="29893" PostHistoryTypeId="5" PostId="13450" RevisionGUID="788f63e9-a158-4135-b1c0-666568cedf42" CreationDate="2011-06-10T14:40:27.723" UserId="7772" Comment="added 819 characters in body" Text="This one is truly bizarre...  I'm developing using both an iPhone 3GS and an iPad 2.  This symptom is repeatable on the older iPhone hardware much more readily than on the iPad 2.  Here's what happens:&#xD;&#xA;&#xD;&#xA;I start the game and the FPS is ticking at about 47 on the 3GS in OpenGLES2.0.  I have quite a lot on screen right now, so that is reasonable at this stage (I still have a few optimizations I can make too).&#xD;&#xA;&#xD;&#xA;If you put a break in touchesBegan, it takes roughly 4-5 seconds before the break occurs and the game halts.  This doesn't happen all of the time, and in fact, if you restart the app several times, it usually goes away.  Moreover, if I let the game sit for a bit, it will eventually &quot;sync.&quot;  Like I said, the iPad 2 rarely exhibits the problem (one out of every 15-20 test runs), but it is definitely still present.  If you perform a series of touches and accelerometer events in sequence, they are queued up and rendered just like you did them 4-5 seconds later.  Very reminiscent of 4-5s lag delays back in the day online :)&#xD;&#xA;&#xD;&#xA;I've tried a couple things like glFlush, or glFinish at the end of each render loop (doesn't seem to have any effect).  Here's the top game loop:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    - (void) drawView: (CADisplayLink*) displayLink&#xD;&#xA;    {&#xD;&#xA;    double dt = 0.0f; // Time in seconds since last loop&#xD;&#xA;    if (displayLink != nil) {&#xD;&#xA;        dt = displayLink.timestamp - m_timestamp;&#xD;&#xA;        m_timestamp = displayLink.timestamp;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Update the game&#xD;&#xA;    m_gameEngine-&gt;Update(dt);&#xD;&#xA;    &#xD;&#xA;    // Render the game&#xD;&#xA;    m_gameEngine-&gt;Render();&#xD;&#xA;    [m_context presentRenderbuffer:GL_RENDERBUFFER];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**UPDATE:**&#xD;&#xA;&#xD;&#xA;The more I think about it...  this could be a loading issue. Right now, I instantiate my main controller class for the game loop in the `- (id) initWithFrame: (CGRect) frame`&#xD;&#xA;call, which is also where I initialize OpenGL and (finally) call `[displayLink addToRunLoop:[NSRunLoop currentRunLoop]&#xD;&#xA;                     forMode:NSDefaultRunLoopMode]`.  It's almost as if the renderer gets behind or ahead of the game logic and it takes it awhile to get caught back up.  &#xD;&#xA;&#xD;&#xA;From research, I could also just be throttling the CPU too hard.  But if that were the case, I would imagine it wouldn't catch up...  the FPS stays at a solid 44-46, and the input lag does go away if you let it sit for 10-15 seconds (with or without doing anything, it eventually catches up).  I'm stumped, but I'll keep digging..." />
  <row Id="29894" PostHistoryTypeId="5" PostId="13455" RevisionGUID="7b97c9de-2e20-470c-afd0-7a1fdac35bee" CreationDate="2011-06-10T14:40:50.383" UserId="6588" Comment="deleted 5 characters in body" Text="This isn't an article, but there is a chapter in the book *The Art of Game Design* by Jesse Schell that discusses a concept that Walt Disney referred to as &quot;weenies&quot; in reference to dog handlers holding up a hot dog to control where the dog is looking. The most famous weenie Disney used was the castle in the Magic Kingdom; visitors to that theme park were inexorably drawn toward the center by the castle visible right from the entrance and throughout the park. In the book, Schell talks about using this technique in the Magic Carpet VR ride by painting a stripe on the floor to guide player's to the throne.&#xD;&#xA;&#xD;&#xA;More generally, a &quot;weenie&quot; is anything that draws the player's attention. Once their attention is drawn in that direction, they tend to move in that direction. One of the best ways to draw attention is to place a desired item over there. Your example of the bananas falls under this; a lot of games will put gems or ammo or health packs on the path they want the player to take. In fact, the bananas in Donkey Kong Country are discussed at length in a couple articles on http://www.sirlin.net/&#xD;&#xA;&#xD;&#xA;Most of the other ways to draw the player's attention are specific examples of using contrast. For example, a bright spot in a mostly dark level will draw the player's attention. Similarly, a sudden change in the audio will draw the player's attention. If you think about those old Hannah Barbera cartoons then you'll recall how a different colored bush (or something in the scenery) told you something was about to happen there.&#xD;&#xA;&#xD;&#xA;When done sparingly, it can be fun to play with this trope. For example, when the player is suspicious that the desired item or differently colored door is tricking them into taking a more dangerous path. You don't want to overdo that though, or the player will feel like the level designer is just a sadist.&#xD;&#xA;&#xD;&#xA;ADDITION: Oh yeah and enemies can be placed to guide the player. Enemies are an interesting sort of guidance tool because they can be either attractive (the player tends to go towards the enemies) or repellent (the player tends to avoid the enemies) depending on context. How powerful the player is relative to the enemies, what kind of reward the player gets for defeating the enemies, etc. are all factors affecting how enemies affect the player's choices." />
  <row Id="29895" PostHistoryTypeId="5" PostId="13457" RevisionGUID="e9f1eff5-ba21-4623-a97e-60d1edab2638" CreationDate="2011-06-10T14:44:43.250" UserId="7532" Comment="added 58 characters in body" Text="I think you should specify a bit more about your game. &#xD;&#xA;Whats your game about? What genre?&#xD;&#xA;&#xD;&#xA;But a common technique is to use game elements to &quot;guide&quot; the player. For example, if your game is bloody, you can use blood splashes in the floor. If your game is dark you can use light spots. &#xD;&#xA;Yoy can also trigger some event that gets the camera attention. &#xD;&#xA;&#xD;&#xA;If the point is to avoid player to go somewhere, try always to do it with game elements or distracting the player. &#xD;&#xA;For instance, if you want to avoid the player to pay too much attention to one scenario that is not the best of your game, you can try to create a frenetic scene there, so the user don't have time to check the defects of the scenario.&#xD;&#xA;&#xD;&#xA;You can also place rewarding things to pick-up. You can place a bot calling your attention... etc etc  but depends a lot of the game. " />
  <row Id="29896" PostHistoryTypeId="5" PostId="13450" RevisionGUID="1f36bf7f-15e1-40cf-a932-1a48cfee7108" CreationDate="2011-06-10T15:02:04.153" UserId="7772" Comment="added 911 characters in body" Text="**UPDATE** _I think I solved this one, though any thoughts or suggestions are always welcome!_&#xD;&#xA;&#xD;&#xA;This one is truly bizarre...  I'm developing using both an iPhone 3GS and an iPad 2.  This symptom is repeatable on the older iPhone hardware much more readily than on the iPad 2.  Here's what happens:&#xD;&#xA;&#xD;&#xA;I start the game and the FPS is ticking at about 47 on the 3GS in OpenGLES2.0.  I have quite a lot on screen right now, so that is reasonable at this stage (I still have a few optimizations I can make too).&#xD;&#xA;&#xD;&#xA;If you put a break in touchesBegan, it takes roughly 4-5 seconds before the break occurs and the game halts.  This doesn't happen all of the time, and in fact, if you restart the app several times, it usually goes away.  Moreover, if I let the game sit for a bit, it will eventually &quot;sync.&quot;  Like I said, the iPad 2 rarely exhibits the problem (one out of every 15-20 test runs), but it is definitely still present.  If you perform a series of touches and accelerometer events in sequence, they are queued up and rendered just like you did them 4-5 seconds later.  Very reminiscent of 4-5s lag delays back in the day online :)&#xD;&#xA;&#xD;&#xA;I've tried a couple things like glFlush, or glFinish at the end of each render loop (doesn't seem to have any effect).  Here's the top game loop:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    - (void) drawView: (CADisplayLink*) displayLink&#xD;&#xA;    {&#xD;&#xA;    double dt = 0.0f; // Time in seconds since last loop&#xD;&#xA;    if (displayLink != nil) {&#xD;&#xA;        dt = displayLink.timestamp - m_timestamp;&#xD;&#xA;        m_timestamp = displayLink.timestamp;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Update the game&#xD;&#xA;    m_gameEngine-&gt;Update(dt);&#xD;&#xA;    &#xD;&#xA;    // Render the game&#xD;&#xA;    m_gameEngine-&gt;Render();&#xD;&#xA;    [m_context presentRenderbuffer:GL_RENDERBUFFER];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**UPDATE:**&#xD;&#xA;&#xD;&#xA;The more I think about it...  this could be a loading issue. Right now, I instantiate my main controller class for the game loop in the `- (id) initWithFrame: (CGRect) frame`&#xD;&#xA;call, which is also where I initialize OpenGL and (finally) call `[displayLink addToRunLoop:[NSRunLoop currentRunLoop]&#xD;&#xA;                     forMode:NSDefaultRunLoopMode]`.  It's almost as if the renderer gets behind or ahead of the game logic and it takes it awhile to get caught back up.  &#xD;&#xA;&#xD;&#xA;From research, I could also just be throttling the CPU too hard.  But if that were the case, I would imagine it wouldn't catch up...  the FPS stays at a solid 44-46, and the input lag does go away if you let it sit for 10-15 seconds (with or without doing anything, it eventually catches up).  I'm stumped, but I'll keep digging...&#xD;&#xA;&#xD;&#xA;**UPDATE 2:**&#xD;&#xA;&#xD;&#xA;Doing some profiling... figured out that the accelerometer being polled 1/60 was a bit taxing.  If I moved it to 1/30, this problem went away.  This is concerning to me, as it likely suggests I do have a CPU overloading issue that will only be solved through some serious optimizations across the board (which is okay, I knew I had to do it anyway).  &#xD;&#xA;&#xD;&#xA;For anyone with a similar issue, especially if you are using the accelerometer, make sure you disable it if/when you aren't using it.  I only use the accelerometer to allow the player to rotate/move the camera - so when the player has the camera locked, I am now toggling it off.  This has solved my problem for now, but like I said, I probably only solved it temporarily.  A real solution is going to take more work!&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="29897" PostHistoryTypeId="2" PostId="13458" RevisionGUID="b737cbbe-1483-4d27-a510-52db45233242" CreationDate="2011-06-10T15:06:41.050" UserId="7630" Text="If you have a change state module setup (as opposed to directly setting the state variable) then that's the logical place to put a call to a transition routine.  For a ridiculously oversimplified pseudo answer:&#xD;&#xA;&#xD;&#xA;    void changeState ( int destinationState ) {&#xD;&#xA;        // check that destination state is valid&#xD;&#xA;        // check that current state can transition to destination state&#xD;&#xA;        doTransition ( currentState, destinationState);&#xD;&#xA;        currentState = destination state&#xD;&#xA;    }" />
  <row Id="29898" PostHistoryTypeId="2" PostId="13459" RevisionGUID="6814943a-c2e0-497d-b70f-aeeb0a68e740" CreationDate="2011-06-10T15:15:32.300" UserId="4662" Text="You could just make a single &quot;transition&quot; state, with which state you're going to and from indicated as a couple of variables in the object." />
  <row Id="29899" PostHistoryTypeId="5" PostId="13454" RevisionGUID="62420d44-08aa-46d2-b9a6-bad14dcf754d" CreationDate="2011-06-10T15:15:32.530" UserId="6469" Comment="added 273 characters in body" Text="Last night I showed my game to my friends and they said it was a bit jumpy. &#xD;&#xA;&#xD;&#xA;The example he gave was in the pokemon games when a battle starts music plays, the screen flashes then pixels out then the pokemon slide on from the side and the battle menu appears.&#xD;&#xA;&#xD;&#xA;In my game you are walking along and the all of a sudden you are staring at the battle menu, I do see his point. &#xD;&#xA;&#xD;&#xA;I am using a switch statement for my game loop, 1 is a fields and 2 is battle, in battle I run an if statement, if battle active do battle else display results screen/wait for user input.&#xD;&#xA;&#xD;&#xA;I thought about making a state for the transition but them I would need a stater for field -&gt; battle, battle -&gt; field, town -&gt; field and the list goes on an on seeming like lots of repeated code to me but I cant think of a way to pause the state while i play an animation like pokemon&#xD;&#xA;&#xD;&#xA;With that sort or architecture how would transition between screens smoothly like my mate suggests?   &#xD;&#xA;&#xD;&#xA;C++ and directX&#xD;&#xA;&#xD;&#xA;Edit: the problem I have is that once the state is changed the update routeen for that state is not called so all the sprites disappear as they are textures and only the background remains so I cannot just play a animation then change state or it will look even worse. " />
  <row Id="29900" PostHistoryTypeId="25" PostId="13452" RevisionGUID="7d0516b8-5974-46c2-bbc4-ce92a1d61824" CreationDate="2011-06-10T15:16:28.473" Comment="http://twitter.com/#!/StackGameDev/status/79205293304721408" />
  <row Id="29901" PostHistoryTypeId="5" PostId="13441" RevisionGUID="f01f6eea-b3a5-4db4-9d68-c3d2ba5dad50" CreationDate="2011-06-10T15:20:52.803" UserId="4513" Comment="edited body" Text="    glm::quat myquaternion(glm::vec3(angle.x, angle.y, angle.z));&#xD;&#xA;&#xD;&#xA;Where `angle` is a `glm::vec3` containing *pitch, yaw, roll* respectively.&#xD;&#xA;&#xD;&#xA;PS. If in doubt, just go to the headers and look. The definition can be found in glm/gtc/quaternion.hpp:&#xD;&#xA;&#xD;&#xA;    explicit tquat(tvec3&lt;T&gt; const &amp; eulerAngles) {&#xD;&#xA;    		tvec3&lt;T&gt; c = glm::cos(eulerAngle * value_type(0.5));&#xD;&#xA;		tvec3&lt;T&gt; s = glm::sin(eulerAngle * value_type(0.5));&#xD;&#xA;		&#xD;&#xA;		this-&gt;w = c.x * c.y * c.z + s.x * s.y * s.z;&#xD;&#xA;		this-&gt;x = s.x * c.y * c.z - c.x * s.y * s.z;&#xD;&#xA;		this-&gt;y = c.x * s.y * c.z + s.x * c.y * s.z;&#xD;&#xA;		this-&gt;z = c.x * c.y * s.z - s.x * s.y * c.z;	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Where `quat` is a float typedef for `tquat`." />
  <row Id="29902" PostHistoryTypeId="2" PostId="13460" RevisionGUID="fe3274ac-e2e2-491d-ba87-02a0d1d09847" CreationDate="2011-06-10T15:59:50.327" UserId="288" Text="The only reason against using `event` in a game is that creating a delegate to attach to the event handler creates a heap object that can cause a garbage collection which can cause a frame-rate hiccup on on Xbox 360 (and possibly WP7, haven't tested it).&#xD;&#xA;&#xD;&#xA;In general, this should not be relevant to a game UI that you set-up once and simply let run.&#xD;&#xA;&#xD;&#xA;Also, calling an event handler is a *tiny, tiny, tiny* bit slower some other available methods. And this is also absolutely irrelevant for a UI. (It only comes into play for micro-optimised number-crunching).&#xD;&#xA;&#xD;&#xA;So, as long as you're not running around assigning event handlers all willy-nilly, then the choice of using an `event` in a game is no different to the choice of using one in a regular application.&#xD;&#xA;&#xD;&#xA;Copying the design of WinForms for your game UI is perfectly fine.&#xD;&#xA;&#xD;&#xA;(It's worth pointing out one caveat of events is that they are &quot;hidden&quot; strong references that can unintentionally keep objects alive if you don't remove the handler. This is relevant to both games and regular applications)" />
  <row Id="29903" PostHistoryTypeId="2" PostId="13461" RevisionGUID="9584f2fb-23d1-45e0-bdfa-91fee53d447f" CreationDate="2011-06-10T16:18:21.143" UserId="2229" Text="I wish to **interpolate two quaternion values**. As I still can not get working results, can I kindly ask you to verify my function calls? The code below supports [GLM][1] (OpenGL Mathemathics) library, so this questions might be for those, who know it.&#xD;&#xA;&#xD;&#xA;*Firstly*, I perform **Quaternion intialization from Euler Angles**:&#xD;&#xA;&#xD;&#xA;    glm::quat myAxisQuat(pvAnimation-&gt;at(nFrameNo).vecRotation);&#xD;&#xA;    glm::quat myAxisNextQuat(pvAnimation-&gt;at(nFrameNo + 1).vecRotation);&#xD;&#xA;&#xD;&#xA;*Secondly*, I **interpolate** between the two input quaternions. The variable `fInterpolation` contains value in the range 0.0f - 1.0f.&#xD;&#xA;&#xD;&#xA;    myInterpolatedRotQuat = glm::mix(myAxisQuat, myAxisNextQuat, fInterpolationTime);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Thirdly*, I **convert my interpolated quaternion back to Euler Angles**:&#xD;&#xA;&#xD;&#xA;    vecInterpolatedRot = glm::gtx::quaternion::eularAngles( myInterpolatedRotQuat) ;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;At the end, the values in `vecInterpolatedRot` do not represent the interpolated EulerAngles. It is difficult to understand the Quaternion values after conversion from Eular Angles, so I would like to ask you for your help, please.&#xD;&#xA;&#xD;&#xA;**What can be wrong, please?**&#xD;&#xA;&#xD;&#xA;I double and triple checked input variables, I tried various approaches, and the only issue, at this moment might be with the third Aplha parameter in glm::mix()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29904" PostHistoryTypeId="1" PostId="13461" RevisionGUID="9584f2fb-23d1-45e0-bdfa-91fee53d447f" CreationDate="2011-06-10T16:18:21.143" UserId="2229" Text="GLM: Quaternion SLERP Interpolation" />
  <row Id="29905" PostHistoryTypeId="3" PostId="13461" RevisionGUID="9584f2fb-23d1-45e0-bdfa-91fee53d447f" CreationDate="2011-06-10T16:18:21.143" UserId="2229" Text="&lt;opengl&gt;&lt;math&gt;&lt;interpolation&gt;&lt;quaternion&gt;&lt;glm&gt;" />
  <row Id="29906" PostHistoryTypeId="2" PostId="13462" RevisionGUID="0edbf0e8-e0ae-4e1b-be20-db3f78751707" CreationDate="2011-06-10T16:22:56.050" UserId="5224" Text="The type of camera that keep's a certain point always in focus and can rotate around that focus point and zoom in/out is called an Arc Ball Camera. There are many arc ball camera code samples for XNA.  For example, I wrote this sample some time ago: http://roy-t.nl/index.php/2010/02/21/xna-simple-arcballcamera/ .&#xD;&#xA;&#xD;&#xA;JUst be sure to set the camera's target at the position where your model is, and you should be good to go. " />
  <row Id="29907" PostHistoryTypeId="5" PostId="13461" RevisionGUID="c85a8230-da1f-4eba-a70f-e74cb48e84db" CreationDate="2011-06-10T16:23:29.840" UserId="2229" Comment="added 1 characters in body" Text="I wish to **interpolate two quaternion values**. As I still can not get working results, can I kindly ask you to verify my function calls? The code below supports [GLM][1] (OpenGL Mathemathics) library, so this questions might be for those, who know it.&#xD;&#xA;&#xD;&#xA;*Firstly*, I perform **Quaternion intialization from Euler Angles**:&#xD;&#xA;&#xD;&#xA;    glm::quat myAxisQuat(pvAnimation-&gt;at(nFrameNo).vecRotation);&#xD;&#xA;    glm::quat myAxisNextQuat(pvAnimation-&gt;at(nFrameNo + 1).vecRotation);&#xD;&#xA;&#xD;&#xA;*Secondly*, I **interpolate** between the two input quaternions. The variable `fInterpolation` contains value in the range 0.0f - 1.0f.&#xD;&#xA;&#xD;&#xA;    myInterpolatedRotQuat = glm::mix(myAxisQuat, myAxisNextQuat, fInterpolationTime);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Thirdly*, I **convert my interpolated quaternion back to Euler Angles**:&#xD;&#xA;&#xD;&#xA;    vecInterpolatedRot = glm::gtx::quaternion::eularAngles( myInterpolatedRotQuat) ;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;At the end, the values in `vecInterpolatedRot` do not represent the interpolated EulerAngles. It is difficult to understand the Quaternion values after conversion from Eular Angles, so I would like to ask you for your help, please.&#xD;&#xA;&#xD;&#xA;**What can be wrong, please?**&#xD;&#xA;&#xD;&#xA;I double and tripple checked input variables, I tried various approaches, and the only issue, at this moment might be with the third Aplha parameter in glm::mix()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29908" PostHistoryTypeId="2" PostId="13463" RevisionGUID="1a84a4a7-8818-4102-a57d-8863c8f2e89a" CreationDate="2011-06-10T16:51:10.647" UserId="4496" Text="If you don't mind widening the scope a bit for examples, Scorched Earth has a mode like this, where everyone sets what they're doing for the turn before having everyone execute at the same time.&#xD;&#xA;&#xD;&#xA;Also in an even looser sense, Grandia (RPG).  &#xD;&#xA;&#xD;&#xA;Whenever someone's turn crops up, it pauses on them, then when you assign the action they wait a specific amount of time during which they can be &quot;canceled&quot; by a hard hit (spells/abilities take longer than attacks which just take a moment).  Once they are done building to the attack they go off to do it.  This does mean shortly after they are done they have a tendency to just stand still, but it does make things like evasion (choosing to run to another point) and AoE (actually takes into account who's in the target area at the moment the spell goes off) have interesting effects.  &#xD;&#xA;&#xD;&#xA;Also if you queue up an attack, and the enemy takes off to attack someone elsewhere, your person will attempt to chase them down for a certain distance then stop.  If they run by, they'll take a swipe at the target but depending on their attack animation/direction/speed they may or may not hit.&#xD;&#xA;&#xD;&#xA;Both of these are not traditional Turn-Based Strategy, but elements of the gameplay you are looking for are shown in each.  Might help give a different angle on bits and pieces of it." />
  <row Id="29909" PostHistoryTypeId="2" PostId="13464" RevisionGUID="0515bfd1-8ad7-4b1d-adda-43e574d378c2" CreationDate="2011-06-10T16:56:33.673" UserId="6813" Text="I never used GLM until now (it seems interesting through) but are you sure about your &quot;glm::mix&quot; call ?&#xD;&#xA;&#xD;&#xA;In the documentation I can find two mix functions :&#xD;&#xA;&#xD;&#xA;- [glm::core::function::common::mix][1]&#xD;&#xA;&#xD;&#xA;        genTypeT glm::core::function::common::mix (&#xD;&#xA;               genTypeT const &amp; x,&#xD;&#xA;               genTypeT const &amp; y,&#xD;&#xA;               genTypeU const &amp; a &#xD;&#xA;        ) &#xD;&#xA;&#xD;&#xA; If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1].	&#xD;&#xA;- [glm::gtc::quaternion::mix][2]&#xD;&#xA;&#xD;&#xA;        detail::tquat&lt;T&gt; glm::gtc::quaternion::mix (&#xD;&#xA;               detail::tquat&lt; T &gt; const &amp; x,&#xD;&#xA;               detail::tquat&lt; T &gt; const &amp; y,&#xD;&#xA;               typename detail::tquat&lt; T &gt;::value_type const &amp; a &#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA; Returns a SLERP interpolated quaternion of x and y according a. &#xD;&#xA;&#xD;&#xA;I think **glm::mix** is an alias to the first one (I'm still searching informations to confirm it through, as I can't find it in the documentation).&#xD;&#xA;&#xD;&#xA;[1]: http://glm.g-truc.net/api-0.9.0/a00117.html#a11288dc43a2a1833766728a3eb81ac63&#xD;&#xA;[2]: http://glm.g-truc.net/api-0.9.0/a00135.html#a99e0097254662e3d4d5859fa329762ca" />
  <row Id="29910" PostHistoryTypeId="5" PostId="13464" RevisionGUID="9b80e360-8457-4d66-8d2f-72df483ba88c" CreationDate="2011-06-10T17:02:28.340" UserId="6813" Comment="added 66 characters in body" Text="I never used GLM until now (it seems interesting through) but are you sure about your &quot;glm::mix&quot; call ?&#xD;&#xA;&#xD;&#xA;In the documentation I can find two mix functions :&#xD;&#xA;&#xD;&#xA;- [glm::core::function::common::mix][1]&#xD;&#xA;&#xD;&#xA;        genTypeT glm::core::function::common::mix (&#xD;&#xA;               genTypeT const &amp; x,&#xD;&#xA;               genTypeT const &amp; y,&#xD;&#xA;               genTypeU const &amp; a &#xD;&#xA;        ) &#xD;&#xA;&#xD;&#xA; If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1].	&#xD;&#xA;- [glm::gtc::quaternion::mix][2]&#xD;&#xA;&#xD;&#xA;        detail::tquat&lt;T&gt; glm::gtc::quaternion::mix (&#xD;&#xA;               detail::tquat&lt; T &gt; const &amp; x,&#xD;&#xA;               detail::tquat&lt; T &gt; const &amp; y,&#xD;&#xA;               typename detail::tquat&lt; T &gt;::value_type const &amp; a &#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA; Returns a SLERP interpolated quaternion of x and y according a. &#xD;&#xA;&#xD;&#xA;I think **glm::mix** is an alias to the first one (I'm still searching informations to confirm it through, as I can't find it in the documentation) and as you need the second one, you could try to call it directly.&#xD;&#xA;&#xD;&#xA;[1]: http://glm.g-truc.net/api-0.9.0/a00117.html#a11288dc43a2a1833766728a3eb81ac63&#xD;&#xA;[2]: http://glm.g-truc.net/api-0.9.0/a00135.html#a99e0097254662e3d4d5859fa329762ca" />
  <row Id="29911" PostHistoryTypeId="2" PostId="13465" RevisionGUID="b3550be0-c0bb-4e6c-86ce-999e76d75bc4" CreationDate="2011-06-10T17:13:07.213" UserId="7937" Text="This is going to be a rather vague question xD&#xD;&#xA;&#xD;&#xA;In XNA is there a way of working out if a point or rectangle is colliding with a 3D .x object? It is a big model, and would take a long time to map out all the rectangles for collision detection so I was wondering if there was a easier way of doing it :)&#xD;&#xA;&#xD;&#xA;Thanks ;D" />
  <row Id="29912" PostHistoryTypeId="1" PostId="13465" RevisionGUID="b3550be0-c0bb-4e6c-86ce-999e76d75bc4" CreationDate="2011-06-10T17:13:07.213" UserId="7937" Text="XNA Automatic Collision detection from model?" />
  <row Id="29913" PostHistoryTypeId="3" PostId="13465" RevisionGUID="b3550be0-c0bb-4e6c-86ce-999e76d75bc4" CreationDate="2011-06-10T17:13:07.213" UserId="7937" Text="&lt;xna&gt;&lt;3d&gt;&lt;collision-detection&gt;&lt;models&gt;" />
  <row Id="29914" PostHistoryTypeId="5" PostId="13461" RevisionGUID="6e0e7e91-22a1-4a05-b9ee-162641cebc97" CreationDate="2011-06-10T17:47:48.877" UserId="2229" Comment="added more information; added 12 characters in body" Text="I wish to **interpolate two quaternion values**. As I still can not get working results, can I kindly ask you to verify my function calls? The code below supports [GLM][1] (OpenGL Mathemathics) library, so this questions might be for those, who know it.&#xD;&#xA;&#xD;&#xA;*Firstly*, I perform **Quaternion intialization from Euler Angles**:&#xD;&#xA;&#xD;&#xA;    glm::quat myAxisQuat(pvAnimation-&gt;at(nFrameNo).vecRotation);&#xD;&#xA;    glm::quat myAxisNextQuat(pvAnimation-&gt;at(nFrameNo + 1).vecRotation);&#xD;&#xA;&#xD;&#xA;*Secondly*, I **interpolate** between the two input quaternions. The variable `fInterpolation` contains value in the range 0.0f - 1.0f.&#xD;&#xA;&#xD;&#xA;    myInterpolatedRotQuat = glm::mix(myAxisQuat, myAxisNextQuat, fInterpolationTime);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Thirdly*, I **convert my interpolated quaternion back to Euler Angles**:&#xD;&#xA;&#xD;&#xA;    vecInterpolatedRot = glm::gtx::quaternion::eularAngles( myInterpolatedRotQuat) ;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;At the end, the values in `vecInterpolatedRot` do not represent the interpolated EulerAngles. It is difficult to understand the Quaternion values after conversion from Eular Angles, so I would like to ask you for your help, please.&#xD;&#xA;&#xD;&#xA;**What can be wrong, please?**&#xD;&#xA;&#xD;&#xA;I double and tripple checked input variables, I tried various approaches, and the only issue, at this moment might be with the third Aplha parameter in glm::mix()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;## Update: ##&#xD;&#xA;&#xD;&#xA;To provide you with more information, the returned values in `vecInterpolatedRot` are extremely low. At the end of the interpolation, I would expect valid eular angles.&#xD;&#xA;&#xD;&#xA;*This is random sequence of interpolated values, as the object moves according to predefined animation path.*&#xD;&#xA;&#xD;&#xA;    rotX:-1.7451 rotY:1.7993 rotZ-0.854642&#xD;&#xA;    rotX:-1.06451 rotY:1.18485 rotZ-0.694015&#xD;&#xA;    rotX:-0.254822 rotY:0.437004 rotZ-0.942035&#xD;&#xA;    rotX:0.578816 rotY:-0.335103 rotZ-0.716057&#xD;&#xA;    rotX:1.53934 rotY:-1.07602 rotZ-1.0182&#xD;&#xA;    rotX:2.5582 rotY:-1.87737 rotZ-0.759468&#xD;&#xA;    rotX:-2.58259 rotY:-2.47432 rotZ-1.06071&#xD;&#xA;    rotX:-1.35049 rotY:3.11548 rotZ-0.81839&#xD;&#xA;    rotX:0.0106472 rotY:2.78129 rotZ-1.04353&#xD;&#xA;    rotX:1.46636 rotY:2.33968 rotZ-0.879188&#xD;&#xA;    rotX:0.0289322 rotY:2.31166 rotZ-0.91746&#xD;&#xA;    rotX:-1.47901 rotY:2.37235 rotZ-0.938591&#xD;&#xA;    rotX:-2.59482 rotY:2.89469 rotZ-1.15554&#xD;&#xA;    rotX:2.47283 rotY:-2.76131 rotZ-0.992493&#xD;&#xA;    rotX:1.73065 rotY:-1.53285 rotZ-1.27898&#xD;&#xA;    rotX:0.85806 rotY:-0.176976 rotZ-1.03487&#xD;&#xA;    rotX:0.452009 rotY:-1.14604 rotZ-0.927788&#xD;&#xA;    rotX:0.0604701 rotY:-2.12479 rotZ-1.05684&#xD;&#xA;    rotX:0.107648 rotY:-2.07785 rotZ-1.05071&#xD;&#xA;    rotX:0.154894 rotY:-2.03083 rotZ-1.04569&#xD;&#xA;    rotX:0.809623 rotY:2.14456 rotZ-1.31262&#xD;&#xA;    rotX:1.15268 rotY:0.332553 rotZ-0.983604&#xD;&#xA;    rotX:2.16299 rotY:-0.545458 rotZ-1.11758&#xD;&#xA;    rotX:2.95376 rotY:-1.2008 rotZ-0.846527&#xD;&#xA;    rotX:-2.94892 rotY:-0.892473 rotZ-1.17334&#xD;&#xA;    rotX:-1.89716 rotY:-1.30162 rotZ-1.53247&#xD;&#xA;    rotX:0.804938 rotY:1.93659 rotZ-1.37281&#xD;&#xA;    rotX:0.653453 rotY:1.73722 rotZ-1.14364&#xD;&#xA;    rotX:2.24713 rotY:0.658935 rotZ-1.03684&#xD;&#xA;    rotX:2.97528 rotY:0.508203 rotZ-0.559124&#xD;&#xA;    rotX:-2.49988 rotY:0.640482 rotZ0.0117903&#xD;&#xA;    rotX:-1.57379 rotY:1.16303 rotZ0.288639&#xD;&#xA;    rotX:-1.4928 rotY:1.17794 rotZ0.902059&#xD;&#xA;    rotX:-0.667796 rotY:1.94995 rotZ1.49074&#xD;&#xA;    rotX:2.12971 rotY:-1.85782 rotZ0.904871&#xD;&#xA;    rotX:2.36951 rotY:-2.03682 rotZ0.189242&#xD;&#xA;    rotX:1.5574 rotY:-2.92156 rotZ-0.450418&#xD;&#xA;    rotX:1.6256 rotY:2.29519 rotZ-1.46659&#xD;&#xA;    rotX:2.85414 rotY:2.11303 rotZ-0.42888&#xD;&#xA;    rotX:-2.48503 rotY:2.96942 rotZ0.189887&#xD;&#xA;    rotX:-1.55656 rotY:3.00852 rotZ0.675669&#xD;&#xA;&#xD;&#xA;  [1]: http://glm.g-truc.net/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29915" PostHistoryTypeId="2" PostId="13466" RevisionGUID="bb04ac7c-d694-45e5-a298-943b10f5da40" CreationDate="2011-06-10T18:00:48.370" UserId="1839" Text="The posted values seem to be radians, but GLM uses degrees." />
  <row Id="29916" PostHistoryTypeId="25" PostId="13420" RevisionGUID="12963a42-33b5-4dcc-84a1-9abc72b55770" CreationDate="2011-06-10T18:18:08.767" Comment="http://twitter.com/#!/StackGameDev/status/79251012619214849" />
  <row Id="29917" PostHistoryTypeId="5" PostId="13465" RevisionGUID="c8963bbe-0738-479f-ae7e-c4e214344541" CreationDate="2011-06-10T18:22:58.560" UserId="1198" Comment="deleted 13 characters in body" Text="This is going to be a rather vague question xD&#xD;&#xA;&#xD;&#xA;In XNA is there a way of working out if a point or rectangle is colliding with a 3D .x object? It is a big model, and would take a long time to map out all the rectangles for collision detection so I was wondering if there was a easier way of doing it :)" />
  <row Id="29918" PostHistoryTypeId="2" PostId="13467" RevisionGUID="93321634-32bf-4bfe-8f2c-9acd9cc0dd88" CreationDate="2011-06-10T18:23:21.377" UserId="4496" Text="If you don't mind the collision being somewhat rough, you can use the bounding sphere of the individual mesh parts for basic collision.  &#xD;&#xA;&#xD;&#xA;This will result in a small to large area for false positives (depending on the design of the model and the individual mesh parts), so be warned.  However this will work well, and quickly, in situations where you don't need particularly fine grained checking or if you wish to know when you should employ a higher resolution collision check." />
  <row Id="29919" PostHistoryTypeId="5" PostId="13466" RevisionGUID="3fc454df-d4f9-4742-9ccd-afde70e4e20b" CreationDate="2011-06-10T18:50:41.807" UserId="1839" Comment="added 317 characters in body; added 245 characters in body" Text="The posted values seem to be radians, but GLM uses degrees.&#xD;&#xA;&#xD;&#xA;**Edit**: Also make sure you use the same rotation order. If you dont understand why that matters see the different results for different orders [here at Wolfram Alpha][1]. Play a bit with the &quot;Euler rotation sequence&quot; box and watch the different outputs.&#xD;&#xA;&#xD;&#xA;[Here][2] and [here][3] are some more links that explain the rotation-order-problem&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolframalpha.com/input/?i=euler%20angles&#xD;&#xA;  [2]: http://www.euclideanspace.com/maths/geometry/rotations/order.htm&#xD;&#xA;  [3]: http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm" />
  <row Id="29920" PostHistoryTypeId="2" PostId="13468" RevisionGUID="81de6d53-737d-4d00-82cd-13c1144c9240" CreationDate="2011-06-10T19:21:36.427" UserId="2332" Text="If you're not willing to change your architecture from a switch statement to using the state design pattern (which is fine, as you know your code best) then it's gonna be pretty ugly.&#xD;&#xA;&#xD;&#xA;Assuming you're using an architecture with a fairly standard Update loop, perhaps you could have a flag checking whether a transition is required and on the next Update check for the flag being set right at the beginning of your update loop and if it's on, then play a transition and wait until the transition has completed before turning the flag off.&#xD;&#xA;&#xD;&#xA;Quick, dirty pseudocode would be:&#xD;&#xA;&#xD;&#xA;    bool bStateChangeRequested;&#xD;&#xA;    &#xD;&#xA;    while( bUpdate )&#xD;&#xA;    {&#xD;&#xA;        if( bStateChangeRequested )&#xD;&#xA;        {&#xD;&#xA;            PlayTransition();&#xD;&#xA;            WaitForTransitionToComplete();&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        DoStateStuff();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Hope that helps, although I'd highly recommend the state design pattern for solving this. It'll make everything so much cleaner and better organised, so a definite thing to think about in future iterations." />
  <row Id="29921" PostHistoryTypeId="5" PostId="13458" RevisionGUID="ec680791-65c4-48bc-b2bb-89e3e7530108" CreationDate="2011-06-10T19:40:00.723" UserId="7630" Comment="added 440 characters in body; deleted 31 characters in body" Text="In your switch statement call to a transition routine.  For a ridiculously oversimplified pseudo answer:&#xD;&#xA;&#xD;&#xA;    void changeState ( int destinationState, int *currentState ) {&#xD;&#xA;        // check that destination state is valid&#xD;&#xA;        // check that current state can transition to destination state&#xD;&#xA;        doTransition ( *currentState, destinationState);&#xD;&#xA;        *currentState = destinationState&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;[Edit]&#xD;&#xA;To call this using a switch statement that already exists you would do something like this:&#xD;&#xA;&#xD;&#xA;    switch (destinationState): {&#xD;&#xA;    1: {changeState ( 1, &amp;currentState); break; } // switch from some state to fields&#xD;&#xA;    2: {changeState ( 2, &amp;currentState); break; } // switch from some state to battle&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then you do still need to write doTransition() that would actually do that transition animation.  doTransition would do your fade in/fade out/whatever you wanted it to do." />
  <row Id="29922" PostHistoryTypeId="2" PostId="13469" RevisionGUID="6960fd39-2d3f-4e57-af26-68df9720d1b5" CreationDate="2011-06-10T20:24:05.703" UserId="4584" Text="I'm looking for a tutorial that starts at square 1 for game development and moves up through intermediate/expert levels of 3D game development. I really want to get into 3D game dev and I've been trying to for awhile in my free time, but I know so little at times that I'm not even sure what terminology to use in order to phrase a question properly. &#xD;&#xA;&#xD;&#xA;Ideally, I'm hoping to find tutorials for the XNA Framework, what little experience I have is XNA.&#xD;&#xA;&#xD;&#xA;I've been developing for years and don't really need help with the language. What I know I need help on is stuff like rendering, what exactly a Matrix represents, and other things in the framework's library. I don't even know what all is available in the library." />
  <row Id="29923" PostHistoryTypeId="1" PostId="13469" RevisionGUID="6960fd39-2d3f-4e57-af26-68df9720d1b5" CreationDate="2011-06-10T20:24:05.703" UserId="4584" Text="Ultimate beginner's tutorial to 3d game dev using XNA Framework?" />
  <row Id="29924" PostHistoryTypeId="3" PostId="13469" RevisionGUID="6960fd39-2d3f-4e57-af26-68df9720d1b5" CreationDate="2011-06-10T20:24:05.703" UserId="4584" Text="&lt;xna-4.0&gt;&lt;tutorials&gt;" />
  <row Id="29925" PostHistoryTypeId="2" PostId="13470" RevisionGUID="d6706819-beae-4547-9dbf-25854bb5dd0a" CreationDate="2011-06-10T20:39:51.537" UserId="7657" Text="I've got the source for a simple one we're using for a code war competition at [Windward Wrocks][1]. It's in C# but that's close to Objective C.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.windwardreports.com/davidt/2011/06/code-wars-prepare-to-fire-a-broadside-mateys.html" />
  <row Id="29926" PostHistoryTypeId="16" PostId="13470" RevisionGUID="744e2299-a4d9-414a-a1fe-29c249e3df4b" CreationDate="2011-06-10T20:39:51.537" UserId="7657" />
  <row Id="29927" PostHistoryTypeId="2" PostId="13471" RevisionGUID="31ab89d9-ea09-44c4-8bb8-b83b2365268f" CreationDate="2011-06-10T20:41:08.693" UserId="7657" Text="I've got the source for a simple one we're using for a code war competition at [Windward Wrocks][1]. I think it's well organized and it is pretty simple. But certain parts were created quickly, not well. With that said, even in the largest game development teams, there are parts in those that are written quickly, not well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.windwardreports.com/davidt/2011/06/code-wars-prepare-to-fire-a-broadside-mateys.html" />
  <row Id="29928" PostHistoryTypeId="16" PostId="13471" RevisionGUID="6344a955-fb96-458a-a29d-7e255de62181" CreationDate="2011-06-10T20:41:08.693" UserId="7657" />
  <row Id="29929" PostHistoryTypeId="2" PostId="13472" RevisionGUID="f40346e1-db23-495c-b3c2-9f6d22599742" CreationDate="2011-06-10T20:45:15.273" UserId="1156" Text="The [MSDN tutorial][1] is pretty decent, actually. I assume you've got a decent understanding of gamedev in general (else you're kind of stuck).&#xD;&#xA;&#xD;&#xA;A book which I think is pretty good is [Learning XNA 4.0][2]. It starts off with 2D stuff for the first few chapters, but quickly progresses into 3D - cameras, models, shaders, et al. It's not much of a tutorial to making a game to a decent overview of XNA, 3D in light detail, and knowing the useful things.&#xD;&#xA;&#xD;&#xA;As for the framework itself, it isn't **that** difficult to just pick it up as you go along. Pick a simple game to try for and search out what you need (of course, the book is really good for this).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb203897%28v=xnagamestudio.31%29.aspx&#xD;&#xA;  [2]: http://www.amazon.com/Learning-XNA-4-0-Development-Windows/dp/1449394620" />
  <row Id="29930" PostHistoryTypeId="6" PostId="13469" RevisionGUID="3cb08294-4f70-411f-aa08-c4b6a1b2e3d6" CreationDate="2011-06-10T20:45:26.193" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;tutorials&gt;" />
  <row Id="29935" PostHistoryTypeId="25" PostId="13469" RevisionGUID="14217788-f319-4dd4-881c-a174a32b58db" CreationDate="2011-06-10T21:18:09.343" Comment="http://twitter.com/#!/StackGameDev/status/79296313228918784" />
  <row Id="29939" PostHistoryTypeId="2" PostId="13473" RevisionGUID="26fe428c-1dd1-40f5-b575-76101f1ecefa" CreationDate="2011-06-10T21:29:00.107" UserId="1024" Text="Polish is important, just don't polish a turd.&#xD;&#xA;&#xD;&#xA;If your making a game that has a new mechanic, or is not easily comparable to another game, it would be a mistake to polish it for too long. There is no telling if anyone will like your game.&#xD;&#xA;&#xD;&#xA;On the opposite end of the spectrum, if you are copying an existing style, like a football simulation game, well, if you can do a good job you will make money. That is known. So you can get a clearer picture of how much you should spend on making the game better then competition.&#xD;&#xA;&#xD;&#xA;I think Portal is a good example for what I am trying to convey. Portal had a novel mechanic. The first rev was a student project and wasn't that great, but it proved the hypothesis that the mechanic could be fun. For the first commercial release Valve felt comfortable investing in polishing it up, because the rough prototype had proved it could be fun. The case for polish was even easier in the second (commercial) release. &#xD;&#xA;&#xD;&#xA;Before you think of a game, think of mechanic. The first rev is the test of the mechanic. When you find a successful mechanic, model how much you can make by polishing, and go from there." />
  <row Id="29940" PostHistoryTypeId="5" PostId="5523" RevisionGUID="45f370ba-c3b1-4d1f-ad91-658539eb095e" CreationDate="2011-06-10T21:41:38.780" UserId="721" Comment="added 167 characters in body; added 210 characters in body" Text="There is no open source game engine available on Android equal to commercial Unreal Engine or Unity. But you can use different Open Source Projects for little games or applications. &#xD;&#xA;&#xD;&#xA;Java 2d Game Engine (as cocos 2d on iphone):&#xD;&#xA;&#xD;&#xA; - [AndEgine][2]: perfect for a first game&#xD;&#xA;&#xD;&#xA;C++ 2d Game Engine:&#xD;&#xA;&#xD;&#xA; - [Cocos2d-x][1]: cocos2d is a reference on iPhone. If you know it, try this project.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Java 3d Game Engine:&#xD;&#xA;&#xD;&#xA; - [libGDX][4]: many parts are native, so it is an efficient engine. There is a backend with OpenGL do develop on your Desktop.&#xD;&#xA; - [jmonkey][5]&#xD;&#xA;&#xD;&#xA;C++ 3D engine available on Android:&#xD;&#xA;&#xD;&#xA; - [Ogre3D][6]&#xD;&#xA; - [Irrlicht][7] (Moblox, Air Hockey EM...)&#xD;&#xA;&#xD;&#xA;Ogre3D and Irrlicht aren't well packaged but you can develop games for iPhone and Android devices. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-x.org/&#xD;&#xA;  [2]: http://www.andengine.org/&#xD;&#xA;  [3]: http://code.google.com/p/rokon/&#xD;&#xA;  [4]: http://code.google.com/p/libgdx/&#xD;&#xA;  [5]: http://jmonkeyengine.org/&#xD;&#xA;  [6]: http://www.ogre3d.org&#xD;&#xA;  [7]: http://irrlicht.sourceforge.net/" />
  <row Id="29941" PostHistoryTypeId="2" PostId="13474" RevisionGUID="dc0bf2d8-0113-4b86-995c-5b35c8bd5791" CreationDate="2011-06-10T22:34:45.750" UserId="7367" Text="I have a gravity handler that works pretty well:&#xD;&#xA;&lt;!-- language: lang-cpp --&gt;&#xD;&#xA;&lt;pre&gt; &lt;code&gt;&#xD;&#xA;&#xD;&#xA;//If gravity is active:&#xD;&#xA;//Iterate through all subscribers and have them fall&#xD;&#xA;//by the GRAVITY_VALUE modified by the subscribers gravity modifier.&#xD;&#xA;void GravityHandler::Update(double deltaTime) {&#xD;&#xA;    if(!this-&amp;gt;isActive) return;&#xD;&#xA;    std::list&amp;lt;RigidBody*&amp;gt;::iterator iter;&#xD;&#xA;    for(iter = instance-&amp;gt;subscribers-&amp;gt;begin(); iter != instance-&amp;gt;subscribers-&amp;gt;end(); ++iter) {&#xD;&#xA;        int y = (*iter)-&amp;gt;GetPosition().second;&#xD;&#xA;        float yV = (*iter)-&amp;gt;GetYSpeed();&#xD;&#xA;        float gravMod = (*iter)-&amp;gt;GetGravityModifier();&#xD;&#xA;        float mod = (GRAVITY_VALUE * gravMod);&#xD;&#xA;        if(deltaTime &amp;lt;= 0) deltaTime = 1;&#xD;&#xA;        double deltaV = y + ((yV + mod) / deltaTime);&#xD;&#xA;        int TV = (*iter)-&amp;gt;GetTerminalVelocity(); /* For testing purposes this is set to 100 */&#xD;&#xA;        if(std::fabs(deltaV) &amp;gt; TV) {&#xD;&#xA;            if(deltaV &amp;lt; 0) deltaV = -TV;&#xD;&#xA;            else deltaV = TV;&#xD;&#xA;        }&#xD;&#xA;        int result = static_cast&amp;lt;int&amp;gt;(y + deltaV);&#xD;&#xA;        (*iter)-&amp;gt;SetYPosition(result);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt; &lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;The problem I'm having is I want an object to be able to &quot;jump&quot; on keypress:&#xD;&#xA;&lt;!-- language: lang-cpp --&gt;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;//test terminal velocity initialized to 100 previously.&#xD;&#xA;if(keyboard-&amp;gt;KeyPress(KEY_SPACE)) {&#xD;&#xA;    test-&amp;gt;SetYSpeed(-100);&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;This does nothing. I have a sneaking suspicion that it has to do with the fact that my deltaTime value is not a constant 1/60 seconds (16 milliseconds) and keeps fluctuating between zero and 16 (hence the check in the Gravity Handler to make sure division by zero is clamped.)&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-cpp--&gt;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;&#xD;&#xA;struct GameTime {&#xD;&#xA;    clock_t currentTime;&#xD;&#xA;    clock_t previousTime;&#xD;&#xA;    double deltaTime;&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;int main() {&#xD;&#xA;&#xD;&#xA;    if(init()) {&#xD;&#xA;        if(Initialization(window)) {&#xD;&#xA;            GameTime time;&#xD;&#xA;            time.currentTime = clock();&#xD;&#xA;            time.previousTime = clock();&#xD;&#xA;            time.deltaTime = difftime(time.currentTime, time.previousTime);&#xD;&#xA;            while(!quit) {&#xD;&#xA;                time.previousTime = time.currentTime;&#xD;&#xA;                Input(time.deltaTime);&#xD;&#xA;                Processing(time.deltaTime);&#xD;&#xA;                Render(time.deltaTime);&#xD;&#xA;                time.currentTime = clock();&#xD;&#xA;                time.deltaTime = difftime(time.currentTime, time.previousTime);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        CleanUp();&#xD;&#xA;    }&#xD;&#xA;    deinit();&#xD;&#xA;&#xD;&#xA;    return 0;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Any help or suggestions would be appreciated." />
  <row Id="29942" PostHistoryTypeId="1" PostId="13474" RevisionGUID="dc0bf2d8-0113-4b86-995c-5b35c8bd5791" CreationDate="2011-06-10T22:34:45.750" UserId="7367" Text="2D Gravity and jumping." />
  <row Id="29943" PostHistoryTypeId="3" PostId="13474" RevisionGUID="dc0bf2d8-0113-4b86-995c-5b35c8bd5791" CreationDate="2011-06-10T22:34:45.750" UserId="7367" Text="&lt;c++&gt;&lt;2d-physics&gt;" />
  <row Id="29944" PostHistoryTypeId="2" PostId="13475" RevisionGUID="741255eb-b815-4eda-b830-b9681d42eb55" CreationDate="2011-06-10T22:45:42.360" UserId="5899" Text="I built a generic transition system for a 2d engine for iPhone. I'm going to try to explain it. This is only an approach, the implementation has more things that are not relevant.&#xD;&#xA;&#xD;&#xA;Suppose that your engine is hierarchical, if it is not, there are a lot of of reasons why a game engine must be hierarchical. We can have two interfaces IState and ITransition inheriting from the SceneNode class. Like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Well,  SceneNode can be updateable, this means that the parent calls the children method &quot;update&quot; and enabled, that receive or not input events ( so you can't disable the user events when the transition is executing ).&#xD;&#xA;&#xD;&#xA;Every state has a name, and every transition has the old and new state between the transition exists.&#xD;&#xA;&#xD;&#xA;Ok. Now we can have two managers, Transition and StateManager, the purpose of these managers is to have a registry of all Transitions and States and offer features. These managers can be singleton to be accessible from everywhere.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With addTransition we attach a custom transition to a pair of menus, the order is important. When we call changeState, the manager is responsible of test if a transition has been added and execute it if exist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With this simple architecture, we are to program a transition between the MainMenu to Battle.&#xD;&#xA;&#xD;&#xA;The current scene graph is:&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My transition implementation:&#xD;&#xA;&#xD;&#xA;    TransitionMenuToBattle : public ITransition&#xD;&#xA;    {&#xD;&#xA;        public:&#xD;&#xA;            void enter()&#xD;&#xA;            {&#xD;&#xA;                getOldState()-&gt;setActive( false );&#xD;&#xA;                getRoot()-&gt;addChild( this );&#xD;&#xA;   &#xD;&#xA;                addChild( blackSprite );&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            void update( float delta )&#xD;&#xA;            {&#xD;&#xA;                // make fade of blackSprite&#xD;&#xA;                // ...&#xD;&#xA;&#xD;&#xA;                if ( blackSprite-&gt;getAlpha() == OPAQUE )&#xD;&#xA;                {&#xD;&#xA;                    getRoot()-&gt;addChild( getNewState() );&#xD;&#xA;                    getNewState()-&gt;setActive( false );&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if ( blackSprite-&gt;getAlpha() == INVISIBLE )&#xD;&#xA;                    exit();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            void exit()&#xD;&#xA;            {&#xD;&#xA;                getRoot()-&gt;removeChild( this );&#xD;&#xA;                getNewState()-&gt;setActive( true );&#xD;&#xA;            }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;When enter method finishes, the scene graph is:&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;When exit method is called in update:&#xD;&#xA;&#xD;&#xA;![enter image description here][5]&#xD;&#xA;&#xD;&#xA;when exit method finishes:&#xD;&#xA;&#xD;&#xA;![enter image description here][6]&#xD;&#xA;&#xD;&#xA;when the game begins we need to add the transition:&#xD;&#xA;&#xD;&#xA;    TransitionFactory::get()-&gt;addTransition( &quot;StateMainMenu&quot;, &quot;StateBattle&quot;, new TransitionMenuToBattle( ) );&#xD;&#xA;&#xD;&#xA;Then, for example in a button callback from MainMenu, we can put the call TransitionFactory::get()-&gt;changeMenu( &quot;StateMainMenu&quot;, &quot;StateBattle&quot; ); or wrap this method into:&#xD;&#xA;&#xD;&#xA;    IState::changeMenu( std::string newMenu )&#xD;&#xA;    {&#xD;&#xA;        TransitionFactory::get()-&gt;changeMenu( getStateMenu(), newMenu );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can complicate the transition much as you want. The transition has access to the two states and it can do things like overlap elements of two. The transition can receive the things that needs in his constructor. If TransitionManager detects that there is no transition added between two states can have a default behavior.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/8fzC2.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/5wRy2.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/rjs5J.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/wfpKR.jpg&#xD;&#xA;  [5]: http://i.stack.imgur.com/Z5N8B.jpg&#xD;&#xA;  [6]: http://i.stack.imgur.com/lO7sO.jpg" />
  <row Id="29945" PostHistoryTypeId="25" PostId="13465" RevisionGUID="5691b54a-3d49-442a-ac65-3317474ced0f" CreationDate="2011-06-11T00:18:10.527" Comment="http://twitter.com/#!/StackGameDev/status/79341616338444289" />
  <row Id="29946" PostHistoryTypeId="5" PostId="12128" RevisionGUID="a0284626-fd20-44fc-bd19-d1b56c3039d7" CreationDate="2011-06-11T03:16:44.853" UserId="5966" Comment="deleted 112 characters in body" Text="Several solutions.&#xD;&#xA;&#xD;&#xA;1. For Box2D, set `b2_velocityThreshold` in `b2Settings.h` file. In my case, I set it to `0.0f` and it worked! Mass, friction, damping were NOT problem.&#xD;&#xA;Check this discussion thread for more details.&#xD;&#xA;http://www.box2d.org/forum/viewtopic.php?f=3&amp;t=6906&amp;p=30782#p30782&#xD;&#xA;&#xD;&#xA;2. Using other physics engine.&#xD;&#xA;*Newton Game Dynamics* configured performing this correctly by default.&#xD;&#xA;However using Newton dynamics in iOS is possible but it's somewhat harder than others. I used several days configuring it for iOS.&#xD;&#xA;&#xD;&#xA;I'm also asking on BulletPhysics forums. I'll update this when I got a solution.&#xD;&#xA;&#xD;&#xA;-- (edit) --&#xD;&#xA;&#xD;&#xA;There are some threshold attributes in Bullet, however I couldn't find exactly same thing with `b2_velocityThreshold`.&#xD;&#xA;&#xD;&#xA;This looks similar, but didn't work well.&#xD;&#xA;&#xD;&#xA;    btRigidBody-&gt;setContactProcessingThreshold(0.0f)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="29947" PostHistoryTypeId="2" PostId="13476" RevisionGUID="c2a47ea9-bbd8-49ad-9397-248936dc67dd" CreationDate="2011-06-11T03:17:33.773" UserId="7945" Text="As a game developer who has published a casual game on [BigFishGames.com][1] I speak from experience when I say that the highest quality games bring in the greatest amount of money. In any given day, a number 1 game there will be bringing in 2x as much as the number 2 game. And a number 1 game will be making about 10x more than a game which is ranked 5-10. &#xD;&#xA;&#xD;&#xA;So with that in mind, you would have to create 10 'average quality' games (by BFG standards) to make the same amount of money as one really high quality game. **A high quality game will receive much higher profits than many low quality games which take the same amount of time to develop.**&#xD;&#xA;&#xD;&#xA;Big Fish Games has a minimum quality standard, such that they won't accept really poor games. This means that for your game to be accepted you have to have worked on it for quite a while to make sure it's polished and actually fun. So if you assume some sort of 'polish/making game fun' time overhead, then your time is better spent developing a high quality game, otherwise if you're polishing bad games then the amount of time taken to polish them won't be worth the return.&#xD;&#xA;&#xD;&#xA;Having said this, it is however possible to have a series of lower quality games and make a good income. The catch is that you have to release them in appropriate places.&#xD;&#xA;&#xD;&#xA;Every time you publish a game, it's another source of residual income (from continual sales). So as long as it's &quot;sort of fun&quot; then there will be people who will play it and you. If you release games independently from portals (such as on your own website), then you can set your own quality standards. And if you're able to make a game which is both fun and of reasonable quality in a **reasonable** amount of time, then you **can** make money from making a lot of lower quality games. &#xD;&#xA;&#xD;&#xA;An example of this is Apple's Appstore. It's flooded with crappy apps as well as good ones. A lot of the time, the good apps can be overshadowed by so many bad apps that it doesn't really seem worth it. However, due to the shear volume of users of iOS products, you are basically guaranteed to get sales, even if it's just a trickle. And so, by coincidence, I am currently conducting an experiment of your very question. I actually released a game of 'acceptable' quality yesterday and got 8 sales overnight - which is **absolutely nothing**, but the game only took me **3 days** to make, as opposed to my casual game on BFG which took **6 months** and was of very high quality. However that game is there forever (until Apple closes the AppStore), and it will hopefully continue to have money trickle in. So if I made 10 of these, it would have taken me a month... and may be getting me 100 sales a day from all of them combined.&#xD;&#xA;&#xD;&#xA;If you're selling games to flash portals (through FlashGameLicense for example) and getting a flat return, then you're not going to see this residual income unless you also have additional licenses in place. Here is a good example of residual income with a Flash Game: [http://www.andymoore.ca/2010/03/steambirds-by-the-numbers/][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://BigFishGames.com&#xD;&#xA;  [2]: http://www.andymoore.ca/2010/03/steambirds-by-the-numbers/" />
  <row Id="29948" PostHistoryTypeId="25" PostId="13454" RevisionGUID="7d11b2cf-616e-4306-a580-048190770ef4" CreationDate="2011-06-11T03:18:11.297" Comment="http://twitter.com/#!/StackGameDev/status/79386918466498560" />
  <row Id="29952" PostHistoryTypeId="2" PostId="13478" RevisionGUID="45d9da84-75e0-4244-aa21-9186dbd6deb5" CreationDate="2011-06-11T03:45:23.193" UserId="3874" Text="I'm making a 2D game with OpenGL. In order to avoid changing the state machine and binding at runtime, I want to make consolidate my textures into bigger textures,&#xD;&#xA;&#xD;&#xA;for example, taking 4 128x128 textures and making 1 big 512x512. I could then just render part of the texture rather than binding a new one.&#xD;&#xA;&#xD;&#xA;Is this a good idea? Could my newly created texture get lost, or are there major faults in doing  this?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="29953" PostHistoryTypeId="1" PostId="13478" RevisionGUID="45d9da84-75e0-4244-aa21-9186dbd6deb5" CreationDate="2011-06-11T03:45:23.193" UserId="3874" Text="Is it a good idea to render many textures into one texture?" />
  <row Id="29954" PostHistoryTypeId="3" PostId="13478" RevisionGUID="45d9da84-75e0-4244-aa21-9186dbd6deb5" CreationDate="2011-06-11T03:45:23.193" UserId="3874" Text="&lt;opengl&gt;&lt;c++&gt;&lt;2d&gt;&lt;textures&gt;" />
  <row Id="29956" PostHistoryTypeId="2" PostId="13479" RevisionGUID="39579d5f-e143-4387-84a5-4c6404f1b865" CreationDate="2011-06-11T05:57:13.547" UserId="5904" Text="Yes, in general, to it being a good idea. OpenGL generally has transparent loss mechanisms, that is, if a texture is lost, you won't notice it.&#xD;&#xA;&#xD;&#xA;The idea of making multiple textures into one large texture has been explored. This is called &quot;Texture Atlasing&quot;. There are faults with it if you try to make an atlas that is greater than the maximum texture size of the graphics card (which on modern cards is quite large, 8Kx8K or so).&#xD;&#xA;&#xD;&#xA;There are pathological cases where texture atlasing will not improve performance, but with discrete graphics cards offering &gt;&gt; 512MB of video memory on low end cards, I don't think you'll run into any of these type problems. I wouldn't concern yourself too much with performance optimizations if you are developing for the desktop systems until it is clear that they are needed -- and what an epic title it must be then! ;)" />
  <row Id="29957" PostHistoryTypeId="2" PostId="13480" RevisionGUID="4c2db548-187d-458f-96c7-a4965f8205b0" CreationDate="2011-06-11T05:59:57.143" UserId="370" Text="I'm looking into scripting languages to embed in my game.&#xD;&#xA;&#xD;&#xA;I've always assumed Lua was the best choice, but I've read some recent news about embedding V8 as was considering using it instead.&#xD;&#xA;&#xD;&#xA;My question is two fold:  &#xD;&#xA;&#xD;&#xA;Does anyone with experience embedding v8 (or another javascript engine) recommend it?  &#xD;&#xA;&#xD;&#xA;How does it compare with embedding Lua?&#xD;&#xA;&#xD;&#xA;I like that v8 has a c++ embedding API.  However Lua API has had lots of time to be refined (newer isn't always better and all that).&#xD;&#xA;&#xD;&#xA;Note: At this point I'm not too concerned with which is better language or which library has better performance.  I'm only asking about ease of embedding." />
  <row Id="29958" PostHistoryTypeId="1" PostId="13480" RevisionGUID="4c2db548-187d-458f-96c7-a4965f8205b0" CreationDate="2011-06-11T05:59:57.143" UserId="370" Text="Experience embedding javascript" />
  <row Id="29959" PostHistoryTypeId="3" PostId="13480" RevisionGUID="4c2db548-187d-458f-96c7-a4965f8205b0" CreationDate="2011-06-11T05:59:57.143" UserId="370" Text="&lt;javascript&gt;&lt;scripting&gt;&lt;lua&gt;" />
  <row Id="29960" PostHistoryTypeId="25" PostId="13288" RevisionGUID="fdd3d29a-72a8-4994-8840-ca9378edc80f" CreationDate="2011-06-11T06:18:12.367" Comment="http://twitter.com/#!/StackGameDev/status/79432221290807296" />
  <row Id="29961" PostHistoryTypeId="2" PostId="13481" RevisionGUID="1cab724a-6005-4cba-a839-db1167e55517" CreationDate="2011-06-11T06:23:52.790" UserId="6888" Text="you should maybe look into [nodeJS](http://nodejs.org/)&#xD;&#xA;&#xD;&#xA;Its a JavaScript server that's very fast, and open source." />
  <row Id="29962" PostHistoryTypeId="5" PostId="13448" RevisionGUID="00567e9b-5b20-48c9-a980-136b2c96c1db" CreationDate="2011-06-11T07:21:36.370" UserId="7925" Comment="added 426 characters in body; edited title" Text="I want to write a 3D App (think of a MotionBuilder clone for simplicity sake) that would be able to import a scene from common packages and apply/run my own character animation algorithms.&#xD;&#xA;&#xD;&#xA;**Normal Workflow**&#xD;&#xA;&#xD;&#xA; 1. Design a character into Blender, Maya, 3DS, etc;&#xD;&#xA; 2. Import it in the 3D App;&#xD;&#xA; 3. Rig it into the 3D App and animate it;&#xD;&#xA; 4. Export it back to other packages or to a game engine.&#xD;&#xA;&#xD;&#xA;It should allow common features you can find in any good 3D software.&#xD;&#xA;&#xD;&#xA;**Requirements of the 3D App**&#xD;&#xA;&#xD;&#xA; - Must run under Windows and Mac OSX &#xD;&#xA; - Multiple viewports&#xD;&#xA; - Object Selection&#xD;&#xA; - Objects manipulation (positionning);&#xD;&#xA; - Common File Format import/export&#xD;&#xA; - Basic lighting support (NO EDITING)&#xD;&#xA; - Basic mesh animation (skinning, etc) (NO EDITING)&#xD;&#xA; - Written in C/C++&#xD;&#xA; - GUI in Qt&#xD;&#xA; - Embedding a scripting language (not sure though, optional)&#xD;&#xA; - etc (I think you get the point^^)&#xD;&#xA; &#xD;&#xA;**My background**&#xD;&#xA;&#xD;&#xA; - Strong mathematical skills;&#xD;&#xA; - Strong 3D animation algorithms knowledge;&#xD;&#xA; - Strong C/C++ background;&#xD;&#xA; - Good Qt background;&#xD;&#xA; - Good Maya programming skills;&#xD;&#xA; - Some (but old) OpenGL knowledge;&#xD;&#xA; - Absolutely NO graphics card programming skills; (if I can avoid that, it is better);&#xD;&#xA; - A little (very very little) low-level optimization knowledge; (if I can avoid that, it is better);&#xD;&#xA; &#xD;&#xA;Based on your experience, which **3D rendering engine** should I use to write a MotionBuilder clone (without any mesh, light, shader editing capabilities) focusing on skeleton animation ONLY? I saw that Ogre and Irrlicht are great... Or should I write my own one?&#xD;&#xA;&#xD;&#xA;Thanks for any advice.&#xD;&#xA;&#xD;&#xA;Best regards." />
  <row Id="29963" PostHistoryTypeId="4" PostId="13448" RevisionGUID="00567e9b-5b20-48c9-a980-136b2c96c1db" CreationDate="2011-06-11T07:21:36.370" UserId="7925" Comment="added 426 characters in body; edited title" Text="Which 3D rendering engine for a MotionBuilder Clone (with only character animation editing capabilities)?" />
  <row Id="29964" PostHistoryTypeId="2" PostId="13482" RevisionGUID="5ccb1c5c-271a-4740-90ab-9f68a9ceaecd" CreationDate="2011-06-11T09:08:26.597" UserId="1542" Text="I've heard that UML is a great modelling language for software design. However, for software, such as game, that will certainly encounter major changes during the development, I doubt that UML will work effectively. &#xD;&#xA;&#xD;&#xA;What are the common ways or models that the game programmers used? and is there any recommended tools for game designing process?" />
  <row Id="29965" PostHistoryTypeId="1" PostId="13482" RevisionGUID="5ccb1c5c-271a-4740-90ab-9f68a9ceaecd" CreationDate="2011-06-11T09:08:26.597" UserId="1542" Text="Software Design/Modelling method and tool for games?" />
  <row Id="29966" PostHistoryTypeId="3" PostId="13482" RevisionGUID="5ccb1c5c-271a-4740-90ab-9f68a9ceaecd" CreationDate="2011-06-11T09:08:26.597" UserId="1542" Text="&lt;game-design&gt;" />
  <row Id="29967" PostHistoryTypeId="25" PostId="13480" RevisionGUID="a3f1e01c-021e-4842-b6d9-218520af55ad" CreationDate="2011-06-11T09:18:13.663" Comment="http://twitter.com/#!/StackGameDev/status/79477524907823104" />
  <row Id="29968" PostHistoryTypeId="2" PostId="13483" RevisionGUID="3b64462c-b035-4cfe-b8fa-ed7282101176" CreationDate="2011-06-11T09:18:24.970" UserId="1839" Text="My most recommended tools are **Trial and Error** ([Iterative Development](http://en.wikipedia.org/wiki/Iterative_and_incremental_development)) and **Documantation/Communication**, and the experience coming from both. &#xD;&#xA;&#xD;&#xA;Whether you accomplish that by using good old pen and paper or sophisticated collaborative software tools doesn't matter much." />
  <row Id="29969" PostHistoryTypeId="5" PostId="13483" RevisionGUID="5bcde4c1-6fb4-4ff7-8806-cbcc675bba93" CreationDate="2011-06-11T09:27:06.837" UserId="1839" Comment="added 20 characters in body; deleted 1 characters in body; edited body; deleted 19 characters in body" Text="My most recommended tools are **Trial and Error** ([Iterative Development](http://en.wikipedia.org/wiki/Iterative_and_incremental_development)) and **Communication/Documantation**, and the experience coming from both. &#xD;&#xA;&#xD;&#xA;Whether you accomplish that by using good old pen and paper or sophisticated collaborative software tools doesn't matter much." />
  <row Id="29970" PostHistoryTypeId="5" PostId="13483" RevisionGUID="0fa4bd12-6e51-4e46-8e83-f1774176c9d2" CreationDate="2011-06-11T09:32:23.730" UserId="1839" Comment="edited body" Text="My most recommended tools are **Trial and Error** ([Iterative Development](http://en.wikipedia.org/wiki/Iterative_and_incremental_development)) and **Communication/Documantation**, and the experience coming out of it. &#xD;&#xA;&#xD;&#xA;Whether you accomplish that by using good old pen and paper or sophisticated collaborative software tools doesn't matter much." />
  <row Id="29971" PostHistoryTypeId="2" PostId="13484" RevisionGUID="47357ada-9950-4352-8d94-523a833141ef" CreationDate="2011-06-11T10:12:54.367" UserId="6803" Text="I'm building a physics engine in OpenGL and I'm a little bit confused on how framerate independence is achieved.&#xD;&#xA;&#xD;&#xA;At the moment I'm using glutTimerFunc to cap the framerate at 30fps.I was wondering if there is way to do this without capping it but not have my objects running around like crazy when I run the app at higher fps.&#xD;&#xA;&#xD;&#xA;I'm thinking that I need some sort of measure of distance relative to the rendering speed.Are there any articles/tutorials you may know that would help me out.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="29972" PostHistoryTypeId="1" PostId="13484" RevisionGUID="47357ada-9950-4352-8d94-523a833141ef" CreationDate="2011-06-11T10:12:54.367" UserId="6803" Text="Framerate Indepence" />
  <row Id="29973" PostHistoryTypeId="3" PostId="13484" RevisionGUID="47357ada-9950-4352-8d94-523a833141ef" CreationDate="2011-06-11T10:12:54.367" UserId="6803" Text="&lt;opengl&gt;&lt;frame-rate&gt;" />
  <row Id="29974" PostHistoryTypeId="2" PostId="13485" RevisionGUID="1f32acce-a027-4f5f-abf0-52b3d4ab3716" CreationDate="2011-06-11T10:15:55.780" UserId="5224" Text="Real software (inc. games) changes a lot during development. UML is a very practical way to visualize and think of your design. Just use a tool that saves your UML in a textual format and save your UML, all your documentation, and your game code in a version control system. That way you can see the changes that happened to your design.&#xD;&#xA;&#xD;&#xA;I would also like to mention rapid prototyping, as a development method to test if your design works." />
  <row Id="29975" PostHistoryTypeId="2" PostId="13486" RevisionGUID="bed5aa19-f246-41fb-ad11-3dcd005b50a5" CreationDate="2011-06-11T10:55:32.830" UserId="7946" Text="You have to measure the time that elapsed between two frames, and multiply that with every movement calculation that you do. &#xD;&#xA;&#xD;&#xA;Computer A runs the game at 22FPS.&#xD;&#xA;Computer B runs it at 35FPS.&#xD;&#xA;&#xD;&#xA;Therefor, the average time between frames on computer A is about 45ms, and the average time between frames on Computer B is about 28ms.&#xD;&#xA;&#xD;&#xA;Now let's say you move players on both of the computers in one direction every frame, depending on the time elapsed between the frames:&#xD;&#xA;&#xD;&#xA;On Computer A:&#xD;&#xA;&#xD;&#xA;    //let t bet the time between frames&#xD;&#xA;    player.move(t)&#xD;&#xA;&#xD;&#xA;The same on Computer B:&#xD;&#xA;&#xD;&#xA;    //let t bet the time between frames&#xD;&#xA;    player.move(t)&#xD;&#xA;&#xD;&#xA;On Computer A, the function will (on average) get called 22 times, and t will have a value of 45.&#xD;&#xA;&#xD;&#xA;On Computer B, the function will be called 35 times, and t will have an average value of 28.&#xD;&#xA;&#xD;&#xA;Therefor, after one second, the player on computer A will have moved 22*45 = 990 units. On computer B, the player will have moved 35*28= 980 units. &#xD;&#xA;&#xD;&#xA;The difference in here is there because I rounded the numbers of milliseconds between frames on both computers. Usually, it will be exactly the same.&#xD;&#xA;     " />
  <row Id="29976" PostHistoryTypeId="2" PostId="13487" RevisionGUID="f231c7b1-5c49-481c-896d-80b38ed40928" CreationDate="2011-06-11T10:58:41.517" UserId="1156" Text="This [Gaffer on Games article][1] will explain more than you ever need to know. (great article on timesteps)&#xD;&#xA;&#xD;&#xA;At a very simple level, you want to calculate how long since the last frame and use that in your movement calculations. If you attempt to cap it at, say, 60fps, you're not going to be able to check every 16.6666ms exactly. You may end up with an update call at 16.7 ms after the last frame. You multiply your velocity vectors by 0.0167 or whatever and move the object.&#xD;&#xA;&#xD;&#xA;If you ran it on a slow computer, maybe getting only 10 fps - so one update per 100ms, you would instead multiply the velocity by 0.1 - the objects may be jerkier, but they will move at the same speed. The last code example in the article shows how to do this (it's very simple).&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="29979" PostHistoryTypeId="5" PostId="13487" RevisionGUID="fdd93276-4fad-4a76-b332-5b621ce2bb2f" CreationDate="2011-06-11T11:03:53.340" UserId="1156" Comment="added 423 characters in body" Text="This [Gaffer on Games article][1] will explain more than you ever need to know. (great article on timesteps)&#xD;&#xA;&#xD;&#xA;At a very simple level, you want to calculate how long since the last frame and use that in your movement calculations. If you attempt to cap it at, say, 60fps, you're not going to be able to check every 16.6666ms exactly. You may end up with an update call at 16.7 ms after the last frame. You multiply your velocity vectors by 0.0167 or whatever and move the object.&#xD;&#xA;&#xD;&#xA;If you ran it on a slow computer, maybe getting only 10 fps - so one update per 100ms, you would instead multiply the velocity by 0.1 - the objects may be jerkier, but they will move at the same speed. The last code example in the article shows how to do this (it's very simple).&#xD;&#xA;&#xD;&#xA;Also check out:  &#xD;&#xA;[Frame Independent Movement][2] (duplicate?)  &#xD;&#xA;[Time based vs frame based][3]  &#xD;&#xA;[Fixed step vs variable step][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/9515/frame-independent-movement&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/6825/time-based-movement-vs-frame-rate-based-movement&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step" />
  <row Id="29980" PostHistoryTypeId="5" PostId="10526" RevisionGUID="2da06902-ffd2-4e99-890a-d0501ce23824" CreationDate="2011-06-11T11:18:25.473" UserId="450" Comment="shortened line to removed horizontal scrollbar" Text="We did something like that in [Stendhal][1] for raids. &#xD;&#xA;&#xD;&#xA;We did not aim for completely avoiding restarts. So changes to our core infrastructure services such as client/server communication do need a restart. But adding entities, creatures and NPCs, and modifying existing objects does work. (Oh, and sometimes live bug fixing, reflection can be used to manipulate even private fields). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Since we do not only want new object based on **new data** (like another skin), but want to add new behaviour, the world program needs to be able to **load new class files**. We call them &quot;scripts&quot;, but they are real compiled Java classes. Those classes implement the [Script.java][2] interface. &#xD;&#xA;&#xD;&#xA;[Maria.java][3] is a simple example. She is a new NPC that sells drinks and food to players. We can define [very complex objects][4] in there, too.&#xD;&#xA;&#xD;&#xA;A new class is loaded this way:&#xD;&#xA;&#xD;&#xA;    // create a new class loader, with the script folder as classpath.&#xD;&#xA;    final File file = new File(&quot;./data/script&quot;);&#xD;&#xA;    final ClassLoader loader = new URLClassLoader(new URL[]{file.toURI().toURL()});&#xD;&#xA;&#xD;&#xA;    // load class through new loader&#xD;&#xA;    final Class&lt; ? &gt; aClass = loader.loadClass(classname);&#xD;&#xA;    script = (Script) aClass.newInstance();&#xD;&#xA;&#xD;&#xA;If you can ensure unique names and never want to unload classes, you are done with the low level stuff.&#xD;&#xA;&#xD;&#xA;**Unloading**, however, seems pretty important. In order to achieve that, you have to instantiate a new class loader whenever you want to inject new code. So that the GC can do its work after the last reference to that code is cleared.&#xD;&#xA;&#xD;&#xA;We have a **/unload command** that invokes an unload method in our interface so that scripts can do cleanup. The real unloading is done automatically by the GC.&#xD;&#xA;&#xD;&#xA;We often create lots of **temporary objects** during raids. And we want all of them to be removed after the raid ends. For example the Gnomes Raid, which spawns a number of gnomes near the invisible admin, we use this code: [GnomeRaid.java][5] extends [CreateRaid.java][6]. &#xD;&#xA;&#xD;&#xA;The script could access the world directly (as the first example shows) and do its own clean up in the unload() method. But Java coders are not used to do clean up, and it is annoying. So we created a **sandbox** that scripts may use. On unload all objects added to the world through the Sandbox class are removed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stendhalgame.org&#xD;&#xA;  [2]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/core/scripting/Script.java?view=markup&#xD;&#xA;  [3]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/Maria.java?view=markup&#xD;&#xA;  [4]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/BetManager.java?view=markup&#xD;&#xA;  [5]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/GnomeRaid.java?view=markup&#xD;&#xA;  [6]: http://arianne.cvs.sf.net/viewvc/arianne/stendhal/src/games/stendhal/server/script/CreateRaid.java?view=markup" />
  <row Id="29981" PostHistoryTypeId="25" PostId="13484" RevisionGUID="930ac424-2d67-496c-8d95-489303983d5e" CreationDate="2011-06-11T12:18:13.717" Comment="http://twitter.com/#!/StackGameDev/status/79522824930328577" />
  <row Id="29985" PostHistoryTypeId="2" PostId="13490" RevisionGUID="5aef40ec-9bad-4820-aa95-0ab61fd46b22" CreationDate="2011-06-11T13:19:47.607" UserId="4011" Text="Try [NodeJs][1], it may fit your realtime needs, because you already know AS3 which shares many similarities with Javascript since they're both ECMAScript languages.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nodejs.org/" />
  <row Id="29987" PostHistoryTypeId="5" PostId="13475" RevisionGUID="73088782-9d02-4b23-88f6-0decb7eb3453" CreationDate="2011-06-11T13:42:43.080" UserId="5899" Comment="deleted 2 characters in body" Text="I built a generic transition system for a 2d engine for iPhone. I'm going to try to explain it. This is only an approach, the implementation has more things that are not relevant.&#xD;&#xA;&#xD;&#xA;Suppose that your engine is hierarchical, if it is not, there are a lot of of reasons why a game engine must be hierarchical. We can have two interfaces IState and ITransition inheriting from the SceneNode class. Like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Well,  SceneNode can be updateable, this means that the parent calls the children method &quot;update&quot; and enabled, that receive or not input events ( so you can disable the user events when the transition is executing ).&#xD;&#xA;&#xD;&#xA;Every state has a name, and every transition has the old and new state between the transition exists.&#xD;&#xA;&#xD;&#xA;Ok. Now we can have two managers, Transition and StateManager, the purpose of these managers is to have a registry of all Transitions and States and offer features. These managers can be singleton to be accessible from everywhere.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With addTransition we attach a custom transition to a pair of menus, the order is important. When we call changeState, the manager is responsible of test if a transition has been added and execute it if exist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With this simple architecture, we are to program a transition between the MainMenu to Battle.&#xD;&#xA;&#xD;&#xA;The current scene graph is:&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My transition implementation:&#xD;&#xA;&#xD;&#xA;    TransitionMenuToBattle : public ITransition&#xD;&#xA;    {&#xD;&#xA;        public:&#xD;&#xA;            void enter()&#xD;&#xA;            {&#xD;&#xA;                getOldState()-&gt;setActive( false );&#xD;&#xA;                getRoot()-&gt;addChild( this );&#xD;&#xA;   &#xD;&#xA;                addChild( blackSprite );&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            void update( float delta )&#xD;&#xA;            {&#xD;&#xA;                // make fade of blackSprite&#xD;&#xA;                // ...&#xD;&#xA;&#xD;&#xA;                if ( blackSprite-&gt;getAlpha() == OPAQUE )&#xD;&#xA;                {&#xD;&#xA;                    getRoot()-&gt;addChild( getNewState() );&#xD;&#xA;                    getNewState()-&gt;setActive( false );&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if ( blackSprite-&gt;getAlpha() == INVISIBLE )&#xD;&#xA;                    exit();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            void exit()&#xD;&#xA;            {&#xD;&#xA;                getRoot()-&gt;removeChild( this );&#xD;&#xA;                getNewState()-&gt;setActive( true );&#xD;&#xA;            }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;When enter method finishes, the scene graph is:&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;When exit method is called in update:&#xD;&#xA;&#xD;&#xA;![enter image description here][5]&#xD;&#xA;&#xD;&#xA;when exit method finishes:&#xD;&#xA;&#xD;&#xA;![enter image description here][6]&#xD;&#xA;&#xD;&#xA;when the game begins we need to add the transition:&#xD;&#xA;&#xD;&#xA;    TransitionFactory::get()-&gt;addTransition( &quot;StateMainMenu&quot;, &quot;StateBattle&quot;, new TransitionMenuToBattle( ) );&#xD;&#xA;&#xD;&#xA;Then, for example in a button callback from MainMenu, we can put the call TransitionFactory::get()-&gt;changeMenu( &quot;StateMainMenu&quot;, &quot;StateBattle&quot; ); or wrap this method into:&#xD;&#xA;&#xD;&#xA;    IState::changeMenu( std::string newMenu )&#xD;&#xA;    {&#xD;&#xA;        TransitionFactory::get()-&gt;changeMenu( getStateMenu(), newMenu );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can complicate the transition much as you want. The transition has access to the two states and it can do things like overlap elements of two. The transition can receive the things that needs in his constructor. If TransitionManager detects that there is no transition added between two states can have a default behavior.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/8fzC2.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/5wRy2.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/rjs5J.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/wfpKR.jpg&#xD;&#xA;  [5]: http://i.stack.imgur.com/Z5N8B.jpg&#xD;&#xA;  [6]: http://i.stack.imgur.com/lO7sO.jpg" />
  <row Id="29988" PostHistoryTypeId="17" PostId="13492" RevisionGUID="3f60debb-f161-4e84-aafe-72553a18541b" CreationDate="2011-06-11T14:44:06.190" UserId="-1" Comment="from http://stackoverflow.com/questions/6313925/should-an-object-in-a-2d-game-render-itself" Text="" />
  <row Id="29989" PostHistoryTypeId="17" PostId="13493" RevisionGUID="c4f813af-f70a-4a4e-86e9-104210d4ef10" CreationDate="2011-06-11T14:44:06.190" UserId="-1" Comment="from http://stackoverflow.com/questions/6313925/should-an-object-in-a-2d-game-render-itself" Text="" />
  <row Id="29990" PostHistoryTypeId="17" PostId="13494" RevisionGUID="003b6573-d1a1-4ddd-bfe6-c6cf7e0a3911" CreationDate="2011-06-11T14:44:06.190" UserId="-1" Comment="from http://stackoverflow.com/questions/6313925/should-an-object-in-a-2d-game-render-itself" Text="" />
  <row Id="29991" PostHistoryTypeId="17" PostId="13495" RevisionGUID="c69ac739-7ef0-4913-a8d5-29c0de24aa76" CreationDate="2011-06-11T14:44:06.190" UserId="-1" Comment="from http://stackoverflow.com/questions/6313925/should-an-object-in-a-2d-game-render-itself" Text="" />
  <row Id="29992" PostHistoryTypeId="2" PostId="13493" RevisionGUID="9811992c-d9c5-41e9-81cf-323dbe9645e7" CreationDate="2011-06-11T04:07:42.663" UserDisplayName="David Erwin" Text="Disclaimer: your question doesn't give much detail so I'm responding with a general principle.  Please excuse me if I misunderstood your use or 'render'.&#xD;&#xA;&#xD;&#xA;I generally use an external object to render various actors in a scene as a way of encapsulating scene level properties and methods outside of the individual 'actor objects.'  Objects in the scene should only contain internal methods and properties; they should only know about what they themselves are and what they do.  Presumably, they will be influenced by other objects in the game as well as user input.  This will effect how/whether they are rendered on the screen.  A 'director object' can, for example, translate the 'w' keypress to jump, then tell the actor object .jump().  Such director level logic can also tell actors to enter or exit the scene entirely.&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;David" />
  <row Id="29993" PostHistoryTypeId="2" PostId="13494" RevisionGUID="1d9d599a-5f0a-4ffa-92ed-ef4877354eae" CreationDate="2011-06-11T05:33:08.477" UserDisplayName="Gilad Naor" Text="What if someday you want to port your game to a different resolution (ie iPhone and friends). Thus, a global property about rendering changes, how do you easily update your code?" />
  <row Id="29994" PostHistoryTypeId="2" PostId="13495" RevisionGUID="cfae8e33-67ab-4221-ab07-45fe54383c0a" CreationDate="2011-06-11T09:53:55.270" UserId="7946" Text="In general it's always about how easy it is to maintain and expand your code. Tomorrow you figure out that you don't like the graphics API you're using currently, and want to switch. Will you now have to go through all of your objects classes and change everything, or do  you still just need to change your code in one central point of the project?&#xD;&#xA;&#xD;&#xA;It depends on what your objects are really doing when you call render(). As long as they just wrap method calls around your graphics engine, it's completely fine, since logics &lt;-&gt; graphics distinction will still be given. &#xD;&#xA;&#xD;&#xA;For example, if your render() methods are basically convenience-methods and look something like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void MyClass::render(const Graphics &amp;g)&#xD;&#xA;    {&#xD;&#xA;        g.draw(this);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;    void MyClass::render()&#xD;&#xA;    {&#xD;&#xA;       mySprite-&gt;render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    void MyClass::render()&#xD;&#xA;    {&#xD;&#xA;        mySprite-&gt;UseShader(thatshader);&#xD;&#xA;        mySprite-&gt;render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;or close to that, I don't think it's a problem whatsoever. " />
  <row Id="29995" PostHistoryTypeId="2" PostId="13492" RevisionGUID="48fa6fa6-afb2-412a-9c26-d8ba8584cc90" CreationDate="2011-06-11T03:48:20.683" UserId="3874" Text="I'm making a 2D street fighter-like game that is not tile based. Usually people recommend that entities be given to a renderer that render them, not them render themselves, but it seems the inverse is better,&#xD;&#xA;&#xD;&#xA;Why is one better over the other?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="29996" PostHistoryTypeId="1" PostId="13492" RevisionGUID="48fa6fa6-afb2-412a-9c26-d8ba8584cc90" CreationDate="2011-06-11T03:48:20.683" UserId="3874" Text="Should an object in a 2D game render itself?" />
  <row Id="29997" PostHistoryTypeId="3" PostId="13492" RevisionGUID="48fa6fa6-afb2-412a-9c26-d8ba8584cc90" CreationDate="2011-06-11T03:48:20.683" UserId="3874" Text="&lt;c++&gt;&lt;rendering&gt;" />
  <row Id="29998" PostHistoryTypeId="2" PostId="13496" RevisionGUID="322ea24c-e13f-4c9b-a3e5-12a0736f3584" CreationDate="2011-06-11T14:55:30.207" UserId="4662" Text="What I used was an observer-based design. When I created an instance of a class I wanted to render, then a pointer to it was stored in the central Renderer class. When you call `RenderFrame()`, then the renderer already has all the existing objects it needs to render and accessed their properties to do it. The classes themselves had no idea that they were going to be rendered at all. This API was nice and clean and easy to use." />
  <row Id="29999" PostHistoryTypeId="25" PostId="13492" RevisionGUID="e2066075-945d-440c-b5dd-bbc88fb58457" CreationDate="2011-06-11T15:18:14.663" Comment="http://twitter.com/#!/StackGameDev/status/79568127070978048" />
  <row Id="30000" PostHistoryTypeId="2" PostId="13497" RevisionGUID="2dc8986f-4d39-4b44-b591-b182d33a0c9a" CreationDate="2011-06-11T15:43:37.593" UserId="370" Text="You want the rendering system to be in control of what gets drawn when.  If instead the sprites are in control of the rendering you loose on lots of efficiency gains and flexibility.  I'm of the opinion that having the render system in control results in cleaner code.&#xD;&#xA;&#xD;&#xA;Some advantages of centralized rendering:&#xD;&#xA;&#xD;&#xA;* z-ordering:  &#xD;&#xA;If the game objects themselves are responsible for rendering you'll have to make sure you call them in the correct order.  Otherwise background objects may be drawn over foreground objects.  &#xD;&#xA;With the render system in control, it can choose to sort all render objects, detect overloaps at render-time and just render those, or just forego ordering all together.  The point is that decision can be made easily now.&#xD;&#xA;* batching:  &#xD;&#xA;The other obvious advantage of allowing the render system to be in control is batching.  Here again the render system has to option to batch sprite renders the share a texture.  It can use triangle slicing to render _everything_ with one call.  It may be able to cache some render calculations.  Or it could just render each sprite in turn with none of that fancy stuff.  (Note: it is possible batch when each object renders itself, but the problem is less efficient and more complex).&#xD;&#xA;&#xD;&#xA;The way I implement this in my games it to have game objects register the sprites they want drawn with the render system.  When the object no longer wants the object drawn it unregisters the sprite, or marks it inactive.&#xD;&#xA;&#xD;&#xA;All that said.  If it's easier to have your game objects render themselves by all means do it that way.  It's much more important to make progress and get something / anything drawn than it is to have a perfect architecture." />
  <row Id="30001" PostHistoryTypeId="2" PostId="13498" RevisionGUID="0e2296f0-fb29-434f-b073-151ff06d1fc1" CreationDate="2011-06-11T15:51:03.690" UserId="3874" Text="Right now I'm working on input for my game.&#xD;&#xA;&#xD;&#xA;The only controller I own is an XBOX 360 one.&#xD;&#xA;&#xD;&#xA;From what I can see, if a controller's stick has a Z axis, these are actually triggers.&#xD;&#xA;&#xD;&#xA;Essentially I'm wondering if from one controller to the next is this will be consistent?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30002" PostHistoryTypeId="1" PostId="13498" RevisionGUID="0e2296f0-fb29-434f-b073-151ff06d1fc1" CreationDate="2011-06-11T15:51:03.690" UserId="3874" Text="How standardized are joystick / gamepad configurations?" />
  <row Id="30003" PostHistoryTypeId="3" PostId="13498" RevisionGUID="0e2296f0-fb29-434f-b073-151ff06d1fc1" CreationDate="2011-06-11T15:51:03.690" UserId="3874" Text="&lt;c++&gt;&lt;input&gt;" />
  <row Id="30004" PostHistoryTypeId="2" PostId="13499" RevisionGUID="bf23f26f-8d5c-42a1-b304-23d3d826c700" CreationDate="2011-06-11T16:08:49.637" UserId="7949" Text="me and my friend would' like to do retro-program a 2d game , we were discussing about tools needed, so while i am working on the tools , he will work on game logic and stuff.&#xD;&#xA;Probably i will put them into the open source circuit once finished, in your experience what is the most needed you think its not already done of free ?? i was thinking at what to work on first , so far my list is&#xD;&#xA;&#xD;&#xA;Texture generator&#xD;&#xA;Path editor&#xD;&#xA;Path finder&#xD;&#xA;Grid visibility calculator ( sort of pvs but for 2d )&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30005" PostHistoryTypeId="1" PostId="13499" RevisionGUID="bf23f26f-8d5c-42a1-b304-23d3d826c700" CreationDate="2011-06-11T16:08:49.637" UserId="7949" Text="2d game tools , what to work on first ?" />
  <row Id="30006" PostHistoryTypeId="3" PostId="13499" RevisionGUID="bf23f26f-8d5c-42a1-b304-23d3d826c700" CreationDate="2011-06-11T16:08:49.637" UserId="7949" Text="&lt;xna&gt;&lt;opengl&gt;&lt;2d&gt;&lt;maps&gt;&lt;procedural&gt;" />
  <row Id="30007" PostHistoryTypeId="2" PostId="13500" RevisionGUID="d052d796-bccb-4994-b49c-709221f63fe1" CreationDate="2011-06-11T16:10:28.043" UserId="7915" Text="Working with @Gajet and @BlueRaja 's input (the optimum is somewhere in the middle?):&#xD;&#xA;&#xD;&#xA;Let's assume a finite state machine for the item/character that decides on an item level how it behaves (e.g. idle, create and follow path, attack, capture building, heal, defend other item) with some cost function. That would give 6 possible scores for this item.&#xD;&#xA;&#xD;&#xA;Note: behavior may not be the right term, because it's the overall AI that decides in the end what each item is to do (see below).&#xD;&#xA;&#xD;&#xA;In the screenshot below, red has 5 items, blue has 7 (neglecting the factories for the time being). Lets assume, blue is the AI and is to move next.&#xD;&#xA;&#xD;&#xA;(picture to follow, I am not allowed to post yet, need &gt; 10 rep points)&#xD;&#xA;&#xD;&#xA;With 7 units and 6 states/scores per unit, there are 7*6=42 possible scores in total, yet not independently, as the scores of items may interfere, i.e. if the enemy is killed by item A, it cannot be killed again by item B.&#xD;&#xA;&#xD;&#xA;So this is where the search tree starts: out of the 42 states/scores, select 1, e.g. start with the higher scores first. With this state fixed, there are 6*6=36 states remaining for the second level of this node. We now need to check if something has changed in the situation because of the action of item 1, or if the remaining 36 states are still valid. With, or without update, again pick one out 36 and proceed with the remaining 5 items. When at the lowest level move backwards to the top and pick the 2nd best move of the 1st item and build the next branch. This will create a tree of 42*36*30*24*18*12*6=1.4 billion nodes.&#xD;&#xA;&#xD;&#xA;This is too much, but it is also clear that there are many useless nodes in this tree, for one because the order of actions may have an effect, but in most cases it has no effect. Also, branches with low scores may turn out be be beneficial after the opponent has played (like an piece offer in chess), but most of them are not. (how to decide?).&#xD;&#xA;&#xD;&#xA;To reduce the search tree, you could decide to limit the number of states per item to be considered. E.g. only pick the best and 2nd best. (could be a parameter in the program setting). This helps: 7*2=14 possible states to start with and 14*12*10*8*6*4*2=645 thousand nodes in total. Probably still many doubles.&#xD;&#xA;&#xD;&#xA;Assuming this can still be much improved, but a search tree is created. Add the scores per branch up to the top and select one (there will be many) with the highest score. This is the first AI move.&#xD;&#xA;&#xD;&#xA;Now we get to the minimax.&#xD;&#xA;&#xD;&#xA;Flip sides and repeat the above for the red items. Minimizing the score. Pick a move, execute and flip back to the blue side. Depth = 1.&#xD;&#xA;&#xD;&#xA;Store the score - create a new search tree - blue moves - flip - new tree - red moves - flip - depth = 2 - store score. Continue up to a predefined depth.&#xD;&#xA;&#xD;&#xA;This blows up, because at every blue move (645 thousand), red can respond with a similar amount of moves (actually 5*2=10*8*4*2=640 in this case), but with 7 units the total number of combinations would be 0.4 trillion. And for each you would like to search some levels deep...&#xD;&#xA;&#xD;&#xA;Unless the search tree is seriously pruned, this goes nowhere.&#xD;&#xA;&#xD;&#xA;Will alpha beta sort this mess?" />
  <row Id="30008" PostHistoryTypeId="5" PostId="13499" RevisionGUID="5e6f49ba-a9a2-494d-9ac4-d5f59884eb46" CreationDate="2011-06-11T16:15:22.600" UserId="1430" Comment="added 11 characters in body" Text="My friend and I would like to program a 2D game. We were discussing about tools needed, so while I am working on the tools, he will work on game logic and stuff.&#xD;&#xA;Probably I will put our tools into the open source circuit once finished, so in your experience what kinds of tools are really needed, but don't already exist for free? I was thinking about what to work on first, so far my list is:&#xD;&#xA;&#xD;&#xA;* Texture generator&#xD;&#xA;* Path editor&#xD;&#xA;* Path finder&#xD;&#xA;* Grid visibility calculator (sort of PVS but for 2D)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30009" PostHistoryTypeId="2" PostId="13501" RevisionGUID="2171e623-3d54-49a1-bfe0-bea58a7d53f7" CreationDate="2011-06-11T16:22:54.470" UserId="1430" Text="With the exception of the &quot;path finder&quot; (which is generally not a tool and usually something built in to the game logic, unless you are doing pre-baked navigation through a search space), **the items you listed sound like potentially viable tools in general**. Whether or not they will be useful for your game depends, of course, on the kind of game your making and its specific design. If you need all those kinds of tools, then by all means build them. But build them because your game needs them, and then consider if you should release them as open source projects -- you may find that they end up being far too specific to your personal game to be that useful to others.&#xD;&#xA;&#xD;&#xA;**Tile and map editors tend to be very commonly needed**. It's quite hard to make a suitably general-purpose one, but for your game, it may be something to consider building.&#xD;&#xA;&#xD;&#xA;If your goal is to make a game, you shouldn't be focusing your tools development around &quot;what tools don't exist for free that I could make and release,&quot; but instead &quot;what tools do I need for this game?&quot; It will be a far more productive line of inquiry.&#xD;&#xA;&#xD;&#xA;Not all 2D games require the same kind of assets or technology -- for example, not all games require path data that is complex enough to warrant a custom tool to author that path data. Many games that *do* could get away with using existing vector image editing programs to author the path and massaging the output format from the image editor. Likewise with &quot;texture generator&quot; -- by which I assume you mean a tool for tweaking inputs to various procedural texture generation algorithms or something.&#xD;&#xA;" />
  <row Id="30010" PostHistoryTypeId="2" PostId="13502" RevisionGUID="9cb1a8e2-33c5-487b-be9a-ba849317d23d" CreationDate="2011-06-11T16:28:24.253" UserId="1430" Text="Joysticks and alternative input devices tend to vary wildly in how they expose their inputs through to the drivers, so it isn't always the case that an analog Z axis will correspond to triggers (for example, if the controller's triggers don't have analog input values, they may just be additional buttons). &#xD;&#xA;&#xD;&#xA;The API you use to access the joysticks may do some of the work for you and attempt to homogenize the data from the controller, but this depends heavily on the API and isn't always done properly, unfortunately.&#xD;&#xA;&#xD;&#xA;It sounds like you're on a Windows platform. XInput only supports Xbox-like controllers, the &quot;next best thing&quot; is probably DirectInput, even though it's a bit long in the tooth and COM-like." />
  <row Id="30011" PostHistoryTypeId="2" PostId="13503" RevisionGUID="e961ae3e-cdb1-4a15-a875-11e5c833a271" CreationDate="2011-06-11T16:34:46.133" UserId="7946" Text="A simple 2D shader editor would be pretty awesome. NVIDIA's FX Composer is very good but also very overblown for what you need for 2D games.&#xD;&#xA;&#xD;&#xA;While Tile and Map editors are usually needed, you don't need to make them yourself. There are tons and tons of freeware and opensource editors out there (for example: http://www.mapeditor.org/ ) with easy-to-parse map formats, and most of them will be better than what you'll be able to do.&#xD;&#xA;&#xD;&#xA;Other than that, your tools will probably be game-specific. For example, you might want to program a tool which lets you create and maniuplate new types of objects in your world easily. Or you might need a tool that enables you to create and cut cutscenes in your engine. The sky is the limit." />
  <row Id="30012" PostHistoryTypeId="5" PostId="13484" RevisionGUID="4aa93b5b-74ee-4aa0-a654-8e7337b75c09" CreationDate="2011-06-11T17:11:05.430" UserId="975" Comment="Copy edited. Changed to sentence casing for the title." Text="I'm building a physics engine in OpenGL, and I'm a little bit confused on how framerate independence is achieved.&#xD;&#xA;&#xD;&#xA;At the moment I'm using glutTimerFunc to cap the framerate at 30&amp;nbsp;FPS. Is there a way to do this without capping it but not have my objects running around like crazy when I run the application at a higher framerate?&#xD;&#xA;&#xD;&#xA;I'm thinking that I need some sort of measure of distance relative to the rendering speed. Are there any articles/tutorials you may know that would help me out?&#xD;&#xA;" />
  <row Id="30013" PostHistoryTypeId="4" PostId="13484" RevisionGUID="4aa93b5b-74ee-4aa0-a654-8e7337b75c09" CreationDate="2011-06-11T17:11:05.430" UserId="975" Comment="Copy edited. Changed to sentence casing for the title." Text="Framerate independence" />
  <row Id="30014" PostHistoryTypeId="24" PostId="13484" RevisionGUID="4aa93b5b-74ee-4aa0-a654-8e7337b75c09" CreationDate="2011-06-11T17:11:05.430" Comment="Proposed by 975 approved by 51 edit id of 483" />
  <row Id="30015" PostHistoryTypeId="2" PostId="13504" RevisionGUID="e1845e02-5abe-4e91-866f-4a699d41fb64" CreationDate="2011-06-11T17:20:26.497" UserId="7950" Text="This is about a personal project I've been longing to do for some time now. Since a while now I have stopped playing WoW, but as I'm quite experienced in C++ I thought I'd try the following:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - Write a minimalistic server for&#xD;&#xA;   vanilla WoW for experimental,&#xD;&#xA;   personal purposes&#xD;&#xA;&#xD;&#xA;All it would feature is being able to login with a fixed character, and being able to travel around in the standard maps (non-instance; Kalimdor, eastern kingdoms, etc.) I also don't want to use / modify existing projects such as Mangos in this case, as this would be all about the development process and trying it on my own&#xD;&#xA;&#xD;&#xA;My questions to you:&#xD;&#xA;&#xD;&#xA; - Is the above a realistic objective?&#xD;&#xA; - How much work would such a project&#xD;&#xA;   require? (Boilerplate code excluded,&#xD;&#xA;   just the basic stuff to make the&#xD;&#xA;   client &quot;happy&quot;)&#xD;&#xA; - Do you have any other recommendations&#xD;&#xA;   for me regarding this?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30016" PostHistoryTypeId="1" PostId="13504" RevisionGUID="e1845e02-5abe-4e91-866f-4a699d41fb64" CreationDate="2011-06-11T17:20:26.497" UserId="7950" Text="Writing a minimalistic server for vanilla WoW" />
  <row Id="30017" PostHistoryTypeId="3" PostId="13504" RevisionGUID="e1845e02-5abe-4e91-866f-4a699d41fb64" CreationDate="2011-06-11T17:20:26.497" UserId="7950" Text="&lt;c++&gt;&lt;network&gt;&lt;mmo&gt;&lt;server&gt;&lt;world-of-warcraft&gt;" />
  <row Id="30018" PostHistoryTypeId="2" PostId="13505" RevisionGUID="5b0b96d4-c322-4347-9d06-239f5a4c186f" CreationDate="2011-06-11T17:28:49.837" UserId="4662" Text="Fundamentally, the problem was never about the game- it's about the scale. If your server only has to support one client, or a few clients, then it's just Minecraft server but in higher resolution better graphics on the client side, effectively. All you'd have to do is transfer the player's location and the location of anything interesting (read: dynamic) around him. The client can then render as is normal. The problem is doing this in a reasonable time when you have fifty thousand players, and possibly hundreds of thousands of interesting things." />
  <row Id="30019" PostHistoryTypeId="2" PostId="13506" RevisionGUID="7b3adf48-cd58-4fcb-87c2-b0a1b83b8a5f" CreationDate="2011-06-11T17:46:51.653" UserId="5899" Text="In the book &quot;iPhone 3D Programming&quot; there are examples of this. The author uses the OES extensions. Like&#xD;&#xA;&#xD;&#xA;    glGenRenderbuffersOES(1, &amp;m_renderbuffer);&#xD;&#xA;    glBindRenderbufferOES(GL_RENDERBUFFER_OES, m_renderbuffer);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    glGenFramebuffersOES(1, &amp;m_framebuffer);&#xD;&#xA;    glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_framebuffer);&#xD;&#xA;    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES,&#xD;&#xA;                                 GL_COLOR_ATTACHMENT0_OES,&#xD;&#xA;                                 GL_RENDERBUFFER_OES,&#xD;&#xA;                                 m_renderbuffer);&#xD;&#xA;&#xD;&#xA;I've tested these commands:&#xD;&#xA;&#xD;&#xA;    GLint w, h;&#xD;&#xA;	glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &amp;w);&#xD;&#xA;	glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &amp;h);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and the width and height are correct.&#xD;&#xA;&#xD;&#xA;You can download the book examples [here][1] &#xD;&#xA;&#xD;&#xA;See the &quot;HelloArrow&quot; project. Within the class RenderingEngine1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ofps.oreilly.com/titles/9780596804824/" />
  <row Id="30020" PostHistoryTypeId="25" PostId="13419" RevisionGUID="e6cad1e4-b2b7-48b8-99f8-116cf414d3a4" CreationDate="2011-06-11T18:19:21.357" Comment="http://twitter.com/#!/StackGameDev/status/79613704232116225" />
  <row Id="30021" PostHistoryTypeId="2" PostId="13507" RevisionGUID="fbf63f60-e7a4-40ba-b130-288a8b6185f6" CreationDate="2011-06-11T18:23:40.620" UserId="6091" Text="I stopped using .net events and started to store all my events and changes in buffer:&#xD;&#xA;&#xD;&#xA;    public sealed class GameStateData&#xD;&#xA;    {&#xD;&#xA;        public bool IsEmpty = true;&#xD;&#xA;        public List&lt;EventData&gt; EventDatas = new List&lt;EventData&gt;();&#xD;&#xA;        public List&lt;ChangeData&gt; ChangeDatas = new List&lt;ChangeData&gt;();&#xD;&#xA;        ...//your additional data&#xD;&#xA;&#xD;&#xA;        public void Reset()&#xD;&#xA;        {&#xD;&#xA;            IsEmpty = true;&#xD;&#xA;            ManifoldDatas.Count = 0;&#xD;&#xA;            ChangeDatas.Count = 0;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public struct ChangeData&#xD;&#xA;    {&#xD;&#xA;        public Node Sender;&#xD;&#xA;        public short PropertyIndex; // predefined property index (f.e. (short)MyIndexEnum.Life)&#xD;&#xA;        public object OldValue;&#xD;&#xA;        public object NewValue;&#xD;&#xA;        public object AdditionalData;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;1. To support multithreading the only thing you need is to swap buffers and process all events and changes in render thread.&#xD;&#xA;2. Every gamestep change will be saved, so any game logic can be based on combination of events. You can even implement time reversing.&#xD;&#xA;3. You don't need to create event fields increasing size of single object. Game logic in most cases require only single rare subscriber.&#xD;&#xA;4. There is almost no additional memory allocation (excluding boxing cases) (WP7,XBox and other micro framework critical).&#xD;&#xA;5. You can have different event sets handling a predefined GameStateData to object.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;1. More memory spending, although you need only 3 buffers (game, swap and render). &#xD;&#xA;2. Writing additional code at start to implement needed functionality.&#xD;&#xA;&#xD;&#xA;BTW sometimes I use both: event model and buffer model." />
  <row Id="30022" PostHistoryTypeId="2" PostId="13508" RevisionGUID="f9508885-0a22-4373-ab9f-d0326e9b4f4a" CreationDate="2011-06-11T18:55:21.043" UserId="7736" Text="Hi I am making a simple shooter game for android.Your a human and your being attacked by aliens. I wanted to know how would I make a laser projectile, that when the user touches the screen or presses the trackball it just fires  the laser in a straight line.&#xD;&#xA;&#xD;&#xA;Thanks in Advance. " />
  <row Id="30023" PostHistoryTypeId="1" PostId="13508" RevisionGUID="f9508885-0a22-4373-ab9f-d0326e9b4f4a" CreationDate="2011-06-11T18:55:21.043" UserId="7736" Text="Creating Projectiles" />
  <row Id="30024" PostHistoryTypeId="3" PostId="13508" RevisionGUID="f9508885-0a22-4373-ab9f-d0326e9b4f4a" CreationDate="2011-06-11T18:55:21.043" UserId="7736" Text="&lt;java&gt;&lt;android&gt;" />
  <row Id="30025" PostHistoryTypeId="5" PostId="13507" RevisionGUID="611847fe-163b-4225-92b9-328a59121e0f" CreationDate="2011-06-11T19:09:53.157" UserId="6091" Comment="added 11 characters in body" Text="I stopped using .net events and started to store all my events and changes in buffer:&#xD;&#xA;&#xD;&#xA;    public sealed class GameStateData&#xD;&#xA;    {&#xD;&#xA;        public bool IsEmpty = true;&#xD;&#xA;        public List&lt;EventData&gt; EventDatas = new List&lt;EventData&gt;();&#xD;&#xA;        public List&lt;ChangeData&gt; ChangeDatas = new List&lt;ChangeData&gt;();&#xD;&#xA;        ...//your additional data&#xD;&#xA;&#xD;&#xA;        public void Reset()&#xD;&#xA;        {&#xD;&#xA;            IsEmpty = true;&#xD;&#xA;            ManifoldDatas.Count = 0;&#xD;&#xA;            ChangeDatas.Count = 0;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public struct ChangeData&#xD;&#xA;    {&#xD;&#xA;        public Node Sender;&#xD;&#xA;        public short PropertyIndex; // predefined property index (f.e. (short)MyIndexEnum.Life)&#xD;&#xA;        public object OldValue;&#xD;&#xA;        public object NewValue;&#xD;&#xA;        public object AdditionalData;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA; 1. For multithreading support the only thing you need is to swap buffers and process all events and changes in render thread.&#xD;&#xA; 2. Every gamestep change will be saved, so any game logic can be based on combination of events. You can even implement time reversing.&#xD;&#xA; 3. You don't need to create event fields increasing size of single object. Game logic in most cases require only single rare subscriber. &#xD;&#xA; 4. There is almost no additional memory allocation (excluding boxing cases) (WP7,XBox and other micro framework critical).&#xD;&#xA; 5. You can have different event sets handling a predefined GameStateData to object.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA;1. More memory spending, although you need only 3 buffers (game, swap and render). &#xD;&#xA;2. Writing additional code at start to implement needed functionality.&#xD;&#xA;&#xD;&#xA;BTW sometimes I use both: event model and buffer model." />
  <row Id="30026" PostHistoryTypeId="5" PostId="13508" RevisionGUID="a3f15d9f-d799-44db-87fe-770f0b878dd6" CreationDate="2011-06-11T19:16:08.590" UserId="7736" Comment="deleted 6 characters in body; edited title" Text="Hi I am making a simple shooter game for android.Your a human and your being attacked by aliens. I wanted to know how would I make a laser beam, that when the user touches the screen or presses the trackball it just fires  the laser in a straight line.&#xD;&#xA;&#xD;&#xA;Thanks in Advance. " />
  <row Id="30027" PostHistoryTypeId="4" PostId="13508" RevisionGUID="a3f15d9f-d799-44db-87fe-770f0b878dd6" CreationDate="2011-06-11T19:16:08.590" UserId="7736" Comment="deleted 6 characters in body; edited title" Text="Creating Projectiles(Beam)" />
  <row Id="30028" PostHistoryTypeId="2" PostId="13509" RevisionGUID="4d8e7f4b-487c-48dd-adba-0a25d1f6c5fa" CreationDate="2011-06-11T19:27:02.080" UserId="7946" Text="Just yesterday someone asked almost exactly the same question over on stackoverlow.com. I'm going to quote my answer from there and edit it a little to fit your post: &#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6300169/moving-objects-help/6300303#6300303&#xD;&#xA;&#xD;&#xA;&quot;I don't know what kind of library you're using to draw all of your things, but that basically doesn't matter since you only need to know two things in order to do this:&#xD;&#xA;&#xD;&#xA;Without going into specifics on vector geometry:&#xD;&#xA;&#xD;&#xA;You need to calculate the direction (x and y component) that the beam moves in depending on the touch's position. You get this direction by simply subtracting the position of the touch from the position of the player:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //x component of direction&#xD;&#xA;    float direction_x = mousePosition.x - playerPosition.x;&#xD;&#xA;    //y component of direction&#xD;&#xA;    float direction_y = mousePosition.y - playerPosition.y;&#xD;&#xA;&#xD;&#xA;In order to just get a direction instead of adding a velocity component to this vector, you need to normalize it (so it has a length of 1):&#xD;&#xA;&#xD;&#xA;    float length =(float) Math.sqrt(direction_x*direction_x + direction_y*direction_y);&#xD;&#xA;    direction_x /= length;&#xD;&#xA;    direction_y /= length;&#xD;&#xA;&#xD;&#xA;You then need to update the beam position by adding the direction_x and direction_y components to it, multiplied by the speed that you want the beam to have (This process is called linear interpolation, by the way):&#xD;&#xA;&#xD;&#xA;    projectile_x += direction_x*speed;&#xD;&#xA;    projectile_y += direction_y*speed;&#xD;&#xA;&#xD;&#xA;If you have some way of measuring the time between two frames, the speed variable should depend on the elapsed time between those frames, in order to create smooth movements on different platforms.&quot;" />
  <row Id="30029" PostHistoryTypeId="2" PostId="13510" RevisionGUID="bfa22be8-d421-4146-9c72-90d17368949c" CreationDate="2011-06-11T20:00:21.423" UserId="7367" Text="&#xD;&#xA;Thanks for the input, I've solved the problem. The Y velocity of the object was not high enough to overcome gravity due to the gravity modifier being too high and I had the incorrect formula implemented.&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-cpp --&gt;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;void GravityHandler::Update(double deltaTime) {&#xD;&#xA;    if(!this-&amp;gt;isActive) return;&#xD;&#xA;    std::list&lt;RigidBody*&gt;::iterator iter;&#xD;&#xA;    for(iter = instance-&amp;gt;subscribers-&amp;gt;begin(); iter != instance-&amp;gt;subscribers-&amp;gt;end(); ++iter) {&#xD;&#xA;        float y = (*iter)-&amp;gt;GetYPosition();&#xD;&#xA;        float yV = (*iter)-&amp;gt;GetYVelocity();&#xD;&#xA;        float gravMod = (*iter)-&amp;gt;GetGravityModifier();&#xD;&#xA;        float gravity = (GRAVITY_VALUE * gravMod);&#xD;&#xA;        double deltaV = (gravity * deltaTime);&#xD;&#xA;        float TV = (*iter)-&amp;gt;GetTerminalVelocity();&#xD;&#xA;        if(std::fabs(deltaV) &amp;gt; TV) {&#xD;&#xA;            if(deltaV &amp;lt; 0) deltaV = -TV;&#xD;&#xA;            else deltaV = TV;&#xD;&#xA;        }&#xD;&#xA;        (*iter)-&amp;gt;SetYVelocity(static_cast&amp;lt;float&amp;gt;(yV + deltaV));&#xD;&#xA;        yV = (*iter)-&amp;gt;GetYVelocity();&#xD;&#xA;        float result = y + yV;&#xD;&#xA;        (*iter)-&amp;gt;SetYPosition(result);&#xD;&#xA;    }&#xD;&#xA;}&lt;/code&gt;&lt;/pre&gt;" />
  <row Id="30030" PostHistoryTypeId="2" PostId="13511" RevisionGUID="910190cc-2bc5-4635-a441-ee8050af3b36" CreationDate="2011-06-11T20:07:57.910" UserId="7951" Text="I know my website is not huge but I would be interested in reviewing your game and interviewing you. If I like your game I might even give you some ad space.&#xD;&#xA;Thanks" />
  <row Id="30031" PostHistoryTypeId="16" PostId="13511" RevisionGUID="6a96a67d-f11d-4c29-91bd-ea9097bdbe03" CreationDate="2011-06-11T20:07:57.910" UserId="7951" />
  <row Id="30032" PostHistoryTypeId="2" PostId="13512" RevisionGUID="6fcdffb0-4aad-4033-9f7b-9cf7a1b67923" CreationDate="2011-06-11T20:53:23.580" UserId="974" Text="**Background:**&#xD;&#xA;&#xD;&#xA;I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate parts: one byte for the whole number and another for the fractional part.&#xD;&#xA;&#xD;&#xA;Gravity is added to the player's Y speed at a rate of 0.25/frame.&#xD;&#xA;&#xD;&#xA;When the player jumps, his Y speed is set to -4.64453125. The rest of the jump curve is left to gravity.&#xD;&#xA;&#xD;&#xA;As the player ascends his vertical velocity converges to 0 at a rate of 0.25/frame. When the player's velocity reaches a value less than zero, however, the velocity changes following a different pattern. Instead of decreasing steadily by 0.25 every frame, it follows this pattern: &#xD;&#xA;&#xD;&#xA;    [1.75, -0.25, -0.25, -0.25, 1.75, -0.25, -0.25, -0.25, 1.75, ...]&#xD;&#xA;&#xD;&#xA;It appears to have something to do with integer overflow.&#xD;&#xA;&#xD;&#xA;**Data:**&#xD;&#xA;&#xD;&#xA;Here is a [dump of the data from the original][1]. It's a table of the velocity. &#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;In my game I haven't been able to achieve this effect. When the velocity is less than zero it continues to decrease regularly by 0.25 rather than the pattern described above. Rather than storing the whole and fractional parts separately, I am storing them together in a single float.&#xD;&#xA;&#xD;&#xA;How can this effect be achieved?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zackthehuman.com/mm3-jump-curve.html" />
  <row Id="30033" PostHistoryTypeId="1" PostId="13512" RevisionGUID="6fcdffb0-4aad-4033-9f7b-9cf7a1b67923" CreationDate="2011-06-11T20:53:23.580" UserId="974" Text="Recreating retro/NES style physics with intentional imprecision" />
  <row Id="30034" PostHistoryTypeId="3" PostId="13512" RevisionGUID="6fcdffb0-4aad-4033-9f7b-9cf7a1b67923" CreationDate="2011-06-11T20:53:23.580" UserId="974" Text="&lt;math&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;platformer&gt;" />
  <row Id="30035" PostHistoryTypeId="25" PostId="13504" RevisionGUID="15df2f67-291b-4fcc-ad35-7c4ab7b40536" CreationDate="2011-06-11T21:19:20.540" Comment="http://twitter.com/#!/StackGameDev/status/79659000706240512" />
  <row Id="30036" PostHistoryTypeId="2" PostId="13513" RevisionGUID="c3674514-875f-4783-b9bc-6a5878db1398" CreationDate="2011-06-11T22:22:45.313" UserId="1839" Text="Basically you just have to subtract 64 from low value and then you find that pattern:&#xD;&#xA;a low value of 64 represents 0.25, because 256 * 0.25 = 64&#xD;&#xA;&#xD;&#xA;    struct position&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        void step()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    position p;&#xD;&#xA;    p.high = 4;&#xD;&#xA;    p.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d\n&quot;, p.high, p.low);&#xD;&#xA;        p.step();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     4     165&#xD;&#xA;     4     101&#xD;&#xA;     4      37&#xD;&#xA;     3     229&#xD;&#xA;     3     165&#xD;&#xA;     3     101&#xD;&#xA;     3      37&#xD;&#xA;     2     229&#xD;&#xA;     2     165&#xD;&#xA;     2     101&#xD;&#xA;     2      37&#xD;&#xA;     1     229&#xD;&#xA;     1     165&#xD;&#xA;     1     101&#xD;&#xA;     1      37&#xD;&#xA;     0     229&#xD;&#xA;     0     165&#xD;&#xA;     0     101&#xD;&#xA;     0      37&#xD;&#xA;    -1     229&#xD;&#xA;    -1     165&#xD;&#xA;    -1     101&#xD;&#xA;    -1      37&#xD;&#xA;    -2     229&#xD;&#xA;    -2     165&#xD;&#xA;    -2     101&#xD;&#xA;    -2      37&#xD;&#xA;    -3     229&#xD;&#xA;    -3     165&#xD;&#xA;    -3     101&#xD;&#xA;    -3      37&#xD;&#xA;    -4     229&#xD;&#xA;    -4     165&#xD;&#xA;    -4     101&#xD;&#xA;    -4      37&#xD;&#xA;    -5     229&#xD;&#xA;    -5     165&#xD;&#xA;    -5     101&#xD;&#xA;    -5      37&#xD;&#xA;    -6     229" />
  <row Id="30037" PostHistoryTypeId="5" PostId="13512" RevisionGUID="2953c77d-bc46-4860-92da-4448c7e9f43b" CreationDate="2011-06-11T22:23:45.940" UserId="974" Comment="Added example code" Text="**Background:**&#xD;&#xA;&#xD;&#xA;I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate parts: one byte for the whole number and another for the fractional part.&#xD;&#xA;&#xD;&#xA;Gravity is added to the player's Y speed at a rate of 0.25/frame.&#xD;&#xA;&#xD;&#xA;When the player jumps, his Y speed is set to -4.64453125. The rest of the jump curve is left to gravity.&#xD;&#xA;&#xD;&#xA;As the player ascends his vertical velocity converges to 0 at a rate of 0.25/frame. When the player's velocity reaches a value less than zero, however, the velocity changes following a different pattern. Instead of decreasing steadily by 0.25 every frame, it follows this pattern: &#xD;&#xA;&#xD;&#xA;    [1.75, -0.25, -0.25, -0.25, 1.75, -0.25, -0.25, -0.25, 1.75, ...]&#xD;&#xA;&#xD;&#xA;It appears to have something to do with integer overflow.&#xD;&#xA;&#xD;&#xA;**Data:**&#xD;&#xA;&#xD;&#xA;Here is a [dump of the data from the original][1]. It's a table of the velocity. &#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;In my game I haven't been able to achieve this effect. When the velocity is less than zero it continues to decrease regularly by 0.25 rather than the pattern described above. Rather than storing the whole and fractional parts separately, I am storing them together in a single float.&#xD;&#xA;&#xD;&#xA;How can this effect be achieved?&#xD;&#xA;&#xD;&#xA;**Sample code:**&#xD;&#xA;&#xD;&#xA;    // Each frame this is calculated for the player&#xD;&#xA;&#xD;&#xA;    // apply gravity and cap speed at 7 in either direction&#xD;&#xA;    velocity.y += 0.25f;&#xD;&#xA;    velocity.y = std::max(velocity.y, -7.0f);&#xD;&#xA;    velocity.y = std::min(velocity.y, 7.0f);&#xD;&#xA;&#xD;&#xA;    if(input-&gt;wasPressed(JUMP)) {&#xD;&#xA;        if(on_the_ground) {&#xD;&#xA;            velocity.y = -4.64453125f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://zackthehuman.com/mm3-jump-curve.html" />
  <row Id="30038" PostHistoryTypeId="5" PostId="13513" RevisionGUID="aad29ed3-1f82-4d98-9e99-d5c07d095d79" CreationDate="2011-06-11T22:34:32.590" UserId="1839" Comment="added 1088 characters in body" Text="Basically you just have to subtract 64 from low value and then you find that pattern:&#xD;&#xA;a low value of 64 represents 0.25, because 256 * 0.25 = 64&#xD;&#xA;&#xD;&#xA;    struct position&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        void step()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    position p;&#xD;&#xA;    p.high = 4;&#xD;&#xA;    p.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, p.high, p.low, p.toFloat());&#xD;&#xA;        p.step();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;    -6     165   -6.644531&#xD;&#xA;    -6     101   -6.394531&#xD;&#xA;    -6      37   -6.144531&#xD;&#xA;    -7     229   -7.894531&#xD;&#xA;    -7     165   -7.644531&#xD;&#xA;    -7     101   -7.394531&#xD;&#xA;    -7      37   -7.144531&#xD;&#xA;    -8     229   -8.894531&#xD;&#xA;    -8     165   -8.644531&#xD;&#xA;    -8     101   -8.394531&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30039" PostHistoryTypeId="5" PostId="13513" RevisionGUID="67978a4e-1688-436a-bac4-fbaca85f652d" CreationDate="2011-06-11T22:40:01.697" UserId="1839" Comment="added 219 characters in body; deleted 7 characters in body" Text="Basically you just have to subtract 64 from the low value to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64&#xD;&#xA;&#xD;&#xA;    struct position&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        void step()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    position p;&#xD;&#xA;    p.high = 4;&#xD;&#xA;    p.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, p.high, p.low, p.toFloat());&#xD;&#xA;        p.step();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;    -6     165   -6.644531&#xD;&#xA;    -6     101   -6.394531&#xD;&#xA;    -6      37   -6.144531&#xD;&#xA;    -7     229   -7.894531&#xD;&#xA;    -7     165   -7.644531&#xD;&#xA;    -7     101   -7.394531&#xD;&#xA;    -7      37   -7.144531&#xD;&#xA;    -8     229   -8.894531&#xD;&#xA;    -8     165   -8.644531&#xD;&#xA;    -8     101   -8.394531&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30040" PostHistoryTypeId="5" PostId="13513" RevisionGUID="fcfbacac-6dba-47d4-8009-0bee2cd625e3" CreationDate="2011-06-11T22:53:16.187" UserId="1839" Comment="added 23 characters in body" Text="Basically you just have to subtract 64 from the low value to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64&#xD;&#xA;&#xD;&#xA;    struct position&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    position p;&#xD;&#xA;    p.high = 4;&#xD;&#xA;    p.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, p.high, p.low, p.toFloat());&#xD;&#xA;        p.step();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;    -6     165   -6.644531&#xD;&#xA;    -6     101   -6.394531&#xD;&#xA;    -6      37   -6.144531&#xD;&#xA;    -7     229   -7.894531&#xD;&#xA;    -7     165   -7.644531&#xD;&#xA;    -7     101   -7.394531&#xD;&#xA;    -7      37   -7.144531&#xD;&#xA;    -8     229   -8.894531&#xD;&#xA;    -8     165   -8.644531&#xD;&#xA;    -8     101   -8.394531&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30041" PostHistoryTypeId="5" PostId="13513" RevisionGUID="b7d07c4a-ba85-4d40-9f2a-ea58a47ee3ba" CreationDate="2011-06-11T23:11:39.877" UserId="1839" Comment="added 66 characters in body; added 74 characters in body" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;    struct position&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    position p;&#xD;&#xA;    p.high = 4;&#xD;&#xA;    p.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, p.high, p.low, p.toFloat());&#xD;&#xA;        p.step();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;    -6     165   -6.644531&#xD;&#xA;    -6     101   -6.394531&#xD;&#xA;    -6      37   -6.144531&#xD;&#xA;    -7     229   -7.894531&#xD;&#xA;    -7     165   -7.644531&#xD;&#xA;    -7     101   -7.394531&#xD;&#xA;    -7      37   -7.144531&#xD;&#xA;    -8     229   -8.894531&#xD;&#xA;    -8     165   -8.644531&#xD;&#xA;    -8     101   -8.394531&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30042" PostHistoryTypeId="5" PostId="13513" RevisionGUID="3cfc5c66-34a6-4828-8928-f9ab2eb636d4" CreationDate="2011-06-11T23:18:01.493" UserId="1839" Comment="edited body; edited body" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;    struct velocity&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    velocity v;&#xD;&#xA;    v.high = 4;&#xD;&#xA;    v.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, v.high, v.low, v.toFloat());&#xD;&#xA;        v.fall();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;    -6     165   -6.644531&#xD;&#xA;    -6     101   -6.394531&#xD;&#xA;    -6      37   -6.144531&#xD;&#xA;    -7     229   -7.894531&#xD;&#xA;    -7     165   -7.644531&#xD;&#xA;    -7     101   -7.394531&#xD;&#xA;    -7      37   -7.144531&#xD;&#xA;    -8     229   -8.894531&#xD;&#xA;    -8     165   -8.644531&#xD;&#xA;    -8     101   -8.394531&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30043" PostHistoryTypeId="5" PostId="13512" RevisionGUID="dee3888a-51bf-47fd-8d04-65773202b301" CreationDate="2011-06-11T23:35:21.783" UserId="1839" Comment="corrected indention in data table" Text="**Background:**&#xD;&#xA;&#xD;&#xA;I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate parts: one byte for the whole number and another for the fractional part.&#xD;&#xA;&#xD;&#xA;Gravity is added to the player's Y speed at a rate of 0.25/frame.&#xD;&#xA;&#xD;&#xA;When the player jumps, his Y speed is set to -4.64453125. The rest of the jump curve is left to gravity.&#xD;&#xA;&#xD;&#xA;As the player ascends his vertical velocity converges to 0 at a rate of 0.25/frame. When the player's velocity reaches a value less than zero, however, the velocity changes following a different pattern. Instead of decreasing steadily by 0.25 every frame, it follows this pattern: &#xD;&#xA;&#xD;&#xA;    [1.75, -0.25, -0.25, -0.25, 1.75, -0.25, -0.25, -0.25, 1.75, ...]&#xD;&#xA;&#xD;&#xA;It appears to have something to do with integer overflow.&#xD;&#xA;&#xD;&#xA;**Data:**&#xD;&#xA;&#xD;&#xA;Here is a dump of the data from the original. It's a table of the velocity. &#xD;&#xA;&#xD;&#xA;    Jump Curve&#xD;&#xA;&#xD;&#xA;    Y-Hi Y-Lo    Decimal           Change/Frame&#xD;&#xA;    4	165	4.64453125	?&#xD;&#xA;    4	101	4.39453125	-0.25&#xD;&#xA;    4	37	4.14453125	-0.25&#xD;&#xA;    3	229	3.89453125	-0.25&#xD;&#xA;    3	165	3.64453125	-0.25&#xD;&#xA;    3	101	3.39453125	-0.25&#xD;&#xA;    3	37	3.14453125	-0.25&#xD;&#xA;    2	229	2.89453125	-0.25&#xD;&#xA;    2	165	2.64453125	-0.25&#xD;&#xA;    2	101	2.39453125	-0.25&#xD;&#xA;    2	37	2.14453125	-0.25&#xD;&#xA;    1	229	1.89453125	-0.25&#xD;&#xA;    1	165	1.64453125	-0.25&#xD;&#xA;    1	101	1.39453125	-0.25&#xD;&#xA;    1	37	1.14453125	-0.25&#xD;&#xA;    0	229	0.89453125	-0.25&#xD;&#xA;    0	165	0.64453125	-0.25&#xD;&#xA;    0	101	0.39453125	-0.25&#xD;&#xA;    0	37	0.14453125	-0.25&#xD;&#xA;    -1	229	-1.89453125	1.75&#xD;&#xA;    -1	165	-1.64453125	-0.25&#xD;&#xA;    -1	101	-1.39453125	-0.25&#xD;&#xA;    -1	37	-1.14453125	-0.25&#xD;&#xA;    -2	229	-2.89453125	1.75&#xD;&#xA;    -2	165	-2.64453125	-0.25&#xD;&#xA;    -2	101	-2.39453125	-0.25&#xD;&#xA;    -2	37	-2.14453125	-0.25&#xD;&#xA;    -3	229	-3.89453125	1.75&#xD;&#xA;    -3	165	-3.64453125	-0.25&#xD;&#xA;    -3	101	-3.39453125	-0.25&#xD;&#xA;    -3	37	-3.14453125	-0.25&#xD;&#xA;    -4	229	-4.89453125	1.75&#xD;&#xA;    -4	165	-4.64453125	-0.25&#xD;&#xA;    -4	101	-4.39453125	-0.25&#xD;&#xA;    -4	37	-4.14453125	-0.25&#xD;&#xA;    -5	229	-5.89453125	1.75&#xD;&#xA;    -5	165	-5.64453125	-0.25&#xD;&#xA;    -5	101	-5.39453125	-0.25&#xD;&#xA;    -5	37	-5.14453125	-0.25&#xD;&#xA;    -6	229	-6.89453125	1.75&#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;In my game I haven't been able to achieve this effect. When the velocity is less than zero it continues to decrease regularly by 0.25 rather than the pattern described above. Rather than storing the whole and fractional parts separately, I am storing them together in a single float.&#xD;&#xA;&#xD;&#xA;How can this effect be achieved?&#xD;&#xA;&#xD;&#xA;**Sample code:**&#xD;&#xA;&#xD;&#xA;    // Each frame this is calculated for the player&#xD;&#xA;&#xD;&#xA;    // apply gravity and cap speed at 7 in either direction&#xD;&#xA;    velocity.y += 0.25f;&#xD;&#xA;    velocity.y = std::max(velocity.y, -7.0f);&#xD;&#xA;    velocity.y = std::min(velocity.y, 7.0f);&#xD;&#xA;&#xD;&#xA;    if(input-&gt;wasPressed(JUMP)) {&#xD;&#xA;        if(on_the_ground) {&#xD;&#xA;            velocity.y = -4.64453125f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="30044" PostHistoryTypeId="24" PostId="13512" RevisionGUID="dee3888a-51bf-47fd-8d04-65773202b301" CreationDate="2011-06-11T23:35:21.783" Comment="Proposed by 1839 approved by 974 edit id of 485" />
  <row Id="30045" PostHistoryTypeId="5" PostId="13513" RevisionGUID="e25a1c40-80dc-442a-98b7-7e97eae6a96c" CreationDate="2011-06-11T23:41:22.570" UserId="1839" Comment="deleted 282 characters in body" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;    struct velocity&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    velocity v;&#xD;&#xA;    v.high = 4;&#xD;&#xA;    v.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, v.high, v.low, v.toFloat());&#xD;&#xA;        v.fall();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;" />
  <row Id="30046" PostHistoryTypeId="5" PostId="13512" RevisionGUID="2eab17ab-17c6-477f-b081-10b8a473a22c" CreationDate="2011-06-12T00:13:15.597" UserId="1839" Comment="corrected indention of data-table" Text="**Background:**&#xD;&#xA;&#xD;&#xA;I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate parts: one byte for the whole number and another for the fractional part.&#xD;&#xA;&#xD;&#xA;Gravity is added to the player's Y speed at a rate of 0.25/frame.&#xD;&#xA;&#xD;&#xA;When the player jumps, his Y speed is set to -4.64453125. The rest of the jump curve is left to gravity.&#xD;&#xA;&#xD;&#xA;As the player ascends his vertical velocity converges to 0 at a rate of 0.25/frame. When the player's velocity reaches a value less than zero, however, the velocity changes following a different pattern. Instead of decreasing steadily by 0.25 every frame, it follows this pattern: &#xD;&#xA;&#xD;&#xA;    [1.75, -0.25, -0.25, -0.25, 1.75, -0.25, -0.25, -0.25, 1.75, ...]&#xD;&#xA;&#xD;&#xA;It appears to have something to do with integer overflow.&#xD;&#xA;&#xD;&#xA;**Data:**&#xD;&#xA;&#xD;&#xA;Here is a dump of the data from the original. It's a table of the velocity. &#xD;&#xA;&#xD;&#xA;    Jump Curve&#xD;&#xA;&#xD;&#xA;    Y-Hi Y-Lo    Decimal        Change/Frame&#xD;&#xA;    4    165     4.64453125     ?&#xD;&#xA;    4    101     4.39453125     -0.25&#xD;&#xA;    4    37      4.14453125     -0.25&#xD;&#xA;    3    229     3.89453125     -0.25&#xD;&#xA;    3    165     3.64453125     -0.25&#xD;&#xA;    3    101     3.39453125     -0.25&#xD;&#xA;    3    37      3.14453125     -0.25&#xD;&#xA;    2    229     2.89453125     -0.25&#xD;&#xA;    2    165     2.64453125     -0.25&#xD;&#xA;    2    101     2.39453125     -0.25&#xD;&#xA;    2    37      2.14453125     -0.25&#xD;&#xA;    1    229     1.89453125     -0.25&#xD;&#xA;    1    165     1.64453125     -0.25&#xD;&#xA;    1    101     1.39453125     -0.25&#xD;&#xA;    1    37      1.14453125     -0.25&#xD;&#xA;    0    229     0.89453125     -0.25&#xD;&#xA;    0    165     0.64453125     -0.25&#xD;&#xA;    0    101     0.39453125     -0.25&#xD;&#xA;    0    37      0.14453125     -0.25&#xD;&#xA;    -1   229     -1.89453125    1.75&#xD;&#xA;    -1   165     -1.64453125    -0.25&#xD;&#xA;    -1   101     -1.39453125    -0.25&#xD;&#xA;    -1   37      -1.14453125    -0.25&#xD;&#xA;    -2   229     -2.89453125    1.75&#xD;&#xA;    -2   165     -2.64453125    -0.25&#xD;&#xA;    -2   101     -2.39453125    -0.25&#xD;&#xA;    -2   37      -2.14453125    -0.25&#xD;&#xA;    -3   229     -3.89453125    1.75&#xD;&#xA;    -3   165     -3.64453125    -0.25&#xD;&#xA;    -3   101     -3.39453125    -0.25&#xD;&#xA;    -3   37      -3.14453125    -0.25&#xD;&#xA;    -4   229     -4.89453125    1.75&#xD;&#xA;    -4   165     -4.64453125    -0.25&#xD;&#xA;    -4   101     -4.39453125    -0.25&#xD;&#xA;    -4   37      -4.14453125    -0.25&#xD;&#xA;    -5   229     -5.89453125    1.75&#xD;&#xA;    -5   165     -5.64453125    -0.25&#xD;&#xA;    -5   101     -5.39453125    -0.25&#xD;&#xA;    -5   37      -5.14453125    -0.25&#xD;&#xA;    -6   229     -6.89453125    1.75&#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;In my game I haven't been able to achieve this effect. When the velocity is less than zero it continues to decrease regularly by 0.25 rather than the pattern described above. Rather than storing the whole and fractional parts separately, I am storing them together in a single float.&#xD;&#xA;&#xD;&#xA;How can this effect be achieved?&#xD;&#xA;&#xD;&#xA;**Sample code:**&#xD;&#xA;&#xD;&#xA;    // Each frame this is calculated for the player&#xD;&#xA;&#xD;&#xA;    // apply gravity and cap speed at 7 in either direction&#xD;&#xA;    velocity.y += 0.25f;&#xD;&#xA;    velocity.y = std::max(velocity.y, -7.0f);&#xD;&#xA;    velocity.y = std::min(velocity.y, 7.0f);&#xD;&#xA;&#xD;&#xA;    if(input-&gt;wasPressed(JUMP)) {&#xD;&#xA;        if(on_the_ground) {&#xD;&#xA;            velocity.y = -4.64453125f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30047" PostHistoryTypeId="24" PostId="13512" RevisionGUID="2eab17ab-17c6-477f-b081-10b8a473a22c" CreationDate="2011-06-12T00:13:15.597" Comment="Proposed by 1839 approved by 14 edit id of 486" />
  <row Id="30048" PostHistoryTypeId="25" PostId="13512" RevisionGUID="99fbc0d5-ae0c-4572-bb81-79957a5c8b85" CreationDate="2011-06-12T00:19:20.877" Comment="http://twitter.com/#!/StackGameDev/status/79704300204466176" />
  <row Id="30050" PostHistoryTypeId="5" PostId="13509" RevisionGUID="a14caa64-a862-4a04-afce-c154e748d24a" CreationDate="2011-06-12T01:09:52.743" UserId="7946" Comment="added 251 characters in body; added 150 characters in body" Text="Just yesterday someone asked almost exactly the same question over on stackoverlow.com. I'm going to quote my answer from there and edit it a little to fit your post: &#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6300169/moving-objects-help/6300303#6300303&#xD;&#xA;&#xD;&#xA;I don't know what kind of library you're using to draw all of your things, but that basically doesn't matter since you only need to know two things in order to do this:&#xD;&#xA;&#xD;&#xA;You'll probably want to set up a vector class in order to deal with these kinds of things more comfortably. I'm going to assume that you already have one. In case you don't know about vector math, you should find a ton of stuff about it on google. Here is a simple introduction, for example: https://users.cs.jmu.edu/bernstdh/web/common/lectures/slides_vector-math-2d.php&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You need to calculate the direction that the beam moves in depending on the touch's position. You get this direction by simply subtracting the position of the touch from the position of the player:&#xD;&#xA;&#xD;&#xA;    Vector2 direction = touchPosition - playerPosition;&#xD;&#xA;&#xD;&#xA;In order to just get a direction instead of adding a velocity component to this vector, you need to normalize it (so it has a length of 1):&#xD;&#xA;&#xD;&#xA;    direction.normalize()&#xD;&#xA;&#xD;&#xA;The normalize code inside Vector 2 would look something like this:&#xD;&#xA;&#xD;&#xA;    public void normalize()&#xD;&#xA;    {&#xD;&#xA;        float length = this.length();&#xD;&#xA;        this.x /= length;&#xD;&#xA;        this.y /= length;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And the length code like this:&#xD;&#xA;&#xD;&#xA;    public void length()&#xD;&#xA;    {&#xD;&#xA;        return math.sqrt(this.x*this.x + this.y*this.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You then need to update the beam position by adding the product of the direction and the speed that you want the beam to travel with.&#xD;&#xA;&#xD;&#xA;    projectilePosition += direction*speed;&#xD;&#xA;&#xD;&#xA;If you have some way of measuring the time between two frames, the speed variable should depend on the elapsed time between those frames, in order to create smooth movements on different platforms. Then, the code would simply add another multiplication:&#xD;&#xA;&#xD;&#xA;    projectilePosition += direction*speed*t; //t = elapsed time" />
  <row Id="30051" PostHistoryTypeId="5" PostId="13509" RevisionGUID="5cb8630d-0f85-4b6b-b9f9-6d62599e9778" CreationDate="2011-06-12T01:14:59.873" UserId="7946" Comment="totally forgot that java doesn't have operator overloading. damnit :)" Text="Just yesterday someone asked almost exactly the same question over on stackoverlow.com. I'm going to quote my answer from there and edit it a little to fit your post: &#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6300169/moving-objects-help/6300303#6300303&#xD;&#xA;&#xD;&#xA;I don't know what kind of library you're using to draw all of your things, but that basically doesn't matter since you only need to know two things in order to do this:&#xD;&#xA;&#xD;&#xA;You'll probably want to set up a vector class in order to deal with these kinds of things more comfortably. I'm going to assume that you already have one. In case you don't know about vector math, you should find a ton of stuff about it on google. Here is a simple introduction, for example: https://users.cs.jmu.edu/bernstdh/web/common/lectures/slides_vector-math-2d.php&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You need to calculate the direction that the beam moves in depending on the touch's position. You get this direction by simply subtracting the position of the touch from the position of the player:&#xD;&#xA;&#xD;&#xA;    Vector2 direction = Vector2.subtract(touchPosition,playerPosition);&#xD;&#xA;&#xD;&#xA;In order to just get a direction instead of adding a velocity component to this vector, you need to normalize it (so it has a length of 1):&#xD;&#xA;&#xD;&#xA;    direction.normalize()&#xD;&#xA;&#xD;&#xA;The normalize code inside Vector 2 would look something like this:&#xD;&#xA;&#xD;&#xA;    public void normalize()&#xD;&#xA;    {&#xD;&#xA;        float length = this.length();&#xD;&#xA;        this.x /= length;&#xD;&#xA;        this.y /= length;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And the length code like this:&#xD;&#xA;&#xD;&#xA;    public void length()&#xD;&#xA;    {&#xD;&#xA;        return math.sqrt(this.x*this.x + this.y*this.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You then need to update the beam position by adding the product of the direction and the speed that you want the beam to travel with.&#xD;&#xA;&#xD;&#xA;    projectilePosition.add(Vector2.multiply(direction,speed));&#xD;&#xA;&#xD;&#xA;If you have some way of measuring the time between two frames, the speed variable should depend on the elapsed time between those frames, in order to create smooth movements on different platforms. Then, the code would simply add another multiplication:&#xD;&#xA;&#xD;&#xA;    projectilePosition.add(Vector2.multiply(direction,speed*t)); //t = elapsed time" />
  <row Id="30052" PostHistoryTypeId="25" PostId="13299" RevisionGUID="f5893d7c-486c-42db-86f4-6b3673e781ab" CreationDate="2011-06-12T03:19:21.190" Comment="http://twitter.com/#!/StackGameDev/status/79749599757221888" />
  <row Id="30053" PostHistoryTypeId="2" PostId="13514" RevisionGUID="db777e04-61f0-410b-834e-0cb5761e3fc1" CreationDate="2011-06-12T03:19:34.560" UserId="7954" Text="I work on **C# vs2008**,I want to start game programming , I know Learn to crawl before you run, I don’t know how to start. hope starting with XNA is fine, start creating small games (snake, tetris etc..).I am new in game programming ,Plz help me to start.&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    1-What Game Engine should I use?&#xD;&#xA;    2-To start game programming which platform is the best.&#xD;&#xA;    &#xD;&#xA;    3-Is it best idea to start with XNA.&#xD;&#xA;    4- What is the best XNA book, which can teach the 2d &amp; 3d game programming from basic to advance???? &#xD;&#xA;    5- Any suggestion how can become professional game developer with XNA, and create cool 3d games?&#xD;&#xA;    6- Is it XNA industry standard for creating games?&#xD;&#xA;    7- Is there any work place can join as XNA game developer?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30054" PostHistoryTypeId="1" PostId="13514" RevisionGUID="db777e04-61f0-410b-834e-0cb5761e3fc1" CreationDate="2011-06-12T03:19:34.560" UserId="7954" Text="how to start game programming" />
  <row Id="30055" PostHistoryTypeId="3" PostId="13514" RevisionGUID="db777e04-61f0-410b-834e-0cb5761e3fc1" CreationDate="2011-06-12T03:19:34.560" UserId="7954" Text="&lt;xna&gt;&lt;2d&gt;&lt;3d&gt;&lt;c#&gt;&lt;directx&gt;" />
  <row Id="30056" PostHistoryTypeId="2" PostId="13515" RevisionGUID="747f28e8-7b89-46d0-ac3d-25fd5290035d" CreationDate="2011-06-12T04:00:31.260" UserId="2111" Text=" **1. What Game Engine should I use?**&#xD;&#xA;&#xD;&#xA;I suspect you mean framework here, so I'd say that XNA is a good framework to start with in my opinion. I personally found it quite easy to use and much more straightforward than C++ and DirectX.&#xD;&#xA;&#xD;&#xA;**2. Which platform is the best?**&#xD;&#xA;&#xD;&#xA;There is no &quot;best&quot; platform to target, but if you go with XNA go ahead and learn to program for Windows and move on after you know it properly.&#xD;&#xA;&#xD;&#xA;**3. Is starting with XNA the best idea?**&#xD;&#xA;&#xD;&#xA;It may not be the **best** idea (since *best* is highly subjective) but I find it to be quite a *good* idea, since C# is much easier to use than C++ and XNA has a lot of online resources and tutorials to help you out.&#xD;&#xA;&#xD;&#xA;**4. What is the best XNA book to learn 2D and 3D?**&#xD;&#xA;&#xD;&#xA;Again, *best* is subjective here, but I'd recommend going with online resources (unless you really want a book). Here are a couple of sites to get you started:&#xD;&#xA;&#xD;&#xA;-[RB Whitaker][1]&#xD;&#xA;&#xD;&#xA;-[Riemers][2]&#xD;&#xA;&#xD;&#xA;-[XNA resources][3]&#xD;&#xA;&#xD;&#xA;-[Answer with more resources][4]&#xD;&#xA;&#xD;&#xA;**5. How to become professional game developer with XNA?**&#xD;&#xA;&#xD;&#xA;Make games. And complete them. Don't just make dozens of half-made Tetris and Pong clones, make complete games with menu screens, highscores, etc. You'll learn a lot from making clones, and eventually you'll be ready to make your own game from scratch. Just keep moving forward with little steps between each game and make sure to keep realistic goals when doing so (e.g. don't start with an MMORPG...)&#xD;&#xA;&#xD;&#xA;**6. Is XNA standard for creating games?**&#xD;&#xA;&#xD;&#xA;It may not be used *a lot* commercially but it sure is great to start out with it. Once you feel comfortable with the basics of game development, then you can move to more complex languages/frameworks(maybe C++ and DirectX or OpenGL).&#xD;&#xA;&#xD;&#xA;**7. Is there any work place I can join as a XNA game developer?**&#xD;&#xA;&#xD;&#xA;I'd say start by making your own games first and learn the basics then think about this question when you know the framework a little bit more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rbwhitaker.wikidot.com/xna-tutorials&#xD;&#xA;  [2]: http://www.riemers.net/&#xD;&#xA;  [3]: http://www.xnaresources.com/default.asp&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/13043/get-started-games-development-with-c/13050#13050" />
  <row Id="30057" PostHistoryTypeId="5" PostId="13515" RevisionGUID="f28d910c-2748-47fa-9acc-8f37a125a217" CreationDate="2011-06-12T04:05:48.433" UserId="2111" Comment="added 517 characters in body" Text=" **1. What Game Engine should I use?**&#xD;&#xA;&#xD;&#xA;I suspect you mean framework here, so I'd say that XNA is a good framework to start with in my opinion. I personally found it quite easy to use and much more straightforward than C++ and DirectX.&#xD;&#xA;&#xD;&#xA;If you really do mean engine, then you could actually make your own engine and learn a lot from it. I found [these tutorials][1] to be particularly useful for this task.&#xD;&#xA;&#xD;&#xA;If you actually don't really know the difference between an engine and a framework, take a look at the answers to [this question][2].&#xD;&#xA;&#xD;&#xA;**2. Which platform is the best?**&#xD;&#xA;&#xD;&#xA;There is no &quot;best&quot; platform to target, but if you go with XNA go ahead and learn to program for Windows and move on after you know it properly.&#xD;&#xA;&#xD;&#xA;**3. Is starting with XNA the best idea?**&#xD;&#xA;&#xD;&#xA;It may not be the **best** idea (since *best* is highly subjective) but I find it to be quite a *good* idea, since C# is much easier to use than C++ and XNA has a lot of online resources and tutorials to help you out.&#xD;&#xA;&#xD;&#xA;**4. What is the best XNA book to learn 2D and 3D?**&#xD;&#xA;&#xD;&#xA;Again, *best* is subjective here, but I'd recommend going with online resources (unless you really want a book). Here are a couple of sites to get you started:&#xD;&#xA;&#xD;&#xA;-[RB Whitaker][3]&#xD;&#xA;&#xD;&#xA;-[Riemers][4]&#xD;&#xA;&#xD;&#xA;-[XNA resources][5]&#xD;&#xA;&#xD;&#xA;-[Answer with more resources][6]&#xD;&#xA;&#xD;&#xA;**5. How to become professional game developer with XNA?**&#xD;&#xA;&#xD;&#xA;Make games. And complete them. Don't just make dozens of half-made Tetris and Pong clones, make complete games with menu screens, highscores, etc. You'll learn a lot from making clones, and eventually you'll be ready to make your own game from scratch. Just keep moving forward with little steps between each game and make sure to keep realistic goals when doing so (e.g. don't start with an MMORPG...)&#xD;&#xA;&#xD;&#xA;**6. Is XNA standard for creating games?**&#xD;&#xA;&#xD;&#xA;It may not be used *a lot* commercially but it sure is great to start out with it. Once you feel comfortable with the basics of game development, then you can move to more complex languages/frameworks(maybe C++ and DirectX or OpenGL).&#xD;&#xA;&#xD;&#xA;**7. Is there any work place I can join as a XNA game developer?**&#xD;&#xA;&#xD;&#xA;I'd say start by making your own games first and learn the basics then think about this question when you know the framework a little bit more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.innovativegames.net/blog/blog/2009/10/18/innovation-engine-roadmap-2009-2010/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/10770/whats-the-difference-between-a-library-and-an-engine&#xD;&#xA;  [3]: http://rbwhitaker.wikidot.com/xna-tutorials&#xD;&#xA;  [4]: http://www.riemers.net/&#xD;&#xA;  [5]: http://www.xnaresources.com/default.asp&#xD;&#xA;  [6]: http://gamedev.stackexchange.com/questions/13043/get-started-games-development-with-c/13050#13050" />
  <row Id="30058" PostHistoryTypeId="25" PostId="13390" RevisionGUID="f6628be2-6c88-46b1-9b44-7a79f63feba9" CreationDate="2011-06-12T06:19:21.240" Comment="http://twitter.com/#!/StackGameDev/status/79794898995388416" />
  <row Id="30059" PostHistoryTypeId="5" PostId="13513" RevisionGUID="7abf0e89-a75e-444f-a9a1-bec6f6cc727d" CreationDate="2011-06-12T08:33:06.217" UserId="1839" Comment="added 162 characters in body" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;**Disclaimer:** This code is intentionally wrong when it comes to negative numbers, it is supposed to model the numerical anomalies described in the question.&#xD;&#xA;&#xD;&#xA;    struct velocity&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    velocity v;&#xD;&#xA;    v.high = 4;&#xD;&#xA;    v.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, v.high, v.low, v.toFloat());&#xD;&#xA;        v.fall();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;" />
  <row Id="30060" PostHistoryTypeId="5" PostId="13514" RevisionGUID="641643b4-8750-452b-8b22-7dbd10522d68" CreationDate="2011-06-12T08:41:38.483" UserId="7779" Comment="fixed formatting, grammar" Text="I work with **C# vs2008**, I want to start game programming, I know you need to learn to crawl before you run, I don’t know how to start. hope starting with XNA is fine, start creating small games (snake, tetris etc..). I am new to game programming, please help me get started.&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA; 1. What Game Engine should I use?&#xD;&#xA; 2. Which platform is best to start game programming.&#xD;&#xA; 3. Is it best idea to start with XNA.&#xD;&#xA; 4. What is the best XNA book, which can teach the 2d &amp; 3d game programming from basic to advance?&#xD;&#xA; 5. Any suggestion how can become professional game developer with XNA, and create cool 3d games?&#xD;&#xA; 6. Is XNA an industry standard for creating games?&#xD;&#xA; 7. Is there any workplace I can join as XNA game developer?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30061" PostHistoryTypeId="24" PostId="13514" RevisionGUID="641643b4-8750-452b-8b22-7dbd10522d68" CreationDate="2011-06-12T08:41:38.483" Comment="Proposed by 7779 approved by 51 edit id of 487" />
  <row Id="30062" PostHistoryTypeId="5" PostId="13513" RevisionGUID="dd37dd70-5d84-4c75-b7a3-a6c069e7df58" CreationDate="2011-06-12T08:43:37.857" UserId="1839" Comment="Added the _correct_ fixed point class for comparison reasons; added 23 characters in body; added 2 characters in body; added 2 characters in body; deleted 20 characters in body" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;**Disclaimer:** This code is intentionally wrong when it comes to negative numbers, it is supposed to model the numerical anomalies described in the question. For comparison reasons the implementation of a proper negative numbers handling fixed point class can be found at the bottom of this answer.&#xD;&#xA;&#xD;&#xA;    struct velocity&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    velocity v;&#xD;&#xA;    v.high = 4;&#xD;&#xA;    v.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, v.high, v.low, v.toFloat());&#xD;&#xA;        v.fall();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;&#xD;&#xA;In contrast this fixed point class handles the negative numbers properly:&#xD;&#xA;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;&#xD;&#xA;    struct fixed_point&#xD;&#xA;    {&#xD;&#xA;        union&#xD;&#xA;        {&#xD;&#xA;            struct&#xD;&#xA;            {&#xD;&#xA;                unsigned char low;&#xD;&#xA;                signed char high;&#xD;&#xA;            };&#xD;&#xA;            short s;&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            fixed_point tmp;&#xD;&#xA;            if(high &lt; 0) tmp.s = ~s;&#xD;&#xA;            else tmp.s = s;&#xD;&#xA;            &#xD;&#xA;            float ret = tmp.high;&#xD;&#xA;            float frac = (float)tmp.low / 256.0f;&#xD;&#xA;            ret += frac;&#xD;&#xA;            if(high &lt; 0) ret = 0 - ret;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            float tmp;&#xD;&#xA;            if(f &lt; 0.0f) tmp = -f;&#xD;&#xA;            else tmp = f;&#xD;&#xA;    &#xD;&#xA;            high = (char)tmp;&#xD;&#xA;            float frac = tmp - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;    &#xD;&#xA;            if(f &lt; 0.0f) s = ~s;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        fixed_point operator+(const fixed_point &amp;fp) const&#xD;&#xA;        {&#xD;&#xA;            fixed_point ret;&#xD;&#xA;            ret.s = s + fp.s;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fixed_point operator-(const fixed_point &amp;fp) const&#xD;&#xA;        {&#xD;&#xA;            fixed_point ret;&#xD;&#xA;            ret.s = s - fp.s;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void print(const char *msg) const&#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; msg &lt;&lt; &quot;:&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; std::hex &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; std::uppercase;&#xD;&#xA;            // cout'ing the hex value for a char is kind of a pain ..&#xD;&#xA;            unsigned int _high = 0;&#xD;&#xA;            memcpy(&amp;_high, &amp;high, 1);&#xD;&#xA;            std::cout &lt;&lt; &quot;  high : 0x&quot; &lt;&lt; (_high &amp; 0xFF) &lt;&lt; std::endl;&#xD;&#xA;            unsigned int _low = 0;&#xD;&#xA;            memcpy(&amp;_low, &amp;low, 1);&#xD;&#xA;            std::cout &lt;&lt; &quot;  low  : 0x&quot; &lt;&lt; (_low &amp; 0xFF) &lt;&lt; std::endl;&#xD;&#xA;            std::cout.width(4);&#xD;&#xA;            std::cout &lt;&lt; &quot;  all  : 0x&quot; &lt;&lt; s &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;  float: &quot; &lt;&lt; toFloat() &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;" />
  <row Id="30063" PostHistoryTypeId="5" PostId="13513" RevisionGUID="61d80974-62f5-4038-8074-11fa6fce90fe" CreationDate="2011-06-12T08:52:16.503" UserId="1839" Comment="some code cleaning" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;**Disclaimer:** This code is intentionally wrong when it comes to negative numbers, it is supposed to model the numerical anomalies described in the question. For comparison reasons the implementation of a proper negative numbers handling fixed point class can be found at the bottom of this answer.&#xD;&#xA;&#xD;&#xA;    struct velocity&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    velocity v;&#xD;&#xA;    v.high = 4;&#xD;&#xA;    v.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, v.high, v.low, v.toFloat());&#xD;&#xA;        v.fall();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;&#xD;&#xA;In contrast this fixed point class handles the negative numbers properly:&#xD;&#xA;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;&#xD;&#xA;    struct fixed_point&#xD;&#xA;    {&#xD;&#xA;        union&#xD;&#xA;        {&#xD;&#xA;            struct&#xD;&#xA;            {&#xD;&#xA;                unsigned char low;&#xD;&#xA;                signed char high;&#xD;&#xA;            };&#xD;&#xA;            short s;&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            fixed_point tmp;&#xD;&#xA;            if(high &lt; 0) tmp.s = ~s;&#xD;&#xA;            else tmp.s = s;&#xD;&#xA;            &#xD;&#xA;            float ret = tmp.high;&#xD;&#xA;            float frac = (float)tmp.low / 256.0f;&#xD;&#xA;            ret += frac;&#xD;&#xA;            if(high &lt; 0) ret = 0 - ret;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            float tmp;&#xD;&#xA;            if(f &lt; 0.0f) tmp = -f;&#xD;&#xA;            else tmp = f;&#xD;&#xA;    &#xD;&#xA;            high = (char)tmp;&#xD;&#xA;            float frac = tmp - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;    &#xD;&#xA;            if(f &lt; 0.0f) s = ~s;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        fixed_point operator+(const fixed_point &amp;fp) const&#xD;&#xA;        {&#xD;&#xA;            fixed_point ret;&#xD;&#xA;            ret.s = s + fp.s;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fixed_point operator-(const fixed_point &amp;fp) const&#xD;&#xA;        {&#xD;&#xA;            fixed_point ret;&#xD;&#xA;            ret.s = s - fp.s;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void print(const char *msg) const&#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; msg &lt;&lt; &quot;:&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; std::hex &lt;&lt; std::uppercase;&#xD;&#xA;            // cout'ing the hex value for a char is kind of a pain ..&#xD;&#xA;            unsigned int _high = 0;&#xD;&#xA;            memcpy(&amp;_high, &amp;high, 1);&#xD;&#xA;            std::cout &lt;&lt; &quot;  high : 0x&quot; &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; _high &lt;&lt; std::endl;&#xD;&#xA;            unsigned int _low = 0;&#xD;&#xA;            memcpy(&amp;_low, &amp;low, 1);&#xD;&#xA;            std::cout &lt;&lt; &quot;  low  : 0x&quot; &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; _low &lt;&lt; std::endl;&#xD;&#xA;            std::cout.width(4);&#xD;&#xA;            std::cout &lt;&lt; &quot;  all  : 0x&quot; &lt;&lt; std::setfill('0') &lt;&lt; std::setw(4) &lt;&lt; s &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;  float: &quot; &lt;&lt; toFloat() &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;" />
  <row Id="30064" PostHistoryTypeId="2" PostId="13516" RevisionGUID="16a343fe-46a1-4895-b189-c5b32f373945" CreationDate="2011-06-12T09:02:18.557" UserId="2188" Text="The android emulator is much slower than the average modern device.&#xD;&#xA;&#xD;&#xA;In a game I was making I easily reached 60fps on my Nx1, but on the emulator I was barely able to reach 15-25fps.&#xD;&#xA;&#xD;&#xA;You're correct when you say that this error happens because rendering takes too long, and be warned that you might get the same problem on slower devices, or anyway devices that are running in background many apps while they run yours — so yes, you have to actually solve it.&#xD;&#xA;&#xD;&#xA;As @AttackingHobo suggests, you have to implement a system which supports frameskipping." />
  <row Id="30065" PostHistoryTypeId="25" PostId="13422" RevisionGUID="fda6df29-d250-4ce5-ad7b-4000552abab9" CreationDate="2011-06-12T09:19:22.063" Comment="http://twitter.com/#!/StackGameDev/status/79840201333157889" />
  <row Id="30066" PostHistoryTypeId="5" PostId="13509" RevisionGUID="7f46a809-78db-4152-b881-7e4c5e141fdf" CreationDate="2011-06-12T10:58:13.870" UserId="7946" Comment="deleted 32 characters in body" Text="Just yesterday someone asked almost exactly the same question over on stackoverlow.com. I'm going to quote my answer from there and edit it a little to fit your post: &#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6300169/moving-objects-help/6300303#6300303&#xD;&#xA;&#xD;&#xA;I don't know what kind of library you're using to draw all of your things, but that basically doesn't matter since you only need to know two things in order to do this:&#xD;&#xA;&#xD;&#xA;You'll probably want to set up a vector class in order to deal with these kinds of things more comfortably. I'm going to assume that you already have one. In case you don't know about vector math, there's this very useful tag page on here with links to two excellent articles on the topic: http://gamedev.stackexchange.com/tags/vector/info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You need to calculate the direction that the beam moves in depending on the touch's position. You get this direction by simply subtracting the position of the touch from the position of the player:&#xD;&#xA;&#xD;&#xA;    Vector2 direction = Vector2.subtract(touchPosition,playerPosition);&#xD;&#xA;&#xD;&#xA;In order to just get a direction instead of adding a velocity component to this vector, you need to normalize it (so it has a length of 1):&#xD;&#xA;&#xD;&#xA;    direction.normalize()&#xD;&#xA;&#xD;&#xA;The normalize code inside Vector 2 would look something like this:&#xD;&#xA;&#xD;&#xA;    public void normalize()&#xD;&#xA;    {&#xD;&#xA;        float length = this.length();&#xD;&#xA;        this.x /= length;&#xD;&#xA;        this.y /= length;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And the length code like this:&#xD;&#xA;&#xD;&#xA;    public void length()&#xD;&#xA;    {&#xD;&#xA;        return math.sqrt(this.x*this.x + this.y*this.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You then need to update the beam position by adding the product of the direction and the speed that you want the beam to travel with.&#xD;&#xA;&#xD;&#xA;    projectilePosition.add(Vector2.multiply(direction,speed));&#xD;&#xA;&#xD;&#xA;If you have some way of measuring the time between two frames, the speed variable should depend on the elapsed time between those frames, in order to create smooth movements on different platforms. Then, the code would simply add another multiplication:&#xD;&#xA;&#xD;&#xA;    projectilePosition.add(Vector2.multiply(direction,speed*t)); //t = elapsed time" />
  <row Id="30067" PostHistoryTypeId="2" PostId="13517" RevisionGUID="8a660405-bb50-44ca-a3f2-5238ce61c899" CreationDate="2011-06-12T12:12:16.787" UserId="747" Text="An couple of considerations : &#xD;&#xA;&#xD;&#xA;* as you mentionned, each sprite would have to &quot;hint&quot; about which bitmap to use, but if the entity has to render itself. What would that 'hint' be ? If it is a reference to a different bitmap, sprite sheet, etc... for each sprite, then you might end up using more memory than necessary, or having troubles managing that memory. And advantage of a separate renderer is that you have only one class responsible for any asset management.&#xD;&#xA;That said, in a SF2-like fighting game, you might only have two sprites ;)&#xD;&#xA;&#xD;&#xA;* as mentionned elsewhere, whenever you want to change your graphical API, you have to change the code for all your sprites. &#xD;&#xA;&#xD;&#xA;* rendering is rarely done whithout a reference to some graphical context. So either there is a global variable that represent this concept, or each sprite has an interface with render(GraphicalContext ctx). This mixes the graphical API and the logic of your game (which some people will find unelegant), and might cause compilation issues.   &#xD;&#xA;&#xD;&#xA;* I personnaly find that separating the rendering from the individual entities is an interesting first step in the direction of viewing your game as a system that does not necessarily need graphics at all. What I mean is that when you put rendering out of the way, you realize lots of the gameplay happens in a &quot;non-graphic world&quot; where the coordinates of the entities, their internal states, etc... is what matters. This opens the door to automated testing, more decoupled system, etc...&#xD;&#xA;&#xD;&#xA;All in all, I tend to prefer systems where rendering is done by a seperate class. That does not mean your sprites can not have some attributes that are &quot;graphically related&quot; (animation name, animation frame, height x width, sprite id etc... ), if that makes the renderer easier to write or more efficient. &#xD;&#xA;&#xD;&#xA;And I don't know if that would apply to 3D (where the notion of meshes, and the coordinates variable you would use would maybe be tied to your 3D API ; whereas x,y,h,w is pretty much independant of any 2D API).&#xD;&#xA;&#xD;&#xA;Hoping this helps.      &#xD;&#xA;    " />
  <row Id="30068" PostHistoryTypeId="25" PostId="13514" RevisionGUID="d4cb5642-0b3b-4206-90e5-09adfc06d924" CreationDate="2011-06-12T12:19:22.080" Comment="http://twitter.com/#!/StackGameDev/status/79885499589865473" />
  <row Id="30069" PostHistoryTypeId="2" PostId="13518" RevisionGUID="6dfe26d5-615c-4780-b2eb-49b48bd239ea" CreationDate="2011-06-12T12:30:54.933" UserId="7457" Text="I am starting out learning XNA and its going smoothly. However I wonder if I am shooting myself in the foot by learning 3.1 not 4.0?&#xD;&#xA;&#xD;&#xA;I am aware of whats new: http://msdn.microsoft.com/en-us/library/bb417503.aspx, and that mostly seems to be phone, interfaces and video features - which I am not so interested in - I am more doing the core 3D stuff.&#xD;&#xA;&#xD;&#xA;The sticking point is: I have Visual Studio 2008 professional already and do not want to get VS 2010 if there is little difference in the game programming in 4.0.&#xD;&#xA;&#xD;&#xA;Has the world moved on? Is what I am learning in 3.1 going to be come redundant?&#xD;&#xA;&#xD;&#xA;There are also code differences in libraries, but they are not major, many of them can be seen here: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/, for instance this one which I had to figure out compared to Riemers Tut:&#xD;&#xA;&#xD;&#xA;XNA 4.0&#xD;&#xA;&#xD;&#xA;     protected override void Draw(GameTime gameTime)&#xD;&#xA;     {&#xD;&#xA;         device.Clear(Color.DarkSlateBlue);&#xD;&#xA;&#xD;&#xA;         RasterizerState rs = new RasterizerState();&#xD;&#xA;         rs.CullMode = CullMode.None;&#xD;&#xA;         device.RasterizerState = rs;&#xD;&#xA;&#xD;&#xA;         effect.CurrentTechnique = effect.Techniques[&quot;ColoredNoShading&quot;];&#xD;&#xA;         effect.Parameters[&quot;xView&quot;].SetValue(viewMatrix);&#xD;&#xA;         effect.Parameters[&quot;xProjection&quot;].SetValue(projectionMatrix);&#xD;&#xA;         effect.Parameters[&quot;xWorld&quot;].SetValue(Matrix.Identity);&#xD;&#xA;         foreach (EffectPass pass in effect.CurrentTechnique.Passes)&#xD;&#xA;         {&#xD;&#xA;             pass.Apply();&#xD;&#xA;&#xD;&#xA;             device.DrawUserPrimitives(PrimitiveType.TriangleList, vertices, 0, 1, VertexPositionColor.VertexDeclaration);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;         base.Draw(gameTime);&#xD;&#xA;     }&#xD;&#xA;XNA 3.1&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        device.Clear(Color.DarkSlateBlue);&#xD;&#xA;&#xD;&#xA;        device.VertexDeclaration = new VertexDeclaration(device, VertexPositionColor.VertexElements);&#xD;&#xA;        device.RenderState.CullMode = CullMode.None; // TODO only for testing!&#xD;&#xA;        device.RenderState.FillMode = FillMode.Solid;&#xD;&#xA;&#xD;&#xA;        effect.CurrentTechnique = effect.Techniques[&quot;ColoredNoShading&quot;];&#xD;&#xA;        effect.Parameters[&quot;xView&quot;].SetValue(viewMatrix);&#xD;&#xA;        effect.Parameters[&quot;xProjection&quot;].SetValue(projectionMatrix);&#xD;&#xA;        effect.Parameters[&quot;xWorld&quot;].SetValue(Matrix.Identity);&#xD;&#xA;&#xD;&#xA;        effect.Begin();&#xD;&#xA;        foreach (EffectPass pass in effect.CurrentTechnique.Passes)&#xD;&#xA;        {&#xD;&#xA;            pass.Begin();&#xD;&#xA;            device.DrawUserIndexedPrimitives&lt;VertexPositionColor&gt;(PrimitiveType.TriangleList, vertices, 0, 5, indices, 0, indices.Length / 3);&#xD;&#xA;            pass.End();&#xD;&#xA;        }&#xD;&#xA;        effect.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }" />
  <row Id="30070" PostHistoryTypeId="1" PostId="13518" RevisionGUID="6dfe26d5-615c-4780-b2eb-49b48bd239ea" CreationDate="2011-06-12T12:30:54.933" UserId="7457" Text="Learning XNA 3.1 Vs XNA 4.0" />
  <row Id="30071" PostHistoryTypeId="3" PostId="13518" RevisionGUID="6dfe26d5-615c-4780-b2eb-49b48bd239ea" CreationDate="2011-06-12T12:30:54.933" UserId="7457" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="30072" PostHistoryTypeId="2" PostId="13519" RevisionGUID="5da4e633-e10f-4db3-97aa-0b997e09defa" CreationDate="2011-06-12T12:36:03.170" UserId="7457" Text="Where in XNA 4.0 one can go:&#xD;&#xA;&#xD;&#xA;     myVertexBuffer.VertexCount;&#xD;&#xA;&#xD;&#xA;What is the best way to count the number of vertices in 3.1 for a dynamic buffer (i.e. where I do not know the number of elements that could be therein). I have come up with:&#xD;&#xA;&#xD;&#xA;    myVertexBuffer.SizeInBytes / VertexPositionNormalTexture.SizeInBytes&#xD;&#xA;&#xD;&#xA;Where my vertices are VertexPositionNormalTexture's, but is this the best way? (it will be called often in Draw())." />
  <row Id="30073" PostHistoryTypeId="1" PostId="13519" RevisionGUID="5da4e633-e10f-4db3-97aa-0b997e09defa" CreationDate="2011-06-12T12:36:03.170" UserId="7457" Text="Count number of Vertices in VertexBuffer in XNA 3.1" />
  <row Id="30074" PostHistoryTypeId="3" PostId="13519" RevisionGUID="5da4e633-e10f-4db3-97aa-0b997e09defa" CreationDate="2011-06-12T12:36:03.170" UserId="7457" Text="&lt;xna&gt;&lt;c#&gt;&lt;vertex&gt;" />
  <row Id="30075" PostHistoryTypeId="2" PostId="13520" RevisionGUID="bb545813-b851-4974-bce3-094cf56b8e01" CreationDate="2011-06-12T13:11:53.327" UserId="7885" Text="Ok thanks to all for the help :)&#xD;&#xA;&#xD;&#xA;2 days ago i found &quot;Libnoise&quot; and a good C# port. I will take this one, because there´s a renderer which renders smoother heightmaps :)" />
  <row Id="30076" PostHistoryTypeId="2" PostId="13521" RevisionGUID="048482d0-6ee4-4777-b71b-d54e807d449d" CreationDate="2011-06-12T13:16:58.190" UserId="5899" Text="Is there a way to achieve programming experience with PS3 or Xbox360 systems without the development kit that only are selling to great videogame companies ?&#xD;&#xA;" />
  <row Id="30077" PostHistoryTypeId="1" PostId="13521" RevisionGUID="048482d0-6ee4-4777-b71b-d54e807d449d" CreationDate="2011-06-12T13:16:58.190" UserId="5899" Text="How to achieve programming experience with PS3 or Xbox360 ?" />
  <row Id="30078" PostHistoryTypeId="3" PostId="13521" RevisionGUID="048482d0-6ee4-4777-b71b-d54e807d449d" CreationDate="2011-06-12T13:16:58.190" UserId="5899" Text="&lt;xbox360&gt;&lt;playstation3&gt;&lt;sdk&gt;" />
  <row Id="30079" PostHistoryTypeId="5" PostId="13521" RevisionGUID="217dc983-3f83-4d83-914e-7b60435a2808" CreationDate="2011-06-12T13:22:13.930" UserId="5899" Comment="added 118 characters in body" Text="Is there a way to achieve programming experience with PS3 or Xbox360 systems without the development kit that only are selling to great videogame companies ?&#xD;&#xA;&#xD;&#xA;There are a lot of game companies that request experience with these systems and I don't know how to achieve this.&#xD;&#xA;" />
  <row Id="30080" PostHistoryTypeId="2" PostId="13522" RevisionGUID="fb0a935b-df51-4689-9b78-134efb861a9f" CreationDate="2011-06-12T13:22:44.950" UserId="991" Text="I recommend to use XNA 4.0.&#xD;&#xA;&#xD;&#xA;Sure you can probably do everything with 3.1 what you can do with 4.0, but it has advanced quite a bit.&#xD;&#xA;Additionally to your references you might also want to take a look at Shawn Hargreaves Blog, for example at this post: [Breaking Cheaches in XNA Game Studio 4.0][1]&#xD;&#xA;[1]: http://blogs.msdn.com/b/shawnhar/archive/2010/03/16/breaking-changes-in-xna-game-studio-4-0.aspx&#xD;&#xA;Or basically you can just check out the months March, April and May 2010 in his Blog, they are full of XNA 4.0 changes.&#xD;&#xA;&#xD;&#xA;Also keep in mind that with 3.1 you will be stuck with old technology. Eventually you will want to upgrade to XNA 5/6 for DX11 support or whatever. Depending on how large/complex your program is by then, it may take some time to upgrade it to 4.0 as you have to make several changes." />
  <row Id="30081" PostHistoryTypeId="17" PostId="13523" RevisionGUID="9d721edc-cd93-4bce-80cf-154355d4632f" CreationDate="2011-06-12T13:30:18.260" UserId="-1" Comment="from http://stackoverflow.com/questions/6322175/when-should-i-learn-pygame" Text="" />
  <row Id="30082" PostHistoryTypeId="17" PostId="13524" RevisionGUID="6543f1df-4004-47c1-854b-98379686744e" CreationDate="2011-06-12T13:30:18.260" UserId="-1" Comment="from http://stackoverflow.com/questions/6322175/when-should-i-learn-pygame" Text="" />
  <row Id="30083" PostHistoryTypeId="2" PostId="13524" RevisionGUID="89e3bab7-6c5d-4bc2-860b-b54d86b40578" CreationDate="2011-06-12T13:26:04.963" UserId="4488" Text="Just do it.  Jump in.  Grab a [book][1] or some [tutorials][2] and go to town.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Programming-Python-Development/dp/1584502584&#xD;&#xA;  [2]: http://wiki.python.org/moin/GameProgramming" />
  <row Id="30084" PostHistoryTypeId="2" PostId="13523" RevisionGUID="46c5b4cf-0d5b-40b3-8d63-6461ba09e7bd" CreationDate="2011-06-12T13:21:54.503" UserDisplayName="Tristan Angeles" Text="I've been learning python for about 2 months now. I think I'm getting used to the language. My question is, when should I start learning Pygame? Or how do I know if I'm ready for it? I'm learning programming mainly to make games, so what should I at least know before I start making games? Thanks!" />
  <row Id="30085" PostHistoryTypeId="1" PostId="13523" RevisionGUID="46c5b4cf-0d5b-40b3-8d63-6461ba09e7bd" CreationDate="2011-06-12T13:21:54.503" UserDisplayName="Tristan Angeles" Text="When should I learn Pygame?" />
  <row Id="30086" PostHistoryTypeId="3" PostId="13523" RevisionGUID="46c5b4cf-0d5b-40b3-8d63-6461ba09e7bd" CreationDate="2011-06-12T13:21:54.503" UserDisplayName="Tristan Angeles" Text="&lt;python&gt;&lt;pygame&gt;" />
  <row Id="30087" PostHistoryTypeId="2" PostId="13525" RevisionGUID="d9814116-bd4f-4aee-8b73-4f8124ac485f" CreationDate="2011-06-12T13:37:25.260" UserId="7961" Text="You should be good enough to start. Game programming uses a lot of esoteric libraries and skills which you *won't* learn from other sources.&#xD;&#xA;&#xD;&#xA;So start learning the moment you understand dict vs list performance, exceptions, classes vs objects vs types, and maybe a bit of numpy (array programming).&#xD;&#xA;&#xD;&#xA;You will have to learn event driven programming (you might not explicitly control the main loop; some other loop does, and it will call your code depending on &quot;events&quot;), and the architecture of the project you are working on (MVC?), and lots of fiddly things with geometry and colors ... but that's best learnt on the job.&#xD;&#xA;&#xD;&#xA;If you aren't sure, have a look at the code here: http://www.pygame.org/wiki/CookBook&#xD;&#xA;&#xD;&#xA;If it makes any sense (the code, not the algorithms) then you are ready to go. " />
  <row Id="30088" PostHistoryTypeId="2" PostId="13526" RevisionGUID="ebb9a1f3-0d6b-49bf-ace9-fd21e26ca4b6" CreationDate="2011-06-12T13:50:44.113" UserId="7649" Text="I'm using DirectX 9 and attempting to write a simple terrain generation object.&#xD;&#xA;&#xD;&#xA;I'm running into trouble with the rendering - I'm hoping that this is a common problem, and someone could spot the problem by the output, but because of my rep (1), I can't post a pic here.&#xD;&#xA;&#xD;&#xA;[Maybe this link to the pic will work though][1]&#xD;&#xA;&#xD;&#xA;I've generated vertices, indices and I'm attempting to render a triangle strip (as it's supposed to be the most efficent way to do a grid.&#xD;&#xA;&#xD;&#xA;It looks like I've made some kind of error in vertex or index generation, although I can't see what.  I've posted my terrain class [here][2].  Can someone have a look and suggest what I've done wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/djipc.png&#xD;&#xA;  [2]: http://pastebin.com/3WSTNWCv" />
  <row Id="30089" PostHistoryTypeId="1" PostId="13526" RevisionGUID="ebb9a1f3-0d6b-49bf-ace9-fd21e26ca4b6" CreationDate="2011-06-12T13:50:44.113" UserId="7649" Text="terrain grid rendering problem" />
  <row Id="30090" PostHistoryTypeId="3" PostId="13526" RevisionGUID="ebb9a1f3-0d6b-49bf-ace9-fd21e26ca4b6" CreationDate="2011-06-12T13:50:44.113" UserId="7649" Text="&lt;c++&gt;&lt;directx9&gt;&lt;grid&gt;" />
  <row Id="30091" PostHistoryTypeId="2" PostId="13527" RevisionGUID="6f5ab3ef-fea2-4f6d-946d-9512f2ddc4df" CreationDate="2011-06-12T14:11:37.280" UserId="7963" Text="Fear, uncertaincy and doubt are a crippling combination.&#xD;&#xA;&#xD;&#xA;Just do it. &#xD;&#xA;&#xD;&#xA;What's the worst that can happen?&#xD;&#xA;&#xD;&#xA;The python fairy appears in a flash of magic and turns you into a mushroom?&#xD;&#xA;&#xD;&#xA;Now that I think of it, I remember a scifi tv show where &quot;lower&quot; creatures tried to develop too much too fast (it was an immortality treatment that required killing others to produce), and superior aliens killed them because &quot;You are not yet ready&quot;. Now you just hae to assess the potential reward in learning pygame against the possbility of this event occuring. You should be able to model this with a simple pygame simulation ..." />
  <row Id="30092" PostHistoryTypeId="5" PostId="13527" RevisionGUID="17674109-67ef-4566-b4bb-4894836abea8" CreationDate="2011-06-12T14:17:50.040" UserId="7963" Comment="typo" Text="Fear, uncertaincy and doubt are a crippling combination.&#xD;&#xA;&#xD;&#xA;Just do it. &#xD;&#xA;&#xD;&#xA;What's the worst that can happen?&#xD;&#xA;&#xD;&#xA;The python fairy appears in a flash of magic and turns you into a mushroom?&#xD;&#xA;&#xD;&#xA;Now that I think of it, I remember a scifi tv show where &quot;lower&quot; creatures tried to develop too much too fast (it was an immortality treatment that required killing others to produce), and superior aliens killed them because &quot;You are not yet ready&quot;. Now you just have to assess the potential reward in learning pygame against the possbility of this event occuring. You should be able to model this with a simple pygame simulation ..." />
  <row Id="30093" PostHistoryTypeId="2" PostId="13528" RevisionGUID="4234e3e7-6b01-4145-9410-d959944cd9bc" CreationDate="2011-06-12T14:47:20.750" UserId="4662" Text="Don't bother with the triangle strip - it's going to be much harder to reason about than a triangle list and the graphics driver can perform the conversion automatically anyway. It looks to me like your indices are off, at least- every triangle is drawn connected to vertex 0. &#xD;&#xA;&#xD;&#xA;What you should mainly consider is that you don't actually have X many triangles- you have the same triangle repeated X times. Generate one triangle or two triangles, then transform it using the D3DX mathematical library into the positions that you want. Here's some example code.&#xD;&#xA;&#xD;&#xA;     void GenTriGrid(int numVertRows, int numVertCols,&#xD;&#xA;                      float dx, float dz,&#xD;&#xA;                      const D3DXVECTOR3&amp; center,&#xD;&#xA;                      std::vector&lt;D3DXVECTOR3&gt;&amp; verts,&#xD;&#xA;                      std::vector&lt;DWORD&gt;&amp; indices)&#xD;&#xA;      {&#xD;&#xA;      int numVertices = numVertRows*numVertCols;&#xD;&#xA;      int numCellRows = numVertRows-1;&#xD;&#xA;      int numCellCols = numVertCols-1;&#xD;&#xA;&#xD;&#xA;      int numTris = numCellRows*numCellCols*2;&#xD;&#xA;&#xD;&#xA;      float width = (float)numCellCols * dx;&#xD;&#xA;      float depth = (float)numCellRows * dz;&#xD;&#xA;&#xD;&#xA;      //===========================================&#xD;&#xA;      // Build vertices.&#xD;&#xA;&#xD;&#xA;      // We first build the grid geometry centered about the origin&#xD;&#xA;      // and on the xz-plane, row by row and in a top-down fashion.&#xD;&#xA;      // We then translate the grid vertices so that they are&#xD;&#xA;      // centered about the specified parameter 'center'.&#xD;&#xA;&#xD;&#xA;      verts.resize( numVertices );&#xD;&#xA;&#xD;&#xA;      // Offsets to translate grid from quadrant 4 to center of&#xD;&#xA;      // coordinate system.&#xD;&#xA;      float xOffset = -width * 0.5f;&#xD;&#xA;      float zOffset =  depth * 0.5f;&#xD;&#xA;&#xD;&#xA;      int k = 0;&#xD;&#xA;     for(float i = 0; i &lt; numVertRows; ++i)&#xD;&#xA;     &#xD;&#xA;          for(float j = 0; j &lt; numVertCols; ++j)&#xD;&#xA;          {&#xD;&#xA;                // Negate the depth coordinate to put in&#xD;&#xA;                // quadrant four.  Then offset to center about&#xD;&#xA;                // coordinate system.&#xD;&#xA;                verts[k].x =  j * dx + xOffset;&#xD;&#xA;                verts[k].z = -i * dz + zOffset;&#xD;&#xA;                verts[k].y =  0.0f;&#xD;&#xA;                // Translate so that the center of the grid is at the&#xD;&#xA;                // specified 'center' parameter.&#xD;&#xA;                D3DXMATRIX T;&#xD;&#xA;                D3DXMatrixTranslation(&amp;T,&#xD;&#xA;                center.x,&#xD;&#xA;                center.y,&#xD;&#xA;                center.z);&#xD;&#xA;                D3DXVec3TransformCoord(&amp;verts[k], &amp;verts[k], &amp;T);&#xD;&#xA;               ++k; // Next vertex&#xD;&#xA;          }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;On an only somewhat tangental note, I haven't understood your code- it's totally illegible. It's a fairly incredible feat that *you* can read it. &#xD;&#xA;&#xD;&#xA;No way can I decode 400 lines of redundant error checking (never heard of resource-managing classes?), HRESULTs, references to non-posted classes, variables declared about six million billion miles away from where they're used, global variables and *fixed function pipeline*, horrific Hungarian notation, some really crazy indentation, etc. I'd suggest that you learn some more about coding. Also, fixed-function pipeline (that is, FVF and stuff) is deader than a dodo- even phones have shaders these days." />
  <row Id="30094" PostHistoryTypeId="5" PostId="13528" RevisionGUID="9e751c8d-c249-4f7d-8cb7-4136d40f6dcd" CreationDate="2011-06-12T14:56:50.230" UserId="4662" Comment="added 695 characters in body; added 147 characters in body; deleted 94 characters in body" Text="Don't bother with the triangle strip - it's going to be much harder to reason about than a triangle list and the graphics driver can perform the conversion automatically anyway. It looks to me like your indices are off, at least- every triangle is drawn connected to vertex 0. &#xD;&#xA;&#xD;&#xA;What you should mainly consider is that you don't actually have X many triangles- you have the same triangle repeated X times. Generate one triangle or two triangles, then transform it using the D3DX mathematical library into the positions that you want. Here's some example code.&#xD;&#xA;&#xD;&#xA;    void GenTriGrid(int numVertRows, int numVertCols,&#xD;&#xA;        float dx, float dz,&#xD;&#xA;        const D3DXVECTOR3&amp; center,&#xD;&#xA;        std::vector&lt;D3DXVECTOR3&gt;&amp; verts,&#xD;&#xA;        std::vector&lt;DWORD&gt;&amp; indices)&#xD;&#xA;    {&#xD;&#xA;        int numVertices = numVertRows*numVertCols;&#xD;&#xA;        int numCellRows = numVertRows-1;&#xD;&#xA;        int numCellCols = numVertCols-1;&#xD;&#xA;    &#xD;&#xA;        int numTris = numCellRows*numCellCols*2;&#xD;&#xA;    &#xD;&#xA;        float width = (float)numCellCols * dx;&#xD;&#xA;        float depth = (float)numCellRows * dz;&#xD;&#xA;    &#xD;&#xA;        //===========================================&#xD;&#xA;        // Build vertices.&#xD;&#xA;    &#xD;&#xA;        // We first build the grid geometry centered about the origin&#xD;&#xA;        // and on the xz-plane, row by row and in a top-down fashion.&#xD;&#xA;        // We then translate the grid vertices so that they are&#xD;&#xA;        // centered about the specified parameter 'center'.&#xD;&#xA;    &#xD;&#xA;        verts.resize( numVertices );&#xD;&#xA;    &#xD;&#xA;        // Offsets to translate grid from quadrant 4 to center of&#xD;&#xA;        // coordinate system.&#xD;&#xA;        float xOffset = -width * 0.5f;&#xD;&#xA;        float zOffset =  depth * 0.5f;&#xD;&#xA;    &#xD;&#xA;        int k = 0;&#xD;&#xA;        for(float i = 0; i &lt; numVertRows; ++i) {&#xD;&#xA;    &#xD;&#xA;            for(float j = 0; j &lt; numVertCols; ++j)&#xD;&#xA;            {&#xD;&#xA;                // Negate the depth coordinate to put in&#xD;&#xA;                // quadrant four.  Then offset to center about&#xD;&#xA;                // coordinate system.&#xD;&#xA;                verts[k].x =  j * dx + xOffset;&#xD;&#xA;                verts[k].z = -i * dz + zOffset;&#xD;&#xA;                verts[k].y =  0.0f;&#xD;&#xA;                // Translate so that the center of the grid is at the&#xD;&#xA;                // specified 'center' parameter.&#xD;&#xA;                D3DXMATRIX T;&#xD;&#xA;                D3DXMatrixTranslation(&amp;T,&#xD;&#xA;                    center.x,&#xD;&#xA;                    center.y,&#xD;&#xA;                    center.z);&#xD;&#xA;                D3DXVec3TransformCoord(&amp;verts[k], &amp;verts[k], &amp;T);&#xD;&#xA;                ++k; // Next vertex&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        indices.resize(numTris * 3);&#xD;&#xA;    &#xD;&#xA;        // Generate indices for each quad.&#xD;&#xA;        int k = 0;&#xD;&#xA;        for(DWORD i = 0; i &lt; (DWORD)numCellRows; ++i)&#xD;&#xA;        {&#xD;&#xA;            for(DWORD j = 0; j &lt; (DWORD)numCellCols; ++j)&#xD;&#xA;            {&#xD;&#xA;                indices[k]     =   i   * numVertCols + j;&#xD;&#xA;                indices[k + 1] =   i   * numVertCols + j + 1;&#xD;&#xA;                indices[k + 2] = (i+l) * numVertCols + j;&#xD;&#xA;    &#xD;&#xA;                indices[k + 3] = (i+l) * numVertCols + j;&#xD;&#xA;                indices[k + 4] =   i   * numVertCols + j + 1;&#xD;&#xA;                indices[k + 5] = (i+l) * numVertCols + j + 1;&#xD;&#xA;    &#xD;&#xA;                // next quad&#xD;&#xA;                k += 6;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;On an only somewhat tangental note, I haven't understood your code- it's totally illegible. It's a fairly incredible feat that *you* can read it. &#xD;&#xA;&#xD;&#xA;No way can I decode 400 lines of redundant error checking (never heard of resource-managing classes?), HRESULTs, references to non-posted classes, variables declared about six million billion miles away from where they're used, global variables and *fixed function pipeline*, horrific Hungarian notation, some really crazy indentation, etc. I'd suggest that you learn some more about coding. Also, fixed-function pipeline (that is, FVF and stuff) is deader than a dodo- even phones have shaders these days." />
  <row Id="30095" PostHistoryTypeId="2" PostId="13529" RevisionGUID="db09e5b1-51c5-409e-9f97-b9e1c9188c98" CreationDate="2011-06-12T15:02:19.897" UserId="5343" Text="I was trying to create a framebuffer from an EAGLLayer that already had a framebuffer created from it. I don't know why OpenGL ES was saying the framebuffer was complete and not setting an error right away, but there you have it." />
  <row Id="30096" PostHistoryTypeId="5" PostId="13528" RevisionGUID="e75f7eb2-a837-47e3-a086-03103d6327a3" CreationDate="2011-06-12T15:07:19.990" UserId="4662" Comment="added 946 characters in body" Text="Don't bother with the triangle strip - it's going to be much harder to reason about than a triangle list and the graphics driver can perform the conversion automatically anyway. It looks to me like your indices are off, at least- every triangle is drawn connected to vertex 0. &#xD;&#xA;&#xD;&#xA;What you should mainly consider is that you don't actually have X many triangles- you have the same triangle repeated X times. Generate one triangle or two triangles, then transform it using the D3DX mathematical library into the positions that you want. Here's some example code.&#xD;&#xA;&#xD;&#xA;    void GenTriGrid(int numVertRows, int numVertCols,&#xD;&#xA;        float dx, float dz,&#xD;&#xA;        const D3DXVECTOR3&amp; center,&#xD;&#xA;        std::vector&lt;D3DXVECTOR3&gt;&amp; verts,&#xD;&#xA;        std::vector&lt;DWORD&gt;&amp; indices)&#xD;&#xA;    {&#xD;&#xA;        int numVertices = numVertRows*numVertCols;&#xD;&#xA;        int numCellRows = numVertRows-1;&#xD;&#xA;        int numCellCols = numVertCols-1;&#xD;&#xA;    &#xD;&#xA;        int numTris = numCellRows*numCellCols*2;&#xD;&#xA;    &#xD;&#xA;        float width = (float)numCellCols * dx;&#xD;&#xA;        float depth = (float)numCellRows * dz;&#xD;&#xA;    &#xD;&#xA;        //===========================================&#xD;&#xA;        // Build vertices.&#xD;&#xA;    &#xD;&#xA;        // We first build the grid geometry centered about the origin&#xD;&#xA;        // and on the xz-plane, row by row and in a top-down fashion.&#xD;&#xA;        // We then translate the grid vertices so that they are&#xD;&#xA;        // centered about the specified parameter 'center'.&#xD;&#xA;    &#xD;&#xA;        verts.resize( numVertices );&#xD;&#xA;    &#xD;&#xA;        // Offsets to translate grid from quadrant 4 to center of&#xD;&#xA;        // coordinate system.&#xD;&#xA;        float xOffset = -width * 0.5f;&#xD;&#xA;        float zOffset =  depth * 0.5f;&#xD;&#xA;    &#xD;&#xA;        int k = 0;&#xD;&#xA;        for(float i = 0; i &lt; numVertRows; ++i) {&#xD;&#xA;    &#xD;&#xA;            for(float j = 0; j &lt; numVertCols; ++j)&#xD;&#xA;            {&#xD;&#xA;                // Negate the depth coordinate to put in&#xD;&#xA;                // quadrant four.  Then offset to center about&#xD;&#xA;                // coordinate system.&#xD;&#xA;                verts[k].x =  j * dx + xOffset;&#xD;&#xA;                verts[k].z = -i * dz + zOffset;&#xD;&#xA;                verts[k].y =  0.0f;&#xD;&#xA;                // Translate so that the center of the grid is at the&#xD;&#xA;                // specified 'center' parameter.&#xD;&#xA;                D3DXMATRIX T;&#xD;&#xA;                D3DXMatrixTranslation(&amp;T,&#xD;&#xA;                    center.x,&#xD;&#xA;                    center.y,&#xD;&#xA;                    center.z);&#xD;&#xA;                D3DXVec3TransformCoord(&amp;verts[k], &amp;verts[k], &amp;T);&#xD;&#xA;                ++k; // Next vertex&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        indices.resize(numTris * 3);&#xD;&#xA;    &#xD;&#xA;        // Generate indices for each quad.&#xD;&#xA;        int k = 0;&#xD;&#xA;        for(DWORD i = 0; i &lt; (DWORD)numCellRows; ++i)&#xD;&#xA;        {&#xD;&#xA;            for(DWORD j = 0; j &lt; (DWORD)numCellCols; ++j)&#xD;&#xA;            {&#xD;&#xA;                indices[k]     =   i   * numVertCols + j;&#xD;&#xA;                indices[k + 1] =   i   * numVertCols + j + 1;&#xD;&#xA;                indices[k + 2] = (i+l) * numVertCols + j;&#xD;&#xA;    &#xD;&#xA;                indices[k + 3] = (i+l) * numVertCols + j;&#xD;&#xA;                indices[k + 4] =   i   * numVertCols + j + 1;&#xD;&#xA;                indices[k + 5] = (i+l) * numVertCols + j + 1;&#xD;&#xA;    &#xD;&#xA;                // next quad&#xD;&#xA;                k += 6;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;On an only somewhat tangental note, I haven't understood your code- it's totally illegible. It's a fairly incredible feat that *you* can read it. &#xD;&#xA;&#xD;&#xA;No way can I decode 400 lines of redundant error checking (never heard of resource-managing classes?), HRESULTs, references to non-posted classes, variables declared about six million billion miles away from where they're used, global variables and *fixed function pipeline*, horrific Hungarian notation, some really crazy indentation, etc.&#xD;&#xA;&#xD;&#xA;I'd suggest that you learn some more about coding. Here's an unfortunate lesson- the Windows API, DirectX, etc are all C APIs, designed 20 years ago (or more!) for inter-process communication and do not reflect at all good practice for in-application use.As such, it's actually really a bad idea to learn from their example. You should not return error codes- you should throw exceptions, and if you must return an error code, grab an enumeration for it- do not use a weak error code like HRESULT. Hungarian Notation is quite worthless in modern C++- the compiler will tell you the type and scope of any variable, at any time. CString is so bad, it's implementation is mandated to be illegal for the C++ Standard string class- which should always be preferred. You should not use new/delete directly, but rather favour the use of `std::vector` for dynamically allocated arrays- it's vastly safer and no less performant. These `Initialize` functions? That's what a constructor is for, buddy.&#xD;&#xA;&#xD;&#xA;Also, fixed-function pipeline (that is, FVF and stuff) is deader than a dodo- even phones have shaders these days." />
  <row Id="30097" PostHistoryTypeId="25" PostId="13521" RevisionGUID="6745b04d-7405-498c-adf1-00b6e0086d4a" CreationDate="2011-06-12T15:19:21.687" Comment="http://twitter.com/#!/StackGameDev/status/79930795975909377" />
  <row Id="30098" PostHistoryTypeId="5" PostId="13512" RevisionGUID="1d3a3109-7abe-4955-b166-2cf9eae5e729" CreationDate="2011-06-12T15:34:06.470" UserId="1839" Comment="Added tag fixed-point" Text="**Background:**&#xD;&#xA;&#xD;&#xA;I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate parts: one byte for the whole number and another for the fractional part.&#xD;&#xA;&#xD;&#xA;Gravity is added to the player's Y speed at a rate of 0.25/frame.&#xD;&#xA;&#xD;&#xA;When the player jumps, his Y speed is set to -4.64453125. The rest of the jump curve is left to gravity.&#xD;&#xA;&#xD;&#xA;As the player ascends his vertical velocity converges to 0 at a rate of 0.25/frame. When the player's velocity reaches a value less than zero, however, the velocity changes following a different pattern. Instead of decreasing steadily by 0.25 every frame, it follows this pattern: &#xD;&#xA;&#xD;&#xA;    [1.75, -0.25, -0.25, -0.25, 1.75, -0.25, -0.25, -0.25, 1.75, ...]&#xD;&#xA;&#xD;&#xA;It appears to have something to do with integer overflow.&#xD;&#xA;&#xD;&#xA;**Data:**&#xD;&#xA;&#xD;&#xA;Here is a dump of the data from the original. It's a table of the velocity. &#xD;&#xA;&#xD;&#xA;    Jump Curve&#xD;&#xA;&#xD;&#xA;    Y-Hi Y-Lo    Decimal        Change/Frame&#xD;&#xA;    4    165     4.64453125     ?&#xD;&#xA;    4    101     4.39453125     -0.25&#xD;&#xA;    4    37      4.14453125     -0.25&#xD;&#xA;    3    229     3.89453125     -0.25&#xD;&#xA;    3    165     3.64453125     -0.25&#xD;&#xA;    3    101     3.39453125     -0.25&#xD;&#xA;    3    37      3.14453125     -0.25&#xD;&#xA;    2    229     2.89453125     -0.25&#xD;&#xA;    2    165     2.64453125     -0.25&#xD;&#xA;    2    101     2.39453125     -0.25&#xD;&#xA;    2    37      2.14453125     -0.25&#xD;&#xA;    1    229     1.89453125     -0.25&#xD;&#xA;    1    165     1.64453125     -0.25&#xD;&#xA;    1    101     1.39453125     -0.25&#xD;&#xA;    1    37      1.14453125     -0.25&#xD;&#xA;    0    229     0.89453125     -0.25&#xD;&#xA;    0    165     0.64453125     -0.25&#xD;&#xA;    0    101     0.39453125     -0.25&#xD;&#xA;    0    37      0.14453125     -0.25&#xD;&#xA;    -1   229     -1.89453125    1.75&#xD;&#xA;    -1   165     -1.64453125    -0.25&#xD;&#xA;    -1   101     -1.39453125    -0.25&#xD;&#xA;    -1   37      -1.14453125    -0.25&#xD;&#xA;    -2   229     -2.89453125    1.75&#xD;&#xA;    -2   165     -2.64453125    -0.25&#xD;&#xA;    -2   101     -2.39453125    -0.25&#xD;&#xA;    -2   37      -2.14453125    -0.25&#xD;&#xA;    -3   229     -3.89453125    1.75&#xD;&#xA;    -3   165     -3.64453125    -0.25&#xD;&#xA;    -3   101     -3.39453125    -0.25&#xD;&#xA;    -3   37      -3.14453125    -0.25&#xD;&#xA;    -4   229     -4.89453125    1.75&#xD;&#xA;    -4   165     -4.64453125    -0.25&#xD;&#xA;    -4   101     -4.39453125    -0.25&#xD;&#xA;    -4   37      -4.14453125    -0.25&#xD;&#xA;    -5   229     -5.89453125    1.75&#xD;&#xA;    -5   165     -5.64453125    -0.25&#xD;&#xA;    -5   101     -5.39453125    -0.25&#xD;&#xA;    -5   37      -5.14453125    -0.25&#xD;&#xA;    -6   229     -6.89453125    1.75&#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;In my game I haven't been able to achieve this effect. When the velocity is less than zero it continues to decrease regularly by 0.25 rather than the pattern described above. Rather than storing the whole and fractional parts separately, I am storing them together in a single float.&#xD;&#xA;&#xD;&#xA;How can this effect be achieved?&#xD;&#xA;" />
  <row Id="30099" PostHistoryTypeId="6" PostId="13512" RevisionGUID="1d3a3109-7abe-4955-b166-2cf9eae5e729" CreationDate="2011-06-12T15:34:06.470" UserId="1839" Comment="Added tag fixed-point" Text="&lt;math&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;platformer&gt;&lt;fixed-point&gt;" />
  <row Id="30100" PostHistoryTypeId="24" PostId="13512" RevisionGUID="1d3a3109-7abe-4955-b166-2cf9eae5e729" CreationDate="2011-06-12T15:34:06.470" Comment="Proposed by 1839 approved by 974 edit id of 488" />
  <row Id="30101" PostHistoryTypeId="5" PostId="13522" RevisionGUID="ea411445-5d8a-4187-8836-0fe829c7752d" CreationDate="2011-06-12T17:03:01.293" UserId="6210" Comment="Fixed typo + case." Text="I recommend to use XNA 4.0.&#xD;&#xA;&#xD;&#xA;Sure you can probably do everything with 3.1 what you can do with 4.0, but it has advanced quite a bit.&#xD;&#xA;Additionally to your references you might also want to take a look at Shawn Hargreaves' blog, for example at this post: [Breaking Changes in XNA Game Studio 4.0][1].&#xD;&#xA;[1]: http://blogs.msdn.com/b/shawnhar/archive/2010/03/16/breaking-changes-in-xna-game-studio-4-0.aspx&#xD;&#xA;Or basically you can just check out the months March, April and May 2010 in his blog, they are full of XNA 4.0 changes.&#xD;&#xA;&#xD;&#xA;Also keep in mind that with 3.1 you will be stuck with old technology. Eventually you will want to upgrade to XNA 5/6 for DX11 support or whatever. Depending on how large/complex your program is by then, it may take some time to upgrade it to 4.0 as you have to make several changes." />
  <row Id="30102" PostHistoryTypeId="24" PostId="13522" RevisionGUID="ea411445-5d8a-4187-8836-0fe829c7752d" CreationDate="2011-06-12T17:03:01.293" Comment="Proposed by 6210 approved by 14 edit id of 489" />
  <row Id="30103" PostHistoryTypeId="5" PostId="13521" RevisionGUID="97e1a1da-5513-4c0b-93c1-174c797926f1" CreationDate="2011-06-12T17:03:26.860" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How to get PS3/Xbox 360 experience without having access to Dev kits?](http://gamedev.stackexchange.com/questions/1460/how-to-get-ps3-xbox-360-experience-without-having-access-to-dev-kits)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Is there a way to achieve programming experience with PS3 or Xbox360 systems without the development kit that only are selling to great videogame companies ?&#xD;&#xA;&#xD;&#xA;There are a lot of game companies that request experience with these systems and I don't know how to achieve this.&#xD;&#xA;" />
  <row Id="30104" PostHistoryTypeId="10" PostId="13521" RevisionGUID="e61b6e8d-9644-4a0b-a53b-9a1032bf22c8" CreationDate="2011-06-12T17:03:26.283" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:5899,&quot;DisplayName&quot;:&quot;momboco&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="30105" PostHistoryTypeId="2" PostId="13530" RevisionGUID="86d435cf-ebfe-400b-8fdb-88ff9288d89a" CreationDate="2011-06-12T17:59:29.290" UserId="7173" Text="Take a look at the mangos project to get started in WoW developement&#xD;&#xA;&#xD;&#xA;http://getmangos.com/&#xD;&#xA;" />
  <row Id="30106" PostHistoryTypeId="5" PostId="13513" RevisionGUID="dd85c568-9369-4d6f-b35d-04c89bdb44f1" CreationDate="2011-06-12T18:10:47.003" UserId="1839" Comment="deleted 33 characters in body" Text="    one byte for the whole number and another for the fractional part&#xD;&#xA;&#xD;&#xA;Basically you just have to subtract 64 from `low` in order to subtract 0.25, because an 8 bit value can have 256 values, so 256 * 0.25 = 64  When there is an underflow in `low` also subtract 1 from `high`.&#xD;&#xA;&#xD;&#xA;**Disclaimer:** This code is intentionally wrong when it comes to negative numbers, it is supposed to model the numerical anomalies described in the question. For comparison reasons the implementation of a proper negative numbers handling fixed point class can be found at the bottom of this answer.&#xD;&#xA;&#xD;&#xA;    struct velocity&#xD;&#xA;    {&#xD;&#xA;        char high;&#xD;&#xA;        unsigned char low;&#xD;&#xA;&#xD;&#xA;        // fall -0.25&#xD;&#xA;        void fall()&#xD;&#xA;        {&#xD;&#xA;            if(low &lt; 64) --high;&#xD;&#xA;            low -= 64;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert to a float&#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            float ret = high;&#xD;&#xA;            float frac = (float)low / 256.0f;&#xD;&#xA;            if(high &gt;= 0) ret += frac;&#xD;&#xA;            else ret -= frac;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // convert from float&#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            high = (char)f;&#xD;&#xA;            float frac = f - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    velocity v;&#xD;&#xA;    v.high = 4;&#xD;&#xA;    v.low = 165;    &#xD;&#xA;    for(int i = 0; i &lt; 30; ++i)&#xD;&#xA;    {&#xD;&#xA;        printf(&quot;%2d     %3d   %f\n&quot;, v.high, v.low, v.toFloat());&#xD;&#xA;        v.fall();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**EDIT**: I also added the conversion to float and from float and the output&#xD;&#xA;&#xD;&#xA;The generated output is the same as in your table:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;     4     165   4.644531&#xD;&#xA;     4     101   4.394531&#xD;&#xA;     4      37   4.144531&#xD;&#xA;     3     229   3.894531&#xD;&#xA;     3     165   3.644531&#xD;&#xA;     3     101   3.394531&#xD;&#xA;     3      37   3.144531&#xD;&#xA;     2     229   2.894531&#xD;&#xA;     2     165   2.644531&#xD;&#xA;     2     101   2.394531&#xD;&#xA;     2      37   2.144531&#xD;&#xA;     1     229   1.894531&#xD;&#xA;     1     165   1.644531&#xD;&#xA;     1     101   1.394531&#xD;&#xA;     1      37   1.144531&#xD;&#xA;     0     229   0.894531&#xD;&#xA;     0     165   0.644531&#xD;&#xA;     0     101   0.394531&#xD;&#xA;     0      37   0.144531&#xD;&#xA;    -1     229   -1.894531&#xD;&#xA;    -1     165   -1.644531&#xD;&#xA;    -1     101   -1.394531&#xD;&#xA;    -1      37   -1.144531&#xD;&#xA;    -2     229   -2.894531&#xD;&#xA;    -2     165   -2.644531&#xD;&#xA;    -2     101   -2.394531&#xD;&#xA;    -2      37   -2.144531&#xD;&#xA;    -3     229   -3.894531&#xD;&#xA;    -3     165   -3.644531&#xD;&#xA;    -3     101   -3.394531&#xD;&#xA;    -3      37   -3.144531&#xD;&#xA;    -4     229   -4.894531&#xD;&#xA;    -4     165   -4.644531&#xD;&#xA;    -4     101   -4.394531&#xD;&#xA;    -4      37   -4.144531&#xD;&#xA;    -5     229   -5.894531&#xD;&#xA;    -5     165   -5.644531&#xD;&#xA;    -5     101   -5.394531&#xD;&#xA;    -5      37   -5.144531&#xD;&#xA;    -6     229   -6.894531&#xD;&#xA;&#xD;&#xA;In contrast this fixed point class handles the negative numbers properly:&#xD;&#xA;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;&#xD;&#xA;    struct fixed_point&#xD;&#xA;    {&#xD;&#xA;        union&#xD;&#xA;        {&#xD;&#xA;            struct&#xD;&#xA;            {&#xD;&#xA;                unsigned char low;&#xD;&#xA;                signed char high;&#xD;&#xA;            };&#xD;&#xA;            short s;&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        float toFloat() const&#xD;&#xA;        {&#xD;&#xA;            fixed_point tmp;&#xD;&#xA;            if(high &lt; 0) tmp.s = ~s;&#xD;&#xA;            else tmp.s = s;&#xD;&#xA;            &#xD;&#xA;            float ret = tmp.high;&#xD;&#xA;            float frac = (float)tmp.low / 256.0f;&#xD;&#xA;            ret += frac;&#xD;&#xA;            if(high &lt; 0) ret = 0 - ret;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void fromFloat(float f)&#xD;&#xA;        {&#xD;&#xA;            float tmp;&#xD;&#xA;            if(f &lt; 0.0f) tmp = -f;&#xD;&#xA;            else tmp = f;&#xD;&#xA;    &#xD;&#xA;            high = (char)tmp;&#xD;&#xA;            float frac = tmp - high;&#xD;&#xA;            low = (unsigned char)(frac * 256.0f);&#xD;&#xA;    &#xD;&#xA;            if(f &lt; 0.0f) s = ~s;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        fixed_point operator+(const fixed_point &amp;fp) const&#xD;&#xA;        {&#xD;&#xA;            fixed_point ret;&#xD;&#xA;            ret.s = s + fp.s;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fixed_point operator-(const fixed_point &amp;fp) const&#xD;&#xA;        {&#xD;&#xA;            fixed_point ret;&#xD;&#xA;            ret.s = s - fp.s;&#xD;&#xA;            return ret;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void print(const char *msg) const&#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; msg &lt;&lt; &quot;:&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; std::hex &lt;&lt; std::uppercase;&#xD;&#xA;            // cout'ing the hex value for a char is kind of a pain ..&#xD;&#xA;            unsigned int _high = 0;&#xD;&#xA;            memcpy(&amp;_high, &amp;high, 1);&#xD;&#xA;            std::cout &lt;&lt; &quot;  high : 0x&quot; &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; _high &lt;&lt; std::endl;&#xD;&#xA;            unsigned int _low = 0;&#xD;&#xA;            memcpy(&amp;_low, &amp;low, 1);&#xD;&#xA;            std::cout &lt;&lt; &quot;  low  : 0x&quot; &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; _low &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;  all  : 0x&quot; &lt;&lt; std::setfill('0') &lt;&lt; std::setw(4) &lt;&lt; s &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;  float: &quot; &lt;&lt; toFloat() &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;" />
  <row Id="30107" PostHistoryTypeId="25" PostId="13518" RevisionGUID="17f026ab-16a1-4697-af2b-b7adccbada4c" CreationDate="2011-06-12T18:20:20.593" Comment="http://twitter.com/#!/StackGameDev/status/79976341558132736" />
  <row Id="30108" PostHistoryTypeId="2" PostId="13531" RevisionGUID="3e77cdab-ad93-4f1f-83a5-2b6d4b449768" CreationDate="2011-06-12T18:38:39.210" UserId="5019" Text="I'm looking at developing a puzzle game, it might be like tetris or something similar, perhaps more like bejewelled in that the player will select objects with the mouse to manipulate them. &#xD;&#xA;&#xD;&#xA;I've been studying java part-time in college for the past year, really beginner stuff, but I've decided to build a game over the summer to keep the brain active :-D &#xD;&#xA;&#xD;&#xA;So far I've animated some primitive shapes moving around the screen using the timer from the utilities package. This is all good, they're behaving the way I want. &#xD;&#xA;So now I've decided to try manipulate the shapes with the mouse. Just some really simple stuff, maybe change the colour of an object when I click on it. &#xD;&#xA;&#xD;&#xA;To test the mouse functions I've successfully completed the MouseEvent and MouseListener tutorials on [The New Boston][1]. &#xD;&#xA;However, I can't get these events working in my code. I suspect I'm going to have to re-write my classes.&#xD;&#xA;&#xD;&#xA;Will I need separate threads within the game, for example, one thread to animate the objects and another to listen for and handle mouse events. &#xD;&#xA;&#xD;&#xA;My understanding is that I should implement runnable on my classes when using threads in Java games. &#xD;&#xA;Am I thinking on the right lines? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.thenewboston.com/%22The%20New%20Boston%22" />
  <row Id="30109" PostHistoryTypeId="1" PostId="13531" RevisionGUID="3e77cdab-ad93-4f1f-83a5-2b6d4b449768" CreationDate="2011-06-12T18:38:39.210" UserId="5019" Text="Tetris style game in java (for now) will I need to use threads?" />
  <row Id="30110" PostHistoryTypeId="3" PostId="13531" RevisionGUID="3e77cdab-ad93-4f1f-83a5-2b6d4b449768" CreationDate="2011-06-12T18:38:39.210" UserId="5019" Text="&lt;game-design&gt;&lt;java&gt;&lt;multithreading&gt;" />
  <row Id="30111" PostHistoryTypeId="2" PostId="13532" RevisionGUID="d3157281-64d0-4087-9cdf-11d36ea49a67" CreationDate="2011-06-12T18:44:57.630" UserId="7057" Text="I'm wondering if it is possible to generate a dynamic spherical environment map using a single frame render using a pincushion Curvilinear Perspective Projection Matrix (phew that's a mouthful). &#xD;&#xA;&#xD;&#xA;I've been researching this for a few days now and the closest thing I can find is a Curvilinear Perspective but it isn't a commonly used projection matrix so there isn't any help I was easily able to google and I still don't know if it supports a full circle FOV.&#xD;&#xA;&#xD;&#xA;**Why?** &#xD;&#xA;&#xD;&#xA;The standard perspective matrix but it begins to look very strange and distorted above 180 degrees vertical FOV and completely fails to render when approaching 360 degrees. So instead most games render the scene 6 times using 90 degree FOV facing the faces of a cube.&#xD;&#xA;&#xD;&#xA;Rendering the scene 6 times seems like a waste if it might be possible to simply imagine a camera that has a 360 degree view across both axis and then render that to a spherical environment map.   &#xD;&#xA;&#xD;&#xA;" />
  <row Id="30112" PostHistoryTypeId="1" PostId="13532" RevisionGUID="d3157281-64d0-4087-9cdf-11d36ea49a67" CreationDate="2011-06-12T18:44:57.630" UserId="7057" Text="Dynamic enviroment map using pincushion Curvilinear Perspective Projection possible?" />
  <row Id="30113" PostHistoryTypeId="3" PostId="13532" RevisionGUID="d3157281-64d0-4087-9cdf-11d36ea49a67" CreationDate="2011-06-12T18:44:57.630" UserId="7057" Text="&lt;matrix&gt;&lt;projection&gt;&lt;cubemap&gt;" />
  <row Id="30114" PostHistoryTypeId="2" PostId="13533" RevisionGUID="6d0aa162-8dc2-4680-8e21-f189b8365c2e" CreationDate="2011-06-12T19:38:16.123" UserId="240" Text="Minecraft is pretty quick, even on my 2-core.  Java does not seem to be a limiting factor, here, although there is a bit of server lag.  Local games seem to do better, so I'm going to assume some inefficiencies, there.&#xD;&#xA;&#xD;&#xA;As to your question, Notch (Minecraft author) has blogged at some length about the technology.  In particular, the world is stored in &quot;clumps&quot; (you sometimes see these, especially when one is missing as the world hasn't filled in, yet.), so the first optimization is to decide if a clump can be seen or not.&#xD;&#xA;&#xD;&#xA;Within a clump, as you have guessed, the app has to decide if a block can be seen or not, based on whether or not is is obscured by other blocks.&#xD;&#xA;&#xD;&#xA;Note, too, that there are block FACES, which can be assumed not-seen, by virtue of either being obscured (i.e., another block covers the face) or by which direction the camera is pointing (if the camera faces North, you can't see the North face of ANY blocks!)&#xD;&#xA;&#xD;&#xA;Common techniques would also include not keeping separate block objects but, rather, a &quot;clump&quot; of block types, with a single prototype block for each one, along with some minimal set of data to describe how this block may be custom.  For example, there aren't any custom granite blocks (that I know), but water has data to tell how deep it is along each side-face, from which one can calculate its direction of flow.&#xD;&#xA;&#xD;&#xA;Your question isn't clear if you're looking to optimize render speed, data size or what.   Clarification there would be helpful.&#xD;&#xA;" />
  <row Id="30115" PostHistoryTypeId="2" PostId="13534" RevisionGUID="bd1213c9-2c5c-47e7-9d36-7dbb96b52302" CreationDate="2011-06-12T19:56:48.070" UserId="5224" Text="For simple games you won't need separate threads. Threads are usually used in games to calculate things that take longer than 1 frame.&#xD;&#xA;&#xD;&#xA;For example: in your puzzle game it takes 5ms to update your logic, and 10ms to draw everything to screen. This gives you a frame time of 15ms, which gives you about 60 frames per second. This is perfect :).&#xD;&#xA;&#xD;&#xA;Now for some reason you sometimes need to do an expensive path-finding algorithm that takes between 10 and 50ms to complete. To not have your frame rate drop to 20 frames per second you calculate the path finding in a separate thread so that your game just runs at 60 frames per second, but the path finding data is only available a few frames after it was requested. (You just have your avatar stand still until the data is available for example, 20ms wont be noticed).&#xD;&#xA;&#xD;&#xA;In some applications input handling is done in separate threads, but again this is only relevant if there are other tasks that could cause your game not reading input fast enough. As long as your total frame time is lower than 16 ms or something like that then you won't need threads. " />
  <row Id="30116" PostHistoryTypeId="2" PostId="13535" RevisionGUID="c10587d1-3d5e-44c2-9f92-11d3af21c6ad" CreationDate="2011-06-12T20:18:26.137" UserId="7967" Text="i just started programming a couple days ago. ive picked up on it pretty easy enough, but i still have a lot to learn. i was wondering if someone could help me out with making a system for random enemy encounters. with how many monsters appear and their stats.drop rates,enemy commands, etc. i have a program with a char on a bitmap to test things on, so if anyone could help me, it would be greatly appreciated. thanks!" />
  <row Id="30117" PostHistoryTypeId="1" PostId="13535" RevisionGUID="c10587d1-3d5e-44c2-9f92-11d3af21c6ad" CreationDate="2011-06-12T20:18:26.137" UserId="7967" Text="creating random monster encounters for 2d rpg. im using visual basics 2010" />
  <row Id="30118" PostHistoryTypeId="3" PostId="13535" RevisionGUID="c10587d1-3d5e-44c2-9f92-11d3af21c6ad" CreationDate="2011-06-12T20:18:26.137" UserId="7967" Text="&lt;programming&gt;" />
  <row Id="30119" PostHistoryTypeId="6" PostId="13531" RevisionGUID="a791818c-7408-4016-9657-56e3585410bf" CreationDate="2011-06-12T20:25:18.533" UserId="51" Comment="edited tags" Text="&lt;java&gt;&lt;multithreading&gt;" />
  <row Id="30120" PostHistoryTypeId="25" PostId="13531" RevisionGUID="5529449c-a0f5-4bbe-a4d2-6b8431f50068" CreationDate="2011-06-12T21:20:21.013" Comment="http://twitter.com/#!/StackGameDev/status/80021641723248640" />
  <row Id="30121" PostHistoryTypeId="2" PostId="13536" RevisionGUID="862071b3-d444-4fd8-b4e6-19634466bb81" CreationDate="2011-06-12T22:19:23.580" UserId="3874" Text="My game  will be made up of objects. Essentially the level editor will give me a bunch of objects to choose from and I can drag them in and thus a level is made. The objects could have animation in which case they are responsible for knowing which frame they are on. They also know which layer they are on.&#xD;&#xA;&#xD;&#xA;So then I can have these:&#xD;&#xA;&#xD;&#xA;    Animated non-movable objects&#xD;&#xA;    Unanimated non-movable objects&#xD;&#xA;    Animated movable objects&#xD;&#xA;    Unanimated movable objects&#xD;&#xA;&#xD;&#xA;So first I was thinking of, when the level starts, build a quadtree for all non-movable objects.&#xD;&#xA;&#xD;&#xA;This way I can easily avoid rendering ones which are not in view.&#xD;&#xA;&#xD;&#xA;Then from there I can do bounding box check on dynamic objects (or maybe if I add something like Box2D it can do it).&#xD;&#xA;&#xD;&#xA;But then comes the rendering.&#xD;&#xA;&#xD;&#xA;At first I was thinking of each object rendering itself, but then I cannot do atlasing.&#xD;&#xA;&#xD;&#xA;I'd like to do atlasing. I was thinking that animated objects can just use their own frame sheet. But objects which are not animated should use atlasing.&#xD;&#xA;&#xD;&#xA;I know this can be categorized as premature optimization, but I don't want to eventually find out that it is horribly slow.&#xD;&#xA;&#xD;&#xA;Any design suggestions / comments would be welcome. Does it seem like a good idea to try to atlas in the sort of game I'm making, which is a platformer that is not tile based.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="30122" PostHistoryTypeId="1" PostId="13536" RevisionGUID="862071b3-d444-4fd8-b4e6-19634466bb81" CreationDate="2011-06-12T22:19:23.580" UserId="3874" Text="Advice on rendering a 2D scene" />
  <row Id="30123" PostHistoryTypeId="3" PostId="13536" RevisionGUID="862071b3-d444-4fd8-b4e6-19634466bb81" CreationDate="2011-06-12T22:19:23.580" UserId="3874" Text="&lt;opengl&gt;&lt;c++&gt;&lt;game-design&gt;&lt;2d&gt;" />
  <row Id="30124" PostHistoryTypeId="2" PostId="13537" RevisionGUID="92f9d1e7-c999-426f-88b8-9880d405d263" CreationDate="2011-06-12T22:20:53.487" UserId="3505" Text="That is the art of programming, figure what you want and make a program that does it. You haven't yet figured what you want. You have an idea on the level of: &quot;Sorta like Diablo&quot;, but you are not able to describe in sufficient detail what that actually means, and thus you can't convert it to code.&#xD;&#xA;&#xD;&#xA;I think you should skip the random part for now, it's a whole host of problems and tricky decisions that you shouldn't worry about now. For someone a few days green an RPG is plenty overambitious on it's own.&#xD;&#xA;&#xD;&#xA;What projects have you by the way done so far?" />
  <row Id="30125" PostHistoryTypeId="2" PostId="13538" RevisionGUID="778a05e4-0626-4e58-bf0b-9dac11bf8782" CreationDate="2011-06-12T22:28:38.320" UserId="7661" Text="To the programmer 3.1 and 4 are nearly the same.  The only changes are creating a device and spritebatch.  And where the Content Manager is, its moved into its own project inside the solution.  Everything else is pretty much the same.  These changes are only a few lines of code different.  Behind the scenes though its using different directx api calls.&#xD;&#xA;&#xD;&#xA;So to answer you question you are not shooting yourself in the foot at all.  Using XNA has not changed that much from the programmers point of view from even the 1.0 versions.  &#xD;&#xA;&#xD;&#xA;There are lots of cheat sheets on the net to look at for quick answers on converting 3.1 - 4.0 like this one http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/ .&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30126" PostHistoryTypeId="5" PostId="13538" RevisionGUID="2d102e0f-60e7-40cf-98b7-c9967a3caca7" CreationDate="2011-06-12T22:34:59.527" UserId="7661" Comment="added 1 characters in body" Text="To the programmer 3.1 and 4 are nearly the same.  The major changes are creating a device and spritebatch.  And where the Content Manager is, its moved into its own project inside the solution.  Everything else is pretty much the same.  These changes are only a few lines of code different.  Behind the scenes though its using different directx api calls.&#xD;&#xA;&#xD;&#xA;So to answer you question you are not shooting yourself in the foot at all.  Using XNA has not changed that much from the programmers point of view from even the 1.0 versions.  &#xD;&#xA;&#xD;&#xA;There are lots of cheat sheets on the net to look at for quick answers on converting 3.1 - 4.0 like this one http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/ .&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30127" PostHistoryTypeId="2" PostId="13539" RevisionGUID="83c98efe-9931-4cb0-af8c-04b7ea23a590" CreationDate="2011-06-12T23:40:36.320" UserId="7967" Text="well i just started programming a few days ago. ive messed around and made a few programs. calculator, web browser, basic char movement on bitmap, and a bitmap editor. and i wanted to see if i could make a basic 2d rpg. maybe only an hour or 2 long game. but i dont know all i would have to do. im still learning, but i learn fairly quickly. so if anyone knows a good guide or anything that might help, suggestion/advice, it would be greatly appreciated. oh and im using visual basic 2010 express. thanks in advance." />
  <row Id="30128" PostHistoryTypeId="1" PostId="13539" RevisionGUID="83c98efe-9931-4cb0-af8c-04b7ea23a590" CreationDate="2011-06-12T23:40:36.320" UserId="7967" Text="does anyone know a good guide/tutorial on 2d rpg for visual basics?" />
  <row Id="30129" PostHistoryTypeId="3" PostId="13539" RevisionGUID="83c98efe-9931-4cb0-af8c-04b7ea23a590" CreationDate="2011-06-12T23:40:36.320" UserId="7967" Text="&lt;tutorials&gt;" />
  <row Id="30130" PostHistoryTypeId="2" PostId="13540" RevisionGUID="3f59429b-ea9b-4aee-8e77-7b950e3d6931" CreationDate="2011-06-13T00:19:12.237" UserId="962" Text="Make a rough guess on how many objects you will need in your game. Put 10 times that amount in the engine.&#xD;&#xA;&#xD;&#xA;If it doesn't run slow you are fine. If it runs slow, you might need to optomize, or you might still be fine.&#xD;&#xA;&#xD;&#xA;I would be more concerned with the logic having to iterate through a lot of objects than the a 2d render being slow.&#xD;&#xA;&#xD;&#xA;The only kind of culling that will be worth rendering is culling anything that is outside of the screen." />
  <row Id="30131" PostHistoryTypeId="25" PostId="13283" RevisionGUID="57a53076-df90-46d7-b28f-4bf8adcdfd9e" CreationDate="2011-06-13T00:20:21.870" Comment="http://twitter.com/#!/StackGameDev/status/80066942148411392" />
  <row Id="30132" PostHistoryTypeId="2" PostId="13541" RevisionGUID="ff188db7-505a-4045-8470-1de2c97d84da" CreationDate="2011-06-13T01:42:12.110" UserId="7968" Text="I don't have any budget to buy commercial licenses but the libraries I use offer non-commercial free licenses.&#xD;&#xA;&#xD;&#xA;How far can I go in regard to monetizing my game without it being considered commercial ? Donations? Do ads count? Optional items purchase?&#xD;&#xA;&#xD;&#xA;For example, fmod states in their free license: &#xD;&#xA;&gt;This license cannot be used for commercial services, where the executable containing fmod is not sold, but the data is.&#xD;&#xA;&#xD;&#xA;What if only some data (optional) is sold?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="30133" PostHistoryTypeId="1" PostId="13541" RevisionGUID="ff188db7-505a-4045-8470-1de2c97d84da" CreationDate="2011-06-13T01:42:12.110" UserId="7968" Text="What revenue models can I use for a non-commercial game" />
  <row Id="30134" PostHistoryTypeId="3" PostId="13541" RevisionGUID="ff188db7-505a-4045-8470-1de2c97d84da" CreationDate="2011-06-13T01:42:12.110" UserId="7968" Text="&lt;legal&gt;&lt;monetization&gt;&lt;licensing&gt;&lt;revenue&gt;" />
  <row Id="30135" PostHistoryTypeId="2" PostId="13542" RevisionGUID="d341979e-c670-4d4d-8fe7-1b780087fcb5" CreationDate="2011-06-13T02:20:05.043" UserId="7945" Text="Rapid Prototyping is a great way to develop new ideas and test which ones are actually fun. It's often used in the early stages of design and is relatively inexpensive compared to implementing a large part of a game and realizing it's no good.&#xD;&#xA;&#xD;&#xA;Many smaller teams also use Agile Development Methods such as [SCRUM][1] &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scrum_%28development%29" />
  <row Id="30136" PostHistoryTypeId="2" PostId="13543" RevisionGUID="f965e438-d166-4e43-b312-2f9490620122" CreationDate="2011-06-13T02:24:45.837" UserId="7057" Text="As a former developer for MaNGOS and project founder for ScriptDev2 I would say your objective is not realistic. &#xD;&#xA;&#xD;&#xA;The basics to make the game happy are actually pretty complex. If you tried to do this without pulling code from an existing project you will be asking questions about specific op codes for months. World of Warcraft seems like a simple game but there are a lot of minute details. Look at MaNGOS' authentication for a small example.&#xD;&#xA;&#xD;&#xA;And then you need to think about why you want to rewrite an existing emulator? I'd assume you want specific functionality but without all of the extras. In that case you might be better off just tearing down an existing system.&#xD;&#xA;&#xD;&#xA;If you want to write a new emulator that can handle 5,000 players at once I'd urge you to rethink why you are doing this. I would also highly suggest looking for another source of self-fulfillment. You'll probably be happier in the long term working on something that you can call your own and/or possibly sell." />
  <row Id="30137" PostHistoryTypeId="2" PostId="13544" RevisionGUID="626c7247-8d59-4234-b0f6-3e5325f3b0ab" CreationDate="2011-06-13T02:32:06.793" UserId="7057" Text="For a modern 2d game I would really look at Aquaria. &#xD;&#xA;http://www.bit-blot.com/aquaria/&#xD;&#xA;&#xD;&#xA;They have some pretty modern principles they apply to a fairly normal 2d engine.&#xD;&#xA;Their basic idea is just massive stacking of objects on different layers. Take a look at this video by the guys from Wolfire analyzing technical details.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=1BpRsjF7QTM&amp;feature=channel_video_title&#xD;&#xA;&#xD;&#xA;I'd assume that when in non-editing mode static objects are combined into larger objects which are stored in a single surface but that is just a guess by me." />
  <row Id="30138" PostHistoryTypeId="2" PostId="13545" RevisionGUID="e2985a49-d683-4da2-a7ab-0799ca21c106" CreationDate="2011-06-13T02:35:14.913" UserId="7779" Text="If you're monetizing your game, via ads or in-game purchases, it will be considered commercial. I'd suggest using a library that allows commercial usage, there are plenty of free open-source libraries that fit the bill." />
  <row Id="30139" PostHistoryTypeId="2" PostId="13546" RevisionGUID="0ed4d259-e25b-4421-be1b-0f9d6f749ae2" CreationDate="2011-06-13T02:35:40.563" UserId="7630" Text="[com·mer·cial   [kuh-mur-shuhl]&#xD;&#xA;–adjective&#xD;&#xA;    1. of, pertaining to, or characteristic of commerce.&#xD;&#xA;    2. engaged in commerce.&#xD;&#xA;    3. **prepared, done, or acting with sole or chief emphasis on salability, profit, or success**: a commercial product; ][1]&#xD;&#xA;&#xD;&#xA;I am not a lawyer, and the comment that Chewy made about consulting a professional stands as very reasonable.&#xD;&#xA;&#xD;&#xA;Since you asked here though, my opinion is that if you use the software on someone's behalf, and they compensate you to do so by any means then you have acted commercially.&#xD;&#xA;&#xD;&#xA;For this discussion, I'd suggest that sales, ad revenue, donations, software in trade or any promises of future considerations all constitute acting commercially.&#xD;&#xA;&#xD;&#xA;If you're looking to take a project out of the basement and start generating income from it, then the authors who have aided you by writing libraries deserve to be compensated.  If you've developed this program with the intention of selling it, then the clock's been ticking on this day.&#xD;&#xA;  [1]: http://dictionary.reference.com/browse/commercial" />
  <row Id="30140" PostHistoryTypeId="2" PostId="13547" RevisionGUID="bc94a795-5f38-41e4-8583-de410dedaab6" CreationDate="2011-06-13T02:59:17.037" UserId="7728" Text="From http://www.fmod.org/index.php/sales :&#xD;&#xA;&#xD;&#xA;&gt; If your title is not intended for&#xD;&#xA;&gt; commercial gain and does not include&#xD;&#xA;&gt; the FMOD library for resale, license&#xD;&#xA;&gt; or other commercial distribution, then&#xD;&#xA;&gt; use of FMOD is free.&#xD;&#xA;&#xD;&#xA;If you are pursuing revenue models, then your title is clearly intended for commercial gain, and you do not meet the criteria to use the FMOD non-commercial license.  You would need to purchase either the Commercial or the Casual licenses.&#xD;&#xA;&#xD;&#xA;In general, you should contact the copyright holder over these types of conditionally-free licenses, to verify that your planned usage is okay with them.  But in this specific case, it seems pretty clear to me that what you're trying to do is not allowed by FMOD's non-commercial license terms.&#xD;&#xA;&#xD;&#xA;But you should really be asking them, not us.  FMOD has a team which handles licensing terms and interactions with developers.  You can reach them at sales@fmod.org." />
  <row Id="30141" PostHistoryTypeId="25" PostId="13541" RevisionGUID="9010d349-1ec0-4fb4-a73a-01c351dcf373" CreationDate="2011-06-13T03:20:22.300" Comment="http://twitter.com/#!/StackGameDev/status/80112243173367808" />
  <row Id="30142" PostHistoryTypeId="2" PostId="13548" RevisionGUID="9e02c6dc-1c3e-4354-a913-8035e81579aa" CreationDate="2011-06-13T04:26:26.850" UserId="7969" Text="I come from a .NET background and I've done a few simple things in Silverlight.  I'd love to adopt that and make my site and games Silverlight only; but I hear it has a fairly low install base.  &#xD;&#xA;&#xD;&#xA;I know Flash has a much higher install base.&#xD;&#xA;&#xD;&#xA;I also know that everyone seems to say that HTML5 is the way things should be heading; but there is still a bit of a bumpy road ahead.  &#xD;&#xA;&#xD;&#xA;Short of maintaining three code-bases; are there any cool tools that would allow me to write once and end up with three versions of the same game?  I'm guessing the answer is 'No' but from a theoretical standpoint, I can't think of any reason why it wouldn't be possible.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30143" PostHistoryTypeId="1" PostId="13548" RevisionGUID="9e02c6dc-1c3e-4354-a913-8035e81579aa" CreationDate="2011-06-13T04:26:26.850" UserId="7969" Text="Getting Started With Web-based Games....Can I Reasonably Target Flash And Silverlight And HTML5?" />
  <row Id="30144" PostHistoryTypeId="3" PostId="13548" RevisionGUID="9e02c6dc-1c3e-4354-a913-8035e81579aa" CreationDate="2011-06-13T04:26:26.850" UserId="7969" Text="&lt;c#&gt;&lt;flash&gt;&lt;html5&gt;&lt;cross-platform&gt;&lt;silverlight&gt;" />
  <row Id="30145" PostHistoryTypeId="5" PostId="13518" RevisionGUID="5e5de567-8454-47c9-a5b7-ed6d12c0fcdd" CreationDate="2011-06-13T04:34:01.980" UserId="7457" Comment="added 259 characters in body" Text="I am starting out learning XNA and its going smoothly. However I wonder if I am shooting myself in the foot by learning 3.1 not 4.0?&#xD;&#xA;&#xD;&#xA;I am also aware Microsoft obviously has a conflict on interest in the matter: the more times we update the more copies of Visual Studio they sell. So one has to read between the lines of the &quot;MASSIVE NEW FEATURES UPGRADE NOW&quot; type blogs from MS employees.&#xD;&#xA;&#xD;&#xA;I am aware of whats new: http://msdn.microsoft.com/en-us/library/bb417503.aspx, and that mostly seems to be phone, interfaces and video features - which I am not so interested in - I am more doing the core 3D stuff.&#xD;&#xA;&#xD;&#xA;The sticking point is: I have Visual Studio 2008 professional already and do not want to get VS 2010 if there is little difference in the game programming in 4.0.&#xD;&#xA;&#xD;&#xA;Has the world moved on? Is what I am learning in 3.1 going to be come redundant?&#xD;&#xA;&#xD;&#xA;There are also code differences in libraries, but they are not major, many of them can be seen here: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/, for instance this one which I had to figure out compared to Riemers Tut:&#xD;&#xA;&#xD;&#xA;XNA 4.0&#xD;&#xA;&#xD;&#xA;     protected override void Draw(GameTime gameTime)&#xD;&#xA;     {&#xD;&#xA;         device.Clear(Color.DarkSlateBlue);&#xD;&#xA;&#xD;&#xA;         RasterizerState rs = new RasterizerState();&#xD;&#xA;         rs.CullMode = CullMode.None;&#xD;&#xA;         device.RasterizerState = rs;&#xD;&#xA;&#xD;&#xA;         effect.CurrentTechnique = effect.Techniques[&quot;ColoredNoShading&quot;];&#xD;&#xA;         effect.Parameters[&quot;xView&quot;].SetValue(viewMatrix);&#xD;&#xA;         effect.Parameters[&quot;xProjection&quot;].SetValue(projectionMatrix);&#xD;&#xA;         effect.Parameters[&quot;xWorld&quot;].SetValue(Matrix.Identity);&#xD;&#xA;         foreach (EffectPass pass in effect.CurrentTechnique.Passes)&#xD;&#xA;         {&#xD;&#xA;             pass.Apply();&#xD;&#xA;&#xD;&#xA;             device.DrawUserPrimitives(PrimitiveType.TriangleList, vertices, 0, 1, VertexPositionColor.VertexDeclaration);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;         base.Draw(gameTime);&#xD;&#xA;     }&#xD;&#xA;XNA 3.1&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        device.Clear(Color.DarkSlateBlue);&#xD;&#xA;&#xD;&#xA;        device.VertexDeclaration = new VertexDeclaration(device, VertexPositionColor.VertexElements);&#xD;&#xA;        device.RenderState.CullMode = CullMode.None; // TODO only for testing!&#xD;&#xA;        device.RenderState.FillMode = FillMode.Solid;&#xD;&#xA;&#xD;&#xA;        effect.CurrentTechnique = effect.Techniques[&quot;ColoredNoShading&quot;];&#xD;&#xA;        effect.Parameters[&quot;xView&quot;].SetValue(viewMatrix);&#xD;&#xA;        effect.Parameters[&quot;xProjection&quot;].SetValue(projectionMatrix);&#xD;&#xA;        effect.Parameters[&quot;xWorld&quot;].SetValue(Matrix.Identity);&#xD;&#xA;&#xD;&#xA;        effect.Begin();&#xD;&#xA;        foreach (EffectPass pass in effect.CurrentTechnique.Passes)&#xD;&#xA;        {&#xD;&#xA;            pass.Begin();&#xD;&#xA;            device.DrawUserIndexedPrimitives&lt;VertexPositionColor&gt;(PrimitiveType.TriangleList, vertices, 0, 5, indices, 0, indices.Length / 3);&#xD;&#xA;            pass.End();&#xD;&#xA;        }&#xD;&#xA;        effect.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }" />
  <row Id="30146" PostHistoryTypeId="2" PostId="13549" RevisionGUID="4c05f046-43ec-4d06-b108-0ae0bdb28213" CreationDate="2011-06-13T04:51:22.040" UserId="5651" Text="I have a simple Tower Defense game using a tiled world.  Creep and towers are on a tile at all times.  &#xD;&#xA;&#xD;&#xA;How should I represent the position of creeps in code? (Do creeps know their current tile and position on said tile or are they aware of their absolute world position?)&#xD;&#xA;&#xD;&#xA;I'm basically looking for best practices, design pattern-type tips or general insight about how one manages positioning in a tile-based world.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="30147" PostHistoryTypeId="1" PostId="13549" RevisionGUID="4c05f046-43ec-4d06-b108-0ae0bdb28213" CreationDate="2011-06-13T04:51:22.040" UserId="5651" Text="How should one handle positions in a tile-based world?" />
  <row Id="30148" PostHistoryTypeId="3" PostId="13549" RevisionGUID="4c05f046-43ec-4d06-b108-0ae0bdb28213" CreationDate="2011-06-13T04:51:22.040" UserId="5651" Text="&lt;tiles&gt;&lt;position&gt;" />
  <row Id="30152" PostHistoryTypeId="25" PostId="13548" RevisionGUID="836bf74a-9cb8-4942-abfa-16f2cdea95c2" CreationDate="2011-06-13T06:20:23.373" Comment="http://twitter.com/#!/StackGameDev/status/80157545867640832" />
  <row Id="30155" PostHistoryTypeId="2" PostId="13551" RevisionGUID="a4b05fac-f122-40f7-a6b6-ac4f817d5e80" CreationDate="2011-06-13T06:50:23.490" UserId="20" Text="I would use world-positions for your entities. That will work just fine as long as the world doesn't become really huge (where world positions become impractical due to precision, so that you'll have to divide the world into chunks).&#xD;&#xA;&#xD;&#xA;You can easily calculate the current tile from your *x* and *y* coordinates. Also having world coordinates makes comparing entities much easier (eg. *is entity X in the  range of tower Y?*).&#xD;&#xA;&#xD;&#xA;Using the other approach works too, but you'll have to deal with 2 sets of coordinates all the time (tile index(es) and position within said tile).&#xD;&#xA;&#xD;&#xA;So in conclusion: Both approaches work, but using world coordinates seems much more practical (less coordinates to deal with, fewer calculations necessary). For your convenience, your entities could even have a getter method for their *x* and *y* tile index which will calculate the current tile position on the fly." />
  <row Id="30156" PostHistoryTypeId="5" PostId="7137" RevisionGUID="8179af1f-c7dd-4e44-bbeb-d4de8cb514d0" CreationDate="2011-06-13T08:24:58.410" UserId="2698" Comment="Clarification on coordinates. This algorithm relies on the origin of a block being its top-left point." Text="###Use World Coordinates###&#xD;&#xA;&#xD;&#xA;(Or as you put it, float everything.)&#xD;&#xA;&#xD;&#xA;World coordinates are what you generally work with, and there's plenty of reasons for that. They're the most simple and intuitive way of representing your position in the world, and the only way of really comparing the positions of any two entities in the same world.&#xD;&#xA;&#xD;&#xA;You gain nothing but work by having him be tracked within individual blocks. Well, one advantage is you get to determine which block he's in, but you can already calculate that with world coordinates.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**The rest of this answer** will be an explanation of how to calculate the world block a player is in based on his world coordinates.&#xD;&#xA;&#xD;&#xA;I'll write the code snippet as if you have a 2D [vector][1] class named `Vector2` - the kind of vector you find in geometry, not the `Vector` list type offered by `java.util`. If you don't have any geometric Vector classes, you should find some online or write some yourself (anyone know any quality geometry libraries for Java?)&#xD;&#xA;&#xD;&#xA;The Vector2 class will have an `X` field and a `Y` field, which are public numbers (doesn't matter which numeric type here).&#xD;&#xA;&#xD;&#xA;    // Current player X,Y position in the world&#xD;&#xA;    Player.Position.X, Player.Position.Y&#xD;&#xA;    &#xD;&#xA;    // An array of map blocks with consistent width and height&#xD;&#xA;    Block[x][y] blocks = World.GetBlocks();&#xD;&#xA;&#xD;&#xA;    // We'll wing it with an example global width/height for all blocks&#xD;&#xA;    Block.GetWidth() == 100;&#xD;&#xA;    Block.GetHeight() == 100;&#xD;&#xA;&#xD;&#xA;    // To ensure we're on the same page:&#xD;&#xA;    // blocks[0][0] should be at position (0,0) in the world.&#xD;&#xA;    // blocks[2][5] should be at position (200,500) due to the width/height of a block.&#xD;&#xA;    &#xD;&#xA;    // Also:&#xD;&#xA;    // Assuming (0,0) is in the top-left of the game world, the origin of a block&#xD;&#xA;    // is its top-left point. That means the point (200,500) is at the top-left of&#xD;&#xA;    // blocks[2][5] (as oppose to, say, its center).&#xD;&#xA;    &#xD;&#xA;    public Vector2 GetPlayersBlockPosition() {&#xD;&#xA;        Vector2 blockPosition = new Vector2();&#xD;&#xA;        blockPosition.X = (int)(Player.Position.X / Block.GetWidth());&#xD;&#xA;        blockPosition.Y = (int)(Player.Position.Y / Block.GetHeight());&#xD;&#xA;        &#xD;&#xA;        return blockPosition;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Block GetPlayersBlock() {&#xD;&#xA;        Vector2 bp = GetPlayersBlockPosition();&#xD;&#xA;        return blocks[bp.X, bp.Y];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Block block = GetPlayersBlock();&#xD;&#xA;&#xD;&#xA;2 functions &gt; all the mess of within-block tracking and inter-block transferring&#xD;&#xA;&#xD;&#xA;[1]:http://mathworld.wolfram.com/Vector.html" />
  <row Id="30158" PostHistoryTypeId="25" PostId="13549" RevisionGUID="d680e6c4-d985-4dfa-9fcc-89eb8fae37da" CreationDate="2011-06-13T09:20:24.653" Comment="http://twitter.com/#!/StackGameDev/status/80202849329496064" />
  <row Id="30159" PostHistoryTypeId="2" PostId="13553" RevisionGUID="2d0163e6-5884-45bc-8706-fe4b442f1a63" CreationDate="2011-06-13T09:25:41.127" UserId="7970" Text="I'm starting work on a simple isometric engine. Everything thing is going great at the moment, but I think I've hit an issue everyone hits. I'm having difficulty getting sorting the depth of a cube.&#xD;&#xA;&#xD;&#xA;This image shows the default view (character not near a cube)&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;This image shows the character behind a cube&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The issue is here, when the character goes in front of the cube.&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;Is there a common solution to this? How would i go about it? Would i need to give a depth to EVERY cube, then somehow work out the current tile the character is on then apply the depth to him? I'm using game maker on a mac and I'm happy to upload the project somewhere if you need to check it out.&#xD;&#xA;&#xD;&#xA;Thanks for any input.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Lreoi.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/JJHEQ.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/qHhHJ.png" />
  <row Id="30160" PostHistoryTypeId="1" PostId="13553" RevisionGUID="2d0163e6-5884-45bc-8706-fe4b442f1a63" CreationDate="2011-06-13T09:25:41.127" UserId="7970" Text="Sorting cube depth correctly with an isometric engine" />
  <row Id="30161" PostHistoryTypeId="3" PostId="13553" RevisionGUID="2d0163e6-5884-45bc-8706-fe4b442f1a63" CreationDate="2011-06-13T09:25:41.127" UserId="7970" Text="&lt;game-mechanics&gt;&lt;isometric&gt;" />
  <row Id="30162" PostHistoryTypeId="2" PostId="13554" RevisionGUID="16791cec-e2c4-4c2d-b910-583e8135b5a4" CreationDate="2011-06-13T09:29:20.173" UserId="6210" Text="&gt; but I hear it has a fairly low install base.&#xD;&#xA;&#xD;&#xA;Did you get any numbers to support that opinion?&#xD;&#xA;Here is a quickly found source: [statowl plugin][1], there should be more.&#xD;&#xA;&#xD;&#xA;From my own knowledge (articles read, etc...), Silverlight has a fairly good install ratio on Windows machines. It runs on MacOS too, but might not be installed as much, I haven't seen statistics for that.&#xD;&#xA;&#xD;&#xA;If you don't want to target smartphones (other than WP7) and tablets running mobile OSes, it can be a good choice, especially if you already know it, or at least know .NET and some XAML.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.statowl.com/plugin_overview.php" />
  <row Id="30164" PostHistoryTypeId="2" PostId="13555" RevisionGUID="7ed806b9-364d-46c6-b73e-04911bbe32f2" CreationDate="2011-06-13T10:08:49.140" UserId="7514" Text="I made an isometric game in flash once. Never finished it (unreliable artist) but for me, sorting was simply a matter of organizing according to y coordinate. The further down on your screen the block is, the closer to the top layer it should be.&#xD;&#xA;&#xD;&#xA;Your character, for example, in the stuffed up picture. The Y coordinate of his foot is greater than the y coordinate of the block that overlaps him. Therefore, he should be in front of it, not behind.&#xD;&#xA;&#xD;&#xA;Then if you start having multiple layers in your world, each individual layer of the world is sorted individually. Then drawn bottom upwards.&#xD;&#xA;&#xD;&#xA;Just comment if you need more/better explaining" />
  <row Id="30165" PostHistoryTypeId="2" PostId="13556" RevisionGUID="9f8365c7-8f3a-4f3e-985c-cf5b8f54ab7e" CreationDate="2011-06-13T10:21:06.467" UserId="7514" Text="OK been googling nonstop for ages... &#xD;&#xA;&#xD;&#xA;My problem is, i need transparent models in my game. After a lot of annoying fiddling around with my code, i changed the blendstate to alphablend. This allowed me to start having transparency in my models.&#xD;&#xA;&#xD;&#xA;However now i face another problem. Any other part of the same model that is meant to be view THROUGH the transparent part of the model, is not shown.&#xD;&#xA;&#xD;&#xA;Basically it is only showing the outermost part of the model, even though an inner part is meant to be seen through the transparent part.&#xD;&#xA;&#xD;&#xA;Any help?&#xD;&#xA;Thanks " />
  <row Id="30166" PostHistoryTypeId="1" PostId="13556" RevisionGUID="9f8365c7-8f3a-4f3e-985c-cf5b8f54ab7e" CreationDate="2011-06-13T10:21:06.467" UserId="7514" Text="Alpha in model XNA" />
  <row Id="30167" PostHistoryTypeId="3" PostId="13556" RevisionGUID="9f8365c7-8f3a-4f3e-985c-cf5b8f54ab7e" CreationDate="2011-06-13T10:21:06.467" UserId="7514" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;transparency&gt;" />
  <row Id="30168" PostHistoryTypeId="2" PostId="13557" RevisionGUID="3b047d2c-f4d6-4eac-b2e3-323b38f2afc1" CreationDate="2011-06-13T10:21:50.807" UserId="7728" Text="In my experience, the best way to handle positions in a tile-based world is to ignore that you're in a tile-based world.  That is, keep your entities stored in world-positions, keep the path(s) which your entities will be travelling on stored in world-space, and if at all possible, don't let your entities or other game logic know about tiles at all.&#xD;&#xA;&#xD;&#xA;The problem with considering tiles is that they introduce corner cases into your game code;  lots of new places where your code can misbehave in subtle ways.  Not only do (for example) towers need to be able to tell how close they are to entities on their own tile, but also to the entities on other tiles.  And as soon as you're thinking about tiles, you start thinking about finding the neighbours of tiles, which is also easy to introduce bugs into (particularly along the edges and corners of the playfield).&#xD;&#xA;&#xD;&#xA;Tile-based worlds are really convenient for level editing.  But my advice is to only use the tile structure for editing;  don't let the way the level is built spread into the game logic itself." />
  <row Id="30169" PostHistoryTypeId="2" PostId="13558" RevisionGUID="fced897d-9f3d-4aa0-9145-7875216539a8" CreationDate="2011-06-13T10:33:42.337" UserId="7734" Text="In cocos2d environment and box2D when an spherical object falls on a blunt slant obstacle, it moves really slowly, that's nauseating, if you have coded to not to have any interaction with world while object is in motion. Is there any way to get rid of this slow motion of object?" />
  <row Id="30170" PostHistoryTypeId="1" PostId="13558" RevisionGUID="fced897d-9f3d-4aa0-9145-7875216539a8" CreationDate="2011-06-13T10:33:42.337" UserId="7734" Text="Slow motion of a spherical object on an blunt slant obstacle" />
  <row Id="30171" PostHistoryTypeId="3" PostId="13558" RevisionGUID="fced897d-9f3d-4aa0-9145-7875216539a8" CreationDate="2011-06-13T10:33:42.337" UserId="7734" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="30172" PostHistoryTypeId="2" PostId="13559" RevisionGUID="17895387-1271-4a62-8da6-dc7cb7fb8d69" CreationDate="2011-06-13T10:49:42.273" UserId="6867" Text="What is wrong with my vertex declaration below? I am using it with instancing. After adding TextureInformation to it, it renders weird and has an epileptical seizure.&#xD;&#xA;&#xD;&#xA;        public struct VertexInstance : IVertexType&#xD;&#xA;        {&#xD;&#xA;            public Matrix World;&#xD;&#xA;            public Color Color;&#xD;&#xA;            public Vector3 TextureInformation;&#xD;&#xA;&#xD;&#xA;            // I use arithmetic here to show clearly where these numbers come from&#xD;&#xA;            // You can just type 28 if you want&#xD;&#xA;            public static readonly int SizeInBytes = sizeof(float) * 23;&#xD;&#xA;&#xD;&#xA;            // Vertex Element array for our struct above&#xD;&#xA;            public static readonly VertexElement[] VertexElements = {&#xD;&#xA;                new VertexElement(0, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 0),&#xD;&#xA;                new VertexElement(sizeof(float) * 4, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 1),&#xD;&#xA;                new VertexElement(sizeof(float) * 8, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 2),&#xD;&#xA;                new VertexElement(sizeof(float) * 12, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 3),&#xD;&#xA;                new VertexElement(sizeof(float) * 16, VertexElementFormat.Color, VertexElementUsage.TextureCoordinate, 4),&#xD;&#xA;                new VertexElement(sizeof(float) * 20, VertexElementFormat.Vector3, VertexElementUsage.TextureCoordinate, 5)&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            public static VertexDeclaration Declaration&#xD;&#xA;            {&#xD;&#xA;                get { return new VertexDeclaration(VertexElements); }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            VertexDeclaration IVertexType.VertexDeclaration&#xD;&#xA;            {&#xD;&#xA;                get { return new VertexDeclaration(VertexElements); }&#xD;&#xA;            }&#xD;&#xA;        }" />
  <row Id="30173" PostHistoryTypeId="1" PostId="13559" RevisionGUID="17895387-1271-4a62-8da6-dc7cb7fb8d69" CreationDate="2011-06-13T10:49:42.273" UserId="6867" Text="What is wrong with my vertex declaration?" />
  <row Id="30174" PostHistoryTypeId="3" PostId="13559" RevisionGUID="17895387-1271-4a62-8da6-dc7cb7fb8d69" CreationDate="2011-06-13T10:49:42.273" UserId="6867" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="30175" PostHistoryTypeId="5" PostId="13518" RevisionGUID="3fb592e4-2d04-4ee8-b5d5-fdc04965e26a" CreationDate="2011-06-13T11:42:10.617" UserId="7457" Comment="added 46 characters in body" Text="I am starting out learning XNA and its going smoothly. However I wonder if I am shooting myself in the foot by learning 3.1 not 4.0?&#xD;&#xA;&#xD;&#xA;I am also aware Microsoft obviously has a conflict on interest in the matter: the more times we update the more copies of Visual Studio they sell (I know express is free but some will go pro). So one has to read between the lines of the &quot;MASSIVE NEW FEATURES UPGRADE NOW&quot; type blogs from MS employees.&#xD;&#xA;&#xD;&#xA;I am aware of whats new: http://msdn.microsoft.com/en-us/library/bb417503.aspx, and that mostly seems to be phone, interfaces and video features - which I am not so interested in - I am more doing the core 3D stuff.&#xD;&#xA;&#xD;&#xA;The sticking point is: I have Visual Studio 2008 professional already and do not want to get VS 2010 if there is little difference in the game programming in 4.0.&#xD;&#xA;&#xD;&#xA;Has the world moved on? Is what I am learning in 3.1 going to be come redundant?&#xD;&#xA;&#xD;&#xA;There are also code differences in libraries, but they are not major, many of them can be seen here: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/, for instance this one which I had to figure out compared to Riemers Tut:&#xD;&#xA;&#xD;&#xA;XNA 4.0&#xD;&#xA;&#xD;&#xA;     protected override void Draw(GameTime gameTime)&#xD;&#xA;     {&#xD;&#xA;         device.Clear(Color.DarkSlateBlue);&#xD;&#xA;&#xD;&#xA;         RasterizerState rs = new RasterizerState();&#xD;&#xA;         rs.CullMode = CullMode.None;&#xD;&#xA;         device.RasterizerState = rs;&#xD;&#xA;&#xD;&#xA;         effect.CurrentTechnique = effect.Techniques[&quot;ColoredNoShading&quot;];&#xD;&#xA;         effect.Parameters[&quot;xView&quot;].SetValue(viewMatrix);&#xD;&#xA;         effect.Parameters[&quot;xProjection&quot;].SetValue(projectionMatrix);&#xD;&#xA;         effect.Parameters[&quot;xWorld&quot;].SetValue(Matrix.Identity);&#xD;&#xA;         foreach (EffectPass pass in effect.CurrentTechnique.Passes)&#xD;&#xA;         {&#xD;&#xA;             pass.Apply();&#xD;&#xA;&#xD;&#xA;             device.DrawUserPrimitives(PrimitiveType.TriangleList, vertices, 0, 1, VertexPositionColor.VertexDeclaration);&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;         base.Draw(gameTime);&#xD;&#xA;     }&#xD;&#xA;XNA 3.1&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        device.Clear(Color.DarkSlateBlue);&#xD;&#xA;&#xD;&#xA;        device.VertexDeclaration = new VertexDeclaration(device, VertexPositionColor.VertexElements);&#xD;&#xA;        device.RenderState.CullMode = CullMode.None; // TODO only for testing!&#xD;&#xA;        device.RenderState.FillMode = FillMode.Solid;&#xD;&#xA;&#xD;&#xA;        effect.CurrentTechnique = effect.Techniques[&quot;ColoredNoShading&quot;];&#xD;&#xA;        effect.Parameters[&quot;xView&quot;].SetValue(viewMatrix);&#xD;&#xA;        effect.Parameters[&quot;xProjection&quot;].SetValue(projectionMatrix);&#xD;&#xA;        effect.Parameters[&quot;xWorld&quot;].SetValue(Matrix.Identity);&#xD;&#xA;&#xD;&#xA;        effect.Begin();&#xD;&#xA;        foreach (EffectPass pass in effect.CurrentTechnique.Passes)&#xD;&#xA;        {&#xD;&#xA;            pass.Begin();&#xD;&#xA;            device.DrawUserIndexedPrimitives&lt;VertexPositionColor&gt;(PrimitiveType.TriangleList, vertices, 0, 5, indices, 0, indices.Length / 3);&#xD;&#xA;            pass.End();&#xD;&#xA;        }&#xD;&#xA;        effect.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }" />
  <row Id="30176" PostHistoryTypeId="2" PostId="13560" RevisionGUID="680c7a64-3239-4a12-b420-6d799aa82436" CreationDate="2011-06-13T11:49:30.170" UserId="1494" Text="I am attempting to create a server-centric RTS (as opposed to usual parallel synchronised simulation route of most RTS games today) - however I am still leveraging the discreet N-turns-ahead paradigm [discussed by one of the AOE developers on Gamasutra][1].&#xD;&#xA;&#xD;&#xA;I have [possibly questionably?] decided that the path finding should only ever find the next cell the entity needs to move to, and was wondering if anyone has any clever ideas on how to optimize the algorithm for this specific scenario - or any other ideas on how to keep the pathfinding as lean as possible on the server.&#xD;&#xA;&#xD;&#xA;I have investigated a few possible algorithms but could only come up with one appropriation: [Tiered A-Star][2] - Relatively large T1 tiles, work out (and cache) each cell as you enter it. Other than that: doing the full A-Star pass and caching the entire path, which might use too much memory if a large amount of units are present.&#xD;&#xA;&#xD;&#xA;I know about the existence of naive progressive pathfinding algorithms (if you hit a block, turn in the direction closer to your target etc.) but they suffer from infinite feedback loops - and very poor pathing even if visited blocks are memorised. Not an option.&#xD;&#xA;&#xD;&#xA;Many thanks.&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;  [2]: http://www.policyalmanac.org/games/twoTiered.htm&#xD;&#xA;" />
  <row Id="30177" PostHistoryTypeId="1" PostId="13560" RevisionGUID="680c7a64-3239-4a12-b420-6d799aa82436" CreationDate="2011-06-13T11:49:30.170" UserId="1494" Text="One Step-Ahead A-Star" />
  <row Id="30178" PostHistoryTypeId="3" PostId="13560" RevisionGUID="680c7a64-3239-4a12-b420-6d799aa82436" CreationDate="2011-06-13T11:49:30.170" UserId="1494" Text="&lt;path-finding&gt;" />
  <row Id="30179" PostHistoryTypeId="2" PostId="13561" RevisionGUID="6b3ff8ba-2481-4773-aa19-9e58b8a26fb9" CreationDate="2011-06-13T12:06:12.957" UserId="2798" Text="The offset of the last VertexElement is wrong:&#xD;&#xA;&#xD;&#xA;    public static readonly VertexElement[] VertexElements = {&#xD;&#xA;        new VertexElement(0, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 0),&#xD;&#xA;        new VertexElement(sizeof(float) * 4, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 1),&#xD;&#xA;        new VertexElement(sizeof(float) * 8, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 2),&#xD;&#xA;        new VertexElement(sizeof(float) * 12, VertexElementFormat.Vector4, VertexElementUsage.TextureCoordinate, 3),&#xD;&#xA;        new VertexElement(sizeof(float) * 16, VertexElementFormat.Color, VertexElementUsage.TextureCoordinate, 4),&#xD;&#xA;        new VertexElement(sizeof(float) * 16 + sizeof(uint), VertexElementFormat.Vector3, VertexElementUsage.TextureCoordinate, 5)&#xD;&#xA;    };" />
  <row Id="30180" PostHistoryTypeId="2" PostId="13562" RevisionGUID="bb988f3f-884c-409e-92fe-33bef54485f0" CreationDate="2011-06-13T12:10:46.853" UserId="6588" Text="Your best bet is to use Tiered A-Star and then employ various strategies for minimizing the overhead. For example, the memory footprint can be dramatically reduced by having multiple units share the same path. That is, there's no need to store a path for each individual unit; instead store all the units that started in the same area, and then calculate just one path from that area." />
  <row Id="30181" PostHistoryTypeId="2" PostId="13563" RevisionGUID="3183f9a8-9e5a-4ea0-ba8f-3e2aef6c5bfd" CreationDate="2011-06-13T12:13:13.000" UserId="2798" Text="Folow this workflow:&#xD;&#xA;&#xD;&#xA; - Sort your model parts by depth, from the furthest one to the nearest one.&#xD;&#xA; - Enable depth-writing and draw the opaque ones in order.&#xD;&#xA; - Disable depth writing and draw the transparent ones in order.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30182" PostHistoryTypeId="25" PostId="13553" RevisionGUID="83f2f6d2-ab30-4f76-a63f-e2bfc9fe7039" CreationDate="2011-06-13T12:20:25.420" Comment="http://twitter.com/#!/StackGameDev/status/80248152233492480" />
  <row Id="30183" PostHistoryTypeId="2" PostId="13564" RevisionGUID="026c08c5-df18-45cb-a477-839bb22b8493" CreationDate="2011-06-13T12:23:40.240" UserId="7973" Text="for a first iteration of my sim, I need a very basic physics model for ship/submarine movement. I'd guess it might be a good approach to use vectors here (ship heading but also considering sea states etc.). Basic acceleration and that stuff should be taken into account&#xD;&#xA;&#xD;&#xA;I do not need any 3D stuff...the 'client' for that 'ship movement' physics is only the 2D rendering of a navigation map.&#xD;&#xA;&#xD;&#xA;I've found some papers on the net but they are far too complex for my needs.&#xD;&#xA;&#xD;&#xA;Anybody does know some 'simplified' vector algorithms etc. for that?&#xD;&#xA;&#xD;&#xA;Thanks a lot." />
  <row Id="30184" PostHistoryTypeId="1" PostId="13564" RevisionGUID="026c08c5-df18-45cb-a477-839bb22b8493" CreationDate="2011-06-13T12:23:40.240" UserId="7973" Text="Simple physics for modelling ship/submarine movement" />
  <row Id="30185" PostHistoryTypeId="3" PostId="13564" RevisionGUID="026c08c5-df18-45cb-a477-839bb22b8493" CreationDate="2011-06-13T12:23:40.240" UserId="7973" Text="&lt;2d-physics&gt;" />
  <row Id="30186" PostHistoryTypeId="2" PostId="13565" RevisionGUID="75aa2453-fffc-4908-8949-336bc1354e2d" CreationDate="2011-06-13T12:41:49.433" UserId="1839" Text="Simple Euler Integration will fit your needs, see my answer [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13178/why-is-my-velocity-decaying/13186#13186" />
  <row Id="30187" PostHistoryTypeId="2" PostId="13566" RevisionGUID="19f084fa-d708-403b-b1ac-fb01a073cc46" CreationDate="2011-06-13T12:42:11.697" UserId="7964" Text="Recently I tried to compile and run the source code of Quake 3 engine. I basically followed [this](http://my.opera.com/fredrikluo/blog/compiling-quake-3) article. However it doesn't work for me.&#xD;&#xA;&#xD;&#xA;I am using Visual Studio 2010 on Windows 7, with June 2010 DirectX SDK (I doubt if it is necessary). Here is how I did:&#xD;&#xA;&#xD;&#xA;1. Install the original version of Quake 3 Arena to &quot;D:\Quake III Arena&quot;, and update to 1.32&#xD;&#xA;2. Download and extract the source code&#xD;&#xA;3. Open `quake3.sln` in &quot;`code`&quot; folder. Visual Studio upgraded it to 2010 format.&#xD;&#xA;4. Build all the 8 projects in Debug mode (in some order). I checked that every project had been built successfully&#xD;&#xA;5. In the properties of quake3 project, in Debugging page, I changed &quot;Working Directory&quot; to &quot;`$(TargetDir)`&quot; and &quot;Command Arguments&quot; to &quot;`+set fs_cdpath &quot;D:\Quake III Arena&quot;`&quot;&#xD;&#xA;6. Set quake3 as the Startup Project and press F5&#xD;&#xA;&#xD;&#xA;The game started and could correctly recognize the game folder and parse some options, such as screen resolution. However an exception window popped out before I can see the game main menu, saying &quot;Unhandled exception at 0x053e9938 in quake3.exe: 0xC0000005: Access violation.&quot;&#xD;&#xA;&#xD;&#xA;I tried to start the game from command line, but it had the same problem.&#xD;&#xA;&#xD;&#xA;I followed the code and found that the exception was generated in `int VM_CallCompiled(vm_t *vm, int *args)`, when executing `call entryPoint` in the `__asm` block, located in line 1148 of vm_x86.c. Since it's assembler code, I don't know how to debug it.&#xD;&#xA;&#xD;&#xA;I don't know if anyone here knows about this problem. Could anyone provide some help on this? Thanks gratefully.&#xD;&#xA;" />
  <row Id="30188" PostHistoryTypeId="1" PostId="13566" RevisionGUID="19f084fa-d708-403b-b1ac-fb01a073cc46" CreationDate="2011-06-13T12:42:11.697" UserId="7964" Text="Cannot run quake 3 engine compiled from source code" />
  <row Id="30189" PostHistoryTypeId="3" PostId="13566" RevisionGUID="19f084fa-d708-403b-b1ac-fb01a073cc46" CreationDate="2011-06-13T12:42:11.697" UserId="7964" Text="&lt;3d-engines&gt;&lt;quake3&gt;" />
  <row Id="30190" PostHistoryTypeId="2" PostId="13567" RevisionGUID="464c8782-170b-4751-9360-53fdac8b3871" CreationDate="2011-06-13T12:43:10.393" UserId="6469" Text="I agree with what everyone else says, you should really learn general programming and thoroughly understand the basics before you attempt such an ambitious project such as a RPG.&#xD;&#xA;&#xD;&#xA;Having said that I do hate when people just throw there personal beliefs at you instead of answering your question. (basically everyone that commented)&#xD;&#xA;&#xD;&#xA;This book takes you from not knowing how to program anything to implementing a fully 3D RPG including controls, sound, collision detection, enemy spawning and all the other elements needed for a good game. At the end you have something resembling a baulders gate style game.&#xD;&#xA;&#xD;&#xA;http://www.amazon.co.uk/Microsoft-Visual-Basic-Programming-Teens/dp/1598633902/ref=sr_1_6?s=books&amp;ie=UTF8&amp;qid=1307968501&amp;sr=1-6&#xD;&#xA;&#xD;&#xA;That being said if you are serious about making games visual basic is not the way to go. I like C++ but that can be hard so I do advise finishing the book, at least then you will know what you are talking about and can ask more precise questions.&#xD;&#xA;&#xD;&#xA;Good luck &#xD;&#xA;&#xD;&#xA;" />
  <row Id="30191" PostHistoryTypeId="2" PostId="13568" RevisionGUID="84688727-a743-4993-bc59-bce35ebd37f3" CreationDate="2011-06-13T13:14:40.810" UserId="7904" Text="In order to get proper blending you will probably have to break the object up into multiple models. And even then you are still limited since from certain angles you will be able to break the transparant blend again.&#xD;&#xA;Transparancy is actually quite difficult to get correct without using some cool but fairly exotic solutions. One that comes to mind is Order Independant Transparancy, unfortunately it requires DX Capabilities that XNA doesnt have yet.&#xD;&#xA;My recomendation is to go back into your 3d editor and break your mesh apart so you can sort the transparant and non transparant parts into a correct order." />
  <row Id="30192" PostHistoryTypeId="2" PostId="13569" RevisionGUID="004fa8af-d803-44db-bfd1-bfcc0b11891e" CreationDate="2011-06-13T13:42:03.057" UserId="1101" Text="Computing just one move sounds like a bad idea to me. If you don't compute the whole path, then you don't know that the next tile to move to is correct, so a lot of the time units will get trapped.&#xD;&#xA;&#xD;&#xA;Caching the entire path for a unit won't take too much memory. It's just a list of node IDs. The main problem is generating the path in the first place, and how much of an issue that is depends on the complexity of your map - how many discrete nodes you have, the branching factor for each one, and whether you have a lot of large obstacles.&#xD;&#xA;&#xD;&#xA;This is not to say that hierarchical A* won't help, and it will definitely speed things up, but you seem to be micro-optimising ahead of time. Why not just implement the simplest approach and go from there? If it turns out to be too slow, you can trivially change it later because you have a simple input interface (the source and destination nodes) and output interface (a list of nodes to travel on) - the algorithm you use to handle that is easily interchangeable." />
  <row Id="30193" PostHistoryTypeId="5" PostId="13565" RevisionGUID="574adda0-3a08-4ef3-9f7d-46214e8cab64" CreationDate="2011-06-13T13:54:35.607" UserId="1839" Comment="added 169 characters in body; edited body" Text="Simple Euler Integration will fit your needs, see my answer [here][1]&#xD;&#xA;&#xD;&#xA;**Edit:** However, for the feature list that you appear to have (which is not that simple btw) the easiest solution is using [Box2D][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13178/why-is-my-velocity-decaying/13186#13186&#xD;&#xA;  [2]: http://www.box2d.org/" />
  <row Id="30195" PostHistoryTypeId="2" PostId="13570" RevisionGUID="43948928-e2d2-442f-884e-73eac09c83e1" CreationDate="2011-06-13T14:53:49.320" UserId="3830" Text="It's not couched in terms of vector math, but you might find [this answer from a previous question][1] about ocean simulation and physics&lt;/a&gt; useful.  Make sure you understand what it is you're simulating before you get into how you simulate it.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6502/water-ocean-simulation-and-physics/6506#6506" />
  <row Id="30196" PostHistoryTypeId="2" PostId="13571" RevisionGUID="9208073e-05da-4ca2-b33e-68b5ce7791d3" CreationDate="2011-06-13T14:55:14.907" UserId="6774" Text="(Sorry about the bad title, it's the best I could come up with)&#xD;&#xA;&#xD;&#xA;I've been planning a gladiator manager game for a while now. Something similar to Blood Bowl (or Football Manager, only with fighting rather than kicking a ball), only with a much larger focus on the actual managerial aspects of running a team. I'm still fairly new to game development, and have only created games with a very narrow focus (i.e. simple first person shooters), so taking on a project with a larger scope is very interesting, but also problematic since I really don't have a grip on how exactly to make the damn thing work.&#xD;&#xA;&#xD;&#xA;Basically my two major hurdles are the interface and database. Obviously the interface is incredibly important since the player will spend most of his/her time doing managerial tasks. The game will be team-based, with various leagues in which those teams fight in, so it all relies on a database. I have never done any real work with databases, so this in particular has me stumped.&#xD;&#xA;&#xD;&#xA;At this point, my idea is to use XNA in a WPF application, with an XML database. This just seems like a combination that would work well together, and as I have a C#/XNA background, I wouldn't need to learn a new language or graphics framework to work in. &#xD;&#xA;&#xD;&#xA;Does that seem like a sensible combination, and if not, why? I have never done anything with WPF, so all of my information on it's uses comes from Google, and that may or may not be a good thing. Would XML be a smart choice? There will likely be a fairly low (think 20-30) number of teams, all of which will have a dozen or so fighters, so it's not a monstrously large set of data.&#xD;&#xA;&#xD;&#xA;Thanks in advance, I know I didn't write the most intelligent post ever, but I had to get my ramblings out somehow. ;)" />
  <row Id="30197" PostHistoryTypeId="1" PostId="13571" RevisionGUID="9208073e-05da-4ca2-b33e-68b5ce7791d3" CreationDate="2011-06-13T14:55:14.907" UserId="6774" Text="Manager game questions" />
  <row Id="30198" PostHistoryTypeId="3" PostId="13571" RevisionGUID="9208073e-05da-4ca2-b33e-68b5ce7791d3" CreationDate="2011-06-13T14:55:14.907" UserId="6774" Text="&lt;xna&gt;&lt;databases&gt;&lt;wpf&gt;&lt;interface&gt;" />
  <row Id="30199" PostHistoryTypeId="2" PostId="13572" RevisionGUID="2071e5d7-bffb-4fb4-8fa5-5925c19d5a88" CreationDate="2011-06-13T15:02:52.953" UserId="1156" Text="I have no idea about databases either, but I can say now: XML is not a database, and to use it like one would be very painful. You're going to probably want some kind of SQL. &#xD;&#xA;&#xD;&#xA;Also, it depends on the UI you want. My assumption for your want of WPF is the GUI part. I do not believe you can alter the graphical style of those parts. As such, you'd have a very bland UI. You may want to check out something like [CEGUI#][1] (CEGUI for C# and XNA).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nuclexframework.codeplex.com/wikipage?title=Nuclex.UserInterface&amp;referringTitle=Home" />
  <row Id="30200" PostHistoryTypeId="2" PostId="13573" RevisionGUID="c7f73770-c529-48e4-a123-b7231cb9367e" CreationDate="2011-06-13T15:07:13.293" UserId="7888" Text="I want to know if it would be worth executing pathfinding on the GPU (using nVidia's [CUDA][1], or an equivalent) in certain situations, or whether it would be a wasted effort. The situation I imagine would be a headless multiplayer server responsible for finding paths for bots.&#xD;&#xA;&#xD;&#xA;I'm specifically interested in A* pathfinding using navigation meshes, but if there is [another][2] pathfinding algorithm that would benefit more from GPU execution I'd love to hear it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.nvidia.com/object/cuda_home_new.html&#xD;&#xA;  [2]: http://realtimecollisiondetection.net/blog/?p=57" />
  <row Id="30201" PostHistoryTypeId="1" PostId="13573" RevisionGUID="c7f73770-c529-48e4-a123-b7231cb9367e" CreationDate="2011-06-13T15:07:13.293" UserId="7888" Text="Is nVidia's CUDA suited to performing pathfinding calculations?" />
  <row Id="30202" PostHistoryTypeId="3" PostId="13573" RevisionGUID="c7f73770-c529-48e4-a123-b7231cb9367e" CreationDate="2011-06-13T15:07:13.293" UserId="7888" Text="&lt;performance&gt;&lt;path-finding&gt;&lt;gpu&gt;" />
  <row Id="30203" PostHistoryTypeId="2" PostId="13574" RevisionGUID="10d854da-f61c-4f8e-a169-679065705840" CreationDate="2011-06-13T15:09:18.253" UserId="7804" Text="&quot;Database&quot; is where it begins to sound like overkill. Your dataset is small enough that it will fit and run just fine in regular old C# data structures.&#xD;&#xA;&#xD;&#xA;You certainly don't want WPF for a game -- all it gives you is bland standard Windows UI controls. [Communist Duck][1]'s [UI suggestion][2] is excellent though!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/1156/the-communist-duck&#xD;&#xA;  [2]: http://nuclexframework.codeplex.com/wikipage?title=Nuclex.UserInterface&amp;referringTitle=Home" />
  <row Id="30204" PostHistoryTypeId="5" PostId="13564" RevisionGUID="8d5800ec-9166-4afa-a80d-075a91cb3047" CreationDate="2011-06-13T15:13:31.503" UserId="7973" Comment="added 582 characters in body; deleted 49 characters in body" Text="for a first iteration of my sim, I need a very basic physics model for ship/submarine movement. I'd guess it might be a good approach to use vectors here (ship heading but also considering sea states etc.). Basic acceleration and that stuff should be taken into account&#xD;&#xA;&#xD;&#xA;I do not need any 3D stuff...the 'client' for that 'ship movement' physics is only the 2D rendering of a navigation map.&#xD;&#xA;&#xD;&#xA;I've found some papers on the net but they are far too complex for my needs.&#xD;&#xA;&#xD;&#xA;Anybody does know some 'simplified' vector algorithms etc. for that?&#xD;&#xA;&#xD;&#xA;Thanks a lot.&#xD;&#xA;&#xD;&#xA;EDIT: To be clear: I do **not** want to simulate ship movement/ocean physics in detail, because this is not the focus of my (naval) simulation. It 'just' must be somewhat believable in that sense that if you have different sea states(wind/waves/currents) that the vessel is somewhat believable influenced (on the navigation map) by those forces.&#xD;&#xA;&#xD;&#xA;The main issue for me is how I model/calculate those forces (wind etc.) by simple vectors and (eg. for a given wind velocity like 50kn) in an easy way withouth studying physics ;)." />
  <row Id="30205" PostHistoryTypeId="2" PostId="13575" RevisionGUID="a0e4a354-5cf9-4de7-b2d1-e1e50ffc270d" CreationDate="2011-06-13T15:14:48.890" UserId="1581" Text="Disclaimer: I've created the two tutorials I'm going to link here&#xD;&#xA;&#xD;&#xA;I've done two tutorials. None of them is complete, but will get you from 0 to 80% quickly.&#xD;&#xA;&#xD;&#xA;The first one is a LÖVE-centric one called love-tile-tutorial:&#xD;&#xA;&#xD;&#xA;https://github.com/kikito/love-tile-tutorial&#xD;&#xA;&#xD;&#xA;It's about 50% done. Starts with the basics, and deals with Images &amp; Quads, as well as an introduction to Lua.&#xD;&#xA;&#xD;&#xA;love-tile-tutorial is on hold at the moment, though - I'm doing other projects, such as the second tutorial.&#xD;&#xA;&#xD;&#xA;The second tutorial concentrates in Lua itself - this is, not for LÖVE specifics, but for Lua in general; it actually works entirely from the console. It's a series of exercises for learning the language itself better. It's called Lua Missions:&#xD;&#xA;&#xD;&#xA;https://github.com/kikito/lua_missions&#xD;&#xA;&#xD;&#xA;I realize this is not exactly what you wanted (since not all LÖVE is covered), but I'm putting it here in case anyone finds it useful.&#xD;&#xA;" />
  <row Id="30206" PostHistoryTypeId="25" PostId="13573" RevisionGUID="cea79924-1bc8-4e39-a324-cca6691fd3db" CreationDate="2011-06-13T15:20:26.930" Comment="http://twitter.com/#!/StackGameDev/status/80293456626466816" />
  <row Id="30207" PostHistoryTypeId="2" PostId="13576" RevisionGUID="cf9d9705-175c-400e-9224-c038f18400f1" CreationDate="2011-06-13T15:20:53.917" UserId="5224" Text="Path finding is essentially a graph problem, in which a lot of parallelism takes place. There are a lot of papers out there on how to implement and optimize graph based algorithms for CUDA.&#xD;&#xA;&#xD;&#xA;I found some papers that might interest you (although these are quite academic)&#xD;&#xA;http://cvit.iiit.ac.in/papers/Pawan07accelerating.pdf&#xD;&#xA;http://ppl.stanford.edu/papers/ppopp070a-hong.pdf&#xD;&#xA;&#xD;&#xA;So short answer: yes :).&#xD;&#xA;&#xD;&#xA;However I don't know if the hassle of writing an A* CUDA implementation together with the overhead of calls to a headless server is going to make this worthwile. Be sure to just make a small prototype first! (Also this would make for an interesting blog post, so be sure to write up what you're doing ;) )." />
  <row Id="30208" PostHistoryTypeId="6" PostId="13573" RevisionGUID="e7f77743-f1e5-4369-b682-c7e805caba0e" CreationDate="2011-06-13T15:25:47.617" UserId="5224" Comment="added gpgpu tag" Text="&lt;performance&gt;&lt;path-finding&gt;&lt;gpu&gt;&lt;gpgpu&gt;" />
  <row Id="30209" PostHistoryTypeId="24" PostId="13573" RevisionGUID="e7f77743-f1e5-4369-b682-c7e805caba0e" CreationDate="2011-06-13T15:25:47.617" Comment="Proposed by 5224 approved by 1156 edit id of 490" />
  <row Id="30210" PostHistoryTypeId="5" PostId="13514" RevisionGUID="22c70449-6925-43a7-88f3-6efd49ce1d0e" CreationDate="2011-06-13T15:35:19.770" UserId="7804" Comment="grammar, formatting and clarity improvements" Text="I work with **C# VS2008**. I want to start game programming and I know you need to learn to crawl before you run, but I don’t know where to start.&#xD;&#xA;&#xD;&#xA;I hope starting with XNA and by creating small games (snake, tetris etc..) is fine. I am new to game programming, please help me get started.&#xD;&#xA;  &#xD;&#xA; 1. What Game Engine should I use?&#xD;&#xA; 2. Which platform is best suited for starting game programming?&#xD;&#xA; 3. Is it the best idea to start with XNA?&#xD;&#xA; 4. What is the best XNA book, that teaches 2D &amp; 3D game programming from basic to advanced?&#xD;&#xA; 5. Any suggestion on becoming a professional XNA game developer, and creating cool 3 games?&#xD;&#xA; 6. Is XNA an industry standard for creating games?&#xD;&#xA; 7. Where could I work as XNA game developer?" />
  <row Id="30211" PostHistoryTypeId="24" PostId="13514" RevisionGUID="22c70449-6925-43a7-88f3-6efd49ce1d0e" CreationDate="2011-06-13T15:35:19.770" Comment="Proposed by 7804 approved by 14 edit id of 491" />
  <row Id="30212" PostHistoryTypeId="2" PostId="13577" RevisionGUID="6ca7c02f-5d10-4b53-ba36-ee0639b49575" CreationDate="2011-06-13T15:43:43.437" UserId="3630" Text="I just install Flash Player 11 and SDK 4.5 (hero), and test it with a small program. But I find it is still using &quot;software&quot; to simulate 3D API, and &#xD;&#xA;&#xD;&#xA;    trace(&quot;driver info: &quot; + _context3D.driverInfo);&#xD;&#xA;&#xD;&#xA;output&#xD;&#xA;&#xD;&#xA;    driver info: Software&#xD;&#xA;&#xD;&#xA;I'm using windows 7, directX works properly, and option &quot;-swf-version 13 -use-gpu&quot; is already added in compiler arguments.&#xD;&#xA;&#xD;&#xA;Who can tell me how to enable GPU in Flash Builder?" />
  <row Id="30213" PostHistoryTypeId="1" PostId="13577" RevisionGUID="6ca7c02f-5d10-4b53-ba36-ee0639b49575" CreationDate="2011-06-13T15:43:43.437" UserId="3630" Text="How to enable GPU for flash player 11?" />
  <row Id="30214" PostHistoryTypeId="3" PostId="13577" RevisionGUID="6ca7c02f-5d10-4b53-ba36-ee0639b49575" CreationDate="2011-06-13T15:43:43.437" UserId="3630" Text="&lt;flash&gt;&lt;flash-develop&gt;" />
  <row Id="30215" PostHistoryTypeId="5" PostId="13553" RevisionGUID="6572b0e3-8c15-42b4-b6c2-bbe0454d571a" CreationDate="2011-06-13T15:58:58.643" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How should I sort images in an isometric game so that they appear in the correct order?](http://gamedev.stackexchange.com/questions/8151/how-should-i-sort-images-in-an-isometric-game-so-that-they-appear-in-the-correct)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I'm starting work on a simple isometric engine. Everything thing is going great at the moment, but I think I've hit an issue everyone hits. I'm having difficulty getting sorting the depth of a cube.&#xD;&#xA;&#xD;&#xA;This image shows the default view (character not near a cube)&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;This image shows the character behind a cube&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The issue is here, when the character goes in front of the cube.&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;Is there a common solution to this? How would i go about it? Would i need to give a depth to EVERY cube, then somehow work out the current tile the character is on then apply the depth to him? I'm using game maker on a mac and I'm happy to upload the project somewhere if you need to check it out.&#xD;&#xA;&#xD;&#xA;Thanks for any input.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Lreoi.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/JJHEQ.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/qHhHJ.png" />
  <row Id="30216" PostHistoryTypeId="10" PostId="13553" RevisionGUID="d1173565-ac96-468c-9b74-41957ddb1b2e" CreationDate="2011-06-13T15:58:57.987" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30217" PostHistoryTypeId="2" PostId="13578" RevisionGUID="71e17db2-7a61-401e-a4d9-682bfecdf802" CreationDate="2011-06-13T16:50:05.523" UserId="7911" Text="The only thing different about a ship as compared to a standard rigid body is that it has a keel that moderates forces coming from tide and current; a ship making 0 knots simply has its propulsion force 0 in the equation, it's not a special state you have to go into.&#xD;&#xA;&#xD;&#xA;And the only thing different about a simulation environment for a ship versus a rigid body is that surface friction is basically nonexistent.  Go down to the harbor and find a huge 40 foot yacht that weights tons, push a finger against it and slowly just that little force will accelerate it until the guy lines stop it.&#xD;&#xA;&#xD;&#xA;Unfortunately what you are trying to do is exactly studying physics, no way around that.  The good news is that all you really need to know is some basic vector math and integration to get the numbers back out.&#xD;&#xA;&#xD;&#xA;I'd suggest looking at something like Box2D (http://www.box2d.org/) as a physics harness, you won't need most of the features.&#xD;&#xA;" />
  <row Id="30218" PostHistoryTypeId="2" PostId="13579" RevisionGUID="2173e0b0-f49b-49f8-b2b9-248dd2d2a27a" CreationDate="2011-06-13T17:17:49.970" UserId="1839" Text="Ignore the Database and even the GUI at the beginning. Make the basic game-play work first. Just one session without saving/loading. That is hard enough at the beginning.&#xD;&#xA;&#xD;&#xA;You will find yourself changing the actual data during development a lot. So if you maintain the loading/saving code for such frequently changing data, then you will find yourself 90% of your time maintaining that code, instead of making a fun game.&#xD;&#xA;&#xD;&#xA;Take shortcuts on your way (use keyboard input instead of a GUI, create sample data on startup instead of saving/loading), don't go for the full blown game right from the beginning. This will keep you motivated because you actually have a game and not only a database front-end." />
  <row Id="30219" PostHistoryTypeId="5" PostId="13577" RevisionGUID="cb40cf92-b593-4ca2-938f-edea3a8e2d45" CreationDate="2011-06-13T17:18:13.460" UserId="3630" Comment="added 137 characters in body; added 37 characters in body" Text="I just install Flash Player 11 and SDK 4.5 (hero), and test it with a small program. But I find it is still using &quot;software&quot; to simulate 3D API, and &#xD;&#xA;&#xD;&#xA;    trace(&quot;driver info: &quot; + _context3D.driverInfo);&#xD;&#xA;&#xD;&#xA;output&#xD;&#xA;&#xD;&#xA;    driver info: Software&#xD;&#xA;&#xD;&#xA;I'm using windows 7, directX works properly, and option &quot;-swf-version 13 -use-gpu&quot; is already added in compiler arguments.&#xD;&#xA;&#xD;&#xA;Who can tell me how to enable GPU in Flash Builder?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;context3d is constructed as :&#xD;&#xA;&#xD;&#xA;    private var _context3D:Context3D;&#xD;&#xA;    ...&#xD;&#xA;    _context3D = stage3D.context3D;&#xD;&#xA;&#xD;&#xA;And wmode is set to direct in html.&#xD;&#xA;" />
  <row Id="30220" PostHistoryTypeId="2" PostId="13580" RevisionGUID="346c6585-d251-4cc1-947d-07b8d1c66c24" CreationDate="2011-06-13T17:21:17.963" UserId="7804" Text="Physics dictates that when you put a ball on a slant, it tends to roll. If it's a small slant, it rolls slowly. It's a matter of certain physics applied to certain conditions.&#xD;&#xA;&#xD;&#xA;To get the effect you want, you have to either change the conditions...&#xD;&#xA;&#xD;&#xA; * for example, increase the slope to get it to roll off quicker&#xD;&#xA;&#xD;&#xA;... or change the physics...&#xD;&#xA;&#xD;&#xA; * for example, add more friction (this could be conditional; only added if the slope is very small)." />
  <row Id="30221" PostHistoryTypeId="5" PostId="13579" RevisionGUID="2c8a8fd4-5e27-4731-bdcb-2da7ec4f54d5" CreationDate="2011-06-13T17:26:01.107" UserId="1839" Comment="added 6 characters in body" Text="Ignore the Database and even the GUI at the beginning. Make the basic game-play work first. Just one session without saving/loading. That is hard enough at the beginning.&#xD;&#xA;&#xD;&#xA;You will find yourself changing the actual data during development a lot. So if you maintain the loading/saving code for such frequently changing data, then you will find yourself 90% of your time maintaining that code, instead of making a fun game.&#xD;&#xA;&#xD;&#xA;Take shortcuts on your way (use keyboard input instead of a GUI, create sample data on startup instead of saving/loading), don't go for the full blown game right from the beginning. This will keep you motivated because you actually have a game there and not only a database front-end." />
  <row Id="30222" PostHistoryTypeId="2" PostId="13581" RevisionGUID="e6563608-eb56-43fd-b90c-2c8fa3f26247" CreationDate="2011-06-13T17:27:38.327" UserId="744" Text="About a decade ago, when SDL and Pygame were both still actively developed, the Python community was not fractured between 2.x and 3.x, and CPU-side blit-based rendering was a reasonable approach to graphics rendering for low-end systems.&#xD;&#xA;&#xD;&#xA;Now, you'd be better off learning just about anything else." />
  <row Id="30224" PostHistoryTypeId="2" PostId="13583" RevisionGUID="16357637-11bd-427c-9a34-25387d79563a" CreationDate="2011-06-13T17:45:55.437" UserId="6558" Text="At the moment, there is no 'single development tool' that exports to Flash, Silverlight, and HTML5 (and Unity, and iOS, and Android, and whatever else you might want to export to).  For the most part, this is due to Silverlight not being supported by various gamedev tools. (Unity, for instance, exports to Flash 11, and iOS, along with being a plugin of it's own)  *This* is mostly due to Silverlight not really being viewed as a &quot;game development&quot; tool.  It's not worth going into the reasons here, though.  It *is* a good choice if you want to do Windows Phone 7 development, though.&#xD;&#xA;&#xD;&#xA;At the moment, Unity seems to be the platform to develop in for 3d web games, since it'll export to the new Flash 11 and iOS.  It also supports C#, so it's somewhat .net developer friendly.  Flash has become the main tool for 2d web games, and there's a few things like Flex and Flixel that let you develop in Flash without having to use the &quot;normal&quot; Flash software.&#xD;&#xA;&#xD;&#xA;HTML5 has it's own set of problems, mostly due to it being too slow or not supported enough.  There's also the issue of monetizing an HTML5 game.  The route most people take with Flash doesn't seem as feasible for HTML5, though we'll see what the future holds as technology changes." />
  <row Id="30225" PostHistoryTypeId="2" PostId="13584" RevisionGUID="e3a01b1d-7fd9-405b-bfda-09b2a718a225" CreationDate="2011-06-13T17:55:56.787" UserId="4662" Text="Doesn't matter what userbase Flash has if you can't develop for it. Stick with what you know, go for .NET. After all- if your game sucks, nobody will play it, whatever technology you use." />
  <row Id="30226" PostHistoryTypeId="25" PostId="13571" RevisionGUID="65cd8bca-d1ea-473d-9615-76e26ce51667" CreationDate="2011-06-13T18:21:26.697" Comment="http://twitter.com/#!/StackGameDev/status/80339005488635904" />
  <row Id="30227" PostHistoryTypeId="6" PostId="13577" RevisionGUID="fd8b0c1b-eb58-42f3-befa-deb092771225" CreationDate="2011-06-13T18:53:27.270" UserId="1156" Comment="edited tags" Text="&lt;flash&gt;&lt;gpu&gt;&lt;flash-develop&gt;" />
  <row Id="30228" PostHistoryTypeId="2" PostId="13585" RevisionGUID="80f0ab03-3bd4-4be0-8e36-94c5c6687e44" CreationDate="2011-06-13T18:53:42.900" UserId="962" Text="You have implemented a fixed time step with frame-skipping. Any devices that cannot run your game are below the minimum requirements.&#xD;&#xA;&#xD;&#xA;You should find some users with older devices to test with, and see exactly how old of a system your game can actually run on. Once you are at that point, see if there is any optimization you can do to improve the speed.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30229" PostHistoryTypeId="2" PostId="13586" RevisionGUID="c10b882a-f53d-461b-9e52-7ffc660acd4a" CreationDate="2011-06-13T18:57:03.263" UserId="7911" Text="I've used the shared path idea that jhocking brought up, it works well in a situation where you're moving groups (say like infantry squads) around.&#xD;&#xA;&#xD;&#xA;I've also used a variant of the tiered approach where paths between the higher tier(s) are pre-calculated when the map is built and cached by the server, the lowest tier is still best served by a local path of its own.&#xD;&#xA;&#xD;&#xA;If you haven't done it already move your path finder out into an asynchronous service for your server, in this way a flood of requests on the same tick won't bog down the main simulation.&#xD;&#xA;&#xD;&#xA;And finally, have you measured how much space/time is actually used by a path?  It could be that you're worrying over nothing =)  Kylotan is right about measuring before optimizing.&#xD;&#xA;" />
  <row Id="30230" PostHistoryTypeId="2" PostId="13587" RevisionGUID="739fc740-a6c1-46dc-b1f7-e3aca98f2d7b" CreationDate="2011-06-13T20:26:15.280" UserId="744" Text="It's possible that your slant really is not steep enough as Aku says, but it's more likely you flagged the object for fixed rotation, meaning it's not rolling down the slope, but rather sliding against friction. This makes it much slower, and if the slope is not steep enough, can halt it entirely." />
  <row Id="30231" PostHistoryTypeId="25" PostId="13560" RevisionGUID="d524dc3b-8761-4a53-abe6-3ad1243b721c" CreationDate="2011-06-13T21:21:27.417" Comment="http://twitter.com/#!/StackGameDev/status/80384308312932352" />
  <row Id="30233" PostHistoryTypeId="2" PostId="13588" RevisionGUID="c032f1e6-1323-4409-aee9-8ac5eda645b5" CreationDate="2011-06-13T21:49:31.080" UserId="7964" Text="Add `+set sv_pure 0 +set vm_game 0 +set vm_cgame 0 +set vm_ui 0` in the command line argument." />
  <row Id="30234" PostHistoryTypeId="2" PostId="13589" RevisionGUID="9d865461-ade6-47b4-a64f-6aa649b7811e" CreationDate="2011-06-13T22:11:01.203" UserId="5651" Text="I'm starting up on OpenGL and want to write a well structured and expandable yet relatively simple 3D graphics engine for fun and personal knowledge.&#xD;&#xA;&#xD;&#xA;I'm looking for information concerning best practices and design patterns related to this sort of code.&#xD;&#xA;&#xD;&#xA;Specifically, I'm having issues deciding how classes should be organized, how to divide responsabilities, etc.  (Right now, I'm at the point where everything is done in the rendering method!)&#xD;&#xA;&#xD;&#xA;Can anyone give me some advice or point me to some appropriate litterature?&#xD;&#xA;&#xD;&#xA;Thank you very much." />
  <row Id="30235" PostHistoryTypeId="1" PostId="13589" RevisionGUID="9d865461-ade6-47b4-a64f-6aa649b7811e" CreationDate="2011-06-13T22:11:01.203" UserId="5651" Text="How are responsabilities and program flow organized in a graphics enigne?" />
  <row Id="30236" PostHistoryTypeId="3" PostId="13589" RevisionGUID="9d865461-ade6-47b4-a64f-6aa649b7811e" CreationDate="2011-06-13T22:11:01.203" UserId="5651" Text="&lt;graphics&gt;&lt;3d-engines&gt;" />
  <row Id="30237" PostHistoryTypeId="2" PostId="13590" RevisionGUID="a509f87c-d431-4b4a-9c32-74931f1761d3" CreationDate="2011-06-13T22:39:15.550" UserId="7979" Text="I've read a lot of forums about making 3D games in Java but I was unable to build a full picture of how it performs in video games.&#xD;&#xA;&#xD;&#xA;I know that it works smoothly for small and average size games, but what would happen if one tried to write Crysis 3 scale game on Java? What would become the bottleneck of rendering performance? Would there be any difference at all compared with the same game written in C++? How much performance trouble would additional JNI layer give? &#xD;&#xA;&#xD;&#xA;I would be glad to receive a detailed answer (or at least a link to some article) describing parts that JVM would never be able to optimize enough to give performance comparable with C++.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="30238" PostHistoryTypeId="1" PostId="13590" RevisionGUID="a509f87c-d431-4b4a-9c32-74931f1761d3" CreationDate="2011-06-13T22:39:15.550" UserId="7979" Text="Java rendering performance bottlenecks" />
  <row Id="30239" PostHistoryTypeId="3" PostId="13590" RevisionGUID="a509f87c-d431-4b4a-9c32-74931f1761d3" CreationDate="2011-06-13T22:39:15.550" UserId="7979" Text="&lt;java&gt;&lt;rendering&gt;&lt;performance&gt;" />
  <row Id="30240" PostHistoryTypeId="2" PostId="13591" RevisionGUID="a1ddd413-0e34-41c9-b3c5-55ee467c2414" CreationDate="2011-06-13T22:48:19.287" UserId="769" Text="We currently have a simple slot machine in our online virtual world game. You insert virtual money, pull the lever, and depending on the 3 figures (there's only one line) you get a reward, a free round, lose some more money, or most of the time, get nothing at all. When you pull the lever, the result is determined (though not shown) immediately, so there's no way influence the outcome of the wheels.&#xD;&#xA;&#xD;&#xA;This slot machine is hardly fun to play. The chances of winning something are pretty low (though when you win, you can win a lot) and the game is just bet-pull-bet-pull-bet-pull-broke.&#xD;&#xA;&#xD;&#xA;How can it be made more fun?&#xD;&#xA;&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;Collected ideas:&#xD;&#xA;&#xD;&#xA;- (My own) Instead of a few big rewards, give more smaller rewards, so the player wins more often.&#xD;&#xA;&#xD;&#xA;- (My own) Instead of just handing out more money, also reward the play with special items he can't get anywhere else in the game." />
  <row Id="30241" PostHistoryTypeId="1" PostId="13591" RevisionGUID="a1ddd413-0e34-41c9-b3c5-55ee467c2414" CreationDate="2011-06-13T22:48:19.287" UserId="769" Text="How to make a fun slot machine?" />
  <row Id="30242" PostHistoryTypeId="3" PostId="13591" RevisionGUID="a1ddd413-0e34-41c9-b3c5-55ee467c2414" CreationDate="2011-06-13T22:48:19.287" UserId="769" Text="&lt;game-design&gt;" />
  <row Id="30243" PostHistoryTypeId="2" PostId="13592" RevisionGUID="00c57348-f930-496b-a2e0-7d904c2d88f9" CreationDate="2011-06-13T22:50:18.383" UserId="4662" Text="I subdivided my classes into three kinds:&#xD;&#xA;&#xD;&#xA; 1. Central renderer class.&#xD;&#xA; 2. Resource class- texture, mesh, font&#xD;&#xA; 3. Instance classes- label, sprite, 3D Object&#xD;&#xA;&#xD;&#xA;I kept lists of type 2 and 3 classes in the central Renderer class, and when draw time comes, then I already know all the objects to render. When you come to draw, then efficient drawing does not lend itself to drawing each object sequentially- you will want to do things like sort them in certain orders." />
  <row Id="30244" PostHistoryTypeId="2" PostId="13593" RevisionGUID="11fd4697-a056-4e0a-87eb-9378632b1062" CreationDate="2011-06-13T23:00:22.120" UserId="962" Text="Large games commonly make liberal use of 3d party technologies and APIs, generally these are C or C++ libraries. Many of these libraries do not exist for Java, so a developer will have to spend more time(money) on developing a Java equivalent.&#xD;&#xA;&#xD;&#xA;Code in Java will at best run about the same as C++, but generally in the real world, **it runs much slower than C++.**&#xD;&#xA;&#xD;&#xA;Also Java is not compatible with any consoles, so that is going to limit you to Desktop systems, and possibly android. (I am ignoring low end java capable phone as they cannot run anything of visual interest)&#xD;&#xA;&#xD;&#xA;Use java if you are going to be building most of  your systems for scratch, or you know of some java libraries that you will use, and are targeting Desktop systems.&#xD;&#xA;&#xD;&#xA;Do not use java if you are going to want to use C++ only Apis, want bleeding edge performance, or want to create console games." />
  <row Id="30245" PostHistoryTypeId="5" PostId="13536" RevisionGUID="37d80b33-7a89-4098-9f86-4b505d400d10" CreationDate="2011-06-13T23:02:30.370" UserId="962" Comment="removed thanks, consolodated a statement" Text="My game  will be made up of objects. Essentially the level editor will give me a bunch of objects to choose from and I can drag them in and thus a level is made. The objects could have animation in which case they are responsible for knowing which frame and layer they are on.&#xD;&#xA;&#xD;&#xA;So then I can have these:&#xD;&#xA;&#xD;&#xA;    Animated non-movable objects&#xD;&#xA;    Unanimated non-movable objects&#xD;&#xA;    Animated movable objects&#xD;&#xA;    Unanimated movable objects&#xD;&#xA;&#xD;&#xA;So first I was thinking of, when the level starts, build a quadtree for all non-movable objects.&#xD;&#xA;&#xD;&#xA;This way I can easily avoid rendering ones which are not in view.&#xD;&#xA;&#xD;&#xA;Then from there I can do bounding box check on dynamic objects (or maybe if I add something like Box2D it can do it).&#xD;&#xA;&#xD;&#xA;But then comes the rendering.&#xD;&#xA;&#xD;&#xA;At first I was thinking of each object rendering itself, but then I cannot do atlasing.&#xD;&#xA;&#xD;&#xA;I'd like to do atlasing. I was thinking that animated objects can just use their own frame sheet. But objects which are not animated should use atlasing.&#xD;&#xA;&#xD;&#xA;I know this can be categorized as premature optimization, but I don't want to eventually find out that it is horribly slow.&#xD;&#xA;&#xD;&#xA;Any design suggestions / comments would be welcome. Does it seem like a good idea to try to atlas in the sort of game I'm making, which is a platformer that is not tile based." />
  <row Id="30246" PostHistoryTypeId="2" PostId="13594" RevisionGUID="112ef105-6cd9-4ff0-8d9f-ded194c817e8" CreationDate="2011-06-13T23:23:17.000" UserId="962" Text="First off, do some research on the psychology of gambling.&#xD;&#xA;&#xD;&#xA;You can't expect something that most of the time constantly eats your money without any reward to become addictive.&#xD;&#xA;&#xD;&#xA;Don't give out free rounds, give out money equivalent to free rounds. Have a constant streams of wins and losses&#xD;&#xA;&#xD;&#xA;Adjust the payout so that after 1000 spins, the bank is ahead, but not by much.&#xD;&#xA;&#xD;&#xA;Also it seems you have a enter bet, and then press to spin. You should have a few quick bet buttons, with a preset amount, that pays and instantly bets and spins. As well as a way to enter a custom amount, if you really need to have one.&#xD;&#xA;&#xD;&#xA;When the player wins, make sure to have flashing lights and bells going off sounds of coins falling, etc. If can set up an area in the world with lots of slot machines with different prices and rules, it will make it more likely that a user will move around to try change his luck or to have some variation. If you can sync these areas up to allow other users to see/hear winners it will also increase everyone's excitement." />
  <row Id="30247" PostHistoryTypeId="2" PostId="13595" RevisionGUID="17b864dc-0d16-4024-a191-f39583b73fa0" CreationDate="2011-06-13T23:55:21.480" UserId="4360" Text="Check out [Forplay][1] which is built on top of Google Web Toolkit.  &#xD;&#xA;It is created by a couple of guys at Google.&#xD;&#xA;&#xD;&#xA;**It  can currently export to:**  &#xD;&#xA;&#xD;&#xA; - Desktop&#xD;&#xA; - Java&#xD;&#xA; - HTML5 Browsers  &#xD;&#xA; - Android&#xD;&#xA; - Flash&#xD;&#xA;&#xD;&#xA;There are working plans to allow exporting to iOS as well. Your code is written on a single codebase using Java and you can use existing Java libraries such as JBox2D. &#xD;&#xA;&#xD;&#xA;Here is a video of their presentation at GoogleIO  &#xD;&#xA;http://www.youtube.com/watch?v=F_sbusEUz5w&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/forplay/" />
  <row Id="30248" PostHistoryTypeId="2" PostId="13596" RevisionGUID="866ed7d7-db10-42d5-ac98-206041c22af4" CreationDate="2011-06-13T23:56:15.177" UserId="5824" Text="It's probably worth adding some elements of skill to the gameplay. Even something as simple as nudge and hold buttons would add some depth." />
  <row Id="30249" PostHistoryTypeId="2" PostId="13597" RevisionGUID="e3d00013-315f-4696-853e-ec00e56d83ee" CreationDate="2011-06-13T23:56:43.267" UserId="51" Text="There are a lot of articles out there that a simple search will yield answers to, but here are some highlights from what I've found:&#xD;&#xA;&#xD;&#xA;1) You absolutely want to give out small rewards.  Most slot machines actually have a pretty high payout ratio (on the order of 70-95%) of what's put in.  A good percentage of the time you'll make your money back.  Of course, over time slot machines are guaranteed money makers for the house, but you want to string people along.&#xD;&#xA;&#xD;&#xA;2) The idea of risk vs. reward is important.  Almost all slot machines let you place higher than the advertised minimum, and scale up the rewards accordingly.  So a $1 slot machine is really a $3-5 slot machine since players will naturally want to put more money in after they see that their winnings could've been higher.&#xD;&#xA;&#xD;&#xA;3) The &quot;almost&quot; win is an important psychological factor.  Consider showing the images above and below the one you are scored on so you get the occasional &quot;so close&quot; thought.&#xD;&#xA;&#xD;&#xA;4) It needs to be flashy.  Spins need to be quick so that they can play again quickly.  Sounds are important." />
  <row Id="30250" PostHistoryTypeId="5" PostId="13592" RevisionGUID="23138d1c-289f-447e-aa0f-af6c176d3343" CreationDate="2011-06-14T00:11:36.440" UserId="4662" Comment="added 241 characters in body" Text="I subdivided my classes into three kinds:&#xD;&#xA;&#xD;&#xA; 1. Central renderer class.&#xD;&#xA; 2. Resource class- texture, mesh, font&#xD;&#xA; 3. Instance classes- label, sprite, 3D Object&#xD;&#xA;&#xD;&#xA;I kept lists of type 2 and 3 classes in the central Renderer class, and when draw time comes, then I already know all the objects to render. When you come to draw, then efficient drawing does not lend itself to drawing each object sequentially- you will want to do things like sort them in certain orders.&#xD;&#xA;&#xD;&#xA;Edit: To be more specific, the user manages the lifetime of the resources. They're shared amongst all the instance classes that are using it, and the user. If the caller of the code wants to cache the resource, then that's their problem." />
  <row Id="30251" PostHistoryTypeId="25" PostId="13591" RevisionGUID="13732b3f-cf1e-471c-8b1a-89d12ace911f" CreationDate="2011-06-14T00:21:28.460" Comment="http://twitter.com/#!/StackGameDev/status/80429610701033473" />
  <row Id="30252" PostHistoryTypeId="2" PostId="13598" RevisionGUID="b6ce821c-cf1e-43bd-92c9-f41035b01bf7" CreationDate="2011-06-14T00:36:05.480" UserId="6588" Text="I don't know if this hits Silverlight, but you can develop games that work on a ton of platforms using [monkey][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.monkeycoder.co.nz/" />
  <row Id="30253" PostHistoryTypeId="2" PostId="13599" RevisionGUID="d4a17133-0017-487a-a02b-91c092c21490" CreationDate="2011-06-14T01:16:59.047" UserId="7728" Text="I think it's important to draw a distinction between &quot;fun&quot; and &quot;addiction&quot;.  Slot machines are not fun, and never have been;  they are [skinner boxes][1] which apply feedback according to a simple reward schedule when the user pulls a lever, in an attempt to condition the user into repeated behaviour.  As such, they can be fabulously addictive.  Adjusting prizes and reward schedules will never make a slot machine fun;  they will only make it more (or less) addictive.&#xD;&#xA;&#xD;&#xA;If your goal is really to make the game fun (and not just make it more addictive), then you're going to need to add some play dynamics, so that the player can make meaningful choices which affect the outcome (as happened with video poker), or can affect the outcome via application of physical skill (as happened with pinball).  &#xD;&#xA;&#xD;&#xA;Or in other words, in order to make a slot machine actually be fun, you need to make it no longer be just a slot machine;  it needs to be something that will stimulate the mind.&#xD;&#xA;&#xD;&#xA;On the other hand, if addiction is actually what you were aiming for, then the answers from AttackingHobo and Tetrad are pretty much spot on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Operant_conditioning_chamber" />
  <row Id="30254" PostHistoryTypeId="2" PostId="13600" RevisionGUID="d1bce7ed-b9b8-479a-bffd-e28b5f256b45" CreationDate="2011-06-14T01:29:34.350" UserId="7981" Text="There is a tutorial on how to implement simple IK http://freespace.virgin.net/hugo.elias/models/m_ik.htm ." />
  <row Id="30255" PostHistoryTypeId="2" PostId="13601" RevisionGUID="03b9b950-e2dc-4889-b2d3-98aae34c9984" CreationDate="2011-06-14T01:35:34.150" UserId="3294" Text="I'm looking for some ideas\algorithm name for alternative to fog of war.&#xD;&#xA;&#xD;&#xA;I'm playing around an &quot;infinite&quot; terrain engine. I can't draw the whole map because there are no borders and I don't like the idea of hiding the terrain at a distance with fog." />
  <row Id="30256" PostHistoryTypeId="1" PostId="13601" RevisionGUID="03b9b950-e2dc-4889-b2d3-98aae34c9984" CreationDate="2011-06-14T01:35:34.150" UserId="3294" Text="Fog of War alternative" />
  <row Id="30257" PostHistoryTypeId="3" PostId="13601" RevisionGUID="03b9b950-e2dc-4889-b2d3-98aae34c9984" CreationDate="2011-06-14T01:35:34.150" UserId="3294" Text="&lt;xna&gt;&lt;3d&gt;&lt;terrain&gt;" />
  <row Id="30261" PostHistoryTypeId="2" PostId="13603" RevisionGUID="7560a51a-a5e0-4bc9-bc18-fa1a05b3fa0b" CreationDate="2011-06-14T02:10:09.223" UserId="7514" Text="As jhocking said in the comment, FOW is unknown areas.&#xD;&#xA;&#xD;&#xA;Computers can't infinitely draw terrain. The lag would be incredible. Fog is used to blend in the edge of the render distance, which doesn't need to be close to the camera, nor does there need to be a large blend range.&#xD;&#xA;&#xD;&#xA;You sound like you are thinking of a very short view range. Increasing your view range to a large number (this is set in your projection matrix), and sticking fog at the end, makes it seem like an endlessly shown terrain. And the fog isn't really that noticable.&#xD;&#xA;&#xD;&#xA;However if you still want a precise answer to your question,&#xD;&#xA;&#xD;&#xA;Weather, such as rain, snow, wind, etc. can help obscure the out of range area.&#xD;&#xA;&#xD;&#xA;Terrain which reaches the clouds...  Having mountains in your terrain, then having clouds at the top of the world, means that in the distance, you will find the edge of the world hidden by mountains, (or if your high up, clouds).&#xD;&#xA;&#xD;&#xA;Finally, if your really desperate you could stick a curve onto your world, so that it appears that things in the difference are disappearing over the horizon.&#xD;&#xA;&#xD;&#xA;However i still suggest you use fog, as it is simply a blending for the out of range area." />
  <row Id="30262" PostHistoryTypeId="10" PostId="13514" RevisionGUID="c4f4ae4f-f307-4ae0-9f68-16a62ed06e8d" CreationDate="2011-06-14T02:30:41.193" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;Notabene&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30263" PostHistoryTypeId="5" PostId="13601" RevisionGUID="1cade101-fc5d-4578-82b7-584d7d7bea96" CreationDate="2011-06-14T02:31:54.687" UserId="51" Comment="added 2 characters in body; edited title" Text="I'm looking for some ideas/algorithm name for alternative to distance fog.&#xD;&#xA;&#xD;&#xA;I'm playing around an &quot;infinite&quot; terrain engine. I can't draw the whole map because there are no borders and I don't like the idea of hiding the terrain at a distance with fog." />
  <row Id="30264" PostHistoryTypeId="4" PostId="13601" RevisionGUID="1cade101-fc5d-4578-82b7-584d7d7bea96" CreationDate="2011-06-14T02:31:54.687" UserId="51" Comment="added 2 characters in body; edited title" Text="Alternatives to distance fog" />
  <row Id="30266" PostHistoryTypeId="6" PostId="13536" RevisionGUID="af786694-5ca2-40a8-80e7-3702a72b5ae9" CreationDate="2011-06-14T02:36:50.140" UserId="51" Comment="edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;2d&gt;" />
  <row Id="30267" PostHistoryTypeId="4" PostId="13589" RevisionGUID="8c7e673d-32a7-471e-a60c-1a5f008006b3" CreationDate="2011-06-14T02:51:49.727" UserId="5651" Comment="edited title" Text="How are responsabilities and program flow organized in a graphics engine?" />
  <row Id="30268" PostHistoryTypeId="2" PostId="13604" RevisionGUID="c622c5fd-0bab-4f5c-b7ce-1a8ae79e1f0b" CreationDate="2011-06-14T02:53:33.877" UserId="7981" Text="There is [commented data formats with little code of several 8-bit games][1], these games are:&#xD;&#xA;&#xD;&#xA; - Lords of Midnight &#xD;&#xA; - Doomdark's Revenge&#xD;&#xA; - The Hobbit&#xD;&#xA; - Manic Miner &#xD;&#xA; - Jet Set Willy&#xD;&#xA; - Jet Set Willy 2 &#xD;&#xA; - Atic Atac&#xD;&#xA; - Knight Lore&#xD;&#xA; - Alien 8 &#xD;&#xA; - Sabre Wulf &#xD;&#xA; - Wanted: Monty Mole &#xD;&#xA; - Nodes of Yesod &#xD;&#xA; - Dynamite Dan 	&#xD;&#xA; - Starquake&#xD;&#xA; - Ant Attack&#xD;&#xA; - PAW 	&#xD;&#xA; - Driller&#xD;&#xA;&#xD;&#xA;I found it interesting that some of them use compression (RLE, dictionary), some of them don't, some use name generators; they had to save space because 8-bit computers had little memory. I believe that by examining these data formats You can derive algorithms yourself. :)&#xD;&#xA;&#xD;&#xA;There is more 1 hour long video of making of Google's Pacman clone on Youtube and they used this [detailed study of Pacman][2] (Gamasutra link). In video they talk how they used some &quot;good old&quot; techniques like packing multiple textures into one ...&#xD;&#xA;&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3938/the_pacman_dossier.php?print=1&#xD;&#xA;  [1]: http://www.icemark.com/dataformats/" />
  <row Id="30269" PostHistoryTypeId="16" PostId="13604" RevisionGUID="dd71d169-f02e-406a-9ce0-a87fd1ae6e55" CreationDate="2011-06-14T02:53:33.877" UserId="7981" />
  <row Id="30270" PostHistoryTypeId="2" PostId="13605" RevisionGUID="ed37b495-c76c-4fca-8102-b5866dd90e9e" CreationDate="2011-06-14T03:02:55.247" UserId="7728" Text="A standard approach to this is to use Level of Detail algorithms to draw less-detailed versions of far-off terrain.  These lower-detail versions can either be pre-generated, or may be generated on the fly, if you have dynamically changing terrain.  (But in almost all cases, you want to pre-generate these terrain LODs, as that's dramatically simpler)&#xD;&#xA;&#xD;&#xA;A good starting point for researching different methods of implementing terrain level of detail can be found at http://www.vterrain.org/LOD/" />
  <row Id="30271" PostHistoryTypeId="2" PostId="13606" RevisionGUID="ec7238cd-a45e-4760-b5ed-085578513dbd" CreationDate="2011-06-14T03:19:14.933" UserId="7981" Text="* You can try asking guy who made tutorials on Flipcode on [3d fixed point math on mobile devices][1], he made games and they included physics.&#xD;&#xA;* There is [physics engine which alows to use fixed point in physics algebra (module)][2]&#xD;&#xA;&#xD;&#xA;(Some old games used fixed point (guessing Carmageddon, Destruction Derby ...). Fixed point is used on some mobile devices and they have games, and some of them are 3D.)&#xD;&#xA;&#xD;&#xA;I hope it helps. :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flipcode.com/archives/3D_Graphics_on_Mobile_Devices-Part_2_Fixed_Point_Math.shtml&#xD;&#xA;  [2]: http://www.airplaysdk.com/features_physics.php" />
  <row Id="30272" PostHistoryTypeId="25" PostId="13589" RevisionGUID="4c1af01e-d1fa-41ed-820d-dbeba21e1694" CreationDate="2011-06-14T03:21:28.913" Comment="http://twitter.com/#!/StackGameDev/status/80474910299914240" />
  <row Id="30273" PostHistoryTypeId="2" PostId="13607" RevisionGUID="2a586da9-8bb6-4047-9c1d-5a622a761c7f" CreationDate="2011-06-14T04:02:45.970" UserId="7728" Text="As a practical matter, under Windows and Mac operating systems, different gamepads expose their controls via vastly different mechanisms.&#xD;&#xA;&#xD;&#xA;About the only thing you can count on is that if there are multiple analog sticks, the left one will be number zero, and that digital buttons 0 and 1 will be face buttons accessed by the right thumb.&#xD;&#xA;&#xD;&#xA;Everything else seems to vary from manufacturer to manufacturer, and even device to device.  This is one major reason why computer games absolutely must have a &quot;controller configuration&quot; feature, which allows users to map their gamepad's buttons and analog stick axes to in-game functionality.  There's currently no other way to make games work properly for all players with all gamepads." />
  <row Id="30274" PostHistoryTypeId="2" PostId="13608" RevisionGUID="52d7cafc-5c64-48a1-b7dc-2be583278092" CreationDate="2011-06-14T04:31:25.897" UserId="5651" Text="As long as you are not afraid to modify your UML diagrams and make new ones, UML will be a very powerful tool for designing and engineering any piece of software regardless of the frequency at which it changes.&#xD;&#xA;&#xD;&#xA;Iterative Development was mentionned in another answer and makes heavy use of UML diagrams to express the software small parts at a time.  You basically give your team an objective for a small (2-3 weeks) iteration, make a bunch of UML to conceptualize the goals and model of your iteration then code after that.  Iterative Development strongly encourages you to modify existing artifacts such as UML diagrams.&#xD;&#xA;&#xD;&#xA;The thing to keep in mind here is that UML is not limiting because your software changes a lot during development, but it might become limiting if you make one batch of diagrams and never change them or make new ones to better reflect your ever-changing piece of software." />
  <row Id="30275" PostHistoryTypeId="2" PostId="13609" RevisionGUID="67f02acc-fc0c-42d2-86c4-f7debcff44c5" CreationDate="2011-06-14T04:40:46.317" UserId="7986" Text="I used to know this website with lots of good computer graphics video lessons. There was tons of stuff on Photoshop/3D/general art/anatomy and alot more. To view the video lessons you had to subscribe to a monthly or yearly membership. Didnt have the money back then but now I'm willing to give it a try. The problem is, I cant find the site. Google is flooded with nonsense online game design colleges.&#xD;&#xA;&#xD;&#xA;The site seemed very professional and I remember seeing free samples of the videos. I read the testimonials and remember reading that some major game development companies in the US used the site for training. Sorry, thats all I can remember. Maybe someone knows which site I'm talking about? " />
  <row Id="30276" PostHistoryTypeId="1" PostId="13609" RevisionGUID="67f02acc-fc0c-42d2-86c4-f7debcff44c5" CreationDate="2011-06-14T04:40:46.317" UserId="7986" Text="Can you help me re-find a certain online training site?" />
  <row Id="30277" PostHistoryTypeId="3" PostId="13609" RevisionGUID="67f02acc-fc0c-42d2-86c4-f7debcff44c5" CreationDate="2011-06-14T04:40:46.317" UserId="7986" Text="&lt;graphics&gt;&lt;tutorials&gt;" />
  <row Id="30278" PostHistoryTypeId="5" PostId="13593" RevisionGUID="07635c7c-495d-4349-8973-bea19fd6b881" CreationDate="2011-06-14T05:34:48.623" UserId="962" Comment="added 1 characters in body" Text="Large games commonly make liberal use of 3rd party technologies and APIs, generally these are C or C++ libraries. Many of these libraries do not exist for Java, so a developer will have to spend more time(money) on developing a Java equivalent.&#xD;&#xA;&#xD;&#xA;Code in Java will at best run about the same as C++, but generally in the real world, **it runs much slower than C++.**&#xD;&#xA;&#xD;&#xA;Also Java is not compatible with any consoles, so that is going to limit you to Desktop systems, and possibly android. (I am ignoring low end java capable phone as they cannot run anything of visual interest)&#xD;&#xA;&#xD;&#xA;Use java if you are going to be building most of  your systems for scratch, or you know of some java libraries that you will use, and are targeting Desktop systems.&#xD;&#xA;&#xD;&#xA;Do not use java if you are going to want to use C++ only Apis, want bleeding edge performance, or want to create console games." />
  <row Id="30279" PostHistoryTypeId="25" PostId="13566" RevisionGUID="ab975a3d-f2ee-4b36-ad3b-807bc333eb2a" CreationDate="2011-06-14T06:21:28.710" Comment="http://twitter.com/#!/StackGameDev/status/80520209059954690" />
  <row Id="30280" PostHistoryTypeId="2" PostId="13610" RevisionGUID="a188d737-2a29-4da1-8978-55d852c4458e" CreationDate="2011-06-14T06:33:48.503" UserId="20" Text="Maybe your graphics-card isn't supported by the new Flash player? There's some more information about graphics-card compatibility over in [this thread in the Adobe forums][1].&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.adobe.com/thread/802404" />
  <row Id="30281" PostHistoryTypeId="2" PostId="13611" RevisionGUID="2d3d19f1-bf06-4ffc-896c-04e6068b53ec" CreationDate="2011-06-14T07:15:54.243" UserId="3689" Text="I want to build simple OpenGL application that mustily are GUI based to collect from user &#xD;&#xA;input and to the user can push buttons . &#xD;&#xA;now i saw allot of GUI frameworks that offer GUI to openGL . but none of then offer &#xD;&#xA;GUI that is seams to be part of the 3d/2d game the closed example i can think of is the old &#xD;&#xA;dos games GUI . " />
  <row Id="30282" PostHistoryTypeId="1" PostId="13611" RevisionGUID="2d3d19f1-bf06-4ffc-896c-04e6068b53ec" CreationDate="2011-06-14T07:15:54.243" UserId="3689" Text="how can i make GUI that used to be in the old dos games but without the old look in openGL" />
  <row Id="30283" PostHistoryTypeId="3" PostId="13611" RevisionGUID="2d3d19f1-bf06-4ffc-896c-04e6068b53ec" CreationDate="2011-06-14T07:15:54.243" UserId="3689" Text="&lt;opengl&gt;&lt;gui&gt;" />
  <row Id="30285" PostHistoryTypeId="2" PostId="13613" RevisionGUID="018692f0-385f-4398-810a-b26a86f73fd5" CreationDate="2011-06-14T08:41:31.927" UserId="7990" Text="How do you vibrate or cause a shake effect to a body of type static or dynamic or kinematic. I tried applying forces to a dynamic body in the timeStep, which did not work, as well I tried ApplyLinearImpulse many times a sec within the timeStep, which again did not give me the result. So right now Iam experimenting with adding a static circle body as a hinge point to my rectangular body and create a revolute joint between them. May be then applying a force could result in Tension between the 2 bodies? Does anybody know about this? have any ideas please let me know? " />
  <row Id="30286" PostHistoryTypeId="1" PostId="13613" RevisionGUID="018692f0-385f-4398-810a-b26a86f73fd5" CreationDate="2011-06-14T08:41:31.927" UserId="7990" Text="shake / Vibrate a body in box2d ?" />
  <row Id="30287" PostHistoryTypeId="3" PostId="13613" RevisionGUID="018692f0-385f-4398-810a-b26a86f73fd5" CreationDate="2011-06-14T08:41:31.927" UserId="7990" Text="&lt;iphone&gt;&lt;box2d&gt;" />
  <row Id="30288" PostHistoryTypeId="2" PostId="13614" RevisionGUID="a4083688-c155-4da7-ae7f-9b9565ff0413" CreationDate="2011-06-14T09:09:17.717" UserId="4894" Text="Here's a structure I used for some of my Android 2D games with Canvas (before going to OpenGL) : &#xD;&#xA;&#xD;&#xA; - class GameView extends SurfaceView &#xD;&#xA;&#xD;&#xA;Mostly handles the touch events and foward them to the GameLogic&#xD;&#xA;&#xD;&#xA; - class GameThread extends Thread&#xD;&#xA;&#xD;&#xA;Creates a separate Thread to handle everything GameRelated (you don't want to have your game computations in the main UI thread, to keep the phone reactive even if your game is stuck). The run does the following things : &#xD;&#xA; &#xD;&#xA;computeDeltaTime = compute the time since last call, for animations&#xD;&#xA; &#xD;&#xA;updateGame = process the user inputs and update all elements in the game &#xD;&#xA;&#xD;&#xA;renderGame = renders the game on the Canvas&#xD;&#xA;&#xD;&#xA; - class GameLogic &#xD;&#xA;&#xD;&#xA;Handles the game logic, contains the method &quot;updateGame&quot;&#xD;&#xA;&#xD;&#xA; - class GameRenderer&#xD;&#xA;&#xD;&#xA;Handles the rendering on the canvas, contains the method &quot;renderGame&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30289" PostHistoryTypeId="5" PostId="13591" RevisionGUID="54089e55-1813-41dc-bf57-4dc0584cbf3a" CreationDate="2011-06-14T09:17:50.030" UserId="769" Comment="added 117 characters in body; deleted 271 characters in body; added 5 characters in body" Text="We currently have a simple slot machine in our online virtual world game.&#xD;&#xA;&#xD;&#xA;You set the amount you want to bet (in virtual money) and pull the lever, and depending on the 3 figures (there's only one line) you get a reward, a free round, lose some more money, or most of the time, get nothing at all. You can instantly pull the lever again. The previous bet will be maintained.&#xD;&#xA;&#xD;&#xA;This slot machine isn't a lot of fun to play. The chances of winning something are pretty low (though when you win, you can win a lot) and the game is just bet-pull-bet-pull-bet-pull-broke. When you pull the lever, the result is determined (though not shown) immediately, so there's also no way influence the outcome of the wheels.&#xD;&#xA;&#xD;&#xA;How can it be made more fun?" />
  <row Id="30290" PostHistoryTypeId="2" PostId="13615" RevisionGUID="eb74ff58-bb09-4481-ad0d-fda4694a2574" CreationDate="2011-06-14T09:19:24.880" UserId="769" Text="My own ideas:&#xD;&#xA;&#xD;&#xA;- Instead of a few big rewards, give more smaller rewards, so the player wins more often.&#xD;&#xA;&#xD;&#xA;- Instead of just handing out more money, also reward the play with special items he can't get anywhere else in the game." />
  <row Id="30291" PostHistoryTypeId="25" PostId="13590" RevisionGUID="810f7935-866f-4913-a7d9-c32fae1a8fb9" CreationDate="2011-06-14T09:21:28.850" Comment="http://twitter.com/#!/StackGameDev/status/80565507845128192" />
  <row Id="30292" PostHistoryTypeId="2" PostId="13616" RevisionGUID="7afa6a7a-38fe-4823-b376-51e829cad4f2" CreationDate="2011-06-14T09:48:17.293" UserId="7522" Text="i am learning 3d game development on android , i was wondering is it possible to add text areas or any thing that allows a user to enter a text in a 3d world ? and how ?&#xD;&#xA;&#xD;&#xA;Thank you " />
  <row Id="30293" PostHistoryTypeId="1" PostId="13616" RevisionGUID="7afa6a7a-38fe-4823-b376-51e829cad4f2" CreationDate="2011-06-14T09:48:17.293" UserId="7522" Text="textarea in android 3d world" />
  <row Id="30294" PostHistoryTypeId="3" PostId="13616" RevisionGUID="7afa6a7a-38fe-4823-b376-51e829cad4f2" CreationDate="2011-06-14T09:48:17.293" UserId="7522" Text="&lt;3d&gt;&lt;android&gt;" />
  <row Id="30295" PostHistoryTypeId="2" PostId="13617" RevisionGUID="e395ad77-0793-4329-a1e2-a8bb8315c316" CreationDate="2011-06-14T10:15:44.550" UserId="4410" Text="I'll throw [Digital Tutors][1] out there as a suggestion as i've seen it used at companies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.digitaltutors.com" />
  <row Id="30296" PostHistoryTypeId="2" PostId="13618" RevisionGUID="654d0ae8-7610-4b4d-805b-813115496743" CreationDate="2011-06-14T10:47:29.730" UserId="5612" Text="When I read about how to get the direction vector in raycasting, for example on this site: http://www.daimi.au.dk/~trier/?page_id=98&#xD;&#xA;&#xD;&#xA;They first render the mesh with front face culling and then with back face culling. And then subtract the backface from the front to get at a direction vector for each pixel.&#xD;&#xA;&#xD;&#xA;But is this not to much work to get the direction vector, is it not more simpler and faster to just take the vertex position(in world coordinates) and subtract the camera position in the fragment shader to get the direction vector? This should give the exact same answer but we skip the backface and frontface rendering." />
  <row Id="30297" PostHistoryTypeId="1" PostId="13618" RevisionGUID="654d0ae8-7610-4b4d-805b-813115496743" CreationDate="2011-06-14T10:47:29.730" UserId="5612" Text="Direction vector in raycasting" />
  <row Id="30298" PostHistoryTypeId="3" PostId="13618" RevisionGUID="654d0ae8-7610-4b4d-805b-813115496743" CreationDate="2011-06-14T10:47:29.730" UserId="5612" Text="&lt;shaders&gt;&lt;ray-casting&gt;" />
  <row Id="30299" PostHistoryTypeId="2" PostId="13619" RevisionGUID="0a2e70ea-9095-4583-800b-41bb5d0e7c48" CreationDate="2011-06-14T11:29:33.500" UserId="7728" Text="The issue here is that there is no &quot;vertex position&quot; to compare against the camera position; the article you mention is talking about a raytracing implementation which doesn't feed model vertices and triangles to a shader in the usual way;  instead, it would feed the GPU just one big 2D quad to cover the whole screen, and the rendering of model data would then be performed within the pixel shader applied to that single quad.  (In this case, the model data is being provided as a large translucent 3D texture for the ray-tracing to sample through)&#xD;&#xA;&#xD;&#xA;The approach described basically seems to be a clever method of generating the direction for a ray through every pixel of the screen, which ordinarily requires some trigonometry per pixel to generate.  By using this approach, it seems to be possible to get those same rays using some pre-calculated renders and a simple vector subtraction per pixel.  Of course, I haven't actually tried this approach to verify that it works, but the approach seems plausible to me." />
  <row Id="30300" PostHistoryTypeId="2" PostId="13620" RevisionGUID="e4799b5f-8903-4605-bd6a-3d56dea4d309" CreationDate="2011-06-14T11:49:58.730" UserId="5399" Text="Out of every format I know, the only one that works accross all applications perfectly is OBJ. I think it is an excellent format and I would use it for everything - except it does not support skinning.&#xD;&#xA;&#xD;&#xA;I am wondering, why the spec has never been extended to include support for skinning. &#xD;&#xA;It wouldn't require overhauling the format - just add a 'vertex weight' and 'vertex bone id' parameter, and a list of bones and transforms at the end (or perhaps store all skinning data in a seperate file in the same way as material parameters are)&#xD;&#xA;&#xD;&#xA;Its frustrating battling with all the other formats, while OBJ is just sitting there lacking this one thing.&#xD;&#xA;&#xD;&#xA;Could someone with more industry experience theorise as to why this extension has never been added?" />
  <row Id="30301" PostHistoryTypeId="1" PostId="13620" RevisionGUID="e4799b5f-8903-4605-bd6a-3d56dea4d309" CreationDate="2011-06-14T11:49:58.730" UserId="5399" Text="Why hasn't OBJ been extended to support skinning?" />
  <row Id="30302" PostHistoryTypeId="3" PostId="13620" RevisionGUID="e4799b5f-8903-4605-bd6a-3d56dea4d309" CreationDate="2011-06-14T11:49:58.730" UserId="5399" Text="&lt;architecture&gt;&lt;file-format&gt;&lt;extension&gt;&lt;industry&gt;" />
  <row Id="30303" PostHistoryTypeId="2" PostId="13621" RevisionGUID="d71712ca-c8cc-4563-bba7-c6d8b46d6afc" CreationDate="2011-06-14T11:57:26.243" UserId="4894" Text="Yes, you can separate your game per screen. In fact, usually only the game itself needs to use a specific 2D/3D rendering, but classic slash scree, menu, options can be done with the classic android layout and some tweaking on the appearance. &#xD;&#xA;&#xD;&#xA;Besides this let you change each screen independently, and just create different intents to play the game, with specific information (like which level to load, the saved states etc..) in the intent data&#xD;&#xA;" />
  <row Id="30304" PostHistoryTypeId="2" PostId="13622" RevisionGUID="bc6e7612-6e7e-4dc4-aad4-f4c5e176c26c" CreationDate="2011-06-14T12:04:18.100" UserId="741" Text="Lack of time and expected reward.&#xD;&#xA;&#xD;&#xA;There's a lot more to skinning than just adding vertex / bone weights to a geometry format, there's not much point in having that unless you also have the skeleton definition. And that's a lot more work, even for a basic implementation. Not to mention, none of the tools which export to OBJ format will support it. Why bother, when you already have other animation formats already defined, formats which are much better suited to storing animation data?&#xD;&#xA;&#xD;&#xA;There's nothing stopping you or anyone else from extending the format yourself, both on the export and import sides. But an organised extension to the spec would be work for whomever took it on. Better to treat OBJ as what it is: a static geometry format." />
  <row Id="30305" PostHistoryTypeId="25" PostId="13618" RevisionGUID="132e023c-b7ba-48ba-9b28-903f068c42cc" CreationDate="2011-06-14T12:21:29.800" Comment="http://twitter.com/#!/StackGameDev/status/80610809885102080" />
  <row Id="30306" PostHistoryTypeId="5" PostId="13603" RevisionGUID="4c91afed-7864-4b82-9d23-4a9c32d7ab5c" CreationDate="2011-06-14T12:36:39.473" UserId="7514" Comment="deleted 3 characters in body; added 1 characters in body" Text="As jhocking said in the comment, FOW is unknown areas.&#xD;&#xA;&#xD;&#xA;Computers can't draw infinite terrain. The lag would be incredible. Fog is used to blend in the edge of the render distance, which doesn't need to be close to the camera, nor does there need to be a large blend range.&#xD;&#xA;&#xD;&#xA;You sound like you are thinking of a very short view range. Increasing your view range to a large number (this is set in your projection matrix), and sticking fog at the end, makes it seem like an endlessly shown terrain. And the fog isn't really that noticable.&#xD;&#xA;&#xD;&#xA;However if you still want a precise answer to your question,&#xD;&#xA;&#xD;&#xA;Weather, such as rain, snow, wind, etc. can help obscure the out of range area.&#xD;&#xA;&#xD;&#xA;Terrain which reaches the clouds...  Having mountains in your terrain, then having clouds at the top of the world, means that in the distance, you will find the edge of the world hidden by mountains, (or if your high up, clouds).&#xD;&#xA;&#xD;&#xA;Finally, if your really desperate you could stick a curve onto your world, so that it appears that things in the difference are disappearing over the horizon.&#xD;&#xA;&#xD;&#xA;However i still suggest you use fog, as it is simply a blending for the out of range area." />
  <row Id="30307" PostHistoryTypeId="2" PostId="13623" RevisionGUID="2e45fe39-576b-4a04-8d34-184b3feb124b" CreationDate="2011-06-14T12:45:27.307" UserId="7588" Text="Maybe you could draw your terrain with a spherical bend to it like on real planets :)&#xD;&#xA;The clipping would be hidden naturally as you wouldn't have to draw anything that is hidden by the terrain you're on.&#xD;&#xA;&#xD;&#xA;Of course, you wouldn't want to infinately draw terrain anyway, as your objects will be too small to be correctly drawn on screen (less than 1 pixel) and it will aliaze like mad.&#xD;&#xA;&#xD;&#xA;Basically you get nasty artefacts when geomety starts 'popping-up' out of your far plane. If your far plane is 'far' enough, only objects of certain height will noticabely 'pop' out of the plane. In this case you could maybe pre-calculate the large objects and always draw them, sclaed dependant on the distance from the far plane.&#xD;&#xA;&#xD;&#xA;__Or__ you could just use fog." />
  <row Id="30308" PostHistoryTypeId="5" PostId="13623" RevisionGUID="3746f0be-f89c-4eff-b9f2-16911004d38a" CreationDate="2011-06-14T12:50:30.233" UserId="7588" Comment="added 224 characters in body" Text="Maybe you could draw your terrain with a spherical bend to it like on real planets :)&#xD;&#xA;The clipping would be hidden naturally as you wouldn't have to draw anything that is hidden by the terrain you're on.&#xD;&#xA;&#xD;&#xA;Of course, you wouldn't want (or be able) to infinately draw terrain anyway, as your objects will be too small to be correctly drawn on screen (less than 1 pixel) and it will aliaze like mad.&#xD;&#xA;&#xD;&#xA;Your terrain will also never be infinate as you have finite resources (VRAM, RAM, HDD) on your computer. I am therefore guessing it is a terrain generator, that generated terrain randomly in front of you.&#xD;&#xA;&#xD;&#xA;In this case you get nasty artefacts when geomety starts 'popping-up' out of your far plane. If your far plane is 'far' enough, only objects of certain height will noticabely 'pop' out of the plane. In this case you could maybe pre-calculate the large objects and always draw them, sclaed dependant on the distance from the far plane.&#xD;&#xA;&#xD;&#xA;__Or__ you could just use fog." />
  <row Id="30309" PostHistoryTypeId="2" PostId="13624" RevisionGUID="b21732d4-63a2-4ef6-817f-1d52c8504346" CreationDate="2011-06-14T13:02:44.683" UserId="6469" Text="there are two slightly different scenarios I am interested in and I'l give you examples of each.&#xD;&#xA;&#xD;&#xA;The first is a like the tournament system in super smash brothers melee when there are dozens of cpu vs cpu battles and it has to choose a winner. This could be done with a random number generator but I feel there is something more there.&#xD;&#xA;&#xD;&#xA;The second is in some games, mostly strategy games you can choose to play a battle or have the computer calculate the battle for you. the game medieval total war comes to mind where is calculates how many troops you and the computer lose.&#xD;&#xA;in these scenarios it never goes as well as if I had done it my self but I usually win if it is plausible.&#xD;&#xA;&#xD;&#xA;What I want to know is how these battles are calculated, does anyone know how it is done or have an idea of how to implement it?&#xD;&#xA;&#xD;&#xA;I had an idea of juts doing the battle normally but disabling all the graphic display so it would conclude very fast but in not sure this would work to well.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30310" PostHistoryTypeId="1" PostId="13624" RevisionGUID="b21732d4-63a2-4ef6-817f-1d52c8504346" CreationDate="2011-06-14T13:02:44.683" UserId="6469" Text="Calculate winner of battle when auto is chosn" />
  <row Id="30311" PostHistoryTypeId="3" PostId="13624" RevisionGUID="b21732d4-63a2-4ef6-817f-1d52c8504346" CreationDate="2011-06-14T13:02:44.683" UserId="6469" Text="&lt;c++&gt;&lt;automation&gt;" />
  <row Id="30312" PostHistoryTypeId="2" PostId="13625" RevisionGUID="1a010992-36aa-4abf-b64f-54dab86beefd" CreationDate="2011-06-14T13:13:28.473" UserId="7588" Text="The idea of doing the battle &quot;normally&quot; (usually multiplying any time deltas to make it go faster) is a simulation approach, like used in Football Managers, etc.&#xD;&#xA;&#xD;&#xA;This approach has the benefit of being __precise__ and if it is an option to 'skip' the battle, it is also reusing game code with an AI replacing the player.&#xD;&#xA;&#xD;&#xA;A random number generator can work, it all depends on your needs. You could couple this generator with simple calculations dependant on player stats (wins/losses, strength, etc.) and use these to determine the outcome.&#xD;&#xA;&#xD;&#xA;It is a fine balance between simulation and randomness when the only data the player has is the starting state and the end state. You need to balance it so that the player doesn't have an advantage in skipping battles if it is optional because he will prefer not to play. He also needs to feel that he is not cheated out of an easy win." />
  <row Id="30313" PostHistoryTypeId="2" PostId="13626" RevisionGUID="6cae817f-58e2-451b-838b-a2fb489b77cb" CreationDate="2011-06-14T13:17:16.423" UserId="7991" Text="I want to be able to create addons for any game, the example I will use is League of Legends. With addons I mean, for example when my level integer changes I want to play a sound in the background.&#xD;&#xA;&#xD;&#xA;The programming language I want to use is C#. &#xD;&#xA;&#xD;&#xA;What I want to know is how I'm able to read my level integer inside C#, from there on I should be able to do anything I want.&#xD;&#xA;&#xD;&#xA;What I've found out is, with a program like Cheat Engine you can look for memory values and adresses inside your RAM. And I think there is a way to assign a variable in C# to the value of a memory adress. But how can I find the value of my level in the first place? The memory adress might change each time I start the game or even level up. I think it has something to do with pointers, but where do I find the pointer? &#xD;&#xA;&#xD;&#xA;But the biggest problem is that I can't even find some values I look for iside the memory. Maybe it encrypts the values? How can I find out what it does and where it puts it? An example is Flash games. If you look for the variable money that has a value of 100 you need to multiply it by 8 and look for 800 iside the memory of that process.&#xD;&#xA;&#xD;&#xA;- How do I find the correct memory adress each time?&#xD;&#xA;- How do I find out the way it might save a variable?&#xD;&#xA;&#xD;&#xA;I'll give any extra information about the problem if you want.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Diede" />
  <row Id="30314" PostHistoryTypeId="1" PostId="13626" RevisionGUID="6cae817f-58e2-451b-838b-a2fb489b77cb" CreationDate="2011-06-14T13:17:16.423" UserId="7991" Text="Creating addons for any game?" />
  <row Id="30315" PostHistoryTypeId="3" PostId="13626" RevisionGUID="6cae817f-58e2-451b-838b-a2fb489b77cb" CreationDate="2011-06-14T13:17:16.423" UserId="7991" Text="&lt;c#&gt;&lt;platform-games&gt;&lt;memory-efficiency&gt;" />
  <row Id="30316" PostHistoryTypeId="2" PostId="13627" RevisionGUID="b25dfbec-b041-4e29-8a89-49cfe2a2f4fe" CreationDate="2011-06-14T13:36:28.287" UserId="163" Text="In addition to terrain LOD, you can render distant game objects and other things like buildings and vehicles using impostors. A good example/visualization of this technique can be seen here: [http://www.markmark.net/clouds/][1]&#xD;&#xA;&#xD;&#xA;![Cloud Impostors][2]&#xD;&#xA;&#xD;&#xA;The idea being that you render distant objects once into a texture, then, as long as your viewpoint doesn't change dramatically, or the object itself doesn't change you can continue to render the texture for very little cost.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.markmark.net/clouds/&#xD;&#xA;  [2]: http://i.stack.imgur.com/RbYq7.jpg" />
  <row Id="30317" PostHistoryTypeId="5" PostId="13626" RevisionGUID="056302ea-70ba-4cd9-9f9b-586382e980da" CreationDate="2011-06-14T13:43:11.200" UserId="14" Comment="deleted 18 characters in body" Text="I want to be able to create addons for any game, the example I will use is League of Legends. With addons I mean, for example when my level integer changes I want to play a sound in the background.&#xD;&#xA;&#xD;&#xA;The programming language I want to use is C#. &#xD;&#xA;&#xD;&#xA;What I want to know is how I'm able to read my level integer inside C#, from there on I should be able to do anything I want.&#xD;&#xA;&#xD;&#xA;What I've found out is, with a program like Cheat Engine you can look for memory values and adresses inside your RAM. And I think there is a way to assign a variable in C# to the value of a memory adress. But how can I find the value of my level in the first place? The memory adress might change each time I start the game or even level up. I think it has something to do with pointers, but where do I find the pointer? &#xD;&#xA;&#xD;&#xA;But the biggest problem is that I can't even find some values I look for iside the memory. Maybe it encrypts the values? How can I find out what it does and where it puts it? An example is Flash games. If you look for the variable money that has a value of 100 you need to multiply it by 8 and look for 800 iside the memory of that process.&#xD;&#xA;&#xD;&#xA;- How do I find the correct memory adress each time?&#xD;&#xA;- How do I find out the way it might save a variable?&#xD;&#xA;&#xD;&#xA;I'll give any extra information about the problem if you want." />
  <row Id="30318" PostHistoryTypeId="5" PostId="13498" RevisionGUID="0c854e4a-3819-401f-ac73-1aca0f49d125" CreationDate="2011-06-14T13:43:21.900" UserId="3588" Comment="Removed salutation, added a couple tags, and made a tiniest change to the last sentence ♪" Text="Right now I'm working on input for my game.&#xD;&#xA;&#xD;&#xA;The only controller I own is an XBOX 360 one.&#xD;&#xA;&#xD;&#xA;From what I can see, if a controller's stick has a Z axis, these are actually triggers.&#xD;&#xA;&#xD;&#xA;Essentially I'm wondering if from one controller to the next, will this be consistent?" />
  <row Id="30319" PostHistoryTypeId="6" PostId="13498" RevisionGUID="0c854e4a-3819-401f-ac73-1aca0f49d125" CreationDate="2011-06-14T13:43:21.900" UserId="3588" Comment="Removed salutation, added a couple tags, and made a tiniest change to the last sentence ♪" Text="&lt;c++&gt;&lt;input&gt;&lt;joystick&gt;&lt;controllers&gt;" />
  <row Id="30320" PostHistoryTypeId="24" PostId="13498" RevisionGUID="0c854e4a-3819-401f-ac73-1aca0f49d125" CreationDate="2011-06-14T13:43:21.900" Comment="Proposed by 3588 approved by 14 edit id of 492" />
  <row Id="30321" PostHistoryTypeId="2" PostId="13628" RevisionGUID="8bf58f4e-3e68-4340-ba4b-692dfa2af8bc" CreationDate="2011-06-14T13:44:04.207" UserId="163" Text="The question you want an answer to is inherently unanswerable ... at least in this format. You want to start poking around in the memory, which, with most modern programs can be an exercise in futility when you take into account garbage collection and memory defragmenting algorithms. That means that values will shift around in memory, and only the program itself will know the value addresses.&#xD;&#xA;&#xD;&#xA;Without modifying the program, you probably won't be able to do what you're looking for." />
  <row Id="30322" PostHistoryTypeId="2" PostId="13629" RevisionGUID="faf8d548-daf2-4385-97a4-323832c52ff4" CreationDate="2011-06-14T14:07:28.840" UserId="7772" Text="After more experimenting, I do believe this has to do with the accelerometer.  Regardless of the in-game frame rate, I hit this input lag delay (touch and acceleration), but only when constantly polling the accelerometer.  I'm using a lowpass filter on the info, but that should be unrelated.  If you have a similar issue, try talking with the accelerometer at a reduced rate." />
  <row Id="30323" PostHistoryTypeId="2" PostId="13630" RevisionGUID="39e5afdb-edc9-4e8c-be03-5afe0bdd4fdf" CreationDate="2011-06-14T14:26:33.270" UserId="1430" Text="You can do this in C#, but you'll likely need to [P/Invoke][1] a lot of the functionality you'd need. C or C++ is probably more well-suited to the task -- you'll have fewer hoops to jump through. There are a few [open source &quot;cheat engine&quot;][2] projects out there you can look at for a better idea of what you're going to have to do.&#xD;&#xA;&#xD;&#xA;&gt; How do I find the correct memory&#xD;&#xA;&gt; adress each time?&#xD;&#xA;&#xD;&#xA;Mostly through trial and error. A *lot* of trial and error. Once you've found it the first time, you may be able to rely on the fact that it will be located at a fixed offset from the load address of the program, but this will only be true for a very small subset of the data manipulated by any given program. You will likely need to relocate the variable in memory every time.&#xD;&#xA;&#xD;&#xA;&gt; How do I find out the way it might&#xD;&#xA;&gt; save a variable?&#xD;&#xA;&#xD;&#xA;By reading the disassembled machine code of the program, you may eventually be able to locate how it modifies a particular variable. This will be extremely tedious.&#xD;&#xA;&#xD;&#xA;I think you are biting off way more than you can chew here, but the basic (naive) premise here is that you have to scan the process memory for a value that matches the one you are after -- if you have 100 hit points, you start walking the entire thing looking for values of 100 (as 8, 16 and 32 bit values) and keeping track of the addresses you find. Once you have that initial set, you change the value you are looking for -- get hit, for example, so you now have 94 hit points. Then you scan the addresses you found before to see which ones are now 94. You can eventually narrow down the address in question this way. &#xD;&#xA;&#xD;&#xA;Of course this doesn't always work; sometimes you'll only find a display value and not the real representation of health (which may be stored as a float from 0 to 1 instead of an integer from 1 to 100) in which case modifying that integer won't really impact game play at all -- you'd still die, you'd just have a full health meter when you did so. Games and technology vary wildly, and what works for one will usually not work for others.&#xD;&#xA;&#xD;&#xA;This is generally a very complex topic and the above is only a very naive, superficial overview. Practically speaking you're probably much better off simply *using* an existing tool or contributing to an open source project oriented at making one, because the way you've phrased your question honestly makes it sound like you aren't ready for this kind of project.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Platform_Invocation_Services&#xD;&#xA;  [2]: http://www.cheatengine.org/aboutce.php" />
  <row Id="30324" PostHistoryTypeId="2" PostId="13631" RevisionGUID="d427785a-acc6-4550-8582-3f8f390a6197" CreationDate="2011-06-14T14:30:17.917" UserId="1430" Text="Just about any existing UI framework that allows you to control the textures used in the GUI widgets should work -- just because none of them *ship* with an out-of-the-box &quot;DOS&quot; look doesn't mean they can't support one. &#xD;&#xA;&#xD;&#xA;After all, what you are talking about is mostly just appearance. You just need to use highly pixelated (or &quot;lo fi&quot;) textures for your UI artwork. Kind of like [this sprite set][1], which has some bitmap letters that might be a good start for you, at least.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/index.php?topic=8970.0" />
  <row Id="30325" PostHistoryTypeId="5" PostId="13388" RevisionGUID="38e9ca95-f6c6-443e-91e7-d84a115c2375" CreationDate="2011-06-14T14:44:19.710" UserId="7881" Comment="deleted 41 characters in body" Text="I ran into a similar problem and decided to create my own structure to handle the data. It's based loosely on a quadtree, but has infinite (at least as big as an Int) expandability in all directions. It was designed to handle grid-based data which expanded from a central point, much like Minecraft does now. It is space efficient in memory, and very fast.&#xD;&#xA;&#xD;&#xA;You can specify a minimum magnitude for each node (a magnitude of 7 would be 128x128) and once any node has a specified percentage of its subnodes populated, it automatically flattens itself into a two-dimensional array. This means that a very densely populated portion (e.g., a completely explored continent) will have the performance of an array (very fast) but a sparsely populated portion (e.g., a shoreline someone wandered up and down but didn't explore inland) will have good performance and a low memory usage.&#xD;&#xA;&#xD;&#xA;My code can be found [here][1]. The code is complete, tested (unit- and load-tests), and quite optimized. The inner workings aren't too well documented yet, however, but all the public methods are so it should be usable. If anyone decides to try it out, feel free to contact me with questions or comments.&#xD;&#xA;&#xD;&#xA;I've not yet used it to store data to a file, but it's an interesting problem and I may tackle that next.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://j.mp/mtRWVq" />
  <row Id="30326" PostHistoryTypeId="4" PostId="13624" RevisionGUID="6379535b-0bee-4452-9b6b-754f7dec960f" CreationDate="2011-06-14T15:06:29.320" UserId="6469" Comment="edited title" Text="Calculate winner of battle when auto is chosen" />
  <row Id="30327" PostHistoryTypeId="25" PostId="13624" RevisionGUID="ddeb2203-8fb2-4e58-9f49-a07abead8c7a" CreationDate="2011-06-14T15:21:30.690" Comment="http://twitter.com/#!/StackGameDev/status/80656112193507328" />
  <row Id="30328" PostHistoryTypeId="2" PostId="13632" RevisionGUID="0c35436c-1bd7-472c-bb6f-1e3d1dcb4f31" CreationDate="2011-06-14T15:32:27.867" UserId="7862" Text="If you're thinking of developing something along the lines of a Roguelike, try [this][1] FAQ. While that wiki doesn't generally tell you how to program any of the things it describes it does give you a good look at what you need to consider while designing an rpg.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://roguebasin.roguelikedevelopment.org/mediawiki/index.php/Roguelike_Dev_FAQ" />
  <row Id="30329" PostHistoryTypeId="2" PostId="13633" RevisionGUID="b978d89e-dbd0-479e-a806-9991e3f680c4" CreationDate="2011-06-14T15:37:09.160" UserId="7981" Text="I believe I read somewhere that there is a technique which will make games appar more smooth than they are. I believe it is some visual trick, but I don't remember which one. (It is be something like &quot;You percieve game to be more fluid if there is good shadows&quot;).&#xD;&#xA;&#xD;&#xA;I may be wrong and there is no such thing.&#xD;&#xA;&#xD;&#xA;Thanks :)." />
  <row Id="30330" PostHistoryTypeId="1" PostId="13633" RevisionGUID="b978d89e-dbd0-479e-a806-9991e3f680c4" CreationDate="2011-06-14T15:37:09.160" UserId="7981" Text="How to make game appear to run faster?" />
  <row Id="30331" PostHistoryTypeId="3" PostId="13633" RevisionGUID="b978d89e-dbd0-479e-a806-9991e3f680c4" CreationDate="2011-06-14T15:37:09.160" UserId="7981" Text="&lt;graphics&gt;&lt;graphics-programming&gt;&lt;frame-rate&gt;" />
  <row Id="30332" PostHistoryTypeId="6" PostId="13482" RevisionGUID="6747cd3a-47ce-44d0-9d52-21ca9ac344c8" CreationDate="2011-06-14T16:00:25.443" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;" />
  <row Id="30333" PostHistoryTypeId="2" PostId="13634" RevisionGUID="852fd6d8-30de-444b-863e-e442b386736a" CreationDate="2011-06-14T16:02:54.977" UserId="51" Text="You're probably thinking of motion blur." />
  <row Id="30334" PostHistoryTypeId="5" PostId="13633" RevisionGUID="167b9e51-4352-4fde-8e61-2b7d1affc81c" CreationDate="2011-06-14T16:03:06.223" UserId="51" Comment="deleted 11 characters in body" Text="I believe I read somewhere that there is a technique which will make games appear more smooth than they are. I believe it is some visual trick, but I don't remember which one. (It is be something like &quot;You percieve game to be more fluid if there is good shadows&quot;).&#xD;&#xA;&#xD;&#xA;I may be wrong and there is no such thing.&#xD;&#xA;" />
  <row Id="30335" PostHistoryTypeId="2" PostId="13635" RevisionGUID="396c1343-2130-4322-a2be-1ece27b2e9dc" CreationDate="2011-06-14T16:06:19.880" UserId="6588" Text="You can't really make the game overall appear faster than it is, but you can make slow parts look faster (or at any rate less noticeable) by de-coupling them from everything else so that everything else can run faster. Indeed, this is precisely why network commands are done asynchronously.&#xD;&#xA;&#xD;&#xA;Similar things can be done locally, whenever one part of the game is slower than other parts. For example, physics updates are often run asynchronously from the rendering loop. Perhaps character animations are updated on a separate thread from background graphics, etc." />
  <row Id="30336" PostHistoryTypeId="2" PostId="13636" RevisionGUID="e4b47082-8fb5-4fa8-8191-54ba8a91fbc4" CreationDate="2011-06-14T16:18:10.343" UserId="1101" Text="There's virtually no standardisation at all. Even if you just take the default controller for each platform they all map controls differently and the expected behaviour differs (eg. which of the buttons is meant to go back, which is to confirm, etc). And even if there was something common across all the controllers, what about the other controls - users may wish to use them, especially if they chose that controller especially for the extras.&#xD;&#xA;&#xD;&#xA;At a minimum you need to test with the main individual controllers you wish to support. Ideally you need to be able to remap any button, trigger, or axis to any appropriate in-game action, then ship with defaults for common controllers and let players configure controllers to their satisfaction." />
  <row Id="30337" PostHistoryTypeId="2" PostId="13637" RevisionGUID="dc6fbaa1-79b0-4fc6-a248-3c5d376c4720" CreationDate="2011-06-14T16:24:22.417" UserId="962" Text="There is a way to allow updating at fixed rate, and rendering at whatever rate the users system can handle.&#xD;&#xA;&#xD;&#xA;You need to implement a fixed time-step, which has the upside of making your game simulation determistic. And you need to implement interpolation in the drawing method, which will allow the drawing rate to be much higher than the updating rate, while looking really smooth.&#xD;&#xA;&#xD;&#xA;**Fixed time-step**&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12347/semi-fixed-or-fully-fixed-timestep/12368#12368&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Interpolation**&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12754/how-to-interpolate-between-two-game-states&#xD;&#xA;" />
  <row Id="30338" PostHistoryTypeId="2" PostId="13638" RevisionGUID="329ecf26-e7b4-4999-bf59-b1c902105c6c" CreationDate="2011-06-14T16:29:38.260" UserId="7993" Text="One of the struggles I've always had in game development is deciding how to implement experience points attributed to gaining a level.  There doesn't seem to be a pattern to gaining a level in many of the games I've played, so I assume they have a static dictionary table which contains experience points vs. the level.  e.g.&#xD;&#xA;&#xD;&#xA;    Experience   Level&#xD;&#xA;    0            1&#xD;&#xA;    100          2&#xD;&#xA;    175          3&#xD;&#xA;    280          4&#xD;&#xA;    800          5&#xD;&#xA;&#xD;&#xA;...There isn't a rhyme or reason why 280 points is equal to level 4, it just is.&#xD;&#xA;&#xD;&#xA;I'm not sure how those levels are decided, but it certainly wouldn't be dynamic.  I've also thought about the possibility of exponential levels, as not to have to keep a seperate lookup table, e.g.&#xD;&#xA;&#xD;&#xA;    Experience   Level&#xD;&#xA;    0            1&#xD;&#xA;    100          2&#xD;&#xA;    200          3&#xD;&#xA;    400          4&#xD;&#xA;    800          5&#xD;&#xA;    1600         6&#xD;&#xA;    3200         7&#xD;&#xA;    6400         8&#xD;&#xA;&#xD;&#xA;...but that seems like it would grow out of control rather quickly, as towards the upper levels, the enemies in the game would have to provide a whopping amount of experience to level -- and that would be to difficult to control.  Leveling would become an impossible task.&#xD;&#xA;&#xD;&#xA;Does anyone have any pointers, or methods they use to decide how to *level* a character based on experience?  I want to be fair in leveling and I want to stay ahead of the players as not to worry about constantly adding new experience/level lookups." />
  <row Id="30339" PostHistoryTypeId="1" PostId="13638" RevisionGUID="329ecf26-e7b4-4999-bf59-b1c902105c6c" CreationDate="2011-06-14T16:29:38.260" UserId="7993" Text="Algorithm for dynamically calculating a level based on experience points?" />
  <row Id="30340" PostHistoryTypeId="3" PostId="13638" RevisionGUID="329ecf26-e7b4-4999-bf59-b1c902105c6c" CreationDate="2011-06-14T16:29:38.260" UserId="7993" Text="&lt;game-design&gt;" />
  <row Id="30341" PostHistoryTypeId="2" PostId="13639" RevisionGUID="d62398bf-39eb-4880-a69c-a88a408e38e1" CreationDate="2011-06-14T16:43:46.523" UserId="3505" Text="It's quite common to use a square relation.&#xD;&#xA;&#xD;&#xA;`level = constant * sqrt(XP)`&#xD;&#xA;&#xD;&#xA;Or the approximate equivalent of a linearly rising level gap.&#xD;&#xA;&#xD;&#xA;    Level   XP      Difference&#xD;&#xA;    1       0       -&#xD;&#xA;    2       100     100&#xD;&#xA;    3       300     200&#xD;&#xA;    4       600     300&#xD;&#xA;    5       1000    400&#xD;&#xA;&#xD;&#xA;These systems work pretty well when the XP gain is approximately linear. If a high level character can earn XP faster than a low level character then this is not the right system." />
  <row Id="30342" PostHistoryTypeId="2" PostId="13640" RevisionGUID="eba80b47-390e-4949-b852-e1f83df12ce5" CreationDate="2011-06-14T16:46:13.323" UserId="7328" Text="these are some ways i've used so far they are sorted by grow rate (just multiplied every equation by a constant value):&#xD;&#xA;&#xD;&#xA;1. exp = level (this one may seem odd but for some games that reward exp changes according to player level like borderlands this one may fit to)&#xD;&#xA;&#xD;&#xA;2. exp = level + log(level)&#xD;&#xA;&#xD;&#xA;		1	0&#xD;&#xA;		2	0.6&#xD;&#xA;		3	1.4&#xD;&#xA;		4	2.4&#xD;&#xA;		5	3.5&#xD;&#xA;		6	4.6&#xD;&#xA;&#xD;&#xA;3. exp = level^const_value : for my example i set const value to 3/2&#xD;&#xA;&#xD;&#xA;		1	1&#xD;&#xA;		2	2.8&#xD;&#xA;		3	5.1&#xD;&#xA;		4	8&#xD;&#xA;		5	11.2&#xD;&#xA;		6	27&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30343" PostHistoryTypeId="2" PostId="13641" RevisionGUID="b9db3752-4206-4c35-904d-987635b3fc8e" CreationDate="2011-06-14T16:46:17.783" UserId="7952" Text="I think it depends how how easy the player can get the experience. If the player can get 200 xp at lvl 1 in 20 minutes and then get 200 xp at lvl 2 in 2 minutes, then you need to scale your xp exponentially.&#xD;&#xA;&#xD;&#xA;However if gaining a level only makes it marginally easier to gain xp, then you should do a more level xp function. (Maybe linear with some coefficient &gt; 1)" />
  <row Id="30344" PostHistoryTypeId="2" PostId="13642" RevisionGUID="26378e99-3d0b-451b-9b70-bdbc81fac9eb" CreationDate="2011-06-14T16:49:26.560" UserId="7548" Text="You'll probably find _logarithmic functions_ helpful as they can be used to slow down the increase as more experience points are gained.  Here are two web pages that explain how these work:&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Graphs of Logarithmic Functions&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.analyzemath.com/Graphing/GraphLogarithmicFunction.html&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Introduction to Graphing Logarithmic Functions&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.purplemath.com/modules/graphlog.htm&#xD;&#xA;&#xD;&#xA;Here's what it looks like on a graph, which will hopefully meet your needs:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/CY13G.gif" />
  <row Id="30345" PostHistoryTypeId="5" PostId="13366" RevisionGUID="866a687d-9267-4fda-862b-d6bc44dea647" CreationDate="2011-06-14T16:53:10.987" UserId="7548" Comment="added 318 characters in body" Text="You could use a database instead -- PostgreSQL has some special indexing capabilities optimized for this type of data which is located by X and Y coordinates.  You can also specify that the data returned is within a certain radius rather than in a square or oblong shaped area.&#xD;&#xA;&#xD;&#xA;&amp;nbsp; PostgreSQL (free and open source)&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.postgresql.org/&#xD;&#xA;&#xD;&#xA;There are other databases as well, and for the client-side you may find certain types to be better-suited to this since they can run stand-alone (initiated by your game client application) or can be included as part of a code library that you can &quot;just use.&quot;  The advantage is that you don't have to design an indexing scheme because most SQL database engines already do this quite well.&#xD;&#xA;&#xD;&#xA;An advantage with the database approach is that you can make your chunks smaller (or get rid of chunks completely and just use tiles directly, but the use of at least small chunks/groups of many tiles may be more efficient depending on your design), and then use the SQL query to bring in a larger area than is viewable.  By pre-loading to overlap nearby non-viewable areas, the tiles can be prepared _before_ the player moves their character, resulting in a better (hopefully smoother) gaming experience.&#xD;&#xA;&#xD;&#xA;I've noticed that some games keep a &quot;cache&quot; of the map data on the local hard drive after obtaining it the first time (this is undoubtedly to reduce network I/O), such as Ashen Empires:&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Ashen Empires (free to play, beautiful 2D implementation)&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.ashenempires.com/&#xD;&#xA;&#xD;&#xA;Keeping track of &quot;last updated&quot; timestamps with each chunk/tile will also be helpful since, for where locally stored data is available, the SQL query could include an additional &quot;WHERE timestamp_column &gt; $local_timestamp&quot; clause so that only updated chunks/tiles get downloaded (two benefits of saving bandwidth like this are lower connectivity costs, and less lag for your players, which will become more obvious when your game gets popular).&#xD;&#xA;&#xD;&#xA;A screen shot from Ashen Empires (a few characters are at a local bank, and by the looks of those bones on the floor it looks like a few skeleton monsters must've wandered in and were likely slaughtered by the local town's guards):&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Q9fHH.gif" />
  <row Id="30346" PostHistoryTypeId="2" PostId="13643" RevisionGUID="f39c4f46-519b-40ae-baa9-bc11812f8ac9" CreationDate="2011-06-14T16:56:18.980" UserId="7990" Text="okay I just figured everything out...all I had to do was to set the linearVeolcity using boolean logic. i.e &#xD;&#xA;if(counter &lt;50) &#xD;&#xA;{&#xD;&#xA; if(toggle)&#xD;&#xA;  { &#xD;&#xA;    body-&gt;setLinearVelocity(5.0,0.0) &#xD;&#xA;  } &#xD;&#xA; else &#xD;&#xA;  { &#xD;&#xA;    body-&gt;SetLinearVelocity(-5.0,0.0) &#xD;&#xA;  } &#xD;&#xA;  toggle = !toggle &#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;counter++; &#xD;&#xA;&#xD;&#xA;if(counter&gt;50) &#xD;&#xA;{ &#xD;&#xA; break away from being static body &#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;all of the above code has to go in to the timeStep under the loop in which you iterate the b2Bodies of the world.....the logic is simple. &#xD;&#xA; " />
  <row Id="30347" PostHistoryTypeId="2" PostId="13644" RevisionGUID="c0cd7808-3cbd-4400-815f-84490f62d704" CreationDate="2011-06-14T17:14:18.403" UserId="6867" Text="Is there any way that I can control in which order elements are drawn with instancing?&#xD;&#xA;&#xD;&#xA;Do all elements get drawn in the same order they are added to the instance buffer?" />
  <row Id="30348" PostHistoryTypeId="1" PostId="13644" RevisionGUID="c0cd7808-3cbd-4400-815f-84490f62d704" CreationDate="2011-06-14T17:14:18.403" UserId="6867" Text="Controlling the draw order (z-index) through instancing?" />
  <row Id="30349" PostHistoryTypeId="3" PostId="13644" RevisionGUID="c0cd7808-3cbd-4400-815f-84490f62d704" CreationDate="2011-06-14T17:14:18.403" UserId="6867" Text="&lt;xna&gt;" />
  <row Id="30350" PostHistoryTypeId="5" PostId="13638" RevisionGUID="c63111bb-cb28-40f9-ae93-1915457d69d8" CreationDate="2011-06-14T17:29:53.270" UserId="7993" Comment="deleted 2 characters in body" Text="One of the struggles I've always had in game development is deciding how to implement experience points attributed to gaining a level.  There doesn't seem to be a pattern to gaining a level in many of the games I've played, so I assume they have a static dictionary table which contains experience points vs. the level.  e.g.&#xD;&#xA;&#xD;&#xA;    Experience   Level&#xD;&#xA;    0            1&#xD;&#xA;    100          2&#xD;&#xA;    175          3&#xD;&#xA;    280          4&#xD;&#xA;    800          5&#xD;&#xA;&#xD;&#xA;...There isn't a rhyme or reason why 280 points is equal to level 4, it just is.&#xD;&#xA;&#xD;&#xA;I'm not sure how those levels are decided, but it certainly wouldn't be dynamic.  I've also thought about the possibility of geometric levels, as not to have to keep a seperate lookup table, e.g.&#xD;&#xA;&#xD;&#xA;    Experience   Level&#xD;&#xA;    0            1&#xD;&#xA;    100          2&#xD;&#xA;    200          3&#xD;&#xA;    400          4&#xD;&#xA;    800          5&#xD;&#xA;    1600         6&#xD;&#xA;    3200         7&#xD;&#xA;    6400         8&#xD;&#xA;&#xD;&#xA;...but that seems like it would grow out of control rather quickly, as towards the upper levels, the enemies in the game would have to provide a whopping amount of experience to level -- and that would be to difficult to control.  Leveling would become an impossible task.&#xD;&#xA;&#xD;&#xA;Does anyone have any pointers, or methods they use to decide how to *level* a character based on experience?  I want to be fair in leveling and I want to stay ahead of the players as not to worry about constantly adding new experience/level lookups." />
  <row Id="30351" PostHistoryTypeId="5" PostId="13644" RevisionGUID="5b311864-8a05-47e4-829d-02c9416d1699" CreationDate="2011-06-14T17:33:49.057" UserId="6867" Comment="added 213 characters in body" Text="Is there any way that I can control in which order elements are drawn with instancing?&#xD;&#xA;&#xD;&#xA;Do all elements get drawn in the same order they are added to the instance buffer?&#xD;&#xA;&#xD;&#xA;Edit: What about the Z coordinate! Since I am drawing my GUI through this, I should be able to just put elements in front of others, right? I am not at home to try this out yet. I will keep the thread updated." />
  <row Id="30352" PostHistoryTypeId="2" PostId="13645" RevisionGUID="0cef0a94-74e6-4baa-9d95-1ace42fa75f8" CreationDate="2011-06-14T17:41:15.590" UserId="962" Text="If you are doing 3D, depth should be drawn according the the z-buffer." />
  <row Id="30356" PostHistoryTypeId="2" PostId="13647" RevisionGUID="03c7cd13-88b9-4e70-b209-956b87382cf7" CreationDate="2011-06-14T18:12:19.987" UserId="1430" Text="For projectiles that travel faster than the eye can see, raycasting is often employed - a ray from the muzzle is computed with the appropriate direction and is tested against potential target objects to determine what was hit. This can be complicated with multiple rays and some extra computation if you want to simulate things like bullet drop and such. You can also give the projects a speed and use that to add some additional realism to the computation (so bullets aren't instantaneous). " />
  <row Id="30357" PostHistoryTypeId="2" PostId="13648" RevisionGUID="1338f6d3-0123-403a-8462-f916949bc3b3" CreationDate="2011-06-14T18:19:00.737" UserId="7367" Text="It depends on the implementation but I know that the Source Engine didn't use physical bullets (projectile objects) at all, they just did a ray cast from player to target with a random &quot;hit zone&quot; circle (larger or smaller radii depended on how fast the weapon fired and if the player was holding the fire button down) which its center was the point that the player was aiming, then after determining the actual ray cast from the player to the randomly determined point and depending on other factors (like bullet &quot;weight&quot; and muzzle velocity (all internal numbers), object hit, etc) the ray cast was cast through multiple objects or until it hit terrain.&#xD;&#xA;&#xD;&#xA;On the flip side, the Torque 3D Engine DID use actual projectile objects and the designer could affect their individual speeds, mass, and gravity modifiers. All the engine did was update the values every 32 milliseconds.&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;In addition to using projectile objects, the Torque 3D Engine also allowed for the use of ray casts as an alternative. (I've made several games where the &quot;projectile&quot; is actually a particle effect that has none of the support that projectile objects did so a ray cast was required.)" />
  <row Id="30358" PostHistoryTypeId="25" PostId="13638" RevisionGUID="7e2552e1-a603-4d95-ae96-82ba34f6e68f" CreationDate="2011-06-14T18:22:31.187" Comment="http://twitter.com/#!/StackGameDev/status/80701664264335360" />
  <row Id="30359" PostHistoryTypeId="2" PostId="13649" RevisionGUID="3daf9b37-801e-4a2b-86df-9baa639b9182" CreationDate="2011-06-14T18:47:47.863" UserId="7630" Text="Another strategy is a hybrid of rendering everything and ray tracing everything.  You don't necessarily have to render every bullet.  As an example, if your gun fires 30 rounds/second, a strafe may generate a few hundred particles... you can reduce the rendering by using a &quot;tracer effect&quot;, render every 3rd shot, ray trace the other two.  The player still sees 10 rounds/second firing at the enemy.&#xD;&#xA;&#xD;&#xA;Tweak for your specific situation, render more for lower rate of fire weapons, less for higher." />
  <row Id="30360" PostHistoryTypeId="17" PostId="13650" RevisionGUID="ebab09ec-ad4b-44aa-a4a4-7463788c6812" CreationDate="2011-06-14T19:01:50.200" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/83910/how-are-bullets-simulated-in-video-games" Text="" />
  <row Id="30361" PostHistoryTypeId="2" PostId="13651" RevisionGUID="10fecfc1-9ad0-412e-ba16-48fbcf5101ff" CreationDate="2011-06-14T18:06:59.057" UserId="6588" Text="For bullets they generally don't bother simulating the bullet actually traveling through the air and simply put a bullet hole on the target the instant it's fired. Other things like rockets are slower* and the game actually shows them traveling through the air.&#xD;&#xA;&#xD;&#xA;At the short distances the bullets will be traveling, along with the time lapse between frames, they would get from the shooter to the target between or within 1 frame anyway.&#xD;&#xA;&#xD;&#xA;*That is, slower than rockets in real life, in order for the player to see them flying through the air." />
  <row Id="30362" PostHistoryTypeId="2" PostId="13650" RevisionGUID="071ca0c0-1bd7-45d3-b58b-0376f345be05" CreationDate="2011-06-14T17:58:14.930" UserId="7997" Text="i have been playing games like MW2 recently and as a programmer, i tend to ask myself how do they make the game so immersive. For example, how to they simulate bullet speed. &#xD;&#xA;&#xD;&#xA;1. When an NPC fires a bullet from his gun, does the bullet really travel from his gun to the given target or they they completely ignore this part and just put a bullet hole on the target?&#xD;&#xA;&#xD;&#xA;2. If the bullet is really travelling from the gun to the target, at what speed is it actually travelling? &#xD;&#xA;&#xD;&#xA;Thanks for taking the time to answer my question" />
  <row Id="30363" PostHistoryTypeId="1" PostId="13650" RevisionGUID="071ca0c0-1bd7-45d3-b58b-0376f345be05" CreationDate="2011-06-14T17:58:14.930" UserId="7997" Text="How are bullets simulated in video games?" />
  <row Id="30364" PostHistoryTypeId="3" PostId="13650" RevisionGUID="071ca0c0-1bd7-45d3-b58b-0376f345be05" CreationDate="2011-06-14T17:58:14.930" UserId="7997" Text="&lt;programming&gt;" />
  <row Id="30365" PostHistoryTypeId="17" PostId="13651" RevisionGUID="3ca3a475-6fe5-4a41-8fe6-8e4efb71a76d" CreationDate="2011-06-14T19:01:50.200" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/83910/how-are-bullets-simulated-in-video-games" Text="" />
  <row Id="30366" PostHistoryTypeId="17" PostId="13652" RevisionGUID="fae6cc06-a1e5-4de9-abe7-63b4b6f62bdd" CreationDate="2011-06-14T19:01:50.200" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/83910/how-are-bullets-simulated-in-video-games" Text="" />
  <row Id="30367" PostHistoryTypeId="17" PostId="13653" RevisionGUID="91c83c39-c50b-4fab-96c5-e6be28240387" CreationDate="2011-06-14T19:01:50.200" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/83910/how-are-bullets-simulated-in-video-games" Text="" />
  <row Id="30368" PostHistoryTypeId="2" PostId="13652" RevisionGUID="4cb84a03-ad5c-499a-ab1f-ef562db654d8" CreationDate="2011-06-14T18:07:21.377" UserDisplayName="Jeff Welling" Text="Speaking of the Nexuiz source code from the time I took a look, they didn't actually send a 'bullet' object from point A to point B.  If I recall correctly, and this is specific to only some weapons - other weapons aren't instant-hit weapons when they're fired, the code looks at where your gun is pointing. If it is aimed at a person (and is an instant-hit weapon) when you click 'fire' then you made a hit.&#xD;&#xA;&#xD;&#xA;Also notable is how Nexuiz had the server-side option of calculating hits on the client or on the server.  If you suspect clients are cheating, you can switch to server-side hit calculations in an attempt to help mitigate that." />
  <row Id="30369" PostHistoryTypeId="2" PostId="13653" RevisionGUID="48bc127d-9ef3-4892-acc2-ae80f8e5b7af" CreationDate="2011-06-14T18:07:41.533" UserDisplayName="Uri" Text="It depends on the game and the level of accuracy/realism.&#xD;&#xA;&#xD;&#xA;Synchronizing shooting and damage models in multiplayer settings is pretty difficult since you need to accurately determine where and when exactly a bullet was fired, whether it hit a target, and whether anything else passed through the path.&#xD;&#xA;&#xD;&#xA;Therefore, I suspect that when possible game designers simplify things by either treating some shots as instantaneous (so that you only need to consider the location of everyone at a single moment in time), or by restricting the range of the bullet. Luckily, this often corresponds to real-life physics. For instance, sniper rifles fire high velocity rounds.&#xD;&#xA;&#xD;&#xA;Many games can simulate a multistep multi-snapshot path of a slow moving object (such as artillery, bombs, marker rounds, etc.) but that is very costly and synchronization issues are more common, leading to funny youtube videos.&#xD;&#xA;&#xD;&#xA;Another concern is with games that maintain separate smaller &quot;environments&quot; (e.g., each room is simulated separately) to create an illusion of a larger space. In these cases, things within the boundaries of a &quot;room&quot; may be simulated correctly so that everyone in the room is updated about the series of transitions in space that the bullet makes, but others outside that environment are not.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30372" PostHistoryTypeId="2" PostId="13655" RevisionGUID="a3124b7b-d278-4171-8d7e-6fb1da72dc60" CreationDate="2011-06-14T19:29:56.147" UserId="3830" Text="Some games no doubt do use realistic bullet physics, taking into account bullet travel time and drop, but I'm guessing most games don't, at least for NPCs.  &#xD;&#xA;&#xD;&#xA;For a game that does direct bullet travel (no drop) that's instant, the game traces an imaginary line (vector) from the point of the barrel forward.  It then computes what that line intersects with, and registers a bullet &quot;hit&quot; at that point.  It might be a solid object like a wall where an impact triggers an effect such as a bullet hit decal and a &quot;puff&quot; of smoke/debris.  It might impact a breakable object causing it to break, or it might impact a physics object and give it a &quot;kick&quot;.  Or of course it might hit the player or another NPC and cause a health hit.  Hard core simulations will model the bullet penetrating through walls and trigger a hit effect on the exit side, probably decreasing the bullet's damage upon exit.&#xD;&#xA;&#xD;&#xA;Just so NPCs don't have perfect aim, many games add some kind of randomization to the vector to model bullet spread.  This is what you'd see in real life, where bullets don't all hit just where you aim but in a pattern centered around the aim spot.  &#xD;&#xA;&#xD;&#xA;To visualize the bullet spread, imagine a cone coming out from the gun instead of a straight line (vector).  The actual bullet direction is randomized to be somewhere inside this cone.  If the shooter is really close to the target, the spread is small and the accuracy high.  If the target is far away, the cone adds more spread so it's less likely for the shooter to hit the target.&#xD;&#xA;&#xD;&#xA;This idea of the shot cone can be used to model shooter accuracy (skill), weapon accuracy and other conditions.  For example a low level NPC might be given a low accuracy shot cone, whereas a high skilled NPC would have a high level accuracy.  A player running with a submachine gun shooting from the hip would have a wide shot cone, which would reduce if they stop running or aim.  Sniper rifles would have tighter shot cones by nature than say a pistol.&#xD;&#xA;" />
  <row Id="30374" PostHistoryTypeId="2" PostId="13656" RevisionGUID="206bab60-e505-43a3-917c-cde6a130dfe5" CreationDate="2011-06-14T19:32:53.880" UserId="962" Text="Most FPS games use raycasting for the actual gameplay; bullets instantly travel and hit the target when fired.&#xD;&#xA;&#xD;&#xA;But most games also employ the use of &quot;fake&quot; tracers. Every 3 shots, or some other interval, a tracer will be fired along with the bullet, the tracer will be really fast, but not instantaneous. This is done as a visual effect only, and does not affect the game-play directly, but helps give cues to the shooter, the shootee, and gives bystanders a directional reference to gunshots.&#xD;&#xA;&#xD;&#xA;Most games that use these kinds of bullet physics are unrealistic, as there is no ricochets, no bullet fragments, and if there is any penetration its usually linear.&#xD;&#xA;&#xD;&#xA;Some games, such as ARMA II, STALKER(entire series) use more realistic bullet physics with travel time, ricochets, and penetration with deflection angles. I believe these systems are using raycasting, but with a limit that is determined by the speed of the bullet. With these games the muzzle velocity can be realistic as in ARMA II, or looks about right as in STALKER.&#xD;&#xA;&#xD;&#xA;I greatly prefer having realistic bullet physics, as guns fire projectiles, not lasers." />
  <row Id="30375" PostHistoryTypeId="6" PostId="13482" RevisionGUID="c6b09b93-d0ee-4fc7-b325-26437a6d11b2" CreationDate="2011-06-14T19:34:06.907" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;tools&gt;" />
  <row Id="30378" PostHistoryTypeId="5" PostId="13643" RevisionGUID="e02d515d-e0e8-4313-aa22-b39d20cfe310" CreationDate="2011-06-14T19:45:55.097" UserId="5060" Comment="Formatting" Text="okay I just figured everything out...all I had to do was to set the linearVeolcity using boolean logic. i.e &#xD;&#xA;&#xD;&#xA;    if(counter &lt;50) &#xD;&#xA;    {&#xD;&#xA;     if(toggle)&#xD;&#xA;      { &#xD;&#xA;        body-&gt;setLinearVelocity(5.0,0.0) &#xD;&#xA;      } &#xD;&#xA;     else &#xD;&#xA;      { &#xD;&#xA;        body-&gt;SetLinearVelocity(-5.0,0.0) &#xD;&#xA;      } &#xD;&#xA;      toggle = !toggle &#xD;&#xA;    } &#xD;&#xA;    &#xD;&#xA;    counter++; &#xD;&#xA;    &#xD;&#xA;    if(counter&gt;50) &#xD;&#xA;    { &#xD;&#xA;     break away from being static body &#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;all of the above code has to go in to the timeStep under the loop in which you iterate the b2Bodies of the world.....the logic is simple. &#xD;&#xA; " />
  <row Id="30379" PostHistoryTypeId="24" PostId="13643" RevisionGUID="e02d515d-e0e8-4313-aa22-b39d20cfe310" CreationDate="2011-06-14T19:45:55.097" Comment="Proposed by 5060 approved by 1156 edit id of 493" />
  <row Id="30381" PostHistoryTypeId="18" PostId="13647" RevisionGUID="4b9b0f70-0a53-4ab2-a4d8-82f78f03aa94" CreationDate="2011-06-14T19:45:55.517" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13646/how-are-bullets-simulated-in-video-games" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30382" PostHistoryTypeId="18" PostId="13648" RevisionGUID="4b9b0f70-0a53-4ab2-a4d8-82f78f03aa94" CreationDate="2011-06-14T19:45:55.517" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13646/how-are-bullets-simulated-in-video-games" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30383" PostHistoryTypeId="18" PostId="13649" RevisionGUID="4b9b0f70-0a53-4ab2-a4d8-82f78f03aa94" CreationDate="2011-06-14T19:45:55.517" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13646/how-are-bullets-simulated-in-video-games" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30385" PostHistoryTypeId="18" PostId="13655" RevisionGUID="4b9b0f70-0a53-4ab2-a4d8-82f78f03aa94" CreationDate="2011-06-14T19:45:55.517" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13646/how-are-bullets-simulated-in-video-games" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30386" PostHistoryTypeId="18" PostId="13650" RevisionGUID="4b9b0f70-0a53-4ab2-a4d8-82f78f03aa94" CreationDate="2011-06-14T19:45:55.517" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13646/how-are-bullets-simulated-in-video-games" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30389" PostHistoryTypeId="2" PostId="13658" RevisionGUID="083bfa3d-7cf4-410e-ac6e-b36b063949c8" CreationDate="2011-06-14T20:41:50.520" UserId="4443" Text="Object are drawn in the order they are sent to the graphics hardware (generally, I don't want to get into nit picky here :)). So to your original question, if those are the instances you are talking about, then yes, the order is obeyed (and becomes very important when dealing with alpha blending for example).&#xD;&#xA;&#xD;&#xA;In the realm of 2D GUI/HUDs, I will generally Render the scene, then disable zBuffering and render the HUD using its by-design root to leaf nature to get the proper layering.&#xD;&#xA;&#xD;&#xA;Can you use the z value? Yes.. I am just not sure if there are enough polys to really make this a huge concern however. (I have worked in a system that did this, but that was because the GUI was the same system as the Particle System.)&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="30390" PostHistoryTypeId="17" PostId="13659" RevisionGUID="48bed75d-2163-4ccf-9062-4ee98992f24a" CreationDate="2011-06-14T20:54:47.360" UserId="-1" Comment="from http://stackoverflow.com/questions/6349620/beginning-game-programming-languages" Text="" />
  <row Id="30391" PostHistoryTypeId="17" PostId="13660" RevisionGUID="6ab6f096-4940-4d2c-8e27-246aeb040136" CreationDate="2011-06-14T20:54:47.360" UserId="-1" Comment="from http://stackoverflow.com/questions/6349620/beginning-game-programming-languages" Text="" />
  <row Id="30392" PostHistoryTypeId="2" PostId="13660" RevisionGUID="f70b9616-48f0-4266-b0ac-04c313751c9c" CreationDate="2011-06-14T20:22:36.097" UserDisplayName="Denis Biondic" Text="I would focus on C++ if you are serious, and study DirectX / OpenGL APIs" />
  <row Id="30393" PostHistoryTypeId="2" PostId="13659" RevisionGUID="dfd7ab2d-dc9e-43a8-aa3f-8f20f5cf1371" CreationDate="2011-06-14T20:21:02.180" UserDisplayName="Jason Foreid" Text="My future plans lie in game programming and I have learned some VB, C++, and very lightly touched on C# and Java.  My question is this.  What language(s) should I focus on and hone if I want to become a game developer?  I appreciate any and all answers/suggestions/etc... Thank you!" />
  <row Id="30394" PostHistoryTypeId="1" PostId="13659" RevisionGUID="dfd7ab2d-dc9e-43a8-aa3f-8f20f5cf1371" CreationDate="2011-06-14T20:21:02.180" UserDisplayName="Jason Foreid" Text="Beginning Game Programming Languages" />
  <row Id="30395" PostHistoryTypeId="3" PostId="13659" RevisionGUID="dfd7ab2d-dc9e-43a8-aa3f-8f20f5cf1371" CreationDate="2011-06-14T20:21:02.180" UserDisplayName="Jason Foreid" Text="&lt;untagged&gt;" />
  <row Id="30396" PostHistoryTypeId="2" PostId="13661" RevisionGUID="bbe7f03a-10c1-4ce0-a0b9-892baed21cb2" CreationDate="2011-06-14T21:01:43.653" UserId="7952" Text="Pretty much what Denis said as far as technologies go, but it can only help to learn other languages and API's along the way. In my opinion, learning how to do the same thing in 2 different languages helps you understand the core concept better than knowing how to only do it in 1 language. This way you'll have a better grasp of the underlying fundamentals rather than a specific implementation of something.&#xD;&#xA;&#xD;&#xA;Also, don't forget about your math skills! (linear algebra, trig, etc.)" />
  <row Id="30397" PostHistoryTypeId="2" PostId="13662" RevisionGUID="83d41be1-a578-493e-8287-7d545dcae41f" CreationDate="2011-06-14T21:10:02.333" UserId="7661" Text="C++ is the hardest but most used language in serious game development.  C# is a lot like c++ but it uses .net and is MANAGED code, which means slightly (according to microsoft) slower than c++ and if you code in c# your really just using a lot of pre built code by microsoft so you really don't learn the nitty gritty of things that you would have to learn to make games in c++.  However learning 3d is hard and c#'s xna can make dealing with directx much easier while you learn 3d programming basics and math.  Whatever you choose its going to be a LOOOOOOONG path to where you want to be so prepare a large bookshelf and start reading." />
  <row Id="30398" PostHistoryTypeId="5" PostId="13662" RevisionGUID="27762d19-5d61-4f26-9ffc-4a34680e883f" CreationDate="2011-06-14T21:15:41.407" UserId="7661" Comment="added 479 characters in body" Text="C++ is the hardest but most used language in serious game development.  C# is a lot like c++ but it uses .net and is MANAGED code, which means slightly (according to microsoft) slower than c++ and if you code in c# your really just using a lot of pre built code by microsoft so you really don't learn the nitty gritty of things that you would have to learn to make games in c++.  However learning 3d is hard and c#'s xna can make dealing with directx much easier while you learn 3d programming basics and math.  Whatever you choose its going to be a LOOOOOOONG path to where you want to be so start building a large bookshelf and start reading. &#xD;&#xA;&#xD;&#xA;ps forget VB and Java.  Java is gaining a little ground lately but its not used nearly as much as c++.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;btw there a lots of open source games you can find on the net, even some professional games have been opensourced like the games from the humblebundle sales.  Reading source code is going to be something you have to do all the time.  &#xD;&#xA;&#xD;&#xA;link to some source&#xD;&#xA;http://www.wolfire.com/humble&#xD;&#xA;&#xD;&#xA;and a whole website with open source stuff&#xD;&#xA;http://sourceforge.net/" />
  <row Id="30399" PostHistoryTypeId="6" PostId="13659" RevisionGUID="f734b379-df67-49f1-abff-715ed0419f40" CreationDate="2011-06-14T21:17:00.580" UserId="1430" Comment="edited tags" Text="&lt;languages&gt;" />
  <row Id="30400" PostHistoryTypeId="2" PostId="13663" RevisionGUID="d64c12ac-7a3e-47f7-a46a-02b5cf1c65a0" CreationDate="2011-06-14T21:20:33.323" UserId="1430" Text="Any of those languages will suffice -- my personal recommendation would be for C# or C++ (in that order). However you will be able to make games in any of the ones you already know, and the most important thing is to not agonize over a language choice and *make stuff*. It is worth pointing that C++ is used very often in the professional &quot;desktop&quot; games industry, as is C# (though it has more use in tools than actual games).&#xD;&#xA;&#xD;&#xA;Good programmers know many languages, anyhow, and the more languages you know (especially those that support or encourage different paradigms), the easier learning new ones becomes.&#xD;&#xA;&#xD;&#xA;At the end of the day, the best language for you to focus on is probably the one you know best already, since you'll be the most productive with it and therefor generate the most experience." />
  <row Id="30401" PostHistoryTypeId="25" PostId="13650" RevisionGUID="a08d9b2e-dada-4f4d-91c0-a864b539fa90" CreationDate="2011-06-14T21:22:31.220" Comment="http://twitter.com/#!/StackGameDev/status/80746962336485376" />
  <row Id="30402" PostHistoryTypeId="6" PostId="4116" RevisionGUID="e9784e89-254c-4bb3-8655-30c18eb67863" CreationDate="2011-06-14T21:24:35.437" UserId="6588" Comment="edited tags" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="30403" PostHistoryTypeId="2" PostId="13664" RevisionGUID="bc312864-ba22-474a-98da-da9074f03490" CreationDate="2011-06-14T21:35:16.177" UserId="6867" Text="Which kinds of culling and clipping does XNA do for me as default, and which kinds does it not?&#xD;&#xA;&#xD;&#xA;Z-culling? Backface culling? etc." />
  <row Id="30404" PostHistoryTypeId="1" PostId="13664" RevisionGUID="bc312864-ba22-474a-98da-da9074f03490" CreationDate="2011-06-14T21:35:16.177" UserId="6867" Text="What kind of culling does XNA do for me?" />
  <row Id="30405" PostHistoryTypeId="3" PostId="13664" RevisionGUID="bc312864-ba22-474a-98da-da9074f03490" CreationDate="2011-06-14T21:35:16.177" UserId="6867" Text="&lt;xna&gt;" />
  <row Id="30406" PostHistoryTypeId="2" PostId="13665" RevisionGUID="0ad3abab-416e-480c-9ad1-39d42b4d8998" CreationDate="2011-06-14T21:40:34.607" UserId="158" Text="If I create pixel art files that need to be scaled up on the screen later, so that a single pixel becomes a box of 4 pixels. Should I create my pixel art with 2x2 pixels or should I create it with 1x1 pixels so that I can I 1:2 scale it later in XNA to 2x2 pixels?&#xD;&#xA;&#xD;&#xA;I tend to believe that 1:1 would result in too much detail rather than the pixel art effect, thus I want the end result in 2:1 style where a 1x1 pixel of my intended sprite will take 2x2 pixels on the screen." />
  <row Id="30407" PostHistoryTypeId="1" PostId="13665" RevisionGUID="0ad3abab-416e-480c-9ad1-39d42b4d8998" CreationDate="2011-06-14T21:40:34.607" UserId="158" Text="Scale my pixel art files when designing them or when rendering?" />
  <row Id="30408" PostHistoryTypeId="3" PostId="13665" RevisionGUID="0ad3abab-416e-480c-9ad1-39d42b4d8998" CreationDate="2011-06-14T21:40:34.607" UserId="158" Text="&lt;xna&gt;&lt;c#&gt;&lt;sprites&gt;" />
  <row Id="30409" PostHistoryTypeId="2" PostId="13666" RevisionGUID="962c0610-1f71-4979-b107-c39e71e3a511" CreationDate="2011-06-14T21:42:37.007" UserId="7661" Text="The bullets and all physics in the stalker series of games uses an open source library called &quot;Open Dynamics Engine&quot;.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Open_Dynamics_Engine&#xD;&#xA;&#xD;&#xA;The bullets fall with gravity and even bounce around off walls and stuff very accurately if your smart enough you can even curve a bullet off something to shoot someone you can't see but know their position.  This is the most realistic way I have seen it done, the ray trace method is not practical when you start moving into large spaces.  It would be ok for shooting a laser gun though.&#xD;&#xA;&#xD;&#xA;Other games that use it BloodRayne 2, Call of Juarez, World of Goo, X-Moto and OpenSimulator.&#xD;&#xA;&#xD;&#xA;Another good choice would be the physics library &quot;Bullet&quot;.  http://en.wikipedia.org/wiki/Bullet_%28software%29&#xD;&#xA;&#xD;&#xA;It was used in grand theft auto 4, red dead redemption and more.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30410" PostHistoryTypeId="5" PostId="13666" RevisionGUID="d1e4083e-b3b8-49a0-b96e-c778e883fbbc" CreationDate="2011-06-14T21:48:08.653" UserId="7661" Comment="added 95 characters in body; edited body; added 39 characters in body" Text="The bullets and all physics in the stalker series of games uses an open source library called &quot;Open Dynamics Engine&quot;.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Open_Dynamics_Engine&#xD;&#xA;&#xD;&#xA;The bullets fall with gravity and even bounce around off walls and stuff very accurately if your smart enough you can even curve a bullet off something to shoot someone you can't see but know their position.  The bullet is an actual object model.  This is the most realistic way I have seen it done, the ray trace method is not practical when you start moving into large spaces.  It would be ok for shooting a laser gun though.&#xD;&#xA;&#xD;&#xA;Other games that use it BloodRayne 2, Call of Juarez, World of Goo, X-Moto and OpenSimulator.&#xD;&#xA;&#xD;&#xA;Another good choice would be the physics library &quot;Bullet&quot;.  http://en.wikipedia.org/wiki/Bullet_%28software%29&#xD;&#xA;&#xD;&#xA;It was used in grand theft auto 4, red dead redemption and more.&#xD;&#xA;&#xD;&#xA;ps arma 2 uses an in house physics engine, their next game arma 3 will use physX physics engine" />
  <row Id="30411" PostHistoryTypeId="2" PostId="13667" RevisionGUID="681ece6c-7e61-4c38-a480-ecbc544a2d5b" CreationDate="2011-06-14T21:52:24.283" UserId="4496" Text="You're really looking at a 6 one way, half a dozen the other situation here.  &#xD;&#xA;&#xD;&#xA;The main advantage of doing it on a 1 to 1 scale before hand is file size.  On top of that, you don't have to manually make sure all your &quot;pixels&quot; are in the right 2x2 setup, and so long as scale up by whole numbers it will work clean (rotation's still a mess but you probably know that already) &#xD;&#xA;&#xD;&#xA;If you do all the pixels as 2x2 beforehand you're in the same situation as before, except now you have to go up by .5's in order to keep a steady ratio.  You do gain the ability to go half size, but really the half size from this is exactly equal to the size of the full size on the 1x1.&#xD;&#xA;&#xD;&#xA;I personally would go with just having one pixel be one pixel as far as your assets go, and then scale them to the proper size.  It will make your image creation easier and it will make your assets ~1/4 the size for faster loading.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30413" PostHistoryTypeId="2" PostId="13668" RevisionGUID="c99c86f9-3dd6-456a-a26a-130ed2a03974" CreationDate="2011-06-14T21:55:10.093" UserId="7661" Text="The default value is CullMode.CounterClockwise. &#xD;&#xA;&#xD;&#xA;options&#xD;&#xA;_______&#xD;&#xA;CullClockwiseFace 	 ------          Cull back faces with clockwise vertices.&#xD;&#xA;&#xD;&#xA;CullCounterClockwiseFace --------	   Cull back faces with counterclockwise vertices.&#xD;&#xA;&#xD;&#xA;None 	    -------                       Do not cull back faces. &#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.renderstate.cullmode%28v=xnagamestudio.31%29.aspx" />
  <row Id="30414" PostHistoryTypeId="2" PostId="13669" RevisionGUID="207b7aed-21d3-4cab-863c-8449de6ff982" CreationDate="2011-06-14T22:01:33.720" UserId="962" Text="Bad idea to scale it up beforehand like that.&#xD;&#xA;&#xD;&#xA;Doubling the size of a texture quadruples the storage, and the memory it uses. It will also slow down spritebatches, and generally take more time for rendering.&#xD;&#xA;&#xD;&#xA;What you want to do is scale the textures up by 2 when drawing them in XNA, while making sure to scale with a PointClamp image sampler.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/6820/how-do-i-disable-texture-filtering-for-sprite-scaling-in-xna-4-0/6822#6822" />
  <row Id="30415" PostHistoryTypeId="5" PostId="13668" RevisionGUID="06fe280b-398f-404f-b389-153354e723a1" CreationDate="2011-06-14T22:03:14.703" UserId="7661" Comment="changed link so it links to xna 4.0, even though its the same as 3.1 its more accurate." Text="The default value is CullMode.CounterClockwise. &#xD;&#xA;&#xD;&#xA;options&#xD;&#xA;_______&#xD;&#xA;CullClockwiseFace 	 ------          Cull back faces with clockwise vertices.&#xD;&#xA;&#xD;&#xA;CullCounterClockwiseFace --------	   Cull back faces with counterclockwise vertices.&#xD;&#xA;&#xD;&#xA;None 	    -------                       Do not cull back faces. &#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.cullmode.aspx" />
  <row Id="30416" PostHistoryTypeId="2" PostId="13670" RevisionGUID="46658d0e-d453-4005-9561-3253ac07ffbc" CreationDate="2011-06-14T22:31:24.883" UserId="7432" Text="This was my original question:&#xD;&#xA;http://gamedev.stackexchange.com/questions/12431/populating-sprites&#xD;&#xA;I used it to generate sprites but I keep running into a problem where my sprites keep switching back and forth between the various sprites. Plus it doesn't take into account for the level number. I was told that by a friend that I needed to populate them outside of my loop but he couldn't help. I tried using other kinds of random methods to try to get it to work but I haven't had any luck. What would be a good way of generating them outside of the loop where it displays a sprite and not cycling through them. &#xD;&#xA;&#xD;&#xA;Thanks In Advance. " />
  <row Id="30417" PostHistoryTypeId="1" PostId="13670" RevisionGUID="46658d0e-d453-4005-9561-3253ac07ffbc" CreationDate="2011-06-14T22:31:24.883" UserId="7432" Text="Populating Sprites Outside Of Loop" />
  <row Id="30418" PostHistoryTypeId="3" PostId="13670" RevisionGUID="46658d0e-d453-4005-9561-3253ac07ffbc" CreationDate="2011-06-14T22:31:24.883" UserId="7432" Text="&lt;android&gt;" />
  <row Id="30419" PostHistoryTypeId="2" PostId="13671" RevisionGUID="db9c3c3e-4397-4370-b5a5-40548a99b4b4" CreationDate="2011-06-14T22:49:11.913" UserId="1163" Text="Often the points needed to gain a level is based on a curve. In a lot of RPGs were there are also a lot of other characteristics and attributes of your character that increase with your level, they will also be on there own curves.&#xD;&#xA;&#xD;&#xA;Take a look at RPGMaker to see how they do things. Specifically look at the parameter curves in the screenshots of the &quot;Add Some Uniqueness to by Customizing Starting Equipment&quot; section of the [Creating a Main Character][1] document.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rpgmakerweb.com/tutorials/RPGVX_Tutorial_Level_5.pdf#zoom=100" />
  <row Id="30420" PostHistoryTypeId="5" PostId="13671" RevisionGUID="c0380bbd-5c67-4f6d-8c20-30bd93182706" CreationDate="2011-06-14T22:55:42.857" UserId="1163" Comment="added 242 characters in body" Text="Often the points needed to gain a level is based on a curve. In a lot of RPGs were there are also a lot of other characteristics and attributes of your character that increase with your level, they will also be on there own curves.&#xD;&#xA;&#xD;&#xA;Take a look at RPGMaker to see how they do things. Specifically look at the parameter curves in the screenshots of the &quot;Add Some Uniqueness to by Customizing Starting Equipment&quot; section of the [Creating a Main Character][1] document.&#xD;&#xA;&#xD;&#xA;Basically you might have a curve for how much XP is needed to levelup, then different curves for how much HP, MP, stamina, strength etc is gained each level.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rpgmakerweb.com/tutorials/RPGVX_Tutorial_Level_5.pdf#zoom=100&#xD;&#xA;  [2]: http://i.stack.imgur.com/VIUPT.gif" />
  <row Id="30421" PostHistoryTypeId="5" PostId="13670" RevisionGUID="c88b3a0e-b68e-4eb4-a7fd-5f6ee415507c" CreationDate="2011-06-14T23:09:00.980" UserId="7432" Comment="deleted 17 characters in body; edited title" Text="This was my original question:&#xD;&#xA;http://gamedev.stackexchange.com/questions/12431/populating-sprites&#xD;&#xA;I used it to generate NPCs but I keep running into a problem where my NPCs keep switching back and forth between the various NPCs. Plus it doesn't take into account for the level number. I was told by a friend that I needed to populate them outside of my loop but he couldn't help. I tried using other kinds of random methods to try to get it to work but I haven't had any luck. What would be a good way of generating them outside of the loop where it displays a NPC and not cycling through them. &#xD;&#xA;&#xD;&#xA;Thanks In Advance. " />
  <row Id="30422" PostHistoryTypeId="4" PostId="13670" RevisionGUID="c88b3a0e-b68e-4eb4-a7fd-5f6ee415507c" CreationDate="2011-06-14T23:09:00.980" UserId="7432" Comment="deleted 17 characters in body; edited title" Text="Populating NPC's Outside Of Loop" />
  <row Id="30423" PostHistoryTypeId="5" PostId="13634" RevisionGUID="1d8a06f5-0bd0-4f9d-a704-9d53830327de" CreationDate="2011-06-14T23:09:31.603" UserId="51" Comment="added 484 characters in body" Text="You're probably thinking of motion blur.&#xD;&#xA;&#xD;&#xA;Edit for more content: Here's a bit from GPU gems on motion blur:&#xD;&#xA;&#xD;&#xA;http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html&#xD;&#xA;&#xD;&#xA;&gt; One of the best ways to simulate speed in a video game is to use motion blur. Motion blur can be one of the most important effects to add to games, especially racing games, because it increases realism and a sense of speed. Motion blur also helps smooth out a game's appearance, especially for games that render at 30 frames per second or less. " />
  <row Id="30424" PostHistoryTypeId="5" PostId="13650" RevisionGUID="acb7632d-ee2c-4ce0-b3bc-7e3d4f661012" CreationDate="2011-06-14T23:11:21.260" UserId="51" Comment="deleted 46 characters in body; edited tags" Text="I have been playing games like MW2 recently and, as a programmer, I tend to ask myself how do they make the game so immersive. For example, how to they simulate bullet speed. &#xD;&#xA;&#xD;&#xA;1. When an NPC fires a bullet from his gun, does the bullet really travel from his gun to the given target or do they they completely ignore this part and just put a bullet hole on the target?&#xD;&#xA;&#xD;&#xA;2. If the bullet is really travelling from the gun to the target, at what speed is it actually travelling? &#xD;&#xA;" />
  <row Id="30425" PostHistoryTypeId="6" PostId="13650" RevisionGUID="acb7632d-ee2c-4ce0-b3bc-7e3d4f661012" CreationDate="2011-06-14T23:11:21.260" UserId="51" Comment="deleted 46 characters in body; edited tags" Text="&lt;programming&gt;&lt;projectile-physics&gt;" />
  <row Id="30426" PostHistoryTypeId="5" PostId="5474" RevisionGUID="9b54c681-ff40-4023-a1e6-b21ff3f287c7" CreationDate="2011-06-14T23:22:12.697" UserId="962" Comment="deleted 3 characters in body" Text="It's mostly about memory allocation and garbage collection. Memory allocations during runtime gives your garbage collector a chance to bring out the trash. Which hurts your performance. GC should happen as seldom as possible.&#xD;&#xA;&#xD;&#xA;Most java collections:&#xD;&#xA;&#xD;&#xA;**A)** Allocate more memory than they need. &#xD;&#xA;&#xD;&#xA;**B)** Allocate memory when you don't want them to. &#xD;&#xA;&#xD;&#xA;**C)** Allocate memory for each iterator when iterating through a collection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To circumvent these things:&#xD;&#xA;&#xD;&#xA;**A)** Allocate collections with fixed sizes. ie. create object pools.&#xD;&#xA;&#xD;&#xA;**B)** Allocate these pools at program init.&#xD;&#xA;&#xD;&#xA;**C)** Avoid the for( Object obj : collection ) for those collection types that has a size() and a .get(int index) method.&#xD;&#xA;" />
  <row Id="30427" PostHistoryTypeId="2" PostId="13672" RevisionGUID="11dae4a0-dc2b-466c-b105-77d4f0251759" CreationDate="2011-06-14T23:46:34.800" UserId="4443" Text="I am not 100% sure what you are asking, but from this post and the other one here is my guess:&#xD;&#xA;&#xD;&#xA;You are selecting which NPC during the Render update so it constantly changes what it looks like every frame. &#xD;&#xA;&#xD;&#xA;What you need to do is find a place where you can set that value where it will only be set one time. This is probably what your friend meant by 'outside of the loop'.&#xD;&#xA;&#xD;&#xA;If you can more clearly describe what you are seeing as opposed to trying to explain what you are doing, it might help be able to refine this answer more." />
  <row Id="30428" PostHistoryTypeId="5" PostId="13670" RevisionGUID="a3184a13-5c7d-411d-8c3d-f23c9f3858c7" CreationDate="2011-06-15T00:08:44.157" UserId="7432" Comment="added 531 characters in body; added 1 characters in body; added 1 characters in body" Text="This was my original question:&#xD;&#xA;http://gamedev.stackexchange.com/questions/12431/populating-sprites&#xD;&#xA;I used it to generate NPCs but I keep running into a problem where my NPCs keep switching back and forth between the various NPCs. Plus it doesn't take into account for the level number. I was told by a friend that I needed to populate them outside of my loop but he couldn't help. I tried using other kinds of random methods to try to get it to work but I haven't had any luck. What would be a good way of generating them outside of the loop where it displays a NPC and not cycling through them. &#xD;&#xA;&#xD;&#xA;Thanks In Advance. &#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;I want to spawn a certain number of NPC's during each level. I have 2 types of NPC's that I want to use. The number of NPC's that are spawned are equal to the the current level number. I want to be able to spawn how ever many is needed for that level and have it to where which NPC that will spawn is random, so you don't know if you will get SprA or SprB or a Mix. Ex: Level 1, only 1 NPC spawns, the type is random. Level 2, only 2 NPCs spawn, the type is random. Level 3, only 3 NPC's spawn, the type is random. etc. " />
  <row Id="30429" PostHistoryTypeId="2" PostId="13673" RevisionGUID="1a9bd606-d841-4848-b354-6b21f9a73a89" CreationDate="2011-06-15T00:10:37.570" UserId="2933" Text="This is something which has been bugging me. If I create a SoundEffectInstance via  SoundEffect.CreateInstance() I'm meant to dispose of it when I'm finished with it. SoundEffect.CreateInstance() does not use ContentManager as far as i can tell.&#xD;&#xA;&#xD;&#xA;So does it load from file or does it keep a copy in memory? Loading from file would obviously be very slow :-/&#xD;&#xA;" />
  <row Id="30430" PostHistoryTypeId="1" PostId="13673" RevisionGUID="1a9bd606-d841-4848-b354-6b21f9a73a89" CreationDate="2011-06-15T00:10:37.570" UserId="2933" Text="Does SoundEffect.CreateInstance load from file everytime?" />
  <row Id="30431" PostHistoryTypeId="3" PostId="13673" RevisionGUID="1a9bd606-d841-4848-b354-6b21f9a73a89" CreationDate="2011-06-15T00:10:37.570" UserId="2933" Text="&lt;xna&gt;&lt;c#&gt;&lt;audio&gt;" />
  <row Id="30432" PostHistoryTypeId="25" PostId="13665" RevisionGUID="0cd5b75f-a54c-465d-9f89-f339d202c52f" CreationDate="2011-06-15T00:22:31.987" Comment="http://twitter.com/#!/StackGameDev/status/80792265605382145" />
  <row Id="30433" PostHistoryTypeId="2" PostId="13674" RevisionGUID="978f3b96-9b6c-409a-85aa-6dcbe2b38e91" CreationDate="2011-06-15T00:34:38.150" UserId="392" Text="I wrote the bullet code for PlanetSide. We had a few 'hitscan' projectiles, but mostly simulated the projectiles as best we could given the CPU constraints and the huge number of bullets in play at any time.&#xD;&#xA;&#xD;&#xA;In the case of hitscan, impact is determined in the same frame as the input is received, often using a single raycast. This is appropriate for weapons such as lasers or other extremely fast projectiles. We did hitscan by just cranking the initial velocity on the projectile so high it would cross the game board in a single tick.&#xD;&#xA;&#xD;&#xA;Non hitscan bullets are ticked, either to the graphics frame time or to a fixed timestep, with computations for acceleration (think rockets), gravity, air friction, guidance (think heat seeking projectiles) etc applied.  The objective being to generate the projectile's terminal position for the timestep. Once the start and end points are established, one or more rays can be cast to approximate the flight path and detect any collisions that would have occurred during flight.&#xD;&#xA;&#xD;&#xA;In both hitscan and non hitscan projectiles, what happens at a collision depends on your projectile properties and the surface you impact. For example, you might hit a hard surface, in which case you might check your bounce count and either adjust the position and velocity per a reflection, or detonate the projectile if you've hit your max bounce count. In this system, a rocket just has a max bounce count of 0. You might hit a soft surface and then check your penetrating power to determine if the projectile should continue through the material, etc.&#xD;&#xA;&#xD;&#xA;It was fun code to write.  Also, it's super useful to write good debug visualization of what's going on so you can inspect flight paths, events, etc visually." />
  <row Id="30434" PostHistoryTypeId="17" PostId="13675" RevisionGUID="fd7ae83e-9e15-4cc5-81f4-b38a31289a37" CreationDate="2011-06-15T00:36:02.023" UserId="-1" Comment="from http://stackoverflow.com/questions/6342189/draw-real-time-fog-of-war-in-2d-game" Text="" />
  <row Id="30435" PostHistoryTypeId="17" PostId="13676" RevisionGUID="8a710962-0f5a-4288-8f0d-83a9a59585c3" CreationDate="2011-06-15T00:36:02.023" UserId="-1" Comment="from http://stackoverflow.com/questions/6342189/draw-real-time-fog-of-war-in-2d-game" Text="" />
  <row Id="30436" PostHistoryTypeId="17" PostId="13677" RevisionGUID="63f9603c-baba-4ba7-aae8-99e8b9832acf" CreationDate="2011-06-15T00:36:02.023" UserId="-1" Comment="from http://stackoverflow.com/questions/6342189/draw-real-time-fog-of-war-in-2d-game" Text="" />
  <row Id="30437" PostHistoryTypeId="2" PostId="13676" RevisionGUID="df2719c4-2939-4b67-98d1-d80f1d3b6477" CreationDate="2011-06-14T11:07:13.353" UserId="6422" Text="See here for an in-depth tutorial/example of doing it in HLSL (shader) code.:&#xD;&#xA;&#xD;&#xA;http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/&#xD;&#xA;&#xD;&#xA;If you want sharp edges remove the final blur step." />
  <row Id="30438" PostHistoryTypeId="2" PostId="13677" RevisionGUID="8106280c-87bd-44dd-ba1f-126b44913cf9" CreationDate="2011-06-14T13:50:22.287" UserDisplayName="MattDavey" Text="The technique is the same as rendering shadows (many resources online). The difference is that instead of rendering the gray area as a shadow, you're using it as a mask to hide parts of the green area." />
  <row Id="30439" PostHistoryTypeId="2" PostId="13675" RevisionGUID="38831266-158e-4625-80c7-3424f9734787" CreationDate="2011-06-14T10:27:56.223" UserDisplayName="zgorawski" Text="I have game situation as shown in picture:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA; - Red dot: player&#xD;&#xA; - Brown dot: obstacle ( rock, tree, etc)&#xD;&#xA; - Grey: non visible area ( under fog of war)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My question is: how can I draw that kind of shape, changed dynamicaly, with XNA 4.0. I can calculate each point of this shadow polygon. I would avoid drawing it pixel by pixel due to performance reasons, maybe particles? But i won't have sharp edges with this tehnique. Any tips?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/dxFJ1.png" />
  <row Id="30440" PostHistoryTypeId="1" PostId="13675" RevisionGUID="38831266-158e-4625-80c7-3424f9734787" CreationDate="2011-06-14T10:27:56.223" UserDisplayName="zgorawski" Text="Draw real time fog of war in 2d game" />
  <row Id="30441" PostHistoryTypeId="3" PostId="13675" RevisionGUID="38831266-158e-4625-80c7-3424f9734787" CreationDate="2011-06-14T10:27:56.223" UserDisplayName="zgorawski" Text="&lt;xna&gt;" />
  <row Id="30442" PostHistoryTypeId="5" PostId="13670" RevisionGUID="f50a5c02-42d1-41ac-9f1c-6753843c4150" CreationDate="2011-06-15T01:10:00.703" UserId="7432" Comment="added 274 characters in body" Text="This was my original question:&#xD;&#xA;http://gamedev.stackexchange.com/questions/12431/populating-sprites&#xD;&#xA;I used the following code to spawn Enemy Sprites in my game. I have 2 types that I was using and it would display one then remove it and display the other. It did this repeatedly(Imagine someone playing with a light switch and you have what is happening with the NPCs. EnemyType1 is Off and EnemyType2 is On.).Also It does not apply the current level number meaning, it does not spawn the number of enemies for the level. The number of enemies I want to spawn is the exact number of the level.  I used other types of random methods( nextBoolean(), nextInt(), nextFloat() ). I showed the code to my friend and he told me that I would need to spawn them outside of my loop, but he did not know how to. So now I am trying to see if anyone on stack could help me. What I am trying to do is this: &#xD;&#xA;&#xD;&#xA;NPC's = Enemies &#xD;&#xA;&#xD;&#xA;I have 2 types of NPC's that I want to use. The number of Enemies that are spawned are equal to the the current level number. I want to be able to spawn how ever many is needed for that level and have it to where which Enemy that will spawn is random, so you don't know if you will get EnemyType1 or EnemyType2 or a Mix. Ex: Level 1, only 1 Enemy spawns, the type is random. Level 2, only 2 Enemies spawn, the type is random. Level 3, only 3 enemies spawn, the type is random. etc. &#xD;&#xA;&#xD;&#xA;Thanks In Advance. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30446" PostHistoryTypeId="2" PostId="13679" RevisionGUID="9452075f-c341-448a-8ff3-61e7530a0925" CreationDate="2011-06-15T02:29:04.097" UserId="288" Text="Z-culling (culls *pixels* that are behind already-drawn pixels in the Z-buffer) and back-face culling (culls *triangles* that are facing away from the camera) are handled by the `DepthStencilState` and `RasterizerState` respectively. These are &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/04/02/state-objects-in-xna-game-studio-4-0.aspx&quot;&gt;state objects&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;They are also the names of properties where you can set those state objects on the `GraphicsDevice` (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevice_members.aspx&quot;&gt;MSDN&lt;/a&gt;).&#xD;&#xA;&#xD;&#xA;The default values are:&#xD;&#xA;&#xD;&#xA;`DepthStencilState.Default` (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.depthstencilstate.default.aspx&quot;&gt;MSDN&lt;/a&gt;) which is set up to both read and write from the depth buffer.&#xD;&#xA;&#xD;&#xA;`RasterizerState.CullCounterClockwise` (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rasterizerstate.cullcounterclockwise.aspx&quot;&gt;MSDN&lt;/a&gt;) which is set up to cull triangles where the vertices are counter-clockwise.&#xD;&#xA;&#xD;&#xA;There are other built-in states available on the state objects, see the static members for each state object (MSDN: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.depthstencilstate_fields.aspx&quot;&gt;`DepthStencilState`&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rasterizerstate_fields.aspx&quot;&gt;`RasterizerState`&lt;/a&gt;). Additionally you can create your own state objects that further customise the behaviour.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;XNA itself does not provide any built-in culling mechanisms, *except* exposing those provided by the graphics device. These include Z-culling and backface-culling.  You could also argue that the stencil buffer, scissor tests, and the viewport are also kinds of culling.&#xD;&#xA;&#xD;&#xA;XNA does, however, provide some useful classes for adding your own, more advanced, object-level culling mechanisms. For example &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingfrustum.aspx&quot;&gt;`BoundingFrustum`&lt;/a&gt; provides intersection tests to allow you to determine what objects (usually represented by a &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingbox.aspx&quot;&gt;`BoundingBox`&lt;/a&gt; or &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingsphere.aspx&quot;&gt;`BoundingSphere`&lt;/a&gt;) are visible in your 3D camera.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://gamedev.stackexchange.com/questions/9277/optimizing-an-xna-2d-game&quot;&gt;This question and answer&lt;/a&gt; provide some useful information about how to decide where culling is appropriate." />
  <row Id="30447" PostHistoryTypeId="2" PostId="13680" RevisionGUID="bc3e58d0-f397-4d85-a183-00123e70a3f8" CreationDate="2011-06-15T02:32:10.307" UserId="8021" Text="I would stick with something forgiving at first. Python + [Pygame][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/news.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Yes, eventually Pygame just won't cut it when you are writing super awesome 3d fps games that rival carmacks stuff....but until then you will want to focus on making the game and not figuring out how to link libraries or manage memory." />
  <row Id="30448" PostHistoryTypeId="2" PostId="13681" RevisionGUID="80c3e672-65f6-44b3-a9c7-81392005653d" CreationDate="2011-06-15T02:55:42.690" UserId="288" Text="It's an **implementation detail**. You don't know for sure, it doesn't matter, it might differ between platforms, and it might change in the future.&#xD;&#xA;&#xD;&#xA;However you can make an educated guess: First of all the fact that `SoundEffectInstance` exists, and that you load sound files into `SoundEffect` indicates that `SoundEffect` is probably responsible for holding the sound effect in memory. And the existence of `SoundEffect.FromStream` and the buffer-based `SoundEffect` constructors are strong indications that `SoundEffect` *must* have a mechanism for keeping a sound buffer in memory. Therefore it is fairly safe to assume that when you load a `SoundEffect` from a file, it uses the same mechanism.&#xD;&#xA;&#xD;&#xA;If it's really important, you could test it by deleting or modifying the sound file, after loading the `SoundEffect`, and then creating an instance.&#xD;&#xA;&#xD;&#xA;As always, if performance is really important, you should *measure it*.&#xD;&#xA;&#xD;&#xA;Of course, creating a `SoundEffectInstance` does allocate resources (audio voices, managed and probably unmanaged memory). So it's not something that you should be creating regularly if you can avoid it - such as by pooling and reusing instances. When you're using `SoundEffect.Play`, then `SoundEffect` is internally managing a pool of `SoundEffectInstance` objects for you." />
  <row Id="30449" PostHistoryTypeId="2" PostId="13682" RevisionGUID="f839366c-537b-4d8e-8172-7466d35bc018" CreationDate="2011-06-15T03:00:25.920" UserId="7548" Text="Java is an important consideration if you wish to build games for smart phones that run Google's Android OS.&#xD;&#xA;&#xD;&#xA;Flash (Adobe) or Java are both widely supported by web browsers on many different platforms in case you wish to make games that run as components in internet web sites.&#xD;&#xA;&#xD;&#xA;C++ is an important consideration too (definitely don't overlook this).&#xD;&#xA;&#xD;&#xA;The important thing to remember about programming languages is that each has its strong points and advantages.  To some, choosing a programming language can be like choosing a religion.  If there are time-constraints, then focusing on a language you're already familiar with will be an advantage as well.&#xD;&#xA;" />
  <row Id="30450" PostHistoryTypeId="2" PostId="13683" RevisionGUID="881b898b-1d5e-4fab-b86b-24dffe4a9072" CreationDate="2011-06-15T03:09:35.283" UserId="962" Text="It sounds like you need to learn more about how Object Oriented Programming works.&#xD;&#xA;&#xD;&#xA;I think that you are creating an instance of an enemy, and then without storing that instance in an array, just creating a new instance with the same name, effectively destroying the original instance and creating a new instance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Create an array that will hold all the enemies. When you spawn an enemy add it to next position in the array.&#xD;&#xA;&#xD;&#xA;In your update method loop through all the enemies and update 1 per loop.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30451" PostHistoryTypeId="25" PostId="13633" RevisionGUID="a510c7c5-6781-4c12-a397-b3e2dad1832e" CreationDate="2011-06-15T03:22:32.657" Comment="http://twitter.com/#!/StackGameDev/status/80837566462566400" />
  <row Id="30452" PostHistoryTypeId="5" PostId="13680" RevisionGUID="dcf75ceb-1016-4048-a32c-a6bc8e997b7f" CreationDate="2011-06-15T03:26:24.060" UserId="8021" Comment="added 495 characters in body" Text="I would stick with something forgiving at first. Python + [Pygame][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pygame.org/news.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Yes, eventually Pygame just won't cut it when you are writing super awesome 3d fps games that rival carmacks stuff....but until then you will want to focus on making the game and not figuring out how to link libraries or manage memory.&#xD;&#xA;&#xD;&#xA;The other thing about using something like pygames is that you will get a chance to spend more time and become more familiar with writing the utilities that are required to make game assets. Don't under estimate how much effort you need to put into your asset generation tools! Especially map makers.&#xD;&#xA;&#xD;&#xA;After having work on three or four pygames based games, you will definitely then be ready to exercise your new skills with a more powerful set of libraries (maybe even still in python!)&#xD;&#xA;" />
  <row Id="30453" PostHistoryTypeId="2" PostId="13684" RevisionGUID="374b913e-7430-4c9f-aa3a-8fac1cef391e" CreationDate="2011-06-15T03:47:54.597" UserId="8023" Text="I am wondering if anyone has an estimate of what the growth rate is for developers (programmers) with knowledge of how to build AAA MMOs1?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="30454" PostHistoryTypeId="1" PostId="13684" RevisionGUID="374b913e-7430-4c9f-aa3a-8fac1cef391e" CreationDate="2011-06-15T03:47:54.597" UserId="8023" Text="What is the growth rate of MMORPG programmers?" />
  <row Id="30455" PostHistoryTypeId="3" PostId="13684" RevisionGUID="374b913e-7430-4c9f-aa3a-8fac1cef391e" CreationDate="2011-06-15T03:47:54.597" UserId="8023" Text="&lt;mmo&gt;" />
  <row Id="30458" PostHistoryTypeId="2" PostId="13685" RevisionGUID="70a61d7d-46e5-4fc0-ab55-211118e9c73e" CreationDate="2011-06-15T05:06:42.347" UserId="8024" Text="I play alot of COD4. And can see tracers for gunfire, missles, care packages fall from helicopters etc. &#xD;&#xA;&#xD;&#xA;There is alot of activity. I am curious to know the algorithm (at a high level) that manages all this action when you have 20 people on a map shooting each other to death ?&#xD;&#xA;&#xD;&#xA;[This question][1] touches on the subject but doesn't ask for a more in-depth answer as to how you the developers go about calculating and transmitting movement and collision detection for projectiles, be it missles/bullets or any other object that is flying through the air in real-time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13650/how-are-bullets-simulated-in-video-games" />
  <row Id="30459" PostHistoryTypeId="1" PostId="13685" RevisionGUID="70a61d7d-46e5-4fc0-ab55-211118e9c73e" CreationDate="2011-06-15T05:06:42.347" UserId="8024" Text="How are trajectories for moving objects calculated and transmitted to other players in Co-Op ?" />
  <row Id="30460" PostHistoryTypeId="3" PostId="13685" RevisionGUID="70a61d7d-46e5-4fc0-ab55-211118e9c73e" CreationDate="2011-06-15T05:06:42.347" UserId="8024" Text="&lt;collision-detection&gt;&lt;multiplayer&gt;&lt;3d-engines&gt;&lt;projectile-physics&gt;" />
  <row Id="30461" PostHistoryTypeId="2" PostId="13686" RevisionGUID="1b7ecbc2-4b4c-4fd3-9d70-34b3c516a321" CreationDate="2011-06-15T05:27:57.000" UserId="8025" Text="It depends on how important object for gameplay and how it working.&#xD;&#xA;&#xD;&#xA;Generally projectiles like missles move along a predictible trajectory so server can spawn a new object, set its position, direction, speed and transmit data about new projectile  to clients. Client-side code will simulate movements of a projectile using this data. If projectile hit something important (world geometry, other player or something else) server process this and inform clients about this.&#xD;&#xA;&#xD;&#xA;Human controlled objects require different approach. Since it cannot be fully predicted on client-side, server frequently send updates about position and direction to clients. Often this data include speed of object to allow client to interpolate and/or extrapolate movements of object between updates from server." />
  <row Id="30462" PostHistoryTypeId="2" PostId="13687" RevisionGUID="edf6ca5d-ade8-4edf-b1a9-441515ded288" CreationDate="2011-06-15T05:41:44.580" UserId="2158" Text="Check out [Real-time Frame Rate Up-conversion for Video Games][1], which was presented at Siggraph 2010.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://and.intercon.ru/releases/talks/rtfrucvg/" />
  <row Id="30463" PostHistoryTypeId="2" PostId="13688" RevisionGUID="22d0ccf9-10e9-455d-98af-d121d25ccf85" CreationDate="2011-06-15T06:15:37.977" UserId="8027" Text="There's a pretty cool writeup on the Team Fortess 2 wiki on the behavior of their projectile and hitscan weapons.&#xD;&#xA;&#xD;&#xA;http://wiki.teamfortress.com/wiki/Mechanics#Hit_detection" />
  <row Id="30464" PostHistoryTypeId="25" PostId="13684" RevisionGUID="26a32b3c-b090-4cec-b7d7-334eaebce0ed" CreationDate="2011-06-15T06:22:33.000" Comment="http://twitter.com/#!/StackGameDev/status/80882865927233537" />
  <row Id="30465" PostHistoryTypeId="6" PostId="13684" RevisionGUID="4983f010-247d-4d57-9164-cec163f71cd7" CreationDate="2011-06-15T07:22:21.613" UserId="7548" Comment="Added &quot;career&quot; tag" Text="&lt;mmo&gt;&lt;career&gt;" />
  <row Id="30466" PostHistoryTypeId="24" PostId="13684" RevisionGUID="4983f010-247d-4d57-9164-cec163f71cd7" CreationDate="2011-06-15T07:22:21.613" Comment="Proposed by 7548 approved by 51 edit id of 495" />
  <row Id="30467" PostHistoryTypeId="2" PostId="13689" RevisionGUID="d54c1c36-257f-4f30-bfcd-8ccd1fbb1e99" CreationDate="2011-06-15T07:41:30.530" UserId="8032" Text="I am trying to implement a simple 3d object on the cocos3d template.&#xD;&#xA;&#xD;&#xA;Usually you get the object from a POD file or similar.&#xD;&#xA;&#xD;&#xA;But what i need is to make it by code in the application.&#xD;&#xA;&#xD;&#xA;I have tried CC3BoxNode with CC3BoundingBox. But it isn't what I am looking for.&#xD;&#xA;&#xD;&#xA;I need to create something similar to that. &#xD;&#xA;&#xD;&#xA; http://i.stack.imgur.com/Cgf7g.png" />
  <row Id="30468" PostHistoryTypeId="1" PostId="13689" RevisionGUID="d54c1c36-257f-4f30-bfcd-8ccd1fbb1e99" CreationDate="2011-06-15T07:41:30.530" UserId="8032" Text="Simple polygon in cocos3d" />
  <row Id="30469" PostHistoryTypeId="3" PostId="13689" RevisionGUID="d54c1c36-257f-4f30-bfcd-8ccd1fbb1e99" CreationDate="2011-06-15T07:41:30.530" UserId="8032" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;cocos2d&gt;" />
  <row Id="30470" PostHistoryTypeId="2" PostId="13690" RevisionGUID="fc66a9f4-98d7-4fa3-bee1-6a0fc23b75fb" CreationDate="2011-06-15T08:15:07.533" UserId="8017" Text="I have a ball that you can make jump,&#xD;&#xA;&#xD;&#xA;I have a sneaking suspicion I'm doing this wrong. It works now, to the extend that gravity pulls the object down toward the ground, but I'm having trouble manipulating the speed of the object.&#xD;&#xA;&#xD;&#xA;What this is, is a ball jumping and falling towards the ground.&#xD;&#xA;&#xD;&#xA;I have another function called &quot;jump&quot; that just adds a value to it's yVel&#xD;&#xA;&#xD;&#xA;I can increase gravity, and it falls faster.&#xD;&#xA;&#xD;&#xA;I can increase the jSpeed speed, and it'll rise up longer, but not faster&#xD;&#xA;&#xD;&#xA;But I can't get it to do everything faster. It just looks painfully slow, which may or may not be because of my emulator running at 11 fps, on average.&#xD;&#xA;&#xD;&#xA;Is it just my emulator, or is it something on my end?&#xD;&#xA;&#xD;&#xA;    float time = elapsedTime/1000F;&#xD;&#xA;     if (speed &lt; maxSpeed){&#xD;&#xA;                speed = speed + accel;&#xD;&#xA;                }&#xD;&#xA;                if(mY + mVelY &lt; Panel.mHeight){ //0,0 is top-left&#xD;&#xA;                mVelY += (speed);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if (!(mY + height &gt;= Panel.mHeight)){&#xD;&#xA;                mVelY = mVelY  + gravity ;}&#xD;&#xA;    &#xD;&#xA;                mX  =  (float) (mX +(mVelX * time));&#xD;&#xA;                mY =  (float) (mY + (mVelY * time));&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30471" PostHistoryTypeId="1" PostId="13690" RevisionGUID="fc66a9f4-98d7-4fa3-bee1-6a0fc23b75fb" CreationDate="2011-06-15T08:15:07.533" UserId="8017" Text="2D game physics, doing it right" />
  <row Id="30472" PostHistoryTypeId="3" PostId="13690" RevisionGUID="fc66a9f4-98d7-4fa3-bee1-6a0fc23b75fb" CreationDate="2011-06-15T08:15:07.533" UserId="8017" Text="&lt;android&gt;&lt;2d-physics&gt;&lt;frame-rate&gt;" />
  <row Id="30473" PostHistoryTypeId="2" PostId="13691" RevisionGUID="284745a9-c900-44e8-b0fd-916ff14570e2" CreationDate="2011-06-15T08:46:16.703" UserId="8034" Text="Jamendo has a massive collection of excellent quality music tracks which are mostly under various Creative Commons licenses:&#xD;&#xA;&#xD;&#xA;http://www.jamendo.com/en/&#xD;&#xA;&#xD;&#xA;Look out for the &quot;No Derivatives&quot; tag. The definition of a derivative work is somewhat vague, so its best to avoid them, or ask the artist/composer. &quot;Share-Alike&quot; could also be a bit iffy.&#xD;&#xA;&#xD;&#xA;The site likes to mention that you should pay up for Jamendo Pro in order to use tracks for commercial works, but if the track is under a compatible Creative Commons licence (ie, CC-BY), then you don't **have** to pay up (although obviously its always a good idea to make sure the music creator gets a share of the profits, they deserve it!)&#xD;&#xA;Of course, if the track is under a non-compatible CC licence, then you will have to pay up, or ask the artist nicely." />
  <row Id="30474" PostHistoryTypeId="16" PostId="13691" RevisionGUID="b700cf8c-c38c-45e9-b41f-0da49da8e446" CreationDate="2011-06-15T08:46:16.703" UserId="8034" />
  <row Id="30475" PostHistoryTypeId="2" PostId="13692" RevisionGUID="88c9f4a2-d513-441a-99cf-9f123fd6c2bc" CreationDate="2011-06-15T08:47:55.627" UserId="7588" Text="Basically at the start of the level you need to call a function that creates the enemies for the current level, for example you could do :&#xD;&#xA;&#xD;&#xA;    for(int i=0; i &lt; currentLevel; i++)&#xD;&#xA;        enemyList.Add(new Enemy(nextInt() % 2));&#xD;&#xA;&#xD;&#xA;This would populate the list with a number of enemies equal to the current level. This should only be done when you change level, for example :&#xD;&#xA;&#xD;&#xA;    if(enemyList.Count == 0) {&#xD;&#xA;        currentLevel++;&#xD;&#xA;        CreateNewEnemies();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This means you have to unpopulate your list when the enemies die, this will be done in your Update loop.&#xD;&#xA;&#xD;&#xA;    foreach(Enemy e in enemyList) {&#xD;&#xA;        if(e.IsDead)&#xD;&#xA;            deadEnemies.Add(e);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    foreach(Enemy e in deadEnemies) {&#xD;&#xA;        enemyList.Remove(e);&#xD;&#xA;    }&#xD;&#xA;    deadEnemies.Clear();&#xD;&#xA;&#xD;&#xA;This is not optimal, but should work.&#xD;&#xA;&#xD;&#xA;    " />
  <row Id="30476" PostHistoryTypeId="2" PostId="13693" RevisionGUID="ba9f36ca-8608-44a2-8e28-e9eb50edba3d" CreationDate="2011-06-15T08:52:00.430" UserId="8066" Text="I have a missile that is shot from a ship at an angle, the missile then turns towards the target in an arc with a given turn radius. How do I determine the point on the arc when I need to start turning so the missile is heading straight for the target?" />
  <row Id="30477" PostHistoryTypeId="1" PostId="13693" RevisionGUID="ba9f36ca-8608-44a2-8e28-e9eb50edba3d" CreationDate="2011-06-15T08:52:00.430" UserId="8066" Text="How to calculate turn heading to a missile?" />
  <row Id="30478" PostHistoryTypeId="3" PostId="13693" RevisionGUID="ba9f36ca-8608-44a2-8e28-e9eb50edba3d" CreationDate="2011-06-15T08:52:00.430" UserId="8066" Text="&lt;projectile-physics&gt;" />
  <row Id="30479" PostHistoryTypeId="2" PostId="13694" RevisionGUID="a4d20e06-c9c7-42b6-8f89-61e532911afa" CreationDate="2011-06-15T09:17:05.547" UserId="1839" Text="There are some errors:&#xD;&#xA;&#xD;&#xA;    speed = speed + accel;&#xD;&#xA;&#xD;&#xA;acceleration must be multiplied by time to get the change of velocity/speed during this frame:&#xD;&#xA;&#xD;&#xA;    speed = speed + accel * time;&#xD;&#xA;&#xD;&#xA;The same problem is how you handle gravity, you cant simply add it to velocity.&#xD;&#xA;&#xD;&#xA;Then you add speed to velocity each frame. Speed is actually the length of the velocity vector. Adding speed to velocity doesn't make sense physically.&#xD;&#xA;&#xD;&#xA;You can find a proper implementation of [Euler Integration in my anser here][1]. There you can see how to work with Acceleration, Velocity and Position.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13178/why-is-my-velocity-decaying/13186#13186" />
  <row Id="30480" PostHistoryTypeId="5" PostId="13591" RevisionGUID="79bd3c0d-dc19-4859-ba14-ae92c0aacfca" CreationDate="2011-06-15T09:18:13.683" UserId="769" Comment="deleted 42 characters in body" Text="We currently have a simple slot machine in our online virtual world game.&#xD;&#xA;&#xD;&#xA;You set the amount you want to bet (in virtual money) and pull the lever, and depending on the 3 figures (there's only one line) you get a reward, a free round, lose some more money, or most of the time, get nothing at all. You can instantly pull the lever again. The previous bet will be maintained.&#xD;&#xA;&#xD;&#xA;At the moment this slot machine isn't really fun to play. The chances of winning something are pretty low (though when you win, you can win a lot). When you pull the lever, the result is determined (though not shown) immediately, so there's also no way influence the outcome of the wheels.&#xD;&#xA;&#xD;&#xA;How can it be made more fun?" />
  <row Id="30481" PostHistoryTypeId="25" PostId="13685" RevisionGUID="095e5758-f945-4f71-8b3c-d702e986d2ed" CreationDate="2011-06-15T09:22:33.470" Comment="http://twitter.com/#!/StackGameDev/status/80928167187058688" />
  <row Id="30482" PostHistoryTypeId="5" PostId="13694" RevisionGUID="dda11264-8e78-4782-8905-511868992c74" CreationDate="2011-06-15T09:22:44.330" UserId="1839" Comment="added 1 characters in body" Text="There are some errors:&#xD;&#xA;&#xD;&#xA;    speed = speed + accel;&#xD;&#xA;&#xD;&#xA;acceleration must be multiplied by time to get the change of velocity/speed during this frame:&#xD;&#xA;&#xD;&#xA;    speed = speed + accel * time;&#xD;&#xA;&#xD;&#xA;The same problem is how you handle gravity, you cant simply add it to velocity.&#xD;&#xA;&#xD;&#xA;Then you add speed to velocity each frame. Speed is actually the length of the velocity vector. Adding speed to velocity doesn't make sense physically.&#xD;&#xA;&#xD;&#xA;You can find a proper implementation of [Euler Integration in my answer here][1]. There you can see how to work with Acceleration, Velocity and Position.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13178/why-is-my-velocity-decaying/13186#13186" />
  <row Id="30483" PostHistoryTypeId="2" PostId="13695" RevisionGUID="8dca9afb-48b1-42e3-bf66-d9c749de8253" CreationDate="2011-06-15T09:44:56.813" UserId="8040" Text="Check out **OpenFeint** : [Getting Started With OpenFeint SDK for Android 1.8][1]&#xD;&#xA;Easy to start !&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://support.openfeint.com/dev/getting-started-with-openfeint-sdk-for-android-1-8/" />
  <row Id="30484" PostHistoryTypeId="5" PostId="13694" RevisionGUID="2d458901-8206-40f0-99a1-406e4a51aa66" CreationDate="2011-06-15T10:26:13.230" UserId="1839" Comment="added 16 characters in body" Text="There are some errors:&#xD;&#xA;&#xD;&#xA;    speed = speed + accel;&#xD;&#xA;&#xD;&#xA;acceleration must be multiplied by time to get the change of velocity/speed during this frame:&#xD;&#xA;&#xD;&#xA;    speed = speed + accel * time;&#xD;&#xA;&#xD;&#xA;The same problem is how you handle gravity, you cant simply add it to velocity.&#xD;&#xA;&#xD;&#xA;Then you add speed to velocity each frame. Speed is actually the length of the velocity vector. Adding speed to velocity doesn't make sense physically.&#xD;&#xA;&#xD;&#xA;You can find a proper implementation of [Euler Integration in my answer here][1], there is a simple example showing how to deal with Acceleration, Velocity and Position.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13178/why-is-my-velocity-decaying/13186#13186" />
  <row Id="30485" PostHistoryTypeId="2" PostId="13696" RevisionGUID="76659d25-cd45-4ecd-9f25-78ac9c3fcff8" CreationDate="2011-06-15T11:01:39.827" UserId="8042" Text=" - &quot;power-ups&quot; as the word suggests &quot;pulls-up&quot; your current powers ingame. Thus the effect is temporary and your powers will return to their previous default value when the power-up expired.&#xD;&#xA;&#xD;&#xA; - A &quot;bonus&quot; is an addition to the things you own ingame (score, collection, powers) but it is has no time-out. (example : have a defensive bonus on a shield. the bonus won't go away unless i decide to swap it for some other bonus / if the bonus can expire after some time it's a power-up ;-) )&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30486" PostHistoryTypeId="2" PostId="13697" RevisionGUID="806fc050-98de-425e-a2ef-2b9036bfc22f" CreationDate="2011-06-15T11:29:57.063" UserId="1494" Text="My math might be a bit wrong, so I have wikied the answer.&#xD;&#xA;&#xD;&#xA;I assume you want to do the continually homing scenario - where the missile P1 travelling at a velocity V1 constantly tries to turn toward the player P2; but at a limited turning rate.&#xD;&#xA;&#xD;&#xA; 1. Determine the vector between the player and the missile.&#xD;&#xA;&#xD;&#xA;        V2 = P2 - P1&#xD;&#xA;&#xD;&#xA; 2. Turn them into unit vectors.&#xD;&#xA;&#xD;&#xA;        V3 = UNIT(V1)&#xD;&#xA;        V4 = UNIT(V2)&#xD;&#xA;&#xD;&#xA; 3. Determine the angle between the vectors.&#xD;&#xA;&#xD;&#xA;        a = ARCCOS(V3 * V4) (* indicating dot product)&#xD;&#xA;&#xD;&#xA; 4. Limit the value of the angle between them (remember your trig functions probably work with radians, so try 0.1 as the turning rate).&#xD;&#xA;&#xD;&#xA;        a = SIGN(a) * MINIMUM(ABS(a), MaximumTurningRate)&#xD;&#xA;&#xD;&#xA; 5. Create the new movement vector.&#xD;&#xA;&#xD;&#xA;        V1 = UNIT(V3.x + SIN(a), V4.y + COS(a)) * MissileSpeed&#xD;&#xA;&#xD;&#xA;**EDIT:** This has no 'starting point' as it is a more robust (and is an easier implementation) for the continually homing scenario. You don't need to find a starting point for a circle - just limit the rate at which the missile can change direction and the rest happens because of the ghost in the machine." />
  <row Id="30487" PostHistoryTypeId="16" PostId="13697" RevisionGUID="099249bc-f8ee-46f7-aeec-de47765b0ddf" CreationDate="2011-06-15T11:29:57.063" UserId="1494" />
  <row Id="30488" PostHistoryTypeId="25" PostId="13693" RevisionGUID="c344ed20-18eb-473b-924a-859fb8dab4a9" CreationDate="2011-06-15T12:22:34.140" Comment="http://twitter.com/#!/StackGameDev/status/80973467066961920" />
  <row Id="30489" PostHistoryTypeId="2" PostId="13698" RevisionGUID="41dba23a-4fbb-49db-8080-145b8d7b2374" CreationDate="2011-06-15T12:30:01.790" UserId="2188" Text="Yes, you are wondering if anyone has an estimate of what the growth rate is for developers (programmers) with knowledge of how to build AAA MMOs1.&#xD;&#xA;&#xD;&#xA;You're welcome." />
  <row Id="30490" PostHistoryTypeId="5" PostId="10216" RevisionGUID="1fdedc01-c986-4919-a18c-5b57e3110863" CreationDate="2011-06-15T12:44:43.920" UserId="2188" Comment="typo" Text="Why bother?&#xD;&#xA;&#xD;&#xA;It's pointless to clone a game widespread such as that one: doing so you automatically give away any chance of success for your game!&#xD;&#xA;&#xD;&#xA;You risk getting sued to build something that will be worthless anyway? Why, lol, that's nonsense!&#xD;&#xA;&#xD;&#xA;You'd better focus on actually creating something original instead." />
  <row Id="30491" PostHistoryTypeId="2" PostId="13699" RevisionGUID="9894261e-dc78-4068-bd35-978338967ba8" CreationDate="2011-06-15T12:58:49.327" UserId="8050" Text="Probably there is not a single answer for this. To be generic, you should use a model for the battle and put some order of randomness on it.&#xD;&#xA;&#xD;&#xA;The random may be the weighted dice trown to se who wins a direct fight (as in Risk or D&amp;D) where your model computes the direct fights. &#xD;&#xA;&#xD;&#xA;Another aproach may be that both the contenders choose a random strategy and the match of this couple generates the direct fights to compute through another random number. &#xD;&#xA;&#xD;&#xA;The strategy can be choosed by each army unit accounting the unit's nature or personality, a Markov chain can be used to move the army or each army unit from a strategy to the next taking into account the current overall result.&#xD;&#xA;&#xD;&#xA;In any case what you do is to choose a granularity between a model for the battle and the success of a dice trown and keep it secret. Notthing is more boring that know how the battle will finish because you know the dynamics. &#xD;&#xA;&#xD;&#xA;corollary: who designs a game hardly finds it enjoyable as is for the rest of the world." />
  <row Id="30492" PostHistoryTypeId="2" PostId="13700" RevisionGUID="21451b45-7cca-4181-b5a6-d4f74a9a55df" CreationDate="2011-06-15T13:33:52.227" UserId="8050" Text="You should consider friction specially in submarines, this ships can travel both under and on whater surface so the speed they can reach may vary according - this to account basic fluid dynamics.&#xD;&#xA;&#xD;&#xA;The whole dynamics should be that the ship has an orientation and a propulsion force (both positive or negative), this means an acceleration toward the ship direction. Another acceleration is due the friction, it should be propotional to the speed and backward oriented. The propotional factor may depend upon the ship's shape (repeat it 10 time as fast as you can) and if is in submarine or normal mode. &#xD;&#xA;&#xD;&#xA;Then you need to integrate the acceleration to the speed and the speed to the position. Euler integration is not THE integration (what about runge-kutta?) anyway you have to integrate and have to choose between speed (of integration calculus) and accuracy (your ship should not explode or travel backward faster than light).&#xD;&#xA;&#xD;&#xA;Summarizing, a ship can be represented by:&#xD;&#xA;&#xD;&#xA; - friction states&#xD;&#xA; - max propultion acceleration&#xD;&#xA; - the friction status&#xD;&#xA; - current position&#xD;&#xA; - velocity vector&#xD;&#xA; - current acceleration factor&#xD;&#xA; - heading&#xD;&#xA;&#xD;&#xA;The first two depends upon each ship type, the others defines the complete status of each ship in the game and the last two of this are the ones you can directly control (you should consider the rudder so the heading become an indirect parameter controlled by the rudder position, the choose is yours)" />
  <row Id="30493" PostHistoryTypeId="2" PostId="13701" RevisionGUID="fb137563-da0d-42ba-9b4c-6cd1c3e1e812" CreationDate="2011-06-15T14:25:40.190" UserId="8054" Text="I'm working on my own quadtree for use in games for physics (collision detection to be exact) but am unable to move an object from one node to another node.&#xD;&#xA;&#xD;&#xA;What I'm doing is if some object is to be moved, I'm deleting it from its old position and adding a new object (with same property, such as width and height) to the new position. Is my approach correct or is there any other optimized process to do same?&#xD;&#xA;&#xD;&#xA;The problem I'm facing is that if I move an object from node 0 to node 3 (both node being children of, for ex., root node) the root node container(I'm using std::vector) gets the object but it is not updated in the node 3's container.&#xD;&#xA;&#xD;&#xA;Any solution to my problem? Though would be happy to try some other method too.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="30494" PostHistoryTypeId="1" PostId="13701" RevisionGUID="fb137563-da0d-42ba-9b4c-6cd1c3e1e812" CreationDate="2011-06-15T14:25:40.190" UserId="8054" Text="Moving object through nodes in Quadtree" />
  <row Id="30495" PostHistoryTypeId="3" PostId="13701" RevisionGUID="fb137563-da0d-42ba-9b4c-6cd1c3e1e812" CreationDate="2011-06-15T14:25:40.190" UserId="8054" Text="&lt;2d-physics&gt;" />
  <row Id="30496" PostHistoryTypeId="2" PostId="13702" RevisionGUID="abf05d9a-9f12-4921-988b-342c484a948e" CreationDate="2011-06-15T14:27:54.827" UserId="163" Text="@Blecki's answer is correct, I also don't have 3.1 installed, but some quick googling with bing shows a few [examples][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    foreach (ModelMesh mesh in model.Meshes) &#xD;&#xA;            { &#xD;&#xA;                int numberVertices, numberIndices; &#xD;&#xA;                numberVertices = &#xD;&#xA;                    mesh.VertexBuffer.SizeInBytes / mesh.MeshParts[0].VertexStride; &#xD;&#xA;                if (mesh.IndexBuffer.IndexElementSize == IndexElementSize.SixteenBits) &#xD;&#xA;                    numberIndices = mesh.IndexBuffer.SizeInBytes / sizeof(short); &#xD;&#xA;                else &#xD;&#xA;                    numberIndices = mesh.IndexBuffer.SizeInBytes / sizeof(int); &#xD;&#xA; &#xD;&#xA;                totalNumVertices += numberVertices; &#xD;&#xA;                totalNumFaces += numberIndices / 3; &#xD;&#xA;            } &#xD;&#xA;&#xD;&#xA;  [1]: http://forums.create.msdn.com/forums/p/60962/374878.aspx" />
  <row Id="30497" PostHistoryTypeId="2" PostId="13703" RevisionGUID="626e5bf4-2e09-48a7-8821-5c7481a3b050" CreationDate="2011-06-15T14:34:59.483" UserId="163" Text="You should be working with references (or pointers depending on your language) ... moving something should almost never require one object to be destroyed and another created." />
  <row Id="30498" PostHistoryTypeId="2" PostId="13704" RevisionGUID="63a5b28f-66e4-4010-a10b-8b8e74b5cf06" CreationDate="2011-06-15T14:49:23.537" UserId="8055" Text="I am looking to create a game. Starting with something simple, the &quot;hello world&quot; of gaming if you will. I think OpenGL will fit my goals. I want to start on a PC because its readily available to me. Eventually I would like to develop on the iPhone and since it uses openGL I feel this is a good translatable skillset.&#xD;&#xA;&#xD;&#xA;I would really like to keep things simple. Maybe start with PONG then a 2D scrolling Mario-ish game. Ultimately I want to create a game similar to Farmville.&#xD;&#xA;&#xD;&#xA;To the experienced game devs out there, do you agree? Does OpenGL offer a free/low cost to entry as I think it does? How well does the skillset Xfer to the iPhone (I believe I'll need to use C on the PC and Obj-C on iPhone)? Finally, what are the &quot;big-3&quot; using for development (PS3, Nintendo, Xbox)?&#xD;&#xA;" />
  <row Id="30499" PostHistoryTypeId="1" PostId="13704" RevisionGUID="63a5b28f-66e4-4010-a10b-8b8e74b5cf06" CreationDate="2011-06-15T14:49:23.537" UserId="8055" Text="Does openGL fit my needs?" />
  <row Id="30500" PostHistoryTypeId="3" PostId="13704" RevisionGUID="63a5b28f-66e4-4010-a10b-8b8e74b5cf06" CreationDate="2011-06-15T14:49:23.537" UserId="8055" Text="&lt;opengl&gt;" />
  <row Id="30501" PostHistoryTypeId="2" PostId="13705" RevisionGUID="6e54accd-63c8-4f10-9dc1-c77c1e2eb51c" CreationDate="2011-06-15T15:03:22.277" UserId="7952" Text="Yes you can use OpenGL freely. Its a good place to start since its a well-known api with a lot of resources already out there. Since OpenGL is available on a lot of platforms, your skills once you learn it will probably transfer nicely. &#xD;&#xA;&#xD;&#xA;However, if this is your first time diving into unmanaged code, you could lessen the learning curve my using a managed graphics api and then jump to OpenGL. But that depends on where you stand now.&#xD;&#xA;&#xD;&#xA;Also, you can use c++ with OpenGL on the pc. Hope this helped :)" />
  <row Id="30502" PostHistoryTypeId="2" PostId="13706" RevisionGUID="6533cc44-ee0b-40f1-8cf8-9eab2f199c83" CreationDate="2011-06-15T15:03:28.633" UserId="2792" Text="Yes, you can use OpenGL to render 2D stuff and it gives you some flexibility. I regularly does this, but it is a bit trickier than using a simpler 2D only API. What you gain is accelerated scaling and rotating, and the step to 3D is not that big if you want to take that later on.&#xD;&#xA;&#xD;&#xA;The API itself is C, and so is the GL ES API (for iPhone), but you can use it from Objective C and C++ (and most other languages).&#xD;&#xA;&#xD;&#xA;The consoles usually use custom low level API:s, but the Xbox360 one looks a lot like DX9." />
  <row Id="30503" PostHistoryTypeId="2" PostId="13707" RevisionGUID="2fb61e00-ee2e-4a5c-b4d4-1b3f01d99137" CreationDate="2011-06-15T15:07:00.443" UserId="1430" Text="OpenGL is a suitable choice for a graphics API. There's a fair bit of legacy cruft floating around in the API, especially if you are not using the latest version, which can be distracting and confusing for a newbie. It's also a fairly low-level system and it's possible you may want to investigate other potential 2D engines that provide a higher-level API. This is especially true if you only want to focus on 2D graphics initially, because OpenGL is a 3D API -- it has no &quot;2D mode,&quot; and if you don't understand the fundamentals of the 3D graphics pipeline that you're using, even when faking 2D with it, you can get yourself into some uncomfortable spots with weird, difficult-to-diagnose (for you) bugs.&#xD;&#xA;&#xD;&#xA;There's [a lot of questions on the subject of 2D engines][1] here. &#xD;&#xA;&#xD;&#xA;OpenGL, Direct3D, whatever -- it's more important that you learn the fundamentals of graphics programming. *That* skillset will transfer to any API or any engine, which means when changing platforms you simply need to learn another API and how that API exposes those fundamental, shared concepts, which is trivial. Or at least should be, for a good programmer -- if it is difficult for you, you just need to practice it more.&#xD;&#xA;&#xD;&#xA;&gt; Does OpenGL offer a free/low cost to&#xD;&#xA;&gt; entry as I think it does?&#xD;&#xA;&#xD;&#xA;Yes, it costs nothing to use OpenGL itself.&#xD;&#xA;&#xD;&#xA;&gt; How well does the skillset Xfer to the&#xD;&#xA;&gt; iPhone (I believe I'll need to use C&#xD;&#xA;&gt; on the PC and Obj-C on iPhone)?&#xD;&#xA;&#xD;&#xA;You can use C and C++ on iOS as well -- you'll require a minimum amount of Objective-C bootstrap, but the bulk of your program can easily be written in other languages. The iPhone provides you the OpenGL ES API, which is essentially a subset of the full OpenGL API. It should be relatively easy for you to adapt your code to run on an iOS device.&#xD;&#xA;&#xD;&#xA;&gt; Finally, what are the &quot;big-3&quot; using&#xD;&#xA;&gt; for development (PS3, Nintendo, Xbox)?&#xD;&#xA; &#xD;&#xA;It doesn't matter. This kind of question is indicative, usually, of a concern that you should pick the one &quot;right thing&quot; to learn and focus on that. But there isn't a right thing and if you know the basics, as I noted in the initial part of this answer, you can learn any API presenting those basics with relative ease.&#xD;&#xA;&#xD;&#xA;That said, the PS3 has an OpenGL implementation that nobody takes seriously and a proprietary API for anything real. The 360 uses an API that is quite similar to Direct3D. The Wii probably uses something OpenGL-like as well, although I couldn't say for sure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/search?q=2d%20engines" />
  <row Id="30504" PostHistoryTypeId="2" PostId="13708" RevisionGUID="180a874a-20d5-499b-a730-052005aee362" CreationDate="2011-06-15T15:07:54.217" UserId="7946" Text="Listen to this sentence and repeat it a couple of times, because it's very important if you want to program games: Develop games, not engines.&#xD;&#xA;&#xD;&#xA;If you want to develop games, you shouldn't use low level things like DirectX or OpenGL at all, because 99% of your learning time will be spent dealing with the graphics API instead of actually programming your game. &#xD;&#xA;&#xD;&#xA;There are tons of free good engines for 2D and 3D out there, and even if you don't want to take a finished engine and work with it, you should at least consider using an abstraction layer library like SFML, which builds upon OpenGL, but also provides most other stuff that you need for game programming, like support for audio, window and input handling, networking, etc. ( http://www.sfml-dev.org/ ). &#xD;&#xA;&#xD;&#xA;So my advice: Forget about OpenGL for now, search for engines or high level APIs out there which let you achieve your first Pong game more quickly, and go with it." />
  <row Id="30505" PostHistoryTypeId="5" PostId="13624" RevisionGUID="d4ff004a-458a-4ad7-9004-98a2fe52a3d8" CreationDate="2011-06-15T15:10:32.533" UserId="3588" Comment="Some general fixes - capitalizations, spelling, and also italicizing the game names. ♪" Text="There are two slightly different scenarios I am interested in and I'l give you examples of each.&#xD;&#xA;&#xD;&#xA;The first is like the tournament system in *Super Smash Brothers Melee*, when there can be dozens of cpu vs cpu battles and it has to choose a winner. This could be done with a random number generator but I feel there is something more there.&#xD;&#xA;&#xD;&#xA;The second is in some games, mostly strategy games, you can choose to play a battle or have the computer calculate the battle for you. The game *Medieval: Total War* comes to mind, where it calculates how many troops you and the computer lose. In these scenarios, it never goes as well as if I had done it myself but I usually win if it is plausible.&#xD;&#xA;&#xD;&#xA;What I want to know is, how are these battles are calculated? Does anyone know how it is done, or have an idea of how to implement it?&#xD;&#xA;&#xD;&#xA;I had an idea of just doing the battle normally but disabling all graphic display so it would conclude very fast, but I'm not sure this would work too well." />
  <row Id="30506" PostHistoryTypeId="24" PostId="13624" RevisionGUID="d4ff004a-458a-4ad7-9004-98a2fe52a3d8" CreationDate="2011-06-15T15:10:32.533" Comment="Proposed by 3588 approved by 1156 edit id of 496" />
  <row Id="30508" PostHistoryTypeId="5" PostId="13707" RevisionGUID="b1cdde41-79d0-44ce-bbdd-caeed2d6d11f" CreationDate="2011-06-15T15:12:46.230" UserId="1430" Comment="added 1371 characters in body" Text="**On OpenGL:**&#xD;&#xA;&#xD;&#xA;OpenGL is a suitable choice for a graphics API. There's a fair bit of legacy cruft floating around in the API, especially if you are not using the latest version, which can be distracting and confusing for a newbie. It's also a fairly low-level system and it's possible you may want to investigate other potential 2D engines that provide a higher-level API. This is especially true if you only want to focus on 2D graphics initially, because OpenGL is a 3D API -- it has no &quot;2D mode,&quot; and if you don't understand the fundamentals of the 3D graphics pipeline that you're using, even when faking 2D with it, you can get yourself into some uncomfortable spots with weird, difficult-to-diagnose (for you) bugs.&#xD;&#xA;&#xD;&#xA;There's [a lot of questions on the subject of 2D engines][1] here. &#xD;&#xA;&#xD;&#xA;OpenGL, Direct3D, whatever -- it's more important that you learn the fundamentals of graphics programming. *That* skillset will transfer to any API or any engine, which means when changing platforms you simply need to learn another API and how that API exposes those fundamental, shared concepts, which is trivial. Or at least should be, for a good programmer -- if it is difficult for you, you just need to practice it more.&#xD;&#xA;&#xD;&#xA;&gt; Does OpenGL offer a free/low cost to&#xD;&#xA;&gt; entry as I think it does?&#xD;&#xA;&#xD;&#xA;Yes, it costs nothing to use OpenGL itself.&#xD;&#xA;&#xD;&#xA;&gt; How well does the skillset Xfer to the&#xD;&#xA;&gt; iPhone (I believe I'll need to use C&#xD;&#xA;&gt; on the PC and Obj-C on iPhone)?&#xD;&#xA;&#xD;&#xA;You can use C and C++ on iOS as well -- you'll require a minimum amount of Objective-C bootstrap, but the bulk of your program can easily be written in other languages. The iPhone provides you the OpenGL ES API, which is essentially a subset of the full OpenGL API. It should be relatively easy for you to adapt your code to run on an iOS device.&#xD;&#xA;&#xD;&#xA;&gt; Finally, what are the &quot;big-3&quot; using&#xD;&#xA;&gt; for development (PS3, Nintendo, Xbox)?&#xD;&#xA; &#xD;&#xA;It doesn't matter. This kind of question is indicative, usually, of a concern that you should pick the one &quot;right thing&quot; to learn and focus on that. But there isn't a right thing and if you know the basics, as I noted in the initial part of this answer, you can learn any API presenting those basics with relative ease.&#xD;&#xA;&#xD;&#xA;That said, the PS3 has an OpenGL implementation that nobody takes seriously and a proprietary API for anything real. The 360 uses an API that is quite similar to Direct3D. The Wii probably uses something OpenGL-like as well, although I couldn't say for sure.&#xD;&#xA;&#xD;&#xA;**On &quot;Your Needs:&quot;**&#xD;&#xA;&#xD;&#xA;We can't really answer that for you, since we only have the most cursory understanding of your needs and your ability. Just like learning APIs, evaluating requirements and potential solutions for those requirements is an important part of a developer's training.&#xD;&#xA;&#xD;&#xA;The best way to do this is to try it -- set up a project and try to build a quick tech demo with OpenGL. You'll get a feel for how the API works, where you can find good reference material (because you will invariably get stuck somewhere and have to hit up Google to find out, for example, &quot;[how to create a shader in OpenGL][2].&quot;&#xD;&#xA;&#xD;&#xA;You can then grab some higher-level 2D engine and try to recreate the same tech demo and see how you feel about the relative experience. You can try to demonstrate features you know you'll want in your game -- if you want fancy alpha-blended explosions, try building demos that render a bunch of transparent sprites (or even just blank, colored quads) intermixed with some opaque ones. You'll discover the problems inherent in rendering transparent graphics and you'll have to solve them with both pieces of technology you're evaluating. One will, perforce, work out better/easier for you. That may be the API you want to actually stick with.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/search?q=2d%20engines&#xD;&#xA;  [2]: http://www.google.com/search?&amp;q=how%20to%20create%20a%20shader%20in%20opengl" />
  <row Id="30509" PostHistoryTypeId="25" PostId="13701" RevisionGUID="14a294b5-0a17-4ad7-91d4-2d5967d0d501" CreationDate="2011-06-15T15:22:35.480" Comment="http://twitter.com/#!/StackGameDev/status/81018771665457152" />
  <row Id="30510" PostHistoryTypeId="2" PostId="13710" RevisionGUID="b16d89b9-cd03-4f5a-825b-547703e5affe" CreationDate="2011-06-15T15:23:40.363" UserId="8056" Text="Actually many games use a gpu rendering hit test algorithm. Here's the basic way it works:&#xD;&#xA;&#xD;&#xA;1) Off-screen create a rendering of the current view where all terrain is black, and every character is a non-black color&#xD;&#xA;2) Get the color of the pixel under the cross hair&#xD;&#xA;3) If it's non-black lookup the color-&gt;player mapping and apply a hit to that target.&#xD;&#xA;&#xD;&#xA;This method has been used for years in games mostly because it's pixel perfect. If a single pixel of the player's hat is sticking out from behind a wall, you can hit him. I.E. if you can see it, you can hit it. This type of precision is next to impossible with simple ray casting techniques. And secondly, this sort of test is extremely fast and can be performed on the GPU. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="30512" PostHistoryTypeId="10" PostId="13684" RevisionGUID="383703af-4df7-46ab-83e2-6889b3121395" CreationDate="2011-06-15T15:31:47.087" UserId="14" CloseReasonId="4" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="30513" PostHistoryTypeId="2" PostId="13711" RevisionGUID="bd1e832a-c0f7-4d2a-935c-550344b0c26e" CreationDate="2011-06-15T16:07:28.207" UserId="93" Text="I'm writing a tool in C# that needs to open FBX files (and this the XNA content pipeline isn't a suitable solution). I note that Autodesk only provides it's FBX SDK at a C++ class library. Before I write it myself I thought I'd ask if anyone knows of existing .NET bindings for this SDK?" />
  <row Id="30514" PostHistoryTypeId="1" PostId="13711" RevisionGUID="bd1e832a-c0f7-4d2a-935c-550344b0c26e" CreationDate="2011-06-15T16:07:28.207" UserId="93" Text=".NET bindings for Autodesk's FBX SDK?" />
  <row Id="30515" PostHistoryTypeId="3" PostId="13711" RevisionGUID="bd1e832a-c0f7-4d2a-935c-550344b0c26e" CreationDate="2011-06-15T16:07:28.207" UserId="93" Text="&lt;importing&gt;&lt;fbx&gt;" />
  <row Id="30516" PostHistoryTypeId="5" PostId="13638" RevisionGUID="48f2abdd-6056-483b-a8da-b931d9eb049b" CreationDate="2011-06-15T16:11:40.780" UserId="2061" Comment="&quot;exponential&quot; was correct." Text="One of the struggles I've always had in game development is deciding how to implement experience points attributed to gaining a level.  There doesn't seem to be a pattern to gaining a level in many of the games I've played, so I assume they have a static dictionary table which contains experience points vs. the level.  e.g.&#xD;&#xA;&#xD;&#xA;    Experience   Level&#xD;&#xA;    0            1&#xD;&#xA;    100          2&#xD;&#xA;    175          3&#xD;&#xA;    280          4&#xD;&#xA;    800          5&#xD;&#xA;&#xD;&#xA;...There isn't a rhyme or reason why 280 points is equal to level 4, it just is.&#xD;&#xA;&#xD;&#xA;I'm not sure how those levels are decided, but it certainly wouldn't be dynamic.  I've also thought about the possibility of exponential levels, as not to have to keep a separate lookup table, e.g.&#xD;&#xA;&#xD;&#xA;    Experience   Level&#xD;&#xA;    0            1&#xD;&#xA;    100          2&#xD;&#xA;    200          3&#xD;&#xA;    400          4&#xD;&#xA;    800          5&#xD;&#xA;    1600         6&#xD;&#xA;    3200         7&#xD;&#xA;    6400         8&#xD;&#xA;&#xD;&#xA;...but that seems like it would grow out of control rather quickly, as towards the upper levels, the enemies in the game would have to provide a whopping amount of experience to level -- and that would be to difficult to control.  Leveling would become an impossible task.&#xD;&#xA;&#xD;&#xA;Does anyone have any pointers, or methods they use to decide how to *level* a character based on experience?  I want to be fair in leveling and I want to stay ahead of the players as not to worry about constantly adding new experience/level lookups." />
  <row Id="30517" PostHistoryTypeId="24" PostId="13638" RevisionGUID="48f2abdd-6056-483b-a8da-b931d9eb049b" CreationDate="2011-06-15T16:11:40.780" Comment="Proposed by 2061 approved by 51 edit id of 497" />
  <row Id="30518" PostHistoryTypeId="2" PostId="13712" RevisionGUID="d0347600-4f2e-416f-8e2e-7682d3a34585" CreationDate="2011-06-15T16:12:22.093" UserId="1430" Text="Unfortunately, I don't think there are any -- I've never stumbled across them, at least. There's definitely a niche there if you can write a C# wrapper that can be distributed (not sure what the FBX SDK license terms are, though, they may make that cumbersome)." />
  <row Id="30519" PostHistoryTypeId="5" PostId="13672" RevisionGUID="445fe0ae-1738-452a-a8b0-122386fc3f6b" CreationDate="2011-06-15T16:14:35.637" UserId="4443" Comment="attempted to make more clear" Text="I am not 100% sure what you are asking, but from this post and the other one here is my guess:&#xD;&#xA;&#xD;&#xA;It sounds like you were selecting which type of NPC the NPC should be during the update for the object. This would be why it constantly changes every frame.&#xD;&#xA;&#xD;&#xA;What you need to do is find a place where you can set that value where it will only be set one time. This is probably what your friend meant by 'outside of the loop'.&#xD;&#xA;&#xD;&#xA;If you can more clearly describe what you are seeing as opposed to trying to explain what you are doing, it might help be able to refine this answer more." />
  <row Id="30520" PostHistoryTypeId="6" PostId="13711" RevisionGUID="549cc94e-567f-44d8-b9c6-a7880bad21d5" CreationDate="2011-06-15T16:15:47.517" UserId="1156" Comment="edited tags" Text="&lt;c#&gt;&lt;.net&gt;&lt;importing&gt;&lt;fbx&gt;" />
  <row Id="30521" PostHistoryTypeId="5" PostId="13696" RevisionGUID="b0ed3f78-5fa9-49f0-905d-d16fb11ac57c" CreationDate="2011-06-15T16:16:06.207" UserId="8042" Comment="improved formatting" Text=" - &quot;power-ups&quot; as the word suggests &quot;pulls-up&quot; your current &quot;powers&quot; ingame. Thus the effect is temporary and your powers will return to their previous default value when the power-up expired.&#xD;&#xA;&#xD;&#xA; - A &quot;bonus&quot; is an addition to the things you own ingame (score, collection, powers) but it is has no time-out. (example : have a defensive bonus on a shield. the bonus won't go away unless i decide to swap it for some other bonus / if the bonus can expire after some time it's a power-up ;-) )&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30522" PostHistoryTypeId="2" PostId="13713" RevisionGUID="a6c77486-c244-492a-ac79-07ef1038ab15" CreationDate="2011-06-15T16:52:19.733" UserId="1929" Text="Ludum Dare is great, except it's only 48-72 hours (depending on your flavour). Is there any particular (good) competition that gives you 1-2 weeks to develop? I don't usually get enough time to put significant effort in 2-3 days." />
  <row Id="30523" PostHistoryTypeId="1" PostId="13713" RevisionGUID="a6c77486-c244-492a-ac79-07ef1038ab15" CreationDate="2011-06-15T16:52:19.733" UserId="1929" Text="Two-Week Game Competition" />
  <row Id="30524" PostHistoryTypeId="3" PostId="13713" RevisionGUID="a6c77486-c244-492a-ac79-07ef1038ab15" CreationDate="2011-06-15T16:52:19.733" UserId="1929" Text="&lt;game-competitions&gt;" />
  <row Id="30525" PostHistoryTypeId="6" PostId="13713" RevisionGUID="61900ca8-7694-4ec7-8193-2f21af1bcc7d" CreationDate="2011-06-15T16:53:55.090" UserId="51" Comment="edited tags" Text="&lt;competition&gt;" />
  <row Id="30526" PostHistoryTypeId="2" PostId="13714" RevisionGUID="1ca435b1-e44c-4817-a474-397c9515af2d" CreationDate="2011-06-15T17:07:30.743" UserId="6558" Text="Two major ones I know of are the [Seven Day Roguelike][1] Competition and [Pyweek][2].&#xD;&#xA;&#xD;&#xA;[The Something Awful Forums][5] also has a month long gamedev competition, starting in July.  You can form teams, but you or someone on your team has to have an account there.&#xD;&#xA;&#xD;&#xA;The [Experimental Gameplay Project][3] also has month long competitions where you're only allowed to spend a week on development.  Each month there's a different theme.&#xD;&#xA;&#xD;&#xA;[TIGSource forums][4] also occasionally do month long competitions, though they seem to happen somewhat rarely.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://roguebasin.roguelikedevelopment.org/mediawiki/index.php?title=7DRL&#xD;&#xA;  [2]: http://www.pyweek.org/&#xD;&#xA;  [3]: http://experimentalgameplay.com/&#xD;&#xA;  [4]: http://forums.tigsource.com/&#xD;&#xA;  [5]: http://forums.somethingawful.com/" />
  <row Id="30527" PostHistoryTypeId="4" PostId="13713" RevisionGUID="b7d03f8e-a2ef-4b49-8a95-9a831f54a066" CreationDate="2011-06-15T17:14:53.600" UserId="1929" Comment="edited title; added 86 characters in body" Text="One- to Two-Week Game Competition" />
  <row Id="30528" PostHistoryTypeId="5" PostId="13713" RevisionGUID="b7d03f8e-a2ef-4b49-8a95-9a831f54a066" CreationDate="2011-06-15T17:14:53.600" UserId="1929" Comment="edited title; added 86 characters in body" Text="Ludum Dare is great, except it's only 48-72 hours (depending on your flavour). Is there any particular (good) competition that gives you 1-2 weeks to develop? I don't usually get enough time to put significant effort in 2-3 days.&#xD;&#xA;&#xD;&#xA;**Edit:** I'm using .NET. It must be open to .NET (Silverlight, preferably) games." />
  <row Id="30529" PostHistoryTypeId="5" PostId="13079" RevisionGUID="33866f54-7250-4e23-8740-28922e2dc402" CreationDate="2011-06-15T17:32:09.493" UserId="6588" Comment="added 5 characters in body" Text="After using some modeling tool to build the geometry, a great free tool for lighting your level is gile[s]&#xD;&#xA;&#xD;&#xA;http://www.frecle.net/index.php?show=giles.about" />
  <row Id="30530" PostHistoryTypeId="5" PostId="11495" RevisionGUID="c6f55a6e-0276-473b-b3a5-8fe9cd56e788" CreationDate="2011-06-15T17:33:04.437" UserId="6588" Comment="deleted 68 characters in body" Text="My first suggestion is to just not remove the bullet when it hits something and keep using hitTestObject like you do with other objects, but I'm wondering if there is a reason that approach wouldn't work.&#xD;&#xA;&#xD;&#xA;For example, how fast is this bullet moving? Is it firing out to the max range instantaneously?" />
  <row Id="30531" PostHistoryTypeId="5" PostId="11759" RevisionGUID="d0d9ea70-58cb-404c-99c8-dde9eccf6159" CreationDate="2011-06-15T17:34:04.530" UserId="6588" Comment="added 77 characters in body" Text="3ds Max is not used for programming games. It is frequently used in game development, but the relevance of 3ds Max to game development is that you can create 3D models using it and then export them to load in a game engine." />
  <row Id="30532" PostHistoryTypeId="5" PostId="13635" RevisionGUID="a8229c15-2224-4345-bbc2-bd0f7a13f37a" CreationDate="2011-06-15T17:34:46.323" UserId="6588" Comment="added 2 characters in body" Text="You can't really make the game overall appear faster than it is, but you can make slow parts look faster (or at any rate less noticeable) by de-coupling them from everything else so that everything else can run faster. Indeed, this is precisely why network commands are done asynchronously.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Similar things can be done locally, whenever one part of the game is slower than other parts. For example, physics updates are often run asynchronously from the rendering loop. Perhaps character animations are updated on a separate thread from background graphics, etc." />
  <row Id="30533" PostHistoryTypeId="5" PostId="11061" RevisionGUID="8d74c5b3-c4c5-47f9-9532-39979639afd7" CreationDate="2011-06-15T17:35:31.597" UserId="6588" Comment="added 2 characters in body" Text="The limit on iPhone apps for transmitting over 3G is 20MB (although that'll take a long time to download, so you definitely want to be much smaller than that.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I don't know what the overall app size limit is (ie. how big can an app be to download over a wired connection?) because I behave as if the wireless limit is the upper limit." />
  <row Id="30534" PostHistoryTypeId="5" PostId="10864" RevisionGUID="5107b0e2-2c3f-4297-887a-ca4c3d366c72" CreationDate="2011-06-15T17:35:58.913" UserId="6588" Comment="added 2 characters in body" Text="**Economics**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Principles learned in economics are very useful in many parts of game development. I'm not only talking about money either; economic principles apply to decisions players make about about everything from whether or not to pick up the health pack to choosing which path to take, and thus knowing economic principles can help make your game designs much stronger." />
  <row Id="30535" PostHistoryTypeId="25" PostId="13713" RevisionGUID="83114b1d-05fc-4cc9-b1e9-7e4874d4334f" CreationDate="2011-06-15T18:24:14.473" Comment="http://twitter.com/#!/StackGameDev/status/81064485695135745" />
  <row Id="30536" PostHistoryTypeId="2" PostId="13715" RevisionGUID="7ae3f186-7968-4b6c-9062-f020ebbdc34c" CreationDate="2011-06-15T18:50:34.533" UserId="6188" Text="Component-based entity systems are all the rage these days; everyone seems to agree they are the way to go, but no one really has a definitive implementation of such a system. I was wondering, what role do entity states (walking-left, standing, jumping, etc) have in a CBS? Do they act like controllers (i.e. they handle events and change the entity's attributes based on those events)?&#xD;&#xA;&#xD;&#xA;What about cases where a state would, for example, require that the entity enters no-clip mode? Should, that state, when it enters, maybe set the CollisionComponent of the entity to a null pointer or something? (Then, on exit, the state should restore the entity's CollisionComponent to its previous state.)&#xD;&#xA;&#xD;&#xA;Also, I guess it's the current state's job to change the entity's state to something else, right?" />
  <row Id="30537" PostHistoryTypeId="1" PostId="13715" RevisionGUID="7ae3f186-7968-4b6c-9062-f020ebbdc34c" CreationDate="2011-06-15T18:50:34.533" UserId="6188" Text="Role of an entity state in a CBS?" />
  <row Id="30538" PostHistoryTypeId="3" PostId="13715" RevisionGUID="7ae3f186-7968-4b6c-9062-f020ebbdc34c" CreationDate="2011-06-15T18:50:34.533" UserId="6188" Text="&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="30539" PostHistoryTypeId="4" PostId="13715" RevisionGUID="ff2e2e29-5b5b-43b7-bbd9-f8ce12ed8dc9" CreationDate="2011-06-15T18:58:50.210" UserId="1156" Comment="edited tags; edited title" Text="Role of an entity state in a component based system?" />
  <row Id="30540" PostHistoryTypeId="6" PostId="13715" RevisionGUID="ff2e2e29-5b5b-43b7-bbd9-f8ce12ed8dc9" CreationDate="2011-06-15T18:58:50.210" UserId="1156" Comment="edited tags; edited title" Text="&lt;architecture&gt;&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="30541" PostHistoryTypeId="2" PostId="13716" RevisionGUID="3ec567a9-76fc-4919-be6a-3f1a62f1902d" CreationDate="2011-06-15T19:09:12.127" UserId="962" Text="Android&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;The maximum size for the market is 50 MB, and can be downloaded over-the-air. Third party stores can have whatever size files they want. The 50 MB limit is only on the .apk file size, it is possible to load content or other data after the app loads, only limited by the storage on the users device.&#xD;&#xA;&#xD;&#xA;iOS&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The maximum size for over-the-air is 20 MB.  The maximum size for an app is 2 GB&#xD;&#xA;&#xD;&#xA;Windows Phone 7&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;The maximum size for over-the-air is 20 MB. The maximum file size is 225 MB&#xD;&#xA;" />
  <row Id="30542" PostHistoryTypeId="2" PostId="13717" RevisionGUID="42312677-5df2-44c3-a84a-e96b83bb0684" CreationDate="2011-06-15T19:22:16.370" UserId="370" Text="I was under the impression that in a components based design the entities are essentially components containers (with possibly some message thrown in).  Viewed from this perspective the each components would store a little of the state.  For instance if the ghost-behavior-components decides it needs to enter the intangible mode it also sends a message to the physics component telling it to enable no-clip.  It would probably also send a message to the ghost-model-components telling to kick up the alpha." />
  <row Id="30543" PostHistoryTypeId="2" PostId="13718" RevisionGUID="21bc5799-b9ec-4a48-b08b-8dc3da90640d" CreationDate="2011-06-15T20:23:00.873" UserId="962" Text="The best way to make your game run the same speed on all systems is to use a Fixed Timestep.&#xD;&#xA;&#xD;&#xA;With a fixed timestep, the game will always update at the same rate, no matter what the render rate is, and when using interpolation, it will look smooth even when the render rate is much higher than the update rate.&#xD;&#xA;&#xD;&#xA;Here is an answer with resources on how to implement a fixed timestep.   &#xD;&#xA;http://gamedev.stackexchange.com/questions/12347/semi-fixed-or-fully-fixed-timestep/12368#12368&#xD;&#xA;&#xD;&#xA;Here is an answer that explains how to implement interpolation for movement and transformations.  &#xD;&#xA;http://gamedev.stackexchange.com/questions/12754/how-to-interpolate-between-two-game-states&#xD;&#xA;" />
  <row Id="30544" PostHistoryTypeId="25" PostId="13715" RevisionGUID="570b9f1e-4513-4648-a7b2-d9e6f0681c5c" CreationDate="2011-06-15T21:24:15.063" Comment="http://twitter.com/#!/StackGameDev/status/81109786292264960" />
  <row Id="30545" PostHistoryTypeId="2" PostId="13719" RevisionGUID="3c10af9f-4273-4ad2-b4bb-7a448926e002" CreationDate="2011-06-15T21:33:02.563" UserId="6091" Text="Check this out&#xD;&#xA;http://www.scriptspot.com/3ds-max/plugins/max-net" />
  <row Id="30546" PostHistoryTypeId="5" PostId="13716" RevisionGUID="a6dc33e4-6081-4176-9caf-601ad33d3412" CreationDate="2011-06-15T21:51:21.633" UserId="744" Comment="iOS isn't OTA/local, it's cell/wifi+local." Text="Android&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;The maximum size for the market is 50 MB, and can be downloaded over-the-air. Third party stores can have whatever size files they want. The 50 MB limit is only on the .apk file size, it is possible to load content or other data after the app loads, only limited by the storage on the users device.&#xD;&#xA;&#xD;&#xA;iOS&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The maximum size for distribution over cell networks is 20 MB.  The maximum size for an app over WiFi or iTunes is 2 GB.  It is possible to load content or other data after the app loads, only limited by the storage on the users device.&#xD;&#xA;&#xD;&#xA;Windows Phone 7&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;The maximum size for over-the-air is 20 MB. The maximum file size is 225 MB&#xD;&#xA;" />
  <row Id="30552" PostHistoryTypeId="2" PostId="13722" RevisionGUID="4c200da1-e5c4-41c9-90dc-9b7749766214" CreationDate="2011-06-15T23:07:29.990" UserId="7249" Text="State machines and components are orthogonal techniques. You can have states in your components or not, just as you can have states in any class. You can have a component observe (see Observer Pattern) and change another component's state. State machines have many uses and the implementation will depend on your needs.&#xD;&#xA;&#xD;&#xA;For character the character states you described (walking, standing, jumping), I have seen implementations where the various components all maintain their own state machines... physics, animation, controls, ai. The components should have a clear authority about which other components they react to, and which component states they can change.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30554" PostHistoryTypeId="5" PostId="12529" RevisionGUID="d6b4bf4c-13d3-41f3-833a-bbfa5dab8b4d" CreationDate="2011-06-16T00:20:43.580" UserId="370" Comment="fixed insomniac link" Text="I've been interested in the component based entity system for a while, and read countless articles on it (The [Insomiac games][1], the pretty standard [Evolve Your Hierarchy][2], the [T-Machine][3], [Chronoclast][4]..just to name a few).&#xD;&#xA;&#xD;&#xA;They all seem to have a structure on the outside of something like:&#xD;&#xA;&#xD;&#xA;    Entity e = Entity.Create();&#xD;&#xA;    e.AddComponent(RenderComponent, ...);&#xD;&#xA;    //do lots of stuff&#xD;&#xA;    e.GetComponent&lt;PositionComponent&gt;(...).SetPos(4,5,6);&#xD;&#xA;&#xD;&#xA;And if you bring in the idea of shared data (this is the best design I've seen so far, in terms of not duplicating data everywhere)&#xD;&#xA;&#xD;&#xA;    e.GetProperty&lt;string&gt;(&quot;Name&quot;).Value = &quot;blah&quot;;&#xD;&#xA;&#xD;&#xA;Yes, this is very efficient. However, it isn't exactly the easiest to read or write; it feels very clunky and working-against-you.&#xD;&#xA;&#xD;&#xA;I personally would like to do something like:&#xD;&#xA;&#xD;&#xA;    e.SetPosition(4,5,6);&#xD;&#xA;    e.Name = &quot;Blah&quot;;&#xD;&#xA;&#xD;&#xA;Though of course the only way to get to that kind of design is back in the Entity-&gt;NPC-&gt;Enemy-&gt;FlyingEnemy-&gt;FlyingEnemyWithAHatOn kind of hierarchy this design tries to avoid.&#xD;&#xA;&#xD;&#xA;Has anyone seen a design for this kind of component system which is still flexible, yet maintains a level of user friendliness? And for that matter, manages to get around the (probably the hardest problem) data storage in a good way?&#xD;&#xA;&#xD;&#xA;***tl;dr What designs are there for a component system that are user friendly but still flexible?***&#xD;&#xA;&#xD;&#xA;  [1]: http://www.insomniacgames.com/a-dynamic-component-architecture-for-high-performance-gameplay/&#xD;&#xA;  [2]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;  [3]: http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/&#xD;&#xA;  [4]: http://blog.chronoclast.com/search/label/Entity%20Systems" />
  <row Id="30555" PostHistoryTypeId="25" PostId="13711" RevisionGUID="b22911b1-b078-4a3e-bb9f-703a68d4202c" CreationDate="2011-06-16T00:24:15.327" Comment="http://twitter.com/#!/StackGameDev/status/81155085438173184" />
  <row Id="30556" PostHistoryTypeId="2" PostId="13723" RevisionGUID="7286ca80-4b2c-4aa9-8799-120c5d702d23" CreationDate="2011-06-16T01:36:50.993" UserId="2111" Text="Alright, formulated this way I'm sure it sounds obscure, but I'll do my best to describe my problem.&#xD;&#xA;&#xD;&#xA;First, let me explain what's wrong with my real source code.&#xD;&#xA;&#xD;&#xA;I'm making a platformer, and here are the current components of my game: a *Level*, which is holding its own grid of tiles and also the tile sheets and a *Tile*, which just keeps the name of its tile sheet and index within the tile sheet. **All these are within a separate XNA game project, named GameLib.**&#xD;&#xA;&#xD;&#xA;Here is how my levels are formatted in a text file:&#xD;&#xA;&#xD;&#xA;`x x . . . . .`&#xD;&#xA;&#xD;&#xA;`. . . b g r .`&#xD;&#xA;&#xD;&#xA;`. . . . . . .`&#xD;&#xA;&#xD;&#xA;`X X X X X X X`&#xD;&#xA;&#xD;&#xA;Where `.` represents an empty tile, `b` represents a blue platform, `X` represents a block with a random color, etc.&#xD;&#xA;&#xD;&#xA;Instead of doing all the work of loading a level within the *Level* class, I decided to take advantage of the content pipeline extension and create a LevelContentPipelineExtension.&#xD;&#xA;&#xD;&#xA;As soon as I started, I quickly realized that I didn't want to hard-code 20+ lines of the kind:&#xD;&#xA;&#xD;&#xA;    if (symbol == 'b')&#xD;&#xA;        return new Tile(/*...*/);&#xD;&#xA;&#xD;&#xA;So, in the hope of at least centralizing all the content creation into one class, I made a static class, called *LevelContentCreation*, which holds the information about which symbol creates what and all this kind of stuff. **It also holds a list of all the asset paths of the tile sheets, to load them later on. This class is within my GameLib game library project.**&#xD;&#xA;&#xD;&#xA;The problem is, I'm using this *LevelContentCreation* static class in both my Level class (to load the actual tile sheets) and my content pipeline extension (to know which symbol represents what tile)...&#xD;&#xA;&#xD;&#xA;And here's how my *LevelContentCreation* class looks like:&#xD;&#xA;&#xD;&#xA;    public static class LevelContentCreation&#xD;&#xA;    {&#xD;&#xA;        private static Dictionary&lt;char, TileCreationInfo&gt; AvailableTiles =&#xD;&#xA;            CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;        private static List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;        /* ... rest of the class */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, **since the *LevelContentCreation* class is part of the game library, the content pipeline extension tries to use it but the call to CreateAvailableTiles() never happens and I'm unable to load a Level object from the content pipeline.**&#xD;&#xA;&#xD;&#xA;I know this is because the content pipeline executes before the actual compilation or something like that, but **how can I fix the problem?** &#xD;&#xA;&#xD;&#xA;I can't really move the *LevelContentCreation* class to the pipeline extension, because then the *Level* class wouldn't be able to use it... I'm pretty lost and I don't know what to do... I know these are pretty bad design decisions, and I'd like it if somebody could point me in the right direction.&#xD;&#xA;&#xD;&#xA;Thank you for your precious time.&#xD;&#xA;&#xD;&#xA;*If anything is not clear enough or if I should provide more information/code, please leave a comment below.*" />
  <row Id="30557" PostHistoryTypeId="1" PostId="13723" RevisionGUID="7286ca80-4b2c-4aa9-8799-120c5d702d23" CreationDate="2011-06-16T01:36:50.993" UserId="2111" Text="XNA - Static classes from game libraries executing after content pipeline extensions, how to avoid the problem?" />
  <row Id="30558" PostHistoryTypeId="3" PostId="13723" RevisionGUID="7286ca80-4b2c-4aa9-8799-120c5d702d23" CreationDate="2011-06-16T01:36:50.993" UserId="2111" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="30560" PostHistoryTypeId="5" PostId="13723" RevisionGUID="516ba90a-1bec-475f-accd-e60a05d74001" CreationDate="2011-06-16T02:35:37.567" UserId="2111" Comment="added 593 characters in body; added 50 characters in body" Text="Alright, formulated this way I'm sure it sounds obscure, but I'll do my best to describe my problem.&#xD;&#xA;&#xD;&#xA;First, let me explain what's wrong with my real source code.&#xD;&#xA;&#xD;&#xA;I'm making a platformer, and here are the current components of my game: a *Level*, which is holding its own grid of tiles and also the tile sheets and a *Tile*, which just keeps the name of its tile sheet and index within the tile sheet. **All these are within a separate XNA game project, named GameLib.**&#xD;&#xA;&#xD;&#xA;Here is how my levels are formatted in a text file:&#xD;&#xA;&#xD;&#xA;`x x . . . . .`&#xD;&#xA;&#xD;&#xA;`. . . b g r .`&#xD;&#xA;&#xD;&#xA;`. . . . . . .`&#xD;&#xA;&#xD;&#xA;`X X X X X X X`&#xD;&#xA;&#xD;&#xA;Where `.` represents an empty tile, `b` represents a blue platform, `X` represents a block with a random color, etc.&#xD;&#xA;&#xD;&#xA;Instead of doing all the work of loading a level within the *Level* class, I decided to take advantage of the content pipeline extension and create a LevelContentPipelineExtension.&#xD;&#xA;&#xD;&#xA;As soon as I started, I quickly realized that I didn't want to hard-code 20+ lines of the kind:&#xD;&#xA;&#xD;&#xA;    if (symbol == 'b')&#xD;&#xA;        return new Tile(/*...*/);&#xD;&#xA;&#xD;&#xA;So, in the hope of at least centralizing all the content creation into one class, I made a static class, called *LevelContentCreation*, which holds the information about which symbol creates what and all this kind of stuff. **It also holds a list of all the asset paths of the tile sheets, to load them later on. This class is within my GameLib game library project.**&#xD;&#xA;&#xD;&#xA;The problem is, I'm using this *LevelContentCreation* static class in both my Level class (to load the actual tile sheets) and my content pipeline extension (to know which symbol represents what tile)...&#xD;&#xA;&#xD;&#xA;And here's how my *LevelContentCreation* class looks like:&#xD;&#xA;&#xD;&#xA;    public static class LevelContentCreation&#xD;&#xA;    {&#xD;&#xA;        private static Dictionary&lt;char, TileCreationInfo&gt; AvailableTiles =&#xD;&#xA;            CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;        private static List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;        /* ... rest of the class */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, **since the *LevelContentCreation* class is part of the game library, the content pipeline extension tries to use it but the call to CreateAvailableTiles() never happens and I'm unable to load a Level object from the content pipeline.**&#xD;&#xA;&#xD;&#xA;I know this is because the content pipeline executes before the actual compilation or something like that, but **how can I fix the problem?** &#xD;&#xA;&#xD;&#xA;I can't really move the *LevelContentCreation* class to the pipeline extension, because then the *Level* class wouldn't be able to use it... I'm pretty lost and I don't know what to do... I know these are pretty bad design decisions, and I'd like it if somebody could point me in the right direction.&#xD;&#xA;&#xD;&#xA;Thank you for your precious time.&#xD;&#xA;&#xD;&#xA;*If anything is not clear enough or if I should provide more information/code, please leave a comment below.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;A little more information about my projects:&#xD;&#xA;&#xD;&#xA; - **Game** - XNA Windows game project. Contains references to: Engine, GameLib and GameContent&#xD;&#xA; - **GameLib** - XNA game library project. Contains references to: Engine&#xD;&#xA; - **GameContent** - XNA content project. Contains references to: LevelContentPipelineExtension&#xD;&#xA; - **Engine** - XNA game library project. No references.&#xD;&#xA; - **LevelContentPipelineExtension** - XNA content pipeline extension. Contains references to: Engine and GameLib&#xD;&#xA;&#xD;&#xA;I know close to nothing about XNA 4.0 and I'm a little bit lost about how content works now. If you need more information, tell me." />
  <row Id="30561" PostHistoryTypeId="2" PostId="13725" RevisionGUID="41657a78-64f4-4233-a7a9-c5027a789f8e" CreationDate="2011-06-16T03:21:23.487" UserId="1248" Text="I worked on a personal game project (learning) for about the last year or so off and on in Ogre3D. Now that I am starting a new project, I want to avoid the Class Heirarchy for objects and having all of my libraries stuffed into one project file.&#xD;&#xA;&#xD;&#xA;After a massive amount of reading, I am going to start implementing a Object/Components system tomorrow, mostly based off of what I have read on http://gameprogrammingpatterns.com/component.html but I want to have a better understanding before I proceed.&#xD;&#xA;&#xD;&#xA;Ogre3D offers a Plugin system, which I understand to basically be the equivalent of a normal .dll library except it has install()/initialise()/uninstall()/etc methods, intended for registering factories.&#xD;&#xA;&#xD;&#xA;So my confusion comes down to what would be best kept in a Plugin or DLL?&#xD;&#xA;&#xD;&#xA;Most of what I read, people recommend putting wrappers for third party libraries into Plugins/DLLs so I am assuming I would want to have one for my Physics (Bullet) System, Audio (OpenAL) System, Input (OIS) System, and so on.&#xD;&#xA;&#xD;&#xA;In that case, should I basically just strip the Managers out of my project, and move them to a Plugin/DLL? I am still quite confused on how I will actually go about implementing them into Components once they are moved, but I guess that will come with time." />
  <row Id="30562" PostHistoryTypeId="1" PostId="13725" RevisionGUID="41657a78-64f4-4233-a7a9-c5027a789f8e" CreationDate="2011-06-16T03:21:23.487" UserId="1248" Text="Combination of DLL/Plugins with Object/Components" />
  <row Id="30563" PostHistoryTypeId="3" PostId="13725" RevisionGUID="41657a78-64f4-4233-a7a9-c5027a789f8e" CreationDate="2011-06-16T03:21:23.487" UserId="1248" Text="&lt;ogre&gt;&lt;libraries&gt;&lt;component-based&gt;&lt;project-management&gt;&lt;objects&gt;" />
  <row Id="30564" PostHistoryTypeId="25" PostId="13723" RevisionGUID="c52739e9-4708-4a2c-afa7-9fd868c9d292" CreationDate="2011-06-16T03:24:20.960" Comment="http://twitter.com/#!/StackGameDev/status/81200408088952832" />
  <row Id="30565" PostHistoryTypeId="2" PostId="13726" RevisionGUID="6cc26e43-d0d5-42b6-8e5c-a9bdf6854fca" CreationDate="2011-06-16T03:34:51.770" UserId="1248" Text="It completely depends on what it is you want to do. For Indie game development there are quite a few viable languages.&#xD;&#xA;&#xD;&#xA;Java stands out for Android development. Minecraft, also written in Java, is also a great example. Obviously Minecraft would have been a lot better had it been done in C++ (personal opinion) but Java is definitely something to be considered.&#xD;&#xA;&#xD;&#xA;C++ is the language to go for if you want to be a serious developer. Unfortunately the learning curve, atleast in my experience, is absolutely massive for a beginner. You have to work a lot harder to accomplish tasks than you would in a different language. The rewards certainly are apparent though.&#xD;&#xA;&#xD;&#xA;C# I have not used for Game Development, but it is also gaining standing in the Game Development realm, and should another viable alternative." />
  <row Id="30566" PostHistoryTypeId="2" PostId="13727" RevisionGUID="e60f0b62-b967-4f82-8d28-47886f89bb79" CreationDate="2011-06-16T04:45:18.217" UserId="7042" Text="I'd like to sum up some points expressed and add my own:&#xD;&#xA;&#xD;&#xA;1. Learning as many languages = better coding skills = better code&#xD;&#xA;2. I r |337sauce (as in, your Carmack's son or want to work with big name companies): C++, along with DirectX and OpenGL&#xD;&#xA;3. I just want to get a game out there right meow: I'd recommend python with pygame, lets you get your feet wet and still produce a pretty solid game.&#xD;&#xA;4. Andriod is the shiz: Java&#xD;&#xA;&#xD;&#xA;If you aren't afraid of tackling C++ (which can be somewhat daunting to a new programmer, especially compared to Python), then this would let you write desktop games (DirectX (win) or OpenGL (all)), and can also be used for iPhone programming (Obj-c is only needed to set up an application, C++ can do the rest)" />
  <row Id="30567" PostHistoryTypeId="2" PostId="13728" RevisionGUID="855a50e5-7dfc-45ae-9f1b-051875c4facc" CreationDate="2011-06-16T04:57:33.510" UserId="7173" Text="I'd implement a &quot;steering behaviour&quot; for the missle.&#xD;&#xA;The missile has: A velocity(a number), a position(a vector) and a (current)rotation.&#xD;&#xA;At each update in your game / at each frame, the missle's rotation is changed just a bit (towards the target). Then the missile is moved forward according to its current rotation and current velocity.&#xD;&#xA;&#xD;&#xA;Works for 2D and 3D obviously, since the only difference is an additional dimension.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another possibility would be to calculate the path of the missile before fiering it.&#xD;&#xA;Look up **bezier curves** or **spline**." />
  <row Id="30568" PostHistoryTypeId="2" PostId="13729" RevisionGUID="491ab4eb-c3e1-408f-a525-f1e6d893a907" CreationDate="2011-06-16T05:07:24.447" UserId="7173" Text="Have a look at this:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb447745.aspx&#xD;&#xA;&#xD;&#xA;For level layout i'd just put a function inside my Level class called &quot;LoadFromFile(string name)&quot;.&#xD;&#xA;Because if you want to add support for custom maps in your game later, you will have to save and load the levels from your own file format anyway.&#xD;&#xA;&#xD;&#xA;You could also still create a content importer, to load from the included assets and also from user provided files.&#xD;&#xA;Look at this page for more information about how to create an importer&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb447743.aspx" />
  <row Id="30569" PostHistoryTypeId="2" PostId="13730" RevisionGUID="aaaeab2b-94fe-40c2-a2a8-976ee5e6f40d" CreationDate="2011-06-16T05:20:17.017" UserId="1430" Text="&gt; Ogre3D offers a Plugin system, which I&#xD;&#xA;&gt; understand to basically be the&#xD;&#xA;&gt; equivalent of a normal .dll library&#xD;&#xA;&gt; except it has&#xD;&#xA;&gt; install()/initialise()/uninstall()/etc&#xD;&#xA;&gt; methods, intended for registering&#xD;&#xA;&gt; factories.&#xD;&#xA;&gt; &#xD;&#xA;&gt; So my confusion comes down to what&#xD;&#xA;&gt; would be best kept in a Plugin or DLL?&#xD;&#xA;&#xD;&#xA;Plugins are generally used to extend or build upon the behavior of some existing service or library -- in this case, Ogre. If you aren't intending to directly extend or modify the behavior of Ogre, you don't need to be writing Ogre plugins.&#xD;&#xA;&#xD;&#xA;Plugins (and DLLs) are an entirely orthogonal concept to that of component-based game object systems. Generally if you don't know what parts of your game should be in a plugin or DLL, you don't need to put anything in a plugin or DLL -- you'll just create extra work for yourself, to no real advantage.&#xD;&#xA;&#xD;&#xA;&gt; Most of what I read, people recommend&#xD;&#xA;&gt; putting wrappers for third party&#xD;&#xA;&gt; libraries into Plugins/DLLs so I am&#xD;&#xA;&gt; assuming I would want to have one for&#xD;&#xA;&gt; my Physics (Bullet) System, Audio&#xD;&#xA;&gt; (OpenAL) System, Input (OIS) System,&#xD;&#xA;&gt; and so on.&#xD;&#xA;&#xD;&#xA;Some people certainly do organize different subsytems, such as physics and rendering, into distinct DLLs. There's no reason you have to do this, though, and as above it just creates extra complexity. You don't have a reason to be doing so at this point in your project, it sounds like, so I wouldn't worry about it. Generally you want to factor subsystems out into DLLs when you expect them to be versioned independant, shared by multiple projects, or swapped out for alternative implementations. All of those are the domain of very moderately complex projects.&#xD;&#xA;&#xD;&#xA;&gt; In that case, should I basically just&#xD;&#xA;&gt; strip the Managers out of my project,&#xD;&#xA;&gt; and move them to a Plugin/DLL? I am&#xD;&#xA;&gt; still quite confused on how I will&#xD;&#xA;&gt; actually go about implementing them&#xD;&#xA;&gt; into Components once they are moved,&#xD;&#xA;&gt; but I guess that will come with time.&#xD;&#xA;&#xD;&#xA;Just because &quot;other people&quot; do it doesn't mean it's a good idea. If you don't have a reason to factor things out into DLLs, don't. &#xD;&#xA;&#xD;&#xA;As for components, I don't think you've fully understand the concept if you are thinking your are going to turn your &quot;manager&quot; objects into &quot;component&quot; objects. Components -- in this context -- are generally very small, reusable packages of data and/or functionality that can be aggregated together (implicitly or explicitly) to form a logical &quot;game object.&quot; A component may serve as a connection point between a game object and an unrelated subsystem, such as the renderer, but the renderer itself is not a component and doesn't usually know about components.&#xD;&#xA;&#xD;&#xA;Be wary of falling into the trap of assuming that *everything* is a component or in some way is a direct participant in the component object system in such an approach -- that's not a good way to do it." />
  <row Id="30570" PostHistoryTypeId="2" PostId="13731" RevisionGUID="653468ac-d901-4fd6-b494-914120aecf03" CreationDate="2011-06-16T05:21:13.630" UserId="284" Text="**Disclaimer:** I know that client-side is always to be held with suspicion, but I'm trying to conceive of a way to verify the success or failure of javascript-based mini-games.&#xD;&#xA;&#xD;&#xA;Mini-games to add fun to client-side game&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Here is an example scenario:&#xD;&#xA;&#xD;&#xA;I implement a javascript-dependent picture-sliding game for various pictures.  &#xD;&#xA;You know the type:&#xD;&#xA;&#xD;&#xA;![http://3.bp.blogspot.com/_AAvC0ZSs-1k/SUv8waQg0zI/AAAAAAAABN0/tzf3pA9nDxA/s400/SlidingPuzzle-ForHelen.jpg][1]&#xD;&#xA;&#xD;&#xA;So that would be a javascript game that would be served from my website.&#xD;&#xA;&#xD;&#xA;How to check success&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;I then want to set up a verification scheme to verify that the game has been completed, the browser would ping the website with a verification code or scheme to say &quot;hey, I'm done, and the javascript mini-game is complete&quot;.&#xD;&#xA;&#xD;&#xA;There are two ways that I can think of to make the verification work.  &#xD;&#xA;&#xD;&#xA; 1. One is a &quot;replay&quot; scheme, e.g. each&#xD;&#xA;    of the moves that the user does&#xD;&#xA;    would be concatenated and sent to&#xD;&#xA;    the server, which would have a&#xD;&#xA;    system for verifying that the end&#xD;&#xA;    result was indeed a valid solved&#xD;&#xA;    state.&#xD;&#xA;    &#xD;&#xA; 2. The other is a &quot;summary&quot;&#xD;&#xA;    verification code, for example if&#xD;&#xA;    each of the numbers is assigned a&#xD;&#xA;    random letter, the sliding puzzle&#xD;&#xA;    would result in a word-code like&#xD;&#xA;    asdfaseasewadsfwef, which can be&#xD;&#xA;    sent to the server upon completion&#xD;&#xA;    to receive a pass/fail grade of&#xD;&#xA;    success.  Obviously that isn't&#xD;&#xA;    checking the intermediary steps,&#xD;&#xA;    just the final result, but it'd&#xD;&#xA;    probably be a lot faster and less&#xD;&#xA;    resource-intensive, and would filter&#xD;&#xA;    out perhaps 99% of people from&#xD;&#xA;    abusing such a mini-game.&#xD;&#xA;&#xD;&#xA;I don't have a huge, high bar for 100% secure communication in this case because I just want to add fun, and give some minor/non-overwhelming benefits from the mini-games, not build a fort-knox system.  And if someone is smart enough to hack up a solution to the mini-games to automate them, I won't be excessively broken up about it.&#xD;&#xA;&#xD;&#xA;Techniques?&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;So with that in mind, are these two approaches valid?  Are there other approaches to try with this?  Any examples in the wild that I could learn from?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/quY7N.jpg" />
  <row Id="30571" PostHistoryTypeId="1" PostId="13731" RevisionGUID="653468ac-d901-4fd6-b494-914120aecf03" CreationDate="2011-06-16T05:21:13.630" UserId="284" Text="Success checks for client-side javascript mini-game embedded within a server-side browser game." />
  <row Id="30572" PostHistoryTypeId="3" PostId="13731" RevisionGUID="653468ac-d901-4fd6-b494-914120aecf03" CreationDate="2011-06-16T05:21:13.630" UserId="284" Text="&lt;browser-based-games&gt;&lt;security&gt;&lt;mini-games&gt;" />
  <row Id="30573" PostHistoryTypeId="2" PostId="13732" RevisionGUID="2e196c40-9cfb-4eb7-8dff-8e5547ce0b50" CreationDate="2011-06-16T05:29:46.460" UserId="962" Text="Recording all the player moves and sending them to the server, is a good choice. &#xD;&#xA;&#xD;&#xA;If you wanted more cheat protection, you could even have a key that is generated each move, using a seeded random number generator, using the the time in milliseconds for each key. Verify the moves and verify that the moves were created validly.&#xD;&#xA;&#xD;&#xA;This will prevent people from packet sniffing and trying to spoof the moves with a solver program." />
  <row Id="30574" PostHistoryTypeId="2" PostId="13733" RevisionGUID="2fe82a6d-0063-4683-8caa-5aa828c67998" CreationDate="2011-06-16T05:54:12.243" UserId="8067" Text="I have been reading about BDD - Behavior Driven Development for a while, and I find it really easy and usefull to convert features into code. BDD users often call it TDD done right.&#xD;&#xA;&#xD;&#xA;BDD is a tool for software design, from outside to inside, from the bussiness value (or gameplay value) to code.&#xD;&#xA;&#xD;&#xA;[Dan North introducing BDD][1]&#xD;&#xA;&#xD;&#xA;Do you know any resources about BDD and Games other than [this][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dannorth.net/introducing-bdd/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/7727/is-test-driven-development-viable-in-game-development/7739#7739" />
  <row Id="30575" PostHistoryTypeId="1" PostId="13733" RevisionGUID="2fe82a6d-0063-4683-8caa-5aa828c67998" CreationDate="2011-06-16T05:54:12.243" UserId="8067" Text="Is BDD (Behavior Driven Development) used in games?" />
  <row Id="30576" PostHistoryTypeId="3" PostId="13733" RevisionGUID="2fe82a6d-0063-4683-8caa-5aa828c67998" CreationDate="2011-06-16T05:54:12.243" UserId="8067" Text="&lt;behavior&gt;&lt;tdd&gt;" />
  <row Id="30577" PostHistoryTypeId="6" PostId="13733" RevisionGUID="38dcd677-1847-422f-b9c8-a5cc5830c040" CreationDate="2011-06-16T05:59:34.737" UserId="8067" Comment="edited tags" Text="&lt;testing&gt;&lt;methodology&gt;&lt;behavior&gt;&lt;tdd&gt;" />
  <row Id="30578" PostHistoryTypeId="2" PostId="13734" RevisionGUID="8c4d60cd-1fbc-4642-a507-da41b0ed4581" CreationDate="2011-06-16T06:00:56.153" UserId="2111" Text="I actually found a way to fix the problem: I removed the static class and made it a normal class. This way I'm sure the right statements get executed at the right time.&#xD;&#xA;&#xD;&#xA;I wished I had not wasted your time like so but I actually got the idea of doing so by reading the comments/answers.&#xD;&#xA;&#xD;&#xA;Thank you anyway." />
  <row Id="30579" PostHistoryTypeId="25" PostId="13664" RevisionGUID="9ddc7318-1b3e-46ce-9acf-3b32f7ebcbad" CreationDate="2011-06-16T06:24:17.497" Comment="http://twitter.com/#!/StackGameDev/status/81245691745280000" />
  <row Id="30580" PostHistoryTypeId="2" PostId="13735" RevisionGUID="2a529cbb-8b37-47e4-9f63-60f65dd37061" CreationDate="2011-06-16T07:25:10.857" UserId="37" Text="I'm creating a six player HTML 5 game designed to be played locally ([Red Ice][1]). &#xD;&#xA;&#xD;&#xA;I've previous set up handling 7 Wiimotes using something along the lines of Joy2Key to map each input for each player to a separate keyboard key, but Wiimotes are pretty hard on the hands for these types of games and not very ergonomic so I thought I'd try and get Xbox controller support.&#xD;&#xA;&#xD;&#xA;I don't believe that any simple key mapping solution will work due to the nature of the directional stick.&#xD;&#xA;&#xD;&#xA;My inclination is that this will require a browser plugin and if so I'd prefer to write the plugin for Google Chrome. &#xD;&#xA;&#xD;&#xA;How do I create a Chrome browser plugin to handle multiple Xbox controllers or is there some other way?&#xD;&#xA;&#xD;&#xA;Please do not answer this question saying it can't be done, because it absolutely can.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pixieengine.com/projects/166/fullscreen" />
  <row Id="30581" PostHistoryTypeId="1" PostId="13735" RevisionGUID="2a529cbb-8b37-47e4-9f63-60f65dd37061" CreationDate="2011-06-16T07:25:10.857" UserId="37" Text="How can I get six Xbox controllers to provide input to an HTML5 game?" />
  <row Id="30582" PostHistoryTypeId="3" PostId="13735" RevisionGUID="2a529cbb-8b37-47e4-9f63-60f65dd37061" CreationDate="2011-06-16T07:25:10.857" UserId="37" Text="&lt;html5&gt;&lt;input&gt;&lt;xbox-controller&gt;" />
  <row Id="30583" PostHistoryTypeId="2" PostId="13736" RevisionGUID="d0232b50-c230-4758-aa88-5bc1d5fb6395" CreationDate="2011-06-16T09:02:05.413" UserId="7168" Text="I would like to any tips/articles/tutorials on how to write collision detection using OpenGL and C++ in 3D mainly just simple box collisions etc but also if there are any advanced resources that would be great to. i also don't wont to use any external library`s if possible.&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;" />
  <row Id="30584" PostHistoryTypeId="1" PostId="13736" RevisionGUID="d0232b50-c230-4758-aa88-5bc1d5fb6395" CreationDate="2011-06-16T09:02:05.413" UserId="7168" Text="Tips for writing 3D Collision detection with opengl" />
  <row Id="30585" PostHistoryTypeId="3" PostId="13736" RevisionGUID="d0232b50-c230-4758-aa88-5bc1d5fb6395" CreationDate="2011-06-16T09:02:05.413" UserId="7168" Text="&lt;opengl&gt;&lt;c++&gt;&lt;collision-detection&gt;" />
  <row Id="30586" PostHistoryTypeId="2" PostId="13737" RevisionGUID="7dce88c0-4e58-4b65-bd41-c4336b40c401" CreationDate="2011-06-16T09:24:00.943" UserId="7588" Text="There will be huge amounts of resources out there, I dont know how much you know about current collision techniques, but a good idea if you're not familar with them could be to download Unity3D and play around with the buit-in physics engine (PhysX).&#xD;&#xA;&#xD;&#xA;Box collisions are generally done using AABB's (Axis-Aligned Bounding Boxes), Sphere collisions are faster but obviously can't give you as good a representation for a box for example. Capsule colliders are elongated spheres and are very useful for characters and such.&#xD;&#xA;&#xD;&#xA;You should also look for details on Terrain/BSP collision detection depending on what your needs are.&#xD;&#xA;&#xD;&#xA;Here are a few things I googled (but may not be pertinent)...&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php&#xD;&#xA;&#xD;&#xA;[Bounding Sphere Collision](http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/simple-bounding-sphere-collision-detection-r1234)&#xD;&#xA;&#xD;&#xA;http://www.essentialmath.com/CollisionDetection.pps" />
  <row Id="30587" PostHistoryTypeId="25" PostId="13735" RevisionGUID="db8c269d-2706-41d2-b0cf-4d975b5cbe95" CreationDate="2011-06-16T09:24:18.430" Comment="http://twitter.com/#!/StackGameDev/status/81290993885913089" />
  <row Id="30589" PostHistoryTypeId="5" PostId="13737" RevisionGUID="f5c3ae33-63c0-478a-b340-d9009f9a9b00" CreationDate="2011-06-16T09:36:02.957" UserId="7588" Comment="added 118 characters in body" Text="There will be huge amounts of resources out there, I dont know how much you know about current collision techniques, but a good idea if you're not familar with them could be to download Unity3D and play around with the buit-in physics engine (PhysX).&#xD;&#xA;&#xD;&#xA;Box collisions are generally done using AABB's (Axis-Aligned Bounding Boxes), Sphere collisions are faster but obviously can't give you as good a representation for a box for example. Capsule colliders are elongated spheres and are very useful for characters and such.&#xD;&#xA;&#xD;&#xA;You should also look for details on Terrain/BSP collision detection depending on what your needs are.&#xD;&#xA;&#xD;&#xA;[Good simple tutorial for AABB's](http://wp.freya.no/3d-math-and-physics/simple-aabb-vs-aabb-collision-detection/)&#xD;&#xA;&#xD;&#xA;Here are a few things I googled (but may not be pertinent)...&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php&#xD;&#xA;&#xD;&#xA;[Bounding Sphere Collision](http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/simple-bounding-sphere-collision-detection-r1234)&#xD;&#xA;&#xD;&#xA;http://www.essentialmath.com/CollisionDetection.pps" />
  <row Id="30590" PostHistoryTypeId="2" PostId="13739" RevisionGUID="cd87a937-27ad-4a02-a4c5-49b4a8567849" CreationDate="2011-06-16T09:36:41.643" UserId="6786" Text="I downloaded a 3d model of a car. By judging by the skins and images available model treats wheels and car body as separate nodes. I want to access its child nodes to specify animation.&#xD;&#xA;&#xD;&#xA;But I don't know the names of its child nodes. Is it possible to figure out names of its child nodes by looking at the file content. I have a obj file of the 3D model. &#xD;&#xA;I am using JMonkey 2.&#xD;&#xA;&#xD;&#xA;Thank you in advance" />
  <row Id="30591" PostHistoryTypeId="1" PostId="13739" RevisionGUID="cd87a937-27ad-4a02-a4c5-49b4a8567849" CreationDate="2011-06-16T09:36:41.643" UserId="6786" Text="Understanding .obj file" />
  <row Id="30592" PostHistoryTypeId="3" PostId="13739" RevisionGUID="cd87a937-27ad-4a02-a4c5-49b4a8567849" CreationDate="2011-06-16T09:36:41.643" UserId="6786" Text="&lt;3d-meshes&gt;&lt;file&gt;&lt;jmonkeyengine&gt;" />
  <row Id="30593" PostHistoryTypeId="5" PostId="13739" RevisionGUID="88c98eba-9c10-448c-9221-fcbe2b32ae55" CreationDate="2011-06-16T09:53:46.083" UserId="6786" Comment="improved meaning" Text="I downloaded a 3d model of a car. By judging by the skins and images available model treats wheels and car body as separate nodes. I want to access its child nodes (wheels) to specify animation.&#xD;&#xA;&#xD;&#xA;But I don't know the names of its child nodes. Is it possible to figure out names of its child nodes by looking at the file content. I have a obj file of the 3D model. &#xD;&#xA;I am using JMonkey 2.&#xD;&#xA;&#xD;&#xA;Thank you in advance" />
  <row Id="30594" PostHistoryTypeId="2" PostId="13740" RevisionGUID="78f3186b-47fb-4526-9e35-5b9be6dc32cd" CreationDate="2011-06-16T10:08:21.810" UserId="8050" Text="I assume you want to change the direction by changing the launching heading to the target heading then continue straight to the target (a more fun problem should be to hit the target when turning!).&#xD;&#xA;I have to assume that you are able to turn with the same turn radius in all direction (this is a simplification that is hard to se in real missiles).&#xD;&#xA;&#xD;&#xA;The simplest solution is to use the 90&amp;deg; bending: the missile files until its trajectory forms a right angle with the target. if you turn exactly to the 90&amp;deg; point you will miss the target exactly by the turn radius because you have to take into account the turning itself. The solution is to start to turn exactly &quot;turn radius&quot; meters(?) before reaching the 90&amp;deg; point then turn forming a (try to guess) 90&amp;deg; arc then go straight to your target.&#xD;&#xA;&#xD;&#xA;This solution is not always feasible, for example when you dont have the visibility on the 90&amp;deg; path (buildings or other obstacles).&#xD;&#xA;&#xD;&#xA;The good news is that the solution works for every angle (not just the mythical 90&amp;deg;) the trick is to take in account the space needed to turn starting turning before.&#xD;&#xA;&#xD;&#xA;How much before? This is why the 90&amp;deg; stuff is the simplest solution... &#xD;&#xA;&#xD;&#xA;Lets say that you reach the visibility or the best target heading when the firing path forms an angle of &amp;theta;&amp;deg; then you should anticipating the turn by:&#xD;&#xA;&#xD;&#xA;**(sec(90&amp;deg; - &amp;theta;&amp;deg;) + tan(90&amp;deg; - &amp;theta;&amp;deg;)) * turning_radius,**&#xD;&#xA;&#xD;&#xA; where  secant is the reciprocal of the cosine. The proof is trivial and is left to the reader.&#xD;&#xA;&#xD;&#xA;Seriously, the formula comes from a simple geometrical construction.&#xD;&#xA;&#xD;&#xA;see the image http://i.stack.imgur.com/OHe8Y.png (not enough mana to post images)&#xD;&#xA;&#xD;&#xA;Black line is the firing path, while the thin black line is the same path moved toward the target by turning_radius units; the same for the red ones that are the target path.&#xD;&#xA;&#xD;&#xA;The green segments are turning_radius in lenght so you should see that:&#xD;&#xA;&#xD;&#xA;AB is the tangent of 90&amp;deg; - &amp;theta;&amp;deg; &#xD;&#xA;&#xD;&#xA;BC is the secant. &#xD;&#xA;&#xD;&#xA;Both the green lines that come from the turning point are turning_radius in lenght and are perpendicular to the two path meaning that the turning radius is correct and the arc is tangent to both the path (as should be if you make a turn under phisical constraints).&#xD;&#xA;&#xD;&#xA;Let me know if you see some error.&#xD;&#xA;" />
  <row Id="30595" PostHistoryTypeId="2" PostId="13741" RevisionGUID="8dd9e5e3-1203-41fa-a89c-7573100d5ef9" CreationDate="2011-06-16T10:38:29.943" UserId="8042" Text="For point (B) you can give a try with the game called &quot;achievement unlocked&quot; &lt;br&gt;&#xD;&#xA;http://www.freewebarcade.com/game/achievement-unlocked/&lt;br&gt;&lt;br&gt;&#xD;&#xA;This game was supposed to be a joke about people just chasing achievements in games &#xD;&#xA;&lt;br&gt;it rewards you about quite everything (like just starting the game ^^)&#xD;&#xA;&lt;br&gt;But in fact it appears to be an addictive and rewarding memory and skill game&#xD;&#xA;&lt;br&gt;the achievement concept can't be more isolated than in this game !&#xD;&#xA;&#xD;&#xA;Let me think about other points ...&#xD;&#xA;&#xD;&#xA;Point (A) maybe you should try to steal the core mechanic of Pikmin series &lt;br&gt;&#xD;&#xA;http://en.wikipedia.org/wiki/Pikmin&#xD;&#xA;&lt;br&gt;&quot;meeting other characters through simple means&quot; and do things you should'nt be able to do alone.. this is all the game is about&#xD;&#xA;&#xD;&#xA;Point (C)&lt;br&gt;&#xD;&#xA;I guess pikmin could also work here&lt;br&gt;&#xD;&#xA;i'm also thinking about &#xD;&#xA;&#xD;&#xA; - Spore ( http://en.wikipedia.org/wiki/Spore_game ) (only from creature stage)&#xD;&#xA; - Creatures series ( http://en.wikipedia.org/wiki/Creatures_(artificial_life_program) )&#xD;&#xA; - other games quoted in that wikipedia article like simlife, simearth ...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30596" PostHistoryTypeId="2" PostId="13742" RevisionGUID="745fa85b-fa1c-4ff8-83c5-3dc09a75ca7d" CreationDate="2011-06-16T11:04:55.263" UserId="8003" Text="According to [obj file specification][1] it should be string after 'g' command, but from my experiences each obj exporter handle those things specifically.&#xD;&#xA;&#xD;&#xA;It might help to add link to obj file in your first post.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.martinreddy.net/gfx/3d/OBJ.spec" />
  <row Id="30597" PostHistoryTypeId="6" PostId="13739" RevisionGUID="c82275ab-c6df-419d-bd86-f9aaf8dffc00" CreationDate="2011-06-16T11:10:52.563" UserId="1156" Comment="edited tags" Text="&lt;3d-meshes&gt;&lt;file-format&gt;&lt;file&gt;&lt;jmonkeyengine&gt;&lt;obj&gt;" />
  <row Id="30598" PostHistoryTypeId="2" PostId="13743" RevisionGUID="188b3c62-8f50-4f26-ad9b-dcbbb41454e4" CreationDate="2011-06-16T11:26:25.943" UserId="5019" Text="Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in school all those years ago) so, in order to get one step closer to being the best I need some advice. What maths should I learn for specific areas of game programming? &#xD;&#xA;If someone could outline some subjects and say one or two words about what areas of game programming they would be used in I’d greatly appreciate it. I’m working through the Khan academy programme at the moment, and I’m just getting into algebra now. &#xD;&#xA;" />
  <row Id="30599" PostHistoryTypeId="1" PostId="13743" RevisionGUID="188b3c62-8f50-4f26-ad9b-dcbbb41454e4" CreationDate="2011-06-16T11:26:25.943" UserId="5019" Text="What maths should I learn for game programming, and what aspect of programming does it relate to ?" />
  <row Id="30600" PostHistoryTypeId="3" PostId="13743" RevisionGUID="188b3c62-8f50-4f26-ad9b-dcbbb41454e4" CreationDate="2011-06-16T11:26:25.943" UserId="5019" Text="&lt;collision-detection&gt;&lt;math&gt;&lt;physics&gt;&lt;graphics-programming&gt;" />
  <row Id="30602" PostHistoryTypeId="2" PostId="13745" RevisionGUID="6f7dd91f-add8-42b0-9de7-ac9b3efa6e7a" CreationDate="2011-06-16T12:12:02.890" UserId="6867" Text="Learn the math as you need it. That's how I did, and it will &quot;save you time&quot;. The math needed depends a lot on the game you are making (whether or not it's 2D or 3D, whether or not it has advanced physics, etc etc)." />
  <row Id="30603" PostHistoryTypeId="2" PostId="13746" RevisionGUID="b8819224-2125-4547-bddf-049ab8af605d" CreationDate="2011-06-16T12:17:06.320" UserId="6867" Text="XNA seems to be ignoring my Z coordinate. There is no form of Z-culling at all it seems. How come? I am doing an orthographic projection, and clearing the depth stencil buffer for every draw-call.&#xD;&#xA;&#xD;&#xA;My elements rendered are quads with textures, through instancing. These elements have 1 difference in the Z-coordinate in order to eachother, based on theri Z-index." />
  <row Id="30604" PostHistoryTypeId="1" PostId="13746" RevisionGUID="b8819224-2125-4547-bddf-049ab8af605d" CreationDate="2011-06-16T12:17:06.320" UserId="6867" Text="XNA ignoring the Z-coordinate?" />
  <row Id="30605" PostHistoryTypeId="3" PostId="13746" RevisionGUID="b8819224-2125-4547-bddf-049ab8af605d" CreationDate="2011-06-16T12:17:06.320" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="30606" PostHistoryTypeId="25" PostId="13733" RevisionGUID="571c6ac4-3b20-4553-a9c4-87a9459b2817" CreationDate="2011-06-16T12:24:18.080" Comment="http://twitter.com/#!/StackGameDev/status/81336292218114049" />
  <row Id="30607" PostHistoryTypeId="2" PostId="13747" RevisionGUID="b06e6eb7-796e-40b6-9442-763440ea45c2" CreationDate="2011-06-16T12:37:12.400" UserId="288" Text="What have you set `GraphicsDevice.DepthStencilState` to? It should be `DepthStencilState.Default` to both read and write the depth buffer.&#xD;&#xA;&#xD;&#xA;Are the differences in the Z-coordinate within the available precision of the Z-buffer? Are you getting Z-fighting? Are your near and far planes too far apart? (The further apart they are, the less precision you have.)&#xD;&#xA;&#xD;&#xA;Do your textures make use of transparency? In that case you must either use alpha-testing (to skip transparent pixels) or you must Z-sort your objects and not use the Z-buffer. You can't use the Z-buffer for transparent objects." />
  <row Id="30608" PostHistoryTypeId="5" PostId="13739" RevisionGUID="3112de4e-8ca2-4937-af5e-e7d656a44057" CreationDate="2011-06-16T12:41:48.353" UserId="6786" Comment="added 144 characters in body" Text="I downloaded a 3d model of a car. By judging by the skins and images available model treats wheels and car body as separate nodes. I want to access its child nodes (wheels) to specify animation.&#xD;&#xA;&#xD;&#xA;But I don't know the names of its child nodes. Is it possible to figure out names of its child nodes by looking at the file content. I have a obj file of the 3D model. &#xD;&#xA;I am using JMonkey 2.&#xD;&#xA;&#xD;&#xA;**EDIT** &lt;br /&gt;&#xD;&#xA;here is the link [thefree3dmodels][1].&#xD;&#xA;&#xD;&#xA;Thank you in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://thefree3dmodels.com/stuff/vehicles/ford_crown_victoria/13-1-0-769" />
  <row Id="30610" PostHistoryTypeId="2" PostId="13749" RevisionGUID="ca5a7c7e-583b-4001-ab4a-50307829a064" CreationDate="2011-06-16T13:14:55.407" UserId="3598" Text="You could also look into various Open Source Game engines, and see how they handle collision, like for example [panda3d][1].  &#xD;&#xA;You might also take a peek into sources of physics engines like [ODE][2] or [Bullet][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.panda3d.org/&#xD;&#xA;  [2]: http://www.ode.org/&#xD;&#xA;  [3]: http://bulletphysics.org" />
  <row Id="30612" PostHistoryTypeId="5" PostId="13693" RevisionGUID="c4e09417-f2d5-40fb-ba8c-2e325ab87c64" CreationDate="2011-06-16T13:26:56.950" UserId="14" Comment="putting the edits that he couldn't add because the question asking account was unregistered" Text="I have a missile that is shot from a ship at an angle, the missile then turns towards the target in an arc with a given turn radius. How do I determine the point on the arc when I need to start turning so the missile is heading straight for the target?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;What I need to do before I launch the missiles is calculate and draw the flight paths. So in the attached example the launch vehicle has a heading of 90 deg and the targets are behind it. Both missiles are launched at a relative heading of -45deg or + 45 deg to the launch vehicle's heading. The missiles initially turn towards the target with a known turn radius. I have to calculate the point at which the turn takes the missile to heading at which it will turn to directly attack the target. Obviously if the target is at or near 45 degrees then there is no initial turn the missile just goes straight for the target.&#xD;&#xA;&#xD;&#xA;After the missile is launched the map will also show the missile tracking on this line as indication of its flight path.&#xD;&#xA; &#xD;&#xA;Apparently I can't post an image yet!" />
  <row Id="30614" PostHistoryTypeId="5" PostId="13740" RevisionGUID="21bea2f9-65c7-4454-abba-e3d238128b35" CreationDate="2011-06-16T13:29:40.990" UserId="3588" Comment="I have enough magic to spare. Also fixed a few points of spelling in addition to adding your image ♪" Text="I assume you want to change the direction by changing the launching heading to the target heading then continue straight to the target (a more fun problem should be to hit the target when turning!).&#xD;&#xA;&#xD;&#xA;I have to assume that you are able to turn with the same turn radius in all direction (this is a simplification that is hard to see in real missiles).&#xD;&#xA;&#xD;&#xA;The simplest solution is to use the **90&amp;deg; bending**: the missile files until its trajectory forms a right angle with the target. if you turn exactly at the 90&amp;deg; point you will miss the target exactly by the turn radius, because you have to take into account the turning itself. The solution is to start to turn exactly &quot;turn radius&quot; meters(?) before reaching the 90&amp;deg; point, then turn forming a (try to guess) 90&amp;deg; arc to go straight to your target.&#xD;&#xA;&#xD;&#xA;This solution is not always feasible, for example when you don't have the visibility on the 90&amp;deg; path (buildings or other obstacles).&#xD;&#xA;&#xD;&#xA;The good news is that the solution works for every angle (not just the mythical 90&amp;deg;) the trick is to take in account the space needed to turn starting turning before.&#xD;&#xA;&#xD;&#xA;How much before? This is why the 90&amp;deg; stuff is the simplest solution... &#xD;&#xA;&#xD;&#xA;Let's say that you reach the visibility or the best target heading when the firing path forms an angle of &amp;theta;&amp;deg; then you should anticipating the turn by:&#xD;&#xA;&#xD;&#xA;    (sec(90&amp;deg; - &amp;theta;&amp;deg;) + tan(90&amp;deg; - &amp;theta;&amp;deg;)) * turning_radius&#xD;&#xA;&#xD;&#xA;...where secant is the reciprocal of the cosine. The proof is trivial and is left to the reader.&#xD;&#xA;&#xD;&#xA;Seriously, the formula comes from a simple geometrical construction.&#xD;&#xA;&#xD;&#xA;[![Turning point graph][1]][1]&#xD;&#xA;&#xD;&#xA; [1]: http://i.stack.imgur.com/OHe8Y.png&#xD;&#xA;&#xD;&#xA;Black line is the firing path, while the thin black line is the same path moved toward the target by turning_radius units; the same for the red ones that are the target path.&#xD;&#xA;&#xD;&#xA;The green segments are turning_radius in length so you should see that:&#xD;&#xA;&#xD;&#xA;AB is the tangent of 90&amp;deg; - &amp;theta;&amp;deg; &#xD;&#xA;&#xD;&#xA;BC is the secant. &#xD;&#xA;&#xD;&#xA;Both of the green lines that come from the turning point are turning_radius in length and are perpendicular to the two paths; meaning that the turning radius is correct and the arc is tangent to both of the paths (as it should be if you make a turn under physical constraints).&#xD;&#xA;&#xD;&#xA;Let me know if you see some error.&#xD;&#xA;" />
  <row Id="30615" PostHistoryTypeId="24" PostId="13740" RevisionGUID="21bea2f9-65c7-4454-abba-e3d238128b35" CreationDate="2011-06-16T13:29:40.990" Comment="Proposed by 3588 approved by 14 edit id of 498" />
  <row Id="30616" PostHistoryTypeId="5" PostId="13740" RevisionGUID="f2cef423-cc32-419d-bd4d-e62ca12bbeb3" CreationDate="2011-06-16T13:31:33.830" UserId="14" Comment="deleted 28 characters in body" Text="I assume you want to change the direction by changing the launching heading to the target heading then continue straight to the target (a more fun problem should be to hit the target when turning!).&#xD;&#xA;&#xD;&#xA;I have to assume that you are able to turn with the same turn radius in all direction (this is a simplification that is hard to see in real missiles).&#xD;&#xA;&#xD;&#xA;The simplest solution is to use the **90&amp;deg; bending**: the missile files until its trajectory forms a right angle with the target. if you turn exactly at the 90&amp;deg; point you will miss the target exactly by the turn radius, because you have to take into account the turning itself. The solution is to start to turn exactly &quot;turn radius&quot; meters(?) before reaching the 90&amp;deg; point, then turn forming a (try to guess) 90&amp;deg; arc to go straight to your target.&#xD;&#xA;&#xD;&#xA;This solution is not always feasible, for example when you don't have the visibility on the 90&amp;deg; path (buildings or other obstacles).&#xD;&#xA;&#xD;&#xA;The good news is that the solution works for every angle (not just the mythical 90&amp;deg;) the trick is to take in account the space needed to turn starting turning before.&#xD;&#xA;&#xD;&#xA;How much before? This is why the 90&amp;deg; stuff is the simplest solution... &#xD;&#xA;&#xD;&#xA;Let's say that you reach the visibility or the best target heading when the firing path forms an angle of &amp;theta;&amp;deg; then you should anticipating the turn by:&#xD;&#xA;&#xD;&#xA;    (sec(90° - θ°) + tan(90° - θ°)) * turning_radius&#xD;&#xA;&#xD;&#xA;...where secant is the reciprocal of the cosine. The proof is trivial and is left to the reader.&#xD;&#xA;&#xD;&#xA;Seriously, the formula comes from a simple geometrical construction.&#xD;&#xA;&#xD;&#xA;[![Turning point graph][1]][1]&#xD;&#xA;&#xD;&#xA; [1]: http://i.stack.imgur.com/OHe8Y.png&#xD;&#xA;&#xD;&#xA;Black line is the firing path, while the thin black line is the same path moved toward the target by turning_radius units; the same for the red ones that are the target path.&#xD;&#xA;&#xD;&#xA;The green segments are turning_radius in length so you should see that:&#xD;&#xA;&#xD;&#xA;AB is the tangent of 90&amp;deg; - &amp;theta;&amp;deg; &#xD;&#xA;&#xD;&#xA;BC is the secant. &#xD;&#xA;&#xD;&#xA;Both of the green lines that come from the turning point are turning_radius in length and are perpendicular to the two paths; meaning that the turning radius is correct and the arc is tangent to both of the paths (as it should be if you make a turn under physical constraints).&#xD;&#xA;&#xD;&#xA;Let me know if you see some error.&#xD;&#xA;" />
  <row Id="30617" PostHistoryTypeId="2" PostId="13750" RevisionGUID="a0d74e4c-e8bc-4373-baba-6ba637cf044d" CreationDate="2011-06-16T13:51:16.053" UserId="3874" Text="I'm currently using Box2D and my character is a bunch of fixtures in Box2D. I was wondering if, to determine if a player is falling, detecting a change in Y position would be appropriate? &#xD;&#xA;&#xD;&#xA;Are there maybe other ways that I'm not thinking of? Hw is this sort of thing usually detected?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="30618" PostHistoryTypeId="1" PostId="13750" RevisionGUID="a0d74e4c-e8bc-4373-baba-6ba637cf044d" CreationDate="2011-06-16T13:51:16.053" UserId="3874" Text="Determining player.isFalling() through change of y?" />
  <row Id="30619" PostHistoryTypeId="3" PostId="13750" RevisionGUID="a0d74e4c-e8bc-4373-baba-6ba637cf044d" CreationDate="2011-06-16T13:51:16.053" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;box2d&gt;" />
  <row Id="30620" PostHistoryTypeId="5" PostId="13750" RevisionGUID="8b8a59f2-f6f7-4656-9ef1-aa8c3ba1a695" CreationDate="2011-06-16T14:07:22.603" UserId="3874" Comment="added 1 characters in body" Text="I'm currently using Box2D and my character is a bunch of fixtures in Box2D. I was wondering if, to determine if a player is falling, detecting a change in Y position would be appropriate? &#xD;&#xA;&#xD;&#xA;Are there maybe other ways that I'm not thinking of? How is this sort of thing usually detected?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="30621" PostHistoryTypeId="6" PostId="13750" RevisionGUID="9c81c819-11b9-4863-869f-6e1a0a23a41d" CreationDate="2011-06-16T14:10:59.130" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;2d-physics&gt;&lt;box2d&gt;" />
  <row Id="30622" PostHistoryTypeId="2" PostId="13751" RevisionGUID="14ffdbc8-d56a-4006-bc4a-297d55cc0e26" CreationDate="2011-06-16T14:18:05.743" UserId="1829" Text="Don't forget that the framerate versus the speed of the bullet can be a problem, in some cases if you did not coded your physics engine well enough, the bullet can just go through object without hitting it. There is a solution for that matter, which I don't remember very well...&#xD;&#xA;&#xD;&#xA;Anyways, I think it can be very problematic to compensate realistic bullets in a multiplayer environment, if not impossible if the latency start being longer than 30 or 50ms.&#xD;&#xA;&#xD;&#xA;One day though, ISP may care a little more about latency and deliver different offers... but without FTTH, it's still a dream..." />
  <row Id="30623" PostHistoryTypeId="5" PostId="13731" RevisionGUID="3f8bbd83-9cd1-4383-9203-71d976bea672" CreationDate="2011-06-16T14:21:58.150" UserId="284" Comment="added 68 characters in body" Text="**Disclaimer:** I know that client-side is always to be held with suspicion, but I'm trying to conceive of a way to verify the success or failure of javascript-based mini-games.&#xD;&#xA;&#xD;&#xA;Mini-games to add fun to client-side game&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Here is an example scenario:&#xD;&#xA;&#xD;&#xA;I implement a javascript-dependent picture-sliding game for various pictures.  &#xD;&#xA;You know the type:&#xD;&#xA;&#xD;&#xA;![http://3.bp.blogspot.com/_AAvC0ZSs-1k/SUv8waQg0zI/AAAAAAAABN0/tzf3pA9nDxA/s400/SlidingPuzzle-ForHelen.jpg][1]&#xD;&#xA;&#xD;&#xA;So that would be a javascript game that would be served from my website.&#xD;&#xA;&#xD;&#xA;How to check success&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;I then want to set up a verification scheme to verify that the game has been completed, the browser would ping the website with a verification code or scheme to say &quot;hey, I'm done, and the javascript mini-game is complete&quot;.&#xD;&#xA;&#xD;&#xA;There are two ways that I can think of to make the verification work.  &#xD;&#xA;&#xD;&#xA; 1. One is a &quot;replay&quot; scheme, e.g. each&#xD;&#xA;    of the moves that the user does&#xD;&#xA;    would be concatenated and sent to&#xD;&#xA;    the server, which would have a&#xD;&#xA;    system for verifying that the end&#xD;&#xA;    result was indeed a valid solved&#xD;&#xA;    state.&#xD;&#xA;    &#xD;&#xA; 2. The other is a &quot;summary&quot;&#xD;&#xA;    verification code, for example if&#xD;&#xA;    each of the numbers is assigned a&#xD;&#xA;    random letter client-side, the final sliding puzzle state&#xD;&#xA;    would result in a word-code like&#xD;&#xA;    asdfaseasewadsfwef when read from left to right, top to bottom, which can be&#xD;&#xA;    sent to the server upon completion&#xD;&#xA;    to receive a pass/fail grade of&#xD;&#xA;    success.  Obviously that isn't&#xD;&#xA;    checking the intermediary steps,&#xD;&#xA;    just the final result, but it'd&#xD;&#xA;    probably be a lot faster and less&#xD;&#xA;    resource-intensive, and would filter&#xD;&#xA;    out perhaps 99% of people from&#xD;&#xA;    abusing such a mini-game.&#xD;&#xA;&#xD;&#xA;I don't have a huge, high bar for 100% secure communication in this case because I just want to add fun, and give some minor/non-overwhelming benefits from the mini-games, not build a fort-knox system.  And if someone is smart enough to hack up a solution to the mini-games to automate them, I won't be excessively broken up about it.&#xD;&#xA;&#xD;&#xA;Techniques?&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;So with that in mind, are these two approaches valid?  Are there other approaches to try with this?  Any examples in the wild that I could learn from?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/quY7N.jpg" />
  <row Id="30624" PostHistoryTypeId="2" PostId="13752" RevisionGUID="af83dccd-b72e-49f5-b306-e9dffa418098" CreationDate="2011-06-16T14:30:29.443" UserId="6469" Text="I have a procedural approach to the game loop that runs various classes. &#xD;&#xA;&#xD;&#xA;it looks like this:&#xD;&#xA;&#xD;&#xA;continue any in progress animations&#xD;&#xA;check for used input&#xD;&#xA;apply AI &#xD;&#xA;move things&#xD;&#xA;resolve events such as collisions &#xD;&#xA;draw it all to screen &#xD;&#xA;&#xD;&#xA;I have seen a lot of post about hoe the draw it all to screen should be running seperatly as fast as it can, possibly in another thread.&#xD;&#xA;&#xD;&#xA;My problem is that if the draw runs as fast as it can what happens if it tried to draw while im still applying the AI or resolving a collision ? it could draw the wrong thing on screen. &#xD;&#xA;&#xD;&#xA;This seems to be a well established so there must be an explanation to this problem as i just cant get my head around it. The only solution i have is the is updates the screen so fast that any errors like that get refreshed before we see them but that sounds hacky.  &#xD;&#xA;&#xD;&#xA;So how does this work / how would you implement it so that they are in sync but running at different speeds?" />
  <row Id="30625" PostHistoryTypeId="1" PostId="13752" RevisionGUID="af83dccd-b72e-49f5-b306-e9dffa418098" CreationDate="2011-06-16T14:30:29.443" UserId="6469" Text="Synchronise graphics and logic code" />
  <row Id="30626" PostHistoryTypeId="3" PostId="13752" RevisionGUID="af83dccd-b72e-49f5-b306-e9dffa418098" CreationDate="2011-06-16T14:30:29.443" UserId="6469" Text="&lt;c++&gt;" />
  <row Id="30627" PostHistoryTypeId="5" PostId="13743" RevisionGUID="b03fa50a-6fe8-470b-b3a3-fc259a81b7f3" CreationDate="2011-06-16T14:31:55.410" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What math should all game programmers know?](http://gamedev.stackexchange.com/questions/2029/what-math-should-all-game-programmers-know)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in school all those years ago) so, in order to get one step closer to being the best I need some advice. What maths should I learn for specific areas of game programming? &#xD;&#xA;If someone could outline some subjects and say one or two words about what areas of game programming they would be used in I’d greatly appreciate it. I’m working through the Khan academy programme at the moment, and I’m just getting into algebra now. &#xD;&#xA;" />
  <row Id="30628" PostHistoryTypeId="10" PostId="13743" RevisionGUID="c6afa67a-6be1-4700-9c14-15bc2d5b29de" CreationDate="2011-06-16T14:31:55.053" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30629" PostHistoryTypeId="5" PostId="13752" RevisionGUID="635c2fa4-4258-4d03-9d74-0e50b3563488" CreationDate="2011-06-16T14:38:43.717" UserId="51" Comment="added 13 characters in body; edited tags" Text="I have a procedural approach to the game loop that runs various classes. &#xD;&#xA;&#xD;&#xA;it looks like this:&#xD;&#xA;&#xD;&#xA; 1. continue any in progress animations&#xD;&#xA; 2. check for used input&#xD;&#xA; 3. apply AI &#xD;&#xA; 4. move things&#xD;&#xA; 5. resolve events such as collisions &#xD;&#xA; 6. draw it all to screen &#xD;&#xA;&#xD;&#xA;I have seen a lot of posts about how drawing should be running separately as fast as it can, possibly in another thread.&#xD;&#xA;&#xD;&#xA;My problem is that if the drawing runs as fast as it, can what happens if it tried to draw while I'm still applying the AI or resolving a collision?  It could draw the wrong thing on screen. &#xD;&#xA;&#xD;&#xA;This seems to be a well established idea so there must be an explanation to this problem as I just cant get my head around it. The only solution I have is to update the screen so fast that any errors like that get refreshed before we see them but that sounds hacky.  &#xD;&#xA;&#xD;&#xA;So how does this work / how would you implement it so that they are in sync but running at different speeds?" />
  <row Id="30630" PostHistoryTypeId="6" PostId="13752" RevisionGUID="635c2fa4-4258-4d03-9d74-0e50b3563488" CreationDate="2011-06-16T14:38:43.717" UserId="51" Comment="added 13 characters in body; edited tags" Text="&lt;c++&gt;&lt;gameloop&gt;" />
  <row Id="30631" PostHistoryTypeId="2" PostId="13753" RevisionGUID="35f711f3-590b-48cb-a039-e9af9b21d924" CreationDate="2011-06-16T14:46:34.083" UserId="7804" Text="Move all relevant components in your &quot;bunch of fixtures&quot; (which together make the player) downward by a small amount, and check for collisions with anything you consider possible to jump off of. If there is no collision, the player is falling. Otherwise, he isn't. Don't forget to move the components back up by that same amount.&#xD;&#xA;&#xD;&#xA;If your character is humanoid, you should probably move and check only the feet of the character, as otherwise your character may end up being able to jump even when standing on his head!" />
  <row Id="30632" PostHistoryTypeId="2" PostId="13754" RevisionGUID="15d47768-505c-4ef2-ab90-3a5cc6dea51c" CreationDate="2011-06-16T14:51:03.287" UserId="6588" Text="Personally I would go with option 2 because you don't need this to be 100% secure. That is definitely a lot easier.&#xD;&#xA;&#xD;&#xA;However, are you sure you don't care about cheating? Whether or not cheating on the mini-game matters depends on the reward for successfully completing the mini-game. If successfully completing the mini-game has any affect at all on other players, then I would consider cheating pretty important and go with option 1.&#xD;&#xA;&#xD;&#xA;And note that &quot;any affect&quot; can be very subtle. Let's say that completing the mini-game just earns access to a new level for that one player. In that case, I wouldn't really care if they passed the mini-game by cheating. If however the mini-game earned them some visible trophy (eg. a badge on their profile) that other players can see then I would want to protect against cheating." />
  <row Id="30633" PostHistoryTypeId="5" PostId="13754" RevisionGUID="12029707-43c7-483f-96eb-c8829392539a" CreationDate="2011-06-16T14:59:36.120" UserId="6588" Comment="added 110 characters in body" Text="Personally I would go with option 2 because you don't need this to be 100% secure. That is definitely a lot easier.&#xD;&#xA;&#xD;&#xA;However, are you sure you don't care about cheating? Whether or not cheating on the mini-game matters depends on the reward for successfully completing the mini-game. If successfully completing the mini-game has any affect at all on other players, then I would consider cheating pretty important and go with option 1.&#xD;&#xA;&#xD;&#xA;And note that &quot;any affect&quot; can be very subtle. Let's say that completing the mini-game just earns access to a new level for that one player. In that case, I wouldn't really care if they passed the mini-game by cheating. If however the mini-game earned them some visible trophy (eg. a badge on their profile) that other players can see then I would want to protect against cheating. And if the mini-game earned them a special weapon then I would *definitely* want to protect against cheating." />
  <row Id="30634" PostHistoryTypeId="2" PostId="13755" RevisionGUID="a641e11e-c618-41ee-90d2-3219a51ac388" CreationDate="2011-06-16T15:17:37.500" UserId="5060" Text="The way I handle this is each player has an `isJumping` boolean which, when they jump, is set to `true`. When they collide with a surface, I check if it's something they could jump off of and other stipulations such as are they standing flat, etc.&#xD;&#xA;&#xD;&#xA;Then, when they try to jump, if the surface they're on is good and `isJumping == false` I allow them to jump, otherwise they can't jump. I think this is better than calculating collisions every time you want to see if they're jumping." />
  <row Id="30635" PostHistoryTypeId="25" PostId="13750" RevisionGUID="41241829-c290-47c3-8d38-3d6e04a6eb2f" CreationDate="2011-06-16T15:24:18.903" Comment="http://twitter.com/#!/StackGameDev/status/81381593737994241" />
  <row Id="30636" PostHistoryTypeId="5" PostId="13754" RevisionGUID="f20e6c68-3b83-4b96-ac60-9372d37f78a8" CreationDate="2011-06-16T15:24:50.540" UserId="6588" Comment="added 662 characters in body; edited body" Text="**new answer**&#xD;&#xA;&#xD;&#xA;(I thought of a better approach than what I wrote in the first place, but I'm leaving the original answer for reference)&#xD;&#xA;&#xD;&#xA;Instead of having the client tell the server when the puzzle is completed, do it the other way around (ie. the server tells the client when the puzzle is completed). That way the client simply tells the server what move was made every time the player makes a move, and then the server can tell the client when the puzzle is complete in the response to the request from the client.&#xD;&#xA;&#xD;&#xA;This way you get the security of option 1 without the bother of writing code to playback a series of moves.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**old answer**&#xD;&#xA;&#xD;&#xA;Personally I would go with option 2 because you don't need this to be 100% secure. That is definitely a lot easier.&#xD;&#xA;&#xD;&#xA;However, are you sure you don't care about cheating? Whether or not cheating on the mini-game matters depends on the reward for successfully completing the mini-game. If successfully completing the mini-game has any affect at all on other players, then I would consider cheating pretty important and go with option 1.&#xD;&#xA;&#xD;&#xA;And note that &quot;any affect&quot; can be very subtle. Let's say that completing the mini-game just earns access to a new level for that one player. In that case, I wouldn't really care if they passed the mini-game by cheating. If however the mini-game earned them some visible trophy (eg. a badge on their profile) that other players can see then I would want to protect against cheating. And if the mini-game earned them a special weapon then I would *definitely* want to protect against cheating." />
  <row Id="30637" PostHistoryTypeId="5" PostId="13731" RevisionGUID="a7b0324b-641c-4e1e-8df0-499210defdc3" CreationDate="2011-06-16T15:38:36.133" UserId="284" Comment="added 7 characters in body" Text="**Disclaimer:** I know that client-side is always to be held with suspicion, but I'm trying to conceive of a way to verify the success or failure of javascript-based mini-games.&#xD;&#xA;&#xD;&#xA;Mini-games to add fun to client-side game&#xD;&#xA;----------------------------------------&#xD;&#xA;&#xD;&#xA;Here is an example scenario:&#xD;&#xA;&#xD;&#xA;I implement a javascript-dependent picture-sliding game for various pictures.  &#xD;&#xA;You know the type:&#xD;&#xA;&#xD;&#xA;![http://3.bp.blogspot.com/_AAvC0ZSs-1k/SUv8waQg0zI/AAAAAAAABN0/tzf3pA9nDxA/s400/SlidingPuzzle-ForHelen.jpg][1]&#xD;&#xA;&#xD;&#xA;So that would be a javascript game that would be served from my website.&#xD;&#xA;&#xD;&#xA;How to check success&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;I then want to set up a verification scheme to verify that the game has been completed, the browser would ping the website with a verification code or scheme to say &quot;hey, I'm done, and the javascript mini-game is complete&quot;.&#xD;&#xA;&#xD;&#xA;There are two ways that I can think of to make the verification work.  &#xD;&#xA;&#xD;&#xA; 1. One is a &quot;replay&quot; scheme, e.g. each&#xD;&#xA;    of the moves that the user does&#xD;&#xA;    would be concatenated and sent to&#xD;&#xA;    the server, which would have a&#xD;&#xA;    system for verifying that the end&#xD;&#xA;    result was indeed a valid solved&#xD;&#xA;    state.&#xD;&#xA;    &#xD;&#xA; 2. The other is a &quot;summary&quot;&#xD;&#xA;    verification code, for example if&#xD;&#xA;    each of the numbers is assigned a&#xD;&#xA;    random letter client-side, the final sliding puzzle state&#xD;&#xA;    would result in a word-code like&#xD;&#xA;    asdfaseasewadsfwef when read from left to right, top to bottom, which can be&#xD;&#xA;    sent to the server upon completion&#xD;&#xA;    to receive a pass/fail grade of&#xD;&#xA;    success.  Obviously that isn't&#xD;&#xA;    checking the intermediary steps,&#xD;&#xA;    just the final result, but it'd&#xD;&#xA;    probably be a lot faster and less&#xD;&#xA;    resource-intensive, and would probably prevent a bit more abuse than just a GET request with a &quot;go&quot; parameter.&#xD;&#xA;&#xD;&#xA;I don't have a huge, high bar for 100% secure communication in this case because I just want to add fun, and give some minor/non-overwhelming benefits from the mini-games, not build a fort-knox system.  And if someone is smart enough to hack up a solution to the mini-games to automate them, I won't be excessively broken up about it.&#xD;&#xA;&#xD;&#xA;Techniques?&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;So with that in mind, are these two approaches valid?  Are there other approaches to try with this?  Any examples in the wild that I could learn from?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/quY7N.jpg" />
  <row Id="30638" PostHistoryTypeId="5" PostId="13750" RevisionGUID="570b5972-6d0f-4f7e-8920-c4d088b0fa43" CreationDate="2011-06-16T15:46:05.223" UserId="1198" Comment="deleted 10 characters in body" Text="I'm currently using Box2D and my character is a bunch of fixtures in Box2D. I was wondering if, to determine if a player is falling, detecting a change in Y position would be appropriate? &#xD;&#xA;&#xD;&#xA;Are there maybe other ways that I'm not thinking of? How is this sort of thing usually detected?" />
  <row Id="30639" PostHistoryTypeId="2" PostId="13756" RevisionGUID="9002c9c8-cd71-4d0d-a2d2-734ffa68926d" CreationDate="2011-06-16T16:03:50.710" UserId="5495" Text="So, I have this &quot;Breakeout style&quot; game.  &#xD;&#xA;I have a cannon at the center, blocks around the cannon and pads around the blocks.&#xD;&#xA;&#xD;&#xA;[This is how the game looks like.][1]  &#xD;&#xA;&#xD;&#xA;I've managed to get the collision per pixel and my ball &quot;*reflects*&quot; on contact with the blocks with the following math:  &#xD;&#xA;&#xD;&#xA;    Ball.Direction = 2 * (Block.Direction - Ball.Direction) + 180;&#xD;&#xA;&#xD;&#xA;[This is something like.][2]  &#xD;&#xA;&#xD;&#xA;Where the blue line is the ball direction, and the black line (base line) is the block surface.  &#xD;&#xA;So far, so good.&#xD;&#xA;&#xD;&#xA;My problem comes now, with the pads (the 3 dark and large blocks around the small colored blocks).&#xD;&#xA;&#xD;&#xA;As the can turn around, the surface angle changes.  &#xD;&#xA;More than that, the ball should hit the sides too, so, how can I measure the direction of the hit and the new direction of movement of the ball?&#xD;&#xA;&#xD;&#xA;*ps*: If needed, I can supply code and a playable swf.  &#xD;&#xA;*pps*: I'm afraid that my StackOverflow reputation points don't count here, so I can't post images.  &#xD;&#xA;*ppps*: Don't know if the tags are good, so if you think that another set of tags is needed, please, edit it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Apd8d.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/811Yi.png" />
  <row Id="30640" PostHistoryTypeId="1" PostId="13756" RevisionGUID="9002c9c8-cd71-4d0d-a2d2-734ffa68926d" CreationDate="2011-06-16T16:03:50.710" UserId="5495" Text="Angle of Reflection" />
  <row Id="30641" PostHistoryTypeId="3" PostId="13756" RevisionGUID="9002c9c8-cd71-4d0d-a2d2-734ffa68926d" CreationDate="2011-06-16T16:03:50.710" UserId="5495" Text="&lt;math&gt;&lt;physics&gt;&lt;actionscript-3&gt;" />
  <row Id="30642" PostHistoryTypeId="2" PostId="13757" RevisionGUID="27e1c1e0-b600-4d57-8b57-aa1fb46c0db4" CreationDate="2011-06-16T16:08:48.550" UserId="7588" Text="(From my comment.)&#xD;&#xA;I am not familiar with Box2D, but normally a physics engine should give you ways to check the normal of a collision.&#xD;&#xA;&#xD;&#xA;If it is 'up' this means your player is standing on something, and should be able to jump.&#xD;&#xA;&#xD;&#xA;Inversely if he is not colliding, or if none of the collision normals are pointing 'up' then he is falling." />
  <row Id="30643" PostHistoryTypeId="5" PostId="13756" RevisionGUID="f8ad294e-d065-4c56-b8a6-739df6722035" CreationDate="2011-06-16T16:33:12.580" UserId="3588" Comment="The tags are fine, though I added a 2D just to be clearer. Also fixed your images and removed the now unnecessary post scripts ♪" Text="I have this &quot;Breakeout style&quot; game.  &#xD;&#xA;&#xD;&#xA;I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like:&#xD;&#xA;&#xD;&#xA;![A circular Breakout game][1]  &#xD;&#xA;&#xD;&#xA;I've managed to get the collision per pixel and my ball &quot;*reflects*&quot; on contact with the blocks with the following math:  &#xD;&#xA;&#xD;&#xA;    Ball.Direction = 2 * (Block.Direction - Ball.Direction) + 180;&#xD;&#xA;&#xD;&#xA;![Image depicting an angle of reflection calculation][2]  &#xD;&#xA;&#xD;&#xA;Where the blue line is the ball direction, and the black line (base line) is the block surface.  &#xD;&#xA;So far, so good.&#xD;&#xA;&#xD;&#xA;My problem comes now, with the pads (the 3 dark and large blocks around the small colored blocks).&#xD;&#xA;&#xD;&#xA;As the can turn around, the surface angle changes.  &#xD;&#xA;More than that, the ball should hit the sides too, so, how can I measure the direction of the hit and the new direction of movement of the ball?&#xD;&#xA;&#xD;&#xA;*ps*: If needed, I can supply code and a playable swf.  &#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Apd8d.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/811Yi.png" />
  <row Id="30644" PostHistoryTypeId="6" PostId="13756" RevisionGUID="f8ad294e-d065-4c56-b8a6-739df6722035" CreationDate="2011-06-16T16:33:12.580" UserId="3588" Comment="The tags are fine, though I added a 2D just to be clearer. Also fixed your images and removed the now unnecessary post scripts ♪" Text="&lt;2d&gt;&lt;math&gt;&lt;physics&gt;&lt;actionscript-3&gt;" />
  <row Id="30645" PostHistoryTypeId="24" PostId="13756" RevisionGUID="f8ad294e-d065-4c56-b8a6-739df6722035" CreationDate="2011-06-16T16:33:12.580" Comment="Proposed by 3588 approved by 51 edit id of 499" />
  <row Id="30646" PostHistoryTypeId="5" PostId="12038" RevisionGUID="a5f3a1ce-2ebf-4da2-8aa1-38a53a34b351" CreationDate="2011-06-16T16:42:12.627" UserId="2061" Comment="added 189 characters in body" Text="Assuming you want this to be a frame-by-frame thing (where the target could even be moving), and not a precomputed trajectory, this is actually incredibly simple:&#xD;&#xA;&#xD;&#xA;Every frame, compare the velocity-vector of the missile to the vector **(position&lt;sub&gt;target&lt;/sub&gt; - position&lt;sub&gt;missile&lt;/sub&gt;)**; that is, the vector pointing from the missile to the target.  Every frame, if the two vectors do not have the same direction, then rotate the veloity-vector a little bit towards the other vector, so every frame the missle gets a little bit closer to looking at its target.&#xD;&#xA;&#xD;&#xA;You can determine whether to rotate clockwise or counter-clockwise by looking at the sign of the cross-product between the two vectors.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**[Edit]**  XNA-ish code (I don't have XNA to test this):&#xD;&#xA;&#xD;&#xA;    //Once a frame:&#xD;&#xA;&#xD;&#xA;	//Get vector spanning from missile to target&#xD;&#xA;	Vector2 vectorToTarget = target.Position - missile.Position;&#xD;&#xA;	&#xD;&#xA;	//Convert to Vector3 to do cross-product&#xD;&#xA;	Vector3 vectorToTarget3 = new Vector3(vectorToTarget, 0);&#xD;&#xA;	Vector3 missileVelocity3 = new Vector3(missile.Velocity, 0);&#xD;&#xA;	&#xD;&#xA;	//Rotate clockwise/counter-clockwise is determined by sign of cross-product&#xD;&#xA;	int crossProductSign = Vector3.Cross(missileVelocity3, vectorToTarget3).Z;&#xD;&#xA;	&#xD;&#xA;	//Positive cross-product means rotate counter-clockwise, negative is clockwise&#xD;&#xA;	double rotationAngle = 0;&#xD;&#xA;	if(crossProductSign &gt; 0)&#xD;&#xA;	    rotationAngle = -0.05;&#xD;&#xA;	else if(crossProductSign &lt; 0)&#xD;&#xA;		rotationAngle = 0.05;&#xD;&#xA;	&#xD;&#xA;	//I'm not sure how to do rotation in XNA, but the internets tell me it's something like this:&#xD;&#xA;	missile.velocity = Vector2.Transform(missile.velocity, Matrix.CreateRotationZ(rotationAngle))&#xD;&#xA;&#xD;&#xA;Note that, because `rotationAngle` has only three possible values, all possible values of `Matrix.CreateRotationZ(rotationAngle)` can be cached so you don't have to call it every frame." />
  <row Id="30647" PostHistoryTypeId="2" PostId="13758" RevisionGUID="4087d8bd-f9bd-413b-952b-2754159a8a04" CreationDate="2011-06-16T16:44:18.223" UserId="2111" Text="I'm not sure if I understood your problem correctly, but I assumed that what you want to do is find the resultant direction of you ball after a collision.&#xD;&#xA;&#xD;&#xA;Here's a quick drawing on my white board that shows a possible solution for that:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RMxBi.png&#xD;&#xA;&#xD;&#xA;The green arrows represent the ball's velocity (as a vector), the blue blocks represent your large black blocks and the red arrow is the resultant vector.&#xD;&#xA;&#xD;&#xA;On the first case, the blue block has an inclination of 30 degrees. One of the way to fix the collision problem is to bring everything back on the horizontal axis. What you need to do is **rotate everything** by 30 degrees (the inclination of the block) (you can use matrices for that). &#xD;&#xA;&#xD;&#xA;Then, you **check where the collision was from**. If the collision was horizontal, **reverse** the x component of the velocity. If it was vertical (like in this case), the y component (`ball.Velocity.Y = -ball.Velocity.Y`). This will also make the ball act correctly when it hits corners (it will reverse both components).&#xD;&#xA;&#xD;&#xA;On the second case, it's the same thing, except that the ball's velocity is not perpendicular to the block. You rotate by 70 degrees, check where the collision was from, and reverse the appropriate components.&#xD;&#xA;&#xD;&#xA;This is certainly not the best way to go and I'm sure you can just calculate it in some way but I think it's a possible solution to your problem." />
  <row Id="30648" PostHistoryTypeId="5" PostId="13756" RevisionGUID="6627cccf-b819-4032-8acb-8a0d3b7d8329" CreationDate="2011-06-16T16:45:28.367" UserId="5495" Comment="More code" Text="I have this &quot;Breakeout style&quot; game.  &#xD;&#xA;&#xD;&#xA;I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like:&#xD;&#xA;&#xD;&#xA;![A circular Breakout game][1]  &#xD;&#xA;&#xD;&#xA;I've managed to get the collision per pixel and my ball &quot;*reflects*&quot; on contact with the blocks with the following math:  &#xD;&#xA;&#xD;&#xA;    Ball.Direction = 2 * (Block.Direction - Ball.Direction) + 180;&#xD;&#xA;&#xD;&#xA;![Image depicting an angle of reflection calculation][2]  &#xD;&#xA;&#xD;&#xA;Where the blue line is the ball direction, and the black line (base line) is the block surface.  &#xD;&#xA;&#xD;&#xA;**Direction** is a angle expressed in radian (that can be convert to degrees, of course).  &#xD;&#xA;The ball is moved by:&#xD;&#xA;&#xD;&#xA;    // Event.ENTER_FRAME&#xD;&#xA;    x += Math.sin(Direction) * Velocity;&#xD;&#xA;    y -= Math.cos(Direction) * Velocity;&#xD;&#xA;&#xD;&#xA;So far, so good.&#xD;&#xA;&#xD;&#xA;My problem comes now, with the pads (the 3 dark and large blocks around the small colored blocks).&#xD;&#xA;&#xD;&#xA;As they turn around, the surface angle changes.  &#xD;&#xA;More than that, the ball should hit the sides too, so, how can I measure the direction of the hit and the new direction of movement of the ball?&#xD;&#xA;&#xD;&#xA;*ps*: If needed, I can supply code and a playable swf.  &#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Apd8d.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/811Yi.png" />
  <row Id="30649" PostHistoryTypeId="5" PostId="13758" RevisionGUID="79de8283-d598-4b13-95fa-36dff42842bc" CreationDate="2011-06-16T16:49:32.823" UserId="2111" Comment="added 203 characters in body; added 145 characters in body" Text="I'm not sure if I understood your problem correctly, but I assumed that what you want to do is find the resultant direction of you ball after a collision.&#xD;&#xA;&#xD;&#xA;Here's a quick drawing on my white board that shows a possible solution for that:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RMxBi.png&#xD;&#xA;&#xD;&#xA;The green arrows represent the ball's velocity (as a vector), the blue blocks represent your large black blocks and the red arrow is the resultant vector.&#xD;&#xA;&#xD;&#xA;On the first case, the blue block has an inclination of 30 degrees. One of the way to fix the collision problem is to bring everything back on the horizontal axis. What you need to do is **rotate everything** by 30 degrees (the inclination of the block) (you can use matrices for that). &#xD;&#xA;&#xD;&#xA;Then, you **check where the collision was from**. If the collision was horizontal, **reverse** the x component of the velocity. If it was vertical (like in this case), the y component (`ball.Velocity.Y = -ball.Velocity.Y`). This will also make the ball act correctly when it hits corners (it will reverse both components). After that, you just have to **rotate back** to the real situation (which is not on the drawing).&#xD;&#xA;&#xD;&#xA;On the second case, it's the same thing, except that the ball's velocity is not perpendicular to the block. You rotate by 70 degrees, check where the collision was from, and reverse the appropriate components. After, you rotate back to your real situation.&#xD;&#xA;&#xD;&#xA;Note: I noticed that you're using an angle to represent the direction instead of a vector. You could just create a vector for these calculations or keep the same general idea but working with angles.&#xD;&#xA;&#xD;&#xA;This is certainly not the best way to go and I'm sure you can just calculate it in some way but I think it's a possible solution to your problem." />
  <row Id="30651" PostHistoryTypeId="2" PostId="13759" RevisionGUID="e9490279-bfe0-40b0-94d3-a5f574864efa" CreationDate="2011-06-16T17:23:16.973" UserId="6442" Text="You don't go into a lot of detail as to how your game works, but here is what I can offer:&#xD;&#xA;&#xD;&#xA; - If you can draw the data-dependent stuff onto a reasonably-sized surface, you can draw once, then keep the surface, and draw it onto the screen while processing. This way you can redraw cursor, HUD, etc onto the screen, but not ruin the game image, since you have it as a separate surface.&#xD;&#xA; - You can save the new data in an alternate memory space. Once everything is calculated, just point to the new data and deallocate the old. You might want to / have to split game data into two parts: screen-changers and behind-the-scenes data. Or flag it, however you like." />
  <row Id="30652" PostHistoryTypeId="2" PostId="13760" RevisionGUID="2812820c-c003-4e5a-b3af-12b867345900" CreationDate="2011-06-16T17:32:40.363" UserId="7781" Text="Assuming your controllers are wireless, the first thing you'll need is the [Xbox 360 Wireless Gaming Receiver](http://www.amazon.com/Xbox-Wireless-Gaming-Receiver-Windows-Pc/dp/B000HZFCT2). It's a $20 USB device that lets you use your Xbox 360 controllers as input devices.&#xD;&#xA;&#xD;&#xA;* If you're using **Mac OS X**, grab the [Tattibogle OS X controller driver](http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver).&#xD;&#xA;* On **Linux**, try the [xboxdrv userspace driver](http://pingus.seul.org/~grumbel/xboxdrv/).&#xD;&#xA;* If you're using **Windows** there are probably thousands of options, but try starting with the [Pinnacle Game Profiler](http://pinnaclegameprofiler.com/) (as mentioned in the Amazon reviews for the dongle).&#xD;&#xA;&#xD;&#xA;Once all that's set up it's a matter of syncing the controllers with the dongle and binding the buttons and sticks of each controller to different keypresses.&#xD;&#xA;&#xD;&#xA;Good luck!" />
  <row Id="30653" PostHistoryTypeId="2" PostId="13761" RevisionGUID="1712fefc-6605-48fe-96dd-f7b21aa379be" CreationDate="2011-06-16T17:43:43.947" UserId="4443" Text="This may or may not apply, but we would detect a difference between jumping/landing and falling so we knew when to swap to a falling animation, do damage for falling too long (not too far ;)) and the like.&#xD;&#xA;&#xD;&#xA;It was pretty much done by tracking how long a object was without a reference point. Anything on the ground, or any other object, had a reference to what it was standing on.. Not standing on anything? Then you were in the air, and after 1-2 seconds, you were 'falling' instead of gracefully landing :)" />
  <row Id="30654" PostHistoryTypeId="2" PostId="13762" RevisionGUID="29cc3087-35ed-4ad7-8341-74249ce0c005" CreationDate="2011-06-16T17:51:20.967" UserId="7277" Text="I've watched quite a few Blender tutorials, but I have yet to see examples of how to swap out sub-models. So my question is, how do you swap out equipment on a character model? Specifically I’d like to be able to dynamically add/swap clothing and items held by a character model in XNA. Ideally the items would follow the bone structure of the character model. &#xD;&#xA;&#xD;&#xA;For example; starting with a naked character in XNA, I’d like to be able to have the character hold an axe and wear chainmail that follows the character’s animations. I’d also like to be able to switch this equipment for a sword and plate mail at any time during the game. I’d rather not create a model for each equipment combination. Is there some way to just add the bones (say a sword bone) and meshes of one model to another model bone (say a right hand bone)?&#xD;&#xA;&#xD;&#xA;Thanks…" />
  <row Id="30655" PostHistoryTypeId="1" PostId="13762" RevisionGUID="29cc3087-35ed-4ad7-8341-74249ce0c005" CreationDate="2011-06-16T17:51:20.967" UserId="7277" Text="How do you add equipment to a 3D character model using XNA/Blender?" />
  <row Id="30656" PostHistoryTypeId="3" PostId="13762" RevisionGUID="29cc3087-35ed-4ad7-8341-74249ce0c005" CreationDate="2011-06-16T17:51:20.967" UserId="7277" Text="&lt;xna-4.0&gt;&lt;blender&gt;" />
  <row Id="30657" PostHistoryTypeId="2" PostId="13763" RevisionGUID="d314e3a2-5afb-4aaf-b040-f9009fc901f4" CreationDate="2011-06-16T18:08:38.030" UserId="2061" Text="In cases where you are using singletons or static-classes, 99% of the time what you should really be using is a [game service][1].  Game services are used when you want one instance of a class available to all other classes, but the tight coupling of using a global variable or static class gives you a funny taste.  They don't have the instantiation problems that you've seen, and they can be [mocked][2], if you care about automated unit-testing.&#xD;&#xA;&#xD;&#xA;To register a service, just call [`Game.Services.AddService()`][3] (your service should have its own interface).  To later use that service in another class, call [`Game.Services.GetService()`][4].&#xD;&#xA;&#xD;&#xA;In your case, your class would look something like this:&#xD;&#xA;&#xD;&#xA;    public interface ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;	    void SomeMethod();&#xD;&#xA;		int SomeProperty { get; }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class LevelContentCreation : ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;		private static Dictionary&lt;char, TileCreationInfo&gt; availableTiles =&#xD;&#xA;			CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;		private static List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;		public void SomeMethod() { /*...*/ }&#xD;&#xA;		public int SomeProperty { get; private set; }&#xD;&#xA;		&#xD;&#xA;		/* ... rest of the class ... */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At some point at the start of the program, you'd have to register your service with `Game.Services`.  *I prefer to do this at the start of `LoadContent()`, but some people prefer to register each service in that class's constructor.*&#xD;&#xA;&#xD;&#xA;    /* Main game */&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;	{&#xD;&#xA;	    RegisterServices();&#xD;&#xA;		&#xD;&#xA;		/* ... */&#xD;&#xA;    }&#xD;&#xA;	&#xD;&#xA;	private void RegisterServices()&#xD;&#xA;	{&#xD;&#xA;	    Game.Services.AddService(typeof(ILevelContentCreation), new LevelContentCreation());&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now whenever you want to access your `LevelContentCreation` class in any other class, you would simply do this:&#xD;&#xA;&#xD;&#xA;    ILevelContentCreation levelContentCreation = (ILevelContentCreation) Game.Services.GetService(typeof(ILevelContentCreation));&#xD;&#xA;    levelContentCreation.SomeMethod(); //Tada!&#xD;&#xA;	&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a side note, this paradigm is known as [Inversion of Control][5] (IoC), and is [widely used][6] outside of XNA development as well.  The most popular framework for IoC in .Net is [Ninject][7], which has nicer syntax than the Game.Services methods:&#xD;&#xA;&#xD;&#xA;    Bind&lt;ILevelContentCreation&gt;().To&lt;LevelContentCreation&gt;(); //Ninject equivalent of Services.AddService()&#xD;&#xA;	ILevelContentCreation levelContentCreation = kernel.Get&lt;ILevelContentCreation&gt;(); //Ninject equivalent of Services.GetService()&#xD;&#xA;&#xD;&#xA;It also supports [dependency injection][8], a form of IoC which is slightly more complex, but much nicer to work with.&#xD;&#xA;&#xD;&#xA;[1]: http://www.progware.org/Blog/post/XNA-Game-Development-%28Scenes-and-Game-Services%29.aspx&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;[3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.addservice.aspx&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.getservice.aspx&#xD;&#xA;[5]: http://stackoverflow.com/questions/45191/ioc-explain-and-more-important-when-to-use-it&#xD;&#xA;[6]: http://stackoverflow.com/search?q=ioc&#xD;&#xA;[7]: http://ninject.org/&#xD;&#xA;[8]: https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand" />
  <row Id="30658" PostHistoryTypeId="25" PostId="13756" RevisionGUID="b380bf4d-8bd6-4461-b290-c82723231d78" CreationDate="2011-06-16T18:24:19.620" Comment="http://twitter.com/#!/StackGameDev/status/81426894842638336" />
  <row Id="30659" PostHistoryTypeId="2" PostId="13764" RevisionGUID="cb1ead54-c2c1-4738-8c97-5aaefa100527" CreationDate="2011-06-16T18:27:41.960" UserId="962" Text="You need two booleans, `isColidingWithGround` and `isJumping`&#xD;&#xA;&#xD;&#xA;When the user presses the jump button, if `isColidingWithGround` is `true`, and `isJumping` is false, then call `jump()` which sets `isJumping` to `true`&#xD;&#xA;&#xD;&#xA;If the player's `y` velocity is positive then `isJumping` equals `false`&#xD;&#xA;&#xD;&#xA;If the player is coliding with the ground, then isColidingWithGround equals `true`, else `isColidingWithGround` equals `false`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sometimes the player is still in contact with the ground after the initial jump impulse, and I find that with using these two flags, it prevents jump() from being called multiple times when jump is pressed." />
  <row Id="30660" PostHistoryTypeId="2" PostId="13765" RevisionGUID="39f686fd-6e64-4d07-97d5-2acbffdcccd9" CreationDate="2011-06-16T18:50:52.863" UserId="7103" Text="I dont understand how exactly stencil buffer works in openGL. One aspect that confuses me is why do we use a bit operator there in glStencilFunc. Some text say that is is used to achieve multiple stencil planes but I am not sure how that can be done. Can anybody please explain the whole procedure of stencil buffer calculation during the rendering cycle. Thank you." />
  <row Id="30661" PostHistoryTypeId="1" PostId="13765" RevisionGUID="39f686fd-6e64-4d07-97d5-2acbffdcccd9" CreationDate="2011-06-16T18:50:52.863" UserId="7103" Text="Stencil buffer mask calculation." />
  <row Id="30662" PostHistoryTypeId="3" PostId="13765" RevisionGUID="39f686fd-6e64-4d07-97d5-2acbffdcccd9" CreationDate="2011-06-16T18:50:52.863" UserId="7103" Text="&lt;opengl&gt;" />
  <row Id="30663" PostHistoryTypeId="2" PostId="13766" RevisionGUID="64f7c062-185d-4666-a604-d7ebf8ff5fe4" CreationDate="2011-06-16T18:56:13.083" UserId="20" Text="For items that are carried by the character like a sword, shield or similar, you can create a special hand-bone, where you attach the new item/geometry at runtime.&#xD;&#xA;&#xD;&#xA;When it comes to different armors/clothing, this is going to be slightly more complicated. An approach that is widely used (I think also by WoW) is using segmented models:&#xD;&#xA;&#xD;&#xA;You model your character with all different armor and cloth-pieces as sub-meshes (in blender, you would use vertex-groups for that). Then you just toggle the visibility (or attach) the needed parts and hide (or detach) the unneeded parts. All the parts will share the same skeleton.&#xD;&#xA;&#xD;&#xA;You can also achieve a lot of different looks by just swapping the texture.&#xD;&#xA;" />
  <row Id="30664" PostHistoryTypeId="5" PostId="13755" RevisionGUID="e50bc292-d8dd-42d8-9378-3cdfd9acc19e" CreationDate="2011-06-16T19:30:57.020" UserId="5060" Comment="Added a bit more info." Text="The way I handle this is each player has an `isJumping` boolean which, when they jump, is set to `true`. When they collide with a surface, I check if it's something they could jump off of and other stipulations such as are they standing flat, etc. and set it to `false`.&#xD;&#xA;&#xD;&#xA;Then, when they try to jump, if the surface they're on is good and `isJumping == false` I allow them to jump, otherwise they can't jump. I think this is better than calculating collisions every time you want to see if they're jumping.&#xD;&#xA;&#xD;&#xA;**Edit**  &#xD;&#xA;As @BlueRaja pointed out below, if the user walks off the edge, `isJumping` will still be `false`. You can fix this with the Contact Listener's `EndContact` method (see sect 9.4 [Box2D docs](http://www.box2d.org/manual.html#_Toc258082975). You just need to set the `isJumping` property to `true` when the collision with the world ceases." />
  <row Id="30665" PostHistoryTypeId="2" PostId="13767" RevisionGUID="f5e192e9-34bd-4f09-a525-cf1dae742bf8" CreationDate="2011-06-16T20:00:11.157" UserId="6275" Text="Lately I have been working on a game that i plan to make online. I have used different libraries to make this game as far as i could, but I feel that I should rethink on how Im sertting this game up, so I planned to start over. The libraries that I have used are [SFML](http://www.sfml-dev.org/), OpenGL, and [Bullet Physics](http://bulletphysics.org/wordpress/), along with [GLM](http://www.3dcodingtutorial.com/Working-with-3D-models/Getting-GLM.html) to load the models. &#xD;&#xA;&#xD;&#xA;But the problem is that the 3D graphics arent working with the Physics correctly...&#xD;&#xA;&#xD;&#xA;So my main question is:&#xD;&#xA;&#xD;&#xA;What would be a good combination of libraries to make an online game with? Im sure that many people have good combinations of libraries for making a game.&#xD;&#xA;&#xD;&#xA;The libraries that I would need are ones that fit the criteria of making a simple 3d game(online):&#xD;&#xA;&#xD;&#xA;3D Graphics(including a model loader of some sort(if it works with blender that would be even better. I would also like compatability, If Theres one that fits DirectX(at least 9) and OpenGL, then that would be good)&#xD;&#xA;&#xD;&#xA;2D Graphics(I liked SFML, so it its possible to get something that works with SFML, that would be nice)&#xD;&#xA;&#xD;&#xA;Networking(a way to connect multiple clients to a server/database)&#xD;&#xA;&#xD;&#xA;and Physics(Ive worked with Bullet Physics, but I cant find a model setup that would fit with said physics)&#xD;&#xA;&#xD;&#xA;Also if there are any other libraries that work well with these I would like to know. Any answers would be very helpful. and details would be even nicer =)&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;-Molma" />
  <row Id="30666" PostHistoryTypeId="1" PostId="13767" RevisionGUID="f5e192e9-34bd-4f09-a525-cf1dae742bf8" CreationDate="2011-06-16T20:00:11.157" UserId="6275" Text="What are some good combinations of libraries?" />
  <row Id="30667" PostHistoryTypeId="3" PostId="13767" RevisionGUID="f5e192e9-34bd-4f09-a525-cf1dae742bf8" CreationDate="2011-06-16T20:00:11.157" UserId="6275" Text="&lt;opengl&gt;&lt;c++&gt;&lt;directx9&gt;&lt;sfml&gt;" />
  <row Id="30668" PostHistoryTypeId="2" PostId="13768" RevisionGUID="64d32692-094c-4af4-945a-87ce432885cd" CreationDate="2011-06-16T20:06:36.717" UserId="1101" Text="&gt; But the problem is that the 3D graphics arent working with the Physics correctly...&#xD;&#xA;&#xD;&#xA;Pretty much any pair of graphics and physics libraries will work together. If you haven't managed to get OpenGL graphics and Bullet physics working, you probably just have a bug there which can be fixed." />
  <row Id="30670" PostHistoryTypeId="2" PostId="13769" RevisionGUID="7e50c400-29bc-4a4d-8cb3-fbf97f2a0c12" CreationDate="2011-06-16T20:48:22.547" UserId="1156" Text="I'm just going to go put [Unity][1] out there. It is, bluntly, amazing at everything you put. Except the networking (No idea, I'm afraid), and weaker on the 2D.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://www.ogre3d.org/" />
  <row Id="30671" PostHistoryTypeId="2" PostId="13770" RevisionGUID="28af312c-fb66-4e39-ba24-d2648ba2dcbc" CreationDate="2011-06-16T20:50:38.537" UserId="1156" Text="Very naively and simply, you could check if the player has a y-velocity (velocity, not speed) which is &gt; 0, assuming you're using (0,0) as top left." />
  <row Id="30672" PostHistoryTypeId="5" PostId="13763" RevisionGUID="c018bd40-9d69-41b1-80c8-d624027d378c" CreationDate="2011-06-16T21:06:07.677" UserId="2061" Comment="added 26 characters in body; added 8 characters in body" Text="In cases where you are using singletons or static-classes, 99% of the time what you should really be using is a [game service][1].  Game services are used when you want one instance of a class available to all other classes, but the tight coupling of using a global variable or static class gives you a funny taste.  They don't have the instantiation problems that you've seen, they're more reusable, and they can be [mocked][2] *(if you care about automated unit-testing)*.&#xD;&#xA;&#xD;&#xA;To register a service, you need to give your class its own interface.  Then just call [`Game.Services.AddService()`][3].  To later use that service in another class, call [`Game.Services.GetService()`][4].&#xD;&#xA;&#xD;&#xA;In your case, your class would look something like this:&#xD;&#xA;&#xD;&#xA;    public interface ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;	    void SomeMethod();&#xD;&#xA;		int SomeProperty { get; }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class LevelContentCreation : ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;		private static Dictionary&lt;char, TileCreationInfo&gt; availableTiles =&#xD;&#xA;			CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;		private static List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;		public void SomeMethod() { /*...*/ }&#xD;&#xA;		public int SomeProperty { get; private set; }&#xD;&#xA;		&#xD;&#xA;		/* ... rest of the class ... */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At some point at the start of the program, you'd have to register your service with `Game.Services`.  *I prefer to do this at the start of `LoadContent()`, but some people prefer to register each service in that class's constructor.*&#xD;&#xA;&#xD;&#xA;    /* Main game */&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;	{&#xD;&#xA;	    RegisterServices();&#xD;&#xA;		&#xD;&#xA;		/* ... */&#xD;&#xA;    }&#xD;&#xA;	&#xD;&#xA;	private void RegisterServices()&#xD;&#xA;	{&#xD;&#xA;	    Game.Services.AddService(typeof(ILevelContentCreation), new LevelContentCreation());&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now whenever you want to access your `LevelContentCreation` class in any other class, you would simply do this:&#xD;&#xA;&#xD;&#xA;    ILevelContentCreation levelContentCreation = (ILevelContentCreation) Game.Services.GetService(typeof(ILevelContentCreation));&#xD;&#xA;    levelContentCreation.SomeMethod(); //Tada!&#xD;&#xA;	&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a side note, this paradigm is known as [Inversion of Control][5] (IoC), and is [widely used][6] outside of XNA development as well.  The most popular framework for IoC in .Net is [Ninject][7], which has nicer syntax than the Game.Services methods:&#xD;&#xA;&#xD;&#xA;    Bind&lt;ILevelContentCreation&gt;().To&lt;LevelContentCreation&gt;(); //Ninject equivalent of Services.AddService()&#xD;&#xA;	ILevelContentCreation levelContentCreation = kernel.Get&lt;ILevelContentCreation&gt;(); //Ninject equivalent of Services.GetService()&#xD;&#xA;&#xD;&#xA;It also supports [dependency injection][8], a form of IoC which is slightly more complex, but much nicer to work with.&#xD;&#xA;&#xD;&#xA;[1]: http://www.progware.org/Blog/post/XNA-Game-Development-%28Scenes-and-Game-Services%29.aspx&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;[3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.addservice.aspx&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.getservice.aspx&#xD;&#xA;[5]: http://stackoverflow.com/questions/45191/ioc-explain-and-more-important-when-to-use-it&#xD;&#xA;[6]: http://stackoverflow.com/search?q=ioc&#xD;&#xA;[7]: http://ninject.org/&#xD;&#xA;[8]: https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand" />
  <row Id="30673" PostHistoryTypeId="2" PostId="13771" RevisionGUID="d14c696a-0710-4e98-b8c4-8db660e5b2e4" CreationDate="2011-06-16T21:11:05.940" UserId="8083" Text="I'm trying to build a interface that the user can move his finger around the screen an a list of images moves along a path. The idea is that the images center nevers leaves de path.&#xD;&#xA; &#xD;&#xA;Most of the things I found was about how to animate using CGPath and not about actually using the path as the track to a user movement.&#xD;&#xA;&#xD;&#xA;I need to objects to be tracked on the path even if the user isn't moving his fingers over the path.&#xD;&#xA;&#xD;&#xA;For example (image bellow), if the object is at the beginning of the path and the user touches anywhere on the screen and moves his fingers from left to right I need that the object moves from left to right but following the path, that is, going up as it goes to the right towards the path's end.&#xD;&#xA;&#xD;&#xA;This is the path I've draw, imagine that I'll have a view (any image) that the user can touch and drag it along the path, there's no need to move the finger exactly over the path. If the user move from left to right the image should move from left to right but going up if need following the path.&#xD;&#xA;&#xD;&#xA;![The curved path][1]&#xD;&#xA;&#xD;&#xA;This is how I'm creating the path:&#xD;&#xA;&#xD;&#xA;       CGPoint endPointUp = CGPointMake(315, 124);&#xD;&#xA;        CGPoint endPointDown = CGPointMake(0, 403);&#xD;&#xA;        CGPoint controlPoint1 = CGPointMake(133, 187);&#xD;&#xA;        CGPoint controlPoint2 = CGPointMake(174, 318);&#xD;&#xA;    &#xD;&#xA;        CGMutablePathRef path = CGPathCreateMutable();&#xD;&#xA;        CGPathMoveToPoint(path, NULL, endPointUp.x, endPointUp.y);&#xD;&#xA;        CGPathAddCurveToPoint(path, NULL, controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y, endPointDown.x, endPointDown.y);&#xD;&#xA;&#xD;&#xA;Any idead how can I achieve this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/grmSf.png" />
  <row Id="30674" PostHistoryTypeId="1" PostId="13771" RevisionGUID="d14c696a-0710-4e98-b8c4-8db660e5b2e4" CreationDate="2011-06-16T21:11:05.940" UserId="8083" Text="How to move an UIView along a curved CGPath according to user dragging the view" />
  <row Id="30675" PostHistoryTypeId="3" PostId="13771" RevisionGUID="d14c696a-0710-4e98-b8c4-8db660e5b2e4" CreationDate="2011-06-16T21:11:05.940" UserId="8083" Text="&lt;iphone&gt;&lt;movement&gt;&lt;ios&gt;" />
  <row Id="30676" PostHistoryTypeId="5" PostId="13763" RevisionGUID="daaba043-35dd-4264-8815-b121cfade90c" CreationDate="2011-06-16T21:20:51.653" UserId="2061" Comment="added 19 characters in body" Text="In cases where you are using singletons, static classes, or global variables, 99% of the time what you should really be using is a [game service][1].  Game services are used when you want one instance of a class available to all other classes, but the tight coupling of using a global variable or static class gives you a funny taste.  They don't have the instantiation problems that you've seen, they're more reusable, and they can be [mocked][2] *(if you care about automated unit-testing)*.&#xD;&#xA;&#xD;&#xA;To register a service, you need to give your class its own interface.  Then just call [`Game.Services.AddService()`][3].  To later use that service in another class, call [`Game.Services.GetService()`][4].&#xD;&#xA;&#xD;&#xA;In your case, your class would look something like this:&#xD;&#xA;&#xD;&#xA;    public interface ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;	    void SomeMethod();&#xD;&#xA;		int SomeProperty { get; }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class LevelContentCreation : ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;		private static Dictionary&lt;char, TileCreationInfo&gt; availableTiles =&#xD;&#xA;			CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;		private static List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;		public void SomeMethod() { /*...*/ }&#xD;&#xA;		public int SomeProperty { get; private set; }&#xD;&#xA;		&#xD;&#xA;		/* ... rest of the class ... */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At some point at the start of the program, you'd have to register your service with `Game.Services`.  *I prefer to do this at the start of `LoadContent()`, but some people prefer to register each service in that class's constructor.*&#xD;&#xA;&#xD;&#xA;    /* Main game */&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;	{&#xD;&#xA;	    RegisterServices();&#xD;&#xA;		&#xD;&#xA;		/* ... */&#xD;&#xA;    }&#xD;&#xA;	&#xD;&#xA;	private void RegisterServices()&#xD;&#xA;	{&#xD;&#xA;	    Game.Services.AddService(typeof(ILevelContentCreation), new LevelContentCreation());&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now whenever you want to access your `LevelContentCreation` class in any other class, you would simply do this:&#xD;&#xA;&#xD;&#xA;    ILevelContentCreation levelContentCreation = (ILevelContentCreation) Game.Services.GetService(typeof(ILevelContentCreation));&#xD;&#xA;    levelContentCreation.SomeMethod(); //Tada!&#xD;&#xA;	&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a side note, this paradigm is known as [Inversion of Control][5] (IoC), and is [widely used][6] outside of XNA development as well.  The most popular framework for IoC in .Net is [Ninject][7], which has nicer syntax than the Game.Services methods:&#xD;&#xA;&#xD;&#xA;    Bind&lt;ILevelContentCreation&gt;().To&lt;LevelContentCreation&gt;(); //Ninject equivalent of Services.AddService()&#xD;&#xA;	ILevelContentCreation levelContentCreation = kernel.Get&lt;ILevelContentCreation&gt;(); //Ninject equivalent of Services.GetService()&#xD;&#xA;&#xD;&#xA;It also supports [dependency injection][8], a form of IoC which is slightly more complex, but much nicer to work with.&#xD;&#xA;&#xD;&#xA;[1]: http://www.progware.org/Blog/post/XNA-Game-Development-%28Scenes-and-Game-Services%29.aspx&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;[3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.addservice.aspx&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.getservice.aspx&#xD;&#xA;[5]: http://stackoverflow.com/questions/45191/ioc-explain-and-more-important-when-to-use-it&#xD;&#xA;[6]: http://stackoverflow.com/search?q=ioc&#xD;&#xA;[7]: http://ninject.org/&#xD;&#xA;[8]: https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand" />
  <row Id="30677" PostHistoryTypeId="25" PostId="13762" RevisionGUID="1beff9d6-0fb1-4194-99a6-7c6f786fa153" CreationDate="2011-06-16T21:24:20.500" Comment="http://twitter.com/#!/StackGameDev/status/81472196987453440" />
  <row Id="30678" PostHistoryTypeId="5" PostId="13763" RevisionGUID="2256fb1a-cafa-415f-93db-6db5d096782a" CreationDate="2011-06-16T21:30:38.503" UserId="2061" Comment="deleted 22 characters in body; added 9 characters in body" Text="In cases where you are using singletons, static classes, or global variables, 99% of the time what you should really be using is a [game service][1].  Game services are used when you want one instance of a class available to all other classes, but the tight coupling of the other options gives you a funny taste.  Services also don't have the instantiation problems that you've seen, they're more reusable, and they can be [mocked][2] *(if you care about automated unit-testing)*.&#xD;&#xA;&#xD;&#xA;To register a service, you need to give your class its own interface.  Then just call [`Game.Services.AddService()`][3].  To later use that service in another class, call [`Game.Services.GetService()`][4].&#xD;&#xA;&#xD;&#xA;In your case, your class would look something like this:&#xD;&#xA;&#xD;&#xA;    public interface ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;	    void SomeMethod();&#xD;&#xA;		int SomeProperty { get; }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class LevelContentCreation : ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;		private static Dictionary&lt;char, TileCreationInfo&gt; availableTiles =&#xD;&#xA;			CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;		private static List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;		public void SomeMethod() { /*...*/ }&#xD;&#xA;		public int SomeProperty { get; private set; }&#xD;&#xA;		&#xD;&#xA;		/* ... rest of the class ... */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At some point at the start of the program, you'd have to register your service with `Game.Services`.  *I prefer to do this at the start of `LoadContent()`, but some people prefer to register each service in that class's constructor.*&#xD;&#xA;&#xD;&#xA;    /* Main game */&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;	{&#xD;&#xA;	    RegisterServices();&#xD;&#xA;		&#xD;&#xA;		/* ... */&#xD;&#xA;    }&#xD;&#xA;	&#xD;&#xA;	private void RegisterServices()&#xD;&#xA;	{&#xD;&#xA;	    Game.Services.AddService(typeof(ILevelContentCreation), new LevelContentCreation());&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now whenever you want to access your `LevelContentCreation` class in any other class, you would simply do this:&#xD;&#xA;&#xD;&#xA;    ILevelContentCreation levelContentCreation = (ILevelContentCreation) Game.Services.GetService(typeof(ILevelContentCreation));&#xD;&#xA;    levelContentCreation.SomeMethod(); //Tada!&#xD;&#xA;	&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a side note, this paradigm is known as [Inversion of Control][5] (IoC), and is [widely used][6] outside of XNA development as well.  The most popular framework for IoC in .Net is [Ninject][7], which has nicer syntax than the Game.Services methods:&#xD;&#xA;&#xD;&#xA;    Bind&lt;ILevelContentCreation&gt;().To&lt;LevelContentCreation&gt;(); //Ninject equivalent of Services.AddService()&#xD;&#xA;	ILevelContentCreation levelContentCreation = kernel.Get&lt;ILevelContentCreation&gt;(); //Ninject equivalent of Services.GetService()&#xD;&#xA;&#xD;&#xA;It also supports [dependency injection][8], a form of IoC which is slightly more complex, but much nicer to work with.&#xD;&#xA;&#xD;&#xA;[1]: http://www.progware.org/Blog/post/XNA-Game-Development-%28Scenes-and-Game-Services%29.aspx&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;[3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.addservice.aspx&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.getservice.aspx&#xD;&#xA;[5]: http://stackoverflow.com/questions/45191/ioc-explain-and-more-important-when-to-use-it&#xD;&#xA;[6]: http://stackoverflow.com/search?q=ioc&#xD;&#xA;[7]: http://ninject.org/&#xD;&#xA;[8]: https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand" />
  <row Id="30679" PostHistoryTypeId="5" PostId="13756" RevisionGUID="ded31cfe-208e-4ed3-9bd9-5a94a49b609b" CreationDate="2011-06-16T21:40:56.037" UserId="5495" Comment="added 215 characters in body" Text="I have this &quot;Breakeout style&quot; game.  &#xD;&#xA;&#xD;&#xA;I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like:&#xD;&#xA;&#xD;&#xA;![A circular Breakout game][1]  &#xD;&#xA;&#xD;&#xA;I've managed to get the collision per pixel and my ball &quot;*reflects*&quot; on contact with the blocks with the following math:  &#xD;&#xA;&#xD;&#xA;    Ball.Direction = 2 * (Block.Direction - Ball.Direction) + 180;&#xD;&#xA;&#xD;&#xA;![Image depicting an angle of reflection calculation][2]  &#xD;&#xA;&#xD;&#xA;Where the blue line is the ball direction, and the black line (base line) is the block surface.  &#xD;&#xA;&#xD;&#xA;**Direction** is a angle expressed in radian (that can be convert to degrees, of course).  &#xD;&#xA;The ball is moved by:&#xD;&#xA;&#xD;&#xA;    // Event.ENTER_FRAME&#xD;&#xA;    x += Math.sin(Direction) * Velocity;&#xD;&#xA;    y -= Math.cos(Direction) * Velocity;&#xD;&#xA;&#xD;&#xA;So far, so good.&#xD;&#xA;&#xD;&#xA;My problem comes now, with the pads (the 3 dark and large blocks around the small colored blocks).&#xD;&#xA;&#xD;&#xA;As they turn around, the surface angle changes.  &#xD;&#xA;More than that, the ball should hit the sides too, so, how can I measure the direction of the hit and the new direction of movement of the ball?&#xD;&#xA;&#xD;&#xA;*ps*: If needed, I can supply code and a playable swf.  &#xD;&#xA;&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;Edit&#xD;&#xA;====&#xD;&#xA;&#xD;&#xA;Ok, the problem with angles was solved with **Vectors**, but I still have the problem with sides and back collision.&#xD;&#xA;&#xD;&#xA;I'll open another question for that and link it here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Apd8d.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/811Yi.png" />
  <row Id="30680" PostHistoryTypeId="2" PostId="13772" RevisionGUID="c690921c-9394-4f55-b19d-461b681d4f44" CreationDate="2011-06-16T21:51:58.627" UserId="4828" Text="I want to ask, is there way to load in xna all content from folder ?&lt;br&gt;&#xD;&#xA;For example in my content I have:&lt;br&gt;&lt;br&gt;&#xD;&#xA;Images/hero &lt;br&gt;&#xD;&#xA;Images/car&lt;br&gt;&#xD;&#xA;Images/tree&lt;br&gt;&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;I want to make something like this&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    Dictionary&lt;string,Model&gt; models = new ...&#xD;&#xA;    &#xD;&#xA;    foreach(string name in content.getNames(&quot;Images&quot;))&#xD;&#xA;    {&#xD;&#xA;        models[name] = content.load&lt;Model&gt;(&quot;Images\\&quot; + name);&#xD;&#xA;    }" />
  <row Id="30681" PostHistoryTypeId="1" PostId="13772" RevisionGUID="c690921c-9394-4f55-b19d-461b681d4f44" CreationDate="2011-06-16T21:51:58.627" UserId="4828" Text="Load all content from folder" />
  <row Id="30682" PostHistoryTypeId="3" PostId="13772" RevisionGUID="c690921c-9394-4f55-b19d-461b681d4f44" CreationDate="2011-06-16T21:51:58.627" UserId="4828" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="30683" PostHistoryTypeId="2" PostId="13773" RevisionGUID="32a1af60-a628-4136-ac98-11b4a7526b75" CreationDate="2011-06-16T22:06:50.503" UserId="7710" Text="I can easily rotate sprites using the Draw method. However I would like to simply rotate a Rectangle (the structure) so that I can get the coordinate of the four corners of the rectangle. How can I do that?" />
  <row Id="30684" PostHistoryTypeId="1" PostId="13773" RevisionGUID="32a1af60-a628-4136-ac98-11b4a7526b75" CreationDate="2011-06-16T22:06:50.503" UserId="7710" Text="How to rotate a rectangle?" />
  <row Id="30685" PostHistoryTypeId="3" PostId="13773" RevisionGUID="32a1af60-a628-4136-ac98-11b4a7526b75" CreationDate="2011-06-16T22:06:50.503" UserId="7710" Text="&lt;xna&gt;&lt;rectangles&gt;" />
  <row Id="30686" PostHistoryTypeId="2" PostId="13774" RevisionGUID="72eeeff1-ec0f-4b10-89a6-4912af8a4c5d" CreationDate="2011-06-16T22:10:40.167" UserId="5495" Text="Coming form [this question][1], I'm needing some more help.&#xD;&#xA;&#xD;&#xA;I need some ideas to find out from which side the collision came, and react accordingly.  &#xD;&#xA;Use this image as reference:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The blue lines are the path that some circular object will follow if it collides with the box.  &#xD;&#xA;&#xD;&#xA;Someone knows a way to do it?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/13756/5495&#xD;&#xA;  [2]: http://i.stack.imgur.com/23ve7.png" />
  <row Id="30687" PostHistoryTypeId="1" PostId="13774" RevisionGUID="72eeeff1-ec0f-4b10-89a6-4912af8a4c5d" CreationDate="2011-06-16T22:10:40.167" UserId="5495" Text="2D rectangular object collision - Detect direction" />
  <row Id="30688" PostHistoryTypeId="3" PostId="13774" RevisionGUID="72eeeff1-ec0f-4b10-89a6-4912af8a4c5d" CreationDate="2011-06-16T22:10:40.167" UserId="5495" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;physics&gt;" />
  <row Id="30689" PostHistoryTypeId="2" PostId="13775" RevisionGUID="aa118c52-d603-4af9-9185-29f1b4c96c17" CreationDate="2011-06-16T22:13:23.490" UserId="4828" Text="You can make for all 4 points something like this:&#xD;&#xA;&#xD;&#xA;    public static Vector2 RotateAround(this Vector2 source, Vector2 target, float radians)&#xD;&#xA;     {&#xD;&#xA;     Vector2 fromAround = source - target;&#xD;&#xA;     float postRotationX = (float)(fromAround.X * Math.Cos(radians) - fromAround.Y * Math.Sin(radians));&#xD;&#xA;     float postRotationY = (float)(fromAround.X * Math.Sin(radians) - fromAround.Y * Math.Cos(radians));&#xD;&#xA;     return target + new Vector2(postRotationX, postRotationY);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Code From MSDN**&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector2.aspx" />
  <row Id="30690" PostHistoryTypeId="2" PostId="13776" RevisionGUID="72c6cf27-c063-4197-b754-ebbfd7d05b65" CreationDate="2011-06-16T22:26:32.587" UserId="3929" Text="The Beta version of Microsoft's SDK was just released:  &#xD;&#xA;http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/default.aspx" />
  <row Id="30691" PostHistoryTypeId="16" PostId="13776" RevisionGUID="ef875974-27bb-4006-995e-d922230811bd" CreationDate="2011-06-16T22:26:32.587" UserId="3929" />
  <row Id="30692" PostHistoryTypeId="2" PostId="13777" RevisionGUID="d61f842c-f25a-436f-be14-4d44935b7176" CreationDate="2011-06-16T22:33:20.643" UserId="7804" Text="I usually do it every frame by translating the collision box by one pixel in each direction in turn and see which ones result in collision.&#xD;&#xA;&#xD;&#xA;If you want to do it &quot;properly&quot; and with rotated collision shapes or arbitrary polygons, I suggest reading up on the Separating Axis Theorem. Metanet software (the folks who made the N game) for instance have [an awesome dev article][1] on SAT. They also discuss the physics involved.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="30693" PostHistoryTypeId="2" PostId="13778" RevisionGUID="8283a8d5-612f-4786-a246-704effd04f29" CreationDate="2011-06-16T22:38:48.730" UserId="2061" Text="If these are each separate `DrawableGameComponents`, you should set the [`DrawOrder`][1] property of each component so that they draw in the correct order.&#xD;&#xA;&#xD;&#xA;To make it more manageable as you add more components, the `DrawOrder` should be an `enum`:&#xD;&#xA;&#xD;&#xA;    /* DisplayLayer.cs */&#xD;&#xA;	public enum DisplayLayer&#xD;&#xA;	{&#xD;&#xA;		Background, //back-layer&#xD;&#xA;		Particles,&#xD;&#xA;		Player,&#xD;&#xA;		MenuBack,&#xD;&#xA;		MenuFront //front-layer&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class MyComponent : DrawableGameComponent&#xD;&#xA;	{&#xD;&#xA;	    public MyComponent(Game game) : base(game)&#xD;&#xA;		{&#xD;&#xA;		    this.DrawOrder = DisplayLayer.Background;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		/* etc. */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If this is all being drawn within a single `DrawableGameComponent`, then you should take @Andrew's advice and simply draw them in the correct order.  If for some reason you can't do that, you can still have the clarity of `enum`s when using `layerDepth` by simply normalizing the value of the `enum` to be between 0 and 1:&#xD;&#xA;&#xD;&#xA;	/* DisplayLayer.cs */&#xD;&#xA;	public enum DisplayLayer&#xD;&#xA;	{&#xD;&#xA;		MenuFront, //front-layer&#xD;&#xA;		MenuBack,&#xD;&#xA;		Player,&#xD;&#xA;		Particles,&#xD;&#xA;		Background, //back-layer&#xD;&#xA;		MAX_LAYER   //Do not use this as a layer&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void Draw()&#xD;&#xA;	{&#xD;&#xA;	    spriteBatch.Begin(SpriteSortMode.BackToFront);&#xD;&#xA;		foreach(Thingy thingy in thingys)&#xD;&#xA;			spriteBatch.Draw(/* blah blah */, (float)thingy.DisplayLayer/DisplayLayer.MAX_LAYER);&#xD;&#xA;		spriteBatch.End();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;*(The ordering of the `enum` is reversed because `layerDepth` uses lower numbers for the front-layer rather than the back-layer)*&#xD;&#xA;&#xD;&#xA;[1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.drawablegamecomponent.draworder.aspx" />
  <row Id="30694" PostHistoryTypeId="2" PostId="13779" RevisionGUID="533bacbf-6850-413d-8b1a-ccd12f85b6e4" CreationDate="2011-06-16T23:00:17.647" UserId="7804" Text="There's a great [MSDN page about a useful directory access method][1] and someone's asked [a similar question on StackOverflow][2].&#xD;&#xA;&#xD;&#xA;Basically, find the files that are in that directory, initialise an array of that size and then iterate through those files, loading in the resources. &#xD;&#xA;&#xD;&#xA;**NOTE:** In the StackOverflow question, you should probably use `Content` where they used `contentManager` -- that question is from the olden days and the class may have been made static in XNA 4.0, I'm not entirely sure.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/4cyf24ss.aspx&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4052532/xna-get-an-array-list-of-resources" />
  <row Id="30696" PostHistoryTypeId="5" PostId="13779" RevisionGUID="6d6e873b-4efe-41c1-b501-ea6bc8057f14" CreationDate="2011-06-16T23:32:59.820" UserId="7804" Comment="fixed the facts about the Content property (it's not a static class, it's a property)" Text="There's a great [MSDN page about a useful directory access method][1] and someone's asked [a similar question on StackOverflow][2].&#xD;&#xA;&#xD;&#xA;Basically, find the files that are in that directory, initialise an array of that size and then iterate through those files, loading in the resources. &#xD;&#xA;&#xD;&#xA;**NOTE:** In the StackOverflow question, you should use the `Content` property of the Game class where they used `contentManager` -- that's been updated in XNA 4.0.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/4cyf24ss.aspx&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4052532/xna-get-an-array-list-of-resources" />
  <row Id="30697" PostHistoryTypeId="5" PostId="13735" RevisionGUID="a7b11ca1-fd6c-42bb-89eb-b3431dc943f6" CreationDate="2011-06-17T00:10:52.507" UserId="37" Comment="added 147 characters in body" Text="I'm creating a six player HTML 5 game designed to be played locally ([Red Ice][1]). &#xD;&#xA;&#xD;&#xA;I've previous set up handling 7 Wiimotes using something along the lines of Joy2Key to map each input for each player to a separate keyboard key, but Wiimotes are pretty hard on the hands for these types of games and not very ergonomic so I thought I'd try and get Xbox controller support.&#xD;&#xA;&#xD;&#xA;I don't believe that any simple key mapping solution will work due to the nature of the directional stick.&#xD;&#xA;&#xD;&#xA;My inclination is that this will require a browser plugin and if so I'd prefer to write the plugin for Google Chrome. &#xD;&#xA;&#xD;&#xA;How do I create a Chrome browser plugin to handle multiple Xbox controllers or is there some other way?&#xD;&#xA;&#xD;&#xA;Please do not answer this question saying it can't be done, because it absolutely can.&#xD;&#xA;&#xD;&#xA;EDIT: I don't believe any keymapping/mouse simulating solution will work unless it can reliably distinguish six axis of inputs, one per player.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pixieengine.com/projects/166/fullscreen" />
  <row Id="30698" PostHistoryTypeId="2" PostId="13780" RevisionGUID="7885404d-ac8c-426f-b92e-90fecb750679" CreationDate="2011-06-17T00:18:45.700" UserId="37" Text="I've been using [PixieEngine.com][1]. It's a web based game development IDE that lets you develop and publish games without having to download or set up a development environment.&#xD;&#xA;&#xD;&#xA;[![PixieEngine IDE screenshot][2]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pixieengine.com&#xD;&#xA;  [2]: http://i.stack.imgur.com/mkaJl.png&#xD;&#xA;" />
  <row Id="30699" PostHistoryTypeId="25" PostId="13774" RevisionGUID="78692a0b-a87e-4542-8834-98d35c09b423" CreationDate="2011-06-17T00:24:21.467" Comment="http://twitter.com/#!/StackGameDev/status/81517499211980800" />
  <row Id="30700" PostHistoryTypeId="2" PostId="13781" RevisionGUID="d9516e45-dad3-4f3d-8d49-0a8a8c086e21" CreationDate="2011-06-17T00:43:48.777" UserId="2111" Text="Since this is based on your other question I'll give a solution for when the rectangle is axis-aligned.&#xD;&#xA;&#xD;&#xA;First, you build up you current object's rectangle with the following values:&#xD;&#xA;&#xD;&#xA;    int boxLeft = box.X;&#xD;&#xA;    int boxRight = boxLeft + box.Width;&#xD;&#xA;    int boxTop = box.Y;&#xD;&#xA;    int boxBottom = boxTop + box.Height;&#xD;&#xA;&#xD;&#xA;Next, you must have the old object's position (which you can store on each object or simply pass to a function) to create the old object's rectangle (when it was not colliding):&#xD;&#xA;&#xD;&#xA;    int oldBoxLeft = box.OldX;&#xD;&#xA;    int oldBoxRight = oldBoxLeft + box.Width;&#xD;&#xA;    int oldBoxTop = box.OldY;&#xD;&#xA;    int oldBoxBottom = oldBoxTop + box.Height;&#xD;&#xA;&#xD;&#xA;Now, to know where the collision was from, you must find the side where the old position was not in the collision area and where its new position is. Because, when you think of it, this is what happens when you collide: a side that was not colliding enters an other rectangle.&#xD;&#xA;&#xD;&#xA;Here is how you could do so (these functions assume that there is a collision. They should not be called if there is no collision):&#xD;&#xA;&#xD;&#xA;     bool collidedFromLeft(Object otherObj)&#xD;&#xA;    {&#xD;&#xA;        return oldBoxRight &lt; otherObj.Left &amp;&amp; // was not colliding&#xD;&#xA;               boxRight &gt;= otherObj.Left;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Rince and repeat.&#xD;&#xA;&#xD;&#xA;    bool collidedFromRight(Object otherObj)&#xD;&#xA;    {&#xD;&#xA;        return oldBoxLeft &gt;= otherObj.Right &amp;&amp; // was not colliding&#xD;&#xA;               boxLeft &lt; otherObj.Right;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    bool collidedFromTop(Object otherObj)&#xD;&#xA;    {&#xD;&#xA;        return oldBoxBottom &lt; otherObj.Top &amp;&amp; // was not colliding&#xD;&#xA;               boxBottom &gt;= otherObj.Top;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    bool collidedFromBottom(Object otherObj)&#xD;&#xA;    {&#xD;&#xA;        return oldBoxTop &gt;= otherObj.Bottom &amp;&amp; // was not colliding&#xD;&#xA;               boxTop &lt; otherObj.Bottom;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, for the actual use with the collision response from the other question:&#xD;&#xA;&#xD;&#xA;    if (collidedFromTop(otherObj) || collidedFromBottom(otherObj))&#xD;&#xA;        obj.Velocity.Y = -obj.Velocity.Y;&#xD;&#xA;    if (collidedFromLeft(otherObj) || collidedFromRight(otherObj))&#xD;&#xA;        obj.Velocity.X = -obj.Velocity.X;&#xD;&#xA;&#xD;&#xA;Again, this may not be the best solution but that's the way I usually go for collision detection." />
  <row Id="30701" PostHistoryTypeId="2" PostId="13782" RevisionGUID="576511e7-25a2-4fe8-9364-4fdac237b892" CreationDate="2011-06-17T01:00:12.943" UserId="6813" Text="As the question is partially identical to [this question][1], I will re-use some parts of my answer in order to try answering your question.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Lets define a context and some variables to make the following explanation more understandable. The representation form that we will use here probably doesn't fit the form of your own datas but it should be simpler to understand this way (indeed you can use the following methods using others kind of representations once you understand the principle)&#xD;&#xA;&#xD;&#xA;So, we will consider an **Axis Aligned Bounding Box** (or an **Oriented Bounded Box**) and a **moving Entity**.&#xD;&#xA;&#xD;&#xA;- The Bounding Box is composed of 4 sides, and we will define each one as:&lt;br&gt;Side1 = **[x1,y1,x2,y2]** (two points [x1,y1] and [x2,y2])&#xD;&#xA;&#xD;&#xA;- The moving Entity is defined as a velocity vector (position+speed):&lt;br&gt;a position **[posX, posY]** and a speed **[speedX, speedY]**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can determine which side of an AABB/OBB is hit by a vector using the following method:&#xD;&#xA;&#xD;&#xA;- 1/ Find the intersection points between the infinite lines passing though the four sides of the AABB and the infinite line passing through the entity position (pre-collision) which use the entity speed vector as slop. (You can either find a collision point or an undefined number, which corresponds to parallels or overlapping lines)&#xD;&#xA;&#xD;&#xA;- 2/ Once you know the intersection points (if they exist) you can search for those that are into the segment bounds.&#xD;&#xA;&#xD;&#xA;- 3/ Finally, if there is still multiple points on the list (the velocity vector can pass through multiple sides), you can search for the closest point from the entity origin using the magnitudes of the vector from the intersection to the entity origin.&#xD;&#xA;&#xD;&#xA;Then you can determine the angle of collision using a simple dot product.&#xD;&#xA;&#xD;&#xA;- 4/ Find the angle between of collision using a dot product of the entity (probably a ball?) vector with the hit side vector.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;More details:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- 1/ Find intersections&#xD;&#xA; - a / Determine the implicit lines ( Ax + Bx = D ) using their parametric forms ( P(t) = Po + tD ).&#xD;&#xA;&gt; Point origin: Po = [posX, posY] &lt;br&gt;&#xD;&#xA;&gt; Direction vector: D = [speedX, speedY]&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **A** = D.y = **speedY**&lt;br&gt;&#xD;&#xA;&gt; **B** = -D.x = **-speedX**&lt;br&gt;&#xD;&#xA;&gt; **D** = (Po.x * D.y) - (Po.y * D.x) = **(posX*speedY) - (posY*speedX)**&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; Ax + By = D &lt;====&gt; (speedY*x) + (-speedX*y) = (posX*speedY) - (posY*speedX)&#xD;&#xA;&#xD;&#xA;     **I used the entity point values to illustrate the method, but this is exactly the same method to determine the 4 side implicit lines of the bounding box** (Use Po = [x1,y1] and D = [ x2-x1 ; y2-y1 ] instead).&#xD;&#xA;&#xD;&#xA;  - b / Next, to find the intersection of two implicit lines we can solve the following system:&#xD;&#xA;&#xD;&#xA;     &gt; A1x + B1x = D1   &lt;== Line passing through the entity point with the speed vector as slop.&lt;br&gt;&#xD;&#xA;     &gt; A2x + B2x = D2   &lt;== One of the lines passing through the AABB sides.&#xD;&#xA;&#xD;&#xA;     which yields the following coordinates for the interception:&#xD;&#xA;&#xD;&#xA;     &gt; Interception **x** = ((&lt;b&gt;B&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1) - (&lt;b&gt;B&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&lt;br&gt;&#xD;&#xA;     &gt; Interception **y** = ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&#xD;&#xA;&#xD;&#xA;     If the denominator ((A1*B2) - (A2*B1)) equals zero, then the both lines are parallels or overlapping, otherwise you should find an intersection.&#xD;&#xA;&#xD;&#xA;- 2/ Test for the segment bounds. As this is straightforward to verify, there is no needs for more details. &#xD;&#xA;&#xD;&#xA;- 3/ Search for the closest point. If there is still multiple points on the list, we can find which side is the closest to the entity origin point.&#xD;&#xA;  - a / Determine the vector going from the intersection point to the entity origin point&#xD;&#xA;  &#xD;&#xA;     &gt; V = Po - Int = [Po.x - Int.x ; Po.y - Int.y ]&#xD;&#xA;  - b / Compute the vector magnitude&#xD;&#xA;&#xD;&#xA;     &gt; ||V|| = sqrt( V.x² + V.y² )&#xD;&#xA;  - c / find the smallest one.&#xD;&#xA;&#xD;&#xA;- 4/ Now that you know which side will be hit, you can determine the angle using a dot product.&#xD;&#xA;  - a / Let **S = [ x2-x1 ; y2-y1 ]** be the side vector that will be hit and **E = [ speedX ; speedY ]** be the entity velocity vector.&lt;br&gt;&lt;br&gt;Using the vector dot product rule we know that&#xD;&#xA;&gt; S·E = Sx*Ex + Sy*Ey&lt;br&gt;and&lt;br&gt;&#xD;&#xA;&gt; S·E = ||S|| ||E|| cos θ&#xD;&#xA;&#xD;&#xA;     So we can determine θ by manipulating a bit this equation...&#xD;&#xA;&gt; cos θ = (S·E) / (||S|| ||E||)&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **θ = acos( (S·E) / (||S|| ||E||) )**&#xD;&#xA;&#xD;&#xA;     with &#xD;&#xA;&gt; **S·E** = Sx * Ex + Sy * Ey&lt;br&gt;&#xD;&#xA;&gt; **||S||** = sqrt( Sx² + Sy² )&lt;br&gt;&#xD;&#xA;&gt; **||E||** = sqrt( Ex² + Ey² )&lt;br&gt;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Note: As I said in the other question thread, this is probably not the most efficient way to do it, but it can probably help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://gamedev.stackexchange.com/questions/13080/which-axis-aligned-line-does-an-aabb-collide-with-first/13141#13141" />
  <row Id="30702" PostHistoryTypeId="5" PostId="13782" RevisionGUID="e8215565-ee9e-4cd4-bbb9-a33eefeefc8b" CreationDate="2011-06-17T01:06:00.090" UserId="6813" Comment="added 75 characters in body; added 103 characters in body; deleted 8 characters in body" Text="As the question is partially identical to [this question][1], I will re-use some parts of my answer in order to try answering your question.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Lets define a context and some variables to make the following explanation more understandable. The representation form that we will use here probably doesn't fit the form of your own datas but it should be simpler to understand this way (indeed you can use the following methods using others kind of representations once you understand the principle)&#xD;&#xA;&#xD;&#xA;So, we will consider an **Axis Aligned Bounding Box** (or an **Oriented Bounded Box**) and a **moving Entity**.&#xD;&#xA;&#xD;&#xA;- The Bounding Box is composed of 4 sides, and we will define each one as:&lt;br&gt;Side1 = **[x1,y1,x2,y2]** (two points [x1,y1] and [x2,y2])&#xD;&#xA;&#xD;&#xA;- The moving Entity is defined as a velocity vector (position+speed):&lt;br&gt;a position **[posX, posY]** and a speed **[speedX, speedY]**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;You can determine which side of an AABB/OBB is hit by a vector using the following method:&#xD;&#xA;&#xD;&#xA;- 1/ Find the intersection points between the infinite lines passing though the four sides of the AABB and the infinite line passing through the entity position (pre-collision) which use the entity speed vector as slop. (You can either find a collision point or an undefined number, which corresponds to parallels or overlapping lines)&#xD;&#xA;&#xD;&#xA;- 2/ Once you know the intersection points (if they exist) you can search for those that are into the segment bounds.&#xD;&#xA;&#xD;&#xA;- 3/ Finally, if there is still multiple points on the list (the velocity vector can pass through multiple sides), you can search for the closest point from the entity origin using the magnitudes of the vector from the intersection to the entity origin.&#xD;&#xA;&#xD;&#xA;Then you can determine the angle of collision using a simple dot product.&#xD;&#xA;&#xD;&#xA;- 4/ Find the angle between of collision using a dot product of the entity (probably a ball?) vector with the hit side vector.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;More details:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- 1/ Find intersections&#xD;&#xA; - a / Determine the implicit lines ( Ax + Bx = D ) using their parametric forms ( P(t) = Po + tD ).&#xD;&#xA;&gt; Point origin: Po = [posX, posY] &lt;br&gt;&#xD;&#xA;&gt; Direction vector: D = [speedX, speedY]&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **A** = D.y = **speedY**&lt;br&gt;&#xD;&#xA;&gt; **B** = -D.x = **-speedX**&lt;br&gt;&#xD;&#xA;&gt; **D** = (Po.x * D.y) - (Po.y * D.x) = **(posX*speedY) - (posY*speedX)**&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; Ax + By = D &lt;====&gt; (speedY*x) + (-speedX*y) = (posX*speedY) - (posY*speedX)&#xD;&#xA;&#xD;&#xA;     **I used the entity point values to illustrate the method, but this is exactly the same method to determine the 4 side implicit lines of the bounding box** (Use Po = [x1,y1] and D = [ x2-x1 ; y2-y1 ] instead).&#xD;&#xA;&#xD;&#xA;  - b / Next, to find the intersection of two implicit lines we can solve the following system:&#xD;&#xA;&#xD;&#xA;     &gt; A1x + B1x = D1   &lt;== Line passing through the entity point with the speed vector as slop.&lt;br&gt;&#xD;&#xA;     &gt; A2x + B2x = D2   &lt;== One of the lines passing through the AABB sides.&#xD;&#xA;&#xD;&#xA;     which yields the following coordinates for the interception:&#xD;&#xA;&#xD;&#xA;     &gt; Interception **x** = ((&lt;b&gt;B&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1) - (&lt;b&gt;B&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&lt;br&gt;&#xD;&#xA;     &gt; Interception **y** = ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;D&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;D&lt;/b&gt;1)) / ((&lt;b&gt;A&lt;/b&gt;1*&lt;b&gt;B&lt;/b&gt;2) - (&lt;b&gt;A&lt;/b&gt;2*&lt;b&gt;B&lt;/b&gt;1))&#xD;&#xA;&#xD;&#xA;     If the denominator ((A1*B2) - (A2*B1)) equals zero, then the both lines are parallels or overlapping, otherwise you should find an intersection.&#xD;&#xA;&#xD;&#xA;- 2/ Test for the segment bounds. As this is straightforward to verify, there is no needs for more details. &#xD;&#xA;&#xD;&#xA;- 3/ Search for the closest point. If there is still multiple points on the list, we can find which side is the closest to the entity origin point.&#xD;&#xA;  - a / Determine the vector going from the intersection point to the entity origin point&#xD;&#xA;  &#xD;&#xA;     &gt; V = Po - Int = [Po.x - Int.x ; Po.y - Int.y ]&#xD;&#xA;  - b / Compute the vector magnitude&#xD;&#xA;&#xD;&#xA;     &gt; ||V|| = sqrt( V.x² + V.y² )&#xD;&#xA;  - c / find the smallest one.&#xD;&#xA;&#xD;&#xA;- 4/ Now that you know which side will be hit, you can determine the angle using a dot product.&#xD;&#xA;  - a / Let **S = [ x2-x1 ; y2-y1 ]** be the side vector that will be hit and **E = [ speedX ; speedY ]** be the entity velocity vector.&lt;br&gt;&lt;br&gt;Using the vector dot product rule we know that&#xD;&#xA;&gt; S·E = Sx*Ex + Sy*Ey&lt;br&gt;and&lt;br&gt;&#xD;&#xA;&gt; S·E = ||S|| ||E|| cos θ&#xD;&#xA;&#xD;&#xA;     So we can determine θ by manipulating a bit this equation...&#xD;&#xA;&gt; cos θ = (S·E) / (||S|| ||E||)&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; **θ = acos( (S·E) / (||S|| ||E||) )**&#xD;&#xA;&#xD;&#xA;     with &#xD;&#xA;&gt; **S·E** = Sx * Ex + Sy * Ey&lt;br&gt;&#xD;&#xA;&gt; **||S||** = sqrt( Sx² + Sy² )&lt;br&gt;&#xD;&#xA;&gt; **||E||** = sqrt( Ex² + Ey² )&lt;br&gt;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Note: As I said in the other question thread, this is probably not the most efficient nor the most simple way to do it, this is just what's come into mind, and some part of the maths could maybe help.&#xD;&#xA;&#xD;&#xA;I didn't verified with a concrete OBB example (I did with an AABB) but it should works too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://gamedev.stackexchange.com/questions/13080/which-axis-aligned-line-does-an-aabb-collide-with-first/13141#13141" />
  <row Id="30703" PostHistoryTypeId="2" PostId="13783" RevisionGUID="1b61c0dc-6552-4106-b55d-d9146a58dcb9" CreationDate="2011-06-17T01:21:10.350" UserId="1923" Text="You can't rotate a Microsoft.Xna.Framework.Rectangle. It is by nature an axis aligned structure only. &#xD;&#xA;&#xD;&#xA;What do you hope to do with the corners that you want to find? Maybe we could suggest a good way to accomplish your goal.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30704" PostHistoryTypeId="2" PostId="13784" RevisionGUID="e86b96c3-8266-46dc-9f10-e1cf8ebeae3c" CreationDate="2011-06-17T01:58:32.587" UserId="7640" Text="Hey so i'm making a pong game with SFML and in the process made a function that takes a Time, Speed, Angle of movement, buffer for the movement on the X axis, and buffer for the movement on the Y axis. &#xD;&#xA;&#xD;&#xA;I then implemented this function into my custom mySprite class, more specifically into it's update() function which updates its Position using the above function to calculate its new position. &#xD;&#xA;&#xD;&#xA;However i'm worried that giving the function the FrameTime() of the Window (the time since the frame was last updated) is not the best choice as the sprites might start jumping around if there's lag between frame updates or other problems.....&#xD;&#xA;&#xD;&#xA;Finally I would like to know how my organization, planning, etc is..  **Thanks!**&#xD;&#xA;&#xD;&#xA;my Code:&#xD;&#xA;&#xD;&#xA;    #include&lt;SFML/Graphics.hpp&gt;&#xD;&#xA;    #include&lt;SFML/System.hpp&gt;&#xD;&#xA;    #include&lt;cmath&gt;&#xD;&#xA;    #include&lt;vector&gt;&#xD;&#xA;    #    define M_PI 3.14159265358979323846 &#xD;&#xA;    &#xD;&#xA;    sf::RenderWindow Window;&#xD;&#xA;    &#xD;&#xA;    template&lt;typename T&gt; &#xD;&#xA;    void CalculateMove(T Time, T Speed, T Angle, T&amp; buffX, T&amp; buffY)&#xD;&#xA;    {	//determine what quadrant of circle we're in&#xD;&#xA;    	unsigned int  Quadrant= 1;&#xD;&#xA;    	if(Angle&gt;90)  Quadrant= 2;&#xD;&#xA;    	if(Angle&gt;180) Quadrant= 3;&#xD;&#xA;    	if(Angle&gt;270) Quadrant= 4;&#xD;&#xA;    &#xD;&#xA;    	//anything above 90 would be impossible triangle&#xD;&#xA;    	Angle= (float)(Angle-(int)Angle)+(float)((int)Angle%90); &#xD;&#xA;    &#xD;&#xA;    	// calculates x and y based on angle and Hypotenuse.02433&#xD;&#xA;    	if((int)Angle!=0){&#xD;&#xA;    		buffX= sin(Angle / 180 * M_PI)/ (1.f/(Speed*Time));&#xD;&#xA;    		buffY= sin((180-Angle-90)/ 180 * M_PI)/ (1.f/(Speed*Time));}&#xD;&#xA;    	&#xD;&#xA;    	else{// Movement is a straight line on X or Y axis&#xD;&#xA;    		if(Quadrant==0 || Quadrant==2) buffX= Speed*Time;&#xD;&#xA;    		if(Quadrant==1 || Quadrant==4) buffY= Speed*Time;}&#xD;&#xA;    &#xD;&#xA;    	//Quadrant Factor (positive or negative movement on the axis)&#xD;&#xA;    	switch(Quadrant){&#xD;&#xA;    	case 1: break;&#xD;&#xA;    	case 2: buffX=-buffX; break;&#xD;&#xA;    	case 3: buffX=-buffX; buffY=-buffY; break;&#xD;&#xA;    	case 4: buffY=-buffY; break;}&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    /////////////////////////////////////////	Mysprite	////////////////////////////////&#xD;&#xA;    class mySprite : public sf::Sprite&#xD;&#xA;    {&#xD;&#xA;    private:&#xD;&#xA;    	float velocity;&#xD;&#xA;    	float angle;&#xD;&#xA;    &#xD;&#xA;    public:&#xD;&#xA;    	// all the values needed by the base class sprite();&#xD;&#xA;    	mySprite(&#xD;&#xA;    		const sf::Image&amp; Img, &#xD;&#xA;    		const sf::Vector2f&amp; Position = sf::Vector2f(0, 0), &#xD;&#xA;    		const sf::Vector2f&amp; Scale = sf::Vector2f(1, 1), &#xD;&#xA;    		float Rotation = 0.f, &#xD;&#xA;    		const float Angle= 0.f, &#xD;&#xA;    		const float Velocity= 0.f, &#xD;&#xA;    		const sf::Color&amp; Col = sf::Color(255, 255, 255, 255)):&#xD;&#xA;    	  Sprite(Img, Position, Scale, Rotation, Col){&#xD;&#xA;    		angle= Angle;&#xD;&#xA;    		velocity= Velocity;};&#xD;&#xA;    &#xD;&#xA;    	float Velocity(){return velocity;};&#xD;&#xA;    	void SetVelocity(float newVelocity){velocity=newVelocity;};&#xD;&#xA;    	float Angle(){return angle;};&#xD;&#xA;    	void SetAngle(float newAngle){angle=newAngle;};&#xD;&#xA;    &#xD;&#xA;    	void Update(){ &#xD;&#xA;    		float frameTime= Window.GetFrameTime();&#xD;&#xA;    		float X=0,Y=0;&#xD;&#xA;    		CalculateMove(frameTime,velocity,angle,X,Y);&#xD;&#xA;    		Move(X,-Y);&#xD;&#xA;    	};&#xD;&#xA;    &#xD;&#xA;    	void Reflect(float CollAngle){&#xD;&#xA;    		SetRotation(-GetRotation());&#xD;&#xA;    		angle=-angle;&#xD;&#xA;    		//TODO: factor in the collision angle&#xD;&#xA;    	};&#xD;&#xA;    };" />
  <row Id="30705" PostHistoryTypeId="1" PostId="13784" RevisionGUID="e86b96c3-8266-46dc-9f10-e1cf8ebeae3c" CreationDate="2011-06-17T01:58:32.587" UserId="7640" Text="my SFML sprite Move() function: FeedBack?" />
  <row Id="30706" PostHistoryTypeId="3" PostId="13784" RevisionGUID="e86b96c3-8266-46dc-9f10-e1cf8ebeae3c" CreationDate="2011-06-17T01:58:32.587" UserId="7640" Text="&lt;c++&gt;&lt;graphics&gt;&lt;math&gt;&lt;sfml&gt;" />
  <row Id="30707" PostHistoryTypeId="5" PostId="12852" RevisionGUID="3038ef5a-c8c5-4e66-bb03-1af6c7f9eb52" CreationDate="2011-06-17T02:05:16.260" UserId="2698" Comment="Decoupled this answer from variable time stepping." Text="No, frame rate should not affect the speed - the gameplay will hinge entirely on their video performance, which is disastrous (even if you limit the speed, you can't control people whose systems will run the game at half speed).&#xD;&#xA;&#xD;&#xA;You're experiencing this problem because you did something wrong: Your update/render routines run one after the other as fast as possible, with objects updating on a per-call basis (thus when the call speed deviates, so does theirs).&#xD;&#xA;&#xD;&#xA;### A time-based approach&#xD;&#xA;&#xD;&#xA;The correct way to do this is to update objects on a _per-second_ basis.&#xD;&#xA;&#xD;&#xA;Consider a bullet for instance: Right now it probably knows how much it needs to move per frame. You need to turn this into how much it moves _per second_. How you do that is actually not too complicated.&#xD;&#xA;&#xD;&#xA;First, your bullet's going to be updated more than once per second, so we need to actually update it every few milliseconds. Each time you update your physics engine, a certain number of milliseconds have passed since the last update: this is called the _delta time_, normally _dt_ for short. The dt is determined _before_ updating all objects, then all objects update using the same dt in order to keep in synch. The dt is generally passed as an argument to each object in its update call.&#xD;&#xA;&#xD;&#xA;In fixed-step physics, the dt is a fixed number, whereas in variable-step physics, the dt varies depending on the actual amount of time since the last update (hence their names).&#xD;&#xA;&#xD;&#xA;That brings us back to your bullet. It's been told to update with a dt of 16 milliseconds, for a physics engine updated 60 times per second: if the bullet moves 12 metres per second, you move it `(16.0/1000.0) * 12.0` metres in this update." />
  <row Id="30708" PostHistoryTypeId="5" PostId="13693" RevisionGUID="d4a905af-ab2d-47ce-b2b7-38558c390fdb" CreationDate="2011-06-17T02:22:43.390" UserId="8066" Comment="added 170 characters in body" Text="I have a missile that is shot from a ship at an angle, the missile then turns towards the target in an arc with a given turn radius. How do I determine the point on the arc when I need to start turning so the missile is heading straight for the target?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;What I need to do before I launch the missiles is calculate and draw the flight paths. So in the attached example the launch vehicle has a heading of 90 deg and the targets are behind it. Both missiles are launched at a relative heading of -45deg or + 45 deg to the launch vehicle's heading. The missiles initially turn towards the target with a known turn radius. I have to calculate the point at which the turn takes the missile to heading at which it will turn to directly attack the target. Obviously if the target is at or near 45 degrees then there is no initial turn the missile just goes straight for the target.&#xD;&#xA;&#xD;&#xA;After the missile is launched the map will also show the missile tracking on this line as indication of its flight path.&#xD;&#xA; &#xD;&#xA;Apparently I can't post an image yet!&#xD;&#xA;&#xD;&#xA;What I am doing is working on a simulator which mimics operational software. So I need to draw the calculated flight path before I allow the missile to be launched.&#xD;&#xA;" />
  <row Id="30709" PostHistoryTypeId="2" PostId="13785" RevisionGUID="f171ccdc-d5a4-4061-9c13-f74341c2c422" CreationDate="2011-06-17T02:38:28.403" UserId="2061" Text="One way would be to rotate the world around your rectangle.  &quot;The world&quot; in this case is only the objects you care about:  the rectangle, and the ball.  You rotate the rectangle around its center until its bounds are aligned with the x-/y-axes, then you rotate the ball by the same amount.&#xD;&#xA;&#xD;&#xA;**The important point here is that you rotate the ball around the rectangle's center, not its own.**&#xD;&#xA;&#xD;&#xA;Then you can easily test for collision just like you would with any other non-rotated rectangle.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Another option is to treat the rectangle as four distinct line-segments, and test for collision with each of them separately.  This allows you to test for collision *and* figure out which side was collided at the same time." />
  <row Id="30710" PostHistoryTypeId="2" PostId="13786" RevisionGUID="7cae1515-239f-4833-b2f8-7e3d0d2e25a0" CreationDate="2011-06-17T02:43:58.080" UserId="1167" Text="For the question about how to stop jittery movement because of frame length, what you might consider doing is rather than feed the time step directly to the update function choose a fixed time step, like this:&#xD;&#xA;&#xD;&#xA;    void Update(){ &#xD;&#xA;        static float frameTime += Window.GetFrameTime();&#xD;&#xA;        float X=0,Y=0;&#xD;&#xA;        while (frameTime &gt;= TIME_STEP)&#xD;&#xA;        {&#xD;&#xA;            CalculateMove(TIME_STEP,velocity,angle,X,Y);&#xD;&#xA;            Move(X,-Y);&#xD;&#xA;            frametime -= TIME_STEP;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;(I wouldn't localize this to just the sprite though, I would do this in the main game update loop and have it apply to everything that updates)" />
  <row Id="30711" PostHistoryTypeId="2" PostId="13787" RevisionGUID="0980c827-3d0e-4f80-9cce-82dc419cb86d" CreationDate="2011-06-17T02:46:01.280" UserId="3175" Text="I feel like you're solving the wrong problem here.  A real-world missile isn't going to worry about where to turn, it's simply going to turn until it's pointed at it's target.  The only where-to calculation involved is when to start bringing the controls back to neutral as a real-world missile can't instantly change it's turn rate.  That calculation will take only the missile's indicated airspeed as an input value and I would think would be precalculated." />
  <row Id="30712" PostHistoryTypeId="2" PostId="13788" RevisionGUID="0a029d00-b68c-4db2-bffc-59564936d8a7" CreationDate="2011-06-17T02:49:24.303" UserId="6450" Text="I am currently doing some work in cocos2d-x and am thinking about using their box2d implementation for things like collision detection (but not necessarily response), range detection, and other things like that, which are not strictly physics based.&#xD;&#xA;&#xD;&#xA;Is it worth doing this?  or would I be better off just writing a simple system that does checks based on location/size of my objects?" />
  <row Id="30713" PostHistoryTypeId="1" PostId="13788" RevisionGUID="0a029d00-b68c-4db2-bffc-59564936d8a7" CreationDate="2011-06-17T02:49:24.303" UserId="6450" Text="Worth using Box2d for collision but not physics?" />
  <row Id="30714" PostHistoryTypeId="3" PostId="13788" RevisionGUID="0a029d00-b68c-4db2-bffc-59564936d8a7" CreationDate="2011-06-17T02:49:24.303" UserId="6450" Text="&lt;box2d&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="30715" PostHistoryTypeId="2" PostId="13789" RevisionGUID="79e06dc6-b5f6-45a4-b621-26e19a52e501" CreationDate="2011-06-17T02:52:31.213" UserId="3874" Text="Lets say, to simplify the problem of online games a bit, my goal would be to run a near identical simulation on multiple computers in sync. Would sending commands be a good idea?&#xD;&#xA;&#xD;&#xA;Now if only sending commands is not good, should all the physics entities be sent every half second or so?&#xD;&#xA;&#xD;&#xA;I'm wondering this because my game will essentially be a Box2D fighting game. Players can also spawn items, which must be added to the Box2D world.&#xD;&#xA;&#xD;&#xA;What I'm wondering is how much and what kind of information should I send over the server?&#xD;&#xA;&#xD;&#xA;Should I simply send key presses, and every half second snap back dynamic object positions to where the server thinks they should be?&#xD;&#xA;&#xD;&#xA;Any helpful tips / articles regarding this would be a great help!&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="30716" PostHistoryTypeId="1" PostId="13789" RevisionGUID="79e06dc6-b5f6-45a4-b621-26e19a52e501" CreationDate="2011-06-17T02:52:31.213" UserId="3874" Text="Bringing a Box2D, Physics Enabled game Online?" />
  <row Id="30717" PostHistoryTypeId="3" PostId="13789" RevisionGUID="79e06dc6-b5f6-45a4-b621-26e19a52e501" CreationDate="2011-06-17T02:52:31.213" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;physics&gt;&lt;network&gt;" />
  <row Id="30718" PostHistoryTypeId="2" PostId="13790" RevisionGUID="49b096a9-e946-41e7-87db-4ca9aedb0321" CreationDate="2011-06-17T02:53:22.670" UserId="5899" Text="All of your calculations must be implemented independently of time, the frameTime is the correct form to do this. There are different forms to calculate this elapsed time, but you don't worry about this now. With the frameTime you calculates the desired next position of the ball and then you need to calculate collisions and adjust the position if it's necessary.&#xD;&#xA;&#xD;&#xA;About the code:&#xD;&#xA;&#xD;&#xA;1.- Decide a convention to the variable names and follow it. &#xD;&#xA;&#xD;&#xA;&quot;Time&quot; has the first letter is uppercase unlike buffX&#xD;&#xA;&#xD;&#xA;in c++ usually the first letter of variables is lowercase&#xD;&#xA;&#xD;&#xA;2.- Do you think that the function CalculateMove needs to be a template?&#xD;&#xA;&#xD;&#xA;I don't think that the type of the parameters will be different to float in the game. If it don't needed, don't use it.&#xD;&#xA;&#xD;&#xA;3.- For the cast conversions is better use static_cast&lt;Type&gt;( variable ) form.&#xD;&#xA;&#xD;&#xA;Because it's more clear and it can be searched easily.&#xD;&#xA;&#xD;&#xA;4.- In c++ the class names usually begins with uppercase.&#xD;&#xA;&#xD;&#xA;5.- The constructor has a lot of parameters.&#xD;&#xA;&#xD;&#xA;It's better declare a structure with these parameters and pass it by const reference to the constructor. In addition, the constructor of the structure can have the default parameters.&#xD;&#xA;&#xD;&#xA;Like:&#xD;&#xA;&#xD;&#xA;    struct SpriteParams&#xD;&#xA;    {&#xD;&#xA;          float          m_rotation;&#xD;&#xA;          float          m_angle;&#xD;&#xA;&#xD;&#xA;          SpriteParams()&#xD;&#xA;              : m_rotation( 0.f )&#xD;&#xA;              , m_angle( 0.f )&#xD;&#xA;          {}&#xD;&#xA;     };&#xD;&#xA;&#xD;&#xA;     // The mySprite constructor&#xD;&#xA;     MySprite::MySprite( const SpriteParams&amp; params );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;6.- Are you sure that mySprite must inherit from Sprite?&#xD;&#xA;&#xD;&#xA;If this class is modelling a paddle, the class must be a paddle and contains a graphics representation ( the sprite )&#xD;&#xA;&#xD;&#xA;    class Paddle&#xD;&#xA;    {&#xD;&#xA;         public:&#xD;&#xA;             void update();&#xD;&#xA;&#xD;&#xA;         private:&#xD;&#xA;             sf::Sprite  m_sprite;&#xD;&#xA;    };" />
  <row Id="30719" PostHistoryTypeId="2" PostId="13791" RevisionGUID="0982e589-8fa2-4dbe-840f-d47a35aa8e9d" CreationDate="2011-06-17T03:24:03.133" UserId="7173" Text="http://create.msdn.com/en-US/sample/contentmanifestextensions&#xD;&#xA;&#xD;&#xA;It's a tutorial about loading content at runtime.&#xD;&#xA;It shows how to generate a list automatically by using the content pipeline." />
  <row Id="30720" PostHistoryTypeId="25" PostId="13789" RevisionGUID="c37e263a-72a2-48aa-ad9d-aff94330132f" CreationDate="2011-06-17T03:24:22.137" Comment="http://twitter.com/#!/StackGameDev/status/81562799427424256" />
  <row Id="30721" PostHistoryTypeId="5" PostId="13790" RevisionGUID="ef1d1880-e5dd-48fd-801a-0361fa0103f4" CreationDate="2011-06-17T04:03:45.300" UserId="5899" Comment="deleted 3 characters in body" Text="All of your calculations must be implemented independently of time, the frameTime is the correct form to do this. There are different forms to calculate this elapsed time, but you don't worry about this now. With the frameTime you calculates the desired next position of the ball and then you need to calculate collisions and adjust the position if it's necessary.&#xD;&#xA;&#xD;&#xA;About the code:&#xD;&#xA;&#xD;&#xA;1.- Decide a convention to the variable names and follow it. &#xD;&#xA;&#xD;&#xA;&quot;Time&quot; has the first letter uppercase unlike buffX&#xD;&#xA;&#xD;&#xA;in c++ usually the first letter of variables is lowercase&#xD;&#xA;&#xD;&#xA;2.- Do you think that the function CalculateMove needs to be a template?&#xD;&#xA;&#xD;&#xA;I don't think that the type of the parameters will be different to float in the game. If it don't needed, don't use it.&#xD;&#xA;&#xD;&#xA;3.- For the cast conversions is better use static_cast&lt;Type&gt;( variable ) form.&#xD;&#xA;&#xD;&#xA;Because it's more clear and it can be searched easily.&#xD;&#xA;&#xD;&#xA;4.- In c++ the class names usually begins with uppercase.&#xD;&#xA;&#xD;&#xA;5.- The constructor has a lot of parameters.&#xD;&#xA;&#xD;&#xA;It's better declare a structure with these parameters and pass it by const reference to the constructor. In addition, the constructor of the structure can have the default parameters.&#xD;&#xA;&#xD;&#xA;Like:&#xD;&#xA;&#xD;&#xA;    struct SpriteParams&#xD;&#xA;    {&#xD;&#xA;          float          m_rotation;&#xD;&#xA;          float          m_angle;&#xD;&#xA;&#xD;&#xA;          SpriteParams()&#xD;&#xA;              : m_rotation( 0.f )&#xD;&#xA;              , m_angle( 0.f )&#xD;&#xA;          {}&#xD;&#xA;     };&#xD;&#xA;&#xD;&#xA;     // The mySprite constructor&#xD;&#xA;     MySprite::MySprite( const SpriteParams&amp; params );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;6.- Are you sure that mySprite must inherit from Sprite?&#xD;&#xA;&#xD;&#xA;If this class is modelling a paddle, the class must be a paddle and contains a graphics representation ( the sprite )&#xD;&#xA;&#xD;&#xA;    class Paddle&#xD;&#xA;    {&#xD;&#xA;         public:&#xD;&#xA;             void update();&#xD;&#xA;&#xD;&#xA;         private:&#xD;&#xA;             sf::Sprite  m_sprite;&#xD;&#xA;    };" />
  <row Id="30722" PostHistoryTypeId="2" PostId="13792" RevisionGUID="d2d7a3d8-e3c6-4918-a95f-8613bbb9b364" CreationDate="2011-06-17T04:24:00.197" UserId="7728" Text="There are a few standard approaches for this sort of thing.&#xD;&#xA;&#xD;&#xA;The first, is to run all computers in lockstep.  That is, no computer computes the physics for a frame until everyone has received the commands issued by all the other players during that frame.  This may sound a little silly, but it's actually a pretty good system for games which are only being played on LANs.  It keeps everyone in synch (assuming a deterministic game) without having to exchange a lot of data.  Downside is that your frame rate is limited by network latency, which makes it pretty impractical for use on the Internet.&#xD;&#xA;&#xD;&#xA;The second approach is the &quot;ownership&quot; approach, where every object is *owned* by just one game client.  That client is responsible for updating the physics on that object, and all other clients receive information about the object's movements over the network.  Locally, they'd either set the object into kinematic mode and explicitly move it around based upon dead-reckoned network data or else perform local physics and correct those physics calculations based upon the dead-reckoned network data.  This can be complicated, especially if objects need to be able to change ownership between players mid-game, but it's the standard way to handle this for games played in a peer-to-peer network configuration (as opposed to having a single central server).&#xD;&#xA;&#xD;&#xA;The third approach is to have an authoritative server.  This is basically the same as the &quot;ownership&quot; approach above, except that the server owns everything, and each client is always either kinematically moving the objects, or moving them via physics and then correcting.  Commands from clients get sent to the server, along with a timestamp of when that command was given.  The server then retroactively applies those commands, as though they had arrived earlier.  (This is complicated to do, and I'm not sure that Box2D will allow you to do it.  If not, you can ignore this part)&#xD;&#xA;&#xD;&#xA;If you're planning to have a server and to be playable across the internet, then this third approach is probably going to be the way to go.  You'll definitely want to be looking up articles on dead reckoning and error correction in order to help hide the pops when updated data arrives from the server, but otherwise what you've laid out seems a pretty reasonable approach." />
  <row Id="30723" PostHistoryTypeId="2" PostId="13793" RevisionGUID="b2178c72-d94b-4b48-8ff9-9c0747586e04" CreationDate="2011-06-17T04:48:53.063" UserId="1430" Text="Seems like a decent idea to me; I've done a very similar thing in a few projects (although with different APIs).&#xD;&#xA;&#xD;&#xA;If functionality and performance is acceptable, and it saves you from having to write all that boring collision detection code and focus instead on something that makes your game unique and cool, then I'd say go for it." />
  <row Id="30724" PostHistoryTypeId="25" PostId="13772" RevisionGUID="c900a654-a50f-4590-bb24-57c70af01b1b" CreationDate="2011-06-17T06:24:22.817" Comment="http://twitter.com/#!/StackGameDev/status/81608102339821568" />
  <row Id="30725" PostHistoryTypeId="5" PostId="13784" RevisionGUID="008214a3-975c-45af-8abc-18db02aa28e2" CreationDate="2011-06-17T06:31:55.280" UserId="7640" Comment="it now works!" Text="Hey so i'm making a pong game with SFML and in the process made a function that takes a Time, Speed, Angle of movement, buffer for the movement on the X axis, and buffer for the movement on the Y axis. &#xD;&#xA;&#xD;&#xA;I then implemented this function into my custom mySprite class, more specifically into it's update() function which updates its Position using the above function to calculate its new position. &#xD;&#xA;&#xD;&#xA;However i'm worried that giving the function the FrameTime() of the Window (the time since the frame was last updated) is not the best choice as the sprites might start jumping around if there's lag between frame updates or other problems.....&#xD;&#xA;&#xD;&#xA;Finally I would like to know how my organization, planning, etc is..  **Thanks!**&#xD;&#xA;&#xD;&#xA;my **UPDATED, WORKING** Code:&#xD;&#xA;&#xD;&#xA;       #include&lt;SFML/Graphics.hpp&gt;&#xD;&#xA;    #include&lt;SFML/System.hpp&gt;&#xD;&#xA;    #include&lt;cmath&gt;&#xD;&#xA;    #include&lt;vector&gt;&#xD;&#xA;    #    define M_PI 3.14159265358979323846 &#xD;&#xA;    &#xD;&#xA;    sf::RenderWindow Window;&#xD;&#xA;    &#xD;&#xA;    template&lt;typename T&gt; &#xD;&#xA;    void CalculateMove(T Time, T Speed, T Angle, T&amp; buffX, T&amp; buffY)&#xD;&#xA;    {	//Make the degrees positive&#xD;&#xA;    	if(Angle&lt;0) Angle= 360+Angle;&#xD;&#xA;    	//determine what quadrant of circle we're in&#xD;&#xA;    	unsigned int  Quadrant= 1;&#xD;&#xA;    	if(Angle&gt;90)  Quadrant= 2;&#xD;&#xA;    	if(Angle&gt;180) Quadrant= 3;&#xD;&#xA;    	if(Angle&gt;270) Quadrant= 4;&#xD;&#xA;    &#xD;&#xA;    	//anything above 90 would be impossible triangle&#xD;&#xA;    	Angle= (float)(Angle-(int)Angle)+(float)((int)Angle%90); &#xD;&#xA;    &#xD;&#xA;    	// calculates x and y based on angle and Hypotenuse&#xD;&#xA;    	if((int)Angle!=0){&#xD;&#xA;    		if(Quadrant==2 || Quadrant==4) Angle=90-Angle; //The unit circle triangle is flipped otherwise, causing x and y to be switched&#xD;&#xA;    		buffY= sin(Angle / 180 * M_PI)/ (1.f/(Speed*Time));  &#xD;&#xA;    		buffX= sin((180-Angle-90)/ 180 * M_PI)/ (1.f/(Speed*Time));}&#xD;&#xA;    	&#xD;&#xA;    	else{// Movement is a straight line on X or Y axis&#xD;&#xA;    		if(Quadrant==0 || Quadrant==2) buffX= Speed*Time;&#xD;&#xA;    		if(Quadrant==1 || Quadrant==4) buffY= Speed*Time;}&#xD;&#xA;    &#xD;&#xA;    	//Quadrant Factor (positive or negative movement on the axis)&#xD;&#xA;    	switch(Quadrant){&#xD;&#xA;    	case 1: break;&#xD;&#xA;    	case 2: buffX=-buffX; break;&#xD;&#xA;    	case 3: buffX=-buffX; buffY=-buffY; break;&#xD;&#xA;    	case 4: buffY=-buffY; break;}&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    /////////////////////////////////////////	Mysprite	////////////////////////////////&#xD;&#xA;    class mySprite : public sf::Sprite&#xD;&#xA;    {&#xD;&#xA;    private:&#xD;&#xA;    	float velocity;&#xD;&#xA;    	float angle;&#xD;&#xA;    &#xD;&#xA;    public:&#xD;&#xA;    	// all the values needed by the base class sprite();&#xD;&#xA;    	mySprite(&#xD;&#xA;    		const sf::Image&amp; Img, &#xD;&#xA;    		const sf::Vector2f&amp; Position = sf::Vector2f(0, 0), &#xD;&#xA;    		const sf::Vector2f&amp; Scale = sf::Vector2f(1, 1), &#xD;&#xA;    		float Rotation = 0.f, &#xD;&#xA;    		const float Angle= 0.f, &#xD;&#xA;    		const float Velocity= 0.f, &#xD;&#xA;    		const sf::Color&amp; Col = sf::Color(255, 255, 255, 255)):&#xD;&#xA;    	  Sprite(Img, Position, Scale, Rotation, Col){&#xD;&#xA;    		angle= Angle;&#xD;&#xA;    		velocity= Velocity;};&#xD;&#xA;    &#xD;&#xA;    	float Velocity(){return velocity;};&#xD;&#xA;    	void SetVelocity(float newVelocity){velocity=newVelocity;};&#xD;&#xA;    	float Angle(){return angle;};&#xD;&#xA;    	void SetAngle(float newAngle){angle=(float)(newAngle-(int)newAngle)+(float)((int)newAngle%360);};&#xD;&#xA;    &#xD;&#xA;    	void Update(){ &#xD;&#xA;    		float frameTime= Window.GetFrameTime();&#xD;&#xA;    		float X=0,Y=0;&#xD;&#xA;    		SetRotation(angle);&#xD;&#xA;    		CalculateMove(frameTime,velocity,angle,X,Y);&#xD;&#xA;    		Move(X,-Y);&#xD;&#xA;    	};&#xD;&#xA;    &#xD;&#xA;    	void Accelerate(float PPS){velocity+=PPS;};&#xD;&#xA;    	void Turn(float degrees){&#xD;&#xA;    		angle=(float)((angle+degrees)-(int)(angle+degrees))+(float)((int)(angle+degrees)%360);};&#xD;&#xA;    &#xD;&#xA;    	void Reflect(float CollAngle){&#xD;&#xA;    		SetRotation(-GetRotation());&#xD;&#xA;    		angle=360-angle;&#xD;&#xA;    		//TODO: factor in the collision angle&#xD;&#xA;    	};&#xD;&#xA;    };" />
  <row Id="30726" PostHistoryTypeId="2" PostId="13794" RevisionGUID="5ec51d35-75e4-4881-812f-abb0f422e66d" CreationDate="2011-06-17T06:32:32.800" UserId="8092" Text="Good Morning StackOverflow, I'm having a bit of a problem right now as I can't seem to find a way to render part of a texture transparently with openGL.&#xD;&#xA;&#xD;&#xA;Here is my setting : I have a quad, representing a wall, covered with [this texture][1] (converted to PNG for uploading purposes). Obviously, I want the wall to be opaque, except for the panes of glass. There is another plane behind the wall which is supposed to show a landscape. I want to see the landscape from behind the window. Each texture is a TGA with alpha channel.&#xD;&#xA;&#xD;&#xA;The &quot;landscape&quot; is rendered first, then the wall. I thought it would be sufficient to achieve this effect but apparently it's not the case. The part of the window supposed to be transparent is black and the landscape only appears when I move past the wall.&#xD;&#xA;&#xD;&#xA;I tried to fiddle with GLBlendFunc() after having enabled it but it doesn't seem to do the trick.&#xD;&#xA;&#xD;&#xA;Am i forgetting an important step ?&#xD;&#xA;&#xD;&#xA;Thank you :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/m0KqO.png" />
  <row Id="30727" PostHistoryTypeId="1" PostId="13794" RevisionGUID="5ec51d35-75e4-4881-812f-abb0f422e66d" CreationDate="2011-06-17T06:32:32.800" UserId="8092" Text="[openGL] How to render a texture partly transparent?" />
  <row Id="30728" PostHistoryTypeId="3" PostId="13794" RevisionGUID="5ec51d35-75e4-4881-812f-abb0f422e66d" CreationDate="2011-06-17T06:32:32.800" UserId="8092" Text="&lt;opengl&gt;&lt;textures&gt;&lt;transparency&gt;" />
  <row Id="30729" PostHistoryTypeId="4" PostId="13794" RevisionGUID="fb8fbc0a-9d12-4f93-9f7e-c6d9cb11fca7" CreationDate="2011-06-17T06:37:32.263" UserId="3794" Comment="edited title" Text="How to render a texture partly transparent?" />
  <row Id="30730" PostHistoryTypeId="2" PostId="13795" RevisionGUID="7992e384-37bf-4862-82c5-a49fc5507839" CreationDate="2011-06-17T07:02:30.113" UserId="7728" Text="In addition to everything you've stated (textures with alpha channels, drawing the landscape before drawing the wall+window), you also need to do two more things.&#xD;&#xA;&#xD;&#xA;First, you need to enable OpenGL's blending functionality:&#xD;&#xA;&#xD;&#xA;    glEnable(GL_BLEND);&#xD;&#xA;&#xD;&#xA;Second, you need to tell OpenGL how to calculate the colors of blended pixels (which OpenGL calls &quot;fragments&quot;, incidentally).  In this case, you'll be fine with something simple like this:&#xD;&#xA;&#xD;&#xA;    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Once blending is turned on, OpenGL will combine pixel colors according to the function parameters you give it in glBlendFunc.  Specifically, it will do &quot;source.color * source.alpha + destination.color * (1-source.alpha)&quot;, where &quot;source&quot; is the texture you're currently rendering, and &quot;destination&quot; is the color already in the framebuffer (the landscape).  So wherever your alpha channel is white, you'll get the wall color, and wherever the alpha channel is black, you'll get the landscape color.  If the alpha channel is grey, then you'll get some cross-fade between the two colors.&#xD;&#xA;&#xD;&#xA;If your window is fully transparent then there are other ways to do this, where the order in which you draw the two polygons isn't important, but that starts getting into more advanced concepts such as alpha thresholds.  Probably not needed for your current situation." />
  <row Id="30731" PostHistoryTypeId="5" PostId="13742" RevisionGUID="aaf7d2a2-5459-4c83-a4c4-edc8a1cb9163" CreationDate="2011-06-17T07:16:46.070" UserId="8003" Comment="added 305 characters in body" Text="According to [obj file specification][1] it should be string after 'g' command, but from my experiences each obj exporter handle those things specifically.&#xD;&#xA;&#xD;&#xA;It might help to add link to obj file in your first post.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;According to model file, those wheels are groups with numbers 13, 14, 24, 25 (proof: [image][2])&#xD;&#xA;&#xD;&#xA;So those faces (and according vertexes, normals and textures) after line `g part 013` to next line with `g` command is mesh of wheel and so on..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.martinreddy.net/gfx/3d/OBJ.spec&#xD;&#xA;  [2]: http://i56.tinypic.com/29lxobt.png" />
  <row Id="30732" PostHistoryTypeId="5" PostId="13742" RevisionGUID="09730914-c240-4ac9-9fc9-115bf6d5b6a4" CreationDate="2011-06-17T07:23:14.277" UserId="8003" Comment="added 181 characters in body" Text="According to [obj file specification][1] it should be string after 'g' command, but from my experiences each obj exporter handle those things specifically.&#xD;&#xA;&#xD;&#xA;It might help to add link to obj file in your first post.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;According to model file, those wheels are groups with numbers 13, 14, 24, 25 (proof: [image][2])&#xD;&#xA;&#xD;&#xA;So those faces (and according vertexes, normals and textures) after line `g part 013` to next line with `g` command is mesh of wheel and so on..&#xD;&#xA;&#xD;&#xA;I'm not using JMonkey so I don't precisely know how to rotate those parts, but you could cut the car mesh into two files (wheels and rest) and then i should be easy to animate..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.martinreddy.net/gfx/3d/OBJ.spec&#xD;&#xA;  [2]: http://i56.tinypic.com/29lxobt.png" />
  <row Id="30733" PostHistoryTypeId="5" PostId="13700" RevisionGUID="7073318a-27f0-4021-bd08-599dda124526" CreationDate="2011-06-17T07:53:36.433" UserId="8050" Comment="added 1070 characters in body" Text="You should consider friction specially in submarines, this ships can travel both under and on whater surface so the speed they can reach may vary according - this to account basic fluid dynamics.&#xD;&#xA;&#xD;&#xA;The whole dynamics should be that the ship has an orientation and a propulsion force (both positive or negative), this means an acceleration toward the ship direction. Another acceleration is due the friction, it should be propotional to the speed and backward oriented. The propotional factor may depend upon the ship's shape (repeat it 10 time as fast as you can) and if is in submarine or normal mode. &#xD;&#xA;&#xD;&#xA;Then you need to integrate the acceleration to the speed and the speed to the position. Euler integration is not THE integration (what about runge-kutta?) anyway you have to integrate and have to choose between speed (of integration calculus) and accuracy (your ship should not explode or travel backward faster than light).&#xD;&#xA;&#xD;&#xA;Summarizing, a ship can be represented by:&#xD;&#xA;&#xD;&#xA; - friction states&#xD;&#xA; - max propultion acceleration&#xD;&#xA; - the friction status&#xD;&#xA; - current position&#xD;&#xA; - velocity vector&#xD;&#xA; - current acceleration factor&#xD;&#xA; - heading&#xD;&#xA;&#xD;&#xA;The first two depends upon each ship type, the others defines the complete status of each ship in the game and the last two of this are the ones you can directly control (you should consider the rudder so the heading become an indirect parameter controlled by the rudder position, the choose is yours)&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;The friction model for wind is the same:&#xD;&#xA;&#xD;&#xA;The wind hits the ship in a direction, the shape (CX) for that direction is connected to the (air)friction experienced by the ship: the acceleration is propotional to that friction and has the same direction of the wind (as if the ships goes where the wind comes at the wind speed and the air is still).&#xD;&#xA;Assuming that your ship is simmetric over the heading axe, you can compute the angle of wind incidence throught the scalar product of the normalized heading and wind vectors, then use a function that compute the friction ( max friction for 90&amp;deg; degrading to min friction when going to 0&amp;deg; or 180&amp;deg;).&#xD;&#xA;&#xD;&#xA;If you are lazy you can consider the ship spherical (I whould like to see one in my life) and completely ignore the wind angle measurement simply applying the constant friction multiplier to your wind vector.&#xD;&#xA;&#xD;&#xA;The same for the currents of course.&#xD;&#xA;&#xD;&#xA;Obviously the final acceleration you have to integrate is the vectorial sum of all the trust and friction based accelerations you compute.&#xD;&#xA;" />
  <row Id="30734" PostHistoryTypeId="5" PostId="13693" RevisionGUID="649bf890-7467-43bb-bb0e-8441af69036f" CreationDate="2011-06-17T08:00:19.950" UserId="8066" Comment="added 88 characters in body; added 61 characters in body" Text="I have a missile that is shot from a ship at an angle, the missile then turns towards the target in an arc with a given turn radius. How do I determine the point on the arc when I need to start turning so the missile is heading straight for the target?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;What I need to do before I launch the missiles is calculate and draw the flight paths. So in the attached example the launch vehicle has a heading of 90 deg and the targets are behind it. Both missiles are launched at a relative heading of -45deg or + 45 deg to the launch vehicle's heading. The missiles initially turn towards the target with a known turn radius. I have to calculate the point at which the turn takes the missile to heading at which it will turn to directly attack the target. Obviously if the target is at or near 45 degrees then there is no initial turn the missile just goes straight for the target.&#xD;&#xA;&#xD;&#xA;After the missile is launched the map will also show the missile tracking on this line as indication of its flight path.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;What I am doing is working on a simulator which mimics operational software. So I need to draw the calculated flight path before I allow the missile to be launched.&#xD;&#xA;&#xD;&#xA;![Two missiles aimed at two targets][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/lvCmo.jpg&#xD;&#xA;&#xD;&#xA;In this example the targets are behind the launch vehicle but the precalculated paths are drawn." />
  <row Id="30736" PostHistoryTypeId="25" PostId="13794" RevisionGUID="18cf174c-fff4-423d-9c7a-60579daf031d" CreationDate="2011-06-17T09:24:23.080" Comment="http://twitter.com/#!/StackGameDev/status/81653401443762176" />
  <row Id="30737" PostHistoryTypeId="5" PostId="13452" RevisionGUID="57c7958b-92ac-45fb-9122-50d51d0fb28e" CreationDate="2011-06-17T10:40:48.137" UserId="7588" Comment="added 202 characters in body" Text="I am looking for articles on level design and particularly for techniques to imply a direction the player to go in, instead of another.&#xD;&#xA;&#xD;&#xA;Like which game mechanics can be used, how graphics, sound, etc. can influence the player to go where you want.&#xD;&#xA;&#xD;&#xA;For example in Donkey Kong Country bananas were used to show other paths or hidden areas, in Alan Wake, there were orange markers to show weapons caches.&#xD;&#xA;&#xD;&#xA;If anyone has ideas, I'd be grateful to hear them too!&#xD;&#xA;&#xD;&#xA;__Edit:__&#xD;&#xA;For anyone that is interested, I found a huge resource with thesis on this question, and others related to Level Design; happy reading!&#xD;&#xA;&#xD;&#xA;http://guildhall.smu.edu/Level-Design.226.0.html" />
  <row Id="30738" PostHistoryTypeId="5" PostId="13779" RevisionGUID="f5ce51cd-a2a0-4cdd-9671-226fde285d05" CreationDate="2011-06-17T10:51:41.117" UserId="7804" Comment="deleted the note, as really it's the same which you use -- thanks Andrew" Text="There's a great [MSDN page about a useful directory access method][1] and someone's asked [a similar question on StackOverflow][2].&#xD;&#xA;&#xD;&#xA;Basically, find the files that are in that directory, initialise an array of that size and then iterate through those files, loading in the resources.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/4cyf24ss.aspx&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4052532/xna-get-an-array-list-of-resources" />
  <row Id="30739" PostHistoryTypeId="2" PostId="13796" RevisionGUID="74171d05-21ad-4a5d-a0c8-58613d881d34" CreationDate="2011-06-17T11:27:22.430" UserId="7737" Text="I am coding in C# using windows form and slimDX API to show the effect of a pixel shader. When i am setting the pixel shader then I am getting a black output screen but if i am not using the pixel shader then I am getting my image rendered on the screen. I have the following c# code&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Windows.Forms;&#xD;&#xA;    using System.Runtime.InteropServices;&#xD;&#xA;    using SlimDX.Direct3D9;&#xD;&#xA;    using SlimDX;&#xD;&#xA;    using SlimDX.Windows;&#xD;&#xA;    using System.Drawing;&#xD;&#xA;    using System.Threading;&#xD;&#xA;&#xD;&#xA;    namespace WindowsFormsApplication1&#xD;&#xA;      {&#xD;&#xA;         // Vertex structure.&#xD;&#xA;    [StructLayout(LayoutKind.Sequential)]&#xD;&#xA;    struct Vertex&#xD;&#xA;    {&#xD;&#xA;        public Vector3 Position;&#xD;&#xA;        public float Tu;&#xD;&#xA;        public float Tv;&#xD;&#xA;&#xD;&#xA;        public static int SizeBytes&#xD;&#xA;        {&#xD;&#xA;            get { return Marshal.SizeOf(typeof(Vertex)); }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public static VertexFormat Format&#xD;&#xA;        {&#xD;&#xA;            get { return VertexFormat.Position | VertexFormat.Texture1; }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    static class Program&#xD;&#xA;    {&#xD;&#xA;        public static Device D3DDevice;         // Direct3D device.&#xD;&#xA;        public static VertexBuffer Vertices;    // Vertex buffer object used to hold vertices.&#xD;&#xA;        public static Texture Image;            // Texture object to hold the image loaded from a file.&#xD;&#xA;        public static int time;                 // Used for rotation caculations.&#xD;&#xA;        public static float angle;              // Angle of rottaion.&#xD;&#xA;        public static Form1 Window =new Form1();&#xD;&#xA;        public static  string filepath;&#xD;&#xA;        static VertexShader vertexShader = null;&#xD;&#xA;        static ConstantTable constantTable = null;&#xD;&#xA;        static ImageInformation info;&#xD;&#xA;        [STAThread]&#xD;&#xA;        static void Main()&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            filepath = &quot;C:\\Users\\Public\\Pictures\\Sample Pictures\\Garden.jpg&quot;;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            info = new ImageInformation();&#xD;&#xA;            info = ImageInformation.FromFile(filepath);&#xD;&#xA;           &#xD;&#xA;            PresentParameters presentParams = new PresentParameters();&#xD;&#xA;&#xD;&#xA;            // Below are the required bare mininum, needed to initialize the D3D device.&#xD;&#xA;            presentParams.BackBufferHeight = info.Height;         // BackBufferHeight, set to  the Window's height.&#xD;&#xA;            presentParams.BackBufferWidth = info.Width+200;          // BackBufferWidth, set to  the Window's width.&#xD;&#xA;          &#xD;&#xA;           &#xD;&#xA;         &#xD;&#xA;           &#xD;&#xA;            presentParams.Windowed =true; &#xD;&#xA;            presentParams.DeviceWindowHandle = Window.panel2 .Handle;                       // DeviceWindowHandle, set to  the Window's handle.&#xD;&#xA;&#xD;&#xA;            // Create the device.&#xD;&#xA;            D3DDevice = new Device(new Direct3D (), 0, DeviceType.Hardware, Window.Handle, CreateFlags.HardwareVertexProcessing, presentParams);&#xD;&#xA;&#xD;&#xA;            // Create the vertex buffer and fill with the triangle vertices. (Non-indexed)&#xD;&#xA;            // Remember 3 vetices for a triangle, 2 tris per quad = 6.&#xD;&#xA;            Vertices = new VertexBuffer(D3DDevice, 6 * Vertex.SizeBytes, Usage.WriteOnly, VertexFormat.None, Pool.Managed);&#xD;&#xA;            DataStream stream = Vertices.Lock(0, 0, LockFlags.None);&#xD;&#xA;            stream.WriteRange(BuildVertexData());&#xD;&#xA;            Vertices.Unlock();&#xD;&#xA;&#xD;&#xA;            // Create the texture.&#xD;&#xA;           &#xD;&#xA;            Image = Texture.FromFile(D3DDevice,filepath );&#xD;&#xA;&#xD;&#xA;            // Turn off culling, so we see the front and back of the triangle&#xD;&#xA;            D3DDevice.SetRenderState(RenderState.CullMode, Cull.None);&#xD;&#xA;&#xD;&#xA;            // Turn off lighting&#xD;&#xA;            D3DDevice.SetRenderState(RenderState.Lighting, false);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            ShaderBytecode sbcv = ShaderBytecode.CompileFromFile(&quot;C:\\Users\\yashwinder singh\\Desktop\\vertexShader.vs&quot;, &quot;vs_main&quot;, &quot;vs_1_1&quot;, ShaderFlags.None);&#xD;&#xA;            constantTable = sbcv.ConstantTable;&#xD;&#xA;            vertexShader = new VertexShader(D3DDevice, sbcv);&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            ShaderBytecode sbc = ShaderBytecode.CompileFromFile(&quot;C:\\Users\\yashwinder singh\\Desktop\\pixelShader.txt&quot;, &quot;ps_main&quot;, &quot;ps_3_0&quot;, ShaderFlags.None);&#xD;&#xA;            PixelShader ps = new PixelShader(D3DDevice, sbc);&#xD;&#xA;&#xD;&#xA;            VertexDeclaration vertexDecl = new VertexDeclaration(D3DDevice, new[] {&#xD;&#xA;                                new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.PositionTransformed, 0), &#xD;&#xA;                                new VertexElement(0, 12, DeclarationType.Float2 , DeclarationMethod.Default, DeclarationUsage.TextureCoordinate , 0), &#xD;&#xA;                                VertexElement.VertexDeclarationEnd&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;            Application.EnableVisualStyles();&#xD;&#xA;            &#xD;&#xA;            MessagePump.Run(Window, () =&gt;&#xD;&#xA;                {&#xD;&#xA;                    // Clear the backbuffer to a black color.&#xD;&#xA;                    D3DDevice.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);&#xD;&#xA;&#xD;&#xA;                    // Begin the scene.&#xD;&#xA;                    D3DDevice.BeginScene();&#xD;&#xA;&#xD;&#xA;                  &#xD;&#xA;&#xD;&#xA;                    // Setup the world, view and projection matrices.&#xD;&#xA;                     &#xD;&#xA;                    &#xD;&#xA;                    &#xD;&#xA;                    //D3DDevice.VertexShader = vertexShader;&#xD;&#xA;                    //D3DDevice.PixelShader = ps;&#xD;&#xA;                    &#xD;&#xA;                    // Render the vertex buffer.&#xD;&#xA;                    D3DDevice.SetStreamSource(0, Vertices, 0, Vertex.SizeBytes);&#xD;&#xA;                    D3DDevice.VertexFormat = Vertex.Format;&#xD;&#xA;&#xD;&#xA;                    // Setup our texture. Using Textures introduces the texture stage states,&#xD;&#xA;                    // which govern how Textures get blended together (in the case of multiple&#xD;&#xA;                    // Textures) and lighting information.&#xD;&#xA;                    D3DDevice.SetTexture(0, Image);&#xD;&#xA;                    &#xD;&#xA;                 &#xD;&#xA;                    // Now drawing 2 triangles, for a quad.&#xD;&#xA;                    D3DDevice.DrawPrimitives(PrimitiveType.TriangleList   , 0, 2);&#xD;&#xA;&#xD;&#xA;                    // End the scene.&#xD;&#xA;                    D3DDevice.EndScene();&#xD;&#xA;&#xD;&#xA;                    // Present the backbuffer contents to the screen.&#xD;&#xA;                    D3DDevice.Present();&#xD;&#xA;                    &#xD;&#xA;                }); &#xD;&#xA;            if (Image != null)&#xD;&#xA;                Image.Dispose();&#xD;&#xA;&#xD;&#xA;            if (Vertices != null)&#xD;&#xA;                Vertices.Dispose();&#xD;&#xA;&#xD;&#xA;            if (D3DDevice != null)&#xD;&#xA;                D3DDevice.Dispose();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;        private static Vertex[] BuildVertexData()&#xD;&#xA;        {&#xD;&#xA;            Vertex[] vertexData = new Vertex[6];&#xD;&#xA;&#xD;&#xA;            vertexData[0].Position = new Vector3(-1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[0].Tu = 0.0f;&#xD;&#xA;            vertexData[0].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[1].Position = new Vector3(-1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[1].Tu = 0.0f;&#xD;&#xA;            vertexData[1].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[2].Position = new Vector3(1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[2].Tu = 1.0f;&#xD;&#xA;            vertexData[2].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[3].Position = new Vector3(-1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[3].Tu = 0.0f;&#xD;&#xA;            vertexData[3].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[4].Position = new Vector3(1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[4].Tu = 1.0f;&#xD;&#xA;            vertexData[4].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[5].Position = new Vector3(1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[5].Tu = 1.0f;&#xD;&#xA;            vertexData[5].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            return vertexData;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;    }   &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And my pixel shader and vertex shader code are as following&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Pixel shader input structure&#xD;&#xA;     struct PS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Pixel shader output structure&#xD;&#xA;    struct PS_OUTPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Color   : COLOR0;&#xD;&#xA;     };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Global variables&#xD;&#xA;     sampler2D Tex0;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Name: Simple Pixel Shader&#xD;&#xA;     // Type: Pixel shader&#xD;&#xA;     // Desc: Fetch texture and blend with constant color&#xD;&#xA;     //&#xD;&#xA;     PS_OUTPUT ps_main( in PS_INPUT In )&#xD;&#xA;     {&#xD;&#xA;       PS_OUTPUT Out;                             //create an output pixel&#xD;&#xA;&#xD;&#xA;        Out.Color = tex2D(Tex0, In.Texture);       //do a texture lookup&#xD;&#xA;        &#xD;&#xA;        Out.Color *= float4(0.9f, 0.8f, 0.0f, 1);   //do a simple effect&#xD;&#xA;&#xD;&#xA;        return Out;                              //return output pixel&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Vertex shader input structure&#xD;&#xA;     struct VS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Vertex shader output structure&#xD;&#xA;      struct VS_OUTPUT&#xD;&#xA;      {&#xD;&#xA;          float4 Position   : POSITION;&#xD;&#xA;          float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Global variables&#xD;&#xA;      float4x4 WorldViewProj;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Name: Simple Vertex Shader&#xD;&#xA;      // Type: Vertex shader&#xD;&#xA;      // Desc: Vertex transformation and texture coord pass-through&#xD;&#xA;      //&#xD;&#xA;        VS_OUTPUT vs_main( in VS_INPUT In )&#xD;&#xA;      {&#xD;&#xA;         VS_OUTPUT Out;                      //create an output vertex&#xD;&#xA;&#xD;&#xA;         Out.Position = mul(In.Position,&#xD;&#xA;                       WorldViewProj);  //apply vertex transformation&#xD;&#xA;           Out.Texture  = In.Texture;          //copy original texcoords&#xD;&#xA;&#xD;&#xA;         return Out;                         //return output vertex&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30740" PostHistoryTypeId="1" PostId="13796" RevisionGUID="74171d05-21ad-4a5d-a0c8-58613d881d34" CreationDate="2011-06-17T11:27:22.430" UserId="7737" Text="Pixel Shader Giving Black output" />
  <row Id="30741" PostHistoryTypeId="3" PostId="13796" RevisionGUID="74171d05-21ad-4a5d-a0c8-58613d881d34" CreationDate="2011-06-17T11:27:22.430" UserId="7737" Text="&lt;slimdx&gt;" />
  <row Id="30742" PostHistoryTypeId="25" PostId="13788" RevisionGUID="5f9cd38b-be84-43a7-9720-a9f4973c19eb" CreationDate="2011-06-17T12:24:23.267" Comment="http://twitter.com/#!/StackGameDev/status/81698700493193216" />
  <row Id="30743" PostHistoryTypeId="5" PostId="13796" RevisionGUID="f011a24b-8886-4933-a235-447a7111d2f1" CreationDate="2011-06-17T12:25:43.843" UserId="1156" Comment="added 1 characters in body; edited tags" Text="I am coding in C# using Windows Forms and the SlimDX API to show the effect of a pixel shader. When I am setting the pixel shader, I am getting a black output screen but if I am not using the pixel shader then I am getting my image rendered on the screen. I have the following C# code&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Windows.Forms;&#xD;&#xA;    using System.Runtime.InteropServices;&#xD;&#xA;    using SlimDX.Direct3D9;&#xD;&#xA;    using SlimDX;&#xD;&#xA;    using SlimDX.Windows;&#xD;&#xA;    using System.Drawing;&#xD;&#xA;    using System.Threading;&#xD;&#xA;&#xD;&#xA;    namespace WindowsFormsApplication1&#xD;&#xA;      {&#xD;&#xA;         // Vertex structure.&#xD;&#xA;    [StructLayout(LayoutKind.Sequential)]&#xD;&#xA;    struct Vertex&#xD;&#xA;    {&#xD;&#xA;        public Vector3 Position;&#xD;&#xA;        public float Tu;&#xD;&#xA;        public float Tv;&#xD;&#xA;&#xD;&#xA;        public static int SizeBytes&#xD;&#xA;        {&#xD;&#xA;            get { return Marshal.SizeOf(typeof(Vertex)); }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public static VertexFormat Format&#xD;&#xA;        {&#xD;&#xA;            get { return VertexFormat.Position | VertexFormat.Texture1; }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    static class Program&#xD;&#xA;    {&#xD;&#xA;        public static Device D3DDevice;         // Direct3D device.&#xD;&#xA;        public static VertexBuffer Vertices;    // Vertex buffer object used to hold vertices.&#xD;&#xA;        public static Texture Image;            // Texture object to hold the image loaded from a file.&#xD;&#xA;        public static int time;                 // Used for rotation caculations.&#xD;&#xA;        public static float angle;              // Angle of rottaion.&#xD;&#xA;        public static Form1 Window =new Form1();&#xD;&#xA;        public static  string filepath;&#xD;&#xA;        static VertexShader vertexShader = null;&#xD;&#xA;        static ConstantTable constantTable = null;&#xD;&#xA;        static ImageInformation info;&#xD;&#xA;        [STAThread]&#xD;&#xA;        static void Main()&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            filepath = &quot;C:\\Users\\Public\\Pictures\\Sample Pictures\\Garden.jpg&quot;;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            info = new ImageInformation();&#xD;&#xA;            info = ImageInformation.FromFile(filepath);&#xD;&#xA;           &#xD;&#xA;            PresentParameters presentParams = new PresentParameters();&#xD;&#xA;&#xD;&#xA;            // Below are the required bare mininum, needed to initialize the D3D device.&#xD;&#xA;            presentParams.BackBufferHeight = info.Height;         // BackBufferHeight, set to  the Window's height.&#xD;&#xA;            presentParams.BackBufferWidth = info.Width+200;          // BackBufferWidth, set to  the Window's width.&#xD;&#xA;          &#xD;&#xA;           &#xD;&#xA;         &#xD;&#xA;           &#xD;&#xA;            presentParams.Windowed =true; &#xD;&#xA;            presentParams.DeviceWindowHandle = Window.panel2 .Handle;                       // DeviceWindowHandle, set to  the Window's handle.&#xD;&#xA;&#xD;&#xA;            // Create the device.&#xD;&#xA;            D3DDevice = new Device(new Direct3D (), 0, DeviceType.Hardware, Window.Handle, CreateFlags.HardwareVertexProcessing, presentParams);&#xD;&#xA;&#xD;&#xA;            // Create the vertex buffer and fill with the triangle vertices. (Non-indexed)&#xD;&#xA;            // Remember 3 vetices for a triangle, 2 tris per quad = 6.&#xD;&#xA;            Vertices = new VertexBuffer(D3DDevice, 6 * Vertex.SizeBytes, Usage.WriteOnly, VertexFormat.None, Pool.Managed);&#xD;&#xA;            DataStream stream = Vertices.Lock(0, 0, LockFlags.None);&#xD;&#xA;            stream.WriteRange(BuildVertexData());&#xD;&#xA;            Vertices.Unlock();&#xD;&#xA;&#xD;&#xA;            // Create the texture.&#xD;&#xA;           &#xD;&#xA;            Image = Texture.FromFile(D3DDevice,filepath );&#xD;&#xA;&#xD;&#xA;            // Turn off culling, so we see the front and back of the triangle&#xD;&#xA;            D3DDevice.SetRenderState(RenderState.CullMode, Cull.None);&#xD;&#xA;&#xD;&#xA;            // Turn off lighting&#xD;&#xA;            D3DDevice.SetRenderState(RenderState.Lighting, false);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            ShaderBytecode sbcv = ShaderBytecode.CompileFromFile(&quot;C:\\Users\\yashwinder singh\\Desktop\\vertexShader.vs&quot;, &quot;vs_main&quot;, &quot;vs_1_1&quot;, ShaderFlags.None);&#xD;&#xA;            constantTable = sbcv.ConstantTable;&#xD;&#xA;            vertexShader = new VertexShader(D3DDevice, sbcv);&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            ShaderBytecode sbc = ShaderBytecode.CompileFromFile(&quot;C:\\Users\\yashwinder singh\\Desktop\\pixelShader.txt&quot;, &quot;ps_main&quot;, &quot;ps_3_0&quot;, ShaderFlags.None);&#xD;&#xA;            PixelShader ps = new PixelShader(D3DDevice, sbc);&#xD;&#xA;&#xD;&#xA;            VertexDeclaration vertexDecl = new VertexDeclaration(D3DDevice, new[] {&#xD;&#xA;                                new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.PositionTransformed, 0), &#xD;&#xA;                                new VertexElement(0, 12, DeclarationType.Float2 , DeclarationMethod.Default, DeclarationUsage.TextureCoordinate , 0), &#xD;&#xA;                                VertexElement.VertexDeclarationEnd&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;            Application.EnableVisualStyles();&#xD;&#xA;            &#xD;&#xA;            MessagePump.Run(Window, () =&gt;&#xD;&#xA;                {&#xD;&#xA;                    // Clear the backbuffer to a black color.&#xD;&#xA;                    D3DDevice.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);&#xD;&#xA;&#xD;&#xA;                    // Begin the scene.&#xD;&#xA;                    D3DDevice.BeginScene();&#xD;&#xA;&#xD;&#xA;                  &#xD;&#xA;&#xD;&#xA;                    // Setup the world, view and projection matrices.&#xD;&#xA;                     &#xD;&#xA;                    &#xD;&#xA;                    &#xD;&#xA;                    //D3DDevice.VertexShader = vertexShader;&#xD;&#xA;                    //D3DDevice.PixelShader = ps;&#xD;&#xA;                    &#xD;&#xA;                    // Render the vertex buffer.&#xD;&#xA;                    D3DDevice.SetStreamSource(0, Vertices, 0, Vertex.SizeBytes);&#xD;&#xA;                    D3DDevice.VertexFormat = Vertex.Format;&#xD;&#xA;&#xD;&#xA;                    // Setup our texture. Using Textures introduces the texture stage states,&#xD;&#xA;                    // which govern how Textures get blended together (in the case of multiple&#xD;&#xA;                    // Textures) and lighting information.&#xD;&#xA;                    D3DDevice.SetTexture(0, Image);&#xD;&#xA;                    &#xD;&#xA;                 &#xD;&#xA;                    // Now drawing 2 triangles, for a quad.&#xD;&#xA;                    D3DDevice.DrawPrimitives(PrimitiveType.TriangleList   , 0, 2);&#xD;&#xA;&#xD;&#xA;                    // End the scene.&#xD;&#xA;                    D3DDevice.EndScene();&#xD;&#xA;&#xD;&#xA;                    // Present the backbuffer contents to the screen.&#xD;&#xA;                    D3DDevice.Present();&#xD;&#xA;                    &#xD;&#xA;                }); &#xD;&#xA;            if (Image != null)&#xD;&#xA;                Image.Dispose();&#xD;&#xA;&#xD;&#xA;            if (Vertices != null)&#xD;&#xA;                Vertices.Dispose();&#xD;&#xA;&#xD;&#xA;            if (D3DDevice != null)&#xD;&#xA;                D3DDevice.Dispose();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;        private static Vertex[] BuildVertexData()&#xD;&#xA;        {&#xD;&#xA;            Vertex[] vertexData = new Vertex[6];&#xD;&#xA;&#xD;&#xA;            vertexData[0].Position = new Vector3(-1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[0].Tu = 0.0f;&#xD;&#xA;            vertexData[0].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[1].Position = new Vector3(-1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[1].Tu = 0.0f;&#xD;&#xA;            vertexData[1].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[2].Position = new Vector3(1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[2].Tu = 1.0f;&#xD;&#xA;            vertexData[2].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[3].Position = new Vector3(-1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[3].Tu = 0.0f;&#xD;&#xA;            vertexData[3].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[4].Position = new Vector3(1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[4].Tu = 1.0f;&#xD;&#xA;            vertexData[4].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[5].Position = new Vector3(1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[5].Tu = 1.0f;&#xD;&#xA;            vertexData[5].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            return vertexData;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;    }   &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And my pixel shader and vertex shader code are as following&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Pixel shader input structure&#xD;&#xA;     struct PS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Pixel shader output structure&#xD;&#xA;    struct PS_OUTPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Color   : COLOR0;&#xD;&#xA;     };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Global variables&#xD;&#xA;     sampler2D Tex0;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Name: Simple Pixel Shader&#xD;&#xA;     // Type: Pixel shader&#xD;&#xA;     // Desc: Fetch texture and blend with constant color&#xD;&#xA;     //&#xD;&#xA;     PS_OUTPUT ps_main( in PS_INPUT In )&#xD;&#xA;     {&#xD;&#xA;       PS_OUTPUT Out;                             //create an output pixel&#xD;&#xA;&#xD;&#xA;        Out.Color = tex2D(Tex0, In.Texture);       //do a texture lookup&#xD;&#xA;        &#xD;&#xA;        Out.Color *= float4(0.9f, 0.8f, 0.0f, 1);   //do a simple effect&#xD;&#xA;&#xD;&#xA;        return Out;                              //return output pixel&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Vertex shader input structure&#xD;&#xA;     struct VS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Vertex shader output structure&#xD;&#xA;      struct VS_OUTPUT&#xD;&#xA;      {&#xD;&#xA;          float4 Position   : POSITION;&#xD;&#xA;          float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Global variables&#xD;&#xA;      float4x4 WorldViewProj;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Name: Simple Vertex Shader&#xD;&#xA;      // Type: Vertex shader&#xD;&#xA;      // Desc: Vertex transformation and texture coord pass-through&#xD;&#xA;      //&#xD;&#xA;        VS_OUTPUT vs_main( in VS_INPUT In )&#xD;&#xA;      {&#xD;&#xA;         VS_OUTPUT Out;                      //create an output vertex&#xD;&#xA;&#xD;&#xA;         Out.Position = mul(In.Position,&#xD;&#xA;                       WorldViewProj);  //apply vertex transformation&#xD;&#xA;           Out.Texture  = In.Texture;          //copy original texcoords&#xD;&#xA;&#xD;&#xA;         return Out;                         //return output vertex&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30744" PostHistoryTypeId="6" PostId="13796" RevisionGUID="f011a24b-8886-4933-a235-447a7111d2f1" CreationDate="2011-06-17T12:25:43.843" UserId="1156" Comment="added 1 characters in body; edited tags" Text="&lt;c#&gt;&lt;shaders&gt;&lt;slimdx&gt;" />
  <row Id="30745" PostHistoryTypeId="2" PostId="13797" RevisionGUID="feadd243-a7ec-409c-8b31-4b160ea05e8d" CreationDate="2011-06-17T13:41:04.913" UserId="1248" Text="I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to start creating the actual components I am a bit confused. When I think of them in terms of HealthComponent or something that would basically just be a property, it makes perfect sense. When it is something more general as a Physics/Graphics component, I get a bit confused.&#xD;&#xA;&#xD;&#xA;My Object class looks like this so far (If you notice any changes I should make please let me know, still new to this)...&#xD;&#xA;&#xD;&#xA;    typedef unsigned int ID;&#xD;&#xA;    &#xD;&#xA;    class GameObject&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;    &#xD;&#xA;    	GameObject(ID id, Ogre::String name = &quot;&quot;);&#xD;&#xA;    	~GameObject();&#xD;&#xA;    &#xD;&#xA;    	ID &amp;getID();&#xD;&#xA;    	Ogre::String &amp;getName();&#xD;&#xA;    &#xD;&#xA;    	virtual void update() = 0;&#xD;&#xA;    &#xD;&#xA;    	// Component Functions&#xD;&#xA;    	void addComponent(Component *component);&#xD;&#xA;    	void removeComponent(Ogre::String familyName);&#xD;&#xA;    &#xD;&#xA;    	template&lt;typename T&gt;&#xD;&#xA;    	T* getComponent(Ogre::String familyName)&#xD;&#xA;    	{&#xD;&#xA;    		return dynamic_cast&lt;T*&gt;(m_components[familyName]);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    protected:&#xD;&#xA;    &#xD;&#xA;    	// Properties&#xD;&#xA;    	ID m_ID;&#xD;&#xA;    	Ogre::String m_Name;&#xD;&#xA;    	float m_flVelocity;&#xD;&#xA;    	Ogre::Vector3 m_vecPosition;&#xD;&#xA;    &#xD;&#xA;    	// Components&#xD;&#xA;    	std::map&lt;std::string,Component*&gt; m_components;&#xD;&#xA;    	std::map&lt;std::string,Component*&gt;::iterator m_componentItr;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Now the problem I am running into is what would the general population put into Components such as Physics/Graphics? For Ogre (my rendering engine) the visible Objects will consist of multiple Ogre::SceneNode (possibly multiple) to attach it to the scene, Ogre::Entity (possibly multiple) to show the visible meshes, and so on. Would it be best to just add multiple GraphicComponent's to the Object and let each GraphicComponent handle one SceneNode/Entity or is the idea to have one of each Component needed?&#xD;&#xA;&#xD;&#xA;For Physics I am even more confused. I suppose maybe creating a RigidBody and keeping track of mass/interia/etc. would make sense. But I am having trouble thinking of how to actually putting specifics into a Component.&#xD;&#xA;&#xD;&#xA;Once I get a couple of these &quot;Required&quot; components done, I think it will make a lot more sense. As of right now though I am still a bit stumped." />
  <row Id="30746" PostHistoryTypeId="1" PostId="13797" RevisionGUID="feadd243-a7ec-409c-8b31-4b160ea05e8d" CreationDate="2011-06-17T13:41:04.913" UserId="1248" Text="Physics/Graphics Components" />
  <row Id="30747" PostHistoryTypeId="3" PostId="13797" RevisionGUID="feadd243-a7ec-409c-8b31-4b160ea05e8d" CreationDate="2011-06-17T13:41:04.913" UserId="1248" Text="&lt;graphics&gt;&lt;physics&gt;&lt;component-based&gt;&lt;objects&gt;&lt;game-component&gt;" />
  <row Id="30748" PostHistoryTypeId="2" PostId="13798" RevisionGUID="50cf2558-cb5d-4325-bebc-4dcb94eadda8" CreationDate="2011-06-17T13:46:03.520" UserId="7993" Text="I recently asked this question on how to calculate a level based on experience:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/13638/algorithm-for-dynamically-calculating-a-level-based-on-experience-points&#xD;&#xA;&#xD;&#xA;I am using the following calculation to determine the players level:&#xD;&#xA;&#xD;&#xA;    decimal experience = 1829;&#xD;&#xA;    decimal rawLevel = (decimal)(.06 * Math.Sqrt(experience));&#xD;&#xA;    decimal level = Math.Floor(rawLevel);&#xD;&#xA;&#xD;&#xA;For my test, `1829` experience points equates to `2.56600857364117M`, which I floor to level 2.&#xD;&#xA;&#xD;&#xA;My question is, how can I figure out how many points it would take to get to the next level based off of the calculation above?  &#xD;&#xA;&#xD;&#xA;I know the next level is 3, so I would need to figure out how many points equate to level 3 so that I can find the difference.  What formula would I use, given the constant .06 above?&#xD;&#xA;" />
  <row Id="30749" PostHistoryTypeId="1" PostId="13798" RevisionGUID="50cf2558-cb5d-4325-bebc-4dcb94eadda8" CreationDate="2011-06-17T13:46:03.520" UserId="7993" Text="Finding next experience level using the square root?" />
  <row Id="30750" PostHistoryTypeId="3" PostId="13798" RevisionGUID="50cf2558-cb5d-4325-bebc-4dcb94eadda8" CreationDate="2011-06-17T13:46:03.520" UserId="7993" Text="&lt;game-design&gt;" />
  <row Id="30751" PostHistoryTypeId="2" PostId="13799" RevisionGUID="5e345f09-32b3-4340-b059-6d7a9e7946db" CreationDate="2011-06-17T13:50:50.973" UserId="7588" Text="You just need to do the inverse calculations in the inverse order :&#xD;&#xA;&#xD;&#xA;    Exp = (Level / 0.06)²&#xD;&#xA;&#xD;&#xA;So for level 2, you would need 1111 exp, and for level 3 you would need 2500." />
  <row Id="30752" PostHistoryTypeId="5" PostId="13798" RevisionGUID="7eaaac71-ad61-42d1-a206-1808e1a3e5e2" CreationDate="2011-06-17T13:58:23.327" UserId="7993" Comment="added 238 characters in body" Text="I recently asked this question on how to calculate a level based on experience:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/13638/algorithm-for-dynamically-calculating-a-level-based-on-experience-points&#xD;&#xA;&#xD;&#xA;I am using the following calculation to determine the players level:&#xD;&#xA;&#xD;&#xA;    decimal experience = 1829;&#xD;&#xA;    decimal rawLevel = (decimal)(.06 * Math.Sqrt(experience));&#xD;&#xA;    decimal level = Math.Floor(rawLevel);&#xD;&#xA;&#xD;&#xA;For my test, `1829` experience points equates to `2.56600857364117M`, which I floor to level 2.&#xD;&#xA;&#xD;&#xA;My question is, how can I figure out how many points it would take to get to the next level based off of the calculation above?  &#xD;&#xA;&#xD;&#xA;I know the next level is 3, so I would need to figure out how many points equate to level 3 so that I can find the difference.  What formula would I use, given the constant .06 above?&#xD;&#xA;&#xD;&#xA;**Update: Solution:**&#xD;&#xA;&#xD;&#xA;    int experience = 150777;&#xD;&#xA;    decimal rawLevel = (decimal)(.06 * Math.Sqrt(experience));&#xD;&#xA;    decimal level = Math.Floor(rawLevel);&#xD;&#xA;    decimal nextPoints = (decimal)Math.Pow((double)(level + 1) / 0.06, 2);" />
  <row Id="30753" PostHistoryTypeId="5" PostId="13799" RevisionGUID="3ee1f9a6-b0a1-4b0f-aa75-b04b796f6ea4" CreationDate="2011-06-17T14:02:42.690" UserId="7588" Comment="added 193 characters in body" Text="You just need to do the inverse calculations in the inverse order :&#xD;&#xA;&#xD;&#xA;    Exp = (Level / 0.06)²&#xD;&#xA;&#xD;&#xA;So for level 2, you would need 1111 exp, and for level 3 you would need 2500.&#xD;&#xA;&#xD;&#xA;I wrote a [small piece](http://ideone.com/yjv2G) of code to see the exp needed for certain levels : the rounding isn't great it's not very nice for a player to see 'Next Level : 64944 Exp'." />
  <row Id="30754" PostHistoryTypeId="2" PostId="13800" RevisionGUID="213548e4-833c-409b-9c6c-eda5d76c6993" CreationDate="2011-06-17T14:09:11.397" UserId="5899" Text="The component architecture is an alternative to avoid the large hierarchies that are achieved inheriting all elements from a same node, and the problems of coupling that leads.&#xD;&#xA;&#xD;&#xA;You are showing a component architecture with &quot;generic&quot; components. You have the basic logic to attach and detach &quot;generic&quot; components. An architecture with generic components is more difficult to achieve because you don't know which component is. The benefits is that this approach is extensible.&#xD;&#xA;&#xD;&#xA;A valid component architecture is achieved with defined components. With defined I mean, the interface is defined, not the implementation. For example, GameObject can have a IPhysicInstance, Transformation, IMesh, IAnimationController. This has the benefit that you know the interface and the GameObject knows how to deal with each component." />
  <row Id="30755" PostHistoryTypeId="2" PostId="13801" RevisionGUID="e2aeadbc-dba3-4fd6-819f-45995534475b" CreationDate="2011-06-17T14:12:31.600" UserId="6188" Text="Various versions of DirectX are available on both Windows and Xbox. Are the libraries the same on both platforms? Obviosly I'm talking about the interfaces &amp;mdash; such as the ones for working with windows, input, etc &amp;mdash;, not their actual implementation." />
  <row Id="30756" PostHistoryTypeId="1" PostId="13801" RevisionGUID="e2aeadbc-dba3-4fd6-819f-45995534475b" CreationDate="2011-06-17T14:12:31.600" UserId="6188" Text="DirectX the same across platforms?" />
  <row Id="30757" PostHistoryTypeId="3" PostId="13801" RevisionGUID="e2aeadbc-dba3-4fd6-819f-45995534475b" CreationDate="2011-06-17T14:12:31.600" UserId="6188" Text="&lt;directx&gt;&lt;xbox360&gt;&lt;windows&gt;&lt;xbox&gt;" />
  <row Id="30758" PostHistoryTypeId="2" PostId="13802" RevisionGUID="77bdf1c2-d1a8-4ca4-b281-46890824e925" CreationDate="2011-06-17T14:13:39.540" UserId="1430" Text="You're calling [SetTexture][1] in your main program (effectively). This binds the texture to a sampler index, not a named sampler variable in shader code... you're not assigning `Tex2D` in the shader anything. So when you sample it, you get black (all-zero) and multiplying all-zero the way you do will of course still yield all-zero.&#xD;&#xA;&#xD;&#xA;You could confirm this by simply outputting a flat color from the shader instead -- don't multiply by the sampled color -- and you should see something.&#xD;&#xA;&#xD;&#xA;To fix this, you could use the Effect interface and call SetTexture on a compiled effect, or you could indicate that your sampler should be bound to register 0 (which is what you're setting the texture to):&#xD;&#xA;&#xD;&#xA;    sampler someSampler : register(0);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb174461%28v=VS.85%29.aspx" />
  <row Id="30759" PostHistoryTypeId="5" PostId="13799" RevisionGUID="60dbfc9a-6ba8-4ca7-9581-dcd2c93a4a5f" CreationDate="2011-06-17T14:14:49.057" UserId="7588" Comment="added 167 characters in body" Text="You just need to do the inverse calculations in the inverse order :&#xD;&#xA;&#xD;&#xA;    Exp = (Level / 0.06)²&#xD;&#xA;&#xD;&#xA;So for level 2, you would need 1111 exp, and for level 3 you would need 2500.&#xD;&#xA;&#xD;&#xA;I wrote a [small piece](http://ideone.com/yjv2G) of code to see the exp needed for certain levels : the rounding isn't great it's not very nice for a player to see 'Next Level : 64944 Exp'.&#xD;&#xA;&#xD;&#xA;What you could do is use a litte trick to make your level exp more 'rounded', just divide and then multiply by 10.&#xD;&#xA;&#xD;&#xA;[Code Exmaple Here!](http://ideone.com/8yCfl)" />
  <row Id="30760" PostHistoryTypeId="2" PostId="13803" RevisionGUID="93768bc0-feec-4dce-aefb-16e1552e0496" CreationDate="2011-06-17T14:15:47.247" UserId="1430" Text="The APIs available on Windows and the 360 are similar, but they are not the same. It's not really possible to provide more details without running afoul of NDAs, really.&#xD;&#xA;&#xD;&#xA;However, you could look at the difference between how XNA operates on Windows and on the 360 for some vague, rough ideas of about the class of differences you may expect to see, at least in terms of how behavior and functionality can differ even though the API remains the same." />
  <row Id="30761" PostHistoryTypeId="5" PostId="13799" RevisionGUID="d3840879-2f81-42a2-8469-782878caeaf0" CreationDate="2011-06-17T14:21:13.400" UserId="7588" Comment="edited body" Text="You just need to do the inverse calculations in the inverse order :&#xD;&#xA;&#xD;&#xA;    Exp = (Level / 0.06)²&#xD;&#xA;&#xD;&#xA;So for level 2, you would need 1111 exp, and for level 3 you would need 2500.&#xD;&#xA;&#xD;&#xA;I wrote a [small piece](http://ideone.com/yjv2G) of code to see the exp needed for certain levels : the rounding isn't great it's not very nice for a player to see 'Next Level : 64944 Exp'.&#xD;&#xA;&#xD;&#xA;What you could do is use a litte trick to make your level exp more 'rounded', just divide and then multiply by 10.&#xD;&#xA;&#xD;&#xA;[Code Exmaple Here!](http://ideone.com/XWF11)" />
  <row Id="30762" PostHistoryTypeId="2" PostId="13804" RevisionGUID="977bb915-907a-428b-864a-5c7aba9a1e9e" CreationDate="2011-06-17T14:36:21.503" UserId="1430" Text="First of all, you when build component-based systems, you don't *have* to take the approach of turning *everything* into a component. In fact, you generally shouldn't -- it's something of a neophyte mistake. In my experience the best way to tie together rendering and physics systems in a component based architecture is to make those components little more than dumb containers for the real rendering or physics primitive object.&#xD;&#xA;&#xD;&#xA;This has the added advantage of keeping the rendering and physics systems decoupled from the component system.&#xD;&#xA;&#xD;&#xA;For physics systems, for example, the physics simulator generally keeps a big list of rigid body objects that it manipulates every time it ticks. Your component system does not mess with that -- your physics component simply stores a reference to the rigid body that represents the physical aspects of the object the component belongs to, and translates any messages from the component system into appropriate manipulations of the rigid body.&#xD;&#xA;&#xD;&#xA;Likewise with rendering -- your renderer will have something representing the instance data to be rendered, and your visual component simply holds on to a reference to that. &#xD;&#xA;&#xD;&#xA;It's relatively straightforward -- for whatever reason it seems to confuse people, but that's often because they are thinking about it too hard. There's not a lot of magic there. And since it's most important to get things done rather than agonize over the perfect design, you should strongly consider an approach where at least some of the components have defined interfaces and are direct members of the game object, as momboco has suggested. It's just as valid an approach and it tends to be easier to grok.&#xD;&#xA;&#xD;&#xA;**Other Comments**&#xD;&#xA;&#xD;&#xA;This is unrelated to your direct questions, but these are things I noticed when looking at your code:&#xD;&#xA;&#xD;&#xA;Why are you mixing Ogre::String and std::string in your game object, which is ostensibly a non-graphics object and thus should not have a dependency on Ogre? I would suggest removing all direct references to Ogre except in the rendering component itself, where you should do your transformation.&#xD;&#xA;&#xD;&#xA;update() is a pure virtual, which implies that one must subclass GameObject, which is actually kind of exactly the opposite of the direction you want to go in with a component architecture. The main point of using components is to prefer aggregation of functionality rather than inheritance.&#xD;&#xA;&#xD;&#xA;You could benefit from some use of `const` (particular where you are returning by reference). Also I'm not sure that you really want velocity to be a scalar (or if it, and position, should be present in the game object in the kind of overly generic component methodology you seem to be going for).&#xD;&#xA;&#xD;&#xA;Your approach of a using a big map of components and an `update()` call in the game object is quite sub-optimal (and a common pitfall for those first building these sorts of systems). It makes for very poor cache coherency during the update and doesn't allow you to take advantage of concurrency and the trend towards SIMD-style process of large batches of data or behavior at once. It's often better to use a design where the game object doesn't update its components, but rather the subsystem responsible for the component itself updates them all at once. [This][1] might be worth a read.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/" />
  <row Id="30763" PostHistoryTypeId="5" PostId="13759" RevisionGUID="a5285fc2-c21f-4228-88b0-0aba51cba545" CreationDate="2011-06-17T14:45:37.260" UserId="6442" Comment="added 1557 characters in body" Text="**Edit:** Since some people got a bit confused as to what I meant, I'm going to elaborate a bit.&#xD;&#xA;&#xD;&#xA;This is called a [race condition][1]. You don't go into a lot of detail as to how your game works, but here is what I can offer:&#xD;&#xA;&#xD;&#xA; - If you can draw the data-dependent stuff onto a reasonably-sized surface, you can draw once, then keep the surface, and draw it onto the screen while processing. This way you can redraw cursor, HUD, etc onto the screen, but not ruin the game image, since you have it as a separate surface. **Edit:** So the procedure would now be: render onto work_in_progress_surface and blit last_stable_surface onto the screen, until you are done with AI and moving things. Now blit work_in_progress_surface onto last_stable surface and clear it for the next frame. Get user input and repeat. The main idea here is that you keep the last good frame separated.&#xD;&#xA; - You can save the new data in an alternate memory space. Once everything is calculated, just point to the new data and deallocate the old. You might want to / have to split game data into two parts: screen-changers and behind-the-scenes data. Or flag it, however you like. **Edit:** One possible way to implement this is to make a list of all objects that could change in mid-render. Before applying AI and moving things make a deep copy of everything listed, render the old data but modify the new data. When your AI/moving is finished, just deep copy all new data into the normal objects.&#xD;&#xA; - If the AI/moving is guaranteed to be very fast - less than ~200ms where it doesn't bother users, you could just suspend rendering and the UI through a semaphore. Set it to 0 when the renderer is running, then have the AI/moving set it to 1 and wait, when the renderer finishes, it should look at it before starting again. When it sees the 1 it will set it to 2 and stop rendering. The AI/moving will see the 2 and start working. When all render data has been modified, the AI/moving sets it back to 0 and backgrounds. The render thread sees the 0 and resumes rendering. This is how a pretty simple semaphore works, don't skip the extra transitional phase, think about why it's there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Race_conditions" />
  <row Id="30764" PostHistoryTypeId="6" PostId="13773" RevisionGUID="994a1d01-278a-4f4c-a541-7c90b85dc484" CreationDate="2011-06-17T14:47:30.783" UserId="3588" Comment="I mean, when it comes to a question that is &quot;How do I rotate&quot;, it'd be shameful if I let it by without adding the tag ♪" Text="&lt;xna&gt;&lt;rotation&gt;&lt;rectangles&gt;" />
  <row Id="30765" PostHistoryTypeId="24" PostId="13773" RevisionGUID="994a1d01-278a-4f4c-a541-7c90b85dc484" CreationDate="2011-06-17T14:47:30.783" Comment="Proposed by 3588 approved by 14 edit id of 500" />
  <row Id="30766" PostHistoryTypeId="2" PostId="13805" RevisionGUID="fc91f8c0-056c-4c64-b1ef-2329d754b592" CreationDate="2011-06-17T14:56:46.387" UserId="3874" Text="I'm making a (non isometric) side scrolling 2D game and I want each fragment that I draw to cast a small drop shadow when it is near another object. What sorts of algorithms are used in fragment shaders to cast shadows in 2D games?&#xD;&#xA;Thanks" />
  <row Id="30767" PostHistoryTypeId="1" PostId="13805" RevisionGUID="fc91f8c0-056c-4c64-b1ef-2329d754b592" CreationDate="2011-06-17T14:56:46.387" UserId="3874" Text="Casting a shadow over a whole scene with GLSL?" />
  <row Id="30768" PostHistoryTypeId="3" PostId="13805" RevisionGUID="fc91f8c0-056c-4c64-b1ef-2329d754b592" CreationDate="2011-06-17T14:56:46.387" UserId="3874" Text="&lt;c++&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="30769" PostHistoryTypeId="2" PostId="13806" RevisionGUID="99f8a5eb-30e8-4ee3-8e7a-9703da86c868" CreationDate="2011-06-17T15:13:20.610" UserId="4584" Text="If I sat down long enough, I'm sure I could make this happen, but I don't want to reinvent the wheel if I don't have to, especially if XNA has patterns in place for doing this.&#xD;&#xA;&#xD;&#xA;For now, I'm working in a very low resolution world, minecraft style. Everything is a simple cube that's 1x1x1. Currently I can move and look around but the camera is floating above the cubes, it doesn't use the cubes to determine where the camera is or where the camera should not be.&#xD;&#xA;&#xD;&#xA;I'm just looking for the simplest of physics, such as not walking through blocks, if I walk off a cliff the character (camera) should fall and land the proper height above the ground, and general movement physics that you would expect out of even the most basic of games.&#xD;&#xA;&#xD;&#xA;My first approach was to have a BoundingSphere for the character and a BoundingBox on each cube but when I detect a collision between the sphere and any box, how do I correct the character's placement to not intersect anymore?&#xD;&#xA;&#xD;&#xA;I'm open to any alternatives and techniques that are out there." />
  <row Id="30770" PostHistoryTypeId="1" PostId="13806" RevisionGUID="99f8a5eb-30e8-4ee3-8e7a-9703da86c868" CreationDate="2011-06-17T15:13:20.610" UserId="4584" Text="Tried and true basic movement physics (jumping, not walking through stuff)?" />
  <row Id="30771" PostHistoryTypeId="3" PostId="13806" RevisionGUID="99f8a5eb-30e8-4ee3-8e7a-9703da86c868" CreationDate="2011-06-17T15:13:20.610" UserId="4584" Text="&lt;xna&gt;&lt;physics&gt;&lt;movement&gt;" />
  <row Id="30772" PostHistoryTypeId="2" PostId="13807" RevisionGUID="f8f18b20-fdce-4750-bcc8-1ff2501f2014" CreationDate="2011-06-17T15:13:42.370" UserId="7514" Text="I decided it was time to stick in a bit of multiplayer into my game, but came across my first hurdle when i quickly downloaded an example from the XNA website.&#xD;&#xA;&#xD;&#xA;It prompted me with a login to live. However i really DO NOT want my game to use live accounts.&#xD;&#xA;&#xD;&#xA;This is PC btw.&#xD;&#xA;&#xD;&#xA;Basically i wanted to know, is it possible to have multiplayer with XNA without logging in through a live account?" />
  <row Id="30773" PostHistoryTypeId="1" PostId="13807" RevisionGUID="f8f18b20-fdce-4750-bcc8-1ff2501f2014" CreationDate="2011-06-17T15:13:42.370" UserId="7514" Text="Multiplayer XNA without a LIVE account? (PC)" />
  <row Id="30774" PostHistoryTypeId="3" PostId="13807" RevisionGUID="f8f18b20-fdce-4750-bcc8-1ff2501f2014" CreationDate="2011-06-17T15:13:42.370" UserId="7514" Text="&lt;xna&gt;&lt;multiplayer&gt;&lt;xna-4.0&gt;" />
  <row Id="30775" PostHistoryTypeId="5" PostId="13807" RevisionGUID="d03f41e7-83e5-4f5c-9c24-893f9e659ad7" CreationDate="2011-06-17T15:20:08.187" UserId="7514" Comment="added 119 characters in body" Text="I decided it was time to stick in a bit of multiplayer into my game, but came across my first hurdle when i quickly downloaded an example from the XNA website.&#xD;&#xA;&#xD;&#xA;It prompted me with a login to live. However i really DO NOT want my game to use live accounts.&#xD;&#xA;&#xD;&#xA;This is PC btw.&#xD;&#xA;&#xD;&#xA;Basically i wanted to know, is it possible to have multiplayer with XNA without logging in through a live account?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, is it better to stick with the built in XNA networking, or use a totally different library such as lidgren?" />
  <row Id="30776" PostHistoryTypeId="2" PostId="13808" RevisionGUID="07c2eab9-4948-4064-b6e2-f3f038863d81" CreationDate="2011-06-17T15:21:12.457" UserId="4894" Text="I'm writing a 3D game which is going to inlcude some dynamic meshes. &#xD;&#xA;&#xD;&#xA;For now, my code looks like this : &#xD;&#xA;&#xD;&#xA;    private float[] mVertices;&#xD;&#xA;    private FloatBuffer mVertexBuffer;&#xD;&#xA;    &#xD;&#xA;    public void onDrawFrame(GL10 gl) {&#xD;&#xA;    	// first clear the screen of any previous drawing&#xD;&#xA;    	gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);&#xD;&#xA;    &#xD;&#xA;    	// initialize the matrix&#xD;&#xA;    	gl.glMatrixMode(GL10.GL_MODELVIEW);&#xD;&#xA;    	gl.glLoadIdentity();&#xD;&#xA;    	&#xD;&#xA;    	// update the vertex data &#xD;&#xA;    	for (int vtx = 0; vtx &lt; mVtxCount; ++vtx){&#xD;&#xA;    		// fill in the x, y and z components of the vertex position&#xD;&#xA;    		mVertices[vtx * 3] = x;&#xD;&#xA;    		mVertices[(vtx * 3) + 1] = y;&#xD;&#xA;    		mVertices[(vtx * 3) + 2] = z;&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	// update the vertex buffer&#xD;&#xA;    	mVertexBuffer.clear();&#xD;&#xA;    	mVertexBuffer.put(mVertices);&#xD;&#xA;    	mVertexBuffer.position(0);&#xD;&#xA;    	&#xD;&#xA;    	// render the vertex buffer&#xD;&#xA;    	gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);&#xD;&#xA;    	gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer);&#xD;&#xA;    	gl.glDrawElements(GL10.GL_LINES, mIndices.length,&#xD;&#xA;    				GL10.GL_UNSIGNED_BYTE, mIndexBuffer);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Here is an easy sample as the index buffer does not change so I only update the vertex position, normal and texture coordinates. &#xD;&#xA;&#xD;&#xA;Of course I understand dynamic mesh will always be slower to render than static mesh, but I wonder if the method I use is good or if there is a faster / better way to do this . " />
  <row Id="30777" PostHistoryTypeId="1" PostId="13808" RevisionGUID="07c2eab9-4948-4064-b6e2-f3f038863d81" CreationDate="2011-06-17T15:21:12.457" UserId="4894" Text="Faster way to draw dynamic meshes in OpenGL ES" />
  <row Id="30778" PostHistoryTypeId="3" PostId="13808" RevisionGUID="07c2eab9-4948-4064-b6e2-f3f038863d81" CreationDate="2011-06-17T15:21:12.457" UserId="4894" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;3d-meshes&gt;" />
  <row Id="30779" PostHistoryTypeId="25" PostId="13806" RevisionGUID="b172bb3f-9ab0-4e66-8606-4efb69231f4b" CreationDate="2011-06-17T15:24:24.447" Comment="http://twitter.com/#!/StackGameDev/status/81744005406277633" />
  <row Id="30780" PostHistoryTypeId="2" PostId="13809" RevisionGUID="0d672ea2-f80c-48cb-9787-ef055fc3a073" CreationDate="2011-06-17T15:27:03.963" UserId="1430" Text="[This blog post][1] may address your issue to a degree (it's fairly old but I don't think things have changed that much).&#xD;&#xA;&#xD;&#xA;If you are only targetting the PC, you don't need to use the networking functionality provided by XNA (which will tend to want Live profiles) -- you can use the standard networking functionality built in C# itself and roll your own networking layer entirely, or use a third party one.&#xD;&#xA;&#xD;&#xA;Whether or not that is &quot;better&quot; depends on a lot of factors, but if Live accounts are a deal-breaker for you, using something third-party is probably better in that regard.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/xna/archive/2007/11/16/xna-framework-networking-and-live-requirements.aspx" />
  <row Id="30781" PostHistoryTypeId="5" PostId="13763" RevisionGUID="8d2881ec-a686-430d-93ce-ffe6d06acb59" CreationDate="2011-06-17T15:38:34.227" UserId="2061" Comment="deleted 14 characters in body" Text="In cases where you are using singletons, static classes, or global variables, 99% of the time what you should really be using is a [game service][1].  Game services are used when you want one instance of a class available to all other classes, but the tight coupling of the other options gives you a funny taste.  Services also don't have the instantiation problems that you've seen, they're more reusable, and they can be [mocked][2] *(if you care about automated unit-testing)*.&#xD;&#xA;&#xD;&#xA;To register a service, you need to give your class its own interface.  Then just call [`Game.Services.AddService()`][3].  To later use that service in another class, call [`Game.Services.GetService()`][4].&#xD;&#xA;&#xD;&#xA;In your case, your class would look something like this:&#xD;&#xA;&#xD;&#xA;    public interface ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;	    void SomeMethod();&#xD;&#xA;		int SomeProperty { get; }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class LevelContentCreation : ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;		private Dictionary&lt;char, TileCreationInfo&gt; availableTiles =&#xD;&#xA;			CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;		private List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;		public void SomeMethod() { /*...*/ }&#xD;&#xA;		public int SomeProperty { get; private set; }&#xD;&#xA;		&#xD;&#xA;		/* ... rest of the class ... */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At some point at the start of the program, you'd have to register your service with `Game.Services`.  *I prefer to do this at the start of `LoadContent()`, but some people prefer to register each service in that class's constructor.*&#xD;&#xA;&#xD;&#xA;    /* Main game */&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;	{&#xD;&#xA;	    RegisterServices();&#xD;&#xA;		&#xD;&#xA;		/* ... */&#xD;&#xA;    }&#xD;&#xA;	&#xD;&#xA;	private void RegisterServices()&#xD;&#xA;	{&#xD;&#xA;	    Game.Services.AddService(typeof(ILevelContentCreation), new LevelContentCreation());&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now whenever you want to access your `LevelContentCreation` class in any other class, you would simply do this:&#xD;&#xA;&#xD;&#xA;    ILevelContentCreation levelContentCreation = (ILevelContentCreation) Game.Services.GetService(typeof(ILevelContentCreation));&#xD;&#xA;    levelContentCreation.SomeMethod(); //Tada!&#xD;&#xA;	&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a side note, this paradigm is known as [Inversion of Control][5] (IoC), and is [widely used][6] outside of XNA development as well.  The most popular framework for IoC in .Net is [Ninject][7], which has nicer syntax than the Game.Services methods:&#xD;&#xA;&#xD;&#xA;    Bind&lt;ILevelContentCreation&gt;().To&lt;LevelContentCreation&gt;(); //Ninject equivalent of Services.AddService()&#xD;&#xA;	ILevelContentCreation levelContentCreation = kernel.Get&lt;ILevelContentCreation&gt;(); //Ninject equivalent of Services.GetService()&#xD;&#xA;&#xD;&#xA;It also supports [dependency injection][8], a form of IoC which is slightly more complex, but much nicer to work with.&#xD;&#xA;&#xD;&#xA;[1]: http://www.progware.org/Blog/post/XNA-Game-Development-%28Scenes-and-Game-Services%29.aspx&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;[3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.addservice.aspx&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.getservice.aspx&#xD;&#xA;[5]: http://stackoverflow.com/questions/45191/ioc-explain-and-more-important-when-to-use-it&#xD;&#xA;[6]: http://stackoverflow.com/search?q=ioc&#xD;&#xA;[7]: http://ninject.org/&#xD;&#xA;[8]: https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand" />
  <row Id="30782" PostHistoryTypeId="2" PostId="13810" RevisionGUID="aceb1399-eba7-4434-a798-125eb5010b8c" CreationDate="2011-06-17T15:46:42.950" UserId="7952" Text="If you want to get the coordinates of the rotated corners, you have to transform the coordinates from the non-rotated space to the rotated space. In other words, you have to multiply them by a matrix. I'm not sure the exact xna syntax, but it should be something like this:&#xD;&#xA;&#xD;&#xA;    float angle = 60;&#xD;&#xA;    Matrix rotate = Matrix.CreateRotationZ(angle);    &#xD;&#xA;    Vector2 transformedPoint = Vector2.Transform(unTransformedPoint, rotate);&#xD;&#xA;&#xD;&#xA;This will rotate the rectangle about it's top left corner. I'm not sure if that's what you want or not, but you can easily change this by adding a translate transform before the rotate transform to change the rotation origin." />
  <row Id="30783" PostHistoryTypeId="5" PostId="920" RevisionGUID="0e23374d-73cc-4988-8ce9-5f095baf25cc" CreationDate="2011-06-17T16:32:40.010" UserId="8096" Comment="updated dead link" Text="Well, in short, achievements are unlocked when a certain condition is met.  So you need to be able to produce if statements to check the condition you want.&#xD;&#xA;&#xD;&#xA;For example, if you want to know that a level was completed or a boss was defeated, you'd need to have boolean flag turn true when these events happen.&#xD;&#xA;&#xD;&#xA;Then:&#xD;&#xA;&#xD;&#xA;    if(GlobalFlags.MasterBossDefeated == true &amp;&amp; AchievementClass.MasterBossDefeatedAchievement == false)&#xD;&#xA;    {&#xD;&#xA;        AchievementClass.MasterBossDefeatedAchievement = true;&#xD;&#xA;        showModalPopUp(&quot;You defeated the Master Boss!  30 gamerscore&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can make this as complex or simplistic as needed to match the condition that you're wanting.&#xD;&#xA;&#xD;&#xA;Some info on Xbox 360 achievements can be found [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.xbox.com/en-US/Live/EngineeringBlog/071510-AchievementsUnlocked" />
  <row Id="30784" PostHistoryTypeId="24" PostId="920" RevisionGUID="0e23374d-73cc-4988-8ce9-5f095baf25cc" CreationDate="2011-06-17T16:32:40.010" Comment="Proposed by 8096 approved by 51 edit id of 502" />
  <row Id="30785" PostHistoryTypeId="5" PostId="13805" RevisionGUID="ccb7b57a-2f43-4464-8be0-84c134f765f6" CreationDate="2011-06-17T16:32:52.007" UserId="3588" Comment="Tags and other notes for shadows, also removing a salutation ♪" Text="I'm making a (non-isometric) side scrolling 2D game and I want each fragment that I draw to cast a small drop shadow when it is near another object. What sort of algorithms are used in fragment shaders to cast shadows in 2D games?" />
  <row Id="30786" PostHistoryTypeId="4" PostId="13805" RevisionGUID="ccb7b57a-2f43-4464-8be0-84c134f765f6" CreationDate="2011-06-17T16:32:52.007" UserId="3588" Comment="Tags and other notes for shadows, also removing a salutation ♪" Text="Casting a shadow over a whole scene with GLSL in 2D?" />
  <row Id="30787" PostHistoryTypeId="6" PostId="13805" RevisionGUID="ccb7b57a-2f43-4464-8be0-84c134f765f6" CreationDate="2011-06-17T16:32:52.007" UserId="3588" Comment="Tags and other notes for shadows, also removing a salutation ♪" Text="&lt;c++&gt;&lt;2d&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;shadows&gt;" />
  <row Id="30788" PostHistoryTypeId="24" PostId="13805" RevisionGUID="ccb7b57a-2f43-4464-8be0-84c134f765f6" CreationDate="2011-06-17T16:32:52.007" Comment="Proposed by 3588 approved by 51 edit id of 501" />
  <row Id="30790" PostHistoryTypeId="2" PostId="13811" RevisionGUID="f7a3153e-1e74-48de-b3ea-ecd873015a10" CreationDate="2011-06-17T16:55:54.770" UserId="7144" Text="It depends on what kind of development you want to do.  If you want to do mobile development for the Android platform, you probably want to learn as much Java as you can.  iPhone/iPad developers will want to know Objective-C.&#xD;&#xA;&#xD;&#xA;If your interest lies more in developing for PC or consoles (XBox, Playstation, etc.), C++ is probably the language you will encounter the most, so in that case you're probably on the right track.&#xD;&#xA;&#xD;&#xA;I would also suggest also becoming familiar with a scripting language - [Lua][1] is a popular choice in the industry today.  Learning how a scripting language like Lua integrates with a C++ program, and where and how it can be useful, is worth your time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org/" />
  <row Id="30791" PostHistoryTypeId="2" PostId="13812" RevisionGUID="a55a3370-cab9-4dbc-9e94-32e3b7f9c6c8" CreationDate="2011-06-17T17:13:30.803" UserId="1966" Text="&quot;Unable to shade polygon normals&quot; is a copy protection trap in Garry's Mod. I am wondering if the game developers put random cryptic graphic terms up or it is really a problem in graphics. It the failure to shade really detectable and reportable?&#xD;&#xA;Are polygon normals really shadeable?" />
  <row Id="30792" PostHistoryTypeId="1" PostId="13812" RevisionGUID="a55a3370-cab9-4dbc-9e94-32e3b7f9c6c8" CreationDate="2011-06-17T17:13:30.803" UserId="1966" Text="Can polygon normals really be shaded?" />
  <row Id="30793" PostHistoryTypeId="3" PostId="13812" RevisionGUID="a55a3370-cab9-4dbc-9e94-32e3b7f9c6c8" CreationDate="2011-06-17T17:13:30.803" UserId="1966" Text="&lt;3d&gt;&lt;graphics&gt;&lt;terminology&gt;" />
  <row Id="30794" PostHistoryTypeId="2" PostId="13813" RevisionGUID="51f0c25b-56e5-4003-87a2-89d8e4ae54bc" CreationDate="2011-06-17T17:29:29.067" UserId="7952" Text="&quot;Can a polygon normal be shaded&quot; - No, a normal is a vector which is a 1-d object, so unless you're going to actually draw the normal and shade it, that statement doesn't make much sense.&#xD;&#xA;&#xD;&#xA;However, shading polygons (2-d objects) commonly use the polygon normal in their shading calculations for light calculations to control how light or dark they can be.&#xD;&#xA;&#xD;&#xA;So, I have no idea what that message is trying to say." />
  <row Id="30795" PostHistoryTypeId="2" PostId="13814" RevisionGUID="c41dcaee-44b2-485f-a14a-fb728986639f" CreationDate="2011-06-17T17:30:39.397" UserId="962" Text="Normals in 3D graphics are a 3D vector indicating orientation or direction.&#xD;&#xA;&#xD;&#xA;Normals themselves cannot be shades, as how can you shade {.1,0,.4} ?&#xD;&#xA;&#xD;&#xA;Normals can be used to shade the polygons themselves. For example, a light source at a certain angle hitting a model made of polygons at a certain angle, the normals of the polygon faces can be used in the shading process to make the light make parts of the model brighter." />
  <row Id="30796" PostHistoryTypeId="2" PostId="13815" RevisionGUID="4b896a78-de5e-4fa0-a679-653069eb4ad8" CreationDate="2011-06-17T18:06:57.520" UserId="4662" Text="&gt; I have seen a lot of posts about how&#xD;&#xA;&gt; drawing should be running separately&#xD;&#xA;&gt; as fast as it can, possibly in another&#xD;&#xA;&gt; thread.&#xD;&#xA;&#xD;&#xA;This is an outdated view of parallelism in game engines. A more modern view would, instead of running simulation and rendering in parallel, parallelise the simulation and rendering separately." />
  <row Id="30797" PostHistoryTypeId="25" PostId="13812" RevisionGUID="fb45b2c5-fc49-4101-ad95-7222f962022a" CreationDate="2011-06-17T18:24:29.860" Comment="http://twitter.com/#!/StackGameDev/status/81789324890357760" />
  <row Id="30798" PostHistoryTypeId="2" PostId="13816" RevisionGUID="a3c1db2a-12d8-453e-8276-37a33e6500f3" CreationDate="2011-06-17T19:52:21.197" UserId="7630" Text="3nixios' link to the other question does address what you're talking about.&#xD;&#xA;&#xD;&#xA;The issue that's holding you back is concurrency (threading) and locking, and being aware of that it can be a problem is half the battle.&#xD;&#xA;&#xD;&#xA;I suggest following the link to the other question, but the short version is that you will only draw or update the unlocked items, but before you do you'll ask the program to lock the object/variable.  After you are done with it, you'll unlock it.&#xD;&#xA;&#xD;&#xA;The wikipedia article on this isn't a bad starting point.  http://en.wikipedia.org/wiki/Lock_(computer_science)&#xD;&#xA;&#xD;&#xA;There are issues around lock contention and dead locks and such, but any good concurrency reference will discuss these in gory detail.&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="30803" PostHistoryTypeId="5" PostId="3492" RevisionGUID="8e76fc96-9ba0-4b65-94d9-3710a1dcb0ed" CreationDate="2011-06-17T20:27:16.820" UserId="3588" Comment="Some italics for titles, a couple acutes, and some grammatical fixes ♪" Text="In some games, when you miss a pickup, you can never get it again unless you restart the game, and those pickups count in your collection. (therefore, you must restart the game to finish the collection, if you made any mistakes).&#xD;&#xA;&#xD;&#xA;In *Pokémon*, you have only one Master Ball, limited supply of Ethers and legendary Pokémon appear once per game. Trading fixes all of those problems.&#xD;&#xA;&#xD;&#xA;For a more radical perfectionist, they demanded all dialogs, background music, and even items to be revisitable. Some games, like *Naruto Ninja Council*, satisfied all of those needs.&#xD;&#xA;&#xD;&#xA;Is it always a good practice to make things revisitable? Even cutscenes and music? When is it not a good practice to do so?" />
  <row Id="30804" PostHistoryTypeId="24" PostId="3492" RevisionGUID="8e76fc96-9ba0-4b65-94d9-3710a1dcb0ed" CreationDate="2011-06-17T20:27:16.820" Comment="Proposed by 3588 approved by 51 edit id of 503" />
  <row Id="30807" PostHistoryTypeId="2" PostId="13819" RevisionGUID="207d8ac1-7e62-43a2-9b50-2b91f2932ac3" CreationDate="2011-06-17T22:59:25.207" UserId="5572" Text="The question isn't the greatest wording ever sorry.&#xD;&#xA;&#xD;&#xA;I have been learning about and prototyping some texture and terrain generation stuff and have run into something perhaps you can help me with.&#xD;&#xA;&#xD;&#xA;How it works:&#xD;&#xA;I am procedurally generating a terrain height map. It can scroll endlessly in any direction. (image 1)&#xD;&#xA;I clamp and mix the colors depending on the value of the height map (image 2)&#xD;&#xA;&#xD;&#xA;This is working very well and runs very fast currently, it is after all very simplistic at the moment.&#xD;&#xA;&#xD;&#xA;What I need to find is a good way to blur/distort between the terrain transitions. As you can see currently it has very ridged lines and doesn't look all that natural. Given that this is whole thing is procedurally generated I obviously need to find an algo for the blending that can run on the fly. I attempted a bit of pixel jittering and it just looked bad. Also what ever I use has to be able to be seeded so that it maintains consistency (though I doubt that will be a problem since they will most likely all run on randoms).&#xD;&#xA;&#xD;&#xA;![GreyScaleHeightMap][1]&#xD;&#xA;![ColorHeightMap][2]&#xD;&#xA;  [1]: http://i.stack.imgur.com/usUsz.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/a4l9Z.jpg&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Any insight would be much appreciated.&#xD;&#xA;If I managed to leave out any needed info in my rush to post this just let me know." />
  <row Id="30808" PostHistoryTypeId="1" PostId="13819" RevisionGUID="207d8ac1-7e62-43a2-9b50-2b91f2932ac3" CreationDate="2011-06-17T22:59:25.207" UserId="5572" Text="Procedurally generated terrain map. Blend Transitions between terrain types." />
  <row Id="30809" PostHistoryTypeId="3" PostId="13819" RevisionGUID="207d8ac1-7e62-43a2-9b50-2b91f2932ac3" CreationDate="2011-06-17T22:59:25.207" UserId="5572" Text="&lt;textures&gt;&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="30810" PostHistoryTypeId="2" PostId="13820" RevisionGUID="982ff920-11d2-48cc-a7cb-f5c26081b8cc" CreationDate="2011-06-17T23:06:08.867" UserId="5824" Text="I think the simplest algorithm would just follow two rules:&#xD;&#xA;&#xD;&#xA;1. If the current target is closer to the missile than the turning diameter then keep going straight. This avoids the missile orbiting close targets instead of actually getting to them.&#xD;&#xA;&#xD;&#xA;2. Otherwise turn towards the target until you are pointing at it.&#xD;&#xA;&#xD;&#xA;To calculate the point where the turn ends in 2D:&#xD;&#xA;&#xD;&#xA;1. At the point where you want to start turning, the centre of the turning circle is located in a direction perpendicular to the current heading at a distance of your turning radius. Note that there's two of those points - you probably want the one closest to your target. Calculate that position and call it P.&#xD;&#xA;&#xD;&#xA;2. You can now construct a right angled triangle with the right angle at the tangent, and two known points - P and your destination. This lets you calculate the distance from the tangent to your target point with Pythagoras. Call it D.&#xD;&#xA;&#xD;&#xA;3. Now you need to [calculate the intersection][1] of a circle of radius D at your destination with your turning circle. You'll get two solutions which are the two tangent points on that circle where the missile would stop turning (one for each direction of travel round the circle). Pick the point that is in front of the missile - that is your answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://paulbourke.net/geometry/2circle/" />
  <row Id="30811" PostHistoryTypeId="2" PostId="13821" RevisionGUID="ab6901f0-ad47-4915-bc12-a6ac21afe3ba" CreationDate="2011-06-17T23:20:16.947" UserId="2845" Text="When I did this I ended up making a simple gradient file (xml or image based, doesn't matter) that predetermined the color used at the specified distance between the primary height colors (grass vs. sand for instance). This way, there were inbetween states. What is great about this is that you have full control over the transitions.&#xD;&#xA;&#xD;&#xA;I suppose that you could also write something that found the mix color based on primary color distance in height via some sort of blending, but, not being a developer beyond hobby, I'm unfamiliar with such technologies (yet).&#xD;&#xA;&#xD;&#xA;Here's some gradients I've used. Note that it you can adjust the colors based on the current height:&#xD;&#xA;&#xD;&#xA;More grassy/coastal: ![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Full spectrum: ![enter image description here][3]&#xD;&#xA;&#xD;&#xA;And here's how it looked. Note bad for fractal at low detail imo...&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/aQqyg.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/JJKzY.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/vokKk.png" />
  <row Id="30812" PostHistoryTypeId="5" PostId="13821" RevisionGUID="5e37c801-003b-4e23-864a-08c70a25e806" CreationDate="2011-06-17T23:27:14.390" UserId="2845" Comment="deleted 1 characters in body" Text="When I did this I ended up making a simple gradient file (xml or image based, doesn't matter) that predetermined the color used at the specified distance between the primary height colors (grass vs. sand for instance). This way, there were inbetween states. What is great about this is that you have full control over the transitions.&#xD;&#xA;&#xD;&#xA;I suppose that you could also write something that found the mix color based on primary color distance in height via some sort of blending, but, not being a developer beyond hobby, I'm unfamiliar with such technologies (yet).&#xD;&#xA;&#xD;&#xA;Here's some gradients I've used. Note that it you can adjust the colors based on the current height:&#xD;&#xA;&#xD;&#xA;More grassy/coastal: ![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Full spectrum: ![enter image description here][3]&#xD;&#xA;&#xD;&#xA;And here's how it looked. Not bad for fractal at low detail imo...&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/aQqyg.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/JJKzY.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/vokKk.png" />
  <row Id="30814" PostHistoryTypeId="25" PostId="13819" RevisionGUID="4d476b41-bfcc-4a36-9241-e6a4099b9be0" CreationDate="2011-06-18T00:24:30.513" Comment="http://twitter.com/#!/StackGameDev/status/81879926466281472" />
  <row Id="30815" PostHistoryTypeId="5" PostId="13778" RevisionGUID="a960f9c2-44d3-44a7-b965-9e41f47b5ec5" CreationDate="2011-06-18T00:34:49.600" UserId="2061" Comment="added 5 characters in body; added 7 characters in body" Text="If these are each separate `DrawableGameComponents`, you should set the [`DrawOrder`][1] property of each component so that they draw in the correct order.&#xD;&#xA;&#xD;&#xA;To make it more manageable as you add more components, the `DrawOrder` should be an `enum`:&#xD;&#xA;&#xD;&#xA;    /* DisplayLayer.cs */&#xD;&#xA;	public enum DisplayLayer&#xD;&#xA;	{&#xD;&#xA;		Background, //back-layer&#xD;&#xA;		Particles,&#xD;&#xA;		Player,&#xD;&#xA;		MenuBack,&#xD;&#xA;		MenuFront //front-layer&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class MyComponent : DrawableGameComponent&#xD;&#xA;	{&#xD;&#xA;	    public MyComponent(Game game) : base(game)&#xD;&#xA;		{&#xD;&#xA;		    this.DrawOrder = (int)DisplayLayer.Background;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		/* etc. */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If this is all being drawn within a single `DrawableGameComponent`, then you should take @Andrew's advice and simply draw them in the correct order.  If for some reason you can't do that, you can still have the clarity of `enum`s when using `layerDepth` by simply normalizing the value of the `enum` to be between 0 and 1:&#xD;&#xA;&#xD;&#xA;	/* DisplayLayer.cs */&#xD;&#xA;	public enum DisplayLayer&#xD;&#xA;	{&#xD;&#xA;		MenuFront, //front-layer&#xD;&#xA;		MenuBack,&#xD;&#xA;		Player,&#xD;&#xA;		Particles,&#xD;&#xA;		Background, //back-layer&#xD;&#xA;		MAX_LAYER   //Do not use this as a layer&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void Draw()&#xD;&#xA;	{&#xD;&#xA;	    spriteBatch.Begin(SpriteSortMode.BackToFront);&#xD;&#xA;		foreach(Thingy thingy in thingys)&#xD;&#xA;			spriteBatch.Draw(/* blah blah */, (float)thingy.DisplayLayer/(float)DisplayLayer.MAX_LAYER);&#xD;&#xA;		spriteBatch.End();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;*(The ordering of the `enum` is reversed because `layerDepth` uses lower numbers for the front-layer rather than the back-layer)*&#xD;&#xA;&#xD;&#xA;[1]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.drawablegamecomponent.draworder.aspx" />
  <row Id="30816" PostHistoryTypeId="5" PostId="13763" RevisionGUID="bf3dfa53-2d8d-4310-a852-ee9d079e8306" CreationDate="2011-06-18T00:56:07.157" UserId="2061" Comment="added 447 characters in body; edited body; deleted 2 characters in body" Text="In cases where you are using singletons, static classes, or global variables, 99% of the time what you should really be using is a [game service][1].  Game services are used when you want one instance of a class available to all other classes, but the tight coupling of the other options gives you a funny taste.  Services also don't have the instantiation problems that you've seen, they're more reusable, and they can be [mocked][2] *(if you care about automated unit-testing)*.&#xD;&#xA;&#xD;&#xA;To register a service, you need to give your class its own interface.  Then just call [`Game.Services.AddService()`][3].  To later use that service in another class, call [`Game.Services.GetService()`][4].&#xD;&#xA;&#xD;&#xA;In your case, your class would look something like this:&#xD;&#xA;&#xD;&#xA;    public interface ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;	    void SomeMethod();&#xD;&#xA;		int SomeProperty { get; }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class LevelContentCreation : ILevelContentCreation&#xD;&#xA;	{&#xD;&#xA;		private Dictionary&lt;char, TileCreationInfo&gt; availableTiles =&#xD;&#xA;			CreateAvailableTiles();&#xD;&#xA;&#xD;&#xA;		private List&lt;string&gt; AvailableTileSheets { get; set; }&#xD;&#xA;&#xD;&#xA;		public void SomeMethod() { /*...*/ }&#xD;&#xA;		public int SomeProperty { get; private set; }&#xD;&#xA;		&#xD;&#xA;		/* ... rest of the class ... */&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;At some point at the start of the program, you'd have to register your service with `Game.Services`.  *I prefer to do this at the start of `LoadContent()`, but some people prefer to register each service in that class's constructor.*&#xD;&#xA;&#xD;&#xA;    /* Main game */&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;	{&#xD;&#xA;	    RegisterServices();&#xD;&#xA;		&#xD;&#xA;		/* ... */&#xD;&#xA;    }&#xD;&#xA;	&#xD;&#xA;	private void RegisterServices()&#xD;&#xA;	{&#xD;&#xA;	    Game.Services.AddService(typeof(ILevelContentCreation), new LevelContentCreation());&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Now whenever you want to access your `LevelContentCreation` class in any other class, you would simply do this:&#xD;&#xA;&#xD;&#xA;    ILevelContentCreation levelContentCreation = (ILevelContentCreation) Game.Services.GetService(typeof(ILevelContentCreation));&#xD;&#xA;    levelContentCreation.SomeMethod(); //Tada!&#xD;&#xA;	&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a side note, this paradigm is known as [Inversion of Control][5] (IoC), and is [widely used][6] outside of XNA development as well.  The most popular framework for IoC in .Net is [Ninject][7], which has nicer syntax than the Game.Services methods:&#xD;&#xA;&#xD;&#xA;    Bind&lt;ILevelContentCreation&gt;().To&lt;LevelContentCreation&gt;(); //Ninject equivalent of Services.AddService()&#xD;&#xA;	ILevelContentCreation levelContentCreation = kernel.Get&lt;ILevelContentCreation&gt;(); //Ninject equivalent of Services.GetService()&#xD;&#xA;&#xD;&#xA;It also supports [dependency injection][8], a form of IoC which is slightly more complex, but much nicer to work with.&#xD;&#xA;&#xD;&#xA;**[Edit]** Of course, you can get that nice syntax with XNA too:&#xD;&#xA;&#xD;&#xA;    static class ServiceExtensionMethods&#xD;&#xA;    {&#xD;&#xA;        public static void AddService&lt;T&gt;(this GameServiceContainer services, T service)&#xD;&#xA;        {&#xD;&#xA;            services.AddService(typeof(T), service);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public static T GetService&lt;T&gt;(this GameServiceContainer services)&#xD;&#xA;        {&#xD;&#xA;            return (T)services.GetService(typeof(T));&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;[1]: http://www.progware.org/Blog/post/XNA-Game-Development-%28Scenes-and-Game-Services%29.aspx&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Mock_object&#xD;&#xA;[3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.addservice.aspx&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.gameservicecontainer.getservice.aspx&#xD;&#xA;[5]: http://stackoverflow.com/questions/45191/ioc-explain-and-more-important-when-to-use-it&#xD;&#xA;[6]: http://stackoverflow.com/search?q=ioc&#xD;&#xA;[7]: http://ninject.org/&#xD;&#xA;[8]: https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand" />
  <row Id="30817" PostHistoryTypeId="2" PostId="13822" RevisionGUID="da594850-39f5-4ccb-9778-2402ce5507ed" CreationDate="2011-06-18T01:15:00.010" UserId="8104" Text="I am trying to make my own game for fun, it is basically a 2d side scrolling shooter, with dynamically generated enemies, levels, loot, and some other things. Currently I have dozens of XML files that define pretty much everything when it comes to the content, along with some constraints to keep things sane. Often times certain things like Weapons or Monsters are composed of several randomized sub components, that get picked out of a pool, according to factors such as rarity, the player level, and the game level.&#xD;&#xA;&#xD;&#xA;Currently the way I have it setup, is where during initialization the game creates several factory classes (stuff like WeaponFactory and EnemyFactory), these parse the XML and store the XML's data in a more manageable format. Creation is simply done by invoking a create method, and passing the required parameters (i.e. player level, monster level, etc), these parameters are taken into consideration for what should be generated. &#xD;&#xA;&#xD;&#xA;Anyways I was wondering if it would be a better idea to use a SQLite database to store all this information? I have looked around, and it seems to be a mixed response. Does anyone have any sort of insight into this? I am using C++ and OpenGL currently. &#xD;&#xA;" />
  <row Id="30818" PostHistoryTypeId="1" PostId="13822" RevisionGUID="da594850-39f5-4ccb-9778-2402ce5507ed" CreationDate="2011-06-18T01:15:00.010" UserId="8104" Text="Is a SQLite Database Suitable to Store the Building Blocks for Dynamic Content?" />
  <row Id="30819" PostHistoryTypeId="3" PostId="13822" RevisionGUID="da594850-39f5-4ccb-9778-2402ce5507ed" CreationDate="2011-06-18T01:15:00.010" UserId="8104" Text="&lt;c++&gt;&lt;databases&gt;" />
  <row Id="30820" PostHistoryTypeId="5" PostId="13800" RevisionGUID="d8ee31b3-cee6-4a9b-9e6e-97e786293691" CreationDate="2011-06-18T01:37:33.470" UserId="5899" Comment="added 2635 characters in body" Text="The component architecture is an alternative to avoid the large hierarchies that are achieved inheriting all elements from a same node, and the problems of coupling that leads.&#xD;&#xA;&#xD;&#xA;You are showing a component architecture with &quot;generic&quot; components. You have the basic logic to attach and detach &quot;generic&quot; components. An architecture with generic components is more difficult to achieve because you don't know which component is. The benefits is that this approach is extensible.&#xD;&#xA;&#xD;&#xA;A valid component architecture is achieved with defined components. With defined I mean, the interface is defined, not the implementation. For example, GameObject can have a IPhysicInstance, Transformation, IMesh, IAnimationController. This has the benefit that you know the interface and the GameObject knows how to deal with each component.&#xD;&#xA;&#xD;&#xA;**Responding to the term over-generalizing**&#xD;&#xA;&#xD;&#xA;I think that the concepts are not clear. When I say component, doesn't mean that all component of a game-object must inherit from a component interface or something similar. However this is the approach for Generic Components, I think that it is the concept that you name as a component.&#xD;&#xA;&#xD;&#xA;The component architecture is another of the architectures that exist for runtime object model. It's not the only and its not the best for all cases, but the experience has demonstrated that has a lot of benefits, like low coupling.&#xD;&#xA;&#xD;&#xA;The main feature that distinguishes the component architecture is convert the relation is-a into has-a. For example a object architecture is-a:&#xD;&#xA;&#xD;&#xA;![is-a architecture][1]&#xD;&#xA;&#xD;&#xA;Instead of a object architecture has-a ( components ):&#xD;&#xA;&#xD;&#xA;![has-a architecture][2]&#xD;&#xA;&#xD;&#xA;There is also property-centric architectures :&#xD;&#xA;&#xD;&#xA;For example, a normal object architecture is like this:&#xD;&#xA;&#xD;&#xA;Object1&#xD;&#xA;  - Position = ( 0, 0, 0 )&#xD;&#xA;  - Orientation = ( 0, 43, 0 )&#xD;&#xA;&#xD;&#xA;Object2&#xD;&#xA;  - Position = ( 10, 0, 0 )&#xD;&#xA;  - Orientation = ( 0, 0, 30 )&#xD;&#xA;&#xD;&#xA;A property-centric architecture:&#xD;&#xA;&#xD;&#xA;Position&#xD;&#xA; - Object1 = ( 0, 0, 0 )&#xD;&#xA; - Object2 = ( 10, 0, 0 )&#xD;&#xA;&#xD;&#xA;Orientation&#xD;&#xA;- Object1 = ( 0, 43, 0 )&#xD;&#xA;- Object2 = ( 0, 0, 30 )&#xD;&#xA;&#xD;&#xA;It is better the object model architecture? In performance perspective, it's better the property-centric because it is more cache-friendly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Component is refered to the relation is-a instead of has-a. A component can be a Transformation matrix, a quaternion, etc. But the relation with the game-object is a relation is-a, the game-object doesn't have the transformation because it's inherited. The game-object has ( relation has-a ) the transformation. The transformation is then a component.&#xD;&#xA;&#xD;&#xA;The game-object is like a hub. if you want a component that always is there, then maybe the component ( like the matrix ) should be inside the object and not a pointer.&#xD;&#xA;&#xD;&#xA;There is not a perfect game-object for all cases, it depends the engine, the libraries that the engine use. Maybe I want a camera that doesn't have a mesh. The problem with is-a architecture is that if the game-object has a mesh, then the camera that inherits from game-object must have a mesh. With componenets, the camera has a transformation, a controller for the movement, and anything you need.&#xD;&#xA;&#xD;&#xA;For more information, the chapter &quot;14.2. Runtime Object Model Architecture&quot; from the book &quot;Game Engine Architecture&quot; of &quot;Jason Gregory&quot; deals specifically this subject.&#xD;&#xA;&#xD;&#xA;UML diagrams are extracted from there&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Ki7LF.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/3svPv.jpg" />
  <row Id="30821" PostHistoryTypeId="5" PostId="13688" RevisionGUID="cc48d2aa-993b-4b44-9244-f7cc024cd92e" CreationDate="2011-06-18T02:48:43.117" UserId="8027" Comment="added 1 characters in body" Text="There's a pretty cool writeup on the Team Fortress 2 wiki on the behavior of their projectile and hitscan weapons.&#xD;&#xA;&#xD;&#xA;http://wiki.teamfortress.com/wiki/Mechanics#Hit_detection" />
  <row Id="30822" PostHistoryTypeId="2" PostId="13823" RevisionGUID="f453381a-acdc-4d8a-8d41-1cb5f6958f20" CreationDate="2011-06-18T03:05:24.793" UserId="3874" Text="For my game,&#xD;&#xA;&#xD;&#xA;Everything inherits from Entity, then other things like Player, PhysicsObject, etc, inherit from Entity. The physics engine sends collision callbacks which has an Entity* to the B that A collided on. Then, lets say A is a Bullet, A tries to cast the entity as a player, if it succeeds, it reduces the player's health.&#xD;&#xA;&#xD;&#xA;Is this a good design?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;The problem I have with a message system is that I'd need messages for everything, like:&#xD;&#xA;entity.sendMessage(SET_PLAYER_HEALTH,16);&#xD;&#xA;&#xD;&#xA;So that's why I think casting is cleaner.&#xD;&#xA;" />
  <row Id="30823" PostHistoryTypeId="1" PostId="13823" RevisionGUID="f453381a-acdc-4d8a-8d41-1cb5f6958f20" CreationDate="2011-06-18T03:05:24.793" UserId="3874" Text="Is dynamic casting Entities A good design?" />
  <row Id="30824" PostHistoryTypeId="3" PostId="13823" RevisionGUID="f453381a-acdc-4d8a-8d41-1cb5f6958f20" CreationDate="2011-06-18T03:05:24.793" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="30825" PostHistoryTypeId="2" PostId="13824" RevisionGUID="73b90f20-23d8-4b5a-8767-2fa061ecf849" CreationDate="2011-06-18T03:13:31.730" UserId="5899" Text="Bullet collide with an object ( whichever ) and sends a message to the object. bullet.sendMessage( other_object, BULLET_IMPACT,16); the bullet doesn't need to know the details of the destiny object.&#xD;&#xA;&#xD;&#xA;If the object is a player.&#xD;&#xA;&#xD;&#xA;    void Player::handleMessage( Message* msg )&#xD;&#xA;    {&#xD;&#xA;       if ( msg-&gt;type() == BULLET_IMPACT )&#xD;&#xA;           doDamage( msg-&gt;data() );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The destiny decides the action.&#xD;&#xA;&#xD;&#xA;Avoid cast wherever you can." />
  <row Id="30826" PostHistoryTypeId="2" PostId="13825" RevisionGUID="65c7d595-72f9-4ad8-8c22-a13c01c42008" CreationDate="2011-06-18T03:14:19.060" UserId="7728" Text="Dynamic casting is really not something you want to design your code around.&#xD;&#xA;&#xD;&#xA;Instead, [virtual functions][1] on your Entity/Player/PhysicsObject/etc classes are your best friends.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Virtual_function" />
  <row Id="30827" PostHistoryTypeId="25" PostId="13807" RevisionGUID="dbfbb5d8-7878-4da1-a01b-e595e9792bac" CreationDate="2011-06-18T03:24:30.747" Comment="http://twitter.com/#!/StackGameDev/status/81925225402482689" />
  <row Id="30828" PostHistoryTypeId="2" PostId="13826" RevisionGUID="0185074d-2999-4497-b4fe-c676fe63c439" CreationDate="2011-06-18T04:43:34.237" UserId="2061" Text="Virtual function calls **are** your messages:&#xD;&#xA;&#xD;&#xA;    void Player::onCollision(const Entity&amp; collisionEntity)&#xD;&#xA;    {&#xD;&#xA;        Player::setHealth(Player::getHealth() - collisionEntity-&gt;damageValue());&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Provide them with (empty) default implementations so an Entity will only handle the events it wants to.&#xD;&#xA;&#xD;&#xA;When your Entity class inevitably starts to become bloated, it's either time to push some methods down the hierarchy, or begin moving to a [component-based design](http://gamedev.stackexchange.com/questions/4046)." />
  <row Id="30829" PostHistoryTypeId="5" PostId="13826" RevisionGUID="9f5fbc0e-63a9-4b3b-a763-2d07654e270b" CreationDate="2011-06-18T05:19:05.457" UserId="2061" Comment="deleted 1 characters in body" Text="Virtual function calls **are** your messages:&#xD;&#xA;&#xD;&#xA;    void Player::onCollision(const Entity&amp; collisionEntity)&#xD;&#xA;    {&#xD;&#xA;        Player::setHealth(Player::getHealth() - collisionEntity.damageValue());&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Provide them with (empty) default implementations so an Entity will only handle the events it wants to.&#xD;&#xA;&#xD;&#xA;When your Entity class inevitably starts to become bloated, it's either time to push some methods down the hierarchy, or begin moving to a [component-based design](http://gamedev.stackexchange.com/questions/4046)." />
  <row Id="30830" PostHistoryTypeId="25" PostId="13801" RevisionGUID="7a606a23-a70d-494e-964c-111c8b6c5a7a" CreationDate="2011-06-18T06:24:31.137" Comment="http://twitter.com/#!/StackGameDev/status/81970524456099840" />
  <row Id="30831" PostHistoryTypeId="6" PostId="13823" RevisionGUID="d3641f2f-a0eb-4e82-92f7-ec8a0f07cd14" CreationDate="2011-06-18T06:40:42.640" UserId="51" Comment="edited tags; deleted 10 characters in body" Text="&lt;c++&gt;&lt;architecture&gt;" />
  <row Id="30832" PostHistoryTypeId="5" PostId="13823" RevisionGUID="d3641f2f-a0eb-4e82-92f7-ec8a0f07cd14" CreationDate="2011-06-18T06:40:42.640" UserId="51" Comment="edited tags; deleted 10 characters in body" Text="For my game,&#xD;&#xA;&#xD;&#xA;Everything inherits from Entity, then other things like Player, PhysicsObject, etc, inherit from Entity. The physics engine sends collision callbacks which has an Entity* to the B that A collided on. Then, lets say A is a Bullet, A tries to cast the entity as a player, if it succeeds, it reduces the player's health.&#xD;&#xA;&#xD;&#xA;Is this a good design?&#xD;&#xA;&#xD;&#xA;The problem I have with a message system is that I'd need messages for everything, like:&#xD;&#xA;entity.sendMessage(SET_PLAYER_HEALTH,16);&#xD;&#xA;&#xD;&#xA;So that's why I think casting is cleaner.&#xD;&#xA;" />
  <row Id="30833" PostHistoryTypeId="2" PostId="13827" RevisionGUID="a9d86f6f-2cc6-453b-9b28-ef4561e64cbc" CreationDate="2011-06-18T06:55:59.010" UserId="4828" Text="Hello&lt;br&gt;I can do picking with triangles accuracy for not animated models ( http://create.msdn.com/en-US/education/catalog/sample/picking ) , but I have in my game also animated models, do you have idea how can I do it ? I use code based on this http://animationcomponents.codeplex.com/ for animation. &lt;br&gt;&#xD;&#xA;My first idea for make it is: &lt;br&gt;&#xD;&#xA;&#xD;&#xA; 1.Calculate ray &lt;br&gt;&#xD;&#xA;2.For each model &lt;br&gt;&#xD;&#xA;     2.1 Test model bounding sphere collision with ray &lt;br&gt;&#xD;&#xA;     2.2 If above test is passed, then for each meshPart make animation&#xD;&#xA; transform &lt;br&gt;&#xD;&#xA;     2.3 Calculate transformed triangles in meshPart &lt;br&gt; &#xD;&#xA;     2.4 Test collisions ray/triangle&#xD;&#xA;&#xD;&#xA;Do you ever consider, how to make something like this ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30834" PostHistoryTypeId="1" PostId="13827" RevisionGUID="a9d86f6f-2cc6-453b-9b28-ef4561e64cbc" CreationDate="2011-06-18T06:55:59.010" UserId="4828" Text="Triangle accuracy picking for animated models in XNA" />
  <row Id="30835" PostHistoryTypeId="3" PostId="13827" RevisionGUID="a9d86f6f-2cc6-453b-9b28-ef4561e64cbc" CreationDate="2011-06-18T06:55:59.010" UserId="4828" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;3d-meshes&gt;&lt;picking&gt;" />
  <row Id="30836" PostHistoryTypeId="2" PostId="13828" RevisionGUID="9272295b-65ee-4c9f-a8f8-3f502310a1c9" CreationDate="2011-06-18T07:23:53.580" UserId="8106" Text="I have created an ogre application using the ogreappwizard. When I try to compile the solution I get an error saying that `Parameter &quot;basePath&quot; cannot be a relative path.`.&#xD;&#xA;&#xD;&#xA;I followed all of the [instructions][1], and have tried reinstalling both the Ogre SDK and the appwizard.&#xD;&#xA;&#xD;&#xA;I am losing my head here. What is going on?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/Setting+Up+An+Application+-+Visual+Studio" />
  <row Id="30837" PostHistoryTypeId="1" PostId="13828" RevisionGUID="9272295b-65ee-4c9f-a8f8-3f502310a1c9" CreationDate="2011-06-18T07:23:53.580" UserId="8106" Text="Compiling Ogre3d application using the OgreAppWizard" />
  <row Id="30838" PostHistoryTypeId="3" PostId="13828" RevisionGUID="9272295b-65ee-4c9f-a8f8-3f502310a1c9" CreationDate="2011-06-18T07:23:53.580" UserId="8106" Text="&lt;c++&gt;&lt;ogre&gt;" />
  <row Id="30839" PostHistoryTypeId="2" PostId="13829" RevisionGUID="7b7ec6d8-b410-425a-a720-51215a166369" CreationDate="2011-06-18T07:32:13.853" UserId="2345" Text="I have run into this issue myself. There seems to be a [bug][1] in the OgreAppWizard. &#xD;&#xA;&#xD;&#xA;Until the bug is resolved, the fix is quite simple:&#xD;&#xA;&#xD;&#xA;Go to `Project`-&gt;`Properties`-&gt;`Configuration Properties`-&gt;`Debugging`&#xD;&#xA;&#xD;&#xA;Then simply remove the leading `&quot;../&quot;` from the path for `Command` and `Working Directory`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/ogreappwizards/issues/detail?id=2" />
  <row Id="30840" PostHistoryTypeId="2" PostId="13830" RevisionGUID="39cb6ed3-a709-49d1-b2f4-8ae1aeb5d4d7" CreationDate="2011-06-18T07:56:03.887" UserId="5904" Text="I think before you go pointing fingers, you make sure that this is in fact the problem. It might very well be, but before you invest a lot of time an effort in the number solutions below, try profiling your code. You should be looking for large CPU usage areas. If improving that improves performance, then awesome, mission accomplished. Some devices ship without FPUs, so the performance with floats are very poor.&#xD;&#xA;&#xD;&#xA;You might try different graphics rendering modes to make sure that you are in fact limited by vertex transfer rates, i.e. using the *same* number of vertices in a static mesh is dramatically faster. If it isn't, then your model(s) are too detailed and filling a buffer faster won't fix anything -- your GPU simply can't handle the geometry + any other stuff you have enabled. You can turn down/off many of the effects like fog/lighting (lighting is especially expensive if your GPU does not have TnL and your CPU does not have a FPU).&#xD;&#xA;&#xD;&#xA;As for actual methods of improving performance that take a while to implement, you have a few options:&#xD;&#xA;&#xD;&#xA; 1. Use GL_FIXED instead of GL_FLOAT types. If your CPU does a lot of calculations for the GPU, then fixed point will likely be a fast case for it. GL_FIXED is the same size as GL_FLOAT conventionally, so this will not help if data transfer rates are the bottleneck.&#xD;&#xA;&#xD;&#xA; 2. Use GL_SHORT instead of GL_FLOAT types. This will cut transfer bandwidth in half. Since most people don't do integer coordinates for their world's smallest unit, you typically have to constrain the absolute size of your world to a size like 128x128. From there, you can use OpenGL's matrix stack to scale the coordinates. For example, I use GL_SHORT for texture coordinates where 1024 = 1.0. I then use glScale(1/1024, 1/1024, 1.0) so that when I tell OpenGL the texture coordinates (512, 1024), it will treat them as (0.5, 1.0). It might seem a bit backwards, but generally the GPU can do these transformations for essentially free, and thus all you've done is reduce the amount of data to represent the same position.&#xD;&#xA;&#xD;&#xA; 3. Check if &quot;vertex buffer objects&quot; extension is supported and use them if they are. There are a lot of tutorials available for a wide variety of languages on how to use them. Essentially, the optimization is that you can have the GPU transfer/draw from one buffer while the CPU writes to another. Because of this &quot;double buffered&quot; approach, less time in spent waiting in the CPU, which can make the graphics appear to render faster. Some implementations have high-speed memory for vertex data and can map these areas into your program. In that way, you can potentially do zero-copy filling of buffers. Consider what OpenGL does normally: You fill an array with floats, you call glDraw[Arrays/Elements], then *by the time it returns*, you can delete the whole array. That means either a) the GPU must draw it right there and now, or b) the driver must copy the vertex data for later use. Either way is generally sub-optimal, because you don't have a way of saying to the driver &quot;I'm just going to refill this *same* array with the *same* size next time, and I won't be changing it immediately so you don't need to copy it.&quot; Using vertex buffer objects, you can do this.&#xD;&#xA;&#xD;&#xA; 4. Check platform notes. Some platforms actually have &quot;fast paths&quot;, things that their driver specifically or can optimize. Others might prefer vertex data in a certain format, or elements on a certain alignment, or vertices multiples of a certain size, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30841" PostHistoryTypeId="2" PostId="13831" RevisionGUID="89223583-602d-4cdd-9577-ea0b8651986f" CreationDate="2011-06-18T08:39:55.603" UserId="8107" Text="I have a game ready to be implemented (Class Diagrams and other UML stuff are good).&#xD;&#xA;&#xD;&#xA;Here are some characteristics:&#xD;&#xA;&#xD;&#xA;* MMO.&#xD;&#xA;* Browser game **and** standalone.&#xD;&#xA;* Multiplatform.&#xD;&#xA;* With 2D graphics.&#xD;&#xA;* With an online database (duh!).&#xD;&#xA;&#xD;&#xA;What language should I use?" />
  <row Id="30842" PostHistoryTypeId="1" PostId="13831" RevisionGUID="89223583-602d-4cdd-9577-ea0b8651986f" CreationDate="2011-06-18T08:39:55.603" UserId="8107" Text="What language to use to create a browser-MMO?" />
  <row Id="30843" PostHistoryTypeId="3" PostId="13831" RevisionGUID="89223583-602d-4cdd-9577-ea0b8651986f" CreationDate="2011-06-18T08:39:55.603" UserId="8107" Text="&lt;2d&gt;&lt;mmo&gt;&lt;language-choice&gt;&lt;browser-based-games&gt;" />
  <row Id="30844" PostHistoryTypeId="2" PostId="13832" RevisionGUID="9f91f68b-7ec2-4765-9cff-39aa13378dc6" CreationDate="2011-06-18T08:41:47.253" UserId="8090" Text="Okay, this does sound like something you can do with stenciling. Stenciling is generally used in conjunction with Multipass Rendering.&#xD;&#xA;&#xD;&#xA;## Multipass Rendering ##&#xD;&#xA;&#xD;&#xA;Multipass Rendering basically refers to a rendering loop where multiple renders a performed per frame. Each pass may use a different configuration of OpenGL (e.g. with different stenciling settings) and render the same or different artifacts. The pseudo code would look something like this:&#xD;&#xA;&#xD;&#xA;    initialize the OpenGL configuration for the entire sequence&#xD;&#xA;&#xD;&#xA;    for each frame&#xD;&#xA;    {&#xD;&#xA;        initialize the OpenGL configuration for the frame&#xD;&#xA;&#xD;&#xA;        for each rendering pass&#xD;&#xA;        {&#xD;&#xA;            initialize the OpenGL configuration for the rendering pass&#xD;&#xA;            &#xD;&#xA;            render the artifacts&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In your case, you will need a rendering pass for each layer of rectangles so that you can prepare the stencil buffer before each pass.&#xD;&#xA;&#xD;&#xA;## Your Problem ##&#xD;&#xA;&#xD;&#xA;Effectively, you want to restrict the pixels that *can be drawn* in each rendering pass to the set of pixels that *were drawn* in the previous rendering pass. To do this, you are going to need to do three things:&#xD;&#xA;&#xD;&#xA;1. Record the pixels you draw.&#xD;&#xA;2. Only draw pixels that were also drawn in the previous rendering pass (except for the first rendering pass, of course).&#xD;&#xA;3. Before each frame, remove the record of which pixels have been drawn.&#xD;&#xA;&#xD;&#xA;### Record the pixels you draw ###&#xD;&#xA;&#xD;&#xA;This is where [`glStencilOp()`](http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml) comes in, `glStencilOp()` determines what's going to happen to the **stencil buffer** when a pixel is drawn (and in other situations too, but we won't worry about that). To increment the value in the stencil buffer for each pixel drawn (and hence record that you drew it) include this in the initialization of the entire sequence:&#xD;&#xA;&#xD;&#xA;    glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);&#xD;&#xA;&#xD;&#xA;The third argument is the important one, it determines what happens when a pixel is drawn (normally), to understand the function better, read the reference docs.&#xD;&#xA;&#xD;&#xA;### Only draw pixels that were also drawn in the previous rendering pass ###&#xD;&#xA;&#xD;&#xA;This is a job for [`glStencilFunc()`](http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml). It determines what's going to happen to the **frame buffer** depending on what the value in the stencil buffer is. &#xD;&#xA;&#xD;&#xA;You need to call it before every rendering pass to say 'only draw if the stencil buffer says I drew last time round'. Since the stencil buffer is being incremented each time, the value to test against needs to be incremented too. For example, the first three rendering passes should call `glStencilFunc()` like this:&#xD;&#xA;&#xD;&#xA;    glStencilFunc(GL_EQUAL, 0, 1); // if (stencil_buffer_value == 0) draw;&#xD;&#xA;    glStencilFunc(GL_EQUAL, 1, 1); // if (stencil_buffer_value == 1) draw;&#xD;&#xA;    glStencilFunc(GL_EQUAL, 2, 1); // if (stencil_buffer_value == 2) draw;&#xD;&#xA;&#xD;&#xA;Just ignore the third parameter for now, read the reference documentation if want to know what it is.&#xD;&#xA;&#xD;&#xA;### Remove the record of which pixels have been drawn ###&#xD;&#xA;&#xD;&#xA;Each frame you don't want to continue adding to the existing stencil buffer values just like you don't want to leave the previously rendered image in the frame buffer. You clear it in the same way you would clear the frame buffer too:&#xD;&#xA;&#xD;&#xA;    glClear(GL_STENCIL_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;Or, do both at once:&#xD;&#xA;&#xD;&#xA;    glClear(GL_FRAME_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);" />
  <row Id="30845" PostHistoryTypeId="2" PostId="13833" RevisionGUID="37765ee5-8cad-490c-869d-a81bc8e3f91a" CreationDate="2011-06-18T08:46:00.603" UserId="3461" Text="i intend to use mersenne twister to generate level using seed , but i also want to make fixed level so for now i use xml to store data of the level (~40 numbers).&#xD;&#xA;&#xD;&#xA;but it would be awesome if i could get the seed of a specific level using a sort of reverse generating .&#xD;&#xA;&#xD;&#xA;i guess using my own PRN i possibly could if i make it in this way , but my question is , can i do it with mersenne twister?&#xD;&#xA;&#xD;&#xA;i don't know if i explain correctly the situation. here an example&#xD;&#xA;&#xD;&#xA;if seed 1234 give in this order : 25 65 78 01&#xD;&#xA;&#xD;&#xA;can i get the seed 1234 knowing only the generate number and their order 25 65 78 01 ?&#xD;&#xA;&#xD;&#xA;thanks (for those who wonder why i want to do that , my xml parsing is a lot slower than generating level plus xml files are bigger than seed numbers)&#xD;&#xA;" />
  <row Id="30846" PostHistoryTypeId="1" PostId="13833" RevisionGUID="37765ee5-8cad-490c-869d-a81bc8e3f91a" CreationDate="2011-06-18T08:46:00.603" UserId="3461" Text="how to get seed from a level style ?" />
  <row Id="30847" PostHistoryTypeId="3" PostId="13833" RevisionGUID="37765ee5-8cad-490c-869d-a81bc8e3f91a" CreationDate="2011-06-18T08:46:00.603" UserId="3461" Text="&lt;random&gt;&lt;generated&gt;" />
  <row Id="30848" PostHistoryTypeId="5" PostId="13831" RevisionGUID="1472442c-697e-4020-b357-09e48cac78bb" CreationDate="2011-06-18T09:15:16.537" UserId="8107" Comment="Added some characteristics." Text="I have a game ready to be implemented (Class Diagrams and other UML stuff are good).&#xD;&#xA;&#xD;&#xA;Here are some characteristics:&#xD;&#xA;&#xD;&#xA;* MMO.&#xD;&#xA;* Browser game **and** download-game.&#xD;&#xA;* Multiplatform.&#xD;&#xA;* With 2D graphics.&#xD;&#xA;* Real time.&#xD;&#xA;* Point-and-click.&#xD;&#xA;* With an online database (duh!).&#xD;&#xA;&#xD;&#xA;What language should I use?" />
  <row Id="30849" PostHistoryTypeId="2" PostId="13834" RevisionGUID="f502885b-dc17-4a19-bf4e-13d5a8830079" CreationDate="2011-06-18T09:21:43.510" UserId="1156" Text="[Unity][1] would probably fit those. You script it in C#, Boo (sort of a Pythonic language with static typing), or Javascript.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/" />
  <row Id="30850" PostHistoryTypeId="25" PostId="13828" RevisionGUID="7e1e4249-7bec-4efa-bba8-d90d4a0c6234" CreationDate="2011-06-18T09:24:30.937" Comment="http://twitter.com/#!/StackGameDev/status/82015823639740416" />
  <row Id="30851" PostHistoryTypeId="2" PostId="13835" RevisionGUID="45c39621-a55c-4ecd-8ed7-338fbb7bb908" CreationDate="2011-06-18T09:28:43.010" UserId="7588" Text="Runescape is quite a famous online browser based MMORPG, and they provide an open source project to provide the game as a windows client.&#xD;&#xA;&#xD;&#xA;The game itself uses JOGL but any 2D framwork should be good for you, Java is maybe older than Silverlight for example, but is user friendly and well documented.&#xD;&#xA;&#xD;&#xA;There is a link [here](http://www.runescape.com/kbase/guid/Downloads_and_Wallpapers) for the windows client and source code." />
  <row Id="30852" PostHistoryTypeId="2" PostId="13836" RevisionGUID="8aed1498-c9ee-4ea5-85e9-8e7d6a47b030" CreationDate="2011-06-18T10:16:07.767" UserId="6484" Text="So I'm a brand new noob to the world of game dev and I'm starting off by trying to write my own game using C++ and openGL. I'm getting into loading models etc and while searching around for &quot;the best format&quot; I'm finding that most of the common formats are intended for porting between modelling applications and not necessarily for final representation of data when loading into a game environment. I'm being told through various sources that ultimately you want to use formats like collada etc and convert them into a custom binary format optimized for your game. Is this absolutely necessary? I understand the idea, that parsing a large XML or some other ASCII format is going to be slower than reading a binary file type but is it really going to be THAT big of a performance hit if I don't? I can't see it, but before I go and fill the assets directory of my game with dae or fbx files I thought I'd ask. " />
  <row Id="30853" PostHistoryTypeId="1" PostId="13836" RevisionGUID="8aed1498-c9ee-4ea5-85e9-8e7d6a47b030" CreationDate="2011-06-18T10:16:07.767" UserId="6484" Text="Do I really have to write my own optimized model format?" />
  <row Id="30854" PostHistoryTypeId="3" PostId="13836" RevisionGUID="8aed1498-c9ee-4ea5-85e9-8e7d6a47b030" CreationDate="2011-06-18T10:16:07.767" UserId="6484" Text="&lt;opengl&gt;&lt;c++&gt;&lt;models&gt;" />
  <row Id="30856" PostHistoryTypeId="2" PostId="13838" RevisionGUID="0564f127-90b0-4d8d-828e-b8f16881a313" CreationDate="2011-06-18T10:22:30.977" UserId="7588" Text="What I believe these people are saying is that you want to load your COLLADA file into your in-game structure. You can then save the contents of this structure into a binary file ready for loading at runtime.&#xD;&#xA;&#xD;&#xA;This can have advantages like the ones you said, but also has disadvantages, typically during the development stage.&#xD;&#xA;&#xD;&#xA;Whether the load-time performance gain you get is necessary for your game is for you to decide. If you have a few non-complex models, the difference is probably negligable, and it is up to you to decide what to go with.&#xD;&#xA;&#xD;&#xA;If for development purposes you prefer to use COLLADA and parse the XML at load time then go with it! I would recommend you make sure that your loading code is abstract enough so that you can easily replace it with binary files if the loading becomes too long." />
  <row Id="30857" PostHistoryTypeId="2" PostId="13839" RevisionGUID="faf4edc9-0355-4263-a42e-4d96a48c1bce" CreationDate="2011-06-18T10:58:48.087" UserId="1156" Text="No, you cannot get a seed for a sequence of numbers that you have created yourself. You could possibly get a seed from a sequence of generated numbers by brute force.&#xD;&#xA;&#xD;&#xA;Coincidentally, in the infinite monkeys writing Shakespeare way, if you used large enough seed numbers, you probably *could* find a seed that generates your sequence, but linearly searching for one specific number in the range of (potentially) a 256bit or greater integer is not possible in a real time.&#xD;&#xA;&#xD;&#xA;I do not see why you are needing to store 40 numbers in an XML file. Why not use a text file? Heck, why not hardcode them into an array?" />
  <row Id="30858" PostHistoryTypeId="25" PostId="13836" RevisionGUID="aa30feb9-363a-4c93-9e4d-2e741e6404fe" CreationDate="2011-06-18T12:24:31.030" Comment="http://twitter.com/#!/StackGameDev/status/82061122143924224" />
  <row Id="30859" PostHistoryTypeId="2" PostId="13840" RevisionGUID="e9b728c8-ba26-422c-804a-56234a876e0b" CreationDate="2011-06-18T12:28:10.560" UserId="1101" Text="Do you actually have a problem with your existing system? Or are you just asking, &quot;would it be better if...&quot;?&#xD;&#xA;&#xD;&#xA;If you have no problem with the current system, keep it. Don't change technologies during a project unless you need to. Given the simple use case you describe, I can't see any reason why an SQL database would work better than your XML.&#xD;&#xA;&#xD;&#xA;Note that SQL is optimised for random access to large amounts of data that are left on disk, whereas XML is optimised for being read in to memory and queried in memory. XML is also much easier for you to edit by hand. Given these factors using a relational database is rarely that beneficial for small games that don't store much data, and is better for games that generate a lot of data as they go along." />
  <row Id="30860" PostHistoryTypeId="2" PostId="13841" RevisionGUID="24f048f1-47b8-4406-9c4a-6c86cc0ba611" CreationDate="2011-06-18T13:19:09.183" UserId="545" Text="There's no right answer, and it's not clear if you're talking about on the server (online database) or client (real-time, multiplayform.)&#xD;&#xA;&#xD;&#xA;So we can address those separately:&#xD;&#xA;1) Client.  Unity has been suggested but the question is how multi-platform are you talking about?  iPhone?  Android?  Xbox360 via XNA?  The choice of target platform will to a degree determine the choice of languages.  I personally feel that the largest overlap of platform is Flash, followed by a C# logic with custom front-end.  Flash is directly available for the browser use, the Air API makes it a desktop application as well, and has implementations for all modern platforms except windows phone 7 and the 360.&#xD;&#xA;&#xD;&#xA;C# and different front ends also offer an interesting approach.  You could write all of the network and game logic classes in C#, and then implement a specific front-end for the differing platforms.  Windows phone 7 and PC could be Silverlight, 360 would be XNA, and iPhone/Android could be MonoTouch/MonoDroid respectively.  (However, it's still not clear how prime-time ready the mono products are.)&#xD;&#xA;&#xD;&#xA;As pointed out above you can also do Java or Unity, but each of those has less of a multiplatform role then Flash or C#.&#xD;&#xA;&#xD;&#xA;2) Server.  C++ is the traditional route here, but honestly whatever you feel comfortable with.  I've been experimenting with Python based servers for the rapid prototyping.  But if you have a java client then a java server is worth looking into for code reuse.  Likewise C# to C# gives a great reuse factor.  One thing I've been dying to try is a C# server with IronPython embedded in it for AI/ability logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However as a last bit of advise given how incredibly complex an MMO is, )See http://gamedev.stackexchange.com/questions/90/why-is-it-so-hard-to-develop-a-mmo/1031#1031 ) the answer really should be &quot;Whatever language you and your team know back and front.&quot;  You'll be having so many other challenges facing you, your language should be the least of your worries." />
  <row Id="30861" PostHistoryTypeId="2" PostId="13842" RevisionGUID="a15b541f-f90a-407c-90cf-91f989a20380" CreationDate="2011-06-18T13:22:29.900" UserId="545" Text="Unless for some reason the possible content changes at Runtime, choose whatever format you want for content creation (And since you already have XML up and running, stick with that.) then as part of the game build step pack it down to a binary format that your game can understand.  This reduces the time and memory footprint needed to handle text processing, while you can still keep the content mergable in your source code control provider.  And of course share the code between the tool writing the binary format and the game reading the binary content if at all possible!" />
  <row Id="30862" PostHistoryTypeId="2" PostId="13843" RevisionGUID="bbddc098-95d2-46ff-8bc0-62917ef162a7" CreationDate="2011-06-18T13:42:23.923" UserId="2710" Text="I want to tell a little story, that is both relevant and educational. I'm currently working at a young company making a browser-and-mobile MMO game. We started work about a year and half ago; and the company founder asked would-be programmers the very same question: &quot;What language should we use? Why? What are the alternatives?&quot;. We ultimately convinced him to use C# on both server and client (client in Unity3D). Now, a couple' months back, someone asked the same question on some forum we all read: &quot;What should I use for an MMO?&quot;.&#xD;&#xA;Our founder read it and laughed: &quot;Yeah, _now_ I understand - this question is pointless. All languages are more or less equal; your experience is what really matters.&quot;&#xD;&#xA;&#xD;&#xA;The moral of the story? Use what you know best, and are comfortable working with." />
  <row Id="30863" PostHistoryTypeId="2" PostId="13844" RevisionGUID="df577a8a-a385-4590-a313-c93a93cc2a3c" CreationDate="2011-06-18T13:50:13.857" UserId="5860" Text="I am implementing MMO where player flies in space on his starship controlling it with arrow keys and cooperate with other players.&#xD;&#xA;&#xD;&#xA;I want to implement it so that player will be able to dodge his ship from rocket or something else, so I am trying to predict whole game state on client side using the same world simulating algorithm as server use. That game world is written on C# and will be called within client directly (it's written on Unity3D) and through CLR on C++ server (under Linux). Connection through UDP.&#xD;&#xA;&#xD;&#xA;Problem is how to maintain, for example, 1000 players within single map (exclusing all other game objects, mobs...): &#xD;&#xA;Let's say I will:&#xD;&#xA;&#xD;&#xA; - synchronize server with clients 50 times per second&#xD;&#xA; - send to each client states of just that game objects (and players) which he is able to see (within some radius)&#xD;&#xA; - have to send 100 objects to each player within his view radius&#xD;&#xA; - must send averagely 50 bytes per game object (it's id, x,y coords, rotation, state...)&#xD;&#xA;&#xD;&#xA;so, it will need to have such network bandwidth: 1000 (clients) * 50 (times per second) * 100 (object to send to each player) * 50 (bytes per object) = 250 000 000 bytes per second! It's impossible!&#xD;&#xA;&#xD;&#xA;Is it possible to reduce whis value somehow? For example let clients to fully simulate their game worlds (for a long period of time) and send them just inputs of other clients and synchronize game worlds, let's say, each several seconds but it will cause weird desynchronization issues at leash because of float computations.&#xD;&#xA;&#xD;&#xA;Anyway, how such games are programmed in common way? Thank you." />
  <row Id="30864" PostHistoryTypeId="1" PostId="13844" RevisionGUID="df577a8a-a385-4590-a313-c93a93cc2a3c" CreationDate="2011-06-18T13:50:13.857" UserId="5860" Text="Low traffic client synchronization with server in MMO." />
  <row Id="30865" PostHistoryTypeId="3" PostId="13844" RevisionGUID="df577a8a-a385-4590-a313-c93a93cc2a3c" CreationDate="2011-06-18T13:50:13.857" UserId="5860" Text="&lt;mmo&gt;&lt;client-server&gt;&lt;synchronization&gt;" />
  <row Id="30866" PostHistoryTypeId="2" PostId="13845" RevisionGUID="2afce21c-4d96-4b38-9007-1fbf01ea9ca6" CreationDate="2011-06-18T13:51:53.970" UserId="6442" Text="Here's what should weigh in on your decision:&#xD;&#xA;&#xD;&#xA;XML:&#xD;&#xA;&#xD;&#xA; - (+) You already have the system implemented - no additional work required&#xD;&#xA; - (+) Easy to mod the game for people with minimal technical skills&#xD;&#xA; - (–) Wasteful with space&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;SQLite:&#xD;&#xA;&#xD;&#xA; - (+) Faster (although it may not matter)&#xD;&#xA; - (+) Uses less space (may not matter)&#xD;&#xA; - You could write a modding UI, or even make it part of the game&#xD;&#xA;  - (+) If you do, would be a great feature but (–) It would require some effort - a limited resource.&#xD;&#xA;  - (–) If you don't you make modding inaccessible to almost everyone&#xD;&#xA; - (–) You have to **actually write it and make it work**, and comb through it for bugs (although in my experience with SQLite it's not a big pain, and as with everything, if you've worked with it before you'll anticipate the bugs you've made before).&#xD;&#xA;&#xD;&#xA;Final thought: In my experience with data SQLite makes devs happy and users who actually wonder (Where is the data stored) think it's inaccessible to them (stored in the cloud, in an encrypted file, etc etc). When all is said and done, I've been much happier with SQLite and other DBs for data, and if your data was in some kind of ugly CSV file or something, I would advise you to go to SQLite, not XML. The main problem for you, is that with XML you're done with that part of the game. With SQLite, you need to put in work. Leave it until everything else is at least working, so you have a full prototype. Then you can try to sell/spread your game and roll SQLite in a patch." />
  <row Id="30867" PostHistoryTypeId="5" PostId="13845" RevisionGUID="9d59e3be-ca1f-4abd-bedd-8c1fc258cc48" CreationDate="2011-06-18T14:00:34.360" UserId="6442" Comment="improved formatting, improved wording" Text="Here's what should **weigh** in on your decision:&#xD;&#xA;&#xD;&#xA;XML:&#xD;&#xA;&#xD;&#xA; - (+) You **already have** the system implemented - no additional **work** required&#xD;&#xA; - (+) Easy to **mod** the game for people with **minimal technical skills**&#xD;&#xA; - (–) Wasteful with space&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;SQLite:&#xD;&#xA;&#xD;&#xA; - (+) Faster (although it may not matter)&#xD;&#xA; - (+) Uses less space (may not matter)&#xD;&#xA; - You could write a modding UI, or even make it **part of the game**&#xD;&#xA;  - (+) If you do, would be a **great feature** but (–) It would require **considerable work**&#xD;&#xA;  - (–) If you don't you **make modding inaccessible** to almost everyone&#xD;&#xA; - (–) You have to **actually write it and make it work**, and comb through it for bugs (although in my experience with SQLite it's not a big pain, and as with everything, if you've worked with it before you'll anticipate the bugs you've made before).&#xD;&#xA;&#xD;&#xA;**Final thought:** In my experience with data SQLite makes **devs happy** and **users slightly defeated** if they are curious enough to actually wonder (where is the data stored) think it's inaccessible to them (stored in the cloud, in an encrypted file, etc etc) and go, &quot;meh, whetever&quot;. When all is said and done, I've been much happier with SQLite and other DBs for data, and if your data was in some kind of ugly CSV file or something, I would advise you to go to SQLite, not XML. *The main dilemma for you*, is that with XML you're **done** with that part of the game. With SQLite, you need to put in **work**. I'd say leave it until everything else is at least working, so you have a full prototype. Then you can try to sell/spread your game and roll SQLite **in a patch**." />
  <row Id="30868" PostHistoryTypeId="2" PostId="13846" RevisionGUID="0eb80936-2f5d-43a4-abcc-d6c1770928c6" CreationDate="2011-06-18T14:11:25.610" UserId="8108" Text="I'm currently developing a small 3D impulse-based physic engine for a CS project. It uses GJK for collision detection and is kind of stable at the moment. Nevertheless I'm not satisfied with my collision response as rigid bodies appear to gain more and more momentum with each bounce, but only under some configurations.&#xD;&#xA;&#xD;&#xA;I use Newton’s law of restitution for instantaneous collisions with no friction ([here it is][1]). I checked this formula again and again, I also checked if the magnitude of the contact normal is 1 and all seems fine. The direction of the bounce and the induced rotation are convincing but the impulse is just sometimes too strong.&#xD;&#xA;&#xD;&#xA;I think my problem may lie within the impulse application part. In my mind, the impulse is the force necessary to separate two touching points of two bodies plus a certain magnitude depending on the coefficient of restitution (0.7 in my tests). I compute an impulse for each detected contact point and apply it at the contact position.&#xD;&#xA;&#xD;&#xA;For example if a cube falls right to the floor, there will be 4 impulses, each on at a vertex of the bottom face of the cube. For each of the four contacts, I do something like :&#xD;&#xA;&#xD;&#xA;    J = computeImpulse(contact)&#xD;&#xA;    A.applyImpulse(J, contact.pos)&#xD;&#xA;    B.applyImpulse(-J, contact.pos)&#xD;&#xA;&#xD;&#xA;I'm a bit confused. Is this the right way? Or should I apply half of the impulse to each body. Or should I rather apply a fraction of the impulse depending of the mass of the bodies? Or is the problem just somewhere else? In the formula maybe?&#xD;&#xA;&#xD;&#xA;I don't know if someone has an easy answer for me, as it's a rather specific problem, but thank you for your help anyway :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/574hA.png" />
  <row Id="30869" PostHistoryTypeId="1" PostId="13846" RevisionGUID="0eb80936-2f5d-43a4-abcc-d6c1770928c6" CreationDate="2011-06-18T14:11:25.610" UserId="8108" Text="Problem with impulses in my physics engine" />
  <row Id="30870" PostHistoryTypeId="3" PostId="13846" RevisionGUID="0eb80936-2f5d-43a4-abcc-d6c1770928c6" CreationDate="2011-06-18T14:11:25.610" UserId="8108" Text="&lt;physics&gt;&lt;physics-engine&gt;" />
  <row Id="30871" PostHistoryTypeId="2" PostId="13847" RevisionGUID="0fb91c4e-1f7e-4120-ab34-03bc7898ae92" CreationDate="2011-06-18T14:22:53.920" UserId="545" Text="Few questions first.&#xD;&#xA;&#xD;&#xA;Are the 'rockets or something else' intelligent or dumb?  If they're dumb all you need is the timestamp of fire, the origin, and the vector to simulate their path.  If they're intelligent how intelligent are they?  Can you compute at the time of fire that they're going to hit or miss?  If so you can simulate the entire path on the client.  (&quot;At T13 the missile will strike the ship because the play lost the dodge roll / the shooter scored a critical hit.&quot;)&#xD;&#xA;&#xD;&#xA;In general though there's pretty much no reason to:&#xD;&#xA; A) have a clock rate of 50Hz, (Most *shooters* get away with 15-20 and MMOs less than that.)&#xD;&#xA; B) send full state every frame.  (Does the rotation of a missile in space matter at all?  Or can you just assume that it's 'front' is orientated along the vector it's traveling?)&#xD;&#xA;&#xD;&#xA;Spend time with prediction and interpolation, and you'll see your bandwidth plummet.  A project I worked on had an update rate of 10Hz, and an object state representation of I think 14 bytes.  (Compress everything you can!  I believe we used 6 bits to define the rotation around the x plane and then another 6 bits for a tilt above/below that plane, it looked indistinguishable from sending an actual rotational matrix / quaternion.)&#xD;&#xA;&#xD;&#xA;Another thing you can do is prioritize objects.  Show, maybe there's 100 objects in the relevant set, but do you know his view fulcrum on the server?  If something isn't in his view can you drop it's update frequency by an order of magnitude?  &#xD;&#xA;&#xD;&#xA;The general idea isn't to make a perfect simulation on the client, that's impossible, the idea is to make a fun game where the players won't notice that it's not a perfect simulation." />
  <row Id="30872" PostHistoryTypeId="2" PostId="13848" RevisionGUID="7c0d839a-a20b-4e21-9c54-bdf4b7e9560d" CreationDate="2011-06-18T14:27:11.797" UserId="7173" Text="You only need about 30 updates (or even less maybe 10 or 20) per second. interpolate the positions of moving objectts client sided.&#xD;&#xA;In general you should only send data when it's REALLY needed.&#xD;&#xA;In WoW you might receive more updates from the players you are in a group with than from the players that are in the same location.&#xD;&#xA;Also, if another player is far away from you, you don't receive as many updates per second about him.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, only send one complete snapshot to each player when he connects. After that only send the changes of game objects. If no change occured, don't send it.&#xD;&#xA;&#xD;&#xA;Then, make heavy use of BitVectors or howevery you might call them to reduce the amount of unneeded data! Example: You can also try to write a float using only one byte(in a range from 0 to 1 or -1 to 1) so you only have 256 or 128 different values. But the player will not notice any jerky movements thanks to the interpolations.&#xD;&#xA;&#xD;&#xA;Look at this for an example with LidgrenLibrary on how to compress data: http://code.google.com/p/lidgren-network-gen3/wiki/Optimization&#xD;&#xA;&#xD;&#xA;Next: Try to reduce view radius of players as they move, and only transmit important information in that time. Then when they stop increase their view radius again. You can use a spatial hashing system or a bsp tree to reduce the overhead of looking up objects that are &quot;in range&quot;.&#xD;&#xA;This is a good read for the topic: http://en.wikipedia.org/wiki/Collision_detection&#xD;&#xA;&#xD;&#xA;Also compress the data **YOURSELF** only YOU know about the data structure and the temporal coherence in the data (which can and should be exploited).&#xD;&#xA;A general algorithm such as Bzip2, Deflate, whatever, should be used, but only as the final stage of compression!&#xD;&#xA;&#xD;&#xA;Also, for non game-critical information, you could also employ additional P2P techniques.&#xD;&#xA;Example: A player plays the &quot;hello&quot; animation.(Just a graphical effect) The player sends this information to the server, but the server doesn't relay the information to the other players. Instead this non-critical effect is send by the player itself to the other clients in range." />
  <row Id="30873" PostHistoryTypeId="2" PostId="13849" RevisionGUID="78c86124-e8fb-49b5-871d-0b2512350f76" CreationDate="2011-06-18T14:48:49.993" UserId="3505" Text="Here are two approaches:&#xD;&#xA;&#xD;&#xA;First:  &#xD;&#xA;Switch to deterministic physics, send player commands, ai actions, objects coming into view and whatever can't be determined client-side to clients. This must include non-commands, a confirmation that up to a certain point in time nothing but the commands that has been sent and received apply.&#xD;&#xA;&#xD;&#xA;The client must run two or three simultaneous simulations.  &#xD;&#xA;1: Halts whenever missing data for the next step.  &#xD;&#xA;2: Continue using guess data and provide the state used for rendering.&#xD;&#xA;3: Whenever no 1 comes to a halt this simulation copies the state of no 1, catch up to the current time and take over for no 2, which is then dropped.&#xD;&#xA;&#xD;&#xA;If the catch up is fast enough you can leave out differing between no 2 and no 3 and just drop the old data immediately.&#xD;&#xA;&#xD;&#xA;Second:  &#xD;&#xA;Don't use deterministic physics, do the same as above, but send &quot;full frames&quot; once every few seconds. You can easily completely leave out transferring temporary stuff like bullets.&#xD;&#xA;&#xD;&#xA;In both cases you might want to be wary about the client predicting anyone dying, it's kinda silly seeing an opponent unexplode.&#xD;&#xA;&#xD;&#xA;And +1 for doing the maths, too many people fail to make simple resource use estimates." />
  <row Id="30874" PostHistoryTypeId="2" PostId="13850" RevisionGUID="ee984d0d-b216-4a26-9fea-538e4ebb3dfe" CreationDate="2011-06-18T14:55:17.753" UserId="3689" Text="im server programmer who want to build flash / action script / flex simple casual game &#xD;&#xA;i have no experience as designer , i have some 3d studio max experience from 10 years ago &#xD;&#xA;i really want to build simple game that will be my client so people could play .&#xD;&#xA;i want to be able to get the game dissent graphics . but really simple like bejewele or Mahjong or some simple card game. &#xD;&#xA;where to go what to do ?" />
  <row Id="30875" PostHistoryTypeId="1" PostId="13850" RevisionGUID="ee984d0d-b216-4a26-9fea-538e4ebb3dfe" CreationDate="2011-06-18T14:55:17.753" UserId="3689" Text="IM programmer who want to build simple flash/action script game (client ) where to start?" />
  <row Id="30876" PostHistoryTypeId="3" PostId="13850" RevisionGUID="ee984d0d-b216-4a26-9fea-538e4ebb3dfe" CreationDate="2011-06-18T14:55:17.753" UserId="3689" Text="&lt;game-design&gt;" />
  <row Id="30877" PostHistoryTypeId="2" PostId="13851" RevisionGUID="b4d299ba-8568-49ce-b504-bf9cb8621a0b" CreationDate="2011-06-18T15:16:56.110" UserId="7772" Text="I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept.  Think Monkey Ball as an example of the type of gameplay.&#xD;&#xA;&#xD;&#xA;I am currently using sphere-to-sphere broad phase, then AABB to OBB testing (the final test I am using right now is one that checks if one of the 8 OBB points crosses the planes of the object it is testing against).  This seems to work pretty well, and I am getting back:&#xD;&#xA;&#xD;&#xA;Plane that object is colliding against (with a point on the plane, the plane's normal, and the exact point of intersection.&#xD;&#xA;&#xD;&#xA;I've tried what feels like dozens of different high-level strategies for handling these collisions, without any real success.  I think my biggest problem is understanding how to handle collisions against walls in the x-y axes (left/right, front/back), which I want to have elasticity, and the ground (z-axis) where I want an elastic reaction if the ball drops down, but then for it to eventually normalize and be kept &quot;on the ground&quot; (not go into the ground, but also not continue bouncing).  Without kluging something together, I'm positive there is a good way to handle this, my theories just aren't getting me all the way there.&#xD;&#xA;&#xD;&#xA;For physics modeling and movement, I am trying to use a Euler based setup with each object maintaining a position (and destination position prior to collision detection), a velocity (which is added onto the position to determine the destination position), and an acceleration (which I use to store any player input being put on the ball, as well as gravity in the z coord).&#xD;&#xA;&#xD;&#xA;Starting from when I detect a collision, what is a good way to approach the response to get the expected behavior in all cases?&#xD;&#xA;&#xD;&#xA;Thanks in advance to anyone taking the time to assist...  I am grateful for any pointers, and happy to post any additional info or code if it is useful." />
  <row Id="30878" PostHistoryTypeId="1" PostId="13851" RevisionGUID="b4d299ba-8568-49ce-b504-bf9cb8621a0b" CreationDate="2011-06-18T15:16:56.110" UserId="7772" Text="3D Ball Physics Theory: collision response on ground and against walls?" />
  <row Id="30879" PostHistoryTypeId="3" PostId="13851" RevisionGUID="b4d299ba-8568-49ce-b504-bf9cb8621a0b" CreationDate="2011-06-18T15:16:56.110" UserId="7772" Text="&lt;collision-detection&gt;&lt;physics&gt;" />
  <row Id="30880" PostHistoryTypeId="25" PostId="13846" RevisionGUID="8d1462e1-857f-4db2-861c-631b12d41c42" CreationDate="2011-06-18T15:24:31.840" Comment="http://twitter.com/#!/StackGameDev/status/82106421939933184" />
  <row Id="30881" PostHistoryTypeId="5" PostId="13846" RevisionGUID="c3ce790d-9b7a-4f8b-bcb9-ffd8811736a0" CreationDate="2011-06-18T15:39:17.500" UserId="7548" Comment="Improved the format of the document (changed formula from a link to an external image to an embedded picture), and minor improvements to grammar" Text="I'm currently developing a small 3D impulse-based physic engine for a CS project.  It uses GJK for collision detection and is kind of stable at the moment.  Nevertheless, I'm not satisfied with my collision response as rigid bodies appear to gain more and more momentum with each bounce, although only under some configurations.&#xD;&#xA;&#xD;&#xA;I use _Newton’s Law of Restitution_ (pictured immediately below) for instantaneous collisions with no friction.  I checked this formula again and again, and I also checked if the magnitude of the contact normal is 1, and all seems fine.  The direction of the bounce and the induced rotation are convincing but the impulse is just sometimes too strong.&#xD;&#xA;![Newton’s law of restitution][1]&#xD;&#xA;&#xD;&#xA;I think my problem may lie within the impulse application part; in my mind, the impulse is the force necessary to separate two touching points of two bodies plus a certain magnitude depending on the coefficient of restitution (0.7 in my tests).  I compute an impulse for each detected contact point and apply it at the contact position.&#xD;&#xA;&#xD;&#xA;For example if a cube falls right to the floor, there will be 4 impulses, each one at a vertex of the bottom face of the cube.  For each of the four contacts, I do something like this:&#xD;&#xA;&#xD;&#xA;    J = computeImpulse(contact)&#xD;&#xA;    A.applyImpulse(J, contact.pos)&#xD;&#xA;    B.applyImpulse(-J, contact.pos)&#xD;&#xA;&#xD;&#xA;I'm a bit confused.  Is this the correct approach, or should I apply half of the impulse to each body?  Or, should I rather apply a fraction of the impulse depending of the mass of the bodies?  Or, is the problem just somewhere else (e.g., in the formula)?&#xD;&#xA;&#xD;&#xA;I don't know if someone has an easy answer for me, as it's a rather specific problem, but thank you for your help.  :)&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/574hA.png&#xD;&#xA;" />
  <row Id="30882" PostHistoryTypeId="24" PostId="13846" RevisionGUID="c3ce790d-9b7a-4f8b-bcb9-ffd8811736a0" CreationDate="2011-06-18T15:39:17.500" Comment="Proposed by 7548 approved by 189 edit id of 506" />
  <row Id="30883" PostHistoryTypeId="5" PostId="13833" RevisionGUID="86357662-ee62-45c5-b26f-c111825dd128" CreationDate="2011-06-18T15:40:49.963" UserId="7804" Comment="Improved clarity and grammar" Text="I intend to use the Mersenne twister to generate a level using a seed , but I also want to make fixed levels, so for now I'm using XML to store data of the level (~40 numbers).&#xD;&#xA;&#xD;&#xA;However, it would be awesome if I could get the seed of a specific level by reversing the process.&#xD;&#xA;&#xD;&#xA;I guess if I used my own pseudo-random number generator I possibly could do it, but my question is can I do it with the Mersenne twister?&#xD;&#xA;&#xD;&#xA;Here is an example of what I want to do:&#xD;&#xA;&#xD;&#xA;If the seed `1234` gives output `25 65 78 01`, can I get the seed 1234 knowing only the generated output?&#xD;&#xA;&#xD;&#xA;Thanks in advance! (For those who wonder why I'd want to do this; my XML parsing is a lot slower than generating a level, plus XML files are bigger than seed numbers.)" />
  <row Id="30884" PostHistoryTypeId="4" PostId="13833" RevisionGUID="86357662-ee62-45c5-b26f-c111825dd128" CreationDate="2011-06-18T15:40:49.963" UserId="7804" Comment="Improved clarity and grammar" Text="How do I get the seed of a randomly generated level?" />
  <row Id="30885" PostHistoryTypeId="24" PostId="13833" RevisionGUID="86357662-ee62-45c5-b26f-c111825dd128" CreationDate="2011-06-18T15:40:49.963" Comment="Proposed by 7804 approved by 189 edit id of 504" />
  <row Id="30886" PostHistoryTypeId="5" PostId="13827" RevisionGUID="14558f8c-970d-4f22-9f95-8c89bc061503" CreationDate="2011-06-18T15:41:47.653" UserId="7804" Comment="Improved formatting and clarity of text body and example." Text="I can do [picking with triangle-accuracy for non-animated models][1], but I also have *animated* models in my game. How do I do picking on animated models?&#xD;&#xA;&#xD;&#xA;I use code based on [this project][2] for animation.&#xD;&#xA;&#xD;&#xA;My first idea for doing it is:&#xD;&#xA;&#xD;&#xA;    Calculate ray&#xD;&#xA;    For each model&#xD;&#xA;        If model bounding sphere collides with ray&#xD;&#xA;             For each meshPart&#xD;&#xA;                  Make animation transformation&#xD;&#xA;                  Calculate transformed triangles in meshPart&#xD;&#xA;             Test collisions of ray with resulting triangles&#xD;&#xA;&#xD;&#xA;Have you ever considered how to make something like this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/picking&#xD;&#xA;  [2]: http://animationcomponents.codeplex.com/" />
  <row Id="30887" PostHistoryTypeId="24" PostId="13827" RevisionGUID="14558f8c-970d-4f22-9f95-8c89bc061503" CreationDate="2011-06-18T15:41:47.653" Comment="Proposed by 7804 approved by 189 edit id of 505" />
  <row Id="30888" PostHistoryTypeId="2" PostId="13852" RevisionGUID="220f6d77-2474-4ecf-be9d-5434a1c8da00" CreationDate="2011-06-18T15:48:32.950" UserId="189" Text="Is there a tool out there that you can give a 3D model file, and it will output 2D renders of it from various angles? For example if you were making a 2D RPG but you want to make your character look nice, you might make the character in 3D and then just render the character from 8 or more angles into images which then are used by the 2D engine to give a pseudo-3D look.&#xD;&#xA;&#xD;&#xA;Does such a tool exist or will it need to be custom-written or done manually?" />
  <row Id="30889" PostHistoryTypeId="1" PostId="13852" RevisionGUID="220f6d77-2474-4ecf-be9d-5434a1c8da00" CreationDate="2011-06-18T15:48:32.950" UserId="189" Text="Render angles of a 3D model into 2D images?" />
  <row Id="30890" PostHistoryTypeId="3" PostId="13852" RevisionGUID="220f6d77-2474-4ecf-be9d-5434a1c8da00" CreationDate="2011-06-18T15:48:32.950" UserId="189" Text="&lt;2d&gt;&lt;3d&gt;" />
  <row Id="30891" PostHistoryTypeId="2" PostId="13853" RevisionGUID="e415c611-0de7-4d9d-8792-c851336308ba" CreationDate="2011-06-18T15:59:54.077" UserId="2940" Text="I've implemented a sprite batch class that uses a sampler array so that I can select a texture to use based on the gl_PrimitiveID. The idea was to be able to draw sprites that use different textures in a single draw call. I've managed to get it to compile the shaders and run, but the sampler indexing part does not seem to work, although I did not get any OpenGL error. I've done a bit of research and found out that it doesn't seem possible to index into a sampler array with an index that is not a compile-time constant or uniform variable.&#xD;&#xA;&#xD;&#xA;Am I doing something wrong or is building a texture atlas the only way to draw sprites that use different textures at once?" />
  <row Id="30892" PostHistoryTypeId="1" PostId="13853" RevisionGUID="e415c611-0de7-4d9d-8792-c851336308ba" CreationDate="2011-06-18T15:59:54.077" UserId="2940" Text="Is it possible to batch draw sprites that use different textures without using an atlas?" />
  <row Id="30893" PostHistoryTypeId="3" PostId="13853" RevisionGUID="e415c611-0de7-4d9d-8792-c851336308ba" CreationDate="2011-06-18T15:59:54.077" UserId="2940" Text="&lt;opengl&gt;&lt;textures&gt;&lt;glsl&gt;" />
  <row Id="30894" PostHistoryTypeId="5" PostId="13844" RevisionGUID="254364dc-d989-4efa-813f-43b008bf84ec" CreationDate="2011-06-18T16:28:16.917" UserId="5860" Comment="edited body" Text="I am implementing MMO where player flies in space on his starship controlling it with arrow keys and cooperate with other players.&#xD;&#xA;&#xD;&#xA;I want to implement it so that player will be able to dodge his ship from rocket or something else, so I am trying to predict whole game state on client side using the same world simulating algorithm as server use. That game world is written on C# and will be called within client directly (it's written on Unity3D) and through CLR on C++ server (under Linux). Connection through UDP.&#xD;&#xA;&#xD;&#xA;Problem is how to maintain, for example, 1000 players within single map (exclusing all other game objects, mobs...): &#xD;&#xA;Let's say I will:&#xD;&#xA;&#xD;&#xA; - synchronize server with clients 50 times per second&#xD;&#xA; - send to each client states of just that game objects (and players) which he is able to see (within some radius)&#xD;&#xA; - have to send 100 objects to each player within his view radius&#xD;&#xA; - must send averagely 50 bytes per game object (it's id, x,y coords, rotation, state...)&#xD;&#xA;&#xD;&#xA;so, it will need to have such network bandwidth: 1000 (clients) * 50 (times per second) * 100 (object to send to each player) * 50 (bytes per object) = 250 000 000 bytes per second! It's impossible!&#xD;&#xA;&#xD;&#xA;Is it possible to reduce this value somehow? For example let clients to fully simulate their game worlds (for a long period of time) and send them just inputs of other clients and synchronize game worlds, let's say, each several seconds but it will cause weird desynchronization issues at leash because of float computations.&#xD;&#xA;&#xD;&#xA;Anyway, how such games are programmed in common way? Thank you." />
  <row Id="30895" PostHistoryTypeId="2" PostId="13854" RevisionGUID="1aa477a0-5b5e-4356-8d6a-f50dad1c75c2" CreationDate="2011-06-18T16:49:30.330" UserId="7328" Text="If I have to guess I think you are calling initialize function every time you try resuming the game. You just have to avoid calling it when the game is resumed. Remember there is a diffrence between launching game and resuming it, and initilize is only used for launching game." />
  <row Id="30896" PostHistoryTypeId="2" PostId="13855" RevisionGUID="57fbede9-c515-4498-9ece-99b8afb42cb3" CreationDate="2011-06-18T17:15:18.300" UserId="7328" Text="I guess you can use 3dmax/maya or other modeling tools and just render you objects there. you can render your object with very high quality and with complex rendering tools like raycasting. if you want you can also create orthographic camera in modeling tools to create a real 2d image for you." />
  <row Id="30898" PostHistoryTypeId="2" PostId="13857" RevisionGUID="7b22f4d1-e177-4fd8-b801-b9cfe0aaf1bc" CreationDate="2011-06-18T18:00:37.850" UserId="848" Text="I need a simple scenario for a small dialog-based game / interactive story. The game would be used as an example for a middleware tool we're developing.&#xD;&#xA;&#xD;&#xA;I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to do this. Since we're based in Russia, getting a talented enough native English writer locally is a bit of a problem. &#xD;&#xA;&#xD;&#xA;Please advise, where to go to find such person / service?" />
  <row Id="30899" PostHistoryTypeId="1" PostId="13857" RevisionGUID="7b22f4d1-e177-4fd8-b801-b9cfe0aaf1bc" CreationDate="2011-06-18T18:00:37.850" UserId="848" Text="Where to hire a scenario writer for a small &quot;middleware-showcase&quot; interactive story game?" />
  <row Id="30900" PostHistoryTypeId="3" PostId="13857" RevisionGUID="7b22f4d1-e177-4fd8-b801-b9cfe0aaf1bc" CreationDate="2011-06-18T18:00:37.850" UserId="848" Text="&lt;game-design&gt;" />
  <row Id="30901" PostHistoryTypeId="2" PostId="13858" RevisionGUID="9b0998a4-502e-4fde-a80a-38dca54538fa" CreationDate="2011-06-18T18:02:40.023" UserId="1923" Text="&gt; I think my biggest problem is&#xD;&#xA;&gt; understanding how to handle collisions&#xD;&#xA;&gt; against walls in the x-y axes&#xD;&#xA;&gt; (left/right, front/back), which I want&#xD;&#xA;&gt; to have elasticity, and the ground&#xD;&#xA;&gt; (z-axis) where I want an elastic&#xD;&#xA;&gt; reaction if the ball drops down...&#xD;&#xA;&#xD;&#xA;I think you should handle the walls exactly the same as the ground. Create a method that takes as parameters the surface normal &amp; the ball's velocity and returns a reflected velocity vector. If you need a short snippet for that, we can show that to. The elastic factor of a ball is the same whether it bounces from the wall or floor. I think you may be needing to factor in gravity so your ball's motion appears more natural.&#xD;&#xA;&#xD;&#xA;In a game where you are roughly trying to approximate real life physics, you will most likely have a gravity vector which influences (add to) the ball's velocity vector each frame. The effect of the gravity will appear to influence the ball differently if the ball is bouncing from the floor vs. the walls because the gravity is aligned with the floor and has the most pronounce effect on ball speed changes (magnitude of the velocity vector), so there is where the difference you are expecting may come from.&#xD;&#xA;&#xD;&#xA;&gt; Starting from when I detect a&#xD;&#xA;&gt; collision, what is a good way to&#xD;&#xA;&gt; approach the response to get the&#xD;&#xA;&gt; expected behavior in all cases?&#xD;&#xA;&#xD;&#xA;1. Determine the ball's position at point of contact. Determine what percentage of the frame's time slice The ball will travel in the reflected direction.&#xD;&#xA;2. Run the surface normal &amp; the ball's velocity vector through the reflection method above. It will return the ball's new velocity vector.&#xD;&#xA;3. Transform the point representing the ball's position at the time of contact by the new velocity vector multiplied by the remainder of the frame's time slice. Factor in the gravity influence on this point." />
  <row Id="30902" PostHistoryTypeId="2" PostId="13859" RevisionGUID="88f350cb-e438-4b24-9e16-9c73f490596a" CreationDate="2011-06-18T18:03:10.803" UserId="3505" Text="Sphere colliding against unmovable plane in frictionless physics:&#xD;&#xA;&#xD;&#xA;Project the spheres velocity on the planes normal, multiply the projection by 2 and subtract it from the spheres velocity. Done.&#xD;&#xA;&#xD;&#xA;Before doing the collision you should check if the sphere is moving towards the plane, if not the collision should not be done, or you risk problems with wall-hugging.&#xD;&#xA;&#xD;&#xA;If you want a dampening collision you may multiply by less than 2.&#xD;&#xA;&#xD;&#xA;I'm not sure if I answered everything in your question, or if this is advanced enough for you, but I you can use it." />
  <row Id="30903" PostHistoryTypeId="5" PostId="13859" RevisionGUID="8bde265d-6209-4e9c-911a-39fe57c485fb" CreationDate="2011-06-18T18:08:50.707" UserId="3505" Comment="added 5 characters in body" Text="Sphere colliding against unmovable plane in frictionless physics:&#xD;&#xA;&#xD;&#xA;Project the spheres velocity on the planes normal, multiply the projection by 2 and subtract it from the spheres velocity. Done.&#xD;&#xA;&#xD;&#xA;Before doing the collision you should check if the sphere is moving towards the plane, if not the collision should not be done, or you risk problems with wall-hugging.&#xD;&#xA;&#xD;&#xA;If you want a dampening collision you may multiply by less than 2.&#xD;&#xA;&#xD;&#xA;I'm not sure if I answered everything in your question, or if this is advanced enough for you, but I hope you can use it." />
  <row Id="30904" PostHistoryTypeId="2" PostId="13860" RevisionGUID="459fc347-f52d-4b27-a8c7-5a7f11644716" CreationDate="2011-06-18T18:22:40.840" UserId="4662" Text="The MSDN documentation for HLSL seems to think that you can only do this in Direct3D 10. Of course, OpenGL and Direct3D don't always exactly match their functionality, but it's usually pretty close, since the same cards target OpenGL and DirectX. &#xD;&#xA;&#xD;&#xA;It could be that it is legal- just not for a target of the version that you are using." />
  <row Id="30905" PostHistoryTypeId="25" PostId="13844" RevisionGUID="10527e15-3bbb-427a-9d85-5b7aecbd1e91" CreationDate="2011-06-18T18:24:32.103" Comment="http://twitter.com/#!/StackGameDev/status/82151723602419712" />
  <row Id="30906" PostHistoryTypeId="5" PostId="13822" RevisionGUID="3997b5a3-fca4-47ae-87db-42af4ccce3c1" CreationDate="2011-06-18T18:36:11.477" UserId="8104" Comment="added 424 characters in body" Text="I am trying to make my own game for fun, it is basically a 2d side scrolling shooter, with dynamically generated enemies, levels, loot, and some other things. Currently I have dozens of XML files that define pretty much everything when it comes to the content, along with some constraints to keep things sane. Often times certain things like Weapons or Monsters are composed of several randomized sub components, that get picked out of a pool, according to factors such as rarity, the player level, and the game level.&#xD;&#xA;&#xD;&#xA;Currently the way I have it setup, is where during initialization the game creates several factory classes (stuff like WeaponFactory and EnemyFactory), these parse the XML and store the XML's data in a more manageable format. Creation is simply done by invoking a create method, and passing the required parameters (i.e. player level, monster level, etc), these parameters are taken into consideration for what should be generated. &#xD;&#xA;&#xD;&#xA;Anyways I was wondering if it would be a better idea to use a SQLite database to store all this information? I have looked around, and it seems to be a mixed response. Does anyone have any sort of insight into this? I am using C++ and OpenGL currently. &#xD;&#xA;&#xD;&#xA;*EDIT* &#xD;&#xA;&#xD;&#xA;I probably should have been more clear, I was more or less asking is it actually a usable way of doing this kind of stuff. My main concerns lie in the fact of choking the Database with requests. Reality is this game will never see the light, and has technically been done as of a few weeks ago, however I decided to go back retool the engine to use Box2D Physics. This is more a learning process, than anything." />
  <row Id="30908" PostHistoryTypeId="2" PostId="13861" RevisionGUID="3821d2d8-c141-4db8-a49a-6cc774a14978" CreationDate="2011-06-18T18:42:03.630" UserId="7804" Text="[This][1] is a good tutorial.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedevlessons.com/lessons/mxmlc-tut/index.html" />
  <row Id="30909" PostHistoryTypeId="5" PostId="13848" RevisionGUID="3be2ca61-10e8-47f6-97b5-5e17097b6549" CreationDate="2011-06-18T18:42:28.403" UserId="7173" Comment="additional info" Text="You only need about 30 updates (or even less maybe 10 or 20) per second. interpolate the positions of moving objectts client sided.&#xD;&#xA;In general you should only send data when it's REALLY needed.&#xD;&#xA;In WoW you might receive more updates from the players you are in a group with than from the players that are in the same location.&#xD;&#xA;Also, if another player is far away from you, you don't receive as many updates per second about him.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, only send one complete snapshot to each player when he connects. After that only send the changes of game objects. If no change occured, don't send it.&#xD;&#xA;&#xD;&#xA;Then, make heavy use of BitVectors or howevery you might call them to reduce the amount of unneeded data! Example: You can also try to write a float using only one byte(in a range from 0 to 1 or -1 to 1) so you only have 256 or 128 different values. But the player will not notice any jerky movements thanks to the interpolations.&#xD;&#xA;&#xD;&#xA;Look at this for an example with LidgrenLibrary on how to compress data: http://code.google.com/p/lidgren-network-gen3/wiki/Optimization&#xD;&#xA;&#xD;&#xA;Next: Try to reduce view radius of players as they move, and only transmit important information in that time. Then when they stop increase their view radius again. You can use a spatial hashing system or a bsp tree to reduce the overhead of looking up objects that are &quot;in range&quot;.&#xD;&#xA;This is a good read for the topic: http://en.wikipedia.org/wiki/Collision_detection&#xD;&#xA;&#xD;&#xA;Also compress the data **YOURSELF** only YOU know about the data structure and the temporal coherence in the data (which can and should be exploited).&#xD;&#xA;A general algorithm such as Bzip2, Deflate, whatever, should be used, but only as the final stage of compression!&#xD;&#xA;&#xD;&#xA;Also, for non game-critical information, you could also employ additional P2P techniques.&#xD;&#xA;Example: A player plays the &quot;hello&quot; animation.(Just a graphical effect) The player sends this information to the server, but the server doesn't relay the information to the other players. Instead this non-critical effect is send by the player itself to the other clients in range.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- EDIT (because of the comment):&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;Additional methods to decrease the average bit count per second to each player:&#xD;&#xA;&#xD;&#xA;1.&#xD;&#xA;You wrote that you send &quot;Object did not change&quot;. There is no reason to do this.&#xD;&#xA;If you worry about packet loss (and getting your simulation out of sync because of this) consider the following:&#xD;&#xA;At each fixed timestep (ex. 100, 200, 300...) hash the simulation state and send it to the server. the server confirms or sends a complete snapshot of all data back.&#xD;&#xA;&#xD;&#xA;2.&#xD;&#xA;For things like rockets or even players you can employ not only interpolation but also extrapolation in order to make the simulation more realistic.&#xD;&#xA;Example 'Rocket': Instead of updating with messages like &quot;Is now at position x&quot; just send a message once containing the following: &quot;Rocket Spawned: position(vector), Time(at which simulation step the rocket was spawned), velocity(vector)&quot;.&#xD;&#xA;So you don't even have to include the rotation because the tip will always be in the &quot;velocity&quot; direction.&#xD;&#xA;&#xD;&#xA;3. Combine multiple commands in one message and don't ever send messages smaller than 16-20bytes because the udp header will be bigger than the message itself.&#xD;&#xA;Also don't send packages bigger than the MTU of your protocol because fragmentation will slow down the speed of the transmission." />
  <row Id="30910" PostHistoryTypeId="2" PostId="13862" RevisionGUID="7e3f20b0-f1ee-4271-8e6e-887e9bbaa20d" CreationDate="2011-06-18T18:44:00.270" UserId="2061" Text="In case this wasn't obvious from @Communists' answer:  there is no reason every level needs to be stored in the same format.&#xD;&#xA;&#xD;&#xA;If you want to store your hand-made levels by storing every detail, but store your randomly-generated levels by only storing the seed, that's fine.  Just add a parameter in the level-file describing which it is eg. `&lt;level type=&quot;random&quot; seedvalue=&quot;1234567890&quot;&gt;`" />
  <row Id="30911" PostHistoryTypeId="2" PostId="13863" RevisionGUID="92408355-8fe6-4f8f-bc4e-09b4e7772a9f" CreationDate="2011-06-18T18:47:11.743" UserId="5899" Text="I've found [this][1] web of a game writer that has an [article][2]: how to find the best game writer for your game&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.christymarx.com/gamewriter.htm&#xD;&#xA;  [2]: http://www.christymarx.com/gamewriter/findawriter.htm" />
  <row Id="30912" PostHistoryTypeId="2" PostId="13864" RevisionGUID="69c74a81-407b-4aa2-8c5b-c5bf653fd1ef" CreationDate="2011-06-18T19:13:00.300" UserId="2306" Text="Pardon the brevity as I'm posting from my phone. &#xD;&#xA;&#xD;&#xA;1. Unproject to get your ray. &#xD;&#xA;2. Transform the ray by the transpose of your view matrix to get its position in world space. &#xD;&#xA;&#xD;&#xA;Now, either:&#xD;&#xA;A. For each model, transform the world ray by the transpose of the model's world matrix and test the meshes for intersections, or&#xD;&#xA;B. Test the ray against the transformed model mesh. &#xD;&#xA;&#xD;&#xA;A is easier, but involves more matrix operations. &#xD;&#xA;&#xD;&#xA;The idea is to get the ray and mesh into the same coordinate system before testing. " />
  <row Id="30913" PostHistoryTypeId="2" PostId="13865" RevisionGUID="c34aee54-591c-40e4-b73f-32e6df2c3b6a" CreationDate="2011-06-18T19:16:23.580" UserId="7946" Text="I've just now tested rendering a lot of sprites using XNA's SpriteSheet class. What I basically do is this:&#xD;&#xA;&#xD;&#xA;Somewhere in the code, I have a list which contains all sprites that have to be rendered. I prefilled this list with **2500** Sprites, all of which have the same rotational angle, texture, position etc. &#xD;&#xA;&#xD;&#xA;I then draw them like this:&#xD;&#xA;&#xD;&#xA;        spriteBatch.Begin();&#xD;&#xA;        foreach (Sprite spr in sprites)&#xD;&#xA;            spriteBatch.Draw(spr.Texture, spr.Position+spr.Center, spr.SourceRect, spr.Color,MathHelper.ToRadians( spr.Rotation ), spr.Center, spr.Scale, SpriteEffects.None, spr.Depth);&#xD;&#xA;&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;&#xD;&#xA;and I'm getting really poor performance. I only average about 15FPS with my Radeon HD 6850 graphics card and i5 2500k CPU. &#xD;&#xA;&#xD;&#xA;This is **very** surprising to me, since I average about 70 FPS doing exactly the same thing with my own custom OpenGL engine, which uses old OpenGL rendering (meaning one draw call for every single sprite). I actually expected XNAs rendering to be a ton faster, since it draws everything in one draw call. &#xD;&#xA;&#xD;&#xA;Am I rendering this the wrong way? Playing around with SpriteSortMode settings has made almost no difference, some of them just make it a tiny bit slower (depth sorting etc.)." />
  <row Id="30914" PostHistoryTypeId="1" PostId="13865" RevisionGUID="c34aee54-591c-40e4-b73f-32e6df2c3b6a" CreationDate="2011-06-18T19:16:23.580" UserId="7946" Text="XNA, SpriteSheet: Slow when rendering lots of sprites?" />
  <row Id="30915" PostHistoryTypeId="3" PostId="13865" RevisionGUID="c34aee54-591c-40e4-b73f-32e6df2c3b6a" CreationDate="2011-06-18T19:16:23.580" UserId="7946" Text="&lt;xna&gt;" />
  <row Id="30916" PostHistoryTypeId="4" PostId="13857" RevisionGUID="64287919-412e-4f16-a658-77a26c0d9814" CreationDate="2011-06-18T19:16:24.803" UserId="848" Comment="minor clarification" Text="Where to hire a scenario writer for a small interactive story game?" />
  <row Id="30917" PostHistoryTypeId="5" PostId="13857" RevisionGUID="64287919-412e-4f16-a658-77a26c0d9814" CreationDate="2011-06-18T19:16:24.803" UserId="848" Comment="minor clarification" Text="I need a simple scenario for a small dialog-based game / interactive story. The game would be used as an example for a middleware tool we're developing.&#xD;&#xA;&#xD;&#xA;I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to write a new one. Since we're based in Russia, getting a talented enough native English writer locally is a bit of a problem. &#xD;&#xA;&#xD;&#xA;Please advise, where to go to find such person / service?" />
  <row Id="30918" PostHistoryTypeId="5" PostId="13865" RevisionGUID="01ac1207-aa2d-44d1-a85f-362d41a005af" CreationDate="2011-06-18T19:21:50.880" UserId="7946" Comment="edited body; edited title" Text="I've just now tested rendering a lot of sprites using XNA's SpriteBatch class. What I basically do is this:&#xD;&#xA;&#xD;&#xA;Somewhere in the code, I have a list which contains all sprites that have to be rendered. I prefilled this list with **2500** Sprites, all of which have the same rotational angle, texture, position etc. &#xD;&#xA;&#xD;&#xA;I then draw them like this:&#xD;&#xA;&#xD;&#xA;        spriteBatch.Begin();&#xD;&#xA;        foreach (Sprite spr in sprites)&#xD;&#xA;            spriteBatch.Draw(spr.Texture, spr.Position+spr.Center, spr.SourceRect, spr.Color,MathHelper.ToRadians( spr.Rotation ), spr.Center, spr.Scale, SpriteEffects.None, spr.Depth);&#xD;&#xA;&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;&#xD;&#xA;and I'm getting really poor performance. I only average about 15FPS with my Radeon HD 6850 graphics card and i5 2500k CPU. &#xD;&#xA;&#xD;&#xA;This is **very** surprising to me, since I average about 70 FPS doing exactly the same thing with my own custom OpenGL engine, which uses old OpenGL rendering (meaning one draw call for every single sprite). I actually expected XNAs rendering to be a ton faster, since it draws everything in one draw call. &#xD;&#xA;&#xD;&#xA;Am I rendering this the wrong way? Playing around with SpriteSortMode settings has made almost no difference, some of them just make it a tiny bit slower (depth sorting etc.)." />
  <row Id="30919" PostHistoryTypeId="4" PostId="13865" RevisionGUID="01ac1207-aa2d-44d1-a85f-362d41a005af" CreationDate="2011-06-18T19:21:50.880" UserId="7946" Comment="edited body; edited title" Text="XNA, SpriteBatch: Slow when rendering lots of sprites?" />
  <row Id="30920" PostHistoryTypeId="5" PostId="13857" RevisionGUID="3c8946dd-5652-430c-b4a3-0b24c31132ab" CreationDate="2011-06-18T19:23:58.660" UserId="848" Comment="better wording" Text="I need a scenario for a small dialog-based game / interactive story. The game would be used as an example for a middleware tool we're developing.&#xD;&#xA;&#xD;&#xA;I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to write a new one.&#xD;&#xA;&#xD;&#xA;Please advise, where to go to find such person / service? We're based in Russia, so getting a talented enough native English writer locally is a bit of a problem. " />
  <row Id="30921" PostHistoryTypeId="2" PostId="13866" RevisionGUID="25a4d441-97e8-4447-afd7-1c21d3a93d1a" CreationDate="2011-06-18T19:28:05.113" UserId="1839" Text="As you already suggested, you have to take the mass of the objects into account to calculate the change of velocity caused by the impulse. Namely, divide the impulse by the mass to get the change of velocity. &#xD;&#xA;&#xD;&#xA;You can find this and much more information at this paper &quot;[Impulse-based Dynamic Simulation of Rigid Body Systems][1]&quot; from Brian Vincent Mirtich.&#xD;&#xA;&#xD;&#xA;Page 60 shows it in detail:&#xD;&#xA;&#xD;&#xA;    p       -&gt; impulse&#xD;&#xA;    delta_v -&gt; change of velocity caused by the impulse&#xD;&#xA;    m       -&gt; mass&#xD;&#xA;&#xD;&#xA;         p(t)       = m * delta_v(t)&#xD;&#xA;    so:  delta_v(t) = p(t) / m&#xD;&#xA;&#xD;&#xA;Here is another paper about the matter at hand called &quot;[A Real-time Capable Impulse-based Collision Response Algorithm for Rigid Body Dynamics][2]&quot; from Florian Schornbaum. You can find the same calculation at Page 23.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kuffner.org/james/software/dynamics/mirtich/mirtichThesis.pdf&#xD;&#xA;  [2]: http://www10.informatik.uni-erlangen.de/~florian/collision_response_slides.pdf" />
  <row Id="30922" PostHistoryTypeId="2" PostId="13867" RevisionGUID="c6759c70-c3bf-436d-ad1a-9bddb8d9a734" CreationDate="2011-06-18T19:28:13.897" UserId="7067" Text="I'm development a network card game, and for now i've two players connected but there is a problem with one of them, this one can't do anything on the game. Looks that screen was blocked. I'm think that is because a code i used before.&#xD;&#xA;&#xD;&#xA;That code is:&#xD;&#xA;&#xD;&#xA;    if (InvokeRequired)&#xD;&#xA;                {&#xD;&#xA;                    this.Invoke(new MethodInvoker(delegate&#xD;&#xA;                    {&#xD;&#xA;&#xD;&#xA;                       ...&#xD;&#xA;&#xD;&#xA;                }));&#xD;&#xA;                    return;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;The code above is surrounding code to changing Button values, make connection with server and create game window. Without this code a warning is shown.&#xD;&#xA;&#xD;&#xA;InvalidOperationException was unhandled&#xD;&#xA;&#xD;&#xA;Cross-thread operation not valid: Control 'startGameButton' accessed from a thread other than the thread it was created on." />
  <row Id="30923" PostHistoryTypeId="1" PostId="13867" RevisionGUID="c6759c70-c3bf-436d-ad1a-9bddb8d9a734" CreationDate="2011-06-18T19:28:13.897" UserId="7067" Text="Thread problem with XNA C#" />
  <row Id="30924" PostHistoryTypeId="3" PostId="13867" RevisionGUID="c6759c70-c3bf-436d-ad1a-9bddb8d9a734" CreationDate="2011-06-18T19:28:13.897" UserId="7067" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="30925" PostHistoryTypeId="2" PostId="13868" RevisionGUID="c64e32bc-2813-4229-a5a0-ef5b612aa7e5" CreationDate="2011-06-18T19:31:11.540" UserId="962" Text="I am not sure, but I think you have each sprite with an instance of its own texture. Meaning instead of doing 1 sprite batch, you are doing 2500 sprite batches. Try replacing spr.Texture with a single local Texture instance.&#xD;&#xA;&#xD;&#xA;Also you do arithmetic and call functions from inside the spritebatch function call, which could slow it down more. Try to have all your calculations done somewhere else, and try to store the rotations in the correct format instead of what you are doing." />
  <row Id="30926" PostHistoryTypeId="5" PostId="13866" RevisionGUID="f3aab11b-43dc-4c72-967f-56a98f76db53" CreationDate="2011-06-18T19:46:16.060" UserId="1839" Comment="deleted 14 characters in body" Text="As you already suggested, you have to take the mass of the objects into account to calculate the change of velocity caused by the impulse. Namely, divide the impulse by the mass for each object. &#xD;&#xA;&#xD;&#xA;You can find this and much more information at this paper &quot;[Impulse-based Dynamic Simulation of Rigid Body Systems][1]&quot; from Brian Vincent Mirtich.&#xD;&#xA;&#xD;&#xA;Page 60 shows it in detail:&#xD;&#xA;&#xD;&#xA;    p       -&gt; impulse&#xD;&#xA;    delta_v -&gt; change of velocity caused by the impulse&#xD;&#xA;    m       -&gt; mass&#xD;&#xA;&#xD;&#xA;         p(t)       = m * delta_v(t)&#xD;&#xA;    so:  delta_v(t) = p(t) / m&#xD;&#xA;&#xD;&#xA;Here is another paper about the matter at hand called &quot;[A Real-time Capable Impulse-based Collision Response Algorithm for Rigid Body Dynamics][2]&quot; from Florian Schornbaum. You can find the same calculation at Page 23.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kuffner.org/james/software/dynamics/mirtich/mirtichThesis.pdf&#xD;&#xA;  [2]: http://www10.informatik.uni-erlangen.de/~florian/collision_response_slides.pdf" />
  <row Id="30927" PostHistoryTypeId="5" PostId="13866" RevisionGUID="e66771e7-a585-4492-839e-5c6076c11c73" CreationDate="2011-06-18T20:02:30.923" UserId="1839" Comment="deleted 20 characters in body" Text="As you already suggested, you have to take the mass of the objects into account to calculate the change of velocity caused by the impulse. Namely, divide the impulse by the mass for each object. &#xD;&#xA;&#xD;&#xA;You can find this and much more information in this paper &quot;[Impulse-based Dynamic Simulation of Rigid Body Systems][1]&quot; from Brian Vincent Mirtich.&#xD;&#xA;&#xD;&#xA;Page 60 shows it in detail:&#xD;&#xA;&#xD;&#xA;    p       -&gt; impulse&#xD;&#xA;    delta_v -&gt; change of velocity caused by the impulse&#xD;&#xA;    m       -&gt; mass&#xD;&#xA;&#xD;&#xA;         p(t)       = m * delta_v(t)&#xD;&#xA;    so:  delta_v(t) = p(t) / m&#xD;&#xA;&#xD;&#xA;Here is another paper about it called &quot;[A Real-time Capable Impulse-based Collision Response Algorithm for Rigid Body Dynamics][2]&quot; from Florian Schornbaum. You can find that calculation at Page 23.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kuffner.org/james/software/dynamics/mirtich/mirtichThesis.pdf&#xD;&#xA;  [2]: http://www10.informatik.uni-erlangen.de/~florian/collision_response_slides.pdf" />
  <row Id="30928" PostHistoryTypeId="2" PostId="13869" RevisionGUID="dc437d95-2e7c-4379-bc6d-ef3893627405" CreationDate="2011-06-18T20:13:44.417" UserId="2306" Text="If all you're after is demo content, consider borrowing a plot from an existing source such as a &quot;Choose Your Own Adventure&quot; book, or a game that you like. If you're not selling the content, I doubt I will cause copyright problems (but i am not a lawyer). " />
  <row Id="30929" PostHistoryTypeId="2" PostId="13870" RevisionGUID="08f8124c-755b-41d3-9dfd-725211f1e4b4" CreationDate="2011-06-18T21:02:51.470" UserId="160" Text="In general, no, you can't do that. Random number generators are [one way functions](http://en.wikipedia.org/wiki/One_way_function) from the current seed to the value.&#xD;&#xA;&#xD;&#xA;A simple thought experiment should clarify why you can't do this. Say you're using your random number generator to generate the numbers for a level like `25 65 78 01`. Lets say your seed is a four digit number and each of those levels is a two digit number. Given that, there's 100,000,000 possible different levels but only 10,000 different seeds. Obviously each level can't have its own unique seed then, there aren't enough to go around." />
  <row Id="30930" PostHistoryTypeId="2" PostId="13871" RevisionGUID="1a49e539-2c03-4312-b8b6-a7af6e32fe3a" CreationDate="2011-06-18T21:14:31.083" UserId="160" Text="Handling collision is a common problem in games. The tricky part is that the way a collision is handled depends on *both* of the things that are colliding. You want to be able to select an appropriate method based on a pair of classes, not just one. Unfortunately, most OOP languages like C++ only support *single* dynamic dispatch (which is what virtual methods and overriding are).&#xD;&#xA;&#xD;&#xA;What you want is [*double dispatch*](http://en.wikipedia.org/wiki/Double_dispatch). You can imagine four functions like this:&#xD;&#xA;&#xD;&#xA;    void playerToPlayerCollision(Player* a, Player* b) { /* ... */ }&#xD;&#xA;    void playerToBulletCollision(Player* a, Bullet* b) { /* ... */ }&#xD;&#xA;    void bulletToPlayerCollision(Bullet* a, Player* b) { /* ... */ }&#xD;&#xA;    void bulletToBulletCollision(Bullet* a, Bullet* b) { /* ... */ }&#xD;&#xA;&#xD;&#xA;And somehow the language would magically pick the right one based on the two `Entity*` objects that collided. You can make that magic work using a combination of overriding (for the first dispatch) and the [visitor pattern](http://en.wikipedia.org/wiki/Visitor_pattern) (for the second). It looks like this:&#xD;&#xA;&#xD;&#xA;    class Entity {&#xD;&#xA;      // Physics engine calls this:&#xD;&#xA;      virtual void collide(Entity* other) = 0;&#xD;&#xA;&#xD;&#xA;      virtual void collideWithPlayer(Player* player) = 0;&#xD;&#xA;      virtual void collideWithBullet(Bullet* bullet) = 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Player : public Entity {&#xD;&#xA;      // Double dispatch:&#xD;&#xA;      virtual void collide(Entity* other) {&#xD;&#xA;        other-&gt;collideWithPlayer(this);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      // Actual collision-handling functions:&#xD;&#xA;      virtual void collideWithPlayer(Player* player) {&#xD;&#xA;        // Player -&gt; Player collision.&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      virtual void collideWithBullet(Bullet* bullet) {&#xD;&#xA;        // Player -&gt; Bullet collision.&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Bullet : public Entity {&#xD;&#xA;      // Double dispatch:&#xD;&#xA;      virtual void collide(Entity* other) {&#xD;&#xA;        other-&gt;collideWithBullet(this);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      // Actual collision-handling functions:&#xD;&#xA;      virtual void collideWithPlayer(Player* player) {&#xD;&#xA;        // Bullet -&gt; Player collision.&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      virtual void collideWithBullet(Bullet* bullet) {&#xD;&#xA;        // Bullet -&gt; Bullet collision.&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When the physics engine calls `collide`, that gets overridden by `Player` and `Bullet`. Those overrides dispatch on the first of the colliding objects. They immediately call another virtual method on the *other* colliding object. That method does the second dynamic dispatch and you ultimately select one of four methods based on the types of both arguments. No casting required.&#xD;&#xA;&#xD;&#xA;This pattern only has two real limitations:&#xD;&#xA;&#xD;&#xA;1. It's complex and obscure. Unless you recognize the pattern, the code here is kind of strange looking and hard to grasp.&#xD;&#xA;&#xD;&#xA;2. You're constrained to a fixed set of subclasses. You'll note that `Entity` now is aware of the `Bullet` and `Player` subclasses. It will need to be aware of *all* subclasses that you dispatch on, which defeats the open-ended subclasses you usually get in C++.&#xD;&#xA;&#xD;&#xA;If you can live with those, this pattern works pretty well.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30931" PostHistoryTypeId="25" PostId="13865" RevisionGUID="4c843c7a-8be8-43b5-8c0e-e2f05f9c7958" CreationDate="2011-06-18T21:24:32.850" Comment="http://twitter.com/#!/StackGameDev/status/82197025311031296" />
  <row Id="30932" PostHistoryTypeId="2" PostId="13872" RevisionGUID="7b0f4ca7-6f08-4a0b-b2ff-9c49503695af" CreationDate="2011-06-18T21:30:59.650" UserId="6091" Text="About XNA sprite sheet example:&#xD;&#xA;http://stackoverflow.com/questions/726921/recommend-sprite-size-for-games-xna&#xD;&#xA;&#xD;&#xA;This also may be usefull to you.&#xD;&#xA;" />
  <row Id="30933" PostHistoryTypeId="2" PostId="13873" RevisionGUID="1ad641d8-21eb-436e-ab12-3001d81b226e" CreationDate="2011-06-18T21:50:09.810" UserId="4662" Text="There's nothing wrong with a good `dynamic_cast`. It is not the best design in many situations, but in some, it simply is the best, and in this kind of code, `dynamic_cast` is the right way to go. You don't want to make your derived classes aware of each other, and you don't want to put things in the interface that don't make sense. For example, what if a player collides with a wall? Unless you think that should do damage, it doesn't make sense to give Entity a DamageValue- because not all Entities have damage or do damage to the player upon collision.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30934" PostHistoryTypeId="2" PostId="13874" RevisionGUID="03f359ad-6994-4260-a8eb-3cd338d122c4" CreationDate="2011-06-18T22:01:06.470" UserId="8114" Text="I want to start writing games using ogre in combination with the CodeBlocks compiler but am struggling with the installation. I got the latest version of the compiler as well as the ogre engine from their respective website, have installed the compiler but cannot find my way in the integration of ogre though i read their installation guide(which i found confusing).I need clear step by step guide please." />
  <row Id="30935" PostHistoryTypeId="1" PostId="13874" RevisionGUID="03f359ad-6994-4260-a8eb-3cd338d122c4" CreationDate="2011-06-18T22:01:06.470" UserId="8114" Text="ogre installation with codeblocks compiler/ide" />
  <row Id="30936" PostHistoryTypeId="3" PostId="13874" RevisionGUID="03f359ad-6994-4260-a8eb-3cd338d122c4" CreationDate="2011-06-18T22:01:06.470" UserId="8114" Text="&lt;ogre&gt;" />
  <row Id="30937" PostHistoryTypeId="2" PostId="13875" RevisionGUID="c775f4e3-155a-4851-a72e-167da6ee39a3" CreationDate="2011-06-18T22:03:07.090" UserId="8115" Text="I've found the answer myself, excuse me for such a hesitant post.&#xD;&#xA;&#xD;&#xA;To find a static memory address you can use Cheat Engine.&#xD;&#xA;Scan for your health variable, right-click it and press Pointer scan for this address.&#xD;&#xA;A pointer basically points to another memory address that might hold a useful value.&#xD;&#xA;It is possible that you have a multilevel pointer, a pointer to a pointer to a pointer to a pointer to your health variable.&#xD;&#xA;This scan will look for all memory addresses that have the value of your variables address.&#xD;&#xA;This list can be gigantic when finished scanning, therefore you must close and reopen your game, look for your health variable again and open your old pointer scan results. Now you need to rescan the pointers with the new memory address of your health, each time you do this cycle your list will get narrower and narrower until you get an accurate base pointer that is always correct.&#xD;&#xA;&#xD;&#xA;If the memory values are 'encrypted', for example flash player multiplies your variable by 8 before putting it into memory and divides it when utilising it. In order to find your variables and base pointers you can use Cheat Engine scanning methods to scan for Unknown initial value. Lose some health in the game and look for decreased values, heal in the game and look for increased value. Repeat this cycle until you get an accurate result. Now you can find out the ratio between the health value displayed in the game and the value you have found in Cheat Engine.&#xD;&#xA;&#xD;&#xA;I've been able to read my League of Legends Health, maxHealth and Level variables since yesterday. I've learned a lot and for what I'm aiming for I will have to learn A LOT more.&#xD;&#xA;&#xD;&#xA;Thanks for trying to help me anyway, everyone!&#xD;&#xA;&#xD;&#xA;Diede" />
  <row Id="30938" PostHistoryTypeId="5" PostId="13832" RevisionGUID="2c0192d2-2050-46f9-ab3c-44852a43084e" CreationDate="2011-06-18T22:15:11.390" UserId="8090" Comment="Added an explanation of glStencilFunc()'s third parameter." Text="Okay, this does sound like something you can do with stenciling. Stenciling is generally used in conjunction with Multipass Rendering.&#xD;&#xA;&#xD;&#xA;## Multipass Rendering ##&#xD;&#xA;&#xD;&#xA;Multipass Rendering basically refers to a rendering loop where multiple renders a performed per frame. Each pass may use a different configuration of OpenGL (e.g. with different stenciling settings) and render the same or different artifacts. The pseudo code would look something like this:&#xD;&#xA;&#xD;&#xA;    initialize the OpenGL configuration for the entire sequence&#xD;&#xA;&#xD;&#xA;    for each frame&#xD;&#xA;    {&#xD;&#xA;        initialize the OpenGL configuration for the frame&#xD;&#xA;&#xD;&#xA;        for each rendering pass&#xD;&#xA;        {&#xD;&#xA;            initialize the OpenGL configuration for the rendering pass&#xD;&#xA;            &#xD;&#xA;            render the artifacts&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In your case, you will need a rendering pass for each layer of rectangles so that you can prepare the stencil buffer before each pass.&#xD;&#xA;&#xD;&#xA;## Your Problem ##&#xD;&#xA;&#xD;&#xA;Effectively, you want to restrict the pixels that *can be drawn* in each rendering pass to the set of pixels that *were drawn* in the previous rendering pass. To do this, you are going to need to do three things:&#xD;&#xA;&#xD;&#xA;1. Record the pixels you draw.&#xD;&#xA;2. Only draw pixels that were also drawn in the previous rendering pass (except for the first rendering pass, of course).&#xD;&#xA;3. Before each frame, remove the record of which pixels have been drawn.&#xD;&#xA;&#xD;&#xA;### Record the pixels you draw ###&#xD;&#xA;&#xD;&#xA;This is where [`glStencilOp()`](http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml) comes in, `glStencilOp()` determines what's going to happen to the **stencil buffer** when a pixel is drawn (and in other situations too, but we won't worry about that). To increment the value in the stencil buffer for each pixel drawn (and hence record that you drew it) include this in the initialization of the entire sequence:&#xD;&#xA;&#xD;&#xA;    glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);&#xD;&#xA;&#xD;&#xA;The third argument is the important one, it determines what happens when a pixel is drawn (normally), to understand the function better, read the reference docs.&#xD;&#xA;&#xD;&#xA;### Only draw pixels that were also drawn in the previous rendering pass ###&#xD;&#xA;&#xD;&#xA;This is a job for [`glStencilFunc()`](http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml). It determines what's going to happen to the **frame buffer** depending on what the value in the stencil buffer is. &#xD;&#xA;&#xD;&#xA;You need to call it before every rendering pass to say 'only draw if the stencil buffer says I drew last time round'. Since the stencil buffer is being incremented each time, the value to test against needs to be incremented too. For example, the first three rendering passes should call `glStencilFunc()` like this:&#xD;&#xA;&#xD;&#xA;    glStencilFunc(GL_EQUAL, 0, 1); // if (stencil_buffer_value == 0) draw;&#xD;&#xA;    glStencilFunc(GL_EQUAL, 1, 1); // if (stencil_buffer_value == 1) draw;&#xD;&#xA;    glStencilFunc(GL_EQUAL, 2, 1); // if (stencil_buffer_value == 2) draw;&#xD;&#xA;&#xD;&#xA;Just ignore the third parameter for now, read the reference documentation if want to know what it is.&#xD;&#xA;&#xD;&#xA;**EDIT:** The third parameter is used when you want to do bit-wise tests against the stencil buffer value. Most implementations allow 8 bits in the stencil buffer (otherwise known as 8 planes). The third parameter allows you to mask out bits that you do not want to include in the test (by ANDing it with the second parameter before doing the test). Since I have used 1 as the third parameter, ANDing it has no effect. Also, since we are treating the stencil buffer as holding integers in this example, bit-wise tests don't make sense. By using these planes, though, we could potentially hold 8 stencils in the buffer at one time and choose which combination of stencils we want to use in each rendering pass.&#xD;&#xA;&#xD;&#xA;### Remove the record of which pixels have been drawn ###&#xD;&#xA;&#xD;&#xA;Each frame you don't want to continue adding to the existing stencil buffer values just like you don't want to leave the previously rendered image in the frame buffer. You clear it in the same way you would clear the frame buffer too:&#xD;&#xA;&#xD;&#xA;    glClear(GL_STENCIL_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;Or, do both at once:&#xD;&#xA;&#xD;&#xA;    glClear(GL_FRAME_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);" />
  <row Id="30939" PostHistoryTypeId="2" PostId="13876" RevisionGUID="9b1005ee-9648-4436-925a-1f68bf0c3b14" CreationDate="2011-06-18T22:17:47.713" UserId="1839" Text="[Here][1] is a step by step installation guide for ogre and code blocks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/Codeblocks" />
  <row Id="30940" PostHistoryTypeId="5" PostId="13876" RevisionGUID="b335c888-9041-4a9e-b490-a440324e120a" CreationDate="2011-06-18T22:26:44.967" UserId="1839" Comment="deleted 25 characters in body" Text="[Here][1] is a step by step installation guide&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/tikiwiki/Codeblocks" />
  <row Id="30941" PostHistoryTypeId="2" PostId="13877" RevisionGUID="492ea98c-e77d-45d3-bd68-e4e9bab765dc" CreationDate="2011-06-18T22:49:34.170" UserId="8116" Text="Hello can you make a 3d game like minecraft in the program java eclipse and i know this is not a unity question." />
  <row Id="30942" PostHistoryTypeId="1" PostId="13877" RevisionGUID="492ea98c-e77d-45d3-bd68-e4e9bab765dc" CreationDate="2011-06-18T22:49:34.170" UserId="8116" Text="Can you make a 3d game in eclipse java?" />
  <row Id="30943" PostHistoryTypeId="3" PostId="13877" RevisionGUID="492ea98c-e77d-45d3-bd68-e4e9bab765dc" CreationDate="2011-06-18T22:49:34.170" UserId="8116" Text="&lt;minecraft&gt;" />
  <row Id="30944" PostHistoryTypeId="2" PostId="13878" RevisionGUID="4c191829-d437-40dc-9cde-da4cbc45a714" CreationDate="2011-06-18T23:09:50.330" UserId="5899" Text="&quot;[Image Converter Plus][1]&quot; can convert PVR to JPG and PNG images. You can select and convert multiple images at same time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imageconverterplus.com/how-to-convert/pvr_jpg.html" />
  <row Id="30945" PostHistoryTypeId="2" PostId="13879" RevisionGUID="ced0be0a-0e84-4116-afef-b70f72c79855" CreationDate="2011-06-18T23:18:34.640" UserId="7548" Text="Yes.  You can create a game like Minecraft using Eclipse as your source code editor, but that's not all you'll need...&#xD;&#xA;&#xD;&#xA;An MMORPG will require a lot of work (MMORPGs aren't known to be small projects), and you'll also need to use a variety of other tools for other aspects of the project:&#xD;&#xA;&#xD;&#xA;* graphics editors for various graphics (e.g., logo for the game)&#xD;&#xA;* 3D modeling tools (to create/modify 3D graphics)&#xD;&#xA;* word processor for the planning documents (a detailed plan is highly recommended)&#xD;&#xA;* word processor for writing story-lines (assuming there is at least one story-line)&#xD;&#xA;* word processor for documentation (your users will want some documentation)&#xD;&#xA;* web site development/maintenance tools (assuming there will be a web site)&#xD;&#xA;* accounting software (if your users need to pay for anything)&#xD;&#xA;* database management tools (you need to save user data and game state at the very least)&#xD;&#xA;&#xD;&#xA;(If I've missed some important tools, please make mention of them in the comments.)&#xD;&#xA;" />
  <row Id="30946" PostHistoryTypeId="5" PostId="13879" RevisionGUID="99b70b8f-2dd0-463a-a665-088c55aa63a6" CreationDate="2011-06-18T23:24:02.997" UserId="7548" Comment="deleted 19 characters in body; added 63 characters in body" Text="Yes.  You can create a game like Minecraft using Eclipse as your source code editor, but that's not all you'll need...&#xD;&#xA;&#xD;&#xA;An MMORPG will require a lot of work (MMORPGs aren't known to be small projects), so you'll need a variety of tools for other aspects of the project:&#xD;&#xA;&#xD;&#xA;* graphics editors for various graphics (e.g., logo for the game)&#xD;&#xA;* 3D modeling tools (to create/modify 3D graphics)&#xD;&#xA;* word processor for the planning documents (a detailed plan is highly recommended)&#xD;&#xA;* word processor for writing story-lines (assuming there is at least one story-line)&#xD;&#xA;* word processor for documentation (your users will want some documentation)&#xD;&#xA;* web site development/maintenance tools (assuming there will be a web site)&#xD;&#xA;* accounting software (if your users need to pay for anything)&#xD;&#xA;* database management tools (you need to save user data and game state at the very least)&#xD;&#xA;&#xD;&#xA;(If I've missed some important tools, please make mention of each one in a separate comment {if nobody else has} and I will probably _upvote_ it.)&#xD;&#xA;" />
  <row Id="30947" PostHistoryTypeId="5" PostId="13879" RevisionGUID="8582a14f-f9c1-496c-a3e6-1094081e37a5" CreationDate="2011-06-18T23:29:10.337" UserId="7548" Comment="added 11 characters in body; added 12 characters in body; added 1 characters in body; added 8 characters in body" Text="Yes.  You can create a 3D game like Minecraft in Java using Eclipse as your source code editor, but that's not all you'll need...&#xD;&#xA;&#xD;&#xA;An MMORPG will require a lot of work (MMORPGs aren't known to be small projects), so you'll need a variety of tools for other aspects of the project:&#xD;&#xA;&#xD;&#xA;* graphics editors for various graphics (e.g., logo for the game)&#xD;&#xA;* 3D modeling tools (to create/modify 3D graphics)&#xD;&#xA;* word processor for the planning documents (a detailed plan is highly recommended)&#xD;&#xA;* word processor for writing story-lines (assuming there is at least one story-line)&#xD;&#xA;* word processor for documentation (your users will want some documentation)&#xD;&#xA;* web site development/maintenance tools (assuming there will be a web site)&#xD;&#xA;* accounting software (if your users need to pay for anything)&#xD;&#xA;* database management tools (you need to save user data and game state at the very least)&#xD;&#xA;&#xD;&#xA;(If I've missed some important tools:  Please make mention of each tool {and its use}, each in a separate comment {if nobody else has}, and I will likely _upvote_ it.)&#xD;&#xA;" />
  <row Id="30948" PostHistoryTypeId="2" PostId="13880" RevisionGUID="27269177-6c87-4e0e-b8a1-4d7024ee64ad" CreationDate="2011-06-18T23:51:03.320" UserId="2081" Text="I'm writing a little embedded language for another project. While game development was not its original intent, it's starting to look like a good fit, and I figure I'll develop it in that vein at some point.&#xD;&#xA;&#xD;&#xA;Without revealing any details (to avoid bias), I'm curious to know:&#xD;&#xA;&#xD;&#xA;**What features do you love in a scripting language for game development?**&#xD;&#xA;&#xD;&#xA;If you've used Lua, Python, or another embedded language such as Tcl or Guile as your primary scripting language in a game project, what aspects did you find the most useful?&#xD;&#xA;&#xD;&#xA;  * **Language features** (lambdas, classes, parallelism)&#xD;&#xA;&#xD;&#xA;  * **Implementation features** (performance optimisations, JIT, hardware acceleration)&#xD;&#xA;&#xD;&#xA;  * **Integration features** (C, C++, or .NET bindings)&#xD;&#xA;&#xD;&#xA;  * Or something entirely different?&#xD;&#xA;" />
  <row Id="30949" PostHistoryTypeId="1" PostId="13880" RevisionGUID="27269177-6c87-4e0e-b8a1-4d7024ee64ad" CreationDate="2011-06-18T23:51:03.320" UserId="2081" Text="What do you look for in a scripting language?" />
  <row Id="30950" PostHistoryTypeId="3" PostId="13880" RevisionGUID="27269177-6c87-4e0e-b8a1-4d7024ee64ad" CreationDate="2011-06-18T23:51:03.320" UserId="2081" Text="&lt;tools&gt;&lt;scripting&gt;&lt;language-choice&gt;&lt;languages&gt;" />
  <row Id="30951" PostHistoryTypeId="2" PostId="13881" RevisionGUID="1bd62e08-c5cd-42cd-bd7a-6e8c53152907" CreationDate="2011-06-19T00:20:14.767" UserId="7548" Text="For web-based gaming, three important factors for me are:&#xD;&#xA;&#xD;&#xA;* Familiarity&#xD;&#xA;* Speed&#xD;&#xA;* Integration&#xD;&#xA;&#xD;&#xA;I particularly like Perl, partly because I am already familiar with the language, and because with a web server module like mod_perl2 there is a huge performance and integration benefit -- mod_perl2 keeps a compiled version of the scripts in RAM (which are only interpreted upon first loading) that gives it a major speed advantage over other interpreted languages that don't have compilation options, and it also integrates into the Apache HTTPd server with a feature-rich API that provides access to a lot of very powerful features.&#xD;&#xA;&#xD;&#xA;These factors can be useful for web-based game development (and where database access is needed, caching the database connections helps to further reduce response times for users).  Of course, this may not be the most ideal solution for everything as each language has its advantages (and disadvantages), but it has always worked well for my needs.&#xD;&#xA;" />
  <row Id="30952" PostHistoryTypeId="25" PostId="13880" RevisionGUID="2ab60932-a3b8-492f-9902-32e357a17ab6" CreationDate="2011-06-19T00:24:33.740" Comment="http://twitter.com/#!/StackGameDev/status/82242324951871488" />
  <row Id="30953" PostHistoryTypeId="2" PostId="13882" RevisionGUID="86dfe03c-72d7-4deb-b518-728b8c0e0deb" CreationDate="2011-06-19T00:39:14.393" UserId="3830" Text="Check out [ImageMagick][1] - it seems to do everything, and has a good command line interface.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://imagemagick.org/script/index.php" />
  <row Id="30954" PostHistoryTypeId="5" PostId="13877" RevisionGUID="a275e1d2-e3be-4f9f-bc84-dd6d1f2ea6fe" CreationDate="2011-06-19T00:41:05.687" UserId="3830" Comment="Made question and tags more focused on original posters intent" Text="Hello can you make a 3d game like minecraft using java?" />
  <row Id="30955" PostHistoryTypeId="6" PostId="13877" RevisionGUID="a275e1d2-e3be-4f9f-bc84-dd6d1f2ea6fe" CreationDate="2011-06-19T00:41:05.687" UserId="3830" Comment="Made question and tags more focused on original posters intent" Text="&lt;3d&gt;&lt;programming&gt;&lt;java&gt;" />
  <row Id="30956" PostHistoryTypeId="2" PostId="13883" RevisionGUID="661c7bc5-5bf6-47d6-b80e-e7f16a6f8381" CreationDate="2011-06-19T01:53:09.720" UserId="288" Text="Take a look at this question and answer: &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9277/optimizing-an-xna-2d-game&quot;&gt;&lt;b&gt;Optimizing an XNA 2D game&lt;/b&gt;&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;I would guess you are either hitting a fill/texture-fetch limit (a GPU limit) or a batch limit (a CPU limit, as described in that linked answer).&#xD;&#xA;&#xD;&#xA;Try setting the position of all of your sprites off-screen, and seeing if it makes it faster. If it does, you're hitting a fill limit. You need to reduce the amount of over-draw or simply reduce the amount of stuff you're drawing.&#xD;&#xA;&#xD;&#xA;If you're hitting the batch limit, then `SpriteSortMode.Texture` is likely to give you an enormous speed-up. If you cannot use this as a real-world solution, then the correct solution is to use sprite-sheets to reduce texture swaps. (Of course, if you're only using one texture already, or your textures are pre-sorted, then this won't help.)&#xD;&#xA;&#xD;&#xA;I *seriously* doubt the maths operations are dominating your CPU usage. There are faster alternatives to the `+` operator and `ToRadians`, but it's not like these are slow! (If you're accessing each sprite's information through properties - each property access has the *same* overhead - you'd be better off switching to fields rather inlining those functions.)&#xD;&#xA;&#xD;&#xA;One thing that might be eating your performance is *cache coherence*. If each `Sprite` is a reference type (ie: `class`), then you're likely suffering a huge number of cache misses as you loop through them. Try making `sprites` an array of value types (ie: `struct`). (&lt;a href=&quot;http://gamedev.stackexchange.com/questions/853/c-low-level-optimization-tips/870#870&quot;&gt;see this answer&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;A possible worst-case is if they are already value types and you're accessing them through an interface - in that case you're doing an *epic* amount of boxing (slow and allocates memory).&#xD;&#xA;&#xD;&#xA;(Of course, there could be other things wrong, but that's all I can think of at the moment based on what you've posted.)" />
  <row Id="30957" PostHistoryTypeId="5" PostId="13869" RevisionGUID="b4b4e2eb-590b-47df-8986-ba33619171fa" CreationDate="2011-06-19T02:41:29.940" UserId="2306" Comment="added 632 characters in body" Text="If all you're after is demo content, consider borrowing a plot from an existing source such as a &quot;Choose Your Own Adventure&quot; book, or a game that you like. If you're not selling the content, I doubt I will cause copyright problems (but i am not a lawyer). &#xD;&#xA;&#xD;&#xA;**To clarify**: I'm *not* advocating stealing someone else's work. As someone who makes intangible things for a living, I don't advocating stealing intellectual property.&#xD;&#xA;&#xD;&#xA;If I'm demoing, say, an audio channel separation tool to a client, I'm not going to pay a musician to compose and record custom music for the demo. Using one of my existing MP3s or CDs is just fine - I'm not reselling (or distributing) their content, and am in no way harming the copyright owner ( financially or otherwise).&#xD;&#xA;&#xD;&#xA;Now, if I were putting the same demo on a website or distributing it in some other way, the circumstances are very different. " />
  <row Id="30958" PostHistoryTypeId="25" PostId="13874" RevisionGUID="9e9f0096-174b-4a38-b8fc-6a85edbda27a" CreationDate="2011-06-19T03:24:34.270" Comment="http://twitter.com/#!/StackGameDev/status/82287627230920704" />
  <row Id="30959" PostHistoryTypeId="2" PostId="13884" RevisionGUID="b0e05fc2-fc42-4afb-9102-2d6914b0728d" CreationDate="2011-06-19T03:41:31.357" UserId="7457" Text="Im learning XNA hoping to create a real world game out if one day, i.e. not just learning it to learn game programming. &#xD;&#xA;&#xD;&#xA;But are there any successful real world XNA games out there?&#xD;&#xA;&#xD;&#xA;(Maybe this question could be turned into a community wiki to a list can be maintained.)" />
  <row Id="30960" PostHistoryTypeId="1" PostId="13884" RevisionGUID="b0e05fc2-fc42-4afb-9102-2d6914b0728d" CreationDate="2011-06-19T03:41:31.357" UserId="7457" Text="What popular real world XNA games are out there?" />
  <row Id="30961" PostHistoryTypeId="3" PostId="13884" RevisionGUID="b0e05fc2-fc42-4afb-9102-2d6914b0728d" CreationDate="2011-06-19T03:41:31.357" UserId="7457" Text="&lt;xna&gt;" />
  <row Id="30962" PostHistoryTypeId="2" PostId="13885" RevisionGUID="91812d8c-e33d-4716-9536-7936e3f31d76" CreationDate="2011-06-19T04:58:29.763" UserId="2338" Text="[Terraria](http://www.terraria.org/). It sold 200,000 copies in the first week of release on Steam. It's been in the Steam top 10 sellers list since. I'd say that makes it a popular XNA game." />
  <row Id="30964" PostHistoryTypeId="5" PostId="13857" RevisionGUID="7067a5bb-87c2-44e1-a23b-d106abb1486e" CreationDate="2011-06-19T05:02:01.727" UserId="848" Comment="added note about reusability" Text="I need a scenario for a small dialog-based game / interactive story. The game would be used as an example for a middleware tool we're developing.&#xD;&#xA;&#xD;&#xA;I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to write a new one.&#xD;&#xA;&#xD;&#xA;Please advise, where to go to find such person / service? We're based in Russia, so getting a talented enough native English writer locally is a bit of a problem. &#xD;&#xA;&#xD;&#xA;Update: To be extra clear: We must get all necessary rights to reuse the story and make a derived work (i.e. the game we're talking about) from it. This is a commercial product. Borrowing someone else's work at random and using it just not going to work." />
  <row Id="30965" PostHistoryTypeId="2" PostId="13887" RevisionGUID="0bedc97d-ebda-4181-84fc-1afae7fc0714" CreationDate="2011-06-19T06:05:18.567" UserId="2710" Text="Arranged in the order of (decreasing) importance:&#xD;&#xA;&#xD;&#xA; - Readable at a glance. Actually, that's a requirement for _any_ language I want to use, but for scripting it's arguably more important: scripts, by definition, change more often than &quot;core&quot; code. So, no LISP or PERL.&#xD;&#xA; - Terseness. Scripts are constantly written and rewritten, and typing lots and lots of &quot;boilerplate&quot; code is inefficient.&#xD;&#xA; - Easy debugging. Preferably with breakpoints, step-through etc.&#xD;&#xA; - Easy integration with my chosen &quot;core&quot; technology. If I'm using C++ for my game, I'd need good C++ bindings, like in LUA. If the game is in C#, I'd choose a CLI-based language: C#, IronPython, Boo.&#xD;&#xA; - Language features: easy associative arrays, coroutines, maybe lambdas. Actually, this mostly depends on what I'm going to use the scripts for. AI scripts are different from, say, initialization scripts.&#xD;&#xA; - Good documentation. C# has a whole MSDN dedicated to it, and Boo has only sources. that's why C# is way better.&#xD;&#xA; - Good development environment. VS or Eclipse beats Notepad every time." />
  <row Id="30966" PostHistoryTypeId="25" PostId="13857" RevisionGUID="6193b755-7b54-4fbe-8bd0-b5b8a6f5a239" CreationDate="2011-06-19T06:24:34.400" Comment="http://twitter.com/#!/StackGameDev/status/82332925911240704" />
  <row Id="30968" PostHistoryTypeId="2" PostId="13889" RevisionGUID="7bb380b0-03f6-434e-b8a4-3e555efcead2" CreationDate="2011-06-19T08:20:13.990" UserId="1047" Text="I am not asking for full support but do any of the current gen support C++0x? I know VS C++ supports lambda and the auto keyword and i believe gcc supports both as well. Do any of the current gen consoles or handheld (3ds, sony vita) support it?" />
  <row Id="30969" PostHistoryTypeId="1" PostId="13889" RevisionGUID="7bb380b0-03f6-434e-b8a4-3e555efcead2" CreationDate="2011-06-19T08:20:13.990" UserId="1047" Text="Do any of the current gen compilers support C++0x?" />
  <row Id="30970" PostHistoryTypeId="3" PostId="13889" RevisionGUID="7bb380b0-03f6-434e-b8a4-3e555efcead2" CreationDate="2011-06-19T08:20:13.990" UserId="1047" Text="&lt;c++&gt;" />
  <row Id="30971" PostHistoryTypeId="5" PostId="13847" RevisionGUID="330145be-91d5-4ab8-9de5-f1b5688c118a" CreationDate="2011-06-19T08:22:37.237" UserId="678" Comment="fulcrum -&gt; frustum" Text="Few questions first.&#xD;&#xA;&#xD;&#xA;Are the 'rockets or something else' intelligent or dumb?  If they're dumb all you need is the timestamp of fire, the origin, and the vector to simulate their path.  If they're intelligent how intelligent are they?  Can you compute at the time of fire that they're going to hit or miss?  If so you can simulate the entire path on the client.  (&quot;At T13 the missile will strike the ship because the play lost the dodge roll / the shooter scored a critical hit.&quot;)&#xD;&#xA;&#xD;&#xA;In general though there's pretty much no reason to:&#xD;&#xA; A) have a clock rate of 50Hz, (Most *shooters* get away with 15-20 and MMOs less than that.)&#xD;&#xA; B) send full state every frame.  (Does the rotation of a missile in space matter at all?  Or can you just assume that it's 'front' is orientated along the vector it's traveling?)&#xD;&#xA;&#xD;&#xA;Spend time with prediction and interpolation, and you'll see your bandwidth plummet.  A project I worked on had an update rate of 10Hz, and an object state representation of I think 14 bytes.  (Compress everything you can!  I believe we used 6 bits to define the rotation around the x plane and then another 6 bits for a tilt above/below that plane, it looked indistinguishable from sending an actual rotational matrix / quaternion.)&#xD;&#xA;&#xD;&#xA;Another thing you can do is prioritize objects.  Show, maybe there's 100 objects in the relevant set, but do you know his view frustum on the server?  If something isn't in his view can you drop it's update frequency by an order of magnitude?  &#xD;&#xA;&#xD;&#xA;The general idea isn't to make a perfect simulation on the client, that's impossible, the idea is to make a fun game where the players won't notice that it's not a perfect simulation." />
  <row Id="30972" PostHistoryTypeId="24" PostId="13847" RevisionGUID="330145be-91d5-4ab8-9de5-f1b5688c118a" CreationDate="2011-06-19T08:22:37.237" Comment="Proposed by 678 approved by 146 edit id of 507" />
  <row Id="30973" PostHistoryTypeId="5" PostId="13884" RevisionGUID="c53ae6dd-e892-4352-9aba-b6f30d619636" CreationDate="2011-06-19T08:27:14.110" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Famous Games Written in .Net and XNA](http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Im learning XNA hoping to create a real world game out if one day, i.e. not just learning it to learn game programming. &#xD;&#xA;&#xD;&#xA;But are there any successful real world XNA games out there?&#xD;&#xA;&#xD;&#xA;(Maybe this question could be turned into a community wiki to a list can be maintained.)" />
  <row Id="30974" PostHistoryTypeId="10" PostId="13884" RevisionGUID="9c5251c7-5782-47d5-9e94-64e21c187818" CreationDate="2011-06-19T08:27:13.627" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:962,&quot;DisplayName&quot;:&quot;AttackingHobo&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30975" PostHistoryTypeId="18" PostId="13884" RevisionGUID="a2ebd64f-8145-4246-b34b-9ff4ccab3b81" CreationDate="2011-06-19T08:28:05.737" UserId="51" Comment="to http://gamedev.stackexchange.com/questions/1667/famous-games-written-in-net-and-xna" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30976" PostHistoryTypeId="18" PostId="13885" RevisionGUID="a2ebd64f-8145-4246-b34b-9ff4ccab3b81" CreationDate="2011-06-19T08:28:05.737" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13884/what-popular-real-world-xna-games-are-out-there" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30978" PostHistoryTypeId="18" PostId="1667" RevisionGUID="a2ebd64f-8145-4246-b34b-9ff4ccab3b81" CreationDate="2011-06-19T08:28:05.737" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/13884/what-popular-real-world-xna-games-are-out-there" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30979" PostHistoryTypeId="14" PostId="13884" RevisionGUID="1f78d31e-582b-426b-91d1-39793c125466" CreationDate="2011-06-19T08:28:06.280" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="30984" PostHistoryTypeId="25" PostId="13889" RevisionGUID="8c93f0e8-e296-475e-835d-0bd1dd15e9ae" CreationDate="2011-06-19T09:24:34.060" Comment="http://twitter.com/#!/StackGameDev/status/82378223639470080" />
  <row Id="30985" PostHistoryTypeId="4" PostId="13889" RevisionGUID="ebe05f3a-b881-4823-858f-d21ac06d79e1" CreationDate="2011-06-19T09:56:42.277" UserId="4662" Comment="edited title" Text="Do any of the current gen console or handheld compilers support C++0x?" />
  <row Id="30986" PostHistoryTypeId="2" PostId="13891" RevisionGUID="4aaa0236-2542-4c58-ae92-9d25f4ae8cd4" CreationDate="2011-06-19T10:21:20.580" UserId="7623" Text="Looks like you're using WinForms for your windows. You're not allowed to run WinForms control delegates on a thread that does not own said control.&#xD;&#xA;&#xD;&#xA;The old way of working around this is described here:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/zyzhdc6b(v=vs.80).aspx&#xD;&#xA;&#xD;&#xA;Though instead I would take the new school route and use BeginInvoke:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/0b1bf3y3(v=vs.80).aspx&#xD;&#xA;&#xD;&#xA;Which just lets you forget about any of that boilerplate code :)" />
  <row Id="30987" PostHistoryTypeId="2" PostId="13892" RevisionGUID="50d8fa69-ea06-4a76-8d2b-8e5215f5071f" CreationDate="2011-06-19T10:27:33.873" UserId="744" Text="Most of the major gaming consoles do not have public development kits, and forbid sharing much information about the underlying SDKs. They do tend to trail a few years behind other platforms for cost and stability reasons. If you have development kits for these consoles or the resources to get them, you should be able to contact your licensor for details on C++0x support.&#xD;&#xA;&#xD;&#xA;So I can't answer for any of the major gaming consoles, but perhaps more important for independent development, the iOS toolchain does not. Xcode is still based on GCC 4.2, and they're moving forward by switching to Clang/LLVM, not newer versions of GCC. &lt;a href=&quot;http://clang.llvm.org/cxx_status.html#cxx0x&quot;&gt;Clang keeps a feature matrix for C++0x support, and it's not nearly as complete as GCC's&lt;/a&gt;. Picking some major features, variadic templates, auto, and rvalue references are present, but constexpr, defaulted/deleted methods, and lambdas are not." />
  <row Id="30988" PostHistoryTypeId="2" PostId="13893" RevisionGUID="9cb4b408-6196-4abd-8dc0-d6cb3b3b96b6" CreationDate="2011-06-19T10:41:26.920" UserId="7623" Text="In your question you make rendering a 3d model to a 2d texture sound like it's so trivial that there are tools that do that, but as big feature (which actually is trivial) do it multiple times and append them in a spritesheet.&#xD;&#xA;&#xD;&#xA;In practice, you and your artist decide on a good renderer (many good ones exist, some cost a lot of money, some come with the artists 3d modelling tool). These renderers are scriptable, so your artist can define all the positions of your model, and then you can script the renderer to render each of the poses.&#xD;&#xA;&#xD;&#xA;On the internet you can find tools that append multiple images into a single spritesheet like this one: http://spritesheetpacker.codeplex.com/&#xD;&#xA;&#xD;&#xA;So in short, the tools to create the parts are out there, but you need to glue them together yourself." />
  <row Id="30989" PostHistoryTypeId="2" PostId="13894" RevisionGUID="d25f0918-6341-4d7a-9f4b-0d71d7608922" CreationDate="2011-06-19T11:07:59.653" UserId="7623" Text="Well normally I'd recommend you read a book about game engine physics, like the book 'game engine physics', but since you want it to be very simple I would suggest this:&#xD;&#xA;&#xD;&#xA;Define a gravity constant. Every frame, attempt to move the camera downwards with that constant. if the camera intersects with any block, using boundingboxes/spheres. Have your collision detection also return how far your sphere intrudes into the block (in the case of 1px blocks I would advice you group them together for the sake of collision detection) and just move your camera back up the amount of intrusion. If you want to be like minecraft, do damage to your character relative to how much intrusion took place.&#xD;&#xA;&#xD;&#xA;Note that if your character falls from a high cliff or something like that, it might go so fast it goes through a block in less than a frame, causing you to miss the collision, for this you might want to stretch the boundingbox/sphere between the last frame and the current frame.&#xD;&#xA;&#xD;&#xA;Note these are all very 'arcade' physics suggestions, they are not realistic at all and will most certainly fail in more complex environments." />
  <row Id="30990" PostHistoryTypeId="2" PostId="13895" RevisionGUID="18b91970-f267-45c2-8079-829dfcd3e895" CreationDate="2011-06-19T11:10:05.330" UserId="1628" Text="I've got multiple buffers in OpenGL holding data on position, normals and texcoords.&#xD;&#xA;&#xD;&#xA;I also have an equal number of buffers holding distinct index data for each of those buffers.&#xD;&#xA;&#xD;&#xA;I quite like this format (indvidual indexes for each buffer) utilised by COLLADA since it strikes me as optimally efficient at accessing each buffer.&#xD;&#xA;&#xD;&#xA;I've set up pointers to the relevant data arrays using VertexPointer, NormalPointer, etc however I have no way to assign pointers to the index buffers since DrawElements appear to only look at one ElementArrayBuffer.&#xD;&#xA;&#xD;&#xA;Can I utilise multiple indices some way or will I be better off using a different technique which can support this? I'd prefer to keep the distinct indices if at all possible." />
  <row Id="30991" PostHistoryTypeId="1" PostId="13895" RevisionGUID="18b91970-f267-45c2-8079-829dfcd3e895" CreationDate="2011-06-19T11:10:05.330" UserId="1628" Text="Using multiple indexes with buffer objects in OpenTK" />
  <row Id="30992" PostHistoryTypeId="3" PostId="13895" RevisionGUID="18b91970-f267-45c2-8079-829dfcd3e895" CreationDate="2011-06-19T11:10:05.330" UserId="1628" Text="&lt;opengl&gt;&lt;opentk&gt;&lt;vbo&gt;" />
  <row Id="30993" PostHistoryTypeId="5" PostId="13844" RevisionGUID="0c4716fc-cad7-4a54-89f0-be2b334a4d86" CreationDate="2011-06-19T12:11:27.173" UserId="5860" Comment="added 1 characters in body" Text="I am implementing MMO where player flies in space on his starship controlling it with arrow keys and cooperate with other players.&#xD;&#xA;&#xD;&#xA;I want to implement it so that player will be able to dodge his ship from rocket or something else, so I am trying to predict whole game state on client side using the same world simulating algorithm as server use. That game world is written on C# and will be called within client directly (it's written on Unity3D) and through CLR on C++ server (under Linux). Connection through UDP.&#xD;&#xA;&#xD;&#xA;Problem is how to maintain, for example, 1000 players within single map (exclusing all other game objects, mobs...): &#xD;&#xA;Let's say I will:&#xD;&#xA;&#xD;&#xA; - synchronize server with clients 50 times per second&#xD;&#xA; - send to each client states of just that game objects (and players) which he is able to see (within some radius)&#xD;&#xA; - have to send 100 objects to each player within his view radius&#xD;&#xA; - must send averagely 50 bytes per game object (it's id, x,y coords, rotation, state...)&#xD;&#xA;&#xD;&#xA;so, it will need to have such network bandwidth: 1000 (clients) * 50 (times per second) * 100 (objects to send to each player) * 50 (bytes per object) = 250 000 000 bytes per second! It's impossible!&#xD;&#xA;&#xD;&#xA;Is it possible to reduce this value somehow? For example let clients to fully simulate their game worlds (for a long period of time) and send them just inputs of other clients and synchronize game worlds, let's say, each several seconds but it will cause weird desynchronization issues at leash because of float computations.&#xD;&#xA;&#xD;&#xA;Anyway, how such games are programmed in common way? Thank you." />
  <row Id="30994" PostHistoryTypeId="25" PostId="13831" RevisionGUID="51461973-c168-4893-ad6c-9bfb4da49475" CreationDate="2011-06-19T12:24:34.567" Comment="http://twitter.com/#!/StackGameDev/status/82423524043653120" />
  <row Id="30995" PostHistoryTypeId="2" PostId="13896" RevisionGUID="caca7a9c-9b21-489e-a9d1-1a566e484122" CreationDate="2011-06-19T14:04:54.430" UserId="7981" Text="Look at these links, they might help:&#xD;&#xA;&#xD;&#xA; - http://lethain.com/touch-detection-in-cocos2d-iphone/&#xD;&#xA; - http://en.saturngod.net/detecting-touch-events-in-cocos2d-iphone-ganb&#xD;&#xA; - http://www.cocos2d.org/doc/programming_guide/handling_events.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would try to do it this way:&#xD;&#xA;&#xD;&#xA; 1. store the events in a list&#xD;&#xA; 2. examine this list in a function which is called after all input has been processed (there might be an event handler for it).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="30996" PostHistoryTypeId="2" PostId="13897" RevisionGUID="74994e68-4f10-4fcb-9950-8d60f7851bca" CreationDate="2011-06-19T14:19:22.797" UserId="4662" Text="I'm looking for two things- speed, and integration. Usually the two go together, and with familiarity. Unfortunately, for C++, there are pretty much no languages that offer speed and integration. I've used Lua and it sucked, horrifically. I spent the whole time writing bindings and nowhere near enough time actually writing code.&#xD;&#xA;&#xD;&#xA;Language features? The point of embedding a scripting language is not so that it can have whizzy dynamic language features that my original language didn't have, it's so that it can *be interpreted at run-time*. I really don't care beyond that, as long as it's basically functional, then that's fine- and fits with my host language (in this case C++). However, amazingly, languages that are designed to be integrated into host applications utterly fail the the part about *integration*.&#xD;&#xA;&#xD;&#xA;Do I need co-routines? No, I do not need co-routines. Do I need dynamic typing? No, I need to *know* what types are coming back at me from my scripting language, and since all of my existing code is built around very strong typing, I'd really like my script code to be able to respect that too. Do I need garbage collection? No, my types already manage their own resources, and I definitely do want deterministic destruction. Do I want goto? No- I want to throw exceptions.&#xD;&#xA;&#xD;&#xA;The trouble I found was that basically all the existing scripting languages were designed to extend C, not C++, and don't properly support the C++ model in many ways, and in addition to this, they have totally different semantics. How on earth am I going to translate `shared_ptr`, which is automatic deterministic destruction, into a garbage-collected environment? You can write whatever wrapping libraries you want, you won't change the underlying language semantics being incompatible with the language you're trying to extend with it. How can I ensure that this `void*` is the right type? How can I deal with inheritance? How do I throw and catch exceptions? It just doesn't work.&#xD;&#xA;&#xD;&#xA;A good scripting language for C++ would be statically typed, value semantics, deterministically destructed, throw and catch exceptions and respect my destructors/constructors/copy constructors, because then all my types will just work, nice and easy, and the resulting language will be fast and support all my original semantics, easy to bind to." />
  <row Id="30997" PostHistoryTypeId="5" PostId="13863" RevisionGUID="c1f9d639-bdb1-4920-b757-cbb87ca64465" CreationDate="2011-06-19T14:43:49.337" UserId="5899" Comment="added 423 characters in body" Text="I've found [this][1] web of a game writer that has an [article][2]: how to find the best game writer for your game&#xD;&#xA;&#xD;&#xA;**Edited:**&#xD;&#xA;&#xD;&#xA;In [this][3] web there are scripts from movies or unproduced scripts uploaded by his authors. The web FAQs says that the scripts are links to other sites. You can see the unproduced scripts and contact the author if the script has copyright. Make sure that the script hasn't been post illegaly in the web. I'm not sure if the web ensures the legality of his content.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.christymarx.com/gamewriter.htm&#xD;&#xA;  [2]: http://www.christymarx.com/gamewriter/findawriter.htm&#xD;&#xA;  [3]: http://www.simplyscripts.com/" />
  <row Id="30999" PostHistoryTypeId="2" PostId="13898" RevisionGUID="9effeaa8-8618-4fbb-9ec2-d684252a557b" CreationDate="2011-06-19T15:11:32.800" UserId="8122" Text="I'm planning to create a simple math multiplayer game and I plan to just use Ajax for the server/client communication but I'm not sure if this is sufficient or if I need a socket server.&#xD;&#xA;&#xD;&#xA;The game will look like this:&#xD;&#xA;&#xD;&#xA; - 2-4 users&#xD;&#xA; - all get a simple math task (like: &quot;37 + 14&quot;)&#xD;&#xA; - they have to solve it as fast as possible&#xD;&#xA; - first user who solves it is the winner&#xD;&#xA;&#xD;&#xA;I will track the time for each user, since the game started, on the client side and everytime a user gives an answer, the answer and the passed time will be send to the server. Additionally I'll add a function which will check every 3 seconds if the other users finished, how much time they needed and who won.&#xD;&#xA;&#xD;&#xA;Do you think this is possible just using Ajax? What alternatives are there?" />
  <row Id="31000" PostHistoryTypeId="1" PostId="13898" RevisionGUID="9effeaa8-8618-4fbb-9ec2-d684252a557b" CreationDate="2011-06-19T15:11:32.800" UserId="8122" Text="Simple Math Multiplayer game - is is Ajax sufficient?" />
  <row Id="31001" PostHistoryTypeId="3" PostId="13898" RevisionGUID="9effeaa8-8618-4fbb-9ec2-d684252a557b" CreationDate="2011-06-19T15:11:32.800" UserId="8122" Text="&lt;math&gt;&lt;multiplayer&gt;&lt;javascript&gt;" />
  <row Id="31002" PostHistoryTypeId="25" PostId="13852" RevisionGUID="71a343f4-5704-421c-9969-13b7d0cd082c" CreationDate="2011-06-19T15:24:35.667" Comment="http://twitter.com/#!/StackGameDev/status/82468826746322944" />
  <row Id="31003" PostHistoryTypeId="6" PostId="13877" RevisionGUID="b97a7560-95f7-4577-bb38-6884c78f8fae" CreationDate="2011-06-19T15:29:05.470" UserId="7548" Comment="edited tags" Text="&lt;3d&gt;&lt;programming&gt;&lt;java&gt;&lt;mmo&gt;" />
  <row Id="31004" PostHistoryTypeId="2" PostId="13899" RevisionGUID="8cb2db09-848f-443d-9c00-117faf429118" CreationDate="2011-06-19T15:31:19.737" UserId="1386" Text="I think that Ajax is easily sufficient for this task.&#xD;&#xA;&#xD;&#xA;The alternatives I can think of are:&#xD;&#xA;&#xD;&#xA; - [Web Sockets (Stack Overflow)][1]&#xD;&#xA; - Flash&#xD;&#xA; - Unity&#xD;&#xA; - Java&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1253683/websocket-for-html5" />
  <row Id="31008" PostHistoryTypeId="2" PostId="13901" RevisionGUID="cf1cd585-f12e-4d7e-beb9-b6ab166a998b" CreationDate="2011-06-19T18:09:36.847" UserId="2229" Text="Last days, I've been spending significant time in discovering profitability of AppStore for developers. &#xD;&#xA;&#xD;&#xA;I have found many articles. Some of them are highly optimistic, while other are extremely skeptical.&#xD;&#xA;&#xD;&#xA;[This article][1] is extremely skeptical. It even claims to have backed its conclusions by objective sales numbers.&#xD;&#xA;&#xD;&#xA;Can I kindly ask to clarify **whether average developers publishing games and software on AppStore can cover their living expenses, even, whether they can become profitable?** &#xD;&#xA;&#xD;&#xA;Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer?&#xD;&#xA;&#xD;&#xA;I would like to stay as realistic as possible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://communities-dominate.blogs.com/brands/2010/06/full-analysis-of-iphone-economics-its-bad-news-and-then-it-gets-worse.html" />
  <row Id="31009" PostHistoryTypeId="1" PostId="13901" RevisionGUID="cf1cd585-f12e-4d7e-beb9-b6ab166a998b" CreationDate="2011-06-19T18:09:36.847" UserId="2229" Text="App Store: Profitability for Game Developers" />
  <row Id="31010" PostHistoryTypeId="3" PostId="13901" RevisionGUID="cf1cd585-f12e-4d7e-beb9-b6ab166a998b" CreationDate="2011-06-19T18:09:36.847" UserId="2229" Text="&lt;game-design&gt;&lt;game-industry&gt;&lt;indie&gt;&lt;appstore&gt;" />
  <row Id="31011" PostHistoryTypeId="2" PostId="13902" RevisionGUID="2488f4b1-eabb-462e-944a-bd420fd5792b" CreationDate="2011-06-19T18:19:06.027" UserId="2425" Text="&gt; Do you think this is possible just using Ajax? What alternatives are there?&#xD;&#xA;&#xD;&#xA;Yes for the communication ajax is a valid channel to use.&#xD;&#xA;&#xD;&#xA;But if by AJAX you mean sending single ajax requests using something like jQuery then no it's not a valid choice, merely because there are better options.&#xD;&#xA;&#xD;&#xA;I highly recommend you use either&#xD;&#xA;&#xD;&#xA; - [WebSockets][1] and a range of fall-back techniques for older browsers&#xD;&#xA; - or [COMET][2] techniques.&#xD;&#xA;&#xD;&#xA;For WebSockets I recommend you use an abstraction layer like [socket.io][3] (for node.js) or [APE][4] (for PHP).&#xD;&#xA;&#xD;&#xA;Both of those use feature detection to use the best communication channel possible. This will pick WebSockets, COMET or a flash websocket bridge and those technologies support a wide range of browsers whilst still emulating a proper socket connection for you.&#xD;&#xA;&#xD;&#xA;Arguably you can also use a SilverLight or Java websocket bridge but those are less common and not as well supported.&#xD;&#xA;&#xD;&#xA;As for COMET the techniques are too highly integrated into the server-side stack/language to give generic advice.&#xD;&#xA;&#xD;&#xA;If you need technology that interfaces well with a particular server side stack feel free to ask.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/WebSockets&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Comet_(programming)&#xD;&#xA;  [3]: http://socket.io/&#xD;&#xA;  [4]: http://www.ape-project.org/" />
  <row Id="31012" PostHistoryTypeId="25" PostId="13898" RevisionGUID="26aae326-b77c-4780-acae-7cb32b4a8279" CreationDate="2011-06-19T18:24:36.993" Comment="http://twitter.com/#!/StackGameDev/status/82514131147685888" />
  <row Id="31013" PostHistoryTypeId="6" PostId="13901" RevisionGUID="f2bdbee1-23d7-49b3-82ce-e9e8f4134343" CreationDate="2011-06-19T18:35:02.673" UserId="1156" Comment="edited tags" Text="&lt;game-industry&gt;&lt;ios&gt;&lt;indie&gt;&lt;monetization&gt;&lt;appstore&gt;" />
  <row Id="31015" PostHistoryTypeId="4" PostId="13898" RevisionGUID="b9defde7-7f13-42df-a059-35f66bd061d6" CreationDate="2011-06-19T18:59:34.717" UserId="1386" Comment="Corrected Title" Text="Simple Math Multiplayer game - is Ajax sufficient?" />
  <row Id="31016" PostHistoryTypeId="24" PostId="13898" RevisionGUID="b9defde7-7f13-42df-a059-35f66bd061d6" CreationDate="2011-06-19T18:59:34.717" Comment="Proposed by 1386 approved by 189 edit id of 508" />
  <row Id="31017" PostHistoryTypeId="5" PostId="13901" RevisionGUID="ecdc60af-2464-41bb-9b0d-6ba09224c4c0" CreationDate="2011-06-19T19:00:31.470" UserId="2229" Comment="added 169 characters in body" Text="Recent days, I've been spending significant time in discovering chances of profitability of AppStore for developers. &#xD;&#xA;&#xD;&#xA;I have found many articles. Some of them are highly optimistic, while other are extremely skeptical. [This article][1] is extremely skeptical. It even claims to have backed its conclusions by objective sales numbers.&#xD;&#xA;&#xD;&#xA;Can I kindly ask to clarify from business viewpoint **whether average developers publishing games and software on AppStore can cover their living expenses, even, whether they can become profitable?** &#xD;&#xA;&#xD;&#xA;Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer?&#xD;&#xA;&#xD;&#xA;I would like to stay as realistic as possible. Despite the question might look subjective, a good business man will be able to esitmate profitability and prosperity within AppStore.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://communities-dominate.blogs.com/brands/2010/06/full-analysis-of-iphone-economics-its-bad-news-and-then-it-gets-worse.html" />
  <row Id="31018" PostHistoryTypeId="5" PostId="13901" RevisionGUID="dbbbcec6-9dea-4482-a780-05a7141efd6a" CreationDate="2011-06-19T19:07:50.250" UserId="2229" Comment="added 12 characters in body" Text="Recent days, I've been spending significant time in discovering chances of profitability of AppStore for developers. &#xD;&#xA;&#xD;&#xA;I have found many articles. Some of them are highly optimistic, while other are extremely skeptical. [This article][1] is extremely skeptical. It even claims to have backed its conclusions by objective sales numbers.&#xD;&#xA;&#xD;&#xA;Can I kindly ask to clarify from business viewpoint **whether average developers publishing games and software on AppStore can cover their living expenses, even, whether they can become profitable?** &#xD;&#xA;&#xD;&#xA;Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer?&#xD;&#xA;&#xD;&#xA;I would like to stay as realistic as possible. Despite the question might look subjective, a good business man will be able to esitmate chacnes for profitability and prosperity within AppStore.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://communities-dominate.blogs.com/brands/2010/06/full-analysis-of-iphone-economics-its-bad-news-and-then-it-gets-worse.html" />
  <row Id="31020" PostHistoryTypeId="2" PostId="13904" RevisionGUID="bf714ca2-2a6a-44f5-a5ac-c527b475b4e7" CreationDate="2011-06-19T19:19:42.430" UserId="2063" Text="I currently struggle with creating the database structure for my RPG.&#xD;&#xA;I got so far:&#xD;&#xA;&#xD;&#xA;tables:&#xD;&#xA;&#xD;&#xA;- area (id)&#xD;&#xA;- monster (id, some other values)&#xD;&#xA;- item (id, some other values)&#xD;&#xA;- loot (id = monster.id, item = item.id, chance)&#xD;&#xA;- spawn (id = area.id, monster = monster.id, count)&#xD;&#xA;&#xD;&#xA;It is a browser-based game like e.g. Castle Age.&#xD;&#xA;The player can move from area to area.&#xD;&#xA;If a player enters an area the system spawns, based on the area.id and using the spawn table data, new monsters into the monster table.&#xD;&#xA;If a player kills a monster, the system picks the monster.id looks up the items via the the loot table and adds those items to the player's inventory.&#xD;&#xA;&#xD;&#xA;First, is this smart?&#xD;&#xA;Second, I need some kind of &quot;monster_instance&quot;-table and &quot;area_instance&quot;-table,&#xD;&#xA;since each player enters his very own &quot;area&quot; and does damage to his very own &quot;monsters&quot;.&#xD;&#xA;Another approach would be adding the / a player.id to the monster table, so each monster spawned, has it's own &quot;player&quot;, but I still need to assign them to an area, and I think this would overload the monster table if I put in the player.id and the area.id into the monster table.&#xD;&#xA;&#xD;&#xA;What are your thoughts?" />
  <row Id="31021" PostHistoryTypeId="1" PostId="13904" RevisionGUID="bf714ca2-2a6a-44f5-a5ac-c527b475b4e7" CreationDate="2011-06-19T19:19:42.430" UserId="2063" Text="RPG Monster-Area, Spawn, Loot table Design" />
  <row Id="31022" PostHistoryTypeId="3" PostId="13904" RevisionGUID="bf714ca2-2a6a-44f5-a5ac-c527b475b4e7" CreationDate="2011-06-19T19:19:42.430" UserId="2063" Text="&lt;game-design&gt;&lt;rpg&gt;&lt;data-structure&gt;&lt;monster&gt;" />
  <row Id="31023" PostHistoryTypeId="2" PostId="13905" RevisionGUID="334b1540-f8e0-45c8-a4a4-467c40d8f3a5" CreationDate="2011-06-19T19:20:43.967" UserId="4947" Text="You can have bound only one index array at a time. So you cann't use separate index array for each vertex attribute. So only choice is to rearrange all arrays according to one index array." />
  <row Id="31024" PostHistoryTypeId="6" PostId="13904" RevisionGUID="8a852df4-63e8-4c64-9751-e9cc62509325" CreationDate="2011-06-19T19:27:47.823" UserId="51" Comment="edited tags" Text="&lt;rpg&gt;&lt;databases&gt;&lt;data-structure&gt;" />
  <row Id="31028" PostHistoryTypeId="5" PostId="13851" RevisionGUID="a5660946-9604-40cf-b611-6d240f166fd6" CreationDate="2011-06-19T19:35:26.150" UserId="7772" Comment="added 2883 characters in body; deleted 2 characters in body" Text="I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept.  Think Monkey Ball as an example of the type of gameplay.&#xD;&#xA;&#xD;&#xA;I am currently using sphere-to-sphere broad phase, then AABB to OBB testing (the final test I am using right now is one that checks if one of the 8 OBB points crosses the planes of the object it is testing against).  This seems to work pretty well, and I am getting back:&#xD;&#xA;&#xD;&#xA;Plane that object is colliding against (with a point on the plane, the plane's normal, and the exact point of intersection.&#xD;&#xA;&#xD;&#xA;I've tried what feels like dozens of different high-level strategies for handling these collisions, without any real success.  I think my biggest problem is understanding how to handle collisions against walls in the x-y axes (left/right, front/back), which I want to have elasticity, and the ground (z-axis) where I want an elastic reaction if the ball drops down, but then for it to eventually normalize and be kept &quot;on the ground&quot; (not go into the ground, but also not continue bouncing).  Without kluging something together, I'm positive there is a good way to handle this, my theories just aren't getting me all the way there.&#xD;&#xA;&#xD;&#xA;For physics modeling and movement, I am trying to use a Euler based setup with each object maintaining a position (and destination position prior to collision detection), a velocity (which is added onto the position to determine the destination position), and an acceleration (which I use to store any player input being put on the ball, as well as gravity in the z coord).&#xD;&#xA;&#xD;&#xA;Starting from when I detect a collision, what is a good way to approach the response to get the expected behavior in all cases?&#xD;&#xA;&#xD;&#xA;Thanks in advance to anyone taking the time to assist...  I am grateful for any pointers, and happy to post any additional info or code if it is useful.&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;Based on Steve H's and eBusiness' responses below, I have adapted my collision response to what makes a lot more sense now.  It was close to right before, but I didn't have all the right pieces together at the right time!  I have one problem left to solve, and that is what is causing the floor collision to hit every frame.  Here's the collision response code I have now for the ball, then I'll describe the last bit I'm still struggling to understand.&#xD;&#xA;&#xD;&#xA;    // if we are moving in the direction of the plane (against the normal)...&#xD;&#xA;    if (m_velocity.dot(intersection.plane.normal) &lt;= 0.0f)&#xD;&#xA;    {&#xD;&#xA;        float dampeningForce = 1.8f; // eventually create this value based on mass and acceleration&#xD;&#xA;        &#xD;&#xA;        // Calculate the projection velocity&#xD;&#xA;        PVRTVec3 actingVelocity = m_velocity.project(intersection.plane.normal);&#xD;&#xA;    &#xD;&#xA;        m_velocity -= actingVelocity * dampeningForce;&#xD;&#xA;    }&#xD;&#xA;    // Clamp z-velocity to zero if we are within a certain threshold&#xD;&#xA;    // -- NOTE: this was an experimental idea I had to solve the &quot;jitter&quot; bug I'll describe below&#xD;&#xA;    float diff = 0.2f - abs(m_velocity.z);&#xD;&#xA;    if (diff &gt; 0.0f &amp;&amp; diff &lt;=  0.2f)&#xD;&#xA;    {&#xD;&#xA;        m_velocity.z = 0.0f;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Take this object to its new destination position based on...&#xD;&#xA;    // -- our pre-collision position + vector to the collision point + our new velocity after collision * time&#xD;&#xA;    // -- remaining after the collision to finish the movement&#xD;&#xA;    m_destPosition = m_position + intersection.diff + (m_velocity * intersection.tRemaining * GAMESTATE-&gt;dt);&#xD;&#xA;&#xD;&#xA;The above snippet is run after a collision is detected on the ball (collider) with a collidee (floor in this case).  With a dampening force of 1.8f, the ball's reflected &quot;upward&quot; velocity will eventually be overcome by gravity, so the ball will essentially be stuck on the floor.  THIS is the problem I have now...  the collision code is running every frame (since the ball's z-velocity is constantly pushing it a collision with the floor below it).  The ball is not technically stuck, I can move it around still, but the movement is really goofy because the velocity and position keep getting affected adversely by the above snippet.&#xD;&#xA;&#xD;&#xA;I was experimenting with an idea to clamp the z-velocity to zero if it was &quot;close to zero&quot;, but this didn't do what I think...  probably because the very next frame the ball gets a new gravity acceleration applied to its velocity regardless (which I think is good, right?).  &#xD;&#xA;&#xD;&#xA;Collisions with walls are as they used to be and work very well.  It's just this last bit of &quot;stickiness&quot; to deal with.  The camera is constantly jittering up and down by extremely small fractions too when the ball is &quot;at rest&quot;.&#xD;&#xA;&#xD;&#xA;I'll keep playing with it... I like puzzles like this, especially when I think I'm close.  Any final ideas on what I could be doing wrong here?" />
  <row Id="31029" PostHistoryTypeId="5" PostId="13901" RevisionGUID="5c5b9a58-c4d2-4dba-8538-65c26b34cd56" CreationDate="2011-06-19T19:39:03.280" UserId="2229" Comment="added 204 characters in body" Text="Recent days, I've been spending significant time in discovering chances of profitability of AppStore for developers. &#xD;&#xA;&#xD;&#xA;I have found many articles. Some of them are highly optimistic, while other are extremely skeptical. [This article][1] is extremely skeptical. It even claims to have backed its conclusions by objective sales numbers. [This][2] is another pesimistic article saying that games developed by single individuals get 20 downloads a day.&#xD;&#xA;&#xD;&#xA;Can I kindly ask to clarify from business viewpoint **whether average developers publishing games and software on AppStore can cover their living expenses, even, whether they can become profitable?** &#xD;&#xA;&#xD;&#xA;Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer?&#xD;&#xA;&#xD;&#xA;I would like to stay as realistic as possible. Despite the question might look subjective, a good business man will be able to esitmate chances for profitability and prosperity within AppStore.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://communities-dominate.blogs.com/brands/2010/06/full-analysis-of-iphone-economics-its-bad-news-and-then-it-gets-worse.html&#xD;&#xA;  [2]: http://www.bbc.co.uk/blogs/technology/2009/02/who_profits_from_the_app_store.html" />
  <row Id="31030" PostHistoryTypeId="2" PostId="13906" RevisionGUID="51ecbce2-72c4-4a78-87a8-628b5849dbe5" CreationDate="2011-06-19T19:40:51.560" UserId="51" Text="&gt;Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer?&#xD;&#xA;&#xD;&#xA;Of course it is, I can simply point to a single example of this being the case and it's &quot;achievable&quot;.  The thing is, in order for *you* to do it there are a lot of factors at play.  &#xD;&#xA;&#xD;&#xA;Can you make games quickly/cheaply?  With the race to the bottom in terms of purchasing price, if you eat up too much time and money on a single game you're not likely to get any return on that investment&#xD;&#xA;&#xD;&#xA;Do you monetize properly?  The freemium model is getting more and more popular, for example.  If you're not going freemium, you need to know how to price yourself in the market.  You have to be fulfilling some kind of strong desire to place yourself above the $1 price point.&#xD;&#xA;&#xD;&#xA;Are the games you're making high enough quality that people will *want* to tell their friends about them?  Word of mouth is a very strong sales driver.  If people aren't saying &quot;hey you should play this&quot;, you're not going to make any money.&#xD;&#xA;&#xD;&#xA;Is the content of the games appealing to the mass market?  You can't just target the 17-34 male demographic with the games you're making if you want to go really wide with it.&#xD;&#xA;&#xD;&#xA;Can you advertise properly?  This isn't a case where &quot;if you build it they will come&quot;.  You have to send out demo codes to the right people.  Try to get reviewed.  Try to get popular bloggers, etc. to recommend it.  Be active in community groups (facebook, forums, youtube, etc.).&#xD;&#xA;&#xD;&#xA;Basically, the point that a lot of people in the comments are making is that it seems you're asking for the impossible analysis.  You're giving a specific profitability number without talking about *the product* you're making *at all*." />
  <row Id="31032" PostHistoryTypeId="2" PostId="13907" RevisionGUID="eb11f5c2-e410-493b-b139-77625fdc0bd1" CreationDate="2011-06-19T19:46:04.113" UserId="7588" Text="I personally would run as far away as fast as possible from the AppStore.&#xD;&#xA;&#xD;&#xA;If you are aiming for iPad, iPhone, you need some really good marketing to get the initial market penetration. Without this, your App will fall into the oubliettes of the AppStore, which is much more difficult to navigate on a handheld than on a PC.&#xD;&#xA;&#xD;&#xA;You also need to think about your game development if you are aiming at portable platforms. You need 'casual' games; games with short game sessions (5-10 mins) that have good feedback and make the player want to continue.&#xD;&#xA;&#xD;&#xA;If this is what you are looking at, I would definately try to use something like Unity so you can aim for Android and iPhone with the same source (but it will cost more), and maybe make a PC version available; if your game is really good and people want to play it while going to work, they'll buy it.&#xD;&#xA;&#xD;&#xA;If the question was about App Hubs in general (which I doubt) lots of Indie developers go for Steam, I remember reading a 2DBoy article (World of Goo) saying the guys at Steam were cool and they managed to negociate the percentages.&#xD;&#xA;&#xD;&#xA;Of course the beauty about using Unity is that you could also sell a PC version.&#xD;&#xA;&#xD;&#xA;In any case, I would search for project post-mortems from Indie developers that make AppStore games, and maybe even try and contact some.&#xD;&#xA;&#xD;&#xA;GLHF." />
  <row Id="31033" PostHistoryTypeId="2" PostId="13908" RevisionGUID="5125d84b-5bb7-4cc3-95d2-286dc8aacb28" CreationDate="2011-06-19T20:00:26.837" UserId="7588" Text="From looking at your tables, the setup seems ok, but beware of using reserved words (like count).&#xD;&#xA;&#xD;&#xA;I'm not too familiar with Caste Age, but why cant you just keep the instances client-side? This shouldn't pose a problem if each player has their 'own' area instance." />
  <row Id="31034" PostHistoryTypeId="5" PostId="13851" RevisionGUID="482d6593-5612-4754-8f74-4ae454c9e72e" CreationDate="2011-06-19T20:11:49.587" UserId="7772" Comment="added 2585 characters in body; deleted 240 characters in body" Text="I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept.  Think Monkey Ball as an example of the type of gameplay.&#xD;&#xA;&#xD;&#xA;I am currently using sphere-to-sphere broad phase, then AABB to OBB testing (the final test I am using right now is one that checks if one of the 8 OBB points crosses the planes of the object it is testing against).  This seems to work pretty well, and I am getting back:&#xD;&#xA;&#xD;&#xA;Plane that object is colliding against (with a point on the plane, the plane's normal, and the exact point of intersection.&#xD;&#xA;&#xD;&#xA;I've tried what feels like dozens of different high-level strategies for handling these collisions, without any real success.  I think my biggest problem is understanding how to handle collisions against walls in the x-y axes (left/right, front/back), which I want to have elasticity, and the ground (z-axis) where I want an elastic reaction if the ball drops down, but then for it to eventually normalize and be kept &quot;on the ground&quot; (not go into the ground, but also not continue bouncing).  Without kluging something together, I'm positive there is a good way to handle this, my theories just aren't getting me all the way there.&#xD;&#xA;&#xD;&#xA;For physics modeling and movement, I am trying to use a Euler based setup with each object maintaining a position (and destination position prior to collision detection), a velocity (which is added onto the position to determine the destination position), and an acceleration (which I use to store any player input being put on the ball, as well as gravity in the z coord).&#xD;&#xA;&#xD;&#xA;Starting from when I detect a collision, what is a good way to approach the response to get the expected behavior in all cases?&#xD;&#xA;&#xD;&#xA;Thanks in advance to anyone taking the time to assist...  I am grateful for any pointers, and happy to post any additional info or code if it is useful.&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;Based on Steve H's and eBusiness' responses below, I have adapted my collision response to what makes a lot more sense now.  It was close to right before, but I didn't have all the right pieces together at the right time!  I have one problem left to solve, and that is what is causing the floor collision to hit every frame.  Here's the collision response code I have now for the ball, then I'll describe the last bit I'm still struggling to understand.&#xD;&#xA;&#xD;&#xA;    // if we are moving in the direction of the plane (against the normal)...&#xD;&#xA;    if (m_velocity.dot(intersection.plane.normal) &lt;= 0.0f)&#xD;&#xA;    {&#xD;&#xA;        float dampeningForce = 1.8f; // eventually create this value based on mass and acceleration&#xD;&#xA;        &#xD;&#xA;        // Calculate the projection velocity&#xD;&#xA;        PVRTVec3 actingVelocity = m_velocity.project(intersection.plane.normal);&#xD;&#xA;    &#xD;&#xA;        m_velocity -= actingVelocity * dampeningForce;&#xD;&#xA;    }&#xD;&#xA;    // Clamp z-velocity to zero if we are within a certain threshold&#xD;&#xA;    // -- NOTE: this was an experimental idea I had to solve the &quot;jitter&quot; bug I'll describe below&#xD;&#xA;    float diff = 0.2f - abs(m_velocity.z);&#xD;&#xA;    if (diff &gt; 0.0f &amp;&amp; diff &lt;=  0.2f)&#xD;&#xA;    {&#xD;&#xA;        m_velocity.z = 0.0f;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Take this object to its new destination position based on...&#xD;&#xA;    // -- our pre-collision position + vector to the collision point + our new velocity after collision * time&#xD;&#xA;    // -- remaining after the collision to finish the movement&#xD;&#xA;    m_destPosition = m_position + intersection.diff + (m_velocity * intersection.tRemaining * GAMESTATE-&gt;dt);&#xD;&#xA;&#xD;&#xA;The above snippet is run after a collision is detected on the ball (collider) with a collidee (floor in this case).  With a dampening force of 1.8f, the ball's reflected &quot;upward&quot; velocity will eventually be overcome by gravity, so the ball will essentially be stuck on the floor.  THIS is the problem I have now...  the collision code is running every frame (since the ball's z-velocity is constantly pushing it a collision with the floor below it).  The ball is not technically stuck, I can move it around still, but the movement is really goofy because the velocity and position keep getting affected adversely by the above snippet.&#xD;&#xA;&#xD;&#xA;I was experimenting with an idea to clamp the z-velocity to zero if it was &quot;close to zero&quot;, but this didn't do what I think...  probably because the very next frame the ball gets a new gravity acceleration applied to its velocity regardless (which I think is good, right?).  &#xD;&#xA;&#xD;&#xA;Collisions with walls are as they used to be and work very well.  It's just this last bit of &quot;stickiness&quot; to deal with.  The camera is constantly jittering up and down by extremely small fractions too when the ball is &quot;at rest&quot;.&#xD;&#xA;&#xD;&#xA;I'll keep playing with it... I like puzzles like this, especially when I think I'm close.  Any final ideas on what I could be doing wrong here?&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;&#xD;&#xA;Good news - I discovered I should be subtracting the intersection.diff from the m_position (position prior to collision).  The intersection.diff is my calculation of the difference in the vector of position to destPosition _from the intersection point to the position_.  In this case, adding it was causing my ball to always go &quot;up&quot; just a little bit, causing the jitter.  By subtracting it, and moving that clamper for the velocity.z when close to zero to being above the dot product (and changing the test from &lt;= 0 to &lt; 0), I now have the following:&#xD;&#xA;&#xD;&#xA;    // Clamp z-velocity to zero if we are within a certain threshold&#xD;&#xA;    float diff = 0.2f - abs(m_velocity.z);&#xD;&#xA;    if (diff &gt; 0.0f &amp;&amp; diff &lt;=  0.2f)&#xD;&#xA;    {&#xD;&#xA;        m_velocity.z = 0.0f;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we are moving in the direction of the plane (against the normal)...&#xD;&#xA;    float dotprod = m_velocity.dot(intersection.plane.normal);&#xD;&#xA;    if (dotprod &lt; 0.0f)&#xD;&#xA;    {&#xD;&#xA;        float dampeningForce = 1.8f; // eventually create this value based on mass and acceleration?&#xD;&#xA;        &#xD;&#xA;        // Calculate the projection velocity&#xD;&#xA;        PVRTVec3 actingVelocity = m_velocity.project(intersection.plane.normal);&#xD;&#xA;        &#xD;&#xA;        m_velocity -= actingVelocity * dampeningForce;&#xD;&#xA;    }&#xD;&#xA;        &#xD;&#xA;    // Take this object to its new destination position based on...&#xD;&#xA;    // -- our pre-collision position + vector to the collision point + our new velocity after collision * time&#xD;&#xA;    // -- remaining after the collision to finish the movement&#xD;&#xA;    m_destPosition = m_position - intersection.diff + (m_velocity * intersection.tRemaining * GAMESTATE-&gt;dt);&#xD;&#xA;    UpdateWorldMatrix(m_destWorldMatrix, m_destOBB, m_destPosition, false);&#xD;&#xA;&#xD;&#xA;This is MUCH better.  No jitter, and the ball now &quot;rests&quot; at the floor, while still bouncing off the floor and walls.  The ONLY thing left is that the ball is now virtually &quot;stuck&quot;.  He can move but at a much slower rate, likely because the else of my dot product test is only letting the ball move at a rate multiplied against the tRemaining...  I think this is a better solution than I had previously, but still somehow not the right idea.  BTW, I'm trying to journal my progress through this problem for anyone else with a similar situation - hopefully it will serve as some help, as many similar posts have for me over the years." />
  <row Id="31035" PostHistoryTypeId="5" PostId="13908" RevisionGUID="b75f1252-063d-4814-adae-48b5c2b61516" CreationDate="2011-06-19T20:13:36.097" UserId="7588" Comment="added 436 characters in body" Text="From looking at your tables, the setup seems ok, but beware of using reserved words (like count).&#xD;&#xA;&#xD;&#xA;I'm not too familiar with Caste Age, but why cant you just keep the instances client-side? This shouldn't pose a problem if each player has their 'own' area instance.&#xD;&#xA;&#xD;&#xA;A problem would be the persistance of the data during the game, can the player only be in one area at once? Will the damage he dealt be forgotten once he leaves?&#xD;&#xA;&#xD;&#xA;Another question would be whether each monster keeps his current health. If this is not the case it could be possible to just keep track of the number of each monster in the area instance, and assume that when the player starts attacking, the monster has full health." />
  <row Id="31036" PostHistoryTypeId="5" PostId="13904" RevisionGUID="096faede-0241-441a-be0d-96f1f26caac2" CreationDate="2011-06-19T20:23:36.953" UserId="2063" Comment="added 29 characters in body" Text="I currently struggle with creating the database structure for my RPG.&#xD;&#xA;I got so far:&#xD;&#xA;&#xD;&#xA;tables:&#xD;&#xA;&#xD;&#xA;- area (id)&#xD;&#xA;- monster (id, area.id, monster.id, hp, attack, defense, name)&#xD;&#xA;- item (id, some other values)&#xD;&#xA;- loot (id = monster.id, item = item.id, chance)&#xD;&#xA;- spawn (id = area.id, monster = monster.id, count)&#xD;&#xA;&#xD;&#xA;It is a browser-based game like e.g. Castle Age.&#xD;&#xA;The player can move from area to area.&#xD;&#xA;If a player enters an area the system spawns, based on the area.id and using the spawn table data, new monsters into the monster table.&#xD;&#xA;If a player kills a monster, the system picks the monster.id looks up the items via the the loot table and adds those items to the player's inventory.&#xD;&#xA;&#xD;&#xA;First, is this smart?&#xD;&#xA;Second, I need some kind of &quot;monster_instance&quot;-table and &quot;area_instance&quot;-table,&#xD;&#xA;since each player enters his very own &quot;area&quot; and does damage to his very own &quot;monsters&quot;.&#xD;&#xA;Another approach would be adding the / a player.id to the monster table, so each monster spawned, has it's own &quot;player&quot;, but I still need to assign them to an area, and I think this would overload the monster table if I put in the player.id and the area.id into the monster table.&#xD;&#xA;&#xD;&#xA;What are your thoughts?" />
  <row Id="31037" PostHistoryTypeId="5" PostId="13908" RevisionGUID="c25f7588-9f41-433f-bf33-c1b134d6b826" CreationDate="2011-06-19T20:51:55.797" UserId="7588" Comment="added 667 characters in body" Text="The problem will be dealing with instances of monsters, especially as you can have many monsters of the same type. The easiest way IMO would be to have a special table that deals with instances, and have a limited number of instances per area, say 10.&#xD;&#xA;&#xD;&#xA;This doesn't stick with what is considered 'good' SQL but it should work providing you can limit the instances :&#xD;&#xA;&#xD;&#xA;Table AreaMonsters { player.id, area.id, monster1.id, monster1.currHP, monster2.id, etc... }&#xD;&#xA;&#xD;&#xA;This will allow you to insert a new line with all the data for an area, and it will be persistent throughout the game. The only problem really is the limit to instances.&#xD;&#xA;&#xD;&#xA;*** Original Answer ***&#xD;&#xA;&#xD;&#xA;From looking at your tables, the setup seems ok, but beware of using reserved words (like count).&#xD;&#xA;&#xD;&#xA;I'm not too familiar with Caste Age, but why cant you just keep the instances client-side? This shouldn't pose a problem if each player has their 'own' area instance.&#xD;&#xA;&#xD;&#xA;A problem would be the persistance of the data during the game, can the player only be in one area at once? Will the damage he dealt be forgotten once he leaves?&#xD;&#xA;&#xD;&#xA;Another question would be whether each monster keeps his current health. If this is not the case it could be possible to just keep track of the number of each monster in the area instance, and assume that when the player starts attacking, the monster has full health." />
  <row Id="31038" PostHistoryTypeId="2" PostId="13909" RevisionGUID="e0bd3733-9927-48d5-8ab8-cebc1aa6f34b" CreationDate="2011-06-19T21:06:37.777" UserId="4105" Text="Well, I have to say that Unity is a really nice thing that can save one a dozen of hours on coding (letting instantly work on gameplay). But what's the idea of [*forcing*][1]&#xD;&#xA; (EULA) any party, which made over 100k last fiscal year, to purchase Pro instead of using normal edition!?&#xD;&#xA;&#xD;&#xA;It feels that this kind of licensing provides hidden benefits to rich guys over me, poor sloven, who can afford buying $3.5k license but obviously will not receive any additional cookies from it.&#xD;&#xA;&#xD;&#xA;And, by the way, anyone estimated how much Unity's source + Playstation + Xbox license will cost?&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/unity/licenses.html" />
  <row Id="31039" PostHistoryTypeId="1" PostId="13909" RevisionGUID="e0bd3733-9927-48d5-8ab8-cebc1aa6f34b" CreationDate="2011-06-19T21:06:37.777" UserId="4105" Text="What are reasons for Unity3D's owners to force rich guys buying Pro version?" />
  <row Id="31040" PostHistoryTypeId="3" PostId="13909" RevisionGUID="e0bd3733-9927-48d5-8ab8-cebc1aa6f34b" CreationDate="2011-06-19T21:06:37.777" UserId="4105" Text="&lt;unity&gt;&lt;licensing&gt;&lt;support&gt;" />
  <row Id="31041" PostHistoryTypeId="2" PostId="13910" RevisionGUID="61975460-e308-4298-968f-1fada39a3c93" CreationDate="2011-06-19T21:14:21.823" UserId="51" Text="The guys at Unity are spending a lot of money doing R&amp;D, as well as licensing 3rd party tech to include in their software.&#xD;&#xA;&#xD;&#xA;The only reason it's *free* in the first place is that they want to get as many people using it as possible, so when the big boys (read: people who are actually making money doing this and can afford to actually buy software) are investigating tech to use, there's a large group of people who are experienced with using it and can recommend it to the people who have control of purse strings.  Plus they have a vested interest with their web plugin to have as many people developing games for it as possible, and most web games don't make a lot of money.&#xD;&#xA;&#xD;&#xA;The concept is very similar to a lot of software that's &quot;free for non-commercial use&quot;.  In this case, it's &quot;free for insignificant commercial use&quot;." />
  <row Id="31042" PostHistoryTypeId="25" PostId="13833" RevisionGUID="e1a0c3c1-d1dd-4245-be3c-5247f762f9d2" CreationDate="2011-06-19T21:24:37.703" Comment="http://twitter.com/#!/StackGameDev/status/82559433862942720" />
  <row Id="31043" PostHistoryTypeId="2" PostId="13911" RevisionGUID="3c923441-2aa9-4596-af3e-79285abb63cb" CreationDate="2011-06-19T21:40:30.977" UserId="4105" Text="More than a half of the market games are really:&#xD;&#xA; &#xD;&#xA;  * school projects&#xD;&#xA;  * a result of investments into casual (freelance) programmers (teachers are paying for guitar sheet and chemical apps, animation studios are putting out cartoon toys for children - I ever seen a Nickelodeon themed netbook)&#xD;&#xA;&#xD;&#xA;And the most of other half consists of projects that are being developed as any other shareware (what the thing with the amateur game developers calling shareware a freemium? did they completely missed a good CS class?), that forms a normal, but hard to formalize business process of *&quot;how much we're paying to our outsourced programmers, we need that game in a month&quot;*. So if you're writing a casual shareware - sit down, start coding, and get some profit, possibly.&#xD;&#xA;&#xD;&#xA;Or, say to yourself &quot;I'm about to create a multiplatform game where user needs to throw * from  * to hit * off the *&quot;, think about it, and keep coding - having a warm feeling of doing something new, interesting.. the end is same, unless you're able to take this project to your boss and ask him for letting you code games in a work hours, asking him also to fund the project (buying MacBooks for a homebrew  team - one for a cat, one for a dog).&#xD;&#xA;" />
  <row Id="31044" PostHistoryTypeId="2" PostId="13912" RevisionGUID="d6c28cab-9c68-4739-842a-831da4eb06bd" CreationDate="2011-06-19T22:02:33.557" UserId="6867" Text="I am playing around with the bloom shader from the XNA sample page, to do some glow shading. I am rendering primitive vector-ish squares of linelists/linestrips, on a background. However, I am facing a few problems.&#xD;&#xA;&#xD;&#xA;With a black background and white squares, I can actually see the squares. However, with a white background and black squares, I can't see them at all.&#xD;&#xA;&#xD;&#xA;Why is this happening, and is there any way of me fixing it?&#xD;&#xA;&#xD;&#xA;Can I modify my bloom shader to also &quot;glow&quot; dark elements, if that's what is causing it?" />
  <row Id="31045" PostHistoryTypeId="1" PostId="13912" RevisionGUID="d6c28cab-9c68-4739-842a-831da4eb06bd" CreationDate="2011-06-19T22:02:33.557" UserId="6867" Text="Bloom shader makes it impossible to render black?" />
  <row Id="31046" PostHistoryTypeId="3" PostId="13912" RevisionGUID="d6c28cab-9c68-4739-842a-831da4eb06bd" CreationDate="2011-06-19T22:02:33.557" UserId="6867" Text="&lt;xna&gt;&lt;bloom&gt;&lt;glow&gt;" />
  <row Id="31047" PostHistoryTypeId="5" PostId="2069" RevisionGUID="71cfa71c-bee9-4cf2-be77-9f82b51708e8" CreationDate="2011-06-19T22:15:21.520" UserId="2698" Comment="Correct explanation of what gimbal lock is." Text="There are *many* other forms of math that are useful, but at the absolute _minimum_ you need to know these:&#xD;&#xA;&#xD;&#xA;* **Algebra and Arithmetic**&#xD;&#xA;&#xD;&#xA;These are pretty basic, but if you don't know these you won't have a chance at even being a programmer let alone a game developer.&#xD;&#xA;&#xD;&#xA;* **[Vector Math][1]**&#xD;&#xA;&#xD;&#xA;Objects in a game world are represented with vectors. A vector represents things like an object's position, look direction and speed. Vector math calculations such as the [Dot Product][2], [Cross Product][3], Vector normalisation are essential.&#xD;&#xA;&#xD;&#xA;How do I move my game object? The novice might say:&#xD;&#xA;&#xD;&#xA;&quot;I know! I'll just do:&quot; `object.position.x++`.&#xD;&#xA;&#xD;&#xA;No no no. You need to use a vector calculation. The object needs a position, direction and acceleration vector which you can use to move the object. If you do the novice thing, you'll get stuck in an unmaintainable mess, and how do you make it move in a direction not aligned with the world's XYZ axis?&#xD;&#xA;&#xD;&#xA;* **[Quaternions][4]**&#xD;&#xA;&#xD;&#xA;Main reason games use quaternions is because they represent rotations almost as space-efficiently as Euler angles, without suffering from [Gimbal lock][5]. Gimbal Lock begins when any Euler angle reaches a rotation of 90 degrees around any axis: you immediately lose a degree of freedom. Quaternions address this issue by adding a fourth dimension. If you stuck with Euler angles, you'd have to restrict one axis to never rotating more than ~89 degrees.&#xD;&#xA;&#xD;&#xA;* **[Physics][6]**&#xD;&#xA;&#xD;&#xA;If you are going to be programming the math for physics responses in a game, then taking a physics class wouldn't have been a bad idea. &#xD;&#xA;&#xD;&#xA;Reasons will you need to know physics equations:&#xD;&#xA;&#xD;&#xA; 1. Making a ball bounce (see: co-efficient of restitution)&#xD;&#xA; 2. Make a ball move in a direction with 'x' newtons of force&#xD;&#xA; 3. Make something have more or less friction so it will slide at a different speed&#xD;&#xA; 4. Collision responses: What direction will the object rotate when I hit it 'here'?&#xD;&#xA;&#xD;&#xA;If you use a physics engine (or a game engine which has the physics engine inbuilt) then you can get away with knowing very little about physics. Still, it's quite good to know when you need to get your hands dirty because the physics engine isn't performing properly. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://physics.about.com/od/mathematics/a/VectorMath.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Dot_product&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Cross_product&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Quaternion&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Gimbal_lock&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Game_physics" />
  <row Id="31048" PostHistoryTypeId="2" PostId="13913" RevisionGUID="9572487a-8f45-4df6-8dac-a099095395a2" CreationDate="2011-06-19T23:46:09.913" UserId="7819" Text="The A star algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly). It would have a StackOverFlowError. The A star algorithm would iterate the enemy and find its path and pass the list to the enemy.path.&#xD;&#xA;&#xD;&#xA;I added debug logs and the list that I'm getting it looks like it would arrive from start cell to goal cell. &#xD;&#xA;&#xD;&#xA;Here's the log - &#xD;&#xA;&#xD;&#xA;    06-19 19:26:41.982: DEBUG/findEnemyPath, enemy X:Y(4281): X2.8256836:Y3.5&#xD;&#xA;    06-19 19:26:41.990: DEBUG/findEnemyPath, grid X:Y(4281): X3:Y2&#xD;&#xA;    06-19 19:26:41.990: DEBUG/START CELL ID:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/GOAL CELL ID:(4281): 47&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 38(4281):  passThrough:0.0&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 39(4281):  passThrough:8.875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 40(4281):  passThrough:7.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 52(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 53(4281):  passThrough:7.96875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 53&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 28(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 28&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 65(4281):  passThrough:8.984375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 66(4281):  passThrough:7.9921875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 66&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 78(4281):  passThrough:8.99609375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 78&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 79(4281):  passThrough:7.998046875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 79&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 80(4281):  passThrough:6.9990234375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 81(4281):  passThrough:5.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 82(4281):  passThrough:4.999755859375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 83(4281):  passThrough:3.9998779296875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 83&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 71(4281):  passThrough:2.99993896484375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 71&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 59(4281):  passThrough:1.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 47(4281):  passThrough:0.99951171875&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, The goal cell would be iterating its parent till start cell to break off the loop. &#xD;&#xA;&#xD;&#xA;    private void populateBestList(Cell cell, List&lt;Cell&gt; bestList) {&#xD;&#xA;    		bestList.add(cell);&#xD;&#xA;    		&#xD;&#xA;    		if (cell.parent.start == false) {&#xD;&#xA;    			Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;    			Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;    			populateBestList(cell.parent, bestList);&#xD;&#xA;    		}&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The log with error above would show like this -&#xD;&#xA;&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 47&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;&#xD;&#xA;71 and 59 would switch over and goes on.&#xD;&#xA;&#xD;&#xA;I thought the grid is the issue due to the enemies are using the single grid so I make the parent, start, and goal clear before starting the A star algorithm for an enemy.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;    			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;    				grid[i][j].parent = null;&#xD;&#xA;    				grid[i][j].start = false;&#xD;&#xA;    				grid[i][j].goal = false;&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;That didn't work. I thought it might be something related to this code, but not sure if I'm on right track -&#xD;&#xA;&#xD;&#xA;    neighbor.parent = best;&#xD;&#xA;    openList.remove(neighbor);&#xD;&#xA;    closedList.remove(neighbor);&#xD;&#xA;    openList.add(0, neighbor);&#xD;&#xA;&#xD;&#xA;Here's the code of the A star algorithm -&#xD;&#xA;&#xD;&#xA;    private List&lt;Cell&gt; findEnemyPath(Enemy enemy) {&#xD;&#xA;		&#xD;&#xA;		for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;				grid[i][j].parent = null;&#xD;&#xA;				grid[i][j].start = false;&#xD;&#xA;				grid[i][j].goal = false;&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		List&lt;Cell&gt; openList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; closedList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; bestList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		&#xD;&#xA;		int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;		int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;		&#xD;&#xA;		width = (width &lt; 0) ? 0 : width; &#xD;&#xA;		height = (height &lt; 0) ? 0 : height; &#xD;&#xA;		&#xD;&#xA;		Log.d(&quot;findEnemyPath, enemy X:Y&quot;, &quot;X&quot;+enemy.position.x+&quot;:&quot;+&quot;Y&quot;+enemy.position.y);&#xD;&#xA;		Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+height+&quot;:&quot;+&quot;Y&quot;+width);&#xD;&#xA;		Cell start = grid[height][width];&#xD;&#xA;		Cell goal = grid[ENEMY_GOAL_HEIGHT][ENEMY_GOAL_WIDTH];&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if(start.id != goal.id) {&#xD;&#xA;&#xD;&#xA;			Log.d(&quot;START CELL ID: &quot;, &quot;&quot;+start.id);&#xD;&#xA;			Log.d(&quot;GOAL CELL ID: &quot;, &quot;&quot;+goal.id);&#xD;&#xA;			//Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+start.position.x+&quot;:&quot;+&quot;Y&quot;+start.position.y);&#xD;&#xA;			start.start = true;&#xD;&#xA;			goal.goal = true;&#xD;&#xA;			openList.add(start);&#xD;&#xA;			&#xD;&#xA;			while(openList.size() &gt; 0) {&#xD;&#xA;				Cell best = findBestPassThrough(openList, goal);&#xD;&#xA;				//Log.d(&quot;ID:&quot;, &quot;&quot;+best.id);&#xD;&#xA;				openList.remove(best);&#xD;&#xA;				closedList.add(best);&#xD;&#xA;				if (best.goal) {&#xD;&#xA;				    System.out.println(&quot;Found Goal&quot;);&#xD;&#xA;				    System.out.println(bestList.size());&#xD;&#xA;				    populateBestList(goal, bestList);&#xD;&#xA;				    /*&#xD;&#xA;				    for(Cell cell : bestList) {&#xD;&#xA;						Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;						Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;				    }&#xD;&#xA;				    */&#xD;&#xA;				    Collections.reverse(bestList);&#xD;&#xA;			        Cell exit = new Cell(13.5f, 3.5f, 1, 1);&#xD;&#xA;			        exit.isExit = true;&#xD;&#xA;			        bestList.add(exit);&#xD;&#xA;			    	//Log.d(&quot;PathList&quot;, &quot;Enemy ID : &quot; + enemy.id);&#xD;&#xA;				    return bestList;&#xD;&#xA;				} &#xD;&#xA;				else {&#xD;&#xA;				    List&lt;Cell&gt; neighbors = getNeighbors(best);&#xD;&#xA;				    for (Cell neighbor : neighbors) {&#xD;&#xA;					    if(neighbor.isTower) {&#xD;&#xA;				    		continue;&#xD;&#xA;				    	}&#xD;&#xA;					    if (openList.contains(neighbor)) {&#xD;&#xA;					        Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;					        tmpCell.parent = best;&#xD;&#xA;					        if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;					        	continue;&#xD;&#xA;					        }&#xD;&#xA;					    }&#xD;&#xA;					    if (closedList.contains(neighbor)) {&#xD;&#xA;							Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;							tmpCell.parent = best;&#xD;&#xA;							if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;								continue;&#xD;&#xA;					    	}&#xD;&#xA;						}&#xD;&#xA;					    Log.d(&quot;Neighbor's Parent: &quot;, &quot;&quot;+best.id);&#xD;&#xA;					    neighbor.parent = best;&#xD;&#xA;						openList.remove(neighbor);&#xD;&#xA;						closedList.remove(neighbor);&#xD;&#xA;						openList.add(0, neighbor);&#xD;&#xA;				    }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		Log.d(&quot;Cannot find a path&quot;, &quot;&quot;);&#xD;&#xA;		return null;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31049" PostHistoryTypeId="1" PostId="13913" RevisionGUID="9572487a-8f45-4df6-8dac-a099095395a2" CreationDate="2011-06-19T23:46:09.913" UserId="7819" Text="A star algorithm - infinite, parent issue" />
  <row Id="31050" PostHistoryTypeId="3" PostId="13913" RevisionGUID="9572487a-8f45-4df6-8dac-a099095395a2" CreationDate="2011-06-19T23:46:09.913" UserId="7819" Text="&lt;algorithm&gt;&lt;path-finding&gt;" />
  <row Id="31051" PostHistoryTypeId="2" PostId="13914" RevisionGUID="ddc2417b-8e83-4cb4-ad74-75b3c33e4c7c" CreationDate="2011-06-19T23:54:18.193" UserId="5899" Text="Maybe the width and height are exchanged.&#xD;&#xA;&#xD;&#xA;In the loops:&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;            for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;&#xD;&#xA;you use i for height, and j for width&#xD;&#xA;&#xD;&#xA;In the cell:&#xD;&#xA;&#xD;&#xA;    int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;    int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;&#xD;&#xA;x is used to width.&#xD;&#xA;&#xD;&#xA;I suspect this because usually x is related to i, and y to j and your case is backward." />
  <row Id="31052" PostHistoryTypeId="25" PostId="13912" RevisionGUID="30e3234f-fd31-4e47-bbd7-2eb78d1e7039" CreationDate="2011-06-20T00:24:39.020" Comment="http://twitter.com/#!/StackGameDev/status/82604737299623936" />
  <row Id="31053" PostHistoryTypeId="2" PostId="13915" RevisionGUID="65acce8b-0dcb-47a5-b08f-d24a23ccdea2" CreationDate="2011-06-20T02:08:24.033" UserId="8126" Text="How does one usually handle animations that are for going between a game object's states? For example, imagine a very simple game in which a character can only crouch or stand normally. Currently, I use a custom Animation class like this:&#xD;&#xA;&#xD;&#xA;    class Animation{&#xD;&#xA;     int numFrames;&#xD;&#xA;     int curFrame;&#xD;&#xA;     Bitmap spriteSheet;&#xD;&#xA;     //... various functions for pausing, returning frame, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and an example Character class&#xD;&#xA;&#xD;&#xA;    class Character{&#xD;&#xA;     int state;&#xD;&#xA;     Animation standAni;&#xD;&#xA;     Animation crouchAni;&#xD;&#xA;     //... etc, etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Thus, I use the state of the character to draw the necessary animation.&#xD;&#xA;&#xD;&#xA;    if(state == STATE_STAND)&#xD;&#xA;        draw(standAni.updateFrame());&#xD;&#xA;    else if(state == STATE_CROUCH)&#xD;&#xA;        draw(crouchAni.updateFrame());&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;Now I've come to the point where I want to draw &quot;in-between&quot; animations, because right now the character will just jump immediately into a crouch instead of bending down. What is a good way to handle this? And if the way that I handle storing Animations in the Character class is not a good way, what is?&#xD;&#xA;&#xD;&#xA;I thought of creating states like STATE_STANDING_TO_CROUCHING but I feel like that may get messy fast.&#xD;&#xA;" />
  <row Id="31054" PostHistoryTypeId="1" PostId="13915" RevisionGUID="65acce8b-0dcb-47a5-b08f-d24a23ccdea2" CreationDate="2011-06-20T02:08:24.033" UserId="8126" Text="How do you handle animations that are for transitioning between states?" />
  <row Id="31055" PostHistoryTypeId="3" PostId="13915" RevisionGUID="65acce8b-0dcb-47a5-b08f-d24a23ccdea2" CreationDate="2011-06-20T02:08:24.033" UserId="8126" Text="&lt;animation&gt;&lt;sprites&gt;&lt;state&gt;" />
  <row Id="31056" PostHistoryTypeId="2" PostId="13916" RevisionGUID="1c208cec-6eb4-4ea5-ac61-9594ea686294" CreationDate="2011-06-20T02:24:32.880" UserId="370" Text="I'm just starting really getting my head around component based design.  I don't know what the _&quot;right&quot;_ way to do this is.&#xD;&#xA;&#xD;&#xA;Here's the scenario.  The player can equip a shield.  The the shield is drawn as bubble around the player, it has a separate collision shape, and reduces the damage the player receives from area effects.&#xD;&#xA;&#xD;&#xA;###How is such a shield architected in a component based game?&#xD;&#xA;Where I get confused is that the shield obviously has three components associated with it.&#xD;&#xA;&#xD;&#xA;* Damage reduction / filtering&#xD;&#xA;* A sprite&#xD;&#xA;* A collider.&#xD;&#xA;&#xD;&#xA;To make it worse different shield variations could have even more behaviors, all of which could be components:&#xD;&#xA;&#xD;&#xA;* boost player maximum health&#xD;&#xA;* health regen&#xD;&#xA;* projectile deflection&#xD;&#xA;* etc&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA; 1. Am I overthinking this?  Should the shield just be a super component?  &#xD;&#xA;I really think this is wrong answer.  So if you think this is the way to go please explain.&#xD;&#xA;&#xD;&#xA; 2. Should the shield be its own entity that tracks the location of the player?  &#xD;&#xA;That might make it hard to implement the damage filtering.  It also kinda blurs the lines between attached components and entities.&#xD;&#xA;&#xD;&#xA; 3. Should the shield be a component that houses other components?  &#xD;&#xA;I've never seen or heard of anything like this, but maybe it's common and I'm just not deep enough yet.&#xD;&#xA;&#xD;&#xA; 5. Should the shield just be a set of components that get added to the player?  &#xD;&#xA;Possibly with an extra component to manage the others, e.g. so they can all be removed as a group.  (accidentally leave behind the damage reduction component, now that would be fun).&#xD;&#xA;&#xD;&#xA; 6. Something else that's obvious to someone with more component experience?&#xD;&#xA;" />
  <row Id="31057" PostHistoryTypeId="1" PostId="13916" RevisionGUID="1c208cec-6eb4-4ea5-ac61-9594ea686294" CreationDate="2011-06-20T02:24:32.880" UserId="370" Text="New entities vs components" />
  <row Id="31058" PostHistoryTypeId="3" PostId="13916" RevisionGUID="1c208cec-6eb4-4ea5-ac61-9594ea686294" CreationDate="2011-06-20T02:24:32.880" UserId="370" Text="&lt;architecture&gt;&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="31059" PostHistoryTypeId="5" PostId="13800" RevisionGUID="910dd3a3-b514-4506-bdfd-b8135c15f346" CreationDate="2011-06-20T02:39:45.203" UserId="370" Comment="fixed formatting" Text="The component architecture is an alternative to avoid the large hierarchies that are achieved inheriting all elements from a same node, and the problems of coupling that leads.&#xD;&#xA;&#xD;&#xA;You are showing a component architecture with &quot;generic&quot; components. You have the basic logic to attach and detach &quot;generic&quot; components. An architecture with generic components is more difficult to achieve because you don't know which component is. The benefits is that this approach is extensible.&#xD;&#xA;&#xD;&#xA;A valid component architecture is achieved with defined components. With defined I mean, the interface is defined, not the implementation. For example, GameObject can have a IPhysicInstance, Transformation, IMesh, IAnimationController. This has the benefit that you know the interface and the GameObject knows how to deal with each component.&#xD;&#xA;&#xD;&#xA;**Responding to the term over-generalizing**&#xD;&#xA;&#xD;&#xA;I think that the concepts are not clear. When I say component, doesn't mean that all component of a game-object must inherit from a component interface or something similar. However this is the approach for Generic Components, I think that it is the concept that you name as a component.&#xD;&#xA;&#xD;&#xA;The component architecture is another of the architectures that exist for runtime object model. It's not the only and its not the best for all cases, but the experience has demonstrated that has a lot of benefits, like low coupling.&#xD;&#xA;&#xD;&#xA;The main feature that distinguishes the component architecture is convert the relation is-a into has-a. For example a object architecture is-a:&#xD;&#xA;&#xD;&#xA;![is-a architecture][1]&#xD;&#xA;&#xD;&#xA;Instead of a object architecture has-a ( components ):&#xD;&#xA;&#xD;&#xA;![has-a architecture][2]&#xD;&#xA;&#xD;&#xA;There is also property-centric architectures :&#xD;&#xA;&#xD;&#xA;For example, a normal object architecture is like this:&#xD;&#xA;&#xD;&#xA;- Object1&#xD;&#xA; - Position = ( 0, 0, 0 )&#xD;&#xA; - Orientation = ( 0, 43, 0 )&#xD;&#xA;&#xD;&#xA;- Object2&#xD;&#xA; - Position = ( 10, 0, 0 )&#xD;&#xA; - Orientation = ( 0, 0, 30 )&#xD;&#xA;&#xD;&#xA;A property-centric architecture:&#xD;&#xA;&#xD;&#xA;- Position&#xD;&#xA; - Object1 = ( 0, 0, 0 )&#xD;&#xA; - Object2 = ( 10, 0, 0 )&#xD;&#xA;&#xD;&#xA;- Orientation&#xD;&#xA; - Object1 = ( 0, 43, 0 )&#xD;&#xA; - Object2 = ( 0, 0, 30 )&#xD;&#xA;&#xD;&#xA;It is better the object model architecture? In performance perspective, it's better the property-centric because it is more cache-friendly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Component is refered to the relation is-a instead of has-a. A component can be a Transformation matrix, a quaternion, etc. But the relation with the game-object is a relation is-a, the game-object doesn't have the transformation because it's inherited. The game-object has ( relation has-a ) the transformation. The transformation is then a component.&#xD;&#xA;&#xD;&#xA;The game-object is like a hub. if you want a component that always is there, then maybe the component ( like the matrix ) should be inside the object and not a pointer.&#xD;&#xA;&#xD;&#xA;There is not a perfect game-object for all cases, it depends the engine, the libraries that the engine use. Maybe I want a camera that doesn't have a mesh. The problem with is-a architecture is that if the game-object has a mesh, then the camera that inherits from game-object must have a mesh. With componenets, the camera has a transformation, a controller for the movement, and anything you need.&#xD;&#xA;&#xD;&#xA;For more information, the chapter &quot;14.2. Runtime Object Model Architecture&quot; from the book &quot;Game Engine Architecture&quot; of &quot;Jason Gregory&quot; deals specifically this subject.&#xD;&#xA;&#xD;&#xA;UML diagrams are extracted from there&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Ki7LF.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/3svPv.jpg" />
  <row Id="31060" PostHistoryTypeId="2" PostId="13917" RevisionGUID="0caa4cf7-2f20-4a8b-b4da-77c935ceeb82" CreationDate="2011-06-20T02:54:19.997" UserId="8128" Text="http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking" />
  <row Id="31061" PostHistoryTypeId="2" PostId="13918" RevisionGUID="e212d9e2-a442-434f-9afd-24d571cf4563" CreationDate="2011-06-20T03:03:45.823" UserId="1101" Text="Right, so it looks like you're calling populateBestList recursively forever. This would happen if your linked list of Cell.parent values is circular for some reason.&#xD;&#xA;&#xD;&#xA;Normally, this isn't possible, because you only ever set a parent value on a node just taken off the open list, and you set it to point to a cell you already handled and put on the closed list, and so the parent links would always point backwards along the nodes you 'closed' further into the past.&#xD;&#xA;&#xD;&#xA;However, if a closed node were to end up back in the open list, you could end up creating a parent loop, because the node you set its parent to may already point back at this one - or, it might point to a node whose parent points back to this one, and so on. And then after creating this cycle, if any of the cycle appears in the final path, you'll be unable to complete the path and will get the error you see.&#xD;&#xA;&#xD;&#xA;You do have code which potentially resurrects nodes from the closed list, back into the open list, based on these `getPassThrough` values. So, I would suggest double checking getPassThrough - is that definitely handling distance travelled + estimated distance remaining properly? Is it possible that it is wrongly saying that you reached a cell on the closed list by a cheaper path, and thus putting it back on the open list when it shouldn't be? If getPassThrough gets the costs wrong then the parenting links will also end up wrong." />
  <row Id="31062" PostHistoryTypeId="25" PostId="13904" RevisionGUID="f51df5da-0b10-47b9-b0e7-9d7e7fac14e9" CreationDate="2011-06-20T03:24:40.660" Comment="http://twitter.com/#!/StackGameDev/status/82650041013125120" />
  <row Id="31063" PostHistoryTypeId="4" PostId="13685" RevisionGUID="8462c5ec-5f1b-4cbb-b8d1-dcfb8c652c5d" CreationDate="2011-06-20T04:24:19.137" UserId="962" Comment="edited title" Text="How are trajectories calculated and transmitted to other players in Multi-Player ?" />
  <row Id="31064" PostHistoryTypeId="2" PostId="13919" RevisionGUID="74ddf904-2f56-44ce-8627-96a3b285f289" CreationDate="2011-06-20T04:31:58.140" UserId="370" Text="I was thinking of how to implement overriding of behaviors in a component based entity system.  A concrete example, an entity has a heath component that can be damaged, healed, killed etc.  The entity also has an armor component that limits the amount of damage a character receives.&#xD;&#xA;&#xD;&#xA;Has anyone implemented behaviors like this in a component based system before?  &#xD;&#xA;**How did you do it?**&#xD;&#xA;&#xD;&#xA;If no one has ever done this before why do you think that is.  **Is there anything particularly wrong headed about overriding component behaviors?**  &#xD;&#xA;&#xD;&#xA;Below is rough sketch up of how I imagine it would work.  Components in an entity are ordered.  Those at the front get a chance to service an interface first.  I don't detail how that is done, just assume it uses evil `dynamic_cast`s (it doesn't but the end effect is the same without the need for RTTI).&#xD;&#xA;&#xD;&#xA;    class IHealth&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       float get_health( void ) const = 0;&#xD;&#xA;       void do_damage( float amount ) = 0;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Health : public Component, public IHealth&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       void do_damage( float amount )&#xD;&#xA;       {&#xD;&#xA;          m_damage -= amount;&#xD;&#xA;       }&#xD;&#xA;    private:&#xD;&#xA;       float m_health;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Armor : public Component, public IHealth&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       float get_health( void ) const&#xD;&#xA;       {&#xD;&#xA;          return next&lt;IHealth&gt;().get_health();&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       void do_damage( float amount )&#xD;&#xA;       {&#xD;&#xA;          next&lt;IHealth&gt;().do_damage( amount / 2 );&#xD;&#xA;      }&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    entity.add( new Health( 100 ) );&#xD;&#xA;    entity.add( new Armor() );&#xD;&#xA;    assert( entity.get&lt;IHealth&gt;().get_health() == 100 );&#xD;&#xA;    entity.get&lt;IHealth&gt;().do_damage( 10 );&#xD;&#xA;    assert( entity.get&lt;IHealth&gt;().get_health() == 95 );&#xD;&#xA;&#xD;&#xA;**Is there anything particularly naive about the way I'm proposing to do this?**" />
  <row Id="31065" PostHistoryTypeId="1" PostId="13919" RevisionGUID="74ddf904-2f56-44ce-8627-96a3b285f289" CreationDate="2011-06-20T04:31:58.140" UserId="370" Text="Overriding component behavior" />
  <row Id="31066" PostHistoryTypeId="3" PostId="13919" RevisionGUID="74ddf904-2f56-44ce-8627-96a3b285f289" CreationDate="2011-06-20T04:31:58.140" UserId="370" Text="&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="31067" PostHistoryTypeId="4" PostId="13916" RevisionGUID="aee0f312-7531-4767-85b3-1ef47153622c" CreationDate="2011-06-20T05:08:43.613" UserId="51" Comment="edited title" Text="Doing powerups in a component-based system" />
  <row Id="31068" PostHistoryTypeId="2" PostId="13920" RevisionGUID="d74ad033-193d-4451-aac5-f3dee43f5ea8" CreationDate="2011-06-20T05:18:32.043" UserId="51" Text="I think you're making it a little too complicated, or not complicated enough.&#xD;&#xA;&#xD;&#xA;One direction I would suggest would be to break apart getting health and doing damage interfaces.  &#xD;&#xA;&#xD;&#xA;So maybe as an idea, your Armor component would look like this:&#xD;&#xA;&#xD;&#xA;    class Armor : public Component, public IDamageReceiver&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       void do_damage( float amount )&#xD;&#xA;       {&#xD;&#xA;          // just assume that subtract_health isn't used in client code maybe&#xD;&#xA;          this.get&lt;IHealth&gt;().subtract_health( amount / 2 ); &#xD;&#xA;       }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively (and probably what I would do), you could make your components a little bigger and just have a generic &quot;Entity&quot; base class that your specific types derive from.  This would contain the functionality of both health and armor and you could implement specific entities from that." />
  <row Id="31069" PostHistoryTypeId="2" PostId="13921" RevisionGUID="002ffa05-c534-469a-bc6a-2b04dd0e397f" CreationDate="2011-06-20T05:22:51.307" UserId="51" Text="&gt;Should the shield be a component that houses other components?&#xD;&#xA;&#xD;&#xA;Maybe not houses other components, but controls the lifetime of sub components.  So in some rough pseudo code, your client code would add this &quot;shield&quot; component.&#xD;&#xA;&#xD;&#xA;    class Shield : Component&#xD;&#xA;    {&#xD;&#xA;        void Start() // happens when the component is added&#xD;&#xA;        {&#xD;&#xA;            sprite = this.add_component&lt;Sprite&gt;( &quot;shield&quot; );&#xD;&#xA;            collider = this.add_component&lt;Collider&gt;( whatever );&#xD;&#xA;            //etc&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void OnDestroy() // when the component is removed&#xD;&#xA;        {&#xD;&#xA;            this.remove_component( sprite );&#xD;&#xA;            this.remove_component( collider );&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void Update() // every tick&#xD;&#xA;        {&#xD;&#xA;            if( ShouldRemoveSelf() ) // probably time based or something&#xD;&#xA;                this.remove_component( this );&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="31070" PostHistoryTypeId="2" PostId="13922" RevisionGUID="1e686627-9eff-432a-9263-cbcede611c5a" CreationDate="2011-06-20T05:34:12.883" UserId="7904" Text="If your component system allows scripting, the shield component could be almost a super component that just calls a script for its &quot;effect&quot; parameter. That way you maintain simplicity of a single component for shields, and offload all the logic of what it actually does to custom script files that get fed to shields by your entity definitions.&#xD;&#xA;&#xD;&#xA;I do something similar for my Moveable component, it countains a field that is of keyreaction script (a subclass of script in my engine) this script defines a method that follows my input message. as such i can simply do  something like this in my tempalte definition file&#xD;&#xA;&#xD;&#xA;    camera template&#xD;&#xA;        moveable&#xD;&#xA;        {&#xD;&#xA;            keyreaction = &quot;scriptforcameramoves&quot;&#xD;&#xA;&#xD;&#xA;        }  &#xD;&#xA;&#xD;&#xA;    player template&#xD;&#xA;        moveable&#xD;&#xA;        {&#xD;&#xA;            keyreaction = &quot;scriptfroplayerkeypress&quot;&#xD;&#xA;&#xD;&#xA;        }  &#xD;&#xA;&#xD;&#xA;then in my moveable component during message registering i register the scripts Do method (code in C#)&#xD;&#xA;&#xD;&#xA;    Owner.RegisterHandler&lt;InputStateInformation&gt;(MessageType.InputUpdate, kScript.Do);&#xD;&#xA;&#xD;&#xA;of course this relies on my Do method following the pattern of functions that my RegisterHandler takes. In this case its  &lt;type&gt;(IComponent sender, ref type argument)&#xD;&#xA;&#xD;&#xA;so my &quot;script&quot; (in my case also C# just runime compiled) defines&#xD;&#xA;&#xD;&#xA;     public class CameraMoveScript : KeyReactionScript&#xD;&#xA;    {&#xD;&#xA;     public override void Do(IComponent pSender, ref InputStateInformation inputState)&#xD;&#xA;     {&#xD;&#xA;        //code here&#xD;&#xA;     }&#xD;&#xA;    }&#xD;&#xA;and my base class KeyReactionScript&#xD;&#xA;&#xD;&#xA;    public class KeyReactionScript : Script&#xD;&#xA;    {&#xD;&#xA;          public virtual void Do(IComponent pSender, ref InputStateInformation inputState);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;then later when an input component sends a message of the type MessageTypes.InputUpdate with the type &lt;InputStateInformation&gt; as such&#xD;&#xA;     &#xD;&#xA;     InputStateInformation myInputState = InputSystem.GetInputState();&#xD;&#xA;     SendMessage&lt;InputStateInformation&gt;(MessageTypes.InputUpdate, ref myInputState);&#xD;&#xA;&#xD;&#xA;The method in the script that was bound to that message and datatype will be fired and handle all the logic.&#xD;&#xA;&#xD;&#xA;The code is fairly specific to my engine, but the logic should be functional in any case.&#xD;&#xA;I do this for many types in order to keep the component structure simple and flexible." />
  <row Id="31071" PostHistoryTypeId="2" PostId="13923" RevisionGUID="80917f79-1f7f-4aae-8028-89ca1cfa4722" CreationDate="2011-06-20T06:09:50.983" UserId="8050" Text="In between states  are still states, more in general transient states should be modelled as states if their duration exeedes the frame duration; otherwise one should consider if appropriate on a case by case basis." />
  <row Id="31072" PostHistoryTypeId="2" PostId="13924" RevisionGUID="9d631d5d-2b71-44db-a274-de148bafe8c1" CreationDate="2011-06-20T06:14:59.733" UserId="7710" Text="In a 2D game, I simply want to draw the trajectory of an arrow in flight. With the code below, the trajectory (the parabola) looks right, but the angle (or rotation) or the arrow isn't. &#xD;&#xA;&#xD;&#xA;    float g = -9.8f;&#xD;&#xA;    float x = (launchVelocity * time);&#xD;&#xA;    float y = (launchVelocity * time) + (0.5f * g * (float)Math.Pow(time, 2));&#xD;&#xA;    float angle = (float)Math.Tanh(y / x);&#xD;&#xA;&#xD;&#xA;What am I missing? Thanks." />
  <row Id="31073" PostHistoryTypeId="1" PostId="13924" RevisionGUID="9d631d5d-2b71-44db-a274-de148bafe8c1" CreationDate="2011-06-20T06:14:59.733" UserId="7710" Text="Projectile Motion - Arrow" />
  <row Id="31074" PostHistoryTypeId="3" PostId="13924" RevisionGUID="9d631d5d-2b71-44db-a274-de148bafe8c1" CreationDate="2011-06-20T06:14:59.733" UserId="7710" Text="&lt;projectile-physics&gt;" />
  <row Id="31075" PostHistoryTypeId="25" PostId="13916" RevisionGUID="9f723507-26de-4925-9ca6-e2e8410836f3" CreationDate="2011-06-20T06:24:40.973" Comment="http://twitter.com/#!/StackGameDev/status/82695341983543296" />
  <row Id="31076" PostHistoryTypeId="5" PostId="13919" RevisionGUID="46a18ee8-4c7d-488d-af95-48b6a28f0d74" CreationDate="2011-06-20T06:32:29.347" UserId="370" Comment="fixed syntax highlighting" Text="I was thinking of how to implement overriding of behaviors in a component based entity system.  A concrete example, an entity has a heath component that can be damaged, healed, killed etc.  The entity also has an armor component that limits the amount of damage a character receives.&#xD;&#xA;&#xD;&#xA;Has anyone implemented behaviors like this in a component based system before?  &#xD;&#xA;**How did you do it?**&#xD;&#xA;&#xD;&#xA;If no one has ever done this before why do you think that is.  **Is there anything particularly wrong headed about overriding component behaviors?**  &#xD;&#xA;&#xD;&#xA;Below is rough sketch up of how I imagine it would work.  Components in an entity are ordered.  Those at the front get a chance to service an interface first.  I don't detail how that is done, just assume it uses evil `dynamic_cast`s (it doesn't but the end effect is the same without the need for RTTI).&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-cpp --&gt;&#xD;&#xA;&#xD;&#xA;    class IHealth&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       float get_health( void ) const = 0;&#xD;&#xA;       void do_damage( float amount ) = 0;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Health : public Component, public IHealth&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       void do_damage( float amount )&#xD;&#xA;       {&#xD;&#xA;          m_damage -= amount;&#xD;&#xA;       }&#xD;&#xA;    private:&#xD;&#xA;       float m_health;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Armor : public Component, public IHealth&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;       float get_health( void ) const&#xD;&#xA;       {&#xD;&#xA;          return next&lt;IHealth&gt;().get_health();&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       void do_damage( float amount )&#xD;&#xA;       {&#xD;&#xA;          next&lt;IHealth&gt;().do_damage( amount / 2 );&#xD;&#xA;      }&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    entity.add( new Health( 100 ) );&#xD;&#xA;    entity.add( new Armor() );&#xD;&#xA;    assert( entity.get&lt;IHealth&gt;().get_health() == 100 );&#xD;&#xA;    entity.get&lt;IHealth&gt;().do_damage( 10 );&#xD;&#xA;    assert( entity.get&lt;IHealth&gt;().get_health() == 95 );&#xD;&#xA;&#xD;&#xA;**Is there anything particularly naive about the way I'm proposing to do this?**" />
  <row Id="31078" PostHistoryTypeId="2" PostId="13926" RevisionGUID="6f9342ad-1844-4350-b455-611d4cf9626d" CreationDate="2011-06-20T06:43:40.247" UserId="7728" Text="Tanh() (hyperbolic *tangent*) takes an angle as a parameter, but you've fed it the ratio of the sides.&#xD;&#xA;&#xD;&#xA;What you really want is to use the hyperbolic *arctangent*, which takes the ratio of the sides as a parameter, and returns the angle.  (Naming on this may be &quot;atanh&quot;, &quot;atanh2&quot;, &quot;arctanh&quot;, or something else similar;  seems to vary a lot between different maths libraries)" />
  <row Id="31080" PostHistoryTypeId="2" PostId="13927" RevisionGUID="cf94d717-dec0-4a63-8d34-fc2482548e82" CreationDate="2011-06-20T07:11:07.940" UserId="1258" Text="&gt; Should the shield be its own entity&#xD;&#xA;&gt; that tracks the location of the&#xD;&#xA;&gt; player?  That might make it hard to&#xD;&#xA;&gt; implement the damage filtering. It&#xD;&#xA;&gt; also kinda blurs the lines between&#xD;&#xA;&gt; attached components and entities.&#xD;&#xA;&#xD;&#xA;No&#xD;&#xA;&#xD;&#xA;&gt; Should the shield be a component that&#xD;&#xA;&gt; houses other components?  I've never&#xD;&#xA;&gt; seen or heard of anything like this,&#xD;&#xA;&gt; but maybe it's common and I'm just not&#xD;&#xA;&gt; deep enough yet.&#xD;&#xA;&#xD;&#xA;See it in a different perspective; adding a component adds other components as well, and upon removal, the additional components are gone too.&#xD;&#xA;&#xD;&#xA;&gt; Should the shield just be a set of&#xD;&#xA;&gt; components that get added to the&#xD;&#xA;&gt; player?  Possibly with an extra&#xD;&#xA;&gt; component to manage the others, e.g.&#xD;&#xA;&gt; so they can all be removed as a group.&#xD;&#xA;&gt; (accidentally leave behind the damage&#xD;&#xA;&gt; reduction component, now that would be&#xD;&#xA;&gt; fun).&#xD;&#xA;&#xD;&#xA;This could be a solution, it would promote reuse, however it is also more error prone (for the issue you mentioned, for instance). It's not necessarily bad. You might find out new spell combinations with trial and error :)&#xD;&#xA; &#xD;&#xA;&gt; Something else that's obvious to&#xD;&#xA;&gt; someone with more component&#xD;&#xA;&gt; experience?&#xD;&#xA;&#xD;&#xA;I'm going to elaborate a bit.&#xD;&#xA;&#xD;&#xA;I believe you noticed how some components should take priority no matter when they've been added to an entity (this would answer your other question as well).&#xD;&#xA;&#xD;&#xA;I'm also going to assume we're using message-based communication (for the sake of discussion, it's just an abstraction over a method call for the moment).&#xD;&#xA;&#xD;&#xA;Whenever a shield component is &quot;installed&quot;, shield component message handlers are chained with a specific (higher) order.&#xD;&#xA;&#xD;&#xA;    Handler Stage    Handler Level     Handler Priority&#xD;&#xA;    In               Pre               System High&#xD;&#xA;    Out              Invariant         High&#xD;&#xA;                     Post              AboveNormal&#xD;&#xA;                                       Normal&#xD;&#xA;                                       BelowNormal&#xD;&#xA;                                       Low&#xD;&#xA;                                       System Low&#xD;&#xA;&#xD;&#xA;    In - incoming messages&#xD;&#xA;    Out - outgoing messages&#xD;&#xA;    Index = ((int)Level | (int)Priority)&#xD;&#xA;&#xD;&#xA;The &quot;stats&quot; component installs a &quot;damage&quot; message handler at the In/Invariant/Normal index.&#xD;&#xA;    Every time a &quot;damage&quot; message is received, decrease the HP by its &quot;value&quot; amount.&#xD;&#xA;&#xD;&#xA;Fairly standard behaviour (put in some natural damage resistance and / or racial traits, whatever).&#xD;&#xA;&#xD;&#xA;The shield component installs a &quot;damage&quot; message handler at the In/Pre/High index.&#xD;&#xA;&#xD;&#xA;    Every time a &quot;damage&quot; message is received, deplete the shield energy and substract&#xD;&#xA;    the shield energy from the damage value, so that the damage down the message&#xD;&#xA;    handler pipeline is reduced.&#xD;&#xA;&#xD;&#xA;    damage -&gt; stats&#xD;&#xA;        stats&#xD;&#xA;            stats.hp -= damage.value&#xD;&#xA;&#xD;&#xA;    damage -&gt; shield -&gt; stats&#xD;&#xA;        shield&#xD;&#xA;            if(shield.energy) {&#xD;&#xA;                remove_me();&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;            damage.value -= shield.energyquantum&#xD;&#xA;            shield.energy -= shield.energyquantum;&#xD;&#xA;&#xD;&#xA;         stats&#xD;&#xA;            stats.hp -= damage.value&#xD;&#xA;&#xD;&#xA;You can see this is pretty flexible, albeit it would require careful planning when designing component interaction, as you're going to have to determine in which part of the message handling pipeline component message event handlers are installed.&#xD;&#xA;&#xD;&#xA;Makes sense? Let me know if I can add more detail." />
  <row Id="31081" PostHistoryTypeId="5" PostId="13927" RevisionGUID="6e9667f2-a9bb-44c4-b9eb-3563cb7b7672" CreationDate="2011-06-20T07:17:00.290" UserId="1258" Comment="added 329 characters in body" Text="&gt; Should the shield be its own entity&#xD;&#xA;&gt; that tracks the location of the&#xD;&#xA;&gt; player?  That might make it hard to&#xD;&#xA;&gt; implement the damage filtering. It&#xD;&#xA;&gt; also kinda blurs the lines between&#xD;&#xA;&gt; attached components and entities.&#xD;&#xA;&#xD;&#xA;No&#xD;&#xA;&#xD;&#xA;&gt; Should the shield be a component that&#xD;&#xA;&gt; houses other components?  I've never&#xD;&#xA;&gt; seen or heard of anything like this,&#xD;&#xA;&gt; but maybe it's common and I'm just not&#xD;&#xA;&gt; deep enough yet.&#xD;&#xA;&#xD;&#xA;See it in a different perspective; adding a component adds other components as well, and upon removal, the additional components are gone too.&#xD;&#xA;&#xD;&#xA;&gt; Should the shield just be a set of&#xD;&#xA;&gt; components that get added to the&#xD;&#xA;&gt; player?  Possibly with an extra&#xD;&#xA;&gt; component to manage the others, e.g.&#xD;&#xA;&gt; so they can all be removed as a group.&#xD;&#xA;&gt; (accidentally leave behind the damage&#xD;&#xA;&gt; reduction component, now that would be&#xD;&#xA;&gt; fun).&#xD;&#xA;&#xD;&#xA;This could be a solution, it would promote reuse, however it is also more error prone (for the issue you mentioned, for instance). It's not necessarily bad. You might find out new spell combinations with trial and error :)&#xD;&#xA; &#xD;&#xA;&gt; Something else that's obvious to&#xD;&#xA;&gt; someone with more component&#xD;&#xA;&gt; experience?&#xD;&#xA;&#xD;&#xA;I'm going to elaborate a bit.&#xD;&#xA;&#xD;&#xA;I believe you noticed how some components should take priority no matter when they've been added to an entity (this would answer your other question as well).&#xD;&#xA;&#xD;&#xA;I'm also going to assume we're using message-based communication (for the sake of discussion, it's just an abstraction over a method call for the moment).&#xD;&#xA;&#xD;&#xA;Whenever a shield component is &quot;installed&quot;, shield component message handlers are chained with a specific (higher) order.&#xD;&#xA;&#xD;&#xA;    Handler Stage    Handler Level     Handler Priority&#xD;&#xA;    In               Pre               System High&#xD;&#xA;    Out              Invariant         High&#xD;&#xA;                     Post              AboveNormal&#xD;&#xA;                                       Normal&#xD;&#xA;                                       BelowNormal&#xD;&#xA;                                       Low&#xD;&#xA;                                       System Low&#xD;&#xA;&#xD;&#xA;    In - incoming messages&#xD;&#xA;    Out - outgoing messages&#xD;&#xA;    Index = ((int)Level | (int)Priority)&#xD;&#xA;&#xD;&#xA;The &quot;stats&quot; component installs a &quot;damage&quot; message handler at the In/Invariant/Normal index.&#xD;&#xA;    Every time a &quot;damage&quot; message is received, decrease the HP by its &quot;value&quot; amount.&#xD;&#xA;&#xD;&#xA;Fairly standard behaviour (put in some natural damage resistance and / or racial traits, whatever).&#xD;&#xA;&#xD;&#xA;The shield component installs a &quot;damage&quot; message handler at the In/Pre/High index.&#xD;&#xA;&#xD;&#xA;    Every time a &quot;damage&quot; message is received, deplete the shield energy and substract&#xD;&#xA;    the shield energy from the damage value, so that the damage down the message&#xD;&#xA;    handler pipeline is reduced.&#xD;&#xA;&#xD;&#xA;    damage -&gt; stats&#xD;&#xA;        stats&#xD;&#xA;            stats.hp -= damage.value&#xD;&#xA;&#xD;&#xA;    damage -&gt; shield -&gt; stats&#xD;&#xA;        shield&#xD;&#xA;            if(shield.energy) {&#xD;&#xA;                remove_me();&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;            damage.value -= shield.energyquantum&#xD;&#xA;            shield.energy -= shield.energyquantum;&#xD;&#xA;&#xD;&#xA;         stats&#xD;&#xA;            stats.hp -= damage.value&#xD;&#xA;&#xD;&#xA;You can see this is pretty flexible, albeit it would require careful planning when designing component interaction, as you're going to have to determine in which part of the message handling pipeline component message event handlers are installed.&#xD;&#xA;&#xD;&#xA;Makes sense? Let me know if I can add more detail.&#xD;&#xA;&#xD;&#xA;Edit: regarding multiple component instances (two armour components). You can either keep track of the total instance count in just one entity instance (this kills per-component state, however) and just keep adding message event handlers, or make sure your component containers allow for duplicate component types in advance." />
  <row Id="31082" PostHistoryTypeId="2" PostId="13928" RevisionGUID="1702ac78-6d0b-4380-a9e6-e28fe343de6b" CreationDate="2011-06-20T07:48:24.330" UserId="8130" Text="There's a neat little two-player board game called &quot;[2 De Mayo][1]&quot; which has some of these features.&#xD;&#xA;&#xD;&#xA;- Simultaneous orders (both French and Spanish side write down orders and revale at the same time)&#xD;&#xA;- Simple rules for resolving conflicts.&#xD;&#xA;&#xD;&#xA;It does not however have supporting actions. You can only move (=attack an area) and not stay and support.&#xD;&#xA;&#xD;&#xA;Apart from that, it's an asymmetrical game, in that the French army, which is much stronger has only few troops, and needs to hunt down a highly mobile Spanish rebel mob comprised of many small units. Check it out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://boardgamegeek.com/boardgame/36522/2-de-mayo" />
  <row Id="31083" PostHistoryTypeId="16" PostId="13928" RevisionGUID="c0cd4619-2f3e-48c7-945f-7c23d7478227" CreationDate="2011-06-20T07:48:24.330" UserId="8130" />
  <row Id="31084" PostHistoryTypeId="2" PostId="13929" RevisionGUID="c89556f7-8274-4999-bd26-4d776a1935cb" CreationDate="2011-06-20T08:53:46.760" UserId="2081" Text="The function of a bloom filter:&#xD;&#xA;&#xD;&#xA;  * Apply a threshold to the source image to extract bright colours.&#xD;&#xA;&#xD;&#xA;  * Blur the result.&#xD;&#xA;&#xD;&#xA;  * Composite the blurred effect over the source image.&#xD;&#xA;&#xD;&#xA;Your problem is that the shader targets bright colours (greater than the threshold) when it ought to target dark colours (less than the threshold). As a result, the dark shapes are being covered by the blur effect on the white background. Solution: change the direction (&gt; vs. &lt;) of the test.&#xD;&#xA;&#xD;&#xA;If you want bloom on shadows as well as lights, try:&#xD;&#xA;&#xD;&#xA;&gt; (Colour &lt; Shadow Threshold || Colour &gt; Highlight Threshold)&#xD;&#xA;&#xD;&#xA;But it probably won't look great.&#xD;&#xA;" />
  <row Id="31085" PostHistoryTypeId="2" PostId="13930" RevisionGUID="998c4a38-2b1c-49ee-b086-3e0e59d9b96c" CreationDate="2011-06-20T08:59:06.040" UserId="5610" Text="I want to draw the depth buffer in the fragment shader, I do this:&#xD;&#xA;&#xD;&#xA;**Vertex shader:**&#xD;&#xA;&#xD;&#xA;    varying vec4 position_;&#xD;&#xA;    &#xD;&#xA;    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;&#xD;&#xA;    position_ = gl_ModelViewProjectionMatrix * gl_Vertex;&#xD;&#xA;&#xD;&#xA;**Fragment shader:**&#xD;&#xA;&#xD;&#xA;    float depth = ((position_.z / position_.w) + 1.0) * 0.5;&#xD;&#xA;    &#xD;&#xA;    gl_FragColor = vec4(depth, depth, depth, 1.0);&#xD;&#xA;&#xD;&#xA;But all I print is white, what am I doing wrong?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31086" PostHistoryTypeId="1" PostId="13930" RevisionGUID="998c4a38-2b1c-49ee-b086-3e0e59d9b96c" CreationDate="2011-06-20T08:59:06.040" UserId="5610" Text="draw the depth value in opengl using shaders" />
  <row Id="31087" PostHistoryTypeId="3" PostId="13930" RevisionGUID="998c4a38-2b1c-49ee-b086-3e0e59d9b96c" CreationDate="2011-06-20T08:59:06.040" UserId="5610" Text="&lt;opengl&gt;&lt;shaders&gt;" />
  <row Id="31088" PostHistoryTypeId="25" PostId="13930" RevisionGUID="1ebd9fdd-33df-4829-ab33-1dedf0a32fb0" CreationDate="2011-06-20T09:24:41.627" Comment="http://twitter.com/#!/StackGameDev/status/82740642094133248" />
  <row Id="31089" PostHistoryTypeId="2" PostId="13931" RevisionGUID="c51ff132-1f46-403a-9ef4-47848e327985" CreationDate="2011-06-20T09:25:43.733" UserId="1141" Text="You should *focus* on C++. End of story.&#xD;&#xA;&#xD;&#xA;Now, this doesn't mean you shouldn't learn any other language. In no particular order, you should at least become somewhat familiar with the following:&#xD;&#xA;&#xD;&#xA;* C# - in particular in combination with Unity3D and XNA&#xD;&#xA;* Java, mostly for mobile development on Android and Symbian platforms&#xD;&#xA;* JavaScript/ECMAScript/ActionScript, for HTML5 and Flash games&#xD;&#xA;* Lua and Python, for the most common embedded scripting languages&#xD;&#xA;&#xD;&#xA;Personal recommendations would also include those two domain-specific gaming programming languages:&#xD;&#xA;&#xD;&#xA;* Inform 7, as an example of a useful declarative language&#xD;&#xA;* LPC, due to the amount of ready-to-use game engines (&quot;mudlibs&quot;) available for it, a mix of object-oriented and functional languages well-suited (and indeed, created explicitly for this purpose) for MMO development&#xD;&#xA;" />
  <row Id="31090" PostHistoryTypeId="2" PostId="13932" RevisionGUID="b6f8d11b-7a9a-4dd8-99f1-3e2d2331bf55" CreationDate="2011-06-20T09:51:02.720" UserId="8050" Text="The ArctanH gives you the tangent for the Hyperbolic curve! As far as i know your parabola isn't a Hyperbole...&#xD;&#xA;&#xD;&#xA;But we have good news, find out the tangent for your parabola is easier.&#xD;&#xA;your equation is &#xD;&#xA;&#xD;&#xA;x = s&amp;middot;t =&gt; t= x/s&#xD;&#xA;&#xD;&#xA;y = s&amp;middot;t + g/2 &amp;middot;t&amp;sup2; =&gt; y = x +g/2 &amp;middot; x&amp;sup2;/s&amp;sup2;&#xD;&#xA;&#xD;&#xA;now &amp;part;y/&amp;part;y = g/(2s&amp;sup2;)&amp;middot;x+1 this is the slope of your arrow. you can safety use the arctan now if you like.&#xD;&#xA;&#xD;&#xA;now some about Physic:&#xD;&#xA;&#xD;&#xA;the approximate trajectory you are simulating applies over the center of mass of your arrow. When you say &quot;position&quot; (x,y) you are talking about the center of mass' position. In arrows the center is slightly forward the half (and it should be so) and you should take it into account if you are going to draw an arrow.&#xD;&#xA;&#xD;&#xA;Keep also in mind that you are not considering the inertial momentum of the arrow (it can vary a lot if you are firing a giant ballista) and you are not considering the arrow's fluid dynamics: bows arrows won't fies as a parabola!" />
  <row Id="31091" PostHistoryTypeId="2" PostId="13933" RevisionGUID="d99c873d-ae3e-49b9-83fd-6512e78da2f9" CreationDate="2011-06-20T10:17:45.867" UserId="4947" Text="Maybe you can try one of these two variables. [gl_fragcoord][1] or [gl_fragdepth][2] &#xD;&#xA;&#xD;&#xA;I didn't read those manuals, but I think, it could be helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/manglsl/xhtml/gl_FragCoord.xml&#xD;&#xA;  [2]: http://www.opengl.org/sdk/docs/manglsl/xhtml/gl_FragDepth.xml" />
  <row Id="31092" PostHistoryTypeId="5" PostId="13932" RevisionGUID="68794a0b-9b44-4c3d-8eb4-f2d63f3fb427" CreationDate="2011-06-20T10:23:52.200" UserId="8050" Comment="added 1 characters in body; added 1 characters in body" Text="The ArctanH gives you the tangent for the Hyperbolic curve! As far as i know your parabola isn't a Hyperbole...&#xD;&#xA;&#xD;&#xA;But we have good news, find out the tangent for your parabola is easier.&#xD;&#xA;your equation is &#xD;&#xA;&#xD;&#xA;x = s&amp;middot;t =&gt; t= x/s&#xD;&#xA;&#xD;&#xA;y = s&amp;middot;t + g/2 &amp;middot;t&amp;sup2; =&gt; y = x +g/2 &amp;middot; x&amp;sup2;/s&amp;sup2;&#xD;&#xA;&#xD;&#xA;now &amp;part;y/&amp;part;y = g/(2s&amp;sup2;)&amp;middot;x+1 this is the slope of your arrow. you can safety use the arctan now if you like.&#xD;&#xA;&#xD;&#xA;now some about Physics:&#xD;&#xA;&#xD;&#xA;the approximate trajectory you are simulating applies over the center of mass of your arrow. When you say &quot;position&quot; (x,y) you are talking about the center of mass' position. In arrows the center is slightly forward the half (and it should be so) and you should take it into account if you are going to draw an arrow.&#xD;&#xA;&#xD;&#xA;Keep also in mind that you are not considering the inertial momentum of the arrow (it can vary a lot if you are firing a giant ballista) and you are not considering the arrow's fluid dynamics: bows arrows won't flies as a parabola!" />
  <row Id="31093" PostHistoryTypeId="5" PostId="13932" RevisionGUID="2e5a3015-d83d-4900-85dc-50e134a877b9" CreationDate="2011-06-20T10:34:54.393" UserId="8050" Comment="added 129 characters in body; added 6 characters in body" Text="The ArctanH gives you the tangent for the Hyperbolic curve! As far as i know your parabola isn't a Hyperbole...&#xD;&#xA;&#xD;&#xA;But we have good news, find out the tangent for your parabola is easier.&#xD;&#xA;your equation is &#xD;&#xA;&#xD;&#xA;![x = s&amp;middot;t =&amp;gt; t= x/s;y = s&amp;middot;t + g/2 &amp;middot;t&amp;sup2; =&amp;gt; y = x +g/2 &amp;middot; x&amp;sup2;/s&amp;sup2;][1]&#xD;&#xA;&#xD;&#xA;where s is your launchVelocity. now:&#xD;&#xA;&#xD;&#xA;![&amp;part;y/&amp;part;y = g/(2s&amp;sup2;)&amp;middot;x+1][2]&#xD;&#xA;&#xD;&#xA;is the slope of your arrow. you can safety use the arctan now if you like.&#xD;&#xA;&#xD;&#xA;Some about Physics:&#xD;&#xA;&#xD;&#xA;the approximate trajectory you are simulating applies over the center of mass of your arrow. When you say &quot;position&quot; (x,y) you are talking about the center of mass' position. In arrows the center is slightly forward the half (and it should be so) and you should take it into account if you are going to draw an arrow.&#xD;&#xA;&#xD;&#xA;Keep also in mind that you are not considering the inertial momentum of the arrow (it can vary a lot if you are firing a giant ballista) and you are not considering the arrow's fluid dynamics: bows arrows won't flies as a parabola!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/C6o5q.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/q8Knw.png" />
  <row Id="31094" PostHistoryTypeId="5" PostId="13904" RevisionGUID="d5bec722-8b69-4566-b10f-8e288bb185bc" CreationDate="2011-06-20T10:48:21.263" UserId="2063" Comment="added 1224 characters in body" Text="I currently struggle with creating the database structure for my RPG.&#xD;&#xA;I got so far:&#xD;&#xA;&#xD;&#xA;tables:&#xD;&#xA;&#xD;&#xA;- area (id)&#xD;&#xA;- monster (id, area.id, monster.id, hp, attack, defense, name)&#xD;&#xA;- item (id, some other values)&#xD;&#xA;- loot (id = monster.id, item = item.id, chance)&#xD;&#xA;- spawn (id = area.id, monster = monster.id, count)&#xD;&#xA;&#xD;&#xA;It is a browser-based game like e.g. Castle Age.&#xD;&#xA;The player can move from area to area.&#xD;&#xA;If a player enters an area the system spawns, based on the area.id and using the spawn table data, new monsters into the monster table.&#xD;&#xA;If a player kills a monster, the system picks the monster.id looks up the items via the the loot table and adds those items to the player's inventory.&#xD;&#xA;&#xD;&#xA;First, is this smart?&#xD;&#xA;Second, I need some kind of &quot;monster_instance&quot;-table and &quot;area_instance&quot;-table,&#xD;&#xA;since each player enters his very own &quot;area&quot; and does damage to his very own &quot;monsters&quot;.&#xD;&#xA;Another approach would be adding the / a player.id to the monster table, so each monster spawned, has it's own &quot;player&quot;, but I still need to assign them to an area, and I think this would overload the monster table if I put in the player.id and the area.id into the monster table.&#xD;&#xA;&#xD;&#xA;What are your thoughts?&#xD;&#xA;&#xD;&#xA;**Temporary Solution**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    monster (id, attackDamage, defense, hp, exp, etc.)&#xD;&#xA;&#xD;&#xA;    monster_instance (id, player.id, area_instance.id, hp, attackDamage, defense, monster.id, etc.)&#xD;&#xA;&#xD;&#xA;    area (id, name, area.id access, restriction)&#xD;&#xA;&#xD;&#xA;    area_instance (id, area.id, last_visited)&#xD;&#xA;&#xD;&#xA;    spawn (id, area.id, monster.id)&#xD;&#xA;&#xD;&#xA;    loot (id, monster.id, chance, amount, ?area.id?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;An example system-flow would be:&#xD;&#xA;Player enters area 1:&#xD;&#xA;&#xD;&#xA;- system creates area_instance of type area.id = 1 and sets player.location to area.id = 1&#xD;&#xA;&#xD;&#xA;If Player wants to battle monsters in the current area:&#xD;&#xA;&#xD;&#xA;- system fetches all spawn entries matching area.id == player.location and creates a new monster_instance for each spawn by fetching the according monster-base data from table monster. If a monster is fetched more than once it may be cached.&#xD;&#xA;&#xD;&#xA;If Player actually attacks a monster:&#xD;&#xA;&#xD;&#xA;- system updates the according monster_instance, if monster dies the instance if removed after creating the loot&#xD;&#xA;&#xD;&#xA;If Player leaves the area:&#xD;&#xA;&#xD;&#xA;- area_instance.last_visited is set to NOW(), if player doesn't return to data area within a certain amount of time area_instance including all its monster_instances are deleted." />
  <row Id="31095" PostHistoryTypeId="2" PostId="13934" RevisionGUID="7d4cd9da-3016-472c-b9d9-869d6ba180ce" CreationDate="2011-06-20T10:54:57.107" UserId="7159" Text="I am working on building a HTML5 RTS game, and my current state is that I am building the Campaign mode of the game, and want to define the gameplay (The Scoring, Unit Behaviors/Attributes).&#xD;&#xA;&#xD;&#xA;I am searching for links/articles/books about how to define the gameplay, for me this:&#xD;&#xA;&#xD;&#xA; - The scoring&#xD;&#xA; - Figuring out levels of control (in any RTS game, there is units, individuals and squads)&#xD;&#xA; - Unit action/attributes/properties&#xD;&#xA; - point timing (how long it will take to play?)&#xD;&#xA; - Achievements&#xD;&#xA; - ..etc&#xD;&#xA;&#xD;&#xA;I want to see how they usually define these areas in RTS games, I expect to see general document discussing this concept that I can use to build the gameplay.&#xD;&#xA;&#xD;&#xA;Any idea? Is my question clear or I need to provide more details?" />
  <row Id="31096" PostHistoryTypeId="1" PostId="13934" RevisionGUID="7d4cd9da-3016-472c-b9d9-869d6ba180ce" CreationDate="2011-06-20T10:54:57.107" UserId="7159" Text="Real-Time Strategy Gameplay" />
  <row Id="31097" PostHistoryTypeId="3" PostId="13934" RevisionGUID="7d4cd9da-3016-472c-b9d9-869d6ba180ce" CreationDate="2011-06-20T10:54:57.107" UserId="7159" Text="&lt;game-design&gt;" />
  <row Id="31098" PostHistoryTypeId="2" PostId="13935" RevisionGUID="68eec7f9-296d-4bb0-9d54-872588719aa3" CreationDate="2011-06-20T11:21:35.100" UserId="7588" Text="A lot of this depends on what __type__ of RTS you want to create.&#xD;&#xA;&#xD;&#xA;For example, if it is more casual, just multiply all scores by 100 and make sure that each game session is short :P.&#xD;&#xA;&#xD;&#xA;RTS games are very mathematical, the balance needs to be perfect because players will find how to exploit any bad balancing, and while this may not be a bad thing, it can break your game. This is why I think it is imperative to read about this stuff.&#xD;&#xA;&#xD;&#xA;There are some interesting articles on RTS design [here](http://www.oxeyegames.com/category/rts-design/).&#xD;&#xA;&#xD;&#xA;I would first though, define the game experience. What you want the player to do in general, what the game will be like, etc. Your question seems more about balancing and macro/micro controlling, which are mechanics used to __implement__ your game, they __shouldn't__ influence your design (but most probably will).&#xD;&#xA;&#xD;&#xA;You need to ask if you want to give advantages between races, unit types, etc. then you need to study the mechanics to balance your game out so in any situation you have the rock-paper-scissors effect." />
  <row Id="31099" PostHistoryTypeId="2" PostId="13936" RevisionGUID="e2465956-0f4f-41aa-bf63-775ef2f5e5a7" CreationDate="2011-06-20T11:32:15.823" UserId="8134" Text="If you want to develop for the Xbox 360, the PC or the Windows Phone 7, then consider learning C# and the XNA game development library.&#xD;&#xA;&#xD;&#xA;C# is far easier to learn and use than C++ and it is more readable. Furthermore, the XNA game development library allows you to write games on all three of the mentioned platforms.&#xD;&#xA;&#xD;&#xA;For more info, see:&#xD;&#xA;&#xD;&#xA;XNA Developer Center&#xD;&#xA;&#xD;&#xA; - XNA Developer Center: http://msdn.microsoft.com/en-us/aa937791&#xD;&#xA; - XNA at Wikipedia: http://en.wikipedia.org/wiki/Microsoft_XNA&#xD;&#xA; - The C# Language: http://msdn.microsoft.com/en-us/vcsharp/aa336809&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31101" PostHistoryTypeId="2" PostId="13937" RevisionGUID="4ec53e6a-ee7f-44f4-bbe3-3105c0ad76ee" CreationDate="2011-06-20T12:24:29.373" UserId="4828" Text="http://blogs.silverlight.net/blogs/msnow/archive/2009/03/02/silverlight-tip-of-the-day-97-creating-sprites-from-3d-models-envygames.aspx" />
  <row Id="31102" PostHistoryTypeId="25" PostId="13924" RevisionGUID="82494943-d26b-426b-ac1a-f8ed90ac6ebb" CreationDate="2011-06-20T12:24:42.540" Comment="http://twitter.com/#!/StackGameDev/status/82785945493045248" />
  <row Id="31103" PostHistoryTypeId="2" PostId="13938" RevisionGUID="9473b848-5ea7-4c58-9862-bc99154ebb4c" CreationDate="2011-06-20T13:32:10.827" UserId="2771" Text="&gt; 1) Am I overthinking this? Should the shield just be a super component?&#xD;&#xA;&#xD;&#xA;Maybe, depends on how reusable you want your code to be and if it makes sense.&#xD;&#xA;&#xD;&#xA;&gt; 2) Should the shield be its own entity that tracks the location of the&#xD;&#xA;&gt; player?&#xD;&#xA;&#xD;&#xA;Not unless this shield is some sort of creature that can walk around independently at some stage.&#xD;&#xA;&#xD;&#xA;&gt; 3) Should the shield be a component that houses other components?&#xD;&#xA;&#xD;&#xA;This sounds a lot like entity, so the answer is no.&#xD;&#xA;&#xD;&#xA;&gt; 4) Should the shield just be a set of components that get added to the&#xD;&#xA;&gt; player?&#xD;&#xA;&#xD;&#xA;It is likely. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; &quot;Damage reduction / filtering&quot;&#xD;&#xA;&#xD;&#xA; - core shield component functionality.&#xD;&#xA;&#xD;&#xA;&gt; &quot;A sprite&quot;&#xD;&#xA;&#xD;&#xA; - is there a reason you cannot add another SpriteComponent to your character entity (in other words more than one component of certain type per entity)?&#xD;&#xA;&#xD;&#xA;&gt; &quot;A collider&quot;&#xD;&#xA;&#xD;&#xA; - are you sure you need another one? This depends on your physics engine. Can you send a message to character entity's ColliderComponent and ask it to change shape?&#xD;&#xA;&#xD;&#xA;&gt; &quot;Boost player maximum health, health regen, projectile deflection etc.&quot;&#xD;&#xA;&#xD;&#xA; - other artifacts might be able to do this (swords, boots, rings, *spells/potions/visiting shrines* etc.) so these should be components.&#xD;&#xA;&#xD;&#xA;PS: I am not a pro, so it's all IMHO.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31104" PostHistoryTypeId="2" PostId="13939" RevisionGUID="d1f52b7b-6fbb-4863-8c15-2b8d5281d9b7" CreationDate="2011-06-20T13:35:04.813" UserId="7710" Text="What are the formulas which represent the horizontal and vertical displacement of an arrow in flight (as well as it angle)? I would like to make sure that I take into consideration the arrow's fluid dynamics and center of gravity." />
  <row Id="31105" PostHistoryTypeId="1" PostId="13939" RevisionGUID="d1f52b7b-6fbb-4863-8c15-2b8d5281d9b7" CreationDate="2011-06-20T13:35:04.813" UserId="7710" Text="Physic of an arrow in flight" />
  <row Id="31106" PostHistoryTypeId="3" PostId="13939" RevisionGUID="d1f52b7b-6fbb-4863-8c15-2b8d5281d9b7" CreationDate="2011-06-20T13:35:04.813" UserId="7710" Text="&lt;2d-physics&gt;&lt;projectile-physics&gt;" />
  <row Id="31107" PostHistoryTypeId="2" PostId="13940" RevisionGUID="d02d6bd0-f45d-4d33-baeb-c9f1124ea4c5" CreationDate="2011-06-20T13:51:21.800" UserId="8137" Text="I think the correct syntax to josh's solution is using &#xD;&#xA;&#xD;&#xA;    texture2D FirstTexture : register(t0);  &#xD;&#xA;    sampler texsmp : register(s0) = sampler_state  &#xD;&#xA;    {  &#xD;&#xA;        Texture   = &lt;FirstTexture&gt;;  &#xD;&#xA;    };  &#xD;&#xA;&#xD;&#xA;Using `register(0);` (without the &quot;s&quot;) will result in a compiler error, see [register (DirectX HLSL)][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd607359%28v=vs.85%29.aspx" />
  <row Id="31108" PostHistoryTypeId="2" PostId="13941" RevisionGUID="73ed3b19-d76a-4363-bdba-a83fd31321b2" CreationDate="2011-06-20T14:04:00.430" UserId="5473" Text="A shield, as a *physical* entity, is no different from any other *physical* entity, e.g. a drone which circles around you (and which in fact, could itself be a type of shield!). So make the shield a separate logical entity (thus allowing it to hold its own components).&#xD;&#xA;&#xD;&#xA;Give your shield a couple of components: a Physical/Spatial component to represent it's collision form, and a DamageAffector component which hold a reference to some entity to whom it will apply increased or reduced damage (eg. your player character) every time the entity holding the DamageAffector takes damage. Thus your player is taking damage &quot;by proxy&quot;.&#xD;&#xA;&#xD;&#xA;Set the shield entity's position to the player's position every tick. (Write a reusable component class that does this: write once, use many times.)&#xD;&#xA;&#xD;&#xA;You will need to create the shield entity, eg. on collecting a powerup. I use a generic concept called an Emitter, which is a type of entity component that spawns new entities (usually through the use of an EntityFactory which it references). Where you decide to locate the emitter is up to you -- I would put it on the powerup and have it trigger as the powerup vanishes." />
  <row Id="31109" PostHistoryTypeId="2" PostId="13942" RevisionGUID="aa726b05-3dbf-4d17-b97c-42626634f3e7" CreationDate="2011-06-20T14:17:58.073" UserId="8139" Text="You want the angle of the arrow at any point in time.&#xD;&#xA;You remembered that in order to compute an angle, there's a tangent.  But here's where your thinking started to go wrong:&#xD;&#xA;&#xD;&#xA;1. What you want is delta y / delta x, because the slope is the rate of change (mentioned in one of the other answers).&#xD;&#xA;Note that x is just the position where you are at any moment in time, not dx.&#xD;&#xA;&#xD;&#xA;Ok, so if you neglect air friction, then the x-velocity of the arrow is a constant.&#xD;&#xA;&#xD;&#xA;First, decompose velocity into x and y components.  You could be shooting at an angle of 45 degrees or 60 degrees.  So you need launchVelocity and an angle, it's not a scalar.&#xD;&#xA;&#xD;&#xA;Second, compute everything as double, not float.  You're not numerically sophisticated enough to know when roundoff error won't kill you, so don't try.  It's not a great time saver in any case.&#xD;&#xA;&#xD;&#xA;Third, don't use Math.pow, it's slow and not as accurate as multiplying for integer powers.  Also you can save a lot of time by using Horner's form (see below)&#xD;&#xA;&#xD;&#xA;    double v0x = launchVelocity * cos(ang);&#xD;&#xA;    double v0y = launchVelocity * sin(ang);&#xD;&#xA;&#xD;&#xA;    double x = (v0x * time);&#xD;&#xA;    // double y = (v0y * time) + (0.5 * g * (float)Math.Pow(time, 2));&#xD;&#xA;    double y = (0.5 * g * time + v0y) * time&#xD;&#xA;&#xD;&#xA;If you are desperate for performance, you can even precompute 0.5*g, but the above code will take you 90% of the way there without doing anything too crazy.  Benchmark doing this 10 million times if you like, it's admittedly not a huge amount of time but percentage-wise it's pretty big -- libraries are very slow in Java&#xD;&#xA;&#xD;&#xA;So, if you wanted the angle at which the arrow should go, what you want is&#xD;&#xA;&#xD;&#xA;    atan(dy/dx)&#xD;&#xA;&#xD;&#xA;And in this case, that would work because dx is a constant.  But in general, dx can be zero, so you usually want to use:&#xD;&#xA;&#xD;&#xA;    atan2(dy, dx)&#xD;&#xA;&#xD;&#xA;which is a function specifically designed for this job.&#xD;&#xA;&#xD;&#xA;But as I said, library functions in Java are hideously slow, and in this case there's a better way of doing it without as mentioned by @FxIII above.&#xD;&#xA;&#xD;&#xA;If the horizontal velocity is always v0x, and the vertical velocity is:&#xD;&#xA;&#xD;&#xA;    double vy = v0y - 0.5 * g * time;&#xD;&#xA;&#xD;&#xA;then your delta is:&#xD;&#xA;    vx,vy&#xD;&#xA;&#xD;&#xA;You don't need the angle.  If you wanted to draw an arrow, use something nominally like:&#xD;&#xA;&#xD;&#xA;   plot( x, y, x+vx, y+vy);&#xD;&#xA;&#xD;&#xA;I don't know what you're drawing, so if you do need the angle to rotate it (like you're using JOGL) then sure, use the angle.&#xD;&#xA;&#xD;&#xA;Don't forget if you are using opengl to turn the angle back into degrees, because ATAN2 returns radians:&#xD;&#xA;&#xD;&#xA;    final double RAD2DEG = 180 / Math.PI;&#xD;&#xA;    double ang = Math.atan2(vy,vx); // don't forget, vy first!!!&#xD;&#xA;    double deg = ang * RAD2DEG;&#xD;&#xA;" />
  <row Id="31110" PostHistoryTypeId="2" PostId="13943" RevisionGUID="eb091c84-6e3e-4c30-a22f-a4fcacc7dd75" CreationDate="2011-06-20T14:29:39.637" UserId="5660" Text="my Tetris loop looks a bit like this:&#xD;&#xA;&#xD;&#xA;    blockDown = false    // a boolean flag, we'll need this in a minute&#xD;&#xA;    timer = 0&#xD;&#xA;    while true:&#xD;&#xA;        get user input, try to rotate and move blocks left/right&#xD;&#xA;        timer += timeSinceLastTick&#xD;&#xA;        if timer &gt; 1 second:&#xD;&#xA;            timer -= 1 second&#xD;&#xA;            step()&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;So the player can try  moving or rotating the block at their own pace while once every second the *step()* function is being called (emphasis lies on **TRY**!! If the block can't move, ignore the input!). It looks roughly like this:&#xD;&#xA;&#xD;&#xA;    function step():&#xD;&#xA;        try to move block down&#xD;&#xA;        if that doesn't succeed:&#xD;&#xA;            if blockDown:&#xD;&#xA;                enter next block&#xD;&#xA;            else:&#xD;&#xA;                blockDown = true&#xD;&#xA;        else:&#xD;&#xA;            blockDown = false&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;Again, the emphasis is on **TRY** to move the block down. If it doesn't work, because it would collide with a block under it, set the *blockDown* variable to true (Now the player has until the next execution of *step()* to rotate the block or move it left and right).&#xD;&#xA;If this means that by the next execution the block can move down again, set *blockDown* to false again.&#xD;&#xA;Last case: The block can't be moved down and the *blockDown* flag is already set to true, the player already had his chance: Leave the block where it is and insert the next one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit**: &#xD;&#xA;Of course I'm not actually using **try** / **catch** statements for this. The *move()* and *rotate()* functions simply return *true* or *false* :-))       " />
  <row Id="31111" PostHistoryTypeId="5" PostId="13942" RevisionGUID="d42f9d99-c1c3-4fd2-ba55-99ee4ef74825" CreationDate="2011-06-20T14:31:35.087" UserId="8139" Comment="added 133 characters in body" Text="You want the angle of the arrow at any point in time.&#xD;&#xA;You remembered that in order to compute an angle, there's a tangent.  But here's where your thinking started to go wrong:&#xD;&#xA;&#xD;&#xA;1. What you want is delta y / delta x, because the slope is the rate of change (mentioned in one of the other answers).&#xD;&#xA;Note that x is just the position where you are at any moment in time, not dx.&#xD;&#xA;&#xD;&#xA;Ok, so if you neglect air friction, then the x-velocity of the arrow is a constant.&#xD;&#xA;&#xD;&#xA;First, decompose velocity into x and y components.  You could be shooting at an angle of 45 degrees or 60 degrees.  So you need launchVelocity and an angle, it's not a scalar.&#xD;&#xA;&#xD;&#xA;Second, compute everything as double, not float.  You're not numerically sophisticated enough to know when roundoff error won't kill you, so don't try.  It's not a great time saver in any case.&#xD;&#xA;&#xD;&#xA;Third, don't use Math.pow, it's slow and not as accurate as multiplying for integer powers.  Also you can save a lot of time by using Horner's form (see below)&#xD;&#xA;&#xD;&#xA;    final double DEG2RAD = Math.PI/180;&#xD;&#xA;    double ang = launchAngle * DEG2RAD;&#xD;&#xA;    double v0x = launchVelocity * cos(ang); // initial velocity in x&#xD;&#xA;    double v0y = launchVelocity * sin(ang); // initial velocity in y&#xD;&#xA;&#xD;&#xA;    double x = (v0x * time);&#xD;&#xA;    // double y = (v0y * time) + (0.5 * g * (float)Math.Pow(time, 2));&#xD;&#xA;    double y = (0.5 * g * time + v0y) * time&#xD;&#xA;&#xD;&#xA;If you are desperate for performance, you can even precompute 0.5*g, but the above code will take you 90% of the way there without doing anything too crazy.  Benchmark doing this 10 million times if you like, it's admittedly not a huge amount of time but percentage-wise it's pretty big -- libraries are very slow in Java&#xD;&#xA;&#xD;&#xA;So, if you wanted the angle at which the arrow should go, what you want is&#xD;&#xA;&#xD;&#xA;    atan(dy/dx)&#xD;&#xA;&#xD;&#xA;And in this case, that would work because dx is a constant.  But in general, dx can be zero, so you usually want to use:&#xD;&#xA;&#xD;&#xA;    atan2(dy, dx)&#xD;&#xA;&#xD;&#xA;which is a function specifically designed for this job.&#xD;&#xA;&#xD;&#xA;But as I said, library functions in Java are hideously slow, and in this case there's a better way of doing it without as alluded to by @FxIII above.&#xD;&#xA;&#xD;&#xA;If the horizontal velocity is always v0x, and the vertical velocity is:&#xD;&#xA;&#xD;&#xA;    double vy = v0y - 0.5 * g * time;&#xD;&#xA;&#xD;&#xA;then your delta is:&#xD;&#xA;    vx,vy&#xD;&#xA;&#xD;&#xA;You don't need the angle.  If you wanted to draw an arrow, use something nominally like:&#xD;&#xA;&#xD;&#xA;   plot( x, y, x+vx, y+vy);&#xD;&#xA;&#xD;&#xA;I don't know what you're drawing, so if you do need the angle to rotate it (like you're using JOGL) then sure, use the angle.&#xD;&#xA;&#xD;&#xA;Don't forget if you are using opengl to turn the angle back into degrees, because ATAN2 returns radians:&#xD;&#xA;&#xD;&#xA;    final double RAD2DEG = 180 / Math.PI;&#xD;&#xA;    double ang = Math.atan2(vy,vx); // don't forget, vy first!!!&#xD;&#xA;    double deg = ang * RAD2DEG;&#xD;&#xA;" />
  <row Id="31112" PostHistoryTypeId="5" PostId="13941" RevisionGUID="d2ace37c-29ef-4792-8622-a33e64cc91b5" CreationDate="2011-06-20T14:39:07.870" UserId="5473" Comment="additions; added 85 characters in body" Text="A shield, as a *physical* entity, is no different from any other *physical* entity, e.g. a drone which circles around you (and which in fact, could itself be a type of shield!). So make the shield a separate logical entity (thus allowing it to hold its own components).&#xD;&#xA;&#xD;&#xA;Give your shield a couple of components: a Physical/Spatial component to represent it's collision form, and a DamageAffector component which hold a reference to some entity to whom it will apply increased or reduced damage (eg. your player character) every time the entity holding the DamageAffector takes damage. Thus your player is taking damage &quot;by proxy&quot;.&#xD;&#xA;&#xD;&#xA;Set the shield entity's position to the player's position every tick. (Write a reusable component class that does this: write once, use many times.)&#xD;&#xA;&#xD;&#xA;You will need to create the shield entity, eg. on collecting a powerup. I use a generic concept called an Emitter, which is a type of entity component that spawns new entities (usually through the use of an EntityFactory which it references). Where you decide to locate the emitter is up to you -- I would put it on the powerup and have it trigger as the powerup vanishes.&#xD;&#xA;&#xD;&#xA;&gt; Should the shield be its own entity&#xD;&#xA;&gt; that tracks the location of the&#xD;&#xA;&gt; player? That might make it hard to&#xD;&#xA;&gt; implement the damage filtering. It&#xD;&#xA;&gt; also kinda blurs the lines between&#xD;&#xA;&gt; attached components and entities.&#xD;&#xA;&#xD;&#xA;There is a fine line between logical subcomponents (Spatial, AI, Weapon slots, Input-processing etc. etc.) and physical subcomponents. You need to decide which side of it you stand on, as this strongly defines what sort of entity system you have. For me, the Physics subcomponent of my Entity handles the physics-hierarchical relationships (such as limbs in a body -- think scenegraph nodes). However the logical aspects (controllers) I've given examples of, are typically what are represented by your entity components, rather than these representing logic for controlling individual physical &quot;fixtures&quot;." />
  <row Id="31113" PostHistoryTypeId="5" PostId="13941" RevisionGUID="e2e9879a-b8ac-4ace-ba2a-f05b1be3e3cb" CreationDate="2011-06-20T14:44:36.713" UserId="5473" Comment="deleted 25 characters in body; deleted 21 characters in body; added 16 characters in body" Text="A shield, as a *physical* entity, is no different from any other *physical* entity, e.g. a drone which circles around you (and which in fact, could itself be a type of shield!). So make the shield a separate logical entity (thus allowing it to hold its own components).&#xD;&#xA;&#xD;&#xA;Give your shield a couple of components: a Physical/Spatial component to represent it's collision form, and a DamageAffector component which hold a reference to some entity to whom it will apply increased or reduced damage (eg. your player character) every time the entity holding the DamageAffector takes damage. Thus your player is taking damage &quot;by proxy&quot;.&#xD;&#xA;&#xD;&#xA;Set the shield entity's position to the player's position every tick. (Write a reusable component class that does this: write once, use many times.)&#xD;&#xA;&#xD;&#xA;You will need to create the shield entity, eg. on collecting a powerup. I use a generic concept called an Emitter, which is a type of entity component that spawns new entities (usually through the use of an EntityFactory which it references). Where you decide to locate the emitter is up to you -- I would put it on the powerup and have it trigger as the powerup vanishes.&#xD;&#xA;&#xD;&#xA;------------&#xD;&#xA;&#xD;&#xA;&gt; Should the shield be its own entity&#xD;&#xA;&gt; that tracks the location of the&#xD;&#xA;&gt; player? That might make it hard to&#xD;&#xA;&gt; implement the damage filtering. It&#xD;&#xA;&gt; also kinda blurs the lines between&#xD;&#xA;&gt; attached components and entities.&#xD;&#xA;&#xD;&#xA;There is a fine line between logical subcomponents (Spatial, AI, Weapon slots, Input-processing etc. etc.) and physical subcomponents. You need to decide which side of it you stand on, as this strongly defines what sort of entity system you have. For me, the Physics subcomponent of my Entity handles the physics-hierarchical relationships (such as limbs in a body -- think scenegraph nodes), while the logic controllers noted above are typically what are represented by your entity components -- rather than these representing individual physical &quot;fixtures&quot;." />
  <row Id="31114" PostHistoryTypeId="5" PostId="13941" RevisionGUID="46399958-4788-441b-9942-a3d2119d11d0" CreationDate="2011-06-20T14:58:27.440" UserId="5473" Comment="deleted 1 characters in body" Text="A shield, as a *physical* entity, is no different from any other *physical* entity, e.g. a drone which circles around you (and which in fact, could itself be a type of shield!). So make the shield a separate logical entity (thus allowing it to hold its own components).&#xD;&#xA;&#xD;&#xA;Give your shield a couple of components: a Physical/Spatial component to represent it's collision form, and a DamageAffector component which holds a reference to some entity to whom it will apply increased or reduced damage (eg. your player character) every time the entity holding the DamageAffector takes damage. Thus your player is taking damage &quot;by proxy&quot;.&#xD;&#xA;&#xD;&#xA;Set the shield entity's position to the player's position every tick. (Write a reusable component class that does this: write once, use many times.)&#xD;&#xA;&#xD;&#xA;You will need to create the shield entity, eg. on collecting a powerup. I use a generic concept called an Emitter, which is a type of entity component that spawns new entities (usually through the use of an EntityFactory which it references). Where you decide to locate the emitter is up to you -- eg. put it on a powerup and have it trigger as the powerup is collected.&#xD;&#xA;&#xD;&#xA;------------&#xD;&#xA;&#xD;&#xA;&gt; Should the shield be its own entity&#xD;&#xA;&gt; that tracks the location of the&#xD;&#xA;&gt; player? That might make it hard to&#xD;&#xA;&gt; implement the damage filtering. It&#xD;&#xA;&gt; also kinda blurs the lines between&#xD;&#xA;&gt; attached components and entities.&#xD;&#xA;&#xD;&#xA;There is a fine line between logical subcomponents (Spatial, AI, Weapon slots, Input-processing etc. etc.) and physical subcomponents. You need to decide which side of it you stand on, as this strongly defines what sort of entity system you have. For me, the Physics subcomponent of my Entity handles the physics-hierarchical relationships (such as limbs in a body -- think scenegraph nodes), while the logic controllers noted above are typically what are represented by your entity components -- rather than these representing individual physical &quot;fixtures&quot;." />
  <row Id="31115" PostHistoryTypeId="2" PostId="13944" RevisionGUID="28b2c1dd-ebc7-4c9c-92e3-1db7e7dd6b29" CreationDate="2011-06-20T15:22:30.740" UserId="8099" Text="While this isn't Box2D, there is a port of JigLib (3D Physics) to JS: https://github.com/supereggbert/JigLibJS. I haven't used it, but it was ported to be used in the GLGE WebGL library." />
  <row Id="31116" PostHistoryTypeId="25" PostId="13934" RevisionGUID="4fcee12e-e102-4c30-9c8a-bba7c5abbec8" CreationDate="2011-06-20T15:24:43.253" Comment="http://twitter.com/#!/StackGameDev/status/82831247981809664" />
  <row Id="31117" PostHistoryTypeId="4" PostId="12203" RevisionGUID="5ae9b2da-429a-435a-baa2-eff4f4eacae4" CreationDate="2011-06-20T15:26:21.193" UserId="1430" Comment="edited title; edited title" Text="Other games that employ mechanics like the game &quot;Diplomacy&quot;" />
  <row Id="31118" PostHistoryTypeId="5" PostId="13927" RevisionGUID="86ecd4ca-761e-422a-b92f-8c14f0050fa9" CreationDate="2011-06-20T15:29:20.067" UserId="1258" Comment="added 503 characters in body" Text="&gt; Should the shield be its own entity&#xD;&#xA;&gt; that tracks the location of the&#xD;&#xA;&gt; player?  That might make it hard to&#xD;&#xA;&gt; implement the damage filtering. It&#xD;&#xA;&gt; also kinda blurs the lines between&#xD;&#xA;&gt; attached components and entities.&#xD;&#xA;&#xD;&#xA;Edit: I think there's not enough &quot;autonomous behaviour&quot; for a separated entity. In this specific case, a shield follows the target, works for the target and does not outlive the target. While I tend to agree that there's nothing wrong with the concept of a &quot;shield object&quot;, in this case we're dealing with behaviour, which fits just fine in a component. But I'm also an advocate of purely logical entities (as opposed to full-blown entity systems in which you can find Transform and Rendering components).&#xD;&#xA;&#xD;&#xA;&gt; Should the shield be a component that&#xD;&#xA;&gt; houses other components?  I've never&#xD;&#xA;&gt; seen or heard of anything like this,&#xD;&#xA;&gt; but maybe it's common and I'm just not&#xD;&#xA;&gt; deep enough yet.&#xD;&#xA;&#xD;&#xA;See it in a different perspective; adding a component adds other components as well, and upon removal, the additional components are gone too.&#xD;&#xA;&#xD;&#xA;&gt; Should the shield just be a set of&#xD;&#xA;&gt; components that get added to the&#xD;&#xA;&gt; player?  Possibly with an extra&#xD;&#xA;&gt; component to manage the others, e.g.&#xD;&#xA;&gt; so they can all be removed as a group.&#xD;&#xA;&gt; (accidentally leave behind the damage&#xD;&#xA;&gt; reduction component, now that would be&#xD;&#xA;&gt; fun).&#xD;&#xA;&#xD;&#xA;This could be a solution, it would promote reuse, however it is also more error prone (for the issue you mentioned, for instance). It's not necessarily bad. You might find out new spell combinations with trial and error :)&#xD;&#xA; &#xD;&#xA;&gt; Something else that's obvious to&#xD;&#xA;&gt; someone with more component&#xD;&#xA;&gt; experience?&#xD;&#xA;&#xD;&#xA;I'm going to elaborate a bit.&#xD;&#xA;&#xD;&#xA;I believe you noticed how some components should take priority no matter when they've been added to an entity (this would answer your other question as well).&#xD;&#xA;&#xD;&#xA;I'm also going to assume we're using message-based communication (for the sake of discussion, it's just an abstraction over a method call for the moment).&#xD;&#xA;&#xD;&#xA;Whenever a shield component is &quot;installed&quot;, shield component message handlers are chained with a specific (higher) order.&#xD;&#xA;&#xD;&#xA;    Handler Stage    Handler Level     Handler Priority&#xD;&#xA;    In               Pre               System High&#xD;&#xA;    Out              Invariant         High&#xD;&#xA;                     Post              AboveNormal&#xD;&#xA;                                       Normal&#xD;&#xA;                                       BelowNormal&#xD;&#xA;                                       Low&#xD;&#xA;                                       System Low&#xD;&#xA;&#xD;&#xA;    In - incoming messages&#xD;&#xA;    Out - outgoing messages&#xD;&#xA;    Index = ((int)Level | (int)Priority)&#xD;&#xA;&#xD;&#xA;The &quot;stats&quot; component installs a &quot;damage&quot; message handler at the In/Invariant/Normal index.&#xD;&#xA;    Every time a &quot;damage&quot; message is received, decrease the HP by its &quot;value&quot; amount.&#xD;&#xA;&#xD;&#xA;Fairly standard behaviour (put in some natural damage resistance and / or racial traits, whatever).&#xD;&#xA;&#xD;&#xA;The shield component installs a &quot;damage&quot; message handler at the In/Pre/High index.&#xD;&#xA;&#xD;&#xA;    Every time a &quot;damage&quot; message is received, deplete the shield energy and substract&#xD;&#xA;    the shield energy from the damage value, so that the damage down the message&#xD;&#xA;    handler pipeline is reduced.&#xD;&#xA;&#xD;&#xA;    damage -&gt; stats&#xD;&#xA;        stats&#xD;&#xA;            stats.hp -= damage.value&#xD;&#xA;&#xD;&#xA;    damage -&gt; shield -&gt; stats&#xD;&#xA;        shield&#xD;&#xA;            if(shield.energy) {&#xD;&#xA;                remove_me();&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;            damage.value -= shield.energyquantum&#xD;&#xA;            shield.energy -= shield.energyquantum;&#xD;&#xA;&#xD;&#xA;         stats&#xD;&#xA;            stats.hp -= damage.value&#xD;&#xA;&#xD;&#xA;You can see this is pretty flexible, albeit it would require careful planning when designing component interaction, as you're going to have to determine in which part of the message handling pipeline component message event handlers are installed.&#xD;&#xA;&#xD;&#xA;Makes sense? Let me know if I can add more detail.&#xD;&#xA;&#xD;&#xA;Edit: regarding multiple component instances (two armour components). You can either keep track of the total instance count in just one entity instance (this kills per-component state, however) and just keep adding message event handlers, or make sure your component containers allow for duplicate component types in advance." />
  <row Id="31119" PostHistoryTypeId="5" PostId="13802" RevisionGUID="c5ebfbcd-b531-4828-8852-13b7bbbb8372" CreationDate="2011-06-20T15:35:59.223" UserId="1430" Comment="syntax fix" Text="You're calling [SetTexture][1] in your main program (effectively). This binds the texture to a sampler index, not a named sampler variable in shader code... you're not assigning `Tex2D` in the shader anything. So when you sample it, you get black (all-zero) and multiplying all-zero the way you do will of course still yield all-zero.&#xD;&#xA;&#xD;&#xA;You could confirm this by simply outputting a flat color from the shader instead -- don't multiply by the sampled color -- and you should see something.&#xD;&#xA;&#xD;&#xA;To fix this, you could use the Effect interface and call SetTexture on a compiled effect, or you could indicate that your sampler should be bound to register 0 (which is what you're setting the texture to):&#xD;&#xA;&#xD;&#xA;    texture2D FirstTexture : register(t0);  &#xD;&#xA;    sampler texsmp : register(s0) = sampler_state  &#xD;&#xA;    {  &#xD;&#xA;        Texture   = &lt;FirstTexture&gt;;  &#xD;&#xA;    }; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb174461%28v=VS.85%29.aspx" />
  <row Id="31120" PostHistoryTypeId="5" PostId="13928" RevisionGUID="a6dd44a7-7fcc-446b-9eff-7dd635e1cc2c" CreationDate="2011-06-20T15:38:20.360" UserId="1430" Comment="edited body" Text="There's a neat little two-player board game called &quot;[2 De Mayo][1]&quot; which has some of these features.&#xD;&#xA;&#xD;&#xA;- Simultaneous orders (both French and Spanish side write down orders and reveal at the same time)&#xD;&#xA;- Simple rules for resolving conflicts.&#xD;&#xA;&#xD;&#xA;It does not, however, have supporting actions. You can only move (attack an area) and not stay and support.&#xD;&#xA;&#xD;&#xA;Apart from that, it's an asymmetrical game in that the French army (which is much stronger has only few troops) and needs to hunt down a highly mobile Spanish rebel mob comprised of many small units. Check it out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://boardgamegeek.com/boardgame/36522/2-de-mayo" />
  <row Id="31121" PostHistoryTypeId="5" PostId="13913" RevisionGUID="4c5b19fb-ae15-43f2-b6e9-ad15471fe6cb" CreationDate="2011-06-20T15:40:53.760" UserId="1430" Comment="deleted 5 characters in body; edited title" Text="The A* algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly) it produces a stack overflow error. The A* algorithm would iterate the enemy and find its path and pass the list to the enemy's path.&#xD;&#xA;&#xD;&#xA;I added debug logs and the list that I'm getting it looks like it would arrive from start cell to goal cell. &#xD;&#xA;&#xD;&#xA;Here's the log - &#xD;&#xA;&#xD;&#xA;    06-19 19:26:41.982: DEBUG/findEnemyPath, enemy X:Y(4281): X2.8256836:Y3.5&#xD;&#xA;    06-19 19:26:41.990: DEBUG/findEnemyPath, grid X:Y(4281): X3:Y2&#xD;&#xA;    06-19 19:26:41.990: DEBUG/START CELL ID:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/GOAL CELL ID:(4281): 47&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 38(4281):  passThrough:0.0&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 39(4281):  passThrough:8.875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 40(4281):  passThrough:7.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 52(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 53(4281):  passThrough:7.96875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 53&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 28(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 28&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 65(4281):  passThrough:8.984375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 66(4281):  passThrough:7.9921875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 66&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 78(4281):  passThrough:8.99609375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 78&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 79(4281):  passThrough:7.998046875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 79&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 80(4281):  passThrough:6.9990234375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 81(4281):  passThrough:5.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 82(4281):  passThrough:4.999755859375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 83(4281):  passThrough:3.9998779296875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 83&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 71(4281):  passThrough:2.99993896484375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 71&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 59(4281):  passThrough:1.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 47(4281):  passThrough:0.99951171875&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, the goal cell would be iterating its parent till start cell to break off the loop. &#xD;&#xA;&#xD;&#xA;    private void populateBestList(Cell cell, List&lt;Cell&gt; bestList) {&#xD;&#xA;    		bestList.add(cell);&#xD;&#xA;    		&#xD;&#xA;    		if (cell.parent.start == false) {&#xD;&#xA;    			Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;    			Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;    			populateBestList(cell.parent, bestList);&#xD;&#xA;    		}&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The log with error above would show like this -&#xD;&#xA;&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 47&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;&#xD;&#xA;71 and 59 would switch over and goes on.&#xD;&#xA;&#xD;&#xA;I thought the grid is the issue due to the fact that enemies are using the single grid so I make the parent, start, and goal clear before starting the A* algorithm for an enemy.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;    			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;    				grid[i][j].parent = null;&#xD;&#xA;    				grid[i][j].start = false;&#xD;&#xA;    				grid[i][j].goal = false;&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;That didn't work. I thought it might be something related to this code, but not sure if I'm on right track -&#xD;&#xA;&#xD;&#xA;    neighbor.parent = best;&#xD;&#xA;    openList.remove(neighbor);&#xD;&#xA;    closedList.remove(neighbor);&#xD;&#xA;    openList.add(0, neighbor);&#xD;&#xA;&#xD;&#xA;Here's the code of the A* algorithm -&#xD;&#xA;&#xD;&#xA;    private List&lt;Cell&gt; findEnemyPath(Enemy enemy) {&#xD;&#xA;		&#xD;&#xA;		for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;				grid[i][j].parent = null;&#xD;&#xA;				grid[i][j].start = false;&#xD;&#xA;				grid[i][j].goal = false;&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		List&lt;Cell&gt; openList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; closedList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; bestList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		&#xD;&#xA;		int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;		int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;		&#xD;&#xA;		width = (width &lt; 0) ? 0 : width; &#xD;&#xA;		height = (height &lt; 0) ? 0 : height; &#xD;&#xA;		&#xD;&#xA;		Log.d(&quot;findEnemyPath, enemy X:Y&quot;, &quot;X&quot;+enemy.position.x+&quot;:&quot;+&quot;Y&quot;+enemy.position.y);&#xD;&#xA;		Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+height+&quot;:&quot;+&quot;Y&quot;+width);&#xD;&#xA;		Cell start = grid[height][width];&#xD;&#xA;		Cell goal = grid[ENEMY_GOAL_HEIGHT][ENEMY_GOAL_WIDTH];&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if(start.id != goal.id) {&#xD;&#xA;&#xD;&#xA;			Log.d(&quot;START CELL ID: &quot;, &quot;&quot;+start.id);&#xD;&#xA;			Log.d(&quot;GOAL CELL ID: &quot;, &quot;&quot;+goal.id);&#xD;&#xA;			//Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+start.position.x+&quot;:&quot;+&quot;Y&quot;+start.position.y);&#xD;&#xA;			start.start = true;&#xD;&#xA;			goal.goal = true;&#xD;&#xA;			openList.add(start);&#xD;&#xA;			&#xD;&#xA;			while(openList.size() &gt; 0) {&#xD;&#xA;				Cell best = findBestPassThrough(openList, goal);&#xD;&#xA;				//Log.d(&quot;ID:&quot;, &quot;&quot;+best.id);&#xD;&#xA;				openList.remove(best);&#xD;&#xA;				closedList.add(best);&#xD;&#xA;				if (best.goal) {&#xD;&#xA;				    System.out.println(&quot;Found Goal&quot;);&#xD;&#xA;				    System.out.println(bestList.size());&#xD;&#xA;				    populateBestList(goal, bestList);&#xD;&#xA;				    /*&#xD;&#xA;				    for(Cell cell : bestList) {&#xD;&#xA;						Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;						Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;				    }&#xD;&#xA;				    */&#xD;&#xA;				    Collections.reverse(bestList);&#xD;&#xA;			        Cell exit = new Cell(13.5f, 3.5f, 1, 1);&#xD;&#xA;			        exit.isExit = true;&#xD;&#xA;			        bestList.add(exit);&#xD;&#xA;			    	//Log.d(&quot;PathList&quot;, &quot;Enemy ID : &quot; + enemy.id);&#xD;&#xA;				    return bestList;&#xD;&#xA;				} &#xD;&#xA;				else {&#xD;&#xA;				    List&lt;Cell&gt; neighbors = getNeighbors(best);&#xD;&#xA;				    for (Cell neighbor : neighbors) {&#xD;&#xA;					    if(neighbor.isTower) {&#xD;&#xA;				    		continue;&#xD;&#xA;				    	}&#xD;&#xA;					    if (openList.contains(neighbor)) {&#xD;&#xA;					        Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;					        tmpCell.parent = best;&#xD;&#xA;					        if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;					        	continue;&#xD;&#xA;					        }&#xD;&#xA;					    }&#xD;&#xA;					    if (closedList.contains(neighbor)) {&#xD;&#xA;							Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;							tmpCell.parent = best;&#xD;&#xA;							if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;								continue;&#xD;&#xA;					    	}&#xD;&#xA;						}&#xD;&#xA;					    Log.d(&quot;Neighbor's Parent: &quot;, &quot;&quot;+best.id);&#xD;&#xA;					    neighbor.parent = best;&#xD;&#xA;						openList.remove(neighbor);&#xD;&#xA;						closedList.remove(neighbor);&#xD;&#xA;						openList.add(0, neighbor);&#xD;&#xA;				    }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		Log.d(&quot;Cannot find a path&quot;, &quot;&quot;);&#xD;&#xA;		return null;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31122" PostHistoryTypeId="4" PostId="13913" RevisionGUID="4c5b19fb-ae15-43f2-b6e9-ad15471fe6cb" CreationDate="2011-06-20T15:40:53.760" UserId="1430" Comment="deleted 5 characters in body; edited title" Text="Infinite loop during A* algorithm" />
  <row Id="31124" PostHistoryTypeId="6" PostId="13867" RevisionGUID="2a3b0447-2b33-47f1-9854-33f96ecad220" CreationDate="2011-06-20T15:56:40.350" UserId="1430" Comment="edited tags" Text="&lt;c#&gt;&lt;windows-forms&gt;" />
  <row Id="31125" PostHistoryTypeId="2" PostId="13945" RevisionGUID="919684e5-aefb-47dd-89f2-4e854eb1e9c0" CreationDate="2011-06-20T18:12:37.450" UserId="7328" Text="the simplest form you can simulate it is to use two weights connected to each other with a spring, resembeling head and tail of the arrow. and you have to just give the following object a little more thrust that the heading one to cause the arrow move like a real one, it just needs some tuning before it get's well, but it'll  create a realistic movement. you can also make some diffrences for other parameters of head and tail weights, for example tail object has more air friction than the head one." />
  <row Id="31126" PostHistoryTypeId="25" PostId="13919" RevisionGUID="6a7ace38-eaad-41f5-b779-dc391d790127" CreationDate="2011-06-20T18:24:44.770" Comment="http://twitter.com/#!/StackGameDev/status/82876551590445056" />
  <row Id="31127" PostHistoryTypeId="2" PostId="13946" RevisionGUID="26bd040e-1218-452a-943f-75db2b461fb9" CreationDate="2011-06-20T18:26:55.767" UserId="6186" Text="This may seem like a stupid question to ask but I really can't find the answer to it. &#xD;&#xA;&#xD;&#xA;(xna 4.0 c#)I have two classes in my game, a Main Menu and the main playing screen. How can i swap through classes? E.g I click on &quot;New Game&quot; in the menu class and it changes it too the Game class, also a transition animation explanation would be nice;)&#xD;&#xA;&#xD;&#xA;Thanks for bearing with my nooby questions xD&#xD;&#xA;&#xD;&#xA;-Juan" />
  <row Id="31128" PostHistoryTypeId="1" PostId="13946" RevisionGUID="26bd040e-1218-452a-943f-75db2b461fb9" CreationDate="2011-06-20T18:26:55.767" UserId="6186" Text="How do you change level?" />
  <row Id="31129" PostHistoryTypeId="3" PostId="13946" RevisionGUID="26bd040e-1218-452a-943f-75db2b461fb9" CreationDate="2011-06-20T18:26:55.767" UserId="6186" Text="&lt;xna&gt;&lt;2d&gt;" />
  <row Id="31130" PostHistoryTypeId="2" PostId="13947" RevisionGUID="11783597-2bce-4942-a8f9-b19b1a8601bc" CreationDate="2011-06-20T18:27:41.860" UserId="7661" Text="Total war games all really good for this and you could also try the Civilization games I think Civ 5 was released recently." />
  <row Id="31131" PostHistoryTypeId="16" PostId="13947" RevisionGUID="181fd87a-787c-402f-b6c3-f34e98a5b8d8" CreationDate="2011-06-20T18:27:41.860" UserId="7661" />
  <row Id="31132" PostHistoryTypeId="5" PostId="13946" RevisionGUID="4ae71e17-947a-4feb-b045-d6fe9275b9e8" CreationDate="2011-06-20T18:28:21.553" UserId="51" Comment="deleted 163 characters in body; edited tags; edited title" Text="I have two classes in my game, a Main Menu and the main playing screen. How can I swap through classes? E.g I click on &quot;New Game&quot; in the menu class and it changes it too the Game class.  A transition animation explanation would be nice.&#xD;&#xA;" />
  <row Id="31133" PostHistoryTypeId="4" PostId="13946" RevisionGUID="4ae71e17-947a-4feb-b045-d6fe9275b9e8" CreationDate="2011-06-20T18:28:21.553" UserId="51" Comment="deleted 163 characters in body; edited tags; edited title" Text="How do you transition to playing in XNA?" />
  <row Id="31134" PostHistoryTypeId="6" PostId="13946" RevisionGUID="4ae71e17-947a-4feb-b045-d6fe9275b9e8" CreationDate="2011-06-20T18:28:21.553" UserId="51" Comment="deleted 163 characters in body; edited tags; edited title" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="31135" PostHistoryTypeId="2" PostId="13948" RevisionGUID="32e60fd2-e7b3-4fac-873b-28596929a9c6" CreationDate="2011-06-20T18:40:17.657" UserId="7946" Text="You need some kind of gamestate-management system in place. &#xD;&#xA;&#xD;&#xA;I could write a long answer explaining this, but people who are a lot more experienced with XNA and game programming than me have already done that, so I shall point you towards them. &#xD;&#xA;&#xD;&#xA;Personally I've found this example to be excellent:&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/game_state_management&#xD;&#xA;&#xD;&#xA;It shows a gamestate-management system with the ability to easily add as many gamestates as you like, as well as defining transitions in and out of the gamestate. &#xD;&#xA;&#xD;&#xA;You should give it a read!" />
  <row Id="31136" PostHistoryTypeId="2" PostId="13949" RevisionGUID="1ce6e055-b064-4b0f-80ae-8131de1047c9" CreationDate="2011-06-20T18:40:30.630" UserId="1430" Text="You probably want to look into state machines. [Here's a popular App Hub tutorial][1] on game state management, and [here's another random Google result][2] for XNA state machine information (it's not really a topic that needs to be specific to XNA, so you can get broader search results in Google if you exclude the &quot;XNA&quot; bit, if you want to research the topic more yourself).&#xD;&#xA;&#xD;&#xA;Once you have the basic implementation of such a system, you can expand it by adding (for example) animations that play as you transition in or out of states.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management&#xD;&#xA;  [2]: http://evelands.net/evan/xna03.php" />
  <row Id="31137" PostHistoryTypeId="2" PostId="13950" RevisionGUID="5cf1ad73-5a8e-4cb7-aa9d-98acd5cc8cfb" CreationDate="2011-06-20T18:41:57.767" UserId="2332" Text="[Game State Management][1] is what you're after. Once you have the states sorted out, when they transition you can create whatever effect you desire (fade out, in, black out, white out, etc) and that's what shaders are for. But that's probably a slightly separate question.&#xD;&#xA;&#xD;&#xA;Another article that could be interesting is [this][2] which describes an actual application of it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management&#xD;&#xA;  [2]: http://channel9.msdn.com/coding4fun/blog/Mixing-the-Game-State-Management-and-Platformer-XNA-Recipes" />
  <row Id="31138" PostHistoryTypeId="2" PostId="13951" RevisionGUID="92ba71fb-32f4-40eb-9fe3-1990f6ed5f1e" CreationDate="2011-06-20T18:54:14.727" UserId="8139" Text="I actually answered this in your other question, but since this one is here, this is the place to do it cleanly on its own.&#xD;&#xA;&#xD;&#xA;What you are asking is the trajectory problem.  First, consider it neglecting air friction.&#xD;&#xA;&#xD;&#xA;For an initial velocity v0 and angle a&#xD;&#xA;&#xD;&#xA;    v0x = v0 * cos(a)&#xD;&#xA;    v0y = c0 * sin(a)&#xD;&#xA;&#xD;&#xA;for velocities as a function of time:&#xD;&#xA;&#xD;&#xA;    vx = v0x&#xD;&#xA;    vy = v0y - g * t&#xD;&#xA;&#xD;&#xA;You need a reality check if you think you are going to handle instability, tumbling, or anything like that.  You don't have the math for it, and it will take years to get it right, as well as massive amounts of CPU you don't want to devote in a game.  You can try to fake that if you like. But if you want somewhat realistic slowing down of the projectile, that's relatively easy.&#xD;&#xA;&#xD;&#xA;    v = sqrt(vx*vx+vy*vy)&#xD;&#xA;    a = c * v*v*v&#xD;&#xA;&#xD;&#xA;The coefficient c is a small number, and friction will tend to slow down the projectile so it always operates in the opposite sign of the moving projectile.  You need the direction of the projectile, which is the vector:&#xD;&#xA;&#xD;&#xA;    (vx, vy)&#xD;&#xA;&#xD;&#xA;but this is scaled according to the velocity.  If you want to apply a negative acceleration, first compute the magnitude (already computed as v above)&#xD;&#xA;&#xD;&#xA;Now you can generate a vector 1 unit long in the direction of the projectile:&#xD;&#xA;&#xD;&#xA;    (vx/v, vy/v)&#xD;&#xA;&#xD;&#xA;to apply the acceleration in reverse:&#xD;&#xA;&#xD;&#xA;    -a * vx/v, -a * vy/v&#xD;&#xA;&#xD;&#xA;This will have the effect of slowing down the projectile and making it fall short of what it would do with no air friction.  the higher your constant c, the shorter the trajectory.&#xD;&#xA;&#xD;&#xA;If you have wind, then just add to vx in your 2d game, in either + or - direction.&#xD;&#xA;&#xD;&#xA;If you really want to show the projectile tumbling once it moves slowly enough, ask another question, but that will be a discussion of how to fake it, not how to do the real physics.  &#xD;&#xA;&#xD;&#xA;If you want to see just what you are getting yourself in for with simulating the drag on a projectile, this should be a survey paper that will show you the different approaches out there. http://raphael.mit.edu/peraire/SequeiraWillisPeraire.pdf&#xD;&#xA;" />
  <row Id="31139" PostHistoryTypeId="2" PostId="13952" RevisionGUID="960d9981-0e52-4f8e-a1f2-08cfdb7d1bd2" CreationDate="2011-06-20T19:47:06.353" UserId="8147" Text="Simple answer: A LOT!&#xD;&#xA;&#xD;&#xA;Detailed answer:&#xD;&#xA;&#xD;&#xA;Arithmetic, Elementary &amp; Linear Algebra, in most cases Trig, if you're making a 3D game, DEFINITELY Calculus, and Physics(Physics requires Calculus)!" />
  <row Id="31140" PostHistoryTypeId="16" PostId="13952" RevisionGUID="fb1087e6-fdb6-453c-af98-068f09a3afbe" CreationDate="2011-06-20T19:47:06.353" UserId="8147" />
  <row Id="31141" PostHistoryTypeId="2" PostId="13953" RevisionGUID="1d539835-b80c-4d91-a8a8-795b47f0c2a3" CreationDate="2011-06-20T19:54:00.203" UserId="4443" Text="Your thoughts are in the right place but I think you are trying to take the component system to a level of detail that it does not need. I would say make a component called Health when all you need is straight up health. But if you need a health component that also has armor in it, then make it a CHealthAndArmor component that still fits the API of Health in general so it can be used like any other, but then provide the manner of also changing the armor levels if needed.. If its completely a load time value then there is no need, that's just the internal workings of that particular health component.&#xD;&#xA;&#xD;&#xA;Honestly the concerns you are having (from this and your other post) are how fine a level of detail you break components down into. If you ever find yourself inheriting or encapsulating a component within another component, you should reconsider what you are doing. You generally are trying to avoid inheritance like this in component based architectures.&#xD;&#xA;&#xD;&#xA;Hope this helps" />
  <row Id="31142" PostHistoryTypeId="2" PostId="13954" RevisionGUID="1ee3dfc5-8404-479e-b284-6abb38401b4b" CreationDate="2011-06-20T19:55:39.103" UserId="7197" Text="See the diagram first: http://i.stack.imgur.com/yZqdI.png&#xD;&#xA;&#xD;&#xA;When my AABB physics engine resolves an intersection, it does so by finding the axis where the penetration is smaller, then &quot;push out&quot; the entity on that axis.&#xD;&#xA;&#xD;&#xA;Considering the &quot;jumping moving left&quot; example:&#xD;&#xA;&#xD;&#xA; - If velocityX is bigger than velocityY, AABB pushes the entity out on the Y axis, effectively stopping the jump (result: the player stops in mid-air).&#xD;&#xA; - If velocityX is smaller than velocitY (not shown in diagram), the program works as intended, because AABB pushes the entity out on the X axis.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Source code:&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public void Update()&#xD;&#xA;        {&#xD;&#xA;            Position += Velocity;&#xD;&#xA;            Velocity += World.Gravity;&#xD;&#xA;            &#xD;&#xA;            List&lt;SSSPBody&gt; toCheck = World.SpatialHash.GetNearbyItems(this);&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; toCheck.Count; i++)&#xD;&#xA;            {&#xD;&#xA;                SSSPBody body = toCheck[i];&#xD;&#xA;                body.Test.Color = Color.White;&#xD;&#xA;&#xD;&#xA;                if (body != this &amp;&amp; body.Static)&#xD;&#xA;                {                   &#xD;&#xA;                    float left = (body.CornerMin.X - CornerMax.X);&#xD;&#xA;                    float right = (body.CornerMax.X - CornerMin.X);&#xD;&#xA;                    float top = (body.CornerMin.Y - CornerMax.Y);&#xD;&#xA;                    float bottom = (body.CornerMax.Y - CornerMin.Y);&#xD;&#xA;&#xD;&#xA;                    if (SSSPUtils.AABBIsOverlapping(this, body))&#xD;&#xA;                    {&#xD;&#xA;                        body.Test.Color = Color.Yellow;&#xD;&#xA;&#xD;&#xA;                        Vector2 overlapVector = SSSPUtils.AABBGetOverlapVector(left, right, top, bottom);&#xD;&#xA;&#xD;&#xA;                        Position += overlapVector;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    if (SSSPUtils.AABBIsCollidingTop(this, body))&#xD;&#xA;                    {                      &#xD;&#xA;                        if ((Position.X &gt;= body.CornerMin.X &amp;&amp; Position.X &lt;= body.CornerMax.X) &amp;&amp;&#xD;&#xA;                            (Position.Y + Height/2f == body.Position.Y - body.Height/2f))&#xD;&#xA;                        {&#xD;&#xA;                            body.Test.Color = Color.Red;&#xD;&#xA;                            Velocity = new Vector2(Velocity.X, 0);&#xD;&#xA;                            &#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }               &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public static bool AABBIsOverlapping(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;        {&#xD;&#xA;            if(mBody1.CornerMax.X &lt;= mBody2.CornerMin.X || mBody1.CornerMin.X &gt;= mBody2.CornerMax.X)&#xD;&#xA;                return false;&#xD;&#xA;            if (mBody1.CornerMax.Y &lt;= mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt;= mBody2.CornerMax.Y)&#xD;&#xA;                return false;&#xD;&#xA;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;        public static bool AABBIsColliding(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;        {&#xD;&#xA;            if (mBody1.CornerMax.X &lt; mBody2.CornerMin.X || mBody1.CornerMin.X &gt; mBody2.CornerMax.X)&#xD;&#xA;                return false;&#xD;&#xA;            if (mBody1.CornerMax.Y &lt; mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt; mBody2.CornerMax.Y)&#xD;&#xA;                return false;&#xD;&#xA;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;        public static bool AABBIsCollidingTop(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;        {&#xD;&#xA;            if (mBody1.CornerMax.X &lt; mBody2.CornerMin.X || mBody1.CornerMin.X &gt; mBody2.CornerMax.X)&#xD;&#xA;                return false;&#xD;&#xA;            if (mBody1.CornerMax.Y &lt; mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt; mBody2.CornerMax.Y)&#xD;&#xA;                return false;&#xD;&#xA;&#xD;&#xA;            if(mBody1.CornerMax.Y == mBody2.CornerMin.Y)&#xD;&#xA;                return true;&#xD;&#xA;&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;        public static Vector2 AABBGetOverlapVector(float mLeft, float mRight, float mTop, float mBottom)&#xD;&#xA;        {&#xD;&#xA;            Vector2 result = new Vector2(0, 0);&#xD;&#xA;&#xD;&#xA;            if ((mLeft &gt; 0 || mRight &lt; 0) || (mTop &gt; 0 || mBottom &lt; 0))&#xD;&#xA;                return result;&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(mLeft) &lt; mRight)&#xD;&#xA;                result.X = mLeft;&#xD;&#xA;            else&#xD;&#xA;                result.X = mRight;&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(mTop) &lt; mBottom)&#xD;&#xA;                result.Y = mTop;&#xD;&#xA;            else&#xD;&#xA;                result.Y = mBottom;&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(result.X) &lt; Math.Abs(result.Y))&#xD;&#xA;                result.Y = 0;&#xD;&#xA;            else&#xD;&#xA;                result.X = 0;&#xD;&#xA;&#xD;&#xA;            return result;&#xD;&#xA;        }" />
  <row Id="31143" PostHistoryTypeId="1" PostId="13954" RevisionGUID="1ee3dfc5-8404-479e-b284-6abb38401b4b" CreationDate="2011-06-20T19:55:39.103" UserId="7197" Text="Platform jumping problems with AABB collisions" />
  <row Id="31144" PostHistoryTypeId="3" PostId="13954" RevisionGUID="1ee3dfc5-8404-479e-b284-6abb38401b4b" CreationDate="2011-06-20T19:55:39.103" UserId="7197" Text="&lt;c#&gt;&lt;collision-detection&gt;&lt;platform&gt;" />
  <row Id="31145" PostHistoryTypeId="2" PostId="13955" RevisionGUID="7a270222-f8c9-4744-bb42-2d9e55039928" CreationDate="2011-06-20T20:38:49.160" UserId="8148" Text="How can i detect clicks on a texture (will be a button in my game) that has a form of a triangle or circle. I know only the rectangle solution where u can use the positions + the width/height but this dont work for that because clicks will be detected at the transparent pixels.&#xD;&#xA;&#xD;&#xA;I heard of pixel-perfect collision is it the right way for this?&#xD;&#xA;&#xD;&#xA;It would be great if someone can give me a example for such a solution or other.&#xD;&#xA;&#xD;&#xA;thanks &amp; best regards,&#xD;&#xA;chris&#xD;&#xA;" />
  <row Id="31146" PostHistoryTypeId="1" PostId="13955" RevisionGUID="7a270222-f8c9-4744-bb42-2d9e55039928" CreationDate="2011-06-20T20:38:49.160" UserId="8148" Text="XNA - Detect click on triangle/circle form of a texture" />
  <row Id="31147" PostHistoryTypeId="3" PostId="13955" RevisionGUID="7a270222-f8c9-4744-bb42-2d9e55039928" CreationDate="2011-06-20T20:38:49.160" UserId="8148" Text="&lt;xna&gt;&lt;c#&gt;&lt;collision-detection&gt;" />
  <row Id="31148" PostHistoryTypeId="2" PostId="13956" RevisionGUID="131c3272-6ffa-4e24-b46e-351b425ecbfb" CreationDate="2011-06-20T20:49:52.113" UserId="98" Text="By graphic adventure, I mean point &amp; click LucasArts-type games.  &#xD;&#xA;Those games have a mostly linear structure in nature, and usually don't offer as many variants as other games types like action, rpg, strategy, which makes this genre difficult to implement a multi-player feature.  &#xD;&#xA;I'd like to know if there has been any attempts on doing such a thing, and if it would be viable, as players going offline or leaving a game in the middle would affect significantly the other players' game." />
  <row Id="31149" PostHistoryTypeId="1" PostId="13956" RevisionGUID="131c3272-6ffa-4e24-b46e-351b425ecbfb" CreationDate="2011-06-20T20:49:52.113" UserId="98" Text="Has a multi player graphic adventure* ever been made?" />
  <row Id="31150" PostHistoryTypeId="3" PostId="13956" RevisionGUID="131c3272-6ffa-4e24-b46e-351b425ecbfb" CreationDate="2011-06-20T20:49:52.113" UserId="98" Text="&lt;multiplayer&gt;&lt;online&gt;&lt;adventure&gt;" />
  <row Id="31151" PostHistoryTypeId="2" PostId="13957" RevisionGUID="af609d27-7e6a-4e65-8587-df31204f7c12" CreationDate="2011-06-20T20:57:04.260" UserId="98" Text="I'm developing a NES emulator with [SDL][1].  &#xD;&#xA;ALthough not exactly a game, I'm implementing almost the same features a game would, and of course, SDL is mainly pointed towards game development.  &#xD;&#xA;And you get a plus which is 100% portable code you can deploy on Windows and Linux too.  &#xD;&#xA;Although its graphic functions draw exclusively in 2D, it's fully integrated with OpenGL for 2D and 3D rendering if desired.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31152" PostHistoryTypeId="5" PostId="13955" RevisionGUID="cd7b646d-ee33-44bc-983a-10ecd612b00b" CreationDate="2011-06-20T20:57:50.203" UserId="962" Comment="deleted 35 characters in body" Text="How can i detect clicks on a texture (will be a button in my game) that has a form of a triangle or circle. I know only the rectangle solution where u can use the positions + the width/height but this dont work for that because clicks will be detected at the transparent pixels.&#xD;&#xA;&#xD;&#xA;I heard of pixel-perfect collision is it the right way for this?&#xD;&#xA;&#xD;&#xA;It would be great if someone can give me a example for such a solution or other." />
  <row Id="31153" PostHistoryTypeId="5" PostId="13913" RevisionGUID="d471cfa9-2974-4cd5-8c48-2b6556ca1319" CreationDate="2011-06-20T21:03:25.117" UserId="7819" Comment="added 191 characters in body" Text="The A* algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly) it produces a stack overflow error. The A* algorithm would iterate the enemy and find its path and pass the list to the enemy's path.&#xD;&#xA;&#xD;&#xA;I added debug logs and the list that I'm getting it looks like it would arrive from start cell to goal cell. &#xD;&#xA;&#xD;&#xA;Here's the log - &#xD;&#xA;&#xD;&#xA;    06-19 19:26:41.982: DEBUG/findEnemyPath, enemy X:Y(4281): X2.8256836:Y3.5&#xD;&#xA;    06-19 19:26:41.990: DEBUG/findEnemyPath, grid X:Y(4281): X3:Y2&#xD;&#xA;    06-19 19:26:41.990: DEBUG/START CELL ID:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/GOAL CELL ID:(4281): 47&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 38(4281):  passThrough:0.0&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 39(4281):  passThrough:8.875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 40(4281):  passThrough:7.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 52(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 53(4281):  passThrough:7.96875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 53&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 28(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 28&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 65(4281):  passThrough:8.984375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 66(4281):  passThrough:7.9921875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 66&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 78(4281):  passThrough:8.99609375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 78&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 79(4281):  passThrough:7.998046875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 79&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 80(4281):  passThrough:6.9990234375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 81(4281):  passThrough:5.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 82(4281):  passThrough:4.999755859375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 83(4281):  passThrough:3.9998779296875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 83&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 71(4281):  passThrough:2.99993896484375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 71&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 59(4281):  passThrough:1.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 47(4281):  passThrough:0.99951171875&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, the goal cell would be iterating its parent till start cell to break off the loop. &#xD;&#xA;&#xD;&#xA;    private void populateBestList(Cell cell, List&lt;Cell&gt; bestList) {&#xD;&#xA;    		bestList.add(cell);&#xD;&#xA;    		&#xD;&#xA;    		if (cell.parent.start == false) {&#xD;&#xA;    			Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;    			Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;    			populateBestList(cell.parent, bestList);&#xD;&#xA;    		}&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The log with error above would show like this -&#xD;&#xA;&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 47&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;&#xD;&#xA;71 and 59 would switch over and goes on.&#xD;&#xA;&#xD;&#xA;I thought the grid is the issue due to the fact that enemies are using the single grid so I make the parent, start, and goal clear before starting the A* algorithm for an enemy.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;    			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;    				grid[i][j].parent = null;&#xD;&#xA;    				grid[i][j].start = false;&#xD;&#xA;    				grid[i][j].goal = false;&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;That didn't work. I thought it might be something related to this code, but not sure if I'm on right track -&#xD;&#xA;&#xD;&#xA;    neighbor.parent = best;&#xD;&#xA;    openList.remove(neighbor);&#xD;&#xA;    closedList.remove(neighbor);&#xD;&#xA;    openList.add(0, neighbor);&#xD;&#xA;&#xD;&#xA;Here's the code of the A* algorithm -&#xD;&#xA;&#xD;&#xA;    private List&lt;Cell&gt; findEnemyPath(Enemy enemy) {&#xD;&#xA;		&#xD;&#xA;		for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;				grid[i][j].parent = null;&#xD;&#xA;				grid[i][j].start = false;&#xD;&#xA;				grid[i][j].goal = false;&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		List&lt;Cell&gt; openList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; closedList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; bestList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		&#xD;&#xA;		int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;		int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;		&#xD;&#xA;		width = (width &lt; 0) ? 0 : width; &#xD;&#xA;		height = (height &lt; 0) ? 0 : height; &#xD;&#xA;		&#xD;&#xA;		Log.d(&quot;findEnemyPath, enemy X:Y&quot;, &quot;X&quot;+enemy.position.x+&quot;:&quot;+&quot;Y&quot;+enemy.position.y);&#xD;&#xA;		Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+height+&quot;:&quot;+&quot;Y&quot;+width);&#xD;&#xA;		Cell start = grid[height][width];&#xD;&#xA;		Cell goal = grid[ENEMY_GOAL_HEIGHT][ENEMY_GOAL_WIDTH];&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if(start.id != goal.id) {&#xD;&#xA;&#xD;&#xA;			Log.d(&quot;START CELL ID: &quot;, &quot;&quot;+start.id);&#xD;&#xA;			Log.d(&quot;GOAL CELL ID: &quot;, &quot;&quot;+goal.id);&#xD;&#xA;			//Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+start.position.x+&quot;:&quot;+&quot;Y&quot;+start.position.y);&#xD;&#xA;			start.start = true;&#xD;&#xA;			goal.goal = true;&#xD;&#xA;			openList.add(start);&#xD;&#xA;			&#xD;&#xA;			while(openList.size() &gt; 0) {&#xD;&#xA;				Cell best = findBestPassThrough(openList, goal);&#xD;&#xA;				//Log.d(&quot;ID:&quot;, &quot;&quot;+best.id);&#xD;&#xA;				openList.remove(best);&#xD;&#xA;				closedList.add(best);&#xD;&#xA;				if (best.goal) {&#xD;&#xA;				    System.out.println(&quot;Found Goal&quot;);&#xD;&#xA;				    System.out.println(bestList.size());&#xD;&#xA;				    populateBestList(goal, bestList);&#xD;&#xA;				    /*&#xD;&#xA;				    for(Cell cell : bestList) {&#xD;&#xA;						Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;						Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;				    }&#xD;&#xA;				    */&#xD;&#xA;				    Collections.reverse(bestList);&#xD;&#xA;			        Cell exit = new Cell(13.5f, 3.5f, 1, 1);&#xD;&#xA;			        exit.isExit = true;&#xD;&#xA;			        bestList.add(exit);&#xD;&#xA;			    	//Log.d(&quot;PathList&quot;, &quot;Enemy ID : &quot; + enemy.id);&#xD;&#xA;				    return bestList;&#xD;&#xA;				} &#xD;&#xA;				else {&#xD;&#xA;				    List&lt;Cell&gt; neighbors = getNeighbors(best);&#xD;&#xA;				    for (Cell neighbor : neighbors) {&#xD;&#xA;					    if(neighbor.isTower) {&#xD;&#xA;				    		continue;&#xD;&#xA;				    	}&#xD;&#xA;					    if (openList.contains(neighbor)) {&#xD;&#xA;					        Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;					        tmpCell.parent = best;&#xD;&#xA;					        if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;					        	continue;&#xD;&#xA;					        }&#xD;&#xA;					    }&#xD;&#xA;					    if (closedList.contains(neighbor)) {&#xD;&#xA;							Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;							tmpCell.parent = best;&#xD;&#xA;							if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;								continue;&#xD;&#xA;					    	}&#xD;&#xA;						}&#xD;&#xA;					    Log.d(&quot;Neighbor's Parent: &quot;, &quot;&quot;+best.id);&#xD;&#xA;					    neighbor.parent = best;&#xD;&#xA;						openList.remove(neighbor);&#xD;&#xA;						closedList.remove(neighbor);&#xD;&#xA;						openList.add(0, neighbor);&#xD;&#xA;				    }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		Log.d(&quot;Cannot find a path&quot;, &quot;&quot;);&#xD;&#xA;		return null;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public double getPassThrough(Cell goal) {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return getLocalCost(goal) + getParentCost();&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;    enter code here" />
  <row Id="31154" PostHistoryTypeId="2" PostId="13958" RevisionGUID="dbd8c478-9d42-4857-813f-01a8aec1455b" CreationDate="2011-06-20T21:03:25.587" UserId="7946" Text="It's hard to read code of other people, but I think this is one possible (purely brainstormed) workaround, although of course I'm not able to test it:&#xD;&#xA;&#xD;&#xA; 1. Before the collision detection happens, save the players velocity to some temporary variable.&#xD;&#xA; 2. After you've done your collision response, check if the players X or Y position has been corrected&#xD;&#xA; 3. If X position has been changed, manually reset (as a kind of &quot;safety reset&quot;) the players Y velocity to the one that he had before the response.&#xD;&#xA;&#xD;&#xA;By the way, what happens with your current code when your players hits the roof while jumping?&#xD;&#xA;" />
  <row Id="31155" PostHistoryTypeId="2" PostId="13959" RevisionGUID="eab9e15d-8c9d-47f0-bc3d-c69d876c75c7" CreationDate="2011-06-20T21:14:11.337" UserId="7946" Text="Of course I can't say for sure since I haven't played all the games that there are in the world, but I seriously doubt that such a thing exists. I even doubt that it is viable. Here's why:&#xD;&#xA;&#xD;&#xA;A large part of the fun in these adventure games comes from figuring things out from beginning to end. If another player partially does that for you (because you just joined the game, or because the game requires you to only solve a part of the puzzle) it kind of takes away the fun. &#xD;&#xA;&#xD;&#xA;Adventure games are usually lengthy affairs, where you spend a lot of time in single chapters of the game. Having multiple players play this kind of game together would require them to play together for a very long time, which rarely works out even if you have buddies who want to play with you.&#xD;&#xA;&#xD;&#xA;And last but not least: Adventure games are story-driven by design. I find it hard to imagine that these kinds of games would have a lot of replay value.&#xD;&#xA;&#xD;&#xA;But of course, if you have some awesome idea to actually put this into practice, everyone's welcoming you. The gaming market is certainly not oversaturated with original ideas." />
  <row Id="31156" PostHistoryTypeId="25" PostId="13946" RevisionGUID="457c8735-fcc3-4562-951f-0bde32b218cd" CreationDate="2011-06-20T21:24:46.197" Comment="http://twitter.com/#!/StackGameDev/status/82921854486069248" />
  <row Id="31157" PostHistoryTypeId="2" PostId="13960" RevisionGUID="109ee7b3-7058-4c6b-92cc-203bf71e748d" CreationDate="2011-06-20T21:42:15.270" UserId="5089" Text="Well the circle is even easier than the rectangle actually, all you need to know is the radius and the centerpoint of the circle then you can do the hit testing in a way similar to the rectangle. The Triangle is much harder, for complex shapes sometimes what people will do is to create a bunch of bounding spheres or boxes and just do a hit test on all of those, where the hit is not perfect but an estimate, sometimes this is ok sometimes not.&#xD;&#xA;&#xD;&#xA;There are algorithms for arbitrary polygons, which solves it for a very general case but assumes you have polygon data. You could possibly also scan every pixel in the texture and look at it's alpha value but I think you'll find that very slow for a lot of textures. So I think for the triangle what you want to do is to, in addition to the texture, keep track of the points of the triangle. If you do that you can do hittesting for that shape pretty easily.&#xD;&#xA;&#xD;&#xA;I did something similar in javascript not long ago, except for polygons:&#xD;&#xA;[Determine if two points are on the same side of a line in javascript][1]&#xD;&#xA;&#xD;&#xA;You could translate that algorithm to C# and assume 3 points instead of 6. &#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5973372/determine-if-two-points-are-on-the-same-side-of-a-line-in-javascript" />
  <row Id="31158" PostHistoryTypeId="2" PostId="13961" RevisionGUID="0706c20b-ad89-4a3f-8423-d6fe1f024a20" CreationDate="2011-06-20T21:49:06.530" UserId="962" Text="If you had extremely complicated shapes, using pixel testing might be a good way to go, but if you have just circles and triangles, you use different methods that will be faster to set up, and execute faster as well.&#xD;&#xA;&#xD;&#xA;For a circle all you have to do is know the radius, and when the user clicks, call a method that calculates the distance between the center of the circle and the point where the user clicked, if that distance is lower than the radius, then the user has clicked the circle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    private static double GetDistance(PointF point1, PointF point2)&#xD;&#xA;    {&#xD;&#xA;        //pythagoras theorem c^2 = a^2 + b^2&#xD;&#xA;        //thus c = square root(a^2 + b^2)&#xD;&#xA;        double a = (double)(point2.X - point1.X);&#xD;&#xA;        double b = (double)(point2.Y - point1.Y);&#xD;&#xA;&#xD;&#xA;        return Math.Sqrt(a * a + b * b);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Code via http://www.daniweb.com/software-development/csharp/code/217149&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Triangles are a bit more complicated, but this page explains two different methods on how to accomplish it.&#xD;&#xA;&#xD;&#xA;http://www.blackpawn.com/texts/pointinpoly/default.html" />
  <row Id="31159" PostHistoryTypeId="2" PostId="13962" RevisionGUID="415aab1d-72c7-4e70-a151-b2352b32545e" CreationDate="2011-06-20T21:58:07.917" UserId="7888" Text="I wouldn't bother with pixel-perfect collision if you only need to detect clicks on triangles and circles.&#xD;&#xA;&#xD;&#xA;For circles you can use a basic distance check from the center of the button.&#xD;&#xA;&#xD;&#xA;    if ( r &gt;= Math.sqrt( Math.pow( clickX - centerX, 2 ) + Math.pow( clickY - centerY, 2 ) ) )&#xD;&#xA;        // we have been clicked&#xD;&#xA;&#xD;&#xA;And for triangles you can use a [point-in-triangle][1] test. If you have a triangle with vertices A, B, and C:&#xD;&#xA;&#xD;&#xA;    /**&#xD;&#xA;     * Return true if p1 and p2 are on the same side of BA&#xD;&#xA;     */&#xD;&#xA;    boolean SameSide(Vector2 p1, Vector2 p2, Vector2 A, Vector2 B)&#xD;&#xA;    {&#xD;&#xA;        Vector2 cp1 = Vector2.CrossProduct(B-A, p1-A);&#xD;&#xA;        Vector2 cp2 = Vector2.CrossProduct(B-A, p2-A);&#xD;&#xA;        return Vector2.DotProduct(cp1, cp2) &gt;= 0;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /**&#xD;&#xA;     * Return true if the point p is in the triangle ABC&#xD;&#xA;     */&#xD;&#xA;    boolean PointInTriangle(Vector2 p, Vector2 A, Vector2 B, Vector2 C)&#xD;&#xA;    {&#xD;&#xA;        return SameSide(p,A, B,C) &amp;&amp; SameSide(p,B, A,C) &amp;&amp; SameSide(p,C, A,B);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;There is also the [Barycentric technique][2], which increases computational efficiency at the expense of clarity.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mathworld.wolfram.com/TriangleInterior.html&#xD;&#xA;  [2]: http://www.blackpawn.com/texts/pointinpoly/default.html" />
  <row Id="31160" PostHistoryTypeId="2" PostId="13963" RevisionGUID="727d3d98-b8b4-42aa-b971-1b0a15a6d8d1" CreationDate="2011-06-20T22:08:58.020" UserId="5899" Text="Inside the Xcode IDE, you have access to a lot of material related with programming in Mac OS X, iPhone/iPad. &#xD;&#xA;&#xD;&#xA;With Xcode 3&#xD;&#xA;&#xD;&#xA;Help -&gt; Developer Documentation&#xD;&#xA;&#xD;&#xA;With Xcode 4&#xD;&#xA;&#xD;&#xA;Help -&gt; Documentation and API reference&#xD;&#xA;&#xD;&#xA;A window will be open and you will can navigate along a lot of topics. For example, search a document called &quot;OpenGL Programming Guide for Mac OS X&quot;. The documents can be viewed inside Xcode or downloaded in PDF format.&#xD;&#xA;&#xD;&#xA;If you didn't know, you can mix code written in Objective-C and C++, even in the same file, try to rename a Objective-C file with .m extension to .mm extension. There are many games written in C++ for Mac OS X and iPhone. To make a game in C++ for Mac OS X, you can do a wrapper mixing C++ and Objective-C that deals with the OS native calls ( graphics, input, etc. ). Once this abstraction layer has been constructed, the game can be programmed entirely in C++.&#xD;&#xA;" />
  <row Id="31161" PostHistoryTypeId="2" PostId="13964" RevisionGUID="19cf5991-0435-4d6f-af53-c7b42da68e9d" CreationDate="2011-06-20T22:40:16.867" UserId="8153" Text="Hey Im actually a games programmer and I have to say learning C# and C++ will sort you for almost all your game programming needs!&#xD;&#xA;&#xD;&#xA;At work I use C++ and would recommend maybe getting the &#xD;&#xA;Jess Liberty-&quot;Learn C++ in 24hrs&quot; &#xD;&#xA;book, then once you have developed your skills a bit look to buy &#xD;&#xA;Andre LaMoth-&quot;Tricks of the windows Game Programming Gurus&quot;&#xD;&#xA;which is a stunning book to start getting into DirectX, if you get interested in Win32 along the way you may also want to get &#xD;&#xA;Charles Petzold-&quot;Programming windows&quot; &#xD;&#xA;which is like the bible of Win32 book (Knowing the win32 library often impresses employers ;) )&#xD;&#xA;&#xD;&#xA;In my spare time however I use C# to make some nice little indie games, its an easy to learn language (especially if you know C++ already). Obviously I use the XNA framework, which has major advantages in itself! This is probably the best way of writing indie games to release on PC, XBOX360, Windows 7 Phone, and Zune(if you must). I cant really advise any books as I haven't used any! I picked it up by following online tutorials and attending a local user group." />
  <row Id="31162" PostHistoryTypeId="5" PostId="13954" RevisionGUID="390da44d-3451-4085-8a0c-0cf0361e2e79" CreationDate="2011-06-20T23:06:31.810" UserId="51" Comment="added 16 characters in body" Text="See the diagram first: &#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/yZqdI.png&quot;&gt;&#xD;&#xA;&#xD;&#xA;When my AABB physics engine resolves an intersection, it does so by finding the axis where the penetration is smaller, then &quot;push out&quot; the entity on that axis.&#xD;&#xA;&#xD;&#xA;Considering the &quot;jumping moving left&quot; example:&#xD;&#xA;&#xD;&#xA; - If velocityX is bigger than velocityY, AABB pushes the entity out on the Y axis, effectively stopping the jump (result: the player stops in mid-air).&#xD;&#xA; - If velocityX is smaller than velocitY (not shown in diagram), the program works as intended, because AABB pushes the entity out on the X axis.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Source code:&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public void Update()&#xD;&#xA;        {&#xD;&#xA;            Position += Velocity;&#xD;&#xA;            Velocity += World.Gravity;&#xD;&#xA;            &#xD;&#xA;            List&lt;SSSPBody&gt; toCheck = World.SpatialHash.GetNearbyItems(this);&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; toCheck.Count; i++)&#xD;&#xA;            {&#xD;&#xA;                SSSPBody body = toCheck[i];&#xD;&#xA;                body.Test.Color = Color.White;&#xD;&#xA;&#xD;&#xA;                if (body != this &amp;&amp; body.Static)&#xD;&#xA;                {                   &#xD;&#xA;                    float left = (body.CornerMin.X - CornerMax.X);&#xD;&#xA;                    float right = (body.CornerMax.X - CornerMin.X);&#xD;&#xA;                    float top = (body.CornerMin.Y - CornerMax.Y);&#xD;&#xA;                    float bottom = (body.CornerMax.Y - CornerMin.Y);&#xD;&#xA;&#xD;&#xA;                    if (SSSPUtils.AABBIsOverlapping(this, body))&#xD;&#xA;                    {&#xD;&#xA;                        body.Test.Color = Color.Yellow;&#xD;&#xA;&#xD;&#xA;                        Vector2 overlapVector = SSSPUtils.AABBGetOverlapVector(left, right, top, bottom);&#xD;&#xA;&#xD;&#xA;                        Position += overlapVector;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    if (SSSPUtils.AABBIsCollidingTop(this, body))&#xD;&#xA;                    {                      &#xD;&#xA;                        if ((Position.X &gt;= body.CornerMin.X &amp;&amp; Position.X &lt;= body.CornerMax.X) &amp;&amp;&#xD;&#xA;                            (Position.Y + Height/2f == body.Position.Y - body.Height/2f))&#xD;&#xA;                        {&#xD;&#xA;                            body.Test.Color = Color.Red;&#xD;&#xA;                            Velocity = new Vector2(Velocity.X, 0);&#xD;&#xA;                            &#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }               &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public static bool AABBIsOverlapping(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;        {&#xD;&#xA;            if(mBody1.CornerMax.X &lt;= mBody2.CornerMin.X || mBody1.CornerMin.X &gt;= mBody2.CornerMax.X)&#xD;&#xA;                return false;&#xD;&#xA;            if (mBody1.CornerMax.Y &lt;= mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt;= mBody2.CornerMax.Y)&#xD;&#xA;                return false;&#xD;&#xA;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;        public static bool AABBIsColliding(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;        {&#xD;&#xA;            if (mBody1.CornerMax.X &lt; mBody2.CornerMin.X || mBody1.CornerMin.X &gt; mBody2.CornerMax.X)&#xD;&#xA;                return false;&#xD;&#xA;            if (mBody1.CornerMax.Y &lt; mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt; mBody2.CornerMax.Y)&#xD;&#xA;                return false;&#xD;&#xA;&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;        public static bool AABBIsCollidingTop(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;        {&#xD;&#xA;            if (mBody1.CornerMax.X &lt; mBody2.CornerMin.X || mBody1.CornerMin.X &gt; mBody2.CornerMax.X)&#xD;&#xA;                return false;&#xD;&#xA;            if (mBody1.CornerMax.Y &lt; mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt; mBody2.CornerMax.Y)&#xD;&#xA;                return false;&#xD;&#xA;&#xD;&#xA;            if(mBody1.CornerMax.Y == mBody2.CornerMin.Y)&#xD;&#xA;                return true;&#xD;&#xA;&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;        public static Vector2 AABBGetOverlapVector(float mLeft, float mRight, float mTop, float mBottom)&#xD;&#xA;        {&#xD;&#xA;            Vector2 result = new Vector2(0, 0);&#xD;&#xA;&#xD;&#xA;            if ((mLeft &gt; 0 || mRight &lt; 0) || (mTop &gt; 0 || mBottom &lt; 0))&#xD;&#xA;                return result;&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(mLeft) &lt; mRight)&#xD;&#xA;                result.X = mLeft;&#xD;&#xA;            else&#xD;&#xA;                result.X = mRight;&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(mTop) &lt; mBottom)&#xD;&#xA;                result.Y = mTop;&#xD;&#xA;            else&#xD;&#xA;                result.Y = mBottom;&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(result.X) &lt; Math.Abs(result.Y))&#xD;&#xA;                result.Y = 0;&#xD;&#xA;            else&#xD;&#xA;                result.X = 0;&#xD;&#xA;&#xD;&#xA;            return result;&#xD;&#xA;        }" />
  <row Id="31163" PostHistoryTypeId="5" PostId="13954" RevisionGUID="9ca3cb5b-c6ee-454f-adde-bf9cda5db56b" CreationDate="2011-06-20T23:48:20.760" UserId="2698" Comment="Decreased an indent level" Text="See the diagram first: &#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.stack.imgur.com/yZqdI.png&quot;&gt;&#xD;&#xA;&#xD;&#xA;When my AABB physics engine resolves an intersection, it does so by finding the axis where the penetration is smaller, then &quot;push out&quot; the entity on that axis.&#xD;&#xA;&#xD;&#xA;Considering the &quot;jumping moving left&quot; example:&#xD;&#xA;&#xD;&#xA; - If velocityX is bigger than velocityY, AABB pushes the entity out on the Y axis, effectively stopping the jump (result: the player stops in mid-air).&#xD;&#xA; - If velocityX is smaller than velocitY (not shown in diagram), the program works as intended, because AABB pushes the entity out on the X axis.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;How can I solve this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Source code:&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public void Update()&#xD;&#xA;    {&#xD;&#xA;        Position += Velocity;&#xD;&#xA;        Velocity += World.Gravity;&#xD;&#xA;        &#xD;&#xA;        List&lt;SSSPBody&gt; toCheck = World.SpatialHash.GetNearbyItems(this);&#xD;&#xA;&#xD;&#xA;        for (int i = 0; i &lt; toCheck.Count; i++)&#xD;&#xA;        {&#xD;&#xA;            SSSPBody body = toCheck[i];&#xD;&#xA;            body.Test.Color = Color.White;&#xD;&#xA;&#xD;&#xA;            if (body != this &amp;&amp; body.Static)&#xD;&#xA;            {                   &#xD;&#xA;                float left = (body.CornerMin.X - CornerMax.X);&#xD;&#xA;                float right = (body.CornerMax.X - CornerMin.X);&#xD;&#xA;                float top = (body.CornerMin.Y - CornerMax.Y);&#xD;&#xA;                float bottom = (body.CornerMax.Y - CornerMin.Y);&#xD;&#xA;&#xD;&#xA;                if (SSSPUtils.AABBIsOverlapping(this, body))&#xD;&#xA;                {&#xD;&#xA;                    body.Test.Color = Color.Yellow;&#xD;&#xA;&#xD;&#xA;                    Vector2 overlapVector = SSSPUtils.AABBGetOverlapVector(left, right, top, bottom);&#xD;&#xA;&#xD;&#xA;                    Position += overlapVector;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (SSSPUtils.AABBIsCollidingTop(this, body))&#xD;&#xA;                {                      &#xD;&#xA;                    if ((Position.X &gt;= body.CornerMin.X &amp;&amp; Position.X &lt;= body.CornerMax.X) &amp;&amp;&#xD;&#xA;                        (Position.Y + Height/2f == body.Position.Y - body.Height/2f))&#xD;&#xA;                    {&#xD;&#xA;                        body.Test.Color = Color.Red;&#xD;&#xA;                        Velocity = new Vector2(Velocity.X, 0);&#xD;&#xA;                        &#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }               &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public static bool AABBIsOverlapping(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;    {&#xD;&#xA;        if(mBody1.CornerMax.X &lt;= mBody2.CornerMin.X || mBody1.CornerMin.X &gt;= mBody2.CornerMax.X)&#xD;&#xA;            return false;&#xD;&#xA;        if (mBody1.CornerMax.Y &lt;= mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt;= mBody2.CornerMax.Y)&#xD;&#xA;            return false;&#xD;&#xA;&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;    public static bool AABBIsColliding(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;    {&#xD;&#xA;        if (mBody1.CornerMax.X &lt; mBody2.CornerMin.X || mBody1.CornerMin.X &gt; mBody2.CornerMax.X)&#xD;&#xA;            return false;&#xD;&#xA;        if (mBody1.CornerMax.Y &lt; mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt; mBody2.CornerMax.Y)&#xD;&#xA;            return false;&#xD;&#xA;&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;    public static bool AABBIsCollidingTop(SSSPBody mBody1, SSSPBody mBody2)&#xD;&#xA;    {&#xD;&#xA;        if (mBody1.CornerMax.X &lt; mBody2.CornerMin.X || mBody1.CornerMin.X &gt; mBody2.CornerMax.X)&#xD;&#xA;            return false;&#xD;&#xA;        if (mBody1.CornerMax.Y &lt; mBody2.CornerMin.Y || mBody1.CornerMin.Y &gt; mBody2.CornerMax.Y)&#xD;&#xA;            return false;&#xD;&#xA;&#xD;&#xA;        if(mBody1.CornerMax.Y == mBody2.CornerMin.Y)&#xD;&#xA;            return true;&#xD;&#xA;&#xD;&#xA;        return false;&#xD;&#xA;    }&#xD;&#xA;    public static Vector2 AABBGetOverlapVector(float mLeft, float mRight, float mTop, float mBottom)&#xD;&#xA;    {&#xD;&#xA;        Vector2 result = new Vector2(0, 0);&#xD;&#xA;&#xD;&#xA;        if ((mLeft &gt; 0 || mRight &lt; 0) || (mTop &gt; 0 || mBottom &lt; 0))&#xD;&#xA;            return result;&#xD;&#xA;&#xD;&#xA;        if (Math.Abs(mLeft) &lt; mRight)&#xD;&#xA;            result.X = mLeft;&#xD;&#xA;        else&#xD;&#xA;            result.X = mRight;&#xD;&#xA;&#xD;&#xA;        if (Math.Abs(mTop) &lt; mBottom)&#xD;&#xA;            result.Y = mTop;&#xD;&#xA;        else&#xD;&#xA;            result.Y = mBottom;&#xD;&#xA;&#xD;&#xA;        if (Math.Abs(result.X) &lt; Math.Abs(result.Y))&#xD;&#xA;            result.Y = 0;&#xD;&#xA;        else&#xD;&#xA;            result.X = 0;&#xD;&#xA;&#xD;&#xA;        return result;&#xD;&#xA;    }" />
  <row Id="31164" PostHistoryTypeId="24" PostId="13954" RevisionGUID="9ca3cb5b-c6ee-454f-adde-bf9cda5db56b" CreationDate="2011-06-20T23:48:20.760" Comment="Proposed by 2698 approved by 51 edit id of 509" />
  <row Id="31165" PostHistoryTypeId="25" PostId="13954" RevisionGUID="7a74e3f4-563c-4199-8db7-42bd00e45708" CreationDate="2011-06-21T00:24:46.860" Comment="http://twitter.com/#!/StackGameDev/status/82967157159366656" />
  <row Id="31166" PostHistoryTypeId="2" PostId="13965" RevisionGUID="1baa66f8-4fc1-4738-a653-6b1435d9f393" CreationDate="2011-06-21T00:43:39.070" UserId="7981" Text="* Create a buffer of same size as screen (or surface where are Your shapes). At each position it contains boolean whether there is sprite; then, check all &quot;pixels&quot; of user shape whether at their position is the sprite (by checking value of that boolean). Alternatively, You can create more sprites there by storing their ID instead of boolean; but this was case of 1 sprite. &#xD;&#xA;* If user generated shape can be represented by sequence of lines, then You can check whether each such line crosses sprite. Since sprite has rectangular shape and user shape is a line just Look for &quot;line rectangle intersection&quot; ... (separating axes algorithm si one way to do it)&#xD;&#xA;&#xD;&#xA;Approaches depend on what data structures You choose, whether they are bitmaps or vectors.&#xD;&#xA;&#xD;&#xA;First approach can handle arbitrary complex shapes, is simple to implement but uses more memory. Actually You can reduce memory overhead by using compression and speed it up by using hierachical data strutures (octrees) ...&#xD;&#xA;&#xD;&#xA;Second approach , is not so simple to implement but uses more processing power.&#xD;&#xA;&#xD;&#xA;In each case measure if it matters. I would try to do first one because it is simpler to implement. Good luck. :)" />
  <row Id="31167" PostHistoryTypeId="5" PostId="13913" RevisionGUID="d97f7cf2-961d-4e70-85ae-994f7de84473" CreationDate="2011-06-21T00:49:03.027" UserId="7819" Comment="added 486 characters in body" Text="The A* algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly) it produces a stack overflow error. The A* algorithm would iterate the enemy and find its path and pass the list to the enemy's path.&#xD;&#xA;&#xD;&#xA;I added debug logs and the list that I'm getting it looks like it would arrive from start cell to goal cell. &#xD;&#xA;&#xD;&#xA;Here's the log - &#xD;&#xA;&#xD;&#xA;    06-19 19:26:41.982: DEBUG/findEnemyPath, enemy X:Y(4281): X2.8256836:Y3.5&#xD;&#xA;    06-19 19:26:41.990: DEBUG/findEnemyPath, grid X:Y(4281): X3:Y2&#xD;&#xA;    06-19 19:26:41.990: DEBUG/START CELL ID:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/GOAL CELL ID:(4281): 47&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 38(4281):  passThrough:0.0&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 39(4281):  passThrough:8.875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 40(4281):  passThrough:7.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 52(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 53(4281):  passThrough:7.96875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 53&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 28(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 28&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 65(4281):  passThrough:8.984375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 66(4281):  passThrough:7.9921875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 66&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 78(4281):  passThrough:8.99609375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 78&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 79(4281):  passThrough:7.998046875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 79&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 80(4281):  passThrough:6.9990234375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 81(4281):  passThrough:5.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 82(4281):  passThrough:4.999755859375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 83(4281):  passThrough:3.9998779296875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 83&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 71(4281):  passThrough:2.99993896484375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 71&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 59(4281):  passThrough:1.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 47(4281):  passThrough:0.99951171875&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, the goal cell would be iterating its parent till start cell to break off the loop. &#xD;&#xA;&#xD;&#xA;    private void populateBestList(Cell cell, List&lt;Cell&gt; bestList) {&#xD;&#xA;    		bestList.add(cell);&#xD;&#xA;    		&#xD;&#xA;    		if (cell.parent.start == false) {&#xD;&#xA;    			Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;    			Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;    			populateBestList(cell.parent, bestList);&#xD;&#xA;    		}&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The log with error above would show like this -&#xD;&#xA;&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 47&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;&#xD;&#xA;71 and 59 would switch over and goes on.&#xD;&#xA;&#xD;&#xA;I thought the grid is the issue due to the fact that enemies are using the single grid so I make the parent, start, and goal clear before starting the A* algorithm for an enemy.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;    			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;    				grid[i][j].parent = null;&#xD;&#xA;    				grid[i][j].start = false;&#xD;&#xA;    				grid[i][j].goal = false;&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;That didn't work. I thought it might be something related to this code, but not sure if I'm on right track -&#xD;&#xA;&#xD;&#xA;    neighbor.parent = best;&#xD;&#xA;    openList.remove(neighbor);&#xD;&#xA;    closedList.remove(neighbor);&#xD;&#xA;    openList.add(0, neighbor);&#xD;&#xA;&#xD;&#xA;Here's the code of the A* algorithm -&#xD;&#xA;&#xD;&#xA;    private List&lt;Cell&gt; findEnemyPath(Enemy enemy) {&#xD;&#xA;		&#xD;&#xA;		for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;				grid[i][j].parent = null;&#xD;&#xA;				grid[i][j].start = false;&#xD;&#xA;				grid[i][j].goal = false;&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		List&lt;Cell&gt; openList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; closedList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; bestList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		&#xD;&#xA;		int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;		int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;		&#xD;&#xA;		width = (width &lt; 0) ? 0 : width; &#xD;&#xA;		height = (height &lt; 0) ? 0 : height; &#xD;&#xA;		&#xD;&#xA;		Log.d(&quot;findEnemyPath, enemy X:Y&quot;, &quot;X&quot;+enemy.position.x+&quot;:&quot;+&quot;Y&quot;+enemy.position.y);&#xD;&#xA;		Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+height+&quot;:&quot;+&quot;Y&quot;+width);&#xD;&#xA;		Cell start = grid[height][width];&#xD;&#xA;		Cell goal = grid[ENEMY_GOAL_HEIGHT][ENEMY_GOAL_WIDTH];&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if(start.id != goal.id) {&#xD;&#xA;&#xD;&#xA;			Log.d(&quot;START CELL ID: &quot;, &quot;&quot;+start.id);&#xD;&#xA;			Log.d(&quot;GOAL CELL ID: &quot;, &quot;&quot;+goal.id);&#xD;&#xA;			//Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+start.position.x+&quot;:&quot;+&quot;Y&quot;+start.position.y);&#xD;&#xA;			start.start = true;&#xD;&#xA;			goal.goal = true;&#xD;&#xA;			openList.add(start);&#xD;&#xA;			&#xD;&#xA;			while(openList.size() &gt; 0) {&#xD;&#xA;				Cell best = findBestPassThrough(openList, goal);&#xD;&#xA;				//Log.d(&quot;ID:&quot;, &quot;&quot;+best.id);&#xD;&#xA;				openList.remove(best);&#xD;&#xA;				closedList.add(best);&#xD;&#xA;				if (best.goal) {&#xD;&#xA;				    System.out.println(&quot;Found Goal&quot;);&#xD;&#xA;				    System.out.println(bestList.size());&#xD;&#xA;				    populateBestList(goal, bestList);&#xD;&#xA;				    /*&#xD;&#xA;				    for(Cell cell : bestList) {&#xD;&#xA;						Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;						Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;				    }&#xD;&#xA;				    */&#xD;&#xA;				    Collections.reverse(bestList);&#xD;&#xA;			        Cell exit = new Cell(13.5f, 3.5f, 1, 1);&#xD;&#xA;			        exit.isExit = true;&#xD;&#xA;			        bestList.add(exit);&#xD;&#xA;			    	//Log.d(&quot;PathList&quot;, &quot;Enemy ID : &quot; + enemy.id);&#xD;&#xA;				    return bestList;&#xD;&#xA;				} &#xD;&#xA;				else {&#xD;&#xA;				    List&lt;Cell&gt; neighbors = getNeighbors(best);&#xD;&#xA;				    for (Cell neighbor : neighbors) {&#xD;&#xA;					    if(neighbor.isTower) {&#xD;&#xA;				    		continue;&#xD;&#xA;				    	}&#xD;&#xA;					    if (openList.contains(neighbor)) {&#xD;&#xA;					        Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;					        tmpCell.parent = best;&#xD;&#xA;					        if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;					        	continue;&#xD;&#xA;					        }&#xD;&#xA;					    }&#xD;&#xA;					    if (closedList.contains(neighbor)) {&#xD;&#xA;							Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;							tmpCell.parent = best;&#xD;&#xA;							if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;								continue;&#xD;&#xA;					    	}&#xD;&#xA;						}&#xD;&#xA;					    Log.d(&quot;Neighbor's Parent: &quot;, &quot;&quot;+best.id);&#xD;&#xA;					    neighbor.parent = best;&#xD;&#xA;						openList.remove(neighbor);&#xD;&#xA;						closedList.remove(neighbor);&#xD;&#xA;						openList.add(0, neighbor);&#xD;&#xA;				    }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		Log.d(&quot;Cannot find a path&quot;, &quot;&quot;);&#xD;&#xA;		return null;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public double getPassThrough(Cell goal) {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return getLocalCost(goal) + getParentCost();&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    public double getLocalCost(Cell goal) {&#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		localCost = 1.0 * (Math.abs(this.position.x - goal.position.x) + Math.abs(this.position.y - goal.position.y));&#xD;&#xA;    		return localCost;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    public double getParentCost() {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		if (parentCost == 0.0) {&#xD;&#xA;    			parentCost = 1.0 + .5 * (parent.getParentCost() - 1.0);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return parentCost;&#xD;&#xA;    	}" />
  <row Id="31168" PostHistoryTypeId="5" PostId="13913" RevisionGUID="b0c5c3ef-eab1-45da-ac47-976195f574f2" CreationDate="2011-06-21T01:09:50.503" UserId="7819" Comment="added 380 characters in body" Text="The A* algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly) it produces a stack overflow error. The A* algorithm would iterate the enemy and find its path and pass the list to the enemy's path.&#xD;&#xA;&#xD;&#xA;I added debug logs and the list that I'm getting it looks like it would arrive from start cell to goal cell. &#xD;&#xA;&#xD;&#xA;Here's the log - &#xD;&#xA;&#xD;&#xA;    06-19 19:26:41.982: DEBUG/findEnemyPath, enemy X:Y(4281): X2.8256836:Y3.5&#xD;&#xA;    06-19 19:26:41.990: DEBUG/findEnemyPath, grid X:Y(4281): X3:Y2&#xD;&#xA;    06-19 19:26:41.990: DEBUG/START CELL ID:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/GOAL CELL ID:(4281): 47&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 38(4281):  passThrough:0.0&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 39(4281):  passThrough:8.875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 40(4281):  passThrough:7.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 52(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 53(4281):  passThrough:7.96875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 53&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 28(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 28&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 65(4281):  passThrough:8.984375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 66(4281):  passThrough:7.9921875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 66&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 78(4281):  passThrough:8.99609375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 78&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 79(4281):  passThrough:7.998046875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 79&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 80(4281):  passThrough:6.9990234375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 81(4281):  passThrough:5.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 82(4281):  passThrough:4.999755859375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 83(4281):  passThrough:3.9998779296875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 83&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 71(4281):  passThrough:2.99993896484375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 71&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 59(4281):  passThrough:1.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 47(4281):  passThrough:0.99951171875&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, the goal cell would be iterating its parent till start cell to break off the loop. &#xD;&#xA;&#xD;&#xA;    private void populateBestList(Cell cell, List&lt;Cell&gt; bestList) {&#xD;&#xA;    		bestList.add(cell);&#xD;&#xA;    		&#xD;&#xA;    		if (cell.parent.start == false) {&#xD;&#xA;    			Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;    			Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;    			populateBestList(cell.parent, bestList);&#xD;&#xA;    		}&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The log with error above would show like this -&#xD;&#xA;&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 47&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;&#xD;&#xA;71 and 59 would switch over and goes on.&#xD;&#xA;&#xD;&#xA;I thought the grid is the issue due to the fact that enemies are using the single grid so I make the parent, start, and goal clear before starting the A* algorithm for an enemy.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;    			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;    				grid[i][j].parent = null;&#xD;&#xA;    				grid[i][j].start = false;&#xD;&#xA;    				grid[i][j].goal = false;&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;That didn't work. I thought it might be something related to this code, but not sure if I'm on right track -&#xD;&#xA;&#xD;&#xA;    neighbor.parent = best;&#xD;&#xA;    openList.remove(neighbor);&#xD;&#xA;    closedList.remove(neighbor);&#xD;&#xA;    openList.add(0, neighbor);&#xD;&#xA;&#xD;&#xA;Here's the code of the A* algorithm -&#xD;&#xA;&#xD;&#xA;    private List&lt;Cell&gt; findEnemyPath(Enemy enemy) {&#xD;&#xA;		&#xD;&#xA;		for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;				grid[i][j].parent = null;&#xD;&#xA;				grid[i][j].start = false;&#xD;&#xA;				grid[i][j].goal = false;&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		List&lt;Cell&gt; openList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; closedList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; bestList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		&#xD;&#xA;		int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;		int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;		&#xD;&#xA;		width = (width &lt; 0) ? 0 : width; &#xD;&#xA;		height = (height &lt; 0) ? 0 : height; &#xD;&#xA;		&#xD;&#xA;		Log.d(&quot;findEnemyPath, enemy X:Y&quot;, &quot;X&quot;+enemy.position.x+&quot;:&quot;+&quot;Y&quot;+enemy.position.y);&#xD;&#xA;		Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+height+&quot;:&quot;+&quot;Y&quot;+width);&#xD;&#xA;		Cell start = grid[height][width];&#xD;&#xA;		Cell goal = grid[ENEMY_GOAL_HEIGHT][ENEMY_GOAL_WIDTH];&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if(start.id != goal.id) {&#xD;&#xA;&#xD;&#xA;			Log.d(&quot;START CELL ID: &quot;, &quot;&quot;+start.id);&#xD;&#xA;			Log.d(&quot;GOAL CELL ID: &quot;, &quot;&quot;+goal.id);&#xD;&#xA;			//Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+start.position.x+&quot;:&quot;+&quot;Y&quot;+start.position.y);&#xD;&#xA;			start.start = true;&#xD;&#xA;			goal.goal = true;&#xD;&#xA;			openList.add(start);&#xD;&#xA;			&#xD;&#xA;			while(openList.size() &gt; 0) {&#xD;&#xA;				Cell best = findBestPassThrough(openList, goal);&#xD;&#xA;				//Log.d(&quot;ID:&quot;, &quot;&quot;+best.id);&#xD;&#xA;				openList.remove(best);&#xD;&#xA;				closedList.add(best);&#xD;&#xA;				if (best.goal) {&#xD;&#xA;				    System.out.println(&quot;Found Goal&quot;);&#xD;&#xA;				    System.out.println(bestList.size());&#xD;&#xA;				    populateBestList(goal, bestList);&#xD;&#xA;				    /*&#xD;&#xA;				    for(Cell cell : bestList) {&#xD;&#xA;						Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;						Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;				    }&#xD;&#xA;				    */&#xD;&#xA;				    Collections.reverse(bestList);&#xD;&#xA;			        Cell exit = new Cell(13.5f, 3.5f, 1, 1);&#xD;&#xA;			        exit.isExit = true;&#xD;&#xA;			        bestList.add(exit);&#xD;&#xA;			    	//Log.d(&quot;PathList&quot;, &quot;Enemy ID : &quot; + enemy.id);&#xD;&#xA;				    return bestList;&#xD;&#xA;				} &#xD;&#xA;				else {&#xD;&#xA;				    List&lt;Cell&gt; neighbors = getNeighbors(best);&#xD;&#xA;				    for (Cell neighbor : neighbors) {&#xD;&#xA;					    if(neighbor.isTower) {&#xD;&#xA;				    		continue;&#xD;&#xA;				    	}&#xD;&#xA;					    if (openList.contains(neighbor)) {&#xD;&#xA;					        Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;					        tmpCell.parent = best;&#xD;&#xA;					        if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;					        	continue;&#xD;&#xA;					        }&#xD;&#xA;					    }&#xD;&#xA;					    if (closedList.contains(neighbor)) {&#xD;&#xA;							Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;							tmpCell.parent = best;&#xD;&#xA;							if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;								continue;&#xD;&#xA;					    	}&#xD;&#xA;						}&#xD;&#xA;					    Log.d(&quot;Neighbor's Parent: &quot;, &quot;&quot;+best.id);&#xD;&#xA;					    neighbor.parent = best;&#xD;&#xA;						openList.remove(neighbor);&#xD;&#xA;						closedList.remove(neighbor);&#xD;&#xA;						openList.add(0, neighbor);&#xD;&#xA;				    }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		Log.d(&quot;Cannot find a path&quot;, &quot;&quot;);&#xD;&#xA;		return null;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public double getPassThrough(Cell goal) {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return getLocalCost(goal) + getParentCost();&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    public double getLocalCost(Cell goal) {&#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		localCost = 1.0 * (Math.abs(this.position.x - goal.position.x) + Math.abs(this.position.y - goal.position.y));&#xD;&#xA;    		return localCost;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    public double getParentCost() {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		if (parentCost == 0.0) {&#xD;&#xA;    			parentCost = 1.0 + .5 * (parent.getParentCost() - 1.0);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return parentCost;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When the error occurs - O is empty, X is a tower. S is start, goal is G. The enemy would be created before the Start cell and proceed its path to goal. &#xD;&#xA;&#xD;&#xA;    O O O O O O O O T O O O &#xD;&#xA;    O O O O O O O T O O O O &#xD;&#xA;    O T O O O O T O O O O O &#xD;&#xA;    S T O O O O O O O O O G &#xD;&#xA;    O T O O T O O O O O O O &#xD;&#xA;    O O T T O O O O O O O O &#xD;&#xA;    O O O O O O O O O O O O &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31169" PostHistoryTypeId="4" PostId="13955" RevisionGUID="855b2e0d-3260-4031-991a-0572d71624d8" CreationDate="2011-06-21T01:11:52.940" UserId="962" Comment="edited title" Text="Detect click on Triangle and Circle buttons" />
  <row Id="31170" PostHistoryTypeId="5" PostId="13913" RevisionGUID="55105566-61b8-4e37-8407-bc9d58f74444" CreationDate="2011-06-21T01:16:14.713" UserId="7819" Comment="added 114 characters in body" Text="The A* algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly) it produces a stack overflow error. The A* algorithm would iterate the enemy and find its path and pass the list to the enemy's path.&#xD;&#xA;&#xD;&#xA;I added debug logs and the list that I'm getting it looks like it would arrive from start cell to goal cell. &#xD;&#xA;&#xD;&#xA;Here's the log - &#xD;&#xA;&#xD;&#xA;    06-19 19:26:41.982: DEBUG/findEnemyPath, enemy X:Y(4281): X2.8256836:Y3.5&#xD;&#xA;    06-19 19:26:41.990: DEBUG/findEnemyPath, grid X:Y(4281): X3:Y2&#xD;&#xA;    06-19 19:26:41.990: DEBUG/START CELL ID:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/GOAL CELL ID:(4281): 47&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 38(4281):  passThrough:0.0&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 38&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 39(4281):  passThrough:8.875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 39&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 40(4281):  passThrough:7.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 40&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 52(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 52&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 53(4281):  passThrough:7.96875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 53&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 28(4281):  passThrough:8.9375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 28&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 65(4281):  passThrough:8.984375&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 65&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Best : 66(4281):  passThrough:7.9921875&#xD;&#xA;    06-19 19:26:41.990: DEBUG/Neighbor's Parent:(4281): 66&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 78(4281):  passThrough:8.99609375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 78&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 79(4281):  passThrough:7.998046875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 79&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 80(4281):  passThrough:6.9990234375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 80&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 81(4281):  passThrough:5.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 81&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 82(4281):  passThrough:4.999755859375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 82&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 83(4281):  passThrough:3.9998779296875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 83&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 71(4281):  passThrough:2.99993896484375&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 71&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 59(4281):  passThrough:1.99951171875&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Neighbor's Parent:(4281): 59&#xD;&#xA;    06-19 19:26:42.000: DEBUG/Best : 47(4281):  passThrough:0.99951171875&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, the goal cell would be iterating its parent till start cell to break off the loop. &#xD;&#xA;&#xD;&#xA;    private void populateBestList(Cell cell, List&lt;Cell&gt; bestList) {&#xD;&#xA;    		bestList.add(cell);&#xD;&#xA;    		&#xD;&#xA;    		if (cell.parent.start == false) {&#xD;&#xA;    			Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;    			Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;    			populateBestList(cell.parent, bestList);&#xD;&#xA;    		}&#xD;&#xA;    		return;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The log with error above would show like this -&#xD;&#xA;&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 47&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 59&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ParentID:(4281): 71&#xD;&#xA;    06-19 19:26:42.010: DEBUG/ID:(4281): 71&#xD;&#xA;&#xD;&#xA;71 and 59 would switch over and goes on.&#xD;&#xA;&#xD;&#xA;I thought the grid is the issue due to the fact that enemies are using the single grid so I make the parent, start, and goal clear before starting the A* algorithm for an enemy.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;    			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;    				grid[i][j].parent = null;&#xD;&#xA;    				grid[i][j].start = false;&#xD;&#xA;    				grid[i][j].goal = false;&#xD;&#xA;                }&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;That didn't work. I thought it might be something related to this code, but not sure if I'm on right track -&#xD;&#xA;&#xD;&#xA;    neighbor.parent = best;&#xD;&#xA;    openList.remove(neighbor);&#xD;&#xA;    closedList.remove(neighbor);&#xD;&#xA;    openList.add(0, neighbor);&#xD;&#xA;&#xD;&#xA;Here's the code of the A* algorithm -&#xD;&#xA;&#xD;&#xA;    private List&lt;Cell&gt; findEnemyPath(Enemy enemy) {&#xD;&#xA;		&#xD;&#xA;		for(int i = 0; i &lt; GRID_HEIGHT; i++) {&#xD;&#xA;			for(int j = 0; j &lt; GRID_WIDTH; j++) {&#xD;&#xA;				grid[i][j].parent = null;&#xD;&#xA;				grid[i][j].start = false;&#xD;&#xA;				grid[i][j].goal = false;&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		List&lt;Cell&gt; openList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; closedList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		List&lt;Cell&gt; bestList = new ArrayList&lt;Cell&gt;();&#xD;&#xA;		&#xD;&#xA;		int width = (int)Math.floor(enemy.position.x);&#xD;&#xA;		int height = (int)Math.floor(enemy.position.y);&#xD;&#xA;		&#xD;&#xA;		width = (width &lt; 0) ? 0 : width; &#xD;&#xA;		height = (height &lt; 0) ? 0 : height; &#xD;&#xA;		&#xD;&#xA;		Log.d(&quot;findEnemyPath, enemy X:Y&quot;, &quot;X&quot;+enemy.position.x+&quot;:&quot;+&quot;Y&quot;+enemy.position.y);&#xD;&#xA;		Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+height+&quot;:&quot;+&quot;Y&quot;+width);&#xD;&#xA;		Cell start = grid[height][width];&#xD;&#xA;		Cell goal = grid[ENEMY_GOAL_HEIGHT][ENEMY_GOAL_WIDTH];&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;		if(start.id != goal.id) {&#xD;&#xA;&#xD;&#xA;			Log.d(&quot;START CELL ID: &quot;, &quot;&quot;+start.id);&#xD;&#xA;			Log.d(&quot;GOAL CELL ID: &quot;, &quot;&quot;+goal.id);&#xD;&#xA;			//Log.d(&quot;findEnemyPath, grid X:Y&quot;, &quot;X&quot;+start.position.x+&quot;:&quot;+&quot;Y&quot;+start.position.y);&#xD;&#xA;			start.start = true;&#xD;&#xA;			goal.goal = true;&#xD;&#xA;			openList.add(start);&#xD;&#xA;			&#xD;&#xA;			while(openList.size() &gt; 0) {&#xD;&#xA;				Cell best = findBestPassThrough(openList, goal);&#xD;&#xA;				//Log.d(&quot;ID:&quot;, &quot;&quot;+best.id);&#xD;&#xA;				openList.remove(best);&#xD;&#xA;				closedList.add(best);&#xD;&#xA;				if (best.goal) {&#xD;&#xA;				    System.out.println(&quot;Found Goal&quot;);&#xD;&#xA;				    System.out.println(bestList.size());&#xD;&#xA;				    populateBestList(goal, bestList);&#xD;&#xA;				    /*&#xD;&#xA;				    for(Cell cell : bestList) {&#xD;&#xA;						Log.d(&quot;ID:&quot;, &quot;&quot;+cell.id);&#xD;&#xA;						Log.d(&quot;ParentID:&quot;, &quot;&quot;+cell.parent.id);&#xD;&#xA;				    }&#xD;&#xA;				    */&#xD;&#xA;				    Collections.reverse(bestList);&#xD;&#xA;			        Cell exit = new Cell(13.5f, 3.5f, 1, 1);&#xD;&#xA;			        exit.isExit = true;&#xD;&#xA;			        bestList.add(exit);&#xD;&#xA;			    	//Log.d(&quot;PathList&quot;, &quot;Enemy ID : &quot; + enemy.id);&#xD;&#xA;				    return bestList;&#xD;&#xA;				} &#xD;&#xA;				else {&#xD;&#xA;				    List&lt;Cell&gt; neighbors = getNeighbors(best);&#xD;&#xA;				    for (Cell neighbor : neighbors) {&#xD;&#xA;					    if(neighbor.isTower) {&#xD;&#xA;				    		continue;&#xD;&#xA;				    	}&#xD;&#xA;					    if (openList.contains(neighbor)) {&#xD;&#xA;					        Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;					        tmpCell.parent = best;&#xD;&#xA;					        if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;					        	continue;&#xD;&#xA;					        }&#xD;&#xA;					    }&#xD;&#xA;					    if (closedList.contains(neighbor)) {&#xD;&#xA;							Cell tmpCell = new Cell(neighbor.position.x, neighbor.position.y, 1, 1);&#xD;&#xA;							tmpCell.parent = best;&#xD;&#xA;							if (tmpCell.getPassThrough(goal) &gt;= neighbor.getPassThrough(goal)) {&#xD;&#xA;								continue;&#xD;&#xA;					    	}&#xD;&#xA;						}&#xD;&#xA;					    Log.d(&quot;Neighbor's Parent: &quot;, &quot;&quot;+best.id);&#xD;&#xA;					    neighbor.parent = best;&#xD;&#xA;						openList.remove(neighbor);&#xD;&#xA;						closedList.remove(neighbor);&#xD;&#xA;						openList.add(0, neighbor);&#xD;&#xA;				    }&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		Log.d(&quot;Cannot find a path&quot;, &quot;&quot;);&#xD;&#xA;		return null;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public double getPassThrough(Cell goal) {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return getLocalCost(goal) + getParentCost();&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    public double getLocalCost(Cell goal) {&#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		localCost = 1.0 * (Math.abs(this.position.x - goal.position.x) + Math.abs(this.position.y - goal.position.y));&#xD;&#xA;    		return localCost;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    public double getParentCost() {&#xD;&#xA;    &#xD;&#xA;    		if (start) {&#xD;&#xA;    			return 0.0;&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		if (parentCost == 0.0) {&#xD;&#xA;    			parentCost = 1.0 + .5 * (parent.getParentCost() - 1.0);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		return parentCost;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When the error occurs - O is empty, X is a tower. S is start, goal is G. The enemy would be created before the Start cell and proceed its path to goal. The infinite parent would happen - P. it looks like it'll happen in two places. one s to left and other s bottom. &#xD;&#xA;&#xD;&#xA;    O O O O O O O O T O O O &#xD;&#xA;    O O P O O O O T O O O O &#xD;&#xA;    O T P O O O T O O O O O &#xD;&#xA;    S T O O O O O O O O O G &#xD;&#xA;    O T O O T P O O O O O O &#xD;&#xA;    O O T T O P O O O O O O &#xD;&#xA;    O O O O O O O O O O O O &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31171" PostHistoryTypeId="2" PostId="13966" RevisionGUID="13f572c4-bb8a-46cd-b209-f61f4f82085c" CreationDate="2011-06-21T01:27:28.983" UserId="7981" Text="* Test all Your supporting functions (in second code listing) if You have not done it already.&#xD;&#xA;* Visualize or print to standard output what these object do. Make sure You know what each code does and that it does it perfectly.&#xD;&#xA;* There is lot of insight into collisions http://www.flipcode.com/archives/Theory_Practice-Issue_01_Collision_Detection.shtml .&#xD;&#xA;&#xD;&#xA;I just looked at the code I have not tried to prove where it is wrong.&#xD;&#xA;&#xD;&#xA;I looked at the code and these 2 lines seemed strange: &#xD;&#xA;&lt;!-- language: c# --&gt;&#xD;&#xA;&#xD;&#xA;    if ((Position.X &gt;= body.CornerMin.X &amp;&amp; Position.X &lt;= body.CornerMax.X) &amp;&amp;&#xD;&#xA;    (Position.Y + Height/2f == body.Position.Y - body.Height/2f))&#xD;&#xA;You check for interval and then You check for euquality? I may be wrong, (there might be som rounding going on) but it seems it might cause a trouble.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31173" PostHistoryTypeId="25" PostId="13955" RevisionGUID="2c2d82dd-8f57-4c15-a33b-1a151648af93" CreationDate="2011-06-21T03:24:47.147" Comment="http://twitter.com/#!/StackGameDev/status/83012456590487552" />
  <row Id="31174" PostHistoryTypeId="2" PostId="13968" RevisionGUID="09d1d50a-c525-45cd-8058-e248337a8b51" CreationDate="2011-06-21T03:34:22.507" UserId="953" Text="The only examples I can think of stretch your definition a bit.&#xD;&#xA;&#xD;&#xA;Uru Live (Myst Online) is an undead MMO adventure game in the Myst series. It gives players their own instances of puzzle worlds, but some worlds require or benefit from players working together.&#xD;&#xA;&#xD;&#xA;Zork: Grand Inquisitor has a co-op mode where one player controls the player character and the other player gets a &quot;look here&quot; cursor to help." />
  <row Id="31175" PostHistoryTypeId="2" PostId="13969" RevisionGUID="191b094d-6bea-4943-a6c4-9bad2376ffac" CreationDate="2011-06-21T04:01:31.233" UserId="7728" Text="Graphic adventure games of the type you describe were never made multiplayer for one main reason:  By the time computer networking was ubiquitous, the graphic adventure game genre was already dead.  The few graphic adventures still being made were being made as niche games for a niche audience, they intentionally weren't breaking new design ground.&#xD;&#xA;&#xD;&#xA;Yes, there are design challenges for making adventures work in a multiplayer context.  But there are always design challenges no matter what you make;  design challenges can be overcome.  The reason there are no multiplayer adventure games is that the market had decided it didn't want adventure games long before multiplayer ever became a real option." />
  <row Id="31176" PostHistoryTypeId="2" PostId="13970" RevisionGUID="934a26fb-2cd3-4f35-8028-ed1d2db0eaa7" CreationDate="2011-06-21T05:15:23.647" UserId="3405" Text="I think it is a legal thing for Unity. And, it doesn't seem fair that you make big $$$ and they don't get anything out of it." />
  <row Id="31177" PostHistoryTypeId="25" PostId="13956" RevisionGUID="fb6ae9d7-2aa2-4c75-817d-d81e9ac21c59" CreationDate="2011-06-21T06:24:47.310" Comment="http://twitter.com/#!/StackGameDev/status/83057755778334720" />
  <row Id="31178" PostHistoryTypeId="5" PostId="13857" RevisionGUID="1f8915f9-0969-49d6-b55f-09caadd0828e" CreationDate="2011-06-21T06:25:06.930" UserId="848" Comment="clarified about example" Text="I need a scenario for a small dialog-based game / interactive story. The game would be used as an example to be shipped with a middleware tool we're developing.&#xD;&#xA;&#xD;&#xA;I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to write a new one.&#xD;&#xA;&#xD;&#xA;Please advise, where to go to find such person / service? We're based in Russia, so getting a talented enough native English writer locally is a bit of a problem. &#xD;&#xA;&#xD;&#xA;Update: To be extra clear: We must get all necessary rights to reuse the story and make a derived work (i.e. the game we're talking about) from it. This is a commercial product. Borrowing someone else's work at random and using it just not going to work.&#xD;&#xA;&#xD;&#xA;***WARNING:* Please do not post &quot;I can do it&quot; answers here. *This is not a job board!* You will get downvoted and your answer will be deleted. Look into my profile instead.**" />
  <row Id="31179" PostHistoryTypeId="5" PostId="13857" RevisionGUID="13dd684e-4736-4fde-92dc-2700d5ba93f4" CreationDate="2011-06-21T07:10:18.920" UserId="848" Comment="Downplayed &quot;contact me&quot; part" Text="I need a scenario for a small dialog-based game / interactive story. The game would be used as an example to be shipped with a middleware tool we're developing.&#xD;&#xA;&#xD;&#xA;I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to write a new one.&#xD;&#xA;&#xD;&#xA;Please advise, where to go to find such person / service? We're based in Russia, so getting a talented enough native English writer locally is a bit of a problem. &#xD;&#xA;&#xD;&#xA;Update: To be extra clear: We must get all necessary rights to reuse the story and make a derived work (i.e. the game we're talking about) from it. This is a commercial product. Borrowing someone else's work at random and using it just not going to work.&#xD;&#xA;&#xD;&#xA;***WARNING:* Please do not post &quot;I can do it&quot; answers here. *This is not a job board!* You will get downvoted and your answer will be deleted.** If you really want to contact me, look into my profile." />
  <row Id="31180" PostHistoryTypeId="2" PostId="13971" RevisionGUID="38702232-249a-4c5b-863d-3e6fe9870d9a" CreationDate="2011-06-21T07:58:24.443" UserId="678" Text="The &quot;modern&quot; way to render terrain is to use [chunked LOD][1]. &#xD;&#xA;&#xD;&#xA;With the last few generations of hardware, say the last 5-10 years, fiddling with the geometry primitives on a per frame level (as is needed e.g. for ROAM) is counterproductive as it incurs a horrible performance hit. You are much better off building a whole array of immutable chunks and selecting the proper ones based on distance etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tulrich.com/geekstuff/chunklod.html" />
  <row Id="31181" PostHistoryTypeId="2" PostId="13972" RevisionGUID="ff473102-8ca2-4515-b489-d1754753b282" CreationDate="2011-06-21T08:40:40.947" UserId="4129" Text="I wake up with a clear vision, but sadly my laptop card doesn't do displacement mapping nor `glVertexAttribDivisor` so I can't test it out; I'm left sharing here:&#xD;&#xA;&#xD;&#xA;With geomipmapping, the grid at any factor is transposable - if you pass in an offset - say as a uniform - you can reuse the same vertex and index array again and again.&#xD;&#xA;&#xD;&#xA;If you also pass in the offset into the heightmap as a uniform, the vertex shader can do displacement mapping.  If the displacement map is mipmapped, you get the advantages of trilinear filtering for distant maps.&#xD;&#xA;&#xD;&#xA;And, if the scenery is closer, rather than exposing that the you have a world made out of quads, you can use your transposable grid vertex array and indices to do vertex-shader interpolation (fancy splines) to do super-smooth *infinite zoom*?&#xD;&#xA;&#xD;&#xA;So I have some questions:&#xD;&#xA;&#xD;&#xA; 1. does it work?  In theory, in practice?&#xD;&#xA; 2. does anyone do it?  Does this technique have a name?  Papers, demos, anything I can look at?&#xD;&#xA; 3. does `glVertexAttribDivisor` mean that you can have a single `glMultiDrawElementsEXT` or similar approach to draw all your terrain tiles in one call rather than setting up the uniforms and emitting each tile?  Would this offer any noticeable gains?&#xD;&#xA; 4. does a heightmap that is GL_LUMINANCE take just one byte per pixel(=vertex)?  (*On mainstream cards*, obviously.  Does storage vary in practice?)  Does going to the effort of reusing the same vertices and indices mean that you can basically fill the GPU RAM with heightmap and not a lot else, giving you either bigger landscapes or more detailed landscapes/meshes for the same bang?&#xD;&#xA; 5. is mipmapping the displacement map going to work?  On future cards?  Is it going to introduce unsurmountable inaccuracies if it is enabled?" />
  <row Id="31182" PostHistoryTypeId="1" PostId="13972" RevisionGUID="ff473102-8ca2-4515-b489-d1754753b282" CreationDate="2011-06-21T08:40:40.947" UserId="4129" Text="geomipmapping using displacement mapping (and glVertexAttribDivisor)" />
  <row Id="31183" PostHistoryTypeId="3" PostId="13972" RevisionGUID="ff473102-8ca2-4515-b489-d1754753b282" CreationDate="2011-06-21T08:40:40.947" UserId="4129" Text="&lt;opengl&gt;&lt;glsl&gt;&lt;displacement-mapping&gt;&lt;geo-mipmapping&gt;&lt;mipmapping&gt;" />
  <row Id="31184" PostHistoryTypeId="2" PostId="13973" RevisionGUID="282ddde0-5f90-4902-8aae-672a35eba900" CreationDate="2011-06-21T09:02:06.243" UserId="8154" Text="Mea culpa. Should have done more research before posting.&#xD;&#xA;&#xD;&#xA;Alexander, you can check out the IGDA's Game Writing Special Interest Group -- there, you'll find information about freelance writers in the industry. You can also sign up for the mailing list, which will allow you to get in touch with game writers directly.&#xD;&#xA;&#xD;&#xA;http://www.igda.org/writing&#xD;&#xA;&#xD;&#xA;GameGuzzler is a good site for posting ads for contract writers. I believe someone else may have mentioned Gamasutra already, but I'll emphatically add a recommendation for that one as well.&#xD;&#xA;&#xD;&#xA;http://www.gameguzzler.com&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31185" PostHistoryTypeId="2" PostId="13974" RevisionGUID="e36ece9f-9c66-4e7c-a5b2-74c3076fbd3f" CreationDate="2011-06-21T10:13:37.183" UserId="323" Text="This isn't a perfect match, but [Dominions 3][1] is the first thing I thought of. It's got the simultaneous movement and heavy use of diplomacy in order to win games. There's no official way to &quot;support&quot; units, besides having them form larger armies, and there's no way two players can assist each other in combat. But from what little I played of Diplomacy, Dominions 3 has the same basic feel, only with, you know, hordes of monsters and worldshattering spells added.&#xD;&#xA;&#xD;&#xA;In a more general sense you might want to look into the [Play-By-Mail][2] genre, now frequently referred to as Play-By-Email or PBEM. There are many, many examples of this genre, but besides Dominions 3 it may also be worth looking at the venerable [VGA Planets][3] and [Stars!][4] games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.shrapnelgames.com/Illwinter/DOM3/DOM3_page.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Play-by-mail_game&#xD;&#xA;  [3]: http://www.vgaplanets.com/&#xD;&#xA;  [4]: http://www.starsfaq.com/index.htm" />
  <row Id="31186" PostHistoryTypeId="16" PostId="13974" RevisionGUID="64582f6e-7b98-4ffa-9d3f-8e9b97559e0a" CreationDate="2011-06-21T10:13:37.183" UserId="323" />
  <row Id="31187" PostHistoryTypeId="5" PostId="13962" RevisionGUID="67e0c21b-e093-4ed1-a170-2bc2421ffeb1" CreationDate="2011-06-21T12:04:25.747" UserId="7888" Comment="Corrected Vector2 math to Vector3 math for cross product use; clarified distance check with better variable name; changed code to conform to the asker's specified language and framework" Text="I wouldn't bother with pixel-perfect collision if you only need to detect clicks on triangles and circles.&#xD;&#xA;&#xD;&#xA;For circles you can use a basic distance check from the center of the button. &#xD;&#xA;&#xD;&#xA;    if ( radius &gt;= Math.sqrt( Math.pow( clickX - centerX, 2 ) + Math.pow( clickY - centerY, 2 ) ) )&#xD;&#xA;        // we have been clicked&#xD;&#xA;&#xD;&#xA;And for triangles you can use a [point-in-triangle][1] test. If you have a triangle with vertices A, B, and C:&#xD;&#xA;&#xD;&#xA;    /**&#xD;&#xA;     * Return true if p1 and p2 are on the same side of BA&#xD;&#xA;     */&#xD;&#xA;    public static boolean SameSide(Vector2 p1, Vector2 p2, Vector2 A, Vector2 B)&#xD;&#xA;    {&#xD;&#xA;        // Convert points to Vector3 for use the Cross product, which is Vector3-only&#xD;&#xA;        Vector3 cp1 = Vector3.Cross(new Vector3(B-A, 0), new Vector3(p1-A, 0));&#xD;&#xA;        Vector3 cp2 = Vector3.Cross(new Vector3(B-A, 0), new Vector3(p2-A, 0));&#xD;&#xA;        return Vector3.Dot(cp1, cp2) &gt;= 0;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /**&#xD;&#xA;     * Return true if the point p is in the triangle ABC&#xD;&#xA;     */&#xD;&#xA;    public static boolean PointInTriangle(Vector2 p, Vector2 A, Vector2 B, Vector2 C)&#xD;&#xA;    {&#xD;&#xA;        return SameSide(p,A, B,C) &amp;&amp; SameSide(p,B, A,C) &amp;&amp; SameSide(p,C, A,B);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;There is also the [Barycentric technique][2], which increases computational efficiency at the expense of clarity. XNA provides a `Vector2.Barycentric` [method][3] which can help alleviate that issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mathworld.wolfram.com/TriangleInterior.html&#xD;&#xA;  [2]: http://www.blackpawn.com/texts/pointinpoly/default.html&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector2.barycentric.aspx" />
  <row Id="31188" PostHistoryTypeId="25" PostId="13939" RevisionGUID="4497ab0c-2c02-4601-a64a-90088ccfc7f5" CreationDate="2011-06-21T12:24:46.773" Comment="http://twitter.com/#!/StackGameDev/status/83148352476291072" />
  <row Id="31189" PostHistoryTypeId="2" PostId="13975" RevisionGUID="8498d52f-9e18-47fd-a1a5-fb74424d8a5b" CreationDate="2011-06-21T14:22:57.483" UserId="1742" Text="In your game assets do you make room for explicit sanity checks, or do you have some generally expected bounds which you assert?&#xD;&#xA;&#xD;&#xA;I've been thinking about how we compress data and thought that it's much better to have the former, and less of the latter. If your data can exceed your normal valid ranges, but if it does it's an error, then surely that implies you're not compressing the data well enough?&#xD;&#xA;&#xD;&#xA;What do you do to find out if your data is compressed as far as it can be, and what do you use to ensure your data isn't corrupted and ensure it's an official release?" />
  <row Id="31190" PostHistoryTypeId="1" PostId="13975" RevisionGUID="8498d52f-9e18-47fd-a1a5-fb74424d8a5b" CreationDate="2011-06-21T14:22:57.483" UserId="1742" Text="Sanity checks vs file sizes" />
  <row Id="31191" PostHistoryTypeId="3" PostId="13975" RevisionGUID="8498d52f-9e18-47fd-a1a5-fb74424d8a5b" CreationDate="2011-06-21T14:22:57.483" UserId="1742" Text="&lt;assets&gt;&lt;release&gt;&lt;compression&gt;&lt;validation&gt;" />
  <row Id="31192" PostHistoryTypeId="2" PostId="13976" RevisionGUID="9a71e4f3-04a1-479e-b13c-5f09ac422fa7" CreationDate="2011-06-21T14:23:24.460" UserId="7804" Text="Game review blog *Rock Paper Shotgun* [reviewed][1] a team-work board game somewhat unimaginatively named *Space Alert*. The review however is a great read and the game seems ridiculously fun.&#xD;&#xA;&#xD;&#xA;The game takes the *Diplomacy* concept to the extreme in that the whole game is played to the end before everyone finds out if they won or lost.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rockpapershotgun.com/2011/06/11/not-cardboard-children-space-alert/" />
  <row Id="31193" PostHistoryTypeId="16" PostId="13976" RevisionGUID="08416435-bbc5-407b-b9a8-6d9d19f9b35a" CreationDate="2011-06-21T14:23:24.460" UserId="7804" />
  <row Id="31194" PostHistoryTypeId="2" PostId="13977" RevisionGUID="3bbddc0d-d3a1-4c7a-9b14-2d7223e8b90a" CreationDate="2011-06-21T14:29:27.160" UserId="7328" Text="I with a bunch of friend were talking about an adventure game. there will be too many possibilities in the game and the player can pick from wide varity of choices at each stage to do somthing. there will be consequences for each decision and they may or may not end the story. the result would be somthing like ![this picture from flashforward series][1] &#xD;&#xA;(picture from flashforward series S01E17)or if any of you watched hereos season 1 there is also similar time lines represented as strings in isaac mandez workshop. sorry for bad quality examples but right now I can't think of any better one.&#xD;&#xA;&#xD;&#xA;do you know any website or application which we can use to create the timeline? these features the least required ones:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; * the ability to represent events as boxes.&#xD;&#xA; * the ability to connect distant events to each other.&#xD;&#xA; * the ability to move events on a scene freely&#xD;&#xA; * the ability to expand the scene easily&#xD;&#xA; * there should be some color options for the lines representing connections between events&#xD;&#xA; * easily shareing the idea with one another&#xD;&#xA; * it's much more better to have a WYSIWYG editor&#xD;&#xA; * easily explore in the large scene of events&#xD;&#xA;&#xD;&#xA;in the end if you know any application which could let me create a board just like the one in my sample picture and share it whith other freinds it could help us a lot. &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RSNem.png" />
  <row Id="31195" PostHistoryTypeId="1" PostId="13977" RevisionGUID="3bbddc0d-d3a1-4c7a-9b14-2d7223e8b90a" CreationDate="2011-06-21T14:29:27.160" UserId="7328" Text="any online service and/or application to develop a story line for an adventure game?" />
  <row Id="31196" PostHistoryTypeId="3" PostId="13977" RevisionGUID="3bbddc0d-d3a1-4c7a-9b14-2d7223e8b90a" CreationDate="2011-06-21T14:29:27.160" UserId="7328" Text="&lt;storyboard&gt;&lt;development-tool&gt;" />
  <row Id="31197" PostHistoryTypeId="2" PostId="13978" RevisionGUID="aeac55ca-4efa-4653-a875-fcace70b3539" CreationDate="2011-06-21T14:39:43.270" UserId="7588" Text="You could use [StarUML](http://staruml.sourceforge.net/en/), it's not strictly speaking for this kind of useage, but you could create quite easily any sort of diagram you want.&#xD;&#xA;&#xD;&#xA;Microsoft Visio is also a good piece of software, if you're a Student check with your campus you may be ably to get it free, otherwise you have to pay." />
  <row Id="31198" PostHistoryTypeId="2" PostId="13979" RevisionGUID="98172d03-adba-4f9d-8810-870f5ecacbd8" CreationDate="2011-06-21T14:39:51.900" UserId="1430" Text="Any kind of diagramming/graphing tool should be able to handle this. [OmniGraffle][1] on the Mac is an excellent choice -- options on Windows include [Visio][2], [Dia][3] or the drawing program that comes with OpenOffice (maybe, not ever used it).&#xD;&#xA;&#xD;&#xA;As far as I know there are no real dedicated storyboarding software that supports egregious branching like that. There are programs like Scrivener ([Mac][4], [Windows][5]) that can be used to organize story concepts and flow, but they don't generally bother with a graph view because it is a limited practical utility.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.omnigroup.com/products/omnigraffle/support/&#xD;&#xA;  [2]: http://office.microsoft.com/en-us/visio/&#xD;&#xA;  [3]: http://live.gnome.org/Dia&#xD;&#xA;  [4]: http://www.literatureandlatte.com/scrivener.php&#xD;&#xA;  [5]: http://www.literatureandlatte.com/scrivenerforwindows/" />
  <row Id="31199" PostHistoryTypeId="2" PostId="13980" RevisionGUID="6efa9a88-f44e-4b09-bf81-dd14e8ea6fc8" CreationDate="2011-06-21T14:48:04.280" UserId="1430" Text="I wouldn't bother sanity checking or asserting against the size of individual assets. I would have a report or something that could tell me the total size of my final asset bundle, and if that exceeded something I was comfortable with I might look into using a more aggressive compression routine or something, but that would be an entirely manual check unless I was working on a platform with very strict hardware limitations (and thus I had very strict memory budgets).&#xD;&#xA;&#xD;&#xA;Regardless this would be something done at asset compile time, and would be optional, otherwise one might restrict the ability for end-users to mod one's game, which is usually a negative. &#xD;&#xA;&#xD;&#xA;Remember that exceeding the predefined bounds of your asset volume may have just meant you mis-estimated your asset volume in your initial planning, not that anything has, per se, gone &quot;wrong.&quot; &#xD;&#xA;&#xD;&#xA;I also wouldn't worry too much about this because of most of the time compressing the data &quot;well enough&quot; or not is largely out of our hands -- sure, we can elect to use data formats that compress better under certain algorithms, but we shouldn't be doing that at the cost of quality of the in-game asset as a general rule, and unless we're writing our own compression there's only so far we can get things compressed. Unless I've misunderstood you, I sort of feel like this issue is overly hand-wringy." />
  <row Id="31200" PostHistoryTypeId="5" PostId="13978" RevisionGUID="6f7dbd09-bc45-46d1-995f-b4fe23d49657" CreationDate="2011-06-21T15:03:48.050" UserId="7588" Comment="added 239 characters in body; added 144 characters in body" Text="You could use [StarUML](http://staruml.sourceforge.net/en/), it's not strictly speaking for this kind of useage, but you could create quite easily any sort of diagram you want.&#xD;&#xA;&#xD;&#xA;Microsoft Visio is also a good piece of software, if you're a Student check with your campus you may be ably to get it free, otherwise you have to pay.&#xD;&#xA;&#xD;&#xA;I also found a forum thread (are we allowed to post to other forums?) that had a few free links to specific storyboarding software :&#xD;&#xA;&#xD;&#xA;http://www.atomiclearning.com/storyboardpro&#xD;&#xA;&#xD;&#xA;http://www.newfreedownloads.com/find/storyboard.html&#xD;&#xA;&#xD;&#xA;Indeed it seems you need to search for film creation tools to get anything like what you want. When will people learn Games aren't Films? :P" />
  <row Id="31201" PostHistoryTypeId="25" PostId="13977" RevisionGUID="e46960b7-f827-413f-854b-1334b042f52e" CreationDate="2011-06-21T15:24:46.883" Comment="http://twitter.com/#!/StackGameDev/status/83193651630583808" />
  <row Id="31203" PostHistoryTypeId="5" PostId="13975" RevisionGUID="28717ce5-c9e1-4b4b-a5b8-e6a13f7e879c" CreationDate="2011-06-21T15:44:39.473" UserId="1742" Comment="added 404 characters in body" Text="In your game assets do you make room for explicit sanity checks, or do you have some generally expected bounds which you assert?&#xD;&#xA;&#xD;&#xA;I've been thinking about how we compress data and thought that it's much better to have the former, and less of the latter. If your data can exceed your normal valid ranges, but if it does it's an error, then surely that implies you're not compressing the data well enough?&#xD;&#xA;&#xD;&#xA;What do you do to find out if your data is compressed as far as it can be, and what do you use to ensure your data isn't corrupted and ensure it's an official release?&#xD;&#xA;&#xD;&#xA;*EDIT*&#xD;&#xA;&#xD;&#xA;I'm not interested in sanity checking the file size, but instead, how you manage your sanity checks and whether you arrange the excess size caused by the opportunity to do sanity checks by using explicit extra data, or through allowing the data enough file space (data member size) to be out of valid range and thus able to be checked merely by looking at the asset in memory after loading." />
  <row Id="31204" PostHistoryTypeId="2" PostId="13981" RevisionGUID="ef81dc0f-ed66-4870-a393-e333e3f44320" CreationDate="2011-06-21T16:12:19.950" UserId="1386" Text="[CmapTools][1] was used to create this image, which is a visualization of a Choose Your Own Adventure book. This might fit your needs, even though it's not specialized for story-writing.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The full size image is available [here][3].&#xD;&#xA;&#xD;&#xA;The author of the image has some things to say about it and has some other recommendations:&#xD;&#xA;&#xD;&#xA;&gt; In addition to CMapTools, which has an invaluable “auto-arrange” feature, there are other tools you might want to try. [Bubbl.us][4] allows you to make maps of this sort online. You can try Powerpoint or Visio...&#xD;&#xA;&#xD;&#xA;[(read more here)][5]&#xD;&#xA;&#xD;&#xA;Disclaimer: I haven't used it myself&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cmap.ihmc.us/download/&#xD;&#xA;  [2]: http://i.stack.imgur.com/EPuxm.jpg&#xD;&#xA;  [3]: http://classweb.gmu.edu/msample1/fall2005/343/caveoftime.jpg&#xD;&#xA;  [4]: https://bubbl.us/&#xD;&#xA;  [5]: http://www.samplereality.com/gmu/fall2008/343/guidelines/media-inquiry-1-cyoa/" />
  <row Id="31205" PostHistoryTypeId="2" PostId="13982" RevisionGUID="f46de9cb-dab5-4893-a92e-c4db7a9310d4" CreationDate="2011-06-21T16:20:38.853" UserId="4584" Text="I'm loading a simple 6 sided cube from an FBX model and I'm using a BoundingBox to test for collisions. Once I determine there's a collision, I want to use the normal vector of the collided surface to correct the movement of whatever collided with the cube. I suppose this is a two-part question:&#xD;&#xA;&#xD;&#xA;1) How can I determine which face of the cube was collided with in a collision?&#xD;&#xA;&#xD;&#xA;2) How can I get the normal vector of that surface?" />
  <row Id="31206" PostHistoryTypeId="1" PostId="13982" RevisionGUID="f46de9cb-dab5-4893-a92e-c4db7a9310d4" CreationDate="2011-06-21T16:20:38.853" UserId="4584" Text="Normal vector of a face loaded from an FBX model during collision?" />
  <row Id="31207" PostHistoryTypeId="3" PostId="13982" RevisionGUID="f46de9cb-dab5-4893-a92e-c4db7a9310d4" CreationDate="2011-06-21T16:20:38.853" UserId="4584" Text="&lt;xna&gt;&lt;collision-detection&gt;" />
  <row Id="31208" PostHistoryTypeId="5" PostId="13982" RevisionGUID="e1af6319-05bf-42ab-8fe4-b49495916af0" CreationDate="2011-06-21T16:28:43.810" UserId="4584" Comment="added 9 characters in body" Text="I'm loading a simple 6 sided cube from a UV-mapped FBX model and I'm using a BoundingBox to test for collisions. Once I determine there's a collision, I want to use the normal vector of the collided surface to correct the movement of whatever collided with the cube. I suppose this is a two-part question:&#xD;&#xA;&#xD;&#xA;1) How can I determine which face of the cube was collided with in a collision?&#xD;&#xA;&#xD;&#xA;2) How can I get the normal vector of that surface?" />
  <row Id="31209" PostHistoryTypeId="2" PostId="13983" RevisionGUID="5b016957-c214-46bb-81ee-09015c7ef58f" CreationDate="2011-06-21T16:57:14.623" UserId="4129" Text="It is telling that big games have not tried too hard to keep the file formats slim.  Things like MD2 and MD5 would compress much much better and be much smaller if they weren't text formats, if they were triangle strips and fans and such, and other simple tricks.  Its as if the team were deliberately not concerning themselves with data size.&#xD;&#xA;&#xD;&#xA;On the other hand, compressing the textures and the cut scenes seems to be worth much more effort.&#xD;&#xA;&#xD;&#xA;I would always favour robustness over size.  It worries me when I see binary formats that are designed to fit a given C struct layout.  That will really bite you later.  And its where bugs can hide and, later, an attack vector.  Best to go with nice formats that you read in and validate each and every load.  Triply so if you start using user generated content or p2p." />
  <row Id="31210" PostHistoryTypeId="5" PostId="13983" RevisionGUID="2df3e19b-384b-4c2a-9947-7ef554c37967" CreationDate="2011-06-21T17:04:20.077" UserId="4129" Comment="added 632 characters in body" Text="It is telling that big games have not tried too hard to keep the file formats slim.  Things like MD2 and MD5 would compress much much better and be much smaller if they weren't text formats, if they were triangle strips and fans and such, and other simple tricks.  Its as if the team were deliberately not concerning themselves with data size.&#xD;&#xA;&#xD;&#xA;On the other hand, compressing the textures and the cut scenes seems to be worth much more effort.&#xD;&#xA;&#xD;&#xA;I would always favour robustness over size.  It worries me when I see binary formats that are designed to fit a given C struct layout.  That will really bite you later.  And its where bugs can hide and, later, an attack vector.  Best to go with nice formats that you read in and validate each and every load.  Triply so if you start using user generated content or p2p.&#xD;&#xA;&#xD;&#xA;I'm just a hobbyist who has looked at file sizes for the current spins on Glest and my own efforts.  I see that Charles Bloom - someone who really made an impact on compression in the 1990s - then went to Oddworld.  One wonders why compression wasn't a talked-up part of what he did there - you can draw the conclusion that if the top dog in the data compression field goes and does graphics engines for game company, rather than data compression, that data compression is not where its at.  He probably cares more about load times in the gaming context?  His [blog][1] is brilliant.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cbloomrants.blogspot.com/" />
  <row Id="31211" PostHistoryTypeId="2" PostId="13984" RevisionGUID="9e5afae4-3247-4cf8-9873-dc30f7571555" CreationDate="2011-06-21T17:14:51.230" UserId="8163" Text="I have implemented A* Path finding to decide the course of a sprite through multiple waypoints. I have done this for point A to point B locations but am having trouble with multiple waypoints, because on slower devices when the FPS slows and the sprite travels PAST a waypoint I am lost as to the math to switch directions at the proper place.&#xD;&#xA;&#xD;&#xA;Here is the scenario:&#xD;&#xA;&#xD;&#xA;    public void onUpdate(float pSecondsElapsed)&#xD;&#xA;    {&#xD;&#xA;        // this could be 4x speed, so on slow devices the travel moved between&#xD;&#xA;        // frames could be very large. What happens with my original algorithm&#xD;&#xA;        // is it will start actually doing circles around the next waypoint..&#xD;&#xA;        pSecondsElapsed *= SomeSpeedModificationValue;&#xD;&#xA;&#xD;&#xA;        final int spriteCurrentX = this.getX();&#xD;&#xA;        final int spriteCurrentY = this.getY();&#xD;&#xA;&#xD;&#xA;        // getCoords contains a large array of the coordinates to each waypoint.&#xD;&#xA;        // A waypoint is a destination on the map, defined by tile column/row. The&#xD;&#xA;        // path finder converts these waypoints to X,Y coords.&#xD;&#xA;        //&#xD;&#xA;        // I.E:&#xD;&#xA;        // Given a set of waypoints of 0,0 to 12,23 to 23, 0 on a 23x23 tile map, each tile&#xD;&#xA;        // being 32x32 pixels. This would translate in the path finder to this:&#xD;&#xA;        //    -&gt; 0,0 to 12,23&#xD;&#xA;        //        Coord : x=16 y=16&#xD;&#xA;        //        Coord : x=16 y=48&#xD;&#xA;        //        Coord : x=16 y=80&#xD;&#xA;        //          ...&#xD;&#xA;        //        Coord : x=336 y=688&#xD;&#xA;        //        Coord : x=336 y=720&#xD;&#xA;        //        Coord : x=368 y=720&#xD;&#xA;        //&#xD;&#xA;        //    -&gt; 12,23 to 23,0 -NOTE This direction change gives me trouble specifically&#xD;&#xA;        //        Coord : x=400 y=752&#xD;&#xA;        //        Coord : x=400 y=720&#xD;&#xA;        //        Coord : x=400 y=688&#xD;&#xA;        //          ...&#xD;&#xA;        //        Coord : x=688 y=16&#xD;&#xA;        //        Coord : x=688 y=0&#xD;&#xA;        //        Coord : x=720 y=0&#xD;&#xA;        //&#xD;&#xA;        // The current update index, the index specifies the coordinate that you see above&#xD;&#xA;        // I.E. final int[] coords = getCoords( 2 ); -&gt; x=16 y=80&#xD;&#xA;        final int[] coords = getCoords( ... );&#xD;&#xA;&#xD;&#xA;        // now I have the coords, how do I detect where to set the position? The tricky part&#xD;&#xA;        // for me is when a direction changes, how do I calculate based on the elapsed time&#xD;&#xA;        // how far to go up the new direction... I just can't wrap my head around this.&#xD;&#xA;&#xD;&#xA;        this.setPosition(newX, newY);&#xD;&#xA;    }" />
  <row Id="31212" PostHistoryTypeId="1" PostId="13984" RevisionGUID="9e5afae4-3247-4cf8-9873-dc30f7571555" CreationDate="2011-06-21T17:14:51.230" UserId="8163" Text="Coordinate based travel through multi-line path over elapsed time" />
  <row Id="31213" PostHistoryTypeId="3" PostId="13984" RevisionGUID="9e5afae4-3247-4cf8-9873-dc30f7571555" CreationDate="2011-06-21T17:14:51.230" UserId="8163" Text="&lt;math&gt;&lt;algorithm&gt;&lt;sprites&gt;&lt;path-finding&gt;&lt;coordinates&gt;" />
  <row Id="31214" PostHistoryTypeId="5" PostId="13984" RevisionGUID="65c1f12a-9634-4f13-a5fe-f3ecb73abc02" CreationDate="2011-06-21T17:25:02.757" UserId="8163" Comment="added 470 characters in body" Text="I have implemented A* Path finding to decide the course of a sprite through multiple waypoints. I have done this for point A to point B locations but am having trouble with multiple waypoints, because on slower devices when the FPS slows and the sprite travels PAST a waypoint I am lost as to the math to switch directions at the proper place.&#xD;&#xA;&#xD;&#xA;EDIT: To clarify my path finding code is separate in a game thread, this onUpdate method lives in a sprite like class which happens in the UI thread for sprite updating. To be even more clear the path is only updated when objects block the map, at any given point the current path could change but that should not affect the design of the algorithm if I am not mistaken. I do believe all components involved are well designed and accurate, aside from this piece :- )&#xD;&#xA;&#xD;&#xA;Here is the scenario:&#xD;&#xA;&#xD;&#xA;    public void onUpdate(float pSecondsElapsed)&#xD;&#xA;    {&#xD;&#xA;        // this could be 4x speed, so on slow devices the travel moved between&#xD;&#xA;        // frames could be very large. What happens with my original algorithm&#xD;&#xA;        // is it will start actually doing circles around the next waypoint..&#xD;&#xA;        pSecondsElapsed *= SomeSpeedModificationValue;&#xD;&#xA;&#xD;&#xA;        final int spriteCurrentX = this.getX();&#xD;&#xA;        final int spriteCurrentY = this.getY();&#xD;&#xA;&#xD;&#xA;        // getCoords contains a large array of the coordinates to each waypoint.&#xD;&#xA;        // A waypoint is a destination on the map, defined by tile column/row. The&#xD;&#xA;        // path finder converts these waypoints to X,Y coords.&#xD;&#xA;        //&#xD;&#xA;        // I.E:&#xD;&#xA;        // Given a set of waypoints of 0,0 to 12,23 to 23, 0 on a 23x23 tile map, each tile&#xD;&#xA;        // being 32x32 pixels. This would translate in the path finder to this:&#xD;&#xA;        //    -&gt; 0,0 to 12,23&#xD;&#xA;        //        Coord : x=16 y=16&#xD;&#xA;        //        Coord : x=16 y=48&#xD;&#xA;        //        Coord : x=16 y=80&#xD;&#xA;        //          ...&#xD;&#xA;        //        Coord : x=336 y=688&#xD;&#xA;        //        Coord : x=336 y=720&#xD;&#xA;        //        Coord : x=368 y=720&#xD;&#xA;        //&#xD;&#xA;        //    -&gt; 12,23 to 23,0 -NOTE This direction change gives me trouble specifically&#xD;&#xA;        //        Coord : x=400 y=752&#xD;&#xA;        //        Coord : x=400 y=720&#xD;&#xA;        //        Coord : x=400 y=688&#xD;&#xA;        //          ...&#xD;&#xA;        //        Coord : x=688 y=16&#xD;&#xA;        //        Coord : x=688 y=0&#xD;&#xA;        //        Coord : x=720 y=0&#xD;&#xA;        //&#xD;&#xA;        // The current update index, the index specifies the coordinate that you see above&#xD;&#xA;        // I.E. final int[] coords = getCoords( 2 ); -&gt; x=16 y=80&#xD;&#xA;        final int[] coords = getCoords( ... );&#xD;&#xA;&#xD;&#xA;        // now I have the coords, how do I detect where to set the position? The tricky part&#xD;&#xA;        // for me is when a direction changes, how do I calculate based on the elapsed time&#xD;&#xA;        // how far to go up the new direction... I just can't wrap my head around this.&#xD;&#xA;&#xD;&#xA;        this.setPosition(newX, newY);&#xD;&#xA;    }" />
  <row Id="31215" PostHistoryTypeId="2" PostId="13985" RevisionGUID="96e51ae4-5e1b-4059-b28f-ccbad907685d" CreationDate="2011-06-21T17:31:02.703" UserId="3056" Text="I want to create a render target that is 32-bit, with 16 bits each for alpha and luminance. The closest surface formats I can find in the DirectX SDK are:&#xD;&#xA;&#xD;&#xA;    D3DFMT_A8L8   // 16-bit using 8 bits each for alpha and luminance.&#xD;&#xA;    D3DFMT_G16R16F   // 32-bit float format using 16 bits for the red channel and 16 bits for the green channel.&#xD;&#xA;&#xD;&#xA;But I don't think either of these will work, since D3DFMT_A8L8 doesn't have the precision and D3DFMT_G16R16F doesn't have an alpha channel (I need a separate blend state for alpha).  &#xD;&#xA;&#xD;&#xA;How can I create a render target that allows a separate blend state for luminance and alpha, with 16 bit precision on each channel, that doesn't exceed 32 bits per pixel?" />
  <row Id="31216" PostHistoryTypeId="1" PostId="13985" RevisionGUID="96e51ae4-5e1b-4059-b28f-ccbad907685d" CreationDate="2011-06-21T17:31:02.703" UserId="3056" Text="How can I make a 32 bit render target with a 16 bit alpha channel in DirectX?" />
  <row Id="31217" PostHistoryTypeId="3" PostId="13985" RevisionGUID="96e51ae4-5e1b-4059-b28f-ccbad907685d" CreationDate="2011-06-21T17:31:02.703" UserId="3056" Text="&lt;rendering&gt;&lt;directx9&gt;&lt;blending&gt;" />
  <row Id="31218" PostHistoryTypeId="2" PostId="13986" RevisionGUID="f10eefbd-7f04-40d9-b4f9-a2995de2699b" CreationDate="2011-06-21T17:39:15.083" UserId="962" Text="When using a variable time-step, the game becomes non deterministic, as you can see it can break the flow of gameplay on a slower device.&#xD;&#xA;&#xD;&#xA;The easiest way to fix this error would be to implement a fixed timestep with interpolation. If implemented correctly the logic of the game will always update at the same rate, and becomes deterministic, meaning a simulation will always play out the same(if there are no random numbers, or if there are random numbers the random numbers are seeded the same way).&#xD;&#xA;&#xD;&#xA;Here is an answer with resources on how to implement a fixed timestep.   &#xD;&#xA;http://gamedev.stackexchange.com/questions/12347/semi-fixed-or-fully-fixed-timestep/12368#12368&#xD;&#xA;&#xD;&#xA;Here is an answer that explains how to implement interpolation for movement and transformations.  &#xD;&#xA;http://gamedev.stackexchange.com/questions/12754/how-to-interpolate-between-two-game-states/12760#12760" />
  <row Id="31219" PostHistoryTypeId="2" PostId="13987" RevisionGUID="de29c2e5-97c9-4119-966a-9b5592e29d4b" CreationDate="2011-06-21T18:10:53.080" UserId="7911" Text="I've done two things for release builds in the past, I've never added extra data.&#xD;&#xA;&#xD;&#xA;First is all the data is described by a manifest that has a CRC or MD5 and at program startup the local files are checked against their expected hash.  A patching system will do this for you, if you use one, so it's almost automatic.&#xD;&#xA;&#xD;&#xA;Second is not to use asserts (which disappear in release modes) but simple range checks, for example does a bitmap have &gt;2048 width, which will catch malformed data.&#xD;&#xA;&#xD;&#xA;Josh Petrie's remarks are right on.  Since we're talking about Games here, runtime performance is valued very highly while maximal compression is merely a nice thing to have.&#xD;&#xA;&#xD;&#xA;Preparing data offline to unpack directly into C structures on a target platform is very fast technique that's been used for decades.  While I'm sure it could be perverted into an attack vector it's far more likely that the EXE itself is violated and not the data and so efforts to failsafe the data are wasted and better spent elsewhere.&#xD;&#xA;" />
  <row Id="31220" PostHistoryTypeId="5" PostId="13955" RevisionGUID="4772df15-c2d3-4300-97bf-c9f067625a9b" CreationDate="2011-06-21T18:17:51.103" UserId="7888" Comment="Corrected spelling and grammar errors" Text="How can I detect clicks on a texture (which will be a button in my game) which has the form of a triangle or circle. I only know the rectangle solution which uses the position, width, and height; which won't work because clicks will be detected on transparent pixels.&#xD;&#xA;&#xD;&#xA;I have heard of pixel-perfect collision, would that be the right way to do this?&#xD;&#xA;&#xD;&#xA;It would be great if someone could give me a example for such a solution." />
  <row Id="31221" PostHistoryTypeId="24" PostId="13955" RevisionGUID="4772df15-c2d3-4300-97bf-c9f067625a9b" CreationDate="2011-06-21T18:17:51.103" Comment="Proposed by 7888 approved by 14 edit id of 510" />
  <row Id="31222" PostHistoryTypeId="25" PostId="13984" RevisionGUID="b8c00e62-87af-44d5-8638-37afd761365a" CreationDate="2011-06-21T18:24:48.260" Comment="http://twitter.com/#!/StackGameDev/status/83238954278723585" />
  <row Id="31223" PostHistoryTypeId="5" PostId="13982" RevisionGUID="a8dc9a9e-95fb-436c-a4dc-46d4a8a7e04a" CreationDate="2011-06-21T19:04:09.230" UserId="4584" Comment="added 4 characters in body" Text="I'm loading a simple 6 sided cube from a UV-mapped FBX model and I'm using a BoundingBox to test for collisions. Once I determine there's a collision, I want to use the normal vector of the collided surface to correct the movement of whatever collided with the cube. I suppose this is a two-part question:&#xD;&#xA;&#xD;&#xA;1) How can I determine which face of the cube was collided with during a collision?&#xD;&#xA;&#xD;&#xA;2) How can I get the normal vector of that surface?" />
  <row Id="31224" PostHistoryTypeId="2" PostId="13988" RevisionGUID="f3c328aa-379f-40be-b6d0-3a031251dff0" CreationDate="2011-06-21T19:13:27.977" UserId="8167" Text="I use JINT with my C# MUD.  I have looked into V8, but found JINT to be much easier in my case.  I'm not so sure what the best option for C++ would be.  I simply enjoy Javascript as a language because I know it better than Lua.  I'm sure Lua is much more refined and has been widely used for a long time now.  My guess is if your looking for the easiest thing to embed, Lua would be the way to go just because I would think it be much better than documented than anything else.  However if you are going  to have a lot of scripters later on, javascript programmers are probably much more widespread at this point than Lua programmers.&#xD;&#xA;&#xD;&#xA;In my case JINT was just as easy if not easier to embed than Lua.  However the actual time embedding the script should be trivial compared to the time it will take to write said scripts.  I would go with whatever you think your programmers or you are most comfortable programming with later on.  Unfortunately I don't really know what the performance kicks are from either.  I do know for sure that V8 is by far the fastest Javascript engine." />
  <row Id="31225" PostHistoryTypeId="2" PostId="13989" RevisionGUID="61f4f8b4-49b8-4430-9a29-40761bb65ec0" CreationDate="2011-06-21T19:28:40.607" UserId="8164" Text="I'm new to game/graphics development and I'm playing around with particles (in 2D). I want to draw particles close to each other as a blob, just as liquid/water. I do not want to draw big circles overlapping as the blob won't be smooth (and too big). I don't really know physics but I assume what I want is something looking similar to surface tension. &#xD;&#xA;&#xD;&#xA;I haven't been able to find anything on stackexchange or on Google (maybe I do not know the correct keywords?). So far I have found two possible solutions, but I am unable to find any concrete information about algorithms. &#xD;&#xA;&#xD;&#xA;One of them is to calculate the concave hull of particles I consider being a blob. I can calculate the blob by creating an equivalence class (on the relation &quot;close to each other&quot;). Strangely enough I haven't been able to find *any* algorithm explaining how to calculate the concave hull. Many posts (and among stackexchange) links to libraries or commercial products that do this (I need libraries to work in C#), but never any algorithm. Also this solution might have a problem with a circle of particles, which would not detect the empty space in the middle. &#xD;&#xA;&#xD;&#xA;While researching concave hull I stumbled upon something called alpha shapes. Which seems to be exactly what I want to do, however just as with concave hull I haven't found any source explaining how they actually work. I have found some presentation materials but not enough to go on. It's like a big secret everyone knows except me :-/&#xD;&#xA;&#xD;&#xA;After calculating the concave hull or alpha shape I want to make it a Bézier curve to make it smooth and nice. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Although I do find my approach a bit too complex, maybe I am trying to solve this the wrong way? If you can either suggest any other solution to my problem, or explain the pieces I am missing I would be very happy and grateful :-)&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="31226" PostHistoryTypeId="1" PostId="13989" RevisionGUID="61f4f8b4-49b8-4430-9a29-40761bb65ec0" CreationDate="2011-06-21T19:28:40.607" UserId="8164" Text="Drawing particles as a smooth blob" />
  <row Id="31227" PostHistoryTypeId="3" PostId="13989" RevisionGUID="61f4f8b4-49b8-4430-9a29-40761bb65ec0" CreationDate="2011-06-21T19:28:40.607" UserId="8164" Text="&lt;2d&gt;&lt;algorithm&gt;&lt;graphics-programming&gt;&lt;particles&gt;" />
  <row Id="31228" PostHistoryTypeId="6" PostId="13989" RevisionGUID="4c3e3db7-278f-413a-8c3f-4d44d1916cbb" CreationDate="2011-06-21T19:34:53.457" UserId="8164" Comment="Added tag" Text="&lt;2d&gt;&lt;c#&gt;&lt;algorithm&gt;&lt;graphics-programming&gt;&lt;particles&gt;" />
  <row Id="31229" PostHistoryTypeId="5" PostId="13983" RevisionGUID="d0977159-e6d9-42b6-b73d-1dee27d9965d" CreationDate="2011-06-21T19:37:54.843" UserId="4129" Comment="added 618 characters in body" Text="It is telling that big games have not tried too hard to keep the file formats slim.  Things like MD2 and MD5 would compress much much better and be much smaller if they weren't text formats, if they were triangle strips and fans and such, and other simple tricks.  Its as if the team were deliberately not concerning themselves with data size.&#xD;&#xA;&#xD;&#xA;On the other hand, compressing the textures and the cut scenes seems to be worth much more effort.&#xD;&#xA;&#xD;&#xA;I would always favour robustness over size.  It worries me when I see binary formats that are designed to fit a given C struct layout.  That will really bite you later.  And its where bugs can hide and, later, an attack vector.  Best to go with nice formats that you read in and validate each and every load.  Triply so if you start using user generated content or p2p.&#xD;&#xA;&#xD;&#xA;I'm just a hobbyist who has looked at file sizes for the current spins on Glest and my own efforts.  I see that Charles Bloom - someone who really made an impact on compression in the 1990s - then went to Oddworld.  One wonders why compression wasn't a talked-up part of what he did there - you can draw the conclusion that if the top dog in the data compression field goes and does graphics engines for game company, rather than data compression, that data compression is not where its at.  He probably cares more about load times in the gaming context?  His [blog][1] is brilliant.&#xD;&#xA;&#xD;&#xA;Compression is about data modeling.  It is legal for all vertices to be in any random point in 3D space, but then your model would look like a porcupine.  In real life, the actual position of a vertex - if you know those it is attached to - is fairly constrained and predictable.  If you google &quot;compress mesh&quot; and such you find lots of academic papers, but I don't know anything mainstream.&#xD;&#xA;&#xD;&#xA;I've played with making predictors.  Its not so different from LOD makers really.  It didn't seem to have much application - would people adopt a mesh format that was half as small again as existing ones LZMA2ed models?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cbloomrants.blogspot.com/" />
  <row Id="31230" PostHistoryTypeId="2" PostId="13990" RevisionGUID="0fec98e9-bfa1-44ba-bd87-ab260340e4d6" CreationDate="2011-06-21T19:42:11.673" UserId="7911" Text="The keyword you might need is &quot;Metaballs,&quot; and ranges from the complex nVidia GPU Gems sample down to the demo scene driven versions designed only to look good and run fast.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31231" PostHistoryTypeId="25" PostId="13989" RevisionGUID="ef550026-dc6d-41ee-8d7f-3c67cf6de9de" CreationDate="2011-06-21T21:24:49.070" Comment="http://twitter.com/#!/StackGameDev/status/83284256410959872" />
  <row Id="31232" PostHistoryTypeId="2" PostId="13991" RevisionGUID="9d9c76a6-3471-4ce4-b9b5-d5d4a0328fb3" CreationDate="2011-06-21T21:57:24.897" UserId="8168" Text="I am working on a small text-based game in Java.  I am trying to understand the concept of how to color the output without needing to use [JNI][1]. C++ has the ability to modify the console directly and also make system calls but as far as I can tell JAVA doesn't because of its ability to be system independent.&#xD;&#xA;&#xD;&#xA;  Is this possible or should I look at using a JFrame and the paint object?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/JNI" />
  <row Id="31233" PostHistoryTypeId="1" PostId="13991" RevisionGUID="9d9c76a6-3471-4ce4-b9b5-d5d4a0328fb3" CreationDate="2011-06-21T21:57:24.897" UserId="8168" Text="Java how to color text without using JNI?" />
  <row Id="31234" PostHistoryTypeId="3" PostId="13991" RevisionGUID="9d9c76a6-3471-4ce4-b9b5-d5d4a0328fb3" CreationDate="2011-06-21T21:57:24.897" UserId="8168" Text="&lt;java&gt;&lt;text-based&gt;&lt;color&gt;" />
  <row Id="31235" PostHistoryTypeId="2" PostId="13992" RevisionGUID="c2acd9ec-bfec-4e97-ac34-4465cf45a15c" CreationDate="2011-06-21T23:07:25.270" UserId="5899" Text="http://stackoverflow.com/questions/1448858/how-to-color-system-out-println-output is a answer to your question." />
  <row Id="31236" PostHistoryTypeId="5" PostId="12570" RevisionGUID="ef1ca5d6-d6d2-444c-abfc-f761ab2254ba" CreationDate="2011-06-21T23:16:15.700" UserId="2698" Comment="Improved writing and corrected the code indentation" Text="I'm new to game physics and I am trying to adapt a simple 2D ball simulation for a 3D simulation with the Java3D library. I have this problem:&#xD;&#xA;&#xD;&#xA;Two things:&#xD;&#xA;&#xD;&#xA;1) I noted down the values generated by the engine: ***X/Y*** are too high and ***minX/minY/maxY/maxX*** values are causing trouble. &#xD;&#xA;&#xD;&#xA;*Sometimes the balls are drawing but not moving*&#xD;&#xA;&#xD;&#xA;*Sometimes they are going out of the panel*&#xD;&#xA;&#xD;&#xA;*Sometimes they're moving on little area*&#xD;&#xA;&#xD;&#xA;*Sometimes they just stick at one place...*&#xD;&#xA;&#xD;&#xA;2) I'm unable to select/define/set the default correct/suitable values considering the 3D graphics scaling/resolution while they are set with respect to 2D screen coordinates, that is my only problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help.&#xD;&#xA;&#xD;&#xA;This is the code:&#xD;&#xA;&#xD;&#xA;    public class Ball extends GameObject {&#xD;&#xA;    	private float x, y; // Ball's center (x, y)&#xD;&#xA;    	private float speedX, speedY; // Ball's speed per step in x and y&#xD;&#xA;    	private float radius; // Ball's radius&#xD;&#xA;    	// Collision detected by collision detection and response algorithm?&#xD;&#xA;    	boolean collisionDetected = false;&#xD;&#xA;    	&#xD;&#xA;	    // If collision detected, the next state of the ball.&#xD;&#xA;	    // Otherwise, meaningless.&#xD;&#xA;	    private float nextX, nextY;&#xD;&#xA;	    private float nextSpeedX, nextSpeedY;&#xD;&#xA;	&#xD;&#xA;	    private static final float BOX_WIDTH = 640;&#xD;&#xA;	    private static final float BOX_HEIGHT = 480;&#xD;&#xA;&#xD;&#xA;        /**&#xD;&#xA;         * Constructor The velocity is specified in polar coordinates of speed and&#xD;&#xA;         * moveAngle (for user friendliness), in Graphics coordinates with an&#xD;&#xA;         * inverted y-axis.&#xD;&#xA;         */&#xD;&#xA;        public Ball(String name1,float x, float y, float radius, float speed,&#xD;&#xA;                float angleInDegree, Color color) {&#xD;&#xA;            this.x = x;&#xD;&#xA;            this.y = y;&#xD;&#xA;            // Convert velocity from polar to rectangular x and y.&#xD;&#xA;            this.speedX = speed * (float) Math.cos(Math.toRadians(angleInDegree));&#xD;&#xA;            this.speedY = speed * (float) Math.sin(Math.toRadians(angleInDegree));&#xD;&#xA;            this.radius = radius;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void move()  {&#xD;&#xA;            if (collisionDetected) {&#xD;&#xA;                // Collision detected, use the values computed.&#xD;&#xA;                x = nextX;&#xD;&#xA;                y = nextY;&#xD;&#xA;                speedX = nextSpeedX;&#xD;&#xA;                speedY = nextSpeedY;&#xD;&#xA;            } else {&#xD;&#xA;                // No collision, move one step and no change in speed.&#xD;&#xA;                x += speedX;&#xD;&#xA;                y += speedY;&#xD;&#xA;            }&#xD;&#xA;            collisionDetected = false; // Clear the flag for the next step&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void collideWith()  {&#xD;&#xA;            // Get the ball's bounds, offset by the radius of the ball&#xD;&#xA;            float minX = 0.0f + radius;&#xD;&#xA;            float minY = 0.0f + radius;&#xD;&#xA;            float maxX = 0.0f + BOX_WIDTH - 1.0f - radius;&#xD;&#xA;            float maxY = 0.0f + BOX_HEIGHT - 1.0f - radius;&#xD;&#xA;&#xD;&#xA;            double gravAmount = 0.9811111f;&#xD;&#xA;            double gravDir = (90 / 57.2960285258);&#xD;&#xA;&#xD;&#xA;            // Try moving one full step&#xD;&#xA;            nextX = x + speedX;&#xD;&#xA;            nextY = y + speedY;&#xD;&#xA;            System.out.println(&quot;In serializedBall in collision.&quot;);&#xD;&#xA;&#xD;&#xA;            // If collision detected. Reflect on the x or/and y axis&#xD;&#xA;            // and place the ball at the point of impact.&#xD;&#xA;            if (speedX != 0) {&#xD;&#xA;                if (nextX &gt; maxX) { // Check maximum-X bound&#xD;&#xA;                    collisionDetected = true;&#xD;&#xA;                    nextSpeedX = -speedX; // Reflect&#xD;&#xA;                    nextSpeedY = speedY; // Same&#xD;&#xA;                    nextX = maxX;&#xD;&#xA;                    nextY = (maxX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;                } else if (nextX &lt; minX) { // Check minimum-X bound&#xD;&#xA;                    collisionDetected = true;&#xD;&#xA;                    nextSpeedX = -speedX; // Reflect&#xD;&#xA;                    nextSpeedY = speedY; // Same&#xD;&#xA;                    nextX = minX;&#xD;&#xA;                    nextY = (minX - x) * speedY / speedX + y; // speedX non-zero&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            // In case the ball runs over both the borders.&#xD;&#xA;            if (speedY != 0) {&#xD;&#xA;                if (nextY &gt; maxY) { // Check maximum-Y bound&#xD;&#xA;                    collisionDetected = true;&#xD;&#xA;                    nextSpeedX = speedX; // Same&#xD;&#xA;                    nextSpeedY = -speedY; // Reflect&#xD;&#xA;                    nextY = maxY;&#xD;&#xA;                    nextX = (maxY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;                } else if (nextY &lt; minY) { // Check minimum-Y bound&#xD;&#xA;                    collisionDetected = true;&#xD;&#xA;                    nextSpeedX = speedX; // Same&#xD;&#xA;                    nextSpeedY = -speedY; // Reflect&#xD;&#xA;                    nextY = minY;&#xD;&#xA;                    nextX = (minY - y) * speedX / speedY + x; // speedY non-zero&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            speedX += Math.cos(gravDir) * gravAmount;&#xD;&#xA;            speedY += Math.sin(gravDir) * gravAmount;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;            public float getSpeed()  {&#xD;&#xA;            return (float) Math.sqrt(speedX * speedX + speedY * speedY);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public float getMoveAngle()  {&#xD;&#xA;            return (float) Math.toDegrees(Math.atan2(speedY, speedX));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public float getRadius()  {&#xD;&#xA;            return radius;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public float getX() {&#xD;&#xA;            return x;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public float getY() {&#xD;&#xA;            return y;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void setX(float f) {&#xD;&#xA;            x =  f;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void setY(float f) {&#xD;&#xA;            y =  f;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Here's how I'm drawing the balls:&#xD;&#xA;&#xD;&#xA;    public class 3DMovingBodies extends Applet implements Runnable {&#xD;&#xA;&#xD;&#xA;        private static final int BOX_WIDTH = 800;&#xD;&#xA;        private static final int BOX_HEIGHT = 600;&#xD;&#xA;        private int currentNumBalls = 1; // number currently active&#xD;&#xA;&#xD;&#xA;        private volatile boolean playing;&#xD;&#xA;        private long mFrameDelay;&#xD;&#xA;        private JFrame frame;&#xD;&#xA;&#xD;&#xA;        private int currentFrameRate;&#xD;&#xA;        private Ball[] ball = new Ball[currentNumBalls];&#xD;&#xA;        &#xD;&#xA;        private Random rand;&#xD;&#xA;        private Sphere[] sphere = new Sphere[currentNumBalls];&#xD;&#xA;        private Transform3D[] trans = new Transform3D[currentNumBalls];&#xD;&#xA;        private TransformGroup[] objTrans = new TransformGroup[currentNumBalls];&#xD;&#xA;&#xD;&#xA;        public 3DMovingBodies() {&#xD;&#xA;&#xD;&#xA;            rand = new Random();&#xD;&#xA;            float angleInDegree = rand.nextInt(360);&#xD;&#xA;&#xD;&#xA;            setLayout(new BorderLayout());&#xD;&#xA;            GraphicsConfiguration config = SimpleUniverse&#xD;&#xA;                    .getPreferredConfiguration();&#xD;&#xA;            Canvas3D c = new Canvas3D(config);&#xD;&#xA;            add(&quot;Center&quot;, c);&#xD;&#xA;            &#xD;&#xA;            ball[0] = new Ball(0.5f, 0.0f, 0.5f, 0.4f, angleInDegree, Color.yellow);&#xD;&#xA;            // ball[1] = new Ball(1.0f, 0.0f, 0.25f, 0.8f, angleInDegree,&#xD;&#xA;            // Color.yellow);&#xD;&#xA;            // ball[2] = new Ball(0.0f, 1.0f, 0.15f, 0.11f, angleInDegree,&#xD;&#xA;            // Color.yellow);&#xD;&#xA;&#xD;&#xA;            trans[0] = new Transform3D();&#xD;&#xA;            // trans[1] = new Transform3D();&#xD;&#xA;            // trans[2] = new Transform3D();&#xD;&#xA;&#xD;&#xA;            sphere[0] = new Sphere(0.5f);&#xD;&#xA;            // sphere[1] = new Sphere(0.25f);&#xD;&#xA;            // sphere[2] = new Sphere(0.15f);&#xD;&#xA;            // Create a simple scene and attach it to the virtual universe&#xD;&#xA;            BranchGroup scene = createSceneGraph();&#xD;&#xA;&#xD;&#xA;            SimpleUniverse u = new SimpleUniverse(c);&#xD;&#xA;            u.getViewingPlatform().setNominalViewingTransform();&#xD;&#xA;&#xD;&#xA;            u.addBranchGraph(scene);&#xD;&#xA;&#xD;&#xA;            startSimulation();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public BranchGroup createSceneGraph() {&#xD;&#xA;            // Create the root of the branch graph&#xD;&#xA;            BranchGroup objRoot = new BranchGroup();&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;&#xD;&#xA;                // Create a simple shape leaf node, add it to the scene graph.&#xD;&#xA;&#xD;&#xA;                objTrans[i] = new TransformGroup();&#xD;&#xA;                objTrans[i].setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&#xD;&#xA;                Transform3D pos1 = new Transform3D();&#xD;&#xA;                pos1.setTranslation(randomPos());&#xD;&#xA;                objTrans[i].setTransform(pos1);&#xD;&#xA;                objTrans[i].addChild(sphere[i]);&#xD;&#xA;&#xD;&#xA;                objRoot.addChild(objTrans[i]);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),&#xD;&#xA;                    100.0);&#xD;&#xA;&#xD;&#xA;            Color3f light1Color = new Color3f(1.0f, 0.0f, 0.2f);&#xD;&#xA;            Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);&#xD;&#xA;            DirectionalLight light1 = new DirectionalLight(light1Color,&#xD;&#xA;                    light1Direction);&#xD;&#xA;            light1.setInfluencingBounds(bounds);&#xD;&#xA;            objRoot.addChild(light1);&#xD;&#xA;&#xD;&#xA;            // Set up the ambient light&#xD;&#xA;            Color3f ambientColor = new Color3f(1.0f, 1.0f, 1.0f);&#xD;&#xA;            AmbientLight ambientLightNode = new AmbientLight(ambientColor);&#xD;&#xA;            ambientLightNode.setInfluencingBounds(bounds);&#xD;&#xA;            objRoot.addChild(ambientLightNode);&#xD;&#xA;&#xD;&#xA;            return objRoot;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void startSimulation() {&#xD;&#xA;            playing = true;&#xD;&#xA;            Thread t = new Thread(this);&#xD;&#xA;            t.start();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void stop() {&#xD;&#xA;            playing = false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void run() {&#xD;&#xA;&#xD;&#xA;            long previousTime = System.currentTimeMillis();&#xD;&#xA;            long currentTime = previousTime;&#xD;&#xA;            long elapsedTime;&#xD;&#xA;            long totalElapsedTime = 0;&#xD;&#xA;            int frameCount = 0;&#xD;&#xA;&#xD;&#xA;            while (true) {&#xD;&#xA;                currentTime = System.currentTimeMillis();&#xD;&#xA;                elapsedTime = (currentTime - previousTime); // elapsed time in&#xD;&#xA;                // seconds&#xD;&#xA;                totalElapsedTime += elapsedTime;&#xD;&#xA;                if (totalElapsedTime &gt; 1000) {&#xD;&#xA;                    currentFrameRate = frameCount;&#xD;&#xA;                    frameCount = 0;&#xD;&#xA;                    totalElapsedTime = 0;&#xD;&#xA;                }&#xD;&#xA;                for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;                    ball[i].move();&#xD;&#xA;                    ball[i].collideWith();&#xD;&#xA;                    drawworld();&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                try {&#xD;&#xA;                    Thread.sleep(88);&#xD;&#xA;                } catch (Exception e) {&#xD;&#xA;                    e.printStackTrace();&#xD;&#xA;                }&#xD;&#xA;                previousTime = currentTime;&#xD;&#xA;                frameCount++;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void drawworld() {&#xD;&#xA;&#xD;&#xA;            for (int i = 0; i &lt; currentNumBalls; i++) {&#xD;&#xA;                printTG(objTrans[i], &quot;SteerTG&quot;);&#xD;&#xA;                trans[i].setTranslation(new Vector3f(ball[i].getX(),&#xD;&#xA;                        ball[i].getY(), 0.0f));&#xD;&#xA;                objTrans[i].setTransform(trans[i]);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private Vector3f randomPos()&#xD;&#xA;        /*&#xD;&#xA;         * Return a random position vector. The numbers are hardwired to be within&#xD;&#xA;         * the confines of the box.&#xD;&#xA;         */&#xD;&#xA;        {&#xD;&#xA;            Vector3f pos = new Vector3f();&#xD;&#xA;            pos.x = rand.nextFloat() * 5.0f - 2.5f; // -2.5 to 2.5&#xD;&#xA;            pos.y = rand.nextFloat() * 2.0f + 0.5f; // 0.5 to 2.5&#xD;&#xA;            pos.z = rand.nextFloat() * 5.0f - 2.5f; // -2.5 to 2.5&#xD;&#xA;            return pos;&#xD;&#xA;        } // end of randomPos()&#xD;&#xA;&#xD;&#xA;        public static void main(String[] args) {&#xD;&#xA;            System.out.println(&quot;Program Started&quot;);&#xD;&#xA;            3DMovingBodiesbb = new 3DMovingBodies();&#xD;&#xA;            bb.addKeyListener(bb);&#xD;&#xA;            MainFrame mf = new MainFrame(bb, 600, 400);&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="31237" PostHistoryTypeId="24" PostId="12570" RevisionGUID="ef1ca5d6-d6d2-444c-abfc-f761ab2254ba" CreationDate="2011-06-21T23:16:15.700" Comment="Proposed by 2698 approved by 51 edit id of 511" />
  <row Id="31238" PostHistoryTypeId="2" PostId="13993" RevisionGUID="39957d67-4ed9-4ddf-8192-973727cc2254" CreationDate="2011-06-21T23:21:43.840" UserId="8169" Text="I've been creating a RA3 mission map (play in Skirmish), most likely a remake of RA2 Yuri &quot;To the Moon&quot; mission, with more interesting elements. However, because of my work, the process was corrupted for more than a year. And now, I see that very few people still play RA3.&#xD;&#xA;&#xD;&#xA;So, should I continue making this map? Because there're still a lot of work to complete this map. I can assure you, the mission will be interesting. However, if few people play it, there's no need to waste time to it.&#xD;&#xA;&#xD;&#xA;Please give me some advice. Thank you." />
  <row Id="31239" PostHistoryTypeId="1" PostId="13993" RevisionGUID="39957d67-4ed9-4ddf-8192-973727cc2254" CreationDate="2011-06-21T23:21:43.840" UserId="8169" Text="Will you still play a good Red Alert 3 mission map?" />
  <row Id="31240" PostHistoryTypeId="3" PostId="13993" RevisionGUID="39957d67-4ed9-4ddf-8192-973727cc2254" CreationDate="2011-06-21T23:21:43.840" UserId="8169" Text="&lt;maps&gt;&lt;mission-design&gt;" />
  <row Id="31241" PostHistoryTypeId="10" PostId="13993" RevisionGUID="d5714b72-5b92-495d-a8b1-37873abd5dde" CreationDate="2011-06-21T23:33:20.350" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="31242" PostHistoryTypeId="11" PostId="13993" RevisionGUID="3670b7d2-84b1-4355-af33-37089c248881" CreationDate="2011-06-21T23:33:27.450" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="31243" PostHistoryTypeId="10" PostId="13993" RevisionGUID="825443bd-f0c4-4a34-a6e2-2bb41cf1fe10" CreationDate="2011-06-21T23:34:11.520" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="31244" PostHistoryTypeId="2" PostId="13994" RevisionGUID="e9feacd1-100a-4fe7-8459-158cb90a831d" CreationDate="2011-06-21T23:40:04.883" UserId="4443" Text="Rule 1) Only handle what you are designing for.&#xD;&#xA;&#xD;&#xA;If you are developing a game where assets are being made by someone Other than you, then generally you will want to validate them. If they are only being made by you then it might be overkill to do upfront. &#xD;&#xA;&#xD;&#xA;Secondly.. If you are running some sort of compression on your assets prior to use (I prefer in-memory expansion of pre-loaded data chunks because its where ya get the nice few second load times from :D), then you can have whatever it is that is compression or otherwise compiling your assets do the checks as well.&#xD;&#xA;&#xD;&#xA;Remember Rule #1 ;) Too often people (read, programmers) try to handle every situation under the sun, because that is what we are taught.. All your application ever needs to handle is what it will run into.&#xD;&#xA;&#xD;&#xA;As for a way to validate an overall asset set to make sure people havent screwed with it. Generate a hash value (Sha1, MD5, both?) and store it internal to your application. Then if the has value of your assets does not match what is stored, they are not running what you gave them." />
  <row Id="31245" PostHistoryTypeId="2" PostId="13995" RevisionGUID="cf975660-288f-469c-a3e1-b32c03ae81d6" CreationDate="2011-06-22T00:09:55.983" UserId="8170" Text="I am looking for a game engine in AS3 (or flex/flash builder) that supports AMF (Zend AMF)?&#xD;&#xA;&#xD;&#xA;Actually what I am looking for is more of a game logic server, built in as3, using amf to communicate with a php/database server.  The point being that the graphical aspect of the engine is not so important at this point." />
  <row Id="31246" PostHistoryTypeId="1" PostId="13995" RevisionGUID="cf975660-288f-469c-a3e1-b32c03ae81d6" CreationDate="2011-06-22T00:09:55.983" UserId="8170" Text="AS3 Game Framework / Engine that supports AMF?" />
  <row Id="31247" PostHistoryTypeId="3" PostId="13995" RevisionGUID="cf975660-288f-469c-a3e1-b32c03ae81d6" CreationDate="2011-06-22T00:09:55.983" UserId="8170" Text="&lt;engine&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;flex&gt;" />
  <row Id="31248" PostHistoryTypeId="2" PostId="13996" RevisionGUID="42b37e2c-4bdc-437c-88d9-2fb97ed7b825" CreationDate="2011-06-22T00:11:59.770" UserId="65" Text="To convert a group of particles to a mesh to can render, metaballs style, you can take a look at the [Marching Cubes][1] algorithm, which generates a polygonal mesh from voxel data. There is a demoscene demo that has a great example of this, with everything generated on the GPU: [numb res][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Marching_cubes&#xD;&#xA;  [2]: http://directtovideo.wordpress.com/2011/05/03/numb-res/" />
  <row Id="31249" PostHistoryTypeId="25" PostId="13991" RevisionGUID="a9f9f5b5-2109-4962-b962-b1a2133451fa" CreationDate="2011-06-22T00:24:49.227" Comment="http://twitter.com/#!/StackGameDev/status/83329555691077632" />
  <row Id="31250" PostHistoryTypeId="2" PostId="13997" RevisionGUID="d50ed7e9-f983-4d01-b46b-8e31f8d9185d" CreationDate="2011-06-22T01:16:16.877" UserId="6884" Text="FlashMOG. End of story.&#xD;&#xA;&#xD;&#xA;http://flashmog.net/" />
  <row Id="31251" PostHistoryTypeId="2" PostId="13998" RevisionGUID="f2025759-759b-457f-97d6-9f0fa7fa509e" CreationDate="2011-06-22T02:41:48.030" UserId="7457" Text="Win Forms only allows the UI thread to access and create UI Controls. There is an inbuilt way to run delegates on the UI thread for particular control: Control.BeginInvoke(): http://msdn.microsoft.com/en-us/library/system.windows.forms.control.begininvoke.aspx.&#xD;&#xA;&#xD;&#xA;So you would need something like:&#xD;&#xA;&#xD;&#xA;     if (BeginInvokeRequired)&#xD;&#xA;     {&#xD;&#xA;         startGameButton.BeginInvoke(new InvokeDelegate(delegate()&#xD;&#xA;           {&#xD;&#xA;              startGameButton.Text = &quot;blah blah&quot;;&#xD;&#xA;           }));&#xD;&#xA;     }&#xD;&#xA;     else&#xD;&#xA;     {&#xD;&#xA;         ...&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Incidentally there are few bad with your original code. Notice I have removed your early return in the if block and I warp the rest of the method in the else - this is because I am using BeginInvoke() not Invoke() which will return immediately - your delegate will be placed on a queue and be run when UI thread can run it - using Invoke you would have to wait until the UI thread has run it which is unneccesary (it should be run straight away anyway as the UI should not have long running operations to perform)." />
  <row Id="31252" PostHistoryTypeId="5" PostId="13998" RevisionGUID="e14b760d-60d3-41b0-a5ce-afcc89f48b71" CreationDate="2011-06-22T02:50:17.323" UserId="7457" Comment="added 295 characters in body; deleted 14 characters in body; added 6 characters in body; added 102 characters in body" Text="Win Forms only allows the UI thread to access and create UI Controls. There is an inbuilt way to run delegates on the UI thread for particular control: Control.BeginInvoke(): http://msdn.microsoft.com/en-us/library/0b1bf3y3.aspx.&#xD;&#xA;&#xD;&#xA;So you would need something like:&#xD;&#xA;&#xD;&#xA;     if (BeginInvokeRequired)&#xD;&#xA;     {&#xD;&#xA;         startGameButton.BeginInvoke(new InvokeDelegate(delegate()&#xD;&#xA;           {&#xD;&#xA;              startGameButton.Text = &quot;blah blah&quot;;&#xD;&#xA;           }));&#xD;&#xA;     }&#xD;&#xA;     else&#xD;&#xA;     {&#xD;&#xA;         ...&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;(If your code is in the startGameButton as it seems to be just replace startGameButton with this).&#xD;&#xA;&#xD;&#xA;Incidentally there are few bad things with your original code. Notice I have removed your early return in the if block and I warp the rest of the method in the else - this is because I am using BeginInvoke() not Invoke() which will return immediately - your delegate will be placed on a queue and be run when UI thread can run it - using Invoke you would have to wait until the UI thread has run it which is unneccesary (it should be run straight away anyway as the UI should not have long running operations to perform).&#xD;&#xA;&#xD;&#xA;You needn't use anonymous delegates by the way:&#xD;&#xA;&#xD;&#xA;    private void UpdateStartButton()&#xD;&#xA;    {&#xD;&#xA;        startGameButton.BeginInvoke(new InvokeDelegate(UpdateStartButtonMethod));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void UpdateStartButtonCallback()&#xD;&#xA;    {&#xD;&#xA;        startGameButton.Text = &quot;Executed the given delegate&quot;;&#xD;&#xA;    }" />
  <row Id="31253" PostHistoryTypeId="5" PostId="13998" RevisionGUID="710cb9cd-0e1c-4eb7-8a35-e63061d89f0b" CreationDate="2011-06-22T03:05:02.690" UserId="7457" Comment="deleted 16 characters in body; edited body" Text="Win Forms only allows the UI thread to access and create UI Controls. There is an inbuilt way to run delegates on the UI thread for particular control: Control.BeginInvoke(): http://msdn.microsoft.com/en-us/library/0b1bf3y3.aspx.&#xD;&#xA;&#xD;&#xA;So you would need something like:&#xD;&#xA;&#xD;&#xA;     if (BeginInvokeRequired)&#xD;&#xA;     {&#xD;&#xA;         startGameButton.BeginInvoke(new InvokeDelegate(delegate()&#xD;&#xA;           {&#xD;&#xA;              startGameButton.Text = &quot;blah blah&quot;;&#xD;&#xA;           }));&#xD;&#xA;     }&#xD;&#xA;     else&#xD;&#xA;     {&#xD;&#xA;         ...&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;(If your code is in the startGameButton as it seems to be just replace startGameButton with this).&#xD;&#xA;&#xD;&#xA;Incidentally there are few bad things with your original code. Notice I have removed your early return in the if block and I wrap the rest of the method in the else - this is because I am using BeginInvoke() not Invoke() which will return immediately - your delegate will be placed on a queue and be run when UI thread can run it - using Invoke you would have to wait until the UI thread has run it which is unneccesary (it should be run straight away anyway as the UI should not have long running operations to perform).&#xD;&#xA;&#xD;&#xA;You needn't use anonymous delegates by the way:&#xD;&#xA;&#xD;&#xA;    public void UpdateStartButton()&#xD;&#xA;    {&#xD;&#xA;        startGameButton.BeginInvoke(new InvokeDelegate(UpdateStartButtonCallback));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    private void UpdateStartButtonCallback()&#xD;&#xA;    {&#xD;&#xA;        startGameButton.Text = &quot;blah blah&quot;;&#xD;&#xA;    }" />
  <row Id="31254" PostHistoryTypeId="25" PostId="13995" RevisionGUID="5ccfd4e8-3b7c-4563-88c3-298a723b2be8" CreationDate="2011-06-22T03:24:50.910" Comment="http://twitter.com/#!/StackGameDev/status/83374858733494273" />
  <row Id="31255" PostHistoryTypeId="2" PostId="13999" RevisionGUID="37be4131-065b-4fdb-b243-c9a05a9a124a" CreationDate="2011-06-22T04:20:19.867" UserId="8174" Text="As mentioned above, you are thinking of Metaballs.&#xD;&#xA;&#xD;&#xA;This is a great article on the subject with some basic theory discussion and examples.&#xD;&#xA;&#xD;&#xA;[Exploring Metaballs and Isosurfaces in 2D](http://www.gamedev.net/page/resources/_//feature/fprogramming/exploring-metaballs-and-isosurfaces-in-2d-r2556)" />
  <row Id="31256" PostHistoryTypeId="2" PostId="14000" RevisionGUID="e68b4eb4-d375-45f5-bb79-51b990d01c85" CreationDate="2011-06-22T04:45:26.593" UserId="4894" Text="As was said in the comments, you need to handle a camera, which in 2d is just an offset for your render method. &#xD;&#xA;&#xD;&#xA;For exemple if you had a call like  &#xD;&#xA;    MyObject.draw(x, y);  &#xD;&#xA;You replace it with  &#xD;&#xA;    MyObject.draw(x + offsetx, y + offsety);&#xD;&#xA;&#xD;&#xA;Then all you need to do is to modify the offset when the user uses the mouse or when a unit is moved. " />
  <row Id="31257" PostHistoryTypeId="25" PostId="13975" RevisionGUID="c9503285-af04-4255-bae1-5d71925aa1ed" CreationDate="2011-06-22T06:24:51.677" Comment="http://twitter.com/#!/StackGameDev/status/83420162027569152" />
  <row Id="31258" PostHistoryTypeId="4" PostId="13867" RevisionGUID="12fdd891-773b-4860-a748-a77a941a5ead" CreationDate="2011-06-22T06:57:43.847" UserId="7457" Comment="rephrased title to include the critical component of the questions - a Windows Forms control" Text="Thread problem updating Windows Forms control in XNA C#" />
  <row Id="31259" PostHistoryTypeId="24" PostId="13867" RevisionGUID="12fdd891-773b-4860-a748-a77a941a5ead" CreationDate="2011-06-22T06:57:43.847" Comment="Proposed by 7457 approved by 51 edit id of 512" />
  <row Id="31260" PostHistoryTypeId="5" PostId="13938" RevisionGUID="afeb3d33-d08d-485e-b65b-006c11ec4be7" CreationDate="2011-06-22T08:20:49.020" UserId="2771" Comment="deleted 41 characters in body" Text="&gt; 1) Am I overthinking this? Should the shield just be a super component?&#xD;&#xA;&#xD;&#xA;Maybe, depends on how reusable you want your code to be and if it makes sense.&#xD;&#xA;&#xD;&#xA;&gt; 2) Should the shield be its own entity that tracks the location of the&#xD;&#xA;&gt; player?&#xD;&#xA;&#xD;&#xA;Not unless this shield is some sort of creature that can walk around independently at some stage.&#xD;&#xA;&#xD;&#xA;&gt; 3) Should the shield be a component that houses other components?&#xD;&#xA;&#xD;&#xA;This sounds a lot like entity, so the answer is no.&#xD;&#xA;&#xD;&#xA;&gt; 4) Should the shield just be a set of components that get added to the&#xD;&#xA;&gt; player?&#xD;&#xA;&#xD;&#xA;It is likely. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; &quot;Damage reduction / filtering&quot;&#xD;&#xA;&#xD;&#xA; - core shield component functionality.&#xD;&#xA;&#xD;&#xA;&gt; &quot;A sprite&quot;&#xD;&#xA;&#xD;&#xA; - is there a reason you cannot add another SpriteComponent to your character entity (in other words more than one component of certain type per entity)?&#xD;&#xA;&#xD;&#xA;&gt; &quot;A collider&quot;&#xD;&#xA;&#xD;&#xA; - are you sure you need another one? This depends on your physics engine. Can you send a message to character entity's ColliderComponent and ask it to change shape?&#xD;&#xA;&#xD;&#xA;&gt; &quot;Boost player maximum health, health regen, projectile deflection etc.&quot;&#xD;&#xA;&#xD;&#xA; - other artifacts might be able to do this (swords, boots, rings, *spells/potions/visiting shrines* etc.) so these should be components.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31261" PostHistoryTypeId="2" PostId="14001" RevisionGUID="37761b16-b082-4c82-8247-c0e7bb2126e4" CreationDate="2011-06-22T09:19:31.610" UserId="7478" Text="I have a problem with a game i am programming. I am making some sort of security game and i would like to have some visual line of sight. The problem is that i can't restrict my line of sight so my cops can't see through the walls. Below you find the design, in which they can look through windows, but not walls. Further below you find an illustration of what my problem is exactly.&#xD;&#xA;&#xD;&#xA;![design][1]&#xD;&#xA;&#xD;&#xA;this is what it looks like now. As you can see, the cops can see through walls.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;This is the map i would want to use to restrict the line of sight.&#xD;&#xA;&#xD;&#xA;![visual map][3]&#xD;&#xA;&#xD;&#xA;So the way i am programming the line of sight now is just by calculating some points and drawing the sight accordingly, as shown below. Note that i also check for a hittest using bitmapdata to check whether or not my player has been spotted by any of the cops.&#xD;&#xA;&#xD;&#xA;    private function setSight(e:Event=null):Boolean&#xD;&#xA;	{&#xD;&#xA;		g = copCanvas.graphics;&#xD;&#xA;		g.clear();&#xD;&#xA;		&#xD;&#xA;		for each(var cop:Cop in copCanvas.getChildren())&#xD;&#xA;		{&#xD;&#xA;			var _angle:Number = cop.angle;&#xD;&#xA;			var _radians:Number = (_angle * Math.PI) / 180;&#xD;&#xA;			var _radius:Number = 50;&#xD;&#xA;			&#xD;&#xA;			var _x1:Number = cop.x + (cop.width/2);&#xD;&#xA;			var _y1:Number = cop.y + (cop.height/2);&#xD;&#xA;			var _baseX:Number = _x1 + (Math.cos(_radians) * _radius);&#xD;&#xA;			var _baseY:Number = _y1 - (Math.sin(_radians) * _radius);&#xD;&#xA;			&#xD;&#xA;			var _x2:Number = _baseX + (25 * Math.sin(_radians));&#xD;&#xA;			var _y2:Number = _baseY + (25 * Math.cos(_radians));&#xD;&#xA;			var _x3:Number = _baseX - (25 * Math.sin(_radians));&#xD;&#xA;			var _y3:Number = _baseY - (25 * Math.cos(_radians));&#xD;&#xA;			&#xD;&#xA;			g.beginFill(0xff0000, 0.3);&#xD;&#xA;			g.moveTo(_x1, _y1);&#xD;&#xA;			g.lineTo(_x2, _y2);&#xD;&#xA;			g.lineTo(_x3, _y3);&#xD;&#xA;			g.endFill();&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		var _cops:BitmapData = new BitmapData(width, height, true, 0);&#xD;&#xA;		_cops.draw(copCanvas);&#xD;&#xA;		&#xD;&#xA;		var _bmpd:BitmapData = new BitmapData(10, 10, true, 0);&#xD;&#xA;		_bmpd.draw(me);&#xD;&#xA;		&#xD;&#xA;		if(_cops.hitTest(new Point(0, 0), 10, _bmpd, new Point(me.x, me.y), 255))&#xD;&#xA;		{&#xD;&#xA;			gameover.alpha = 1;&#xD;&#xA;			setTimeout(function():void{ gameover.alpha = 0; }, 5000);&#xD;&#xA;			stop();&#xD;&#xA;			&#xD;&#xA;			return true;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So now my question is: Is there someone who knows how to restrict the view so that the cops can't look through the walls? Thanks a lot in advance. &#xD;&#xA;&#xD;&#xA;ps: i have already looked at [this][4] tutorial by emanuele feronato, but i can't use the code to restric the visual line of sight.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/1L0qE.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/PU9H3.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/HZjsi.png&#xD;&#xA;  [4]: http://www.emanueleferonato.com/2007/04/29/create-a-flash-game-like-security-part-2/" />
  <row Id="31262" PostHistoryTypeId="1" PostId="14001" RevisionGUID="37761b16-b082-4c82-8247-c0e7bb2126e4" CreationDate="2011-06-22T09:19:31.610" UserId="7478" Text="How to implement line of sight restriction in actionscript?" />
  <row Id="31263" PostHistoryTypeId="3" PostId="14001" RevisionGUID="37761b16-b082-4c82-8247-c0e7bb2126e4" CreationDate="2011-06-22T09:19:31.610" UserId="7478" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;line-of-sight&gt;" />
  <row Id="31264" PostHistoryTypeId="25" PostId="13982" RevisionGUID="521f1089-3a2e-4963-bf34-47c3d5986583" CreationDate="2011-06-22T09:24:52.007" Comment="http://twitter.com/#!/StackGameDev/status/83465462112985089" />
  <row Id="31265" PostHistoryTypeId="2" PostId="14002" RevisionGUID="cc95cc54-b40a-4b0c-bfa1-9f02aac64679" CreationDate="2011-06-22T09:50:10.870" UserId="20" Text="Since you already check if the player is inside the viewing-area of a cop, you can follow this up by a line-of-sight check.&#xD;&#xA;&#xD;&#xA;It seems like you use a bitmap-based approach for your entire world. Therefore I suggest you do the following:&#xD;&#xA;&#xD;&#xA; - Check if player is inside a viewing-area of a cop&#xD;&#xA; - If yes, use the [Bresenham line algorithm][1] to sample pixels of the `walls map` from the cops position to the players position. If you hit a black pixel, the view is obstructed by a wall.&#xD;&#xA;&#xD;&#xA;While this is not really accurate (your player can hide behind a small object, if the line from cop to player goes through that object), it will be really fast and should be accurate enough for your game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bresenham_line" />
  <row Id="31266" PostHistoryTypeId="5" PostId="14002" RevisionGUID="d606ec71-e542-47cd-be83-3fd5c4abf095" CreationDate="2011-06-22T09:59:58.367" UserId="20" Comment="added another approach" Text="Since you already check if the player is inside the viewing-area of a cop, you can follow this up by a line-of-sight check.&#xD;&#xA;&#xD;&#xA;It seems like you use a bitmap-based approach for your entire world. Therefore I suggest you do the following:&#xD;&#xA;&#xD;&#xA; - Check if player is inside a viewing-area of a cop&#xD;&#xA; - If yes, use the [Bresenham line algorithm][1] to sample pixels of the *walls map* from the cops position to the players position. If you hit a black pixel, the view is obstructed by a wall.&#xD;&#xA;&#xD;&#xA;While this is not really accurate (your player can hide behind a small object, if the line from cop to player goes through that object), it will be really fast and should be accurate enough for your game.&#xD;&#xA;&#xD;&#xA;**Update:** To improve this a little bit, you could do two line-of-sight tests, from the cops position to the leftmost point of the player and to the rightmost point, as shown in the following image:&#xD;&#xA;&#xD;&#xA;![line of sight example][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bresenham_line&#xD;&#xA;  [2]: http://i.stack.imgur.com/fB8Md.png" />
  <row Id="31267" PostHistoryTypeId="2" PostId="14003" RevisionGUID="5304ffe3-f08f-41e7-991b-47bd4762c906" CreationDate="2011-06-22T10:14:13.990" UserId="6440" Text="I have some height-map sampled on a regular grid stored in an array. Now, I want to use the normals on the sampled vertices for some smoothing algorithm. The way I'm currently doing it is as follows:&#xD;&#xA;&#xD;&#xA; 1. For each vertex, generate triangles to all it's neighbours. This results in eight neighbours when using the 1-neighbourhood for all vertices except at the borders.&#xD;&#xA;&#xD;&#xA;         +---+---+&#xD;&#xA;         ¦ \ ¦ / ¦&#xD;&#xA;         +---o---+&#xD;&#xA;         ¦ / ¦ \ ¦&#xD;&#xA;         +---+---+&#xD;&#xA;&#xD;&#xA; 2. For each adjacent triangle, calculate it's normal by taking the cross product between the two distances.&#xD;&#xA;&#xD;&#xA; 3. As the triangles all have the same size when projected on the xy-plane, I simply average over all eight normals then and store it for this vertex.&#xD;&#xA;&#xD;&#xA;However, as my data grows larger, this approach takes too much time and I would prefer doing it on the GPU in a shader code. Is there an easy method, maybe if I could store my height-map as a texture?&#xD;&#xA;    " />
  <row Id="31268" PostHistoryTypeId="1" PostId="14003" RevisionGUID="5304ffe3-f08f-41e7-991b-47bd4762c906" CreationDate="2011-06-22T10:14:13.990" UserId="6440" Text="Calculating vertex normals on the GPU" />
  <row Id="31269" PostHistoryTypeId="3" PostId="14003" RevisionGUID="5304ffe3-f08f-41e7-991b-47bd4762c906" CreationDate="2011-06-22T10:14:13.990" UserId="6440" Text="&lt;xna&gt;&lt;c#&gt;&lt;shaders&gt;&lt;normals&gt;&lt;heightmap&gt;" />
  <row Id="31270" PostHistoryTypeId="5" PostId="13975" RevisionGUID="bd805048-ee55-4790-9636-e7a9d42048ca" CreationDate="2011-06-22T10:26:49.733" UserId="1742" Comment="added 613 characters in body; added 4 characters in body" Text="In your game assets do you make room for explicit sanity checks, or do you have some generally expected bounds which you assert?&#xD;&#xA;&#xD;&#xA;I've been thinking about how we compress data and thought that it's much better to have the former, and less of the latter. If your data can exceed your normal valid ranges, but if it does it's an error, then surely that implies you're not compressing the data well enough?&#xD;&#xA;&#xD;&#xA;What do you do to find out if your data is compressed as far as it can be, and what do you use to ensure your data isn't corrupted and ensure it's an official release?&#xD;&#xA;&#xD;&#xA;*EDIT*&#xD;&#xA;&#xD;&#xA;I'm not interested in sanity checking the file size, but instead, how you manage your sanity checks and whether you arrange the excess size caused by the opportunity to do sanity checks by using explicit extra data, or through allowing the data enough file space (data member size) to be out of valid range and thus able to be checked merely by looking at the asset in memory after loading.&#xD;&#xA;&#xD;&#xA;*EDIT*&#xD;&#xA;&#xD;&#xA;QUOTE:&#xD;&#xA;&quot;runtime performance is valued very highly while maximal compression is merely a nice thing to have&quot;&#xD;&#xA;&#xD;&#xA;yes, but we're still having issues with our media being slower than decompression algorithms, especially with situations where programmers and data desginers have not considered the footprint of their data layouts and are unnecessarily creating assets that have redundant storage capacity.&#xD;&#xA;&#xD;&#xA;I must assume that there are very few people who consider the importance of bandwidth outside of those working on platforms that are strictly bound by their data throughput rate or storage capacity." />
  <row Id="31271" PostHistoryTypeId="2" PostId="14004" RevisionGUID="3e780bf9-042e-4aa2-b71f-5ba7a4e33cfa" CreationDate="2011-06-22T10:48:02.553" UserId="1742" Text="In large procedural landscape games, the land seems dull, but that's probably because the real world is largely dull, with only limited places where the scenery is dramatic or tactical.&#xD;&#xA;&#xD;&#xA;Looking at world generation from this point of view, a landscape generator for a game needs to **not** follow the rules of landscaping, but instead some rules married to the expectations of the gamer. For example, there could be a choke point / route generator that creates hills ravines, rivers and mountains between cities, rather than cities plotted on the land based on the resources or conditions generated by the mountains and rainfall patterns.&#xD;&#xA;&#xD;&#xA;Is there any existing work being done like this? Start with cities or population centres and then add in terrain afterwards?" />
  <row Id="31272" PostHistoryTypeId="1" PostId="14004" RevisionGUID="3e780bf9-042e-4aa2-b71f-5ba7a4e33cfa" CreationDate="2011-06-22T10:48:02.553" UserId="1742" Text="Procedural landscape generation but not just fractals" />
  <row Id="31273" PostHistoryTypeId="3" PostId="14004" RevisionGUID="3e780bf9-042e-4aa2-b71f-5ba7a4e33cfa" CreationDate="2011-06-22T10:48:02.553" UserId="1742" Text="&lt;procedural-generation&gt;&lt;world-design&gt;&lt;content-generation&gt;" />
  <row Id="31274" PostHistoryTypeId="2" PostId="14005" RevisionGUID="8a670b83-d785-4549-bd24-3d1902ff9be1" CreationDate="2011-06-22T11:24:36.997" UserId="8178" Text="GL.MultiDrawElements should be able to do this. Check out the [documentation][1] for this function.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/sdk/docs/man/xhtml/glMultiDrawElements.xml" />
  <row Id="31275" PostHistoryTypeId="5" PostId="14002" RevisionGUID="731aa913-3a89-4b12-9700-dfccd28fbc46" CreationDate="2011-06-22T11:35:28.970" UserId="20" Comment="spelling fixes" Text="Since you already check if the player is inside the viewing-area of a cop, you can follow this up by a line-of-sight check.&#xD;&#xA;&#xD;&#xA;It seems like you use a bitmap-based approach for your entire world. Therefore I suggest you do the following:&#xD;&#xA;&#xD;&#xA; - Check if player is inside a viewing-area of a cop&#xD;&#xA; - If yes, use the [Bresenham line algorithm][1] to sample pixels of the *walls map* from the cops position to the players position. If you hit a black pixel, the view is obstructed by a wall.&#xD;&#xA;&#xD;&#xA;While this is not really accurate (your player can hide behind a small object, if the line from cop to player goes through that object), it will be really fast and should be accurate enough for your game.&#xD;&#xA;&#xD;&#xA;**Update:** To improve this a little bit, you could do two line-of-sight tests, from the cops position to the leftmost point of the player and to the rightmost point, as shown in the following image:&#xD;&#xA;&#xD;&#xA;![line of sight example][2]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;###Edit###&#xD;&#xA;&#xD;&#xA;It seems like you want to dynamically paint the actual viewing-area of each cop instead of just a triangle. A way to do that would be to look into [2D shadowing][3]. I once did a quick flash experiment with 2D shadows based on a bitmap image. I integrated your wall map into my code. Here's the [interactive result][4], and here's the [source-code][5] which you're free to use as a starting point for your own implementation.&#xD;&#xA;&#xD;&#xA;![2d shadowing example][6]&#xD;&#xA;&#xD;&#xA;In the top left, you'll see the composed image, on the top right there's the original map image. Bottom left shows the calculated light pixels and on the bottom right you'll find the distance-map that was used. You can drag the light with the mouse and increase/decrease the light radius using the arrow keys (left/right).  Instead of rendering a circle, you would only render your triangle as active &quot;light&quot;.&#xD;&#xA;&#xD;&#xA;To make the calculation of every single pixel inside the light radius reasonably fast, I use a distance map that is being used to look up how much distance can be traveled from any given pixel without hitting an obstacle. The distance map is calculated at initialization time, therefore the flash file takes a while to initialize (because calculation of the distance-map is quite CPU heavy). To avoid this, you could also pre-calculate your distance-maps and store them as individual files.&#xD;&#xA;&#xD;&#xA;Please note that a distance-map won't work with moving obstacles though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Bresenham_line&#xD;&#xA;  [2]: http://i.stack.imgur.com/fB8Md.png&#xD;&#xA;  [3]: http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/&#xD;&#xA;  [4]: http://www.swfcabin.com/open/1308738749&#xD;&#xA;  [5]: http://pastie.org/2105855&#xD;&#xA;  [6]: http://i.stack.imgur.com/pBaLa.png" />
  <row Id="31276" PostHistoryTypeId="25" PostId="14001" RevisionGUID="d6bcac95-abfb-4ed1-bdfe-3d4d65f4a347" CreationDate="2011-06-22T12:24:51.873" Comment="http://twitter.com/#!/StackGameDev/status/83510761770594305" />
  <row Id="31278" PostHistoryTypeId="2" PostId="14007" RevisionGUID="98ab407d-5f15-4610-be17-5b33818fb312" CreationDate="2011-06-22T13:04:49.263" UserId="8178" Text="A typical approach for procedural terrain generation is to draw specific features by hand and use the generator to fill in the rest. [VTerrain][1] is bound to have something interesting on this topic.&#xD;&#xA;&#xD;&#xA;  [1]: http://vterrain.org/" />
  <row Id="31281" PostHistoryTypeId="2" PostId="14009" RevisionGUID="f1156607-5d6a-460e-a522-6d298d89bae4" CreationDate="2011-06-22T13:28:01.127" UserId="802" Text="In a grid-based game I am working on, I want to add objects that occupy more than one tile of the grid. Are there any algorithms or techniques to find paths for this kind of objects?" />
  <row Id="31282" PostHistoryTypeId="1" PostId="14009" RevisionGUID="f1156607-5d6a-460e-a522-6d298d89bae4" CreationDate="2011-06-22T13:28:01.127" UserId="802" Text="Path finding in grid for objects that occupy more than one tile" />
  <row Id="31283" PostHistoryTypeId="3" PostId="14009" RevisionGUID="f1156607-5d6a-460e-a522-6d298d89bae4" CreationDate="2011-06-22T13:28:01.127" UserId="802" Text="&lt;algorithm&gt;&lt;tiles&gt;&lt;path-finding&gt;&lt;grid&gt;" />
  <row Id="31284" PostHistoryTypeId="2" PostId="14010" RevisionGUID="0ac3faee-136b-401c-b867-07f0d9662596" CreationDate="2011-06-22T14:00:09.857" UserId="7888" Text="In general you'll be adapting existing pathfinding algorithms to be width-sensitive. Primarily that means adapting A*, though since your game is [grid-based][1] you may find the algorithm for [solving fat mazes][2] helpful.&#xD;&#xA;&#xD;&#xA;For A*, the most basic solution is to simply add an assertion for width to your calculations, according to your movement rules. However, this will make a mess of your pathfinding code and slows down pathfinding for any regular-sized entities. &#xD;&#xA;&#xD;&#xA;Alternatively, you can consider your grid to be a node-based pathfinding network, and for your larger entities you could create a secondary network which accounts for their size, and use that for movement and pathfinding. This has the benefit of allowing you to tailor your pathfinding for larger entities so that it behaves as expected, but means creating multiple maps for each scene and holding them in memory, which may impact games on mobile platforms.&#xD;&#xA;&#xD;&#xA;If neither of those methods suits your purposes, you could look for inspiration in [navigation mesh][3] [pathfinding algorithms][4], which are inherently width-aware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.springerlink.com/content/u1mhw1ad0uxajrc2/&#xD;&#xA;  [2]: http://realtimecollisiondetection.net/blog/?p=57&#xD;&#xA;  [3]: http://www.ai-blog.net/archives/000152.html&#xD;&#xA;  [4]: http://code.google.com/p/recastnavigation/" />
  <row Id="31285" PostHistoryTypeId="2" PostId="14011" RevisionGUID="161c7eaa-2343-4628-b5bd-1dd281559b5d" CreationDate="2011-06-22T14:11:02.620" UserId="2710" Text="I'm making a game based on a 2D grid, with some cells passable and some not. Dynamic objects can move continuously, independent of the grid, but need to collide with impassable cells.&#xD;&#xA;&#xD;&#xA;I wrote an algorithm to trace a ray against the grid, that gives me all cells that ray intersects. However, actual object are not point-sized; I'm currently representing them as circles. But I can't figure out an effective algorithm to trace a moving circle. Here's a picture of what I need:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The numbers show in what order the circle collides with grid cells. Does anybody know the algorithm to find these collisions? Preferably in C#.&#xD;&#xA;&#xD;&#xA;**Update** The  circle _can_ be bigger than a single grid cell. &#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Ct3ST.png" />
  <row Id="31286" PostHistoryTypeId="1" PostId="14011" RevisionGUID="161c7eaa-2343-4628-b5bd-1dd281559b5d" CreationDate="2011-06-22T14:11:02.620" UserId="2710" Text="How to find 2D grid cells swept by a moving circle?" />
  <row Id="31287" PostHistoryTypeId="3" PostId="14011" RevisionGUID="161c7eaa-2343-4628-b5bd-1dd281559b5d" CreationDate="2011-06-22T14:11:02.620" UserId="2710" Text="&lt;c#&gt;&lt;collision-detection&gt;&lt;algorithm&gt;&lt;grid&gt;" />
  <row Id="31288" PostHistoryTypeId="2" PostId="14012" RevisionGUID="7e7d7e2a-ae78-4d4a-a622-14a085601919" CreationDate="2011-06-22T14:17:46.567" UserId="7863" Text="Your Component stuff is too much OOP. See what I'm doing here:&#xD;&#xA;&#xD;&#xA;https://github.com/thelinuxlich/starwarrior_CSharp&#xD;&#xA;&#xD;&#xA;And this is the Entity System framework I've ported to C#:&#xD;&#xA;https://github.com/thelinuxlich/artemis_CSharp" />
  <row Id="31289" PostHistoryTypeId="2" PostId="14013" RevisionGUID="cbaf3ca4-4547-437f-b57c-22775205c693" CreationDate="2011-06-22T14:22:48.167" UserId="7863" Text="Design Components as structures with data only, no logic more complex than getters and setters. Don't create dependencies between Components or you'll end losing most of the benefits of an Entity System. &#xD;&#xA;&#xD;&#xA;See an example of this approach(close to t-machine vision) here:&#xD;&#xA;https://github.com/thelinuxlich/starwarrior_CSharp&#xD;&#xA;&#xD;&#xA;And the engine itself:&#xD;&#xA;https://github.com/thelinuxlich/artemis_CSharp" />
  <row Id="31290" PostHistoryTypeId="2" PostId="14014" RevisionGUID="aec225ab-38f7-4761-a02c-d7c267174577" CreationDate="2011-06-22T14:28:45.683" UserId="160" Text="One option would be to calculate a second grid that takes the object's size into account by &quot;painting&quot; it onto the grid, like so. Here's the original grid:&#xD;&#xA;&#xD;&#xA;    #########&#xD;&#xA;    #..b....#&#xD;&#xA;    #.#.....#&#xD;&#xA;    #.####..#&#xD;&#xA;    #.......#&#xD;&#xA;    #.......#&#xD;&#xA;    #..#.#..#&#xD;&#xA;    #a.#.#..#&#xD;&#xA;    #########&#xD;&#xA;&#xD;&#xA;We want to see if a 2x2 object can get from `a` to `b`. We calculate a second grid where everytime we have a wall (`#`), we add walls above and to the left of it (`x`), turning each single wall segment into a 2x2 one. Now it looks like:&#xD;&#xA;&#xD;&#xA;    xxxxxxxxxx&#xD;&#xA;    x#########&#xD;&#xA;    x#xxb...x#&#xD;&#xA;    x#x#xxx.x#&#xD;&#xA;    x#x####.x#&#xD;&#xA;    x#......x#&#xD;&#xA;    x#.xxxx.x#&#xD;&#xA;    x#.x#x#.x#&#xD;&#xA;    x#ax#x#xx#&#xD;&#xA;    x#########&#xD;&#xA;&#xD;&#xA;We can then pathfind on this grid by treating the object as 1x1 since the grid itself takes their size into account.&#xD;&#xA;" />
  <row Id="31291" PostHistoryTypeId="2" PostId="14015" RevisionGUID="a515e56e-0ffb-44dc-b097-e4570434d18b" CreationDate="2011-06-22T14:42:07.917" UserId="6316" Text="&lt;a href=&quot;http://www.lighthouse3d.com/opengl/terrain/&quot;&gt;Lighthouse 3D&lt;/a&gt; has a good survey of some simple algorithms for terrain generation.  If you're starting with a map that contains cities or other interesting areas, you could use some of these techniques to generate whatever terrain you would like.  For example, intelligent use of the fault algorithm could be used to create cliffs or valleys around your city that would act as choke points.  Also, using the circle algorithm would be a great way to generate terrian for turret placement.  These are just some examples, but using these simple algorithms would be a fairly easy way to generate interesting terrain around your cities." />
  <row Id="31292" PostHistoryTypeId="2" PostId="14016" RevisionGUID="25259985-86bd-4f92-b6d9-236e2a8dc066" CreationDate="2011-06-22T14:43:00.043" UserId="8185" Text="I'm trying to figure out which language I should begin learning. I've only been programming for about 6 months, with languages like PHP, Java, and C#. I want to learn how to dev games, and while I know in most cases the answer to this would be through C++ (at least, I would think), though I'm still curious about what Objective C can offer in the sense of long term benefit.&#xD;&#xA;&#xD;&#xA;It seems like there's a chance that Objective-C may actually become more popular than C++ in a few years, and for all I know, it may become the de facto standard development language for games. Still, despite all of this, I really don't know anything, and this is all speculation.&#xD;&#xA;&#xD;&#xA;Both languages seem very interesting, and obviously can pull a lot of out of themselves.&#xD;&#xA;&#xD;&#xA;What do you think?&#xD;&#xA;&#xD;&#xA;Note: despite what some might say, I really don't want to end up using prebuilt engines, and would rather just learn how to make my own. I'm well aware that it takes a lot more time, but I'm quite ok with that." />
  <row Id="31293" PostHistoryTypeId="1" PostId="14016" RevisionGUID="25259985-86bd-4f92-b6d9-236e2a8dc066" CreationDate="2011-06-22T14:43:00.043" UserId="8185" Text="Objective C and C++ for Game Development" />
  <row Id="31294" PostHistoryTypeId="3" PostId="14016" RevisionGUID="25259985-86bd-4f92-b6d9-236e2a8dc066" CreationDate="2011-06-22T14:43:00.043" UserId="8185" Text="&lt;c++&gt;&lt;objective-c&gt;" />
  <row Id="31295" PostHistoryTypeId="2" PostId="14017" RevisionGUID="ceecf63d-039e-41f8-8dca-283bea155062" CreationDate="2011-06-22T14:57:15.763" UserId="3081" Text="If you want to use your ray-collision algorithm, you can choose eight points on each circle (at 45-degree increments, aligned with your square grid), and use the ray-collision between corresponding points (i.e., from the top of one circle to the top of the other).  The union of all these ray-collisions is the entire set of cells intersected.&#xD;&#xA;&#xD;&#xA;You could probably improve on this a little--for example by using the line segment from the center of one circle to the center of the other, but extended on either side by the radius of the circle, as well as the parallel line segments on either side at the extremities of the circles." />
  <row Id="31296" PostHistoryTypeId="2" PostId="14018" RevisionGUID="467039db-6474-42ba-823a-f41846b353d4" CreationDate="2011-06-22T14:58:54.420" UserId="20" Text="From my perspective, Objective-C is mainly used to develop for OS X and iOS. And even there, a lot of people tend to use C++ because of portability. Looking at a [language comparison over at Ohloh][1], I can't really see much of a trend that Objective-C will replace C++ in the near future.&#xD;&#xA;&#xD;&#xA;Also have a look at [this question (Objective-C or C++ for iOS?)][2].&#xD;&#xA;&#xD;&#xA;I personally like Objective-C, but C++ is far more widespread and very portable. You'll also find tons of resources and libraries about/for C++. If you want to develop specifically for iOS or Mac OS X, you could consider Objective-C, but for all other cases I strongly reccomend C++.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ohloh.net/languages/compare?measure=commits&amp;percent=&amp;l0=c&amp;l1=cpp&amp;l2=objective_c&amp;l3=java&amp;l4=-1&amp;commit=Update&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/11079/objective-c-or-c-for-ios-games" />
  <row Id="31297" PostHistoryTypeId="2" PostId="14019" RevisionGUID="0e806987-0a40-4522-b8c8-1c59ef2eaba9" CreationDate="2011-06-22T15:01:01.503" UserId="1430" Text="&gt; I want to learn how to dev games, and&#xD;&#xA;&gt; while I know in most cases the answer&#xD;&#xA;&gt; to this would be through C++ (at&#xD;&#xA;&gt; least, I would think),&#xD;&#xA;&#xD;&#xA;Actually, while C++ is an important language for anyone aspiring to enter the field professional, it is *by no means* the language you have to learn to make games and, in fact, makes for a rather poor first language (primarily due to its complexity, the wealth of incorrect/poor information on the language out there, and most important its cultural penchant for assuming the programmer is right, which is bad for a neophyte).&#xD;&#xA;&#xD;&#xA;&gt; It seems like there's a chance that&#xD;&#xA;&gt; Objective-C may actually become more&#xD;&#xA;&gt; popular than C++ in a few years, and&#xD;&#xA;&gt; for all I know, it may become the de&#xD;&#xA;&gt; facto standard development language&#xD;&#xA;&gt; for games. Still, despite all of this,&#xD;&#xA;&gt; I really don't know anything, and this&#xD;&#xA;&gt; is all speculation.&#xD;&#xA;&#xD;&#xA;Something will replace C++ eventually, as C++ has by and large supplanted C, which has by and large replaced machine-specific assembly. That said, it's very hard to gauge what will replace C++ and mostly a thought experiment -- for practical concerns, it doesn't matter what language we all eventually move on to. &#xD;&#xA;&#xD;&#xA;It's fair to surmise that the popularity of the iOS platform might help usher in a new era for Objective C, one where it's not considered some unusual warty distant cousin of C++. But in practice one can write iOS games with a bare minimum of Objective C bootstrap code (doing the rest in C++), and Objective C itself doesn't offer enough modern advances to make it otherwise more attractive, so I doubt it will replace C++ ever.&#xD;&#xA;&#xD;&#xA;&gt; Note: despite what some might say, I&#xD;&#xA;&gt; really don't want to end up using&#xD;&#xA;&gt; prebuilt engines, and would rather&#xD;&#xA;&gt; just learn how to make my own. I'm&#xD;&#xA;&gt; well aware that it takes a lot more&#xD;&#xA;&gt; time, but I'm quite ok with that.&#xD;&#xA;&#xD;&#xA;Do you realize that using pre-built technologies is (1) essentially inevitable (you'll be using a pre-built runtime on a pre-built OS for example) and (2) orthogonal to the issue of which language you use?&#xD;&#xA;&#xD;&#xA;It's fine to build things yourself for learning purposes, but don't let &quot;not invented here&quot; syndrome get you in its claws. Once it has you, it's hard to get out, and it's very easy for a new programmer to get snatched up. Resist the temptation, you *will* be a better developer for it in the long run.&#xD;&#xA;&#xD;&#xA;**So all that ancillary stuff being said, to answer your real question:**&#xD;&#xA;&#xD;&#xA;It doesn't matter which language you pick. My personal recommendation for people who want to get into game development and don't already know any programming languages is C# or Python. If you already know a language, use that language (it sounds like this is where you fit; if you know some C# already, I'd say continue using that). If you really can't decide, flip a coin. Between C++ and Objective C I'd say go with C++, since I think the available tools are more mature (especially on the Windows platform -- Xcode is decent if you are on a Mac, but it's no Visual Studio).&#xD;&#xA;&#xD;&#xA;A good programmer will know many languages and, similarly, the more languages a programmer knows the easier it is for her to pick up more. So you should never be focused on trying to predict the motion of the industry so as to study the &quot;right&quot; language. Instead, pick something, learn it, make some games, and move on to new languages as the time comes. You will never be wasting your time doing so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31298" PostHistoryTypeId="2" PostId="14020" RevisionGUID="b6db438b-ff07-41d8-b0ef-1a8540ad5ffc" CreationDate="2011-06-22T15:02:05.793" UserId="6316" Text="Here are a couple of other posts that are related to your question:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/5685/is-c-still-preferred-in-game-development&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/339/what-are-the-most-commonly-used-programming-languages&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/5651/am-i-hurting-myself-by-not-knowing-c-for-game-design&#xD;&#xA;&#xD;&#xA;Also, this isn't terribly relevant, but I thought it was interesting:  &lt;a href=&quot;http://developers.slashdot.org/story/11/06/15/0242237/C-the-Clear-Winner-In-Googles-Language-Performance-Tests&quot;&gt;Google's language performance comparison&lt;/a&gt;" />
  <row Id="31299" PostHistoryTypeId="5" PostId="14016" RevisionGUID="a07629d4-0342-42e4-add6-279bbefc5292" CreationDate="2011-06-22T15:02:18.617" UserId="8185" Comment="added 343 characters in body" Text="I'm trying to figure out which language I should begin learning. I've only been programming for about 6 months, with languages like PHP, Java, and C#. I want to learn how to dev games, and while I know in most cases the answer to this would be through C++ (at least, I would think), though I'm still curious about what Objective C can offer in the sense of long term benefit.&#xD;&#xA;&#xD;&#xA;It seems like there's a chance that Objective-C may actually become more popular than C++ in a few years, and for all I know, it may become the de facto standard development language for games. Still, despite all of this, I really don't know anything, and this is all speculation.&#xD;&#xA;&#xD;&#xA;Both languages seem very interesting, and obviously can pull a lot of out of themselves.&#xD;&#xA;&#xD;&#xA;What do you think?&#xD;&#xA;&#xD;&#xA;Note: despite what some might say, I really don't want to end up using prebuilt engines, and would rather just learn how to make my own. I'm well aware that it takes a lot more time, but I'm quite ok with that.&#xD;&#xA;&#xD;&#xA;Edit: &#xD;&#xA;&#xD;&#xA;I've decided C++ is the way for me to go.&#xD;&#xA;&#xD;&#xA;If anyone could point me in the right direction for some engine programming resources (such as any low-level hardware interface stuff, OpenGL API documentation, beginner tutorials which teach the fundamentals of engine programming, or anything else), that would be very, very cool :) " />
  <row Id="31300" PostHistoryTypeId="5" PostId="14016" RevisionGUID="952b6755-aef3-4039-884d-8565867beeeb" CreationDate="2011-06-22T15:04:00.817" UserId="1430" Comment="removing secondary question" Text="I'm trying to figure out which language I should begin learning. I've only been programming for about 6 months, with languages like PHP, Java, and C#. I want to learn how to dev games, and while I know in most cases the answer to this would be through C++ (at least, I would think), though I'm still curious about what Objective C can offer in the sense of long term benefit.&#xD;&#xA;&#xD;&#xA;It seems like there's a chance that Objective-C may actually become more popular than C++ in a few years, and for all I know, it may become the de facto standard development language for games. Still, despite all of this, I really don't know anything, and this is all speculation.&#xD;&#xA;&#xD;&#xA;Both languages seem very interesting, and obviously can pull a lot of out of themselves.&#xD;&#xA;&#xD;&#xA;What do you think?&#xD;&#xA;&#xD;&#xA;Note: despite what some might say, I really don't want to end up using prebuilt engines, and would rather just learn how to make my own. I'm well aware that it takes a lot more time, but I'm quite ok with that.&#xD;&#xA;" />
  <row Id="31301" PostHistoryTypeId="25" PostId="14011" RevisionGUID="01e5a393-4329-4946-8d1f-65971ce35db1" CreationDate="2011-06-22T15:24:53.310" Comment="http://twitter.com/#!/StackGameDev/status/83556065714769920" />
  <row Id="31302" PostHistoryTypeId="2" PostId="14021" RevisionGUID="4a9d24e2-85b0-4e94-85d5-293c8a4f8db0" CreationDate="2011-06-22T15:30:49.820" UserId="8185" Text="But, I'm not quite sure where I should start from here. I know I have to go and grab an engine to use with some prebuilt libraries, and then from there learn how to actually code a game, etc. All I have right now is some &quot;program Tetris&quot; tutorial for C++ open right now, but I'm not even sure if that will really help me with what I want to accomplish.&#xD;&#xA;&#xD;&#xA;I'm curious if there are is any good C++ documentation related to game development which provides information on building a game in more of a component model (by this I'm referring to the documentation, not the actual object-oriented design of the game itself), rather than an entire tutorial designed to do something specific. This could include information based on various design methodologies, or how to link hardware with OpenGL interfaces, or just simply even learning how to render 2D images on a canvas. &#xD;&#xA;&#xD;&#xA;I suppose this place is definitely a good source :P, but what I'm looking for is quite a bit of information - and I think posting a new question every ten minutes would just flood the site...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31303" PostHistoryTypeId="1" PostId="14021" RevisionGUID="4a9d24e2-85b0-4e94-85d5-293c8a4f8db0" CreationDate="2011-06-22T15:30:49.820" UserId="8185" Text="Sources (other than tutorials) on Game Mechanics" />
  <row Id="31304" PostHistoryTypeId="3" PostId="14021" RevisionGUID="4a9d24e2-85b0-4e94-85d5-293c8a4f8db0" CreationDate="2011-06-22T15:30:49.820" UserId="8185" Text="&lt;game-mechanics&gt;&lt;documentation&gt;" />
  <row Id="31305" PostHistoryTypeId="2" PostId="14022" RevisionGUID="c929a9c2-3aac-4873-8e8a-2583ff95dd81" CreationDate="2011-06-22T15:57:51.700" UserId="7911" Text="How big is your map?  It could be that your grid sampling is blowing out the caches as it gets bigger, causing the sudden slow down.  It could be that your loop needs optimizing.  Also, how long is too long?  Is your map static at run time?  You said in passing that this is for smoothing and not rendering, how are you using this?&#xD;&#xA;&#xD;&#xA;Eight normals is a little excessive, I think that you'd do fine with just four closest and ignoring the diagonals but suggest trying a before-and-after version to compare results.  You could also march down the rows and carry forward results from the previous point to avoid some computation, it's an approximation but all lighting is an approximation.&#xD;&#xA;&#xD;&#xA;If your map is static, pre-compute and save the data along with the map.  If your map is generated at run time then embed the normal calculation into the generation code where you have all the data handy.  If your map changes at run time then only recalculate the affected points.&#xD;&#xA;" />
  <row Id="31306" PostHistoryTypeId="2" PostId="14023" RevisionGUID="4ad0b021-985d-4652-b868-e02c77e65130" CreationDate="2011-06-22T15:58:03.270" UserId="8187" Text="Where raw performance is concerned, C++ as a language has an advantage over Objective-C as it favors compile-time over runtime (static dispatch, templates, C++ 0x `constexpr`). It is doubtful that Objective-C will ever replace C++ as the lingua france of cutting-edge game development.&#xD;&#xA;&#xD;&#xA;However, more dynamic languages like Objective-C are generally superior where ease of implementation is concerned. But no one forces you to implement your game in a single language, and it's common to embed the runtime for an even higher-level language like Lua into C++ game engines.&#xD;&#xA;&#xD;&#xA;This isn't to say that Objective-C is a bad language for game development - its rather unique combination of raw performance and dynamism definetely fits the problem domain, and thanks to Apple it has recently gained some popularity - but it's not a silver bullet: There are better choices for the highest and the low end of the performance spectrum." />
  <row Id="31308" PostHistoryTypeId="5" PostId="14023" RevisionGUID="39379887-5b0a-4506-af00-a49ff001b6c2" CreationDate="2011-06-22T16:09:51.203" UserId="8187" Comment="edited body" Text="Where raw performance is concerned, C++ as a language has an advantage over Objective-C as it favors compile-time over runtime (static dispatch, templates, C++ 0x `constexpr`). It is doubtful that Objective-C will ever replace C++ as the lingua france of cutting-edge game development.&#xD;&#xA;&#xD;&#xA;However, more dynamic languages like Objective-C are generally superior where ease of implementation is concerned. But no one forces you to implement your game in a single language, and it's common to embed the runtime for an even higher-level language like Lua into C++ game engines.&#xD;&#xA;&#xD;&#xA;This isn't to say that Objective-C is a bad language for game development - its rather unique combination of raw performance and dynamism definitely fits the problem domain, and thanks to Apple it has recently gained some popularity - but it's not a silver bullet: There are better choices for the highest and the low end of the performance spectrum." />
  <row Id="31310" PostHistoryTypeId="2" PostId="14024" RevisionGUID="a7682bf8-8416-4523-bf66-3b78fd7f984e" CreationDate="2011-06-22T17:23:51.233" UserId="744" Text="When I was at Cryptic Studios we were working on something like this for mission/quest generation. The designers specified mission objectives somewhat abstractly and it laid those out with some randomness in &quot;player travel order&quot; and cut paths between them. An early version shipped with Star Trek Online as &lt;a href=&quot;http://en.wikipedia.org/wiki/Star_Trek_Online#Genesis_System_.28Exploration_missions.29&quot;&gt;Genesis Missions&lt;/a&gt;. At the time we were very excited about it but I have no idea how much it continued after I left, or if it's available in the end-user Foundry tools. (Which was the eventual goal.)" />
  <row Id="31311" PostHistoryTypeId="2" PostId="14025" RevisionGUID="60643846-feb2-4598-8fea-74a2c17d4dd4" CreationDate="2011-06-22T18:01:39.790" UserId="7328" Text="i started to place a comment bt it went to long so changed it to an answer : &#xD;&#xA;&#xD;&#xA;first of all you have specify your target platform, and it would also help if you tell which genre are you going to create a game. the brad answer is to download and install dx SDK if you are going to develop for microsoft group or opengl sdk if you are going to develop for others. there are many sample codes with enough documentation inside each sdk.&#xD;&#xA;&#xD;&#xA;or you can just pick a game engine again based on the genre and platform you are going to create your game and start reading that engine's specific manual. studying a engine help you create your games easier but will take you a lot more time until you reach the point that you can start your games from the scrach( and blieve me starting to develop a gameengine is almost always a bad idea). for stat I suggest [essenthel engine](www.esenthel.com). it comes out with a lot of samples and an active community and it's very easy to use almost the easiest engine i've ever seen in c++ and it's also free unless you want to publish a game with it. but it needs a lot of c++ knowledge to begin with and one might consider it as a moderate engine compared to UDK or similar gigantic engines." />
  <row Id="31312" PostHistoryTypeId="25" PostId="14004" RevisionGUID="26570967-0555-4023-9f4e-734b3bfbdf89" CreationDate="2011-06-22T18:24:54.497" Comment="http://twitter.com/#!/StackGameDev/status/83601367448559616" />
  <row Id="31313" PostHistoryTypeId="2" PostId="14026" RevisionGUID="382e108c-6ccd-4d2e-9fcc-2ea5cf1c5c00" CreationDate="2011-06-22T18:49:12.523" UserId="7863" Text="I like a approach more close to Adam's vision from the t-machine blog. Components should be only data, and systems do all the job with them.&#xD;&#xA;&#xD;&#xA;See an example of ES implementation in C#:&#xD;&#xA;https://github.com/thelinuxlich/artemis_CSharp&#xD;&#xA;&#xD;&#xA;And an example game using it(XNA 4):&#xD;&#xA;https://github.com/thelinuxlich/starwarrior_CSharp" />
  <row Id="31314" PostHistoryTypeId="5" PostId="14025" RevisionGUID="4130a44a-6980-4b43-8a94-b242a45dde25" CreationDate="2011-06-22T19:33:49.347" UserId="7328" Comment="added 568 characters in body" Text="i started to place a comment bt it went to long so changed it to an answer : &#xD;&#xA;&#xD;&#xA;first of all you have specify your target platform, and it would also help if you tell which genre are you going to create a game. the brad answer is to download and install dx SDK if you are going to develop for microsoft group or opengl sdk if you are going to develop for others. there are many sample codes with enough documentation inside each sdk.&#xD;&#xA;&#xD;&#xA;or you can just pick a game engine again based on the genre and platform you are going to create your game and start reading that engine's specific manual. studying a engine help you create your games easier but will take you a lot more time until you reach the point that you can start your games from the scrach( and blieve me starting to develop a gameengine is almost always a bad idea). for stat I suggest [essenthel engine](www.esenthel.com). it comes out with a lot of samples and an active community and it's very easy to use almost the easiest engine i've ever seen in c++ and it's also free unless you want to publish a game with it. but it needs a lot of c++ knowledge to begin with and one might consider it as a moderate engine compared to UDK or similar gigantic engines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;esenthel engine has only target platform of pc and mac and if you are a license developer you can also create games for ipad/iphone. for an opensource game development i recommend taking a look on ogre3D, it's an opensource engine and even there is chapter in &quot;deitel &amp; deitel: c++ how to program&quot; about it. but as far as I know (I didn't try that engine myself) it's almost somevery basic framework which force you to add many conecpts of your game yourself. And I think givving a bigger challange you can learn a lot more if you really get into it." />
  <row Id="31316" PostHistoryTypeId="2" PostId="14028" RevisionGUID="c181d29b-af57-4c44-bdc3-88a7f74f495b" CreationDate="2011-06-22T20:08:03.417" UserId="7661" Text="Its questions like these, is why I wrote this (check link) and guess what it got closed and voted down.  Anyway I hope it is of some use to you.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12892/education-paths-to-game-programming-dev-on-windows-linux-june-2011" />
  <row Id="31317" PostHistoryTypeId="5" PostId="14028" RevisionGUID="3441b2a9-fb48-45f1-ae0e-4a9837508e32" CreationDate="2011-06-22T20:26:03.483" UserId="7661" Comment="added 123 characters in body; added 7 characters in body" Text="Its questions like these, is why I wrote this (check link) and guess what it got closed and voted down.  Anyway I hope it is of some use to you.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12892/education-paths-to-game-programming-dev-on-windows-linux-june-2011&#xD;&#xA;&#xD;&#xA;The most important part of that link is that I recommend you &quot;Game Coding Complete&quot;, its near the bottom of the link I gave.  " />
  <row Id="31318" PostHistoryTypeId="6" PostId="8000" RevisionGUID="3e94d485-e71e-4452-b62e-bfa81ee826f0" CreationDate="2011-06-22T20:29:48.733" UserId="1156" Comment="edited tags; edited tags" Text="&lt;c#&gt;&lt;architecture&gt;&lt;design-patterns&gt;&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="31319" PostHistoryTypeId="2" PostId="14029" RevisionGUID="c0ceebd3-940a-43a7-815d-fb2b9f0e8f67" CreationDate="2011-06-22T20:35:08.690" UserId="8193" Text="I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes?&#xD;&#xA;&#xD;&#xA;In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language...&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="31320" PostHistoryTypeId="1" PostId="14029" RevisionGUID="c0ceebd3-940a-43a7-815d-fb2b9f0e8f67" CreationDate="2011-06-22T20:35:08.690" UserId="8193" Text="Does md2 support skeletal meshes?" />
  <row Id="31321" PostHistoryTypeId="3" PostId="14029" RevisionGUID="c0ceebd3-940a-43a7-815d-fb2b9f0e8f67" CreationDate="2011-06-22T20:35:08.690" UserId="8193" Text="&lt;c++&gt;&lt;3d-meshes&gt;&lt;skeletal&gt;" />
  <row Id="31322" PostHistoryTypeId="5" PostId="14029" RevisionGUID="55d05ee4-b2e6-4b0d-b665-aaa458dd7daf" CreationDate="2011-06-22T20:42:18.313" UserId="8193" Comment="added 56 characters in body" Text="I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes?&#xD;&#xA;&#xD;&#xA;In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language...&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;For got to mention, the engine is based on OpenGL..." />
  <row Id="31323" PostHistoryTypeId="2" PostId="14030" RevisionGUID="9d8404dc-7c36-4ea2-a0f6-03fbca37cd8b" CreationDate="2011-06-22T20:42:31.420" UserId="101" Text="No, nor did the MD3 format used in Quake 3. As far as I know, skeletal animation was introduced as recently as id Tech 4 and the MD5 model format." />
  <row Id="31324" PostHistoryTypeId="2" PostId="14031" RevisionGUID="e0b40306-085b-40b5-be50-68a26e79c9ed" CreationDate="2011-06-22T20:44:26.533" UserId="8194" Text="Not sure whether this is an LWJGL or math question. I want to check whether a shape is on-screen, so that I don't have to render it if it isn't. First of all, is there any simple way to do this that I am overlooking? Like some method or something that I haven't found? I'm going to assume there isn't.&#xD;&#xA;&#xD;&#xA;I tried using my trigonometry skills, but it is hard to do this because of how glRotate also distorts the image a little for perspective and realism. Or, is there any way to easily determine if a ray starting from the camera, and going outward in a straight line intersects a shape? (I can probably do it with my math skillz, but is there an easier way?)&#xD;&#xA;&#xD;&#xA;By the way, I can easily determine the angle at which the camera is facing around the x and y axis.&#xD;&#xA;&#xD;&#xA;EDIT: Or, possibly, I could get the angles of a vector from the camera to the object, and compare those angles to my camera angles. But I have a feeling that the distorts from glRotate and glTranslate would be an issue. I'll try it though." />
  <row Id="31325" PostHistoryTypeId="1" PostId="14031" RevisionGUID="e0b40306-085b-40b5-be50-68a26e79c9ed" CreationDate="2011-06-22T20:44:26.533" UserId="8194" Text="LWJGL Determining whether or not a polygon is on-screen." />
  <row Id="31326" PostHistoryTypeId="3" PostId="14031" RevisionGUID="e0b40306-085b-40b5-be50-68a26e79c9ed" CreationDate="2011-06-22T20:44:26.533" UserId="8194" Text="&lt;opengl&gt;&lt;screen&gt;&lt;lwjgl&gt;&lt;polygon&gt;" />
  <row Id="31327" PostHistoryTypeId="2" PostId="14032" RevisionGUID="154fae42-49a5-4f46-8d5e-edb218411eb1" CreationDate="2011-06-22T20:55:43.800" UserId="4410" Text="You could research frustum culling. Ideally done as coarsely as possible (say on a whole object - with maybe a bounding sphere), from this you know if it's completely inside (and all visible), part-in, or completely outside and therefore no rendering needed. Depending on what you're trying to achieve, it's possibly faster for the GPU to render some of these primitives than to try and determine their visibility first. The GPU is very good at discarding triangles that are completely outside the screen. So it might be good enough to just throw away objects that are definitely not visible and render the rest. You could cull individual polygons against the frustum too, but I'd profile this to see if it's actually faster or slowing you down." />
  <row Id="31328" PostHistoryTypeId="2" PostId="14033" RevisionGUID="9296e9f6-4975-47cf-b09a-22f5c92e91b5" CreationDate="2011-06-22T21:05:06.470" UserId="3794" Text="You can use [Occlusion Query][1] for this very efficiently. It is simple thing saying how many fragments were rasterized. So first you draw all the renders to set z-buffer and than you ran occlusion query to know how big portion of the object is visible. If you need exact portion you first run query before rendering (you get number for fully visible object) and one after rendering (you get visible portion). Then divide the first value with second one(this is useful when size of object on screen changes every frame)&#xD;&#xA;&#xD;&#xA;As [this thread][2] says, occlusion queries are supported by lwjgl. &#xD;&#xA;&#xD;&#xA;And [GPU Gems article][3] for more details&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/wiki/Occlusion_Query&#xD;&#xA;  [2]: http://lwjgl.org/forum/index.php?topic=2645.0&#xD;&#xA;  [3]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter06.html" />
  <row Id="31329" PostHistoryTypeId="25" PostId="14031" RevisionGUID="090e47e5-ce15-4849-84c6-7600f12059a3" CreationDate="2011-06-22T21:24:54.940" Comment="http://twitter.com/#!/StackGameDev/status/83646668641271808" />
  <row Id="31330" PostHistoryTypeId="2" PostId="14034" RevisionGUID="672929cd-0c70-429e-94af-e5bb7c6de387" CreationDate="2011-06-22T21:30:06.340" UserId="6316" Text="I'm not saying this is a perfect analogy, but you might think about &lt;a href=&quot;http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm&quot;&gt;Bresenham's line algorithm&lt;/a&gt;.  A modification of this algorithm or one of its extensions might be helpful, especially if you couple it with some of the other posts and comments.  Typically, this algorithm isn't concerned with ordering, but I would think that you'd be able to add that fairly trivially." />
  <row Id="31331" PostHistoryTypeId="5" PostId="14029" RevisionGUID="5c60d8b9-0ff0-436d-85a4-e2b48c322bce" CreationDate="2011-06-22T21:32:59.537" UserId="8193" Comment="added 319 characters in body; added 51 characters in body" Text="I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes?&#xD;&#xA;&#xD;&#xA;In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language...&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;For got to mention, the engine is based on OpenGL...&#xD;&#xA;&#xD;&#xA;Alright, for anyone who is reading this, I just found the Doom 3 md5 specifications (&lt;http://tfc.duke.free.fr/coding/md5-specs-en.html&gt;). It gives you some help on writing a parser (see bottom of link), but the example doesn't support lighting and texture mapping (the second set of example code allows for animation). Thanks @Neverender for answering my question..." />
  <row Id="31332" PostHistoryTypeId="2" PostId="14035" RevisionGUID="ad842be5-501d-4be0-9619-02821718945d" CreationDate="2011-06-22T21:49:32.307" UserId="-1" Text="" />
  <row Id="31333" PostHistoryTypeId="2" PostId="14036" RevisionGUID="b4570f29-6563-4750-87f2-58b39ff8e5b4" CreationDate="2011-06-22T21:49:32.307" UserId="-1" Text="" />
  <row Id="31334" PostHistoryTypeId="2" PostId="14037" RevisionGUID="8f64fecc-fe58-4750-971c-cf5c2f1217fe" CreationDate="2011-06-22T22:20:34.007" UserId="7888" Text="If you simply need to have a progress bar alongside your game you can use the [LayoutGameActivity][1] which was [added for that purpose][2]. `LayoutGameActivity` allows you to place the andEngine View into a standard Android layout which is loaded from XML, rather than using its default layout. As mentioned in the article, this is accomplished by overriding `getLayoutID()` and `getRenderSurfaceViewID()` in your game `LayoutGameActivity` class.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    protected int getLayoutID() {&#xD;&#xA;            return R.layout.xmllayoutexample;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    protected int getRenderSurfaceViewID() {&#xD;&#xA;            return R.id.xmllayoutexample_rendersurfaceview;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Code fragment from the linked [forum post][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/andengine/source/browse/src/org/anddev/andengine/ui/activity/LayoutGameActivity.java&#xD;&#xA;  [2]: http://www.andengine.org/forums/development/combining-andengine-with-regular-widgets-t699.html#p3505" />
  <row Id="31335" PostHistoryTypeId="5" PostId="9569" RevisionGUID="4e394e8b-25a6-403a-949c-5eaf4ad2213f" CreationDate="2011-06-22T22:26:22.483" UserId="7888" Comment="Corrected spelling and grammar" Text="I am developing game using andEngine. I need to place a progress bar in my game to denote time remaining in the game. Is there a built-in method for doing this in andEngine? My searches only turned up results for android, not for andEngine. &#xD;&#xA;&#xD;&#xA;Can anyone give me suggestions or articles relevant to this issue? Please, it's urgent." />
  <row Id="31336" PostHistoryTypeId="4" PostId="9569" RevisionGUID="4e394e8b-25a6-403a-949c-5eaf4ad2213f" CreationDate="2011-06-22T22:26:22.483" UserId="7888" Comment="Corrected spelling and grammar" Text="How do I place a progress bar in andEngine?" />
  <row Id="31337" PostHistoryTypeId="24" PostId="9569" RevisionGUID="4e394e8b-25a6-403a-949c-5eaf4ad2213f" CreationDate="2011-06-22T22:26:22.483" Comment="Proposed by 7888 approved by 962 edit id of 516" />
  <row Id="31338" PostHistoryTypeId="2" PostId="14038" RevisionGUID="d9ddf9d0-547a-4046-a5bd-20648a742878" CreationDate="2011-06-22T22:58:02.053" UserId="4584" Text="I want to be able to control the game via keyboard while the game does not have focus... How can I do this in XNA?" />
  <row Id="31339" PostHistoryTypeId="1" PostId="14038" RevisionGUID="d9ddf9d0-547a-4046-a5bd-20648a742878" CreationDate="2011-06-22T22:58:02.053" UserId="4584" Text="Accept keyboard input when game is not in focus?" />
  <row Id="31340" PostHistoryTypeId="3" PostId="14038" RevisionGUID="d9ddf9d0-547a-4046-a5bd-20648a742878" CreationDate="2011-06-22T22:58:02.053" UserId="4584" Text="&lt;xna&gt;&lt;c#&gt;&lt;keyboard&gt;" />
  <row Id="31341" PostHistoryTypeId="5" PostId="13932" RevisionGUID="4d5dbe9d-5a13-4910-8df9-d2432b753022" CreationDate="2011-06-22T23:01:34.263" UserId="7888" Comment="Spelling and grammar corrections" Text="`Arctanh` gives you the tangent for the hyperbolic curve! As far as I know your parabola isn't a hyperbola.&#xD;&#xA;&#xD;&#xA;But we have good news: finding the tangent for your parabola is easier.&#xD;&#xA;The equation is &#xD;&#xA;&#xD;&#xA;![x = s&amp;middot;t =&amp;gt; t= x/s;y = s&amp;middot;t + g/2 &amp;middot;t&amp;sup2; =&amp;gt; y = x +g/2 &amp;middot; x&amp;sup2;/s&amp;sup2;][1]&#xD;&#xA;&#xD;&#xA;Where s is your `launchVelocity`. Now the slope of your arrow is:&#xD;&#xA;&#xD;&#xA;![&amp;part;y/&amp;part;y = g/(2s&amp;sup2;)&amp;middot;x+1][2]&#xD;&#xA;&#xD;&#xA;You can safety use `Arctan` now if you like.&#xD;&#xA;&#xD;&#xA;Some additional info about physics:&#xD;&#xA;&#xD;&#xA;The approximate trajectory you are simulating applies to the center of mass of your arrow. When you say &quot;position&quot; (x,y) you are talking about the center of mass' position. The center of mass for an arrow is slightly forward from the midpoint and you should take that into account if you are going to draw the arrow.&#xD;&#xA;&#xD;&#xA;Keep in mind that you are not considering the inertial momentum of the arrow (which can vary a lot if you are firing a giant ballista) and you are not considering the arrow's fluid dynamics: bow arrow flight won't follow a parabolic path!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/C6o5q.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/q8Knw.png" />
  <row Id="31342" PostHistoryTypeId="24" PostId="13932" RevisionGUID="4d5dbe9d-5a13-4910-8df9-d2432b753022" CreationDate="2011-06-22T23:01:34.263" Comment="Proposed by 7888 approved by 51 edit id of 513" />
  <row Id="31343" PostHistoryTypeId="5" PostId="14036" RevisionGUID="921f9418-12a1-44c9-a76a-c4b8978f0461" CreationDate="2011-06-22T23:01:39.397" UserId="7888" Comment="added 220 characters in body" Text="The Lightweight Java Game Library (LWJGL) provides access to high performance, cross-platform libraries OpenGL and OpenAL. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks." />
  <row Id="31344" PostHistoryTypeId="24" PostId="14036" RevisionGUID="921f9418-12a1-44c9-a76a-c4b8978f0461" CreationDate="2011-06-22T23:01:39.397" Comment="Proposed by 7888 approved by 51 edit id of 515" />
  <row Id="31345" PostHistoryTypeId="5" PostId="14035" RevisionGUID="3daf1cc2-1936-45a8-9854-b44eed9dc2fe" CreationDate="2011-06-22T23:01:42.050" UserId="7888" Comment="added 565 characters in body" Text="The Lightweight Java Game Library (LWJGL) provides access to high performance, cross-platform libraries OpenGL and OpenAL. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks.&#xD;&#xA;&#xD;&#xA;LWJGL is not meant to make writing games particularly easy; it is primarily an enabling technology which allows developers to get at resources that are simply otherwise unavailable or poorly implemented on the existing Java platform. &#xD;&#xA;&#xD;&#xA;LWJGL is available under a BSD license, which means it's open source and freely available at no charge." />
  <row Id="31346" PostHistoryTypeId="24" PostId="14035" RevisionGUID="3daf1cc2-1936-45a8-9854-b44eed9dc2fe" CreationDate="2011-06-22T23:01:42.050" Comment="Proposed by 7888 approved by 51 edit id of 514" />
  <row Id="31348" PostHistoryTypeId="25" PostId="14038" RevisionGUID="a8963d82-93bd-429a-a6e0-7358404c18df" CreationDate="2011-06-23T00:24:54.987" Comment="http://twitter.com/#!/StackGameDev/status/83691967476805632" />
  <row Id="31349" PostHistoryTypeId="2" PostId="14039" RevisionGUID="927fe050-7568-4a5a-83fd-175bf14a804e" CreationDate="2011-06-23T00:36:28.427" UserId="7911" Text="What is it you're trying to do specifically?  I may be able to suggest other architectures that work better than ignoring the user's wish to type in another window.  I assume that this is a windows PC platform question and not XBox problem.&#xD;&#xA;" />
  <row Id="31350" PostHistoryTypeId="12" PostId="14039" RevisionGUID="bd782380-cd01-4a05-bd73-d2a703e519ee" CreationDate="2011-06-23T00:48:13.730" UserId="7911" Text="[{&quot;Id&quot;:7911,&quot;DisplayName&quot;:&quot;Patrick Hughes&quot;}]" />
  <row Id="31352" PostHistoryTypeId="5" PostId="14038" RevisionGUID="22f85ae7-6a7a-45b2-9a9c-6c6142e5ef80" CreationDate="2011-06-23T00:56:22.793" UserId="4584" Comment="added 589 characters in body" Text="I want to be able to control the game via keyboard while the game does not have focus... How can I do this in XNA?&#xD;&#xA;&#xD;&#xA;EDIT: I bought a tablet. I want to write a separate app to overly the screen with controls that will send keyboard input to the game. Although, it's not sending the input DIRECT to the game, it's using the method discussed in this SO question:&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6446085/emulate-held-down-key-on-keyboard&#xD;&#xA;&#xD;&#xA;To my understanding, my test app is working the way it should be but the game is not responding to this input. I originally thought that Keyboard.GetState() would get the state regardless that the game is not in focus, but that doesn't appear to be the case." />
  <row Id="31353" PostHistoryTypeId="2" PostId="14041" RevisionGUID="3a375d21-9dec-4c3b-a19f-c5acda0378c7" CreationDate="2011-06-23T01:01:33.850" UserId="7800" Text="Aside from using virtual functions as others already mentioned, you should also store an enum in the &quot;base&quot; class that specifies the type. Something like:&#xD;&#xA;&#xD;&#xA;    enum eEntType{&#xD;&#xA;    ENT_PLAYER, &#xD;&#xA;    ENT_PHYS, &#xD;&#xA;    ENT_ETC&#xD;&#xA;    };&#xD;&#xA;    eEntType m_eType;&#xD;&#xA;&#xD;&#xA;Have the base class constructor take in an `eEntType` which sets it at the get-go. Then make read-only accessors to them. This is a quicker way of differentiating these objects, and it's good on the go/any time.&#xD;&#xA;&#xD;&#xA;All the deriving subclasses should use the member initializer list passing a 'hardcoded' value of its type to the base ctor." />
  <row Id="31354" PostHistoryTypeId="13" PostId="14039" RevisionGUID="19d93da3-c687-4cd3-8f5b-ea3c071da2dd" CreationDate="2011-06-23T01:09:49.303" UserId="7911" Text="[{&quot;Id&quot;:7911,&quot;DisplayName&quot;:&quot;Patrick Hughes&quot;}]" />
  <row Id="31355" PostHistoryTypeId="2" PostId="14042" RevisionGUID="fa84a2ba-aebb-438c-bb6d-d9abf1faf6ad" CreationDate="2011-06-23T01:12:16.510" UserId="7800" Text="You're gonna want to think at a higher level. Playing and switching among a sequence of frames to create an animations should be encapsulated on the lowest level. It should know nothing about how many, or what attacks the player has." />
  <row Id="31356" PostHistoryTypeId="5" PostId="14039" RevisionGUID="9b902b5a-18c7-4f03-8f26-06f0e43caf6a" CreationDate="2011-06-23T01:16:32.217" UserId="7911" Comment="added 236 characters in body; added 59 characters in body" Text="[Thanks Jonathan, you're absolutely right and I edited]&#xD;&#xA;&#xD;&#xA;Probably the safest way of doing that would be a little IPC (inter-process communication) that your game starts and listens to and your overlay tries to find and sends messages to.&#xD;&#xA;&#xD;&#xA;The exact API to create that channel is going to be operating system specific.  Wikipedia gets into some elaborate software, but something as simple as a shared memory area (with thread safe locks controlling access) and a shared data structure to pass the information along would work great.&#xD;&#xA;" />
  <row Id="31357" PostHistoryTypeId="5" PostId="14039" RevisionGUID="94adc4ec-2ede-421a-830a-99680661f141" CreationDate="2011-06-23T01:59:21.820" UserId="7911" Comment="deleted 59 characters in body" Text="Probably the safest way of doing that would be a little IPC (inter-process communication) that your game starts and listens to and your overlay tries to find and sends messages to.&#xD;&#xA;&#xD;&#xA;The exact API to create that channel is going to be operating system specific.  Wikipedia gets into some elaborate software, but something as simple as a shared memory area (with thread safe locks controlling access) and a shared data structure to pass the information along would work great.&#xD;&#xA;" />
  <row Id="31358" PostHistoryTypeId="25" PostId="14016" RevisionGUID="6b298294-dbbd-4681-a2c1-6b09bdf4e412" CreationDate="2011-06-23T03:24:55.440" Comment="http://twitter.com/#!/StackGameDev/status/83737267658690560" />
  <row Id="31359" PostHistoryTypeId="2" PostId="14043" RevisionGUID="d7cabd75-8607-4971-b8aa-0f8f3f2b5931" CreationDate="2011-06-23T03:47:22.177" UserId="2061" Text="If your game does not have focus, it should not be reading input - that is a giant programming taboo.&#xD;&#xA;&#xD;&#xA;However, it is possible.  Use P/Invoke to call [SetWindowsHookEx](http://msdn.microsoft.com/en-us/library/ms644990%28v=vs.85%29.aspx) with the parameter `WH_KEYBOARD` (and dwThreadId set to null).  This will call your hook event on every keypress, no matter what window has focus at the time.&#xD;&#xA;&#xD;&#xA;Again, though, I am not recommending this.  It is quite likely this will even trigger some virus scanners." />
  <row Id="31360" PostHistoryTypeId="2" PostId="14044" RevisionGUID="5a657394-08fb-4245-bc72-3e4d92b73e9b" CreationDate="2011-06-23T03:55:03.047" UserId="2282" Text="[background information]&#xD;&#xA;&#xD;&#xA;On the Source engine (and it's antecessor, goldsrc, quake's) the game objects are divided on two types, world and entities. The world is the map geometry and the entities are players, particles, sounds, scores, etc (for the Source Engine).&#xD;&#xA;&#xD;&#xA;Every entity has a [think][1] function, which do all the logic for that entity.&#xD;&#xA;&#xD;&#xA;So, if everything that needs to be processed comes from a base class with the think function, the game engine could store everything on a list and, on every frame, loop through it and call that function.&#xD;&#xA;&#xD;&#xA;On a first look, this idea is reasonable, but it can take too much resources, if the game has a lot of entities..&#xD;&#xA;&#xD;&#xA;[end of background information]&#xD;&#xA;&#xD;&#xA;So, how does a engine like Source take care (process, update, draw, etc) of the game objects?&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Think" />
  <row Id="31361" PostHistoryTypeId="1" PostId="14044" RevisionGUID="5a657394-08fb-4245-bc72-3e4d92b73e9b" CreationDate="2011-06-23T03:55:03.047" UserId="2282" Text="How does an Engine like Source process entities?" />
  <row Id="31362" PostHistoryTypeId="3" PostId="14044" RevisionGUID="5a657394-08fb-4245-bc72-3e4d92b73e9b" CreationDate="2011-06-23T03:55:03.047" UserId="2282" Text="&lt;engine&gt;&lt;design-patterns&gt;&lt;entity-system&gt;&lt;logic&gt;&lt;valve&gt;" />
  <row Id="31363" PostHistoryTypeId="2" PostId="14045" RevisionGUID="3827b712-aa1d-4126-9eb0-697a277ef31d" CreationDate="2011-06-23T06:06:22.377" UserId="2061" Text="Well, there's pretty much no other way to do it - you're going to *have* to loop through and call `think()` for every entity at least once every few frames.&#xD;&#xA;&#xD;&#xA;You could put entities on their own thread, but then you have the whole state-synchronization nightmare, which is definitely not worth it.&#xD;&#xA;&#xD;&#xA;&gt; On a first look, this idea is reasonable, but it can take too much resources, if the game has a lot of entities..&#xD;&#xA;&#xD;&#xA;That is why the Source engine puts [a hard limit to the number of entities which can exist at one time][1]:  4096 entities, of which only half (2048) can be networked.  Go over either of these limits, and the game will crash.&#xD;&#xA;&#xD;&#xA;That is also why, when creating a map, they recommend you don't use more than about 800 entities.&#xD;&#xA;&#xD;&#xA;[1]: http://developer.valvesoftware.com/wiki/Entity_limit" />
  <row Id="31364" PostHistoryTypeId="25" PostId="14044" RevisionGUID="57cfcf97-5bc8-4ff7-933c-0ac6e333962d" CreationDate="2011-06-23T06:24:55.973" Comment="http://twitter.com/#!/StackGameDev/status/83782569006596096" />
  <row Id="31365" PostHistoryTypeId="2" PostId="14046" RevisionGUID="660289cd-b481-4817-89b5-c8821f745d44" CreationDate="2011-06-23T06:34:14.500" UserId="6592" Text="I have raw image data (may be png, jpg, ...) and I want it converted in Android without changing its pixel depth (bpp). In particular, when I load a grayscale (8 bpp) image that I want to use as alpha (glTexImage() with GL_ALPHA), it converts it to 16 bpp (presumably 5_6_5).&#xD;&#xA;&#xD;&#xA;While I do have a plan b (actually, I'm probably on plan 'e' by now, this is really becoming annoying) I would really like to discover an easy way to do this using what is readily available in the api.&#xD;&#xA;&#xD;&#xA;So far, I'm using BitmapFactory.decodeByteArray().&#xD;&#xA;&#xD;&#xA;While I'm at it. I'm doing this from a native environment via jni (passing the buffer in from C, and a new buffer back to C from Java). Any portable solution in C/C++ would be preferable, but I don't want to introduce anything that might break in future versions of Android, etc." />
  <row Id="31366" PostHistoryTypeId="1" PostId="14046" RevisionGUID="660289cd-b481-4817-89b5-c8821f745d44" CreationDate="2011-06-23T06:34:14.500" UserId="6592" Text="How can I convert an image from raw data in Android without any munging?" />
  <row Id="31367" PostHistoryTypeId="3" PostId="14046" RevisionGUID="660289cd-b481-4817-89b5-c8821f745d44" CreationDate="2011-06-23T06:34:14.500" UserId="6592" Text="&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="31369" PostHistoryTypeId="2" PostId="14048" RevisionGUID="55e4c44e-a9c0-484f-84c5-51018b74fd15" CreationDate="2011-06-23T08:19:13.173" UserId="7588" Text="I must admit, I don't see anything that should pose problem here in unity.&#xD;&#xA;&#xD;&#xA;You can just have your walls as static colliders that you place manually, and use a _capsule collider_ for your player. The Unity Platform tutorial is good even if it is in JS for the most part, and may help you with collisions.&#xD;&#xA;&#xD;&#xA;The problem of the character &quot;blinking&quot; seems to me that it is just a physics problem (maybe the character is too small or too large). You should __NEVER__ manually set the x / y position of something when using a physics engine, you need to let it do it's job.&#xD;&#xA;&#xD;&#xA;_Although to try and answer your questions :_  &#xD;&#xA;In Unity you can create different [Tags](http://unity3d.com/support/documentation/Components/class-TagManager.html), which you can check on a collision.&#xD;&#xA;This means you can tag colliders that have special properties, and in your collision code check gameObject.transform.tag == &quot;_YourTag_&quot;. You should be able to differentiate the vertical and horizontal walls this way.&#xD;&#xA;&#xD;&#xA;_In response to 2) :_  &#xD;&#xA;If you do not want to use Physics, but still use collision detection, your objects have to be static, and you need to set the colliders as *__Triggers__*. This also means in your code you have to use _OnTriggerEnter()_ / Exit, etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &quot;It seems when the player falls and hit something he go through a bit before being replaced at correct position by unity.&quot;&#xD;&#xA;&#xD;&#xA;To counter this problem, you could reduce your physics time-step in the Physics properties of the game, or make the number of iterations higher." />
  <row Id="31370" PostHistoryTypeId="2" PostId="14049" RevisionGUID="edf71e39-6de6-4be6-800c-c97d6aad4934" CreationDate="2011-06-23T08:36:12.720" UserId="7981" Text="I have seen [some Voronoi shatter videos on Youtube][1].&#xD;&#xA;&#xD;&#xA;What is Your experience with it? What are it's pros and cons in time complexity (speed), space complexity (need for resources), programming complexity (ease of programming) ...? Does it emulate how a real material would react?&#xD;&#xA;&#xD;&#xA;Thanks. :)&#xD;&#xA;&#xD;&#xA;[1]:http://www.youtube.com/results?search_query=voronoi+shatter&amp;aq=f" />
  <row Id="31371" PostHistoryTypeId="1" PostId="14049" RevisionGUID="edf71e39-6de6-4be6-800c-c97d6aad4934" CreationDate="2011-06-23T08:36:12.720" UserId="7981" Text="What are pros and cons of Voronoi shatter?" />
  <row Id="31372" PostHistoryTypeId="3" PostId="14049" RevisionGUID="edf71e39-6de6-4be6-800c-c97d6aad4934" CreationDate="2011-06-23T08:36:12.720" UserId="7981" Text="&lt;programming&gt;&lt;algorithm&gt;&lt;bullet-physics&gt;" />
  <row Id="31373" PostHistoryTypeId="2" PostId="14050" RevisionGUID="63a09e09-82ec-4c76-834d-319019dccca1" CreationDate="2011-06-23T08:45:27.573" UserId="7588" Text="There are many ways to implement animations, generally you would use a sprite sheet. This can get compilcated, but an easy way is to predefine character size, for example 128*64, and pre-calculate the number of lines and columns to get the total number of frames. I assume you are familiar with this however.&#xD;&#xA;&#xD;&#xA;You could end up with something like this (C# esque assuming tightly packed sprite sheet) :&#xD;&#xA;&#xD;&#xA;    class Animation {&#xD;&#xA;        Texture2D spriteSheet;&#xD;&#xA;        ushort rows, columns;&#xD;&#xA;&#xD;&#xA;        Animation(ushort spriteWidth, ushort spriteHeight)&#xD;&#xA;        {&#xD;&#xA;            rows = spriteSheet.Height / spriteHeight;&#xD;&#xA;            columns = spriteSheet.Width / spriteWidth;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        Rectangle GetFrame(ushort frameNumber);&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;If you have hundreds of animations, this will mean hundreds of sprite sheets and lots of memory. If you look at some older games, you could have the same animation for each melee attack, but the weapon's animation was put on top of that. This means a big save in sprite sheets, and could be useful.&#xD;&#xA;&#xD;&#xA;To check what attack a player currently has, I would simply have an array of animations (pre-loaded or not) which will be referenced by the player depending on the attacks he chooses. If you choose to decouple parts of the animation, an `AttackAnimation` could contain multiple animations for the top half of the body, the bottom hals, the weapon, etc.&#xD;&#xA;&#xD;&#xA;That could be something like this :&#xD;&#xA;&#xD;&#xA;    class AttackingAnimation {&#xD;&#xA;        List&lt;Animations&gt; animationList;&#xD;&#xA;        // Draw and update all animations...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Player {&#xD;&#xA;        AttackingAnimation attackingAnimations[10];&#xD;&#xA;        DoAttack(int attackIndex);&#xD;&#xA;    };" />
  <row Id="31374" PostHistoryTypeId="2" PostId="14051" RevisionGUID="c7fb8985-a1fa-49f0-b1d8-562d46a10173" CreationDate="2011-06-23T08:59:40.517" UserId="4894" Text="Your problem have a two part answer : &#xD;&#xA;&#xD;&#xA; 1 : First you have the problem of letting the user input some text. This can be easily done using the virtual keyboard available in Android. Something like this should do the trick. &#xD;&#xA;&#xD;&#xA;        InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);&#xD;&#xA;        imm.showSoftInput(v, InputMethodManager.SHOW_FORCED);&#xD;&#xA;&#xD;&#xA;Of course if you want something with your own look and feel you can create your own input service (look here for more info http://developer.android.com/resources/articles/creating-input-method.html)&#xD;&#xA;&#xD;&#xA;2 : Then, you need to give the user some kind of feedback, meaning write the text the user is typing in 3D. To do this, the basic idea is to create one quad per character, and map it to a texture containing your font, and place the quads in 3D where you wan't them to be. " />
  <row Id="31375" PostHistoryTypeId="5" PostId="12215" RevisionGUID="c927a4ee-2f37-4cd2-90d1-bfb42048de82" CreationDate="2011-06-23T09:01:47.427" UserId="7271" Comment="deleted 26 characters in body" Text="It's all about [projection][1], a geometric operation that lets you define a space from another space of superior dimension (basically, in your case, you're describing a 2D image from a 3D environment).&#xD;&#xA;&#xD;&#xA;Simply put, this is how 3D rendering engines generate an image (given a 3D scene &amp; a projection) :&#xD;&#xA;&#xD;&#xA;For each pixel of the resulting image&#xD;&#xA;&#xD;&#xA;* Compute the looking direction (according to the projection), it's basically a 3D vector&#xD;&#xA;* Find the nearest object in your scene that is &quot;seen&quot; in this direction (simply guess what objects are intersected with the vector, and keep the nearest one)&#xD;&#xA;* Compute the color of this object, you have the color of the pixel !&#xD;&#xA;&#xD;&#xA;Of course this is a simple model, I'm not talking about reflective/refractive/translucent objects of special effects such as smoke...&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graphical_projection" />
  <row Id="31376" PostHistoryTypeId="2" PostId="14052" RevisionGUID="1880bb8b-02ed-489e-be08-31db867fde1b" CreationDate="2011-06-23T09:10:47.140" UserId="5610" Text="I am doing a ray-casting in a 3d texture until I hit a correct value. I am doing the ray-casting in a cube and the cube corners are already in world coordinates so I don't have to multiply the vertices with the `modelviewmatrix` to get the correct position.&#xD;&#xA;&#xD;&#xA;**Vertex shader**&#xD;&#xA;&#xD;&#xA;    world_coordinate_ = gl_Vertex;&#xD;&#xA;&#xD;&#xA;**Fragment shader**&#xD;&#xA;&#xD;&#xA;    vec3 direction = (world_coordinate_.xyz - cameraPosition_);&#xD;&#xA;    direction = normalize(direction);&#xD;&#xA;    &#xD;&#xA;    for (float k = 0.0; k &lt; steps; k += 1.0) {&#xD;&#xA;    ....&#xD;&#xA;    pos += direction*delta_step;&#xD;&#xA;    float thisLum = texture3D(texture3_, pos).r;&#xD;&#xA;    if(thisLum &gt; surface_)&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Everything works as expected, what I now want is to sample the correct value to the depth buffer. The value that is now written to the depth buffer is the cube coordinate. But I want the value of `pos` in the 3d texture to be written.&#xD;&#xA;&#xD;&#xA;So lets say the cube is placed `10` away from origin in `-z` and the size is `10*10*10`. My solution that does not work correctly is this:&#xD;&#xA;&#xD;&#xA;    pos *= 10;&#xD;&#xA;    pos.z += 10;&#xD;&#xA;    pos.z *= -1;&#xD;&#xA;&#xD;&#xA;    vec4 depth_vec = gl_ProjectionMatrix * vec4(pos.xyz, 1.0);&#xD;&#xA;    float depth = ((depth_vec.z / depth_vec.w) + 1.0) * 0.5; &#xD;&#xA;    gl_FragDepth = depth;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31377" PostHistoryTypeId="1" PostId="14052" RevisionGUID="1880bb8b-02ed-489e-be08-31db867fde1b" CreationDate="2011-06-23T09:10:47.140" UserId="5610" Text="Writing the correct value in the depth buffer when using ray-casting" />
  <row Id="31378" PostHistoryTypeId="3" PostId="14052" RevisionGUID="1880bb8b-02ed-489e-be08-31db867fde1b" CreationDate="2011-06-23T09:10:47.140" UserId="5610" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;depth-buffer&gt;" />
  <row Id="31379" PostHistoryTypeId="25" PostId="14029" RevisionGUID="5d1e0bf0-e4e2-4efd-9fb4-a4d5288cd083" CreationDate="2011-06-23T09:24:55.583" Comment="http://twitter.com/#!/StackGameDev/status/83827866105692160" />
  <row Id="31380" PostHistoryTypeId="2" PostId="14053" RevisionGUID="9b9575c2-62b1-49e5-b380-e4f5f5c319e8" CreationDate="2011-06-23T10:14:30.420" UserId="3794" Text="volumetric raycasting. I know something about that :). &#xD;&#xA;&#xD;&#xA;But to you question:&#xD;&#xA;When you have sample in world space (your `pos`) you have to multiply it with View*Projection matrix to have correct output of depth. View matrix contains linear basis of the camera and converts the world position to the camera space and then you do projection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31381" PostHistoryTypeId="2" PostId="14054" RevisionGUID="abc99775-d47b-447c-9af1-5482dd6690c2" CreationDate="2011-06-23T10:31:55.293" UserId="4894" Text="Here's a great example of procedural terrain generation, using parameters like moisture, height etc... &#xD;&#xA;http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/" />
  <row Id="31382" PostHistoryTypeId="2" PostId="14055" RevisionGUID="36b35ad6-584c-4e0d-83a8-276c24e64917" CreationDate="2011-06-23T10:45:13.160" UserId="1141" Text="As to the last question: It doesn't emulate most of real-world materials aside from very few exceptions, and these only for some specific choices of the Voronoi cell seeds. For example, [toughened glass][1] shatters like this, since the material is &quot;pre-broken&quot; into a loosely-held Voronoi-like structure in the process of manufacturing it.&#xD;&#xA;&#xD;&#xA;On the other hand, state of the art particle systems don't usually emulate explosion dynamics, fluid flow in a waterfall or fog dispersion either ...&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Toughened_glass" />
  <row Id="31383" PostHistoryTypeId="2" PostId="14056" RevisionGUID="d7ebf6b7-0967-48a1-b440-b7cc88651df9" CreationDate="2011-06-23T11:02:15.967" UserId="1923" Text="The Xna.Framework.BoundingBox isn't designed to help provide that information, it simply is able to check for a collision of the cube as a unit. &#xD;&#xA;&#xD;&#xA;Determining which side collided sounds simple but it can actually be complex. You might want to look into [SAT (Separating axis therory/Test)][1]. The result of which axis and whether it is + or - the center of the cubeBox will help you deduce in which face the collision happened.&#xD;&#xA;&#xD;&#xA;Another quick &amp; dirty would be to [create 6 boxes around your main box][2], then when a collision is registered with the main box, see which 'outsideBox' is also involved and calculate a normal based on that. This would have challenges though if penetration is deep. A version of this idea would be to make each face its own thin box so you always know which box (face) the collision is on. Again, deep penetration may challenge that.&#xD;&#xA;&#xD;&#xA;Another idea would be to create a class which holds the bounding box and also creates Plane objects that coincide with the faces of the cube. Then you could use the built in Plane intersection tests to see which side the collision was coming from and use that plane's normal.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Separating_axis_theorem&#xD;&#xA;  [2]: https://skydrive.live.com/P.mvc#!/?cid=547f84441110400d&amp;sc=documents&amp;uc=1&amp;id=547F84441110400D!513!cid=547F84441110400D&amp;id=547F84441110400D!1007&amp;sc=documents" />
  <row Id="31384" PostHistoryTypeId="2" PostId="14057" RevisionGUID="82f07f47-a994-41a3-bb03-f960759ed94c" CreationDate="2011-06-23T11:55:25.420" UserId="8050" Text="I think your drawing is a little misleading because you choose to draw strokes from the point on the circle tangent to your moving direction. I can see that the collisions to your grid edges happends when the TOP and LEFT points of your circle touch an edge.&#xD;&#xA;&#xD;&#xA;Let **C** be your center and *r* the radius so **P'** = **C** + (*r*,0) and **P&quot;** = **C** + (0,r).&#xD;&#xA;&#xD;&#xA;If **D** is your direction vector (the versor) you have two lines :&#xD;&#xA;&#xD;&#xA;R' = **D** &amp;middot; *t* + **P'**,&#xD;&#xA;&#xD;&#xA;R&quot; = **D** &amp;middot; *t* + **P&quot;**&#xD;&#xA;&#xD;&#xA;You simple have to find the intersection of  those lines with the lines of equation:&#xD;&#xA;&#xD;&#xA;y = *i* and y = *i*  that are the edges of your grid!&#xD;&#xA;&#xD;&#xA;The solution are easy because you have to simply consider the x or the y component of R' and R&quot;. You will find the *t*s value for each insersection, and the points for thoose *t*s, simply sort those point by *t* and you are done.&#xD;&#xA;&#xD;&#xA;I belive you can easely say what cell is hitted if you know the interction point.&#xD;&#xA;&#xD;&#xA;This works if *r* &lt; 1 (the cell width and height).&#xD;&#xA;&#xD;&#xA;It works also for the other cases simply doing some consideration about **P'** and **P&quot;**. We choose TOP and LEFT because of direction, BOTTOM and RIGHT should be considered for opposite direction, you understand why.&#xD;&#xA;&#xD;&#xA;Now look at this image:&#xD;&#xA;![big circle][1]&#xD;&#xA;&#xD;&#xA;The circle is bigger then a single cell and we suppose it is going the same direction as your drawing. P1 is the first point that will touch, P2 is the second, P3 is useless because is in the bottom half. What you need to do is to cast rays from P1 and P2 as we seen before and do the same for the vertical lines.&#xD;&#xA;&#xD;&#xA;In general you will have other starting points along with the TOP and the LEFT ones from where shoot your rays, bigger your circle is, the more rays to cast.&#xD;&#xA;&#xD;&#xA;To be honest some you can avoid to shoot all that rays doing some geometrical consideration, but that can make the things harder to understand. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/oxzi1.png" />
  <row Id="31385" PostHistoryTypeId="2" PostId="14058" RevisionGUID="bcb0d182-5596-4ff3-8764-721e526d8bd4" CreationDate="2011-06-23T12:16:43.983" UserId="7981" Text="I have started to make a fantasy 3d fps swordplay game and I want to add animations. I don't want to animate everything by hand because it would take a lot of time, so I decided to use procedural animation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* I would certainly use IK (starting with simple reaching an object with hand ...). &#xD;&#xA;* I also assume procedural generation of animations will make less animations to do by hand (I can blend animations ...).&#xD;&#xA;* I want also to have a planner for animation which would simplify complex animations; those which can be split to a sequence - run and then jump, jump and then roll - or which are separable - legs running and torso swinging with sword -.&#xD;&#xA;&#xD;&#xA;I want for example a character to chop a head of a big troll. If troll crouches character would just chop his head off, if it is standing he would climb on a troll. I know that I would have to describe the state (&quot;troll is low&quot;, &quot;troll is high&quot;, &quot;chop troll head&quot; ..) which would imply what regions animation will be in (if there is a gap between them character would jump), which would imply what places character can have some of legs and hands or would choose an predefined animation.&#xD;&#xA;&#xD;&#xA;My main goal is simplicity of coding, but I want my game to be looking cool also. Is it worthy to use procedural animation or does it make more troubles that it solves? (there can be lot of twiddling ...)&#xD;&#xA;&#xD;&#xA;I am using Blender Game Engine (therefore Python for scripting, and Bullet Physics)." />
  <row Id="31386" PostHistoryTypeId="1" PostId="14058" RevisionGUID="bcb0d182-5596-4ff3-8764-721e526d8bd4" CreationDate="2011-06-23T12:16:43.983" UserId="7981" Text="Should I use procedural animation?" />
  <row Id="31387" PostHistoryTypeId="3" PostId="14058" RevisionGUID="bcb0d182-5596-4ff3-8764-721e526d8bd4" CreationDate="2011-06-23T12:16:43.983" UserId="7981" Text="&lt;animation&gt;&lt;random&gt;&lt;bullet-physics&gt;&lt;procedural&gt;&lt;blender-game-engine&gt;" />
  <row Id="31389" PostHistoryTypeId="25" PostId="14052" RevisionGUID="b30879e8-5dd9-4f3b-9218-11f246674be5" CreationDate="2011-06-23T12:24:56.053" Comment="http://twitter.com/#!/StackGameDev/status/83873165641646081" />
  <row Id="31390" PostHistoryTypeId="5" PostId="14053" RevisionGUID="6282c2d7-fc91-4d16-a405-14a3dca884b5" CreationDate="2011-06-23T12:38:30.530" UserId="3794" Comment="added 393 characters in body" Text="volumetric raycasting. I know something about that :). &#xD;&#xA;&#xD;&#xA;But to you question:&#xD;&#xA;When you have sample in world space (your `pos`) you have to multiply it with View*Projection matrix to have correct output of depth. View matrix contains linear basis of the camera and converts the world position to the camera space and then you do projection.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Using this depth with regular rendering pipeline is easy (if you are not able to write the depth into the depth buffer and use HW acceleration). Store world position in Vertex shader (using varying in gl i think). Than in PS perform viewProjection multiplication on this `worldPos`. Normalize (`pos /= pos.w`). And compare `pos.z` with the value in a depth texture. Thats it ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31391" PostHistoryTypeId="2" PostId="14060" RevisionGUID="98be6067-9042-4097-bca6-01367c12d760" CreationDate="2011-06-23T12:38:41.660" UserId="7419" Text="What you have to take into account and this following the train of thought of previous answers is that your performance will also be on when and how you call these think functions.&#xD;&#xA;&#xD;&#xA;Looking at the link you posted on the source engine you can also read that you can setup think times and different think contexts for each of your entities, besides the obvious hard limit that someone already pointed out, this will be the key to achieving greater performance with a higher number of entities, either by creating stepped updates that spread performance hungry processing through multiple frames of execution, or by culling out un-needed processing depending on the current context ( i.e. entities that are too far away or beyond player perception dont need the same level of &quot;think detail&quot; as characters that are close a player simply wont see a character 2 miles away picking his nose ). &#xD;&#xA;&#xD;&#xA;And there are other more specific levels of optimization depending on your specific game logic and situation." />
  <row Id="31393" PostHistoryTypeId="2" PostId="14061" RevisionGUID="f6ad50a5-f4db-412c-91df-150d2e03197c" CreationDate="2011-06-23T12:46:50.237" UserId="4894" Text="In my opinion, using completely procedural animation, besides the math and physic complexity, is not a good idea. The problem with procedural generation is that it lacks an artistic intent. &#xD;&#xA;&#xD;&#xA;For texture or terrain generation, this is not so much a problem because you can use custom rendering to stylise your data. But animation is a much more complex thing to process. &#xD;&#xA;&#xD;&#xA;Now to answer your question, some people are using semi-automatic animation, mostly for all physic related constraints. In the animation engine &quot;Euphoria&quot; ( http://www.naturalmotion.com/euphoria ), they use a ragdoll character, wich tries to stand, and react to any physic impulse it's given. &#xD;&#xA;&#xD;&#xA;Then to make your character hit another one, or swing a sword or an axe, you could use a predefined animation made by an artist, and blend / modify it programatically to aim at this or that. " />
  <row Id="31396" PostHistoryTypeId="5" PostId="14049" RevisionGUID="b3235d49-50b2-4224-89dd-e67b28b3c104" CreationDate="2011-06-23T14:59:47.743" UserId="1430" Comment="deleted 47 characters in body" Text="I have seen [some Voronoi shatter videos on Youtube][1].&#xD;&#xA;&#xD;&#xA;What is your experience with it? What are the pros and cons in time complexity, resource complexity, implementation difficulty...? Does it emulate how a real material would react?&#xD;&#xA;&#xD;&#xA;Thanks. :)&#xD;&#xA;&#xD;&#xA;[1]:http://www.youtube.com/results?search_query=voronoi+shatter&amp;aq=f" />
  <row Id="31397" PostHistoryTypeId="2" PostId="14062" RevisionGUID="12c172fe-9c0d-4bf6-9214-e35379c9fd79" CreationDate="2011-06-23T15:06:03.807" UserId="1430" Text="&gt; So, if everything that needs to be&#xD;&#xA;&gt; processed comes from a base class with&#xD;&#xA;&gt; the think function, the game engine&#xD;&#xA;&gt; could store everything on a list and,&#xD;&#xA;&gt; on every frame, loop through it and&#xD;&#xA;&gt; call that function.&#xD;&#xA;&gt; &#xD;&#xA;&gt; On a first look, this idea is&#xD;&#xA;&gt; reasonable, but it can take too much&#xD;&#xA;&gt; resources, if the game has a lot of&#xD;&#xA;&gt; entities..&#xD;&#xA;&#xD;&#xA;Actually putting everything in one big list is usually less than desirable; if you were to group the entities in lists based on, for example, their type, you could better distribute the processing over multiple threads. For example if you know all entities of type Foo never interact with any other entities during the simulation phase, you can offload them entirely. If they were scattered willy-nilly throughout some big singular list this would be much harder to do.&#xD;&#xA;&#xD;&#xA;You don't necessarily even need to be deriving everything from a common base class at that point; Source goes fairly overboard with inheritance abuse for would could otherwise be implemented as data in that respect.&#xD;&#xA;&#xD;&#xA;You will of course always have an upper limit on the number of entities you can process per frame, even if you start offloading work to other cores. There's no way around that, you just need to have an idea of what that limit is in your implementation and takes steps to alleviate it (proper culling of processing phases on objects that won't need them, avoiding over-granularity in objects, et cetera)." />
  <row Id="31398" PostHistoryTypeId="5" PostId="13740" RevisionGUID="0a3bca88-fe14-4ed6-ad96-ba0560434dab" CreationDate="2011-06-23T15:09:13.803" UserId="8050" Comment="added 355 characters in body" Text="I assume you want to change the direction by changing the launching heading to the target heading then continue straight to the target (a more fun problem should be to hit the target when turning!).&#xD;&#xA;&#xD;&#xA;I have to assume that you are able to turn with the same turn radius in all direction (this is a simplification that is hard to see in real missiles).&#xD;&#xA;&#xD;&#xA;The simplest solution is to use the **90&amp;deg; bending**: the missile files until its trajectory forms a right angle with the target. if you turn exactly at the 90&amp;deg; point you will miss the target exactly by the turn radius, because you have to take into account the turning itself. The solution is to start to turn exactly &quot;turn radius&quot; meters(?) before reaching the 90&amp;deg; point, then turn forming a (try to guess) 90&amp;deg; arc to go straight to your target.&#xD;&#xA;&#xD;&#xA;This solution is not always feasible, for example when you don't have the visibility on the 90&amp;deg; path (buildings or other obstacles).&#xD;&#xA;&#xD;&#xA;The good news is that the solution works for every angle (not just the mythical 90&amp;deg;) the trick is to take in account the space needed to turn starting turning before.&#xD;&#xA;&#xD;&#xA;How much before? This is why the 90&amp;deg; stuff is the simplest solution... &#xD;&#xA;&#xD;&#xA;Let's say that you reach the visibility or the best target heading when the firing path forms an angle of &amp;theta;&amp;deg; then you should anticipating the turn by:&#xD;&#xA;&#xD;&#xA;    (sec(90° - θ°) + tan(90° - θ°)) * turning_radius&#xD;&#xA;&#xD;&#xA;...where secant is the reciprocal of the cosine. The proof is trivial and is left to the reader.&#xD;&#xA;&#xD;&#xA;Seriously, the formula comes from a simple geometrical construction.&#xD;&#xA;&#xD;&#xA;[![Turning point graph][1]][2]&#xD;&#xA;&#xD;&#xA;Black line is the firing path, while the thin black line is the same path moved toward the target by turning_radius units; the same for the red ones that are the target path.&#xD;&#xA;&#xD;&#xA;The green segments are turning_radius in length so you should see that:&#xD;&#xA;&#xD;&#xA;AB is the tangent of 90&amp;deg; - &amp;theta;&amp;deg; &#xD;&#xA;&#xD;&#xA;BC is the secant. &#xD;&#xA;&#xD;&#xA;Both of the green lines that come from the turning point are turning_radius in length and are perpendicular to the two paths; meaning that the turning radius is correct and the arc is tangent to both of the paths (as it should be if you make a turn under physical constraints).&#xD;&#xA;&#xD;&#xA;Let me know if you see some error.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;The drawing you are posted shows that there are multiple choices for path even with fixed shooter and target as you can see here:&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;Once the target is choosed you can apply what i said above with the proper angles.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/OHe8Y.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/OHe8Y.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/U37lC.png" />
  <row Id="31399" PostHistoryTypeId="25" PostId="14058" RevisionGUID="aea8dac9-7705-47b6-9214-ab3408d97128" CreationDate="2011-06-23T15:24:56.227" Comment="http://twitter.com/#!/StackGameDev/status/83918465236336640" />
  <row Id="31400" PostHistoryTypeId="4" PostId="14004" RevisionGUID="51f78caf-607a-4093-b870-53f54a71969a" CreationDate="2011-06-23T15:33:28.167" UserId="1742" Comment="edited title" Text="Procedural world  generation oriented on gameplay features" />
  <row Id="31401" PostHistoryTypeId="5" PostId="14062" RevisionGUID="dac4f99a-4182-467d-b0d5-d2b0c9d3cb74" CreationDate="2011-06-23T16:04:10.810" UserId="2061" Comment="He meant &quot;what&quot;" Text="&gt; So, if everything that needs to be&#xD;&#xA;&gt; processed comes from a base class with&#xD;&#xA;&gt; the think function, the game engine&#xD;&#xA;&gt; could store everything on a list and,&#xD;&#xA;&gt; on every frame, loop through it and&#xD;&#xA;&gt; call that function.&#xD;&#xA;&gt; &#xD;&#xA;&gt; On a first look, this idea is&#xD;&#xA;&gt; reasonable, but it can take too much&#xD;&#xA;&gt; resources, if the game has a lot of&#xD;&#xA;&gt; entities..&#xD;&#xA;&#xD;&#xA;Actually putting everything in one big list is usually less than desirable; if you were to group the entities in lists based on, for example, their type, you could better distribute the processing over multiple threads. For example if you know all entities of type Foo never interact with any other entities during the simulation phase, you can offload them entirely. If they were scattered willy-nilly throughout some big singular list this would be much harder to do.&#xD;&#xA;&#xD;&#xA;You don't necessarily even need to be deriving everything from a common base class at that point; Source goes fairly overboard with inheritance abuse for what could otherwise be implemented as data in that respect.&#xD;&#xA;&#xD;&#xA;You will of course always have an upper limit on the number of entities you can process per frame, even if you start offloading work to other cores. There's no way around that, you just need to have an idea of what that limit is in your implementation and takes steps to alleviate it (proper culling of processing phases on objects that won't need them, avoiding over-granularity in objects, et cetera)." />
  <row Id="31402" PostHistoryTypeId="24" PostId="14062" RevisionGUID="dac4f99a-4182-467d-b0d5-d2b0c9d3cb74" CreationDate="2011-06-23T16:04:10.810" Comment="Proposed by 2061 approved by 51 edit id of 517" />
  <row Id="31403" PostHistoryTypeId="2" PostId="14063" RevisionGUID="267ea175-471b-4261-95ae-0e97c82f688b" CreationDate="2011-06-23T16:15:00.627" UserId="1141" Text="Only paper dealing with similar issues I could find off-hand is Stachniak and Stuerzlinger's &quot;[An Algorithm for Automated Fractal Terrain Deformation][1]&quot;. It assumes you create the terrain first and deform it (or rather, let the algorithm pick the parameters to deform it with automatically) to fit your constraints later, so it doesn't answer the question directly. Still, the methods presented therein might prove useful for others with similar problems.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cse.yorku.ca/~wolfgang/papers/fractaldeform.pdf" />
  <row Id="31404" PostHistoryTypeId="2" PostId="14064" RevisionGUID="c2f316df-fa8e-4e48-ade9-0bd45d8ec6b2" CreationDate="2011-06-23T17:25:23.420" UserId="8209" Text="Wouldn't such an algorithm automatically generate more 'tactical' terrain when roads are generated between cities?&#xD;&#xA;&#xD;&#xA;Assuming that roads can only have a certain elevetion change per distance, terrain height would be adapted to the heigth of the road, which would lead to generation of chokepoints whenever a road passes through a hill/ravine/whatever. &#xD;&#xA;Of course, the amount of change in terrain height would need to be limited too, or you'd have roads running straight through the highest peaks." />
  <row Id="31405" PostHistoryTypeId="5" PostId="14049" RevisionGUID="bbd07576-f9cc-4958-8056-2f23a88dbc7d" CreationDate="2011-06-23T17:26:05.450" UserId="962" Comment="deleted 4 characters in body" Text="I have seen [some Voronoi shatter videos on Youtube][1].&#xD;&#xA;&#xD;&#xA;What is your experience with it? &#xD;&#xA;&#xD;&#xA;What are the pros and cons in time complexity, resource complexity, implementation difficulty...? &#xD;&#xA;&#xD;&#xA;Does it emulate how a real material would react?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.youtube.com/results?search_query=voronoi+shatter&amp;aq=f" />
  <row Id="31406" PostHistoryTypeId="2" PostId="14065" RevisionGUID="fa017ada-f067-4242-a01f-cf8864d086e7" CreationDate="2011-06-23T17:40:54.127" UserId="8210" Text="Hi All does any  have a good algorithm for generating random y pos block, which would also take into account a minimum and maximum height, to enable a character to always be able to jump on to the block&#xD;&#xA;&#xD;&#xA;Im using objective c if this helps" />
  <row Id="31407" PostHistoryTypeId="1" PostId="14065" RevisionGUID="fa017ada-f067-4242-a01f-cf8864d086e7" CreationDate="2011-06-23T17:40:54.127" UserId="8210" Text="Random y position block" />
  <row Id="31408" PostHistoryTypeId="3" PostId="14065" RevisionGUID="fa017ada-f067-4242-a01f-cf8864d086e7" CreationDate="2011-06-23T17:40:54.127" UserId="8210" Text="&lt;2d&gt;&lt;random&gt;&lt;objective-c&gt;&lt;platform&gt;" />
  <row Id="31409" PostHistoryTypeId="25" PostId="14049" RevisionGUID="da361176-8020-4efb-a498-26b431e898f3" CreationDate="2011-06-23T18:24:59.643" Comment="http://twitter.com/#!/StackGameDev/status/83963779150389248" />
  <row Id="31410" PostHistoryTypeId="2" PostId="14066" RevisionGUID="3ceb30cb-8957-4190-b8e2-2e45d19d5041" CreationDate="2011-06-23T18:35:47.120" UserId="6969" Text="It sounds like what you want is just a 1D string of [Perlin Noise][1].  This is a very well documented problem and there are several examples available on the internet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Perlin_noise" />
  <row Id="31411" PostHistoryTypeId="2" PostId="14067" RevisionGUID="58c71e34-4604-46e4-ae29-c99e2eead3ce" CreationDate="2011-06-23T18:41:18.177" UserId="6969" Text="There is a [question on StackOverflow][1] that asks a similar question and there are a couple of solutions posted there.  What have you tried so far?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5268659/android-load-image-on-the-native-side" />
  <row Id="31412" PostHistoryTypeId="2" PostId="14068" RevisionGUID="1ddf1cef-5fd2-420e-94ed-4cf4dea3e508" CreationDate="2011-06-23T18:44:47.127" UserId="7981" Text="**In general**&#xD;&#xA;&#xD;&#xA;eBusiness said that You don't have much experience with making games. Games are quite complex problems to solve and if You want to program them then You really need to know a lot; but if You will use some simple programs for making games like game builders (I recommend You more advanced builder, Blender Game Engine, in which You basically click things to get them done). You should really ask about some 3d game builder too or possibly ask for specific game builder like 3d rpg game builders.&#xD;&#xA;&#xD;&#xA;Problem is that there are lot of concepts You may have not heard and You should know like :&#xD;&#xA;&#xD;&#xA;* Finite State Machines&#xD;&#xA;* Event Driven Programmming&#xD;&#xA;* Boolean logic&#xD;&#xA;* Analytical Geometry&#xD;&#xA;* Matrices and vectors&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;I started to make things in BGE and it looks great. I used to do it in Quake engine but let it be because I wanted to have destroyable clothes. I can not tell You much about cons of BGE but what I heard it is very easy to use and from my little experience it is easy to make games in it.&#xD;&#xA;&#xD;&#xA;**If You don't know much about programmming then perhaps Blender Game Engine**&#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA;* You can have [simple game in Blender Game engine created in around 20 minutes][3].&#xD;&#xA;* You have powerful 3D modelling and animating program, there are [some movies made in Blender][10]&#xD;&#xA;* You have powerful physics engine [Bullet Physics][4]&#xD;&#xA;* You can be program it graphically by &quot;connecting wires&quot;&#xD;&#xA;* You can program it in Python, dynamic programming language&#xD;&#xA;* You can test Your game with press of one button ('p' to start simulation)&#xD;&#xA;* Blender is open source&#xD;&#xA;* Blender has big community&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA;* You have to set up Your game (In Quake You already have playable game and Quake's game logic)&#xD;&#xA;&#xD;&#xA;To get started in BGE:&#xD;&#xA;&#xD;&#xA;* there are [tutorials on BGE at Youtube][1].&#xD;&#xA;* [automatic doors][7]&#xD;&#xA;* [switches][8]&#xD;&#xA;* [artificial intelligence][9]&#xD;&#xA;&#xD;&#xA;How You usually work in it:&#xD;&#xA;&#xD;&#xA;1. You make 3d models with 3d scene &#xD;&#xA;* You can follow [Noob to Pro tutorial][2] &#xD;&#xA;* or [Greybeard's Blender Tutorials][5]&#xD;&#xA;2. You specify their physic properties &#xD;&#xA;3. You specify game logic (key up moves character 0.3 points in X axis, ...)&#xD;&#xA;4. You press 'p' for simulation, You press ESC to go back to Blender&#xD;&#xA;5. If You are not happy with it You go back and change things&#xD;&#xA;&#xD;&#xA;Basically, follow some tutorial on Youtube and You will have a game soon. :) And after following simple tutorials You might want to [learn how BGE works (how BGE's game loop works)][6].&#xD;&#xA;&#xD;&#xA;**If You know mathematics and some programming then perhaps Quake 1 engine**&#xD;&#xA;&#xD;&#xA;It is very easy to set up, You can , but Quake can be hard if You want something advanced done like clothes and similar... &#xD;&#xA;&#xD;&#xA;Pros:&#xD;&#xA;&#xD;&#xA;* the game logic is ready for You ...&#xD;&#xA;* there is [good community at inside3d][12] (don't forget to register in forum here) &#xD;&#xA;* You usually learn it by hacking Quake game logic&#xD;&#xA;* AFAIK it is open source&#xD;&#xA;* it has scripting language Quake C, very easy to learn and very easy to start in it&#xD;&#xA;* game logic is in Quake C, all [Quake 1 engine games][15] use Quake C&#xD;&#xA;* You get multiplayer very easily because Quake supports him natively&#xD;&#xA;* there are [modifications of Quake engine which look like very good][17], You can exchange them to run Your game :)&#xD;&#xA;* game logic of some commercial Quake games was released: [see Hexen II: Hammer of Thyrion ][16]&#xD;&#xA;* it is not for very advanced things like clothes or some real physics, even though [aerodynamics, buoyancy, turbulence ][14] and [ragdolls][13] have been done in Quake C&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA;* If you want to get things done in Quake C You will have to in the end resort to analytical geometry, goniometry, reo&#xD;&#xA;&#xD;&#xA;How You make game in it:&#xD;&#xA;&#xD;&#xA;1. You set it up [like here][18] and [get documentation from here][19]&#xD;&#xA;2. for levels, monsters ...&#xD;&#xA;&#xD;&#xA;* in Your level editor (I reccomend simple Qoole) You make geometry&#xD;&#xA;* in level editor You also make entities (ladders, switches ...)&#xD;&#xA;&#xD;&#xA;3. for game logic&#xD;&#xA;&#xD;&#xA;* You modify .qc files. Classes of objects which are on a map correspond to functions You have in map, these functions are starting points of each entity.&#xD;&#xA;* You can modify behaviour of already made entities&#xD;&#xA;* You compile .qc files (You execute one program to do it all for You)&#xD;&#xA;&#xD;&#xA;4. You run Quake to test it&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Alternatives**&#xD;&#xA;&#xD;&#xA;* Unreal Development Kit&#xD;&#xA;* Unity3D&#xD;&#xA;* something like DarkBasic, they have lot of tutorials and You might get it somehow&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.youtube.com/results?search_query=Blender+Game+Engine+tutorial&#xD;&#xA;[2]:http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro&#xD;&#xA;[3]:http://www.youtube.com/watch?v=9NSFqP9jxNQ&amp;feature=related&#xD;&#xA;[4]:http://bulletphysics.org/wordpress/&#xD;&#xA;[5]:http://www.ibiblio.org/bvidtute/&#xD;&#xA;[6]:http://goo.gl/9ed7H&#xD;&#xA;[7]:http://www.youtube.com/watch?v=M7Pif9rTCSs&#xD;&#xA;[8]:http://www.youtube.com/watch?v=z7m_phJ6trE&#xD;&#xA;[9]:http://www.youtube.com/watch?v=VIsFlG46-wI&#xD;&#xA;[10]:http://www.blender.org/features-gallery/movies/&#xD;&#xA;[11]:http://prog21.dadgum.com/21.html&#xD;&#xA;[12]:http://inside3d.com/&#xD;&#xA;[13]:http://www.youtube.com/results?search_query=sagdoll&amp;aq=f&#xD;&#xA;[14]:http://quakematt.quakedev.com/gyro.php&#xD;&#xA;[15]:http://en.wikipedia.org/wiki/Quake_engine#Games_using_the_Quake_engine&#xD;&#xA;[16]:http://quakeone.com/forums/quake-talk/other-games/5920-hexen-ii-all-source-ports-list-know-more-post.html&#xD;&#xA;[17]:http://icculus.org/twilight/darkplaces/&#xD;&#xA;[18]:http://forums.inside3d.com/viewtopic.php?p=35286&#xD;&#xA;[19]:http://forums.inside3d.com/viewtopic.php?t=3317&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31413" PostHistoryTypeId="2" PostId="14069" RevisionGUID="40f103bc-702c-4020-8dcc-b156bf72d2cb" CreationDate="2011-06-23T18:59:27.523" UserId="7328" Text="you just have to generate some boundery for the blocks you are going to make, it may be due to the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine a block start from `ys1` and ends to `ye1`. and we know `G` is the ground height (you consider it as zero) and `C` is the ceiling height. a character might jump at most `J` units. just another parameters might be `H` the height of character and `ys0` and `ye0` which define the last block: knowing all these values you can set your bounderies : &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	ys1 = G&#xD;&#xA;	ye1 = max (ye0 + J,  C - H)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	ys1 = random (ye1 - ys1)&#xD;&#xA;	ye1 = random (ye1 - ys1) + ys0;&#xD;&#xA;" />
  <row Id="31414" PostHistoryTypeId="2" PostId="14070" RevisionGUID="adca92e6-de89-44d8-9353-c3e870dfc0d5" CreationDate="2011-06-23T19:09:12.287" UserId="8211" Text="i am creating a tile based isometric game..&#xD;&#xA;&#xD;&#xA;problem we are having is with depth sorting, we tried a lot of methods but none work. They all do a great job but its not perfect, they seem to bug sometimes.&#xD;&#xA;&#xD;&#xA;we have tiled objects of different sizes.. like 2x2, 2x6,3x4.. this makes it so hard.&#xD;&#xA;&#xD;&#xA;we are trying to avoid slicing the bitmaps.&#xD;&#xA;&#xD;&#xA;anyone has a idea?" />
  <row Id="31415" PostHistoryTypeId="1" PostId="14070" RevisionGUID="adca92e6-de89-44d8-9353-c3e870dfc0d5" CreationDate="2011-06-23T19:09:12.287" UserId="8211" Text="tile based isometric depth sorting on different size objects." />
  <row Id="31416" PostHistoryTypeId="3" PostId="14070" RevisionGUID="adca92e6-de89-44d8-9353-c3e870dfc0d5" CreationDate="2011-06-23T19:09:12.287" UserId="8211" Text="&lt;tiles&gt;&lt;isometric&gt;" />
  <row Id="31417" PostHistoryTypeId="5" PostId="11551" RevisionGUID="f0e34ba2-7b6e-482e-a5f7-bbedc9cf4c00" CreationDate="2011-06-23T19:26:25.347" UserId="7888" Comment="Improved formatting to properly take advantage of StackExchange syntax highlighting" Text="Hey guys I am creating a game using Corona SDK and so coding it in Lua. &#xD;&#xA;So there are 2 separate functions, &#xD;&#xA;&#xD;&#xA;1. To translate the hit objects and change their color when they are tapped&#xD;&#xA;The link below is the code I am using to for the first function &#xD;&#xA;[http://developer.anscamobile.com/sample-code/fishies][1]&#xD;&#xA;&#xD;&#xA;2. Spawn objects that will hit the translating objects on collision. Alos on collision the spawned object disappears and the translating object bears a color(indicating the collision). In addition the size of this spawned object is dependent on i/p volume level. The function I have written is as follows:&#xD;&#xA;&#xD;&#xA;        --VOICE INPUT CODE&#xD;&#xA;        local r = media.newRecording()&#xD;&#xA;        r:startRecording()&#xD;&#xA;        r:startTuner()&#xD;&#xA;&#xD;&#xA;        --local function newBar()&#xD;&#xA;        --    local bar = display.newLine( 0, 0, 1, 0 ) &#xD;&#xA;        --    bar:setColor( 0, 55, 100, 20 )&#xD;&#xA;        --    bar.width = 5&#xD;&#xA;        --    bar.y=400&#xD;&#xA;        --    bar.x=20&#xD;&#xA;        --    return bar&#xD;&#xA;        --end&#xD;&#xA;&#xD;&#xA;        local c1 = display.newImage(&quot;str-minion-small.png&quot;)&#xD;&#xA;        c1.isVisible=false&#xD;&#xA;        local c2 = display.newImage(&quot;str-minion-mid.png&quot;)&#xD;&#xA;        c2.isVisible=false&#xD;&#xA;        local c3 = display.newImage(&quot;str-minion-big.png&quot;)&#xD;&#xA;        c3.isVisible=false&#xD;&#xA;&#xD;&#xA;        --SPAWNING&#xD;&#xA;        local function spawnDisk( event )&#xD;&#xA;            local phase = event.phase&#xD;&#xA;&#xD;&#xA;            local volumeBar = display.newLine( 0, 0, 1, 0 )&#xD;&#xA;            volumeBar.y =  400&#xD;&#xA;            volumeBar.x = 20&#xD;&#xA;            --volumeBar.isVisible=false&#xD;&#xA;        &#xD;&#xA;            local v = 20*math.log(r:getTunerVolume())    &#xD;&#xA;            local MINTHRESH = 30&#xD;&#xA;            local LEFTMARGIN = 20&#xD;&#xA;            local v2 = MINTHRESH + math.max (v, -MINTHRESH)&#xD;&#xA;            v2 = (display.contentWidth - 1 * LEFTMARGIN ) * v2 / MINTHRESH&#xD;&#xA;            volumeBar.xScale =  math.max ( 20, v2 )&#xD;&#xA;        &#xD;&#xA;            local l = volumeBar.xScale&#xD;&#xA;            local cnt1 = 0&#xD;&#xA;            local cnt2 = 0&#xD;&#xA;            local cnt3 = 0&#xD;&#xA;            local ONE =1&#xD;&#xA;            local val = event.numTaps&#xD;&#xA;            --local px=event.x&#xD;&#xA;            --local py=event.y&#xD;&#xA;&#xD;&#xA;            if &quot;ended&quot; == phase then&#xD;&#xA;                --audio.play( popSound )&#xD;&#xA;                --myLabel.isVisible = false&#xD;&#xA;        &#xD;&#xA;                if l &gt; 50 and l &lt;=150 then&#xD;&#xA;                    --c1:setFillColor(10,105,0)&#xD;&#xA;                    --c1.isVisible=false&#xD;&#xA;                    c1.x=math.random( 10, 450 )&#xD;&#xA;                    c1.y=math.random( 10, 300 )&#xD;&#xA;                    physics.addBody( c1, { density=1, radius=10.0 } )&#xD;&#xA;                    c1.isVisible=true&#xD;&#xA;                    cnt1= cnt1+ ONE&#xD;&#xA;                    return c1&#xD;&#xA;            &#xD;&#xA;                elseif l &gt; 100 and l &lt;=250 then&#xD;&#xA;                    --c2:setFillColor(200,10,0)&#xD;&#xA;                    c2.x=math.random( 10, 450 )&#xD;&#xA;                    c2.y=math.random( 10, 300 )&#xD;&#xA;                    physics.addBody( c2, { density=2, radius=9000.0 } )&#xD;&#xA;                    c2.isVisible=true&#xD;&#xA;                    cnt2= cnt2+ ONE&#xD;&#xA;                    return c2&#xD;&#xA;&#xD;&#xA;                elseif l &gt;=250 then&#xD;&#xA;                    c3.x=math.random( 40, 450 )&#xD;&#xA;                    c3.y=math.random( 40, 300 )&#xD;&#xA;                    physics.addBody( c3, { density=2, radius=7000.0 , bounce=0.0 } )&#xD;&#xA;                    c3.isVisible=true&#xD;&#xA;                    cnt3= cnt3+ ONE&#xD;&#xA;                    return c3&#xD;&#xA;                end&#xD;&#xA;            end&#xD;&#xA;        end&#xD;&#xA;        &#xD;&#xA;        buzzR:addEventListener( &quot;touch&quot;, spawnDisk ) -- touch the screen to create disks&#xD;&#xA;    &#xD;&#xA;Now both functions work fine independently but there is no collision happening. Its almost as if the translating object and the spawn object are on different layers. The translating object passes through the spawn object freely.&#xD;&#xA;&#xD;&#xA;Can anyone please tell me how to resolve this problem. And how can I get them to collide.&#xD;&#xA;&#xD;&#xA;Its my first attempt at game development, that too for a mobile platform so would appreciate all help. Also if I have not been specific do let me know. I'll try to frame the query better :).&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.anscamobile.com/sample-code/fishies&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31418" PostHistoryTypeId="24" PostId="11551" RevisionGUID="f0e34ba2-7b6e-482e-a5f7-bbedc9cf4c00" CreationDate="2011-06-23T19:26:25.347" Comment="Proposed by 7888 approved by 14 edit id of 518" />
  <row Id="31419" PostHistoryTypeId="2" PostId="14071" RevisionGUID="03a85f15-87bc-4fa1-b5b2-36cf74233858" CreationDate="2011-06-23T20:08:55.263" UserId="6803" Text="I've been reading about collision detection and I saw that the first part was a coarse detection which generates possible contacts using bounding box hierarchies.&#xD;&#xA;&#xD;&#xA;I understand the concept of splitting up your objects in groups, to speed up the detection phase, but I'm a little confused on how do you actually build the hierachy, more so on what criteria is used to group them together.&#xD;&#xA;&#xD;&#xA;Do I iterate through all the objects in the scene, and check the distance between them to see where they should be inserted in the tree?&#xD;&#xA;&#xD;&#xA;Do you know some resources that may shed some light on this topic for me?" />
  <row Id="31420" PostHistoryTypeId="1" PostId="14071" RevisionGUID="03a85f15-87bc-4fa1-b5b2-36cf74233858" CreationDate="2011-06-23T20:08:55.263" UserId="6803" Text="Building dynamic bounding box hierachies." />
  <row Id="31421" PostHistoryTypeId="3" PostId="14071" RevisionGUID="03a85f15-87bc-4fa1-b5b2-36cf74233858" CreationDate="2011-06-23T20:08:55.263" UserId="6803" Text="&lt;collision-detection&gt;&lt;bounding-boxes&gt;" />
  <row Id="31422" PostHistoryTypeId="2" PostId="14072" RevisionGUID="866a8b14-e43e-4945-b2ed-7fab000bb39b" CreationDate="2011-06-23T20:16:44.133" UserId="5810" Text="You can also employ 2 arrays rather then one, with one as a map array containing &quot;tiles&quot; and one is a tile array containing predefined pixols(5x5 or less),when needed you can still modify this pixols but you have to make a new tile array rather then a predefined one.&#xD;&#xA;&#xD;&#xA;The good thing about this is that the non modified ones can be predefined as image tiles until they are broken up.&#xD;&#xA;&#xD;&#xA;Note however that worst case scenario is the same as having just one array full of pixols." />
  <row Id="31423" PostHistoryTypeId="2" PostId="14073" RevisionGUID="9c6d508b-8fcc-4ad5-ae74-a286701dcdde" CreationDate="2011-06-23T20:24:17.013" UserId="5810" Text="Draw them in layers,sort them in layers?" />
  <row Id="31424" PostHistoryTypeId="2" PostId="14074" RevisionGUID="dd825a3c-37c0-4c5a-92c3-ad8b0d0b1153" CreationDate="2011-06-23T20:37:14.690" UserId="8090" Text="A basic method is to use [Binary Space Partitioning](http://en.wikipedia.org/wiki/Binary_space_partitioning)." />
  <row Id="31425" PostHistoryTypeId="2" PostId="14075" RevisionGUID="0212b7e2-543f-4ee5-99bb-f8b10fee6d4e" CreationDate="2011-06-23T20:43:31.913" UserId="8194" Text="Okay so, I am making a little 2d overhead RPG type game just for fun. I have almost all th basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile how I want it, but having to place each tile gets annoying after a while. And I noticed that in a lot of games, even extremely simple ones, they have LOTS of levels with LOTS of tiles in each. Creating all that in this fashion would take forever. So I guess my question is, as a game developer, am I supposed to do all that, or maybe make a little level editor so I can see things as I create it? What do game developers do? I'm using Java by the way." />
  <row Id="31426" PostHistoryTypeId="1" PostId="14075" RevisionGUID="0212b7e2-543f-4ee5-99bb-f8b10fee6d4e" CreationDate="2011-06-23T20:43:31.913" UserId="8194" Text="Level Creating Help" />
  <row Id="31427" PostHistoryTypeId="3" PostId="14075" RevisionGUID="0212b7e2-543f-4ee5-99bb-f8b10fee6d4e" CreationDate="2011-06-23T20:43:31.913" UserId="8194" Text="&lt;levels&gt;" />
  <row Id="31428" PostHistoryTypeId="2" PostId="14076" RevisionGUID="f86d4dcd-8fd9-4478-ba1e-0fbd2430a67b" CreationDate="2011-06-23T21:01:22.957" UserId="1156" Text="You want to use a map editor, such as [Tiled][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/" />
  <row Id="31429" PostHistoryTypeId="2" PostId="14077" RevisionGUID="b51ce3f4-4cec-4ad6-885a-dd29599a39f0" CreationDate="2011-06-23T21:01:26.217" UserId="7328" Text="try [tiled](http://www.mapeditor.org/). it's a opensource level editor. and working with it is really simple. it's also opensource so you can easily implement your own file format for it. although many 2d game engines use tmx file format (it's an xml based format) and tiled have all tmx export options." />
  <row Id="31430" PostHistoryTypeId="5" PostId="14075" RevisionGUID="d8d330da-7344-46c8-8d21-b80be1dc9595" CreationDate="2011-06-23T21:02:10.473" UserId="1156" Comment="deleted 19 characters in body; edited tags" Text="I am making a little 2d overhead RPG type game just for fun. I have almost all the basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile how I want it, but having to place each tile gets annoying after a while. &#xD;&#xA;&#xD;&#xA;I noticed that in a lot of games, even extremely simple ones, they have LOTS of levels with LOTS of tiles in each. Creating all that in this fashion would take forever. So I guess my question is, as a game developer, am I supposed to do all that, or maybe make a little level editor so I can see things as I create it? What do game developers do? I'm using Java." />
  <row Id="31431" PostHistoryTypeId="6" PostId="14075" RevisionGUID="d8d330da-7344-46c8-8d21-b80be1dc9595" CreationDate="2011-06-23T21:02:10.473" UserId="1156" Comment="deleted 19 characters in body; edited tags" Text="&lt;2d&gt;&lt;java&gt;&lt;tiles&gt;&lt;rpg&gt;&lt;levels&gt;" />
  <row Id="31432" PostHistoryTypeId="5" PostId="14075" RevisionGUID="87958b38-d64e-415a-9418-1cbf09e7495b" CreationDate="2011-06-23T21:08:21.947" UserId="8194" Comment="added 233 characters in body" Text="I am making a little 2d overhead RPG type game just for fun. I have almost all the basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile how I want it, but having to place each tile gets annoying after a while. &#xD;&#xA;&#xD;&#xA;I noticed that in a lot of games, even extremely simple ones, they have LOTS of levels with LOTS of tiles in each. Creating all that in this fashion would take forever. So I guess my question is, as a game developer, am I supposed to do all that, or maybe make a little level editor so I can see things as I create it? What do game developers do? I'm using Java.&#xD;&#xA;&#xD;&#xA;EDIT: Okay, say if I had an image for a map, that I made in MS paint or photoshop, and each pixel represent a tile value, could I somehow in Java detect what color an individual pixel is? If so, that would be perfect. If so, how?" />
  <row Id="31433" PostHistoryTypeId="5" PostId="14076" RevisionGUID="195d92dc-aa2f-4c0c-ae60-287c1ce95ac5" CreationDate="2011-06-23T21:12:12.027" UserId="1156" Comment="added 336 characters in body" Text="You want to use a map editor, such as [Tiled][1].&#xD;&#xA;&#xD;&#xA;EDIT: You can save it as an image if you really want, but that means you must have a rectangular map. What if you want an irregular one?&#xD;&#xA;&#xD;&#xA;Also, you are then making it much harder to have an editor spit out the level code for you. I would advise against it, personally. Especially if your image is going to be many milions of pixels.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/" />
  <row Id="31434" PostHistoryTypeId="2" PostId="14078" RevisionGUID="6439dcbf-0a40-4459-9d2d-cbf6edcccfbc" CreationDate="2011-06-23T21:16:05.830" UserId="1156" Text="Generate a random `y` value between a ground y value `g` and a max height `m`. `m` is simply `g+character jump height`.&#xD;&#xA;&#xD;&#xA;I don't know how Obj-C's random works, but usually you'll want something like:&#xD;&#xA;&#xD;&#xA;`block_y = (random() % m) + g;`" />
  <row Id="31435" PostHistoryTypeId="25" PostId="14071" RevisionGUID="bc9f9bef-e235-4d0c-8773-d167a74b1a01" CreationDate="2011-06-23T21:24:59.923" Comment="http://twitter.com/#!/StackGameDev/status/84009077822332928" />
  <row Id="31436" PostHistoryTypeId="2" PostId="14079" RevisionGUID="d08e3d2d-777b-42fc-b406-19b1daa9d8f4" CreationDate="2011-06-23T22:08:02.663" UserId="5899" Text="I think that the hierarchy that you want to know about is the called &quot;scene graph&quot;.&#xD;&#xA;&#xD;&#xA;The scene graph hierarchy has a lot of benefits, the majority of game engines use one. One of these benefits is the optimization of calculations. For example, collision detection ( the topic that you are asking ) and graphic culling to avoid send much information to the graphics card that is not visible.&#xD;&#xA;&#xD;&#xA;The better form to know more about scene graphs is use one and see the features that have. For example, [OpenSceneGraph][1] or [Ogre3D][2].&#xD;&#xA;&#xD;&#xA;An overview:&#xD;&#xA;&#xD;&#xA;A scene graph use basically the composition design pattern. A node can have more nodes, and the childs can have more nodes, ...&#xD;&#xA;&#xD;&#xA;A node example:&#xD;&#xA;&#xD;&#xA;    class Node&#xD;&#xA;    {&#xD;&#xA;       public:&#xD;&#xA;            void addChild( Node* child );&#xD;&#xA;            void removeFromParent();&#xD;&#xA;            AABB calculateBoundingBox(); // Axis-aligned bounding box&#xD;&#xA;&#xD;&#xA;       private:&#xD;&#xA;           std::list&lt; Node* &gt;       m_children;&#xD;&#xA;           vector3                  m_positionRelativeToParentNode;&#xD;&#xA;           matrix4                  m_transformation;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Then, the construction that you're asking is composed when the scene is being created. I'm going to create a soccer player.&#xD;&#xA;&#xD;&#xA;    Node* player = new Node();&#xD;&#xA;    Node* torso = new Node();&#xD;&#xA;    Node* head = new Node();&#xD;&#xA;    Node* larm = new Node();&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    player-&gt;addChild( torso );&#xD;&#xA;    torso-&gt;addChild( head );&#xD;&#xA;    torso-&gt;addChild( larm );&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Ok. The player is composed. With the transformation of each node, and the position      relative to the parent node, the bounding box can be calculated. &#xD;&#xA;&#xD;&#xA;If we calculate the AABB of the player, and we do a collision test with other player, then is when we descend to the children and the collision test is done with more precision. If the test is not passed at player level, the children tests are not necessary ( we are optimizing ).&#xD;&#xA;&#xD;&#xA;How to calculate the bounding box? Think that each node has his own coordinate system. The relative position to the coordinate system of the parent is the member Node::m_positionRelativeToParentNode, and the member Node::m_transformation is the own transformation in his coordinate system. With this information, we can calculate the bounding box of a node. Remind that if we know test two nodes, they must &quot;live&quot; in the same coordinate system. Then we need compose the transformations and go up to a common parent and do the test in the common parent coordinate system. &#xD;&#xA;&#xD;&#xA;Edited:&#xD;&#xA;&#xD;&#xA;There is a really good book about collision detection called: &quot;Real Time Collision Detection&quot;.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.openscenegraph.org/projects/osg&#xD;&#xA;  [2]: http://www.ogre3d.org/" />
  <row Id="31437" PostHistoryTypeId="5" PostId="14065" RevisionGUID="025fee53-80dc-4474-99df-9674bdedeca6" CreationDate="2011-06-23T23:12:18.350" UserId="962" Comment="deleted 54 characters in body; edited title" Text="Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block." />
  <row Id="31438" PostHistoryTypeId="4" PostId="14065" RevisionGUID="025fee53-80dc-4474-99df-9674bdedeca6" CreationDate="2011-06-23T23:12:18.350" UserId="962" Comment="deleted 54 characters in body; edited title" Text="Random Position between ranges." />
  <row Id="31439" PostHistoryTypeId="25" PostId="14075" RevisionGUID="c28fce57-ca6b-446c-b145-5ceb7e3feea7" CreationDate="2011-06-24T00:25:00.867" Comment="http://twitter.com/#!/StackGameDev/status/84054379644203008" />
  <row Id="31440" PostHistoryTypeId="2" PostId="14080" RevisionGUID="5439e762-cc83-4780-b728-010e6c062f66" CreationDate="2011-06-24T00:37:51.153" UserId="6867" Text="I'm rendering textured quads to an orthographic view in XNA through hardware instancing. On Nvidia graphics cards, this all works, tested on 3 machines. On ATI cards, it doesn't work at all, tested on 2 machines.&#xD;&#xA;&#xD;&#xA;How come? Culling perhaps?&#xD;&#xA;&#xD;&#xA;My orthographic view is set up like this: &#xD;&#xA;&#xD;&#xA;    Matrix projection = Matrix.CreateOrthographicOffCenter(0, graphicsDevice.Viewport.Width, -graphicsDevice.Viewport.Height, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;And my elements are rendered with the Z-coordinate 0." />
  <row Id="31441" PostHistoryTypeId="1" PostId="14080" RevisionGUID="5439e762-cc83-4780-b728-010e6c062f66" CreationDate="2011-06-24T00:37:51.153" UserId="6867" Text="Textures do not render on ATI graphics cards?" />
  <row Id="31442" PostHistoryTypeId="3" PostId="14080" RevisionGUID="5439e762-cc83-4780-b728-010e6c062f66" CreationDate="2011-06-24T00:37:51.153" UserId="6867" Text="&lt;xna&gt;" />
  <row Id="31443" PostHistoryTypeId="5" PostId="14080" RevisionGUID="ea6f2773-d00d-45cf-ae6d-57b94826adb9" CreationDate="2011-06-24T00:47:56.400" UserId="6867" Comment="added 475 characters in body" Text="I'm rendering textured quads to an orthographic view in XNA through hardware instancing. On Nvidia graphics cards, this all works, tested on 3 machines. On ATI cards, it doesn't work at all, tested on 2 machines.&#xD;&#xA;&#xD;&#xA;How come? Culling perhaps?&#xD;&#xA;&#xD;&#xA;My orthographic view is set up like this: &#xD;&#xA;&#xD;&#xA;    Matrix projection = Matrix.CreateOrthographicOffCenter(0, graphicsDevice.Viewport.Width, -graphicsDevice.Viewport.Height, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;And my elements are rendered with the Z-coordinate 0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I just figured out something weird.&#xD;&#xA;&#xD;&#xA;If I do not call this spritebatch code above doing my textured quad rendering code, then it won't work on Nvidia cards either. Could that be due to culling information or something like that?&#xD;&#xA;&#xD;&#xA;            Batch.Instance.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone);&#xD;&#xA;            ...&#xD;&#xA;            spriteBatch.End();" />
  <row Id="31444" PostHistoryTypeId="2" PostId="14081" RevisionGUID="8795bcb8-6e3b-4c0f-982f-dba465fb0bb7" CreationDate="2011-06-24T01:36:08.840" UserId="6678" Text="Hi I have developed a game on android.Now I want to play it on wifi or 3G. I have game packets which i want to send it form client(mobile) to server then to another client2(mobile).&#xD;&#xA;&#xD;&#xA;I don't know how to write code in Java to send the playPackets continuously to server and receive the playPacket continuously from the server to the clients.&#xD;&#xA;&#xD;&#xA;I guess i have to use two thread one for sending and one for receiving.&#xD;&#xA;&#xD;&#xA;Can someone help me with the code, or the procedure to write code for it.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;" />
  <row Id="31445" PostHistoryTypeId="1" PostId="14081" RevisionGUID="8795bcb8-6e3b-4c0f-982f-dba465fb0bb7" CreationDate="2011-06-24T01:36:08.840" UserId="6678" Text="UDP Code client server architecture" />
  <row Id="31446" PostHistoryTypeId="3" PostId="14081" RevisionGUID="8795bcb8-6e3b-4c0f-982f-dba465fb0bb7" CreationDate="2011-06-24T01:36:08.840" UserId="6678" Text="&lt;java&gt;&lt;android&gt;&lt;multithreading&gt;&lt;client-server&gt;&lt;source-code&gt;" />
  <row Id="31447" PostHistoryTypeId="2" PostId="14082" RevisionGUID="d0e1b67b-20fa-42c8-b675-b6f56396ded7" CreationDate="2011-06-24T01:54:29.493" UserId="8214" Text="I read that most servers handle more than 50 requests per second. Is this true? how many requests can a normal server handle? &#xD;&#xA;&#xD;&#xA;How do MMOG manage requests having to update player actions instantly?" />
  <row Id="31448" PostHistoryTypeId="1" PostId="14082" RevisionGUID="d0e1b67b-20fa-42c8-b675-b6f56396ded7" CreationDate="2011-06-24T01:54:29.493" UserId="8214" Text="How to manage requests for a MMOG?" />
  <row Id="31449" PostHistoryTypeId="3" PostId="14082" RevisionGUID="d0e1b67b-20fa-42c8-b675-b6f56396ded7" CreationDate="2011-06-24T01:54:29.493" UserId="8214" Text="&lt;mmo&gt;&lt;server&gt;" />
  <row Id="31450" PostHistoryTypeId="2" PostId="14083" RevisionGUID="4572d089-36f0-40df-970e-d584567e430f" CreationDate="2011-06-24T01:58:12.563" UserId="1923" Text="With 50 independent cubes manuvering all around your 3d world, I might consider a 3 level oct tree. that splits your world up into 64 nodes (Axis Aligned Bounding boxes). Each frame you determine which of the 64 boxes each cube is in, then foreach cube, if there are more than one cube in that node, check each against the others in that node, else move onto next cube or frame.&#xD;&#xA;&#xD;&#xA;How you build it? Create a bounding box that encompasses the entire world, determine the corner positions, determine points hallfway between each corner, build 8 smaller bounding boxes based on those 'halfway points'. then foreach of the 8 bounding boxes you just built, repeat: determine their corner positions, then determine points halfway between, then build 8 boxes within each box. &#xD;&#xA;&#xD;&#xA;this would take approx 150 to 175 AABB to AABB checks each frame instead of the 1200 a brute force check would take." />
  <row Id="31451" PostHistoryTypeId="2" PostId="14084" RevisionGUID="937835c8-f97f-43b1-ac99-c057c5e6d4e0" CreationDate="2011-06-24T02:42:01.230" UserId="7787" Text="I'm adding movable crates to my game and I need some help with my movement code. The way I've set up my movement code the crate's X and Y are moved according to a vector2 unless it hits a wall. Here's the movement code:&#xD;&#xA;&#xD;&#xA;    if (frameCount % (delay / 2) == 0)&#xD;&#xA;            {&#xD;&#xA;                for (int i = 0; i &lt; Math.Abs(cSpeed.X); i++)&#xD;&#xA;                {&#xD;&#xA;                    if (!Level.PlayerHit(new Rectangle(crateBounds.X + (Math.Sign(cSpeed.X) * 32), crateBounds.Y, crateBounds.Width, crateBounds.Height)))&#xD;&#xA;                    {&#xD;&#xA;                        if (!Level.CollideTiles(crateBounds.X + (Math.Sign(cSpeed.X) * 32), crateBounds.Y, crateBounds.Width, crateBounds.Height))&#xD;&#xA;                        {&#xD;&#xA;                            if (cSpeed.X != 0)&#xD;&#xA;                            {&#xD;&#xA;                                crateBounds.X += Math.Sign(cSpeed.X);&#xD;&#xA;                            }&#xD;&#xA;                            else&#xD;&#xA;                            {&#xD;&#xA;                                Equalize(2);&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                        else&#xD;&#xA;                        {&#xD;&#xA;                            cSpeed.X = 0f;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        if (!Level.CollideTiles(crateBounds.X - (Math.Sign(cSpeed.X) * 32), crateBounds.Y, crateBounds.Width, crateBounds.Height))&#xD;&#xA;                        {&#xD;&#xA;                            if (cSpeed.X != 0)&#xD;&#xA;                            {&#xD;&#xA;                                crateBounds.X -= Math.Sign(cSpeed.X);&#xD;&#xA;                            }&#xD;&#xA;                            else&#xD;&#xA;                            {&#xD;&#xA;                                Equalize(2);&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                        else&#xD;&#xA;                        {&#xD;&#xA;                            cSpeed.X = 0f;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                for (int i = 0; i &lt; Math.Abs(cSpeed.Y); i++)&#xD;&#xA;                {&#xD;&#xA;                    if (!Level.PlayerHit(new Rectangle(crateBounds.X, crateBounds.Y + Math.Sign(cSpeed.Y), crateBounds.Width, crateBounds.Height)))&#xD;&#xA;                    {&#xD;&#xA;                        if (!Level.CollideTiles(crateBounds.X, crateBounds.Y + Math.Sign(cSpeed.Y), crateBounds.Width, crateBounds.Height))&#xD;&#xA;                        {&#xD;&#xA;                            crateBounds.Y += Math.Sign(cSpeed.Y);&#xD;&#xA;                        }&#xD;&#xA;                        else&#xD;&#xA;                        {&#xD;&#xA;                            cSpeed.Y = 0f;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        if (!Level.CollideTiles(crateBounds.X, crateBounds.Y - Math.Sign(cSpeed.Y), crateBounds.Width, crateBounds.Height))&#xD;&#xA;                        {&#xD;&#xA;                            crateBounds.Y -= Math.Sign(cSpeed.Y);&#xD;&#xA;                        }&#xD;&#xA;                        else&#xD;&#xA;                        {&#xD;&#xA;                            cSpeed.Y = 0f;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;The frameCount and delay variables just slow down the movement somewhat. Anyway, I've added a tool to my game that acts as a gravity well (drawing objects into it's center; the closer they get to the center the faster they go) and what I'm trying to do is make it so that the crate will bounce off the player (and vice versa) when they collide. Thus far, my code only keeps the crate and player from getting stuck inside each other (the player can still get stuck under the crate, but I'll fix that later.) So what I'd like to know is how I can best make the crate bounce off the player.&#xD;&#xA;&#xD;&#xA;The other movement problem I'm having is related to another tool which allows the player to pick up crates and move around with them. The problem is that the crate's movement while being carried isn't tied to the movement script (it moves the crate itself, instead of adding to speed), which makes the crate go through walls and such. I know what I have to do: make the crate's speed match the player's speed while the player is holding it, but I need the crate to snap to a certain position (just in front of the player) when the player grabs it and it needs to switch to another position (just in front of the player on the other side) when they player faces the other direction while holding it. What would be the best way to make it switch places while keeping all the movement tied to the speed vector?" />
  <row Id="31452" PostHistoryTypeId="1" PostId="14084" RevisionGUID="937835c8-f97f-43b1-ac99-c057c5e6d4e0" CreationDate="2011-06-24T02:42:01.230" UserId="7787" Text="I need help with specific types of movement." />
  <row Id="31453" PostHistoryTypeId="3" PostId="14084" RevisionGUID="937835c8-f97f-43b1-ac99-c057c5e6d4e0" CreationDate="2011-06-24T02:42:01.230" UserId="7787" Text="&lt;xna&gt;&lt;collision-detection&gt;&lt;movement&gt;" />
  <row Id="31454" PostHistoryTypeId="2" PostId="14085" RevisionGUID="255061c2-77d7-4346-bbe9-1fb70e10d963" CreationDate="2011-06-24T02:42:50.913" UserId="8194" Text="Okay, so I know I need to set the path to the native files. I can do this in Eclipse, by going to the VM arguments and using -Djava.library.path=, but when I export, it says that the VM arguments aren't kept after exporting, but it can be set in the console while running it. I am running Mac OS X. How do I set that using Terminal?" />
  <row Id="31455" PostHistoryTypeId="1" PostId="14085" RevisionGUID="255061c2-77d7-4346-bbe9-1fb70e10d963" CreationDate="2011-06-24T02:42:50.913" UserId="8194" Text="No LWJGL in java.library.path" />
  <row Id="31456" PostHistoryTypeId="3" PostId="14085" RevisionGUID="255061c2-77d7-4346-bbe9-1fb70e10d963" CreationDate="2011-06-24T02:42:50.913" UserId="8194" Text="&lt;java&gt;&lt;console&gt;&lt;lwjgl&gt;" />
  <row Id="31457" PostHistoryTypeId="2" PostId="14086" RevisionGUID="8020ab8c-4941-4c54-87c1-4c33050f21ad" CreationDate="2011-06-24T02:47:20.760" UserId="8090" Text="It should be exactly the same, just provide -Djava.library.path=&quot;your_path&quot; to java when you run it:&#xD;&#xA;&#xD;&#xA;    java -Djava.library.path=&quot;your_path&quot; -classpath &quot;your_classpath&quot; your.main.Class" />
  <row Id="31458" PostHistoryTypeId="2" PostId="14087" RevisionGUID="eb08a1e9-1d4f-4896-aee1-9c1bbb11c9f3" CreationDate="2011-06-24T03:22:57.530" UserId="7652" Text="There are a lot of things that Minecraft could be doing more efficiently.  For example, Minecraft loads entire vertical pillars of about 16x16 tiles and renders them.  I feel that it is very inefficient to send and render that many tiles needlessly.  But I don't feel like choice of language is an important one.&#xD;&#xA;&#xD;&#xA;Java can be quite fast but for something this data-oriented, C++ does have a large advantage with significantly less overhead for accessing arrays and working within bytes.  On the flip side, it is much easier to perform threading across all platforms in Java.  Unless you plan to utilize OpenMP or OpenCL, you won't find that convenience in C++.&#xD;&#xA;&#xD;&#xA;My ideal system would be a slightly more complex hierarchy.&#xD;&#xA;&#xD;&#xA;**Tile** is a single unit, likely around 4 bytes to keep information such as material type and lighting.&#xD;&#xA;&#xD;&#xA;**Segment** would be a 32x32x32 block of tiles.&#xD;&#xA;&#xD;&#xA; 1. Flags would be set for each of the six sides, if that entire side is solid blocks.  That would allow the renderer to occlude segments behind that segment.  Minecraft currently does not appear to perform occlusion testing.  But there was mention of having [hardware occlusion  culling][1] available which can be costly but better than rendering massive amounts of polygons on low-end cards.&#xD;&#xA; 2. Segments would only be loaded into memory during activity (players, NPCs, water physics, tree growth, etcetera).  Otherwise they would be sent directly still compressed from disk to clients.&#xD;&#xA;&#xD;&#xA;**Sectors** would be a 16x16x8 block of segments.&#xD;&#xA;&#xD;&#xA; 1. Sectors would track the highest segment for each vertical column so that segments higher than that can quickly be determined empty.&#xD;&#xA; 2. It would also track the bottom occluded segment, so that every segment that needs to be rendered from the surface could be quickly grabbed.&#xD;&#xA; 3. Sectors would also track the next time each segment needs to be updated (water physics, tree growth, etcetera).  This way loading in each sector would be enough to keep the world alive and only loading in segments long enough to complete their tasks.&#xD;&#xA; 4. All entity positions would be tracked relative to the Sector.  This would prevent the  floating-point errors present in Minecraft when travelling very far from the map center.&#xD;&#xA;&#xD;&#xA;**World** would be an infinite map of sectors.&#xD;&#xA;&#xD;&#xA; 1. The world would be responsible for managing sectors and their next updates.&#xD;&#xA; 2. The world would preemptively send segments to players along their potential paths.  Minecraft reactively sends segments that the client requests, inciting a delay.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/resources/faq/technical/clipping.htm" />
  <row Id="31459" PostHistoryTypeId="25" PostId="14003" RevisionGUID="096046f5-9360-472e-813f-cf316ec161b8" CreationDate="2011-06-24T03:25:00.837" Comment="http://twitter.com/#!/StackGameDev/status/84099678270009345" />
  <row Id="31460" PostHistoryTypeId="2" PostId="14088" RevisionGUID="96605cc8-7a13-41c6-8f49-0c68c2ea1f5c" CreationDate="2011-06-24T04:56:27.230" UserId="8216" Text="Look into b2FrictionJoint to simulate top-down &quot;rough surfaces&quot;. Motion damping doesn't end up looking that realistic.&#xD;&#xA;&#xD;&#xA;You can basically attach your objects to anything using a friction joint to get it to work. (I attach them all to a floor object, but it doesn't matter how big or where it is.)" />
  <row Id="31461" PostHistoryTypeId="2" PostId="14089" RevisionGUID="22d5b030-db6d-458c-a999-d33979e8d1a7" CreationDate="2011-06-24T05:28:28.263" UserId="288" Text="`SpriteSortMode.Immediate` is setting the device state &quot;immediately&quot; you call `Begin`. You shouldn't use it unless you actually want the `Immediate` behaviour. Using `Immediate` turns off batching (slower) but allows you to directly manipulate states on the `GraphicsDevice` object between sprites. (Prefer `Deferred` instead.)&#xD;&#xA;&#xD;&#xA;You are setting `DepthStencilState.Default` (depth reads and writes enabled), which is the default for `GraphicsDevice`, but the default for `SpriteBatch` is actually `None` (depth reads and writes disabled).&#xD;&#xA;&#xD;&#xA;Now here's the bit where I have to **guess** (because you haven't provided enough code, and this is a tricky hardware-dependent problem):&#xD;&#xA;&#xD;&#xA;You've set your near plane to `0`, and you're drawing things at a Z-position of 0, which is right on the border of the valid region of the depth buffer. I would hazard a guess it has something to do with this. You might try moving your near plane back, moving your Z-position forward, and/or disabling the depth buffer." />
  <row Id="31462" PostHistoryTypeId="25" PostId="14080" RevisionGUID="52159fbd-9963-4a3a-be06-d9fea34ac877" CreationDate="2011-06-24T06:25:00.587" Comment="http://twitter.com/#!/StackGameDev/status/84144975884976128" />
  <row Id="31463" PostHistoryTypeId="5" PostId="14088" RevisionGUID="b7391e67-fb3b-4b34-8e61-aa75952553ef" CreationDate="2011-06-24T07:10:28.287" UserId="20" Comment="Added link to the b2FrictionJoint API" Text="Look into [b2FrictionJoint][1] to simulate top-down &quot;rough surfaces&quot;. Motion damping doesn't end up looking that realistic.&#xD;&#xA;&#xD;&#xA;You can basically attach your objects to anything using a friction joint to get it to work. (I attach them all to a floor object, but it doesn't matter how big or where it is.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2dflash.org/docs/2.1a/reference/Box2D/Dynamics/Joints/b2FrictionJoint.html" />
  <row Id="31464" PostHistoryTypeId="5" PostId="14080" RevisionGUID="8a1af9df-9cd8-4094-9bd4-8d89b7976b9d" CreationDate="2011-06-24T07:33:02.380" UserId="6867" Comment="added 2261 characters in body; edited tags" Text="I'm rendering textured quads to an orthographic view in XNA through hardware instancing. On Nvidia graphics cards, this all works, tested on 3 machines. On ATI cards, it doesn't work at all, tested on 2 machines.&#xD;&#xA;&#xD;&#xA;How come? Culling perhaps?&#xD;&#xA;&#xD;&#xA;My orthographic view is set up like this: &#xD;&#xA;&#xD;&#xA;    Matrix projection = Matrix.CreateOrthographicOffCenter(0, graphicsDevice.Viewport.Width, -graphicsDevice.Viewport.Height, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;And my elements are rendered with the Z-coordinate 0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;I just figured out something weird.&#xD;&#xA;&#xD;&#xA;If I do not call this spritebatch code above doing my textured quad rendering code, then it won't work on Nvidia cards either. Could that be due to culling information or something like that?&#xD;&#xA;&#xD;&#xA;            Batch.Instance.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone);&#xD;&#xA;            ...&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 2:**&#xD;&#xA;&#xD;&#xA;Here's the full code for my instancing call.&#xD;&#xA;&#xD;&#xA;        public void DrawTextures()&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;            Batch.Instance.SpriteBatch.Begin(SpriteSortMode.Texture, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone, textureEffect);&#xD;&#xA;            while (texturesToDraw.Count &gt; 0)&#xD;&#xA;            {&#xD;&#xA;                TextureJob texture = texturesToDraw.Dequeue();&#xD;&#xA;                spriteBatch.Draw(texture.Texture, texture.DestinationRectangle, texture.TintingColor);&#xD;&#xA;            }&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;    #if !NOTEXTUREINSTANCING&#xD;&#xA;            // no work to do&#xD;&#xA;            if (positionInBufferTextured &gt; 0)&#xD;&#xA;            {&#xD;&#xA;&#xD;&#xA;                device.BlendState = BlendState.Opaque;&#xD;&#xA;&#xD;&#xA;                textureEffect.CurrentTechnique = textureEffect.Techniques[&quot;Technique1&quot;];&#xD;&#xA;                textureEffect.Parameters[&quot;Texture&quot;].SetValue(darkTexture);&#xD;&#xA;                textureEffect.CurrentTechnique.Passes[0].Apply();&#xD;&#xA;&#xD;&#xA;                if ((textureInstanceBuffer == null) ||&#xD;&#xA;                    (positionInBufferTextured &gt; textureInstanceBuffer.VertexCount))&#xD;&#xA;                {&#xD;&#xA;                    if (textureInstanceBuffer != null)&#xD;&#xA;                        textureInstanceBuffer.Dispose();&#xD;&#xA;&#xD;&#xA;                    textureInstanceBuffer = new DynamicVertexBuffer(device, texturedInstanceVertexDeclaration, positionInBufferTextured, BufferUsage.WriteOnly);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                if (positionInBufferTextured &gt; 0)&#xD;&#xA;                {&#xD;&#xA;                    textureInstanceBuffer.SetData(texturedInstances, 0, positionInBufferTextured, SetDataOptions.Discard);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                device.Indices = textureIndexBuffer;&#xD;&#xA;                device.SetVertexBuffers(textureGeometryBuffer, new VertexBufferBinding(textureInstanceBuffer, 0, 1));&#xD;&#xA;&#xD;&#xA;                device.DrawInstancedPrimitives(PrimitiveType.TriangleStrip, 0, 0, textureGeometryBuffer.VertexCount, 0, 2, positionInBufferTextured);&#xD;&#xA;&#xD;&#xA;                // now that we've drawn, it's ok to reset positionInBuffer back to zero,&#xD;&#xA;                // and write over any vertices that may have been set previously.&#xD;&#xA;                positionInBufferTextured = 0;&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;    #endif&#xD;&#xA;        }" />
  <row Id="31465" PostHistoryTypeId="6" PostId="14080" RevisionGUID="8a1af9df-9cd8-4094-9bd4-8d89b7976b9d" CreationDate="2011-06-24T07:33:02.380" UserId="6867" Comment="added 2261 characters in body; edited tags" Text="&lt;xna&gt;&lt;hlsl&gt;" />
  <row Id="31466" PostHistoryTypeId="2" PostId="14090" RevisionGUID="dfff5406-b181-494a-a8f8-9ab6a40e1890" CreationDate="2011-06-24T07:46:41.203" UserId="8050" Text="You are doing too much things togheter. You see, five indentations level are *too much*.&#xD;&#xA;Now you should add even a sixth... I think your aproach is wrong and it can lead you only in an unmantainable code.&#xD;&#xA;&#xD;&#xA;Well, enought criticism: lets work.&#xD;&#xA;&#xD;&#xA; 1. you should work in each frame (do less things but do them).&#xD;&#xA; 2. model things with a common base (both player and crates are solid objects with a position and an extent)&#xD;&#xA; 3. model dynamics for the common base, **Do not code it into this or that object** but do it in another function/class (class is better).&#xD;&#xA; 4. try to apply your position variation at once in a frame (not in a for loop): you will miss a collision only if you are travel very fast.&#xD;&#xA; 5. vector come from Latin *vector* &quot;one who carries or conveys, carrier&quot; so **NEWPOS** = **OLDPOS** + **VECTOR** ( a definition for vector is **V** = **B** - **A** so you can use **V** to go from **A** to **B**)&#xD;&#xA;&#xD;&#xA;If you do so, you can add a status to your crate so it can be FREE or PICKED, you change this status by the methods drop() and pickup(player): when you drop the crate's dynamic become the free status dynamic; when *player* picks up the crate, the crate will ask the player to give it the new dynamic it have to obey.&#xD;&#xA;&#xD;&#xA;At each frame you:&#xD;&#xA;&#xD;&#xA; - update each common-base-objects current dynamic step that will change the common-base-object position accordly; &#xD;&#xA; - do the collision detection for each type - looking to the current status if needed and varing the dynamics parameters on collisions&#xD;&#xA; - update your scene according to the updated objects status. &#xD;&#xA;&#xD;&#xA;Doing so you decouple things and factor common behaviours without explore each possibility in a single deep tree of nested ifs and fors." />
  <row Id="31467" PostHistoryTypeId="25" PostId="14085" RevisionGUID="3dfb439e-f0ea-4b91-8680-987cf8ef8e8d" CreationDate="2011-06-24T09:25:00.577" Comment="http://twitter.com/#!/StackGameDev/status/84190275265773568" />
  <row Id="31468" PostHistoryTypeId="2" PostId="14091" RevisionGUID="5e4c3fd1-24d5-44ee-8304-a721e251080f" CreationDate="2011-06-24T09:55:50.310" UserId="6803" Text="I'm thinking that the straight-forward way would be to just iterate through the objects and just find the maximum and minimum coordinates on each axis, but this seems a little bit unoptimal.&#xD;&#xA;&#xD;&#xA;Is there a faster, more efficient way of doing this?" />
  <row Id="31469" PostHistoryTypeId="1" PostId="14091" RevisionGUID="5e4c3fd1-24d5-44ee-8304-a721e251080f" CreationDate="2011-06-24T09:55:50.310" UserId="6803" Text="Volume that encompasses the whole scene?" />
  <row Id="31470" PostHistoryTypeId="3" PostId="14091" RevisionGUID="5e4c3fd1-24d5-44ee-8304-a721e251080f" CreationDate="2011-06-24T09:55:50.310" UserId="6803" Text="&lt;bounding-boxes&gt;&lt;octree&gt;" />
  <row Id="31471" PostHistoryTypeId="2" PostId="14092" RevisionGUID="7c86140c-dfca-48c5-9463-0f0e41213f8a" CreationDate="2011-06-24T11:11:03.807" UserId="8219" Text="I have only previously made flash games, using MovieClips and such to separate out my animations from my game logic. Now I am getting into trying my hand at making a game for Android, but the game programming theory around separating these things still confuses me. I come from a background of developing non game web applications so I am versed in more MVC like patterns and am stuck in that mindset as I approach game programming.&#xD;&#xA;&#xD;&#xA;I want to do things like abstract my game by having, for example, a game board class that contains the data for a grid of tiles with instances of a tile class that each contain properties. I can give my draw loop access to this and have it draw the game board based on the properties of each tile on the game board, but I don't understand where exactly animation should go. As far as I can tell, animation sort of sits between the abstracted game logic (model) and the draw loop (view). With my MVC mindset, it's frustrating trying to decide where animation is actually supposed to go. It would have quite a bit of data associated with it like a model, but seemingly needs to be very closely coupled with the draw loop in order to have things like frame independent animation.&#xD;&#xA;&#xD;&#xA;How can I break out of this mindset and start thinking about patterns that make more sense for games?" />
  <row Id="31472" PostHistoryTypeId="1" PostId="14092" RevisionGUID="7c86140c-dfca-48c5-9463-0f0e41213f8a" CreationDate="2011-06-24T11:11:03.807" UserId="8219" Text="What are some ways to separate game logic from animations and the draw loop?" />
  <row Id="31473" PostHistoryTypeId="3" PostId="14092" RevisionGUID="7c86140c-dfca-48c5-9463-0f0e41213f8a" CreationDate="2011-06-24T11:11:03.807" UserId="8219" Text="&lt;programming&gt;&lt;android&gt;&lt;design-patterns&gt;" />
  <row Id="31474" PostHistoryTypeId="2" PostId="14093" RevisionGUID="0ac66bc9-410a-4a9a-b930-5796d400461a" CreationDate="2011-06-24T11:11:18.687" UserId="5224" Text="I don't know why or how exact your volume needs to be, but if you give each object a bounding sphere (you probably already have that, or it might be wise) you can very cheaply merge all these bounding spheres to find the entire volume. Of course this would still be O(N) but merging bounding spheres is really cheap.&#xD;&#xA;&#xD;&#xA;Another solution would be spatial partitioning, you divide your world into large (axis aligned cube like) chunks and every time an object moves you update in which chunk it is, at the same time you can also check if the chunk it moved to is more to the outside as the last most outside part.&#xD;&#xA;&#xD;&#xA;You have to take care though that if an object leaves one of the most outside parts you have to check if that outside chunk is now empty, and if so slightly shrink the volume.&#xD;&#xA;&#xD;&#xA;A good way to do this would be to store an int[x,y,z] that stores how many objects are present, or another structure like a list, that stores a references to each object in that chunk.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyway if you clarify your question even further by describing what you're trying to accomplish we would probably be able to give you a better answer." />
  <row Id="31475" PostHistoryTypeId="2" PostId="14094" RevisionGUID="e43d2955-966e-49fc-97a9-2263d39c8890" CreationDate="2011-06-24T11:13:50.387" UserId="5401" Text="I and our other devs have ATi graphics cards. However we have encountered that some shaders that compile without warnings on ATi don't compile at all on nVidia. The problems are trivial to fix, but often go unseen.&#xD;&#xA;&#xD;&#xA;My question is, how can I make sure that my shaders will compile everywhere?" />
  <row Id="31476" PostHistoryTypeId="1" PostId="14094" RevisionGUID="e43d2955-966e-49fc-97a9-2263d39c8890" CreationDate="2011-06-24T11:13:50.387" UserId="5401" Text="How can I test shaders for nVidia on an ATi system?" />
  <row Id="31477" PostHistoryTypeId="3" PostId="14094" RevisionGUID="e43d2955-966e-49fc-97a9-2263d39c8890" CreationDate="2011-06-24T11:13:50.387" UserId="5401" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;compatibility&gt;&lt;nvidia&gt;" />
  <row Id="31478" PostHistoryTypeId="5" PostId="14004" RevisionGUID="14088353-94d0-4a56-b47f-9efda9090bc3" CreationDate="2011-06-24T11:15:04.177" UserId="1742" Comment="much extended information about what I want to know and what I'm assuming." Text="In large procedural landscape games, the land seems dull, but that's probably because the real world is largely dull, with only limited places where the scenery is dramatic or tactical.&#xD;&#xA;&#xD;&#xA;Looking at world generation from this point of view, a landscape generator for a game (that is, not for the sake of scenery, but for the sake of gameplay) needs to **not** follow the rules of landscaping, but instead some rules married to the expectations of the gamer. For example, there could be a choke point / route generator that creates hills ravines, rivers and mountains between cities, rather than the natural way cities arise, scattered on the land based on resources or conditions generated by the mountains and rainfall patterns.&#xD;&#xA;&#xD;&#xA;Is there any existing work being done like this? Start with cities or population centres and then add in terrain afterwards?&#xD;&#xA;&#xD;&#xA;The reason I'm asking is that I'd previously pondered taking existing maps from fantasy fiction (my own and others), putting the information into the system as a base point, and then generating a good world to play in from it. This seems covered by existing technology, that is, where the designer puts in all the necessary information such as the city populations, resources, biomes, road networks and rivers, then allows the PCG fill in the gaps.&#xD;&#xA;&#xD;&#xA;But now I'm wondering if it may be possible to have a content generator generate also the overall design. Generate the cities and population centres, balancing them so that there is a natural seeming need of commerce, then generate the positions and connectivity, then from the type of city produce the list of necessary resources that must be nearby, and only then, maybe given some rules on how to make the journey between cities both believable and interesting, generate the final content including the roads, the choke points, the bridges and tunnels, ferries and the terrain including the biomes and coastline necessary.&#xD;&#xA;&#xD;&#xA;If this has been done before, I'd like to know, and would like to know what went wrong, and what went right." />
  <row Id="31479" PostHistoryTypeId="2" PostId="14095" RevisionGUID="e385de3b-1569-414e-a3fe-56ca103d751e" CreationDate="2011-06-24T11:29:16.833" UserId="1742" Text="When building an Octree, you can start at any size and change it later, for example, I once wrote an octree to help reduce the interation tests in my physics collision detection routine, and started out with size 1.0f for each axis. As physics elements were added to the scene, the octree grew, the first element was a 4.0f radius object somewhere quite far from the origin, lets say (5,4,100), so as there were no elements in the octree, I merely **resized the root node** (doubling it until it fit) to 128.0f.&#xD;&#xA;&#xD;&#xA;The second element is where you see interesting things, the second element added was also outside the existing octree, (200,200,200, Radius4) so the root node could not hold it, so instead, i created a **new double size root node**, and pushed the current root node contents out into the 8 new nodes (only one created in this case as the octree was brand new)&#xD;&#xA;&#xD;&#xA;The new root was big enough, so now I had two nodes, one root and one octree branch.&#xD;&#xA;&#xD;&#xA;This carried on until all the elements were added to the scene, adding a new node at the root whenever the content was outside the existing range, adding new nodes at the branch whenever the number of items in the branch went over my arbitrary limit.&#xD;&#xA;&#xD;&#xA;The side effect of starting with a small size and resizing cannot be overstated. Unless you're working in a constrained world, you're bound to go *out-of-bounds* at some point." />
  <row Id="31480" PostHistoryTypeId="2" PostId="14096" RevisionGUID="93ced86b-dce9-4903-9a3a-f434dc4093d7" CreationDate="2011-06-24T12:20:48.707" UserId="7630" Text="I've been learning the paradigms myself lately, so if this answer is incomplete, I'm sure someone will add to it.&#xD;&#xA;&#xD;&#xA;The methodology that seems to make the most sense for game design is to separate the logic from the screen output.  &#xD;&#xA;&#xD;&#xA;In most cases you would want to use a multi threaded approach, if you're not familiar with that topic, it's a question all its own, [here's wiki's primer][1].  Essentially you want your game logic to execute in one thread, [locking][2] variables that it needs to access in order to ensure the data integrity.  If your logic loop is incredibly fast (super mega animated 3d pong?) you can try to fix the frequency the loop executes by sleeping the thread for small durations (120 hz has been suggested in this forum for game physics loops).  Concurrently, the other thread is redrawing the screen (60 hz has been suggested in other topics) with the updated variables, again asking for a lock on the variables before it accesses them.&#xD;&#xA;&#xD;&#xA;In that case, animations or transitions, etc, go into the drawing thread but you must signal through a flag of some sort (a global state variable perhaps) that the game logic thread must do nothing (or do something different ... setup the new map parameters perhaps).&#xD;&#xA;&#xD;&#xA;Once you get your head around the concurrency, the rest is fairly comprehensible.  If you don't have experience with concurrency I strongly suggest you write a few simple test programs so that you can understand how the flow happens.&#xD;&#xA;&#xD;&#xA;Hope this helps :)&#xD;&#xA;&#xD;&#xA;[edit] On systems that don't support multithreading, the animation can still go into the draw loop, but you want to set the state in such a way to signal to the logic that something different is occurring and don't keep processing the current level/map/etc...&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Lock_%28computer_science%29" />
  <row Id="31481" PostHistoryTypeId="25" PostId="14084" RevisionGUID="c3d28555-954a-4074-93f4-4cecf9b77274" CreationDate="2011-06-24T12:25:00.793" Comment="http://twitter.com/#!/StackGameDev/status/84235574709469184" />
  <row Id="31482" PostHistoryTypeId="2" PostId="14097" RevisionGUID="e1e0377c-fbd7-43e6-a82e-8225a54d7002" CreationDate="2011-06-24T12:50:17.777" UserId="1156" Text="I can develop on this if you wish, but I have a central renderer that gets told to draw in the loop. Rather than&#xD;&#xA;&#xD;&#xA;    handle input&#xD;&#xA;    &#xD;&#xA;    for every entity:&#xD;&#xA;        update entity&#xD;&#xA;    &#xD;&#xA;    for every entity:&#xD;&#xA;        draw entity&#xD;&#xA;&#xD;&#xA;I have a system more like&#xD;&#xA;&#xD;&#xA;    handle input (well, update the state. Mine is event driven so this is null)&#xD;&#xA;    &#xD;&#xA;    for every entity:&#xD;&#xA;        update entity //still got game logic here&#xD;&#xA;    &#xD;&#xA;    renderer.draw();&#xD;&#xA;&#xD;&#xA;The renderer class simply holds a list of references to drawable components of objects. These are assigned in the constructors for simplicity.&#xD;&#xA;&#xD;&#xA;For your example, I would have a GameBoard class with a number of Tiles. Each tile obviously knows its position, and I assume some kind of animation. Factor that out into some sort of Animation class that the tile owns, and have it pass a reference of itself to a Renderer class. There, all separated. When you update Tile, it calls Update on the animation..or updates it itself. When `Renderer.Draw()` is called, it draws the animation.&#xD;&#xA;&#xD;&#xA;Frame independent animation shouldn't need too much to do with the draw loop." />
  <row Id="31483" PostHistoryTypeId="2" PostId="14098" RevisionGUID="a695431b-da7d-4506-b693-62387785e02f" CreationDate="2011-06-24T12:51:47.817" UserId="7946" Text="Animation can still perfectly be split between logic and rendering. The abstract data state of animation would be the information that is necessary for your graphics API to render the animation. &#xD;&#xA;&#xD;&#xA;In 2D games for example, that could be the time left until the current animation step expires, name of the animation (&quot;walking&quot;,&quot;standing&quot; etc.), or a rectangle that displays the current part of your sprite sheet that needs to be drawn (when you have a sheet consisting of lets say 30 80x80 drawings containing the various steps of your character jumping, sitting down, moving etc.). That can be represented any way you want. That's the logic part.&#xD;&#xA;&#xD;&#xA;In the rendering part, you just do it as usual, get that rectangle from your model and use your renderer to actually do the calls to the graphics API.&#xD;&#xA;&#xD;&#xA;In code (using C++ syntax here):&#xD;&#xA;&#xD;&#xA;    class Sprite&#xD;&#xA;    {&#xD;&#xA;        private:&#xD;&#xA;           Rectangle subrect;&#xD;&#xA;           Vector2f position;&#xD;&#xA;           //etc.&#xD;&#xA;        &#xD;&#xA;        public:&#xD;&#xA;           Rectangle GetSubrect() &#xD;&#xA;           {&#xD;&#xA;               return subrect;&#xD;&#xA;           }&#xD;&#xA;           //etc.&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class AnimatedSprite : public Sprite, public Updatable //arbitrary interface for classes that need to change their state on a regular basis&#xD;&#xA;    {&#xD;&#xA;        AnimationController animation_controller;&#xD;&#xA;        //etc.&#xD;&#xA;        public:&#xD;&#xA;            void Update()&#xD;&#xA;            {&#xD;&#xA;                animation_controller.Update(); //Good OOP design ;) It will take control of changing animations in time etc. for you&#xD;&#xA;                this.SetSubrect(animation_controller.GetCurrentAnimation().GetRect());&#xD;&#xA;            }&#xD;&#xA;            //etc.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;That's the data. Your renderer will take that data and draw it. Since both normal Sprites and animated ones are drawn the same way, you can use polymorphy here!&#xD;&#xA;&#xD;&#xA;    class Renderer&#xD;&#xA;    {&#xD;&#xA;        //etc.&#xD;&#xA;        public:&#xD;&#xA;           void draw(const Sprite &amp;spr)&#xD;&#xA;           {&#xD;&#xA;               graphics_api_pointer-&gt;draw(spr.GetAllTheDataThatINeed());&#xD;&#xA;           }&#xD;&#xA;    };" />
  <row Id="31484" PostHistoryTypeId="2" PostId="14099" RevisionGUID="57fd64ef-60bf-4f31-888f-522c0c22b0d1" CreationDate="2011-06-24T12:57:01.390" UserId="3505" Text="Have a bunch of different systems for testing, I can't imagine a way of getting around that.&#xD;&#xA;&#xD;&#xA;Optimally you should have a card from every graphics generation.&#xD;&#xA;&#xD;&#xA;* GeForce 7000 series&#xD;&#xA;* GeForce 8000 series / 9000 series / 250&#xD;&#xA;* GeForce 260 / 275 / 280 / 285 / 295&#xD;&#xA;* GeForce 400 series / 500 series&#xD;&#xA;* Radeon X1000 series&#xD;&#xA;* Radeon HD 2000 series&#xD;&#xA;* Radeon HD 3000 series&#xD;&#xA;* Radeon HD 4000 series&#xD;&#xA;* Radeon HD 5000 series / HD 6000 series&#xD;&#xA;* Intel GMA X series&#xD;&#xA;* Intel HD series&#xD;&#xA;&#xD;&#xA;If you want a really thorough testing you can multiboot all these machines with a bunch of different operating system and driver configurations, but for a more manageable number of tests you can do multiple operating systems and drivers on just one machine each.&#xD;&#xA;&#xD;&#xA;Apart from all this, why don't you diversify your dev machines? Maybe you'll also discover more subtle bugs earlier.&#xD;&#xA;&#xD;&#xA;Even if you can find a way of testing this exact subtlety there is no way you'll be able to test all the things you should without getting at least one nVidia card." />
  <row Id="31485" PostHistoryTypeId="2" PostId="14100" RevisionGUID="d4200853-f037-426a-8162-54473380fab7" CreationDate="2011-06-24T14:19:00.267" UserId="7514" Text="I have a SpriteFont in XNA, which has the standard 126 characters that are usable.&#xD;&#xA;&#xD;&#xA;However i would like to use the &quot;ಠ&quot; symbol in the game.&#xD;&#xA;&#xD;&#xA;So is there anyway of adding just a few more symbols that the spritefont accepts?&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;Randomman159" />
  <row Id="31486" PostHistoryTypeId="1" PostId="14100" RevisionGUID="d4200853-f037-426a-8162-54473380fab7" CreationDate="2011-06-24T14:19:00.267" UserId="7514" Text="XNA - just a few more characters accepted in a SpriteFont" />
  <row Id="31487" PostHistoryTypeId="3" PostId="14100" RevisionGUID="d4200853-f037-426a-8162-54473380fab7" CreationDate="2011-06-24T14:19:00.267" UserId="7514" Text="&lt;xna&gt;&lt;c#&gt;&lt;fonts&gt;" />
  <row Id="31488" PostHistoryTypeId="2" PostId="14101" RevisionGUID="cc24ddb3-8af6-4d13-8a67-95baade1556a" CreationDate="2011-06-24T14:41:35.637" UserId="1430" Text="&gt; I read that most servers handle more&#xD;&#xA;&gt; than 50 requests per second. Is this&#xD;&#xA;&gt; true? how many requests can a normal&#xD;&#xA;&gt; server handle?&#xD;&#xA;&#xD;&#xA;It's really impossible to say -- there isn't a standard definition for &quot;normal&quot; server, plus what many players (and even some developers without a lot of MMO experience) tend to regard as &quot;a server&quot; is actually a collection of both physical and logical servers that all interact to help simulate the game world. Some of them need to service a very high number of requests per second (quite more than 50), other don't so much due to their nature.&#xD;&#xA;&#xD;&#xA;&gt; How do MMOG manage requests having to&#xD;&#xA;&gt; update player actions instantly?&#xD;&#xA;&#xD;&#xA;They don't. It's impossible to round-trip from the client to server instantly; instead, client-side prediction with server authentication is generally used to hide latency and make actions appear instant. You can more the latency around, but you can't ever really get rid of it.&#xD;&#xA;" />
  <row Id="31489" PostHistoryTypeId="2" PostId="14102" RevisionGUID="d4bc8676-0d78-4ded-b172-ea1a0495b179" CreationDate="2011-06-24T15:02:51.263" UserId="288" Text="Modify the sprite font file. It's XML. Double click it in Visual Studio.&#xD;&#xA;&#xD;&#xA;Towards the bottom of the default file is a the following:&#xD;&#xA;&#xD;&#xA;    &lt;CharacterRegions&gt;&#xD;&#xA;      &lt;CharacterRegion&gt;&#xD;&#xA;        &lt;Start&gt;&amp;#32;&lt;/Start&gt;&#xD;&#xA;        &lt;End&gt;&amp;#126;&lt;/End&gt;&#xD;&#xA;      &lt;/CharacterRegion&gt;&#xD;&#xA;    &lt;/CharacterRegions&gt;&#xD;&#xA;&#xD;&#xA;Your character is unicode code point U+0CA0, which in decimal is 3232. So add another character region tag that contains it:&#xD;&#xA;&#xD;&#xA;      &lt;CharacterRegion&gt;&#xD;&#xA;        &lt;Start&gt;&amp;#3232;&lt;/Start&gt;&#xD;&#xA;        &lt;End&gt;&amp;#3232;&lt;/End&gt;&#xD;&#xA;      &lt;/CharacterRegion&gt;&#xD;&#xA;&#xD;&#xA;This assumes that the ಠ symbol exists in the font you are using." />
  <row Id="31490" PostHistoryTypeId="25" PostId="14100" RevisionGUID="6db9fd14-6e7f-487e-acd7-5f1a1c68a8f0" CreationDate="2011-06-24T15:25:02.403" Comment="http://twitter.com/#!/StackGameDev/status/84280880050352128" />
  <row Id="31491" PostHistoryTypeId="5" PostId="14090" RevisionGUID="8d18365a-1aeb-47e2-bebe-056c34ad97fe" CreationDate="2011-06-24T15:33:23.900" UserId="8050" Comment="added 28 characters in body" Text="You are doing too much things togheter. You see, five indentations level are *too much*.&#xD;&#xA;Now you should add even a sixth... I think your aproach is wrong and it can lead you only in an unmantainable code.&#xD;&#xA;&#xD;&#xA;Well, enought criticism: lets work.&#xD;&#xA;&#xD;&#xA; 1. you should work in each frame (do less things but do them).&#xD;&#xA; 2. model things with a common base (both player and crates are solid objects with a position and an extent)&#xD;&#xA; 3. model dynamics for the common base, **Do not code it into this or that object** but do it in another function/class (class is better).&#xD;&#xA; 4. try to apply your position variation at once in a frame (not in a for loop): you will miss a collision only if you are travel very fast.&#xD;&#xA; 5. vector come from Latin *vector* &quot;one who carries or conveys, carrier&quot; so **NEWPOS** = **OLDPOS** + **VECTOR** ( a definition for vector is **V** = **B** - **A** so you can use **V** to go from **A** to **B**)&#xD;&#xA;&#xD;&#xA;If you do so, you can add a status to your crate so it can be FREE or PICKED, you change this status by the methods drop() and pickup(player): when you drop the crate's dynamic become the free status dynamic; when *player* picks up the crate, the crate will ask the player to give it the new dynamic it have to obey.&#xD;&#xA;&#xD;&#xA;At each frame you:&#xD;&#xA;&#xD;&#xA; - update each common-base-objects current dynamic step that will change the common-base-object position accordly; &#xD;&#xA; - do the collision detection for each type - looking to the current status if needed and varing the dynamics parameters on collisions&#xD;&#xA; - update your scene according to the updated objects status. &#xD;&#xA;&#xD;&#xA;Doing so you decouple things and factor common behaviours without explore each possibility in a single deep tree of nested ifs and fors.&#xD;&#xA;&#xD;&#xA;Comments are appreciated" />
  <row Id="31492" PostHistoryTypeId="5" PostId="14069" RevisionGUID="76e3c21a-7773-438a-a2f6-b100548b6fc0" CreationDate="2011-06-24T15:35:26.363" UserId="7328" Comment="fixed possibility of ys1 bieng bigger than ye1" Text="you just have to generate some boundery for the blocks you are going to make, it may be due to the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine a block start from `ys1` and ends to `ye1`. and we know `G` is the ground height (you consider it as zero) and `C` is the ceiling height. a character might jump at most `J` units. just another parameters might be `H` the height of character and `ys0` and `ye0` which define the last block: knowing all these values you can set your bounderies : &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	ys1 = G&#xD;&#xA;	ye1 = max (ye0 + J,  C - H)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	ye1 = random (ye1 - ys1) + ys0;&#xD;&#xA;	ys1 = random (ye1 - ys1)" />
  <row Id="31493" PostHistoryTypeId="5" PostId="14069" RevisionGUID="6b9eaea3-a523-44b1-ba0f-42a6fee4218e" CreationDate="2011-06-24T15:44:22.473" UserId="7328" Comment="again fixed for value of ye1 and ys1 and then added minimum  size of ms for platform size." Text="you just have to generate some boundery for the blocks you are going to make, it may be due to the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine a block start from `ys1` and ends to `ye1`. and we know `G` is the ground height (you consider it as zero) and `C` is the ceiling height. a character might jump at most `J` units. just another parameters might be `H` the height of character and `ys0` and `ye0` which define the last block, let's take `ms` as the minimum size of platform : knowing all these values you can set your bounderies : &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	ys1 = G&#xD;&#xA;	ye1 = max (ye0 + J,  C - H)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	ys1 = random (ye1 - ys1 - ms)&#xD;&#xA;	ye1 = random (ye1 - ys1 - ms) + ys1 + ms;" />
  <row Id="31494" PostHistoryTypeId="2" PostId="14103" RevisionGUID="3affd94b-9383-4321-866f-79b75c2850ba" CreationDate="2011-06-24T15:54:18.757" UserId="8100" Text="Not sure how this translates in Obj-C but here's my version for C++. You want to normalize your random value before turning it into a specific range so the rand() stays uniform.&#xD;&#xA;&#xD;&#xA;    float randomHeight( float heightMin, float heightMax )&#xD;&#xA;    {&#xD;&#xA;        float normRand = rand() / (float) RAND_MAX;&#xD;&#xA;        float range = normRand * (heightMax - heightMin);&#xD;&#xA;        return range + heightMin;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that rand() returns values from 0 to RAND_MAX so if you can find the equivalent in Obj-C, you can just replace these values with yours." />
  <row Id="31495" PostHistoryTypeId="2" PostId="14104" RevisionGUID="5024004c-d3c3-4ca6-a82c-dbee58de3cbc" CreationDate="2011-06-24T15:56:24.623" UserId="6752" Text="I have a great draftsman, but I don't know how to take his drawings to 3D&#xD;&#xA;&#xD;&#xA;My basic notions guide me to get a front picture and a side picture and then&#xD;&#xA;put in a cross in a z-axis and give them dimension, to each part depending on what is im drawing. But my knowledge is only with programming langs such as c++, c#, maybe XNA...&#xD;&#xA;&#xD;&#xA;Is there a tutorial on how to do this stuff?&#xD;&#xA;&#xD;&#xA;ty all." />
  <row Id="31496" PostHistoryTypeId="1" PostId="14104" RevisionGUID="5024004c-d3c3-4ca6-a82c-dbee58de3cbc" CreationDate="2011-06-24T15:56:24.623" UserId="6752" Text="How to transform a 2d drawing in a 3d model in easy steps? Where to start?" />
  <row Id="31497" PostHistoryTypeId="3" PostId="14104" RevisionGUID="5024004c-d3c3-4ca6-a82c-dbee58de3cbc" CreationDate="2011-06-24T15:56:24.623" UserId="6752" Text="&lt;xna&gt;&lt;2d&gt;&lt;3d&gt;&lt;hand-drawn&gt;" />
  <row Id="31498" PostHistoryTypeId="2" PostId="14105" RevisionGUID="22766f6c-34df-4889-9166-abbf290aa2d7" CreationDate="2011-06-24T16:08:01.780" UserId="8226" Text="I'm currently bad at drawing. If I want to create something looking acceptable, it usually takes me hours and hours to fiddle around just to get the basic looks right.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I think that I'm not completely skill-less, I just lack simple drawing techniques..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- Am I a hopeless case?&#xD;&#xA;- Where is a good place to start out in drawing for 2D games? I'd like to be able to create acceptably good backgrounds, terrains / tilemaps, characters and weapons" />
  <row Id="31499" PostHistoryTypeId="1" PostId="14105" RevisionGUID="22766f6c-34df-4889-9166-abbf290aa2d7" CreationDate="2011-06-24T16:08:01.780" UserId="8226" Text="(Where) Can I learn creating art for my 2D games?" />
  <row Id="31500" PostHistoryTypeId="3" PostId="14105" RevisionGUID="22766f6c-34df-4889-9166-abbf290aa2d7" CreationDate="2011-06-24T16:08:01.780" UserId="8226" Text="&lt;2d&gt;&lt;sprites&gt;&lt;art&gt;" />
  <row Id="31501" PostHistoryTypeId="2" PostId="14106" RevisionGUID="2b20d692-cb92-4114-b085-8a412d6087cc" CreationDate="2011-06-24T16:40:12.610" UserId="3830" Text="A great place to start learning is by modifying existing artwork rather than starting from scratch.  Find something that's sort of what you want, and modify it to be what you want.  " />
  <row Id="31502" PostHistoryTypeId="2" PostId="14107" RevisionGUID="3fa89e57-45af-4531-a5cb-b815f9b99c3f" CreationDate="2011-06-24T16:42:13.640" UserId="3830" Text="The solution is not in coding, it's in talent.  Bring someone into your team who's a 3d modeller.  They will be able to take the 2d concept sketches and turn them into 3d models, just as you (as a programmer) can take someone's idea of an algorithm and turn it into code." />
  <row Id="31503" PostHistoryTypeId="2" PostId="14108" RevisionGUID="dd62e461-fcbe-424a-a930-61a3307f0aee" CreationDate="2011-06-24T16:44:08.033" UserId="7888" Text="My biggest piece of advice for this is that *acceptable* art [isn't good enough][1] to create a successful game.&#xD;&#xA;&#xD;&#xA;That said, if you *can* create something that looks right to an honest 3rd party after hours of fiddling then you're not a hopeless case, you just need practice.&#xD;&#xA;&#xD;&#xA;There are three things I suggest you do for practice:&#xD;&#xA;&#xD;&#xA; - Find a local art school, if you can, and take a basic drawing class to learn basic techniques&#xD;&#xA; - Practice drawing real scenery and objects **to scale and in full**&#xD;&#xA;   - Try to practice on larger paper (11&quot;x17&quot; or larger), and fill the page&#xD;&#xA; - Find pieces from artists you like and try to replicate them&#xD;&#xA;&#xD;&#xA;The more you practice with real scenes, the less time it will take you to create acceptable results. There's no easy way out of this, unfortunately. Furthermore, the more art styles you can absorb, the more stylistic tools you will have to apply to your game.&#xD;&#xA;&#xD;&#xA;In terms of specific tools for 2D game art, you can't go wrong with [Adobe Photoshop][2], or [the GIMP][3] if you're on a budget. Generally you can either scan a real-life drawing and work with that as a basis, use a [graphics tablet][4] system to draw directly into Photoshop, or a combination of the two.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mikamobile.blogspot.com/2011/02/appeal.html&#xD;&#xA;  [2]: http://success.adobe.com/en/na/sem/products/photoshop.html?kw=p&amp;sdid=FISSD&amp;skwcid=TC%7C22182%7Cphotoshop%208%7C%7CS%7Cb%7C7873432938&#xD;&#xA;  [3]: http://www.gimp.org/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Graphics_tablet" />
  <row Id="31504" PostHistoryTypeId="2" PostId="14109" RevisionGUID="414eb770-fbc4-4a81-83e4-baa7fa14f432" CreationDate="2011-06-24T16:51:47.127" UserId="8227" Text="We are using Cocos 2D for Android and are unsure if it's a good thing to execute our non-ui tasks on the Cocos thread as a way to get the animations in our game to pause.&#xD;&#xA;&#xD;&#xA;What is the recommended practice?" />
  <row Id="31505" PostHistoryTypeId="1" PostId="14109" RevisionGUID="414eb770-fbc4-4a81-83e4-baa7fa14f432" CreationDate="2011-06-24T16:51:47.127" UserId="8227" Text="Cocos 2D putting things on the cocos thread or not?" />
  <row Id="31506" PostHistoryTypeId="3" PostId="14109" RevisionGUID="414eb770-fbc4-4a81-83e4-baa7fa14f432" CreationDate="2011-06-24T16:51:47.127" UserId="8227" Text="&lt;android&gt;&lt;multithreading&gt;&lt;cocos2d&gt;" />
  <row Id="31507" PostHistoryTypeId="6" PostId="14104" RevisionGUID="58630745-5531-407f-b21a-034e3213eba8" CreationDate="2011-06-24T16:52:27.803" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;3d&gt;&lt;models&gt;&lt;hand-drawn&gt;" />
  <row Id="31508" PostHistoryTypeId="2" PostId="14110" RevisionGUID="23f5aef4-1504-4421-9c92-62f3f0ff084a" CreationDate="2011-06-24T17:06:08.163" UserId="7888" Text="As Tim Holt said, you need a 3D modeler in order to translate the 2D designs into models. However, if you're willing to try your hand at modeling, the basic process generally goes like this:&#xD;&#xA;&#xD;&#xA; 1. Add the image you're working from to the 3D scene so that you can add vertices in front of it. Your modeling program may have a built in method for this, otherwise use a regular plane with the image as a texture.&#xD;&#xA; 2. Set your view so that you are viewing the image flat (camera's direction vector is perpendicular to the image)&#xD;&#xA; 3. If possible, follow step 1 and 2 for your alternative-angle images at an appropriate angle to the original and set up extra camera views so you can see both or all images  from the correct angle simultaneously.&#xD;&#xA; 4. Start adding vertices to your model that match up to the image outlines.&#xD;&#xA; 5. Use your supplementary images to make any additional vertices you need, and to position your vertices from step 4 in the third dimension." />
  <row Id="31509" PostHistoryTypeId="5" PostId="14069" RevisionGUID="41df2cc2-84b7-4de8-b80f-f6748a824acb" CreationDate="2011-06-24T18:11:54.390" UserId="7328" Comment="changed code so that the variable names tell what are they used for." Text="you just have to generate some boundery for the blocks you are going to make, it may be due to the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine a block start from `NewStartPositionY` and ends to `NewEndPositionY`. and we know `GroundLevel` is the ground height (you consider it as zero) and `CeilingLevel` is the ceiling height. a character might jump at most `MaxJump` units. just another parameters might be `PlayerHeight` the height of character and `LastStartPositionY` and `LastEndPositionY` which define the last block, let's take `MinimumBlockSize` as the minimum size of platform : knowing all these values you can set your bounderies : &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	NewStartPositionY = GroundLevel;&#xD;&#xA;	NewEndPositionT = max (LastEndPositionT + MaxJump,  CeilingLevel - PlayerHeight)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	NewStartPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize)&#xD;&#xA;	NewEndPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize) + NewStartPositionY + MinimumBlockSize;" />
  <row Id="31510" PostHistoryTypeId="2" PostId="14111" RevisionGUID="7b740191-8aef-4ac9-a334-b8822fb56a90" CreationDate="2011-06-24T18:22:40.857" UserId="744" Text="Coincidentally, I &lt;a href=&quot;https://bitbucket.org/piman/objrand&quot;&gt;wrote a random number generator in Objective-C a few weeks ago to help teach myself the language&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;If you're using it, you can generate numbers between two values using the following messages on the `Random` class:&#xD;&#xA;&#xD;&#xA;    /* Inclusive low to exclusive high. */&#xD;&#xA;    - (int32_t)uniformIntFrom:(int32_t)low to:(int32_t)high;&#xD;&#xA;    - (uint32_t)uniformUnsignedFrom:(uint32_t)low to:(uint32_t)high;&#xD;&#xA;&#xD;&#xA;    /* Inclusive low to inclusive high. */&#xD;&#xA;    - (float)uniformFloatFrom:(float)low to:(float)high;&#xD;&#xA;    - (double)uniformDoubleFrom:(double)low to:(double)high;&#xD;&#xA;&#xD;&#xA;    /* Inclusive 0 to exclusive 1. */&#xD;&#xA;    - (float)uniformFloat;&#xD;&#xA;    - (double)uniformDouble;&#xD;&#xA;&#xD;&#xA;If you are curious about how to generate a good random number between two values, &lt;a href=&quot;https://bitbucket.org/piman/objrand/src/99c6c48aa9b5/ObjRand/Random.m#cl-64&quot;&gt;this is the main portion of the source code for it&lt;/a&gt;:&#xD;&#xA;&#xD;&#xA;    uint32_t range = high - low;&#xD;&#xA;    uint32_t reject;&#xD;&#xA;    uint32_t n;&#xD;&#xA;&#xD;&#xA;    if (range &lt; 2)&#xD;&#xA;        return low;&#xD;&#xA;&#xD;&#xA;    /* Trick borrowed from OpenBSD's arc4random_uniform. Figure out&#xD;&#xA;     * the size of the bias given the requested range, and throw away&#xD;&#xA;     * numbers within the biased range.&#xD;&#xA;     */&#xD;&#xA;&#xD;&#xA;    if (range &gt; 0x80000000)&#xD;&#xA;        reject = 1 + ~range;&#xD;&#xA;    else&#xD;&#xA;        reject = ((max - (range * 2)) + 1) % range;&#xD;&#xA;&#xD;&#xA;    do {&#xD;&#xA;        n = [engine next];&#xD;&#xA;    } while (n &lt; reject);&#xD;&#xA;    return low + (n % range);&#xD;&#xA;&#xD;&#xA;Where `[engine next`] gives me a number between 0 and `max` (which is usually UINT_MAX, i.e. 2&lt;sup&gt;32&lt;/sup&gt;-1)." />
  <row Id="31511" PostHistoryTypeId="25" PostId="14092" RevisionGUID="a8e1d282-664f-46c8-9eca-3c5d900cf55c" CreationDate="2011-06-24T18:25:03.207" Comment="http://twitter.com/#!/StackGameDev/status/84326181855432705" />
  <row Id="31512" PostHistoryTypeId="5" PostId="14110" RevisionGUID="07e12262-8371-4bcc-b412-3a5d938935b8" CreationDate="2011-06-24T18:45:00.753" UserId="7888" Comment="Added a link to a blender tutorial relevant to the question" Text="As Tim Holt said, you need a 3D modeler in order to translate the 2D designs into models. However, if you're willing to try your hand at modeling, the basic process generally goes like this:&#xD;&#xA;&#xD;&#xA; 1. Add the image you're working from to the 3D scene so that you can add vertices in front of it. Your modeling program may have a built in method for this, otherwise use a regular plane with the image as a texture.&#xD;&#xA; 2. Set your view so that you are viewing the image flat (camera's direction vector is perpendicular to the image)&#xD;&#xA; 3. If possible, follow step 1 and 2 for your alternative-angle images at an appropriate angle to the original and set up extra camera views so you can see both or all images  from the correct angle simultaneously.&#xD;&#xA; 4. Start adding vertices to your model that match up to the image outlines.&#xD;&#xA; 5. Use your supplementary images to make any additional vertices you need, and to position your vertices from step 4 in the third dimension.&#xD;&#xA;&#xD;&#xA;There are tool-specific and more [in-depth tutorials][1] available on the web.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/2D_Image_%28logo%29_to_a_3D_Model" />
  <row Id="31513" PostHistoryTypeId="2" PostId="14112" RevisionGUID="51e08254-779d-4e2e-ad4a-478f1a6f177e" CreationDate="2011-06-24T19:12:15.107" UserId="7328" Text="Thread are something that you have to avoid as long as possible. sure they make all the thing easier in some conditions but they may also create some enexpeted behavior that are really hard to trace. so for your example i prefer some flag to stop update functions to do their animate jobs since you can easily implement it that way.&#xD;&#xA;&#xD;&#xA;in general specially for iphone/android that using threads doesn't give any boost in performance (and sometimes might even reduce fps) I prefer to do all the jobs by hand. except some very rare cases such as loading game content while playing animations there is no need to use threads at all, so you have to avoid using them." />
  <row Id="31514" PostHistoryTypeId="5" PostId="14098" RevisionGUID="221f1ad4-ec56-4fa3-b7dc-76eb8fa1be12" CreationDate="2011-06-24T19:39:36.850" UserId="7946" Comment="just fixed some inconsistencies." Text="Animation can still perfectly be split between logic and rendering. The abstract data state of animation would be the information that is necessary for your graphics API to render the animation. &#xD;&#xA;&#xD;&#xA;In 2D games for example,that could be a rectangle area which marks the area that displays the current part of your sprite sheet that needs to be drawn (when you have a sheet consisting of lets say 30 80x80 drawings containing the various steps of your character jumping, sitting down, moving etc.). It can also be any kind of data that you don't need for rendering, but maybe for managing the animation states themselves, like the time left until the current animation step expires or the name of the animation (&quot;walking&quot;,&quot;standing&quot; etc.) All of that can be represented any way you want. That's the logics part.&#xD;&#xA;&#xD;&#xA;In the rendering part, you just do it as usual, get that rectangle from your model and use your renderer to actually do the calls to the graphics API.&#xD;&#xA;&#xD;&#xA;In code (using C++ syntax here):&#xD;&#xA;&#xD;&#xA;    class Sprite //Model&#xD;&#xA;    {&#xD;&#xA;        private:&#xD;&#xA;           Rectangle subrect;&#xD;&#xA;           Vector2f position;&#xD;&#xA;           //etc.&#xD;&#xA;        &#xD;&#xA;        public:&#xD;&#xA;           Rectangle GetSubrect() &#xD;&#xA;           {&#xD;&#xA;               return subrect;&#xD;&#xA;           }&#xD;&#xA;           //etc.&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class AnimatedSprite : public Sprite, public Updatable //arbitrary interface for classes that need to change their state on a regular basis&#xD;&#xA;    {&#xD;&#xA;        AnimationController animation_controller;&#xD;&#xA;        //etc.&#xD;&#xA;        public:&#xD;&#xA;            void Update()&#xD;&#xA;            {&#xD;&#xA;                animation_controller.Update(); //Good OOP design ;) It will take control of changing animations in time etc. for you&#xD;&#xA;                this.SetSubrect(animation_controller.GetCurrentAnimation().GetRect());&#xD;&#xA;            }&#xD;&#xA;            //etc.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;That's the data. Your renderer will take that data and draw it. Since both normal Sprites and animated ones are drawn the same way, you can use polymorphy here!&#xD;&#xA;&#xD;&#xA;    class Renderer&#xD;&#xA;    {&#xD;&#xA;        //etc.&#xD;&#xA;        public:&#xD;&#xA;           void Draw(const Sprite &amp;spr)&#xD;&#xA;           {&#xD;&#xA;               graphics_api_pointer-&gt;Draw(spr.GetAllTheDataThatINeed());&#xD;&#xA;           }&#xD;&#xA;    };" />
  <row Id="31515" PostHistoryTypeId="2" PostId="14113" RevisionGUID="9fb013a3-542d-4a61-a4aa-e8fc8b97d87c" CreationDate="2011-06-24T19:52:08.243" UserId="8230" Text="If I were to buy, say this song: http://www.youtube.com/watch?v=3fumBcKC6RE, strip/find/get the instrumental, and use that instrumental in a game I'm making, as a theme, say for a recurring boss fight, and then sell this game, would this be illegal? &#xD;&#xA;&#xD;&#xA;This is hypothetically speaking." />
  <row Id="31516" PostHistoryTypeId="1" PostId="14113" RevisionGUID="9fb013a3-542d-4a61-a4aa-e8fc8b97d87c" CreationDate="2011-06-24T19:52:08.243" UserId="8230" Text="Is it illegal to use a commercial song in your game (that you intend to sell)" />
  <row Id="31517" PostHistoryTypeId="3" PostId="14113" RevisionGUID="9fb013a3-542d-4a61-a4aa-e8fc8b97d87c" CreationDate="2011-06-24T19:52:08.243" UserId="8230" Text="&lt;legal&gt;&lt;game-industry&gt;&lt;music&gt;&lt;copyright&gt;" />
  <row Id="31518" PostHistoryTypeId="2" PostId="14114" RevisionGUID="576e5e52-2896-4f65-82ef-4668e3468c90" CreationDate="2011-06-24T19:55:33.783" UserId="962" Text="I am not a lawyer and this is not considered legal advice.&#xD;&#xA;&#xD;&#xA;**Yes it would be illegal.** You have to contact the owner of the song, and work out licensing details. It is likely to be very expensive." />
  <row Id="31519" PostHistoryTypeId="2" PostId="14115" RevisionGUID="d2e566d4-88b5-40d4-846e-2e54efac978a" CreationDate="2011-06-24T20:16:29.173" UserId="998" Text="Assume you're writing matrix code that handles rotation, translation etc for 3d space.&#xD;&#xA;&#xD;&#xA;Now the transformation matrices have to be 4x4 to fit the translation component in.&#xD;&#xA;&#xD;&#xA;However, you don't actually _need_ to store a `w` component in the vector do you?&#xD;&#xA;&#xD;&#xA;Even in perspective division, you can simply compute and store `w` outside of the vector, and perspective divide before returning from the method.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    // post multiply vec2=matrix*vector&#xD;&#xA;    Vector operator*( const Matrix &amp; a, const Vector&amp; v )&#xD;&#xA;    {&#xD;&#xA;      Vector r ;&#xD;&#xA;      // do matrix mult&#xD;&#xA;      r.x = a._11*v.x + a._12*v.y ...&#xD;&#xA;      &#xD;&#xA;      real w = a._41*v.x + a._42*v.y ...&#xD;&#xA;&#xD;&#xA;      // perspective divide&#xD;&#xA;      r /= w ;&#xD;&#xA;    &#xD;&#xA;      return r ;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Is there a point in storing `w` in the Vector class?&#xD;&#xA;" />
  <row Id="31520" PostHistoryTypeId="1" PostId="14115" RevisionGUID="d2e566d4-88b5-40d4-846e-2e54efac978a" CreationDate="2011-06-24T20:16:29.173" UserId="998" Text="Do I need the 'w' component in my Vector class?" />
  <row Id="31521" PostHistoryTypeId="3" PostId="14115" RevisionGUID="d2e566d4-88b5-40d4-846e-2e54efac978a" CreationDate="2011-06-24T20:16:29.173" UserId="998" Text="&lt;math&gt;&lt;vector&gt;&lt;projection&gt;" />
  <row Id="31522" PostHistoryTypeId="6" PostId="9537" RevisionGUID="6d2bf836-b45e-4d23-a0e0-d9ea9f33a49a" CreationDate="2011-06-24T20:21:40.307" UserId="998" Comment="edited tags" Text="&lt;input&gt;&lt;windows&gt;" />
  <row Id="31523" PostHistoryTypeId="2" PostId="14116" RevisionGUID="9b03eea8-ade2-4ec0-93e7-2a463c5027ca" CreationDate="2011-06-24T20:22:59.790" UserId="953" Text="I recommend looking at Google Sketchup. It's a 3D modelling program that's mostly aimed at architectural modelling; it lends itself well to starting with a layout or side projection and extruding from that. It's got a bunch of tutorials and can export in several useful ways.&#xD;&#xA;&#xD;&#xA;However, Sketchup will work best if you're designing 3D environments, not things like humanoid models. It doesn't really do the same sort of vertex-and-polygon-based archetype as typical 3D modellers, and I don't believe it has any sort of skeleton or animation functionality at all.&#xD;&#xA;&#xD;&#xA;If you're feeling adventurous, I recommend trying Blender, like some responders have suggested, since it's free. Look for tutorials online. It will take a lot of learning, more than Sketchup, but it's a fully-featured modelling program." />
  <row Id="31524" PostHistoryTypeId="2" PostId="14117" RevisionGUID="7f46e585-1a14-4375-9cd9-3f8f1f1204a0" CreationDate="2011-06-24T20:23:24.643" UserId="189" Text="If you're making a Vector class, then I presume the class will store the description of a 3D vector. 3D vectors have x, y, and z magnitudes. So unless your vector needs an arbitrary w magnitude, no, you won't store it in the class.&#xD;&#xA;&#xD;&#xA;There is a big difference between a vector and a transformation matrix. Given that both DirectX and OpenGL deal with matrices for you, I don't typically store a 4x4 matrix in my code; rather, I store Euler rotations (or Quaternions if you'd like - which coincidentally do have a w component) and x,y,z translation. The translation is a vector if you'd like, and the rotation technically would fit in a vector as well, where each component would store the rotation amount around its axis." />
  <row Id="31525" PostHistoryTypeId="2" PostId="14118" RevisionGUID="d1f892e2-b374-4842-82f8-4b9403132749" CreationDate="2011-06-24T20:23:56.280" UserId="998" Text="On &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms645578(VS.85).aspx&quot;&gt;Windows from C++&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;    // usFlags is ALWAYS ABSOLUTE, see &#xD;&#xA;    if( raw-&gt;data.mouse.usFlags == MOUSE_MOVE_RELATIVE )&#xD;&#xA;    {&#xD;&#xA;      // its a 0 flag so&#xD;&#xA;      // this is am real mouse&#xD;&#xA;&#xD;&#xA;      // lLastX and lLastY are relative to last pos&#xD;&#xA;    }&#xD;&#xA;    else if( raw-&gt;data.mouse.usFlags | MOUSE_MOVE_ABSOLUTE )&#xD;&#xA;    {&#xD;&#xA;      // its a tablet or positioning device&#xD;&#xA;      // 1 .. 65537, ACROSS THE DESKTOP&#xD;&#xA;      &#xD;&#xA;      // get the relative change in position&#xD;&#xA;      // to turn it into a pixel count,&#xD;&#xA;      // you have to have the old values of lLastX&#xD;&#xA;      // and lLastY (in the last call to this fcn).&#xD;&#xA;    }" />
  <row Id="31526" PostHistoryTypeId="5" PostId="14117" RevisionGUID="c8a38e97-1848-4996-8776-2315d921083f" CreationDate="2011-06-24T20:29:06.010" UserId="189" Comment="added 893 characters in body" Text="If you're making a Vector class, then I presume the class will store the description of a 3D vector. 3D vectors have x, y, and z magnitudes. So unless your vector needs an arbitrary w magnitude, no, you won't store it in the class.&#xD;&#xA;&#xD;&#xA;There is a big difference between a vector and a transformation matrix. Given that both DirectX and OpenGL deal with matrices for you, I don't typically store a 4x4 matrix in my code; rather, I store Euler rotations (or Quaternions if you'd like - which coincidentally do have a w component) and x,y,z translation. The translation is a vector if you'd like, and the rotation technically would fit in a vector as well, where each component would store the rotation amount around its axis.&#xD;&#xA;&#xD;&#xA;If you want to dive a bit deeper into the math of a vector, a [Euclidean vector][1] is just a direction and a magnitude. So typically this is represented by a triplet of numbers, where each number is the magnitude along an axis; its direction is implied by the combination of these three magnitudes, and the magnitude can be found with the [Euclidean distance][2] formula. Or, sometimes it really is stored as a direction (a vector with length=1) and a magnitude (a float), if that's what is convenient (e.g. if the magnitude changes more often than the direction, it may be more convenient to just change that magnitude number than to take a vector, [normalize it][3], and multiply the components by the new magnitude).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Euclidean_vector&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Euclidean_distance&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Normalized_vector" />
  <row Id="31527" PostHistoryTypeId="2" PostId="14119" RevisionGUID="253e246e-8183-4d9b-8fe6-8b4167597323" CreationDate="2011-06-24T20:34:52.060" UserId="4662" Text="Yes, you do. Your transformation is incorrect for some kinds of vector. You can see this in the D3DX mathematical library- they have two different matrix-vector multiplication functions, one for w = 0 and one for w = 1." />
  <row Id="31528" PostHistoryTypeId="2" PostId="14120" RevisionGUID="87ceb504-064d-4cb7-90a1-6c08cb07559a" CreationDate="2011-06-24T20:46:09.037" UserId="7548" Text="Although I'm not a lawyer, my understanding is:  The illegality depends on a number of factors, including, but not limited to, the following:&#xD;&#xA;&#xD;&#xA;* Jurisdiction (e.g., copyright laws aren't enforceable globally because many countries don't recognize intellectual property rights that were not granted within their borders, plus there are also some countries don't even have copyright laws)&#xD;&#xA;&#xD;&#xA;* Permission (when using someone else's copyrighted material, you must first obtain their permission if you don't want to open yourself up to potential litigation {getting sued})&#xD;&#xA;&#xD;&#xA;* Court judgement (a judgement must be provided by a court to determine if a violation of someone's intellectual property rights occurred, after which point court-sanctioned penalties may be applied)&#xD;&#xA;&#xD;&#xA;In essence, the owner of the intellectual property has to take steps to protect their rights.  If apparent violations are permitted, but no attempts are ever made to stop these violations, then others may [reasonably] conclude that these are not really violations (e.g., they were used with permission that was granted privately, which is normally how these things are handled).&#xD;&#xA;&#xD;&#xA;So, **the answer is:  Maybe** -- it might be illegal in that it could be a violation of intellectual property laws, and you'd need to ask someone qualified with the relevant legal expertise (such as a lawyer), on a case-by-case basis, if you were unable to get an answer from the copyright holder." />
  <row Id="31529" PostHistoryTypeId="2" PostId="14121" RevisionGUID="675ab1b7-584a-4d1e-924c-b761b69e149d" CreationDate="2011-06-24T20:48:17.513" UserId="8231" Text="i too have been looking for a good way to depth sort different sized objects, i have thought that i could get the bottom x,y co-ords and if the x,y co-ords are higher up they get rendered first. Although they may be some bugs and i have not actually tested it or tried coding (im in the process of coding my theory in javascript with canvas). Although i have found a very good way to store the odered list in order of rendering, it uses a technique to dramatically increase efficiency in ordering a list, it is of course a BinaryHeap array [Here is a good article about it][1] Hope that helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://eloquentjavascript.net/appendix2.html" />
  <row Id="31530" PostHistoryTypeId="2" PostId="14122" RevisionGUID="1e67e4d0-ca7b-4f81-b35b-4ed5bdde2c60" CreationDate="2011-06-24T20:50:59.320" UserId="8232" Text="Yep, you cannot use any sound without expressed permission from the rightful creator the content. This basically applies to the vast majority of the content you find on the internet." />
  <row Id="31531" PostHistoryTypeId="2" PostId="14123" RevisionGUID="d09dc4fb-b736-4853-abbb-ab0d573650d6" CreationDate="2011-06-24T20:59:27.747" UserId="8233" Text="Depends on what you want and need.  :)&#xD;&#xA;&#xD;&#xA;I'd store it, b/c it IS necessary for transforms and such (you can't multiply a 3 vector with a 4x4 matrix), though if you always just have a w of 1, I guess you could just fake it." />
  <row Id="31532" PostHistoryTypeId="5" PostId="14065" RevisionGUID="f3af1b37-666b-43e9-912a-f1cc99a98043" CreationDate="2011-06-24T21:16:19.377" UserId="8210" Comment="added 243 characters in body" Text="Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block.&#xD;&#xA;&#xD;&#xA;Blocks will continually be spawned, so the player must always be able to jump onto the next block, bearing in mind the minimum position which would be the ground, and the maximum which would the players jump height as well as the ceiling&#xD;&#xA;" />
  <row Id="31533" PostHistoryTypeId="25" PostId="14113" RevisionGUID="772cd8c1-ad4b-49d3-954a-c91038f993b9" CreationDate="2011-06-24T21:25:03.880" Comment="http://twitter.com/#!/StackGameDev/status/84371483316592641" />
  <row Id="31534" PostHistoryTypeId="2" PostId="14124" RevisionGUID="4ea66d71-5f16-43b2-bf60-115496203ed7" CreationDate="2011-06-24T21:26:33.930" UserId="7872" Text="You should look for some 'open-source' music and/or sounds. Most of them require you to get a license from the author and pay them in some way, but there are some that you might be able to use for just a mention in the credits.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Either way, those musicians would probably be a lot easier to talk to and make a reasonable arrangement with than most mainstream music authors." />
  <row Id="31535" PostHistoryTypeId="2" PostId="14125" RevisionGUID="3b4517a6-e206-4b15-9e7f-7fbf4844fcc2" CreationDate="2011-06-24T21:27:56.660" UserId="8050" Text="The fourth dimension in 3D vector is used to compute the affine transformations that will be impossible to compute using matrixes alone. The space remains tree-dimensional so this mean that the fourth is mappend in the 3d space in some way. &#xD;&#xA;&#xD;&#xA;Map a dimensions means that different 4D vectors indicates the same 3D point. The map is that if **A** = [x',y',z'.w'] and **B** = [x&quot;,y&quot;,z&quot;,w&quot;] they represents the same point if x'/x&quot; = y'/y&quot; = z'/z&quot; =w'/w&quot; =&amp;alpha; i.e. the component are proportional for the same coefficient &amp;alpha;. &#xD;&#xA;&#xD;&#xA;Said that you can express a point - say (1,3,7) - in infinite manners like (1,3,7,1) or (2,6,7,2) or (131,393,917,131) or in general (&amp;alpha;&amp;middot;1,&amp;alpha;&amp;middot;3,&amp;alpha;&amp;middot;7,&amp;alpha;).&#xD;&#xA;&#xD;&#xA;This means that you can scale a 4D vector to another representing the same 3D point so that w = 1: the form (x,y,z,1) is the canonical form. &#xD;&#xA;&#xD;&#xA;When you apply a matrix to this vector you may obtain a vector that has not the w = 1, but you can always scale the results to store it in canonical form. So the answer appears to be *&quot;you should use 4D vectors when doing math but don't store the fourth component&quot;*.&#xD;&#xA;&#xD;&#xA;This is quite true but there are some points that you **can't** put in canonical form: points like (4,2,5,0). This point are special ones, they represents directed infinite point and can be normalized to unit vector consistently: you can safety go to the infinite and return (even twice) whitout be Chuck Norris. You will get a miserable division by zero if you try to force those vectors in canonical form. &#xD;&#xA;&#xD;&#xA;Now you know,so the choice is yours!   " />
  <row Id="31536" PostHistoryTypeId="2" PostId="14126" RevisionGUID="5b245bd7-ae91-45aa-81c2-f26ee3e3b845" CreationDate="2011-06-24T21:31:27.160" UserId="8079" Text="Something to look at is the [Flyweight][1] design pattern. I believe most of the answers here reference this design pattern in one way or another. &#xD;&#xA;&#xD;&#xA;While I don't know the exact method Minecraft is using to minimize memory for each block type, this is a possible avenue to use in your game. The idea is to have only one object, like a prototype object, that holds information about all the blocks. The only difference would be the location of each block. &#xD;&#xA;&#xD;&#xA;But even location can be minimized: if you know a block of land is of one type, why not store the dimensions of that land as one giant block, with one set of location data?&#xD;&#xA;&#xD;&#xA;Obviously the only way to know is to start implementing your own, and do some memory tests for performance. Let us know how it goes!&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Flyweight_pattern" />
  <row Id="31537" PostHistoryTypeId="2" PostId="14127" RevisionGUID="3b795f33-dd85-49b2-acbe-be72ad29d1f8" CreationDate="2011-06-24T21:33:44.037" UserId="7911" Text="I also am not a lawyer, but the term is &quot;express permission&quot; so if you go researching that's what you'll need to search on.  The common use is something like this: &quot;It means that permission was clearly given, that in lieu of permission there is no permission at all.&quot;&#xD;&#xA;&#xD;&#xA;In the not a lawyer vein, copyright is not something that must be protected (like trademark) but it is something that can be enforced.&#xD;&#xA;&#xD;&#xA;Think of this the other way around, would it be right if the guys who wrote and performed that song started giving away your game for free to anyone who liked their music?  Probably not.&#xD;&#xA;" />
  <row Id="31538" PostHistoryTypeId="2" PostId="14128" RevisionGUID="bce5c1a1-8643-4ad8-995d-68cc16593e35" CreationDate="2011-06-24T21:34:56.220" UserId="7548" Text="You could try starting with **pixel art** by taking some graph paper and never violating the golden rule of &quot;one colour per square.&quot;  The alternative to using graph paper is a graphics editing application like Adobe Photoshop and it's &quot;zoom&quot; feature.&#xD;&#xA;&#xD;&#xA;With practice, you can keep reducing the total number of different colours used and still make really nice images.&#xD;&#xA;&#xD;&#xA;I've included two contrasting examples of pixel art below, the first one being a very simple one of some cherries, and the second one being an amazingly complex one (to see it in detail, you may need to right-click on it and choose &quot;Open&quot;).  For more examples of pixel art, use Google's Image Search:  http://images.google.com/images?q=%22pixel+art%22&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/3JLeV.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/3bBD3.png" />
  <row Id="31539" PostHistoryTypeId="5" PostId="14065" RevisionGUID="8f829d0d-946d-42b9-a08c-779f1e786c66" CreationDate="2011-06-24T21:37:51.543" UserId="8210" Comment="added 5 characters in body" Text="Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block.&#xD;&#xA;&#xD;&#xA;Blocks will continually be spawned, so the player must always be able to jump onto the next block, bearing in mind the minimum position which would be the ground, and the maximum which would the players jump height bearing in mind the ceiling&#xD;&#xA;" />
  <row Id="31540" PostHistoryTypeId="5" PostId="13796" RevisionGUID="7206e113-bcfe-40ca-a44b-cfa6cc2f60ca" CreationDate="2011-06-24T22:32:12.527" UserId="51" Comment="appended answer 14059 as supplemental" Text="I am coding in C# using Windows Forms and the SlimDX API to show the effect of a pixel shader. When I am setting the pixel shader, I am getting a black output screen but if I am not using the pixel shader then I am getting my image rendered on the screen. I have the following C# code&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Windows.Forms;&#xD;&#xA;    using System.Runtime.InteropServices;&#xD;&#xA;    using SlimDX.Direct3D9;&#xD;&#xA;    using SlimDX;&#xD;&#xA;    using SlimDX.Windows;&#xD;&#xA;    using System.Drawing;&#xD;&#xA;    using System.Threading;&#xD;&#xA;&#xD;&#xA;    namespace WindowsFormsApplication1&#xD;&#xA;      {&#xD;&#xA;         // Vertex structure.&#xD;&#xA;    [StructLayout(LayoutKind.Sequential)]&#xD;&#xA;    struct Vertex&#xD;&#xA;    {&#xD;&#xA;        public Vector3 Position;&#xD;&#xA;        public float Tu;&#xD;&#xA;        public float Tv;&#xD;&#xA;&#xD;&#xA;        public static int SizeBytes&#xD;&#xA;        {&#xD;&#xA;            get { return Marshal.SizeOf(typeof(Vertex)); }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public static VertexFormat Format&#xD;&#xA;        {&#xD;&#xA;            get { return VertexFormat.Position | VertexFormat.Texture1; }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    static class Program&#xD;&#xA;    {&#xD;&#xA;        public static Device D3DDevice;         // Direct3D device.&#xD;&#xA;        public static VertexBuffer Vertices;    // Vertex buffer object used to hold vertices.&#xD;&#xA;        public static Texture Image;            // Texture object to hold the image loaded from a file.&#xD;&#xA;        public static int time;                 // Used for rotation caculations.&#xD;&#xA;        public static float angle;              // Angle of rottaion.&#xD;&#xA;        public static Form1 Window =new Form1();&#xD;&#xA;        public static  string filepath;&#xD;&#xA;        static VertexShader vertexShader = null;&#xD;&#xA;        static ConstantTable constantTable = null;&#xD;&#xA;        static ImageInformation info;&#xD;&#xA;        [STAThread]&#xD;&#xA;        static void Main()&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            filepath = &quot;C:\\Users\\Public\\Pictures\\Sample Pictures\\Garden.jpg&quot;;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            info = new ImageInformation();&#xD;&#xA;            info = ImageInformation.FromFile(filepath);&#xD;&#xA;           &#xD;&#xA;            PresentParameters presentParams = new PresentParameters();&#xD;&#xA;&#xD;&#xA;            // Below are the required bare mininum, needed to initialize the D3D device.&#xD;&#xA;            presentParams.BackBufferHeight = info.Height;         // BackBufferHeight, set to  the Window's height.&#xD;&#xA;            presentParams.BackBufferWidth = info.Width+200;          // BackBufferWidth, set to  the Window's width.&#xD;&#xA;          &#xD;&#xA;           &#xD;&#xA;         &#xD;&#xA;           &#xD;&#xA;            presentParams.Windowed =true; &#xD;&#xA;            presentParams.DeviceWindowHandle = Window.panel2 .Handle;                       // DeviceWindowHandle, set to  the Window's handle.&#xD;&#xA;&#xD;&#xA;            // Create the device.&#xD;&#xA;            D3DDevice = new Device(new Direct3D (), 0, DeviceType.Hardware, Window.Handle, CreateFlags.HardwareVertexProcessing, presentParams);&#xD;&#xA;&#xD;&#xA;            // Create the vertex buffer and fill with the triangle vertices. (Non-indexed)&#xD;&#xA;            // Remember 3 vetices for a triangle, 2 tris per quad = 6.&#xD;&#xA;            Vertices = new VertexBuffer(D3DDevice, 6 * Vertex.SizeBytes, Usage.WriteOnly, VertexFormat.None, Pool.Managed);&#xD;&#xA;            DataStream stream = Vertices.Lock(0, 0, LockFlags.None);&#xD;&#xA;            stream.WriteRange(BuildVertexData());&#xD;&#xA;            Vertices.Unlock();&#xD;&#xA;&#xD;&#xA;            // Create the texture.&#xD;&#xA;           &#xD;&#xA;            Image = Texture.FromFile(D3DDevice,filepath );&#xD;&#xA;&#xD;&#xA;            // Turn off culling, so we see the front and back of the triangle&#xD;&#xA;            D3DDevice.SetRenderState(RenderState.CullMode, Cull.None);&#xD;&#xA;&#xD;&#xA;            // Turn off lighting&#xD;&#xA;            D3DDevice.SetRenderState(RenderState.Lighting, false);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            ShaderBytecode sbcv = ShaderBytecode.CompileFromFile(&quot;C:\\Users\\yashwinder singh\\Desktop\\vertexShader.vs&quot;, &quot;vs_main&quot;, &quot;vs_1_1&quot;, ShaderFlags.None);&#xD;&#xA;            constantTable = sbcv.ConstantTable;&#xD;&#xA;            vertexShader = new VertexShader(D3DDevice, sbcv);&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            ShaderBytecode sbc = ShaderBytecode.CompileFromFile(&quot;C:\\Users\\yashwinder singh\\Desktop\\pixelShader.txt&quot;, &quot;ps_main&quot;, &quot;ps_3_0&quot;, ShaderFlags.None);&#xD;&#xA;            PixelShader ps = new PixelShader(D3DDevice, sbc);&#xD;&#xA;&#xD;&#xA;            VertexDeclaration vertexDecl = new VertexDeclaration(D3DDevice, new[] {&#xD;&#xA;                                new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.PositionTransformed, 0), &#xD;&#xA;                                new VertexElement(0, 12, DeclarationType.Float2 , DeclarationMethod.Default, DeclarationUsage.TextureCoordinate , 0), &#xD;&#xA;                                VertexElement.VertexDeclarationEnd&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;            Application.EnableVisualStyles();&#xD;&#xA;            &#xD;&#xA;            MessagePump.Run(Window, () =&gt;&#xD;&#xA;                {&#xD;&#xA;                    // Clear the backbuffer to a black color.&#xD;&#xA;                    D3DDevice.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);&#xD;&#xA;&#xD;&#xA;                    // Begin the scene.&#xD;&#xA;                    D3DDevice.BeginScene();&#xD;&#xA;&#xD;&#xA;                  &#xD;&#xA;&#xD;&#xA;                    // Setup the world, view and projection matrices.&#xD;&#xA;                     &#xD;&#xA;                    &#xD;&#xA;                    &#xD;&#xA;                    //D3DDevice.VertexShader = vertexShader;&#xD;&#xA;                    //D3DDevice.PixelShader = ps;&#xD;&#xA;                    &#xD;&#xA;                    // Render the vertex buffer.&#xD;&#xA;                    D3DDevice.SetStreamSource(0, Vertices, 0, Vertex.SizeBytes);&#xD;&#xA;                    D3DDevice.VertexFormat = Vertex.Format;&#xD;&#xA;&#xD;&#xA;                    // Setup our texture. Using Textures introduces the texture stage states,&#xD;&#xA;                    // which govern how Textures get blended together (in the case of multiple&#xD;&#xA;                    // Textures) and lighting information.&#xD;&#xA;                    D3DDevice.SetTexture(0, Image);&#xD;&#xA;                    &#xD;&#xA;                 &#xD;&#xA;                    // Now drawing 2 triangles, for a quad.&#xD;&#xA;                    D3DDevice.DrawPrimitives(PrimitiveType.TriangleList   , 0, 2);&#xD;&#xA;&#xD;&#xA;                    // End the scene.&#xD;&#xA;                    D3DDevice.EndScene();&#xD;&#xA;&#xD;&#xA;                    // Present the backbuffer contents to the screen.&#xD;&#xA;                    D3DDevice.Present();&#xD;&#xA;                    &#xD;&#xA;                }); &#xD;&#xA;            if (Image != null)&#xD;&#xA;                Image.Dispose();&#xD;&#xA;&#xD;&#xA;            if (Vertices != null)&#xD;&#xA;                Vertices.Dispose();&#xD;&#xA;&#xD;&#xA;            if (D3DDevice != null)&#xD;&#xA;                D3DDevice.Dispose();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;        private static Vertex[] BuildVertexData()&#xD;&#xA;        {&#xD;&#xA;            Vertex[] vertexData = new Vertex[6];&#xD;&#xA;&#xD;&#xA;            vertexData[0].Position = new Vector3(-1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[0].Tu = 0.0f;&#xD;&#xA;            vertexData[0].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[1].Position = new Vector3(-1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[1].Tu = 0.0f;&#xD;&#xA;            vertexData[1].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[2].Position = new Vector3(1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[2].Tu = 1.0f;&#xD;&#xA;            vertexData[2].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[3].Position = new Vector3(-1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[3].Tu = 0.0f;&#xD;&#xA;            vertexData[3].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[4].Position = new Vector3(1.0f, -1.0f, 0.0f);&#xD;&#xA;            vertexData[4].Tu = 1.0f;&#xD;&#xA;            vertexData[4].Tv = 1.0f;&#xD;&#xA;&#xD;&#xA;            vertexData[5].Position = new Vector3(1.0f, 1.0f, 0.0f);&#xD;&#xA;            vertexData[5].Tu = 1.0f;&#xD;&#xA;            vertexData[5].Tv = 0.0f;&#xD;&#xA;&#xD;&#xA;            return vertexData;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;    }   &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And my pixel shader and vertex shader code are as following&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Pixel shader input structure&#xD;&#xA;     struct PS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Pixel shader output structure&#xD;&#xA;    struct PS_OUTPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Color   : COLOR0;&#xD;&#xA;     };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Global variables&#xD;&#xA;     sampler2D Tex0;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Name: Simple Pixel Shader&#xD;&#xA;     // Type: Pixel shader&#xD;&#xA;     // Desc: Fetch texture and blend with constant color&#xD;&#xA;     //&#xD;&#xA;     PS_OUTPUT ps_main( in PS_INPUT In )&#xD;&#xA;     {&#xD;&#xA;       PS_OUTPUT Out;                             //create an output pixel&#xD;&#xA;&#xD;&#xA;        Out.Color = tex2D(Tex0, In.Texture);       //do a texture lookup&#xD;&#xA;        &#xD;&#xA;        Out.Color *= float4(0.9f, 0.8f, 0.0f, 1);   //do a simple effect&#xD;&#xA;&#xD;&#xA;        return Out;                              //return output pixel&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     // Vertex shader input structure&#xD;&#xA;     struct VS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Vertex shader output structure&#xD;&#xA;      struct VS_OUTPUT&#xD;&#xA;      {&#xD;&#xA;          float4 Position   : POSITION;&#xD;&#xA;          float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Global variables&#xD;&#xA;      float4x4 WorldViewProj;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Name: Simple Vertex Shader&#xD;&#xA;      // Type: Vertex shader&#xD;&#xA;      // Desc: Vertex transformation and texture coord pass-through&#xD;&#xA;      //&#xD;&#xA;        VS_OUTPUT vs_main( in VS_INPUT In )&#xD;&#xA;      {&#xD;&#xA;         VS_OUTPUT Out;                      //create an output vertex&#xD;&#xA;&#xD;&#xA;         Out.Position = mul(In.Position,&#xD;&#xA;                       WorldViewProj);  //apply vertex transformation&#xD;&#xA;           Out.Texture  = In.Texture;          //copy original texcoords&#xD;&#xA;&#xD;&#xA;         return Out;                         //return output vertex&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I have done the following Chane to my pixel shader where just i am returning a colour but still it is giving me a black output&#xD;&#xA;&#xD;&#xA;    // Pixel shader input structure&#xD;&#xA;      struct PS_INPUT&#xD;&#xA;     {&#xD;&#xA;        float4 Position   : POSITION;&#xD;&#xA;        float2 Texture    : TEXCOORD0;&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // Pixel shader output structure&#xD;&#xA;       struct PS_OUTPUT&#xD;&#xA;       {&#xD;&#xA;             float4 Color   : COLOR0;&#xD;&#xA;         };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        // Global variables&#xD;&#xA;      sampler2D Tex0;&#xD;&#xA;       texture2D FirstTexture : register(t0);  &#xD;&#xA;&#xD;&#xA;       sampler texsmp : register(s0) = sampler_state  &#xD;&#xA;       {  &#xD;&#xA;          Texture   = &lt;FirstTexture&gt;;  &#xD;&#xA;           }; &#xD;&#xA;&#xD;&#xA;             // Name: Simple Pixel Shader&#xD;&#xA;          // Type: Pixel shader&#xD;&#xA;           // Desc: Fetch texture and blend with constant color&#xD;&#xA;           PS_OUTPUT ps_main( in PS_INPUT In )&#xD;&#xA;           {&#xD;&#xA;               PS_OUTPUT Out;                             //create an output pixel&#xD;&#xA;	       Out.Color = float4(1,1,0,1);&#xD;&#xA;	       return Out;&#xD;&#xA;          }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can you please tell me the reason behind this problem" />
  <row Id="31542" PostHistoryTypeId="5" PostId="14061" RevisionGUID="e546bbb9-5096-4c94-abfd-bcd2168c7fe1" CreationDate="2011-06-24T22:32:58.703" UserId="7548" Comment="Changed &quot;physic&quot; (a medical term) to &quot;physical&quot; (as per comments that show this is what was intended by the author)" Text="In my opinion, using completely procedural animation, besides the math and physical complexity, is not a good idea. The problem with procedural generation is that it lacks an artistic intent. &#xD;&#xA;&#xD;&#xA;For texture or terrain generation, this is not so much a problem because you can use custom rendering to stylize your data. But animation is a much more complex thing to process. &#xD;&#xA;&#xD;&#xA;Now to answer your question, some people are using semi-automatic animation, mostly for all physical-related constraints. In the animation engine &quot;Euphoria&quot; ( http://www.naturalmotion.com/euphoria ), they use a ragdoll character, wich tries to stand, and react to any physical impulse it's given. &#xD;&#xA;&#xD;&#xA;Then to make your character hit another one, or swing a sword or an axe, you could use a predefined animation made by an artist, and blend / modify it programatically to aim at this or that. " />
  <row Id="31543" PostHistoryTypeId="24" PostId="14061" RevisionGUID="e546bbb9-5096-4c94-abfd-bcd2168c7fe1" CreationDate="2011-06-24T22:32:58.703" Comment="Proposed by 7548 approved by 51 edit id of 519" />
  <row Id="31544" PostHistoryTypeId="2" PostId="14129" RevisionGUID="4a1b4176-c88d-439c-b829-5732d063a33f" CreationDate="2011-06-24T22:55:22.943" UserId="6203" Text="The simple fact is that every source of music you use for your game has copyright on it, and believe me, you can get lots of problems with those companies. Especially companies like Universal or VEVO can really get you into trouble.&#xD;&#xA;&#xD;&#xA;As said above you can use open-source music and/or soundeffects. Maybe it's a nice thing to buy FruityLoops 9, you can create techno music, and even other cool game music with it: it's not easy but it's worth a try.&#xD;&#xA;&#xD;&#xA;If you really want this music you can ask the producers politely for permission, but then I think you should really buy a license...&#xD;&#xA;&#xD;&#xA;For the last, but not least: I recommend you to not use music from commericials or anything simular to that. The player is thinking of that &quot;maybe sucking commercial&quot; when he/she plays the game." />
  <row Id="31545" PostHistoryTypeId="2" PostId="14130" RevisionGUID="1402158c-fdc8-4f62-af88-fe16c04cdeaf" CreationDate="2011-06-24T23:06:42.123" UserId="2061" Text="@Gajet's answer is impossible to follow (so I'm not even convinced it will work), and what I think @The Communist Duck meant his solution to be...&#xD;&#xA;&#xD;&#xA;    block_y = ground_y + random() % (previousBlock_y + playerJumpHeight)&#xD;&#xA;&#xD;&#xA;...will be heavily biased towards creating blocks with y-values centered around `ground_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;The easiest way to produce more satisfying results would be, rather than generate a height between `ground_y` and `previousBlock_y + playerJumpHeight`, generate a random value between `previousBlock_y - playerJumpHeight` and `previousBlock_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;Of course, since we want to take `ground_y` and `maxBlockHeight` into consideration also, we *really* want to find a random value between `max(ground_y, previousBlock_y - playerJumpHeight)` and `min(maxBlockHeight, previousBlock_y + playerJumpHeight)`.  This will skew our distribution a bit, but not enough to be noticeable.&#xD;&#xA;&#xD;&#xA;The simplest way to do this would be&#xD;&#xA;&#xD;&#xA;    //delta_y is a random number between -/+ playerJumpHeight&#xD;&#xA;    min_y = max(ground_y, previousBlock_y - playerJumpHeight)&#xD;&#xA;    max_y = min(maxBlockHeight, previousBlock_y + playerJumpHeight)&#xD;&#xA;    range_y = max_y - min_y&#xD;&#xA;    block_y = random() % range_y + min_y&#xD;&#xA;&#xD;&#xA;If you then want the block to have a random height as well, just generate a random number between `ground_y` and `block_y` to be the height. " />
  <row Id="31546" PostHistoryTypeId="5" PostId="14130" RevisionGUID="b93ffc48-67e7-4421-bef5-9a3284dae1bc" CreationDate="2011-06-24T23:21:37.460" UserId="2061" Comment="added 44 characters in body" Text="@Gajet's answer is impossible to follow (so I'm not even convinced it will work), and what I think @The Communist Duck meant his solution to be...&#xD;&#xA;&#xD;&#xA;    block_y = ground_y + random() % (previousBlock_y + playerJumpHeight)&#xD;&#xA;&#xD;&#xA;...will be heavily biased towards creating blocks with y-values centered around `ground_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;The easiest way to produce more satisfying results would be, rather than generate a height between `ground_y` and `previousBlock_y + playerJumpHeight`, generate a random value between `previousBlock_y - playerJumpHeight` and `previousBlock_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;Of course, since we want to take `ground_y` and `maxBlockHeight` into consideration also, we *really* want to find a random value between `max(ground_y, previousBlock_y - playerJumpHeight)` and `min(maxBlockHeight, previousBlock_y + playerJumpHeight)`.  This will skew our distribution a bit *(biased towards the center of the screen)*, but not enough to be noticeable.&#xD;&#xA;&#xD;&#xA;The simplest way to do this would be&#xD;&#xA;&#xD;&#xA;    //delta_y is a random number between -/+ playerJumpHeight&#xD;&#xA;    min_y = max(ground_y, previousBlock_y - playerJumpHeight)&#xD;&#xA;    max_y = min(maxBlockHeight, previousBlock_y + playerJumpHeight)&#xD;&#xA;    range_y = max_y - min_y&#xD;&#xA;    block_y = random() % range_y + min_y&#xD;&#xA;&#xD;&#xA;If you then want the block to have a random height as well, just generate a random number between `ground_y` and `block_y` to be the height. " />
  <row Id="31550" PostHistoryTypeId="25" PostId="14115" RevisionGUID="af33f939-1b1c-4c41-b297-ceba1016b8ab" CreationDate="2011-06-25T00:25:04.333" Comment="http://twitter.com/#!/StackGameDev/status/84416783964053504" />
  <row Id="31551" PostHistoryTypeId="2" PostId="14132" RevisionGUID="4be6c8b8-8d59-400f-be8e-779282ceecd7" CreationDate="2011-06-25T00:40:13.017" UserId="37" Text="I've created [Boomstick][1], an NPAPI and ActiveX plugin that grants JavaScript an API to access native Joysticks and Gamepads. Assuming that 2 XBox 360 Wireless Gaming Receivers can each handle 4 controllers, Boomstick will grant HTML5 access to the 8 controllers. This works on all major platforms (Windows, Mac, and Linux) and browsers (Chrome, Firefox, IE).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/STRd6/Boomstick" />
  <row Id="31552" PostHistoryTypeId="5" PostId="10231" RevisionGUID="1ddfdb78-ceb0-45ce-9040-b2c6e89629f1" CreationDate="2011-06-25T01:12:55.790" UserId="5311" Comment="Corrected grammar.  Removed unnecessary bits." Text="Myself and two colleagues are working on making our first indie game for PC and, we decided to use Cocos2D + PyBox2D.  We decided this based on what we've seen of Cocos2D-iPhone games, but I'm not sure if Cocos2D-iPhone is just a port of the Python version with a few more features, or if it's far more advanced than the Python version.&#xD;&#xA; &#xD;&#xA;I just want to be sure that I'm on the right track. (We also want to port our game to Android and iPhone if it is successful on the PC.)&#xD;&#xA;&#xD;&#xA;Note: For the maps we will use Tiled , which is compatible with Cocos2D (both iPhone and Python versions, I think.)" />
  <row Id="31553" PostHistoryTypeId="24" PostId="10231" RevisionGUID="1ddfdb78-ceb0-45ce-9040-b2c6e89629f1" CreationDate="2011-06-25T01:12:55.790" Comment="Proposed by 5311 approved by 189 edit id of 520" />
  <row Id="31554" PostHistoryTypeId="2" PostId="14133" RevisionGUID="824370e2-73f6-4016-be89-8874a0a7aa8c" CreationDate="2011-06-25T01:33:07.360" UserId="2592" Text="I am very new to game development, but not to programming.&#xD;&#xA;&#xD;&#xA;I am (again) playing around with a Pong type game using JavaScript's `canvas` element.&#xD;&#xA;&#xD;&#xA;I have created a `Paddle` object which has the following properties...&#xD;&#xA;&#xD;&#xA;- `width`&#xD;&#xA;- `height`&#xD;&#xA;- `x`&#xD;&#xA;- `y`&#xD;&#xA;- `colour`&#xD;&#xA;&#xD;&#xA;I also have a `Pong` object which has properties such as...&#xD;&#xA;&#xD;&#xA;- `width`&#xD;&#xA;- `height`&#xD;&#xA;- `backgroundColour`&#xD;&#xA;- `draw()`.&#xD;&#xA;&#xD;&#xA;The `draw()` method currently is resetting the `canvas` and that is where a question came up.&#xD;&#xA;&#xD;&#xA;Should the `Paddle` object have a `draw()` method responsible for its drawing, or should the `draw()` of the `Pong` object be responsible for drawing its actors (I assume that is the correct term, please correct me if I'm incorrect).&#xD;&#xA;&#xD;&#xA;I figured that it would be advantagous for the `Paddle` to draw itself, as I instantiate two objects, `Player` and `Enemy`. If it were in the `Pong`'s `draw()`, I'd need to write similar code twice.&#xD;&#xA;&#xD;&#xA;What is the best practice here?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="31555" PostHistoryTypeId="1" PostId="14133" RevisionGUID="824370e2-73f6-4016-be89-8874a0a7aa8c" CreationDate="2011-06-25T01:33:07.360" UserId="2592" Text="Should actors in a game be responsible for drawing themselves?" />
  <row Id="31556" PostHistoryTypeId="3" PostId="14133" RevisionGUID="824370e2-73f6-4016-be89-8874a0a7aa8c" CreationDate="2011-06-25T01:33:07.360" UserId="2592" Text="&lt;rendering&gt;&lt;gameloop&gt;&lt;canvas&gt;" />
  <row Id="31557" PostHistoryTypeId="2" PostId="14134" RevisionGUID="4c0a4166-f969-46c1-a9c5-1e7001aba4f9" CreationDate="2011-06-25T01:35:07.173" UserId="7710" Text="I have a very simple game: 2 players (one human and a computer) and both have 1000 tokens. They must build an army. Depending on the type of soldier, it cost from 10 to 100 token to train one. Eventually I want them to attack the each other.&#xD;&#xA;&#xD;&#xA;What would be the AI to use in that case? Is there any example around that I could learn from?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="31558" PostHistoryTypeId="1" PostId="14134" RevisionGUID="4c0a4166-f969-46c1-a9c5-1e7001aba4f9" CreationDate="2011-06-25T01:35:07.173" UserId="7710" Text="What AI for a resource management + combat?" />
  <row Id="31559" PostHistoryTypeId="3" PostId="14134" RevisionGUID="4c0a4166-f969-46c1-a9c5-1e7001aba4f9" CreationDate="2011-06-25T01:35:07.173" UserId="7710" Text="&lt;ai&gt;" />
  <row Id="31560" PostHistoryTypeId="2" PostId="14135" RevisionGUID="e2903f07-3a39-46d0-af7f-07839763dd08" CreationDate="2011-06-25T01:48:15.597" UserId="6383" Text="If you were to do it in the `Pong`'s draw(), you wouldnt' need to duplicate the code -- simply call the `Paddle`'s draw() function for each of your paddles.&#xD;&#xA;So in your `Pong`'s draw() you'd have&#xD;&#xA;&#xD;&#xA;    humanPaddle.draw();&#xD;&#xA;    compPaddle.draw();" />
  <row Id="31561" PostHistoryTypeId="2" PostId="14136" RevisionGUID="3960af99-76f8-4fb8-a619-23105b1e69af" CreationDate="2011-06-25T02:27:51.080" UserId="1213" Text="In your example you'd want to have the Pong objects implement draw() and render themselves.&#xD;&#xA;&#xD;&#xA;Though you won't notice any significant gains in a project of this size, generally separating game logic and their visual representation (rendering) is a worthwhile activity.&#xD;&#xA;&#xD;&#xA;By this I mean you'd have your game objects that can be update()'d but they have no idea of how they're rendered, they're concerned only with the simulation.&#xD;&#xA;&#xD;&#xA;Then you'd have a PongRenderer() class that has a reference to a Pong object, and it then takes charge of rendering the Pong() class, this could involve rendering the Paddles, or having a PaddleRenderer class to take care of it.&#xD;&#xA;&#xD;&#xA;The separation of concerns in this case is a fairly natural one meaning your classes can be less bloated, and it's easier to modify how things are rendered, it no longer has to follow the hierarchy that your simulation does." />
  <row Id="31562" PostHistoryTypeId="2" PostId="14137" RevisionGUID="81424972-6b61-4a4b-a09f-343537b74c0f" CreationDate="2011-06-25T02:27:57.277" UserId="2111" Text="For this type of game, I'd like to refer you to [a question that I asked before][1]: &#xD;&#xA;&#xD;&#xA;Basically the idea is that you keep a **power score for every unit** owned by a player. This score can be based on the unit's cost, the unit's stats or even a score that you chose arbitrarily for every unit. &#xD;&#xA;&#xD;&#xA;Then you **calculate the power score of each player**, based on the power score of all their units.&#xD;&#xA;&#xD;&#xA;Finally, you **compare the score** of the computer and the human player to make AI decisions.&#xD;&#xA;&#xD;&#xA;For example, a computer with a Hard AI difficulty level could decide to attack only when its power score is 20% above the player's score, or whatever.&#xD;&#xA;&#xD;&#xA;This technique certainly is not the best way to go and won't work with all games, but it sure is simple to implement and it did the trick for my AI demands. I always prefer to try out a simple solution first, and then move on to a more sophisticated one if the first approach looks to stupid or inappropriate.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9635/calculating-the-power-of-a-player-in-a-defend-your-castle-type-game" />
  <row Id="31563" PostHistoryTypeId="2" PostId="14138" RevisionGUID="2a4a9b47-b472-45f9-b252-649c9907a85a" CreationDate="2011-06-25T02:28:48.127" UserId="1430" Text="Having actors draw themselves is not a good design, for two main reasons:&#xD;&#xA;&#xD;&#xA;1) it violates the [single responsibility principle][1], as those actors presumably had another job to do before you shoved render code into them.&#xD;&#xA;&#xD;&#xA;2) it makes extension difficult; if every actor type implements its own drawing, and you need to change the way you draw *in general*, you may have to modify a lot of code. Avoiding overuse of inheritance can alleviate this to some extent, but not completely.&#xD;&#xA;&#xD;&#xA;It's better for your renderer to be handling the drawing. After all, that's what it means to be a renderer. The renderer's draw method should take a &quot;render description&quot; object, which contains everything you need to render a thing. References to (probably shared) geometry data, instance-specific transformations or material properties such as color, et cetera. It then draws that, and doesn't care what that render description is supposed to &quot;be.&quot;&#xD;&#xA;&#xD;&#xA;Your actors can then hold on to a render description they create themselves. Since actors are typically logic processing types, they can push state changes to the render description as needed -- for example, when an actor takes damage it could set the color of its render description to red to indicate this.&#xD;&#xA;&#xD;&#xA;Then you can simply iterate every visible actor, enqeue their render descriptions into the renderer, and let it do its thing (basically; you could generalize this even further).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Single_responsibility_principle" />
  <row Id="31564" PostHistoryTypeId="2" PostId="14139" RevisionGUID="2b76dbd4-354a-45c6-96d7-ec8d535a0384" CreationDate="2011-06-25T02:35:58.297" UserId="5899" Text="I think that the Jesse Emond answer is a very good solution. It's simple and effective, the games purpose is that they look real, and many times this is achieved with simple rules.&#xD;&#xA;&#xD;&#xA;But if you want to complicate more, you can try to investigate in the use of behavior trees. But a data-driven AI system in a plain-text format or a script language as Lua, Scheme or Python can be useful. Age of Empires use scripts to define the AI of the enemies that can be modified by the players. A sample:&#xD;&#xA;&#xD;&#xA;    (defrule&#xD;&#xA;    (or&#xD;&#xA;        (goal TRAIN_UNIT TRUE)&#xD;&#xA;        (goal NEED_MANGONEL TRUE)&#xD;&#xA;    )&#xD;&#xA;    (soldier-count &gt;= POPULATION-5)&#xD;&#xA;    (can-train-with-escrow mangonel-line)&#xD;&#xA;    =&gt;&#xD;&#xA;    (chat-local-to-self &quot;train mangonel:Anti Scorpion&quot;)&#xD;&#xA;    (release-escrow wood)&#xD;&#xA;    (release-escrow gold)&#xD;&#xA;    (train mangonel-line)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- This is an example of a behavior tree template syntax for C++. &#xD;&#xA;http://aigamedev.com/open/articles/type-safe-tree-builder/&#xD;&#xA;&#xD;&#xA;- An overview of a data-driven framework&#xD;&#xA;http://www.gamasutra.com/view/feature/1862/creating_all_humans_a_datadriven_.php&#xD;&#xA;" />
  <row Id="31565" PostHistoryTypeId="5" PostId="14139" RevisionGUID="bf424916-af4c-4b8c-a752-ff64234c200e" CreationDate="2011-06-25T02:45:04.657" UserId="5899" Comment="added 7 characters in body" Text="I think that the Jesse Emond answer is a very good solution. It's simple and effective, the games purpose is that they look real, and many times this is achieved with simple rules.&#xD;&#xA;&#xD;&#xA;But if you want to complicate more, you can try to investigate in the use of behavior trees. The use of a data-driven AI system in a plain-text format or a script language as Lua, Scheme or Python can be useful. Age of Empires use scripts to define the AI of the enemies that can be modified by the players. A sample:&#xD;&#xA;&#xD;&#xA;    (defrule&#xD;&#xA;    (or&#xD;&#xA;        (goal TRAIN_UNIT TRUE)&#xD;&#xA;        (goal NEED_MANGONEL TRUE)&#xD;&#xA;    )&#xD;&#xA;    (soldier-count &gt;= POPULATION-5)&#xD;&#xA;    (can-train-with-escrow mangonel-line)&#xD;&#xA;    =&gt;&#xD;&#xA;    (chat-local-to-self &quot;train mangonel:Anti Scorpion&quot;)&#xD;&#xA;    (release-escrow wood)&#xD;&#xA;    (release-escrow gold)&#xD;&#xA;    (train mangonel-line)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- This is an example of a behavior tree template syntax for C++. &#xD;&#xA;http://aigamedev.com/open/articles/type-safe-tree-builder/&#xD;&#xA;&#xD;&#xA;- An overview of a data-driven framework&#xD;&#xA;http://www.gamasutra.com/view/feature/1862/creating_all_humans_a_datadriven_.php&#xD;&#xA;" />
  <row Id="31566" PostHistoryTypeId="17" PostId="14140" RevisionGUID="4021d2f8-36a2-4ba4-a58d-a97a90b416fe" CreationDate="2011-06-25T03:11:58.440" UserId="-1" Comment="from http://stackoverflow.com/questions/6474683/where-to-look-for-good-2d-c-opengl-game-engine-architecture" Text="" />
  <row Id="31567" PostHistoryTypeId="2" PostId="14140" RevisionGUID="2564d25f-f3f9-495d-83f0-26e2e903bc8f" CreationDate="2011-06-24T23:20:30.600" UserDisplayName="iDev" Text="I'm writing own game engine and want to look how other peoples implement game engine architecture. So any advices about well architected engines (even paid ones) are welcome." />
  <row Id="31568" PostHistoryTypeId="1" PostId="14140" RevisionGUID="2564d25f-f3f9-495d-83f0-26e2e903bc8f" CreationDate="2011-06-24T23:20:30.600" UserDisplayName="iDev" Text="Where to look for good 2d c++ opengl game engine architecture?" />
  <row Id="31569" PostHistoryTypeId="3" PostId="14140" RevisionGUID="2564d25f-f3f9-495d-83f0-26e2e903bc8f" CreationDate="2011-06-24T23:20:30.600" UserDisplayName="iDev" Text="&lt;c++&gt;&lt;opengl&gt;&lt;2d&gt;&lt;engine&gt;" />
  <row Id="31570" PostHistoryTypeId="12" PostId="14140" RevisionGUID="46dbe391-71c7-40d1-b9e0-118ff4364c16" CreationDate="2011-06-25T03:16:21.307" UserId="1982" Text="[{&quot;Id&quot;:1982,&quot;DisplayName&quot;:&quot;Rebecca Chernoff&quot;}]" />
  <row Id="31571" PostHistoryTypeId="13" PostId="14140" RevisionGUID="1d602d96-b00f-4201-b91e-4a56db68d907" CreationDate="2011-06-25T03:17:20.870" UserId="1982" Text="[{&quot;Id&quot;:1982,&quot;DisplayName&quot;:&quot;Rebecca Chernoff&quot;}]" />
  <row Id="31572" PostHistoryTypeId="25" PostId="14134" RevisionGUID="50053407-331b-42a5-b59b-26f39cddbc18" CreationDate="2011-06-25T03:25:05.417" Comment="http://twitter.com/#!/StackGameDev/status/84462083822985216" />
  <row Id="31573" PostHistoryTypeId="2" PostId="14141" RevisionGUID="98d298a5-fc3a-4aa0-ba1c-8683ef8f3285" CreationDate="2011-06-25T05:21:06.193" UserId="8065" Text="The two engines (with available source) that I feel stand out in terms of C++ architecture are [SFML][1] and [Ogre3D][2]. Ogre3D is considered by many to be one of the best examples of object-oriented design, though it is a massive engine and therefore takes some effort to learn. SFML has a similar design, but is considerably smaller and geared specifically towards 2D, and you may find it more useful for the time being. Granted, neither is a full-fledged &quot;game engine&quot;, but it is an excellent start.&#xD;&#xA;&#xD;&#xA;Suggestions aside, I'd say take a look at lots of engines, whatever you can get your hands on. Not a one is perfect, and studying a wide variety can help you figure out what you like and what you don't like about each one, which in turn will help you design your engine to best suit your own needs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/&#xD;&#xA;  [2]: http://www.ogre3d.org/" />
  <row Id="31574" PostHistoryTypeId="25" PostId="14133" RevisionGUID="56e378ec-4a02-4ffe-bbc3-19d63604f967" CreationDate="2011-06-25T06:25:06.517" Comment="http://twitter.com/#!/StackGameDev/status/84507386836037632" />
  <row Id="31578" PostHistoryTypeId="5" PostId="14133" RevisionGUID="879e0901-b58f-495f-b30b-534b96318046" CreationDate="2011-06-25T07:30:46.487" UserId="2592" Comment="added 4 characters in body" Text="I am very new to game development, but not to programming.&#xD;&#xA;&#xD;&#xA;I am (again) playing around with a Pong type game using JavaScript's `canvas` element.&#xD;&#xA;&#xD;&#xA;I have created a `Paddle` object which has the following properties...&#xD;&#xA;&#xD;&#xA;- `width`&#xD;&#xA;- `height`&#xD;&#xA;- `x`&#xD;&#xA;- `y`&#xD;&#xA;- `colour`&#xD;&#xA;&#xD;&#xA;I also have a `Pong` object which has properties such as...&#xD;&#xA;&#xD;&#xA;- `width`&#xD;&#xA;- `height`&#xD;&#xA;- `backgroundColour`&#xD;&#xA;- `draw()`.&#xD;&#xA;&#xD;&#xA;The `draw()` method currently is resetting the `canvas` and that is where a question came up.&#xD;&#xA;&#xD;&#xA;Should the `Paddle` object have a `draw()` method responsible for its drawing, or should the `draw()` of the `Pong` object be responsible for drawing its actors (I assume that is the correct term, please correct me if I'm incorrect).&#xD;&#xA;&#xD;&#xA;I figured that it would be advantagous for the `Paddle` to draw itself, as I instantiate two objects, `Player` and `Enemy`. If it were not in the `Pong`'s `draw()`, I'd need to write similar code twice.&#xD;&#xA;&#xD;&#xA;What is the best practice here?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="31580" PostHistoryTypeId="5" PostId="14098" RevisionGUID="898fee6c-dd78-4f99-9868-95634d32135b" CreationDate="2011-06-25T08:10:40.773" UserId="7946" Comment="tmv asked me something in the comments, and my response was too long for the comments." Text="Animation can still perfectly be split between logic and rendering. The abstract data state of animation would be the information that is necessary for your graphics API to render the animation. &#xD;&#xA;&#xD;&#xA;In 2D games for example,that could be a rectangle area which marks the area that displays the current part of your sprite sheet that needs to be drawn (when you have a sheet consisting of lets say 30 80x80 drawings containing the various steps of your character jumping, sitting down, moving etc.). It can also be any kind of data that you don't need for rendering, but maybe for managing the animation states themselves, like the time left until the current animation step expires or the name of the animation (&quot;walking&quot;,&quot;standing&quot; etc.) All of that can be represented any way you want. That's the logics part.&#xD;&#xA;&#xD;&#xA;In the rendering part, you just do it as usual, get that rectangle from your model and use your renderer to actually do the calls to the graphics API.&#xD;&#xA;&#xD;&#xA;In code (using C++ syntax here):&#xD;&#xA;&#xD;&#xA;    class Sprite //Model&#xD;&#xA;    {&#xD;&#xA;        private:&#xD;&#xA;           Rectangle subrect;&#xD;&#xA;           Vector2f position;&#xD;&#xA;           //etc.&#xD;&#xA;        &#xD;&#xA;        public:&#xD;&#xA;           Rectangle GetSubrect() &#xD;&#xA;           {&#xD;&#xA;               return subrect;&#xD;&#xA;           }&#xD;&#xA;           //etc.&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class AnimatedSprite : public Sprite, public Updatable //arbitrary interface for classes that need to change their state on a regular basis&#xD;&#xA;    {&#xD;&#xA;        AnimationController animation_controller;&#xD;&#xA;        //etc.&#xD;&#xA;        public:&#xD;&#xA;            void Update()&#xD;&#xA;            {&#xD;&#xA;                animation_controller.Update(); //Good OOP design ;) It will take control of changing animations in time etc. for you&#xD;&#xA;                this.SetSubrect(animation_controller.GetCurrentAnimation().GetRect());&#xD;&#xA;            }&#xD;&#xA;            //etc.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;That's the data. Your renderer will take that data and draw it. Since both normal Sprites and animated ones are drawn the same way, you can use polymorphy here!&#xD;&#xA;&#xD;&#xA;    class Renderer&#xD;&#xA;    {&#xD;&#xA;        //etc.&#xD;&#xA;        public:&#xD;&#xA;           void Draw(const Sprite &amp;spr)&#xD;&#xA;           {&#xD;&#xA;               graphics_api_pointer-&gt;Draw(spr.GetAllTheDataThatINeed());&#xD;&#xA;           }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;TMV:&#xD;&#xA;&gt; I came up with another example. Say&#xD;&#xA;&gt; you have an RPG. Your model that&#xD;&#xA;&gt; represents the world map, for example,&#xD;&#xA;&gt; would probably need to store the&#xD;&#xA;&gt; character's position in the world as&#xD;&#xA;&gt; tile coordinates on the map. However,&#xD;&#xA;&gt; when you move the character, they walk&#xD;&#xA;&gt; a few pixels at a time to the next&#xD;&#xA;&gt; square. Do you store this &quot;between&#xD;&#xA;&gt; tiles&quot; position in an animation&#xD;&#xA;&gt; object? How do you update the model&#xD;&#xA;&gt; when the character has finally&#xD;&#xA;&gt; &quot;arrived&quot; at the next tile coordinate&#xD;&#xA;&gt; on the map?&#xD;&#xA;&#xD;&#xA;The world map doesn't know about the players position directly (it doesn't have a Vector2f or something like that which directly stores the players position=, instead it has a direct reference to the player object itself, which in turn derives from AnimatedSprite so you can pass it to the renderer easily, and gets all necessary data from it. &#xD;&#xA;&#xD;&#xA;In general though, your tilemap shouldn't be able to do just everything - I'd have a class &quot;TileMap&quot; which takes care of managing all the tiles, and maybe it also does collision detection between objects that I hand over to it and the tiles on the map. Then, I'd have another &quot;RPGMap&quot; class, or however you'd like to call it, which has both a reference to your tilemap and the reference to the player and makes the actual Update() calls to your player and to your tilemap.&#xD;&#xA;&#xD;&#xA;How you want to update the model when the player moves depends on what you want to do.&#xD;&#xA;&#xD;&#xA;Is your player allowed to move in between tiles independently (Zelda style)? Simply handle the input and move the player accordingly every frame. Or do you want the player to press &quot;right&quot; and your character automatically moves one tile to the right? Let your RPGMap class interpolate the players position until he arrives at his destination and meanwhile lock all the movement-key input handling.&#xD;&#xA;&#xD;&#xA;Either way, if you want to make it easier on yourself, all of your models will have Update() methods if they actually need some logic to update themselves (instead of just changing values of variables) - You don't give away the controller in the MVC pattern that way, you just move the code from &quot;one step above&quot; (the controller) down to the model, and all the controller does is call this Update() method of the model (The controller in our case would be the RPGMap). You can still easily swap out the logics code - you can just directly change the code of the class or if you need completely different behaviour, you can just derive from your model class and only override the Update() method. &#xD;&#xA;&#xD;&#xA;That approach reduces method calls and things like that a lot - which used to be one of the main disadvantages of the pure MVC pattern (you end up calling GetThis() GetThat() very very often) - it makes the code both longer and a tiny bit harder to read and also slower - even though that might be taken care of by your compiler who optimizes a lot of stuff like that." />
  <row Id="31581" PostHistoryTypeId="2" PostId="14144" RevisionGUID="2878be18-c9fc-4250-b092-91a2ba76e48a" CreationDate="2011-06-25T08:34:01.113" UserId="1839" Text="It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the w component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is still the same as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for your points and vectors.&#xD;&#xA;&#xD;&#xA;If you use the vector registers of a modern CPUs (SSE, Altivec, SPUs etc) you have to pass 4x 32 bit floats anyway (its 128 bit registers) plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space anyway." />
  <row Id="31582" PostHistoryTypeId="5" PostId="14144" RevisionGUID="094efa04-883d-4aef-9f0f-c50f124ddfe1" CreationDate="2011-06-25T08:46:04.737" UserId="1839" Comment="deleted 5 characters in body" Text="It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the w component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is still the same as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;If you use the vector registers of a modern CPUs (SSE, Altivec, SPUs etc) you have to pass 4x 32 bit floats anyway (its 128 bit registers) plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space anyway." />
  <row Id="31583" PostHistoryTypeId="5" PostId="14144" RevisionGUID="46983e74-98a2-490d-81c2-15cd66627e33" CreationDate="2011-06-25T09:06:09.430" UserId="1839" Comment="added 27 characters in body; deleted 4 characters in body" Text="It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the w component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is still the same as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space for the 4th component anyway." />
  <row Id="31584" PostHistoryTypeId="5" PostId="14144" RevisionGUID="7b409a88-e8fe-4f9b-9dd9-c06953c553fe" CreationDate="2011-06-25T09:12:25.447" UserId="1839" Comment="added 390 characters in body; added 9 characters in body; deleted 10 characters in body" Text="In order to understand what the 4th component is for, the following part of the matrix-vector multiplication must be highlighted (in contrast to your code example):&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;        a._14, a._24 and a._34 is the translation part of the affine matrix.&#xD;&#xA;&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the w component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is still the same as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space for the 4th component anyway." />
  <row Id="31585" PostHistoryTypeId="5" PostId="14144" RevisionGUID="43ace75c-98ae-4e9f-8b3f-0654c02b5c5f" CreationDate="2011-06-25T09:19:34.287" UserId="1839" Comment="deleted 35 characters in body; added 10 characters in body" Text="In order to understand what the 4th component is for, the following part of the matrix-vector multiplication must be highlighted:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;        a._14, a._24 and a._34 is the translation part of the affine matrix.&#xD;&#xA;&#xD;&#xA;Moreover, it is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the w component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is still the same as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space for the 4th component anyway." />
  <row Id="31586" PostHistoryTypeId="25" PostId="14104" RevisionGUID="d0c6c182-0017-4062-b260-a3a1296815ad" CreationDate="2011-06-25T09:25:07.023" Comment="http://twitter.com/#!/StackGameDev/status/84552687382831104" />
  <row Id="31587" PostHistoryTypeId="5" PostId="14144" RevisionGUID="7eae4503-85b3-43ae-8679-d8744e8cc1df" CreationDate="2011-06-25T09:29:16.337" UserId="1839" Comment="added 25 characters in body; deleted 5 characters in body" Text="It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the w component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translation part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space for the 4th component anyway." />
  <row Id="31588" PostHistoryTypeId="5" PostId="14144" RevisionGUID="56f3660b-a14f-43bd-bc08-270176bd5daf" CreationDate="2011-06-25T09:37:00.620" UserId="1839" Comment="edited body; added 6 characters in body" Text="It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment 16 or 128 bytes. So you don't have the chance to safe the space for the 4th component anyway." />
  <row Id="31589" PostHistoryTypeId="17" PostId="14145" RevisionGUID="8ad662cf-4405-4a0a-b99b-64195152d8bc" CreationDate="2011-06-25T10:36:03.270" UserId="-1" Comment="from http://stackoverflow.com/questions/6467155/about-alpha-blending-sprites-in-direct3d9" Text="" />
  <row Id="31590" PostHistoryTypeId="17" PostId="14146" RevisionGUID="bc0b2d48-aa7c-4bcd-ba4f-eac14d48cfb5" CreationDate="2011-06-25T10:36:03.270" UserId="-1" Comment="from http://stackoverflow.com/questions/6467155/about-alpha-blending-sprites-in-direct3d9" Text="" />
  <row Id="31591" PostHistoryTypeId="2" PostId="14146" RevisionGUID="141e4eda-d3c1-4134-99ce-3b620fbc8cf8" CreationDate="2011-06-24T14:34:53.800" UserDisplayName="Aaldert" Text="You can use D3DRS_SEPARATEALPHABLENDENABLE render state to control the blend outcome in the alpha channel of the destination.&#xD;&#xA;&#xD;&#xA;    SetRenderState (D3DRS_SEPARATEALPHABLENDENABLE, TRUE); &#xD;&#xA;    SetRenderState (D3DRS_SRCBLENDALPHA, D3DBLEND_ZERO);&#xD;&#xA;    SetRenderState (D3DRS_DESTBLENDALPHA, D3DBLEND_ONE);&#xD;&#xA;&#xD;&#xA;Provided that your texture was filled with a fully opaque color to begin with; this should leave the alpha channel alone." />
  <row Id="31592" PostHistoryTypeId="2" PostId="14145" RevisionGUID="c676c144-7c8c-4263-812e-2f6d04c2a3e6" CreationDate="2011-06-24T11:33:25.330" UserDisplayName="ambrozija" Text="I have a Direct3D9 application that is rendering ID3DXSprites. The problem I am experiencing is best described in this situation:&#xD;&#xA;&#xD;&#xA;I have a texture that is totally opaque.&#xD;&#xA;On top of it I draw a rectangle filled with solid color and alpha of 128.&#xD;&#xA;On top of the rectangle I have a text that is totally opaque.&#xD;&#xA;I draw all of this and get the resulting image through GetRenderTarget call.&#xD;&#xA;The problem is that on the resulting image, on the area where the transparent rectangle is, I have semi transparent pixels. It is not a problem that the rectangle is transparent, the problem is that the resulting image is.&#xD;&#xA;&#xD;&#xA;The question is how to setup the blending so in this situation I don't get the transparent pixels in the resulting image?&#xD;&#xA;&#xD;&#xA;I use the sprite with D3DXSPRITE_ALPHABLEND which sets the device state to D3DBLEND_SRCALPHA and D3DBLEND_INVSRCALPHA. I tried couple of combinations of SetRenderState, like D3DBLEND_SRCALPHA, D3DBLEND_DESTALPHA etc., but couldn't make it work.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="31593" PostHistoryTypeId="1" PostId="14145" RevisionGUID="c676c144-7c8c-4263-812e-2f6d04c2a3e6" CreationDate="2011-06-24T11:33:25.330" UserDisplayName="ambrozija" Text="About Alpha blending sprites in Direct3D9" />
  <row Id="31594" PostHistoryTypeId="3" PostId="14145" RevisionGUID="c676c144-7c8c-4263-812e-2f6d04c2a3e6" CreationDate="2011-06-24T11:33:25.330" UserDisplayName="ambrozija" Text="&lt;c++&gt;&lt;directx9&gt;" />
  <row Id="31595" PostHistoryTypeId="17" PostId="14147" RevisionGUID="84ec7869-f7c5-482b-83b3-c937771e175d" CreationDate="2011-06-25T10:51:42.563" UserId="-1" Comment="from http://stackoverflow.com/questions/6430662/loading-3d-model-data-into-buffers" Text="" />
  <row Id="31596" PostHistoryTypeId="17" PostId="14148" RevisionGUID="9030afa0-eba6-4f15-b86f-e7703dbef81b" CreationDate="2011-06-25T10:51:42.563" UserId="-1" Comment="from http://stackoverflow.com/questions/6430662/loading-3d-model-data-into-buffers" Text="" />
  <row Id="31597" PostHistoryTypeId="17" PostId="14149" RevisionGUID="d8734504-507e-4103-8047-754c3abee2f0" CreationDate="2011-06-25T10:51:42.563" UserId="-1" Comment="from http://stackoverflow.com/questions/6430662/loading-3d-model-data-into-buffers" Text="" />
  <row Id="31598" PostHistoryTypeId="2" PostId="14148" RevisionGUID="f7655d38-613e-48d7-9abb-d71f1cedf578" CreationDate="2011-06-21T19:35:19.600" UserDisplayName="dario_ramos" Text="Most games nowadays use a vertex buffer for each mesh. It's true that having a single vertex buffer for the whole model reduces the number of draw calls, which is more efficient, but it tends to make your design more complex.&#xD;&#xA;[Here's a discussion about this][1]&#xD;&#xA;&#xD;&#xA;By the way, you might get better answers at GameDev.net (about this kind of stuff, that is)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/topic/599024-vertex-buffers-draw-calls-and-batching/" />
  <row Id="31599" PostHistoryTypeId="2" PostId="14149" RevisionGUID="1b76fd50-f249-46e9-95d5-6900fcb13954" CreationDate="2011-06-21T21:20:52.827" UserDisplayName="Coincoin" Text="Having all your data in the same vertex buffer lets you batch all those objects in a single draw call, as long as they have the same render states.&#xD;&#xA;&#xD;&#xA;The game would have to be draw call bound for that technique to give you any performance gain and this won't happen before having thousands of calls per seconds on modern hardware.&#xD;&#xA;&#xD;&#xA;Batching introduces a lot of complexity to your engine and will force you to defer most rendering, which will introduce some performance penalities.&#xD;&#xA;&#xD;&#xA;Conclusion, don't mess with that until strictly necessary, that is, you profiled your game and it is clearly draw call bound." />
  <row Id="31600" PostHistoryTypeId="2" PostId="14147" RevisionGUID="a9afb16f-07e0-436f-bb73-c712fae58cc2" CreationDate="2011-06-21T19:07:53.293" UserDisplayName="mulletdevil" Text="I am using assimp to load 3d model data. I have noticed that each loaded model is made up of different meshes. I was wondering should each mesh have it's own vertex/index buffer or should there just be one for the whole model? From looking through the index data that is loaded it seems to suggest that I will need a vertex buffer per mesh but I'm not 100% sure.&#xD;&#xA;I am using C++ and DirectX9&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;&#xD;&#xA;Mark" />
  <row Id="31601" PostHistoryTypeId="1" PostId="14147" RevisionGUID="a9afb16f-07e0-436f-bb73-c712fae58cc2" CreationDate="2011-06-21T19:07:53.293" UserDisplayName="mulletdevil" Text="loading 3d model data into buffers" />
  <row Id="31602" PostHistoryTypeId="3" PostId="14147" RevisionGUID="a9afb16f-07e0-436f-bb73-c712fae58cc2" CreationDate="2011-06-21T19:07:53.293" UserDisplayName="mulletdevil" Text="&lt;c++&gt;&lt;models&gt;&lt;3d&gt;&lt;directx&gt;" />
  <row Id="31603" PostHistoryTypeId="2" PostId="14150" RevisionGUID="30ac5390-785f-48c7-ad1d-6afac19d9784" CreationDate="2011-06-25T11:03:45.140" UserId="3867" Text="Programming generally involves thought processes located in the left-hemisphere of the brain that handle logic, linear sequencing, and predictability. Drawing utilizes thought processes dealing with space, patterns (visual or otherwise), shapes, color, etc located in the right.&#xD;&#xA;&#xD;&#xA;You probably got some instruction on the thought processes required to create a program. You will probably need some instruction on the the same for creating artwork.&#xD;&#xA;&#xD;&#xA;I recommend first [Drawing on the Right Side of the Brain][1] by Betty Edwards to learn what the thought processes used by artists are; how they work; and importantly, how they *feels*. If you ever recognize being in the *flow* where your ability to code just continues effortlessly you have a sense of the way thinking can feel. The spatial and coordination thought processes required for drawing are not often used by programmers who develop using typical conventional practices and languages, and you can feel the difference when they're employed.&#xD;&#xA;&#xD;&#xA;The second text I recommend is Kimon Nicolaides' [The Natural Way to Draw][2]. Different drawing techniques, exercises and intents will also help develop your innate ability to draw. And everyone has the ability to draw *well* once they understand how to draw.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/New-Drawing-Right-Side-Brain/dp/0874774195/ref=sr_1_2?ie=UTF8&amp;qid=1308998613&amp;sr=8-2&#xD;&#xA;  [2]: http://www.amazon.com/Natural-Way-Draw-Working-Study/dp/0395530075/ref=sr_1_1?ie=UTF8&amp;qid=1308999422&amp;sr=8-1" />
  <row Id="31604" PostHistoryTypeId="5" PostId="11023" RevisionGUID="b9d0554c-15d6-4409-bee3-10c98af92142" CreationDate="2011-06-25T11:17:33.043" UserId="450" Comment="added 19 characters in body" Text="Flash is a lot more than ECMAScript. Although there were attempts to introduce some features of ActionScript into ECMAScript version 4, those were abandoned.&#xD;&#xA;&#xD;&#xA;JavaScript only got usable for most type of games very recently. JavaScript in [HTML5][1] nowadays offers:&#xD;&#xA;&#xD;&#xA;- performance gains dune to compilation into native code&#xD;&#xA;- 2D and 3D canvas&#xD;&#xA;- native Video And Audio support&#xD;&#xA;&#xD;&#xA;But those things are provided by flash for a decade.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/HTML5" />
  <row Id="31606" PostHistoryTypeId="2" PostId="14152" RevisionGUID="165c8c0f-f6da-4eb4-9caa-05deeb072ecf" CreationDate="2011-06-25T12:04:34.323" UserId="8245" Text="I just want to ask the question above ^. I want to learn C++ language. Someday i want to develop Game Application in c++ and I think it is so difficult for me to achieve that but im willing to learn and achieve that goals for may personal satisfaction and also for my CV as well. Can you give me a guidelines on how to achieve that goals? What are the languages that i need to learn together with c++? please help me.. Thank you!" />
  <row Id="31607" PostHistoryTypeId="1" PostId="14152" RevisionGUID="165c8c0f-f6da-4eb4-9caa-05deeb072ecf" CreationDate="2011-06-25T12:04:34.323" UserId="8245" Text="What are the things to know before to start Game Development Using C++?" />
  <row Id="31608" PostHistoryTypeId="3" PostId="14152" RevisionGUID="165c8c0f-f6da-4eb4-9caa-05deeb072ecf" CreationDate="2011-06-25T12:04:34.323" UserId="8245" Text="&lt;c++&gt;" />
  <row Id="31610" PostHistoryTypeId="5" PostId="14144" RevisionGUID="dca3e74a-31f2-43ba-a6ef-c7fb2565b203" CreationDate="2011-06-25T12:52:13.330" UserId="1839" Comment="added 2 characters in body" Text="It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway." />
  <row Id="31614" PostHistoryTypeId="2" PostId="14154" RevisionGUID="50280933-4908-43f2-9d7f-72a98b95f88b" CreationDate="2011-06-25T13:47:19.040" UserId="5899" Text="I recommend you try to replicate a basic 2d game with libraries like [SDL][1] or [SFML][2].  For example, tetris, arkanoid. These libraries have many tutorials and manuals to do basic ( and less basic ) things. The best form to learn program games is to program games.&#xD;&#xA;&#xD;&#xA;I think that c++ is a good language to begin because is not very high level like Java, or Python that abstract some concepts like memory management.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.libsdl.org/&#xD;&#xA;  [2]: http://www.sfml-dev.org/" />
  <row Id="31615" PostHistoryTypeId="2" PostId="14155" RevisionGUID="78254d83-1f1b-408d-b9b3-26e112abd15d" CreationDate="2011-06-25T14:11:08.280" UserId="8247" Text="I have a 3D game world on an iPhone (limited graphics speed), and I'm already regulating whether I draw each shape on the screen based on it's size and distance from the camera. Something like...&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks_from_the_camera &gt; constant) then draw&#xD;&#xA;&#xD;&#xA;What I want to do now is also take into account how many shapes are being drawn, so that in busier areas of the game world I can draw less than I otherwise would.&#xD;&#xA;&#xD;&#xA;I tried to do this by dividing how_big_it_looks by the number of shapes that were drawn last frame (well, the square root of this but I'm simplifying - the problem is the same).&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks / shapes_drawn &gt; constant2) then draw&#xD;&#xA;&#xD;&#xA;But the check happens at the level of objects which represent many drawn shapes, and if an object containing many shapes is switched on, it increases shapes_drawn lots and switches itself back off the next frame. It flickers on and off.&#xD;&#xA;&#xD;&#xA;I tried keeping a kind of weighted average of previous values, by each frame doing something like ` shapes_drawn_recently = 0.9 * shapes_drawn_recently + 0.1 * shapes_just_drawn`, but of course it only slows the flickering down because of the nature of the feedback loop.&#xD;&#xA;&#xD;&#xA;Is there a good way of solving this?&#xD;&#xA;&#xD;&#xA;My project is in Objective-C, but a general algorithm or pseudo-code is good too.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="31616" PostHistoryTypeId="1" PostId="14155" RevisionGUID="78254d83-1f1b-408d-b9b3-26e112abd15d" CreationDate="2011-06-25T14:11:08.280" UserId="8247" Text="Regulating how much to draw based on how much was drawn last frame." />
  <row Id="31617" PostHistoryTypeId="3" PostId="14155" RevisionGUID="78254d83-1f1b-408d-b9b3-26e112abd15d" CreationDate="2011-06-25T14:11:08.280" UserId="8247" Text="&lt;3d&gt;&lt;math&gt;&lt;algorithm&gt;&lt;animation&gt;&lt;performance&gt;" />
  <row Id="31618" PostHistoryTypeId="2" PostId="14156" RevisionGUID="e9b55205-129b-4fa4-b58b-702740b70358" CreationDate="2011-06-25T14:24:45.403" UserId="4662" Text="That's what Z buffering is for. Once you cull outside your frustum, and apply LoD to further-away objects, then you draw closest first. This will ensure that the graphics hardware can easily reject pixels that it doesn't need to draw.&#xD;&#xA;&#xD;&#xA;Ultimately, if the shapes are part of your scene, then you can't not draw them and still get a correct image. You may try decomposing the resulting frames and see how many you actually needed." />
  <row Id="31619" PostHistoryTypeId="2" PostId="14157" RevisionGUID="c14c5759-a1bf-4536-866e-a0c561a1b52e" CreationDate="2011-06-25T14:26:26.430" UserId="8248" Text="I want to implement something like this to create a heightmap: 'Place a group of coordinates evenly across a map, and give them height values within a certain range. Repeatedly create coordinates between all of those coordinates, setting their height by deriving a value that was a mean value of all the surrounding coordinates.'&#xD;&#xA;&#xD;&#xA;However, I'm not sure how I would go about it - I'm not sure how I could code the part where I place the coordinates in between the existing coordinates. Can anyone give any help/advice?" />
  <row Id="31620" PostHistoryTypeId="1" PostId="14157" RevisionGUID="c14c5759-a1bf-4536-866e-a0c561a1b52e" CreationDate="2011-06-25T14:26:26.430" UserId="8248" Text="Heightmap generation" />
  <row Id="31621" PostHistoryTypeId="3" PostId="14157" RevisionGUID="c14c5759-a1bf-4536-866e-a0c561a1b52e" CreationDate="2011-06-25T14:26:26.430" UserId="8248" Text="&lt;maps&gt;&lt;procedural-generation&gt;&lt;heightmap&gt;" />
  <row Id="31622" PostHistoryTypeId="2" PostId="14158" RevisionGUID="df24f22c-1752-4308-8b14-1ec996737fac" CreationDate="2011-06-25T15:22:25.547" UserId="8249" Text="I've always wondered to what extent object orientation is used by videogames, especially huge 3D projects.&#xD;&#xA;I reckon it would be cool that both `troll` and `werewolf` inherited its attributes from `enemy` and overwrote some of them. But maybe classes are too heavy to be practical, I don't know..." />
  <row Id="31623" PostHistoryTypeId="1" PostId="14158" RevisionGUID="df24f22c-1752-4308-8b14-1ec996737fac" CreationDate="2011-06-25T15:22:25.547" UserId="8249" Text="How object-oriented are videogames?" />
  <row Id="31624" PostHistoryTypeId="3" PostId="14158" RevisionGUID="df24f22c-1752-4308-8b14-1ec996737fac" CreationDate="2011-06-25T15:22:25.547" UserId="8249" Text="&lt;objects&gt;" />
  <row Id="31625" PostHistoryTypeId="25" PostId="14152" RevisionGUID="92d8ac6f-a729-4e40-a048-66baa7965680" CreationDate="2011-06-25T15:25:14.267" Comment="http://twitter.com/#!/StackGameDev/status/84643314783092736" />
  <row Id="31626" PostHistoryTypeId="2" PostId="14159" RevisionGUID="e79d3620-9e89-4ea1-b309-c09303326c1a" CreationDate="2011-06-25T15:29:39.357" UserId="4662" Text="Classes do not involve any run-time overhead. Run-time polymorphism is just calling through a function pointer. These overheads are exceedingly minimal compared to other costs like Draw calls, concurrency synchronization, disk I/O, kernel mode switches, poor memory locality, over-use of dynamic memory allocation, poor choice of algorithms, use of scripting languages, and the list goes on. There's a reason that object orientation has essentially supplanted what came before it, and it's because it's much better." />
  <row Id="31634" PostHistoryTypeId="2" PostId="14160" RevisionGUID="217d49c6-4766-409e-aea7-32bd9ede79a8" CreationDate="2011-06-25T15:57:48.147" UserId="4662" Text="The output from the pixel shader in Direct3D is four floats, normalized 0-1 for each channel (RGBA). But what happens if these floats haven't been normalized correctly and are above 1?" />
  <row Id="31635" PostHistoryTypeId="1" PostId="14160" RevisionGUID="217d49c6-4766-409e-aea7-32bd9ede79a8" CreationDate="2011-06-25T15:57:48.147" UserId="4662" Text="Outputting wrong colours from pixel shader in Direct3D" />
  <row Id="31636" PostHistoryTypeId="3" PostId="14160" RevisionGUID="217d49c6-4766-409e-aea7-32bd9ede79a8" CreationDate="2011-06-25T15:57:48.147" UserId="4662" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="31637" PostHistoryTypeId="2" PostId="14161" RevisionGUID="5d54c1f5-f5fa-4530-8ef5-d5c7b0614140" CreationDate="2011-06-25T16:09:59.057" UserId="8240" Text="First, let's make sure we're on the same page here. If you're looking for something to let you render in 2D, I consider that separate from a 2D *game engine*.&#xD;&#xA;&#xD;&#xA;A 2D game engine provides more than just low-level commands. It provides a place to hook AI behavior. It provides real structure that you can build on. So I'm going to talk about those kinds of things, not merely 2D drawing systems.&#xD;&#xA;&#xD;&#xA;There really aren't a lot of 2D engines out there. The one I know off the top of my head is Torque Game Builder (aka: Torque2D).&#xD;&#xA;&#xD;&#xA;But the real problem is that you asked for &quot;well architected engines.&quot; Quite frankly, I'm not sure such a thing *exists*, whether 2D or 3D.&#xD;&#xA;&#xD;&#xA;I've looked at the guts of Torque2D, and while the library looks reasonable from a high-level user perspective, if you actually read any of the code, it's like something out of MC Escher. I'm sure there was rhyme and reason to it at some point, but that was a long time ago.&#xD;&#xA;&#xD;&#xA;I've seen quite a few other engines, and perhaps the most well-architected one I could say I've seen is [i]maybe[/i] Quake. And that one has more C-isms in it than you can shake a stick at.&#xD;&#xA;&#xD;&#xA;Game engines are notoriously hard to architect well, for a number of reasons. Most engines aren't built to be engines; they're built to be a game that is highly moddable. So they're built on a game development schedule, which accrues quick-fix hacks and other unpleasantness readily.&#xD;&#xA;&#xD;&#xA;Another big reason is that everything may need to talk to everything else; system segregation is really hard to maintain. Animations need to cause sound playback. AI actions need to cause graphics to happen. Sound playing needs to notify the AI (so characters can &quot;hear&quot; sounds). The &quot;tree&quot; of calls in a game often turns into a nightmarish graph.&#xD;&#xA;&#xD;&#xA;The bane of every game engine is the dreaded entity class. I've seen several entity classes in a few shipped games, and while some of them may have been OK, none of them were good. You have not seen a &quot;fat interface&quot; until you've seen a game's entity class. It makes sense; it needs to touch *everything*. It touches sound, rendering, animation, AI, networking, anything that actually matters in a game ultimately comes back to the entity class.&#xD;&#xA;&#xD;&#xA;My advice: look at how some 3D engines handle it. There really isn't that much difference between a 2D game than a 3D one; it's mostly about the renderer." />
  <row Id="31639" PostHistoryTypeId="2" PostId="14162" RevisionGUID="9957cb26-70a0-43e9-bff6-d778643c3d85" CreationDate="2011-06-25T16:46:03.457" UserId="7911" Text="If you're target surface is a floating point variety (HDR rendering for example) then it just outputs the color; during later processing your tone mapper decides how to move this full range down to 0..1 for display.  If the surface is a typical RGB display it gets saturated (forced to a range 0..1).&#xD;&#xA;&#xD;&#xA;In any case, it's a very easy test to do to see how it looks in real life =)&#xD;&#xA;" />
  <row Id="31640" PostHistoryTypeId="2" PostId="14163" RevisionGUID="5923545d-bf33-4702-aacd-ab56097f1040" CreationDate="2011-06-25T17:08:44.810" UserId="7911" Text="I'm not sure what you mean by &quot;too heavy,&quot; but C++/OOP is the lingua franca of game development for the same good reasons that it is used elsewhere.&#xD;&#xA;&#xD;&#xA;Talk of blowing caches is a design issue, not a language feature.  C++ can't be too bad since it's been used in games for the past 15-20 years.  Java can't be too bad since it's used in the very tight run time environments of smart phones.&#xD;&#xA;&#xD;&#xA;Now on to the real question: for many years class hierarchies became deep and started to suffer from problems related to that.  In more recent times class hierarchies have flattened and composition and other data-driven designs are being rather than logic-driven inheritance.&#xD;&#xA;&#xD;&#xA;It's all OOP and still used as the baseline when designing new software, just different focus on what the classes embody.&#xD;&#xA;" />
  <row Id="31641" PostHistoryTypeId="2" PostId="14164" RevisionGUID="9dbb6979-5674-4a16-8b5d-d4f2392293f9" CreationDate="2011-06-25T17:16:51.213" UserId="6622" Text="To come to your example I will explain my thoughts about Entites in videogames. I won´t discuss the general advantage and disadvantage of objects and classes, neither their whole role in Videogames.&#xD;&#xA;&#xD;&#xA;Entities in small videogames are mostly defined by seperate classes, in big games they are often defined in files. There are two general approaches to follow:&#xD;&#xA;&#xD;&#xA;**Extention**:&#xD;&#xA;In your example `Troll` and `Werewolf` will extend `Enemy`, which extends `Entity`. `Entity` takes care about the basic things like movement, health etc., while `Enemy` would state the subclasses as enemies and do other things. (Minecraft follows this approach)&#xD;&#xA;&#xD;&#xA;**Component based**: The second approach (and my favorite) is one `Entity` class, which has components. A component could be `Moveable` or `Enemy`. These components take care of **one** thing like movement or physics. This method breaks long Extension chains and minimizes the risk of running into a conflict. For example: *How can you make non-moveable Enemies, if they inherit from a moveable Character?*. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In big video games like World of Warcraft or Starcraft 2 Entities aren´t classes, but sets of data, which specify the whole Entity. Scripting is also important, because you define what the Entity does not in a Class, but in a Script (if it is unique, not things like moving). &#xD;&#xA;&#xD;&#xA;I am currently programming an RTS and I take the component based approach with Descriptor and Script files for Entites, Skills, Items and everything else dynamic in the game." />
  <row Id="31642" PostHistoryTypeId="2" PostId="14165" RevisionGUID="6ca783d3-1d82-4427-bb64-aef117b0d6b6" CreationDate="2011-06-25T17:28:31.983" UserId="7911" Text="First order of business is that you've discovered that it's best to measure before optimizing =)  So now you know that it's object count that's killing your speed and not screen real estate.&#xD;&#xA;&#xD;&#xA;Measure how many drawn objects your rendering can handle at the needed speed.&#xD;&#xA;&#xD;&#xA;Now we need to test drawing distance, create a maximum distance at which you will draw objects and stress test your environment at different distance settings by running around and catching object counts.  From this you will come up with a good distance to clip objects being drawn.&#xD;&#xA;&#xD;&#xA;Now your basic render loop becomes one of throwing away any object that's farther away than that distance.&#xD;&#xA;&#xD;&#xA;At this point most studios will pass that information along to the artists and designers so that they can make their data fit within the drawing parameters you've laid down.&#xD;&#xA;&#xD;&#xA;Tip 1 is do do distance in units squared, this will avoid a sqrt() on every object every frame.&#xD;&#xA;" />
  <row Id="31643" PostHistoryTypeId="5" PostId="14155" RevisionGUID="e5643e43-8522-4bf0-b16d-dd5c9ea7cca6" CreationDate="2011-06-25T18:04:04.110" UserId="8247" Comment="Added 'Edit:' note at bottom" Text="I have a 3D game world on an iPhone (limited graphics speed), and I'm already regulating whether I draw each shape on the screen based on it's size and distance from the camera. Something like...&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks_from_the_camera &gt; constant) then draw&#xD;&#xA;&#xD;&#xA;What I want to do now is also take into account how many shapes are being drawn, so that in busier areas of the game world I can draw less than I otherwise would.&#xD;&#xA;&#xD;&#xA;I tried to do this by dividing how_big_it_looks by the number of shapes that were drawn last frame (well, the square root of this but I'm simplifying - the problem is the same).&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks / shapes_drawn &gt; constant2) then draw&#xD;&#xA;&#xD;&#xA;But the check happens at the level of objects which represent many drawn shapes, and if an object containing many shapes is switched on, it increases shapes_drawn lots and switches itself back off the next frame. It flickers on and off.&#xD;&#xA;&#xD;&#xA;I tried keeping a kind of weighted average of previous values, by each frame doing something like ` shapes_drawn_recently = 0.9 * shapes_drawn_recently + 0.1 * shapes_just_drawn`, but of course it only slows the flickering down because of the nature of the feedback loop.&#xD;&#xA;&#xD;&#xA;Is there a good way of solving this?&#xD;&#xA;&#xD;&#xA;My project is in Objective-C, but a general algorithm or pseudo-code is good too.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Edit: Please, I'm not asking for general advice on rendering performance. I need an answer to the specific question of how to take the shapes drawn in previous frames into account without getting flickering." />
  <row Id="31644" PostHistoryTypeId="2" PostId="14166" RevisionGUID="2153a90e-92f4-4089-b917-d90937dfdf91" CreationDate="2011-06-25T18:11:42.050" UserId="5932" Text="You would probably be well served to know quite a bit&#xD;&#xA;&#xD;&#xA;**First:** Game programming is easier than it's made out to be, it's not extremely simplistic, however it *is* easy to wrap your head around.&#xD;&#xA;&#xD;&#xA;**Second:** C++ doesn't offer graphical abilities right off the bat. There is *nothing* in the standard library that does straight graphical stuff. Therefore you must learn another library/API in order to work with graphics.&#xD;&#xA;&#xD;&#xA;**Third:** Be prepared to spend time learning. Be prepared to spend time troubleshooting. Be prepared for crappy programs/games, simply because you don't know better. You will get good with time, dedication, and will power.&#xD;&#xA;&#xD;&#xA;**Fourth:** Game programming, and graphical programming in general is *AMAZING!* It's like creating worlds with your fingertips. Nothing is beyond reach." />
  <row Id="31645" PostHistoryTypeId="25" PostId="14105" RevisionGUID="97850b51-ce88-4572-b5b0-b02809a563ca" CreationDate="2011-06-25T18:25:14.180" Comment="http://twitter.com/#!/StackGameDev/status/84688612855255040" />
  <row Id="31646" PostHistoryTypeId="2" PostId="14167" RevisionGUID="39c9b1b1-c01c-437d-aa1e-c023ca091f0d" CreationDate="2011-06-25T18:56:13.883" UserId="8247" Text="Make each object remember whether it was drawn or not the previous frame.&#xD;&#xA;&#xD;&#xA;It it was, be more lenient with it when deciding whether it should be drawn this frame than you would be if it hadn't been drawn the last frame. So...&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks * (1.2 if drawn last frame, 1.0 if not) / shapes_drawn &gt; constant2) then draw&#xD;&#xA;&#xD;&#xA;Voila, no flicker. Can't believe I didn't think of this sooner." />
  <row Id="31647" PostHistoryTypeId="2" PostId="14168" RevisionGUID="5c1606f3-62b5-4dcd-865a-1bfea0fcaf1f" CreationDate="2011-06-25T20:01:43.937" UserId="7328" Text="Although it seems others also gave some answer (i don't know why in comments), here's my experience: &#xD;&#xA;&#xD;&#xA;there is a physics simulation problem known as [heat flow/heat equation](http://en.wikipedia.org/wiki/Heat_equation). That link gives you the whole idea about what you are going to simulate in that problem. and there are many ways to create an optimized version of that simulation (just need a little google search). In my experience if you just give a constance heat value to some points and then leave the surface to rest for a while, you can get a very good height map based on the temperature of each point (just set each point height as it's temperature). There also some algorithm that generate the final result directly from the input values, but in your case I wouldn't recommend them unless you want to generate maps runtime. there are also some algorithms that gives you the ability to modify normal heat flow to get more complex heightmaps with less effort." />
  <row Id="31648" PostHistoryTypeId="2" PostId="14169" RevisionGUID="3dbedb30-280d-4621-a79b-57b3c6828bb9" CreationDate="2011-06-25T20:12:12.967" UserId="7736" Text="Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the sprite disappears, this is in the Sprite class: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;public boolean isCollision(Bitmap other) {&#xD;&#xA;&gt;    &#xD;&#xA;     // TODO Auto-generated method stub	&#xD;&#xA;     if(other.getWidth() &gt; x &amp;&amp; other.getWidth() &lt; x + width &amp;&amp; &gt;other.getHeight() &gt; y &amp;&amp; other.getHeight() &lt; y + height);&#xD;&#xA;	return true;   }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31649" PostHistoryTypeId="1" PostId="14169" RevisionGUID="3dbedb30-280d-4621-a79b-57b3c6828bb9" CreationDate="2011-06-25T20:12:12.967" UserId="7736" Text="Bitmap &amp; Object Collision Help" />
  <row Id="31650" PostHistoryTypeId="3" PostId="14169" RevisionGUID="3dbedb30-280d-4621-a79b-57b3c6828bb9" CreationDate="2011-06-25T20:12:12.967" UserId="7736" Text="&lt;collision-detection&gt;&lt;java&gt;&lt;android&gt;" />
  <row Id="31651" PostHistoryTypeId="2" PostId="14170" RevisionGUID="aeedf88c-55c7-4690-b663-82f058ae4cbb" CreationDate="2011-06-25T20:34:17.323" UserId="7328" Text="I know many people in this site may not know esenthel engine at all and my question may be better answered at engine forum but I'm putting it here to share the name of a real easy to code gameengine with all of you:&#xD;&#xA;&#xD;&#xA;you can easily add a Button for example to your GUI class (gui is it's shared instance) with `Gui += buttonInstance.create(&quot;click on me&quot;)` but I'm just wondering how can you remove an on object from from Gui members.&#xD;&#xA;&#xD;&#xA;as far as I know there is no such a method as removeChild or getChildren or anything similar." />
  <row Id="31652" PostHistoryTypeId="1" PostId="14170" RevisionGUID="aeedf88c-55c7-4690-b663-82f058ae4cbb" CreationDate="2011-06-25T20:34:17.323" UserId="7328" Text="In esenthel engine how can I remove some object from Gui class?" />
  <row Id="31653" PostHistoryTypeId="3" PostId="14170" RevisionGUID="aeedf88c-55c7-4690-b663-82f058ae4cbb" CreationDate="2011-06-25T20:34:17.323" UserId="7328" Text="&lt;esenthel-engine&gt;" />
  <row Id="31654" PostHistoryTypeId="6" PostId="14170" RevisionGUID="ac2f5c75-5fed-44d7-b466-2c4ddbadd3af" CreationDate="2011-06-25T20:54:06.813" UserId="1156" Comment="edited tags" Text="&lt;engine&gt;&lt;gui&gt;&lt;esenthel-engine&gt;" />
  <row Id="31655" PostHistoryTypeId="2" PostId="14171" RevisionGUID="fde05755-8707-44fe-b19a-f377b3c5be97" CreationDate="2011-06-25T21:07:37.447" UserId="1358" Text="I am simulating explosions in a 2D maze game.&#xD;&#xA;&#xD;&#xA;If an explosion occurs in an open area, it covers a circular region (this is the easy bit.)&#xD;&#xA;&#xD;&#xA;However if an explosion occurs in a narrow passage (i.e narrower than the blast range) then it should be &quot;compressed&quot;, so that it goes further and also it should go around corners.&#xD;&#xA;&#xD;&#xA;Ultimately, unless it is completely boxed-in, then it should cover a constant number of pixels, spreading in whatever direction is necessary to reach this total area.&#xD;&#xA;&#xD;&#xA;I have tried using a shortest-path algorithm to pick the nearest N pixels to the origin avoiding walls, but the effect is exaggerated - the blast travels around corners too easily, making U-turns even when there is a clear path in another direction.  I don't know whether this is realistic or not but it is counter-intuitive to players who assume that they can hide around a corner and the blast will take the path of least resistance in a different direction.&#xD;&#xA;&#xD;&#xA;Is there a well-known (and fast) algorithm for this?" />
  <row Id="31656" PostHistoryTypeId="1" PostId="14171" RevisionGUID="fde05755-8707-44fe-b19a-f377b3c5be97" CreationDate="2011-06-25T21:07:37.447" UserId="1358" Text="Channelling an explosion along a narrow passage" />
  <row Id="31657" PostHistoryTypeId="3" PostId="14171" RevisionGUID="fde05755-8707-44fe-b19a-f377b3c5be97" CreationDate="2011-06-25T21:07:37.447" UserId="1358" Text="&lt;2d-physics&gt;" />
  <row Id="31658" PostHistoryTypeId="25" PostId="14171" RevisionGUID="24d15c4f-2259-41ba-84b4-9a677ad6147c" CreationDate="2011-06-25T21:25:14.553" Comment="http://twitter.com/#!/StackGameDev/status/84733914756812800" />
  <row Id="31659" PostHistoryTypeId="2" PostId="14172" RevisionGUID="f04a2ed0-cf88-4ad1-a187-e464c3a9f0b8" CreationDate="2011-06-25T21:35:45.563" UserId="3505" Text="This is a fluid dynamics problem, there is no simple way of solving this in a realistic fashion.&#xD;&#xA;&#xD;&#xA;In any case, you only need &quot;realism&quot; as far as it gives the game the right feel.&#xD;&#xA;&#xD;&#xA;Here is a couple of suggestions:&#xD;&#xA;&#xD;&#xA;You might not want the area to stay exactly the same, that could get out of hand in very tight scenarios, so in your equation you could count far pixels as taking more of the blast. Eg. An explosion has 100 blast points, for the centre pixel you subtract 1 point, for those next to it 2, then 3 etc. so an explosion that has to reach far will spend more points per pixel on average.&#xD;&#xA;&#xD;&#xA;For the corner thing, in your pathfinding you can add a penalty for corners, so any curve on the path will count as extra distance." />
  <row Id="31660" PostHistoryTypeId="2" PostId="14173" RevisionGUID="b59e0dca-740c-4d1a-970c-cd125c75319e" CreationDate="2011-06-25T21:36:14.920" UserId="8050" Text="It is just an idea (physically incorrect but who cares?)  what about a straight-first aproach?&#xD;&#xA;&#xD;&#xA;Starting from the explosion the blasts move to the four directions losing a fixed amount of energy per tile, once a blast keep a direction it will follow it, ignoring the side apertures, until it find an obstacle:&#xD;&#xA;&#xD;&#xA;if there are a single way to go(a turn), follow it and go ahead in that direction;&#xD;&#xA;&#xD;&#xA;if there are two possible directions (T-intersection) split the blast in two (loosing the energy faster)&#xD;&#xA;&#xD;&#xA;if is a dead end stop the blast (this will leave more energy for the other blasts). &#xD;&#xA;&#xD;&#xA;Stop when you run out of energy. If no direction are possible but you have still some energy you may choose to stop anyway or to start to consider the skipped + intersections.&#xD;&#xA;&#xD;&#xA;This may work if you are in a tiled world. If is not your case, you may try a ray casting aproach: working with growing circles testing if the pixel is in visibility from the explosion point. Once again each pixel set as blast decreases the explosion's energy so you have a stop criterion.&#xD;&#xA;  " />
  <row Id="31661" PostHistoryTypeId="2" PostId="14174" RevisionGUID="416529d1-a358-47a7-a989-c7e9d6b1792b" CreationDate="2011-06-25T21:41:24.417" UserId="7911" Text="Look at water/fluid simulations.  The basic idea is that the area is divided into little cubes and each one has a velocity that it's pushing and a &quot;pressure&quot; gauge of how hard it's pushing into the adjoining cubes.  All things being equal your explosion will grow outwards in a circle/sphere.&#xD;&#xA;&#xD;&#xA;In a situation where the cubes can't expand in one direction (hallways) they'll end up pushing towards the way out.&#xD;&#xA;&#xD;&#xA;This might be a good place to start: http://cowboyprogramming.com/2008/04/01/practical-fluid-mechanics/&#xD;&#xA;" />
  <row Id="31662" PostHistoryTypeId="2" PostId="14175" RevisionGUID="88b75f36-fcff-46ae-be4d-0d86bc8a2f8e" CreationDate="2011-06-25T21:54:29.500" UserId="5224" Text="The following statement will always be false:&#xD;&#xA;&#xD;&#xA;    other.getWidth() &gt; x &amp;&amp; other.getWidth() &lt; x&#xD;&#xA;&#xD;&#xA;x can not be both greater and smaller than width.&#xD;&#xA;&#xD;&#xA;As for the rest of your question, it seems to be two folded. You seem to be both having problem with checking the collision and with displaying it.&#xD;&#xA;&#xD;&#xA;To solve your collision problems I would need to know more. What kind of collision do you want? (Should sprites collide with a background image that is divided into two colors, red for collidable?) And how are you handling sprite-sprite collisions currently?&#xD;&#xA;&#xD;&#xA;To solve your displaying problem I would need to see more of your drawing functions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(on an other note, who keeps upping every question asked on gamdev even if they are short unclear questions?)" />
  <row Id="31663" PostHistoryTypeId="2" PostId="14176" RevisionGUID="4d61e249-8f6f-41b7-886b-fe149d379c12" CreationDate="2011-06-25T22:11:40.427" UserId="189" Text="Well, seeing as you use the += operator to add a button, perhaps you use the -= operator to remove one? So something like the following *pseudocode*:&#xD;&#xA;&#xD;&#xA;    mybutton = buttonInstance.create(&quot;click on me&quot;)&#xD;&#xA;    Gui += mybutton&#xD;&#xA;    // when it comes time to remove the button...&#xD;&#xA;    Gui -= mybutton&#xD;&#xA;&#xD;&#xA;I'm just speculating here, but I would be surprised to find otherwise, because it would strike me as inconsistent for `+` to add but `-` not to remove." />
  <row Id="31664" PostHistoryTypeId="2" PostId="14177" RevisionGUID="d99149a1-6f45-411a-942e-dc424ab88221" CreationDate="2011-06-25T22:24:12.637" UserId="8050" Text="The term AI is misused here. Well you need no AI. Hey i don't want to be rude! This is just an optimization problem generally with a greedy solution.&#xD;&#xA;Alas, greedy solutions means boring games: as the player gains experience he will adopt the same optimum greedy solution and the game becomes an advanced tic-tac-toe.&#xD;&#xA;&#xD;&#xA;But don't worry!  Let's talk about your problem. The (greedy) solution is to build as much strong-superpower-invincible-lastlevel unit as it can because there are an unit that overwhelms the others in power. But those units are sloooow to build so your base is left undefended so your opponent can build a single demolition-unit and the white wins in a move. So you think to build some lower-level faster-to-build units before start to build the final-weapon. This is still a greedy solution: you simply put a &quot;defences&quot; parameter in your objective function to minimize.&#xD;&#xA;&#xD;&#xA;In general you should model your objective function leaving room for such parameters and let the computer to choose among a pre-fixed set of parameters or to choose randomly.&#xD;&#xA;&#xD;&#xA;This gives to your booring optimum finder algoritm a sort of character, a personality. &#xD;&#xA;&#xD;&#xA;Once those parameters are choosed you should simply apply your favorite optimization algorithm.   " />
  <row Id="31665" PostHistoryTypeId="2" PostId="14178" RevisionGUID="449202ea-d565-43c2-b2c9-bca97547a76f" CreationDate="2011-06-25T23:32:31.887" UserId="7191" Text="I've done something to this similar recently in [my game][1]. Mine was for water flow, but it could be adapted for explosions. I've already adapted mine for lighting too :).&#xD;&#xA;&#xD;&#xA;Essentially your explosion starts with a fixed amount of &quot;blast&quot;, this is the total area your explosion covers. Through each iteration of moving your blast outwards you're subtracting from this total number of &quot;blast&quot; pixels. When the count runs out, your explosion stops.&#xD;&#xA;&#xD;&#xA;When moving outward, the pixels lined up with the vector that's directly away from the blast is allowed to channel the most blast pixels, it has a higher throughput. This way the paths directly away from the blast get the most blast throughput. You can add rules that when the blast changes direction, the throughput is halved or whatever ends up working best. This ends up being very [cellular automata][2]. You define the rules of a cell, and they go out and do all the work.&#xD;&#xA;&#xD;&#xA;In my image, black represents walls and you see the height of each cube defines the throughput and the color represents it's current pressure from red to white.&#xD;&#xA;&#xD;&#xA;Basically you have a bucket of blast and you need to define the size and direction of the pipes leading away from the blast to flow that blast out. High pressure to low.&#xD;&#xA;&#xD;&#xA;What inspired this algorithm for me was Dwarf Fortress and the way the water flowed with pressure. Obviously I don't know exactly how it was done in Dwarf Fortress, but I hacked together my own version that works pretty well. There's a little more info on how I did my algorithm and an interview with the Dwarf Fortress creator [here][3].&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ageofgoblins.com&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Cellular_automaton&#xD;&#xA;  [3]: http://byte56.com/post/5787892022/yet-again-more-water&#xD;&#xA;  [4]: http://i.stack.imgur.com/rfI9T.png" />
  <row Id="31666" PostHistoryTypeId="5" PostId="14137" RevisionGUID="62aaf02d-cc19-4ea8-9b77-f10f348629e2" CreationDate="2011-06-25T23:51:30.187" UserId="2111" Comment="added 106 characters in body" Text="For this type of game, I'd like to refer you to [a question that I asked before][1]: &#xD;&#xA;&#xD;&#xA;Basically the idea is that you keep a **power score for every unit** owned by a player. This score can be based on the unit's cost, the unit's stats or even a score that you chose arbitrarily for every unit. &#xD;&#xA;&#xD;&#xA;Then you **calculate the power score of each player**, based on the power score of all their units.&#xD;&#xA;&#xD;&#xA;Finally, you **compare the score** of the computer and the human player to make AI decisions.&#xD;&#xA;&#xD;&#xA;For example, a computer with a Hard AI difficulty level could decide to always try to keep 20% more power than the player, or whatever. You can even put different random play styles like Aggressive, Defensive, etc. based on the power level of the opponent.&#xD;&#xA;&#xD;&#xA;This technique certainly is not the best way to go and won't work with all games, but it sure is simple to implement and it did the trick for my AI demands. I always prefer to try out a simple solution first, and then move on to a more sophisticated one if the first approach looks to stupid or inappropriate.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/9635/calculating-the-power-of-a-player-in-a-defend-your-castle-type-game" />
  <row Id="31667" PostHistoryTypeId="2" PostId="14179" RevisionGUID="977b2a75-2241-49a7-9257-887eac5976e2" CreationDate="2011-06-25T23:51:40.893" UserId="8250" Text="If I embed the V8 JavaScript Engine in my game is it still possible to distribute it in the Mac App Store?" />
  <row Id="31668" PostHistoryTypeId="1" PostId="14179" RevisionGUID="977b2a75-2241-49a7-9257-887eac5976e2" CreationDate="2011-06-25T23:51:40.893" UserId="8250" Text="V8 JavaScript Engine and Mac App Store" />
  <row Id="31669" PostHistoryTypeId="3" PostId="14179" RevisionGUID="977b2a75-2241-49a7-9257-887eac5976e2" CreationDate="2011-06-25T23:51:40.893" UserId="8250" Text="&lt;javascript&gt;&lt;appstore&gt;" />
  <row Id="31670" PostHistoryTypeId="5" PostId="14155" RevisionGUID="59f14196-2dd1-4ada-863f-0ece2359458e" CreationDate="2011-06-25T23:54:31.097" UserId="8247" Comment="that found an answer" Text="[Edit: I found an answer - see below]&#xD;&#xA;&#xD;&#xA;I have a 3D game world on an iPhone (limited graphics speed), and I'm already regulating whether I draw each shape on the screen based on it's size and distance from the camera. Something like...&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks_from_the_camera &gt; constant) then draw&#xD;&#xA;&#xD;&#xA;What I want to do now is also take into account how many shapes are being drawn, so that in busier areas of the game world I can draw less than I otherwise would.&#xD;&#xA;&#xD;&#xA;I tried to do this by dividing how_big_it_looks by the number of shapes that were drawn last frame (well, the square root of this but I'm simplifying - the problem is the same).&#xD;&#xA;&#xD;&#xA;    if (how_big_it_looks / shapes_drawn &gt; constant2) then draw&#xD;&#xA;&#xD;&#xA;But the check happens at the level of objects which represent many drawn shapes, and if an object containing many shapes is switched on, it increases shapes_drawn lots and switches itself back off the next frame. It flickers on and off.&#xD;&#xA;&#xD;&#xA;I tried keeping a kind of weighted average of previous values, by each frame doing something like ` shapes_drawn_recently = 0.9 * shapes_drawn_recently + 0.1 * shapes_just_drawn`, but of course it only slows the flickering down because of the nature of the feedback loop.&#xD;&#xA;&#xD;&#xA;Is there a good way of solving this?&#xD;&#xA;&#xD;&#xA;My project is in Objective-C, but a general algorithm or pseudo-code is good too.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Edit: Please, I'm not asking for general advice on rendering performance. I need an answer to the specific question of how to take the shapes drawn in previous frames into account without getting flickering." />
  <row Id="31671" PostHistoryTypeId="25" PostId="14169" RevisionGUID="c31b8a15-6cb0-4388-9f5c-df2d0ee64f4c" CreationDate="2011-06-26T00:25:15.823" Comment="http://twitter.com/#!/StackGameDev/status/84779218210275330" />
  <row Id="31672" PostHistoryTypeId="2" PostId="14180" RevisionGUID="8ff6a655-7a54-408a-9296-0540f36b2c7b" CreationDate="2011-06-26T00:50:21.240" UserId="6362" Text="This is something I've been wondering for quite a while. &#xD;&#xA;When building games that exist out of multiple levels (platformers, shmups etc) what is the prefered method to switch between the levels?&#xD;&#xA;&#xD;&#xA;Let's say we have a level class that does the following:&#xD;&#xA;&#xD;&#xA; - Load data for the level design (tiles), enemies, graphics etc.&#xD;&#xA; - Setup all these elements in their&#xD;&#xA;   appriopate locations and display them&#xD;&#xA; - Start physics and game logic&#xD;&#xA;&#xD;&#xA;I'm stuck between the following 2 methods:&#xD;&#xA;&#xD;&#xA;1: Throw away everything in the level class and make a new one, we have to load an entirely new level anyway!&#xD;&#xA;&#xD;&#xA;2: pause the game logic and physics, unload all currents assets, then re-initialize those components with the level data for the new level.&#xD;&#xA;&#xD;&#xA;They both have their pros and cons. Method 1 is alot easier and seems to make sense since we have to redo everything anyway. But method 2 allows you to re-use exisiting elements which might save resources and allows for a smoother transfer to the new level." />
  <row Id="31673" PostHistoryTypeId="1" PostId="14180" RevisionGUID="8ff6a655-7a54-408a-9296-0540f36b2c7b" CreationDate="2011-06-26T00:50:21.240" UserId="6362" Text="Switching between levels, re-initialize existing structure or create new one?" />
  <row Id="31674" PostHistoryTypeId="3" PostId="14180" RevisionGUID="8ff6a655-7a54-408a-9296-0540f36b2c7b" CreationDate="2011-06-26T00:50:21.240" UserId="6362" Text="&lt;levels&gt;&lt;methodology&gt;&lt;loading&gt;" />
  <row Id="31675" PostHistoryTypeId="25" PostId="14180" RevisionGUID="64ba939f-e471-455d-ade5-c5462c1ca7c4" CreationDate="2011-06-26T03:25:15.957" Comment="http://twitter.com/#!/StackGameDev/status/84824517419089920" />
  <row Id="31676" PostHistoryTypeId="2" PostId="14181" RevisionGUID="8a43eddd-2fae-4793-a425-a28135469fe3" CreationDate="2011-06-26T03:39:40.320" UserId="4234" Text="I need to simulate my background scrolling but I want to avoid moving my actual image control. Instead, I'd like to use a WriteableBitmap and use a blitting method. What would be the way to simulate an image scrolling upwards? I've tried various things buy I can't seem to get my head around the logic:&#xD;&#xA;&#xD;&#xA;     //X pos, Y pos, width, height&#xD;&#xA;     Rect src = new Rect(0, scrollSpeed , 480, height);&#xD;&#xA;     Rect dest = new Rect(0, 700 - scrollSpeed , 480, height);&#xD;&#xA;    &#xD;&#xA;     //destination rect, source WriteableBitmap, source Rect, blend mode &#xD;&#xA;     wb.Blit(destRect, wbSource, srcRect, BlendMode.None);&#xD;&#xA;     scrollSpeed += 5;&#xD;&#xA;                    &#xD;&#xA;     if (scrollSpeed &gt; 700) scrollSpeed  = 0;&#xD;&#xA;&#xD;&#xA;If `height` is 10, the image is quite fuzzy and moreso if the height is `1`. If the height is a taller, the image is clearer, but it only seems to do a one to one copy. How can I 'scroll' the image so that it looks like it's moving up in a continuous loop? (The height of the screen is 700).&#xD;&#xA;" />
  <row Id="31677" PostHistoryTypeId="1" PostId="14181" RevisionGUID="8a43eddd-2fae-4793-a425-a28135469fe3" CreationDate="2011-06-26T03:39:40.320" UserId="4234" Text="Scrolling a WriteableBitmap" />
  <row Id="31678" PostHistoryTypeId="3" PostId="14181" RevisionGUID="8a43eddd-2fae-4793-a425-a28135469fe3" CreationDate="2011-06-26T03:39:40.320" UserId="4234" Text="&lt;c#&gt;&lt;camera&gt;&lt;methodology&gt;&lt;logic&gt;&lt;silverlight&gt;" />
  <row Id="31679" PostHistoryTypeId="2" PostId="14182" RevisionGUID="3f4c2d90-02c6-4187-b54b-4faca132b785" CreationDate="2011-06-26T04:06:54.273" UserId="849" Text="Just wondering: A lot of games start with their intros/vendor videos, and then show a &quot;Press Start&quot; screen before the actual main menu.&#xD;&#xA;&#xD;&#xA;I never quite figures out the purpose of this, why not go to the main menu directly? The only possible explanation that made sense to me: When multiple controllers are connected it allows to identify the one that the player wants to use." />
  <row Id="31680" PostHistoryTypeId="1" PostId="14182" RevisionGUID="3f4c2d90-02c6-4187-b54b-4faca132b785" CreationDate="2011-06-26T04:06:54.273" UserId="849" Text="&quot;Press Start&quot; screen - why?" />
  <row Id="31681" PostHistoryTypeId="3" PostId="14182" RevisionGUID="3f4c2d90-02c6-4187-b54b-4faca132b785" CreationDate="2011-06-26T04:06:54.273" UserId="849" Text="&lt;game-design&gt;" />
  <row Id="31682" PostHistoryTypeId="2" PostId="14183" RevisionGUID="e489f414-e90a-4e53-822a-0b790dedba5f" CreationDate="2011-06-26T04:36:32.727" UserId="7911" Text="This is required by the console manufacturer as part of the standard Technical Requirements Checklist (TRC).  One reason is to allow the startup screen to loop back to a demo mode if no one has touched the controller, this stops screen burn and makes it easy for a store to simply pop in a game and let it run looping action with no intervention.&#xD;&#xA;&#xD;&#xA;Your guess is the secondary purpose, and that's the way it's used =)&#xD;&#xA;" />
  <row Id="31683" PostHistoryTypeId="2" PostId="14184" RevisionGUID="fb2c2040-d8ad-43ce-b319-fe00d991b6c0" CreationDate="2011-06-26T05:01:24.340" UserId="7662" Text="So I am trying to animate a specific tile in my 2d Array, using blitting. The animation consists of 3 different 16x16 sprites in a tilesheet. Now that works perfect with the code below. BUT it's causing memory leakage. Every second the FlashPlayer is taking up +140 kb more in memory. **What part of the following code could possibly is causing the leak:**&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    //The variable Rectangle finds where on the 2d array we should clear the pixels&#xD;&#xA;    //Fillrect follows up by setting alpha 0 at that spot before we copy in nxt Sprite&#xD;&#xA;    //Tiletype is a variable that holds what kind of tile the next tile in animation is&#xD;&#xA;    //(from tileSheet)&#xD;&#xA;    //drawTile() gets Sprite from tilesheet and copyPixels it into right position on canvas&#xD;&#xA;    &#xD;&#xA;            public function animateSprite():void{&#xD;&#xA;            			&#xD;&#xA;            			tileGround.bitmapData.lock();&#xD;&#xA;            			&#xD;&#xA;            			if(anmArray[0].tileType &gt; 42){&#xD;&#xA;            				anmArray[0].tileType = 40;&#xD;&#xA;            				frameCount = 0;&#xD;&#xA;            			}&#xD;&#xA;            			var rect:Rectangle = new Rectangle(anmArray[0].xtile * ts, anmArray[0].ytile * ts, ts, ts);&#xD;&#xA;            			tileGround.bitmapData.fillRect(rect, 0);&#xD;&#xA;            			&#xD;&#xA;            			anmArray[0].tileType = 40 + frameCount;&#xD;&#xA;            			drawTile(anmArray[0].tileType, anmArray[0].xtile, anmArray[0].ytile);&#xD;&#xA;        &#xD;&#xA;            			frameCount++;&#xD;&#xA;            			&#xD;&#xA;            			tileGround.bitmapData.unlock();&#xD;&#xA;            		}&#xD;&#xA;            &#xD;&#xA;            &#xD;&#xA;            &#xD;&#xA;            public function drawTile(spriteType:int, xt:int, yt:int):void{&#xD;&#xA;            			&#xD;&#xA;            			var tileSprite:Bitmap = getImageFromSheet(spriteType, ts);&#xD;&#xA;            			var rec:Rectangle = new Rectangle(0, 0, ts, ts);&#xD;&#xA;            			var pt:Point = new Point(xt * ts, yt * ts);&#xD;&#xA;            			tileGround.bitmapData.copyPixels(tileSprite.bitmapData, rec, pt, null, null, true);&#xD;&#xA;            			&#xD;&#xA;            		}&#xD;&#xA;            		&#xD;&#xA;            		&#xD;&#xA;            		public function getImageFromSheet(spriteType:int, size:int):Bitmap{&#xD;&#xA;            			&#xD;&#xA;            			var sheetColumns:int = tSheet.width/ts;&#xD;&#xA;            			var col:int = spriteType % sheetColumns;&#xD;&#xA;            			var row:int = Math.floor(spriteType/sheetColumns);&#xD;&#xA;            			var rec:Rectangle = new Rectangle(col * ts, row * ts, size, size);&#xD;&#xA;            			var pt:Point = new Point(0,0);&#xD;&#xA;            			&#xD;&#xA;            			var correctTile:Bitmap = new Bitmap(new BitmapData(size, size, false, 0));&#xD;&#xA;            			correctTile.bitmapData.copyPixels(tSheet, rec, pt, null, null, true);&#xD;&#xA;            			return correctTile;&#xD;&#xA;            			&#xD;&#xA;            		}&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="31684" PostHistoryTypeId="1" PostId="14184" RevisionGUID="fb2c2040-d8ad-43ce-b319-fe00d991b6c0" CreationDate="2011-06-26T05:01:24.340" UserId="7662" Text="[AS3] Animating Tile with Blitting taking up Memory." />
  <row Id="31685" PostHistoryTypeId="3" PostId="14184" RevisionGUID="fb2c2040-d8ad-43ce-b319-fe00d991b6c0" CreationDate="2011-06-26T05:01:24.340" UserId="7662" Text="&lt;actionscript-3&gt;&lt;memory-efficiency&gt;&lt;bit-blit&gt;" />
  <row Id="31686" PostHistoryTypeId="25" PostId="14182" RevisionGUID="3cd05e36-90c0-4c30-9599-157928092938" CreationDate="2011-06-26T06:25:15.453" Comment="http://twitter.com/#!/StackGameDev/status/84869813666721792" />
  <row Id="31687" PostHistoryTypeId="6" PostId="14182" RevisionGUID="ac726f0a-d9ad-43c3-b585-3ba01ec8104e" CreationDate="2011-06-26T06:43:29.127" UserId="7548" Comment="edited tags" Text="&lt;game-design&gt;&lt;interface&gt;" />
  <row Id="31688" PostHistoryTypeId="2" PostId="14185" RevisionGUID="5def0c0d-0fe8-44cc-877d-30af07728ecf" CreationDate="2011-06-26T07:33:16.137" UserId="20" Text="The main memory consumption is because you're allocating new memory by creating a new Bitmap in your `getImageFromSheet` method.&#xD;&#xA;&#xD;&#xA;You could write your code without any of these allocations. Instead of creating new Points and Rectanlges and Bitmaps every time, you could use two private member variables for the `Point` and `Rectangle` (where you simply change properties) and perform the `copyPixels` method directly from your sprite-sheet to your canvas. There's no need for the intermediate copy to a `Bitmap`. *If* you still want to pass around new bitmap-data, use `BitmapData` directly and not a `Bitmap` which is only a `DisplayObject` wrapper so that you can add it to the flash stage (which you don't need).&#xD;&#xA;&#xD;&#xA;How long did you monitor your memory consumption? That allocated memory should actually be released by the garbage collector... but it would of course be better if you did not allocate that memory in the first place (since it's redundant)." />
  <row Id="31689" PostHistoryTypeId="5" PostId="14184" RevisionGUID="61cca2c9-4ef0-413b-8798-fda2a8e7e64e" CreationDate="2011-06-26T07:34:53.297" UserId="20" Comment="Removed &quot;tag&quot; from title. Minor spelling changes." Text="I am trying to animate a specific tile in my 2d Array, using blitting. The animation consists of three different 16x16 sprites in a tilesheet. Now that works perfect with the code below. BUT it's causing memory leakage. Every second the FlashPlayer is taking up +140 kb more in memory. **What part of the following code could possibly cause the leak:**&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    //The variable Rectangle finds where on the 2d array we should clear the pixels&#xD;&#xA;    //Fillrect follows up by setting alpha 0 at that spot before we copy in nxt Sprite&#xD;&#xA;    //Tiletype is a variable that holds what kind of tile the next tile in animation is&#xD;&#xA;    //(from tileSheet)&#xD;&#xA;    //drawTile() gets Sprite from tilesheet and copyPixels it into right position on canvas&#xD;&#xA;    &#xD;&#xA;            public function animateSprite():void{&#xD;&#xA;            			&#xD;&#xA;            			tileGround.bitmapData.lock();&#xD;&#xA;            			&#xD;&#xA;            			if(anmArray[0].tileType &gt; 42){&#xD;&#xA;            				anmArray[0].tileType = 40;&#xD;&#xA;            				frameCount = 0;&#xD;&#xA;            			}&#xD;&#xA;            			var rect:Rectangle = new Rectangle(anmArray[0].xtile * ts, anmArray[0].ytile * ts, ts, ts);&#xD;&#xA;            			tileGround.bitmapData.fillRect(rect, 0);&#xD;&#xA;            			&#xD;&#xA;            			anmArray[0].tileType = 40 + frameCount;&#xD;&#xA;            			drawTile(anmArray[0].tileType, anmArray[0].xtile, anmArray[0].ytile);&#xD;&#xA;        &#xD;&#xA;            			frameCount++;&#xD;&#xA;            			&#xD;&#xA;            			tileGround.bitmapData.unlock();&#xD;&#xA;            		}&#xD;&#xA;            &#xD;&#xA;            &#xD;&#xA;            &#xD;&#xA;            public function drawTile(spriteType:int, xt:int, yt:int):void{&#xD;&#xA;            			&#xD;&#xA;            			var tileSprite:Bitmap = getImageFromSheet(spriteType, ts);&#xD;&#xA;            			var rec:Rectangle = new Rectangle(0, 0, ts, ts);&#xD;&#xA;            			var pt:Point = new Point(xt * ts, yt * ts);&#xD;&#xA;            			tileGround.bitmapData.copyPixels(tileSprite.bitmapData, rec, pt, null, null, true);&#xD;&#xA;            			&#xD;&#xA;            		}&#xD;&#xA;            		&#xD;&#xA;            		&#xD;&#xA;            		public function getImageFromSheet(spriteType:int, size:int):Bitmap{&#xD;&#xA;            			&#xD;&#xA;            			var sheetColumns:int = tSheet.width/ts;&#xD;&#xA;            			var col:int = spriteType % sheetColumns;&#xD;&#xA;            			var row:int = Math.floor(spriteType/sheetColumns);&#xD;&#xA;            			var rec:Rectangle = new Rectangle(col * ts, row * ts, size, size);&#xD;&#xA;            			var pt:Point = new Point(0,0);&#xD;&#xA;            			&#xD;&#xA;            			var correctTile:Bitmap = new Bitmap(new BitmapData(size, size, false, 0));&#xD;&#xA;            			correctTile.bitmapData.copyPixels(tSheet, rec, pt, null, null, true);&#xD;&#xA;            			return correctTile;&#xD;&#xA;            			&#xD;&#xA;            		}&#xD;&#xA;" />
  <row Id="31690" PostHistoryTypeId="4" PostId="14184" RevisionGUID="61cca2c9-4ef0-413b-8798-fda2a8e7e64e" CreationDate="2011-06-26T07:34:53.297" UserId="20" Comment="Removed &quot;tag&quot; from title. Minor spelling changes." Text="Animating Tile with Blitting taking up Memory." />
  <row Id="31692" PostHistoryTypeId="5" PostId="14144" RevisionGUID="803ff8f3-6d0f-4dcd-9a42-c00858aaaebf" CreationDate="2011-06-26T08:49:47.693" UserId="1839" Comment="added 6056 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;One has to distinguish between vectors with w==0 and vectors with w==1. There are basically 2 ways to achieve this:&#xD;&#xA;&#xD;&#xA; 1. Store the w-component: 1 for positions and 0 for vectors&#xD;&#xA; 2. Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of those functions&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;    operator[](int col)         { return cols[col]; }&#xD;&#xA;        vector4     operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // Since we transform a vector that stores the 'w' component, we just need one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points, i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors, like a direction unit-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a _position_ of an entity and its look direction _look_dir_ which is a unit vector&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA;    &#xD;&#xA;        // the entity will be moved in the world by a translation in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // now we create the matrix&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;" />
  <row Id="31693" PostHistoryTypeId="5" PostId="14144" RevisionGUID="155b90d0-d70c-4139-8881-77982f7ba66f" CreationDate="2011-06-26T08:56:16.380" UserId="1839" Comment="added 69 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;One has to distinguish between vectors with w==0 and vectors with w==1. There are basically 2 ways to achieve this:&#xD;&#xA;&#xD;&#xA; 1. Store the w-component: 1 for positions and 0 for vectors&#xD;&#xA; 2. Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of those functions&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;    operator[](int col)         { return cols[col]; }&#xD;&#xA;        vector4     operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // since we transform a vector that stores the 'w' component, &#xD;&#xA;    // we just need this one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points (w==1), i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors (w==0), like a direction-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a &quot;position&quot; of an entity and its &#xD;&#xA;        // look direction &quot;look_dir&quot; which is a unit vector&#xD;&#xA;&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA; &#xD;&#xA;        // the entity will be moved in the world by a translation &#xD;&#xA;        // in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // let's create that matrix first&#xD;&#xA;&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't &#xD;&#xA;        // store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;" />
  <row Id="31694" PostHistoryTypeId="5" PostId="14144" RevisionGUID="72e759fe-ddab-4058-897c-a0d9a2413374" CreationDate="2011-06-26T09:02:41.430" UserId="1839" Comment="added 482 characters in body; deleted 68 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;The answer to the question is basically&#xD;&#xA;&#xD;&#xA; 1. **Either store the w-component: 1 for positions and 0 for vectors**&#xD;&#xA; 2. **Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of either functions**&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;    operator[](int col)         { return cols[col]; }&#xD;&#xA;        vector4     operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // since we transform a vector that stores the 'w' component, &#xD;&#xA;    // we just need this one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points (w==1), i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors (w==0), like a direction-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a &quot;position&quot; of an entity and its &#xD;&#xA;        // look direction &quot;look_dir&quot; which is a unit vector&#xD;&#xA;&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA; &#xD;&#xA;        // the entity will be moved in the world by a translation &#xD;&#xA;        // in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // let's create that matrix first&#xD;&#xA;&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't &#xD;&#xA;        // store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Initial Entity state:&#xD;&#xA;&#xD;&#xA;    position       :   0.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   1.000000   0.000000   0.000000   0.000000&#xD;&#xA;&#xD;&#xA;Now a transformation with a translation of x+5 and a rotation of 90 degrees around the y-axis will be applied to this entity.&#xD;&#xA;The correct answer after the tranformation is:&#xD;&#xA;&#xD;&#xA;    position       :   5.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   0.000000   0.000000   1.000000   0.000000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31695" PostHistoryTypeId="2" PostId="14186" RevisionGUID="28d1721c-868b-42c7-be64-aa40f8a5f4b2" CreationDate="2011-06-26T09:06:39.200" UserId="7173" Text="It simply depends on the type of game you are working on.&#xD;&#xA;If it requires you to have smooth transitions or to stream the content of a level (like in crysis for example) then you should go for the second method.&#xD;&#xA;&#xD;&#xA;This question is rather vague...&#xD;&#xA;For a platformer I'd recommend to create a new level from scratch, because you are likely to have seperate levels in seperate files..." />
  <row Id="31696" PostHistoryTypeId="16" PostId="14144" RevisionGUID="72e759fe-ddab-4058-897c-a0d9a2413374" CreationDate="2011-06-26T09:06:45.127" UserId="1839" />
  <row Id="31697" PostHistoryTypeId="5" PostId="14144" RevisionGUID="c7c623e2-2f4b-442a-8290-82e7123c5108" CreationDate="2011-06-26T09:09:04.797" UserId="1839" Comment="added 184 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;The answer to the question is basically&#xD;&#xA;&#xD;&#xA; 1. **Either store the w-component: 1 for positions and 0 for vectors**&#xD;&#xA; 2. **Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of either functions**&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;    operator[](int col)         { return cols[col]; }&#xD;&#xA;        vector4     operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // since we transform a vector that stores the 'w' component, &#xD;&#xA;    // we just need this one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points (w==1), i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors (w==0), like a direction-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a &quot;position&quot; of an entity and its &#xD;&#xA;        // look direction &quot;look_dir&quot; which is a unit vector&#xD;&#xA;&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA; &#xD;&#xA;        // the entity will be moved in the world by a translation &#xD;&#xA;        // in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // let's create that matrix first&#xD;&#xA;&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't &#xD;&#xA;        // store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Initial Entity state:&#xD;&#xA;&#xD;&#xA;    position       :   0.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   1.000000   0.000000   0.000000   0.000000&#xD;&#xA;&#xD;&#xA;Now a transformation with a translation of x+5 and a rotation of 90 degrees around the y-axis will be applied to this entity.&#xD;&#xA;The correct answer after the tranformation is:&#xD;&#xA;&#xD;&#xA;    position       :   5.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   0.000000   0.000000   1.000000   0.000000&#xD;&#xA;&#xD;&#xA;You will only get the correct answer if you distinguish vectors with w==0 and vectors with w==1 in one of the above presented ways. Otherwise the answer for `look_dir` will be wrong.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31698" PostHistoryTypeId="5" PostId="14144" RevisionGUID="44b6ef2f-577f-4c10-b645-efc674612807" CreationDate="2011-06-26T09:23:31.123" UserId="1839" Comment="added 8 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;The answer to the question is basically&#xD;&#xA;&#xD;&#xA; 1. **Either store the w-component: 1 for positions and 0 for vectors**&#xD;&#xA; 2. **Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of either functions**&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;        operator[](int col)         { return cols[col]; }&#xD;&#xA;        const vector4&amp;  operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // since we transform a vector that stores the 'w' component, &#xD;&#xA;    // we just need this one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points (w==1), i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors (w==0), like a direction-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a &quot;position&quot; of an entity and its &#xD;&#xA;        // look direction &quot;look_dir&quot; which is a unit vector&#xD;&#xA;&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA; &#xD;&#xA;        // the entity will be moved in the world by a translation &#xD;&#xA;        // in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // let's create that matrix first&#xD;&#xA;&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't &#xD;&#xA;        // store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Initial Entity state:&#xD;&#xA;&#xD;&#xA;    position       :   0.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   1.000000   0.000000   0.000000   0.000000&#xD;&#xA;&#xD;&#xA;Now a transformation with a translation of x+5 and a rotation of 90 degrees around the y-axis will be applied to this entity.&#xD;&#xA;The correct answer after the tranformation is:&#xD;&#xA;&#xD;&#xA;    position       :   5.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   0.000000   0.000000   1.000000   0.000000&#xD;&#xA;&#xD;&#xA;You will only get the correct answer if you distinguish vectors with w==0 and vectors with w==1 in one of the above presented ways. Otherwise the answer for `look_dir` will be wrong.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31699" PostHistoryTypeId="25" PostId="14158" RevisionGUID="44e60adc-db12-4337-b62f-6231612c6bdf" CreationDate="2011-06-26T09:25:16.117" Comment="http://twitter.com/#!/StackGameDev/status/84915114934927360" />
  <row Id="31700" PostHistoryTypeId="2" PostId="14187" RevisionGUID="9c2a06c3-10c4-4465-a742-711e9bd0021b" CreationDate="2011-06-26T09:27:34.680" UserId="7103" Text="I am writing some UI stuff for my games in C++. Basically its a very common problem, but I dont know the best answer yet. Suppose inside my UI Library I have a view class which renders 2D/3D scene. This view can contain many subviews. I needs a container which allows me to iterate over these views fast and also insert/delete subviews. I am not sure which container is best for the job - list, vector or something else?" />
  <row Id="31701" PostHistoryTypeId="1" PostId="14187" RevisionGUID="9c2a06c3-10c4-4465-a742-711e9bd0021b" CreationDate="2011-06-26T09:27:34.680" UserId="7103" Text="Best C++ containers for UI in Games." />
  <row Id="31702" PostHistoryTypeId="3" PostId="14187" RevisionGUID="9c2a06c3-10c4-4465-a742-711e9bd0021b" CreationDate="2011-06-26T09:27:34.680" UserId="7103" Text="&lt;c++&gt;&lt;gui&gt;" />
  <row Id="31703" PostHistoryTypeId="2" PostId="14188" RevisionGUID="232113b5-0507-47f5-8773-824663e5bc12" CreationDate="2011-06-26T09:32:26.830" UserId="1156" Text="`List` is probably a good choice here. A linked list is fast to delete and insert elements into the middle, the front, and the end. You can iterate over it, but you cannot do random access (i.e. `myList[3]` for the 4th element).&#xD;&#xA;&#xD;&#xA;`Arrays` could be good if you have a fixed number of GUI subviews. &#xD;&#xA;&#xD;&#xA;`Vector` is less of a good choice. It's implemented as a resizable array, so deletion/insertion anyway except the back of the vector requires shifting the elements along. You can iterate over it just as easily, and you have random access if you need it. For a GUI, I doubt you will.&#xD;&#xA;&#xD;&#xA;The other option is `Map`. This is almost certainly not a good idea unless you need to store them by keys. " />
  <row Id="31704" PostHistoryTypeId="5" PostId="14144" RevisionGUID="abd12676-44f4-4e93-bbcf-ce5fb311b20c" CreationDate="2011-06-26T09:32:36.503" UserId="1839" Comment="deleted 51 characters in body; deleted 2 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;The answer to the question is basically&#xD;&#xA;&#xD;&#xA; 1. **Either store the w-component: 1 for positions and 0 for vectors**&#xD;&#xA; 2. **Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of either functions**&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;        operator[](int col)         { return cols[col]; }&#xD;&#xA;        const vector4&amp;  operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // since we transform a vector that stores the 'w' component, &#xD;&#xA;    // we just need this one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points (w==1), i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors (w==0), like a direction-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a &quot;position&quot; of an entity and its &#xD;&#xA;        // look direction &quot;look_dir&quot; which is a unit vector&#xD;&#xA;&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA; &#xD;&#xA;        // the entity will be moved in the world by a translation &#xD;&#xA;        // in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // let's create that matrix first&#xD;&#xA;&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't &#xD;&#xA;        // store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;        printf(&quot;\n&quot;);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Initial Entity state:&#xD;&#xA;&#xD;&#xA;    position       :   0.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   1.000000   0.000000   0.000000   0.000000&#xD;&#xA;&#xD;&#xA;Now a transformation with a translation of x+5 and a rotation of 90 degrees around the y-axis will be applied to this entity.&#xD;&#xA;The correct answer after the tranformation is:&#xD;&#xA;&#xD;&#xA;    position       :   5.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   0.000000   0.000000   1.000000   0.000000&#xD;&#xA;&#xD;&#xA;We will only get the correct answer if we distinguish vectors with w==0 and vectors with w==1 in one of the above presented ways.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31705" PostHistoryTypeId="2" PostId="14189" RevisionGUID="e68c56fc-6410-4fc6-98d5-b7358a99b044" CreationDate="2011-06-26T09:35:29.607" UserId="1156" Text="If your physics and game logic has little initialization or does not need any information from the last level stored, then the effect of throwing it away is negligible. &#xD;&#xA;&#xD;&#xA;If the above is not true, or if you have a large amount of shared assets, I would pause the gameplay. &#xD;&#xA;&#xD;&#xA;Another option is to copy the shared assets over to the new level and delete all the old unwanted ones, and do method 1. This probably is only a benefit if there is a large amount of shared assets." />
  <row Id="31706" PostHistoryTypeId="6" PostId="14180" RevisionGUID="9d6f0677-f56c-42f5-b2b9-6218738eb637" CreationDate="2011-06-26T09:35:42.197" UserId="1156" Comment="edited tags" Text="&lt;methodology&gt;&lt;levels&gt;&lt;loading&gt;&lt;asset-management&gt;" />
  <row Id="31707" PostHistoryTypeId="5" PostId="14144" RevisionGUID="c41155a0-696d-4f5b-a3a2-2ef207e0939c" CreationDate="2011-06-26T09:38:09.400" UserId="1839" Comment="deleted 46 characters in body" Text="**EDIT Disclaimer**: For convenience in this answer vectors with w==0 are called vectors and with w==1 are called points. Although as FxIII pointed out, that is not a mathematically correct terminology. However, since the point of the answer is not the terminology, but the need to distinguish both types of vectors, I'll stick to it. For practical reason this convention is widely used in game-development.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It is not possible to distinguish between vectors and points without a 'w' component. It is 1 for points and 0 for vectors.&#xD;&#xA;&#xD;&#xA;If vectors are multiplied with a 4x4 affine transformation-matrix that has a translation in its last row/column, the vector would also be translated, which is wrong, only points must be translated. The zero in the 'w' component of a vector takes care of that. &#xD;&#xA;&#xD;&#xA;Highlighting this part of the matrix-vector multiplication makes it more clear:&#xD;&#xA;&#xD;&#xA;        r.x = ... + a._14 * v.w; &#xD;&#xA;        r.y = ... + a._24 * v.w; &#xD;&#xA;        r.z = ... + a._34 * v.w; &#xD;&#xA;        r.w = ... + a._44 * v.w;&#xD;&#xA;&#xD;&#xA;    a._14, a._24 and a._34 is the translational part of the affine matrix.&#xD;&#xA;    Without a 'w' component one has to set it implicitly to 0 (vector) or to 1 (point) &#xD;&#xA;&#xD;&#xA;I.e. it would be wrong to translate a vector, for instance a rotation axis, the result is simply wrong, By having it's 4th component zero you can still use the same matrix that transforms the points to transform the rotation axis and the result will be valid and its length is preserved as long as there is no scale in the matrix. That is the behavior you want for vectors. Without the 4th component you would have to create 2 matrices (or 2 different multiplication functions with an implicit 4th parameter. and make 2 different function calls for points and vectors.&#xD;&#xA;&#xD;&#xA;In order to use the vector registers of modern CPUs (SSE, Altivec, SPUs) you have to pass 4x 32 bit floats anyway (its a 128 bit register), plus you have to take care of the alignment, usually 16 bytes. So you don't have the chance to safe the space for the 4th component anyway.&#xD;&#xA;&#xD;&#xA;-------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;The answer to the question is basically&#xD;&#xA;&#xD;&#xA; 1. **Either store the w-component: 1 for positions and 0 for vectors**&#xD;&#xA; 2. **Or call different matrix-vector multiplication functions and implicitly pass the 'w' component by choosing one of either functions**&#xD;&#xA;&#xD;&#xA;One must pick one of them, it is not possible to store only {x, y, z} and still use only one matrix-vector multiplication function.&#xD;&#xA;XNA for example uses the latter approach by having 2 Transform functions in its [Vector3][1] class, called `Transform` and `TransformNormal`&#xD;&#xA;&#xD;&#xA;Here is a code example that shows both approaches and demonstrates the need to distinguish both kind of vectors in 1 of the 2 possible ways. We will move a game-entity with a position and a look-direction in the world by transforming it with a matrix. If we don't use the 'w' component, we can't use the same matrix-vector multiplication anymore, as this example demonstrates. If we do it anyway, we will get a wrong answer for the transformed `look_dir` vector:&#xD;&#xA;&#xD;&#xA;    #include &lt;cstdio&gt;&#xD;&#xA;    #include &lt;cmath&gt;&#xD;&#xA;    &#xD;&#xA;    struct vector3&#xD;&#xA;    {&#xD;&#xA;        vector3() {}&#xD;&#xA;        vector3(float _x, float _y, float _z) { x = _x; y = _y; z = _z; }&#xD;&#xA;        float x, y, z;    &#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct vector4&#xD;&#xA;    {&#xD;&#xA;        vector4() {}&#xD;&#xA;        vector4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; }&#xD;&#xA;        float x, y, z, w;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    struct matrix&#xD;&#xA;    {&#xD;&#xA;        // convenience column accessors&#xD;&#xA;        vector4&amp;        operator[](int col)         { return cols[col]; }&#xD;&#xA;        const vector4&amp;  operator[](int col) const   { return cols[col]; }&#xD;&#xA;        vector4 cols[4];&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // since we transform a vector that stores the 'w' component, &#xD;&#xA;    // we just need this one matrix-vector multiplication&#xD;&#xA;    vector4 operator*( const matrix &amp;m, const vector4 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector4 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z;&#xD;&#xA;    	ret.w = v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // if we don't store 'w' in the vector we need 2 different transform functions&#xD;&#xA;    // this to transform points (w==1), i.e. positions&#xD;&#xA;    vector3 TransformV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 1.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 1.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 1.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // and this one is to transform vectors (w==0), like a direction-vector&#xD;&#xA;    vector3 TransformNormalV3( const matrix &amp;m, const vector3 &amp;v )&#xD;&#xA;    {&#xD;&#xA;        vector3 ret;&#xD;&#xA;    	ret.x = v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + 0.0f * m[3].x;&#xD;&#xA;    	ret.y = v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + 0.0f * m[3].y;&#xD;&#xA;    	ret.z = v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + 0.0f * m[3].z;&#xD;&#xA;        return ret;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // some helpers to output the results&#xD;&#xA;    void PrintV4(const char *msg, const vector4 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f %10.6f\n&quot;,  msg, p.x, p.y, p.z, p.w ); }&#xD;&#xA;    void PrintV3(const char *msg, const vector3 &amp;p )  { printf(&quot;%-15s: %10.6f %10.6f %10.6f\n&quot;,         msg, p.x, p.y, p.z); }&#xD;&#xA;    &#xD;&#xA;    #define STORE_W     1&#xD;&#xA;    &#xD;&#xA;    int main()&#xD;&#xA;    {&#xD;&#xA;        // suppose we have a &quot;position&quot; of an entity and its &#xD;&#xA;        // look direction &quot;look_dir&quot; which is a unit vector&#xD;&#xA;&#xD;&#xA;        // we will move this entity in the world&#xD;&#xA; &#xD;&#xA;        // the entity will be moved in the world by a translation &#xD;&#xA;        // in x+5 and a rotation of 90 degrees around the y-axis &#xD;&#xA;        // let's create that matrix first&#xD;&#xA;&#xD;&#xA;        // the rotation angle, 90 degrees in radians&#xD;&#xA;        float a = 1.570796326794896619f;&#xD;&#xA;        matrix moveEntity;&#xD;&#xA;        moveEntity[0] = vector4( cos(a), 0.0f, sin(a), 0.0f);&#xD;&#xA;        moveEntity[1] = vector4(   0.0f, 1.0f,   0.0f, 0.0f);&#xD;&#xA;        moveEntity[2] = vector4(-sin(a), 0.0f, cos(a), 0.0f);&#xD;&#xA;        moveEntity[3] = vector4(   5.0f, 0.0f,   0.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;    #if STORE_W&#xD;&#xA;    &#xD;&#xA;        vector4 position(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector4 look_dir(1.0f, 0.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we can use the same function for the matrix-vector multiplication to transform &#xD;&#xA;        // the position and the unit vector since we store 'w' in the vector&#xD;&#xA;        position = moveEntity * position;&#xD;&#xA;        look_dir = moveEntity * look_dir;&#xD;&#xA;    &#xD;&#xA;        PrintV4(&quot;position&quot;, position);&#xD;&#xA;        PrintV4(&quot;look_dir&quot;, look_dir);&#xD;&#xA;    &#xD;&#xA;    #else&#xD;&#xA;    &#xD;&#xA;        vector3 position(0.0f, 0.0f, 0.0f);&#xD;&#xA;        // entity is looking towards the positive x-axis&#xD;&#xA;        vector3 look_dir(1.0f, 0.0f, 0.0f);&#xD;&#xA;    &#xD;&#xA;        // move the entity using the matrix&#xD;&#xA;        // we have to call 2 different transform functions one to transform the position &#xD;&#xA;        // and the other one to transform the unit-vector since we don't &#xD;&#xA;        // store 'w' in the vector&#xD;&#xA;        position = TransformV3(moveEntity, position);&#xD;&#xA;        look_dir = TransformNormalV3(moveEntity, look_dir);&#xD;&#xA;    &#xD;&#xA;        PrintV3(&quot;position&quot;, position);&#xD;&#xA;        PrintV3(&quot;look_dir&quot;, look_dir);&#xD;&#xA;    &#xD;&#xA;    #endif&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Initial Entity state:&#xD;&#xA;&#xD;&#xA;    position       :   0.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   1.000000   0.000000   0.000000   0.000000&#xD;&#xA;&#xD;&#xA;Now a transformation with a translation of x+5 and a rotation of 90 degrees around the y-axis will be applied to this entity.&#xD;&#xA;The correct answer after the tranformation is:&#xD;&#xA;&#xD;&#xA;    position       :   5.000000   0.000000   0.000000   1.000000&#xD;&#xA;    look_dir       :   0.000000   0.000000   1.000000   0.000000&#xD;&#xA;&#xD;&#xA;We will only get the correct answer if we distinguish vectors with w==0 and vectors with w==1 in one of the above presented ways.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199673%28v=XNAGameStudio.20%29.aspx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31708" PostHistoryTypeId="2" PostId="14190" RevisionGUID="67b2dfeb-8c7e-4b26-859b-cf749d64f6d8" CreationDate="2011-06-26T09:49:53.937" UserId="741" Text="The historical reason for this is somewhat different from the current reasoning - previously it was to have a 'safe' screen to go back to which was always resident in memory, so that if the game had gone to a demo loop and the player touched the controller, it could instantly return to the start screen and let interaction commence with no delay.&#xD;&#xA;&#xD;&#xA;However typically these days it serves another purpose. For 360 at least, the start screen is deliberately user-agnostic. Nothing on the start screen requires knowledge of which user  is actively playing the game. You get to the start screen without loading any save data, and without requiring a user to be logged in. So you can get to the start screen quickly and without having to show any TCR compliant messages.&#xD;&#xA;&#xD;&#xA;Requiring the user to press start gets you a key piece of information: which controller is the primary controller. It's not necessarily the first or only controller connected, and you might have several equally valid controllers to choose from. You don't know which one the user has actually picked up though until they've pressed a button on it. Once that controller is used, it will remain the primary controller for the rest of the gameplay session.&#xD;&#xA;&#xD;&#xA;On 360, finding out what the primary controller is also typically gets you another bit of information: which user is playing the game. Because each user is bound to a single controller, you know which user is playing, and from that you know which save data to load. Many / most of the content on the 360 is bound to specific users, so it's important to determine who is playing the game before continuing. If no-one is logged into the console, games will typically prompt at this point for a user to log in, or ask if the player is happy to play as a 'guest', i.e. without saving (because with no user, there's nowhere to save to).&#xD;&#xA;&#xD;&#xA;You'll also find that, typically, changing users (by signing out and back in) will cause you to return to the start screen. This is because the relevant user-specific data is loaded after this point in the game, and the start screen is the easiest point in the user interface flow where you know exactly what data is loaded (none)." />
  <row Id="31709" PostHistoryTypeId="2" PostId="14191" RevisionGUID="f6b0736b-d7cb-4d1c-97c4-dd5d84edf2a5" CreationDate="2011-06-26T10:00:13.950" UserId="6708" Text="In case anyone follows up on this post, here is how i finally solved it:&#xD;&#xA;&#xD;&#xA;Having a VB pool with equally large buffers is a nice idea, but in my case, it ate **almost 300mb of ram** which only left 200 for the rest of the game (since the target platforms are both pc and xbox 360). This led me to a similar yet cheaper solution after several nights of tweaking :)&#xD;&#xA;&#xD;&#xA;I still have a VB pool, but each VB has a custom tailored size for the world data within that cell. When a VB item gets recycled (the cell moves outside the players visibility scope) i check if the next batch has any cells which require a VB of the same size or less. This approach lets me reuse enough buffers to keep the fps smooth, yet resulting in a memory consumption of **between 80-90 mb of ram**. Not bad!" />
  <row Id="31710" PostHistoryTypeId="2" PostId="14192" RevisionGUID="b7ca27e5-432d-4207-9763-4b608f2c8cd1" CreationDate="2011-06-26T11:45:00.900" UserId="51" Text="Chances are you'll be iterating over your collection a *lot* more than inserting/deleting screens, so `vector` is probably the best choice.  Sure, inserting and removing things from the middle of vectors is &quot;slow&quot; if you just look at &quot;Big O&quot;, but in practice it's actually really fast simply because your elements are contiguous in memory.  It's highly unlikely that you have so many screens that it becomes an issue.&#xD;&#xA;&#xD;&#xA;Then again if you ask me I'll say never use `list` unless there's a really, really good reason to and benchmarks show that it's faster for that particular use case.&#xD;&#xA;&#xD;&#xA;I'll point to my answer in the [when should vector/list be used](http://gamedev.stackexchange.com/questions/4887/when-should-vector-list-be-used/4888#4888) question to go into more detail.&#xD;&#xA;&#xD;&#xA;Also, if you end up using `map`, make sure your keys are something that's fast to compare (i.e. not strings).  If you must use string keys, use a hash map like `unordered_map`.&#xD;&#xA;" />
  <row Id="31711" PostHistoryTypeId="2" PostId="14193" RevisionGUID="f2c54ceb-a570-4260-a4f8-21320b471e61" CreationDate="2011-06-26T12:12:49.560" UserId="4662" Text="Vector is a great choice- very fast iteration. You'd need an extremely high amount of Scenes to make inserting one, even at the beginning, to be slow for a vector. This is especially true if you're storing pointers rather than values." />
  <row Id="31712" PostHistoryTypeId="25" PostId="14187" RevisionGUID="a2e5f52d-7d0a-4f5b-aff0-c1a2a819f108" CreationDate="2011-06-26T12:25:16.313" Comment="http://twitter.com/#!/StackGameDev/status/84960414152142848" />
  <row Id="31713" PostHistoryTypeId="5" PostId="14176" RevisionGUID="f353641c-89bc-4eef-bf7f-7d43924310a7" CreationDate="2011-06-26T12:52:02.773" UserId="189" Comment="added 129 characters in body" Text="Well, seeing as you use the += operator to add a button, perhaps you use the -= operator to remove one? So something like the following *pseudocode*:&#xD;&#xA;&#xD;&#xA;    mybutton = buttonInstance.create(&quot;click on me&quot;)&#xD;&#xA;    Gui += mybutton&#xD;&#xA;    // when it comes time to remove the button...&#xD;&#xA;    Gui -= mybutton&#xD;&#xA;&#xD;&#xA;I'm just speculating here, but I would be surprised to find otherwise, because it would strike me as inconsistent for `+` to add but `-` not to remove.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;According to Gajet in the comments, `Gui.desktop()-&gt;removeChild(mybutton)` is the proper code to remove a GUI element." />
  <row Id="31714" PostHistoryTypeId="2" PostId="14194" RevisionGUID="e3c349e1-724a-41d5-840c-d4bd63306294" CreationDate="2011-06-26T13:19:10.747" UserId="1156" Text="I have been wondering whether using SpriteBatch is the *best* option. Obviously for prototyping or small games it works well.&#xD;&#xA;However, I've been wanting to apply techniques such as shaders and lighting to my game. I know you can use shaders to some extent with `SpriteSortMode.Immediate`, but I'm not sure if you lose power using that.&#xD;&#xA;&#xD;&#xA;The other major thing is that you cannot store your vertex data in the graphics memory with buffers. &#xD;&#xA;&#xD;&#xA;In summary, is there an advantage of using `VertexTextureNormal` (or whatever they're called) structs for vertex data for 2D sprites, or should I stick with SpriteBatch, provided I wish to use shaders?&#xD;&#xA;" />
  <row Id="31715" PostHistoryTypeId="1" PostId="14194" RevisionGUID="e3c349e1-724a-41d5-840c-d4bd63306294" CreationDate="2011-06-26T13:19:10.747" UserId="1156" Text="Using raw vertex information for sprites rather than SpriteBatch in XNA" />
  <row Id="31716" PostHistoryTypeId="3" PostId="14194" RevisionGUID="e3c349e1-724a-41d5-840c-d4bd63306294" CreationDate="2011-06-26T13:19:10.747" UserId="1156" Text="&lt;xna&gt;&lt;shaders&gt;&lt;sprites&gt;&lt;vertex&gt;&lt;spritebatch&gt;" />
  <row Id="31717" PostHistoryTypeId="2" PostId="14195" RevisionGUID="0dc1bd04-5b8e-42fe-8b0f-7514bdbc2a3c" CreationDate="2011-06-26T13:44:50.987" UserId="288" Text="If you are using XNA 4.0 you can use shaders with any `SpriteSortMode`. To do so you pass an `Effect` to one of the overloads of `SpriteBatch.Begin` that accepts it as a parameter.&#xD;&#xA;&#xD;&#xA;In XNA 3.1 and earlier `Immediate` was the fastest mode. In XNA 4.0 it is the *slowest*.&#xD;&#xA;&#xD;&#xA;`SpriteBatch` uses a dynamic vertex buffer internally. It is pretty much the best strategy for doing what it does (batching together arbitrary sprite draws).&#xD;&#xA;&#xD;&#xA;You could recreate `SpriteBatch`, adding or removing functionality and potentially changing the performance profile. But you should probably avoid doing that.&#xD;&#xA;&#xD;&#xA;`SpriteBatch` &quot;uses&quot; up performance in the following ways: It does some CPU-based transformations (cheap CPU), possibly some sorting depending on mode (cheap CPU), and sends data to the GPU in batches (somewhat heavy CPU &lt;i&gt;per batch&lt;/i&gt;, cheap bandwidth). Then on the GPU it has negligible vertex costs, and pixel costs that will depend mostly on your pixel shader and what you are drawing (ie: very little to do with `SpriteBatch` itself).&#xD;&#xA;&#xD;&#xA;So if you can &quot;bake&quot; your vertices into a regular vertex buffer, instead of a dynamic one, you can shave off some time. You could also micro-optimise the draw calls and the transformations they do. These will get you very tiny performance improvements - generally not worth it unless you are doing large particle systems.&#xD;&#xA;&#xD;&#xA;You can probably get much better optimisation results by optimising your batching (&lt;a href=&quot;http://gamedev.stackexchange.com/questions/9277/optimizing-an-xna-2d-game&quot;&gt;see this question and answer&lt;/a&gt;) - grouping textures together and **particularly** by not using `Immediate` sort mode in XNA 4.0. Or by optimising your pixel shader if you are GPU-bound, or other areas of your program if you are CPU-bound.&#xD;&#xA;&#xD;&#xA;**Rewriting SpriteBatch is almost always not worth the effort.**&#xD;&#xA;&#xD;&#xA;**As always with optimising for performance: *Measure It!***" />
  <row Id="31718" PostHistoryTypeId="2" PostId="14196" RevisionGUID="cc9e034b-0dea-4353-8d5d-890bdc031b2b" CreationDate="2011-06-26T15:17:35.827" UserId="1101" Text="&gt; I reckon it would be cool that both troll and werewolf inherited its attributes from enemy and overwrote some of them. &#xD;&#xA;&#xD;&#xA;Unfortunately this approach to polymorphism, popular in the 90s, has shown itself to be a bad idea in practice. Imagine you add 'wolf' to the enemy list - well, it shares some attributes with werewolf, so you'd want to consolidate those into a shared base class, eg. 'WolfLike'. Now you add 'Human' to the enemy list, but werewolves are sometimes humans, so they share attributes too, such as walking on 2 legs, being able to talk, etc. Do you create a 'Humanoid' common base for humans and werewolves, and do you then have to stop werewolves deriving from WolfLike? Or do you multiply inherit from both - in which case, which attribute takes precedence when something in Humanoid clashes with something in WolfLike?&#xD;&#xA;&#xD;&#xA;The problem is that trying and model the real world as a tree is ineffective. Take any 3 things and you can probably find 4 different ways to factor their behaviour into shared and non-shared. This is why many have turned to a modular or component-based model instead, where an object is comprised of several smaller objects that make up the whole, and the smaller objects can be swapped or change to make up the behaviour you want. Here you might have just 1 Enemy class, and it contains sub-objects or components for how it walks (eg. Bipedal vs. Quadrupedal), its methods of attack (eg. bite, claw, weapon, fist), its skin (green for trolls, furry for werewolves and wolves), etc. &#xD;&#xA;&#xD;&#xA;This is still completely object-oriented, but the notion of what is a useful object is different from what used to be commonly taught in the text books. Rather than having a large inheritance tree of various abstract classes and several concrete classes at the tips of the tree, you typically have just 1 concrete class representing an abstract concept (eg. 'enemy') but which contain more concrete classes representing more abstract concepts (eg. attacks, skin type). Sometimes these second classes can be best implemented via 1 level of inheritance (eg. a base Attack class and several derived classes for specific attacks) but the deep inheritance tree is gone.&#xD;&#xA;&#xD;&#xA;&gt; But maybe classes are too heavy to be practical, I don't know...&#xD;&#xA;&#xD;&#xA;In most modern languages, classes aren't 'heavy'. They're just another way of writing code, and they usually just wrap the procedural approach you would have written anyway, except with easier syntax. But by all means, don't write a class where a function will do. Classes are not intrinsically better, only where they make the code easier to manage or to understand." />
  <row Id="31719" PostHistoryTypeId="25" PostId="14179" RevisionGUID="bbae96e1-881f-4889-a201-f720d6418152" CreationDate="2011-06-26T15:25:16.320" Comment="http://twitter.com/#!/StackGameDev/status/85005712782139393" />
  <row Id="31720" PostHistoryTypeId="2" PostId="14197" RevisionGUID="8d85335d-8b25-40f7-88d2-1a2e921f5301" CreationDate="2011-06-26T15:34:54.753" UserId="8261" Text="I have been searching google, Apache Docs*, and FlashPunk forums looking for an answer to this: I cannot get Ant/Flex to find and compile the FlashPunk libraries.&#xD;&#xA;&#xD;&#xA;Here is my build.xml.&#xD;&#xA;&#xD;&#xA;[code]&#xD;&#xA;&lt;project&gt;&#xD;&#xA;	&lt;!-- Flex SDK Properties --&gt;&#xD;&#xA;	&lt;property name=&quot;FLEX_HOME&quot; value=&quot;/opt/flex&quot;/&gt;&#xD;&#xA;	&lt;property name=&quot;MXMLC.JAR&quot; value=&quot;${FLEX_HOME}/lib/mxmlc.jar&quot;/&gt;&#xD;&#xA;	&lt;!-- Project Properties --&gt;&#xD;&#xA;	&lt;property name=&quot;PROJECT_PATH&quot; &#xD;&#xA;         value=&quot;/media/Lexar_32G/Dev/ActionScript/FlashPunk/FP_Tut_Vid_ep01&quot;/&gt;&#xD;&#xA;	&lt;property name=&quot;SOURCE_PATH&quot; value=&quot;${PROJECT_PATH}&quot;/&gt;&#xD;&#xA;	&lt;property name=&quot;OUTPUT_PATH&quot; value=&quot;${PROJECT_PATH}&quot;/&gt;&#xD;&#xA;	&lt;property name=&quot;FLASHPUNK_PATH&quot; value=&quot;/media/Lexar_32G/Dev/ActionScript/FlashPunk&quot;/&gt;&#xD;&#xA;	&#xD;&#xA;	&lt;!-- Fetch the JAR full of Flex tasks if it is not already in the source directory --&gt;&#xD;&#xA;	&lt;copy file=&quot;${FLEX_HOME}/ant/lib/flexTasks.jar&quot; todir=&quot;${SOURCE_PATH}&quot;/&gt;&#xD;&#xA;	&lt;!-- Add flextasks to the project --&gt;&#xD;&#xA;	&lt;taskdef resource=&quot;flexTasks.tasks&quot; classpath=&quot;${SOURCE_PATH}/flexTasks.jar&quot;&gt;&lt;/taskdef&gt;&#xD;&#xA;&#xD;&#xA;	&lt;!-- Release build Flash Player 10.1 --&gt;&#xD;&#xA;	&lt;target name=&quot;build&quot;&gt;&#xD;&#xA;	&#xD;&#xA;        &lt;!-- Build the FlashPunk library --&gt;&#xD;&#xA;	&lt;echo message=&quot;building swc...&quot; /&gt;&#xD;&#xA;	&lt;compc output=&quot;FlashPunk.swc&quot; keep-generated-actionscript=&quot;false&quot; &#xD;&#xA;        incremental=&quot;false&quot; optimize=&quot;false&quot; debug=&quot;true&quot; use-network=&quot;false&quot;&gt;&#xD;&#xA;	    &lt;include-sources dir=&quot;${FLASHPUNK_PATH}/net&quot; &#xD;&#xA;            includes=&quot;**/* flashpunk/utils/* flashpunk/masks/*&quot; &#xD;&#xA;            excludes=&quot;**/*.TTF **/*.png&quot;/&gt;&#xD;&#xA;            &lt;load-config filename=&quot;${FLEX_HOME}/frameworks/flex-config.xml&quot;/&gt;      &#xD;&#xA;        &lt;/compc&gt;&#xD;&#xA;		&#xD;&#xA;        &lt;echo message=&quot;building swf...&quot; /&gt;&#xD;&#xA;	    &#xD;&#xA;	&lt;mxmlc&#xD;&#xA;	file=&quot;${SOURCE_PATH}/epOne.as&quot; &#xD;&#xA;	output=&quot;${OUTPUT_PATH}/epOne.swf&quot;&#xD;&#xA;	debug=&quot;false&quot; &#xD;&#xA;	incremental=&quot;false&quot;&#xD;&#xA;	strict=&quot;true&quot;&#xD;&#xA;	accessible=&quot;false&quot;&#xD;&#xA;	link-report=&quot;link_report.xml&quot;&#xD;&#xA;	static-link-runtime-shared-libraries=&quot;true&quot;&gt;&#xD;&#xA;	&#xD;&#xA;            &lt;optimize&gt;true&lt;/optimize&gt;&#xD;&#xA;&#xD;&#xA;        &lt;/mxmlc&gt;&#xD;&#xA;	&lt;/target&gt;&#xD;&#xA;	&#xD;&#xA;&lt;/project&gt;&#xD;&#xA;[/code]&#xD;&#xA;&#xD;&#xA;Results in many errors of the type &quot;Definition net.flashpunk.masks:Grid could not be found&quot; even though when I open the directories I can see the *.AS files right there.&#xD;&#xA;&#xD;&#xA;Sorry if this is very basic.  I am piecing together knowledge of Ant from docs and tutorials.&#xD;&#xA;&#xD;&#xA;*I decided to use Ant because neither FlashDevelop for Windows nor Eclipse for Linux seemto work for me." />
  <row Id="31721" PostHistoryTypeId="1" PostId="14197" RevisionGUID="8d85335d-8b25-40f7-88d2-1a2e921f5301" CreationDate="2011-06-26T15:34:54.753" UserId="8261" Text="Flex 4 + Apache Ant, Cannot Load FlashPunk Libraries" />
  <row Id="31722" PostHistoryTypeId="3" PostId="14197" RevisionGUID="8d85335d-8b25-40f7-88d2-1a2e921f5301" CreationDate="2011-06-26T15:34:54.753" UserId="8261" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;ant&gt;" />
  <row Id="31723" PostHistoryTypeId="2" PostId="14198" RevisionGUID="38ffef78-1c44-4460-949d-12231210b81c" CreationDate="2011-06-26T15:51:30.800" UserId="2287" Text="In various math libraries developed for game engines, I see 2x2 and 3x3 square matrices having this function (along with some helper functions). I tried to find information regarding it but did not come across game specific material (wikipedia entry is quite heavy and does not relate to games).&#xD;&#xA;&#xD;&#xA;It would be great if in your answer, you could provide an example or two on how it is used in games." />
  <row Id="31724" PostHistoryTypeId="1" PostId="14198" RevisionGUID="38ffef78-1c44-4460-949d-12231210b81c" CreationDate="2011-06-26T15:51:30.800" UserId="2287" Text="What is eigenvalue decomposition and why would it be useful in games?" />
  <row Id="31725" PostHistoryTypeId="3" PostId="14198" RevisionGUID="38ffef78-1c44-4460-949d-12231210b81c" CreationDate="2011-06-26T15:51:30.800" UserId="2287" Text="&lt;math&gt;&lt;matrix&gt;" />
  <row Id="31726" PostHistoryTypeId="6" PostId="14198" RevisionGUID="a8bd3c1e-e9f8-4833-b4a3-ca7bc421cceb" CreationDate="2011-06-26T15:58:45.710" UserId="2287" Comment="edited tags" Text="&lt;math&gt;&lt;matrix&gt;&lt;rotation&gt;" />
  <row Id="31727" PostHistoryTypeId="25" PostId="14194" RevisionGUID="68a1abe2-29f9-41a4-a4bb-0b1dec12c71f" CreationDate="2011-06-26T18:25:17.170" Comment="http://twitter.com/#!/StackGameDev/status/85051013945507840" />
  <row Id="31728" PostHistoryTypeId="2" PostId="14199" RevisionGUID="2b3ba2e3-d995-477f-9569-1cb30501dca1" CreationDate="2011-06-26T18:39:28.427" UserId="7103" Text="In XNA, the system calls update and draw function with the time information. This contains information such as how much time has passed since last update was called. This makes easy to integrate time and do animation calculation accordingly. But I dont see any such mechanism in openGL. I see openGL requires programmers to have their own implementation which could be buggy or inefficient. Is there any standard (and efficient) code that demonstrate this practice in openGL?" />
  <row Id="31729" PostHistoryTypeId="1" PostId="14199" RevisionGUID="2b3ba2e3-d995-477f-9569-1cb30501dca1" CreationDate="2011-06-26T18:39:28.427" UserId="7103" Text="Time calculation between openGL update calls." />
  <row Id="31730" PostHistoryTypeId="3" PostId="14199" RevisionGUID="2b3ba2e3-d995-477f-9569-1cb30501dca1" CreationDate="2011-06-26T18:39:28.427" UserId="7103" Text="&lt;xna&gt;&lt;opengl&gt;&lt;timer&gt;" />
  <row Id="31731" PostHistoryTypeId="2" PostId="14200" RevisionGUID="9a4b58da-bd63-4451-90b2-b5becdbcbd5f" CreationDate="2011-06-26T19:04:10.103" UserId="5966" Text="I'm trying to picking some object with `rayTest` method of BulletPhysics. The problem is my stage is surrounded with walls (`btStaticPlane`) and the target objects (`btSphereShape`) are in there. And I'm trying to pick with a line from the outside of the surrounding box.&#xD;&#xA;&#xD;&#xA;So I have to exclude the planes from `rayTest`. How can I do this?&#xD;&#xA;" />
  <row Id="31732" PostHistoryTypeId="1" PostId="14200" RevisionGUID="9a4b58da-bd63-4451-90b2-b5becdbcbd5f" CreationDate="2011-06-26T19:04:10.103" UserId="5966" Text="How can I exclude some rigid body from rayTest in Bullet Physics?" />
  <row Id="31733" PostHistoryTypeId="3" PostId="14200" RevisionGUID="9a4b58da-bd63-4451-90b2-b5becdbcbd5f" CreationDate="2011-06-26T19:04:10.103" UserId="5966" Text="&lt;bullet-physics&gt;&lt;ray-casting&gt;" />
  <row Id="31734" PostHistoryTypeId="2" PostId="14201" RevisionGUID="f4fc48c5-1cca-4292-b9f0-6aa361c99433" CreationDate="2011-06-26T19:24:01.753" UserId="4662" Text="I'm curious- what operations are there in Direct3D that *aren't* controlled directly through shader, or directly to do with shader manipulation- i.e., that occur behind the scenes.&#xD;&#xA;&#xD;&#xA;So far, I've got just pixel interpolation." />
  <row Id="31735" PostHistoryTypeId="1" PostId="14201" RevisionGUID="f4fc48c5-1cca-4292-b9f0-6aa361c99433" CreationDate="2011-06-26T19:24:01.753" UserId="4662" Text="Hidden operations of the Direct3D pipeline" />
  <row Id="31736" PostHistoryTypeId="3" PostId="14201" RevisionGUID="f4fc48c5-1cca-4292-b9f0-6aa361c99433" CreationDate="2011-06-26T19:24:01.753" UserId="4662" Text="&lt;directx&gt;" />
  <row Id="31737" PostHistoryTypeId="2" PostId="14202" RevisionGUID="d6b62110-0421-4ab6-be7b-1e0923d0aaae" CreationDate="2011-06-26T19:49:31.040" UserId="744" Text="XNA can do this because it knows it's sitting on top of a Windows-like platform, and therefore has Windows-compatible timer functions. OpenGL can sit on top of any OS, and therefore it can't provide any such thing itself.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.glfw.org/&quot;&gt;GLFW&lt;/a&gt; provides a lightweight cross-platform wrapper around OpenGL, including high-precision timing routines.&#xD;&#xA;&#xD;&#xA;This is also something that is fairly straightforward to implement yourself, using `QueryPerformanceCounter` on Windows, `mach_absolute_time` on OS X, and `clock_gettime` on POSIX (e.g. Linux)." />
  <row Id="31738" PostHistoryTypeId="2" PostId="14203" RevisionGUID="631b890c-fe07-4cfb-aafe-a0a4468e8cf0" CreationDate="2011-06-26T20:07:36.960" UserId="4662" Text="As far as I know, eigenvalue decomposition is a middle-step that can be performed in some algorithms for things with more readily apparent uses, such as matrix inverting." />
  <row Id="31739" PostHistoryTypeId="2" PostId="14204" RevisionGUID="4ae955f4-d8ed-4935-b604-18183a140ee8" CreationDate="2011-06-26T20:15:59.473" UserId="7328" Text="when you call raytest function from `btCollisionWorld` class it returns all the object your ray hits [(according to this page)](http://www.bulletphysics.com/Bullet/BulletFull/classbtCollisionWorld.html). so you just need to iterator over all the collisions and then just pick the ones you want.&#xD;&#xA;&#xD;&#xA;you can also create a new instance of btCollisionWorld and call raytest from that instance.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31740" PostHistoryTypeId="5" PostId="14196" RevisionGUID="0842bb17-ff4d-4fac-8aa8-d84261ee68a4" CreationDate="2011-06-26T20:29:31.353" UserId="1101" Comment="clarification" Text="&gt; I reckon it would be cool that both troll and werewolf inherited its attributes from enemy and overwrote some of them. &#xD;&#xA;&#xD;&#xA;Unfortunately this approach to polymorphism, popular in the 90s, has shown itself to be a bad idea in practice. Imagine you add 'wolf' to the enemy list - well, it shares some attributes with werewolf, so you'd want to consolidate those into a shared base class, eg. 'WolfLike'. Now you add 'Human' to the enemy list, but werewolves are sometimes humans, so they share attributes too, such as walking on 2 legs, being able to talk, etc. Do you create a 'Humanoid' common base for humans and werewolves, and do you then have to stop werewolves deriving from WolfLike? Or do you multiply inherit from both - in which case, which attribute takes precedence when something in Humanoid clashes with something in WolfLike?&#xD;&#xA;&#xD;&#xA;The problem is that trying and model the real world as a tree of classes is ineffective. Take any 3 things and you can probably find 4 different ways to factor their behaviour into shared and non-shared. This is why many have turned to a modular or component-based model instead, where an object is comprised of several smaller objects that make up the whole, and the smaller objects can be swapped or change to make up the behaviour you want. Here you might have just 1 Enemy class, and it contains sub-objects or components for how it walks (eg. Bipedal vs. Quadrupedal), its methods of attack (eg. bite, claw, weapon, fist), its skin (green for trolls, furry for werewolves and wolves), etc. &#xD;&#xA;&#xD;&#xA;This is still completely object-oriented, but the notion of what is a useful object is different from what used to be commonly taught in the text books. Rather than having a large inheritance tree of various abstract classes and several concrete classes at the tips of the tree, you typically have just 1 concrete class representing an abstract concept (eg. 'enemy') but which contain more concrete classes representing more abstract concepts (eg. attacks, skin type). Sometimes these second classes can be best implemented via 1 level of inheritance (eg. a base Attack class and several derived classes for specific attacks) but the deep inheritance tree is gone.&#xD;&#xA;&#xD;&#xA;&gt; But maybe classes are too heavy to be practical, I don't know...&#xD;&#xA;&#xD;&#xA;In most modern languages, classes aren't 'heavy'. They're just another way of writing code, and they usually just wrap the procedural approach you would have written anyway, except with easier syntax. But by all means, don't write a class where a function will do. Classes are not intrinsically better, only where they make the code easier to manage or to understand." />
  <row Id="31741" PostHistoryTypeId="5" PostId="14069" RevisionGUID="352749f4-24b2-4d38-8086-ee8380cce4d0" CreationDate="2011-06-26T20:52:59.923" UserId="7328" Comment="added more descripted code to help understanding what it does." Text="you just have to generate some boundery for the blocks you are going to make, it may be due to the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine a block start from `NewStartPositionY` and ends to `NewEndPositionY`. and we know `GroundLevel` is the ground height (you consider it as zero) and `CeilingLevel` is the ceiling height. a character might jump at most `MaxJump` units. just another parameters might be `PlayerHeight` the height of character and `LastStartPositionY` and `LastEndPositionY` which define the last block, let's take `MinimumBlockSize` as the minimum size of platform : knowing all these values you can set your bounderies : &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	NewStartPositionY = GroundLevel;&#xD;&#xA;	NewEndPositionT = min (LastEndPositionY + MaxJump,  CeilingLevel - PlayerHeight)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	NewStartPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize)&#xD;&#xA;	NewEndPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize) + NewStartPositionY + MinimumBlockSize;&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;here is what the above code acually do I just expanded it since it seems to cause many a headache! (it just need more variables and do more operation but result is the same)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// -- first we define what are the bounderies generated block &#xD;&#xA;	// it's obvious that block can be under the ground level&#xD;&#xA;	MinimumBoundryY = GroundLevel;&#xD;&#xA;	// we need to make sure player can jump over the new level&#xD;&#xA;	// and at the same time we have to make sure player can go over it&#xD;&#xA;	// and not hit the ceiling so we choose the minimum value from them both&#xD;&#xA;	MaximumBoundryY = min(lastEndPositionY + maxJump, CeilingLevel - PlayerHeight)&#xD;&#xA;	// --now initialize startPoistion of the Block&#xD;&#xA;	// we want are block to at least have `MinimumBlockSize` height&#xD;&#xA;	// so the start position should be somewhere between `minimumBoundryY`&#xD;&#xA;	// and `MaximumBoundryY - MinimumBlockSize`&#xD;&#xA;	StartYRange = MaximumBoundryY - MinimumBoundryY - minimumBlockSize;&#xD;&#xA;	// and now we a random value we assign the accual value of new StartPosition&#xD;&#xA;	newStartPositionY = random() % StartYRange + MinimumBlockSize;&#xD;&#xA;	// --now as the last part we have to calculate endPosition of the new block&#xD;&#xA;	// again we first calculate the range for endPosition value.&#xD;&#xA;	// note that end position should always be somewhere between&#xD;&#xA;	// `beginPositionY + MinimumBlockHeight` and `maximumBlockHeight` so the range well be&#xD;&#xA;	EndYRange = MaximumBoundryY - newStartPositionY - MinimumBlockHeight;&#xD;&#xA;	// in the end just set the EndPosition of the Block, we now it's variation range&#xD;&#xA;	// and we know it's the minimum valid value is `beginPositionY + MinimumBlockheight`&#xD;&#xA;	NewEndPositionY = random() % EndYRange + newStartPositionY + MinimumBlockHeight;&#xD;&#xA;&#xD;&#xA;hoe this second code help you all understand what my code does! (and change your downvotes to upvotes :D).&#xD;&#xA;" />
  <row Id="31742" PostHistoryTypeId="5" PostId="14069" RevisionGUID="2a33890c-20cf-46d7-904d-de15fec63e5f" CreationDate="2011-06-26T21:03:38.267" UserId="7328" Comment="added 1 characters in body" Text="you just have to generate some boundery for the blocks you are going to make, it may be due to the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine a block start from `NewStartPositionY` and ends to `NewEndPositionY`. and we know `GroundLevel` is the ground height (you consider it as zero) and `CeilingLevel` is the ceiling height. a character might jump at most `MaxJump` units. just another parameters might be `PlayerHeight` the height of character and `LastStartPositionY` and `LastEndPositionY` which define the last block, let's take `MinimumBlockSize` as the minimum size of platform : knowing all these values you can set your bounderies : &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	NewStartPositionY = GroundLevel;&#xD;&#xA;	NewEndPositionT = min (LastEndPositionY + MaxJump,  CeilingLevel - PlayerHeight)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	NewStartPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize)&#xD;&#xA;	NewEndPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize) + NewStartPositionY + MinimumBlockSize;&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;here is what the above code acually do I just expanded it since it seems to cause many a headache! (it just need more variables and do more operation but result is the same)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// -- first we define what are the bounderies generated block &#xD;&#xA;	// it's obvious that block can be under the ground level&#xD;&#xA;	MinimumBoundryY = GroundLevel;&#xD;&#xA;	// we need to make sure player can jump over the new level&#xD;&#xA;	// and at the same time we have to make sure player can go over it&#xD;&#xA;	// and not hit the ceiling so we choose the minimum value from them both&#xD;&#xA;	MaximumBoundryY = min(lastEndPositionY + maxJump, CeilingLevel - PlayerHeight)&#xD;&#xA;	// --now initialize startPoistion of the Block&#xD;&#xA;	// we want are block to at least have `MinimumBlockSize` height&#xD;&#xA;	// so the start position should be somewhere between `minimumBoundryY`&#xD;&#xA;	// and `MaximumBoundryY - MinimumBlockSize`&#xD;&#xA;	StartYRange = MaximumBoundryY - MinimumBoundryY - minimumBlockSize;&#xD;&#xA;	// and now we a random value we assign the accual value of new StartPosition&#xD;&#xA;	newStartPositionY = random() % StartYRange + MinimumBlockSize;&#xD;&#xA;	// --now as the last part we have to calculate endPosition of the new block&#xD;&#xA;	// again we first calculate the range for endPosition value.&#xD;&#xA;	// note that end position should always be somewhere between&#xD;&#xA;	// `beginPositionY + MinimumBlockHeight` and `maximumBlockHeight` so the range well be&#xD;&#xA;	EndYRange = MaximumBoundryY - newStartPositionY - MinimumBlockHeight;&#xD;&#xA;	// in the end just set the EndPosition of the Block, we now it's variation range&#xD;&#xA;	// and we know it's the minimum valid value is `beginPositionY + MinimumBlockheight`&#xD;&#xA;	NewEndPositionY = random() % EndYRange + newStartPositionY + MinimumBlockHeight;&#xD;&#xA;&#xD;&#xA;hope this second code help you all understand what my code does! (and change your downvotes to upvotes :D).&#xD;&#xA;" />
  <row Id="31743" PostHistoryTypeId="25" PostId="14200" RevisionGUID="de791e01-15ac-49ee-9b14-13580f3ff8cc" CreationDate="2011-06-26T21:25:17.680" Comment="http://twitter.com/#!/StackGameDev/status/85096314857205760" />
  <row Id="31744" PostHistoryTypeId="2" PostId="14205" RevisionGUID="95720d32-2970-485b-a2a0-07aa2747f9d2" CreationDate="2011-06-26T21:37:03.773" UserId="1543" Text="Since there are both Python and Ruby apps on the Mac App Store I would imagine an embedded V8 engine would be allowed. I can't find anything in the guidelines that suggests otherwise.&#xD;&#xA;&#xD;&#xA;The guidelines do however explicitly state that &quot;Apps that download or install additional code or resources to add functionality or change their primary purpose will be rejected&quot;.&#xD;&#xA;&#xD;&#xA;So, as long as your app doesn't download any code, you should be ok.&#xD;&#xA;&#xD;&#xA;You can read the [Mac App Store Approval Guidelines here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/appstore/mac/resources/approval/guidelines.html" />
  <row Id="31745" PostHistoryTypeId="2" PostId="14206" RevisionGUID="bfea1970-5384-4abc-9451-76459f96d3b9" CreationDate="2011-06-26T21:38:04.587" UserId="7057" Text="Tessellation. It is a separate fixed function system that doesn't have a 1:1 with OpenGL and will result in different tessellation unlike shaders which can be ported fairly easily.&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb206188%28v=vs.85%29.aspx " />
  <row Id="31746" PostHistoryTypeId="2" PostId="14207" RevisionGUID="9b82d777-307d-4bc4-a525-9d3b22b62c9e" CreationDate="2011-06-26T21:39:49.497" UserId="634" Text="Eigenvalues and eigenvectors are very commonly used in math, so it's good to understand them even if you don't have an immediate use for the in games. They're generally covered near the end of an undergraduate-level linear algebra course. &#xD;&#xA;&#xD;&#xA;One I can think of is for dealing with the moment of inertia in physics. This is a symmetric positive-definite matrix, so all the eigenvalues are guaranteed to be real and positive. If you compute the [principal axes][1] of a rigid body (which are the eigenvectors of the matrix), you can rotate the body so that its moment of inertia is diagonal - this would allow you to store just the diagonal components as a vector3, instead of the full matrix.&#xD;&#xA;&#xD;&#xA;Another place I've seen them used is computing the [best-fit plane to a set of points][2], or to find the [best-fit bounding box][3] (section 6.1.2 in the link)&#xD;&#xA;&#xD;&#xA;Have you searched in the WildMagic or Ogre code to see where else they're used?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Principal_axis_%28mechanics%29#Principal_axes_of_inertia&#xD;&#xA;  [2]: http://www.geometrictools.com/Documentation/LeastSquaresFitting.pdf&#xD;&#xA;  [3]: http://www.geometrictools.com/Documentation/DynamicCollisionDetection.pdf" />
  <row Id="31747" PostHistoryTypeId="2" PostId="14208" RevisionGUID="7eef4466-73e8-4d54-a6fc-47fb3431ae87" CreationDate="2011-06-27T00:06:15.370" UserId="7872" Text="[Quel Solaar][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://news.quelsolaar.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially some of the older posts on there where he explains how he makes some of the various parts of the game work are very interesting." />
  <row Id="31748" PostHistoryTypeId="16" PostId="14208" RevisionGUID="1b91aa37-b978-416d-8f11-4e53d65511a9" CreationDate="2011-06-27T00:06:15.370" UserId="7872" />
  <row Id="31749" PostHistoryTypeId="25" PostId="14198" RevisionGUID="4a1bbaed-1b11-4da2-ac9a-e17c3f0950b9" CreationDate="2011-06-27T00:25:40.113" Comment="http://twitter.com/#!/StackGameDev/status/85141703991902208" />
  <row Id="31750" PostHistoryTypeId="2" PostId="14209" RevisionGUID="5da446a3-a8e1-4903-8064-1b5ee2d12d96" CreationDate="2011-06-27T00:37:36.930" UserId="5864" Text="You are experiencing the reason why many systems prefer to use a [Z-buffer][1] rather than the simpler but more error-prone [painter's algorithm][2]. Unless extremely strict rules are enforced on your objects, there is no way to sort them totally by depth without slicing them.&#xD;&#xA;&#xD;&#xA;It would help if you could show us what your objects look like, how you compute depth, and an example of the bugs you mention.&#xD;&#xA;&#xD;&#xA; [1]: http://en.wikipedia.org/wiki/Z-buffering&#xD;&#xA; [2]: http://en.wikipedia.org/wiki/Painter's_algorithm&#xD;&#xA;" />
  <row Id="31751" PostHistoryTypeId="25" PostId="14157" RevisionGUID="c39dedd6-abd2-448a-b537-ffaf75ca6da6" CreationDate="2011-06-27T03:25:40.487" Comment="http://twitter.com/#!/StackGameDev/status/85187006157697024" />
  <row Id="31752" PostHistoryTypeId="2" PostId="14210" RevisionGUID="69a3b09c-1082-4477-8166-2d7dbb23479f" CreationDate="2011-06-27T05:26:30.993" UserId="6068" Text="You need to compare your object's bound boxes and check if one object is supposed to be in front of each other, then apply a topological sort based on this information.&#xD;&#xA;&#xD;&#xA;Here are some articles with further details:&#xD;&#xA;&#xD;&#xA;http://bannalia.blogspot.com/2008/02/filmation-math.html&#xD;&#xA;&#xD;&#xA;http://bannalia.blogspot.com/2008/02/isometric-room.html" />
  <row Id="31753" PostHistoryTypeId="25" PostId="14181" RevisionGUID="bb78cd06-482d-44f5-8f72-c4b0db3b59f9" CreationDate="2011-06-27T06:25:39.553" Comment="http://twitter.com/#!/StackGameDev/status/85232302908653569" />
  <row Id="31754" PostHistoryTypeId="2" PostId="14211" RevisionGUID="30b07512-1061-40f6-ac80-84a269770e14" CreationDate="2011-06-27T08:17:51.307" UserId="7737" Text="Below stated  is the code for my pixel shader which I am rendering after the vertex shader.&#xD;&#xA;I have set the wordViewProjection matrix in my program but I don't know to  set the progress variable i.e in my pixel shader file which will make  the image displayed by the help of a quad to give out transition effect.&#xD;&#xA;Here is the code for my pixel shader program:::&#xD;&#xA;&#xD;&#xA;As my pixel shader is giving a static effect and now I want to use it to give some effect. So for this I have to add a progress variable in my pixel shader and initialize to the Constant table function i.e&#xD;&#xA;&#xD;&#xA;    constantTable.SetValue(D3DDevice,&quot;progress&quot;,progress );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am having the problem in using this function for progress in my program. Anybody know how to set this variable in my program.&#xD;&#xA;&#xD;&#xA;And my new pixel Shader code is&#xD;&#xA;&#xD;&#xA;    float progress : register(C0);&#xD;&#xA;sampler2D implicitInput : register(s0);&#xD;&#xA;sampler2D oldInput : register(s1);&#xD;&#xA;&#xD;&#xA;      struct VS_OUTPUT&#xD;&#xA;         {&#xD;&#xA;            float4 Position  : POSITION;&#xD;&#xA;              float4 Color     : COLOR0;&#xD;&#xA;             float2 UV        : TEXCOORD 0;&#xD;&#xA;         };&#xD;&#xA;&#xD;&#xA;           float4 Blinds(float2 uv)&#xD;&#xA;           {               &#xD;&#xA;            if(frac(uv.y * 5) &lt; progress)&#xD;&#xA;           {&#xD;&#xA;                 return tex2D(implicitInput, uv);&#xD;&#xA;          }&#xD;&#xA;          else&#xD;&#xA;          {&#xD;&#xA;                return tex2D(oldInput, uv);&#xD;&#xA;          }&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;        // Pixel Shader&#xD;&#xA;&#xD;&#xA;            {&#xD;&#xA;               return Blinds(input.UV);&#xD;&#xA;             } &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31755" PostHistoryTypeId="1" PostId="14211" RevisionGUID="30b07512-1061-40f6-ac80-84a269770e14" CreationDate="2011-06-27T08:17:51.307" UserId="7737" Text="How to run the pixel shader effcet??" />
  <row Id="31756" PostHistoryTypeId="3" PostId="14211" RevisionGUID="30b07512-1061-40f6-ac80-84a269770e14" CreationDate="2011-06-27T08:17:51.307" UserId="7737" Text="&lt;slimdx&gt;" />
  <row Id="31757" PostHistoryTypeId="2" PostId="14212" RevisionGUID="1675bfc1-db68-4a86-942a-c5d5b036c6d7" CreationDate="2011-06-27T09:02:38.850" UserId="7640" Text="Hey so i'm currently going through the [wildbunny blog][1] to learn about collision detection, but i'm a bit confused on how the vectors he's talking about come into play&#xD;&#xA;&#xD;&#xA;QUOTED BLOG:&#xD;&#xA;&#xD;&#xA;&gt; p = ||A-B|| – (r1+r2) &#xD;&#xA;&gt; &#xD;&#xA;&gt; The two spheres are penetrating by&#xD;&#xA;&gt; distance p. We would also like the&#xD;&#xA;&gt; penetration vector so that we can&#xD;&#xA;&gt; correct the penetration once we&#xD;&#xA;&gt; discover it. This is the vector that&#xD;&#xA;&gt; moves both circles to the point where&#xD;&#xA;&gt; they just touch, correcting the&#xD;&#xA;&gt; penetration. Importantly it is not&#xD;&#xA;&gt; only just a vector that does this, it&#xD;&#xA;&gt; is the only vector which corrects the&#xD;&#xA;&gt; penetration by moving the minimum&#xD;&#xA;&gt; amount. This is important because we&#xD;&#xA;&gt; only want to correct the error, not&#xD;&#xA;&gt; introduce more by moving too much when&#xD;&#xA;&gt; we correct, or too little.&#xD;&#xA;&gt; &#xD;&#xA;&gt; N = (A-B) / ||A-B||&#xD;&#xA;&gt; &#xD;&#xA;&gt; P = N*p&#xD;&#xA;&gt; &#xD;&#xA;&gt; Here we have calculated the normalised&#xD;&#xA;&gt; vector N between the two centres and&#xD;&#xA;&gt; the penetration vector P by&#xD;&#xA;&gt; multiplying our unit direction by the&#xD;&#xA;&gt; penetration distance.&#xD;&#xA;&#xD;&#xA;Ok so i understand that p is the distance each circle is penetrating each other, but i don't get what exactly N and P is. it seems to me N is just the coordinates of the 3rd point of the right trianlge formed by point A and B **(A-B)** then being divided by the hypotenuse of that triangle or distance between A and B **(||A-B||)** Whats the significance of this?&#xD;&#xA;&#xD;&#xA;Also, what is the penetration vector used for? It seems to me like a movement that one of the circles would perform to get un-penetrated.&#xD;&#xA;  [1]: http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/" />
  <row Id="31758" PostHistoryTypeId="1" PostId="14212" RevisionGUID="1675bfc1-db68-4a86-942a-c5d5b036c6d7" CreationDate="2011-06-27T09:02:38.850" UserId="7640" Text="Circle collision detection and Vector math: HELP?" />
  <row Id="31759" PostHistoryTypeId="3" PostId="14212" RevisionGUID="1675bfc1-db68-4a86-942a-c5d5b036c6d7" CreationDate="2011-06-27T09:02:38.850" UserId="7640" Text="&lt;collision-detection&gt;&lt;vector&gt;" />
  <row Id="31760" PostHistoryTypeId="25" PostId="14094" RevisionGUID="a4e394ba-72d7-42e1-a511-513b86bf601f" CreationDate="2011-06-27T09:25:40.317" Comment="http://twitter.com/#!/StackGameDev/status/85277604185255936" />
  <row Id="31761" PostHistoryTypeId="2" PostId="14213" RevisionGUID="dd9a885d-1b9c-42d2-b027-a27e39e44c25" CreationDate="2011-06-27T10:13:21.140" UserId="8050" Text="I assume that *A* and *B* are the centers of the two spheres: Sa, Sb.&#xD;&#xA;&#xD;&#xA;*V* = *A* - *B* is the vector that moves the center of Sa to the center of Sb: you see that *A* + *V* = *B*.&#xD;&#xA;&#xD;&#xA;||*A* - *B*|| is the magnitude of *V* or modulus or length - as you prefere - that is the distance of the two spheres: p is how much the spheres are too close to each other.&#xD;&#xA;&#xD;&#xA;*N* = *V* / ||*A* - *B*|| is a unit vector (length = 1)  that shares the same direction of *V* so P = *N*&amp;middot;p si a vector that has the same direction of *V* and the length of p.&#xD;&#xA;&#xD;&#xA;You don't want to move Sa toward Sb a little more so you will add *P* to *B* moving Sb far way from Sa in the right direction (*N*) and for the correct amount (p)." />
  <row Id="31762" PostHistoryTypeId="2" PostId="14214" RevisionGUID="b7161b30-718c-479d-9fcb-cb7d9a1516df" CreationDate="2011-06-27T10:21:29.517" UserId="3505" Text="The text is a bit unclear, using the word normal incorrectly. N is the normalised vector pointing from B to A, meaning it has the same direction as B to A but length 1.&#xD;&#xA;&#xD;&#xA;What are you trying to do by the way? The blog talks a lot of collision detection, but seemingly nothing about collision resolution, which depend on what kind of physics you'd like." />
  <row Id="31763" PostHistoryTypeId="2" PostId="14215" RevisionGUID="11e1d002-dfbb-464b-ab7a-5873ee5dd6a6" CreationDate="2011-06-27T10:33:42.933" UserId="8273" Text="I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use stencil buffer, to eliminate this problem, but I got sth like this(contour is green):&#xD;&#xA;&#xD;&#xA;http://goo.gl/OI5uc (sorry I can't post images, due to my reputation)&#xD;&#xA;&#xD;&#xA;You can see(where arrow points), that some parts of line are behind object, and some are above. This changes when I move camera, but always there is some part, that is covering it.&#xD;&#xA;Here is code, that I use for drawing object:&#xD;&#xA;&#xD;&#xA;        glColorMask(1,1,1,1);&#xD;&#xA;        std::list&lt;CObjectOnScene*&gt;::iterator objIter=ptr-&gt;objects.begin(),objEnd=ptr-&gt;objects.end();&#xD;&#xA;        int countStencilBit=1;&#xD;&#xA;        while(objIter!=objEnd)&#xD;&#xA;        {&#xD;&#xA;            glColorMask(1,1,1,1);&#xD;&#xA;            glStencilFunc(GL_ALWAYS,countStencilBit,countStencilBit);&#xD;&#xA;            glStencilOp(GL_REPLACE,GL_KEEP,GL_REPLACE );&#xD;&#xA;            (*objIter)-&gt;DrawYourVertices();&#xD;&#xA;&#xD;&#xA;            glStencilFunc(GL_NOTEQUAL,countStencilBit,countStencilBit);&#xD;&#xA;            glStencilOp(GL_KEEP,GL_KEEP,GL_REPLACE);&#xD;&#xA;            (*objIter)-&gt;DrawYourBorder();&#xD;&#xA;&#xD;&#xA;            ++objIter;&#xD;&#xA;            ++countStencilBit;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I've tried different settings of stencil buffer, but always I was getting sth like that.&#xD;&#xA;Here is question:&#xD;&#xA;**1.Am I setting stencil buffer wrong?**&#xD;&#xA;&#xD;&#xA;**2. Are there any other simple ways to create contour on such objects?**&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="31764" PostHistoryTypeId="1" PostId="14215" RevisionGUID="11e1d002-dfbb-464b-ab7a-5873ee5dd6a6" CreationDate="2011-06-27T10:33:42.933" UserId="8273" Text="Draw contour around object in Opengl" />
  <row Id="31765" PostHistoryTypeId="3" PostId="14215" RevisionGUID="11e1d002-dfbb-464b-ab7a-5873ee5dd6a6" CreationDate="2011-06-27T10:33:42.933" UserId="8273" Text="&lt;opengl&gt;&lt;c++&gt;&lt;graphics&gt;&lt;graphics-programming&gt;" />
  <row Id="31766" PostHistoryTypeId="2" PostId="14216" RevisionGUID="35d9c5a5-9a71-4d89-8b07-222be691beec" CreationDate="2011-06-27T10:46:38.610" UserId="2798" Text=" - Draw your entire scene, except highlighted objects.&#xD;&#xA; - Draw the objects you want to highlight, in pure color, sorted from back to front, and with a small scale applied (1.05f - 1.1f).&#xD;&#xA; - Draw the final objects, again, from back to front.&#xD;&#xA;&#xD;&#xA;For extra eye-candy, try drawing the contour pass to a separate render target and apply a small blur, then blend this texture with your final scene using the appropiate Z values." />
  <row Id="31767" PostHistoryTypeId="6" PostId="14215" RevisionGUID="d4a3a031-d90e-4fc9-93b0-0bd38c6cdc4b" CreationDate="2011-06-27T12:17:49.397" UserId="8273" Comment="edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;graphics&gt;&lt;directx&gt;&lt;graphics-programming&gt;" />
  <row Id="31768" PostHistoryTypeId="2" PostId="14217" RevisionGUID="9c706a99-89f0-4c58-918b-1b31b2442ae3" CreationDate="2011-06-27T12:23:38.580" UserId="8276" Text="I have a basic 2D tower defense game in C++.&#xD;&#xA;&#xD;&#xA;Each map is a separate class which inherits from GameState. The map delegates the logic and drawing code to each object in the game and sets data such as the map path.&#xD;&#xA;In pseudo-code the logic section might look something like this:  &#xD;&#xA;  &#xD;&#xA;    update():&#xD;&#xA;      for each creep in creeps:&#xD;&#xA;        creep.update()&#xD;&#xA;      for each tower in towers:&#xD;&#xA;        tower.update()&#xD;&#xA;      for each missile in missiles:&#xD;&#xA;        missile.update()&#xD;&#xA;&#xD;&#xA;The objects (creeps, towers and missiles) are stored in vector-of-pointers. The towers must have access to the vector-of-creeps and the vector-of-missiles.&#xD;&#xA;&#xD;&#xA;The question is: where do I declare the vectors? Should they be members of the Map class, and passed as arguments to the tower.update() function? Or declared globally? Or are there other solutions I'm missing entirely?" />
  <row Id="31769" PostHistoryTypeId="1" PostId="14217" RevisionGUID="9c706a99-89f0-4c58-918b-1b31b2442ae3" CreationDate="2011-06-27T12:23:38.580" UserId="8276" Text="Several classes need to access the same data, where should the data be declared?" />
  <row Id="31770" PostHistoryTypeId="3" PostId="14217" RevisionGUID="9c706a99-89f0-4c58-918b-1b31b2442ae3" CreationDate="2011-06-27T12:23:38.580" UserId="8276" Text="&lt;c++&gt;&lt;engine&gt;&lt;game-mechanics&gt;&lt;gameloop&gt;" />
  <row Id="31771" PostHistoryTypeId="25" PostId="14155" RevisionGUID="7651c662-31a6-4162-ab96-c8f32bfbb84b" CreationDate="2011-06-27T12:25:40.207" Comment="http://twitter.com/#!/StackGameDev/status/85322901888311297" />
  <row Id="31772" PostHistoryTypeId="2" PostId="14218" RevisionGUID="61e7855f-3091-47ec-b656-9c09e9f608be" CreationDate="2011-06-27T12:33:26.977" UserId="1156" Text="I personally would use polymorphism here. Why have a `missile` vector, a `tower` vector, and a `creep` vector..when they all call the same function; `update`? Why not have a vector of pointers to some base class `Entity` or `GameObject`?&#xD;&#xA;&#xD;&#xA;I find a good way to design is to think 'does this make sense in terms of ownership'? Obviously a tower owns a way to update itself, but does a map own all the objects on it? If you go for global, are you saying that nothing owns the towers and creeps? Global is usually a bad solution - it promotes bad design patterns, yet it is much easier to work with. Consider weighing up 'do I want to finish this?' and 'do I want something that I can reuse'?&#xD;&#xA;&#xD;&#xA;One way around this is some form of messaging system. The `tower` may send a message to the `map` (which it has access to, perhaps a reference to its owner?) that it hit a `creep`, and the `map` then tells the `creep` it's been hit. This is very clean and segregates data.&#xD;&#xA;&#xD;&#xA;Another way is to just search the map itself for what it wants. However, there may be issues with update order here." />
  <row Id="31773" PostHistoryTypeId="5" PostId="14217" RevisionGUID="3dd07bd5-de72-4ac5-80d2-ef7ca84e9148" CreationDate="2011-06-27T12:43:10.780" UserId="8276" Comment="added 44 characters in body" Text="I have a basic 2D tower defense game in C++.&#xD;&#xA;&#xD;&#xA;Each map is a separate class which inherits from GameState. The map delegates the logic and drawing code to each object in the game and sets data such as the map path.&#xD;&#xA;In pseudo-code the logic section might look something like this:  &#xD;&#xA;  &#xD;&#xA;    update():&#xD;&#xA;      for each creep in creeps:&#xD;&#xA;        creep.update()&#xD;&#xA;      for each tower in towers:&#xD;&#xA;        tower.update()&#xD;&#xA;      for each missile in missiles:&#xD;&#xA;        missile.update()&#xD;&#xA;&#xD;&#xA;The objects (creeps, towers and missiles) are stored in vector-of-pointers. The towers must have access to the vector-of-creeps and the vector-of-missiles to create new missiles and identify targets.&#xD;&#xA;&#xD;&#xA;The question is: where do I declare the vectors? Should they be members of the Map class, and passed as arguments to the tower.update() function? Or declared globally? Or are there other solutions I'm missing entirely?" />
  <row Id="31774" PostHistoryTypeId="2" PostId="14219" RevisionGUID="0f9a5481-0f47-4d87-93df-fe5a6295d71e" CreationDate="2011-06-27T13:10:17.300" UserId="1738" Text="Off the top of my head: There is triangle setup, triangle clipping, backface removal, rasterization, raster operations (blending), z testing, tessellation, texture filtering, shadow map texture depth testing, stencil ops, pixel/buffer format conversion." />
  <row Id="31775" PostHistoryTypeId="2" PostId="14220" RevisionGUID="75690a18-8754-4271-930c-19b35dcb73eb" CreationDate="2011-06-27T13:12:11.290" UserId="5019" Text="I’m learning java at the minute (first language) ; and as a project I’m looking a developing a simple puzzle game. &#xD;&#xA;My question relates to the methods within a class. I have my “Block” type class, it’s has it’s many attributes, set methods, get methods and just plain methods. There are quite a few. &#xD;&#xA;Then I have my main board class. At the moment it does most of the logic, positioning of sprites collision detection and then draws the sprites etc...&#xD;&#xA;As I am learning to program as much as I’m learning to program games I’m curious to know how much code is typically acceptable within a given method. Is there such thing as having too many methods? &#xD;&#xA;All my draw functionality happens in one method, should I break this into a few ‘sub’ methods? My thinking is if I find at a later stage that the for loop I’m using to cycle through the array of sprites searching for collisions  in the spriteCollision() method is inefficient I code a new method and just replace the old method calls with the new one, leaving the old code intact. &#xD;&#xA;Is it bad practice to have a method that contains one if statement, and place the call for that method in the for loop??&#xD;&#xA;I’m very much in the early stages of coding/designing and I need all the help I can get! &#xD;&#xA;I find it a little intimidating when people are talking about throwing together a prototype in a day too! Can’t wait until I’m that good! &#xD;&#xA;" />
  <row Id="31776" PostHistoryTypeId="1" PostId="14220" RevisionGUID="75690a18-8754-4271-930c-19b35dcb73eb" CreationDate="2011-06-27T13:12:11.290" UserId="5019" Text="Question on methods in Object Oriented Programming" />
  <row Id="31777" PostHistoryTypeId="3" PostId="14220" RevisionGUID="75690a18-8754-4271-930c-19b35dcb73eb" CreationDate="2011-06-27T13:12:11.290" UserId="5019" Text="&lt;java&gt;&lt;programming&gt;" />
  <row Id="31778" PostHistoryTypeId="2" PostId="14221" RevisionGUID="1f38e222-7ad4-47d4-b626-49ce1bf5feed" CreationDate="2011-06-27T13:22:18.470" UserId="1742" Text="Having read [this rant][1], I feel that they're probably right (seeing as the Xenon and the CELL BE are both highly sensitive to branchy and cache ignorant code), but I've heard that people are making games fine with C# too.&#xD;&#xA;&#xD;&#xA;So, is it true that it's impossible to do anything *professional* with XNA, or was the poster just missing what makes XNA the killer API for game development?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://numbersandlights.blogspot.com/2011/06/why-xna-sucks-short-essay.html" />
  <row Id="31779" PostHistoryTypeId="1" PostId="14221" RevisionGUID="1f38e222-7ad4-47d4-b626-49ce1bf5feed" CreationDate="2011-06-27T13:22:18.470" UserId="1742" Text="XNA and C# vs the 360's in order processor" />
  <row Id="31780" PostHistoryTypeId="3" PostId="14221" RevisionGUID="1f38e222-7ad4-47d4-b626-49ce1bf5feed" CreationDate="2011-06-27T13:22:18.470" UserId="1742" Text="&lt;xna&gt;&lt;c#&gt;&lt;xenon&gt;" />
  <row Id="31782" PostHistoryTypeId="5" PostId="14220" RevisionGUID="83cb1925-9f97-4fa7-9e86-ee8ca5af2d15" CreationDate="2011-06-27T13:54:10.647" UserId="1156" Comment="added 13 characters in body; edited tags" Text="I’m learning Java at the minute (first language), and as a project I’m looking at developing a simple puzzle game. &#xD;&#xA;&#xD;&#xA;My question relates to the methods within a class. I have my `Block` type class; it has its many attributes, set methods, get methods and just plain methods. There are quite a few.   &#xD;&#xA;Then I have my main board class. At the moment it does most of the logic, positioning of sprites collision detection and then draws the sprites etc...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As I am learning to program as much as I’m learning to program games I’m curious to know how much code is typically acceptable within a given method. Is there such thing as having too many methods?   &#xD;&#xA;&#xD;&#xA;All my draw functionality happens in one method, should I break this into a few ‘sub’ methods? My thinking is if I find at a later stage that the for loop I’m using to cycle through the array of sprites searching for collisions in the `spriteCollision()` method is inefficient I code a new method and just replace the old method calls with the new one, leaving the old code intact. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is it bad practice to have a method that contains one if statement, and place the call for that method in the for loop?&#xD;&#xA;I’m very much in the early stages of coding/designing and I need all the help I can get! &#xD;&#xA;I find it a little intimidating when people are talking about throwing together a prototype in a day too! Can’t wait until I’m that good! &#xD;&#xA;" />
  <row Id="31783" PostHistoryTypeId="6" PostId="14220" RevisionGUID="83cb1925-9f97-4fa7-9e86-ee8ca5af2d15" CreationDate="2011-06-27T13:54:10.647" UserId="1156" Comment="added 13 characters in body; edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;programming&gt;&lt;objects&gt;" />
  <row Id="31784" PostHistoryTypeId="6" PostId="14217" RevisionGUID="80c11cad-9a2b-4d30-8a10-881cc9a88fef" CreationDate="2011-06-27T13:56:39.123" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;architecture&gt;&lt;engine&gt;&lt;gameloop&gt;" />
  <row Id="31785" PostHistoryTypeId="5" PostId="14211" RevisionGUID="2756163a-ae83-4413-82b2-95643ae84aee" CreationDate="2011-06-27T14:00:46.797" UserId="2698" Comment="Neat indentation is worth having." Text="Below stated  is the code for my pixel shader which I am rendering after the vertex shader.&#xD;&#xA;I have set the wordViewProjection matrix in my program but I don't know to  set the progress variable i.e in my pixel shader file which will make  the image displayed by the help of a quad to give out transition effect.&#xD;&#xA;Here is the code for my pixel shader program:::&#xD;&#xA;&#xD;&#xA;As my pixel shader is giving a static effect and now I want to use it to give some effect. So for this I have to add a progress variable in my pixel shader and initialize to the Constant table function i.e&#xD;&#xA;&#xD;&#xA;    constantTable.SetValue(D3DDevice,&quot;progress&quot;,progress );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am having the problem in using this function for progress in my program. Anybody know how to set this variable in my program.&#xD;&#xA;&#xD;&#xA;And my new pixel Shader code is&#xD;&#xA;&#xD;&#xA;    float progress : register(C0);&#xD;&#xA;    sampler2D implicitInput : register(s0);&#xD;&#xA;    sampler2D oldInput : register(s1);&#xD;&#xA;&#xD;&#xA;    struct VS_OUTPUT&#xD;&#xA;    {&#xD;&#xA;        float4 Position  : POSITION;&#xD;&#xA;        float4 Color     : COLOR0;&#xD;&#xA;        float2 UV        : TEXCOORD 0;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 Blinds(float2 uv)&#xD;&#xA;    {               &#xD;&#xA;        if(frac(uv.y * 5) &lt; progress)&#xD;&#xA;        {&#xD;&#xA;            return tex2D(implicitInput, uv);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            return tex2D(oldInput, uv);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Pixel Shader&#xD;&#xA;    {&#xD;&#xA;        return Blinds(input.UV);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31786" PostHistoryTypeId="24" PostId="14211" RevisionGUID="2756163a-ae83-4413-82b2-95643ae84aee" CreationDate="2011-06-27T14:00:46.797" Comment="Proposed by 2698 approved by -1 edit id of 521" />
  <row Id="31787" PostHistoryTypeId="5" PostId="14211" RevisionGUID="7421a8ad-bf89-4b0e-b751-f97fd053a465" CreationDate="2011-06-27T14:00:47.280" UserId="1156" Comment="Neat indentation is worth having." Text="Stated below is the code for my pixel shader which I am rendering after the vertex shader.&#xD;&#xA;I have set the wordViewProjection matrix in my program but I don't know to  set the progress variable i.e in my pixel shader file which will make  the image displayed by the help of a quad to give out transition effect.&#xD;&#xA;Here is the code for my pixel shader program:::&#xD;&#xA;&#xD;&#xA;As my pixel shader is giving a static effect and now I want to use it to give some effect. So for this I have to add a progress variable in my pixel shader and initialize to the Constant table function i.e&#xD;&#xA;&#xD;&#xA;    constantTable.SetValue(D3DDevice,&quot;progress&quot;,progress );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am having the problem in using this function for progress in my program. Anybody know how to set this variable in my program.&#xD;&#xA;&#xD;&#xA;And my new pixel shader code is&#xD;&#xA;&#xD;&#xA;    float progress : register(C0);&#xD;&#xA;    sampler2D implicitInput : register(s0);&#xD;&#xA;    sampler2D oldInput : register(s1);&#xD;&#xA;&#xD;&#xA;    struct VS_OUTPUT&#xD;&#xA;    {&#xD;&#xA;        float4 Position  : POSITION;&#xD;&#xA;        float4 Color     : COLOR0;&#xD;&#xA;        float2 UV        : TEXCOORD 0;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 Blinds(float2 uv)&#xD;&#xA;    {               &#xD;&#xA;        if(frac(uv.y * 5) &lt; progress)&#xD;&#xA;        {&#xD;&#xA;            return tex2D(implicitInput, uv);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            return tex2D(oldInput, uv);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Pixel Shader&#xD;&#xA;    {&#xD;&#xA;        return Blinds(input.UV);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31788" PostHistoryTypeId="4" PostId="14211" RevisionGUID="7421a8ad-bf89-4b0e-b751-f97fd053a465" CreationDate="2011-06-27T14:00:47.280" UserId="1156" Comment="Neat indentation is worth having." Text="How can I run the pixel shader effect?" />
  <row Id="31789" PostHistoryTypeId="6" PostId="14211" RevisionGUID="7421a8ad-bf89-4b0e-b751-f97fd053a465" CreationDate="2011-06-27T14:00:47.280" UserId="1156" Comment="Neat indentation is worth having." Text="&lt;shaders&gt;&lt;hlsl&gt;&lt;slimdx&gt;&lt;pixel-shader&gt;" />
  <row Id="31790" PostHistoryTypeId="5" PostId="14221" RevisionGUID="063fe562-6192-4c1a-862f-f1b0cc999017" CreationDate="2011-06-27T14:08:14.290" UserId="1742" Comment="reorient the question" Text="Having read [this rant][1], I feel that they're probably right (seeing as the Xenon and the CELL BE are both highly sensitive to branchy and cache ignorant code), but I've heard that people are making games fine with C# too.&#xD;&#xA;&#xD;&#xA;So, is it true that it's impossible to do anything *professional* with XNA, or was the poster just missing what makes XNA the killer API for game development?&#xD;&#xA;&#xD;&#xA;By professional, I don't mean in the sense that you can make money from it, but more in the sense that the more professional games have phsyics models and animation systems that seem outside the reach of a language with such definite barriers to the intrinsics. If I wanted to write a collision system or fluid dynamics engine for my game, I don't feel like C# offers me the chance to do that as the runtime code generator and the lack of intrinsics gets in the way of performance.&#xD;&#xA;&#xD;&#xA;However, many people seem to be fine working within these constraints, making their successful games but seemingly avoiding any of the problems by omission. I've not noticed any XNA games do anything complex other than what's already provided by the libraries, or handled by shaders. Is this avoidance of the more complex game dynamics because of teh limitations of C#, or just people concentrating on *getting it done*?&#xD;&#xA;&#xD;&#xA;In all honesty, I can't believe that AI war can maintain that many units of AI without some data oriented approach, or some dirty C# hacks to make it run better than the standard approach, and I guess that's partly my question too, how have people hacked C# so it's able to do what games coders do naturally with C++?&#xD;&#xA;&#xD;&#xA;  [1]: http://numbersandlights.blogspot.com/2011/06/why-xna-sucks-short-essay.html" />
  <row Id="31792" PostHistoryTypeId="2" PostId="14223" RevisionGUID="bf841cea-ca7c-4210-990b-0b7cbc81fc9b" CreationDate="2011-06-27T14:10:07.113" UserId="4410" Text="You'd have to define 'professional'. Could you do Angry Birds, Plants vs Zombies, etc? Absolutely. Could you do Crysis 2, COD, Halo? I doubt it. Using C# is only really going to impact games that are very CPU intensive and also need to squeeze every last byte of of memory (you lose out to the garbage collection), so there's an awful lot you can still do.&#xD;&#xA;&#xD;&#xA;As a learning tool for people getting started, prototyping tool, platform for writing games that can deal with the trade off, etc, it's fantastic and has a lot of power and simplicity, it just isn't designed to make what you'd necessarily call the 'AAA' games. It also takes away a lot of the pain and suffering people have to worry about with cross platform porting and compatibility.&#xD;&#xA;&#xD;&#xA;If you come up with an amazing game and you run into the limitations of what you can do with XNA then I'd suggest contacting MS directly, if the idea really is good enough they might just let you get your hands on a full blown development kit." />
  <row Id="31793" PostHistoryTypeId="2" PostId="14224" RevisionGUID="2df605e7-ad6f-4df6-97df-a09eeca7d3f4" CreationDate="2011-06-27T14:13:12.680" UserId="1156" Text="I shall do my best to answer your questions, and then give some general advice.&#xD;&#xA;&#xD;&#xA;1) No, you cannot have too many methods. However, having a large amount could be a bad design. If there's a function which does one very simple line and is only accessed internally, why does it need to be a method? Could you replace getters and setters with a public variable?&#xD;&#xA;&#xD;&#xA;2) Not really. There's little point in it being a method, so you may want to change that - unless it does something specific that you may need again.&#xD;&#xA;&#xD;&#xA;In terms of design as a whole, I would say 50% is common sense and the other 50% is knowledge, be it from other bits of code, questions like this, and other material. It makes no sense to force everything to a design." />
  <row Id="31794" PostHistoryTypeId="5" PostId="14221" RevisionGUID="d2c0a38a-7469-4fe1-b00e-e70dfe469afe" CreationDate="2011-06-27T14:57:16.920" UserId="1742" Comment="more links" Text="Having read [this rant][1], I feel that they're probably right (seeing as the Xenon and the CELL BE are both highly [sensitive to branchy][2] and [cache ignorant code][3]), but I've heard that people are making games fine with C# too.&#xD;&#xA;&#xD;&#xA;So, is it true that it's impossible to do anything *professional* with XNA, or was the poster just missing what makes XNA the killer API for game development?&#xD;&#xA;&#xD;&#xA;By professional, I don't mean in the sense that you can make money from it, but more in the sense that the more professional games have phsyics models and animation systems that seem outside the reach of a language with such definite barriers to the intrinsics. If I wanted to write a collision system or fluid dynamics engine for my game, I don't feel like C# offers me the chance to do that as the runtime code generator and the lack of intrinsics gets in the way of performance.&#xD;&#xA;&#xD;&#xA;However, many people seem to be fine working within these constraints, making their successful games but seemingly avoiding any of the problems by omission. I've not noticed any XNA games do anything complex other than what's already provided by the libraries, or handled by shaders. Is this avoidance of the more complex game dynamics because of teh [limitations of C#][4], or just people concentrating on *getting it done*?&#xD;&#xA;&#xD;&#xA;In all honesty, I can't believe that AI war can maintain that many units of AI without some data oriented approach, or some [dirty C# hacks][5] to make it run better than the standard approach, and I guess that's partly my question too, how have people hacked C# so it's able to do what games coders do naturally with C++?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://numbersandlights.blogspot.com/2011/06/why-xna-sucks-short-essay.html&#xD;&#xA;  [2]: http://cellperformance.beyond3d.com/articles/2006/04/background-on-branching.html&#xD;&#xA;  [3]: http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf&#xD;&#xA;  [4]: http://stackoverflow.com/questions/415375/using-sse-in-c-is-it-possible&#xD;&#xA;  [5]: http://stackoverflow.com/questions/935664/possible-to-call-c-code-from-c" />
  <row Id="31795" PostHistoryTypeId="2" PostId="14225" RevisionGUID="703bf902-03dc-4b6a-b325-dbdf59ed4bb0" CreationDate="2011-06-27T15:19:45.877" UserId="4662" Text="The simple fact is that you don't need a high polygon count, full HDR lighting or the world's most interesting physics to make an interesting game, and if your game plan doesn't include any of those, then why not go for a faster development time solution?&#xD;&#xA;&#xD;&#xA;&gt; more professional games have phsyics&#xD;&#xA;&gt; models and animation systems&#xD;&#xA;&#xD;&#xA;That's just wrong. Professional games have what they need to have to implement their gameplay and achieve their artistic look, and nothing more and indeed, nothing less. A game isn't more professional because it looks more realistic or has more detailed physics. A game that is professional achieves it's gameplay and visual objectives, on time, on budget, etc, and ships and makes a profit." />
  <row Id="31796" PostHistoryTypeId="25" PostId="14217" RevisionGUID="18a16fc2-00ad-4fd0-aae0-a860ad7c2b0e" CreationDate="2011-06-27T15:25:40.053" Comment="http://twitter.com/#!/StackGameDev/status/85368200526700544" />
  <row Id="31797" PostHistoryTypeId="2" PostId="14226" RevisionGUID="03823a69-1fc3-49ad-aaaf-76c28b575d0f" CreationDate="2011-06-27T15:25:51.127" UserId="7328" Text="which one has more potential customers, easier API, and wider feature list? i'm going to develop implement one of those two for highscore recording in my game which ones gives more advantages?&#xD;&#xA;&#xD;&#xA;and if you are going to propose openfeint do you know any c++ wrapper that help me compile the same code for android or not?" />
  <row Id="31798" PostHistoryTypeId="1" PostId="14226" RevisionGUID="03823a69-1fc3-49ad-aaaf-76c28b575d0f" CreationDate="2011-06-27T15:25:51.127" UserId="7328" Text="openfeint or gamecenter?" />
  <row Id="31799" PostHistoryTypeId="3" PostId="14226" RevisionGUID="03823a69-1fc3-49ad-aaaf-76c28b575d0f" CreationDate="2011-06-27T15:25:51.127" UserId="7328" Text="&lt;game-center&gt;&lt;openfeint&gt;" />
  <row Id="31800" PostHistoryTypeId="2" PostId="14227" RevisionGUID="c1a19fe6-5355-42d5-bfc4-da428112014f" CreationDate="2011-06-27T15:39:34.363" UserId="288" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling won't work - which is nonsensical. The same performance advice applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code.&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty of other good libraries&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but it's not *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, so the point is moot." />
  <row Id="31801" PostHistoryTypeId="2" PostId="14228" RevisionGUID="d50ebf06-a8a8-4028-898e-f79f62361315" CreationDate="2011-06-27T15:42:41.163" UserId="8275" Text="The extended version of the question is: what is the typical career paths that a developer *without specific experience in game development* should take if he/she wishes to work in the game development industry? In other words, what are the positions such a programmer might aspire to get hired for, in the game industry?&#xD;&#xA;&#xD;&#xA;I am asking because it seems to me that - even without direct experience with 3D modelling, physics engines, shaders, etc... - for as much complex as these topics might be - they are still &quot;just&quot; top layers one can learn &quot;on the job&quot; if he/she has already good programming skills and experience in software design (for example during peer-programming sessions).&#xD;&#xA;&#xD;&#xA;I have no knowledge whatsoever of the game industry, so maybe I am being naïve here, but for all the other programming jobs I previously took, I learnt most of the specificities while working on concrete projects... so I wonder if there is a chance to do the same with game development.&#xD;&#xA;&#xD;&#xA;Thanks for your time and advice! :)&#xD;&#xA;&#xD;&#xA;PS: I don't know if this is important or not for answering the question, but scripting languages are the languages I am more proficient in.&#xD;&#xA;&#xD;&#xA;/mac" />
  <row Id="31802" PostHistoryTypeId="1" PostId="14228" RevisionGUID="d50ebf06-a8a8-4028-898e-f79f62361315" CreationDate="2011-06-27T15:42:41.163" UserId="8275" Text="Is there a typical career path to learn game development &quot;on the job&quot;?" />
  <row Id="31803" PostHistoryTypeId="3" PostId="14228" RevisionGUID="d50ebf06-a8a8-4028-898e-f79f62361315" CreationDate="2011-06-27T15:42:41.163" UserId="8275" Text="&lt;scripting&gt;&lt;career&gt;&lt;jobs&gt;&lt;hiring&gt;&lt;experience&gt;" />
  <row Id="31804" PostHistoryTypeId="5" PostId="14227" RevisionGUID="ded86c86-e299-4943-82ad-3c19921a5ec7" CreationDate="2011-06-27T15:44:50.180" UserId="288" Comment="deleted 3 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling won't work - which is nonsense. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty of other good libraries&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but it's not *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, so the point is moot." />
  <row Id="31805" PostHistoryTypeId="5" PostId="14227" RevisionGUID="858d2ae9-e684-4f96-9b0d-aa47b9976831" CreationDate="2011-06-27T15:50:10.910" UserId="288" Comment="deleted 3 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty of other good libraries&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but it's not *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, so the point is moot." />
  <row Id="31806" PostHistoryTypeId="5" PostId="14227" RevisionGUID="72786734-1eb4-4cc7-9c60-b4de594d0aca" CreationDate="2011-06-27T16:00:52.200" UserId="288" Comment="deleted 3 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty of other good libraries&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, so the point is moot." />
  <row Id="31807" PostHistoryTypeId="2" PostId="14229" RevisionGUID="8cd88e33-7251-4858-923b-cc0902757718" CreationDate="2011-06-27T16:01:31.360" UserId="4443" Text="If you want to work in the games industry as a programmer, make a game demo.. I can not stress enough how much one of these will increase your chances if you do not want to go to a school for game development.&#xD;&#xA;&#xD;&#xA;If however you are more interested in level and environment development, this is what designers do. You may want to get an existing engine (Unreal?) and make up a level if that is the sort of work you are after as opposed to a programming job. (I mention this because of your mentioning of scripting vs programming)&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="31808" PostHistoryTypeId="2" PostId="14230" RevisionGUID="23312274-4af5-449f-9e3f-dee93306a23f" CreationDate="2011-06-27T16:03:04.230" UserId="7946" Text="On the programming side, I can only speak for Germany, but everyone that I asked in game development, as well as what I generally read online tells me the same thing (And I don't know why it would be any different anywhere else): Study computer science.&#xD;&#xA;&#xD;&#xA;And it's not really that hard to imagine why. Programming games (and aspects related to it) requires almost everything you learn in your typical computer science major - on the math side a decent knowledge of linear algebra, calculus, statistics and the stuff related to theoretical computer science (number theory, graph theory, computational geometry, algorithms and data structures... the list goes on and on and on) will help you a ton. &#xD;&#xA;&#xD;&#xA;Also, most computer science majors will lead you through a ton of topics that are directly related to game development - besides the usual programming courses, there's also courses for things like artificial intelligence, software engineering, project management, distributed computation etc. &#xD;&#xA;&#xD;&#xA;In addition to all of that, many universities now also offer optional side courses like &quot;Computer Graphics&quot;, &quot;Game Development&quot;, etc. &#xD;&#xA;&#xD;&#xA;So if you want to the way of the programmer (instead of becoming a level designer or something), I tell you: Go for computer science.&#xD;&#xA;&#xD;&#xA;There are of course a lot of things that a strict classical computer science master doesn't cover when it comes to game development - but that's also the case for almost anything that you'll program out in the real world. The &quot;real&quot; experience is mostly gathered by actually programming games as a hobby at home.&#xD;&#xA;&#xD;&#xA;But that is just the programmers side of course - I can't really tell you where all the other artists come from (Graphics artists, sound engineers etc).&#xD;&#xA;&#xD;&#xA;Still, I hope my answer helps you." />
  <row Id="31809" PostHistoryTypeId="2" PostId="14231" RevisionGUID="a6ce1efb-57d7-4162-80be-0f2e0a746517" CreationDate="2011-06-27T16:05:47.180" UserId="1430" Text="&gt; The extended version of the question&#xD;&#xA;&gt; is: what is the typical career paths&#xD;&#xA;&gt; that a developer without specific&#xD;&#xA;&gt; experience in game development should&#xD;&#xA;&gt; take if he/she wishes to work in the&#xD;&#xA;&gt; game development industry? In other&#xD;&#xA;&gt; words, what are the positions such a&#xD;&#xA;&gt; programmer might aspire to get hired&#xD;&#xA;&gt; for, in the game industry?&#xD;&#xA;&#xD;&#xA;There isn't a typical career path, per se; that would imply a lot more structure to the industry than actually exists. However, as a programmer, without specific experience in programming in areas for games (graphics, physics, et cetera) one can be expected to get hired as an entry level programmer -- perhaps as a general &quot;gameplay&quot; programmer.&#xD;&#xA;&#xD;&#xA;If you are interested in those other areas, you will likely need to dedicate time to learning them on your own -- at least a little bit.&#xD;&#xA;&#xD;&#xA;N.B. that 3D modelling is not typically a task performed by programmers at all, and while programmers may employ some scripting in their day-to-day jobs, it's not their primary function (designers tend to do a lot more with scripting languages, if the game uses them)." />
  <row Id="31810" PostHistoryTypeId="5" PostId="14227" RevisionGUID="ff3e9eff-a71d-4f89-b7e1-33a9ad0086de" CreationDate="2011-06-27T16:05:55.490" UserId="288" Comment="deleted 3 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty of other good libraries&lt;/a&gt;. (Still, this is a fair point).&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, so the point is moot." />
  <row Id="31811" PostHistoryTypeId="5" PostId="14227" RevisionGUID="0816386b-c818-4609-a70e-d72eeff78f44" CreationDate="2011-06-27T16:12:23.130" UserId="288" Comment="deleted 3 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty more&lt;/a&gt;. (Still, this is a somewhat fair point.)&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;(For actual technical discussion of the .NET Compact Framework, perhaps start with this article series: &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502908.aspx&quot;&gt;Overview&lt;/a&gt;, &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/14/503818.aspx&quot;&gt;JIT Compiler&lt;/a&gt;, and &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502978.aspx&quot;&gt;GC and heap&lt;/a&gt;.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, so the point is moot." />
  <row Id="31812" PostHistoryTypeId="5" PostId="14227" RevisionGUID="866ac435-eb39-4273-8ba5-86c36f37e5a7" CreationDate="2011-06-27T16:25:00.520" UserId="288" Comment="added 154 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty more&lt;/a&gt;. (Still, this is a somewhat fair point.)&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;(For actual technical discussion of the .NET Compact Framework, perhaps start with this article series: &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502908.aspx&quot;&gt;Overview&lt;/a&gt;, &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/14/503818.aspx&quot;&gt;JIT Compiler&lt;/a&gt;, and &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502978.aspx&quot;&gt;GC and heap&lt;/a&gt;.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, making the point moot.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Also: (unlike, say, Java) nothing in C# stops you using data-oriented approaches in essentially *exactly* the same way you'd use them in C++." />
  <row Id="31813" PostHistoryTypeId="5" PostId="14215" RevisionGUID="42971657-bedb-42ad-a37f-ceb83a535010" CreationDate="2011-06-27T16:28:58.577" UserId="8273" Comment="added 108 characters in body" Text="I need to draw contour around 2d objects in 3d space. I tried drawing lines around object(+points to fill the gap), but due to line width, some part of it(~50%) was covering object. I tried to use stencil buffer, to eliminate this problem, but I got sth like this(contour is green):&#xD;&#xA;&#xD;&#xA;http://goo.gl/OI5uc (sorry I can't post images, due to my reputation)&#xD;&#xA;&#xD;&#xA;You can see(where arrow points), that some parts of line are behind object, and some are above. This changes when I move camera, but always there is some part, that is covering it.&#xD;&#xA;Here is code, that I use for drawing object:&#xD;&#xA;&#xD;&#xA;        glColorMask(1,1,1,1);&#xD;&#xA;        std::list&lt;CObjectOnScene*&gt;::iterator objIter=ptr-&gt;objects.begin(),objEnd=ptr-&gt;objects.end();&#xD;&#xA;        int countStencilBit=1;&#xD;&#xA;        while(objIter!=objEnd)&#xD;&#xA;        {&#xD;&#xA;            glColorMask(1,1,1,1);&#xD;&#xA;            glStencilFunc(GL_ALWAYS,countStencilBit,countStencilBit);&#xD;&#xA;            glStencilOp(GL_REPLACE,GL_KEEP,GL_REPLACE );&#xD;&#xA;            (*objIter)-&gt;DrawYourVertices();&#xD;&#xA;&#xD;&#xA;            glStencilFunc(GL_NOTEQUAL,countStencilBit,countStencilBit);&#xD;&#xA;            glStencilOp(GL_KEEP,GL_KEEP,GL_REPLACE);&#xD;&#xA;            (*objIter)-&gt;DrawYourBorder();&#xD;&#xA;&#xD;&#xA;            ++objIter;&#xD;&#xA;            ++countStencilBit;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I've tried different settings of stencil buffer, but always I was getting sth like that.&#xD;&#xA;Here is question:&#xD;&#xA;**1.Am I setting stencil buffer wrong?**&#xD;&#xA;&#xD;&#xA;**2. Are there any other simple ways to create contour on such objects?**&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;**1.** I don't have normals of objects.&#xD;&#xA;&#xD;&#xA;**2.** Object can be concave.&#xD;&#xA;&#xD;&#xA;**3.** I can't use shaders(see below why).&#xD;&#xA;" />
  <row Id="31814" PostHistoryTypeId="5" PostId="14227" RevisionGUID="8fc978cc-51d2-4b9e-a61f-e7a1c2a15b2e" CreationDate="2011-06-27T16:31:08.270" UserId="288" Comment="added 154 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once** and then the compiled code is reused for each invocation. The compiled code is very close to as fast as native pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty more&lt;/a&gt;. (Still, this is a somewhat fair point.)&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;(For actual technical discussion of the .NET Compact Framework, perhaps start with this article series: &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502908.aspx&quot;&gt;Overview&lt;/a&gt;, &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/14/503818.aspx&quot;&gt;JIT Compiler&lt;/a&gt;, and &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502978.aspx&quot;&gt;GC and heap&lt;/a&gt;.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, making the point moot.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;To answer your other questions:&#xD;&#xA;&#xD;&#xA;Nothing in C# stops you using data-oriented approaches in essentially *exactly* the same way you'd use them in C++.&#xD;&#xA;&#xD;&#xA;C# lacks the ability to automatically inline code, and (without going off to check) I'm pretty sure the compact CLR's JITter can't inline methods (desktop CLR can). So for performance-critical code you may have to manually inline where C++ provides some assistance.&#xD;&#xA;&#xD;&#xA;Probably a bigger reason why you don't often CPU-maths intensive things like collision detection and fluid simulations in C# is lack of access to the vector unit (as mentioned above)." />
  <row Id="31815" PostHistoryTypeId="5" PostId="14227" RevisionGUID="fa018257-2697-4dd1-9e15-055e71737bce" CreationDate="2011-06-27T16:47:19.260" UserId="288" Comment="deleted 7 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once**, the compiled code is reused for each invocation. The compiled code is very close to as fast as native, pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty more&lt;/a&gt;. (Still, this is a somewhat fair point.)&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;(For actual technical discussion of the .NET Compact Framework, perhaps start with this article series: &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502908.aspx&quot;&gt;Overview&lt;/a&gt;, &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/14/503818.aspx&quot;&gt;JIT Compiler&lt;/a&gt;, and &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502978.aspx&quot;&gt;GC and heap&lt;/a&gt;.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, making the point moot.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;To answer your other questions:&#xD;&#xA;&#xD;&#xA;Nothing in C# stops you using data-oriented approaches in essentially *exactly* the same way you'd use them in C++.&#xD;&#xA;&#xD;&#xA;C# lacks the ability to automatically inline code, and (without going off to check) I'm pretty sure the compact CLR's JITter can't inline methods (desktop CLR can). So for performance-critical code you may have to manually inline where C++ provides some assistance.&#xD;&#xA;&#xD;&#xA;Probably a bigger reason why you don't often see CPU-maths intensive things like collision detection and fluid simulations in C# is lack of access to the vector unit (as mentioned above)." />
  <row Id="31817" PostHistoryTypeId="5" PostId="14227" RevisionGUID="66ad7762-b95f-43ad-8bb1-e1bc94a80bb6" CreationDate="2011-06-27T17:00:22.313" UserId="288" Comment="added 27 characters in body" Text="OK, just to poke some holes in that rant you linked:&#xD;&#xA;&#xD;&#xA; - *&quot;C# relies on a &quot;Just In Time&quot; interpreter&quot;* - wrong - it is a JIT **compiler**. After a method is JITted **once**, the compiled code is reused for each invocation. The compiled code is very close to as fast as native, pre-compiled code.&#xD;&#xA; - *&quot;Xenon CPU is an &quot;in place&quot; processor&quot;* - does he mean &quot;in order&quot;? - And: *&quot;Xenon CPU has no branch prediction&quot;*. He implies these mean that JIT compiling naturally produces bad code that must be re-ordered by the CPU and causes lots of branching - which is *absolute nonsense*. The same performance advice for running on this CPU architecture applies to both C++ and C#.&#xD;&#xA; - *&quot;[JIT] requires constant flushing on the 360&quot;* - wrong, the compiled code can be kept in cache like any normally compiled code. (If he means pipeline flush, see the above point.)&#xD;&#xA; - *&quot;generics [...] use code generation&quot;* - generics are JITted like everything else and, like everything else, the JITted code is fast. There is no performance penalty for using generics.&#xD;&#xA; - *&quot;all the sexy bits of language [...] require either branch prediction...&quot;* - how does this not apply to C++ as well? - *&quot;...or [...] in-place code generation&quot;* - does he mean JITting? Did I mention that it's fast? (I won't go into all the places the *desktop* CLR uses *actual* code generation - a feature not supported by the Xbox 360!)&#xD;&#xA; - *&quot;[C# doesn't have] the massive libraries [of C++]&quot;* - except, say, XNA itself? And &lt;a href=&quot;http://gamedev.stackexchange.com/questions/109/what-c-libraries-can-be-used-to-support-game-development&quot;&gt;plenty more&lt;/a&gt;. (Still, this is a somewhat fair point.)&#xD;&#xA;&#xD;&#xA;XNA on the Xbox 360 runs on a modified version of the .NET Compact Framework CLR. I have no doubt that it's not up to the standard of the desktop version. The JITter probably *isn't* as good - but I don't think it's *bad* either. I'm surprised he didn't mention the **garbage collector** which is *dreadful* compared to the desktop CLR.&#xD;&#xA;&#xD;&#xA;(Of course - you shouldn't be hitting the garbage collector in a professionally developed game *anyway*, just as you must be careful with allocations in *any* professional-grade game.)&#xD;&#xA;&#xD;&#xA;(For actual technical discussion of the .NET Compact Framework, perhaps start with this article series: &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502908.aspx&quot;&gt;Overview&lt;/a&gt;, &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/14/503818.aspx&quot;&gt;JIT Compiler&lt;/a&gt;, and &lt;a href=&quot;http://blogs.msdn.com/b/stevenpr/archive/2005/12/12/502978.aspx&quot;&gt;GC and heap&lt;/a&gt;.)&#xD;&#xA;&#xD;&#xA;The way he is entirely unspecific about his terminology makes it difficult to even understand what he means. Either he's in maximum-rant mode, or doesn't know what he's talking about.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Now that we've got that out of the way, **here are some things that you *do* miss out on by using XNA on the 360, rather than going native**:&#xD;&#xA;&#xD;&#xA;&gt; - Access to the SIMD/Vector unit for doing really, *really* fast CPU floating point maths&#xD;&#xA;&gt; - Ability to use native language code that will probably be a little bit faster than C#&#xD;&#xA;&gt; - Ability to be a *little* bit lazier with how you allocate memory&#xD;&#xA;&gt; - XBLIG games have access to only 4 of the 6 cores (but we still get all 3 CPUs, and they're not full cores either, so we don't miss out on much) - not sure if this applies to non-XBLIG XNA games&#xD;&#xA;&gt; - Full DirectX access for doing really obscure graphical trickery&#xD;&#xA;&#xD;&#xA;It's also worth pointing out that these are only CPU-side restrictions. You've still got completely free access running on the GPU.&#xD;&#xA;&#xD;&#xA;I described these things in &lt;a href=&quot;http://gamedev.stackexchange.com/questions/4915/is-xna-good-for-professional-development-for-the-xbox-360/4917#4917&quot;&gt;this answer&lt;/a&gt; to what is effectively the same question as this one. As I mentioned in that answer **XNA is absolutely suitable for &quot;professional&quot; development**.&#xD;&#xA;&#xD;&#xA;The only reasons you'd avoid is is because you can't hire C# talent, licence C# engines, and reuse existing C# code the same way you can with the existing base of C++ knowledge. Or because you might also be targeting a platform that does not support C#.&#xD;&#xA;&#xD;&#xA;Of course, for many of us who aren't &quot;professional&quot; developers, XNA is our *only* option to get on the Xbox 360, making the point moot.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;To answer your other questions:&#xD;&#xA;&#xD;&#xA;Nothing in C# stops you using data-oriented approaches in essentially *exactly* the same way you'd use them in C++.&#xD;&#xA;&#xD;&#xA;C# lacks the ability to automatically inline code at compile-time, and (without going off to check) I'm pretty sure the compact CLR's JITter can't inline methods (the desktop CLR can). So for performance-critical code you may have to manually inline in C#, where C++ provides some assistance.&#xD;&#xA;&#xD;&#xA;Probably a bigger reason why you don't often see CPU-maths intensive things like collision detection and fluid simulations in C# is lack of access to the vector unit (as mentioned above)." />
  <row Id="31818" PostHistoryTypeId="5" PostId="14226" RevisionGUID="267af6d1-6590-4bf9-89a9-ce41ee490d31" CreationDate="2011-06-27T18:01:43.723" UserId="7328" Comment="added 112 characters in body" Text="which one has more potential customers, easier API, and wider feature list? i'm going to develop implement one of those two for highscore recording in my game which ones gives more advantages?&#xD;&#xA;&#xD;&#xA;and by the way I might be going to port my game to android, so if you know any thing that can help me not to rewrite my code (for example a C++ wrapper for both of them) that would mean a greate plus for openfeint in my point of veiw.&#xD;&#xA;" />
  <row Id="31819" PostHistoryTypeId="2" PostId="14232" RevisionGUID="d232b424-89d6-4221-bd91-9c9b48677e72" CreationDate="2011-06-27T18:02:56.467" UserId="2061" Text="IMHO, the towers should not know about the creeps; unless you are planning on simply looping over the list of creeps for every tower, you'll probably want to implement some nontrivial [space partitioning](http://en.wikipedia.org/wiki/Nearest_neighbour_search).  That sort of logic doesn't belong in the towers class.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, I've sidestepped the issue.  Now instead of needing access to a list of creeps, you need access to a class instance.&#xD;&#xA;&#xD;&#xA;When you need a single instance of a class throughout your program, we call that class a **service**.  There are several standard methods of implementing services in programs:&#xD;&#xA;&#xD;&#xA;* **Global variables**. These are the easiest to implement, but the worst design.  If you use too many global variables, you will quickly find yourself writing modules that rely on each other too much ([strong-coupling][1]), making the flow of logic very difficult to follow.  Global variables are not multithreading-friendly.  Global variables make tracking the lifetime of objects more difficult, and clutter the namespace.  They are, however, the most performant option, so there are times when they can and should be used, but use them spareingly.&#xD;&#xA;* **Singletons**.  About 10-15 years ago, singletons were *the* big design-pattern to know about.  However, nowadays they are looked down upon.  They are much easier to multi-thread, but you must limit their use to one thread at a time, which is not always what you want.  Tracking lifetimes is just as difficult as with global variables.  &#xD;&#xA;A typical singleton class will look something like this:&#xD;&#xA;&#xD;&#xA;		class MyClass&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			static MyClass* _instance;&#xD;&#xA;			MyClass() {} //private constructor&#xD;&#xA;			&#xD;&#xA;		public:&#xD;&#xA;			static MyClass* getInstance();&#xD;&#xA;			void method();&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		MyClass* MyClass::_instance = NULL;&#xD;&#xA;		MyClass* MyClass::getInstance()&#xD;&#xA;		{&#xD;&#xA;			if(_instance == NULL)&#xD;&#xA;				_instance = new MyClass(); //Not thread-safe version&#xD;&#xA;			return _instance;&#xD;&#xA;			&#xD;&#xA;			//Note that _instance is *never* deleted - &#xD;&#xA;			//it exists for the entire lifetime of the program!&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;* **Dependency Injection (DI)**.  This just means passing the service in as a constructor parameter.  A service must already exist in order to pass it into a class, so there's no way for two services to rely on each other; in 98% of the cases, [this is what you want][2] *(and for the other 2%, you can always create a `setWhatever()` method and pass in the service later)*.  Because of this, DI doesn't have the same coupling problems as the other options.  It can be use with multithreading, because each thread can simply have its own instance of every service (and share only those it absolutely needs to).  It also makes code unit-testable, if you care about that.&#xD;&#xA;The problem with dependency injection it takes up more memory; now every instance of a class needs references to every service it will use.  Also, it gets annoying to use when you have too many services; there are frameworks that mitigate this problem in other languages, but because of C++'s lack of reflection, DI frameworks in C++ tend to be even more work than just doing it manually.&#xD;&#xA;&#xD;&#xA;		//Example of dependency injection&#xD;&#xA;		class Tower&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			MissileCreationService* _missileCreator;&#xD;&#xA;			CreepLocatorService _creepLocator;&#xD;&#xA;		public:&#xD;&#xA;			Tower(MissileCreationService*, CreepLocatorService*);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		//In order to create a tower, the creating-class must have instances of&#xD;&#xA;		// MissilCreationService and CreepLocatorService as well; thus, if we want to &#xD;&#xA;		// add a new service to the constructor, we must add it to the constructor&#xD;&#xA;		// of every class which creates a Tower as well!&#xD;&#xA;		//This is not a problem in languages like C# and Java, where you can use&#xD;&#xA;		// a framework to create an instance and inject automatically.&#xD;&#xA;&#xD;&#xA;    Dependency injection is the usual solution for this problem, and is the answer you will see most highly upvoted to questions like this on StackOverflow.com.  DI is a type of [Inversion of Control][3] (IoC).&#xD;&#xA;&#xD;&#xA;* **Service Locator**.  Basically, just a class that holds an instance of every service.  You can [do it using reflection](http://www.codinginlondon.com/2009/05/cheap-ioc-in-native-c.html), or you can just add a new instance to it every time you want to create a new service.  You still have the same problem as before - *How do classes access this locator?* - which can be solved in any of the above ways, but now you only need to do it for your `ServiceLocator` class, rather than for dozens of services.  This method is also unit-testable, if you care about that sort of thing.  &#xD;&#xA;To read more about how the XNA framework (C#) uses services, read [this answer][4].&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Circular_dependency&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Inversion_of_Control&#xD;&#xA;[4]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="31820" PostHistoryTypeId="2" PostId="14233" RevisionGUID="53ef4503-d3ea-4f73-80e3-7aed064fc68f" CreationDate="2011-06-27T18:19:13.087" UserId="8285" Text="I was wondering if anyone could point me to any resources and/or explain how to properly simulate a shoe string? I found this game that has the exact mechanic I'm looking for...&#xD;&#xA;&#xD;&#xA;http://www.newgrounds.com/portal/view/300760&#xD;&#xA;&#xD;&#xA;Play level one to get an idea of what I mean (the title screen string behavior is slightly different from the in-game behavior).&#xD;&#xA;&#xD;&#xA;I'm hoping it's possible to implement this using basic mechanics such as drawing lines (since the game engine I'm using doesn't offer transformation and a lot of advance drawing features).&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31821" PostHistoryTypeId="1" PostId="14233" RevisionGUID="53ef4503-d3ea-4f73-80e3-7aed064fc68f" CreationDate="2011-06-27T18:19:13.087" UserId="8285" Text="Simulating a shoe string" />
  <row Id="31822" PostHistoryTypeId="3" PostId="14233" RevisionGUID="53ef4503-d3ea-4f73-80e3-7aed064fc68f" CreationDate="2011-06-27T18:19:13.087" UserId="8285" Text="&lt;programming&gt;&lt;graphics-programming&gt;&lt;procedural-generation&gt;" />
  <row Id="31823" PostHistoryTypeId="2" PostId="14234" RevisionGUID="96e3c926-67ed-44df-ad2b-676bb9007ae3" CreationDate="2011-06-27T18:22:24.780" UserId="51" Text="&gt; more potential customers&#xD;&#xA;&#xD;&#xA;GameCenter&#xD;&#xA;&#xD;&#xA;&gt; easier API&#xD;&#xA;&#xD;&#xA;They're all trivially easy&#xD;&#xA;&#xD;&#xA;&gt; wider feature list&#xD;&#xA;&#xD;&#xA;OpenFeint&#xD;&#xA;&#xD;&#xA;&gt;I'm going to develop implement one of those two for highscore recording in my game which ones gives more advantages?&#xD;&#xA;&#xD;&#xA;Use GameCenter unless you need some of the features beyond &quot;high score list&quot; that OpenFeint currently provides." />
  <row Id="31824" PostHistoryTypeId="25" PostId="14221" RevisionGUID="cf87a814-30b4-423e-9d61-0ad8f44311b3" CreationDate="2011-06-27T18:25:41.660" Comment="http://twitter.com/#!/StackGameDev/status/85413502273077248" />
  <row Id="31825" PostHistoryTypeId="5" PostId="14233" RevisionGUID="32ff5fad-f22b-4d8b-9196-88e0eebd2d76" CreationDate="2011-06-27T18:29:34.470" UserId="8285" Comment="added 160 characters in body" Text="I was wondering if anyone could point me to any resources and/or explain how to properly simulate a shoe string? I found this game that has the exact mechanic I'm looking for...&#xD;&#xA;&#xD;&#xA;http://www.newgrounds.com/portal/view/300760&#xD;&#xA;&#xD;&#xA;Play level one to get an idea of what I mean (the title screen string behavior is slightly different from the in-game behavior).&#xD;&#xA;&#xD;&#xA;I'm hoping it's possible to implement this using basic mechanics such as drawing lines (since the game engine I'm using doesn't offer transformation and a lot of advance drawing features).&#xD;&#xA;&#xD;&#xA;FYI: I'm having a hard time searching for this on google and everywhere else in general, since the word &quot;string&quot; is associated with popular variable type :)&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31826" PostHistoryTypeId="5" PostId="14233" RevisionGUID="d887a789-aa0d-471e-8a52-15d4d7a1db55" CreationDate="2011-06-27T18:39:51.423" UserId="962" Comment="deleted 415 characters in body; edited title" Text="I was wondering if anyone could point me to any resources and/or explain how to properly simulate a 2D rope from a top down perspective? &#xD;&#xA;&#xD;&#xA;I found a game that has the exact mechanic I'm looking for...&#xD;&#xA;&#xD;&#xA;http://www.newgrounds.com/portal/view/300760&#xD;&#xA;&#xD;&#xA;Play at least one level to get an idea of what I mean." />
  <row Id="31827" PostHistoryTypeId="4" PostId="14233" RevisionGUID="d887a789-aa0d-471e-8a52-15d4d7a1db55" CreationDate="2011-06-27T18:39:51.423" UserId="962" Comment="deleted 415 characters in body; edited title" Text="Simulating a 2D rope from a top down perspective" />
  <row Id="31828" PostHistoryTypeId="2" PostId="14235" RevisionGUID="31a353fc-4bae-4381-b436-4e7154001f03" CreationDate="2011-06-27T18:41:12.810" UserId="2798" Text="The behavior of that &quot;shoe string&quot; is achieved by using splines. You will find a lot of resources by just googling that keyword." />
  <row Id="31829" PostHistoryTypeId="2" PostId="14236" RevisionGUID="03835742-ca66-4158-903f-21d0bb781567" CreationDate="2011-06-27T18:47:03.870" UserId="8284" Text="Regarding my career path, I began 10 years working as a Flash developer in digital agencies. There is a huge demand for Flash games used as marketing incentives by big brands (see www.thefwa.com). After 5-6 yrs of developing &quot;branded&quot; Web games, I was hired by a AAA company for a year - I chose to move back to Web games later.&#xD;&#xA;&#xD;&#xA;AS3 is a decent object-oriented language, close to Java, it's quite easy to move from Web games programming to mobile programming, and later to AAA game programming.&#xD;&#xA;&#xD;&#xA;Most employers in marketing/digital/Web agencies are now facing a huge demand regarding (Flash, or native) mobile development, so you'll get lots of opportunities to evolve/demonstrate your skills regarding non-scripting languages (and running OpenGL decently on poor hardware, which is basically the basics of consoles game programming).&#xD;&#xA;&#xD;&#xA;Some Web games are including quite sophisticated algorithms and game mechanics, see dofus.com or the Zynga games,  even my own job is about building RPG-like isometric stuff, with scripting/AI features.&#xD;&#xA;&#xD;&#xA;So you'll probably should learn extensively Flash, iPhone and Android, find a day job in that field, and you'll reach your goal quicker than you think." />
  <row Id="31830" PostHistoryTypeId="2" PostId="14237" RevisionGUID="4530318d-2ca5-486b-89b0-a1e298ea5027" CreationDate="2011-06-27T20:01:00.953" UserId="7663" Text="Java is a good language to start with for your Object Oriented Programming learning! A simple and important advice to you. &#xD;&#xA;&#xD;&#xA;*Don't ever follow any &quot;coding-best-practice&quot; from books or individual without understanding the underlying purpose. Keep questioning WHY before you BUY.*&#xD;&#xA;&#xD;&#xA;**1)** METHOD SIZE: There are no standard rules for method size. The following things have helped me in managing them.&#xD;&#xA;&#xD;&#xA;**Lines:** I believe that if the methods have less than 15 lines of code, it would be readable and manageable. It doesn't mean that one has to stick to this number. Let's not break a 20 lines method into 2 different 10 lines methods and compromise the readability. &#xD;&#xA;&#xD;&#xA;**Method Naming:** Yes! Method naming helps to maintain the size of a method. Name a method in such a way that it does a single action. Try to avoid &quot;and&quot; in method names. Then don't add even a single line of code in that method which does something other than what your method name says. Its always tempting to give some name that comes to our mind immediately and jump to the implementation. But it is important and okay to spend some time in choosing a right name for a method.&#xD;&#xA;&#xD;&#xA;**2)** With respect to your draw method, can you post your code so that we can discuss about it specifically.&#xD;&#xA;&#xD;&#xA;**3)** Calling &quot;if method&quot; in a for loop: Generally, there is no problem in calling a method from a for loop. I hope you are not talking about performance here. There might be some room for improvement w.r.t. complexity, but it depends on the actual code.&#xD;&#xA;&#xD;&#xA;And yeah, this is not a game development related question. You would have more people to help you in Software development exchange :)" />
  <row Id="31831" PostHistoryTypeId="5" PostId="14130" RevisionGUID="49194080-01ef-40c5-bf72-862fb4cf172e" CreationDate="2011-06-27T21:15:18.650" UserId="2061" Comment="added 1997 characters in body" Text="@Gajet's answer is impossible to follow (so I'm not even convinced it will work), and what I think @The Communist Duck meant his solution to be...&#xD;&#xA;&#xD;&#xA;    block_y = ground_y + random() % (previousBlock_y + playerJumpHeight)&#xD;&#xA;&#xD;&#xA;...will be heavily biased towards creating blocks with y-values centered around `ground_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;The easiest way to produce more satisfying results would be, rather than generate a height between `ground_y` and `previousBlock_y + playerJumpHeight`, generate a random value between `previousBlock_y - playerJumpHeight` and `previousBlock_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;Of course, since we want to take `ground_y` and `maxBlockHeight` into consideration also, we *really* want to find a random value between `max(ground_y, previousBlock_y - playerJumpHeight)` and `min(maxBlockHeight, previousBlock_y + playerJumpHeight)`.  This will skew our distribution a bit *(biased towards the center of the screen)*, but not enough to be noticeable.&#xD;&#xA;&#xD;&#xA;The simplest way to do this would be&#xD;&#xA;&#xD;&#xA;    //delta_y is a random number between -/+ playerJumpHeight&#xD;&#xA;    min_y = max(ground_y, previousBlock_y - playerJumpHeight)&#xD;&#xA;    max_y = min(maxBlockHeight, previousBlock_y + playerJumpHeight)&#xD;&#xA;    range_y = max_y - min_y&#xD;&#xA;    block_y = random() % range_y + min_y&#xD;&#xA;&#xD;&#xA;If you then want the block to have a random height as well, just generate a random number between `ground_y` and `block_y` to be the height. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**[Edit]**  There *is* a way to have a probability of jumping down by any amount, while still giving the player equal probability of being anywhere on the screen at any given point.&#xD;&#xA;&#xD;&#xA;Thanks to [Didier Piau](http://math.stackexchange.com/questions/47494/magical-loaded-dice-and-expected-values) on the math forums for figuring this out.  The full explanation is complex, so I'll leave it out; the curious can visit that page, from which I generalized this algorithm.  The algorithm itself is actually pretty simple, though.&#xD;&#xA;&#xD;&#xA;    int getNextBlockHeight()&#xD;&#xA;	{&#xD;&#xA;		int playingFieldHeight = screen_y - ground_y;&#xD;&#xA;		int canonicalBlockMaxHeight = playingFieldHeight - playerHeight;&#xD;&#xA;		int nextBlockMaxHeight = min(currentBlockHeight + playerJumpHeight, canonicalBlockMaxHeight);&#xD;&#xA;		&#xD;&#xA;		//Let's divide the screen vertically into chunks of size playerJumpHeight.&#xD;&#xA;		//This code makes it so that each chunk is approximately twice as likely as being chosen&#xD;&#xA;		//as the previous chunk&#xD;&#xA;		//The following looks complicated, but really it just ensures that the minimum is 0, the maximum is&#xD;&#xA;		//nextBlockMaxHeight, and everything in between is mapped logrithmically&#xD;&#xA;		float canonicalHeightRatio = (float)canonicalBlockMaxHeight / playerJumpHeight;&#xD;&#xA;		float nextHeightRatio = (float)nextBlockMaxHeight / playerJumpHeight;&#xD;&#xA;		float randomMin = pow(2, -canonicalHeightRatio);&#xD;&#xA;		float randomMax = pow(2, nextHeightRatio-canonicalHeightRatio);&#xD;&#xA;		float randomVal = randFloat(randomMin, randomMax);&#xD;&#xA;		float randomHeightRatio = log2(randVal)+canonicalHeightRatio;&#xD;&#xA;		return (int)(randomHeightRatio*playerJumpHeight);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Return the log-base-2 of a number&#xD;&#xA;	const float log_of_2 = log(2);&#xD;&#xA;	float log2(float value)&#xD;&#xA;	{&#xD;&#xA;	    return log(value) / log_of_2;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Generates a random floating-point number between min and max&#xD;&#xA;	float randFloat(float min, float max)&#xD;&#xA;	{&#xD;&#xA;		float randomNormalized = (float)rand()/RAND_MAX; //Between 0.0 and 1.0&#xD;&#xA;		return randomNormalized*(max-min) + min;&#xD;&#xA;	}&#xD;&#xA;	" />
  <row Id="31832" PostHistoryTypeId="2" PostId="14238" RevisionGUID="f567e08a-cc3a-4720-8044-c56aa06b9b6f" CreationDate="2011-06-27T21:15:24.467" UserId="6581" Text="As a summer project I decided it would be fun to make a flash game.  Right now I'm going for something like the look of http://www.terraria.org/.  It's been a lot of fun, but today I've hit a snag.  I need a way to generate my worlds.  I've read up Perlin Noise ( http://freespace.virgin.net/hugo.elias/models/m_perlin.htm ) as a possibility, but I my attempts have given me sporadic looking results.  What are some techniques used to generate these 2D tile-based worlds?&#xD;&#xA;&#xD;&#xA;Ideally I would like to be able to generate mountains, plains, and caves." />
  <row Id="31833" PostHistoryTypeId="1" PostId="14238" RevisionGUID="f567e08a-cc3a-4720-8044-c56aa06b9b6f" CreationDate="2011-06-27T21:15:24.467" UserId="6581" Text="2D Tile-based terrian generation" />
  <row Id="31834" PostHistoryTypeId="3" PostId="14238" RevisionGUID="f567e08a-cc3a-4720-8044-c56aa06b9b6f" CreationDate="2011-06-27T21:15:24.467" UserId="6581" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;tiles&gt;&lt;terrain&gt;&lt;generated&gt;" />
  <row Id="31835" PostHistoryTypeId="5" PostId="14069" RevisionGUID="d41236e2-78c1-422f-9914-de70fd1f3118" CreationDate="2011-06-27T21:16:39.787" UserId="233" Comment="spelling, mostly" Text="You just have to generate some boundaries for the blocks you are going to make, maybe due to the last block or other limitations in your game; for example, if your game has some level of ground, no block should start below ground level. Having those parameters set, it's really easy to create a random number which has all the features you required. &#xD;&#xA;&#xD;&#xA;In your game example: imagine a block starting at `NewStartPositionY` and ending at `NewEndPositionY`. We know `GroundLevel` is the ground height (you consider it as zero) and `CeilingLevel` is the ceiling height. A character might jump at most `MaxJump` units. Some other parameters might be `PlayerHeight`, which is the height of the character, and `LastStartPositionY` and `LastEndPositionY` which define the last block, and let's take `MinimumBlockSize` as the minimum size of platform. Knowing all these values you can set your boundaries : &#xD;&#xA;&#xD;&#xA;	// to initialize boundaries&#xD;&#xA;	NewStartPositionY = GroundLevel;&#xD;&#xA;	NewEndPositionT = min (LastEndPositionY + MaxJump,  CeilingLevel - PlayerHeight)&#xD;&#xA;	// to set actual random value&#xD;&#xA;	NewStartPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize)&#xD;&#xA;	NewEndPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize) + NewStartPositionY + MinimumBlockSize;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;Here is what the above code actually does; I just expanded it since it seems to cause many a headache! (It just needs more variables and does more operations but the result is the same.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// -- first we define what are the boundaries of generated blocks &#xD;&#xA;	// it's obvious that no block can be under the ground level&#xD;&#xA;	MinimumBoundaryY = GroundLevel;&#xD;&#xA;	// we need to make sure player can jump over the new level&#xD;&#xA;	// and at the same time we have to make sure player can go over it&#xD;&#xA;	// and not hit the ceiling so we choose the minimum value from them both&#xD;&#xA;	MaximumBoundaryY = min(lastEndPositionY + maxJump, CeilingLevel - PlayerHeight)&#xD;&#xA;	// --now initialize startPosition of the Block&#xD;&#xA;	// we want the block to at least have `MinimumBlockSize` height&#xD;&#xA;	// so the start position should be somewhere between `minimumBoundaryY`&#xD;&#xA;	// and `MaximumBoundaryY - MinimumBlockSize`&#xD;&#xA;	StartYRange = MaximumBoundaryY - MinimumBoundaryY - minimumBlockSize;&#xD;&#xA;	// and now we a random value we assign the actual value of new StartPosition&#xD;&#xA;	newStartPositionY = random() % StartYRange + MinimumBlockSize;&#xD;&#xA;	// --now as the last part we have to calculate endPosition of the new block&#xD;&#xA;	// again we first calculate the range for endPosition value.&#xD;&#xA;	// note that end position should always be somewhere between&#xD;&#xA;	// `beginPositionY + MinimumBlockHeight` and `maximumBlockHeight` so the range well be&#xD;&#xA;	EndYRange = MaximumBoundaryY - newStartPositionY - MinimumBlockHeight;&#xD;&#xA;	// in the end just set the EndPosition of the Block, we now it's variation range&#xD;&#xA;	// and we know it's the minimum valid value is `beginPositionY + MinimumBlockheight`&#xD;&#xA;	NewEndPositionY = random() % EndYRange + newStartPositionY + MinimumBlockHeight;&#xD;&#xA;&#xD;&#xA;Hope this second piece of code helps you all understand what my code does! (and change your downvotes to upvotes :D).&#xD;&#xA;" />
  <row Id="31836" PostHistoryTypeId="24" PostId="14069" RevisionGUID="d41236e2-78c1-422f-9914-de70fd1f3118" CreationDate="2011-06-27T21:16:39.787" Comment="Proposed by 233 approved by 51 edit id of 522" />
  <row Id="31837" PostHistoryTypeId="5" PostId="14069" RevisionGUID="1819a5ce-df63-4506-96f0-cc303b635fd9" CreationDate="2011-06-27T21:19:20.230" UserId="7328" Comment="again fixed some gramatical mistakes." Text="you just have to generate some boundery for the blocks you are going to make, it may be caused by the last block or other limitations in your game, for example if your game has some level of ground no block should start below ground level. having those parameters set, it's really easy to create a random number which has all the features you requared. &#xD;&#xA;&#xD;&#xA;in your game example : imagine the created block start from `NewBlockBottom` and ends to `NewBlockTop`. and we know `GroundLevel` is the ground height (you consider it as zero) and `CeilingLevel` is the ceiling height. also we know a character might jump at most `MaxJump` units. another parameter might be `PlayerHeight` which defines the height of character. and let's consider `LastBlockBottom` and `LastBlockTop` define the last block. we may consider `MinimumBlockSize` as the minimum size of platform. &#xD;&#xA;knowing all these values you can define a new block: &#xD;&#xA;&#xD;&#xA;	// to initialize bounderies&#xD;&#xA;	NewBlockBottom = GroundLevel;&#xD;&#xA;	NewBlockTop = min (LastBlockTop + MaxJump,  CeilingLevel - PlayerHeight)&#xD;&#xA;	// to set accual random value&#xD;&#xA;	NewBlockBottom = random (NewBlockTop - NewBlockBottom - MinimumBlockSize) + NewBlockBottom;&#xD;&#xA;	NewBlockTop = random (NewBlockTop - NewBlockBottom - MinimumBlockSize) + NewBlockBottom + MinimumBlockSize;&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;here is what the above code acually do I just expanded it since it seems to cause many a headache! (it just need more variables and do more operation but result is the same)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// -- first we define bounderies for the generated block &#xD;&#xA;	// it's obvious that block can't start from under the ground level&#xD;&#xA;	MinimumBoundryY = GroundLevel;&#xD;&#xA;	// and we need to make sure player can jump over the new block.&#xD;&#xA;	// at the same time we have to make sure player can go over it&#xD;&#xA;	// without hitting the ceiling so we choose the minimum value&#xD;&#xA;	MaximumBoundryY = min(lastBlockTop + maxJump, CeilingLevel - PlayerHeight)&#xD;&#xA;	// --now initialize startPoistion of the Block&#xD;&#xA;	// we want the block to be at least `MinimumBlockSize` height&#xD;&#xA;	// so the start position should be somewhere between `minimumBoundryY`&#xD;&#xA;	// and `MaximumBoundryY - MinimumBlockSize`&#xD;&#xA;	BottomRange = MaximumBoundryY - MinimumBoundryY - minimumBlockSize;&#xD;&#xA;	// and now we set accual value of new BlockBottom as a random value in that range&#xD;&#xA;	// note that start of a block has to be at least MinimumBoundryY units over zero.&#xD;&#xA;	NewBlockBottom = random() % BottomRange + MinimumBoundryY;&#xD;&#xA;	// --now we have to calculate Top value for the new block&#xD;&#xA;	// again we first calculate the range for NewBlockTop value.&#xD;&#xA;	// note that NewBlockTop should always be somewhere between&#xD;&#xA;	// `NewBlockBottom + MinimumBlockHeight` and `maximumBoundryY` so the range will be&#xD;&#xA;	TopRange = MaximumBoundryY - NewBlockBottom - MinimumBlockHeight;&#xD;&#xA;	// to complete the work we just have to set the Top value for the new Block&#xD;&#xA;	// , we know it's range and we know it's the minimum valid value is	&#xD;&#xA;	// `NewBlockBottom + MinimumBlockheight`&#xD;&#xA;	NewBlockTop = random() % TopRange + NewBlockTop + MinimumBlockHeight;&#xD;&#xA;&#xD;&#xA;hope this second code help you all understand what my code does! (and change your downvotes to upvotes :D).&#xD;&#xA;" />
  <row Id="31838" PostHistoryTypeId="5" PostId="14130" RevisionGUID="3b568afc-8640-47e4-b148-47b858d32344" CreationDate="2011-06-27T21:21:57.243" UserId="2061" Comment="added 2 characters in body" Text="@Gajet's answer is impossible to follow (so I'm not even convinced it will work), and what I think @The Communist Duck meant his solution to be...&#xD;&#xA;&#xD;&#xA;    block_y = ground_y + random() % (previousBlock_y + playerJumpHeight)&#xD;&#xA;&#xD;&#xA;...will be heavily biased towards creating blocks with y-values centered around `ground_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;The easiest way to produce more satisfying results would be, rather than generate a height between `ground_y` and `previousBlock_y + playerJumpHeight`, generate a random value between `previousBlock_y - playerJumpHeight` and `previousBlock_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;Of course, since we want to take `ground_y` and `maxBlockHeight` into consideration also, we *really* want to find a random value between `max(ground_y, previousBlock_y - playerJumpHeight)` and `min(maxBlockHeight, previousBlock_y + playerJumpHeight)`.  This will skew our distribution a bit *(biased towards the center of the screen)*, but not enough to be noticeable.&#xD;&#xA;&#xD;&#xA;The simplest way to do this would be&#xD;&#xA;&#xD;&#xA;    //delta_y is a random number between -/+ playerJumpHeight&#xD;&#xA;    min_y = max(ground_y, previousBlock_y - playerJumpHeight)&#xD;&#xA;    max_y = min(maxBlockHeight, previousBlock_y + playerJumpHeight)&#xD;&#xA;    range_y = max_y - min_y&#xD;&#xA;    block_y = random() % range_y + min_y&#xD;&#xA;&#xD;&#xA;If you then want the block to have a random height as well, just generate a random number between `ground_y` and `block_y` to be the height. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**[Edit]**  There *is* a way to have a probability of jumping down by any amount, while still giving the player equal probability of being anywhere on the screen at any given point.&#xD;&#xA;&#xD;&#xA;Thanks to [Didier Piau](http://math.stackexchange.com/questions/47494/magical-loaded-dice-and-expected-values) on the math forums for figuring this out.  The full explanation is complex, so I'll leave it out; the curious can visit that page, from which I generalized this algorithm.  The algorithm itself is actually pretty simple, though.&#xD;&#xA;&#xD;&#xA;    int getNextBlockHeight()&#xD;&#xA;	{&#xD;&#xA;		int playingFieldHeight = screen_y - ground_y;&#xD;&#xA;		int canonicalBlockMaxHeight = playingFieldHeight - playerHeight;&#xD;&#xA;		int nextBlockMaxHeight = min(currentBlockHeight + playerJumpHeight, canonicalBlockMaxHeight);&#xD;&#xA;		&#xD;&#xA;		//Let's divide the screen vertically into chunks of size playerJumpHeight.&#xD;&#xA;		//This code makes it so that each chunk is approximately twice as likely as being chosen&#xD;&#xA;		//as the previous chunk&#xD;&#xA;		float canonicalHeightRatio = (float)canonicalBlockMaxHeight / playerJumpHeight;&#xD;&#xA;		float nextHeightRatio = (float)nextBlockMaxHeight / playerJumpHeight;&#xD;&#xA;&#xD;&#xA;		//The following looks complicated, but really it just ensures that the minimum is 0, the maximum is&#xD;&#xA;		//nextBlockMaxHeight, and everything in between is mapped logrithmically&#xD;&#xA;		float randomMin = pow(2, -canonicalHeightRatio);&#xD;&#xA;		float randomMax = pow(2, nextHeightRatio-canonicalHeightRatio);&#xD;&#xA;		float randomVal = randFloat(randomMin, randomMax);&#xD;&#xA;		float randomHeightRatio = log2(randVal)+canonicalHeightRatio;&#xD;&#xA;		return (int)(randomHeightRatio*playerJumpHeight);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Return the log-base-2 of a number&#xD;&#xA;	const float log_of_2 = log(2);&#xD;&#xA;	float log2(float value)&#xD;&#xA;	{&#xD;&#xA;	    return log(value) / log_of_2;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Generates a random floating-point number between min and max&#xD;&#xA;	float randFloat(float min, float max)&#xD;&#xA;	{&#xD;&#xA;		float randomNormalized = (float)rand()/RAND_MAX; //Between 0.0 and 1.0&#xD;&#xA;		return randomNormalized*(max-min) + min;&#xD;&#xA;	}&#xD;&#xA;	" />
  <row Id="31839" PostHistoryTypeId="25" PostId="14233" RevisionGUID="43951438-cb18-4098-8ac0-a65041e78130" CreationDate="2011-06-27T21:25:43.170" Comment="http://twitter.com/#!/StackGameDev/status/85458809086148608" />
  <row Id="31840" PostHistoryTypeId="8" PostId="14069" RevisionGUID="1ddecd68-03dc-4670-bb75-daba27c55476" CreationDate="2011-06-27T21:31:18.770" UserId="7328" Comment="Rollback to [d41236e2-78c1-422f-9914-de70fd1f3118]" Text="You just have to generate some boundaries for the blocks you are going to make, maybe due to the last block or other limitations in your game; for example, if your game has some level of ground, no block should start below ground level. Having those parameters set, it's really easy to create a random number which has all the features you required. &#xD;&#xA;&#xD;&#xA;In your game example: imagine a block starting at `NewStartPositionY` and ending at `NewEndPositionY`. We know `GroundLevel` is the ground height (you consider it as zero) and `CeilingLevel` is the ceiling height. A character might jump at most `MaxJump` units. Some other parameters might be `PlayerHeight`, which is the height of the character, and `LastStartPositionY` and `LastEndPositionY` which define the last block, and let's take `MinimumBlockSize` as the minimum size of platform. Knowing all these values you can set your boundaries : &#xD;&#xA;&#xD;&#xA;	// to initialize boundaries&#xD;&#xA;	NewStartPositionY = GroundLevel;&#xD;&#xA;	NewEndPositionT = min (LastEndPositionY + MaxJump,  CeilingLevel - PlayerHeight)&#xD;&#xA;	// to set actual random value&#xD;&#xA;	NewStartPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize)&#xD;&#xA;	NewEndPositionY = random (NewEndPositionY - NewStartPositionY - MinimumBlockSize) + NewStartPositionY + MinimumBlockSize;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;Here is what the above code actually does; I just expanded it since it seems to cause many a headache! (It just needs more variables and does more operations but the result is the same.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// -- first we define what are the boundaries of generated blocks &#xD;&#xA;	// it's obvious that no block can be under the ground level&#xD;&#xA;	MinimumBoundaryY = GroundLevel;&#xD;&#xA;	// we need to make sure player can jump over the new level&#xD;&#xA;	// and at the same time we have to make sure player can go over it&#xD;&#xA;	// and not hit the ceiling so we choose the minimum value from them both&#xD;&#xA;	MaximumBoundaryY = min(lastEndPositionY + maxJump, CeilingLevel - PlayerHeight)&#xD;&#xA;	// --now initialize startPosition of the Block&#xD;&#xA;	// we want the block to at least have `MinimumBlockSize` height&#xD;&#xA;	// so the start position should be somewhere between `minimumBoundaryY`&#xD;&#xA;	// and `MaximumBoundaryY - MinimumBlockSize`&#xD;&#xA;	StartYRange = MaximumBoundaryY - MinimumBoundaryY - minimumBlockSize;&#xD;&#xA;	// and now we a random value we assign the actual value of new StartPosition&#xD;&#xA;	newStartPositionY = random() % StartYRange + MinimumBlockSize;&#xD;&#xA;	// --now as the last part we have to calculate endPosition of the new block&#xD;&#xA;	// again we first calculate the range for endPosition value.&#xD;&#xA;	// note that end position should always be somewhere between&#xD;&#xA;	// `beginPositionY + MinimumBlockHeight` and `maximumBlockHeight` so the range well be&#xD;&#xA;	EndYRange = MaximumBoundaryY - newStartPositionY - MinimumBlockHeight;&#xD;&#xA;	// in the end just set the EndPosition of the Block, we now it's variation range&#xD;&#xA;	// and we know it's the minimum valid value is `beginPositionY + MinimumBlockheight`&#xD;&#xA;	NewEndPositionY = random() % EndYRange + newStartPositionY + MinimumBlockHeight;&#xD;&#xA;&#xD;&#xA;Hope this second piece of code helps you all understand what my code does! (and change your downvotes to upvotes :D).&#xD;&#xA;" />
  <row Id="31841" PostHistoryTypeId="2" PostId="14239" RevisionGUID="2b634710-23b1-4575-983a-0db2ecd9d759" CreationDate="2011-06-27T22:48:48.527" UserId="7728" Text="There are two positions that a programmer without specific game industry experience might qualify for in a major game studio.&#xD;&#xA;&#xD;&#xA;First, depending upon level of experience as a programmer in a non-games industry (and the specific studio's stance on this), he may qualify either as a junior or as a mid-level programmer.  At a major studio, it would be essential to be able to show proficiency with C++ in order to get either of these roles.  At web-game-making studios, Flash will be necessary, etc.  &#xD;&#xA;&#xD;&#xA;On the other hand, if the programmer had much leadership background, he might qualify for an &quot;assistant producer&quot; role.  That is a largely non-technical role, though;  more of what most other industries would call a &quot;project manager&quot;.&#xD;&#xA;&#xD;&#xA;Any game industry job will involve some degree of mentoring, to teach new hires about how to use the company's tools and how to follow their best practices.  For a junior-level position, the mentoring will be a bit more extensive, intending to bring a hire from &quot;I studied this at university&quot;-level up to a professional level.  But you absolutely will not find a game industry job where they pay you (for example) to learn how to program in C++ (or whatever the particular studio's standard language of choice might be);  that's a skill they expect you to have already mastered before applying for the job." />
  <row Id="31842" PostHistoryTypeId="5" PostId="14239" RevisionGUID="d0e1d85f-f19f-44bd-828c-acb2adba443b" CreationDate="2011-06-27T22:54:21.630" UserId="7728" Comment="Added &quot;Short version&quot; summary." Text="There are two positions that a programmer without specific game industry experience might qualify for in a major game studio.&#xD;&#xA;&#xD;&#xA;First, depending upon level of experience as a programmer in a non-games industry (and the specific studio's stance on this), he may qualify either as a junior or as a mid-level programmer.  At a major studio, it would be essential to be able to show proficiency with C++ in order to get either of these roles.  At web-game-making studios, Flash will be necessary, etc.  &#xD;&#xA;&#xD;&#xA;On the other hand, if the programmer had much leadership background, he might qualify for an &quot;assistant producer&quot; role.  That is a largely non-technical role, though;  more of what most other industries would call a &quot;project manager&quot;.&#xD;&#xA;&#xD;&#xA;Any game industry job will involve some degree of mentoring, to teach new hires about how to use the company's tools and how to follow their best practices.  For a junior-level position, the mentoring will be a bit more extensive, intending to bring a hire from &quot;I studied this at university&quot;-level up to a professional level.  But you absolutely will not find a game industry job where they pay you (for example) to learn how to program in C++ (or whatever the particular studio's standard language of choice might be);  that's a skill they expect you to have already mastered before applying for the job.&#xD;&#xA;&#xD;&#xA;Short version:  No, there is really no career path to learn game development &quot;on the job&quot;.  There is enough competition for game industry jobs that no company will pay someone to learn, when they can pay someone else to work right now.  If you want to get into the game industry, you either need to get game experience, or else get equivalent experience elsewhere, using similar tools to those that are used in the game industry." />
  <row Id="31843" PostHistoryTypeId="2" PostId="14240" RevisionGUID="019f376e-129c-4053-beef-5cd099615ad6" CreationDate="2011-06-27T23:02:21.990" UserId="7198" Text="**I would like to know how to leave a fading texture/material trail in udk.** &#xD;&#xA;&#xD;&#xA;For example (I'm not sure if there is a special name for this effect):&#xD;&#xA;&#xD;&#xA; - A character may leave footprints that fade after x number of seconds &#xD;&#xA; - Or, a tank may leave a tracks trail as in Civilization IV. &#xD;&#xA;&#xD;&#xA;Here is another example of this type of effect. Skip to 1:00 and watch the green slime texture.&#xD;&#xA;&#xD;&#xA;&gt;http://www.youtube.com/watch?v=KdJIauWjE8s&#xD;&#xA;&#xD;&#xA;**How do I accomplish this effect in UDK? Any good tutorials?**&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31844" PostHistoryTypeId="1" PostId="14240" RevisionGUID="019f376e-129c-4053-beef-5cd099615ad6" CreationDate="2011-06-27T23:02:21.990" UserId="7198" Text="How do I accomplish fading texture trails in UDK?" />
  <row Id="31845" PostHistoryTypeId="3" PostId="14240" RevisionGUID="019f376e-129c-4053-beef-5cd099615ad6" CreationDate="2011-06-27T23:02:21.990" UserId="7198" Text="&lt;textures&gt;&lt;udk&gt;" />
  <row Id="31846" PostHistoryTypeId="5" PostId="10232" RevisionGUID="b6229ae2-e938-4d0a-b0d0-7ff8966c730f" CreationDate="2011-06-27T23:23:36.123" UserId="5311" Comment="Minor grammatical corrections and clarifications" Text="Hey there, I think that Cocos2d-iPhone is far more advanced and full-featured than Cocos2D-Python. Some design decisions are the same, like using a SceneGraph, and they share some class names, but I would bet that Cocos2d-iPhone has far more work behind it than Cocos2D-Python. I would perhaps recommend that you use [cocos2d-x][1].  It is a C++ port of Cocos2D, which has cross-platform support as its main feature.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cocos2d-x.org/" />
  <row Id="31847" PostHistoryTypeId="24" PostId="10232" RevisionGUID="b6229ae2-e938-4d0a-b0d0-7ff8966c730f" CreationDate="2011-06-27T23:23:36.123" Comment="Proposed by 5311 approved by 51 edit id of 523" />
  <row Id="31848" PostHistoryTypeId="2" PostId="14241" RevisionGUID="236f73f6-d187-4998-802a-9e131095ed25" CreationDate="2011-06-27T23:47:43.690" UserId="8273" Text="I'll do this like that:&#xD;&#xA;&#xD;&#xA; - Sort objects in front-back(distance from camera) order&#xD;&#xA;&#xD;&#xA; - Draw object's border(as lines and points) with disabled GL_DEPTH_TEST&#xD;&#xA;&#xD;&#xA; - Draw object with enabled GL_DEPTH_TEST&#xD;&#xA;&#xD;&#xA; - Do last 2 steps for every object&#xD;&#xA;&#xD;&#xA;I'll try to do this like that, but if anyone have ideas of better solution to this problem(MIND CONCAVE OBJECTS,PLEASE)- feel free to share with us.&#xD;&#xA;&#xD;&#xA;PS.I'm not fully satisfied with my solution-changing OpenGL states so often can be harmful. But if no one can help me with stencil buffer settings, I guess that's the only way for me.&#xD;&#xA;" />
  <row Id="31849" PostHistoryTypeId="25" PostId="14238" RevisionGUID="29c86c5f-5dff-4928-a5e4-42a4a04ba3fd" CreationDate="2011-06-28T00:25:44.010" Comment="http://twitter.com/#!/StackGameDev/status/85504109356130305" />
  <row Id="31850" PostHistoryTypeId="2" PostId="14242" RevisionGUID="162a0ada-33ac-48f5-b368-8a4efa78450b" CreationDate="2011-06-28T00:58:54.320" UserId="7191" Text="I haven't used UDK before, but I'm sure it supports a texture alpha channel. In order to fade a texture out over time, you just update it's alpha channel based on the amount of time elapsed since it was placed. For example:&#xD;&#xA;&#xD;&#xA;    if(time &gt;= 10000 &amp;&amp; time &lt;= 20000)&#xD;&#xA;        texture.alpha = 1 - ((20000 - time)/10000);&#xD;&#xA;&#xD;&#xA;Where time is the time elapsed since the texture was placed and is stored in milliseconds.&#xD;&#xA;This will start fading the texture after 10 seconds (10,000 milliseconds), and fade for 10 seconds until it's completely faded. I'm not sure it's that what you're looking for :/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; [This page][1] seems like it has good information on texture painting and alpha. And a [video here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.chrisalbeluhn.com/UDK_Advanced_Vertex_Painting.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=G-u_0bbsK-4" />
  <row Id="31851" PostHistoryTypeId="2" PostId="14243" RevisionGUID="cfc32709-3179-4231-9f0b-ad32fe75af53" CreationDate="2011-06-28T01:05:22.843" UserId="1101" Text="&gt; In other words, what are the positions such a programmer might aspire to get hired for, in the game industry?&#xD;&#xA;&#xD;&#xA;In my experience, there are no routes into game programming that allow you to learn on the job. You must demonstrate your suitability for the role before applying, usually with a combination of an academic qualification and a collection of code samples.&#xD;&#xA;&#xD;&#xA;&gt; I am asking because it seems to me that - even without direct experience with 3D modelling, physics engines, shaders, etc... - for as much complex as these topics might be - they are still &quot;just&quot; top layers one can learn &quot;on the job&quot; if he/she has already good programming skills and experience in software design (for example during peer-programming sessions).&#xD;&#xA;&#xD;&#xA;In theory, yes. In practice, no. Nobody is going to pay you to learn this stuff because for every one person in your position, there are fifty of equivalent experience who are teaching themselves these skills in their spare time with a view to presenting a demo to prospective employers.&#xD;&#xA;&#xD;&#xA;&gt; but for all the other programming jobs I previously took, I learnt most of the specificities while working on concrete projects... so I wonder if there is a chance to do the same with game development.&#xD;&#xA;&#xD;&#xA;Most other programming jobs either have fewer domain-specific requirements (eg. I used to work in geographical information systems, but the amount I needed to know about map projections and the like could be picked up in a day) or are less able to rely on applicants to be self-motivated and thus *have* to provide the training. Games development is very heavily domain specific and has an army of self-motivated people eager to break into the industry." />
  <row Id="31852" PostHistoryTypeId="5" PostId="1204" RevisionGUID="828b3e37-6b6a-46e6-b7d9-0856bedd304b" CreationDate="2011-06-28T01:25:19.573" UserId="441" Comment="Added a note." Text="Dave mentions some excellent points, although I have to point out that Haskell has solved both of his issues. Statelessness can be bypassed using the State monad *(EDIT: not really -- see below for details)*, and sequencing can be handled using the IO monad *(EDIT: or any other monad, for that matter...)*. &#xD;&#xA;&#xD;&#xA;The challenges you'll have (and that I've had trying to learn both games programming and Haskell), are more along these lines. (These are all Haskell-specific, since I really haven't gone deep with any other FP languages yet.)&#xD;&#xA;&#xD;&#xA; - **FP Learning curve:** FP requires a complete shift of mindset from iterative programming. Learning to think in terms of maps and folds rather than loops requires a mental workout if you're not used to it. &#xD;&#xA; - **Mathy learning curve:** Haskell is both blessed and cursed by the mathematical sophistication of its designers, because after you learn the basics of FP, you're stuck with monads, morphisms, arrows, and a whole host of other considerations which, while not tough in and of themselves, are very abstract. &#xD;&#xA; - **Monads:** these puppies are not particularly hard to wrap your mind around, especially if you accept [Eric Raymond's statement][1] that they are a &quot;a hack to turn function composition into a way of forcing the sequencing of function calls.&quot; Unfortunately (though this is getting better as Haskell gains in popularity), many explanations of monads either aim way over the head of most programmers (&quot;they're monoids in the category of endofunctors!&quot;), or at a completely unhelpful analogy (e.g., Brent Yorgey's distressingly accurate example, &quot;[monads are like burritos][2]!&quot; You think he's kidding? That nobody could ever come up with such a goofy analogy in a tutorial? [Think again][3].)&#xD;&#xA; - **Ecosystem:** If you've managed to get beyond all the other bumps in the road, you will be cheek-and-jowl up against the practical day-to-day reality of working with a still largely experimental language. God help you when you get here. Here's where I started seriously jonesing for Scala, or F#, or some other language where there is at least *some* guarantee of interoperability with other libraries. Once upon a time, I got Haskell to link and load the OpenGL libraries in Windows. That made me feel pretty good. Then the OpenGL bindings were re-released, and broke everything I had done. That's life in Haskell-land. Honestly, it can be a pain. You want a wrapper for the Bullet engine? It's in Hackage -- as [abandonware][4] from November of last year. You like Ogre3d? Hackage has bindings to [only a subset of the library][5].  Bottom line is that if you stick to a language off the beaten path for game development, you will spend a lot more time working on basic plumbing than you would if you just followed the herd and stuck with C++.&#xD;&#xA;&#xD;&#xA;The flip side of this is that things are rapidly improving. And it really all depends on what you want out of the experience. You want to build a game and put it on your website to seek fame and fortune? Stick with C++ or Python. But if you want to learn something new that will require you to innovate your processes, try a functional language. Just have a lot of patience with yourself while you're learning. &#xD;&#xA;&#xD;&#xA;Antti Salonen has an interesting blog detailing his [on-again-off-again affair][6] with Haskell games programming. It's worth reading. &#xD;&#xA;&#xD;&#xA;**Edit (one year later):** Now that I've studied the State monad more, I realize it's not a particularly good solution for state that is intended to persist outside a particular function. The real solutions to statelessness are found in Haskell in IOVar, ST, MVar (for thread safety), or through something like Yampa, which uses Arrows and FRP to manage internal state that is nonetheless hidden from the developer. (This list is in order of difficulty, though the first three are not particularly difficult once you understand monads.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://esr.ibiblio.org/?p=1796&#xD;&#xA;  [2]: http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/&#xD;&#xA;  [3]: http://www.haskell.org/haskellwiki/Meet_Bob_The_Monadic_Lover&#xD;&#xA;  [4]: http://hackage.haskell.org/package/bullet&#xD;&#xA;  [5]: http://hackage.haskell.org/package/hogre&#xD;&#xA;  [6]: http://codeflow.wordpress.com/" />
  <row Id="31853" PostHistoryTypeId="25" PostId="14228" RevisionGUID="4122cd7b-038c-4f79-812f-6659f29f33d0" CreationDate="2011-06-28T03:25:44.790" Comment="http://twitter.com/#!/StackGameDev/status/85549412855726080" />
  <row Id="31854" PostHistoryTypeId="5" PostId="14232" RevisionGUID="1d0bb756-06ff-4db0-abab-6fe461f573a3" CreationDate="2011-06-28T03:57:50.750" UserId="2061" Comment="added 7 characters in body" Text="IMHO, the towers should not know about the creeps; unless you are planning on simply looping over the list of creeps for every tower, you'll probably want to implement some nontrivial [space partitioning](http://en.wikipedia.org/wiki/Nearest_neighbour_search).  That sort of logic doesn't belong in the towers class.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, I've sidestepped the issue.  Now instead of needing access to a list of creeps, you need access to a class instance.&#xD;&#xA;&#xD;&#xA;When you need a single instance of a class throughout your program, we call that class a **service**.  There are several standard methods of implementing services in programs:&#xD;&#xA;&#xD;&#xA;* **Global variables**. These are the easiest to implement, but the worst design.  If you use too many global variables, you will quickly find yourself writing modules that rely on each other too much ([strong-coupling][1]), making the flow of logic very difficult to follow.  Global variables are not multithreading-friendly.  Global variables make tracking the lifetime of objects more difficult, and clutter the namespace.  They are, however, the most performant option, so there are times when they can and should be used, but use them spareingly.&#xD;&#xA;* **Singletons**.  About 10-15 years ago, singletons were *the* big design-pattern to know about.  However, nowadays they are looked down upon.  They are much easier to multi-thread, but you must limit their use to one thread at a time, which is not always what you want.  Tracking lifetimes is just as difficult as with global variables.  &#xD;&#xA;A typical singleton class will look something like this:&#xD;&#xA;&#xD;&#xA;		class MyClass&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			static MyClass* _instance;&#xD;&#xA;			MyClass() {} //private constructor&#xD;&#xA;			&#xD;&#xA;		public:&#xD;&#xA;			static MyClass* getInstance();&#xD;&#xA;			void method();&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		MyClass* MyClass::_instance = NULL;&#xD;&#xA;		MyClass* MyClass::getInstance()&#xD;&#xA;		{&#xD;&#xA;			if(_instance == NULL)&#xD;&#xA;				_instance = new MyClass(); //Not thread-safe version&#xD;&#xA;			return _instance;&#xD;&#xA;			&#xD;&#xA;			//Note that _instance is *never* deleted - &#xD;&#xA;			//it exists for the entire lifetime of the program!&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;* **Dependency Injection (DI)**.  This just means passing the service in as a constructor parameter.  A service must already exist in order to pass it into a class, so there's no way for two services to rely on each other; in 98% of the cases, [this is what you want][2] *(and for the other 2%, you can always create a `setWhatever()` method and pass in the service later)*.  Because of this, DI doesn't have the same coupling problems as the other options.  It can be used with multithreading, because each thread can simply have its own instance of every service (and share only those it absolutely needs to).  It also makes code unit-testable, if you care about that.&#xD;&#xA;&#xD;&#xA;    The problem with dependency injection it takes up more memory; now every instance of a class needs references to every service it will use.  Also, it gets annoying to use when you have too many services; there are frameworks that mitigate this problem in other languages, but because of C++'s lack of reflection, DI frameworks in C++ tend to be even more work than just doing it manually.&#xD;&#xA;&#xD;&#xA;		//Example of dependency injection&#xD;&#xA;		class Tower&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			MissileCreationService* _missileCreator;&#xD;&#xA;			CreepLocatorService _creepLocator;&#xD;&#xA;		public:&#xD;&#xA;			Tower(MissileCreationService*, CreepLocatorService*);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		//In order to create a tower, the creating-class must have instances of&#xD;&#xA;		// MissilCreationService and CreepLocatorService as well; thus, if we want to &#xD;&#xA;		// add a new service to the constructor, we must add it to the constructor&#xD;&#xA;		// of every class which creates a Tower as well!&#xD;&#xA;		//This is not a problem in languages like C# and Java, where you can use&#xD;&#xA;		// a framework to create an instance and inject automatically.&#xD;&#xA;&#xD;&#xA;    Dependency injection is the usual solution for this problem, and is the answer you will see most highly upvoted to questions like this on StackOverflow.com.  DI is a type of [Inversion of Control][3] (IoC).&#xD;&#xA;&#xD;&#xA;* **Service Locator**.  Basically, just a class that holds an instance of every service.  You can [do it using reflection](http://www.codinginlondon.com/2009/05/cheap-ioc-in-native-c.html), or you can just add a new instance to it every time you want to create a new service.  You still have the same problem as before - *How do classes access this locator?* - which can be solved in any of the above ways, but now you only need to do it for your `ServiceLocator` class, rather than for dozens of services.  This method is also unit-testable, if you care about that sort of thing.  &#xD;&#xA;To read more about how the XNA framework (C#) uses services, read [this answer][4].&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Circular_dependency&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Inversion_of_Control&#xD;&#xA;[4]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="31855" PostHistoryTypeId="2" PostId="14244" RevisionGUID="e288dff3-5c25-454c-918f-7758c2bdea8d" CreationDate="2011-06-28T05:16:34.937" UserId="8296" Text="I'm working on an isometric (2D) game with moderate-scale multiplayer - 20-30 players. I've had some difficulty getting a good movement prediction implementation in place.&#xD;&#xA;&#xD;&#xA;Right now, clients are authoritative for their own position. The server performs validation and broad-scale cheat detection, and I fully realize that the system will never be fully robust against cheating. However, the performance and implementation tradeoffs work well for me right now.&#xD;&#xA;&#xD;&#xA;Given that I'm dealing with sprite graphics, the game has 8 defined directions rather than free movement. Whenever the player changes their direction or speed (walk, run, stop), a &quot;true&quot; 3D velocity is set on the entity and a packet it sent to the server with the new movement state. In addition, every 250ms additional packets are transmitted with the player's current position for state updates on the server as well as for client prediction.&#xD;&#xA;&#xD;&#xA;After the server validates the packet, it gets automatically distributed to all of the other &quot;nearby&quot; players. Client-side, all entities with non-zero velocity (ie/ moving entities) are tracked and updated by a rudimentary &quot;physics&quot; system - basically nothing more than changing the position by the velocity according to the elapsed time slice (40ms or so). &#xD;&#xA;&#xD;&#xA;What I'm struggling with is how to implement clean movement prediction. I have the nagging suspicion that I've made a design mistake somewhere. I've been over the Unreal, Half-life, and all other movement prediction/lag compensation articles I could find, but they all seam geared toward shooters: &quot;Don't send each control change, send updates every 120ms, server is authoritative, client predicts, etc&quot;. Unfortunately, that style of design won't work well for me - there's no 3D environment so each individual state change is important. &#xD;&#xA;&#xD;&#xA;1) Most of the samples I saw tightly couple movement prediction right into the entities themselves. For example, storing the previous state along with the current state. I'd like to avoid that and keep entities with their &quot;current state&quot; only. Is there a better way to handle this? &#xD;&#xA;&#xD;&#xA;2) What should happen when the player stops? I can't interpolate to the correct position, since they might need to walk backwards or another strange direction if their position is too far ahead. &#xD;&#xA;&#xD;&#xA;3) What should happen when entities collide? If the current player collides with something, the answer is simple - just stop the player from moving. But what happens if two entities take up the same space on the server? What if the local prediction causes a remote entity to collide with the player or another entity - do I stop them as well? If the prediction had the misfortune of sticking them in front of a wall that the player has gone around, the prediction will never be able to compensate and once the error gets to high the entity will snap to the new position." />
  <row Id="31856" PostHistoryTypeId="1" PostId="14244" RevisionGUID="e288dff3-5c25-454c-918f-7758c2bdea8d" CreationDate="2011-06-28T05:16:34.937" UserId="8296" Text="Movement prediction for non-shooters" />
  <row Id="31857" PostHistoryTypeId="3" PostId="14244" RevisionGUID="e288dff3-5c25-454c-918f-7758c2bdea8d" CreationDate="2011-06-28T05:16:34.937" UserId="8296" Text="&lt;physics&gt;&lt;network&gt;" />
  <row Id="31858" PostHistoryTypeId="2" PostId="14245" RevisionGUID="66d661a8-63dc-4a04-8463-92f90fa221f5" CreationDate="2011-06-28T05:47:19.363" UserId="8090" Text="My first questions would be: What is wrong with using a model where the server has authority? Why does it matter whether the environment is 2D or 3D? It would make your cheat protection a lot easier if your server was authoritative.&#xD;&#xA;&#xD;&#xA;&gt; Most of the samples I saw tightly couple movement prediction right into the entities themselves. For example, storing the previous state along with the current state. I'd like to avoid that and keep entities with their &quot;current state&quot; only. Is there a better way to handle this?&#xD;&#xA;&#xD;&#xA;When performing prediction, it is necessary to maintain several states (or at least deltas) on the client so that the when the authoritative state/delta is received from the server, it can be compared with those of the client and you can make the necessary corrections. The idea is to keep as much as possible deterministic to minimize the amount of corrections required. If you don't maintain the previous states, you can't know if something different happened on the server.&#xD;&#xA;&#xD;&#xA;&gt; What should happen when the player stops? I can't interpolate to the correct position, since they might need to walk backwards or another strange direction if their position is too far ahead.&#xD;&#xA;&#xD;&#xA;Why do you need to interpolate? The authoritative server should override any erroneous movements.&#xD;&#xA;&#xD;&#xA;&gt; What should happen when entities collide? If the current player collides with something, the answer is simple - just stop the player from moving. But what happens if two entities take up the same space on the server? What if the local prediction causes a remote entity to collide with the player or another entity - do I stop them as well? If the prediction had the misfortune of sticking them in front of a wall that the player has gone around, the prediction will never be able to compensate and once the error gets to high the entity will snap to the new position.&#xD;&#xA;&#xD;&#xA;These are the situations where there would be a conflict between the server and client and is why you need to maintain states on the client so that the server can correct any errors.&#xD;&#xA;&#xD;&#xA;Sorry for the quick answers, I've gotta head off. Read [this article](http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/), it does mention shooters but should work for any game requiring real-time networking." />
  <row Id="31859" PostHistoryTypeId="2" PostId="14246" RevisionGUID="05a2a8fe-f142-4456-9301-eb8d8012a453" CreationDate="2011-06-28T05:56:04.453" UserId="7640" Text="Hi so i've recently learned the SFML graphics library and would like to use or make a non-rigid body 2D physics system to use with it. I have three questions:&#xD;&#xA;&#xD;&#xA;The definition of **rigid body** in Box2d is&#xD;&#xA;&#xD;&#xA;&gt; A chunk of matter that is so strong&#xD;&#xA;&gt; that the distance between any two bits&#xD;&#xA;&gt; of matter on the chunk is completely&#xD;&#xA;&gt; constant. &#xD;&#xA;&#xD;&#xA;And this is exactly what i don't want as i would like to make elastic, deformable, breakable, and re-connection bodies. **1. Are there any simple 2D physics engines,  but with these kinds of characteristics out there?** preferably free or opensource?&#xD;&#xA;&#xD;&#xA;**2. If not could i use box2d and work off of it to create it even if it's based on rigid bodies?**&#xD;&#xA;&#xD;&#xA;**3. Finally, if there is a simple physics engine like this, should i go through with the proccess of creating a new one anyway, simply for experience and to enhance physics math knowledge?** I feel like it would help if i ever wanted to modify the code of an existing engine, or create a game with really unique physics.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="31860" PostHistoryTypeId="1" PostId="14246" RevisionGUID="05a2a8fe-f142-4456-9301-eb8d8012a453" CreationDate="2011-06-28T05:56:04.453" UserId="7640" Text="2D non-rigid physics engines?" />
  <row Id="31861" PostHistoryTypeId="3" PostId="14246" RevisionGUID="05a2a8fe-f142-4456-9301-eb8d8012a453" CreationDate="2011-06-28T05:56:04.453" UserId="7640" Text="&lt;c++&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="31862" PostHistoryTypeId="25" PostId="14246" RevisionGUID="b6a41af1-e716-4d3a-ae6a-bf53849e736d" CreationDate="2011-06-28T06:25:44.930" Comment="http://twitter.com/#!/StackGameDev/status/85594711674470400" />
  <row Id="31863" PostHistoryTypeId="2" PostId="14247" RevisionGUID="754fdee7-34d4-4bb5-9d08-632023e9ed46" CreationDate="2011-06-28T08:10:09.763" UserId="1156" Text="The term you are looking for is soft-body physics.&#xD;&#xA;&#xD;&#xA;[Wikipedia][1] has a nice list. They're all 3D AFAICS, but should be good. &#xD;&#xA;&#xD;&#xA;Also check out [this][2] SO question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;A great book (it's rigid body, but all the maths and physics are there; it's also 3D, but is trivial to transfer to 2D) is [Game Physics Engine Development][3]. It implements a particle based system before moving onto rigid bodies and collision.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Soft_body_dynamics#Engines_Supporting_Soft_Body_Physics&#xD;&#xA;  [2]: http://stackoverflow.com/questions/3269212/non-rigid-body-2d-physics-engines-in-c&#xD;&#xA;  [3]: http://www.amazon.com/Physics-Development-Kaufmann-Interactive-Technology/dp/012369471X" />
  <row Id="31864" PostHistoryTypeId="4" PostId="14246" RevisionGUID="d84c6f3c-28ef-4cd5-bf3c-14e5df83aaa8" CreationDate="2011-06-28T08:10:54.313" UserId="1156" Comment="changed it from non-rigid to soft body" Text="2D soft-body physics engines?" />
  <row Id="31865" PostHistoryTypeId="2" PostId="14248" RevisionGUID="a9bbb31f-a41e-4fb2-99b0-66d2033ad5b6" CreationDate="2011-06-28T08:15:02.337" UserId="8194" Text="Okay so, I noticed when you rotate around an axis, say you do this:&#xD;&#xA;&#xD;&#xA;    glRotatef(90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;&#xD;&#xA;That will rotate things 90 degrees around the x-axis. However, it also sort of rotates the y and z axes as well. So now the y-axis is pointing in and out of the screen, instead of up and down. So when I try to do stuff like this:&#xD;&#xA;&#xD;&#xA;    glRotatef(90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;    glRotatef(whatever, 0.0f, 1.0f, 0.0f);&#xD;&#xA;    glRotatef(whatever2, 0.0f, 0.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;The rotations around the y and z-axes end up not how I want them. I was wondering if there is any way I can sort of rotate just the axes back to their initial position after using glRotatef(), without rotating the object back. Or something like that, just so that when I rotate around the y-axis, it rotates around a vertical axis." />
  <row Id="31866" PostHistoryTypeId="1" PostId="14248" RevisionGUID="a9bbb31f-a41e-4fb2-99b0-66d2033ad5b6" CreationDate="2011-06-28T08:15:02.337" UserId="8194" Text="LWJGL glRotatef() without rotating axes?" />
  <row Id="31867" PostHistoryTypeId="3" PostId="14248" RevisionGUID="a9bbb31f-a41e-4fb2-99b0-66d2033ad5b6" CreationDate="2011-06-28T08:15:02.337" UserId="8194" Text="&lt;java&gt;&lt;rotation&gt;&lt;lwjgl&gt;" />
  <row Id="31868" PostHistoryTypeId="2" PostId="14249" RevisionGUID="c06dd760-eb4b-4c13-ae82-cd5db2a9c17d" CreationDate="2011-06-28T08:30:48.473" UserId="7588" Text="So your server is essentially a &quot;referee&quot;? In this case, I believe that everything in your client has to be deterministic; you need to make sure that everything on each client will always give the same result.&#xD;&#xA;&#xD;&#xA;For your first question, once the local player recieves the other players' direction, apart from being able to decellerate his movement over time and apply collisions, I don't see how you could predict which direction the player will next turn, especially in an 8 direction environment.&#xD;&#xA;&#xD;&#xA;When you recieve the &quot;real position&quot; update of each player (that maybe you could try staggering on the server) yes you will need to interpolate the position and direction of the player. If the &quot;guessed&quot; position is very wrong (i.e. the player completely changed direction just after the last direction packet was sent) you will have a huge gap. This means that either the player jumps position, or you can interpolate to the next _guessed_ position. This will provide smoother interpolation over time.&#xD;&#xA;&#xD;&#xA;When entities collide, if you can create a determinist system, each player can simulate the collision locally, and they results shouldn't be too far from the reality. Each local machine should simulate the collision for both players, in which case making sure that the final state will be non-blocking and acceptable.&#xD;&#xA;&#xD;&#xA;For the server side of things, a referee server can still do simple calculations to check _for example_ to speed of a player over short times to use as a simple anti-cheat mechanism. If you loop through monitoring each player over 1s at a time, your cheat detection will be scalable, only it will take longer to find cheaters." />
  <row Id="31869" PostHistoryTypeId="2" PostId="14250" RevisionGUID="9e719af6-c9a7-4dd8-bde6-23dacb56c75b" CreationDate="2011-06-28T08:38:57.800" UserId="8299" Text="SIO2 Game Engine. Just released a new version with full Android Support. You can build 2D and 3D games using it and port between different platforms. http://sio2interactive.com" />
  <row Id="31870" PostHistoryTypeId="16" PostId="14250" RevisionGUID="a4d643b0-60c4-4112-af4e-096de074a77e" CreationDate="2011-06-28T08:38:57.800" UserId="8299" />
  <row Id="31871" PostHistoryTypeId="5" PostId="14248" RevisionGUID="c92c7be2-2a77-4568-b1f6-e1209a174857" CreationDate="2011-06-28T09:00:09.397" UserId="8194" Comment="added 78 characters in body" Text="Okay so, I noticed when you rotate around an axis, say you do this:&#xD;&#xA;&#xD;&#xA;    glRotatef(90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;&#xD;&#xA;That will rotate things 90 degrees around the x-axis. However, it also sort of rotates the y and z axes as well. So now the y-axis is pointing in and out of the screen, instead of up and down. So when I try to do stuff like this:&#xD;&#xA;&#xD;&#xA;    glRotatef(90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;    glRotatef(whatever, 0.0f, 1.0f, 0.0f);&#xD;&#xA;    glRotatef(whatever2, 0.0f, 0.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;The rotations around the y and z-axes end up not how I want them. I was wondering if there is any way I can sort of rotate just the axes back to their initial position after using glRotatef(), without rotating the object back. Or something like that, just so that when I rotate around the y-axis, it rotates around a vertical axis.&#xD;&#xA;&#xD;&#xA;EDIT: After further research, it appears I will have to learn quaternions." />
  <row Id="31872" PostHistoryTypeId="2" PostId="14251" RevisionGUID="51c5c1e5-9310-4d74-a040-fccec7013d68" CreationDate="2011-06-28T09:12:51.013" UserId="7946" Text="You can use rigid body systems to create soft body and fluid dynamics. Physical reason behind it? Well, essentially, atoms are small rigid bodies. This isn't completely true of course, but for simplicity you can view them as such. And soft bodies are obviously made from atoms.&#xD;&#xA;&#xD;&#xA;So, how do you create &quot;soft bodies&quot; using a rigid body engine like Box2D? &#xD;&#xA;&#xD;&#xA;The essential technique is to bind points in your body together using joints. For example, if you connect the ends of a list of lines together using distance joints (meaning the distance between two joints must be constant), it will roughly behave like a piece of cloth. &#xD;&#xA;&#xD;&#xA;But that's just a rough description. A lot of &quot;elementary field work&quot; with Box2D has been done by ewjordan, one of the developers of the Java-port of Box2D. Here's a good starting point: http://www.box2d.org/forum/viewtopic.php?f=8&amp;t=1978" />
  <row Id="31873" PostHistoryTypeId="5" PostId="14248" RevisionGUID="9681e9e5-796b-405f-8261-d443d292d1dc" CreationDate="2011-06-28T09:20:52.100" UserId="8194" Comment="added 178 characters in body" Text="Okay so, I noticed when you rotate around an axis, say you do this:&#xD;&#xA;&#xD;&#xA;    glRotatef(90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;&#xD;&#xA;That will rotate things 90 degrees around the x-axis. However, it also sort of rotates the y and z axes as well. So now the y-axis is pointing in and out of the screen, instead of up and down. So when I try to do stuff like this:&#xD;&#xA;&#xD;&#xA;    glRotatef(90.0f, 1.0f, 0.0f, 0.0f);&#xD;&#xA;    glRotatef(whatever, 0.0f, 1.0f, 0.0f);&#xD;&#xA;    glRotatef(whatever2, 0.0f, 0.0f, 1.0f);&#xD;&#xA;&#xD;&#xA;The rotations around the y and z-axes end up not how I want them. I was wondering if there is any way I can sort of rotate just the axes back to their initial position after using glRotatef(), without rotating the object back. Or something like that, just so that when I rotate around the y-axis, it rotates around a vertical axis.&#xD;&#xA;&#xD;&#xA;EDIT: After further research, it appears I will have to learn quaternions.&#xD;&#xA;EDIT2: Wait, I don't think that's right. Does anyone know? I saw this thread on another site: http://java-gaming.org/index.php?topic=24177.0 but I don't understand what he did." />
  <row Id="31874" PostHistoryTypeId="25" PostId="14244" RevisionGUID="8cc528d7-7f9d-4a18-ac8e-5e634c1d69c6" CreationDate="2011-06-28T09:25:44.830" Comment="http://twitter.com/#!/StackGameDev/status/85640009335574528" />
  <row Id="31875" PostHistoryTypeId="2" PostId="14252" RevisionGUID="e8b4c4a5-566e-4904-a66d-fc019e07c55d" CreationDate="2011-06-28T10:35:07.650" UserId="5224" Text="You need to do the following.&#xD;&#xA;&#xD;&#xA;Store the rotation around the x, y and z axis separately for each object (as floats).&#xD;&#xA;&#xD;&#xA;Every frame: &#xD;&#xA;&#xD;&#xA; - reset the rotation matrix (`glLoadIdentity();`)&#xD;&#xA; - apply pitch&#xD;&#xA; - apply yaw&#xD;&#xA; - apply roll&#xD;&#xA;&#xD;&#xA;If you do it in this order you should not have any problems. Just make sure you don't do 'repeated rotations' since then you get a lot of problems.&#xD;&#xA;" />
  <row Id="31876" PostHistoryTypeId="2" PostId="14253" RevisionGUID="d1c13a29-8185-466a-a25c-ff962f38b439" CreationDate="2011-06-28T10:40:17.180" UserId="769" Text="I have a finished Flash game which is rendered using the built-in display tree, i.e. `Bitmap`s contained in `Sprite`s (and a text here and there, few vector graphics, and one bitmap-filled shape).&#xD;&#xA;For extra performance, I'd like it to use Molehill for rendering, but that's not possible out of the box.&#xD;&#xA;&#xD;&#xA;What's the easiest way to make this game use Molehill when available, but fall back to the current method if it's not available?" />
  <row Id="31877" PostHistoryTypeId="1" PostId="14253" RevisionGUID="d1c13a29-8185-466a-a25c-ff962f38b439" CreationDate="2011-06-28T10:40:17.180" UserId="769" Text="Easy road from DisplayObject to Molehill?" />
  <row Id="31878" PostHistoryTypeId="3" PostId="14253" RevisionGUID="d1c13a29-8185-466a-a25c-ff962f38b439" CreationDate="2011-06-28T10:40:17.180" UserId="769" Text="&lt;opengl&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;molehill&gt;" />
  <row Id="31879" PostHistoryTypeId="25" PostId="14253" RevisionGUID="798df390-645f-4d64-b6ce-20cf3e738f61" CreationDate="2011-06-28T12:25:45.360" Comment="http://twitter.com/#!/StackGameDev/status/85685310838677504" />
  <row Id="31880" PostHistoryTypeId="2" PostId="14254" RevisionGUID="2fed8028-0f3b-494f-b483-2a87bf5ac535" CreationDate="2011-06-28T14:08:05.317" UserId="1923" Text="Once your matrix is no longer aligned with the world axes, you have to apply the rotations about the local space axes, not the world space axes. &#xD;&#xA;&#xD;&#xA;Doesn't OpenGl have a method for rotating around an arbitrary axis? &#xD;&#xA;&#xD;&#xA;If so, store the basis vectors frome the previous matrix's rotation as the Local space axis vectors and use them as an arbitrary axes to rotate the matrix about during the next rotation." />
  <row Id="31881" PostHistoryTypeId="2" PostId="14255" RevisionGUID="d4b3f760-b551-45ea-af5c-760cab993d99" CreationDate="2011-06-28T14:08:36.987" UserId="2469" Text="You might want to check out [ReMx][1], it's a 2D game dev framework for Molehill, and there is [Away3D][2] for 3D graphics with Molehill.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/RetroModular/ReMX/&#xD;&#xA;  [2]: http://away3d.com/comments/away3d-4-0-alpha-release-broomstick" />
  <row Id="31882" PostHistoryTypeId="5" PostId="14238" RevisionGUID="335dbb84-9b85-458c-a0a9-b8d581244ea2" CreationDate="2011-06-28T14:37:52.167" UserId="1430" Comment="linking, spelling, tag cleanup" Text="As a summer project I decided it would be fun to make a Flash game.  Right now I'm going for something like the look of [Terraria][1].  It's been a lot of fun, but today I've hit a snag.  I need a way to generate my worlds.  I've read up [Perlin noise][2] as a possibility, but I my attempts have given me sporadic looking results.  What are some techniques used to generate these 2D tile-based worlds?&#xD;&#xA;&#xD;&#xA;Ideally I would like to be able to generate mountains, plains, and caves.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.terraria.org/&#xD;&#xA;  [2]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm" />
  <row Id="31883" PostHistoryTypeId="4" PostId="14238" RevisionGUID="335dbb84-9b85-458c-a0a9-b8d581244ea2" CreationDate="2011-06-28T14:37:52.167" UserId="1430" Comment="linking, spelling, tag cleanup" Text="2D tile-based terrain generation" />
  <row Id="31884" PostHistoryTypeId="6" PostId="14238" RevisionGUID="335dbb84-9b85-458c-a0a9-b8d581244ea2" CreationDate="2011-06-28T14:37:52.167" UserId="1430" Comment="linking, spelling, tag cleanup" Text="&lt;flash&gt;&lt;tiles&gt;&lt;terrain&gt;&lt;generated&gt;" />
  <row Id="31885" PostHistoryTypeId="17" PostId="14256" RevisionGUID="9a111207-91c0-4f57-ba1f-d3f0f8c988d8" CreationDate="2011-06-28T14:41:15.510" UserId="-1" Comment="from http://stackoverflow.com/questions/6508036/where-to-find-free-platformer-sprites-for-commercial-use" Text="" />
  <row Id="31886" PostHistoryTypeId="17" PostId="14257" RevisionGUID="bfacb9e7-76d9-4581-8b9b-550fb82de390" CreationDate="2011-06-28T14:41:15.510" UserId="-1" Comment="from http://stackoverflow.com/questions/6508036/where-to-find-free-platformer-sprites-for-commercial-use" Text="" />
  <row Id="31887" PostHistoryTypeId="2" PostId="14257" RevisionGUID="12f73df9-0005-486c-86fa-9a1071690fde" CreationDate="2011-06-28T14:30:49.373" UserId="7172" Text="http://www.gamedev.net/topic/272386-sprites.......&#xD;&#xA;&#xD;&#xA;or here:&#xD;&#xA;What about: wiki.allegro.cc/index.php?title=Graphics_Depot&#xD;&#xA;&#xD;&#xA;In fact... http://tinyurl.com/3k4udxr" />
  <row Id="31888" PostHistoryTypeId="2" PostId="14256" RevisionGUID="de676007-0dba-47e7-a994-ee4c2825d3ca" CreationDate="2011-06-28T14:25:20.660" UserId="8308" Text="I need some good 2d platformer sprites for a game i am making in C#. Can anyone suggest a good site or link?&#xD;&#xA;The sprites need to be free for commercial use and/or open source." />
  <row Id="31889" PostHistoryTypeId="1" PostId="14256" RevisionGUID="de676007-0dba-47e7-a994-ee4c2825d3ca" CreationDate="2011-06-28T14:25:20.660" UserId="8308" Text="Where to find free platformer sprites for commercial use?" />
  <row Id="31890" PostHistoryTypeId="3" PostId="14256" RevisionGUID="de676007-0dba-47e7-a994-ee4c2825d3ca" CreationDate="2011-06-28T14:25:20.660" UserId="8308" Text="&lt;c#&gt;&lt;.net&gt;&lt;2d&gt;&lt;sprites&gt;" />
  <row Id="31891" PostHistoryTypeId="5" PostId="14256" RevisionGUID="2e701d00-fd1d-4661-bc5f-3216a0ce03f0" CreationDate="2011-06-28T14:50:08.343" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I need some good 2d platformer sprites for a game i am making in C#. Can anyone suggest a good site or link?&#xD;&#xA;The sprites need to be free for commercial use and/or open source." />
  <row Id="31892" PostHistoryTypeId="10" PostId="14256" RevisionGUID="e03d7634-826b-444c-9da5-d4c611ff41ad" CreationDate="2011-06-28T14:50:07.860" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="31893" PostHistoryTypeId="11" PostId="14256" RevisionGUID="a2f9ba8a-61aa-409a-9eeb-2d49b49f2d1d" CreationDate="2011-06-28T14:50:32.493" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="31894" PostHistoryTypeId="2" PostId="14258" RevisionGUID="21002356-06a3-4d73-9d62-761a06a2f152" CreationDate="2011-06-28T14:53:40.003" UserId="5864" Text="Note that since JPEG images use a Y or YUV colourspace they do not really have a pixel depth and thus there is no &quot;right&quot; depth for them. That said, you are right in expecting a 8bpp grayscale image when decoding a monochrome JPEG.&#xD;&#xA;&#xD;&#xA;I don't know of an available API to achieve what you are trying to do in an automatic way. However, you can ask for a specific depth using the `BitmapFactory` preferred options:&#xD;&#xA;&#xD;&#xA;     BitmapFactory.Options opts = new BitmapFactory.Options();&#xD;&#xA;     // This option is suitable for monochrome JPEGs:&#xD;&#xA;     opts.inPreferredConfig = Bitmap.Config.ALPHA_8;&#xD;&#xA;     // This option is suitable for 32-bit PNGs:&#xD;&#xA;     opts.inPreferredConfig = Bitmap.Config.RGB_8888;&#xD;&#xA;&#xD;&#xA;     bitmap = BitmapFactory.decodeByteArray(data, 0, len, opts);&#xD;&#xA;&#xD;&#xA;This is still a hint for the decoder and does not guarantee that you will always get what you expect. I have additional suggestions:&#xD;&#xA;&#xD;&#xA; - embed your own versions of libPNG and/or libJPEG. I suggest trying [libjpeg-turbo][1] which allows to fine-tune the available colourspaces even moew.&#xD;&#xA; - instead of using PNG or JPEG as your interchange format, use one or several texture compression formats suitable for your target devices; there are [readily available tools][2] to convert PNGs to ETC1, which is part of the OpenGL ES standard. Maybe add a layer of `gzip` on top of that.&#xD;&#xA; - do not hesitate to experiment and try **generic compression methods**: store your image just as you would upload it to the video card, and compress it using `libgz` or `libbzip2`. I have images that get significantly smaller using bzip2 on an uncompressed version than when crushing with [pngcrush][3]. That may be an acceptable tradeoff.&#xD;&#xA;&#xD;&#xA;Hope this helps!&#xD;&#xA;&#xD;&#xA; [1]: http://libjpeg-turbo.virtualgl.org/&#xD;&#xA; [2]: http://www.androidworks.com/opengl-es2-texture-compression-in-android&#xD;&#xA; [3]: http://pmt.sourceforge.net/pngcrush/&#xD;&#xA;" />
  <row Id="31895" PostHistoryTypeId="2" PostId="14259" RevisionGUID="e4efe8b1-c3df-40cc-a913-4d261d804d32" CreationDate="2011-06-28T14:53:56.097" UserId="1430" Text="It sounds like you're looking to generate a &quot;side view&quot; of the generated terrain.&#xD;&#xA;&#xD;&#xA;There are plenty of terrain generation algorithms discussed on the web. You could probably adapt many of them by cutting out all but one dimension from the calculations. This would give you information about the primary surface/underground boundary. If you want to be more directed in your search, you probably want to look for &quot;1D&quot; terrain generation or &quot;Worms-style&quot; terrain generation. You'll get results like [this thread on procedural terrain (including caves)][1], and [this interesting web demo][2].&#xD;&#xA;&#xD;&#xA;Perlin noise alone would work well for the areas where you want to generate plains, since it's very smooth. It doesn't work so well for mountains and craggy areas with sharp discontinuities -- you'd want to combine it with something else for that. Consider [the first portion of this page][3] on fractal terrain, or applying random cuts and displacements to the terrain.&#xD;&#xA;&#xD;&#xA;Caves can be done by randomly punching holes in your terrain as a simple first pass, but you can also look for information on [how rooms in Rogue-like games are generated][4] and apply that. You might also consider looking into [cellular automata][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forums.tigsource.com/index.php?topic=5174.0&#xD;&#xA;  [2]: http://zacharydenton.com/labs/1d-terrain-generator/&#xD;&#xA;  [3]: http://www.gameprogrammer.com/fractal.html&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/2663/what-are-some-ideal-algorithms-for-rogue-like-2d-dungeon-generation&#xD;&#xA;  [5]: http://pcg.wikidot.com/pcg-algorithm:cellular-automata" />
  <row Id="31896" PostHistoryTypeId="5" PostId="14256" RevisionGUID="9da28ab6-1f57-407d-865d-38bfe51ee141" CreationDate="2011-06-28T15:01:27.623" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I need some good 2d platformer sprites for a game i am making in C#. Can anyone suggest a good site or link?&#xD;&#xA;The sprites need to be free for commercial use and/or open source." />
  <row Id="31897" PostHistoryTypeId="10" PostId="14256" RevisionGUID="a8cb39c8-98fe-4c7d-a59f-b56c09a319e3" CreationDate="2011-06-28T15:01:27.467" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="31898" PostHistoryTypeId="5" PostId="14256" RevisionGUID="ca9e6591-0711-437e-98f9-1cb833ea325b" CreationDate="2011-06-28T15:01:39.730" UserId="14" Comment="deleted 205 characters in body; edited tags" Text="&gt; **Possible Duplicate:**  &#xD;&#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;I need some good 2d platformer sprites for a game i am making in C#. Can anyone suggest a good site or link?&#xD;&#xA;The sprites need to be free for commercial use and/or open source." />
  <row Id="31899" PostHistoryTypeId="6" PostId="14256" RevisionGUID="ca9e6591-0711-437e-98f9-1cb833ea325b" CreationDate="2011-06-28T15:01:39.730" UserId="14" Comment="deleted 205 characters in body; edited tags" Text="&lt;2d&gt;&lt;c#&gt;&lt;sprites&gt;&lt;.net&gt;" />
  <row Id="31900" PostHistoryTypeId="2" PostId="14260" RevisionGUID="3a78d0c6-efae-4b3d-ac16-56dc28c23e31" CreationDate="2011-06-28T15:20:21.443" UserId="1742" Text="It looks like you need a seperate source bitmap, then you can store a scroll position and generate your rects from that.&#xD;&#xA;&#xD;&#xA;You'll need to generate two rects, one for the top and one for the bottom, the one for the top will need to start at zero height, and increas until it reaches the bottom, the source rect that pairs with it will also start at zero height, but will start from the bottom of the source image:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Rect src = new Rect(0, 700-scrollPos, 480, 700);&#xD;&#xA;    Rect dest = new Rect(0, 0, 480, scrollPos);&#xD;&#xA;&#xD;&#xA;Your bottom rect will be the one you see to start with, and will take up the entire screen at the beginning, reduce in size and moving down the screen out of the way of the top rect, the source rect for that would be doing the same, but instead of moving down, it just shrinks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Rect src = new Rect(0, 0, 480, 700-scrollPos);&#xD;&#xA;    Rect dest = new Rect(0, scrollPos, 480, 700);&#xD;&#xA;&#xD;&#xA;And using those two blits, you have a scroller." />
  <row Id="31901" PostHistoryTypeId="25" PostId="14248" RevisionGUID="bfc148b8-e314-421b-be72-44d3349f2ff1" CreationDate="2011-06-28T15:25:46.000" Comment="http://twitter.com/#!/StackGameDev/status/85730611662303232" />
  <row Id="31902" PostHistoryTypeId="12" PostId="14252" RevisionGUID="76f31667-ac26-4ec3-bb41-efe39fbb25f8" CreationDate="2011-06-28T15:59:36.327" UserId="5224" Text="[{&quot;Id&quot;:5224,&quot;DisplayName&quot;:&quot;Roy T.&quot;}]" />
  <row Id="31903" PostHistoryTypeId="5" PostId="14260" RevisionGUID="9024f3ad-2d2f-4eee-986f-f17f3a68f73f" CreationDate="2011-06-28T15:59:48.790" UserId="1742" Comment="spelling and punctuation" Text="It looks like you need a seperate source bitmap, then you can store a scroll position and generate your rects from that.&#xD;&#xA;&#xD;&#xA;You'll need to generate two rects, one for the top and one for the bottom, the one for the top will need to start at zero height, and increase until it reaches the bottom, the source rect that pairs with it will also start at zero height, but will start from the bottom of the source image:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Rect src = new Rect(0, 700-scrollPos, 480, 700);&#xD;&#xA;    Rect dest = new Rect(0, 0, 480, scrollPos);&#xD;&#xA;&#xD;&#xA;Your bottom rect will be the one you see to start with, and will take up the entire screen at the beginning, reduce in size while moving down the screen out of the way of the top rect, the source rect for that would be doing the same, but instead of moving down, it just shrinks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Rect src = new Rect(0, 0, 480, 700-scrollPos);&#xD;&#xA;    Rect dest = new Rect(0, scrollPos, 480, 700);&#xD;&#xA;&#xD;&#xA;And using those two blits, you have a scroller." />
  <row Id="31904" PostHistoryTypeId="13" PostId="14252" RevisionGUID="ae1e8b0a-65da-4ec7-9f9e-fde464990955" CreationDate="2011-06-28T16:03:27.587" UserId="5224" Text="[{&quot;Id&quot;:5224,&quot;DisplayName&quot;:&quot;Roy T.&quot;}]" />
  <row Id="31906" PostHistoryTypeId="5" PostId="14252" RevisionGUID="055ce80d-e3bc-410d-9811-83d1b2c8b66e" CreationDate="2011-06-28T16:08:43.530" UserId="5224" Comment="added 120 characters in body" Text="You need to do the following.&#xD;&#xA;&#xD;&#xA;Store the rotation around the x, y and z axis separately for each object (as floats).&#xD;&#xA;&#xD;&#xA;Every frame: &#xD;&#xA;&#xD;&#xA; - reset the rotation matrix (`glLoadIdentity();`)&#xD;&#xA; - apply roll&#xD;&#xA; - apply pitch&#xD;&#xA; - apply yaw&#xD;&#xA;&#xD;&#xA;If you do it in this order you should not have any problems. Just make sure you don't do 'repeated rotations' since then you get a lot of problems.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: sorry I first had the wrong order here, I probably got confused because of left-hand / right-hand differences." />
  <row Id="31907" PostHistoryTypeId="5" PostId="14260" RevisionGUID="0d1bf49b-c6ac-4646-aa4d-2d55d46f5434" CreationDate="2011-06-28T16:19:25.213" UserId="1742" Comment="added 202 characters in body" Text="You can't &quot;scroll&quot; a buffer without somewhere to store the bit that's shoved off the end, so it looks like you'll need to either have a separate store for the swapping blit, or separate source bitmap. I would choose the latter for simplicity's sake, then you can store a scroll position and generate your rects using that.&#xD;&#xA;&#xD;&#xA;You'll need to generate two rects, one for the top and one for the bottom, the one for the top will need to start at zero height, and increase until it reaches the bottom, the source rect that pairs with it will also start at zero height, but will start from the bottom of the source image:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Rect src = new Rect(0, 700-scrollPos, 480, 700);&#xD;&#xA;    Rect dest = new Rect(0, 0, 480, scrollPos);&#xD;&#xA;&#xD;&#xA;Your bottom rect will be the one you see to start with, and will take up the entire screen at the beginning, reduce in size while moving down the screen out of the way of the top rect, the source rect for that would be doing the same, but instead of moving down, it just shrinks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Rect src = new Rect(0, 0, 480, 700-scrollPos);&#xD;&#xA;    Rect dest = new Rect(0, scrollPos, 480, 700);&#xD;&#xA;&#xD;&#xA;And using those two blits, you have a scroller." />
  <row Id="31908" PostHistoryTypeId="5" PostId="14232" RevisionGUID="d20cebcc-9ad3-4a18-b1ac-068755a66d55" CreationDate="2011-06-28T16:35:07.257" UserId="2061" Comment="added 347 characters in body" Text="IMHO, the towers should not know about the creeps.  Unless you are planning on simply looping over the list of creeps for every tower, you'll probably want to implement some nontrivial [space partitioning](http://en.wikipedia.org/wiki/Nearest_neighbour_search); and that sort of logic doesn't belong in the towers class.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, I've sidestepped the issue.  Now instead of needing access to a list of creeps, you need access to a class instance.&#xD;&#xA;&#xD;&#xA;When you need a single instance of a class throughout your program, we call that class a **service**.  There are several standard methods of implementing services in programs:&#xD;&#xA;&#xD;&#xA;* **Global variables**. These are the easiest to implement, but the worst design.  If you use too many global variables, you will quickly find yourself writing modules that rely on each other too much ([strong-coupling][1]), making the flow of logic very difficult to follow.  Global variables are not multithreading-friendly.  Global variables make tracking the lifetime of objects more difficult, and clutter the namespace.  They are, however, the most performant option, so there are times when they can and should be used, but use them spareingly.&#xD;&#xA;* **Singletons**.  About 10-15 years ago, singletons were *the* big design-pattern to know about.  However, nowadays they are looked down upon.  They are much easier to multi-thread, but you must limit their use to one thread at a time, which is not always what you want.  Tracking lifetimes is just as difficult as with global variables.  &#xD;&#xA;A typical singleton class will look something like this:&#xD;&#xA;&#xD;&#xA;		class MyClass&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			static MyClass* _instance;&#xD;&#xA;			MyClass() {} //private constructor&#xD;&#xA;			&#xD;&#xA;		public:&#xD;&#xA;			static MyClass* getInstance();&#xD;&#xA;			void method();&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		MyClass* MyClass::_instance = NULL;&#xD;&#xA;		MyClass* MyClass::getInstance()&#xD;&#xA;		{&#xD;&#xA;			if(_instance == NULL)&#xD;&#xA;				_instance = new MyClass(); //Not thread-safe version&#xD;&#xA;			return _instance;&#xD;&#xA;			&#xD;&#xA;			//Note that _instance is *never* deleted - &#xD;&#xA;			//it exists for the entire lifetime of the program!&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;* **Dependency Injection (DI)**.  This just means passing the service in as a constructor parameter.  A service must already exist in order to pass it into a class, so there's no way for two services to rely on each other; in 98% of the cases, [this is what you want][2] *(and for the other 2%, you can always create a `setWhatever()` method and pass in the service later)*.  Because of this, DI doesn't have the same coupling problems as the other options.  It can be used with multithreading, because each thread can simply have its own instance of every service (and share only those it absolutely needs to).  It also makes code unit-testable, if you care about that.&#xD;&#xA;&#xD;&#xA;    The problem with dependency injection is that it takes up more memory; now every instance of a class needs references to every service it will use.  Also, it gets annoying to use when you have too many services; there are frameworks that mitigate this problem in other languages, but because of C++'s lack of reflection, DI frameworks in C++ tend to be even more work than just doing it manually.&#xD;&#xA;&#xD;&#xA;		//Example of dependency injection&#xD;&#xA;		class Tower&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			MissileCreationService* _missileCreator;&#xD;&#xA;			CreepLocatorService _creepLocator;&#xD;&#xA;		public:&#xD;&#xA;			Tower(MissileCreationService*, CreepLocatorService*);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		//In order to create a tower, the creating-class must have instances of&#xD;&#xA;		// MissilCreationService and CreepLocatorService as well; thus, if we want to &#xD;&#xA;		// add a new service to the constructor, we must add it to the constructor&#xD;&#xA;		// of every class which creates a Tower as well!&#xD;&#xA;		//This is not a problem in languages like C# and Java, where you can use&#xD;&#xA;		// a framework to create an instance and inject automatically.&#xD;&#xA;    *See [this page](https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand) (from the documentation for Ninject, a C# DI framework) for another example.*&#xD;&#xA;&#xD;&#xA;    Dependency injection is the usual solution for this problem, and is the answer you will see most highly upvoted to questions like this on StackOverflow.com.  DI is a type of [Inversion of Control][3] (IoC).  &#xD;&#xA;&#xD;&#xA;* **Service Locator**.  Basically, just a class that holds an instance of every service.  You can [do it using reflection](http://www.codinginlondon.com/2009/05/cheap-ioc-in-native-c.html), or you can just add a new instance to it every time you want to create a new service.  You still have the same problem as before - *How do classes access this locator?* - which can be solved in any of the above ways, but now you only need to do it for your `ServiceLocator` class, rather than for dozens of services.  This method is also unit-testable, if you care about that sort of thing.  &#xD;&#xA;&#xD;&#xA;    Service Locators are another form of Inversion of Control (IoC).  Usually, frameworks that do automatic dependency injection will also have a service locator.&#xD;&#xA;&#xD;&#xA;    To read about how the XNA framework (C#) uses services, read [this answer][4].&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Circular_dependency&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Inversion_of_Control&#xD;&#xA;[4]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="31909" PostHistoryTypeId="5" PostId="14232" RevisionGUID="8e647720-b84f-4be9-b5e0-ebaeaac85ce2" CreationDate="2011-06-28T16:40:51.140" UserId="2061" Comment="deleted 120 characters in body" Text="When you need a single instance of a class throughout your program, we call that class a **service**.  There are several standard methods of implementing services in programs:&#xD;&#xA;&#xD;&#xA;* **Global variables**. These are the easiest to implement, but the worst design.  If you use too many global variables, you will quickly find yourself writing modules that rely on each other too much ([strong-coupling][1]), making the flow of logic very difficult to follow.  Global variables are not multithreading-friendly.  Global variables make tracking the lifetime of objects more difficult, and clutter the namespace.  They are, however, the most performant option, so there are times when they can and should be used, but use them spareingly.&#xD;&#xA;* **Singletons**.  About 10-15 years ago, singletons were *the* big design-pattern to know about.  However, nowadays they are looked down upon.  They are much easier to multi-thread, but you must limit their use to one thread at a time, which is not always what you want.  Tracking lifetimes is just as difficult as with global variables.  &#xD;&#xA;A typical singleton class will look something like this:&#xD;&#xA;&#xD;&#xA;		class MyClass&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			static MyClass* _instance;&#xD;&#xA;			MyClass() {} //private constructor&#xD;&#xA;			&#xD;&#xA;		public:&#xD;&#xA;			static MyClass* getInstance();&#xD;&#xA;			void method();&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		MyClass* MyClass::_instance = NULL;&#xD;&#xA;		MyClass* MyClass::getInstance()&#xD;&#xA;		{&#xD;&#xA;			if(_instance == NULL)&#xD;&#xA;				_instance = new MyClass(); //Not thread-safe version&#xD;&#xA;			return _instance;&#xD;&#xA;			&#xD;&#xA;			//Note that _instance is *never* deleted - &#xD;&#xA;			//it exists for the entire lifetime of the program!&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;* **Dependency Injection (DI)**.  This just means passing the service in as a constructor parameter.  A service must already exist in order to pass it into a class, so there's no way for two services to rely on each other; in 98% of the cases, [this is what you want][2] *(and for the other 2%, you can always create a `setWhatever()` method and pass in the service later)*.  Because of this, DI doesn't have the same coupling problems as the other options.  It can be used with multithreading, because each thread can simply have its own instance of every service (and share only those it absolutely needs to).  It also makes code unit-testable, if you care about that.&#xD;&#xA;&#xD;&#xA;    The problem with dependency injection is that it takes up more memory; now every instance of a class needs references to every service it will use.  Also, it gets annoying to use when you have too many services; there are frameworks that mitigate this problem in other languages, but because of C++'s lack of reflection, DI frameworks in C++ tend to be even more work than just doing it manually.&#xD;&#xA;&#xD;&#xA;		//Example of dependency injection&#xD;&#xA;		class Tower&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			MissileCreationService* _missileCreator;&#xD;&#xA;			CreepLocatorService _creepLocator;&#xD;&#xA;		public:&#xD;&#xA;			Tower(MissileCreationService*, CreepLocatorService*);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		//In order to create a tower, the creating-class must have instances of&#xD;&#xA;		// MissilCreationService and CreepLocatorService as well; thus, if we want to &#xD;&#xA;		// add a new service to the constructor, we must add it to the constructor&#xD;&#xA;		// of every class which creates a Tower as well!&#xD;&#xA;		//This is not a problem in languages like C# and Java, where you can use&#xD;&#xA;		// a framework to create an instance and inject automatically.&#xD;&#xA;    *See [this page](https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand) (from the documentation for Ninject, a C# DI framework) for another example.*&#xD;&#xA;&#xD;&#xA;    Dependency injection is the usual solution for this problem, and is the answer you will see most highly upvoted to questions like this on StackOverflow.com.  DI is a type of [Inversion of Control][3] (IoC).  &#xD;&#xA;&#xD;&#xA;* **Service Locator**.  Basically, just a class that holds an instance of every service.  You can [do it using reflection](http://www.codinginlondon.com/2009/05/cheap-ioc-in-native-c.html), or you can just add a new instance to it every time you want to create a new service.  You still have the same problem as before - *How do classes access this locator?* - which can be solved in any of the above ways, but now you only need to do it for your `ServiceLocator` class, rather than for dozens of services.  This method is also unit-testable, if you care about that sort of thing.  &#xD;&#xA;&#xD;&#xA;    Service Locators are another form of Inversion of Control (IoC).  Usually, frameworks that do automatic dependency injection will also have a service locator.&#xD;&#xA;&#xD;&#xA;    To read about how the XNA framework (C#) uses services, read [this answer][4].&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, IMHO the towers should not know about the creeps.  Unless you are planning on simply looping over the list of creeps for every tower, you'll probably want to implement some nontrivial [space partitioning](http://en.wikipedia.org/wiki/Nearest_neighbour_search); and that sort of logic doesn't belong in the towers class.&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Circular_dependency&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Inversion_of_Control&#xD;&#xA;[4]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="31910" PostHistoryTypeId="2" PostId="14262" RevisionGUID="b48bc178-17bf-47bf-90d1-a45339552302" CreationDate="2011-06-28T16:57:32.007" UserId="3887" Text="The XBLIG submission check-list says to ensure that all important stuff critical to game-play be visible in the 'TitleSafeArea'.&#xD;&#xA;&#xD;&#xA;I've received a bug report during play-test of my game (Crazy Balloon Lite) that says parts of my scrolling 2D map are only half visible (i.e. chopped at the left of the screen).&#xD;&#xA;&#xD;&#xA;I've tested my game myself on a 47&quot; TV and also a 19&quot; VGA monitor, both of which look fine.&#xD;&#xA;&#xD;&#xA;The bug report says the issue occurs on a standard 20&quot; TV.&#xD;&#xA;&#xD;&#xA;My question is: without buying different sizes of TVs, is there a way to test what my game will look like on different sized displays?" />
  <row Id="31911" PostHistoryTypeId="1" PostId="14262" RevisionGUID="b48bc178-17bf-47bf-90d1-a45339552302" CreationDate="2011-06-28T16:57:32.007" UserId="3887" Text="How can I test all resolutions for my XBLIG game?" />
  <row Id="31912" PostHistoryTypeId="3" PostId="14262" RevisionGUID="b48bc178-17bf-47bf-90d1-a45339552302" CreationDate="2011-06-28T16:57:32.007" UserId="3887" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;camera&gt;&lt;indie&gt;&lt;resolution&gt;" />
  <row Id="31913" PostHistoryTypeId="2" PostId="14263" RevisionGUID="863a5158-7866-47a2-b93d-029dfcbe68d4" CreationDate="2011-06-28T17:25:17.263" UserId="744" Text="Take a reasonably good 4:3 LCD _monitor_. Put electrical tape, or some other opaque tape, over the left/right/top/bottom 5% of your screen. Put scotch tape, or some other semi-transparent tape, over the next 3% of your screen. (So a total of 8% on all sides is covered.) Now do the same thing with a reasonably good 16:9 LCD _monitor_, but cover 5% on the left/right with scotch tape - so 8% on top/bottom, 10% on left/right.&#xD;&#xA;&#xD;&#xA;You now have two serviceable approximations of crappy TVs - the very edges are completely covered, and some amount beyond that is visible but too blurry to contain text or other detailed graphics.&#xD;&#xA;&#xD;&#xA;For extra credit, implement that effect in your rendering engine to save yourself some tape.&#xD;&#xA;&#xD;&#xA;One myth I've heard repeatedly about overscan/safe areas is that HD TVs don't have them. That's not true. All HD CRTs have overscan areas and many LCD and plasma models do as well. Some don't but will simulate overscan for non-HDMI/DVI/VGA input, including HD Y'PbPr (&quot;component&quot;) input. I suspect this myth exists because most people hook up their HDTVs using HDMI or VGA.&#xD;&#xA;&#xD;&#xA;Another myth I've heard is that the title-safe area is a fixed size, e.g it's always 2cm from the edge, or it's always 50 pixels from the edge, so it's proportionately smaller on large or HD TVs. That is also not true. Safe areas are generally proportional to the TV size, and that size is fixed regardless of the resolution the screen is displaying - they're a physical property of the TV screen, or simulated as such. I suspect this myth exists because higher-end and newer HDTVs do have smaller unsafe areas." />
  <row Id="31914" PostHistoryTypeId="4" PostId="14262" RevisionGUID="ecba444f-f9e8-4eef-b942-cc4a1ed27c3a" CreationDate="2011-06-28T17:29:46.457" UserId="744" Comment="This isn't technically an issue of resolution." Text="How can I test different TV display types for my XBLIG game?" />
  <row Id="31915" PostHistoryTypeId="6" PostId="14262" RevisionGUID="ecba444f-f9e8-4eef-b942-cc4a1ed27c3a" CreationDate="2011-06-28T17:29:46.457" UserId="744" Comment="This isn't technically an issue of resolution." Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;indie&gt;&lt;hardware&gt;&lt;compatibility&gt;" />
  <row Id="31916" PostHistoryTypeId="2" PostId="14264" RevisionGUID="3acf558d-0dd4-4ba6-849e-44697c570c15" CreationDate="2011-06-28T17:51:14.387" UserId="7640" Text="&#xD;&#xA;hey so I've decided to Code my own 2D soft-body physics engine in C++ since apparently none exist and I'm starting only with a general idea/understanding on how physics work and could be simulated: &#xD;&#xA;&#xD;&#xA;**by giving points and connections between points  properties such as elasticity, density, mass, shape retention, friction, stickiness, etc.**&#xD;&#xA;&#xD;&#xA;**What I want is a starting point**: resources and helpful examples/sites that could give me the specifics needed to actually make this such as equations and required physics knowledge. It would be great if anyone out there also would give me their attempts or ideas.&#xD;&#xA;&#xD;&#xA;finally I was wondering if it was possible to...&#xD;&#xA;&#xD;&#xA; - use the source code of an existing **3D** engine such as Bullet and transform it to be **2D** based?&#xD;&#xA;&#xD;&#xA; - use the source code of a 2D **Rigid body** physics engine such as box2d as a starting point?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31917" PostHistoryTypeId="1" PostId="14264" RevisionGUID="3acf558d-0dd4-4ba6-849e-44697c570c15" CreationDate="2011-06-28T17:51:14.387" UserId="7640" Text="Homemaking a 2d soft body physics engine" />
  <row Id="31918" PostHistoryTypeId="3" PostId="14264" RevisionGUID="3acf558d-0dd4-4ba6-849e-44697c570c15" CreationDate="2011-06-28T17:51:14.387" UserId="7640" Text="&lt;c++&gt;&lt;physics&gt;&lt;2d-physics&gt;" />
  <row Id="31919" PostHistoryTypeId="2" PostId="14265" RevisionGUID="06b1d95b-4744-49bf-88ee-7aaff7e95cf0" CreationDate="2011-06-28T17:54:30.720" UserId="962" Text="Many CRT TVs are not perfectly rectangular. They have pixels on the sides and top that are cut off at the sides. Typically the 80% inner portion of the screen is guaranteed to be safe.&#xD;&#xA;&#xD;&#xA;On HD resolutions it will most likely to have 0 to 5% missing of the screen area.&#xD;&#xA;&#xD;&#xA;**In your game engine, add some temporary guides so you can align all the critical parts in the viewing area, and test at all the resolutions that you need to support.**&#xD;&#xA;&#xD;&#xA;Even if your screen is wide, and the aspect ratio is wrong on it, your guides will be able to help you adjust it." />
  <row Id="31920" PostHistoryTypeId="2" PostId="14266" RevisionGUID="56f95121-c366-4b98-80cc-2bc151d5c3c3" CreationDate="2011-06-28T18:22:46.443" UserId="962" Text="No softbody solvers in C++ exist?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/3269212/non-rigid-body-2d-physics-engines-in-c" />
  <row Id="31921" PostHistoryTypeId="25" PostId="14262" RevisionGUID="cb1c7607-6dea-412e-a543-a43adb9cd967" CreationDate="2011-06-28T18:25:46.223" Comment="http://twitter.com/#!/StackGameDev/status/85775911911292928" />
  <row Id="31922" PostHistoryTypeId="2" PostId="14267" RevisionGUID="a61f55c4-8d68-430a-8d0d-36254341dd6c" CreationDate="2011-06-28T18:32:48.813" UserId="2061" Text="Orthogonal to your question, but; when playing on a television, many games will have the user resize the drawing area *(ie. &quot;resize the screen using the joystick until these four white squares are at the corners of your screen&quot;)* when the game starts up for the first time.  Make sure they can access it again later, in case they get a new TV." />
  <row Id="31923" PostHistoryTypeId="5" PostId="14232" RevisionGUID="ee7fd9af-e238-4c49-b625-0e3053d2797b" CreationDate="2011-06-28T18:44:21.620" UserId="2061" Comment="added 1 characters in body" Text="When you need a single instance of a class throughout your program, we call that class a **service**.  There are several standard methods of implementing services in programs:&#xD;&#xA;&#xD;&#xA;* **Global variables**. These are the easiest to implement, but the worst design.  If you use too many global variables, you will quickly find yourself writing modules that rely on each other too much ([strong-coupling][1]), making the flow of logic very difficult to follow.  Global variables are not multithreading-friendly.  Global variables make tracking the lifetime of objects more difficult, and clutter the namespace.  They are, however, the most performant option, so there are times when they can and should be used, but use them spareingly.&#xD;&#xA;* **Singletons**.  About 10-15 years ago, singletons were *the* big design-pattern to know about.  However, nowadays they are looked down upon.  They are much easier to multi-thread, but you must limit their use to one thread at a time, which is not always what you want.  Tracking lifetimes is just as difficult as with global variables.  &#xD;&#xA;A typical singleton class will look something like this:&#xD;&#xA;&#xD;&#xA;		class MyClass&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			static MyClass* _instance;&#xD;&#xA;			MyClass() {} //private constructor&#xD;&#xA;			&#xD;&#xA;		public:&#xD;&#xA;			static MyClass* getInstance();&#xD;&#xA;			void method();&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		MyClass* MyClass::_instance = NULL;&#xD;&#xA;		MyClass* MyClass::getInstance()&#xD;&#xA;		{&#xD;&#xA;			if(_instance == NULL)&#xD;&#xA;				_instance = new MyClass(); //Not thread-safe version&#xD;&#xA;			return _instance;&#xD;&#xA;			&#xD;&#xA;			//Note that _instance is *never* deleted - &#xD;&#xA;			//it exists for the entire lifetime of the program!&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;* **Dependency Injection (DI)**.  This just means passing the service in as a constructor parameter.  A service must already exist in order to pass it into a class, so there's no way for two services to rely on each other; in 98% of the cases, [this is what you want][2] *(and for the other 2%, you can always create a `setWhatever()` method and pass in the service later)*.  Because of this, DI doesn't have the same coupling problems as the other options.  It can be used with multithreading, because each thread can simply have its own instance of every service (and share only those it absolutely needs to).  It also makes code unit-testable, if you care about that.&#xD;&#xA;&#xD;&#xA;    The problem with dependency injection is that it takes up more memory; now every instance of a class needs references to every service it will use.  Also, it gets annoying to use when you have too many services; there are frameworks that mitigate this problem in other languages, but because of C++'s lack of reflection, DI frameworks in C++ tend to be even more work than just doing it manually.&#xD;&#xA;&#xD;&#xA;		//Example of dependency injection&#xD;&#xA;		class Tower&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			MissileCreationService* _missileCreator;&#xD;&#xA;			CreepLocatorService* _creepLocator;&#xD;&#xA;		public:&#xD;&#xA;			Tower(MissileCreationService*, CreepLocatorService*);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		//In order to create a tower, the creating-class must have instances of&#xD;&#xA;		// MissilCreationService and CreepLocatorService as well; thus, if we want to &#xD;&#xA;		// add a new service to the constructor, we must add it to the constructor&#xD;&#xA;		// of every class which creates a Tower as well!&#xD;&#xA;		//This is not a problem in languages like C# and Java, where you can use&#xD;&#xA;		// a framework to create an instance and inject automatically.&#xD;&#xA;    *See [this page](https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand) (from the documentation for Ninject, a C# DI framework) for another example.*&#xD;&#xA;&#xD;&#xA;    Dependency injection is the usual solution for this problem, and is the answer you will see most highly upvoted to questions like this on StackOverflow.com.  DI is a type of [Inversion of Control][3] (IoC).  &#xD;&#xA;&#xD;&#xA;* **Service Locator**.  Basically, just a class that holds an instance of every service.  You can [do it using reflection](http://www.codinginlondon.com/2009/05/cheap-ioc-in-native-c.html), or you can just add a new instance to it every time you want to create a new service.  You still have the same problem as before - *How do classes access this locator?* - which can be solved in any of the above ways, but now you only need to do it for your `ServiceLocator` class, rather than for dozens of services.  This method is also unit-testable, if you care about that sort of thing.  &#xD;&#xA;&#xD;&#xA;    Service Locators are another form of Inversion of Control (IoC).  Usually, frameworks that do automatic dependency injection will also have a service locator.&#xD;&#xA;&#xD;&#xA;    To read about how the XNA framework (C#) uses services, read [this answer][4].&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, IMHO the towers should not know about the creeps.  Unless you are planning on simply looping over the list of creeps for every tower, you'll probably want to implement some nontrivial [space partitioning](http://en.wikipedia.org/wiki/Nearest_neighbour_search); and that sort of logic doesn't belong in the towers class.&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Circular_dependency&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Inversion_of_Control&#xD;&#xA;[4]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="31924" PostHistoryTypeId="5" PostId="14244" RevisionGUID="76739ac7-6739-4f81-8367-233d133b8a95" CreationDate="2011-06-28T19:04:31.150" UserId="8296" Comment="added 3852 characters in body" Text="I'm working on an isometric 2D game with moderate-scale multiplayer, approximately 20-30 players connected at once to a persistent server. I've had some difficulty getting a good movement prediction implementation in place.&#xD;&#xA;&#xD;&#xA;**Physics/Movement**&#xD;&#xA;&#xD;&#xA;The game doesn't have a true physics implementation, but uses the basic principles to implement movement. Rather than continually polling input, state changes (ie/ mouse down/up/move events) are used to change the state of the character entity the player is controlling. The player's direction (ie/ north-east) is combined with a constant speed and turned into a true 3D vector - the entity's velocity.&#xD;&#xA;&#xD;&#xA;In the main game loop, &quot;Update&quot; is called before &quot;Draw&quot;. The update logic triggers a &quot;physics update task&quot; that tracks all entities with a non-zero velocity uses very basic integration to change the entities position. For example: entity.Position += entity.Velocity.Scale(ElapsedTime.Seconds) (where &quot;Seconds&quot; is a floating point value, but the same approach would work for millisecond integer values).&#xD;&#xA;&#xD;&#xA;The key point is that no interpolation is used for movement - the rudimentary physics engine has no concept of a &quot;previous state&quot; or &quot;current state&quot;, only a position and velocity.&#xD;&#xA;&#xD;&#xA;**State Change and Update Packets**&#xD;&#xA;&#xD;&#xA;When the velocity of the character entity the player is controlling changes, a &quot;move avatar&quot; packet is sent to the server containing the entity's action type (stand, walk, run), direction (north-east), and current position. This is different from how 3D first person games work. In a 3D game the velocity (direction) can change frame to frame as the player moves around. Sending every state change would effectively transmit a packet per frame, which would be too expensive. Instead, 3D games seem to ignore state changes and send &quot;state update&quot; packets on a fixed interval - say, every 80-150ms. &#xD;&#xA;&#xD;&#xA;Since speed and direction updates occur much less frequently in my game, I can get away with sending every state change. Although all of the physics simulations occur at the same speed and are deterministic, latency is still an issue. For that reason, I send out routine position update packets (similar to a 3D game) but much less frequently - right now every 250ms, but I suspect with good prediction I can easily boost it towards 500ms. The biggest problem is that I've now deviated from the norm - all other documentation, guides, and samples online send routine updates and interpolate between the two states. It seems incompatible with my architecture, and I need to come up with a better movement prediction algorithm that is closer to a (very basic) &quot;networked physics&quot; architecture.&#xD;&#xA;&#xD;&#xA;The server then receives the packet and determines the players speed from it's movement type based on a script (Is the player able to run? Get the player's running speed). Once it has the speed, it combines it with the direction to get a vector - the entity's velocity. Some cheat detection and basic validation occurs, and the entity on the server side is updated with the current velocity, direction, and position. Basic throttling is also performed to prevent players from flooding the server with movement requests.&#xD;&#xA;&#xD;&#xA;After updating its own entity, the server broadcasts an &quot;avatar position update&quot; packet to all other players within range. The position update packet is used to update the client side physics simulations (world state) of the remote clients and perform prediction and lag compensation.&#xD;&#xA;&#xD;&#xA;**Prediction and Lag Compensation**&#xD;&#xA;&#xD;&#xA;As mentioned above, clients are authoritative for their own position. Except in cases of cheating or anomalies, the client's avatar will never be repositioned by the server. No extrapolation (&quot;move now and correct later&quot;) is required for the client's avatar - what the player sees *is* correct. However, some sort of extrapolation or interpolation is required for all remote entities that are moving. Some sort of prediction and/or lag-compensation is clearly required within the client's local simulation / physics engine. &#xD;&#xA;&#xD;&#xA;**Problems**&#xD;&#xA;&#xD;&#xA;I've been struggling with various algorithms, and have a number of questions and problems:&#xD;&#xA;&#xD;&#xA;1. Should I be extrapolating, interpolating, or both? My &quot;gut feeling&quot; is that I should be using pure extrapolation based on velocity. State change is received by the client, client computes a &quot;predicted&quot; velocity that compensates for lag, and the regular physics system does the rest. However, it feels at odds to all other sample code and articles - they all seem to store a number of states and perform interpolation without a physics engine. &#xD;&#xA;&#xD;&#xA;2. When a packet arrives, I've tried interpolating the packet's position with the packet's velocity over a fixed time period (say, 200ms). I then take the difference between the interpolated position and the current &quot;error&quot; position to compute a new vector and place that on the entity instead of the velocity that was sent. However, the assumption is that another packet will arrive in that time interval, and it's incredibly difficult to &quot;guess&quot; when the next packet will arrive - especially since they don't all arrive on fixed intervals (ie/ state changes as well). Is the concept fundamentally flawed, or is it correct but needs some fixes / adjustments?&#xD;&#xA;&#xD;&#xA;3. What happens when a remote player stops? I can immediately stop the entity, but it will be positioned in the &quot;wrong&quot; spot until it moves again. If I estimate a vector or try to interpolate, I have an issue because I don't store the previous state - the physics engine has no way to say &quot;you need to stop after you reach position X&quot;. It simply understands a velocity, nothing more complex. I'm reluctant to add the &quot;packet movement state&quot; information to the entities or physics engine, since it violates basic design principles and bleeds network code across the rest of the game engine.&#xD;&#xA;&#xD;&#xA;4. What should happen when entities collide? There are three scenarios - the controlling player collides locally, two entities collide on the server during a position update, or a remote entity update collides on the local client. In all cases I'm uncertain how to handle the collision - aside from cheating, both states are &quot;correct&quot; but at different time periods. In the case of a remote entity it doesn't make sense to draw it walking through a wall, so I perform collision detection on the local client and cause it to &quot;stop&quot;. Based on point #2 above, I might compute a &quot;corrected vector&quot; that continually tries to move the entity &quot;through the wall&quot; which will never succeed - the remote avatar is stuck there until the error gets too high and it &quot;snaps&quot; into position. How do games work around this?" />
  <row Id="31925" PostHistoryTypeId="2" PostId="14268" RevisionGUID="1cf5ff69-fc63-454e-9965-648315b8d848" CreationDate="2011-06-28T20:37:56.363" UserId="6372" Text="If you go homebrew (as I did) you're going to learn tons - also about stuff you didn't want to know. Like NAT traversal. According to caspin, Enet is missing out on that, but you could always find some open source STUN code that works in most situations." />
  <row Id="31926" PostHistoryTypeId="16" PostId="14268" RevisionGUID="9999f17b-e1c6-4acd-af89-0c8af0249423" CreationDate="2011-06-28T20:37:56.363" UserId="6372" />
  <row Id="31927" PostHistoryTypeId="5" PostId="12874" RevisionGUID="44ba9bfb-dabc-47f7-8e74-a97a0784fd33" CreationDate="2011-06-28T20:54:07.033" UserId="7199" Comment="added 88 characters in body" Text="**Short Version:** &#xD;&#xA;&#xD;&#xA;I am trying to move a player around on a tilemap, keeping it centered on its tile, while smoothly controlling it with SneakyInput virtual Joystick. My movement is jumpy and hard to control. What's a good way to implement this?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Long Version:**&#xD;&#xA;&#xD;&#xA;I'm trying to get a tilemap based RPG &quot;layer&quot; working on top of cocos2d-iphone. I'm using SneakyInput as the input right now, but I've run into a bit of a snag.&#xD;&#xA;&#xD;&#xA;Initially, I followed [Steffen Itterheim][1]'s [book][2] and [Ray Wenderlich][3]'s [tutorial][4], and I got jumpy movement working. My player now moves from tile to tile, without any animation whatsoever.&#xD;&#xA;&#xD;&#xA;So, I took it a step further. I changed my `player.position` to a `CCMoveTo` action. Combined with `CCfollow`, my player moves pretty smoothly. Here's the problem, though: Between each `CCMoveTo`, the movement stops, so there's a bit of a jumpiness introduced between movements.&#xD;&#xA;&#xD;&#xA;To deal with that, I changed my `CCmoveTo` into a `CCMoveBy`, and instead of running it once, I decided to have it `CCRepeatForever`. My plan was to stop the repeating action whenever the player changed directions or released the d-pad. &#xD;&#xA;&#xD;&#xA;However, when the movement stops, the player is not necessarily centered along the tiles, as it should be. To correctly position the player, I use a `CCMoveTo` and get the closest position that would put the player back into the proper position. This reintroduces an earlier problem of jumpiness between actions. &#xD;&#xA;&#xD;&#xA;What is the correct way to implement a smooth joystick while smoothly animating the player and keeping it on the &quot;grid&quot; of tiles?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;It turns out that this was caused by a &quot;Bug Fix&quot; in the cocos2d engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.learn-cocos2d.com/&#xD;&#xA;  [2]: http://www.apress.com/9781430233039&#xD;&#xA;  [3]: http://www.raywenderlich.com/&#xD;&#xA;  [4]: http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d" />
  <row Id="31928" PostHistoryTypeId="25" PostId="14240" RevisionGUID="92909354-25c6-408c-9005-ced6c9fbb7be" CreationDate="2011-06-28T21:25:47.613" Comment="http://twitter.com/#!/StackGameDev/status/85821215876448256" />
  <row Id="31929" PostHistoryTypeId="2" PostId="14269" RevisionGUID="973ed41e-0770-4756-b5b7-285ad2258a5c" CreationDate="2011-06-28T21:37:44.733" UserId="2289" Text="I'm working on a minimal game engine for my next game. I'm using the delta update method like shown:&#xD;&#xA;&#xD;&#xA;    void update(double delta) {&#xD;&#xA;        // Update code that uses `delta` goes here&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I have a deep hierarchy of updatable objects, with a root updatable that contains several updatables, each of which contains more updatables, etc. Normally I'd just iterate through each of the root's children and update each one, which would then do the same for its children, and so on. However, passing a fixed value of `delta` to the root means that by the time the leaf updatables are reached, it's been longer since `delta` seconds that have elapsed. This is causing noticable desyncing in my game, and time synchronization is very important in my case (I'm working on a rhythm game).&#xD;&#xA;&#xD;&#xA;Any ideas on how I should tackle this? I've considered using StopWatches and a global readable timer, but any advice would be helpful. I'm also open to moving to fixed timesteps as opposed to variable." />
  <row Id="31930" PostHistoryTypeId="1" PostId="14269" RevisionGUID="973ed41e-0770-4756-b5b7-285ad2258a5c" CreationDate="2011-06-28T21:37:44.733" UserId="2289" Text="Variable-step update() in game loop is falling behind, how can I get around this?" />
  <row Id="31931" PostHistoryTypeId="3" PostId="14269" RevisionGUID="973ed41e-0770-4756-b5b7-285ad2258a5c" CreationDate="2011-06-28T21:37:44.733" UserId="2289" Text="&lt;timer&gt;&lt;time-management&gt;&lt;synchronization&gt;" />
  <row Id="31932" PostHistoryTypeId="2" PostId="14270" RevisionGUID="d113661d-d41d-44e7-9bb5-580f93241ddc" CreationDate="2011-06-28T23:18:05.463" UserId="1101" Text="It's not clear why this should be a problem. If the delta is the time between updates, then it doesn't matter if it's called 1ms late providing it's consistently called 1ms late, which would appear to be the case. It's also not clear how you are observing that this is a problem given that presumably there is no visual output until the whole lot has returned.&#xD;&#xA;&#xD;&#xA;It's also hard to imagine any time-based game that has an update() so slow that it takes even 1ms to update the object. What are you doing in these updates?&#xD;&#xA;&#xD;&#xA;I would suspect that your delta calculations are simply wrong in some other way. Could you post a simplified main loop showing how you are obtaining this value?" />
  <row Id="31933" PostHistoryTypeId="2" PostId="14271" RevisionGUID="7640ba9c-fe90-4ebc-bfe9-dcb6365bc6af" CreationDate="2011-06-28T23:24:13.907" UserId="7328" Text="I guess you have to have a fixed delta time for all your update scene class. It doesn't matter if the accual time is passed while you were processing previous nodes, but it's important that all your nodes move step forward with same measure. &#xD;&#xA;&#xD;&#xA;in general you can update your scene using two different methods:&#xD;&#xA;&#xD;&#xA;1. one is to have all objects in your scene to be in same time frame at the end of update call. It doesn't matter if they are updated 2 miliseconds or two hours, the only important thing is to have a snapshot of your game objects at **specific** time T. this way you can have show your gamestate, since in every picture all objects should be in same time. for example you can't imagine picture of a man being chased by a lion and say &quot;hey that picture is wrong the man and lion are 2 seconds out of sync!&quot;&#xD;&#xA;2. you can update object in your scene asynchronized. I'm not much of an expert in this feild myself but I know there are some simulations based on async updates in different node. I've just seen this method once used and it was to optimize simulation speed in [Connway’s Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). it's called [hashlife](http://en.wikipedia.org/wiki/Hashlife). but still to give user the simulation results the application would continue simulation untill all the cells reach some **specific** generation and then show the results.&#xD;&#xA;&#xD;&#xA;Now back to your problem, I assume you have some problem with syncing audio and video in your game. As kylotan suggested there should be something wrong with your delta time calculator. then again I guess you can somehow predict how much you update call going to last (for example if you are running your game at 60fps, you may assume each game cycle last around 0.016 seconds) and just play music with that much difference with your accual game time." />
  <row Id="31934" PostHistoryTypeId="2" PostId="14272" RevisionGUID="ca88bf39-3a04-43fa-b65a-6c0e3d728106" CreationDate="2011-06-29T00:20:43.857" UserId="8275" Text="As most of game programming is done - I read on this very site - in C/C++ I was wondering if there is any learning/studying material for C/C++ that would target specifically game programming.&#xD;&#xA;&#xD;&#xA;I am not looking for material about &quot;developing games&quot; or &quot;software architecture for games&quot;, but rather for **material that uses &quot;game programming&quot; as the CONTEXT for introducing and illustrating C/C++ features, idioms, programming techniques, etc...**&#xD;&#xA;&#xD;&#xA;With a simile: think to the [GOF book on design patterns][1]. There, they used &quot;developing a text-editor&quot; as a context for introducing design patterns, but the book is most definitively not a book about &quot;developing text-editors&quot;.&#xD;&#xA;&#xD;&#xA;Thanks in advance for your time and advice!&#xD;&#xA;&#xD;&#xA;PS: My background: I am a programmer with a solid experience in OO scripting languages and only some experience in C and Assembler (on AVR microcontrollers), so I am thinking to mid-to-advanced level material, rather than tutorials for beginners, although it might be interesting to take a look to the latter ones if nothing else is available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Design_Patterns" />
  <row Id="31935" PostHistoryTypeId="1" PostId="14272" RevisionGUID="ca88bf39-3a04-43fa-b65a-6c0e3d728106" CreationDate="2011-06-29T00:20:43.857" UserId="8275" Text="Any learning/studying material for C/C++ that use game programming as learning context out there?" />
  <row Id="31936" PostHistoryTypeId="3" PostId="14272" RevisionGUID="ca88bf39-3a04-43fa-b65a-6c0e3d728106" CreationDate="2011-06-29T00:20:43.857" UserId="8275" Text="&lt;c++&gt;&lt;game-design&gt;&lt;architecture&gt;&lt;learning&gt;" />
  <row Id="31937" PostHistoryTypeId="25" PostId="14269" RevisionGUID="56f50b11-f927-4264-ab92-eb694aa2947c" CreationDate="2011-06-29T00:25:48.080" Comment="http://twitter.com/#!/StackGameDev/status/85866515592777728" />
  <row Id="31938" PostHistoryTypeId="2" PostId="14273" RevisionGUID="cf4094e8-afc0-4c7e-8593-79a3113644c5" CreationDate="2011-06-29T01:44:55.800" UserId="6592" Text="I've written a fairly robust rendering engine using OpenGL ES 1.1 (fixed-function.) I've been looking into revamping the engine to use OpenGL ES 2.0, which necessitates that I use shaders. I've been absorbing information all day long and still have some questions.&#xD;&#xA;&#xD;&#xA;Firstly, lighting. The fixed-function pipeline is guaranteed to have at least 8 lights available. My current engine finds lights that are &quot;close&quot; to the primitives being drawn and enables them; I don't know how many lights are going to be enabled until I draw a given model. Nothing is dynamically allocated in GLSL, so I have to define in a shader some number of lights to be used, right? So if I want to stick with 8, should I write my general purpose shader to have 8 lights and then use uniforms to tell it how many / which lights to use? &#xD;&#xA;&#xD;&#xA;Which brings me to another question: should I be concerned with the amount of data I'm allocating in a shader? Recent video cards have hundreds of &quot;stream processors.&quot; If I've got a fragment shader being used on some number of fragments in a given triangle, I assume they must each have their own stack to work on. Are read-only variables copied here, or read when needed?&#xD;&#xA;&#xD;&#xA;My initial goal is to rework my code so that it is virtually identical to the current implementation. What I have in mind is to create my own matrix stack so that I can implement something along the lines of push/popMatrix and apply all my translations, rotations, and scales to this matrix, then provide the matrix to the vertex shader so that it can make very quick vertex translations. Is this approach sound?&#xD;&#xA;&#xD;&#xA;Edit: My original intention was to ask if there was a tutorial that would explain the bare minimum necessary to jump from fixed-function to using shaders.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="31939" PostHistoryTypeId="1" PostId="14273" RevisionGUID="cf4094e8-afc0-4c7e-8593-79a3113644c5" CreationDate="2011-06-29T01:44:55.800" UserId="6592" Text="Questions before I revamp my rendering engine to use shaders (GLSL)" />
  <row Id="31940" PostHistoryTypeId="3" PostId="14273" RevisionGUID="cf4094e8-afc0-4c7e-8593-79a3113644c5" CreationDate="2011-06-29T01:44:55.800" UserId="6592" Text="&lt;opengl-es&gt;&lt;glsl&gt;&lt;hardware&gt;" />
  <row Id="31941" PostHistoryTypeId="2" PostId="14274" RevisionGUID="6591e170-e0ee-4e13-950f-69391c827ae5" CreationDate="2011-06-29T01:54:14.187" UserId="8317" Text="I am working on an icometric grid based game and im having an issue trying to link a mouse click from the user to a tile. I have been able to split the problem into 2 parts which is first finding a rectangle that sourounds a tile, which I have been able to do but the second part of figuring out from the rectangle which tile the click landed in has got me stumped.&#xD;&#xA;&#xD;&#xA;Here is an example of a rectangle with tiles on the inside:&#xD;&#xA;&#xD;&#xA;![Rectangle containing tiles][1]&#xD;&#xA;&#xD;&#xA;The rectangle is 70px long and 30px high so if i use an input of say 30x(top)/20y(left)  how would I go about determining which tile this fell into?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GDQ3X.png" />
  <row Id="31942" PostHistoryTypeId="1" PostId="14274" RevisionGUID="6591e170-e0ee-4e13-950f-69391c827ae5" CreationDate="2011-06-29T01:54:14.187" UserId="8317" Text="Finding out which tile a mouse click landed in" />
  <row Id="31943" PostHistoryTypeId="3" PostId="14274" RevisionGUID="6591e170-e0ee-4e13-950f-69391c827ae5" CreationDate="2011-06-29T01:54:14.187" UserId="8317" Text="&lt;algorithm&gt;&lt;tiles&gt;&lt;isometric&gt;" />
  <row Id="31944" PostHistoryTypeId="25" PostId="14274" RevisionGUID="b909a758-9941-4928-973c-55fb3a31d633" CreationDate="2011-06-29T03:25:48.430" Comment="http://twitter.com/#!/StackGameDev/status/85911816542236673" />
  <row Id="31945" PostHistoryTypeId="2" PostId="14275" RevisionGUID="4eb3fee3-26ba-48c9-9744-cfa92f73657d" CreationDate="2011-06-29T03:56:36.413" UserId="8319" Text="What's the best way to handle game states / screens?  My problem is this:&#xD;&#xA;&#xD;&#xA;PlayGameScreen adds a new InventoryGameScreen to the game during it's update.  This immediately adds InventoryGameScreen to the array of GameScreens.  That's throwing an exception when iterating over the array that the contents of the array have changed.&#xD;&#xA;&#xD;&#xA;Should I have two more arrays, like screensToBeAdded and screensToBeRemoved and do all the processing for them at the end of the game loop after drawing all the other screens?" />
  <row Id="31946" PostHistoryTypeId="1" PostId="14275" RevisionGUID="4eb3fee3-26ba-48c9-9744-cfa92f73657d" CreationDate="2011-06-29T03:56:36.413" UserId="8319" Text="Game State / Screen Management" />
  <row Id="31947" PostHistoryTypeId="3" PostId="14275" RevisionGUID="4eb3fee3-26ba-48c9-9744-cfa92f73657d" CreationDate="2011-06-29T03:56:36.413" UserId="8319" Text="&lt;architecture&gt;&lt;actionscript-3&gt;" />
  <row Id="31948" PostHistoryTypeId="2" PostId="14276" RevisionGUID="462bd6ec-6796-4e4c-b81d-a8189c105c58" CreationDate="2011-06-29T04:36:16.887" UserId="8320" Text="Has anyone yet prototyped a game in **both** Unity3D and UDK?&#xD;&#xA;&#xD;&#xA;If so, which features made prototyping the game easier or more difficult in each toolkit?&#xD;&#xA;&#xD;&#xA;Was one prototype demonstrably better than the other (given the same starting assets)?&#xD;&#xA;&#xD;&#xA;I'm looking for specific answers with regard to using the toolkit features, not a comparison of available features. E.g. Destructable terrain is easier in toolkit X for reasons Y and Z.&#xD;&#xA;&#xD;&#xA;I can code, so the limitations of the inbuilt scripting languages are not a problem." />
  <row Id="31949" PostHistoryTypeId="1" PostId="14276" RevisionGUID="462bd6ec-6796-4e4c-b81d-a8189c105c58" CreationDate="2011-06-29T04:36:16.887" UserId="8320" Text="Prototype experience: Unity3D vs UDK" />
  <row Id="31950" PostHistoryTypeId="3" PostId="14276" RevisionGUID="462bd6ec-6796-4e4c-b81d-a8189c105c58" CreationDate="2011-06-29T04:36:16.887" UserId="8320" Text="&lt;unity&gt;&lt;udk&gt;" />
  <row Id="31951" PostHistoryTypeId="2" PostId="14277" RevisionGUID="ff767f09-7deb-4c76-afda-f1c0786f38c9" CreationDate="2011-06-29T04:47:54.953" UserId="8321" Text="I have Photoshop experience and a bit of drawing experience, and am looking to learn how to create sprites like this: http://www.lostgarden.com/2009/03/dancs-miraculously-flexible-game.html&#xD;&#xA;&#xD;&#xA;Any tips on what app(s) to use and any reading material/online tutorials to get started?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="31952" PostHistoryTypeId="1" PostId="14277" RevisionGUID="ff767f09-7deb-4c76-afda-f1c0786f38c9" CreationDate="2011-06-29T04:47:54.953" UserId="8321" Text="What's the best program to learn/create 2d vector sprites?" />
  <row Id="31953" PostHistoryTypeId="3" PostId="14277" RevisionGUID="ff767f09-7deb-4c76-afda-f1c0786f38c9" CreationDate="2011-06-29T04:47:54.953" UserId="8321" Text="&lt;2d&gt;&lt;vector-art&gt;" />
  <row Id="31954" PostHistoryTypeId="2" PostId="14278" RevisionGUID="7c3f1cf6-8e98-4a06-bd6b-498185877274" CreationDate="2011-06-29T05:05:32.680" UserId="1430" Text="There are several equally valid approaches, and enqueuing pending changes for later processing like you have suggested is but one of them. It will work just fine; without more details it's hard to provide much more advice.&#xD;&#xA;&#xD;&#xA;That said, [this concrete example][1] is for game state management in XNA, but the concepts should apply to any language/platform/technology/et cetera and it might help demostrate a working solution you can learn from.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management" />
  <row Id="31955" PostHistoryTypeId="25" PostId="14276" RevisionGUID="48e9fea7-41ea-44fb-a45e-330e1ee33a25" CreationDate="2011-06-29T06:25:49.723" Comment="http://twitter.com/#!/StackGameDev/status/85957120108929024" />
  <row Id="31956" PostHistoryTypeId="2" PostId="14279" RevisionGUID="687b307f-df08-4565-958c-29d227c68f92" CreationDate="2011-06-29T06:39:12.063" UserId="5224" Text="There is software specifically designed to make it easy to develop sprites and spritesheet. ToonBoom is a good example of this, however it is quite costly ($350,-) there might be cheaper/free ones out there with similar functionality but I wouldn't know for sure.&#xD;&#xA;&#xD;&#xA;Most normal painting programs are not really suited for creating sprite sheets because you can't define 2D bones to stick arms and legs on (this makes it easy to at least make a rough pose with consistent art, before smoothing things out). However with enough persistence you could of course even do it in paint. And there might be plugins for photoshop and the likes that make this process easier.&#xD;&#xA;&#xD;&#xA;Of course there are many tutorials on creating sprites:&#xD;&#xA;&#xD;&#xA; - http://www.youtube.com/watch?v=1TWMxg2_m8E (I really like this one)&#xD;&#xA; - http://www.youtube.com/watch?v=iKjdJR5zanA (bit less sophisticated but in English)&#xD;&#xA; - http://www.youtube.com/watch?v=DfMoblhmYSY&amp;feature=related&#xD;&#xA;&#xD;&#xA;" />
  <row Id="31957" PostHistoryTypeId="2" PostId="14280" RevisionGUID="72c83204-2fe6-4460-be2a-5b7f7afd1f7d" CreationDate="2011-06-29T06:40:18.880" UserId="7120" Text="1. Going from fixed function to programmable function involves only creating a shader program wich is built from at least a vertex and fragment shader. If you &quot;Use&quot; this program glUseProgram function. Every vertex is pushed through the programmable pipeline.&#xD;&#xA;&#xD;&#xA;2. Another thing is (but optional) is to get rid of all the glBegin/glVertex etc and just use VertexBuffers so you have less calls to the GPU.&#xD;&#xA;&#xD;&#xA;3. Most of the time when using gl version 3 or higher you also get rid of all matrix functions provided by opengl and do it yourself or use some library like glm.&#xD;&#xA;&#xD;&#xA;So I would start with 1. You then can push your light info as uniforms to your shader program and use them in the vertex or pixel shader depending on if you want per vertex lighting or per pixel lighting.&#xD;&#xA;&#xD;&#xA;I also suggest you read up on deferred shading (not needed for converting from fixed to programmable but still cool ;-)) which means that you render your scene into intermediate buffers (textures). In one channel/texture you render color info in another the depth in another the normals. Than you use another renderpass and use those textures as input and you can do the lighting in this second pass.&#xD;&#xA;&#xD;&#xA;P.S. In modern hardware the fixed function pipeline is also implemented in the programmable pipeline and this shader is default enabled by the driver. Maybe you can find the source to this one to have the exact same result as your opengl 1.1 implementation.&#xD;&#xA;" />
  <row Id="31958" PostHistoryTypeId="2" PostId="14281" RevisionGUID="15e59c18-12af-42c5-9571-1029ca90f0c3" CreationDate="2011-06-29T07:07:06.460" UserId="37" Text="As of recent Google Chrome updates (13.0.782.32) the HTML5 audio tag has been working perfectly for me." />
  <row Id="31959" PostHistoryTypeId="5" PostId="14258" RevisionGUID="2bc3b197-9ec4-409d-ab32-e776661a5fb1" CreationDate="2011-06-29T07:28:57.300" UserId="5864" Comment="fix typo and style" Text="Note that since JPEG images use a Y or YUV colourspace they do not really have a pixel depth and thus there is no &quot;right&quot; depth for them. That said, you are correct in expecting a 8bpp grayscale image when decoding a monochrome JPEG.&#xD;&#xA;&#xD;&#xA;I don't know of an available API to achieve what you are trying to do in an automatic way. However, you can ask for a specific depth using the `BitmapFactory` preferred options:&#xD;&#xA;&#xD;&#xA;     BitmapFactory.Options opts = new BitmapFactory.Options();&#xD;&#xA;     // This option is suitable for monochrome JPEGs:&#xD;&#xA;     opts.inPreferredConfig = Bitmap.Config.ALPHA_8;&#xD;&#xA;     // This option is suitable for 32-bit PNGs:&#xD;&#xA;     opts.inPreferredConfig = Bitmap.Config.RGB_8888;&#xD;&#xA;&#xD;&#xA;     bitmap = BitmapFactory.decodeByteArray(data, 0, len, opts);&#xD;&#xA;&#xD;&#xA;This is still a hint for the decoder and does not guarantee that you will always get what you expect. I have additional suggestions:&#xD;&#xA;&#xD;&#xA; - embed your own versions of libPNG and/or libJPEG. I suggest trying [libjpeg-turbo][1] which allows to fine-tune the available colourspaces even more.&#xD;&#xA; - instead of using PNG or JPEG as your interchange format, use one or several texture compression formats suitable for your target devices; there are [readily available tools][2] to convert PNGs to ETC1, which is part of the OpenGL ES standard. Maybe add a layer of `gzip` on top of that.&#xD;&#xA; - do not hesitate to experiment and try **generic compression methods**: store your image just as you would upload it to the video card, and compress it using `libgz` or `libbzip2`. I have images that get significantly smaller using bzip2 on an uncompressed version than when crushing with [pngcrush][3]. That may be an acceptable tradeoff.&#xD;&#xA;&#xD;&#xA;Hope this helps!&#xD;&#xA;&#xD;&#xA; [1]: http://libjpeg-turbo.virtualgl.org/&#xD;&#xA; [2]: http://www.androidworks.com/opengl-es2-texture-compression-in-android&#xD;&#xA; [3]: http://pmt.sourceforge.net/pngcrush/&#xD;&#xA;" />
  <row Id="31960" PostHistoryTypeId="2" PostId="14282" RevisionGUID="72dd661a-a37a-45de-9b1e-c2bd525cd153" CreationDate="2011-06-29T08:36:29.510" UserId="1386" Text="I set up a simple platformer prototype for iOS with both UDK and Unity from having zero experience with either.&#xD;&#xA;&#xD;&#xA;The tools for Unity are a lot more intuitive all around, and because of this I was a lot more productive.&#xD;&#xA;&#xD;&#xA;The existing classes for use in Unity and the overall component-based structure is a lot more consistent than UDKs, where it's very difficult to know the exact responsibilities each object has and which objects it communicates with, without doing research or digging through the code.&#xD;&#xA;&#xD;&#xA;The fact that I could make changes even while the Unity game was running was nice.&#xD;&#xA;&#xD;&#xA;UDK did have a iOS controller, where you could send inputs to your Windows PC from your iPhone or iPad - Unity did have this but it was mac only.&#xD;&#xA;&#xD;&#xA;I didn't use the same assets for both prototypes (I used assets that came with the development kits), but neither prototype was demonstrably better than the other, they were virtually identical." />
  <row Id="31961" PostHistoryTypeId="2" PostId="14283" RevisionGUID="3f1e6da5-3917-4e1a-8686-84bc552a224f" CreationDate="2011-06-29T08:50:53.517" UserId="1156" Text="There's [Beginning C++ Through Game Programming][1]..I found it to be a good book. All the examples it works on are small, text-based games.&#xD;&#xA;&#xD;&#xA;If you're talking more advanced, I haven't seen anything like that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Beginning-Through-Game-Programming-Second/dp/1598633600" />
  <row Id="31962" PostHistoryTypeId="5" PostId="14046" RevisionGUID="b27d5f8a-4c13-4c39-9b92-7b78fcde14d5" CreationDate="2011-06-29T08:52:05.577" UserId="1156" Comment="added 10 characters in body; edited tags" Text="I have raw image data (may be .png, .jpg, ...) and I want it converted in Android without changing its pixel depth (bpp). In particular, when I load a grayscale (8 bpp) image that I want to use as alpha (`glTexImage(`) with `GL_ALPHA`), it converts it to 16 bpp (presumably `5_6_5`).&#xD;&#xA;&#xD;&#xA;While I do have a plan B (actually, I'm probably on plan 'E' by now, this is really becoming annoying) I would really like to discover an easy way to do this using what is readily available in the API.&#xD;&#xA;&#xD;&#xA;So far, I'm using `BitmapFactory.decodeByteArray()`.&#xD;&#xA;&#xD;&#xA;While I'm at it. I'm doing this from a native environment via JNI (passing the buffer in from C, and a new buffer back to C from Java). Any portable solution in C/C++ would be preferable, but I don't want to introduce anything that might break in future versions of Android, etc." />
  <row Id="31963" PostHistoryTypeId="6" PostId="14046" RevisionGUID="b27d5f8a-4c13-4c39-9b92-7b78fcde14d5" CreationDate="2011-06-29T08:52:05.577" UserId="1156" Comment="added 10 characters in body; edited tags" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;textures&gt;" />
  <row Id="31964" PostHistoryTypeId="2" PostId="14284" RevisionGUID="bbf8a73b-46e0-4046-a257-529ec9290f51" CreationDate="2011-06-29T08:53:22.987" UserId="8307" Text="I am working on a game that needs a level that is completely generated. Currently my approach is to draw textures for the levels pixel by pixel during the game (in XNA with SpriteBatch). This is too intensive unfortunately. The game has frame drops even when I only draw 1 level texture each draw cycle.&#xD;&#xA;&#xD;&#xA;For inspiration I looked at [PixelJunk Shooter 2][1]. These levels are obviously not generated, but some of the levels have movement. How do you guys think they implemented it? My guess is that the level and other objects in the game are actually flat 3d models, but I am not sure..&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=3o1Ac8nHLZY&amp;feature=player_detailpage#t=15s" />
  <row Id="31965" PostHistoryTypeId="1" PostId="14284" RevisionGUID="bbf8a73b-46e0-4046-a257-529ec9290f51" CreationDate="2011-06-29T08:53:22.987" UserId="8307" Text="Suggestions for implementing a dynamic 2D level" />
  <row Id="31966" PostHistoryTypeId="3" PostId="14284" RevisionGUID="bbf8a73b-46e0-4046-a257-529ec9290f51" CreationDate="2011-06-29T08:53:22.987" UserId="8307" Text="&lt;xna&gt;&lt;c#&gt;&lt;textures&gt;&lt;graphics-programming&gt;" />
  <row Id="31967" PostHistoryTypeId="25" PostId="14284" RevisionGUID="b0d18f30-383f-49ab-9bd3-384ead8b97a4" CreationDate="2011-06-29T09:25:49.940" Comment="http://twitter.com/#!/StackGameDev/status/86002419183529984" />
  <row Id="31968" PostHistoryTypeId="2" PostId="14285" RevisionGUID="38ec085f-aece-4e7c-9a25-dfe7ed79a92f" CreationDate="2011-06-29T09:30:27.460" UserId="8307" Text="I use [Sprite Sheet Packer][1] to put multiple textures into a single *power-of-two-texture*. This also generates either a text file or an xml file with information on the source rectangle of all the sprites in this *power-of-two-texture*.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://spritesheetpacker.codeplex.com/" />
  <row Id="31969" PostHistoryTypeId="2" PostId="14286" RevisionGUID="eb0efc92-fee3-4b11-84c7-caf01bb6c0cf" CreationDate="2011-06-29T09:41:42.537" UserId="7588" Text="But what are the size of these tiles and what does &quot;generate&quot; mean in your example? &#xD;&#xA;&#xD;&#xA;Displaying Big sprites with XNA can be quite slow, and if you are loading, or generating Texture2D's at run time it will be very slow.&#xD;&#xA;&#xD;&#xA;Generally a tile based game will have a set of pre-defined tiles.&#xD;&#xA;&#xD;&#xA; - You generate an index-based map at load time&#xD;&#xA; - At draw time, you draw only the tiles needed&#xD;&#xA;&#xD;&#xA;For a generation example you can look [here](http://www.nolithius.com/game-development/world-generation-breakdown)." />
  <row Id="31970" PostHistoryTypeId="2" PostId="14287" RevisionGUID="dcc035e3-d5c9-48bc-ac1a-e4f8f3207f78" CreationDate="2011-06-29T09:49:01.297" UserId="2798" Text="Look at the reference of [Matrix.CreateOrthographic][1], and notice that it says this:&#xD;&#xA;&#xD;&#xA;*The viewable area of this orthographic projection is centered on 0,0,0. The x-axis of the area ranges from -width/2 to width/2. The y-axis of the area ranges from -height/2 to height/2.* &#xD;&#xA;&#xD;&#xA;So, in your case, the upper border of the screen has an Y coordinate of -scale/2 instead of 0, and the lower border is scale/2 instead of scale. And if you are drawing a quad of size (10,10) at the coordinates (0, 0), its point of origin will be at the center of the screen, but since your positive Y is downwards, you will see it inverted.&#xD;&#xA;&#xD;&#xA;Your best choices are just to invert the second parameter so your Y axis points upwards, or define the orthographic matrix with [Matrix.CreateOrthographicOffCenter][2] so you can manually specify the world origin.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb195662.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb195659.aspx" />
  <row Id="31971" PostHistoryTypeId="2" PostId="14288" RevisionGUID="a9590e39-d0ef-4196-a737-0a70cce2687e" CreationDate="2011-06-29T09:52:01.330" UserId="2080" Text="There's [C++ For Game Programmers][1] but maybe [Game Coding Complete][2] will be a better match (although it does not focus on C++ only but there are some good chapters on C++ specific problems).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/dp/1584504528/&#xD;&#xA;  [2]: http://www.amazon.com/dp/1584506806/" />
  <row Id="31972" PostHistoryTypeId="5" PostId="14284" RevisionGUID="5be5f2f5-208c-4cab-a010-abfae024f458" CreationDate="2011-06-29T10:17:22.260" UserId="8307" Comment="added 427 characters in body" Text="I am working on a game that needs a level that is completely generated. Currently my approach is to draw textures for the levels pixel by pixel during the game (in XNA with SpriteBatch). This is too intensive unfortunately. The game has frame drops even when I only draw 1 level texture each draw cycle.&#xD;&#xA;&#xD;&#xA;Here is an example of the current prototype. It is a simple sidescroller with the avatar swimming through a cave. The shape of this cave will alter throughout the level (textures and physics collision shapes). You can clearly see the boundaries of the level tiles in the screenshot below. These are generated just before they move into camera view.&#xD;&#xA;&#xD;&#xA;![Prototype screenshot][1]&#xD;&#xA;&#xD;&#xA;For inspiration I looked at [PixelJunk Shooter 2][2]. These levels are obviously not generated, but some of the levels have movement. How do you guys think they implemented it? My guess is that the level and other objects in the game are actually flat 3d models, but I am not sure..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/VS4EA.png&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=3o1Ac8nHLZY&amp;feature=player_detailpage#t=15s" />
  <row Id="31973" PostHistoryTypeId="5" PostId="14286" RevisionGUID="d90d0a11-5a0b-492e-8082-99de34c995a0" CreationDate="2011-06-29T10:30:34.887" UserId="7588" Comment="added 71 characters in body" Text="For the generation of the cave, I would lean towards dynamic mesh generation, upon which you apply your background texture.&#xD;&#xA;&#xD;&#xA;If your cave stays the same height throughout the whole game, you could start with the generation of a spline or a bezier curve, and convert this into vertices. Extrude these vertices for two different meshes towards the top and bottom to create the cave and calculate UVs. You obviously need to make sure the end of one mesh links up with the start of the next.&#xD;&#xA;&#xD;&#xA;You could pre-generate a few 'screens' and generate new ones on the fly during the game.&#xD;&#xA;&#xD;&#xA;It is also possible with tiling techniques; I would invert the idea and create just the path superimposed over the background. You could pre-define path tiles and link them together with the same screen type generation." />
  <row Id="31976" PostHistoryTypeId="25" PostId="14272" RevisionGUID="adfbadf4-9893-4fb2-9426-a2dd03b9e99d" CreationDate="2011-06-29T12:25:50.170" Comment="http://twitter.com/#!/StackGameDev/status/86047717947752449" />
  <row Id="31977" PostHistoryTypeId="2" PostId="14290" RevisionGUID="c8b2a3bc-b518-41b0-a480-752567f6dc88" CreationDate="2011-06-29T12:37:14.647" UserId="6469" Text="I really enjoyed this book &#xD;&#xA;&#xD;&#xA;http://www.amazon.co.uk/Beginning-Game-Programming-Jonathan-Harbour/dp/1598632884/ref=sr_1_14?s=books&amp;ie=UTF8&amp;qid=1309350818&amp;sr=1-14&#xD;&#xA;&#xD;&#xA;this starts with windows programming then direct x in 2d then 3d. &#xD;&#xA;&#xD;&#xA;a brilliant book to follow Beginning C++ Through Game Programming" />
  <row Id="31978" PostHistoryTypeId="5" PostId="14272" RevisionGUID="00de9065-e16d-4971-aae5-b534a4e1fc0d" CreationDate="2011-06-29T12:55:35.450" UserId="8275" Comment="Added EDIT on free software requirement" Text="As most of game programming is done - I read on this very site - in C/C++ I was wondering if there is any learning/studying material for C/C++ that would target specifically game programming.&#xD;&#xA;&#xD;&#xA;I am not looking for material about &quot;developing games&quot; or &quot;software architecture for games&quot;, but rather for **material that uses &quot;game programming&quot; as the CONTEXT for introducing and illustrating C/C++ features, idioms, programming techniques, etc...**&#xD;&#xA;&#xD;&#xA;With a simile: think to the [GOF book on design patterns][1]. There, they used &quot;developing a text-editor&quot; as a context for introducing design patterns, but the book is most definitively not a book about &quot;developing text-editors&quot;.&#xD;&#xA;&#xD;&#xA;**EDIT:** The book should contain code examples that are not dependant on proprietary technologies (e.g.: it should use OpenGL rather than DirectX, a dialect of C known to gcc rather than needing a specific commercial compiler, etc...)&#xD;&#xA;&#xD;&#xA;Thanks in advance for your time and advice!&#xD;&#xA;&#xD;&#xA;PS: My background: I am a programmer with a solid experience in OO scripting languages and only some experience in C and Assembler (on AVR microcontrollers), so I am thinking to mid-to-advanced level material, rather than tutorials for beginners, although it might be interesting to take a look to the latter ones if nothing else is available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Design_Patterns" />
  <row Id="31979" PostHistoryTypeId="2" PostId="14291" RevisionGUID="824ff69d-17d5-4dec-83f1-be3a6cc57468" CreationDate="2011-06-29T13:02:47.800" UserId="8050" Text="For each step you make in x direction you will move 30px left and -15px up to your canvas;&#xD;&#xA;&#xD;&#xA;For each step you make in y direction you will move -30px left and -15px up to your canvas;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;This means that you can convert your tile coordinate system easely in pixel:&#xD;&#xA;&#xD;&#xA;(x,y) =&gt; (30&amp;middot;x,-15&amp;middot;x) + (-30&amp;middot;y, -15&amp;middot;y) = (30&amp;middot;x - 30&amp;middot;y, -15&amp;middot;x - 15&amp;middot;y) = (Xpx,Ypx)&#xD;&#xA;&#xD;&#xA;You have to resolve the inverse problem you know Xpx and Ypx and you want to know x and y (in tile coordinate).&#xD;&#xA;&#xD;&#xA;Xpx = 30&amp;middot;x - 30&amp;middot;y ;&#xD;&#xA;&#xD;&#xA;Ypy = -15&amp;middot;x - 15&amp;middot;y ;&#xD;&#xA;&#xD;&#xA;can you solve this?it should be:&#xD;&#xA;&#xD;&#xA;x = 1/60&amp;middot;Xpx - 1/30&amp;middot;Ypx&#xD;&#xA;&#xD;&#xA;y = -1/60&amp;middot;Xpx - 1/30&amp;middot;Ypx&#xD;&#xA;&#xD;&#xA;Obviously you will have non integer values in general case: taking the ceil of both x and y will gives you the coordinate of the whole tile.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/mMp22.png" />
  <row Id="31980" PostHistoryTypeId="5" PostId="14274" RevisionGUID="fb207428-3447-413e-ba18-dff5fc9ab3cf" CreationDate="2011-06-29T13:06:23.663" UserId="7588" Comment="Spelling mistakes, Listing" Text="I am working on an isometric grid based game and im having an issue trying to link a mouse click from the user to a tile. I have been able to split the problem into 2 parts :&#xD;&#xA;&#xD;&#xA; - Finding a rectangle that surrounds a tile (which I have been able to do)&#xD;&#xA; - Figuring out from the rectangle which tile the click landed in (has got me stumped)&#xD;&#xA;&#xD;&#xA;Here is an example of a rectangle with tiles on the inside:&#xD;&#xA;&#xD;&#xA;![Rectangle containing tiles][1]&#xD;&#xA;&#xD;&#xA;The rectangle is 70px long and 30px high so if i use an input of say 30x(top)/20y(left)  how would I go about determining which tile this fell into?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GDQ3X.png" />
  <row Id="31981" PostHistoryTypeId="24" PostId="14274" RevisionGUID="fb207428-3447-413e-ba18-dff5fc9ab3cf" CreationDate="2011-06-29T13:06:23.663" Comment="Proposed by 7588 approved by 20 edit id of 524" />
  <row Id="31982" PostHistoryTypeId="5" PostId="14291" RevisionGUID="1a3fd8f8-8f66-41a6-841a-f9ad59fdde99" CreationDate="2011-06-29T14:26:31.877" UserId="8050" Comment="correcting the width error" Text="For each step you make in x direction you will move 35px left and -15px up to your canvas;&#xD;&#xA;&#xD;&#xA;For each step you make in y direction you will move -35px left and -15px up to your canvas;&#xD;&#xA;&#xD;&#xA;![tile to cartesian][1]&#xD;&#xA;&#xD;&#xA;This means that you can convert your tile coordinate system easely in pixel:&#xD;&#xA;&#xD;&#xA;(x,y) =&gt; (35&amp;middot;x,-15&amp;middot;x) + (-35&amp;middot;y, -15&amp;middot;y) = (35&amp;middot;x - 35&amp;middot;y, -15&amp;middot;x - 15&amp;middot;y) = (Xpx,Ypx)&#xD;&#xA;&#xD;&#xA;You have to resolve the inverse problem you know Xpx and Ypx and you want to know x and y (in tile coordinate).&#xD;&#xA;&#xD;&#xA;Xpx = 35&amp;middot;x - 35&amp;middot;y ;&#xD;&#xA;&#xD;&#xA;Ypy = -15&amp;middot;x - 15&amp;middot;y ;&#xD;&#xA;&#xD;&#xA;can you solve this?it should be:&#xD;&#xA;&#xD;&#xA;x = 1/70&amp;middot;Xpx - 1/30&amp;middot;Ypx&#xD;&#xA;&#xD;&#xA;y = -1/70&amp;middot;Xpx - 1/30&amp;middot;Ypx&#xD;&#xA;&#xD;&#xA;Obviously you will have non integer values in general case: taking the ceil of both x and y will gives you the coordinate of the whole tile.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Lm2kx.png" />
  <row Id="31983" PostHistoryTypeId="5" PostId="266" RevisionGUID="fd02d045-e94d-4195-9aef-e6414715016f" CreationDate="2011-06-29T14:26:42.610" UserId="165" Comment="deleted 4 characters in body" Text="There's a great (long) list of music/sound sources at UnityAnswers: [Where can I find music or sound effects for my game?][1]. A sampler of some of the free ones:&#xD;&#xA;&#xD;&#xA;  - [8bit-collective][2]&#xD;&#xA;  - [ccmixter.org][3]&#xD;&#xA;  - [Flash Kit sound effects][4]&#xD;&#xA;  - [HartwigMedia][5]&#xD;&#xA;  - [Freesound.org][6]&#xD;&#xA;  - [Musopen classical music][7]&#xD;&#xA;  - [Open Music Archive][8]&#xD;&#xA;  - [Incompetech.com][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://answers.unity3d.com/questions/7743/where-can-i-find-music-or-sound-effects-for-my-gam.html&#xD;&#xA;  [2]: http://8bitcollective.com/&#xD;&#xA;  [3]: http://ccmixter.org/&#xD;&#xA;  [4]: http://www.flashkit.com/soundfx/&#xD;&#xA;  [5]: http://www.hartwigmedia.com/Index/index.php?option=com_rokdownloads&amp;view=folder&amp;Itemid=109&amp;lang=en&#xD;&#xA;  [6]: http://www.freesound.org/&#xD;&#xA;  [7]: http://musopen.com/&#xD;&#xA;  [8]: http://openmusicarchive.org/&#xD;&#xA;  [9]: http://incompetech.com/" />
  <row Id="31984" PostHistoryTypeId="2" PostId="14292" RevisionGUID="e7eb5259-a963-4e72-b68d-5bdd9c62d195" CreationDate="2011-06-29T14:26:43.967" UserId="6469" Text="I have an idea for a game like theme park but don't know how simulation games are made. &#xD;&#xA;&#xD;&#xA;I am not some noob on his first game so I appreciated constructive answers instead of &quot;its hard, don't do it&quot;.&#xD;&#xA;&#xD;&#xA;What I want is to know how simulation game mechanics are put together. I figure it would be heaver on the AI than normal games and not knowing much about AI would like to know some programming techniques I should look into for this style game. specific techniques please not just a book on ai. &#xD;&#xA;&#xD;&#xA;what sort of architecture would be used? I guess it would have some sort of probability engine with pre designed events that are triggered based on the AI state. &#xD;&#xA;&#xD;&#xA;Would it use a FSM or be purely event driven ?" />
  <row Id="31985" PostHistoryTypeId="1" PostId="14292" RevisionGUID="e7eb5259-a963-4e72-b68d-5bdd9c62d195" CreationDate="2011-06-29T14:26:43.967" UserId="6469" Text="Knowledge kit for simulation games" />
  <row Id="31986" PostHistoryTypeId="3" PostId="14292" RevisionGUID="e7eb5259-a963-4e72-b68d-5bdd9c62d195" CreationDate="2011-06-29T14:26:43.967" UserId="6469" Text="&lt;game-design&gt;&lt;ai&gt;&lt;simulations&gt;" />
  <row Id="31987" PostHistoryTypeId="2" PostId="14293" RevisionGUID="5472daaa-baf2-4ebf-804e-aa857b439996" CreationDate="2011-06-29T14:29:37.493" UserId="1430" Text="These are the kind of tasks you can usually script from a shell, assuming the programs in question are sufficiently scriptable. Mostly Xcode is simply going to do its work by calling out to GCC or LLVM or whatnot, so if nothing else you can write scripts for your shell of choice or in a language like Python to drive those tools. &#xD;&#xA;&#xD;&#xA;You can also use higher level tools like [AppleScript][1] or [Automator][2], and tie that to voice recognition commands via Apple's built-in voice recognition system (which can be enabled and configured via the System Preferences application). You can even incorporate voice commands into your scripts, as described [here][3]. Although I still think voice commands are a bit unusual.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/mac/#documentation/AppleScript/Conceptual/AppleScriptX/AppleScriptX.html&#xD;&#xA;  [2]: http://support.apple.com/kb/ht2488&#xD;&#xA;  [3]: http://macscripter.net/viewtopic.php?id=24662" />
  <row Id="31988" PostHistoryTypeId="5" PostId="14292" RevisionGUID="9f9370ce-9c0e-4235-a134-19d3b63d6a97" CreationDate="2011-06-29T14:32:04.217" UserId="6469" Comment="added 64 characters in body; edited title" Text="I have an idea for a game like theme park but don't know how simulation games are made. &#xD;&#xA;&#xD;&#xA;I am not some noob on his first game so I appreciated constructive answers instead of &quot;its hard, don't do it&quot;.&#xD;&#xA;&#xD;&#xA;What I want is to know how simulation game mechanics are put together. I figure it would be heaver on the AI than normal games and not knowing much about AI would like to know some programming techniques I should look into for this style game. specific techniques please not just a book on ai. &#xD;&#xA;&#xD;&#xA;what sort of architecture would be used? I guess it would have some sort of probability engine with pre designed events that are triggered based on the AI state. &#xD;&#xA;&#xD;&#xA;Would it use a FSM or be purely event driven ?&#xD;&#xA;&#xD;&#xA;Any information on how a sims game functions would be cool. " />
  <row Id="31989" PostHistoryTypeId="4" PostId="14292" RevisionGUID="9f9370ce-9c0e-4235-a134-19d3b63d6a97" CreationDate="2011-06-29T14:32:04.217" UserId="6469" Comment="added 64 characters in body; edited title" Text="what knowledge would I need to make a good simulation games" />
  <row Id="31990" PostHistoryTypeId="2" PostId="14294" RevisionGUID="f3ffacd9-30a5-4c2c-8246-ae84008af059" CreationDate="2011-06-29T14:40:38.817" UserId="1430" Text="It really doesn't matter -- you can use either polling or event-based interrupts to simulate the other kind of input, so that decision is largely irrelevant in trying to mimic the characteristics of the input from older devices.&#xD;&#xA;&#xD;&#xA;That said, you can find a lot of information about systems that old on emulation enthusiast websites ([this one][1], for example, contains a wealth of information about the hardware and memory-mapped registers uses by the GameBoy -- it's similar to the document linked in some of the comments, if not exactly the same in a different format).&#xD;&#xA;&#xD;&#xA;To achieve emulation of a particular game's input characteristics you'd want to do it at a higher level -- taking into account things like how the game handles two opposing directional bits set for joystick input, for example. Many older games don't handle this well, because it is generally not possible to physically interact with the device fast enough or in such a fashion as to cause some of the potential states to exist. [This is how tool-assisted speed runners do some of their work][2].&#xD;&#xA;&#xD;&#xA;You may want to scan through the [TASVideos resource page for Pokemon][3] and see if maybe there are any control-related oddities you should be emulating if you really want that level of similarity to the game.&#xD;&#xA;&#xD;&#xA;But I don't think it matters very much to the end result if you choose polling or not, even though that is generally what was used on the GameBoy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://nocash.emubase.de/pandocs.txt&#xD;&#xA;  [2]: http://tasvideos.org/GameResources/NES/SuperMarioBros.html#ShootingFasterSmb1Smb2j&#xD;&#xA;  [3]: http://tasvideos.org/GameResources/GBx/Pokemon.html" />
  <row Id="31991" PostHistoryTypeId="2" PostId="14295" RevisionGUID="6471168a-09e8-4fca-94dc-b558daf246e7" CreationDate="2011-06-29T14:47:06.010" UserId="1430" Text="The [source code to the original Sim City][1] was released a little while ago. It may provide some limited insight (be wary that source code, in general, isn't the best educational tool, especially when used alone). &#xD;&#xA;&#xD;&#xA;There's also [these lecture slides on The Sims][2], as well as [this article][3] on a few &quot;tricks&quot; used in the Sims AI.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.donhopkins.com/drupal/node/146&#xD;&#xA;  [2]: http://www.cs.northwestern.edu/~forbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/v3_document.htm&#xD;&#xA;  [3]: http://aigamedev.com/reviews/the-sims-ai/" />
  <row Id="31992" PostHistoryTypeId="2" PostId="14296" RevisionGUID="784b49a0-1c9f-4706-855b-c09e9a5f3315" CreationDate="2011-06-29T15:07:14.557" UserId="1430" Text="Raycasting and shadow casting are *types* of algorithms, not algorithms themselves (in this context). So neither have any performance characteristics, per se, and thus neither one is faster than the other.&#xD;&#xA;&#xD;&#xA;&quot;Shadow casting&quot; as a FOV technique isn't very common, I've only ever seen the term used widely in Roguelike development circles (and in fact the RogueBasin has a number of articles on shadow casting FOV techniques, such as the [spiral path implementation][1] and plenty of articles on [FOV in general][2]).&#xD;&#xA;&#xD;&#xA;You also might find [this article from GDNet][3] interesting.&#xD;&#xA;&#xD;&#xA;It's important to remember that there are more factors to consider than just performance -- while shadowcasting techniques tend to be faster than their raycasting counterparts, you pay a trade off in the shape of the results. Some algorithms generate more anomalies and artifacts than others, some procedures don't produce exactly uniform or symmetric results. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://roguebasin.roguelikedevelopment.org/index.php/Spiral_Path_FOV&#xD;&#xA;  [2]: http://roguebasin.roguelikedevelopment.org/index.php/Field_of_Vision&#xD;&#xA;  [3]: http://www.gamedev.net/page/reference/index.html/_//feature/fprogramming/walls-and-shadows-in-2d-r2711" />
  <row Id="31993" PostHistoryTypeId="2" PostId="14297" RevisionGUID="cb60d4de-a9e6-4914-9098-24d0bd6a9e30" CreationDate="2011-06-29T15:16:40.700" UserId="1430" Text="Find or write a different exporter, or perhaps (since Collada files are just XML) use [XSLT][1] to transform the undesired data away or in to a more generalized form?" />
  <row Id="31994" PostHistoryTypeId="5" PostId="14130" RevisionGUID="4b540a6b-49be-4e09-b75f-80e368899849" CreationDate="2011-06-29T15:20:29.203" UserId="2061" Comment="whoops, forgot to add ground_y to final result" Text="@Gajet's answer is impossible to follow (so I'm not even convinced it will work), and what I think @The Communist Duck meant his solution to be...&#xD;&#xA;&#xD;&#xA;    block_y = ground_y + random() % (previousBlock_y + playerJumpHeight)&#xD;&#xA;&#xD;&#xA;...will be heavily biased towards creating blocks with y-values centered around `ground_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;The easiest way to produce more satisfying results would be, rather than generate a height between `ground_y` and `previousBlock_y + playerJumpHeight`, generate a random value between `previousBlock_y - playerJumpHeight` and `previousBlock_y + playerJumpHeight`.&#xD;&#xA;&#xD;&#xA;Of course, since we want to take `ground_y` and `maxBlockHeight` into consideration also, we *really* want to find a random value between `max(ground_y, previousBlock_y - playerJumpHeight)` and `min(maxBlockHeight, previousBlock_y + playerJumpHeight)`.  This will skew our distribution a bit *(biased towards the center of the screen)*, but not enough to be noticeable.&#xD;&#xA;&#xD;&#xA;The simplest way to do this would be&#xD;&#xA;&#xD;&#xA;    //delta_y is a random number between -/+ playerJumpHeight&#xD;&#xA;    min_y = max(ground_y, previousBlock_y - playerJumpHeight)&#xD;&#xA;    max_y = min(maxBlockHeight, previousBlock_y + playerJumpHeight)&#xD;&#xA;    range_y = max_y - min_y&#xD;&#xA;    block_y = random() % range_y + min_y&#xD;&#xA;&#xD;&#xA;If you then want the block to have a random height as well, just generate a random number between `ground_y` and `block_y` to be the height. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**[Edit]**  There *is* a way to have a probability of jumping down by any amount, while still giving the player equal probability of being anywhere on the screen at any given point.&#xD;&#xA;&#xD;&#xA;Thanks to [Didier Piau](http://math.stackexchange.com/questions/47494/magical-loaded-dice-and-expected-values) on the math forums for figuring this out.  The full explanation is complex, so I'll leave it out; the curious can visit that page, from which I generalized this algorithm.  The algorithm itself is actually pretty simple, though.&#xD;&#xA;&#xD;&#xA;    int getNextBlockHeight()&#xD;&#xA;	{&#xD;&#xA;		int playingFieldHeight = screen_y - ground_y;&#xD;&#xA;		int canonicalBlockMaxHeight = playingFieldHeight - playerHeight;&#xD;&#xA;		int nextBlockMaxHeight = min(currentBlockHeight + playerJumpHeight, canonicalBlockMaxHeight);&#xD;&#xA;		&#xD;&#xA;		//Let's divide the screen vertically into chunks of size playerJumpHeight.&#xD;&#xA;		//This code makes it so that each chunk is approximately twice as likely as being chosen&#xD;&#xA;		//as the previous chunk&#xD;&#xA;		float canonicalHeightRatio = (float)canonicalBlockMaxHeight / playerJumpHeight;&#xD;&#xA;		float nextHeightRatio = (float)nextBlockMaxHeight / playerJumpHeight;&#xD;&#xA;&#xD;&#xA;		//The following looks complicated, but really it just ensures that the minimum is 0, the maximum is&#xD;&#xA;		//nextBlockMaxHeight, and everything in between is mapped logarithmically&#xD;&#xA;		float randomMin = pow(2, -canonicalHeightRatio);&#xD;&#xA;		float randomMax = pow(2, nextHeightRatio-canonicalHeightRatio);&#xD;&#xA;		float randomVal = randFloat(randomMin, randomMax);&#xD;&#xA;		float randomHeightRatio = log2(randVal)+canonicalHeightRatio;&#xD;&#xA;		return (int)(randomHeightRatio*playerJumpHeight) + ground_y;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Return the log-base-2 of a number&#xD;&#xA;	const float log_of_2 = log(2);&#xD;&#xA;	float log2(float value)&#xD;&#xA;	{&#xD;&#xA;	    return log(value) / log_of_2;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//Generates a random floating-point number between min and max&#xD;&#xA;	float randFloat(float min, float max)&#xD;&#xA;	{&#xD;&#xA;		float randomNormalized = (float)rand()/RAND_MAX; //Between 0.0 and 1.0&#xD;&#xA;		return randomNormalized*(max-min) + min;&#xD;&#xA;	}&#xD;&#xA;	" />
  <row Id="31995" PostHistoryTypeId="25" PostId="14277" RevisionGUID="20498a58-4abf-4a4a-a66e-455200ddcc24" CreationDate="2011-06-29T15:25:51.387" Comment="http://twitter.com/#!/StackGameDev/status/86093021849976832" />
  <row Id="31996" PostHistoryTypeId="2" PostId="14298" RevisionGUID="55994755-af02-462f-be97-c15f3eb07154" CreationDate="2011-06-29T15:25:58.283" UserId="7809" Text="How can I calculate the position of an object after &quot;firing&quot; it from a fixed point?&#xD;&#xA;&#xD;&#xA;I am to create a small game - most likely with canvas (pure HTML, JS based) or Adobe Flash - in which the player fires objects at other obstacles in order to clear them." />
  <row Id="31997" PostHistoryTypeId="1" PostId="14298" RevisionGUID="55994755-af02-462f-be97-c15f3eb07154" CreationDate="2011-06-29T15:25:58.283" UserId="7809" Text="Tracking Object Position - Firing on a Trajectory" />
  <row Id="31998" PostHistoryTypeId="3" PostId="14298" RevisionGUID="55994755-af02-462f-be97-c15f3eb07154" CreationDate="2011-06-29T15:25:58.283" UserId="7809" Text="&lt;2d-physics&gt;" />
  <row Id="31999" PostHistoryTypeId="2" PostId="14299" RevisionGUID="a0deaef5-7a00-4de6-90c7-adcde2011d09" CreationDate="2011-06-29T15:31:31.357" UserId="7191" Text="Good old physics will help you here. Specifically the equations of motion: http://en.wikipedia.org/wiki/Equations_of_motion&#xD;&#xA;&#xD;&#xA;If you want to simulate projectile motion (as in an arc) there's plenty of information for that too:&#xD;&#xA;&#xD;&#xA;http://www.ajdesigner.com/phpprojectilemotion/vertical_velocity_equation.php&#xD;&#xA;&#xD;&#xA;http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html&#xD;&#xA;&#xD;&#xA;http://library.thinkquest.org/28388/Mechanics/Motions/Projectile.htm" />
  <row Id="32000" PostHistoryTypeId="2" PostId="14300" RevisionGUID="dedee93e-67c4-4638-ad56-9ab85381a9ad" CreationDate="2011-06-29T15:32:28.497" UserId="8326" Text="I need to write a server for a game, which is closer to action type game, so needs fast communication. There must be only one server, I'll just split the world in zones, but this is not the question.&lt;br/&gt;&#xD;&#xA;Client will be written in java using jMonkeyEngine. In my opinion I should write the server in java. I don't want to implement any low level features such as communication, reliable udp, etc. &#xD;&#xA;Can you suggest any java libraries that already implement this? Or maybe there is more suitable languages to implement this project (must run on linux)?&#xD;&#xA;" />
  <row Id="32001" PostHistoryTypeId="1" PostId="14300" RevisionGUID="dedee93e-67c4-4638-ad56-9ab85381a9ad" CreationDate="2011-06-29T15:32:28.497" UserId="8326" Text="Linux multiplayer server, need some help." />
  <row Id="32002" PostHistoryTypeId="3" PostId="14300" RevisionGUID="dedee93e-67c4-4638-ad56-9ab85381a9ad" CreationDate="2011-06-29T15:32:28.497" UserId="8326" Text="&lt;java&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;server&gt;&lt;linux&gt;" />
  <row Id="32003" PostHistoryTypeId="2" PostId="14301" RevisionGUID="548a8434-553f-4786-8e1a-178c5c3606e0" CreationDate="2011-06-29T15:33:13.883" UserId="1430" Text="You may want to look at [this question][1] and [this one][2].&#xD;&#xA;&#xD;&#xA;Assuming you are not using a physics engine/library that will handle the motion for you (and simply call back in to your code when a collision event occurs), you probably want to simulate [projectile motion][3] (also [here][4], [here][5], and in general [here][6]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13924/projectile-motion-arrow&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/1041/realistic-trajectory-of-a-projectile&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Projectile_motion&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Trajectory_of_a_projectile&#xD;&#xA;  [5]: http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Equations_of_motion" />
  <row Id="32004" PostHistoryTypeId="2" PostId="14302" RevisionGUID="e70f4a74-2128-42a4-a03c-04a9fb36500f" CreationDate="2011-06-29T15:49:33.477" UserId="8327" Text="I finally found Railgun Ruby on the web and installed it.&#xD;&#xA;&#xD;&#xA;But I cannot find any documentations.&#xD;&#xA;&#xD;&#xA;Does anyone have played around with it? Does anyone still have a good documentation about it?&#xD;&#xA;&#xD;&#xA;I'd like to have a look at what it can do.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Yours, Joern." />
  <row Id="32005" PostHistoryTypeId="1" PostId="14302" RevisionGUID="e70f4a74-2128-42a4-a03c-04a9fb36500f" CreationDate="2011-06-29T15:49:33.477" UserId="8327" Text="Railgun Ruby - is there a documentation?" />
  <row Id="32006" PostHistoryTypeId="3" PostId="14302" RevisionGUID="e70f4a74-2128-42a4-a03c-04a9fb36500f" CreationDate="2011-06-29T15:49:33.477" UserId="8327" Text="&lt;ruby&gt;" />
  <row Id="32007" PostHistoryTypeId="2" PostId="14303" RevisionGUID="6e02f9bc-8c3c-4689-9463-d4809efb8fac" CreationDate="2011-06-29T15:58:35.127" UserId="1430" Text="Doesn't look like it. The project appears dead -- links to it's homepage on Rubyforge go nowhere, and there's only a [few casual mentions of it][1] around the internet (usually with associated chatter about [Rubygame][2] and some naysayers asserting that Ruby isn't suitable for game development -- YMMV).&#xD;&#xA;&#xD;&#xA;I wouldn't recommend using a library in this state. Rubygame looks, at least superficial, like a much more viable product than Railgun.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://oreilly.com/pub/a/ruby/2007/12/18/creating-games-in-ruby-part-2.html?page=3&#xD;&#xA;  [2]: http://rubygame.org/" />
  <row Id="32008" PostHistoryTypeId="5" PostId="13816" RevisionGUID="a0e7de80-4488-46b3-8884-4f2a876b9afc" CreationDate="2011-06-29T15:59:22.477" UserId="7630" Comment="incorporated link from comment to answer" Text="[This link][1], suggested by 3nixios, addresses what you're talking about.&#xD;&#xA;&#xD;&#xA;The issue that's holding you back is concurrency (threading) and locking, and being aware of that it can be a problem is half the battle.&#xD;&#xA;&#xD;&#xA;I suggest reading the accepted answer to the link, but the short version is that you will only draw or update the unlocked items, but before you do you'll ask the program to lock the object/variable.  After you are done with it, you'll unlock it.&#xD;&#xA;&#xD;&#xA;The wikipedia article on this isn't a bad starting point.  http://en.wikipedia.org/wiki/Lock_(computer_science)&#xD;&#xA;&#xD;&#xA;There are issues around lock contention and dead locks and such, but any good concurrency reference will discuss these in gory detail.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/9434/7630" />
  <row Id="32009" PostHistoryTypeId="2" PostId="14304" RevisionGUID="2e65e04e-4ee6-4eef-87bb-4c8041200be1" CreationDate="2011-06-29T16:02:09.870" UserId="4419" Text="I have created a random height map and now i want to create rivers. I've made an algorithm based on a* to make rivers flow from peaks to sea and now i'm in the quest of figuring out an elegant algorithm to render them.&#xD;&#xA;&#xD;&#xA;It's a 2D, square, mapgrid. The cells which the river pases has a simple integer value with this form :rivernumber &amp;&amp; pointOrder. Ie: 10, 11, 12, 13, 14, 15, 16...1+N for the first river, 20,21,22,23...2+N for the second, etc. This is created in the map grid generation time and it's executed just once, when the world is generated.&#xD;&#xA;&#xD;&#xA;I wanted to treat each river as a vector, but there is a problem, if the same river has branches (because i put some noise to generate branches), i can not just connect the points in order.&#xD;&#xA;&#xD;&#xA;The second alternative is to generate a complex algorithm where analizes each point, checks if the next is not a branch, if so trigger another algorithm that take care of the branch then returns to the main river, etc. Very complex and inelegant.&#xD;&#xA;&#xD;&#xA;Perhaps there is a solution in the world generation algorithm or in the river rendering algorithm that is commonly used in these cases and i'm not aware of.&#xD;&#xA;&#xD;&#xA;Any tips? Thanks!!" />
  <row Id="32010" PostHistoryTypeId="1" PostId="14304" RevisionGUID="2e65e04e-4ee6-4eef-87bb-4c8041200be1" CreationDate="2011-06-29T16:02:09.870" UserId="4419" Text="Render rivers in a grid." />
  <row Id="32011" PostHistoryTypeId="3" PostId="14304" RevisionGUID="2e65e04e-4ee6-4eef-87bb-4c8041200be1" CreationDate="2011-06-29T16:02:09.870" UserId="4419" Text="&lt;algorithm&gt;&lt;procedural-generation&gt;&lt;terrain-rendering&gt;" />
  <row Id="32012" PostHistoryTypeId="2" PostId="14305" RevisionGUID="9231721d-cecc-4ad1-b311-9b72b8a59ab2" CreationDate="2011-06-29T16:02:44.713" UserId="20" Text="[Adobe Illustrator][1] is a professional vector drawing tool. An open-source alternative would be [Inkscape][2].&#xD;&#xA;&#xD;&#xA;If you'd like to animate the sprites too, there's some basic animation-support in Illustrator. A better tool for vector-animations is [Flash][3] though.&#xD;&#xA;&#xD;&#xA;These professional tools are rather expensive. If you just want to get your feet wet with vector graphics, it's maybe better to learn a free tool like Inkscape. You'll find some Inkscape tutorials over at: [inkscapetutorials.wordpress.com][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.adobe.com/products/illustrator.html&#xD;&#xA;  [2]: http://inkscape.org/&#xD;&#xA;  [3]: http://www.adobe.com/products/flash.html&#xD;&#xA;  [4]: http://inkscapetutorials.wordpress.com/" />
  <row Id="32013" PostHistoryTypeId="5" PostId="14291" RevisionGUID="9b4e4cb1-2db8-4342-aee6-f7e6c6278aa2" CreationDate="2011-06-29T16:25:50.360" UserId="8050" Comment="edited body" Text="For each step you make in x direction you will move 35px left and -15px up to your canvas;&#xD;&#xA;&#xD;&#xA;For each step you make in y direction you will move -35px left and -15px up to your canvas;&#xD;&#xA;&#xD;&#xA;![tile to cartesian][1]&#xD;&#xA;&#xD;&#xA;This means that you can convert your tile coordinate system easely in pixel:&#xD;&#xA;&#xD;&#xA;(x,y) =&gt; (35&amp;middot;x,-15&amp;middot;x) + (-35&amp;middot;y, -15&amp;middot;y) = (35&amp;middot;x - 35&amp;middot;y, -15&amp;middot;x - 15&amp;middot;y) = (Xpx,Ypx)&#xD;&#xA;&#xD;&#xA;You have to resolve the inverse problem you know Xpx and Ypx and you want to know x and y (in tile coordinate).&#xD;&#xA;&#xD;&#xA;Xpx = 35&amp;middot;x - 35&amp;middot;y ;&#xD;&#xA;&#xD;&#xA;Ypx = -15&amp;middot;x - 15&amp;middot;y ;&#xD;&#xA;&#xD;&#xA;can you solve this?it should be:&#xD;&#xA;&#xD;&#xA;x = 1/70&amp;middot;Xpx - 1/30&amp;middot;Ypx&#xD;&#xA;&#xD;&#xA;y = -1/70&amp;middot;Xpx - 1/30&amp;middot;Ypx&#xD;&#xA;&#xD;&#xA;Obviously you will have non integer values in general case: taking the ceil of both x and y will gives you the coordinate of the whole tile.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Lm2kx.png" />
  <row Id="32014" PostHistoryTypeId="25" PostId="14304" RevisionGUID="9d130fdd-0204-4f76-b6e2-2e3a0b58c631" CreationDate="2011-06-29T18:25:52.743" Comment="http://twitter.com/#!/StackGameDev/status/86138325869666304" />
  <row Id="32015" PostHistoryTypeId="2" PostId="14306" RevisionGUID="adf456d7-c0cf-4105-ac61-cec8b87b2b79" CreationDate="2011-06-29T18:33:08.763" UserId="7482" Text="How do I get the distance between 2 points on an isometric grid? I'm creating a facebook isometric game (in as3), and when I move around a particular type of building, I need to know if it comes within range of another type of structure, for example a tree. I tried taking the grid x,y points for both items, and calculating the x,y from that but it doesn't seem to work." />
  <row Id="32016" PostHistoryTypeId="1" PostId="14306" RevisionGUID="adf456d7-c0cf-4105-ac61-cec8b87b2b79" CreationDate="2011-06-29T18:33:08.763" UserId="7482" Text="How do I get the distance between 2 points on an isometric grid?" />
  <row Id="32017" PostHistoryTypeId="3" PostId="14306" RevisionGUID="adf456d7-c0cf-4105-ac61-cec8b87b2b79" CreationDate="2011-06-29T18:33:08.763" UserId="7482" Text="&lt;actionscript-3&gt;" />
  <row Id="32021" PostHistoryTypeId="2" PostId="14308" RevisionGUID="d90b676a-9f18-4c28-a553-941b715c8649" CreationDate="2011-06-29T19:03:45.290" UserId="3656" Text="What's the correct technique for getting smooth sprite translations with XNA?&#xD;&#xA;&#xD;&#xA;I've been developing the WP7 version of an app for a startup, so when we heard Angry Birds got ported today we wanted to check it out and compare. Angry Birds on WP7 had the sub-pixel blur problem with the bird sprites, whereas iPhone, Android, and Chrome all had smooth movement." />
  <row Id="32022" PostHistoryTypeId="1" PostId="14308" RevisionGUID="d90b676a-9f18-4c28-a553-941b715c8649" CreationDate="2011-06-29T19:03:45.290" UserId="3656" Text="How to do smooth sprite movement on WP7 XNA" />
  <row Id="32023" PostHistoryTypeId="3" PostId="14308" RevisionGUID="d90b676a-9f18-4c28-a553-941b715c8649" CreationDate="2011-06-29T19:03:45.290" UserId="3656" Text="&lt;xna&gt;&lt;sprites&gt;&lt;windows-phone-7&gt;" />
  <row Id="32024" PostHistoryTypeId="2" PostId="14309" RevisionGUID="9e389a08-b36f-40ba-95c5-75d95d203e77" CreationDate="2011-06-29T19:41:56.677" UserId="7715" Text="I'm developing a classical 2d RPG (in a similar vein to final fantasy) and I was wondering if anyone had some advice on how to do damage formulas/links to resources/examples? I'll explain my current setup. Hopefully I'm not overdoing it with this question, and I apologize if my questions is too large/broad&#xD;&#xA;&#xD;&#xA;My Characters stats are composed of the following:&#xD;&#xA;&#xD;&#xA;    enum Stat&#xD;&#xA;    {&#xD;&#xA;    	HP = 0,&#xD;&#xA;    	MP = 1,&#xD;&#xA;    	SP = 2,&#xD;&#xA;    	Strength = 3,&#xD;&#xA;    	Vitality = 4,&#xD;&#xA;    	Magic = 5,&#xD;&#xA;    	Spirit = 6,&#xD;&#xA;    	Skill = 7,&#xD;&#xA;    	Speed = 8, //Speed/Agility are the same thing&#xD;&#xA;    	Agility = 8,&#xD;&#xA;    	Evasion = 9,&#xD;&#xA;    	MgEvasion = 10,&#xD;&#xA;    	Accuracy = 11,&#xD;&#xA;    	Luck = 12,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Vitality is basically defense to physical attacks and spirit is defense to magic attacks. &#xD;&#xA;&#xD;&#xA;All stats have fixed maximums (9999 for HP, 999 for MP/SP and 255 for the rest). With abilities, the maximums can be increased (99999 for HP, 9999 for HP/SP, 999 for the rest) with typical values (at level 100) before/after abilities+equipment+etc will be 8000/20,000 for HP, 800/2000 for SP/MP, 180/350 for other stats&#xD;&#xA;&#xD;&#xA;Late game Enemy HP will typically be in the lower millions (with a super boss having the maximum of ~12 million).&#xD;&#xA;&#xD;&#xA;I was wondering how do people actually develop proper damage formulas that scale correctly? For instance, based on this data, using the damage formulas for Final Fantasy X as a base looked very promising. A full reference here http://www.gamefaqs.com/ps2/197344-final-fantasy-x/faqs/31381 but as a quick example:&#xD;&#xA;Str = 127, 'Attack' command used, enemy Def = 34.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    1. Physical Damage Calculation:&#xD;&#xA;    Step 1 ------------------------------------- [{(Stat^3 ÷ 32) + 32} x DmCon ÷16]&#xD;&#xA;    Step 2 ---------------------------------------- [{(127^3 ÷ 32) + 32} x 16 ÷ 16]&#xD;&#xA;    Step 3 -------------------------------------- [{(2048383 ÷ 32) + 32} x 16 ÷ 16]&#xD;&#xA;    Step 4 --------------------------------------------------- [{(64011) + 32} x 1]&#xD;&#xA;    Step 5 -------------------------------------------------------- [{(64043 x 1)}]&#xD;&#xA;    Step 6 ---------------------------------------------------- Base Damage = 64043&#xD;&#xA;    Step 7 ----------------------------------------- [{(Def - 280.4)^2} ÷ 110] + 16&#xD;&#xA;    Step 8 ------------------------------------------ [{(34 - 280.4)^2} ÷ 110] + 16&#xD;&#xA;    Step 9 ------------------------------------------------- [(-246)^2) ÷ 110] + 16&#xD;&#xA;    Step 10 ---------------------------------------------------- [60516 ÷ 110] + 16&#xD;&#xA;    Step 11 ------------------------------------------------------------ [550] + 16&#xD;&#xA;    Step 12 ---------------------------------------------------------- DefNum = 566&#xD;&#xA;    Step 13 ---------------------------------------------- [BaseDmg * DefNum ÷ 730]&#xD;&#xA;    Step 14 --------------------------------------------------- [64043 * 566 ÷ 730]&#xD;&#xA;    Step 15 ------------------------------------------------------ [36248338 ÷ 730]&#xD;&#xA;    Step 16 ------------------------------------------------- Base Damage 2 = 49655&#xD;&#xA;    Step 17 ------------ Base Damage 2 * {730 - (Def * 51 - Def^2 ÷ 11) ÷ 10} ÷ 730&#xD;&#xA;    Step 18 ---------------------- 49655 * {730 - (34 * 51 - 34^2 ÷ 11) ÷ 10} ÷ 730&#xD;&#xA;    Step 19 ------------------------- 49655 * {730 - (1734 - 1156 ÷ 11) ÷ 10} ÷ 730&#xD;&#xA;    Step 20 ------------------------------- 49655 * {730 - (1734 - 105) ÷ 10} ÷ 730&#xD;&#xA;    Step 21 ------------------------------------- 49655 * {730 - (1629) ÷ 10} ÷ 730&#xD;&#xA;    Step 22 --------------------------------------------- 49655 * {730 - 162} ÷ 730&#xD;&#xA;    Step 23 ----------------------------------------------------- 49655 * 568 ÷ 730&#xD;&#xA;    Step 24 -------------------------------------------------- Final Damage = 38635&#xD;&#xA;&#xD;&#xA;I simply modified the dividers to include the attack rating of weapons and the armor rating of armor.&#xD;&#xA;&#xD;&#xA;Magic Damage is calculated as follows:&#xD;&#xA;Mag = 255, Ultima is used, enemy MDef = 1 &#xD;&#xA;&#xD;&#xA;    Step 1 ----------------------------------- [DmCon * ([Stat^2 ÷ 6] + DmCon) ÷ 4]&#xD;&#xA;    Step 2 ------------------------------------------ [70 * ([255^2 ÷ 6] + 70) ÷ 4]&#xD;&#xA;    Step 3 ------------------------------------------ [70 * ([65025 ÷ 6] + 70) ÷ 4]&#xD;&#xA;    Step 4 ------------------------------------------------ [70 * (10837 + 70) ÷ 4]&#xD;&#xA;    Step 5 ----------------------------------------------------- [70 * (10907) ÷ 4]&#xD;&#xA;    Step 6 ------------------------------------ Base Damage = 190872 [cut to 99999]&#xD;&#xA;    Step 7 ---------------------------------------- [{(MDef - 280.4)^2} ÷ 110] + 16&#xD;&#xA;    Step 8 ------------------------------------------- [{(1 - 280.4)^2} ÷ 110] + 16&#xD;&#xA;    Step 9 ---------------------------------------------- [{(-279.4)^2} ÷ 110] + 16&#xD;&#xA;    Step 10 -------------------------------------------------- [(78064) ÷ 110] + 16&#xD;&#xA;    Step 11 ------------------------------------------------------------ [709] + 16&#xD;&#xA;    Step 12 --------------------------------------------------------- MDefNum = 725&#xD;&#xA;    Step 13 --------------------------------------------- [BaseDmg * MDefNum ÷ 730]&#xD;&#xA;    Step 14 --------------------------------------------------- [99999 * 725 ÷ 730]&#xD;&#xA;    Step 15 ------------------------------------------------- Base Damage 2 = 99314&#xD;&#xA;    Step 16 ---------- Base Damage 2 * {730 - (MDef * 51 - MDef^2 ÷ 11) ÷ 10} ÷ 730&#xD;&#xA;    Step 17 ------------------------ 99314 * {730 - (1 * 51 - 1^2 ÷ 11) ÷ 10} ÷ 730&#xD;&#xA;    Step 18 ------------------------------ 99314 * {730 - (51 - 1 ÷ 11) ÷ 10} ÷ 730&#xD;&#xA;    Step 19 --------------------------------------- 99314 * {730 - (49) ÷ 10} ÷ 730&#xD;&#xA;    Step 20 ----------------------------------------------------- 99314 * 725 ÷ 730&#xD;&#xA;    Step 21 -------------------------------------------------- Final Damage = 98633&#xD;&#xA;&#xD;&#xA;The problem is that the formulas completely fall apart once stats start going above 255. In particular Defense values over 300 or so start generating really strange behavior. High Strength + Defense stats lead to massive negative values for instance. While I might be able to modify the formulas to work correctly for my use case, it'd probably be easier just to use a completely new formula. How do people actually develop damage formulas? I was considering opening excel and trying to build the formula that way (mapping Attack Stats vs. Defense Stats for instance) but I was wondering if there's an easier way? While I can't convey the full game mechanics of my game here, might someone be able to suggest a good starting place for building a damage formula?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32025" PostHistoryTypeId="1" PostId="14309" RevisionGUID="9e389a08-b36f-40ba-95c5-75d95d203e77" CreationDate="2011-06-29T19:41:56.677" UserId="7715" Text="How to develop RPG Damage Formulas?" />
  <row Id="32026" PostHistoryTypeId="3" PostId="14309" RevisionGUID="9e389a08-b36f-40ba-95c5-75d95d203e77" CreationDate="2011-06-29T19:41:56.677" UserId="7715" Text="&lt;game-design&gt;&lt;math&gt;&lt;game-mechanics&gt;" />
  <row Id="32027" PostHistoryTypeId="2" PostId="14310" RevisionGUID="fc329652-aac7-4699-bc53-46687bbe83c9" CreationDate="2011-06-29T19:44:38.203" UserId="8296" Text="Almost all high performance servers, MMORPG or not, use thread pools and multiple queues.&#xD;&#xA;&#xD;&#xA;A sample design might look like this:&#xD;&#xA;&#xD;&#xA; * On Windows, use IO Completion Ports to avoid requiring a thread per connection. &#xD;&#xA; * When data is received, deserialize (&quot;read&quot;) it into a new packet object. What I do is read the packet type (1 byte) and then use a dictionary/lookup table to find the object type. Once I have the type I use reflection to create the strongly typed packet object. I call a method on the packet to &quot;read&quot; the data from the stream.&#xD;&#xA; * The packet, along with a &quot;network session&quot; object representing the connection are added to a global queue. When an item is in the queue a network dispatch thread wakes up and &quot;routes&quot; packets to. &#xD;&#xA; * The packet router checks the type of packet. If it's a generic &quot;network&quot; packet (for example, &quot;Ping&quot;), it gets wrapped in a NetworkAction object and passed to the &quot;network action queue&quot;. If it's a &quot;simulation&quot; packet (ie/ &quot;Move Player&quot;) it gets wrapped in a SimulationAction object and passed to the &quot;simulation action queue&quot;.&#xD;&#xA; * The simulation action queue works the same as the network dispatcher - once an item is in simulation action queue a simulation dispatch thread wakes up and processes each message in the queue. In other words, only one thing at a time happens to a simulation, but multiple game simulations (ie/ regions, maps)  can be loaded at once. Each simulation has its own queue.&#xD;&#xA; * Rather than having one thread per queue or one thread per simulation, a thread pool is used. Threads are allocated as-required.&#xD;&#xA;&#xD;&#xA;You might want to take a look at how IIS (Microsoft's Web Server) for Windows 2008/Windows 7 is architectured internally and use a similar approach. &#xD;&#xA;&#xD;&#xA; * One &quot;process&quot; (http.sys in the kernel) listens on port 80. (MMORPG - your server process listens for new requests)&#xD;&#xA; * Http.sys deserializes the packets as fast as possible, handling thousands of connections at once. (MMORPG - use IO Completion Ports and thread pools to read packets)&#xD;&#xA; * Once enough information is known about the request (HTTP header) it passes the information to Windows Process Activation. (MMORPG - once you've read your packet, look at the packet and determine if it needs to be sent to the &quot;game world&quot; or handled directly. If it's a &quot;game world&quot;/simulation packet, toss it in a queue so that it can be &quot;routed&quot; to the correct simulation)&#xD;&#xA; * Windows Process Activation determines which website should process the request. If a process is not running for the website, it starts one. If no one has used the website in awhile, it stops it. If the website crashes, it restarts it. Once the website worker process is ready, it passes the message to it. (MMORPG - Don't waste resources processing areas of the game world that don't have players. Determine where the packet should go, and if its an area of the world that is offline, start it up. Pass the packet into the &quot;simulation action queue&quot; - one for each simulation. Use simulations to subdivide your world - for example, one per map, one per region, etc)&#xD;&#xA; * The website's worker process has a queue of all outstanding requests. It spins up a number of threads in a pool (~10-20) and once a thread is available, it passes the request to the thread. The thread remains blocked until the webpage is ready (ie/ read blog listings from database and generate HTML) and returns the content back to HTTP.SYS so it can be converted to a packet. (MMORPG - difficult to have multiple threads running in the world at once due to collision detection and entity graphs, but have one thread that processes items in the queue, perhaps using a priority queue).&#xD;&#xA;&#xD;&#xA;I use C#, mainly because it simplifies most of what I described above. It has its own internal thread pools. Strangely enough, take a look at the Microsoft Robotics Platform. It has a component called the CCR - &quot;Concurrency and Coordination Runtime&quot; that makes it easy to build dispatch queues and multithread easily. They also have a service component that will route messages to services and start them as required.&#xD;&#xA;&#xD;&#xA;The key point I'm trying to make is non-game services handle hundreds to thousands of requests per second on a single core machine with minimal CPU load. Games are more complex, but if you incorporate some of the same strategies it will go a long way. Just remember - keep it simple at first, get something working, and build out the complexity only when it's required." />
  <row Id="32028" PostHistoryTypeId="2" PostId="14311" RevisionGUID="ad0f0101-2f64-4531-9071-8629607310d0" CreationDate="2011-06-29T19:47:32.097" UserId="1156" Text="I assume you have points `(x1, y1)` and `(x2, y2)`.&#xD;&#xA;&#xD;&#xA;The pythagorean distance between them is `sqrt((x1-x2)^2 + (y1-y2)^2)`. Leave out the sqrt if you just need a relative distance.&#xD;&#xA;&#xD;&#xA;If you want to find a distance in grid tile units, then simply divide:&#xD;&#xA;&#xD;&#xA;`actual_distance/grid_size`.&#xD;&#xA;" />
  <row Id="32029" PostHistoryTypeId="2" PostId="14312" RevisionGUID="bfee45d3-fb22-41d5-8daa-e6d9e702f434" CreationDate="2011-06-29T19:59:16.647" UserId="8296" Text="Second Life runs (at least partially) using managed code. They run on MONO, which is a Linux port of .NET. It's possible they're just hosting .NET within C++ for the scripts, but they are running it at least partially." />
  <row Id="32030" PostHistoryTypeId="16" PostId="14312" RevisionGUID="fda021b5-3ef2-4ca3-b632-0e7fb759487c" CreationDate="2011-06-29T19:59:16.647" UserId="8296" />
  <row Id="32031" PostHistoryTypeId="2" PostId="14313" RevisionGUID="a00641de-d696-406e-baf5-ebf7fa671ee5" CreationDate="2011-06-29T20:04:36.563" UserId="8323" Text="I'm pretty sure that CCP Games uses some .net components on there servers. From games like eve online." />
  <row Id="32032" PostHistoryTypeId="16" PostId="14313" RevisionGUID="db2712ac-3603-4032-8d5f-7fa1538306e9" CreationDate="2011-06-29T20:04:36.563" UserId="8323" />
  <row Id="32033" PostHistoryTypeId="2" PostId="14314" RevisionGUID="8742f110-9195-44df-8199-888640027847" CreationDate="2011-06-29T21:08:02.760" UserId="2061" Text="You are running into an [integer overflow][1].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `unsigned __int64` *(MS-specific)* is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32034" PostHistoryTypeId="2" PostId="14315" RevisionGUID="334af364-eef2-4867-a455-b5aaf798cb10" CreationDate="2011-06-29T21:15:15.600" UserId="5311" Text="Your formulas seem pretty complicated. I'm not sure how professional RPG developers handle this, but I'd recommend on focusing on simplicity.  Try to find the simplest possible formula you can that still incorporates the range of stats you want to use.  For instance, could you have stats modify each other prior to damage calculation, rather than modifying the damage during the calculation? Once you've got a formula in mind, I'd try graphing it for a wide range of possible values to see how it will behave as players level up.  Obviously the fewer variables you have, them more feasible this will be.&#xD;&#xA;&#xD;&#xA;Additionally, BlueRaja provided an important explanation of why you might be seeing unexpected values at higher stat levels.  Using unsigned types and checking for overflows will be important." />
  <row Id="32035" PostHistoryTypeId="5" PostId="14314" RevisionGUID="3ccae1dc-81ea-4d04-86e2-556e18ab5417" CreationDate="2011-06-29T21:18:12.023" UserId="744" Comment="Use standard 64 bit integer type." Text="You are running into an [integer overflow][1].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `uint64_t` (in `stdint.h`) is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32036" PostHistoryTypeId="25" PostId="14309" RevisionGUID="731f62c2-fc82-4da1-9f93-89ad47d07de1" CreationDate="2011-06-29T21:25:53.350" Comment="http://twitter.com/#!/StackGameDev/status/86183628245184514" />
  <row Id="32037" PostHistoryTypeId="5" PostId="14314" RevisionGUID="3269862e-8181-49df-9693-f11505bfc876" CreationDate="2011-06-29T21:26:18.997" UserId="2061" Comment="added 1555 characters in body" Text="You are running into an [integer overflow][13].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `uint64_t` (in `stdint.h`) is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As for your main question:  creating formulas like this require knowledge of [elementary mathematical functions][1] - the things you learned about in Algebra and Pre-calculus class.&#xD;&#xA;&#xD;&#xA;Once you have those mastered, just ask yourself *(replace &quot;value&quot; with &quot;damage,&quot; or &quot;health,&quot; or whatever)*:&#xD;&#xA;&#xD;&#xA;* Do you want the value to grow at a constant rate?   Use a [linear function][2].&#xD;&#xA;* Do you want the value to grow slow at first, but fast later?  Use a [polynomial][3] or [exponential function][4].&#xD;&#xA;* Do you want the value to grow fast at first, and slow down later?  Use an [nth-root][5] or [logarithmic function][6].&#xD;&#xA;* Do you want the value to grow slowly at first, speed up towards the middle, then slow down at the end?  Use a [sigmoid curve][7], such as [atan][8] or the [logistic function][9].&#xD;&#xA;* Do you want the value to oscillate?  Use a [sin][10] or [some][11] [other][12] wave.&#xD;&#xA;&#xD;&#xA;Now who said math wasn't useful? :)&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/List_of_mathematical_functions#Elementary_functions&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Linear_function&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Polynomial&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Exponential_function&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Nth_root&#xD;&#xA;[6]: http://en.wikipedia.org/wiki/Logarithm&#xD;&#xA;[7]: http://en.wikipedia.org/wiki/Sigmoid_function&#xD;&#xA;[8]: http://en.wikipedia.org/wiki/Inverse_trigonometric_functions&#xD;&#xA;[9]: http://en.wikipedia.org/wiki/Logistic_function&#xD;&#xA;[10]: http://en.wikipedia.org/wiki/Sine&#xD;&#xA;[11]: http://en.wikipedia.org/wiki/Sawtooth_wave&#xD;&#xA;[12]: http://en.wikipedia.org/wiki/Triangle_wave&#xD;&#xA;[13]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32038" PostHistoryTypeId="8" PostId="14314" RevisionGUID="01a0d393-42c8-436a-abcd-5ce9820db93f" CreationDate="2011-06-29T21:29:47.173" UserId="2061" Comment="Rollback to [3ccae1dc-81ea-4d04-86e2-556e18ab5417]" Text="You are running into an [integer overflow][1].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `uint64_t` (in `stdint.h`) is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32039" PostHistoryTypeId="8" PostId="14314" RevisionGUID="9ba842cc-b1e6-4d3b-9ccc-a66ab1199c75" CreationDate="2011-06-29T21:29:57.033" UserId="2061" Comment="Rollback to [3269862e-8181-49df-9693-f11505bfc876]" Text="You are running into an [integer overflow][13].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `uint64_t` (in `stdint.h`) is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As for your main question:  creating formulas like this require knowledge of [elementary mathematical functions][1] - the things you learned about in Algebra and Pre-calculus class.&#xD;&#xA;&#xD;&#xA;Once you have those mastered, just ask yourself *(replace &quot;value&quot; with &quot;damage,&quot; or &quot;health,&quot; or whatever)*:&#xD;&#xA;&#xD;&#xA;* Do you want the value to grow at a constant rate?   Use a [linear function][2].&#xD;&#xA;* Do you want the value to grow slow at first, but fast later?  Use a [polynomial][3] or [exponential function][4].&#xD;&#xA;* Do you want the value to grow fast at first, and slow down later?  Use an [nth-root][5] or [logarithmic function][6].&#xD;&#xA;* Do you want the value to grow slowly at first, speed up towards the middle, then slow down at the end?  Use a [sigmoid curve][7], such as [atan][8] or the [logistic function][9].&#xD;&#xA;* Do you want the value to oscillate?  Use a [sin][10] or [some][11] [other][12] wave.&#xD;&#xA;&#xD;&#xA;Now who said math wasn't useful? :)&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/List_of_mathematical_functions#Elementary_functions&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Linear_function&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Polynomial&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Exponential_function&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Nth_root&#xD;&#xA;[6]: http://en.wikipedia.org/wiki/Logarithm&#xD;&#xA;[7]: http://en.wikipedia.org/wiki/Sigmoid_function&#xD;&#xA;[8]: http://en.wikipedia.org/wiki/Inverse_trigonometric_functions&#xD;&#xA;[9]: http://en.wikipedia.org/wiki/Logistic_function&#xD;&#xA;[10]: http://en.wikipedia.org/wiki/Sine&#xD;&#xA;[11]: http://en.wikipedia.org/wiki/Sawtooth_wave&#xD;&#xA;[12]: http://en.wikipedia.org/wiki/Triangle_wave&#xD;&#xA;[13]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32040" PostHistoryTypeId="5" PostId="14314" RevisionGUID="ffa220e1-063c-4346-b30b-ba585f630a83" CreationDate="2011-06-29T21:31:46.300" UserId="2061" Comment="deleted 1 characters in body" Text="You are running into an [integer overflow][13].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `__int64` *(MS-specific)* is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As for your main question:  creating formulas like this require knowledge of [elementary mathematical functions][1] - the things you learned about in Algebra and Pre-calculus class.&#xD;&#xA;&#xD;&#xA;Once you have those mastered, just ask yourself *(replace &quot;value&quot; with &quot;damage,&quot; or &quot;health,&quot; or whatever)*:&#xD;&#xA;&#xD;&#xA;* Do you want the value to grow at a constant rate?   Use a [linear function][2].&#xD;&#xA;* Do you want the value to grow slow at first, but fast later?  Use a [polynomial][3] or [exponential function][4].&#xD;&#xA;* Do you want the value to grow fast at first, and slow down later?  Use an [nth-root][5] or [logarithmic function][6].&#xD;&#xA;* Do you want the value to grow slowly at first, speed up towards the middle, then slow down at the end?  Use a [sigmoid curve][7], such as [atan][8] or the [logistic function][9].&#xD;&#xA;* Do you want the value to oscillate?  Use a [sin][10] or [some][11] [other][12] wave.&#xD;&#xA;&#xD;&#xA;Now who said math wasn't useful? :)&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/List_of_mathematical_functions#Elementary_functions&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Linear_function&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Polynomial&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Exponential_function&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Nth_root&#xD;&#xA;[6]: http://en.wikipedia.org/wiki/Logarithm&#xD;&#xA;[7]: http://en.wikipedia.org/wiki/Sigmoid_function&#xD;&#xA;[8]: http://en.wikipedia.org/wiki/Inverse_trigonometric_functions&#xD;&#xA;[9]: http://en.wikipedia.org/wiki/Logistic_function&#xD;&#xA;[10]: http://en.wikipedia.org/wiki/Sine&#xD;&#xA;[11]: http://en.wikipedia.org/wiki/Sawtooth_wave&#xD;&#xA;[12]: http://en.wikipedia.org/wiki/Triangle_wave&#xD;&#xA;[13]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32041" PostHistoryTypeId="5" PostId="14314" RevisionGUID="4945429d-21f2-42f9-8ef6-9abac8d71d69" CreationDate="2011-06-29T21:37:20.760" UserId="2061" Comment="deleted 1 characters in body" Text="Creating formulas like this requires knowledge of [elementary mathematical functions][1] - the things you learned about in Algebra and Pre-calculus class.&#xD;&#xA;&#xD;&#xA;Once you have those mastered, just ask yourself *(replace &quot;value&quot; with &quot;damage,&quot; or &quot;health,&quot; or whatever)*:&#xD;&#xA;&#xD;&#xA;* Do you want the value to grow at a constant rate?   Use a [linear function][2].&#xD;&#xA;* Do you want the value to grow slow at first, but fast later?  Use a [polynomial][3] or [exponential function][4].&#xD;&#xA;* Do you want the value to grow fast at first, and slow down later?  Use an [nth-root][5] or [logarithmic function][6].&#xD;&#xA;* Do you want the value to grow slowly at first, speed up towards the middle, then slow down at the end?  Use a [sigmoid curve][7], such as [atan][8] or the [logistic function][9].&#xD;&#xA;* Do you want the value to oscillate?  Use a [sin][10] or [some][11] [other][12] wave.&#xD;&#xA;&#xD;&#xA;Then just tweak the parameters (value of the base, and such) until it feels right.  A graphing calculator will help you visualize how changes to the parameters will affect the function.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, the problems you are experiencing are due to [integer overflows][13].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `unsigned __int64` *(MS-specific)* is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/List_of_mathematical_functions#Elementary_functions&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Linear_function&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Polynomial&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Exponential_function&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Nth_root&#xD;&#xA;[6]: http://en.wikipedia.org/wiki/Logarithm&#xD;&#xA;[7]: http://en.wikipedia.org/wiki/Sigmoid_function&#xD;&#xA;[8]: http://en.wikipedia.org/wiki/Inverse_trigonometric_functions&#xD;&#xA;[9]: http://en.wikipedia.org/wiki/Logistic_function&#xD;&#xA;[10]: http://en.wikipedia.org/wiki/Sine&#xD;&#xA;[11]: http://en.wikipedia.org/wiki/Sawtooth_wave&#xD;&#xA;[12]: http://en.wikipedia.org/wiki/Triangle_wave&#xD;&#xA;[13]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32042" PostHistoryTypeId="2" PostId="14316" RevisionGUID="828980d6-1fe1-46f1-bf87-555c196b4cfc" CreationDate="2011-06-29T21:39:56.653" UserId="8330" Text="I'm trying to understand how to use the XNA XML content importer to instantiate non-trivial objects that are more than a collection of basic properties (e.g., a class that inherits from `DrawableGameObject` or `GameObject` and requires other things to be passed into its constructor).&#xD;&#xA;&#xD;&#xA;Is it possible to pass existing external instances (e.g., an instance of the current `Game`) to the constructor of an object that's being created using the default XNA XML content loader?&#xD;&#xA;&#xD;&#xA;For example, imagine that I have the following class, inheriting from `DrawableGameComponent`:&#xD;&#xA;&#xD;&#xA;    public class Character : DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;      public string Name { get; set; }&#xD;&#xA;&#xD;&#xA;      public Character(Game game) : base(game) { }&#xD;&#xA;&#xD;&#xA;      public override void Update(GameTime gameTime) { }&#xD;&#xA;      public override void Draw(GameTime gameTime) { }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If I had a simple class that did not need other parameters in its constructor (i.e., the `Game` instance), then I could simply use this XML:&#xD;&#xA;&#xD;&#xA;    &lt;XnaContent&gt;&#xD;&#xA;      &lt;Asset Type=&quot;MyNamespace.Character&quot;&gt;&#xD;&#xA;        &lt;Name&gt;John Doe&lt;/Name&gt;&#xD;&#xA;      &lt;/Asset&gt;&#xD;&#xA;    &lt;/XnaContent&gt;&#xD;&#xA;&#xD;&#xA;...and then create an instance of `Character` using this code:&#xD;&#xA;&#xD;&#xA;    var character = Content.Load&lt;Character&gt;(&quot;MyXmlAssetName&quot;);&#xD;&#xA;&#xD;&#xA;But that won't work because I need to pass the need to pass the `Game` into the constructor.&#xD;&#xA;&#xD;&#xA;What's the best way to handle this situation? Is there a way to pass in things like the current `Game` using the default XNA XML content loader? Do I need to write my own XML loader? (If so, how?) Is there a better object-oriented design that I should be using for my classes?&#xD;&#xA;&#xD;&#xA;Note: Although I used `Game` in this example, I'm really just asking how to pass any type of existing instance to my constructors. (For example, I'm using the Farseer Physics Engine, and some of my classes also need a reference to the Farseer `World` object too.)&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="32043" PostHistoryTypeId="1" PostId="14316" RevisionGUID="828980d6-1fe1-46f1-bf87-555c196b4cfc" CreationDate="2011-06-29T21:39:56.653" UserId="8330" Text="How can I pass an external instance to the constructor of an object that's being created using the default XNA XML content loader?" />
  <row Id="32044" PostHistoryTypeId="3" PostId="14316" RevisionGUID="828980d6-1fe1-46f1-bf87-555c196b4cfc" CreationDate="2011-06-29T21:39:56.653" UserId="8330" Text="&lt;xna&gt;&lt;c#&gt;&lt;xml&gt;" />
  <row Id="32045" PostHistoryTypeId="5" PostId="14314" RevisionGUID="f3fb064c-7eb8-4d28-9a2e-78db670724a9" CreationDate="2011-06-29T21:43:01.837" UserId="2061" Comment="added 21 characters in body" Text="Creating formulas like this requires knowledge of [elementary mathematical functions][1] - the things you learned about in Algebra and Pre-calculus class.&#xD;&#xA;&#xD;&#xA;Once you have those mastered, just ask yourself *(replace &quot;value&quot; with &quot;damage,&quot; or &quot;health,&quot; or whatever)*:&#xD;&#xA;&#xD;&#xA;* Do you want the value to grow at a constant rate?   Use a [linear function][2].&#xD;&#xA;* Do you want the value to grow slow at first, but fast later?  Use a [polynomial][3] or [exponential function][4].&#xD;&#xA;* Do you want the value to grow fast at first, and slow down later?  Use an [nth-root][5] or [logarithmic function][6].&#xD;&#xA;* Do you want the value to grow slowly at first, speed up towards the middle, then slow down at the end?  Use a [sigmoid curve][7], such as [atan][8] or the [logistic function][9].&#xD;&#xA;* Do you want the value to oscillate?  Use a [sin][10] or [some][11] [other][12] wave.&#xD;&#xA;&#xD;&#xA;Then just tweak it *(add/multiply stuff, change the base-value, etc)* until it feels right.  A graphing calculator will help you visualize how changes to the parameters will affect the function.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, the problems you are experiencing are due to [integer overflows][13].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `unsigned __int64` *(MS-specific)* is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/List_of_mathematical_functions#Elementary_functions&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Linear_function&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Polynomial&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Exponential_function&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Nth_root&#xD;&#xA;[6]: http://en.wikipedia.org/wiki/Logarithm&#xD;&#xA;[7]: http://en.wikipedia.org/wiki/Sigmoid_function&#xD;&#xA;[8]: http://en.wikipedia.org/wiki/Inverse_trigonometric_functions&#xD;&#xA;[9]: http://en.wikipedia.org/wiki/Logistic_function&#xD;&#xA;[10]: http://en.wikipedia.org/wiki/Sine&#xD;&#xA;[11]: http://en.wikipedia.org/wiki/Sawtooth_wave&#xD;&#xA;[12]: http://en.wikipedia.org/wiki/Triangle_wave&#xD;&#xA;[13]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32046" PostHistoryTypeId="2" PostId="14317" RevisionGUID="4f3af583-7957-42f2-97a6-155fefdcb45a" CreationDate="2011-06-29T21:47:10.103" UserId="2061" Text="I believe you're meant to use a `Service` in this case, rather than passing it into the constructor.&#xD;&#xA;&#xD;&#xA;See [this post][1] for more info.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="32047" PostHistoryTypeId="2" PostId="14318" RevisionGUID="459054ac-c917-417d-ab14-a790aea3ce25" CreationDate="2011-06-29T21:49:00.383" UserId="1424" Text="Well xna allows sub pixel rendering (like drawing your sprite at 2.5 pixels from the right, I dont know if android or the iPhone do that (I dont know which framework Angry Birds uses) &#xD;&#xA;That might be the reason.&#xD;&#xA;It could also be the framerate, Windows phone games run at 30fps, I'm not sure what iPhone and Android have" />
  <row Id="32048" PostHistoryTypeId="2" PostId="14319" RevisionGUID="009369e3-a980-4622-abd6-b74ebdf4dc22" CreationDate="2011-06-29T21:49:47.717" UserId="8331" Text="[Vindictus][1] server is fully written in .Net. Vindictus offers only one logical shard with hundreds of thousands of simultaneous users, which can be done via function and data distributed computing techniques.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/search?hl=en&amp;q=vindictus+youtube" />
  <row Id="32049" PostHistoryTypeId="16" PostId="14319" RevisionGUID="1f7af683-9017-4819-8673-338250a93f3d" CreationDate="2011-06-29T21:49:47.717" UserId="8331" />
  <row Id="32050" PostHistoryTypeId="2" PostId="14320" RevisionGUID="d665d5b6-14f8-4346-8c42-ad0336e974a3" CreationDate="2011-06-29T21:53:23.250" UserId="1424" Text="Well, Inkscape and AI are two good vector graphics editors (I use Inkscape myself) but to make things look good, you really need to have art skills. Also, if you want bone based animations, you're most likely going to have to write something yourself because I dont know of any solutions for that. However, to animate (hand made) you can just make spritesheets with whatever vector program you're using and copy the sprite and make your own sheet, changing each copy.&#xD;&#xA;&#xD;&#xA;Also, heres a link on how to do skeletal animations&#xD;&#xA;http://www.catalinzima.com/2011/06/2d-skeletal-animations/" />
  <row Id="32052" PostHistoryTypeId="5" PostId="14317" RevisionGUID="10c7a257-04d9-4377-86bd-63ac0fd104ad" CreationDate="2011-06-29T21:54:30.383" UserId="2061" Comment="added 395 characters in body" Text="In this case, I believe the best thing to do would be to load only the information about the character from the XML, and use that information in your character class:&#xD;&#xA;&#xD;&#xA;	public class Character : DrawableGameComponent&#xD;&#xA;	{&#xD;&#xA;		public CharacterInfo CharacterInfo { get; private set; }&#xD;&#xA;		&#xD;&#xA;		public Character(Game game, string characterAssetName) : base(game)&#xD;&#xA;		{&#xD;&#xA;			_assetName = characterAssetName;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		protected override void LoadContent()&#xD;&#xA;		{&#xD;&#xA;			CharacterInfo = Game.Content.Load&lt;CharacterInfo&gt;(_assetName);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		public override void Update(GameTime gameTime) { }&#xD;&#xA;		public override void Draw(GameTime gameTime) { }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public class CharacterInfo&#xD;&#xA;	{&#xD;&#xA;		public string Name { get; set; }&#xD;&#xA;	}" />
  <row Id="32053" PostHistoryTypeId="2" PostId="14321" RevisionGUID="8a1ee68f-7d16-4c61-9e5e-6fcbdd082516" CreationDate="2011-06-29T23:17:04.543" UserId="6592" Text="Two things I'm quite confused about.&#xD;&#xA;&#xD;&#xA;1) OpenGL ES 2.0 creates primitives before the vertex shader is invoked. Why, then, does it not automatically provide the vertex shader the position of the vertex?&#xD;&#xA;&#xD;&#xA;2) OpenGL ES 2.0 supports glDrawElements(), but it does not support glEnableClientState() or GL_VERTEX_ARRAY, so how can this call possibly be used to construct primitives?&#xD;&#xA;&#xD;&#xA;NOTE: this is OpenGL ES 2.0, NOT normal OpenGL!&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="32054" PostHistoryTypeId="1" PostId="14321" RevisionGUID="8a1ee68f-7d16-4c61-9e5e-6fcbdd082516" CreationDate="2011-06-29T23:17:04.543" UserId="6592" Text="How does opengl-es 2 assemble primitives?" />
  <row Id="32055" PostHistoryTypeId="3" PostId="14321" RevisionGUID="8a1ee68f-7d16-4c61-9e5e-6fcbdd082516" CreationDate="2011-06-29T23:17:04.543" UserId="6592" Text="&lt;glsl&gt;&lt;opengl-es2&gt;" />
  <row Id="32056" PostHistoryTypeId="5" PostId="14314" RevisionGUID="05de9a20-82ab-4745-87d9-b939edbcb1f9" CreationDate="2011-06-30T00:00:05.233" UserId="2061" Comment="added 11 characters in body" Text="Creating formulas like this requires knowledge of [elementary mathematical functions][1] - the things you learned about in Algebra and Pre-calculus class.&#xD;&#xA;&#xD;&#xA;Once you have those mastered, just ask yourself *(replace &quot;value&quot; with &quot;damage,&quot; or &quot;health,&quot; or &quot;speed&quot; or whatever)*:&#xD;&#xA;&#xD;&#xA;* Do you want the value to grow at a constant rate?   Use a [linear function][2].&#xD;&#xA;* Do you want the value to grow slow at first, but fast later?  Use a [polynomial][3] or [exponential function][4].&#xD;&#xA;* Do you want the value to grow fast at first, and slow down later?  Use an [nth-root][5] or [logarithmic function][6].&#xD;&#xA;* Do you want the value to grow slowly at first, speed up towards the middle, then slow down at the end?  Use a [sigmoid curve][7], such as [atan][8] or the [logistic function][9].&#xD;&#xA;* Do you want the value to oscillate?  Use a [sin][10] or [some][11] [other][12] wave.&#xD;&#xA;&#xD;&#xA;Then just tweak it *(add/multiply stuff, change the base-value, etc)* until it feels right.  A graphing calculator will help you visualize how changes to the parameters will affect the function.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, the problems you are experiencing are due to [integer overflows][13].&#xD;&#xA;&#xD;&#xA;Use variable-types that are large enough to hold the numbers you're working with.  Sizes differ by platform in C++, but using the 32-bit Visual Studio compiler, `unsigned int` is 32-bit, while `unsigned __int64` *(MS-specific)* is 64-bit.  Also consider using a `double`.&#xD;&#xA;&#xD;&#xA;Additionally, try to reorganize your operations so that you don't encounter such large numbers in the first place *(for example, rather than `MDef * MDef / 110`, do `(int)((float)MDef / 110 * MDef)`)*.&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/List_of_mathematical_functions#Elementary_functions&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Linear_function&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Polynomial&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Exponential_function&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Nth_root&#xD;&#xA;[6]: http://en.wikipedia.org/wiki/Logarithm&#xD;&#xA;[7]: http://en.wikipedia.org/wiki/Sigmoid_function&#xD;&#xA;[8]: http://en.wikipedia.org/wiki/Inverse_trigonometric_functions&#xD;&#xA;[9]: http://en.wikipedia.org/wiki/Logistic_function&#xD;&#xA;[10]: http://en.wikipedia.org/wiki/Sine&#xD;&#xA;[11]: http://en.wikipedia.org/wiki/Sawtooth_wave&#xD;&#xA;[12]: http://en.wikipedia.org/wiki/Triangle_wave&#xD;&#xA;[13]: http://en.wikipedia.org/wiki/Integer_overflow" />
  <row Id="32057" PostHistoryTypeId="25" PostId="14316" RevisionGUID="afaafad1-fcf0-4914-b4fe-3488ad3b32a6" CreationDate="2011-06-30T00:25:54.037" Comment="http://twitter.com/#!/StackGameDev/status/86228929194622976" />
  <row Id="32058" PostHistoryTypeId="2" PostId="14322" RevisionGUID="3fa3cec1-f3b0-4101-b9d2-be9f60cfee9e" CreationDate="2011-06-30T02:57:13.760" UserId="5021" Text="It sounds like they are accidentally rounding their sprite positions to the nearest pixel. This can happen automatically if you use the SpriteBatch.Draw() call that takes a Rectangle as the position of the sprite, since XNA's `Rectangle` uses integers instead of floats to represent position.&#xD;&#xA;&#xD;&#xA;If sprites are drawn with integer coords, then sub-pixel rendering will not occur, and sprites will appear to snap from one pixel position to the next, instead of blending smoothly between them." />
  <row Id="32059" PostHistoryTypeId="25" PostId="14308" RevisionGUID="024002ec-cd87-48a9-abd2-f9c7ba2534f7" CreationDate="2011-06-30T03:25:55.313" Comment="http://twitter.com/#!/StackGameDev/status/86274230668378112" />
  <row Id="32060" PostHistoryTypeId="2" PostId="14323" RevisionGUID="c5035c5a-4c3d-470c-9648-e6d953d2d506" CreationDate="2011-06-30T04:17:26.683" UserId="4360" Text="I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for debugging. I'm not, however not all my objects are on the same screen, and i'd like to see where they are in the physics representation.&#xD;&#xA;&#xD;&#xA;**How can I pan the debug drawing?**&#xD;&#xA;&#xD;&#xA;As you can see the debug draw stuff, is show on the top left, but it only shows a small part of the world.&#xD;&#xA;&#xD;&#xA;![Box2D debug draw is on the top left][1]&#xD;&#xA;Here is an example of what I mean:  &#xD;&#xA;http://onedayitwillmake.com/ChuClone/&#xD;&#xA;&#xD;&#xA;The game is open source, perhaps i'm doing something that is obviously wrong:&#xD;&#xA;https://github.com/onedayitwillmake/ChuClone&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/E45Q8.jpg" />
  <row Id="32061" PostHistoryTypeId="1" PostId="14323" RevisionGUID="c5035c5a-4c3d-470c-9648-e6d953d2d506" CreationDate="2011-06-30T04:17:26.683" UserId="4360" Text="Scrolling Box2D DebugDraw" />
  <row Id="32062" PostHistoryTypeId="3" PostId="14323" RevisionGUID="c5035c5a-4c3d-470c-9648-e6d953d2d506" CreationDate="2011-06-30T04:17:26.683" UserId="4360" Text="&lt;box2d&gt;&lt;javascript&gt;" />
  <row Id="32063" PostHistoryTypeId="5" PostId="14323" RevisionGUID="15fd4353-bb25-499d-ba71-384a304ab335" CreationDate="2011-06-30T05:19:31.777" UserId="4360" Comment="added 54 characters in body" Text="I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for debugging. I'm not, however not all my objects are on the same screen, and i'd like to see where they are in the physics representation.&#xD;&#xA;&#xD;&#xA;**How can I pan the debug drawing?**&#xD;&#xA;&#xD;&#xA;As you can see the debug draw stuff, is show on the top left, but it only shows a small part of the world.&#xD;&#xA;&#xD;&#xA;![Box2D debug draw is on the top left][1]&#xD;&#xA;Here is an example of what I mean:  &#xD;&#xA;http://onedayitwillmake.com/ChuClone/&#xD;&#xA;&#xD;&#xA;The game is open source, If you'd like to poke through and note something that perhaps i'm doing something that is obviously wrong:&#xD;&#xA;https://github.com/onedayitwillmake/ChuClone&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/E45Q8.jpg" />
  <row Id="32064" PostHistoryTypeId="25" PostId="14306" RevisionGUID="bd15bc1e-b75d-44f5-ac54-d99e60002e06" CreationDate="2011-06-30T06:25:56.457" Comment="http://twitter.com/#!/StackGameDev/status/86319536617431040" />
  <row Id="32065" PostHistoryTypeId="5" PostId="14321" RevisionGUID="2c8ec83b-bb86-42ec-80d0-f75142715bcb" CreationDate="2011-06-30T08:35:07.880" UserId="1156" Comment="added 6 characters in body; edited title" Text="Two things I'm quite confused about.&#xD;&#xA;&#xD;&#xA;1) OpenGL ES 2.0 creates primitives before the vertex shader is invoked. Why, then, does it not automatically provide the vertex shader the position of the vertex?&#xD;&#xA;&#xD;&#xA;2) OpenGL ES 2.0 supports `glDrawElements()`, but it does not support `glEnableClientState()` or `GL_VERTEX_ARRAY`, so how can this call possibly be used to construct primitives?&#xD;&#xA;&#xD;&#xA;NOTE: this is OpenGL ES 2.0, NOT normal OpenGL!&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="32066" PostHistoryTypeId="4" PostId="14321" RevisionGUID="2c8ec83b-bb86-42ec-80d0-f75142715bcb" CreationDate="2011-06-30T08:35:07.880" UserId="1156" Comment="added 6 characters in body; edited title" Text="How does OpenGL-ES 2 assemble primitives?" />
  <row Id="32067" PostHistoryTypeId="6" PostId="14323" RevisionGUID="23a0edbb-ecb3-4ab4-939d-475a7519577c" CreationDate="2011-06-30T08:35:31.343" UserId="1156" Comment="edited tags" Text="&lt;box2d&gt;&lt;javascript&gt;&lt;debug&gt;" />
  <row Id="32073" PostHistoryTypeId="25" PostId="14323" RevisionGUID="1b0b273f-4940-4e66-b8aa-f78d17c9b48e" CreationDate="2011-06-30T09:25:57.253" Comment="http://twitter.com/#!/StackGameDev/status/86364838086971393" />
  <row Id="32074" PostHistoryTypeId="2" PostId="14326" RevisionGUID="f6728710-8be9-4e19-ac0c-f1bff1b95e50" CreationDate="2011-06-30T09:30:39.073" UserId="5660" Text="I used to work as a linguistic QA tester and every now and then we would spot bugs, where the translators had obviously used Google translate or not been given the whole script but only single out-of-context snippets to work with (or both). When seen in context, they could turn out to be everything from incoherent rambling to lines from porn films.&#xD;&#xA;&#xD;&#xA;The funniest bug I found was where the player had to defeat the boss-henchman of an evil organization and they had blatantly misspelled the organization's name on the texture for the dude's armor. They refused to fix it because it seemed like too much effort..." />
  <row Id="32075" PostHistoryTypeId="16" PostId="14326" RevisionGUID="75b80f99-b94f-496c-96fd-2f5aa468f76a" CreationDate="2011-06-30T09:30:39.073" UserId="5660" />
  <row Id="32077" PostHistoryTypeId="2" PostId="14327" RevisionGUID="aa1095cc-b582-4b13-af25-271ce5708371" CreationDate="2011-06-30T11:15:23.810" UserId="6469" Text="all games in the final fantasy series have had a stat cap of 255 because of the problem you are encountering. at level 100 stats would be 255. &#xD;&#xA;&#xD;&#xA;you say about increasing stats with abilities and equipment and I remember seeing this in the games but the way this is done is in the formula. there is an extra step that checks for ability and equipment modifiers and applies them after the stats have been used. &#xD;&#xA;&#xD;&#xA;in your case it would be step 21: apply ability modifiers&#xD;&#xA;step 22: apply equipment modifiers&#xD;&#xA;step23: final damage.&#xD;&#xA;&#xD;&#xA;if you are interested google for final fantasy formulas, they are out there. I have copys of the actual battle mechanics including AI for final fantasy 4, 6, 7 and 9. people cracked them from the original games when they were creating roms for emulators. There not that hard to find if you look hard enough.&#xD;&#xA;&#xD;&#xA;the biggest thing for creating formulas is testing. set up a script to run your battle wit ai on both side and run several hundred battles. vary the monsters and the stats and see if it works or if lv 40 kills everything, it is entirely possible that a boss is actually impossible to kill lol. a tip would be to turn off all animation as it is impressive how fast AI's can battle when no one is watching." />
  <row Id="32078" PostHistoryTypeId="10" PostId="14220" RevisionGUID="b36f79fc-aba6-4998-9a18-ea702dee6524" CreationDate="2011-06-30T11:28:56.773" UserId="189" CloseReasonId="2" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:189,&quot;DisplayName&quot;:&quot;Ricket&quot;}]" />
  <row Id="32079" PostHistoryTypeId="25" PostId="14273" RevisionGUID="d3fbb8f0-2d26-46b9-9287-3ddf70973165" CreationDate="2011-06-30T12:25:57.407" Comment="http://twitter.com/#!/StackGameDev/status/86410136712781824" />
  <row Id="32080" PostHistoryTypeId="2" PostId="14328" RevisionGUID="22d33cc6-9719-4fa5-bbe3-41628f036b85" CreationDate="2011-06-30T13:25:40.993" UserId="8276" Text="Would it be much more work to create a 3D game on a planet rather than on a flat plane? What engines would support this and what techniques would I use?&#xD;&#xA;&#xD;&#xA;An example would be a small sphere the player could walk around to get back where they started." />
  <row Id="32081" PostHistoryTypeId="1" PostId="14328" RevisionGUID="22d33cc6-9719-4fa5-bbe3-41628f036b85" CreationDate="2011-06-30T13:25:40.993" UserId="8276" Text="3D game on a planet" />
  <row Id="32082" PostHistoryTypeId="3" PostId="14328" RevisionGUID="22d33cc6-9719-4fa5-bbe3-41628f036b85" CreationDate="2011-06-30T13:25:40.993" UserId="8276" Text="&lt;3d&gt;&lt;physics&gt;&lt;3d-engines&gt;" />
  <row Id="32083" PostHistoryTypeId="2" PostId="14329" RevisionGUID="429d565a-e743-4005-bf2e-9cc464aab7be" CreationDate="2011-06-30T13:41:07.923" UserId="7946" Text="I don't think there are engines who specifically support this, but in general it's not all that complicated.&#xD;&#xA;&#xD;&#xA;Instead of translating bodies purely linearly, you have to move it according to it's distance from the center of the planet, as well as depending on it's angle between the body-center_of_planet line and your coordinate system's axes." />
  <row Id="32084" PostHistoryTypeId="5" PostId="14318" RevisionGUID="49142b24-29f0-4ad4-b526-cb5f3ba26f4d" CreationDate="2011-06-30T13:52:19.560" UserId="1424" Comment="improved statement" Text="It could have to do with the framerate or it could have to do with the fact that xna does sub pixel rendering" />
  <row Id="32085" PostHistoryTypeId="24" PostId="14318" RevisionGUID="49142b24-29f0-4ad4-b526-cb5f3ba26f4d" CreationDate="2011-06-30T13:52:19.560" Comment="Proposed by 1424 approved by 51 edit id of 525" />
  <row Id="32086" PostHistoryTypeId="2" PostId="14330" RevisionGUID="551c3670-cee9-4b8a-92a0-a8836fc01d1b" CreationDate="2011-06-30T14:01:34.113" UserId="6341" Text="I would very much like to build a game that is known as 'Unblock' or 'Yellow Out'. It is a puzzle game in which the task is to move a car out of a parking space by moving other cars in certain directions.&#xD;&#xA;&#xD;&#xA;These are links where the game can be played:&#xD;&#xA;&#xD;&#xA; - [Yellow Out][1]&#xD;&#xA; - [Unblock][2]&#xD;&#xA;&#xD;&#xA;My questions concerning this game are:&#xD;&#xA;&#xD;&#xA; 1. Is this game actually licensed? I see it's available under two names (perhaps even more). Does this mean the game idea can be used freely?&#xD;&#xA;&#xD;&#xA; 2. Is there an article about it? I have not been able to find it on Wikipedia. I would like to gather some information about the game so as to understand more details of it.&#xD;&#xA;&#xD;&#xA; 3. Is there some database with puzzles available? I can just check the puzzles of existing games, but that's a pain because I have to finish a level to get on to the following one. I was wondering whether there is a general list of puzzles somewhere.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.quickflashgames.com/games/unblock-2/&#xD;&#xA;  [2]: http://www.freeworldgroup.com/games/yellowout/" />
  <row Id="32087" PostHistoryTypeId="1" PostId="14330" RevisionGUID="551c3670-cee9-4b8a-92a0-a8836fc01d1b" CreationDate="2011-06-30T14:01:34.113" UserId="6341" Text="'Unblock' / 'Yellow Out' game questions" />
  <row Id="32088" PostHistoryTypeId="3" PostId="14330" RevisionGUID="551c3670-cee9-4b8a-92a0-a8836fc01d1b" CreationDate="2011-06-30T14:01:34.113" UserId="6341" Text="&lt;databases&gt;&lt;licensing&gt;&lt;puzzle&gt;&lt;articles&gt;" />
  <row Id="32089" PostHistoryTypeId="2" PostId="14331" RevisionGUID="087d02a9-8c66-4d77-b7cd-2c64c96396bc" CreationDate="2011-06-30T14:34:13.417" UserId="1430" Text="&gt; Is this game actually licensed? I see&#xD;&#xA;&gt; it's available under two names&#xD;&#xA;&gt; (perhaps even more). Does this mean&#xD;&#xA;&gt; the game idea can be used freely?&#xD;&#xA;&#xD;&#xA;I am not a lawyer and this is not legal advice; you should consult a lawyer for proper legal advice. That said, the idea itself for the game is unlikely to be protected in any capacity as it is very difficult to do so. What you want to avoid is copying the name, artistic assets, and probably the puzzles, of any other instance of this game that is out there.&#xD;&#xA;&#xD;&#xA;&gt; Is there an article about it? I have&#xD;&#xA;&gt; not been able to find it on Wikipedia.&#xD;&#xA;&gt; I would like to gather some&#xD;&#xA;&gt; information about the game so as to&#xD;&#xA;&gt; understand more details of it.&#xD;&#xA;&#xD;&#xA;I don't think there is a whole lot of complexity behind the type of game. It's a relatively simple block sliding puzzle where the goal is to free some specific block from the play field. You aren't likely to find deep tomes of lore on such a simplistic concept.&#xD;&#xA;&#xD;&#xA;&gt; Is there some database with puzzles&#xD;&#xA;&gt; available? I can just check the&#xD;&#xA;&gt; puzzles of existing games, but that's&#xD;&#xA;&gt; a pain because I have to finish a&#xD;&#xA;&gt; level to get on to the following one.&#xD;&#xA;&gt; I was wondering whether there is a&#xD;&#xA;&gt; general list of puzzles somewhere.&#xD;&#xA;&#xD;&#xA;You could look for solutions or spoiler guides for existing games (for example, all of the solutions for [The Heist][1], an iOS game that has a sliding block puzzle mini-game, [are available online][2]. But I wouldn't recommend that because you'd then be copying their puzzles. &#xD;&#xA;&#xD;&#xA;Instead you should invent your own. Use a different grid and different block sizes to help provide some uniqueness.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tuaw.com/2011/05/24/macheist-releases-the-heist-for-ios/&#xD;&#xA;  [2]: http://heistappwalkthroughs.com/walkthrough-videos/sliding-block-puzzles/" />
  <row Id="32090" PostHistoryTypeId="5" PostId="14303" RevisionGUID="de457225-c6d7-4ffb-b340-9934eaa699f0" CreationDate="2011-06-30T14:38:12.470" UserId="1430" Comment="added 2 characters in body" Text="Doesn't look like it. The project appears dead -- links to it's homepage on Rubyforge go nowhere, and there's only a [few casual mentions of it][1] around the internet (usually with associated chatter about [Rubygame][2] and some naysayers asserting that Ruby isn't suitable for game development -- YMMV).&#xD;&#xA;&#xD;&#xA;I wouldn't recommend using a library in this state. Rubygame looks, at least superficially, like a much more viable product than Railgun.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://oreilly.com/pub/a/ruby/2007/12/18/creating-games-in-ruby-part-2.html?page=3&#xD;&#xA;  [2]: http://rubygame.org/" />
  <row Id="32091" PostHistoryTypeId="2" PostId="14332" RevisionGUID="d2cff976-2647-4f24-a7d0-38ecf768fc48" CreationDate="2011-06-30T14:54:48.367" UserId="20" Text="There's a [nice article][1] over at Gamasutra that explains the physics in Super Mario Galaxy, which is probably what you're looking for.&#xD;&#xA;&#xD;&#xA;Basically they use the inverse surface-normal of the closest polygon underneath the player as gravitational force. If the player moves over to another polygon while in the air, they interpolate the normals to smooth motion and orientation of the player.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3593/games_demystified_super_mario_.php" />
  <row Id="32092" PostHistoryTypeId="2" PostId="14333" RevisionGUID="ebdfbb3d-d770-4b7c-aaf2-f1765df36685" CreationDate="2011-06-30T15:01:06.600" UserId="8339" Text="I'm currently working on A* pathfinding on a grid and I'm looking to smooth the generated path, while also considering the extent of the character moving along it. I'm using a grid for the pathfinding, however character movement is free roaming, not strict tile to tile movement.&#xD;&#xA;&#xD;&#xA;To achieve a smoother, more efficient path, I'm doing line traces on a grid to determine if there is unwalkable tiles between tiles to shave off unecessary corners.&#xD;&#xA;&#xD;&#xA;However, because a line trace is zero extent, it doesn't consider the extent of the character and gives bad results (not returning unwalkable tiles just missed by the line, causing unwanted collisions). &#xD;&#xA;&#xD;&#xA;So what I'm looking for is rather than a line algorithm that determines the tiles under it, I'm looking for one that determines the tiles under a tile-wide extent line.&#xD;&#xA;&#xD;&#xA;[Here is an image to help visualise my problem!][1]&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas? I've been working with Bresenham's line and other alternatives but I haven't yet figured out how to nail this specific problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/F7DPP.png" />
  <row Id="32093" PostHistoryTypeId="1" PostId="14333" RevisionGUID="ebdfbb3d-d770-4b7c-aaf2-f1765df36685" CreationDate="2011-06-30T15:01:06.600" UserId="8339" Text="Tile-wide extent tracing on a grid." />
  <row Id="32094" PostHistoryTypeId="3" PostId="14333" RevisionGUID="ebdfbb3d-d770-4b7c-aaf2-f1765df36685" CreationDate="2011-06-30T15:01:06.600" UserId="8339" Text="&lt;tiles&gt;&lt;path-finding&gt;" />
  <row Id="32095" PostHistoryTypeId="2" PostId="14334" RevisionGUID="2aaf5424-cd12-48c4-81f2-aaed2566b12a" CreationDate="2011-06-30T15:14:13.723" UserId="289" Text="is there any difference between diffuse texture which used in diffuse lighting and ambient occlusion map, or this is the same texture just different naming, because i see it mostly it looked the same?" />
  <row Id="32096" PostHistoryTypeId="1" PostId="14334" RevisionGUID="2aaf5424-cd12-48c4-81f2-aaed2566b12a" CreationDate="2011-06-30T15:14:13.723" UserId="289" Text="the difference between diffuse texture and ambient occlusion texture" />
  <row Id="32097" PostHistoryTypeId="3" PostId="14334" RevisionGUID="2aaf5424-cd12-48c4-81f2-aaed2566b12a" CreationDate="2011-06-30T15:14:13.723" UserId="289" Text="&lt;textures&gt;&lt;lighting&gt;" />
  <row Id="32098" PostHistoryTypeId="2" PostId="14335" RevisionGUID="de357f2c-6c29-4a71-8a6b-1deca40867f9" CreationDate="2011-06-30T15:20:58.963" UserId="5224" Text="How about if you draw a line from every corner of the 'tile' you are on to every corner of the tile you want to go to. You can probably even optimize this to 3 lines instead of four. Wouldn't this correctly detect all the tiles on the path?&#xD;&#xA;&#xD;&#xA;As for smoother paths, check articles about 'steering behaviour' especially those combining it with A* for example these links:&#xD;&#xA;&#xD;&#xA; - http://rocketmandevelopment.com/2010/11/10/a-star-and-pathfollowing-steering-behavior/&#xD;&#xA; - http://www.red3d.com/cwr/steer/" />
  <row Id="32099" PostHistoryTypeId="25" PostId="14328" RevisionGUID="d117ebf1-022e-4c83-9bf0-fdf755bada10" CreationDate="2011-06-30T15:26:01.393" Comment="http://twitter.com/#!/StackGameDev/status/86455453730615296" />
  <row Id="32100" PostHistoryTypeId="2" PostId="14336" RevisionGUID="4d45e107-dbc1-4e86-9b47-a733e0fd403b" CreationDate="2011-06-30T15:29:42.390" UserId="1430" Text="Yes. A &quot;diffuse texture&quot; is generally just a flat, plain color map. It's one of the oldest kinds of texture map still in widespread use today. An ambient occlusion texture map takes into account local effects of light sources (and is usually just comprised of magnitudes, not actual colors).&#xD;&#xA;&#xD;&#xA;The [Wikipedia page on AO][1] has an image that illustrates the difference visually.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Ambient_occlusion" />
  <row Id="32101" PostHistoryTypeId="2" PostId="14337" RevisionGUID="5a2d0aa8-b2fc-4625-a972-a154911f9063" CreationDate="2011-06-30T15:30:12.903" UserId="5224" Text="The [diffuse texture][1] is the colour of the object without light effects. The [ambient occlusion][2] texture is a map that shows the shadows on an object if it was evenly lid from all sides (basically it tells us how much a factor ambient light should be on each position). You can also do ambient occlusion real-time, but that's more expensive.&#xD;&#xA;&#xD;&#xA;Sometimes the diffuse texture and ambient texture are combined in one texture. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://wiki.splashdamage.com/index.php/Basic_Texture_Overview&#xD;&#xA;  [2]: http://download.autodesk.com/us/maya/2010help/mr/shaders/occlusion.html" />
  <row Id="32102" PostHistoryTypeId="2" PostId="14338" RevisionGUID="388654a6-5eaa-4b85-aa93-c76dcb5d5582" CreationDate="2011-06-30T16:43:11.857" UserId="1358" Text="[Here's an old tutorial](http://www.opengl.org/resources/code/samples/mjktips/StenciledHaloEffect.html) (for OpenGL 1.1 so you should have no trouble getting it to run on all the systems you mention) showing this effect.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/84Y3t.gif" />
  <row Id="32103" PostHistoryTypeId="2" PostId="14339" RevisionGUID="7d5d3afd-0bad-4e7c-8be1-bcfdc01d36c0" CreationDate="2011-06-30T16:56:51.897" UserId="8340" Text="This is really, really wide-open.  There are tons of ways to do it, including the ones you mentioned.&#xD;&#xA;&#xD;&#xA;Personally, I would go with an FSM where each actor makes a decision, and then works towards that decision until it's done, impossible, or they are forced to change their mind for some reason.  (Emergencies, etc.)  &#xD;&#xA;&#xD;&#xA;To add some more dynamic occurances, I'd give the actors needs and wants, and have them pick their next action based on those needs and wants, nearly sources to fulfill them, and a tiny bit of randomness.  &#xD;&#xA;&#xD;&#xA;Wants can even include peer pressure, which would have friends and families flock in a group instead of separating, and possibly make them consider the needs of others in the flock.&#xD;&#xA;&#xD;&#xA;Some decisions (pathing) need to be handled constantly, but most can be handled when the scenario changes." />
  <row Id="32107" PostHistoryTypeId="5" PostId="14330" RevisionGUID="4219c2e9-5012-4a8e-8b5b-ff9b83c7f54f" CreationDate="2011-06-30T17:21:51.087" UserId="6341" Comment="edited body" Text="I would very much like to build a game that is known as 'Unblock' or 'Yellow Out'. It is a puzzle game in which the task is to move a car out of a parking space by moving other cars in certain directions.&#xD;&#xA;&#xD;&#xA;These are links where the game can be played:&#xD;&#xA;&#xD;&#xA; - [Yellow Out][2]&#xD;&#xA; - [Unblock][1]&#xD;&#xA;&#xD;&#xA;My questions concerning this game are:&#xD;&#xA;&#xD;&#xA; 1. Is this game actually licensed? I see it's available under two names (perhaps even more). Does this mean the game idea can be used freely?&#xD;&#xA;&#xD;&#xA; 2. Is there an article about it? I have not been able to find it on Wikipedia. I would like to gather some information about the game so as to understand more details of it.&#xD;&#xA;&#xD;&#xA; 3. Is there some database with puzzles available? I can just check the puzzles of existing games, but that's a pain because I have to finish a level to get on to the following one. I was wondering whether there is a general list of puzzles somewhere.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.quickflashgames.com/games/unblock-2/&#xD;&#xA;  [2]: http://www.freeworldgroup.com/games/yellowout/" />
  <row Id="32108" PostHistoryTypeId="2" PostId="14341" RevisionGUID="f032c0e1-ba92-4ec8-9561-71da45b6ac0b" CreationDate="2011-06-30T17:35:00.753" UserId="1358" Text="The [Visitor Pattern](http://en.wikipedia.org/wiki/Visitor_pattern) can be useful here.&#xD;&#xA;&#xD;&#xA;What you can do is have a Renderer interface that knows how to draw each object and a &quot;draw yourself&quot; method in each actor that determines which (specific) renderer method to call, e.g.&#xD;&#xA;&#xD;&#xA;    interface Renderer {&#xD;&#xA;        void drawPaddle(Player owner, Rectangle position);&#xD;&#xA;        // Note: the Renderer chooses the Color based on which player the paddle belongs to&#xD;&#xA;&#xD;&#xA;        // Also drawBackground, drawBall etc.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    interface Actor {&#xD;&#xA;        void draw(Renderer renderer);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Paddle implements Actor {&#xD;&#xA;        void draw(Renderer renderer) {&#xD;&#xA;            renderer.drawPaddle(this.owner, this.getBounds());&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This way it is still easy to port to another graphics library or framework (I once ported a game from Swing/Java2D to LWJGL and was very glad I had used this pattern instead of passing a `Graphics2D` around.)&#xD;&#xA;&#xD;&#xA;There is another advantage: The renderer can be tested separately from any actor code" />
  <row Id="32109" PostHistoryTypeId="2" PostId="14342" RevisionGUID="2c0bd622-8060-4c36-8191-7e34b1058d25" CreationDate="2011-06-30T17:43:07.793" UserId="3327" Text="I'm not a lawyer so take my legal advice with that in mind, but I did make a version of this game. It's an Android game called Obstruction and I used it as a project to teach myself programming. I did not seek out any kind of licensing because, with so many clones available, it seemed that this wasn't an issue. I realized the puzzle doesn't have to use the usual 6x6 grid, so I made levels that are a little more abstract. Any shape works as long as it's made with right angles and the puzzle is solvable. I hand drew the designs for the 100 levels in my game, so I, personally, would recommend doing the same as opposed to copying other puzzles. Also, Obstruction has 7 different themes, none of which have anything to do with cars. The cars concept is what the very first game of this kind, Rush Hour, used and it's very over done. So my advice is don't worry about being the same, but try to be different." />
  <row Id="32110" PostHistoryTypeId="2" PostId="14343" RevisionGUID="c92d4140-da2b-4410-b11f-22748de9def7" CreationDate="2011-06-30T18:23:28.770" UserId="999" Text="2) You must provide vertices using glVertexAttribPointer(). You can store vertices in system memory or in VBO." />
  <row Id="32112" PostHistoryTypeId="2" PostId="14344" RevisionGUID="9cbf0d4d-2f0c-48d7-9515-cce62ab1e6c5" CreationDate="2011-06-30T18:46:05.553" UserId="4496" Text="One thing you could do is have each individual node handle itself.  Make a pass over it when after generation but before displaying and give each river square a list of entrances (lower number, same river) and exits (higher number, same river).  &#xD;&#xA;&#xD;&#xA;From this data you should be able to figure out where the entrance(s) and exit(s) are (storing relative location would probably help) and you can from there render that square's river based on the connections.  The simplest way to do a branch is to connect the entrances/exits to the center of the square.  &#xD;&#xA;&#xD;&#xA;The graphical representation of this could be taken many different ways, and you haven't given enough information about it's use for me to recommend one directly; so instead I will just mention *a* way involving a particleish system where each segment of water flows dynamically &quot;downhill&quot;.  &#xD;&#xA;&#xD;&#xA;Have the root square start some number of &quot;water pieces&quot; at each of it's entrances and have them randomly decide from the available exits at creation.  When it hits the exit, spawn one at the tile it hit's entrance and return the water piece to the start of it's square.  Since it has already spawned into the next square (only do this once per piece in a square), and you already know the settings and calculations (don't re-randomize), you can let this piece loop in it's square with very little calculation, and if you wanted, likely using a shader. &#xD;&#xA;&#xD;&#xA;This has the advantage of also letting your rivers go to smaller rivers after branches, and the two resulting rivers do not have to be the same size.  It will take a moment for the river to populate fully from the top to the bottom, but the resulting effect should be rather pleasant as you could end up with something like this simply based on which nodes have rivers.&#xD;&#xA;&#xD;&#xA;    10--10--6--6--2--2&#xD;&#xA;        |      |     &#xD;&#xA;        4--4   4&#xD;&#xA;           |   |&#xD;&#xA;           4---6--6--6&#xD;&#xA;           |  &#xD;&#xA;           2&#xD;&#xA;It would also, depending on seed and code, have the potential to look different each time you ran it, even if the node placement was the same.&#xD;&#xA;&#xD;&#xA;Hope this example is somewhere along the lines you are looking for." />
  <row Id="32113" PostHistoryTypeId="2" PostId="14345" RevisionGUID="90c5b05d-b602-497f-9e14-ff3654448b23" CreationDate="2011-06-30T19:04:34.773" UserId="8348" Text="I just had a quick look at the new Crysis 2 DX11 update, and was quite surprised by some of the new features, especially the real time reflections on moving models. From what I could gather, there are no parallax errors, so it really does seem like there is some sort of raytracing involved. &#xD;&#xA;&#xD;&#xA;Does anyone know what technique the are using to generate the lovely reflections?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="32114" PostHistoryTypeId="1" PostId="14345" RevisionGUID="90c5b05d-b602-497f-9e14-ff3654448b23" CreationDate="2011-06-30T19:04:34.773" UserId="8348" Text="Real time reflections" />
  <row Id="32115" PostHistoryTypeId="3" PostId="14345" RevisionGUID="90c5b05d-b602-497f-9e14-ff3654448b23" CreationDate="2011-06-30T19:04:34.773" UserId="8348" Text="&lt;graphics&gt;&lt;directx&gt;&lt;shaders&gt;" />
  <row Id="32121" PostHistoryTypeId="2" PostId="14347" RevisionGUID="4af0d9cb-be13-4efa-9975-1aa582451188" CreationDate="2011-06-30T19:42:27.230" UserId="8050" Text="There are a lot of ways to compute distances, every dot product can be used: a looot of ways. &#xD;&#xA;&#xD;&#xA;In your case you surely want to compute the distance between the center of the tiles. I take for granted that you know how to compute the center of a tile. &#xD;&#xA;&#xD;&#xA;Once you know the position, you can use the Euclidean distance in the canvas' coordinate space (i.e. &amp;radic;[(x'-x&quot;)&amp;sup2;+(y'-y&quot;)&amp;sup2;]) or the same in tile's coordinate system.&#xD;&#xA;&#xD;&#xA;Another option is the Manhattan or taxicab distance: d = |x'-x&quot;|+|y'+y&quot;|; even in this case you can use tile's coordinate or canvas' coordinate.&#xD;&#xA;&#xD;&#xA;The last option (after L2 and L1 norm) the L&quot;infinite&quot; norm where d is the max between |x'-x&quot;| and |y'-y&quot;|. &#xD;&#xA;&#xD;&#xA;**Lets see the differences:**&#xD;&#xA;&#xD;&#xA;The best way to evaluate this norms is to see the shape of a disc.&#xD;&#xA;&#xD;&#xA;Given a center, a disc is every point that falls within a fixed distance (however computed).&#xD;&#xA;&#xD;&#xA;***Euclidean Norm:***&#xD;&#xA;&#xD;&#xA; The disc is a standard circle in the canvas space and an ellipse in tile space&#xD;&#xA;&#xD;&#xA;![L2 canvas][1]&#xD;&#xA;&#xD;&#xA;*Euclidean Canvas*&#xD;&#xA;&#xD;&#xA;![L2 tile][2]&#xD;&#xA;&#xD;&#xA;*Euclidean Tile*&#xD;&#xA;&#xD;&#xA;While the first one is easier to compute in general (you don't have to go back and forth tile and canvas coords), the second gives a better fill. &#xD;&#xA;&#xD;&#xA;The **&quot;Euclidean Tile&quot;** is the norm that is generally considered **the most correct one**. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;***Taxicab Norm:***&#xD;&#xA;&#xD;&#xA;The disc becomes a diamond in canvas coordinate and a sort of rectangle in the tile coordinate (showing how applying the same coordinate changes two times rawly gives the initial result)&#xD;&#xA;&#xD;&#xA;![L1 canvas][3]&#xD;&#xA;&#xD;&#xA;*Taxicab Canvas*&#xD;&#xA;&#xD;&#xA;![L1 tile][4]&#xD;&#xA;&#xD;&#xA;*Taxicab Tile*&#xD;&#xA;&#xD;&#xA;We can see even this time how the canvas coordinate gives the worst results: this is the price for an easier way to compute distances.&#xD;&#xA;&#xD;&#xA;The &quot;Taxicab Tile&quot; gives a reasonable results, quite similar to the &quot;Euclidean Tile&quot;, but simply summing the tile coordinate. This is a very popular norm for this kind of problems&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;***L0 Norm:***&#xD;&#xA;&#xD;&#xA;Using the max if axial distances, the disc becomes a rectangle and the equivalent diamond in canvas and tile space respectively&#xD;&#xA;&#xD;&#xA;![L0 canvas][5]&#xD;&#xA;&#xD;&#xA;*L0 Canvas*&#xD;&#xA; &#xD;&#xA;![L0 tile][6]&#xD;&#xA; &#xD;&#xA;*L0 Tile*&#xD;&#xA;&#xD;&#xA;Ok, let's face it: the L0 canvas is horrible.&#xD;&#xA;&#xD;&#xA;On the other hand the &quot;L0 Tile&quot; make it sense: it is quite clean and *very* easy to compute. Can be taken into account when playing with slow device and we need to use every clock cycle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**Conclusions**&#xD;&#xA;&#xD;&#xA;The norms computed on canvas coordinates gives the worst results: the two coordinate systems does not match very well so the price to have a easier norm is simply too high.&#xD;&#xA;&#xD;&#xA;The Euclidean norm is the better choice but the slower one; The Taxycab norm offer a very good trade off.&#xD;&#xA;&#xD;&#xA;The &quot;L0&quot; is the fastest and easier but the price is to have a distance that is a little unrealistic.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/LsBV1.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/YLtxu.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/Tv7UO.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/kDTwI.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/1EtjT.png&#xD;&#xA;  [6]: http://i.stack.imgur.com/8Ziiy.png" />
  <row Id="32123" PostHistoryTypeId="5" PostId="14333" RevisionGUID="c4b1003b-57a7-4b4e-80c2-b4ff0d9621c8" CreationDate="2011-06-30T20:08:16.173" UserId="7191" Comment="Put image inline" Text="I'm currently working on A* pathfinding on a grid and I'm looking to smooth the generated path, while also considering the extent of the character moving along it. I'm using a grid for the pathfinding, however character movement is free roaming, not strict tile to tile movement.&#xD;&#xA;&#xD;&#xA;To achieve a smoother, more efficient path, I'm doing line traces on a grid to determine if there is unwalkable tiles between tiles to shave off unecessary corners.&#xD;&#xA;&#xD;&#xA;However, because a line trace is zero extent, it doesn't consider the extent of the character and gives bad results (not returning unwalkable tiles just missed by the line, causing unwanted collisions). &#xD;&#xA;&#xD;&#xA;So what I'm looking for is rather than a line algorithm that determines the tiles under it, I'm looking for one that determines the tiles under a tile-wide extent line.&#xD;&#xA;Here is an image to help visualize my problem!&#xD;&#xA;&#xD;&#xA;![Here is an image to help visualize my problem][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas? I've been working with Bresenham's line and other alternatives but I haven't yet figured out how to nail this specific problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/r3DMJ.png" />
  <row Id="32124" PostHistoryTypeId="24" PostId="14333" RevisionGUID="c4b1003b-57a7-4b4e-80c2-b4ff0d9621c8" CreationDate="2011-06-30T20:08:16.173" Comment="Proposed by 7191 approved by 14 edit id of 527" />
  <row Id="32125" PostHistoryTypeId="6" PostId="14306" RevisionGUID="449feac9-1c37-468d-a979-ce5aec222629" CreationDate="2011-06-30T20:09:13.847" UserId="1156" Comment="edited tags" Text="&lt;actionscript-3&gt;&lt;tiles&gt;&lt;isometric&gt;" />
  <row Id="32126" PostHistoryTypeId="2" PostId="14348" RevisionGUID="a5912baa-d877-460b-84d3-4a132a150e17" CreationDate="2011-06-30T20:58:16.227" UserId="1101" Text="&gt; I was wondering how do people actually develop proper damage formulas that scale correctly?&#xD;&#xA;&#xD;&#xA;The first 2 things are:&#xD;&#xA;&#xD;&#xA;  * decide what you mean by 'correctly' - what is your idea of 'correct damage'?&#xD;&#xA;  * decide what you mean by 'scale' - what values are going to change, and what effect do you want those changes to have?&#xD;&#xA;&#xD;&#xA;Once you know that, you have enough information to use the mathematical formulas that  BlueRaja mentioned in [his answer][1]. Just remember there is no such thing as a 'proper' damage formula - just one that matches your design for the type of experience you want your players to have.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14309/how-to-develop-rpg-damage-formulas/14314#14314" />
  <row Id="32127" PostHistoryTypeId="25" PostId="14345" RevisionGUID="a70b4e2d-7b0f-4a8c-9616-8d046f0b669d" CreationDate="2011-06-30T21:26:03.653" Comment="http://twitter.com/#!/StackGameDev/status/86546059433746432" />
  <row Id="32128" PostHistoryTypeId="2" PostId="14349" RevisionGUID="040b3c8b-cb03-4057-8d66-3095817627c7" CreationDate="2011-06-30T22:40:35.477" UserId="2063" Text="I think you make the mistake that you want to create a formula without having a proper design in mind.&#xD;&#xA;&#xD;&#xA;First start with a design, then start thinking about representing the design in formulas.&#xD;&#xA;The clearer your design the easier it should be to find simple and/or precise formulas.&#xD;&#xA;&#xD;&#xA;Try to implement &quot;types&quot; of enemies, e.g. &quot;armored&quot; =&gt; a player attack if it is of type physical is reduced by 50%.&#xD;&#xA;Do not make a battle flow to abstract, think about what is relevant and what is not.&#xD;&#xA;&#xD;&#xA;If your design says &quot;armored enemies&quot; are weak against magic but strong against physical damage, represent that in code.&#xD;&#xA;But remember that you have do a lot of testing, because the values won't work magically the first time you write the code.&#xD;&#xA;Try to create a design, put the logic into code, always check whether this the technical representation of what you had in mind and if it isn't change the values until it is.&#xD;&#xA;" />
  <row Id="32129" PostHistoryTypeId="25" PostId="14330" RevisionGUID="14747407-8476-452d-b6d6-df36784f9221" CreationDate="2011-07-01T00:26:05.083" Comment="http://twitter.com/#!/StackGameDev/status/86591363285659648" />
  <row Id="32130" PostHistoryTypeId="2" PostId="14350" RevisionGUID="b6db85eb-3d7c-4863-8d84-63118740896a" CreationDate="2011-07-01T00:39:08.783" UserId="1173" Text="I was thinking about effects in games the other day and I was reminded of the Gasmask effect from Metro 2033. Once you put the gasmask on it blurred a bit in the corners and could ice up and even get cracked.&#xD;&#xA;&#xD;&#xA;I assume that something like that is done using a shader. I have been experimenting a bit with game development, so far mostly playing with existing rendering engines and adding physics support etc.&#xD;&#xA;&#xD;&#xA;I would like to learn more about this sort of effect. Can someone give me a simple example of a shader that would alter the entire scene like this. For example a &quot;night vision&quot; shader." />
  <row Id="32131" PostHistoryTypeId="1" PostId="14350" RevisionGUID="b6db85eb-3d7c-4863-8d84-63118740896a" CreationDate="2011-07-01T00:39:08.783" UserId="1173" Text="Shader effect similar to Metro 2033 gasmask" />
  <row Id="32132" PostHistoryTypeId="3" PostId="14350" RevisionGUID="b6db85eb-3d7c-4863-8d84-63118740896a" CreationDate="2011-07-01T00:39:08.783" UserId="1173" Text="&lt;shaders&gt;&lt;graphic-effects&gt;&lt;post-processing&gt;" />
  <row Id="32133" PostHistoryTypeId="2" PostId="14351" RevisionGUID="7dfed136-01ed-4fde-bcc2-60a5365961d3" CreationDate="2011-07-01T00:46:04.830" UserId="7432" Text="Hi I am making a game for android. I am having trouble with collision detection part of the game. I am using touch events to fire the gun as you will see in the video . When ever the user touches (represented by clicks in the video)the bullet appears and kills random sprites. As you can see it never touches the sprites it kills or kill the sprites it does touch. &#xD;&#xA;&#xD;&#xA;Collision Code snippet:&lt;br&gt;&#xD;&#xA;//Handles Collision&#xD;&#xA;		private void CheckCollisions(){		&#xD;&#xA;			synchronized(mSurfaceHolder){&#xD;&#xA;				for (int i = sprites.size() - 1; i &gt;= 0; i--){&#xD;&#xA;						Sprite sprite = sprites.get(i);&#xD;&#xA;						if(sprite.isCollision(bullet)){&#xD;&#xA;							sprites.remove(sprite);&#xD;&#xA;							mScore++;&#xD;&#xA;							if(sprites.size() == 0){&#xD;&#xA;								mLevel = mLevel +1;&#xD;&#xA;								currentLevel++;&#xD;&#xA;								initLevel();							&#xD;&#xA;							}&#xD;&#xA;							break;&#xD;&#xA;						}			&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sprite Class Code Snippet &lt;br&gt;&#xD;&#xA;//bounding box left&lt;right and top&gt;bottom&#xD;&#xA;	       int left ;&#xD;&#xA;	       int right ;&#xD;&#xA;	       int top ;&#xD;&#xA;	       int bottom ;&#xD;&#xA;		public boolean isCollision(Beam other) {&#xD;&#xA;			// TODO Auto-generated method stub	&#xD;&#xA;			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;&#xD;&#xA;			return true;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Side Note:&#xD;&#xA;The Icon image represents the bullet and yes I know the graphics are crappy but I am now concerned with them at all right now. I am more concerned about getting the codding right first.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;[Game Play][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/j1Nae.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/5FXVa.png&#xD;&#xA;  [3]: http://megaswf.com/serve/1140586" />
  <row Id="32134" PostHistoryTypeId="1" PostId="14351" RevisionGUID="7dfed136-01ed-4fde-bcc2-60a5365961d3" CreationDate="2011-07-01T00:46:04.830" UserId="7432" Text="Collision Error" />
  <row Id="32135" PostHistoryTypeId="3" PostId="14351" RevisionGUID="7dfed136-01ed-4fde-bcc2-60a5365961d3" CreationDate="2011-07-01T00:46:04.830" UserId="7432" Text="&lt;java&gt;&lt;collision-detection&gt;&lt;android&gt;" />
  <row Id="32136" PostHistoryTypeId="5" PostId="14351" RevisionGUID="6ab81477-f567-439e-b56a-e082b5b5e907" CreationDate="2011-07-01T00:52:32.897" UserId="7432" Comment="added 146 characters in body" Text="Hi I am making a game for android. I am having trouble with collision detection part of the game. I am using touch events to fire the gun as you will see in the video . When ever the user touches (represented by clicks in the video)the bullet appears and kills random sprites. As you can see it never touches the sprites it kills or kill the sprites it does touch. &lt;br&gt;&#xD;&#xA;My Question is how do I fix it, so that the sprite dies when the bullet hits it.&lt;br&gt;&#xD;&#xA;Any help is greatly appreciated and Thanks in advance.&#xD;&#xA;&#xD;&#xA;Collision Code snippet:&lt;br&gt;&#xD;&#xA;//Handles Collision&#xD;&#xA;		private void CheckCollisions(){		&#xD;&#xA;			synchronized(mSurfaceHolder){&#xD;&#xA;				for (int i = sprites.size() - 1; i &gt;= 0; i--){&#xD;&#xA;						Sprite sprite = sprites.get(i);&#xD;&#xA;						if(sprite.isCollision(bullet)){&#xD;&#xA;							sprites.remove(sprite);&#xD;&#xA;							mScore++;&#xD;&#xA;							if(sprites.size() == 0){&#xD;&#xA;								mLevel = mLevel +1;&#xD;&#xA;								currentLevel++;&#xD;&#xA;								initLevel();							&#xD;&#xA;							}&#xD;&#xA;							break;&#xD;&#xA;						}			&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sprite Class Code Snippet &lt;br&gt;&#xD;&#xA;//bounding box left&lt;right and top&gt;bottom&#xD;&#xA;	       int left ;&#xD;&#xA;	       int right ;&#xD;&#xA;	       int top ;&#xD;&#xA;	       int bottom ;&#xD;&#xA;		public boolean isCollision(Beam other) {&#xD;&#xA;			// TODO Auto-generated method stub	&#xD;&#xA;			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;&#xD;&#xA;			return true;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Side Note:&#xD;&#xA;The Icon image represents the bullet and yes I know the graphics are crappy but I am now concerned with them at all right now. I am more concerned about getting the codding right first.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;[Game Play][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/j1Nae.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/5FXVa.png&#xD;&#xA;  [3]: http://megaswf.com/serve/1140586" />
  <row Id="32137" PostHistoryTypeId="5" PostId="14351" RevisionGUID="0035cf9d-a892-4980-9f44-b59103c9f078" CreationDate="2011-07-01T01:49:29.653" UserId="7728" Comment="Fixed code formatting." Text="Hi I am making a game for android. I am having trouble with collision detection part of the game. I am using touch events to fire the gun as you will see in the video . When ever the user touches (represented by clicks in the video)the bullet appears and kills random sprites. As you can see it never touches the sprites it kills or kill the sprites it does touch. &lt;br&gt;&#xD;&#xA;My Question is how do I fix it, so that the sprite dies when the bullet hits it.&lt;br&gt;&#xD;&#xA;Any help is greatly appreciated and Thanks in advance.&#xD;&#xA;&#xD;&#xA;Collision Code snippet:&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    //Handles Collision&#xD;&#xA;    		private void CheckCollisions(){		&#xD;&#xA;    			synchronized(mSurfaceHolder){&#xD;&#xA;    				for (int i = sprites.size() - 1; i &gt;= 0; i--){&#xD;&#xA;    						Sprite sprite = sprites.get(i);&#xD;&#xA;    						if(sprite.isCollision(bullet)){&#xD;&#xA;    							sprites.remove(sprite);&#xD;&#xA;    							mScore++;&#xD;&#xA;    							if(sprites.size() == 0){&#xD;&#xA;    								mLevel = mLevel +1;&#xD;&#xA;    								currentLevel++;&#xD;&#xA;    								initLevel();							&#xD;&#xA;    							}&#xD;&#xA;    							break;&#xD;&#xA;    						}			&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    Sprite Class Code Snippet &lt;br&gt;&#xD;&#xA;    //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;    	       int left ;&#xD;&#xA;    	       int right ;&#xD;&#xA;    	       int top ;&#xD;&#xA;    	       int bottom ;&#xD;&#xA;    		public boolean isCollision(Beam other) {&#xD;&#xA;    			// TODO Auto-generated method stub	&#xD;&#xA;    			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;    		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;    &#xD;&#xA;    			return true;&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Side Note:&#xD;&#xA;The Icon image represents the bullet and yes I know the graphics are crappy but I am now concerned with them at all right now. I am more concerned about getting the codding right first.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;[Game Play][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/j1Nae.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/5FXVa.png&#xD;&#xA;  [3]: http://megaswf.com/serve/1140586&#xD;&#xA;" />
  <row Id="32138" PostHistoryTypeId="24" PostId="14351" RevisionGUID="0035cf9d-a892-4980-9f44-b59103c9f078" CreationDate="2011-07-01T01:49:29.653" Comment="Proposed by 7728 approved by -1 edit id of 528" />
  <row Id="32139" PostHistoryTypeId="5" PostId="14351" RevisionGUID="77879443-8575-42f1-b46b-f3ddd3f0c637" CreationDate="2011-07-01T01:49:29.980" UserId="962" Comment="Fixed code formatting. Removed random links that were attached to nothing, fixed the rest of the formating, removed gratitudes and greeting" Text="I am having trouble with collision detection part of the game. &#xD;&#xA;&#xD;&#xA;I am using touch events to fire the gun as you will see in the [video][3]. Note, the android icon is a temporary graphic for the bullets&#xD;&#xA;&#xD;&#xA;When ever the user touches (represented by clicks in the video)the bullet appears and kills random sprites. &#xD;&#xA;&#xD;&#xA;As you can see it never touches the sprites it kills or kill the sprites it does touch.&#xD;&#xA;&#xD;&#xA;My Question is How do I fix it, so that the sprite dies when the bullet hits it?&#xD;&#xA;&#xD;&#xA;Collision Code snippet:&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    //Handles Collision&#xD;&#xA;    		private void CheckCollisions(){		&#xD;&#xA;    			synchronized(mSurfaceHolder){&#xD;&#xA;    				for (int i = sprites.size() - 1; i &gt;= 0; i--){&#xD;&#xA;    						Sprite sprite = sprites.get(i);&#xD;&#xA;    						if(sprite.isCollision(bullet)){&#xD;&#xA;    							sprites.remove(sprite);&#xD;&#xA;    							mScore++;&#xD;&#xA;    							if(sprites.size() == 0){&#xD;&#xA;    								mLevel = mLevel +1;&#xD;&#xA;    								currentLevel++;&#xD;&#xA;    								initLevel();							&#xD;&#xA;    							}&#xD;&#xA;    							break;&#xD;&#xA;    						}			&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    Sprite Class Code Snippet&#xD;&#xA;    //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;    	       int left ;&#xD;&#xA;    	       int right ;&#xD;&#xA;    	       int top ;&#xD;&#xA;    	       int bottom ;&#xD;&#xA;    		public boolean isCollision(Beam other) {&#xD;&#xA;    			// TODO Auto-generated method stub	&#xD;&#xA;    			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;    		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;    &#xD;&#xA;    			return true;&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;  [3]: http://megaswf.com/serve/1140586&#xD;&#xA;" />
  <row Id="32141" PostHistoryTypeId="2" PostId="14353" RevisionGUID="c50010f2-226a-46cf-a6d5-9356db89d3ea" CreationDate="2011-07-01T02:00:32.457" UserId="962" Text="This part of your code does not make logical sense for working collision detection.&#xD;&#xA;&#xD;&#xA;    if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;&#xD;&#xA;change it to&#xD;&#xA;&#xD;&#xA;    if(this.left &gt; other.right) return false;&#xD;&#xA;    if(this.right &lt; other.left) return false;&#xD;&#xA;    if(this.top &gt; other.bottom) return false;&#xD;&#xA;    if(this.bottom &lt; other.top) return false;&#xD;&#xA;&#xD;&#xA;This should work assuming the left, right, top and bottom variables are correct at the time of the collision test." />
  <row Id="32142" PostHistoryTypeId="2" PostId="14354" RevisionGUID="b604b872-4ab3-446c-8d16-aa99496ab64a" CreationDate="2011-07-01T02:41:17.197" UserId="8353" Text="AttackingHobo had the right idea.  you can write the same thing, though, as:&#xD;&#xA;&#xD;&#xA;	if(this.left&gt;other.right || this.left&lt;other.right)return false;&#xD;&#xA;	if(this.bottom&gt;other.top || this.bottom&lt;other.top)return false;&#xD;&#xA;(note the change from `other` to `this`)&#xD;&#xA;&#xD;&#xA;However, this might cause a lack of collisions.  This is saying if the position of the bullet image is EXACTALLY the same as the enemy, it will hit.  You probobly want some range (based on the size of the enemy and bullet).  Try something like this:&#xD;&#xA;&#xD;&#xA;	final int distance = 10; //set to the number of pixel distance you want the max to be for the collision to occur&#xD;&#xA;	if (Math.abs(this.left-other.left) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.right-other.right) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.up-other.up) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.down-other.down) &gt; distance) return false;&#xD;&#xA;	&#xD;&#xA;	return true;&#xD;&#xA;&#xD;&#xA;Try that and see how it works.  You may need to play with how big `distance` is, so I separated it from the rest of the code.  I hope this helps.  " />
  <row Id="32143" PostHistoryTypeId="5" PostId="14354" RevisionGUID="5430181f-bb2e-4f20-b465-bfe297db41ea" CreationDate="2011-07-01T02:48:26.443" UserId="8353" Comment="EDIT:..." Text="AttackingHobo had the right idea.  you can write the same thing, though, as:&#xD;&#xA;&#xD;&#xA;	if(this.left&gt;other.right || this.left&lt;other.right)return false;&#xD;&#xA;	if(this.bottom&gt;other.top || this.bottom&lt;other.top)return false;&#xD;&#xA;(note the change from `other` to `this`)&#xD;&#xA;&#xD;&#xA;However, this might cause a lack of collisions.  This is saying if the position of the bullet image is EXACTALLY the same as the enemy, it will hit.  You probobly want some range (based on the size of the enemy and bullet).  Try something like this:&#xD;&#xA;&#xD;&#xA;	final int distance = 10; //set to the number of pixel distance you want the max to be for the collision to occur&#xD;&#xA;	if (Math.abs(this.left-other.left) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.right-other.right) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.up-other.up) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.down-other.down) &gt; distance) return false;&#xD;&#xA;	&#xD;&#xA;	return true;&#xD;&#xA;&#xD;&#xA;Try that and see how it works.  You may need to play with how big `distance` is, so I separated it from the rest of the code.  I hope this helps.  &#xD;&#xA;&#xD;&#xA;EDIT: Nevermind.  I misread the post and misinterpreted what the variables `left` `down` `right` and `up` meant.  The second block of code will probably confuse thing even more :P.  " />
  <row Id="32144" PostHistoryTypeId="2" PostId="14355" RevisionGUID="94041272-c24f-43b8-ada5-7eb4940b9c21" CreationDate="2011-07-01T02:52:59.210" UserId="2525" Text="I am referring to this [fireball][1] game.&#xD;&#xA;&#xD;&#xA;The ball will collide with background, which is in polygon form.&#xD;&#xA;&#xD;&#xA;I was wondering, how I can match my polygon data structure with the background image. Say, I had requested artist to draw me a polygon background. Then, how I can generate a polygon data structure to describe the polygon background image?&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://market.android.com/details?id=com.ielfgame.fireBall&#xD;&#xA;  [2]: http://i.stack.imgur.com/9N8np.jpg" />
  <row Id="32145" PostHistoryTypeId="1" PostId="14355" RevisionGUID="94041272-c24f-43b8-ada5-7eb4940b9c21" CreationDate="2011-07-01T02:52:59.210" UserId="2525" Text="How can we match polygon data structure with a background image" />
  <row Id="32146" PostHistoryTypeId="3" PostId="14355" RevisionGUID="94041272-c24f-43b8-ada5-7eb4940b9c21" CreationDate="2011-07-01T02:52:59.210" UserId="2525" Text="&lt;collision-detection&gt;&lt;android&gt;&lt;polygon&gt;" />
  <row Id="32147" PostHistoryTypeId="2" PostId="14356" RevisionGUID="94ff820a-5bb7-4baf-985a-3ef0151da986" CreationDate="2011-07-01T03:15:35.020" UserId="8355" Text="If you just wanted simple wrap around, and didn't care about viewing the actual curving of the earth during game play you could simply:&#xD;&#xA;&#xD;&#xA;Loop the game world like a planet (this may requires some fancy radial math for the position)&#xD;&#xA;&#xD;&#xA;And for the map use a planet model." />
  <row Id="32148" PostHistoryTypeId="2" PostId="14357" RevisionGUID="28b62bf4-fa0b-4599-bebe-8b6cbe92fe67" CreationDate="2011-07-01T03:20:30.563" UserId="8353" Text="In the 3d fps in java I'm working on, I need a bullet to be fired and to tell if it hit someone.  All visual objects in the game are defined through OpenGL, so the object it can be colliding with can be any drawable polygon (although they will most likely be triangles and rectangles anyways).  The bullet is not an object, but will be treated as a vector that instantaneously moves all the way across the map (like the snipper riffle in Halo).  What's the best way to detect/test collisions with the polygon and the vector.  I have access to OpenCL, however I have absolutely no experience with it.  I am very early in the developmental stage, so if you think there's a better way of going about this, feel free to tell me (I barley have a player model to collide with anyways, so I'm flexible with it).  &#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="32149" PostHistoryTypeId="1" PostId="14357" RevisionGUID="28b62bf4-fa0b-4599-bebe-8b6cbe92fe67" CreationDate="2011-07-01T03:20:30.563" UserId="8353" Text="vector collision on polygon in 3d space detection/testing?" />
  <row Id="32150" PostHistoryTypeId="3" PostId="14357" RevisionGUID="28b62bf4-fa0b-4599-bebe-8b6cbe92fe67" CreationDate="2011-07-01T03:20:30.563" UserId="8353" Text="&lt;java&gt;&lt;first-person-shooter&gt;&lt;lwjgl&gt;" />
  <row Id="32151" PostHistoryTypeId="25" PostId="14351" RevisionGUID="f8f83d15-f1c1-47b8-b5c0-bd68a47b782e" CreationDate="2011-07-01T03:26:06.297" Comment="http://twitter.com/#!/StackGameDev/status/86636666999148544" />
  <row Id="32152" PostHistoryTypeId="5" PostId="14354" RevisionGUID="f37d9413-3855-4840-9780-74ccc6c02fcd" CreationDate="2011-07-01T03:34:19.930" UserId="8353" Comment="added 304 characters in body" Text="AttackingHobo had the right idea.  you can write the same thing, though, as:&#xD;&#xA;&#xD;&#xA;	if(this.left&gt;other.right || this.left&lt;other.right)return false;&#xD;&#xA;	if(this.bottom&gt;other.top || this.bottom&lt;other.top)return false;&#xD;&#xA;(note the change from `other` to `this`)&#xD;&#xA;&#xD;&#xA;However, this might cause a lack of collisions.  This is saying if the position of the bullet image is EXACTALLY the same as the enemy, it will hit.  You probobly want some range (based on the size of the enemy and bullet).  Try something like this:&#xD;&#xA;&#xD;&#xA;	final int distance = 10; //set to the number of pixel distance you want the max to be for the collision to occur&#xD;&#xA;	if (Math.abs(this.left-other.left) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.right-other.right) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.up-other.up) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.down-other.down) &gt; distance) return false;&#xD;&#xA;	&#xD;&#xA;	return true;&#xD;&#xA;&#xD;&#xA;Try that and see how it works.  You may need to play with how big `distance` is, so I separated it from the rest of the code.  I hope this helps.  &#xD;&#xA;&#xD;&#xA;EDIT: Nevermind.  I misread the post and misinterpreted what the variables `left` `down` `right` and `up` meant.  The second block of code will probably confuse thing even more :P.  &#xD;&#xA;&#xD;&#xA;EDIT2: Use this with variables `x` and `y` instead.&#xD;&#xA;&#xD;&#xA;	final int distance = 10; //set to the number of pixel distance you want the max to be for the collision to occur&#xD;&#xA;	if (Math.abs(this.x-other.x) &gt; distance) return false;&#xD;&#xA;	if (Math.abs(this.y-other.y) &gt; distance) return false;&#xD;&#xA;	&#xD;&#xA;	return true;" />
  <row Id="32153" PostHistoryTypeId="5" PostId="14351" RevisionGUID="d37d18a4-4f1c-4284-8a85-66bd092b63a5" CreationDate="2011-07-01T04:04:21.553" UserId="7432" Comment="added 3259 characters in body" Text="I am having trouble with collision detection part of the game. &#xD;&#xA;&#xD;&#xA;I am using touch events to fire the gun as you will see in the [video][3]. Note, the android icon is a temporary graphic for the bullets&#xD;&#xA;&#xD;&#xA;When ever the user touches (represented by clicks in the video)the bullet appears and kills random sprites. &#xD;&#xA;&#xD;&#xA;As you can see it never touches the sprites it kills or kill the sprites it does touch.&#xD;&#xA;&#xD;&#xA;My Question is How do I fix it, so that the sprite dies when the bullet hits it?&#xD;&#xA;&#xD;&#xA;Collision Code snippet:&lt;br&gt;&#xD;&#xA;&#xD;&#xA;    //Handles Collision&#xD;&#xA;    		private void CheckCollisions(){		&#xD;&#xA;    			synchronized(mSurfaceHolder){&#xD;&#xA;    				for (int i = sprites.size() - 1; i &gt;= 0; i--){&#xD;&#xA;    						Sprite sprite = sprites.get(i);&#xD;&#xA;    						if(sprite.isCollision(bullet)){&#xD;&#xA;    							sprites.remove(sprite);&#xD;&#xA;    							mScore++;&#xD;&#xA;    							if(sprites.size() == 0){&#xD;&#xA;    								mLevel = mLevel +1;&#xD;&#xA;    								currentLevel++;&#xD;&#xA;    								initLevel();							&#xD;&#xA;    							}&#xD;&#xA;    							break;&#xD;&#xA;    						}			&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    Sprite Class Code Snippet&#xD;&#xA;    //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;    	       int left ;&#xD;&#xA;    	       int right ;&#xD;&#xA;    	       int top ;&#xD;&#xA;    	       int bottom ;&#xD;&#xA;    		public boolean isCollision(Beam other) {&#xD;&#xA;    			// TODO Auto-generated method stub	&#xD;&#xA;    			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;    		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;    &#xD;&#xA;    			return true;&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;  [3]: http://megaswf.com/serve/1140586&#xD;&#xA;&#xD;&#xA;EDIT1:&lt;br&gt;&#xD;&#xA;Sprite Class:&lt;br&gt;&#xD;&#xA;public class Sprite {&#xD;&#xA;&#xD;&#xA;	       // direction = 0 up, 1 left, 2 down, 3 right,&#xD;&#xA;	       // animation = 3 back, 1 left, 0 front, 2 right&#xD;&#xA;	       int[] DIRECTION_TO_ANIMATION_MAP = { 3, 1, 0, 2 };&#xD;&#xA;	       private static final int BMP_ROWS = 4;&#xD;&#xA;	       private static final int BMP_COLUMNS = 3;&#xD;&#xA;	       private static final int MAX_SPEED = 5;&#xD;&#xA;	       private HitmanView gameView;&#xD;&#xA;	       private Bitmap bmp;&#xD;&#xA;	       private int x;&#xD;&#xA;	       private int y;&#xD;&#xA;	       private int xSpeed;&#xD;&#xA;	       private int ySpeed;&#xD;&#xA;	       private int currentFrame = 0;&#xD;&#xA;	       private int width;&#xD;&#xA;	       private int height;&#xD;&#xA;	       &#xD;&#xA;	       //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;	       int left ;&#xD;&#xA;	       int right ;&#xD;&#xA;	       int top ;&#xD;&#xA;	       int bottom ;&#xD;&#xA;&#xD;&#xA;	       public Sprite(HitmanView gameView, Bitmap bmp) {&#xD;&#xA;	             this.width = bmp.getWidth() / BMP_COLUMNS;&#xD;&#xA;	             this.height = bmp.getHeight() / BMP_ROWS;&#xD;&#xA;	             this.gameView = gameView;&#xD;&#xA;	             this.bmp = bmp;&#xD;&#xA;	             Random rnd = new Random();&#xD;&#xA;	             x = rnd.nextInt(gameView.getWidth() - width);&#xD;&#xA;	             y = rnd.nextInt(gameView.getHeight() - height);&#xD;&#xA;	             xSpeed = rnd.nextInt(MAX_SPEED * 2) - MAX_SPEED;&#xD;&#xA;	             ySpeed = rnd.nextInt(MAX_SPEED * 2) - MAX_SPEED;&#xD;&#xA;	       }&#xD;&#xA;	       private void update() {&#xD;&#xA;	             if (x &gt;= gameView.getWidth() - width - xSpeed || x + xSpeed &lt;= 0) {&#xD;&#xA;	                    xSpeed = -xSpeed;&#xD;&#xA;	             }&#xD;&#xA;	             x = x + xSpeed;&#xD;&#xA;	             if (y &gt;= gameView.getHeight() - height - ySpeed || y + ySpeed &lt;= 0) {&#xD;&#xA;	                    ySpeed = -ySpeed;&#xD;&#xA;	             }&#xD;&#xA;	             y = y + ySpeed;&#xD;&#xA;	             currentFrame = ++currentFrame % BMP_COLUMNS;&#xD;&#xA;	       }&#xD;&#xA;	       public void onDraw(Canvas canvas) {&#xD;&#xA;	             update();&#xD;&#xA;	             int srcX = currentFrame * width;&#xD;&#xA;	             int srcY = getAnimationRow() * height;&#xD;&#xA;	             Rect src = new Rect(srcX, srcY, srcX + width, srcY + height);&#xD;&#xA;	             Rect dst = new Rect(x, y, x + width, y + height);&#xD;&#xA;	             canvas.drawBitmap(bmp, src, dst, null);&#xD;&#xA;	       }&#xD;&#xA;	       private int getAnimationRow() {&#xD;&#xA;	             double dirDouble = (Math.atan2(xSpeed, ySpeed) / (Math.PI / 2) + 2);&#xD;&#xA;	             int direction = (int) Math.round(dirDouble) % BMP_ROWS;&#xD;&#xA;	             return DIRECTION_TO_ANIMATION_MAP[direction];&#xD;&#xA;	       }&#xD;&#xA;	       public boolean isCollision(float x2, float y2){&#xD;&#xA;	    	   return x2 &gt; x &amp;&amp; x2 &lt; x + width &amp;&amp; y2 &gt; y &amp;&amp; y2 &lt; y + height;&#xD;&#xA;	       }&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;		public boolean isCollision(Beam other) {&#xD;&#xA;			// TODO Auto-generated method stub	&#xD;&#xA;			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;&#xD;&#xA;			return true;&#xD;&#xA;		}	&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Bullet Class:&lt;br&gt;&#xD;&#xA;public class Bullet {&#xD;&#xA;&#xD;&#xA;	int mX;&#xD;&#xA;	int mY;&#xD;&#xA;	private Bitmap mBitmap;&#xD;&#xA;	&#xD;&#xA;	//bounding box left&lt;right and top&gt;bottom&#xD;&#xA;    int left ;&#xD;&#xA;    int right ;&#xD;&#xA;    int top ;&#xD;&#xA;    int bottom ;&#xD;&#xA;	&#xD;&#xA;	public Bullet (Bitmap mBitmap){&#xD;&#xA;		this.mBitmap = mBitmap;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	public void draw(Canvas canvas, int mX, int mY) {&#xD;&#xA;		this.mX = mX;&#xD;&#xA;		this.mY = mY;&#xD;&#xA;        canvas.drawBitmap(mBitmap, mX, mY, null);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32154" PostHistoryTypeId="5" PostId="14350" RevisionGUID="8f9c61c7-7216-4e6a-8607-265aad7844a6" CreationDate="2011-07-01T05:12:06.563" UserId="1173" Comment="added example images" Text="I was thinking about effects in games the other day and I was reminded of the Gasmask effect from Metro 2033. Once you put the gasmask on it blurred a bit in the corners and could ice up and even get cracked.&#xD;&#xA;&#xD;&#xA;I assume that something like that is done using a shader. I have been experimenting a bit with game development, so far mostly playing with existing rendering engines and adding physics support etc.&#xD;&#xA;&#xD;&#xA;I would like to learn more about this sort of effect. Can someone give me a simple example of a shader that would alter the entire scene like this. Or if not a shader then an idea on how it would be done. Thanks.&#xD;&#xA;&#xD;&#xA;Edit : Include screenshot of the metro 2033 gasmask effect.&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/KV7rF.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/MO6IO.jpg" />
  <row Id="32159" PostHistoryTypeId="5" PostId="9524" RevisionGUID="c9b518a8-7b03-4c7c-8051-ca03cae844bb" CreationDate="2011-07-01T06:13:17.023" UserId="4513" Comment="deleted 130 characters in body; edited tags" Text="This subject, as with any optimisation problem, gets hit on a lot, but I just couldn't find what I (think) I want.&#xD;&#xA;&#xD;&#xA;A lot of tutorials, and even SO questions have similar tips; generally covering:&#xD;&#xA;&#xD;&#xA; - Use GL face culling (the OpenGL function, not the scene logic)&#xD;&#xA; - Precalculate anything you can&#xD;&#xA; - Use interleaved Vertices&#xD;&#xA; - Minimize as many GL calls as possible, batch where appropriate&#xD;&#xA;&#xD;&#xA;And possibly a few/many others. I am (for curiosity reasons) rendering 28 million triangles in my application using several vertex buffers. I have tried all the above techniques (to the best of my knowledge), and received almost no performance change.&#xD;&#xA;&#xD;&#xA;Whilst I am receiving around 40FPS in my implementation, which is by no means problematic, I am still curious as to where these optimisation 'tips' actually come into use?&#xD;&#xA;&#xD;&#xA;My CPU is idling around 20-50% during rendering, therefore I *assume* I am GPU bound for increasing performance.&#xD;&#xA;&#xD;&#xA;**Note:** I am looking into gDEBugger at the moment&#xD;&#xA;&#xD;&#xA;Cross posted at [StackOverflow][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5243411/opengl-performance-questions" />
  <row Id="32160" PostHistoryTypeId="6" PostId="9524" RevisionGUID="c9b518a8-7b03-4c7c-8051-ca03cae844bb" CreationDate="2011-07-01T06:13:17.023" UserId="4513" Comment="deleted 130 characters in body; edited tags" Text="&lt;opengl&gt;&lt;c++&gt;&lt;performance&gt;&lt;optimization&gt;&lt;sdl&gt;" />
  <row Id="32161" PostHistoryTypeId="25" PostId="14333" RevisionGUID="154f199d-5e06-4391-bafd-8f524eb1b473" CreationDate="2011-07-01T06:26:07.233" Comment="http://twitter.com/#!/StackGameDev/status/86681968485470208" />
  <row Id="32162" PostHistoryTypeId="5" PostId="14351" RevisionGUID="e85ba054-d7ec-42c1-b365-e86aa07a7305" CreationDate="2011-07-01T07:07:55.320" UserId="2698" Comment="Improved layout and indenting. If I messed up some of it, do correct it!" Text="I am having trouble with collision detection part of the game. &#xD;&#xA;&#xD;&#xA;I am using touch events to fire the gun as you will see in the [video][3]. Note, the android icon is a temporary graphic for the bullets&#xD;&#xA;&#xD;&#xA;When ever the user touches (represented by clicks in the video)the bullet appears and kills random sprites. &#xD;&#xA;&#xD;&#xA;As you can see it never touches the sprites it kills or kill the sprites it does touch.&#xD;&#xA;&#xD;&#xA;My Question is How do I fix it, so that the sprite dies when the bullet hits it?&#xD;&#xA;&#xD;&#xA;Collision Code snippet:&#xD;&#xA;&#xD;&#xA;    //Handles Collision&#xD;&#xA;    private void CheckCollisions(){		&#xD;&#xA;        synchronized(mSurfaceHolder){&#xD;&#xA;            for (int i = sprites.size() - 1; i &gt;= 0; i--){&#xD;&#xA;                Sprite sprite = sprites.get(i);&#xD;&#xA;                if(sprite.isCollision(bullet)){&#xD;&#xA;                    sprites.remove(sprite);&#xD;&#xA;                    mScore++;&#xD;&#xA;                    if(sprites.size() == 0){&#xD;&#xA;                        mLevel = mLevel +1;&#xD;&#xA;                        currentLevel++;&#xD;&#xA;                        initLevel();							&#xD;&#xA;                    }&#xD;&#xA;                    break;&#xD;&#xA;                }			&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;Sprite Class Code Snippet:&#xD;&#xA;&#xD;&#xA;    //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;    int left ;&#xD;&#xA;    int right ;&#xD;&#xA;    int top ;&#xD;&#xA;    int bottom ;&#xD;&#xA;    public boolean isCollision(Beam other) {&#xD;&#xA;        // TODO Auto-generated method stub	&#xD;&#xA;        if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;        if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [3]: http://megaswf.com/serve/1140586&#xD;&#xA;&#xD;&#xA;### EDIT 1:&#xD;&#xA;&#xD;&#xA;Sprite Class:&#xD;&#xA;&#xD;&#xA;    public class Sprite {&#xD;&#xA;&#xD;&#xA;       // direction = 0 up, 1 left, 2 down, 3 right,&#xD;&#xA;       // animation = 3 back, 1 left, 0 front, 2 right&#xD;&#xA;       int[] DIRECTION_TO_ANIMATION_MAP = { 3, 1, 0, 2 };&#xD;&#xA;       private static final int BMP_ROWS = 4;&#xD;&#xA;       private static final int BMP_COLUMNS = 3;&#xD;&#xA;       private static final int MAX_SPEED = 5;&#xD;&#xA;       private HitmanView gameView;&#xD;&#xA;       private Bitmap bmp;&#xD;&#xA;       private int x;&#xD;&#xA;       private int y;&#xD;&#xA;       private int xSpeed;&#xD;&#xA;       private int ySpeed;&#xD;&#xA;       private int currentFrame = 0;&#xD;&#xA;       private int width;&#xD;&#xA;       private int height;&#xD;&#xA;       &#xD;&#xA;       //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;       int left ;&#xD;&#xA;       int right ;&#xD;&#xA;       int top ;&#xD;&#xA;       int bottom ;&#xD;&#xA;&#xD;&#xA;       public Sprite(HitmanView gameView, Bitmap bmp) {&#xD;&#xA;             this.width = bmp.getWidth() / BMP_COLUMNS;&#xD;&#xA;             this.height = bmp.getHeight() / BMP_ROWS;&#xD;&#xA;             this.gameView = gameView;&#xD;&#xA;             this.bmp = bmp;&#xD;&#xA;             Random rnd = new Random();&#xD;&#xA;             x = rnd.nextInt(gameView.getWidth() - width);&#xD;&#xA;             y = rnd.nextInt(gameView.getHeight() - height);&#xD;&#xA;             xSpeed = rnd.nextInt(MAX_SPEED * 2) - MAX_SPEED;&#xD;&#xA;             ySpeed = rnd.nextInt(MAX_SPEED * 2) - MAX_SPEED;&#xD;&#xA;       }&#xD;&#xA;       private void update() {&#xD;&#xA;             if (x &gt;= gameView.getWidth() - width - xSpeed || x + xSpeed &lt;= 0) {&#xD;&#xA;                    xSpeed = -xSpeed;&#xD;&#xA;             }&#xD;&#xA;             x = x + xSpeed;&#xD;&#xA;             if (y &gt;= gameView.getHeight() - height - ySpeed || y + ySpeed &lt;= 0) {&#xD;&#xA;                    ySpeed = -ySpeed;&#xD;&#xA;             }&#xD;&#xA;             y = y + ySpeed;&#xD;&#xA;             currentFrame = ++currentFrame % BMP_COLUMNS;&#xD;&#xA;       }&#xD;&#xA;       public void onDraw(Canvas canvas) {&#xD;&#xA;             update();&#xD;&#xA;             int srcX = currentFrame * width;&#xD;&#xA;             int srcY = getAnimationRow() * height;&#xD;&#xA;             Rect src = new Rect(srcX, srcY, srcX + width, srcY + height);&#xD;&#xA;             Rect dst = new Rect(x, y, x + width, y + height);&#xD;&#xA;             canvas.drawBitmap(bmp, src, dst, null);&#xD;&#xA;       }&#xD;&#xA;       private int getAnimationRow() {&#xD;&#xA;             double dirDouble = (Math.atan2(xSpeed, ySpeed) / (Math.PI / 2) + 2);&#xD;&#xA;             int direction = (int) Math.round(dirDouble) % BMP_ROWS;&#xD;&#xA;             return DIRECTION_TO_ANIMATION_MAP[direction];&#xD;&#xA;       }&#xD;&#xA;       public boolean isCollision(float x2, float y2){&#xD;&#xA;           return x2 &gt; x &amp;&amp; x2 &lt; x + width &amp;&amp; y2 &gt; y &amp;&amp; y2 &lt; y + height;&#xD;&#xA;       }&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;		public boolean isCollision(Beam other) {&#xD;&#xA;			// TODO Auto-generated method stub	&#xD;&#xA;			if(this.left&gt;other.right || other.left&lt;other.right)return false;&#xD;&#xA;		    if(this.bottom&gt;other.top || other.bottom&lt;other.top)return false;&#xD;&#xA;&#xD;&#xA;			return true;&#xD;&#xA;		}	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Bullet Class:&#xD;&#xA;&#xD;&#xA;    public class Bullet {&#xD;&#xA;&#xD;&#xA;        int mX;&#xD;&#xA;        int mY;&#xD;&#xA;        private Bitmap mBitmap;&#xD;&#xA;        &#xD;&#xA;        //bounding box left&lt;right and top&gt;bottom&#xD;&#xA;        int left ;&#xD;&#xA;        int right ;&#xD;&#xA;        int top ;&#xD;&#xA;        int bottom ;&#xD;&#xA;        &#xD;&#xA;        public Bullet (Bitmap mBitmap){&#xD;&#xA;            this.mBitmap = mBitmap;&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void draw(Canvas canvas, int mX, int mY) {&#xD;&#xA;            this.mX = mX;&#xD;&#xA;            this.mY = mY;&#xD;&#xA;            canvas.drawBitmap(mBitmap, mX, mY, null);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="32163" PostHistoryTypeId="24" PostId="14351" RevisionGUID="e85ba054-d7ec-42c1-b365-e86aa07a7305" CreationDate="2011-07-01T07:07:55.320" Comment="Proposed by 2698 approved by 51 edit id of 529" />
  <row Id="32164" PostHistoryTypeId="2" PostId="14359" RevisionGUID="e644a287-205b-4c4e-a463-2aad1f4859c8" CreationDate="2011-07-01T07:42:23.123" UserId="8347" Text="I believe I've been staring back at this question for the last three days, while asking myself how the procedural generation of worlds or even galaxies can, at the same time, be deterministic(such as always generating the same content from the same seed), look natural, and still have unique, interesting, unusual or even beautiful features in its landscape.&#xD;&#xA;&#xD;&#xA;I keep going back to the same generic answer that this is going highly dependent on the genre of the game and its own internal consistent history within the story.&#xD;&#xA;For example, post-apocalyptic genre, why would anyone build a metropolis with massive walls in the middle of a wasteland, and make everyone inside of it live miserably? Why colonize such planets? In high fantasy, why make a city on top of a floating island? Why do dwarves make cities inside of mountains? And your generic evil enemy comes from fiery land with active volcanoes? Rule of Cool?&#xD;&#xA;&#xD;&#xA;So it all goes back to your own answer where you input information into the PCG and it fills the gap, and also to the other answer about generating worlds which match plot lines and the overall story.&#xD;&#xA;&#xD;&#xA;So plot generates gameplay elements which generates suitable landscape.&#xD;&#xA;&#xD;&#xA;That said, I wonder if a story that generates a tree of consistent plot lines, will generate the overall gameplay design you're looking for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(PS: These same three days thinking also made me come with another answer to a problem that may rise: there should be an automated test tool to check if the generated game design is sound, eg, you should have a medieval army having a hard time to defeat a generated fortress)" />
  <row Id="32165" PostHistoryTypeId="2" PostId="14360" RevisionGUID="9285d1b6-7c0e-4a09-97af-dbacf6cea146" CreationDate="2011-07-01T07:49:30.857" UserId="2710" Text="I've just implemented this algorithm for a game of mine a couple of days ago! (-8&#xD;&#xA;&#xD;&#xA;Here's my idea in a picture form:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Note that the algorithm works with rectangles of any size. it's based on the fact that one corner of the rectangle _always_ collides first with any grid line. This means that you can only trace one ray, and get all intersections you need.&#xD;&#xA;&#xD;&#xA;Here's the algorithm step-by-step:&#xD;&#xA;&#xD;&#xA; 1. Choose the &quot;forward&quot; corner of your rectangle. For example, in the picture the tracing direction lies in the upper-right quadrant, so we choose upper-right corner.&#xD;&#xA; 2. Trace the (zero-width) ray from this corner to your destination. You would need to iterate over all intersections of your ray with grid lines. &#xD;&#xA; 3. For all intersections of the ray with grid lines, place your rectangle at the intersection point. Its side would lie exactly along a grid line, touching a number of grid cells. These are the tiles that your rectangle collides with at this point!&#xD;&#xA;&#xD;&#xA;There are some edge cases here, like when the ray is exactly vertical/horizontal, or when it hits a corner exactly, but they're not difficult.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ewZt9.png" />
  <row Id="32166" PostHistoryTypeId="2" PostId="14361" RevisionGUID="bc48ed37-e252-422b-b5ac-b70037aff18e" CreationDate="2011-07-01T08:10:29.143" UserId="8240" Text="1: Primitives are not &quot;created&quot; before the vertex shader is invoked. Primitive assembly is a part of the pipeline after the vertex shader executes. Using the parameter passed to glDraw*, groups of vertex data output by the vertex shader are used to create primitives, which are then clipped, culled, and rasterized.&#xD;&#xA;&#xD;&#xA;There is no &quot;position of the vertex&quot; attribute. That's because vertex shaders are *arbitrary code*. They take whatever attributes you want them to, and those attributes have whatever meaning your code desires them to have. If you want a position value as an attribute, name it `position` in your shader.&#xD;&#xA;&#xD;&#xA;A vertex shader is required to output a position in clip-space, but how the vertex shader creates that data is up to the shader. It could do some matrix transforms on an attribute, which is the typical method. But it could also do more arbitrary things. Depending on the extensions available to you in your ES 2.0 implementation, it could fetch data from a texture to compute the position. It could use a Perlin noise function to generate the height for a height map. And so forth.&#xD;&#xA;&#xD;&#xA;2: The functions you're looking for are `glEnableVertexAttribArrays` and `glDisableVertexAttribArrays`.&#xD;&#xA;&#xD;&#xA;&gt; this is OpenGL ES 2.0, NOT normal OpenGL!&#xD;&#xA;&#xD;&#xA;It may as well be, since nothing you asked is different between desktop GL and GL-ES 2.0." />
  <row Id="32167" PostHistoryTypeId="2" PostId="14362" RevisionGUID="3e546ea2-ad99-49eb-a541-b5ac6804498e" CreationDate="2011-07-01T08:15:54.687" UserId="8050" Text="Ok lets start from the beginning. I don't know what you are doing and how but the network when doing with network you have to give it a try to the **REACTOR** pattern.&#xD;&#xA;&#xD;&#xA;*Basically* reactor is a way to avoid the use of threads or to defere it where a threaded-task is more decoupled by the core.&#xD;&#xA;&#xD;&#xA;The center of the reactor is the ***select*** function: you register your event sources and ask the select to return when **something happends to one of those sources**.&#xD;&#xA;&#xD;&#xA;When something appends, the reactor main loop simply finds **What appened** to **What source** reacting by creating an *Event* and dispatch this event to objects interested in those kind of events.&#xD;&#xA;&#xD;&#xA;I'm not a Java Guru but i know that you can setup socket (even UDP ones) and you can set them as non-blocking. Along whit this I know there is a class called Selector  in a package called NIO. Those stuffs concur to define a [multiplexed, non-blocking I/O facility][1]&#xD;&#xA;&#xD;&#xA;All you need is simply setup two UDP channels: one for server listening and the other for  server talking; register the listening one to the reactor and integrate the reaction step of reactor into your main loop.&#xD;&#xA;&#xD;&#xA;Take into account that this kind of approach let you to connect simultaneusly with different channels so you can consider to develop a peer-to-peer game (no server bottleneck and distribuited design... sounds good!)&#xD;&#xA;&#xD;&#xA;**P.S.**&#xD;&#xA;&#xD;&#xA;Please note that if you are using some sort of GUI tookit/facility, you probably are already using a Reactor...&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/1.4.2/docs/api/java/nio/channels/package-summary.html#multiplex" />
  <row Id="32168" PostHistoryTypeId="2" PostId="14363" RevisionGUID="fd100af5-4d03-4c79-9af8-2953d7e6293b" CreationDate="2011-07-01T08:26:47.593" UserId="1386" Text="It's a combination of full-screen effects.&#xD;&#xA;There are a few ways to render full-screen shader effects, the most common is to first render the scene (without effects) to texture. Then that texture and the effect shader is set and a fullscreen quad is rendered.&#xD;&#xA;&#xD;&#xA;The blurring in the corners could be done with a refraction effect. A refraction texture controls how much the light should be bent for each point on the screen. [Here][1] is an example of a Unity refraction shader.&#xD;&#xA;&#xD;&#xA;The cracks look like transparent textures to me.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=RefractionEffect" />
  <row Id="32169" PostHistoryTypeId="2" PostId="14364" RevisionGUID="1aa20cc2-b684-4117-b5e6-8e110c6e77e0" CreationDate="2011-07-01T08:45:11.417" UserId="8240" Text="&gt; My Characters stats are composed of the following:&#xD;&#xA;&#xD;&#xA;There's your real problem: you defined your stats *before* defining what those stats actually *mean*. You're putting the cart before the horse.&#xD;&#xA;&#xD;&#xA;Look at how D&amp;D (tabletop) works. &quot;Strength&quot; doesn't mean anything by itself; it only means something because there's a rule that says, &quot;Add your strength bonus to your melee attack.&quot; That rule is part of D&amp;D's combat rules. Without the combat rules, &quot;Strength&quot; is generally a meaningless quantity.&#xD;&#xA;&#xD;&#xA;The first question you need to ask yourself is this: how much differentiation do I want between characters? Again, look at D&amp;D. There, they have 6 basic stats. These stats define different dimensions of play for characters. A character with a high Dexterity will have different options from a character with low Dexterity.&#xD;&#xA;&#xD;&#xA;But the reason for even that difference all comes back to rules. A high Dexterity means bonuses to ranged attacks; you can hit more often with ranged attacks. So just between Strength and Dexterity, you have two dimensions of play: ranged vs. melee.&#xD;&#xA;&#xD;&#xA;Intelligence and Wisdom also form something of a pairing, but these interact more with specific classes. Int makes Wizards and other arcane spellcasters better (or *possible* under some rulesets), Wisdom is vital for Clerics and other divine spellcasters. Because divine and arcane spells have different spell lists, these two stats are involved in different dimensions of play.&#xD;&#xA;&#xD;&#xA;You need to define the basic rules around stats *before* you can define growth progression functions and the like. You don't need specifics; you don't need to say that &quot;each point of strength is added into the random roll to determine if a melee attack hits.&quot; What you need are meta-rules like &quot;dexterity makes ranged attackers better.&quot; You can figure out exactly *how* it makes them better later on.&#xD;&#xA;&#xD;&#xA;There are different ways to progress characters. A common old-school Final Fantasy trick was to simply use the character's level as part of their damage computations. This could be simply multiplying the level by the appropriate stat, or it could mean applying a function to the character's level. Say, a quadratic progression, so that the rate of a character's damage would increase per level.&#xD;&#xA;&#xD;&#xA;However you want your combat functions to work, they need to take into account progression. Your functions need hooks for progression.&#xD;&#xA;&#xD;&#xA;D&amp;D has a funny way of progression. It is part class-based; every time you go up in level, you get new class features and a flat bonus to your to-hit, based on your character class. However, some class features got better by themselves. Spells in D&amp;D would have progression built into them. A spell might do 1d4 damage per 2 levels of a spellcaster above the first. So every other wizard level makes that spell better.&#xD;&#xA;&#xD;&#xA;D&amp;D also used item-based progression heavily. Until 4th edition, item-based progression was mainly for fighting characters, but even in older editions, spellcasters had items that gave them stat buffs or other adjustments (or flat out gave them spells).&#xD;&#xA;&#xD;&#xA;So items are another thing your combat functions need to take into account. Do items just buff one or more stats while equipped, or do they do other things as well? D&amp;D was a bit odd, in that stats rarely changed; weapons simply did XdY damage, possibly with a bonus based on one of your stats. And that was that. So your only way to do more damage in battle was to find a better weapon. In many videogame RPGs, they take level into account in addition to a weapon." />
  <row Id="32170" PostHistoryTypeId="5" PostId="14363" RevisionGUID="755fa000-b95f-4eef-a801-2a5ce35f6b5a" CreationDate="2011-07-01T09:07:17.523" UserId="1386" Comment="added 144 characters in body" Text="It's a combination of full-screen effects.&#xD;&#xA;There are a few ways to render full-screen shader effects, the most common is to first render the scene (without effects) to texture. Then that texture and the effect shader is set and a fullscreen quad is rendered.&#xD;&#xA;&#xD;&#xA;The blurring in the corners could be done with a refraction effect. A refraction texture controls how much the light should be bent for each point on the screen. [Here][1] is an example of a Unity refraction shader.&#xD;&#xA;&#xD;&#xA;[This tutorial (rastek)][2] shows how to create glass and ice effects with DirectX 10/ HLSL.&#xD;&#xA;The cracks look like transparent textures to me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=RefractionEffect&#xD;&#xA;  [2]: http://www.rastertek.com/dx10tut32.html" />
  <row Id="32171" PostHistoryTypeId="25" PostId="14350" RevisionGUID="179ede6f-364f-40cc-af60-93b5220a0df8" CreationDate="2011-07-01T09:26:06.490" Comment="http://twitter.com/#!/StackGameDev/status/86727265014136832" />
  <row Id="32172" PostHistoryTypeId="5" PostId="14363" RevisionGUID="d0862f52-cc7e-404d-8ab2-184f41442379" CreationDate="2011-07-01T09:27:09.217" UserId="1386" Comment="added 2 characters in body" Text="It's a combination of full-screen effects.&#xD;&#xA;There are a few ways to render full-screen shader effects, the most common is to first render the scene (without effects) to texture. Then that texture and the effect shader is set and a fullscreen quad is rendered.&#xD;&#xA;&#xD;&#xA;The blurring in the corners could be done with a refraction effect. A refraction texture controls how much the light should be bent for each point on the screen. [Here][1] is an example of a Unity refraction shader.&#xD;&#xA;&#xD;&#xA;[This tutorial (rastek)][2] shows how to create glass and ice effects with DirectX 10/ HLSL.&#xD;&#xA;&#xD;&#xA;The cracks look like transparent textures to me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=RefractionEffect&#xD;&#xA;  [2]: http://www.rastertek.com/dx10tut32.html" />
  <row Id="32173" PostHistoryTypeId="2" PostId="14365" RevisionGUID="10af0ae7-2523-4b87-83b1-471d94432dcb" CreationDate="2011-07-01T10:47:45.240" UserId="6341" Text="A while ago I asked how to determine when a face is overlapping another. The advice was to use a Z-buffer.&#xD;&#xA;&#xD;&#xA;However, I cannot use a Z-buffer in my current project and hence I would like to use the Painter's algorithm. I have no good clue as to when a surface is behind or in front of another, though. I've tried numerous methods but they all fail in edge cases, or they fail even in general cases.&#xD;&#xA;&#xD;&#xA;This is a list of sorting methods I've tried so far:&#xD;&#xA;&#xD;&#xA; - Distance to midpoint of each face&#xD;&#xA; - Average distance to each vertex of each face&#xD;&#xA; - Average z value of each face&#xD;&#xA; - Higest z value of each face and draw those first&#xD;&#xA; - Lowest z value of each face and draw those last&#xD;&#xA;&#xD;&#xA;The problem is that a face might have a closer distance but is still further away. All these methods seem unreliable.&#xD;&#xA;&#xD;&#xA;What exactly is used in the Painter's algorithm to determine the order in which objects should be drawn?" />
  <row Id="32174" PostHistoryTypeId="1" PostId="14365" RevisionGUID="10af0ae7-2523-4b87-83b1-471d94432dcb" CreationDate="2011-07-01T10:47:45.240" UserId="6341" Text="How to gain accurate results with Painter's algorithm?" />
  <row Id="32175" PostHistoryTypeId="3" PostId="14365" RevisionGUID="10af0ae7-2523-4b87-83b1-471d94432dcb" CreationDate="2011-07-01T10:47:45.240" UserId="6341" Text="&lt;3d&gt;&lt;algorithm&gt;&lt;objects&gt;&lt;face&gt;" />
  <row Id="32176" PostHistoryTypeId="2" PostId="14366" RevisionGUID="8da3f14b-206c-41c4-8a89-21b222912e14" CreationDate="2011-07-01T11:05:40.183" UserId="8358" Text="I am beginner in android game development. I want my game to run only in landscape fullscreen mod (currently I have Optimus 2X with resolution 800x480 in landscape), and I dont know how to set it.&#xD;&#xA;&#xD;&#xA; I found the fullscreen mod settings, and tried some landscape mod (set orientation:landscape in AndroidManifest), but the game is now crashing and its very unstable (eg. when i change phone orientation). &#xD;&#xA;&#xD;&#xA;So is there any way to do that? Thank you for help." />
  <row Id="32177" PostHistoryTypeId="1" PostId="14366" RevisionGUID="8da3f14b-206c-41c4-8a89-21b222912e14" CreationDate="2011-07-01T11:05:40.183" UserId="8358" Text="Android landscape mod game." />
  <row Id="32178" PostHistoryTypeId="3" PostId="14366" RevisionGUID="8da3f14b-206c-41c4-8a89-21b222912e14" CreationDate="2011-07-01T11:05:40.183" UserId="8358" Text="&lt;2d&gt;&lt;android&gt;" />
  <row Id="32179" PostHistoryTypeId="2" PostId="14367" RevisionGUID="4c003d2f-ee41-4af4-827c-a901447f1c88" CreationDate="2011-07-01T11:11:12.923" UserId="7328" Text="Your question may mean two diffrent things, and for both there is some solutions:&#xD;&#xA;&#xD;&#xA;1. You have both the texture and the polygon and know you want to know how to store and draw your polygon. Storing a 2D polygon is a real easy job, you only have to store all the vertices in order in some array. and to apply a texture to your polygon you need equal number of vertices on your texture and the rest is done by the GameEngine. remember points on the texture and on your polygon should have same order.&#xD;&#xA;&#xD;&#xA;2. You have some texture and you want to extract vertices/edges from it. This one is a much harder problem but still it's solvable. First of all I would rather force my artist to give me polygons for the shapes he is drawing as well but maybe that's not possible so here are the steps to generate vetices/edges from a raw image. let's assume you can easily check if a pixel is a part of shape or not. So for the above picture before it's cut we have some picture like this :&#xD;&#xA;&#xD;&#xA;    ![Raw image][1]&#xD;&#xA;&#xD;&#xA;    using [edge detection algorithms](http://en.wikipedia.org/wiki/Edge_detection) you can get to this final image (all lines have one pixel width):&#xD;&#xA;&#xD;&#xA;    ![enter image description here][3]&#xD;&#xA;&#xD;&#xA;    now you can select some black pixels as vertices and then create your polygon using them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/L7i1v.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/AZOGA.png" />
  <row Id="32180" PostHistoryTypeId="5" PostId="14347" RevisionGUID="44677f58-e95b-4247-8d3f-4720c8f93fa9" CreationDate="2011-07-01T12:14:01.187" UserId="8050" Comment="added 6 characters in body" Text="There are a lot of ways to compute distances, every dot product can be used: a looot of ways. &#xD;&#xA;&#xD;&#xA;In your case you surely want to compute the distance between the center of the tiles. I take for granted that you know how to compute the center of a tile. &#xD;&#xA;&#xD;&#xA;Once you know the position, you can use the Euclidean distance in the canvas' coordinate space (i.e. &amp;radic;[(x'-x&quot;)&amp;sup2;+(y'-y&quot;)&amp;sup2;]) or the same in tile's coordinate system.&#xD;&#xA;&#xD;&#xA;Another option is the Manhattan or taxicab distance: d = |x'-x&quot;|+|y'+y&quot;|; even in this case you can use tile's coordinate or canvas' coordinate.&#xD;&#xA;&#xD;&#xA;The last option (after L2 and L1 norm) the L&quot;infinite&quot; norm where d is the max between |x'-x&quot;| and |y'-y&quot;|. &#xD;&#xA;&#xD;&#xA;**Lets see the differences:**&#xD;&#xA;&#xD;&#xA;The best way to evaluate this norms is to see the shape of a disc.&#xD;&#xA;&#xD;&#xA;Given a center, a disc is every point that falls within a fixed distance (however computed).&#xD;&#xA;&#xD;&#xA;***Euclidean Norm:***&#xD;&#xA;&#xD;&#xA; The disc is a standard circle in the canvas space and an ellipse in tile space&#xD;&#xA;&#xD;&#xA;![L2 canvas][1]&#xD;&#xA;&#xD;&#xA;*Euclidean Canvas*&#xD;&#xA;&#xD;&#xA;![L2 tile][2]&#xD;&#xA;&#xD;&#xA;*Euclidean Tile*&#xD;&#xA;&#xD;&#xA;While the first one is easier to compute in general (you don't have to go back and forth tile and canvas coords), the second gives a better fill. &#xD;&#xA;&#xD;&#xA;The **&quot;Euclidean Tile&quot;** is the norm that is generally considered **the most correct one**. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;***Taxicab Norm:***&#xD;&#xA;&#xD;&#xA;The disc becomes a diamond in canvas coordinate and a sort of rectangle in the tile coordinate (showing how applying the same coordinate changes two times rawly gives the initial result)&#xD;&#xA;&#xD;&#xA;![L1 canvas][3]&#xD;&#xA;&#xD;&#xA;*Taxicab Canvas*&#xD;&#xA;&#xD;&#xA;![L1 tile][4]&#xD;&#xA;&#xD;&#xA;*Taxicab Tile*&#xD;&#xA;&#xD;&#xA;We can see even this time how the canvas coordinate gives the worst results: this is the price for an easier way to compute distances.&#xD;&#xA;&#xD;&#xA;The &quot;Taxicab Tile&quot; gives a reasonable results, quite similar to the &quot;Euclidean Tile&quot;, but simply summing the tile coordinate. This is a very popular norm for this kind of problems&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;***L0 Norm:***&#xD;&#xA;&#xD;&#xA;Using the max if axial distances, the disc becomes a rectangle and the equivalent diamond in canvas and tile space respectively&#xD;&#xA;&#xD;&#xA;![L0 canvas][5]&#xD;&#xA;&#xD;&#xA;*L0 Canvas*&#xD;&#xA; &#xD;&#xA;![L0 tile][6]&#xD;&#xA; &#xD;&#xA;*L0 Tile*&#xD;&#xA;&#xD;&#xA;Ok, let's face it: the L0 canvas is horrible.&#xD;&#xA;&#xD;&#xA;On the other hand the &quot;L0 Tile&quot; make it sense: it is quite clean and *very* easy to compute. Can be taken into account when playing with slow device and we need to use every clock cycle.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**Conclusions**&#xD;&#xA;&#xD;&#xA;The norms computed on canvas coordinates give the worst of the results: the two coordinate systems does not match very well so the price to have a easier norm is simply too high.&#xD;&#xA;&#xD;&#xA;The Euclidean norm is the better choice but the slower one; The Taxycab norm offer a very good trade off.&#xD;&#xA;&#xD;&#xA;The &quot;L0&quot; is the fastest and easier but the price is to have a distance that is a little unrealistic.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/LsBV1.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/YLtxu.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/Tv7UO.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/kDTwI.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/1EtjT.png&#xD;&#xA;  [6]: http://i.stack.imgur.com/8Ziiy.png" />
  <row Id="32181" PostHistoryTypeId="5" PostId="14363" RevisionGUID="0a37ce63-7f95-4a4a-b21b-1fcea7bb3610" CreationDate="2011-07-01T12:20:02.580" UserId="1386" Comment="added 7 characters in body" Text="It's a combination of full-screen effects.&#xD;&#xA;There are a few ways to render full-screen shader effects, the most common is to first render the scene (without effects) to texture. Then that texture and the effect shader is set and a fullscreen quad is rendered.&#xD;&#xA;&#xD;&#xA;The blurring in the corners could be done with a refraction effect. A refraction texture controls how much the light should be bent for each texel in the screen buffer. [Here][1] is an example of a Unity refraction shader.&#xD;&#xA;&#xD;&#xA;[This tutorial (rastek)][2] shows how to create glass and ice effects with DirectX 10/ HLSL.&#xD;&#xA;&#xD;&#xA;The cracks look like transparent textures to me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unifycommunity.com/wiki/index.php?title=RefractionEffect&#xD;&#xA;  [2]: http://www.rastertek.com/dx10tut32.html" />
  <row Id="32182" PostHistoryTypeId="25" PostId="14365" RevisionGUID="d9beaaf2-02e7-4d76-a1bd-c1a1d78bb4c5" CreationDate="2011-07-01T12:26:07.067" Comment="http://twitter.com/#!/StackGameDev/status/86772565728698368" />
  <row Id="32183" PostHistoryTypeId="5" PostId="14365" RevisionGUID="e4f829e8-eb86-4429-93dc-0e1d4a07f245" CreationDate="2011-07-01T12:37:56.363" UserId="6341" Comment="added 510 characters in body" Text="A while ago I asked how to determine when a face is overlapping another. The advice was to use a Z-buffer.&#xD;&#xA;&#xD;&#xA;However, I cannot use a Z-buffer in my current project and hence I would like to use the Painter's algorithm. I have no good clue as to when a surface is behind or in front of another, though. I've tried numerous methods but they all fail in edge cases, or they fail even in general cases.&#xD;&#xA;&#xD;&#xA;This is a list of sorting methods I've tried so far:&#xD;&#xA;&#xD;&#xA; - Distance to midpoint of each face&#xD;&#xA; - Average distance to each vertex of each face&#xD;&#xA; - Average z value of each face&#xD;&#xA; - Higest z value of each face and draw those first&#xD;&#xA; - Lowest z value of each face and draw those last&#xD;&#xA;&#xD;&#xA;The problem is that a face might have a closer distance but is still further away. All these methods seem unreliable.&#xD;&#xA;&#xD;&#xA;**Edit:** For example, in the following image the surface with the blue point as midpoint is painted over the surface with the red point as midpoint, because the blue point is closer. However, this is because the surface of the red point is larger and the midpoint is further away. The surface with the red point should be painted over the blue one, because it is **closer**, whilst the midpoint distance says the opposite.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;What exactly is used in the Painter's algorithm to determine the order in which objects should be drawn?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/u1RbZ.png" />
  <row Id="32184" PostHistoryTypeId="2" PostId="14368" RevisionGUID="727dcae7-1d9c-4365-a542-791e9b199c86" CreationDate="2011-07-01T12:40:54.053" UserId="20" Text="Usually the distance of the midpoint of a polygon to the camera is being used for z-sorting. The painter's algorithm cannot be 100% accurate by it's nature. There will always be cases where sorting will fail, no matter what reference point you use.&#xD;&#xA;&#xD;&#xA;If you want correct z-sorting with the painter's algorithm, you'll have to slice overlapping polygons into smaller parts (eg. by using a quad-tree) and sort these parts individually. This can become quite heavy on the CPU though..&#xD;&#xA;&#xD;&#xA;Found this [Powerpoint file][1] that illustrates the issue nicely.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://agora.cs.illinois.edu/download/attachments/37387677/Zbuffer.ppt" />
  <row Id="32185" PostHistoryTypeId="5" PostId="14365" RevisionGUID="0a80f90b-7414-4262-a2e8-c2191342b5d0" CreationDate="2011-07-01T12:56:04.833" UserId="6341" Comment="added 26 characters in body" Text="A while ago I asked how to determine when a face is overlapping another. The advice was to use a Z-buffer.&#xD;&#xA;&#xD;&#xA;However, I cannot use a Z-buffer in my current project and hence I would like to use the Painter's algorithm. I have no good clue as to when a surface is behind or in front of another, though. I've tried numerous methods but they all fail in edge cases, or they fail even in general cases.&#xD;&#xA;&#xD;&#xA;This is a list of sorting methods I've tried so far:&#xD;&#xA;&#xD;&#xA; - Distance to midpoint of each face&#xD;&#xA; - Average distance to each vertex of each face&#xD;&#xA; - Average z value of each vertex&#xD;&#xA; - Higest z value of vertices of each face and draw those first&#xD;&#xA; - Lowest z value of vertices of each face and draw those last&#xD;&#xA;&#xD;&#xA;The problem is that a face might have a closer distance but is still further away. All these methods seem unreliable.&#xD;&#xA;&#xD;&#xA;**Edit:** For example, in the following image the surface with the blue point as midpoint is painted over the surface with the red point as midpoint, because the blue point is closer. However, this is because the surface of the red point is larger and the midpoint is further away. The surface with the red point should be painted over the blue one, because it is **closer**, whilst the midpoint distance says the opposite.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;What exactly is used in the Painter's algorithm to determine the order in which objects should be drawn?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/u1RbZ.png" />
  <row Id="32186" PostHistoryTypeId="2" PostId="14369" RevisionGUID="eef89fd0-9dea-4f56-8f4d-bbfdcb98bb66" CreationDate="2011-07-01T13:01:22.910" UserId="4524" Text="How could you program a 2D boids simulation in such a way that it could use processing power from different sources (clusters, gpu). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![boids example][1]&#xD;&#xA;&#xD;&#xA;In the above example, the non-coloured particles move around until they cluster (yellow) and stop moving. &#xD;&#xA;&#xD;&#xA;Would it be possible to use quad trees to further optimise this? Any other suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/VoVSp.png" />
  <row Id="32187" PostHistoryTypeId="1" PostId="14369" RevisionGUID="eef89fd0-9dea-4f56-8f4d-bbfdcb98bb66" CreationDate="2011-07-01T13:01:22.910" UserId="4524" Text="How could you parallelise a 2D boids simulation" />
  <row Id="32188" PostHistoryTypeId="3" PostId="14369" RevisionGUID="eef89fd0-9dea-4f56-8f4d-bbfdcb98bb66" CreationDate="2011-07-01T13:01:22.910" UserId="4524" Text="&lt;programming&gt;&lt;physics&gt;&lt;math&gt;&lt;algorithm&gt;&lt;simulations&gt;" />
  <row Id="32189" PostHistoryTypeId="5" PostId="14369" RevisionGUID="596dd0ef-6965-45b3-a236-edd567643a36" CreationDate="2011-07-01T13:11:43.760" UserId="4524" Comment="added 331 characters in body" Text="How could you program a 2D boids simulation in such a way that it could use processing power from different sources (clusters, gpu). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![boids example][1]&#xD;&#xA;&#xD;&#xA;In the above example, the non-coloured particles move around until they cluster (yellow) and stop moving. &#xD;&#xA;&#xD;&#xA;The problem is that all the entities could potentially interact with each other although an entity in the top left is unlikely to interact with one in the bottom right. If the domain was split into different segments, it may speed the whole thing up, But if an entity wanted to cross into another segment there may be problems.&#xD;&#xA;&#xD;&#xA;At the moment this simulation works with 5000 entities with a good frame rate, I would like to try this with millions if possible.&#xD;&#xA;&#xD;&#xA;Would it be possible to use quad trees to further optimise this? Any other suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/VoVSp.png" />
  <row Id="32190" PostHistoryTypeId="2" PostId="14370" RevisionGUID="22c2d195-22c0-4356-b82e-7faeaef4080f" CreationDate="2011-07-01T13:38:44.140" UserId="7328" Text="By reading your quesiton it seems you can take benefit of quad trees, create a quad tree and run simulation for each segment on a diffrent processing unit. This will cause checking only happen to objects near to each other. but you'll need to sync you threads every cycle. Which means to transfer some of those boids from one processing group to another. in general every cycle will consist of 3 steps :&#xD;&#xA;&#xD;&#xA;1. Move all boids by one unit. (which can easily be processed using multiple threads)&#xD;&#xA;2. Assigning each boid to a group*. This means using an algorithm of O(n) you have to select which boids are most likely to make a collision. This can also be handled using multiple threads.&#xD;&#xA;3. In the end you have to check if two boids in a same group made collision. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To create groups you can use the pattern below:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;note that some boids may be a part of more than one group, but this pattern gives you a more accurate results. you may also create as many groups as you want using this pattern it's just a number you have to find for how many boids and the screen which screen size, what's is the best number of groups you need to create.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JOPCt.png" />
  <row Id="32191" PostHistoryTypeId="2" PostId="14371" RevisionGUID="6c15cf54-fe88-400c-93e3-451a1f4b15be" CreationDate="2011-07-01T13:45:48.440" UserId="8050" Text="I'm assuming yours is a toroidal system, you can partition to the space so each unit has its sub area.&#xD;&#xA;&#xD;&#xA;At each step the particles are moved, the particles that goes out the sub area are sent to the relevant processor; a communication step will syncronize the processors and a last poststep is taken to elaborate the foreign particles position (if any).&#xD;&#xA;&#xD;&#xA;Here there are three problems here:&#xD;&#xA;&#xD;&#xA;* 1) the shape of the sub area:&#xD;&#xA;&#xD;&#xA;One can opt to rectangles but the show a small Area/perimeter ratio compared to cirlces. The bigger the border the more particles will leave. While the cicles exhibits the best A/p ratio, can not be used for tessellation, so you should indagate for some (possibily semi regular) tessellation with a good average A/p ratio. Obviously computing the tassel index by cell coordinate should be simple so consider this before to try a very exotic tasselation.&#xD;&#xA;&#xD;&#xA;* 2) the communicationprotocol:&#xD;&#xA;&#xD;&#xA;Depending upon what kind of communication infrastructure you have, you can think how to scatter the border-crossing informations among the processors. Broadcasting vs peer-to-peer reconstruction vs peer-to-peer communication are all options.&#xD;&#xA;&#xD;&#xA;* 3) the sub-Area Allocation:&#xD;&#xA;&#xD;&#xA;You should keep your elaboration balanced since there is a syncronizzation at each step. You can choose to statically or dynamically allocate areas to processors. This is not a big issue if your space is unifomly covered by active particles but i belive that it can be untrue in this case as collisions deactivate the particles.Changing the allocation requires an heavier communication step; some shortcut can be taken if all the processors shares the cross-border informations but you have to do some consideration about it" />
  <row Id="32192" PostHistoryTypeId="2" PostId="14372" RevisionGUID="e2f4540b-b426-44ee-b097-c490dbad8858" CreationDate="2011-07-01T15:08:29.113" UserId="4546" Text="The master's thesis [Parallel Simulation of Particle Fluids](http://www8.cs.umu.se/education/examina/Rapporter/MattiasLinde.pdf) by Mattias Linde might offer some insight into data partitioning and algorithms for large-scale simulation.&#xD;&#xA;&#xD;&#xA;His paper is geared towards [Smoothed-Particle Hydrodynamics](http://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics), which for the naive solution tends to use Spatial Hashing with a bucket size around the size of the kernel footprint of the particles in the simulation.&#xD;&#xA;&#xD;&#xA;As the interaction distance is hard-clamped in typical SPH kernels, such partitioning optimizations are almost essential in scaling up the system." />
  <row Id="32193" PostHistoryTypeId="2" PostId="14373" RevisionGUID="001bf09d-8330-424f-846a-47e8be4ec7d3" CreationDate="2011-07-01T15:09:11.230" UserId="5932" Text="I have a fairly sizable game engine created, and I'm adding some needed features, such as this, how do I find the nearest object from a list of points?&#xD;&#xA;&#xD;&#xA;In this case, I could simply use the Pythagorean theorem to find the distance, and check the results. I know I can't simply add x and y, because that's the distance to the object, if you only took right angle turns. However I'm wondering if there's *something* else I could do?&#xD;&#xA;&#xD;&#xA;I also have a collision system, where essentially I turn objects into smaller objects on a smaller grid, kind of like a minimap, and only if objects exist in the same gridspace do I check for collisions, I could do the same thing, only make the gridspace larger to check for closeness. (rather than checking every. single. object) however that would take additional setup in my base class and clutter up the already cluttered object. &#xD;&#xA;&#xD;&#xA;**TL;DR Question:**&#xD;&#xA;&#xD;&#xA;Is there something efficient and accurate that I can use to detect which object is closest, based on a list of points and sizes?" />
  <row Id="32194" PostHistoryTypeId="1" PostId="14373" RevisionGUID="001bf09d-8330-424f-846a-47e8be4ec7d3" CreationDate="2011-07-01T15:09:11.230" UserId="5932" Text="Find Nearest Object" />
  <row Id="32195" PostHistoryTypeId="3" PostId="14373" RevisionGUID="001bf09d-8330-424f-846a-47e8be4ec7d3" CreationDate="2011-07-01T15:09:11.230" UserId="5932" Text="&lt;c++&gt;&lt;2d&gt;&lt;algorithm&gt;" />
  <row Id="32196" PostHistoryTypeId="2" PostId="14374" RevisionGUID="17cb8955-6451-46bf-8a27-169f81554bc0" CreationDate="2011-07-01T15:20:46.940" UserId="8364" Text="Generally speaking you should design your game so that anything which *has* to be seen is drawn within the bounds of the TitleSafeArea, not the Viewport itself. You can find the size of the TitleSafeArea using the TitleSafeArea property of Microsoft.Xna.Framework.Graphics.Viewport structure. The size of the TitleSafeArea rectangle will change for different displays and platforms.  &#xD;&#xA;&#xD;&#xA;Without testing every size, type and model of TV ever made, you can't know that anything drawn to screen coordinates outside this TitleSafeArea will actually be displayed for a given user. On the other hand, you can be sure anything drawn inside this area will be displayed." />
  <row Id="32197" PostHistoryTypeId="25" PostId="14373" RevisionGUID="44deec3e-4c75-48f4-a6ec-e97ec48ba3ae" CreationDate="2011-07-01T15:26:10.373" Comment="http://twitter.com/#!/StackGameDev/status/86817874261446656" />
  <row Id="32199" PostHistoryTypeId="17" PostId="14375" RevisionGUID="f166e0bb-7de8-495c-824f-0a18b6f8103d" CreationDate="2011-07-01T15:39:45.513" UserId="-1" Comment="from http://stackoverflow.com/questions/3624363/free-royalty-free-music-repository" Text="" />
  <row Id="32200" PostHistoryTypeId="17" PostId="14376" RevisionGUID="279e9edb-767a-416c-a8be-5ffcbd8f30ee" CreationDate="2011-07-01T15:39:45.513" UserId="-1" Comment="from http://stackoverflow.com/questions/3624363/free-royalty-free-music-repository" Text="" />
  <row Id="32201" PostHistoryTypeId="2" PostId="14376" RevisionGUID="b4566d48-1e52-42a1-b95a-077e94c2f6de" CreationDate="2011-06-30T12:17:25.770" UserDisplayName="lynn" Text="I've looked as well and haven't found a single source for royalty-free music and sound effects. Instead it's become a growing list of individual such sites. So far I like:&#xD;&#xA;&#xD;&#xA;- Kevin MacLeod's Royalty-Free Music site at http://www.incompetech.com/m/c/royalty-free/&#xD;&#xA;- PacDV's free sound effects site: http://www.pacdv.com/sounds/index.html&#xD;&#xA;&#xD;&#xA;There are others linked from those two if you click through a bit. (Note: I have no professional arrangement with these sites or any site they link to. I don't stand to benefit from anyone's use of their sites. Just passing along what I've found.)" />
  <row Id="32202" PostHistoryTypeId="2" PostId="14375" RevisionGUID="4305b9ca-7c7f-4b93-839a-97659e26b264" CreationDate="2010-09-02T06:42:52.890" UserId="3556" Text="I am developing an iPhone game and is sourcing for some in-game background music. It's a puzzle game and so music for meditation or yoga are probably suitable too.&#xD;&#xA;&#xD;&#xA;So my question is where to look for such open source-like music repository, just like source code on [github][1] and artworks on [deviantart][2] ... ? Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/&#xD;&#xA;  [2]: http://www.deviantart.com/" />
  <row Id="32203" PostHistoryTypeId="1" PostId="14375" RevisionGUID="4305b9ca-7c7f-4b93-839a-97659e26b264" CreationDate="2010-09-02T06:42:52.890" UserId="3556" Text="Free Royalty-free music repository?" />
  <row Id="32204" PostHistoryTypeId="3" PostId="14375" RevisionGUID="4305b9ca-7c7f-4b93-839a-97659e26b264" CreationDate="2010-09-02T06:42:52.890" UserId="3556" Text="&lt;iphone&gt;&lt;music&gt;" />
  <row Id="32205" PostHistoryTypeId="2" PostId="14377" RevisionGUID="4ca1c241-d23a-4055-a8c0-42c786c0c8b9" CreationDate="2011-07-01T15:43:13.560" UserId="5224" Text="You have to do spatial partitioning, in this case you make an efficient data structure (usually an octree). In this case each object is inside one or more spaces (cubes) And if you know in which spaces you are you can look up O(1) which spaces are your neighbors. &#xD;&#xA;&#xD;&#xA;In this case the nearest object can be found by first iterating over all objects in your own space looking to which one is the closest there. If there is no-one there you can check your first neighbors, if no-one is there you can check their neighbors, etc...&#xD;&#xA;&#xD;&#xA;This way you can easily find the nearest object without having to iterate through all objects in your world. As usual this speed gain does require a bit of bookkeeping, but it's really useful for all kinds of stuff so if you have a big world it's definitely worth implementing spatial partitioning and an octree.&#xD;&#xA;&#xD;&#xA;As usual, see also the wikipedia article: http://en.wikipedia.org/wiki/Octree" />
  <row Id="32206" PostHistoryTypeId="5" PostId="14375" RevisionGUID="1aeb4540-579a-413a-8e84-db4d1b5671f2" CreationDate="2011-07-01T15:52:50.547" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free music for my game?](http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am developing an iPhone game and is sourcing for some in-game background music. It's a puzzle game and so music for meditation or yoga are probably suitable too.&#xD;&#xA;&#xD;&#xA;So my question is where to look for such open source-like music repository, just like source code on [github][1] and artworks on [deviantart][2] ... ? Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://github.com/&#xD;&#xA;  [2]: http://www.deviantart.com/" />
  <row Id="32207" PostHistoryTypeId="10" PostId="14375" RevisionGUID="db8f1760-4e95-4e35-b8cb-72638e794fc2" CreationDate="2011-07-01T15:52:49.940" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32208" PostHistoryTypeId="2" PostId="14378" RevisionGUID="9b3ff404-3176-46c8-9cd0-89fa7a63011f" CreationDate="2011-07-01T16:12:33.520" UserId="7432" Text="If you have more than one activity that you are using, you are going to need to set the orientation for all of them to landscape, if you have one as landscape and another as portrait. When you switch over to the other activity it will crash unless you have it set up properly to do that. If I knew how to post the code from my manifest to where it shows up I would. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The link explains if you want to switch between orientations.&lt;br&gt;&#xD;&#xA;http://developer.android.com/resources/articles/faster-screen-orientation-change.html&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32209" PostHistoryTypeId="2" PostId="14379" RevisionGUID="8f6f694c-b20a-4f62-b6ac-183e7905804c" CreationDate="2011-07-01T16:28:46.087" UserId="5660" Text="sqrt() is continuous, meaning&#xD;&#xA;&#xD;&#xA;    if sqrt(x) &lt; sqrt(y) then x &lt; y&#xD;&#xA;&#xD;&#xA;and vice versa&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So if you only want to compare two distances but are not interested in their actual values you can just cut out the sqrt-step from your pythagoras-stuff:&#xD;&#xA;&#xD;&#xA;    pseudoDistanceB = (A.x - B.x)² + (A.y - B.y)²&#xD;&#xA;    pseudoDistanceC = (A.x - C.x)² + (A.y - C.y)²&#xD;&#xA;    if (distB &lt; distC)&#xD;&#xA;    {&#xD;&#xA;        A is closest to B!&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        A is closest to C!&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It's not as efficient as the oct-tree thing, but it's easier to implement and does bump up the speed at least a little bit&#xD;&#xA;" />
  <row Id="32211" PostHistoryTypeId="2" PostId="14380" RevisionGUID="f1e5dd85-d06c-435d-97d8-93d26ce46d9a" CreationDate="2011-07-01T16:31:31.443" UserId="1742" Text="The term I learned a long time ago was a game's speed of information.&#xD;&#xA;&#xD;&#xA;If the speed of your boids is 1 and they only care about their neighbours, then the speed of information is 3, that is, a boid that is two squares away from you could be within the range you care about within one frame:&#xD;&#xA;&#xD;&#xA;1 square movement per boid in the interaction (1+1) plus the distance that you can notice things (1) equals 3.&#xD;&#xA;&#xD;&#xA;Given this, we learn that we can chunk off a map into pieces, sized as small as we like, but with this speed of information overlap into any neighbouring chunks.&#xD;&#xA;&#xD;&#xA;I'll assume you're allowing your boids to move only one square, but they can see three&#xD;&#xA;&#xD;&#xA;If you want to run a massive parallel sim, you chunk off into 10x10 grids, but overlap by 5 squares on each edge. Whenever one of your ends up being within the information distance from the local chunk's edge, you should update the neighbour, and once they traverse the boundary, they don't belong to you. If a neighbour says that a boid they are controlling has moved into your chunk, you have to take over it's AI.&#xD;&#xA;&#xD;&#xA;This means that communication is localised to the neighbouring chunk managers, and the traffic is reduced to a minimum. The more jobs you run, the more CPUs you can use to power the simulation, but the more jobs you run, the more overlap their is, and therefore the more information passing between jobs/chunks as the simulation progresses. This is where you have to get heavy handed and tune the chunk size based on the AI complexity and what hardware you have available." />
  <row Id="32212" PostHistoryTypeId="5" PostId="14366" RevisionGUID="54fdd264-76f5-4461-910f-fa9952bf5e82" CreationDate="2011-07-01T16:41:48.557" UserId="962" Comment="deleted 17 characters in body; edited title" Text="I am beginner in android game development. I want my game to run only in landscape fullscreen mode (currently I have Optimus 2X with resolution 800x480 in landscape), and I don't know how to set it.&#xD;&#xA;&#xD;&#xA;I found the fullscreen mode settings, and tried some landscape mod (set orientation:landscape in AndroidManifest), but the game is now crashing and its very unstable (eg. when i change phone orientation). &#xD;&#xA;&#xD;&#xA;So is there any way to do that? " />
  <row Id="32213" PostHistoryTypeId="4" PostId="14366" RevisionGUID="54fdd264-76f5-4461-910f-fa9952bf5e82" CreationDate="2011-07-01T16:41:48.557" UserId="962" Comment="deleted 17 characters in body; edited title" Text="Android landscape mode game." />
  <row Id="32214" PostHistoryTypeId="2" PostId="14381" RevisionGUID="202877dd-35f5-46a3-979b-a62c78596b1d" CreationDate="2011-07-01T18:01:21.663" UserId="8365" Text="I'm making a 2D game that ends up being too dark on some laptops, so I figured I'd use a shader so people could brighten it up if need be.  Unfortunately, once I got it in there nothing would fade in or out, they'd just pop in and out.  &#xD;&#xA;&#xD;&#xA;Here's my FX file&#xD;&#xA;&#xD;&#xA;    float intensity;&#xD;&#xA;&#xD;&#xA;    sampler TextureSampler : register(s0);&#xD;&#xA;&#xD;&#xA;    float4 Glow(float2 texCoord:TEXCOORD0):COLOR0&#xD;&#xA;    {&#xD;&#xA;    	float4 Color;&#xD;&#xA;    	Color = tex2D(TextureSampler, texCoord.xy);&#xD;&#xA;    	Color.rgb *= intensity;&#xD;&#xA;    	return Color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    technique Technique1&#xD;&#xA;    {&#xD;&#xA;    	pass Glow&#xD;&#xA;    	{&#xD;&#xA;    		PixelShader=compile ps_2_0 Glow();&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Even after commenting out the `Color.rgb *= intensity;` line it still removes all fading effects.&#xD;&#xA;&#xD;&#xA;I'm using the sprite batch to draw, and I begin and end it a few times because I use different BlendStates&#xD;&#xA;&#xD;&#xA;    brightnessShader.Parameters[&quot;intensity&quot;].SetValue(brightness);&#xD;&#xA;    spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, brightnessShader, Matrix.CreateScale(scale));&#xD;&#xA;    ...&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;    spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, brightnessShader, Matrix.CreateScale(scale));&#xD;&#xA;    ....&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;    spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, brightnessShader, Matrix.CreateScale(scale));&#xD;&#xA;    ...&#xD;&#xA;    spriteBatch.End();    &#xD;&#xA;&#xD;&#xA;I'm using XNA 4.0." />
  <row Id="32215" PostHistoryTypeId="1" PostId="14381" RevisionGUID="202877dd-35f5-46a3-979b-a62c78596b1d" CreationDate="2011-07-01T18:01:21.663" UserId="8365" Text="Using a shader messes up my alpha in XNA." />
  <row Id="32216" PostHistoryTypeId="3" PostId="14381" RevisionGUID="202877dd-35f5-46a3-979b-a62c78596b1d" CreationDate="2011-07-01T18:01:21.663" UserId="8365" Text="&lt;shaders&gt;&lt;xna-4.0&gt;" />
  <row Id="32217" PostHistoryTypeId="2" PostId="14382" RevisionGUID="0c6073e7-3a24-4751-8716-88f3f17dad0e" CreationDate="2011-07-01T18:09:39.160" UserId="7911" Text="Maybe try organizing your spatial data in an RTree, which is kind of like a btree for stuff in space and allows queries like &quot;nearest N neighbors&quot; etc...  http://en.wikipedia.org/wiki/Rtree&#xD;&#xA;" />
  <row Id="32219" PostHistoryTypeId="25" PostId="14369" RevisionGUID="fdae674c-5908-4a73-b837-c0345c77c3ee" CreationDate="2011-07-01T18:26:10.243" Comment="http://twitter.com/#!/StackGameDev/status/86863176297226240" />
  <row Id="32221" PostHistoryTypeId="2" PostId="14383" RevisionGUID="fa5396d4-8f61-408e-9f95-71f6854c4ffa" CreationDate="2011-07-01T18:55:59.943" UserId="6362" Text="I'm working on a game where some in-game events need to happen once in a while. A nice example would be a tutorial.&#xD;&#xA;You start the game, and at several points in the game an event occurs:&#xD;&#xA;&#xD;&#xA;- You encounter your first enemy, the game pauses and you receive an explanation on how to kill it&#xD;&#xA;- You killed the first enemy, you receive a &quot;good job&quot; message&#xD;&#xA;- You gain a new item, a menu with the items stats popup&#xD;&#xA;- etc etc&#xD;&#xA;&#xD;&#xA;The game I'm working on is a puzzle game where the rules in the game are pretty much all the same, so it seems inefficient to hardcode all these events in seperate levels. &#xD;&#xA;&#xD;&#xA;Should I somehow define these events in an external source, like xml? Then write an intrepeter that reads out the xml and sets the events requirements for the level.&#xD;&#xA;I'm not sure how I could define an event that should occur when you killed 2 enemies for example.&#xD;&#xA;&#xD;&#xA;Just to be clear, i'm not looking for the best programming language or scripting language to do this, but more at the best method to handle this.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="32222" PostHistoryTypeId="1" PostId="14383" RevisionGUID="fa5396d4-8f61-408e-9f95-71f6854c4ffa" CreationDate="2011-07-01T18:55:59.943" UserId="6362" Text="Best way to manage in-game events?" />
  <row Id="32223" PostHistoryTypeId="3" PostId="14383" RevisionGUID="fa5396d4-8f61-408e-9f95-71f6854c4ffa" CreationDate="2011-07-01T18:55:59.943" UserId="6362" Text="&lt;game-mechanics&gt;&lt;events&gt;" />
  <row Id="32224" PostHistoryTypeId="2" PostId="14384" RevisionGUID="d5cdcdca-0219-4de6-9655-5c6875612a31" CreationDate="2011-07-01T20:03:13.083" UserId="7881" Text="The problem with a [quad][1]/[octree][2] in nearest-neighbor searches is that the closest object may be sitting right across the division between nodes. For collisions, this is okay, because it it's not in the node, we don't care about it. But consider this 2D example with a quadtree:&#xD;&#xA;&#xD;&#xA;![Quadtree example][3]&#xD;&#xA;&#xD;&#xA;Here, even though the black item and green item are in the same node, the black item is closest to the blue item. [ultifinitus' answer][4] can only guarantee the nearest-neighbor only every item in your tree is placed in the smallest possible node that could contain it, or in a unique node - this leads to more inefficient quadtrees. (Note that there are many different ways to implement a structure which could be called a quad/octree - more strict implementations may work better in this application.)&#xD;&#xA;&#xD;&#xA;A better option would be a [kd-tree][5]. Kd-trees have a very efficient [nearest-neighbor search][6] algorithm you can implement, and can contain any number of dimensions (hence &quot;k&quot; dimensions.)&#xD;&#xA;&#xD;&#xA;A great and informative animation from Wikipedia:&#xD;&#xA;![kd-tree nearest-neighbor search][7]&#xD;&#xA;&#xD;&#xA;The biggest problem with using kd-trees, if I recall correctly, is that they are more difficult to insert/remove items from while maintaining balance. Therefore, I would recommend using one kd-tree for static objects such as houses and trees which is highly balanced, and another which contains players and vehicles, which needs balancing regularly. Find the nearest static object and the nearest mobile object, and compare those two.&#xD;&#xA;&#xD;&#xA;Lastly, kd-trees are relatively simple to implement, and I'm sure you can find a multitude of C++ libraries with them. From what I remember, R-trees are much more complicated, and probably overkill if all you need is a simple nearest-neighbor search.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree&#xD;&#xA;  [3]: http://i.stack.imgur.com/MidqP.png&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/q/14373/7881&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Kd-tree&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Kd-tree#Nearest_neighbour_search&#xD;&#xA;  [7]: http://i.stack.imgur.com/OWDEX.gif" />
  <row Id="32225" PostHistoryTypeId="5" PostId="14384" RevisionGUID="05987dc7-71b5-42cf-9737-7c275615bbba" CreationDate="2011-07-01T20:10:19.630" UserId="7881" Comment="edited body" Text="The problem with a [quad][1]/[octree][2] in nearest-neighbor searches is that the closest object may be sitting right across the division between nodes. For collisions, this is okay, because it it's not in the node, we don't care about it. But consider this 2D example with a quadtree:&#xD;&#xA;&#xD;&#xA;![Quadtree example][3]&#xD;&#xA;&#xD;&#xA;Here, even though the black item and green item are in the same node, the black item is closest to the blue item. [ultifinitus' answer][4] can only guarantee the nearest-neighbor only every item in your tree is placed in the smallest possible node that could contain it, or in a unique node - this leads to more inefficient quadtrees. (Note that there are many different ways to implement a structure which could be called a quad/octree - more strict implementations may work better in this application.)&#xD;&#xA;&#xD;&#xA;A better option would be a [kd-tree][5]. Kd-trees have a very efficient [nearest-neighbor search][6] algorithm you can implement, and can contain any number of dimensions (hence &quot;k&quot; dimensions.)&#xD;&#xA;&#xD;&#xA;A great and informative animation from Wikipedia:&#xD;&#xA;![kd-tree nearest-neighbor search][7]&#xD;&#xA;&#xD;&#xA;The biggest problem with using kd-trees, if I recall correctly, is that they are more difficult to insert/remove items from while maintaining balance. Therefore, I would recommend using one kd-tree for static objects such as houses and trees which is highly balanced, and another which contains players and vehicles, which needs balancing regularly. Find the nearest static object and the nearest mobile object, and compare those two.&#xD;&#xA;&#xD;&#xA;Lastly, kd-trees are relatively simple to implement, and I'm sure you can find a multitude of C++ libraries with them. From what I remember, R-trees are much more complicated, and probably overkill if all you need is a simple nearest-neighbor search.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree&#xD;&#xA;  [3]: http://i.stack.imgur.com/JkQCY.png&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/q/14373/7881&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Kd-tree&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Kd-tree#Nearest_neighbour_search&#xD;&#xA;  [7]: http://i.stack.imgur.com/OWDEX.gif" />
  <row Id="32226" PostHistoryTypeId="2" PostId="14385" RevisionGUID="d43360f3-9852-4598-b53b-c546690460d6" CreationDate="2011-07-01T20:11:22.657" UserId="6588" Text="This depends a lot on how the events are actually communicated between objects in your game. For example, if you are using a central messaging system then you could have a tutorial module that listens for certain messages and creates tutorial popups whenever it hears certain messages. Then you could set what message to listen for, along with what popup to show, in an XML file or something that is parsed by the tutorial module. By having a separate tutorial object that monitors the game state and displays tutorial popups when it notices stuff in the game, you can change the tutorial object at will without needing to change anything else about your game. (Is this the Observer pattern? I'm not familiar with all the design patterns.)&#xD;&#xA;&#xD;&#xA;Overall though it depends on the complexity of your tutorial if it is worth worrying about this. Hard-coding the events in your code and/or levels doesn't seem like a big deal to me for just a handful of tutorial popups. I am curious what exactly you have in mind that makes you think it'll be inefficient, since all you should be doing every trigger is just dispatching a message to the tutorial module, something like TutorialModule.show(&quot;1st_kill&quot;);" />
  <row Id="32227" PostHistoryTypeId="6" PostId="14383" RevisionGUID="9eaa2fc6-26d6-4c45-88f1-0a09e9b972ef" CreationDate="2011-07-01T20:33:07.203" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;events&gt;" />
  <row Id="32228" PostHistoryTypeId="2" PostId="14386" RevisionGUID="e6affb5a-3d07-41a9-8c58-dd482a3758e2" CreationDate="2011-07-01T21:23:29.797" UserId="229" Text="Here you go: 20 online lessons. It starts from &quot;zero&quot;, but you can skip/skim the beginner parts. Also perhaps the school offers more advanced material.&#xD;&#xA;&#xD;&#xA;#[Introduction to C++ with Game Development][1]&lt;br&gt;&#xD;&#xA;###Learning C++ in the context of game development&#xD;&#xA;&#xD;&#xA;&gt; Welcome to the first article of&#xD;&#xA;&gt; Learning C++ tutorial series, provided&#xD;&#xA;&gt; by the IGAD program of the NHTV&#xD;&#xA;&gt; University! These tutorials are&#xD;&#xA;&gt; designed to take you from zero to&#xD;&#xA;&gt; block 3 entry level of IGAD's program&#xD;&#xA;&gt; in a somewhat smooth fashion. We start&#xD;&#xA;&gt; at the absolute basics: all that you&#xD;&#xA;&gt; need to get started is some decent&#xD;&#xA;&gt; equipment, a fair bit of time, and&#xD;&#xA;&gt; quite a bit of dedication.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&gt; A quick blurb about us: IGAD stands&#xD;&#xA;&gt; for &quot;International Game Architecture &amp;&#xD;&#xA;&gt; Design&quot;. We are a Dutch accredited&#xD;&#xA;&gt; course for game development, ran&#xD;&#xA;&gt; almost exclusively by teachers with&#xD;&#xA;&gt; game industry experience. We started&#xD;&#xA;&gt; in 2005, and so far, it's awesome.&#xD;&#xA;&gt; About the authors&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; This tutorial is written by Jacco&#xD;&#xA;&gt; Bikker, Brian Beuken, Nils Deslé, and&#xD;&#xA;&gt; Carlos Bott. Look us up on the&#xD;&#xA;&gt; internet to find out about we did and&#xD;&#xA;&gt; still do related to games development.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.devmaster.net/articles/intro-to-c++-with-game-dev/part1.php" />
  <row Id="32229" PostHistoryTypeId="25" PostId="14383" RevisionGUID="2136cd4c-8329-401b-b565-f7a0248ffe9b" CreationDate="2011-07-01T21:26:11.547" Comment="http://twitter.com/#!/StackGameDev/status/86908480132354048" />
  <row Id="32230" PostHistoryTypeId="2" PostId="14387" RevisionGUID="bbf0c2ff-c0ee-4c9b-8959-b78adb601519" CreationDate="2011-07-01T22:21:36.693" UserId="8371" Text="You will probably want to define the types of polygons that you support. The easiest would be triangles since they can be rendered by OpenGL, and they also have a wealth of literature on the topic of &quot;Ray/Triangle Intersection&quot;.&#xD;&#xA;&#xD;&#xA;Once you pick your set of supported shapes, you will need to implement the required Ray/Shape intersection tests for each shape.&#xD;&#xA;&#xD;&#xA;Assuming you are there, and that you implement a method for shape that is:&#xD;&#xA;double GetIntersectionT(Ray r)&#xD;&#xA;- Returns -1.0 if the intersection test fails&#xD;&#xA;&#xD;&#xA;You iterate over all of your scene shapes (Yes there are spatial partitioning schemes, but you obviously aren't there yet), and call this method on each of them. Store the smallest **positive** result along with the shape that returned it. Once all shapes have been tested, you know the first object to get hit.&#xD;&#xA;&#xD;&#xA;The beauty of this method is that it also allows you to constrain T in such a way that you can ignore shapes that are too far out if you wanted to.&#xD;&#xA;&#xD;&#xA;Also, if you are asking how to do this with OpenGL, you should know (At least this is as much as I know) is that OpenGL is **only** a rendering engine, and not a physics engine (what you are trying to build), and therefore you will need your own API to test these things." />
  <row Id="32231" PostHistoryTypeId="2" PostId="14388" RevisionGUID="21e8fc1a-954a-4aff-bb5a-8ea3bb540246" CreationDate="2011-07-01T22:43:58.563" UserId="2061" Text="&gt; 1. For when a formula is defined, like in the case of D&amp;D, which is `Experience = Level*(Level-1)*500`&#xD;&#xA;&#xD;&#xA;I agree that you should implement what is easiest, rather than worrying about performance, because cases like this will have little or no performance impact either way.  However, in this case, it would be easier to just solve the equation for `Level` using high-school algebra than to take the time to code some sort of lookup table, as suggested by everyone else.&#xD;&#xA;&#xD;&#xA;That specific equation can be solved using the [quadratic formula][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula" />
  <row Id="32232" PostHistoryTypeId="2" PostId="14389" RevisionGUID="f18ab138-fe76-4d82-be84-d62a3c19eb18" CreationDate="2011-07-01T22:56:24.443" UserId="7911" Text="If your source bitmap is compressed with DXT1 you'll only get 1bit of alpha, on or off.  DXT3 is a little better with 4bit so 16 total alpha values.&#xD;&#xA;" />
  <row Id="32233" PostHistoryTypeId="2" PostId="14390" RevisionGUID="1031288c-b1ff-40b8-95a9-bd4eb98ab795" CreationDate="2011-07-01T23:44:47.147" UserId="2164" Text="In the menu system for our game (selecting levels, options, etc.), the player presses the a button on the gamepad to go to the next screen. I coded the menu system to wait until the button is released before taking any action (i.e., displaying the next screen). Some recent playtest feedback suggested that we do it the opposite way: take action as soon as the button is pressed.  I am curious, what is the standard way this is handled, and does it even make a difference?" />
  <row Id="32234" PostHistoryTypeId="1" PostId="14390" RevisionGUID="1031288c-b1ff-40b8-95a9-bd4eb98ab795" CreationDate="2011-07-01T23:44:47.147" UserId="2164" Text="In a GUI, should input be handled when the button is pressed or released?" />
  <row Id="32235" PostHistoryTypeId="3" PostId="14390" RevisionGUID="1031288c-b1ff-40b8-95a9-bd4eb98ab795" CreationDate="2011-07-01T23:44:47.147" UserId="2164" Text="&lt;input&gt;&lt;gui&gt;" />
  <row Id="32236" PostHistoryTypeId="2" PostId="14391" RevisionGUID="caede43c-e8d5-4629-82f1-c912ec44a5c8" CreationDate="2011-07-01T23:49:50.357" UserId="8373" Text="As an exercise in trying to learn 3D math, I've been experimenting with hit-testing by casting a ray from 2D screen space into 3D world space. My first attempt was as follows:&#xD;&#xA;&#xD;&#xA;    Matrix m = Matrix.Invert(&#xD;&#xA;        this.scene.Camera.ViewMatrix *&#xD;&#xA;        this.scene.Camera.ProjectionMatrix *&#xD;&#xA;        homogeneousToViewportTransform());&#xD;&#xA;    Vector3 rayOrigin = Vector3.TransformCoordinate(new Vector3(p.X, p.Y, 0), m);&#xD;&#xA;    Vector3 rayVector = Vector3.TransformCoordinate(new Vector3(0, 0, -1), m);&#xD;&#xA;&#xD;&#xA;This gets the ray origin correct, but not the ray vector. My reasoning was that the vector [0, 0, -1] is facing into the screen when in screen space, so transforming that into world space would give the correct vector. But that doesn't seem to be the case. Looking around, I've found that the correct way to calculate this is by doing:&#xD;&#xA;&#xD;&#xA;    Vector3 rayVector = new Vector3(&#xD;&#xA;        m.M31 - (m.M34 * rayOrigin.X),&#xD;&#xA;        m.M32 - (m.M34 * rayOrigin.Y),&#xD;&#xA;        m.M33 - (m.M34 * rayOrigin.Z));&#xD;&#xA;    rayVector.Normalize();&#xD;&#xA;&#xD;&#xA;Can anyone explain what's wrong with my original reasoning, and what the actual algorithm for calculating the ray vector is doing?" />
  <row Id="32237" PostHistoryTypeId="1" PostId="14391" RevisionGUID="caede43c-e8d5-4629-82f1-c912ec44a5c8" CreationDate="2011-07-01T23:49:50.357" UserId="8373" Text="Casting ray from 2D to 3D" />
  <row Id="32238" PostHistoryTypeId="3" PostId="14391" RevisionGUID="caede43c-e8d5-4629-82f1-c912ec44a5c8" CreationDate="2011-07-01T23:49:50.357" UserId="8373" Text="&lt;3d&gt;&lt;math&gt;" />
  <row Id="32239" PostHistoryTypeId="2" PostId="14392" RevisionGUID="8f6b2c68-f9f9-40ba-9726-76daad3ac35b" CreationDate="2011-07-02T00:21:51.053" UserId="8374" Text="I'd take action as soon as the key is pressed.&#xD;&#xA;&#xD;&#xA;The best example where the action took place after the key was released was in Starcraft: Broodwar. When I would press the keys very quickly, I would often press the next key before completely releasing the previous one which led to some commands being ignored. (1A Click, 2A Click, 3A Click -  the 2 would be ignored) &#xD;&#xA;&#xD;&#xA;This was changed in Warcraft III and the game felt a lot more responsive to me as a result and I never had the 'sticky control group' problems from Broodwar." />
  <row Id="32240" PostHistoryTypeId="25" PostId="14381" RevisionGUID="6da340a2-d295-4764-b87d-a2519b395f5f" CreationDate="2011-07-02T00:26:13.270" Comment="http://twitter.com/#!/StackGameDev/status/86953785817178112" />
  <row Id="32241" PostHistoryTypeId="2" PostId="14393" RevisionGUID="4b11d5a1-a3e5-4668-8163-987a7c254fa4" CreationDate="2011-07-02T00:28:31.920" UserId="7728" Text="In a game which is controlled by a gamepad, where control inputs directly change GUI focus from one GUI button to another, those GUI buttons should be activated when a controller button is *pressed*.&#xD;&#xA;&#xD;&#xA;In a game which is controlled by a mouse (or if a gamepad is used to move a virtual mouse cursor around the screen), on-screen buttons should be activated when the mouse/controller button is *released* over the same button on which it was *pressed*.  (If the press occurred over one GUI button, and the mouse was then moved, and released over a different GUI button, neither GUI button is activated)&#xD;&#xA;&#xD;&#xA;The reason for this is that people's mouse control skills are highly variable, and often people have a little trouble positioning the cursor exactly where they want it, or even telling precisely which GUI button they're hovering over at the moment.  The theory is that people can press and hold the mouse button to make the GUI button highlight, and if that GUI button wasn't the one that they intended to use, they can move their cursor away from it before releasing the mouse button in order to avoid pressing it.&#xD;&#xA;&#xD;&#xA;But if your game is being controlled by a gamepad, then you absolutely want to take action when the gamepad button is pressed, not when it's released." />
  <row Id="32242" PostHistoryTypeId="2" PostId="14394" RevisionGUID="aa59e036-5928-422e-bc6d-3c9ade0e41de" CreationDate="2011-07-02T01:38:18.993" UserId="8375" Text="Perhaps [this](http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/MousePicking) would be of use? It's (probably the best) article on mouse picking." />
  <row Id="32243" PostHistoryTypeId="2" PostId="14395" RevisionGUID="33e54eee-2b20-4ce2-9b66-0a4d91c725aa" CreationDate="2011-07-02T01:59:43.260" UserId="288" Text="`SpriteBatch` passes in both a colour and a texture coordinate. You need to use the colour parameter. Here is the XNA `SpriteBatch` pixel shader (from XNA 2.0)&#xD;&#xA;&#xD;&#xA;    void SpritePixelShader(inout float4 color : COLOR0, float2 texCoord : TEXCOORD0)&#xD;&#xA;    {&#xD;&#xA;        color *= tex2D(TextureSampler, texCoord);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So your shader would need to be something like this:&#xD;&#xA;&#xD;&#xA;    void SpritePixelShader(inout float4 color : COLOR0, float2 texCoord : TEXCOORD0)&#xD;&#xA;    {&#xD;&#xA;        color *= tex2D(TextureSampler, texCoord);&#xD;&#xA;        color.rgb *= intensity;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Also be aware of &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx&quot;&gt;premultiplied alpha&lt;/a&gt;, which was &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/04/08/premultiplied-alpha-in-xna-game-studio-4-0.aspx&quot;&gt;added in XNA 4.0&lt;/a&gt;. Simply multiplying the RGB values may give you a result that is different to what you actually want to achieve.&#xD;&#xA;&#xD;&#xA;Probably a better solution to your problem would be to render your entire scene as normal to a render target, and then gamma-correct that render target using a post-process pixel shader." />
  <row Id="32244" PostHistoryTypeId="5" PostId="14321" RevisionGUID="c0b8809e-59c5-453f-b5f9-a1726bec31bc" CreationDate="2011-07-02T02:07:02.190" UserId="6592" Comment="added 749 characters in body" Text="Two things I'm quite confused about.&#xD;&#xA;&#xD;&#xA;1) OpenGL ES 2.0 creates primitives before the vertex shader is invoked. Why, then, does it not automatically provide the vertex shader the position of the vertex?&#xD;&#xA;&#xD;&#xA;2) OpenGL ES 2.0 supports `glDrawElements()`, but it does not support `glEnableClientState()` or `GL_VERTEX_ARRAY`, so how can this call possibly be used to construct primitives?&#xD;&#xA;&#xD;&#xA;NOTE: this is OpenGL ES 2.0, NOT normal OpenGL!&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;Resolution:&#xD;&#xA;&#xD;&#xA;I think my confusion was stemming from the built in variable gl_Vertex that some versions of GLSL support (according to some sources, I couldn't find this in the official documentation at http://www.opengl.org/sdk/docs/manglsl/) which gives you the position of the vector provided to the draw command. This isn't present in GL ES. Further, my code was't working, and as GLSL can be difficult to debug, I had no idea what was going on :)&#xD;&#xA;&#xD;&#xA;In this case, using vertex attributes and passing the model-space location of the vertices and my transformation matrix allows me to transform the vertices correctly. I'm still unsure why the vertex shader can't (in all cases) get the location of the vertex as supplied to the draw command." />
  <row Id="32252" PostHistoryTypeId="25" PostId="14390" RevisionGUID="d693b575-7e2d-40b7-ad15-dbce3e86c850" CreationDate="2011-07-02T03:26:13.637" Comment="http://twitter.com/#!/StackGameDev/status/86999086644989952" />
  <row Id="32253" PostHistoryTypeId="2" PostId="14397" RevisionGUID="88dc524f-197c-4d8a-98cb-c996a15e0832" CreationDate="2011-07-02T03:34:09.530" UserId="1738" Text="28 Million triangles at 40fps is 1120Million triangles/sec.  This is pretty close to peak rates for top end graphics cards (what are you using?), so it wouldn't surprise me if you are simply limited by the clipping or setup hardware max throughput.  The only way to get faster is to draw less triangles.&#xD;&#xA;&#xD;&#xA;For your specific questions:&#xD;&#xA;•Use GL face culling (the OpenGL function, not the scene logic)&#xD;&#xA;&#xD;&#xA;The hardware can avoid rasterization of invisible on-screen clipping.  Helps most when your geometry is on screen and you are raster limited (or limited by memory bandwidth, or z-test performance).  Turn it on (assuming you have closes/2-manifold objects).&#xD;&#xA;&#xD;&#xA;•Precalculate anything you can&#xD;&#xA;&#xD;&#xA;As someone said in another answer, you have more triangles than pixels.  You may have all sub-pixel sized triangles, but more likely the triangles are either overdrawing each other on the screen, or they are off screen and clipped.  For the former, you can look into occlusion culling techniques (occlusion queries, visibility pre-processing, z-pass rendering, front to back rendering, etc.).  For the latter, you should group spatial coherent triangles (i.e., compact objects) into some sort of spatial hierarchy (be it an octree or a simple bounding box per object), and manually reject chunks of triangles on the CPU, in order to avoid even making the draw calls for those objects.&#xD;&#xA;&#xD;&#xA;•Use interleaved Vertices&#xD;&#xA;&#xD;&#xA;What is this?  Are you referring to tesselation?&#xD;&#xA;&#xD;&#xA;•Minimize as many GL calls as possible, batch where appropriate&#xD;&#xA;&#xD;&#xA;This is a benefit if you are CPU limited.  BTW, are you sure that no core is running at 100%?  All it takes is one to become likely CPU limited.  The taskmanager reports the idleness of ALL cores." />
  <row Id="32254" PostHistoryTypeId="5" PostId="14395" RevisionGUID="d39fe5c6-602c-4d9a-a3ed-2ef1f78df563" CreationDate="2011-07-02T03:34:20.910" UserId="288" Comment="added 41 characters in body" Text="`SpriteBatch` passes in both a colour (containing an alpha/transparency value) and a texture coordinate. You need to use the colour parameter. Here is the XNA `SpriteBatch` pixel shader (from XNA 2.0)&#xD;&#xA;&#xD;&#xA;    void SpritePixelShader(inout float4 color : COLOR0, float2 texCoord : TEXCOORD0)&#xD;&#xA;    {&#xD;&#xA;        color *= tex2D(TextureSampler, texCoord);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So your shader would need to be something like this:&#xD;&#xA;&#xD;&#xA;    void SpritePixelShader(inout float4 color : COLOR0, float2 texCoord : TEXCOORD0)&#xD;&#xA;    {&#xD;&#xA;        color *= tex2D(TextureSampler, texCoord);&#xD;&#xA;        color.rgb *= intensity;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Also be aware of &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx&quot;&gt;premultiplied alpha&lt;/a&gt;, which was &lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2010/04/08/premultiplied-alpha-in-xna-game-studio-4-0.aspx&quot;&gt;added in XNA 4.0&lt;/a&gt;. Simply multiplying the RGB values may give you a result that is different to what you actually want to achieve.&#xD;&#xA;&#xD;&#xA;Probably a better solution to your problem would be to render your entire scene as normal to a render target, and then gamma-correct that render target using a post-process pixel shader." />
  <row Id="32255" PostHistoryTypeId="2" PostId="14398" RevisionGUID="07b0cfba-6557-4d59-a137-c695a0492596" CreationDate="2011-07-02T03:46:00.927" UserId="7191" Text="I believe that your original reasoning would be correct if you were using parallel projection. But since (I believe) you're using perspective projection, it doesn't work.&#xD;&#xA;&#xD;&#xA;Imagine you have two planes that are perpendicular to the camera (both facing the camera). The green plane is closest and the red plane behind that. From the camera view it looks like this:&#xD;&#xA;&#xD;&#xA;![Camera perspective view][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now when I cast a ray out to the black dot, to do so correctly in perspective projection, I have to cast from where my camera is (which is the sharp point on the left) out to the dot. That's what the extra math does when creating the vector for the ray.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![View of perspective camera][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I were to do the same in parallel projection, I can pretend that my camera is not a pin-point, but a huge plane. Here is where I can use the vector[0,0,-1]:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![view of parallel camera][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's the same view as the top image, but in parallel projection.&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyway I'm pretty sure that's your issue. It's not a mathematical answer, but I hope it helps you understand the difference in what you were thinking and how it's supposed to work. There is of course the Math SE that you could get more details on the math.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/T3LPR.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/Dfe7e.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/ZayTf.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/iTIIR.png" />
  <row Id="32256" PostHistoryTypeId="2" PostId="14399" RevisionGUID="b5935449-da86-432a-b337-b2285e0e7a3c" CreationDate="2011-07-02T03:51:16.197" UserId="1738" Text="Assuming you have a good understanding of how a point is transformed, the difference is that a vector is always defined as the vector to a point relative to some point of reference (e.g., the origin).  When you transform the point to which a vector points, the point of reference is not transformed with it, so the vector changes and you get incorrect results.&#xD;&#xA;&#xD;&#xA;To transform the vector v by matrix M as you would expect, transform M(v), and the point of reference/origin M((0,0,0,1)) (i.e., the - vector).  Then compute M(v) - M((0,0,0,1)) to get the correctly transformed vector.  Obviously, transforming by M((0,0,0,1)) zeroes out most of the components of a matrix, so you land up with just the translation components remaining and the matrix homogenous component, which with some minor math transforms into the code you have as a fix." />
  <row Id="32257" PostHistoryTypeId="5" PostId="14388" RevisionGUID="b25f6b81-7874-4557-8748-5a790850b1f2" CreationDate="2011-07-02T04:13:49.020" UserId="2061" Comment="deleted 7 characters in body" Text="&gt; 1. For when a formula is defined, like in the case of D&amp;D, which is `Experience = Level*(Level-1)*500`&#xD;&#xA;&#xD;&#xA;I agree that you should implement what is easiest, rather than worrying about performance, because cases like this will have little or no performance impact either way.  However, in this case, it would be easier to just solve the equation for `Level` using high-school algebra, rather than take the time to code a lookup table as suggested by everyone else.&#xD;&#xA;&#xD;&#xA;That specific equation can be solved using the [quadratic formula][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula" />
  <row Id="32258" PostHistoryTypeId="5" PostId="14321" RevisionGUID="344f2cb1-68fc-4f81-80d8-196f24821c28" CreationDate="2011-07-02T04:51:31.170" UserId="6592" Comment="deleted 124 characters in body" Text="Two things I'm quite confused about.&#xD;&#xA;&#xD;&#xA;1) OpenGL ES 2.0 creates primitives before the vertex shader is invoked. Why, then, does it not automatically provide the vertex shader the position of the vertex?&#xD;&#xA;&#xD;&#xA;2) OpenGL ES 2.0 supports `glDrawElements()`, but it does not support `glEnableClientState()` or `GL_VERTEX_ARRAY`, so how can this call possibly be used to construct primitives?&#xD;&#xA;&#xD;&#xA;NOTE: this is OpenGL ES 2.0, NOT normal OpenGL!&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;Resolution:&#xD;&#xA;&#xD;&#xA;I think my confusion was stemming from the built in variable gl_Vertex that some versions of GLSL support (according to some sources, I couldn't find this in the official documentation at http://www.opengl.org/sdk/docs/manglsl/) which gives you the position of the vector provided to the draw command. This isn't present in GL ES. Further, my code was't working, and as GLSL can be difficult to debug, I had no idea what was going on :)&#xD;&#xA;&#xD;&#xA;In this case, using vertex attributes and passing the model-space location of the vertices and my transformation matrix allows me to transform the vertices correctly." />
  <row Id="32259" PostHistoryTypeId="2" PostId="14400" RevisionGUID="076b2094-fe30-4e7c-8190-5e1e3e221a29" CreationDate="2011-07-02T06:25:58.237" UserId="7881" Text="This [tutorial/game dev blog][1] provides an excellent method for generating rivers, and they render very nicely. I'm not sure if this can be applied effectively in your situation, as you've taken a different approach (and have a grid-based map) but it's worth looking into, for sure.&#xD;&#xA;&#xD;&#xA;  [1]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/" />
  <row Id="32260" PostHistoryTypeId="25" PostId="14391" RevisionGUID="442e8591-5247-4f59-8ae5-462ef9bd3e09" CreationDate="2011-07-02T06:26:13.613" Comment="http://twitter.com/#!/StackGameDev/status/87044385044303873" />
  <row Id="32264" PostHistoryTypeId="25" PostId="14366" RevisionGUID="3169a0c1-663c-48a4-9f45-b215dc493420" CreationDate="2011-07-02T09:26:13.697" Comment="http://twitter.com/#!/StackGameDev/status/87089683938557952" />
  <row Id="32266" PostHistoryTypeId="2" PostId="14402" RevisionGUID="eed2921d-e74e-469d-83e6-5b0df3791c3a" CreationDate="2011-07-02T11:01:01.743" UserId="5174" Text="I've been using XNA to learn game programming for some time, and I'm interested in moving to Android.  Having said that; the learning curve to get started seems to have ramped up exponentially.  I have a working knowledge of Java (started with it before learning C#).  Is there an intermediate step I should take in order to prepare myself for working with Android game programming?  And are there any resources that are geared toward moving from XNA to Android?  " />
  <row Id="32267" PostHistoryTypeId="1" PostId="14402" RevisionGUID="eed2921d-e74e-469d-83e6-5b0df3791c3a" CreationDate="2011-07-02T11:01:01.743" UserId="5174" Text="Moving from XNA to Android" />
  <row Id="32268" PostHistoryTypeId="3" PostId="14402" RevisionGUID="eed2921d-e74e-469d-83e6-5b0df3791c3a" CreationDate="2011-07-02T11:01:01.743" UserId="5174" Text="&lt;xna&gt;&lt;c#&gt;&lt;java&gt;&lt;android&gt;&lt;moving-platforms&gt;" />
  <row Id="32269" PostHistoryTypeId="2" PostId="14403" RevisionGUID="e26b5dcb-8883-4ec5-98a7-a6954698dad0" CreationDate="2011-07-02T11:19:21.053" UserId="8050" Text="Long ago I developed an multiprocessor raytracing renderer for an old supecomputer in my college.&#xD;&#xA;&#xD;&#xA;I addressed this problem by defining an observation point and the screen plane in world coordinate. The screen was defined as the coordinate for the upper-left pixel in world coordinate and the *U*, *V* direction pointing toward the left and lower pixel respectively.&#xD;&#xA;&#xD;&#xA;![Screen coordinate system][1]&#xD;&#xA;&#xD;&#xA;In this way the pixel (x,y) is centered on *P* + x&amp;middot;*U* + y&amp;middot;*V*. &#xD;&#xA;&#xD;&#xA;If the view point is *W* then you can cast a ray *W* + (*P* + x&amp;middot;*U* + y&amp;middot;*V*)&amp;middot;t that is in world coordinate.&#xD;&#xA;&#xD;&#xA;I think that in your case the trick is to put the screen in world coordinate i.e. find the coordinate for the top-left, top-right and bottom-left pixels. With those vectors and the world coordinate view point you can cast a ray through any pixel and rely in a world coordinate parametric formulation. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/P102W.png" />
  <row Id="32270" PostHistoryTypeId="2" PostId="14404" RevisionGUID="8f76483a-b520-4840-be30-e1353c462626" CreationDate="2011-07-02T12:01:08.883" UserId="7822" Text="You could try using [MonoGame][1] or wait for [ExEn][2] they are both ports of XNA to alternate platforms.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mono/MonoGame&#xD;&#xA;  [2]: http://andrewrussell.net/exen/" />
  <row Id="32271" PostHistoryTypeId="25" PostId="14355" RevisionGUID="374a9b4f-3860-4bc1-bfe5-5f1aabe24cc1" CreationDate="2011-07-02T12:26:14.173" Comment="http://twitter.com/#!/StackGameDev/status/87134984384679937" />
  <row Id="32272" PostHistoryTypeId="2" PostId="14405" RevisionGUID="f3e04779-2d4e-498d-af2f-f3d805138db5" CreationDate="2011-07-02T12:54:05.640" UserId="744" Text="To achieve a _constant acceleration_, apply a force every frame some time before you call `b2World::Step`. To achieve _constant velocity_ (in the absence of friction and damping), apply a force for one frame.&#xD;&#xA;&#xD;&#xA;You should definitely not be subclassing anything in Box2D. None of its classes are designed to be base classes. You can subclass CCNode/CCSprite/etc. to help manage your b2Body pointers.&#xD;&#xA;&#xD;&#xA;Incidentally, applying a force to the exact center of a circle will cause it to slide, not roll. To roll, apply the force above the center." />
  <row Id="32273" PostHistoryTypeId="25" PostId="14215" RevisionGUID="3626249c-7675-40a4-a6bc-ce03aaa54876" CreationDate="2011-07-02T15:26:14.693" Comment="http://twitter.com/#!/StackGameDev/status/87180285019561984" />
  <row Id="32274" PostHistoryTypeId="2" PostId="14406" RevisionGUID="42f1ad61-4069-4275-8ba4-670a514ddfcf" CreationDate="2011-07-02T15:48:20.230" UserId="2332" Text="Honestly, the best thing to do is to just go for it. Start off small, you have some experience in XNA and it shouldn't be too difficult to apply to a Java environment. Having said that, the graphics side of things can be a little bit hairy but there are lots of tutorials around if you just search for Android Game Development Tutorial.&#xD;&#xA;&#xD;&#xA;One such tutorial is [here][1]. It's originally in German, but the Google translation doesn't seem to be too bad and it looks fairly comprehensive. There are the odd German phrases in there, but it looks like you can work out what they're saying most of the time. &#xD;&#xA;&#xD;&#xA;You could also develop for Windows Phone 7 in XNA 4 to get a feel for developing for mobile devices so that experience could port over to Android too.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;~Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://translate.google.co.uk/translate?hl=en&amp;sl=de&amp;u=http://www.androidpit.de/de/android/wiki/view/Spieleentwicklung_101&amp;ei=0DsPTsisPIqn8QOnpbiqDg&amp;sa=X&amp;oi=translate&amp;ct=result&amp;resnum=1&amp;sqi=2&amp;ved=0CB8Q7gEwAA&amp;prev=/search?q=http://www.androidpit.de/de/android/wiki/view/Spieleentwicklung_101&amp;hl=en&amp;safe=off&amp;biw=1680&amp;bih=894&amp;prmd=ivns" />
  <row Id="32275" PostHistoryTypeId="5" PostId="14370" RevisionGUID="c0b11d17-ea7c-49b3-9b35-95a951e8d7c2" CreationDate="2011-07-02T15:56:24.100" UserId="7328" Comment="new method" Text="By reading your quesiton it seems you can take benefit of quad trees, create a quad tree and run simulation for each segment on a diffrent processing unit. This will cause checking only happen to objects near to each other. but you'll need to sync you threads every cycle. Which means to transfer some of those boids from one processing group to another. in general every cycle will consist of 3 steps :&#xD;&#xA;&#xD;&#xA;1. Move all boids by one unit. (which can easily be processed using multiple threads)&#xD;&#xA;2. Assigning each boid to a group*. This means using an algorithm of O(n) you have to select which boids are most likely to make a collision. This can also be handled using multiple threads.&#xD;&#xA;3. In the end you have to check if two boids in a same group made collision. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To create groups you can use the pattern below:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;note that some boids may be a part of more than one group, but this pattern gives you a more accurate results. you may also create as many groups as you want using this pattern it's just a number you have to find for how many boids and the screen which screen size, what's is the best number of groups you need to create.&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;this is a segmentation that came to my head just now, this way there is far fewer double checkings and there is no need to increase/decrease number of threads between steps: &#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;note that some areas are still a part of two groups. and there is a small area which is a part of 4 groups. but in general this method is easier to implement and by far faster if implemented correctly. and by the way there is no reverse move this way, if some object can move it can move no more checking is required.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JOPCt.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/ki4xq.png" />
  <row Id="32276" PostHistoryTypeId="2" PostId="14407" RevisionGUID="2902d12e-2924-407c-9560-ac35c370b89a" CreationDate="2011-07-02T16:00:52.853" UserId="8380" Text="first I’m not programmer, I’ve been using a popular game for some time and I think it would make a great medium for machinima.  Problem is that it’s a top down view RTS game and it doesn’t give control of the camera other than pan map with arrow keys, drag with left mouse and zoom on cursor with mouse wheel.&#xD;&#xA;&#xD;&#xA;I’ve got the demo of Torque 3D and I found the documentation on creating different [camera modes][1] but I don’t want to spend hours to find out in the end that I can’t do it.&#xD;&#xA;&#xD;&#xA;Ideally I’d like a console command to switch between the default camera mode and the machinima one. &#xD;&#xA;The machinima one should focus on the centre of the map OR (toggle) on a selected unit and basically let me rotate the map like a sphere but never get below it or alter its horizontality. (hope you get the picture)&#xD;&#xA;&#xD;&#xA;So can anyone write me the code to add ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.garagegames.com/torque-3d/official/index.html?content/documentation/Scripting/Advanced/RTSPrototype.html" />
  <row Id="32277" PostHistoryTypeId="1" PostId="14407" RevisionGUID="2902d12e-2924-407c-9560-ac35c370b89a" CreationDate="2011-07-02T16:00:52.853" UserId="8380" Text="How to create a camera hack for a Torque 3D game ?" />
  <row Id="32278" PostHistoryTypeId="3" PostId="14407" RevisionGUID="2902d12e-2924-407c-9560-ac35c370b89a" CreationDate="2011-07-02T16:00:52.853" UserId="8380" Text="&lt;camera&gt;&lt;torque&gt;" />
  <row Id="32279" PostHistoryTypeId="5" PostId="14370" RevisionGUID="e7d4ca3a-9150-4ca5-add9-6acb1becb7c6" CreationDate="2011-07-02T16:24:02.763" UserId="7328" Comment="added 182 characters in body" Text="By reading your quesiton it seems you can take benefit of quad trees, create a quad tree and run simulation for each segment on a diffrent processing unit. This will cause checking only happen to objects near to each other. but you'll need to sync you threads every cycle. Which means to transfer some of those boids from one processing group to another. in general every cycle will consist of 3 steps :&#xD;&#xA;&#xD;&#xA;1. Move all boids by one unit. (which can easily be processed using multiple threads)&#xD;&#xA;2. Assigning each boid to a group*. This means using an algorithm of O(n) you have to select which boids are most likely to make a collision. This can also be handled using multiple threads.&#xD;&#xA;3. In the end you have to check if two boids in a same group made collision. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To create groups you can use the pattern below:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;note that some boids may be a part of more than one group, but this pattern gives you a more accurate results. you may also create as many groups as you want using this pattern it's just a number you have to find for how many boids and the screen which screen size, what's is the best number of groups you need to create.&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;this is a segmentation that came to my head just now (maik suggested that's what was described in the paper @LarsViklund sugested any how I think mine is not the same as his or at least I didn't get anything near this from that paper), this way there is far fewer double checkings and there is no need to increase/decrease number of threads between steps: &#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;note that some areas are still a part of two groups. and there is a small area which is a part of 4 groups. but in general this method is easier to implement and by far faster if implemented correctly. and by the way there is no reverse move this way, if some object can move it can move no more checking is required.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JOPCt.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/ki4xq.png" />
  <row Id="32281" PostHistoryTypeId="5" PostId="14370" RevisionGUID="10395fbc-f045-407f-b7f4-18dc5e4fb426" CreationDate="2011-07-02T16:45:24.267" UserId="7328" Comment="added 46 characters in body" Text="By reading your quesiton it seems you can take benefit of quad trees, create a quad tree and run simulation for each segment on a diffrent processing unit. This will cause checking only happen to objects near to each other. but you'll need to sync you threads every cycle. Which means to transfer some of those boids from one processing group to another. in general every cycle will consist of 3 steps :&#xD;&#xA;&#xD;&#xA;1. Move all boids by one unit. (which can easily be processed using multiple threads)&#xD;&#xA;2. Assigning each boid to a group*. This means using an algorithm of O(n) you have to select which boids are most likely to make a collision. This can also be handled using multiple threads.&#xD;&#xA;3. In the end you have to check if two boids in a same group made collision. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*To create groups you can use the pattern below:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;note that some boids may be a part of more than one group, but this pattern gives you a more accurate results. you may also create as many groups as you want using this pattern it's just a number you have to find for how many boids and the screen which screen size, what's is the best number of groups you need to create.&#xD;&#xA;&#xD;&#xA;--edit--&#xD;&#xA;&#xD;&#xA;there is another idea about segmentation which is described in the paper @LarsViklund sugested, this way there is far fewer double checkings and there is no need to increase/decrease number of threads between steps: &#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;note that some areas are still a part of two groups. and width of area both group cover is exactly `2*maximum speed`. In your case if boids move one pixel per simulation step you only need to share 2 pixel width area between each 2 group. and there is a small area which is a part of 4 groups. but in general this method is easier to implement and by far faster if implemented correctly. and by the way there is no reverse move this way, if some object can move it can move no more checking is required.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JOPCt.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/ki4xq.png" />
  <row Id="32282" PostHistoryTypeId="2" PostId="14409" RevisionGUID="ab673e14-9cc5-4ddf-a2fc-25330331f1ab" CreationDate="2011-07-02T17:43:56.843" UserId="160" Text="Here's the design constraints as I understand them:&#xD;&#xA;&#xD;&#xA;1. The core gameplay code doesn't care about level requirements and shouldn't be coupled to the code that deals with them.&#xD;&#xA;&#xD;&#xA;2. At the same time, it's the core gameplay code that knows when the specific events meeting those requirements occurs (getting an item, killing an enemy, etc.)&#xD;&#xA;&#xD;&#xA;3. Different levels have different sets of requirements and those need to be described somewhere.&#xD;&#xA;&#xD;&#xA;Given those, I'd likely do something like this: First, make a class that represents a game level. It will encapsulate the set of specific requirements a level has. It has methods that can be called when game events occur.&#xD;&#xA;&#xD;&#xA;Give the core gameplay code a reference to the current level object. When gameplay events occur, it will tell the level by calling methods on it: `enemyKilled`, `itemPickedUp`, etc.&#xD;&#xA;&#xD;&#xA;Internally, `Level` needs a few things:&#xD;&#xA;&#xD;&#xA;* State to track which events have already occurred. This way it can distinguish the *first* enemy killed from others, and knows the first time you've picked up a given item.&#xD;&#xA;* A list of `LevelRequirement` objects that describe the specific set of goals you need for that level.&#xD;&#xA;&#xD;&#xA;When you enter a level, you'll create a `Level` with the right `LevelRequirement`s, set up the gameplay code, and give it that level.&#xD;&#xA;&#xD;&#xA;Each time a game event occurs, gameplay passes it to `Level`. That in turn calculcates aggregate data (total number of enemies killed, enemies of that type killed, etc.) It then walks through its requirement objects, giving each one the aggregegate data. A requirement tests to see if it's met, and if so spawns whatever resulting behavior is appropriate (showing tutorial text, etc.)&#xD;&#xA;&#xD;&#xA;`LevelRequirement` basically needs two things:&#xD;&#xA;&#xD;&#xA;1. A description of a *test* to tell if the requirement has been met. This can just be a function if your language makes that easy, otherwise you can model it in data. (I.e. have a `RequirementType` enum with stuff like `FIRST_KILL` and then a bit `switch` on that knows how to check each kind.)&#xD;&#xA;2. An action to perform when the requirement is met.&#xD;&#xA;&#xD;&#xA;There's still the question of where those sets of requirements are described. You could do something like XML or another text file format. That's useful if:&#xD;&#xA;&#xD;&#xA;1. Non-programmers will be authoring levels.&#xD;&#xA;2. You want to be able to change requirements without recompiling and/or restarting.&#xD;&#xA;&#xD;&#xA;If neither of those is the case, I'd probably just construct them directly in code. Simpler is always better.&#xD;&#xA;" />
  <row Id="32283" PostHistoryTypeId="5" PostId="14409" RevisionGUID="7b0d08c5-7ac3-4af7-bf36-de48806dfd27" CreationDate="2011-07-02T17:59:53.630" UserId="160" Comment="edited body" Text="Here's the design constraints as I understand them:&#xD;&#xA;&#xD;&#xA;1. The core gameplay code doesn't care about level requirements and shouldn't be coupled to the code that deals with them.&#xD;&#xA;&#xD;&#xA;2. At the same time, it's the core gameplay code that knows when the specific events meeting those requirements occurs (getting an item, killing an enemy, etc.)&#xD;&#xA;&#xD;&#xA;3. Different levels have different sets of requirements and those need to be described somewhere.&#xD;&#xA;&#xD;&#xA;Given those, I'd likely do something like this: First, make a class that represents a game level. It will encapsulate the set of specific requirements a level has. It has methods that can be called when game events occur.&#xD;&#xA;&#xD;&#xA;Give the core gameplay code a reference to the current level object. When gameplay events occur, it will tell the level by calling methods on it: `enemyKilled`, `itemPickedUp`, etc.&#xD;&#xA;&#xD;&#xA;Internally, `Level` needs a few things:&#xD;&#xA;&#xD;&#xA;* State to track which events have already occurred. This way it can distinguish the *first* enemy killed from others, and knows the first time you've picked up a given item.&#xD;&#xA;* A list of `LevelRequirement` objects that describe the specific set of goals you need for that level.&#xD;&#xA;&#xD;&#xA;When you enter a level, you'll create a `Level` with the right `LevelRequirement`s, set up the gameplay code, and give it that level.&#xD;&#xA;&#xD;&#xA;Each time a game event occurs, gameplay passes it to `Level`. That in turn calculcates aggregate data (total number of enemies killed, enemies of that type killed, etc.) It then walks through its requirement objects, giving each one the aggregegate data. A requirement tests to see if it's met, and if so spawns whatever resulting behavior is appropriate (showing tutorial text, etc.)&#xD;&#xA;&#xD;&#xA;`LevelRequirement` basically needs two things:&#xD;&#xA;&#xD;&#xA;1. A description of a *test* to tell if the requirement has been met. This can just be a function if your language makes that easy, otherwise you can model it in data. (I.e. have a `RequirementType` enum with stuff like `FIRST_KILL` and then a big `switch` on that knows how to check each kind.)&#xD;&#xA;2. An action to perform when the requirement is met.&#xD;&#xA;&#xD;&#xA;There's still the question of where those sets of requirements are described. You could do something like XML or another text file format. That's useful if:&#xD;&#xA;&#xD;&#xA;1. Non-programmers will be authoring levels.&#xD;&#xA;2. You want to be able to change requirements without recompiling and/or restarting.&#xD;&#xA;&#xD;&#xA;If neither of those is the case, I'd probably just construct them directly in code. Simpler is always better.&#xD;&#xA;" />
  <row Id="32284" PostHistoryTypeId="25" PostId="14292" RevisionGUID="93a3d5a6-c7be-48fc-a25e-d3f7344b369b" CreationDate="2011-07-02T18:26:15.450" Comment="http://twitter.com/#!/StackGameDev/status/87225586572984320" />
  <row Id="32285" PostHistoryTypeId="2" PostId="14410" RevisionGUID="8ba8e79a-2bba-4a1a-b216-0172ac85b613" CreationDate="2011-07-02T19:10:44.647" UserId="8381" Text="I have a number of tiles as standalone files that I would like to stitch together into a single tileset. Are there any tools that can quickly do this?" />
  <row Id="32286" PostHistoryTypeId="1" PostId="14410" RevisionGUID="8ba8e79a-2bba-4a1a-b216-0172ac85b613" CreationDate="2011-07-02T19:10:44.647" UserId="8381" Text="Stitch a collection of images into a tileset" />
  <row Id="32287" PostHistoryTypeId="3" PostId="14410" RevisionGUID="8ba8e79a-2bba-4a1a-b216-0172ac85b613" CreationDate="2011-07-02T19:10:44.647" UserId="8381" Text="&lt;tiles&gt;" />
  <row Id="32288" PostHistoryTypeId="2" PostId="14411" RevisionGUID="f3a49775-e8cf-4263-a90a-0ca1cd0dcbbe" CreationDate="2011-07-02T19:41:33.137" UserId="7328" Text="use http://slick.cokeandcode.com/demos/packer.jnlp." />
  <row Id="32289" PostHistoryTypeId="2" PostId="14412" RevisionGUID="4cd754e0-e079-4b5a-b6fe-f2eeea545e2a" CreationDate="2011-07-02T20:48:37.893" UserId="1156" Text="[ImageMagick][1] has a useful append command that does exactly what you want. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imagemagick.org/script/index.php" />
  <row Id="32290" PostHistoryTypeId="2" PostId="14413" RevisionGUID="f51f2faf-6970-40ab-9e3a-a300f47b2840" CreationDate="2011-07-02T21:01:33.613" UserId="8240" Text="I find myself confused by your question. So you want to use a &quot;popular game&quot; that is a &quot;top down view RTS game&quot; for machinima. But it doesn't give you enough camera controls.&#xD;&#xA;&#xD;&#xA;That's fine. Where it gets confusing is where you start talking about Torque 3D. The document you found pertains to Torque 3D users and possibly games made with Torque 3D. And I don't know of any &quot;popular&quot; RTS game that was made with Torque 3D. So the fact that Torque 3D has the ability to create camera modes has *nothing* to do with this anonymous RTS game.&#xD;&#xA;&#xD;&#xA;If the game itself does not give you camera controls, whether directly or via scripting, then you don't have camera controls, period.&#xD;&#xA;&#xD;&#xA;BTW, if you're talking about StarCraft 2, just *say* so; Blizzard's wrath will *not* be upon you. Also, SC2 has lots of camera controls in its scripting system; people have made third and first-person shooters in the engine. I could point you to all kinds of SC2 map editing resources you could use to make Machinima if I knew what game you were talking about." />
  <row Id="32291" PostHistoryTypeId="2" PostId="14414" RevisionGUID="bada85b8-3636-4e21-8007-7d40447d5957" CreationDate="2011-07-02T21:22:41.190" UserId="8385" Text="I like Texture Packer. http://www.texturepacker.com/" />
  <row Id="32292" PostHistoryTypeId="25" PostId="14065" RevisionGUID="ecf5bae8-f349-4d45-bd0c-66e622f82370" CreationDate="2011-07-02T21:26:19.887" Comment="http://twitter.com/#!/StackGameDev/status/87270903230119937" />
  <row Id="32296" PostHistoryTypeId="25" PostId="14201" RevisionGUID="cf32fdc0-3447-460a-aeed-812602c5318c" CreationDate="2011-07-03T00:26:20.477" Comment="http://twitter.com/#!/StackGameDev/status/87316203130994688" />
  <row Id="32297" PostHistoryTypeId="2" PostId="14416" RevisionGUID="c4dbabef-c7cd-4664-9b07-11436f56c494" CreationDate="2011-07-03T02:14:52.720" UserId="8261" Text="This was (basically) fixed.  I did not meet my goal of having only one copy of the uncompiled FlashPunk library, but I was able to get the SWF to at least compile by copying the entire library to my source path.  Good thing it wasn't that large anyway.&#xD;&#xA;&#xD;&#xA;Apache Ant command looks like so:&#xD;&#xA;&#xD;&#xA;    &lt;copy todir=&quot;${SOURCE_PATH}/net&quot;&gt;&#xD;&#xA;        &lt;fileset dir=&quot;/media/Lexar_32G/Dev/ActionScript/FlashPunk/net&quot;/&gt;&#xD;&#xA;    &lt;/copy&gt;&#xD;&#xA;&#xD;&#xA;Did not turn out to need extra commands to let Flex set up the namespaces for me.  Additionally, I stopped trying to compile the library as a SWC before I compiled the final SWF.  Therefore, the resulting build.xml looks like so:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &lt;!--&#xD;&#xA;    build.xml&#xD;&#xA;    SquareCrow, June 2011&#xD;&#xA;    Apache Ant makefile&#xD;&#xA;    --&gt;&#xD;&#xA;    &#xD;&#xA;    &lt;project&gt;&#xD;&#xA;    	&lt;!-- Flex SDK Properties --&gt;&#xD;&#xA;    	&lt;property name=&quot;FLEX_HOME&quot; value=&quot;/opt/flex&quot;/&gt;&#xD;&#xA;    	&lt;property name=&quot;MXMLC.JAR&quot; value=&quot;${FLEX_HOME}/lib/mxmlc.jar&quot;/&gt;&#xD;&#xA;    	&lt;!-- Project Properties --&gt;&#xD;&#xA;    	&lt;property name=&quot;PROJECT_PATH&quot; value=&quot;/media/Lexar_32G/Dev/ActionScript/FlashPunk/FP_Tut_Vid_ep01&quot;/&gt;&#xD;&#xA;    	&lt;property name=&quot;SOURCE_PATH&quot; value=&quot;${PROJECT_PATH}&quot;/&gt;&#xD;&#xA;    	&lt;property name=&quot;OUTPUT_PATH&quot; value=&quot;${PROJECT_PATH}&quot;/&gt;&#xD;&#xA;    	&lt;property name=&quot;FLASHPUNK_PATH&quot; value=&quot;/media/Lexar_32G/Dev/ActionScript/FlashPunk&quot;/&gt;&#xD;&#xA;    	&#xD;&#xA;    	&lt;!-- Fetch the JAR full of Flex tasks if it is not already in the source directory --&gt;&#xD;&#xA;    	&lt;copy file=&quot;${FLEX_HOME}/ant/lib/flexTasks.jar&quot; todir=&quot;${SOURCE_PATH}&quot;/&gt;&#xD;&#xA;    	&lt;!-- Add flextasks to the project --&gt;&#xD;&#xA;    	&lt;taskdef resource=&quot;flexTasks.tasks&quot; classpath=&quot;${SOURCE_PATH}/flexTasks.jar&quot;&gt;&lt;/taskdef&gt;&#xD;&#xA;    	&#xD;&#xA;    	&lt;!-- Fetch the FlashPunk files and put them in their own folder --&gt;&#xD;&#xA;    	&lt;copy todir=&quot;${SOURCE_PATH}/net&quot;&gt;&#xD;&#xA;        	    &lt;fileset dir=&quot;/media/Lexar_32G/Dev/ActionScript/FlashPunk/net&quot;/&gt;&#xD;&#xA;            &lt;/copy&gt;&#xD;&#xA;    	&#xD;&#xA;    	&lt;!-- Release build Flash Player 10.1 --&gt;&#xD;&#xA;    	&lt;target name=&quot;build&quot;&gt;&#xD;&#xA;    		&#xD;&#xA;    		&lt;echo message=&quot;building swf...&quot; /&gt;&#xD;&#xA;    	    &#xD;&#xA;    		&lt;mxmlc&#xD;&#xA;    			file=&quot;${SOURCE_PATH}/epOne.as&quot; &#xD;&#xA;    			output=&quot;${OUTPUT_PATH}/epOne.swf&quot;&#xD;&#xA;    		 	debug=&quot;false&quot; &#xD;&#xA;    		 	incremental=&quot;false&quot;&#xD;&#xA;    		 	strict=&quot;true&quot;&#xD;&#xA;    		 	accessible=&quot;false&quot;&#xD;&#xA;    	        link-report=&quot;link_report.xml&quot;&#xD;&#xA;    	        static-link-runtime-shared-libraries=&quot;true&quot;&gt;&#xD;&#xA;    	&#xD;&#xA;                &lt;optimize&gt;true&lt;/optimize&gt;&#xD;&#xA;    &#xD;&#xA;            &lt;/mxmlc&gt;&#xD;&#xA;    	&lt;/target&gt;&#xD;&#xA;    	&#xD;&#xA;    &lt;/project&gt;&#xD;&#xA;&#xD;&#xA;Simple, no?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32298" PostHistoryTypeId="25" PostId="13797" RevisionGUID="f9a029a5-5de7-438d-867a-4e5cebe90c92" CreationDate="2011-07-03T03:26:20.140" Comment="http://twitter.com/#!/StackGameDev/status/87361501312204800" />
  <row Id="32299" PostHistoryTypeId="2" PostId="14417" RevisionGUID="6f766aee-c73b-463f-924d-ceb86249f0a6" CreationDate="2011-07-03T03:33:17.560" UserId="6877" Text="I am looking for character animation library which can be included in my game engine.&#xD;&#xA;&#xD;&#xA;I prefer FOSS but, paid is good if it's price is reasonable.&#xD;&#xA;&#xD;&#xA;So, far what Ive found is [Cal3d](http://gna.org/projects/cal3d/).But it looks dead.&#xD;&#xA;&#xD;&#xA;Can anyone tell, what are the other options?&#xD;&#xA;&#xD;&#xA;I am also interested in Havok Animation which comes in the free bundle of Havok. Any thoughts about this one?&#xD;&#xA;&#xD;&#xA;**EDIT:** language is C++" />
  <row Id="32300" PostHistoryTypeId="1" PostId="14417" RevisionGUID="6f766aee-c73b-463f-924d-ceb86249f0a6" CreationDate="2011-07-03T03:33:17.560" UserId="6877" Text="Character Animation Library" />
  <row Id="32301" PostHistoryTypeId="3" PostId="14417" RevisionGUID="6f766aee-c73b-463f-924d-ceb86249f0a6" CreationDate="2011-07-03T03:33:17.560" UserId="6877" Text="&lt;engine&gt;&lt;animation&gt;&lt;libraries&gt;" />
  <row Id="32302" PostHistoryTypeId="5" PostId="14398" RevisionGUID="10bdf3e1-94e3-4aea-8e06-d9196d79f4c7" CreationDate="2011-07-03T04:39:28.877" UserId="7191" Comment="Added more information to explain that this answer is not wholly accurate" Text="&#xD;&#xA;*EDIT*&#xD;&#xA;&#xD;&#xA;Please note that the following answer does not take into account several things, and is more of an attempt to visualize differences in picking between parallel and perspective projection, and probably not a great one at that. Please read all the comments for more details.&#xD;&#xA;&#xD;&#xA;*-----------------------*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I believe that your original reasoning would be correct if you were using parallel projection. But since (I believe) you're using perspective projection, it doesn't work.&#xD;&#xA;&#xD;&#xA;Imagine you have two planes that are perpendicular to the camera (both facing the camera). The green plane is closest and the red plane behind that. From the camera view it looks like this:&#xD;&#xA;&#xD;&#xA;![Camera perspective view][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now when I cast a ray out to the black dot, to do so correctly in perspective projection, I have to cast from where my camera is (which is the sharp point on the left) out to the dot. That's what the extra math does when creating the vector for the ray.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![View of perspective camera][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I were to do the same in parallel projection, I can pretend that my camera is not a pin-point, but a huge plane. Here is where I can use the vector[0,0,-1]:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![view of parallel camera][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's the same view as the top image, but in parallel projection.&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyway I'm pretty sure that's your issue. It's not a mathematical answer, but I hope it helps you understand the difference in what you were thinking and how it's supposed to work. There is of course the Math SE that you could get more details on the math.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/T3LPR.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/Dfe7e.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/ZayTf.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/iTIIR.png" />
  <row Id="32303" PostHistoryTypeId="25" PostId="14417" RevisionGUID="44f2d038-11ce-4b83-9417-efda171f8ffc" CreationDate="2011-07-03T06:26:19.590" Comment="http://twitter.com/#!/StackGameDev/status/87406798579056640" />
  <row Id="32304" PostHistoryTypeId="6" PostId="14417" RevisionGUID="1229cabd-955b-4043-9636-9790130b4572" CreationDate="2011-07-03T07:53:13.413" UserId="2698" Comment="edited tags" Text="&lt;c++&gt;&lt;engine&gt;&lt;animation&gt;&lt;libraries&gt;" />
  <row Id="32305" PostHistoryTypeId="17" PostId="14418" RevisionGUID="7f1e0581-9252-4829-a443-0629ec75eda9" CreationDate="2011-07-03T08:41:03.883" UserId="-1" Comment="from http://stackoverflow.com/questions/6540593/c-network-game-programming" Text="" />
  <row Id="32306" PostHistoryTypeId="17" PostId="14419" RevisionGUID="8c420518-baea-4129-87d2-71f8b5cba22c" CreationDate="2011-07-03T08:41:03.883" UserId="-1" Comment="from http://stackoverflow.com/questions/6540593/c-network-game-programming" Text="" />
  <row Id="32307" PostHistoryTypeId="17" PostId="14420" RevisionGUID="31fd6e97-485a-4e26-a38e-ca8e788f01e9" CreationDate="2011-07-03T08:41:03.883" UserId="-1" Comment="from http://stackoverflow.com/questions/6540593/c-network-game-programming" Text="" />
  <row Id="32308" PostHistoryTypeId="2" PostId="14419" RevisionGUID="b5f52701-c5f5-478b-b4d4-c71beeb290c0" CreationDate="2011-06-30T20:22:02.297" UserDisplayName="Kongress" Text="The same way any internet app connects to any server over the internet. The client needs (either hard coded or in a config file or wherever) either a static IP address or a DNS hostname that will resolve into the server's (or the server's network border router's) IP address. You also have to make sure the ports you're using are forwarded through your router and opened in your various firewalls so the packets can get through.&#xD;&#xA;&#xD;&#xA;If you don't have a static IP, you can use a service like [DynDNS](http://www.dyndns.com/) to dynamically update a hostname to point to your dynamic IP. I've used them for years and never had an issue.&#xD;&#xA;&#xD;&#xA;For a gaming-related example, I run a TeamSpeak3 server at home. When I'm connecting to it over the LAN from my personal machine I don't need to do anything but enter the port and local IP. To connect from the public internet, I have to set up DynDNS to keep my hostname pointing to my dynamic IP and set up port forwarding on my router to forward the TS3 ports to my local server machine. " />
  <row Id="32309" PostHistoryTypeId="2" PostId="14420" RevisionGUID="6ce26b5d-6ba0-4a59-8afe-b37d7666f958" CreationDate="2011-06-30T20:22:23.737" UserId="8134" Text="In exactly the same way as on the LAN. They report to the gameserver. If necessary, you can set up a centralized directory server that contains IP addresses and other relevant information about the game servers. From then on, it is exactly the same as on a LAN, where you probably ran over TCP/IP too." />
  <row Id="32310" PostHistoryTypeId="2" PostId="14418" RevisionGUID="abbe4918-c40c-445b-b08f-b023cb22f068" CreationDate="2011-06-30T20:15:46.977" UserId="3468" Text="I already know how to write games in C#, and I've learned the concepts behind network game programming, and created a working multiplayer game that works over LAN. &#xD;&#xA;&#xD;&#xA;As an example, somebody runs the game server, which keeps track of the position of... say, a ball. Every so often, the server sends the current location and velocity of the ball to each of the connected clients. If something goes prevents the server from sending the stuff to the clients, the clients can still calculate the position of the ball by using the velocity, and hopefully stay closely enough synchronized with the server until it can resume sending again.&#xD;&#xA;&#xD;&#xA;This is all very well and easy over LAN... but how do the clients connect to the server over the internet?" />
  <row Id="32311" PostHistoryTypeId="1" PostId="14418" RevisionGUID="abbe4918-c40c-445b-b08f-b023cb22f068" CreationDate="2011-06-30T20:15:46.977" UserId="3468" Text="C# Network Game Programming" />
  <row Id="32312" PostHistoryTypeId="3" PostId="14418" RevisionGUID="abbe4918-c40c-445b-b08f-b023cb22f068" CreationDate="2011-06-30T20:15:46.977" UserId="3468" Text="&lt;c#&gt;" />
  <row Id="32313" PostHistoryTypeId="25" PostId="14410" RevisionGUID="29db2a94-8c8c-4b8f-9714-bb4d258580a9" CreationDate="2011-07-03T09:26:41.970" Comment="http://twitter.com/#!/StackGameDev/status/87452188766507008" />
  <row Id="32314" PostHistoryTypeId="2" PostId="14421" RevisionGUID="6b846dae-13a5-404c-b5f9-ce53168f6894" CreationDate="2011-07-03T10:02:50.763" UserId="5275" Text="I've got a timer in my game which is supposed to set off a Boolean back to false after a certain amount of time has passed it just doesn't seem to work despite me trying to debug the issue, although setting off the timer works perfectly fine. Any help with this would be much appreciated &#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; cameras.Count; ++i)&#xD;&#xA;                {&#xD;&#xA;                    DetectCamera camera = cameras[i];&#xD;&#xA;                    Stopwatch camTimer = new Stopwatch();&#xD;&#xA;    &#xD;&#xA;                    if (player.InterferenceStart &amp;&amp; player.EMPBoundingCircle.Intersects(camera.BoundingRectangle))&#xD;&#xA;                        camTimer.Start();&#xD;&#xA;    &#xD;&#xA;                    if(camTimer.ElapsedMilliseconds &gt;= 2000.0f)&#xD;&#xA;                    {&#xD;&#xA;                        camera.CameraInRange = false;&#xD;&#xA;                        camTimer.Reset();&#xD;&#xA;                    }&#xD;&#xA;                    else if (camTimer.IsRunning)&#xD;&#xA;                        camera.CameraInRange = true;&#xD;&#xA;                }" />
  <row Id="32315" PostHistoryTypeId="1" PostId="14421" RevisionGUID="6b846dae-13a5-404c-b5f9-ce53168f6894" CreationDate="2011-07-03T10:02:50.763" UserId="5275" Text="Timer not going off" />
  <row Id="32316" PostHistoryTypeId="3" PostId="14421" RevisionGUID="6b846dae-13a5-404c-b5f9-ce53168f6894" CreationDate="2011-07-03T10:02:50.763" UserId="5275" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="32317" PostHistoryTypeId="2" PostId="14422" RevisionGUID="717d1686-fd63-4f69-b317-ca42050d7571" CreationDate="2011-07-03T11:06:34.627" UserId="5224" Text="You declare camTimer inside a method, as soon as your code exits this method the timer will be stopped and garbage collected. Also Your code probably calls this method every frame, so camTimer is created newly everyframe, so the time is never more than a few miliseconds.&#xD;&#xA;&#xD;&#xA;Both of these problems can be solved by moving the camTimer out of the method and into the class containing the method. For example:&#xD;&#xA;&#xD;&#xA;    public class MyClass()&#xD;&#xA;    {&#xD;&#xA;        StopWatch camTimer;&#xD;&#xA;    &#xD;&#xA;        public MyClass(){&#xD;&#xA;            camTimer = new camTimer();&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void StartTimer(){&#xD;&#xA;            camTimer.Start();&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void StopTimer(){&#xD;&#xA;            camTimer.Reset(); //stops and sets time at 0, alternatively use stop to not set at 0 but keep time&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        public void DoSomethingWithCameras(){&#xD;&#xA;                ...&#xD;&#xA;                ...&#xD;&#xA;                if(camTimer.ElapsedMilliseconds &gt; 2000.0f){&#xD;&#xA;                    ...&#xD;&#xA;                    camTimer.Restart(); //starts measuring from 0 again&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;                ...&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32318" PostHistoryTypeId="25" PostId="14402" RevisionGUID="32096651-ccd6-4fb0-bc20-4710c9aed94e" CreationDate="2011-07-03T12:26:42.057" Comment="http://twitter.com/#!/StackGameDev/status/87497490307362816" />
  <row Id="32319" PostHistoryTypeId="2" PostId="14423" RevisionGUID="74e57655-c9c3-4e74-9bc7-c51024b57410" CreationDate="2011-07-03T13:30:13.760" UserId="8394" Text="So I'm trying to start a C++, OpenGL project on Visual Studio 2010, and I have put glut.h and glut32.dll in the project directory, along with the glut.dll and glut32.lib files in a folder named &quot;glut&quot; in the project directory.&#xD;&#xA;&#xD;&#xA;I have also gone to &quot;Porject Properties -&gt; Linker -&gt; Input -&gt; Additional dependencies&quot; and I have typed in &quot;glut32.lib&quot; at the end, and made sure I am not missing a semicolon.&#xD;&#xA;&#xD;&#xA;when I try doing&#xD;&#xA;&#xD;&#xA;    #include &quot;glut.h&quot;&#xD;&#xA;&#xD;&#xA;in the Main.cpp file, it complains&#xD;&#xA;&#xD;&#xA;    error LNK1104: cannot open file 'glut32.libkernel32.lib'&#xD;&#xA;&#xD;&#xA;Am I missing any files? What am I doing wrong here?" />
  <row Id="32320" PostHistoryTypeId="1" PostId="14423" RevisionGUID="74e57655-c9c3-4e74-9bc7-c51024b57410" CreationDate="2011-07-03T13:30:13.760" UserId="8394" Text="Visual Studio 2010 C++ &amp; OpenGL project cannot detect .lib files" />
  <row Id="32321" PostHistoryTypeId="3" PostId="14423" RevisionGUID="74e57655-c9c3-4e74-9bc7-c51024b57410" CreationDate="2011-07-03T13:30:13.760" UserId="8394" Text="&lt;opengl&gt;&lt;c++&gt;&lt;libraries&gt;" />
  <row Id="32322" PostHistoryTypeId="2" PostId="14424" RevisionGUID="2c1e458d-6f77-49ef-a41d-6c51db7689d5" CreationDate="2011-07-03T13:51:38.000" UserId="8395" Text="I'm trying to make my character move around a tile map with collisions. Everything works fine except for one thing. I show you a picture with the problem:&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/ZWI7x.jpg&#xD;&#xA;&#xD;&#xA;That is, when I reach a tile above then I can not move anywhere. If you come from the left, I can not move either up or down. If you reach the bottom, I can move to the left but not right. And when you reach the right I can move in any direction.&#xD;&#xA;&#xD;&#xA;Honestly I have no idea what may be failing. I think it has to do with if (...), because if I change the order,  the addresses where I can move change :/&#xD;&#xA;&#xD;&#xA;Here I leave some code:&#xD;&#xA;&#xD;&#xA;    boolean collision = false;&#xD;&#xA;    &#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_UP)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(UpTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(0.0f, -vel);&#xD;&#xA;    }&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(LeftTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(-vel, 0.0f);&#xD;&#xA;    }&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_DOWN)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(DownTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(0.0f, vel);&#xD;&#xA;    }&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(RightTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(vel, 0.0f);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public int UpTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int LeftTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(0, (int) (x/size), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int DownTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size), (int) (y/size + 1));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int RightTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size + 1), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The map is an array with 3 componentes: [LAYER][Y][X]. So, in RightTile by example, with GetValue, I'm getting the value from the array in the position [layer][y/size][x/size + 1], x/size + 1 because I want to get the kind of tile that is to my right (same with the others). size = 64, that is the width and height of each tile. &#xD;&#xA;&#xD;&#xA;Thanks &gt;.&lt;" />
  <row Id="32323" PostHistoryTypeId="1" PostId="14424" RevisionGUID="2c1e458d-6f77-49ef-a41d-6c51db7689d5" CreationDate="2011-07-03T13:51:38.000" UserId="8395" Text="Tile based map and collision; getting stuck" />
  <row Id="32324" PostHistoryTypeId="3" PostId="14424" RevisionGUID="2c1e458d-6f77-49ef-a41d-6c51db7689d5" CreationDate="2011-07-03T13:51:38.000" UserId="8395" Text="&lt;java&gt;&lt;collision-detection&gt;&lt;tiles&gt;" />
  <row Id="32325" PostHistoryTypeId="2" PostId="14425" RevisionGUID="fb0c0069-dc18-49fd-80b5-52cbc35bbd93" CreationDate="2011-07-03T14:02:55.367" UserId="1386" Text="&#xD;&#xA;&gt; error LNK1104: cannot open file&#xD;&#xA;&gt; 'glut32.libkernel32.lib'&#xD;&#xA;&#xD;&#xA;It looks like you're missing a separator character in your dependency options, glut32.lib and kernel32.lib are separate libraries.&#xD;&#xA;" />
  <row Id="32326" PostHistoryTypeId="5" PostId="14425" RevisionGUID="02f7a2c3-17f9-48c2-9044-d5e9eb1d9f39" CreationDate="2011-07-03T14:11:24.610" UserId="1386" Comment="added 83 characters in body" Text="&gt; error LNK1104: cannot open file&#xD;&#xA;&gt; 'glut32.libkernel32.lib'&#xD;&#xA;&#xD;&#xA;It looks like you're missing a separator character in your dependency options, glut32.lib and kernel32.lib are separate libraries. If you open the additional dependencies window, every entry should be on a new line.&#xD;&#xA;" />
  <row Id="32327" PostHistoryTypeId="2" PostId="14426" RevisionGUID="39998859-f1d0-4920-a4d1-66bda941aef6" CreationDate="2011-07-03T14:36:57.557" UserId="1386" Text="I agree with Maik - **debugging** will help you here.&#xD;&#xA;&#xD;&#xA;To do this you could walk to the top of the screen, then insert a breakpoint after:&#xD;&#xA;&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) {&#xD;&#xA;And then press left and follow your code through to see if it does what you think it does. My best bet is that there is a problem indexing the map array; you should verify that the coordinates that are accessed are the correct coordinates.&#xD;&#xA;&#xD;&#xA;I did notice some things that could potentially be the cause:&#xD;&#xA;&#xD;&#xA;You said the map is an array with three components: [LAYER][**Y**][**X**] but then your calls to GetValue use [LAYER][**X**][**Y**].&#xD;&#xA;&#xD;&#xA;Also I'm not sure why you are doing x/size in UpTile/DownTile/RightTile/LeftTile - if x is smaller than 64 (and is an int) you'll get 0.&#xD;&#xA;&#xD;&#xA;Also, I presume:&#xD;&#xA;&#xD;&#xA;    public int LeftTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(0, (int) (x/size), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;should be:&#xD;&#xA;&#xD;&#xA;    public int LeftTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size), (int) (y/size));&#xD;&#xA;    }" />
  <row Id="32328" PostHistoryTypeId="5" PostId="14426" RevisionGUID="b9a274e3-aa10-48e1-807d-6415a4b9ba50" CreationDate="2011-07-03T14:43:15.973" UserId="1386" Comment="added 94 characters in body" Text="I agree with Maik - **debugging** will help you here.&#xD;&#xA;&#xD;&#xA;To do this you could walk to the top of the screen, then insert a breakpoint after:&#xD;&#xA;&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) {&#xD;&#xA;And then press left and follow your code through to see if it does what you think it does. My best bet is that there is a problem indexing the map array; you should verify that the coordinates that are accessed are the correct coordinates.&#xD;&#xA;&#xD;&#xA;I did notice some things that could potentially be the cause:&#xD;&#xA;&#xD;&#xA;You said the map is an array with three components: [LAYER][**Y**][**X**] but then your calls to GetValue index in another order: LAYER, **X**, **Y** (although I guess your GetValue function probably does switch those around).&#xD;&#xA;&#xD;&#xA;Also I'm not sure why you are doing (x/size) in UpTile/DownTile/RightTile/LeftTile - if x is smaller than 64 (and is an int) you'll get 0.&#xD;&#xA;&#xD;&#xA;Also, I presume:&#xD;&#xA;&#xD;&#xA;    public int LeftTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(0, (int) (x/size), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;should be:&#xD;&#xA;&#xD;&#xA;    public int LeftTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size), (int) (y/size));&#xD;&#xA;    }" />
  <row Id="32329" PostHistoryTypeId="2" PostId="14427" RevisionGUID="b832f2f7-48a5-4132-8a40-db695f4346e8" CreationDate="2011-07-03T14:44:51.260" UserId="3887" Text="I've just finished an XNA game for the Windows Phone 7 and XBLIG.  At the moment, the game is a 'lite' version, so is free, but the next version will have a small price-tag.&#xD;&#xA;&#xD;&#xA;I also did a Windows version.  Where's the best place to publish it?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32330" PostHistoryTypeId="1" PostId="14427" RevisionGUID="b832f2f7-48a5-4132-8a40-db695f4346e8" CreationDate="2011-07-03T14:44:51.260" UserId="3887" Text="Where can I publish my Windows Indie game?" />
  <row Id="32331" PostHistoryTypeId="3" PostId="14427" RevisionGUID="b832f2f7-48a5-4132-8a40-db695f4346e8" CreationDate="2011-07-03T14:44:51.260" UserId="3887" Text="&lt;xna&gt;&lt;xbox360&gt;&lt;indie&gt;" />
  <row Id="32332" PostHistoryTypeId="2" PostId="14428" RevisionGUID="8c866c9f-4171-4093-9fae-4b1e41b7e24a" CreationDate="2011-07-03T14:56:14.573" UserId="4662" Text="The most thriving indie marketplace on Windows right now has got to be Steam. Not every successful indie game is there, bu most indie games do very well there compared to independently." />
  <row Id="32333" PostHistoryTypeId="2" PostId="14429" RevisionGUID="ae093616-a051-41b1-83cd-1dfa73e3ed57" CreationDate="2011-07-03T15:07:43.193" UserId="6316" Text="You could try &lt;a href=&quot;http://animadead.sourceforge.net/&quot;&gt;Animadead&lt;/a&gt;, but that's about as dead as &lt;a href=&quot;http://gna.org/projects/cal3d/&quot;&gt;Cal3d&lt;/a&gt;.  &lt;a href=&quot;http://assimp.sourceforge.net/&quot;&gt;Assimp&lt;/a&gt; is also a possibility if you design your models using some sort of modeling software.  There may be better options out there though...  &lt;a href=&quot;http://www.gamedev.net/topic/497472-proposing-an-open-source-dynamic-physically-simulated-character-animation-library/&quot;&gt;This gamedev post&lt;/a&gt; may be helpful." />
  <row Id="32334" PostHistoryTypeId="2" PostId="14430" RevisionGUID="549fe6fc-7e2a-49b3-a972-a0b281dbb9e2" CreationDate="2011-07-03T15:18:50.843" UserId="7981" Text="I thought You need to know how to make these events and the rest of post is about it, If You want just to store these events then use some relational database or decribe them by text and use scripting language (he will do parsing and evaluating for You). :)&#xD;&#xA;&#xD;&#xA;What You want is to recognize events happened (1) and then do some actions which are demanded by these events (print message, check for keypress...) (2). You also want to make these events happen only once (3).&#xD;&#xA;&#xD;&#xA;Basically You want to check for conditions and then schedule some behaviour.&#xD;&#xA;&#xD;&#xA;**How to recognize events (1)**&#xD;&#xA;&#xD;&#xA;* You want to recognize events like these &quot;first enemy encountered&quot;, &quot;new item gained&quot;&#xD;&#xA;* if generic part happens, &quot;**enemy encountered**&quot;, &quot;**item gained**&quot; You check for specific part &quot;**first** ...&quot;, &quot;**new** item gained&quot;&#xD;&#xA;&#xD;&#xA;**What are events made of**&#xD;&#xA;&#xD;&#xA;In more general view, each such event is made of:&#xD;&#xA;&#xD;&#xA;* **preconditions**, You check them&#xD;&#xA;* **actions** which will be done when preconditions are met (say &quot;&quot;You slained first enemy!&quot;, say &quot;&quot;make combos by pressing A and B buttons&quot;, say &quot;press 'enter' to continue&quot;, require-key &quot;enter&quot;)&#xD;&#xA;&#xD;&#xA;**How to store these events**&#xD;&#xA;&#xD;&#xA;In some data structure:&#xD;&#xA;&#xD;&#xA;* have list of preconditions (strings or code if You are writing it in some high-level language)&#xD;&#xA;* have list of actions (they might be strings, Quake engine uses strings for events)&#xD;&#xA;&#xD;&#xA;You can also store it in relational database, althought it looks like it is not necessary, if You want to make this game in big You might need to make one.&#xD;&#xA;&#xD;&#xA;You then have to parse these strings/things. Or You can use some scripting language like Python or LUA or language like LISP, they all can parse and execute it for You. :)&#xD;&#xA;&#xD;&#xA;**How to use these events in game loop (2)**&#xD;&#xA;&#xD;&#xA;You will need these two data structures:&#xD;&#xA;&#xD;&#xA;* queue of events (events which are scheduled to be run are put here)&#xD;&#xA;* queue of actions (scheduled actions, events imply which actions are done)&#xD;&#xA;&#xD;&#xA;Algorithm:&#xD;&#xA;&#xD;&#xA;* If You recognize some of **event**'s **preconditions** are met You put him into **event queue**&#xD;&#xA;* (3) Then You should make sure this event happened only once if You want :) (for example with boolean array has_this_event_happened[&quot;first enemy encountered&quot;])&#xD;&#xA;* (if **action queue** is empty, then) If there is event in **event queue** You put his **actions** into **action queue** and remove him from **event queue**&#xD;&#xA;* If there is **action** in **action queue** You start doing what is demanded by it&#xD;&#xA;* If such **action** is done You remove it from **action queue**&#xD;&#xA;&#xD;&#xA;**How to make these actions itself (2)**     &#xD;&#xA;&#xD;&#xA;You make list of objects, which have function &quot;update&quot;. They are sometimes called entities (in Quake engine) or actors (in Unreal engine). &#xD;&#xA;&#xD;&#xA;1. You start these objects when they are demanded to start in action queue.&#xD;&#xA;2. these object can be used for other things such as some other timers. In Quake these entities are used for whole game logic, I recommend [You to read some material about it][1].&#xD;&#xA;&#xD;&#xA;Action &quot;say something&quot;&#xD;&#xA;&#xD;&#xA;1. You print something on screen&#xD;&#xA;2. You want this message to appear for few seconds&#xD;&#xA;3. in &quot;update&quot;:&#xD;&#xA;* make variable remove_me_after and decrease it by time which passed&#xD;&#xA;* when variable is 0 You remove this action from **action queue**&#xD;&#xA;* You also remove this object (or schedule it to be removed...)&#xD;&#xA;&#xD;&#xA;Action &quot;require key&quot;&#xD;&#xA;&#xD;&#xA;1. It depeneds on how You want to make it, but I think You You make a message&#xD;&#xA;2. in &quot;update&quot;&quot;:&#xD;&#xA;* You just check for wanted keypress event&#xD;&#xA;* You probably need some array/queue to hold keypress events&#xD;&#xA;* then You can remove it from **action queue** and remove the object&#xD;&#xA;    &#xD;&#xA;**What methods to learn**&#xD;&#xA;&#xD;&#xA;* [Scheduling][6]&#xD;&#xA;* [Event Calculus][4]&#xD;&#xA;* [Logical Programming][8] (optional)&#xD;&#xA;* [Hoare logic][3]&#xD;&#xA;* [Event Driven Programming][7]&#xD;&#xA;* Agent Programming, there is [&quot;pretty&quot; C++ example from AI-Junkie][2]&#xD;&#xA;* [Relational Databases][5] (optional)&#xD;&#xA;&#xD;&#xA;[1]:http://forums.inside3d.com/viewtopic.php?p=36321&#xD;&#xA;[2]:http://www.ai-junkie.com/architecture/state_driven/tut_state1.html&#xD;&#xA;[3]:http://en.wikipedia.org/wiki/Hoare_logic&#xD;&#xA;[4]:http://en.wikipedia.org/wiki/Event_calculus&#xD;&#xA;[5]:http://en.wikipedia.org/wiki/Relational_model&#xD;&#xA;[6]:http://en.wikipedia.org/wiki/Scheduling_%28computing%29&#xD;&#xA;[7]:http://en.wikipedia.org/wiki/Event-driven_programming&#xD;&#xA;[8]:http://en.wikipedia.org/wiki/Logical_programming" />
  <row Id="32335" PostHistoryTypeId="25" PostId="14427" RevisionGUID="eb347e40-1fd4-4c7f-9afc-862d7683b351" CreationDate="2011-07-03T15:26:43.440" Comment="http://twitter.com/#!/StackGameDev/status/87542794025041921" />
  <row Id="32336" PostHistoryTypeId="2" PostId="14431" RevisionGUID="fec0cc05-e528-4a65-a63b-7199c8b90614" CreationDate="2011-07-03T15:29:23.470" UserId="7981" Text="Use [Event Calculus][1]. Then make some preconditions and actions which are applied after preconditions are met:&#xD;&#xA;&#xD;&#xA;* preconditions: you killed 1000 enemies, you have 2 legs&#xD;&#xA;* actions: give me lollypop, give me super-duper-shotgun-13&#xD;&#xA;* first-time-actions: say &quot;you are so awesome!&quot;&#xD;&#xA;&#xD;&#xA;Use it like (non-optimized for speed!):&#xD;&#xA;&#xD;&#xA;* Store all statistics.&#xD;&#xA;* Query statistics for preconditions.&#xD;&#xA;* Apply actions.&#xD;&#xA;* Apply one-time actions once.&#xD;&#xA;&#xD;&#xA;If You want to make it fast:&#xD;&#xA;&#xD;&#xA;* Cache whatever You want, store parts of it in some trees, hashes ...&#xD;&#xA;* Make changes incremental so You dont apply all the actions all the time but these which are new ...)&#xD;&#xA;&#xD;&#xA;**Note**&#xD;&#xA;&#xD;&#xA;It is hard to give **best** advice since all things have pros and cons. &#xD;&#xA;&#xD;&#xA;* &quot;What is best datastructure?&quot; implies &quot;What operations You want to do with it most? Searching, removing, adding ...&quot;&#xD;&#xA;* You basically think in these properties: ease of coding, speed, clarity, size ...&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Event_calculus" />
  <row Id="32337" PostHistoryTypeId="2" PostId="14432" RevisionGUID="4fbdb565-e65c-42b7-b5d3-fe0b48b35976" CreationDate="2011-07-03T15:32:56.167" UserId="7103" Text="What are the best practices for playing sounds in iPhone games? Specifically, what are the best practices while playing sounds simultaneously without affecting other processing much. Is there any recommendation about how sound files must be made to suit the processing? " />
  <row Id="32338" PostHistoryTypeId="1" PostId="14432" RevisionGUID="4fbdb565-e65c-42b7-b5d3-fe0b48b35976" CreationDate="2011-07-03T15:32:56.167" UserId="7103" Text="Best practices for playing sounds in iPhone games." />
  <row Id="32339" PostHistoryTypeId="3" PostId="14432" RevisionGUID="4fbdb565-e65c-42b7-b5d3-fe0b48b35976" CreationDate="2011-07-03T15:32:56.167" UserId="7103" Text="&lt;iphone&gt;&lt;sound&gt;&lt;openal&gt;" />
  <row Id="32340" PostHistoryTypeId="5" PostId="14424" RevisionGUID="5e262c7c-5a1e-4837-9a7d-c7b540637492" CreationDate="2011-07-03T15:34:01.680" UserId="8395" Comment="added 97 characters in body" Text="I'm trying to make my character move around a tile map with collisions. Everything works fine except for one thing. I show you a picture with the problem:&#xD;&#xA;&#xD;&#xA;http://i.stack.imgur.com/ZWI7x.jpg&#xD;&#xA;&#xD;&#xA;That is, when I reach a tile above then I can not move anywhere. If you come from the left, I can not move either up or down. If you reach the bottom, I can move to the left but not right. And when you reach the right I can move in any direction.&#xD;&#xA;&#xD;&#xA;Honestly I have no idea what may be failing. I think it has to do with if (...), because if I change the order,  the addresses where I can move change :/&#xD;&#xA;&#xD;&#xA;Here I leave some code:&#xD;&#xA;&#xD;&#xA;    boolean collision = false;&#xD;&#xA;    &#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_UP)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(UpTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(0.0f, -vel);&#xD;&#xA;    }&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(LeftTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(-vel, 0.0f);&#xD;&#xA;    }&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_DOWN)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(DownTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(0.0f, vel);&#xD;&#xA;    }&#xD;&#xA;    if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) {&#xD;&#xA;        for(int i = 0; i &lt; map.GetNumLayers(); i++) {&#xD;&#xA;            if(RightTile(map, i) &gt; 128) {&#xD;&#xA;                collision = true;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;       &#xD;&#xA;        if(!collision) AddPos(vel, 0.0f);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public int UpTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int LeftTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(0, (int) (x/size), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int DownTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size), (int) (y/size + 1));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public int RightTile(Map map, int layer) {&#xD;&#xA;        return map.GetValue(layer, (int) (x/size + 1), (int) (y/size));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public int GetValue(int layer, int x, int y) {&#xD;&#xA;        return array[layer][y][x];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The map is an array with 3 componentes: [LAYER][Y][X]. So, in RightTile by example, with GetValue, I'm getting the value from the array in the position [layer][y/size][x/size + 1], x/size + 1 because I want to get the kind of tile that is to my right (same with the others). size = 64, that is the width and height of each tile. &#xD;&#xA;&#xD;&#xA;Thanks &gt;.&lt;" />
  <row Id="32341" PostHistoryTypeId="2" PostId="14433" RevisionGUID="9165ec59-d969-4738-a764-a6cafb45a250" CreationDate="2011-07-03T15:50:23.497" UserId="7981" Text="**Things to consider**&#xD;&#xA;&#xD;&#xA;* Object oriented languages have problems because they usually don't have first class functions or not all data is object (like integer or float in Java). Design patterns adress these problems with several patterns. It is generally faster to code and easier to mantain to use language which can do them. For example Python, which also allows object oriented design. You will have slower speed thuough.&#xD;&#xA;* Event Calculus, to AI at least&#xD;&#xA;* Hoare logic, use preconditions and postconditions to at least test Your code&#xD;&#xA;* Agents, look at [Quake entities][1]&#xD;&#xA;* Relational Databases, powerful way to store data&#xD;&#xA;&#xD;&#xA;**Good design**&#xD;&#xA;&#xD;&#xA;* make ER diagram&#xD;&#xA;* make it correct&#xD;&#xA;* create your database, objects or data strutures from it&#xD;&#xA;&#xD;&#xA;Data is key to programming. If You desing Your data good, algorithm usually emerge from them (if You don't count some numerical algorithms, like computing determinant).&#xD;&#xA;&#xD;&#xA;[1]:http://forums.inside3d.com/viewtopic.php?p=36324" />
  <row Id="32342" PostHistoryTypeId="2" PostId="14434" RevisionGUID="09246eec-c6be-4bb3-8dc3-5c1902d24142" CreationDate="2011-07-03T16:15:02.643" UserId="8395" Text="Post it everywhere you can; Steam, Desura... Head over to the Business section of http://tigsource.com forum. Send to this page too to also publish it on cover. Send also to http://indiegames.com/index.html&#xD;&#xA;&#xD;&#xA;It is a good way to advertise." />
  <row Id="32343" PostHistoryTypeId="2" PostId="14435" RevisionGUID="2612bf99-c191-4795-849f-8632d4c0c546" CreationDate="2011-07-03T16:22:08.970" UserId="2248" Text="I'm making a multiplayer mode for a game I developed, and it works over UDP.  &#xD;&#xA;What I need now is a server to let a player know another player, and send each one the other's IP.  &#xD;&#xA;I own a VPS that I'm currently using to host a few websites, so I guess I can use it for this purpose too.&#xD;&#xA;&#xD;&#xA;I would choose Python as a language to build it.  But I don't know where to start...  &#xD;&#xA;Should I make it on HTTP or TCP?  &#xD;&#xA;Is there any library I can use to simplify the work?  &#xD;&#xA;Or any example of something similar? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any help will be appreciated." />
  <row Id="32344" PostHistoryTypeId="1" PostId="14435" RevisionGUID="2612bf99-c191-4795-849f-8632d4c0c546" CreationDate="2011-07-03T16:22:08.970" UserId="2248" Text="Build a handshake server for a multiplayer game." />
  <row Id="32345" PostHistoryTypeId="3" PostId="14435" RevisionGUID="2612bf99-c191-4795-849f-8632d4c0c546" CreationDate="2011-07-03T16:22:08.970" UserId="2248" Text="&lt;multiplayer&gt;&lt;server&gt;" />
  <row Id="32346" PostHistoryTypeId="2" PostId="14436" RevisionGUID="13dc0fa4-ad6f-4baa-a031-a4c4c31e59a8" CreationDate="2011-07-03T16:46:25.787" UserId="3505" Text="The upper right of the shown screens is misleading, you are only prevented from moving right in that situation if you try to move down at the same time. The reason that trying to move in another direction can block your movement is that you don't reset you variable `collision` to `false` between checks, thus as soon as one direction has set it to `true` it will it will block the following move directions.&#xD;&#xA;&#xD;&#xA;Take a visual glance at what points you are actually checking, the upper left corner of your character twice, the upper right, and the lower left. Seems like a strange pattern, right?&#xD;&#xA;&#xD;&#xA;To get things working as you'd want them in a simple fashion I suggest you use an 8 points method, 2 points for each direction, positioned at the corners of your character, moved out at least as far as the maximum moving speed.&#xD;&#xA;&#xD;&#xA;&lt;img src=&quot;http://i.imgur.com/xjbzn.png&quot;&gt;  &#xD;&#xA;Left: Current test. Right: Suggested test." />
  <row Id="32347" PostHistoryTypeId="2" PostId="14437" RevisionGUID="1364ad86-0289-43c6-87ee-e239b610781d" CreationDate="2011-07-03T16:51:36.387" UserId="6188" Text="I'd like to know if someone has found a way to build a component-based entity system in their game(s) without using IDs. I find that IDs tend to do away with one of the major (possible) advantages of OOP: not having to be aware of the type of a certain object." />
  <row Id="32348" PostHistoryTypeId="1" PostId="14437" RevisionGUID="1364ad86-0289-43c6-87ee-e239b610781d" CreationDate="2011-07-03T16:51:36.387" UserId="6188" Text="Component-based entities without IDs?" />
  <row Id="32349" PostHistoryTypeId="3" PostId="14437" RevisionGUID="1364ad86-0289-43c6-87ee-e239b610781d" CreationDate="2011-07-03T16:51:36.387" UserId="6188" Text="&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="32350" PostHistoryTypeId="2" PostId="14438" RevisionGUID="d9e2f208-d340-47ad-9361-c4b06d0a27f8" CreationDate="2011-07-03T17:15:48.060" UserId="4191" Text="I use IDs (for entities, not components), though I could do without them if I didn't want weak referencing for purposes of persistence + lazy loading.  Mine do not defeat polymorphism as you describe, though.  Try having your IDs provided by a universal registry and accessed via a standard interface." />
  <row Id="32351" PostHistoryTypeId="2" PostId="14439" RevisionGUID="1652fecc-0d76-4387-93e5-5734940c0bc0" CreationDate="2011-07-03T17:26:26.893" UserId="7981" Text="I present simplistic solution. It can be extended of course.&#xD;&#xA;&#xD;&#xA;I think simple list of **(verb, object1, object2)** would solve it: &#xD;&#xA;&#xD;&#xA;* if player clicked object (verb) &quot;use&quot; and clicked object &quot;balloon&quot; and player clicked object &quot;pump&quot; and there exists triplet (&quot;use&quot;, &quot;ballon&quot;, &quot;pump&quot;) then You &quot;used ballon with pump&quot; &#xD;&#xA;* Sometimes object2 would be NULL like in &quot;use helium&quot; (use, helium, NULL)&#xD;&#xA;* Require player to click on object verb first&#xD;&#xA;* if player clicks on something which does not match anything say &quot;I can't do this, this is nonsense&quot;&#xD;&#xA;* Of course You should check after every click if the sequence is correct.&#xD;&#xA;&#xD;&#xA;How to handle defaults:&#xD;&#xA;&#xD;&#xA;* If first click is not on verb object, search for possible default action.&#xD;&#xA;* One way to store defaults would be to make quadruplet **(verb, object1, object2, is-default)**&#xD;&#xA;* Other way to store them would be to have list of default triplets&#xD;&#xA;* ...&#xD;&#xA;&#xD;&#xA;Some examples:&#xD;&#xA;&#xD;&#xA;* (use, ballon, pump)&#xD;&#xA;* (give, John, potato)&#xD;&#xA;* (walk, piranhas, NULL)&#xD;&#xA;* (use, ballon-in-inventory, pump)&#xD;&#xA;* (open, door-to-roof, NULL) , default .... example of default action&#xD;&#xA;&#xD;&#xA;It can be extended:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* add some events to be triggered (give player something, player will say &quot;I can't do that because I am a mighty pirate&quot;, start cut-scene, change something in world ...)&#xD;&#xA;* add some preconditions. Sometimes the ballon might be in cage, so You would need to express &quot;if ballon is not in cage&quot;. I think I might approach this with event calculus or prolog or do it with function pointer ...&#xD;&#xA;* sometimes the sentence in commandline would not be &quot;look at hole&quot; but would be rewritten to &quot;look into hole&quot;, this requires just a variable :)" />
  <row Id="32352" PostHistoryTypeId="2" PostId="14440" RevisionGUID="2ad79579-2eab-4a9f-b183-f235b9d853cc" CreationDate="2011-07-03T17:30:41.563" UserId="6877" Text="Found another one, [Alienmotion ](http://www.chemical-games.com/?page_id=1057). It looks cool. But requires maturation." />
  <row Id="32353" PostHistoryTypeId="5" PostId="14433" RevisionGUID="c4c1be82-663e-4440-a2a2-28606a772a84" CreationDate="2011-07-03T17:50:26.507" UserId="7981" Comment="I made missteke by reordeing sentences" Text="**Things to consider**&#xD;&#xA;&#xD;&#xA;* Object oriented languages have problems because they usually don't have first class functions or not all data is object (like integer or float in Java). Design patterns adress these problems with several patterns. It is generally faster to code and easier to mantain to use language which can do them (first class objects); for example Python (which also allows object oriented design), You will have slower speed thuough.&#xD;&#xA;* Event Calculus, to AI at least&#xD;&#xA;* Hoare logic, use preconditions and postconditions to at least test Your code&#xD;&#xA;* Agents, look at [Quake entities][1]&#xD;&#xA;* Relational Databases, powerful way to store data&#xD;&#xA;&#xD;&#xA;**Good design**&#xD;&#xA;&#xD;&#xA;* make ER diagram&#xD;&#xA;* make it correct&#xD;&#xA;* create your database, objects or data strutures from it&#xD;&#xA;&#xD;&#xA;Data is key to programming. If You desing Your data good, algorithm usually emerge from them (if You don't count some numerical algorithms, like computing determinant).&#xD;&#xA;&#xD;&#xA;[1]:http://forums.inside3d.com/viewtopic.php?p=36324" />
  <row Id="32354" PostHistoryTypeId="25" PostId="14418" RevisionGUID="474fa4f5-a761-4287-81a9-75de5f3720f4" CreationDate="2011-07-03T18:26:44.913" Comment="http://twitter.com/#!/StackGameDev/status/87588097004539905" />
  <row Id="32355" PostHistoryTypeId="2" PostId="14441" RevisionGUID="0f63929a-afe3-466a-8a9e-b38927ebdf7f" CreationDate="2011-07-03T18:47:40.230" UserId="2061" Text="Your entities *need* ID's in some form or another, if you want to persist them to disk, or pass them over a network.  Thus, what you probably want is not to *get rid* of ID's, but to *dynamically generate* them so you don't have to set them manually in the code every time you create a new Entity-class.&#xD;&#xA;&#xD;&#xA;I've done this in my latest C# project by creating a special List class that assigns a unique index to every item added to the list.  Unlike a normal list, when an item is removed, the indices for the rest of the items don't change  (Internally it's implemented [using a `Dictionary`][1]).&#xD;&#xA;&#xD;&#xA;Thus, as long as the entities are added to the list in the same order every time the executable is run (or, for networking, between all clients), they will always have the same ID.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/2884068/what-is-the-difference-between-a-map-and-a-dictionary" />
  <row Id="32356" PostHistoryTypeId="2" PostId="14442" RevisionGUID="ba0f40e5-d7c2-440b-8871-bdc8e5cb4d43" CreationDate="2011-07-03T18:47:57.033" UserId="4191" Text="Because this server will be handling relatively little traffic and only has to be talked to to set up a game, it probably wouldn't be *terrible* to make it an HTTP-based service.  I would tend to advise rolling your own application-level protocol over TCP anyway, though, if only because it's of fairly major concern here whether a client is still there and waiting for a game, and HTTP complicates that considerably with its pesky statelessness.&#xD;&#xA;&#xD;&#xA;As far as examples go, here, have [some pretty good, well-commented example code for a general network service daemon in Python][1] that you can start building from.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://kristopherjohnson.blogspot.com/2007/08/python-server-start-take-2.html" />
  <row Id="32357" PostHistoryTypeId="2" PostId="14443" RevisionGUID="2b68dff9-006b-401d-877f-fd75339dfa7b" CreationDate="2011-07-03T18:49:28.737" UserId="7328" Text="there is a game engine named cocos2D, and it contains an audio engine named [cocosdenshion](http://www.cocos2d-iphone.org/wiki/doku.php/cocosdenshion:faq). it's a three layer object oriented sound engine. you can easily select a layer and starting working with that. and it's all based on openAL, you can surly get enough ideas from cocosdension even if you don't want to use it directly. and it's under **MIT License** so you can use that without any worry." />
  <row Id="32358" PostHistoryTypeId="5" PostId="14441" RevisionGUID="97edf118-d5d9-4078-91e6-0848895f06a5" CreationDate="2011-07-03T18:54:30.477" UserId="2061" Comment="added 254 characters in body" Text="Your entities *need* ID's in some form or another, if you want to persist them to disk, or pass them over a network.  Thus, what you probably want is not to *get rid* of ID's, but to *dynamically generate* them so you don't have to set them manually in the code every time you create a new Entity-class.&#xD;&#xA;&#xD;&#xA;I've done this in my latest C# project by creating a special List class that assigns a unique index to every item added to the list.  Unlike a normal list, when an item is removed, the indices for the rest of the items don't change  (Internally it's implemented [using a `Dictionary`][1]).&#xD;&#xA;&#xD;&#xA;Thus, as long as the entities are added to the list in the same order every time the executable is run (or, for networking, between all clients), they will always have the same ID.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The problem with this solution is that it's not in a human-friendly format.  To fix this, you could use reflection to prepend [the type-name][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/2884068/what-is-the-difference-between-a-map-and-a-dictionary&#xD;&#xA;  [2]: http://stackoverflow.com/questions/1055452/c-get-name-of-type-in-template/1055486#1055486" />
  <row Id="32359" PostHistoryTypeId="6" PostId="14437" RevisionGUID="f73af9e1-ccd2-4cae-a253-0352e0b3025b" CreationDate="2011-07-03T19:31:00.943" UserId="4191" Comment="edited tags" Text="&lt;component-based&gt;&lt;entity-system&gt;&lt;polymorphism&gt;" />
  <row Id="32360" PostHistoryTypeId="2" PostId="14444" RevisionGUID="8df1a60c-5c87-4210-878b-c6306770d2c7" CreationDate="2011-07-03T19:50:41.137" UserId="8398" Text="Is there a need in the community for affordable game-focused sound effect packs? I am considering putting together some effects specifically geared toward games and indie developers that desire to get a working prototype quickly off the ground. Is there a need for this, or is there another standard &quot;go-to&quot; spot for this kind of thing? I want to offer value to the community but wanted to assess the need first. If anyone has thoughts, insight, or personal opinions on this I would love to hear it!" />
  <row Id="32361" PostHistoryTypeId="1" PostId="14444" RevisionGUID="8df1a60c-5c87-4210-878b-c6306770d2c7" CreationDate="2011-07-03T19:50:41.137" UserId="8398" Text="Game Sound Effects Availability" />
  <row Id="32362" PostHistoryTypeId="3" PostId="14444" RevisionGUID="8df1a60c-5c87-4210-878b-c6306770d2c7" CreationDate="2011-07-03T19:50:41.137" UserId="8398" Text="&lt;sound&gt;&lt;sound-effects&gt;" />
  <row Id="32363" PostHistoryTypeId="2" PostId="14445" RevisionGUID="a38431a8-c15c-4265-a65a-545015996d53" CreationDate="2011-07-03T20:26:23.000" UserId="5021" Text="Places that I currently get sound effects from:&#xD;&#xA;&#xD;&#xA;Free:&#xD;&#xA;&#xD;&#xA; - http://www.freesound.org/&#xD;&#xA;   &#xD;&#xA; - http://ccmixter.org (Samples-&gt;Browse, there are various recordings of crowds/rain/instruments/etc).&#xD;&#xA;&#xD;&#xA;Paid:&#xD;&#xA;&#xD;&#xA; - http://www.soundsnap.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There is certainly a need for sound effects in the indie game community. Hopefully those sites will give you a sense of what is currently available, and how you might be able to fill that need.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32364" PostHistoryTypeId="5" PostId="14383" RevisionGUID="77f93c74-e7ed-4f12-b056-9a9fb3201f5d" CreationDate="2011-07-03T20:45:43.207" UserId="6362" Comment="added 548 characters in body" Text="I'm working on a game where some in-game events need to happen once in a while. A nice example would be a tutorial.&#xD;&#xA;You start the game, and at several points in the game an event occurs:&#xD;&#xA;&#xD;&#xA;- You encounter your first enemy, the game pauses and you receive an explanation on how to kill it&#xD;&#xA;- You killed the first enemy, you receive a &quot;good job&quot; message&#xD;&#xA;- You gain a new item, a menu with the items stats popup&#xD;&#xA;- etc etc&#xD;&#xA;&#xD;&#xA;The game I'm working on is a puzzle game where the rules in the game are pretty much all the same, so it seems inefficient to hardcode all these events in seperate levels. &#xD;&#xA;&#xD;&#xA;Should I somehow define these events in an external source, like xml? Then write an intrepeter that reads out the xml and sets the events requirements for the level.&#xD;&#xA;I'm not sure how I could define an event that should occur when you killed 2 enemies for example.&#xD;&#xA;&#xD;&#xA;Just to be clear, i'm not looking for the best programming language or scripting language to do this, but more at the best method to handle this.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;A second example since my question was pretty hard to understand:&#xD;&#xA;&#xD;&#xA;The problem I'm having is to put some extra actions in the game in a procedure that is always pretty much the same. Like an RPG battle, everyone has a turn, picks a skill etc - it's always the same. But what if there was a case where I would to display a cut-scene somewhere in between. Modyfing the entire game structure to pass in an altered battle class with the cutsene included seems very inefficient. I'm wondering how this is usually done?" />
  <row Id="32365" PostHistoryTypeId="2" PostId="14446" RevisionGUID="6c56fc4d-7c7e-4a36-b017-f4fd33aaf523" CreationDate="2011-07-03T20:51:54.313" UserId="6398" Text="It really depends on how your game graphics are set up and how you want this effect to work. In 2d &quot;shadows&quot; aren't really uniquely defined so you need to decide what sort of behaviour you want from them.&#xD;&#xA;&#xD;&#xA;If you're looking for something like drop-shadows in Photoshop then you first need the relative depths of objects to be defined somehow, either individually or in bins (i.e foreground, middle, background).&#xD;&#xA;&#xD;&#xA;To actually cast a drop-shadow a simple method would be to render all onscreen shadow-casting objects to a texture w/ a simple shader that outputs opaque black (for solid pixels) or transparent/0-alpha (for empty pixels); then use this &quot;shadow buffer&quot; w/ multiply blending on the shadow-receiving objects -- you can offset the shadow buffer to make the drop-shadow fall e.g to the left and down.&#xD;&#xA;&#xD;&#xA;If you want objects to both cast and receive shadows (i.e object-by-object shadows instead of layer-by-layer) you could try a similar approach where you iterate over all objects from front to back, rendering the object w/ the current shadow-buffer applied and then adding the object to the shadow buffer. This would involve a lot of texture binding/unbinding though (assuming you have hundreds of objects) so I'm not sure if it's a good solution." />
  <row Id="32366" PostHistoryTypeId="25" PostId="14444" RevisionGUID="65dfe60c-17bc-41b7-8110-145de8fa4749" CreationDate="2011-07-03T21:26:44.837" Comment="http://twitter.com/#!/StackGameDev/status/87633396880248832" />
  <row Id="32368" PostHistoryTypeId="2" PostId="14447" RevisionGUID="f44cefa1-e176-4e9e-9c96-488b94edeb42" CreationDate="2011-07-03T21:41:56.960" UserId="6877" Text="sorry, no specific order or anything. Just a big list, &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://www.sounddogs.com/&#xD;&#xA;&#xD;&#xA;http://www.vionline.com/sound.html&#xD;&#xA;&#xD;&#xA;http://www.soundrangers.com/&#xD;&#xA;&#xD;&#xA;http://www.newgrounds.com/audio/&#xD;&#xA;&#xD;&#xA;http://www.stonewashed.net/sfx.html&#xD;&#xA;&#xD;&#xA;http://incompetech.com/m/c/royalty-free/&#xD;&#xA;&#xD;&#xA;http://soundbible.com/&#xD;&#xA;&#xD;&#xA;http://www.findsounds.com/&#xD;&#xA;&#xD;&#xA;http://www.therecordist.com/video-game-audio/game-audio-samples&#xD;&#xA;&#xD;&#xA;http://freegamedev.net/wiki/index.php/Free_3D_and_2D_art_and_audio_resources&#xD;&#xA;&#xD;&#xA;http://www.maz-sound.com/&#xD;&#xA;&#xD;&#xA;http://www.madtracker.org/about.php&#xD;&#xA;" />
  <row Id="32369" PostHistoryTypeId="2" PostId="14448" RevisionGUID="2a9f36f7-2cab-4ce2-87ce-cf416fb95a3a" CreationDate="2011-07-03T21:47:58.810" UserId="6877" Text="I don't have enough reputation point to comment, but posted as an answer anyway,&#xD;&#xA;&#xD;&#xA;this link might be interesting for you [android-experiment-porting-my-xna-game](http://fairyengine.blogspot.com/2011/05/android-experiment-porting-my-xna-game.html)" />
  <row Id="32370" PostHistoryTypeId="2" PostId="14449" RevisionGUID="5300dc95-6276-4e21-8232-70ae18c41661" CreationDate="2011-07-03T22:16:10.160" UserId="7946" Text="First of all, HTTP and TCP are protocols for entirely different purposes. &#xD;&#xA;&#xD;&#xA;[TCP][1] is a [transport layer][2] protocol designed to transport information inside a network from one end to the other in a reliable way.&#xD;&#xA;&#xD;&#xA;[HTTP][3]&#xD;&#xA;is an [application-layer][4] protocol designed to get application-specific information across a given connection. It does not care about how the information is transported (other than the fact that it uses TCP to transport data), it just cares about how the information is formatted.&#xD;&#xA;&#xD;&#xA;Asking &quot;Should I use TCP or HTTP&quot; is like asking &quot;Should I use a hammer or nails to put that picture on the wall?&quot;.&#xD;&#xA;&#xD;&#xA;As for your problem: I would strongly suggest that you simply build your own protocol and use it. It's not that hard. You get your connection up (usually through UDP, but since latency won't be an issue for your handshake server, TCP will be fine and easier to handle, too) and literally just send a bunch of text messages across the connection. &#xD;&#xA;&#xD;&#xA;For example, a basic network protocol for your needs could look like this:&#xD;&#xA;&#xD;&#xA;    -Client sends &quot;HELLO, I'M [YOUR NAME]&quot;&#xD;&#xA;    &#xD;&#xA;    -Server registers name.&#xD;&#xA;    &#xD;&#xA;    -Client sends &quot;GIVE LIST&quot; to server&#xD;&#xA;    &#xD;&#xA;    -Server sends the names of a whole bunch of players&#xD;&#xA;&#xD;&#xA;After client selects server in your GUI or whatever you have set up:&#xD;&#xA;&#xD;&#xA;    -Client requests IP address of player by sending &quot;GET [PLAYERNAME]&quot;&#xD;&#xA;    &#xD;&#xA;    -Server sends IP address of player&#xD;&#xA;    &#xD;&#xA;    -Client connects&#xD;&#xA;&#xD;&#xA;It's literally as simple as that. Thanks to TCP your server will know who sent the requests and can answer accordingly, and TCP also handles packet transfer, so you don't have to worry about ACKing and such. &#xD;&#xA;&#xD;&#xA;Of course, it is not **that** simple. If your server would run like that, it would be pretty vulnerable to distributed denial of service attacks (although your v-server provider might already take care of that for you) and there are of course other issues, like player identification (you  might not want anyone to log onto your server), traffic minimization (making the messages a little more cryptic in order to send a few characters less per message) and so forth. But you should be able to figure out the rest.&#xD;&#xA;&#xD;&#xA;If you're asking about how to transfer stuff across a network in general, you should google &quot;sockets&quot; in addition to the name of the programming language that you're using.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Transmission_Control_Protocol&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Transport_Layer&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Http&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Application_Layer" />
  <row Id="32371" PostHistoryTypeId="5" PostId="14440" RevisionGUID="84c95669-3f9b-41ef-9ccd-fb42ef6b2ea5" CreationDate="2011-07-03T22:50:27.133" UserId="6877" Comment="added 190 characters in body" Text="Found another one, [Alienmotion ](http://www.chemical-games.com/?page_id=1057). It looks cool. But requires maturation.&#xD;&#xA;&#xD;&#xA;Ive also noticed I can use [ogre animation](http://www.ogre3d.org/docs/manual/manual_75.html#SEC344) code. Though, I wonder how easy/hard its gonna be. But, its also another possibility." />
  <row Id="32372" PostHistoryTypeId="2" PostId="14450" RevisionGUID="7e2388a7-3535-4785-9f8b-9cde77087322" CreationDate="2011-07-03T23:03:14.920" UserId="8399" Text="I want hook all OpenGL games/applications. I want load my library only if application actually use OpenGL. Something like `Direct3DCreate9` for Direct3D 9 or `CreateDXGIFactory` for Direct3D 10/11.&#xD;&#xA;&#xD;&#xA;I thought this function `wglDescribePixelFormat`, but some app's/games not use it." />
  <row Id="32373" PostHistoryTypeId="1" PostId="14450" RevisionGUID="7e2388a7-3535-4785-9f8b-9cde77087322" CreationDate="2011-07-03T23:03:14.920" UserId="8399" Text="What is first function which calls every OpenGL application on Windows?" />
  <row Id="32374" PostHistoryTypeId="3" PostId="14450" RevisionGUID="7e2388a7-3535-4785-9f8b-9cde77087322" CreationDate="2011-07-03T23:03:14.920" UserId="8399" Text="&lt;opengl&gt;&lt;windows&gt;" />
  <row Id="32375" PostHistoryTypeId="2" PostId="14451" RevisionGUID="f71d7739-a6da-4633-9114-c8b01661b417" CreationDate="2011-07-03T23:34:56.237" UserId="6877" Text="I am not sure about it, but `wglCreateContext` seems to be the first one. PIXELFORMATDESCRIPTOR is a structure.&#xD;&#xA;&#xD;&#xA;and platform to platform context creating is the first one and its initialization varies. Like when you are using glut/freeglut, you can get started without creating context manually or describing pixel format." />
  <row Id="32377" PostHistoryTypeId="2" PostId="14453" RevisionGUID="02e69091-2489-4332-92b4-a6b1204f516d" CreationDate="2011-07-03T23:47:08.327" UserId="5899" Text="From [Technical Note TN2199][1], relative to the use of OpenAL&#xD;&#xA;&#xD;&#xA;- Use the alBufferDataStatic API, found in the oalStaticBufferExtension.h header file, instead of the standard alBufferData function. This eliminates extra buffer copies by allowing your application to own the audio data memory used by the buffer objects.&#xD;&#xA;&#xD;&#xA;- If your application renders several audio buffers simultaneously, you should typically use a lower sample rate, such as 22kHz. When rendering a single source, a 44.1kHz sample rate may be most efficient. Experiment and analyze the performance of your application. Individual circumstances determine the best tradeoff between sample rate and the number of audio sources being rendered.&#xD;&#xA;&#xD;&#xA;A [link][2] with general audio tips for iPhone.&#xD;&#xA;&#xD;&#xA;And my personal opinion:&#xD;&#xA;&#xD;&#xA;- Preload the sounds into memory ( load screens is the better place for this ).&#xD;&#xA;- Use formats with high compression to take less memory. Like .ogg.&#xD;&#xA;- To the musics, try to load them via streaming, because them can occupy a lot of memory.&#xD;&#xA;- The spacial sounds ( sounds with a position ) needs to be mono, if the game needs them, it's a memory saving.&#xD;&#xA;- Put a sample limit, more than 5 or six sounds at same time can be confusing and they don't contribute.&#xD;&#xA;- If your game is developed in c++, you can use a library like [cAudio][3] or make yourself a OpenAL wrapper, these approach has the benefit that you only has the functionality that you needs.&#xD;&#xA;&#xD;&#xA;- **Rule of thumb**: don't allocate/deallocate memory into gameplay. This is applicable to sounds and the other resources like images. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/library/ios/#technotes/tn2199/_index.html#//apple_ref/doc/uid/DTS40007999&#xD;&#xA;  [2]: http://noeruiz.com/tuts/audio-tips-for-iphone-development/&#xD;&#xA;  [3]: http://sourceforge.net/projects/caudio/" />
  <row Id="32378" PostHistoryTypeId="25" PostId="14450" RevisionGUID="fbe4d430-67f3-4962-9253-f5c8d7eb2148" CreationDate="2011-07-04T00:26:45.453" Comment="http://twitter.com/#!/StackGameDev/status/87678697112473602" />
  <row Id="32379" PostHistoryTypeId="2" PostId="14454" RevisionGUID="58dd0a00-ecb5-4755-9207-a8980de61867" CreationDate="2011-07-04T00:54:02.847" UserId="2520" Text="The [Aves game engine][1] made a splash last spring/summer, with very impressive demo videos. I went back to check on them, and it looks like their site has long since died. Google also doesn't seem to know anything new about them.&#xD;&#xA;&#xD;&#xA;Where can I find news about Aves? Is the project dead?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=Ol3qQ4CEUTo" />
  <row Id="32380" PostHistoryTypeId="1" PostId="14454" RevisionGUID="58dd0a00-ecb5-4755-9207-a8980de61867" CreationDate="2011-07-04T00:54:02.847" UserId="2520" Text="Where is the Aves game engine?" />
  <row Id="32381" PostHistoryTypeId="3" PostId="14454" RevisionGUID="58dd0a00-ecb5-4755-9207-a8980de61867" CreationDate="2011-07-04T00:54:02.847" UserId="2520" Text="&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="32382" PostHistoryTypeId="2" PostId="14455" RevisionGUID="9e9bf852-8487-47fc-bc23-9a3f23f11af3" CreationDate="2011-07-04T01:18:22.583" UserId="5899" Text="Dextrose was acquired by Zynga ( creators of Farmville, mafia wars )&#xD;&#xA;&#xD;&#xA;http://www.insidesocialgames.com/2010/09/24/zynga-acquires-dextrose-aves-engine-html5/" />
  <row Id="32383" PostHistoryTypeId="2" PostId="14456" RevisionGUID="b0ac9e3e-3e60-448f-9977-56a01ac28ffb" CreationDate="2011-07-04T01:30:07.960" UserId="8126" Text="If anyone is curious, this is how I ended up implementing it:&#xD;&#xA;&#xD;&#xA;USing my example, I got rid of exclusive playerStates, and simply used different boolean flags like isCrouched.&#xD;&#xA;&#xD;&#xA;Then I would have something like this in my PlayerObject's update() function&#xD;&#xA;&#xD;&#xA;    if(isCrouched)&#xD;&#xA;    {&#xD;&#xA;        if(currentAnimation == startingCrouchAnimation &amp;&amp; startingCrouchAnimation.isFinished())&#xD;&#xA;            currentAnimation = crouchedAnimation;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and to draw the animation&#xD;&#xA;    &#xD;&#xA;    draw(currentAnimation.update());" />
  <row Id="32384" PostHistoryTypeId="2" PostId="14457" RevisionGUID="d8428228-a0c7-4c01-8e53-2aec2c049598" CreationDate="2011-07-04T03:12:26.953" UserId="6867" Text="How can I disable or enable multi-sampling live while the program is rendering?&#xD;&#xA;&#xD;&#xA;I tried this.&#xD;&#xA;&#xD;&#xA;        public override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.PresentationParameters.MultiSampleCount = 0;&#xD;&#xA;&#xD;&#xA;            ... draw stuff ...&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;But it doesn't disable the multisampling while drawing, because setting &quot;PreferMultiSampling&quot; to true under the presentation parameters when starting the program apparently overwrites this. Or am I wrong?&#xD;&#xA;&#xD;&#xA;How can I do this?" />
  <row Id="32385" PostHistoryTypeId="1" PostId="14457" RevisionGUID="d8428228-a0c7-4c01-8e53-2aec2c049598" CreationDate="2011-07-04T03:12:26.953" UserId="6867" Text="Changing multisample count or disable/enable multisampling while the program runs?" />
  <row Id="32386" PostHistoryTypeId="3" PostId="14457" RevisionGUID="d8428228-a0c7-4c01-8e53-2aec2c049598" CreationDate="2011-07-04T03:12:26.953" UserId="6867" Text="&lt;xna&gt;" />
  <row Id="32387" PostHistoryTypeId="25" PostId="14435" RevisionGUID="004583ff-67c6-4f27-b272-c60908450d4a" CreationDate="2011-07-04T03:26:47.267" Comment="http://twitter.com/#!/StackGameDev/status/87724000318472193" />
  <row Id="32388" PostHistoryTypeId="2" PostId="14458" RevisionGUID="067de595-0849-439a-9f90-765941f60f6e" CreationDate="2011-07-04T04:55:39.283" UserId="8240" Text="`wglCreateContex` is what creates an OpenGL context on Windows, but it isn't the only way anymore. There is also `wglCreateContextAttribARB`, which is an extension function (and thus paradoxically means that you need to have created an OpenGL context already). This is used to create OpenGL 3.2+ core contexts.&#xD;&#xA;&#xD;&#xA;I don't know what you intend by &quot;load my library,&quot; but if you're trying to hook into all of OpenGL's stuff, to get every OpenGL call, then glIntercept is probably the place to look." />
  <row Id="32389" PostHistoryTypeId="5" PostId="14447" RevisionGUID="e6bbad81-b209-4343-9611-cf847e83e530" CreationDate="2011-07-04T05:55:15.393" UserId="6877" Comment="added 123 characters in body" Text="&#xD;&#xA;There is a brilliant FrutiLoops like software, check it out,&#xD;&#xA;[Linux MultiMedia Studio](http://lmms.sourceforge.net/)&#xD;&#xA;&#xD;&#xA;sorry, no specific order or anything. Just a big list, &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://www.sounddogs.com/&#xD;&#xA;&#xD;&#xA;http://www.vionline.com/sound.html&#xD;&#xA;&#xD;&#xA;http://www.soundrangers.com/&#xD;&#xA;&#xD;&#xA;http://www.newgrounds.com/audio/&#xD;&#xA;&#xD;&#xA;http://www.stonewashed.net/sfx.html&#xD;&#xA;&#xD;&#xA;http://incompetech.com/m/c/royalty-free/&#xD;&#xA;&#xD;&#xA;http://soundbible.com/&#xD;&#xA;&#xD;&#xA;http://www.findsounds.com/&#xD;&#xA;&#xD;&#xA;http://www.therecordist.com/video-game-audio/game-audio-samples&#xD;&#xA;&#xD;&#xA;http://freegamedev.net/wiki/index.php/Free_3D_and_2D_art_and_audio_resources&#xD;&#xA;&#xD;&#xA;http://www.maz-sound.com/&#xD;&#xA;&#xD;&#xA;http://www.madtracker.org/about.php&#xD;&#xA;" />
  <row Id="32390" PostHistoryTypeId="2" PostId="14459" RevisionGUID="8d51607f-c58c-4af1-95e1-60ceba1ccff9" CreationDate="2011-07-04T06:06:57.007" UserId="288" Text="`PresentationParameters` tells you the current settings of the `GraphicsDevice`. It's a readout. You're not supposed to modify it.&#xD;&#xA;&#xD;&#xA;You need to change the settings on the `GraphicsDeviceManager` (see &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphicsdevicemanager_members.aspx&quot;&gt;MSDN&lt;/a&gt;, the default template creates one called `graphics` as a member of your `Game` class), and then call `ApplyChanges()`." />
  <row Id="32391" PostHistoryTypeId="25" PostId="13823" RevisionGUID="b6ac6dd2-0182-4629-a4ef-d9f4c10bde0d" CreationDate="2011-07-04T06:26:47.667" Comment="http://twitter.com/#!/StackGameDev/status/87769303268593664" />
  <row Id="32392" PostHistoryTypeId="4" PostId="14450" RevisionGUID="56824008-9b93-4167-b856-8be70803e51c" CreationDate="2011-07-04T06:53:49.733" UserId="450" Comment="fixed question" Text="What is first function which is called by every OpenGL application on Windows?" />
  <row Id="32393" PostHistoryTypeId="24" PostId="14450" RevisionGUID="56824008-9b93-4167-b856-8be70803e51c" CreationDate="2011-07-04T06:53:49.733" Comment="Proposed by 450 approved by 51 edit id of 530" />
  <row Id="32394" PostHistoryTypeId="2" PostId="14460" RevisionGUID="7af3cf53-d1a9-43f0-84ad-67e74766a79a" CreationDate="2011-07-04T07:03:00.307" UserId="8403" Text="Is it legal to use car manufacturers' names in a game? &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;* to describe Audi's quattro drive system?&#xD;&#xA;* to display a rendering of an Audi?&#xD;&#xA;* to include a photo (to which I have rights) of an Audi?&#xD;&#xA;" />
  <row Id="32395" PostHistoryTypeId="1" PostId="14460" RevisionGUID="7af3cf53-d1a9-43f0-84ad-67e74766a79a" CreationDate="2011-07-04T07:03:00.307" UserId="8403" Text="Is it legal to use car manufacturers' names in a game?" />
  <row Id="32396" PostHistoryTypeId="3" PostId="14460" RevisionGUID="7af3cf53-d1a9-43f0-84ad-67e74766a79a" CreationDate="2011-07-04T07:03:00.307" UserId="8403" Text="&lt;legal&gt;" />
  <row Id="32397" PostHistoryTypeId="5" PostId="14440" RevisionGUID="53b19561-89c7-41db-a0d9-9f321475d7d7" CreationDate="2011-07-04T07:07:42.233" UserId="6877" Comment="added 152 characters in body" Text="* [Alienmotion ](http://www.chemical-games.com/?page_id=1057). It looks cool. But requires maturation.&#xD;&#xA;&#xD;&#xA;* [HALCA (Hardware Accelerated Library for Character Animation)](http://www.lsi.upc.edu/~bspanlang/animation/avatarslib/doc/) This one also looks pretty interesting.&#xD;&#xA;&#xD;&#xA;Ive also noticed I can use [ogre animation](http://www.ogre3d.org/docs/manual/manual_75.html#SEC344) code. Though, I wonder how easy/hard its gonna be. But, its also another possibility." />
  <row Id="32398" PostHistoryTypeId="2" PostId="14461" RevisionGUID="5bd9cd76-6e71-41c6-8c7d-c3468ec0f79e" CreationDate="2011-07-04T07:21:39.280" UserId="6877" Text="Is there any De-factor format for exporting model, from modeling software to game engine?&#xD;&#xA;&#xD;&#xA;I know it varies form engine to engine and situation, but what is the general idea that comes in a skilled game developers mind when this question comes up?&#xD;&#xA;&#xD;&#xA;On my mind obj format comes up, but, it doesn't support animation. &#xD;&#xA;&#xD;&#xA;So, what could be the best format which supports/covers more of less every feature that an modern engine can cover? FBX?" />
  <row Id="32399" PostHistoryTypeId="1" PostId="14461" RevisionGUID="5bd9cd76-6e71-41c6-8c7d-c3468ec0f79e" CreationDate="2011-07-04T07:21:39.280" UserId="6877" Text="What file format comes first when the question is, I dont want to change to something else later." />
  <row Id="32400" PostHistoryTypeId="3" PostId="14461" RevisionGUID="5bd9cd76-6e71-41c6-8c7d-c3468ec0f79e" CreationDate="2011-07-04T07:21:39.280" UserId="6877" Text="&lt;architecture&gt;&lt;engine&gt;&lt;file-format&gt;" />
  <row Id="32401" PostHistoryTypeId="5" PostId="14461" RevisionGUID="283b63b0-38d8-4005-b97d-64bc4f9aaa91" CreationDate="2011-07-04T07:34:37.447" UserId="6877" Comment="added 50 characters in body" Text="Is there any De-factor format for exporting model, from modeling software to game engine?&#xD;&#xA;&#xD;&#xA;I know it varies form engine to engine and situation, but what is the general idea that comes in a skilled game developers mind when this question comes up?&#xD;&#xA;&#xD;&#xA;On my mind obj format comes up, but, it doesn't support animation. &#xD;&#xA;&#xD;&#xA;So, what could be the best format which supports/covers more of less every feature that an modern engine can cover? FBX? Collada?&#xD;&#xA;&#xD;&#xA;Some processional insight would help." />
  <row Id="32403" PostHistoryTypeId="2" PostId="14463" RevisionGUID="39128d92-3885-495e-a7d4-1bc119152f2e" CreationDate="2011-07-04T08:17:35.817" UserId="2134" Text="[appMobi](http://www.appmobi.com/index.php?q=node/167) seem to have some nice and pretty cheap feature if you like their payment system." />
  <row Id="32404" PostHistoryTypeId="2" PostId="14464" RevisionGUID="0d032bf8-b502-406f-b223-a7735de2db0c" CreationDate="2011-07-04T08:32:23.920" UserId="6877" Text="Ok, sorry that there is no filter or any specification as you asked. But , a long list, you might want to check them out, see which one fits your need.&#xD;&#xA;&#xD;&#xA;https://github.com/JustSid/Void-Dead&#xD;&#xA;&#xD;&#xA;http://www.airplaysdk.com/&#xD;&#xA;&#xD;&#xA;http://game-editor.com/Main_Page&#xD;&#xA;&#xD;&#xA;http://www.anscamobile.com/&#xD;&#xA;&#xD;&#xA;http://www.maratis3d.com/&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/galaxyengine/&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/oolongengine/&#xD;&#xA;&#xD;&#xA;http://isdge.sourceforge.net/&#xD;&#xA;&#xD;&#xA;http://www.stonetrip.com/&#xD;&#xA;&#xD;&#xA;http://code.google.com/p/gamekit/&#xD;&#xA;&#xD;&#xA;http://www.dragonfiresdk.com/index.htm&#xD;&#xA;&#xD;&#xA;http://www.ogre3d.org/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://gamesalad.com/&#xD;&#xA;&#xD;&#xA;http://www.runrev.com/&#xD;&#xA;&#xD;&#xA;http://www.fabiensanglard.net/dEngine/index.php&#xD;&#xA;&#xD;&#xA;http://www.batterypoweredgames.com/batterytech&#xD;&#xA;&#xD;&#xA;http://www.appcelerator.com/&#xD;&#xA;&#xD;&#xA;http://www.anscamobile.com/corona/&#xD;&#xA;&#xD;&#xA;http://www.phonegap.com/&#xD;&#xA;&#xD;&#xA;You also might find some here:&#xD;&#xA;http://programmers.stackexchange.com/questions/73152/mobile-app-development-language-converter&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32405" PostHistoryTypeId="25" PostId="14461" RevisionGUID="19ef225b-be8f-4aa9-9e07-05b4de9011db" CreationDate="2011-07-04T09:26:48.273" Comment="http://twitter.com/#!/StackGameDev/status/87814604478095360" />
  <row Id="32406" PostHistoryTypeId="5" PostId="14461" RevisionGUID="8fa2c4fc-07c6-44f4-af74-92cb2db23268" CreationDate="2011-07-04T09:39:43.517" UserId="6877" Comment="deleted 1 characters in body" Text="Is there any de facto format for exporting model, from modeling software to game engine?&#xD;&#xA;&#xD;&#xA;I know it varies form engine to engine and situation, but what is the general idea that comes in a skilled game developers mind when this question comes up?&#xD;&#xA;&#xD;&#xA;On my mind obj format comes up, but, it doesn't support animation. &#xD;&#xA;&#xD;&#xA;So, what could be the best format which supports/covers more of less every feature that an modern engine can cover? FBX? Collada?&#xD;&#xA;&#xD;&#xA;Some processional insight would help." />
  <row Id="32407" PostHistoryTypeId="2" PostId="14465" RevisionGUID="3f47549c-08e9-409c-b30e-0560f89ad4c3" CreationDate="2011-07-04T09:47:00.060" UserId="8240" Text="There is no &quot;best format&quot;; there is only varying levels of annoying.&#xD;&#xA;&#xD;&#xA;Collada does pretty much everything you could possibly want to do, at the cost of doing everything you _don't_ want to do as well. This makes it a useful interchange format, but not something you should probably be looking to load directly into your game.&#xD;&#xA;&#xD;&#xA;FBX isn't quite as widely supported, being a proprietary format. And it's... a proprietary format, but at least the format specification is available.&#xD;&#xA;&#xD;&#xA;Most game developers need to massage the data, whatever the kind, into something their game can load and throw onto the screen as fast as possible. Therefore, most game engines that support the interchange formats will use an off-line tool to transform them into their game-specific formats.&#xD;&#xA;&#xD;&#xA;And that's generally a good way to work. You have a good separation of code: the code that massages the data is separate from the code that loads it into your game. You get fast loading performance, while still having the ability to format the data as you need for maximum speed and use. And you still can see what the data looks like in your original exported file format, which is generally some kind of text file." />
  <row Id="32408" PostHistoryTypeId="17" PostId="14466" RevisionGUID="67fde878-465c-4b42-bda1-3853e94480e5" CreationDate="2011-07-04T10:15:26.473" UserId="-1" Comment="from http://stackoverflow.com/questions/6564354/cant-update-directx11-shader-constant-buffer" Text="" />
  <row Id="32409" PostHistoryTypeId="17" PostId="14467" RevisionGUID="dad94d80-f61a-4b87-ba81-743902b0dd83" CreationDate="2011-07-04T10:15:26.473" UserId="-1" Comment="from http://stackoverflow.com/questions/6564354/cant-update-directx11-shader-constant-buffer" Text="" />
  <row Id="32410" PostHistoryTypeId="2" PostId="14467" RevisionGUID="9a976281-24e3-4d54-9ec1-8e763b9b53ec" CreationDate="2011-07-03T17:30:26.790" UserId="4662" Text="XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port)." />
  <row Id="32411" PostHistoryTypeId="2" PostId="14466" RevisionGUID="f7bb296b-52b2-44cb-9180-ee590f536e2e" CreationDate="2011-07-03T17:22:45.593" UserDisplayName="Joel Smith" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth paremeters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/" />
  <row Id="32412" PostHistoryTypeId="1" PostId="14466" RevisionGUID="f7bb296b-52b2-44cb-9180-ee590f536e2e" CreationDate="2011-07-03T17:22:45.593" UserDisplayName="Joel Smith" Text="Can't update DirectX11 shader constant buffer." />
  <row Id="32413" PostHistoryTypeId="3" PostId="14466" RevisionGUID="f7bb296b-52b2-44cb-9180-ee590f536e2e" CreationDate="2011-07-03T17:22:45.593" UserDisplayName="Joel Smith" Text="&lt;shaders&gt;" />
  <row Id="32414" PostHistoryTypeId="2" PostId="14468" RevisionGUID="4011da40-4ee8-4ecc-8c82-f3aad44e1979" CreationDate="2011-07-04T10:15:51.687" UserId="4410" Text="From experience you have two options:&#xD;&#xA;&#xD;&#xA;Licence the vehicle(s): This will be either from the manufacturer directly or someone who already holds the licence (such as another developer that already has an exclusive licence for their use - they may choose to sub-licence). They're under no obligation to licence anything to you and will only do so if they're happy in the way in which their product is being portrayed and the context in which it appears. Depending on the manufacturer and prestige of the product the licensing costs can range from nothing right up to ridiculous amounts of money. They also like to have final approval on the finished in-game assets, etc, to ensure you're not degrading the appearance of the brand.&#xD;&#xA;&#xD;&#xA;Don't licence the vehicles: This is the route Grand Theft Auto IV used in their last game. I highly doubt car manufacturers would want their brands associated with the type of gameplay in GTA, they worked around this by making a number of changes to the physical representation and names of the models such that it met certain legal requirements (yet you could still tell pretty much what they were meant to be).&#xD;&#xA;&#xD;&#xA;In most of the major markets I would expect you to require a licence to do what you want, consulting a lawyer is always a fantastic idea if you're unsure of where the line falls." />
  <row Id="32415" PostHistoryTypeId="6" PostId="14421" RevisionGUID="17d0b75b-bae3-46f7-93c9-4fab0ca85e30" CreationDate="2011-07-04T10:42:01.980" UserId="744" Comment="edited tags" Text="&lt;c#&gt;&lt;programming&gt;" />
  <row Id="32416" PostHistoryTypeId="25" PostId="14460" RevisionGUID="176611de-8999-4d3d-ae0e-63013c01f5cc" CreationDate="2011-07-04T12:27:08.983" Comment="http://twitter.com/#!/StackGameDev/status/87859989523341312" />
  <row Id="32417" PostHistoryTypeId="2" PostId="14469" RevisionGUID="1f921264-df1c-407b-a025-0ce66efd1ab4" CreationDate="2011-07-04T12:34:18.247" UserId="7819" Text="I'm trying to find a good solution for a bullet to hit the enemy. The game is 2D tower defense, the tower is supposed to shoot a bullet and hit the enemy guaranteed.&#xD;&#xA;&#xD;&#xA;I tried this solution - http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;&#xD;&#xA;The link mentioned to subtract the bullet's origin and the enemy as well (vector subtraction). I tried that but a bullet just follows around the enemy. &#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;    float diffX = enemy.position.x - position.x;&#xD;&#xA;    float diffY = enemy.position.y - position.y;&#xD;&#xA;    		&#xD;&#xA;    velocity.x = diffX;&#xD;&#xA;    velocity.y = diffY;&#xD;&#xA;    		&#xD;&#xA;    position.add(velocity.x * deltaTime, velocity.y * deltaTime);&#xD;&#xA;&#xD;&#xA;I'm familiar with vectors but not sure what steps (vector math operations) to be done to get this solution working. " />
  <row Id="32418" PostHistoryTypeId="1" PostId="14469" RevisionGUID="1f921264-df1c-407b-a025-0ce66efd1ab4" CreationDate="2011-07-04T12:34:18.247" UserId="7819" Text="2D tower defense - A bullet to an enemy" />
  <row Id="32419" PostHistoryTypeId="3" PostId="14469" RevisionGUID="1f921264-df1c-407b-a025-0ce66efd1ab4" CreationDate="2011-07-04T12:34:18.247" UserId="7819" Text="&lt;projectile-physics&gt;&lt;tower-defense&gt;&lt;bullet-physics&gt;" />
  <row Id="32420" PostHistoryTypeId="2" PostId="14470" RevisionGUID="95de5e77-7898-451f-af41-33c37843c873" CreationDate="2011-07-04T12:58:35.650" UserId="8303" Text="You need to 'predict' the objects position by the time the bullet will reach it. You can do this using the objects speed/velocity (hopefully that is constant ;)) and it's directional vector.&#xD;&#xA;&#xD;&#xA;I'm not sure what the exact formula is off the top of my head but I think it's something like this:&#xD;&#xA;&#xD;&#xA;NewPosition = OldPosition + (Speed * DirectionVector);&#xD;&#xA;&#xD;&#xA;If you have a set path you will need to recalculate when the object changes direction. Use this NewPosition as your enemy.position vector and the bullet should hit the object without the 'homing effect'. Homing occurs due to the fact the enemy object has moved since the original vector was calculated, it can only ever catch up when an object is travelling in one direction long enough.&#xD;&#xA;&#xD;&#xA;Hope this helps :)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32423" PostHistoryTypeId="2" PostId="14472" RevisionGUID="ea8a91b9-77a4-438c-a727-7c2953c828c8" CreationDate="2011-07-04T13:22:47.747" UserId="1101" Text="The problem with &quot;Is it legal&quot; questions is that:&#xD;&#xA;&#xD;&#xA; - Laws differ from country to country, and from state to state - which jurisdiction are you in, and where do you expect your game to be distributed?&#xD;&#xA; - Even something that appears to be legal may be ruled as not legal, or vice versa, should it be put to the test.&#xD;&#xA;&#xD;&#xA;I'm not one of these people who says you should never ask legal advice from a non-lawyer, because even lawyers are not omniscient about law - many lawyers fight cases they wrongly think they can win. However you have to accept that no answer given to you is necessarily authoritative unless given by a judge sitting on your particular case. All you can do is arm yourself with knowledge.&#xD;&#xA;&#xD;&#xA;Regarding the use of the word 'Audi' - http://en.wikipedia.org/wiki/Trademark&#xD;&#xA;&#xD;&#xA;Regarding the appearance of an Audi - http://en.wikipedia.org/wiki/Trade_dress&#xD;&#xA;&#xD;&#xA;Regarding showing a picture of an Audi - http://en.wikipedia.org/wiki/Copyright (I reckon you'll be fine on this one)&#xD;&#xA;&#xD;&#xA;Regarding describing the drive system - http://en.wikipedia.org/wiki/Patent (I think you're ok here too - if the system is patented, it's public knowledge, just not public to reproduce or exploit as an invention)&#xD;&#xA;" />
  <row Id="32424" PostHistoryTypeId="4" PostId="11300" RevisionGUID="a05a89eb-65f6-4abe-b81f-43d4191d5aac" CreationDate="2011-07-04T13:47:56.727" UserId="744" Comment="edited title" Text="When and how should I apply forces in a Cocos2D + Box2D game?" />
  <row Id="32426" PostHistoryTypeId="4" PostId="14450" RevisionGUID="1be9e487-7a6b-41d2-a6f0-4d9af05dc24f" CreationDate="2011-07-04T13:50:43.353" UserId="744" Comment="edited title" Text="How can I hook into OpenGL initialization on Windows?" />
  <row Id="32427" PostHistoryTypeId="2" PostId="14473" RevisionGUID="1da33347-cb10-43bc-92cf-4c6f047b0a8f" CreationDate="2011-07-04T13:51:53.283" UserId="4830" Text="I have been looking around for information about this topic but not found what i need.&#xD;&#xA;&#xD;&#xA;Here is the scenario, i am planning a card based game (cocos2d) where the idea is that up to four players should be able to play. &#xD;&#xA;&#xD;&#xA;One player will hand out the cards to all four and then they play. Next round the next player should do this and so on..&#xD;&#xA;&#xD;&#xA;On the screen i would like the actual player to see his/her own cards as well as the others cards that they have played out meaning that each player should see the others active cards.&#xD;&#xA;&#xD;&#xA;I would like to ask the following:&#xD;&#xA;&#xD;&#xA;1. How would be the best way of implementing this from a communication point of view?&#xD;&#xA;2. Would this go via game center?&#xD;&#xA;&#xD;&#xA;A reference to information is appreciated.&#xD;&#xA;&#xD;&#xA;Cheers  " />
  <row Id="32428" PostHistoryTypeId="1" PostId="14473" RevisionGUID="1da33347-cb10-43bc-92cf-4c6f047b0a8f" CreationDate="2011-07-04T13:51:53.283" UserId="4830" Text="The best way to communicate between multiple iPhones/iPads in a card game" />
  <row Id="32429" PostHistoryTypeId="3" PostId="14473" RevisionGUID="1da33347-cb10-43bc-92cf-4c6f047b0a8f" CreationDate="2011-07-04T13:51:53.283" UserId="4830" Text="&lt;iphone&gt;&lt;network&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="32430" PostHistoryTypeId="2" PostId="14474" RevisionGUID="32f55d91-5e3f-4cde-88af-b3a69f3425b6" CreationDate="2011-07-04T14:05:36.043" UserId="7684" Text="I'm trying, for many days, to get the Matrix or the Vector3 of my 3D model, I don't want to use the World matrix because I need first to idenfy the axes of my object for animation (= rotation of a second object around my first object).&#xD;&#xA;&#xD;&#xA;If you have an idea or a tutorial for this ?&#xD;&#xA;&#xD;&#xA;Many thanks,&#xD;&#xA;&#xD;&#xA;Jeangil" />
  <row Id="32431" PostHistoryTypeId="1" PostId="14474" RevisionGUID="32f55d91-5e3f-4cde-88af-b3a69f3425b6" CreationDate="2011-07-04T14:05:36.043" UserId="7684" Text="in XNA 4.0, How to get the matrix or Vector3 of a model ?" />
  <row Id="32432" PostHistoryTypeId="3" PostId="14474" RevisionGUID="32f55d91-5e3f-4cde-88af-b3a69f3425b6" CreationDate="2011-07-04T14:05:36.043" UserId="7684" Text="&lt;xna-4.0&gt;" />
  <row Id="32433" PostHistoryTypeId="5" PostId="14468" RevisionGUID="59e91fda-2cd6-4002-8905-06ddac9b861e" CreationDate="2011-07-04T14:06:37.920" UserId="4410" Comment="Added some more info" Text="From experience you have two options:&#xD;&#xA;&#xD;&#xA;Licence the vehicle(s): This will be either from the manufacturer directly or someone who already holds the licence (such as another developer that already has an exclusive licence for their use - they may choose to sub-licence). They're under no obligation to licence anything to you and will only do so if they're happy in the way in which their product is being portrayed and the context in which it appears. Depending on the manufacturer and prestige of the product the licensing costs can range from nothing right up to ridiculous amounts of money. They also like to have final approval on the finished in-game assets, etc, to ensure you're not degrading the appearance of the brand.&#xD;&#xA;&#xD;&#xA;Don't licence the vehicles: This is the route Grand Theft Auto IV used in their last game. I highly doubt car manufacturers would want their brands associated with the type of gameplay in GTA, they worked around this by making a number of changes to the physical representation and names of the models such that it met certain legal requirements (yet you could still tell pretty much what they were meant to be).&#xD;&#xA;&#xD;&#xA;In most of the major markets I would expect you to require a licence to do what you want, consulting a lawyer is always a fantastic idea if you're unsure of where the line falls.&#xD;&#xA;&#xD;&#xA;Update: Some extra info on photo's from the World Intellectual Property Organization - '[Legal Pitfalls in Taking or Using Photographs of Copyright Material, Trademarks and People][1]'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wipo.int/sme/en/documents/ip_photography.htm" />
  <row Id="32434" PostHistoryTypeId="5" PostId="14374" RevisionGUID="a09e8a34-2864-4e45-81b1-21d910fb892b" CreationDate="2011-07-04T14:18:50.090" UserId="8364" Comment="Clarified the final sentence based on a good point made in the comments" Text="Generally speaking you should design your game so that anything which *has* to be seen is drawn within the bounds of the TitleSafeArea, not the Viewport itself. You can find the size of the TitleSafeArea using the TitleSafeArea property of Microsoft.Xna.Framework.Graphics.Viewport structure. The size of the TitleSafeArea rectangle will change for different displays and platforms.  &#xD;&#xA;&#xD;&#xA;Without testing every size, type and model of TV ever made, you can't know that anything drawn to screen coordinates outside this TitleSafeArea will actually be displayed for a given user. On the other hand, you can be reasonably sure anything drawn inside this area will be displayed." />
  <row Id="32435" PostHistoryTypeId="2" PostId="14475" RevisionGUID="c1f21f58-0fda-49d9-9971-cd6bdcef8119" CreationDate="2011-07-04T14:26:02.483" UserId="1923" Text="If the target is moving in a steady direction at a steady pace, and your bullet path is in a straight line at a steady pace, you can use a quadratic equation to predict the exact spot they will intersect and aim your tower's gun at that spot.&#xD;&#xA;&#xD;&#xA;Since it is a certainty that the bullet will hit it's mark, and you can calculate the exact time it will take from firing to impact, no collision detection would be required, simply fire the gun, wait the calculated time span, register a hit.&#xD;&#xA;&#xD;&#xA;Here is pseudo code for the quadratic equation:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector totarget =  target.position - tower.position;&#xD;&#xA;    &#xD;&#xA;    float a = Vector.Dot(target.velocity, target.velocity) - (bullet.velocity * bullet.velocity);&#xD;&#xA;    float b = 2 * Vector.Dot(target.velocity, totarget);&#xD;&#xA;    float c = Vector.Dot(totarget, totarget);&#xD;&#xA;    &#xD;&#xA;    float p = -b / (2 * a);&#xD;&#xA;    float q = (float)Math.Sqrt((b * b) - 4 * a * c) / (2 * a);&#xD;&#xA;    &#xD;&#xA;    float t1 = p - q;&#xD;&#xA;    float t2 = p + q;&#xD;&#xA;    float t;&#xD;&#xA;    &#xD;&#xA;    if (t1 &gt; t2 &amp;&amp; t2 &gt; 0)&#xD;&#xA;    {&#xD;&#xA;        t = t2;&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        t = t1;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Vector aimSpot = target.position + target.velocity * t;&#xD;&#xA;    Vector bulletPath = aimSpot - tower.position;&#xD;&#xA;    float timeToImpact = bulletPath.Length() / bullet.speed;//speed must be in units per second&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32436" PostHistoryTypeId="2" PostId="14476" RevisionGUID="e7f93d37-db83-42c2-9617-799874b13298" CreationDate="2011-07-04T14:28:08.407" UserId="6788" Text="I'm currently working on a full-screen Android game that runs exclusively in landscape mode. Here are the tweaks I've made to force landscape mode and prevent application restarts:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Intercept orientation change events #&#xD;&#xA;&#xD;&#xA;Add the following **android:configChanges** to your AndroidManifest.xml&#xD;&#xA;&#xD;&#xA;    &lt;activity android:name=&quot;.FirstGame&quot;&#xD;&#xA;              android:label=&quot;@string/app_name&quot;&#xD;&#xA;              android:configChanges=&quot;orientation|keyboardHidden&quot;&gt;&#xD;&#xA;&#xD;&#xA;Override onConfigurationChanged in your Activity to prevent application restart&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    public void onConfigurationChanged(final Configuration newConfig)&#xD;&#xA;    {&#xD;&#xA;    	// Ignore orientation change to keep activity from restarting&#xD;&#xA;    	super.onConfigurationChanged(newConfig);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Forcing full-screen landscape orientation #&#xD;&#xA;&#xD;&#xA;In the onCreate function of your Activity, add the following code to set window fullscreen and remove title bar, and force landscape orientation&#xD;&#xA;&#xD;&#xA;    import android.view.Window;&#xD;&#xA;    import android.view.WindowManager;&#xD;&#xA;    import android.content.pm.ActivityInfo;&#xD;&#xA;    &#xD;&#xA;    @Override public void onCreate(Bundle savedInstanceState)&#xD;&#xA;    {&#xD;&#xA;    	...&#xD;&#xA;    		&#xD;&#xA;    	// Set window fullscreen and remove title bar, and force landscape orientation&#xD;&#xA;    	this.requestWindowFeature(Window.FEATURE_NO_TITLE);&#xD;&#xA;    	getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);&#xD;&#xA;    	setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);&#xD;&#xA;    		&#xD;&#xA;    	...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32437" PostHistoryTypeId="2" PostId="14477" RevisionGUID="f0fb64ae-305c-450d-9364-ed55eb700491" CreationDate="2011-07-04T14:51:51.683" UserId="8050" Text="Ok, I am in favor of creative solutions, really! I like when dynamics are modelled after unrealistic physic, why not? &#xD;&#xA;&#xD;&#xA;But there is a limit to everything.&#xD;&#xA;&#xD;&#xA;Ok I will not tell you that is unrealistic to use directly velocity when our world is regulated by forces and accelerations. Who am I to say? But let's use the velocity in a consistent manner at least!&#xD;&#xA;&#xD;&#xA;You did a perfect reasoning: use the vector to move from my position to my target: well this is the meaning of the term [vector][1]; you simply forgot the *speed*.&#xD;&#xA;&#xD;&#xA;The velocity is realy a vector: a speed and a direction: if you forget to both normalize the difference vector or apply the bullet speed on it (multiplying a unit vector for a scalar), you are basically saying that if you are **close to the target** (the difference vector is hence small) **the bullet slows down**; while if you are far away the bullet speed is larger.&#xD;&#xA;&#xD;&#xA;Ok, this is the underlying problem: direction + speed. Now you can do homing (basically follow the target's changes of direction) or predict the impact position as other answer are telling. &#xD;&#xA;&#xD;&#xA;Master those concepts is important in my opinion and, by doing wrong, you discovered a way to make an entity to follow another without ever reaching it (at least as long as deltaTime remains below the unit)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.etymonline.com/index.php?term=vector" />
  <row Id="32438" PostHistoryTypeId="2" PostId="14478" RevisionGUID="25f4e197-941d-4639-a8ac-ac3dbddf0efb" CreationDate="2011-07-04T15:12:08.407" UserId="8050" Text="I always suggest to try to stay peer-to-peer in communications. This generally avoids bottlenecks and single-point-of-failures, in other words it scales.&#xD;&#xA;&#xD;&#xA;In you case i would set up an Reliable UDP connection and use a reactor to unify network and gui events. &#xD;&#xA;&#xD;&#xA;Obviously this does not resolve the problem with Service advertising beyond the local network, in this case an index server can not be avoided.&#xD;&#xA;&#xD;&#xA;I am aware that this is only an arhitectural indication; I can't help you more to the point because of my lack of experience with cocos2d but I hope this can help anyway" />
  <row Id="32439" PostHistoryTypeId="25" PostId="14469" RevisionGUID="7ea8127f-f423-43c3-bf24-1cddc2ae843e" CreationDate="2011-07-04T15:27:09.600" Comment="http://twitter.com/#!/StackGameDev/status/87905291005468672" />
  <row Id="32440" PostHistoryTypeId="2" PostId="14479" RevisionGUID="5964979b-4def-42bb-9653-63a54744656c" CreationDate="2011-07-04T15:28:24.780" UserId="7981" Text="**Do not allow click() handler to cause movement until some time passes**&#xD;&#xA;&#xD;&#xA;Basically do not allow clicking faster than some value and allow it only once at the same time. :)&#xD;&#xA;&#xD;&#xA;There is how You can do it:&#xD;&#xA;&#xD;&#xA;Create global variable:&#xD;&#xA;&#xD;&#xA;    var not_yet; // it represents delay&#xD;&#xA;    // * when someone clicks it is set to nonzero&#xD;&#xA;    // * timer will decrease it until zero&#xD;&#xA;    // * if it is zero, then it will wait for user click&#xD;&#xA;    // * if it is zero and user clicks, then character is moved and it is set to nozero&#xD;&#xA;&#xD;&#xA;Add a timer, which You will call each few miliseconds, and which will do this:&#xD;&#xA;&#xD;&#xA;    if (0 &lt; not_yet) { &#xD;&#xA;    // it is a clock which is decreasing since the previous click&#xD;&#xA;    // this way together with this (1) check You prevent from&#xD;&#xA;        not_yet -= 1;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In handler of the click event :&#xD;&#xA;&#xD;&#xA;    if (0 &lt; not_yet) { // (1)&#xD;&#xA;        return; &#xD;&#xA;    // user clicked few milliseconds ago&#xD;&#xA;    // it is not right time yet&#xD;&#xA;    } else {&#xD;&#xA;        // do whatever You did there previously&#xD;&#xA;&#xD;&#xA;        not_yet = 5; // start the timer and set it to delay for 5* units &#xD;&#xA;        // *5 is arbitrary, set it to whatever value will work the best for You&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32441" PostHistoryTypeId="2" PostId="14480" RevisionGUID="83df8ee7-9a10-4583-aaf6-10804bcd326f" CreationDate="2011-07-04T15:39:30.247" UserId="7981" Text="There is [article about deriving collision detection with math on Flipcode][1]. It has circle-cirle. There is how to detect precisely the point of collision and check if there is a collision at all.&#xD;&#xA;&#xD;&#xA;[1]:http://www.flipcode.com/archives/Theory_Practice-Issue_01_Collision_Detection.shtml" />
  <row Id="32442" PostHistoryTypeId="2" PostId="14481" RevisionGUID="86d97236-28f2-415c-a630-25b9fa26bd4d" CreationDate="2011-07-04T15:57:57.133" UserId="288" Text="The &quot;matrix&quot; of an object in model space with no transformations applied is simply:&#xD;&#xA;&#xD;&#xA;    Matrix.Identity&#xD;&#xA;&#xD;&#xA;Similarly the position would simply be:&#xD;&#xA;&#xD;&#xA;    Vector3.Zero&#xD;&#xA;&#xD;&#xA;The &quot;world&quot; matrix is responsible for transforming an object that is in model space into world space.&#xD;&#xA;&#xD;&#xA;To make object A orbit object B you could do this with object B's world matrix. Simply apply an appropriate orbit matrix (translation then rotation), followed by object B's world matrix, to object A. This will then be object A's world matrix.&#xD;&#xA;&#xD;&#xA;Alternately: you could take object B's world matrix and use the appropriate `Matrix` properties: `Translation` to get the position and `Forward`, `Left`, `Up`, etc (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.matrix_members.aspx&quot;&gt;MSDN&lt;/a&gt;), to get the appropriate axes for constructing the series of transformations to orbit object B." />
  <row Id="32443" PostHistoryTypeId="5" PostId="14461" RevisionGUID="5ca07943-4487-4ecd-b9a4-997c6c25b618" CreationDate="2011-07-04T16:15:51.250" UserId="7888" Comment="Spelling and grammar corrections" Text="Is there a de facto format for exporting a 3D model from modeling software to a game engine?&#xD;&#xA;&#xD;&#xA;I know it varies by engine and situation, but what is the general idea that comes to a skilled game developers mind when this question comes up?&#xD;&#xA;&#xD;&#xA;In my mind obj format comes up, but it doesn't support animation. &#xD;&#xA;&#xD;&#xA;So, what could be the best format which supports/covers more or less every feature that an modern engine can cover? FBX? Collada?&#xD;&#xA;&#xD;&#xA;Some professional insight would help." />
  <row Id="32444" PostHistoryTypeId="24" PostId="14461" RevisionGUID="5ca07943-4487-4ecd-b9a4-997c6c25b618" CreationDate="2011-07-04T16:15:51.250" Comment="Proposed by 7888 approved by 51 edit id of 531" />
  <row Id="32446" PostHistoryTypeId="17" PostId="14482" RevisionGUID="174d0db6-cf36-4a4e-af7b-9cf53b5b365b" CreationDate="2011-07-04T17:49:55.237" UserId="-1" Comment="from http://stackoverflow.com/questions/6571612/better-animation-of-elements-in-sfml-c" Text="" />
  <row Id="32447" PostHistoryTypeId="17" PostId="14483" RevisionGUID="9101d2b5-4f48-4092-800d-b4dac4425a69" CreationDate="2011-07-04T17:49:55.237" UserId="-1" Comment="from http://stackoverflow.com/questions/6571612/better-animation-of-elements-in-sfml-c" Text="" />
  <row Id="32448" PostHistoryTypeId="2" PostId="14483" RevisionGUID="8f465f05-9382-4313-a4e7-5c24af419684" CreationDate="2011-07-04T13:22:21.250" UserDisplayName="Constantinius" Text="This seems like you want to manipulate the position and rotation of objects over time. AFAIK sfml does not provide this functionality out of the box, but it should be pretty easy and straightforward to implement this on your own.&#xD;&#xA;&#xD;&#xA;I once built a similar solution for a three dimensional simulation, but it should translate well to a 2D graphical application.&#xD;&#xA;&#xD;&#xA;First of you have two concepts: the `Manipulator` and the according `ManipulatorManager`. `Manipulator` is an abstract base class for all kinds of manipulations of a specific object, for example a sprite. Manipulated can be all properties like position or rotation, move on a path or anything similar. The `Manager` watches the state of the `Manipulators` and updates them every frame.&#xD;&#xA;&#xD;&#xA;The interface for the manipulator looks something like that:&#xD;&#xA;&#xD;&#xA;    class Manipulator {&#xD;&#xA;    public:&#xD;&#xA;        Manipulator(float expiration_time) : expiration_time(expiration_time);&#xD;&#xA;        bool is_expired() { return expiration_time &lt; 0.f; }&#xD;&#xA;        void update(float dt) { this-&gt;expiration_time -= dt; }&#xD;&#xA;    protected:&#xD;&#xA;        float expiration_time;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;An implementation of this class is the `SimpleLineManipulator` which influences the position of a sprite over a certain time on a straight line:&#xD;&#xA;&#xD;&#xA;    class SimpleLineManipulator {&#xD;&#xA;        SimpleLineManipulator(Sprite *spr, Vector2f begin, Vector2f end, float expiration_time);&#xD;&#xA;        ...&#xD;&#xA;    private:&#xD;&#xA;        Sprite* sprite;&#xD;&#xA;        Vector2f begin, end;&#xD;&#xA;        float total_time; // initialized with expiration_time&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And this is how the update method looks like (where the most of the work takes place):&#xD;&#xA;&#xD;&#xA;    void SimpleLineManipulator::update(float dt) {&#xD;&#xA;        Manipulator::update(dt);&#xD;&#xA;        Vector2f position = lerp(end, begin, total_time/expiration_time);&#xD;&#xA;        spr-&gt;SetPosition(position.x, position.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;All you have to do now is call the `update()` method every frame.&#xD;&#xA;It should be easy to implement a rotatory manipulator or manipulators that work on a path (a list of positions). You can now also combine these manipulators to create combined effects.&#xD;&#xA;&#xD;&#xA;I hope I could outline the architecture in a clear manner. Feel free to ask :)" />
  <row Id="32449" PostHistoryTypeId="2" PostId="14482" RevisionGUID="673a95d0-d8b7-4a75-a9c1-2ac3a048cf13" CreationDate="2011-07-04T12:37:03.660" UserDisplayName="tecfreak" Text="This is not about animating individual characters or elements, I'm happy with spritesheets for that. What I'm looking for is the animation of elements on screen. &#xD;&#xA;&#xD;&#xA;For example my game starts and the logo comes in flying from a random direction, then rotates or something and stops in one position, then a game character (one or more) comes from the side and does some action.&#xD;&#xA;&#xD;&#xA;I haven't done many projects yet, I have written just one complete game, so I don't know whether I've correctly worded the question. &#xD;&#xA;&#xD;&#xA;What I've been doing is giving the element an initial and final position and make it move accordingly and using status flags to check its state. The problem is when I want to move it in more than one way. Of course, I can just use the state variables and make it move, but I've been thinking there's got to be an elegant method for it&#xD;&#xA;&#xD;&#xA;EDIT: I'm looking at animations such as in World of Goo etc.&#xD;&#xA;" />
  <row Id="32450" PostHistoryTypeId="1" PostId="14482" RevisionGUID="673a95d0-d8b7-4a75-a9c1-2ac3a048cf13" CreationDate="2011-07-04T12:37:03.660" UserDisplayName="tecfreak" Text="Better animation of elements in SFML/C++" />
  <row Id="32451" PostHistoryTypeId="3" PostId="14482" RevisionGUID="673a95d0-d8b7-4a75-a9c1-2ac3a048cf13" CreationDate="2011-07-04T12:37:03.660" UserDisplayName="tecfreak" Text="&lt;c++&gt;&lt;animation&gt;&lt;sfml&gt;" />
  <row Id="32452" PostHistoryTypeId="25" PostId="14482" RevisionGUID="ccd8bb98-d05b-416e-97a8-fcc26a9c3b10" CreationDate="2011-07-04T18:27:10.450" Comment="http://twitter.com/#!/StackGameDev/status/87950593846542336" />
  <row Id="32453" PostHistoryTypeId="2" PostId="14484" RevisionGUID="5f6d2b3f-e484-4939-9fa5-fdfaf37b7320" CreationDate="2011-07-04T19:26:57.823" UserId="7946" Text="Constantinius already provides a good starting point from where you might start with actual coding, but in case you want to know about what you're doing here in general, I'd like to add a few words.&#xD;&#xA;&#xD;&#xA;Translating objects over time from point A to point B is done by applying a function f(x) to the position of the object, where x can be anything, ranging from simply the current position of the sprite to the amount of time that elapsed between two frames, etc.&#xD;&#xA;&#xD;&#xA;This process is usually done via the help of a [sub field of numerical analysis][1] which is called interpolation.&#xD;&#xA;&#xD;&#xA;A common example would be linear interpolation. If you know the constant starting point A and end point B, one possible function would simply be f(t) = A + (B - A) * (t_max - t) , where&#xD;&#xA;&#xD;&#xA;- t is the time elapsed since the object started from point A&#xD;&#xA;- t_max is the time you want the object to take until it reaches its destination&#xD;&#xA;- 0 &lt;= t &lt;= t_max .&#xD;&#xA;&#xD;&#xA;As you see, the function is returning a vector, so you can apply it to the position of your object without problems.&#xD;&#xA;&#xD;&#xA;This is of course only a rough introduction to maybe let you taste a little blood and wake your interest, hence I shall [redirect you to Google][2] if you want to know more about it.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Interpolation&#xD;&#xA;  [2]: http://lmgtfy.com/?q=interpolation" />
  <row Id="32454" PostHistoryTypeId="2" PostId="14485" RevisionGUID="36c42dfb-0b77-42aa-9b53-178eff4769ed" CreationDate="2011-07-04T19:54:03.390" UserId="6877" Text="Anyone has any experience about this? This hasn't been refereed as mush as it 'looks/sound' like.&#xD;&#xA;&#xD;&#xA;http://www.marek-knows.com/index.php5&#xD;&#xA;&#xD;&#xA;Among many other products, the site provides **game engine development video**, which is around *45hours long*. Starting from context creation, model loading, scene graph, animation. But it looks like a little old. Is it still useful?" />
  <row Id="32455" PostHistoryTypeId="1" PostId="14485" RevisionGUID="36c42dfb-0b77-42aa-9b53-178eff4769ed" CreationDate="2011-07-04T19:54:03.390" UserId="6877" Text="Game Engine Development Video Series(!) - 45 hours long" />
  <row Id="32456" PostHistoryTypeId="3" PostId="14485" RevisionGUID="36c42dfb-0b77-42aa-9b53-178eff4769ed" CreationDate="2011-07-04T19:54:03.390" UserId="6877" Text="&lt;game-design&gt;&lt;engine&gt;&lt;tutorials&gt;&lt;video&gt;" />
  <row Id="32457" PostHistoryTypeId="4" PostId="14461" RevisionGUID="f76d4a5b-cffe-4ee7-bb96-e0b75dc98d02" CreationDate="2011-07-04T19:59:05.997" UserId="51" Comment="made question a little easier for english speakers to understand" Text="Which 3D file format should my engine use if I don't want to have to change it later?" />
  <row Id="32458" PostHistoryTypeId="5" PostId="14485" RevisionGUID="b3452dde-513e-4544-b4be-1a7574117efb" CreationDate="2011-07-04T20:05:53.500" UserId="51" Comment="deleted 4 characters in body; edited tags; edited title" Text="Anyone have any experience with this? This hasn't been refereed as mush as it 'looks/sound' like.&#xD;&#xA;&#xD;&#xA;http://www.marek-knows.com/index.php5&#xD;&#xA;&#xD;&#xA;Among many other products, the site provides game engine development video, which is around *45hours long*. Starting from context creation, model loading, scene graph, animation. But it looks like a little old. Is it still useful?" />
  <row Id="32459" PostHistoryTypeId="4" PostId="14485" RevisionGUID="b3452dde-513e-4544-b4be-1a7574117efb" CreationDate="2011-07-04T20:05:53.500" UserId="51" Comment="deleted 4 characters in body; edited tags; edited title" Text="Are the Marek-knows tutorials any good or still relevant?" />
  <row Id="32460" PostHistoryTypeId="6" PostId="14485" RevisionGUID="b3452dde-513e-4544-b4be-1a7574117efb" CreationDate="2011-07-04T20:05:53.500" UserId="51" Comment="deleted 4 characters in body; edited tags; edited title" Text="&lt;engine&gt;&lt;tutorials&gt;&lt;video&gt;" />
  <row Id="32461" PostHistoryTypeId="2" PostId="14486" RevisionGUID="ff181f23-f3a5-46e9-a5da-8312cd422ed2" CreationDate="2011-07-04T20:35:41.140" UserId="7197" Text="![http://dl.dropbox.com/u/3724424/Programming/Gifs/game6.gif][1]&#xD;&#xA;&#xD;&#xA;I have a problem with AABB collision resolution.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I resolve AABB intersection by resolving the X axis first, then the Y axis. &#xD;&#xA;This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The current method works fine when an object moves into the player and the player has to be pushed horizontally. As you can see in the .gif, the horizontal spikes push the player correctly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When the vertical spikes move into the player, however, the X axis is still resolved first. This makes &quot;using the spikes as a lift&quot; impossible. &#xD;&#xA;&#xD;&#xA;When the player moves into the vertical spikes (affected by gravity, falls into them), he's pushed on the Y axis, because there was no overlap on the X axis to begin with.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something I tried was the method described in the first answer of this link: [url]http://gamedev.stackexchange.com/questions/13774/2d-rectangular-object-collision-detect-direction[/url]&#xD;&#xA;However the spikes and moving objects move by having their position changed, not velocity, and I don't calculate their next predicted position until their Update() method is called. &#xD;&#xA;Needless to say this solution didn't work either. :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I need to solve AABB collision in a way that both of the cases described above work as intended.&#xD;&#xA;&#xD;&#xA;This is my current collision source code: http://pastebin.com/MiCi3nA1&#xD;&#xA;&#xD;&#xA;I'd be really grateful if someone could look into this, since this bug has been present in the engine all the way back from the beginning, and I've been struggling to find a good solution, without any success. This is seriously making me spend nights looking at the collision code and preventing me from getting to the &quot;fun part&quot; and coding the game logic :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried implementing the same collision system as in the XNA AppHub platformer demo (by copy-pasting most of the stuff). However the &quot;jumping&quot; bug occurs in my game, while it doesn't occur in the AppHub demo. &#xD;&#xA;[ jumping bug: http://i.stack.imgur.com/NLg4j.png ]&#xD;&#xA;&#xD;&#xA;To jump I check if the player is &quot;onGround&quot;, then add -5 to Velocity.Y.&#xD;&#xA; &#xD;&#xA;Since the player's Velocity.X is higher than Velocity.Y (refer to the fourth panel in the diagram), onGround is set to true when it shouldn't be, and thus lets the player jump in mid-air.&#xD;&#xA;&#xD;&#xA;I believe this doesn't happen in the AppHub demo because the player's Velocity.X will never be higher than Velocity.Y, but I may be mistaken.&#xD;&#xA;&#xD;&#xA;I solved this before by resolving on the X axis first, then on the Y axis. But that screws up the collision with the spikes as I stated above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/OZZp1.gif" />
  <row Id="32462" PostHistoryTypeId="1" PostId="14486" RevisionGUID="ff181f23-f3a5-46e9-a5da-8312cd422ed2" CreationDate="2011-07-04T20:35:41.140" UserId="7197" Text="2D Platformer AABB collision problems" />
  <row Id="32463" PostHistoryTypeId="3" PostId="14486" RevisionGUID="ff181f23-f3a5-46e9-a5da-8312cd422ed2" CreationDate="2011-07-04T20:35:41.140" UserId="7197" Text="&lt;2d&gt;&lt;c#&gt;&lt;collision-detection&gt;&lt;physics&gt;&lt;platformer&gt;" />
  <row Id="32464" PostHistoryTypeId="5" PostId="14323" RevisionGUID="a33882cb-7610-4223-9035-be3db39c42f4" CreationDate="2011-07-04T21:19:48.757" UserId="4360" Comment="added 224 characters in body; edited tags" Text="I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for debugging. I'm not, however not all my objects are on the same screen, and i'd like to see where they are in the physics representation.&#xD;&#xA;&#xD;&#xA;**How can I pan the debug drawing?**&#xD;&#xA;&#xD;&#xA;As you can see the debug draw stuff, is show on the top left, but it only shows a small part of the world.&#xD;&#xA;&#xD;&#xA;![Box2D debug draw is on the top left][1]&#xD;&#xA;Here is an example of what I mean:  &#xD;&#xA;http://onedayitwillmake.com/ChuClone/&#xD;&#xA;&#xD;&#xA;The game is open source, If you'd like to poke through and note something that perhaps i'm doing something that is obviously wrong:  &#xD;&#xA;https://github.com/onedayitwillmake/ChuClone&#xD;&#xA;&#xD;&#xA;Here's my **hacky way** that I'm using now to scroll the b2DebugDraw view, in which I added a property offsetX and offsetY into b2DebugDraw&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/E45Q8.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/qwZJI.jpg" />
  <row Id="32465" PostHistoryTypeId="6" PostId="14323" RevisionGUID="a33882cb-7610-4223-9035-be3db39c42f4" CreationDate="2011-07-04T21:19:48.757" UserId="4360" Comment="added 224 characters in body; edited tags" Text="&lt;javascript&gt;&lt;box2d&gt;&lt;debug&gt;" />
  <row Id="32466" PostHistoryTypeId="25" PostId="14473" RevisionGUID="659706ea-44b6-4fbd-9b92-07bd0939c112" CreationDate="2011-07-04T21:27:11.980" Comment="http://twitter.com/#!/StackGameDev/status/87995898906419200" />
  <row Id="32467" PostHistoryTypeId="2" PostId="14487" RevisionGUID="c8396a9b-c9ac-4da0-a2d3-88eae3e342e1" CreationDate="2011-07-04T21:42:42.990" UserId="8415" Text="Here's a good solution for isometric z-sorting in AS3:&#xD;&#xA;http://blog.obrodhage.com/?p=49" />
  <row Id="32471" PostHistoryTypeId="5" PostId="14486" RevisionGUID="558002d5-0ae6-4c95-8eb3-163420f367ac" CreationDate="2011-07-04T22:40:19.117" UserId="2698" Comment="Link fixed" Text="![http://dl.dropbox.com/u/3724424/Programming/Gifs/game6.gif][1]&#xD;&#xA;&#xD;&#xA;I have a problem with AABB collision resolution.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I resolve AABB intersection by resolving the X axis first, then the Y axis. &#xD;&#xA;This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The current method works fine when an object moves into the player and the player has to be pushed horizontally. As you can see in the .gif, the horizontal spikes push the player correctly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When the vertical spikes move into the player, however, the X axis is still resolved first. This makes &quot;using the spikes as a lift&quot; impossible. &#xD;&#xA;&#xD;&#xA;When the player moves into the vertical spikes (affected by gravity, falls into them), he's pushed on the Y axis, because there was no overlap on the X axis to begin with.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something I tried was the method described in the first answer of this link: [2D rectangular object collision detection](http://gamedev.stackexchange.com/questions/13774/2d-rectangular-object-collision-detect-direction)&#xD;&#xA;&#xD;&#xA;However the spikes and moving objects move by having their position changed, not velocity, and I don't calculate their next predicted position until their Update() method is called. &#xD;&#xA;Needless to say this solution didn't work either. :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I need to solve AABB collision in a way that both of the cases described above work as intended.&#xD;&#xA;&#xD;&#xA;This is my current collision source code: http://pastebin.com/MiCi3nA1&#xD;&#xA;&#xD;&#xA;I'd be really grateful if someone could look into this, since this bug has been present in the engine all the way back from the beginning, and I've been struggling to find a good solution, without any success. This is seriously making me spend nights looking at the collision code and preventing me from getting to the &quot;fun part&quot; and coding the game logic :(&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried implementing the same collision system as in the XNA AppHub platformer demo (by copy-pasting most of the stuff). However the &quot;jumping&quot; bug occurs in my game, while it doesn't occur in the AppHub demo. &#xD;&#xA;[ jumping bug: http://i.stack.imgur.com/NLg4j.png ]&#xD;&#xA;&#xD;&#xA;To jump I check if the player is &quot;onGround&quot;, then add -5 to Velocity.Y.&#xD;&#xA; &#xD;&#xA;Since the player's Velocity.X is higher than Velocity.Y (refer to the fourth panel in the diagram), onGround is set to true when it shouldn't be, and thus lets the player jump in mid-air.&#xD;&#xA;&#xD;&#xA;I believe this doesn't happen in the AppHub demo because the player's Velocity.X will never be higher than Velocity.Y, but I may be mistaken.&#xD;&#xA;&#xD;&#xA;I solved this before by resolving on the X axis first, then on the Y axis. But that screws up the collision with the spikes as I stated above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/OZZp1.gif" />
  <row Id="32472" PostHistoryTypeId="24" PostId="14486" RevisionGUID="558002d5-0ae6-4c95-8eb3-163420f367ac" CreationDate="2011-07-04T22:40:19.117" Comment="Proposed by 2698 approved by 51 edit id of 532" />
  <row Id="32474" PostHistoryTypeId="25" PostId="14486" RevisionGUID="fcca7243-9852-4ffa-966d-ff7af5f236e1" CreationDate="2011-07-05T00:27:11.607" Comment="http://twitter.com/#!/StackGameDev/status/88041195342794752" />
  <row Id="32475" PostHistoryTypeId="2" PostId="14489" RevisionGUID="be70d179-1ebe-4259-952a-37a00e2d244c" CreationDate="2011-07-05T02:13:52.417" UserId="8417" Text="bingo .The problem existes in &quot;CCCallFunc&quot;,try &quot;CCCallFuncN&quot; instead. evreything goes well." />
  <row Id="32476" PostHistoryTypeId="2" PostId="14490" RevisionGUID="cd76bdfe-78be-4fac-8989-136113e8baf7" CreationDate="2011-07-05T02:53:18.060" UserId="8418" Text="While the above answer is indeed the case the tech talks and other presentations on the engine have a lot of useful information about game development using HTML5 and ***not*** using canvas. I have used a few of these tricks in my latest project and built a scrolling map world rendering through HTML and CSS including an isometric view with a good deal of success." />
  <row Id="32477" PostHistoryTypeId="25" PostId="14454" RevisionGUID="368d49b3-d494-4032-8c4b-9d31c9089393" CreationDate="2011-07-05T03:27:13.717" Comment="http://twitter.com/#!/StackGameDev/status/88086499777708032" />
  <row Id="32478" PostHistoryTypeId="25" PostId="14424" RevisionGUID="ac620601-dd61-4029-8ea2-cfe459b0a2b7" CreationDate="2011-07-05T06:27:13.873" Comment="http://twitter.com/#!/StackGameDev/status/88131801347932161" />
  <row Id="32479" PostHistoryTypeId="2" PostId="14491" RevisionGUID="a6dcd9c4-da47-4def-87d6-96f2d8b9e002" CreationDate="2011-07-05T07:16:20.820" UserId="7728" Text="The simplest solution for you will be to check both collision directions before resolving either of them, and just resolve the smaller of the two.  This means that you resolve by the smallest amount possible, instead of always resolving x first, or always resolving y first.&#xD;&#xA;&#xD;&#xA;Your code would look something like this:&#xD;&#xA;&#xD;&#xA;    while ( StillCollidingWithSomething(object) )&#xD;&#xA;    {&#xD;&#xA;      float xDistanceToResolve = XDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      float yDistanceToResolve = YDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      if ( xDistanceToResolve == 0.f )  // not colliding on x, so resolve on y&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( 0.f, yDistanceToResolve );&#xD;&#xA;      }&#xD;&#xA;      else if ( yDistanceToResolve == 0.f ) // not colliding on y, so resolve on x&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( xDistanceToResolve, 0.f );&#xD;&#xA;      }&#xD;&#xA;      else if ( fabs( xDistanceToResolve ) &lt; fabs( yDistanceToResolve ) ) // colliding on both axes, so resolve on whichever one requires less movement&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( xDistanceToResolve, 0.f );&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( 0.f, yDistanceToResolve );&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="32480" PostHistoryTypeId="2" PostId="14492" RevisionGUID="72cd4a88-df0f-414f-93cc-0bdf04c62f54" CreationDate="2011-07-05T08:33:00.533" UserId="8422" Text="i think that C++ is only Language to use for every program all other languages are limited in any place so i want to use c++ which is best for creating any type of program and Coding is same with Minimum difference from Java. Thank you &#xD;&#xA;Nawab Khan Chandio From Nawab Shah Sindh Pakistan" />
  <row Id="32482" PostHistoryTypeId="25" PostId="14485" RevisionGUID="a427c812-176b-4b52-ae4f-8259e67a8f3a" CreationDate="2011-07-05T09:27:13.657" Comment="http://twitter.com/#!/StackGameDev/status/88177100443488256" />
  <row Id="32483" PostHistoryTypeId="2" PostId="14494" RevisionGUID="c8f42edc-0edc-4013-8273-54c34bbe2388" CreationDate="2011-07-05T10:19:22.490" UserId="8424" Text="A friend of mine is asking me to help out on a project of his, I have done a small amount of game development before, but mainly do application and enterprise development these days.&#xD;&#xA;&#xD;&#xA;He is asking me to look into some of the networking part of his game. I know that a huge part of this is going to involve reporting/analytics as well as scalability, so it isnt as simple as spamming a server and instantly getting responses.&#xD;&#xA;&#xD;&#xA;In the enterprise app/web world we tend to use [CQRS][1] pattern or some other similar approach when we need to scale quite well and also take into account reporting on interactions etc.&#xD;&#xA;&#xD;&#xA;So I imagine that most typical MMO style games (lets assume mmorpg games akin to WoW), they must employ a heavily distributed and scaleable system. So do they end up using a node system with a messaging fabric behind the scenes?&#xD;&#xA;&#xD;&#xA;Sorry for being a bit vague but are there any sort of articles on people discussing the overall architecture for these style games?&#xD;&#xA;&#xD;&#xA;  [1]: http://abdullin.com/cqrs/" />
  <row Id="32484" PostHistoryTypeId="1" PostId="14494" RevisionGUID="c8f42edc-0edc-4013-8273-54c34bbe2388" CreationDate="2011-07-05T10:19:22.490" UserId="8424" Text="MMO architecture - Highly Scalable with Reporting capabilities" />
  <row Id="32485" PostHistoryTypeId="3" PostId="14494" RevisionGUID="c8f42edc-0edc-4013-8273-54c34bbe2388" CreationDate="2011-07-05T10:19:22.490" UserId="8424" Text="&lt;architecture&gt;&lt;network&gt;&lt;mmo&gt;" />
  <row Id="32487" PostHistoryTypeId="2" PostId="14495" RevisionGUID="e9e883dd-4add-4e9a-8a58-fb9a3c53a052" CreationDate="2011-07-05T10:42:50.013" UserId="7275" Text="hi could i know these about android game development for tetris and angrybird like 2D game&#xD;&#xA;&#xD;&#xA; 1. Is java the established language to develop&#xD;&#xA; 2. Can i know any [x-code][1] like development environment for designing Both free and with money&#xD;&#xA; 3. Can i know any game development engines which are open source like [cocos2D][2]&#xD;&#xA; 4. Any tutorials which are great can be of immense help&#xD;&#xA;&#xD;&#xA;Thanks in advance :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/xcode/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/" />
  <row Id="32488" PostHistoryTypeId="1" PostId="14495" RevisionGUID="e9e883dd-4add-4e9a-8a58-fb9a3c53a052" CreationDate="2011-07-05T10:42:50.013" UserId="7275" Text="Android game development for new entry" />
  <row Id="32489" PostHistoryTypeId="3" PostId="14495" RevisionGUID="e9e883dd-4add-4e9a-8a58-fb9a3c53a052" CreationDate="2011-07-05T10:42:50.013" UserId="7275" Text="&lt;game-design&gt;&lt;android&gt;&lt;tutorials&gt;&lt;api&gt;&lt;ide&gt;" />
  <row Id="32490" PostHistoryTypeId="25" PostId="14421" RevisionGUID="26eccd05-a653-4a59-9de7-d31d95799daa" CreationDate="2011-07-05T12:27:13.627" Comment="http://twitter.com/#!/StackGameDev/status/88222398880555008" />
  <row Id="32491" PostHistoryTypeId="2" PostId="14496" RevisionGUID="d1acdba4-a44c-471a-9b85-781801046798" CreationDate="2011-07-05T12:27:27.610" UserId="4894" Text=" 1. Java is the default language to develop on Android, although you can use NDK (native c) for performance issues on specific parts. But basically, Java + OpenGL is fast enough for most 2D Games. &#xD;&#xA;&#xD;&#xA; 2. One of the best (in my opinion) development environment for Java/Android is Eclipse : you can download plugins for Android from the official website (http://developer.android.com/sdk/installing.html)&#xD;&#xA;&#xD;&#xA; 3. You have Andgine a free 2D game engine : http://www.andengine.org/&#xD;&#xA;&#xD;&#xA; 4. You'll find many tutorials for Andgine on their website. If you're missing something, maybe ask for a specific topic here or on their forum. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="32492" PostHistoryTypeId="2" PostId="14497" RevisionGUID="6fbc19f8-d7ec-4b01-88ed-290a1cd970d5" CreationDate="2011-07-05T12:35:49.023" UserId="4698" Text="Peer-2-Peer has advantages (scalability, no server cost), but several disadvantages:&#xD;&#xA;- you need lots of communication with more than 2 players&#xD;&#xA;- cheating&#xD;&#xA;- handling of dropping players&#xD;&#xA;- master election (dealing cards, decisions etc)&#xD;&#xA;&#xD;&#xA;iScat from Mobilebits([http://goo.gl/IPtlZ][1]) for example uses an authorative (client/server) based approach.&#xD;&#xA;- Photon (http://www.exitgames.com/)&#xD;&#xA;- free for up to 100 CCUs (concurrent users)&#xD;&#xA;- support iOS, Android, HTML5, Flash, ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can easily combine this central matchmaking with gamecenter as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/IPtlZ" />
  <row Id="32493" PostHistoryTypeId="5" PostId="14477" RevisionGUID="9bc59f3e-a53e-41cc-a95e-b49480371a95" CreationDate="2011-07-05T12:44:45.697" UserId="2061" Comment="There was a lot of fluff unrelated to the answer, and some very confusing choice of words.  See comments." Text="Your reasoning was perfect: use a vector to move from my position to my target.  This is the purpose of a [vector][1]; you simply forgot the *speed*!&#xD;&#xA;&#xD;&#xA;Velocity is a vector: a speed and a direction.  However, if you forget to normalize the difference vector and multiply it the bullet speed (a scalar), you are basically saying that if you are **close to the target** (the difference vector is small) **the bullet slows down**; while if you are far away the bullet speed is larger.&#xD;&#xA;&#xD;&#xA;This is the underlying problem: you need to calculate both the direction *and* the magnitude of the vector.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.etymonline.com/index.php?term=vector" />
  <row Id="32494" PostHistoryTypeId="24" PostId="14477" RevisionGUID="9bc59f3e-a53e-41cc-a95e-b49480371a95" CreationDate="2011-07-05T12:44:45.697" Comment="Proposed by 2061 approved by 8050 edit id of 534" />
  <row Id="32495" PostHistoryTypeId="2" PostId="14498" RevisionGUID="d4ee6aac-6f09-474a-bf9c-600c2e2dfa3d" CreationDate="2011-07-05T13:22:36.987" UserId="8170" Text="I like the sgs/projectdarkstar or now known as reddwarf server for a back end game server.  However I am looking for a good front end, preferably 2D.  I was thinking of something such as flixel.  I know there is an AS3 library available for reddwarf, so I am hoping someone already has connected up flixel or a similar engine?   Or if you have a recommendation for another easy client side engine that will connect to reddwarf?" />
  <row Id="32496" PostHistoryTypeId="1" PostId="14498" RevisionGUID="d4ee6aac-6f09-474a-bf9c-600c2e2dfa3d" CreationDate="2011-07-05T13:22:36.987" UserId="8170" Text="Can flixel or a similar engine be used with reddwarf server?" />
  <row Id="32497" PostHistoryTypeId="3" PostId="14498" RevisionGUID="d4ee6aac-6f09-474a-bf9c-600c2e2dfa3d" CreationDate="2011-07-05T13:22:36.987" UserId="8170" Text="&lt;java&gt;&lt;flash&gt;&lt;actionscript-3&gt;" />
  <row Id="32498" PostHistoryTypeId="2" PostId="14499" RevisionGUID="3a9ad059-e066-4eca-86fd-124348c6ee6a" CreationDate="2011-07-05T13:55:43.343" UserId="2306" Text="You're looking for the bone transforms. See model.mesh. Also the xna app hub samples explain this well." />
  <row Id="32499" PostHistoryTypeId="5" PostId="14499" RevisionGUID="cbe8474d-4c97-49e9-ab8c-a1c5fd9a506c" CreationDate="2011-07-05T14:13:02.143" UserId="2306" Comment="added 1596 characters in body" Text="It sounds like you may be looking for the **bone transforms**, which define transforms for each mesh in a model relative to the model's coordinate system. This lets you, say, rotate a car wheel about its own axis, and keep it correctly positioned relative to the car chassis.&#xD;&#xA;&#xD;&#xA;Assuming that you have already loaded a model with &#xD;&#xA;&#xD;&#xA;    var model = Content.Load&lt;Model&gt;(@&quot;mymodel&quot;) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can easily get to the bone transforms with&#xD;&#xA;&#xD;&#xA;    model.CopyAbsoluteBoneTransformsTo(transforms)&#xD;&#xA;&#xD;&#xA;[See this link for a decent explanation][1], or [this one from Riemer's][2].&#xD;&#xA;&#xD;&#xA;[This XNA App Hub sample][3] demonstrates loading a tank model, and having its wheels and turret move relative to the model.&#xD;&#xA;&#xD;&#xA;The basic idea is that different meshes (in this case, the wheels and tank) are connected via &quot;bones.&quot; Bones represent a hierarchical relationship between model elements (despite the name, they are not exclusive to animal or human models).&#xD;&#xA;&#xD;&#xA;In your 3D modeling app of choice, you define bones connecting child meshes (wheels) to parent meshes (the tank chassis), and define transforms in the child mesh's space that transform the mesh relative to its parent.&#xD;&#xA;&#xD;&#xA;By using the `.CopyAbsoluteBoneTransforms()` method, you can quickly concatenate the child's transforms with the parent. This has the effect of putting the child mesh in the parent's coordinate space, so that you'll get a valid result when you multiply the result by the view and projection matrices.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.toymaker.info/Games/XNA/html/xna_models.html&#xD;&#xA;  [2]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Loading_a_Model.php&#xD;&#xA;  [3]: http://create.msdn.com/en-US/education/catalog/sample/simple_animation" />
  <row Id="32500" PostHistoryTypeId="2" PostId="14500" RevisionGUID="312820cc-9fdb-4ed0-a14c-41b7be36752a" CreationDate="2011-07-05T14:21:02.277" UserId="7911" Text="There are MMO code bases available, which might be better than articles?  Depends on how you like to investigate a field.&#xD;&#xA;&#xD;&#xA;Panda3D, Ryzom, Mangos (warcraft emu), the WorldForge project, and so on.  Experimental engines like Smash in erlang.  Many older MMOs are built on top of MUD code.&#xD;&#xA;&#xD;&#xA;Most core MMO architectures aren't like enterprise setups, the usage pattern is built around a soft realtime simulation and not services.&#xD;&#xA;&#xD;&#xA;The supporting bits like logging, authentication, load balancing are pretty much just like enterprise apps and services and some of the end user experience before attaching to the simulation have been done as traditional web services.&#xD;&#xA;" />
  <row Id="32502" PostHistoryTypeId="5" PostId="14495" RevisionGUID="dbfcab16-32d4-457c-a8d3-43a5cf05d77f" CreationDate="2011-07-05T14:44:59.493" UserId="7888" Comment="Correct spelling, fixed grammar, improved title relevance and clarity" Text="Hi, I would like to ask the following regarding developing Tetris- and Angry Birds-like 2D games for Android:&#xD;&#xA;&#xD;&#xA; 1. Is Java the official development language for Android?&#xD;&#xA; 2. What free or commercial Android development environments, like [Xcode][1] for iOS development, are available?&#xD;&#xA; 3. What open source game development engines, like [cocos2D][2], are available for Android?&#xD;&#xA; 4. Are there any great tutorials available for developing such games?&#xD;&#xA;&#xD;&#xA;Thanks in advance :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/xcode/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/" />
  <row Id="32503" PostHistoryTypeId="4" PostId="14495" RevisionGUID="dbfcab16-32d4-457c-a8d3-43a5cf05d77f" CreationDate="2011-07-05T14:44:59.493" UserId="7888" Comment="Correct spelling, fixed grammar, improved title relevance and clarity" Text="What tools are available for developing 2D games like Tetris or Angry Birds for Android?" />
  <row Id="32504" PostHistoryTypeId="24" PostId="14495" RevisionGUID="dbfcab16-32d4-457c-a8d3-43a5cf05d77f" CreationDate="2011-07-05T14:44:59.493" Comment="Proposed by 7888 approved by -1 edit id of 535" />
  <row Id="32505" PostHistoryTypeId="5" PostId="14495" RevisionGUID="3a9de9b4-3079-4be0-9b1f-1fa8c64481de" CreationDate="2011-07-05T14:44:59.570" UserId="20" Comment="Correct spelling, fixed grammar, improved title relevance and clarity" Text="I would like to ask the following regarding developing Tetris- and Angry Birds-like 2D games for Android:&#xD;&#xA;&#xD;&#xA; 1. Is Java the official development language for Android?&#xD;&#xA; 2. What free or commercial Android development environments (like [Xcode][1] is for iOS) are available?&#xD;&#xA; 3. What open source game development engines, like [cocos2D][2], are available for Android?&#xD;&#xA; 4. Are there any great tutorials available for developing such games?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.apple.com/xcode/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/" />
  <row Id="32506" PostHistoryTypeId="2" PostId="14501" RevisionGUID="026229cb-9091-4a57-817e-2a232fc7a71a" CreationDate="2011-07-05T14:55:04.660" UserId="-1" Text="" />
  <row Id="32507" PostHistoryTypeId="2" PostId="14502" RevisionGUID="7215db9b-884a-462a-9237-90823012d132" CreationDate="2011-07-05T14:55:04.660" UserId="-1" Text="" />
  <row Id="32508" PostHistoryTypeId="5" PostId="11840" RevisionGUID="582803c3-52b6-4d10-9bc5-f393532cf871" CreationDate="2011-07-05T15:08:35.780" UserId="1430" Comment="deleted 6 characters in body" Text="Letss say I want to make a **really** simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn something.&#xD;&#xA;&#xD;&#xA;I figured out how to simulate gravity and generate simple terrain and how to do some collision detection. But I have no idea how do they mask out the part of the terrain that is hit with a projectile that leaves a hole in form of a circle.&#xD;&#xA;&#xD;&#xA;I tried enabling stencil buffer and put a quad which has a circle texture on it expecting to mask out only the circle part, but it masked out the whole quad -- I mean it was a rectangle shaped hole and not a circle shaped one. Next I thought maybe some blending will do the trick but I didn't figure it out how. Or should I just draw a polygon with many edges to look like a circle and use that instead (with the stencil buffer)? I'm just curious how it is done. Can someone point me in the right direction?" />
  <row Id="32509" PostHistoryTypeId="25" PostId="14494" RevisionGUID="3b365a55-c19d-481d-b9ab-46e44ddc4126" CreationDate="2011-07-05T15:27:13.580" Comment="http://twitter.com/#!/StackGameDev/status/88267696709451776" />
  <row Id="32510" PostHistoryTypeId="2" PostId="14503" RevisionGUID="30b64bbc-7884-4fa7-807b-7fab952cb80d" CreationDate="2011-07-05T15:58:05.620" UserId="7888" Text="  1. The [Android developer site][1] doesn't make it clear anymore that the SDK uses the Java language, but that's the [official language][2]. Compiled languages can be used through the [Native Development Kit][3], allowing for languages like C or C++ to be used; however, this is for augmenting Java code rather than replacing it.&#xD;&#xA;  2. The supported IDE is [Eclipse][4], and Google provides a [plugin][5] to help automate the creation, testing, and deployment of Android apps.&#xD;&#xA;  3. There's a relatively new 2D game engine called [andEngine][6] which is LGPL licensed. There is also an Android port of the [cocos2D][7] engine you mentioned, which is New BSD licensed. [Box2D][8] is also available for Android, and is the physics engine used by Angry Birds and many physics-based 2D games. &#xD;&#xA;  4. There are [examples][9] and [tutorials][10] available for andEngine, and more are being created all the time. For cocos2D you could adapt any of the many tutorials for iOS development; or find some [specific to cocos2D-android][11]. There's an [example Android Tetris game][12] you can use for reference and a [Java Tetris tutorial][13] you could use for guidance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Android_software_development&#xD;&#xA;  [3]: http://developer.android.com/sdk/ndk/index.html&#xD;&#xA;  [4]: http://www.eclipse.org/&#xD;&#xA;  [5]: http://developer.android.com/sdk/installing.html#InstallingADT&#xD;&#xA;  [6]: http://www.andengine.org/&#xD;&#xA;  [7]: http://code.google.com/p/cocos2d-android/&#xD;&#xA;  [8]: http://code.google.com/p/androidbox2d/&#xD;&#xA;  [9]: http://code.google.com/p/andengineexamples/&#xD;&#xA;  [10]: http://www.andengine.org/forums/tutorials/mimminito-s-tutorial-list-t417.html&#xD;&#xA;  [11]: http://sketchydroide.com/Blog/?p=8&#xD;&#xA;  [12]: http://code.google.com/p/androidtetris/&#xD;&#xA;  [13]: http://zetcode.com/tutorials/javagamestutorial/tetris/" />
  <row Id="32511" PostHistoryTypeId="2" PostId="14504" RevisionGUID="c2a2464f-0cde-480c-b5cd-d12b12ed6d59" CreationDate="2011-07-05T16:45:01.043" UserId="8012" Text="I've been thinking a lot about the best way to store and load assets in your filesystem.  By this I mean where in memory to store them, and how to retrieve them when loading etc., as opposed to how their stored when the program is actually running.  I would imagine that this would be a fairly common question, but I can't seem to find it anywhere else, perhaps because I'm not asking it properly.&#xD;&#xA;&#xD;&#xA;So far, I have found two strategies, and I would like to know what other ones there are.&#xD;&#xA;&#xD;&#xA;1.  Storing the assets in an absolute path on the system.  You may have to get the users home directory if the user doesn't need to be an admit/root to install the game, and other OS dependant stuff would probably need to be done to ensure that the path is actually valid, but it seems like this could work well.&#xD;&#xA;&#xD;&#xA;2.  Get the game's location on the system, and assume that assets can be found in an adjacent directory.  I don't think there is any OS independent way to do this, but it does seem feasible.  This might be nice as it doesn't require the user to install the game, making it all around more portable, but it does seem like it would destroy an OS paradigm where specific portions of the game when in a certain place in the os (say /usr/games, and the executable would go in a different directory).&#xD;&#xA;&#xD;&#xA;Both of these ways do seem a bit clunky, so are there any other ways to get the location of your assets?  Otherwise, which is used more in games you've worked on?  Thank you." />
  <row Id="32512" PostHistoryTypeId="1" PostId="14504" RevisionGUID="c2a2464f-0cde-480c-b5cd-d12b12ed6d59" CreationDate="2011-07-05T16:45:01.043" UserId="8012" Text="Determining the location of game assets in memory" />
  <row Id="32513" PostHistoryTypeId="3" PostId="14504" RevisionGUID="c2a2464f-0cde-480c-b5cd-d12b12ed6d59" CreationDate="2011-07-05T16:45:01.043" UserId="8012" Text="&lt;path-finding&gt;&lt;assets&gt;" />
  <row Id="32514" PostHistoryTypeId="5" PostId="14496" RevisionGUID="1ced28b1-a5fe-4e33-9fd4-cf8986b1e5c7" CreationDate="2011-07-05T16:45:05.687" UserId="1156" Comment="added 14 characters in body" Text=" 1. Java is the default language to develop on Android, although you can use NDK (native C) for performance issues on specific parts. But basically, Java + OpenGL is fast enough for most 2D games. &#xD;&#xA;&#xD;&#xA; 2. One of the best (in my opinion) development environments for Java/Android is Eclipse : you can download plugins for Android from [the official website][1].&#xD;&#xA;&#xD;&#xA; 3. You have Andgine, a free 2D game engine : http://www.andengine.org/&#xD;&#xA;&#xD;&#xA; 4. You'll find many tutorials for Andgine on their website. If you're missing something, maybe ask for a specific topic here or on their forum. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/sdk/installing.html" />
  <row Id="32515" PostHistoryTypeId="6" PostId="14504" RevisionGUID="0c1dc8da-f099-4522-8c92-db91cee25e63" CreationDate="2011-07-05T16:56:49.000" UserId="1430" Comment="removed &quot;path-finding&quot;" Text="&lt;assets&gt;&lt;filesystem&gt;" />
  <row Id="32518" PostHistoryTypeId="5" PostId="14504" RevisionGUID="8ab08efb-396c-4df3-96bd-b464d6608f81" CreationDate="2011-07-05T17:04:20.887" UserId="8012" Comment="added 9 characters in body" Text="I've been thinking a lot about the best way to store and load assets in your filesystem.  By this I mean where in the file system to store them, and how to retrieve them when loading etc., as opposed to how their stored when the program is actually running.  I would imagine that this would be a fairly common question, but I can't seem to find it anywhere else, perhaps because I'm not asking it properly.&#xD;&#xA;&#xD;&#xA;So far, I have found two strategies, and I would like to know what other ones there are.&#xD;&#xA;&#xD;&#xA;1.  Storing the assets in an absolute path on the system.  You may have to get the users home directory if the user doesn't need to be an admit/root to install the game, and other OS dependant stuff would probably need to be done to ensure that the path is actually valid, but it seems like this could work well.&#xD;&#xA;&#xD;&#xA;2.  Get the game's location on the system, and assume that assets can be found in an adjacent directory.  I don't think there is any OS independent way to do this, but it does seem feasible.  This might be nice as it doesn't require the user to install the game, making it all around more portable, but it does seem like it would destroy an OS paradigm where specific portions of the game when in a certain place in the os (say /usr/games, and the executable would go in a different directory).&#xD;&#xA;&#xD;&#xA;Both of these ways do seem a bit clunky, so are there any other ways to get the location of your assets?  Otherwise, which is used more in games you've worked on?  Thank you." />
  <row Id="32519" PostHistoryTypeId="5" PostId="14502" RevisionGUID="4e0da645-a2cf-4962-a826-600796ba8226" CreationDate="2011-07-05T17:05:17.640" UserId="8405" Comment="added 66 characters in body" Text="The tower-defense Tag is for games in the style of &quot;Tower Defense&quot;" />
  <row Id="32520" PostHistoryTypeId="24" PostId="14502" RevisionGUID="4e0da645-a2cf-4962-a826-600796ba8226" CreationDate="2011-07-05T17:05:17.640" Comment="Proposed by 8405 approved by 51 edit id of 538" />
  <row Id="32521" PostHistoryTypeId="5" PostId="14501" RevisionGUID="619c8e9a-d0a0-4148-af24-732aac16f5c2" CreationDate="2011-07-05T17:05:20.543" UserId="8405" Comment="added 684 characters in body" Text="Tower Defense games are strategic games, where you place towers along a path to stop an ambush.&#xD;&#xA;&#xD;&#xA;These Towers have various effects, from simple damage to giving slownes or in some games even can teleport.&#xD;&#xA;&#xD;&#xA;The Towers can be upgraded to increase their effect.&#xD;&#xA;&#xD;&#xA;Both, building and upgrading the towers, costs some kind of money. You earn it by killing the ambushers.&#xD;&#xA;&#xD;&#xA;Usually one game is divided into different waves, where every wave of an attack has stronger or more ambushers than the one before.&#xD;&#xA;&#xD;&#xA;The goal of the game is to survive as long as possible, in some rare cases, you play some kind of story with different stages, where every stage has a defined number of waves." />
  <row Id="32522" PostHistoryTypeId="24" PostId="14501" RevisionGUID="619c8e9a-d0a0-4148-af24-732aac16f5c2" CreationDate="2011-07-05T17:05:20.543" Comment="Proposed by 8405 approved by 51 edit id of 537" />
  <row Id="32523" PostHistoryTypeId="5" PostId="14497" RevisionGUID="d64f7525-5be4-424b-adec-d3c3014cae44" CreationDate="2011-07-05T17:05:27.323" UserId="14" Comment="Cleaned it up a bit, fixed the formatting troubles. And removed shortlink from URL, people like knowing where they are going." Text="Peer-2-Peer has advantages (scalability, no server cost), but several disadvantages:&#xD;&#xA;&#xD;&#xA; - you need lots of communication with more than 2 players&#xD;&#xA; - cheating&#xD;&#xA; - handling of dropping players&#xD;&#xA; - master election (dealing cards, decisions etc)&#xD;&#xA;&#xD;&#xA;[iScat](http://mobilebits.de/Games/Default.aspx?Game=iSkat&amp;Category=MobileBits) from Mobilebits for example uses an authorative (client/server) based approach.&#xD;&#xA;&#xD;&#xA; - [Photon](http://www.exitgames.com/)&#xD;&#xA; - free for up to 100 CCUs (concurrent users)&#xD;&#xA; - support iOS, Android, HTML5, Flash, ...&#xD;&#xA;&#xD;&#xA;You can easily combine this central matchmaking with gamecenter as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/IPtlZ" />
  <row Id="32524" PostHistoryTypeId="2" PostId="14505" RevisionGUID="a700067f-9091-443c-9ad8-e59f98b05381" CreationDate="2011-07-05T17:11:06.480" UserId="7911" Text="You're over-engineering this =)&#xD;&#xA;&#xD;&#xA;Windows games have two different storage areas:&#xD;&#xA;&#xD;&#xA;The first is for static data with the installed program and these files are almost always referenced relative to the application itself, or defined in a file (XML usually) that the program loads when it starts up so there are no hard-coded references.  Using the Windows Registry to store paths has fallen out of favor.&#xD;&#xA;&#xD;&#xA;The second is for user data like saved games, and there is a standard API for working with that directory.  On recent Windows the standard security setting stops a user from saving data to the program area, which is why this is done.  On Linux, which I am no expert, I'd assume this directory would be a convention to use /usr/games or something in the /usr directory space.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32525" PostHistoryTypeId="2" PostId="14506" RevisionGUID="588e4142-ef85-48b7-a287-90271786a861" CreationDate="2011-07-05T17:14:39.203" UserId="5899" Text="I think that the most elegant form is to abstract the filesystem and to do it operating system independent. This abstraction is responsible of determine the operating system that is running the game and get the real path of the game executable. Then all your code that accesses to resource paths are always relative to the directory that you want. &#xD;&#xA;For example, separate always the directories with / ( unix, window, osx ) the operating system doesn't matter because the wrapper abstract this.&#xD;&#xA;&#xD;&#xA;Normally the resources are grouped, because if you are in main menu, you only wants to load the resources in main menu. Then the wrapper can have the hability to generate groups, and maybe to search inside this by name. ( this approach doesn't use paths, once the groups has been created ).&#xD;&#xA;&#xD;&#xA;The boost file system library [here][1] is a form to facilitate the creation of the filesystem wrapper.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.boost.org/doc/libs/1_39_0/libs/filesystem/doc/index.htm" />
  <row Id="32526" PostHistoryTypeId="17" PostId="14507" RevisionGUID="b8ed183b-14c8-4f09-bfb2-db87c874ee77" CreationDate="2011-07-05T17:21:06.750" UserId="-1" Comment="from http://stackoverflow.com/questions/6570586/loading-a-texture2d-array-in-directx11" Text="" />
  <row Id="32527" PostHistoryTypeId="17" PostId="14508" RevisionGUID="c84428d2-c74a-4de3-847b-8b6c011243cd" CreationDate="2011-07-05T17:21:06.750" UserId="-1" Comment="from http://stackoverflow.com/questions/6570586/loading-a-texture2d-array-in-directx11" Text="" />
  <row Id="32528" PostHistoryTypeId="2" PostId="14508" RevisionGUID="f78095fc-05bf-4057-b413-84e9e2296267" CreationDate="2011-07-05T13:09:33.377" UserId="986" Text="(Note: This is the answer originally provided in the question body by the OP).&#xD;&#xA;&#xD;&#xA;Problem solved. I needed to create an array of D3D11_SUBRESOURCE_DATA elements, one for each element in the Texture2DArray. Like this:&#xD;&#xA;&#xD;&#xA;	D3D11_TEXTURE2D_DESC sTexDesc;&#xD;&#xA;	sTexDesc.Width = m_uTextureWidth;&#xD;&#xA;	sTexDesc.Height = m_uTextureHeight;&#xD;&#xA;	sTexDesc.MipLevels = 1;&#xD;&#xA;	sTexDesc.ArraySize = 16;&#xD;&#xA;	sTexDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;	sTexDesc.SampleDesc.Count = 1;&#xD;&#xA;	sTexDesc.SampleDesc.Quality = 0;&#xD;&#xA;	sTexDesc.Usage = D3D11_USAGE_IMMUTABLE;&#xD;&#xA;	sTexDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;&#xD;&#xA;	sTexDesc.CPUAccessFlags = 0;&#xD;&#xA;	sTexDesc.MiscFlags = 0;&#xD;&#xA;&#xD;&#xA;	D3D11_SUBRESOURCE_DATA *sSubData = new D3D11_SUBRESOURCE_DATA[16];&#xD;&#xA;	for(int i=0; i&lt;16; i++) {&#xD;&#xA;		sSubData[i].pSysMem = ubImageStorage;&#xD;&#xA;		sSubData[i].SysMemPitch = (UINT) (1024 * 4);&#xD;&#xA;		sSubData[i].SysMemSlicePitch = (UINT) (1024 * 1024 * 4);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	ID3D11Texture2D* pTexture;&#xD;&#xA;&#xD;&#xA;	hr = m_pd3dDevice-&gt;CreateTexture2D(&amp;sTexDesc,sSubData,&amp;pTexture);&#xD;&#xA;&#xD;&#xA;	delete [] sSubData;&#xD;&#xA;&#xD;&#xA;Note that I've replaced the variables in the code above with constants, but allocated the D3D11_SUBRESOURCE_DATA array dynamically because its size is unknown at compile time.&#xD;&#xA;&#xD;&#xA;Why would you ever have different slices with different pitches? Is that even really supported? That seems really strange." />
  <row Id="32529" PostHistoryTypeId="2" PostId="14507" RevisionGUID="4b86cfd7-8f15-4472-9e73-8343056a3587" CreationDate="2011-07-04T11:03:24.860" UserDisplayName="matth" Text="How does one create a Texture2D Array in DirectX11? The texture I am trying to create is not multisampled, and I want only one mip level. I can't find a working example of a Texture2D Array. I have a buffer of 2D images that I want to use as a Texture2DArray in a shader.&#xD;&#xA;&#xD;&#xA;The following code snippet works when sTexDesc.ArraySize=1 (as a Texture2D). With sTexDesc.ArraySize=2 the subsequent call to CreateTexture2D crashes with this Access violation inside DirectX:&#xD;&#xA;&#xD;&#xA;&gt; `Unhandled exception at 0x000007fef5d6771a in test.exe: 0xC0000005: Access violation reading location 0xffffffffffffffff.`&#xD;&#xA;&#xD;&#xA;With larger values of ArraySize CreateTexture2D returns E_INVALIDARG. ubImageStorage contains valid data. As a Texture2D I can add multiples of the slice offset to this buffer address when assigning pSysMem and read each slice from a shader. What am I missing? I have tried all combinations of bind and usage flags and various values for MipLevels with no success.&#xD;&#xA;&#xD;&#xA;    D3D11_TEXTURE2D_DESC sTexDesc;&#xD;&#xA;    sTexDesc.Width = 1024;&#xD;&#xA;    sTexDesc.Height = 1024;&#xD;&#xA;    sTexDesc.MipLevels = 1;&#xD;&#xA;    sTexDesc.ArraySize = 2;&#xD;&#xA;    sTexDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;    sTexDesc.SampleDesc.Count = 1;&#xD;&#xA;    sTexDesc.SampleDesc.Quality = 0;&#xD;&#xA;    sTexDesc.Usage = D3D11_USAGE_IMMUTABLE;&#xD;&#xA;    sTexDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;&#xD;&#xA;    sTexDesc.CPUAccessFlags = 0;&#xD;&#xA;    sTexDesc.MiscFlags = 0;&#xD;&#xA;    &#xD;&#xA;    D3D11_SUBRESOURCE_DATA sSubData;&#xD;&#xA;    sSubData.pSysMem = ubImageStorage;&#xD;&#xA;    sSubData.SysMemPitch = (UINT) (1024 * 4);&#xD;&#xA;    sSubData.SysMemSlicePitch = (UINT) (1024 * 1024 * 4);&#xD;&#xA;    &#xD;&#xA;    ID3D11Texture2D* pTexture;&#xD;&#xA;    &#xD;&#xA;    hr = m_pd3dDevice-&gt;CreateTexture2D(&amp;sTexDesc,&amp;sSubData,&amp;pTexture);&#xD;&#xA;&#xD;&#xA;Here are the relevant pages from MSDN:  &#xD;&#xA;[ID3D11Device::CreateTexture2D Method](http://msdn.microsoft.com/en-us/library/ff476521(v=VS.85).aspx)  &#xD;&#xA;[D3D11_TEXTURE2D_DESC Structure](http://msdn.microsoft.com/en-us/library/ff476253(v=VS.85).aspx)" />
  <row Id="32530" PostHistoryTypeId="1" PostId="14507" RevisionGUID="4b86cfd7-8f15-4472-9e73-8343056a3587" CreationDate="2011-07-04T11:03:24.860" UserDisplayName="matth" Text="Loading a Texture2D Array in DirectX11" />
  <row Id="32531" PostHistoryTypeId="3" PostId="14507" RevisionGUID="4b86cfd7-8f15-4472-9e73-8343056a3587" CreationDate="2011-07-04T11:03:24.860" UserDisplayName="matth" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="32532" PostHistoryTypeId="2" PostId="14509" RevisionGUID="2eeadba1-d735-4531-8f59-d462d922db28" CreationDate="2011-07-05T17:52:26.533" UserId="6316" Text="Can anyone recommend any resources for free images that can be used as textures - sky boxes/spheres, dirt, gravel, bark, etc?  As always &lt;a href=&quot;http://images.google.com&quot;&gt;Google Images&lt;/a&gt; is your friend, but it'd be great to have single source.&#xD;&#xA;&#xD;&#xA;Recommendations for texture making/manipulating tools would be appreciated as well.  &lt;a href=&quot;http://www.imagemagick.org/script/index.php&quot;&gt;ImageMagick&lt;/a&gt; and &lt;a href=&quot;http://www.gimp.org/&quot;&gt;Gimp&lt;/a&gt; (especially the &lt;a href=&quot;http://registry.gimp.org/node/69&quot;&gt;normalmap plugin&lt;/a&gt;) are great, but are there other useful tools?&#xD;&#xA;" />
  <row Id="32533" PostHistoryTypeId="1" PostId="14509" RevisionGUID="2eeadba1-d735-4531-8f59-d462d922db28" CreationDate="2011-07-05T17:52:26.533" UserId="6316" Text="Texture resources" />
  <row Id="32534" PostHistoryTypeId="3" PostId="14509" RevisionGUID="2eeadba1-d735-4531-8f59-d462d922db28" CreationDate="2011-07-05T17:52:26.533" UserId="6316" Text="&lt;textures&gt;&lt;tools&gt;&lt;resources&gt;" />
  <row Id="32535" PostHistoryTypeId="5" PostId="11840" RevisionGUID="ed7468c4-f0b9-4741-9d06-5c06976f97a9" CreationDate="2011-07-05T18:00:42.430" UserId="51" Comment="edited body" Text="Let's say I want to make a **really** simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn something.&#xD;&#xA;&#xD;&#xA;I figured out how to simulate gravity and generate simple terrain and how to do some collision detection. But I have no idea how do they mask out the part of the terrain that is hit with a projectile that leaves a hole in form of a circle.&#xD;&#xA;&#xD;&#xA;I tried enabling stencil buffer and put a quad which has a circle texture on it expecting to mask out only the circle part, but it masked out the whole quad -- I mean it was a rectangle shaped hole and not a circle shaped one. Next I thought maybe some blending will do the trick but I didn't figure it out how. Or should I just draw a polygon with many edges to look like a circle and use that instead (with the stencil buffer)? I'm just curious how it is done. Can someone point me in the right direction?" />
  <row Id="32536" PostHistoryTypeId="2" PostId="14510" RevisionGUID="8aa7e74e-a643-485c-812b-03b304188b8e" CreationDate="2011-07-05T18:06:26.633" UserId="8430" Text="I'm totally new to OpenGL and I'm working on a Sandbox game called CubeRealm. My problem you see is rotation. I've got it in my head that to rotate the 'camera' I just rotate all the scene by the negative value of the camera's rotational values. However so far it seems to not be working.&#xD;&#xA;&#xD;&#xA;Here's the code snippets:&#xD;&#xA;&#xD;&#xA;    glPushMatrix();&#xD;&#xA;&#xD;&#xA;    lighting();&#xD;&#xA;    /*&#xD;&#xA;     (640^2)/(64^2)=amount of cubes on one 640x640 plane(409,600,4,096)&#xD;&#xA;     */&#xD;&#xA;    //TODO: fix z axis problem for translating&#xD;&#xA;    glRotatef(-player.camera.rotation.x,1.0,0.0,0.0);&#xD;&#xA;    glRotatef(-player.camera.rotation.y,0.0,1.0,0.0);&#xD;&#xA;    glRotatef(-player.camera.rotation.z,0.0,0.0,1.0);&#xD;&#xA;    renderGrid();&#xD;&#xA;&#xD;&#xA;    glPopMatrix();&#xD;&#xA;&#xD;&#xA;    glutSwapBuffers();&#xD;&#xA;&#xD;&#xA;    //SNIPPET2...&#xD;&#xA;&#xD;&#xA;    case LOOK_UP:&#xD;&#xA;        if(player.camera.rotation.y!=-90.0){ //if they are not looking up&#xD;&#xA;            //make them look up&#xD;&#xA;            player.camera.rotation.y-=90.0;&#xD;&#xA;            //TODO: set direction the camera is facing in&#xD;&#xA;        }&#xD;&#xA;        break;&#xD;&#xA;    case ROTATE_LEFT:&#xD;&#xA;        if(player.camera.rotation.x!=0.0){&#xD;&#xA;            player.camera.rotation.x-=90.0;&#xD;&#xA;            //TODO: set direction the camera is facing in&#xD;&#xA;        }else{&#xD;&#xA;            player.camera.rotation.x=360.0;&#xD;&#xA;            player.camera.rotation.x-=90.0;&#xD;&#xA;            //TODO: set direction the camera is facing in&#xD;&#xA;        }&#xD;&#xA;        break;&#xD;&#xA;    case LOOK_DOWN:&#xD;&#xA;        if(player.camera.rotation.y!=90.0){ //if they are not looking down&#xD;&#xA;            //make them look down&#xD;&#xA;            player.camera.rotation.y+=90.0;&#xD;&#xA;            //TODO: set direction the camera is facing in&#xD;&#xA;        }&#xD;&#xA;        break;&#xD;&#xA;    case ROTATE_RIGHT:&#xD;&#xA;        if(player.camera.rotation.x!=360.0){&#xD;&#xA;            player.camera.rotation.x+=90.0;&#xD;&#xA;            //TODO: set direction the camera is facing in&#xD;&#xA;        }else{&#xD;&#xA;            player.camera.rotation.x=0;&#xD;&#xA;            player.camera.rotation.x+=90.0;&#xD;&#xA;            //TODO: set direction the camera is facing in&#xD;&#xA;        }&#xD;&#xA;        break;&#xD;&#xA;&#xD;&#xA;When I press the right arrow key(rotate to the right) it doesn't rotate also when I rotate up(up arrow) it goes weird instead of allowing me to see the top of the skybox it still shows me my test cubes.&#xD;&#xA;&#xD;&#xA;So guys how do I fix the rotation, what am I doing wrong?&#xD;&#xA;&#xD;&#xA;Note the 'TODO: set direction' stuff is for my local axis system. Those TODOs are irrelevant to the question." />
  <row Id="32537" PostHistoryTypeId="1" PostId="14510" RevisionGUID="8aa7e74e-a643-485c-812b-03b304188b8e" CreationDate="2011-07-05T18:06:26.633" UserId="8430" Text="CubeRealm OpenGL rotation problems, need help. :\" />
  <row Id="32538" PostHistoryTypeId="3" PostId="14510" RevisionGUID="8aa7e74e-a643-485c-812b-03b304188b8e" CreationDate="2011-07-05T18:06:26.633" UserId="8430" Text="&lt;opengl&gt;&lt;camera&gt;&lt;c&gt;&lt;rotation&gt;" />
  <row Id="32539" PostHistoryTypeId="2" PostId="14511" RevisionGUID="e4776d75-ba76-42cf-a679-84791f23dbf3" CreationDate="2011-07-05T18:18:58.213" UserId="5021" Text="&gt; Google Images is your friend&#xD;&#xA;&#xD;&#xA;No it's not. If you use a texture, you should be sure that you have the rights to use it, or you open yourself up to lawsuits. Most of the images you'll find via a google image search will not be free for use in a game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a texture generation tool:&#xD;&#xA;http://www.filterforge.com/&#xD;&#xA;&#xD;&#xA;You can tweak the settings of every texture, to generate a unique texture for your game. Most textures can create an associated normal map, ambient occlusion map, diffuse map, specular power map, specular exponent map, etc.&#xD;&#xA;&#xD;&#xA;This means that you can generate a rock texture, and then composite the various maps for that texture together to form dynamic specular highlights in your game engine, instead of having a picture of real-life rocks, which may have specular highlights for the particular angle that the camera took the picture from -- this is less convincing in the game world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;A de-facto place to go for textures is http://www.cgtextures.com/&#xD;&#xA;You'll even find textures from CGTextures in AAA games!" />
  <row Id="32540" PostHistoryTypeId="25" PostId="14509" RevisionGUID="b9c3c16e-72c4-4b8a-b793-df3f79a8dc57" CreationDate="2011-07-05T18:27:14.353" Comment="http://twitter.com/#!/StackGameDev/status/88312995733708800" />
  <row Id="32541" PostHistoryTypeId="2" PostId="14512" RevisionGUID="695952e6-27c9-4a75-804f-0c8e80951c11" CreationDate="2011-07-05T18:36:49.523" UserId="1839" Text="LOOK_UP and LOOK_DOWN must rotate around the x-axis, not around the y-axis.&#xD;&#xA;&#xD;&#xA;ROTATE_RIGHT and ROTATE_LEFT must rotate around the y-axis, not around the x-axis.&#xD;&#xA;&#xD;&#xA;Immediately rotating around 90 degrees or initializing your angles with 90 degrees will bring your system into a gimbal lock state, resulting in weird rotations. You might want to use smaller angles and step-sizes for starters, particulary not 90 degrees or multiples of it.&#xD;&#xA;&#xD;&#xA;Initialize all angles with 0 and start from there, don't use multiples of 90.&#xD;&#xA;&#xD;&#xA;        // init your angles at startup, i.e. main or camera constructor&#xD;&#xA;        player.camera.rotation.x = 0.0;&#xD;&#xA;        player.camera.rotation.y = 0.0;&#xD;&#xA;        player.camera.rotation.z = 0.0;&#xD;&#xA;&#xD;&#xA;        // change the step-size and rotation-axis like this:&#xD;&#xA;        case LOOK_UP:&#xD;&#xA;            player.camera.rotation.x+=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case ROTATE_LEFT:&#xD;&#xA;            player.camera.rotation.y-=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case LOOK_DOWN:&#xD;&#xA;            player.camera.rotation.x-=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case ROTATE_RIGHT:&#xD;&#xA;            player.camera.rotation.y+=5.0;&#xD;&#xA;            break;" />
  <row Id="32542" PostHistoryTypeId="5" PostId="14489" RevisionGUID="adfad44d-8ba1-4559-acf4-4c4680ab4223" CreationDate="2011-07-05T18:39:08.863" UserId="189" Comment="fixed it" Text="Bingo. The problem exists in `CCCallFunc`, so try `CCCallFuncN` instead. Hope everything goes well." />
  <row Id="32543" PostHistoryTypeId="2" PostId="14513" RevisionGUID="5f2d072c-6251-4ba7-9b13-28d2225a5b4e" CreationDate="2011-07-05T18:42:55.693" UserId="2061" Text="Go take some pictures of the sky, ground, and trees.  Really.&#xD;&#xA;&#xD;&#xA;Grab a part of the image that looks like it would make for a good texture, then just [make it tileable][1] *(in Photoshop:  just offset the image 50% horizontally and vertically, and remove the seams using the patch and healing tools)*.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.myjanee.com/tuts/tilings/tilings.htm" />
  <row Id="32544" PostHistoryTypeId="5" PostId="14512" RevisionGUID="cf0f7e92-55ec-47f9-81d3-9c6fe188ac85" CreationDate="2011-07-05T18:52:43.083" UserId="1839" Comment="deleted 27 characters in body" Text="LOOK_UP and LOOK_DOWN must rotate around the x-axis, not around the y-axis.&#xD;&#xA;&#xD;&#xA;ROTATE_RIGHT and ROTATE_LEFT must rotate around the y-axis, not around the x-axis.&#xD;&#xA;&#xD;&#xA;Immediately rotating around 90 degrees or initializing your angles with 90 degrees will bring your system into a [Gimbal Lock][1] state, resulting in weird rotations. You might want to use smaller angles and step-sizes for starters, particulary not 90 degrees or multiples of it.&#xD;&#xA;&#xD;&#xA;Initialize all angles with 0 and start from there:&#xD;&#xA;&#xD;&#xA;        // init your angles at startup, i.e. main or camera constructor&#xD;&#xA;        player.camera.rotation.x = 0.0;&#xD;&#xA;        player.camera.rotation.y = 0.0;&#xD;&#xA;        player.camera.rotation.z = 0.0;&#xD;&#xA;&#xD;&#xA;        // change the step-size and rotation-axis like this:&#xD;&#xA;        case LOOK_UP:&#xD;&#xA;            player.camera.rotation.x+=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case ROTATE_LEFT:&#xD;&#xA;            player.camera.rotation.y-=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case LOOK_DOWN:&#xD;&#xA;            player.camera.rotation.x-=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case ROTATE_RIGHT:&#xD;&#xA;            player.camera.rotation.y+=5.0;&#xD;&#xA;            break;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gimbal_lock" />
  <row Id="32545" PostHistoryTypeId="5" PostId="14317" RevisionGUID="3f050082-5875-4188-973f-ec8c5c4810b8" CreationDate="2011-07-05T19:56:12.823" UserId="2061" Comment="added 310 characters in body" Text="You want to load only the information about the character from the XML, and use that information in your character class:&#xD;&#xA;&#xD;&#xA;	public class Character : DrawableGameComponent&#xD;&#xA;	{&#xD;&#xA;		public CharacterInfo CharacterInfo { get; private set; }&#xD;&#xA;		&#xD;&#xA;		public Character(Game game, string characterAssetName) : base(game)&#xD;&#xA;		{&#xD;&#xA;			_assetName = characterAssetName;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		protected override void LoadContent()&#xD;&#xA;		{&#xD;&#xA;			CharacterInfo = Game.Content.Load&lt;CharacterInfo&gt;(_assetName);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		public override void Update(GameTime gameTime) { }&#xD;&#xA;		public override void Draw(GameTime gameTime) { }&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	//In your data-types project:&#xD;&#xA;	public class CharacterInfo&#xD;&#xA;	{&#xD;&#xA;		public string Name { get; set; }&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;See [this](http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/automatic-xnb-serialization-in-xna-game-studio-3-1.aspx) and then [this](http://blogs.msdn.com/b/shawnhar/archive/2009/07/02/automatic-xnb-serialization-and-content-classes.aspx) blog post for more details." />
  <row Id="32546" PostHistoryTypeId="5" PostId="14407" RevisionGUID="9ae50b94-c27b-4376-93fa-2d460ab21e80" CreationDate="2011-07-05T20:22:46.280" UserId="8380" Comment="added 108 characters in body" Text="first I’m not programmer, I’ve been using a popular game for some time and I think it would make a great medium for machinima.  Problem is that it’s a top down view startegy game and it doesn’t give control of the camera other than pan map with arrow keys, drag with left mouse and zoom on cursor with mouse wheel.&#xD;&#xA;&#xD;&#xA;I’ve got the demo of Torque 3D and I found the documentation on creating different [camera modes][1] but I don’t want to spend hours to find out in the end that I can’t do it.&#xD;&#xA;&#xD;&#xA;Ideally I’d like a console command to switch between the default camera mode and the machinima one. &#xD;&#xA;The machinima one should focus on the centre of the map OR (toggle) on a selected unit and basically let me rotate the map like a sphere but never get below it or alter its horizontality. (hope you get the picture)&#xD;&#xA;&#xD;&#xA;So can anyone write me the code to add ?&#xD;&#xA;&#xD;&#xA;EDIT: The game is Frozen Synapse and I just learned that it uses Torque 2D but renders things in 3D. &#xD;&#xA;&#xD;&#xA;  [1]: http://docs.garagegames.com/torque-3d/official/index.html?content/documentation/Scripting/Advanced/RTSPrototype.html" />
  <row Id="32548" PostHistoryTypeId="2" PostId="14514" RevisionGUID="1d870e74-3078-4ca6-978c-a57046da07fe" CreationDate="2011-07-05T20:57:00.883" UserId="6774" Text="The title is fairly self-explanatory. I have a 2D racing game that utilizes per-pixel collision detection (the track is essentially two bitmaps, one for the graphics, one for collision data). The problem I'm running into is that I can't figure out how to implement the collision response. I can figure this out for situations where I have a box colliding with another box, but the fact that my objects can essentially be any shape has me stumped.&#xD;&#xA;&#xD;&#xA;The one approach that I've had some success with is to just sample a couple of pixels near the pixels that collide, build vectors out of those and then take the cross product of that, but it fails in many scenarios. Plus, it just seems like overengineering. In fact, I'm about 103% sure that I'm just overthinking the whole problem.&#xD;&#xA;&#xD;&#xA;Has anyone tackled this problem?" />
  <row Id="32549" PostHistoryTypeId="1" PostId="14514" RevisionGUID="1d870e74-3078-4ca6-978c-a57046da07fe" CreationDate="2011-07-05T20:57:00.883" UserId="6774" Text="Collision response for 2D racing game" />
  <row Id="32550" PostHistoryTypeId="3" PostId="14514" RevisionGUID="1d870e74-3078-4ca6-978c-a57046da07fe" CreationDate="2011-07-05T20:57:00.883" UserId="6774" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;2d-physics&gt;" />
  <row Id="32551" PostHistoryTypeId="25" PostId="14514" RevisionGUID="6444b919-15b9-4e06-aa40-0ab543c9d319" CreationDate="2011-07-05T21:27:15.333" Comment="http://twitter.com/#!/StackGameDev/status/88358300877463552" />
  <row Id="32552" PostHistoryTypeId="5" PostId="14413" RevisionGUID="27420e19-a91f-4d03-9efd-585e33c81287" CreationDate="2011-07-05T21:33:47.030" UserId="8240" Comment="added 449 characters in body" Text="I find myself confused by your question. So you want to use a &quot;popular game&quot; that is a &quot;top down view RTS game&quot; for machinima. But it doesn't give you enough camera controls.&#xD;&#xA;&#xD;&#xA;That's fine. Where it gets confusing is where you start talking about Torque 3D. The document you found pertains to Torque 3D users and possibly games made with Torque 3D. And I don't know of any &quot;popular&quot; RTS game that was made with Torque 3D. So the fact that Torque 3D has the ability to create camera modes has *nothing* to do with this anonymous RTS game.&#xD;&#xA;&#xD;&#xA;If the game itself does not give you camera controls, whether directly or via scripting, then you don't have camera controls, period.&#xD;&#xA;&#xD;&#xA;BTW, if you're talking about StarCraft 2, just *say* so; Blizzard's wrath will *not* be upon you. Also, SC2 has lots of camera controls in its scripting system; people have made third and first-person shooters in the engine. I could point you to all kinds of SC2 map editing resources you could use to make Machinima if I knew what game you were talking about.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;I wanted to know what game it was so that I could go look it up. And now that you have revealed that it uses T2D instead of T3D, what you want is simply impossible. T2D renders 3D objects the way it renders sprites: each one has its own space. There isn't a global camera for T2D unless the game creates that concept itself. And if it does, that global camera can only be changed via a mod if the developer specifically exposes it." />
  <row Id="32553" PostHistoryTypeId="5" PostId="14512" RevisionGUID="c99875e0-cb98-4594-abdf-bb319704f064" CreationDate="2011-07-05T21:43:14.027" UserId="1839" Comment="added 1943 characters in body" Text="LOOK_UP and LOOK_DOWN must rotate around the x-axis, not around the y-axis.&#xD;&#xA;&#xD;&#xA;ROTATE_RIGHT and ROTATE_LEFT must rotate around the y-axis, not around the x-axis.&#xD;&#xA;&#xD;&#xA;Immediately rotating around 90 degrees or initializing your angles with 90 degrees will bring your system into a [Gimbal Lock][1] state, resulting in weird rotations. You might want to use smaller angles and step-sizes for starters, particulary not 90 degrees or multiples of it.&#xD;&#xA;&#xD;&#xA;Initialize all angles with 0 and start from there:&#xD;&#xA;&#xD;&#xA;        // init your angles at startup, i.e. main or camera constructor&#xD;&#xA;        player.camera.rotation.x = 0.0;&#xD;&#xA;        player.camera.rotation.y = 0.0;&#xD;&#xA;        player.camera.rotation.z = 0.0;&#xD;&#xA;&#xD;&#xA;        // change the step-size and rotation-axis like this:&#xD;&#xA;        case LOOK_UP:&#xD;&#xA;            player.camera.rotation.x+=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case ROTATE_LEFT:&#xD;&#xA;            player.camera.rotation.y-=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case LOOK_DOWN:&#xD;&#xA;            player.camera.rotation.x-=5.0;&#xD;&#xA;            break;&#xD;&#xA;        case ROTATE_RIGHT:&#xD;&#xA;            player.camera.rotation.y+=5.0;&#xD;&#xA;            break;&#xD;&#xA;&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;Edit: After reviewing your code, here is the list of the bugs, the most important ones are 3), that messed up all the rendering, and 4) the correction for the camera rotation code&#xD;&#xA;&#xD;&#xA; 1. Off by one error in void setupGrid(), change &quot;&lt;=&quot; to &quot;&lt;&quot; in the while&#xD;&#xA;&#xD;&#xA;        while(_i&lt;GRID_SIZE){&#xD;&#xA;	&#xD;&#xA; 2. set the initial camera position to {0, 0, 5} in Initialize(), otherwise you wont see the boxes:&#xD;&#xA;&#xD;&#xA;        player.camera.position.x=0;&#xD;&#xA;        player.camera.position.y=0;&#xD;&#xA;        player.camera.position.z=5;&#xD;&#xA;        player.camera.rotation.x=0;&#xD;&#xA;        player.camera.rotation.y=0;&#xD;&#xA;        player.camera.rotation.z=0;&#xD;&#xA;	&#xD;&#xA; 3. in Reshape change 3rd param of gluPerspective to 1.0&#xD;&#xA;&#xD;&#xA;        gluPerspective(45.0,(double)screenWidth/(double)screenHeight,1.0,CUBE_UNIT*100.0);&#xD;&#xA;&#xD;&#xA; 4. Finally the correction of the camera rotation code in Keyboard2() like already written above&#xD;&#xA;&#xD;&#xA;            void Keyboard2(int key,int x,int y){&#xD;&#xA;                switch(key){&#xD;&#xA;                    case GLUT_KEY_F1:&#xD;&#xA;                        if(!wireframe){&#xD;&#xA;                            glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);&#xD;&#xA;                            wireframe=TRUE;&#xD;&#xA;                        }else{&#xD;&#xA;                            glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);&#xD;&#xA;                            wireframe=FALSE;&#xD;&#xA;                        }&#xD;&#xA;                        break;&#xD;&#xA;                    case LOOK_UP:&#xD;&#xA;                        player.camera.rotation.x+=5.0;&#xD;&#xA;                        break;&#xD;&#xA;                    case ROTATE_LEFT:&#xD;&#xA;                        player.camera.rotation.y+=5.0;&#xD;&#xA;                        break;&#xD;&#xA;                    case LOOK_DOWN:&#xD;&#xA;                        player.camera.rotation.x-=5.0;&#xD;&#xA;                        break;&#xD;&#xA;                    case ROTATE_RIGHT:&#xD;&#xA;                        player.camera.rotation.y-=5.0;&#xD;&#xA;                        break;&#xD;&#xA;                };&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gimbal_lock&#xD;&#xA;" />
  <row Id="32554" PostHistoryTypeId="2" PostId="14515" RevisionGUID="e6865bee-22a9-4633-8a63-45a243ebf398" CreationDate="2011-07-05T22:10:39.493" UserId="5899" Text="[Mayang's Free Texture Library][1] is other site with free textures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mayang.com/textures/" />
  <row Id="32555" PostHistoryTypeId="5" PostId="14407" RevisionGUID="b6550629-0dab-438f-81dc-cb8242aab2d3" CreationDate="2011-07-05T22:23:30.620" UserId="8380" Comment="added 105 characters in body" Text="first I’m not programmer, I’ve been using a popular game for some time and I think it would make a great medium for machinima.  Problem is that it’s a top down view startegy game and it doesn’t give control of the camera other than pan map with arrow keys, drag with left mouse and zoom on cursor with mouse wheel.&#xD;&#xA;&#xD;&#xA;I’ve got the demo of Torque 3D and I found the documentation on creating different [camera modes][1] but I don’t want to spend hours to find out in the end that I can’t do it.&#xD;&#xA;&#xD;&#xA;Ideally I’d like a console command to switch between the default camera mode and the machinima one. &#xD;&#xA;The machinima one should focus on the centre of the map OR (toggle) on a selected unit and basically let me rotate the map like a sphere but never get below it or alter its horizontality. (hope you get the picture)&#xD;&#xA;&#xD;&#xA;So can anyone write me the code to add ?&#xD;&#xA;&#xD;&#xA;EDIT: The game is Frozen Synapse and I just learned that it uses Torque 2D but renders things in 3D. &#xD;&#xA;EDIT2: [link to the mentioned fix][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.garagegames.com/torque-3d/official/index.html?content/documentation/Scripting/Advanced/RTSPrototype.html&#xD;&#xA;  [2]: http://forums.mode7games.com/viewtopic.php?f=21&amp;t=3170" />
  <row Id="32556" PostHistoryTypeId="5" PostId="14407" RevisionGUID="92b0e4d0-eaef-497c-8cfe-e34b496ecc52" CreationDate="2011-07-05T22:53:59.863" UserId="8380" Comment="deleted 131 characters in body; edited title" Text="first I’m not programmer, I’ve been using a popular game for some time and I think it would make a great medium for machinima.  Problem is that it’s a top down view startegy game and it doesn’t give control of the camera other than pan map with arrow keys, drag with left mouse and zoom on cursor with mouse wheel.&#xD;&#xA;&#xD;&#xA;I’ve got the demo of Torque 3D and I found the documentation on creating different [camera modes][1] but I don’t want to spend hours to find out in the end that I can’t do it.&#xD;&#xA;&#xD;&#xA;Ideally I’d like a console command to switch between the default camera mode and the machinima one. &#xD;&#xA;The machinima one should focus on the centre of the map OR (toggle) on a selected unit and basically let me rotate the map like a sphere but never get below it or alter its horizontality. (hope you get the picture)&#xD;&#xA;&#xD;&#xA;So can anyone write me the code to add ?&#xD;&#xA;&#xD;&#xA;EDIT:  I just learned that it uses Torque 2D but renders things in 3D. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.garagegames.com/torque-3d/official/index.html?content/documentation/Scripting/Advanced/RTSPrototype.html" />
  <row Id="32557" PostHistoryTypeId="4" PostId="14407" RevisionGUID="92b0e4d0-eaef-497c-8cfe-e34b496ecc52" CreationDate="2011-07-05T22:53:59.863" UserId="8380" Comment="deleted 131 characters in body; edited title" Text="How to create a camera hack for a Torque 2D game ?" />
  <row Id="32558" PostHistoryTypeId="25" PostId="14504" RevisionGUID="db69a1a0-1b81-41a3-aa78-42ec91ff78bf" CreationDate="2011-07-06T00:27:15.867" Comment="http://twitter.com/#!/StackGameDev/status/88403601059360768" />
  <row Id="32559" PostHistoryTypeId="2" PostId="14516" RevisionGUID="e89772b3-38d7-4369-9b90-57ee10ff7114" CreationDate="2011-07-06T00:35:41.677" UserId="8436" Text="Most of the posts on fixed time steps say something like this:&#xD;&#xA;&#xD;&#xA;    State previous;&#xD;&#xA;    State current;&#xD;&#xA;&#xD;&#xA;    while ( !quit )&#xD;&#xA;    {&#xD;&#xA;         double newTime = time();&#xD;&#xA;         double frameTime = newTime - currentTime;&#xD;&#xA;         if ( frameTime &gt; 0.25 )&#xD;&#xA;              frameTime = 0.25;	  // note: max frame time to avoid spiral of death&#xD;&#xA;         currentTime = newTime;&#xD;&#xA;&#xD;&#xA;         accumulator += frameTime;&#xD;&#xA;&#xD;&#xA;         while ( accumulator &gt;= dt )&#xD;&#xA;         {&#xD;&#xA;              previousState = currentState;&#xD;&#xA;              integrate( currentState, t, dt );&#xD;&#xA;              t += dt;&#xD;&#xA;              accumulator -= dt;&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA;         const double alpha = accumulator / dt;&#xD;&#xA;&#xD;&#xA;         State state = currentState*alpha + previousState * ( 1.0 - alpha );&#xD;&#xA;&#xD;&#xA;         render( state );&#xD;&#xA;&#xD;&#xA;How do they calculate and save a State snapshot of the whole world?  do they just make memcpy's or something?  I'm working in Flash and don't have that kind of cloning capability." />
  <row Id="32560" PostHistoryTypeId="1" PostId="14516" RevisionGUID="e89772b3-38d7-4369-9b90-57ee10ff7114" CreationDate="2011-07-06T00:35:41.677" UserId="8436" Text="How to store the state of the world for a fixed time step?" />
  <row Id="32561" PostHistoryTypeId="3" PostId="14516" RevisionGUID="e89772b3-38d7-4369-9b90-57ee10ff7114" CreationDate="2011-07-06T00:35:41.677" UserId="8436" Text="&lt;architecture&gt;&lt;actionscript-3&gt;&lt;gameloop&gt;" />
  <row Id="32562" PostHistoryTypeId="5" PostId="14511" RevisionGUID="d116c195-b610-4da1-b3a3-269b9fa6d628" CreationDate="2011-07-06T02:53:23.870" UserId="5021" Comment="added 543 characters in body" Text="&gt; Google Images is your friend&#xD;&#xA;&#xD;&#xA;No it's not. If you use a texture, you should be sure that you have the rights to use it, or you open yourself up to lawsuits. Most of the images you'll find via a google image search will not be free for use in a game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a texture generation tool:&#xD;&#xA;http://www.filterforge.com/&#xD;&#xA;&#xD;&#xA;You can tweak the settings of every texture, to generate a unique texture for your game. Most textures can create an associated normal map, ambient occlusion map, diffuse map, specular power map, specular exponent map, etc.&#xD;&#xA;&#xD;&#xA;This means that you can generate a rock texture, and then composite the various maps for that texture together to form dynamic specular highlights in your game engine, instead of having a picture of real-life rocks, which may have specular highlights for the particular angle that the camera took the picture from -- this is less convincing in the game world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;A de-facto place to go for textures is http://www.cgtextures.com/&#xD;&#xA;You'll even find textures from CGTextures in AAA games!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;And finally, a good method for getting textures, is to take a picture yourself, and then open your favorite image editing tool and make the image tile.&#xD;&#xA;&#xD;&#xA;In photoshop, you would do this by cropping the image to the portion that you want to tile, and then Filter-&gt;Offset, and choose an offset that is half the width and half the height of the image. Now your image seem is at the horizontal and vertical center of the image. Pull out the healing brush or clone stamp tool, and smooth out the seams. Voila, a tiling texture." />
  <row Id="32563" PostHistoryTypeId="25" PostId="14495" RevisionGUID="5274f685-b4c6-4ee9-a0bc-7e801c9ffc2f" CreationDate="2011-07-06T03:27:16.103" Comment="http://twitter.com/#!/StackGameDev/status/88448901492903936" />
  <row Id="32564" PostHistoryTypeId="2" PostId="14517" RevisionGUID="15ed07ae-7246-4e51-a904-881d65765ece" CreationDate="2011-07-06T03:41:06.800" UserId="8365" Text="I started using a RenderTarget2D in my project so I could use shaders more effectively, but when I went full screen I found that my center viewpoint was no longer centered.  It still resizes correctly, but for widescreen monitors it should center the viewport to the middle of the screen.  And that was working correctly until I started using a RenderTarget2D.  Now, the viewport is being displayed on the left side of the screen instead.&#xD;&#xA;&#xD;&#xA;            if (graphics.IsFullScreen)&#xD;&#xA;            {&#xD;&#xA;                // set the viewport to the whole screen&#xD;&#xA;                GraphicsDevice.Viewport = new Viewport&#xD;&#xA;                {&#xD;&#xA;                    X = 0,&#xD;&#xA;                    Y = 0,&#xD;&#xA;                    Width = GraphicsDevice.PresentationParameters.BackBufferWidth,&#xD;&#xA;                    Height = GraphicsDevice.PresentationParameters.BackBufferHeight,&#xD;&#xA;                    MinDepth = 0,&#xD;&#xA;                    MaxDepth = 1&#xD;&#xA;                };&#xD;&#xA;                &#xD;&#xA;&#xD;&#xA;                // clear whole screen to black&#xD;&#xA;                GraphicsDevice.Clear(Color.Black);&#xD;&#xA;&#xD;&#xA;                // figure out the largest area that fits in this resolution at the desired aspect ratio&#xD;&#xA;                int width = GraphicsDevice.PresentationParameters.BackBufferWidth;&#xD;&#xA;                int height = (int)(width / targetAspectRatio + .5f);&#xD;&#xA;                if (height &gt; GraphicsDevice.PresentationParameters.BackBufferHeight)&#xD;&#xA;                {&#xD;&#xA;                    height = GraphicsDevice.PresentationParameters.BackBufferHeight;&#xD;&#xA;                    width = (int)(height * targetAspectRatio + .5f);&#xD;&#xA;                }&#xD;&#xA;                scale = (float)width / (float)Game1.ScreenWidth;&#xD;&#xA;                // set up the new viewport centered in the backbuffer&#xD;&#xA;                GraphicsDevice.Viewport = new Viewport&#xD;&#xA;                {&#xD;&#xA;                    X = GraphicsDevice.PresentationParameters.BackBufferWidth / 2 - width / 2,&#xD;&#xA;                    Y = GraphicsDevice.PresentationParameters.BackBufferHeight / 2 - height / 2,&#xD;&#xA;                    Width = width,&#xD;&#xA;                    Height = height,&#xD;&#xA;                    MinDepth = 0,&#xD;&#xA;                    MaxDepth = 1&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                GraphicsDevice.Clear(Color.Black);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.SetRenderTarget(rendertarget);&#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    ....Draw All of the Game....&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, brightnessShader, Matrix.CreateScale(scale));&#xD;&#xA;            spriteBatch.Draw(rendertarget, Vector2.Zero, Color.White);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any ideas as to why the viewport is displayed at the left instead of the center?" />
  <row Id="32565" PostHistoryTypeId="1" PostId="14517" RevisionGUID="15ed07ae-7246-4e51-a904-881d65765ece" CreationDate="2011-07-06T03:41:06.800" UserId="8365" Text="Using a Viewpoint and a RenderTarget2D in XNA" />
  <row Id="32566" PostHistoryTypeId="3" PostId="14517" RevisionGUID="15ed07ae-7246-4e51-a904-881d65765ece" CreationDate="2011-07-06T03:41:06.800" UserId="8365" Text="&lt;xna&gt;" />
  <row Id="32567" PostHistoryTypeId="5" PostId="14509" RevisionGUID="004e54ec-3864-4423-827a-60d3aadaf415" CreationDate="2011-07-06T05:24:23.707" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Can anyone recommend any resources for free images that can be used as textures - sky boxes/spheres, dirt, gravel, bark, etc?  As always &lt;a href=&quot;http://images.google.com&quot;&gt;Google Images&lt;/a&gt; is your friend, but it'd be great to have single source.&#xD;&#xA;&#xD;&#xA;Recommendations for texture making/manipulating tools would be appreciated as well.  &lt;a href=&quot;http://www.imagemagick.org/script/index.php&quot;&gt;ImageMagick&lt;/a&gt; and &lt;a href=&quot;http://www.gimp.org/&quot;&gt;Gimp&lt;/a&gt; (especially the &lt;a href=&quot;http://registry.gimp.org/node/69&quot;&gt;normalmap plugin&lt;/a&gt;) are great, but are there other useful tools?&#xD;&#xA;" />
  <row Id="32568" PostHistoryTypeId="10" PostId="14509" RevisionGUID="54b151cc-1c5c-470a-8a68-ab698e8d6198" CreationDate="2011-07-06T05:24:22.863" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32569" PostHistoryTypeId="18" PostId="14509" RevisionGUID="5cec1949-2622-4ac5-a2e6-2d5d0772ad6f" CreationDate="2011-07-06T05:24:57.233" UserId="51" Comment="to http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32570" PostHistoryTypeId="18" PostId="14511" RevisionGUID="5cec1949-2622-4ac5-a2e6-2d5d0772ad6f" CreationDate="2011-07-06T05:24:57.233" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/14509/texture-resources" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32571" PostHistoryTypeId="18" PostId="14513" RevisionGUID="5cec1949-2622-4ac5-a2e6-2d5d0772ad6f" CreationDate="2011-07-06T05:24:57.233" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/14509/texture-resources" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32572" PostHistoryTypeId="18" PostId="14515" RevisionGUID="5cec1949-2622-4ac5-a2e6-2d5d0772ad6f" CreationDate="2011-07-06T05:24:57.233" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/14509/texture-resources" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32573" PostHistoryTypeId="18" PostId="20" RevisionGUID="5cec1949-2622-4ac5-a2e6-2d5d0772ad6f" CreationDate="2011-07-06T05:24:57.233" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/14509/texture-resources" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32574" PostHistoryTypeId="14" PostId="14509" RevisionGUID="d6d2b5c7-32c4-4cae-ad80-eddf60c8494f" CreationDate="2011-07-06T05:24:58.043" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="32575" PostHistoryTypeId="25" PostId="14474" RevisionGUID="a816b512-6798-404c-ae44-f9bab57284e6" CreationDate="2011-07-06T06:27:16.417" Comment="http://twitter.com/#!/StackGameDev/status/88494201557368833" />
  <row Id="32578" PostHistoryTypeId="5" PostId="11840" RevisionGUID="539baed6-431c-4d88-ba18-de0cd16cd492" CreationDate="2011-07-06T07:22:41.867" UserId="4559" Comment="Added link to the awesome game" Text="Let's say I want to make a **really** simple artillery game, something like [Gorillas][1]. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn something.&#xD;&#xA;&#xD;&#xA;I figured out how to simulate gravity and generate simple terrain and how to do some collision detection. But I have no idea how do they mask out the part of the terrain that is hit with a projectile that leaves a hole in form of a circle.&#xD;&#xA;&#xD;&#xA;I tried enabling stencil buffer and put a quad which has a circle texture on it expecting to mask out only the circle part, but it masked out the whole quad -- I mean it was a rectangle shaped hole and not a circle shaped one. Next I thought maybe some blending will do the trick but I didn't figure it out how. Or should I just draw a polygon with many edges to look like a circle and use that instead (with the stencil buffer)? I'm just curious how it is done. Can someone point me in the right direction?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gorillas_%28video_game%29" />
  <row Id="32579" PostHistoryTypeId="6" PostId="11840" RevisionGUID="91ff001e-2b04-4b7b-b502-a08a85851296" CreationDate="2011-07-06T07:32:28.427" UserId="4559" Comment="edited tags" Text="&lt;opengl&gt;&lt;c#&gt;&lt;terrain&gt;&lt;opentk&gt;" />
  <row Id="32580" PostHistoryTypeId="2" PostId="14519" RevisionGUID="956dd551-7d11-447d-8993-f470c86d5d1a" CreationDate="2011-07-06T07:46:41.143" UserId="8050" Text="If you have problems with deep copy, you can store the reference of the current state in previousState, and delegate the creation of a new state in the integration step. This implies that you have the responsibility to destroy the previousState before updating ( you can delegate this to your garbage collector if there is one)&#xD;&#xA;&#xD;&#xA;*Pseudocode*:&#xD;&#xA;&#xD;&#xA;    StateRef previous;&#xD;&#xA;    StateRef current;&#xD;&#xA;    [...]&#xD;&#xA;    current = initState(genericStateSource);&#xD;&#xA;    [...]&#xD;&#xA;        free(previous);&#xD;&#xA;        previous = current;&#xD;&#xA;        current = integrate(current,t,dt);&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;About your code there are some problems:&#xD;&#xA;&#xD;&#xA;First you do not have to store the previous state in each iteration (particularly if it is is expensive): you know exactly how much iterations you will do as soon as you compute *accumulator*.&#xD;&#xA;&#xD;&#xA;There is an error to the while loop: basically you integrate each in each step using a black-box integrator then you do a linear interpolation between last and current state. To make sure that this makes sense the the interpolation has to be done between the last state before and the first state AFTER the point of interest.&#xD;&#xA;&#xD;&#xA;You did:&#xD;&#xA;&#xD;&#xA;    |-----|-----|-----|-----|---- |&#xD;&#xA;                      p   * c&#xD;&#xA;&#xD;&#xA;But you should do:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    |-----|-----|-----|-----|---- |&#xD;&#xA;                            p   * c&#xD;&#xA;&#xD;&#xA;I.e. you have to integrate another step over the end if you have to interpolate: again, you know if is the case as soon as you compute *accumulator*" />
  <row Id="32581" PostHistoryTypeId="2" PostId="14520" RevisionGUID="f886736c-1a0b-49a6-b848-7808980a1d5e" CreationDate="2011-07-06T07:54:59.047" UserId="4559" Text="I ended up using only one texture and I drew holes in it. Circles with 0 alpha values. My original idea was to separate the mask from the terrain somehow but I'm a total noob to opengl, I don't know what can be and can't be done. I used the information from here: http://gamedev.stackexchange.com/questions/6721/implementing-a-2d-destructible-landscape-like-worms and this also helped http://gamedev.stackexchange.com/questions/13202/how-do-i-draw-anti-aliased-holes-in-a-bitmap." />
  <row Id="32582" PostHistoryTypeId="5" PostId="14519" RevisionGUID="957db6ef-f875-4e54-8350-64f449b52788" CreationDate="2011-07-06T07:58:12.693" UserId="8050" Comment="added 460 characters in body" Text="If you have problems with deep copy, you can store the reference of the current state in previousState, and delegate the creation of a new state in the integration step. This implies that you have the responsibility to destroy the previousState before updating ( you can delegate this to your garbage collector if there is one)&#xD;&#xA;&#xD;&#xA;*Pseudocode*:&#xD;&#xA;&#xD;&#xA;    StateRef previous;&#xD;&#xA;    StateRef current;&#xD;&#xA;    [...]&#xD;&#xA;    current = initState(genericStateSource);&#xD;&#xA;    [...]&#xD;&#xA;        free(previous);&#xD;&#xA;        previous = current;&#xD;&#xA;        current = integrate(current,t,dt);&#xD;&#xA;&#xD;&#xA;*Evolution*:&#xD;&#xA;    &#xD;&#xA;    +-----+-----+-----+-----+&#xD;&#xA;    | n+1 | n+2 | n+3 | n+4 |  loop start&#xD;&#xA;    +-----+-----+-----+-----+&#xD;&#xA;                  ^-p   ^-c&#xD;&#xA;&#xD;&#xA;    +-----+-----+-----+-----+&#xD;&#xA;    | n+1 | n+2 | n+3 | n+4 | free n+3; advance p&#xD;&#xA;    +-----+-----+-----+-----+&#xD;&#xA;                       ^-p,c&#xD;&#xA;&#xD;&#xA;    +-----+-----+-----+-----+-----+&#xD;&#xA;    | n+1 | n+2 | n+3 | n+4 | n+5 | integration step&#xD;&#xA;    +-----+-----+-----+-----+-----+&#xD;&#xA;                        ^-p   ^-c&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;About your code there are some problems:&#xD;&#xA;&#xD;&#xA;First you do not have to store the previous state in each iteration (particularly if it is is expensive): you know exactly how much iterations you will do as soon as you compute *accumulator*.&#xD;&#xA;&#xD;&#xA;There is an error to the while loop: basically you integrate each in each step using a black-box integrator then you do a linear interpolation between last and current state. To make sure that this makes sense the the interpolation has to be done between the last state before and the first state AFTER the point of interest.&#xD;&#xA;&#xD;&#xA;You did:&#xD;&#xA;&#xD;&#xA;    |-----|-----|-----|-----|---- |&#xD;&#xA;                      p   ^ c&#xD;&#xA;&#xD;&#xA;But you should do:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    |-----|-----|-----|-----|---- |&#xD;&#xA;                            p   ^ c&#xD;&#xA;&#xD;&#xA;I.e. you have to integrate another step over the end if you have to interpolate: again, you know if is the case as soon as you compute *accumulator*" />
  <row Id="32583" PostHistoryTypeId="2" PostId="14521" RevisionGUID="6cfb6f5b-5d16-42f4-ae17-15d925b651b8" CreationDate="2011-07-06T08:02:47.057" UserId="7275" Text="i am just starting android app development. I was downloading SDK via the Android Manager. I had to select the SDK versions. I have a phone of android 2.1 So i selected only SDK 2.1 and its samples as to download all it takes too much time. If i download the latest SDK 3.X will it be compatible with my mobile?" />
  <row Id="32584" PostHistoryTypeId="1" PostId="14521" RevisionGUID="6cfb6f5b-5d16-42f4-ae17-15d925b651b8" CreationDate="2011-07-06T08:02:47.057" UserId="7275" Text="SDK compatablity question" />
  <row Id="32585" PostHistoryTypeId="3" PostId="14521" RevisionGUID="6cfb6f5b-5d16-42f4-ae17-15d925b651b8" CreationDate="2011-07-06T08:02:47.057" UserId="7275" Text="&lt;android&gt;&lt;sdk&gt;" />
  <row Id="32586" PostHistoryTypeId="2" PostId="14522" RevisionGUID="af208d48-8542-44ac-9c3a-c68bd58f29bc" CreationDate="2011-07-06T08:54:57.410" UserId="4894" Text="By default, if you use the 3.x SDK, earlier phone won't be compatible. But if you need special features from a SDK level (for example Open GL ES 2.0 is only available since 2.2), you can force compatibility in your manifest : &#xD;&#xA;&#xD;&#xA;    &lt;uses-sdk android:minSdkVersion=&quot;7&quot; /&gt;&#xD;&#xA;&#xD;&#xA;You should then detect in your code which version of the OS is used at runtime and change your implementation accordingly : &#xD;&#xA;&#xD;&#xA;    switch (android.os.Build.VERSION.SDK_INT){&#xD;&#xA;        case android.os.Build.VERSION_CODES.ECLAIR : &#xD;&#xA;            // do something&#xD;&#xA;            break;&#xD;&#xA;        case android.os.Build.VERSION_CODES.FROYO: &#xD;&#xA;            // do something else&#xD;&#xA;            break;&#xD;&#xA;        case android.os.Build.VERSION_CODES.HONEYCOMB: &#xD;&#xA;            // do something else&#xD;&#xA;            break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Finnaly, i'd suggest you take a look at the [Target Devices][1] page to choose which version to target (unless again you need a specific feature from the 3.x SDK). &#xD;&#xA;&#xD;&#xA;  [1]: http://developer.android.com/resources/dashboard/platform-versions.html &quot;Target Device&quot;" />
  <row Id="32587" PostHistoryTypeId="25" PostId="14521" RevisionGUID="40bb7f80-7b37-45d9-b0fd-668f2613bd56" CreationDate="2011-07-06T09:27:17.120" Comment="http://twitter.com/#!/StackGameDev/status/88539501814759424" />
  <row Id="32588" PostHistoryTypeId="2" PostId="14523" RevisionGUID="e02b87f1-c334-4f54-9b0c-a5005472cdb6" CreationDate="2011-07-06T09:37:17.530" UserId="7520" Text="I am working on a 2D RTS like game, basic A* works perfectly for moving a unit from point A to point B.&#xD;&#xA;&#xD;&#xA;But now I facing the continuous path-finding problem, like A attack a moving object B, call A* at each frame once Object B's position changed seems inefficient.&#xD;&#xA;&#xD;&#xA;so what is the standard method to this problem?" />
  <row Id="32589" PostHistoryTypeId="1" PostId="14523" RevisionGUID="e02b87f1-c334-4f54-9b0c-a5005472cdb6" CreationDate="2011-07-06T09:37:17.530" UserId="7520" Text="what is the standard solution to pathfinding towards a moving target?" />
  <row Id="32590" PostHistoryTypeId="3" PostId="14523" RevisionGUID="e02b87f1-c334-4f54-9b0c-a5005472cdb6" CreationDate="2011-07-06T09:37:17.530" UserId="7520" Text="&lt;path-finding&gt;" />
  <row Id="32591" PostHistoryTypeId="2" PostId="14524" RevisionGUID="3a7a0b03-2efb-4dd4-8834-d008c784b47c" CreationDate="2011-07-06T09:39:15.563" UserId="8194" Text="Okay, so in LWJGL, how can I render a 2D object (maybe for like a menu, or meter that shows up on screen during the game), and have control over size and position on screen? So I can tell it what position relative to the screen. It is a 3d game using gluPerspective (as opposed to glOrtho)." />
  <row Id="32592" PostHistoryTypeId="1" PostId="14524" RevisionGUID="3a7a0b03-2efb-4dd4-8834-d008c784b47c" CreationDate="2011-07-06T09:39:15.563" UserId="8194" Text="LWJGL Rendering a 2D Object at a Certain Position On-Screen" />
  <row Id="32593" PostHistoryTypeId="3" PostId="14524" RevisionGUID="3a7a0b03-2efb-4dd4-8834-d008c784b47c" CreationDate="2011-07-06T09:39:15.563" UserId="8194" Text="&lt;2d&gt;&lt;3d&gt;&lt;rendering&gt;&lt;lwjgl&gt;&lt;screen&gt;" />
  <row Id="32595" PostHistoryTypeId="2" PostId="14526" RevisionGUID="26eafcc9-bd85-4acd-9662-25f25997ca19" CreationDate="2011-07-06T10:16:32.020" UserId="4200" Text="One option is to only make a new path once every few frames. If you did it once or twice a second rather than 60+ times a second then the user is unlikely to notice unless they are both two very fast moving objects" />
  <row Id="32596" PostHistoryTypeId="2" PostId="14527" RevisionGUID="e0bd0000-1143-4733-a247-594e7be6e958" CreationDate="2011-07-06T10:22:08.270" UserId="4894" Text="From what I know, you could take a look at the D* algorithm which stands for &quot;Dynamic A*&quot;. This algorithm is used to compute pathfinding for dynamic environment, here with a moving target. &#xD;&#xA;&#xD;&#xA;Here's a paper using D* for moving target path finding : [Moving Target D* Lite][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://idm-lab.org/bib/abstracts/papers/aamas10a.pdf" />
  <row Id="32597" PostHistoryTypeId="2" PostId="14528" RevisionGUID="41178a7b-e5d8-40e8-917a-3708d90cc520" CreationDate="2011-07-06T10:40:39.980" UserId="2276" Text="We have several quite heavy game clients completely written in AS3 (some also use Flex for UI). Some clients are built with PureMVC, others are a pile of spaghetti code that's grown over the years. We also have several libraries used by our game clients that are written in AS3/Flex.&#xD;&#xA;&#xD;&#xA;I'm tasked to evaluate the benefits/risk/cost of applying unit-testing to our clients and libraries and decided to give FlexUnit a closer look. I chose [FlexUnit](http://www.flexunit.org/) for a first attempt over [fluint](http://code.google.com/p/fluint/wiki/Introduction) since FlexUnit is definitively able to test pure AS3 projects while I'm not sure about that for fluint.&#xD;&#xA;&#xD;&#xA;Now I'm wondering what some good starting points and best practices are to get unit-testing into previously untested applications.&#xD;&#xA;&#xD;&#xA;So my questions for unit-testing game clients and libraries are:&#xD;&#xA;&#xD;&#xA;* How to get started? What are &quot;low-hanging&quot; (= easily testable) fruits to test with unit-testing?&#xD;&#xA;* What are commonly tested aspects of game clients?&#xD;&#xA;* Can you apply unit-testing to the [BBOY](http://thedailywtf.com/Articles/Enterprise-Dependency-Big-Ball-of-Yarn.aspx) design pattern or do you need to (extensively) refactor the game clients?&#xD;&#xA;* Is it useful (and does it make sense) to test asset loading? If so, how to do it (comparing a binary diff, or comparing hash checksums, or ...)?&#xD;&#xA;* How to test server communication and asynchronous commands?&#xD;&#xA;* How to integrate the whole thing with Hudson/Jenkins CI server and Maven? Are there any reporting tools that can generate overviews of the run tests and report which test failed on which function/class?&#xD;&#xA;&#xD;&#xA;I'm thankful for all pointers about the issue (direct answers, blog posts, forum discussions, how-tos, etc. etc. etc.) since I have little previous practical experience with unit-testing." />
  <row Id="32598" PostHistoryTypeId="1" PostId="14528" RevisionGUID="41178a7b-e5d8-40e8-917a-3708d90cc520" CreationDate="2011-07-06T10:40:39.980" UserId="2276" Text="Best practices for UnitTesting heavy Flash game clients and libraries?" />
  <row Id="32599" PostHistoryTypeId="3" PostId="14528" RevisionGUID="41178a7b-e5d8-40e8-917a-3708d90cc520" CreationDate="2011-07-06T10:40:39.980" UserId="2276" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;unit-testing&gt;" />
  <row Id="32600" PostHistoryTypeId="2" PostId="14529" RevisionGUID="b9bfa859-5038-4134-bf6f-582d8db8a2a8" CreationDate="2011-07-06T10:49:05.683" UserId="1929" Text="Unit testing is hard. Since this is probably your first foray into testing, let me share some points with you from my years of experience:&#xD;&#xA;&#xD;&#xA;- Not everything is testable, nor easy to test, nor worth testing.&#xD;&#xA;- Tests, like code, need to be maintained and updated as the app changes.&#xD;&#xA;- If nobody is running tests, or keeping them up to date, you might as well not test.&#xD;&#xA;&#xD;&#xA;Having said that, the easy, low-hanging fruit are your plain classes -- classes with simple methods and properties. Call methods and verify that the state of your classes are as expected -- that's the easiest unit testing.&#xD;&#xA;&#xD;&#xA;Beyond this, it gets hard. Hudson/Maven integrate, but I'm not sure about with FlexUnit.&#xD;&#xA;&#xD;&#xA;My experience with testing is that over time, you get things done faster because you have a safety net -- you can risk bigger changes because you know if it broke.&#xD;&#xA;&#xD;&#xA;This is probably not the answer you want, but it's good advice-type information that I feel you need to know :)" />
  <row Id="32601" PostHistoryTypeId="2" PostId="14530" RevisionGUID="66fbcff0-7c69-465c-97bf-e7d8c874dc62" CreationDate="2011-07-06T10:57:11.963" UserId="8050" Text="When you have a collision you should try to understand where the collision occurred, the involved forces, the consequences of the involved forces.&#xD;&#xA;&#xD;&#xA;Simplest case (I can tink of):&#xD;&#xA;&#xD;&#xA; - The impact occurs in the frame the collision is detected (no compenetration)&#xD;&#xA; - The colliding objects are perfectly elastic (no energy loss due deformation)&#xD;&#xA; - The colliding object are disks (to be removed as soon as possible)&#xD;&#xA;&#xD;&#xA;Under those circumstances there is conservation of total momentum and kinetic energy.&#xD;&#xA;&#xD;&#xA;When a collision occours, there is a contact surface between the colliding bodies: they can exchange energy only through this surface; in other words the impact forces are always perpendicular to this surface.&#xD;&#xA;&#xD;&#xA;The main conseguence to this is that you can decompone the kinetic energy vector in a radial component (perpendicular to the contact surface) and a tangential component (parallel to the contact surface) seeing that the tangential one stays the same.&#xD;&#xA;&#xD;&#xA;Knowing the value for a component, we can consider the collision be monodimensional, restricted to the radial direction.&#xD;&#xA;&#xD;&#xA;If we consider the second body to be still, we have some formulas for the velocity after the collision:&#xD;&#xA;&#xD;&#xA;![V1 after impact vs V1 before impact][1]&#xD;&#xA;&#xD;&#xA;![V2 after impact vs V1 before impact][2]&#xD;&#xA;&#xD;&#xA;It is possible to compute the velocity after impact knowing the velocity before the impact for the radial coponent we needed. (the kinetic energy is &amp;frac12;&amp;middot;m&amp;middot;v&amp;sup2;).&#xD;&#xA;&#xD;&#xA;You can resolve the case where the second body is moving, by superimpose the collision effects (first-moving-second-still + first-still-second-moving) or by change the inertial reference to be linked to the second body before the impact; it is the same.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;We can spice up the simulation by removing the geometric simplification.&#xD;&#xA;&#xD;&#xA;First you need to compute the contact surface and to find the contat point. (I left the problem to you but you can consider to simplify the contat mode to *colliding boxes*)&#xD;&#xA; &#xD;&#xA;With your contact surface you can compute the resulting kinetic energy vector - as explained before - but then? We have to &quot;allocate&quot; this energy because a rigid body can move and rotate and some energy is required to change linear or angular velocity.&#xD;&#xA;&#xD;&#xA;To know around what point our body will rotate, we need to know the position for the center of mass: this can be precomputed since depends just by the object shape and mass distribution. &#xD;&#xA;&#xD;&#xA;If you have a collision bitmap you can consider to sum up the position for each &quot;on&quot; pixel then divide for how many &quot;on&quot; pixel there are: this implies that the object has the same density in each point. &#xD;&#xA;&#xD;&#xA;If you like you can use a graymap to store the density for each point: black for 0 density (body absence) and white for maximum density; by multiplying the position by the density, you can compute a weighted average: your center of mass&#xD;&#xA;&#xD;&#xA;When you know the center of mass you need to know the moment of inertia: multiply the density of each point by the square of the distance from the center of mass and sum up.&#xD;&#xA;&#xD;&#xA;Knowing the center of mass and the collision point, you can decompose the kinetic energy vector in a radial component (starting from collision point and pointing toward the center of mass) and a tangential component. &#xD;&#xA;&#xD;&#xA;The radial component tells us how many impact enercy becomes kinetic energy, while the tangential component tells us how many impact enercy becomes rotational energy.&#xD;&#xA;&#xD;&#xA;As well as the velocity is bounded to the kinetic energy so **Et = &amp;frac12;mV&amp;sup2;**, also the angular velocity is bounded to the rotational energy so **Er =  &amp;frac12;I&amp;omega;&amp;sup2;**, where I is the moment of inertia and &amp;omega; the rotational velocity in radians per second.&#xD;&#xA;&#xD;&#xA;Using those two formulas you can compute the velocity vector and the angular velocity to add to your body. &#xD;&#xA;  [1]: http://i.stack.imgur.com/BO9sK.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/UmU8Q.png" />
  <row Id="32602" PostHistoryTypeId="2" PostId="14531" RevisionGUID="6e7cff82-953e-47f6-8580-180db73b26f6" CreationDate="2011-07-06T11:36:16.500" UserId="8437" Text="For an action MMO type of game (I assume), you'll want a library that supports synchronization (keeps the players positions' in sync across all the clients and the server). Of course, you'll also want basic messaging features. With this in mind, here are a couple of Java libraries that might work for you. (Links below)&#xD;&#xA;&#xD;&#xA; 1. SpiderMonkey. It's part of jME3, and I'm guessing it's one of the more popular networking libraries for jME. It supports sending and receiving messages, serialization, compression, synchronization via UDP, among other things. Also, it seems to be the standard networking library for jME games these days.&#xD;&#xA; 3. JGN. It's basically like the other libraries, but it's a more developed. It supports synchronization, and a bunch of other features like remote objects, shared objects, and streaming. Although it is no longer being actively developed and it's difficult to get support, it's quite a mature library.&#xD;&#xA; 2. Kryonet. It supports RMI and basic messaging. The only problem with this is that it doesn't support synchronization, so it might be a little bit of a hassle. However, it seems to be quite active, so it might be more robust than the other options.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Just a note: It's probably better to have a server for each zone/map. With only one server JVM supporting the whole game, if anything goes wrong, the whole game will go down. If you have multiple JVMs running each zone/map server, one error won't bring down your entire game.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;- SpiderMonkey: http://jmonkeyengine.org/wiki/doku.php/spidermonkey&#xD;&#xA;- JGN: on google code&#xD;&#xA;- Kryonet: on google code" />
  <row Id="32603" PostHistoryTypeId="5" PostId="14530" RevisionGUID="e1e32a90-ae6b-428b-8aa8-9b7e2f5e5843" CreationDate="2011-07-06T11:39:44.017" UserId="8050" Comment="added 494 characters in body" Text="When you have a collision you should try to understand where the collision occurred, the involved forces, the consequences of the involved forces.&#xD;&#xA;&#xD;&#xA;Simplest case (I can tink of):&#xD;&#xA;&#xD;&#xA; - The impact occurs in the frame the collision is detected (no compenetration)&#xD;&#xA; - The colliding objects are perfectly elastic (no energy loss due deformation)&#xD;&#xA; - The colliding object are disks (to be removed as soon as possible)&#xD;&#xA;&#xD;&#xA;Under those circumstances there is conservation of total momentum and kinetic energy.&#xD;&#xA;&#xD;&#xA;When a collision occours, there is a contact surface between the colliding bodies: they can exchange energy only through this surface; in other words the impact forces are always perpendicular to this surface.&#xD;&#xA;&#xD;&#xA;The main conseguence to this is that you can decompone the kinetic energy vector in a radial component (perpendicular to the contact surface) and a tangential component (parallel to the contact surface) seeing that the tangential one stays the same.&#xD;&#xA;&#xD;&#xA;Knowing the value for a component, we can consider the collision be monodimensional, restricted to the radial direction.&#xD;&#xA;&#xD;&#xA;If we consider the second body to be still, we have some formulas for the velocity after the collision:&#xD;&#xA;&#xD;&#xA;![V1 after impact vs V1 before impact][1]&#xD;&#xA;&#xD;&#xA;![V2 after impact vs V1 before impact][2]&#xD;&#xA;&#xD;&#xA;It is possible to compute the velocity after impact knowing the velocity before the impact for the radial coponent we needed. (the kinetic energy is &amp;frac12;&amp;middot;m&amp;middot;v&amp;sup2;).&#xD;&#xA;&#xD;&#xA;You can resolve the case where the second body is moving, by superimpose the collision effects (first-moving-second-still + first-still-second-moving) or by change the inertial reference to be linked to the second body before the impact; it is the same.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;We can spice up the simulation by removing the geometric simplification.&#xD;&#xA;&#xD;&#xA;First you need to compute the contact surface and to find the contat point. (I left the problem to you but you can consider to simplify the contat mode to *colliding boxes*)&#xD;&#xA; &#xD;&#xA;With your contact surface you can compute the resulting kinetic energy vector - as explained before - but then? We have to &quot;allocate&quot; this energy because a rigid body can move and rotate and some energy is required to change linear or angular velocity.&#xD;&#xA;&#xD;&#xA;To know around what point our body will rotate, we need to know the position for the center of mass: this can be precomputed since depends just by the object shape and mass distribution. &#xD;&#xA;&#xD;&#xA;If you have a collision bitmap you can consider to sum up the position for each &quot;on&quot; pixel then divide for how many &quot;on&quot; pixel there are: this implies that the object has the same density in each point. &#xD;&#xA;&#xD;&#xA;If you like you can use a graymap to store the density for each point: black for 0 density (body absence) and white for maximum density; by multiplying the position by the density, you can compute a weighted average: your center of mass&#xD;&#xA;&#xD;&#xA;When you know the center of mass you need to know the moment of inertia: multiply the density of each point by the square of the distance from the center of mass and sum up.&#xD;&#xA;&#xD;&#xA;Knowing the center of mass and the collision point, you can decompose the kinetic energy vector in a radial component (starting from collision point and pointing toward the center of mass) and a tangential component. &#xD;&#xA;&#xD;&#xA;The radial component tells us how many impact enercy becomes kinetic energy, while the tangential component tells us how many impact enercy becomes rotational energy.&#xD;&#xA;&#xD;&#xA;As well as the velocity is bounded to the kinetic energy so **Et = &amp;frac12;mV&amp;sup2;**, also the angular velocity is bounded to the rotational energy so **Er =  &amp;frac12;I&amp;omega;&amp;sup2;**, where I is the moment of inertia and &amp;omega; the rotational velocity in radians per second.&#xD;&#xA;&#xD;&#xA;Using those two formulas you can compute the velocity vector and the angular velocity to add to your body.&#xD;&#xA;&#xD;&#xA;The last triky part is how to know if &amp;omega; has to be clock/counterclok wise, since you will ever get a positive value.&#xD;&#xA;&#xD;&#xA;Let *I* be the impact point and *M* the center of mass point, compute *d* = *C* - *I*;&#xD;&#xA;&#xD;&#xA;Let *Er* be the tangential component for the impact kinetic energy, compute ![cross product in 2D][3], this will give you a right-handed perpendicular vector. &#xD;&#xA;&#xD;&#xA;Now compute *d*&amp;middot;*E* if positive the rotation is CW else CCW&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/BO9sK.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/UmU8Q.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/7DOhj.gif" />
  <row Id="32604" PostHistoryTypeId="2" PostId="14532" RevisionGUID="d3a18a29-c23f-4a9a-80db-4e3b720b2a6f" CreationDate="2011-07-06T11:42:59.227" UserId="1839" Text="You can render the normal game objects using perspective view, and then when the render func is done with that, switch to orthographic view and render your GUI or whatever it is, this way.&#xD;&#xA;&#xD;&#xA;Using glOrtho you can define your screen going exactly from left 0 to right 1 and the same for bottom and up. Since there is no perspective distortion anymore, those coordinates directly map to screen coordinates then." />
  <row Id="32606" PostHistoryTypeId="17" PostId="14534" RevisionGUID="129dba88-778d-4095-92e1-6172aa777012" CreationDate="2011-07-06T11:45:07.693" UserId="-1" Comment="from http://stackoverflow.com/questions/6586726/cuberealm-opengl-rotation-problems-need-help" Text="" />
  <row Id="32607" PostHistoryTypeId="2" PostId="14534" RevisionGUID="9fe0d3eb-7363-46d3-bb53-42bfd2938f8d" CreationDate="2011-07-05T18:23:59.653" UserDisplayName="Satchmo Brown" Text="The problem is that you can't simply add and subtract values from rotation. These values need to be calculated using math formulas using trigonometry. I was designing a project a while back and needed a camera to move in 3d space. Check out this project and the camera class from it. It will do precisely what you need granted you want to move freely in 3d space with minimal code.&#xD;&#xA;&#xD;&#xA;http://www.paulsprojects.net/opengl/q3bsp/q3bsp.html&#xD;&#xA;&#xD;&#xA;Edit: Here is another more straightforward example with the math involved as well:&#xD;&#xA;http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=Quaternion_Camera_Class&#xD;&#xA;&#xD;&#xA;Nehe's OpenGL tutorials are a fantastic reference for beginners but if you are going to go much further, grab an OpenGL book with current standards/practices." />
  <row Id="32611" PostHistoryTypeId="25" PostId="14523" RevisionGUID="56f4a56e-68af-4c85-ac82-a9379ebe7ce7" CreationDate="2011-07-06T12:27:18.220" Comment="http://twitter.com/#!/StackGameDev/status/88584804412563457" />
  <row Id="32612" PostHistoryTypeId="2" PostId="14535" RevisionGUID="86287957-fb40-4fc8-b1a9-55cea1e3d9f6" CreationDate="2011-07-06T12:50:27.607" UserId="1251" Text="Well, In my flash games, I do have a lot of per-pixel collision detection. Since you have not mentioned your platform I'm assuming you use AS3 since, I code in as3.&#xD;&#xA;Well, even if you are not an Actionscript Developer, You will surely find this library useful. Just call a PixelPerfectCollisionDetection.isColliding() and pass obj1, obj2, stage, and [(true for per-pixel collision detection) or default value of false uses bounding boxes for collision checking]&#xD;&#xA;&#xD;&#xA;[PixelPerfectCollisionDetection][1]&#xD;&#xA;&#xD;&#xA;Hoping, you'd find this useful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/starcontrol-flash/source/browse/trunk/+starcontrol-flash/code/PixelPerfectCollisionDetection.as?r=89" />
  <row Id="32613" PostHistoryTypeId="2" PostId="14536" RevisionGUID="43a24865-29c4-4314-9ee8-9865a5e8ac46" CreationDate="2011-07-06T13:50:55.137" UserId="1742" Text="A agree with Kylotan that there isn't a *standard* method.&#xD;&#xA;&#xD;&#xA;One method I have seen work was to assume the target continues moving in the same direction and change the goal position as you run through your path finding algorithm. This does mean you have to hold two metrics in your A* nodes (cost and time as opposed to just cost).&#xD;&#xA;&#xD;&#xA;To do better than that is very difficult. Unless you actually have knowledge about the unwavering path of the target, you're heading into the land of quite hard AI because you'll have AI's second guessing or simulating the target behaviour in order to guess where they will be and path towards that. This kind of AI is a real-time AB-game from game theory, an area that's not *standard* in any 3D game AI toolkit." />
  <row Id="32614" PostHistoryTypeId="2" PostId="14537" RevisionGUID="ae6316df-da34-4b7e-92b6-7dcf939cc4b2" CreationDate="2011-07-06T14:05:18.917" UserId="8439" Text="First, please excuse me if I speak a bit engrish, that's not my mother language.&#xD;&#xA;&#xD;&#xA;I'm developping a real-time roguelike during my spare time, using python and [libtcod][1], to learn programming (and have some fun). I would like to create some sort of mouse-friendly GUI, just like in [Goblin Camp][2].&#xD;&#xA;&#xD;&#xA;This game is 90% mouse-driven, with menus, scrollbars, buttons etc.&#xD;&#xA;As a total noob with graphical interfaces, I just can't figure out how to do this. Example : how this monster can display its name when my cursor is over it? I tried some ways, which more or less worked, but were always awful, impossible to maintain, hard to scale, and resource-consuming.&#xD;&#xA;&#xD;&#xA;Is there a &quot;simple&quot; way to have something more like an object.OnClick() ?&#xD;&#xA;&#xD;&#xA;  [1]: http://doryen.eptalys.net/libtcod/&#xD;&#xA;  [2]: http://www.goblincamp.com/" />
  <row Id="32615" PostHistoryTypeId="1" PostId="14537" RevisionGUID="ae6316df-da34-4b7e-92b6-7dcf939cc4b2" CreationDate="2011-07-06T14:05:18.917" UserId="8439" Text="Creating an mouse-friendly GUI in a &quot;sort of&quot; Python console mode" />
  <row Id="32616" PostHistoryTypeId="3" PostId="14537" RevisionGUID="ae6316df-da34-4b7e-92b6-7dcf939cc4b2" CreationDate="2011-07-06T14:05:18.917" UserId="8439" Text="&lt;python&gt;" />
  <row Id="32617" PostHistoryTypeId="2" PostId="14538" RevisionGUID="118ede0a-b18a-4c99-afa9-0315919b4e3f" CreationDate="2011-07-06T14:13:25.883" UserId="4911" Text="In the iOS space, there's a great library based on Cocos2D called [SneakyInput][1] to create a virtual Joystick on screen. I was just wondering if there's a (preferably free) library like that for XNA? If not, are there any resources someone can point me to on how to roll my own? It doesn't sound overly complicated, but when I think something &quot;shouldn't be that difficult&quot; I'm usually overlooking smaller details.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.qcmat.com/sneakyinput-joystick-dpad-and-buttons-for-cocos2d/" />
  <row Id="32618" PostHistoryTypeId="1" PostId="14538" RevisionGUID="118ede0a-b18a-4c99-afa9-0315919b4e3f" CreationDate="2011-07-06T14:13:25.883" UserId="4911" Text="Virtual Joystick for Windows Phone 7 (XNA)" />
  <row Id="32619" PostHistoryTypeId="3" PostId="14538" RevisionGUID="118ede0a-b18a-4c99-afa9-0315919b4e3f" CreationDate="2011-07-06T14:13:25.883" UserId="4911" Text="&lt;xna&gt;&lt;windows-phone-7&gt;&lt;joystick&gt;" />
  <row Id="32620" PostHistoryTypeId="4" PostId="14521" RevisionGUID="1f58e1db-9de7-4bf4-a4e1-e693f2b00e96" CreationDate="2011-07-06T14:28:19.210" UserId="5864" Comment="spelling and clarity" Text="Android SDK compatiblity question" />
  <row Id="32621" PostHistoryTypeId="24" PostId="14521" RevisionGUID="1f58e1db-9de7-4bf4-a4e1-e693f2b00e96" CreationDate="2011-07-06T14:28:19.210" Comment="Proposed by 5864 approved by 20 edit id of 542" />
  <row Id="32622" PostHistoryTypeId="2" PostId="14539" RevisionGUID="f2f184c3-447e-4aa8-b9e4-a7f0e5e8ecc4" CreationDate="2011-07-06T14:33:08.280" UserId="5125" Text="You can use the &quot;dog curve&quot; approach which dogs apparently uses when hunting down someone.&#xD;&#xA;They calculate where the impactpoint will be &quot;in the future&quot; and sets of straight to that position.&#xD;&#xA;&#xD;&#xA;A simple approximative way could be something along the lines :&#xD;&#xA;&#xD;&#xA;A = NPC&#xD;&#xA;&#xD;&#xA;B = Target&#xD;&#xA;&#xD;&#xA;T = time to get to B:s position (B:s initial position)&#xD;&#xA;&#xD;&#xA;Calculate where B will be in 'T' time (if B continues at the same speed / angle) and go there instead.&#xD;&#xA;&#xD;&#xA;This is not the perfect way as the distance changes but much simpler than making a perfect solution and much better than just trying to get to 'B'." />
  <row Id="32624" PostHistoryTypeId="2" PostId="14540" RevisionGUID="ad51e11a-8c12-4de1-87d3-8d85ad7681d4" CreationDate="2011-07-06T14:44:54.263" UserId="1198" Text="You may want to see this other question, [here][1] and the link from the answer I accepted, [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5384/making-or-emulating-a-d-pad-on-a-touch-screen-virtual-d-pad&#xD;&#xA;  [2]: http://create.msdn.com/en-US/sample/touchthumbsticks" />
  <row Id="32625" PostHistoryTypeId="2" PostId="14541" RevisionGUID="c44c96de-0fe9-4dff-9415-7128a481e0f8" CreationDate="2011-07-06T15:23:57.960" UserId="8050" Text="If you simply need to do an Object.onSomething() probably you need to write a reactor over a object data model.&#xD;&#xA;&#xD;&#xA;What I mean? Put every relevant objects into a container make this container available to everyone. This container will implement the method&#xD;&#xA;&#xD;&#xA;    def castEvent(self, eventName, args, kargs):&#xD;&#xA;&#xD;&#xA;In this method you iterate the containing object looking for the method &quot;does%s&quot; % eventName.&#xD;&#xA;something like:&#xD;&#xA;&#xD;&#xA;    for item in self.items:&#xD;&#xA;        f = getattr(item, &quot;does%s&quot; % eventName, lambda *x, **k : False)&#xD;&#xA;&#xD;&#xA;if f evaluates True using the parameters passed to the function then you call the &quot;do%s&quot;%eventName with the same parameters:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    for item in self.items:&#xD;&#xA;        f = getattr(item, &quot;does%s&quot; % eventName, lambda *x, **k : False)&#xD;&#xA;        if f(*args, **kargs):&#xD;&#xA;            f = getattr(item, &quot;do%s&quot; % eventName, lambda *x, **k : False)&#xD;&#xA;            f(*args, **kargs)   &#xD;&#xA;&#xD;&#xA;Every time you need to send an event - say *Click* - you simply need to:&#xD;&#xA;&#xD;&#xA;    container.castEvent(&quot;Click&quot;,[],{&quot;x&quot;:10,&quot;y&quot;:20})&#xD;&#xA;&#xD;&#xA;every object interested in Clicks has to provide a &#xD;&#xA;&#xD;&#xA;    def doesClick(self, x, y):&#xD;&#xA;that manage the click events returning False or&#xD;&#xA;&#xD;&#xA;    def doesClick(self, x, y):&#xD;&#xA;    [...]&#xD;&#xA;    def doClick(self, x, y):&#xD;&#xA;&#xD;&#xA;The first returning whether (x,y) hits the object and the second doing the click routine.&#xD;&#xA;&#xD;&#xA;You can implement the first in a generic superclass and let the clickable classes to extend.&#xD;&#xA;&#xD;&#xA;This is a very basic implementation whit a lot of room for improvements." />
  <row Id="32626" PostHistoryTypeId="25" PostId="14537" RevisionGUID="c124c78b-4eaa-434f-9994-f203b9b41f63" CreationDate="2011-07-06T15:27:19.453" Comment="http://twitter.com/#!/StackGameDev/status/88630106184089600" />
  <row Id="32627" PostHistoryTypeId="6" PostId="908" RevisionGUID="e6adca93-deba-443d-847d-27a7452b335a" CreationDate="2011-07-06T16:14:59.960" UserId="8405" Comment="added achievement tag, since it is explicitly mentioned in the subject." Text="&lt;architecture&gt;&lt;achievements&gt;" />
  <row Id="32628" PostHistoryTypeId="24" PostId="908" RevisionGUID="e6adca93-deba-443d-847d-27a7452b335a" CreationDate="2011-07-06T16:14:59.960" Comment="Proposed by 8405 approved by 51 edit id of 541" />
  <row Id="32629" PostHistoryTypeId="5" PostId="14537" RevisionGUID="6802056e-d29a-4817-a05d-3a02e1dc6e76" CreationDate="2011-07-06T16:15:15.870" UserId="3505" Comment="Cleaned up the worst grammar and spelling, removed intro." Text="I'm developing a real-time [rogue][3]-like game during my spare time, using Python and [libtcod][1], to learn programming (and have some fun). I would like to create some sort of mouse-friendly GUI, just like in [Goblin Camp][2].&#xD;&#xA;&#xD;&#xA;This game is 90% mouse-driven, with menus, scrollbars, buttons etc.&#xD;&#xA;As a total noob with graphical interfaces, I just can't figure out how to do this. Example: How to display the name of a monster when the cursor is over it? I tried some ways, which more or less worked, but were always awful, impossible to maintain, hard to scale, and resource-consuming.&#xD;&#xA;&#xD;&#xA;Is there a &quot;simple&quot; way to have something more like an object.OnClick() ?&#xD;&#xA;&#xD;&#xA;  [1]: http://doryen.eptalys.net/libtcod/&#xD;&#xA;  [2]: http://www.goblincamp.com/&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Rogue_(video_game)" />
  <row Id="32630" PostHistoryTypeId="24" PostId="14537" RevisionGUID="6802056e-d29a-4817-a05d-3a02e1dc6e76" CreationDate="2011-07-06T16:15:15.870" Comment="Proposed by 3505 approved by 51 edit id of 543" />
  <row Id="32631" PostHistoryTypeId="4" PostId="14504" RevisionGUID="e5abffe2-9dde-4c15-a14c-2497359f16e2" CreationDate="2011-07-06T16:15:26.307" UserId="4443" Comment="The question is about the file system not active memory so I felt it should be a little more clear is all." Text="Determining the location of installed/on disk game assets " />
  <row Id="32632" PostHistoryTypeId="24" PostId="14504" RevisionGUID="e5abffe2-9dde-4c15-a14c-2497359f16e2" CreationDate="2011-07-06T16:15:26.307" Comment="Proposed by 4443 approved by 51 edit id of 540" />
  <row Id="32633" PostHistoryTypeId="2" PostId="14542" RevisionGUID="8452bb17-d44f-4c3c-89d6-66ee6f81112e" CreationDate="2011-07-06T16:16:34.777" UserId="2978" Text="I'm trying to make a simplified helicopter (for the moment, it's a cube) simulation in 3D and I'm having some problems with rotation. An helicopter can rotate along the three axes :&#xD;&#xA;&#xD;&#xA;- rotate on itself using the rear propeller : y axis rotation&#xD;&#xA;- tilt left and right to go left or right : z axis rotation&#xD;&#xA;- tilt up and down to go backward or forward : x axis rotation&#xD;&#xA;&#xD;&#xA;I need  to be able to control each axis individually. So far I've tried using euler angles, but whatever the order of rotation I use, either I run into a gimbal lock or some axes &quot;switch places&quot;. &#xD;&#xA;&#xD;&#xA;I seems that I need to use quaternions, but I don't know how to control each individual axis, since quaternions uses a direction and an angle. Should I create three quaternions and multiply them together? Wouldn't I end up with the same problems?&#xD;&#xA;&#xD;&#xA;The weird thing is, if I use my finger to represent the three axes of my helicopter (thumb up = y, index = z, middle = x), I don't seems to run into those problems. Why?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32634" PostHistoryTypeId="1" PostId="14542" RevisionGUID="8452bb17-d44f-4c3c-89d6-66ee6f81112e" CreationDate="2011-07-06T16:16:34.777" UserId="2978" Text="Can I use quaternions to control an helicopter?" />
  <row Id="32635" PostHistoryTypeId="3" PostId="14542" RevisionGUID="8452bb17-d44f-4c3c-89d6-66ee6f81112e" CreationDate="2011-07-06T16:16:34.777" UserId="2978" Text="&lt;3d&gt;&lt;rotation&gt;" />
  <row Id="32636" PostHistoryTypeId="2" PostId="14543" RevisionGUID="8c282b7e-3136-4d5b-b9dc-d23a27cce7ae" CreationDate="2011-07-06T16:27:49.070" UserId="8443" Text="The trouble I think you might be seeing is a difference in axis rotation and velocity vectors (and also that you're missing a direction).  When a helicopter tilts forward to move forward, the propulsion of the helicopter blades pushes air both down and backwards at a perpendicular angle to what you've labeled the X axis.&#xD;&#xA;&#xD;&#xA;You have a fourth degree of freedom that you've missed: the speed of the blades controls the volume of air being pushed, which also controls the amount of lift the helicopter generates.&#xD;&#xA;&#xD;&#xA;But even so, your &quot;tilt left and right&quot; and &quot;tilt up and down&quot; generally control the helicopter on a given plane.  That is to say, a helicopter shouldn't fly downward when it tilts forward, backward, or to the side - but the lift amount might have to change and the speed will be controlled by the &quot;opposite&quot; side of the right triangle formed by connecting the helicopter to the ground with a straight line down (gravity), and the hypotenuse (lift).  That should give your velocity vector to use.&#xD;&#xA;&#xD;&#xA;You should be able to use quaternions to do this, but don't base your quaternion values on the tilt of the helicopter itself - try using the forces of motion the helicopter generates instead." />
  <row Id="32637" PostHistoryTypeId="2" PostId="14544" RevisionGUID="5e4e5ad2-2144-4013-a056-9e11bfc8f499" CreationDate="2011-07-06T17:17:50.700" UserId="8427" Text="You should be able to use either a matrix or a quaternion to store the current orientation of your helicopter. The problem you're running into is how you apply change in pitch/yaw/roll to the helicopter.&#xD;&#xA;&#xD;&#xA;I think you want to apply pitch/yaw/roll to the helicopter in local space each frame. You can do this by taking the change in pitch/yaw/roll for that frame and constructing a rotation matrix (you can do this with euler angles). Then you rotate the helicopter's previous orientation by this matrix (with the previous orientation represented either as a matrix or as a quaternion). It will give you the orientation for the new frame.&#xD;&#xA;&#xD;&#xA;Representing the helicopter's orientation as a quaternion has the advantage that interpolating between quaternions is much easier than interpolating between matrices. So if in the future you have a current orientation and you want to figure out the per-frame rotation that will bring you to a new orientation at a desired time, the quaternion representation may be more friendly to you." />
  <row Id="32638" PostHistoryTypeId="2" PostId="14545" RevisionGUID="5f078f2f-d53a-4f7d-928d-deab18a8a37c" CreationDate="2011-07-06T17:22:27.873" UserId="1839" Text="Basically you can use every other representation of rotations, but Euler Angles. Matrices, Quaternions even Axis Angles will do what you want.&#xD;&#xA;&#xD;&#xA;    Should I create three quaternions and multiply them together? Wouldn't I end up with the same problems?&#xD;&#xA;    &#xD;&#xA;You are right, you would end up with the same problems. The key is to store the current orientation (matrix, quaternion) of your object and apply only a _delta_ when changing the orientation. &#xD;&#xA;&#xD;&#xA;When you want to turn 10 degrees around y, just create a _delta_ matrix/quaternion for that and post multiply it with your current orientation (if you use post multiplication for matrices). If you multiply it the other way around, it will rotate the system around world's y-axis rather than around object's y-axis.&#xD;&#xA;&#xD;&#xA;I find [this][1] resource very useful, it also comes with source code and explains the theory very well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.euclideanspace.com/maths/geometry/rotations/" />
  <row Id="32639" PostHistoryTypeId="2" PostId="14546" RevisionGUID="b64d2cd9-54f1-4563-8ecf-cd7fc097b1bc" CreationDate="2011-07-06T17:29:18.710" UserId="8405" Text="Given are a twodimensional space, and 1 friendly spaceship standing still, one foe is moving NOT directly to the friendly ship.&#xD;&#xA;&#xD;&#xA;The friendly ship wants to get itself into firing range to battle the foe.&#xD;&#xA;&#xD;&#xA;Actually I am setting just a direct vector to the actual position moving ship, and recalculate it every frame, resulting in some kind of &quot;round&quot; flightpath.&#xD;&#xA;&#xD;&#xA;What I want is to set a direct path to the position that the foe will (presumably) will have when firing distance will be reached.&#xD;&#xA;&#xD;&#xA;As a first and &quot;simple&quot; implementation it would be enough if we assume the friend can speed up from 0 to max in no time.&#xD;&#xA;&#xD;&#xA;Preffered implemantation would be one that considers the acceleration capabilities of the friend, and knows when interception is impossible because of the speed." />
  <row Id="32640" PostHistoryTypeId="1" PostId="14546" RevisionGUID="b64d2cd9-54f1-4563-8ecf-cd7fc097b1bc" CreationDate="2011-07-06T17:29:18.710" UserId="8405" Text="How to calculate the vector of an interception?" />
  <row Id="32641" PostHistoryTypeId="3" PostId="14546" RevisionGUID="b64d2cd9-54f1-4563-8ecf-cd7fc097b1bc" CreationDate="2011-07-06T17:29:18.710" UserId="8405" Text="&lt;2d&gt;&lt;math&gt;&lt;path-finding&gt;&lt;vector&gt;" />
  <row Id="32642" PostHistoryTypeId="2" PostId="14547" RevisionGUID="12af748b-d42d-45e0-add0-99809378f441" CreationDate="2011-07-06T17:36:02.587" UserId="1101" Text="Generally speaking I would read this pseudocode as a rough overview, and break each bit down into handling all the relevant state piece by piece.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    previousState = currentState&#xD;&#xA;&#xD;&#xA;might become:&#xD;&#xA;&#xD;&#xA;    for each object in world:&#xD;&#xA;        object.previousState = copyOf(objectCurrentState)&#xD;&#xA;&#xD;&#xA;And:&#xD;&#xA;&#xD;&#xA;    state = currentState*alpha + previousState * ( 1.0 - alpha );&#xD;&#xA;&#xD;&#xA;would become:&#xD;&#xA;&#xD;&#xA;    for each object in world:&#xD;&#xA;        renderableState = object.currentState*alpha + object.previousState * ( 1.0 - alpha );&#xD;&#xA;&#xD;&#xA;...and so on.&#xD;&#xA;&#xD;&#xA;Once you're down to the level of an individual object there is usually very little state that you actually need to be able to clone. In a simple game it might just be the position, for example. If your position is a Point, you can [clone()][1] it to get a copy. Or you might just have the value types which you can copy trivially. Either way, when you dig down into the specific state, you usually end up with small pieces that are easy to copy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/Point.html#clone%28%29" />
  <row Id="32643" PostHistoryTypeId="5" PostId="14546" RevisionGUID="87519e77-87e5-400f-8068-05469a2e017d" CreationDate="2011-07-06T17:36:31.637" UserId="8405" Comment="Added some informations about preffered implementation" Text="Given are a twodimensional space, and 1 friendly spaceship standing still, one foe is moving NOT directly to the friendly ship with known actual position, speed and direction.&#xD;&#xA;&#xD;&#xA;The friendly ship wants to get itself into firing range to battle the foe.&#xD;&#xA;&#xD;&#xA;Actually I am setting just a direct vector to the actual position moving ship, and recalculate it every frame, resulting in some kind of &quot;round&quot; flightpath.&#xD;&#xA;&#xD;&#xA;What I want is to set a direct path to the position that the foe will (presumably) will have when firing distance will be reached.&#xD;&#xA;&#xD;&#xA;As a first and &quot;simple&quot; implementation it would be enough if we assume the friend can speed up from 0 to max in no time.&#xD;&#xA;&#xD;&#xA;Preffered implemantation would be one that considers the acceleration capabilities of the friend, and knows when interception is impossible because of the speed. It should work for every starting speed, not only from stand still. A plus would be if it even considers braking (battling at lightspeed is very energy inefficient in the given universe)&#xD;&#xA;&#xD;&#xA;PS: I know, that in case of change of speed or course of the foe every calculation has to be repeated." />
  <row Id="32644" PostHistoryTypeId="2" PostId="14548" RevisionGUID="1d5579ca-a568-4171-bd41-655b97474e27" CreationDate="2011-07-06T17:48:15.727" UserId="20" Text="I suggest you look into steering behaviors. Especially [pursuit][1]. Source-code can be found in the [OpenSteer][2] implementation or look up a book like &quot;[Programming game AI by example][3]&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/PursueEvade.html&#xD;&#xA;  [2]: http://opensteer.sourceforge.net/&#xD;&#xA;  [3]: http://books.google.ch/books?id=gDLpyWtFacYC&amp;lpg=PP1&amp;pg=PP1#v=onepage&amp;q&amp;f=false" />
  <row Id="32645" PostHistoryTypeId="2" PostId="14549" RevisionGUID="b02c9401-e3da-4ae9-bb73-ca1d9bc8d488" CreationDate="2011-07-06T17:50:09.157" UserId="8285" Text="As far as engines, check out the [Corona SDK](http://diy.stackexchange.com). It's really easy to use (Lua) and there are a lot of great resources and tutorials. Though, it isn't free, there is a yearly subscription but it's well worth the price." />
  <row Id="32646" PostHistoryTypeId="25" PostId="14542" RevisionGUID="b0647bbb-5f60-4798-844a-e7e2ff760b61" CreationDate="2011-07-06T18:27:19.690" Comment="http://twitter.com/#!/StackGameDev/status/88675407905308672" />
  <row Id="32647" PostHistoryTypeId="5" PostId="14549" RevisionGUID="ef51350a-4528-4346-bcfd-839de2da46ec" CreationDate="2011-07-06T18:37:15.810" UserId="7888" Comment="Minor grammar corrections; removed incorrect link to DIY StackExchange" Text="As far as engines are concerned, check out the Corona SDK. It's really easy to use (Lua) and there are a lot of great resources and tutorials available. It isn't free, though; there is a yearly subscription, but it's well worth the price." />
  <row Id="32648" PostHistoryTypeId="24" PostId="14549" RevisionGUID="ef51350a-4528-4346-bcfd-839de2da46ec" CreationDate="2011-07-06T18:37:15.810" Comment="Proposed by 7888 approved by 51 edit id of 544" />
  <row Id="32649" PostHistoryTypeId="5" PostId="14300" RevisionGUID="e0114897-b737-44da-ab39-154902606648" CreationDate="2011-07-06T18:37:38.323" UserId="7888" Comment="Corrected grammar; clarified the questions being asked; made the title more specific" Text="I need to write a server for an action game, which needs fast communication with the client. There will only be one server, and I'll split the world in zones. The client will be written in Java using jMonkeyEngine and in my opinion I should write the server in Java as well. I don't want to implement any low-level features such as communication, reliable udp, etc. &#xD;&#xA;&#xD;&#xA;Is Java the most appropriate language to write an action game server which will run on Linux? Is there a Java library which provides a high-level interface for network communication?&#xD;&#xA;" />
  <row Id="32650" PostHistoryTypeId="4" PostId="14300" RevisionGUID="e0114897-b737-44da-ab39-154902606648" CreationDate="2011-07-06T18:37:38.323" UserId="7888" Comment="Corrected grammar; clarified the questions being asked; made the title more specific" Text="What Java library provides a high-level communication interface suitable for use in an action-game server?" />
  <row Id="32651" PostHistoryTypeId="24" PostId="14300" RevisionGUID="e0114897-b737-44da-ab39-154902606648" CreationDate="2011-07-06T18:37:38.323" Comment="Proposed by 7888 approved by 51 edit id of 545" />
  <row Id="32652" PostHistoryTypeId="2" PostId="14550" RevisionGUID="c4b0dc14-d7d7-43b0-8c16-b134878aab81" CreationDate="2011-07-06T18:40:44.263" UserId="1198" Text="There are two types of MMO games. There are real-time games, along the lines of Eve and World of Warcraft, then there is everything else. Farmville, Mafiawars, etc. They both dictate totally different backend architectures.&#xD;&#xA;&#xD;&#xA;For games like Farmville, your standard line-of-business type architecture will really excel, because the way users interact with the data is very similar and the data can easily be stored in a traditional Relational Database System.&#xD;&#xA;&#xD;&#xA;Games that require real-time interaction between hundreds or thousands of players simply cannot be shoehorned into the line-of-business architecture. As @Patrick points out, many of the supporting elements of the game such as logging, authorization and authentication can be handled in a similar fashion to line-of-business applications. The tricky part, is handling &quot;the world.&quot;  This is where there really is no &quot;right way&quot; it all depends on how many players you expect to have, and what type of resources (programming and hardware) you are willing to throw at it.&#xD;&#xA;&#xD;&#xA;I would argue, that you can start with a typical dedicated server setup for an FPS, and optimize from there where you start to see issues.  Probably the first thing to implement is a way to have multiple of these &quot;servers&quot; talking to each other. Obviously you'll want to run this on a beefy physical box with plenty of bandwidth. IMO, the reason that many FPS games keep server size small, is because they know people are going to run it on some old P4 they have lying around and they'll do it on a crappy DLS connection, not because the server software cannot keep track of hundreds of players. Though I'd bet that typical &quot;level size&quot; is also a reason to keep the max players lower on FPS games.&#xD;&#xA;&#xD;&#xA;The reality is that you will not have the same amount of players that World of Warcraft or Eve have overnight, and if you ever do approach those numbers where your architecture startes to show its weaknesses, I always say, that is a great problem to have because it means you're raking in the cash." />
  <row Id="32653" PostHistoryTypeId="5" PostId="14549" RevisionGUID="b91f2b19-3b9f-4f95-b386-51af554dcf88" CreationDate="2011-07-06T18:52:11.723" UserId="8285" Comment="Bad link" Text="As far as engines are concerned, check out the [Corona SDK](http://www.anscamobile.com/corona/) . It's really easy to use (Lua) and there are a lot of great resources and tutorials available. It isn't free, though; there is a yearly subscription, but it's well worth the price." />
  <row Id="32654" PostHistoryTypeId="6" PostId="14466" RevisionGUID="07b4e03c-59d2-4e46-9d81-db3cf3325bbb" CreationDate="2011-07-06T19:17:24.963" UserId="8408" Comment="edited tags" Text="&lt;shaders&gt;&lt;directx11&gt;" />
  <row Id="32655" PostHistoryTypeId="2" PostId="14551" RevisionGUID="a0f62484-6368-4069-aac1-f4a36bb76563" CreationDate="2011-07-06T20:18:27.577" UserId="7640" Text="Sorry for the ackward title, but i don't know what to call it exactly. **I'm looking for code or libraries that allow easy creation of commonly used user input devices, and code/libs that make gaming controls easy to set up (i'm using SFML and Box2D at the moment)** &#xD;&#xA;&#xD;&#xA;I don't want to re-invent things like buttons, arrows being placed wherever the mouse is located, and more game specific items such as &quot;controls settings&quot; or even being able to drag objects around with the mouse.&#xD;&#xA;&#xD;&#xA;More **specifically i want source code for interfaces that....**&#xD;&#xA;&#xD;&#xA; - Makes Buttons and Textboxes easy to create&#xD;&#xA; - allows mouse input to press buttons or drag objects in games&#xD;&#xA; - has &quot;Focuses&quot; (like a textbox being able to gain focus and be typed in)&#xD;&#xA; - Is compatable with SFML/Box2D&#xD;&#xA;&#xD;&#xA;**and code for common game mechanics/controls that....**&#xD;&#xA;&#xD;&#xA; - Allows easy setup of controls for a game&#xD;&#xA; - Makes events like clicking and holding on an object easy to setup, as so objects can be dragged around afterward&#xD;&#xA;&#xD;&#xA;***Are there any simple libraries or resources out there that i can use to avoid spending much of my time coding these now standard input devices/tecniques?*** " />
  <row Id="32656" PostHistoryTypeId="1" PostId="14551" RevisionGUID="a0f62484-6368-4069-aac1-f4a36bb76563" CreationDate="2011-07-06T20:18:27.577" UserId="7640" Text="Common game controls/ User interface libraries or source code?" />
  <row Id="32657" PostHistoryTypeId="3" PostId="14551" RevisionGUID="a0f62484-6368-4069-aac1-f4a36bb76563" CreationDate="2011-07-06T20:18:27.577" UserId="7640" Text="&lt;c++&gt;&lt;libraries&gt;&lt;interface&gt;&lt;control&gt;" />
  <row Id="32658" PostHistoryTypeId="2" PostId="14552" RevisionGUID="cf5b103c-5359-4ecc-ae95-57d1275f8246" CreationDate="2011-07-06T20:38:24.800" UserId="6877" Text="There are literally hundred of them out there. [cegui](http://www.cegui.org.uk/wiki/index.php/Main_Page) is widely adopted. Look into [libagar](http://libagar.org/), [antisphere](http://www.antisphere.com/Wiki/tools:anttweakbar) &amp; [mygui](http://mygui.info/) as well.&#xD;&#xA;&#xD;&#xA;[Turska UI/Framework](http://jet.ro/turska/) has built in support for SDL.&#xD;&#xA;&#xD;&#xA;Have you looked into [this list(SDL Libraries)?](http://www.libsdl.org/libraries.php)&#xD;&#xA;&#xD;&#xA;There are too many to list, but a handful of them continues with regularity." />
  <row Id="32659" PostHistoryTypeId="2" PostId="14553" RevisionGUID="e0872ee7-7f98-4c8f-87eb-b15ac91442f3" CreationDate="2011-07-06T20:40:20.620" UserId="8445" Text="I have several different music ideas for my game BGMs, but I do not have the musical skills nor equipment to make them. The most I can do is beat-box them or make a drum beat had I a drum. Is there a program or some other way to make my music real? &#xD;&#xA;&#xD;&#xA;For instance, I've recently been trying GarageBand's Musical Keyboard to create the music but they don't have the exact beats I'm looking for, like a particular tap of a drum for example. " />
  <row Id="32660" PostHistoryTypeId="1" PostId="14553" RevisionGUID="e0872ee7-7f98-4c8f-87eb-b15ac91442f3" CreationDate="2011-07-06T20:40:20.620" UserId="8445" Text="What can i use to make my unique music ideas real?" />
  <row Id="32661" PostHistoryTypeId="3" PostId="14553" RevisionGUID="e0872ee7-7f98-4c8f-87eb-b15ac91442f3" CreationDate="2011-07-06T20:40:20.620" UserId="8445" Text="&lt;music&gt;" />
  <row Id="32662" PostHistoryTypeId="2" PostId="14554" RevisionGUID="4fa1bbea-ed1e-4da9-8065-b9dbf9e81bcd" CreationDate="2011-07-06T20:41:33.753" UserId="7377" Text="**What would a realistic poly count target range be for NPC and player models in a 3D MMO that will be released in 2 years?**&#xD;&#xA;&#xD;&#xA;*and*&#xD;&#xA;&#xD;&#xA;**What about poly count target range for entire camera view (environment, MPC and player meshes)?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I read in some places that one should not aim too low if the game will come out in a couple years because technology is always advancing. If you can give some mesh poly stats on what other current MMOs / MMORPGs are running and future projections, that would be great. &#xD;&#xA;&#xD;&#xA;Thank you " />
  <row Id="32663" PostHistoryTypeId="1" PostId="14554" RevisionGUID="4fa1bbea-ed1e-4da9-8065-b9dbf9e81bcd" CreationDate="2011-07-06T20:41:33.753" UserId="7377" Text="3D Mesh Polygon Count target range for MMO being released in 2 years" />
  <row Id="32664" PostHistoryTypeId="3" PostId="14554" RevisionGUID="4fa1bbea-ed1e-4da9-8065-b9dbf9e81bcd" CreationDate="2011-07-06T20:41:33.753" UserId="7377" Text="&lt;mmo&gt;&lt;3d-meshes&gt;&lt;polygon&gt;&lt;low-poly&gt;" />
  <row Id="32665" PostHistoryTypeId="2" PostId="14555" RevisionGUID="7a79b7e8-8411-4e50-80cb-956e113efaef" CreationDate="2011-07-06T20:55:29.873" UserId="6877" Text="For MMO due to their nature, wide adoption is a must to survive. They need to have a window which enables them to run on mediocre pc. So, no matter how tech progresses forward, MMO should be always the least to take full advantage of it. And poly count does matter too much, if you can cover this up with your art style or other visual stuff. For example, the average poly count of WOW characters are 500." />
  <row Id="32666" PostHistoryTypeId="2" PostId="14556" RevisionGUID="10f43510-b2bf-4cbf-9bc3-04405b59a6e6" CreationDate="2011-07-06T20:59:50.960" UserId="6877" Text="I am no music guy. But, have you heard of [FL Studio](http://flstudio.image-line.com/) &amp; its free alternate [LMMS - Linux MultiMedia Studio](http://lmms.sourceforge.net/)&#xD;&#xA;&#xD;&#xA;Sorry, dont know much about it. Its better if you talk to musician.&#xD;&#xA;&#xD;&#xA;You can give it a try here [http://music.stackexchange.com](http://music.stackexchange.com)" />
  <row Id="32667" PostHistoryTypeId="2" PostId="14557" RevisionGUID="be549196-dda1-4a37-8e90-06e6fd04a3cc" CreationDate="2011-07-06T21:03:11.817" UserId="8446" Text="Decided to try myself at gamedev, which game engine should i start working with? Or how should I develop my gamedev skills?&#xD;&#xA;&#xD;&#xA;P.S. Have C++ experience&#xD;&#xA;&#xD;&#xA;P.S.S Already started studying OpenGL programming&#xD;&#xA;&#xD;&#xA;P.S.S.S I'm using only linux based distributives." />
  <row Id="32668" PostHistoryTypeId="1" PostId="14557" RevisionGUID="be549196-dda1-4a37-8e90-06e6fd04a3cc" CreationDate="2011-07-06T21:03:11.817" UserId="8446" Text="3D GAME ENGINE FOR BEGGINER. C++" />
  <row Id="32669" PostHistoryTypeId="3" PostId="14557" RevisionGUID="be549196-dda1-4a37-8e90-06e6fd04a3cc" CreationDate="2011-07-06T21:03:11.817" UserId="8446" Text="&lt;c++&gt;&lt;3d-engines&gt;" />
  <row Id="32670" PostHistoryTypeId="5" PostId="14555" RevisionGUID="6c3ff203-ceea-4660-8be1-66cc92e74e8d" CreationDate="2011-07-06T21:05:26.447" UserId="6877" Comment="added 7 characters in body" Text="For MMO due to their nature, wide adoption is a must to survive. They need to have a window which enables them to run on mediocre pc. So, no matter how tech progresses forward, MMO should be always the least to take full advantage of it. And poly count doesn't matter too much, if you can cover this up with your art style and/or other visual stuff. For example, the average poly count of WOW characters are 500." />
  <row Id="32671" PostHistoryTypeId="2" PostId="14558" RevisionGUID="3792969e-1e1d-4ec6-9e99-d4659d08cc49" CreationDate="2011-07-06T21:05:37.277" UserId="4894" Text="A good reference for a wide public is to check the average computer specs around christmas discounts. Also a good option is to have severall levels of details for your game so that you can adapt your graphic performances according to the computer specs. " />
  <row Id="32672" PostHistoryTypeId="2" PostId="14559" RevisionGUID="03c96a65-46a0-42a7-8dea-31f53f258195" CreationDate="2011-07-06T21:13:25.303" UserId="7911" Text="You sound ready to start learning how game development is different from writing other software, with those skills.&#xD;&#xA;&#xD;&#xA;The best advice I see repeated over and over from experienced developers is to **build a game, not an engine**.  What they mean is that starting out you should write games instead of spending all your time writing engines that end up with no game at the end.  Writing engines will come later once you've made a bunch of games.&#xD;&#xA;&#xD;&#xA;Start small (something like Breakout), but build a complete game that's playable from beginning to end!  Then slowly add features to that game and learn new libraries and techniques to make those features work.  Very soon you'll know all about adding middleware to a project, what libraries are available, and your skills get better almost magically.&#xD;&#xA;&#xD;&#xA;Now you can go look at engines and you will be able to decode what they offer and make some sense of why each one was designed differently.  And from here you can build more complex games, maybe with an engine or one you decide to finally write.&#xD;&#xA;" />
  <row Id="32673" PostHistoryTypeId="2" PostId="14560" RevisionGUID="d4c7cb4f-d486-448f-afe1-3e93cc3e5d85" CreationDate="2011-07-06T21:24:20.553" UserId="7328" Text="Panda3D seems to meet all your needs. you can see user comments in [DevMaster](http://www.devmaster.net/engines/engine_details.php?id=95) or check it's [home page](http://www.panda3d.org/)" />
  <row Id="32674" PostHistoryTypeId="2" PostId="14561" RevisionGUID="b492080c-6dcb-44e4-8473-5ea0d7c7fdff" CreationDate="2011-07-06T21:24:33.250" UserId="7911" Text="Focusing on poly count and other rendering minutae is really putting the cart before the horse.  Your question depends entirely on what client engine you're going to use, and so can't be answered.&#xD;&#xA;&#xD;&#xA;Onwards to predicting future hardware platforms.&#xD;&#xA;&#xD;&#xA;Many projects have been sunk by assuming that hardware speeds will always advance.  Look at what happened during the switch we are just now completing from single-core processors to multi-core, raw speed didn't go UP at all and mostly went DOWN on each core...&#xD;&#xA;&#xD;&#xA;You must define your target audience, do you want enthusiast gamers only or a broad population?  There's a great resource here for platform dominance: [the Steam store][1]&#xD;&#xA;&#xD;&#xA;My personal best guess is that if you take a 50% mark from Steam and call that your baseline platform then in two years you'll have a very nice customer base that won't alienate too many on the low end.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://store.steampowered.com/hwsurvey" />
  <row Id="32675" PostHistoryTypeId="25" PostId="14554" RevisionGUID="35159cd8-1c67-45df-bfbb-5c7f7c3f2266" CreationDate="2011-07-06T21:27:20.593" Comment="http://twitter.com/#!/StackGameDev/status/88720708758282242" />
  <row Id="32676" PostHistoryTypeId="2" PostId="14562" RevisionGUID="d6cd57b3-8b12-431a-82b0-5c9de0251c1d" CreationDate="2011-07-06T21:30:24.710" UserId="6877" Text="I started writing a big post, but ended up deleting all of it. I think the best thing is you to look into the following, read the documents and see the feature list. See which suits you best. &#xD;&#xA;&#xD;&#xA;Once I was on a quest to find the best engine for me, but there is not best. All has some strengths and weakness. I am prioritizing them -&#xD;&#xA;&#xD;&#xA;1. [Irrlight](http://irrlicht.sourceforge.net/) ,&#xD;&#xA;[Esenthel](http://www.esenthel.com/) ,&#xD;&#xA;[Leadwerks](http://www.leadwerks.com/werkspace/index.php?/page/products/_/tools/leadwerks-engine-r3) &amp; &#xD;&#xA;[Panda3d](http://www.panda3d.org/)&#xD;&#xA;&#xD;&#xA;2. [C4 Engine](http://www.terathon.com/c4engine/index.php) &amp; [Torque Game Engine](http://www.garagegames.com/products/torque-3d)&#xD;&#xA;&#xD;&#xA;Havn't evauated yet, [3DGameStudio](http://www.3dgamestudio.com/), [DX Studio](http://www.dxstudio.com/)&#xD;&#xA;&#xD;&#xA;[Ogre](http://www.ogre3d.org/) is a rendering engine. To make a game with it you have to work on the additional parts. But, it worth Checking.&#xD;&#xA;&#xD;&#xA;i haven't seen mentioned it anywhere, but apart from documentation its great, [g3d engine](http://g3d.sourceforge.net/)&#xD;&#xA;&#xD;&#xA;But, all of it is just a short list of what is available out there. Go [here, DevMaster 3d Engine List](http://www.devmaster.net/engines/) and see all the engine and their features. *Caution :* many information are old.&#xD;&#xA;&#xD;&#xA;&amp; if you love java, you can always choose [jMonkey Engine 3](http://www.jmonkeyengine.org) &lt; I use it :) Its pipeline is shader based." />
  <row Id="32677" PostHistoryTypeId="2" PostId="14563" RevisionGUID="846d46f4-e9be-48a6-819a-ff71bc0cf9e8" CreationDate="2011-07-06T21:30:39.003" UserId="8395" Text="I'm trying to make a camera that follows my character and it seems I've managed. However, I don't know how to limit that my camera don't follow me when my character reachs the boundaries of the windows (it's ugly see black spaces beyond my tile map x_x). &#xD;&#xA;&#xD;&#xA;So, this is my code:&#xD;&#xA;&#xD;&#xA;    public class Camera {&#xD;&#xA;    	public void update(Vector2f spritePos) {&#xD;&#xA;    		Vector2f pos = new Vector2f(spritePos.getX()-368, spritePos.getY()-268);&#xD;&#xA;    		&#xD;&#xA;    		if((pos.getX()+368 &gt; 368) &amp;&amp; (pos.getY()+268 &gt; 268)) {&#xD;&#xA;    	            glMatrixMode(GL_PROJECTION);&#xD;&#xA;    		    glLoadIdentity();&#xD;&#xA;    		    glOrtho(pos.getX(), &#xD;&#xA;    		    	pos.getX() + Display.getDisplayMode().getWidth(), &#xD;&#xA;    		    	pos.getY() + Display.getDisplayMode().getHeight(), &#xD;&#xA;    		    	pos.getY(), &#xD;&#xA;    		    	-1, &#xD;&#xA;    		    	1);&#xD;&#xA;    		    glMatrixMode(GL_MODELVIEW);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I substract 368 to the X position, because I want to place my character at the center of my camera. Same with 268. This is a bad way to archieve this, because my camera &quot;jumps&quot; roughly to the position of my character &gt;.&lt;U&#xD;&#xA;&#xD;&#xA;Thank you very much." />
  <row Id="32678" PostHistoryTypeId="1" PostId="14563" RevisionGUID="846d46f4-e9be-48a6-819a-ff71bc0cf9e8" CreationDate="2011-07-06T21:30:39.003" UserId="8395" Text="Making a camera in a 2D game (glOrtho)" />
  <row Id="32679" PostHistoryTypeId="3" PostId="14563" RevisionGUID="846d46f4-e9be-48a6-819a-ff71bc0cf9e8" CreationDate="2011-07-06T21:30:39.003" UserId="8395" Text="&lt;opengl&gt;&lt;java&gt;" />
  <row Id="32680" PostHistoryTypeId="5" PostId="14560" RevisionGUID="1f7577f6-1873-4c15-991f-d0ee00a1532c" CreationDate="2011-07-06T21:34:10.200" UserId="7328" Comment="added 194 characters in body" Text="Panda3D seems to meet all your needs. you can see user comments in [DevMaster](http://www.devmaster.net/engines/engine_details.php?id=95) or check it's [home page](http://www.panda3d.org/)&#xD;&#xA;&#xD;&#xA;you can use [these search results](http://www.devmaster.net/engines/list.php?search_id=1b3fbb0e9d9d1cc745d7924cdc0567e4) for more engines (a hint check only those with more than 30 commnets)" />
  <row Id="32681" PostHistoryTypeId="5" PostId="14562" RevisionGUID="04f19f7c-702c-4acf-b81e-91c44056f530" CreationDate="2011-07-06T21:42:44.467" UserId="6877" Comment="No linux" Text="I started writing a big post, but ended up deleting all of it. I think the best thing is you to look into the following, read the documents and see the feature list. See which suits you best. &#xD;&#xA;&#xD;&#xA;Once I was on a quest to find the best engine for me, but there is not best. All has some strengths and weakness. I am prioritizing them -&#xD;&#xA;&#xD;&#xA;1. [Irrlight](http://irrlicht.sourceforge.net/) ,&#xD;&#xA;[Esenthel](http://www.esenthel.com/)(No Linux) ,&#xD;&#xA;[Leadwerks](http://www.leadwerks.com/werkspace/index.php?/page/products/_/tools/leadwerks-engine-r3) (No Linux) &amp; &#xD;&#xA;[Panda3d](http://www.panda3d.org/)&#xD;&#xA;&#xD;&#xA;2. [C4 Engine](http://www.terathon.com/c4engine/index.php) &amp; [Torque Game Engine](http://www.garagegames.com/products/torque-3d)&#xD;&#xA;&#xD;&#xA;Havn't evauated yet, [3DGameStudio](http://www.3dgamestudio.com/), [DX Studio](http://www.dxstudio.com/)&#xD;&#xA;&#xD;&#xA;[Ogre](http://www.ogre3d.org/) is a rendering engine. To make a game with it you have to work on the additional parts. But, it worth Checking.&#xD;&#xA;&#xD;&#xA;i haven't seen mentioned it anywhere, but apart from documentation its great, [g3d engine](http://g3d.sourceforge.net/)&#xD;&#xA;&#xD;&#xA;But, all of it is just a short list of what is available out there. Go [here, DevMaster 3d Engine List](http://www.devmaster.net/engines/) and see all the engine and their features. *Caution :* many information are old.&#xD;&#xA;&#xD;&#xA;&amp; if you love java, you can always choose [jMonkey Engine 3](http://www.jmonkeyengine.org) &lt; I use it :) Its pipeline is shader based.&#xD;&#xA;&#xD;&#xA;**I havn't checked them in a while. They might have drastic change in their feature set. So check them yourself.**" />
  <row Id="32682" PostHistoryTypeId="2" PostId="14564" RevisionGUID="e8cd0fbf-9855-46d2-a2e8-b21abe971ecd" CreationDate="2011-07-06T21:47:36.677" UserId="5019" Text="I think you need something like Ableton Live, it's very easy to get started with and it comes with a massive supply of loops, instruments and effects. &#xD;&#xA;&#xD;&#xA;www.ableton.com&#xD;&#xA;&#xD;&#xA;I'd say http://avp.stackexchange.com/ is a better place to post this question. &#xD;&#xA;Also, there are multitudes of sample packs available, you can utalise these in conjunction with a good sequencer such as Ableton, Logic, Cubase, Reaper, Fruity loops, or even garage band. &#xD;&#xA;&#xD;&#xA;Google &quot;sample packs&quot; along with the genre your interested in, so something like classical strings, Jazz trumpets, hip-hop drums etc..." />
  <row Id="32683" PostHistoryTypeId="5" PostId="14517" RevisionGUID="309e8d21-3e09-45be-aed4-a0a7bad8f6fb" CreationDate="2011-07-06T22:23:20.250" UserId="8365" Comment="added 67 characters in body" Text="I started using a RenderTarget2D in my project so I could use shaders more effectively, but when I went full screen I found that my center viewpoint was no longer centered.  It still resizes correctly, but for widescreen monitors it should center the viewport to the middle of the screen.  And that was working correctly until I started using a RenderTarget2D.  Now, the viewport is being displayed on the left side of the screen instead.&#xD;&#xA;&#xD;&#xA;            if (graphics.IsFullScreen)&#xD;&#xA;            {&#xD;&#xA;                // set the viewport to the whole screen&#xD;&#xA;                GraphicsDevice.Viewport = new Viewport&#xD;&#xA;                {&#xD;&#xA;                    X = 0,&#xD;&#xA;                    Y = 0,&#xD;&#xA;                    Width = GraphicsDevice.PresentationParameters.BackBufferWidth,&#xD;&#xA;                    Height = GraphicsDevice.PresentationParameters.BackBufferHeight,&#xD;&#xA;                    MinDepth = 0,&#xD;&#xA;                    MaxDepth = 1&#xD;&#xA;                };&#xD;&#xA;                &#xD;&#xA;&#xD;&#xA;                // clear whole screen to black&#xD;&#xA;                GraphicsDevice.Clear(Color.Black);&#xD;&#xA;&#xD;&#xA;                // figure out the largest area that fits in this resolution at the desired aspect ratio&#xD;&#xA;                int width = GraphicsDevice.PresentationParameters.BackBufferWidth;&#xD;&#xA;                int height = (int)(width / targetAspectRatio + .5f);&#xD;&#xA;                if (height &gt; GraphicsDevice.PresentationParameters.BackBufferHeight)&#xD;&#xA;                {&#xD;&#xA;                    height = GraphicsDevice.PresentationParameters.BackBufferHeight;&#xD;&#xA;                    width = (int)(height * targetAspectRatio + .5f);&#xD;&#xA;                }&#xD;&#xA;                scale = (float)width / (float)Game1.ScreenWidth;&#xD;&#xA;                // set up the new viewport centered in the backbuffer&#xD;&#xA;                GraphicsDevice.Viewport = new Viewport&#xD;&#xA;                {&#xD;&#xA;                    X = GraphicsDevice.PresentationParameters.BackBufferWidth / 2 - width / 2,&#xD;&#xA;                    Y = GraphicsDevice.PresentationParameters.BackBufferHeight / 2 - height / 2,&#xD;&#xA;                    Width = width,&#xD;&#xA;                    Height = height,&#xD;&#xA;                    MinDepth = 0,&#xD;&#xA;                    MaxDepth = 1&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                GraphicsDevice.Clear(Color.Black);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.SetRenderTarget(rendertarget);&#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    ....Draw All of the Game....&#xD;&#xA;&#xD;&#xA;            GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, brightnessShader, Matrix.CreateScale(scale));&#xD;&#xA;            spriteBatch.Draw(rendertarget, Vector2.Zero, Color.White);&#xD;&#xA;&#xD;&#xA;![The issue...][1]&#xD;&#xA;&#xD;&#xA;Any ideas as to why the viewport is displayed at the left instead of the center?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/jRZfw.jpg" />
  <row Id="32684" PostHistoryTypeId="2" PostId="14565" RevisionGUID="042c0b17-3f8c-4ea9-8908-1e7937694a05" CreationDate="2011-07-06T22:23:20.810" UserId="5899" Text="The problem is the if condition&#xD;&#xA;&#xD;&#xA;    (pos.getX()+368 &gt; 368) is equal to (pos.getX() &gt; 0)  and&#xD;&#xA;    (pos.getY()+268 &gt; 268) is equal to (pos.getY() &gt; 0) &#xD;&#xA;&#xD;&#xA;then the refactored condition can be&#xD;&#xA;&#xD;&#xA;     if( ( pos.getX() &gt; 0 ) &amp;&amp; ( pos.getY() &gt; 0 ) ) &#xD;&#xA;     //that means that the camera is only updated if pos is &gt; that 0,0&#xD;&#xA;&#xD;&#xA;For example, if pos is -2,0 the condition is false and the camera is not updated.&#xD;&#xA;We want that camera follow the character included in this case&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    public void update(Vector2f spritePos) {&#xD;&#xA;	Vector2f pos = new Vector2f(spritePos.getX()-368, spritePos.getY()-268);&#xD;&#xA;&#xD;&#xA;	// new code&#xD;&#xA;	float cameraPosX = 0;&#xD;&#xA;	float cameraPosY = 0;&#xD;&#xA;	&#xD;&#xA;	cameraPosX = ( pos.getX() &lt; 0 ) ? 0 : pos.getX();&#xD;&#xA;	cameraPosY = ( pos.getY() &lt; 0 ) ? 0 : pos.getY();&#xD;&#xA;	//&#xD;&#xA;	&#xD;&#xA;		glMatrixMode(GL_PROJECTION);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;		glOrtho(cameraPosX, &#xD;&#xA;				cameraPosX + Display.getDisplayMode().getWidth(), &#xD;&#xA;				cameraPosY + Display.getDisplayMode().getHeight(), &#xD;&#xA;				cameraPosY, &#xD;&#xA;				-1, &#xD;&#xA;				1);&#xD;&#xA;		glMatrixMode(GL_MODELVIEW);&#xD;&#xA;	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;this code update always update the camera, but clamps the camera position in x and/or y" />
  <row Id="32685" PostHistoryTypeId="5" PostId="14565" RevisionGUID="4964a215-4c93-411c-b079-9f46fa358678" CreationDate="2011-07-06T22:36:26.243" UserId="5899" Comment="deleted 7 characters in body" Text="The problem is the if condition&#xD;&#xA;&#xD;&#xA;    (pos.getX()+368 &gt; 368) is equal to (pos.getX() &gt; 0)  and&#xD;&#xA;    (pos.getY()+268 &gt; 268) is equal to (pos.getY() &gt; 0) &#xD;&#xA;&#xD;&#xA;then the refactored condition can be&#xD;&#xA;&#xD;&#xA;     if( ( pos.getX() &gt; 0 ) &amp;&amp; ( pos.getY() &gt; 0 ) ) &#xD;&#xA;     //that means that the camera is only updated if pos is &gt; that 0,0&#xD;&#xA;&#xD;&#xA;For example, if pos is -2,0 the condition is false and the camera is not updated.&#xD;&#xA;We want that camera follow the character included in this case&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    public void update(Vector2f spritePos) {&#xD;&#xA;	Vector2f pos = new Vector2f(spritePos.getX()-368, spritePos.getY()-268);&#xD;&#xA;&#xD;&#xA;	// new code&#xD;&#xA;	float cameraPosX = 0;&#xD;&#xA;	float cameraPosY = 0;&#xD;&#xA;	&#xD;&#xA;	cameraPosX = ( pos.getX() &lt; 0 ) ? 0 : pos.getX();&#xD;&#xA;	cameraPosY = ( pos.getY() &lt; 0 ) ? 0 : pos.getY();&#xD;&#xA;	//&#xD;&#xA;	&#xD;&#xA;		glMatrixMode(GL_PROJECTION);&#xD;&#xA;		glLoadIdentity();&#xD;&#xA;		glOrtho(cameraPosX, &#xD;&#xA;				cameraPosX + Display.getDisplayMode().getWidth(), &#xD;&#xA;				cameraPosY + Display.getDisplayMode().getHeight(), &#xD;&#xA;				cameraPosY, &#xD;&#xA;				-1, &#xD;&#xA;				1);&#xD;&#xA;		glMatrixMode(GL_MODELVIEW);&#xD;&#xA;	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;this code always update the camera, but clamps the camera position in x and/or y" />
  <row Id="32686" PostHistoryTypeId="2" PostId="14566" RevisionGUID="b864c31e-4d34-4ffb-833d-964d956e0623" CreationDate="2011-07-06T22:46:23.677" UserId="2111" Text="*Note: The actual title of my question does not really reflect my problem but is actually one of the possible solutions to my problem. I couldn't find a proper way to express my question so feel free to propose a different title.*&#xD;&#xA;&#xD;&#xA;So I've recently moved to XNA 4.0 and I'm new to this whole *content project* idea.&#xD;&#xA;I made a simple component based &quot;engine&quot; as a game library that I reuse over all my projects.&#xD;&#xA;&#xD;&#xA;I implemented some basic debugging tools like a frame rate counter which used a `SpriteFont`, which was stored within the actual engine library.&#xD;&#xA;&#xD;&#xA;Now that all the content was moved out of the library with XNA 4.0, I don't know where to put the `SpriteFont` and all other content used by the engine.&#xD;&#xA;&#xD;&#xA;**I'd rather avoid having to include both the content project and the engine library every time I start a new program, but is this my only option?**&#xD;&#xA;&#xD;&#xA;**Or is there a way to include content within a library without resorting to content projects?**" />
  <row Id="32687" PostHistoryTypeId="1" PostId="14566" RevisionGUID="b864c31e-4d34-4ffb-833d-964d956e0623" CreationDate="2011-07-06T22:46:23.677" UserId="2111" Text="XNA 4.0 keeping fonts/sprites without the use of a content project" />
  <row Id="32688" PostHistoryTypeId="3" PostId="14566" RevisionGUID="b864c31e-4d34-4ffb-833d-964d956e0623" CreationDate="2011-07-06T22:46:23.677" UserId="2111" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="32689" PostHistoryTypeId="2" PostId="14567" RevisionGUID="2539d632-3395-4fe4-b230-ba3f84d7db6c" CreationDate="2011-07-06T23:11:15.357" UserId="2469" Text="You need to set the constant buffer on the shader after you've updated it.&#xD;&#xA;After this&#xD;&#xA;&#xD;&#xA;    pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;&#xD;&#xA;you need to call&#xD;&#xA;&#xD;&#xA;    this-&gt;_context-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;&#xD;&#xA;This way you set the values on your struct instance, and then use UpdateSubresource to update the D3D11_BUFFER with the new values, once that's done, you need to send the updated buffer to the GPU with PSSetConstantBuffers (in order to set it onto the pixel shader slot).&#xD;&#xA;&#xD;&#xA;The way you are creating you D3D11_BUFFER looks a little convoluted to me too, this is the way I set up most of my constant buffers:&#xD;&#xA;&#xD;&#xA;    D3D11_BUFFER_DESC bd;&#xD;&#xA;    ZeroMemory(&amp;bd, sizeof(bd));&#xD;&#xA;    bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;    bd.ByteWidth = sizeof(cb_perObject);&#xD;&#xA;    bd.Usage = D3D11_USAGE_DEFAULT;&#xD;&#xA;    if (FAILED(this-&gt;_device-&gt;CreateBuffer(&amp;bd, 0, &amp;this-&gt;_perObjectBuffer)))&#xD;&#xA;        return false;&#xD;&#xA;&#xD;&#xA;and this is how I update it:&#xD;&#xA;&#xD;&#xA;	this-&gt;_perObject.wvp = XMMatrixTranspose(this-&gt;_model.getWorldMatrix() * this-&gt;_camera.getViewMatrix() * this-&gt;_projection);&#xD;&#xA;	this-&gt;_perObject.world = XMMatrixTranspose(this-&gt;_model.getWorldMatrix());&#xD;&#xA;	this-&gt;_context-&gt;UpdateSubresource(this-&gt;_perObjectBuffer, 0, 0, &amp;this-&gt;_perObject, 0, 0);&#xD;&#xA;	this-&gt;_context-&gt;PSSetConstantBuffers(0, 1, &amp;this-&gt;_perObjectBuffer);&#xD;&#xA;&#xD;&#xA;It might not be the best way to do it, but it works for me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The XNAMATH data types such as XMMATRIX are 16 bytes aligned and use [SSE/SSE2][1] instructions (SIMD) and therefore faster than the older D3DXMATRIX. Depending on the alignment you are using, they can be a bit of a pain to work with and you will need to use the XMFLOAT3, XMFLOAT4, XMFLOAT4X3, XMFLOAT4X4 and load/unload them into XMMATRIX/XMVECTOR types.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/SSE2" />
  <row Id="32690" PostHistoryTypeId="2" PostId="14568" RevisionGUID="0959a750-da0e-4521-a36a-40cdb181d83d" CreationDate="2011-07-06T23:15:27.117" UserId="2266" Text="**Background:** I'm having a problem conceptualising something which seems to be pretty fundamental. We have, what I believe to be, a traditional 'game loop', which runs at 60 fps and iterates through each entity calling it's update method (and later on its draw method). Although probably irrelevant, we're developing the game in Objective-C (for iOS / OSX). Currently an 'Entity' can be assigned a 'Controller', and the controller's 'update' method is called every frame. We would like to introduce a state machine for our AI system.&#xD;&#xA;&#xD;&#xA;I understand the concept of having events trigger changes in the current state and we have  a base state object with the following methods (heavily inspired by [Mat Buckland's AI Book][1]); &#xD;&#xA;&#xD;&#xA;    @interface KTBaseState : NSObject {&#xD;&#xA;        -(void)enter;&#xD;&#xA;        -(void)update; &#xD;&#xA;        -(void)exit;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The chapter suggests that the 'enter' method might involve entering a mine, and the execute method involves mining. However, we're developing a real time game, and 'entering a mine' is not an immediate action - it might take a few animation frames showing the guy disappear. Equally, it suggests that, on a state transition you call;&#xD;&#xA;&#xD;&#xA;    [oldState exit];&#xD;&#xA;    [newState enter];&#xD;&#xA;&#xD;&#xA;But I would also envision exiting the mine to take a few frames, after which I guess the 'enter action' of the new state would then be allowed to enter / start (say, putting the bag of gold on his shoulder). When the guy's started walking - it's easy to push him around in the state's update method.&#xD;&#xA;&#xD;&#xA;Any advice on how best to implement these 'actions' that take longer than the state transition would be greatly received. I thought about implementing some kind of action queue, but I'm not sure exactly how that would work...&#xD;&#xA;&#xD;&#xA;1. Some actions would be 'immediately interruptable' (walking -&gt; being hit) but others wouldn't (mining -&gt; walking around). &#xD;&#xA;&#xD;&#xA;2. You could end up with a massive queue of actions - when all the guy needs to do is run away!&#xD;&#xA;&#xD;&#xA;3. In the walking state 'update' method, I would really just want to call &quot;moveTo(destination);&quot; every frame - would you implement this as another 'action', or just push the sprite around the screen? &#xD;&#xA;&#xD;&#xA;Sorry for the long text with no specific list of questions. I'm seeking advice on how to approach this problem and I wanted to make sure I was clear in describing what's not clear in my head!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ai-junkie.com/architecture/state_driven/tut_state2.html &quot;Mat Buckland's AI Book&quot;" />
  <row Id="32691" PostHistoryTypeId="1" PostId="14568" RevisionGUID="0959a750-da0e-4521-a36a-40cdb181d83d" CreationDate="2011-07-06T23:15:27.117" UserId="2266" Text="Integrating an AI state machine with actions that take more than 1 tick" />
  <row Id="32692" PostHistoryTypeId="3" PostId="14568" RevisionGUID="0959a750-da0e-4521-a36a-40cdb181d83d" CreationDate="2011-07-06T23:15:27.117" UserId="2266" Text="&lt;ai&gt;&lt;state&gt;&lt;fsm&gt;&lt;actions&gt;" />
  <row Id="32693" PostHistoryTypeId="2" PostId="14569" RevisionGUID="69ccbb2d-7186-4836-9694-f3cdc338e272" CreationDate="2011-07-06T23:41:09.013" UserId="4443" Text="The basics are there, but I think you want to break them down a little bit more.&#xD;&#xA;&#xD;&#xA;    State - Find Something To Do&#xD;&#xA;     Enter - Nothing&#xD;&#xA;     Execute - Pick something to do from a big list of options weighted however for this AI personality&#xD;&#xA;     Exit - Transition to new state (For this example its 'Enter Mine')&#xD;&#xA;&#xD;&#xA;    State - Enter Mine&#xD;&#xA;     Enter - Start playing an enter animation&#xD;&#xA;     Execute - While animation is playing, wait. If Failure, transition to new state 'Find Something To Do' (To figure out how to react to what happened) else Exit&#xD;&#xA;     Exit - Done playing the enter animation - Transition to new state 'Mining'&#xD;&#xA;&#xD;&#xA;    State - Mining&#xD;&#xA;     Enter - Find something to mine&#xD;&#xA;     Execute - Transition to state 'GoTo', If successful Mine&#xD;&#xA;     Exit - Transition to 'Find Something To Do'&#xD;&#xA;&#xD;&#xA;    State - GoTo&#xD;&#xA;     Enter - Calculate path to location&#xD;&#xA;     Execute - Move towards path, validate path&#xD;&#xA;     Exit - If made it, return successful event, if didnt make it return failure&#xD;&#xA;&#xD;&#xA;Now clearly I could keep breaking this down, and just for reference say the 'Find Something To Do' was at the top of it all and one of the random things it picked to do was go mine something..&#xD;&#xA;&#xD;&#xA;The point is to break enter/execute/exit down to a complete task, whatever it may be, and build up the overall logic that you want.. Also note that when dealing with animations you may want to break out the animation logic from the AI logic. For instance the enter mine state would OnEnter start the animation, OnExecute Check if the animation is running still and if it is done, then go to OnExit which would then look for something to mine.&#xD;&#xA;&#xD;&#xA;I hope this helps.. If not feel free to comment and I will try to tailor this more to what you are trying to understand." />
  <row Id="32694" PostHistoryTypeId="5" PostId="14569" RevisionGUID="8bdbc4be-9af4-4378-885f-1cd579b00f0e" CreationDate="2011-07-06T23:53:29.393" UserId="4443" Comment="added 580 characters in body" Text="The basics are there, but I think you want to break them down a little bit more.&#xD;&#xA;&#xD;&#xA;    State - Find Something To Do&#xD;&#xA;     Enter - Nothing&#xD;&#xA;     Execute - Pick something to do from a big list of options weighted however for this AI personality&#xD;&#xA;     Exit - Transition to new state (For this example its 'Enter Mine')&#xD;&#xA;&#xD;&#xA;    State - Enter Mine&#xD;&#xA;     Enter - Start playing an enter animation&#xD;&#xA;     Execute - While animation is playing, wait. If Failure, transition to new state 'Find Something To Do' (To figure out how to react to what happened) else Exit&#xD;&#xA;     Exit - Done playing the enter animation - Transition to new state 'Mining'&#xD;&#xA;&#xD;&#xA;    State - Mining&#xD;&#xA;     Enter - Find something to mine&#xD;&#xA;     Execute - Transition to state 'GoTo', If successful Mine&#xD;&#xA;     Exit - Transition to 'Find Something To Do'&#xD;&#xA;&#xD;&#xA;    State - GoTo&#xD;&#xA;     Enter - Calculate path to location&#xD;&#xA;     Execute - Move towards path, validate path&#xD;&#xA;     Exit - If made it, return successful event, if didnt make it return failure&#xD;&#xA;&#xD;&#xA;Now clearly I could keep breaking this down, and just for reference say the 'Find Something To Do' was at the top of it all and one of the random things it picked to do was go mine something..&#xD;&#xA;&#xD;&#xA;The point is to break enter/execute/exit down to a complete task, whatever it may be, and build up the overall logic that you want.. Also note that when dealing with animations you may want to break out the animation logic from the AI logic. For instance the enter mine state would OnEnter start the animation, OnExecute Check if the animation is running still and if it is done, then go to OnExit which would then look for something to mine.&#xD;&#xA;&#xD;&#xA;EDIT: To address 2), As with anything that can be in a queue or a stack you are going to want a way to wipe it out. Example would be being attacked. Regardless of what  you were going to do, you will want to survive and react to being attacked in whatever way possible. Generally with a state machine this shouldn't be a problem as you are just moving from state to state, some of which can be interrupted and others that should not be able to. But if you do want to put in a queue or stack of some sort, do include a logical way for wiping it out when the situation arises.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope this helps.. If not feel free to comment and I will try to tailor this more to what you are trying to understand." />
  <row Id="32695" PostHistoryTypeId="2" PostId="14570" RevisionGUID="5c2f5135-a9e7-409f-acff-d25c818c3078" CreationDate="2011-07-06T23:55:52.323" UserId="2683" Text="If you can use the same format that you use to store your levels in, it is a bonus.&#xD;&#xA;&#xD;&#xA;For example, a game like Peggle might have an initial board layout, number of balls, current score (0 for the initial board), etc. Then a saved game can use exactly the same format.&#xD;&#xA;&#xD;&#xA;If you use the same format then the save game and the level load can share code making your job easier!&#xD;&#xA;&#xD;&#xA;For a game with really big map files, the save game can include the map file by reference. The initial level files might do the same thing, even, which makes coming back to that map easier too if for some reason the story has the character come back to the same place, except some of the NPCs are dead and there's dead bodies lying all over." />
  <row Id="32696" PostHistoryTypeId="5" PostId="14547" RevisionGUID="67014a16-7fba-4ce6-a1aa-ffdbc0e6cd9f" CreationDate="2011-07-07T00:21:17.980" UserId="1101" Comment="missed out a dot!" Text="Generally speaking I would read this pseudocode as a rough overview, and break each bit down into handling all the relevant state piece by piece.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    previousState = currentState&#xD;&#xA;&#xD;&#xA;might become:&#xD;&#xA;&#xD;&#xA;    for each object in world:&#xD;&#xA;        object.previousState = copyOf(object.CurrentState)&#xD;&#xA;&#xD;&#xA;And:&#xD;&#xA;&#xD;&#xA;    state = currentState*alpha + previousState * ( 1.0 - alpha );&#xD;&#xA;&#xD;&#xA;would become:&#xD;&#xA;&#xD;&#xA;    for each object in world:&#xD;&#xA;        renderableState = object.currentState*alpha + object.previousState * ( 1.0 - alpha );&#xD;&#xA;&#xD;&#xA;...and so on.&#xD;&#xA;&#xD;&#xA;Once you're down to the level of an individual object there is usually very little state that you actually need to be able to clone. In a simple game it might just be the position, for example. If your position is a Point, you can [clone()][1] it to get a copy. Or you might just have the value types which you can copy trivially. Either way, when you dig down into the specific state, you usually end up with small pieces that are easy to copy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/Point.html#clone%28%29" />
  <row Id="32697" PostHistoryTypeId="25" PostId="14553" RevisionGUID="15c666d4-cdf4-4a33-a98b-fd97f71efed0" CreationDate="2011-07-07T00:27:21.250" Comment="http://twitter.com/#!/StackGameDev/status/88766009145704449" />
  <row Id="32698" PostHistoryTypeId="2" PostId="14571" RevisionGUID="155ab91b-3a92-4dcb-8dbc-9d4590898159" CreationDate="2011-07-07T01:43:09.517" UserId="962" Text="I think adding the solution to each new project is the best and easiest way to accomplish what you want.&#xD;&#xA;&#xD;&#xA;**You can open two projects up at once, and drag the solution from one to another, it takes seconds, and it stays very organized.**" />
  <row Id="32699" PostHistoryTypeId="4" PostId="14557" RevisionGUID="8abc36dd-95be-478a-ba8f-70b7b0d01aa3" CreationDate="2011-07-07T02:52:36.507" UserId="1430" Comment="edited title" Text="3D game engine for a beginner using C++" />
  <row Id="32700" PostHistoryTypeId="2" PostId="14572" RevisionGUID="f33f3fc6-be8c-4848-8d83-e41db831ef8c" CreationDate="2011-07-07T03:06:25.263" UserId="1966" Text="In Blender and other 3D modeling tools, the coordinate system is right-handed, while in Unity 3D and Orbiter Space Flight Simulator, they are left-handed, why this could happen? Why they don't simply use the right-hand coordinate system all the time to make things easier? Why don't all programs that deal with 3D graphics use Z+ as up?&#xD;&#xA;&#xD;&#xA;     Y         |  Z&#xD;&#xA;     ZX        |  YX&#xD;&#xA;    RIGHT-HAND | LEFT-HAND&#xD;&#xA;    TOP VIEW   | TOP VIEW&#xD;&#xA;&#xD;&#xA;(fortunately, Unity3D converts from Blender coordinate system to Unity3D coordinate system)&#xD;&#xA;" />
  <row Id="32701" PostHistoryTypeId="1" PostId="14572" RevisionGUID="f33f3fc6-be8c-4848-8d83-e41db831ef8c" CreationDate="2011-07-07T03:06:25.263" UserId="1966" Text="Left-Hand and Right-Hand Coordinate Systems" />
  <row Id="32702" PostHistoryTypeId="3" PostId="14572" RevisionGUID="f33f3fc6-be8c-4848-8d83-e41db831ef8c" CreationDate="2011-07-07T03:06:25.263" UserId="1966" Text="&lt;unity&gt;&lt;coordinates&gt;&lt;blender&gt;" />
  <row Id="32703" PostHistoryTypeId="2" PostId="14573" RevisionGUID="009430e7-f154-4041-ae9a-f616fa52e114" CreationDate="2011-07-07T03:22:25.093" UserId="1430" Text="Niether left nor right handed conventions are objectively better than the other and similarly, no choice for which axis should be &quot;up&quot; is objectively better than the other. Different applications will have different requirements and for them, one particular choice may be more ideal. But that's not true in general.&#xD;&#xA;&#xD;&#xA;Besides, it is a straightforward operation to convert between coordiante systems." />
  <row Id="32704" PostHistoryTypeId="25" PostId="14563" RevisionGUID="e50d9b18-58cc-45c2-897d-374d0168e154" CreationDate="2011-07-07T03:27:34.090" Comment="http://twitter.com/#!/StackGameDev/status/88811363660599296" />
  <row Id="32705" PostHistoryTypeId="2" PostId="14574" RevisionGUID="9b6a6460-b22f-4063-af8f-f410d0722068" CreationDate="2011-07-07T03:37:56.283" UserId="8452" Text="One way to do dynamic path finding is have the entity predict where the target is going and go there.&#xD;&#xA;&#xD;&#xA;One way of doing this is using a Taylor series.&#xD;&#xA;&#xD;&#xA;I'll call the path of the target over time the function S(t) where S is the position and t is the current time and the approximation to the path is A(f) and f is the date in the future one is approximating.&#xD;&#xA;&#xD;&#xA;Then the simplest and most stupid approximation is A(f)=0.&#xD;&#xA;&#xD;&#xA;The next simplest is A(f)=S(t) where t is the current time and f is the future.&#xD;&#xA;This is predicting the target simply stops in place.&#xD;&#xA;&#xD;&#xA;The third simplest is A(f)=S'(t)*f+S(t) where S' is the derivative of S with respect to time.&#xD;&#xA;This is predicting the target continues on at a constant speed with no acceleration.&#xD;&#xA;&#xD;&#xA;The fourth simplest is A(f)=S''(t)*f^2/2+S'(t)*f+S(t).&#xD;&#xA;This is predicting the target is accelerating at a constant speed like a falling ball.&#xD;&#xA;&#xD;&#xA;I know this can be rephrased in terms of change in time which is probably more convenient for a game.&#xD;&#xA;Now S can be anything. It could be an X coordinate, it could be a Y coordinate, it could be the distance between the objects, it could be an angle.&#xD;&#xA;Also there's probable better methods of predicting the future path of an object so I'd look around a bit." />
  <row Id="32706" PostHistoryTypeId="2" PostId="14575" RevisionGUID="0293a7c7-9654-40d4-8767-6401957f756b" CreationDate="2011-07-07T04:16:44.563" UserId="6877" Text="Simple answer, because *there is no strict rule about following a certain convention*. &#xD;&#xA;&#xD;&#xA;You can even create a new coordinate system for your application. And people, who will be using it, will have to get used to with the new thing. No question." />
  <row Id="32707" PostHistoryTypeId="2" PostId="14576" RevisionGUID="abcd54fd-7cd1-4833-a16c-5f44e0701552" CreationDate="2011-07-07T05:45:51.477" UserId="8454" Text="I'm creating an android game and I want everyone who plays it no matter what size or shape their screen to see the same 480x800 playfield but depending on the resolution of the screen scaled to fit the screen while maintaining correct aspect ratio using letterbox or black bars on the edges of the screen to fill in the gaps on the sides/top/bottom.&#xD;&#xA;&#xD;&#xA;I'm using Canvas to develop my game and the problem I'm running into is I don't know where to start or have any idea of best practices for accomplishing this.&#xD;&#xA;&#xD;&#xA;Could someone enlighten me?" />
  <row Id="32708" PostHistoryTypeId="1" PostId="14576" RevisionGUID="abcd54fd-7cd1-4833-a16c-5f44e0701552" CreationDate="2011-07-07T05:45:51.477" UserId="8454" Text="Android Game Dev: Scaling with letterboxes?" />
  <row Id="32709" PostHistoryTypeId="3" PostId="14576" RevisionGUID="abcd54fd-7cd1-4833-a16c-5f44e0701552" CreationDate="2011-07-07T05:45:51.477" UserId="8454" Text="&lt;game-design&gt;&lt;java&gt;&lt;android&gt;" />
  <row Id="32710" PostHistoryTypeId="25" PostId="14566" RevisionGUID="4c18f2ed-ec86-4453-a9d5-998c770270b9" CreationDate="2011-07-07T06:27:34.593" Comment="http://twitter.com/#!/StackGameDev/status/88856665281142785" />
  <row Id="32711" PostHistoryTypeId="2" PostId="14577" RevisionGUID="35804326-31b5-4632-a616-03f0b0249343" CreationDate="2011-07-07T06:39:57.433" UserId="7328" Text="I've found one other **online** graph tool named [grapholite](https://grapholite.com). it's based on silverlight. It's easy to use and has a very easy to use sharing system (just like the one google docs provide). I think I'm going with this one." />
  <row Id="32712" PostHistoryTypeId="2" PostId="14578" RevisionGUID="285085df-7cb4-48ea-9564-1793fdcaf121" CreationDate="2011-07-07T07:27:56.303" UserId="1588" Text="The world needs a game with beatbox music as a backing track, make it!  (I made my sound effects orally to get started in development faster.)" />
  <row Id="32713" PostHistoryTypeId="25" PostId="14568" RevisionGUID="d938e411-4893-4404-96f5-0545f3e292af" CreationDate="2011-07-07T09:27:34.483" Comment="http://twitter.com/#!/StackGameDev/status/88901963604951040" />
  <row Id="32714" PostHistoryTypeId="2" PostId="14579" RevisionGUID="9fcf12e1-207d-4fe6-bd58-aa952a1ba660" CreationDate="2011-07-07T09:55:54.653" UserId="3988" Text="I'm looking for a good coder's device to experiment with graphics programming. I'm sure a lot of you must have favorites. It'd be a great help if we can compile a list of these devices. &#xD;&#xA;&#xD;&#xA;Just to be clear, I'm interested in devices which are easy to hack. There are good devices like the iPhone, for example, but you can't use a custom WebKit build with it to test WebGL.&#xD;&#xA;&#xD;&#xA;So, what are some good 'coder's mobile device's?" />
  <row Id="32715" PostHistoryTypeId="1" PostId="14579" RevisionGUID="9fcf12e1-207d-4fe6-bd58-aa952a1ba660" CreationDate="2011-07-07T09:55:54.653" UserId="3988" Text="What are some good mobile devices (phones, tablets, etc.) for tinkering?" />
  <row Id="32716" PostHistoryTypeId="3" PostId="14579" RevisionGUID="9fcf12e1-207d-4fe6-bd58-aa952a1ba660" CreationDate="2011-07-07T09:55:54.653" UserId="3988" Text="&lt;graphics-programming&gt;&lt;mobile&gt;" />
  <row Id="32717" PostHistoryTypeId="2" PostId="14580" RevisionGUID="d2713852-939c-483c-ae9b-799938d02c1e" CreationDate="2011-07-07T10:20:42.203" UserId="1386" Text="First calculate your ideal screen ratio: 480 / 800 = 0.6&#xD;&#xA;&#xD;&#xA;Then calculate the ratio of your users screen.&#xD;&#xA;&#xD;&#xA;If the ratio is larger than 0.6 you know your game will have letterboxes at the left and right side of the screen. You would scale the game area by the users screen height/800. &#xD;&#xA;To calculate the horizontal position of the game screen you'd do:&#xD;&#xA;(screen width/2) - (game area width/2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the ratio is less than 0.6 the game will need letterboxes at the top and bottom of the screen. You would scale the game area by the users screen width/480.&#xD;&#xA;To calculate the vertical position of the game screen you'd do:&#xD;&#xA;(screen height/2) - (game area height/2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32718" PostHistoryTypeId="5" PostId="14580" RevisionGUID="94014718-54fa-4c95-b008-07b66bc50e0c" CreationDate="2011-07-07T10:30:14.363" UserId="1386" Comment="Added practical example" Text="First calculate your ideal screen ratio: 480 / 800 = 0.6&#xD;&#xA;&#xD;&#xA;Then calculate the ratio of your users screen.&#xD;&#xA;&#xD;&#xA;If the ratio is larger than 0.6 you know your game will have space to the left and right side of the game area. You would scale the game area by the users screen height/800. &#xD;&#xA;To calculate the horizontal position of the game area you'd do:&#xD;&#xA;(screen width/2) - (game area width/2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the ratio is less than 0.6 the game will have space at the top and bottom of the game area. You would scale the game area by the users screen width/480.&#xD;&#xA;To calculate the vertical position of the game area you'd do:&#xD;&#xA;(screen height/2) - (game area height/2)&#xD;&#xA;&#xD;&#xA;**Practical Example**&#xD;&#xA;&#xD;&#xA;The Users device is 3000X1600. This gives a ratio of 1.875, which greater than 0.6 so space will be to the left and right of the game area.&#xD;&#xA;The scaling factor will be 1600 / 800 = 2.&#xD;&#xA;The horizontal position of the game area will be: (3000/2) - (960 /2 ) = 1020&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32719" PostHistoryTypeId="5" PostId="14580" RevisionGUID="1144273c-cf98-4451-b464-6b0b5c9352eb" CreationDate="2011-07-07T10:36:10.413" UserId="1386" Comment="deleted 1 characters in body" Text="First calculate your ideal screen ratio: 480 / 800 = 0.6&#xD;&#xA;&#xD;&#xA;Then calculate the ratio of your users screen.&#xD;&#xA;&#xD;&#xA;If the ratio is larger than 0.6 you know your game will have space to the left and right side of the game area. You would scale the game area by the users screen height/800. &#xD;&#xA;To calculate the horizontal position of the game area you'd do:&#xD;&#xA;(screen width/2) - (game area width/2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the ratio is less than 0.6 the game will have space at the top and bottom of the game area. You would scale the game area by the users screen width/480.&#xD;&#xA;To calculate the vertical position of the game area you'd do:&#xD;&#xA;(screen height/2) - (game area height/2)&#xD;&#xA;&#xD;&#xA;**Practical Example**&#xD;&#xA;&#xD;&#xA;The Users device is 3000X1600. This gives a ratio of 1.875, which greater than 0.6 so space will be to the left and right of the game area.&#xD;&#xA;The scaling factor will be 1600 / 800 = 2.&#xD;&#xA;The horizontal position of the game area will be: (3000/2) - (960 /2) = 1020&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32720" PostHistoryTypeId="5" PostId="14580" RevisionGUID="44a626df-8572-4b99-8253-dad0a78a5613" CreationDate="2011-07-07T10:45:00.513" UserId="1386" Comment="added header" Text="**Math**&#xD;&#xA;&#xD;&#xA;First calculate your ideal screen ratio: 480 / 800 = 0.6&#xD;&#xA;&#xD;&#xA;Then calculate the ratio of your users screen.&#xD;&#xA;&#xD;&#xA;If the ratio is larger than 0.6 you know your game will have space to the left and right side of the game area. You would scale the game area by the users screen height/800. &#xD;&#xA;To calculate the horizontal position of the game area you'd do:&#xD;&#xA;(screen width/2) - (game area width/2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the ratio is less than 0.6 the game will have space at the top and bottom of the game area. You would scale the game area by the users screen width/480.&#xD;&#xA;To calculate the vertical position of the game area you'd do:&#xD;&#xA;(screen height/2) - (game area height/2)&#xD;&#xA;&#xD;&#xA;**Practical Example**&#xD;&#xA;&#xD;&#xA;The Users screen resolution is 3000X1600. This gives a ratio of 1.875, which is greater than 0.6 so space will be to the left and right of the game area.&#xD;&#xA;The scaling factor will be 1600 / 800 = 2.&#xD;&#xA;The horizontal position of the game area will be: (3000/2) - (960 /2) = 1020&#xD;&#xA;&#xD;&#xA;**Android Specifics**&#xD;&#xA;&#xD;&#xA;To position and scale the game area, you can apply a matrix to offset your drawing operations (Canvas.setMatrix). Another approach would be to draw your game screen into a 480x800 bitmap and then scale it afterwards, using Bitmap.createScaledBitmap or Canvas.drawBitmap.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32721" PostHistoryTypeId="2" PostId="14581" RevisionGUID="e44182ea-b6ac-4d1b-819d-a904931c7df1" CreationDate="2011-07-07T10:49:27.530" UserId="4894" Text="My best guess would be to look into the Android system : the OS is open source, and lot's of custom ROM are available online. You can also find a lot of Open Source application (including the default browser based on WebKit). &#xD;&#xA;&#xD;&#xA;Then if you choose Android, be carefull of which hardware you choose as some manufacturer / carrier make their custom OS fork with limitations (which won't be a problem if you install a custom ROM). My first choice would go to the &quot;official&quot; [Google phone][1]&#xD;&#xA;&#xD;&#xA;[1]: http://android.brightstarcorp.com/index.htm" />
  <row Id="32722" PostHistoryTypeId="2" PostId="14582" RevisionGUID="7baf43c6-4643-48dd-904a-b1dbab276968" CreationDate="2011-07-07T12:05:32.420" UserId="1923" Text="If I understand your question, you do not want the ship to steer to the target, but rather to fly in a straight line that happens to intercept the target. I'm  making a tower defense game that basically has the same need for a tower's bullet, a tower wants to fire a gun such that the bullet will intercept a moving target as long as it doesn't change speed/direction. The way I solved it was by using a quadratic equation. Here is some pseudo code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Vector totarget =  target.position - tower.position;&#xD;&#xA;    &#xD;&#xA;    float a = Vector.Dot(target.velocity, target.velocity) - (bullet.velocity * bullet.velocity);&#xD;&#xA;    float b = 2 * Vector.Dot(target.velocity, totarget);&#xD;&#xA;    float c = Vector.Dot(totarget, totarget);&#xD;&#xA;    &#xD;&#xA;    float p = -b / (2 * a);&#xD;&#xA;    float q = (float)Math.Sqrt((b * b) - 4 * a * c) / (2 * a);&#xD;&#xA;    &#xD;&#xA;    float t1 = p - q;&#xD;&#xA;    float t2 = p + q;&#xD;&#xA;    float t;&#xD;&#xA;    &#xD;&#xA;    if (t1 &gt; t2 &amp;&amp; t2 &gt; 0)&#xD;&#xA;    {&#xD;&#xA;        t = t2;&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        t = t1;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Vector aimSpot = target.position + target.velocity * t;&#xD;&#xA;    Vector bulletPath = aimSpot - tower.position;&#xD;&#xA;    float timeToImpact = bulletPath.Length() / bullet.speed;//speed must be in units per second&#xD;&#xA;&#xD;&#xA;I found this to work so well I did not need collision detection for the shot... I was able to count on every shot hitting a bulls eye regardless of distance/direction/speed of target as long as those factors remained steady.&#xD;&#xA;" />
  <row Id="32723" PostHistoryTypeId="25" PostId="14546" RevisionGUID="84c487d4-15d2-4254-98d1-a78116b55ced" CreationDate="2011-07-07T12:27:34.547" Comment="http://twitter.com/#!/StackGameDev/status/88947262352404480" />
  <row Id="32724" PostHistoryTypeId="2" PostId="14583" RevisionGUID="8831e403-5e4a-49f5-bded-28f4f514709b" CreationDate="2011-07-07T12:39:06.940" UserId="214" Text="If the terrain is reasonably open and the target isn't too far from the pursuer, then you could use the intercept steering behavior. Essentially, you take the position and velocity of the target to calculate a position out in front of the target that isn't too far, and not too close, and you steer the pursuer towards that point (calculated each at regular intervals). " />
  <row Id="32725" PostHistoryTypeId="5" PostId="14548" RevisionGUID="c34d3215-d0d2-4692-833d-8d46d75d498c" CreationDate="2011-07-07T12:41:00.847" UserId="8405" Comment="added ISBN, this would make searching the full book easier for not german speaking persons." Text="I suggest you look into steering behaviors. Especially [pursuit][1]. Source-code can be found in the [OpenSteer][2] implementation or look up a book like &quot;[Programming game AI by example][3]&quot; (ISBN 13: 978-1556220784)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/PursueEvade.html&#xD;&#xA;  [2]: http://opensteer.sourceforge.net/&#xD;&#xA;  [3]: http://books.google.ch/books?id=gDLpyWtFacYC&amp;lpg=PP1&amp;pg=PP1#v=onepage&amp;q&amp;f=false" />
  <row Id="32726" PostHistoryTypeId="24" PostId="14548" RevisionGUID="c34d3215-d0d2-4692-833d-8d46d75d498c" CreationDate="2011-07-07T12:41:00.847" Comment="Proposed by 8405 approved by 20 edit id of 547" />
  <row Id="32727" PostHistoryTypeId="2" PostId="14584" RevisionGUID="8b407886-c38f-4834-9dc3-0db4812f02f0" CreationDate="2011-07-07T13:54:49.057" UserId="8459" Text="I noticed that many social games have the concept of &quot;timeouts&quot;. In farm games etc. it obviously makes sense (stuff grows, etc.). But I also noticed that angry birds introduced this as well. Individual angry bird games are pretty much stateless, so it doesn't seem to make a lot of sense at first glance (and some users are upset because of this).&#xD;&#xA;&#xD;&#xA;What is the purpose of this? Does it bring more money somehow? Does it help retaining the users? Is this a new concept? Does it have any other applications, particularly in non-game realms?" />
  <row Id="32728" PostHistoryTypeId="1" PostId="14584" RevisionGUID="8b407886-c38f-4834-9dc3-0db4812f02f0" CreationDate="2011-07-07T13:54:49.057" UserId="8459" Text="Why do many games have “timeouts”?" />
  <row Id="32729" PostHistoryTypeId="3" PostId="14584" RevisionGUID="8b407886-c38f-4834-9dc3-0db4812f02f0" CreationDate="2011-07-07T13:54:49.057" UserId="8459" Text="&lt;social&gt;" />
  <row Id="32730" PostHistoryTypeId="2" PostId="14585" RevisionGUID="ca87c818-abe9-48c2-af97-8231cd1a8a3b" CreationDate="2011-07-07T15:02:32.280" UserId="1430" Text="One possibile explaination is to encourage players to return to the game later, presumably because it can produce more ad revenue (for ad-supported games, possibly depending on the terms of the ad contract), increased mindshare, or a more diverse social population. The latter is especially important for games with a strong social component.&#xD;&#xA;&#xD;&#xA;Another explaination is to keep people *away* from the game. Some countries have laws that involve limiting (or penalizing) a player in certain scenarios if they play for too long. Some games don't want to allow players with vastly more time available to have such an unfair advantage over those with a more casual block of time (this is what the [FF 14 developers claimed as the reason the game limits XP gain after eight hours of play][1], for example).&#xD;&#xA;&#xD;&#xA;I'm not too familiar with Angry Birds but it doesn't sound like either of these reasons would really apply to it, so I'm afraid I can't help you there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.eurogamer.net/articles/2010-08-26-ffxiv-limits-xp-earning-after-eight-hours" />
  <row Id="32731" PostHistoryTypeId="5" PostId="14546" RevisionGUID="adb209ac-d6f5-49c1-953b-401ac9b6b17e" CreationDate="2011-07-07T15:07:14.963" UserId="8405" Comment="deleted 39 characters in body" Text="Given are a twodimensional space, and 1 friendly spaceship standing still, one foe is moving NOT directly to the friendly ship with known actual position, speed and direction.&#xD;&#xA;&#xD;&#xA;The friendly ship wants to get itself into firing range to battle the foe.&#xD;&#xA;&#xD;&#xA;Actually I am setting just a direct vector to the actual position moving ship, and recalculate it every frame, resulting in some kind of &quot;round&quot; flightpath.&#xD;&#xA;&#xD;&#xA;What I want is to set a direct and straight path to the position that the foe will (presumably) will have when firing distance will be reached, assuming that foe will not change course until then. &#xD;&#xA;&#xD;&#xA;As a first and &quot;simple&quot; implementation it would be enough if we assume the friend can speed up from 0 to max in no time.&#xD;&#xA;&#xD;&#xA;Preffered implemantation would be one that considers the acceleration capabilities of the friend, and knows when interception is impossible because of the speed. It should work for every starting speed, not only from stand still. A plus would be if it even considers braking (battling at lightspeed is very energy inefficient in the given universe)" />
  <row Id="32732" PostHistoryTypeId="25" PostId="14584" RevisionGUID="22a09484-617b-46e4-abcb-f74775b35b3f" CreationDate="2011-07-07T15:27:34.710" Comment="http://twitter.com/#!/StackGameDev/status/88992559963176962" />
  <row Id="32733" PostHistoryTypeId="2" PostId="14586" RevisionGUID="bf266d36-d091-4577-a046-37ba1c98993e" CreationDate="2011-07-07T15:30:01.310" UserId="6558" Text="There's a lot of questions here, I'll try to answer as many as I can to the best of my ability.&#xD;&#xA;&#xD;&#xA;**First**: Is this a new concept?  No.  A lot of web games use &quot;timeouts&quot; in the form of terms, action points, or limiting the total amount of actions a player can do at once to a low number.  This was true 13 years ago with the online game [Utopia][1], and is still true in many web games today, where you get x action points per hour, and different things cost different amounts of points.  This mechanic is used in board games and card games, as well, though it's usually along the lines of &quot;you can play X cards on your turn&quot;, and is usually a way to keep the game moving.&#xD;&#xA;&#xD;&#xA;**Second**: What's the purpose of this? In most online games, the purpose, as Josh pointed out in his answer, is usually to balance players, and prevent someone from having an advantage just because they have more time.  If one player can dominate because they can spend 20 hours a day in the game, then no one else can have a chance at winning (or having fun).  There are other reasons though.  It can spread the content of the game out, so players don't reach the end in a few hours (this is especially useful in MMOs, where games tend to launch without much content).  In the case of web games, it can decrease bandwidth usage (bandwidth is no longer an issue, but it was a concern in the early days of the web, and that's probably part of the reason for the convention).  Josh also mentions laws in some countries to prevent extended play sessions, as well as encouraging players to return to the game later.  These are both valid points.&#xD;&#xA;&#xD;&#xA;**Third (and forth)**: Does it bring in money or help retain users?  It can.  The quote &quot;Leave them wanting more&quot; comes to mind.  Forcing users to stop playing will *hopefully* make them want to come back, or at least give them a reason to participate in the &quot;community&quot; side of games (&quot;I've used up all my points for today, let's read the forums for a bit and talk about the game&quot;).  It can also be a source of income.  &quot;Buy 100 action points for $10&quot;  Of course, this can upset the game balance by letting the rich people with free time dominate.&#xD;&#xA;&#xD;&#xA;**Finally**: Does it have other applications?  Hard to say.  TV shows have been doing this sort of thing for years (soap operas excel at it), and TV took the idea from radio dramas (&quot;Tune in next time to see if our hero escapes!&quot;).  Prior to that, books were often published in serial format, including Charles Dicken's novels. The wiki article about [serial literature][2] includes other examples.  How to apply this idea to something that isn't entertainment is an exercise I'll leave to you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://utopia-game.com/shared/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Serial_%28literature%29" />
  <row Id="32734" PostHistoryTypeId="2" PostId="14587" RevisionGUID="d8b1f3de-d207-4280-84e6-52c14e5704a0" CreationDate="2011-07-07T15:35:31.087" UserId="8461" Text="When I Render 5 boxes in webgl with 1 texture all of them, the app runs at 60 fps, nice.&#xD;&#xA;But when I render 70 boxes the performance dicrease to ~40fps but in the view volumes&#xD;&#xA;are still 5.&#xD;&#xA;&#xD;&#xA;I have debugged the app and all 70 boxes are using per fragment shaders when there are no need because 65 of them are out of frustum. I thought that gl.viewport declaration clipped out of view polygons but not.&#xD;&#xA;&#xD;&#xA;I would like to know if fustrum culling the technique to avoid this? How can I activate fustrum culling? Is there any webgl command or I have to do it manually? &#xD;&#xA;&#xD;&#xA;Thanks in advance," />
  <row Id="32735" PostHistoryTypeId="1" PostId="14587" RevisionGUID="d8b1f3de-d207-4280-84e6-52c14e5704a0" CreationDate="2011-07-07T15:35:31.087" UserId="8461" Text="Webgl Frustum view doubt" />
  <row Id="32736" PostHistoryTypeId="3" PostId="14587" RevisionGUID="d8b1f3de-d207-4280-84e6-52c14e5704a0" CreationDate="2011-07-07T15:35:31.087" UserId="8461" Text="&lt;webgl&gt;&lt;frustum&gt;" />
  <row Id="32737" PostHistoryTypeId="5" PostId="14466" RevisionGUID="1648bb8d-c184-47dd-b13a-451a7fbbcd18" CreationDate="2011-07-07T15:55:47.390" UserId="8408" Comment="deleted 5 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth paremeters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/" />
  <row Id="32738" PostHistoryTypeId="2" PostId="14588" RevisionGUID="750ab151-f8e0-4e8f-ac5d-4898ed8b80fc" CreationDate="2011-07-07T15:56:00.440" UserId="1430" Text="Remember that FPS is not a great metric for performance: it's not a linear measure. 60 FPS is ~0.016 seconds per frame, whereas 40 FPS is 0.025 seconds per frame. That's a different of only 0.009 seconds for *fourteen times* as much render throughput. Timing rendering (which executes on the GPU) is not as straightforward as timing CPU operations. See [this guide][1], which covers D3D specifically, but explores some concept that will apply to GL as well.&#xD;&#xA;&#xD;&#xA;60 FPS for almost no objects sounds like you have v-sync enabled. In that scenario, you don't need too much more stuff to be rendered before you can hit a threshold where you have to block for a while waiting for the (modern equivalent of the) vertical blank interrupt before you can continue. This can make your FPS appear to drop dramatically. If you disable v-sync you may notice a much less severe drop.&#xD;&#xA;&#xD;&#xA;All that being said, all the GPU will do for you is clip triangles outside of the viewport. It will not do frustum culling for you, which means every bit of geometry you submit will make it all the way through the vertex transformation pipeline into clip space at the least. The fragment shader should not run on primitives that have been clipped out.&#xD;&#xA;&#xD;&#xA;If you [implement frustum culling][2] yourself (the API will not do it for you), you can boost your performance in general by not having to even submit out-of-view geometry to the card.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb172234%28v=vs.85%29.aspx&#xD;&#xA;  [2]: http://www.lighthouse3d.com/tutorials/view-frustum-culling/" />
  <row Id="32739" PostHistoryTypeId="5" PostId="14587" RevisionGUID="237b6174-414b-4e4a-abfb-2b0037ada4ff" CreationDate="2011-07-07T16:00:32.917" UserId="7588" Comment="Spelling mistakes, Overall clarity" Text="When I Render 5 boxes in webgl with 1 texture for all of them, the app runs at 60 fps, nice.&#xD;&#xA;But when I render 70 boxes the performance decreases to ~40fps but only 5 of the boxes are visible.&#xD;&#xA;&#xD;&#xA;I have debugged the app and all 70 boxes are using per fragment shaders when there are no need because 65 of them are out of frustum. I thought that gl.viewport declaration clipped out of view polygons, but apparently not.&#xD;&#xA;&#xD;&#xA;I would like to know if the frustum culling technique to avoid this? How can I activate frustum culling? Is there any webgl command or I have to do it manually? &#xD;&#xA;&#xD;&#xA;Thanks in advance," />
  <row Id="32740" PostHistoryTypeId="24" PostId="14587" RevisionGUID="237b6174-414b-4e4a-abfb-2b0037ada4ff" CreationDate="2011-07-07T16:00:32.917" Comment="Proposed by 7588 approved by -1 edit id of 548" />
  <row Id="32741" PostHistoryTypeId="5" PostId="14587" RevisionGUID="cd6e6740-2414-4500-a58e-08fca82f98f9" CreationDate="2011-07-07T16:00:33.183" UserId="1430" Comment="Spelling mistakes, Overall clarity" Text="When I render five boxes in WebGL with one texture for all of them, the app runs at 60 FPS, nice. But when I render 70 boxes the performance decreases to ~40fps... but only 5 of the boxes are visible.&#xD;&#xA;&#xD;&#xA;I have debugged the app and all 70 boxes are using per fragment shaders when there is no need because 65 of them are out of frustum. I thought that setting the GL viewport clipped out-of-view polygons, but apparently not.&#xD;&#xA;&#xD;&#xA;I would like to know if I can use frustum culling techniques to avoid this? How can I activate frustum culling? Is there any WebGL command or I have to do it manually? &#xD;&#xA;&#xD;&#xA;Thanks in advance," />
  <row Id="32742" PostHistoryTypeId="4" PostId="14587" RevisionGUID="cd6e6740-2414-4500-a58e-08fca82f98f9" CreationDate="2011-07-07T16:00:33.183" UserId="1430" Comment="Spelling mistakes, Overall clarity" Text="WebGL rendering performance and frustum culling" />
  <row Id="32743" PostHistoryTypeId="5" PostId="14553" RevisionGUID="353ca056-e1b2-4acf-aa6d-94b934671f47" CreationDate="2011-07-07T16:02:13.150" UserId="1430" Comment="added 6 characters in body; edited title" Text="I have several different music ideas for my game BGMs, but I do not have the musical skills nor the equipment to make them. The most I can do is beat-box them or make a drum beat (had I a drum). Is there a program or some other way to make my music real? &#xD;&#xA;&#xD;&#xA;For instance, I've recently been trying GarageBand's Musical Keyboard to create the music but they don't have the exact beats I'm looking for, like a particular tap of a drum for example. " />
  <row Id="32744" PostHistoryTypeId="4" PostId="14553" RevisionGUID="353ca056-e1b2-4acf-aa6d-94b934671f47" CreationDate="2011-07-07T16:02:13.150" UserId="1430" Comment="added 6 characters in body; edited title" Text="What can I use to make my unique music ideas a reality?" />
  <row Id="32745" PostHistoryTypeId="5" PostId="14576" RevisionGUID="c527dbfd-7ded-4d51-b2ab-0b2eaab09746" CreationDate="2011-07-07T16:20:23.133" UserId="1430" Comment="deleted 6 characters in body; edited tags; edited title" Text="I'm creating an Android game and I want everyone who plays it -- no matter the size or shape of their screen -- to see the same 480x800 playfield but, depending on the actual resolution of their screen, scaled to fit their screen while maintaining the correct aspect ratio using letterboxing or black bars on the edges of the screen to fill in the gaps on the sides/top/bottom.&#xD;&#xA;&#xD;&#xA;I'm using Canvas to develop my game but I don't know where to start, or have any idea of best practices for accomplishing this. Could someone enlighten me?" />
  <row Id="32746" PostHistoryTypeId="4" PostId="14576" RevisionGUID="c527dbfd-7ded-4d51-b2ab-0b2eaab09746" CreationDate="2011-07-07T16:20:23.133" UserId="1430" Comment="deleted 6 characters in body; edited tags; edited title" Text="Scaling a game view with letterboxes?" />
  <row Id="32747" PostHistoryTypeId="6" PostId="14576" RevisionGUID="c527dbfd-7ded-4d51-b2ab-0b2eaab09746" CreationDate="2011-07-07T16:20:23.133" UserId="1430" Comment="deleted 6 characters in body; edited tags; edited title" Text="&lt;java&gt;&lt;android&gt;&lt;resolution&gt;" />
  <row Id="32748" PostHistoryTypeId="5" PostId="14554" RevisionGUID="46df0fd4-c1cd-4d96-876f-957d77be6850" CreationDate="2011-07-07T16:28:25.623" UserId="1430" Comment="deleted 34 characters in body; edited title" Text="What would a realistic poly count target range be for NPC and player models in a 3D MMO that will be released in 2 years? What about poly count target range for the entire camera view (environment, NPC and player meshes)?&#xD;&#xA;&#xD;&#xA;I read in some places that one should not aim too low if the game will come out in a couple years because technology is always advancing. If you can give some mesh poly stats on what other current MMOs / MMORPGs are running and future projections, that would be great. &#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="32749" PostHistoryTypeId="4" PostId="14554" RevisionGUID="46df0fd4-c1cd-4d96-876f-957d77be6850" CreationDate="2011-07-07T16:28:25.623" UserId="1430" Comment="deleted 34 characters in body; edited title" Text="Polygon count target range for MMO being released in 2 years" />
  <row Id="32750" PostHistoryTypeId="2" PostId="14589" RevisionGUID="6b41623f-3fea-4ad4-ad23-5e0e949ae90a" CreationDate="2011-07-07T16:29:03.507" UserId="3162" Text="It's just tradition. Neither system is objectively better than the other, so you just have to get used to using both and switching between them from time to time!&#xD;&#xA;&#xD;&#xA;Right-handed coordinates are traditional for *modelling* where one imagines the XY-plane to be horizontal, and the Z-axis to be vertical.&#xD;&#xA;&#xD;&#xA;Left-handed coordinates are traditional for *cameras* where one imagines the XY-plane to be vertical (corresponding to screen coordinates if the camera is upright), and the Z-axis is into the screen (corresponding to the Z in the Z-buffer).&#xD;&#xA;&#xD;&#xA;So modelling applications like Blender often use right-handed coordinates and game development toolkits like Unity often use left-handed coordinates. But some systems go the other way: RenderMan is left-handed, and OpenGL is right-handed (or at least early versions were, it's fairly agnostic now)." />
  <row Id="32751" PostHistoryTypeId="5" PostId="14490" RevisionGUID="58366f04-1ddb-44d8-adb3-679c7ef8a669" CreationDate="2011-07-07T16:35:39.970" UserId="1430" Comment="edit to add a link to the answer instead of referring to it relatively, since answer order can change" Text="While [momboco's answer][1] is indeed the case the tech talks and other presentations on the engine have a lot of useful information about game development using HTML5 and ***not*** using canvas. I have used a few of these tricks in my latest project and built a scrolling map world rendering through HTML and CSS including an isometric view with a good deal of success.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14454/where-is-the-aves-game-engine/14455#14455" />
  <row Id="32752" PostHistoryTypeId="2" PostId="14590" RevisionGUID="ec237b14-4e2b-4915-83a0-c24006c2bd03" CreationDate="2011-07-07T16:44:02.673" UserId="8461" Text="Iam developing a webgl app, and normally runs at 60 fps. But when I add some simple models it decreases to 40fps. I think v-sync on, trying to render much faster, but are ending up just slightly out of phase with the vertical blank, which results in  tending to be blocked more frequently than I strictly need to be to complete the rendering.&#xD;&#xA;&#xD;&#xA;Is there any way to disable vsync in webgl? is GLFLUSH the way to render directly to the device? &#xD;&#xA;" />
  <row Id="32753" PostHistoryTypeId="1" PostId="14590" RevisionGUID="ec237b14-4e2b-4915-83a0-c24006c2bd03" CreationDate="2011-07-07T16:44:02.673" UserId="8461" Text="Disable webgl vsync" />
  <row Id="32754" PostHistoryTypeId="3" PostId="14590" RevisionGUID="ec237b14-4e2b-4915-83a0-c24006c2bd03" CreationDate="2011-07-07T16:44:02.673" UserId="8461" Text="&lt;webgl&gt;&lt;vsync&gt;" />
  <row Id="32755" PostHistoryTypeId="5" PostId="14590" RevisionGUID="2e0ed0e0-ecf2-4a00-86a3-61f71f2b2a80" CreationDate="2011-07-07T17:55:19.527" UserId="962" Comment="added tags, fixed grammer and english, made title better" Text="Normally my app runs at 60 fps, But when I add some simple models it decreases to 40fps.&#xD;&#xA;&#xD;&#xA;I think v-sync on, which is might be causing it to run slower.&#xD;&#xA;&#xD;&#xA;Is there any way to disable v-sync in WebGL?" />
  <row Id="32756" PostHistoryTypeId="4" PostId="14590" RevisionGUID="2e0ed0e0-ecf2-4a00-86a3-61f71f2b2a80" CreationDate="2011-07-07T17:55:19.527" UserId="962" Comment="added tags, fixed grammer and english, made title better" Text="Disable V-sync in WebGL?" />
  <row Id="32757" PostHistoryTypeId="6" PostId="14590" RevisionGUID="2e0ed0e0-ecf2-4a00-86a3-61f71f2b2a80" CreationDate="2011-07-07T17:55:19.527" UserId="962" Comment="added tags, fixed grammer and english, made title better" Text="&lt;webgl&gt;&lt;vsync&gt;&lt;swap-interval&gt;" />
  <row Id="32758" PostHistoryTypeId="2" PostId="14591" RevisionGUID="7bff4878-8ca0-4f96-97b0-d48883a040c2" CreationDate="2011-07-07T18:03:25.463" UserId="962" Text="In WebGL, [Swap Interval][1] is what they call v-sync.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To enable Swap Interval&#xD;&#xA;&#xD;&#xA;    wglSwapIntervalEXT(1) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To disable Swap Interval&#xD;&#xA;&#xD;&#xA;    glSwapIntervalEXT(0)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/wiki/Swap_Interval" />
  <row Id="32759" PostHistoryTypeId="2" PostId="14592" RevisionGUID="2e342567-e5e3-48fc-ae11-ba7653cee77f" CreationDate="2011-07-07T18:26:19.217" UserId="8464" Text="I've gotten good results from a Nook Color running Android 2.3 (specifically, Cyanogen Mod 7) from an SD card. When the card is in, it's basically a rooted Galaxy Tab; when the card is out, it's an unmodified Nook still under its warranty!" />
  <row Id="32760" PostHistoryTypeId="25" PostId="14590" RevisionGUID="01b11129-4ab7-4229-b75c-bd115d606523" CreationDate="2011-07-07T18:27:34.693" Comment="http://twitter.com/#!/StackGameDev/status/89037858442182657" />
  <row Id="32761" PostHistoryTypeId="2" PostId="14593" RevisionGUID="7d013d67-9155-48ff-895d-6eeefb33a2ac" CreationDate="2011-07-07T18:36:02.707" UserId="5021" Text="The performance of a game does not usually get bottlenecked by poly count first. This is one of the reasons that pixel shaders have been gaining speed faster than vertex shaders over the past several years.&#xD;&#xA;&#xD;&#xA;To put it somewhat bluntly: If you are asking about how many polygons your models should have, then you should not be working on an MMO.&#xD;&#xA;&#xD;&#xA;MMO production has bankrupted large corporations, yet in every game development community (XNA forums, gamedev.net, gamedev.SE,...) there seems to be a weekly newcomer asking about how to fix some widget in the MMO he's making as a one man show.&#xD;&#xA;&#xD;&#xA;There actually have been a few successful MMOs that started as one man projects, however they were all created by game developers with experience.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Studies have shown that players notice and care more about shadows, lighting, and aliasing before they care about poly count. Look at minecraft.&#xD;&#xA;&#xD;&#xA;You can get away with very low polygon counts if your lighting effects are excellent. Global illumination approximations, shadow quality, antialiasing post processes, deferred lighting pipelines, should all be a much greater concern than polygon count.&#xD;&#xA;&#xD;&#xA;Since your question is about polycount, I'll point out that (new) critters in wow are typically in the range of 50-100 polygons.&#xD;&#xA;&#xD;&#xA;Mobs are in the 300-500 polygon range.&#xD;&#xA;&#xD;&#xA;CPU speed is typically a bottleneck for most wow players in my experience though, especially in cities where the number individual objects (and therefore the number of draw calls gets large)." />
  <row Id="32762" PostHistoryTypeId="2" PostId="14594" RevisionGUID="7e3e4daf-dd86-4ae7-abcd-f3565360c8af" CreationDate="2011-07-07T18:46:26.847" UserId="14" Text="For creating your music, the first thing I am going to recommend is of course [FL Studio][1]. I mean, it's really nice, and as flexible as you would need it to be. It comes pre-loaded with all kinds of sample instruments and getting more is as simple as loading a VST. &#xD;&#xA;&#xD;&#xA;Now to answer the broader question here. &quot;I have an idea for music, but I don't know how to make it happen&quot; there is a growing market with a (currently limited, but growing) selection of tools.&#xD;&#xA;&#xD;&#xA;First off **[UJAM][2]**. It's insanely fun to play with, and with the proper work it can make some really decent tracks. It's as simple to use as **singing** or humming the tune that you want. From there you can convert it into a variety of instruments* and use a number of (last I check) growing effects to mix and 'master' the track.&#xD;&#xA;&#xD;&#xA;Then, if you have one, I recommend looking at **[Garage Band on the iPad][3]**. While not as full featured as it's sibling. It definitely makes creating music quickly a priority. It has a variety of smart instruments that can be used to quickly put together a track with limited effort. And if you check the link, it has drum kit's built in that just might solve your current issue (I was able to get rim shots out of it, and I think there is minor tonal differences when you strike in different locations). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are no doubt more, but those three together let me put together all of my proto-music for all the prototypes that I work on.&#xD;&#xA;&#xD;&#xA;  [1]: http://flstudio.com&#xD;&#xA;  [2]: http://ujam.com&#xD;&#xA;  [3]: http://www.apple.com/ipad/from-the-app-store/garageband.html" />
  <row Id="32763" PostHistoryTypeId="5" PostId="14594" RevisionGUID="da59a284-215a-4470-9a17-1406b92a868e" CreationDate="2011-07-07T18:51:37.493" UserId="14" Comment="added 18 characters in body" Text="For creating your music, the first thing I am going to recommend is of course [FL Studio][1]. I mean, it's really nice, and as flexible as you would need it to be. It comes pre-loaded with all kinds of sample instruments and getting more is as simple as loading a VST. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now to answer the broader question here. &quot;I have an idea for music, but I don't know how to make it happen&quot; there is a growing market with a (currently limited, but growing) selection of tools.&#xD;&#xA;&#xD;&#xA;First off **[UJAM][2]**. It's insanely fun to play with, and with the proper work it can make some really decent tracks. It's as simple to use as **singing** or humming the tune that you want. From there you can convert it into a variety of instruments* and use a number of (last I check) growing effects to mix and 'master' the track.&#xD;&#xA;&#xD;&#xA;Then, if you have one, I recommend looking at **[Garage Band on the iPad][3]**. While not as full featured as it's sibling. It definitely makes creating music quickly a priority. It has a variety of smart instruments that can be used to quickly put together a track with limited effort. And if you check the link, it has drum kit's built in that just might solve your current issue (I was able to get rim shots out of it, and I think there is minor tonal differences when you strike in different locations). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are no doubt more, but those three together let me put together all of my proto-music for all the prototypes that I work on.&#xD;&#xA;&#xD;&#xA;  [1]: http://flstudio.com&#xD;&#xA;  [2]: http://ujam.com&#xD;&#xA;  [3]: http://www.apple.com/ipad/from-the-app-store/garageband.html" />
  <row Id="32764" PostHistoryTypeId="2" PostId="14595" RevisionGUID="0b98755a-05e9-4653-811b-a73228a88b1a" CreationDate="2011-07-07T19:37:54.927" UserId="3659" Text="Having never played the *Ville games, a &quot;Timeout&quot; sounds an awful lot like a &quot;cooldown period&quot;, which is not a new concept - all sorts of games have cool down periods (rpgs, mmo, fps, etc). The cooldown period may just be longer for *Ville games. The other replies mention reasons why.&#xD;&#xA;&#xD;&#xA;As for Angry Birds.. particularly Rio - I seem to recall that when the game came out, they specified when you can expect to unlock/play other levels (ie Stage 2 in May, Stage 3 in June, etc). When the level 2 update came out, they removed this timeline completely. And now that the third Stage is out, only half of it is available. I don't know if this is part of their marketing scheme but it seemed to me that they had some trouble meeting deadlines..&#xD;&#xA;&#xD;&#xA;Also in the first Angry Birds, I don't remember seeing levels being unlockable after some time. It seemed more like, they issue an update and now there's a new level added (without mentioning it existed in the first place). - Then again, I downloaded the first one months after it came out..&#xD;&#xA;&#xD;&#xA;In either of the two angry birds, I don't see how it would bring any *more* revenue seeing as how I play the free version and it updates for free." />
  <row Id="32765" PostHistoryTypeId="5" PostId="13995" RevisionGUID="4ef0424a-1c6d-4f1a-95bb-1d89b5ee583a" CreationDate="2011-07-07T21:10:26.323" UserId="8170" Comment="lots of clarification" Text="I am looking for a server technology that supports AMF (because I plan on using an as3/flash front end).&#xD;&#xA;&#xD;&#xA;I would like to develop game logic / simulations that run on the server.  Small number of users and logic at first, but that will grow and run continually/real time style.&#xD;&#xA;&#xD;&#xA;So far I have been looking at:&#xD;&#xA;&#xD;&#xA;Cubeia Firebase - Looks really good, only thing that worries me is their statement that it does not work well for real time style games, but is ideal for turn-based.  It might be ok for now, but what if I need to scale the game up?   Open Source/Free&#xD;&#xA;&#xD;&#xA;BlazeDS - Looks promising, supported by adobe, I should be able to develop game logic in the BlazeDS server and has amf support.   Open Source/Free&#xD;&#xA;&#xD;&#xA;Red5 - No release since 2010, some activity, is this active?  (has amf)  Open Source/Free&#xD;&#xA;&#xD;&#xA;FlashMOG - looks interesting, but I am not sure if it is robust enough to act as an actual game server with continuously running logic.  No release since 2010,  Uses PHP as a socket server.  Open Source/Free&#xD;&#xA;&#xD;&#xA;RedDwarf (used to be SGS/Project Darkstar) -- no release since 2010, is this active?  Has AS3 library, but it is out of date too?  Open Source/Free&#xD;&#xA;&#xD;&#xA;Cirrus - this is more of a media server?&#xD;&#xA;&#xD;&#xA;SmartFox,&#xD;&#xA;Electroserver - these are nice, but are not open source/free.  I believe they have limited connection versions available and while I am hoping to scale my project above those limitations I do not expect to be drawing an income to pay for the licenses at that point&#xD;&#xA;&#xD;&#xA;LCDS (live cycle data services) - similar to blazeDS, not free&#xD;&#xA;&#xD;&#xA;Any other options or clarifications??" />
  <row Id="32766" PostHistoryTypeId="4" PostId="13995" RevisionGUID="4ef0424a-1c6d-4f1a-95bb-1d89b5ee583a" CreationDate="2011-07-07T21:10:26.323" UserId="8170" Comment="lots of clarification" Text="Game Server Framework / Engine that supports AMF?" />
  <row Id="32767" PostHistoryTypeId="5" PostId="13995" RevisionGUID="76742a88-0ee7-472c-a458-24172df5e25f" CreationDate="2011-07-07T21:18:01.603" UserId="8170" Comment="lots of clarification" Text="I am looking for a server technology that supports AMF (because I plan on using an as3/flash front end).&#xD;&#xA;&#xD;&#xA;I would like to develop game logic / simulations that run on the server.  Small number of users and logic at first, but that will grow.&#xD;&#xA;&#xD;&#xA;I might use this for some simple turn based / simple tests, but I am hoping this will also support some tougher real time (RTS) or even MMO style games and simulations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So far I have been looking at (in order of what I think is most promising so far):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;WebORB - Looks the most promising so far, appears to be well supported and developed, lots of features, yet sells itself as easy.  Looks like they have a community open source/free version&#xD;&#xA;&#xD;&#xA;Cubeia Firebase - Looks really good, only thing that worries me is their statement that it does not work well for real time style games, but is ideal for turn-based.  It might be ok for now, but what if I need to scale the game up?   Open Source/Free&#xD;&#xA;&#xD;&#xA;BlazeDS - Looks promising, supported by adobe, I should be able to develop game logic in the BlazeDS server and has amf support.   Open Source/Free&#xD;&#xA;&#xD;&#xA;Red5 - No release since 2010, some activity, is this active?  (has amf)  Open Source/Free&#xD;&#xA;&#xD;&#xA;FlashMOG - looks interesting, but I am not sure if it is robust enough to act as an actual game server with continuously running logic.  No release since 2010,  Uses PHP as a socket server.  Open Source/Free&#xD;&#xA;&#xD;&#xA;RedDwarf (used to be SGS/Project Darkstar) -- no release since 2010, is this active?  Has AS3 library, but it is out of date too?  Open Source/Free&#xD;&#xA;&#xD;&#xA;Cirrus,&#xD;&#xA;Wowza,&#xD;&#xA;FMS - these are more of a media server?&#xD;&#xA;&#xD;&#xA;SmartFox,&#xD;&#xA;Electroserver - these are nice, but are not open source/free.  I believe they have limited connection versions available and while I am hoping to scale my project above those limitations I do not expect to be drawing an income to pay for the licenses at that point&#xD;&#xA;&#xD;&#xA;LCDS (live cycle data services) - similar to blazeDS, not free&#xD;&#xA;&#xD;&#xA;Any other options or clarifications??" />
  <row Id="32768" PostHistoryTypeId="25" PostId="14587" RevisionGUID="07765816-e804-4df6-bc5e-2b8440130229" CreationDate="2011-07-07T21:27:34.633" Comment="http://twitter.com/#!/StackGameDev/status/89083156963135488" />
  <row Id="32769" PostHistoryTypeId="2" PostId="14596" RevisionGUID="d4981093-6fd2-4fab-b570-18318520ca95" CreationDate="2011-07-07T22:30:03.297" UserId="8467" Text="It compiles and runs fine, but when initialisation of OIS starts it throws an exception: &quot;No devices match requested type&quot;.&#xD;&#xA;&#xD;&#xA;Looking through OIS sources I found such a file:&#xD;&#xA;http://code.google.com/p/gamekit/source/browse/trunk/Dependencies/Source/OIS/src/OISInputManager.cpp?spec=svn733&amp;r=733&#xD;&#xA;&#xD;&#xA;It seems that FactoryList is empty. Or something else. :)&#xD;&#xA;&#xD;&#xA;I have: Code::Blocks 10.05 with MinGW,&#xD;&#xA;OGRE SDK 1.7.2 for MinGW.&#xD;&#xA;&#xD;&#xA;It was requiring some dll before that: d3dx9_42, libgcc_s_dw2-1 and libstdc++-6, so I downloaded that and copied into bin." />
  <row Id="32770" PostHistoryTypeId="1" PostId="14596" RevisionGUID="d4981093-6fd2-4fab-b570-18318520ca95" CreationDate="2011-07-07T22:30:03.297" UserId="8467" Text="Troubles with OIS in Ogre3d: No devices match requested type" />
  <row Id="32771" PostHistoryTypeId="3" PostId="14596" RevisionGUID="d4981093-6fd2-4fab-b570-18318520ca95" CreationDate="2011-07-07T22:30:03.297" UserId="8467" Text="&lt;ogre&gt;" />
  <row Id="32772" PostHistoryTypeId="2" PostId="14597" RevisionGUID="c55ab2ee-fe63-465a-ab6a-ec0143ff1217" CreationDate="2011-07-07T22:41:09.973" UserId="6985" Text="I'm making a 2D game for the Android phone, one that involves falling balls. I want to use a physics engine to properly simulate the balls falling and hitting other objects. I'm currently using Phys2D, but when the game runs in the emulator it doesn't look natural; slow and rough. Course, I don't know if this is because of the emulator or Phys2D seeing as how I don't own an Android phone (A real drawback not being able to test on the actual phone, I know, but I can't afford a smartphone).&#xD;&#xA;&#xD;&#xA;Anyways, do you think the game would run faster and smoother on an actual android phone, or is it the engine I'm using, or how I'm using it. If it's the engine, any recommendations on Java physics engines?" />
  <row Id="32773" PostHistoryTypeId="1" PostId="14597" RevisionGUID="c55ab2ee-fe63-465a-ab6a-ec0143ff1217" CreationDate="2011-07-07T22:41:09.973" UserId="6985" Text="Physics for Android Game" />
  <row Id="32774" PostHistoryTypeId="3" PostId="14597" RevisionGUID="c55ab2ee-fe63-465a-ab6a-ec0143ff1217" CreationDate="2011-07-07T22:41:09.973" UserId="6985" Text="&lt;android&gt;&lt;2d-physics&gt;" />
  <row Id="32775" PostHistoryTypeId="2" PostId="14598" RevisionGUID="e063c37d-8114-4979-b04d-3d81229cfa9e" CreationDate="2011-07-07T23:34:15.713" UserId="8469" Text="I have made a simple HTML5 [racing game][1].  The laps are timed.  I am running the game are 40 frames per second, each frame represents 40 milliseconds.  There for my timer will increase in 0.04 increments.&#xD;&#xA;&#xD;&#xA;My question is how can I get my timer to record lap times more accurately, without running at 100 frames per second! How do other games do it?  Could it be to do with gauging the distance from the car to the finish line in the frame before and after it crosses the finish line?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mozeightyseven.com/js/trl" />
  <row Id="32776" PostHistoryTypeId="1" PostId="14598" RevisionGUID="e063c37d-8114-4979-b04d-3d81229cfa9e" CreationDate="2011-07-07T23:34:15.713" UserId="8469" Text="For timed levels, how do you determine time steps that are less than 1/(frames per second)?" />
  <row Id="32777" PostHistoryTypeId="3" PostId="14598" RevisionGUID="e063c37d-8114-4979-b04d-3d81229cfa9e" CreationDate="2011-07-07T23:34:15.713" UserId="8469" Text="&lt;javascript&gt;&lt;html5&gt;&lt;timer&gt;&lt;racing&gt;&lt;fixed-timestep&gt;" />
  <row Id="32778" PostHistoryTypeId="5" PostId="14598" RevisionGUID="005f4849-853b-4472-a3e9-343e21afa7d8" CreationDate="2011-07-07T23:46:34.063" UserId="8469" Comment="added 1 characters in body" Text="I have made a simple HTML5 [racing game][1].  The laps are timed.  I am running the game are 40 frames per second, each frame represents 40 milliseconds.  There for my timer will increase in 0.025 increments.&#xD;&#xA;&#xD;&#xA;My question is how can I get my timer to record lap times more accurately, without running at 100 frames per second! How do other games do it?  Could it be to do with gauging the distance from the car to the finish line in the frame before and after it crosses the finish line?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mozeightyseven.com/js/trl" />
  <row Id="32779" PostHistoryTypeId="2" PostId="14599" RevisionGUID="daafb15c-eeeb-4cad-aa1f-97dff795be24" CreationDate="2011-07-07T23:49:37.707" UserId="8468" Text="Of course it depends on how you use the engine. But if you have an demo of your app, I can run it on my smartphone and tell you how it runs.&#xD;&#xA;&#xD;&#xA;When you run your game on the emulator, the whole game runs laggy and slow or just part with the falling balls?" />
  <row Id="32780" PostHistoryTypeId="2" PostId="14600" RevisionGUID="13e94322-8a3c-41f7-b8df-e945978ab3f5" CreationDate="2011-07-07T23:49:50.223" UserId="962" Text="Okay first off, I don't know how you think you are running 40 frames per second with each frame being 40 milliseconds. 1 second = 1000ms. 40ms per frame gives you an FPS of 25. If you want to actually be at 40 FPS you are going to need to have a timestep of 25ms per frame.&#xD;&#xA;&#xD;&#xA;Most racing games run with the car physics at a really high frame rate. One example would be Forza 3, it more sim like than most games, and its physics runs at 360 hertz.&#xD;&#xA;&#xD;&#xA;So using a frame rate that is higher than your update rate could work, although with java-script you may be limited with performance.&#xD;&#xA;&#xD;&#xA;**If you really need to run at 40 FPS, I see no problem with creating a function that you can plug in the current time, and the distance, and have it return an estimated time.**" />
  <row Id="32781" PostHistoryTypeId="2" PostId="14601" RevisionGUID="d7294713-f9a0-4194-93b1-1291ac74d667" CreationDate="2011-07-07T23:55:18.380" UserId="7728" Text="Your own proposed answer is spot on;  to determine the finish time for a car, you take its position on the frame before finishing and its position on the frame after finishing, and determine at what point during that frame it actually crossed the finish line.&#xD;&#xA;&#xD;&#xA;If (for example) it crossed the finish line at 40% of the way from its previous position to its next position, then you only add 40% of the timestep value to determine the finishing time.&#xD;&#xA;&#xD;&#xA;Assuming that your finish line is a straight line, and treating the player's movement from one frame to the next as a straight line, you can easily find where (and then, when during the frame) they crossed by solving a [line intersection test][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zonalandeducation.com/mmts/intersections/intersectionOfTwoLines1/intersectionOfTwoLines1.html" />
  <row Id="32782" PostHistoryTypeId="25" PostId="14597" RevisionGUID="52a388aa-b1e2-4f7e-84fd-6ba3a60156a8" CreationDate="2011-07-08T00:27:34.467" Comment="http://twitter.com/#!/StackGameDev/status/89128454376796160" />
  <row Id="32783" PostHistoryTypeId="5" PostId="14466" RevisionGUID="b5097512-3f12-4cb0-9720-cd547fd331c6" CreationDate="2011-07-08T00:52:13.317" UserId="8408" Comment="added 3841 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth paremeters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Here is the code where I compile and initialize the shaders.&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;    bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;    // Id needs to be represented with it's mapped hash integer value and not a string.&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader (Should be almost identical to the VShader)&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32784" PostHistoryTypeId="5" PostId="14466" RevisionGUID="65d93b6e-9b6e-4402-af8c-8b251dd14d35" CreationDate="2011-07-08T00:57:22.143" UserId="8408" Comment="added 3841 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth paremeters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Here is the code where I compile and initialize the shaders.&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;    bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;    // Id needs to be represented with it's mapped hash integer value and not a string.&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader (Should be almost identical to the VShader)&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32785" PostHistoryTypeId="5" PostId="14466" RevisionGUID="fa34b8d1-93b1-443a-9d7e-459e75e57e30" CreationDate="2011-07-08T01:03:30.140" UserId="8408" Comment="added 3841 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Here is the code where I compile and initialize the shaders.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    bool ResourceManager::StartUpShaders() {&#xD;&#xA;	// REMOVE HASHING FUNCTIONS!&#xD;&#xA;	VShader _vShader;&#xD;&#xA;	if (!_vShader.StartUp(TEXT(&quot;UI\0&quot;), pDevice, TEXT(&quot;ProxLib\\UI.fx\0&quot;), &quot;VS\0&quot;, &quot;vs_4_0\0&quot;))&#xD;&#xA;		return false;&#xD;&#xA;	VShaderTable.PushKeyValue(VShaderTable.HashString(TEXT(&quot;UI\0&quot;)), _vShader);&#xD;&#xA;&#xD;&#xA;	PShader _pShader;&#xD;&#xA;	if (!_pShader.StartUp(TEXT(&quot;UI\0&quot;), pDevice, TEXT(&quot;ProxLib\\UI.fx\0&quot;), &quot;PS\0&quot;, &quot;ps_4_0\0&quot;))&#xD;&#xA;		return false;&#xD;&#xA;	PShaderTable.PushKeyValue(VShaderTable.HashString(TEXT(&quot;UI\0&quot;)), _pShader);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;    bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;    // Id needs to be represented with it's mapped hash integer value and not a string.&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader (Should be almost identical to the VShader)&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32786" PostHistoryTypeId="5" PostId="14466" RevisionGUID="081c8be0-6c4d-4bdc-bef2-7db4e8ca5616" CreationDate="2011-07-08T01:08:35.580" UserId="8408" Comment="added 3841 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Here is the code where I compile and initialize the shaders.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    bool ResourceManager::StartUpShaders() {&#xD;&#xA;	// REMOVE HASHING FUNCTIONS!&#xD;&#xA;	VShader _vShader;&#xD;&#xA;	if (!_vShader.StartUp(TEXT(&quot;UI\0&quot;), pDevice, TEXT(&quot;ProxLib\\UI.fx\0&quot;), &quot;VS\0&quot;, &quot;vs_4_0\0&quot;))&#xD;&#xA;		return false;&#xD;&#xA;	VShaderTable.PushKeyValue(VShaderTable.HashString(TEXT(&quot;UI\0&quot;)), _vShader);&#xD;&#xA;&#xD;&#xA;	PShader _pShader;&#xD;&#xA;	if (!_pShader.StartUp(TEXT(&quot;UI\0&quot;), pDevice, TEXT(&quot;ProxLib\\UI.fx\0&quot;), &quot;PS\0&quot;, &quot;ps_4_0\0&quot;))&#xD;&#xA;		return false;&#xD;&#xA;	PShaderTable.PushKeyValue(VShaderTable.HashString(TEXT(&quot;UI\0&quot;)), _pShader);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;    bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;    // Id needs to be represented with it's mapped hash integer value and not a string.&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;        _error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader (Should be almost identical to the VShader)&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;        _error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32787" PostHistoryTypeId="5" PostId="14466" RevisionGUID="72bec221-80f0-46ff-ab5f-2ba48c4adf85" CreationDate="2011-07-08T01:17:09.787" UserId="8408" Comment="added 4 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Here is the code where I compile and initialize the shaders.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    bool ResourceManager::StartUpShaders() {&#xD;&#xA;	// REMOVE HASHING FUNCTIONS!&#xD;&#xA;	VShader _vShader;&#xD;&#xA;	if (!_vShader.StartUp(TEXT(&quot;UI\0&quot;), pDevice, TEXT(&quot;ProxLib\\UI.fx\0&quot;), &quot;VS\0&quot;, &quot;vs_4_0\0&quot;))&#xD;&#xA;		return false;&#xD;&#xA;	VShaderTable.PushKeyValue(VShaderTable.HashString(TEXT(&quot;UI\0&quot;)), _vShader);&#xD;&#xA;&#xD;&#xA;	PShader _pShader;&#xD;&#xA;	if (!_pShader.StartUp(TEXT(&quot;UI\0&quot;), pDevice, TEXT(&quot;ProxLib\\UI.fx\0&quot;), &quot;PS\0&quot;, &quot;ps_4_0\0&quot;))&#xD;&#xA;		return false;&#xD;&#xA;	PShaderTable.PushKeyValue(VShaderTable.HashString(TEXT(&quot;UI\0&quot;)), _pShader);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;    bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;    // Id needs to be represented with it's mapped hash integer value and not a string.&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;        _error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Pixel shader (Should be almost identical to the VShader)&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;                        _error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;        _error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32788" PostHistoryTypeId="2" PostId="14602" RevisionGUID="f8c2bdbc-1bfe-4f20-9709-5226e74893d2" CreationDate="2011-07-08T02:03:19.643" UserId="8472" Text="i am having some trouble understanding Math.tan and Math.atan and Math.atan2, i have basic knowledge of trigonmetry but the usage of SIN COS TAN etc for game development is very new to me, i am reading on some tutorials and i see that by using tangent we can get the angle in which one object needs to be rotated by how much to face another object for example my mouse. so why do we still need to use atan or atan2?" />
  <row Id="32789" PostHistoryTypeId="1" PostId="14602" RevisionGUID="f8c2bdbc-1bfe-4f20-9709-5226e74893d2" CreationDate="2011-07-08T02:03:19.643" UserId="8472" Text="questions on Trigonometry for game development in flash" />
  <row Id="32790" PostHistoryTypeId="3" PostId="14602" RevisionGUID="f8c2bdbc-1bfe-4f20-9709-5226e74893d2" CreationDate="2011-07-08T02:03:19.643" UserId="8472" Text="&lt;math&gt;&lt;flash&gt;&lt;game-mechanics&gt;" />
  <row Id="32791" PostHistoryTypeId="2" PostId="14603" RevisionGUID="2219ed92-48ad-4323-86a6-c142dece85fb" CreationDate="2011-07-08T02:21:47.583" UserId="2111" Text="The relation with a tangent is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and theta is the angle.&#xD;&#xA;&#xD;&#xA;If you know the values of both the opposite and adjacent sides, you can get the value of the angle. But to do so, you must isolate the actual `angle` variable, and you do so with the use of arc-tangent.&#xD;&#xA;&#xD;&#xA;This is the reason why you use `atan`, to isolate the angle when you want to know its value. &#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0), so a lot of libraries offer a `atan2` method which lets you specify both the `x` and `y` parameter, to avoid the division by zero for you.&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png" />
  <row Id="32792" PostHistoryTypeId="5" PostId="14603" RevisionGUID="7cb3e821-0d0e-420d-9ec8-e6bb8ae84f15" CreationDate="2011-07-08T02:29:32.227" UserId="2111" Comment="added 582 characters in body" Text="The tangent relation is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and `theta` is the angle.&#xD;&#xA;&#xD;&#xA;If you know the values of both the opposite and adjacent sides, you can get the value of the angle. But to do so, you must isolate the actual `angle` variable, and you do so with the use of arc-tangent.&#xD;&#xA;&#xD;&#xA;This is the reason why you use `atan`, to isolate the angle when you want to know its value. &#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0), so a lot of libraries offer a function called `atan2`, which lets you specify both the `x` and `y` parameters, to avoid the division by zero for you.&#xD;&#xA;&#xD;&#xA;The use of trigonometry in game development is pretty common, especially with vectors, but usually libraries hide the trigonometry work for you. You can use sin/cos/tan for a lot of tasks which involve geometric manipulations to find a value from a triangle. All you need is 3 values (side lengths / angle values) to find the other values of a rectangle triangle, so it's quite useful.&#xD;&#xA;&#xD;&#xA;You can even use the &quot;cycling&quot; nature of the sinus and cosines functions for special behaviors in a game, e.g. I've seen cos/sin used a lot to make an object turn around an other one.&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png" />
  <row Id="32793" PostHistoryTypeId="2" PostId="14604" RevisionGUID="22f9b497-88ee-498a-ae8a-399c4016d0c8" CreationDate="2011-07-08T03:04:58.100" UserId="2839" Text="I'm using the [Game State Management (GSM)][1] concept in my prototype and I like it very much. One of the screen has a &quot;Game&quot; embeded in it, where all the &quot;good stuff&quot; happens. The menu launching the game works fine, but I'm not sure yet how I should allow the game to request a screen from the ScreenManager. I'm not talking about a menu screen, but about something contextual to the game.&#xD;&#xA;&#xD;&#xA;For clarity's sake, let's say that when I click on a game element (a rendered model for example) I want a screen that asks me what color I want that model to be drawn next. Right now, my game knows that model is &quot;targeted&quot; with the mouse (I use a [Ray picking][2] approach).&#xD;&#xA;&#xD;&#xA;I looked at the [Role-Playing sample][3] to see how they did this, but when their GameScreen handles the keys, to open the inventory for example, it's never contextual to what's actually happening in the GameScreen.&#xD;&#xA;&#xD;&#xA;Ideas welcomed!&#xD;&#xA;&#xD;&#xA;**Edit:** The game must also be able to get a feedback or something from the &quot;contextual screen&quot; to get the new model color, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/picking&#xD;&#xA;  [3]: http://create.msdn.com/en-US/education/catalog/sample/roleplaying_game" />
  <row Id="32794" PostHistoryTypeId="1" PostId="14604" RevisionGUID="22f9b497-88ee-498a-ae8a-399c4016d0c8" CreationDate="2011-07-08T03:04:58.100" UserId="2839" Text="How should the actual game interface with the menu system." />
  <row Id="32795" PostHistoryTypeId="3" PostId="14604" RevisionGUID="22f9b497-88ee-498a-ae8a-399c4016d0c8" CreationDate="2011-07-08T03:04:58.100" UserId="2839" Text="&lt;xna&gt;&lt;c#&gt;&lt;interface&gt;&lt;screen&gt;" />
  <row Id="32796" PostHistoryTypeId="2" PostId="14605" RevisionGUID="3b6bbbf1-1c71-4c67-a5f6-595ca11c729f" CreationDate="2011-07-08T03:07:54.687" UserId="8473" Text="everyone!&#xD;&#xA;I want to study water simulation recently, but I find that it is hard for me to obtain a demo with source code which using physically-based methods(Eulerian approaches or Lagrangian approaches). How can i get some examples? What website and bbs should I visited?&#xD;&#xA;Sorry,my english is poor." />
  <row Id="32797" PostHistoryTypeId="1" PostId="14605" RevisionGUID="3b6bbbf1-1c71-4c67-a5f6-595ca11c729f" CreationDate="2011-07-08T03:07:54.687" UserId="8473" Text="How to find some resource of realistic water simulaion?" />
  <row Id="32798" PostHistoryTypeId="3" PostId="14605" RevisionGUID="3b6bbbf1-1c71-4c67-a5f6-595ca11c729f" CreationDate="2011-07-08T03:07:54.687" UserId="8473" Text="&lt;3d&gt;&lt;physics&gt;&lt;simulations&gt;" />
  <row Id="32799" PostHistoryTypeId="2" PostId="14606" RevisionGUID="326f9ae4-d124-4561-92ea-2642bcf2d9c0" CreationDate="2011-07-08T03:10:33.327" UserId="8367" Text="I will clarify a few things in a concise manner. Please refer to trigonometry tutorials online for a detailed explanation.&#xD;&#xA;&#xD;&#xA;Let a be an angle. Then tan(a) = tan(-a).&#xD;&#xA;&#xD;&#xA;atan is tan inverse, that is, gives you the angle given the tan.&#xD;&#xA;When you call atan(tan(-a)), the answer will be a. This will be inadequate for your application.&#xD;&#xA;&#xD;&#xA;atan2 will take 2 arguments to help this exact situations. atan takes x and y, which are basically cos(a) and sin(a).&#xD;&#xA;&#xD;&#xA;atan2(sin(a), cos(a)) = a&#xD;&#xA;atan2(sin(-a), cos(-a)) = -a&#xD;&#xA;&#xD;&#xA;Please find some tutorials to explain why this is this way.&#xD;&#xA;&#xD;&#xA;Your code should be something like this:&#xD;&#xA;&#xD;&#xA;    if (mouseMoved)&#xD;&#xA;    {&#xD;&#xA;      double angle = atan2(mousey - objecty, mousex - objectx);&#xD;&#xA;    &#xD;&#xA;      object. setTransform to Rotate(angle);&#xD;&#xA;    &#xD;&#xA;      // If you want to print it&#xD;&#xA;      print radian_to_degrees(angle); // Because angle is in radian 360 degrees = 2*Pi radians&#xD;&#xA;    }" />
  <row Id="32800" PostHistoryTypeId="2" PostId="14607" RevisionGUID="9300cb22-bdf4-4340-a471-1d19e1a3269e" CreationDate="2011-07-08T03:18:49.920" UserId="2081" Text="I'm working on a game with a component-based architecture. An `Entity` owns a set of `Component` instances, each of which has a set of `Slot` instances with which to store, send, and receive values. Factory functions such as `Player` produce entities with the required components and slot connections.&#xD;&#xA;&#xD;&#xA;I'm trying to determine the best level of granularity for components. For example, right now `Position`, `Velocity`, and `Acceleration` are all separate components, connected in series. `Velocity` and `Acceleration` could easily be rewritten into a uniform `Delta` component, or `Position`, `Velocity`, and `Acceleration` could be combined alongside such components as `Friction` and `Gravity` into a monolithic `Physics` component.&#xD;&#xA;&#xD;&#xA;Should a component have the smallest responsibility possible (at the cost of lots of interconnectivity) or should related components be combined into monolithic ones (at the cost of flexibility)? I'm leaning toward the former, but I could use a second opinion." />
  <row Id="32801" PostHistoryTypeId="1" PostId="14607" RevisionGUID="9300cb22-bdf4-4340-a471-1d19e1a3269e" CreationDate="2011-07-08T03:18:49.920" UserId="2081" Text="Appropriate level of granularity for component-based architecture" />
  <row Id="32802" PostHistoryTypeId="3" PostId="14607" RevisionGUID="9300cb22-bdf4-4340-a471-1d19e1a3269e" CreationDate="2011-07-08T03:18:49.920" UserId="2081" Text="&lt;architecture&gt;&lt;programming&gt;&lt;component-based&gt;&lt;language-agnostic&gt;" />
  <row Id="32803" PostHistoryTypeId="25" PostId="14605" RevisionGUID="c71e3c74-7b39-415d-a975-3c903ffa3cd9" CreationDate="2011-07-08T03:27:55.247" Comment="http://twitter.com/#!/StackGameDev/status/89173838398631936" />
  <row Id="32804" PostHistoryTypeId="5" PostId="14605" RevisionGUID="9c683a5d-a735-4e81-b4a0-456ff1b46825" CreationDate="2011-07-08T03:59:24.543" UserId="962" Comment="Made easier to read" Text="I want to study water simulation, with a  a demo with source code which using physically-based methods(Eulerian approaches or Lagrangian approaches). &#xD;&#xA;&#xD;&#xA;How can I get some examples?" />
  <row Id="32805" PostHistoryTypeId="4" PostId="14605" RevisionGUID="9c683a5d-a735-4e81-b4a0-456ff1b46825" CreationDate="2011-07-08T03:59:24.543" UserId="962" Comment="Made easier to read" Text="Resources of realistic water simulation?" />
  <row Id="32806" PostHistoryTypeId="5" PostId="14602" RevisionGUID="e256e2f2-5e70-444e-af27-324a963886de" CreationDate="2011-07-08T04:02:42.327" UserId="962" Comment="Capitalized things, made more pleasing to read." Text="I am having some trouble understanding `Math.tan()` and `Math.atan()` and `Math.atan2()`.&#xD;&#xA;&#xD;&#xA;I have basic knowledge of trigonmetry but the usage of SIN, COS, and TAN etc for game development is very new to me.&#xD;&#xA;&#xD;&#xA;I am reading on some tutorials and I see that by using tangent we can get the angle in which one object needs to be rotated by how much to face another object for example my mouse. So why do we still need to use atan or atan2?" />
  <row Id="32807" PostHistoryTypeId="2" PostId="14608" RevisionGUID="25797960-73f4-455e-b736-631cc0b78ca7" CreationDate="2011-07-08T04:55:09.730" UserId="6877" Text="Here is one, with source&#xD;&#xA;&#xD;&#xA;[Fluid simulation for video games series : Part 1 - 9](http://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-1/)" />
  <row Id="32808" PostHistoryTypeId="4" PostId="14602" RevisionGUID="63b09b0a-3681-4698-9da0-f8c0bfc61727" CreationDate="2011-07-08T05:39:09.233" UserId="2698" Comment="This has nothing to do with either flash or mechanics really. It's just a question on the general usage of atan and atan2 within games." Text="What are atan and atan2 used for in games?" />
  <row Id="32809" PostHistoryTypeId="6" PostId="14602" RevisionGUID="63b09b0a-3681-4698-9da0-f8c0bfc61727" CreationDate="2011-07-08T05:39:09.233" UserId="2698" Comment="This has nothing to do with either flash or mechanics really. It's just a question on the general usage of atan and atan2 within games." Text="&lt;math&gt;" />
  <row Id="32810" PostHistoryTypeId="24" PostId="14602" RevisionGUID="63b09b0a-3681-4698-9da0-f8c0bfc61727" CreationDate="2011-07-08T05:39:09.233" Comment="Proposed by 2698 approved by 51 edit id of 550" />
  <row Id="32811" PostHistoryTypeId="25" PostId="14607" RevisionGUID="b23e96cc-2ddd-472b-87a8-ca4deb6fea46" CreationDate="2011-07-08T06:27:56.260" Comment="http://twitter.com/#!/StackGameDev/status/89219143064240129" />
  <row Id="32812" PostHistoryTypeId="2" PostId="14609" RevisionGUID="268a90d8-caf9-4063-8875-d07ab185f1ce" CreationDate="2011-07-08T07:21:12.847" UserId="8475" Text="Currently, I'm building a game with pure UIKit. It's a game where some character is catching  falling items. All the objects are moving along the three points trajectory: each object appear at point A, then move to point B and then fall to point C. For me, it is important only one moment - item in point B. I need to check, does the character is catching the item in point B. Currently, I have a timer in the main game controller that is constantly posting notifications. Game items are observers, they listen to that notification and reposition themselves (they move themselves). Now, with that timer, each item is moving by the small steps from point A to point B. When it is at point B, an item method checks, does the character is catching him. If no then I'm performing UIView animation with duration from point B to point C.  &#xD;&#xA;  &#xD;&#xA;I'm thinking that the whole movement could be animated, maybe with Core Animation CAKeyframeAnimation class or smth. The only problem is, I'm not sure about how to fire a callback for checking the catch in the middle of animation - in the point B. Some say that it is impossible [here](http://stackoverflow.com/questions/3493992/how-can-i-callback-as-a-cabasicanimation-is-animating) and if I have the whole animation and I need to get current item position then I need to have a timer that is regularly pulling/reading the model data from presentationLayer. But I'm not sure about this approach because, now, I do not store a pointer to screen items from my main game controller - the game controller only creates an item and game timer posts notifications to those objects. But I would need to have such one in order to implement proposed solution. Also, I should read the presentationLayer from the whole bunch of screen items.     &#xD;&#xA; &#xD;&#xA;  The another alternative would be to split one animation into two animations: first, animate from A to B and then to fire a completion callback for checking a catch. Then, perform another animation from B to C.&#xD;&#xA;&#xD;&#xA;  Guys, what are your opinions on that, maybe you have another proposals?" />
  <row Id="32813" PostHistoryTypeId="1" PostId="14609" RevisionGUID="268a90d8-caf9-4063-8875-d07ab185f1ce" CreationDate="2011-07-08T07:21:12.847" UserId="8475" Text="UIKit game: A middle callback during game object movement animation" />
  <row Id="32814" PostHistoryTypeId="3" PostId="14609" RevisionGUID="268a90d8-caf9-4063-8875-d07ab185f1ce" CreationDate="2011-07-08T07:21:12.847" UserId="8475" Text="&lt;objective-c&gt;" />
  <row Id="32815" PostHistoryTypeId="2" PostId="14610" RevisionGUID="1c2574a9-c1f4-49af-a76e-efb20e19512e" CreationDate="2011-07-08T07:34:30.417" UserId="8320" Text="Jesse and Sid are basically right, but I suspect you are really after insight into the problem.&#xD;&#xA;&#xD;&#xA;Atan2() is needed as atan() doesn't tell you the angle from the horizontal you need as   it doesn't cope with quadrants. The atan for angles(in degrees) 45, 135, 225 and 315 is pi/2.&#xD;&#xA;&#xD;&#xA;This means that atan(-2,2) and atan(2,2) return the same value. You would then to switch on the sign of yours arguments and add 90, 190, or 270 to the result. In addition, you have the divide by zero special case to consider that Jesse mentioned. Also atan2() works better than atan when x is close to 0&#xD;&#xA;&#xD;&#xA;So you if you want the angle of a vector between 0 and 2*pi (in radians)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = atan2(y, x)&#xD;&#xA;    if (angle &lt; 0)&#xD;&#xA;      angle += 2*pi&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;N.B. This bakes in the range shift from (-pi, pi) to (0,2pi)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = calculateAngle(y, x)&#xD;&#xA;    &#xD;&#xA;    calculateAngle(double y, double x)&#xD;&#xA;    {&#xD;&#xA;      angle = 0&#xD;&#xA;      if (y == 0)&#xD;&#xA;      {&#xD;&#xA;         if (x &gt; 0)&#xD;&#xA;           angle = pi/2&#xD;&#xA;         else &#xD;&#xA;           angle = 3*(pi/2)&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        angle = atan(y/x)&#xD;&#xA;        if (x &lt; 0 &amp;&amp; y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }   &#xD;&#xA;        else if (x &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi/2&#xD;&#xA;        }&#xD;&#xA;        else if (y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += 3*(pi/2);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32816" PostHistoryTypeId="5" PostId="14590" RevisionGUID="fd82110a-2712-468e-ad54-f6a8d099d291" CreationDate="2011-07-08T07:36:45.067" UserId="8461" Comment="added 51 characters in body" Text="Normally my app runs at 60 fps, But when I add some simple models it decreases to 40fps.&#xD;&#xA;&#xD;&#xA;I think v-sync on, which is might be causing it to run slower.&#xD;&#xA;&#xD;&#xA;Is there any way to disable v-sync in WebGL?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Would glflush at the end of rendering work?" />
  <row Id="32817" PostHistoryTypeId="2" PostId="14611" RevisionGUID="f5ed1df0-ee10-4f14-935c-aa8369b8acfb" CreationDate="2011-07-08T07:53:54.873" UserId="4894" Text="My guess would be to combine components who will have lots of interaction. &#xD;&#xA;In your case, i'd keep the position in a single component, and have the velocity &amp; acceleration kept together in a physics component. &#xD;&#xA;&#xD;&#xA;But it depends a lot on what your game features are (unless you're building a framework with no specific game in mind). " />
  <row Id="32818" PostHistoryTypeId="2" PostId="14612" RevisionGUID="23df1605-8e86-47a4-8bb7-fde26c5e10bd" CreationDate="2011-07-08T09:09:43.867" UserId="741" Text="As has been said, decoupling the AI logic from the visual logic would be a good thing, because while they are related, they definitely don't want to be closely tied. There are certainly situations where you don't want to move to a new AI state until some visual things have happened, but that is a specific case of the more general problem: that you don't always want to be doing something every frame.&#xD;&#xA;&#xD;&#xA;Most times you start out coding AI in an immediate way: every tick you ask the entity what it would like to do this tick, and it considers all its options and makes its decision (keep moving, accelerate, turn around, fire, etc.). You'll quickly run into the limitations of that. In general, you want your AI state machine to be able to simply (and cheaply) do nothing, until 'something else' happens. That might be a timer elapsing, an animation completing, or some other trigger (perhaps from other entities in the world).&#xD;&#xA;&#xD;&#xA;Moving to a state machine is the first step towards a more flexible system. But in general I think you want to get away from the notion of 'per-tick' updates for your higher level logic. Higher logic doesn't tend to operate in terms of a regular update cycle like that. It works in terms of events and actions. Actions will very rarely take only one frame to complete. Some may be instantaneous, some may take many ticks. Your systems shouldn't care, and should support all types. It should be possible to tie actions to events occurring, so that your actor can make new decisions based on the fact that an event has occurred.&#xD;&#xA;&#xD;&#xA;A queue of some sort is a good way for the actor to maintain memory of 'what am I doing/thinking' between ticks. That's not to say it must blindly work its way through the queue though. It should regularly be looking at its immediate circumstances and re-evaluating. Some circumstances might cause it to junk everything in its queue and replace it with a new set of actions (&quot;Run away!&quot;). Sometimes it might just want to slot in a high priority action at the head of the queue (&quot;bend over and pick up this thing that just landed at your feet, then continue&quot;). Other times it might put in the new action at the end of the queue.&#xD;&#xA;&#xD;&#xA;So don't think of a queue like a list of orders to be followed, think of it like a prioritised to-do list that the actor wants to tackle. There are lower level subsystems that put each order into practice (e.g. the queue holds 'go to A'), and a lower level path-finding system actually translates that into a 'how do I move this tick'." />
  <row Id="32819" PostHistoryTypeId="25" PostId="14602" RevisionGUID="8e4a442e-b619-4065-8821-6d00095e4063" CreationDate="2011-07-08T09:27:56.847" Comment="http://twitter.com/#!/StackGameDev/status/89264443732664320" />
  <row Id="32820" PostHistoryTypeId="2" PostId="14613" RevisionGUID="09560d8b-0f14-4420-b608-5395c885a715" CreationDate="2011-07-08T09:29:58.983" UserId="5019" Text="I'm building a prototype puzzle game at the moment. I'm just curious as to the principles behind building graphic interfaces within games. &#xD;&#xA;At the minute I'm looking at designing the graphics for an interface in something like Illustrator. I'm looking at one graphic (650 x 650 px) that incorporates the play area (400 x 550 px) as a blank square, with a nice border on the right hand side (vertically down the screen) and a border along the bottom too. I'm leaving a &quot;blank&quot; rectangle on the vertical border to incorporate a timer into it, and three &quot;blank&quot; squares along the bottom to incorporate icons to represent lives or power-ups or something, which I'll design later and animate later. &#xD;&#xA;Is this an acceptable/sensible approach?   " />
  <row Id="32821" PostHistoryTypeId="1" PostId="14613" RevisionGUID="09560d8b-0f14-4420-b608-5395c885a715" CreationDate="2011-07-08T09:29:58.983" UserId="5019" Text="What are good puzzle game interface design principles?" />
  <row Id="32822" PostHistoryTypeId="3" PostId="14613" RevisionGUID="09560d8b-0f14-4420-b608-5395c885a715" CreationDate="2011-07-08T09:29:58.983" UserId="5019" Text="&lt;graphics&gt;&lt;animation&gt;" />
  <row Id="32823" PostHistoryTypeId="2" PostId="14614" RevisionGUID="4f56c3bf-22b5-4bff-b4e0-68dcab643335" CreationDate="2011-07-08T09:34:09.413" UserId="4894" Text="The first thing you need to design should not be how the game looks like but how you play it, and what the player will need to do (and how). &#xD;&#xA;&#xD;&#xA;If you already have these things set, then your approach seems sensible. The idea is to make a fake ingame screen to see how the different interface elements should be placed, so that they give the correct information to the player and not mask any important element in the game. &#xD;&#xA;&#xD;&#xA;Then your approach may need some changes according to what the puzzles are ? " />
  <row Id="32824" PostHistoryTypeId="2" PostId="14615" RevisionGUID="c2906043-68c6-4a38-9419-b0cae8d18dc0" CreationDate="2011-07-08T10:04:45.567" UserId="8481" Text="private void DrawScenery()&#xD;&#xA;        {&#xD;&#xA;            if (direction == 1)&#xD;&#xA;                x=x+1;&#xD;&#xA;            else&#xD;&#xA;                x=x-1;&#xD;&#xA;            for (int i = -5; i &lt; 5; i++)&#xD;&#xA;            {&#xD;&#xA;            Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;                      spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;                Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;                spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;                spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(0, 0), Color.Brown);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;                      &#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I want to show on the screen when im running the game the counting of i&#xD;&#xA;like: -5 , -4 , -3...but not in a line just like a timer. -5 then overwrite it and show -4 overwrite it show -3 and so on...like seconds of a clock.&#xD;&#xA;&#xD;&#xA;The problem is im getting a strange painting near the numbers like its repeating and painting something there all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for help." />
  <row Id="32825" PostHistoryTypeId="1" PostId="14615" RevisionGUID="c2906043-68c6-4a38-9419-b0cae8d18dc0" CreationDate="2011-07-08T10:04:45.567" UserId="8481" Text="XNA 4.0 im trying to show on screen the value of int i inside a FOR loop but it dosent work good" />
  <row Id="32826" PostHistoryTypeId="3" PostId="14615" RevisionGUID="c2906043-68c6-4a38-9419-b0cae8d18dc0" CreationDate="2011-07-08T10:04:45.567" UserId="8481" Text="&lt;xna-4.0&gt;" />
  <row Id="32827" PostHistoryTypeId="2" PostId="14616" RevisionGUID="bb5b3021-8cb5-41cf-bfa1-92a81cebeee4" CreationDate="2011-07-08T10:05:30.807" UserId="8480" Text="Emulators can be fairly slow. You'd want to test on real hardware first. Maybe release a free demo and see what kind of feedback you get, or ask a friend to try it?&#xD;&#xA;&#xD;&#xA;Even with just an emulator, you can profile your code to see what eats up the most time. Rendering can be a major bottleneck, so that'd be a place to look.&#xD;&#xA;&#xD;&#xA;Physics aren't likely to take a lot of time unless you're doing something strange with them or simulating them way too precisely. e.g. if you're simulating 3-inch balls bouncing around, you don't need to be precise to 1/1000th of an inch. Games often sacrifice accuracy in both rendering and physics for speed - nobody's really going to notice or care about slight inaccuracies most of the time." />
  <row Id="32828" PostHistoryTypeId="5" PostId="14615" RevisionGUID="aeaeb101-ae94-4734-80e4-fceacae7e3ec" CreationDate="2011-07-08T10:10:47.887" UserId="1156" Comment="added 107 characters in body; edited tags" Text="    private void DrawScenery()&#xD;&#xA;            {&#xD;&#xA;                if (direction == 1)&#xD;&#xA;                    x=x+1;&#xD;&#xA;                else&#xD;&#xA;                    x=x-1;&#xD;&#xA;                for (int i = -5; i &lt; 5; i++)&#xD;&#xA;                {&#xD;&#xA;                    Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;                          spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;    &#xD;&#xA;                &#xD;&#xA;                    Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;                    spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;    &#xD;&#xA;                    spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(0, 0), Color.Brown);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                          &#xD;&#xA;                &#xD;&#xA;    &#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;I want to show on the screen when I'm running the game the counting of `i`&#xD;&#xA;like: -5 , -4 , -3...but not in a line, just like a timer. -5 then overwrite it and show -4 overwrite it and show -3 and so on...like seconds of a clock.&#xD;&#xA;&#xD;&#xA;The problem is I'm getting a strange painting near the numbers like its repeating and painting something there all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for help.&#xD;&#xA;" />
  <row Id="32829" PostHistoryTypeId="6" PostId="14615" RevisionGUID="aeaeb101-ae94-4734-80e4-fceacae7e3ec" CreationDate="2011-07-08T10:10:47.887" UserId="1156" Comment="added 107 characters in body; edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="32830" PostHistoryTypeId="6" PostId="14607" RevisionGUID="4a27db58-7750-4b13-a8c7-5c3da9069fea" CreationDate="2011-07-08T10:12:56.247" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;component-based&gt;&lt;language-agnostic&gt;&lt;entity-system&gt;" />
  <row Id="32831" PostHistoryTypeId="2" PostId="14617" RevisionGUID="466e9c23-e9ac-412a-94d1-f1dcc416bead" CreationDate="2011-07-08T10:17:01.547" UserId="1156" Text="There's a line between complete granularity, leading to no code wastage or blob-like state (which is why component architectures are favoured), and usability.&#xD;&#xA;&#xD;&#xA;Obviously things may have a `Position`, but they're not necessarily dynamic (so why have `Velocity` and `Acceleration`?). However, something with a `Velocity` is going to be a moving object, so it makes sense to also have `Acceleration` grouped.&#xD;&#xA;&#xD;&#xA;Are you going to have a case where **v** and **a** are going to be needed, but you don't want a physics simulation for them? Similarly, is there going to be a point in `Gravity` if they're not physics objects?&#xD;&#xA;&#xD;&#xA;*tl;dr Group what makes sense.*" />
  <row Id="32832" PostHistoryTypeId="2" PostId="14618" RevisionGUID="57b54856-e304-42a6-962e-294a61828057" CreationDate="2011-07-08T11:30:39.173" UserId="7588" Text="You are drawing the background, foreground and the text in the same position in the same frame.&#xD;&#xA;&#xD;&#xA;This won't work because your command list will do everything in order, without every executing the commands and swapping buffers. If you really want to do this (I have no idea why you would), you could try : &#xD;&#xA;&#xD;&#xA;    for (int i = -5; i &lt; 5; i++)&#xD;&#xA;    {&#xD;&#xA;        Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;        Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;        spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(10, 10 + i), Color.Brown);&#xD;&#xA;    }" />
  <row Id="32833" PostHistoryTypeId="5" PostId="14618" RevisionGUID="48f3f630-a9f0-4826-942b-d3802a0885b2" CreationDate="2011-07-08T12:27:52.620" UserId="7588" Comment="added 349 characters in body" Text="You are drawing the background, foreground and the text in the same position in the same frame.&#xD;&#xA;&#xD;&#xA;This won't work because your command list will do everything in order, without every executing the commands and swapping buffers. If you really want to do this (I have no idea why you would), you could try : &#xD;&#xA;&#xD;&#xA;    for (int i = -5; i &lt; 5; i++)&#xD;&#xA;    {&#xD;&#xA;        Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;        Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;        spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(10, 10 + i), Color.Brown);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This will produce the in-line display you don't want. For it to work proplerly, your variable i must be outside of the `Draw(GameTime gameTime)` function, and incremented outside of the function also.&#xD;&#xA;&#xD;&#xA;At the start of `Draw()` you must call clear and then call your function to draw your backgroud/foreground and text __without__ the for loop." />
  <row Id="32834" PostHistoryTypeId="25" PostId="14604" RevisionGUID="0a026d8f-f6b8-426b-80e3-dfeca84edd21" CreationDate="2011-07-08T12:27:56.957" Comment="http://twitter.com/#!/StackGameDev/status/89309742899539969" />
  <row Id="32835" PostHistoryTypeId="5" PostId="14604" RevisionGUID="49af5948-cccf-4625-a7ec-e297449a628e" CreationDate="2011-07-08T13:14:45.433" UserId="2839" Comment="Highlighted the question" Text="I'm using the [Game State Management (GSM)][1] concept in my prototype and I like it very much. One of the screen has a &quot;Game&quot; embeded in it, where all the &quot;good stuff&quot; happens. The menu launching the game works fine, but **I'm not sure how I should allow the game to request a screen from the ScreenManager.** I'm not talking about a menu screen, but about something contextual to the game.&#xD;&#xA;&#xD;&#xA;For clarity's sake, let's say that when I click on a game element (a rendered model for example) I want a screen that asks me what color I want that model to be drawn next. Right now, my game knows that model is &quot;targeted&quot; with the mouse (I use a [Ray picking][2] approach).&#xD;&#xA;&#xD;&#xA;I looked at the [Role-Playing sample][3] to see how they did this, but when their GameScreen handles the keys, to open the inventory for example, it's never contextual to what's actually happening in the GameScreen.&#xD;&#xA;&#xD;&#xA;Ideas welcomed!&#xD;&#xA;&#xD;&#xA;**Edit:** The game must also be able to get a feedback or something from the &quot;contextual screen&quot; to get the new model color, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/game_state_management&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/picking&#xD;&#xA;  [3]: http://create.msdn.com/en-US/education/catalog/sample/roleplaying_game" />
  <row Id="32836" PostHistoryTypeId="12" PostId="14599" RevisionGUID="755c8a3c-76a6-44b3-bea4-4554ad16d403" CreationDate="2011-07-08T13:20:25.320" UserId="8468" Text="[{&quot;Id&quot;:8468,&quot;DisplayName&quot;:&quot;Ricardo Simmus&quot;}]" />
  <row Id="32837" PostHistoryTypeId="13" PostId="14599" RevisionGUID="a6c37404-a9e7-4b4c-a29e-0f2c3634680f" CreationDate="2011-07-08T13:20:31.807" UserId="8468" Text="[{&quot;Id&quot;:8468,&quot;DisplayName&quot;:&quot;Ricardo Simmus&quot;}]" />
  <row Id="32838" PostHistoryTypeId="6" PostId="14604" RevisionGUID="c9aa7d0a-73b0-4fcf-b04f-eaf05d9c907f" CreationDate="2011-07-08T13:21:13.540" UserId="1156" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;state&gt;&lt;screen&gt;" />
  <row Id="32839" PostHistoryTypeId="5" PostId="14615" RevisionGUID="ca127ac2-7125-4463-8ee3-887522a8829d" CreationDate="2011-07-08T14:47:28.630" UserId="7588" Comment="removed unnecessary code and retitled question" Text="    for (int i = -5; i &lt; 5; i++)&#xD;&#xA;    {&#xD;&#xA;        Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;        &#xD;&#xA;        Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;    &#xD;&#xA;        spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(0, 0), Color.Brown);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to show on the screen when I'm running the game the counting of `i`&#xD;&#xA;like: -5 , -4 , -3...but not in a line, just like a timer. -5 then overwrite it and show -4 overwrite it and show -3 and so on...like seconds of a clock.&#xD;&#xA;&#xD;&#xA;The problem is I'm getting a strange painting near the numbers like its repeating and painting something there all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for help.&#xD;&#xA;" />
  <row Id="32840" PostHistoryTypeId="4" PostId="14615" RevisionGUID="ca127ac2-7125-4463-8ee3-887522a8829d" CreationDate="2011-07-08T14:47:28.630" UserId="7588" Comment="removed unnecessary code and retitled question" Text="Problem drawing text in a for loop" />
  <row Id="32841" PostHistoryTypeId="24" PostId="14615" RevisionGUID="ca127ac2-7125-4463-8ee3-887522a8829d" CreationDate="2011-07-08T14:47:28.630" Comment="Proposed by 7588 approved by 1430 edit id of 552" />
  <row Id="32842" PostHistoryTypeId="5" PostId="14615" RevisionGUID="4d7fab09-82ec-4a99-9540-fd24b640788b" CreationDate="2011-07-08T14:48:09.690" UserId="1430" Comment="added 4 characters in body" Text="    for (int i = -5; i &lt; 5; i++)&#xD;&#xA;    {&#xD;&#xA;        Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;        &#xD;&#xA;        Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;    &#xD;&#xA;        spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(0, 0), Color.Brown);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to show on the screen when I'm running the game the counting of `i`&#xD;&#xA;like: -5 , -4 , -3...but not in a line, just like a timer. -5 then overwrite it and show -4 overwrite it and show -3 and so on...like seconds of a clock.&#xD;&#xA;&#xD;&#xA;The problem is I'm getting a strange painting near the numbers like its repeating and painting something there all the time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for the help.&#xD;&#xA;" />
  <row Id="32843" PostHistoryTypeId="5" PostId="13515" RevisionGUID="fef83d7b-734d-4807-b3aa-e176ff0ff9dc" CreationDate="2011-07-08T15:11:20.073" UserId="2111" Comment="deleted 1 characters in body" Text=" **1. What Game Engine should I use?**&#xD;&#xA;&#xD;&#xA;I suspect you mean framework here, so I'd say that XNA is a good framework to start with in my opinion. I personally found it quite easy to use and much more straightforward than C++ and DirectX.&#xD;&#xA;&#xD;&#xA;If you really do mean engine, then you could actually make your own engine and learn a lot from it. I found [these tutorials][1] to be particularly useful for this task.&#xD;&#xA;&#xD;&#xA;If you actually don't really know the difference between an engine and a framework, take a look at the answers to [this question][2].&#xD;&#xA;&#xD;&#xA;**2. Which platform is the best?**&#xD;&#xA;&#xD;&#xA;There is no &quot;best&quot; platform to target, but if you go with XNA go ahead and learn to program for Windows and move on after you know it properly.&#xD;&#xA;&#xD;&#xA;**3. Is starting with XNA the best idea?**&#xD;&#xA;&#xD;&#xA;It may not be the **best** idea (since *best* is highly subjective) but I find it to be quite a *good* idea, since C# is much easier to use than C++ and XNA has a lot of online resources and tutorials to help you out.&#xD;&#xA;&#xD;&#xA;**4. What is the best XNA book to learn 2D and 3D?**&#xD;&#xA;&#xD;&#xA;Again, *best* is subjective here, but I'd recommend going with online resources (unless you really want a book). Here are a couple of sites to get you started:&#xD;&#xA;&#xD;&#xA;-[RB Whitaker][3]&#xD;&#xA;&#xD;&#xA;-[Riemers][4]&#xD;&#xA;&#xD;&#xA;-[XNA resources][5]&#xD;&#xA;&#xD;&#xA;-[Answer with more resources][6]&#xD;&#xA;&#xD;&#xA;**5. How to become professional game developer with XNA?**&#xD;&#xA;&#xD;&#xA;Make games. And complete them. Don't just make dozens of half-made Tetris and Pong clones, make complete games with menu screens, highscores, etc. You'll learn a lot from making clones, and eventually you'll be ready to make your own game from scratch. Just keep moving forward with little steps between each game and make sure to keep realistic goals when doing so (e.g. don't start with a MMORPG...)&#xD;&#xA;&#xD;&#xA;**6. Is XNA standard for creating games?**&#xD;&#xA;&#xD;&#xA;It may not be used *a lot* commercially but it sure is great to start out with it. Once you feel comfortable with the basics of game development, then you can move to more complex languages/frameworks(maybe C++ and DirectX or OpenGL).&#xD;&#xA;&#xD;&#xA;**7. Is there any work place I can join as a XNA game developer?**&#xD;&#xA;&#xD;&#xA;I'd say start by making your own games first and learn the basics then think about this question when you know the framework a little bit more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.innovativegames.net/blog/blog/2009/10/18/innovation-engine-roadmap-2009-2010/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/10770/whats-the-difference-between-a-library-and-an-engine&#xD;&#xA;  [3]: http://rbwhitaker.wikidot.com/xna-tutorials&#xD;&#xA;  [4]: http://www.riemers.net/&#xD;&#xA;  [5]: http://www.xnaresources.com/default.asp&#xD;&#xA;  [6]: http://gamedev.stackexchange.com/questions/13043/get-started-games-development-with-c/13050#13050" />
  <row Id="32844" PostHistoryTypeId="5" PostId="14610" RevisionGUID="4de5cb4c-a1e6-4075-8c89-2c987fb72432" CreationDate="2011-07-08T15:19:41.363" UserId="8320" Comment="Added a return to satify my slight ocd tendencies" Text="Jesse and Sid are basically right, but I suspect you are really after insight into the problem.&#xD;&#xA;&#xD;&#xA;Atan2() is needed as atan() doesn't tell you the angle from the horizontal you need as   it doesn't cope with quadrants. The atan for angles(in degrees) 45, 135, 225 and 315 is pi/2.&#xD;&#xA;&#xD;&#xA;This means that atan(-2,2) and atan(2,2) return the same value. You would then to switch on the sign of yours arguments and add 90, 190, or 270 to the result. In addition, you have the divide by zero special case to consider that Jesse mentioned. Also atan2() works better than atan when x is close to 0&#xD;&#xA;&#xD;&#xA;So you if you want the angle of a vector between 0 and 2*pi (in radians)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = atan2(y, x)&#xD;&#xA;    if (angle &lt; 0)&#xD;&#xA;      angle += 2*pi&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;N.B. This bakes in the range shift from (-pi, pi) to (0,2pi)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = calculateAngle(y, x)&#xD;&#xA;    &#xD;&#xA;    calculateAngle(double y, double x)&#xD;&#xA;    {&#xD;&#xA;      angle = 0&#xD;&#xA;      if (y == 0)&#xD;&#xA;      {&#xD;&#xA;         if (x &gt; 0)&#xD;&#xA;           angle = pi/2&#xD;&#xA;         else &#xD;&#xA;           angle = 3*(pi/2)&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        angle = atan(y/x)&#xD;&#xA;        if (x &lt; 0 &amp;&amp; y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }   &#xD;&#xA;        else if (x &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi/2&#xD;&#xA;        }&#xD;&#xA;        else if (y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += 3*(pi/2);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      return angle&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32845" PostHistoryTypeId="5" PostId="13273" RevisionGUID="2e9563dd-9e93-4e6d-96c6-9295bb0cf465" CreationDate="2011-07-08T15:22:28.053" UserId="2111" Comment="deleted 1 characters in body" Text="The problem comes from your `spriteBatch.Begin` call. &#xD;&#xA;&#xD;&#xA;You're passing `SpriteSortMode.BackToFront` and since both of your `layerDepths` are equal to 0, I'd guess that the order would get mixed up when the sprites get drawn on the `spriteBatch.End` call, therefore drawing the background on top of the cannon. &#xD;&#xA;&#xD;&#xA;Try passing `SpriteSortMode.Deferred` instead. This will draw the sprites immediately when you call `spriteBatch.Draw` and should draw them in the proper order. Works for me at least." />
  <row Id="32846" PostHistoryTypeId="5" PostId="14618" RevisionGUID="c867dc65-7dae-4a1b-9067-c0291850919e" CreationDate="2011-07-08T15:23:46.773" UserId="7588" Comment="added 193 characters in body" Text="This won't work because in your for loop, the _command list_ is never actually executed, this happens __only__ at the end of the `Draw` function in your `Game` class; this is effectively where the frame ends and is drawn to your screen. &#xD;&#xA;&#xD;&#xA;So what you see happening is all your stuff being drawn on the same, single frame, which is what causes the garbage on-screen.&#xD;&#xA;&#xD;&#xA;For it to work proplerly, your variable _i_ must be outside of the `Draw(GameTime gameTime)` function, and incremented outside of the function also.&#xD;&#xA;&#xD;&#xA;At the start of `Draw()` you must call clear and then call your function to draw your backgroud/foreground and text __without__ the for loop.&#xD;&#xA;&#xD;&#xA;For example :&#xD;&#xA;&#xD;&#xA;    Initialize() {&#xD;&#xA;        i = -5;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Update(GameTime gameTime) {&#xD;&#xA;        if(i &lt; 5) ++i;&#xD;&#xA;&#xD;&#xA;        base.Update(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Draw(GameTime gameTime) {&#xD;&#xA;        graphics.GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;        Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;        Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;&#xD;&#xA;        spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(0, 0), Color.Brown);&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }" />
  <row Id="32847" PostHistoryTypeId="25" PostId="14572" RevisionGUID="11db8b0f-bccd-430b-a910-4988e2e219ed" CreationDate="2011-07-08T15:27:57.020" Comment="http://twitter.com/#!/StackGameDev/status/89355041839923200" />
  <row Id="32848" PostHistoryTypeId="2" PostId="14619" RevisionGUID="f963a546-cc2c-4199-887d-dcbf6845b4a7" CreationDate="2011-07-08T15:49:39.263" UserId="8487" Text="I'm using the Chipmunk physics engine to make the levels for a 2D C game.  I'd like to be able to fit a polygon to an arbitrary shape to serve as the collision mask.  Given a black and white collision mask for an arbitrary level object like this:&#xD;&#xA;&#xD;&#xA;![A black blob][1]&#xD;&#xA;&#xD;&#xA;Are there any well-known algorithms for getting this:&#xD;&#xA;![Now with a fitted polygon][2]&#xD;&#xA;&#xD;&#xA;I could then use the red polygon to create a physics object to go with the image.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/M9GbT.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/iaU1a.png" />
  <row Id="32849" PostHistoryTypeId="1" PostId="14619" RevisionGUID="f963a546-cc2c-4199-887d-dcbf6845b4a7" CreationDate="2011-07-08T15:49:39.263" UserId="8487" Text="Are there well-known algorithms for fitting a polygon to an arbitrary shape?" />
  <row Id="32850" PostHistoryTypeId="3" PostId="14619" RevisionGUID="f963a546-cc2c-4199-887d-dcbf6845b4a7" CreationDate="2011-07-08T15:49:39.263" UserId="8487" Text="&lt;collision-detection&gt;&lt;physics&gt;&lt;algorithm&gt;" />
  <row Id="32851" PostHistoryTypeId="2" PostId="14620" RevisionGUID="065f8f18-773b-45e6-9198-cdb5d9e43038" CreationDate="2011-07-08T15:59:20.550" UserId="5520" Text="How about [JBullet][1]?  I haven't used it myself, but I've heard good things about it.  It's a port of the C++ Bullet Physics Library, so the documentation is pretty good.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jbullet.advel.cz/" />
  <row Id="32852" PostHistoryTypeId="2" PostId="14621" RevisionGUID="daf76a34-33af-4c61-b63c-8dfd72c275ba" CreationDate="2011-07-08T16:02:18.147" UserId="2061" Text="This is known as generating a concave hull, and is in the general case pretty complicated (much more so than the convex hull).&#xD;&#xA;&#xD;&#xA;There are some good resources [here][1], [here][2], and [here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ubicomp.algoritmi.uminho.pt/local/concavehull.html&#xD;&#xA;  [2]: http://gis.stackexchange.com/questions/1200/concave-hull-definition-algorithms-and-practical-solutions&#xD;&#xA;  [3]: http://stackoverflow.com/questions/83593/is-there-an-efficient-algorithm-to-generate-a-2d-concave-hull" />
  <row Id="32853" PostHistoryTypeId="5" PostId="14621" RevisionGUID="8566b044-7e35-4035-bbd4-f19c4926aaf1" CreationDate="2011-07-08T16:11:03.177" UserId="2061" Comment="added 158 characters in body" Text="This is known as generating a concave hull, and is in the general case pretty complicated (much more so than the convex hull).&#xD;&#xA;&#xD;&#xA;One commonly-recommended method is using [alpha shapes][4].&#xD;&#xA;&#xD;&#xA;There are more good resources on the problem [here][1], [here][2], and [here][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ubicomp.algoritmi.uminho.pt/local/concavehull.html&#xD;&#xA;  [2]: http://gis.stackexchange.com/questions/1200/concave-hull-definition-algorithms-and-practical-solutions&#xD;&#xA;  [3]: http://stackoverflow.com/questions/83593/is-there-an-efficient-algorithm-to-generate-a-2d-concave-hull&#xD;&#xA;  [4]: http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/belair/alpha.html" />
  <row Id="32854" PostHistoryTypeId="5" PostId="14384" RevisionGUID="2d36bc3d-02c8-40a7-afe1-9bf70e5d3cb8" CreationDate="2011-07-08T16:16:37.413" UserId="7881" Comment="Fixed typo." Text="The problem with a [quad][1]/[octree][2] in nearest-neighbor searches is that the closest object may be sitting right across the division between nodes. For collisions, this is okay, because if it's not in the node, we don't care about it. But consider this 2D example with a quadtree:&#xD;&#xA;&#xD;&#xA;![Quadtree example][3]&#xD;&#xA;&#xD;&#xA;Here, even though the black item and green item are in the same node, the black item is closest to the blue item. [ultifinitus' answer][4] can only guarantee the nearest-neighbor only every item in your tree is placed in the smallest possible node that could contain it, or in a unique node - this leads to more inefficient quadtrees. (Note that there are many different ways to implement a structure which could be called a quad/octree - more strict implementations may work better in this application.)&#xD;&#xA;&#xD;&#xA;A better option would be a [kd-tree][5]. Kd-trees have a very efficient [nearest-neighbor search][6] algorithm you can implement, and can contain any number of dimensions (hence &quot;k&quot; dimensions.)&#xD;&#xA;&#xD;&#xA;A great and informative animation from Wikipedia:&#xD;&#xA;![kd-tree nearest-neighbor search][7]&#xD;&#xA;&#xD;&#xA;The biggest problem with using kd-trees, if I recall correctly, is that they are more difficult to insert/remove items from while maintaining balance. Therefore, I would recommend using one kd-tree for static objects such as houses and trees which is highly balanced, and another which contains players and vehicles, which needs balancing regularly. Find the nearest static object and the nearest mobile object, and compare those two.&#xD;&#xA;&#xD;&#xA;Lastly, kd-trees are relatively simple to implement, and I'm sure you can find a multitude of C++ libraries with them. From what I remember, R-trees are much more complicated, and probably overkill if all you need is a simple nearest-neighbor search.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree&#xD;&#xA;  [3]: http://i.stack.imgur.com/JkQCY.png&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/q/14373/7881&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Kd-tree&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Kd-tree#Nearest_neighbour_search&#xD;&#xA;  [7]: http://i.stack.imgur.com/OWDEX.gif" />
  <row Id="32855" PostHistoryTypeId="5" PostId="14379" RevisionGUID="d044b175-2bf3-4f96-91be-c659bc796c76" CreationDate="2011-07-08T17:12:33.653" UserId="5660" Comment="added 20 characters in body" Text="sqrt() is continuous, meaning&#xD;&#xA;&#xD;&#xA;    if sqrt(x) &lt; sqrt(y) then x &lt; y&#xD;&#xA;&#xD;&#xA;and vice versa&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So if you only want to compare two distances but are not interested in their actual values you can just cut out the sqrt-step from your pythagoras-stuff:&#xD;&#xA;&#xD;&#xA;    pseudoDistanceB = (A.x - B.x)² + (A.y - B.y)²&#xD;&#xA;    pseudoDistanceC = (A.x - C.x)² + (A.y - C.y)²&#xD;&#xA;    if (pseudoDistanceB &lt; pseudoDistanceC)&#xD;&#xA;    {&#xD;&#xA;        A is closest to B!&#xD;&#xA;    }&#xD;&#xA;    else&#xD;&#xA;    {&#xD;&#xA;        A is closest to C!&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It's not as efficient as the oct-tree thing, but it's easier to implement and does bump up the speed at least a little bit&#xD;&#xA;" />
  <row Id="32856" PostHistoryTypeId="5" PostId="14610" RevisionGUID="c0436ede-0b92-4f4e-a63a-5cd86e352768" CreationDate="2011-07-08T17:18:08.970" UserId="8320" Comment="clarity" Text="Jesse and Sid are basically right, but I suspect you are really after insight into the problem.&#xD;&#xA;&#xD;&#xA;Atan2() is needed as atan() doesn't tell you the angle from the horizontal you need as   it doesn't cope with quadrants. The atan for angles(in degrees) 45, 135, 225 and 315 is pi/2.&#xD;&#xA;&#xD;&#xA;This means that using atan for vectors (-2,2) and (2,2) will give the same value. You would then to switch on the sign of yours arguments and add 90, 190, or 270 to the result. In addition, you have the divide by zero special case to consider that Jesse mentioned. Also atan2() works better than atan when x is close to 0&#xD;&#xA;&#xD;&#xA;So you if you want the angle of a vector between 0 and 2*pi (in radians)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = atan2(y, x)&#xD;&#xA;    if (angle &lt; 0)&#xD;&#xA;      angle += 2*pi&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;N.B. This bakes in the range shift from (-pi, pi) to (0,2pi)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = calculateAngle(y, x)&#xD;&#xA;    &#xD;&#xA;    calculateAngle(double y, double x)&#xD;&#xA;    {&#xD;&#xA;      angle = 0&#xD;&#xA;      if (y == 0)&#xD;&#xA;      {&#xD;&#xA;         if (x &gt; 0)&#xD;&#xA;           angle = pi/2&#xD;&#xA;         else &#xD;&#xA;           angle = 3*(pi/2)&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        angle = atan(y/x)&#xD;&#xA;        if (x &lt; 0 &amp;&amp; y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }   &#xD;&#xA;        else if (x &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi/2&#xD;&#xA;        }&#xD;&#xA;        else if (y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += 3*(pi/2);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      return angle&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32857" PostHistoryTypeId="2" PostId="14622" RevisionGUID="c4617c97-a1d5-4e91-ad37-9d9d1389cf7e" CreationDate="2011-07-08T17:48:35.290" UserId="7911" Text="To avoid micromanaging each and every variable I'd suggest by starting heavy, choose divisions around responsibility and refactor when the situation presents itself logically.  You can start the first designs on paper.  At some point these gross divisions of responsibility will become the building blocks of your entities.&#xD;&#xA;&#xD;&#xA;So for a rushed example you have Game.  Game splits into Environment + State.  Environment splits into StaticWorld + MovingStuff.  State splits into AIControlled + PlayerControlled.  The gross idea of Damage splits into TakesDamage + GivesDamage.&#xD;&#xA;&#xD;&#xA;And so on.&#xD;&#xA;&#xD;&#xA;Much like the common advice to &quot;Build games, not engines!&quot; for new practitioners I recommend &quot;Build Games, not elaborate component systems!&quot; because only with personal experience with a running game will you know whether an elaborate component system is called for in future works.&#xD;&#xA;" />
  <row Id="32858" PostHistoryTypeId="25" PostId="14619" RevisionGUID="c1d24a77-c09f-43ef-aa6c-973e6256e3cb" CreationDate="2011-07-08T18:27:58.343" Comment="http://twitter.com/#!/StackGameDev/status/89400345553420288" />
  <row Id="32863" PostHistoryTypeId="5" PostId="14466" RevisionGUID="08a9c735-21b2-4d05-8985-021536b47ec4" CreationDate="2011-07-08T19:51:10.483" UserId="8408" Comment="deleted 4276 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**SOLUTION**&#xD;&#xA;&#xD;&#xA;My calls needed rearranged as mentioned in the solution (The code above is updated to reflect this), however the ultimate culprit was forgetting call the buffer binding function at all during the object's start up." />
  <row Id="32864" PostHistoryTypeId="5" PostId="14466" RevisionGUID="36fd2143-cd5f-4415-a5f4-4de57218b4f0" CreationDate="2011-07-08T20:01:23.033" UserId="8408" Comment="added 3604 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = 0;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Jumped the gun, thought I found the solution. Same issue and warning remains.&#xD;&#xA;&#xD;&#xA;Here is the shader initialization code&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;     bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;        // Replace with Int hash value!!!!&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Pixel Shader.&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32865" PostHistoryTypeId="5" PostId="14597" RevisionGUID="9708df6b-5431-45c8-9316-857086aea843" CreationDate="2011-07-08T20:02:33.377" UserId="6985" Comment="added 128 characters in body" Text="I'm making a 2D game for the Android phone, one that involves falling balls. I want to use a physics engine to properly simulate the balls falling and hitting other objects. I'm currently using Phys2D, but when the game runs in the emulator it doesn't look natural; slow and rough. Course, I don't know if this is because of the emulator or Phys2D seeing as how I don't own an Android phone (A real drawback not being able to test on the actual phone, I know, but I can't afford a smartphone).&#xD;&#xA;&#xD;&#xA;Anyways, do you think the game would run faster and smoother on an actual android phone, or is it the engine I'm using, or how I'm using it. If it's the engine, any recommendations on Java physics engines?&#xD;&#xA;&#xD;&#xA;UPDATE: If you want to test the game yourself, you can find the rough prototype here: http://bpcp.angelfire.com/BallDrop.apk" />
  <row Id="32866" PostHistoryTypeId="25" PostId="14615" RevisionGUID="bbfe524a-1546-4936-b827-2327eb5a4605" CreationDate="2011-07-08T21:27:59.733" Comment="http://twitter.com/#!/StackGameDev/status/89445649862508544" />
  <row Id="32867" PostHistoryTypeId="5" PostId="14615" RevisionGUID="70aed88d-92f8-4d5a-8ac5-14b19932e9a6" CreationDate="2011-07-08T21:51:39.660" UserId="1198" Comment="deleted 28 characters in body" Text="    for (int i = -5; i &lt; 5; i++)&#xD;&#xA;    {&#xD;&#xA;        Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White);&#xD;&#xA;        &#xD;&#xA;        Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight);&#xD;&#xA;        spriteBatch.Draw(backgroundTexture, backGroundRectangle, Color.White);&#xD;&#xA;    &#xD;&#xA;        spriteBatch.DrawString(font, &quot;Variable i:  &quot; + i, new Vector2(0, 0), Color.Brown);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to show on the screen when I'm running the game the counting of `i`&#xD;&#xA;like: -5 , -4 , -3...but not in a line, just like a timer. -5 then overwrite it and show -4 overwrite it and show -3 and so on...like seconds of a clock.&#xD;&#xA;&#xD;&#xA;The problem is I'm getting a strange painting near the numbers like its repeating and painting something there all the time." />
  <row Id="32868" PostHistoryTypeId="2" PostId="14624" RevisionGUID="a4be3ad5-1261-4db3-8336-a175e5a105b0" CreationDate="2011-07-08T22:29:22.237" UserId="8275" Text="In other threads on this very website, it has been repeatedly stressed that having a game demo to showcase at a job interview is of paramount importance, so I decided to have a go and write my own game demo.&#xD;&#xA;&#xD;&#xA;**I would like to know what is typical for interviewers to focus their attention on while reviewing your game demo**.&#xD;&#xA;&#xD;&#xA;I shall clarify that I don't have a specific opening available to me right now, but that I would probably target **gameplay and/or AI programming positions**. Because of this I can answer by myself in terms of broad categories: &quot;fancy graphics&quot; shouldn't be my priority focus while &quot;computer's players behaviour&quot; should... Yet - having no direct experience of this industry - I would like to know if there are less obvious stuff I should pay attention to:&#xD;&#xA;&#xD;&#xA; - How important is code modularity?&#xD;&#xA; - How important is to showcase a typical algorithm implementation?&#xD;&#xA; - How important is to include novel features?&#xD;&#xA; - How important is playability?&#xD;&#xA; - Should I privilege code readability or code optimisation?&#xD;&#xA; - How important is code documentation?&#xD;&#xA; - etc...&#xD;&#xA;&#xD;&#xA;Mind that the above are **just examples to illustrate the level of detail** I would appreciate in the answer, they are not specific subquestion that I would necessarily like to be addressed (unless you think it's relevant to discuss some of them).&#xD;&#xA;&#xD;&#xA;Thanks in advance for your time and expertise." />
  <row Id="32869" PostHistoryTypeId="1" PostId="14624" RevisionGUID="a4be3ad5-1261-4db3-8336-a175e5a105b0" CreationDate="2011-07-08T22:29:22.237" UserId="8275" Text="What to focus on in developing a game demo for an interview?" />
  <row Id="32870" PostHistoryTypeId="3" PostId="14624" RevisionGUID="a4be3ad5-1261-4db3-8336-a175e5a105b0" CreationDate="2011-07-08T22:29:22.237" UserId="8275" Text="&lt;game-design&gt;&lt;career&gt;&lt;jobs&gt;&lt;demo&gt;" />
  <row Id="32871" PostHistoryTypeId="2" PostId="14625" RevisionGUID="79840793-d677-4c8a-8654-5e9eace9330f" CreationDate="2011-07-08T22:52:10.130" UserId="1430" Text="Don't write a demo *for* an interview if you can avoid it; submit existing code or projects if you can.&#xD;&#xA;&#xD;&#xA;Demos and code samples are important for a lot of reasons (which vary by reviewer), but mostly they are about showing potential employers the kind of code you write in the wild and the kind of problems you are interested in solving. They also help demonstrate your level of interest in the craft of software development.&#xD;&#xA;&#xD;&#xA;It's much better to submit some code you've already written for a previous project or game you've written that you are proud of, or that demonstrates a clever solution to a problem -- anything that is interesting or difficult or that can serve as the basis for a good discussion.&#xD;&#xA;&#xD;&#xA;Writing code explicitly to submit as sample code tends to come across as contrived and fake; it can be surprisingly easy to tell, for example, that a programmer thought that a potential employer would want to see &quot;well documented&quot; code and thus put really detailed comments on everything, striving for what they believe to be perfection. Real code isn't perfect, it has warts and rough edges, and when you write code explicitly for demo submission you tend to polish it so much that it becomes obvious you didn't write this because you loved the writing of it. You just wanted a job.&#xD;&#xA;&#xD;&#xA;That said, if you don't have any work you can submit -- either because you haven't written any yet or because your previous job prevents you from submitting any of the code (under NDA) -- you don't have a lot of options but to write something new. In that scenario I would encourage you to focus on *writing the thing for its own sake*, and forget about what employers &quot;want.&quot; Write a game because you want to write a game. Write a cool tech demo because you want to explore that tech, because that's what you are interested in.&#xD;&#xA;&#xD;&#xA;&gt; * How important is code modularity? &#xD;&#xA;&gt; * How important is to showcase a typical algorithm implementation? &#xD;&#xA;&gt; * How important is to include novel features?&#xD;&#xA;&gt; * How important is playability?&#xD;&#xA;&gt; * Should I privilege code readability or code optimisation? &#xD;&#xA;&gt; * How important is code documentation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The answers to all these smaller questions are, unfortunately, &quot;it depends&quot; (except for the readability thing -- I think you should favor readability in general, especially for &quot;demo code&quot;). Some employers may want to see you reimplementing quicksort. Others may not care. Others will just ask you to reimplement quicksort on a whiteboard at the interview anyhow.&#xD;&#xA;&#xD;&#xA;**Don't focus on what you think employers want**, because different employers and even different people who may review your code will want different things. **Focus instead on what you want to showcase about yourself**, because you have far more control over that and it will benefit you more in the long run." />
  <row Id="32872" PostHistoryTypeId="2" PostId="14626" RevisionGUID="f8c3724d-2866-4e99-a390-3b4ab8040793" CreationDate="2011-07-08T23:45:46.760" UserId="8492" Text="What do you mean by &quot;not completing&quot;?  &#xD;&#xA;Does it never end?  &#xD;&#xA;Does it never happen?  &#xD;&#xA;&#xD;&#xA;You might wanna ask on www.hiveworkshop.com where your chances to get an answer are 100000 times greater than on www.wc3c.net..." />
  <row Id="32873" PostHistoryTypeId="5" PostId="14626" RevisionGUID="a9b778d4-18ea-42e0-93f3-1627868372c8" CreationDate="2011-07-08T23:51:05.367" UserId="8492" Comment="added 439 characters in body" Text="What do you mean by &quot;not completing&quot;?  &#xD;&#xA;Does it never end?  &#xD;&#xA;Does it never happen?  &#xD;&#xA;&#xD;&#xA;You might wanna ask on www.hiveworkshop.com where your chances to get an answer are 100000 times greater than on www.wc3c.net...  &#xD;&#xA;&#xD;&#xA;Edit: Seshiro said&#xD;&#xA;&#xD;&#xA;    Forth, waits in picks are stupid, because they will go like this: First unit gets buffed - 6 seconds wait - debuff - Second unit gets buffed - 6 seconds wait - etc. I guess you don't want it to happen like this&#xD;&#xA;&#xD;&#xA;This is true, but also during the wait the trigger may run again, so the first unit in the group (`UnitGroup`s are queues) will get the effect lots of times and the others will get it slowly..." />
  <row Id="32874" PostHistoryTypeId="17" PostId="14627" RevisionGUID="e311033d-14b0-487d-801d-e175b041d65e" CreationDate="2011-07-09T00:25:09.377" UserId="-1" Comment="from http://superuser.com/questions/308317/c-sdl-opengl-3d-game" Text="" />
  <row Id="32875" PostHistoryTypeId="17" PostId="14628" RevisionGUID="dc2330ef-3e7b-4ea2-80cc-772896605cc1" CreationDate="2011-07-09T00:25:09.377" UserId="-1" Comment="from http://superuser.com/questions/308317/c-sdl-opengl-3d-game" Text="" />
  <row Id="32876" PostHistoryTypeId="2" PostId="14628" RevisionGUID="cb9eed6d-9f75-44ba-ae65-e1c1ff468c08" CreationDate="2011-07-08T23:28:31.637" UserDisplayName="Nate Koppenhaver" Text="This function (`loadTexture()`) appears to be for loading textures, not rendering 3D models.  &#xD;&#xA;[Here](http://www.euclideanspace.com/software/games/setup/openglcpp/introduction/index.htm)  is a tutorial on C++ OpenGL, it starts out basic, but goes into 3D rendering farther on in the tutorial" />
  <row Id="32877" PostHistoryTypeId="2" PostId="14627" RevisionGUID="e88ea12d-1ab2-4505-91ca-7dde7a8a87aa" CreationDate="2011-07-08T22:57:38.450" UserDisplayName="Leandro" Text="Hello everybody if this Question doenst belong to this section please feel free to move it to the right one.&#xD;&#xA;&#xD;&#xA;I have been learning C++ for long time and I have made a simple game Using 2D textures loader.&#xD;&#xA;&#xD;&#xA;I must add I have been on game developing stuff for not much time (8 days)&#xD;&#xA;&#xD;&#xA;But I was thinking of beggining on 3D game development with my cousins...&#xD;&#xA;&#xD;&#xA;And I began by loading/rendering a 3D model on the program but I dont know how.&#xD;&#xA;&#xD;&#xA;Can anybody tell me if this function could be changed to output 3D model:&#xD;&#xA;&#xD;&#xA;    GLuint loadTexture( const string &amp;fileName )&#xD;&#xA;    {&#xD;&#xA;    SDL_Surface *image = IMG_Load( fileName.c_str() );&#xD;&#xA; &#xD;&#xA;    SDL_DisplayFormatAlpha(image);&#xD;&#xA; &#xD;&#xA;    unsigned object(0);&#xD;&#xA; &#xD;&#xA;    glGenTextures(1, &amp;object);&#xD;&#xA; &#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, object);&#xD;&#xA; &#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA; &#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;   &#xD;&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image -&gt; w, image -&gt; h, 0, GL_RGBA,     &#xD;&#xA;    GL_UNSIGNED_BYTE, image -&gt; pixels);&#xD;&#xA; &#xD;&#xA;    //Free surface&#xD;&#xA;    SDL_FreeSurface(image);&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Also what format should I use for this:&#xD;&#xA;&#xD;&#xA;I have seen on blender this formats:&#xD;&#xA;&#xD;&#xA;COLLADA (.dae)&#xD;&#xA;&#xD;&#xA;STANDFOR (.ply)&#xD;&#xA;&#xD;&#xA;STL (.stl)&#xD;&#xA;&#xD;&#xA;3D STUDIO (.3ds)&#xD;&#xA;&#xD;&#xA;AUTODESK FBX (.fbx)&#xD;&#xA;&#xD;&#xA;WAVEFRONT OBJ (.obj)&#xD;&#xA;&#xD;&#xA;3D EXTENSIBLE (.x3d)&#xD;&#xA;&#xD;&#xA;I dont know wich should be the best for this kind of stuff and for serious Game developing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can anybody help on this matter please, and please do not flame me." />
  <row Id="32878" PostHistoryTypeId="1" PostId="14627" RevisionGUID="e88ea12d-1ab2-4505-91ca-7dde7a8a87aa" CreationDate="2011-07-08T22:57:38.450" UserDisplayName="Leandro" Text="C++ SDL, Opengl 3D Game..." />
  <row Id="32879" PostHistoryTypeId="3" PostId="14627" RevisionGUID="e88ea12d-1ab2-4505-91ca-7dde7a8a87aa" CreationDate="2011-07-08T22:57:38.450" UserDisplayName="Leandro" Text="&lt;c++&gt;" />
  <row Id="32880" PostHistoryTypeId="25" PostId="14624" RevisionGUID="47ea3a60-6426-452e-873f-15aa24e8f4a4" CreationDate="2011-07-09T00:28:00.013" Comment="http://twitter.com/#!/StackGameDev/status/89490949876617217" />
  <row Id="32881" PostHistoryTypeId="6" PostId="14627" RevisionGUID="1f7a94b4-8e48-4e9b-b38b-e94c9608985b" CreationDate="2011-07-09T00:29:44.800" UserId="8495" Comment="Added tags" Text="&lt;c++&gt;&lt;game-design&gt;" />
  <row Id="32882" PostHistoryTypeId="5" PostId="14627" RevisionGUID="5bce2855-9e93-4530-9903-ca24212571ae" CreationDate="2011-07-09T00:40:16.183" UserId="1430" Comment="deleted 341 characters in body; edited tags" Text="I have been learning C++ for long time (but only learning game development for eight days) and I have made a simple game using 2D textures.&#xD;&#xA;&#xD;&#xA;I was thinking of starting on 3D game development. I wanted to begin by loading and rendering a 3D model on the program, but I dont know how.&#xD;&#xA;&#xD;&#xA;Can anybody tell me if this function could be changed to output 3D model:&#xD;&#xA;&#xD;&#xA;    GLuint loadTexture( const string &amp;fileName )&#xD;&#xA;    {&#xD;&#xA;    SDL_Surface *image = IMG_Load( fileName.c_str() );&#xD;&#xA; &#xD;&#xA;    SDL_DisplayFormatAlpha(image);&#xD;&#xA; &#xD;&#xA;    unsigned object(0);&#xD;&#xA; &#xD;&#xA;    glGenTextures(1, &amp;object);&#xD;&#xA; &#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, object);&#xD;&#xA; &#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xD;&#xA; &#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xD;&#xA;    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xD;&#xA;   &#xD;&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image -&gt; w, image -&gt; h, 0, GL_RGBA,     &#xD;&#xA;    GL_UNSIGNED_BYTE, image -&gt; pixels);&#xD;&#xA; &#xD;&#xA;    //Free surface&#xD;&#xA;    SDL_FreeSurface(image);&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Also what format should I use for this? I am using Blender, and I have seen it can export to a variety of formats. I don't know which would be the best for this kind of stuff and for serious game development." />
  <row Id="32883" PostHistoryTypeId="6" PostId="14627" RevisionGUID="5bce2855-9e93-4530-9903-ca24212571ae" CreationDate="2011-07-09T00:40:16.183" UserId="1430" Comment="deleted 341 characters in body; edited tags" Text="&lt;c++&gt;&lt;3d-meshes&gt;&lt;file-format&gt;" />
  <row Id="32884" PostHistoryTypeId="2" PostId="14629" RevisionGUID="29c805f3-f2e0-4277-a8d6-0a391007c1e9" CreationDate="2011-07-09T00:47:37.547" UserId="7640" Text="Hey i'm working with SFML right now, and upon finishing the tutorials i still do not know how to give a shape a texture or image, and not just a solid color/outline. &#xD;&#xA;&#xD;&#xA;The only thing i know can take an image is a sprite, but thats WAY to simple, as it only allows you to render rectangular images in a rectangluar way!&#xD;&#xA;&#xD;&#xA;**What are the tecniques for rendering images onto shapes, and ONLY inside the shape?** It would be great if some of you could provide some resources or SFML-specific stuff!" />
  <row Id="32885" PostHistoryTypeId="1" PostId="14629" RevisionGUID="29c805f3-f2e0-4277-a8d6-0a391007c1e9" CreationDate="2011-07-09T00:47:37.547" UserId="7640" Text="How to Render images/textures in shape/ polygon form?" />
  <row Id="32886" PostHistoryTypeId="3" PostId="14629" RevisionGUID="29c805f3-f2e0-4277-a8d6-0a391007c1e9" CreationDate="2011-07-09T00:47:37.547" UserId="7640" Text="&lt;c++&gt;&lt;textures&gt;&lt;image&gt;&lt;sfml&gt;&lt;polygon&gt;" />
  <row Id="32887" PostHistoryTypeId="2" PostId="14630" RevisionGUID="801bf498-00c7-4750-9242-188e1308addf" CreationDate="2011-07-09T00:49:26.580" UserId="1430" Text="Be warned that the transition into 3D graphics from 2D is much more difficult than the transition into 2D graphics initially. It is much more important to understand the fundamental mathematics involved in 3D graphics, lest you end up breaking your code in ways that won't seem to obvious. I would recommend you familiarize yourself with basic linear algebra, matrices and vectors. If you have the resources, purchasing the books &quot;A Geometry Toolbox&quot; and/or &quot;Fundamentals of Computer Graphics, 3rd Ed,&quot; would be great.&#xD;&#xA;&#xD;&#xA;That said, it sounds like the crux of your specific question has to do with loading 3D models. You won't really be able to adapt your existing texture loading function for that purpose (although you will still find texture loading useful when you want to apply textures to your models).&#xD;&#xA;&#xD;&#xA;Blender can indeed export a variety of formats -- there is no such thing as the &quot;best&quot; choice here, as all options have pros and cons. Some, however, have more of one or the other. Starting out, I would recommend you try to parse and load the [.obj file format][1]. It's very straightforward, and you should be able to find a variety of example code and tutorials online to help you load it if you get stuck. &#xD;&#xA;&#xD;&#xA;There's also the [.smd file format][2], which is only slightly more complex and supports animation.&#xD;&#xA;&#xD;&#xA;If you prefer to avoid writing the loaders yourself, you can use a 3rd party library like the [Open Asset Importer Library][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.royriggs.com/obj.html&#xD;&#xA;  [2]: http://developer.valvesoftware.com/wiki/Studiomdl_Data&#xD;&#xA;  [3]: http://assimp.sourceforge.net/lib_html/index.html" />
  <row Id="32888" PostHistoryTypeId="5" PostId="14629" RevisionGUID="46a1ccfd-2a9d-45c7-af85-a0fffd456feb" CreationDate="2011-07-09T00:50:35.923" UserId="1430" Comment="deleted 1 characters in body; edited title" Text="I'm working with SFML right now, and upon finishing the tutorials I still do not know how to give a shape a texture or image -- not just a solid color/outline. &#xD;&#xA;&#xD;&#xA;The only thing I know can take an image is a sprite, but thats *way* to simple, as it only allows you to render rectangular images in a rectangluar way!&#xD;&#xA;&#xD;&#xA;**What are the techniques for rendering images onto shapes, and *only* inside the shape?** It would be great if some of you could provide some resources or SFML-specific stuff!" />
  <row Id="32889" PostHistoryTypeId="4" PostId="14629" RevisionGUID="46a1ccfd-2a9d-45c7-af85-a0fffd456feb" CreationDate="2011-07-09T00:50:35.923" UserId="1430" Comment="deleted 1 characters in body; edited title" Text="How to render images/textures in shape/polygon form?" />
  <row Id="32890" PostHistoryTypeId="2" PostId="14631" RevisionGUID="a73ec088-07e0-4041-a266-f9db065d848d" CreationDate="2011-07-09T01:00:10.143" UserId="1430" Text="I don't think you can do this directly using SFML. It looks like the [shape][2] class will not support texture mapping; allegedly it is a planned feature for the next version ([discussion][1]).&#xD;&#xA;&#xD;&#xA;Depending on the kind of visual effect you are going for -- I didn't find your description entirely clear -- you could do something like using a shape to mask a sprite, as described [in this post][3] (scroll down a ways, there's an image with the example result), or you could use OpenGL directly to render a series of texture-mapped triangles with the image mapped appropriately using texture coordinates.&#xD;&#xA;&#xD;&#xA;Note that while sprites are rectangular in their nature, you can achieve the visual result of a non-rectangular image by including transparency (typically via the alpha channel of the image), and that may be all you need to achieve your desired visual result.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org/forum/viewtopic.php?p=31705&amp;sid=52d89587c868fd0c9e96d8ae4c776219&#xD;&#xA;  [2]: http://www.sfml-dev.org/documentation/1.6/classsf_1_1Shape.php&#xD;&#xA;  [3]: http://pjmendes.blogspot.com/2010/09/how-to-do-masking-in-sfml-with-opengl.html" />
  <row Id="32891" PostHistoryTypeId="5" PostId="123" RevisionGUID="5461a6f7-3c73-47a6-9c2f-62ff1f3f1557" CreationDate="2011-07-09T03:13:50.117" UserId="55" Comment="deleted 14 characters in body" Text="My post is directed in how to approach game development.  &#xD;&#xA;&#xD;&#xA;**New to programming? How about a Language**  &#xD;&#xA;Decide what language you would like to use. The basis for this answer will revolve around what you really want to do. Do you want to create XBLA games? Then you're going to learn C#. Do you want to create Android games? Then you're going to need to learn Java. How about iPhone games? You'll need to learn Objective-C.&#xD;&#xA;&#xD;&#xA;At this point I wouldn't worry about what is hard and what is not. If you really want to make games pick a language and go. There are plenty of resources out there which will teach you the syntax.&#xD;&#xA;&#xD;&#xA;**Starting on the right foot**  &#xD;&#xA;Many people have really ambitious dreams when they start game development. &quot;I want to create a Game Engine!&quot;  You absolutely need to start small. Learn the boring stuff and attempt to find ways to give yourself some eye candy.&#xD;&#xA;&#xD;&#xA;What this means is that if you choose C++, spend a lot of time with the language. Learn pointers, learn memory management, play with complexity of algorithms. Go find an open source project, download it, and see how they structured their game. &#xD;&#xA;&#xD;&#xA;Along the way, do fun things. Create a console based adventure game that actually uses what you've learned. &#xD;&#xA;&#xD;&#xA;**If you have experience programming**  &#xD;&#xA;Create a clone of a 2D game. Pick one. Breakout? Tetris? Add your own twist to the game. The biggest key that I can tell you is to start small and work your way up. Create a project, show it to some people on [gamedev.net][1] and get feedback. &#xD;&#xA;&#xD;&#xA;Once you think you've got it down, then jump into the 3D realm. 3D is extremely hard. If you're new you are going to face plant yourself just has hard.&#xD;&#xA;&#xD;&#xA;**But I'm an Artist, or Sound guy!**  &#xD;&#xA;There are plenty of programmers out there that are tired of looking at their own programmer art and listening to some really crappy effects they found online. Go to tigsource.com and meet some people. But be humble about it. If you have no experience in games and little industry experience, don't expect to get paid. Independents love what they do. So much that they don't really focus on the money initially. &#xD;&#xA;&#xD;&#xA;**Conclusion**  &#xD;&#xA;&#xD;&#xA; - Be prepared to experiment a lot&#xD;&#xA; - Crawl before you walk&#xD;&#xA; - Be humble and help people for free to get experience&#xD;&#xA; - Be patient&#xD;&#xA; - Be a regular on [tigsource.com][2] and [gamedev.net][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net&#xD;&#xA;  [2]: http://www.tigsource.com&#xD;&#xA;  [3]: http://www.gamedev.net" />
  <row Id="32892" PostHistoryTypeId="25" PostId="14598" RevisionGUID="e21e0280-107b-44be-91b8-8e6e7a3841e3" CreationDate="2011-07-09T03:29:02.880" Comment="http://twitter.com/#!/StackGameDev/status/89536512710021121" />
  <row Id="32893" PostHistoryTypeId="8" PostId="123" RevisionGUID="05dc82bd-ea53-4cf9-9418-d90d1357db3a" CreationDate="2011-07-09T03:41:19.687" UserId="55" Comment="Rollback to [c4485c89-6d96-401c-9b09-3d735398b620]" Text="My post is directed in how to approach game development.  &#xD;&#xA;&#xD;&#xA;**New to programming? How about a Language**  &#xD;&#xA;Decide what language you would like to use. The basis for this answer will revolve around what you really want to do. Do you want to create XBLA games? Then you're going to learn C#. Do you want to create Android games? Then you're going to need to learn Java. How about iPhone games? You'll need to learn Objective-C.&#xD;&#xA;&#xD;&#xA;At this point I wouldn't worry about what is hard and what is not. If you really want to make games pick a language and go. There are plenty of resources out there which will teach you the syntax.&#xD;&#xA;&#xD;&#xA;**Starting on the right foot**  &#xD;&#xA;Many people have really ambitious dreams when they start game development. &quot;I want to create a Game Engine!&quot;  You absolutely need to start small. Learn the boring stuff and attempt to find ways to give yourself some eye candy.&#xD;&#xA;&#xD;&#xA;What this means is that if you choose C++, spend a lot of time with the language. Learn pointers, learn memory management, play with complexity of algorithms. Go find an open source project, download it, and see how they structured their game. &#xD;&#xA;&#xD;&#xA;Along the way, do fun things. Create a console based adventure game that actually uses what you've learned. &#xD;&#xA;&#xD;&#xA;**If you have experience programming**  &#xD;&#xA;Create a clone of a 2D game (2D! NOT 4D!). Pick one. Breakout? Tetris? Add your own twist to the game. The biggest key that I can tell you is to start small and work your way up. Create a project, show it to some people on [gamedev.net][1] and get feedback. &#xD;&#xA;&#xD;&#xA;Once you think you've got it down, then jump into the 3D realm. 3D is extremely hard. If you're new you are going to face plant yourself just has hard.&#xD;&#xA;&#xD;&#xA;**But I'm an Artist, or Sound guy!**  &#xD;&#xA;There are plenty of programmers out there that are tired of looking at their own programmer art and listening to some really crappy effects they found online. Go to tigsource.com and meet some people. But be humble about it. If you have no experience in games and little industry experience, don't expect to get paid. Independents love what they do. So much that they don't really focus on the money initially. &#xD;&#xA;&#xD;&#xA;**Conclusion**  &#xD;&#xA;&#xD;&#xA; - Be prepared to experiment a lot&#xD;&#xA; - Crawl before you walk&#xD;&#xA; - Be humble and help people for free to get experience&#xD;&#xA; - Be patient&#xD;&#xA; - Be a regular on [tigsource.com][2] and [gamedev.net][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net&#xD;&#xA;  [2]: http://www.tigsource.com&#xD;&#xA;  [3]: http://www.gamedev.net" />
  <row Id="32894" PostHistoryTypeId="2" PostId="14632" RevisionGUID="f797dc79-bca5-4e2d-afbc-d946abfbc55f" CreationDate="2011-07-09T04:34:27.763" UserId="2061" Text="Not sure what you're trying to accomplish, but that doesn't look right at all:&#xD;&#xA;&#xD;&#xA; * You are calling a `wait` inside the loop, meaning if there are two units in the `heroSpellUG` group, the second unit will not get the `Berserking Power Damage` attribute until *after* `Berserking Power Damage` has been added and removed from the first unit (~ 6 seconds later)&#xD;&#xA; * Because this is being called asynchronously (every time a unit casts `Berserking Power`), and you are adding and removing from a unit-group inside a loop, you are almost certainly opening yourself up to [race conditions][1] that occur when two units cast `Berserking Power` at the same time.&#xD;&#xA;&#xD;&#xA;It's been a while since I've done any WC3 scripting, but what you probably want to do is add the ability to *only* that unit, then create a timer which takes away the ability when it expires.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Race_condition#Computing" />
  <row Id="32895" PostHistoryTypeId="2" PostId="14633" RevisionGUID="966859da-b955-4e47-a316-83aa63b1f594" CreationDate="2011-07-09T05:39:54.650" UserId="8408" Text="So I've been fighting my way through learning the DirectX 11 API with what little documentation there is out there and noticed some new D3D11 warnings in my debug output. (Atleast I think they are new, been rearranging my draw calls to try and solve another problem I'm experiencing at the moment) Anywho, with some Google-fu I've been unable to find any documentation on the error codes or anything but the general consensus of forums seems to be that the COM objects aren't properly being released.&#xD;&#xA;&#xD;&#xA;Now the question is, if that is indeed what the warnings mean, what else do I need to do to kill these things other then call their Release() functions? And is there somewhere this kind of information is posted? I sure can't find it on MSDN or Google. Just lots of confused DX11 post with unanswered questions.&#xD;&#xA;&#xD;&#xA;Here is the debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: WARNING: Live Device: Name=&quot;unnamed&quot;, Addr=0x004C6488, ExtRef=5 [ STATE_CREATION WARNING #2097297: LIVE_DEVICE ]&#xD;&#xA;    D3D11: WARNING: Live Texture2D: Name=&quot;unnamed&quot;, Addr=0x04552E94, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]&#xD;&#xA;    D3D11: WARNING: Live Buffer: Name=&quot;unnamed&quot;, Addr=0x04552A64, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]&#xD;&#xA;    D3D11: WARNING: Live Buffer: Name=&quot;unnamed&quot;, Addr=0x04566ECC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]&#xD;&#xA;    D3D11: WARNING: Live InputLayout: Name=&quot;unnamed&quot;, Addr=0x0455280C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097265: LIVE_INPUTLAYOUT ]&#xD;&#xA;    D3D11: WARNING: Live PixelShader: Name=&quot;unnamed&quot;, Addr=0x004CDDE4, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097262: LIVE_PIXELSHADER ]&#xD;&#xA;    D3D11: WARNING: Live VertexShader: Name=&quot;unnamed&quot;, Addr=0x04553944, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097250: LIVE_VERTEXSHADER ]&#xD;&#xA;    D3D11: WARNING: Live RenderTargetView: Name=&quot;unnamed&quot;, Addr=0x0455269C, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097244: LIVE_RENDERTARGETVIEW ]&#xD;&#xA;    D3D11: WARNING: Live Texture2D: Name=&quot;unnamed&quot;, Addr=0x04552214, ExtRef=4294967295, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]&#xD;&#xA;    D3D11: WARNING: Live Query: Name=&quot;unnamed&quot;, Addr=0x004C84AC, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097280: LIVE_QUERY ]&#xD;&#xA;    D3D11: WARNING: Live Sampler: Name=&quot;unnamed&quot;, Addr=0x004C8274, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097268: LIVE_SAMPLER ]&#xD;&#xA;    D3D11: WARNING: Live RasterizerState: Name=&quot;unnamed&quot;, Addr=0x004C804C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097277: LIVE_RASTERIZERSTATE ]&#xD;&#xA;    D3D11: WARNING: Live DepthStencilState: Name=&quot;unnamed&quot;, Addr=0x004C7E24, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097274: LIVE_DEPTHSTENCILSTATE ]&#xD;&#xA;    D3D11: WARNING: Live BlendState: Name=&quot;unnamed&quot;, Addr=0x004C7C6C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097271: LIVE_BLENDSTATE ]&#xD;&#xA;    D3D11: WARNING: Live Context: Name=&quot;unnamed&quot;, Addr=0x0453006C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT ]&#xD;&#xA;    D3D11: WARNING: Live Device Child Summary: Device Addr=0x004C6488&#xD;&#xA;    Using ID3D11Debug::ReportLiveDeviceObjects with D3D11_RLDO_DETAIL will help drill into object lifetimes. Objects with ExtRef=0 and IntRef=0 will be eventually destroyed through typical Immediate Context usage. However, if the application requires these objects to be destroyed sooner, ClearState followed by Flush on the Immediate Context will realize their destruction.&#xD;&#xA;&#xD;&#xA;Note: Clearing and Flushing the device context doesn't seem to affect anything.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA; " />
  <row Id="32896" PostHistoryTypeId="1" PostId="14633" RevisionGUID="966859da-b955-4e47-a316-83aa63b1f594" CreationDate="2011-07-09T05:39:54.650" UserId="8408" Text="What do these STATE_CREATION warnings mean in the DX11 debug output?" />
  <row Id="32897" PostHistoryTypeId="3" PostId="14633" RevisionGUID="966859da-b955-4e47-a316-83aa63b1f594" CreationDate="2011-07-09T05:39:54.650" UserId="8408" Text="&lt;directx11&gt;" />
  <row Id="32898" PostHistoryTypeId="5" PostId="14466" RevisionGUID="5c3fdd8e-4e93-44ac-8903-58dd703070ce" CreationDate="2011-07-09T05:46:54.987" UserId="8408" Comment="added 317 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = 0;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    template &lt;class V&gt;&#xD;&#xA;    bool Mesh&lt;V&gt;::Render() {&#xD;&#xA;	pDeviceContext-&gt;IASetInputLayout(pVertexLayout);&#xD;&#xA;	pDeviceContext-&gt;IASetPrimitiveTopology(topologyType);&#xD;&#xA;	pDeviceContext-&gt;VSSetShader(pVShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;PSSetShader(pPShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;Draw(bufSize, 0);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Jumped the gun, thought I found the solution. Same issue and warning remains.&#xD;&#xA;&#xD;&#xA;Here is the shader initialization code&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;     bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;        // Replace with Int hash value!!!!&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Pixel Shader.&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }" />
  <row Id="32899" PostHistoryTypeId="2" PostId="14634" RevisionGUID="1d47ac5b-80e2-4873-85fe-edbe89aa5e85" CreationDate="2011-07-09T05:55:47.600" UserId="8408" Text="I'm pretty new to shaders myself but I've been reading the GPU Pro books by Wolfgang Engel. They've been blowing me away with how incredibly easy and powerful the techniques are. Also the content isn't discussed like most academic text either, it focuses more on implementation details and the trade offs between different techniques.&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/GPU-Pro-Advanced-Rendering-Techniques/dp/1568814720%3FSubscriptionId%3D008XA1X9NAPEJGHQX182%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1568814720&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/GPU-Pro-2-Wolfgang-Engel/dp/1568817185%3FSubscriptionId%3D008XA1X9NAPEJGHQX182%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1568817185" />
  <row Id="32900" PostHistoryTypeId="16" PostId="14634" RevisionGUID="f837c776-dd71-4acb-93be-5be6d6977483" CreationDate="2011-07-09T05:55:47.600" UserId="8408" />
  <row Id="32901" PostHistoryTypeId="5" PostId="14603" RevisionGUID="8f7a66b5-23c4-46bf-9be5-125e109b64df" CreationDate="2011-07-09T06:10:05.747" UserId="2698" Comment="Some of this information is flat out wrong. Tangent is used to find the angle. Arctangent is used when you already know the angle. Actually I'm giving up at this point, but at least I've managed to stop this answer being completely wrong." Text="The tangent relation is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![Diagram of a right-angled triangle, with an angle theta and its opposite and adjacent sides marked][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and `theta` is the angle.&#xD;&#xA;&#xD;&#xA;If you know the values of both the opposite and adjacent sides, you can get the value of the angle with `tan`. If all you know is the angle, you can determine the ratio of the side lengths (i.e. opposite vs adjacent) with `atan`, also known as the _arc-tangent_ or the _inverse tangent_.&#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0). Remembering that `tan(angle) = opposite/adjacent` the potential for a disastrous divide-by-zero error should be clear. So a lot of libraries offer a function called `atan2`, which lets you specify both the `x` and `y` parameters, to avoid the division by zero for you.&#xD;&#xA;&#xD;&#xA;The use of trigonometry in game development is pretty common, especially with vectors, but usually libraries hide the trigonometry work for you. You can use sin/cos/tan for a lot of tasks which involve geometric manipulations to find a value from a triangle. All you need is 3 values (side lengths / angle values) to find the other values of a rectangle triangle, so it's quite useful.&#xD;&#xA;&#xD;&#xA;You can even use the &quot;cycling&quot; nature of the sine and cosine functions for special behaviors in a game, e.g. I've seen cos/sin used a lot to make an object turn around an other one.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png" />
  <row Id="32902" PostHistoryTypeId="24" PostId="14603" RevisionGUID="8f7a66b5-23c4-46bf-9be5-125e109b64df" CreationDate="2011-07-09T06:10:05.747" Comment="Proposed by 2698 approved by 51 edit id of 551" />
  <row Id="32903" PostHistoryTypeId="2" PostId="14635" RevisionGUID="057e4c47-7931-4517-ba8d-37bea0dc83a4" CreationDate="2011-07-09T06:21:28.397" UserId="1430" Text="The warnings are informing you of live (unreleased) objects, as you've discovered. Releasing the objects you retain references to is the proper way to clean them up, but you have to release the right objects. There are several ways you can get help tracking down which objects are being retained and from there you can follow the lifetime of those objects through your code and determine where you are missing calls to decrement the COM reference count.&#xD;&#xA;&#xD;&#xA;The first thing to do is look at the `ExtRef` and `IntRef` columns. `IntRef` refers to the number of internal references to the object, within D3D itself. These aren't your responsibility to free, but they are an indicator that you're probably holding an external reference to something that is itself holding an *internal* reference to those objects. &#xD;&#xA;&#xD;&#xA;The `ExtRef` column indicates the number of references that your holding. In this case, you appear to have five outstanding references to the D3D device itself, and the device is probably holding references to all the objects with internal reference counts, leaking them. Tracking down where you need to add additional calls to `Release` on your device will probably solve most of your problems. You also appear to have outstanding references to some shader and buffer objects.&#xD;&#xA;&#xD;&#xA;You can also, as the last line of the output suggests, use the [ID3D11Debug interface][1]'s [ReportLiveDeviceObjects][2] method to get more information on where these objects are coming from and what might be holding on to a reference to them. Do note that the message's talk of clearing and flushing refers to objects with zero internal *and* external references -- most of the objects in your report wouldn't be cleaned up by doing that, as you've discovered.&#xD;&#xA;&#xD;&#xA;Finally, take a look at [this post][3] by Chuck Walbourn which details giving your objects unique names to replace the &quot;unnamed&quot; strings in the output, which may also help narrow down the problem.&#xD;&#xA;&#xD;&#xA;Without code -- and I presume you have too much of it to reasonably post here -- it's hard to provide more specific direction, unfortunately.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476366%28v=vs.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ff476370%28v=vs.85%29.aspx&#xD;&#xA;  [3]: http://blogs.msdn.com/b/chuckw/archive/2010/04/15/object-naming.aspx" />
  <row Id="32904" PostHistoryTypeId="25" PostId="14576" RevisionGUID="486644fa-53ce-4f14-9a11-2c973afe1068" CreationDate="2011-07-09T06:29:03.833" Comment="http://twitter.com/#!/StackGameDev/status/89581815337189376" />
  <row Id="32905" PostHistoryTypeId="5" PostId="14635" RevisionGUID="fef18b7e-129e-47bc-b301-618808a41c90" CreationDate="2011-07-09T06:34:56.043" UserId="1430" Comment="added 344 characters in body" Text="The warnings are informing you of live (unreleased) objects, as you've discovered. Releasing the objects you retain references to is the proper way to clean them up, but you have to release the right objects. There are several ways you can get help tracking down which objects are being retained and from there you can follow the lifetime of those objects through your code and determine where you are missing calls to decrement the COM reference count.&#xD;&#xA;&#xD;&#xA;The first thing to do is look at the `ExtRef` and `IntRef` columns. `IntRef` refers to the number of internal references to the object, within D3D itself. These aren't your responsibility to free, but they are an indicator that you're probably holding an external reference to something that is itself holding an *internal* reference to those objects. &#xD;&#xA;&#xD;&#xA;The `ExtRef` column indicates the number of references that your holding. In this case, you appear to have five outstanding references to the D3D device itself, and the device is probably holding references to all the objects with internal reference counts, leaking them. Tracking down where you need to add additional calls to `Release` on your device will probably solve most of your problems. You also appear to have outstanding references to some shader and buffer objects.&#xD;&#xA;&#xD;&#xA;You can also, as the last line of the output suggests, use the [ID3D11Debug interface][1]'s [ReportLiveDeviceObjects][2] method to get more information on where these objects are coming from and what might be holding on to a reference to them. &#xD;&#xA;&#xD;&#xA;Finally, take a look at [this post][3] by Chuck Walbourn which details giving your objects unique names to replace the &quot;unnamed&quot; strings in the output, which may also help narrow down the problem.&#xD;&#xA;&#xD;&#xA;Without code -- and I presume you have too much of it to reasonably post here -- it's hard to provide more specific direction, unfortunately.&#xD;&#xA;&#xD;&#xA;Two other notes:&#xD;&#xA;&#xD;&#xA; * The message's talk of clearing and flushing refers to objects with zero internal *and* external references -- most of the objects in your report wouldn't be cleaned up by doing that, as you've discovered.&#xD;&#xA; * &quot;STATE_CREATION&quot; is one of the predefined message categories used by the [D3D11 InfoQueue][4] class. I don't know for sure why this category is used for leak messages instead of the seemingly more appropriate &quot;CLEANUP&quot; category; I suspect it's a bug.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476366%28v=vs.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/ff476370%28v=vs.85%29.aspx&#xD;&#xA;  [3]: http://blogs.msdn.com/b/chuckw/archive/2010/04/15/object-naming.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/ff476538%28v=VS.85%29.aspx" />
  <row Id="32906" PostHistoryTypeId="2" PostId="14636" RevisionGUID="3ba369b7-7e00-45d9-a192-f29089a19702" CreationDate="2011-07-09T07:26:17.623" UserId="4180" Text="I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update/draw code to maximize performance without limiting the drawing rate and provide a constant logic update rate based on time?&#xD;&#xA;&#xD;&#xA;My current pseudo code is as follows&#xD;&#xA;&#xD;&#xA;    loop&#xD;&#xA;    {&#xD;&#xA;        draw();&#xD;&#xA;        if (ticksElapsed() &gt; 100)&#xD;&#xA;        {&#xD;&#xA;            update();&#xD;&#xA;            ticks+= ticksElapsed();&#xD;&#xA;        }        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The problem is the drawing code hinders the performance of the update() rate. And it consumes 100% cpu because if sleep is thrown in, it throws off both drawing/logic functions.&#xD;&#xA;&#xD;&#xA;I am also using SDL and it doesn't seem to have a vsync option. I've also heard of the terms fixed and variable time-stepping however I'm not sure how that can be done with sleep()" />
  <row Id="32907" PostHistoryTypeId="1" PostId="14636" RevisionGUID="3ba369b7-7e00-45d9-a192-f29089a19702" CreationDate="2011-07-09T07:26:17.623" UserId="4180" Text="Seperating logic/update from render/drawing code in a single thread using sleep" />
  <row Id="32908" PostHistoryTypeId="3" PostId="14636" RevisionGUID="3ba369b7-7e00-45d9-a192-f29089a19702" CreationDate="2011-07-09T07:26:17.623" UserId="4180" Text="&lt;sdl&gt;&lt;frame-rate&gt;&lt;logic&gt;&lt;fixed-timestep&gt;" />
  <row Id="32909" PostHistoryTypeId="5" PostId="14610" RevisionGUID="6ecb3bbf-7f41-46aa-8255-0ae1ef84f5d5" CreationDate="2011-07-09T07:29:15.693" UserId="8320" Comment="fixed a mistake spotted by joe" Text="Jesse and Sid are basically right, but I suspect you are really after insight into the problem.&#xD;&#xA;&#xD;&#xA;Atan2() is needed as atan() doesn't tell you the angle from the horizontal you need as   it doesn't cope with quadrants. The atan for angles(in degrees) 45, 135, 225 and 315 is pi/2.&#xD;&#xA;&#xD;&#xA;This means that using atan for vectors (-2,2) and (2,-2) will give the same value. You would then to switch on the sign of yours arguments and add pi to the result. In addition, you have the divide by zero special case to consider that Jesse mentioned. Also atan2() works better than atan when x is close to 0&#xD;&#xA;&#xD;&#xA;So you if you want the angle of a vector between 0 and 2*pi (in radians)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = atan2(y, x)&#xD;&#xA;    if (angle &lt; 0)&#xD;&#xA;      angle += 2*pi&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;N.B. This bakes in the range shift from (-pi, pi) to (0,2pi)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = calculateAngle(y, x)&#xD;&#xA;    &#xD;&#xA;    calculateAngle(double y, double x)&#xD;&#xA;    {&#xD;&#xA;      angle = 0&#xD;&#xA;      if (y == 0)&#xD;&#xA;      {&#xD;&#xA;         if (x &gt; 0)&#xD;&#xA;           angle = pi/2&#xD;&#xA;         else &#xD;&#xA;           angle = 3*(pi/2)&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        angle = atan(y/x)&#xD;&#xA;        if (x &lt; 0 &amp;&amp; y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }   &#xD;&#xA;        else if (x &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }&#xD;&#xA;        else if (y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += 2*pi;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      return angle&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32910" PostHistoryTypeId="5" PostId="14610" RevisionGUID="1422ae5c-7074-4a23-96b6-8e45e81cce12" CreationDate="2011-07-09T07:44:24.650" UserId="8320" Comment="deleted 62 characters in body" Text="Jesse and Sid are basically right, but I suspect you are really after insight into the problem.&#xD;&#xA;&#xD;&#xA;Atan2() is needed as atan() doesn't tell you the angle from the horizontal you need as   it doesn't cope with quadrants.&#xD;&#xA;&#xD;&#xA;This means that using atan for vectors (-2,2) and (2,-2) will give the same value. You would then to switch on the sign of yours arguments and add pi to the result. In addition, you have the divide by zero special case to consider that Jesse mentioned. Also atan2() works better than atan when x is close to 0&#xD;&#xA;&#xD;&#xA;So you if you want the angle of a vector between 0 and 2*pi (in radians)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = atan2(y, x)&#xD;&#xA;    if (angle &lt; 0)&#xD;&#xA;      angle += 2*pi&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;N.B. This bakes in the range shift from (-pi, pi) to (0,2pi)&#xD;&#xA;&#xD;&#xA;    x = -2&#xD;&#xA;    y = 2&#xD;&#xA;    angle = calculateAngle(y, x)&#xD;&#xA;    &#xD;&#xA;    calculateAngle(double y, double x)&#xD;&#xA;    {&#xD;&#xA;      angle = 0&#xD;&#xA;      if (y == 0)&#xD;&#xA;      {&#xD;&#xA;         if (x &gt; 0)&#xD;&#xA;           angle = pi/2&#xD;&#xA;         else &#xD;&#xA;           angle = 3*(pi/2)&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        angle = atan(y/x)&#xD;&#xA;        if (x &lt; 0 &amp;&amp; y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }   &#xD;&#xA;        else if (x &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += pi&#xD;&#xA;        }&#xD;&#xA;        else if (y &lt; 0)&#xD;&#xA;        {&#xD;&#xA;          angle += 2*pi;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      return angle&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32911" PostHistoryTypeId="2" PostId="14637" RevisionGUID="f61b22c3-6d91-41c7-953f-a98d58b7df29" CreationDate="2011-07-09T09:11:17.540" UserId="3162" Text="![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/xQiWG.png" />
  <row Id="32912" PostHistoryTypeId="25" PostId="14636" RevisionGUID="9466b36a-5f35-484b-87d9-947d92e07309" CreationDate="2011-07-09T09:29:03.163" Comment="http://twitter.com/#!/StackGameDev/status/89627111287046145" />
  <row Id="32913" PostHistoryTypeId="2" PostId="14638" RevisionGUID="5767757d-fc0b-428f-93c6-3000c6c9b01d" CreationDate="2011-07-09T10:23:53.437" UserId="5224" Text="In your code snippet it looks like you're trying to run your game in fixed-time step mode by busy-waiting if your drawing and updating took less then 15ms (60fps). This is possible and you guessed right that this can't be done using a sleep call because you don't exactly know how long you're going to sleep. The busy-waiting-loop is the good solution.&#xD;&#xA;&#xD;&#xA;However consider the case where your updating and drawing exceed 15ms, you now have the game drawing and updating to slow. You can now do either two things: detect this state and drop frames (skip drawing and go straight to updating until you are in sync again) however if the computer is just to slow it will never catch up.&#xD;&#xA;&#xD;&#xA;An other solution is to make your update logic fixed-time independent. You don't need a separate thread for this, you just have to respecify how fast things should move. Instead of 5pixels per tick, you should use 50pixels per second. You would need a high precision timer to achieve this, and all your update logic should be able to access the timer to see how much time passed since last update.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Basically you go from:&#xD;&#xA;&#xD;&#xA;    void UpdatePlayer()&#xD;&#xA;     player.x += 10;&#xD;&#xA;&#xD;&#xA;To&#xD;&#xA;&#xD;&#xA;    void UpdatePlayer(float elapsedSeconds) //the total seconds elapsed since last update&#xD;&#xA;     player.x += walkspeed * elapsedSeconds;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32914" PostHistoryTypeId="17" PostId="14639" RevisionGUID="c65ac186-c69f-47b1-bb6b-c4856afa2353" CreationDate="2011-07-09T10:34:24.927" UserId="-1" Comment="from http://stackoverflow.com/questions/6632582/non-blocking-vsync-in-direct3d" Text="" />
  <row Id="32915" PostHistoryTypeId="2" PostId="14639" RevisionGUID="fc611b69-f3eb-4f35-8a01-920a774b4c8d" CreationDate="2011-07-09T03:47:36.663" UserDisplayName="user757808" Text="I have direct3d application with a direct3d PRESENTATION_INTERVAL_ONE implementation. Pitty, its blocking and eating my CPU waiting for a Present. I ended up searching for Raster scan solutions, rip-offs of codes in internet, but non of them actually worked well - failing to do the exact timing prior to Present call.&#xD;&#xA;&#xD;&#xA;(Question starts)&#xD;&#xA;So, ideal solution for me would be using PRESENTATION_INTERVAL_ONE (or if its not possible - IMMEDIATE), calling a function &#xD;&#xA;&#xD;&#xA;    // blabla code&#xD;&#xA;    waitForVsync(); //loop here with sleeps or whatever, freeing my CPU&#xD;&#xA;    ()-&gt;Present();  //just in time, no blocking wait, yay!&#xD;&#xA;&#xD;&#xA;And upon a return I call Present, which is, lets say, 1ms for _ONE and 0ms for _IMMEDIATE prior to physical top scanline.&#xD;&#xA;&#xD;&#xA;I know I am asking a lot and do not hope for a solution in 2011 year, as Microsoft also has failed misserably too.&#xD;&#xA;&#xD;&#xA;To clarify the issue, I provide a link with a more detailed analysis of a problem:&#xD;&#xA;http://www.virtualdub.org/blog/pivot/entry.php?id=157" />
  <row Id="32916" PostHistoryTypeId="1" PostId="14639" RevisionGUID="fc611b69-f3eb-4f35-8a01-920a774b4c8d" CreationDate="2011-07-09T03:47:36.663" UserDisplayName="user757808" Text="Non blocking Vsync in direct3d" />
  <row Id="32917" PostHistoryTypeId="3" PostId="14639" RevisionGUID="fc611b69-f3eb-4f35-8a01-920a774b4c8d" CreationDate="2011-07-09T03:47:36.663" UserDisplayName="user757808" Text="&lt;c++&gt;&lt;directx&gt;&lt;vsync&gt;" />
  <row Id="32918" PostHistoryTypeId="2" PostId="14640" RevisionGUID="a9c5dc06-54ad-4d42-ae3d-056ae892c88a" CreationDate="2011-07-09T11:58:31.863" UserId="4410" Text="As this has moved to gamedev I'll assume it's game related, despite nothing that alludes to gaming in the question.&#xD;&#xA;&#xD;&#xA;The usual answer to letting the CPU carry on and do work once you hit a 'Present' is to double/triple buffer the backbuffer, which allows the CPU/GPU to start work on the next frame before the one you've just finished rendering has been displayed (if you didn't double-buffer then you'd be rendering the next frame over the one you'd just finished and would be a mess). The flip then is queued up behind the scenes and the CPU can carry on doing other work. If you don't do much in a frame it's possible you could hit 'Present' again before either of the backbuffers have been displayed and it could block again.&#xD;&#xA;&#xD;&#xA;Is the question above actually about 'VirtualDub' (as the info there seems to be from 2007), or is it related to making games? I'm still not sure exactly what it is you're trying to achieve or what you want to free the CPU up for prior to the Present occurring." />
  <row Id="32919" PostHistoryTypeId="5" PostId="14603" RevisionGUID="c92b7910-0216-44c1-b0e6-94a56703a291" CreationDate="2011-07-09T12:03:45.663" UserId="2111" Comment="added 40 characters in body" Text="The tangent relation is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![Diagram of a right-angled triangle, with an angle theta and its opposite and adjacent sides marked][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and `theta` is the angle.&#xD;&#xA;&#xD;&#xA;If you know the values of both the opposite and adjacent sides, you can get the value of the angle with `tan`. If all you know is the angle, you can determine the ratio of the side lengths (i.e. opposite vs adjacent) with `atan`, also known as the _arc-tangent_ or the _inverse tangent_.&#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0). Remembering that `tan(angle) = opposite/adjacent` the potential for a disastrous divide-by-zero error should be clear. So a lot of libraries offer a function called `atan2`, which lets you specify both the `x` and `y` parameters, to avoid the division by zero for you and give an angle in the right quadrant.&#xD;&#xA;&#xD;&#xA;The use of trigonometry in game development is pretty common, especially with vectors, but usually libraries hide the trigonometry work for you. You can use sin/cos/tan for a lot of tasks which involve geometric manipulations to find a value from a triangle. All you need is 3 values (side lengths / angle values) to find the other values of a rectangle triangle, so it's quite useful.&#xD;&#xA;&#xD;&#xA;You can even use the &quot;cycling&quot; nature of the sine and cosine functions for special behaviors in a game, e.g. I've seen cos/sin used a lot to make an object turn around an other one.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png" />
  <row Id="32920" PostHistoryTypeId="2" PostId="14641" RevisionGUID="38864a36-0e41-4ebf-9784-b62d6dfb0c55" CreationDate="2011-07-09T12:27:10.840" UserId="5125" Text="In video games I have programmed the approach was to have a function telling if your position is valid, ie.&#xD;&#xA;bool ValidPos(int x,int y, int wi,int he);&#xD;&#xA;&#xD;&#xA;The function checks the bounding box (x,y,wi,he) against all geometry in the game and returns false if there is any intersection.&#xD;&#xA;&#xD;&#xA;If you want to move, say to the right, take the player position, add 4 to x and check if the position is valid, if not, check with +3,+2 etc until it is.&#xD;&#xA;&#xD;&#xA;If you also need to have gravity you need a variable that grows as long as you dont hit the ground (hitting ground: ValidPos(x,y+1, wi,he) == true, y is positive downwards here).&#xD;&#xA;if you can move that distance (ie. ValidPos(x,y+gravity,wi,he) returns true) you are falling, useful sometimes when you shouldn't be able to control you character when falling.&#xD;&#xA;&#xD;&#xA;Now, your problem is that you have objects in your world that moves so first of all you need to check if your old position is still valid!&#xD;&#xA;&#xD;&#xA;If it is not, you need to find a position that is. If objects ingame can't move faster than say 2 pixels per game revolution, you would need to check if position (x,y-1) is valid, then (x,y-2) then (x+1,y) etc etc. the whole space between (x-2,y-2) to (x+2,y+2) should be checked.&#xD;&#xA;If there are no valid position then it means you have been 'crushed'.&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;Valmond" />
  <row Id="32921" PostHistoryTypeId="25" PostId="14516" RevisionGUID="e33adcd3-acd7-49c9-9caf-e9e07a42b1a5" CreationDate="2011-07-09T12:29:03.717" Comment="http://twitter.com/#!/StackGameDev/status/89672409472450560" />
  <row Id="32922" PostHistoryTypeId="5" PostId="14603" RevisionGUID="5951952c-f94a-4661-aee7-d229d0060fbd" CreationDate="2011-07-09T12:44:37.387" UserId="6588" Comment="added 268 characters in body" Text="The tangent relation is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![Diagram of a right-angled triangle, with an angle theta and its opposite and adjacent sides marked][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and `theta` is the angle. Similarly, sine and cosine are sin(ang)=o/h and cos(ang)=a/h where 'h' is the long side: http://www.mathwords.com/s/sohcahtoa.htm&#xD;&#xA;&#xD;&#xA;If you know the values of both the opposite and adjacent sides, you can get the value of the angle with `tan`. If all you know is the angle, you can determine the ratio of the side lengths (i.e. opposite vs adjacent) with `atan`, also known as the _arc-tangent_ or the _inverse tangent_.&#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0). Remembering that `tan(angle) = opposite/adjacent` the potential for a disastrous divide-by-zero error should be clear. So a lot of libraries offer a function called `atan2`, which lets you specify both the `x` and `y` parameters, to avoid the division by zero for you and give an angle in the right quadrant.&#xD;&#xA;&#xD;&#xA;![atan2 diagram][2]&#xD;&#xA;&#xD;&#xA;(diagram courtesy of gareth, please vote up his answer too)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The use of trigonometry in game development is pretty common, especially with vectors, but usually libraries hide the trigonometry work for you. You can use sin/cos/tan for a lot of tasks which involve geometric manipulations to find a value from a triangle. All you need is 3 values (side lengths / angle values) to find the other values of a rectangle triangle, so it's quite useful.&#xD;&#xA;&#xD;&#xA;You can even use the &quot;cycling&quot; nature of the sine and cosine functions for special behaviors in a game, e.g. I've seen cos/sin used a lot to make an object turn around an other one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/xQiWG.png" />
  <row Id="32923" PostHistoryTypeId="5" PostId="14589" RevisionGUID="38b69201-fd54-48fd-a2ac-047639ec2ddc" CreationDate="2011-07-09T12:59:25.197" UserId="3162" Comment="add note about cathode ray tubes and inverted Y axis" Text="It's just tradition. Neither system is objectively better than the other, so you just have to get used to using both and switching between them from time to time!&#xD;&#xA;&#xD;&#xA;Right-handed coordinates are traditional for *modelling* where one imagines the XY-plane to be horizontal, and the Z-axis to be vertical.&#xD;&#xA;&#xD;&#xA;Left-handed coordinates are traditional for *cameras* where one imagines the XY-plane to be vertical (corresponding to screen coordinates if the camera is upright), and the Z-axis is into the screen (corresponding to the Z in the Z-buffer).&#xD;&#xA;&#xD;&#xA;So modelling applications like Blender often use right-handed coordinates and game development toolkits like Unity often use left-handed coordinates. But some systems go the other way: RenderMan is left-handed, and OpenGL is right-handed (or at least early versions were, it's fairly agnostic now).&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Another reason why handedness can differ is because of different conventions about the direction of the Y axis in two dimensions. Back in those far-off days when computer displays used cathode ray tubes, the display was scanned from top to bottom and left to right by the electron beam. So it was convenient to have the Y axis running down the screen, with the coordinate origin in the top left. On the other hand, it's conventional in mathematics for the Y axis to point upwards, with the coordinate origin in the bottom left. When you add a Z axis, these conventions give rise to three-dimensional coordinate systems of different handedness." />
  <row Id="32924" PostHistoryTypeId="5" PostId="14603" RevisionGUID="0bd877dc-8688-442e-862f-e2d2384b0914" CreationDate="2011-07-09T13:03:52.800" UserId="2698" Comment="Dear moderators: I am an idiot. Please assist me in undoing my idiocy." Text="The tangent relation is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![Diagram of a right-angled triangle, with an angle theta and its opposite and adjacent sides marked][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and `theta` is the angle.&#xD;&#xA;&#xD;&#xA;(Similarly, sine and cosine are `sin(angle) = o/h` and `cos(angle)= a/h` where `h` is the long side: http://www.mathwords.com/s/sohcahtoa.htm)&#xD;&#xA;&#xD;&#xA;If you know the values of both the opposite and adjacent sides, you can get the value of the angle with `atan`. If all you know is the angle, you can determine the ratio of the side lengths (i.e. opposite vs adjacent) with `tan`, also known as the _arc-tangent_ or the _inverse tangent_.&#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0). Remembering that `tan(angle) = opposite/adjacent` the potential for a disastrous divide-by-zero error should be clear. So a lot of libraries offer a function called `atan2`, which lets you specify both the `x` and `y` parameters, to avoid the division by zero for you and give an angle in the right quadrant.&#xD;&#xA;&#xD;&#xA;![atan2 diagram][2]&#xD;&#xA;&#xD;&#xA;(diagram courtesy of gareth, please vote up his answer too)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The use of trigonometry in game development is pretty common, especially with vectors, but usually libraries hide the trigonometry work for you. You can use sin/cos/tan for a lot of tasks which involve geometric manipulations to find a value from a triangle. All you need is 3 values (side lengths / angle values) to find the other values of a rectangle triangle, so it's quite useful.&#xD;&#xA;&#xD;&#xA;You can even use the &quot;cycling&quot; nature of the sine and cosine functions for special behaviors in a game, e.g. I've seen cos/sin used a lot to make an object turn around an other one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/xQiWG.png" />
  <row Id="32925" PostHistoryTypeId="24" PostId="14603" RevisionGUID="0bd877dc-8688-442e-862f-e2d2384b0914" CreationDate="2011-07-09T13:03:52.800" Comment="Proposed by 2698 approved by -1 edit id of 554" />
  <row Id="32926" PostHistoryTypeId="5" PostId="14603" RevisionGUID="84abd806-ae37-4a91-86bf-7427b27f4efd" CreationDate="2011-07-09T13:03:52.907" UserId="6588" Comment="added a practical game example" Text="The tangent formula is this:&#xD;&#xA;&#xD;&#xA;`tan(angle) = opposite/adjacent`&#xD;&#xA;&#xD;&#xA;Refer to this drawing:&#xD;&#xA;&#xD;&#xA;![Diagram of a right-angled triangle, with an angle theta and its opposite and adjacent sides marked][1]&#xD;&#xA;&#xD;&#xA;Where `a` is the adjacent side, `o` is the opposite side and `theta` is the angle. Similarly, sine and cosine are sin(ang)=o/h and cos(ang)=a/h where `h` is the long side: http://www.mathwords.com/s/sohcahtoa.htm&#xD;&#xA;&#xD;&#xA;Meanwhile `atan` (short for _arc-tangent_, also known as the _inverse tangent_) is the reverse of `tan`, like so:&#xD;&#xA;&#xD;&#xA;`atan(opposite/adjacent) = angle`&#xD;&#xA;&#xD;&#xA;Thus, if you know the values of both the opposite and adjacent sides (for example, by subtracting the object's coordinates from the mouse coordinates) you can get the value of the angle with `atan`.&#xD;&#xA;&#xD;&#xA;In game development though, it can happen fairly often that the adjacent side is equal to 0 (e.g. the x coordinate of a vector being 0). Remembering that `tan(angle) = opposite/adjacent` the potential for a disastrous divide-by-zero error should be clear. So a lot of libraries offer a function called `atan2`, which lets you specify both the `x` and `y` parameters, to avoid the division by zero for you and give an angle in the right quadrant.&#xD;&#xA;&#xD;&#xA;![atan2 diagram][2]&#xD;&#xA;&#xD;&#xA;(diagram courtesy of gareth, please vote up his answer too)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The use of trigonometry in game development is pretty common, especially with vectors, but usually libraries hide the trigonometry work for you. You can use sin/cos/tan for a lot of tasks which involve geometric manipulations to find a value from a triangle. All you need is 3 values (side lengths / angle values) to find the other values of a rectangle triangle, so it's quite useful.&#xD;&#xA;&#xD;&#xA;You can even use the &quot;cycling&quot; nature of the sine and cosine functions for special behaviors in a game, e.g. I've seen cos/sin used a lot to make an object turn around an other one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/awfKB.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/xQiWG.png" />
  <row Id="32927" PostHistoryTypeId="2" PostId="14642" RevisionGUID="3461bdbd-ea4e-43aa-b0f2-bd71be58f9cb" CreationDate="2011-07-09T13:49:56.283" UserId="1156" Text="*Note: I am not asking how to make a clone of one of these. I am asking about how they work.*&#xD;&#xA;&#xD;&#xA;I'm sure everyone's seen the games where you use your own music files (or provided ones) and the games produce levels based on them, such as [Audiosurf][1] and [Beat Hazard][2].&#xD;&#xA;&#xD;&#xA;[Here is a video][3] of Audiosurf in action, to show what I mean.&#xD;&#xA;&#xD;&#xA;If you provide a heavy metal song, you would get a completely different set of obstacles, enemies, and game experience from something like Vivaldi.&#xD;&#xA;&#xD;&#xA;What does interest me is how these games work. I do not know much about audio (well, data-side), but how do they process the song to understand when it is settling down or when it's speeding up? I guess they could just feed the pitch values (assuming those sorts of things exist in audio files) to form a level, but it wouldn't fully explain it.&#xD;&#xA;&#xD;&#xA;I'm either looking for an explanation, some links to articles about this sort of thing (I'm sure there's a term or terms for it), or even an open-source implementation of this kind of thing ;-)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.audio-surf.com/&#xD;&#xA;  [2]: http://store.steampowered.com/app/49600/&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=2EsVyEnhxWY" />
  <row Id="32928" PostHistoryTypeId="1" PostId="14642" RevisionGUID="3461bdbd-ea4e-43aa-b0f2-bd71be58f9cb" CreationDate="2011-07-09T13:49:56.283" UserId="1156" Text="How do audio based games such as Audiosurf and Beat Hazard work?" />
  <row Id="32929" PostHistoryTypeId="3" PostId="14642" RevisionGUID="3461bdbd-ea4e-43aa-b0f2-bd71be58f9cb" CreationDate="2011-07-09T13:49:56.283" UserId="1156" Text="&lt;audio&gt;&lt;procedural-generation&gt;&lt;levels&gt;" />
  <row Id="32930" PostHistoryTypeId="5" PostId="14642" RevisionGUID="20c83b0d-8878-45bf-a95f-623229718529" CreationDate="2011-07-09T14:13:05.733" UserId="1156" Comment="added 304 characters in body" Text="*Note: I am not asking how to make a clone of one of these. I am asking about how they work.*&#xD;&#xA;&#xD;&#xA;I'm sure everyone's seen the games where you use your own music files (or provided ones) and the games produce levels based on them, such as [Audiosurf][1] and [Beat Hazard][2].&#xD;&#xA;&#xD;&#xA;[Here is a video][3] of Audiosurf in action, to show what I mean.&#xD;&#xA;&#xD;&#xA;If you provide a heavy metal song, you would get a completely different set of obstacles, enemies, and game experience from something like Vivaldi.&#xD;&#xA;&#xD;&#xA;What does interest me is how these games work. I do not know much about audio (well, data-side), but how do they process the song to understand when it is settling down or when it's speeding up? I guess they could just feed the pitch values (assuming those sorts of things exist in audio files) to form a level, but it wouldn't fully explain it.&#xD;&#xA;&#xD;&#xA;I'm either looking for an explanation, some links to articles about this sort of thing (I'm sure there's a term or terms for it), or even an open-source implementation of this kind of thing ;-)&#xD;&#xA;&#xD;&#xA;EDIT: After some searching and a little help, I found out about [FFT][4] (Fast Fourier Transform). This maybe a step in the right direction, but it is something that does not make any sense to me..or fits with my physics knowledge of waves.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.audio-surf.com/&#xD;&#xA;  [2]: http://store.steampowered.com/app/49600/&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=2EsVyEnhxWY&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Fast_Fourier_transform" />
  <row Id="32931" PostHistoryTypeId="2" PostId="14643" RevisionGUID="b306c612-266d-40e7-9827-e1f3c8cb24c7" CreationDate="2011-07-09T14:21:33.173" UserId="2332" Text="The term you're looking for is [signal processing/analysis][1] There are lots of techniques involved but the fundamental one that those games make use of is [Beat Detection][2]. This tries to calculate the tempo of the song and where the beats in a measure are and hence place the obstacles the appropriate distance apart to coincide with each beat.&#xD;&#xA;&#xD;&#xA;The way that the games know when to &quot;kick in&quot; etc can range from being very simple and measuring the amplitude (volume) of the waveform or something more complex like isolating the volume of certain frequencies and measuring their volume.&#xD;&#xA;&#xD;&#xA;If you're interested, look into Digital Signal Processing to see how you can analyse waveforms, which is essentially what these games are doing in their loading phase. &#xD;&#xA;&#xD;&#xA;These links are good to get you started:&#xD;&#xA;&#xD;&#xA;[Introduction to Sound Processing][3]  &#xD;&#xA;[Theory and Techniques of Electronic Music][4]  &#xD;&#xA;[Introduction to Digital Filters][5]&#xD;&#xA;&#xD;&#xA;Hope that helps :)&#xD;&#xA;&#xD;&#xA;-Ray&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Signal_analysis&#xD;&#xA;  [2]: http://archive.gamedev.net/reference/programming/features/beatdetection/&#xD;&#xA;  [3]: http://profs.sci.univr.it/~rocchess/SP/&#xD;&#xA;  [4]: http://crca.ucsd.edu/~msp/techniques.htm&#xD;&#xA;  [5]: http://www.dsprelated.com/dspbooks" />
  <row Id="32932" PostHistoryTypeId="2" PostId="14644" RevisionGUID="c8479b87-9fd0-49c2-b369-fb5d144fedce" CreationDate="2011-07-09T14:29:45.503" UserId="982" Text="I have a few questions before I start answering this. First, in the original bug in which you got stuck in the walls, were those tiles on the left individual tiles as opposed to one large tile? And if they were, was the player getting stuck in between them? If yes to both those questions, try moving the player, then resolving the collisions, then doing your checks for jumping and such.&#xD;&#xA;&#xD;&#xA;Another question, are the spikes you show one tile, or individual tiles? If they are individual thin tiles, you may have to use a different approach for the horizontal ones and vertical ones than what I describe below. But if they're whole tiles this should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Alright, so basically this is what @Trevor Powell was describing. Since you're using only AABBs, all you have to do is find how much one rectangle penetrates the other. This will give you a quantity in the X axis and the Y. Choose the minimum out of the two, and move your colliding object along that axis that amount. That is all you need to resolve an AABB collision. You will NEVER need to move along more than one axis in such a collision, so you should never be confused about what one to move first, as you will only be moving the minimum. &#xD;&#xA;&#xD;&#xA;Metanet software has a classic tutorial on an approach [here][1]. It also goes into other shapes as well.&#xD;&#xA;&#xD;&#xA;Here's an XNA function I made to find the overlap vector of two rectangles:&#xD;&#xA;&#xD;&#xA;        public Point resolveCollision(Rectangle otherRect)&#xD;&#xA;        {&#xD;&#xA;            if (!isCollision(otherRect))&#xD;&#xA;            {&#xD;&#xA;                return Point.Zero;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            int minOtherX = otherRect.X;&#xD;&#xA;            int maxOtherX = otherRect.X + otherRect.Width;&#xD;&#xA;&#xD;&#xA;            int minMyX = collisionMask.X;&#xD;&#xA;            int maxMyX = collisionMask.X + collisionMask.Width;&#xD;&#xA;&#xD;&#xA;            int minOtherY = otherRect.Y;&#xD;&#xA;            int maxOtherY = otherRect.Y + otherRect.Height;&#xD;&#xA;&#xD;&#xA;            int minMyY = collisionMask.Y;&#xD;&#xA;            int maxMyY = collisionMask.Y + collisionMask.Height;&#xD;&#xA;&#xD;&#xA;            int dx, dy;&#xD;&#xA;&#xD;&#xA;            if (maxOtherX - minMyX &lt; maxMyX - minOtherX)&#xD;&#xA;            {&#xD;&#xA;                dx = (maxOtherX - minMyX);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dx = -(maxMyX - minOtherX);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (maxOtherY - minMyY &lt; maxMyY - minOtherY)&#xD;&#xA;            {&#xD;&#xA;                dy = (maxOtherY - minMyY);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dy = -(maxMyY - minOtherY);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(dx) &lt; Math.Abs(dy))&#xD;&#xA;                return new Point(dx, 0);&#xD;&#xA;            else&#xD;&#xA;                return new Point(0, dy);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;(I hope it's simple to follow, because I'm sure there are better ways to implement it...)&#xD;&#xA;&#xD;&#xA;isCollision(Rectangle) is literally just a call to XNA's Rectangle.Intersects(Rectangle).&#xD;&#xA;&#xD;&#xA;I've tested this with moving platforms and it seems to work fine. I'll do some more tests more similar to your .gif to make sure and report back if it doesn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="32933" PostHistoryTypeId="5" PostId="14466" RevisionGUID="d72d9e50-2a3d-4aed-9117-885a18333e63" CreationDate="2011-07-09T14:38:26.547" UserId="8408" Comment="added 286 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = 0;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    template &lt;class V&gt;&#xD;&#xA;    bool Mesh&lt;V&gt;::Render() {&#xD;&#xA;	pDeviceContext-&gt;IASetInputLayout(pVertexLayout);&#xD;&#xA;	pDeviceContext-&gt;IASetPrimitiveTopology(topologyType);&#xD;&#xA;	pDeviceContext-&gt;VSSetShader(pVShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;PSSetShader(pPShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;Draw(bufSize, 0);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;What is the difference between the StructureByteStride and ByteWidth parameters of the D3D11_BUFFER_DESC while initializing the buffer?&#xD;&#xA;&#xD;&#xA;Is there any particular reason why a register is specified in the MSDN shader code for the buffer? Is an unused register not found by default?&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Jumped the gun, thought I found the solution. Same issue and warning remains.&#xD;&#xA;&#xD;&#xA;Here is the shader initialization code&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;     bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;        // Replace with Int hash value!!!!&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Pixel Shader.&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Edit 2**&#xD;&#xA;&#xD;&#xA;I'm starting to think it's an issue with my draw call sequence and by extension the design of my Mesh superclass and UIRectangle subclass. Didn't originally include the Mesh.Render() function with the code I posted but I added it to the bottom of the first code block." />
  <row Id="32934" PostHistoryTypeId="5" PostId="14633" RevisionGUID="63a67352-27c9-4dc4-9600-8738d65ccf2e" CreationDate="2011-07-09T15:06:11.623" UserId="8408" Comment="added 110 characters in body" Text="So I've been fighting my way through learning the DirectX 11 API with what little documentation there is out there and noticed some new D3D11 warnings in my debug output. (Atleast I think they are new, been rearranging my draw calls to try and solve another problem I'm experiencing at the moment) Anywho, with some Google-fu I've been unable to find any documentation on the error codes or anything but the general consensus of forums seems to be that the COM objects aren't properly being released.&#xD;&#xA;&#xD;&#xA;Now the question is, if that is indeed what the warnings mean, what else do I need to do to kill these things other then call their Release() functions? And is there somewhere this kind of information is posted? I sure can't find it on MSDN or Google. Just lots of confused DX11 post with unanswered questions.&#xD;&#xA;&#xD;&#xA;Here is the debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: WARNING: Live Device: Name=&quot;unnamed&quot;, Addr=0x004C6488, ExtRef=5 [ STATE_CREATION WARNING #2097297: LIVE_DEVICE ]&#xD;&#xA;    D3D11: WARNING: Live Texture2D: Name=&quot;unnamed&quot;, Addr=0x04552E94, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]&#xD;&#xA;    D3D11: WARNING: Live Buffer: Name=&quot;unnamed&quot;, Addr=0x04552A64, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]&#xD;&#xA;    D3D11: WARNING: Live Buffer: Name=&quot;unnamed&quot;, Addr=0x04566ECC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]&#xD;&#xA;    D3D11: WARNING: Live InputLayout: Name=&quot;unnamed&quot;, Addr=0x0455280C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097265: LIVE_INPUTLAYOUT ]&#xD;&#xA;    D3D11: WARNING: Live PixelShader: Name=&quot;unnamed&quot;, Addr=0x004CDDE4, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097262: LIVE_PIXELSHADER ]&#xD;&#xA;    D3D11: WARNING: Live VertexShader: Name=&quot;unnamed&quot;, Addr=0x04553944, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097250: LIVE_VERTEXSHADER ]&#xD;&#xA;    D3D11: WARNING: Live RenderTargetView: Name=&quot;unnamed&quot;, Addr=0x0455269C, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097244: LIVE_RENDERTARGETVIEW ]&#xD;&#xA;    D3D11: WARNING: Live Texture2D: Name=&quot;unnamed&quot;, Addr=0x04552214, ExtRef=4294967295, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]&#xD;&#xA;    D3D11: WARNING: Live Query: Name=&quot;unnamed&quot;, Addr=0x004C84AC, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097280: LIVE_QUERY ]&#xD;&#xA;    D3D11: WARNING: Live Sampler: Name=&quot;unnamed&quot;, Addr=0x004C8274, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097268: LIVE_SAMPLER ]&#xD;&#xA;    D3D11: WARNING: Live RasterizerState: Name=&quot;unnamed&quot;, Addr=0x004C804C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097277: LIVE_RASTERIZERSTATE ]&#xD;&#xA;    D3D11: WARNING: Live DepthStencilState: Name=&quot;unnamed&quot;, Addr=0x004C7E24, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097274: LIVE_DEPTHSTENCILSTATE ]&#xD;&#xA;    D3D11: WARNING: Live BlendState: Name=&quot;unnamed&quot;, Addr=0x004C7C6C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097271: LIVE_BLENDSTATE ]&#xD;&#xA;    D3D11: WARNING: Live Context: Name=&quot;unnamed&quot;, Addr=0x0453006C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT ]&#xD;&#xA;    D3D11: WARNING: Live Device Child Summary: Device Addr=0x004C6488&#xD;&#xA;    Using ID3D11Debug::ReportLiveDeviceObjects with D3D11_RLDO_DETAIL will help drill into object lifetimes. Objects with ExtRef=0 and IntRef=0 will be eventually destroyed through typical Immediate Context usage. However, if the application requires these objects to be destroyed sooner, ClearState followed by Flush on the Immediate Context will realize their destruction.&#xD;&#xA;&#xD;&#xA;Note: Clearing and Flushing the device context doesn't seem to affect anything.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;**Solution**&#xD;&#xA;&#xD;&#xA;A slight tweak in my code prevented objects from being shut down and releasing their COM objects." />
  <row Id="32935" PostHistoryTypeId="25" PostId="14642" RevisionGUID="a61852e8-b844-408f-a4be-46941a21c9ab" CreationDate="2011-07-09T15:29:04.110" Comment="http://twitter.com/#!/StackGameDev/status/89717710744850432" />
  <row Id="32936" PostHistoryTypeId="2" PostId="14645" RevisionGUID="6d815c0c-e076-4d0f-a00d-b0c844c0e063" CreationDate="2011-07-09T15:40:55.440" UserId="1738" Text="To address the specific issue of waitig on present: Present does not work quite the way you think: it does not block and wait for vsync.  CPUs have not been synchronous with GPUs in many years.  Rather, it queues up a wait-for-a-vsyn-and-flip operation, and returns.  The GPU will process it when it gets to it.&#xD;&#xA;&#xD;&#xA;If you are seeing present take a non-trivial amount of time, that is because it is waiting for an older frame to finish (there is a limit on the number of frames in flight).  If you want to do other processing, rather than waiting, you can use the DO_NOT_WAIT flag to do a non-blocking present that will return whether or not the present was queued successfuy, or if the HW was busy." />
  <row Id="32937" PostHistoryTypeId="2" PostId="14646" RevisionGUID="00725086-816f-443c-8c5f-80cbf494e7e6" CreationDate="2011-07-09T15:46:55.840" UserId="5021" Text="I am implementing [PCSS][1] and I am using a directional light. The directional light volume is clamped to the camera frustum (as is typical with directional lights). So when the camera rotates, the directional light volume can find a tighter bound on the camera frustum in some cases, and then all of the depth values can increase/decrease.&#xD;&#xA;&#xD;&#xA;This causes the blocker search to find different blocker distances from the light source, and so the penumbra sizes change based on the camera rotation.&#xD;&#xA;&#xD;&#xA;Has anyone dealt with this problem before? How can I compensate for changes to the light depth map (aka shadow map) when the camera rotates?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;![enter link description here][4]&#xD;&#xA;![enter link description here][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.download.nvidia.com/developer/presentations/2005/SIGGRAPH/Percentage_Closer_Soft_Shadows.pdf&#xD;&#xA;  [2]: http://i.stack.imgur.com/gGBZk.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/tIFA1.png&#xD;&#xA;  [4]: http://i.imgur.com/UszNQ.png&#xD;&#xA;  [5]: http://i.imgur.com/fon5i.png" />
  <row Id="32938" PostHistoryTypeId="1" PostId="14646" RevisionGUID="00725086-816f-443c-8c5f-80cbf494e7e6" CreationDate="2011-07-09T15:46:55.840" UserId="5021" Text="Rotating camera changes directional light depth map, and changes PCSS penumbras." />
  <row Id="32939" PostHistoryTypeId="3" PostId="14646" RevisionGUID="00725086-816f-443c-8c5f-80cbf494e7e6" CreationDate="2011-07-09T15:46:55.840" UserId="5021" Text="&lt;xna-4.0&gt;&lt;shadow-mapping&gt;&lt;pcss&gt;" />
  <row Id="32941" PostHistoryTypeId="2" PostId="14647" RevisionGUID="373daccd-a8e7-4388-b3cb-c928c9e47e42" CreationDate="2011-07-09T15:59:06.720" UserId="5021" Text="You are using a cube map to represent a point light's shadows.&#xD;&#xA;&#xD;&#xA;In this case, it is roughly equivalent to having 6 spot lights joined together.&#xD;&#xA;&#xD;&#xA;You need to perform the PCSS blocker search on each of the 6 shadow maps, to find a penumbra value for each shadow map (in the same way that it is done for a single spot light).&#xD;&#xA;&#xD;&#xA;Then you simply blend between each penumbra value as you already do for the shadow mapping step that you have already implemented." />
  <row Id="32942" PostHistoryTypeId="5" PostId="14646" RevisionGUID="c1277b1f-6607-4f88-98d7-244a1983449a" CreationDate="2011-07-09T16:09:03.950" UserId="5021" Comment="added 107 characters in body" Text="I am implementing [PCSS][1] and I am using a directional light. The directional light volume is clamped to the camera frustum (as is typical with directional lights). So when the camera rotates, the directional light volume can find a tighter bound on the camera frustum in some cases, and then all of the depth values can increase/decrease.&#xD;&#xA;&#xD;&#xA;This causes the blocker search to find different blocker distances from the light source, and so the penumbra sizes change based on the camera rotation.&#xD;&#xA;&#xD;&#xA;Has anyone dealt with this problem before? How can I compensate for changes to the light depth map (aka shadow map) when the camera rotates?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are some images demonstrating two camera views, visualizing the penumbra values (brighter indicates where a larger penumbra should go) and the corresponding light depth maps (shadow maps):&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;![enter link description here][4]&#xD;&#xA;![enter link description here][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://http.download.nvidia.com/developer/presentations/2005/SIGGRAPH/Percentage_Closer_Soft_Shadows.pdf&#xD;&#xA;  [2]: http://i.stack.imgur.com/gGBZk.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/tIFA1.png&#xD;&#xA;  [4]: http://i.imgur.com/UszNQ.png&#xD;&#xA;  [5]: http://i.imgur.com/fon5i.png" />
  <row Id="32943" PostHistoryTypeId="5" PostId="14644" RevisionGUID="279ed4dd-654a-4c94-9274-8c0a4ac9c689" CreationDate="2011-07-09T17:26:09.753" UserId="982" Comment="added 120 characters in body" Text="I have a few questions before I start answering this. First, in the original bug in which you got stuck in the walls, were those tiles on the left individual tiles as opposed to one large tile? And if they were, was the player getting stuck in between them? If yes to both those questions, &lt;s&gt;try moving the player, then resolving the collisions, then doing your checks for jumping and such.&lt;/s&gt; *(This isn't working on the implementation I give below, so you will be back to square one if this is the case)*&#xD;&#xA;&#xD;&#xA;Another question, are the spikes you show one tile, or individual tiles? If they are individual thin tiles, you may have to use a different approach for the horizontal ones and vertical ones than what I describe below. But if they're whole tiles this should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Alright, so basically this is what @Trevor Powell was describing. Since you're using only AABBs, all you have to do is find how much one rectangle penetrates the other. This will give you a quantity in the X axis and the Y. Choose the minimum out of the two, and move your colliding object along that axis that amount. That is all you need to resolve an AABB collision. You will NEVER need to move along more than one axis in such a collision, so you should never be confused about what one to move first, as you will only be moving the minimum. &#xD;&#xA;&#xD;&#xA;Metanet software has a classic tutorial on an approach [here][1]. It also goes into other shapes as well.&#xD;&#xA;&#xD;&#xA;Here's an XNA function I made to find the overlap vector of two rectangles:&#xD;&#xA;&#xD;&#xA;        public Point resolveCollision(Rectangle otherRect)&#xD;&#xA;        {&#xD;&#xA;            if (!isCollision(otherRect))&#xD;&#xA;            {&#xD;&#xA;                return Point.Zero;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            int minOtherX = otherRect.X;&#xD;&#xA;            int maxOtherX = otherRect.X + otherRect.Width;&#xD;&#xA;&#xD;&#xA;            int minMyX = collisionMask.X;&#xD;&#xA;            int maxMyX = collisionMask.X + collisionMask.Width;&#xD;&#xA;&#xD;&#xA;            int minOtherY = otherRect.Y;&#xD;&#xA;            int maxOtherY = otherRect.Y + otherRect.Height;&#xD;&#xA;&#xD;&#xA;            int minMyY = collisionMask.Y;&#xD;&#xA;            int maxMyY = collisionMask.Y + collisionMask.Height;&#xD;&#xA;&#xD;&#xA;            int dx, dy;&#xD;&#xA;&#xD;&#xA;            if (maxOtherX - minMyX &lt; maxMyX - minOtherX)&#xD;&#xA;            {&#xD;&#xA;                dx = (maxOtherX - minMyX);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dx = -(maxMyX - minOtherX);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (maxOtherY - minMyY &lt; maxMyY - minOtherY)&#xD;&#xA;            {&#xD;&#xA;                dy = (maxOtherY - minMyY);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dy = -(maxMyY - minOtherY);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(dx) &lt; Math.Abs(dy))&#xD;&#xA;                return new Point(dx, 0);&#xD;&#xA;            else&#xD;&#xA;                return new Point(0, dy);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;(I hope it's simple to follow, because I'm sure there are better ways to implement it...)&#xD;&#xA;&#xD;&#xA;isCollision(Rectangle) is literally just a call to XNA's Rectangle.Intersects(Rectangle).&#xD;&#xA;&#xD;&#xA;I've tested this with moving platforms and it seems to work fine. I'll do some more tests more similar to your .gif to make sure and report back if it doesn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="32944" PostHistoryTypeId="25" PostId="14633" RevisionGUID="4888cd2c-4f27-4c33-9efc-6a368a715bbf" CreationDate="2011-07-09T18:29:04.860" Comment="http://twitter.com/#!/StackGameDev/status/89763012457664513" />
  <row Id="32945" PostHistoryTypeId="5" PostId="14644" RevisionGUID="ecc5327a-7d65-4d62-94e6-3a50a1f5c9c0" CreationDate="2011-07-09T18:52:50.570" UserId="982" Comment="added 418 characters in body" Text="I have a few questions before I start answering this. First, in the original bug in which you got stuck in the walls, were those tiles on the left individual tiles as opposed to one large tile? And if they were, was the player getting stuck in between them? If yes to both those questions, &lt;s&gt;try moving the player, then resolving the collisions, then doing your checks for jumping and such. *(This isn't working on the implementation I give below, so you will be back to square one if this is the case)*&lt;/s&gt;, try doing two passes for your collision resolving. In your first pass find all the minimum X penetrations, and then resolve the X axis based on the maximum of those. Then do the same for Y. Like I said in my comment, this is very hacky and there must be a better approach. I don't believe it'll scale for other shapes at all, but if all you're doing is AABBs, this does seem to work and solves your original problem.&#xD;&#xA;&#xD;&#xA;Another question, are the spikes you show one tile, or individual tiles? If they are individual thin tiles, you may have to use a different approach for the horizontal ones and vertical ones than what I describe below. But if they're whole tiles this should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Alright, so basically this is what @Trevor Powell was describing. Since you're using only AABBs, all you have to do is find how much one rectangle penetrates the other. This will give you a quantity in the X axis and the Y. Choose the minimum out of the two, and move your colliding object along that axis that amount. That is all you need to resolve an AABB collision. You will NEVER need to move along more than one axis in such a collision, so you should never be confused about what one to move first, as you will only be moving the minimum. &#xD;&#xA;&#xD;&#xA;Metanet software has a classic tutorial on an approach [here][1]. It also goes into other shapes as well.&#xD;&#xA;&#xD;&#xA;Here's an XNA function I made to find the overlap vector of two rectangles:&#xD;&#xA;&#xD;&#xA;        public Point resolveCollision(Rectangle otherRect)&#xD;&#xA;        {&#xD;&#xA;            if (!isCollision(otherRect))&#xD;&#xA;            {&#xD;&#xA;                return Point.Zero;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            int minOtherX = otherRect.X;&#xD;&#xA;            int maxOtherX = otherRect.X + otherRect.Width;&#xD;&#xA;&#xD;&#xA;            int minMyX = collisionMask.X;&#xD;&#xA;            int maxMyX = collisionMask.X + collisionMask.Width;&#xD;&#xA;&#xD;&#xA;            int minOtherY = otherRect.Y;&#xD;&#xA;            int maxOtherY = otherRect.Y + otherRect.Height;&#xD;&#xA;&#xD;&#xA;            int minMyY = collisionMask.Y;&#xD;&#xA;            int maxMyY = collisionMask.Y + collisionMask.Height;&#xD;&#xA;&#xD;&#xA;            int dx, dy;&#xD;&#xA;&#xD;&#xA;            if (maxOtherX - minMyX &lt; maxMyX - minOtherX)&#xD;&#xA;            {&#xD;&#xA;                dx = (maxOtherX - minMyX);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dx = -(maxMyX - minOtherX);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (maxOtherY - minMyY &lt; maxMyY - minOtherY)&#xD;&#xA;            {&#xD;&#xA;                dy = (maxOtherY - minMyY);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dy = -(maxMyY - minOtherY);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(dx) &lt; Math.Abs(dy))&#xD;&#xA;                return new Point(dx, 0);&#xD;&#xA;            else&#xD;&#xA;                return new Point(0, dy);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;(I hope it's simple to follow, because I'm sure there are better ways to implement it...)&#xD;&#xA;&#xD;&#xA;isCollision(Rectangle) is literally just a call to XNA's Rectangle.Intersects(Rectangle).&#xD;&#xA;&#xD;&#xA;I've tested this with moving platforms and it seems to work fine. I'll do some more tests more similar to your .gif to make sure and report back if it doesn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="32946" PostHistoryTypeId="4" PostId="14636" RevisionGUID="dec5c28c-c6d1-4bd6-a811-e3ddb74c70b2" CreationDate="2011-07-09T20:10:23.997" UserId="8400" Comment="corrected spelling in title" Text="Separating logic/update from render/drawing code in a single thread using sleep" />
  <row Id="32947" PostHistoryTypeId="24" PostId="14636" RevisionGUID="dec5c28c-c6d1-4bd6-a811-e3ddb74c70b2" CreationDate="2011-07-09T20:10:23.997" Comment="Proposed by 8400 approved by 189 edit id of 553" />
  <row Id="32948" PostHistoryTypeId="25" PostId="14466" RevisionGUID="00f1f4af-26cc-428c-9170-832c6b0e0a4a" CreationDate="2011-07-09T21:29:05.990" Comment="http://twitter.com/#!/StackGameDev/status/89808314250182657" />
  <row Id="32949" PostHistoryTypeId="2" PostId="14648" RevisionGUID="9ed27f59-9a59-4af4-8361-16d6d02ce6d7" CreationDate="2011-07-09T22:24:43.950" UserId="8502" Text="My client wants a browser based online game, languages which are known to me are Java Script PHP and Action Script and also My Sql.&#xD;&#xA;&#xD;&#xA;Game is quite like Farmvile as far as functionality is concerned.I would like to know how to combine these technologies to make a full fledged browser game, also do i have to use all of these languages or AS 3.0 with PHP and MySql will be enough?&#xD;&#xA;&#xD;&#xA;Lastly i would like to know is there any book,link or tutorial about architectures and framework of games like farmvile?&#xD;&#xA;&#xD;&#xA;Thank You " />
  <row Id="32950" PostHistoryTypeId="1" PostId="14648" RevisionGUID="9ed27f59-9a59-4af4-8361-16d6d02ce6d7" CreationDate="2011-07-09T22:24:43.950" UserId="8502" Text="Is it possible to integrate Action Script 3.0 with Java Script and PHP for an online browser game?" />
  <row Id="32951" PostHistoryTypeId="3" PostId="14648" RevisionGUID="9ed27f59-9a59-4af4-8361-16d6d02ce6d7" CreationDate="2011-07-09T22:24:43.950" UserId="8502" Text="&lt;java&gt;&lt;php&gt;" />
  <row Id="32952" PostHistoryTypeId="2" PostId="14649" RevisionGUID="6ea3f54b-f808-47bd-a317-3385841ba3c8" CreationDate="2011-07-09T22:41:05.763" UserId="5932" Text="**Forenote:**  &#xD;&#xA;My engine uses a collision detection class that checks collisions with all objects real time, only when an object moves, and only in the grid squares it currently occupies.&#xD;&#xA;&#xD;&#xA;**My Solution:**&#xD;&#xA;&#xD;&#xA;When I ran against problems like this in my 2d platformer, I did something like the following : &#xD;&#xA;  &#xD;&#xA;-(engine detects possible collisions, quickly)  &#xD;&#xA;-(game informs engine to check exact collisions for particular object)[returns vector of  object*]  &#xD;&#xA;-(object looks at depth of penetration, as well as previous position relative to other object's previous position, to determine which side to slide out of)  &#xD;&#xA;-(object moves, and averages it's velocity with object's velocity (if the object is moving))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="32953" PostHistoryTypeId="2" PostId="14650" RevisionGUID="1c8f19b9-6a2d-4ab1-8349-a39ecdee0720" CreationDate="2011-07-09T22:51:29.700" UserId="6968" Text="Are there any open source games using Flashpunk? The other big flash game library Flixel has a number of example projects, are there any equivalents for Flashpunk?" />
  <row Id="32954" PostHistoryTypeId="1" PostId="14650" RevisionGUID="1c8f19b9-6a2d-4ab1-8349-a39ecdee0720" CreationDate="2011-07-09T22:51:29.700" UserId="6968" Text="Are there any sample projects for Flashpunk?" />
  <row Id="32955" PostHistoryTypeId="3" PostId="14650" RevisionGUID="1c8f19b9-6a2d-4ab1-8349-a39ecdee0720" CreationDate="2011-07-09T22:51:29.700" UserId="6968" Text="&lt;flash&gt;" />
  <row Id="32956" PostHistoryTypeId="5" PostId="14647" RevisionGUID="9caf22df-e074-4c58-97a1-1c9da5a5919d" CreationDate="2011-07-09T23:07:54.753" UserId="5021" Comment="added 215 characters in body" Text="You are using a cube map to represent a point light's shadows.&#xD;&#xA;&#xD;&#xA;In this case, it is roughly equivalent to having 6 spot lights joined together.&#xD;&#xA;&#xD;&#xA;You need to perform the PCSS blocker search on each of the 6 shadow maps, to find a penumbra value for each shadow map (in the same way that it is done for a single spot light).&#xD;&#xA;&#xD;&#xA;Then you simply blend between each penumbra value as you already do for the shadow mapping step that you have already implemented.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This can be optimized because a receiving object can be blocked by an object in at most 3 shadow maps -- so really only three PCSS blocker searches are required. However, get the simpler version working first." />
  <row Id="32957" PostHistoryTypeId="2" PostId="14651" RevisionGUID="00f78af9-592a-4eac-8713-811c217e3657" CreationDate="2011-07-09T23:18:24.170" UserId="6968" Text="Here are some open source resources that I've found so far. &#xD;&#xA;&#xD;&#xA; - [JRPG Engine][1]&#xD;&#xA; - [The Killer][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dolgion1/FlashPunk-JRPG-Engine&#xD;&#xA;  [2]: https://github.com/JordanMagnuson/The-Killer" />
  <row Id="32958" PostHistoryTypeId="2" PostId="14652" RevisionGUID="c788baa3-714d-4f90-9562-476695da49c3" CreationDate="2011-07-09T23:50:43.613" UserId="998" Text="The key is to deal with your AABB's in terms of `Left` and `Right`, and stop thinking about X and Y.&#xD;&#xA;&#xD;&#xA;You want to &quot;push&quot; only in the direction to _allieviate the __greatest__ number of pixel overlap_ (ie cancel it out by pushing the player back.&#xD;&#xA;&#xD;&#xA;I broke it down into 4 intersection cases: (p=player, t=some other tile/object)&#xD;&#xA;&#xD;&#xA;![4 cases][1]&#xD;&#xA;&#xD;&#xA;So in case 1, for example, p is falling down onto t (landing, or case of rising floor). In case 2, p has hit t (the ceiling) with his head.&#xD;&#xA;&#xD;&#xA;In __case 1__, I will push the player up.  In __case 3__, I will push the player left. In all cases, only push the player exactly enough so that he and the object are no longer overlapping.&#xD;&#xA;&#xD;&#xA;The meat of it is here, where we check for:&#xD;&#xA;&#xD;&#xA;  1) The __depth__ (or encroachment) of pixel overlap in x and y (encrX, encrY) between the 2 tiles&#xD;&#xA;&#xD;&#xA;  2) The number of pixels overlapped in x and y (numPxOverlapX, numPxOverlapY)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code:&#xD;&#xA;&#xD;&#xA;    if( p.aabb.Intersects( t.aabb ) )      // intersecting&#xD;&#xA;    {&#xD;&#xA;      //compute encroachment in x and y&#xD;&#xA;      float encrX = 0, encrY = 0 ;&#xD;&#xA;              &#xD;&#xA;      // 1: player hit the floor with his feet&#xD;&#xA;      if( p.Bottom &lt; t.Bottom &amp;&amp; // player is above the tile and&#xD;&#xA;          p.Bottom &gt;= t.Top ) // player's bottom has gotten bigger than tile's top&#xD;&#xA;      {&#xD;&#xA;        encrY = t.Top - p.Bottom ; // player must move UP: -y&#xD;&#xA;      }&#xD;&#xA;      else if( p.Top &gt; t.Top &amp;&amp; // player is below the tile and&#xD;&#xA;                p.Top &lt;= t.Bottom ) // player's top has entered bottom of the tile&#xD;&#xA;      {&#xD;&#xA;        // 2. player's head hit a ceiling tile&#xD;&#xA;        encrY = t.Bottom - p.Top ; // player needs to move a +y value&#xD;&#xA;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      // x&#xD;&#xA;      if( p.Left &lt; t.Left &amp;&amp;  // p approaches from left and&#xD;&#xA;          p.Right &gt;= t.Left ) // p's right is stepping on t's left&#xD;&#xA;            &#xD;&#xA;      {&#xD;&#xA;        // 3. p enters t from the left&#xD;&#xA;        encrX = t.Left - p.Right ; // -x&#xD;&#xA;      }&#xD;&#xA;      else if( p.Right &gt; t.Right &amp;&amp; // p approaches from right and&#xD;&#xA;                p.Left &lt;= t.Right )  // p's left is &#xD;&#xA;      {&#xD;&#xA;        // 4. p comes from the left&#xD;&#xA;        encrX = t.Right - p.Left  ; // +x&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      // now who gets pushed back, x or y?&#xD;&#xA;      // it should be the one with the greatest amount of overlap.&#xD;&#xA;      float numPxOverlapX = 0, numPxOverlapY = 0;&#xD;&#xA;      // the number of pixels overlapping in x is&#xD;&#xA;      if( p.Left &lt; t.Left ) // p is left of t&#xD;&#xA;        numPxOverlapX = p.Right - t.Left;&#xD;&#xA;      else // if( p.Right &gt; t.Right ) // p is right of t&#xD;&#xA;        numPxOverlapX = t.Right - p.Left;&#xD;&#xA;&#xD;&#xA;      if( p.Top &lt; t.Top )&#xD;&#xA;        numPxOverlapY = p.Bottom - t.Top ;&#xD;&#xA;      else //if( p.Bottom &gt; t.Bottom )&#xD;&#xA;        numPxOverlapY = t.Bottom - p.Top ;&#xD;&#xA;&#xD;&#xA;      // push back where there is THE MOST&#xD;&#xA;      // pixel overlap&#xD;&#xA;      if( numPxOverlapX &gt; numPxOverlapY )&#xD;&#xA;      {&#xD;&#xA;        // lots of horizontal pixel overlap, push back on y&#xD;&#xA;        p.Pos += new Vector2( 0, encrY );&#xD;&#xA;          &#xD;&#xA;        // no downward motion then&#xD;&#xA;        if( p.vel.Y &gt; 0 )&#xD;&#xA;          p.vel.Y = 0 ;&#xD;&#xA;      }&#xD;&#xA;      else&#xD;&#xA;      {&#xD;&#xA;        p.Pos += new Vector2( encrX, 0 ) ;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;![Intersection][2]&#xD;&#xA;&#xD;&#xA;I've put up a working XNA 4.0 project &lt;a href=&quot;http://ideone.com/APoVj&quot;&gt;here&lt;/a&gt; (copy and paste into VS 2010).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/LUtnn.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/qseUu.png&#xD;&#xA;&#xD;&#xA;* This code may break down if objects are moving too fast." />
  <row Id="32959" PostHistoryTypeId="2" PostId="14653" RevisionGUID="57fae11d-f38f-4b15-84f9-d198f498198e" CreationDate="2011-07-10T00:23:18.590" UserId="8508" Text="I am trying to figure out the difference between a &quot;Material&quot; and a &quot;Material Pass&quot; (in theory). Is it basically that a Material will have multiple &quot;Material Pass&quot;'es, along with a  name. Then the &quot;Material Pass&quot; will have the references to the texture, shaders and property values that need to be set?" />
  <row Id="32960" PostHistoryTypeId="1" PostId="14653" RevisionGUID="57fae11d-f38f-4b15-84f9-d198f498198e" CreationDate="2011-07-10T00:23:18.590" UserId="8508" Text="Material vs Material Pass" />
  <row Id="32961" PostHistoryTypeId="3" PostId="14653" RevisionGUID="57fae11d-f38f-4b15-84f9-d198f498198e" CreationDate="2011-07-10T00:23:18.590" UserId="8508" Text="&lt;architecture&gt;&lt;graphics&gt;&lt;directx&gt;&lt;rendering&gt;&lt;graphics-programming&gt;" />
  <row Id="32962" PostHistoryTypeId="25" PostId="14517" RevisionGUID="3a202a9d-f828-4d81-8e51-2fafa5897ed7" CreationDate="2011-07-10T00:29:07.103" Comment="http://twitter.com/#!/StackGameDev/status/89853614021021696" />
  <row Id="32963" PostHistoryTypeId="5" PostId="14652" RevisionGUID="0bcd1927-2f6e-4e15-8b20-da6cd2ea82e1" CreationDate="2011-07-10T00:30:01.067" UserId="998" Comment="deleted 2205 characters in body" Text="The key is to deal with your AABB's in terms of `Left` and `Right`, and stop thinking about X and Y.&#xD;&#xA;&#xD;&#xA;![collision working][1]&#xD;&#xA;&#xD;&#xA;You want to &quot;push&quot; only in the direction to _allieviate the __greatest__ number of pixel overlap_ (ie cancel it out by pushing the player back.&#xD;&#xA;&#xD;&#xA;I broke it down into 4 intersection cases: (p=player, t=some other tile/object)&#xD;&#xA;&#xD;&#xA;![4 cases][2]&#xD;&#xA;&#xD;&#xA;So in case 1, for example, p is falling down onto t (landing, or case of rising floor). In case 2, p has hit t (the ceiling) with his head.&#xD;&#xA;&#xD;&#xA;In __case 1__, I will push the player up.  In __case 3__, I will push the player left. In all cases, only push the player exactly enough so that he and the object are no longer overlapping.&#xD;&#xA;&#xD;&#xA;The meat of it is here, where we check for:&#xD;&#xA;&#xD;&#xA;  1) The __depth__ (or encroachment) of pixel overlap in x and y (encrX, encrY) between the 2 tiles&#xD;&#xA;&#xD;&#xA;  2) The number of pixels overlapped in x and y (numPxOverlapX, numPxOverlapY)&#xD;&#xA;&#xD;&#xA;See &lt;a href=&quot;http://ideone.com/APoVj&quot;&gt;this link&lt;/a&gt; for the code (XNA 4.0) (copy and paste into VS 2010).&#xD;&#xA;&#xD;&#xA;* This code may break down if objects are moving too fast.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/TEc5z.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/LUtnn.png" />
  <row Id="32964" PostHistoryTypeId="2" PostId="14654" RevisionGUID="93c33876-2f86-4f17-b0bb-d7f5078c03f1" CreationDate="2011-07-10T01:23:55.403" UserId="8240" Text="The term &quot;Material&quot; usually refers to a specific set of surface characteristics, which are used by a lighting model to compute the reflectance at a point on a surface. But if it does, then &quot;Material Pass&quot; doesn't really make sense.&#xD;&#xA;&#xD;&#xA;Therefore, let's assume that by &quot;Material&quot;, what you really mean is &quot;a visual effect that I would like to produce, using one or more light sources and arbitrary other data.&quot; In which case the term &quot;Material Pass&quot; is a single shader that implements some part of this visual effect.&#xD;&#xA;&#xD;&#xA;Note that the typical terminology for this &quot;Material Pass&quot; is &quot;Shader Pass&quot; or something of the like, while the term for what you seem to call &quot;Material&quot; is usually &quot;Effect&quot; or &quot;Technique&quot;.&#xD;&#xA;&#xD;&#xA;An Effect can be achieved by one or more Shader Passes. A Shader pass is a concrete piece of shader code, which has a number of parameters (uniforms/constants depending on the language). It will take certain inputs and produce certain output value(s). Multiple shader passes are composed with blending operations or possibly with direct shader feedback through render-to-texture." />
  <row Id="32965" PostHistoryTypeId="2" PostId="14655" RevisionGUID="808e17e7-2635-4750-a994-1a43fe76eded" CreationDate="2011-07-10T01:51:43.810" UserId="7432" Text="Is their a way to make it where no matter what the screen size is my sprites will always start at a certain position. I am trying to get my sprites to start in the lower right corner  area of the screen. I am using a 2D SurfaceView." />
  <row Id="32966" PostHistoryTypeId="1" PostId="14655" RevisionGUID="808e17e7-2635-4750-a994-1a43fe76eded" CreationDate="2011-07-10T01:51:43.810" UserId="7432" Text="Android Coordinates" />
  <row Id="32967" PostHistoryTypeId="3" PostId="14655" RevisionGUID="808e17e7-2635-4750-a994-1a43fe76eded" CreationDate="2011-07-10T01:51:43.810" UserId="7432" Text="&lt;java&gt;&lt;android&gt;" />
  <row Id="32968" PostHistoryTypeId="2" PostId="14656" RevisionGUID="cd3f15b2-ca1d-4418-aa07-b37b17863104" CreationDate="2011-07-10T02:13:13.957" UserId="2698" Text="&lt;sub&gt;I'm assuming that on Android, (0,0) is the top-left corner of the screen. If it isn't, I'll edit this answer to accommodate.&lt;/sub&gt;&#xD;&#xA;&#xD;&#xA;Get the screen size ([this StackOverflow answer says how][1]) and you'll have a [vector][2] representing the bottom-right coordinate of the screen. Now you can just place stuff relative to this vector.&#xD;&#xA;&#xD;&#xA;Remember that the _origin_ of the screen, which sits at the top left, is `(0, 0)`. Consider that when you place something at `(30, 30)`, you're actually placing it at `(0, 0) + (30, 30)`. You're placing it at `(30, 30)` relative to a particular point on the screen - the origin.&#xD;&#xA;&#xD;&#xA;So if you want to place something 25 pixels left and 20 pixels up from the bottom-right corner, you're placing it at `(-25, -20)` relative to the bottom-right corner. Assuming `(right, bottom)` represents the bottom-right corner of the screen, that means you just place your sprite at `(right, bottom) + (-25, -20)`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1016896/android-how-to-get-screen-dimensions/1016941#1016941&#xD;&#xA;[2]: http://gamedev.stackexchange.com/tags/vector/info" />
  <row Id="32969" PostHistoryTypeId="5" PostId="14656" RevisionGUID="8c0c10d8-34b5-4daa-8cbc-64e63663cc5c" CreationDate="2011-07-10T02:24:35.427" UserId="2698" Comment="Code example" Text="Get the screen size ([this StackOverflow answer says how][1]) and you'll have a vector representing the bottom-right coordinate of the screen. Now you can just place stuff relative to this vector in order to place things relative to the bottom-right of the screen instead of the top-left.&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;I'm assuming that on Android, (0,0) is the top-left corner of the screen. If it isn't, I'll edit this answer to accommodate.&lt;/sup&gt;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### In case it isn't clear how that would work, here's an explanation&#xD;&#xA;&#xD;&#xA;_First: please make sure you have a basic understanding of vectors (not the list type, but the mathematical object). [The vector tag's description][2] links to a succinct tutorial on vectors within the context of games. Read [part one][3] at least. A basic understanding of vectors is critical for game programmers, if only because it will make your life easier._&#xD;&#xA;&#xD;&#xA;Remember that the _origin_ of the screen, which sits at the top left, is `(0, 0)`. Consider that when you place something at `(30, 30)`, you're actually placing it at `(0, 0) + (30, 30)`. You're placing it at `(30, 30)` relative to a particular point on the screen - the origin.&#xD;&#xA;&#xD;&#xA;So if you want to place something 25 pixels left and 20 pixels up from the bottom-right corner, you're placing it at `(-25, -20)` relative to the bottom-right corner. Assuming `(right, bottom)` represents the bottom-right corner of the screen, that means you just place your sprite at `(right, bottom) + (-25, -20)`.&#xD;&#xA;&#xD;&#xA;In code, assuming you have a 2-dimensional vector class named `Vector2`:&#xD;&#xA;&#xD;&#xA;    // From the StackOverflow answer linked at the beginning&#xD;&#xA;    Display display = getWindowManager().getDefaultDisplay(); &#xD;&#xA;    int width = display.getWidth();&#xD;&#xA;    int height = display.getHeight();&#xD;&#xA;&#xD;&#xA;    // This is the coordinate of the bottom-right most pixel on the screen&#xD;&#xA;    Vector2 bottomRight = new Vector2(width, height);&#xD;&#xA;    &#xD;&#xA;    // This is the position you want the sprite relative to the bottom-right point&#xD;&#xA;    // (25 pixels left, 20 pixels up)&#xD;&#xA;    Vector2 distFromBR = new Vector2(-25, -20);&#xD;&#xA;&#xD;&#xA;    // This is the position you should place that sprite to have it in the right position&#xD;&#xA;    Vector2 spritePos = bottomRight + distFromBR;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1016896/android-how-to-get-screen-dimensions/1016941#1016941&#xD;&#xA;[2]: http://gamedev.stackexchange.com/tags/vector/info&#xD;&#xA;[3]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/" />
  <row Id="32970" PostHistoryTypeId="5" PostId="14656" RevisionGUID="303b0071-cfb3-414e-8102-83467e9f6876" CreationDate="2011-07-10T03:01:57.627" UserId="2698" Comment="added 200 characters in body" Text="Get the screen size ([this StackOverflow answer says how][1]) and you'll have a vector representing the bottom-right coordinate of the screen. Now you can just place stuff relative to this vector in order to place things relative to the bottom-right of the screen instead of the top-left.&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;I'm assuming that on Android, (0,0) is the top-left corner of the screen. If it isn't, I'll edit this answer to accommodate.&lt;/sup&gt;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### In case it isn't clear how that would work, here's an explanation&#xD;&#xA;&#xD;&#xA;_First: please make sure you have a basic understanding of vectors (not the list type, but the mathematical object). [The vector tag's description][2] links to a succinct tutorial on vectors within the context of games. Read [part one][3] at least. A basic understanding of vectors is critical for game programmers, if only because it will make your life easier._&#xD;&#xA;&#xD;&#xA;Remember that the _origin_ of the screen, which sits at the top left, is `(0, 0)`. Consider that when you place something at `(30, 30)`, you're actually placing it at `(0, 0) + (30, 30)`. You're placing it at `(30, 30)` relative to a particular point on the screen - the origin.&#xD;&#xA;&#xD;&#xA;So if you want to place something 25 pixels left and 20 pixels up from the bottom-right corner, you're placing it at `(-25, -20)` relative to the bottom-right corner. Assuming `(right, bottom)` represents the bottom-right corner of the screen, that means you just place your sprite at `(right, bottom) + (-25, -20)`.&#xD;&#xA;&#xD;&#xA;In code, assuming you have a 2-dimensional vector class named `Vector2`, which represents a [mathematical vector][4] (_NOT_ the [vector list type][5]!):&#xD;&#xA;&#xD;&#xA;    // From the StackOverflow answer linked at the beginning&#xD;&#xA;    Display display = getWindowManager().getDefaultDisplay(); &#xD;&#xA;    int width = display.getWidth();&#xD;&#xA;    int height = display.getHeight();&#xD;&#xA;&#xD;&#xA;    // This is the coordinate of the bottom-right most pixel on the screen&#xD;&#xA;    Vector2 bottomRight = new Vector2(width, height);&#xD;&#xA;    &#xD;&#xA;    // This is the position you want the sprite relative to the bottom-right point&#xD;&#xA;    // (25 pixels left, 20 pixels up)&#xD;&#xA;    Vector2 distFromBR = new Vector2(-25, -20);&#xD;&#xA;&#xD;&#xA;    // This is the position you should place that sprite to have it in the right position&#xD;&#xA;    Vector2 spritePos = bottomRight + distFromBR;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1016896/android-how-to-get-screen-dimensions/1016941#1016941&#xD;&#xA;[2]: http://gamedev.stackexchange.com/tags/vector/info&#xD;&#xA;[3]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;[4]: http://mathworld.wolfram.com/Vector.html&#xD;&#xA;[5]: http://download.oracle.com/javase/6/docs/api/java/util/Vector.html" />
  <row Id="32971" PostHistoryTypeId="25" PostId="14653" RevisionGUID="ef478045-7d33-4dbc-a734-c219ee1a95db" CreationDate="2011-07-10T03:30:07.033" Comment="http://twitter.com/#!/StackGameDev/status/89899160551161856" />
  <row Id="32972" PostHistoryTypeId="5" PostId="14656" RevisionGUID="72c4c165-1a93-43e9-a9a0-b52541c504e7" CreationDate="2011-07-10T04:00:19.933" UserId="2698" Comment="added 35 characters in body" Text="Get the screen size ([this StackOverflow answer says how][1]) and you'll have a vector (of the [mathematical variety][4]) representing the bottom-right coordinate of the screen. Now you can just place stuff relative to this vector in order to place things relative to the bottom-right of the screen instead of the top-left.&#xD;&#xA;&#xD;&#xA;&lt;sup&gt;I'm assuming that on Android, (0,0) is the top-left corner of the screen. If it isn't, I'll edit this answer to accommodate.&lt;/sup&gt;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### In case it isn't clear how that would work, here's an explanation&#xD;&#xA;&#xD;&#xA;_First: please make sure you have a basic understanding of vectors (not the list type, but the mathematical object). [The vector tag's description][2] links to a succinct tutorial on vectors within the context of games. Read [part one][3] at least. A basic understanding of vectors is critical for game programmers, if only because it will make your life easier._&#xD;&#xA;&#xD;&#xA;Remember that the _origin_ of the screen, which sits at the top left, is `(0, 0)`. Consider that when you place something at `(30, 30)`, you're actually placing it at `(0, 0) + (30, 30)`. You're placing it at `(30, 30)` relative to a particular point on the screen - the origin.&#xD;&#xA;&#xD;&#xA;So if you want to place something 25 pixels left and 20 pixels up from the bottom-right corner, you're placing it at `(-25, -20)` relative to the bottom-right corner. Assuming `(right, bottom)` represents the bottom-right corner of the screen, that means you just place your sprite at `(right, bottom) + (-25, -20)`.&#xD;&#xA;&#xD;&#xA;In code, assuming you have a 2-dimensional vector class named `Vector2`, which represents a [mathematical vector][4] (_NOT_ the [vector list type][5]!):&#xD;&#xA;&#xD;&#xA;    // From the StackOverflow answer linked at the beginning&#xD;&#xA;    Display display = getWindowManager().getDefaultDisplay(); &#xD;&#xA;    int width = display.getWidth();&#xD;&#xA;    int height = display.getHeight();&#xD;&#xA;&#xD;&#xA;    // This is the coordinate of the bottom-right most pixel on the screen&#xD;&#xA;    Vector2 bottomRight = new Vector2(width, height);&#xD;&#xA;    &#xD;&#xA;    // This is the position you want the sprite relative to the bottom-right point&#xD;&#xA;    // (25 pixels left, 20 pixels up)&#xD;&#xA;    Vector2 distFromBR = new Vector2(-25, -20);&#xD;&#xA;&#xD;&#xA;    // This is the position you should place that sprite to have it in the right position&#xD;&#xA;    Vector2 spritePos = bottomRight + distFromBR;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://stackoverflow.com/questions/1016896/android-how-to-get-screen-dimensions/1016941#1016941&#xD;&#xA;[2]: http://gamedev.stackexchange.com/tags/vector/info&#xD;&#xA;[3]: http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/&#xD;&#xA;[4]: http://mathworld.wolfram.com/Vector.html&#xD;&#xA;[5]: http://download.oracle.com/javase/6/docs/api/java/util/Vector.html" />
  <row Id="32973" PostHistoryTypeId="2" PostId="14657" RevisionGUID="a0f2071c-f805-4a9a-bcb8-29c8a0c6ee35" CreationDate="2011-07-10T05:01:09.333" UserId="3354" Text="Hey can someone help me out, I've been trying to fix this for about 2 hours now, and I'm a noob when it comes to game programming and Java(only been reading and programming with it for a week now, this is my first non-tutorial driven attempt at anything).&#xD;&#xA;&#xD;&#xA;Basically from my understanding my tile map class should be done correctly, here's the code in case I am mistaken: (file name is Map.java and its part of the tilemap package)&#xD;&#xA;&#xD;&#xA;    package tilemap;&#xD;&#xA;    &#xD;&#xA;    import java.awt.Graphics2D;&#xD;&#xA;    import java.awt.*;&#xD;&#xA;    import javax.swing.*;&#xD;&#xA;    &#xD;&#xA;    public class Map{&#xD;&#xA;    	&#xD;&#xA;    	private final int TILE_SIZE = 40;&#xD;&#xA;    	private Image wall;&#xD;&#xA;    	private Image floor;&#xD;&#xA;    &#xD;&#xA;    	private int[][] map = { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 0, 0, 0, 0, 0, 0, 0, 0, 1 },&#xD;&#xA;    							{1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }};&#xD;&#xA;    	public Map() {&#xD;&#xA;    		wall = new ImageIcon(&quot;wall.gif&quot;).getImage();&#xD;&#xA;    		floor = new ImageIcon(&quot;floor.gif&quot;).getImage();&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	public void paint(Graphics2D g) {&#xD;&#xA;    		// loop through all the tiles in the map rendering them&#xD;&#xA;    		// based on whether they block or not&#xD;&#xA;    		for (int across=0;across&lt;10;across++) {&#xD;&#xA;    			for (int down=0;down&lt;13;down++) {&#xD;&#xA;    				&#xD;&#xA;    				if (map[across][down] == 1) {&#xD;&#xA;    					g.drawImage(wall, across*TILE_SIZE, down*TILE_SIZE, null);&#xD;&#xA;    				} else {&#xD;&#xA;    					g.drawImage(floor, across*TILE_SIZE, down*TILE_SIZE, null);&#xD;&#xA;    				}&#xD;&#xA;    				&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now I think the issue is in this section here in my GameCanvas.java:&#xD;&#xA;&#xD;&#xA;    public void gameLoop() {&#xD;&#xA;    		boolean gameRunning = true;&#xD;&#xA;    		long last = System.nanoTime();&#xD;&#xA;    		&#xD;&#xA;    		// keep looking while the game is running&#xD;&#xA;    		while (gameRunning) {&#xD;&#xA;    			Graphics2D g = (Graphics2D) strategy.getDrawGraphics();&#xD;&#xA;    			&#xD;&#xA;    			// clear the screen&#xD;&#xA;    			g.setColor(Color.black);&#xD;&#xA;    			g.fillRect(0,0,1000,1000);&#xD;&#xA;    			&#xD;&#xA;    			// render our game objects&#xD;&#xA;    			map.paint(g);&#xD;&#xA;    			&#xD;&#xA;    			// flip the buffer so we can see the rendering&#xD;&#xA;    			g.dispose();&#xD;&#xA;    			strategy.show();&#xD;&#xA;    			&#xD;&#xA;    			// pause a bit so that we don't choke the system&#xD;&#xA;    			try { Thread.sleep(4); } catch (Exception e) {};&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;And the full GameCanvas.java in case its else where:&#xD;&#xA;&#xD;&#xA;    package tilemap;&#xD;&#xA;    &#xD;&#xA;    import java.awt.Canvas;&#xD;&#xA;    import java.awt.Color;&#xD;&#xA;    import java.awt.Frame;&#xD;&#xA;    import java.awt.Graphics2D;&#xD;&#xA;    import java.awt.image.BufferStrategy;&#xD;&#xA;    &#xD;&#xA;    import tilemap.Map;&#xD;&#xA;    &#xD;&#xA;    public class GameCanvas extends Canvas {&#xD;&#xA;    	&#xD;&#xA;    	/** The buffered strategy used for accelerated rendering */&#xD;&#xA;    	private BufferStrategy strategy;&#xD;&#xA;    	&#xD;&#xA;    	/** The map our player will wander round */&#xD;&#xA;    	private Map map;&#xD;&#xA;    	&#xD;&#xA;    	public static void main(String[] args) {&#xD;&#xA;    		new GameCanvas();&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	public GameCanvas() {&#xD;&#xA;    		Frame frame = new Frame(&quot;Tile Map Example&quot;);&#xD;&#xA;    		frame.setLayout(null);&#xD;&#xA;    		frame.add(this);&#xD;&#xA;    		frame.setSize(500,500);&#xD;&#xA;    		frame.setResizable(true);&#xD;&#xA;    		frame.setVisible(true);&#xD;&#xA;    		&#xD;&#xA;    		createBufferStrategy(2);&#xD;&#xA;    		strategy = getBufferStrategy();&#xD;&#xA;    		&#xD;&#xA;    		map = new Map();&#xD;&#xA;    		&#xD;&#xA;    		// start the game loop&#xD;&#xA;    		gameLoop();&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	public void gameLoop() {&#xD;&#xA;    		boolean gameRunning = true;&#xD;&#xA;    		long last = System.nanoTime();&#xD;&#xA;    		&#xD;&#xA;    		// keep looking while the game is running&#xD;&#xA;    		while (gameRunning) {&#xD;&#xA;    			Graphics2D g = (Graphics2D) strategy.getDrawGraphics();&#xD;&#xA;    			&#xD;&#xA;    			// clear the screen&#xD;&#xA;    			g.setColor(Color.black);&#xD;&#xA;    			g.fillRect(0,0,1000,1000);&#xD;&#xA;    			&#xD;&#xA;    			// render our game objects&#xD;&#xA;    			map.paint(g);&#xD;&#xA;    			&#xD;&#xA;    			// flip the buffer so we can see the rendering&#xD;&#xA;    			g.dispose();&#xD;&#xA;    			strategy.show();&#xD;&#xA;    			&#xD;&#xA;    			// pause a bit so that we don't choke the system&#xD;&#xA;    			try { Thread.sleep(4); } catch (Exception e) {};&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I think the issue is when I go to draw/paint the screen there's something I'm not taking care of correctly, or maybe I'm not calling the right method (I've seen like 3 ways to draw to the screen, Canvas (which I think I'm using), JFrames/Jpanels, and OpenGL(which I have no idea about))&#xD;&#xA;&#xD;&#xA;Please let me know what the issue is if you can spot it, cause I really have no idea without an compilation error poping up.&#xD;&#xA;&#xD;&#xA;Thank you!" />
  <row Id="32974" PostHistoryTypeId="1" PostId="14657" RevisionGUID="a0f2071c-f805-4a9a-bcb8-29c8a0c6ee35" CreationDate="2011-07-10T05:01:09.333" UserId="3354" Text="Java tilemap not working, Think it has something to do with my image rendering" />
  <row Id="32975" PostHistoryTypeId="3" PostId="14657" RevisionGUID="a0f2071c-f805-4a9a-bcb8-29c8a0c6ee35" CreationDate="2011-07-10T05:01:09.333" UserId="3354" Text="&lt;2d&gt;&lt;java&gt;&lt;rendering&gt;&lt;tiles&gt;" />
  <row Id="32976" PostHistoryTypeId="2" PostId="14658" RevisionGUID="2bc2afc0-f07d-400e-9f1f-d18564a8ff8c" CreationDate="2011-07-10T05:19:26.277" UserId="4065" Text="I've been looking into how to use the XNA Content pipeline appropriately for a game I am working on. I have however been having a hard time wrapping my head around it and am not sure on the best way to proceed.&#xD;&#xA;&#xD;&#xA;The specific example is, I have a top down 2-d RPG style game. I want to create a utility (probably Windows Forms) that will allow me to easily create and edit maps. Each map consists of 1 or more graphic layers, each layer containing a N x N grid of tiles. In turn each tile starts out as a bitmap. &#xD;&#xA;&#xD;&#xA;Given the above information I see a few ways to proceed:&#xD;&#xA;&#xD;&#xA; 1. Store the map info in an XML file compatible with the Content Pipeline XML loader. Each tile is stored as a string reference to the corresponding texture asset. Texture assets are added in the game project.&#xD;&#xA; 2. Store the map info in an XML file compatible with the Content Pipeline XML loader.&#xD;&#xA;Each tile is stored as the path to the corresponding .bmp/.png files.&#xD;&#xA;&#xD;&#xA;Now there are things that I really don't like about both approaches. The main issue with approach one is that the map creation and the .xnb texture asset creation are completely separate. The .xml map file is created by the utility, while the texture asset is added to my content in my game. This becomes an issue trying to make sure the .xml map file and all the texture assets in the project stay in sync.&#xD;&#xA;&#xD;&#xA;Approach two would allow me to keep all the appropriate image file next to the map files using the map utility. However, it seems like I shouldn't have to do something like this. Also I would need to be more intelligent about loading the maps so that I am not rapidly loading the same image off disc for each tile.&#xD;&#xA;&#xD;&#xA;So my question is: If you want to add a content generation utility (like a map editor), what is the best way to make sure that the custom content (map file) stays in sync with the texture assets. Also, keep in mind that in my map editor I would need the ability to load and display the texture assets.&#xD;&#xA;&#xD;&#xA;Any input is much appreciated." />
  <row Id="32977" PostHistoryTypeId="1" PostId="14658" RevisionGUID="2bc2afc0-f07d-400e-9f1f-d18564a8ff8c" CreationDate="2011-07-10T05:19:26.277" UserId="4065" Text="XNA Content Pipeline With Map Creation Utility" />
  <row Id="32978" PostHistoryTypeId="3" PostId="14658" RevisionGUID="2bc2afc0-f07d-400e-9f1f-d18564a8ff8c" CreationDate="2011-07-10T05:19:26.277" UserId="4065" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="32979" PostHistoryTypeId="2" PostId="14659" RevisionGUID="969ca079-6a72-47eb-9f39-9e50e5528152" CreationDate="2011-07-10T05:25:35.927" UserId="5131" Text="I see an out of bounds exception. Try changing 2 lines to this:&#xD;&#xA;&#xD;&#xA;            for (int across=0; across&lt;13; across++) {&#xD;&#xA;                for (int down=0; down&lt;10; down++) {&#xD;&#xA;" />
  <row Id="32980" PostHistoryTypeId="2" PostId="14660" RevisionGUID="1a2519f8-b97e-4cbd-975d-74e85d5fc045" CreationDate="2011-07-10T05:44:07.117" UserId="2061" Text="Put all your tile-images into a single image file, and reference them by the tile-number.&#xD;&#xA;&#xD;&#xA;This will be much more performant and error-proof, and has the advantage that you can set up your levels in a tile-editor like [Tiled](http://www.mapeditor.org/)." />
  <row Id="32981" PostHistoryTypeId="25" PostId="14650" RevisionGUID="8e325372-397a-431f-9c90-df366373de1e" CreationDate="2011-07-10T06:30:06.017" Comment="http://twitter.com/#!/StackGameDev/status/89944462813446145" />
  <row Id="32982" PostHistoryTypeId="2" PostId="14661" RevisionGUID="4ded17ac-01f0-463f-a792-dc0d1acf4a5d" CreationDate="2011-07-10T06:54:31.150" UserId="189" Text="In your constructor, try `this.setSize(500,500);`. You could alternatively try `frame.pack();` or something like that. If that still doesn't work, instead of giving the frame a null layout, try giving it a border layout and add `this` in the `CENTER`.&#xD;&#xA;&#xD;&#xA;I wonder whether ImageIcon is not returning a proper image; try following the trail on [Reading/Loading an Image][1].&#xD;&#xA;&#xD;&#xA;Looks like you're using BufferStrategy correctly. You could try commenting out `g.dispose();`, but I think that's correct.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/tutorial/2d/images/loadimage.html" />
  <row Id="32983" PostHistoryTypeId="5" PostId="14661" RevisionGUID="a7f98f0d-f389-43e8-8454-acf45828b2c1" CreationDate="2011-07-10T07:00:30.457" UserId="189" Comment="deleted 18 characters in body" Text="In your constructor, try `this.setSize(500,500);`, and you might also need `this.setVisible(true);`. If that still doesn't work, instead of giving the frame a null layout, try giving it a border layout and add `this` in the `CENTER`.&#xD;&#xA;&#xD;&#xA;I wonder whether ImageIcon is not returning a proper image; try following the trail on [Reading/Loading an Image][1].&#xD;&#xA;&#xD;&#xA;Looks like you're using BufferStrategy correctly. You could try commenting out `g.dispose();`, but I think that's correct.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/tutorial/2d/images/loadimage.html" />
  <row Id="32984" PostHistoryTypeId="2" PostId="14662" RevisionGUID="90de7546-ac7b-4b3d-8d03-e594156f6201" CreationDate="2011-07-10T07:36:16.357" UserId="5224" Text="I'm not 100% sure I got your question clear in my head, but try this:&#xD;&#xA;&#xD;&#xA;You'll have to make the map editor leading, don't add any assets to your Content project except for one XML file (game.xml or something). Now have your level editor edit the game.xml file, by adding links to other files. For example creating a new level in your level editor adds the tag `&lt;level rank=5&gt;Content/MyLevel/level5.xml/&gt;` to your XML file.&#xD;&#xA;&#xD;&#xA;Now to get everything built you need to write a custom content pipeline extension. *(Make sure to set the new importer and processor on your game.xml file instead of the default XML processor)*&#xD;&#xA;&#xD;&#xA;This processor will traverse the XML files and build all the assets by calling the appropriate importers and processor. This will leave you with everything nicely built and not having to go back and forth to the content project and your editor.&#xD;&#xA;&#xD;&#xA;Resources: http://msdn.microsoft.com/en-us/library/bb447754.aspx" />
  <row Id="32985" PostHistoryTypeId="2" PostId="14663" RevisionGUID="dec76aee-9857-4efd-ac87-f73108e87456" CreationDate="2011-07-10T08:07:51.153" UserId="8240" Text="There are plenty of tools for making images. I'm not looking for one of those; I have many tools for creating an image. I've got tools for compressing images, generating mipmaps, and even for poking at their basic data format.&#xD;&#xA;&#xD;&#xA;My issue is with texture assembly. DDS files support cubemaps, array textures, and even cubemap arrays. But I don't know of a tool that can pack a series of images into a cubemap or the like." />
  <row Id="32986" PostHistoryTypeId="1" PostId="14663" RevisionGUID="dec76aee-9857-4efd-ac87-f73108e87456" CreationDate="2011-07-10T08:07:51.153" UserId="8240" Text="Tools for assembling textures into DDS files" />
  <row Id="32987" PostHistoryTypeId="3" PostId="14663" RevisionGUID="dec76aee-9857-4efd-ac87-f73108e87456" CreationDate="2011-07-10T08:07:51.153" UserId="8240" Text="&lt;textures&gt;&lt;tools&gt;" />
  <row Id="32988" PostHistoryTypeId="2" PostId="14664" RevisionGUID="efd463c1-9686-4da0-8fb7-d38d7c370ec0" CreationDate="2011-07-10T08:14:12.743" UserId="288" Text="What you want is to is get your textures to build based on the contents of the XML file. This way you don't have to add the textures to your content project, the pipeline will automatically include the texture file into the build for you.&#xD;&#xA;&#xD;&#xA;To do this you will need to write a custom content processor (you can still use the standard XML importer), and use `ContentProcessorContext.BuildAsset` in that processor to reference the external texture.&#xD;&#xA;&#xD;&#xA;I think that you will need to create a custom `ContentTypeWriter` and `ContentTypeReader` to write and then read the `ExternalReference` that `BuildAsset` gives you." />
  <row Id="32989" PostHistoryTypeId="5" PostId="14663" RevisionGUID="1247b836-1586-4594-807e-c07fa064f012" CreationDate="2011-07-10T08:16:01.330" UserId="8240" Comment="added 55 characters in body" Text="There are plenty of tools for making images. I'm not looking for one of those; I have many tools for creating an image. I've got tools for compressing images, generating mipmaps, and even for poking at their basic data format.&#xD;&#xA;&#xD;&#xA;My issue is with texture assembly. DDS files support cubemaps, array textures, and even cubemap arrays. But I don't know of a tool that can pack a series of images into a cubemap or the like. What tools are available for doing this kind of thing?" />
  <row Id="32990" PostHistoryTypeId="2" PostId="14665" RevisionGUID="d160688c-b9be-43c4-852d-62da3b35bf9c" CreationDate="2011-07-10T08:19:49.857" UserId="5021" Text="You haven't given us much context about where you heard these terms. Their meanings can vary, but generally they mean the following.&#xD;&#xA;&#xD;&#xA;A ***material*** usually refers to the collection of textures that produce a certain surface look. This can include the ambient/diffuse light texture, the normal map, the ambient occlusion map, the specular exponent map, the specular intensity map, etc.&#xD;&#xA;&#xD;&#xA;A ***material pass*** in a forward rendered pipeline refers to using the material textures to apply lighting and color to an object. This is the step where we draw part or all of the colors on objects to the scene texture. With forward rendering, this usually means including all of the lighting effects during this pass. There is often only one material pass, but sometimes multiple material passes are done in order to apply part of an effect at a time, as an optimization, or to overcome hardware/software limitations.&#xD;&#xA;&#xD;&#xA;A *material pass* in a deferred rendering pipeline usually refers to the pass where materials are applied. Several &quot;passes&quot; are done in a deferred rendering pipeline. We have a depth pass where we draw all the depths in the scene to a texture, a lighting pass where we draw all the lights to a light buffer texture, a material pass where we draw all of the object colors to a material texture. These multiple textures are then later combined into a final image.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;In other words, a material is a collection of textures to be applied to a piece of geometry, and a material pass is where we actually apply some or all of the color and light effects that the material represents to the geometry.&#xD;&#xA;" />
  <row Id="32991" PostHistoryTypeId="5" PostId="14491" RevisionGUID="59ac23a5-0611-40b5-8ce2-99315717032a" CreationDate="2011-07-10T08:21:03.477" UserId="7728" Comment="Simplified code, using @BlueRaja's suggestion." Text="The simplest solution for you will be to check both collision directions before resolving either of them, and just resolve the smaller of the two.  This means that you resolve by the smallest amount possible, instead of always resolving x first, or always resolving y first.&#xD;&#xA;&#xD;&#xA;Your code would look something like this:&#xD;&#xA;&#xD;&#xA;    // This loop repeats, until our object has been fully pushed outside of all&#xD;&#xA;    // collision objects&#xD;&#xA;    while ( StillCollidingWithSomething(object) )&#xD;&#xA;    {&#xD;&#xA;      float xDistanceToResolve = XDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      float yDistanceToResolve = YDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      bool xIsColliding = (xDistanceToResolve != 0.f);&#xD;&#xA;&#xD;&#xA;      // if we aren't colliding on x (not possible for normal solid collision &#xD;&#xA;      // shapes, but can happen for unidirectional collision objects, such as &#xD;&#xA;      // platforms which can be jumped up through, but support the player from &#xD;&#xA;      // above), or if a correction along y would simply require a smaller move &#xD;&#xA;      // than one along x, then resolve our collision by moving along y.&#xD;&#xA;&#xD;&#xA;      if ( !xIsColliding || fabs( yDistanceToResolve ) &lt; fabs( xDistanceToResolve ) )&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( 0.f, yDistanceToResolve );&#xD;&#xA;      }&#xD;&#xA;      else // otherwise, resolve the collision by moving along x&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( xDistanceToResolve, 0.f );&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="32992" PostHistoryTypeId="2" PostId="14666" RevisionGUID="787de948-5381-4d35-ae0b-40541965323d" CreationDate="2011-07-10T09:01:01.977" UserId="991" Text="There is a tool called DxTex. It comes with the DirecX SDK (Utilities folder). It can create Mipmaps, Cubemaps, Volumemaps and several other things you might want to do with your textures." />
  <row Id="32993" PostHistoryTypeId="25" PostId="14663" RevisionGUID="a4f86492-5055-4fef-9e13-ddeb61f59c7f" CreationDate="2011-07-10T09:30:08.090" Comment="http://twitter.com/#!/StackGameDev/status/89989767621644288" />
  <row Id="32995" PostHistoryTypeId="2" PostId="14668" RevisionGUID="7f1dc564-343d-4156-af62-6e2e5f992624" CreationDate="2011-07-10T10:13:27.703" UserId="741" Text="It seems to me that you're trying to achieve a graceful co-existence with other processes on a PC game? I.e. to not occupy the entirety of the CPU all the time, so as to allow other processes to run (and if you're running on a laptop, to allow the speed-stepping to power down the CPU and preserve battery life)?&#xD;&#xA;&#xD;&#xA;I've certainly tried to achieve this in the past, and never fully settled on a solution I liked. I never tried Crowley9's method of using the DONOT_WAIT flag, but to me that smells like closer to the right solution. If Present only blocks when the present can't be queued (because there's already another present queued), then you don't need to call Present 'just before' the VSync happens, you just need to sleep until it's likely that another call to Present will succeed (which will be any time after the next VSync).&#xD;&#xA;&#xD;&#xA;The root problem is that you don't really know when the VSync occurs, and a system like that needs to stay synchronised.&#xD;&#xA;&#xD;&#xA;The basic gist of my solution was: don't use Present to find out where the VSync boundary is, do the timing yourself, and make sure you're calling Present as close to the appropriate time as possible. If you're late, it won't matter because of the internal buffering D3D does, and if you're early then it will simply block and the worst you'll incur is some extra CPU usage.&#xD;&#xA;&#xD;&#xA;What I did do was to use (microsecond accurate) timers, track the elapsed frametime, and sleep accordingly. There's no magic flag or function I know of to say 'wake me when VSync's about to happen', because there isn't an event available that is signalled when a VSync is about to happen. So instead I looked at how long the frame had taken so far, figure out when I thought the next VSync would occur, subtracted a grace period (I think I left 3ms), and call ::Sleep.&#xD;&#xA;&#xD;&#xA;E.g. if the frame processing took 2ms, I would get to the Present call early. If I called it straight away, I'd expect it to block (at 100% CPU) for 14ms. Instead, I call ::Sleep(11), and then the subsequent Present only blocks for ~3ms). If the frame processing took longer than 13ms, I'd just call Present without sleeping. If it took longer than 16ms, I'd switch down to 30Hz rendering (with some hysteresis), and adjust the Sleep timings accordingly.&#xD;&#xA;&#xD;&#xA;BUT I was never particularly happy with this solution, for several reasons. If you're running on a loaded system, Sleep is by no means guaranteed to give you control back in that 3ms window, you have no good control over the OS time-slicing.&#xD;&#xA;&#xD;&#xA;Worse, the minimum sleep time is supposedly 10ms, anything less than that and it ends up sleeping for 10ms regardless of what you specify (in practice it's way more variable than that). So you also have to track how long you actually slept for, and factor that into your logic (so you avoid sleeping if you're running late). And then you end up calling Present late one frame, then avoiding the sleep the next frame and calling it early the next. E.g.&#xD;&#xA;&#xD;&#xA;    0ms (0ms) : start&#xD;&#xA;    10ms (10ms) : process frame 1&#xD;&#xA;    10ms (20ms) : try to sleep for 3ms, end up sleeping 10ms&#xD;&#xA;    0ms (20ms) : present late, succeeds straight away&#xD;&#xA;    10ms (30ms) : process frame 2&#xD;&#xA;    2ms (32ms) : don't try to sleep, present early, blocks till the next vsync&#xD;&#xA;&#xD;&#xA;So for managing 60Hz rendering, the granularity of the time-slicing / Sleep function makes this a not great solution. And it also doesn't take into account the actual refresh rate of the system!" />
  <row Id="32996" PostHistoryTypeId="2" PostId="14669" RevisionGUID="d322f911-89b6-4f01-ba67-90c2eb72f55a" CreationDate="2011-07-10T11:16:55.717" UserId="3505" Text="You could use either ActionScript/Flash or JavaScript/HTML for the front-end. You'll be doing pretty much the same in either case, that is using HTTP connections for interacting with the back-end.&#xD;&#xA;&#xD;&#xA;For the back-end you can use pretty much any language and database that you like. This could be PHP and MySQL, which is an easy to use choice, though with a pretty bad performance." />
  <row Id="32997" PostHistoryTypeId="6" PostId="14639" RevisionGUID="6b459bc0-7bc9-4217-91d5-9fd2686d6c80" CreationDate="2011-07-10T11:37:59.217" UserId="741" Comment="edited tags" Text="&lt;c++&gt;&lt;directx&gt;&lt;pc&gt;&lt;vsync&gt;" />
  <row Id="32998" PostHistoryTypeId="6" PostId="14648" RevisionGUID="5ed481bb-eb82-4d91-b21f-73aad4950909" CreationDate="2011-07-10T12:09:22.950" UserId="3505" Comment="edited tags" Text="&lt;architecture&gt;&lt;actionscript-3&gt;&lt;javascript&gt;&lt;php&gt;" />
  <row Id="32999" PostHistoryTypeId="25" PostId="14658" RevisionGUID="d56e7877-6a8e-4fa7-844e-b71b01a4245c" CreationDate="2011-07-10T12:30:09.463" Comment="http://twitter.com/#!/StackGameDev/status/90035069242187776" />
  <row Id="33000" PostHistoryTypeId="2" PostId="14670" RevisionGUID="ac82da86-421e-4600-8642-c4b60616b84c" CreationDate="2011-07-10T13:09:34.743" UserId="7981" Text="[An Allegro Game in 20 lines of code][1]. &#xD;&#xA;&#xD;&#xA;* It can be considered &quot;free to use&quot; since it is snippets on public forum&#xD;&#xA;* C language&#xD;&#xA;* some &quot;dirty techniques&quot; how to squeeze code in C&#xD;&#xA;* some techniques how to make game simply&#xD;&#xA;* at most 20 lines (there are few exceptions and there is a problem that [C is maybe too compressible][2], because there is almost no restriction on newlines or whitespaces; [LOC is usually a bad metric][3])&#xD;&#xA;* Not sure if the &quot;basics of the programming techniques&quot; falls here, but there are certainly &#xD;&#xA;1. arrays&#xD;&#xA;2. function composition&#xD;&#xA;3. C boolean properties&#xD;&#xA;4. C comma properties&#xD;&#xA;5. C macro-processor properties&#xD;&#xA;6. C ternary operator&#xD;&#xA;7. boolean logic with multiplication and addition&#xD;&#xA;8. ...&#xD;&#xA;* You would need some math background to understand some of them.&#xD;&#xA;* Snippets have &lt; and &gt; instead of [ and ] .&#xD;&#xA;&#xD;&#xA;There is also Pac-Man for example.&#xD;&#xA;&#xD;&#xA;It is something I would reccomend You if You are more advanced programmer, because some of these techniques are quite non-readable.Nevertheless, it is a nice set of techniques. Proper way would not be to make such &quot;abominations&quot; but to properly design, document, test (...) Your program and such code would be the result of many compression techniques applied on very good design. Please, this is not how You should program but a demonstration how much a game can be compressed.&#xD;&#xA;&#xD;&#xA;[1]:http://www.allegro.cc/forums/thread/237297/237297#target&#xD;&#xA;[2]:http://www.google.com/search?q=one+liner+c&#xD;&#xA;[3]:http://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt" />
  <row Id="33001" PostHistoryTypeId="16" PostId="14670" RevisionGUID="3594e9f6-3735-4638-8afb-9ef4a885ec3e" CreationDate="2011-07-10T13:09:34.743" UserId="7981" />
  <row Id="33002" PostHistoryTypeId="2" PostId="14671" RevisionGUID="4002b5fc-6ce2-468d-a4a4-2f0820a7f5fc" CreationDate="2011-07-10T14:18:02.540" UserId="229" Text="OK, I figured out why the [XNA AppHub platformer demo][1] doesn't have the &quot;jumping&quot; bug: **the demo tests the collision tiles from *top to bottom***. When up against a &quot;wall&quot; the player may be overlapping multiple tiles. The resolution order is important because resolving one collision may also resolve other collisions (but in a different direction). The `onGround` property is only set when the collision is resolved by pushing the player up on the y-axis. This resolution will not occur if the previous resolutions pushed the player down and/or horizontally.&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;I was able to reproduce the &quot;jumping&quot; bug in the XNA demo by changing this line:&#xD;&#xA;&#xD;&#xA;    for (int y = topTile; y &lt;= bottomTile; ++y)&#xD;&#xA;&#xD;&#xA;to this:&#xD;&#xA;&#xD;&#xA;    for (int y = bottomTile; y &gt;= topTile; --y)&#xD;&#xA;&#xD;&#xA;(I also tweaked some of the physics-related constants, but this should not matter.)&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;**Perhaps sorting `bodiesToCheck` on the y-axis before resolving the the collisions in your game will fix the &quot;jumping&quot; bug.** I suggest resolving the collision on the &quot;shallow&quot; axis of penetration, as the XNA demo does and [Trevor suggests][2]. Also note the XNA demo player is twice as tall as the collide-able tiles, making the multiple collision case more likely. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/platformer&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/14486/2d-platformer-aabb-collision-problems/14491#14491" />
  <row Id="33004" PostHistoryTypeId="25" PostId="14657" RevisionGUID="cfb8ecb3-1dc0-4a22-9467-7a96c283d5f6" CreationDate="2011-07-10T15:30:10.103" Comment="http://twitter.com/#!/StackGameDev/status/90080374138474496" />
  <row Id="33005" PostHistoryTypeId="5" PostId="14531" RevisionGUID="03108c40-dcd3-41ab-9ebc-2e1c13130547" CreationDate="2011-07-10T16:18:42.177" UserId="8437" Comment="added 34 characters in body" Text="For an action MMO type of game (I assume), you'll want a library that supports synchronization (keeps the players positions' in sync across all the clients and the server). Of course, you'll also want basic messaging features. With this in mind, here are a couple of Java libraries that might work for you.&#xD;&#xA;&#xD;&#xA; 1. [SpiderMonkey][1]. It's part of jME3, and I'm guessing it's one of the more popular networking libraries for jME. It supports sending and receiving messages, serialization, compression, synchronization via UDP, among other things. Also, it seems to be the standard networking library for jME games these days.&#xD;&#xA; 3. [JGN][2]. It's basically like the other libraries, but it's a more developed. It supports synchronization, and a bunch of other features like remote objects, shared objects, and streaming. Although it is no longer being actively developed and it's difficult to get support, it's quite a mature library.&#xD;&#xA; 2. [Kryonet][3]. It supports RMI and basic messaging. The only problem with this is that it doesn't support synchronization, so it might be a little bit of a hassle. However, it seems to be quite active, so it might be more robust than the other options.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Just a note: It's probably better to have a server for each zone/map. With only one server JVM supporting the whole game, if anything goes wrong, the whole game will go down. If you have multiple JVMs running each zone/map server, one error won't bring down your entire game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.org/wiki/doku.php/spidermonkey&#xD;&#xA;  [2]: http://code.google.com/p/jgn/&#xD;&#xA;  [3]: http://code.google.com/p/kryonet/" />
  <row Id="33006" PostHistoryTypeId="5" PostId="14669" RevisionGUID="7d2e01fc-f5f9-4ecb-ad29-dfb7fb1f77bf" CreationDate="2011-07-10T16:30:30.083" UserId="3505" Comment="added 229 characters in body" Text="You could use either ActionScript/Flash or JavaScript/HTML for the front-end. You'll be doing pretty much the same in either case, that is using HTTP connections for interacting with the back-end.&#xD;&#xA;&#xD;&#xA;For the back-end you can use pretty much any language and database that you like. This could be PHP and MySQL, which is an easy to use choice, though with a pretty bad performance.&#xD;&#xA;&#xD;&#xA;Other obvious choices for programming could be Node.js or .NET/C#. But really, anything where you can get a good HTTP library is within scope. For database you can choose anything that has an interface in the chosen language." />
  <row Id="33007" PostHistoryTypeId="2" PostId="14672" RevisionGUID="897e5d1c-6215-4d24-b603-14fa18fce64b" CreationDate="2011-07-10T16:42:33.633" UserId="8437" Text="You're not setting the size of the Canvas before you create the buffer strategy.&#xD;&#xA;&#xD;&#xA;    this.setSize(500,500);&#xD;&#xA;&#xD;&#xA;Also, you have an out of bounds exception, which d33j has already pointed out." />
  <row Id="33008" PostHistoryTypeId="5" PostId="14531" RevisionGUID="937d7c6f-a66d-4b6d-b943-b8a75ef2d27e" CreationDate="2011-07-10T16:50:46.913" UserId="8437" Comment="deleted 23 characters in body" Text="For an action game, you'll want a library that supports synchronization (keeps the players positions' in sync across all the clients and the server). Of course, you'll also want basic messaging features. With this in mind, here are a couple of Java libraries that might work for you.&#xD;&#xA;&#xD;&#xA; 1. [SpiderMonkey][1]. It's part of jME3, and I'm guessing it's one of the more popular networking libraries for jME. It supports sending and receiving messages, serialization, compression, synchronization via UDP, among other things. Also, it seems to be the standard networking library for jME games these days.&#xD;&#xA; 3. [JGN][2]. It's basically like the other libraries, but it's a more developed. It supports synchronization, and a bunch of other features like remote objects, shared objects, and streaming. Although it is no longer being actively developed and it's difficult to get support, it's quite a mature library.&#xD;&#xA; 2. [Kryonet][3]. It supports RMI and basic messaging. The only problem with this is that it doesn't support synchronization, so it might be a little bit of a hassle. However, it seems to be quite active, so it might be more robust than the other options.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Just a note: It's probably better to have a server for each zone/map. With only one server JVM supporting the whole game, if anything goes wrong, the whole game will go down. If you have multiple JVMs running each zone/map server, one error won't bring down your entire game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.org/wiki/doku.php/spidermonkey&#xD;&#xA;  [2]: http://code.google.com/p/jgn/&#xD;&#xA;  [3]: http://code.google.com/p/kryonet/" />
  <row Id="33009" PostHistoryTypeId="2" PostId="14673" RevisionGUID="6ef5aaec-4736-44a4-a8e6-57b6c80d1a42" CreationDate="2011-07-10T16:53:18.450" UserId="8358" Text="I am developing Android game. Its going to be a top-down shooter with stealth features. I am now thinking about how to make controlls. Most top-down games are now double stick (joystick on the left and right side) but I need more buttons (for choosing weapons, commanding your squad, and using skills)&#xD;&#xA;&#xD;&#xA;So here are my ideas :&#xD;&#xA;&#xD;&#xA;-two sticks like in other games, when you tap somewhere on the display, circle with buttons appears, where you ca choose abilities, weapons...&#xD;&#xA;&#xD;&#xA;-one stick on the left side for walking, shooting with draging your finger around display (when you touch, there you will shoot), weapons and skills on the right side&#xD;&#xA;&#xD;&#xA;What do you think is the best? Or do you have any other idea? I want to choose the most intuitive and simpliest. Thank you." />
  <row Id="33010" PostHistoryTypeId="1" PostId="14673" RevisionGUID="6ef5aaec-4736-44a4-a8e6-57b6c80d1a42" CreationDate="2011-07-10T16:53:18.450" UserId="8358" Text="Whats the best controlls scheme for you?" />
  <row Id="33011" PostHistoryTypeId="3" PostId="14673" RevisionGUID="6ef5aaec-4736-44a4-a8e6-57b6c80d1a42" CreationDate="2011-07-10T16:53:18.450" UserId="8358" Text="&lt;2d&gt;&lt;android&gt;&lt;touch&gt;" />
  <row Id="33012" PostHistoryTypeId="5" PostId="14643" RevisionGUID="7ed8c7bb-3f50-4cba-b34f-269cfc179903" CreationDate="2011-07-10T17:10:41.710" UserId="2332" Comment="Added further information regarding FFTs" Text="The term you're looking for is [signal processing/analysis][1] There are lots of techniques involved but the fundamental one that those games make use of is [Beat Detection][2]. This tries to calculate the tempo of the song and where the beats in a measure are and hence place the obstacles the appropriate distance apart to coincide with each beat.&#xD;&#xA;&#xD;&#xA;The way that the games know when to &quot;kick in&quot; etc can range from being very simple and measuring the amplitude (volume) of the waveform or something more complex like isolating the volume of certain frequencies and measuring their volume.&#xD;&#xA;&#xD;&#xA;If you're interested, look into Digital Signal Processing to see how you can analyse waveforms, which is essentially what these games are doing in their loading phase. &#xD;&#xA;&#xD;&#xA;These links are good to get you started:&#xD;&#xA;&#xD;&#xA;[Introduction to Sound Processing][3]  &#xD;&#xA;[Theory and Techniques of Electronic Music][4]  &#xD;&#xA;[Introduction to Digital Filters][5]&#xD;&#xA;&#xD;&#xA;Hope that helps :)&#xD;&#xA;&#xD;&#xA;-Ray&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: I just saw your edit regarding Fourier transforms and thought I'll add some insight into it, although I'm by no means an expert on it!&#xD;&#xA;&#xD;&#xA;FFT is a way of calculating the actual Fourier transform of a waveform. Basically, if you load up an audio file into Audacity, you'll see the wave form with the timeline along the top, this is known as the *time domain*. The FFT will convert a signal from the time domain into the *frequency domain* (basically all the frequencies that occur within the audio). &#xD;&#xA;&#xD;&#xA;This conversion is useful for spectral analysis. In a game example, if you were to do a Fourier transform, you could easily calculate the amount of high frequency occurrences in the audio, and from that you could add twinkly visual effects, stars, or something associated with typically high frequency sounds. For the low frequencies you could have big, gluttonous monsters moving in time to the bass sounds, etc. &#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Signal_analysis&#xD;&#xA;  [2]: http://archive.gamedev.net/reference/programming/features/beatdetection/&#xD;&#xA;  [3]: http://profs.sci.univr.it/~rocchess/SP/&#xD;&#xA;  [4]: http://crca.ucsd.edu/~msp/techniques.htm&#xD;&#xA;  [5]: http://www.dsprelated.com/dspbooks" />
  <row Id="33013" PostHistoryTypeId="2" PostId="14674" RevisionGUID="64cb2409-47a6-445a-afd0-52d7a0cba365" CreationDate="2011-07-10T17:13:00.087" UserId="8408" Text="Does anyone know of any quality DirectX 11 books? If not, how did you learn the DirectX 11 API? MSDN documentation, tutorials, blogs, sample applications, etc?" />
  <row Id="33014" PostHistoryTypeId="1" PostId="14674" RevisionGUID="64cb2409-47a6-445a-afd0-52d7a0cba365" CreationDate="2011-07-10T17:13:00.087" UserId="8408" Text="DirectX 11 Books?" />
  <row Id="33015" PostHistoryTypeId="3" PostId="14674" RevisionGUID="64cb2409-47a6-445a-afd0-52d7a0cba365" CreationDate="2011-07-10T17:13:00.087" UserId="8408" Text="&lt;books&gt;&lt;learning&gt;&lt;directx11&gt;" />
  <row Id="33016" PostHistoryTypeId="16" PostId="14466" RevisionGUID="8929fe08-48e2-46f1-97a3-61f803f2ef1b" CreationDate="2011-07-10T17:15:59.553" UserId="8408" />
  <row Id="33017" PostHistoryTypeId="5" PostId="14466" RevisionGUID="8929fe08-48e2-46f1-97a3-61f803f2ef1b" CreationDate="2011-07-10T17:15:59.553" UserId="8408" Comment="deleted 128 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = 0;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    template &lt;class V&gt;&#xD;&#xA;    bool Mesh&lt;V&gt;::Render() {&#xD;&#xA;	pDeviceContext-&gt;IASetInputLayout(pVertexLayout);&#xD;&#xA;	pDeviceContext-&gt;IASetPrimitiveTopology(topologyType);&#xD;&#xA;	pDeviceContext-&gt;VSSetShader(pVShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;PSSetShader(pPShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;Draw(bufSize, 0);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Jumped the gun, thought I found the solution. Same issue and warning remains.&#xD;&#xA;&#xD;&#xA;Here is the shader initialization code&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;     bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;        // Replace with Int hash value!!!!&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Pixel Shader.&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Edit 2**&#xD;&#xA;&#xD;&#xA;I'm starting to think it's an issue with my draw call sequence and by extension the design of my Mesh superclass and UIRectangle subclass. Didn't originally include the Mesh.Render() function with the code I posted but I added it to the bottom of the first code block. Could someone validate it?&#xD;&#xA;&#xD;&#xA;**Note**&#xD;&#xA;&#xD;&#xA;I know this question looks like a mess but I plan to clean it up and make it clear as soon as I solve the problem." />
  <row Id="33018" PostHistoryTypeId="2" PostId="14675" RevisionGUID="5c5d2220-0060-4a45-8fee-924b61d0b2c6" CreationDate="2011-07-10T17:20:32.593" UserId="8408" Text="Don't think I saw this one mentioned, but I couldn't live without &quot;Game Engine Architecture&quot; by Jason Gregory.&#xD;&#xA;&#xD;&#xA;http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135" />
  <row Id="33019" PostHistoryTypeId="16" PostId="14675" RevisionGUID="0672628a-f75a-44dc-923f-6d63c5b8af3e" CreationDate="2011-07-10T17:20:32.593" UserId="8408" />
  <row Id="33020" PostHistoryTypeId="2" PostId="14676" RevisionGUID="6f485b07-032f-4226-8523-5ea194d7995a" CreationDate="2011-07-10T17:33:08.603" UserId="7460" Text="http://www.amazon.ca/David-Perry-Game-Design-Brainstorming/dp/1584506687" />
  <row Id="33021" PostHistoryTypeId="16" PostId="14676" RevisionGUID="a33b906b-312a-4ac7-9aa0-262af7e19178" CreationDate="2011-07-10T17:33:08.603" UserId="7460" />
  <row Id="33022" PostHistoryTypeId="2" PostId="14677" RevisionGUID="7cbf9137-0c65-4e8f-8fc9-a326d3ede751" CreationDate="2011-07-10T17:37:11.453" UserId="5125" Text="I would like to ask you all a question about how I should be going about creating and especially maintaining an Amateur/Independent team for quite a big project.&#xD;&#xA;&#xD;&#xA;I'm specially interested about common pitfalls like who to Not accept on a team for example but also any information about how to build and maintain a team of non (or very little) payed people for a project that might advance but slo(oo)wly.&#xD;&#xA;&#xD;&#xA;Oh yes, before you downvote me for wanting to create a MMORPG, I already have created the game + server (up and running), coded the last 3 years by myself (ie. this is not a modified Ryzom or something likewise)&#xD;&#xA;&#xD;&#xA;You can check it out here: www.mindoki.com&#xD;&#xA;&#xD;&#xA;So now I'd love to build a team helping me out with things like creating talents, testing, making quests, taking care of the community, scripting, website (forum) etc. etc. etc.&#xD;&#xA;&#xD;&#xA;For the story, a guy helped me for like 6 months creating a team doing graphics, plot and sound but not one of them was able to either follow a 'template' (using a texture set up and a pre made skeleton) or finish even Anything.&#xD;&#xA;&#xD;&#xA;So how should I structure the &quot;team&quot;, how should I recruit (should / must I handle all recruiting myself?) and what are the common caveats in such team management?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33023" PostHistoryTypeId="1" PostId="14677" RevisionGUID="7cbf9137-0c65-4e8f-8fc9-a326d3ede751" CreationDate="2011-07-10T17:37:11.453" UserId="5125" Text="Amateur / Independent (m)MORPG Team management" />
  <row Id="33024" PostHistoryTypeId="3" PostId="14677" RevisionGUID="7cbf9137-0c65-4e8f-8fc9-a326d3ede751" CreationDate="2011-07-10T17:37:11.453" UserId="5125" Text="&lt;mmo&gt;&lt;management&gt;" />
  <row Id="33025" PostHistoryTypeId="5" PostId="14674" RevisionGUID="cb413961-6201-41e1-bd91-b773981dfd03" CreationDate="2011-07-10T17:46:31.680" UserId="8408" Comment="deleted 51 characters in body; edited title" Text="How did you learn the DirectX 11 API? MSDN documentation, tutorials, blogs, sample applications, books, etc?" />
  <row Id="33026" PostHistoryTypeId="4" PostId="14674" RevisionGUID="cb413961-6201-41e1-bd91-b773981dfd03" CreationDate="2011-07-10T17:46:31.680" UserId="8408" Comment="deleted 51 characters in body; edited title" Text="How did you learn DirectX 11?" />
  <row Id="33027" PostHistoryTypeId="2" PostId="14678" RevisionGUID="0de83075-6a93-4fdd-b329-3d3230a019a8" CreationDate="2011-07-10T18:01:25.633" UserId="3505" Text="Mouse and keyboard, I love you!&#xD;&#xA;&#xD;&#xA;Look at the competition, that has got to be as good as any advice you can get here. It sounds like you have put good thought into it, all the options you mention sounds reasonable. But a lot of it is down to testing. You might spend a lot of time redesigning the interface, but it's a crucial element, so it's worth it, despite the lack of tangible content to show for the time spent.&#xD;&#xA;&#xD;&#xA;The best advice I can give:  &#xD;&#xA;You can adapt the interface to the game, or you can adapt the game to the interface. There is only so much you can do with a phone as the interface, and while exploring the options is certainly worth it, at some point you have to face the fact that certain game concepts are too complicated for the interface. Is the squad really that important for the gameplay? If you can't make it work well, maybe you should just drop the feature." />
  <row Id="33028" PostHistoryTypeId="2" PostId="14679" RevisionGUID="1e41df32-7cd9-4bb0-b63a-f61ab4981b5a" CreationDate="2011-07-10T18:10:51.147" UserId="7588" Text="Well after a few minutes of play, I would say it's going to be hard to get people working for you without paying them a proper wage.&#xD;&#xA;&#xD;&#xA;This kind of project really needs people that are fully motivated to work on it; the problem is that you've pretty much developed the game yourself and anyone helping out will probably feel much less 'involved' with the project and hence less motivated.&#xD;&#xA;&#xD;&#xA;There are also a few points that have to be made : &#xD;&#xA;&#xD;&#xA;  -  The game is _ugly_ (no offence) - IMO people will be more reluctant setting aside their free time to work on an ugly game.&#xD;&#xA;  -  The game is in french (and also with some spelling mistakes I might add :P) - You have done the right thing putting the site in english, but the main language really must be english in game.&#xD;&#xA;  -  The game doesn't _seem_ to offer anything __new__ (I haven't tested it enough yet).&#xD;&#xA;&#xD;&#xA;Overall I'd say you've done a great job, but it's a very personal game and I think it'll be hard for others to get on-board; that's why I suggest making the whole game more accessible.&#xD;&#xA;&#xD;&#xA;I would also recommend that if you can't pay people, you need to find a workflow which makes it stupidly easy for people to add quests, translate stuff, etc. The big problem is motivation and competence. At first you'll have to review everything yourself, but as you get good contributors you can delegate that work.&#xD;&#xA;&#xD;&#xA;I would also look into creating an SVN type hub to facilitate adding/modifying content and make clients able to immediately test changes if they so choose.&#xD;&#xA;&#xD;&#xA;En tout cas chapeau, c'est un bel effort ;) " />
  <row Id="33029" PostHistoryTypeId="2" PostId="14680" RevisionGUID="7cac0297-496c-4d29-804e-0cf202e5ddaa" CreationDate="2011-07-10T18:19:52.463" UserId="8437" Text="There are many ways of structuring 2D levels.&#xD;&#xA;&#xD;&#xA;One way would be to create a Level class which contains all the GameObjects and their physics-related information. It would know of where each GameObject and its rotation, along with each GameObjects physics bounding shape its orientation. Then, you could create an editor for the Levels and let it save/load Levels using [serialization][1] or some other method.&#xD;&#xA;&#xD;&#xA;The file format doesn't really matter, as long as it suits your needs. If you don't need to be able to edit it from outside an editor, you could just use serialization. If you do, then you can use a text file that describes all of the GameObjects that your Level contains. For example, your file format could be like this:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    &lt;Level name=&quot;Tutorial&quot;&gt;&#xD;&#xA;    	&lt;GameObject name=&quot;Floor1&quot;&gt;&#xD;&#xA;    		&lt;Physics type=&quot;static&quot; shape=&quot;Box(1000, 10)&quot;/&gt;&#xD;&#xA;    		&lt;Orientation position=&quot;0, 800&quot; rotation=&quot;0&quot;/&gt;&#xD;&#xA;    	&lt;/GameObject&gt;&#xD;&#xA;    	&lt;GameObject name=&quot;Bob the Unicorn&quot; class=&quot;com.stackexchange.game.Unicorn&quot;&gt;&#xD;&#xA;    		&lt;Physics type=&quot;dynamic&quot; shape=&quot;Polygon({10, 20},{40, 30},{-10, 500})&quot; mass=&quot;99&quot;/&gt;&#xD;&#xA;    		&lt;Orientation position=&quot;50, 30&quot; rotation=&quot;50&quot;/&gt;&#xD;&#xA;    	&lt;/GameObject&gt;&#xD;&#xA;    	...&#xD;&#xA;    &lt;/Level&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Serialization#Java" />
  <row Id="33030" PostHistoryTypeId="25" PostId="14646" RevisionGUID="090155b3-6c84-40b8-9a62-af97a9e9063c" CreationDate="2011-07-10T18:30:11.860" Comment="http://twitter.com/#!/StackGameDev/status/90125677294141440" />
  <row Id="33031" PostHistoryTypeId="2" PostId="14681" RevisionGUID="316d1ec1-d1eb-4250-a56b-1dd452d1fb4b" CreationDate="2011-07-10T19:01:12.600" UserId="6877" Text="Have you tried the documentation &amp; samples comes with DirectX itself?&#xD;&#xA;&#xD;&#xA;yeh, its true that MSDN is perfectly capable driving someone crazy. :)&#xD;&#xA;&#xD;&#xA;Here are some links that I like:&#xD;&#xA;&#xD;&#xA;http://www.rastertek.com/tutindex.html&#xD;&#xA;&#xD;&#xA;http://www.rastertek.com/tutindex.html&#xD;&#xA;&#xD;&#xA;there is a book that has been released on July 18 this year,&#xD;&#xA;&#xD;&#xA;[Practical Rendering and Computation with Direct3D 11](http://www.amazon.com/Practical-Rendering-Computation-Direct3D-11/dp/1568817207/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1309555438&amp;sr=1-1)&#xD;&#xA;&#xD;&#xA;(Does ask which way to go, I'm no DirectX guy)" />
  <row Id="33032" PostHistoryTypeId="5" PostId="14531" RevisionGUID="2110b86d-39db-41fa-be84-b2fca667e84b" CreationDate="2011-07-10T19:13:08.883" UserId="8437" Comment="deleted 5 characters in body" Text="For an action game, you'll want a library that supports synchronization (keeps the players positions' in sync across all the clients and the server). Of course, you'll also want basic messaging features. With this in mind, here are a couple of Java libraries that might work for you.&#xD;&#xA;&#xD;&#xA; 1. [SpiderMonkey][1]. It's part of jME3, and I'm guessing it's one of the more popular networking libraries for jME. It supports sending and receiving messages, serialization, compression, synchronization via UDP, among other things. Also, it seems to be the standard networking library for jME games these days.&#xD;&#xA; 3. [JGN][2]. It's basically like the other libraries, but it's more mature. It supports synchronization, and a bunch of other features like remote objects, shared objects, and streaming. Although it is no longer being actively developed and it's difficult to get support, it's quite a mature library.&#xD;&#xA; 2. [Kryonet][3]. It supports RMI and basic messaging. The only problem with this is that it doesn't support synchronization, so it might be a little bit of a hassle. However, it seems to be quite active, so it might be more robust than the other options.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Just a note: It's probably better to have a server for each zone/map. With only one server JVM supporting the whole game, if anything goes wrong, the whole game will go down. If you have multiple JVMs running each zone/map server, one error won't bring down your entire game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jmonkeyengine.org/wiki/doku.php/spidermonkey&#xD;&#xA;  [2]: http://code.google.com/p/jgn/&#xD;&#xA;  [3]: http://code.google.com/p/kryonet/" />
  <row Id="33033" PostHistoryTypeId="2" PostId="14682" RevisionGUID="d16e44cb-9ca7-4607-ace3-2405cf6092f8" CreationDate="2011-07-10T20:25:27.287" UserId="3232" Text="I started playing around with terrain and I am getting this assertion in QueuedRenderableCollection::addRenderable:&#xD;&#xA;&quot;Error inserting new pass entry into PassGroupRenderableMap&quot;&#xD;&#xA;&#xD;&#xA;I am trying to find out what I have done wrong, but it is hard, so perhaps someone has any idea of what may it be.&#xD;&#xA;&#xD;&#xA;I can reproduce it easily on my engine and my scene consists only of:&#xD;&#xA;1 terrain page&#xD;&#xA;1 mesh (highlander house)&#xD;&#xA;1 directional light&#xD;&#xA;&#xD;&#xA;If I reload the scene and look again at the house the assertion fires and it is very strange. I have tried to debug the code and the only reason for the assertion to fire that I have found is the hash being changed after the node was inserted on the map.&#xD;&#xA;&#xD;&#xA;Any ideas how can I find a solution to it? Which data and information I can provide to help debug this?&#xD;&#xA;&#xD;&#xA;Also I have seen in the forum some posts about this assertion, but no one that I have seen explain ways to debug or to fix it.&#xD;&#xA;&#xD;&#xA;Ogre version 1.7.1&#xD;&#xA;Windows 7&#xD;&#xA;render Direct3d 9&#xD;&#xA;" />
  <row Id="33034" PostHistoryTypeId="1" PostId="14682" RevisionGUID="d16e44cb-9ca7-4607-ace3-2405cf6092f8" CreationDate="2011-07-10T20:25:27.287" UserId="3232" Text="Error inserting new pass entry into PassGroupRenderableMap" />
  <row Id="33035" PostHistoryTypeId="3" PostId="14682" RevisionGUID="d16e44cb-9ca7-4607-ace3-2405cf6092f8" CreationDate="2011-07-10T20:25:27.287" UserId="3232" Text="&lt;c++&gt;&lt;ogre&gt;" />
  <row Id="33036" PostHistoryTypeId="2" PostId="14683" RevisionGUID="1611d78d-2cae-48d1-b6e3-443d18fb3045" CreationDate="2011-07-10T21:24:23.537" UserId="1839" Text="[Here is a bug report][1] with a workaround, probably the same issue?&#xD;&#xA;&#xD;&#xA;It was also discussed [here in the Ogre][2] Forum as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/mantis/view.php?id=130&#xD;&#xA;  [2]: http://www.ogre3d.org/forums/viewtopic.php?p=189032#189032" />
  <row Id="33037" PostHistoryTypeId="25" PostId="14677" RevisionGUID="3ac6d604-a8b3-4a33-b389-7656469b29a1" CreationDate="2011-07-10T21:30:11.827" Comment="http://twitter.com/#!/StackGameDev/status/90170979095027712" />
  <row Id="33038" PostHistoryTypeId="5" PostId="14683" RevisionGUID="0d58b4dd-9aee-4446-bcce-6e22e053b24a" CreationDate="2011-07-10T21:38:36.520" UserId="1839" Comment="deleted 15 characters in body" Text="[Here is a bug report][1] with a workaround, probably the same issue?&#xD;&#xA;&#xD;&#xA;It was discussed [here in the Ogre Forum][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/mantis/view.php?id=130&#xD;&#xA;  [2]: http://www.ogre3d.org/forums/viewtopic.php?p=189032#189032" />
  <row Id="33039" PostHistoryTypeId="2" PostId="14684" RevisionGUID="31326d01-a031-4658-b850-971b322e8e31" CreationDate="2011-07-10T22:13:41.687" UserId="3505" Text="This is basically impossible, you can't make an MMORPG as a spare time project. I wouldn't know how you would get people to contribute anywhere near enough, but even if you could manage that you wouldn't be able to make them contribute the right stuff. Contributing content is one thing, making everything fit together another, and that is a lot of hard work requiring great skill, which no-one will do for free.&#xD;&#xA;&#xD;&#xA;Don't expect to be able to do anything a lot bigger than what you can do on your own." />
  <row Id="33040" PostHistoryTypeId="5" PostId="14677" RevisionGUID="0f16686f-2d1c-4ede-8895-230e0feff8d2" CreationDate="2011-07-10T22:18:32.540" UserId="5125" Comment="answer to answers" Text="I would like to ask you all a question about how I should be going about creating and especially maintaining an Amateur/Independent team for quite a big project.&#xD;&#xA;&#xD;&#xA;I'm specially interested about common pitfalls like who to Not accept on a team for example but also any information about how to build and maintain a team of non (or very little) payed people for a project that might advance but slo(oo)wly.&#xD;&#xA;&#xD;&#xA;Oh yes, before you downvote me for wanting to create a MMORPG, I already have created the game + server (up and running), coded the last 3 years by myself (ie. this is not a modified Ryzom or something likewise)&#xD;&#xA;&#xD;&#xA;You can check it out here: www.mindoki.com&#xD;&#xA;&#xD;&#xA;So now I'd love to build a team helping me out with things like creating talents, testing, making quests, taking care of the community, scripting, website (forum) etc. etc. etc.&#xD;&#xA;&#xD;&#xA;For the story, a guy helped me for like 6 months creating a team doing graphics, plot and sound but not one of them was able to either follow a 'template' (using a texture set up and a pre made skeleton) or finish even Anything.&#xD;&#xA;&#xD;&#xA;So how should I structure the &quot;team&quot;, how should I recruit (should / must I handle all recruiting myself?) and what are the common caveats in such team management?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**[EDIT]**&#xD;&#xA;Answers that might clarify the questions or seems to be interesting anyway:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# The game is ugly:&#xD;&#xA;&#xD;&#xA;All the fancy stuff isn't used: Specular+spec-pow control maps, normal maps, glow, PSSM ...&#xD;&#xA;The terrains are horribly empty and boring&#xD;&#xA;&#xD;&#xA;Solution :&#xD;&#xA;&#xD;&#xA;Asking here on how I can get people help me with:&#xD;&#xA;&#xD;&#xA;Create nice terrains&#xD;&#xA;&#xD;&#xA;Create items with Spec/Pow/Normalmaps/Glow&#xD;&#xA;&#xD;&#xA;Create nice skyboxes&#xD;&#xA;Improve the existing graphics&#xD;&#xA;Me finally tweaking the PSSM&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Translation (ie. Game isn't in english):&#xD;&#xA;&#xD;&#xA;OK I can code a &quot;translator&quot; and translate myself to english (and why not swedish as I'm swedish ^^) but what kind of problem will I have then?&#xD;&#xA;&#xD;&#xA;Will I have to have several forums for example (that will double all work concerning the forum for me)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# There is nothing New comparing to existing MMORPG:s&#xD;&#xA;&#xD;&#xA;New is complicated, really 'new 'is close to impossible IMHO (except million dollar budget and yet still... ) so personally I have aimed for a &quot;new mix&quot; of things that already exist instead of something completely new.&#xD;&#xA;&#xD;&#xA;For the game, the idea is that things are a bit more 'real' / 'hard' than usual without falling in the pit of things like permadeath (well, one idea is to let experienced players create a perma-death-character with some particular 'extraordinary' characteristics...)&#xD;&#xA;&#xD;&#xA;I also have a sort of &quot;RP-competence&quot; model I'd like to implement (it's not that its complicated but it has to be done). People will be influenced by judgements by other players (ie. their different rp-stats will change as to what people 'think about them').&#xD;&#xA;I'm also experimenting with items that change the usual state of a player like an &quot;items carried puts the PvP switch on&quot; or an item (already implemented) drop when you get hit.&#xD;&#xA;&#xD;&#xA;Leaving items on the groud is also implemented and I haven't seen that since Diablo II (OK,maybe I haven't played enough games since then...).&#xD;&#xA;&#xD;&#xA;I also going the road of &quot;you can sell / give away any item&quot; (except specific quest items, ie. something you need to give to someone) which, I'm clearly aware of, will demand heavy money sinks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Let people &quot;MOD&quot; the game&#xD;&#xA;&#xD;&#xA;Someone said that 'opening to the modding community' could be a major hit so I started to work on that and you can already make a part of the world and then  integrate it with the rest.&#xD;&#xA;&#xD;&#xA;I already have tools to create most things for the game but what is missing is mostly the security aspects of letting an unknown person tingle with characteristics of things." />
  <row Id="33041" PostHistoryTypeId="5" PostId="14677" RevisionGUID="6322dd81-26e4-47d8-872c-5138b94c0a17" CreationDate="2011-07-10T22:33:35.350" UserId="5125" Comment="added 2 characters in body" Text="I would like to ask you all a question about how I should be going about creating and especially maintaining an Amateur/Independent team for quite a big project.&#xD;&#xA;&#xD;&#xA;I'm specially interested about common pitfalls like who to Not accept on a team for example but also any information about how to build and maintain a team of non (or very little) payed people for a project that might advance but slo(oo)wly.&#xD;&#xA;&#xD;&#xA;Oh yes, before you downvote me for wanting to create a MMORPG, I already have created the game + server (up and running), coded the last 3 years by myself (ie. this is not a modified Ryzom or something likewise)&#xD;&#xA;&#xD;&#xA;You can check it out here: www.mindoki.com&#xD;&#xA;&#xD;&#xA;So now I'd love to build a team helping me out with things like creating talents, testing, making quests, taking care of the community, scripting, website (forum) etc. etc. etc.&#xD;&#xA;&#xD;&#xA;For the story, a guy helped me for like 6 months creating a team doing graphics, plot and sound but not one of them was able to either follow a 'template' (using a texture set up and a pre made skeleton) or finish even Anything.&#xD;&#xA;&#xD;&#xA;So how should I structure the &quot;team&quot;, how should I recruit (should / must I handle all recruiting myself?) and what are the common caveats in such team management?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**[EDIT]**&#xD;&#xA;Answers that might clarify the questions or seems to be interesting anyway:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# The game is ugly:&#xD;&#xA;&#xD;&#xA;All the fancy stuff isn't used: Specular+spec-pow control maps, normal maps, glow, PSSM ...&#xD;&#xA;The terrains are horribly empty and boring&#xD;&#xA;&#xD;&#xA;Solution :&#xD;&#xA;&#xD;&#xA;Asking here on how I can get people help me with:&#xD;&#xA;&#xD;&#xA;Create nice terrains&#xD;&#xA;&#xD;&#xA;Create items with Spec/Pow/Normalmaps/Glow&#xD;&#xA;&#xD;&#xA;Create nice skyboxes&#xD;&#xA;Improve the existing graphics&#xD;&#xA;&#xD;&#xA;Me finally tweaking the PSSM&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Translation (ie. Game isn't in english):&#xD;&#xA;&#xD;&#xA;OK I can code a &quot;translator&quot; and translate myself to english (and why not swedish as I'm swedish ^^) but what kind of problem will I have then?&#xD;&#xA;&#xD;&#xA;Will I have to have several forums for example (that will double all work concerning the forum for me)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# There is nothing New comparing to existing MMORPG:s&#xD;&#xA;&#xD;&#xA;New is complicated, really 'new 'is close to impossible IMHO (except million dollar budget and yet still... ) so personally I have aimed for a &quot;new mix&quot; of things that already exist instead of something completely new.&#xD;&#xA;&#xD;&#xA;For the game, the idea is that things are a bit more 'real' / 'hard' than usual without falling in the pit of things like permadeath (well, one idea is to let experienced players create a perma-death-character with some particular 'extraordinary' characteristics...)&#xD;&#xA;&#xD;&#xA;I also have a sort of &quot;RP-competence&quot; model I'd like to implement (it's not that its complicated but it has to be done). People will be influenced by judgements by other players (ie. their different rp-stats will change as to what people 'think about them').&#xD;&#xA;I'm also experimenting with items that change the usual state of a player like an &quot;items carried puts the PvP switch on&quot; or an item (already implemented) drop when you get hit.&#xD;&#xA;&#xD;&#xA;Leaving items on the groud is also implemented and I haven't seen that since Diablo II (OK,maybe I haven't played enough games since then...).&#xD;&#xA;&#xD;&#xA;I also going the road of &quot;you can sell / give away any item&quot; (except specific quest items, ie. something you need to give to someone) which, I'm clearly aware of, will demand heavy money sinks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Let people &quot;MOD&quot; the game&#xD;&#xA;&#xD;&#xA;Someone said that 'opening to the modding community' could be a major hit so I started to work on that and you can already make a part of the world and then  integrate it with the rest.&#xD;&#xA;&#xD;&#xA;I already have tools to create most things for the game but what is missing is mostly the security aspects of letting an unknown person tingle with characteristics of things." />
  <row Id="33042" PostHistoryTypeId="2" PostId="14685" RevisionGUID="8e36e163-38a1-4522-af85-d7a857d7293d" CreationDate="2011-07-10T22:33:38.813" UserId="7197" Text="This may not be the answer you're looking for, but to be honest different people find different control schemes comfortable. Many iOS games I've played allow the user to select a control scheme from many different available ones. I believe you should implement the most common control schemes for top-down shooters and allow the player to choose the one he's more comfortable with. &#xD;&#xA;&#xD;&#xA;That said, my favourite control method for these kind of games is the traditional &quot;two sticks&quot; setup. &#xD;&#xA;&#xD;&#xA;You could also try using motion control (if your phone supports it) instead of buttons to activate special abilities. A fine example is using the &quot;star power&quot; in Guitar Hero by raising the guitar controller." />
  <row Id="33043" PostHistoryTypeId="17" PostId="14686" RevisionGUID="c9542543-f37d-4e23-999e-3df0e7462a28" CreationDate="2011-07-10T22:58:37.870" UserId="-1" Comment="from http://stackoverflow.com/questions/6644203/how-to-make-map-editor-with-xna" Text="" />
  <row Id="33044" PostHistoryTypeId="17" PostId="14687" RevisionGUID="da316f26-6b85-434c-afd5-ba9a883f6358" CreationDate="2011-07-10T22:58:37.870" UserId="-1" Comment="from http://stackoverflow.com/questions/6644203/how-to-make-map-editor-with-xna" Text="" />
  <row Id="33045" PostHistoryTypeId="2" PostId="14687" RevisionGUID="feff7a23-db67-4e72-8ef3-a7e099dfd938" CreationDate="2011-07-10T22:40:52.033" UserDisplayName="Craig White" Text="Great OpenSource XNA map editor.&#xD;&#xA;http://gleed2d.codeplex.com/&#xD;&#xA;&#xD;&#xA;You can fully customize the ground grid and enable grid snapping to make maps. Also since it's opensource you can edit it to suit your exact needs.&#xD;&#xA;&#xD;&#xA;I've used it myself." />
  <row Id="33046" PostHistoryTypeId="2" PostId="14686" RevisionGUID="e199b43c-0596-4694-b740-491173f2ef3e" CreationDate="2011-07-10T22:38:25.233" UserDisplayName="Marcus" Text="I have a problem with making map editor in XNA.&#xD;&#xA;I'm making a 2D tile based map editor.&#xD;&#xA;&#xD;&#xA;The problem is, I need every tile I put in map editor to be X: 0, or X: 32, or X:64 and so on, not 1.10, 2.99, 5.62, etc. You see, it has to be exactly i*32 tiles, where i is whatever number, not decimal. Thank you if you help." />
  <row Id="33047" PostHistoryTypeId="1" PostId="14686" RevisionGUID="e199b43c-0596-4694-b740-491173f2ef3e" CreationDate="2011-07-10T22:38:25.233" UserDisplayName="Marcus" Text="How to make map editor with XNA??" />
  <row Id="33048" PostHistoryTypeId="3" PostId="14686" RevisionGUID="e199b43c-0596-4694-b740-491173f2ef3e" CreationDate="2011-07-10T22:38:25.233" UserDisplayName="Marcus" Text="&lt;c#&gt;&lt;maps&gt;&lt;mmo&gt;" />
  <row Id="33049" PostHistoryTypeId="2" PostId="14688" RevisionGUID="3a41bf36-d5dd-43c8-b5d6-ffe8c9858d23" CreationDate="2011-07-10T23:34:15.783" UserId="8502" Text="How to start building a game like Farmville?What are all the programming languages you need for complete front-end design including welcome page design,user i.d password validation etc.?What are the server choices for these games?" />
  <row Id="33050" PostHistoryTypeId="1" PostId="14688" RevisionGUID="3a41bf36-d5dd-43c8-b5d6-ffe8c9858d23" CreationDate="2011-07-10T23:34:15.783" UserId="8502" Text="Front-end design of a browser game like Farmville?" />
  <row Id="33051" PostHistoryTypeId="3" PostId="14688" RevisionGUID="3a41bf36-d5dd-43c8-b5d6-ffe8c9858d23" CreationDate="2011-07-10T23:34:15.783" UserId="8502" Text="&lt;browser-based-games&gt;" />
  <row Id="33052" PostHistoryTypeId="2" PostId="14689" RevisionGUID="9e78307a-e857-4a2f-a7a0-7c730474388b" CreationDate="2011-07-10T23:34:49.497" UserId="4224" Text="I'm trying to write a `SpriteManager` class in XNA, but I need access to the `Game` variables. For example, the `Game.Content` property would be very helpful in loading textures, and `Game.GraphicsDevice.Viewport` would be helpful in getting the window size.&#xD;&#xA;&#xD;&#xA;For now, I have the following class:&#xD;&#xA;&#xD;&#xA;    public MainGame : DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;        public SpriteManager&lt;Enemy&gt; EnemyManager { get; get; }&#xD;&#xA;        public SpriteManager&lt;Powerup&gt; PowerupManager { get; set; }&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I can think of three ways of getting access to these variables in the `SpriteManager` class:&#xD;&#xA;&#xD;&#xA;1. Make my sprite manager class derive off of `GameComponent`. This would be ideal, except that my sprite manager is used in `MainGame`, which is a `GameComponent`.&#xD;&#xA;&#xD;&#xA;2. Use `((Game) Game1)` to access the variables. However, doing this kind of cast is ugly and breaks encapsulation.&#xD;&#xA;&#xD;&#xA;3. Pass everything down from `MainGame`. For example, `EnemyManager` needs to load a random enemy type each time it spawns an enemy, so instead of loading the textures in `MainGame`, pass `EnemyManager` the `Game.Content` property and let it handle texture loading. However, I'm not sure if this is the best way of handling the situation. I can't place my finger on it, but it just seems 'wrong'  in some way.&#xD;&#xA;&#xD;&#xA;I could use some advice on the best way of achieving this." />
  <row Id="33053" PostHistoryTypeId="1" PostId="14689" RevisionGUID="9e78307a-e857-4a2f-a7a0-7c730474388b" CreationDate="2011-07-10T23:34:49.497" UserId="4224" Text="How do I access variables in the Game1 class from another class in XNA?" />
  <row Id="33054" PostHistoryTypeId="3" PostId="14689" RevisionGUID="9e78307a-e857-4a2f-a7a0-7c730474388b" CreationDate="2011-07-10T23:34:49.497" UserId="4224" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;sprites&gt;&lt;management&gt;" />
  <row Id="33055" PostHistoryTypeId="5" PostId="14673" RevisionGUID="45eee754-ca48-423d-8f70-a103d2079dfa" CreationDate="2011-07-10T23:48:47.783" UserId="744" Comment="Grammar/terminology cleanup." Text="I am developing Android an game. It's going to be a top-down shooter with stealth features. I am now thinking about how to the make controls. Most top-down games are now twin stick (joystick on the left and right sides) but I need more buttons (for choosing weapons, commanding your squad, and using skills).&#xD;&#xA;&#xD;&#xA;So here are my ideas:&#xD;&#xA;&#xD;&#xA;- Two (virtual) sticks like in other games, when you tap somewhere on the display, a circle with buttons appears, where you can choose abilities or weapons.&#xD;&#xA;- One stick on the left side for walking, shoot where the second finger is pressed, weapons and skills on the right side.&#xD;&#xA;&#xD;&#xA;What do you think is the best? Or do you have any other idea? I want to choose the most intuitive and simplest." />
  <row Id="33056" PostHistoryTypeId="4" PostId="14673" RevisionGUID="45eee754-ca48-423d-8f70-a103d2079dfa" CreationDate="2011-07-10T23:48:47.783" UserId="744" Comment="Grammar/terminology cleanup." Text="What's the best control scheme for an arena shooter on a touchscreen phone?" />
  <row Id="33057" PostHistoryTypeId="6" PostId="14673" RevisionGUID="45eee754-ca48-423d-8f70-a103d2079dfa" CreationDate="2011-07-10T23:48:47.783" UserId="744" Comment="Grammar/terminology cleanup." Text="&lt;2d&gt;&lt;android&gt;&lt;touch&gt;&lt;shoot-em-up&gt;" />
  <row Id="33058" PostHistoryTypeId="2" PostId="14690" RevisionGUID="4fb9e47a-db75-4b70-9821-b7739bc15486" CreationDate="2011-07-10T23:56:38.203" UserId="744" Text="As it stands, your game may be too complicated for a touchscreen phone.&#xD;&#xA;&#xD;&#xA;_Dual virtual sticks barely work_, and most shoot-em-ups on phones have been moving away from them, switching to auto-fire and drag-anywhere to move. (&lt;a href=&quot;http://gamedev.stackexchange.com/questions/6091/is-there-a-gold-standard-for-touch-controls-in-scrolling-shoot-em-ups&quot;&gt;We've had a question about this in the past&lt;/a&gt;, and Cave, Taito, and everyone else have only continued down this path since it was asked).&#xD;&#xA;&#xD;&#xA;_Shooting where the player is pressing does not work_. Fingers are too big and completely cover targets.&#xD;&#xA;&#xD;&#xA;That being said, here are some basic suggestions:&#xD;&#xA;&#xD;&#xA;- Move or aim via the accelerometer. If movement, probably clamped to e.g. 16 directions; if aiming, probably with some auto-aim adjustment.&#xD;&#xA;- Tap to target, and weapons automatically track the active target.&#xD;&#xA;- The player can move or shoot, but not both.&#xD;&#xA;&#xD;&#xA;These all require planning ahead in your game design. You can't just bolt them onto a standard twin-stick shooter and get a good game. As a result, you probably can't just bring a standard twin-stick arena shooter to a touchscreen mobile device." />
  <row Id="33059" PostHistoryTypeId="25" PostId="14689" RevisionGUID="f9c6beb3-54d1-4696-9a07-9991fa9daf3b" CreationDate="2011-07-11T00:30:13.617" Comment="http://twitter.com/#!/StackGameDev/status/90216283227959297" />
  <row Id="33060" PostHistoryTypeId="2" PostId="14691" RevisionGUID="b8965034-a634-4a25-a850-13f4dd6f9019" CreationDate="2011-07-11T01:08:44.377" UserId="2061" Text="Don't do that - [make the sprite manager a service][1] instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="33061" PostHistoryTypeId="2" PostId="14692" RevisionGUID="19ddc97b-d445-49ce-ae02-02fa6c81669f" CreationDate="2011-07-11T01:18:52.673" UserId="6588" Text="This question comes up so very often, definitely a duplicate. In the meantime though, it's the same as building a website: complex front-ends like games are usually done in Flash/ActionScript, but other options are using JavaScript or Silverlight. The back-end is built using pretty much any of a long list: PHP, Python, Java, etc etc etc" />
  <row Id="33062" PostHistoryTypeId="5" PostId="14682" RevisionGUID="e4d05954-8015-4661-a17a-12570ce6556b" CreationDate="2011-07-11T01:26:53.470" UserId="4513" Comment="formatting" Text="I started playing around with terrain and I am getting this assertion in &#xD;&#xA;&#xD;&#xA;`QueuedRenderableCollection::addRenderable: &quot;Error inserting new pass entry into PassGroupRenderableMap&quot;`&#xD;&#xA;&#xD;&#xA;I am trying to find out what I have done wrong, but it is hard, so perhaps someone has any idea of what may it be.&#xD;&#xA;&#xD;&#xA;I can reproduce it easily on my engine and my scene consists only of:&#xD;&#xA;&#xD;&#xA; - 1 terrain page&#xD;&#xA; - 1 mesh (highlander house)&#xD;&#xA; - 1 directional light&#xD;&#xA;&#xD;&#xA;If I reload the scene and look again at the house the assertion fires and it is very strange. I have tried to debug the code and the only reason for the assertion to fire that I have found is the hash being changed after the node was inserted on the map.&#xD;&#xA;&#xD;&#xA;Any ideas how can I find a solution to it? Which data and information I can provide to help debug this?&#xD;&#xA;&#xD;&#xA;Also I have seen in the forum some posts about this assertion, but no one that I have seen explain ways to debug or to fix it.&#xD;&#xA;&#xD;&#xA;Ogre version 1.7.1&#xD;&#xA;Windows 7&#xD;&#xA;render Direct3d 9&#xD;&#xA;" />
  <row Id="33063" PostHistoryTypeId="24" PostId="14682" RevisionGUID="e4d05954-8015-4661-a17a-12570ce6556b" CreationDate="2011-07-11T01:26:53.470" Comment="Proposed by 4513 approved by 189 edit id of 555" />
  <row Id="33064" PostHistoryTypeId="5" PostId="14644" RevisionGUID="8bd761b9-7e2f-4334-a58e-76c55534671f" CreationDate="2011-07-11T01:40:43.210" UserId="982" Comment="deleted 339 characters in body" Text="I have a few questions before I start answering this. First, in the original bug in which you got stuck in the walls, were those tiles on the left individual tiles as opposed to one large tile? And if they were, was the player getting stuck in between them? If yes to both those questions, just make sure your **new position is valid**. That means you'll have to check if there's a collision on where your telling the player to move. So solve the minimum displacement as described below, and then move your player based on that only if he **can** move there. Almost too under the nose :P&#xD;&#xA;&#xD;&#xA;Another question, are the spikes you show one tile, or individual tiles? If they are individual thin tiles, you may have to use a different approach for the horizontal ones and vertical ones than what I describe below. But if they're whole tiles this should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Alright, so basically this is what @Trevor Powell was describing. Since you're using only AABBs, all you have to do is find how much one rectangle penetrates the other. This will give you a quantity in the X axis and the Y. Choose the minimum out of the two, and move your colliding object along that axis that amount. That is all you need to resolve an AABB collision. You will NEVER need to move along more than one axis in such a collision, so you should never be confused about what one to move first, as you will only be moving the minimum. &#xD;&#xA;&#xD;&#xA;Metanet software has a classic tutorial on an approach [here][1]. It also goes into other shapes as well.&#xD;&#xA;&#xD;&#xA;Here's an XNA function I made to find the overlap vector of two rectangles:&#xD;&#xA;&#xD;&#xA;        public Point resolveCollision(Rectangle otherRect)&#xD;&#xA;        {&#xD;&#xA;            if (!isCollision(otherRect))&#xD;&#xA;            {&#xD;&#xA;                return Point.Zero;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            int minOtherX = otherRect.X;&#xD;&#xA;            int maxOtherX = otherRect.X + otherRect.Width;&#xD;&#xA;&#xD;&#xA;            int minMyX = collisionMask.X;&#xD;&#xA;            int maxMyX = collisionMask.X + collisionMask.Width;&#xD;&#xA;&#xD;&#xA;            int minOtherY = otherRect.Y;&#xD;&#xA;            int maxOtherY = otherRect.Y + otherRect.Height;&#xD;&#xA;&#xD;&#xA;            int minMyY = collisionMask.Y;&#xD;&#xA;            int maxMyY = collisionMask.Y + collisionMask.Height;&#xD;&#xA;&#xD;&#xA;            int dx, dy;&#xD;&#xA;&#xD;&#xA;            if (maxOtherX - minMyX &lt; maxMyX - minOtherX)&#xD;&#xA;            {&#xD;&#xA;                dx = (maxOtherX - minMyX);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dx = -(maxMyX - minOtherX);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (maxOtherY - minMyY &lt; maxMyY - minOtherY)&#xD;&#xA;            {&#xD;&#xA;                dy = (maxOtherY - minMyY);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dy = -(maxMyY - minOtherY);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(dx) &lt; Math.Abs(dy))&#xD;&#xA;                return new Point(dx, 0);&#xD;&#xA;            else&#xD;&#xA;                return new Point(0, dy);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;(I hope it's simple to follow, because I'm sure there are better ways to implement it...)&#xD;&#xA;&#xD;&#xA;isCollision(Rectangle) is literally just a call to XNA's Rectangle.Intersects(Rectangle).&#xD;&#xA;&#xD;&#xA;I've tested this with moving platforms and it seems to work fine. I'll do some more tests more similar to your .gif to make sure and report back if it doesn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="33065" PostHistoryTypeId="6" PostId="14686" RevisionGUID="e9dccb77-7291-4ed6-9014-2b10089b5c5b" CreationDate="2011-07-11T02:14:38.247" UserId="1430" Comment="edited tags" Text="&lt;c#&gt;&lt;maps&gt;" />
  <row Id="33066" PostHistoryTypeId="2" PostId="14693" RevisionGUID="7592e616-6c54-40c8-8b48-58d142a0dff5" CreationDate="2011-07-11T02:23:53.703" UserId="4224" Text="I have the following `Sprite` class (leaving out everything that doesn't pertain to my question):&#xD;&#xA;&#xD;&#xA;    public class Sprite&#xD;&#xA;    {&#xD;&#xA;        public Texture2D Texture { get; set; }&#xD;&#xA;        public Vector2 Position { get; set; }&#xD;&#xA;        private SpriteBatch _spriteBatch;&#xD;&#xA;&#xD;&#xA;        public Sprite(Texture2D texture, Vector2 position)&#xD;&#xA;        {&#xD;&#xA;            Texture = texture;&#xD;&#xA;            Position = position;&#xD;&#xA;&#xD;&#xA;            // what code do I put here?&#xD;&#xA;            _spriteBatch = ???&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public virtual void Draw()&#xD;&#xA;        {&#xD;&#xA;            _spriteBatch.Draw(Texture, Position, Color.White);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;In my `Game1.cs` class, I register the SpriteBatch as a service:&#xD;&#xA;&#xD;&#xA;    protected override void LoadContent()&#xD;&#xA;    {&#xD;&#xA;        _spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;        Services.AddService(_spriteBatch);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Problem is, I don't know what code to put in the `Sprite` constructor to get the `SpriteBatch` object from the service. It doesn't have access to the `Game.Services` object. How would I load the service in this case?" />
  <row Id="33067" PostHistoryTypeId="1" PostId="14693" RevisionGUID="7592e616-6c54-40c8-8b48-58d142a0dff5" CreationDate="2011-07-11T02:23:53.703" UserId="4224" Text="How do I get access to the SpriteBatch service in my Sprite class using XNA?" />
  <row Id="33068" PostHistoryTypeId="3" PostId="14693" RevisionGUID="7592e616-6c54-40c8-8b48-58d142a0dff5" CreationDate="2011-07-11T02:23:53.703" UserId="4224" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;design-patterns&gt;&lt;game-component&gt;" />
  <row Id="33071" PostHistoryTypeId="10" PostId="14688" RevisionGUID="6f880a4f-9456-4c4e-a983-2da0839a7ac9" CreationDate="2011-07-11T02:39:03.597" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33072" PostHistoryTypeId="2" PostId="14695" RevisionGUID="5750a0b7-c88a-42c6-aa1d-46f56df529b1" CreationDate="2011-07-11T02:45:30.723" UserId="2978" Text="You have a couple of possibilities :&#xD;&#xA;&#xD;&#xA;- Pass it in the constructor&#xD;&#xA;- Pass the Services object in the constructor&#xD;&#xA;- Pass it to your Sprite.Draw function&#xD;&#xA;&#xD;&#xA;The right solution depends on your overall architecture.&#xD;&#xA;" />
  <row Id="33073" PostHistoryTypeId="5" PostId="14644" RevisionGUID="6bc3e786-aa68-43bb-9069-2a5e1844a3ce" CreationDate="2011-07-11T02:50:15.990" UserId="982" Comment="Final solutions (fingers crossed) taking into account corner cases" Text="I have a few questions before I start answering this. First, in the original bug in which you got stuck in the walls, were those tiles on the left individual tiles as opposed to one large tile? And if they were, was the player getting stuck in between them? If yes to both those questions, just make sure your **new position is valid**. That means you'll have to check if there's a collision on where your telling the player to move. So solve the minimum displacement as described below, and then move your player based on that only if he **can** move there. Almost too under the nose :P This will actually introduce another bug, which I call &quot;corner cases&quot;. Essentially in terms of corners (like the bottom left where the horizontal spikes come out in your .gif, but if there were no spikes) would not resolve a collision, because it would think that none of the resolutions you generate lead to a valid position. To solve this, simply keep a bool of whether the collision has been resolved, as well as a list of all the minimum penetration resolutions. Afterwards, if the collision has not been resolved, loop over every resolution you generated, and keep track of the maximum X and maximum Y resolutions (the maximums don't have to come from the same resolution). Then resolve the collision on those maximums. This seems to solve all your problems as well as the ones I've encountered. Here's the code I use in my update:&#xD;&#xA;&#xD;&#xA;        List&lt;Vector2&gt; collisions = new List&lt;Vector2&gt;();&#xD;&#xA;            bool resolved = false;&#xD;&#xA;            foreach (Platform p in testPlat)&#xD;&#xA;            {&#xD;&#xA;                Vector2 dif = p.resolveCollision(player.getCollisionMask());&#xD;&#xA;&#xD;&#xA;                RectangleF newPos = player.getCollisionMask();&#xD;&#xA;&#xD;&#xA;                newPos.X -= dif.X;&#xD;&#xA;                newPos.Y -= dif.Y;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                if (!PlatformCollision(newPos)) //This checks if there's a collision (ie if we're entering an invalid space)&#xD;&#xA;                {&#xD;&#xA;                    if (dif.X != 0)&#xD;&#xA;                        player.velocity.X = 0; //Do whatever you want here, I like to stop my player on collisions&#xD;&#xA;                    if (dif.Y != 0)&#xD;&#xA;                        player.velocity.Y = 0;&#xD;&#xA;&#xD;&#xA;                    player.MoveY(-dif.Y);&#xD;&#xA;                    player.MoveX(-dif.X);&#xD;&#xA;                    resolved = true;&#xD;&#xA;                }&#xD;&#xA;                collisions.Add(dif);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (!resolved)&#xD;&#xA;            {&#xD;&#xA;                Vector2 max = Vector2.Zero;&#xD;&#xA;&#xD;&#xA;                foreach (Vector2 v in collisions)&#xD;&#xA;                {&#xD;&#xA;                    if (Math.Abs(v.X) &gt; Math.Abs(max.X))&#xD;&#xA;                    {&#xD;&#xA;                        max.X = v.X;&#xD;&#xA;                    }&#xD;&#xA;                    if (Math.Abs(v.Y) &gt; Math.Abs(max.Y))&#xD;&#xA;                    {&#xD;&#xA;                        max.Y = v.Y;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                player.MoveY(-max.Y);&#xD;&#xA;&#xD;&#xA;                if (max.Y != 0)&#xD;&#xA;                    player.velocity.Y = 0;&#xD;&#xA;                player.MoveX(-max.X);&#xD;&#xA;&#xD;&#xA;                if (max.X != 0)&#xD;&#xA;                    player.velocity.X = 0;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Another question, are the spikes you show one tile, or individual tiles? If they are individual thin tiles, you may have to use a different approach for the horizontal ones and vertical ones than what I describe below. But if they're whole tiles this should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Alright, so basically this is what @Trevor Powell was describing. Since you're using only AABBs, all you have to do is find how much one rectangle penetrates the other. This will give you a quantity in the X axis and the Y. Choose the minimum out of the two, and move your colliding object along that axis that amount. That is all you need to resolve an AABB collision. You will NEVER need to move along more than one axis in such a collision, so you should never be confused about what one to move first, as you will only be moving the minimum. &#xD;&#xA;&#xD;&#xA;Metanet software has a classic tutorial on an approach [here][1]. It also goes into other shapes as well.&#xD;&#xA;&#xD;&#xA;Here's an XNA function I made to find the overlap vector of two rectangles:&#xD;&#xA;&#xD;&#xA;        public Point resolveCollision(Rectangle otherRect)&#xD;&#xA;        {&#xD;&#xA;            if (!isCollision(otherRect))&#xD;&#xA;            {&#xD;&#xA;                return Point.Zero;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            int minOtherX = otherRect.X;&#xD;&#xA;            int maxOtherX = otherRect.X + otherRect.Width;&#xD;&#xA;&#xD;&#xA;            int minMyX = collisionMask.X;&#xD;&#xA;            int maxMyX = collisionMask.X + collisionMask.Width;&#xD;&#xA;&#xD;&#xA;            int minOtherY = otherRect.Y;&#xD;&#xA;            int maxOtherY = otherRect.Y + otherRect.Height;&#xD;&#xA;&#xD;&#xA;            int minMyY = collisionMask.Y;&#xD;&#xA;            int maxMyY = collisionMask.Y + collisionMask.Height;&#xD;&#xA;&#xD;&#xA;            int dx, dy;&#xD;&#xA;&#xD;&#xA;            if (maxOtherX - minMyX &lt; maxMyX - minOtherX)&#xD;&#xA;            {&#xD;&#xA;                dx = (maxOtherX - minMyX);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dx = -(maxMyX - minOtherX);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (maxOtherY - minMyY &lt; maxMyY - minOtherY)&#xD;&#xA;            {&#xD;&#xA;                dy = (maxOtherY - minMyY);&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                dy = -(maxMyY - minOtherY);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (Math.Abs(dx) &lt; Math.Abs(dy))&#xD;&#xA;                return new Point(dx, 0);&#xD;&#xA;            else&#xD;&#xA;                return new Point(0, dy);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;(I hope it's simple to follow, because I'm sure there are better ways to implement it...)&#xD;&#xA;&#xD;&#xA;isCollision(Rectangle) is literally just a call to XNA's Rectangle.Intersects(Rectangle).&#xD;&#xA;&#xD;&#xA;I've tested this with moving platforms and it seems to work fine. I'll do some more tests more similar to your .gif to make sure and report back if it doesn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;  [1]: http://www.metanetsoftware.com/technique/tutorialA.html" />
  <row Id="33074" PostHistoryTypeId="5" PostId="14491" RevisionGUID="58476270-5599-45b9-8454-31b41b8def10" CreationDate="2011-07-11T03:06:39.287" UserId="7728" Comment="Added substantial addendum and explanatory code, stressing that this is not based upon &quot;object pair&quot; testing." Text="The simplest solution for you will be to check both collision directions against every object in the world before resolving any collisions, and just resolve the smaller of the two resulting &quot;compound collisions&quot;.  This means that you resolve by the smallest amount possible, instead of always resolving x first, or always resolving y first.&#xD;&#xA;&#xD;&#xA;Your code would look something like this:&#xD;&#xA;&#xD;&#xA;    // This loop repeats, until our object has been fully pushed outside of all&#xD;&#xA;    // collision objects&#xD;&#xA;    while ( StillCollidingWithSomething(object) )&#xD;&#xA;    {&#xD;&#xA;      float xDistanceToResolve = XDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      float yDistanceToResolve = YDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      bool xIsColliding = (xDistanceToResolve != 0.f);&#xD;&#xA;&#xD;&#xA;      // if we aren't colliding on x (not possible for normal solid collision &#xD;&#xA;      // shapes, but can happen for unidirectional collision objects, such as &#xD;&#xA;      // platforms which can be jumped up through, but support the player from &#xD;&#xA;      // above), or if a correction along y would simply require a smaller move &#xD;&#xA;      // than one along x, then resolve our collision by moving along y.&#xD;&#xA;&#xD;&#xA;      if ( !xIsColliding || fabs( yDistanceToResolve ) &lt; fabs( xDistanceToResolve ) )&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( 0.f, yDistanceToResolve );&#xD;&#xA;      }&#xD;&#xA;      else // otherwise, resolve the collision by moving along x&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( xDistanceToResolve, 0.f );&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**big revision**:  From reading commentary on other answers, I think I've finally noticed an unstated assumption, which will cause this approach not to work (and which explains why I couldn't understand the problems that some -- but not all -- people saw with this approach).  To elaborate, here is some more pseudocode, showing more explicitly what the functions I referenced before are supposed to actually be doing:&#xD;&#xA;&#xD;&#xA;    bool StillCollidingWithSomething( MovingObject object )&#xD;&#xA;    {&#xD;&#xA;      // loop over every collision object in the world.  (Implementation detail:&#xD;&#xA;      // don't test 'object' against itself!)&#xD;&#xA;      for( int i = 0; i &lt; collisionObjectCount; i++ )&#xD;&#xA;      {&#xD;&#xA;        // if the moving object overlaps any collision object in the world, then&#xD;&#xA;        // it's colliding&#xD;&#xA;        if ( Overlaps( collisionObject[i], object ) )&#xD;&#xA;          return true;&#xD;&#xA;      }&#xD;&#xA;      return false;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    float XDistanceToMoveToResolveCollisions( MovingObject object )&#xD;&#xA;    {&#xD;&#xA;      // check how far we'd have to move left or right to stop colliding with anything&#xD;&#xA;      // return whichever move is smaller&#xD;&#xA;      float moveOutLeft = FindDistanceToEmptySpaceAlongNegativeX(object-&gt;GetPosition());&#xD;&#xA;      float moveOutRight = FindDistanceToEmptySpaceAlongX(object-&gt;GetPosition());&#xD;&#xA;      float bestMoveOut = min( fabs(moveOutLeft), fabs(moveOutRight) );&#xD;&#xA;    &#xD;&#xA;      return minimumMove;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float FindDistanceToEmptySpaceAlongX( Vector2D position )&#xD;&#xA;    {&#xD;&#xA;      Vector2D cursor = position;&#xD;&#xA;      bool colliding = true;&#xD;&#xA;      // until we stop colliding...&#xD;&#xA;      while ( colliding )&#xD;&#xA;      {&#xD;&#xA;        colliding = false;&#xD;&#xA;        // loop over all collision objects...&#xD;&#xA;        for( int i = 0; i &lt; collisionObjectCount; i++ )&#xD;&#xA;        {&#xD;&#xA;          // and if we hit an object...&#xD;&#xA;          if ( Overlaps( collisionObject[i], cursor ) )&#xD;&#xA;          {&#xD;&#xA;            // move outside of the object, and repeat.&#xD;&#xA;            cursor.x = collisionObject[i].rightSide;&#xD;&#xA;            colliding = true;&#xD;&#xA;            &#xD;&#xA;            // break back to the 'while' loop, to re-test collisions with&#xD;&#xA;            // our new cursor position&#xD;&#xA;            break;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      // return how far we had to move, to reach empty space&#xD;&#xA;      return cursor.x - position.x;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is not a &quot;per object pair&quot; test;  it doesn't work by testing and resolving the moving object against each tile of a world map individually (that approach will never work reliably, and fails in increasingly catastrophic ways as tile sizes decrease).  Instead, it is testing the moving object against every object in the world map simultaneously, and then resolving based upon collisions against the whole world map.   &#xD;&#xA;&#xD;&#xA;This is how you ensure that (for example) individual wall tiles within a wall never bounce the player up and down, resulting in the player being trapped in non-existant space 'between' them;  the distances up and down are always calculated all the way to the empty space at the very top or bottom of the wall, *not* merely to the boundary of a single tile which might have another solid tile on top of it." />
  <row Id="33075" PostHistoryTypeId="5" PostId="14491" RevisionGUID="87f8e890-bc3a-4e8c-89ed-f8c6fc61dfbf" CreationDate="2011-07-11T03:12:14.740" UserId="7728" Comment="Minor edit for clarity" Text="The simplest solution for you will be to check both collision directions against every object in the world before resolving any collisions, and just resolve the smaller of the two resulting &quot;compound collisions&quot;.  This means that you resolve by the smallest amount possible, instead of always resolving x first, or always resolving y first.&#xD;&#xA;&#xD;&#xA;Your code would look something like this:&#xD;&#xA;&#xD;&#xA;    // This loop repeats, until our object has been fully pushed outside of all&#xD;&#xA;    // collision objects&#xD;&#xA;    while ( StillCollidingWithSomething(object) )&#xD;&#xA;    {&#xD;&#xA;      float xDistanceToResolve = XDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      float yDistanceToResolve = YDistanceToMoveToResolveCollisions( object );&#xD;&#xA;      bool xIsColliding = (xDistanceToResolve != 0.f);&#xD;&#xA;&#xD;&#xA;      // if we aren't colliding on x (not possible for normal solid collision &#xD;&#xA;      // shapes, but can happen for unidirectional collision objects, such as &#xD;&#xA;      // platforms which can be jumped up through, but support the player from &#xD;&#xA;      // above), or if a correction along y would simply require a smaller move &#xD;&#xA;      // than one along x, then resolve our collision by moving along y.&#xD;&#xA;&#xD;&#xA;      if ( !xIsColliding || fabs( yDistanceToResolve ) &lt; fabs( xDistanceToResolve ) )&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( 0.f, yDistanceToResolve );&#xD;&#xA;      }&#xD;&#xA;      else // otherwise, resolve the collision by moving along x&#xD;&#xA;      {&#xD;&#xA;        object-&gt;Move( xDistanceToResolve, 0.f );&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**big revision**:  From reading commentary on other answers, I think I've finally noticed an unstated assumption, which will cause this approach not to work (and which explains why I couldn't understand the problems that some -- but not all -- people saw with this approach).  To elaborate, here is some more pseudocode, showing more explicitly what the functions I referenced before are supposed to actually be doing:&#xD;&#xA;&#xD;&#xA;    bool StillCollidingWithSomething( MovingObject object )&#xD;&#xA;    {&#xD;&#xA;      // loop over every collision object in the world.  (Implementation detail:&#xD;&#xA;      // don't test 'object' against itself!)&#xD;&#xA;      for( int i = 0; i &lt; collisionObjectCount; i++ )&#xD;&#xA;      {&#xD;&#xA;        // if the moving object overlaps any collision object in the world, then&#xD;&#xA;        // it's colliding&#xD;&#xA;        if ( Overlaps( collisionObject[i], object ) )&#xD;&#xA;          return true;&#xD;&#xA;      }&#xD;&#xA;      return false;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    float XDistanceToMoveToResolveCollisions( MovingObject object )&#xD;&#xA;    {&#xD;&#xA;      // check how far we'd have to move left or right to stop colliding with anything&#xD;&#xA;      // return whichever move is smaller&#xD;&#xA;      float moveOutLeft = FindDistanceToEmptySpaceAlongNegativeX(object-&gt;GetPosition());&#xD;&#xA;      float moveOutRight = FindDistanceToEmptySpaceAlongX(object-&gt;GetPosition());&#xD;&#xA;      float bestMoveOut = min( fabs(moveOutLeft), fabs(moveOutRight) );&#xD;&#xA;    &#xD;&#xA;      return minimumMove;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float FindDistanceToEmptySpaceAlongX( Vector2D position )&#xD;&#xA;    {&#xD;&#xA;      Vector2D cursor = position;&#xD;&#xA;      bool colliding = true;&#xD;&#xA;      // until we stop colliding...&#xD;&#xA;      while ( colliding )&#xD;&#xA;      {&#xD;&#xA;        colliding = false;&#xD;&#xA;        // loop over all collision objects...&#xD;&#xA;        for( int i = 0; i &lt; collisionObjectCount; i++ )&#xD;&#xA;        {&#xD;&#xA;          // and if we hit an object...&#xD;&#xA;          if ( Overlaps( collisionObject[i], cursor ) )&#xD;&#xA;          {&#xD;&#xA;            // move outside of the object, and repeat.&#xD;&#xA;            cursor.x = collisionObject[i].rightSide;&#xD;&#xA;            colliding = true;&#xD;&#xA;            &#xD;&#xA;            // break back to the 'while' loop, to re-test collisions with&#xD;&#xA;            // our new cursor position&#xD;&#xA;            break;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;      // return how far we had to move, to reach empty space&#xD;&#xA;      return cursor.x - position.x;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is not a &quot;per object pair&quot; test;  it doesn't work by testing and resolving the moving object against each tile of a world map individually (that approach will never work reliably, and fails in increasingly catastrophic ways as tile sizes decrease).  Instead, it is testing the moving object against every object in the world map simultaneously, and then resolving based upon collisions against the whole world map.   &#xD;&#xA;&#xD;&#xA;This is how you ensure that (for example) individual wall tiles within a wall never bounce the player up and down between two adjacent tiles, resulting in the player being trapped in some non-existant space 'between' them;  the collision resolution distances are always calculated all the way to empty space in the world, *not* merely to the boundary of a single tile which might then have another solid tile on top of it." />
  <row Id="33076" PostHistoryTypeId="25" PostId="14693" RevisionGUID="ca175bbb-f9ad-4a75-8f25-16996a0c6690" CreationDate="2011-07-11T03:31:18.107" Comment="http://twitter.com/#!/StackGameDev/status/90261848624087040" />
  <row Id="33077" PostHistoryTypeId="2" PostId="14696" RevisionGUID="e4b20d58-14f0-4f5b-9ee8-d0846da709e1" CreationDate="2011-07-11T03:55:18.657" UserId="288" Text="It is completely a matter of taste.&#xD;&#xA;&#xD;&#xA;You could pass your `Game` class instance into the constructor of your `Sprite` and access its public `Services` property. This is what `DrawableGameComponent` and `GraphicsDeviceManager` do.&#xD;&#xA;&#xD;&#xA;You could pass `Game.Services` as an `IServiceProvider` into the constructor of your `Sprite` class. This is what the `ContentManager` class does. This has the advantage of not depending on an actual instance of `Game` (which you might not have if, say, you end up making a form-based level editor).&#xD;&#xA;&#xD;&#xA;You could just pass an instance of `SpriteBatch` in the constructor of your `Sprite` class, but you can then only create `Sprite` objects after you create your `SpriteBatch`, which you can only do during and after `LoadContent`.&#xD;&#xA;&#xD;&#xA;You could get especially lazy and create a globally accessible `Game` or `IServiceProvider` or `SpriteBatch` object and just use that (make it a static property on your game class). Advantage: quick and easy; Disadvantage: ugly!&#xD;&#xA;&#xD;&#xA;You could pass a `SpriteBatch` instance into your `Sprite.Draw` method. This is pretty easy to do, and **is the method I use** for my gameplay classes - things that might have a `Draw` and an `Update` function (eg: a Player, or an Enemy, etc). One advantage is that it makes it both locally explicit and easy to modify the shared resources that the `Draw` function depends on.&#xD;&#xA;&#xD;&#xA;But if your `Sprite` class is simply visual data for `SpriteBatch` (texture, position, etc), which is managed externally (having public setters for these properties, in your example, indicates that it might be), then I would recommend creating an **extension method** for `SpriteBatch` that does the drawing. This allows you to maintain the &quot;feel&quot; of the `SpriteBatch` object. Your extension method might look like:&#xD;&#xA;&#xD;&#xA;    public static void Draw(this SpriteBatch sb, Sprite sprite)&#xD;&#xA;    {&#xD;&#xA;        sb.Draw(sprite.Texture, sprite.Position, Color.White);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Allowing you to draw it with: `sb.Draw(sprite);`. This method is preferable if you are not doing `SpriteBatch.Begin` and `.End` calls in your `Draw` method - as this allows it to work the same as `SpriteBatch`.&#xD;&#xA;&#xD;&#xA;Those last two methods are the ones that I use and recommend myself.&#xD;&#xA;&#xD;&#xA;**But** you have done something that strikes me as *pretty unusual* by making your `Sprite.Draw` method `virtual` - indicating that you will be inheriting from `Sprite` and using it virtually. But combining this with public setters, and not calling `Begin` and `End`, makes for a pretty *confused* design.&#xD;&#xA;&#xD;&#xA;If this is *really* the design you intend to use, then passing an `IServiceProvider` to the `Sprite` constructor is probably the best method to use as it allows for better encapsulation. (Just fix up those other things, which don't ;)" />
  <row Id="33078" PostHistoryTypeId="2" PostId="14697" RevisionGUID="6ad5dd11-ba83-4443-b97d-429be05a3bc3" CreationDate="2011-07-11T04:01:42.930" UserId="7911" Text="Questions about money and ownership aside, I have only one piece of advice that I found handy when dealing with a volunteer effort I worked with before:&#xD;&#xA;&#xD;&#xA;If you want to build a ship&#xD;&#xA;don't herd people together to collect wood&#xD;&#xA;and don't assign them tasks and work,&#xD;&#xA;but rather teach them to long for the &#xD;&#xA;endless immensity of the sea.&#xD;&#xA;&#xD;&#xA;- Antoine de Saint-Exupéry&#xD;&#xA;" />
  <row Id="33079" PostHistoryTypeId="2" PostId="14698" RevisionGUID="0c56fcfd-906d-42d5-a5b8-050859f41349" CreationDate="2011-07-11T04:18:32.963" UserId="288" Text="Actually #2 isn't so bad (I will assume you meant to down-cast from `Game` to `Game1`). You can enforce the type being `Game1` in your constructor like so:&#xD;&#xA;&#xD;&#xA;    public MainGame : DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;        public MainGame(Game1 game) : base(game) { }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You could even make a nice convenience property like this. It will always be safe, providing the underlying `DrawableGameComponent` doesn't do anything undocumented.&#xD;&#xA;&#xD;&#xA;    public Game1 Game1 { get { return (Game1)Game; } }&#xD;&#xA;    &#xD;&#xA;Or if you want to be extremely anal about not casting (and there is really **no need** to be), you could do this:&#xD;&#xA;&#xD;&#xA;    public MainGame : DrawableGameComponent&#xD;&#xA;    {&#xD;&#xA;        public MainGame(Game1 game) : base(game) { this.Game1 = game; }&#xD;&#xA;&#xD;&#xA;        public Game1 Game1 { get; private set; }&#xD;&#xA;    }" />
  <row Id="33080" PostHistoryTypeId="2" PostId="14699" RevisionGUID="7d1505d4-c0a3-41ba-af95-7344bf6365fe" CreationDate="2011-07-11T04:35:50.530" UserId="8517" Text="I would highly recommend using a commercial socket server (with a free version for development) for real-time games, they're built for scalability and have been optimised to handle a large number of concurrent users.&#xD;&#xA;We've developed socket servers for several of our games, but they never scale as well as commercial socket servers.&#xD;&#xA;&#xD;&#xA;Commercial Servers:&#xD;&#xA; &#xD;&#xA;[ElectroServer 5][1] (Java)&#xD;&#xA;&#xD;&#xA;[Photon][2] (C++)&#xD;&#xA;&#xD;&#xA;SmartFox Server: www.smartfoxserver.com/2X/ (Java)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.electrotank.com/ &quot;ElectroServer 5&quot;&#xD;&#xA;  [2]: http://www.exitgames.com/Photon &quot;Photon&quot; " />
  <row Id="33081" PostHistoryTypeId="2" PostId="14700" RevisionGUID="aa4424a4-6d59-4fb8-8935-06f99c252d17" CreationDate="2011-07-11T05:54:13.410" UserId="8521" Text="You can check out http://www.brighthub.com/hubfolio/matthew-casperson/blog/archive/2010/03/19/flashpunk-tutorials.aspx. The tutorials are a little old now, but should give you somewhere to start." />
  <row Id="33082" PostHistoryTypeId="25" PostId="14673" RevisionGUID="e7fbaa68-0af5-4dfc-b148-c95c8df02a40" CreationDate="2011-07-11T06:31:18.033" Comment="http://twitter.com/#!/StackGameDev/status/90307152450813952" />
  <row Id="33083" PostHistoryTypeId="2" PostId="14701" RevisionGUID="6963f19a-d51b-41db-a180-7f498323767c" CreationDate="2011-07-11T07:23:30.793" UserId="8050" Text="The data that come from the analysis oft the spectral energy variation are enough to generate this kind of maps. Here the problem may be if there are too much data to process: not what kind of data are used, but how. &#xD;&#xA;&#xD;&#xA;After seeing  some videos, I'm starting to believe that the data are moved further in the feature-domain (time-domain -&gt; frequency-domain -&gt; feature-domain). The software generates data by using the spectral energy changes and try to recognise known features, then it use the information about the features to setup the map. &#xD;&#xA;Recognition can be done by clusterization, maximum likelihood, neural networks, Genetic algorithm and so on. &#xD;&#xA;&#xD;&#xA;After completing the recognition, you have infomations like: *where* the feature if found in *time* and *frequency*, what *type* of featuature is found, the *velocity* the feature vector is moving and so on; you can use these data to feed a map generation algorimth, leaving  room for improvements like making better recognition algorithms, recognize more family of features, extract more data, find new ways to &quot;render&quot; these data and so on." />
  <row Id="33084" PostHistoryTypeId="5" PostId="14677" RevisionGUID="d8f9204e-21d0-48dc-b933-6cb7be2ec26a" CreationDate="2011-07-11T07:33:22.340" UserId="5125" Comment="deleted 2380 characters in body" Text="I would like to ask you all a question about how I should be going about creating and especially maintaining an Amateur/Independent team for quite a big project.&#xD;&#xA;&#xD;&#xA;I'm specially interested about common pitfalls like who to Not accept on a team for example but also any information about how to build and maintain a team of non (or very little) payed people for a project that might advance but slo(oo)wly.&#xD;&#xA;&#xD;&#xA;Oh yes, before you downvote me for wanting to create a MMORPG, I already have created the game + server (up and running), coded the last 3 years by myself (ie. this is not a modified Ryzom or something likewise)&#xD;&#xA;&#xD;&#xA;You can check it out here: www.mindoki.com&#xD;&#xA;&#xD;&#xA;So now I'd love to build a team helping me out with things like creating talents, testing, making quests, taking care of the community, scripting, website (forum) etc. etc. etc.&#xD;&#xA;&#xD;&#xA;For the story, a guy helped me for like 6 months creating a team doing graphics, plot and sound but not one of them was able to either follow a 'template' (using a texture set up and a pre made skeleton) or finish even Anything.&#xD;&#xA;&#xD;&#xA;So how should I structure the &quot;team&quot;, how should I recruit (should / must I handle all recruiting myself?) and what are the common caveats in such team management?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**[EDIT]**&#xD;&#xA;I removed the edit, it messed up the initial question (which is 'What's the Do:s and Don't:s in amateur team management')" />
  <row Id="33085" PostHistoryTypeId="5" PostId="14681" RevisionGUID="ebec2ffd-4ff3-43e2-b411-8409320cbc56" CreationDate="2011-07-11T08:23:25.000" UserId="6877" Comment="added 1 characters in body" Text="Have you tried the documentation &amp; samples comes with DirectX itself?&#xD;&#xA;&#xD;&#xA;yeh, its true that MSDN is perfectly capable driving someone crazy. :)&#xD;&#xA;&#xD;&#xA;Here is one I like:&#xD;&#xA;&#xD;&#xA;http://www.rastertek.com/tutindex.html&#xD;&#xA;&#xD;&#xA;there is a book that *will be* released on July 18 this year,&#xD;&#xA;&#xD;&#xA;[Practical Rendering and Computation with Direct3D 11](http://www.amazon.com/Practical-Rendering-Computation-Direct3D-11/dp/1568817207/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1309555438&amp;sr=1-1)&#xD;&#xA;&#xD;&#xA;(Does ask which way to go, I'm no DirectX guy)" />
  <row Id="33086" PostHistoryTypeId="2" PostId="14702" RevisionGUID="42adff6f-01bb-4940-9758-e81d19ffe4a6" CreationDate="2011-07-11T09:15:06.927" UserId="7197" Text="The easiest way to &quot;snap&quot; coordinates to a grid is this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        int objX = (int) Math.Floor(mouseX/tileWidth)*tileWidth;&#xD;&#xA;        int objY = (int) Math.Floor(mouseY/tileHeight)*tileHeight;" />
  <row Id="33087" PostHistoryTypeId="25" PostId="14639" RevisionGUID="48af6e1d-534f-4361-9c4b-3fd9188a8a5e" CreationDate="2011-07-11T09:31:18.503" Comment="http://twitter.com/#!/StackGameDev/status/90352451340861440" />
  <row Id="33088" PostHistoryTypeId="17" PostId="14703" RevisionGUID="8705ae70-4a10-4e77-909c-e9225711a246" CreationDate="2011-07-11T11:02:37.523" UserId="-1" Comment="from http://stackoverflow.com/questions/6635367/getrasterstatus-usage-in-direct3d" Text="" />
  <row Id="33089" PostHistoryTypeId="2" PostId="14703" RevisionGUID="17f2ab78-b50a-43ed-b495-dff37f9d0cae" CreationDate="2011-07-09T14:29:33.627" UserId="8506" Text="I am interested if anyone has had used GetrasterStatus in direct3d application to control application vsync behaviour in high precision timing? What set of techniques are to be implemented to do the job to perform additional background operations while waiting for vsync and fliping the buffers just in time of vertical scan line?" />
  <row Id="33090" PostHistoryTypeId="1" PostId="14703" RevisionGUID="17f2ab78-b50a-43ed-b495-dff37f9d0cae" CreationDate="2011-07-09T14:29:33.627" UserId="8506" Text="GetRasterStatus usage in direct3d" />
  <row Id="33091" PostHistoryTypeId="3" PostId="14703" RevisionGUID="17f2ab78-b50a-43ed-b495-dff37f9d0cae" CreationDate="2011-07-09T14:29:33.627" UserId="8506" Text="&lt;c++&gt;&lt;directx&gt;&lt;vsync&gt;" />
  <row Id="33092" PostHistoryTypeId="17" PostId="14704" RevisionGUID="7f68a3cb-3bc8-4b9d-aef4-81c8e209870e" CreationDate="2011-07-11T11:05:25.467" UserId="-1" Comment="from http://stackoverflow.com/questions/6636073/directx9-rendering-missing-in-release-build" Text="" />
  <row Id="33093" PostHistoryTypeId="17" PostId="14705" RevisionGUID="0d14086d-83a1-416f-9e06-6be00270dc2f" CreationDate="2011-07-11T11:05:25.467" UserId="-1" Comment="from http://stackoverflow.com/questions/6636073/directx9-rendering-missing-in-release-build" Text="" />
  <row Id="33094" PostHistoryTypeId="17" PostId="14706" RevisionGUID="3af69442-efb0-434d-987a-d0757005d2f1" CreationDate="2011-07-11T11:05:25.467" UserId="-1" Comment="from http://stackoverflow.com/questions/6636073/directx9-rendering-missing-in-release-build" Text="" />
  <row Id="33095" PostHistoryTypeId="2" PostId="14705" RevisionGUID="823f227c-2a08-407f-9657-10ea67b0331a" CreationDate="2011-07-09T16:54:14.163" UserId="8506" Text="Please use DirectX SDK Utilities - DirectX Control Panel and see if you are not getting an error.&#xD;&#xA;&#xD;&#xA;Set Debug level in control pannel, recompile your application and you should see runtime errors in the Output window" />
  <row Id="33096" PostHistoryTypeId="2" PostId="14706" RevisionGUID="d7127b08-4c5f-4f3f-991f-27828b1c8f0c" CreationDate="2011-07-09T16:55:43.117" UserDisplayName="Martyn Lovell" Text="Attach the debugger to the version not started from within VS, and debug through to see what is going on. To help you catch the early part of the program, you can put a dialog box or __debugbreak into the early part so you can attach early and see the DX surfaces being created and so on.&#xD;&#xA;&#xD;&#xA;Martyn" />
  <row Id="33097" PostHistoryTypeId="2" PostId="14704" RevisionGUID="e42b727b-f9b8-43c9-9ffb-653dcc60c6ed" CreationDate="2011-07-09T16:40:45.397" UserDisplayName="sipickles" Text="I have a c++ application which outputs to screen using entirely DirectX9, running on Win7 64 Home.&#xD;&#xA;&#xD;&#xA;It runs as normal in these circumstances:&#xD;&#xA;&#xD;&#xA; - Debug Build, from within MSVC 2008.&#xD;&#xA; - Release Build, from within MSVC 2008.&#xD;&#xA; - Debug Build, by opening the compiled&#xD;&#xA;   executable itself.&#xD;&#xA;&#xD;&#xA;However, strange things happen when I run the compiled executable of the **release** build. The window is created as expected but no screen output. Nothing.&#xD;&#xA;&#xD;&#xA;I can hear the sound working and the log file fills up. I thought maybe the working directory was wrong when running the executable but the log file reports the CWD is correct and indeed all filepaths to data files work.&#xD;&#xA;&#xD;&#xA;I am stumped as to why my application will work fine in 3 of the four permutations, but not the most important one - the standalone release executable!&#xD;&#xA;&#xD;&#xA;If anyone can contribute, I'd be most grateful.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;Si" />
  <row Id="33098" PostHistoryTypeId="1" PostId="14704" RevisionGUID="e42b727b-f9b8-43c9-9ffb-653dcc60c6ed" CreationDate="2011-07-09T16:40:45.397" UserDisplayName="sipickles" Text="DirectX9 rendering missing in Release Build" />
  <row Id="33099" PostHistoryTypeId="3" PostId="14704" RevisionGUID="e42b727b-f9b8-43c9-9ffb-653dcc60c6ed" CreationDate="2011-07-09T16:40:45.397" UserDisplayName="sipickles" Text="&lt;c++&gt;" />
  <row Id="33103" PostHistoryTypeId="2" PostId="14708" RevisionGUID="b0da147f-28a3-4f7d-b60f-95b72c652915" CreationDate="2011-07-11T12:03:55.937" UserId="8528" Text="I have a problem with rendering rectangular textures on non-rectangular surfaces. While googling, I found a thread with person having a pretty similar problem: http://www.gamedev.net/topic/419296-skewedsheared-texture-mapping-in-opengl/ &#xD;&#xA;&#xD;&#xA;But in my case, I cannot be sure about surface's exact properties. It's not regular trapezoid, it can be slightly bent. Which means, that I cannot just calculate correct texture matrix, or at least I don't know how.&#xD;&#xA;&#xD;&#xA;I've tried to render triangle fan-like shape, but it just changed the characteristics of final distortion." />
  <row Id="33104" PostHistoryTypeId="1" PostId="14708" RevisionGUID="b0da147f-28a3-4f7d-b60f-95b72c652915" CreationDate="2011-07-11T12:03:55.937" UserId="8528" Text="Mapping rectangular texture on trapezoid-like shape" />
  <row Id="33105" PostHistoryTypeId="3" PostId="14708" RevisionGUID="b0da147f-28a3-4f7d-b60f-95b72c652915" CreationDate="2011-07-11T12:03:55.937" UserId="8528" Text="&lt;opengl&gt;&lt;textures&gt;&lt;uvw-mapping&gt;" />
  <row Id="33106" PostHistoryTypeId="2" PostId="14709" RevisionGUID="b820184a-d719-46ff-8342-d42d717295d5" CreationDate="2011-07-11T12:16:46.687" UserId="8529" Text="I am not sure that is the right venue anyway&#xD;&#xA;&#xD;&#xA;I have(2D) matrix ,each of its element describes a (homogenius) coordinate in 3D wave (the values of wave coordinates are changed in time). The wave rendering is done with texture. I need to make an integration for the wave.&#xD;&#xA;&#xD;&#xA;Does anyone have any clue? And another question if the texture has any impact on integral calculation? Thank you&#xD;&#xA;p.s maybe i can do using opengl?" />
  <row Id="33107" PostHistoryTypeId="1" PostId="14709" RevisionGUID="b820184a-d719-46ff-8342-d42d717295d5" CreationDate="2011-07-11T12:16:46.687" UserId="8529" Text="Integration of homegoniuos wave" />
  <row Id="33108" PostHistoryTypeId="3" PostId="14709" RevisionGUID="b820184a-d719-46ff-8342-d42d717295d5" CreationDate="2011-07-11T12:16:46.687" UserId="8529" Text="&lt;3d&gt;&lt;math&gt;&lt;textures&gt;&lt;matrix&gt;&lt;coordinates&gt;" />
  <row Id="33109" PostHistoryTypeId="25" PostId="14432" RevisionGUID="0078d636-d1fa-4125-8bbd-ceae1c5abb56" CreationDate="2011-07-11T12:31:19.833" Comment="http://twitter.com/#!/StackGameDev/status/90397754303578112" />
  <row Id="33110" PostHistoryTypeId="2" PostId="14710" RevisionGUID="4abe3e27-3600-433a-88fd-f6b50702ece6" CreationDate="2011-07-11T12:46:40.790" UserId="3650" Text="Is there a tool for Linux (preferably a command-line tool) that can convert from the .x text format to the binary format? I wish to use this format with Irrlicht but the text format is loading very slowly (taking around 8 seconds to load one model), so I'm wondering if the binary format will be faster.&#xD;&#xA;&#xD;&#xA;I have seen [this question](http://gamedev.stackexchange.com/questions/3528/how-do-i-convert-directxs-x-from-binary-encoding-to-text-encoding-and-back), but that seems to be asking more for pointers on learning the .x format, whereas I am specifically looking for a Linux tool." />
  <row Id="33111" PostHistoryTypeId="1" PostId="14710" RevisionGUID="4abe3e27-3600-433a-88fd-f6b50702ece6" CreationDate="2011-07-11T12:46:40.790" UserId="3650" Text="Convert DirectX .x text format to binary" />
  <row Id="33112" PostHistoryTypeId="3" PostId="14710" RevisionGUID="4abe3e27-3600-433a-88fd-f6b50702ece6" CreationDate="2011-07-11T12:46:40.790" UserId="3650" Text="&lt;directx&gt;&lt;linux&gt;" />
  <row Id="33113" PostHistoryTypeId="5" PostId="14709" RevisionGUID="4f35b403-4621-4edb-93e4-169ef711ac47" CreationDate="2011-07-11T12:54:25.843" UserId="8529" Comment="added 5 characters in body" Text="I am not sure that is the right venue anyway&#xD;&#xA;&#xD;&#xA;I have(2D) matrix ,each of its element describes a (homogenius) coordinate in 3D wave (the values of wave coordinates are changed in time). The wave rendering is done with texture. I need to make an integration for the wave.&#xD;&#xA;&#xD;&#xA;Does anyone have any clue? And another question if the texture has any impact on integral calculation? Thank you&#xD;&#xA;p.s maybe i can do this using opengl?" />
  <row Id="33114" PostHistoryTypeId="5" PostId="14709" RevisionGUID="b6bb16e2-c779-49c0-a8d7-5c024b26d7ab" CreationDate="2011-07-11T12:56:21.453" UserId="1156" Comment="deleted 56 characters in body; edited title" Text="I have a 2D matrix; each of its elements describes a homogenous coordinate in 3D wave (the values of wave coordinates are changed in time). The wave rendering is done with texture. I need to make an integration for the wave.&#xD;&#xA;&#xD;&#xA;Does anyone have a clue? And another question; will the texture have any impact on integral calculation?&#xD;&#xA;p.s maybe i can do this using opengl?" />
  <row Id="33115" PostHistoryTypeId="4" PostId="14709" RevisionGUID="b6bb16e2-c779-49c0-a8d7-5c024b26d7ab" CreationDate="2011-07-11T12:56:21.453" UserId="1156" Comment="deleted 56 characters in body; edited title" Text="Integration of homogenous wave" />
  <row Id="33116" PostHistoryTypeId="17" PostId="14711" RevisionGUID="5716c65f-5121-40d2-9af6-d7a8ca70e1cb" CreationDate="2011-07-11T13:22:32.693" UserId="-1" Comment="from http://stackoverflow.com/questions/6645983/c-role-playing-design-best-practices-suggestions" Text="" />
  <row Id="33117" PostHistoryTypeId="2" PostId="14711" RevisionGUID="1016699c-e5c9-4146-9b10-06f8f6cf7515" CreationDate="2011-07-11T05:10:22.017" UserId="8520" Text="Foreword: I have worked extensively with Java, but less with C++. I have an understanding of the general language and how it differs from Java, but could really use some help here. Additionally, though I have never designed an R.P.G. I understand how to separate the data/processing model from the graphics portion, but could really use some tips on custom graphical interfacing.&#xD;&#xA;&#xD;&#xA;I would like to begin development of a **2-Dimensional** (Read: Relatively simple graphics, a la the earlier Final Fantasies, Chrono Trigger) Role-Playing Game in C++ and have several questions. I indeed **have** searched Google and have found varied unsupported opinions and outdated material (anywhere from six to ten years back for general game design material).&#xD;&#xA;&#xD;&#xA;My inquiries are as follows:&#xD;&#xA;(Note: Best is open to interpretation and if that word does not exactly describe that for which I am asking, please bear with me, as I understand what works best for one game may not work best for another game of the same type.)&#xD;&#xA;&#xD;&#xA; - Best crossplatorm windowing system?&#xD;&#xA; - So far I have found that QT should do the job and I haven't had any trouble working with it. Is there any reason I should avoid using it for this application, or are there particular subtleties for which I should watch with QT?&#xD;&#xA; - Best crossplatform graphics library (to be distinguished from windowing system)?&#xD;&#xA;  - OpenGL?&#xD;&#xA; - Any good tutorials for setting up a very basic **graphical R.P.G.** game, or even just simple custom graphics + user-interaction tutorials in C++?&#xD;&#xA;  - I've worked extensively with setting up 'practical' interfaces, such as you would see in say, a word editor, but have not setup user-interactions with custom graphics and such by myself in a good while and have forgotten best practices and besides that do not have links to good resources, especially in C++.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33118" PostHistoryTypeId="1" PostId="14711" RevisionGUID="1016699c-e5c9-4146-9b10-06f8f6cf7515" CreationDate="2011-07-11T05:10:22.017" UserId="8520" Text="C++ Role-Playing Design Best-Practices/Suggestions?:" />
  <row Id="33119" PostHistoryTypeId="3" PostId="14711" RevisionGUID="1016699c-e5c9-4146-9b10-06f8f6cf7515" CreationDate="2011-07-11T05:10:22.017" UserId="8520" Text="&lt;c++&gt;&lt;tutorials&gt;&lt;rpg&gt;" />
  <row Id="33120" PostHistoryTypeId="2" PostId="14712" RevisionGUID="74dbb1b6-9c64-4b5e-b2b4-19353de226c5" CreationDate="2011-07-11T13:37:39.640" UserId="1742" Text="the difference between running with the IDE attached at startup is usually that the state of the memory handed to you by the allocator is not the same. If I remember correctly, it's  zeroed out or filled with garbage (I can't rememeber which as we don't use standard allocators any more).&#xD;&#xA;&#xD;&#xA;Checking memory should be your first approach vector. Make sure all your allocations assume that the memory is dirty and initialise them." />
  <row Id="33121" PostHistoryTypeId="6" PostId="14682" RevisionGUID="4a409ea0-0bf8-4e3a-a20f-bf88ca492461" CreationDate="2011-07-11T14:00:51.583" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;ogre&gt;&lt;terrain-rendering&gt;" />
  <row Id="33122" PostHistoryTypeId="2" PostId="14713" RevisionGUID="8b41631c-b771-419c-bc5d-ac2359371183" CreationDate="2011-07-11T14:50:04.257" UserId="3874" Text="By culling, I mean, only rendering what is currently seen by the camera. In my game, nothing is tile based. Each object has a center point and that is where it is on the screen. The camera is simulated by doing glTranslatef before drawing anything on that layer.&#xD;&#xA;&#xD;&#xA;Here are the constraints:&#xD;&#xA;&#xD;&#xA;I have 6 layers. Each of these is an array of IRenderableEntity. Each layer has a scalar that it multiplies the camera position by to simulate Parallax Scrolling. Within these arrays, the object itself could be static or dynamic.&#xD;&#xA;&#xD;&#xA;I'm not concerned with collision detection since Box2D takes care of this.&#xD;&#xA;&#xD;&#xA;How can I only render what I see on the screen in a logerithmic manner (not n^2)&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33123" PostHistoryTypeId="1" PostId="14713" RevisionGUID="8b41631c-b771-419c-bc5d-ac2359371183" CreationDate="2011-07-11T14:50:04.257" UserId="3874" Text="Culling for a 2D, platformer game?" />
  <row Id="33124" PostHistoryTypeId="3" PostId="14713" RevisionGUID="8b41631c-b771-419c-bc5d-ac2359371183" CreationDate="2011-07-11T14:50:04.257" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;culling&gt;" />
  <row Id="33125" PostHistoryTypeId="2" PostId="14714" RevisionGUID="caa501e3-d6c1-4e59-9754-e0e266d0edfc" CreationDate="2011-07-11T14:56:57.987" UserId="6877" Text="*  Qt has no issue, unless you have trouble handling it properly. FreeGlut or most of the gui system uses call back functions(which is quite easy to understand), but in Qt it uses a single slot mechanism.&#xD;&#xA;&#xD;&#xA;*  OpenGL, Yes.&#xD;&#xA;&#xD;&#xA;In case of RPG I would like to suggest you to create the command line based rpg first, to get up and running the core logical part of the game. Then add graphics layer to it. Forget about the graphics at the beginning." />
  <row Id="33126" PostHistoryTypeId="2" PostId="14715" RevisionGUID="d1904d6f-b17f-4e52-b769-68785c878c17" CreationDate="2011-07-11T15:04:37.543" UserId="7946" Text="Basically, you use collision detection to detect a collision between whatever your objects are, and a rectangle which is the current view of the camera. If the two collide, the object needs to be rendered.&#xD;&#xA;&#xD;&#xA;In order to not have to check this for every single entity on the screen, you should use spatial partitioning structures such as [quad trees][1] to reduce the number of collision tests that you have to do.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quad_tree" />
  <row Id="33127" PostHistoryTypeId="2" PostId="14716" RevisionGUID="7a4fb497-d4d9-4487-bed6-eb212f24740f" CreationDate="2011-07-11T15:17:05.043" UserId="1430" Text="There are plenty of resources for culling techniques of this nature -- ideal search terms include phrases like &quot;2D culling quadtree&quot; and &quot;2D spatial partitioning.&quot;&#xD;&#xA;&#xD;&#xA;A basic approach will use [frustum culling][1] (the link describes a 3D approach, but in 2D this boils down to basically a rectangle-in-rectangle test) and a [quadtree][2] to partion space hierarchically -- the hierarchical approach allows you to trivially reject large batches of objects, testing only those that are near the viewable area. As long as you update the spatial partitioning structure as objects update, this is suitable for dynamic scenarios as well as static ones.&#xD;&#xA;&#xD;&#xA;You may also be interested in [this article on an alternative approach][3] (although its old), or [this article on using the slightly-more-advanced kd-tree][4] for partioning space. See [here][5] for a handful of other scene management structures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lighthouse3d.com/tutorials/view-frustum-culling/&#xD;&#xA;  [2]: http://www.kyleschouviller.com/wsuxna/quadtree-source-included/&#xD;&#xA;  [3]: http://www.gamedev.net/page/resources/_/reference/programming/140/algorithms-and-data-structures/quadtree-and-octree-culling-alternative-r1485&#xD;&#xA;  [4]: http://www.blackspherestudios.com/storage/McClure_Erik_Regional_KD_Trees.pdf&#xD;&#xA;  [5]: http://www.gamerendering.com/category/scene-management/" />
  <row Id="33128" PostHistoryTypeId="2" PostId="14717" RevisionGUID="4a7c312e-477e-43dc-8a45-fcc4779b8881" CreationDate="2011-07-11T15:26:50.403" UserId="4688" Text="Here is a great seven part tutorial series on this topic by Badlogic Games. They cover everything from the basics to implementation. &#xD;&#xA;&#xD;&#xA;http://www.badlogicgames.com/wordpress/?cat=18&#xD;&#xA;&#xD;&#xA;They try to mimic the Audiosurf algorithme with code and all." />
  <row Id="33129" PostHistoryTypeId="25" PostId="14709" RevisionGUID="541a7409-c867-4696-9198-204ee86897a6" CreationDate="2011-07-11T15:31:19.613" Comment="http://twitter.com/#!/StackGameDev/status/90443053373984768" />
  <row Id="33130" PostHistoryTypeId="2" PostId="14718" RevisionGUID="828684ae-e695-4ec5-bfdb-3bc49c0dda50" CreationDate="2011-07-11T15:54:00.497" UserId="3505" Text="Depends on what you are trying to achieve, you could define your figure in 3D space to make the distortion as suggested in the link.&#xD;&#xA;&#xD;&#xA;If it's not 3D you are looking for then an applicable hack is to use a polygon &quot;net&quot;, split the figure into a suitable number of small squares and you can do the transformation as you see fit. For some simple transformations it may be sufficient to stripe the figure using triangles that span the full figure in one direction but are thin in the other.&#xD;&#xA;&#xD;&#xA;I suppose you could also use a custom pixel shader to achieve the same result." />
  <row Id="33131" PostHistoryTypeId="2" PostId="14719" RevisionGUID="465637ac-716b-445e-bfde-0213def4dbb7" CreationDate="2011-07-11T16:07:23.743" UserId="7911" Text="You're going to have to recreate your shape as a 3D mesh and run it through a software renderer to get any decent output that isn't a single-purpose hack like the texture matrix solution.  If you attempt this in 2D you don't have enough information, like you've noticed.&#xD;&#xA;&#xD;&#xA;Let me introduce you to a great article on perspective texture mapping in software:&#xD;&#xA;[tutorial on 3D software rendering][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://chrishecker.com/Miscellaneous_Technical_Articles#Perspective_Texture_Mapping" />
  <row Id="33132" PostHistoryTypeId="2" PostId="14720" RevisionGUID="e91a0c2c-1410-4a2f-ba81-426a0d21bf52" CreationDate="2011-07-11T16:28:48.530" UserId="7911" Text="Build your program with the highest warning level turned on, see if it catches any uninitialized variables.&#xD;&#xA;&#xD;&#xA;Make sure that you're checking all return values from system calls.&#xD;&#xA;&#xD;&#xA;Follow the advice to use the debug DirectX/D3D driver and watch its output to see what changes between the working code and the broken.&#xD;&#xA;" />
  <row Id="33133" PostHistoryTypeId="25" PostId="14708" RevisionGUID="53408750-2ae3-4c62-8268-587d5ed85467" CreationDate="2011-07-11T18:31:20.273" Comment="http://twitter.com/#!/StackGameDev/status/90488353367142400" />
  <row Id="33134" PostHistoryTypeId="2" PostId="14721" RevisionGUID="8644e627-921b-4d2a-99e0-b7cbf9a0385c" CreationDate="2011-07-11T18:37:55.993" UserId="8533" Text="I posted a question in Stack Overflow, but I thought maybe people here would be able to give me a more detailed answer. This is my first post in gamedev. I am sorry if this doesn't belong here.&#xD;&#xA;Here is a link to the original question&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6654626/graphics-capabilities-differences-between-mobile-and-desktop-console-platforms" />
  <row Id="33135" PostHistoryTypeId="1" PostId="14721" RevisionGUID="8644e627-921b-4d2a-99e0-b7cbf9a0385c" CreationDate="2011-07-11T18:37:55.993" UserId="8533" Text="Graphics capabilities differences between mobile and desktop/console platforms?" />
  <row Id="33136" PostHistoryTypeId="3" PostId="14721" RevisionGUID="8644e627-921b-4d2a-99e0-b7cbf9a0385c" CreationDate="2011-07-11T18:37:55.993" UserId="8533" Text="&lt;xna&gt;&lt;opengl&gt;&lt;directx&gt;&lt;mobile&gt;&lt;gpu&gt;" />
  <row Id="33137" PostHistoryTypeId="2" PostId="14722" RevisionGUID="f4045b89-d5b9-43ff-b4b8-7c7ad086a51c" CreationDate="2011-07-11T18:40:19.597" UserId="8515" Text="We are looking to add an archiving system to our game, where the assets (textures, scripts, sounds, etc.) will be located and directly accessed from memory. The main requirements are:&#xD;&#xA;&#xD;&#xA;- Archive must have an internal folder structure&#xD;&#xA;&#xD;&#xA;- Individual files must be accessed directly from the archive without the need to extract them to the hard disk&#xD;&#xA;&#xD;&#xA;- If an external API is used, it must be able to run on Windows, Mac and Linux ; optimally, it should be redistributable free of charge&#xD;&#xA;&#xD;&#xA;Our game engine is in C#, and we are looking for a managed solution (i.e. no PhysicsFS). What could be our options in this case?" />
  <row Id="33138" PostHistoryTypeId="1" PostId="14722" RevisionGUID="f4045b89-d5b9-43ff-b4b8-7c7ad086a51c" CreationDate="2011-07-11T18:40:19.597" UserId="8515" Text="Accessing archived assets - what are the options in C#?" />
  <row Id="33139" PostHistoryTypeId="3" PostId="14722" RevisionGUID="f4045b89-d5b9-43ff-b4b8-7c7ad086a51c" CreationDate="2011-07-11T18:40:19.597" UserId="8515" Text="&lt;c#&gt;&lt;assets&gt;&lt;asset-management&gt;" />
  <row Id="33140" PostHistoryTypeId="2" PostId="14723" RevisionGUID="74f515b6-e35f-44fa-874d-3c6e10c67c1e" CreationDate="2011-07-11T18:59:56.960" UserId="6877" Text="You can use [Zlib .NET](http://www.componentace.com/zlib_.NET.htm)" />
  <row Id="33142" PostHistoryTypeId="2" PostId="14725" RevisionGUID="9d834c0c-a6da-4a81-b533-979276c5e242" CreationDate="2011-07-11T19:07:25.860" UserId="159" Text="I am not new to XNA 2D programming, but have never done 3D. I am interested in learning, but always get lost once I get to creating a Matrix. &#xD;&#xA;&#xD;&#xA;I am sad to say that I don't really get them. Can someone explain, (or even just point me to a good tutorial) on getting started with matricies?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33143" PostHistoryTypeId="1" PostId="14725" RevisionGUID="9d834c0c-a6da-4a81-b533-979276c5e242" CreationDate="2011-07-11T19:07:25.860" UserId="159" Text="XNA and Matrix.&lt;whatever&gt;" />
  <row Id="33144" PostHistoryTypeId="3" PostId="14725" RevisionGUID="9d834c0c-a6da-4a81-b533-979276c5e242" CreationDate="2011-07-11T19:07:25.860" UserId="159" Text="&lt;xna&gt;&lt;3d&gt;" />
  <row Id="33145" PostHistoryTypeId="5" PostId="14722" RevisionGUID="6a36b85e-f695-47d3-89ba-cfdfe7661e89" CreationDate="2011-07-11T19:11:21.940" UserId="8515" Comment="another question added" Text="We are looking to add an archiving system to our game, where the assets (textures, scripts, sounds, etc.) will be located and directly accessed from memory. The main requirements are:&#xD;&#xA;&#xD;&#xA;- Files must not be compressed&#xD;&#xA;&#xD;&#xA;- Archive must have an internal folder structure&#xD;&#xA;&#xD;&#xA;- Individual files must be accessed directly from the archive without the need to extract them to the hard disk&#xD;&#xA;&#xD;&#xA;- If an external API is used, it must be able to run on Windows, Mac and Linux ; optimally, it should be redistributable free of charge&#xD;&#xA;&#xD;&#xA;Our game engine is in C#, and we are looking for a managed solution (i.e. no PhysicsFS). What could be our options in this case?&#xD;&#xA;&#xD;&#xA;Could it make sense to implement the whole thing by ourselves, using FileStream?" />
  <row Id="33146" PostHistoryTypeId="2" PostId="14726" RevisionGUID="130994fd-e3d5-4085-a54d-e3338c449210" CreationDate="2011-07-11T19:12:20.880" UserId="6877" Text="Mobile/handheld devices are less powerful. Because they have to optimize the hardware configuration withing a reasonable price range.&#xD;&#xA;&#xD;&#xA;But, Desktop is not like that. Its modular and doesn't come as a package that can't be upgraded. You can modify it based on your need. And you are paying for a certain hardware at a time so, you get more powerful machine biased to your demand. These things are not possible in mobile devices.&#xD;&#xA;&#xD;&#xA;In case of console, though they are under powered(when you look at the numerical figures) with respect to Desktop PC but, their architecture is different and those machine are fully dedicated for gaming. So, those hardware don't have the overhead to run a general purpose application. That's why they perform better comparing with the same configuration PC.&#xD;&#xA;&#xD;&#xA;But, recently handheld devices are getting more and more powerful, supporting many features. But, again you can't just put is stuff into a mobile just because you can. You have a power supply limit and you have to watch out for the price of it.&#xD;&#xA;&#xD;&#xA;That's why you can't just stuff in your Intel Core 2 duo processor in your iPhone just because its smaller then you phone. It demands power &amp; cooling system. A handheld device is not physically capable of supporting that. " />
  <row Id="33147" PostHistoryTypeId="5" PostId="14721" RevisionGUID="be02b485-9509-42ef-9d94-706988c9caef" CreationDate="2011-07-11T19:16:14.260" UserId="8533" Comment="added 1085 characters in body" Text="I posted a question in Stack Overflow, but I thought maybe people here would be able to give me a more detailed answer. This is my first post in gamedev. I am sorry if this doesn't belong here.&#xD;&#xA;&#xD;&#xA;EDIT: Here is the original question&#xD;&#xA;&#xD;&#xA;I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a high-end GPU do that a modern smartphone cannot do? It's clear that games in a desktop look much better but what is behind those differences? I am aware that the APIs supported are different (D3DMobile, OpenGL ES vs full direct3d and opengl), even XNA has the Reach and Hi-Def graphics profile. I can see some of the differences here:&#xD;&#xA;&#xD;&#xA;http://my.safaribooksonline.com/book/programming/game-programming/9780132620185/reach-vsdot-hidef-chart/app01lev1sec1#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODAxMzI2MjAxODUvNDU1)&#xD;&#xA;&#xD;&#xA;What is the impact in let's say a game, what kind of effects or visuals I cannot get in a mobile due to this limitations, and what's the reasoning behind them. What is the bottleneck or restriction that prevents mobile devices to produce them.&#xD;&#xA;&#xD;&#xA;Any thoughts or good resources to read about will be very appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and a link to it, just to keep them connected.&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6654626/graphics-capabilities-differences-between-mobile-and-desktop-console-platforms" />
  <row Id="33148" PostHistoryTypeId="5" PostId="14721" RevisionGUID="2016c290-b10f-486a-8386-65e7557911f0" CreationDate="2011-07-11T19:22:34.770" UserId="8533" Comment="added 1085 characters in body" Text="I posted a question in Stack Overflow, but I thought maybe people here would be able to give me a more detailed answer. This is my first post in gamedev. I am sorry if this doesn't belong here.&#xD;&#xA;&#xD;&#xA;EDIT: Here is the original question&#xD;&#xA;&#xD;&#xA;I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a high-end GPU do that a modern smartphone cannot do? It's clear that games in a desktop look much better but what is behind those differences? I am aware that the APIs supported are different (D3DMobile, OpenGL ES vs full direct3d and opengl), even XNA has the Reach and Hi-Def graphics profile. I can see some of the differences here:&#xD;&#xA;&#xD;&#xA;http://my.safaribooksonline.com/book/programming/game-programming/9780132620185/reach-vsdot-hidef-chart/app01lev1sec1#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODAxMzI2MjAxODUvNDU1)&#xD;&#xA;&#xD;&#xA;What is the impact in let's say a game, what kind of effects or visuals I cannot get in a mobile due to this limitations, and what's the reasoning behind them. What is the bottleneck or restriction that prevents mobile devices to produce them.&#xD;&#xA;&#xD;&#xA;Any thoughts or good resources to read about will be very appreciated.&#xD;&#xA;&#xD;&#xA;EDIT: I am aware of the price/power/heat/form factor restrictions imposed on mobile GPUs. What I am trying to get at is the implications of those differences. Let's say that you can't use some type or size or textures, or maybe there is a maximum number of polygons, or certain type of transformations are not allowed. And from that I would like to know the practical consequence (i.e. water looks less real, objects up close look pixelated, the lighting is more flat). &#xD;&#xA;I am just guessing, but I would like to know for sure. In short, I want to know if I were to do a game with all the features of a high-end gpu (for example, a DX11 compatible one), and write the same game for a phone. What will I be missing, and in terms of visual perception what would look different?&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;Here is a link to the original question, just to keep them connected.&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/6654626/graphics-capabilities-differences-between-mobile-and-desktop-console-platforms" />
  <row Id="33150" PostHistoryTypeId="5" PostId="14726" RevisionGUID="46342a03-bea3-4f27-9176-022107d8dc6a" CreationDate="2011-07-11T19:33:14.713" UserId="6877" Comment="added 405 characters in body" Text="Mobile/handheld devices are less powerful. Because they have to optimize the hardware configuration withing a reasonable price range.&#xD;&#xA;&#xD;&#xA;But, Desktop is not like that. Its modular and doesn't come as a package that can't be upgraded. You can modify it based on your need. And you are paying for a certain hardware at a time so, you get more powerful machine biased to your demand. These things are not possible in mobile devices.&#xD;&#xA;&#xD;&#xA;In case of console, though they are under powered(when you look at the numerical figures) with respect to Desktop PC but, their architecture is different and those machine are fully dedicated for gaming. So, those hardware don't have the overhead to run a general purpose application. That's why they perform better comparing with the same configuration PC.&#xD;&#xA;&#xD;&#xA;But, recently handheld devices are getting more and more powerful, supporting many features. But, again you can't just put is stuff into a mobile just because you can. You have a power supply limit and you have to watch out for the price of it.&#xD;&#xA;&#xD;&#xA;That's why you can't just stuff in your Intel Core 2 duo processor in your iPhone just because its smaller then you phone. It demands power &amp; cooling system. A handheld device is not physically capable of supporting that. &#xD;&#xA;&#xD;&#xA;**EDIT :** I haven't seen any mobile device supporting over OpenGL ES 2.0 but in PC you have OpenGL 4.1 features(with necessary hardware installed). For advance visual effects you need some features from the later versions of OpenGL. One of the most notable feature, [Tessellation](http://en.wikipedia.org/wiki/Tessellation) is only supported on OpenGL 4 supported hardware.(ES stands for Embedded device) And so far its not yet possible to create an hardware supporting OpenGL 4 in an optimized manner that can used with a handheld device." />
  <row Id="33151" PostHistoryTypeId="2" PostId="14728" RevisionGUID="888a8d2c-46f2-4c15-8ca3-61ccf84ae343" CreationDate="2011-07-11T19:52:17.320" UserId="6059" Text="I've seen before a topic here asking if there is any significant differences between using PALib or Nintendo's Nitro SDK... and that got me curious&#xD;&#xA;&#xD;&#xA;Pretty straightforward question, what does it take to have/buy the official SDK ? " />
  <row Id="33152" PostHistoryTypeId="1" PostId="14728" RevisionGUID="888a8d2c-46f2-4c15-8ca3-61ccf84ae343" CreationDate="2011-07-11T19:52:17.320" UserId="6059" Text="What does it take / How much does it cost to get nintendo ds/3ds official sdk?" />
  <row Id="33153" PostHistoryTypeId="3" PostId="14728" RevisionGUID="888a8d2c-46f2-4c15-8ca3-61ccf84ae343" CreationDate="2011-07-11T19:52:17.320" UserId="6059" Text="&lt;nintendo&gt;&lt;sdk&gt;" />
  <row Id="33154" PostHistoryTypeId="5" PostId="14725" RevisionGUID="36b231a5-00b5-40c6-abd9-768571c273f2" CreationDate="2011-07-11T19:55:45.210" UserId="159" Comment="added 379 characters in body" Text="I am not new to XNA 2D programming, but have never done 3D. I am interested in learning, but always get lost once I get to creating a Matrix. &#xD;&#xA;&#xD;&#xA;I am sad to say that I don't really get them. Can someone explain, (or even just point me to a good tutorial) on getting started with matricies?&#xD;&#xA;&#xD;&#xA;I understand them from a math point of view, but I don't really get the API. How do you use the API? What is the difference in CreatePerspecitive, and CreatePerspectiveFieldOfView. I am really looking for information in understanding when to use the different members the API provides.&#xD;&#xA;&#xD;&#xA;I know this question is a little vague, and large, so I will try to edit it as needed.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33155" PostHistoryTypeId="2" PostId="14729" RevisionGUID="157a8024-764a-4c98-a8d1-1ab2ff01fcbe" CreationDate="2011-07-11T20:01:09.213" UserId="6877" Text="As far as I know, for all major console development, you have to get development kit from the respective developers which requires a lot of money &amp; signed contract.&#xD;&#xA;&#xD;&#xA;However you can check it out, [Nintendo DS homebrew](http://en.wikipedia.org/wiki/Nintendo_DS_homebrew)" />
  <row Id="33156" PostHistoryTypeId="2" PostId="14730" RevisionGUID="75ddeda8-da70-44ae-bee5-59e88e7ff5b8" CreationDate="2011-07-11T20:08:33.280" UserId="14" Text="Costs I can't speak on personally, and I don't know if anyone who is a licensed developer can either. But there are some requirements that I do know of. I don't imagine it is that expensive because from what I saw around the internet the development kit for the Wii is under 5k. &#xD;&#xA;&#xD;&#xA;What will cost you however, is having a brick-and-motar location dedicated to your studio's work. Nintendo requires this of it's licensees.&#xD;&#xA;&#xD;&#xA;Following that, they also request back financials so that they can ensure that you would actually have the resources to bring your game to market.&#xD;&#xA;&#xD;&#xA;If you think you qualify, you can [fill out the application to become a licensed Nintendo Developer][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.warioworld.com/apply/" />
  <row Id="33158" PostHistoryTypeId="2" PostId="14731" RevisionGUID="9eece374-04a8-402b-b586-62621f3b47b5" CreationDate="2011-07-11T20:24:38.117" UserId="8514" Text="Not sure which aspects of Matrix math you're having difficulties with, so I'll list two books that helped me get over the 3D math hump. Chances are, you'll need to work through more than one book to get everything to finally &quot;click&quot;. &#xD;&#xA;&#xD;&#xA; 1. [3D Math Primer for Graphics and Game Development][1] This is a great book, everything is explained thoroughly and in a language that's easy to understand. I would start here. &#xD;&#xA; 2. [Mathematics for 3D Game Programming and Computer Graphics][3] Another good 3D math textbook. Covers a wide range of material. It's concise and straight to the point. &#xD;&#xA;&#xD;&#xA;I would start with these, even if you have to re-read the material a couple of times. I spent months going over 3D math topics before being comfortable with it. &#xD;&#xA;&#xD;&#xA;EDIT: I posted this before you updated your question. If you're looking for help directly  with how to use Matrices in XNA, check out XNA Game Studio 4.0 Programming: Developing for Windows Phone 7 and Xbox 360 by Tom Miller &amp; Dean Johnson (can't link, due to spam prevention, but it's on Amazon). Chapter 4 goes into the very basics of 3D Math and directly relate to the math classes in XNA. You'll probably learn a lot from the code samples in the later chapters as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119&#xD;&#xA;  [3]: http://amzn.com/1584502770" />
  <row Id="33159" PostHistoryTypeId="2" PostId="14732" RevisionGUID="c062b7ee-bfec-4dfe-bea8-f2e1b344f59f" CreationDate="2011-07-11T21:28:43.170" UserId="4496" Text="I found that Riemers 3D XNA tutorials were great for picking up the basics on the matrices and how to use them specifically in an XNA environment.  The second tutorial makes a simple flight-sim so it also has a fair amount of instant gratification.&#xD;&#xA;&#xD;&#xA;Here's a link to the first one, the navigation links are on the right side (something that threw me at first): http://www.riemers.net/eng/Tutorials/XNA/Csharp/series1.php " />
  <row Id="33160" PostHistoryTypeId="25" PostId="14725" RevisionGUID="70320f93-e9c2-4529-9eb8-786d273c2007" CreationDate="2011-07-11T21:31:21.307" Comment="http://twitter.com/#!/StackGameDev/status/90533653511282689" />
  <row Id="33161" PostHistoryTypeId="5" PostId="14731" RevisionGUID="1cdd899b-8bd7-499f-8d4f-7837baed363d" CreationDate="2011-07-11T21:38:21.990" UserId="8514" Comment="added 371 characters in body" Text="Not sure which aspects of Matrix math you're having difficulties with, so I'll list two books that helped me get over the 3D math hump. Chances are, you'll need to work through more than one book to get everything to finally &quot;click&quot;. &#xD;&#xA;&#xD;&#xA; 1. [3D Math Primer for Graphics and Game Development][1] This is a great book, everything is explained thoroughly and in a language that's easy to understand. I would start here. &#xD;&#xA; 2. [Mathematics for 3D Game Programming and Computer Graphics][3] Another good 3D math textbook. Covers a wide range of material. It's concise and straight to the point. &#xD;&#xA;&#xD;&#xA;I would start with these, even if you have to re-read the material a couple of times. I spent months going over 3D math topics before being comfortable with it. &#xD;&#xA;&#xD;&#xA;EDIT: I posted this before you updated your question. If you're looking for help directly  with how to use Matrices in XNA, check out XNA Game Studio 4.0 Programming: Developing for Windows Phone 7 and Xbox 360 by Tom Miller &amp; Dean Johnson (can't link, due to spam prevention, but it's on Amazon). Chapter 4 goes into the very basics of 3D Math and directly relate to the math classes in XNA. You'll probably learn a lot from the code samples in the later chapters as well.&#xD;&#xA;&#xD;&#xA;EDIT 2: Another book that I recommend as well is Microsoft XNA Game Studio Creator's Guide. While this only covers XNA 3.0, the majority of it is still applicable to XNA 4.0. It not only has a chapter on Matrix math, but on creating a graphics engine camera system that shows great use of Matrices in XNA. I think you'd take away a lot from that sample.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119&#xD;&#xA;  [3]: http://amzn.com/1584502770" />
  <row Id="33162" PostHistoryTypeId="2" PostId="14733" RevisionGUID="f7a9e456-ecbc-4403-906f-58cfa2c3f2fb" CreationDate="2011-07-11T22:18:00.050" UserId="3874" Text="Say I have a sprite. Its AABB is easy to find since I know the width and height. Say I rotate it 45 degrees, I don't think the AABB would be big enough to cover it, so I need a new AABB. How can I calculate the bounding rectangle of a rotated rectangle? (given a center point, an angle, and its width and height).&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33163" PostHistoryTypeId="1" PostId="14733" RevisionGUID="f7a9e456-ecbc-4403-906f-58cfa2c3f2fb" CreationDate="2011-07-11T22:18:00.050" UserId="3874" Text="AABB of roated sprite?" />
  <row Id="33164" PostHistoryTypeId="3" PostId="14733" RevisionGUID="f7a9e456-ecbc-4403-906f-58cfa2c3f2fb" CreationDate="2011-07-11T22:18:00.050" UserId="3874" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="33165" PostHistoryTypeId="5" PostId="14733" RevisionGUID="46e0875f-eb7b-4a31-8997-3adc20399489" CreationDate="2011-07-11T22:25:59.387" UserId="3874" Comment="added 165 characters in body" Text="Say I have a sprite. Its AABB is easy to find since I know the width and height. Say I rotate it 45 degrees, I don't think the AABB would be big enough to cover it, so I need a new AABB. How can I calculate the bounding rectangle of a rotated rectangle? (given a center point, an angle, and its width and height).&#xD;&#xA;&#xD;&#xA;Note that OpenGL does the rotation so I do not have access to the vertex information.&#xD;&#xA;&#xD;&#xA;What I'm trying to do is get AABBs so I can do 2D culling for rendering.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33166" PostHistoryTypeId="5" PostId="14733" RevisionGUID="57a9b436-f3eb-4524-a582-d04fa5324aba" CreationDate="2011-07-11T22:31:56.690" UserId="1430" Comment="edited body; edited tags; edited title" Text="Say I have a sprite. Its AABB is easy to find since I know the width and height. Say I rotate it 45 degrees, I don't think the AABB would be big enough to cover it, so I need a new AABB. How can I calculate the bounding rectangle of a rotated rectangle (given a center point, an angle, and its width and height)?&#xD;&#xA;&#xD;&#xA;Note that OpenGL does the rotation so I do not have access to the vertex information.&#xD;&#xA;&#xD;&#xA;What I'm trying to do is get AABBs so I can do 2D culling for rendering.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33167" PostHistoryTypeId="4" PostId="14733" RevisionGUID="57a9b436-f3eb-4524-a582-d04fa5324aba" CreationDate="2011-07-11T22:31:56.690" UserId="1430" Comment="edited body; edited tags; edited title" Text="AABB of rotated sprite?" />
  <row Id="33168" PostHistoryTypeId="6" PostId="14733" RevisionGUID="57a9b436-f3eb-4524-a582-d04fa5324aba" CreationDate="2011-07-11T22:31:56.690" UserId="1430" Comment="edited body; edited tags; edited title" Text="&lt;rotation&gt;&lt;aabb&gt;" />
  <row Id="33169" PostHistoryTypeId="2" PostId="14734" RevisionGUID="e843d577-d016-4f12-8665-e2bf4188e4d0" CreationDate="2011-07-11T22:35:50.987" UserId="1430" Text="The straightforward approach is to&#xD;&#xA;&#xD;&#xA;* find the extents of the unrotated bounding box&#xD;&#xA;* apply the same rotation matrix to those extents as you did to the sprite (but on the CPU, so you may need to employ your own matrix math here)&#xD;&#xA;* recompute the AABB of the rotated extents (which should be cheap since there are only four).&#xD;&#xA;&#xD;&#xA;It's possible to perform the operation in fewer calculations, if you are concerned about (or interested in) those sorts of things. For example, one (potential) technique for doing so is discussed [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zeuxcg.org/2010/10/17/aabb-from-obb-with-component-wise-abs/" />
  <row Id="33171" PostHistoryTypeId="2" PostId="14735" RevisionGUID="2bfc42df-3626-4338-971e-3c77fab02f32" CreationDate="2011-07-11T23:02:05.987" UserId="5904" Text="Consider a box centered at some point in space. Imagine a line from the center to the top-right corner. This length is effectively the hypotenuse of a triangle formed from taking the center of the box and drawing a line right and then up. These sides of the triangle are half-extents. In the picture, the red lines are the half extents and the blue line is the hypotenuse -- the distance from the center of the box to the corner. Call this blue line's length 'dist'&#xD;&#xA;![Half extents][1]&#xD;&#xA;If you compute the arctangent of ratio of the half extents (Y / X), then you can get the angle. From there you can simply linearly add Pi/4 to the angle (45 degrees), then use:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;newx = cos(newAngle)*dist;&lt;br&gt;&#xD;&#xA;newy = sin(newAngle)*dist;&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Repeat for each of the four points, and then find max/min boundaries of the AABB.&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;This is super tedious. The better way is to use 3x3 matrix representing rotation and translation. In effect, you take each of the four points, translate them back to origin  by subtract the center's coordinates from them so that their new center is on (0,0), then rotate them. Finally, you translate them back to the real center. With the new set of points, once again, simply compute new the AABB for those points. Wikipedia has some great information about matrix math, especially how to do rotations, translations, and more using 3x3 matrices.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tpMbg.png" />
  <row Id="33175" PostHistoryTypeId="5" PostId="14466" RevisionGUID="90ee1ea5-d788-45f7-975b-1f3a2860e2c1" CreationDate="2011-07-11T23:07:36.793" UserId="8408" Comment="added 141 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = 0;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    template &lt;class V&gt;&#xD;&#xA;    bool Mesh&lt;V&gt;::Render() {&#xD;&#xA;	pDeviceContext-&gt;IASetInputLayout(pVertexLayout);&#xD;&#xA;	pDeviceContext-&gt;IASetPrimitiveTopology(topologyType);&#xD;&#xA;	pDeviceContext-&gt;VSSetShader(pVShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;PSSetShader(pPShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;Draw(bufSize, 0);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Jumped the gun, thought I found the solution. Same issue and warning remains.&#xD;&#xA;&#xD;&#xA;Here is the shader initialization code&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;     bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;        // Replace with Int hash value!!!!&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Pixel Shader.&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Edit 2**&#xD;&#xA;&#xD;&#xA;I'm starting to think it's an issue with my draw call sequence and by extension the design of my Mesh superclass and UIRectangle subclass. Didn't originally include the Mesh.Render() function with the code I posted but I added it to the bottom of the first code block. Could someone validate it?&#xD;&#xA;&#xD;&#xA;**Voting to delete. I solved the problem while rearranging my architecture and honestly don't know how. I've seen forum post with identical problems, but don't believe this question can help anyone. Maybe someone will come along and address it better in the future.**" />
  <row Id="33176" PostHistoryTypeId="5" PostId="1603" RevisionGUID="ba511f05-fc2e-4080-bb65-99ebe9aea289" CreationDate="2011-07-11T23:24:15.927" UserId="7888" Comment="Distilled multiple updates into the key question and its constraints; clarified the question title" Text="A lot of people asked for a trailer for my game, because screenshots do not do it justice. I have tested PlayClaw, Fraps, CamStudio, VirtualDub, and some other minor tools; none have produced a viable result. My game uses vector graphics and is designed to run at 60fps, so lossy compression of a regular screen capture video destroys the graphical appeal.&#xD;&#xA;&#xD;&#xA;How can I record gameplay without blurring my graphics and slowing down the framerate?" />
  <row Id="33177" PostHistoryTypeId="4" PostId="1603" RevisionGUID="ba511f05-fc2e-4080-bb65-99ebe9aea289" CreationDate="2011-07-11T23:24:15.927" UserId="7888" Comment="Distilled multiple updates into the key question and its constraints; clarified the question title" Text="How can I record my vector graphics game without  blurring the graphics?" />
  <row Id="33178" PostHistoryTypeId="24" PostId="1603" RevisionGUID="ba511f05-fc2e-4080-bb65-99ebe9aea289" CreationDate="2011-07-11T23:24:15.927" Comment="Proposed by 7888 approved by 51 edit id of 556" />
  <row Id="33180" PostHistoryTypeId="10" PostId="14466" RevisionGUID="bd1eb6a4-0313-40f9-97fe-aa77fc22a6e5" CreationDate="2011-07-11T23:29:03.913" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33181" PostHistoryTypeId="2" PostId="14737" RevisionGUID="1d639b6e-1624-45c8-a5d3-0ed1be80ba50" CreationDate="2011-07-12T00:20:28.563" UserId="5904" Text="&#xD;&#xA;First, the interconnect between the GPU and the CPU is usually very narrow. For example, when developing for the iPhone, *memory bandwidtch* is a huge problem. People pack vertex data using 16-bit integers and use matrices to rescale them. For example, I used 0...1023 to represent [0.0, 1.0] range in OpenGL texture coordinate by applying a scaling factor of (1.0/1023.0) to incoming texture coordinates. This allowed me to use 1/2 of the bandwidth when submitting texture coordinates.&#xD;&#xA;&#xD;&#xA;Second, the limited heat/power means a lower clock speed. That's pretty intuitive, but worth mentioning. This implies fewer shader units and slower speeds for each unit. However, that also extends to the speed of the video memory and sometimes means dedicated memory isn't even available because it would produce too much extra heat.&#xD;&#xA;&#xD;&#xA;Third, architectural pipeline features. DirectX 11 / OpenGL 4.0 have features that require extra stages of the traditional programmable pipeline, specifically geometry shaders, tessellation shaders, hull shaders, etc. These extra stages mean more GPU die space and consequently more cost and heat. These features generally are used to add detail to scenes but aren't critical in implementing algorithms like lighting, shadows, normal mapping, etc. so they aren't really killer features like fixed function -&gt; programmable pipeline change.&#xD;&#xA;&#xD;&#xA;Finally, mobile GPUs lack the generality of desktop GPUs. With technologies like CUDA, OpenGL, and DirectCompute aimed to solve non-graphical problems, GPU makers had to implement more general operations like integer operations, GPU mem pointers, 64-bit floating point values, etc. which require more hardware support. These features aren't really necessary for games and so they generally don't make the cut. More hardware features, even if you don't use them, have a $ and heat cost associated with them.&#xD;&#xA;&#xD;&#xA;Really, everything that is said can be traced to power, heat, cost in some form.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33182" PostHistoryTypeId="25" PostId="14733" RevisionGUID="de4af614-4f8a-485b-9100-89f3ae1036f3" CreationDate="2011-07-12T00:31:21.460" Comment="http://twitter.com/#!/StackGameDev/status/90578956864073728" />
  <row Id="33184" PostHistoryTypeId="2" PostId="14738" RevisionGUID="6b6608d8-a66d-4422-98ba-5ef2d6959354" CreationDate="2011-07-12T00:40:48.360" UserId="2978" Text="For some reason, you might have hardware acceleration disable. Right-click on an instance of the Flash Player in your browser and select settings. In the first tab, you should have hardware acceleration checked." />
  <row Id="33185" PostHistoryTypeId="2" PostId="14739" RevisionGUID="34d7dd81-64bd-4f64-a159-54db1a58da21" CreationDate="2011-07-12T00:42:24.160" UserId="5904" Text="*Best crossplatorm windowing system?*&#xD;&#xA;&#xD;&#xA;Subjective and unimportant. A game done using OpenGL/Direct3D probably uses such an insignificant portion of a windowing toolkit's features that you might just skip it altogether. Really, what do you need? The ability to detect keyboard and mouse clicks, maybe the occasional Alt+Tab.&#xD;&#xA;&#xD;&#xA;*Best crossplatform graphics library (to be distinguished from windowing system)? OpenGL?*&#xD;&#xA;&#xD;&#xA;Unless you are doing software rendering, OpenGL is pretty much the only one in town.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;If you are looking to get a game going, want to learn OpenGL, but don't want to deal with native windowing stuff (i.e. prefer crossplatform) then try SDL. It has a number of features (audio, joysticks, threads, mouse/keyboard input, etc.) and even has OpenGL integration so you can take control of the rendering using OpenGL.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;*Any good tutorials for setting up a very basic graphical R.P.G. game, or even just simple custom graphics + user-interaction tutorials in C++?*&#xD;&#xA;&#xD;&#xA;Way too vague.&#xD;&#xA;&#xD;&#xA;Most of the time, you design the UI, gameplay, etc on paper then implement it in code. To ask for stuff about how to make an RPG is just not enough, e.g: &lt;br&gt;&#xD;&#xA;Are you thinking Zelda-style overhead/isometric, a side scroller, a dungeon crawler, an overhead view that turns into Mortal Kombat when you run into an enemy, turn based combat, a text-based RPG that has pictures show up etc. Any of these have totally different implementations from one another. Why bother reading about a graphical feel that you aren't even interested in using in your game? &lt;br&gt;&#xD;&#xA;You should know what your game is supposed to look and feel like, so go make it. If you don't, then go design it. The question then breaks down from &quot;How do I make an RPG&quot; to specific things like &quot;How to do a tile-based isometric grid&quot;  or &quot;How do I convert from a mouse click to a hex tile in my world?&quot; and that's when people can really jump in and give you suggestions and experiences.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33186" PostHistoryTypeId="2" PostId="14740" RevisionGUID="4a0312ce-41a6-4181-bf6f-82436544d2d4" CreationDate="2011-07-12T01:12:00.020" UserId="2978" Text="Well if you have searched for it, I guess it's not implemented. However, it's not extremely hard to do.&#xD;&#xA;&#xD;&#xA;If you think about it moving a camera around is the same as moving the world around in the opposite direction. A camera implementation could be as simple as a Rectangle instance. On each frame, you would do something like :&#xD;&#xA;&#xD;&#xA;    world.x = - camera.x;&#xD;&#xA;    world.y = - camera.y;&#xD;&#xA;&#xD;&#xA;If you want to follow a character in your world, it's simple as :&#xD;&#xA;&#xD;&#xA;    camera.x = character.x - camera.width / 2;&#xD;&#xA;    camera.y = character.y - camera.height / 2;&#xD;&#xA;&#xD;&#xA;This will center the character in the screen (given that camera.width is equal to your screen width).&#xD;&#xA;&#xD;&#xA;Note that this will not give you a nice camera movement. You might find some insight on good camera movement here : http://replicaisland.blogspot.com/2010/01/elusive-perfect-platformer-camera.html.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33187" PostHistoryTypeId="2" PostId="14741" RevisionGUID="979cf3eb-fe45-4ec3-8598-0acb285e7548" CreationDate="2011-07-12T03:22:15.600" UserId="8346" Text="I was the lead developer of 2 moderately successful browser games quite a few years back, and plan on working on a new game soon. At the time, I wrote them in pure PHP (no template engine or anything of the sort).&#xD;&#xA;&#xD;&#xA;I'd like to start working on a new game, but have been out of the web development world for a while. Reading around, I hear a lot of good about Rails, Django, Node.js, etc., with which I have no experience (although I know my way around Python, Javascript, and the others quite well).&#xD;&#xA;&#xD;&#xA;So my question is the following- if I were to go in my old ways and go with PHP again, would I be making things hard for myself? Would picking something more &quot;trendy&quot; have a real impact on my development?&#xD;&#xA;&#xD;&#xA;In addition, does anyone have any pointers relating to specifically developing browser games with these more modern tools?" />
  <row Id="33188" PostHistoryTypeId="1" PostId="14741" RevisionGUID="979cf3eb-fe45-4ec3-8598-0acb285e7548" CreationDate="2011-07-12T03:22:15.600" UserId="8346" Text="How relevant is PHP today for browser games?" />
  <row Id="33189" PostHistoryTypeId="3" PostId="14741" RevisionGUID="979cf3eb-fe45-4ec3-8598-0acb285e7548" CreationDate="2011-07-12T03:22:15.600" UserId="8346" Text="&lt;browser-based-games&gt;&lt;php&gt;" />
  <row Id="33190" PostHistoryTypeId="25" PostId="14728" RevisionGUID="35c0f531-5c78-432c-9e92-f7523c0344fa" CreationDate="2011-07-12T03:31:22.347" Comment="http://twitter.com/#!/StackGameDev/status/90624257977094144" />
  <row Id="33191" PostHistoryTypeId="2" PostId="14742" RevisionGUID="f204d306-bfd8-4ed9-9a03-1d86bae7488c" CreationDate="2011-07-12T04:00:59.213" UserId="6877" Text="For more modern tool, you can pick a WebGL powered game engine. Most of them are driven by JavaScript. You can checkout [this list](http://ffwd.typepad.com/blog/2011/04/webgl-what-flavor-is-your-engine.html), see if any of it fits your need." />
  <row Id="33195" PostHistoryTypeId="2" PostId="14744" RevisionGUID="7fd5867f-468d-427d-ae1f-99bd2c445831" CreationDate="2011-07-12T06:26:46.937" UserId="3644" Text="There is no easy solution to your problem. In common 3D graphics surfaces are composed out of triangles for a reasons (easy to use, always planar, etc..). Even when you order to draw quads GPU renders them as pairs of triangles.&#xD;&#xA;&#xD;&#xA;Your problem comes from the fact, that it is impossible to properly split quad into triangles when they are not planar and/or their sides are not equal. It is clearly visible on your linked forum post pictures.&#xD;&#xA;&#xD;&#xA;The only solution I could think of is tesselation. It can be done on different stages though:&#xD;&#xA;&#xD;&#xA; - On modeling stage, you could ask your artists to use finer grid and manually split bent quads/trapezoids into triangles&#xD;&#xA; - On uploading objects to GPU, you could split quads/trapezoids into number of smaller quads to reduce the distortion effect&#xD;&#xA; - Also you could use GPU tesselation functions&#xD;&#xA;&#xD;&#xA;The choice depends on your actual project." />
  <row Id="33196" PostHistoryTypeId="25" PostId="14713" RevisionGUID="5c65253d-fab4-4214-a421-bf000b1fa81f" CreationDate="2011-07-12T06:31:22.403" Comment="http://twitter.com/#!/StackGameDev/status/90669556045070337" />
  <row Id="33197" PostHistoryTypeId="2" PostId="14745" RevisionGUID="140fe0e8-236e-4e83-a19a-6ef94d4f8805" CreationDate="2011-07-12T08:07:09.613" UserId="778" Text="Seems like a quick and easy question but I haven't been able to find exactly what I'm looking for so:&#xD;&#xA;&#xD;&#xA;How to calculate a unit length vector that is pointing along the line which is exactly 50% of the angle of two connected line segments?&#xD;&#xA;&#xD;&#xA;A picture speaks a thousands words (that are also better than my explanation!)&#xD;&#xA;![Example of a unit vector bisecting two connected line segments][1]  &#xD;&#xA;So basically I want to calculate the blue unit vector given the two red line segments (which are actually 3 points and are therefore guaranteed to be connected)  &#xD;&#xA;&#xD;&#xA;The red segments are of arbitrary length, and the result doesn't have to be a unit it would just be easier for me.  &#xD;&#xA;It would also be handy to have a way to force the resultant vector to point in a certain direction (relative to the input segments), this isn't essential as I think I can work this one out - as the input line segments ultimately form an n-gon.&#xD;&#xA;&#xD;&#xA;Any examples would be ideal in C++ please, but other languages welcome.&#xD;&#xA;&#xD;&#xA;Many thanks for any pointers.&#xD;&#xA;  [1]: http://i.stack.imgur.com/cBb8y.png" />
  <row Id="33198" PostHistoryTypeId="1" PostId="14745" RevisionGUID="140fe0e8-236e-4e83-a19a-6ef94d4f8805" CreationDate="2011-07-12T08:07:09.613" UserId="778" Text="Find a unit vector exactly halfway between two connected line segments" />
  <row Id="33199" PostHistoryTypeId="3" PostId="14745" RevisionGUID="140fe0e8-236e-4e83-a19a-6ef94d4f8805" CreationDate="2011-07-12T08:07:09.613" UserId="778" Text="&lt;c++&gt;&lt;2d&gt;&lt;math&gt;" />
  <row Id="33200" PostHistoryTypeId="2" PostId="14746" RevisionGUID="47b5b2ea-b9ca-4a0a-bac2-395872c828c5" CreationDate="2011-07-12T08:25:15.587" UserId="4894" Text="Create and normalize two vectors from your red segment, starting from their comon vertex, then add the results (component by component). Then you can normalize the output if you want to get a unit vector. &#xD;&#xA;&#xD;&#xA;The problem is that you'll always end up is the second case, because the angle between 2 vectors will always be less than 180°. But then of course you can just create the opposite vector and see which one suits better your purpose. &#xD;&#xA;&#xD;&#xA;Also there's a special case when both vectors are aligned and the average will be 0 (but you can easily detect it). &#xD;&#xA;&#xD;&#xA;" />
  <row Id="33201" PostHistoryTypeId="2" PostId="14747" RevisionGUID="0b67b404-4934-4d73-b042-7bb825ef8e12" CreationDate="2011-07-12T08:30:43.200" UserId="8050" Text="Let A and B be your vectors:&#xD;&#xA;&#xD;&#xA;![result][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this works only for non-convex angles; you can simply test if your angle is convex and multiply H by -1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/TpPc2.gif" />
  <row Id="33202" PostHistoryTypeId="2" PostId="14748" RevisionGUID="a52ff841-6893-47a1-b98b-0c38c9a8df03" CreationDate="2011-07-12T08:41:08.213" UserId="7588" Text="The old brower games of the day have nothing in common with what you can achieve today with what's available.&#xD;&#xA;&#xD;&#xA;The big question is about real-time; if you want to keep the same sort of game design as an old browser game, PHP should be fine. Thing is, the type of game was _defined_ by the _constraints_ at the time; I guess if you've already dabbled in these games, you'll probably want to take things a step further.&#xD;&#xA;&#xD;&#xA;If you want to keep an older, static-time based game, you could very well keep with PHP and maybe make profit of the trendy _canvas_ in __HTML5__. A step further could be to mix it up with a bit of _AJAX_ to make things a bit more _'real time'_; you probably used this in your older games anyway.&#xD;&#xA;&#xD;&#xA;I don't know specifics of the other tools you taks about, but I'm familiar with PHP/AJAX games, and with you base knowlege, and the new power of HTML5, I believe that any browser game should work pretty well for you.&#xD;&#xA;&#xD;&#xA;Of course; this is taking for fact that you want to make quite a static game." />
  <row Id="33203" PostHistoryTypeId="2" PostId="14749" RevisionGUID="6e76c94f-2ffd-4cec-ab87-d49c1722e284" CreationDate="2011-07-12T08:46:20.590" UserId="8546" Text="It mostly depends on a game you are planning to make. Rails, Python and especially Node.js are much more faster, which can be useful if you making MMO kind game. Also, if you are going to use javascript at the client side, Node.js allows you to reuse the same code in server and client side, which could be essential for predictions in multiplayer games (latency compensation). &#xD;&#xA;&#xD;&#xA;In my personal expirience - language with closures makes live of game developer much easier. So finally, if you are not planning to make anything huge, and perfomance is not an issue - you can use PHP. Otherwise I would recommend to look forward to other technologies.&#xD;&#xA;" />
  <row Id="33204" PostHistoryTypeId="2" PostId="14750" RevisionGUID="c94c62e0-bc5a-4b6c-a049-8d070faac80a" CreationDate="2011-07-12T09:07:23.150" UserId="7989" Text="[Real-time Rendering 3rd ed.][1] is a really good book for game rendering, it introduces all the aspects of Computer Graphics and it has abundant resources which lead you to specific field.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtimerendering.com/" />
  <row Id="33205" PostHistoryTypeId="16" PostId="14750" RevisionGUID="96b9ad88-811e-4039-bdda-3ce545856d33" CreationDate="2011-07-12T09:07:23.150" UserId="7989" />
  <row Id="33206" PostHistoryTypeId="25" PostId="14745" RevisionGUID="65be7e30-c6a7-4d45-877e-05cef87cd4cd" CreationDate="2011-07-12T09:31:21.910" Comment="http://twitter.com/#!/StackGameDev/status/90714855417458689" />
  <row Id="33207" PostHistoryTypeId="2" PostId="14751" RevisionGUID="0b6e7116-de71-4654-ae76-db4f2fbe24ca" CreationDate="2011-07-12T09:48:58.853" UserId="20" Text="PHP is still relevant for browser games. There are tons of companies ([Gameforge][1], [Funzio][2], [Goodgame Studios][3], etc.) that use PHP for their online games. &#xD;&#xA;&#xD;&#xA;I think PHP and Java are most widely used, but learning something like Node.js and Python can be beneficial as well. It really depends on what you want to focus on. Learn new technologies/a new programming language, or create a game with the tools you already know?&#xD;&#xA;&#xD;&#xA;As others suggested, you could improve your game-client by using technologies like HTML5 and JavaScript. For the backend you can still use PHP. That might give you enough new stuff to learn while you can still benefit from your PHP programming skills.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://us.gameforge.com&#xD;&#xA;  [2]: http://www.funzio.com&#xD;&#xA;  [3]: http://www.goodgamestudios.com/" />
  <row Id="33209" PostHistoryTypeId="2" PostId="14753" RevisionGUID="42b9ff84-c807-4105-b5ff-0f0387b0c235" CreationDate="2011-07-12T10:00:53.367" UserId="1386" Text="PHP is still relavant and widely used.&#xD;&#xA;&#xD;&#xA;According to the [TIOBE Programming Community][1] PHP is the fifth most popular language.&#xD;&#xA;It was in fourth position last year. That decrease could simply be due to an increase in the amount of available technologies.&#xD;&#xA;&#xD;&#xA;*I'm assuming there is some correlation between general programming language popularity and game programming language popularity.*&#xD;&#xA;&#xD;&#xA;Rails, Django and Node.js are frameworks or libraries so comparing them with PHP won't work so well, instead you could compare them with PHP frameworks such as [Symfony][2] and [CakePHP][3]. If you're already confident with PHP and don't have experience with Ruby/Python it may be worth using one of these.&#xD;&#xA;&#xD;&#xA;Most of these frameworks offer model-view-controller (or MTV) separation that could speed up development and keep your code cleaner and easier to maintain.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html&#xD;&#xA;  [2]: http://www.symfony-project.org/&#xD;&#xA;  [3]: http://cakephp.org/" />
  <row Id="33210" PostHistoryTypeId="5" PostId="14753" RevisionGUID="4cd9d833-b22e-4f1e-859c-e54d381d7a59" CreationDate="2011-07-12T10:06:14.533" UserId="1386" Comment="edited body" Text="PHP is still relevant and widely used.&#xD;&#xA;&#xD;&#xA;According to the [TIOBE Programming Community][1] PHP is the fifth most popular language.&#xD;&#xA;It was in fourth position last year. That decrease could simply be due to an increase in the amount of available technologies.&#xD;&#xA;&#xD;&#xA;*I'm assuming there is some correlation between general programming language popularity and game programming language popularity.*&#xD;&#xA;&#xD;&#xA;Rails, Django and Node.js are frameworks or libraries so comparing them with PHP won't work so well, instead you could compare them with PHP frameworks such as [Symfony][2] and [CakePHP][3]. If you're already confident with PHP and don't have experience with Ruby/Python it may be worth using one of these.&#xD;&#xA;&#xD;&#xA;Most of these frameworks offer model-view-controller architecture that could speed up development and keep your code cleaner and easier to maintain.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html&#xD;&#xA;  [2]: http://www.symfony-project.org/&#xD;&#xA;  [3]: http://cakephp.org/" />
  <row Id="33211" PostHistoryTypeId="2" PostId="14754" RevisionGUID="fb4a8536-466a-4a64-aefd-7d0cfa522615" CreationDate="2011-07-12T10:15:26.240" UserId="3630" Text="If a game client is developed in Javascript, the source code can be found in browser. It's dangerous, because it's easy to hack the game, and patent can't be protected. &#xD;&#xA;&#xD;&#xA;Are there any good ways to avoid this, e.g Javascript can be compiled to binary file then browser load and run the compiled javascript?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33212" PostHistoryTypeId="1" PostId="14754" RevisionGUID="fb4a8536-466a-4a64-aefd-7d0cfa522615" CreationDate="2011-07-12T10:15:26.240" UserId="3630" Text="How to protect source code when game is developed in HTML5/Javascript" />
  <row Id="33213" PostHistoryTypeId="3" PostId="14754" RevisionGUID="fb4a8536-466a-4a64-aefd-7d0cfa522615" CreationDate="2011-07-12T10:15:26.240" UserId="3630" Text="&lt;javascript&gt;&lt;browser-based-games&gt;" />
  <row Id="33214" PostHistoryTypeId="2" PostId="14755" RevisionGUID="5564fe7c-58d5-4fc4-afd8-57abb7746e5b" CreationDate="2011-07-12T10:22:02.727" UserId="4894" Text="One of the first thing you can do to try to prevent people reusing your source code is to [obfuscate][1] it, meaning making it unreadable, thus very difficult to understand. &#xD;&#xA;&#xD;&#xA;Then there's no javascript compiler, as it's interpreted in the browser (so you'd need to compile it to all existing browser). &#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Obfuscated_code" />
  <row Id="33215" PostHistoryTypeId="6" PostId="10919" RevisionGUID="dea5593b-c089-4d5d-bd75-7a89b58cb17e" CreationDate="2011-07-12T10:30:34.233" UserId="1156" Comment="edited tags" Text="&lt;2d&gt;&lt;engine&gt;&lt;flash&gt;&lt;actionscript-3&gt;&lt;camera&gt;" />
  <row Id="33216" PostHistoryTypeId="2" PostId="14756" RevisionGUID="07d6cbd7-b5be-40b7-b7f8-687fcf014acf" CreationDate="2011-07-12T10:35:25.163" UserId="2425" Text="&gt; It's dangerous, because it's easy to hack the game, and patent can't be protected.&#xD;&#xA;&#xD;&#xA;If a user hacks your game and cheats he ruins his own fun. The same can be done with desktop applications, it's just not as easy.&#xD;&#xA;&#xD;&#xA;For the record flash applications are rather easy to decompile and hack aswell so most web platforms have this problem.&#xD;&#xA;&#xD;&#xA;If a user can actively change public data by hacking with the client-side javascript then you have a vulnerability in your server. Any data which a user shouldn't be able to change should either live somewhere the user can't touch it (a server) or have a proper authentication portal in front of it so it can't be changed." />
  <row Id="33217" PostHistoryTypeId="2" PostId="14757" RevisionGUID="d6e7b81c-a7bd-4220-9817-8f2178640166" CreationDate="2011-07-12T10:35:47.613" UserId="1386" Text="The bottom line is there's no bullet-proof way to protect your HTML5/Javascript code.&#xD;&#xA;Obfuscation/minification may help. [Closure Compiler][1] is one such minifier.&#xD;&#xA;&#xD;&#xA;If you really want to prevent people from cheating, store the state of the game on the server and turn the web page into a presentation/input layer that communicates with the server.&#xD;&#xA;&#xD;&#xA;[1]: http://code.google.com/closure/compiler/" />
  <row Id="33218" PostHistoryTypeId="5" PostId="14757" RevisionGUID="51ef965d-ba00-40c3-917f-eb0776e540c5" CreationDate="2011-07-12T10:42:02.647" UserId="1386" Comment="added 19 characters in body" Text="The bottom line is there's no bullet-proof way to protect your HTML5/Javascript code.&#xD;&#xA;Obfuscation and minification will act as a deterrent. [Closure Compiler][1] is one such minifier.&#xD;&#xA;&#xD;&#xA;If you really want to prevent people from cheating, store the state of the game on the server and turn the web page into a presentation/input layer that communicates with the server.&#xD;&#xA;&#xD;&#xA;[1]: http://code.google.com/closure/compiler/" />
  <row Id="33219" PostHistoryTypeId="2" PostId="14758" RevisionGUID="310c0379-7707-429e-a730-180f57249d86" CreationDate="2011-07-12T11:30:03.947" UserId="8131" Text="I am developing a plane fighting game and I want to randomize enemy characters, How to do it?" />
  <row Id="33220" PostHistoryTypeId="1" PostId="14758" RevisionGUID="310c0379-7707-429e-a730-180f57249d86" CreationDate="2011-07-12T11:30:03.947" UserId="8131" Text="Randomize Sprite moment Help needed" />
  <row Id="33221" PostHistoryTypeId="3" PostId="14758" RevisionGUID="310c0379-7707-429e-a730-180f57249d86" CreationDate="2011-07-12T11:30:03.947" UserId="8131" Text="&lt;game-design&gt;&lt;android&gt;&lt;game-mechanics&gt;" />
  <row Id="33222" PostHistoryTypeId="2" PostId="14759" RevisionGUID="fb18cfdc-d161-4ea5-b0e7-6f071a052396" CreationDate="2011-07-12T11:34:55.440" UserId="4513" Text="Given the amount of information in your question.&#xD;&#xA;&#xD;&#xA;Run a random number generator.&#xD;&#xA;Input that value as a parameter to a function that generates parameters for your characters based on a value input.&#xD;&#xA;&#xD;&#xA;Then use those generated values as construction information for your enemy character factory." />
  <row Id="33223" PostHistoryTypeId="5" PostId="14758" RevisionGUID="5fbeb794-9d63-4a0e-8df8-9971292866d4" CreationDate="2011-07-12T11:37:13.237" UserId="8131" Comment="added 262 characters in body" Text="I am new to Android, I am developing a fighting game in Android with AndEngine. Now I want my enemies to mimic my player behavior and on base of score they should come up with different tactics.&#xD;&#xA;&#xD;&#xA;I need to write an AI script. Please help me in that. I want to make my enemies intelligent that they can destroy my player and also engage him in game too. " />
  <row Id="33228" PostHistoryTypeId="5" PostId="14759" RevisionGUID="f4583db6-9c4a-4130-8be9-91e63eedb76f" CreationDate="2011-07-12T12:29:43.457" UserId="4513" Comment="added 2 characters in body" Text="Given the amount of information in your question.&#xD;&#xA;&#xD;&#xA;Run a random number generator.&#xD;&#xA;Input that value as a parameter to a function that generates parameters for your characters based on the input value.&#xD;&#xA;&#xD;&#xA;Then use those generated values as construction information for your enemy character factory." />
  <row Id="33230" PostHistoryTypeId="25" PostId="14754" RevisionGUID="f88cbde6-805c-453d-a15b-e653307685ac" CreationDate="2011-07-12T12:31:22.257" Comment="http://twitter.com/#!/StackGameDev/status/90760153707712512" />
  <row Id="33231" PostHistoryTypeId="2" PostId="14760" RevisionGUID="bd833ab7-0394-4f86-935b-d97fdb01d2a8" CreationDate="2011-07-12T13:07:52.050" UserId="6588" Text="You can't stop people from reading your JavaScript, so consider that part of the game open-source. Design your game in such a way that seeing that code won't matter. Mostly this is done by only implementing the user interface, visuals, and sounds on the client-side; everything else in the game is done on your server and communicated between the client and server using AJAX techniques.&#xD;&#xA;&#xD;&#xA;This exact same approach applies to Flash games as well, btw." />
  <row Id="33232" PostHistoryTypeId="2" PostId="14761" RevisionGUID="35a2e59c-6178-4beb-87ba-e8424bf72cd4" CreationDate="2011-07-12T14:44:09.770" UserId="8514" Text="All of the best books have already been posted, but there’s one book that I feel is invaluable to a game designer. Your own journal. When you play games, keep a journal nearby and jot down notes. What about the game design did you like? Didn’t like? Did anything really stand out and if so why? Did you disagree with a particular design choice? &#xD;&#xA;&#xD;&#xA;You basically just want to write down everything and anything that comes to mind about the design of the game as you play. Having a journal like this will be invaluable to you when you design your own games. &#xD;&#xA;" />
  <row Id="33233" PostHistoryTypeId="16" PostId="14761" RevisionGUID="89a3a933-86f1-4ad1-b16e-2ebf13d23f7d" CreationDate="2011-07-12T14:44:09.770" UserId="8514" />
  <row Id="33235" PostHistoryTypeId="10" PostId="14758" RevisionGUID="0798930a-2e4e-446a-ad0b-6669b7775d90" CreationDate="2011-07-12T15:26:34.913" UserId="14" CloseReasonId="4" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="33236" PostHistoryTypeId="5" PostId="14754" RevisionGUID="4aba413d-4e23-4231-876e-d14412e742ca" CreationDate="2011-07-12T15:28:10.123" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How do you prevent your JavaScript / HTML5 web game from being copied or altered?](http://gamedev.stackexchange.com/questions/3695/how-do-you-prevent-your-javascript-html5-web-game-from-being-copied-or-altered)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;If a game client is developed in Javascript, the source code can be found in browser. It's dangerous, because it's easy to hack the game, and patent can't be protected. &#xD;&#xA;&#xD;&#xA;Are there any good ways to avoid this, e.g Javascript can be compiled to binary file then browser load and run the compiled javascript?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33237" PostHistoryTypeId="10" PostId="14754" RevisionGUID="5445d712-1bd0-4644-9cd3-1c6bda1ea1f1" CreationDate="2011-07-12T15:28:09.640" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="33238" PostHistoryTypeId="2" PostId="14762" RevisionGUID="8d233ae2-e71a-4285-88d3-9d02ea741942" CreationDate="2011-07-12T15:31:03.037" UserId="8119" Text="Pretty sure every time you change rendertargets the Viewport defaults back to the client. Anyways I wouldn't alter the viewport at all. You don't show us how you create your rendertarget but if its the same size as the viewport you were using just draw everything to the rendertarget and then replace.&#xD;&#xA;&#xD;&#xA;    spriteBatch.Draw(rendertarget, Vector2.Zero, Color.White);&#xD;&#xA;&#xD;&#xA;with&#xD;&#xA;&#xD;&#xA;    spriteBatch.Draw(rendertarget, new Vector2((ScreenWidth - RenderWidth) / 2, 0), Color.White);&#xD;&#xA;&#xD;&#xA;or you can use the source and destination matrices and not have to worry about scaling. &#xD;&#xA;&#xD;&#xA; " />
  <row Id="33239" PostHistoryTypeId="25" PostId="14741" RevisionGUID="93ffe769-22e0-4212-ae4f-c005a91551e9" CreationDate="2011-07-12T15:31:43.603" Comment="http://twitter.com/#!/StackGameDev/status/90805541227606017" />
  <row Id="33240" PostHistoryTypeId="5" PostId="14747" RevisionGUID="d5393dcc-9065-49a0-a9e9-482cd0f3dd6a" CreationDate="2011-07-12T15:49:46.140" UserId="8050" Comment="added 6 characters in body" Text="Let A and B be your vectors:&#xD;&#xA;&#xD;&#xA;![result][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this works only for non-convex angles; you can simply test if your angle is convex and multiply H by -1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/npSkO.gif" />
  <row Id="33241" PostHistoryTypeId="17" PostId="14763" RevisionGUID="0adad1c8-7b87-4e94-a8e4-819b70fd7a76" CreationDate="2011-07-12T16:18:09.210" UserId="-1" Comment="from http://stackoverflow.com/questions/6658336/where-can-i-find-info-for-programming-a-game-to-avoid-network-latency" Text="" />
  <row Id="33242" PostHistoryTypeId="2" PostId="14763" RevisionGUID="7c1540a3-9160-4584-be27-0afbca22e6d9" CreationDate="2011-07-12T00:40:12.197" UserDisplayName="Leonardo Amigoni" Text="I am looking for programming methods to counter network latency for say a racing game or a FPS. What I specifically mean is what would I need to do to the physics engine and what info should I transmit so that the physics engine does it's job when the network info is not available? &#xD;&#xA;&#xD;&#xA;If anyone has any pointer to articles or sites that have this type of info. It would be greatly appreciated. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33243" PostHistoryTypeId="1" PostId="14763" RevisionGUID="7c1540a3-9160-4584-be27-0afbca22e6d9" CreationDate="2011-07-12T00:40:12.197" UserDisplayName="Leonardo Amigoni" Text="Where can I find info for programming a game to avoid network Latency?" />
  <row Id="33244" PostHistoryTypeId="3" PostId="14763" RevisionGUID="7c1540a3-9160-4584-be27-0afbca22e6d9" CreationDate="2011-07-12T00:40:12.197" UserDisplayName="Leonardo Amigoni" Text="&lt;video&gt;" />
  <row Id="33245" PostHistoryTypeId="2" PostId="14764" RevisionGUID="7f4111eb-f431-4061-9f4e-41864f34cb06" CreationDate="2011-07-12T16:49:13.500" UserId="7911" Text="Here's a good place to start: [Gaffer on Games, networking notes][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/networking-for-game-programmers/" />
  <row Id="33246" PostHistoryTypeId="2" PostId="14765" RevisionGUID="f027021a-3146-4158-bd04-dfc89868505b" CreationDate="2011-07-12T17:09:11.547" UserId="8119" Text="More important then network latency, a lot of which is out of you hands, is accurate client side prediction. Especially for a FPS where lag can be a very frustrating handicap. &#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Client-side_prediction" />
  <row Id="33247" PostHistoryTypeId="2" PostId="14766" RevisionGUID="c1a5673e-8b19-4c2c-b51d-a08e2eef315f" CreationDate="2011-07-12T17:09:26.727" UserId="998" Text="Check out &lt;a href=&quot;http://gamepipe.usc.edu/~zyda/courses/ZydaNetworkedGamesFall2005/NetworkedGames.html&quot;&gt;Mike Zyda's&lt;/a&gt; Networked Games course, has MP3 lectures if you like that." />
  <row Id="33248" PostHistoryTypeId="2" PostId="14767" RevisionGUID="90b16a30-571b-41ce-8b64-5ca93979031a" CreationDate="2011-07-12T17:11:14.897" UserId="8556" Text="I'm a programmer and would like to get some perspective on the art / content creation part of game development.&#xD;&#xA;&#xD;&#xA;Comparing a 2D platformer like Super Meat Boy and a high-end game like Crysis 2, what do you think:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- What is harder to do / more likely to cause the project to fail: Art or programming?&#xD;&#xA;&#xD;&#xA;- Which will consume more time and take more people to work on?" />
  <row Id="33249" PostHistoryTypeId="1" PostId="14767" RevisionGUID="90b16a30-571b-41ce-8b64-5ca93979031a" CreationDate="2011-07-12T17:11:14.897" UserId="8556" Text="Game development: Art vs Programming" />
  <row Id="33250" PostHistoryTypeId="3" PostId="14767" RevisionGUID="90b16a30-571b-41ce-8b64-5ca93979031a" CreationDate="2011-07-12T17:11:14.897" UserId="8556" Text="&lt;programming&gt;&lt;art&gt;&lt;planning&gt;" />
  <row Id="33251" PostHistoryTypeId="2" PostId="14768" RevisionGUID="91772e0e-d1d4-49e3-b1c2-2031a520690b" CreationDate="2011-07-12T17:28:59.503" UserId="7911" Text="Have you seen [post mortem discussions][1]?  Any answer will depend on the type of game and you're not going to get any good answer to the &quot;what is harder&quot; question, that's so very subjective.  Plus &quot;fail&quot; is a s&#xD;&#xA;&#xD;&#xA;I don't think that these are answerable questions, all projects carry risk across both those axes and the two examples given are so wildly different any comparison will be manufactured and not a valid observation in my opinion.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamasutra.com/search/?search_text=post%20mortem" />
  <row Id="33252" PostHistoryTypeId="2" PostId="14769" RevisionGUID="83fb02a4-9676-49d7-9771-0adfa4b329f3" CreationDate="2011-07-12T17:33:36.770" UserId="5904" Text="I think you're attacking the question from the wrong angle. What will cause a project to fail is a poor understanding of the field, lack of funding, loss of interest/morale in a team. In other words, given an infinite supply of labor, time, and money, any project of any size can theoretically succeed. If you want to know more about what causes of failures for projects are, then search explicitly for that.&#xD;&#xA;&#xD;&#xA;To narrowly define a game as &quot;Art + Code&quot; and ask which is more important is kind of like asking in the food service industry, &quot;Which is more important in the success of a restaurant, food or spices?&quot; I think you would be better off understanding all of the parts that go into a successful game development + launch and then trying to find points of failure in there.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33253" PostHistoryTypeId="2" PostId="14770" RevisionGUID="3333d21e-50e1-4eff-b501-5fda39f8661d" CreationDate="2011-07-12T18:02:16.247" UserId="8557" Text="I am a newbie with HTML5 Canvas and JavaScript, but is there a simple way to have Isometric projection in HTML5 Canvas element?&#xD;&#xA;&#xD;&#xA;I am mean the true isometric projection - http://en.wikipedia.org/wiki/Isometric_projection&#xD;&#xA;&#xD;&#xA;Thanks all for reply's." />
  <row Id="33254" PostHistoryTypeId="1" PostId="14770" RevisionGUID="3333d21e-50e1-4eff-b501-5fda39f8661d" CreationDate="2011-07-12T18:02:16.247" UserId="8557" Text="True Isometric Projection with HTML5 Canvas" />
  <row Id="33255" PostHistoryTypeId="3" PostId="14770" RevisionGUID="3333d21e-50e1-4eff-b501-5fda39f8661d" CreationDate="2011-07-12T18:02:16.247" UserId="8557" Text="&lt;math&gt;&lt;javascript&gt;&lt;html5&gt;&lt;isometric&gt;&lt;canvas&gt;" />
  <row Id="33256" PostHistoryTypeId="5" PostId="14770" RevisionGUID="2ba2c0b7-8fef-44ff-b942-e0c6fbb9047d" CreationDate="2011-07-12T18:22:16.380" UserId="1386" Comment="corrected spelling" Text="I am a newbie with HTML5 Canvas and JavaScript, but is there a simple way to have Isometric projection in HTML5 Canvas element?&#xD;&#xA;&#xD;&#xA;I am mean the true isometric projection - http://en.wikipedia.org/wiki/Isometric_projection&#xD;&#xA;&#xD;&#xA;Thanks all for replies." />
  <row Id="33257" PostHistoryTypeId="25" PostId="14711" RevisionGUID="f78532e0-2a57-4d49-9a1f-f642b8905541" CreationDate="2011-07-12T18:31:43.933" Comment="http://twitter.com/#!/StackGameDev/status/90850843196260354" />
  <row Id="33258" PostHistoryTypeId="10" PostId="14767" RevisionGUID="c39095cc-d9a0-446d-bc1a-71e9161d562b" CreationDate="2011-07-12T18:38:43.863" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:1101,&quot;DisplayName&quot;:&quot;Kylotan&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33259" PostHistoryTypeId="2" PostId="14771" RevisionGUID="693bca4d-57c8-45e0-978f-ba617ff1b281" CreationDate="2011-07-12T18:55:26.437" UserId="8538" Text="I want to start a new development of a Online 3D Card Game.&#xD;&#xA;&#xD;&#xA;I have alot of expirience in C# .NET and Sockets and everything.&#xD;&#xA;&#xD;&#xA;I started to play with XNA Game Studio, but i found it a mass.&#xD;&#xA;&#xD;&#xA;No Visual Help like in any other Game Engine or like in Windows Forms.&#xD;&#xA;&#xD;&#xA;My question is that, i dont know where and hwo to start on the XNA Game Studio, there are not alot of tutorials on the web, and if there are some they are very old.&#xD;&#xA;&#xD;&#xA;So i thougt of moving to my favorite Workspace, a normal Windows Forms app with a server managed in a Console Application.&#xD;&#xA;&#xD;&#xA;Should i stay with XNA? or go to Windows Form?&#xD;&#xA;&#xD;&#xA;And if i go to Windows Forms, will i be able to use 3D objects there? and use some features from the XNA Framework by importing the librarys ?" />
  <row Id="33260" PostHistoryTypeId="1" PostId="14771" RevisionGUID="693bca4d-57c8-45e0-978f-ba617ff1b281" CreationDate="2011-07-12T18:55:26.437" UserId="8538" Text="Where &amp; How to start?" />
  <row Id="33261" PostHistoryTypeId="3" PostId="14771" RevisionGUID="693bca4d-57c8-45e0-978f-ba617ff1b281" CreationDate="2011-07-12T18:55:26.437" UserId="8538" Text="&lt;xna&gt;&lt;c#&gt;&lt;.net&gt;&lt;online&gt;&lt;card-game&gt;" />
  <row Id="33262" PostHistoryTypeId="5" PostId="14232" RevisionGUID="9b677717-b377-480f-9fbe-e2e711985235" CreationDate="2011-07-12T19:10:52.510" UserId="2061" Comment="deleted 2 characters in body" Text="When you need a single instance of a class throughout your program, we call that class a **service**.  There are several standard methods of implementing services in programs:&#xD;&#xA;&#xD;&#xA;* **Global variables**. These are the easiest to implement, but the worst design.  If you use too many global variables, you will quickly find yourself writing modules that rely on each other too much ([strong-coupling][1]), making the flow of logic very difficult to follow.  Global variables are not multithreading-friendly.  Global variables make tracking the lifetime of objects more difficult, and clutter the namespace.  They are, however, the most performant option, so there are times when they can and should be used, but use them spareingly.&#xD;&#xA;* **Singletons**.  About 10-15 years ago, singletons were *the* big design-pattern to know about.  However, nowadays they are looked down upon.  They are much easier to multi-thread, but you must limit their use to one thread at a time, which is not always what you want.  Tracking lifetimes is just as difficult as with global variables.  &#xD;&#xA;A typical singleton class will look something like this:&#xD;&#xA;&#xD;&#xA;		class MyClass&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			static MyClass* _instance;&#xD;&#xA;			MyClass() {} //private constructor&#xD;&#xA;			&#xD;&#xA;		public:&#xD;&#xA;			static MyClass* getInstance();&#xD;&#xA;			void method();&#xD;&#xA;		};&#xD;&#xA;		&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		MyClass* MyClass::_instance = NULL;&#xD;&#xA;		MyClass* MyClass::getInstance()&#xD;&#xA;		{&#xD;&#xA;			if(_instance == NULL)&#xD;&#xA;				_instance = new MyClass(); //Not thread-safe version&#xD;&#xA;			return _instance;&#xD;&#xA;			&#xD;&#xA;			//Note that _instance is *never* deleted - &#xD;&#xA;			//it exists for the entire lifetime of the program!&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;* **Dependency Injection (DI)**.  This just means passing the service in as a constructor parameter.  A service must already exist in order to pass it into a class, so there's no way for two services to rely on each other; in 98% of the cases, [this is what you want][2] *(and for the other 2%, you can always create a `setWhatever()` method and pass in the service later)*.  Because of this, DI doesn't have the same coupling problems as the other options.  It can be used with multithreading, because each thread can simply have its own instance of every service (and share only those it absolutely needs to).  It also makes code unit-testable, if you care about that.&#xD;&#xA;&#xD;&#xA;    The problem with dependency injection is that it takes up more memory; now every instance of a class needs references to every service it will use.  Also, it gets annoying to use when you have too many services; there are frameworks that mitigate this problem in other languages, but because of C++'s lack of reflection, DI frameworks in C++ tend to be even more work than just doing it manually.&#xD;&#xA;&#xD;&#xA;		//Example of dependency injection&#xD;&#xA;		class Tower&#xD;&#xA;		{&#xD;&#xA;		private:&#xD;&#xA;			MissileCreationService* _missileCreator;&#xD;&#xA;			CreepLocatorService* _creepLocator;&#xD;&#xA;		public:&#xD;&#xA;			Tower(MissileCreationService*, CreepLocatorService*);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		//In order to create a tower, the creating-class must also have instances of&#xD;&#xA;		// MissileCreationService and CreepLocatorService; thus, if we want to &#xD;&#xA;		// add a new service to the Tower constructor, we must add it to the&#xD;&#xA;		// constructor of every class which creates a Tower as well!&#xD;&#xA;		//This is not a problem in languages like C# and Java, where you can use&#xD;&#xA;		// a framework to create an instance and inject automatically.&#xD;&#xA;    *See [this page](https://github.com/ninject/ninject/wiki/Dependency-Injection-By-Hand) (from the documentation for Ninject, a C# DI framework) for another example.*&#xD;&#xA;&#xD;&#xA;    Dependency injection is the usual solution for this problem, and is the answer you will see most highly upvoted to questions like this on StackOverflow.com.  DI is a type of [Inversion of Control][3] (IoC).  &#xD;&#xA;&#xD;&#xA;* **Service Locator**.  Basically, just a class that holds an instance of every service.  You can [do it using reflection](http://www.codinginlondon.com/2009/05/cheap-ioc-in-native-c.html), or you can just add a new instance to it every time you want to create a new service.  You still have the same problem as before - *How do classes access this locator?* - which can be solved in any of the above ways, but now you only need to do it for your `ServiceLocator` class, rather than for dozens of services.  This method is also unit-testable, if you care about that sort of thing.  &#xD;&#xA;&#xD;&#xA;    Service Locators are another form of Inversion of Control (IoC).  Usually, frameworks that do automatic dependency injection will also have a service locator.&#xD;&#xA;&#xD;&#xA;    To read about how the XNA framework (C#) uses services, read [this answer][4].&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, IMHO the towers should not know about the creeps.  Unless you are planning on simply looping over the list of creeps for every tower, you'll probably want to implement some nontrivial [space partitioning](http://en.wikipedia.org/wiki/Nearest_neighbour_search); and that sort of logic doesn't belong in the towers class.&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Circular_dependency&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Inversion_of_Control&#xD;&#xA;[4]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763" />
  <row Id="33263" PostHistoryTypeId="5" PostId="14771" RevisionGUID="c8733356-11dd-4015-98e5-a91c6466f90c" CreationDate="2011-07-12T19:11:16.813" UserId="8538" Comment="added 190 characters in body" Text="I want to start a new development of a Online 3D Card Game.&#xD;&#xA;&#xD;&#xA;I have alot of expirience in C# .NET and Sockets and everything.&#xD;&#xA;&#xD;&#xA;I started to play with XNA Game Studio, but i found it a mass.&#xD;&#xA;&#xD;&#xA;No Visual Help like in any other Game Engine or like in Windows Forms.&#xD;&#xA;&#xD;&#xA;My question is that, i dont know where and hwo to start on the XNA Game Studio, there are not alot of tutorials on the web, and if there are some they are very old.&#xD;&#xA;&#xD;&#xA;So i thougt of moving to my favorite Workspace, a normal Windows Forms app with a server managed in a Console Application.&#xD;&#xA;&#xD;&#xA;Should i stay with XNA? or go to Windows Form?&#xD;&#xA;&#xD;&#xA;And if i go to Windows Forms, will i be able to use 3D objects there? and use some features from the XNA Framework by importing the librarys ? &#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;Lets say my game will be 2D does Windows Forms support a game loop? Does it support Full Screen? Does it gives the option to fully redesign so it wont look like Windows Forms app?" />
  <row Id="33264" PostHistoryTypeId="6" PostId="14770" RevisionGUID="ab965e7c-e04f-4930-aec2-e120b082869d" CreationDate="2011-07-12T19:58:53.683" UserId="8557" Comment="edited tags" Text="&lt;math&gt;&lt;javascript&gt;&lt;html5&gt;&lt;isometric&gt;" />
  <row Id="33265" PostHistoryTypeId="2" PostId="14772" RevisionGUID="112d962d-f3f9-4708-9909-bcde48c25644" CreationDate="2011-07-12T20:44:58.047" UserId="5824" Text="I think you can get the direction to be consistent by treating this as if you're generating a 2D vertex normal. That is:&#xD;&#xA;&#xD;&#xA;1. Take each of the red vectors, swap the x and y components and negate one of them to create the normals.&#xD;&#xA;&#xD;&#xA;2. Normalize them.&#xD;&#xA;&#xD;&#xA;3. Sum those two vectors, and renormalize.&#xD;&#xA;&#xD;&#xA;You'll probably also want to test for the case where the two red lines are overlapping each other - the final renormalization will try to divide by zero there." />
  <row Id="33266" PostHistoryTypeId="2" PostId="14773" RevisionGUID="64b6bcdd-1bb5-4550-a565-3b25868767bb" CreationDate="2011-07-12T20:51:44.070" UserId="8514" Text="There are tons of books that you can find on Amazon to get you started. Just search 'XNA' on Amazon, and grab the first book that interests you. One title I highly recommend is XNA 4.0 Game Development by Example: Beginner's Guide by Kurt Jaegers. He'll walk you through several games step by step, the best way to learn, and most fun, in my opinion. You'll even be able to reuse the code in those examples in your own projects. This will only teach you 2D game development in XNA, however. If you want to do 3D, you'll need to graduate to other books and begin to study 3D math, another major topic that's an absolute must to understand before doing any type of 3D graphics programming.&#xD;&#xA;&#xD;&#xA;I don't know what the design of your &quot;Online 3D Card Game&quot; is, so I don't know what you require. But if it needs to be in 3D, and more complex than images in a PictureBox object, I'd seriously do it in XNA. WinForms would not be the proper environment to fulfill your game design. If you decide to do completely 2D, then yes, WinForms can support a game loop, if you code one. At its core, a WinForm application is nothing more than an empty Window." />
  <row Id="33268" PostHistoryTypeId="25" PostId="14770" RevisionGUID="16cd366f-b33c-49bf-97a9-2abfc92fe401" CreationDate="2011-07-12T21:31:44.440" Comment="http://twitter.com/#!/StackGameDev/status/90896143227166721" />
  <row Id="33269" PostHistoryTypeId="2" PostId="14775" RevisionGUID="06855f45-ffdc-4fe9-af1c-95b7a3c21e80" CreationDate="2011-07-12T21:47:42.993" UserId="744" Text="One of the properties of an isometric projection (and all axonometric projections) is that objects in the distance do not grow smaller.&#xD;&#xA;&#xD;&#xA;Therefore, trivially, HTML5 supports isometric projections because you can just draw all your art assets that way, and overlay them to create the depth." />
  <row Id="33270" PostHistoryTypeId="5" PostId="13995" RevisionGUID="dd14d28a-bf66-4888-b71d-fd4df2a4f7a2" CreationDate="2011-07-12T23:07:17.103" UserId="8170" Comment="added 67 characters in body" Text="I am looking for a server technology that supports AMF (because I plan on using an as3/flash front end).&#xD;&#xA;&#xD;&#xA;I would like to develop game logic / simulations that run on the server.  Small number of users and logic at first, but that will grow.&#xD;&#xA;&#xD;&#xA;I might use this for some simple turn based / simple tests, but I am hoping this will also support some tougher real time (RTS) or even MMO style games and simulations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So far I have been looking at (in order of what I think is most promising so far):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;WebORB - Looks the most promising so far, appears to be well supported and developed, lots of features, yet sells itself as easy.  Looks like they have a community open source/free version&#xD;&#xA;&#xD;&#xA;Cubeia Firebase - Looks really good, only thing that worries me is their statement that it does not work well for real time style games, but is ideal for turn-based.  It might be ok for now, but what if I need to scale the game up?   Open Source/Free&#xD;&#xA;&#xD;&#xA;BlazeDS - Looks promising, supported by adobe, I should be able to develop game logic in the BlazeDS server and has amf support.   Open Source/Free&#xD;&#xA;&#xD;&#xA;Red5 - No release since 2010, some activity though. (has amf)  Open Source/Free - however have not been able to locate any good 'game' examples / tutorials.&#xD;&#xA;&#xD;&#xA;FlashMOG - looks interesting, but I am not sure if it is robust enough to act as an actual game server with continuously running logic.  No release since 2010,  Uses PHP as a socket server.  Open Source/Free&#xD;&#xA;&#xD;&#xA;RedDwarf (used to be SGS/Project Darkstar) -- no release since 2010, is this active?  Has AS3 library, but it is out of date too?  Open Source/Free&#xD;&#xA;&#xD;&#xA;Cirrus,&#xD;&#xA;Wowza,&#xD;&#xA;FMS - these are more of a media server?&#xD;&#xA;&#xD;&#xA;SmartFox,&#xD;&#xA;Electroserver - these are nice, but are not open source/free.  I believe they have limited connection versions available and while I am hoping to scale my project above those limitations I do not expect to be drawing an income to pay for the licenses at that point&#xD;&#xA;&#xD;&#xA;LCDS (live cycle data services) - similar to blazeDS, not free&#xD;&#xA;&#xD;&#xA;Any other options or clarifications??" />
  <row Id="33271" PostHistoryTypeId="2" PostId="14776" RevisionGUID="750e4b15-d9e1-49e0-aa59-0f22e9738e47" CreationDate="2011-07-12T23:40:09.250" UserId="2061" Text="To make a game like an RTS networked, I've seen a number of answers here suggest to make the game completely deterministic; then you only have to transfer the users' actions to each other, and lag what's displayed a little bit in order to &quot;lock in&quot; everyone's input before the next frame is rendered.  Then things like unit's positions, health, etc. don't need to be constantly updated over the network, because every player's simulation will be exactly the same.  I've also heard the same thing suggested for making replays.&#xD;&#xA;&#xD;&#xA;However, since [floating-point calculations are non-deterministic][1] between machines, or even between different compilations of the same program on the same machine, is this really possible to do?  How do we prevent that fact from causing small differences between players (or replays) that [ripple throughout the game][2]?&#xD;&#xA;&#xD;&#xA;I've heard some people suggest avoiding floating-point numbers altogether and using `int` to represent the quotient of a fraction, but that doesn't sound practical to me - what if I need to, for example, take the cosine of an angle?  Do I seriously need to rewrite an entire math library?&#xD;&#xA;&#xD;&#xA;Note that I am mainly interested in C#, which as far as I can tell, has exactly the same problems as C++ in this regard.&#xD;&#xA;&#xD;&#xA;[1]: http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Butterfly_effect" />
  <row Id="33272" PostHistoryTypeId="1" PostId="14776" RevisionGUID="750e4b15-d9e1-49e0-aa59-0f22e9738e47" CreationDate="2011-07-12T23:40:09.250" UserId="2061" Text="How are deterministic games possible in the face of floating-point non-determinism?" />
  <row Id="33273" PostHistoryTypeId="3" PostId="14776" RevisionGUID="750e4b15-d9e1-49e0-aa59-0f22e9738e47" CreationDate="2011-07-12T23:40:09.250" UserId="2061" Text="&lt;c++&gt;&lt;c#&gt;&lt;network&gt;&lt;replays&gt;&lt;floating-point&gt;" />
  <row Id="33274" PostHistoryTypeId="25" PostId="14776" RevisionGUID="2050797b-94fd-4a3d-b9d5-ffec2a823711" CreationDate="2011-07-13T00:31:45.240" Comment="http://twitter.com/#!/StackGameDev/status/90941443555852288" />
  <row Id="33275" PostHistoryTypeId="2" PostId="14777" RevisionGUID="4a7ab6f3-9378-430a-8f17-cd8d0c208087" CreationDate="2011-07-13T01:13:37.793" UserId="3354" Text="![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes [more like an L then a square] as well as larger then the 40x40px that my current tiles are).&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I have also attached the tile sheet I am using for the tiles to show you what the corners and tops look like compared to the rest of the tiles.&#xD;&#xA;&#xD;&#xA;What I’m thinking is I might be able to just draw them using the same array I have if I use the tiles width and height instead of a set WxH? I dont know how well this will work, but were the blocks that will have different values will be blocks the player/NPCs can’t step on then it may not be an issue, again I’m not even sure if that is a viable solution.&#xD;&#xA;&#xD;&#xA;My code in case you want to see how I'm currently handling it: [Map.java][3] (pastebin)&#xD;&#xA;&#xD;&#xA;tl;dr - how can I take take my 2d looking tile map and change it to have different size tiles? or is there a better way to do what I am trying to do? Is there a name of a method that I should be looking for while googling?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RaT2P.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/rJOOb.jpg&#xD;&#xA;  [3]: http://pastebin.com/Q0BSATuG" />
  <row Id="33276" PostHistoryTypeId="1" PostId="14777" RevisionGUID="4a7ab6f3-9378-430a-8f17-cd8d0c208087" CreationDate="2011-07-13T01:13:37.793" UserId="3354" Text="How do you handle uneven tiles while rendering a tile map on a grid based map? [hard to explain in a few words]" />
  <row Id="33277" PostHistoryTypeId="3" PostId="14777" RevisionGUID="4a7ab6f3-9378-430a-8f17-cd8d0c208087" CreationDate="2011-07-13T01:13:37.793" UserId="3354" Text="&lt;2d&gt;&lt;java&gt;&lt;tiles&gt;&lt;maps&gt;" />
  <row Id="33278" PostHistoryTypeId="5" PostId="14777" RevisionGUID="53c47140-8594-427d-ab55-eddd712a68dc" CreationDate="2011-07-13T01:18:57.663" UserId="3354" Comment="fixed a misleading typing error." Text="![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes [more like an L then a square] as well as larger then the 40x40px that my current tiles are).&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I have also attached the tile sheet I am using for the tiles to show you what the corners and tops look like compared to the rest of the tiles.&#xD;&#xA;&#xD;&#xA;What I’m thinking is I might be able to just draw them using the same array I have if I use the tiles width and height instead of a set WxH? I dont know how well this will work, but were the blocks that will have different values will be blocks the player/NPCs can’t step on then it may not be an issue, again I’m not even sure if that is a viable solution.&#xD;&#xA;&#xD;&#xA;My code in case you want to see how I'm currently handling it: [Map.java][3] (pastebin)&#xD;&#xA;(edit:im not handling it, meant how I'm currently doing the map)&#xD;&#xA;&#xD;&#xA;tl;dr - how can I take take my 2d looking tile map and change it to have different size tiles? or is there a better way to do what I am trying to do? Is there a name of a method that I should be looking for while googling?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RaT2P.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/rJOOb.jpg&#xD;&#xA;  [3]: http://pastebin.com/Q0BSATuG" />
  <row Id="33279" PostHistoryTypeId="2" PostId="14778" RevisionGUID="f20e32c8-ad5b-4f8e-8e66-2f50b880008a" CreationDate="2011-07-13T01:19:40.777" UserId="545" Text="You make them deterministic.  For a great example, see [Dungeon Siege GDC Presentation][1] as to how they made the locations in the world networkable.&#xD;&#xA;&#xD;&#xA;Also remember that determinism applies to 'random' events as well!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://scottbilas.com/files/2003/gdc_san_jose/continuous_world_paper.pdf" />
  <row Id="33280" PostHistoryTypeId="2" PostId="14779" RevisionGUID="b217177a-9636-4594-be4e-4ebf76bb1e7f" CreationDate="2011-07-13T01:40:27.003" UserId="962" Text="The answer to this question is from the link you posted. Specifically you should read the quote from Gas Powered Games:&#xD;&#xA;&#xD;&#xA;&gt; I work at Gas Powered Games and i can tell you first hand that&#xD;&#xA;&gt; floating point math is deterministic. You just need the same&#xD;&#xA;&gt; instruction set and compiler and of course the user’s processor&#xD;&#xA;&gt; adheres to the IEEE754 standard, which includes all of our PC and 360&#xD;&#xA;&gt; customers. The engine that runs DemiGod, Supreme Commander 1 and 2&#xD;&#xA;&gt; rely upon the IEEE754 standard. Not to mention probably all other RTS&#xD;&#xA;&gt; peer to peer games in the market.&#xD;&#xA;&#xD;&#xA;And then below that one is this:&#xD;&#xA;&#xD;&#xA;&gt; If you store replays as controller inputs, they cannot be played back&#xD;&#xA;&gt; on machines with different CPU architectures, compilers, or&#xD;&#xA;&gt; optimization settings. In MotoGP, this meant we could not share saved&#xD;&#xA;&gt; replays between Xbox and PC.&#xD;&#xA;&#xD;&#xA;**A deterministic game will only be deterministic when using the identically compiled files and run on systems that adhere to the IEEE standards. Cross platform synchronized network simulations or replays will not possible.**" />
  <row Id="33281" PostHistoryTypeId="4" PostId="14777" RevisionGUID="28ee06f5-9de3-4961-9e70-8d1de0c4324a" CreationDate="2011-07-13T01:56:23.793" UserId="3354" Comment="edited title" Text="How do you handle uneven tiles while rendering a tile map?" />
  <row Id="33282" PostHistoryTypeId="17" PostId="14780" RevisionGUID="9c4e93e7-c8e6-4c43-aeae-34502f7f0e58" CreationDate="2011-07-13T02:07:31.427" UserId="-1" Comment="from http://stackoverflow.com/questions/6634332/3d-rotation-math-code-for-plane" Text="" />
  <row Id="33283" PostHistoryTypeId="2" PostId="14780" RevisionGUID="7442a1e6-fb9b-4734-a41b-866818a39fd4" CreationDate="2011-07-09T11:01:59.740" UserDisplayName="Dave" Text="I am making a simple 3D game with plane in space.&#xD;&#xA;With c++ (win32).&#xD;&#xA;But the plane rotation is not realistic.&#xD;&#xA;The code I am using for the rotation is the following:&#xD;&#xA;&#xD;&#xA;    point3D AxisRotation(point3D point,point3D Rotation){&#xD;&#xA;	float sx = Sin(Rotation.x*PI/180);&#xD;&#xA;	float cx = Cos(Rotation.x*PI/180);&#xD;&#xA;	float sy = Sin(Rotation.y*PI/180);&#xD;&#xA;	float cy = Cos(Rotation.y*PI/180);&#xD;&#xA;	float sz = Sin(Rotation.z*PI/180);&#xD;&#xA;	float cz = Cos(Rotation.z*PI/180);&#xD;&#xA;	float xy,xz, yx,yz, zx,zy;&#xD;&#xA;	xy = cx*point.y - sx*point.z;&#xD;&#xA;	xz = sx*point.y + cx*point.z;&#xD;&#xA;	yz = cy*xz - sy*point.x;&#xD;&#xA;	yx = sy*xz + cy*point.x;&#xD;&#xA;	zx = cz*yx - sz*xy;&#xD;&#xA;	zy = sz*yx + cz*xy;&#xD;&#xA;	point.x = zx;&#xD;&#xA;	point.y = zy;&#xD;&#xA;	point.z = yz;&#xD;&#xA;	return point;}&#xD;&#xA;&#xD;&#xA;The axis of the rotation needs to be (Roll,Yaw,Pitch).&#xD;&#xA;Does anyone know the code or the math for it ?&#xD;&#xA;Thank you. Dave" />
  <row Id="33284" PostHistoryTypeId="1" PostId="14780" RevisionGUID="7442a1e6-fb9b-4734-a41b-866818a39fd4" CreationDate="2011-07-09T11:01:59.740" UserDisplayName="Dave" Text="3D rotation math/code for plane" />
  <row Id="33285" PostHistoryTypeId="3" PostId="14780" RevisionGUID="7442a1e6-fb9b-4734-a41b-866818a39fd4" CreationDate="2011-07-09T11:01:59.740" UserDisplayName="Dave" Text="&lt;c++&gt;&lt;winapi&gt;&lt;math&gt;" />
  <row Id="33286" PostHistoryTypeId="2" PostId="14781" RevisionGUID="8eae3f63-990b-4bcc-a3a4-7916bfb59289" CreationDate="2011-07-13T02:19:04.463" UserId="8320" Text="You could always fall back on [fixed point][1] arithmetic. Someone (making an rts, no less) has already done the leg work on [stackoverflow][2].&#xD;&#xA;&#xD;&#xA;You will pay a performance penalty, but this may or may not be a problem, as .net will not be especially performant here as it won't use simd instructions. Benchmark!&#xD;&#xA;&#xD;&#xA;N.B. Apparently someone at [intel][3] appears to have a solution to allow you to use the intel performance primitives library from c#. This may help vectorising fixed point code to compensate for the slower performance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://secure.wikimedia.org/wikipedia/en/wiki/Fixed-point_arithmetic&#xD;&#xA;  [2]: http://stackoverflow.com/q/605124/98313&#xD;&#xA;  [3]: http://software.intel.com/en-us/blogs/2010/12/15/intel-performance-libraries-allow-you-to-leverage-both-parallelism-and-simd-instructions-in-c/" />
  <row Id="33287" PostHistoryTypeId="2" PostId="14782" RevisionGUID="521ff02d-91b8-4a87-a858-a6af36ab181a" CreationDate="2011-07-13T02:56:35.390" UserId="7911" Text="Slice and dice your odd sized tiles to fit the standard dimensions.  The whole point of a tile map is that you get a lot of speed and utility by same-sizing everything." />
  <row Id="33288" PostHistoryTypeId="2" PostId="14783" RevisionGUID="5901cefd-49df-4c7c-b3fa-9cf2357932ab" CreationDate="2011-07-13T03:00:53.590" UserId="8240" Text="&gt;Note that I am mainly interested in C#, which as far as I can tell, has exactly the same problems as C++ in this regard.&#xD;&#xA;&#xD;&#xA;Yes, C# has the same problems as C++. But it also has a lot more.&#xD;&#xA;&#xD;&#xA;For example, take this statement from Shawn Hawgraves:&#xD;&#xA;&#xD;&#xA;&gt; If you store replays as controller inputs, they cannot be played back on machines with different CPU architectures, compilers, or optimization settings.&#xD;&#xA;&#xD;&#xA;It's &quot;easy enough&quot; to ensure that this happens in C++. In **C#**, however, that's going to be a lot harder to deal with. This is thanks to JIT.&#xD;&#xA;&#xD;&#xA;What do you suppose would happen if the interpreter ran your code interpreted once, but then JIT'd it the second time? Or maybe it interprets it twice on someone else's machine, but JIT's it after that?&#xD;&#xA;&#xD;&#xA;JIT is not deterministic, because you have very little control over it. This is one of the things you give up to use the CLR.&#xD;&#xA;&#xD;&#xA;And God help you if one person is using .NET 4.0 to run your game, while someone else is using the Mono CLR (using the .NET libraries of course). Even .NET 4.0 vs. .NET 5.0 could be different. You simply need more control over the low-level details of a platform to *guarantee* this kind of thing.&#xD;&#xA;&#xD;&#xA;You ought to be able to get away with fixed-point math. But that's about it. And even then, it would be easier to write in C++, since you have operator overloading and such to make the code cleaner." />
  <row Id="33289" PostHistoryTypeId="2" PostId="14784" RevisionGUID="397d66b9-47c3-47f0-bb06-f857e2815c87" CreationDate="2011-07-13T03:01:00.563" UserId="7728" Text="There are two standard ways of doing this.&#xD;&#xA;&#xD;&#xA; - Break up your non-standard tile sizes into standard tile sizes.  So those strips of walls become a &quot;stack&quot; of square tiles that you just know to place together in your level editor.  Games like the early Final Fantasy games worked this way.&#xD;&#xA; - Let any tile piece be taller than your standard tile height.  Align&#xD;&#xA;   tiles to the bottom of your tile rectangle, allowing any extra to&#xD;&#xA;   draw higher than the usual tile height.  When drawing your map, you&#xD;&#xA;   draw tiles starting from the back (the tile squares higher on the&#xD;&#xA;   screen), and ending with the bottom tiles (the ones at the bottom of&#xD;&#xA;   the screen).  This ensures that tall tiles in the foreground are&#xD;&#xA;   properly overlayed on top of tiles in the background.  Note that in&#xD;&#xA;   this approach, your tiles are still limited to a single tile in&#xD;&#xA;   width.&#xD;&#xA;&#xD;&#xA;You can do either or both of these approaches.  Even games which do the &quot;break up into stacks of tiles&quot; approach will often allow some objects (trees, etc) to break the tile height limits, and just enforce a top-to-bottom map draw ordering in order to make sure everything layers correctly." />
  <row Id="33290" PostHistoryTypeId="25" PostId="14777" RevisionGUID="228f93aa-2922-415f-a085-37ecfe7bd5dc" CreationDate="2011-07-13T03:31:45.580" Comment="http://twitter.com/#!/StackGameDev/status/90986745759416320" />
  <row Id="33291" PostHistoryTypeId="2" PostId="14785" RevisionGUID="1ae22fd5-fd4e-4389-b101-ff86febba761" CreationDate="2011-07-13T03:37:53.593" UserId="8561" Text="What's the best way to implement a detail feature, like a road, on a heightmap-based terrain?&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/bM8Rh.jpg" />
  <row Id="33292" PostHistoryTypeId="1" PostId="14785" RevisionGUID="1ae22fd5-fd4e-4389-b101-ff86febba761" CreationDate="2011-07-13T03:37:53.593" UserId="8561" Text="Heightmap-based Terrain with a Road" />
  <row Id="33293" PostHistoryTypeId="3" PostId="14785" RevisionGUID="1ae22fd5-fd4e-4389-b101-ff86febba761" CreationDate="2011-07-13T03:37:53.593" UserId="8561" Text="&lt;terrain&gt;&lt;heightmap&gt;" />
  <row Id="33294" PostHistoryTypeId="2" PostId="14786" RevisionGUID="edda330b-aa88-4f81-bd42-41721fe485ff" CreationDate="2011-07-13T03:40:41.437" UserId="7715" Text="I want to be able to achieve spell effects that cause a fragmenting/discoloring effect on the sprite. The first couple seconds of this video http://www.youtube.com/watch?v=HNCFh7mkvuc shows what I mean. When the enemy gets hit by an electric attack, the effect I'd like to achieve activates (in yellow).&#xD;&#xA;&#xD;&#xA;I'll have to use shaders to do this (if I don't, other, practical ways to do it would be extremely helpful). I have no idea where to start with a shader like this (beyond the obvious - using time and base color as parameters), and was curious if someone had something similar I could use as a base, or had a good idea where to start. I know the basic of glsl, but was hoping to spare myself some pain if someone has something like this already or could provide a starting point.&#xD;&#xA;&#xD;&#xA;Any help would be appreciated,&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;&#xD;&#xA;Just to clarify, I'm looking to apply this against a 2D texture in OpenGL using glsl shaders" />
  <row Id="33295" PostHistoryTypeId="1" PostId="14786" RevisionGUID="edda330b-aa88-4f81-bd42-41721fe485ff" CreationDate="2011-07-13T03:40:41.437" UserId="7715" Text="Spell Effects/Shaders" />
  <row Id="33296" PostHistoryTypeId="3" PostId="14786" RevisionGUID="edda330b-aa88-4f81-bd42-41721fe485ff" CreationDate="2011-07-13T03:40:41.437" UserId="7715" Text="&lt;c++&gt;&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;graphic-effects&gt;" />
  <row Id="33297" PostHistoryTypeId="5" PostId="14783" RevisionGUID="4a091390-902c-40d0-a640-b0a58a6dabb1" CreationDate="2011-07-13T04:13:28.137" UserId="8240" Comment="Correction, as noted by comment." Text="&gt;Note that I am mainly interested in C#, which as far as I can tell, has exactly the same problems as C++ in this regard.&#xD;&#xA;&#xD;&#xA;Yes, C# has the same problems as C++. But it also has a lot more.&#xD;&#xA;&#xD;&#xA;For example, take this statement from Shawn Hawgraves:&#xD;&#xA;&#xD;&#xA;&gt; If you store replays as controller inputs, they cannot be played back on machines with different CPU architectures, compilers, or optimization settings.&#xD;&#xA;&#xD;&#xA;It's &quot;easy enough&quot; to ensure that this happens in C++. In **C#**, however, that's going to be a lot harder to deal with. This is thanks to JIT.&#xD;&#xA;&#xD;&#xA;What do you suppose would happen if the interpreter ran your code interpreted once, but then JIT'd it the second time? Or maybe it interprets it twice on someone else's machine, but JIT's it after that?&#xD;&#xA;&#xD;&#xA;JIT is not deterministic, because you have very little control over it. This is one of the things you give up to use the CLR.&#xD;&#xA;&#xD;&#xA;And God help you if one person is using .NET 4.0 to run your game, while someone else is using the Mono CLR (using the .NET libraries of course). Even .NET 4.0 vs. .NET 5.0 could be different. You simply need more control over the low-level details of a platform to *guarantee* this kind of thing.&#xD;&#xA;&#xD;&#xA;You ought to be able to get away with fixed-point math. But that's about it." />
  <row Id="33298" PostHistoryTypeId="2" PostId="14787" RevisionGUID="26f431fe-a7a2-47bf-91ce-8ff26c531493" CreationDate="2011-07-13T04:52:23.233" UserId="2710" Text="Use fixed point arithmetics. Or choose an authoritative server and have it sync game state once in a while - that's what MMORTS do. (At least, Elements of War works like this. It's written in C# too.) This way, errors do not have a chance to accumulate. " />
  <row Id="33299" PostHistoryTypeId="25" PostId="14785" RevisionGUID="9821dc3b-ba20-4528-96fb-569cd9bd2041" CreationDate="2011-07-13T06:31:46.927" Comment="http://twitter.com/#!/StackGameDev/status/91032049007345664" />
  <row Id="33300" PostHistoryTypeId="2" PostId="14788" RevisionGUID="81f8ce6f-1a83-4319-b191-672a85deb7e8" CreationDate="2011-07-13T06:40:46.020" UserId="962" Text="That effect is 2D frame by frame pixel art.&#xD;&#xA;&#xD;&#xA;You could achieve something similar but I do not think it will be possible emulate that exact effect without doing it manually in a raster art program." />
  <row Id="33301" PostHistoryTypeId="2" PostId="14789" RevisionGUID="123a6bce-3b83-4d12-a70e-c482a18aa7c0" CreationDate="2011-07-13T07:18:35.567" UserId="4894" Text="What is great with images is that they usually embed up to 4 channels (red, green, blue and alpha). As an height map needs only one dimension, you could just use the red channel to store the height informations (you still have 256 levels for the height), and then use other channels for other purposes (like using the green channel to map the roads, blue channel for water / moisture) etc... &#xD;&#xA;&#xD;&#xA;Like this you could make sure that when you're building your terrain, the zones where a road should be built will appear flat instead of following the height gradient. " />
  <row Id="33302" PostHistoryTypeId="2" PostId="14790" RevisionGUID="56cb959a-97bf-48cd-94ed-f5a415c2ab9c" CreationDate="2011-07-13T07:33:19.407" UserId="7640" Text="i'm wondering if there's any 2D AI source code or engines out there. I'm inspired by  the [Euphoria engine][1], and want to use whatever is already out there to make something like it in 2D, where the characters can move left and right, and attempt to self-preserve themselves. The only new feature i would want to add on is ability to *learn from common results after an action.*&#xD;&#xA;&#xD;&#xA;I'm thinking the way it would work is you attach some AI to a character, and it determines movement/detection based on the number of arms, legs, and other movement-related body parts. &#xD;&#xA;&#xD;&#xA;*anything relating to AI would probablly be helpful:*&#xD;&#xA;&#xD;&#xA;**How do you guys suggest i get started? *(Btw: i'm using box2D/ SFML at the moment)***&#xD;&#xA;&#xD;&#xA;oh yeah and preferably open source =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.naturalmotion.com/euphoria" />
  <row Id="33303" PostHistoryTypeId="1" PostId="14790" RevisionGUID="56cb959a-97bf-48cd-94ed-f5a415c2ab9c" CreationDate="2011-07-13T07:33:19.407" UserId="7640" Text="2D AI Engines/ Resources?" />
  <row Id="33304" PostHistoryTypeId="3" PostId="14790" RevisionGUID="56cb959a-97bf-48cd-94ed-f5a415c2ab9c" CreationDate="2011-07-13T07:33:19.407" UserId="7640" Text="&lt;c++&gt;&lt;2d&gt;&lt;architecture&gt;&lt;ai&gt;&lt;box2d&gt;" />
  <row Id="33305" PostHistoryTypeId="5" PostId="14790" RevisionGUID="9044a38e-ab06-4ea2-af67-0e5a50580245" CreationDate="2011-07-13T07:38:19.420" UserId="7640" Comment="added 46 characters in body" Text="i'm wondering if there's any 2D AI source code or engines out there. I'm inspired by  the [Euphoria engine][1], and want to use whatever is already out there to make something like it in 2D, where the characters can move left and right, and attempt to preserve themselves. The only new feature i would want to add on is ability to *learn from common results after an action.*&#xD;&#xA;&#xD;&#xA;I'm thinking the way it would work is you attach some AI to a character, and it determines movement/detection based on the number of arms, legs, joints, restrictions, and other movement-related body parts. &#xD;&#xA;&#xD;&#xA;*anything relating to AI would probablly be helpful as i've never worked with it:*&#xD;&#xA;&#xD;&#xA;**How do you guys suggest i get started? *(Btw: i'm using box2D/ SFML at the moment)***&#xD;&#xA;&#xD;&#xA;oh yeah and preferably open source =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.naturalmotion.com/euphoria" />
  <row Id="33306" PostHistoryTypeId="2" PostId="14791" RevisionGUID="decf6e9d-a7dd-4b11-8a3f-64dc2d37cb56" CreationDate="2011-07-13T07:56:12.013" UserId="6877" Text="Its not exactly AI you should be looking for. Its (Human) Motion Synthesis.&#xD;&#xA;&#xD;&#xA;Euphoria is the only product is the market that can do so. Googling, bring up some research result, but they are 3d. So, for 2d I think writing one might be the only solution.&#xD;&#xA;" />
  <row Id="33307" PostHistoryTypeId="2" PostId="14792" RevisionGUID="d64da570-920c-4715-8c37-0f3826818fd7" CreationDate="2011-07-13T08:31:50.527" UserId="4894" Text="An old trick is to use color indexed images and cycling the color table for some pixels (this gives pretty good animations, you can see an example [here][1] and it's explained [there][2].&#xD;&#xA;&#xD;&#xA;Using the same idea, you could use simple hue shift or even color mapping in a shader. &#xD;&#xA;&#xD;&#xA;Of course to have more control on the graphic output, i'd suggest an animated sprite (ie : making an image sequence for your effect). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://www.effectgames.com/effect/article.psp.html/joe/Old_School_Color_Cycling_with_HTML5&#xD;&#xA;[2]: http://www.effectgames.com/demos/canvascycle/" />
  <row Id="33308" PostHistoryTypeId="2" PostId="14793" RevisionGUID="7af7a6b2-2def-4c7a-958b-152afe0ec4ef" CreationDate="2011-07-13T09:04:02.667" UserId="7588" Text="Looking at the animation, the enemy seems to flash straight to yellow, and it king of 'melts' downwards over time. If you look, the darker and lighter parts of the sprite are inversed during the fade.&#xD;&#xA;&#xD;&#xA;I would personally use a shader with the base colour and the time as uniforms.&#xD;&#xA;&#xD;&#xA;To tint the sprites colour to yellow, you can first convert it to grayscale :&#xD;&#xA;&#xD;&#xA;    grayscale = (0.299*red + 0.587*green + 0.114*blue)&#xD;&#xA;&#xD;&#xA;Then simply multiply it by your input colour; here, yellow.&#xD;&#xA;&#xD;&#xA;For the fade over time, you could try saturating the grayscale by multiplying it by a base colour over time, say gray, and don't clamp it, make it loop. You could add an effect from 'top to bottom' by also multiplying by `time * uv.y`.&#xD;&#xA;&#xD;&#xA;You could make this more interesting by using a smoothed perlin noise texture to add randomness.&#xD;&#xA;&#xD;&#xA;This is just a quick idea, so I don't know what it would really look like.&#xD;&#xA;&#xD;&#xA;I would prefer using shaders that changing the palette (even though that's a great idea) because it is more suitable to an effect that is useable on different enemies, each with their own palette." />
  <row Id="33310" PostHistoryTypeId="25" PostId="14786" RevisionGUID="0efbb61f-78f7-4683-9784-f8427c601e4b" CreationDate="2011-07-13T09:31:48.353" Comment="http://twitter.com/#!/StackGameDev/status/91077352708243456" />
  <row Id="33311" PostHistoryTypeId="2" PostId="14795" RevisionGUID="c3ddded7-87d9-40b8-a480-09af435dedce" CreationDate="2011-07-13T09:44:13.787" UserId="8455" Text="I've created something like it in 3d. Youtube movie is at http://www.youtube.com/watch?v=-j442OTfSmM . The trick behind this is to apply a selected color from a gradient to your object, moving through the gradient based on location and time. In other words, if the effect starts from the top, you use the color from the end of the effect at the top and the start of the effect at the bottom to make it appear as if it's going down. You also add a little bit of perlin noise based on the local x/y/z coordinate to get a slightly more perturbed effect - makes it look less synthetic. All three effects are in fact the very same effect routine, just different locations, speeds, gradients and so on.&#xD;&#xA;&#xD;&#xA;I can post the code online tonight (in 8 hours or so) if it would help you. It does look a lot better on 3d models as they have depth information, making the effect look like it's not a flat moving image :-). " />
  <row Id="33313" PostHistoryTypeId="5" PostId="14791" RevisionGUID="647cbff8-7f1c-40dd-9088-65d2639c3fe9" CreationDate="2011-07-13T10:57:20.140" UserId="6877" Comment="added 5 characters in body" Text="Its not exactly AI you should be looking for. Its (Human) Motion Synthesis.&#xD;&#xA;&#xD;&#xA;Euphoria is the only product is the market that can do so. Googling, bring up some research result, but they are 3d. So, for 2d I think writing your own might be the only solution.&#xD;&#xA;" />
  <row Id="33314" PostHistoryTypeId="2" PostId="14796" RevisionGUID="813c5427-e736-4df7-a37c-22cd5d7ad52e" CreationDate="2011-07-13T11:40:24.217" UserId="7588" Text="What it seems you want is completely procedural character locomotion, I doubt very much that this exists in free-interwebs space.&#xD;&#xA;&#xD;&#xA;In games like Spore, the locomotion is partially procedural, this means that you already need base data to say what kind of movement each limb can produce, etc. You could really take this as far as you want, the easiest is to start with saying that a character uses his legs for walking, and go from there.&#xD;&#xA;&#xD;&#xA;[Ken Perlin](http://cs.nyu.edu/~perlin/) does research on actor movement and expression.&#xD;&#xA;&#xD;&#xA;Here is a semi-procedural (3D) walking in Unity :&#xD;&#xA;http://runevision.com/thesis/&#xD;&#xA;&#xD;&#xA;And a 2D version :&#xD;&#xA;http://blenderartists.org/forum/showthread.php?217356-Procedural-Bipedal-Locomotion-Animation-System&#xD;&#xA;&#xD;&#xA;As you can see, the aim is adaptability to a terrain and both use a basic knowledge of how a person walks. The Euphoria engine works in pretty much the same way; simply put it's a mix between ragdoll physics and animations.&#xD;&#xA;&#xD;&#xA;On the other end of the spectrum, you could give a creature limbs that can move in a certain way, and let physics show what the end result is.&#xD;&#xA;&#xD;&#xA;The hardest part would be to let your creature learn from his mistakes, typically using a Neuronal Network, so it can learn how to walk faster, with more stability, etc." />
  <row Id="33315" PostHistoryTypeId="2" PostId="14797" RevisionGUID="08a627a0-9ac7-475c-a4e0-0e28d4c7f9fc" CreationDate="2011-07-13T11:54:02.683" UserId="8565" Text="[Unity][1] is also an idea. You can script in C#, JavaScript or Boo so it would be that much easier to code in it since you already have some XNA experience. It's not free, though.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.unity3d.com" />
  <row Id="33317" PostHistoryTypeId="2" PostId="14799" RevisionGUID="62c9e320-275a-4918-ab4d-722dd3802385" CreationDate="2011-07-13T12:19:54.727" UserId="3042" Text="I have an object, and i want to interpolate its position between two points over a given time period; but i dont want it to be a linear interpolation. I'm not sure if i'm phrasing this right.&#xD;&#xA;&#xD;&#xA;    vector posA; // Where we start&#xD;&#xA;    vector posB; // Where we end&#xD;&#xA;    float timeI; // An interval from 0 - 1&#xD;&#xA;&#xD;&#xA;normally i would just do it linearly&#xD;&#xA;&#xD;&#xA;    vector currentPos = posA  + (posB - posA) * timeI&#xD;&#xA;&#xD;&#xA;but i want the object to either:&#xD;&#xA;&#xD;&#xA; - a) move faster at the start and slower at the end&#xD;&#xA; - b) move slower at the start and faster at the end&#xD;&#xA;&#xD;&#xA;Can anybody point me in the right direction" />
  <row Id="33318" PostHistoryTypeId="1" PostId="14799" RevisionGUID="62c9e320-275a-4918-ab4d-722dd3802385" CreationDate="2011-07-13T12:19:54.727" UserId="3042" Text="non-linear interpolation" />
  <row Id="33319" PostHistoryTypeId="3" PostId="14799" RevisionGUID="62c9e320-275a-4918-ab4d-722dd3802385" CreationDate="2011-07-13T12:19:54.727" UserId="3042" Text="&lt;math&gt;&lt;interpolation&gt;" />
  <row Id="33320" PostHistoryTypeId="25" PostId="14790" RevisionGUID="fc85124c-de33-4296-98e1-7134d511549c" CreationDate="2011-07-13T12:31:47.670" Comment="http://twitter.com/#!/StackGameDev/status/91122648872001536" />
  <row Id="33321" PostHistoryTypeId="2" PostId="14800" RevisionGUID="8cf388dd-8704-4967-b639-33d2c581c310" CreationDate="2011-07-13T12:32:14.930" UserId="1386" Text="One way to move slower at the start and faster towards the end would be to square the time:&#xD;&#xA;&#xD;&#xA;    vector currentPos = posA  + (posB - posA) * (timeI * timeI)&#xD;&#xA;&#xD;&#xA;If you look at [this graph][1] (wolfram) you can see why this works.&#xD;&#xA;&#xD;&#xA;To move faster at the start and slower at the end:&#xD;&#xA;&#xD;&#xA;    float t = 1 - timeI&#xD;&#xA;    vector currentPos = posA  + (posB - posA) * t * t&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolframalpha.com/input/?i=X%5E2" />
  <row Id="33322" PostHistoryTypeId="2" PostId="14801" RevisionGUID="b509d57d-0466-4706-bc24-e9a9be6a964a" CreationDate="2011-07-13T12:54:20.497" UserId="7728" Text="In video editing (and animation and other fields), the terms used for what you're talking about are &quot;ease in/out&quot; and &quot;smash in/out&quot;, with &quot;ease&quot; meaning to begin or end from a standstill, and &quot;smash&quot; meaning to begin or end with full velocity.&#xD;&#xA;&#xD;&#xA;Your existing algorithm gives you &quot;smash in, smash out&quot;, since it maintains a constant velocity the whole way across the interpolation.&#xD;&#xA;&#xD;&#xA;An easy way to get &quot;ease in, smash out&quot; is to square your fraction before performing the interpolation, like this:&#xD;&#xA;&#xD;&#xA;    timeI = timeI * timeI;&#xD;&#xA;&#xD;&#xA;An easy way to get &quot;smash in, ease out&quot; is to square 1.0-fraction, like this:&#xD;&#xA;&#xD;&#xA;    timeI = (1.0f - timeI) * (1.0f - timeI);&#xD;&#xA;&#xD;&#xA;An easy way to get &quot;ease in, ease out&quot; is to use a hermite interpolator:&#xD;&#xA;&#xD;&#xA;    timeI = (3.0f * timeI * timeI) - (2.0f * timeI * timeI * timeI);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you need more control than that, you might consider actually moving your object along a hermite spline rather than interpolating.  This would allow you far more precise control over starting and ending velocities for your object.  &#xD;&#xA;&#xD;&#xA;Copying hermite spline maths from my own code:&#xD;&#xA;&#xD;&#xA;    Vector3D Spline3D::PositionAtTime( float t ) const&#xD;&#xA;    {&#xD;&#xA;    	float tSquared = t * t;&#xD;&#xA;    	float tCubed = tSquared * t;&#xD;&#xA;    	&#xD;&#xA;    	float a = 2.f * tCubed - 3.f * tSquared + 1.f;	// 2t^3 - 3t^2 + 1&#xD;&#xA;    	float b = tCubed - 2.f * tSquared + t;			// t^3 - 2t^2 + t&#xD;&#xA;    	float c = -2.f * tCubed + 3.f * tSquared;		// -2t^3 + 3t^2&#xD;&#xA;    	float d = tCubed - tSquared;					// t^3 - t^2&#xD;&#xA;    	&#xD;&#xA;    	Vector3D result = (a * m_start) +&#xD;&#xA;    	(b * m_startVelocity) +&#xD;&#xA;    	(c * m_end) +&#xD;&#xA;    	(d * m_endVelocity);&#xD;&#xA;    	&#xD;&#xA;    	return result;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33323" PostHistoryTypeId="2" PostId="14802" RevisionGUID="ff2ed284-6cf4-4d7e-9d13-827472494456" CreationDate="2011-07-13T13:02:28.433" UserId="8050" Text="What about B&amp;eacute;zier curve? A segment is basically a first degree BC but you can construct second or superior degrees curves that are still segments. I suggest to you to use a cubic BC having the two control point laying on the segment itself. Doing so you can control the speed of the point when moves out the first position and when it reaches the final point.&#xD;&#xA;&#xD;&#xA;These are the recursive formula for BCurves&#xD;&#xA;&#xD;&#xA;![recursive b&amp;eacute;zier curve ][1]&#xD;&#xA;&#xD;&#xA;As you can see the first is the linear interpolation of two point ( a segment); the second is a &quot;linear interpolation of segments&quot; (a quadric), the third is a &quot;linear interpolation of quadrics&quot;.&#xD;&#xA;&#xD;&#xA;From this comes that when t is small B is P1 and the tangent is P2-P1; when t is near to 1 B becomes P4 and the tangent is P4-P3.&#xD;&#xA;&#xD;&#xA;You should not exagerate with the lenght of P2-P1 and P4-P3 because the curve can elongate, going over the last point and then coming back.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yvB7T.gif" />
  <row Id="33325" PostHistoryTypeId="5" PostId="14802" RevisionGUID="16d872cb-17e7-405a-ada4-ab193beda0c7" CreationDate="2011-07-13T13:08:00.723" UserId="8050" Comment="added 4 characters in body" Text="What about B&amp;eacute;zier curve? A segment is basically a first degree BC but you can construct second or superior degrees curves that are still segments. I suggest to you to use a cubic BC having the two control point laying on the segment itself. Doing so you can control the speed of the point when moves out the first position and when it reaches the final point.&#xD;&#xA;&#xD;&#xA;These are the recursive formula for BCurves&#xD;&#xA;&#xD;&#xA;![recursive b&amp;eacute;zier curve ][1]&#xD;&#xA;&#xD;&#xA;As you can see the first is the linear interpolation of two point (a segment); the second is a &quot;linear interpolation of segments&quot; (a quadric), the third is a &quot;linear interpolation of quadrics&quot;.&#xD;&#xA;&#xD;&#xA;From this comes that when t is small B &amp;asymp; P1 and the tangent is P2-P1; when t is near to 1 B becomes P4 and the tangent is P4-P3.&#xD;&#xA;&#xD;&#xA;You should not exaggerate with the lenght of P2-P1 and P4-P3 because the curve can elongate, going over the last point and then coming back.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/yvB7T.gif" />
  <row Id="33326" PostHistoryTypeId="2" PostId="14803" RevisionGUID="b9a473f5-57c2-419f-bb7a-cf6b3f878ccb" CreationDate="2011-07-13T13:27:51.670" UserId="8514" Text="A lot of the algorithm design you've applied in XNA will transfer over to virtually any programming language. The things that change will be program structure (slightly) and use of a different graphics API to achieve things like drawing. XNA does a lot of the low level boilerplate code for us, thankfully, so you may end up doing more low level coding in Java to achieve the same things you've achieved in XNA, such as game timing.&#xD;&#xA;&#xD;&#xA;[Killer Game Programming in Java][1] would be a great place to start to learn how to do game and graphics programming specifically in Java. A lot of the core concepts will be immediately familiar to you, but you'll learn to how achieve everything using the Java API.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://amzn.com/0596007302" />
  <row Id="33327" PostHistoryTypeId="5" PostId="14785" RevisionGUID="8847ccf2-6f11-4f4e-94bd-799645a9a3ca" CreationDate="2011-07-13T14:09:39.453" UserId="8561" Comment="added 113 characters in body" Text="What's the best way to implement a detail feature, like a road, on a heightmap-based terrain?&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/bM8Rh.jpg&#xD;&#xA;&#xD;&#xA;Update: It's a bit hard to see in the image, but the road descends from the top of the quarry to do its base." />
  <row Id="33328" PostHistoryTypeId="2" PostId="14804" RevisionGUID="8a786a13-a6bb-4158-a598-37e69c74a5b4" CreationDate="2011-07-13T14:44:20.313" UserId="8427" Text="Floating point math implementation aside, here are a couple of that may help if you're considering implementing a game in this manner.&#xD;&#xA;&#xD;&#xA;Along with the input sharing that you're broadcasting to all players, it can be very useful to create and broadcast a checksum of important game state, such as player positions, health, etc. When processing input, assert that the game state checksums for all remote players are in sync. You are guaranteed to have out of sync (OOS) bugs to fix and this will make it easier - you will have an earlier notice that something's gone wrong (which will help you figure out reproduction steps), and you should be able to add more game state logging in suspect code to allow you to bracket whatever is causing the OOS.&#xD;&#xA;&#xD;&#xA;Second, it is common to need more than one random number generator for a game like this. One rng stays synchronized between players for important game events. The other is the local &quot;non critical&quot; rng that's used for things that only a local person will see. (For instance, you play a sound effect for a notification that happens only on the local machine. If that sound effect needs any randomization you don't want to sully the synchronized rng.)" />
  <row Id="33329" PostHistoryTypeId="2" PostId="14805" RevisionGUID="e906451c-226d-4652-82ca-ea31d57847c0" CreationDate="2011-07-13T14:52:49.773" UserId="1742" Text="Use a function of the time to produce a t value for your interpolation, for example an ease-in and ease-out function like this:&#xD;&#xA;&#xD;&#xA;http://coc.dev77.com/2009/06/smoothness.html&#xD;&#xA;&#xD;&#xA;or use one of the standard parabola results.&#xD;&#xA;&#xD;&#xA;ease-in : t = time^2&#xD;&#xA;&#xD;&#xA;ease-out : t = 1-(1-time)^2" />
  <row Id="33330" PostHistoryTypeId="5" PostId="14804" RevisionGUID="dff4b403-c00f-406b-8bcb-f783920b7311" CreationDate="2011-07-13T15:02:36.707" UserId="8427" Comment="deleted 349 characters in body" Text="I realized after writing this answer that it doesn't actually answer the question, which was specifically about floating-point nondeterminism. But maybe this is helpful to him anyway if he's going to make a networked game in this manner.&#xD;&#xA;&#xD;&#xA;Along with the input sharing that you're broadcasting to all players, it can be very useful to create and broadcast a checksum of important game state, such as player positions, health, etc. When processing input, assert that the game state checksums for all remote players are in sync. You are guaranteed to have out of sync (OOS) bugs to fix and this will make it easier - you will have an earlier notice that something's gone wrong (which will help you figure out reproduction steps), and you should be able to add more game state logging in suspect code to allow you to bracket whatever is causing the OOS." />
  <row Id="33331" PostHistoryTypeId="2" PostId="14806" RevisionGUID="f7da687b-bd89-45fb-9255-35abe31feeda" CreationDate="2011-07-13T15:26:10.657" UserId="2612" Text="I'm creating a platformer game that has a &quot;co-operative&quot; feature which I'd like to work over networks / the internet.&#xD;&#xA;&#xD;&#xA;Now I've read up on network game programming including articles like [What every programmer needs to know about game networking](http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/) and so I understand the difference between techniques like Peer-to-Peer lockstep and Server-Client prediction architectures:&#xD;&#xA;&#xD;&#xA; - I've concluded that for any real-time game that is going to be played over the internet, Peer-to-Peer lockstep simply isn't an option.&#xD;&#xA; - I'm also concerned that even for a platformer a simple client-server architecture (without some sort of client prediction) would result in degraded gameplay due to the delay between action and reaction caused by a round-trip to a server. (Having said that I want to eliminate the need for a central server, and so only one of the players, the client, will actually experience this lag).&#xD;&#xA; &#xD;&#xA;This leaves client prediction, but even for a simple game like a platformer this still sounds pretty complex.&#xD;&#xA;&#xD;&#xA;How much work is it to write a networked game that ues client prediction?  Am I going to end up with half of my codebase consisting of networking code?" />
  <row Id="33332" PostHistoryTypeId="1" PostId="14806" RevisionGUID="f7da687b-bd89-45fb-9255-35abe31feeda" CreationDate="2011-07-13T15:26:10.657" UserId="2612" Text="How difficult is creating a real-time multiplayer game?" />
  <row Id="33333" PostHistoryTypeId="3" PostId="14806" RevisionGUID="f7da687b-bd89-45fb-9255-35abe31feeda" CreationDate="2011-07-13T15:26:10.657" UserId="2612" Text="&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="33334" PostHistoryTypeId="25" PostId="14799" RevisionGUID="54642129-6ca5-4a85-a18d-8fa681451cc3" CreationDate="2011-07-13T15:31:48.240" Comment="http://twitter.com/#!/StackGameDev/status/91167948923867136" />
  <row Id="33335" PostHistoryTypeId="17" PostId="14807" RevisionGUID="0399a7bd-7491-4fb7-8193-58d7ab32549e" CreationDate="2011-07-13T15:38:38.183" UserId="-1" Comment="from http://stackoverflow.com/questions/6617430/let-enemies-blink-when-hit" Text="" />
  <row Id="33336" PostHistoryTypeId="2" PostId="14807" RevisionGUID="e3253b2e-9748-4743-8762-a01e7e821a71" CreationDate="2011-07-07T21:35:24.980" UserDisplayName="drpelz" Text="I would like to know how can I go about with an approach, that lets the enemies blink after they are hit with a shot/particle?&#xD;&#xA;&#xD;&#xA;Is it better to pre-render colored enemies into an array for a better performance or is it just okay coloring them during gameplay?&#xD;&#xA;&#xD;&#xA;For example, you can use the `colorMatrixFilter-` or `colorTransform-` methods for accomplishing this. Pre-rendering it (mentioned before) and storing the colored enemies inside of an array is an option also.  &#xD;&#xA;&#xD;&#xA;I ask because I'm not sure how those mentioned methods influence gameplay, especially for action games. &#xD;&#xA;&#xD;&#xA;Which method is *usually* faster / *the accepted norm*? Are there any approaches I should avoid that will impact the gameplay?" />
  <row Id="33337" PostHistoryTypeId="1" PostId="14807" RevisionGUID="e3253b2e-9748-4743-8762-a01e7e821a71" CreationDate="2011-07-07T21:35:24.980" UserDisplayName="drpelz" Text="Let enemies blink when hit" />
  <row Id="33338" PostHistoryTypeId="3" PostId="14807" RevisionGUID="e3253b2e-9748-4743-8762-a01e7e821a71" CreationDate="2011-07-07T21:35:24.980" UserDisplayName="drpelz" Text="&lt;actionscript-3&gt;" />
  <row Id="33339" PostHistoryTypeId="2" PostId="14808" RevisionGUID="764dff93-cd50-45a1-87e5-a221fbe3d891" CreationDate="2011-07-13T16:27:29.690" UserId="8012" Text="I've been looking at ways to load data into a game.  I even asked a question on stack overflow about reading binary data in a portable manner (http://stackoverflow.com/questions/6642311/dealing-with-different-architectures-when-loading-data-using-stdio).  The gist of the answer seemed to be that you can use the int types header file to specify an particular integer byte amount, but there's nothing really useful for floats, etc.&#xD;&#xA;&#xD;&#xA;I then thought that you could use fixed point, rather than floating point, but I wanted to see how other games did it.  Here is one example, a md2 loader: http://tfc.duke.free.fr/old/models/md2.htm .  However, it seemed to assume that the size of various types would just work, and that they would be the same on the platform that made the md2, and the one that read it.  This seemed to be fairly common in the code that I've seen so far.&#xD;&#xA;&#xD;&#xA;So is it really common to just ignore possible different size issues, or have I just been looking at bad (or old) samples?  If it's not, could you also demonstrate a better way to do it, or at least link to one?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="33340" PostHistoryTypeId="1" PostId="14808" RevisionGUID="764dff93-cd50-45a1-87e5-a221fbe3d891" CreationDate="2011-07-13T16:27:29.690" UserId="8012" Text="Loading resources in a portable manner" />
  <row Id="33341" PostHistoryTypeId="3" PostId="14808" RevisionGUID="764dff93-cd50-45a1-87e5-a221fbe3d891" CreationDate="2011-07-13T16:27:29.690" UserId="8012" Text="&lt;assets&gt;&lt;file-format&gt;" />
  <row Id="33342" PostHistoryTypeId="5" PostId="14808" RevisionGUID="0bd60d31-a32b-45bd-a1ed-10d41bc1eeec" CreationDate="2011-07-13T16:49:57.153" UserId="6877" Comment="fixed link" Text="I've been looking at ways to load data into a game.  I even asked a question on stack overflow about reading binary data in a portable manner [http://stackoverflow.com/questions/6642311/dealing-with-different-architectures-when-loading-data-using-stdio](http://stackoverflow.com/questions/6642311/dealing-with-different-architectures-when-loading-data-using-stdio).  The gist of the answer seemed to be that you can use the int types header file to specify an particular integer byte amount, but there's nothing really useful for floats, etc.&#xD;&#xA;&#xD;&#xA;I then thought that you could use fixed point, rather than floating point, but I wanted to see how other games did it.  Here is one example, a md2 loader: http://tfc.duke.free.fr/old/models/md2.htm .  However, it seemed to assume that the size of various types would just work, and that they would be the same on the platform that made the md2, and the one that read it.  This seemed to be fairly common in the code that I've seen so far.&#xD;&#xA;&#xD;&#xA;So is it really common to just ignore possible different size issues, or have I just been looking at bad (or old) samples?  If it's not, could you also demonstrate a better way to do it, or at least link to one?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="33343" PostHistoryTypeId="24" PostId="14808" RevisionGUID="0bd60d31-a32b-45bd-a1ed-10d41bc1eeec" CreationDate="2011-07-13T16:49:57.153" Comment="Proposed by 6877 approved by -1 edit id of 558" />
  <row Id="33344" PostHistoryTypeId="5" PostId="14808" RevisionGUID="94220466-a435-4661-b3af-306f3936df33" CreationDate="2011-07-13T16:49:57.373" UserId="14" Comment="fixed link" Text="I've been looking at ways to load data into a game.  I even [asked a question on stack overflow about reading binary data in a portable manner ](http://stackoverflow.com/questions/6642311/dealing-with-different-architectures-when-loading-data-using-stdio).  The gist of the answer seemed to be that you can use the int types header file to specify an particular integer byte amount, but there's nothing really useful for floats, etc.&#xD;&#xA;&#xD;&#xA;I then thought that you could use fixed point, rather than floating point, but I wanted to see how other games did it.  Here is one example, a md2 loader: http://tfc.duke.free.fr/old/models/md2.htm .  However, it seemed to assume that the size of various types would just work, and that they would be the same on the platform that made the md2, and the one that read it.  This seemed to be fairly common in the code that I've seen so far.&#xD;&#xA;&#xD;&#xA;So is it really common to just ignore possible different size issues, or have I just been looking at bad (or old) samples?  If it's not, could you also demonstrate a better way to do it, or at least link to one?&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="33345" PostHistoryTypeId="2" PostId="14809" RevisionGUID="2a47b1d0-7e72-4c00-bc45-b271920c76af" CreationDate="2011-07-13T16:57:44.643" UserId="2776" Text="Do you know any [patents][1] of GamePlay model? I mean behavior between User as Player and the System? For example &quot;when player's character dies -&gt; the system must raise him at last checkpoint&quot;. If you know any patent please provide a link:)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Patent" />
  <row Id="33346" PostHistoryTypeId="1" PostId="14809" RevisionGUID="2a47b1d0-7e72-4c00-bc45-b271920c76af" CreationDate="2011-07-13T16:57:44.643" UserId="2776" Text="GamePlay Patent" />
  <row Id="33347" PostHistoryTypeId="3" PostId="14809" RevisionGUID="2a47b1d0-7e72-4c00-bc45-b271920c76af" CreationDate="2011-07-13T16:57:44.643" UserId="2776" Text="&lt;gameplay&gt;&lt;documentation&gt;" />
  <row Id="33348" PostHistoryTypeId="2" PostId="14810" RevisionGUID="40301aab-1328-4482-a96c-1984f0f72df2" CreationDate="2011-07-13T17:09:13.603" UserId="1198" Text="I don't think that half of your code base will turn into network code if you decide to implement a feature such as this.&#xD;&#xA;&#xD;&#xA;In my opinion, the most simple way to do this, is to setup a &quot;central&quot; server (even if that means that one player &quot;hosts&quot; the game and then connects to his own server) that accepts all user input as fast as possible, and sends it back out to each client.&#xD;&#xA;&#xD;&#xA;On the client, you implement this no differently than if you were doing a co-op game for two players locally, except you read P1 from keyboard, and P2 from network. &#xD;&#xA;&#xD;&#xA;You'll need to have the server send out a full game state every once in a while, and both clients can either snap to the new authoratitave state from the server, or they can slide into the new state (over a few seconds). Unless you have horrible packet loss or tons of clients per server, this approach should suffice for the situation you outline." />
  <row Id="33349" PostHistoryTypeId="5" PostId="14809" RevisionGUID="bac38d74-9977-4871-8685-ce9359854ff6" CreationDate="2011-07-13T17:09:48.440" UserId="2776" Comment="added 43 characters in body" Text="Do you know any [patents][1] of GamePlay model? I mean behavior between User as Player and the System? In another words Patent of GamePlay rules. For example &quot;when player's character dies -&gt; the system must raise him at last checkpoint&quot;. If you know any patent please provide a link:)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Patent" />
  <row Id="33350" PostHistoryTypeId="2" PostId="14811" RevisionGUID="fdbd5ddc-c537-4e19-974b-da58cdbd3893" CreationDate="2011-07-13T17:13:12.947" UserId="4662" Text="IANAL.&#xD;&#xA;&#xD;&#xA;Gameplay mechanics cannot be patented, nor copyrighted. You can only patent implementations of them or copyright very specific details, like &quot;A plumber named Mario&quot;, for example. You cannot copyright nor patent general game ideas." />
  <row Id="33351" PostHistoryTypeId="2" PostId="14812" RevisionGUID="c5aa344e-d3ee-4f6b-8a7e-32b27e4689f7" CreationDate="2011-07-13T17:14:27.060" UserId="5125" Text="&quot;Skip hard parts in a game (by pushing a 'hint' button) and let the game 'video-walk you through that part' (ie. skip it by seing how it can be done) :&#xD;&#xA;&#xD;&#xA;http://kotaku.com/5127251/nintendo-patent-reveals-potential-paradigm-shift-in-design&#xD;&#xA;&#xD;&#xA;By Nintendo O_o&#xD;&#xA;" />
  <row Id="33352" PostHistoryTypeId="2" PostId="14813" RevisionGUID="a28d2118-0623-48c6-8cf1-f74ecbdede4b" CreationDate="2011-07-13T17:14:37.777" UserId="6877" Text="No, you can't patent a game play design. No one can can stop you from making Super Mario clone. They can stop you from calling it SuperMario or using their character design or soundtrack.&#xD;&#xA;&#xD;&#xA;**Ideas cannot be patented, only processes.**" />
  <row Id="33354" PostHistoryTypeId="2" PostId="14815" RevisionGUID="2afa7dd7-11dd-402f-9430-9426589ed0f5" CreationDate="2011-07-13T17:33:30.177" UserId="5125" Text="Well, the problem is that a binary format is specific for a certain (or several) platforms, otherwise it wouldn't be a 'binary' format!&#xD;&#xA;&#xD;&#xA;A non binary, say CSV with values as ASCII numbers or why not XML, could be read by 'any' platform that can read a file and do some simple number crunching." />
  <row Id="33355" PostHistoryTypeId="2" PostId="14816" RevisionGUID="61e04853-986b-43e8-99a8-47516deff355" CreationDate="2011-07-13T17:38:44.667" UserId="5125" Text="I have a fully functionnal mMORPG style game with client prediction (the game is far from finished but it runs 'OK') and I have something along 40.000 lines of code for the server and the double for the client (add same amount for tools etc.).&#xD;&#xA;The Prediction is probably not more than a few hundred lines (if even that) and the whole network part a couple of thousand lines but not more than say 5.000 (it depends a bit where you draw the line).&#xD;&#xA;&#xD;&#xA;Fuzzy question fuzzy answer ;-)" />
  <row Id="33356" PostHistoryTypeId="5" PostId="14812" RevisionGUID="9dafbe17-ebac-423c-98ef-fb480d8b7791" CreationDate="2011-07-13T17:39:48.393" UserId="5125" Comment="added 226 characters in body" Text="&quot;Skip hard parts in a game (by pushing a 'hint' button) and let the game 'video-walk you through that part' (ie. skip it by seing how it can be done) :&#xD;&#xA;&#xD;&#xA;http://kotaku.com/5127251/nintendo-patent-reveals-potential-paradigm-shift-in-design&#xD;&#xA;&#xD;&#xA;By Nintendo O_o&#xD;&#xA;&#xD;&#xA;Among others: Namco patent on load-time mini-games (US Patent Number 5,718,632)&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/3562/the_designers_notebook_damn_all_.php?print=1&#xD;&#xA;&#xD;&#xA;You can definitely, it seems, patent gameplay.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33358" PostHistoryTypeId="2" PostId="14817" RevisionGUID="8b0063a8-c947-4a96-a38b-b3dfb33ebfdc" CreationDate="2011-07-13T17:46:06.967" UserId="962" Text="**If you are doing blitting with `copyPixels()` then you should definitely pre-render it.**&#xD;&#xA;&#xD;&#xA;Instead of changing the enemies color when hit, you should probably make a hit animation for the enemies and just play that animation when hit." />
  <row Id="33359" PostHistoryTypeId="5" PostId="14817" RevisionGUID="8b66812d-c82c-49a9-813b-e36d56e24c27" CreationDate="2011-07-13T17:58:22.353" UserId="962" Comment="added 62 characters in body" Text="**If you are doing blitting with `copyPixels()` then you should definitely pre-render it inside flash when the program launches or the level is loading**&#xD;&#xA;&#xD;&#xA;Instead of changing the enemies color when hit, you should probably make a hit animation for the enemies and just play that animation when hit." />
  <row Id="33360" PostHistoryTypeId="2" PostId="14818" RevisionGUID="fd7df61f-285a-4a5b-92f5-5b20f156994b" CreationDate="2011-07-13T18:30:08.617" UserId="5125" Text="The way I do it is to separate the heightmap (I use floats for example, 513*513) and splatmap (the &quot;control-texture&quot;) that often needs a bigger resolution (I use 32bit bmps, 512x512).&#xD;&#xA;&#xD;&#xA;The heightmap creates the mesh (the terrain, the triangles).&#xD;&#xA;&#xD;&#xA;The control-map spans the whole terrain and each of its layers (RGBA) says how much say Stone,Dirt,Road etc. you should see On the terrain.&#xD;&#xA;&#xD;&#xA;This way you can use an editor to&#xD;&#xA;a) create the terrain&#xD;&#xA;and&#xD;&#xA;b) Paint the terrain (with Rock,Dirt,Road etc.)&#xD;&#xA;&#xD;&#xA;Do a quick goolge on 'painting heightmap', 'heightmap splatmap' and such for a more thorough explanation or&#xD;&#xA;download say Unity3D to check out how it might work in 'reality'." />
  <row Id="33361" PostHistoryTypeId="25" PostId="14806" RevisionGUID="956ce83b-e30c-4ae8-9e86-965f63b702a5" CreationDate="2011-07-13T18:31:48.043" Comment="http://twitter.com/#!/StackGameDev/status/91213246031331328" />
  <row Id="33362" PostHistoryTypeId="2" PostId="14819" RevisionGUID="97557223-e757-4faf-96b5-6718d09066b7" CreationDate="2011-07-13T18:44:22.803" UserId="7911" Text="Once upon a time Midway had a patent on &quot;ghost cars&quot; used to race against your previously recorded attempts.&#xD;&#xA;&#xD;&#xA;There are more things in heaven and earth, Horatio,&#xD;&#xA;Than are dreamt of in your philosophy.&#xD;&#xA;&#xD;&#xA;[Gamasutra discussion on Ghost Cars][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/1489/hard_drivin_hard_bargainin_.php" />
  <row Id="33363" PostHistoryTypeId="2" PostId="14820" RevisionGUID="bd82f9e3-22ac-4073-9a3d-f2232ebc35db" CreationDate="2011-07-13T18:44:48.997" UserId="5311" Text="First, patent legislation varies by country.  [This GamaSutra article][1] references a number of gameplay patents which have been granted in the US.  (The article also recommends that game developers should patent their game mechanics, which I strongly disagree with, but that's another matter entirely.)  Specifically:&#xD;&#xA;&#xD;&#xA;&gt; 1. United States Patent No. 6,604,008, entitled “Scoring based on goals achieved and subjective elements,” and assigned to Microsoft Corp., describes a method of determining points to be awarded to a player, where the points are based in part on style. (Hint: Speed through the town of a certain caped crusader)&#xD;&#xA;&#xD;&#xA;&gt; 2. United States Patent No. 6,695,694, entitled “Game machine, game device, control method, information storage medium, game distribution device and game distribution method,” and assigned to Konami Corporation, describes a game method that detects whether a player has placed his/her foot on a plurality of step positions, and calculates an amount of energy consumed by the player. (Hint: Groovy!)&#xD;&#xA;&#xD;&#xA;&gt; 3. United States Patent No. 6,200,138, entitled “Game display method, moving direction indicating method, game apparatus and drive simulating apparatus,” and assigned to Sega Enterprises, Ltd., describes a game method in which movable objects automatically move away from an approaching character. (Hint: Fare approaching!)&#xD;&#xA;&#xD;&#xA;&gt; 4. United States Patent No. 6,729,954, entitled “Battle method with attack power based on character group density,” and assigned to Koei Co., Ltd., describes a method of calculating attack or defense strength of a character based on its proximity to other characters in a three-dimensional battlefield. (Hint: Shang, Zhou, Qin, Han, anyone?)&#xD;&#xA;&#xD;&#xA;The enforceability of these patents is another issue altogether.  Just because the USPTO grants a patent does not mean it will be held as valid in a court of law.  The video game industry is young and has relatively few patents, so there are, to the best of my knowledge, few historical precedents to indicate what a judge might rule if patents like these were exercised.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/2315/its_just_a_game_right_top_.php" />
  <row Id="33364" PostHistoryTypeId="2" PostId="14821" RevisionGUID="1759d57f-b286-4006-9bd9-84341ae47a67" CreationDate="2011-07-13T18:47:42.927" UserId="7911" Text="Portable?  It's common to use the same binary loading code across different platforms, **but** to have the data creation pipeline output different **data sets to match each platform**.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33366" PostHistoryTypeId="2" PostId="14822" RevisionGUID="39375b52-c643-40a8-91a8-7a0aad61691f" CreationDate="2011-07-13T19:08:10.033" UserId="5824" Text="Floats can be dealt with in an almost platform independent way by assuming that they are IEEE standard representations, which almost all platforms use.&#xD;&#xA;&#xD;&#xA;From there you'll have to do another potentially non-portable operation - treat the memory holding the float as an integer and write that integer out. While I believe the standard doesn't actually support doing that portably, most implementations do allow it. Code would look something like:&#xD;&#xA;&#xD;&#xA;     void write_float(uint8_t *buf, float x)&#xD;&#xA;     {&#xD;&#xA;        union float_uint_32 { uint32_t i; float f; };&#xD;&#xA;        float_uint_32 value;&#xD;&#xA;        value.f = x;&#xD;&#xA;        write_uint32_t(buf, value.i);&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;However as said in other answers, most games have tools that output binary data in a format specific to each platform to maximize loading performance. The quantity of CPU work required for loading data should be almost zero when you do that. Making it more portable slows things down." />
  <row Id="33367" PostHistoryTypeId="2" PostId="14823" RevisionGUID="41db7a6a-7c70-4b75-8e11-b2adfbe54f04" CreationDate="2011-07-13T19:09:53.577" UserId="5311" Text="When I first looked at your game I immediately expected that I'd be able to hold my phone in my hand like I would a dart and make a throwing motion, in order to throw the virtual dart using the accelerometer.  However, it doesn't look like you actually have that feature.  I think that would be a pretty neat thing to add.  Of course, not being able to see the screen when you're throwing would be something of an issue, and you might want to look into what liability you could be facing for basically encouraging people to almost throw their phones...  Even so, I think it'd be a very novel and Wii-like way to play the game." />
  <row Id="33368" PostHistoryTypeId="2" PostId="14824" RevisionGUID="38429dd2-85db-484d-8313-a5a8262ef150" CreationDate="2011-07-13T19:15:55.813" UserId="8574" Text="I'm fairly new to Cinema and I'm building a rigged flat (2d) character out of illustrated pieces. I want the meshes to have an efficient number of polys but sufficient resolution where they'll bend most, so I'm starting with planes and mostly knifing away. Part of this process is roughly following the contour of the piece (say, an arm) with the edge of the mesh. I'm fine with the modeling, but I think I may be doing the texturing in a somewhat roundabout way, and I'm wondering if you can suggest a better technique.&#xD;&#xA;&#xD;&#xA;My pipeline requires that all the textures be UVW mapped with no offset or scale. (I'm exporting to Unity through FBX)&#xD;&#xA;&#xD;&#xA;Basically it's like this:&#xD;&#xA;&#xD;&#xA;* Set the texture tag to Flat projection&#xD;&#xA;* Modify the mesh (moving vertices, adding and removing vertices, etc)&#xD;&#xA;* Go back to UVW projection&#xD;&#xA;* In BodyPaint's UV Manager, in UV Poly Edit Mode, choose Flat projection fitted to object system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The only problem with this is that if I have to tweak the mesh later, I'll have to go back into Flat projection so that moving the mesh vertices doesn't stretch the texture... and for some reason, after I've made a bunch of edits, the frontal mapping ends up requiring scale and offset to align again. Of course, I have to zero these out again when I'm satisfied and go back to UVW mapping. It really seems like an awful workaround to what should be a simple task.&#xD;&#xA;&#xD;&#xA;Is there a better way to do this? Can I interactively move the vertices around while keeping a flat UV mapping, without switching back and forth in the Texture tag?" />
  <row Id="33369" PostHistoryTypeId="1" PostId="14824" RevisionGUID="38429dd2-85db-484d-8313-a5a8262ef150" CreationDate="2011-07-13T19:15:55.813" UserId="8574" Text="Interactively edit UV mapped, textured mesh in Cinema 4D without distorting texture?" />
  <row Id="33370" PostHistoryTypeId="3" PostId="14824" RevisionGUID="38429dd2-85db-484d-8313-a5a8262ef150" CreationDate="2011-07-13T19:15:55.813" UserId="8574" Text="&lt;textures&gt;&lt;uvw-mapping&gt;&lt;cinema-4d&gt;" />
  <row Id="33371" PostHistoryTypeId="2" PostId="14825" RevisionGUID="c15be928-d273-4d6e-a268-74af6ed0eb80" CreationDate="2011-07-13T19:18:08.553" UserId="8365" Text="I ended up moving the viewport code to right after I set the render target to null and it worked beautifully without me having to modify the position of every single thing I'd drawn so far." />
  <row Id="33372" PostHistoryTypeId="2" PostId="14826" RevisionGUID="a275515f-e55d-4f05-8fff-54a95115f158" CreationDate="2011-07-13T19:33:07.343" UserId="8576" Text="I think steam is your best bet; I've seen a lot of XNA games doing fairly well there lately. Read through the following page and if you're still interested, send Valve an email.&#xD;&#xA;&#xD;&#xA;http://www.steampowered.com/steamworks/FAQ.php" />
  <row Id="33373" PostHistoryTypeId="5" PostId="14466" RevisionGUID="e7e9ba27-af69-420f-83be-47558f0f0124" CreationDate="2011-07-13T19:47:48.767" UserId="8408" Comment="deleted 100 characters in body" Text="Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.&#xD;&#xA;&#xD;&#xA;My application at the moment simply draws a rectangle in screen space and I've attached a float to the pixel shader so that I can quickly determine if the constant buffer is being updated by looking at the rectangle color.&#xD;&#xA;&#xD;&#xA;I've used two methods presented in the MSDN tutorial (pDeviceContext-&gt;UpdateSubresource()) and the D3D11 sample code (pDeviceContext-&gt;Map()), both yielded the same results which leads me to wonder if maybe I missed an important flag earlier in the engine while initializing the D3D device or compiling the shaders. Also is anyone aware of any important trade offs between the two techniques?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the relevant code...&#xD;&#xA;&#xD;&#xA;    struct UIShaderBuffer {&#xD;&#xA;        XMMATRIX scale,&#xD;&#xA;                rotation,&#xD;&#xA;                translation;&#xD;&#xA;        float temp; // Used to change the rectangle's color.&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Initialize the shader buffer and interface&#xD;&#xA;    bool UIRectangle::StartUpShaderBuffer() {&#xD;&#xA;        UIShaderBuffer _shaderBuffer;&#xD;&#xA;        ZeroMemory(&amp;_shaderBuffer, sizeof(UIShaderBuffer));&#xD;&#xA;&#xD;&#xA;        D3D11_BUFFER_DESC _bd;&#xD;&#xA;        ZeroMemory(&amp;_bd, sizeof(D3D11_BUFFER_DESC) );&#xD;&#xA;        _bd.Usage                       = D3D11_USAGE_DYNAMIC;&#xD;&#xA;        _bd.ByteWidth                   = sizeof(UIShaderBuffer);&#xD;&#xA;        _bd.BindFlags                   = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;        _bd.CPUAccessFlags      = 0;&#xD;&#xA;        _bd.MiscFlags                   = 0;&#xD;&#xA;        _bd.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;        D3D11_SUBRESOURCE_DATA _subResData;&#xD;&#xA;        ZeroMemory(&amp;_subResData, sizeof(D3D11_SUBRESOURCE_DATA));&#xD;&#xA;        _subResData.pSysMem             = &amp;_shaderBuffer;&#xD;&#xA;        _subResData.SysMemPitch         = 0;&#xD;&#xA;        _subResData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;        if(FAILED(pDevice-&gt;CreateBuffer(&amp;_bd, &amp;_subResData, &amp;pShaderBuffer))) {&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to bind shader constant buffer.\0&quot;), 0, 0);&#xD;&#xA;                return false;&#xD;&#xA;        }&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Update the buffer. Call before rendering.&#xD;&#xA;    void UIRectangle::UpdateShaderBuffer(XMMATRIX &amp;_rScale, XMMATRIX &amp;_rRotation, XMMATRIX &amp;_rTranslation) {&#xD;&#xA;        static UIShaderBuffer _updatedBuffer;&#xD;&#xA;        _updatedBuffer.scale            = _rScale;&#xD;&#xA;        _updatedBuffer.rotation         = _rRotation;&#xD;&#xA;        _updatedBuffer.translation  = _rTranslation;&#xD;&#xA;        _updatedBuffer.temp = 1.0f; // Used to affect rectangle color in order to see if buffer is getting updated.&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;UpdateSubresource(pShaderBuffer, 0 , 0, &amp;_updatedBuffer, 0, 0);&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;	    pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBuffer);&#xD;&#xA;        &#xD;&#xA;        /* Alternative method used in D3D11 sample code.&#xD;&#xA;        D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;        UIShaderBuffer* bufPtr = 0;&#xD;&#xA;        if (FAILED(pDeviceContext-&gt;Map(pShaderBufferAddr, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource)))&#xD;&#xA;                MessageBox(0, TEXT(&quot;UIRectangle: Failed to map shader buffer.\0&quot;), 0, 0);&#xD;&#xA;        bufPtr = (UIShaderBuffer*) mappedResource.pData;&#xD;&#xA;        bufPtr-&gt;scale           = _rScale;&#xD;&#xA;        bufPtr-&gt;rotation        = _rRotation;&#xD;&#xA;        bufPtr-&gt;translation = _rTranslation;&#xD;&#xA;        bufPtr-&gt;temp = pos;&#xD;&#xA;        pDeviceContext-&gt;Unmap(pShaderBufferAddr, 0);&#xD;&#xA;&#xD;&#xA;        pDeviceContext-&gt;VSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        pDeviceContext-&gt;PSSetConstantBuffers(0, 1, &amp;pShaderBufferAddr);&#xD;&#xA;        */&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Render&#xD;&#xA;    bool UIRectangle::Render() {&#xD;&#xA;        static XMMATRIX _scale          = XMMatrixTranspose(XMMatrixScaling(1.0f, 1.0f, 1.0f)),&#xD;&#xA;                                _rotation       = XMMatrixTranspose(XMMatrixIdentity()),&#xD;&#xA;                                _translation = XMMatrixTranspose(XMMatrixTranslation(-0.5f, 0.0f, 0.0f));&#xD;&#xA;&#xD;&#xA;        UpdateShaderBuffer(_scale, _rotation, _translation);    &#xD;&#xA;        return Mesh&lt;V_Pos&gt;::Render();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    template &lt;class V&gt;&#xD;&#xA;    bool Mesh&lt;V&gt;::Render() {&#xD;&#xA;	pDeviceContext-&gt;IASetInputLayout(pVertexLayout);&#xD;&#xA;	pDeviceContext-&gt;IASetPrimitiveTopology(topologyType);&#xD;&#xA;	pDeviceContext-&gt;VSSetShader(pVShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;PSSetShader(pPShader, 0, 0);&#xD;&#xA;	pDeviceContext-&gt;Draw(bufSize, 0);&#xD;&#xA;&#xD;&#xA;	return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shader code....&#xD;&#xA;&#xD;&#xA;    cbuffer ConstantBuffer : register( b0 ) {&#xD;&#xA;        matrix scale;&#xD;&#xA;        matrix rotation;&#xD;&#xA;        matrix translation;&#xD;&#xA;        float temp;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    float4 VS( float4 _pos : POSITION ) : SV_POSITION {&#xD;&#xA;        //return mul(translation, _pos);&#xD;&#xA;        return _pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    float4 PS( float4 Pos : SV_POSITION ) : SV_Target {&#xD;&#xA;        return float4( temp, temp, temp, 1.0f );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Forgot to mention that I noticed this in the D3D11 debug output.&#xD;&#xA;&#xD;&#xA;    D3D11: INFO: ID3D11DeviceContext::Draw: Constant Buffer expected at slot 0 of the Pixel Shader unit (with size at least 208 bytes) but none is bound. This is OK, as reads of an unbound Constant Buffer are defined to return 0. It is also posible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Constant Buffer here.  [ EXECUTION INFO #350: DEVICE_DRAW_CONSTANT_BUFFER_NOT_SET ]&#xD;&#xA;&#xD;&#xA;I'm assuming that this is the problem however I don't understand it! Playing with the slot parameter of the SetConstantBuffers() call doesn't change anything, and I have no idea where else I need to bind the buffer. Is there some kind of resource dispute between the pixel and vertex shaders over the constant buffer? Or is this a data packing and alignment issue?&#xD;&#xA;&#xD;&#xA;Other questions...&#xD;&#xA;&#xD;&#xA;Are there any advantages to using XMMatrices over D3DMatrices? (Other than having to transpose one)&#xD;&#xA;&#xD;&#xA;&quot;XMMATRIX is SSE2 optimized and the code inlined, which as far as I know, isn't true of D3DXMATRIX. So it's definitely faster than D3DX, and in addition, it's more portable (has an Xbox 360 port).&quot; - DeadMG&#xD;&#xA;&#xD;&#xA;I've mirrored this question here http://www.gamedev.net/topic/605347-updating-shader-buffers/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Jumped the gun, thought I found the solution. Same issue and warning remains.&#xD;&#xA;&#xD;&#xA;Here is the shader initialization code&#xD;&#xA;&#xD;&#xA;Vertex Shader&#xD;&#xA;&#xD;&#xA;     bool VShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	// Id used to reference the shader from the shader manager subsystem's hash table.&#xD;&#xA;        // Replace with Int hash value!!!!&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;VShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// I'm under the impression that these are the correct flags since MSDN documentation referenced typedefs and enums that didn't exist.&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the vertex shader&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pVSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;VShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreateVertexShader(pVSBlob-&gt;GetBufferPointer(), pVSBlob-&gt;GetBufferSize(), 0, &amp;pVShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;VShader: Failed to create pixel shader.\0&quot;));&#xD;&#xA;		_error.Append(_pFileName);&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Pixel Shader.&#xD;&#xA;&#xD;&#xA;    bool PShader::StartUp(const character *_id, const void *_pDevice, LPCWSTR _pFileName, const char *_pFuncName, const char *_pShadModel) {&#xD;&#xA;	if ( !id.StartUp(GAME_OBJECT_STRLEN) ) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to start up shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (!id.SetString(_id)) {&#xD;&#xA;		MessageBox(0, TEXT(&quot;PShader: Failed to set shader id.\0&quot;), 0, 0);&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	unsigned int _shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS;&#xD;&#xA;&#xD;&#xA;	// Debug flag&#xD;&#xA;	#if defined(_DEBUG)&#xD;&#xA;		_shaderFlags |= D3D10_SHADER_DEBUG | D3D10_SHADER_SKIP_OPTIMIZATION;&#xD;&#xA;	#endif&#xD;&#xA;&#xD;&#xA;	ID3D10Blob* _pErrorBlob = 0;&#xD;&#xA;	bool _hasFailed = false;&#xD;&#xA;&#xD;&#xA;	// Create the pixel shader.&#xD;&#xA;	if(FAILED(D3DX11CompileFromFile(_pFileName, 0, 0, _pFuncName, _pShadModel, _shaderFlags, 0, 0, &amp;pPSBlob, &amp;_pErrorBlob, 0)))&#xD;&#xA;		_hasFailed = true;&#xD;&#xA;&#xD;&#xA;	if (_pErrorBlob || _hasFailed) {&#xD;&#xA;		if (_pErrorBlob != 0)&#xD;&#xA;			MessageBoxA(0, (LPCSTR)_pErrorBlob-&gt;GetBufferPointer(), 0, 0);&#xD;&#xA;		else {&#xD;&#xA;			SString _error(ERROR_STRING_SIZE);&#xD;&#xA;			_error.SetString(TEXT(&quot;PShader: Unable to find \&quot;\0&quot;));&#xD;&#xA;			_error.Append(_pFileName);&#xD;&#xA;			_error.Append(TEXT(&quot;\&quot;. (\0&quot;));&#xD;&#xA;			_error.Append(id.GetStringPtr());&#xD;&#xA;			_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;			MessageBox(0, _error.GetStringPtr(), 0, 0);&#xD;&#xA;			_error.ShutDown();&#xD;&#xA;		}&#xD;&#xA;		return false;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (FAILED(((ID3D11Device*)_pDevice)-&gt;CreatePixelShader(pPSBlob-&gt;GetBufferPointer(), pPSBlob-&gt;GetBufferSize(), 0, &amp;pPShader))) {&#xD;&#xA;		SString _error(ERROR_STRING_SIZE);&#xD;&#xA;		_error.SetString(TEXT(&quot;PShader: Failed to create pixel shader. (\0&quot;));&#xD;&#xA;		_error.Append(id.GetStringPtr());&#xD;&#xA;		_error.Append(TEXT(&quot;)\0&quot;));&#xD;&#xA;&#xD;&#xA;		MessageBox(0, (LPCWSTR)_error.GetStringPtr(), 0, 0);&#xD;&#xA;		_error.ShutDown();&#xD;&#xA;		return false;&#xD;&#xA;	} else return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Edit 2**&#xD;&#xA;&#xD;&#xA;I'm starting to think it's an issue with my draw call sequence and by extension the design of my Mesh superclass and UIRectangle subclass. Didn't originally include the Mesh.Render() function with the code I posted but I added it to the bottom of the first code block. Could someone validate it?&#xD;&#xA;&#xD;&#xA;**Voting to delete. I solved the problem while rearranging my architecture and it was an inheritance issue! (kicks self) Don't believe this question can help anyone.**" />
  <row Id="33374" PostHistoryTypeId="2" PostId="14827" RevisionGUID="810c7d90-b147-498b-a023-94d216a3dcac" CreationDate="2011-07-13T20:58:46.563" UserId="8275" Text="I am an absolute beginner with game programming, should this question be poorly formulated, be aware it was not sloppiness by my side, but lack of game programming experience.&#xD;&#xA;&#xD;&#xA;The game I am planning to code will use a top-down 2D map as &quot;world&quot;. The world might be larger than the window (the window can zoom in or out) and the vehicles can be located at any point of the world (= it's not a tiled map, the space is &quot;continuous&quot;).&#xD;&#xA;&#xD;&#xA;To clarify with an example: if the world is a terrain of 1000x1000 metres, a vehicle could be at location (327.31, 720.4) metres.&#xD;&#xA;&#xD;&#xA;My question is: **what is the most convenient way to represent the world internally?** I could think to these possibilities:&#xD;&#xA;&#xD;&#xA; - do nothing and **use metres** as if I were working with the physical object,&#xD;&#xA; - **normalise to pixels** defining the world size as the number of pixels for representing 1000 metres at maximum zoom,&#xD;&#xA; - **normalise to 1** defining the word as a square of size 1&#xD;&#xA;&#xD;&#xA;...but I am sure there might be some other ones / some of mine could make no sense. It's just that being my first game I don't have a clear pictures of the problems ahead of me, and I would like some guidance in making a reasonably correct initial choice.&#xD;&#xA;&#xD;&#xA;Thank you for your time." />
  <row Id="33375" PostHistoryTypeId="1" PostId="14827" RevisionGUID="810c7d90-b147-498b-a023-94d216a3dcac" CreationDate="2011-07-13T20:58:46.563" UserId="8275" Text="2d top-down map: normalisation or not?" />
  <row Id="33376" PostHistoryTypeId="3" PostId="14827" RevisionGUID="810c7d90-b147-498b-a023-94d216a3dcac" CreationDate="2011-07-13T20:58:46.563" UserId="8275" Text="&lt;2d&gt;&lt;maps&gt;" />
  <row Id="33377" PostHistoryTypeId="2" PostId="14828" RevisionGUID="326f4f82-3c25-482c-bdc0-96efe9625835" CreationDate="2011-07-13T20:59:11.383" UserId="2229" Text="I have read a lot individual information about three key 3D Graphics Authoring Applications: **Softimage, 3DS Max, Maya**.&#xD;&#xA;&#xD;&#xA;To me, it looks like each of them has its own way to accomplish the same goal, which brings me to the question, **is any of them better than the other ones?**&#xD;&#xA;&#xD;&#xA;In other words, if am free to decide which one of the three tools to use as my primary graphics development tool (for games graphics, web, commercials, animations..) and if I depend to nobody, **which application** should I decide for? **What criteria should I evaluate** those three applications in accordance to?&#xD;&#xA;&#xD;&#xA;As I have read a lot about Softimage, which is so far the most attractive to me because of its user interface and ICE, I came to question: **Is the future of Softimage bright?** is it not going to be merged or vanished over time? Lastly I checked, Autodesk offered Softimage as part of its key two packages: Maya, Max. It was not offered as standalone and competitive package to Max and Maya anymore." />
  <row Id="33378" PostHistoryTypeId="1" PostId="14828" RevisionGUID="326f4f82-3c25-482c-bdc0-96efe9625835" CreationDate="2011-07-13T20:59:11.383" UserId="2229" Text="Which 3D Authoring Application to Decide for" />
  <row Id="33379" PostHistoryTypeId="3" PostId="14828" RevisionGUID="326f4f82-3c25-482c-bdc0-96efe9625835" CreationDate="2011-07-13T20:59:11.383" UserId="2229" Text="&lt;3d&gt;&lt;graphics&gt;&lt;maya&gt;&lt;softimage&gt;&lt;max&gt;" />
  <row Id="33380" PostHistoryTypeId="2" PostId="14829" RevisionGUID="be8869fa-c6f4-41aa-b0bb-b0509cd1f652" CreationDate="2011-07-13T21:10:10.957" UserId="6803" Text="I've done some shader programming some time ago but only simple stuff. I'm especially interested in how do you manage shaders? Do you just write one of each kind, or do you need more of them? If so, how exactly do you split and managed them?&#xD;&#xA;&#xD;&#xA;Also I've recently read that all the transformation matrix operations I used in OpenGL(glPushMatrix, etc) are now deprecated and you need to manage your own matrices.Is that something you do in a vertex shader and how would I go about doing it correctly?&#xD;&#xA;&#xD;&#xA;Suggestions for books about this topic will be highly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you." />
  <row Id="33381" PostHistoryTypeId="1" PostId="14829" RevisionGUID="be8869fa-c6f4-41aa-b0bb-b0509cd1f652" CreationDate="2011-07-13T21:10:10.957" UserId="6803" Text="How to manage shaders?" />
  <row Id="33382" PostHistoryTypeId="3" PostId="14829" RevisionGUID="be8869fa-c6f4-41aa-b0bb-b0509cd1f652" CreationDate="2011-07-13T21:10:10.957" UserId="6803" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;resource-management&gt;" />
  <row Id="33383" PostHistoryTypeId="2" PostId="14830" RevisionGUID="49ab5054-7fc5-474a-b3e8-122717fe3fa0" CreationDate="2011-07-13T21:11:01.393" UserId="8427" Text="Of the three options you suggested, using meters will probably be best. As you create other data, dealing with length in meters will make you life much easier. Among other reasons, you may decide to change your world size, or different levels may need different sized maps.&#xD;&#xA;&#xD;&#xA;You may also decide to use feet (or possibly inches). Part of this decision may depend on what middleware packages you use - some physics engines prefer one unit type or another (though it's almost always configurable). For the most part, you can just choose a unit and go with it." />
  <row Id="33384" PostHistoryTypeId="6" PostId="14828" RevisionGUID="382c27fa-523b-4a5c-9906-d6a1e3f2a8cf" CreationDate="2011-07-13T21:19:38.800" UserId="2229" Comment="edited tags" Text="&lt;3d&gt;&lt;animation&gt;&lt;3dsmax&gt;&lt;maya&gt;&lt;softimage&gt;" />
  <row Id="33385" PostHistoryTypeId="2" PostId="14831" RevisionGUID="fcbbf922-ff71-400b-98f0-00205eb07320" CreationDate="2011-07-13T21:26:59.807" UserId="6877" Text="This question doesn't have any direct answer. It depends a lot on other parameters.&#xD;&#xA;&#xD;&#xA;You can google to sort out something, but other then that, either this is gonna be a huge comparison among features(which wont make any sense at all) or a straight forward answer to pick x or y. But, in short, XSI's ICE is very tempting for VFX but other then that 3ds Max and Maya is vastly superior. 3ds dominated gaming industry and Maya the movie industry. From my experience its easy to do easy things in 3ds max and easier to do hard things in maya.&#xD;&#xA;&#xD;&#xA;You can even try out [Blender](http://www.blender.org) &amp; see if it fits your need. [Houdini](http://sidefx.com/) offers procedural modeling solution. Which is awesome too!&#xD;&#xA;&#xD;&#xA;Another thing is that you are trying to find out the best solution for almost everything, but differnt situation demands different solutions.&#xD;&#xA;&#xD;&#xA;The basic functionality remains same across all the applications.For modeling you need some basic tool like extrusion, beveling, splitting edges etc etc. All this features are available in all tools. It's just a matter to get used to then. Unless you become a high level user the output wont different for using different software." />
  <row Id="33386" PostHistoryTypeId="2" PostId="14832" RevisionGUID="ded47e60-22e3-42a7-966e-e4872f61020a" CreationDate="2011-07-13T21:30:06.933" UserId="7881" Text="I agree with using a real-world value (meters, feet, etc.) as your basis for distance. The problem with your other two suggestions is that they are both variables. Working with a world size of `1` will cause all of your arithmetic to be floating-point, which may lead to errors at worst, or slower performance at best. Also, should you ever decide to make variable world sizes (&quot;Large&quot; worlds for longer games, etc.) you will introduce many problems to your code. Likewise, if you use pixels, even at a maximum/minimum zoom level, you will run into confusion as well as problems should you decide to increase or decrease zoom levels.&#xD;&#xA;&#xD;&#xA;That all being said, what I would probably do in this scenario is pick a small unit of measurement which is good enough for your purposes. I know you don't think you're working on a grid, but even floating point numbers have a finite amount of precision, forcing you to a (very miniscule) grid anyways. So let's say you pick centimeters. You can use 32-bit integers, each representing a centimeter, and still [map the entire Earth][1]. If centimeters aren't small enough, you can use 64-bit integers representing millimeters and [map half the distance to the nearest star][2]. The advantage of using integer values include faster arithmetic, and less rounding errors, so don't feel like you need floating-point numbers to get high accuracy!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.wolframalpha.com/input/?i=2%5E32%20cm&#xD;&#xA;  [2]: http://www.wolframalpha.com/input/?i=2%5E64%20mm" />
  <row Id="33387" PostHistoryTypeId="25" PostId="14829" RevisionGUID="c46a00aa-02dc-45f5-9a67-51d6872dbfdb" CreationDate="2011-07-13T21:31:48.463" Comment="http://twitter.com/#!/StackGameDev/status/91258548734017536" />
  <row Id="33388" PostHistoryTypeId="5" PostId="14831" RevisionGUID="d1201912-2cfd-40dc-8e1b-f5cb6b4a708b" CreationDate="2011-07-13T21:35:44.807" UserId="6877" Comment="added 358 characters in body" Text="This question doesn't have any direct answer. It depends a lot on other parameters.&#xD;&#xA;&#xD;&#xA;You can google to sort out something, but other then that, either this is gonna be a huge comparison among features(which wont make any sense at all) or a straight forward answer to pick x or y. But, in short, XSI's ICE is very tempting for VFX but other then that 3ds Max and Maya is vastly superior. 3ds dominated gaming industry and Maya the movie industry. From my experience its easy to do easy things in 3ds max and easier to do hard things in maya.&#xD;&#xA;&#xD;&#xA;You can even try out [Blender](http://www.blender.org) &amp; see if it fits your need. [Houdini](http://sidefx.com/) offers procedural modeling solution. Which is awesome too!&#xD;&#xA;&#xD;&#xA;Another thing is that you are trying to find out the best solution for almost everything, but differnt situation demands different solutions. For gaming blender can provide an excellent all around solution. The latest installment of Duke Nukem, the developers are using blender(don't know on how extent) for rigging &amp; animation.&#xD;&#xA;&#xD;&#xA;The basic functionality remains same across all the applications.For modeling you need some basic tool like extrusion, beveling, splitting edges etc etc. All this features are available in all tools. It's just a matter to get used to then. Unless you become a high level user the output wont different for using different software.&#xD;&#xA;&#xD;&#xA;Its all vague, but if you ask which one is best to start with, I would say Maya. You can switch to anything later on, depending on what the time and situation demands." />
  <row Id="33389" PostHistoryTypeId="2" PostId="14833" RevisionGUID="820c619c-8f37-400c-8ef5-3b5505bbdeab" CreationDate="2011-07-13T21:51:21.253" UserId="8579" Text="I need help in implementing the projectile motion in my game as was implemented in angry birds .please help" />
  <row Id="33390" PostHistoryTypeId="1" PostId="14833" RevisionGUID="820c619c-8f37-400c-8ef5-3b5505bbdeab" CreationDate="2011-07-13T21:51:21.253" UserId="8579" Text="How can I implement projectile motion like angry birds?" />
  <row Id="33391" PostHistoryTypeId="3" PostId="14833" RevisionGUID="820c619c-8f37-400c-8ef5-3b5505bbdeab" CreationDate="2011-07-13T21:51:21.253" UserId="8579" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="33392" PostHistoryTypeId="2" PostId="14834" RevisionGUID="cf2052f3-9fce-44b5-b5aa-bed9a65d6527" CreationDate="2011-07-13T21:56:37.940" UserId="744" Text="&lt;em&gt;&lt;a href=&quot;http://pragprog.com/the-pragmatic-programmer&quot;&gt;The Pragmatic Programmer&lt;/a&gt;&lt;/em&gt; devoted a section to this:&#xD;&#xA;&#xD;&#xA;&gt; We think it is better to know one editor very well, and to use it for all editing tasks.... Without a single editor, you face a potential modern day Babel of confusion... Choose an editor, know it thoroughly, and use it for all editing tasks. If you use a single editor (or set of keybindings) across all [model] editing activities, you don't have to stop and think to accomplish [geometry] manipulation: the necessary keystrokes will be a reflex. The editor will be an extension of your hand; the keys will sing as they slice their way through the [models] and thought. That's our goal.&#xD;&#xA;&#xD;&#xA;Actually they were talking about text editors, but it's not different. All the tools you have named are fine tools - none of them are the Windows Notepad of 3D asset creation (nor is Blender).&#xD;&#xA;&#xD;&#xA;Pick one, use it, learn it well enough you don't need to think about it. One day you'll probably find yourself in another program, and you won't use it as well, but that's OK - time spent not mastering ten editors is time spent learning the task at hand, and that will pay off far more when your next job is using the eleventh one anyway." />
  <row Id="33393" PostHistoryTypeId="2" PostId="14835" RevisionGUID="7ae23149-35f8-425f-a6c6-393af864276c" CreationDate="2011-07-13T21:58:26.270" UserId="4513" Text="Physics.&#xD;&#xA;&#xD;&#xA;Specifically look at [http://en.wikipedia.org/wiki/Hooke's_law][1], [http://en.wikipedia.org/wiki/Equations_of_motion][2] and the application of a constant force of gravity.&#xD;&#xA;&#xD;&#xA;Obviously if you're not sure about how to apply these things together, perhaps look at implementing a Physics engine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Hooke%27s_law&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Equations_of_motion" />
  <row Id="33394" PostHistoryTypeId="2" PostId="14836" RevisionGUID="5b89bea4-a409-4fc5-b170-303a2af66551" CreationDate="2011-07-13T21:58:26.363" UserId="8285" Text="Here is some code for doing exactly what your ask for...&#xD;&#xA;&#xD;&#xA;http://developer.anscamobile.com/code/how-make-angry-birds-catapult&#xD;&#xA;&#xD;&#xA;It's written in Lua and uses the Corona SDK. But I'm sure you could port it over to whatever platform you are working on." />
  <row Id="33395" PostHistoryTypeId="2" PostId="14837" RevisionGUID="222a6dc8-3599-4107-8b18-033b7491f44d" CreationDate="2011-07-13T21:58:53.697" UserId="6877" Text="You haven't told us what is the problem. Anyway, I guess you are asking how to do it. Here is a [link](http://en.wikipedia.org/wiki/Trajectory_of_a_projectile). &#xD;&#xA;&#xD;&#xA;Implementing the equations is not hard at all." />
  <row Id="33396" PostHistoryTypeId="2" PostId="14838" RevisionGUID="5d7f937e-cfaa-4ea4-8b14-8ca5c3db4134" CreationDate="2011-07-13T21:59:09.420" UserId="7881" Text="Projectile motion is just a function of gravity and velocity. At every tick, decrease your vertical velocity by `g` (the force of gravity), and then add `g` to your current height. If you're having trouble doing this, come back and ask another question with some of the code that you've tried.&#xD;&#xA;&#xD;&#xA;For a more in depth look at the physics required in these sorts of games, Google around for some game development blogs or how-to's, or start with [this one here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/integration-basics/" />
  <row Id="33397" PostHistoryTypeId="2" PostId="14839" RevisionGUID="032b7067-8e34-4270-9fe2-9739a14086f6" CreationDate="2011-07-13T22:08:56.277" UserId="7640" Text="i'm trying to get around the rule of only being able to form concave shapes in the SFML c++ library. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; To do this I'm planning on testing given vertices, and if not concave,&#xD;&#xA;&gt; splitting the vertices into groups, testing each groups' concaveness,&#xD;&#xA;&gt; and repeating until a full set of concave shapes results that look&#xD;&#xA;&gt; just like the original shape when put together&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What I would like to know is...&#xD;&#xA;&#xD;&#xA; - **What the equation for testing a shapes concaveness is: What is it and how does it work?**&#xD;&#xA;&#xD;&#xA; - **How would i split up the vertices of the non-concave shape so in the end the shape is formed out of as few concave shapes as possible?**&#xD;&#xA;&#xD;&#xA; - **Whats the best practice for achieving my goal?**&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33398" PostHistoryTypeId="1" PostId="14839" RevisionGUID="032b7067-8e34-4270-9fe2-9739a14086f6" CreationDate="2011-07-13T22:08:56.277" UserId="7640" Text="How to form a non-Concave shape out of Concave shapes?" />
  <row Id="33399" PostHistoryTypeId="3" PostId="14839" RevisionGUID="032b7067-8e34-4270-9fe2-9739a14086f6" CreationDate="2011-07-13T22:08:56.277" UserId="7640" Text="&lt;math&gt;&lt;graphics&gt;&lt;box2d&gt;&lt;sfml&gt;" />
  <row Id="33401" PostHistoryTypeId="5" PostId="14831" RevisionGUID="b2273f96-cd0e-410c-88df-5f3ce19c2456" CreationDate="2011-07-13T22:22:03.753" UserId="6877" Comment="added 2 characters in body" Text="This question doesn't have any direct answer. It depends a lot on other parameters.&#xD;&#xA;&#xD;&#xA;You can google to sort out something, but other then that, either this is gonna be a huge comparison among features(which wont make any sense at all) or a straight forward answer to pick x or y. But, in short, XSI's ICE is very tempting for VFX but other then that 3ds Max and Maya is vastly superior. 3ds dominated gaming industry and Maya the movie industry. *From my experience its easy to do easy things in 3ds max and easier to do hard things in maya.*&#xD;&#xA;&#xD;&#xA;You can even try out [Blender](http://www.blender.org) &amp; see if it fits your need. [Houdini](http://sidefx.com/) offers procedural modeling solution. Which is awesome too!&#xD;&#xA;&#xD;&#xA;Another thing is that you are trying to find out the best solution for almost everything, but differnt situation demands different solutions. For gaming blender can provide an excellent all around solution. The latest installment of Duke Nukem, the developers are using blender(don't know on how extent) for rigging &amp; animation.&#xD;&#xA;&#xD;&#xA;The basic functionality remains same across all the applications.For modeling you need some basic tool like extrusion, beveling, splitting edges etc etc. All this features are available in all tools. It's just a matter to get used to then. Unless you become a high level user the output wont different for using different software.&#xD;&#xA;&#xD;&#xA;Its all vague, but if you ask which one is best to start with, I would say Maya. You can switch to anything later on, depending on what the time and situation demands." />
  <row Id="33403" PostHistoryTypeId="2" PostId="14841" RevisionGUID="c523d7f5-db76-42b3-8e3c-ac8a7f01190f" CreationDate="2011-07-13T23:27:51.637" UserId="8581" Text="Recently I've been looking into developing games for N64 emulators and modding existing ROMs and I wanted to know if there are any tools out there which can be used to write the code for the emulators or if all of that is off limits.&#xD;&#xA;&#xD;&#xA;I heard that the N64 SDK has always been sealed by an NDA limited to the game studios years ago, however I'm curious about where all the current  ROMs available came from (mainly because unlike discs, cartridges are not typically supported by standard hardware)." />
  <row Id="33404" PostHistoryTypeId="1" PostId="14841" RevisionGUID="c523d7f5-db76-42b3-8e3c-ac8a7f01190f" CreationDate="2011-07-13T23:27:51.637" UserId="8581" Text="N64 SDK and Coding" />
  <row Id="33405" PostHistoryTypeId="3" PostId="14841" RevisionGUID="c523d7f5-db76-42b3-8e3c-ac8a7f01190f" CreationDate="2011-07-13T23:27:51.637" UserId="8581" Text="&lt;architecture&gt;&lt;engine&gt;" />
  <row Id="33406" PostHistoryTypeId="2" PostId="14842" RevisionGUID="a51eb63d-0f33-4e72-94fb-5f28ce4cc812" CreationDate="2011-07-13T23:36:48.307" UserId="8582" Text="Be careful, NVIDIA silently upgrades your incorrect set pixelshader/vertexshader versions.&#xD;&#xA;ATI will fail.&#xD;&#xA;Use the DirectX SDK to check for warnings.&#xD;&#xA;My pixelshader was set to 3.0 and my (spriteBatch) Vertex shader to 2.0..." />
  <row Id="33407" PostHistoryTypeId="5" PostId="14839" RevisionGUID="1f727cb6-7e9b-420d-8618-1bd6811af5e3" CreationDate="2011-07-13T23:44:46.693" UserId="7640" Comment="deleted 11 characters in body" Text="i'm trying to get around the rule of only being able to form convex shapes in the SFML c++ library. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; To do this I'm planning on testing given vertices, and if concave,&#xD;&#xA;&gt; splitting the vertices into groups, testing each groups' concaveness,&#xD;&#xA;&gt; and repeating until a full set of convex shapes results that look&#xD;&#xA;&gt; just like the original shape when put together&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What I would like to know is...&#xD;&#xA;&#xD;&#xA; - **What the equation for testing a shapes concaveness is: What is it and how does it work?**&#xD;&#xA;&#xD;&#xA; - **How would i split up the vertices of the concave shape so in the end the shape is formed out of as few convex shapes as possible?**&#xD;&#xA;&#xD;&#xA; - **Whats the best practice for achieving my goal?**&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33408" PostHistoryTypeId="5" PostId="14721" RevisionGUID="31296ae0-23eb-4a5f-8847-5fd144c9e900" CreationDate="2011-07-14T00:17:59.567" UserId="8533" Comment="deleted 438 characters in body" Text="I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a high-end GPU do that a modern smartphone cannot do? It's clear that games in a desktop look much better but what is behind those differences? I am aware that the APIs supported are different (D3DMobile, OpenGL ES vs full direct3d and opengl), even XNA has the Reach and Hi-Def graphics profile. I can see some of the differences here:&#xD;&#xA;&#xD;&#xA;http://my.safaribooksonline.com/book/programming/game-programming/9780132620185/reach-vsdot-hidef-chart/app01lev1sec1#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODAxMzI2MjAxODUvNDU1)&#xD;&#xA;&#xD;&#xA;What is the impact in let's say a game, what kind of effects or visuals I cannot get in a mobile due to this limitations, and what's the reasoning behind them. What is the bottleneck or restriction that prevents mobile devices to produce them.&#xD;&#xA;&#xD;&#xA;Any thoughts or good resources to read about will be very appreciated.&#xD;&#xA;&#xD;&#xA;EDIT: I am aware of the price/power/heat/form factor restrictions imposed on mobile GPUs. What I am trying to get at is the implications of those differences. Let's say that you can't use some type or size or textures, or maybe there is a maximum number of polygons, or certain type of transformations are not allowed. And from that I would like to know the practical consequence (i.e. water looks less real, objects up close look pixelated, the lighting is more flat). &#xD;&#xA;I am just guessing, but I would like to know for sure. In short, I want to know if I were to do a game with all the features of a high-end gpu (for example, a DX11 compatible one), and write the same game for a phone. What will I be missing, and in terms of visual perception what would look different?" />
  <row Id="33409" PostHistoryTypeId="2" PostId="14843" RevisionGUID="4bf411c0-710f-4223-89c6-843898d6a82a" CreationDate="2011-07-14T00:27:13.723" UserId="5824" Text="A significant proportion of the networking code can be independent of the game that you're playing. Because of that, and because you're new to networking, the first thing I'd suggest you do is to find libraries that will do that work for you. RakNet for example.&#xD;&#xA;&#xD;&#xA;One thing you will want in your game code is the ability to handle multiple different game states, which you can use for interpolation and prediction. That's fairly simple to design in up front, but can be a significant quantity of work if you're modifying an existing single player game.&#xD;&#xA;&#xD;&#xA;Also note that if you want to get strangers to play a peer to peer game over the internet, you will probably need at least one server somewhere that handles the lobby / matchmaking." />
  <row Id="33410" PostHistoryTypeId="25" PostId="14841" RevisionGUID="7516c2bf-30e2-488b-9af0-4eac3786bf86" CreationDate="2011-07-14T00:31:50.107" Comment="http://twitter.com/#!/StackGameDev/status/91303851868688384" />
  <row Id="33411" PostHistoryTypeId="5" PostId="14652" RevisionGUID="e2c0ae2f-ff54-4317-80ac-d3f727a9ba8f" CreationDate="2011-07-14T00:37:24.197" UserId="998" Comment="Improved it" Text="# Edit&#xD;&#xA;&#xD;&#xA;## I have &lt;a href=&quot;http://ideone.com/JDleh&quot;&gt;improved it&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;It seems the key thing I changed is classifying the intersections.&#xD;&#xA;&#xD;&#xA;Intersections are either:&#xD;&#xA; &#xD;&#xA;  - Ceiling bumps&#xD;&#xA;  - Ground hits (push out of the floor)&#xD;&#xA;  - Mid-air wall collisions&#xD;&#xA;  - Grounded wall collisions&#xD;&#xA;&#xD;&#xA;and I resolve them in that order&#xD;&#xA;&#xD;&#xA;Define a ground collision as player being at least 1/4 way on the tile&#xD;&#xA;&#xD;&#xA;So this is a ground collision and the player (__blue__) will sit on top of the tile (__black__)&#xD;&#xA;![ground collision][1]&#xD;&#xA;&#xD;&#xA;But this is NOT a ground collision and the player will &quot;slip&quot; on the right side of the tile when he lands on it&#xD;&#xA;![not gonig to be a ground collision player will slip by][2]&#xD;&#xA;&#xD;&#xA;By this method the player will no longer get caught on the sides of walls&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/9yNeK.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/LRcvr.png" />
  <row Id="33412" PostHistoryTypeId="25" PostId="14827" RevisionGUID="56314228-934e-47cd-a646-d65861c3cf1e" CreationDate="2011-07-14T03:31:51.593" Comment="http://twitter.com/#!/StackGameDev/status/91349157289267201" />
  <row Id="33413" PostHistoryTypeId="2" PostId="14844" RevisionGUID="8de9b1f3-4cdf-475b-9bd8-42ebded702d1" CreationDate="2011-07-14T04:00:32.103" UserId="4406" Text="Take a game with a persistent state that can continue even when players are not online. E.g. your player enters into a fight and loses some health points which are replenished 1 point every five minutes. There are a number of ways to implement this &quot;update stuff even when the player isn't logged in&quot; scenario. E.g. run a server-side background worker that performs scheduled updates (e.g. +1 to health) once a second.&#xD;&#xA;&#xD;&#xA;Or, forgo the background worker and store the next-update-time for an attribute (e.g. health) in your Player model. Then, anywhere you fetch/get a Player, perform any attribute updates lazily. That is, if the next-update-time is earlier than the fetch/get time (e.g. &quot;now&quot;), update the attribute and then return the updated Player.&#xD;&#xA;&#xD;&#xA;My goal is to make this system as simple as possible.&#xD;&#xA;&#xD;&#xA;What are your thoughts? How would you do this?" />
  <row Id="33414" PostHistoryTypeId="1" PostId="14844" RevisionGUID="8de9b1f3-4cdf-475b-9bd8-42ebded702d1" CreationDate="2011-07-14T04:00:32.103" UserId="4406" Text="How to design player attribute updates in persistent game worlds?" />
  <row Id="33415" PostHistoryTypeId="3" PostId="14844" RevisionGUID="8de9b1f3-4cdf-475b-9bd8-42ebded702d1" CreationDate="2011-07-14T04:00:32.103" UserId="4406" Text="&lt;rpg&gt;&lt;world-design&gt;" />
  <row Id="33416" PostHistoryTypeId="2" PostId="14845" RevisionGUID="591c2e50-80a2-4c70-bcb7-0781dbcf6d91" CreationDate="2011-07-14T04:16:38.067" UserId="8585" Text="I hope this question hasn't been asked before.&#xD;&#xA;&#xD;&#xA;I'm thinking of creating an MMO game, perhaps for Facebook. I've investigated the options of using Java or Flash/Flex. But I'm still not sure which to go with. Does anyone have any advice on which language to use?&#xD;&#xA;&#xD;&#xA;Which language has more open source or free tools/libraries? Which one has better performance for a database transaction-heavy game?&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA;I'm intending it to be a 2D, isometric game with cartoony graphics. Nothing necessarily intense on the graphics front. I've heard of JMonkeyEngine, but that's 3D. The only other thing I've found that's good for 2D is LWJGL. One thing I don't like about Flash/Flex is that it can't create a direct connection to the database. Is that also true for a Java-based game?&#xD;&#xA;&#xD;&#xA;Essentially, I would like to know how to approach the development of an MMO. What tools/libraries should I use? I'm hoping that there are open source/free options.&#xD;&#xA;&#xD;&#xA;Thank you for your time." />
  <row Id="33417" PostHistoryTypeId="1" PostId="14845" RevisionGUID="591c2e50-80a2-4c70-bcb7-0781dbcf6d91" CreationDate="2011-07-14T04:16:38.067" UserId="8585" Text="Java or Flash for MMO Game?" />
  <row Id="33418" PostHistoryTypeId="3" PostId="14845" RevisionGUID="591c2e50-80a2-4c70-bcb7-0781dbcf6d91" CreationDate="2011-07-14T04:16:38.067" UserId="8585" Text="&lt;java&gt;&lt;flash&gt;&lt;mmo&gt;" />
  <row Id="33419" PostHistoryTypeId="2" PostId="14846" RevisionGUID="705ea21c-bf01-4759-a360-6276b84da224" CreationDate="2011-07-14T04:21:58.730" UserId="7911" Text="These updates typically take place in &quot;game time,&quot; not real time.  Slipstream the code to update statistics and effects that should change over time right before the sequence that inserts the character into the world.  At that point you know how long it has been since the character logged out and now when he's about to log back into the game environment, your calculations can be done using that delta instead of a cron like tick.&#xD;&#xA;&#xD;&#xA;The only time you would need to tick when someone is offline is if their character were left active in the game world, in which case the normal game logic would handle all the updates so nothing special needs doing.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33420" PostHistoryTypeId="2" PostId="14847" RevisionGUID="21f328d2-c3ae-458f-9daa-2df51ca11e20" CreationDate="2011-07-14T04:29:14.530" UserId="7548" Text="If these things are occurring while the player is offline, then simply use calculations to determine what the values should be when they're logged on next (and do the same whenever another player in the game accesses their publicly viewable statistics that would be effected by this).&#xD;&#xA;&#xD;&#xA;For example, a player sustains a sickness that can be half-way recovered after 5 minutes, and fully recovered after 10 minutes, regardless of whether they're logged in -- you could implement this with a special table in the database for tracking such updates, and then when various players or login events occur, the calculation is run accordingly:&#xD;&#xA;&#xD;&#xA;* 08:28  Player sustains sickness, record is added to the tracking table which includes the relevant calculation details and player ID number&#xD;&#xA;&#xD;&#xA;* 08:29  Player logs out&#xD;&#xA;&#xD;&#xA;* 08:31  Another player views this player's statistics, and the game checks the table to determine that the player is sick because not even 5 minutes have passed&#xD;&#xA;&#xD;&#xA;* 08:35  Another player views this player's statistics, and the game checks the table to determine that the player is half-recovered from their sickness because more than 5 minutes have passed, but 10 minutes have not yet&#xD;&#xA;&#xD;&#xA;* 08:37  Player logs back in and the game calculates the statistics, and the player can see that their character is 50% sick (and will be recovered after one more minute)&#xD;&#xA;&#xD;&#xA;* 08:38  Player's client software automatically queries the server and the server determines that a full recovery occurred, sends the update to the client and deletes the record from the table&#xD;&#xA;&#xD;&#xA;There are other ways to do this as well, and this probably isn't the most efficient solution (I look forward to seeing other answers with different solutions).  Of course, if the player logged in after 10 minutes, or another player checked the player after 10 minutes, then the server would automatically take care of deleting that record and none of the players would know that there was any sickness.&#xD;&#xA;&#xD;&#xA;One advantage is that there are far less work for the server due to being player-event driven rather than cron-tick driven (which could result in more work for the server).&#xD;&#xA;" />
  <row Id="33421" PostHistoryTypeId="5" PostId="14847" RevisionGUID="c4698c86-6340-43a1-9263-47527f9d2f9b" CreationDate="2011-07-14T04:34:33.247" UserId="7548" Comment="deleted 5 characters in body" Text="If these things are occurring while the player is offline, then simply use calculations to determine what the values should be when they're logged on next (and do the same whenever another player in the game accesses their publicly viewable statistics that would be effected by this).&#xD;&#xA;&#xD;&#xA;For example, a player sustains a sickness that can be half-way recovered after 5 minutes, and fully recovered after 10 minutes, regardless of whether they're logged in -- you could implement this with a special table in the database for tracking such updates, and then when various players or login events occur, the calculation is run accordingly:&#xD;&#xA;&#xD;&#xA;* 08:28  Player sustains sickness, record is added to the tracking table which includes the relevant calculation details and player ID number&#xD;&#xA;&#xD;&#xA;* 08:29  Player logs out&#xD;&#xA;&#xD;&#xA;* 08:31  Another player views this player's statistics, and the game checks the table to determine that the player is sick because not even 5 minutes have passed&#xD;&#xA;&#xD;&#xA;* 08:35  Another player views this player's statistics, and the game checks the table to determine that the player is half-recovered from their sickness because more than 5 minutes have passed, but 10 minutes have not yet&#xD;&#xA;&#xD;&#xA;* 08:37  Player logs back in and the game calculates the statistics, and the player can see that their character is 50% sick (and will be recovered after approximately one more minute)&#xD;&#xA;&#xD;&#xA;* 08:38  Player's client software automatically queries the server and the server determines that a full recovery occurred, sends the update to the client and deletes the record from the table&#xD;&#xA;&#xD;&#xA;There are other ways to do this as well, and this probably isn't the most efficient solution (I look forward to seeing other answers with different solutions).  Of course, if the player logged in after 10 minutes, or another player checked the player after 10 minutes, then the server would automatically take care of deleting that record and none of the players would know that there was any sickness.&#xD;&#xA;&#xD;&#xA;One advantage is that there is less work for the server due to being player-event driven rather than cron-tick driven (which could result in more work for the server).&#xD;&#xA;" />
  <row Id="33422" PostHistoryTypeId="5" PostId="14747" RevisionGUID="a25732ed-85d3-42ea-8615-66cdfc4e6a75" CreationDate="2011-07-14T05:48:41.963" UserId="8050" Comment="added 432 characters in body" Text="Let A and B be your vectors:&#xD;&#xA;&#xD;&#xA;![result][1]&#xD;&#xA;&#xD;&#xA;The summing vectors do not need to be unit vectors but simply equal in length so, if |A| &gt;= |B|, you can:&#xD;&#xA;&#xD;&#xA;![equivalent result][2]&#xD;&#xA;&#xD;&#xA;which is more numerically stable since you have only a fraction and the bigger denominator&#xD;&#xA;&#xD;&#xA;![how sum works][3]&#xD;&#xA;&#xD;&#xA;The same result can be obtained by substraction, once again the vectors has to be equal in length&#xD;&#xA;&#xD;&#xA;This works only for non-convex angles; you can simply test if your angle is convex and multiply H by -1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/QTcwR.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/3z1nm.gif&#xD;&#xA;  [3]: http://i.stack.imgur.com/Tz5MU.png" />
  <row Id="33423" PostHistoryTypeId="2" PostId="14848" RevisionGUID="c0a703f3-b586-45e7-835b-ccafbfeb8c78" CreationDate="2011-07-14T05:58:32.620" UserId="1738" Text="Rather than a top down approach, try a bottom up one.  I.e., grow convex regions out of sets of vertices (starting with a tetrahedron), then grow these by adding adjacent (in terms of triangle connectivity).  When you cannot find another vertex to add, find an unadded tetrahedron (easily started from 2 adjacent triangles with non-reflexive angle on the interior shared edge), and repeat.&#xD;&#xA;&#xD;&#xA;Detecting if adding the vertex will maintain convexity is relatively easy (note that you are not just adding to a convex hull - effectively, if adding a vertex to the convex hull you are growing results in one of the surface vertices becoming interior to the hull, it is not a valid point to add).  The tricky bit is determining which vertices should be added to minimize the number of convex volumes.  In practice this is a hard optimization problem, and heuristics are likely good enough to get a &quot;good enough&quot; decomposition.&#xD;&#xA;&#xD;&#xA;Incidentally, if you want to read up more on this, the term you want to search for is &quot;3D Convex Decomposition&quot;.  FYI, a BSP tree will also give you a convex decomposition of a non-convex object, but it will be far from minimal." />
  <row Id="33424" PostHistoryTypeId="2" PostId="14849" RevisionGUID="bc217b8d-a36e-40af-bf17-fe5d119aab40" CreationDate="2011-07-14T06:08:13.970" UserId="7640" Text="You can test for a shape being a convex hull by going round all the edges and checking the next edge is always moving in the same direction (left/right handed). This is a quick and cheap algorithm. There is an implementation of this here: en.wikipedia.org/wiki/Graham_scan&#xD;&#xA;&#xD;&#xA;If you don't have a convex hull, perform a package wrapping algorithm to get a convex border that encompasses all your points (again quite fast). en.wikipedia.org/wiki/Gift_wrapping_algorithm&#xD;&#xA;&#xD;&#xA;Now, look for points that are on your shape, but aren't on the convex border. For each run of these points, create 2 new shapes: one from the checked points plus the non-border point, and one using the unchecked points.&#xD;&#xA;&#xD;&#xA;Recursion is now your friend: do the exact same process on each of the sub-shapes you have just made.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33425" PostHistoryTypeId="25" PostId="14844" RevisionGUID="8bc03259-9064-42d3-82c3-62b0f650ab12" CreationDate="2011-07-14T06:31:51.977" Comment="http://twitter.com/#!/StackGameDev/status/91394459744473089" />
  <row Id="33426" PostHistoryTypeId="2" PostId="14850" RevisionGUID="372a31d7-7286-4488-96e1-49e51c64ec53" CreationDate="2011-07-14T06:58:29.690" UserId="5014" Text="I'm thinking of making a lander game, where you control a spaceship and need to land it without crashing. What is a simple formula to calculate speed of falling or acceleration with relation to  working time to time engines?" />
  <row Id="33427" PostHistoryTypeId="1" PostId="14850" RevisionGUID="372a31d7-7286-4488-96e1-49e51c64ec53" CreationDate="2011-07-14T06:58:29.690" UserId="5014" Text="How to calculate falling and accelerating velocity?" />
  <row Id="33428" PostHistoryTypeId="3" PostId="14850" RevisionGUID="372a31d7-7286-4488-96e1-49e51c64ec53" CreationDate="2011-07-14T06:58:29.690" UserId="5014" Text="&lt;physics&gt;" />
  <row Id="33429" PostHistoryTypeId="2" PostId="14851" RevisionGUID="64c3b9e4-5c93-47bf-9baf-8676f5eafc1a" CreationDate="2011-07-14T08:30:00.300" UserId="20" Text="It depends on what kind of assets you want to create. Some 3D packages excel at low-poly modelling, while others provide sculpting and other sophisticated high-poly modelling tools.&#xD;&#xA;&#xD;&#xA;It's quite common that artists use different modelling packages for different jobs. [ZBrush][1] is widely used to sculpt high-poly models that are then imported in other 3D packages (where you bake the high-poly model to a normal-map of a low-poly model). Some people like [Wings3D][2] because it has excellent (low) polygon modelling tools.&#xD;&#xA;&#xD;&#xA;[Blender][3] has very good UV unwrapping features. I already heard of people that take their models to blender just for unwrapping.&#xD;&#xA;&#xD;&#xA;So what I'm trying to say is: People tend to use the right tool for the job. They don't pick a modelling package and stick with it. If you're new to 3D modelling, then basically any 3d-modelling software will do to get you started. All the packages you mentioned provide excellent modelling and animation tools, where Maya and 3DS Max are probably the most popular packages.&#xD;&#xA;&#xD;&#xA;The underlying basics of 3D modelling packages are all the same so it doesn't matter that much which package you decide to choose. Once you know one software, it shouldn't be that hard to learn another tool (much like learning a new programming language isn't that hard if you have experience in another programming language).&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pixologic.com/zbrush/&#xD;&#xA;  [2]: http://www.wings3d.com/&#xD;&#xA;  [3]: http://www.blender.org/" />
  <row Id="33430" PostHistoryTypeId="2" PostId="14852" RevisionGUID="705a97a1-866f-4a9d-93e3-e73be6178b12" CreationDate="2011-07-14T08:53:42.017" UserId="8050" Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **A** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **A** = **A** + **G** make sure that **G** points toward the planet's center&#xD;&#xA; - update the velocity vector **V** = **V** + **A**&amp;middot;*dt*&#xD;&#xA; - update the position vector **X** = **X** + **V**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**G**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;G is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="33431" PostHistoryTypeId="2" PostId="14853" RevisionGUID="60b1044c-0fcb-4e66-83e8-b51d692a1ac2" CreationDate="2011-07-14T09:10:00.780" UserId="20" Text="You'll have to write client- and a server-software for an MMO. Your client won't establish a direct database connection (which would be *way* too risky), but rather communicate with the server-software that handles all DB transactions. &#xD;&#xA;&#xD;&#xA;You can program your backend in Java, Rails, Python, PHP or similar. For the client I suggest you use Flash. It is ubiquitous (except iOS devices, but Java won't run there either) and you'll find lots of libraries/tools for Flash. You can also develop Flash games using free software. See this [question][1].&#xD;&#xA;&#xD;&#xA;If your client is going to be rather simple, you could also look into a pure HTML/JavaScript client.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/325/how-can-i-develop-flash-games-without-expensive-software" />
  <row Id="33432" PostHistoryTypeId="25" PostId="14850" RevisionGUID="4ca78092-4cc8-4f0b-bbbf-30e5faf9a0ab" CreationDate="2011-07-14T09:31:52.980" Comment="http://twitter.com/#!/StackGameDev/status/91439761738317824" />
  <row Id="33433" PostHistoryTypeId="5" PostId="14806" RevisionGUID="35349691-35e4-48ec-94ae-91979c652872" CreationDate="2011-07-14T10:05:04.707" UserId="2612" Comment="deleted 52 characters in body; edited tags; edited title" Text="I'm creating a platformer game that has a &quot;co-operative&quot; feature which I'd like to work over networks / the internet.&#xD;&#xA;&#xD;&#xA;Now I've read up on network game programming including articles like [What every programmer needs to know about game networking](http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/) and so I understand the difference between techniques like Peer-to-Peer lockstep and Server-Client prediction architectures:&#xD;&#xA;&#xD;&#xA; - I've concluded that for any real-time game that is going to be played over the internet, Peer-to-Peer lockstep simply isn't an option.&#xD;&#xA; - I'm also concerned that even for a platformer a simple client-server architecture (without some sort of client prediction) would result in degraded gameplay due to the delay between action and reaction caused by a round-trip to a server. (Having said that I want to eliminate the need for a central server, and so only one of the players, the client, will actually experience this lag).&#xD;&#xA; &#xD;&#xA;This leaves client prediction, but even for a simple game like a platformer this still sounds pretty complex.&#xD;&#xA;&#xD;&#xA;How would I go about creating a working client predictive system for a multiplayer platformer game?" />
  <row Id="33434" PostHistoryTypeId="4" PostId="14806" RevisionGUID="35349691-35e4-48ec-94ae-91979c652872" CreationDate="2011-07-14T10:05:04.707" UserId="2612" Comment="deleted 52 characters in body; edited tags; edited title" Text="What is involved in creating a real-time multiplayer platformer game?" />
  <row Id="33435" PostHistoryTypeId="6" PostId="14806" RevisionGUID="35349691-35e4-48ec-94ae-91979c652872" CreationDate="2011-07-14T10:05:04.707" UserId="2612" Comment="deleted 52 characters in body; edited tags; edited title" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;platformer&gt;" />
  <row Id="33441" PostHistoryTypeId="2" PostId="14855" RevisionGUID="1c7332e8-3927-4490-9063-67762c92c137" CreationDate="2011-07-14T13:32:34.517" UserId="8594" Text="I'll answer your second querstion first: both vertex and pixel shaders can treat part of (4 constants) their assigned constant memory (basically an array of 4D vectors, which can also be interpreted as integers or booleans with more modern shader versions) as a matrix in row-major format. It's up to you to upload the &quot;right&quot; transformation matrix for a job. So for example, for a standard 3D transform you'd upload this: Matrix mFullTransform = mProj * mView * mWorld, to transform a rigid vertex from object space. Get a basic (may just as well be dated) book about programming the post-fixed-pipe graphics pipeline. I have an old nVidia book called the CG tutorial lying around that covers this quite well.&#xD;&#xA;&#xD;&#xA;As for multiple shaders, depending on your application design it might be a good idea to split up vertex and pixel shaders. From there on a common challenge is to write a shader that transforms/renders geometry based on a material. The material likely imposes small differences in the shader code. Now you can choose to upload these parameters (for a modern model) to constants and branch at runtime. This is not a very speedy approach though so it might be a good idea to take a different one. An often used strategy is to 'build' (or splice) and compile shaders at compiletime (or, in some simpler or runtime cases on initialization) and pair them up with the corresponding (material) data. Tailor your solution to your needs: for simple games and graphics demos it usually suffices to write all the shaders by hand and perhaps take a small hit left or right for a runtime parameter or 2.&#xD;&#xA;&#xD;&#xA;Anyway hope it helps, been out of this game for a while." />
  <row Id="33443" PostHistoryTypeId="2" PostId="14856" RevisionGUID="6e1b6dda-4424-4407-99b9-b4d084e1f4d8" CreationDate="2011-07-14T15:49:55.000" UserId="8307" Text="I have a mesh that is computer generated with a texture on top of it with transparancy on one side. The SamplerState is set to LinearWrap because I would like the texture to wrap. The problem I have is that this transparent edge has some weird aliasing. This does not occur when I set the SamplerState to LinearClamp. What could be the problem?&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/V7p2I.png" />
  <row Id="33444" PostHistoryTypeId="1" PostId="14856" RevisionGUID="6e1b6dda-4424-4407-99b9-b4d084e1f4d8" CreationDate="2011-07-14T15:49:55.000" UserId="8307" Text="Line at edge of transparent texture on XNA mesh" />
  <row Id="33445" PostHistoryTypeId="3" PostId="14856" RevisionGUID="6e1b6dda-4424-4407-99b9-b4d084e1f4d8" CreationDate="2011-07-14T15:49:55.000" UserId="8307" Text="&lt;xna&gt;&lt;textures&gt;&lt;transparency&gt;&lt;antialiasing&gt;" />
  <row Id="33446" PostHistoryTypeId="5" PostId="14856" RevisionGUID="2b0c7a93-e769-4426-b9d2-9367e6eaa35f" CreationDate="2011-07-14T15:58:20.293" UserId="8307" Comment="added 247 characters in body" Text="I have a mesh that is computer generated with a texture on top of it with transparancy on one side. The SamplerState is set to LinearWrap because I would like the texture to wrap. The problem I have is that this transparent edge has some weird aliasing. This does not occur when I set the SamplerState to LinearClamp.&#xD;&#xA;&#xD;&#xA;I found that when letting the U coordinate go from 0.1 to 0.9 this does not happen. Probably on the transparent side it interpolates U coordinate 1 with U coordinate 0.&#xD;&#xA;&#xD;&#xA;What could be the solution to prevent aside from not letting the U coordinate go all the way to 1?&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/V7p2I.png" />
  <row Id="33447" PostHistoryTypeId="2" PostId="14857" RevisionGUID="983a8cbd-3c56-4c66-b8c3-aa461ea471e7" CreationDate="2011-07-14T16:12:05.397" UserId="5125" Text="Normalize to '1' is really not the way to go (what if you have a world not square? or several worlds with different size...).&#xD;&#xA;&#xD;&#xA;Using pixels as ... NEVER Mix up gameplay and graphic measures!!&#xD;&#xA;Don't lock yourself up so you cant change the graphics without having to change the code.&#xD;&#xA;&#xD;&#xA;So meters (feet or whatever measurement you like the most) is the way to go.&#xD;&#xA;You will feel mush better to code your missile launcher to move at 50 km/h than 0.00076 units/second..." />
  <row Id="33448" PostHistoryTypeId="2" PostId="14858" RevisionGUID="cdc105e0-fe29-4cb5-92db-9440bfed4e23" CreationDate="2011-07-14T16:16:41.947" UserId="8596" Text="I'm trying to create a simple 2D sprite game. The problem I'm having now is how to design my game. I was thinking of using a Sprite class that will be my base class for all the different types of Sprites I will use. The problem in my design is wheter to let every Inherited Sprite class draw itself, having a Draw method or should I have a centralized DrawEngine that handles all the drawing for me. Which method is the prefered to use??&#xD;&#xA;&#xD;&#xA;If I use the DrawEngine method how do I go about sending Textures to it? &#xD;&#xA;All the different Sprites will have different textures and the DrawEngine doesn't really know about the sprites. Could someone please help me out how to solve this problem how to handle textures in a DrawEngine class ?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33449" PostHistoryTypeId="1" PostId="14858" RevisionGUID="cdc105e0-fe29-4cb5-92db-9440bfed4e23" CreationDate="2011-07-14T16:16:41.947" UserId="8596" Text="Game Classes design" />
  <row Id="33450" PostHistoryTypeId="3" PostId="14858" RevisionGUID="cdc105e0-fe29-4cb5-92db-9440bfed4e23" CreationDate="2011-07-14T16:16:41.947" UserId="8596" Text="&lt;game-design&gt;" />
  <row Id="33451" PostHistoryTypeId="5" PostId="14858" RevisionGUID="785c8a0a-e4ac-4b71-908c-fd8a67b72528" CreationDate="2011-07-14T16:24:50.397" UserId="1156" Comment="deleted 5 characters in body; edited tags" Text="I'm trying to create a simple 2D sprite game. The problem I'm having now is how to design my game. I was thinking of using a Sprite class that will be my base class for all the different types of Sprites I will use. The problem in my design is wheter to let every Inherited Sprite class draw itself, having a Draw method or should I have a centralized DrawEngine that handles all the drawing for me. Which method is the preferred one to use?&#xD;&#xA;&#xD;&#xA;If I use the DrawEngine method how do I go about sending Textures to it? &#xD;&#xA;All the different Sprites will have different textures and the DrawEngine doesn't really know about the sprites. Could someone please help me out how to solve this problem how to handle textures in a DrawEngine class?&#xD;&#xA;" />
  <row Id="33452" PostHistoryTypeId="6" PostId="14858" RevisionGUID="785c8a0a-e4ac-4b71-908c-fd8a67b72528" CreationDate="2011-07-14T16:24:50.397" UserId="1156" Comment="deleted 5 characters in body; edited tags" Text="&lt;2d&gt;&lt;architecture&gt;&lt;rendering&gt;" />
  <row Id="33453" PostHistoryTypeId="2" PostId="14859" RevisionGUID="72b4b558-1d1f-4068-8456-bddb40a27b51" CreationDate="2011-07-14T16:29:22.303" UserId="3175" Text="Unfortunately, the math here gets hairy.  FxIII's answer is fine for the general case of a falling object but you are talking about a rocket--and rockets burn off fuel.&#xD;&#xA;&#xD;&#xA;I have seen code that does it but it was completely undocumented and I never managed to figure out the math behind it.  Unless you're CPU-limited somehow I wouldn't bother and simply brute force it--FxIIIs approach applied on a quite short timescale and adjust the thrust (or fuel use if you figure the rocket throttles back as the fuel burns off to maintain the specified acceleration rather than the specified thrust) between each iteration as the rocket burns off fuel." />
  <row Id="33454" PostHistoryTypeId="2" PostId="14860" RevisionGUID="7691e9a8-debb-4e50-9d3f-5e75a675b678" CreationDate="2011-07-14T17:03:16.847" UserId="2798" Text="Create a new SamplerState of your own and set it like this:&#xD;&#xA;&#xD;&#xA;    mySampler.Filter = TextureFilter.Linear;&#xD;&#xA;    mySampler.AddressU = TextureAddressMode.Clamp;&#xD;&#xA;    mySampler.AddressV = TextureAddressMode.Wrap;&#xD;&#xA;    mySampler.AddressW = TextureAddressMode.Wrap;&#xD;&#xA;&#xD;&#xA;The V coordinate will be wrapped (since you want horizontal repeat) and the U will be clamped." />
  <row Id="33455" PostHistoryTypeId="2" PostId="14861" RevisionGUID="c1a52764-2a6b-49ba-aa81-c96b67d7b76e" CreationDate="2011-07-14T17:44:59.403" UserId="14" Text="For a number of reasons I have chosen to use Microtransactions to monetize my current project. However, like all make or break features I am concerned about how they are received in-game. &#xD;&#xA;&#xD;&#xA;Microtransactions seem to present a unique problem in my mind though. I believe that just giving people currency will skew my results, and it wouldn't actually represent how people feel about how things are priced (in the same way that I am more apt to waste money when I didn't have to earn it).&#xD;&#xA;&#xD;&#xA;With that in mind, how can I effectively, and meaningfully market test the implementation of Microtransactions in my game? " />
  <row Id="33456" PostHistoryTypeId="1" PostId="14861" RevisionGUID="c1a52764-2a6b-49ba-aa81-c96b67d7b76e" CreationDate="2011-07-14T17:44:59.403" UserId="14" Text="How can you meaningfully market test microtransactions?" />
  <row Id="33457" PostHistoryTypeId="3" PostId="14861" RevisionGUID="c1a52764-2a6b-49ba-aa81-c96b67d7b76e" CreationDate="2011-07-14T17:44:59.403" UserId="14" Text="&lt;game-design&gt;&lt;testing&gt;&lt;microtransactions&gt;" />
  <row Id="33458" PostHistoryTypeId="2" PostId="14862" RevisionGUID="dc93a4af-2b46-4afa-890e-c576541ec30f" CreationDate="2011-07-14T18:02:18.220" UserId="7911" Text="You'll have to do some market research, dirty words I know in tech circles, but there it is =)&#xD;&#xA;&#xD;&#xA;Have you personally, or your design staff anyways, ever played any free to play titles?  And by played I mean having spent a couple months on both sides of the &quot;I paid for some things&quot; divide.&#xD;&#xA;&#xD;&#xA;**Find** all the FtoP games you can, not limited to your genre but not ignoring your focus either.  **Categorize** how they implement the microtrans in the game, how do the designs work, when you **read their forums** (and fan forums) feel stressful or simply involved in the game?  Lots of work ahead of you since there are a lot of FtoP games lately.&#xD;&#xA;&#xD;&#xA;Find the other free to play games that started life as traditional, monthly subscriptions and changed.  There are some high profile success stories out there.&#xD;&#xA;&#xD;&#xA;See if you can find information on conversion rates; I've heard that maybe 10% of players will buy *something* while maybe 1% will over-buy and be your backbone.  I am *not* a reliable resource for information, however =)&#xD;&#xA;&#xD;&#xA;In the end, without a living ecosystem (ie. a launched title) to experiment with you can't effectively test *your* game but you can research how similar titles have fared and maybe discover why, and adapt that information to your own use.&#xD;&#xA;" />
  <row Id="33459" PostHistoryTypeId="2" PostId="14863" RevisionGUID="2b721e5e-40e2-4b25-9ba7-a94d9ffb37f5" CreationDate="2011-07-14T18:04:41.837" UserId="8572" Text="It really depends on a couple of factors such as&#xD;&#xA;&#xD;&#xA;- how much functionality you want to put into your sprite class&#xD;&#xA;- how complicated it is to actually draw the sprites on screen&#xD;&#xA;- how many sprites you're drawing at once using the same texture&#xD;&#xA;&#xD;&#xA;Letting each Sprite draw itself is nice from an object oriented design perspective but then it's hard to optimize your rendering code.&#xD;&#xA;In general it's always good to put rendering/drawing code in a separate module (such as the DrawEngine you proposed). So if you're drawing lots and lots of Sprites with the same texture you can batch draw those together.&#xD;&#xA;&#xD;&#xA;Concerning the actual implementation, you could create a special drawing interface which the Sprite class implements, that supplies the DrawEngine with everything needed to draw the Sprite (bounding box, texture, alpha, etc.). You then hold a list (or scene graph for more complex games) with all your Sprites and let the DrawEngine iterate over it, either drawing the Sprites immediately or sort them by texture and draw afterwards.&#xD;&#xA;" />
  <row Id="33460" PostHistoryTypeId="5" PostId="14857" RevisionGUID="b12f087e-35a3-4fa6-998c-8a6c61407570" CreationDate="2011-07-14T18:32:06.090" UserId="5125" Comment="Spelling" Text="Normalize to '1' is really not the way to go (what if you have a world not square? or several worlds with different size...).&#xD;&#xA;&#xD;&#xA;Using pixels as ... NEVER Mix up gameplay and graphic measures!!&#xD;&#xA;Don't lock yourself up so you can't change the graphics without having to change the code.&#xD;&#xA;&#xD;&#xA;So meters (feet or whatever measurement you like the most) is the way to go.&#xD;&#xA;You will feel much better to code your missile launcher to move at 50 km/h than 0.00076 units/second..." />
  <row Id="33461" PostHistoryTypeId="2" PostId="14864" RevisionGUID="9e82e90f-de3f-4904-a765-a778e5af9815" CreationDate="2011-07-14T18:33:12.977" UserId="8600" Text="Im developing a 2D RPG for Android.&#xD;&#xA;The character can move up,down,left and right like pokemon.&#xD;&#xA;&#xD;&#xA;But what is the best way to controll the character? A digital stick seems a bit to complicated for just straight movement.&#xD;&#xA;&#xD;&#xA;Any help, code, idea, link would be awesome!!&#xD;&#xA;&#xD;&#xA;//Simon" />
  <row Id="33462" PostHistoryTypeId="1" PostId="14864" RevisionGUID="9e82e90f-de3f-4904-a765-a778e5af9815" CreationDate="2011-07-14T18:33:12.977" UserId="8600" Text="Android Development: RPG Controll?" />
  <row Id="33463" PostHistoryTypeId="3" PostId="14864" RevisionGUID="9e82e90f-de3f-4904-a765-a778e5af9815" CreationDate="2011-07-14T18:33:12.977" UserId="8600" Text="&lt;2d&gt;&lt;android&gt;&lt;rpg&gt;&lt;movement&gt;&lt;control&gt;" />
  <row Id="33464" PostHistoryTypeId="5" PostId="14864" RevisionGUID="38e88545-2878-4d42-a04d-a62c74224253" CreationDate="2011-07-14T19:28:37.950" UserId="7888" Comment="removed outro text; clarified question and title" Text="Im developing a 2D RPG for Android where the character can move up, down, left, and right like in top-down RPGs like Pokemon.&#xD;&#xA;&#xD;&#xA;What is the best input mechanism to use to control the character? A virtual joystick seems a bit to complicated for just straight movement." />
  <row Id="33465" PostHistoryTypeId="4" PostId="14864" RevisionGUID="38e88545-2878-4d42-a04d-a62c74224253" CreationDate="2011-07-14T19:28:37.950" UserId="7888" Comment="removed outro text; clarified question and title" Text="What is the best mechanism for controlling a character in a 2D Android game?" />
  <row Id="33466" PostHistoryTypeId="24" PostId="14864" RevisionGUID="38e88545-2878-4d42-a04d-a62c74224253" CreationDate="2011-07-14T19:28:37.950" Comment="Proposed by 7888 approved by 14 edit id of 559" />
  <row Id="33467" PostHistoryTypeId="2" PostId="14865" RevisionGUID="03c65f6a-8c81-4826-bcf2-ee530d241447" CreationDate="2011-07-14T19:31:11.710" UserId="7888" Text="The most responsive and familiar mechanism is the physical D-Pad on the Xperia Play device; you could follow Mojang's example and target your game at that device. This would additionally provide support to any devices with a physical D-Pad, since the Play's D-Pad uses the standard [D-Pad key codes][1]. This includes trackballs like the one found on the Nexus One; for those devices you may want to provide an option to keep walking in the last direction they pressed until told otherwise.&#xD;&#xA;&#xD;&#xA;If your goal is broad device compatibility, the equivalent would be a virtual joystick, since all Android devices [are required to have a touch screen][2] before they can install apps from the Android Market. If you're relying on a touch screen, however, I recommend you move the character to whichever point the user touches on the screen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ixplora.com/develop-gaming-apps-xperia-play-gamepad/&#xD;&#xA;  [2]: http://source.android.com/compatibility/overview.html" />
  <row Id="33468" PostHistoryTypeId="2" PostId="14866" RevisionGUID="5d569f2d-12cd-4734-b6d9-39849575f27d" CreationDate="2011-07-14T20:02:48.240" UserId="8601" Text="I know you can't copyright gameplay, so I can clone a succesful game.&#xD;&#xA;I'm not completely sure if you can completely take over all the rules (when rephrasing them to go around copyrights on text).&#xD;&#xA;&#xD;&#xA;But my biggest problem is, how do I make my game findable for users? Should I use a name that looks like the original trademarked game, like e.g. iRisk (for iOS), or R7sk (for WP7) ?  Should I go for another game that grasps what it's about (e.g. Conquer the world) and add 'RISK' (or a similar reference) to the game description?" />
  <row Id="33469" PostHistoryTypeId="1" PostId="14866" RevisionGUID="5d569f2d-12cd-4734-b6d9-39849575f27d" CreationDate="2011-07-14T20:02:48.240" UserId="8601" Text="How to make name of your trademark-game-clone findable" />
  <row Id="33470" PostHistoryTypeId="3" PostId="14866" RevisionGUID="5d569f2d-12cd-4734-b6d9-39849575f27d" CreationDate="2011-07-14T20:02:48.240" UserId="8601" Text="&lt;legal&gt;" />
  <row Id="33471" PostHistoryTypeId="2" PostId="14867" RevisionGUID="0c54b0ed-4d67-4f2f-ae4e-c69a63b330d1" CreationDate="2011-07-14T20:14:58.807" UserId="6877" Text=" * see this [GamePlay Patent](http://gamedev.stackexchange.com/questions/14809/gameplay-patent/14813#14813), for first question.&#xD;&#xA;&#xD;&#xA; * regarding your second question, [Pro Evolution Soccer](http://en.wikipedia.org/wiki/Pro_Evolution_Soccer) used this same approach that you mentioned. They didn't have the license to use real names of the Football players. So, they changed them slightly.&#xD;&#xA;&#xD;&#xA;For example, *Wim Suurbier* is named *Slowbear* in the Classic Netherlands squad" />
  <row Id="33472" PostHistoryTypeId="5" PostId="14867" RevisionGUID="fc7c9cac-311b-4a74-b433-0b3748a7b698" CreationDate="2011-07-14T20:21:45.300" UserId="6877" Comment="added 94 characters in body" Text=" * see this [GamePlay Patent](http://gamedev.stackexchange.com/questions/14809/gameplay-patent/14813#14813), for first question.&#xD;&#xA;&#xD;&#xA; * regarding your second question, [Pro Evolution Soccer](http://en.wikipedia.org/wiki/Pro_Evolution_Soccer) used this same approach that you mentioned. They didn't have the license to use real names of the Football players. So, they changed them slightly.&#xD;&#xA;&#xD;&#xA;For example, *Wim Suurbier* is named *Slowbear* in the Classic Netherlands squad.&#xD;&#xA;&#xD;&#xA;So, when a commercial title can do that, you wouldn't have any problem doing that either." />
  <row Id="33473" PostHistoryTypeId="6" PostId="8747" RevisionGUID="9f65926e-b731-4a0a-a2e9-2611fca92bdc" CreationDate="2011-07-14T20:31:09.430" UserId="5538" Comment="edited tags" Text="&lt;online&gt;&lt;microtransactions&gt;" />
  <row Id="33474" PostHistoryTypeId="5" PostId="14866" RevisionGUID="eabcaa40-9d16-4f41-a839-34da704a3dbc" CreationDate="2011-07-14T20:37:43.057" UserId="8601" Comment="added 668 characters in body" Text="I know you can't copyright gameplay, so I can clone a succesful game.&#xD;&#xA;I'm not completely sure if you can completely take over all the rules (when rephrasing them to go around copyrights on text).&#xD;&#xA;&#xD;&#xA;But my biggest problem is, how do I make my game findable for users? Should I use a name that looks like the original trademarked game, like e.g. iRisk (for iOS), or R7sk (for WP7) ?  Should I go for another game that grasps what it's about (e.g. Conquer the world) and add 'RISK' (or a similar reference) to the game description?&#xD;&#xA;&#xD;&#xA;*Edit on Tetrad's comment:* &#xD;&#xA;People are free to propose an alternative solution to name the game as implied in my question. I'd even like to alternative solutions of close to the border trademark names, to prevent any problems on that part.&#xD;&#xA;&#xD;&#xA;Cloning games and certainly puzzles (like sudoku) has been used a lot and sometimes it's even good to bring it to a new platform (mobile, ...). I'm mainly looking for a way to make the game **findable** for users, because as for now it's not available yet on the 2-3 platforms I'm looking to develop it for. I want users on these platforms to be able to play the game, without having problems with the trademarked name." />
  <row Id="33475" PostHistoryTypeId="2" PostId="14868" RevisionGUID="9dc2d9c4-a287-48d9-8c7a-524fbd02b24a" CreationDate="2011-07-14T22:31:24.057" UserId="659" Text="Obviously Steam is the best place to be, if you can get in.&#xD;&#xA;&#xD;&#xA;If not, take a look at IndieCity - http://www.indiecity.com - another distribution platform for indie PC games, which hasn't yet launched but seems to be getting closer - maybe you can get your game on it in time for it's launch?" />
  <row Id="33476" PostHistoryTypeId="5" PostId="14832" RevisionGUID="15ee97c7-f606-44f6-9409-05a976ff88bd" CreationDate="2011-07-14T22:44:28.260" UserId="7881" Comment="Removed fixed- vs. floating- point paragraph." Text="I agree with using a real-world value (meters, feet, etc.) as your basis for distance. The problem with your other two suggestions is that they are both variables. Working with a world size of `1` will cause all of your arithmetic to be floating-point between -1 and 1, which may lead to more floating-point errors. Also, should you ever decide to make variable world sizes (&quot;Large&quot; worlds for longer games, etc.) you will introduce many problems to your code. Likewise, if you use pixels, even at a maximum/minimum zoom level, you will run into confusion as well as problems should you decide to increase or decrease zoom levels." />
  <row Id="33477" PostHistoryTypeId="2" PostId="14869" RevisionGUID="e1eaa4ca-ab59-4684-b22c-9acde12158d6" CreationDate="2011-07-14T23:10:03.353" UserId="8240" Text="The very first question you need to ask yourself about the &quot;class&quot; Sprite is this: what is a sprite?&#xD;&#xA;&#xD;&#xA;Is it the image? Is it an entity in the game world that has gameplay properties on it? Is it a collision box? Etc.&#xD;&#xA;&#xD;&#xA;If a &quot;Sprite&quot; represents only the position and orientation of an image (possibly selected from a sheet of images), then you don't really have different &quot;kinds&quot; of sprites. You have a Sprite, which can be rendered. There's no need for inheritance here. You can have sprites that have different images and so forth, but that's just the data stored in the sprite.&#xD;&#xA;&#xD;&#xA;Let's call the class for this &quot;SpriteImage.&quot;&#xD;&#xA;&#xD;&#xA;If a &quot;Sprite&quot; is fundamentally a gameplay entity, then this entity would *contain* an object that represents how it gets drawn. You don't draw entities; entities don't draw themselves either. Entities contain one or more objects that they will give a position and orientation to, which represents how the visual representation of the entity is presented.&#xD;&#xA;&#xD;&#xA;Let us call this class &quot;SpriteEntity&quot;. This class might *contain* one or more of the SpriteImage objects, and it would be responsible for providing the position and orientation of these objects. It would also handle animating them (selecting which image to show). However, it would not draw them; the drawing of these images would be handled by an object that also holds a reference to these SpriteImage objects. Here, you should employ smart pointer usage; SpiteEntitys would contain shared_ptr's to their SpriteImages, while the SpriteImageDrawer would have a list of weak_ptrs to every SpriteImage that is created.&#xD;&#xA;&#xD;&#xA;Of course, this is just one way of structuring things. You can choose your own, but the separation of &quot;entity&quot; from &quot;image&quot; is a very good idea. For example, the above architecture would allow some &quot;SpriteEntity&quot; objects to have *no* visual representation at all. This is useful to create collision areas (since entities would have collision areas, even if you don't see them), so that you can detect when another entity touches that area and do something based on that. It would also allow some &quot;SpriteEntity&quot; objects to have *multiple* sprites, possibly hierarchically layered. This would be for doing things like drawing weapons on characters, etc." />
  <row Id="33478" PostHistoryTypeId="2" PostId="14870" RevisionGUID="8b6e0c6c-334e-425b-9660-e1f7e36d098e" CreationDate="2011-07-15T02:34:25.037" UserId="7728" Text="As always, legal questions should be addressed to intellectual property attorneys in your local area, and not to random folks on the Internet.&#xD;&#xA;&#xD;&#xA;This stuff is important.  And it varies from state to state and country to country.  Even if the people providing answers on the Internet are experts and are giving correct answers for their own location (which is unlikely), their answers do not necessarily apply to you in yours.  &#xD;&#xA;&#xD;&#xA;If you get this wrong, you face substantial fines and/or jail time.  I strongly advise you to either ask a qualified attorney in your area, or else not to play the &quot;how closely can I rip off someone else's works without stepping over the line&quot; game.  &#xD;&#xA;&#xD;&#xA;It's simply too risky to even consider taking answers from random anonymous strangers on the Internet for this type of matter." />
  <row Id="33479" PostHistoryTypeId="2" PostId="14871" RevisionGUID="c88e054b-1291-4aef-b60a-562c9934aa47" CreationDate="2011-07-15T03:08:53.040" UserId="8578" Text="Flixel and your client engine don't 'connect' to each other.  They are both libraries YOU have to integrate into your flash.&#xD;&#xA;&#xD;&#xA;Think of flixel more like a box of pencil crayons, and your client library like a phone cord.  Alone they don't do anything.  It's how you use them that makes your game what it it.&#xD;&#xA;&#xD;&#xA;Also judging by the rough bounds of this question I might recommend you scale down your first project of this nature.  Server/Client interactions are a hefty challenge on their own, without any graphics ever being involved.  But before you ever try that, make a full game, start to finish with flixel, *then* add new technologies.  If you can't be patient enough to take the time to do that, you will have serious trouble ever finishing this project." />
  <row Id="33480" PostHistoryTypeId="2" PostId="14872" RevisionGUID="08890462-ed4c-476f-975f-06c5d2e2d303" CreationDate="2011-07-15T04:48:24.517" UserId="7367" Text="Currently the way I'm implementing the process of drawing is to have a Sprite class that is just an image, where it needs to be drawn (incl. rotation and Z-depth), alpha levels, and which frame to draw. Then I have a separate SpriteHandler class that contains all of the methods as static methods that perform all of the actual drawing. The user can then either use the methods individually or register it with the handler and it will sort by z-depth and draw in the correct order." />
  <row Id="33481" PostHistoryTypeId="2" PostId="14873" RevisionGUID="c93cbc9d-c814-4d24-ae2c-8b2effe535ed" CreationDate="2011-07-15T04:57:19.737" UserId="8605" Text="I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources.  Any time I try loading the data, I just get junk as output.  The code below has the array code stripped out, so I could focus, on just getting one texture right using the array method as seen at this answer [Loading A Texture2D Array][1].  The texture I'm loading is a 16 by 16 bit map (and works with the basic createTextureFromFile function),  any help on how I'm not using subresources correctly would be much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void Cd3d11Texture2D::addTexture(wchar_t *  s_textureFileName, int i_slot)&#xD;&#xA;{&#xD;&#xA;	setFile(s_textureFileName);&#xD;&#xA;	&#xD;&#xA;	D3DX11_IMAGE_LOAD_INFO loadInfo;&#xD;&#xA;		loadInfo.Width = D3DX11_DEFAULT;&#xD;&#xA;		loadInfo.Height  = D3DX11_DEFAULT;&#xD;&#xA;		loadInfo.Depth  = D3DX11_DEFAULT;&#xD;&#xA;		loadInfo.FirstMipLevel = 0;&#xD;&#xA;		loadInfo.MipLevels = 1;&#xD;&#xA;		loadInfo.Usage = D3D11_USAGE_STAGING;&#xD;&#xA;		loadInfo.BindFlags = 0;&#xD;&#xA;		loadInfo.CpuAccessFlags = D3D11_CPU_ACCESS_WRITE | D3D11_CPU_ACCESS_READ;&#xD;&#xA;		loadInfo.MiscFlags = 0;&#xD;&#xA;		loadInfo.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;		loadInfo.Filter = D3DX11_FILTER_NONE;&#xD;&#xA;		loadInfo.MipFilter = D3DX11_FILTER_NONE;&#xD;&#xA;&#xD;&#xA;	D3DX11CreateTextureFromFile( d3d11p_environment-&gt;d3d11p_dev, wcs_filenameTextureColorMap, &amp;loadInfo, NULL, &amp;d3d11p_resourceTexture, NULL );&#xD;&#xA;&#xD;&#xA;	ID3D11Texture2D						*d3d11p_texture;&#xD;&#xA;		d3d11p_resourceTexture-&gt;QueryInterface( __uuidof( ID3D11Texture2D ), (LPVOID*)&amp;d3d11p_texture );&#xD;&#xA;		d3d11p_texture-&gt;GetDesc(&amp;d3d11_textureDesc);&#xD;&#xA;		&#xD;&#xA;		if (d3d11_textureDesc.MipLevels &gt; 4)  d3d11_textureDesc.MipLevels -= 4;&#xD;&#xA;		&#xD;&#xA;		d3d11_textureDesc.Width = 16;&#xD;&#xA;		d3d11_textureDesc.Height = 16;&#xD;&#xA;		d3d11_textureDesc.MipLevels = 1;&#xD;&#xA;		d3d11_textureDesc.ArraySize = 1;&#xD;&#xA;		d3d11_textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;		d3d11_textureDesc.SampleDesc.Count = 1;&#xD;&#xA;		d3d11_textureDesc.SampleDesc.Quality = 0;&#xD;&#xA;		d3d11_textureDesc.Usage = D3D11_USAGE_IMMUTABLE;&#xD;&#xA;		d3d11_textureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;&#xD;&#xA;		d3d11_textureDesc.CPUAccessFlags = 0;&#xD;&#xA;		d3d11_textureDesc.MiscFlags = 0;&#xD;&#xA;			&#xD;&#xA;		d3d11p_subResourceData.pSysMem = d3d11p_resourceTexture;&#xD;&#xA;		d3d11p_subResourceData.SysMemPitch = (UINT) (16 * 4);&#xD;&#xA;		d3d11p_subResourceData.SysMemSlicePitch = (UINT) (16 * 16 * 4);&#xD;&#xA;&#xD;&#xA;	d3d11p_environment-&gt;d3d11p_dev-&gt;CreateTexture2D(&amp;d3d11_textureDesc,&amp;d3d11p_subResourceData,&amp;d3d11p_textureBuffer);&#xD;&#xA;	&#xD;&#xA;	D3D11_SHADER_RESOURCE_VIEW_DESC 	d3d11_shaderResourceViewDesc;&#xD;&#xA;		ZeroMemory( &amp;d3d11_shaderResourceViewDesc, sizeof(d3d11_shaderResourceViewDesc));&#xD;&#xA;&#xD;&#xA;		d3d11_shaderResourceViewDesc.ViewDimension			= D3D11_SRV_DIMENSION_TEXTURE2D;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2D.MostDetailedMip	= d3d11_textureDesc.MipLevels - 1;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2D.MipLevels		= d3d11_textureDesc.MipLevels;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Format		= d3d11_textureDesc.Format;&#xD;&#xA;&#xD;&#xA;	d3d11p_environment-&gt;d3d11p_dev-&gt;CreateShaderResourceView( d3d11p_textureBuffer, &amp;d3d11_shaderResourceViewDesc, &amp;d3d11p_shaderResourceViewTexture);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14507/loading-a-texture2d-array-in-directx11" />
  <row Id="33482" PostHistoryTypeId="1" PostId="14873" RevisionGUID="c93cbc9d-c814-4d24-ae2c-8b2effe535ed" CreationDate="2011-07-15T04:57:19.737" UserId="8605" Text="Loading a sub resource for a texture array" />
  <row Id="33483" PostHistoryTypeId="3" PostId="14873" RevisionGUID="c93cbc9d-c814-4d24-ae2c-8b2effe535ed" CreationDate="2011-07-15T04:57:19.737" UserId="8605" Text="&lt;c++&gt;&lt;directx&gt;" />
  <row Id="33484" PostHistoryTypeId="5" PostId="14781" RevisionGUID="615b6b4d-26af-40ec-817f-de4f15f0b4cf" CreationDate="2011-07-15T06:13:32.837" UserId="8320" Comment="Added link to fixed point class" Text="Edit: A link to a [fixed point class][1] (Buyer beware! - I haven't used it...)&#xD;&#xA;&#xD;&#xA;You could always fall back on [fixed point][2] arithmetic. Someone (making an rts, no less) has already done the leg work on [stackoverflow][3].&#xD;&#xA;&#xD;&#xA;You will pay a performance penalty, but this may or may not be a problem, as .net will not be especially performant here as it won't use simd instructions. Benchmark!&#xD;&#xA;&#xD;&#xA;N.B. Apparently someone at [intel][4] appears to have a solution to allow you to use the intel performance primitives library from c#. This may help vectorising fixed point code to compensate for the slower performance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/fixedpointlibra/&#xD;&#xA;  [2]: https://secure.wikimedia.org/wikipedia/en/wiki/Fixed-point_arithmetic&#xD;&#xA;  [3]: http://stackoverflow.com/q/605124/98313&#xD;&#xA;  [4]: http://software.intel.com/en-us/blogs/2010/12/15/intel-performance-libraries-allow-you-to-leverage-both-parallelism-and-simd-instructions-in-c/" />
  <row Id="33485" PostHistoryTypeId="25" PostId="14861" RevisionGUID="c923650f-0ad3-4ace-8281-94b3b5a70566" CreationDate="2011-07-15T06:31:55.413" Comment="http://twitter.com/#!/StackGameDev" />
  <row Id="33486" PostHistoryTypeId="2" PostId="14874" RevisionGUID="489d869d-a135-4c54-a44a-1e8d6e4d25c6" CreationDate="2011-07-15T08:37:09.093" UserId="8593" Text="I develop a game in android. I able to find collision between two object. But i need to find collision only when two object collided(Not in blank space of image)In j2me ,i able to make that.&#xD;&#xA;&#xD;&#xA;Sample code: helicopterSprite.collidesWith(buildingSprite, true)&#xD;&#xA;&#xD;&#xA;But in Andengine , having only helicopterSprite.collidesWith(buildingSprite) . How i make in android&#xD;&#xA;" />
  <row Id="33487" PostHistoryTypeId="1" PostId="14874" RevisionGUID="489d869d-a135-4c54-a44a-1e8d6e4d25c6" CreationDate="2011-07-15T08:37:09.093" UserId="8593" Text="sprite collision Andengine (Android)" />
  <row Id="33488" PostHistoryTypeId="3" PostId="14874" RevisionGUID="489d869d-a135-4c54-a44a-1e8d6e4d25c6" CreationDate="2011-07-15T08:37:09.093" UserId="8593" Text="&lt;android&gt;" />
  <row Id="33489" PostHistoryTypeId="25" PostId="14858" RevisionGUID="f62e70f3-eb7e-4c8a-a467-91561bbedb60" CreationDate="2011-07-15T09:31:55.533" Comment="http://twitter.com/#!/StackGameDev/status/91802160697835521" />
  <row Id="33490" PostHistoryTypeId="5" PostId="14873" RevisionGUID="938b5945-2f7d-4305-a12c-028a7e3c99e1" CreationDate="2011-07-15T12:17:29.140" UserId="8605" Comment="deleted 310 characters in body" Text="I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources.  Any time I try loading the data, I just get junk as output.  The code below is only set up for one item, so I could focus on just getting one texture right using the array method as seen at this answer [Loading A Texture2D Array][1].  The texture I'm loading is a 16 by 16 bit map (and works with using the resource directly from the CreateTextureFromFile function, but that's only one item),  any help on how I'm not using subresources correctly would be much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void Cd3d11Texture2D::addTexture(wchar_t *  s_textureFileName, int i_slot)&#xD;&#xA;{&#xD;&#xA;	setFile(s_textureFileName);&#xD;&#xA;	&#xD;&#xA;	D3DX11CreateTextureFromFile( d3d11p_environment-&gt;d3d11p_dev, wcs_filenameTextureColorMap, NULL, NULL, &amp;d3d11p_resourceTexture, NULL );&#xD;&#xA;&#xD;&#xA;	ID3D11Texture2D						*d3d11p_texture;&#xD;&#xA;		d3d11p_resourceTexture-&gt;QueryInterface( __uuidof( ID3D11Texture2D ), (LPVOID*)&amp;d3d11p_texture );&#xD;&#xA;		d3d11p_texture-&gt;GetDesc(&amp;d3d11_textureDesc);&#xD;&#xA;		&#xD;&#xA;		if (d3d11_textureDesc.MipLevels &gt; 4)  d3d11_textureDesc.MipLevels -= 4;&#xD;&#xA;		&#xD;&#xA;		d3d11_textureDesc.Width = 16;&#xD;&#xA;		d3d11_textureDesc.Height = 16;&#xD;&#xA;		d3d11_textureDesc.MipLevels = 1;&#xD;&#xA;		d3d11_textureDesc.ArraySize = 1;&#xD;&#xA;		d3d11_textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;		d3d11_textureDesc.SampleDesc.Count = 1;&#xD;&#xA;		d3d11_textureDesc.SampleDesc.Quality = 0;&#xD;&#xA;		d3d11_textureDesc.Usage = D3D11_USAGE_IMMUTABLE;&#xD;&#xA;		d3d11_textureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;&#xD;&#xA;		d3d11_textureDesc.CPUAccessFlags = 0;&#xD;&#xA;		d3d11_textureDesc.MiscFlags = 0;&#xD;&#xA;			&#xD;&#xA;		d3d11p_subResourceData.pSysMem = d3d11p_resourceTexture;&#xD;&#xA;		d3d11p_subResourceData.SysMemPitch = (UINT) (16 * 4);&#xD;&#xA;		d3d11p_subResourceData.SysMemSlicePitch = (UINT) (16 * 16 * 4);&#xD;&#xA;&#xD;&#xA;	d3d11p_environment-&gt;d3d11p_dev-&gt;CreateTexture2D(&amp;d3d11_textureDesc,&amp;d3d11p_subResourceData,&amp;d3d11p_textureBuffer);&#xD;&#xA;	&#xD;&#xA;	D3D11_SHADER_RESOURCE_VIEW_DESC 	d3d11_shaderResourceViewDesc;&#xD;&#xA;		ZeroMemory( &amp;d3d11_shaderResourceViewDesc, sizeof(d3d11_shaderResourceViewDesc));&#xD;&#xA;&#xD;&#xA;		d3d11_shaderResourceViewDesc.ViewDimension			= D3D11_SRV_DIMENSION_TEXTURE2DARRAY;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Format		= d3d11_textureDesc.Format;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.MostDetailedMip	= d3d11_textureDesc.MipLevels - 1;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.MipLevels		= d3d11_textureDesc.MipLevels;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.FirstArraySlice	= 0;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.ArraySize		= i_countTexture;&#xD;&#xA;&#xD;&#xA;	d3d11p_environment-&gt;d3d11p_dev-&gt;CreateShaderResourceView( d3d11p_textureBuffer, &amp;d3d11_shaderResourceViewDesc, &amp;d3d11p_shaderResourceViewTexture);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14507/loading-a-texture2d-array-in-directx11" />
  <row Id="33491" PostHistoryTypeId="25" PostId="14856" RevisionGUID="8dc314d6-be4e-45b4-a8a3-428311473a6f" CreationDate="2011-07-15T12:31:56.353" Comment="http://twitter.com/#!/StackGameDev/status/91847462133841920" />
  <row Id="33492" PostHistoryTypeId="5" PostId="14865" RevisionGUID="fedb81b0-315e-44d7-9518-7c087f346ad5" CreationDate="2011-07-15T13:43:51.863" UserId="7888" Comment="added suggested option from comments" Text="The most responsive and familiar mechanism is the physical D-Pad on the Xperia Play device; you could follow Mojang's example and target your game at that device. This would additionally provide support to any devices with a physical D-Pad, since the Play's D-Pad uses the standard [D-Pad key codes][1]. This includes trackballs like the one found on the Nexus One; for those devices you may want to provide an option to keep walking in the last direction they pressed until told otherwise.&#xD;&#xA;&#xD;&#xA;If your goal is broad device compatibility, the equivalent would be a virtual joystick, since all Android devices [are required to have a touch screen][2] before they can install apps from the Android Market. If you're relying on a touch screen, however, I recommend you move the character to whichever point the user touches on the screen.&#xD;&#xA;&#xD;&#xA;As Zoot mentioned in the comments, there is another option you may wish to support: bluetooth gamepads such as the [iControlPad][3]. That gamepad in particular maps the [D-Pad controls][4] to WASD key inputs, though others may vary.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ixplora.com/develop-gaming-apps-xperia-play-gamepad/&#xD;&#xA;  [2]: http://source.android.com/compatibility/overview.html&#xD;&#xA;  [3]: http://icontrolpad.com/&#xD;&#xA;  [4]: http://icontrolpad.com/downloads/iCP_operations4.pdf" />
  <row Id="33493" PostHistoryTypeId="2" PostId="14875" RevisionGUID="418c8fdd-e333-4098-9a87-64bbd1b5b57d" CreationDate="2011-07-15T13:55:56.363" UserId="7888" Text="As of 14 June, 2011 andEngine hasn't added support for pixel-perfect collisions (taking transparent pixels) into account natively, as the [developer's comment][1] states:&#xD;&#xA;&#xD;&#xA;&gt; &quot;Sorry my post was a little misleading, transparent pixels are not taken into account. Though, when working with the PhysicsBox2DExtension, you can create a Body that has the outline of your actual Sprite content.&quot; -- Nicolas Gramlich&#xD;&#xA;&#xD;&#xA;As he mentions, you can use Box2D physics in conjunction with andEngine to provide pixel-perfect collision detection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.andengine.org/blog/2010/07/andengine-pixel-perfect-collision-detection/#comment-39801" />
  <row Id="33494" PostHistoryTypeId="2" PostId="14876" RevisionGUID="ecb91afa-2b29-4d93-b339-e6fb178893eb" CreationDate="2011-07-15T14:06:51.047" UserId="8338" Text="I am trying to expand my knowledge on gaming and programming and I was wondering what underlying skills people think they one should learn to be a great programmer, or developer. What are some important patterns or practices that you use frequently?&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="33495" PostHistoryTypeId="1" PostId="14876" RevisionGUID="ecb91afa-2b29-4d93-b339-e6fb178893eb" CreationDate="2011-07-15T14:06:51.047" UserId="8338" Text="Underlying Skills and Knowledge" />
  <row Id="33496" PostHistoryTypeId="3" PostId="14876" RevisionGUID="ecb91afa-2b29-4d93-b339-e6fb178893eb" CreationDate="2011-07-15T14:06:51.047" UserId="8338" Text="&lt;game-design&gt;" />
  <row Id="33497" PostHistoryTypeId="2" PostId="14877" RevisionGUID="ae68d74a-df0c-4fea-8bfa-740dab7c3e9b" CreationDate="2011-07-15T14:11:09.480" UserId="8608" Text="For your information, Mojang will be releasing a &quot;Mod API&quot; some time in the near future (during beta, so before its official release which will be around november 2011).&#xD;&#xA;&#xD;&#xA;In fact, it will be the full source code, as mentioned on Notch's blog&#xD;&#xA;&#xD;&#xA;http://notch.tumblr.com/post/4955141617/the-plan-for-mods&#xD;&#xA;&#xD;&#xA;but for now, you have to &quot;decompile&quot; the jars, to see a &#xD;&#xA;partially obfuscated code and recompiling it for later use/debugging.&#xD;&#xA;&#xD;&#xA;To do this, I highly recommend Minecraft Coder's Pack&#xD;&#xA;http://mcp.ocean-labs.de/index.php/MCP_Releases&#xD;&#xA;&#xD;&#xA;there is a couple of modding tutorials on the forums too, like this one : http://www.minecraftforum.net/topic/96862-creating-mods-modding-tutorials-21511/" />
  <row Id="33498" PostHistoryTypeId="2" PostId="14878" RevisionGUID="2cd2041f-bb72-4a22-aec2-3019ea595591" CreationDate="2011-07-15T14:26:08.897" UserId="1839" Text="Of course it depends on the particular position you are aiming for, there is no general answer, but here is my list about most important skills for programmers as I see it (I should mention my area is Console &amp; Performance):&#xD;&#xA;&#xD;&#xA; 1. **Debugging** - analyzing crash dumps and learn the language of your CPU and how it communicates with other components of the system&#xD;&#xA;&#xD;&#xA; 2. **Profiling** - not much to say here, here you really learn about your code and that there are so many wrong assumtions about code that can become critical&#xD;&#xA;&#xD;&#xA; 3. **Shipping Mentality** - think in &quot;Shipping Solutions&quot; rather than &quot;Great and perfect Designs&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All those sound simple and ovbious, but really mastering them is an art and pretty rare." />
  <row Id="33499" PostHistoryTypeId="6" PostId="14876" RevisionGUID="49e97c05-4b53-4df5-aa47-271322f51a41" CreationDate="2011-07-15T14:26:55.403" UserId="1430" Comment="edited tags" Text="&lt;education&gt;" />
  <row Id="33500" PostHistoryTypeId="2" PostId="14879" RevisionGUID="7f1eed27-99ab-45da-a4fd-400b5d70011f" CreationDate="2011-07-15T14:28:39.347" UserId="4894" Text="There is no generic answer, as today, a developper usually is specialised on one or other field, may it be AI, low level optimisation, rendering engine, physic engine, shaders, ... So basically, everything depends on what you know already, and what your specialty is (are?). &#xD;&#xA;&#xD;&#xA;After that, there are lots of best practices depending on which language / game engine you're working with, and each company will also have there own standards in terms of skills and / or methods. &#xD;&#xA;&#xD;&#xA;To improve your skills, I suggest working with multiple fields mentionned above, and work with open source game engines to see how they are made. " />
  <row Id="33501" PostHistoryTypeId="2" PostId="14880" RevisionGUID="d4289500-a56a-40b7-a673-b70f7402f5d1" CreationDate="2011-07-15T14:31:38.230" UserId="1430" Text="**Problem solving** is probably one of the most important skills to programmer, as is the ability **think and reason critically**. Both of these are skills that apply to all levels of developer and can almost always be improved upon.&#xD;&#xA;&#xD;&#xA;The ability to work through and understand the root cause of a particular bug or other issue, and the ability to understand and reason about the implications of potential changes to the program in order to fix the bug is a key aspect of a good programmer's job." />
  <row Id="33502" PostHistoryTypeId="4" PostId="14876" RevisionGUID="09ce1bb9-e66d-4f03-a385-74ef9657d33e" CreationDate="2011-07-15T14:33:43.987" UserId="1430" Comment="edited title" Text="Underlying skills and knowledge" />
  <row Id="33503" PostHistoryTypeId="2" PostId="14881" RevisionGUID="7e68bbba-065f-47a2-9016-e806a8ca5a2d" CreationDate="2011-07-15T14:41:23.507" UserId="6877" Text="**Make games**&#xD;&#xA;&#xD;&#xA;I can't stress it enough. Make anything. It could be Tetris, it could be SuperMario. Then add feature to it. Try to implement different algorithms(pathfinding, al etc etc) into your game. Find out how things are turning out. Which is the bad part of your code. Then redactor it. You will face some problem. Then look for solution. You will find things like patterns. Then you will learn design patterns. Then make another game. Use the experience that you have learnt from your past game. When you have some experience you can even start working with some open source game development teams(like [0 AD](wildfiregames.com/0ad)). If you feel its too hard for you, then go for modding. Don't stand still, do anything related to game development. It could be modeling, texturing, rigging, animation, programming. You don't have to be a jack of all trades. Just have a basic understand on every aspect.&#xD;&#xA;&#xD;&#xA;The bottom line is try to have a reasonable amount of experience on different aspects on game development. At the end of the day a people pick one from many that suits himself. But, you need to know them first.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33504" PostHistoryTypeId="5" PostId="14881" RevisionGUID="0e2431f2-9189-4e1e-b04b-54ff203538e8" CreationDate="2011-07-15T14:56:55.090" UserId="6877" Comment="deleted 12 characters in body" Text="**Make games**&#xD;&#xA;&#xD;&#xA;I can't stress it enough. Make anything. It could be Tetris, it could be SuperMario. Then add feature to it. Try to implement different algorithms(pathfinding, al etc etc) into your game. Find out how things are turning out. Which is the bad part of your code. Then refactor it. You will face some problems. Then look for solution. You will find things like design patterns. Learn it. Then make another game. Use the experience that you have learnt from your past game. When you have some experience you can even start working with some open source game development teams(like [0 AD](http://wildfiregames.com/0ad)). If you feel its too hard for you, then go for modding. Don't stand still, do anything related to game development. It could be modeling, texturing, rigging, animation, programming. You don't have to be a jack of all trades. Just have a basic understand on every aspect.&#xD;&#xA;&#xD;&#xA;The bottom line is try to have a reasonable amount of experience on different aspects on game development. At the end of the day a people pick one from many that suits himself. But, you need to know them first.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33505" PostHistoryTypeId="5" PostId="14874" RevisionGUID="76c671fd-483d-456f-92b9-b8d3285e4d65" CreationDate="2011-07-15T14:59:06.707" UserId="7588" Comment="General clean up and clarification" Text="I am currently developing a game in Android using the [AndEngine](http://www.andengine.org/).&#xD;&#xA;&#xD;&#xA;I am able to find a collision between two objects, but I need the collision to be Pixel-Perfect.&#xD;&#xA;&#xD;&#xA;In J2ME, I am able to do this, with : &#xD;&#xA;&#xD;&#xA;    helicopterSprite.collidesWith(buildingSprite, true)&#xD;&#xA;&#xD;&#xA;But in Andengine, the collidesWith doesn't have the same signature :&#xD;&#xA;&#xD;&#xA;    helicopterSprite.collidesWith(buildingSprite)&#xD;&#xA;&#xD;&#xA;How can I implement this?&#xD;&#xA;" />
  <row Id="33506" PostHistoryTypeId="4" PostId="14874" RevisionGUID="76c671fd-483d-456f-92b9-b8d3285e4d65" CreationDate="2011-07-15T14:59:06.707" UserId="7588" Comment="General clean up and clarification" Text="Pixel-perfect collision with Andengine" />
  <row Id="33507" PostHistoryTypeId="6" PostId="14874" RevisionGUID="76c671fd-483d-456f-92b9-b8d3285e4d65" CreationDate="2011-07-15T14:59:06.707" UserId="7588" Comment="General clean up and clarification" Text="&lt;2d&gt;&lt;android&gt;&lt;andengine&gt;" />
  <row Id="33508" PostHistoryTypeId="24" PostId="14874" RevisionGUID="76c671fd-483d-456f-92b9-b8d3285e4d65" CreationDate="2011-07-15T14:59:06.707" Comment="Proposed by 7588 approved by 20 edit id of 560" />
  <row Id="33509" PostHistoryTypeId="5" PostId="14873" RevisionGUID="d87c3891-954a-4a8c-9e57-3218fe832e0c" CreationDate="2011-07-15T15:23:00.600" UserId="7588" Comment="fixed code indentation" Text="I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources.  Any time I try loading the data, I just get junk as output.  The code below has the array code stripped out, so I could focus, on just getting one texture right using the array method as seen at this answer [Loading A Texture2D Array][1].  The texture I'm loading is a 16 by 16 bit map (and works with the basic createTextureFromFile function),  any help on how I'm not using subresources correctly would be much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void Cd3d11Texture2D::addTexture(wchar_t *  s_textureFileName, int i_slot)&#xD;&#xA;    {&#xD;&#xA;        setFile(s_textureFileName);&#xD;&#xA;        D3DX11_IMAGE_LOAD_INFO loadInfo;&#xD;&#xA;            loadInfo.Width = D3DX11_DEFAULT;&#xD;&#xA;            loadInfo.Height  = D3DX11_DEFAULT;&#xD;&#xA;            loadInfo.Depth  = D3DX11_DEFAULT;&#xD;&#xA;            loadInfo.FirstMipLevel = 0;&#xD;&#xA;            loadInfo.MipLevels = 1;&#xD;&#xA;            loadInfo.Usage = D3D11_USAGE_STAGING;&#xD;&#xA;            loadInfo.BindFlags = 0;&#xD;&#xA;            loadInfo.CpuAccessFlags = D3D11_CPU_ACCESS_WRITE | D3D11_CPU_ACCESS_READ;&#xD;&#xA;            loadInfo.MiscFlags = 0;&#xD;&#xA;            loadInfo.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;            loadInfo.Filter = D3DX11_FILTER_NONE;&#xD;&#xA;            loadInfo.MipFilter = D3DX11_FILTER_NONE;&#xD;&#xA;&#xD;&#xA;        D3DX11CreateTextureFromFile( d3d11p_environment-&gt;d3d11p_dev, wcs_filenameTextureColorMap, &amp;loadInfo, NULL, &amp;d3d11p_resourceTexture, NULL );&#xD;&#xA;        ID3D11Texture2D	*d3d11p_texture;&#xD;&#xA;&#xD;&#xA;        d3d11p_resourceTexture-&gt;QueryInterface( __uuidof( ID3D11Texture2D ), (LPVOID*)&amp;d3d11p_texture );&#xD;&#xA;        d3d11p_texture-&gt;GetDesc(&amp;d3d11_textureDesc);&#xD;&#xA;		&#xD;&#xA;        if (d3d11_textureDesc.MipLevels &gt; 4)&#xD;&#xA;            d3d11_textureDesc.MipLevels -= 4;&#xD;&#xA;		&#xD;&#xA;        d3d11_textureDesc.Width = 16;&#xD;&#xA;        d3d11_textureDesc.Height = 16;&#xD;&#xA;        d3d11_textureDesc.MipLevels = 1;&#xD;&#xA;        d3d11_textureDesc.ArraySize = 1;&#xD;&#xA;        d3d11_textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;        d3d11_textureDesc.SampleDesc.Count = 1;&#xD;&#xA;        d3d11_textureDesc.SampleDesc.Quality = 0;&#xD;&#xA;        d3d11_textureDesc.Usage = D3D11_USAGE_IMMUTABLE;&#xD;&#xA;        d3d11_textureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;&#xD;&#xA;        d3d11_textureDesc.CPUAccessFlags = 0;&#xD;&#xA;        d3d11_textureDesc.MiscFlags = 0;&#xD;&#xA;			&#xD;&#xA;        d3d11p_subResourceData.pSysMem = d3d11p_resourceTexture;&#xD;&#xA;        d3d11p_subResourceData.SysMemPitch = (UINT) (16 * 4);&#xD;&#xA;        d3d11p_subResourceData.SysMemSlicePitch = (UINT) (16 * 16 * 4);&#xD;&#xA;        d3d11p_environment-&gt;d3d11p_dev-&gt;CreateTexture2D(&amp;d3d11_textureDesc,&amp;d3d11p_subResourceData,&amp;d3d11p_textureBuffer);&#xD;&#xA;&#xD;&#xA;        D3D11_SHADER_RESOURCE_VIEW_DESC d3d11_shaderResourceViewDesc;&#xD;&#xA;        ZeroMemory( &amp;d3d11_shaderResourceViewDesc, sizeof(d3d11_shaderResourceViewDesc));&#xD;&#xA;&#xD;&#xA;        d3d11_shaderResourceViewDesc.ViewDimension                = D3D11_SRV_DIMENSION_TEXTURE2D;&#xD;&#xA;        d3d11_shaderResourceViewDesc.Texture2D.MostDetailedMip    = d3d11_textureDesc.MipLevels - 1;&#xD;&#xA;        d3d11_shaderResourceViewDesc.Texture2D.MipLevels          = d3d11_textureDesc.MipLevels;&#xD;&#xA;        d3d11_shaderResourceViewDesc.Format                       = d3d11_textureDesc.Format;&#xD;&#xA;&#xD;&#xA;        d3d11p_environment-&gt;d3d11p_dev-&gt;CreateShaderResourceView( d3d11p_textureBuffer, &amp;d3d11_shaderResourceViewDesc, &amp;d3d11p_shaderResourceViewTexture);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14507/loading-a-texture2d-array-in-directx11" />
  <row Id="33510" PostHistoryTypeId="24" PostId="14873" RevisionGUID="d87c3891-954a-4a8c-9e57-3218fe832e0c" CreationDate="2011-07-15T15:23:00.600" Comment="Proposed by 7588 approved by 14 edit id of 561" />
  <row Id="33511" PostHistoryTypeId="25" PostId="14809" RevisionGUID="604d00fa-1ffb-45d6-8bcf-f660e1065e1f" CreationDate="2011-07-15T15:31:56.843" Comment="http://twitter.com/#!/StackGameDev/status/91892762059874304" />
  <row Id="33512" PostHistoryTypeId="2" PostId="14882" RevisionGUID="1d706a98-90b1-40ca-952c-0e2163cce73b" CreationDate="2011-07-15T16:00:32.313" UserId="3830" Text="If you are sure of your legal footing, and you want your game to be recognizable, then be blatant in your name.  Be in your face about what you are doing.  &#xD;&#xA;&#xD;&#xA;&quot;Counter Clone:  If you like CS, you'll like my game better because it's cheaper and I added rocket launchers!&quot;&#xD;&#xA;&#xD;&#xA;&quot;MineClone.  Get it?  Great.  Then get it 'cause it's only $1!&quot;&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;Good luck." />
  <row Id="33513" PostHistoryTypeId="2" PostId="14883" RevisionGUID="87a41f3f-60cb-4417-a46a-62ef9ed3b5dc" CreationDate="2011-07-15T17:54:48.850" UserId="8609" Text="The open source Moai platform mentioned above is now in open beta and available at http://getmoai.com. Moai includes both an SDK for front-end and a cloud platform for the back-end, all built in Lua.&#xD;&#xA;&#xD;&#xA;A number of big studios are using Moai, including the first Bungie Aerospace mobile title. Considering the beta has only been open for a week, the community support has been great." />
  <row Id="33514" PostHistoryTypeId="5" PostId="14873" RevisionGUID="b0e96bc9-7da3-4e82-b10f-94c7bd67b9b5" CreationDate="2011-07-15T18:05:39.697" UserId="8605" Comment="made issue clearer" Text="I've been trying to load textures into a texture array, but I've hit a wall with my knowledge of subresources.  Any time I try loading the data, I just get junk as output.  The code below is only set up for one item, so I could focus on just getting one texture right using the array method as seen at this answer [Loading A Texture2D Array][1].  The texture I'm loading is a 16 by 16 bit map (and works with using the resource directly from the CreateTextureFromFile function, but that's only one item),  any help on how I'm not using subresources correctly would be much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void Cd3d11Texture2D::addTexture(wchar_t *  s_textureFileName, int i_slot)&#xD;&#xA;	setFile(s_textureFileName);&#xD;&#xA;&#xD;&#xA;	D3DX11CreateTextureFromFile( d3d11p_environment-&gt;d3d11p_dev, wcs_filenameTextureColorMap, NULL, NULL, &amp;d3d11p_resourceTexture, NULL );&#xD;&#xA;&#xD;&#xA;	ID3D11Texture2D						*d3d11p_texture;&#xD;&#xA;		d3d11p_resourceTexture-&gt;QueryInterface( __uuidof( ID3D11Texture2D ), (LPVOID*)&amp;d3d11p_texture );&#xD;&#xA;		d3d11p_texture-&gt;GetDesc(&amp;d3d11_textureDesc);&#xD;&#xA;		&#xD;&#xA;		if (d3d11_textureDesc.MipLevels &gt; 4)  d3d11_textureDesc.MipLevels -= 4;&#xD;&#xA;		&#xD;&#xA;		d3d11_textureDesc.Width = 16;&#xD;&#xA;		d3d11_textureDesc.Height = 16;&#xD;&#xA;		d3d11_textureDesc.MipLevels = 1;&#xD;&#xA;		d3d11_textureDesc.ArraySize = 1;&#xD;&#xA;		d3d11_textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;&#xD;&#xA;		d3d11_textureDesc.SampleDesc.Count = 1;&#xD;&#xA;		d3d11_textureDesc.SampleDesc.Quality = 0;&#xD;&#xA;		d3d11_textureDesc.Usage = D3D11_USAGE_IMMUTABLE;&#xD;&#xA;		d3d11_textureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;&#xD;&#xA;		d3d11_textureDesc.CPUAccessFlags = 0;&#xD;&#xA;		d3d11_textureDesc.MiscFlags = 0;&#xD;&#xA;			&#xD;&#xA;		d3d11p_subResourceData.pSysMem = d3d11p_resourceTexture;&#xD;&#xA;		d3d11p_subResourceData.SysMemPitch = (UINT) (16 * 4);&#xD;&#xA;		d3d11p_subResourceData.SysMemSlicePitch = (UINT) (16 * 16 * 4);&#xD;&#xA;&#xD;&#xA;	d3d11p_environment-&gt;d3d11p_dev-&gt;CreateTexture2D(&amp;d3d11_textureDesc,&amp;d3d11p_subResourceData,&amp;d3d11p_textureBuffer);&#xD;&#xA;	&#xD;&#xA;	D3D11_SHADER_RESOURCE_VIEW_DESC 	d3d11_shaderResourceViewDesc;&#xD;&#xA;		ZeroMemory( &amp;d3d11_shaderResourceViewDesc, sizeof(d3d11_shaderResourceViewDesc));&#xD;&#xA;&#xD;&#xA;		d3d11_shaderResourceViewDesc.ViewDimension			= D3D11_SRV_DIMENSION_TEXTURE2DARRAY;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Format		= d3d11_textureDesc.Format;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.MostDetailedMip	= d3d11_textureDesc.MipLevels - 1;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.MipLevels		= d3d11_textureDesc.MipLevels;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.FirstArraySlice	= 0;&#xD;&#xA;		d3d11_shaderResourceViewDesc.Texture2DArray.ArraySize		= i_countTexture;&#xD;&#xA;&#xD;&#xA;	d3d11p_environment-&gt;d3d11p_dev-&gt;CreateShaderResourceView( d3d11p_textureBuffer, &amp;d3d11_shaderResourceViewDesc, &amp;d3d11p_shaderResourceViewTexture);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14507/loading-a-texture2d-array-in-directx11" />
  <row Id="33515" PostHistoryTypeId="5" PostId="14855" RevisionGUID="bb07b138-189a-4e79-b00a-b1fb8b8eaf47" CreationDate="2011-07-15T18:07:21.553" UserId="8594" Comment="added 163 characters in body" Text="I'll answer your second querstion first: both vertex and pixel shaders can treat part of (4 constants) their assigned constant memory (basically an array of 4D vectors, which can also be interpreted as integers or booleans with more modern shader versions) as a matrix in row-major format. It's up to you to upload the &quot;right&quot; transformation matrix for a job. So for example, for a standard 3D transform you'd upload this: Matrix mFullTransform = mProj * mView * mWorld, to transform a rigid vertex from object space. Get a basic (may just as well be dated) book about programming the post-fixed-pipe graphics pipeline. I have an old nVidia book called the CG tutorial lying around that covers this quite well.&#xD;&#xA;&#xD;&#xA;As for multiple shaders, depending on your application design it might be a good idea to split up vertex and pixel shaders. From there on a common challenge is to write a shader that transforms/renders geometry based on a material. The material likely imposes small differences in the shader code. Now you can choose to upload these parameters (for a modern model) to constants and branch at runtime. This is not a very speedy approach though so it might be a good idea to take a different one. An often used strategy is to 'build' (or splice) and compile shaders at compiletime (or, in some simpler or runtime cases on initialization) and pair them up with the corresponding (material) data. Tailor your solution to your needs: for simple games and graphics demos it usually suffices to write all the shaders by hand and perhaps take a small hit left or right for a runtime parameter or 2.&#xD;&#xA;&#xD;&#xA;Anyway hope it helps, been out of this game for a while.&#xD;&#xA;&#xD;&#xA;[EDIT] Look at the first comment as well, has a good point about an important difference between D3D (which I mistakenly assumed, force of habit..) and OpenGL." />
  <row Id="33516" PostHistoryTypeId="25" PostId="14808" RevisionGUID="f27bd71a-d271-4bc1-87d2-f2c8421b6298" CreationDate="2011-07-15T18:31:56.743" Comment="http://twitter.com/#!/StackGameDev/status/91938060341739520" />
  <row Id="33517" PostHistoryTypeId="17" PostId="14884" RevisionGUID="d4a3923f-b5e1-402e-9d68-aa0fe08f3a93" CreationDate="2011-07-15T19:56:20.340" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/93229/should-the-engine-for-an-eventual-web-based-game-start-as-a-web-service" Text="" />
  <row Id="33518" PostHistoryTypeId="2" PostId="14884" RevisionGUID="f965de11-2178-4387-951e-b6a2c2695643" CreationDate="2011-07-15T18:28:19.740" UserDisplayName="Robbie" Text="I've recently decided to start writing an engine for a card game. I'm not a big &quot;cards&quot; player, but a friend introduced me to the game (it's a spin on the game Danish), and I fell in love.&#xD;&#xA;&#xD;&#xA;I want to develop the game in 3 segments:&#xD;&#xA;&#xD;&#xA; 1. The basic engine, handles cards/decks/gamestate, etc.&#xD;&#xA; 2. A user interface (in the form of a mobile/desktop web app.)&#xD;&#xA; 3. An artificial intelligence with various strategies/difficulties, etc.&#xD;&#xA;&#xD;&#xA;These are very distinct projects, in my mind... and I'm struggling with seeing how they'll all fit together in the long run.&#xD;&#xA;At first, I don't even want to be able to &quot;play&quot; the game using the engine. The engine will primarily be tested by its unit tests. Play testing won't start until a client exists. So there's something of a client-server relationship here.&#xD;&#xA;&#xD;&#xA;The engine is a very large piece of the puzzle. What I'd like to know is: how would you go about developing the &quot;public API&quot; for this engine?&#xD;&#xA;&#xD;&#xA;I was thinking the engine could be a very basic web service, that returns its state via queries to a RESTful API, but I'm worried that developing the engine itself as a web app may lead to poor programming decisions. (For instance, if I chose an MVC micro-framework, well, this API wouldn't really have views... it's just returning serialized objects via JSON, or something to that effect. Is it bad to use MVC for a service like this? )&#xD;&#xA;&#xD;&#xA;My other idea was that the engine would just be a console app, and I would later write a bridge of some kind to pipe data between it and the web-app. (The bridge could really be anything. I mean, the web server and the game engine could both idle in an IRC server and share their state in channels.)&#xD;&#xA;&#xD;&#xA;What approach would you take (develop as a web service, or develop as a standalone app and bridge it later), and why?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Robbie." />
  <row Id="33519" PostHistoryTypeId="1" PostId="14884" RevisionGUID="f965de11-2178-4387-951e-b6a2c2695643" CreationDate="2011-07-15T18:28:19.740" UserDisplayName="Robbie" Text="Should the engine for an eventual web-based game start as a web-service?" />
  <row Id="33520" PostHistoryTypeId="3" PostId="14884" RevisionGUID="f965de11-2178-4387-951e-b6a2c2695643" CreationDate="2011-07-15T18:28:19.740" UserDisplayName="Robbie" Text="&lt;architecture&gt;" />
  <row Id="33521" PostHistoryTypeId="5" PostId="14884" RevisionGUID="02cb2464-73d5-4410-bdc9-cf48c7cc32d7" CreationDate="2011-07-15T20:10:02.073" UserId="8613" Comment="clarified question after move and retagged" Text="I've recently decided to start writing an engine for a card game. I'm not a big &quot;cards&quot; player, but a friend introduced me to the game (it's a spin on the game Danish), and I fell in love.&#xD;&#xA;&#xD;&#xA;I want to develop the game in 3 segments:&#xD;&#xA;&#xD;&#xA; 1. The basic engine, handles cards/decks/gamestate, etc.&#xD;&#xA; 2. A user interface (in the form of a mobile/desktop web app.)&#xD;&#xA; 3. An artificial intelligence with various strategies/difficulties, etc.&#xD;&#xA;&#xD;&#xA;These are very distinct projects, in my mind... and I'm struggling with seeing how they'll all fit together in the long run.&#xD;&#xA;At first, I don't even want to be able to &quot;play&quot; the game using the engine. The engine will primarily be tested by its unit tests. Play testing won't start until a client exists. So there's something of a client-server relationship here.&#xD;&#xA;&#xD;&#xA;The engine is a very large piece of the puzzle. What I'd like to know is: how would you go about developing the &quot;public API&quot; for this engine?&#xD;&#xA;&#xD;&#xA;I was thinking the engine could be a very basic web service, that returns its state via queries to a RESTful API, but I'm worried that developing the engine itself as a web app may lead to poor programming decisions. (For instance, if I chose an MVC micro-framework, well, this API wouldn't really have views... it's just returning serialized objects via JSON, or something to that effect. Is it bad to use MVC for a service like this? )&#xD;&#xA;&#xD;&#xA;My other idea was that the engine would just be a console app, and I would later write a bridge of some kind to pipe data between it and the web-app. (The bridge could really be anything. I mean, the web server and the game engine could both idle in an IRC server and share their state in channels.)&#xD;&#xA;&#xD;&#xA;What approach would you take (develop as a web service, or develop as a standalone app and bridge it later), and why?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Robbie.&#xD;&#xA;&#xD;&#xA;EDIT: So I guess this belongs in Game Development. To clarify, I'm going to write a card game engine. I'm trying to figure out the best way to expose the engine's API so it can be integrated *in the future* with a web client, and an AI client.&#xD;&#xA;&#xD;&#xA;I didn't even have an account here, so howdy :)" />
  <row Id="33522" PostHistoryTypeId="6" PostId="14884" RevisionGUID="02cb2464-73d5-4410-bdc9-cf48c7cc32d7" CreationDate="2011-07-15T20:10:02.073" UserId="8613" Comment="clarified question after move and retagged" Text="&lt;architecture&gt;&lt;web&gt;&lt;client-server&gt;&lt;planning&gt;" />
  <row Id="33523" PostHistoryTypeId="5" PostId="14875" RevisionGUID="e2cf1f99-090b-46d1-b80d-a964dff88189" CreationDate="2011-07-15T20:14:17.797" UserId="7888" Comment="Added link attribution" Text="As of 14 June, 2011 andEngine hasn't added support for pixel-perfect collisions (taking transparent pixels) into account natively, as the [developer's comment][1](as linked by 3nixios) states:&#xD;&#xA;&#xD;&#xA;&gt; &quot;Sorry my post was a little misleading, transparent pixels are not taken into account. Though, when working with the PhysicsBox2DExtension, you can create a Body that has the outline of your actual Sprite content.&quot; -- Nicolas Gramlich&#xD;&#xA;&#xD;&#xA;As he mentions, you can use Box2D physics in conjunction with andEngine to provide pixel-perfect collision detection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.andengine.org/blog/2010/07/andengine-pixel-perfect-collision-detection/#comment-39801" />
  <row Id="33524" PostHistoryTypeId="5" PostId="14882" RevisionGUID="653f734f-eed2-4e20-8e99-25d947b2ce55" CreationDate="2011-07-15T20:43:10.977" UserId="3830" Comment="Expanded on why this is a good idea.  Lots of potential press coverage." Text="If you are sure of your legal footing, and you want your game to be recognizable, then be blatant in your name.  Be in your face about what you are doing.  &#xD;&#xA;&#xD;&#xA;&quot;Counter Clone:  If you like CS, you'll like my game better because it's cheaper and I added rocket launchers!&quot;&#xD;&#xA;&#xD;&#xA;&quot;MineClone.  Get it?  Great.  Then get it 'cause it's only $1!&quot;&#xD;&#xA;&#xD;&#xA;Not only is this &quot;in your face&quot; open and honest, it tells people exactly what they are going to get from your game.  Additionally, you will get press just for being so brazenly obvious.  That kind of press can be gold for you, as all it takes is one well placed mention in the NYT to get you a lot of eyeballs on your game.  &#xD;&#xA;&#xD;&#xA;This approach is like being the Duke Nukem Forever of clones.  You're not apologizing for what you are.  Hell no, you're proud of it, so say it!&#xD;&#xA;&#xD;&#xA;Good luck." />
  <row Id="33525" PostHistoryTypeId="25" PostId="14884" RevisionGUID="b16037a2-697f-4da9-a1ca-de1a2381a2a5" CreationDate="2011-07-15T21:31:56.967" Comment="http://twitter.com/#!/StackGameDev/status/91983359550554112" />
  <row Id="33526" PostHistoryTypeId="2" PostId="14885" RevisionGUID="19e6794e-8feb-40bf-b315-ec141828b763" CreationDate="2011-07-15T21:32:11.450" UserId="1198" Text="The web service route is probably the best and most scalable.&#xD;&#xA;&#xD;&#xA;I also see absolutely **NO** problem using an MVC framework to return JSON (asp.net mvc is great at this). If your controllers only return JSON at first that is fine, you can unit test without any views. When you are ready to add your game interface, you can add views. If their plain html/css or flash/silverlight, it doesn't matter because, as you've stated, you have already built the underlying engine.&#xD;&#xA;&#xD;&#xA;I'm not sure what your development or hosting environments look like but I would not over engineer it. A simple set of php files that return JSON may be all you need. I am not familiar with the game you're building, so I am not sure how complex it will be.&#xD;&#xA;&#xD;&#xA;In my opinion, if you're new to game development, and you're going it yourself, I highly recommend that you get something that is playable as soon as possible, because it will help keep you motivated to complete the game and polish it to a good level." />
  <row Id="33527" PostHistoryTypeId="2" PostId="14886" RevisionGUID="352cc2db-3fbe-4876-9a07-dfec988d430a" CreationDate="2011-07-15T22:13:58.857" UserId="8602" Text="Using XNA I'm working on my first, relatively simple, videogame for the PC. &#xD;&#xA;&#xD;&#xA;At the moment my game window is 1024 X 768 and I have a 'Starfield' linearly wrapped background texture 1280 X 1280 in size whose origin has been set to its center point (width / 2, height / 2). &#xD;&#xA;&#xD;&#xA;This texture is drawn onscreen using (graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2) to place the origin in the center of the window.&#xD;&#xA;     &#xD;&#xA;I want to be able to use the horizontal movement of the mouse to rotate my texture left or right and use the arrow keys to scroll the texture in four directions.&#xD;&#xA; &#xD;&#xA;From my own related coding experiments I have found that once I rotate the texture it no longer scrolls in the direction I want, it's as if somehow the XNA framework's 'sense of direction' has been 'rotated' along with the texture.&#xD;&#xA;&#xD;&#xA;As an example of what I've described above lets say I rotate the texture 45 degrees to the right, then pressing the up arrow key results in the texture scrolling diagonally from top-right to bottom-left. This is not what I want, regardless of the degree or direction of rotation I want my texture to scroll straight up, straight down, or to the left or right depending on which arrow key was pressed.&#xD;&#xA;&#xD;&#xA;How do I go about accomplishing this? Any help or guidance is appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To finish up there are two points I'd like to clarify:&#xD;&#xA;&#xD;&#xA;[1] The reason I'm using linear wrapping on my starfield texture is that it gives a nice impression of an endless starfield.&#xD;&#xA;&#xD;&#xA;[2] Using a texture at least 1280 X 1280 in conjunction with a game window of 1024 X 768 means that at no point in it's rotation will the edges of the texture become visible.&#xD;&#xA;&#xD;&#xA;Thanks for reading.....          &#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        " />
  <row Id="33528" PostHistoryTypeId="1" PostId="14886" RevisionGUID="352cc2db-3fbe-4876-9a07-dfec988d430a" CreationDate="2011-07-15T22:13:58.857" UserId="8602" Text="XNA - Use Mouse To Rotate &amp; Arrow Keys To Scroll A Linearly Wrapped Texture:" />
  <row Id="33529" PostHistoryTypeId="3" PostId="14886" RevisionGUID="352cc2db-3fbe-4876-9a07-dfec988d430a" CreationDate="2011-07-15T22:13:58.857" UserId="8602" Text="&lt;xna&gt;&lt;c#&gt;&lt;textures&gt;&lt;rotation&gt;&lt;mouse&gt;" />
  <row Id="33530" PostHistoryTypeId="2" PostId="14887" RevisionGUID="92de2156-5285-4726-ad4a-43e0d25a577e" CreationDate="2011-07-15T22:24:18.150" UserId="8616" Text="I'm creating a tower defense game and I'm having logistical issues trying to figure out how to best have all of the enitites do their apporiate task.&#xD;&#xA;&#xD;&#xA;I have considered just constantly looping through a list of all the game entities calling a onAction() method, but I'm not sure if that is effective.&#xD;&#xA;&#xD;&#xA;I have also considered having each entity be a thread, but when I am dealing with hundreds of entities, some of which don't need thread time, I'm back to square one.&#xD;&#xA;&#xD;&#xA;Can I get any suggestions on a solid approach? Am I on the correct track with my first idea?&#xD;&#xA;&#xD;&#xA;Thanks for any help ~Aedon&#xD;&#xA;" />
  <row Id="33531" PostHistoryTypeId="1" PostId="14887" RevisionGUID="92de2156-5285-4726-ad4a-43e0d25a577e" CreationDate="2011-07-15T22:24:18.150" UserId="8616" Text="Whats the most efficient method for controlling entities?" />
  <row Id="33532" PostHistoryTypeId="3" PostId="14887" RevisionGUID="92de2156-5285-4726-ad4a-43e0d25a577e" CreationDate="2011-07-15T22:24:18.150" UserId="8616" Text="&lt;entity-system&gt;&lt;logic&gt;" />
  <row Id="33533" PostHistoryTypeId="5" PostId="14852" RevisionGUID="69f78e2f-62d5-450a-9d4a-aa1008a2e845" CreationDate="2011-07-15T22:26:46.677" UserId="8050" Comment="added 2106 characters in body" Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **A** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **A** = **A** + **G** make sure that **G** points toward the planet's center&#xD;&#xA; - update the velocity vector **V** = **V** + **A**&amp;middot;*dt*&#xD;&#xA; - update the position vector **X** = **X** + **V**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**G**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;G is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;As required some hint on implementation. You will need:&#xD;&#xA;&#xD;&#xA; - A vector library &#xD;&#xA; - Engine Model &#xD;&#xA; - Phisics Model&#xD;&#xA; - Collision Detection&#xD;&#xA; - User Interface (input and graphic rendering)&#xD;&#xA;&#xD;&#xA;First of all the vector library: your game can be mono/bi/tree/four... dimentional, as far as you consider your case as a projection of a 3D word, the physical roules hold.&#xD;&#xA;&#xD;&#xA;If n is the dimension you choose (probably 2 or 3 in your case), the library must have:&#xD;&#xA;&#xD;&#xA; - a vector storage entity (a list of n floating point numbers for each vector)&#xD;&#xA; - a sum operator (sum component by component)&#xD;&#xA; - a scalar multiplication operator (each component multiplied by a float)&#xD;&#xA; - a dot-multiplication between vectors (multiplicate component by component and sum up all)&#xD;&#xA; - the vector length (square root of a vector dot-mutiplied by itself)&#xD;&#xA;&#xD;&#xA;You can use a library that does this or implement one by yourself; a vector can be a struct or a class, the choice is yours.&#xD;&#xA;&#xD;&#xA;Each engine should be described by:&#xD;&#xA;&#xD;&#xA; - a vector indicating its thrust strength and direction&#xD;&#xA; - a scalar that indicates the fuel usage per second when on full power; &#xD;&#xA;&#xD;&#xA;your user input will be used to provide to each engine a number that will be between 0 (unused engine) and 1 (full power): the engine (usage) factor.&#xD;&#xA;&#xD;&#xA;Multiply the engine factor for its thrust vector to obtain the engine real trust and sum up all the results of all the available engines; this will give you the **F** of the second step.&#xD;&#xA;&#xD;&#xA;Your engine factor can be used to know the real fuel usage for each engine: multiply the engine factor by the fuel usage and by *dt* to know the instantaneus fuel usage; you can substract this value from the total fuel capacity variable.&#xD;&#xA;&#xD;&#xA;Now you can proceed using the integration to compute the new position, check for the collision with your planet surface; if any, use the length of the velocity vector to say if the landing was a success or a disaster.&#xD;&#xA;&#xD;&#xA;I leave how to get input and how to render your spaceship to you; you can use the engine factor to render the engine status frame by frame, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="33534" PostHistoryTypeId="2" PostId="14888" RevisionGUID="7309ff5b-f2c1-4be0-9268-5040f262abb8" CreationDate="2011-07-15T23:14:09.430" UserId="1573" Text="This came up [on Stack Overflow][1] a while back.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/4112810/handling-entities-in-a-game-c" />
  <row Id="33535" PostHistoryTypeId="12" PostId="14888" RevisionGUID="487c047c-a75f-4dd1-90f2-158ad9893cc7" CreationDate="2011-07-15T23:14:13.610" UserId="1573" Text="[{&quot;Id&quot;:1573,&quot;DisplayName&quot;:&quot;Crashworks&quot;}]" />
  <row Id="33536" PostHistoryTypeId="13" PostId="14888" RevisionGUID="c6804b9c-cf08-4768-8372-2ef4919aad38" CreationDate="2011-07-15T23:14:54.030" UserId="1573" Text="[{&quot;Id&quot;:1573,&quot;DisplayName&quot;:&quot;Crashworks&quot;}]" />
  <row Id="33537" PostHistoryTypeId="2" PostId="14889" RevisionGUID="3ed6b01a-07cb-4ccf-8748-7cbbff8adbd6" CreationDate="2011-07-15T23:49:25.900" UserId="8240" Text="Most games use scripts for controlling much of their entities' logic. That should tell you how much the game's overall performance will be coming from the basic entity loop (ie: precious little).&#xD;&#xA;&#xD;&#xA;The entity loop is not the low-hanging fruit of performance. Use whatever makes making your game easier." />
  <row Id="33538" PostHistoryTypeId="2" PostId="14890" RevisionGUID="84680c70-fe73-4b0a-b957-71a031a62d4b" CreationDate="2011-07-16T00:04:14.020" UserId="7911" Text="First steps: write something and **measure the performance**.&#xD;&#xA;&#xD;&#xA;If the performance is not good enough then use the measurements you made to drive your optimization.&#xD;&#xA;&#xD;&#xA;Naively threading hundreds of entities is probably not the way to go.  A scheduling queue might be, but only if you determined by your measurements above that the big OnAction() loop is tying you down.&#xD;&#xA;&#xD;&#xA;So yes you are on the right track with the action loop and that is, in fact, how many titles work.&#xD;&#xA;" />
  <row Id="33539" PostHistoryTypeId="25" PostId="14886" RevisionGUID="c9c8a5d8-2d9a-4bbc-8094-7efce3ac514a" CreationDate="2011-07-16T00:31:56.737" Comment="http://twitter.com/#!/StackGameDev/status/92028656200851456" />
  <row Id="33540" PostHistoryTypeId="2" PostId="14891" RevisionGUID="689f6783-96b4-4bd6-a493-689c851803a4" CreationDate="2011-07-16T00:33:56.757" UserId="8618" Text="I think you need Unity3D Pro + iOS to actually compile any game for iOS" />
  <row Id="33541" PostHistoryTypeId="2" PostId="14892" RevisionGUID="80b89b98-3169-4118-aa58-dd7d6b03ed9d" CreationDate="2011-07-16T01:00:04.600" UserId="8619" Text="I am completely lost and needed some help.  I have a ontouchListener for a bitmap and know how to check if the touch was within the boundaries of the bitmap. But say I want the center of the image to be at a custom coordinate like [0,0] and the entire image to be in the range of [-319...319] and [-239...239] . Does any one have any thoughts on how to best implement an eventX and eventY to a custom coordinate pair? " />
  <row Id="33542" PostHistoryTypeId="1" PostId="14892" RevisionGUID="80b89b98-3169-4118-aa58-dd7d6b03ed9d" CreationDate="2011-07-16T01:00:04.600" UserId="8619" Text="Bitmap to a custom coordinate pair when touched" />
  <row Id="33543" PostHistoryTypeId="3" PostId="14892" RevisionGUID="80b89b98-3169-4118-aa58-dd7d6b03ed9d" CreationDate="2011-07-16T01:00:04.600" UserId="8619" Text="&lt;android&gt;" />
  <row Id="33544" PostHistoryTypeId="2" PostId="14893" RevisionGUID="d2f9ea18-ae4d-4e4a-837d-2635ba5742a8" CreationDate="2011-07-16T02:18:03.477" UserId="8620" Text="&gt; I'm creating a tower defense game&#xD;&#xA;&#xD;&#xA;If this is your game you shouldn't have performance problems with entity updates unless something else is wrong. If you have a performance problem and you've **measured** it to be coming from your entity loop you need to cull the number of entities being updated, either by simply having less or by looking at architectural/algorithmic optimisation e.g. if projectiles are entities make them something else, and make them in a nice, flat, array or ring buffer you can iterate over quickly instead of instances scattered in memory, inline their updates, or if they must be function calls make sure they aren't virtual&#xD;&#xA;&#xD;&#xA;&gt; I have considered just constantly looping through a list of all the&#xD;&#xA;&gt; game entities calling a onAction() method, but I'm not sure if that is&#xD;&#xA;&gt; effective.&#xD;&#xA;&#xD;&#xA;This is how all of the fastest and best solutions I have seen work fundamentally. There is lots of micro optimisation and threading potential for this approach, but even without it all its fine - you can ship a AAA FPS with something like this at its core, iterating over instances scattered in memory by using virtual calls and have 1000s of entities just fine (in C/C++ at least).&#xD;&#xA;&#xD;&#xA;&gt; I have also considered having each entity be a thread&#xD;&#xA;&#xD;&#xA;That is fairly insane - stay single threaded until you are comfortable and experienced enough with threading to not have such ideas&#xD;&#xA;" />
  <row Id="33545" PostHistoryTypeId="2" PostId="14894" RevisionGUID="82a373f3-1351-42e6-9451-e8e4b85f0cb9" CreationDate="2011-07-16T02:31:50.547" UserId="8620" Text="Can you not include velocity in your state change messages and use that to predict movement? e.g. assume velocity doesn't change until you get a message saying it changed? I think you are already sending positions, so if something &quot;overshoots&quot; because of this you have the correct position from the next update anyway. Then you can step positions during updates as you already do using the velocity from the last message, and overwriting the position whenever a message is received with a new position. This also means that if position doesn't change, but velocity does you need to send a message (if that is even a valid case in your game), but that won't impact your bandwidth usage much, if at all.&#xD;&#xA;&#xD;&#xA;Interpolation should not matter here, that is for e.g when you **know** where something will be in future, whether you have it, what method you are using etc. Are you confused with extrapolation perhaps? (for which what I describe is one, simple, approach)" />
  <row Id="33546" PostHistoryTypeId="2" PostId="14895" RevisionGUID="d4810fc4-8044-4bec-85f9-73cf78238354" CreationDate="2011-07-16T02:44:38.040" UserId="8620" Text="you need to provide much better information to get a very useful answer, you are vague. (what does near mean in 2d? that doesn'f fit with how shadows work at all...)&#xD;&#xA;&#xD;&#xA;the lazy, easy solution is to not use shaders at all - draw everything twice, a first pass with flat colour offset down and to the left/right - this is the drop shadow, then render everything normally over the top. you can combine this with a blur (using a shader if you must) in between the two passes for a bit of polish, and unless you are on a mobile platform or pushing lots of triangles the expense should be fine.&#xD;&#xA;&#xD;&#xA;if you have depth to your scene (you really need to clarify this, it is easily the most important point) then you might want to use depth testing to not cast shadows onto &quot;nothing&quot;. If that is not quite enough then maybe vary brightness and blur depending on the depth of the existing scene fragments vs. the current object fragments being drawn. varying shadows based on depth is fairly complicated, and you typically need to resolve and sample a render target to do this, as well as writing some vertex + fragment program - in which case you might as well just use [shadow mapping][1] (which is well researched and documented - you should Google that if you decide it is appropriate)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Shadow_mapping" />
  <row Id="33547" PostHistoryTypeId="2" PostId="14896" RevisionGUID="dd9323f5-b120-40fd-a2aa-bd992504795c" CreationDate="2011-07-16T03:02:13.567" UserId="8620" Text="I think the idea from the blog linked to still needs periodic synchronisation to be viable - I've seen enough bugs in networked RTS games which don't take that approach.&#xD;&#xA;&#xD;&#xA;Networks are lossy, slow, have latency and might even pollute your data. &quot;Floating point determinism&quot;, (which sounds buzzwordy enough to make me skeptical) is the least of your worries in reality... esp if you use a fixed time step. with variable time steps you will need to interpolate between fixed time steps to avoid determinism problems too. I think this is usually what is meant by non-deterministic &quot;floating point&quot; behaviour - just that variable time steps cause integrations to diverge - not anything to do with math libraries or low level functions.&#xD;&#xA;&#xD;&#xA;Synchronisation is key though." />
  <row Id="33551" PostHistoryTypeId="2" PostId="14898" RevisionGUID="c75d71c6-107d-42fd-a160-f6cf2594c5aa" CreationDate="2011-07-16T03:10:22.110" UserId="8338" Text="I'm making a platformer game and I'm having some trouble wrapping my head around how to organize my classes. I'm wondering what the best way to have everything interact would be without passing parameters all over the place. I've heard of MVC, but does this apply? Should I look into it more?&#xD;&#xA;&#xD;&#xA;Thanks in advance" />
  <row Id="33552" PostHistoryTypeId="1" PostId="14898" RevisionGUID="c75d71c6-107d-42fd-a160-f6cf2594c5aa" CreationDate="2011-07-16T03:10:22.110" UserId="8338" Text="Organizing platformer game into classes" />
  <row Id="33553" PostHistoryTypeId="3" PostId="14898" RevisionGUID="c75d71c6-107d-42fd-a160-f6cf2594c5aa" CreationDate="2011-07-16T03:10:22.110" UserId="8338" Text="&lt;programming&gt;&lt;platform-games&gt;" />
  <row Id="33554" PostHistoryTypeId="2" PostId="14899" RevisionGUID="a1840e72-2437-4eef-8262-ef28c5381b0c" CreationDate="2011-07-16T03:12:35.257" UserId="8620" Text="You can use multitexturing to do this - because you can bind a different texture to each texture unit you can then use your uniforms to select which one. The limit is hardware dependent, but usually no less than 8 and very occasionally as small as 4.&#xD;&#xA;&#xD;&#xA;http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node60.html&#xD;&#xA;&#xD;&#xA;Multitexturing predates shaders so support is fairly global.&#xD;&#xA;&#xD;&#xA;This does mean not using a sampler array and instead using your own logic - &quot;just&quot; unroll a binary search, or even better use some bit magic.&#xD;&#xA;&#xD;&#xA;It is however fastest to use one texture for all calls and for it to be an atlas of some kind." />
  <row Id="33555" PostHistoryTypeId="25" PostId="14887" RevisionGUID="88edff79-8910-49e8-88ce-c48d4ff7eff9" CreationDate="2011-07-16T03:31:56.820" Comment="http://twitter.com/#!/StackGameDev/status/92073954516287490" />
  <row Id="33557" PostHistoryTypeId="25" PostId="14898" RevisionGUID="121f290a-d1e7-4163-99bc-92b4baa565df" CreationDate="2011-07-16T06:31:56.717" Comment="http://twitter.com/#!/StackGameDev/status/92119254450708480" />
  <row Id="33558" PostHistoryTypeId="17" PostId="14900" RevisionGUID="9e24f4e2-0684-4bbd-94e4-830ebd3a7189" CreationDate="2011-07-16T06:54:52.233" UserId="-1" Comment="from http://stackoverflow.com/questions/6715860/turning-a-sprite-such-that-it-rotates-in-the-direction-thats-most-efficient" Text="" />
  <row Id="33559" PostHistoryTypeId="2" PostId="14900" RevisionGUID="5717d512-ae5d-4698-a416-f7463a7a50c8" CreationDate="2011-07-16T06:46:19.857" UserDisplayName="Dave" Text="I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed).&#xD;&#xA;&#xD;&#xA;The problem I'm having is, from one direction to another, the sprite will often turn in wild, unnecessary ways instead of appearing like you might expect a car to appear (turn such that the minimum delta in angle occurs).&#xD;&#xA;&#xD;&#xA;Right now I'm using the following formula to calculate the rotation float for the current velocity:&#xD;&#xA;&#xD;&#xA;    MathHelper.PiOver2 + -Math.Atan2(anotherVector.Y - vector.Y, -(anotherVector.X - vector.X));&#xD;&#xA;&#xD;&#xA;And then I lerp the current rotation by the new rotation by the rotation speed (10f):&#xD;&#xA;&#xD;&#xA;    rotation = MathHelper.Lerp(rotation, targetRotation, 10f * (float)gameTime.ElapsedGameTime.TotalSeconds);&#xD;&#xA;&#xD;&#xA;But unfortunately, it's causing the sprite to spin in wild directions before reaching the correct angle. Any suggestions?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33560" PostHistoryTypeId="1" PostId="14900" RevisionGUID="5717d512-ae5d-4698-a416-f7463a7a50c8" CreationDate="2011-07-16T06:46:19.857" UserDisplayName="Dave" Text="Turning a sprite such that it rotates in the direction that's most efficient" />
  <row Id="33561" PostHistoryTypeId="3" PostId="14900" RevisionGUID="5717d512-ae5d-4698-a416-f7463a7a50c8" CreationDate="2011-07-16T06:46:19.857" UserDisplayName="Dave" Text="&lt;c#&gt;&lt;xna&gt;" />
  <row Id="33562" PostHistoryTypeId="2" PostId="14901" RevisionGUID="6e23d9ce-4c9d-49b0-9c04-d4c3c5559bb6" CreationDate="2011-07-16T07:20:49.587" UserId="322" Text="This is due to the angle wrapping. For example, lerping from 1 degree to 359 degrees is not what is wanted, instead the equivalent lerp from 1 degree to -1 degree should be used. If the angles are in the same range, then adding or subtracting 2*pi to the target will work, e.g.&#xD;&#xA;&#xD;&#xA;    if (targetRotation &gt; rotation+Pi)&#xD;&#xA;        targetRotation -= 2*Pi;&#xD;&#xA;    else if (targetRotation &lt; rotation-Pi)&#xD;&#xA;        targetRotation += 2*Pi;&#xD;&#xA;It's important that the angles are in the same range. The [-pi,pi] range returned by atan2 is the most standard, so I'd recommend using that for all angles if possible. Whatever range is chosen, wrap the rotation back into that range after lerping." />
  <row Id="33563" PostHistoryTypeId="2" PostId="14902" RevisionGUID="76edb1c7-f16f-4a28-9ada-dc704b4b89ee" CreationDate="2011-07-16T08:45:57.143" UserId="5418" Text="Steering towards a position is not too difficult, but I personally struggled for a while with the problem of steering towards a position and reaching it at a specific speed, or following a path with speed constraints.&#xD;&#xA;&#xD;&#xA;I solved the problem using a [Hermite curve][1]. Set p0 and m0 to the position and velocities of your ship, p1 and m1 to your target position and speeds. This assumes you want the ship to follow one second after the target. Compute the second derivative of p(0), that will give you the acceleration to apply to your ship.&#xD;&#xA;&#xD;&#xA;Here is the code for the second derivative (in F#, I hope you can adapt it to your language of choice; sq() computes the square, single quotes not interpreted as quotes but as characters, they are part of the identifier):&#xD;&#xA;&#xD;&#xA;        let h'' t =&#xD;&#xA;            let h00'' t = 12.0 * t - 6.0&#xD;&#xA;            let h10'' t = 6.0 * t - 4.0&#xD;&#xA;            let h01'' t = -12.0 * t + 6.0&#xD;&#xA;            let h11'' t = 6.0 * t - 2.0&#xD;&#xA;&#xD;&#xA;            let t = (t - t0) / diff_t&#xD;&#xA;&#xD;&#xA;            (sq (1.0 / diff_t)) *&#xD;&#xA;            ((h00'' t * p0) +&#xD;&#xA;             (h10'' t * diff_t * v0) +&#xD;&#xA;             (h01'' t * p1) +&#xD;&#xA;             (h11'' t * diff_t * v1))&#xD;&#xA;&#xD;&#xA;Note that if your ship is subject to external forces (e.g. gravity from planets), you will have to account for that when calculating the thrust from the acceleration.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Cubic_Hermite_spline" />
  <row Id="33564" PostHistoryTypeId="2" PostId="14903" RevisionGUID="76609ca1-52eb-46de-805c-24c7d99cec20" CreationDate="2011-07-16T09:06:24.873" UserId="8240" Text="&gt; Am I doing something wrong or is building a texture atlas the only way to draw sprites that use different textures at once?&#xD;&#xA;&#xD;&#xA;It is not necessarily the &quot;only&quot; way, but it is the *best* way. It is the way that works on anything, from the lowly Voodoo 1 all the way to the Radeon 6990. It doesn't require shaders (though they can be useful with this).&#xD;&#xA;&#xD;&#xA;All it requires is a bit of pre-processing on your end to put all of the images in one large image. This is hardly an onerous burden.&#xD;&#xA;&#xD;&#xA;That being said, how many sprites do you intend to draw per frame? If it's less than a couple of hundred, an atlas isn't that important to your rendering performance. Texture atlases matter most for things like particle systems and fonts, because you're drawing lots of them." />
  <row Id="33565" PostHistoryTypeId="25" PostId="14900" RevisionGUID="7350fe1f-e0c3-490b-9a65-3d2645171114" CreationDate="2011-07-16T09:31:56.783" Comment="http://twitter.com/#!/StackGameDev/status/92164552401231872" />
  <row Id="33566" PostHistoryTypeId="2" PostId="14904" RevisionGUID="d6bbf8d2-6cb0-4f04-a994-2a804c55cf98" CreationDate="2011-07-16T09:54:19.090" UserId="8050" Text="A view is an entity that registers to a model to be notified when changes occour. &#xD;&#xA;&#xD;&#xA;If your model resides to a web server, you have a problem because the HTTP does not implement an explicit way to let the server start a communication. You can use websocket to handle this but you will sacrifice some of your &quot;RESTfulness&quot;... I think that a good solution can be to let your web URL to identify a model and use the HTTP server push to let your views to be notified when needed. &#xD;&#xA;&#xD;&#xA;Lets say you have a running game in &#xD;&#xA;&#xD;&#xA;    /games/cd073ac6-c37e-431f-9a5e-7b61bfacf9be/&#xD;&#xA;&#xD;&#xA;you can use the URL &#xD;&#xA;&#xD;&#xA;    /games/cd073ac6-c37e-431f-9a5e-7b61bfacf9be/playCard?id=3&amp;place=stack &#xD;&#xA;to modify the model and &#xD;&#xA;    &#xD;&#xA;    /games/cd073ac6-c37e-431f-9a5e-7b61bfacf9be/notify &#xD;&#xA;to wait for notifications.&#xD;&#xA;&#xD;&#xA;Notify will wait - for some amount of time - to get news by the model: if something happends a message will be sent (what data are changed or what kind of event happends or whatever).&#xD;&#xA;&#xD;&#xA;The client can do a long ajax request to /games/cd073ac6-c37e-431f-9a5e-7b61bfacf9be/notify and register a notification callback that will both update the view and repost the next notify request. &#xD;&#xA;&#xD;&#xA;If games/cd073ac6-c37e-431f-9a5e-7b61bfacf9be/notify timeouts on the client, a new request is done, if it timeouts on the server, the allocated resources are freed. &#xD;&#xA;&#xD;&#xA;You can build a quite generic notification system on your server and a notification library on your clients so you can build up a consistent MVC over a transparent notification layer.&#xD;&#xA;&#xD;&#xA;If you are looking for a technology, you can consider to build your game engine upon the Couchdb server.&#xD;&#xA;Couchdb is a non-relational REST DBMS that uses HTTP as protocol and JSON as document format. It can also PUT and GET binary or HTML files as attachments so it is possible to write a full webApp using only the DBMS (a couchApp). &#xD;&#xA;&#xD;&#xA;There exist a javascript library that make it possible to react to database updates among other things. A couchdbApp is simply a database so you can copy an application to another server by syncronization: your clients can copy your app to their local server and then playing over a offlined LAN. " />
  <row Id="33567" PostHistoryTypeId="6" PostId="14898" RevisionGUID="665ddd76-1936-4394-b0b8-6c55689f8573" CreationDate="2011-07-16T10:04:24.597" UserId="1156" Comment="edited tags" Text="&lt;architecture&gt;&lt;programming&gt;&lt;platform-games&gt;" />
  <row Id="33568" PostHistoryTypeId="2" PostId="14905" RevisionGUID="50d245a3-3da7-4ac1-bbd6-eae01c18167b" CreationDate="2011-07-16T10:46:58.547" UserId="8050" Text="If you need just to take into account a displacement, you simply have to know where your origin is in standard coordinate system (the one the listener returns).&#xD;&#xA;&#xD;&#xA;Say that your (0,0) is at (150,322), this means that when you get P = (x,y) you can get P' = (x-150,y-322) to get the point in your coordinate system. &#xD;&#xA;&#xD;&#xA;To make it clean try to transform your origin P = (x=150,y=322) =&gt; P' = (150-150,322-322) = (0,0); lets take a point that is 100 pixel on the right to your origin: P = (250,322) =&gt; P' = (250-150,322-322) = (100,0), that is what you need.&#xD;&#xA;&#xD;&#xA;If your coordinate system is not simply a displacement of the one your system provides (rotation, shear, scale involved), a change of homogeneus coordinate system is required.&#xD;&#xA;&#xD;&#xA;  " />
  <row Id="33569" PostHistoryTypeId="2" PostId="14906" RevisionGUID="66be13fd-c40d-40e0-906f-4575cb77c439" CreationDate="2011-07-16T10:51:35.047" UserId="8625" Text="First of all using a thread(talking about OS threads here, not language specific cheap co-routines) is insane. A thread is expensive, for example it needs a stack which by default uses 1MB of address space. Thread switching is expensive costing thousands of CPU cycles.&#xD;&#xA;&#xD;&#xA;I wouldn't use multi threading at all in your main game logic. It adds *a lot* of complexity. First write it single-threaded and later perhaps multi-thread some hot-spots like path-finding and collision detection.&#xD;&#xA;&#xD;&#xA;Just iterating over all entities is usually fast enough. You'll have a few thousand of them, so iterating over them by itself takes fractions of a millisecond. Benchmark first before worrying about such stuff.&#xD;&#xA;&#xD;&#xA;When I wrote an RTS (which from the technical side is not that far from a tower defense game) the top performance killers with a naive implementation were:&#xD;&#xA;&#xD;&#xA;* Collision detection, you need to use some special partitioning to make this fast.&#xD;&#xA;* Pathing can be very difficult, depends on your demands and the topology of your level&#xD;&#xA;* Finding opponents in range. Once again needs special partitioning. And in my experience separate partitions for different factions are a must(you have many friendly units in firing range typically, but few hostiles)&#xD;&#xA;&#xD;&#xA;The simple looping and local behavior cost typically pales compared to these few expensive task." />
  <row Id="33570" PostHistoryTypeId="2" PostId="14907" RevisionGUID="ebaf3157-263b-4aeb-ac80-dba2c749265d" CreationDate="2011-07-16T10:52:08.747" UserId="5021" Text="There are no special rules for a platformer vs. any other game in this respect. I suggest that you just start making your game. You'll make a lot of mistakes, but hacking the game together while staying conscious of what one can do better is how I learned to create clean, organized code.&#xD;&#xA;&#xD;&#xA;Here are some patterns that you should be aware of when making your game:&#xD;&#xA;http://gameprogrammingpatterns.com/introduction.html&#xD;&#xA;&#xD;&#xA;Two or three games from now, you'll be applying the principles that I linked to, and you'll be organizing your code better as a result of seeing how it all ties together from experience.&#xD;&#xA;&#xD;&#xA;Another important point is that many people developing a game in their spare time do not finish it. Hacking your platformer together at the cost of a less than perfect code base might actually allow you to create a finished product. Then you can clean up the engine in version 2.0." />
  <row Id="33571" PostHistoryTypeId="5" PostId="14906" RevisionGUID="a5fb2230-e489-49b6-ba9c-b31d92b4c517" CreationDate="2011-07-16T10:58:36.390" UserId="8625" Comment="added 476 characters in body" Text="First of all using a thread(talking about OS threads here, not language specific cheap co-routines) is insane. A thread is expensive, for example it needs a stack which by default uses 1MB of address space. Thread switching is expensive costing thousands of CPU cycles.&#xD;&#xA;&#xD;&#xA;I wouldn't use multi threading at all in your main game logic. It adds *a lot* of complexity. First write it single-threaded and later perhaps multi-thread some hot-spots like path-finding and collision detection.&#xD;&#xA;&#xD;&#xA;&gt;Tim Sweeney[The Unreal Engine guy]: For multithreading optimizations, we're focusing on physics, animation updates, the renderer's scene traversal loop, sound updates, and content streaming. We are **not attempting to multithread systems that are highly sequential and object-oriented, such as the gameplay**.&#xD;&#xA;&#xD;&#xA;&gt; Implementing a multithreaded system **requires two to three times the development and testing effort** of implementing a comparable non-multithreaded system&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Just iterating over all entities is usually fast enough. You'll have a few thousand of them, so iterating over them by itself takes fractions of a millisecond. Benchmark first before worrying about such stuff.&#xD;&#xA;&#xD;&#xA;When I wrote an RTS (which from the technical side is not that far from a tower defense game) the top performance killers with a naive implementation were:&#xD;&#xA;&#xD;&#xA;* Collision detection, you need to use some special partitioning to make this fast.&#xD;&#xA;* Pathing can be very difficult, depends on your demands and the topology of your level&#xD;&#xA;* Finding opponents in firing-range. Once again needs special partitioning. And in my experience separate partitions for different factions are a must(you have many friendly units in firing range typically, but few hostiles). Locking on to a target once you found one until it get out of range/dies saves a lot too since you don't need to search again all the time.&#xD;&#xA;&#xD;&#xA;The simple looping and local behavior cost typically pales compared to these few expensive task." />
  <row Id="33572" PostHistoryTypeId="5" PostId="14852" RevisionGUID="e2f80013-f98a-4096-b8c7-91e6877e64b0" CreationDate="2011-07-16T11:00:07.177" UserId="8050" Comment="added 147 characters in body" Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **A** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **A** = **A** + **G** make sure that **G** points toward the planet's center&#xD;&#xA; - update the velocity vector **V** = **V** + **A**&amp;middot;*dt*&#xD;&#xA; - update the position vector **X** = **X** + **V**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**G**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;G is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;As required some hint on implementation. You will need:&#xD;&#xA;&#xD;&#xA; - A vector library &#xD;&#xA; - Engine Model &#xD;&#xA; - Phisics Model&#xD;&#xA; - Collision Detection&#xD;&#xA; - User Interface (input and graphic rendering)&#xD;&#xA;&#xD;&#xA;First of all the vector library: your game can be mono/bi/tree/four... dimentional, as far as you consider your case as a projection of a 3D word, the physical roules hold.&#xD;&#xA;&#xD;&#xA;If n is the dimension you choose (probably 2 or 3 in your case), the library must have:&#xD;&#xA;&#xD;&#xA; - a vector storage entity (a list of n floating point numbers for each vector)&#xD;&#xA; - a sum operator (sum component by component)&#xD;&#xA; - a scalar multiplication operator (each component multiplied by a float)&#xD;&#xA; - a dot-multiplication between vectors (multiplicate component by component and sum up all)&#xD;&#xA; - the vector length (square root of a vector dot-mutiplied by itself)&#xD;&#xA;&#xD;&#xA;You can use a library that does this or implement one by yourself; a vector can be a struct or a class, the choice is yours.&#xD;&#xA;&#xD;&#xA;Each engine should be described by:&#xD;&#xA;&#xD;&#xA; - a vector indicating its thrust strength and direction&#xD;&#xA; - a scalar that indicates the fuel usage per second when on full power; &#xD;&#xA;&#xD;&#xA;your user input will be used to provide to each engine a number that will be between 0 (unused engine) and 1 (full power): the engine (usage) factor.&#xD;&#xA;&#xD;&#xA;Multiply the engine factor for its thrust vector to obtain the engine real trust and sum up all the results of all the available engines; this will give you the **F** of the second step.&#xD;&#xA;&#xD;&#xA;Your engine factor can be used to know the real fuel usage for each engine: multiply the engine factor by the fuel usage and by *dt* to know the instantaneous fuel usage; you can substract this value from the total fuel capacity variable.&#xD;&#xA;&#xD;&#xA;Now you can proceed using the integration to compute the new position, check for the collision with your planet surface; if any, use the length of the velocity vector to say if the landing was a success or a disaster.&#xD;&#xA;&#xD;&#xA;Obviously other collision checks can/should be made, some surface entities cant be allowed as landing point so every collision is a fatal one.&#xD;&#xA;&#xD;&#xA;I leave how to get input and how to render your spaceship to you; you can use the engine factor to render the engine status frame by frame, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="33573" PostHistoryTypeId="5" PostId="14906" RevisionGUID="8e288233-5876-4508-a409-a69e2e36bd45" CreationDate="2011-07-16T11:26:29.563" UserId="8625" Comment="added 47 characters in body" Text="First of all using a thread(talking about OS threads here, not language specific cheap co-routines) is insane. A thread is expensive, for example it needs a stack which by default uses 1MB of address space. Thread switching is expensive costing thousands of CPU cycles.&#xD;&#xA;&#xD;&#xA;I wouldn't use multi threading at all in your main game logic. It adds *a lot* of complexity. First write it single-threaded and later perhaps multi-thread some hot-spots like path-finding and collision detection.&#xD;&#xA;&#xD;&#xA;&gt;Tim Sweeney[The Unreal Engine guy]: For multithreading optimizations, we're focusing on physics, animation updates, the renderer's scene traversal loop, sound updates, and content streaming. We are **not attempting to multithread systems that are highly sequential and object-oriented, such as the gameplay**.&#xD;&#xA;&#xD;&#xA;&gt; Implementing a multithreaded system **requires two to three times the development and testing effort** of implementing a comparable non-multithreaded system&#xD;&#xA;&#xD;&#xA;&gt; From http://www.anandtech.com/show/1645/3&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Just iterating over all entities is usually fast enough. You'll have a few thousand of them, so iterating over them by itself takes fractions of a millisecond. Benchmark first before worrying about such stuff.&#xD;&#xA;&#xD;&#xA;When I wrote an RTS (which from the technical side is not that far from a tower defense game) the top performance killers with a naive implementation were:&#xD;&#xA;&#xD;&#xA;* Collision detection, you need to use some special partitioning to make this fast.&#xD;&#xA;* Pathing can be very difficult, depends on your demands and the topology of your level&#xD;&#xA;* Finding opponents in firing-range. Once again needs special partitioning. And in my experience separate partitions for different factions are a must(you have many friendly units in firing range typically, but few hostiles). Locking on to a target once you found one until it get out of range/dies saves a lot too since you don't need to search again all the time.&#xD;&#xA;&#xD;&#xA;The simple looping and local behavior cost typically pales compared to these few expensive task." />
  <row Id="33574" PostHistoryTypeId="5" PostId="14886" RevisionGUID="4a564179-55ad-40d9-9e52-990024b1fe3e" CreationDate="2011-07-16T11:41:52.353" UserId="8602" Comment="added 4025 characters in body" Text="Using XNA I'm working on my first, relatively simple, videogame for the PC. &#xD;&#xA;&#xD;&#xA;At the moment my game window is 1024 X 768 and I have a 'Starfield' linearly wrapped background texture 1280 X 1280 in size whose origin has been set to its center point (width / 2, height / 2). &#xD;&#xA;&#xD;&#xA;This texture is drawn onscreen using (graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2) to place the origin in the center of the window.&#xD;&#xA;     &#xD;&#xA;I want to be able to use the horizontal movement of the mouse to rotate my texture left or right and use the arrow keys to scroll the texture in four directions.&#xD;&#xA; &#xD;&#xA;From my own related coding experiments I have found that once I rotate the texture it no longer scrolls in the direction I want, it's as if somehow the XNA framework's 'sense of direction' has been 'rotated' along with the texture.&#xD;&#xA;&#xD;&#xA;As an example of what I've described above lets say I rotate the texture 45 degrees to the right, then pressing the up arrow key results in the texture scrolling diagonally from top-right to bottom-left. This is not what I want, regardless of the degree or direction of rotation I want my texture to scroll straight up, straight down, or to the left or right depending on which arrow key was pressed.&#xD;&#xA;&#xD;&#xA;How do I go about accomplishing this? Any help or guidance is appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To finish up there are two points I'd like to clarify:&#xD;&#xA;&#xD;&#xA;[1] The reason I'm using linear wrapping on my starfield texture is that it gives a nice impression of an endless starfield.&#xD;&#xA;&#xD;&#xA;[2] Using a texture at least 1280 X 1280 in conjunction with a game window of 1024 X 768 means that at no point in it's rotation will the edges of the texture become visible.&#xD;&#xA;&#xD;&#xA;Thanks for reading.....          &#xD;&#xA;           &#xD;&#xA;Update # 1 - as requested by RCIX:&#xD;&#xA;&#xD;&#xA;The code below is what I was referring to earlier when I mentioned '***related*** coding experiments'. As you can see I am scrolling a linearly wrapped texture in the direction I've moved the mouse relative to the center of the screen. This works perfectly if I don't rotate the texture, but once I do rotate it the direction of the scrolling gets messed up for some reason.     &#xD;&#xA;&#xD;&#xA;    public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;        GraphicsDeviceManager graphics;&#xD;&#xA;    &#xD;&#xA;        SpriteBatch spriteBatch;&#xD;&#xA;    &#xD;&#xA;        int x;&#xD;&#xA;        int y;&#xD;&#xA;    &#xD;&#xA;        float z = 250f;&#xD;&#xA;    &#xD;&#xA;        Texture2D Overlay;&#xD;&#xA;    &#xD;&#xA;        Texture2D RotatingBackground;&#xD;&#xA;    &#xD;&#xA;        Rectangle? sourceRectangle;&#xD;&#xA;    &#xD;&#xA;        Color color;&#xD;&#xA;    &#xD;&#xA;        float rotation;&#xD;&#xA;    &#xD;&#xA;        Vector2 ScreenCenter;&#xD;&#xA;    &#xD;&#xA;        Vector2 Origin;&#xD;&#xA;    &#xD;&#xA;        Vector2 scale;&#xD;&#xA;    &#xD;&#xA;        Vector2 Direction;&#xD;&#xA;    &#xD;&#xA;        SpriteEffects effects;&#xD;&#xA;    &#xD;&#xA;        float layerDepth;&#xD;&#xA;    &#xD;&#xA;        public Game1()&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;            graphics = new GraphicsDeviceManager(this);&#xD;&#xA;    &#xD;&#xA;            Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        protected override void Initialize()&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;            graphics.PreferredBackBufferWidth = 1024;&#xD;&#xA;    &#xD;&#xA;            graphics.PreferredBackBufferHeight = 768;&#xD;&#xA;    &#xD;&#xA;            graphics.ApplyChanges();&#xD;&#xA;    &#xD;&#xA;            Direction = Vector2.Zero;    &#xD;&#xA;    &#xD;&#xA;            IsMouseVisible = true;&#xD;&#xA;    &#xD;&#xA;            ScreenCenter = new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2);&#xD;&#xA;    &#xD;&#xA;            Mouse.SetPosition((int)graphics.PreferredBackBufferWidth / 2, (int)graphics.PreferredBackBufferHeight / 2);&#xD;&#xA;    &#xD;&#xA;            sourceRectangle = null;&#xD;&#xA;    &#xD;&#xA;            color = Color.White;&#xD;&#xA;    &#xD;&#xA;            rotation = 0.0f;&#xD;&#xA;    &#xD;&#xA;            scale = new Vector2(1.0f, 1.0f);&#xD;&#xA;    &#xD;&#xA;            effects = SpriteEffects.None;&#xD;&#xA;    &#xD;&#xA;            layerDepth = 1.0f;&#xD;&#xA;    &#xD;&#xA;            base.Initialize();&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;            spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;    &#xD;&#xA;            Overlay = Content.Load&lt;Texture2D&gt;(&quot;Overlay&quot;);&#xD;&#xA;    &#xD;&#xA;            RotatingBackground = Content.Load&lt;Texture2D&gt;(&quot;Background&quot;);&#xD;&#xA;    &#xD;&#xA;            Origin = new Vector2((int)RotatingBackground.Width / 2, (int)RotatingBackground.Height / 2);&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        protected override void UnloadContent()&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        protected override void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;            float timePassed = (float)gameTime.ElapsedGameTime.TotalSeconds;&#xD;&#xA;    &#xD;&#xA;            MouseState ms = Mouse.GetState();&#xD;&#xA;    &#xD;&#xA;            Vector2 MousePosition = new Vector2(ms.X, ms.Y);&#xD;&#xA;    &#xD;&#xA;            Direction = ScreenCenter - MousePosition;&#xD;&#xA;    &#xD;&#xA;            if (Direction != Vector2.Zero)&#xD;&#xA;            {&#xD;&#xA;    &#xD;&#xA;                Direction.Normalize();&#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            x += (int)(Direction.X * z * timePassed);&#xD;&#xA;    &#xD;&#xA;            y += (int)(Direction.Y * z * timePassed);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            //No rotation = texture scrolls as intended, With rotation = texture no longer scrolls in the direction of the mouse. My update method needs to somehow compensate for this.         &#xD;&#xA;            //rotation += 0.01f;  &#xD;&#xA;    &#xD;&#xA;            base.Update(gameTime);&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;    &#xD;&#xA;            spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.LinearWrap, null, null);&#xD;&#xA;    &#xD;&#xA;            spriteBatch.Draw(RotatingBackground, ScreenCenter, new Rectangle(x, y, RotatingBackground.Width, RotatingBackground.Height), color, rotation, Origin, scale, effects, layerDepth);&#xD;&#xA;    &#xD;&#xA;            spriteBatch.Draw(Overlay, Vector2.Zero, Color.White);&#xD;&#xA;    &#xD;&#xA;            spriteBatch.End();&#xD;&#xA;    &#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    }  &#xD;&#xA;&#xD;&#xA;        " />
  <row Id="33575" PostHistoryTypeId="2" PostId="14908" RevisionGUID="fb595805-e4a6-4712-9528-10808bdc1a04" CreationDate="2011-07-16T12:14:08.360" UserId="3887" Text="I've done an indie remake of an old arcade game from 1980. &#xD;&#xA;&#xD;&#xA;Can I use its name? I thought copyright expired after 25 years but I could be wrong, hence this question." />
  <row Id="33576" PostHistoryTypeId="1" PostId="14908" RevisionGUID="fb595805-e4a6-4712-9528-10808bdc1a04" CreationDate="2011-07-16T12:14:08.360" UserId="3887" Text="can i reuse the name of an old arcade game?" />
  <row Id="33577" PostHistoryTypeId="3" PostId="14908" RevisionGUID="fb595805-e4a6-4712-9528-10808bdc1a04" CreationDate="2011-07-16T12:14:08.360" UserId="3887" Text="&lt;legal&gt;&lt;copyright&gt;" />
  <row Id="33578" PostHistoryTypeId="2" PostId="14909" RevisionGUID="2e221c22-61a1-4b73-b84c-07d3ebf701ff" CreationDate="2011-07-16T12:29:44.933" UserId="8625" Text="Are floating-points deterministic?&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I did a lot of reading on this issue a few years back when I wanted to write an RTS using the same lockstep architecture you do.&#xD;&#xA;&#xD;&#xA;My conclusions about hardware floating-points were:&#xD;&#xA;&#xD;&#xA;* The same native assembly code is most likely deterministic provided you're careful with floating point flags and compiler settings.&#xD;&#xA;* There was one open source RTS project that claimed they got deterministic C/C++ compiles across different compilers using a wrapper library. I didn't verify that claim.&#xD;&#xA;* The .net JIT is allowed quite a bit of leeway. In particular it is allowed to use higher accuracy than requires. Also it uses different instruction sets on x86 and AMD64.&#xD;&#xA;&#xD;&#xA;I concluded that it's impossible to use the built in floating point types in .net deterministically.&#xD;&#xA;&#xD;&#xA;Possible Workarounds&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Thus I needed workarounds. I considered:&#xD;&#xA;&#xD;&#xA;1. Implement `FixedPoint32` in C#. While this is not too hard(I have a half finished implementation) the very small range of values makes it annoying to use. You have to be careful at all times so you neither overflow, nor lose too much precision. In the end I found this not easier than using integers directly.&#xD;&#xA;2. Implement FixedPoint64 in C#. I found this rather hard to do. For some operations intermediate integers of 128bit would be useful. But .net doesn't offer such a type.&#xD;&#xA;3. Use native code for the math operations which is deterministic on one platform. Incurs the overhead of a delegate call on every math operation. Loses ability to run cross platform.&#xD;&#xA;4. Use `Decimal`. But it's slow, takes a lot of memory and easily throws exceptions (division by 0, overflows). It's very nice for financial use, but no good fit for games.&#xD;&#xA;5. Implement a custom 32 bit floating-point. Sounded rather difficult at first. The lack of a BitScanReverse intrinsic causes a few annoyances when implementing this.&#xD;&#xA;&#xD;&#xA;My SoftFloat&#xD;&#xA;----&#xD;&#xA;Inspired by &lt;a href=&quot;http://stackoverflow.com/questions/6683059/are-floating-point-numbers-consistent-in-c-can-they-be/6685966#6685966&quot;&gt;your post on StackOverflow&lt;/a&gt;, I've just started implementing a 32 bit floating-point type in software and the results are promising.&#xD;&#xA;&#xD;&#xA;* The memory representation is binary compatible with IEEE floats, so I can reinterpret cast when outputting them to graphics code.&#xD;&#xA;* It supports SubNorms, infinities and NaNs.&#xD;&#xA;* The exact results are not identical to the IEEE results, but that usually doesn't matter for games. In this kind of code it only matters that the result is the same for all users, not that it's accurate to the last digit.&#xD;&#xA;* Performance is decent. A trivial test showed that it can do about 75MFLOPS compared 220-260MFLOPS with `float` for addition/multiplication(Single thread on a 2.66GHz i3). If anybody has good floating point benchmarks for .net please send them to me, since my current test is very rudimentary.&#xD;&#xA;* Rounding can be improved. Currently it truncates, which roughly corresponds to rounding towards zero.&#xD;&#xA;* It's still very incomplete. Currently division, casts and complex math operations are missing.&#xD;&#xA;&#xD;&#xA;If anybody want to contribute tests or improve the code, just contact me, or issue a pull request on github. https://github.com/CodesInChaos/SoftFloat&#xD;&#xA;&#xD;&#xA;Other sources of indeterminism&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;There are also other sources of indeterminism in .net. &#xD;&#xA;&#xD;&#xA;* iterating over a `Dictionary&lt;TKey,TValue&gt;` or `HashSet&lt;T&gt;` returns the elements in an undefined order.&#xD;&#xA;* `object.GetHashCode()` differs from run to run.&#xD;&#xA;* The implementation of the built in `Random` class is unspecified, use your own.&#xD;&#xA;* Multithreading with naive locking leads to reordering and differing results. Be very careful to use threads correctly." />
  <row Id="33579" PostHistoryTypeId="25" PostId="14876" RevisionGUID="108641ec-85f1-4631-ad5b-7b829ada05e8" CreationDate="2011-07-16T12:31:56.993" Comment="http://twitter.com/#!/StackGameDev/status/92209851207393280" />
  <row Id="33580" PostHistoryTypeId="2" PostId="14910" RevisionGUID="dfc969a7-d593-4b77-9580-4668a2423cc5" CreationDate="2011-07-16T12:35:22.120" UserId="165" Text="You're asking about more than the *name*, if you re-made the actual *game* (rhyme unintended). In the US, [copyright has been constantly extended][1], and is now the author's life + 75 years - so no, the game is still copyrighted.&#xD;&#xA;&#xD;&#xA;And the name is covered by *[trademark][2]*, not copyright (which also would not have expired by now). If your name is *identical*, then yes it's a trademark violation. If it's *similar*, then it depends - some companies are more litigious than others (See [Edge Games][3], who sued anyone that had a game with the word *edge* in it, like &quot;Mirror's Edge&quot; by EA.&#xD;&#xA;&#xD;&#xA;Activision had to license the name [Civilization][4] from Avalon Hill, maker of a board game with the same name.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Copyright_extension#Duration&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Trademark_infringement&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Edge_Games&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Civilization_%28series%29" />
  <row Id="33581" PostHistoryTypeId="5" PostId="14910" RevisionGUID="e6f624b1-977b-46a9-894b-efbe68241477" CreationDate="2011-07-16T12:40:45.320" UserId="165" Comment="added 18 characters in body" Text="You're asking about more than the *name*, if you re-made the actual *game* (rhyme unintended). In the US, [copyright has been constantly extended][1], and is now the author's life + 75 years - so no, the game is still copyrighted.&#xD;&#xA;&#xD;&#xA;And the name is covered by *[trademark][2]*, not copyright (which also would not have expired - I don't it does expire). If your name is *identical*, then yes it's a trademark violation. If it's *similar*, then it depends - some companies are more litigious than others (See [Edge Games][3], who sued anyone that had a game with the word *edge* in it, like &quot;Mirror's Edge&quot; by EA.&#xD;&#xA;&#xD;&#xA;Activision had to license the name [Civilization][4] from Avalon Hill, maker of a board game with the same name.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Copyright_extension#Duration&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Trademark_infringement&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Edge_Games&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Civilization_%28series%29" />
  <row Id="33582" PostHistoryTypeId="5" PostId="14909" RevisionGUID="a45b905a-7dde-4bd0-b7be-13b97173416a" CreationDate="2011-07-16T12:42:45.603" UserId="8625" Comment="added 113 characters in body" Text="Are floating-points deterministic?&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I did a lot of reading on this issue a few years back when I wanted to write an RTS using the same lockstep architecture you do.&#xD;&#xA;&#xD;&#xA;My conclusions about hardware floating-points were:&#xD;&#xA;&#xD;&#xA;* The same native assembly code is most likely deterministic provided you're careful with floating point flags and compiler settings.&#xD;&#xA;* There was one open source RTS project that claimed they got deterministic C/C++ compiles across different compilers using a wrapper library. I didn't verify that claim.&#xD;&#xA;* The .net JIT is allowed quite a bit of leeway. In particular it is allowed to use higher accuracy than requires. Also it uses different instruction sets on x86 and AMD64.&#xD;&#xA;* Complex instructions (including trigonometric function, exponentials, logarithms) are especially problematic.&#xD;&#xA;&#xD;&#xA;I concluded that it's impossible to use the built in floating point types in .net deterministically.&#xD;&#xA;&#xD;&#xA;Possible Workarounds&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Thus I needed workarounds. I considered:&#xD;&#xA;&#xD;&#xA;1. Implement `FixedPoint32` in C#. While this is not too hard(I have a half finished implementation) the very small range of values makes it annoying to use. You have to be careful at all times so you neither overflow, nor lose too much precision. In the end I found this not easier than using integers directly.&#xD;&#xA;2. Implement FixedPoint64 in C#. I found this rather hard to do. For some operations intermediate integers of 128bit would be useful. But .net doesn't offer such a type.&#xD;&#xA;3. Use native code for the math operations which is deterministic on one platform. Incurs the overhead of a delegate call on every math operation. Loses ability to run cross platform.&#xD;&#xA;4. Use `Decimal`. But it's slow, takes a lot of memory and easily throws exceptions (division by 0, overflows). It's very nice for financial use, but no good fit for games.&#xD;&#xA;5. Implement a custom 32 bit floating-point. Sounded rather difficult at first. The lack of a BitScanReverse intrinsic causes a few annoyances when implementing this.&#xD;&#xA;&#xD;&#xA;My SoftFloat&#xD;&#xA;----&#xD;&#xA;Inspired by &lt;a href=&quot;http://stackoverflow.com/questions/6683059/are-floating-point-numbers-consistent-in-c-can-they-be/6685966#6685966&quot;&gt;your post on StackOverflow&lt;/a&gt;, I've just started implementing a 32 bit floating-point type in software and the results are promising.&#xD;&#xA;&#xD;&#xA;* The memory representation is binary compatible with IEEE floats, so I can reinterpret cast when outputting them to graphics code.&#xD;&#xA;* It supports SubNorms, infinities and NaNs.&#xD;&#xA;* The exact results are not identical to the IEEE results, but that usually doesn't matter for games. In this kind of code it only matters that the result is the same for all users, not that it's accurate to the last digit.&#xD;&#xA;* Performance is decent. A trivial test showed that it can do about 75MFLOPS compared 220-260MFLOPS with `float` for addition/multiplication(Single thread on a 2.66GHz i3). If anybody has good floating point benchmarks for .net please send them to me, since my current test is very rudimentary.&#xD;&#xA;* Rounding can be improved. Currently it truncates, which roughly corresponds to rounding towards zero.&#xD;&#xA;* It's still very incomplete. Currently division, casts and complex math operations are missing.&#xD;&#xA;&#xD;&#xA;If anybody want to contribute tests or improve the code, just contact me, or issue a pull request on github. https://github.com/CodesInChaos/SoftFloat&#xD;&#xA;&#xD;&#xA;Other sources of indeterminism&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;There are also other sources of indeterminism in .net. &#xD;&#xA;&#xD;&#xA;* iterating over a `Dictionary&lt;TKey,TValue&gt;` or `HashSet&lt;T&gt;` returns the elements in an undefined order.&#xD;&#xA;* `object.GetHashCode()` differs from run to run.&#xD;&#xA;* The implementation of the built in `Random` class is unspecified, use your own.&#xD;&#xA;* Multithreading with naive locking leads to reordering and differing results. Be very careful to use threads correctly.&#xD;&#xA;* When `WeakReference`s lose their target is indeterministic because the GC may run at any time." />
  <row Id="33583" PostHistoryTypeId="5" PostId="14910" RevisionGUID="1dc85083-76f4-4ff3-8a89-c4d04dc04a23" CreationDate="2011-07-16T12:52:16.407" UserId="165" Comment="added 6 characters in body" Text="You're asking about more than the *name*, if you re-made the actual *game* (rhyme unintended). In the US, [copyright has been constantly extended][1], and is now the author's life + 75 years - so no, the game is still copyrighted.&#xD;&#xA;&#xD;&#xA;And the name is covered by *[trademark][2]*, not copyright (which also would not have expired - I don't think it does expire). If your name is *identical*, then yes it's a trademark violation. If it's *similar*, then it depends - some companies are more litigious than others (See [Edge Games][3], who sued anyone that had a game with the word *edge* in it, like &quot;Mirror's Edge&quot; by EA.&#xD;&#xA;&#xD;&#xA;Activision had to license the name [Civilization][4] from Avalon Hill, maker of a board game with the same name.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Copyright_extension#Duration&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Trademark_infringement&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Edge_Games&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Civilization_%28series%29" />
  <row Id="33584" PostHistoryTypeId="5" PostId="14906" RevisionGUID="b1432e01-d72e-41a0-9a9b-61dbfc13465a" CreationDate="2011-07-16T14:04:27.257" UserId="8625" Comment="added 13 characters in body" Text="First of all, using a thread per entity (talking about OS threads here, not language specific cheap co-routines) is insane. A thread is expensive, for example it needs a stack which by default uses 1MB of address space. Thread switching is expensive costing thousands of CPU cycles.&#xD;&#xA;&#xD;&#xA;I wouldn't use multi threading at all in your main game logic. It adds *a lot* of complexity. First write it single-threaded and later perhaps multi-thread some hot-spots like path-finding and collision detection.&#xD;&#xA;&#xD;&#xA;&gt;Tim Sweeney[The Unreal Engine guy]: For multithreading optimizations, we're focusing on physics, animation updates, the renderer's scene traversal loop, sound updates, and content streaming. We are **not attempting to multithread systems that are highly sequential and object-oriented, such as the gameplay**.&#xD;&#xA;&#xD;&#xA;&gt; Implementing a multithreaded system **requires two to three times the development and testing effort** of implementing a comparable non-multithreaded system&#xD;&#xA;&#xD;&#xA;&gt; From http://www.anandtech.com/show/1645/3&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Just iterating over all entities is usually fast enough. You'll have a few thousand of them, so iterating over them by itself takes fractions of a millisecond. Benchmark first before worrying about such stuff.&#xD;&#xA;&#xD;&#xA;When I wrote an RTS (which from the technical side is not that far from a tower defense game) the top performance killers with a naive implementation were:&#xD;&#xA;&#xD;&#xA;* Collision detection, you need to use some spatial partitioning to make this fast.&#xD;&#xA;* Pathing can be very difficult, depends on your demands and the topology of your level&#xD;&#xA;* Finding opponents in firing-range. Once again needs spatial partitioning. And in my experience separate partitions for different factions are a must(you have many friendly units in firing range typically, but few hostiles). Locking on to a target, once you found one, until it get out of range/dies saves a lot too, since you don't need to search again all the time.&#xD;&#xA;&#xD;&#xA;The cost of simple looping and local entity behavior typically pales compared to these few expensive tasks." />
  <row Id="33585" PostHistoryTypeId="25" PostId="14908" RevisionGUID="f7998859-ac85-4ebd-8553-cd625aa63afa" CreationDate="2011-07-16T15:31:57.080" Comment="http://twitter.com/#!/StackGameDev/status/92255151343157249" />
  <row Id="33586" PostHistoryTypeId="2" PostId="14911" RevisionGUID="43d2e9f4-85b3-4f54-87fb-cde7d59b5d09" CreationDate="2011-07-16T15:37:45.397" UserId="5399" Text="I am just starting to learn Mogre and what I would like to do is to be able to load resources 'explicitly' (i.e. I just provide an absolute path instead of using a resource group tied to a directory).&#xD;&#xA;&#xD;&#xA;This is very different to _manually_ loading resources, which I believe in Ogre has a very specific meaning, to build up the object using Ogres methods. I want to use Ogres resource management system/resource loading code, but to have finer control over which files are loaded and in what groups they are.&#xD;&#xA;&#xD;&#xA;I remember reading how to do this but cannot find the page again; I think its possible to do something like:&#xD;&#xA;&#xD;&#xA; - Declare a resource group&#xD;&#xA; - Declare the resource(s) (this is when the actual resource file name is provided)&#xD;&#xA; - Initialise the resource group to actually load the resource(s)&#xD;&#xA;&#xD;&#xA;Is this the correct procedure? If so, is there any example code showing how to do this?" />
  <row Id="33587" PostHistoryTypeId="1" PostId="14911" RevisionGUID="43d2e9f4-85b3-4f54-87fb-cde7d59b5d09" CreationDate="2011-07-16T15:37:45.397" UserId="5399" Text="Explicit resource loading in Ogre (Mogre)" />
  <row Id="33588" PostHistoryTypeId="3" PostId="14911" RevisionGUID="43d2e9f4-85b3-4f54-87fb-cde7d59b5d09" CreationDate="2011-07-16T15:37:45.397" UserId="5399" Text="&lt;ogre&gt;&lt;resources&gt;&lt;resource-management&gt;" />
  <row Id="33590" PostHistoryTypeId="2" PostId="14913" RevisionGUID="83ffcf5a-a778-49c3-bd59-fef0cbefc149" CreationDate="2011-07-16T16:35:30.983" UserId="7159" Text="I am looking for some good online (ebooks) resources about strategy games discussing the gameplay and the interactive aspects of strategy games, and how to design interesting and challenging strategy game.&#xD;&#xA;&#xD;&#xA;I found this book (http://www.amazon.co.uk/Game-Guru-Strategy-Dave-Morris/dp/1904705456) and seems interesting by reading table of contents. Unfortunately, I did not find any way to buy an ebook version of it and I am in Middle East and ordering this book would take lots of time.&#xD;&#xA;&#xD;&#xA;Any idea?" />
  <row Id="33591" PostHistoryTypeId="1" PostId="14913" RevisionGUID="83ffcf5a-a778-49c3-bd59-fef0cbefc149" CreationDate="2011-07-16T16:35:30.983" UserId="7159" Text="Strategy Games Online Resources" />
  <row Id="33592" PostHistoryTypeId="3" PostId="14913" RevisionGUID="83ffcf5a-a778-49c3-bd59-fef0cbefc149" CreationDate="2011-07-16T16:35:30.983" UserId="7159" Text="&lt;game-design&gt;" />
  <row Id="33593" PostHistoryTypeId="17" PostId="14914" RevisionGUID="ca331d8a-44e9-421c-a6e9-07c745efb6cb" CreationDate="2011-07-16T16:37:42.313" UserId="-1" Comment="from http://stackoverflow.com/questions/6715216/how-can-i-have-my-game-engine-track-player-history" Text="" />
  <row Id="33594" PostHistoryTypeId="2" PostId="14914" RevisionGUID="4efe69b1-96b7-44ed-87fb-21399aa94797" CreationDate="2011-07-16T03:58:39.690" UserDisplayName="Cail" Text="I'm in the very early stages of designing a browser-based text RPG. The project is basically just something I'm doing for fun and as a learning experience. I'm starting to wrap my head around the infrastructure of the game and I keep getting hung up on the best way to accomplish this.&#xD;&#xA;&#xD;&#xA;If I have a map comprised of a grid with different items/monsters/quests/etc. in each 'tile', what's the best way to keep track of the areas on the grid where the player has been? &#xD;&#xA;&#xD;&#xA;If the map is a grid of 1000x1000 squares, I want to know that in the player's entire gaming history, they have already visited squares A-1, F-6, GQ-46, etc. This list could be huge for each and every player.&#xD;&#xA;&#xD;&#xA;Along the same lines, if I have quest-dependant events, how do I track the quests players have completed? Each player would need to have something letting the engine know if they have or have not completed potentially hundreds of quests.&#xD;&#xA;&#xD;&#xA;My first idea was to save this information somehow in each player entry in the database, but that would mean a field for every one of the tiles in the 1000x1000 map. That doesn't seem like it would scale. &#xD;&#xA;&#xD;&#xA;I'm just not sure how to store the info that lets the engine say &quot;hey, I know that out of all the tiles on the map, this player has been on this particular one before.&quot; or &quot;out of all the quests, this player has completed this particular one&quot;.&#xD;&#xA;&#xD;&#xA;What is the best way to approach this?" />
  <row Id="33595" PostHistoryTypeId="1" PostId="14914" RevisionGUID="4efe69b1-96b7-44ed-87fb-21399aa94797" CreationDate="2011-07-16T03:58:39.690" UserDisplayName="Cail" Text="How can I have my game engine track player history?" />
  <row Id="33596" PostHistoryTypeId="3" PostId="14914" RevisionGUID="4efe69b1-96b7-44ed-87fb-21399aa94797" CreationDate="2011-07-16T03:58:39.690" UserDisplayName="Cail" Text="&lt;untagged&gt;" />
  <row Id="33597" PostHistoryTypeId="2" PostId="14915" RevisionGUID="2157bccb-9f9d-493c-abd8-ab3e75cd5aef" CreationDate="2011-07-16T16:57:24.533" UserId="7911" Text="Since your map is a grid of fixed size and all you want is &quot;has been visited&quot;, for the first part you can use a bit-map.  For a 1024x1024 grid your storage size would be 128K and very fast to look up and small enough to keep in memory if you need super fast access (for fog of war rendering, or info overlays).&#xD;&#xA;&#xD;&#xA;The quest info could be done two ways.  It would be pretty easy to store them in a database and run queries as needed, and probably the best solution overall, @Dan Grossman&#xD;&#xA;&#xD;&#xA;The other method would be to generate a hash from the quest information then simply store a list of hashes that the player has completed.  Storage would grow dynamically, hash lookup at run time is very fast, and new quests could be added whenever you wanted.&#xD;&#xA;" />
  <row Id="33598" PostHistoryTypeId="2" PostId="14916" RevisionGUID="7b0751d3-ccf2-4919-9513-30a9e63e5669" CreationDate="2011-07-16T17:04:52.610" UserId="8581" Text="As a web developer forming a game development group I have found that one of the biggest aspects which set the field apart from normal programming is how game development is not just coding. In the development process you need to work with coders, projects managers, writers, musicians, animation experts, and the like, all throughout the process to get your thing out.&#xD;&#xA;&#xD;&#xA;That said, for what I'm doing now, typically I'll focus exclusively on coding specific parts of the game that I'm familiar with (such as an interface)  while another developer will handle the physics -- because since game development is so complex, it's more of a team effort where it's best to stick to something that interests you rather than being a jack of all trades." />
  <row Id="33599" PostHistoryTypeId="2" PostId="14917" RevisionGUID="e212dcac-fa6b-4276-8d6f-fc6a78f42bca" CreationDate="2011-07-16T17:13:32.243" UserId="8628" Text="I'm trying to write a simple ai-bot for 2d game. And stuck at movement stage(8-way movement).&#xD;&#xA;Generally, i did hybrid of polling(main loop) and events. As it goes:&#xD;&#xA;&#xD;&#xA;    loop&#xD;&#xA;      $net.check_network_connect # reconnect/connect -&gt; authenticate -&gt; select server -&gt; select character&#xD;&#xA;      $console.parse_commands&#xD;&#xA;      &#xD;&#xA;      if $net.state == $net::STATE_IN_GAME&#xD;&#xA;        AI::iterate&#xD;&#xA;      end&#xD;&#xA;    end loop&#xD;&#xA;    &#xD;&#xA;    module AI&#xD;&#xA;      def iterate&#xD;&#xA;        # Map.actors is array of actors on a map&#xD;&#xA;        # it's updated by event, called when i receive packet with actors information&#xD;&#xA;        if Map.actors&#xD;&#xA;          # act == my character, ie == any interactive element, i.e.: farm / door / item on ground&#xD;&#xA;          act = Map.actors.find_me&#xD;&#xA;          ie = Map.interactive.first&#xD;&#xA;          &#xD;&#xA;          # here goes A* pathfinding... cutted :)&#xD;&#xA;          &#xD;&#xA;          # collecting PF nodes to array of cells&#xD;&#xA;          path = path.map { |mp| mp.cell_id }&#xD;&#xA;          &#xD;&#xA;          # updating my own position to the last cell in PF&#xD;&#xA;          act.cell_id = path.last&#xD;&#xA;          &#xD;&#xA;          # sending my request with movement path to server&#xD;&#xA;          $net.send_data Packets::MovementRequest.build(map_id: Map.map_id, squares: path)&#xD;&#xA;          &#xD;&#xA;          # sleeping for speed_per_cell * total_cells, if i skip this delay, server will treat me as SpeedHacker, and after 10+ attempts, i'll be banned&#xD;&#xA;          # === === PROBLEM IS HERE === ===&#xD;&#xA;          sleep 0.255 * path.size&#xD;&#xA;          &#xD;&#xA;          # send confirmation packet, indicate that i'm moved too&#xD;&#xA;          $net.send_data Packets::MovementConfirm.build()&#xD;&#xA;        end&#xD;&#xA;      end&#xD;&#xA;    end&#xD;&#xA;&#xD;&#xA;Currently, my net/ai/mainLoop run in 1 thread and this `sleep` is stopping all things.&#xD;&#xA;&#xD;&#xA;Is there any methodics to handle situation with such delay?  &#xD;&#xA;&#xD;&#xA;e.g. while movement, i can't move elsewhere(e.g. cancel movement), but still can request party/map/character &amp; etc information.&#xD;&#xA;" />
  <row Id="33600" PostHistoryTypeId="1" PostId="14917" RevisionGUID="e212dcac-fa6b-4276-8d6f-fc6a78f42bca" CreationDate="2011-07-16T17:13:32.243" UserId="8628" Text="[Event Based] AI-packet-hooking and movement delay" />
  <row Id="33601" PostHistoryTypeId="3" PostId="14917" RevisionGUID="e212dcac-fa6b-4276-8d6f-fc6a78f42bca" CreationDate="2011-07-16T17:13:32.243" UserId="8628" Text="&lt;ai&gt;&lt;movement&gt;&lt;events&gt;&lt;ruby&gt;" />
  <row Id="33602" PostHistoryTypeId="2" PostId="14918" RevisionGUID="7a9521c0-a3b0-49e6-a8b2-4593feaf032c" CreationDate="2011-07-16T17:38:30.753" UserId="982" Text="I think in game design it is incredibly important to ask the question why about everything, especially something that has become so standard as lives. So I am asking, what is the purpose of a game having the concept of lives? Why have lives?" />
  <row Id="33603" PostHistoryTypeId="1" PostId="14918" RevisionGUID="7a9521c0-a3b0-49e6-a8b2-4593feaf032c" CreationDate="2011-07-16T17:38:30.753" UserId="982" Text="What is the purpose of having lives?" />
  <row Id="33604" PostHistoryTypeId="3" PostId="14918" RevisionGUID="7a9521c0-a3b0-49e6-a8b2-4593feaf032c" CreationDate="2011-07-16T17:38:30.753" UserId="982" Text="&lt;game-design&gt;&lt;lives&gt;" />
  <row Id="33605" PostHistoryTypeId="2" PostId="14919" RevisionGUID="74092a1e-2378-4295-b36e-6bee22c93e0b" CreationDate="2011-07-16T17:50:44.913" UserId="7548" Text="The bottom line is profitability...&#xD;&#xA;&#xD;&#xA;Extra lives provides the player with additional &quot;chances&quot; to &quot;try again.&quot;  Particularly with traditional arcade games back in the 1980s, a player would insert a quarter (25 cents) to play the game, and with this payment they'd get a number of lives (usually 3 or 5).&#xD;&#xA;&#xD;&#xA;With these extra lives, the gameplay is longer, and the player gets more &quot;value&quot; out of the game since they extra lives allowed them to automatically continue the gameplay.  If the game provided only one life, they player might not enjoy the game as much (because the game would be a shorter duration), and consequently may not insert as many quarters to play again later (which would make it less profitable).&#xD;&#xA;&#xD;&#xA;When enjoying video arcades in my younger years back in the 1980s, I noticed that the games that provided more lives tended to be more popular.  I'm sure the arcade game vendors and operators all understood this well as some operators with the less popular arcades tended to set dip-switches on the games [that supported this sort of customization] to provide more lives for the payment.&#xD;&#xA;&#xD;&#xA;Of course, the consumer almost always likes to have the benefit of &quot;extra lives&quot; as this equates to more entertainment.  But, for games that are in very high demand (e.g., &quot;Outrun&quot; when it was new, which was a big arcade machine that featured a seat shaped like a car that actually shook and tilted {if I recall correctly} and vibrated in concert with in-game events, for which I've included a few images below), many arcade operators set the dip-switches to severely limit the numbers of lives under the guise of &quot;giving more people a chance to play&quot; (although I suspect that this decision was more likely motivated by profit).&#xD;&#xA;&#xD;&#xA;Pinball machines had exactly the same concept, except instead of lives the player got balls.  Typically 3-5 balls per quarter.&#xD;&#xA;&#xD;&#xA;One common factor as well was that once all the lives (or cars, or balls, etc.) where lost, the game provided an option to the player to insert another quarter to continue (and get another 3 or 5 lives, cars, balls, etc.).&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;![enter image description here][3]&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/rMGL6.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/SGIgT.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/EjIqA.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/vB3gE.png" />
  <row Id="33606" PostHistoryTypeId="5" PostId="14919" RevisionGUID="f5311824-4bb5-466f-9da7-c13c42c0c8cf" CreationDate="2011-07-16T18:06:45.850" UserId="7548" Comment="added 1415 characters in body" Text="The bottom line is **profitability...**&#xD;&#xA;&#xD;&#xA;Extra lives provides the player with additional &quot;chances&quot; to &quot;try again.&quot;  Particularly with traditional arcade games back in the 1980s, a player would insert a quarter (25 cents) to play the game, and with this payment they'd get a number of lives (usually 3 or 5).&#xD;&#xA;&#xD;&#xA;With these extra lives, the gameplay is longer, and the player gets more &quot;value&quot; out of the game since they extra lives allowed them to automatically continue the gameplay.  If the game provided only one life, they player might not enjoy the game as much (because the game would be a shorter duration), and consequently may not insert as many quarters to play again later (which would make it less profitable).&#xD;&#xA;&#xD;&#xA;When enjoying video arcades in my younger years back in the 1980s, I noticed that the games that provided more lives tended to be more popular.  I'm sure the arcade game vendors and operators all understood this well as some operators with the less popular arcades tended to set dip-switches on the games [that supported this sort of customization] to provide more lives for the payment.&#xD;&#xA;&#xD;&#xA;Of course, the consumer almost always likes to have the benefit of &quot;extra lives&quot; as this equates to more entertainment.  But, for games that are in very high demand (e.g., &quot;Outrun&quot; when it was new, which was a big arcade machine that featured a seat shaped like a car that actually shook and tilted {if I recall correctly} and vibrated in concert with in-game events, for which I've included a few images below), many arcade operators set the dip-switches to severely limit the numbers of lives under the guise of &quot;giving more people a chance to play&quot; (although I suspect that this decision was more likely motivated by profit).&#xD;&#xA;&#xD;&#xA;Pinball machines had exactly the same concept, except instead of lives the player got balls.  Typically 3-5 balls per quarter.&#xD;&#xA;&#xD;&#xA;One common factor as well was that once all the lives (or cars, or balls, etc.) where lost, the game provided an option to the player to insert another quarter to continue (and get another 3 or 5 lives, cars, balls, etc.).&#xD;&#xA;&#xD;&#xA;**Player motivation...**&#xD;&#xA;&#xD;&#xA;The &quot;losing a character's life&quot; factor also adds yet another quality to the gameplay that causes the player to put a little bit more effort into taking care of their character (e.g., feeding it so it doesn't starve to death, avoiding getting hit by weapons, circumventing dangerous traps, etc.).&#xD;&#xA;&#xD;&#xA;If a character never dies, the game may never end and could become quite boring, at least in the case of an action game.  For games like Chess, Ma-Jiang (incorrectly spelled by most authors as &quot;Mah Jongg&quot; or &quot;Mahjjong&quot; and so on), etc., there obviously is no need to have a concept of &quot;lives,&quot; but for most action games where your character is at risk of dying it's beneficial.  Ditto for pinball and other such games too.&#xD;&#xA;&#xD;&#xA;Also, if the player makes some serious mistake in the first 10 seconds of gameplay, the additional lives are a wonderful feature.  Not having this feature can be very discouraging, especially for new players.&#xD;&#xA;&#xD;&#xA;The player knows that there is a limited number of lives available, and will work toward an unspoken goal to improve their gameplay abilities.  Of course, this will require practice, and so the extra lives are also helpful here too.&#xD;&#xA;&#xD;&#xA;**Pictures of Outrun...**&#xD;&#xA;&#xD;&#xA;I've included a few pictures of the Outrun game I mentioned earlier.  For those who remember playing this game in an arcade, I hope this will also bring back some fond memories.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;![enter image description here][3]&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/rMGL6.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/SGIgT.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/EjIqA.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/vB3gE.png" />
  <row Id="33607" PostHistoryTypeId="2" PostId="14920" RevisionGUID="1380c886-3138-4119-addd-d0c1ae901a4f" CreationDate="2011-07-16T18:11:05.937" UserId="6877" Text="Games are for playing purpose. Player play the game to win something, to have fun. Every time they fail to do that, they just ask for another chance. They think, this time, this time for sure I am gonna make it. That's the purpose of having life." />
  <row Id="33608" PostHistoryTypeId="2" PostId="14921" RevisionGUID="f9487927-34ad-4cfb-83c7-d49083f04978" CreationDate="2011-07-16T18:11:29.730" UserId="51" Text="Other than the arcade/profitability/limiting play factor, quite simply lives add tension.&#xD;&#xA;&#xD;&#xA;If falling off a cliff doesn't mean anything (namely, there's no punishment), then you won't feel bad when you do it.  But if you fall off too many times and can't proceed, then you want to make damn sure that you don't fall off the cliff.  Harder games make you feel better when you beat them, it provides bragging rights, etc.&#xD;&#xA;&#xD;&#xA;Of course, that kind of compulsion loop player punishment has gone by the wayside recently.  Taking up the player's time is punishment enough.  When most research shows that people don't finish games as it is, game designers are trying to find ways to make it less frustrating to go through the game but providing enough of a challenge that it's enjoyable.  Basically, it's less about the game and more about the experience.  Lives would be inappropriate in a game like Uncharted, for example." />
  <row Id="33609" PostHistoryTypeId="5" PostId="14919" RevisionGUID="b7b6206c-304e-4f36-9cdf-702bfad8cd22" CreationDate="2011-07-16T18:14:46.390" UserId="7548" Comment="added 1415 characters in body" Text="**Profitability...**&#xD;&#xA;&#xD;&#xA;Extra lives provides the player with additional &quot;chances&quot; to &quot;try again.&quot;  Particularly with traditional arcade games back in the 1980s, a player would insert a quarter (25 cents) to play the game, and with this payment they'd get a number of lives (usually 3 or 5).&#xD;&#xA;&#xD;&#xA;With these extra lives, the gameplay is longer, and the player gets more &quot;value&quot; out of the game since they extra lives allowed them to automatically continue the gameplay.  If the game provided only one life, they player might not enjoy the game as much (because the game would be a shorter duration), and consequently may not insert as many quarters to play again later (which would make it less profitable).&#xD;&#xA;&#xD;&#xA;When enjoying video arcades in my younger years back in the 1980s, I noticed that the games that provided more lives tended to be more popular.  I'm sure the arcade game vendors and operators all understood this well as some operators with the less popular arcades tended to set dip-switches on the games [that supported this sort of customization] to provide more lives for the payment.&#xD;&#xA;&#xD;&#xA;Of course, the consumer almost always likes to have the benefit of &quot;extra lives&quot; as this equates to more entertainment.  But, for games that are in very high demand (e.g., &quot;Outrun&quot; when it was new, which was a big arcade machine that featured a seat shaped like a car that actually shook and tilted {if I recall correctly} and vibrated in concert with in-game events, for which I've included a few images below), many arcade operators set the dip-switches to severely limit the numbers of lives under the guise of &quot;giving more people a chance to play&quot; (although I suspect that this decision was more likely motivated by profit).&#xD;&#xA;&#xD;&#xA;Pinball machines had exactly the same concept, except instead of lives the player got balls.  Typically 3-5 balls per quarter.&#xD;&#xA;&#xD;&#xA;One common factor as well was that once all the lives (or cars, or balls, etc.) where lost, the game provided an option to the player to insert another quarter to continue (and get another 3 or 5 lives, cars, balls, etc.).&#xD;&#xA;&#xD;&#xA;**Measuring skill...**&#xD;&#xA;&#xD;&#xA;As I alluded to in the comments, having lives can also aid the player in measuring their skill:&#xD;&#xA;&#xD;&#xA;* What score did I achieve with 1 (or 3, or 5) lives?&#xD;&#xA;* How much gold did I get before the evil dragon killed me?&#xD;&#xA;* How many times did I play multi-ball mode on that pinball machine in one go?&#xD;&#xA;* How many races was I win with just one car?&#xD;&#xA;&#xD;&#xA;These can become &quot;bragging rights&quot; amongst a player's friends, especially if there were witnesses.  I can remember back in the 1980s seeing people crowd around player who's been playing a particular game for a long time, and playing it well.  Comments from onlookers would sometimes include &quot;she [that player] is still on her first life and she's already completed seven levels&quot; followed by &quot;damn, I always have trouble with the umber-troll on level three, how did she do that?&quot;&#xD;&#xA;&#xD;&#xA;Such measurements can be an important tie into word-of-mouth marketing too.&#xD;&#xA;&#xD;&#xA;**Player motivation...**&#xD;&#xA;&#xD;&#xA;The &quot;losing a character's life&quot; factor also adds yet another quality to the gameplay that causes the player to put a little bit more effort into taking care of their character (e.g., feeding it so it doesn't starve to death, avoiding getting hit by weapons, circumventing dangerous traps, etc.).  With the possibility of losing lives, the player will get more emotionally involved in the gameplay sessions which, in turn, makes the game more interesting.&#xD;&#xA;&#xD;&#xA;If a character never dies, the game may never end and could become quite boring, at least in the case of an action game.  For games like Chess, Ma-Jiang (incorrectly spelled by most authors as &quot;Mah Jongg&quot; or &quot;Mahjjong&quot; and so on), etc., there obviously is no need to have a concept of &quot;lives,&quot; but for most action games where your character is at risk of dying it's beneficial.  Ditto for pinball and other such games too.&#xD;&#xA;&#xD;&#xA;Also, if the player makes some serious mistake in the first 10 seconds of gameplay, the additional lives are a wonderful feature.  Not having this feature can be very discouraging, especially for new players.&#xD;&#xA;&#xD;&#xA;The player knows that there is a limited number of lives available, and will work toward an unspoken goal to improve their gameplay abilities.  Of course, this will require practice, and so the extra lives are also helpful here too.&#xD;&#xA;&#xD;&#xA;**Pictures of Outrun...**&#xD;&#xA;&#xD;&#xA;I've included a few pictures of the Outrun game I mentioned earlier.  For those who remember playing this game in an arcade, I hope this will also bring back some fond memories.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;![enter image description here][3]&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/rMGL6.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/SGIgT.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/EjIqA.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/vB3gE.png" />
  <row Id="33610" PostHistoryTypeId="4" PostId="14908" RevisionGUID="a49b23c7-c741-4d90-9509-9954c22229f1" CreationDate="2011-07-16T18:22:47.113" UserId="146" Comment="edited title" Text="Can I reuse the name of an old arcade game?" />
  <row Id="33611" PostHistoryTypeId="6" PostId="14914" RevisionGUID="e3423582-7ef1-4b88-b15f-7891ca1c17cf" CreationDate="2011-07-16T18:24:16.133" UserId="51" Comment="edited tags" Text="&lt;architecture&gt;&lt;rpg&gt;" />
  <row Id="33612" PostHistoryTypeId="5" PostId="14909" RevisionGUID="45c4c9ee-b656-4079-9a3b-8c68ebc386f0" CreationDate="2011-07-16T18:24:22.200" UserId="8625" Comment="added 105 characters in body" Text="Are floating-points deterministic?&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I did a lot of reading on this issue a few years back when I wanted to write an RTS using the same lockstep architecture you do.&#xD;&#xA;&#xD;&#xA;My conclusions about hardware floating-points were:&#xD;&#xA;&#xD;&#xA;* The same native assembly code is most likely deterministic provided you're careful with floating point flags and compiler settings.&#xD;&#xA;* There was one open source RTS project that claimed they got deterministic C/C++ compiles across different compilers using a wrapper library. I didn't verify that claim. (If I recall correctly it was about the `STREFLOP` library)&#xD;&#xA;* The .net JIT is allowed quite a bit of leeway. In particular it is allowed to use higher accuracy than requires. Also it uses different instruction sets on x86 and AMD64 (I think on x86 it uses the x87, AMD64 it uses some SSE instructions whose behavior differs for denorms).&#xD;&#xA;* Complex instructions (including trigonometric function, exponentials, logarithms) are especially problematic.&#xD;&#xA;&#xD;&#xA;I concluded that it's impossible to use the built in floating point types in .net deterministically.&#xD;&#xA;&#xD;&#xA;Possible Workarounds&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Thus I needed workarounds. I considered:&#xD;&#xA;&#xD;&#xA;1. Implement `FixedPoint32` in C#. While this is not too hard(I have a half finished implementation) the very small range of values makes it annoying to use. You have to be careful at all times so you neither overflow, nor lose too much precision. In the end I found this not easier than using integers directly.&#xD;&#xA;2. Implement `FixedPoint64` in C#. I found this rather hard to do. For some operations intermediate integers of 128bit would be useful. But .net doesn't offer such a type.&#xD;&#xA;3. Use native code for the math operations which is deterministic on one platform. Incurs the overhead of a delegate call on every math operation. Loses ability to run cross platform.&#xD;&#xA;4. Use `Decimal`. But it's slow, takes a lot of memory and easily throws exceptions (division by 0, overflows). It's very nice for financial use, but no good fit for games.&#xD;&#xA;5. Implement a custom 32 bit floating-point. Sounded rather difficult at first. The lack of a BitScanReverse intrinsic causes a few annoyances when implementing this.&#xD;&#xA;&#xD;&#xA;My SoftFloat&#xD;&#xA;----&#xD;&#xA;Inspired by &lt;a href=&quot;http://stackoverflow.com/questions/6683059/are-floating-point-numbers-consistent-in-c-can-they-be/6685966#6685966&quot;&gt;your post on StackOverflow&lt;/a&gt;, I've just started implementing a 32 bit floating-point type in software and the results are promising.&#xD;&#xA;&#xD;&#xA;* The memory representation is binary compatible with IEEE floats, so I can reinterpret cast when outputting them to graphics code.&#xD;&#xA;* It supports SubNorms, infinities and NaNs.&#xD;&#xA;* The exact results are not identical to the IEEE results, but that usually doesn't matter for games. In this kind of code it only matters that the result is the same for all users, not that it's accurate to the last digit.&#xD;&#xA;* Performance is decent. A trivial test showed that it can do about 75MFLOPS compared 220-260MFLOPS with `float` for addition/multiplication(Single thread on a 2.66GHz i3). If anybody has good floating point benchmarks for .net please send them to me, since my current test is very rudimentary.&#xD;&#xA;* Rounding can be improved. Currently it truncates, which roughly corresponds to rounding towards zero.&#xD;&#xA;* It's still very incomplete. Currently division, casts and complex math operations are missing.&#xD;&#xA;&#xD;&#xA;If anybody want to contribute tests or improve the code, just contact me, or issue a pull request on github. https://github.com/CodesInChaos/SoftFloat&#xD;&#xA;&#xD;&#xA;Other sources of indeterminism&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;There are also other sources of indeterminism in .net. &#xD;&#xA;&#xD;&#xA;* iterating over a `Dictionary&lt;TKey,TValue&gt;` or `HashSet&lt;T&gt;` returns the elements in an undefined order.&#xD;&#xA;* `object.GetHashCode()` differs from run to run.&#xD;&#xA;* The implementation of the built in `Random` class is unspecified, use your own.&#xD;&#xA;* Multithreading with naive locking leads to reordering and differing results. Be very careful to use threads correctly.&#xD;&#xA;* When `WeakReference`s lose their target is indeterministic because the GC may run at any time." />
  <row Id="33613" PostHistoryTypeId="25" PostId="14918" RevisionGUID="9a4afbbd-85f0-467a-ac6a-535295ae3951" CreationDate="2011-07-16T18:31:57.017" Comment="http://twitter.com/#!/StackGameDev/status/92300449914421248" />
  <row Id="33615" PostHistoryTypeId="2" PostId="14922" RevisionGUID="2fb1f6ba-9328-4e1b-b17d-f129e67aa59b" CreationDate="2011-07-16T19:38:57.890" UserId="8631" Text="The only safe way to do this is to buy or license the rights for the game from the current owner. This can be expensive and time-consuming. The rights holder might ask for a fixed fee plus royalties, and as an indie game developer, that's likely going to be more than you expect to earn.&#xD;&#xA;&#xD;&#xA;On the other hand, if the original game was produced by a very small company or an individual, you can probably contact them and get permission to do the remake pretty easily.&#xD;&#xA;&#xD;&#xA;If you do a remake of a classic game, the rights holder can sue you and has a reasonable chance of winning. Tetris Holding is renowned for this.&#xD;&#xA;&#xD;&#xA;If you just use the name in an unrelated game whose name is not currently being used for any commercial purpose, the rights holder can still sue you to bankruptcy.&#xD;&#xA;&#xD;&#xA;It's slightly safer if you are not selling the game, I think. More likely to avoid notice, and the potential fines might be smaller. But you're only safe if you get an agreement with the rights holder." />
  <row Id="33616" PostHistoryTypeId="2" PostId="14923" RevisionGUID="59ca3afa-a763-418d-8842-908743538968" CreationDate="2011-07-16T20:22:56.383" UserId="7460" Text="i am working on a tile roguelike&#xD;&#xA;i got some of the basics working using this tutorial&#xD;&#xA;http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d&#xD;&#xA;&#xD;&#xA;but i want to be able to create a map programatically instead of using the tiled editor&#xD;&#xA;&#xD;&#xA;just add a NSArray of sprites/tiles to my CCLayer derived class or something, or should i make use of the CCTMXTiledMap class?&#xD;&#xA;&#xD;&#xA;can anyone gimme some hints about how to do this? or know of a tutorial or sample code somewhere?&#xD;&#xA;&#xD;&#xA;thanks a lot" />
  <row Id="33617" PostHistoryTypeId="1" PostId="14923" RevisionGUID="59ca3afa-a763-418d-8842-908743538968" CreationDate="2011-07-16T20:22:56.383" UserId="7460" Text="create a simple tilemap programatically" />
  <row Id="33618" PostHistoryTypeId="3" PostId="14923" RevisionGUID="59ca3afa-a763-418d-8842-908743538968" CreationDate="2011-07-16T20:22:56.383" UserId="7460" Text="&lt;iphone&gt;&lt;tiles&gt;&lt;cocos2d-iphone&gt;&lt;roguelikes&gt;" />
  <row Id="33619" PostHistoryTypeId="2" PostId="14924" RevisionGUID="8403a5d9-2985-4b04-9ce0-4c73f314341f" CreationDate="2011-07-16T21:06:29.047" UserId="2926" Text="I' relatively new to modeling, so this might be a simple question to answer. I'm having trouble trying to cross edges. I've placed a screenshot below of what I'm trying to accomplish (made in SketchUp). It's a box with to edges along the diagonals of each face. Is there a simple way to do this in 3ds Max? Thanks in advance.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/nGswy.png" />
  <row Id="33620" PostHistoryTypeId="1" PostId="14924" RevisionGUID="8403a5d9-2985-4b04-9ce0-4c73f314341f" CreationDate="2011-07-16T21:06:29.047" UserId="2926" Text="3ds Max - How to Cross Edges" />
  <row Id="33621" PostHistoryTypeId="3" PostId="14924" RevisionGUID="8403a5d9-2985-4b04-9ce0-4c73f314341f" CreationDate="2011-07-16T21:06:29.047" UserId="2926" Text="&lt;3dsmax&gt;" />
  <row Id="33622" PostHistoryTypeId="25" PostId="14911" RevisionGUID="10bf5e32-b195-46ee-8b3b-d814b524fe99" CreationDate="2011-07-16T21:31:57.497" Comment="http://twitter.com/#!/StackGameDev/status/92345748124995584" />
  <row Id="33623" PostHistoryTypeId="2" PostId="14925" RevisionGUID="e137de5d-1ae0-4c69-a5c3-24b6f98ce145" CreationDate="2011-07-16T21:42:11.900" UserId="5399" Text="Two ways I can think of, neither of which are particularly clever but will do it:&#xD;&#xA;&#xD;&#xA;1. Apply the 'Subdivide' modifier and just increase/reduce the 'Size' parameter (very roughly) until your polys have been split correctly.&#xD;&#xA;&#xD;&#xA;2. Convert to Editable Poly (or the selected faces will be triangles), select the face(s) and use 'Insert Vertex' to split them.&#xD;&#xA;&#xD;&#xA;These of course work well for creating the box you describe but perhaps you could explain what the end goal of crossing the edges is (e.g. add detail?) as there might be a better solution for a more complex model." />
  <row Id="33624" PostHistoryTypeId="2" PostId="14926" RevisionGUID="8e6d151e-74f7-44b4-a275-b1af771eacfa" CreationDate="2011-07-16T23:25:01.030" UserId="8395" Text="I want to implement a particle system in my game but i have no idea where to start :S&#xD;&#xA;&#xD;&#xA;I've never programmed a particle system, so this is my first time &gt;.&lt;. I only want to display pixels (GL_POINT) with different size in a different place, something like Terraria or Minecraft when you hit a block, without texture of course.&#xD;&#xA;&#xD;&#xA;I've searched in google but all results are very complex or the concepts are not explained for somebody who is starting. In the other hand, these are very outdated or are developed in C without using OOP...&#xD;&#xA;&#xD;&#xA;I'm using Java and OpenGL, so if somebody know where I could start, I'd thank him." />
  <row Id="33625" PostHistoryTypeId="1" PostId="14926" RevisionGUID="8e6d151e-74f7-44b4-a275-b1af771eacfa" CreationDate="2011-07-16T23:25:01.030" UserId="8395" Text="Particle System OpenGL (ortho)" />
  <row Id="33626" PostHistoryTypeId="3" PostId="14926" RevisionGUID="8e6d151e-74f7-44b4-a275-b1af771eacfa" CreationDate="2011-07-16T23:25:01.030" UserId="8395" Text="&lt;opengl&gt;&lt;java&gt;&lt;particles&gt;" />
  <row Id="33627" PostHistoryTypeId="2" PostId="14927" RevisionGUID="cc1387f4-f766-4525-9bfc-5daac7dca8d2" CreationDate="2011-07-16T23:47:52.240" UserId="4191" Text="Lives are a way of tuning the feedback loop that players engage with the game through (reward/punishment for actions taken toward goals).  A crucial part of gameplay is learning; a game design where punishments of lesser degree than termination of the game are available gives more opportunities for players to learn which behaviors earn rewards and which earn punishments, and so promotes engagement.  Of course there are many ways to accomplish that, but since &quot;death&quot; is a common metaphor for game termination, a natural modification of that metaphor becomes &quot;multiple lives&quot;." />
  <row Id="33628" PostHistoryTypeId="2" PostId="14928" RevisionGUID="2e67a1d8-e2ce-41d2-b671-7e0a81e85b86" CreationDate="2011-07-16T23:49:52.097" UserId="7911" Text="I think the key phrase is particle **system** so most of the samples out in the wild are going to be more complex than you would think a simple demonstration should be.  OOP doesn't really enter into the low level part of particle systems and C is very straight forward to convert to other languages so I wouldn't worry about that.&#xD;&#xA;&#xD;&#xA;The trick to particles is that you want to display a LOT and as fast as possible, that colors the kinds of code you'll see since everything is optimized in one way or another.&#xD;&#xA;&#xD;&#xA;In its simplest form a particle system for a quick splash effect would have the following elements:&#xD;&#xA;&#xD;&#xA;0) a manager both to keep track of all your systems and to give global control to all effects&#xD;&#xA;1) array of &quot;points&quot; where each has position, velocity, life time, display size&#xD;&#xA;2) a function to create that array with a starting position and (probably) random velocities and life times&#xD;&#xA;3) a function to run a simulation on that array, this probably takes a delta time since the last simulation call&#xD;&#xA;4) a function to take the positions and display sizes and display then in OpenGL&#xD;&#xA;5) and lastly an overseer to stop that system from playing when all the points are dead&#xD;&#xA;&#xD;&#xA;Organizing the functions can be OOP at the higher levels as long as the inner loops keep to themselves in the quest for speed.  Super lax pseudo code sequence below, leaving out a lot of detail and mixing and matching straight C concepts with a cheesy OOP thrown in but I hope it makes sense.  The class design for this would be an entire other discussion =)&#xD;&#xA;&#xD;&#xA;For your example, you hit a brick at world location (10,20,30).  You then call the manager and ask it to start up a new points particle system at that location.  The manager then asks the PointsClass to create itself at position (10,20,30).  The class allocates and randomizes the life times, etc...  The manager then calls all the active particle systems it controls each frame with a simulation call.  Later that frame it asks the PointsClass to draw itself into a GL context.  Loop until done.&#xD;&#xA;" />
  <row Id="33629" PostHistoryTypeId="25" PostId="14914" RevisionGUID="840475e3-fda0-4cc4-80a1-339bdfeb0ef2" CreationDate="2011-07-17T00:31:56.907" Comment="http://twitter.com/#!/StackGameDev/status/92391046062936066" />
  <row Id="33630" PostHistoryTypeId="2" PostId="14929" RevisionGUID="e4262f6a-b8f5-4ae0-98be-2042c202e136" CreationDate="2011-07-17T01:35:56.007" UserId="8240" Text="Finite lives are a form of resource management for the player.&#xD;&#xA;&#xD;&#xA;If you notice, most games that have a finite count of lives tend to be very binary about being alive or dead. Maybe the player gets a couple of HP, but if you get hit more than 3 times or so, you lose a life. And there will generally be a healthy supply of &quot;insta-death&quot; lurking around, whether it is pits, spikes, etc.&#xD;&#xA;&#xD;&#xA;Because of that, lives function as resources in the same way that healing potions do in RPGs. The more you have, the more likely you are to be able to progress further. You don't have to push as hard, since you have more lives to try again. This is also why RPGs, even historically, almost never used multiple lives. There was no point, since they already had plenty of resource management.&#xD;&#xA;&#xD;&#xA;One of the reasons why finite lives is going out of fashion for games these days is that running out of lives generally isn't fun for most players. While the *tension* created by having low lives is nice, if you ever actually run out, the game becomes a lot less fun. You lose a lot of progress.&#xD;&#xA;&#xD;&#xA;One of the other reasons why finite lives aren't used often is because game developers tend to allow you to save anywhere. Or at least, at reasonably-space designated locations. Because of that, the only progress you can lose is back to the last save point. So, unless save points are significantly different from checkpoints, there's really no purpose to it. And if they are significantly different, players may not like that very much.&#xD;&#xA;&#xD;&#xA;So the only way to make finite lives worthwhile is to punish the player significantly more for running out of lives than for simply losing a life." />
  <row Id="33631" PostHistoryTypeId="2" PostId="14930" RevisionGUID="6706df60-41d1-46b2-9454-d334abe1724a" CreationDate="2011-07-17T01:58:09.490" UserId="1885" Text="Humans are very risk-averse in terms of death.  When a game designer adds the concept of lives to a game where the character in the game might die, they are essentially encouraging the player to take risks they wouldn't otherwise take.&#xD;&#xA;&#xD;&#xA;Further, it helps draw players into the game, where the first time they play they might die with minutes of starting.  Once they start the game, however, they feel the need to continue trying while they still have remaining game time, or lives, left. Ideally they will learn enough during this time period that they will desire to play the game again, even though they may have to start from the beginning again, having lost all their lives." />
  <row Id="33632" PostHistoryTypeId="2" PostId="14931" RevisionGUID="83f63871-7afa-4ceb-8189-285cab7dec5b" CreationDate="2011-07-17T02:57:23.433" UserId="8640" Text="We have just finished developing a web game using flex + flash + python and now we want to make a client app for the iphone/ipad device just like this one: (http://itunes.apple.com/cn/app/id434201999?mt=8)&#xD;&#xA;&#xD;&#xA;Since we have had no such experience I hope someone has done this might give us some hint or suggestions.&#xD;&#xA;&#xD;&#xA;PS:I got some advice from other websites saying that I can do it as follows:&#xD;&#xA;1.Re-write those as script (logic stuff) with objC (I agree with this)&#xD;&#xA;2.Use html5 (which I do not understand quite well, does this mean that I need to re-write those MXML files with html5???)&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="33633" PostHistoryTypeId="1" PostId="14931" RevisionGUID="83f63871-7afa-4ceb-8189-285cab7dec5b" CreationDate="2011-07-17T02:57:23.433" UserId="8640" Text="A solution for developing a web game client for iphone and ipad…" />
  <row Id="33634" PostHistoryTypeId="3" PostId="14931" RevisionGUID="83f63871-7afa-4ceb-8189-285cab7dec5b" CreationDate="2011-07-17T02:57:23.433" UserId="8640" Text="&lt;web&gt;" />
  <row Id="33635" PostHistoryTypeId="25" PostId="14926" RevisionGUID="49e61716-1c8f-45b4-b163-e818acb4ab1d" CreationDate="2011-07-17T03:31:58.797" Comment="http://twitter.com/#!/StackGameDev/status/92436343195578369" />
  <row Id="33636" PostHistoryTypeId="5" PostId="14931" RevisionGUID="1d194c2c-63f2-4f29-8a37-94b0ddf2bfb3" CreationDate="2011-07-17T04:48:30.657" UserId="6877" Comment="link fixed" Text="We have just finished developing a web game using flex + flash + python and now we want to make a client app for the iphone/ipad device [just like this one](http://itunes.apple.com/cn/app/id434201999?mt=8)&#xD;&#xA;&#xD;&#xA;Since we have had no such experience I hope someone has done this might give us some hint or suggestions.&#xD;&#xA;&#xD;&#xA;PS:I got some advice from other websites saying that I can do it as follows:&#xD;&#xA;1.Re-write those as script (logic stuff) with objC (I agree with this)&#xD;&#xA;2.Use html5 (which I do not understand quite well, does this mean that I need to re-write those MXML files with html5?)&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="33637" PostHistoryTypeId="24" PostId="14931" RevisionGUID="1d194c2c-63f2-4f29-8a37-94b0ddf2bfb3" CreationDate="2011-07-17T04:48:30.657" Comment="Proposed by 6877 approved by 51 edit id of 562" />
  <row Id="33638" PostHistoryTypeId="2" PostId="14932" RevisionGUID="988f8199-c776-4410-b630-676f7c403245" CreationDate="2011-07-17T05:00:32.227" UserId="159" Text="In a prototype I am doing, there is a minigame similar to bejeweled. Using a grid that is a 2d array (`int[,]`) how can I go about know when the user formed a match? I only care about horizontally and vertically. &#xD;&#xA;&#xD;&#xA;Off the top of my head I was thinking I would just look each direction. Something like:&#xD;&#xA;&#xD;&#xA;    int item = grid[x,y];&#xD;&#xA;    if(grid[x-1,y]==item)&#xD;&#xA;    {&#xD;&#xA;        int step=x;&#xD;&#xA;        int matches =2;&#xD;&#xA;        while(grid[step-1,y]==item)&#xD;&#xA;        {&#xD;&#xA;            step++;&#xD;&#xA;            matches++&#xD;&#xA;        }&#xD;&#xA;        if(matches&gt;2)&#xD;&#xA;            //remove all matching items&#xD;&#xA;    }&#xD;&#xA;    else if(grid[x+1,y]==item&#xD;&#xA;        //....&#xD;&#xA;    else if(grid[x,y-1==item)&#xD;&#xA;        //...&#xD;&#xA;    else if(grid[x,y+1]==item)&#xD;&#xA;        //...&#xD;&#xA;&#xD;&#xA;It seems like there should be a better way. Is there?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*note:I'm not sure what to tag this, so feel free to edit or suggest*" />
  <row Id="33639" PostHistoryTypeId="1" PostId="14932" RevisionGUID="988f8199-c776-4410-b630-676f7c403245" CreationDate="2011-07-17T05:00:32.227" UserId="159" Text="Logic behind a bejeweled-like game" />
  <row Id="33640" PostHistoryTypeId="3" PostId="14932" RevisionGUID="988f8199-c776-4410-b630-676f7c403245" CreationDate="2011-07-17T05:00:32.227" UserId="159" Text="&lt;c#&gt;" />
  <row Id="33641" PostHistoryTypeId="25" PostId="14892" RevisionGUID="23e559b1-71d6-4062-9b1d-2745e790467f" CreationDate="2011-07-17T06:31:57.623" Comment="http://twitter.com/#!/StackGameDev/status/92481645696909312" />
  <row Id="33642" PostHistoryTypeId="5" PostId="14905" RevisionGUID="28ce0901-9f0b-447a-9ef5-6f28b42b64af" CreationDate="2011-07-17T08:46:07.713" UserId="8050" Comment="added 723 characters in body" Text="If you need just to take into account a displacement, you simply have to know where your origin is in standard coordinate system (the one the listener returns).&#xD;&#xA;&#xD;&#xA;Say that your (0,0) is at (150,322), this means that when you get P = (x,y) you can get P' = (x-150,y-322) to get the point in your coordinate system. &#xD;&#xA;&#xD;&#xA;To make it clean try to transform your origin P = (x=150,y=322) =&gt; P' = (150-150,322-322) = (0,0); lets take a point that is 100 pixel on the right to your origin: P = (250,322) =&gt; P' = (250-150,322-322) = (100,0), that is what you need.&#xD;&#xA;&#xD;&#xA;If your coordinate system is not simply a displacement of the one your system provides (rotation, shear, scale involved), a change of homogeneus coordinate system is required.&#xD;&#xA;&#xD;&#xA;  **EDIT:**&#xD;&#xA;&#xD;&#xA;As pointed out, the requirement is that the coordinate system has to produce the same range coordinate even if the view area resizes.&#xD;&#xA;&#xD;&#xA;I assume that the aspect-ratio of the view and the scaled coordinate system is not an issue.&#xD;&#xA;&#xD;&#xA;Let say that the dimensions of your view area are WxH, your system wil give you value for x and y so x :[0,W] and y :[0,H], we want that the transformed value to be x :[-w,w] and y :[-h,h]. Let take only x in account:&#xD;&#xA;&#xD;&#xA;x' = x/W =&gt; x : [0,1]; &#xD;&#xA;&#xD;&#xA;x' = x/W &amp;middot; (2w) =&gt; x : [0,2w]; &#xD;&#xA;&#xD;&#xA;x' = ( x/W &amp;middot; (2w) ) - w =&gt; x' : [-w,w] and hence&#xD;&#xA;&#xD;&#xA;y' = (y/H &amp;middot; (2h) ) - h =&gt; y' : [-h,h].&#xD;&#xA;&#xD;&#xA;You have to know - or ask the view for - W and H and set w = 319 and h = 239.&#xD;&#xA;" />
  <row Id="33643" PostHistoryTypeId="25" PostId="14932" RevisionGUID="50ce5647-ded1-4834-8554-96768987df9c" CreationDate="2011-07-17T09:31:57.703" Comment="http://twitter.com/#!/StackGameDev/status/92526945094483968" />
  <row Id="33644" PostHistoryTypeId="2" PostId="14933" RevisionGUID="ee0479d0-6d30-469e-bc4e-bc4872c34cab" CreationDate="2011-07-17T09:33:19.010" UserId="8646" Text="Loop through each item in the same axis (x or y), if they are the same as the previous item them increment matches. When the next item becomes different, check if matches is or greater than 3, call a function that removes matching items, and continue. &#xD;&#xA;&#xD;&#xA;AS3 code:&#xD;&#xA;&#xD;&#xA;    var grid:Array = [[2,3,2,2,2,4],&#xD;&#xA;                      [ .. ]]; //multidimensional array&#xD;&#xA;    var matches:uint = 0;&#xD;&#xA;    var gemType:uint;&#xD;&#xA;    for(col = 0; col &lt; grid.length; col++){&#xD;&#xA;        gemType = 0; //Reserve 0 for the empty state. If we make it a normal gem type, then only 2 are needed to match for the start.&#xD;&#xA;        for(i = 0; i &lt; grid[0].length; i++){&#xD;&#xA;            if(grid[col][i] == gemType){&#xD;&#xA;                matches++;&#xD;&#xA;            } else if(grid[col][i] != gemType || i == grid[0].length - 1){ //subtract 1 because arrays start at 0&#xD;&#xA;                if(matches &gt;= 3){&#xD;&#xA;                    removeMatches(blah);&#xD;&#xA;                }&#xD;&#xA;                gemType = grid[col][i];&#xD;&#xA;                matches = 1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is only for the x axis, for y, grid[col][i] would become grid[i][row], etc. I'm sure you can figure that out :)" />
  <row Id="33645" PostHistoryTypeId="2" PostId="14934" RevisionGUID="b1c5e895-6f93-48ea-bc57-54b0625aeab9" CreationDate="2011-07-17T12:12:12.347" UserId="1047" Text="In short. If you are giving player a challenge to get from Point (or objective) A to B and its somewhat long. You may not want to force the player to start over if he makes a mistake but you may want to limit the amount of mistakes he can make by using lives which spawn you at last checkpoint.&#xD;&#xA;&#xD;&#xA;In a game like zelda (ocarina of time) if you die you start at the beginning of the level which isnt too much of a big deal. However if you accidentally fall in a hole you wouldn't want to start over again so instead of 'lives' (which you dont get) you get deducted hearts/health points instead which is a fair alternative.&#xD;&#xA;" />
  <row Id="33646" PostHistoryTypeId="17" PostId="14935" RevisionGUID="1346fd7c-c36a-417e-a96c-2d22b52fe2f2" CreationDate="2011-07-17T12:14:23.883" UserId="-1" Comment="from http://stackoverflow.com/questions/6721994/how-can-i-incorporate-physics-into-a-procedurally-generated-world-from-a-geometry" Text="" />
  <row Id="33647" PostHistoryTypeId="2" PostId="14935" RevisionGUID="cfce29e0-86ba-4a7d-864f-7338b8eac112" CreationDate="2011-07-17T04:55:56.877" UserDisplayName="JNZ" Text="Essentially I want to remove the need for generating coherent noise from the CPU to the GPU. From there, I also want to generate the terrain for a three dimensional world using this noise as densities in voxel points. After this, I want to take those densities and polygonize (generate vertices) them representing the world's terrain.&#xD;&#xA;&#xD;&#xA;This is fine and all. But, I also want to dynamically deform the world in real-time. Once I get to this point, I have a problem trying to get the vertices back to the CPU to do things like collision detection and all of the game computations that I want to involve on the CPU and not the GPU.&#xD;&#xA;&#xD;&#xA;So the question is: how can I get a subset of the vertices back to the CPU for dealing with collisions among other things?&#xD;&#xA;&#xD;&#xA;And one more question: is there an easy way to take a set of vertices and generate indices from them on the GPU?&#xD;&#xA;&#xD;&#xA;I'm confused as well as to what kinds of shaders I should be using for these different things. I hear of people using a pixel shader for gathering densities and then using a geometry shader for dealing with the terrain generation from the vertices and then somehow incorporating a vertex shader to do the dynamic deformations.&#xD;&#xA;&#xD;&#xA;I'm using C# 4.0, .NET 4.0, and XNA Game Studio 4.0." />
  <row Id="33648" PostHistoryTypeId="1" PostId="14935" RevisionGUID="cfce29e0-86ba-4a7d-864f-7338b8eac112" CreationDate="2011-07-17T04:55:56.877" UserDisplayName="JNZ" Text="How can I incorporate physics into a procedurally generated world from a geometry shader?" />
  <row Id="33649" PostHistoryTypeId="3" PostId="14935" RevisionGUID="cfce29e0-86ba-4a7d-864f-7338b8eac112" CreationDate="2011-07-17T04:55:56.877" UserDisplayName="JNZ" Text="&lt;c#&gt;&lt;xna&gt;&lt;shaders&gt;" />
  <row Id="33650" PostHistoryTypeId="2" PostId="14936" RevisionGUID="e2a2fb1c-3217-48d2-9149-2c0c7922ad98" CreationDate="2011-07-17T12:22:54.813" UserId="7199" Text="I'm making a top-down RPG for iPhone. I'm using tilemaps (CCTMXTileMap) and the cocos2d-iphone engine.&#xD;&#xA;&#xD;&#xA; I've made a class that can handle loading maps and NPCs onto the screen, a class that handles input, and, a class that is supposed to display dialog. The dialog class takes a single string, or an array, and displays it onscreen inside a neat dialog box, hiding the controls until the user taps on the screen, when it cycles to the next message, or if it's the last/only message, hides the dialog. &#xD;&#xA;&#xD;&#xA;My NPCs are currently stored in Core Data. Their strings will need to be updated based on quest progress. Also, there are other bits of dialog, like signposts and other messages.&#xD;&#xA;&#xD;&#xA;So, where do I put my game's textual content? I don't think Core Data is the right place, because of three reasons:&#xD;&#xA;&#xD;&#xA; 1. If my strings are stored in Core Data, I will probably have a harder time translating them.&#xD;&#xA;&#xD;&#xA; 2. If my strings are in Core Data, that only leaves me with strings for NPCs (which would be attached to the NPCs in Core Data). Where does that leave everything else?&#xD;&#xA;&#xD;&#xA; 3. If I leave my strings in Core Data, it's a bit heavy on the loading operations, no?&#xD;&#xA;&#xD;&#xA;Given all of this background information, where do I put my strings and dialog in my game?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**tl;dr**&#xD;&#xA;&#xD;&#xA;What's an efficient way to store strings for an iOS game so that they can be easily accessed, translated and referenced at various parts of the game?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33651" PostHistoryTypeId="1" PostId="14936" RevisionGUID="e2a2fb1c-3217-48d2-9149-2c0c7922ad98" CreationDate="2011-07-17T12:22:54.813" UserId="7199" Text="Where do I store strings? What's an efficient way of loading them?" />
  <row Id="33652" PostHistoryTypeId="3" PostId="14936" RevisionGUID="e2a2fb1c-3217-48d2-9149-2c0c7922ad98" CreationDate="2011-07-17T12:22:54.813" UserId="7199" Text="&lt;game-design&gt;&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;data-structure&gt;" />
  <row Id="33653" PostHistoryTypeId="25" PostId="14936" RevisionGUID="1d3a6449-59f6-4e76-9c8d-b33c7d8a64b1" CreationDate="2011-07-17T12:31:58.080" Comment="http://twitter.com/#!/StackGameDev/status/92572244546560000" />
  <row Id="33654" PostHistoryTypeId="2" PostId="14937" RevisionGUID="300eb0c2-d83e-417f-a19f-58733bc26797" CreationDate="2011-07-17T13:09:25.497" UserId="7359" Text="Is posible to use this technique with deferred lighting?" />
  <row Id="33655" PostHistoryTypeId="1" PostId="14937" RevisionGUID="300eb0c2-d83e-417f-a19f-58733bc26797" CreationDate="2011-07-17T13:09:25.497" UserId="7359" Text="Deferred lighting and projective texturing?" />
  <row Id="33656" PostHistoryTypeId="3" PostId="14937" RevisionGUID="300eb0c2-d83e-417f-a19f-58733bc26797" CreationDate="2011-07-17T13:09:25.497" UserId="7359" Text="&lt;xna&gt;&lt;c#&gt;&lt;deferred-rendering&gt;" />
  <row Id="33657" PostHistoryTypeId="2" PostId="14938" RevisionGUID="4e6abf38-ff5f-4774-b39d-eb46aaabde02" CreationDate="2011-07-17T13:23:00.393" UserId="7328" Text="I would create an external file or files for all strings. then load it once when the program begins into some global object. in run time every object that needs to display some string will have to ask that global object for the proper string. you can use keys for every string or you can use an array. if you don't like the global object idea, you can load every string whenever you need directly from file, but that may cause low fps when loading dialogues. using this approach you can easily change the language whenever you want, just you have to start reading from a different file. " />
  <row Id="33658" PostHistoryTypeId="2" PostId="14939" RevisionGUID="70845a77-782b-419c-8627-1e8ea18da440" CreationDate="2011-07-17T13:46:35.743" UserId="8648" Text="Yes, you just have to perform regular projective texturing in the GBuffer pass and add to the the albedo.&#xD;&#xA;&#xD;&#xA;If wnat you want to do is shadow mapping, do it in the lighting pass when you reconstruct the pixel postion" />
  <row Id="33659" PostHistoryTypeId="2" PostId="14940" RevisionGUID="7bfb198e-7e0d-42e8-8984-4021d1c66697" CreationDate="2011-07-17T14:12:09.460" UserId="998" Text="Its an additional __difficulty control__.  In addition, it __forces replay__ of the first few levels, which both builds skills and essentially gives the _game_ more play.  &#xD;&#xA;&#xD;&#xA;Consider a game that was easily beatable in one 3 hour sitting, without &quot;dying&quot; or having to start again.  Probably you would then shelve the game and never play it again.&#xD;&#xA;&#xD;&#xA;Or consider also a game that is incredibly difficult and only lets you die once ( [vid: Double Dragon III](http://www.youtube.com/watch?v=kMg6_IXCjo4) ). You would likely shelve the game and never play it again.&#xD;&#xA;&#xD;&#xA;![never got past level 1][1]&#xD;&#xA;&#xD;&#xA;Games that mix the right amount of challenge with the right number of lives produce a lot of fun replay.  One of my favorite games was __Battletoads__. Replaying the first few levels in 2-player mode _is still_ a lot of fun.&#xD;&#xA;&#xD;&#xA;![battletoads fun replay][2]&#xD;&#xA;&#xD;&#xA;Basically the trade-off between life-meter and now-you-have-to-start-again.  Its nice to not have to start again from the _very_ beginning, which would be too challenging/discouraging and would _play-out the first few levels faster_.&#xD;&#xA;&#xD;&#xA;Besides life you also have to consider _continue_/_password_. Password was an early alternative to savegame, but again, all of these are just means by which to __control the difficulty of the game__ and make it winnable, without making the game too dry to keep starting over from world 1-1.&#xD;&#xA;&#xD;&#xA;Its interesting to see how different games handled this though.  Take TMNT I, where each _turtle_ only had one life (&quot;getting caught&quot;), but you had 4 turtles, so effectively 4 lives.  (They could be rescued as well, but that was really rare/difficult).&#xD;&#xA;&#xD;&#xA;![tmnt 1][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/EoaNn.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/ZoHa0.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/y9m8F.png" />
  <row Id="33660" PostHistoryTypeId="2" PostId="14941" RevisionGUID="51d59f83-70e7-4752-a89e-8f9833d959db" CreationDate="2011-07-17T14:31:12.537" UserId="3887" Text="I'm a indie/hobbyist game developer.  How do I check that I'm not infringing any copyrights or trademarks when I release my game?&#xD;&#xA;&#xD;&#xA;I'm not making megabucks so it's not financially feasible to get professional legal help for each game.  &#xD;&#xA;&#xD;&#xA;I asked recently [if I can reuse the name of an old arcade game][1] (Crazy Balloon), but this got me thinking about future games where I might not even be aware of something similar that existed before.&#xD;&#xA;&#xD;&#xA;So, are there any tools or resources that you can recommend to check myself (due diligence I think it's called).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14908/can-i-reuse-the-name-of-an-old-arcade-game" />
  <row Id="33661" PostHistoryTypeId="1" PostId="14941" RevisionGUID="51d59f83-70e7-4752-a89e-8f9833d959db" CreationDate="2011-07-17T14:31:12.537" UserId="3887" Text="What resources can I use to determine if the name of my game violates any copyrights or trademarks?" />
  <row Id="33662" PostHistoryTypeId="3" PostId="14941" RevisionGUID="51d59f83-70e7-4752-a89e-8f9833d959db" CreationDate="2011-07-17T14:31:12.537" UserId="3887" Text="&lt;legal&gt;&lt;copyright&gt;" />
  <row Id="33663" PostHistoryTypeId="6" PostId="14650" RevisionGUID="c872a047-d331-4686-a0c6-e5418d29819e" CreationDate="2011-07-17T15:17:12.080" UserId="6968" Comment="edited tags" Text="&lt;flash&gt;&lt;actionscript&gt;" />
  <row Id="33664" PostHistoryTypeId="25" PostId="14937" RevisionGUID="e256e823-2b21-4810-9e25-621a94205b4c" CreationDate="2011-07-17T15:31:57.367" Comment="http://twitter.com/#!/StackGameDev/status/92617543709241344" />
  <row Id="33665" PostHistoryTypeId="6" PostId="14932" RevisionGUID="f1cee2dc-cfa7-418c-bac8-5397c9484aa3" CreationDate="2011-07-17T15:43:22.937" UserId="6877" Comment="edited tags" Text="&lt;c++&gt;&lt;game-mechanics&gt;" />
  <row Id="33666" PostHistoryTypeId="2" PostId="14942" RevisionGUID="3de573e9-b369-48e4-b1a0-cd2f307dc50e" CreationDate="2011-07-17T16:01:54.110" UserId="6877" Text="I don't think there is any quick way to check license infringing. But, there are way to avoid it.&#xD;&#xA;&#xD;&#xA; * first just don't google around and download stuff from where ever you hit. If you like any content, then look for license agreement around the download page. If you don't find any then look for contact information and ask them about it.(only if you know that the hosting site owner, is the owner of that asset)&#xD;&#xA;&#xD;&#xA; * secondly, never ever download from file sharing web site or torrents. Like rapidshare, megaupload, demonoid etc etc. They just host the file. There is no way to know who does it belong to or where did it came from.&#xD;&#xA;&#xD;&#xA; * it always ,a wise decision to ask a lawyer, but as you said, it not possible for every indie developers out there. But, sometimes if you get confused(very frequently) then you should go for it. Save you ass before its busted.&#xD;&#xA;&#xD;&#xA; * lastly, *don't ever assume its ok to use it*. License infringing can end up in jail time and/or fine(depending of the country you are in).&#xD;&#xA;&#xD;&#xA; * sometimes, some decent attitude can lead to indecent situation. Like if you name your game &quot;X Edge&quot;, then [Edge Game](http://en.wikipedia.org/wiki/Edge_Games) can sue you. Like they did to EA for the game [Mirrors Edge](http://en.wikipedia.org/wiki/Mirror's_Edge). Edge game lost the case.But Edge games don't allow anyone to use the word *Edge* to any games." />
  <row Id="33667" PostHistoryTypeId="5" PostId="14942" RevisionGUID="0711c055-93ef-4c64-8473-b834df9c8c01" CreationDate="2011-07-17T16:07:25.037" UserId="6877" Comment="added 242 characters in body" Text="I don't think there is any quick way to check license infringing. But, there are way to avoid it.&#xD;&#xA;&#xD;&#xA; * first just don't google around and download stuff from where ever you hit. If you like any content, then look for license agreement around the download page. If you don't find any then look for contact information and ask them about it.(only if you know that the hosting site owner, is the owner of that asset)&#xD;&#xA;&#xD;&#xA; * secondly, never ever download from file sharing web site or torrents. Like rapidshare, megaupload, demonoid etc etc. They just host the file. There is no way to know who does it belong to or where did it came from.&#xD;&#xA;&#xD;&#xA; * it always ,a wise decision to ask a lawyer, but as you said, it not possible for every indie developers out there. But, sometimes if you get confused(very frequently) then you should go for it. Save you ass before its busted.&#xD;&#xA;&#xD;&#xA; * lastly, *don't ever assume its ok to use it*. License infringing can end up in jail time and/or fine(depending of the country you are in).&#xD;&#xA;&#xD;&#xA; * sometimes, some decent attitude can lead to indecent situation. Like if you name your game &quot;X Edge&quot;, then [Edge Game](http://en.wikipedia.org/wiki/Edge_Games) can sue you. Like they did to EA for the game [Mirrors Edge](http://en.wikipedia.org/wiki/Mirror's_Edge). Edge game lost the case.But Edge games don't allow anyone to use the word *Edge* to any games.&#xD;&#xA;&#xD;&#xA;BUT, this goes for **game resources**, FOR **GamePlay patent** you should read [this](http://gamedev.stackexchange.com/questions/14809/gameplay-patent). I know may sound weird at first, but Mitch Lindgren gave us a nice answer over there." />
  <row Id="33668" PostHistoryTypeId="2" PostId="14943" RevisionGUID="1e075323-33e7-476c-acde-55e85abdc660" CreationDate="2011-07-17T16:12:04.267" UserId="744" Text="In the United States, &lt;a href=&quot;http://tess2.uspto.gov/bin/gate.exe?f=tess&amp;state=4005:26lbur.1.1&quot;&gt;the USPTO's TESS service&lt;/a&gt; lets you search trademarks.&#xD;&#xA;&#xD;&#xA;Not violating copyright is trivial - do not copy a work unless you have explicit permission to.&#xD;&#xA;&#xD;&#xA;In the United States, &lt;a href=&quot;http://en.wikipedia.org/wiki/Due_diligence&quot;&gt;due diligence is not a practice that applies to individual creators&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Treble_damages&quot;&gt;performing due diligence improperly (i.e. without a lawyer or licensed authority) rather than not doing it at all puts you at greater financial risk&lt;/a&gt;." />
  <row Id="33669" PostHistoryTypeId="16" PostId="14943" RevisionGUID="1e075323-33e7-476c-acde-55e85abdc660" CreationDate="2011-07-17T16:14:17.310" UserId="744" />
  <row Id="33670" PostHistoryTypeId="2" PostId="14944" RevisionGUID="ec0fcd28-fd66-492a-8cbd-bb65e2667f1f" CreationDate="2011-07-17T16:30:53.970" UserId="744" Text="Unless you have some particular requirements for portability, formatting, or speed, &lt;a href=&quot;http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html&quot;&gt;Apple's standard string resources&lt;/a&gt; should be fine." />
  <row Id="33671" PostHistoryTypeId="2" PostId="14945" RevisionGUID="629beef8-0b1d-4bf4-97ab-5dda792cc937" CreationDate="2011-07-17T16:31:38.560" UserId="8228" Text="Is anyone aware of any code to procedurally generate star fields?&#xD;&#xA;Ideally I'd like it to be physics based so I can have realistic planets and moons.&#xD;&#xA;Best would be in C++, open source, and workable with Ogre3d.&#xD;&#xA;I'm not afraid of coding something from a university paper if there's nothing available.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33672" PostHistoryTypeId="1" PostId="14945" RevisionGUID="629beef8-0b1d-4bf4-97ab-5dda792cc937" CreationDate="2011-07-17T16:31:38.560" UserId="8228" Text="procedural star field generator" />
  <row Id="33673" PostHistoryTypeId="3" PostId="14945" RevisionGUID="629beef8-0b1d-4bf4-97ab-5dda792cc937" CreationDate="2011-07-17T16:31:38.560" UserId="8228" Text="&lt;ogre&gt;" />
  <row Id="33674" PostHistoryTypeId="6" PostId="14932" RevisionGUID="3635e4aa-f431-429a-a431-247933daf3ff" CreationDate="2011-07-17T16:57:51.907" UserId="165" Comment="edited tags" Text="&lt;algorithm&gt;&lt;game-mechanics&gt;" />
  <row Id="33675" PostHistoryTypeId="2" PostId="14946" RevisionGUID="f561eb52-f773-42d2-ad76-ec51b59b978e" CreationDate="2011-07-17T18:10:24.477" UserId="5021" Text="Here is how I would do it, this method takes approximately 1 minute when you know the steps by memory.&#xD;&#xA;&#xD;&#xA; 1. Create a box using keyboard entry.&#xD;&#xA;    &#xD;&#xA; 2.  Set the X,Y,Z all to 0.&#xD;&#xA;    &#xD;&#xA; 3.  Set the width, length, height all to 2.&#xD;&#xA;    &#xD;&#xA; 4.  Set the length, width, height segments all to 1.&#xD;&#xA;    &#xD;&#xA; 5.  Turn on the move snap toggle. (The icon in the top bar with the&#xD;&#xA;    number &quot;3&quot; and a magnet on it.)&#xD;&#xA;    &#xD;&#xA; 6.  Now convert the box to editable poly and go to polygon selection&#xD;&#xA;    mode.&#xD;&#xA;    &#xD;&#xA; 7.  Click &quot;Insert vertex&quot; in the modify pane with polygon selection mode&#xD;&#xA;    set.&#xD;&#xA;    &#xD;&#xA; 8.  Now using the top/left/front orthographic views, click to add a&#xD;&#xA;    vertex at the center of each cube face (which is easy because you&#xD;&#xA;    have snapping turned on).&#xD;&#xA;&#xD;&#xA;The desired edges are automatically added when you add these vertices." />
  <row Id="33676" PostHistoryTypeId="25" PostId="14945" RevisionGUID="47a94086-930d-4a42-8bb0-cc3ebb343863" CreationDate="2011-07-17T18:31:58.607" Comment="http://twitter.com/#!/StackGameDev/status/92662844465758208" />
  <row Id="33677" PostHistoryTypeId="2" PostId="14947" RevisionGUID="befb35b8-e07f-43af-82e0-987d6d9dfa87" CreationDate="2011-07-17T19:00:20.273" UserId="2513" Text="Suppose I have a world defined in typical OpenGL coords.. then the up vector defined for this space is (0,1,0).&#xD;&#xA;&#xD;&#xA;Now, if I load a model that is defined with (0,0,1) as its up vector, what are the matrix operation(s) that I need to carry out here to arrive at the 4x4 transformation matrix?&#xD;&#xA;&#xD;&#xA;Many thanks." />
  <row Id="33678" PostHistoryTypeId="1" PostId="14947" RevisionGUID="befb35b8-e07f-43af-82e0-987d6d9dfa87" CreationDate="2011-07-17T19:00:20.273" UserId="2513" Text="Mesh to world vector translation." />
  <row Id="33679" PostHistoryTypeId="3" PostId="14947" RevisionGUID="befb35b8-e07f-43af-82e0-987d6d9dfa87" CreationDate="2011-07-17T19:00:20.273" UserId="2513" Text="&lt;3d&gt;&lt;matrix&gt;&lt;vector&gt;" />
  <row Id="33680" PostHistoryTypeId="2" PostId="14948" RevisionGUID="938aefe8-a304-4386-98cb-7c5eb51ff649" CreationDate="2011-07-17T19:21:42.833" UserId="8656" Text="You can use the [flood fill][1] algorithm. &#xD;&#xA;It's really useable to this type of problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Flood_fill" />
  <row Id="33684" PostHistoryTypeId="2" PostId="14950" RevisionGUID="30c22170-3dd7-4a9d-9019-99413267a5fa" CreationDate="2011-07-17T19:37:28.220" UserId="7191" Text="I believe that producing a star field (long range) and planets and moons (&quot;short range&quot;) should be two different layers. As for the star field, I've found this to be useful for [my game][1]: [http://alexcpeterson.com/spacescape][2]. That can take care of your long range, static star field. It's written in C++ and open source.&#xD;&#xA;&#xD;&#xA;As for the &quot;short range&quot; stuff. I've found some sources for solar system simulators, but from my shallow glance, they don't look very generic, if you're wanting to create a different solar system than our own. I put the links at the end.&#xD;&#xA;&#xD;&#xA; In reality this shouldn't be too difficult of a task to create a generic system for planets. Study up on your Kepler and you can get some good estimations of planet positions. [http://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion][3]. Probably just stick with simple non-eccentric orbits to start :)&#xD;&#xA;&#xD;&#xA;Here's some links for solar system simulators I found.&#xD;&#xA;&#xD;&#xA;[http://astro.berkeley.edu/~dperley/programs/ssms.html][4]&#xD;&#xA;&#xD;&#xA;[http://code.google.com/p/solar-system-cpp/][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ageofgoblins.com&#xD;&#xA;  [2]: http://alexcpeterson.com/spacescape&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion&#xD;&#xA;  [4]: http://astro.berkeley.edu/~dperley/programs/ssms.html&#xD;&#xA;  [5]: http://code.google.com/p/solar-system-cpp/" />
  <row Id="33685" PostHistoryTypeId="2" PostId="14951" RevisionGUID="44a0cf7a-53f9-4817-b2c1-6c63f0879d0b" CreationDate="2011-07-17T19:47:17.820" UserId="98" Text="I have a project to be accomplished in a distant future about a soccer game.  &#xD;&#xA;I´ve read that you can´t feature the actual national teams uniforms without getting permission from FIFA.  &#xD;&#xA;Is this only for special designs or for jerseys which are a single colour (most of them) too?  &#xD;&#xA;Can you copyright a color? From what I know, most copyright laws don´t allow for a single colour or color combinations to be registered, but maybe in the context of a specific sport and specific teams it is allowed.  &#xD;&#xA;" />
  <row Id="33686" PostHistoryTypeId="1" PostId="14951" RevisionGUID="44a0cf7a-53f9-4817-b2c1-6c63f0879d0b" CreationDate="2011-07-17T19:47:17.820" UserId="98" Text="Soccer national teams uniforms and copyright when developing a soccer game" />
  <row Id="33687" PostHistoryTypeId="3" PostId="14951" RevisionGUID="44a0cf7a-53f9-4817-b2c1-6c63f0879d0b" CreationDate="2011-07-17T19:47:17.820" UserId="98" Text="&lt;game-design&gt;" />
  <row Id="33688" PostHistoryTypeId="6" PostId="14951" RevisionGUID="421e5d32-0a88-4365-8876-0c4eeff0ed46" CreationDate="2011-07-17T20:03:28.773" UserId="14" Comment="edited tags" Text="&lt;game-design&gt;&lt;legal&gt;" />
  <row Id="33689" PostHistoryTypeId="2" PostId="14952" RevisionGUID="79e4afe6-43e5-4723-8919-b7312c3041f1" CreationDate="2011-07-17T20:08:31.710" UserId="7482" Text="How can I make an movieclip move in a circular path with GTween? it's straightforward to have something move with various easing effects in a line or a curve, but I would need a complete circular path." />
  <row Id="33690" PostHistoryTypeId="1" PostId="14952" RevisionGUID="79e4afe6-43e5-4723-8919-b7312c3041f1" CreationDate="2011-07-17T20:08:31.710" UserId="7482" Text="How can I make an movieclip move in a circular path with GTween?" />
  <row Id="33691" PostHistoryTypeId="3" PostId="14952" RevisionGUID="79e4afe6-43e5-4723-8919-b7312c3041f1" CreationDate="2011-07-17T20:08:31.710" UserId="7482" Text="&lt;actionscript-3&gt;" />
  <row Id="33692" PostHistoryTypeId="2" PostId="14953" RevisionGUID="0b40afcf-8683-4a9d-af95-f60430a7c738" CreationDate="2011-07-17T20:38:49.353" UserId="8657" Text="Consider making an ink drawing, with no shading and all lines having equal weight - such as you see in a strip comic like Dilbert. This represents an active 3 dimensional world, but objects do not have textures, yet you don't see tessellated triangles either.&#xD;&#xA;&#xD;&#xA;For the sake of an example consider drawing the surface of the moon. The lines you might draw would be along the top edge of hills, down to where they meet the general level of the surface. Behind those you would do the same for larger hills, into the distance, and behind that what was visible of the horizon. For craters, you might draw a near circle for the outer edge, and partly masked, a circle for the lower edge. Boulders would have a line around the edge, and along major visible edges. The astronauts would have a line along their outer edge, and along major features of their space suit.&#xD;&#xA;&#xD;&#xA;I'm an experienced programmer but new to 3D programming. I can't offhand think of a game that looks like this -- has it been done? And how would one do it? Two problems come to mind -- finding the significant edges, and drawing it. Would it need an &quot;engine&quot; coded from matrices up, based on lines, rather than a regular 3D engine?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33693" PostHistoryTypeId="1" PostId="14953" RevisionGUID="0b40afcf-8683-4a9d-af95-f60430a7c738" CreationDate="2011-07-17T20:38:49.353" UserId="8657" Text="How to draw a 3D world with lines, more like a sketch drawing or cartoon" />
  <row Id="33694" PostHistoryTypeId="3" PostId="14953" RevisionGUID="0b40afcf-8683-4a9d-af95-f60430a7c738" CreationDate="2011-07-17T20:38:49.353" UserId="8657" Text="&lt;3d&gt;" />
  <row Id="33695" PostHistoryTypeId="5" PostId="14947" RevisionGUID="713ae288-f8dc-443a-87a1-d7d4673d56f4" CreationDate="2011-07-17T20:50:17.463" UserId="2513" Comment="questions end with question marks, dont they!" Text="Suppose I have a world defined in typical OpenGL coords.. then the up vector defined for this space is (0,1,0).&#xD;&#xA;&#xD;&#xA;Now, if I load a model that is defined with (0,0,1) as its up vector, what are the matrix operation(s) that I need to carry out here to arrive at the 4x4 transformation matrix for the model?&#xD;&#xA;&#xD;&#xA;Many thanks." />
  <row Id="33696" PostHistoryTypeId="2" PostId="14954" RevisionGUID="99b060b6-0923-4937-b718-24414a7305db" CreationDate="2011-07-17T21:10:03.163" UserId="6588" Text="What you're talking about is [non-photorealistic rendering][1] (aka NPR). In a realtime 3D game that's done using fragment/pixel shaders.&#xD;&#xA;&#xD;&#xA;Scroll through here to see a few examples: http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Non-photorealistic_rendering" />
  <row Id="33697" PostHistoryTypeId="2" PostId="14955" RevisionGUID="0dbfc2bf-04e3-4cac-be77-fd9b143c4608" CreationDate="2011-07-17T21:17:09.640" UserId="5401" Text="Since XNA doesn't support geometry shaders, I'll answer it as if you were using DX 10.&#xD;&#xA;You essentially have three options.&#xD;&#xA;&#xD;&#xA;**Geometry shaders**&#xD;&#xA;Geometry shaders can actually modify and add vertices to a vertex buffer. You could read this back into the CPU. I haven't looked into it, but it's definitely possible.&#xD;&#xA;&#xD;&#xA;**Just use the CPU**&#xD;&#xA;Secondly, why don't you just calculate it on the CPU? The fact that it runs on the GPU in shaders suggests that your deformation algorithm is localizable, i.e. you can easily generate just the relavent parts for your collision checking.&#xD;&#xA;&#xD;&#xA;For example, I made a sailing game a while ago. The ocean used the vertex and geometry shaders to deform the water with waves. I used the same algorithm calculated on the CPU on just a few points under the boat for the boat's movement in the waves. I'm sure you could do something similar for your voxel map.&#xD;&#xA;&#xD;&#xA;**Pixel shaders**&#xD;&#xA;The last option, you mentioned this in your question too: generate the densities in the pixel shader and write it to a 3D texture. You can access this from the CPU and the shaders fairly harmlessly. The pixel shader is perfect for this task, but this method has a lot of overhead. Rendering the volume texture, as well as sampling from in in the vertex and geo. shaders, and having to read the texture onto the CPU.&#xD;&#xA;&#xD;&#xA;I don't know the specifics of your project, but I would always use the CPU for this. By all means calculate the densities on the shaders as well, but stick to using the graphics card for rendering." />
  <row Id="33698" PostHistoryTypeId="2" PostId="14956" RevisionGUID="03d6ee1a-39ea-4fb3-b132-c586910d963c" CreationDate="2011-07-17T21:20:00.237" UserId="8594" Text="The up vector being different basically means that the model is in a different space, where Z inwards represents that what you regard as Y up. To compensate for this, rotate the model vertices 90 degrees over the X-axis (in the right direction). Draw the axes on paper, it'll be clear in a jiffy.&#xD;&#xA; &#xD;&#xA;Think of it as this: if you were to rotate the up vector 0, 0, 1 -- how would you do it to make it 0, 1, 0?&#xD;&#xA;&#xD;&#xA;Use Google for all about building rotation matrices. Or use glRotate() for a quick test." />
  <row Id="33699" PostHistoryTypeId="25" PostId="14941" RevisionGUID="c607d1a4-5969-4e53-a22d-1df7e68f899e" CreationDate="2011-07-17T21:31:58.630" Comment="http://twitter.com/#!/StackGameDev/status/92708143854919680" />
  <row Id="33700" PostHistoryTypeId="2" PostId="14957" RevisionGUID="3ae61ec6-14b6-4537-86c5-ebe960e36d3d" CreationDate="2011-07-17T21:55:43.230" UserId="7328" Text="You only need a CCTMXLayer, there is no need for any thing else. but you'll need to initialize it properly. for that reason I suggest you use some TMX file generated with Tiled editor and then load it into your program. there is a GID value for each tile in TMXLayer and you can easily edit it. by changing that value the tile for that position will change. if you set a tile's GID to 0 TMXLayer will automatically delete tile at that position otherwise, it'll change(or create) the ccSprite instance at that position." />
  <row Id="33701" PostHistoryTypeId="2" PostId="14958" RevisionGUID="955e60dd-3314-4113-bfa2-756ab133dff1" CreationDate="2011-07-17T22:32:13.783" UserId="7548" Text="**A safe approach...**&#xD;&#xA;&#xD;&#xA;I suggest you allow your players to select the colours of the uniforms (and provide them with RGB knobs so they can get the exact colour they want), broken down to:&#xD;&#xA;&#xD;&#xA;* Shirt colour&#xD;&#xA;   * Background (the cloth colour)&#xD;&#xA;   * Foreground (the player number)&#xD;&#xA;* Shorts&#xD;&#xA;* Socks&#xD;&#xA;* Shoes (black, brown, grey, and white should be enough selection for this part)&#xD;&#xA;&#xD;&#xA;Also, start out with a randomly selected colour combination (and indicate that it was randomly selected), then provide the player with an option to randomly select a colour for each item (right next to all the RGB knobs).&#xD;&#xA;&#xD;&#xA;I believe this solution will provide you with the most unbiased approach possible, without violating any specific colour schemes, but also without limiting your players from selecting the colours of their favourite teams.&#xD;&#xA;&#xD;&#xA;You could even provide them with an option to supply art to use as a logo, and then you wouldn't be providing the logos.  Your game's user interface could even remember the 25 most recent paths to logo files (along with the colours) that players used so they can easily re-create their teams the next time they play.&#xD;&#xA;&#xD;&#xA;**Dealing with logos...**&#xD;&#xA;&#xD;&#xA;If you wish to place a particular logo on the shirts, then you'll definitely need to get permission from whoever owns the trademarks before including them with your game.&#xD;&#xA;&#xD;&#xA;If you're good at writing letters, draft up a friendly one on your own first and then have a lawyer with experience in Intellectual Property take a quick look at it before you send it off (don't be surprised if they ask for royalties, as it is important not to lose the perspective that sports teams are businesses that provide a product in the ever-so-popular &quot;entertainment&quot; category).&#xD;&#xA;&#xD;&#xA;Any correspondence you have with owners of the logos, for which it is safe to assume that they're all Registered Trademarks, should be done with the assistance of a properly qualified lawyer.&#xD;&#xA;" />
  <row Id="33702" PostHistoryTypeId="2" PostId="14959" RevisionGUID="c71873fc-4345-4123-9897-dab5e5956fec" CreationDate="2011-07-17T22:44:07.683" UserId="5412" Text="Most animation libraries aren't made to support that sort of thing. I wrote a small library for exactly this problem; it's built upon a foundation of spatial path-based animation, rather than generic property interpolation.&#xD;&#xA;&#xD;&#xA;You can check it out here: http://blog.generalrelativity.org/actionscript-30/grape-animation-library/&#xD;&#xA;&#xD;&#xA;If you're required to use GTween, and it supports curves (probably bezier), you can approximate a circle with multiple curves: http://www.tinaja.com/glib/ellipse4.pdf" />
  <row Id="33703" PostHistoryTypeId="5" PostId="14958" RevisionGUID="2143c710-d184-4785-897a-4a1deef5a823" CreationDate="2011-07-17T22:50:26.997" UserId="7548" Comment="added 79 characters in body" Text="**A safe approach...**&#xD;&#xA;&#xD;&#xA;I suggest something along the lines of what is known as &quot;paper dolling&quot; in the MMORPG arena where your players can select the colours of the uniforms (and provide them with RGB knobs so they can get the exact colour they want), broken down to:&#xD;&#xA;&#xD;&#xA;* Shirt colour&#xD;&#xA;   * Background (the cloth colour)&#xD;&#xA;   * Foreground (the player number)&#xD;&#xA;* Shorts&#xD;&#xA;* Socks&#xD;&#xA;* Shoes (black, brown, grey, and white should be enough selection for this part)&#xD;&#xA;&#xD;&#xA;Also, start out with a randomly selected colour combination (and indicate that it was randomly selected), then provide the player with an option to randomly select a colour for each item (right next to all the RGB knobs).&#xD;&#xA;&#xD;&#xA;I believe this solution will provide you with the most unbiased approach possible, without violating any specific colour schemes, but also without limiting your players from selecting the colours of their favourite teams.&#xD;&#xA;&#xD;&#xA;You could even provide them with an option to supply art to use as a logo, and then you wouldn't be providing the logos.  Your game's user interface could even remember the 25 most recent paths to logo files (along with the colours) that players used so they can easily re-create their teams the next time they play.&#xD;&#xA;&#xD;&#xA;**Dealing with logos...**&#xD;&#xA;&#xD;&#xA;If you wish to place a particular logo on the shirts, then you'll definitely need to get permission from whoever owns the trademarks before including them with your game.&#xD;&#xA;&#xD;&#xA;If you're good at writing letters, draft up a friendly one on your own first and then have a lawyer with experience in Intellectual Property take a quick look at it before you send it off (don't be surprised if they ask for royalties, as it is important not to lose the perspective that sports teams are businesses that provide a product in the ever-so-popular &quot;entertainment&quot; category).&#xD;&#xA;&#xD;&#xA;Any correspondence you have with owners of the logos, for which it is safe to assume that they're all Registered Trademarks, should be done with the assistance of a properly qualified lawyer.&#xD;&#xA;" />
  <row Id="33704" PostHistoryTypeId="2" PostId="14960" RevisionGUID="2a321d16-7e5b-4b00-80b3-49de0fa8034f" CreationDate="2011-07-17T23:00:17.467" UserId="7911" Text="(not a lawyer but have developed with licensed sports titles before)&#xD;&#xA;&#xD;&#xA;Start with everything generic, but make the uniform patterns + colors + logos configurable.  This way you can work for a long time and not care about uniforms at all, but be ready to change them when you get your licenses.&#xD;&#xA;&#xD;&#xA;You will not only have to license the team colors and jersey patterns, but also the player names on the roster and it will get expensive.  Beyond that if you use any recognizable stadiums you will have to license those too, this is very common in American Baseball where stadiums are different and recognizable.  Beyond even those issues if you use any stadium music or team songs, yes those need licenses.  And get this, if players are wearing recognizable shoes like Adidas stripes or Nike swooshes, licensed.&#xD;&#xA;&#xD;&#xA;You will need a lawyer with knowledge of Intellectual Propery to help you figure all those issues out.&#xD;&#xA;&#xD;&#xA;(this is in the US, your country may vary)&#xD;&#xA;" />
  <row Id="33705" PostHistoryTypeId="5" PostId="14958" RevisionGUID="b785231a-2fe2-4a09-81c1-9209104e78cb" CreationDate="2011-07-17T23:10:10.693" UserId="7548" Comment="added 85 characters in body" Text="**A safe approach...**&#xD;&#xA;&#xD;&#xA;I suggest something along the lines of what is known as &quot;paper dolling&quot; in the MMORPG arena where your players can select the colours of the uniforms (and provide them with RGB knobs so they can get the exact colour they want), broken down to:&#xD;&#xA;&#xD;&#xA;* Shirt colour&#xD;&#xA;   * Background (the cloth colour)&#xD;&#xA;   * Foreground (the player number)&#xD;&#xA;* Shorts&#xD;&#xA;* Socks&#xD;&#xA;* Shoes (black, brown, grey, and white should be enough selection for this part)&#xD;&#xA;&#xD;&#xA;Also, start out with a randomly selected colour combination (and indicate that it was randomly selected), then provide the player with an option to randomly select a colour for each item (right next to all the RGB knobs).&#xD;&#xA;&#xD;&#xA;I believe this solution will provide you with the most unbiased approach possible, without violating any specific colour schemes (getting feedback from a properly qualified lawyer would be wise here though anyway), but also without limiting your players from selecting the colours of their favourite teams.&#xD;&#xA;&#xD;&#xA;You could even provide them with an option to supply art to use as a logo, and then you wouldn't be providing the logos.  Your game's user interface could even remember the 25 most recent paths to logo files (along with the colours) that players used so they can easily re-create their teams the next time they play.&#xD;&#xA;&#xD;&#xA;**Dealing with logos...**&#xD;&#xA;&#xD;&#xA;If you wish to place a particular logo on the shirts, then you'll definitely need to get permission from whoever owns the trademarks before including them with your game.&#xD;&#xA;&#xD;&#xA;If you're good at writing letters, draft up a friendly one on your own first and then have a lawyer with experience in Intellectual Property to review it before you send it (don't be surprised if you are expected to pay royalties, as it is important not to lose the perspective that sports teams are businesses that provide a product in the ever-so-popular &quot;entertainment&quot; category).&#xD;&#xA;&#xD;&#xA;Any correspondence you have with owners of the logos, for which it is safe to assume that they're all Registered Trademarks, should be done with the assistance of a properly qualified lawyer.&#xD;&#xA;" />
  <row Id="33706" PostHistoryTypeId="5" PostId="14932" RevisionGUID="abfbf9eb-07f6-420a-8656-61be95adadaa" CreationDate="2011-07-17T23:49:12.233" UserId="159" Comment="deleted 75 characters in body" Text="In a prototype I am doing, there is a minigame similar to bejeweled. Using a grid that is a 2d array (`int[,]`) how can I go about know when the user formed a match? I only care about horizontally and vertically. &#xD;&#xA;&#xD;&#xA;Off the top of my head I was thinking I would just look each direction. Something like:&#xD;&#xA;&#xD;&#xA;    int item = grid[x,y];&#xD;&#xA;    if(grid[x-1,y]==item)&#xD;&#xA;    {&#xD;&#xA;        int step=x;&#xD;&#xA;        int matches =2;&#xD;&#xA;        while(grid[step-1,y]==item)&#xD;&#xA;        {&#xD;&#xA;            step++;&#xD;&#xA;            matches++&#xD;&#xA;        }&#xD;&#xA;        if(matches&gt;2)&#xD;&#xA;            //remove all matching items&#xD;&#xA;    }&#xD;&#xA;    else if(grid[x+1,y]==item&#xD;&#xA;        //....&#xD;&#xA;    else if(grid[x,y-1==item)&#xD;&#xA;        //...&#xD;&#xA;    else if(grid[x,y+1]==item)&#xD;&#xA;        //...&#xD;&#xA;&#xD;&#xA;It seems like there should be a better way. Is there?" />
  <row Id="33708" PostHistoryTypeId="25" PostId="14935" RevisionGUID="f4a3ccd5-3d3e-4c01-b3ce-08446431ebad" CreationDate="2011-07-18T00:31:59.053" Comment="http://twitter.com/#!/StackGameDev/status/92753444007460865" />
  <row Id="33709" PostHistoryTypeId="5" PostId="14951" RevisionGUID="9ad9d37d-f154-46ad-8a9b-c8cf40c7e93c" CreationDate="2011-07-18T01:26:47.840" UserId="98" Comment="added 292 characters in body" Text="I have a project to be accomplished in a distant future about a soccer game.  &#xD;&#xA;I´ve read that you can´t feature the actual national teams uniforms without getting permission from FIFA.  &#xD;&#xA;Is this only for special designs or for jerseys which are a single colour (most of them) too?  &#xD;&#xA;Can you copyright a color? From what I know, most copyright laws don´t allow for a single colour or color combinations to be registered, but maybe in the context of a specific sport and specific teams it is allowed.  &#xD;&#xA;&#xD;&#xA;PS: thanks, when and if this gets commercially serious, I will seek legal advice.  &#xD;&#xA;To be more precise, by presenting a team as *Germany* with a white shirt and black pants, no logo, no real player names and no real stadiums, do you think that would be considered a copyright infringement?&#xD;&#xA;&#xD;&#xA;PS2: the RGB knob approach is what I thought of for teams created by each user. But also though it would be nice to have a special competition which would be a world cup." />
  <row Id="33710" PostHistoryTypeId="2" PostId="14961" RevisionGUID="9c3b6b49-251d-4331-861c-41c175934349" CreationDate="2011-07-18T01:27:50.757" UserId="7728" Text="Fundamentally, what you're talking about is edge-finding, and there are a number of games that do it, in a variety of different ways.&#xD;&#xA;&#xD;&#xA;Probably the first one was [Jet Set Radio][1] (released in the west as &quot;Jet Grind Radio&quot;).  Released only a month or two after that was the game for which I'd developed a similar rendering technique:  [Looney Tunes: Space Race][2].  (On Space Race, we did our best to maintain a uniform line thickness, while Jet Set Radio made the uneven line widths a big part of its visual style).&#xD;&#xA;&#xD;&#xA;Both of these games worked the same way;  for each object to be outlined, draw the object twice.  First, render it with backfacing reversed, with a vertex push applied (that is, move each vertex by some distance along its normal vector), and in whatever color you want the 'lines' to appear to be.  Then draw again, without the vertex push and with normal backfacing.  This pair of operations gives you a colored silhouette edging around an object, and it's all that these first two games used.  In Space Race, I maintained the illusion of constant line width by pushing vertices a varying distance, based upon how far the object was from the camera.  In Jet Set Radio, they didn't (which led to lines becoming larger or smaller, as objects moved closer or further from the camera)&#xD;&#xA;&#xD;&#xA;NVidia and ATI have several demos of other ways to achieve this effect, mostly revolving around pixel shaders looking for normals which are perpendicular to the camera-to-pixel vector for each pixel, but these all require very high-resolution meshes, and produce inconsistent line widths in practice.  I don't know whether any games actually use this type of approach;  I don't think I've seen any which look like the samples from these companies.&#xD;&#xA;&#xD;&#xA;I'll also point you at [Dragon's Lair 3D][3], which is the only game I know of which seems to really be doing this properly;  taking the dot product of camera-to-polygon and the polygon's normal for each polygon in a model to see whether each polygon faces toward or away from the camera, and then checking all pairs of connected polygons;  if any pair of polygons share an edge, and one polygon faces the camera and one polygon doesn't, then it draws a thin, constant-width line along that edge in screen-space.  (I couldn't make this work fast enough on the Dreamcast for Space Race, or I'd have used it.  Today, on modern computers, this is totally the way I'd be trying to do this effect, even though it's a bit processor-intensive to be checking every pair of polygons on every model every frame)  &#xD;&#xA;&#xD;&#xA;Dragon's Lair 3D is also the only game I'm aware of which actually draws lines between areas of different color or at vertex-normal discontinuities, even if there isn't a silhouette edge for it to find there.  I suspect that they had a custom tool which allowed their artists to nominate polygon edges to always receive a line.&#xD;&#xA;&#xD;&#xA;[Okami][4], which has been mentioned by some other folks, appears to be using a double-render vertex-push approach, similar to Jet Set Radio and Space Race, but also uses textures which have been built using a brushed art style.  (Hills in the distance, for example, are drawn as brush strokes into a texture which is drawn as a standard quad).  Okami is lovely, but I don't think that it really touches on the tech that you're asking about;  certainly, it's using the older approach for its effect.&#xD;&#xA;&#xD;&#xA;Now, in your case, you're asking about doing this without a color fill, just drawing the world with lines only.  That's easy to do;  just draw all polygons without lighting, and in a single constant color that matches the background color.  Any of these approaches should work using that approach without changing your game engine at all.  It's important to actually draw those &quot;same color as the background&quot; polygons, as they'll keep background edges from showing through foreground objects, which could get confusing very quickly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=6yC3K8sMwWU&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=reoC542Xbao&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=sElCAkogPOc&#xD;&#xA;  [4]: http://www.youtube.com/watch?v=YhfEbS8GFgM" />
  <row Id="33711" PostHistoryTypeId="5" PostId="14958" RevisionGUID="9a3121d8-8663-4d98-9636-1bdf90b36d91" CreationDate="2011-07-18T01:47:25.103" UserId="7548" Comment="added 64 characters in body" Text="**A safe approach...**&#xD;&#xA;&#xD;&#xA;I suggest something along the lines of what is known as &quot;paper dolling&quot; in the MMORPG arena where your players can select the colours of the uniforms (and provide them with RGB knobs so they can get the exact colour they want), broken down to:&#xD;&#xA;&#xD;&#xA;* Shirt colour&#xD;&#xA;   * Background (the cloth colour)&#xD;&#xA;   * Foreground (the player number)&#xD;&#xA;* Short colour&#xD;&#xA;* Sock colours (left and right could be different colours)&#xD;&#xA;* Shoe colours (black, brown, grey, and white should be enough selection for this part)&#xD;&#xA;&#xD;&#xA;Also, start out with a randomly selected colour combination (and indicate that it was randomly selected), then provide the player with an option to randomly select a colour for each item (right next to all the RGB knobs).&#xD;&#xA;&#xD;&#xA;I believe this solution will provide you with the most unbiased approach possible, without violating any specific colour schemes (getting feedback from a properly qualified lawyer would be wise here though anyway), but also without limiting your players from selecting the colours of their favourite teams.&#xD;&#xA;&#xD;&#xA;You could even provide them with an option to supply art to use as a logo, and then you wouldn't be providing the logos.  Your game's user interface could even remember the 25 most recent paths to logo files (along with the colours) that players used so they can easily re-create their teams the next time they play.&#xD;&#xA;&#xD;&#xA;**Dealing with logos...**&#xD;&#xA;&#xD;&#xA;If you wish to place a particular logo on the shirts, then you'll definitely need to get permission from whoever owns the trademarks before including them with your game.&#xD;&#xA;&#xD;&#xA;If you're good at writing letters, draft up a friendly one on your own first and then have a lawyer with experience in Intellectual Property to review it before you send it (don't be surprised if you are expected to pay royalties, as it is important not to lose the perspective that sports teams are businesses that provide a product in the ever-so-popular &quot;entertainment&quot; category).&#xD;&#xA;&#xD;&#xA;Any correspondence you have with owners of the logos, for which it is safe to assume that they're all Registered Trademarks, should be done with the assistance of a properly qualified lawyer.&#xD;&#xA;" />
  <row Id="33712" PostHistoryTypeId="5" PostId="14919" RevisionGUID="cc9e0463-36cc-41f1-b2f5-a07502f24f75" CreationDate="2011-07-18T01:51:22.030" UserId="7548" Comment="added 49 characters in body" Text="**Profitability...**&#xD;&#xA;&#xD;&#xA;Extra lives provides the player with additional &quot;chances&quot; to &quot;try again.&quot;  Particularly with traditional arcade games back in the 1980s, a player would insert a quarter (25 cents) to play the game, and with this payment they'd get a number of lives (usually 3 or 5).&#xD;&#xA;&#xD;&#xA;With these extra lives, the gameplay is longer, and the player gets more &quot;value&quot; out of the game since they extra lives allowed them to automatically continue the gameplay.  If the game provided only one life, they player might not enjoy the game as much (because the game would be a shorter duration), and consequently may not insert as many quarters to play again later (which would make it less profitable).&#xD;&#xA;&#xD;&#xA;When enjoying video arcades in my younger years back in the 1980s, I noticed that the games that provided more lives tended to be more popular.  I'm sure the arcade game vendors and operators all understood this well as some operators with the less popular arcades tended to set dip-switches on the games [that supported this sort of customization] to provide more lives for the payment.&#xD;&#xA;&#xD;&#xA;Of course, the consumer almost always likes to have the benefit of &quot;extra lives&quot; as this equates to more entertainment.  But, for games that are in very high demand (e.g., &quot;Outrun,&quot; which imposes time-limits instead of number of lives, when it was new, was a big arcade machine that featured a seat shaped like a car that actually shook and tilted {if I recall correctly} and vibrated in concert with in-game events, for which I've included a few images below), many arcade operators set the dip-switches to severely limit the numbers of lives under the guise of &quot;giving more people a chance to play&quot; (although I suspect that this decision was more likely motivated by profit).&#xD;&#xA;&#xD;&#xA;Pinball machines had exactly the same concept, except instead of lives the player got balls.  Typically 3-5 balls per quarter.&#xD;&#xA;&#xD;&#xA;One common factor as well was that once all the lives (or cars, or balls, etc.) where lost, the game provided an option to the player to insert another quarter to continue (and get another 3 or 5 lives, cars, balls, etc.).&#xD;&#xA;&#xD;&#xA;**Measuring skill...**&#xD;&#xA;&#xD;&#xA;As I alluded to in the comments, having lives can also aid the player in measuring their skill:&#xD;&#xA;&#xD;&#xA;* What score did I achieve with 1 (or 3, or 5) lives?&#xD;&#xA;* How much gold did I get before the evil dragon killed me?&#xD;&#xA;* How many times did I play multi-ball mode on that pinball machine in one go?&#xD;&#xA;* How many races was I win with just one car?&#xD;&#xA;&#xD;&#xA;These can become &quot;bragging rights&quot; amongst a player's friends, especially if there were witnesses.  I can remember back in the 1980s seeing people crowd around player who's been playing a particular game for a long time, and playing it well.  Comments from onlookers would sometimes include &quot;she [that player] is still on her first life and she's already completed seven levels&quot; followed by &quot;damn, I always have trouble with the umber-troll on level three, how did she do that?&quot;&#xD;&#xA;&#xD;&#xA;Such measurements can be an important tie into word-of-mouth marketing too.&#xD;&#xA;&#xD;&#xA;**Player motivation...**&#xD;&#xA;&#xD;&#xA;The &quot;losing a character's life&quot; factor also adds yet another quality to the gameplay that causes the player to put a little bit more effort into taking care of their character (e.g., feeding it so it doesn't starve to death, avoiding getting hit by weapons, circumventing dangerous traps, etc.).  With the possibility of losing lives, the player will get more emotionally involved in the gameplay sessions which, in turn, makes the game more interesting.&#xD;&#xA;&#xD;&#xA;If a character never dies, the game may never end and could become quite boring, at least in the case of an action game.  For games like Chess, Ma-Jiang (incorrectly spelled by most authors as &quot;Mah Jongg&quot; or &quot;Mahjjong&quot; and so on), etc., there obviously is no need to have a concept of &quot;lives,&quot; but for most action games where your character is at risk of dying it's beneficial.  Ditto for pinball and other such games too.&#xD;&#xA;&#xD;&#xA;Also, if the player makes some serious mistake in the first 10 seconds of gameplay, the additional lives are a wonderful feature.  Not having this feature can be very discouraging, especially for new players.&#xD;&#xA;&#xD;&#xA;The player knows that there is a limited number of lives available, and will work toward an unspoken goal to improve their gameplay abilities.  Of course, this will require practice, and so the extra lives are also helpful here too.&#xD;&#xA;&#xD;&#xA;**Pictures of Outrun...**&#xD;&#xA;&#xD;&#xA;I've included a few pictures of the Outrun game I mentioned earlier.  For those who remember playing this game in an arcade, I hope this will also bring back some fond memories.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;![enter image description here][3]&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/rMGL6.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/SGIgT.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/EjIqA.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/vB3gE.png" />
  <row Id="33713" PostHistoryTypeId="2" PostId="14962" RevisionGUID="4a615689-a512-4019-a3cc-5f21771e27bc" CreationDate="2011-07-18T02:32:09.357" UserId="216" Text="I have an HTML5 game on my site, and at the end, I want the user to have the option of posting their score to their Facebook wall. Is there an easy way to ask to post something to Facebook?" />
  <row Id="33714" PostHistoryTypeId="1" PostId="14962" RevisionGUID="4a615689-a512-4019-a3cc-5f21771e27bc" CreationDate="2011-07-18T02:32:09.357" UserId="216" Text="How can I let a player post their score to Facebook at the end of the game?" />
  <row Id="33715" PostHistoryTypeId="3" PostId="14962" RevisionGUID="4a615689-a512-4019-a3cc-5f21771e27bc" CreationDate="2011-07-18T02:32:09.357" UserId="216" Text="&lt;facebook&gt;&lt;leaderboards&gt;" />
  <row Id="33716" PostHistoryTypeId="2" PostId="14963" RevisionGUID="90ed9fd1-723a-4198-9bc5-331f746a6ee4" CreationDate="2011-07-18T02:48:59.457" UserId="6588" Text="To post on the user's wall, first register the app with Facebook. Set it up as a webpage app, even though it will be on your website and not theirs.&#xD;&#xA;&#xD;&#xA;Now you can put a button on your site that will log the player into Facebook and then the game can post messages on their wall." />
  <row Id="33717" PostHistoryTypeId="2" PostId="14964" RevisionGUID="1221a1b1-3e1c-4121-bc77-d6a9186ce7fd" CreationDate="2011-07-18T03:12:09.847" UserId="998" Text="__It depends on what you're doing__.&#xD;&#xA;&#xD;&#xA;__All__ game programmers should know at least high school algebra.  That means:&#xD;&#xA;&#xD;&#xA;  - A good sense of numbers&#xD;&#xA;  - Comfort with basic math (add, sub, mult, divide)&#xD;&#xA;  - Trigonometry (sin and cos)&#xD;&#xA;  - Vectors, angle between vectors, dot product, cross product&#xD;&#xA;&#xD;&#xA;Your graphics programmers must know:&#xD;&#xA;  &#xD;&#xA;  - All the above, and&#xD;&#xA;  - Matrix algebra (for transformation matrices)&#xD;&#xA;  - Polygon intersection methods / ray-polygon (see a book like &lt;a href=&quot;http://realtimecollisiondetection.net/&quot;&gt;Real-time collision detection&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;Your physics programmers must know:&#xD;&#xA;&#xD;&#xA;  - All of the above and&#xD;&#xA;  - Differential equations&#xD;&#xA;  - Numerical methods&#xD;&#xA;  &#xD;&#xA;  &#xD;&#xA;" />
  <row Id="33718" PostHistoryTypeId="16" PostId="14964" RevisionGUID="b04f6196-658b-43c6-945e-4398dc076353" CreationDate="2011-07-18T03:12:09.847" UserId="998" />
  <row Id="33719" PostHistoryTypeId="25" PostId="14953" RevisionGUID="f47dd518-e948-43ce-bfec-92bc602375c9" CreationDate="2011-07-18T03:31:59.943" Comment="http://twitter.com/#!/StackGameDev/status/92798746164871169" />
  <row Id="33720" PostHistoryTypeId="2" PostId="14965" RevisionGUID="ea733286-55a2-463e-badd-5c762acc252f" CreationDate="2011-07-18T04:03:57.460" UserId="1966" Text="I'm working on a game with confusing mechanics such as energy storage and the coolant temperature. What is the best way to get a new player learned quickly? What are the pros and cons of different in-game tutorial methods? I was thinking of a tutorial with annotated screenshots, but that makes it sound like a science textbook (&quot;&lt;b&gt;Active towers&lt;/b&gt; are towers that consume energy and may generate heat.&quot;). &#xD;&#xA;Other ways include:&#xD;&#xA;&#xD;&#xA; - in-game tutorials, which is somewhat difficult to program&#xD;&#xA; - tips that will show in-game and after game over&#xD;&#xA; - a reduced difficulty without the energy and coolant things" />
  <row Id="33721" PostHistoryTypeId="1" PostId="14965" RevisionGUID="ea733286-55a2-463e-badd-5c762acc252f" CreationDate="2011-07-18T04:03:57.460" UserId="1966" Text="In-Game Tutorial Decisions" />
  <row Id="33722" PostHistoryTypeId="3" PostId="14965" RevisionGUID="ea733286-55a2-463e-badd-5c762acc252f" CreationDate="2011-07-18T04:03:57.460" UserId="1966" Text="&lt;game-design&gt;&lt;game-mechanics&gt;" />
  <row Id="33723" PostHistoryTypeId="2" PostId="14966" RevisionGUID="f75519e9-636d-436f-9a23-b0b9e51e28e1" CreationDate="2011-07-18T04:29:35.050" UserId="7548" Text="The game Ashen Empires (which used to be known as &quot;Dransik&quot; back when it was in &quot;beta&quot;) currently has a tutorial section (I believe others like RuneScape also have a similar setup) where new players are in a &quot;new player&quot; area that they can't get out of until they get a very small number of experience points in certain essential skills.&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Ashen Empires (free to play; pay for expansions)&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.ashenempires.com/&#xD;&#xA;&#xD;&#xA;Once the player has completed the super-easy quests to gain the needed skill points (e.g., kill three giant spiders and bash the hell out of a few over-sized sewer rats), they will be permitted by the guards to pass through the gates.&#xD;&#xA;&#xD;&#xA;And on a slight digression, for those players who try to &quot;level up&quot; in the &quot;new player&quot; area, after getting to a certain level they no longer get points for killing the super-easy stuff, so there's no real motivation to remain in the &quot;new player&quot; area after a while.&#xD;&#xA;&#xD;&#xA;So, this is one approach that could work for you -- you could require new players to all demonstrate that they can use those specialized features you created relating to energy storage and understand how coolant temperature factors in (e.g., one simple quest could require the player to get extremely close to the overheating temperature without actually overheating -- if they don't get within that specific range, then they have to re-do the quest).  But, do consider making this &quot;new player&quot; area easy for experienced players to just blow through really quickly so they won't get annoyed when creating new characters.&#xD;&#xA;" />
  <row Id="33724" PostHistoryTypeId="8" PostId="14874" RevisionGUID="beab1469-4de4-4305-b52a-e1b7964c89a0" CreationDate="2011-07-18T05:20:05.147" UserId="8593" Comment="Rollback to [489d869d-a135-4c54-a44a-1e8d6e4d25c6]" Text="I develop a game in android. I able to find collision between two object. But i need to find collision only when two object collided(Not in blank space of image)In j2me ,i able to make that.&#xD;&#xA;&#xD;&#xA;Sample code: helicopterSprite.collidesWith(buildingSprite, true)&#xD;&#xA;&#xD;&#xA;But in Andengine , having only helicopterSprite.collidesWith(buildingSprite) . How i make in android&#xD;&#xA;" />
  <row Id="33725" PostHistoryTypeId="7" PostId="14874" RevisionGUID="beab1469-4de4-4305-b52a-e1b7964c89a0" CreationDate="2011-07-18T05:20:05.147" UserId="8593" Comment="Rollback to [489d869d-a135-4c54-a44a-1e8d6e4d25c6]" Text="sprite collision Andengine (Android)" />
  <row Id="33726" PostHistoryTypeId="9" PostId="14874" RevisionGUID="beab1469-4de4-4305-b52a-e1b7964c89a0" CreationDate="2011-07-18T05:20:05.147" UserId="8593" Comment="Rollback to [489d869d-a135-4c54-a44a-1e8d6e4d25c6]" Text="&lt;android&gt;" />
  <row Id="33727" PostHistoryTypeId="5" PostId="14874" RevisionGUID="047b048d-63c2-4230-9c8a-1a9b22225017" CreationDate="2011-07-18T05:20:56.927" UserId="8593" Comment="added 70 characters in body" Text="I develop a game in android. I able to find collision between two object. But i need to find collision only when two object collided(Not in blank space of image)In j2me ,i able to make that.&#xD;&#xA;&#xD;&#xA;Sample code: helicopterSprite.collidesWith(buildingSprite, true)&#xD;&#xA;&#xD;&#xA;But in Andengine , having only helicopterSprite.collidesWith(buildingSprite) . How i make in android&#xD;&#xA;&#xD;&#xA;Which method should i use for pixel level collision ? Any examples ?" />
  <row Id="33728" PostHistoryTypeId="25" PostId="14965" RevisionGUID="74d50cf1-416f-417f-be5b-cafd71f57b4d" CreationDate="2011-07-18T06:31:59.497" Comment="http://twitter.com/#!/StackGameDev/status/92844043209408512" />
  <row Id="33729" PostHistoryTypeId="2" PostId="14967" RevisionGUID="35451fd3-2f7c-44a2-8261-1934d9b48570" CreationDate="2011-07-18T06:37:52.023" UserId="8240" Text="&gt; I'm working on a game with confusing mechanics such as energy storage and the coolant temperature. What is the best way to get a new player learned quickly?&#xD;&#xA;&#xD;&#xA;Don't make confusing mechanics. That may sound flippant, but strongly consider this. Just as you don't write overly confusing code, you should not write mechanics that are innately confusing.&#xD;&#xA;&#xD;&#xA;The first step in getting players to learn quickly is to not confuse them in the first place. Find out what it is about your mechanics that they are finding confusing and fix *that*. Then, once you have a quality set of mechanics, you can start working on how to introduce players to your game.&#xD;&#xA;&#xD;&#xA;&gt; in-game tutorials, which is somewhat difficult to program&#xD;&#xA;&#xD;&#xA;Then you need to make a judgment call: do you want your game to be easy to write, or do you want it to be *good*?&#xD;&#xA;&#xD;&#xA;Yes, making a real in-game tutorial is a pain. But that pain is the difference between forgettable games and the ones people actually want to play.&#xD;&#xA;&#xD;&#xA;&gt; tips that will show in-game and after game over&#xD;&#xA;&#xD;&#xA;I've never found this to be a useful strategy for teaching anything useful. It's like the teacher giving you a test on the first day, then every day after this they putting up a question from the test and explaining what the answer is. It might work to teach you something, but it still makes you feel stupid.&#xD;&#xA;&#xD;&#xA;Asking someone to do something that you have not really prepared them to do can be read as rude by players. It's always better to introduce information up-front.&#xD;&#xA;&#xD;&#xA;&gt; a reduced difficulty without the energy and coolant things&#xD;&#xA;&#xD;&#xA;This is just me personally, but I don't like difficulty levels. The pacing of the game, the change from level to level, area to area, challenge to challenge, is the most important part of the game. That pacing changes when you just arbitrarily decide that skill level X will have fewer monsters or less mechanics or whatever. This makes the increase in challenge of the game over time less deliberate.&#xD;&#xA;&#xD;&#xA;And worst of all, since you're clearly designing the game to play best at the normal difficulty level, the people playing at reduced difficulty are going to have a sub-optimal gaming experience. You can't just yank out mechanics and expect everything to play fine for them. Either the game is going to be too easy, too hard, or too inconsistent in its difficulty." />
  <row Id="33730" PostHistoryTypeId="2" PostId="14968" RevisionGUID="22c733d3-7c57-477e-b618-d274c8cab672" CreationDate="2011-07-18T06:45:09.943" UserId="8623" Text="Nowadays, games tends to use the In-Game tutorial, sometimes with tips during gameplay. IMHO, if you just have a &quot;text and screenshot&quot; tutorial, most players will just go straight to the game, trying to figure it ourselves (I plead guilty, even tough I will come back to the tutorial if I can't figure it out).&#xD;&#xA;&#xD;&#xA;Another thing you could do is to design your game to make sure that the player get the needed skills to be able to advance. For example, make a place where there is no or few risk of failure, but are obliged to use a new skill, then, make them use the same skill, somewhere where they failure mean that they can't go further.&#xD;&#xA;&#xD;&#xA;Think Portal, where the first time you see an energy ball is in a safe room, then, you must manipulate a ball above water and get in the path of the ball, at the same time. The first room teach the player how the balls go into the receptors, the second one that water is toxic and balls kill you if you touch them.&#xD;&#xA;&#xD;&#xA;For another example, see [here][1] for an explanation of how the first level of Super Mario Bros. teaches you everything you need to play the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.auntiepixelante.com/?p=465 &quot;here&quot;" />
  <row Id="33731" PostHistoryTypeId="2" PostId="14969" RevisionGUID="26cc995c-89d7-4c86-865a-b3b6b901b1e4" CreationDate="2011-07-18T06:56:51.333" UserId="8240" Text="This is an old question, but I wanted to mention something.&#xD;&#xA;&#xD;&#xA;Deferred rendering hits GPU bandwidth hard. The lighting passes fetch from anywhere from 3 to 5+ textures, for every pixel on the screen, for every light. That's a lot of bandwidth.&#xD;&#xA;&#xD;&#xA;This hurts mobile GPUs, an increasingly important segment, more than others. Yes, they're low-power chips, but they still have some shader power behind them. Deferred rendering on such platforms is going to hurt. This is particularly true for PowerVR-based platforms (the current most popular mobile GPUs), as their tile-based rendering system already gets many of the advantages of deferred rendering.&#xD;&#xA;&#xD;&#xA;But more than that is the current trend to putting GPUs on CPUs. Now, you may think that this would only work for low-end games, but AMD is talking about CPUs with up to 400 shader processors or so; that's some decent horsepower. Yes, you won't run the highest of the high-end games at full settings, but it would be a serviceable GPU.&#xD;&#xA;&#xD;&#xA;For these GPUs, the lighting pass is going to suffer. They currently use the same bandwidth the CPU uses. Indeed, for such platforms you may want to start using fast noise functions to compute colors or normals instead of textures.&#xD;&#xA;&#xD;&#xA;Deferred rendering is really tailored towards higher-end hardware. With the current &quot;race to the bottom&quot; in CPU/GPU chip design (lower-power, etc), deferred rendering may be the future only for those who still have discrete GPUs." />
  <row Id="33732" PostHistoryTypeId="2" PostId="14970" RevisionGUID="e285ecbd-aeb0-40e7-860f-d0ca492ecf10" CreationDate="2011-07-18T07:00:47.327" UserId="8240" Text="What does the projected texture represent? Projective texturing is a means of generating texture coordinates from vertex positions, to make it appear that the texture is projected over the scene like a film projector.&#xD;&#xA;&#xD;&#xA;Can you still do these computations in deferred rendering? Yes. But when and how you do it depends on what the values in the texture represent?&#xD;&#xA;&#xD;&#xA;Projective textures are often used to represent things like flashlights. In which case, the texel values are light intensities. And that means you need to do the projection during the lighting pass. Once you reconstruct the position of the particular screen pixel, just do the usual projection computation.&#xD;&#xA;&#xD;&#xA;If the projective texture alters the albedo (diffuse reflectance, or diffuse color) of the object, then this must be done in the G-buffer pass. There, you can do the projection computations per-fragment or per-vertex, but you'll get better results per-fragment." />
  <row Id="33733" PostHistoryTypeId="5" PostId="14852" RevisionGUID="17f4504d-528c-4d72-8db8-fbe83881a0d2" CreationDate="2011-07-18T08:07:03.857" UserId="8050" Comment="added 96 characters in body" Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **A** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **A** = **A** + **G** make sure that **G** points toward the planet's center&#xD;&#xA; - update the velocity vector **V** = **V** + **A**&amp;middot;*dt*&#xD;&#xA; - update the position vector **X** = **X** + **V**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**G**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;G is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;As required some hint on implementation. You will need:&#xD;&#xA;&#xD;&#xA; - A vector library &#xD;&#xA; - Engine Model &#xD;&#xA; - Phisics Model&#xD;&#xA; - Collision Detection&#xD;&#xA; - User Interface (input and graphic rendering)&#xD;&#xA;&#xD;&#xA;First of all the vector library: your game can be mono/bi/tree/four... dimentional, as far as you consider your case as a projection of a 3D word, the physical roules hold.&#xD;&#xA;&#xD;&#xA;If n is the dimension you choose (probably 2 or 3 in your case), the library must have:&#xD;&#xA;&#xD;&#xA; - a vector storage entity (a list of n floating point numbers for each vector)&#xD;&#xA; - a sum operator (sum component by component)&#xD;&#xA; - a scalar multiplication operator (each component multiplied by a float)&#xD;&#xA; - a dot-multiplication between vectors (multiplicate component by component and sum up all)&#xD;&#xA; - the vector length (square root of a vector dot-mutiplied by itself)&#xD;&#xA;&#xD;&#xA;You can use a library that does this or implement one by yourself; a vector can be a struct or a class, the choice is yours.&#xD;&#xA;&#xD;&#xA;Each engine should be described by:&#xD;&#xA;&#xD;&#xA; - a vector indicating its thrust strength and direction&#xD;&#xA; - a scalar that indicates the fuel usage per second when on full power; &#xD;&#xA;&#xD;&#xA;your user input will be used to provide to each engine a number that will be between 0 (unused engine) and 1 (full power): the engine (usage) factor.&#xD;&#xA;&#xD;&#xA;Multiply the engine factor for its thrust vector to obtain the engine real trust and sum up all the results of all the available engines; this will give you the **F** of the second step.&#xD;&#xA;&#xD;&#xA;Your engine factor can be used to know the real fuel usage for each engine: multiply the engine factor by the fuel usage and by *dt* to know the instantaneous fuel usage; you can substract this value from the total fuel capacity variable (this gives you the opportunity to update your total mass *m* if the fuel mass is considerable).&#xD;&#xA;&#xD;&#xA;Now you can proceed using the integration to compute the new position, check for the collision with your planet surface; if any, use the length of the velocity vector to say if the landing was a success or a disaster.&#xD;&#xA;&#xD;&#xA;Obviously other collision checks can/should be made, some surface entities cant be allowed as landing point so every collision is a fatal one.&#xD;&#xA;&#xD;&#xA;I leave how to get input and how to render your spaceship to you; you can use the engine factor to render the engine status frame by frame, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="33734" PostHistoryTypeId="2" PostId="14971" RevisionGUID="b9461e40-cba5-400f-bfc3-37f149674d96" CreationDate="2011-07-18T08:28:00.730" UserId="7946" Text="I've got a 2D-map, largely consisting of rectangular tiles, but with some none-rectangular objects mixed in as well (tilted lines on corners for example). &#xD;&#xA;&#xD;&#xA;Take this image as an example:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;I now need all the largest possible (straight) lines around the two bodies inside that map. There are no additional required attributes to the lines.&#xD;&#xA;&#xD;&#xA;In this image, I've marked the lines that I'm trying to find, each one with a different color to make sure there are no confusions:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;It's important however, that the algorithm doesn't produce lines inside those two objects, as it would be a waste of resources.&#xD;&#xA;&#xD;&#xA;Are there algorithms suited for that or will I have to research an algorithm myself?&#xD;&#xA;&#xD;&#xA;By the way, the algorithm will run at loading-time of the game, so it doesn't need to be optimized for runtime-speed. Also, principally, an algorithm that is just able to find the lines around bodies which consist only of square or rectangular tiles would suffice as well.&#xD;&#xA; &#xD;&#xA;  [1]: http://i.imgur.com/uk5ax.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/x6u3W.png" />
  <row Id="33735" PostHistoryTypeId="1" PostId="14971" RevisionGUID="b9461e40-cba5-400f-bfc3-37f149674d96" CreationDate="2011-07-18T08:28:00.730" UserId="7946" Text="[2D] Finding largest possible straight lines around body" />
  <row Id="33736" PostHistoryTypeId="3" PostId="14971" RevisionGUID="b9461e40-cba5-400f-bfc3-37f149674d96" CreationDate="2011-07-18T08:28:00.730" UserId="7946" Text="&lt;2d&gt;&lt;tilemap&gt;" />
  <row Id="33737" PostHistoryTypeId="2" PostId="14972" RevisionGUID="f1505e6e-4288-41ea-87b7-f09de5b6d0a5" CreationDate="2011-07-18T08:32:53.877" UserId="20" Text="You can use the [Facebook Graph API][1] for that purpose (there are several [SDKs][2] available).&#xD;&#xA;&#xD;&#xA;These are roughly the things you need to do:&#xD;&#xA;&#xD;&#xA; - Create an app on Facebook. You can do this [here][3]. There you'll get your APP and API Keys that are needed for you to communicate with the Graph API.&#xD;&#xA; - If your app wants to post to somebodies wall, he/she needs to grant your app that permission. For that you'll need [authentication][4], specifically your app needs to ask for permission to write the users stream (`publish_stream`)&#xD;&#xA; - If the user granted you permission, your app can then publish to his wall using the [Graph API][5] (read the section titled *Publishing*). If the user doesn't grant you permission, don't nag any further :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developers.facebook.com/docs/reference/api/&#xD;&#xA;  [2]: http://developers.facebook.com/docs/sdks/&#xD;&#xA;  [3]: https://developers.facebook.com/apps&#xD;&#xA;  [4]: http://developers.facebook.com/docs/authentication/&#xD;&#xA;  [5]: http://developers.facebook.com/docs/reference/api/" />
  <row Id="33738" PostHistoryTypeId="2" PostId="14973" RevisionGUID="5ea03a14-bdf0-4f0c-8168-b19276beea4f" CreationDate="2011-07-18T08:46:41.923" UserId="20" Text="If you're dealing with discrete positions (eg. a tile-map or pixel based map), then an easy way to find the contours would be the [Marching Squares][1] algorithm ([Wikipedia][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://devblog.phillipspiess.com/2010/02/23/better-know-an-algorithm-1-marching-squares/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Marching_squares" />
  <row Id="33739" PostHistoryTypeId="25" PostId="14971" RevisionGUID="a7ae5117-8e81-4531-912a-f19f26eb0ec5" CreationDate="2011-07-18T09:31:59.620" Comment="http://twitter.com/#!/StackGameDev/status/92889341801664512" />
  <row Id="33740" PostHistoryTypeId="17" PostId="14974" RevisionGUID="80a7ddb4-7ef3-43ab-b9ee-9280b9b561a9" CreationDate="2011-07-18T09:55:17.590" UserId="-1" Comment="from http://graphicdesign.stackexchange.com/questions/2916/where-can-i-find-graphics-for-my-game" Text="" />
  <row Id="33741" PostHistoryTypeId="17" PostId="14975" RevisionGUID="75eb87ec-bf76-4fd9-9b07-1d0bd94aec92" CreationDate="2011-07-18T09:55:17.590" UserId="-1" Comment="from http://graphicdesign.stackexchange.com/questions/2916/where-can-i-find-graphics-for-my-game" Text="" />
  <row Id="33742" PostHistoryTypeId="17" PostId="14976" RevisionGUID="add4c179-f7ca-42e7-a172-8afcb33a656b" CreationDate="2011-07-18T09:55:17.590" UserId="-1" Comment="from http://graphicdesign.stackexchange.com/questions/2916/where-can-i-find-graphics-for-my-game" Text="" />
  <row Id="33743" PostHistoryTypeId="2" PostId="14975" RevisionGUID="9bc53d8f-5ea0-4b6a-890b-2d48328eb870" CreationDate="2011-07-16T00:17:59.213" UserDisplayName="Philip Regan" Text="Searching the web for &quot;sprite sheets&quot; brings up more hits than what is reasonable to list here, especially when doing an image-based search." />
  <row Id="33744" PostHistoryTypeId="2" PostId="14976" RevisionGUID="e5dc2544-c2cb-4500-b5db-a4cb6ca623e8" CreationDate="2011-07-16T20:17:18.310" UserId="3068" Text="You should check out the Yoyo games [Game Maker resources page][1]. They have tons of sprites, including explosions. I used some before I went over to particle physics explosions, which I strongly recommend you consider doing also. &#xD;&#xA;&#xD;&#xA;Other than that, [Google is your friend][2] and [turbosquid][3] have some 2d images too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.yoyogames.com/support/resources&#xD;&#xA;  [2]: http://www.google.no/search?q=2d%20sprite%20sheet&amp;hl=no&amp;safe=off&amp;prmd=ivns&amp;tbm=isch&amp;tbo=u&amp;source=univ&amp;sa=X&amp;ei=rPEhTsf5JYrRsgbL75meAg&amp;ved=0CBoQsAQ&amp;biw=1366&amp;bih=643&#xD;&#xA;  [3]: http://www.turbosquid.com" />
  <row Id="33745" PostHistoryTypeId="2" PostId="14974" RevisionGUID="0e6ae8df-1b1f-4c01-8f2d-28b2199b8e77" CreationDate="2011-07-15T22:10:49.250" UserDisplayName="Mel" Text="I use a site called rendrosity to get explosions for my 2d game, but this site is geared towards 3d not 2d.&#xD;&#xA;&#xD;&#xA;Where is a good place to get 2d images like explosions that I can buy for my game?" />
  <row Id="33746" PostHistoryTypeId="1" PostId="14974" RevisionGUID="0e6ae8df-1b1f-4c01-8f2d-28b2199b8e77" CreationDate="2011-07-15T22:10:49.250" UserDisplayName="Mel" Text="Where can i find graphics for my game?" />
  <row Id="33747" PostHistoryTypeId="3" PostId="14974" RevisionGUID="0e6ae8df-1b1f-4c01-8f2d-28b2199b8e77" CreationDate="2011-07-15T22:10:49.250" UserDisplayName="Mel" Text="&lt;resources&gt;" />
  <row Id="33748" PostHistoryTypeId="2" PostId="14977" RevisionGUID="d8aa7d1a-bb61-456a-adc1-8e859ca7a984" CreationDate="2011-07-18T10:31:50.547" UserId="8665" Text="If you haven't read it already try The Art of Game Design by Jesse Schell. It's available for Kindle and very good, but not specific to strategy.&#xD;&#xA;&#xD;&#xA;I publish books and ebooks for game developers so if you have a clear idea of what you want please post the idea here: http://www.google.com/moderator/#16/e=7d41d&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33749" PostHistoryTypeId="2" PostId="14978" RevisionGUID="d7d53267-c84d-410a-acbf-298117d58787" CreationDate="2011-07-18T10:36:06.487" UserId="8625" Text="Create an introduction video where you demonstrate and explain the ingame behavior.&#xD;&#xA;&#xD;&#xA;This has a few nice points:&#xD;&#xA;&#xD;&#xA;* Easy to create&#xD;&#xA;* Can't have bugs. half the tutorials in commercial games I player broke in some way.&#xD;&#xA;* You can upload it on youtube so even people who don't have the game can view it as promotional material&#xD;&#xA;* You can speed up boring or repetitive parts(wait for building to finish)&#xD;&#xA;* You can perhaps explain basics of strategy afterwards by commenting actual play. In my experience learning the rules of a game isn't necessarily the hardest part. You need also to learn which options are useful at which time." />
  <row Id="33750" PostHistoryTypeId="2" PostId="14979" RevisionGUID="2786229a-714a-4eaf-a5ec-3189c64daa5c" CreationDate="2011-07-18T10:36:53.903" UserId="8666" Text="I wanted to make flash games, and so, I bought a book of Flash Games Development with AS3. So I did start learning AS3; I did the 'hello world' by trace and addChild (Something like that :P). But the problem was, instead of 'understanding' what I was writing, I was cramming up those lines of codes. I felt it wouldn't work that way, and as the book had asked the learners to know at least some Java/Javascript, C#/C++, I didn't go any further. Now, I want to start again (And yes, I still don't know java/jsp or c programming).  &#xD;&#xA;What would you recommend me?  &#xD;&#xA;Thanks :)" />
  <row Id="33751" PostHistoryTypeId="1" PostId="14979" RevisionGUID="2786229a-714a-4eaf-a5ec-3189c64daa5c" CreationDate="2011-07-18T10:36:53.903" UserId="8666" Text="Gonna start AS3, but confused" />
  <row Id="33752" PostHistoryTypeId="3" PostId="14979" RevisionGUID="2786229a-714a-4eaf-a5ec-3189c64daa5c" CreationDate="2011-07-18T10:36:53.903" UserId="8666" Text="&lt;actionscript-3&gt;" />
  <row Id="33753" PostHistoryTypeId="2" PostId="14980" RevisionGUID="ffc0163b-5063-48c1-9469-4490252ca7a6" CreationDate="2011-07-18T10:57:47.880" UserId="119" Text="As the other excellent answer seems a bit theoretical, here's the simple code version:&#xD;&#xA;&#xD;&#xA;    // Position of the lander:&#xD;&#xA;    var positionX =  100.0;&#xD;&#xA;    var positionY = 100.0;&#xD;&#xA;   &#xD;&#xA;    // Velocity of lander&#xD;&#xA;    var velocityX = 0.0;&#xD;&#xA;    var velocityY = 0.0;&#xD;&#xA;&#xD;&#xA;    // Acceleration due to gravity&#xD;&#xA;    var gravity = 1.0;&#xD;&#xA;&#xD;&#xA;    // If the player is pressing the thrust buttons&#xD;&#xA;    var isThrusting = false;&#xD;&#xA;    var isThrustingLeft = false;&#xD;&#xA;    var isThrustingRight = false;&#xD;&#xA;&#xD;&#xA;    // Thrust acceleration&#xD;&#xA;    var thrust = -2.0;&#xD;&#xA;&#xD;&#xA;    // Vertical position of the ground&#xD;&#xA;    var groundY = 200.0;&#xD;&#xA;&#xD;&#xA;    // Maximum landing velocity&#xD;&#xA;    var maxLandingVelocity = 3.00;    &#xD;&#xA;&#xD;&#xA;    onUpdate()&#xD;&#xA;    {&#xD;&#xA;        velocityY += gravity;&#xD;&#xA;        &#xD;&#xA;        positionX += velocityX;&#xD;&#xA;        positionY += velocityY;&#xD;&#xA;&#xD;&#xA;        if (isThrusting)&#xD;&#xA;        {&#xD;&#xA;            velocityY += thrust;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (isThrustingLeft)&#xD;&#xA;        {&#xD;&#xA;            velocityX += thrust;&#xD;&#xA;        }&#xD;&#xA;        else if (isThrustingRight)&#xD;&#xA;        {&#xD;&#xA;            velocityX -= thrust;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        if (positionY &gt;= floorY)&#xD;&#xA;        {&#xD;&#xA;            if (velocityY &gt; maxLandingVelocity)&#xD;&#xA;            {&#xD;&#xA;                // crashed!&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;                // landed successfully!&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33754" PostHistoryTypeId="2" PostId="14981" RevisionGUID="ed52da33-80c8-430f-9094-226a27140708" CreationDate="2011-07-18T12:25:55.430" UserId="1110" Text="I'm interested in playing around with 3D on a new Sony 3D television (polarized light rather than red/green/blue anaglyph glasses).  Is this possible with XNA on the current XBox 360s?  It doesn't look like there is a comparatively trivial PS3 dev. solution to XNA right now, hence my interest in XNA and the 360.&#xD;&#xA;&#xD;&#xA;Regards," />
  <row Id="33755" PostHistoryTypeId="1" PostId="14981" RevisionGUID="ed52da33-80c8-430f-9094-226a27140708" CreationDate="2011-07-18T12:25:55.430" UserId="1110" Text="Is there a way of using XNA+Xbox 360 with the current generation of 3D televisions?" />
  <row Id="33756" PostHistoryTypeId="3" PostId="14981" RevisionGUID="ed52da33-80c8-430f-9094-226a27140708" CreationDate="2011-07-18T12:25:55.430" UserId="1110" Text="&lt;xna&gt;&lt;3d&gt;&lt;xbox360&gt;" />
  <row Id="33757" PostHistoryTypeId="2" PostId="14982" RevisionGUID="d361c07e-89a8-4d12-a4e8-9a81581565df" CreationDate="2011-07-18T12:31:11.017" UserId="1110" Text="You probably want something like this, Colin Moock was regarded at one time as the definitive AS3 expert. http://www.amazon.com/Essential-ActionScript-3-0-Colin-Moock/dp/0596526946&#xD;&#xA;&#xD;&#xA;You may also want to check out http://www.bit-101.com/blog/ as Bit-101 is a seasoned Flash veteran.&#xD;&#xA;&#xD;&#xA;Beyond that, there are some more general resources about ECMAScript worth exploring, such as http://jibbering.com/faq/notes/closures/ which will help you understand the language.&#xD;&#xA;&#xD;&#xA;Apart from learning ECMAScript / AS3 you will also need to learn about game development.  This site already offers many suggestions about books and websites to read that are related to the various topics in this field." />
  <row Id="33758" PostHistoryTypeId="25" PostId="14962" RevisionGUID="bd5ea861-1f3b-4e3e-89ec-aecafaecbfcb" CreationDate="2011-07-18T12:31:59.597" Comment="http://twitter.com/#!/StackGameDev/status/92934639911571456" />
  <row Id="33759" PostHistoryTypeId="5" PostId="14982" RevisionGUID="cbe8418a-a14c-436b-90b8-6887de888765" CreationDate="2011-07-18T12:37:06.147" UserId="1110" Comment="edited body" Text="You probably want something like this. Colin Moock was regarded at one time as the definitive AS3 expert. http://www.amazon.com/Essential-ActionScript-3-0-Colin-Moock/dp/0596526946&#xD;&#xA;&#xD;&#xA;You may also want to check out http://www.bit-101.com/blog/ as Bit-101 is a seasoned Flash veteran.&#xD;&#xA;&#xD;&#xA;Beyond that, there are some more general resources about ECMAScript worth exploring, such as http://jibbering.com/faq/notes/closures/ which will help you understand the language.&#xD;&#xA;&#xD;&#xA;Apart from learning ECMAScript / AS3 you will also need to learn about game development.  This site already offers many suggestions about books and websites to read that are related to the various topics in this field." />
  <row Id="33760" PostHistoryTypeId="2" PostId="14983" RevisionGUID="68cf14e8-6239-47e4-941e-ff89d35de4f8" CreationDate="2011-07-18T13:16:24.637" UserId="8670" Text="Here's one resource where you can find arts for free.&#xD;&#xA;http://opengameart.org/&#xD;&#xA;&#xD;&#xA;If you're looking for effects, then using a particle editor might be better. Most of them come with explosion effect example. And many of them can export the final effect to spritesheet that can be used for 2d games.&#xD;&#xA;TimelineFX : http://www.rigzsoft.co.uk/&#xD;&#xA;" />
  <row Id="33761" PostHistoryTypeId="2" PostId="14984" RevisionGUID="aa65c1a6-5bf3-4eb7-bb32-ac6e5d1dc366" CreationDate="2011-07-18T13:27:18.660" UserId="8670" Text="Re-write the app in Objective-c would be a better choice, if you want performance.&#xD;&#xA;&#xD;&#xA;If you want to port it to Android as well, then you might want to take a look at other solutions such as Corona SDK, Unity or Monkey.&#xD;&#xA;&#xD;&#xA;If you are not comfortable using Objective-C, Corona SDK should be a better choice. The structure is similar to flash display object list, so it should be easier for Flash developer to understand. You also have a choice to deploy it to Android later if you want to." />
  <row Id="33762" PostHistoryTypeId="2" PostId="14985" RevisionGUID="e4539717-f60f-47b8-a154-3152f3097d72" CreationDate="2011-07-18T13:37:02.663" UserId="8307" Text="I have a path that is defined by a concatenation of Catmull-Rom splines. I use the static method Vector2.CatmullRom in XNA that allows for interpolation between points with a value going from 0 to 1. &#xD;&#xA;&#xD;&#xA;Not every spline in this path has the same length. This causes speed differences if I let the weight go at a constant speed for every spline while proceeding along the path. I can remedy this by letting the speed of the weight be dependent on the length of the spline. How can I determine the length of such a spline? Should I just approximate by cutting the spline into 10 straight lines and sum their lengths?&#xD;&#xA;" />
  <row Id="33763" PostHistoryTypeId="1" PostId="14985" RevisionGUID="e4539717-f60f-47b8-a154-3152f3097d72" CreationDate="2011-07-18T13:37:02.663" UserId="8307" Text="Determine length of a Catmull-Rom spline" />
  <row Id="33764" PostHistoryTypeId="3" PostId="14985" RevisionGUID="e4539717-f60f-47b8-a154-3152f3097d72" CreationDate="2011-07-18T13:37:02.663" UserId="8307" Text="&lt;xna&gt;&lt;math&gt;&lt;vector&gt;&lt;splines&gt;" />
  <row Id="33767" PostHistoryTypeId="5" PostId="14985" RevisionGUID="f151b24e-a5bd-4818-9482-c51824898503" CreationDate="2011-07-18T14:13:48.323" UserId="8307" Comment="added 84 characters in body; edited tags" Text="I have a path that is defined by a concatenation of Catmull-Rom splines. I use the static method Vector2.CatmullRom in XNA that allows for interpolation between points with a value going from 0 to 1. &#xD;&#xA;&#xD;&#xA;Not every spline in this path has the same length. This causes speed differences if I let the weight go at a constant speed for every spline while proceeding along the path. I can remedy this by letting the speed of the weight be dependent on the length of the spline. How can I determine the length of such a spline? Should I just approximate by cutting the spline into 10 straight lines and sum their lengths?&#xD;&#xA;&#xD;&#xA;I'm using this for dynamic texture mapping on a generated mesh defined by splines." />
  <row Id="33768" PostHistoryTypeId="6" PostId="14985" RevisionGUID="f151b24e-a5bd-4818-9482-c51824898503" CreationDate="2011-07-18T14:13:48.323" UserId="8307" Comment="added 84 characters in body; edited tags" Text="&lt;xna&gt;&lt;math&gt;&lt;vector&gt;&lt;uvw-mapping&gt;&lt;splines&gt;" />
  <row Id="33769" PostHistoryTypeId="2" PostId="14987" RevisionGUID="3049b687-020c-4712-9524-4a3bafad2173" CreationDate="2011-07-18T14:21:59.650" UserId="3874" Text="I'm making a 2D game and I'm starting to think about graphics. I'm pretty good at 3D modelling, but I'm not very good at drawing / painting. I was wondering if there were settings, or even a renderer that someone could recommend that could achieve the nice painted look found in Aquaria.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33770" PostHistoryTypeId="1" PostId="14987" RevisionGUID="3049b687-020c-4712-9524-4a3bafad2173" CreationDate="2011-07-18T14:21:59.650" UserId="3874" Text="Aquaria-like graphics look in 3Ds Max?" />
  <row Id="33771" PostHistoryTypeId="3" PostId="14987" RevisionGUID="3049b687-020c-4712-9524-4a3bafad2173" CreationDate="2011-07-18T14:21:59.650" UserId="3874" Text="&lt;graphics&gt;&lt;art&gt;" />
  <row Id="33772" PostHistoryTypeId="5" PostId="14874" RevisionGUID="79f45289-c17e-4c72-9e47-77aedb647663" CreationDate="2011-07-18T14:43:31.127" UserId="7888" Comment="Corrected grammar, clarified question in title, formatted methods as code" Text="I'm developing a game for Android using andEngine, and I need to detect collisions only when two objects visually collide (not in blank space of the image). In J2ME, I'm able to do that using `helicopterSprite.collidesWith(buildingSprite, true)`.&#xD;&#xA;&#xD;&#xA;However, andEngine only has `helicopterSprite.collidesWith(buildingSprite)`. What is the equivalent method for andEngine? How do I invoke pixel-level collision?" />
  <row Id="33773" PostHistoryTypeId="4" PostId="14874" RevisionGUID="79f45289-c17e-4c72-9e47-77aedb647663" CreationDate="2011-07-18T14:43:31.127" UserId="7888" Comment="Corrected grammar, clarified question in title, formatted methods as code" Text="How do I detect pixel-level collision using andEngine?" />
  <row Id="33774" PostHistoryTypeId="6" PostId="14874" RevisionGUID="79f45289-c17e-4c72-9e47-77aedb647663" CreationDate="2011-07-18T14:43:31.127" UserId="7888" Comment="Corrected grammar, clarified question in title, formatted methods as code" Text="&lt;collision-detection&gt;&lt;android&gt;&lt;andengine&gt;" />
  <row Id="33775" PostHistoryTypeId="24" PostId="14874" RevisionGUID="79f45289-c17e-4c72-9e47-77aedb647663" CreationDate="2011-07-18T14:43:31.127" Comment="Proposed by 7888 approved by 14 edit id of 564" />
  <row Id="33776" PostHistoryTypeId="5" PostId="14900" RevisionGUID="1c1918a2-80cf-487a-8ae0-3dacd527ada6" CreationDate="2011-07-18T14:43:40.427" UserId="3588" Comment="Was here mostly for the tags, but as they say, when you're handling other stuff... ♪" Text="I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed).&#xD;&#xA;&#xD;&#xA;The problem I'm having is, from one direction to another, the sprite will often turn in wild, unnecessary ways instead of appearing like you might expect a car to appear (turn such that the minimum delta in angle occurs).&#xD;&#xA;&#xD;&#xA;Right now I'm using the following formula to calculate the rotation float for the current velocity:&#xD;&#xA;&#xD;&#xA;    MathHelper.PiOver2 + -Math.Atan2(anotherVector.Y - vector.Y, -(anotherVector.X - vector.X));&#xD;&#xA;&#xD;&#xA;And then I lerp the current rotation by the new rotation by the rotation speed (10f):&#xD;&#xA;&#xD;&#xA;    rotation = MathHelper.Lerp(rotation, targetRotation, 10f * (float)gameTime.ElapsedGameTime.TotalSeconds);&#xD;&#xA;&#xD;&#xA;But unfortunately, it's causing the sprite to spin in wild directions before reaching the correct angle. Any suggestions?" />
  <row Id="33777" PostHistoryTypeId="6" PostId="14900" RevisionGUID="1c1918a2-80cf-487a-8ae0-3dacd527ada6" CreationDate="2011-07-18T14:43:40.427" UserId="3588" Comment="Was here mostly for the tags, but as they say, when you're handling other stuff... ♪" Text="&lt;xna&gt;&lt;c#&gt;&lt;sprites&gt;&lt;rotation&gt;" />
  <row Id="33778" PostHistoryTypeId="24" PostId="14900" RevisionGUID="1c1918a2-80cf-487a-8ae0-3dacd527ada6" CreationDate="2011-07-18T14:43:40.427" Comment="Proposed by 3588 approved by 14 edit id of 566" />
  <row Id="33779" PostHistoryTypeId="5" PostId="14945" RevisionGUID="7d3ceda1-5af7-4e50-ae70-d5e2ae851930" CreationDate="2011-07-18T14:43:42.360" UserId="3588" Comment="A couple relevant tags, removed the salutation, and added some extra linebreaks. ♪" Text="Is anyone aware of any code to procedurally generate star fields?&#xD;&#xA;&#xD;&#xA;Ideally I'd like it to be physics-based so I can have realistic planets and moons.&#xD;&#xA;Best would be in C++, open source, and workable with Ogre3d.&#xD;&#xA;&#xD;&#xA;I'm not afraid of coding something from a university paper if there's nothing available." />
  <row Id="33780" PostHistoryTypeId="4" PostId="14945" RevisionGUID="7d3ceda1-5af7-4e50-ae70-d5e2ae851930" CreationDate="2011-07-18T14:43:42.360" UserId="3588" Comment="A couple relevant tags, removed the salutation, and added some extra linebreaks. ♪" Text="Procedural star field generator" />
  <row Id="33781" PostHistoryTypeId="6" PostId="14945" RevisionGUID="7d3ceda1-5af7-4e50-ae70-d5e2ae851930" CreationDate="2011-07-18T14:43:42.360" UserId="3588" Comment="A couple relevant tags, removed the salutation, and added some extra linebreaks. ♪" Text="&lt;c++&gt;&lt;ogre&gt;&lt;procedural-generation&gt;" />
  <row Id="33782" PostHistoryTypeId="24" PostId="14945" RevisionGUID="7d3ceda1-5af7-4e50-ae70-d5e2ae851930" CreationDate="2011-07-18T14:43:42.360" Comment="Proposed by 3588 approved by 14 edit id of 565" />
  <row Id="33783" PostHistoryTypeId="4" PostId="14839" RevisionGUID="7de64054-6189-4a41-9082-70e3991b05fc" CreationDate="2011-07-18T14:43:57.027" UserId="5864" Comment="fix totally mixed up title" Text="How to form a Concave shape out of Convex shapes?" />
  <row Id="33784" PostHistoryTypeId="24" PostId="14839" RevisionGUID="7de64054-6189-4a41-9082-70e3991b05fc" CreationDate="2011-07-18T14:43:57.027" Comment="Proposed by 5864 approved by 14 edit id of 563" />
  <row Id="33785" PostHistoryTypeId="5" PostId="14987" RevisionGUID="d63e4759-dccf-41c9-98ad-c26123dca445" CreationDate="2011-07-18T14:49:13.750" UserId="1430" Comment="added 2 characters in body; edited title" Text="I'm making a 2D game and I'm starting to think about graphics. I'm pretty good at 3D modelling, but I'm not very good at drawing or painting. I was wondering if there were settings, or even a renderer that someone could recommend that could achieve the nice painted look found in Aquaria.&#xD;&#xA;&#xD;&#xA;Thanks." />
  <row Id="33786" PostHistoryTypeId="4" PostId="14987" RevisionGUID="d63e4759-dccf-41c9-98ad-c26123dca445" CreationDate="2011-07-18T14:49:13.750" UserId="1430" Comment="added 2 characters in body; edited title" Text="Aquaria-like graphics look in 3DS Max?" />
  <row Id="33787" PostHistoryTypeId="6" PostId="14936" RevisionGUID="41b4d52b-0ac7-4a6a-b991-f2d03bbbe66a" CreationDate="2011-07-18T14:49:32.610" UserId="14" Comment="edited tags" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;data-structure&gt;" />
  <row Id="33788" PostHistoryTypeId="2" PostId="14988" RevisionGUID="f188a88c-7fbf-4245-a865-95076c33707e" CreationDate="2011-07-18T15:04:54.530" UserId="1430" Text="What you're looking for is something along the lines of &quot;painterly rendering&quot; or &quot;cel shading,&quot; probably. Both of these are subsets of the space of non-photorealistic rendering techniques. The majority of the information on these rendering techniques can be found in academic papers or books. There doesn't appear to be a wealth of Max plugins that provide NPR effects:&#xD;&#xA;&#xD;&#xA; * [finalToon][1]&#xD;&#xA; * [Pencil+ 2][2] and [Liquid+][3]&#xD;&#xA; * [Illustrate][4]&#xD;&#xA;&#xD;&#xA;You can find more information by searching for &quot;[nonphotorealistic rendering][5],&quot; &quot;[painterly rendering][6],&quot; and &quot;[cel shading][7],&quot; although you're more likely to find academic papers discussing the techniques. There are a [few][8] [threads][9] on various CG forums talking about ways to use Max to do NPR, and Autodesk appears to have a few classes on the subject (behind paywalls, so you'll have to browse their site directly). There's also [this YouTube video of a SIGGRAPH class][10] from 2009 on the subject.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.finaltoon.com/&#xD;&#xA;  [2]: http://www.psoft.co.jp/en/news/pencil/20061206.html&#xD;&#xA;  [3]: http://www.psoft.co.jp/en/product/liquid/index.html&#xD;&#xA;  [4]: http://www.davidgould.com/Illustrate/Products.htm#3dsmaxplugins&#xD;&#xA;  [5]: http://www.google.com/search?q=nonphotorealistic%20rendering&#xD;&#xA;  [6]: http://www.google.com/search?q=painterly%20rendering&#xD;&#xA;  [7]: http://www.google.com/search?q=cel%20shading&#xD;&#xA;  [8]: http://blenderartists.org/forum/showthread.php?42785-2-3dsmax-script-for-NPR&#xD;&#xA;  [9]: http://forums.cgarchitect.com/41141-looking-better-way-make-npr-style-illustrations.html&#xD;&#xA;  [10]: http://www.youtube.com/watch?v=qu16wct5FUI" />
  <row Id="33789" PostHistoryTypeId="6" PostId="14987" RevisionGUID="363563b4-278a-4190-b3ac-457bbc980590" CreationDate="2011-07-18T15:05:12.953" UserId="1430" Comment="edited tags" Text="&lt;graphics&gt;&lt;art&gt;&lt;non-photorealistic&gt;" />
  <row Id="33790" PostHistoryTypeId="5" PostId="14839" RevisionGUID="4e0a0733-ffd6-4b8c-8780-6b852e4550b8" CreationDate="2011-07-18T15:11:29.630" UserId="1430" Comment="edited body; edited title" Text="I'm trying to get around the rule of only being able to form convex shapes in the SFML C++ library. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; To do this I'm planning on testing given vertices, and if concave,&#xD;&#xA;&gt; splitting the vertices into groups, testing each groups' concaveness,&#xD;&#xA;&gt; and repeating until a full set of convex shapes results that look&#xD;&#xA;&gt; just like the original shape when put together&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What I would like to know is...&#xD;&#xA;&#xD;&#xA; - **What the equation for testing a shapes concaveness is: what is it and how does it work?**&#xD;&#xA;&#xD;&#xA; - **How would I split up the vertices of the concave shape so in the end the shape is formed out of as few convex shapes as possible?**&#xD;&#xA;&#xD;&#xA; - **Whats the best practice for achieving my goal?**&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33791" PostHistoryTypeId="4" PostId="14839" RevisionGUID="4e0a0733-ffd6-4b8c-8780-6b852e4550b8" CreationDate="2011-07-18T15:11:29.630" UserId="1430" Comment="edited body; edited title" Text="How to form a concave shape out of convex shapes?" />
  <row Id="33792" PostHistoryTypeId="5" PostId="14979" RevisionGUID="b02f1241-c6a9-4d80-b024-5ba1719dcc07" CreationDate="2011-07-18T15:15:02.187" UserId="1430" Comment="deleted 15 characters in body" Text="I wanted to make Flash games so I bought the book &quot;Flash Games Development with AS3.&quot; I did the 'hello, world' program by trace and addChild (or something like that). But the problem was, instead of understanding what I was writing, I was just copying and pasting those lines of code. I felt it wouldn't work that way, and as the book had asked the learners to know at least some Java/Javascript, C#/C++, I didn't go any further.&#xD;&#xA;&#xD;&#xA;Now, I want to start again (and yes, I still don't know Java or C programming). What would you recommend for me?&#xD;&#xA;&#xD;&#xA;Thanks :)" />
  <row Id="33793" PostHistoryTypeId="4" PostId="14979" RevisionGUID="b02f1241-c6a9-4d80-b024-5ba1719dcc07" CreationDate="2011-07-18T15:15:02.187" UserId="1430" Comment="deleted 15 characters in body" Text="How would you recommend I get started with ActionScript 3?" />
  <row Id="33794" PostHistoryTypeId="5" PostId="14981" RevisionGUID="9e787ee9-81f1-4bf3-8e58-bf8104c2e9b6" CreationDate="2011-07-18T15:17:12.733" UserId="1110" Comment="added 16 characters in body" Text="I'm interested in playing around with 3D on a new Sony 3D television (polarized light rather than red/green/blue anaglyph glasses).  Is this possible with XNA on the current XBox 360?&#xD;&#xA;&#xD;&#xA;Alternatively, It doesn't look like there is a comparatively trivial PS3 dev. solution to XNA right now, hence my interest in XNA and the 360.&#xD;&#xA;&#xD;&#xA;Regards," />
  <row Id="33795" PostHistoryTypeId="25" PostId="14981" RevisionGUID="7883e07e-0e84-450f-a638-e2c02f61cd5b" CreationDate="2011-07-18T15:31:59.957" Comment="http://twitter.com/#!/StackGameDev/status/92979938919055360" />
  <row Id="33796" PostHistoryTypeId="2" PostId="14989" RevisionGUID="982bebf5-b53b-4244-a703-5fda3fa6ad1e" CreationDate="2011-07-18T15:38:50.977" UserId="8362" Text="For me, you really cannot decide until you have other people play test your game. If they find that they are getting the concepts, then you are probably alright. However, if they are having trouble playing you game, then you have a some options:&#xD;&#xA;&#xD;&#xA; - Elongating the learning curve&#xD;&#xA; - Simplifying game mechanics&#xD;&#xA; - Having different difficulty levels&#xD;&#xA;&#xD;&#xA;Remember that the goal is not to make the programmer's life easier, its to produce a quality game for the end user." />
  <row Id="33797" PostHistoryTypeId="5" PostId="14974" RevisionGUID="efb69b91-a957-4688-90e0-127dde42dcfa" CreationDate="2011-07-18T15:48:16.010" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I use a site called rendrosity to get explosions for my 2d game, but this site is geared towards 3d not 2d.&#xD;&#xA;&#xD;&#xA;Where is a good place to get 2d images like explosions that I can buy for my game?" />
  <row Id="33798" PostHistoryTypeId="10" PostId="14974" RevisionGUID="4ba018f9-1f31-427f-abfe-1f33880f74ee" CreationDate="2011-07-18T15:48:15.730" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33799" PostHistoryTypeId="2" PostId="14990" RevisionGUID="ddeded3c-fd83-44fc-a783-cbc50b1936c8" CreationDate="2011-07-18T16:03:17.890" UserId="4410" Text="Check if you can manually set your 3D TV to the type of 3D input it's receiving. A quick look at one Sony 3D TV manual showed it could be manually set to generate the 3D image from either side-by-side or over-under images, where the content for the two eyes are provided in one extra wide or extra tall image.&#xD;&#xA;&#xD;&#xA;It's possible if you can create a frontbuffer of the right size then you can just render two images in this way and set your TV to look for it (seem to recall this might be how Avatar the game did it on the 360). Your content would then potentially be rendered correctly, but the 360 guide or pop-ups that get overlaid by the system would be displayed incorrectly until XNA officially supported 3D." />
  <row Id="33800" PostHistoryTypeId="6" PostId="13252" RevisionGUID="c1c40e20-5ac0-43e5-9d7e-fecb27dabc66" CreationDate="2011-07-18T18:26:35.150" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;android&gt;" />
  <row Id="33801" PostHistoryTypeId="2" PostId="14991" RevisionGUID="04b0c762-3a48-4956-ace2-5804d5956307" CreationDate="2011-07-18T18:28:34.493" UserId="6326" Text="I am currently considering the pros and cons of two different approaches for networking an Android game.&#xD;&#xA;&#xD;&#xA;First, I will specify some details about the game and its requirements, and then I will explain the considered approaches.&#xD;&#xA;&#xD;&#xA;The game is a mobile game currently being developed for Android (but may be a port to iPhone in the future). The game is being built on the Unity3D engine using the Android Basic license, which does not allow direct access to .NET sockets.&#xD;&#xA;&#xD;&#xA;The core functionality of the game consists of basic matchmaking, and the gameplay during a match. Matches are turn based. When another player finalizes his/her turn, each other player will receive the update and will see it rendered. The client will collect the turn from the player and send it off to the server. Nothing too special here.&#xD;&#xA;&#xD;&#xA;The first approach I am considering is a mixture of a REST service and Google's Cloud2Device Messaging. With this, the general flow would be:&#xD;&#xA;&#xD;&#xA;- Collect the turn from the user.&#xD;&#xA;- Send the turn to the server via an HTTP POST to a REST service.&#xD;&#xA;- The server processes the turn and saves the match state, assigning it an &quot;event id.&quot;&#xD;&#xA;- The server uses Cloud2Device messaging to send a notification down to each client. The notification consists of an &quot;event id.&quot;&#xD;&#xA;- Upon receiving the notification from the Google servers, the client will perform a GET to the game server's REST service asking for details for the respective event id.&#xD;&#xA;&#xD;&#xA;Given this approach, I see the pros are:&#xD;&#xA;&#xD;&#xA;- REST services are easy to write (much of my experience is in REST services).&#xD;&#xA;- No custom socket work, as Google's service is used to notify clients.&#xD;&#xA;- Easy to implement within Unity's Android Basic license.&#xD;&#xA;- Cloud2Device Messaging allows an app to be &quot;woken up&quot; if it is not currently running (could be helpful in certain cases, I suppose).&#xD;&#xA;The cons I see are:&#xD;&#xA;&#xD;&#xA;- Networking code is at the mercy of Google's service.&#xD;&#xA;- If Google delivers the &quot;turn start&quot; notification too late, a player may miss his/her turn.&#xD;&#xA;- Porting to the iPhone would require a heavy rework of network management.&#xD;&#xA;- Google likely will begin charging for Cloud2Device Messaging.&#xD;&#xA;	&#xD;&#xA;The alternative approach is to use a workaround to the lack of .NET socket support within Unity Android Basic. This would basically use Android's built-in socket support mixed with some custom-made Unity plugins to allow sending/receiving of network messages. I actually am not even sure that this would work, and I plan on writing a small network demo to test it out, but I am confident it can be achieved.&#xD;&#xA;&#xD;&#xA;The general flow of this approach would be a straight-forward client/server socket approach, where each user playing the game has a connected socket.&#xD;&#xA;&#xD;&#xA;The pros I see for this are:&#xD;&#xA;&#xD;&#xA;- All networking is handled by my services (not Google's).&#xD;&#xA;- Easier porting to other platforms (iPhone, iPad, etc.)&#xD;&#xA;- Potential to show more real-time player actions, rather than receiving all turn data after the turn has been committed.&#xD;&#xA;&#xD;&#xA;The cons I see are:&#xD;&#xA;&#xD;&#xA;- Very little personal experience writing socket servers for games (this point scares me the most right now).&#xD;&#xA;- Debating whether this is necessary or not, as a turn-based game does not exactly need constant socket communication. A REST service may be all I need.&#xD;&#xA;- Constant socket communication may require an unnecessary amount of CPU or network data for a mobile device (or does having a socket open not require many resources expect when transmitting data?).&#xD;&#xA;&#xD;&#xA;My observations and speculations aside, can anybody weigh in on this issue? I do not have much experience when it comes to game networking (especially for mobile) and would much appreciate advice on this issue. Let me know if more details are needed.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33802" PostHistoryTypeId="1" PostId="14991" RevisionGUID="04b0c762-3a48-4956-ace2-5804d5956307" CreationDate="2011-07-18T18:28:34.493" UserId="6326" Text="Client/Server networking for mobile games" />
  <row Id="33803" PostHistoryTypeId="3" PostId="14991" RevisionGUID="04b0c762-3a48-4956-ace2-5804d5956307" CreationDate="2011-07-18T18:28:34.493" UserId="6326" Text="&lt;iphone&gt;&lt;android&gt;&lt;network&gt;&lt;server&gt;&lt;mobile&gt;" />
  <row Id="33804" PostHistoryTypeId="25" PostId="14985" RevisionGUID="980d2a38-48e3-4ee9-bd41-4b9599cbfa53" CreationDate="2011-07-18T18:31:59.690" Comment="http://twitter.com/#!/StackGameDev/status/93025236022341632" />
  <row Id="33805" PostHistoryTypeId="2" PostId="14992" RevisionGUID="ebc3be6e-1021-4bdc-bf99-515ad639fb25" CreationDate="2011-07-18T19:17:02.310" UserId="3830" Text="Unless you really want to have real 3D models, just convert them to 2D images.  You could use an art pipeline something like this...&#xD;&#xA;&#xD;&#xA; 1. Create 3D models of desired objects&#xD;&#xA; 2. Take screenshots (save renders)&#xD;&#xA; 3. Post process via filters and other FX in Photoshop to create desired effect&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33806" PostHistoryTypeId="5" PostId="14991" RevisionGUID="52f51bbf-7e42-4f73-bfa5-75ed8ff4b5e6" CreationDate="2011-07-18T19:57:40.307" UserId="6326" Comment="Formatting update" Text="I am currently considering the pros and cons of two different approaches for networking an Android game.&#xD;&#xA;&#xD;&#xA;First, I will specify some details about the game and its requirements, and then I will explain the considered approaches.&#xD;&#xA;&#xD;&#xA;The game is a mobile game currently being developed for Android (but may be a port to iPhone in the future). The game is being built on the Unity3D engine using the Android Basic license, which does not allow direct access to .NET sockets.&#xD;&#xA;&#xD;&#xA;The core functionality of the game consists of basic matchmaking, and the gameplay during a match. Matches are turn based. When another player finalizes his/her turn, each other player will receive the update and will see it rendered. The client will collect the turn from the player and send it off to the server. Nothing too special here.&#xD;&#xA;&#xD;&#xA;The first approach I am considering is a mixture of a REST service and Google's Cloud2Device Messaging. With this, the general flow would be:&#xD;&#xA;&#xD;&#xA;- Collect the turn from the user.&#xD;&#xA;- Send the turn to the server via an HTTP POST to a REST service.&#xD;&#xA;- The server processes the turn and saves the match state, assigning it an &quot;event id.&quot;&#xD;&#xA;- The server uses Cloud2Device messaging to send a notification down to each client. The notification consists of an &quot;event id.&quot;&#xD;&#xA;- Upon receiving the notification from the Google servers, the client will perform a GET to the game server's REST service asking for details for the respective event id.&#xD;&#xA;&#xD;&#xA;Given this approach, the pros I see are:&#xD;&#xA;&#xD;&#xA;- REST services are easy to write (much of my experience is in REST services).&#xD;&#xA;- No custom socket work, as Google's service is used to notify clients.&#xD;&#xA;- Easy to implement within Unity's Android Basic license.&#xD;&#xA;- Cloud2Device Messaging allows an app to be &quot;woken up&quot; if it is not currently running (could be helpful in certain cases, I suppose).&#xD;&#xA;&#xD;&#xA;The cons I see are:&#xD;&#xA;&#xD;&#xA;- Networking code is at the mercy of Google's service.&#xD;&#xA;- If Google delivers the &quot;turn start&quot; notification too late, a player may miss his/her turn.&#xD;&#xA;- Porting to the iPhone would require a heavy rework of network management.&#xD;&#xA;- Google likely will begin charging for Cloud2Device Messaging.&#xD;&#xA;	&#xD;&#xA;The alternative approach is to use a workaround to the lack of .NET socket support within Unity Android Basic. This would basically use Android's built-in socket support mixed with some custom-made Unity plugins to allow sending/receiving of network messages. I actually am not even sure that this would work, and I plan on writing a small network demo to test it out, but I am confident it can be achieved.&#xD;&#xA;&#xD;&#xA;The general flow of this approach would be a straight-forward client/server socket approach, where each user playing the game has a connected socket.&#xD;&#xA;&#xD;&#xA;The pros I see for this are:&#xD;&#xA;&#xD;&#xA;- All networking is handled by my services (not Google's).&#xD;&#xA;- Easier porting to other platforms (iPhone, iPad, etc.)&#xD;&#xA;- Potential to show more real-time player actions, rather than receiving all turn data after the turn has been committed.&#xD;&#xA;&#xD;&#xA;The cons I see are:&#xD;&#xA;&#xD;&#xA;- Very little personal experience writing socket servers for games (this point scares me the most right now).&#xD;&#xA;- Debating whether this is necessary or not, as a turn-based game does not exactly need constant socket communication. A REST service may be all I need.&#xD;&#xA;- Constant socket communication may require an unnecessary amount of CPU or network data for a mobile device (or does having a socket open not require many resources expect when transmitting data?).&#xD;&#xA;&#xD;&#xA;My observations and speculations aside, can anybody weigh in on this issue? I do not have much experience when it comes to game networking (especially for mobile) and would much appreciate advice on this issue. Let me know if more details are needed.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33807" PostHistoryTypeId="2" PostId="14993" RevisionGUID="4cbfb2ce-1fda-4cbc-8228-8157670cf78a" CreationDate="2011-07-18T20:02:12.490" UserId="5014" Text="I am considering making a game like Master of Orion but I don't know how to start with turn-based systems. If any of you played this game they know what I mean, same system is used in Civilization.&#xD;&#xA;1. You give orders to your units and production queues&#xD;&#xA;2. Click End Turn.&#xD;&#xA;3. Everything moves, go to 1.&#xD;&#xA;&#xD;&#xA;I know that some form of state machine is used, but maybe you could point me into some book or manual on the matter.&#xD;&#xA;" />
  <row Id="33808" PostHistoryTypeId="1" PostId="14993" RevisionGUID="4cbfb2ce-1fda-4cbc-8228-8157670cf78a" CreationDate="2011-07-18T20:02:12.490" UserId="5014" Text="How to design and implement turn-based system?" />
  <row Id="33809" PostHistoryTypeId="3" PostId="14993" RevisionGUID="4cbfb2ce-1fda-4cbc-8228-8157670cf78a" CreationDate="2011-07-18T20:02:12.490" UserId="5014" Text="&lt;turn-based-strategy&gt;" />
  <row Id="33813" PostHistoryTypeId="2" PostId="14994" RevisionGUID="3fd00267-a689-4e3e-9f96-7ca28cd0044a" CreationDate="2011-07-18T20:29:02.287" UserId="323" Text="It's worth pointing out that there are really two kinds of &quot;turn-based&quot; systems. There's the true turn-based system, and there's the immediate-mode hybrid.&#xD;&#xA;&#xD;&#xA;In a true turn-based system, you come up with a set of orders, but nothing actually *happens* until you push the &quot;end turn&quot; button. There's no combat, there's no production, there's just you laying out orders for what you think should happen during that turn. For examples, look at the PC game Dominions III, and the classic board game Diplomacy. In games like this you never have to ask questions like &quot;which unit should attack first this turn&quot; because there is no &quot;attack first&quot; concept - everything occurs simultaneously. This is also the genre that's amenable to play-by-email. Every player makes their orders, every player hits &quot;go&quot;, every player looks at the new turn with dismay as their entire plan collapses due to everyone else interfering.&#xD;&#xA;&#xD;&#xA;In the weird hybrid mode, generally unit movements and combat happen &quot;immediately&quot;. Generally you can buy units, and that also happens immediately. You can say things like &quot;I'll attack this force, and if I lose, I'll buy reinforcements before the next turn&quot;. Eventually you run out of action points and you have to hit end-turn, at which point it does end-of-turn effects like healing, resource gathering, and also lets other players take their turn. This is often known as &quot;hot-seat play&quot; because each person can do their turn in a row, but has to sit there waiting for the other players.&#xD;&#xA;&#xD;&#xA;In the first case, it's pretty simple. Each unit, building, and city keeps information about what its next move is. When you hit end turn everyone carries out their orders - you just run the simulation, in whatever manner your simulation requires to run.&#xD;&#xA;&#xD;&#xA;In the second case it's also pretty simple. Some units (generally buildings) have orders, but most units just do what you say, immediately, often with a pretty little animation. You'll need to keep track of when they have to stop doing things.&#xD;&#xA;&#xD;&#xA;If you want more than that, you'll have to tell us what you're having trouble with. :)" />
  <row Id="33815" PostHistoryTypeId="5" PostId="14958" RevisionGUID="4d3ad173-3328-4a9c-92f4-1c4a61f81761" CreationDate="2011-07-18T20:56:23.970" UserId="7548" Comment="added 11 characters in body" Text="**A _possibly_ safe approach...**&#xD;&#xA;&#xD;&#xA;I suggest something along the lines of what is known as &quot;paper dolling&quot; in the MMORPG arena where your players can select the colours of the uniforms (and provide them with RGB knobs so they can get the exact colour they want), broken down to:&#xD;&#xA;&#xD;&#xA;* Shirt colour&#xD;&#xA;   * Background (the cloth colour)&#xD;&#xA;   * Foreground (the player number)&#xD;&#xA;* Short colour&#xD;&#xA;* Sock colours (left and right could be different colours)&#xD;&#xA;* Shoe colours (black, brown, grey, and white should be enough selection for this part)&#xD;&#xA;&#xD;&#xA;Also, start out with a randomly selected colour combination (and indicate that it was randomly selected), then provide the player with an option to randomly select a colour for each item (right next to all the RGB knobs).&#xD;&#xA;&#xD;&#xA;I believe this solution will provide you with the most unbiased approach possible, without violating any specific colour schemes (getting feedback from a properly qualified lawyer would be wise here though anyway), but also without limiting your players from selecting the colours of their favourite teams.&#xD;&#xA;&#xD;&#xA;You could even provide them with an option to supply art to use as a logo, and then you wouldn't be providing the logos.  Your game's user interface could even remember the 25 most recent paths to logo files (along with the colours) that players used so they can easily re-create their teams the next time they play.&#xD;&#xA;&#xD;&#xA;**Dealing with logos...**&#xD;&#xA;&#xD;&#xA;If you wish to place a particular logo on the shirts, then you'll definitely need to get permission from whoever owns the trademarks before including them with your game.&#xD;&#xA;&#xD;&#xA;If you're good at writing letters, draft up a friendly one on your own first and then have a lawyer with experience in Intellectual Property to review it before you send it (don't be surprised if you are expected to pay royalties, as it is important not to lose the perspective that sports teams are businesses that provide a product in the ever-so-popular &quot;entertainment&quot; category).&#xD;&#xA;&#xD;&#xA;Any correspondence you have with owners of the logos, for which it is safe to assume that they're all Registered Trademarks, should be done with the assistance of a properly qualified lawyer.&#xD;&#xA;" />
  <row Id="33816" PostHistoryTypeId="25" PostId="14993" RevisionGUID="200dce7b-f66e-40b1-823f-0ed688c6b3b8" CreationDate="2011-07-18T21:32:00.003" Comment="http://twitter.com/#!/StackGameDev/status/93070535122100224" />
  <row Id="33817" PostHistoryTypeId="2" PostId="14995" RevisionGUID="e0804ef2-9461-4cc0-9ce6-fbd07886ca55" CreationDate="2011-07-18T21:40:47.520" UserId="2061" Text="It sounds like you want to keep the speed of the object at some constant value over the entire curve - knowing the arc-length won't help you do this.  It will help you calculate at what time the object would reach its end-point *if* it were going at that speed, so it will be better than what you have now (the object will have the same average speed between all points), but the actual speed of the object will still vary as it moves around the curve.&#xD;&#xA;&#xD;&#xA;A better solution would be to change our parametric parameter *(the parameter that goes from 0 to 1, which I'll call `s` to avoid confusion with `t = time`)* at a variable-rate `ds/dt`, which is determined by what speed you want the object to be moving at that point on the curve.  So in other words, instead of changing `s` by 0.01 each frame, we might change it by 0.005 one frame, 0.02 the next, etc.&#xD;&#xA;&#xD;&#xA;We do this by calculating the derivatives of our equations for `x` (`dx/ds`)and `y` (`dy/ds`) *(which only needs to be done once, while writing the program)*, then setting `ds/dt = speed / sqrt( (dx/ds)^2 + (dy/ds)^2 )` - that is, by taking the speed we want to go, and dividing by the speed we'd actually be going if we were changing `s` at a fixed increment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##Proof##&#xD;&#xA;&#xD;&#xA;We want the speed of our object to be constant; let's give that constant the name `speed`.&#xD;&#xA;&#xD;&#xA;We learn in second-year calculus that, for parametric equations `x(s)` and `y(s)`, `speed = sqrt( (dx/dt)^2 + (dy/dt)^2)`.  &#xD;&#xA;We also learn that `dx/dt = dx/ds * ds/dt` (chain rule).  &#xD;&#xA;Thus, `speed = sqrt( (dx/ds)^2 (ds/dt)^2 + (dy/ds)^2 (ds/dt)^2 )`&#xD;&#xA;&#xD;&#xA;Solving for `ds/dt`, we get the stated equation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I've never worked with those particular splines, but I understand they just give `x(s)` and `y(s)` in terms of cubic-equations of `s`.  Thus, we can find the derivative `dx/ds` easily:  if&#xD;&#xA;&#xD;&#xA;    x(s) = a*s^3 + b*s^2 + c*s + e&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    dx/ds = 3*a*s^2 + 2*b*s + c&#xD;&#xA;&#xD;&#xA;Of course, you'll need to know the exact values of `a`, `b`, `c`, and `e` to do this.  According this [this page][1], those values are always constant.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Finally, to answer the question in the title:  finding the arc-length of a parametric equation involves solving a [fairly complicated definite integral][2]; even for the simple case of a cubic-equation, it can't be done for the general case.&#xD;&#xA;&#xD;&#xA;Thus, you'll have to [estimate the integral numerically][3].  *&quot;Cutting the spline into 10 straight lines and summing their lengths&quot;* as you suggest is [one very simple way of doing this][4]; however, there are [slightly more complicated methods][5] that will give you much more accurate results using fewer line-segments.&#xD;&#xA;&#xD;&#xA;[1]: http://www.mvps.org/directx/articles/catmull/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Arc_length#Finding_arc_lengths_by_integrating&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Numerical_integration&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Trapezoidal_rule&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature" />
  <row Id="33819" PostHistoryTypeId="5" PostId="14995" RevisionGUID="079ae067-9716-41f5-9395-044c3dd39984" CreationDate="2011-07-18T21:49:28.083" UserId="2061" Comment="added 116 characters in body" Text="It sounds like you want to keep the speed of the object at some constant value over the entire curve - knowing the arc-length won't help you do this.  It will help you calculate at what time the object would reach its end-point *if* it were going at that speed, so it will be better than what you have now (the object will have the same average speed between all points), but the actual speed of the object will still vary as it moves around the curve.&#xD;&#xA;&#xD;&#xA;A better solution would be to change our parametric parameter *(the parameter that goes from 0 to 1, which I'll call `s` to avoid confusion with `t = time`)* at a variable-rate `ds/dt`, which is determined by what speed you want the object to be moving at that point on the curve.  So in other words, instead of changing `s` by 0.01 each frame, we might change it by 0.005 one frame, 0.02 the next, etc.&#xD;&#xA;&#xD;&#xA;We do this by calculating the derivatives of our equations for `x` (`dx/ds`)and `y` (`dy/ds`), then setting `ds/dt = speed / sqrt( (dx/ds)^2 + (dy/ds)^2 )` - that is, by taking the speed we want to go, and dividing by the speed we'd actually be going if we were changing `s` at a fixed increment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##Proof##&#xD;&#xA;&#xD;&#xA;We want the speed of our object to be constant; let's give that constant the name `speed`.&#xD;&#xA;&#xD;&#xA;We learn in second-year calculus that, for parametric equations `x(s)` and `y(s)`,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/dt)&lt;sup&gt;2&lt;/sup&gt;)&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;We also learn that&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;dx/dt = dx/ds * ds/dt &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;(chain rule)&lt;/em&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Thus,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Solving for `ds/dt`, we get the stated equation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I've never worked with those particular splines, but I understand they just give `x(s)` and `y(s)` in terms of cubic-equations of `s`.  Thus, we can find the derivative `dx/ds` easily:  if&#xD;&#xA;&#xD;&#xA;    x(s) = a*s^3 + b*s^2 + c*s + e&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    dx/ds = 3*a*s^2 + 2*b*s + c&#xD;&#xA;&#xD;&#xA;Of course, you'll need to know the exact values of `a`, `b`, and `c` to do this.  According this [this page][1], those values are always constant.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Finally, to answer the question in the title:  finding the arc-length equation of a parametric function involves solving a [fairly complicated definite integral][2]; even for the simple case of a cubic-equation, it can't be done for the general case.&#xD;&#xA;&#xD;&#xA;Thus, you'll have to [estimate the integral numerically][3].  *&quot;Cutting the spline into 10 straight lines and summing their lengths&quot;* as you suggest is [one very simple way of doing this][4]; however, there are [slightly more complicated methods][5] that will give you much more accurate results using fewer line-segments.&#xD;&#xA;&#xD;&#xA;[1]: http://www.mvps.org/directx/articles/catmull/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Arc_length#Finding_arc_lengths_by_integrating&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Numerical_integration&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Trapezoidal_rule&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature" />
  <row Id="33820" PostHistoryTypeId="5" PostId="14995" RevisionGUID="c2afa260-b5bb-438a-a72b-1078f994e342" CreationDate="2011-07-18T21:54:33.153" UserId="2061" Comment="added 116 characters in body" Text="It sounds like you want to keep the speed of the object at some constant value over the entire curve - knowing the arc-length won't help you do this.  It will help you calculate at what time the object would reach its end-point *if* it were going at that speed, so it will be better than what you have now (the object will have the same average speed between all points), but the actual speed of the object will still vary as it moves around the curve.&#xD;&#xA;&#xD;&#xA;A better solution would be to change our parametric parameter *(the parameter that goes from 0 to 1, which I'll call `s` to avoid confusion with `t = time`)* at a variable-rate `ds/dt`, which is determined by what speed you want the object to be moving at that point on the curve.  So in other words, instead of changing `s` by 0.01 each frame, we might change it by 0.005 one frame, 0.02 the next, etc.&#xD;&#xA;&#xD;&#xA;We do this by calculating the derivatives of `x` (`dx/ds`) and `y` (`dy/ds`), then setting &#xD;&#xA;&lt;pre&gt;ds/dt = speed / sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;That is, by taking the speed we want to go, and dividing by the speed we'd actually be going if we were changing `s` at a fixed increment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##Proof##&#xD;&#xA;&#xD;&#xA;We want the speed of our object to be constant; let's give that constant the name `speed`.&#xD;&#xA;&#xD;&#xA;We learn in second-year calculus that, for parametric equations `x(s)` and `y(s)`,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/dt)&lt;sup&gt;2&lt;/sup&gt;)&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;We also learn that&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;dx/dt = dx/ds * ds/dt &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;(chain rule)&lt;/em&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Thus,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Solving for `ds/dt`, we get the stated equation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;###Calculating the derivatives###&#xD;&#xA;&#xD;&#xA;I've never worked with those particular splines, but I understand they just give `x(s)` and `y(s)` in terms of cubic-equations of `s`.  Thus, we can find the derivative `dx/ds` easily:  if&#xD;&#xA;&#xD;&#xA;    x(s) = a*s^3 + b*s^2 + c*s + e&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    dx/ds = 3*a*s^2 + 2*b*s + c&#xD;&#xA;&#xD;&#xA;*(Same for `dy/ds`)* Of course, you'll need to know the exact values of `a`, `b`, and `c` to do this.  According this [this page][1], those values are always constant.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Finally, to answer the question in the title:  finding the arc-length equation of a parametric function involves solving a [fairly complicated definite integral][2]; even for the simple case of a cubic-equation, it can't be done for the general case.&#xD;&#xA;&#xD;&#xA;Thus, you'll have to [estimate the integral numerically][3].  *&quot;Cutting the spline into 10 straight lines and summing their lengths&quot;* as you suggest is [one very simple way of doing this][4]; however, there are [slightly more complicated methods][5] that will give you much more accurate results using fewer line-segments.&#xD;&#xA;&#xD;&#xA;[1]: http://www.mvps.org/directx/articles/catmull/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Arc_length#Finding_arc_lengths_by_integrating&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Numerical_integration&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Trapezoidal_rule&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature" />
  <row Id="33821" PostHistoryTypeId="5" PostId="14995" RevisionGUID="5ab2d3bf-ee06-429c-99b0-ef3665264a22" CreationDate="2011-07-18T22:00:06.083" UserId="2061" Comment="added 11 characters in body" Text="It sounds like you want to keep the speed of the object at some constant value over the entire curve - knowing the arc-length won't help you do this.  It will help you calculate at what time the object would reach its end-point *if* it were going at that speed, so it will be better than what you have now (the object will have the same average speed between all points), but the actual speed of the object will still vary as it moves around the curve.&#xD;&#xA;&#xD;&#xA;A better solution would be to change our parametric parameter *(the parameter that goes from 0 to 1, which I'll call `s` to avoid confusion with `t = time`)* at a variable-rate `ds/dt`, which is determined by what speed you want the object to be moving at that point on the curve.  So in other words, instead of changing `s` by 0.01 each frame, we might change it by 0.005 one frame, 0.02 the next, etc.&#xD;&#xA;&#xD;&#xA;We do this by calculating the derivatives of `x` (`dx/ds`) and `y` (`dy/ds`) each frame, then setting &#xD;&#xA;&lt;pre&gt;ds/dt = speed / sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;That is, by taking the speed we want to go, and dividing by the speed we'd actually be going if we were changing `s` at a fixed increment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##Proof##&#xD;&#xA;&#xD;&#xA;We want the speed of our object to be constant; let's give that constant the name `speed`.&#xD;&#xA;&#xD;&#xA;We learn in second-year calculus that, for parametric equations `x(s)` and `y(s)`,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/dt)&lt;sup&gt;2&lt;/sup&gt;)&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;We also learn that&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;dx/dt = dx/ds * ds/dt &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;(chain rule)&lt;/em&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Thus,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Solving for `ds/dt`, we get the stated equation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;###Calculating the derivatives###&#xD;&#xA;&#xD;&#xA;I've never worked with those particular splines, but I understand they just give `x(s)` and `y(s)` in terms of cubic-equations of `s`.  Thus, we can find the derivative `dx/ds` easily:  if&#xD;&#xA;&#xD;&#xA;    x(s) = a*s^3 + b*s^2 + c*s + e&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    dx/ds = 3*a*s^2 + 2*b*s + c&#xD;&#xA;&#xD;&#xA;*(Same for `dy/ds`)* Of course, you'll need to know the exact values of `a`, `b`, and `c` to do this.  According this [this page][1], those values are always constant.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Finally, to answer the question in the title:  finding the arc-length equation of a parametric function involves solving a [fairly complicated definite integral][2]; even for the simple case of a cubic-equation, it can't be done for the general case.&#xD;&#xA;&#xD;&#xA;Thus, you'll have to [estimate the integral numerically][3].  *&quot;Cutting the spline into 10 straight lines and summing their lengths&quot;* as you suggest is [one very simple way of doing this][4]; however, there are [slightly more complicated methods][5] that will give you much more accurate results using fewer line-segments.&#xD;&#xA;&#xD;&#xA;[1]: http://www.mvps.org/directx/articles/catmull/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Arc_length#Finding_arc_lengths_by_integrating&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Numerical_integration&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Trapezoidal_rule&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature" />
  <row Id="33822" PostHistoryTypeId="2" PostId="14997" RevisionGUID="e3a3f73f-4e7a-4ff0-8f25-3d7b8caf6567" CreationDate="2011-07-18T22:41:24.803" UserId="8285" Text="Try out the Corona SDK. You can publish to both Android and iPhone and it's much cheaper. Plus you can try it for free for as long as you want (you have to pay to publish to the stores App Store/Android Market).&#xD;&#xA;" />
  <row Id="33823" PostHistoryTypeId="2" PostId="14998" RevisionGUID="1f991929-bf2f-4860-84bf-158dd4419a43" CreationDate="2011-07-18T22:57:39.543" UserId="3874" Text="I'm trying to design my game to be component based rather than overly hierarchical. Essentially, every high level object in the game (like gun, or whatever) inherits and implements the interfaces that it needs. For example, IPhysics, IRenderable, IMessagable.&#xD;&#xA;&#xD;&#xA;Say that the player collides with the gun. The Physics Engine will only return an IPhysics pointer. Therefore, say I want to later send the gun a FIRE_WEAPON message or even a more generic DO_ACTION message, how can I if I only have a pointer to the physics component of the object? How is this usually solved?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33824" PostHistoryTypeId="1" PostId="14998" RevisionGUID="1f991929-bf2f-4860-84bf-158dd4419a43" CreationDate="2011-07-18T22:57:39.543" UserId="3874" Text="Sending messages with a component based design?" />
  <row Id="33825" PostHistoryTypeId="3" PostId="14998" RevisionGUID="1f991929-bf2f-4860-84bf-158dd4419a43" CreationDate="2011-07-18T22:57:39.543" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;architecture&gt;" />
  <row Id="33826" PostHistoryTypeId="2" PostId="14999" RevisionGUID="4072491b-d8a8-465f-b4b4-80af06e0d094" CreationDate="2011-07-18T23:07:58.917" UserId="4443" Text="I am not sure how your game is set up but the message for my games would not go to the gun itself. They would instead go to the player. The player would have the information within it to know which gun it had was the 'active' gun and then call .Fire() on it.. Or in the more generic terms the player would know which object was currently equipped and then call DoAction on it.. and it being a gun, would fire and such.&#xD;&#xA;&#xD;&#xA;If this was meant to be a generic message as to how you go from one component of an object to another component when sending a message I would look for a generic messaging system instead of a specific one. Where the object itself could register to receive the message to the appropriate component. There is usually something (an ID) that ties different components of the same objects together.. so the IPhysics.Touched() of the Gun would look for its IMessageable component and from there Register for the message. (again, this is just a rough description to try and get the point across :))&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="33827" PostHistoryTypeId="5" PostId="14998" RevisionGUID="2416973e-5873-4e98-8dbc-9b796615ac25" CreationDate="2011-07-18T23:47:17.977" UserId="3874" Comment="added 667 characters in body; edited title" Text="I'm trying to design my game to be component based rather than overly hierarchical. Essentially, every high level object in the game (like gun, or whatever) inherits and implements the interfaces that it needs. For example, IPhysics, IRenderable, IWeapon, etc.&#xD;&#xA;&#xD;&#xA;There are a few cases where I'm uncertain how to obtain a specific interface from another.&#xD;&#xA;&#xD;&#xA;For example. A Gun might inherit from IWeapon, IPhysics, and IRenderable. I then also have a player which inherits from IPlayer, IPhysics, and IRenderable. I need a way so that, when Player and Gun collide, if Player is not currently wielding a weapon, he should be able to wield the gun and hold a pointer to the IWeapon of the Gun.&#xD;&#xA;&#xD;&#xA;Right now, when Box2D detects a collision between 2 fixtures, I use the UserData field to store the IPhysics pointer associated with the fixture, and therefore, the IPhysics.beginContact method is invoked.&#xD;&#xA;&#xD;&#xA; From here, the Player needs to somehow be able to know that this is a weapon, and obtain an IWeapon* . This is the part I really have no idea on.&#xD;&#xA;&#xD;&#xA;Any advice on solving something like this is appreciated, even if it means some kind of design change on my part. I'm just looking for a clear way on how to solve this sort of problem.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="33828" PostHistoryTypeId="4" PostId="14998" RevisionGUID="2416973e-5873-4e98-8dbc-9b796615ac25" CreationDate="2011-07-18T23:47:17.977" UserId="3874" Comment="added 667 characters in body; edited title" Text="Obtaining a certain type of object with component based design" />
  <row Id="33829" PostHistoryTypeId="2" PostId="15000" RevisionGUID="db3f91ff-7382-4040-8372-d04d630b9098" CreationDate="2011-07-19T00:40:57.370" UserId="1910" Text="I've been looking and looking and looking, and I cannot seem to find a solution out there for making a game that uses cocos2d and [Tiled][1] to make an isometric map that supports elevation. &#xD;&#xA;&#xD;&#xA;I am not looking for anything super complex...&#xD;&#xA;&#xD;&#xA;Just maybe 2 or 3 levels of elevation. (Think X-Com UFO Defense, or Final Fantasy Tactics)&#xD;&#xA;&#xD;&#xA;I figure that since I've been unable to find a solution, I'll probably have to extend Tiled or something to support this.&#xD;&#xA;&#xD;&#xA;For now I'll just stick with level of elevation, but I want to extend the game to support elevation eventually.&#xD;&#xA;&#xD;&#xA;**Will you share with me any good resources that you know? Where should I read to better understand how to accomplish such a thing?**&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/" />
  <row Id="33830" PostHistoryTypeId="1" PostId="15000" RevisionGUID="db3f91ff-7382-4040-8372-d04d630b9098" CreationDate="2011-07-19T00:40:57.370" UserId="1910" Text="How to extend Tiled and Cocos2d to create an Isometric map that support elevation" />
  <row Id="33831" PostHistoryTypeId="3" PostId="15000" RevisionGUID="db3f91ff-7382-4040-8372-d04d630b9098" CreationDate="2011-07-19T00:40:57.370" UserId="1910" Text="&lt;cocos2d-iphone&gt;&lt;isometric&gt;&lt;tilemap&gt;" />
  <row Id="33832" PostHistoryTypeId="4" PostId="15000" RevisionGUID="dea08074-71a6-4467-9f4d-d0fb444c7a3d" CreationDate="2011-07-19T03:08:44.537" UserId="1910" Comment="fixed grammar" Text="How to extend Tiled and Cocos2d to create an Isometric map that supports elevation" />
  <row Id="33833" PostHistoryTypeId="2" PostId="15001" RevisionGUID="8bd0402d-fddb-41c8-bc96-3c68af14d5d3" CreationDate="2011-07-19T03:11:20.347" UserId="3990" Text="If all your objects implement interfaces (Rather than being a set of components), all you have to do to get the IWeapon from the IPhysics is cast it. In C++, a dynamic cast will return null if the object doesn't inherit from IWeapon. In C#, 'as' will return null if the object doesn't implement IWeapon. Your mileage will vary in other languages.&#xD;&#xA;&#xD;&#xA;But I wouldn't call this method of creating game objects a component-based system." />
  <row Id="33834" PostHistoryTypeId="5" PostId="14576" RevisionGUID="8368fc93-4d0e-4554-8a6b-5512014b6d02" CreationDate="2011-07-19T03:20:24.027" UserId="8454" Comment="added 269 characters in body" Text="I'm creating an Android game and I want everyone who plays it -- no matter the size or shape of their screen -- to see the same 480x800 playfield but, depending on the actual resolution of their screen, scaled to fit their screen while maintaining the correct aspect ratio using letterboxing or black bars on the edges of the screen to fill in the gaps on the sides/top/bottom.&#xD;&#xA;&#xD;&#xA;I'm using Canvas to develop my game but I don't know where to start, or have any idea of best practices for accomplishing this. Could someone enlighten me?&#xD;&#xA;&#xD;&#xA;UPDATE: What I had in mind was using different image resources from hdpi/ldpi/mdpi resource folders and drawing them so bigger screens are restricted to the aspect ratio still but will be higher resolution. So drawing to a 480x800 bitmap won't work in my situation." />
  <row Id="33835" PostHistoryTypeId="4" PostId="14985" RevisionGUID="3539ae1f-a821-43ea-b92b-1b65fc97aadb" CreationDate="2011-07-19T03:28:07.947" UserId="2061" Comment="Changed to use more standard terminology, to help future googlers" Text="Determine arc-length of a Catmull-Rom spline" />
  <row Id="33836" PostHistoryTypeId="24" PostId="14985" RevisionGUID="3539ae1f-a821-43ea-b92b-1b65fc97aadb" CreationDate="2011-07-19T03:28:07.947" Comment="Proposed by 2061 approved by 14 edit id of 567" />
  <row Id="33837" PostHistoryTypeId="25" PostId="14991" RevisionGUID="77cd1730-4306-4162-b6b8-ab17738d86ac" CreationDate="2011-07-19T03:32:01.687" Comment="http://twitter.com/#!/StackGameDev" />
  <row Id="33838" PostHistoryTypeId="5" PostId="14999" RevisionGUID="d7e9737b-68a9-4539-9224-78e45eff190b" CreationDate="2011-07-19T03:40:56.970" UserId="4443" Comment="Updated the answer to match the question." Text="Updated to the new specifics of the question&#xD;&#xA;&#xD;&#xA;&gt; For example. A Gun might inherit from IWeapon, IPhysics, and IRenderable.&#xD;&#xA;&#xD;&#xA;This is not a component system. This is not to say its not a bad system, but in this case you should be able to cast the pointer to any of the interfaces (or just cast it to a Gun object and it should Contain the interfaces) and then use it as appropriate.&#xD;&#xA;&#xD;&#xA;As for determining what kind of object it is that the player has collided with, you can attempt to use the internal RTTI abilities like dynamic_cast&lt;&gt;() or potentially implement your own RTTI (Run Time Type Information) system and add in an IType object to query if an object is of a specific type or to return the type that it is, etc. Once you validate the type you can safely cast it as desired.&#xD;&#xA;&#xD;&#xA;If you do have a component system and we are just not meshing on nomenclature, then just leave me a comment and explain how the components are related to each other. Often this is done by an ID of the object they are a part of.&#xD;&#xA;&#xD;&#xA;Hope this Helps" />
  <row Id="33839" PostHistoryTypeId="5" PostId="14991" RevisionGUID="467b17c0-b5f4-4fdc-8f74-419bbc43fcbe" CreationDate="2011-07-19T04:09:43.213" UserId="6326" Comment="Removing section of option #2 that mentioned it may not be possible (demo has been created showing it is possible)" Text="I am currently considering the pros and cons of two different approaches for networking an Android game.&#xD;&#xA;&#xD;&#xA;First, I will specify some details about the game and its requirements, and then I will explain the considered approaches.&#xD;&#xA;&#xD;&#xA;The game is a mobile game currently being developed for Android (but may be a port to iPhone in the future). The game is being built on the Unity3D engine using the Android Basic license, which does not allow direct access to .NET sockets.&#xD;&#xA;&#xD;&#xA;The core functionality of the game consists of basic matchmaking, and the gameplay during a match. Matches are turn based. When another player finalizes his/her turn, each other player will receive the update and will see it rendered. The client will collect the turn from the player and send it off to the server. Nothing too special here.&#xD;&#xA;&#xD;&#xA;The first approach I am considering is a mixture of a REST service and Google's Cloud2Device Messaging. With this, the general flow would be:&#xD;&#xA;&#xD;&#xA;- Collect the turn from the user.&#xD;&#xA;- Send the turn to the server via an HTTP POST to a REST service.&#xD;&#xA;- The server processes the turn and saves the match state, assigning it an &quot;event id.&quot;&#xD;&#xA;- The server uses Cloud2Device messaging to send a notification down to each client. The notification consists of an &quot;event id.&quot;&#xD;&#xA;- Upon receiving the notification from the Google servers, the client will perform a GET to the game server's REST service asking for details for the respective event id.&#xD;&#xA;&#xD;&#xA;Given this approach, the pros I see are:&#xD;&#xA;&#xD;&#xA;- REST services are easy to write (much of my experience is in REST services).&#xD;&#xA;- No custom socket work, as Google's service is used to notify clients.&#xD;&#xA;- Easy to implement within Unity's Android Basic license.&#xD;&#xA;- Cloud2Device Messaging allows an app to be &quot;woken up&quot; if it is not currently running (could be helpful in certain cases, I suppose).&#xD;&#xA;&#xD;&#xA;The cons I see are:&#xD;&#xA;&#xD;&#xA;- Networking code is at the mercy of Google's service.&#xD;&#xA;- If Google delivers the &quot;turn start&quot; notification too late, a player may miss his/her turn.&#xD;&#xA;- Porting to the iPhone would require a heavy rework of network management.&#xD;&#xA;- Google likely will begin charging for Cloud2Device Messaging.&#xD;&#xA;	&#xD;&#xA;The alternative approach is to use a workaround to the lack of .NET socket support within Unity Android Basic. This would basically use Android's built-in socket support mixed with some custom-made Unity plugins to allow sending/receiving of network messages.&#xD;&#xA;&#xD;&#xA;The general flow of this approach would be a straight-forward client/server socket approach, where each user playing the game has a connected socket.&#xD;&#xA;&#xD;&#xA;The pros I see for this are:&#xD;&#xA;&#xD;&#xA;- All networking is handled by my services (not Google's).&#xD;&#xA;- Easier porting to other platforms (iPhone, iPad, etc.)&#xD;&#xA;- Potential to show more real-time player actions, rather than receiving all turn data after the turn has been committed.&#xD;&#xA;&#xD;&#xA;The cons I see are:&#xD;&#xA;&#xD;&#xA;- Very little personal experience writing socket servers for games (this point scares me the most right now).&#xD;&#xA;- Debating whether this is necessary or not, as a turn-based game does not exactly need constant socket communication. A REST service may be all I need.&#xD;&#xA;- Constant socket communication may require an unnecessary amount of CPU or network data for a mobile device (or does having a socket open not require many resources expect when transmitting data?).&#xD;&#xA;&#xD;&#xA;My observations and speculations aside, can anybody weigh in on this issue? I do not have much experience when it comes to game networking (especially for mobile) and would much appreciate advice on this issue. Let me know if more details are needed.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="33840" PostHistoryTypeId="2" PostId="15002" RevisionGUID="5708343d-04b3-4fe1-98c1-f05aae113e10" CreationDate="2011-07-19T04:09:54.177" UserId="216" Text="You don't kneed to place a log-in button, and you don't need to set permissions. I found this [Stack Overflow question][1] that explains a quick way to do it just in javascript. The user is asked post the item to their wall, and they can either add a message and post or just skip it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/5644820/publish-on-users-facebook-wall" />
  <row Id="33841" PostHistoryTypeId="2" PostId="15003" RevisionGUID="6e25925c-9b59-4aca-a5b0-d6806466c65f" CreationDate="2011-07-19T06:04:47.763" UserId="2710" Text="I've used (.NET) sockets in Unity3d on iPhone and it was pretty simple. Nothing to be scared about. Open connection should not (noticeably) consume resources when no transmission takes place, so that's not an issue. In fact, it might be that opening new connection for every request consumes _more_ power and bandwidth.&#xD;&#xA;&#xD;&#xA;That said, for a turn-based game using a web-service is probably simpler. As I understand, the only problem with this approach is notifying the client that opponent's turn ended. Maybe you can get away with simple polling from the phone?" />
  <row Id="33842" PostHistoryTypeId="25" PostId="14951" RevisionGUID="8f1d62f1-ee37-4edb-af41-f7eb29423cc9" CreationDate="2011-07-19T06:32:02.420" Comment="http://twitter.com/#!/StackGameDev/status/93206439874670593" />
  <row Id="33844" PostHistoryTypeId="25" PostId="14987" RevisionGUID="4b97fc43-41ca-4fd3-9f4e-274de4474823" CreationDate="2011-07-19T09:32:04.773" Comment="http://twitter.com/#!/StackGameDev/status/93251750689116161" />
  <row Id="33845" PostHistoryTypeId="2" PostId="15005" RevisionGUID="64781f67-275e-4d66-9d7a-cf9b6df6aaad" CreationDate="2011-07-19T12:11:25.587" UserId="3997" Text="I'm a novice that is starting to play with opengl es on android devices. To practice opengl I wanted to create a small game engine and so I was wondering what is the best 3d model file format I should integrate in my project. &#xD;&#xA;&#xD;&#xA;I'm also interested in free models of the same format.&#xD;&#xA;&#xD;&#xA;What do you suggest?" />
  <row Id="33846" PostHistoryTypeId="1" PostId="15005" RevisionGUID="64781f67-275e-4d66-9d7a-cf9b6df6aaad" CreationDate="2011-07-19T12:11:25.587" UserId="3997" Text="Most common 3D model format for opengl" />
  <row Id="33847" PostHistoryTypeId="3" PostId="15005" RevisionGUID="64781f67-275e-4d66-9d7a-cf9b6df6aaad" CreationDate="2011-07-19T12:11:25.587" UserId="3997" Text="&lt;opengl&gt;&lt;3d&gt;&lt;models&gt;" />
  <row Id="33848" PostHistoryTypeId="5" PostId="14995" RevisionGUID="1d4bd670-3ffc-4e3a-92c8-19a9b05a58fe" CreationDate="2011-07-19T12:13:04.800" UserId="2061" Comment="deleted 3 characters in body" Text="It sounds like you want to keep the speed of the object at some constant value over the entire curve - knowing the arc-length won't help you do this.  It will help you calculate at what time the object would reach its end-point *if* it were going at that speed, so it will be better than what you have now (the object will have the same average speed between all points), but the actual speed of the object will still vary as it moves around the curve.&#xD;&#xA;&#xD;&#xA;A better solution would be to change our parametric parameter *(the parameter that goes from 0 to 1, which I'll call `s` to avoid confusion with `t = time`)* at a variable-rate `ds/dt`, which is determined by what speed you want the object to be moving at that point on the curve.  So in other words, instead of changing `s` by 0.01 each frame, we might change it by 0.005 one frame, 0.02 the next, etc.&#xD;&#xA;&#xD;&#xA;We do this by calculating the derivatives of `x` (`dx/ds`) and `y` (`dy/ds`) each frame, then setting &#xD;&#xA;&lt;pre&gt;ds/dt = speed / sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;That is, by taking the speed we want to go, and dividing by the speed we'd actually be going if we were changing `s` at a fixed increment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##Proof##&#xD;&#xA;&#xD;&#xA;We want the speed of our object to be constant; let's give that constant the name `speed`.&#xD;&#xA;&#xD;&#xA;We learn in second-year calculus that, for parametric equations `x(s)` and `y(s)`,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/dt)&lt;sup&gt;2&lt;/sup&gt;)&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;We also learn that&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;dx/dt = dx/ds * ds/dt &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;(chain rule)&lt;/em&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Thus,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Solving for `ds/dt`, we get the stated equation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;###Calculating the derivatives###&#xD;&#xA;&#xD;&#xA;I've never worked with those particular splines, but I understand they just give `x(s)` and `y(s)` in terms of cubic-equations of `s`.  Thus, we can find the derivative `dx/ds` easily:  if&#xD;&#xA;&#xD;&#xA;    x(s) = a*s^3 + b*s^2 + c*s + e&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;    dx/ds = 3*a*s^2 + 2*b*s + c&#xD;&#xA;&#xD;&#xA;*(Same for `dy/ds`)* Of course, you'll need to know the exact values of `a`, `b`, and `c` to do this.  According this [this page][1], those values are easy to find.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Finally, to answer the question in the title:  finding the arc-length equation of a parametric function involves solving a [fairly complicated definite integral][2]; even for the simple case of a cubic-equation, it can't be done for the general case.&#xD;&#xA;&#xD;&#xA;Thus, you'll have to [estimate the integral numerically][3].  *&quot;Cutting the spline into 10 straight lines and summing their lengths&quot;* as you suggest is [one very simple way of doing this][4]; however, there are [slightly more complicated methods][5] that will give you much more accurate results using fewer line-segments.&#xD;&#xA;&#xD;&#xA;[1]: http://www.mvps.org/directx/articles/catmull/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Arc_length#Finding_arc_lengths_by_integrating&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Numerical_integration&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Trapezoidal_rule&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature" />
  <row Id="33849" PostHistoryTypeId="2" PostId="15006" RevisionGUID="175b2423-71a5-4ad0-a550-eefce2ecdf25" CreationDate="2011-07-19T12:21:00.867" UserId="8656" Text="The file formats does not depend on the graphics API.&#xD;&#xA;For OpenGL, the simplest and most commonly used format is the *.OBJ, or the *.3DS. It's easy to find on the web loaders for these files.&#xD;&#xA;Free models (and even) commercial model packs use these formats. The 3D modeller softwares can export to these formats too. (3ds max, blender, milkshape, etc).&#xD;&#xA;" />
  <row Id="33850" PostHistoryTypeId="2" PostId="15007" RevisionGUID="72cff95e-9a13-432e-9ee9-ddf7f58f675c" CreationDate="2011-07-19T12:24:29.343" UserId="8627" Text="There are two that are really easy to use. First is wavefront (.obj) http://en.wikipedia.org/wiki/Wavefront_.obj_file and the second is stanford (.ply) http://en.wikipedia.org/wiki/PLY_(file_format)&#xD;&#xA;&#xD;&#xA;Both store data in normal text/ascii format so you can read the content in a normal text editor which will help you understand the content and how to read it. &#xD;&#xA;&#xD;&#xA;There are more advanced and methods that supports more functions (animation, skinning etc), one of those is the Collada which is developed by the khronos group" />
  <row Id="33851" PostHistoryTypeId="25" PostId="14952" RevisionGUID="465bcdb6-a864-4ab8-9bdd-85507ee735d7" CreationDate="2011-07-19T12:32:04.850" Comment="http://twitter.com/#!/StackGameDev/status/93297049155551232" />
  <row Id="33852" PostHistoryTypeId="5" PostId="15007" RevisionGUID="8cd77e01-d0e6-4be9-873c-2e5c14bac824" CreationDate="2011-07-19T12:54:18.223" UserId="3794" Comment="corrected link" Text="There are two that are really easy to use. First is wavefront (.obj) http://en.wikipedia.org/wiki/Wavefront_.obj_file and the second is stanford (.ply) [http://en.wikipedia.org/wiki/PLY_(file_format)][1]&#xD;&#xA;&#xD;&#xA;Both store data in normal text/ascii format so you can read the content in a normal text editor which will help you understand the content and how to read it. &#xD;&#xA;&#xD;&#xA;There are more advanced and methods that supports more functions (animation, skinning etc), one of those is the Collada which is developed by the khronos group&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/PLY_%28file_format%29" />
  <row Id="33853" PostHistoryTypeId="2" PostId="15008" RevisionGUID="08e128b4-c0d2-45fb-b479-68f4dcaf4b08" CreationDate="2011-07-19T13:16:19.100" UserId="8312" Text="I was wondering if anyone know or had knowledge of how to program a climbing system like the one found in tomb raider/uncharted.&#xD;&#xA;&#xD;&#xA;I had thought of just having bounding boxes at all the climbable positions in the game world and then check for collision. If the player was inside the box then they would be &quot;hanging&quot; from the edge. Anyone have any better ideas/improvments?&#xD;&#xA;&#xD;&#xA;I already have my rendering set up using directx9 and was going to worry about animation later on.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;MD" />
  <row Id="33854" PostHistoryTypeId="1" PostId="15008" RevisionGUID="08e128b4-c0d2-45fb-b479-68f4dcaf4b08" CreationDate="2011-07-19T13:16:19.100" UserId="8312" Text="Programming a climbing system like tomb raider" />
  <row Id="33855" PostHistoryTypeId="3" PostId="15008" RevisionGUID="08e128b4-c0d2-45fb-b479-68f4dcaf4b08" CreationDate="2011-07-19T13:16:19.100" UserId="8312" Text="&lt;c++&gt;&lt;game-design&gt;&lt;game-mechanics&gt;&lt;level-design&gt;&lt;gameplay&gt;" />
  <row Id="33856" PostHistoryTypeId="2" PostId="15009" RevisionGUID="0e304fa5-0b0e-42fb-8f3c-f1fa6f39689b" CreationDate="2011-07-19T13:38:09.587" UserId="8684" Text="Could one of you please give me a bit of insight to each one of these 4 topics, I am just a little confused on what it is asking. &#xD;&#xA;&#xD;&#xA;I have a good idea on what passive and active rendering are, and that the use of active rendering is more sutable for games programming.&#xD;&#xA;&#xD;&#xA;I'm just not to sure about the rest.&#xD;&#xA;&#xD;&#xA;-------------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;The timing of the main game loop is an important component of any computer game, since it impacts on the frame rate and the real-time physics calculations needed to make the game run at a realistic (or at least playable) rate. You are required to read up on the programming issues that affect this timing, and write a report that covers the range &#xD;&#xA;of options available to a programmer. Your report should consider the following headings: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. The distinction between active and passive rendering, and an explanation of the preferred mode for a game program. &#xD;&#xA;&#xD;&#xA;2. The division of time between the physics (or game-model) update and graphics update stages, and an explanation and analysis of the relative importance of these in a game that involves real-time physics calculations.&#xD;&#xA; &#xD;&#xA;3. Techniques for achieving accuracy in real-time physics, and an explanation of the trade-offs that may be necessary to do this.&#xD;&#xA; &#xD;&#xA;4. Programming techniques that can be used to try to keep the frame-rate for graphics updates to some desired rate.&#xD;&#xA;&#xD;&#xA;----------------------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;Thank you in advance! &#xD;&#xA;Sean." />
  <row Id="33857" PostHistoryTypeId="1" PostId="15009" RevisionGUID="0e304fa5-0b0e-42fb-8f3c-f1fa6f39689b" CreationDate="2011-07-19T13:38:09.587" UserId="8684" Text="Options avaiable to a programmer on the Main Game Loop." />
  <row Id="33858" PostHistoryTypeId="3" PostId="15009" RevisionGUID="0e304fa5-0b0e-42fb-8f3c-f1fa6f39689b" CreationDate="2011-07-19T13:38:09.587" UserId="8684" Text="&lt;physics&gt;&lt;graphics&gt;&lt;gameloop&gt;&lt;frame-rate&gt;&lt;techniques&gt;" />
  <row Id="33859" PostHistoryTypeId="2" PostId="15010" RevisionGUID="2e1a8e62-eb73-4c16-a778-e76d7851cb77" CreationDate="2011-07-19T13:43:11.867" UserId="20" Text="I just opened Tiled and saw that there's support for multiple layers. So you could even build multiple ground-levels inside Tiled. &#xD;&#xA;&#xD;&#xA;For different height-levels, you probably won't need the multiple layers at all. You could build that just by using special tiles, something like shown [here][1] or [here][2]. The type of tile would also denote the height. If you have special areas like a ramp that maybe spans across several tiles, you can use the &quot;objects&quot; in Tiled to add such metadata to your map.&#xD;&#xA;&#xD;&#xA;It's basically the same approach as you would add walls in an isometric game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://opengameart.org/content/isometric-64x64-outside-tileset&#xD;&#xA;  [2]: http://opengameart.org/content/isoball-project-tiles" />
  <row Id="33862" PostHistoryTypeId="6" PostId="15009" RevisionGUID="516b3d30-9970-4adb-95c6-bad433914047" CreationDate="2011-07-19T14:15:23.563" UserId="5021" Comment="edited tags" Text="&lt;physics&gt;&lt;graphics&gt;&lt;gameloop&gt;&lt;frame-rate&gt;&lt;homework&gt;" />
  <row Id="33863" PostHistoryTypeId="2" PostId="15012" RevisionGUID="ab8afe5d-45d3-41fe-ab89-f52306392ae8" CreationDate="2011-07-19T14:34:01.813" UserId="8687" Text="I'm not satisfied with the quality of video playback in Unity (Movie texture which I run after converting video with Miro converter and importing it to Unity),... so, is there any chance that there is a 3rd party library which I can integrate inside Unity to play my movie file? My movie is full HD intro movie to my 3d app which can be played from application menu.&#xD;&#xA;I've tried to use Media Player Classic (MPC) as external application, but the problem is, when I run MPC as new Process from application menu, my menu minimizes and this looks awkward for one stand alone app. When intro finishes, I have to maximize my menu by clicking on application icon on Windows taskbar.&#xD;&#xA;" />
  <row Id="33864" PostHistoryTypeId="1" PostId="15012" RevisionGUID="ab8afe5d-45d3-41fe-ab89-f52306392ae8" CreationDate="2011-07-19T14:34:01.813" UserId="8687" Text="Video playback in Unity" />
  <row Id="33865" PostHistoryTypeId="3" PostId="15012" RevisionGUID="ab8afe5d-45d3-41fe-ab89-f52306392ae8" CreationDate="2011-07-19T14:34:01.813" UserId="8687" Text="&lt;programming&gt;&lt;unity&gt;&lt;libraries&gt;" />
  <row Id="33866" PostHistoryTypeId="5" PostId="15012" RevisionGUID="4d1deae3-8a31-4fa2-8f95-7794bb336632" CreationDate="2011-07-19T14:39:05.603" UserId="8687" Comment="added 7 characters in body" Text="I'm not satisfied with the quality of video playback in Unity (Movie texture which I run after converting video with Miro converter and importing it to Unity),... so, is there any chance that there is a 3rd party library which I can integrate inside Unity to play my movie file? My movie is full HD intro movie to my 3d app which can be played from application menu.&#xD;&#xA;I've tried to use Media Player Classic (MPC) as external application, but the problem is, when I run MPC as new Process from application menu, my menu minimizes and this looks awkward for one stand alone app. When intro finishes, I have to maximize my menu by clicking on application icon placed on Windows taskbar.&#xD;&#xA;" />
  <row Id="33867" PostHistoryTypeId="5" PostId="15005" RevisionGUID="6068f6f6-8c76-4aec-a82f-2158f873a621" CreationDate="2011-07-19T14:50:04.697" UserId="1430" Comment="deleted 28 characters in body" Text="I'm a novice that is starting to play with OpenGL ES on Android devices. To practice OpenGL I wanted to create a small game engine and so I was wondering what the best 3D model file format would be.&#xD;&#xA;&#xD;&#xA;I'm also interested in free models of the same format.&#xD;&#xA;&#xD;&#xA;What do you suggest?" />
  <row Id="33868" PostHistoryTypeId="2" PostId="15013" RevisionGUID="89569fc4-0ea2-423d-92d9-5d80ad984991" CreationDate="2011-07-19T14:51:29.430" UserId="5520" Text="I've seen this question asked elsewhere; I can't remember where.  A response gave this link:&#xD;&#xA;&#xD;&#xA;http://gafferongames.com/game-physics/fix-your-timestep/&#xD;&#xA;&#xD;&#xA;It describes the advantages and disadvantages of different techniques for calculating time, and how to sync graphics and physics updates when they run at different rates.  It's very well written and provides code samples." />
  <row Id="33869" PostHistoryTypeId="2" PostId="15014" RevisionGUID="2d0b4126-a129-4cab-a38f-6608607c2126" CreationDate="2011-07-19T15:04:53.947" UserId="1430" Text="Unfortunately I don't know what level of freedom you have in selecting external libraries for use in Unity projects, but you might want to look at either:&#xD;&#xA;&#xD;&#xA;  * The [Windows Media Player SDK][1], which would let you embed a WMP ActiveX control in a form (or presumably anything you could get a HWND to). [Here's a rough example][2].&#xD;&#xA;  * The [DirectShow.Net][3] library, which exposes the old DirectShow API to C#.&#xD;&#xA;&#xD;&#xA;Both of these options may very well be impractical due to the level of control Unity may give you over the lower-level OS objects -- window handles, primarily, and hooks for periodic updates. &#xD;&#xA;&#xD;&#xA;Even if you got either of the above options to work, you'd be sacrificing portability (if that matters).&#xD;&#xA;&#xD;&#xA;Based on some of the questions floating around Unity Answers ([this one][4] and [this one][5], for example) it looks like video playback is not in an ideal state and may not get there any time soon.&#xD;&#xA;&#xD;&#xA;Finally, you may want to browse some of the resources linked in [this external Unity resources question][6], which might lead you to something useful for your purposes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/dd758070%28v=VS.85%29.aspx&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb383953%28v=vs.90%29.aspx&#xD;&#xA;  [3]: http://directshownet.sourceforge.net/about.html&#xD;&#xA;  [4]: http://answers.unity3d.com/questions/119236/jerky-fullscreen-video-playback.html&#xD;&#xA;  [5]: http://answers.unity3d.com/questions/30636/hd-video-playback.html&#xD;&#xA;  [6]: http://answers.unity3d.com/questions/7549/what-third-party-tools-and-components-are-availabl.html" />
  <row Id="33870" PostHistoryTypeId="25" PostId="15008" RevisionGUID="85e46c7d-5675-4843-af16-a3cd1b47d8bc" CreationDate="2011-07-19T15:32:05.100" Comment="http://twitter.com/#!/StackGameDev/status/93342348267888642" />
  <row Id="33871" PostHistoryTypeId="5" PostId="15009" RevisionGUID="6437770b-5340-4e25-9f5b-10d12bbafd98" CreationDate="2011-07-19T15:37:57.707" UserId="-1" Comment="Various cleanup" Text="Could someone please give me some insight into each one of the four topics listed below.&#xD;&#xA;&#xD;&#xA;I have a good idea about what passive and active rendering are, and that the use of active rendering is more suitable for games programming.&#xD;&#xA;&#xD;&#xA;I'm just not to sure about the rest.&#xD;&#xA;&#xD;&#xA;-------------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;The timing of the main game loop is an important component of any computer game, since it impacts on the frame rate and the real-time physics calculations needed to make the game run at a realistic (or at least playable) rate. You are required to read up on the programming issues that affect this timing, and write a report that covers the range &#xD;&#xA;of options available to a programmer. Your report should consider the following headings: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. The distinction between active and passive rendering, and an explanation of the preferred mode for a game program. &#xD;&#xA;&#xD;&#xA;2. The division of time between the physics (or game-model) update and graphics update stages, and an explanation and analysis of the relative importance of these in a game that involves real-time physics calculations.&#xD;&#xA; &#xD;&#xA;3. Techniques for achieving accuracy in real-time physics, and an explanation of the trade-offs that may be necessary to do this.&#xD;&#xA; &#xD;&#xA;4. Programming techniques that can be used to try to keep the frame-rate for graphics updates to some desired rate.&#xD;&#xA;" />
  <row Id="33872" PostHistoryTypeId="4" PostId="15009" RevisionGUID="6437770b-5340-4e25-9f5b-10d12bbafd98" CreationDate="2011-07-19T15:37:57.707" UserId="-1" Comment="Various cleanup" Text="Options available to a programmer on the Main Game Loop." />
  <row Id="33873" PostHistoryTypeId="24" PostId="15009" RevisionGUID="6437770b-5340-4e25-9f5b-10d12bbafd98" CreationDate="2011-07-19T15:37:57.707" Comment="Proposed by 86.47.94.17|75482df1-4762-41a8-957b-02564000c880 approved by 51 edit id of 569" />
  <row Id="33874" PostHistoryTypeId="5" PostId="14993" RevisionGUID="8f5c8759-32db-46ea-88da-aba371018c2f" CreationDate="2011-07-19T15:43:05.973" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How to implement turn-based game engine?](http://gamedev.stackexchange.com/questions/8239/how-to-implement-turn-based-game-engine)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am considering making a game like Master of Orion but I don't know how to start with turn-based systems. If any of you played this game they know what I mean, same system is used in Civilization.&#xD;&#xA;1. You give orders to your units and production queues&#xD;&#xA;2. Click End Turn.&#xD;&#xA;3. Everything moves, go to 1.&#xD;&#xA;&#xD;&#xA;I know that some form of state machine is used, but maybe you could point me into some book or manual on the matter.&#xD;&#xA;" />
  <row Id="33875" PostHistoryTypeId="10" PostId="14993" RevisionGUID="38a5e9e3-7b7c-4d44-8a98-c195eb767f06" CreationDate="2011-07-19T15:43:05.473" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33877" PostHistoryTypeId="2" PostId="15015" RevisionGUID="093a3469-0378-4106-a3c5-00311c03dd57" CreationDate="2011-07-19T16:21:52.383" UserId="7946" Text="I'm interested in how the market of casual games is split up between different platforms, both in terms of revenue as well as &quot;amount of games published&quot;.&#xD;&#xA;&#xD;&#xA;For example, I think that Facebook and iPhone games should make a quite large percentage of the market, Facebook alone due to the *Ville games.&#xD;&#xA;&#xD;&#xA;Does anyone of you know of one or several articles on market research in that area? Or some simple web page which lists statistics?" />
  <row Id="33878" PostHistoryTypeId="1" PostId="15015" RevisionGUID="093a3469-0378-4106-a3c5-00311c03dd57" CreationDate="2011-07-19T16:21:52.383" UserId="7946" Text="Casual games market share distribution?" />
  <row Id="33879" PostHistoryTypeId="3" PostId="15015" RevisionGUID="093a3469-0378-4106-a3c5-00311c03dd57" CreationDate="2011-07-19T16:21:52.383" UserId="7946" Text="&lt;casual-games&gt;" />
  <row Id="33880" PostHistoryTypeId="2" PostId="15016" RevisionGUID="033dd45a-56ce-4706-8797-0a6581d9592c" CreationDate="2011-07-19T16:38:43.997" UserId="8688" Text="I am having a problem of animate part of a .3ds object using lib3ds.&#xD;&#xA;&#xD;&#xA;So I can follow some online tutorial to load the .3ds models (a man) using lib3ds. But I can't find a way to animate this man is walking?&#xD;&#xA;&#xD;&#xA;How do we do this using lib3ds or we can't do it with this library?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;Truyenle" />
  <row Id="33881" PostHistoryTypeId="1" PostId="15016" RevisionGUID="033dd45a-56ce-4706-8797-0a6581d9592c" CreationDate="2011-07-19T16:38:43.997" UserId="8688" Text="Animate part of .3ds object using lib3ds library" />
  <row Id="33882" PostHistoryTypeId="3" PostId="15016" RevisionGUID="033dd45a-56ce-4706-8797-0a6581d9592c" CreationDate="2011-07-19T16:38:43.997" UserId="8688" Text="&lt;animation&gt;&lt;3dsmax&gt;" />
  <row Id="33883" PostHistoryTypeId="10" PostId="15009" RevisionGUID="9312174e-0bc9-44eb-875c-adc9982ddf64" CreationDate="2011-07-19T16:43:37.053" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33884" PostHistoryTypeId="5" PostId="15008" RevisionGUID="dd27f0c9-711b-4d8f-8dd7-21581b961150" CreationDate="2011-07-19T18:29:16.280" UserId="8312" Comment="added 22 characters in body" Text="I was wondering if anyone knew or had knowledge of how to program a climbing system like the one found in tomb raider/uncharted.&#xD;&#xA;&#xD;&#xA;I had thought of just having bounding boxes at all the climbable positions in the game world and then check for collision. If the player was inside the box then they would be &quot;hanging&quot; from the edge. Anyone have any better ideas/improvments?&#xD;&#xA;&#xD;&#xA;I already have my rendering set up using directx9 and was going to worry about animation later on.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;MD&#xD;&#xA;&#xD;&#xA;**EDIT:** Spelling" />
  <row Id="33885" PostHistoryTypeId="25" PostId="15005" RevisionGUID="5cbe6f4b-d778-45bd-9e59-81ab690be357" CreationDate="2011-07-19T18:32:07.827" Comment="http://twitter.com/#!/StackGameDev/status/93387658901995521" />
  <row Id="33886" PostHistoryTypeId="2" PostId="15017" RevisionGUID="898be192-5d60-4c28-a5d9-32de6cd0f7bf" CreationDate="2011-07-19T19:14:53.433" UserId="8692" Text="What's the best way of representing surfaces in a 2d top down racing game? I'd like paved and dirt surfaces in my game to have different friction properties. Would you break up the map into a grid and simply check where in the grid the car is to determine the friction? Or is there a better way of managing it?&#xD;&#xA;&#xD;&#xA;The roads and dirt are not self contained all or nothing tiles either, so I'd have to handle a grid section that contained some road and some dirt." />
  <row Id="33887" PostHistoryTypeId="1" PostId="15017" RevisionGUID="898be192-5d60-4c28-a5d9-32de6cd0f7bf" CreationDate="2011-07-19T19:14:53.433" UserId="8692" Text="Handling collision with 2D surfaces and player sprite" />
  <row Id="33888" PostHistoryTypeId="3" PostId="15017" RevisionGUID="898be192-5d60-4c28-a5d9-32de6cd0f7bf" CreationDate="2011-07-19T19:14:53.433" UserId="8692" Text="&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="33889" PostHistoryTypeId="2" PostId="15018" RevisionGUID="1d5119e9-b9f6-4d9e-947d-654bb3011772" CreationDate="2011-07-19T19:29:06.650" UserId="2287" Text="A little background for myself. I am relatively experienced with 3rd part physics engines such as Havok, Box2D, Bullet and have successfully integrated them in custom engine(s). I have also made a simple physics engine by following a few known books. &#xD;&#xA;&#xD;&#xA;Now I am interested in diving into vehicle physics. There are a couple of books that skim over the topic but do not go over in enough detail for me to grasp anything useful. So I would like to know of good books/resources that are not too heavy (by that I mean a book that is pure vehicles and made for engineers rather than game developers) that help me get started on vehicle physics. Here `get started` = at least guide me through creating a simple vehicle in 3D with modern features found in most games (suspension/transmission etc.)&#xD;&#xA;&#xD;&#xA;**Note:** I searched for a similar question but did not find one, but if one exists, please post the link and feel free to close the question." />
  <row Id="33890" PostHistoryTypeId="1" PostId="15018" RevisionGUID="1d5119e9-b9f6-4d9e-947d-654bb3011772" CreationDate="2011-07-19T19:29:06.650" UserId="2287" Text="Where to start for implementing vehicle physics?" />
  <row Id="33891" PostHistoryTypeId="3" PostId="15018" RevisionGUID="1d5119e9-b9f6-4d9e-947d-654bb3011772" CreationDate="2011-07-19T19:29:06.650" UserId="2287" Text="&lt;physics&gt;&lt;vehicle&gt;" />
  <row Id="33892" PostHistoryTypeId="2" PostId="15019" RevisionGUID="995297db-3d0b-4595-aaab-f9ae91266764" CreationDate="2011-07-19T20:34:18.903" UserId="8695" Text="I was wondering if anyone has released or tried to release on Steam and how much time it took Steam to respond to your game submissions, I cant find any info about it on their website and its been over a month now since I have submitted and have yet to even get a confirmation email.&#xD;&#xA;&#xD;&#xA;Is this to be expected from sources such as these? Ive sent them two emails so far at 3 weeks apart and have to make a decision on what to do with the game and can not wait much longer.&#xD;&#xA;&#xD;&#xA;Thank you for feedback!" />
  <row Id="33893" PostHistoryTypeId="1" PostId="15019" RevisionGUID="995297db-3d0b-4595-aaab-f9ae91266764" CreationDate="2011-07-19T20:34:18.903" UserId="8695" Text="Steam Submission Times" />
  <row Id="33894" PostHistoryTypeId="3" PostId="15019" RevisionGUID="995297db-3d0b-4595-aaab-f9ae91266764" CreationDate="2011-07-19T20:34:18.903" UserId="8695" Text="&lt;steam&gt;" />
  <row Id="33895" PostHistoryTypeId="6" PostId="15018" RevisionGUID="b5c815ae-c8c4-4a94-93b4-0309ac93da4a" CreationDate="2011-07-19T20:45:16.853" UserId="3505" Comment="edited tags" Text="&lt;physics&gt;&lt;books&gt;&lt;racing&gt;" />
  <row Id="33896" PostHistoryTypeId="2" PostId="15020" RevisionGUID="dd9cc234-efb8-4dd2-a8ef-ac59548fe9ff" CreationDate="2011-07-19T21:18:37.820" UserId="8696" Text="We're a small company without enough employees to run a large scale beta in house.  The app is geo-location based so we're trying to recruits some beta testers from all over that aren't &quot;friends and family&quot;.  Are there any sites or communities dedicated to something like this.  If you're interested check it out (http://beta.freezeonline.net).  " />
  <row Id="33897" PostHistoryTypeId="1" PostId="15020" RevisionGUID="dd9cc234-efb8-4dd2-a8ef-ac59548fe9ff" CreationDate="2011-07-19T21:18:37.820" UserId="8696" Text="Need to recruit beta testers for iOS app." />
  <row Id="33898" PostHistoryTypeId="3" PostId="15020" RevisionGUID="dd9cc234-efb8-4dd2-a8ef-ac59548fe9ff" CreationDate="2011-07-19T21:18:37.820" UserId="8696" Text="&lt;ios&gt;&lt;beta&gt;" />
  <row Id="33899" PostHistoryTypeId="25" PostId="15019" RevisionGUID="44a33426-aeea-4657-9d8b-e32d10080701" CreationDate="2011-07-19T21:32:07.553" Comment="http://twitter.com/#!/StackGameDev/status/93432957682987008" />
  <row Id="33900" PostHistoryTypeId="5" PostId="15020" RevisionGUID="66bbfb22-4322-4f90-a187-26cb1437d157" CreationDate="2011-07-19T22:11:48.703" UserId="8696" Comment="deleted 69 characters in body" Text="We're a small company without enough employees to run a large scale beta in house.  The app is geo-location based so we're trying to recruits some beta testers from all over that aren't &quot;friends and family&quot;.  Are there any sites or communities dedicated to something like this?" />
  <row Id="33901" PostHistoryTypeId="2" PostId="15021" RevisionGUID="23b564eb-21b6-4abd-92a4-3696d35d0ba6" CreationDate="2011-07-19T22:13:03.010" UserId="8697" Text="I have a very simple game engine. A GameObjectManager stores a collection of all the GameObjects. When I want to render, I just call GameObjectManager.render() from the rendering context.&#xD;&#xA;&#xD;&#xA;This works well for rendering most objects, but now I am looking to add a water shader to the scene where it takes in reflection and refraction textures. The reflection and refraction textures will be computed each frame by re-rendering the scene from a new perspective. Unfortunately, my design choice of having a single GameObjectManager to store all GameObjects just won't work for this - it wouldn't make sense to store a GameObject for the water in the GameObejctManager. &#xD;&#xA;&#xD;&#xA;What is a good game engine design pattern to handle re-rendering the scene for an effect such as a reflection?" />
  <row Id="33902" PostHistoryTypeId="1" PostId="15021" RevisionGUID="23b564eb-21b6-4abd-92a4-3696d35d0ba6" CreationDate="2011-07-19T22:13:03.010" UserId="8697" Text="Engine Design for Rendering Relctions" />
  <row Id="33903" PostHistoryTypeId="3" PostId="15021" RevisionGUID="23b564eb-21b6-4abd-92a4-3696d35d0ba6" CreationDate="2011-07-19T22:13:03.010" UserId="8697" Text="&lt;game-design&gt;&lt;engine&gt;&lt;rendering&gt;" />
  <row Id="33904" PostHistoryTypeId="5" PostId="15021" RevisionGUID="75d71f77-33da-4892-a079-e4047c98e062" CreationDate="2011-07-19T23:35:39.100" UserId="51" Comment="edited body; edited tags; edited title" Text="I have a very simple game engine. A GameObjectManager stores a collection of all the GameObjects. When I want to render, I just call GameObjectManager.render() from the rendering context.&#xD;&#xA;&#xD;&#xA;This works well for rendering most objects, but now I am looking to add a water shader to the scene where it takes in reflection and refraction textures. The reflection and refraction textures will be computed each frame by re-rendering the scene from a new perspective. Unfortunately, my design choice of having a single GameObjectManager to store all GameObjects just won't work for this - it wouldn't make sense to store a GameObject for the water in the GameObjectManager. &#xD;&#xA;&#xD;&#xA;What is a good game engine design pattern to handle re-rendering the scene for an effect such as a reflection?" />
  <row Id="33905" PostHistoryTypeId="4" PostId="15021" RevisionGUID="75d71f77-33da-4892-a079-e4047c98e062" CreationDate="2011-07-19T23:35:39.100" UserId="51" Comment="edited body; edited tags; edited title" Text="Engine Design for Rendering Reflections" />
  <row Id="33906" PostHistoryTypeId="6" PostId="15021" RevisionGUID="75d71f77-33da-4892-a079-e4047c98e062" CreationDate="2011-07-19T23:35:39.100" UserId="51" Comment="edited body; edited tags; edited title" Text="&lt;architecture&gt;&lt;engine&gt;&lt;rendering&gt;" />
  <row Id="33907" PostHistoryTypeId="25" PostId="15018" RevisionGUID="c3bd91c4-9396-4072-a5ea-d8f6a2343a7a" CreationDate="2011-07-20T00:32:08.603" Comment="http://twitter.com/#!/StackGameDev/status/93478258527571970" />
  <row Id="33908" PostHistoryTypeId="2" PostId="15022" RevisionGUID="700bdaf7-cb8e-42cd-8db0-a201574f53b8" CreationDate="2011-07-20T00:41:03.153" UserId="8700" Text="This is probably a very easy question, but I can't seem to understand why it's not working.&#xD;&#xA;&#xD;&#xA;I want the basketball to bounce horizontally when it touches the borders on the right and left, but when it bounces on the right, it seems to go just a *little* bit further than it should.&#xD;&#xA;&#xD;&#xA;Any suggestions?&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        // Allows the game to exit&#xD;&#xA;        if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;            this.Exit();&#xD;&#xA;    &#xD;&#xA;        basketballPosition.X += ballSpeed;&#xD;&#xA;        if (basketballPosition.X &gt; Window.ClientBounds.Width - basketball.Width || basketballPosition.X &lt; 0)&#xD;&#xA;        {&#xD;&#xA;            ballSpeed *= -1;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        base.Update(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And my Draw method:&#xD;&#xA;&#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;            spriteBatch.Draw(basketball, &#xD;&#xA;                             basketballPosition, &#xD;&#xA;                             null,&#xD;&#xA;                             Color.White, &#xD;&#xA;                             0, &#xD;&#xA;                             Vector2.Zero, &#xD;&#xA;                             1.5f,&#xD;&#xA;                             SpriteEffects.None, &#xD;&#xA;                             0);&#xD;&#xA;&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**Edit** The problem was I was using a scale of 1.5f for drawing the image. Can someone explain how I would get the true border of the image if I were using scale? It seems the border stay as the original size, but the texture is drawn to whatever scale I choose.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Bmdha.jpg" />
  <row Id="33909" PostHistoryTypeId="1" PostId="15022" RevisionGUID="700bdaf7-cb8e-42cd-8db0-a201574f53b8" CreationDate="2011-07-20T00:41:03.153" UserId="8700" Text="Problems making my basketball bounce around horizontally." />
  <row Id="33910" PostHistoryTypeId="3" PostId="15022" RevisionGUID="700bdaf7-cb8e-42cd-8db0-a201574f53b8" CreationDate="2011-07-20T00:41:03.153" UserId="8700" Text="&lt;xna-4.0&gt;" />
  <row Id="33911" PostHistoryTypeId="2" PostId="15023" RevisionGUID="0abd8829-5f6b-40ff-b2c2-aa83ed5b6cbb" CreationDate="2011-07-20T00:48:11.547" UserId="2111" Text="Since your ball is scaled, it means that using the texture's width (`basketball.Width`) is not correct, since the *real* width is the texture's width times the scale.&#xD;&#xA;&#xD;&#xA;Your code would change like this:&#xD;&#xA;&#xD;&#xA;    if (basketballPosition.X &gt; Window.ClientBounds.Width - (basketball.Width * 1.5f) || basketballPosition.X &lt; 0)" />
  <row Id="33912" PostHistoryTypeId="2" PostId="15024" RevisionGUID="cd4dd1f1-47a2-4d88-b748-1c0b894b4550" CreationDate="2011-07-20T00:57:58.313" UserId="7728" Text="Your current approach should be fine for this.&#xD;&#xA;&#xD;&#xA;All you need to do is to have the reflective object hide itself, before performing the reflection render.  This is typically done by having it clear a &quot;IsVisible&quot; flag on itself, before starting the reflection render.&#xD;&#xA;&#xD;&#xA;Now, if you wanted to have objects which didn't reflect their surroundings, but instead showed elements from a different scene  (say, a television screen showing a part of the next level), at that point it might be worth thinking about not having only a single GameObjectManager, and instead having one per discrete scene.  But if all you're considering are reflections within a single scene, then a single GameObjectManager should be able to do everything you need.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33913" PostHistoryTypeId="5" PostId="15023" RevisionGUID="60cb8623-7aa8-42d1-ab31-771256d75c87" CreationDate="2011-07-20T00:58:57.970" UserId="2111" Comment="added 2353 characters in body" Text="Since your ball is scaled, it means that using the texture's width (`basketball.Width`) is not correct, since the *real* width is the texture's width times the scale.&#xD;&#xA;&#xD;&#xA;Your code would change like this:&#xD;&#xA;&#xD;&#xA;    if (basketballPosition.X &gt; Window.ClientBounds.Width - (basketball.Width * 1.5f) ||&#xD;&#xA;        basketballPosition.X &lt; 0)&#xD;&#xA;&#xD;&#xA;## Cleaning the code a bit ##&#xD;&#xA;&#xD;&#xA;Now, keeping magic values isn't always nice, so you might want to make a class out of that basketball:&#xD;&#xA;&#xD;&#xA;    public class BasketBall&#xD;&#xA;    {&#xD;&#xA;        Texture2D texture;&#xD;&#xA;        public Vector2 Position { get; set; }&#xD;&#xA;        public float Scale { get; set; }&#xD;&#xA;        float ballSpeed;&#xD;&#xA;&#xD;&#xA;        Rectangle screenRectangle;&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Returns the scaled bounding rectangle of the basketball.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public Rectangle BoundingRectangle&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return new Rectangle((int)Position.X, (int)Position.Y,&#xD;&#xA;                    (int)(texture.Width * Scale), (int)(texture.Height * Scale));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public BasketBall(string assetPath, Vector2 startPos, float scale, float startSpeed,&#xD;&#xA;            Rectangle screenRectangle)&#xD;&#xA;        {&#xD;&#xA;            texture = Content.Load&lt;Texture2D&gt;(assetPath);&#xD;&#xA;            Position = startPos;&#xD;&#xA;            Scale = scale;&#xD;&#xA;            ballSpeed = startSpeed;&#xD;&#xA;            this.screenRectangle = screenRectangle;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            Position.X += ballSpeed * gameTime.ElapsedGameTime.TotalSeconds; // multiply by delta seconds for consistent behavior on different machines&#xD;&#xA;&#xD;&#xA;            // Much more straightforward now. The scaling happens when calling BoundingRectangle&#xD;&#xA;            if (BoundingRectangle.Left &lt; 0f || BoundingRectangle.Right &gt; screenRectangle.Right)&#xD;&#xA;            {&#xD;&#xA;                ballSpeed *= -1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Draw(SpriteBatch spriteBatch)&#xD;&#xA;        {&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;            spriteBatch.Draw(texture,&#xD;&#xA;                             Position,&#xD;&#xA;                             null,&#xD;&#xA;                             Color.White,&#xD;&#xA;                             0,&#xD;&#xA;                             Vector2.Zero,&#xD;&#xA;                             Scale,&#xD;&#xA;                             SpriteEffects.None,&#xD;&#xA;                             0);&#xD;&#xA;&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So much cleaner to use imho:&#xD;&#xA;&#xD;&#xA;    BasketBall basketBall;&#xD;&#xA;&#xD;&#xA;When you load its content:&#xD;&#xA;&#xD;&#xA;    basketBall = new BasketBall(&quot;basketBall&quot;, Vector2.Zero, 1.5f, 50f, new Rectangle(Window.ClientBounds.X, Window.ClientBounds.Y, Window.ClientBounds.Width, Window.ClientBounds.Height));&#xD;&#xA;&#xD;&#xA;When you update it:&#xD;&#xA;&#xD;&#xA;    basketBall.update(gameTime);&#xD;&#xA;&#xD;&#xA;When you draw it:&#xD;&#xA;&#xD;&#xA;    basketBall.draw(spriteBatch);" />
  <row Id="33914" PostHistoryTypeId="5" PostId="15023" RevisionGUID="1c9976fa-a8fa-41ef-ba77-71557b7548a9" CreationDate="2011-07-20T01:04:29.823" UserId="2111" Comment="added 2353 characters in body" Text="Since your ball is scaled, it means that using the texture's width (`basketball.Width`) is not correct, since the *real* width is the texture's width times the scale.&#xD;&#xA;&#xD;&#xA;Your code would change like this:&#xD;&#xA;&#xD;&#xA;    if (basketballPosition.X &gt; Window.ClientBounds.Width - (basketball.Width * 1.5f) ||&#xD;&#xA;        basketballPosition.X &lt; 0)&#xD;&#xA;&#xD;&#xA;## Cleaning the code a bit ##&#xD;&#xA;&#xD;&#xA;Now, keeping magic values isn't always nice, so you might want to make a class out of that basketball:&#xD;&#xA;&#xD;&#xA;*Note: I have not tested the code below, but you get the general idea.*&#xD;&#xA;&#xD;&#xA;    public class BasketBall&#xD;&#xA;    {&#xD;&#xA;        Texture2D texture;&#xD;&#xA;        public Vector2 Position { get; set; }&#xD;&#xA;        public float Scale { get; set; }&#xD;&#xA;        float ballSpeed;&#xD;&#xA;&#xD;&#xA;        Rectangle screenRectangle;&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Returns the scaled bounding rectangle of the basketball.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public Rectangle BoundingRectangle&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return new Rectangle((int)Position.X, (int)Position.Y,&#xD;&#xA;                    (int)(texture.Width * Scale), (int)(texture.Height * Scale));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public BasketBall(string assetPath, Vector2 startPos, float scale, float startSpeed,&#xD;&#xA;            Rectangle screenRectangle)&#xD;&#xA;        {&#xD;&#xA;            texture = Content.Load&lt;Texture2D&gt;(assetPath);&#xD;&#xA;            Position = startPos;&#xD;&#xA;            Scale = scale;&#xD;&#xA;            ballSpeed = startSpeed;&#xD;&#xA;            this.screenRectangle = screenRectangle;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            Position.X += ballSpeed * gameTime.ElapsedGameTime.TotalSeconds; // multiply by delta seconds for consistent behavior on different machines&#xD;&#xA;&#xD;&#xA;            // Much more straightforward now. The scaling happens when calling BoundingRectangle&#xD;&#xA;            if (BoundingRectangle.Left &lt; 0f || BoundingRectangle.Right &gt; screenRectangle.Right)&#xD;&#xA;            {&#xD;&#xA;                ballSpeed *= -1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Draw(SpriteBatch spriteBatch)&#xD;&#xA;        {&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;            spriteBatch.Draw(texture,&#xD;&#xA;                             Position,&#xD;&#xA;                             null,&#xD;&#xA;                             Color.White,&#xD;&#xA;                             0,&#xD;&#xA;                             Vector2.Zero,&#xD;&#xA;                             Scale,&#xD;&#xA;                             SpriteEffects.None,&#xD;&#xA;                             0);&#xD;&#xA;&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So much cleaner to use imho:&#xD;&#xA;&#xD;&#xA;    BasketBall basketBall;&#xD;&#xA;&#xD;&#xA;When you load its content:&#xD;&#xA;&#xD;&#xA;    basketBall = new BasketBall(&quot;basketBall&quot;, Vector2.Zero, 1.5f, 50f, &#xD;&#xA;                                new Rectangle(Window.ClientBounds.X, &#xD;&#xA;                                              Window.ClientBounds.Y, &#xD;&#xA;                                              Window.ClientBounds.Width, &#xD;&#xA;                                              Window.ClientBounds.Height));&#xD;&#xA;&#xD;&#xA;When you update it:&#xD;&#xA;&#xD;&#xA;    basketBall.update(gameTime);&#xD;&#xA;&#xD;&#xA;When you draw it:&#xD;&#xA;&#xD;&#xA;    basketBall.draw(spriteBatch);&#xD;&#xA;&#xD;&#xA;If you do prefer the no-class version, then I'd recommend at least keeping a `Vector2` showing the scale measures of the sprite, for cleaner calculations. Also, a constant for the scale would be nice. Like so:&#xD;&#xA;&#xD;&#xA;    const float BALL_SCALE = 1.5f;&#xD;&#xA;    Vector2 basketBallMeasures = new Vector2(basketball.Width, basketball.Height) * BALL_SCALE;" />
  <row Id="33915" PostHistoryTypeId="6" PostId="15022" RevisionGUID="909f3086-e95f-46cf-940a-0ec0760867bd" CreationDate="2011-07-20T01:08:32.927" UserId="2111" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;" />
  <row Id="33916" PostHistoryTypeId="10" PostId="15020" RevisionGUID="7d92eda7-e061-4b4b-9617-a0b4adb25002" CreationDate="2011-07-20T01:13:15.743" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:962,&quot;DisplayName&quot;:&quot;AttackingHobo&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33917" PostHistoryTypeId="5" PostId="15023" RevisionGUID="7f2e6e8e-f03e-4245-87d6-80693e7a1162" CreationDate="2011-07-20T01:17:37.367" UserId="2111" Comment="added 536 characters in body" Text="Since your ball is scaled, it means that using the texture's width (`basketball.Width`) is not correct, since the *real* width is the texture's width times the scale.&#xD;&#xA;&#xD;&#xA;Your code would change like this:&#xD;&#xA;&#xD;&#xA;    if (basketballPosition.X &gt; Window.ClientBounds.Width - (basketball.Width * 1.5f) ||&#xD;&#xA;        basketballPosition.X &lt; 0)&#xD;&#xA;&#xD;&#xA;This is because supplying a scale parameter different than `1.0f` to `spriteBatch.Draw` has the effect of modifying how the image is *drawn*, it does not change its stored width and height however. &#xD;&#xA;&#xD;&#xA;So, you have to keep in mind when using the width of a texture that you're using the width of the original image, not the scaled one. &#xD;&#xA;&#xD;&#xA;You simply need to scale the width and height whenever appropriate. In this case you want to know when the **drawn** right border of the image goes too far on the right, so you need the scaled width.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**A suggestion to clean the code a little bit...**&#xD;&#xA;&#xD;&#xA;Keeping magic values isn't always nice, so you might want to make a class out of that basketball:&#xD;&#xA;&#xD;&#xA;*Note: I have not tested the code below, but you get the general idea.*&#xD;&#xA;&#xD;&#xA;    public class BasketBall&#xD;&#xA;    {&#xD;&#xA;        Texture2D texture;&#xD;&#xA;        public Vector2 Position { get; set; }&#xD;&#xA;        public float Scale { get; set; }&#xD;&#xA;        float ballSpeed;&#xD;&#xA;&#xD;&#xA;        Rectangle screenRectangle;&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Returns the scaled bounding rectangle of the basketball.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public Rectangle BoundingRectangle&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return new Rectangle((int)Position.X, (int)Position.Y,&#xD;&#xA;                    (int)(texture.Width * Scale), (int)(texture.Height * Scale));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public BasketBall(string assetPath, Vector2 startPos, float scale, float startSpeed,&#xD;&#xA;            Rectangle screenRectangle)&#xD;&#xA;        {&#xD;&#xA;            texture = Content.Load&lt;Texture2D&gt;(assetPath);&#xD;&#xA;            Position = startPos;&#xD;&#xA;            Scale = scale;&#xD;&#xA;            ballSpeed = startSpeed;&#xD;&#xA;            this.screenRectangle = screenRectangle;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            Position.X += ballSpeed * gameTime.ElapsedGameTime.TotalSeconds; // multiply by delta seconds for consistent behavior on different machines&#xD;&#xA;&#xD;&#xA;            // Much more straightforward now. The scaling happens when calling BoundingRectangle&#xD;&#xA;            if (BoundingRectangle.Left &lt; 0f || BoundingRectangle.Right &gt; screenRectangle.Right)&#xD;&#xA;            {&#xD;&#xA;                ballSpeed *= -1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void Draw(SpriteBatch spriteBatch)&#xD;&#xA;        {&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;            spriteBatch.Draw(texture,&#xD;&#xA;                             Position,&#xD;&#xA;                             null,&#xD;&#xA;                             Color.White,&#xD;&#xA;                             0,&#xD;&#xA;                             Vector2.Zero,&#xD;&#xA;                             Scale,&#xD;&#xA;                             SpriteEffects.None,&#xD;&#xA;                             0);&#xD;&#xA;&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So much cleaner to use imho:&#xD;&#xA;&#xD;&#xA;    BasketBall basketBall;&#xD;&#xA;&#xD;&#xA;When you load its content:&#xD;&#xA;&#xD;&#xA;    basketBall = new BasketBall(&quot;basketBall&quot;, Vector2.Zero, 1.5f, 50f, &#xD;&#xA;                                new Rectangle(Window.ClientBounds.X, &#xD;&#xA;                                              Window.ClientBounds.Y, &#xD;&#xA;                                              Window.ClientBounds.Width, &#xD;&#xA;                                              Window.ClientBounds.Height));&#xD;&#xA;&#xD;&#xA;When you update it:&#xD;&#xA;&#xD;&#xA;    basketBall.update(gameTime);&#xD;&#xA;&#xD;&#xA;When you draw it:&#xD;&#xA;&#xD;&#xA;    basketBall.draw(spriteBatch);&#xD;&#xA;&#xD;&#xA;If you do prefer the no-class version, then I'd recommend at least keeping a `Vector2` showing the scaled measures of the sprite, for cleaner calculations. Also, a constant for the scale would be nice. Like so:&#xD;&#xA;&#xD;&#xA;    const float BALL_SCALE = 1.5f;&#xD;&#xA;    Vector2 basketBallMeasures = new Vector2(basketball.Width, basketball.Height) * BALL_SCALE;" />
  <row Id="33918" PostHistoryTypeId="2" PostId="15025" RevisionGUID="07f10f03-ed2f-4c40-8f93-53919e5d1a76" CreationDate="2011-07-20T02:03:00.263" UserId="5439" Text="Here is my personal opinion...&#xD;&#xA;&#xD;&#xA;I think that there is a market for packs of reasonably priced, well chosen, quality-controlled sound effects.  You can pick up random sounds from across the web, but then you end up with a bunch of sounds with different sampling rates, bit depths, volume levels, and overall quality that you then have to fix up yourself.&#xD;&#xA;&#xD;&#xA;Some care would be needed in choosing what makes up a pack.  I'm not sure that &quot;30 different laser sounds&quot; would make a good pack, as I might just be looking for one or two, and probably would prefer to be able to buy just the ones I like.  Packs based on themes or genres might work better, where I'm more likely to want to use most of the sounds.  The kinds of packs that I guess that I would like to see would be along the lines of:&#xD;&#xA;&#xD;&#xA; - &quot;Footstep sounds&quot;: footfalls on various surfaces (packed earth, grass, sand, gravel, wood, metal, concrete...)&#xD;&#xA;&#xD;&#xA; - &quot;FPS gunfire pack&quot;: various calibre gunfire sounds, silenced weapons, bullet impact sounds, ricochets, bullets whizzing by...&#xD;&#xA;&#xD;&#xA; - &quot;Space game pack&quot;: *a few* different energy weapon sounds, shots hitting shields, engine hum, hyperspace jump...&#xD;&#xA;&#xD;&#xA;Of course you will never please everyone, and I may have to keep searching for that perfect plasma cannon sound that wasn't in the pack, but I think that packs that can just be dropped into a game to flesh out 90% of the required sounds in one go would make life easier for the small developer." />
  <row Id="33919" PostHistoryTypeId="25" PostId="15022" RevisionGUID="baa4b7b8-bd89-4898-9b00-d2329de1258c" CreationDate="2011-07-20T03:32:08.583" Comment="http://twitter.com/#!/StackGameDev/status/93523559074377728" />
  <row Id="33920" PostHistoryTypeId="2" PostId="15026" RevisionGUID="c3cae4dd-dd8c-4f56-b9b7-782660316d58" CreationDate="2011-07-20T04:04:54.603" UserId="37" Text="I'm developing a browser plugin to provide joystick access to all browsers on all platforms. The issue that I'm running into is that OS X doesn't seem to provide Xbox 360 joystick input without installing some extra drivers, and even when those drivers are installed they map the buttons and axes completely differently than Windows and Linux.&#xD;&#xA;&#xD;&#xA;I'm using xboxdrv on Linux, which has a pretty decent mapping and is very similar to the standard Windows XBox driver mapping. On windows XP using the default XBox Controller driver the order of the x and y axes are swapped. Is there an alternative driver that can be installed?&#xD;&#xA;&#xD;&#xA;On OS X using [Colin Munro's OS X Driver][1], the mapping is totally different though. The d-pad is mapped to the first four buttons and the axes are all switched.&#xD;&#xA;&#xD;&#xA;What I want to know is what drivers do I need to install on each OS to get XBox 360 Controllers to register exactly the same as the do under Linux with xboxdrv.&#xD;&#xA;&#xD;&#xA;    OS: DRIVER&#xD;&#xA;    Linux: xboxdrv&#xD;&#xA;    Windows: ?&#xD;&#xA;    OS X: ?&#xD;&#xA;&#xD;&#xA;The reason why I prefer the xboxdrv style of controller mapping is that the mapping is pretty much the same for any other random USB controller. The two primary axes are the same and the first 5 buttons are the same. This way the XBox controller will behave like an &quot;enhanced&quot; generic USB controller and any game logic won't need to know anything about the specific controller type. I want to be able to assume the basic axes and buttons will be mapped correctly (or at least consistently) and then use the extra buttons and axes for extra functionality.&#xD;&#xA;&#xD;&#xA;The newer versions of the standard Linux X11 input also match exactly the xboxdrv mappings which is another reason that I prefer it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver" />
  <row Id="33921" PostHistoryTypeId="1" PostId="15026" RevisionGUID="c3cae4dd-dd8c-4f56-b9b7-782660316d58" CreationDate="2011-07-20T04:04:54.603" UserId="37" Text="How do I get consistent Xbox360 Controller input across Linux, Mac, and Windows?" />
  <row Id="33922" PostHistoryTypeId="3" PostId="15026" RevisionGUID="c3cae4dd-dd8c-4f56-b9b7-782660316d58" CreationDate="2011-07-20T04:04:54.603" UserId="37" Text="&lt;input&gt;&lt;cross-platform&gt;&lt;joystick&gt;&lt;xbox-controller&gt;" />
  <row Id="33926" PostHistoryTypeId="25" PostId="15012" RevisionGUID="994553f2-9269-4b5f-bf2d-b2d7dd7af5a7" CreationDate="2011-07-20T06:32:09.307" Comment="http://twitter.com/#!/StackGameDev/status/93568859143016448" />
  <row Id="33927" PostHistoryTypeId="2" PostId="15028" RevisionGUID="65915485-44da-43c1-992a-7c99a68ef50a" CreationDate="2011-07-20T07:04:08.977" UserId="1499" Text="I wrote a tutorial to specifically help with this :-)&#xD;&#xA;It explains the concepts using Sunburn for XNA. &#xD;&#xA;&#xD;&#xA;http://dsebj.evolvingsoftware.com/?p=211 [Matrix Math is Hard?]&#xD;&#xA;" />
  <row Id="33928" PostHistoryTypeId="4" PostId="15020" RevisionGUID="7e18800b-4f3e-417b-b1fd-901288355f6a" CreationDate="2011-07-20T07:12:15.317" UserId="2698" Comment="Sounds more like the question it is, and less like the request for applicants it isn't" Text="How do I recruit beta testers?" />
  <row Id="33929" PostHistoryTypeId="24" PostId="15020" RevisionGUID="7e18800b-4f3e-417b-b1fd-901288355f6a" CreationDate="2011-07-20T07:12:15.317" Comment="Proposed by 2698 approved by 14 edit id of 570" />
  <row Id="33930" PostHistoryTypeId="2" PostId="15029" RevisionGUID="790d3a15-7eb8-49f9-b7b8-5530148a4838" CreationDate="2011-07-20T07:55:30.497" UserId="8240" Text="&gt; Is there an alternative driver that can be installed?&#xD;&#xA;&#xD;&#xA;Let's assume there was; I have no idea one way or the other myself. But if there was, it would map the buttons differently. So installing a browser plugin would also install this driver, which would override the current driver and screw up the button settings in every program that uses the controller.&#xD;&#xA;&#xD;&#xA;I don't see a lot of people appreciating you doing that to their systems.&#xD;&#xA;&#xD;&#xA;It would be better for your plugin to simply detect what OS its running on and adjust the inputs accordingly. You should only install drivers if the device would not work at all without them." />
  <row Id="33931" PostHistoryTypeId="2" PostId="15030" RevisionGUID="8544287f-9fae-42de-a4ad-da90996e38cc" CreationDate="2011-07-20T08:11:00.287" UserId="7588" Text="[This blog](http://james.blogs.lincoln.ac.uk/2009/04/15/car-physics-for-games/) has four links (the third is broken), the first of which seems like an amazing resource, the others seem pretty great too. I'm probably going to read over this just for funsies, should be a good read.&#xD;&#xA;&#xD;&#xA;You could take a look at the [Rigs of Rods](http://www.rigsofrods.com/content/?s=4b718da208bdf0eaad6ad1901d4c64c2) engine, it's an open source soft-body vehicule simulator, it may give you some insight into how it's done, but could be too complex for what you want to do. Also, reading though other people's code may not be what you want to do; nevertheless it could be inspiring.&#xD;&#xA;&#xD;&#xA;[Digital Rune](http://www.digitalrune.com/Support/Blog/tabid/719/EntryId/91/Car-Physics-for-3D-Games.aspx) gives some simple info on their implementation of car physics." />
  <row Id="33932" PostHistoryTypeId="2" PostId="15031" RevisionGUID="dddd612a-dce0-4dba-9f44-e7fc20b50209" CreationDate="2011-07-20T09:25:01.467" UserId="1742" Text="If you want to just get something reasonable going, I can't more heartily recommend the talk http://video.google.com/videoplay?docid=4776766805683353325 by the physics programmer on rallycross. (a shipped game on the PS1 back in 1997, so it's very quick on modern hardware and arguably implementable in higher level languages that aren't as efficient at math as they could be)" />
  <row Id="33933" PostHistoryTypeId="25" PostId="15026" RevisionGUID="aee38f53-c3ef-4fb7-83c8-a842cc053c1a" CreationDate="2011-07-20T09:32:09.177" Comment="http://twitter.com/#!/StackGameDev/status/93614157332627456" />
  <row Id="33934" PostHistoryTypeId="2" PostId="15032" RevisionGUID="7cbb8039-7be8-4c0b-9f4d-2c5b8afbb82b" CreationDate="2011-07-20T09:40:29.957" UserId="8627" Text="Title explains the most of the questions. &#xD;&#xA;&#xD;&#xA;The OpenGL ES spec says that the transpose value must be false or an INVALID_VALUE is generated. Why then have the parameter?" />
  <row Id="33935" PostHistoryTypeId="1" PostId="15032" RevisionGUID="7cbb8039-7be8-4c0b-9f4d-2c5b8afbb82b" CreationDate="2011-07-20T09:40:29.957" UserId="8627" Text="Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?" />
  <row Id="33936" PostHistoryTypeId="3" PostId="15032" RevisionGUID="7cbb8039-7be8-4c0b-9f4d-2c5b8afbb82b" CreationDate="2011-07-20T09:40:29.957" UserId="8627" Text="&lt;opengl-es&gt;&lt;webgl&gt;" />
  <row Id="33937" PostHistoryTypeId="2" PostId="15033" RevisionGUID="78dc9dee-e12c-4c68-8ceb-09d87c50de86" CreationDate="2011-07-20T10:03:51.807" UserId="8275" Text="I'm an absolute beginner with game development and all I know about collision avoidance/resolution, I learnt it _on_ or _through_ this site in the past week... so don't hesitate to correct me if what I'm asking here is based on wrong assumptions / misunderstanding. I tried of my best to be clear, but that said, the subject is still novel to me.&#xD;&#xA;&#xD;&#xA;Vehicles&#xD;&#xA;---&#xD;&#xA;In my game, I have vehicles that move autonomously. They are placed in a 3D space, and their motion is governed by a number of variables which are different for each vehicles. The one of interest here are primarily:&#xD;&#xA;&#xD;&#xA; - Only *forward* motion.&#xD;&#xA; - A *speed* that can vary between min &amp; max, but whose min is **not** (even close to) zero.&#xD;&#xA; - A *steering radius* that is dependent from the speed (the higher speed, the larger radius)&#xD;&#xA; - Two *maximum accelerations* (for decreasing and increasing speed)&#xD;&#xA;&#xD;&#xA;Goal&#xD;&#xA;---&#xD;&#xA;My goal is to implement some sort of AI that will a **100% accurate collision avoidance** (i.e. I will be sure that the vehicles will **never ever** collide).&#xD;&#xA;&#xD;&#xA;Design&#xD;&#xA;---&#xD;&#xA; - Although **I would prefer more the idea of having the AI &quot;onboard&quot;** (i.e. each vehicle having it's own &quot;collision avoidance AI&quot;, eventually querying and/or sending messages to other vehicles) it is also possible for me to implement the CA AI at a central level (dispatching commands to the vehicles).&#xD;&#xA; - In most of the cases, the vehicle will simply have to steer clear of each other in any direction, but under certain circumstances, they will have to avoid collision **and going towards the same target**&#xD;&#xA;&#xD;&#xA;What I found so far and where I got stuck&#xD;&#xA;---&#xD;&#xA;Within the many many links I found in other questions on this very site, I found of particular use these ones:&#xD;&#xA;&#xD;&#xA; 1. [Collision between pool balls][1]&#xD;&#xA; 2. [Unalligned collision avoidance][2]&#xD;&#xA; 3. [Queuing][3]&#xD;&#xA;&#xD;&#xA;While these three links &quot;opened my eyes&quot; in many ways, it is not immediately clear to me how to use that information in my case. In particular article #2 only &quot;tries&quot; to prevent collision (but collisions do happens time to time). While article #3 needs to stop vehicles sometimes to prevent collisions.&#xD;&#xA;&#xD;&#xA;What I also noticed, is that the collision avoidance algorithms linked above use a **&quot;instant projection&quot; of linear speed** to check if something is on the way of the vehicle. I was wondering if this is enough in my case or if I had to project my position in a more realistic way (e.g.: If I am 60° into a steering 90° to the right, I should calculate my position for the rest of the 30° of the curve, and then assuming linear motion).&#xD;&#xA;&#xD;&#xA;Finally, I am particularly **afraid of deadlocks**. In other words: although the density of vehicles in the world will be fairly low, I am worried that given a certain numbers of vehicles converging towards the same point, once they will realise they are on a collision course, any evasive manoeuvres will be impossible as it would bring the vehicle on a collision path with some other ones.&#xD;&#xA;&#xD;&#xA;Question&#xD;&#xA;---&#xD;&#xA;**How can I reach my &quot;goal&quot;?** An in depth-explanation is of course very much appreciated, but links to external resources would also be of great help (I'm sure I'm not the first with this problem, but probably I used the wrong keywords to search the web?)&#xD;&#xA;&#xD;&#xA;Thank you in advance for your help! &#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/Unaligned.html&#xD;&#xA;  [3]: http://www.red3d.com/cwr/steer/Doorway.html" />
  <row Id="33938" PostHistoryTypeId="1" PostId="15033" RevisionGUID="78dc9dee-e12c-4c68-8ceb-09d87c50de86" CreationDate="2011-07-20T10:03:51.807" UserId="8275" Text="Collision 100% avoidance implementation" />
  <row Id="33939" PostHistoryTypeId="3" PostId="15033" RevisionGUID="78dc9dee-e12c-4c68-8ceb-09d87c50de86" CreationDate="2011-07-20T10:03:51.807" UserId="8275" Text="&lt;collision-detection&gt;&lt;language-agnostic&gt;" />
  <row Id="33940" PostHistoryTypeId="2" PostId="15034" RevisionGUID="c550cfa9-bb99-439f-9692-783e1b51aae3" CreationDate="2011-07-20T10:11:25.440" UserId="7588" Text="The parameter exists because the OpenGL ES spec conforms to the OpenGL spec :&#xD;&#xA;[OpenGL ES 2.0 is defined relative to the OpenGL 2.0 specification](http://www.khronos.org/opengles/)&#xD;&#xA;&#xD;&#xA;In the OpenGL spec, this parameter [exists](http://www.opengl.org/sdk/docs/man/xhtml/glUniform.xml) hence it also exists in the OpenGL ES spec, even if it is unused." />
  <row Id="33941" PostHistoryTypeId="2" PostId="15035" RevisionGUID="186cb035-dabf-49b6-8657-1f0ebe1ca9b9" CreationDate="2011-07-20T10:12:55.500" UserId="2798" Text="Because OES is a subset of standard OpenGL, and the functions must have the same parameters in both implementations. In OpenGL the parameter *transpose* is used to specify if the matrix is in row-major or column-major order, but since OES only supports column-major, it must be always false." />
  <row Id="33942" PostHistoryTypeId="2" PostId="15036" RevisionGUID="edf21484-5467-4015-aabf-6f8ad86be552" CreationDate="2011-07-20T10:46:45.203" UserId="8455" Text="position_.z shouldn't be larger than 1 or lower than 0. You should try to use linear depth for the display, which after applying the projection matrix is (usually) stored in the w coordinate instead. Take that, divide by an appropriate number (depending on the scale of your game) to bring the numbers between 0 and 1 for your interesting depth and watch.&#xD;&#xA;&#xD;&#xA;gl_fragcoord is not relevant to this discussion; gl_fragdepth is an output variable to modify the post-projection depth in the pixel shader. You're not trying to do that, so don't use that either." />
  <row Id="33943" PostHistoryTypeId="2" PostId="15037" RevisionGUID="6f21fa64-812a-4c6c-a39c-ed3ca84a2aad" CreationDate="2011-07-20T11:08:42.290" UserId="8563" Text="... I have two arrays one for projectiles, and one for targets, every target and every projectile has tag, tag with color(source code I take from Ray Wanderlich). In my small game, when projectile collide with target I compare their tags if tags equal I deleted projectile and target, but if not equal I want insert projectile at position of target which projectile collide and other targets must shift in right or left.&#xD;&#xA;&#xD;&#xA;Some code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;NSMutableArray *projectilesToDelete = [[NSMutableArray alloc] init];&#xD;&#xA;                             CCSprite * projectile;&#xD;&#xA;                                              for (projectile in _projectilesArray){&#xD;&#xA;                                                   CGRect projectileRect = [projectile boundingBox];&#xD;&#xA;&#xD;&#xA;  NSMutableArray *targetsToDelete = [[NSMutableArray alloc] init];&#xD;&#xA;                            CCSprite * target;&#xD;&#xA;                                             for (target in _targetsArray){&#xD;&#xA;                                                  CGRect targetRect = [target boundingBox];&#xD;&#xA;&#xD;&#xA;            if (CGRectIntersectsRect(projectileRect, targetRect)) {              //collide;&#xD;&#xA;                //NSUInteger index = [targetsToDelete indexOfObject:target];&#xD;&#xA;                // NSLog(@&quot;%@&quot;, index);&#xD;&#xA;                     if([target tag]==[projectile tag])                                    //compare tag's&#xD;&#xA;                                       {[targetsToDelete addObject:target];}&#xD;&#xA;                     if([target tag]!=[projectile tag])                                     //here my problem&#xD;&#xA;                                       {NSLog(@&quot;-&quot;);&#xD;&#xA;                                       [targetsToDelete addObject:projectile];&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;            }}&#xD;&#xA;&#xD;&#xA;		for (CCSprite *target in targetsToDelete) {&#xD;&#xA;			[_targetsArray removeObject:target];&#xD;&#xA;			[self removeChild:target cleanup:YES];&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if (targetsToDelete.count &gt; 0) {&#xD;&#xA;			[projectilesToDelete addObject:projectile];&#xD;&#xA;		}&#xD;&#xA;		//[targetsToDelete release];&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	for (CCSprite *projectile in projectilesToDelete) {&#xD;&#xA;		[_projectilesArray removeObject:projectile];&#xD;&#xA;		[self removeChild:projectile cleanup:YES];&#xD;&#xA;	}&#xD;&#xA;	//[projectilesToDelete release];" />
  <row Id="33944" PostHistoryTypeId="1" PostId="15037" RevisionGUID="6f21fa64-812a-4c6c-a39c-ed3ca84a2aad" CreationDate="2011-07-20T11:08:42.290" UserId="8563" Text="Insert object at index, when two objects collide." />
  <row Id="33945" PostHistoryTypeId="3" PostId="15037" RevisionGUID="6f21fa64-812a-4c6c-a39c-ed3ca84a2aad" CreationDate="2011-07-20T11:08:42.290" UserId="8563" Text="&lt;collision-detection&gt;&lt;iphone&gt;&lt;cocos2d&gt;" />
  <row Id="33946" PostHistoryTypeId="2" PostId="15038" RevisionGUID="f4f4e1c9-4325-4fab-830e-469103b94cb4" CreationDate="2011-07-20T11:44:01.307" UserId="8701" Text="I've started learning how to use OpenGL a while back, using the *OpenGL SuperBible, Fifth Edition*, and I've had people arguing about the fact that the book doesn't really teach how to use OpenGL but instead it teaches how to use two of the wrapper libraries related to it, glut and glTools.&#xD;&#xA;&#xD;&#xA;I've also been told that glut should never be used for full-blown projects, but there was no valid reason supplied with the argument.&#xD;&#xA;&#xD;&#xA;My question is why, and when should I not use the glTools/glut libraries, and what should I use instead?" />
  <row Id="33947" PostHistoryTypeId="1" PostId="15038" RevisionGUID="f4f4e1c9-4325-4fab-830e-469103b94cb4" CreationDate="2011-07-20T11:44:01.307" UserId="8701" Text="Why should I not use glTools/glut when developing complete applications?" />
  <row Id="33948" PostHistoryTypeId="3" PostId="15038" RevisionGUID="f4f4e1c9-4325-4fab-830e-469103b94cb4" CreationDate="2011-07-20T11:44:01.307" UserId="8701" Text="&lt;opengl&gt;&lt;tools&gt;&lt;glut&gt;" />
  <row Id="33949" PostHistoryTypeId="5" PostId="15008" RevisionGUID="d00802d7-e7cb-45d9-a744-56fb72cf3118" CreationDate="2011-07-20T11:55:55.367" UserId="2188" Comment="cosmetics (no need to specify you fixed typos, nor to sign your message)" Text="I was wondering if anyone knew or had knowledge of how to program a climbing system like the one found in tomb raider/uncharted.&#xD;&#xA;&#xD;&#xA;I had thought of just having bounding boxes at all the climbable positions in the game world and then check for collision. If the player was inside the box then they would be &quot;hanging&quot; from the edge. Anyone have any better ideas/improvments?&#xD;&#xA;&#xD;&#xA;I already have my rendering set up using directx9 and was going to worry about animation later on.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="33950" PostHistoryTypeId="24" PostId="15008" RevisionGUID="d00802d7-e7cb-45d9-a744-56fb72cf3118" CreationDate="2011-07-20T11:55:55.367" Comment="Proposed by 2188 approved by -1 edit id of 571" />
  <row Id="33951" PostHistoryTypeId="5" PostId="15008" RevisionGUID="c7412d23-340d-4149-a830-018a5a21ca15" CreationDate="2011-07-20T11:55:55.523" UserId="14" Comment="cosmetics (no need to specify you fixed typos, nor to sign your message)" Text="I was wondering if anyone knew or had knowledge of how to program a climbing system like the one found in tomb raider/uncharted.&#xD;&#xA;&#xD;&#xA;I had thought of just having bounding boxes at all the climbable positions in the game world and then check for collision. If the player was inside the box then they would be &quot;hanging&quot; from the edge. Anyone have any better ideas/improvments?&#xD;&#xA;&#xD;&#xA;I already have my rendering set up using directx9 and was going to worry about animation later on." />
  <row Id="33952" PostHistoryTypeId="5" PostId="15032" RevisionGUID="3cb2ee01-a831-461e-b9b7-e3964c227117" CreationDate="2011-07-20T11:56:10.750" UserId="7588" Comment="added link to spec, removed title reference" Text="Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?&#xD;&#xA;&#xD;&#xA;[The OpenGL ES spec](http://www.khronos.org/opengles/sdk/docs/man/xhtml/glUniform.xml) says that the transpose value must be false or an INVALID_VALUE is generated. Why then have the parameter?" />
  <row Id="33953" PostHistoryTypeId="24" PostId="15032" RevisionGUID="3cb2ee01-a831-461e-b9b7-e3964c227117" CreationDate="2011-07-20T11:56:10.750" Comment="Proposed by 7588 approved by 14 edit id of 572" />
  <row Id="33954" PostHistoryTypeId="2" PostId="15039" RevisionGUID="97156461-e297-46da-81f9-0d02b3b92002" CreationDate="2011-07-20T12:04:03.463" UserId="678" Text="Valve's 2009 presentation on the [AI systems behind Left4Dead][1] goes into considerable detail on the system used for climbing, including ledge detection, obstacle height, animation selection etc.&#xD;&#xA;&#xD;&#xA;It is mostly aimed at NPC animation, but most of the actual climbing code should be very similar.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf" />
  <row Id="33955" PostHistoryTypeId="2" PostId="15040" RevisionGUID="aa9616eb-7b4f-48a0-894e-5088f58653a3" CreationDate="2011-07-20T12:30:30.380" UserId="1839" Text="You can try to contact the publisher, and ask them directly. [Google Books](http://books.google.com/books?id=rVX3EJWw3BYC&amp;source=gbs_book_other_versions_r&amp;cad=3) states the publisher is &quot;Thomson Course Technology&quot;. &#xD;&#xA;&#xD;&#xA;[This page](http://officialcorp.com/thomson-course-technology-5470/) says they were renamed to &quot;Cengage Learning&quot;, it also has all contact information, so you can just call or send an email to ask them directly for their ebook offers." />
  <row Id="33956" PostHistoryTypeId="25" PostId="15033" RevisionGUID="8a9eb84e-d7e2-456a-8bd0-e4be7d87397b" CreationDate="2011-07-20T12:32:08.353" Comment="http://twitter.com/#!/StackGameDev/status/93659453299245056" />
  <row Id="33957" PostHistoryTypeId="2" PostId="15041" RevisionGUID="73eacfb9-6603-4c66-a257-befc935939bc" CreationDate="2011-07-20T12:35:32.860" UserId="3505" Text="Here is an approach: Every vehicle has a short projected path where the vehicle in the end slows down and enters a loop, these paths may not overlap. Whenever a vehicle comes to the point where it is set to slow down you try to generate a new path that does not overlap any of the existing. If that is not found to be possible the vehicle continues on it's given path and retries making a new path periodically.&#xD;&#xA;&#xD;&#xA;The method could be improved to allow tighter traffic by letting paths leading to loops overlap each other and loops where it can be determined that this will not cause a collision." />
  <row Id="33958" PostHistoryTypeId="2" PostId="15042" RevisionGUID="fc1f789d-77b6-41cf-b3da-340b75a206b2" CreationDate="2011-07-20T12:47:09.937" UserId="1839" Text="The argument against glut in big projects is that you don't have access to the application loop, so you can't change it to fit your needs. All it has are some callbacks which are triggered from glut, but you don't have much control about it.&#xD;&#xA;&#xD;&#xA;However, the purpose of glut is to create demos and test apps easily and cross platform, without the need to deal with ugly OS code to create windows, its just a question of some lines of code using glut." />
  <row Id="33959" PostHistoryTypeId="2" PostId="15043" RevisionGUID="b075059b-ad08-4db3-b7cc-06be1707b5f1" CreationDate="2011-07-20T13:53:50.940" UserId="2612" Text="I recommend that you play the original Portal with the developer commentary turned on - a large chunk of the commentary is devoted to how they introduced the player to the portal gun, a game mechanic that you could definitely consider &quot;fairly confusing&quot; (in certain respects thats kind of the point!)&#xD;&#xA;&#xD;&#xA;Rather than explaining game mechanics through tutorials and text / voiceover, Portal introduces game mechanics through a series of easily achievable challenges that demonstrate the mechanics.  For example: &#xD;&#xA;&#xD;&#xA; - The first portal experienced by the player is positioned in such a way that the player is forced to observe themselves walking through the first portal.  This perfectly explains the relationship between the two portals without a single word, as well as teaching the user that they are able to walk through portals.&#xD;&#xA; - The player then goes through a series of puzzles of increasing complexity where portals are placed for them rather than giving the player the portal gun immediately.  Each of these puzzles has a specific goal, building on everything that the player has already seen in order to teach the player a new mechanic (for example what surfaces portals can and can't be placed on, or how portals can be used to reach otherwise inaccessible positions).&#xD;&#xA;&#xD;&#xA;The key is to teach the player **one thing at a time** in a way that is engaging and fun by demonstrating the game mechanic to the player, rather than telling them about it (if the player figures out a mechanic for themslves rather than being told about it then not only is it more fun and involved for the player but they are more likely to understand what is going on).&#xD;&#xA;&#xD;&#xA;Keep each step nice and simple - if you find that players struggle with certain mechanics then go back and split it down into even more simpler steps.  To solve the first &quot;puzzle&quot; in Portal the player only has to walk through the portal!&#xD;&#xA;&#xD;&#xA;Don't think of your tutorial as being something that the player must do to learn how to play the game - *your tutorial is part of your game* (and usually the first thing they do - first impressions count!) Also listen to the Portal developer commentary - it really is very interesting." />
  <row Id="33960" PostHistoryTypeId="5" PostId="14977" RevisionGUID="8b4186b0-ad40-4f1a-9e64-49dc2afd9144" CreationDate="2011-07-20T14:01:17.233" UserId="1198" Comment="deleted 11 characters in body" Text="If you haven't read it already try The Art of Game Design by Jesse Schell. It's available for Kindle and very good, but not specific to strategy.&#xD;&#xA;&#xD;&#xA;I publish books and ebooks for game developers so if you have a clear idea of what you want please post the idea here: http://www.google.com/moderator/#16/e=7d41d" />
  <row Id="33961" PostHistoryTypeId="5" PostId="15037" RevisionGUID="dc9a7f8b-97c8-4365-b0b4-cb52ac22e907" CreationDate="2011-07-20T14:41:41.627" UserId="7588" Comment="improved formatting and wording in the question, also removed commented lines for clarity" Text="I have two arrays: one for projectiles, and one for targets.&#xD;&#xA;&#xD;&#xA;Every target and every projectile has tag, and a tag with color (source code I took from Ray Wanderlich).&#xD;&#xA;&#xD;&#xA;In my small game, when a projectile collides with a target I compare their tags, if the tags are the same I delete the projectile and target, but if they are not I want to insert projectile at the position of the target (with which the projectile collided) and make the other targets shift right or left.&#xD;&#xA;&#xD;&#xA;Some code:&#xD;&#xA;&#xD;&#xA;	NSMutableArray *projectilesToDelete = [[NSMutableArray alloc] init];&#xD;&#xA;	CCSprite * projectile;&#xD;&#xA;	for (projectile in _projectilesArray)&#xD;&#xA;	{&#xD;&#xA;		CGRect projectileRect = [projectile boundingBox];&#xD;&#xA;&#xD;&#xA;		NSMutableArray *targetsToDelete = [[NSMutableArray alloc] init];&#xD;&#xA;		CCSprite * target;&#xD;&#xA;		for (target in _targetsArray)&#xD;&#xA;		{&#xD;&#xA;			CGRect targetRect = [target boundingBox];&#xD;&#xA;&#xD;&#xA;			if (CGRectIntersectsRect(projectileRect, targetRect))&#xD;&#xA;			{&#xD;&#xA;				if([target tag]==[projectile tag])&#xD;&#xA;				{&#xD;&#xA;					[targetsToDelete addObject:target];&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;				if([target tag]!=[projectile tag]) /* &lt;-- _HERE IS MY PROBLEM_ */&#xD;&#xA;				{&#xD;&#xA;					NSLog(@&quot;-&quot;);&#xD;&#xA;					[targetsToDelete addObject:projectile];&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		for (CCSprite *target in targetsToDelete)&#xD;&#xA;		{&#xD;&#xA;			[_targetsArray removeObject:target];&#xD;&#xA;			[self removeChild:target cleanup:YES];&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if (targetsToDelete.count &gt; 0)&#xD;&#xA;		{&#xD;&#xA;			[projectilesToDelete addObject:projectile];&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	for (CCSprite *projectile in projectilesToDelete)&#xD;&#xA;	{&#xD;&#xA;		[_projectilesArray removeObject:projectile];&#xD;&#xA;		[self removeChild:projectile cleanup:YES];&#xD;&#xA;	}&#xD;&#xA;" />
  <row Id="33962" PostHistoryTypeId="24" PostId="15037" RevisionGUID="dc9a7f8b-97c8-4365-b0b4-cb52ac22e907" CreationDate="2011-07-20T14:41:41.627" Comment="Proposed by 7588 approved by 1430 edit id of 573" />
  <row Id="33963" PostHistoryTypeId="2" PostId="15044" RevisionGUID="bea6790d-7e10-4235-8645-ea311b2baebc" CreationDate="2011-07-20T15:20:05.620" UserId="1430" Text="In general, this information is quite valuable and (for casual games in particular) difficult to extract via data mining. Unfortunately this means you will likely have to pay for it if you want any kind of real details.&#xD;&#xA;&#xD;&#xA;The [Casual Gaming Association][1] has some market research available for purchase. The Park Associates group does game market research ([example study available here][2]). [Here][3] is a collection of video game market reports, some of which may be relevant.&#xD;&#xA;&#xD;&#xA;The [NPD group][4] is one such market research firm that provides some of their data to the public for free (but they still sell a fair bit of it). [This wiki][5] has a nicely categorized collection of their sales figures for example (since the NPD site itself can be a chore to navigate for real data). But the freely-available stuff is likely not going to be as well-separated as you want, so you probably can't extract much in the way of data to answer your questions about casual games. The NPD group also focuses mainly on retail distribution, which will exclude most casual games entirely.&#xD;&#xA;&#xD;&#xA;Casual games present a particularly difficult challenge for market analysts and researchers because many such games exist in proprietary channels that are difficult to do data mining on, especially in a homogenous fashion (Steam is different than Facebook is different than some Flash web portal; everybody may use slightly different payment processors; sales of some casual games go to individuals and not neccessarily companies, so access to information on those apparently-interpersonal transactions may be more restricted; et cetera). &#xD;&#xA;&#xD;&#xA;You can try your luck searching for &quot;[casual game market research][6]&quot; or &quot;[casual game market share][7].&quot; If all you really want is a rough high-level breakdown, perusing some of the articles from the latter query may give you what you need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.casualgamesassociation.org/research_news.php&#xD;&#xA;  [2]: http://parksassociates.ecnext.com/coms2/summary_0256-11124_ITM&#xD;&#xA;  [3]: http://www.marketresearch.com/browse.asp?categoryid=774&#xD;&#xA;  [4]: http://www.npd.com&#xD;&#xA;  [5]: http://vgsales.wikia.com/wiki/NPD_sales_figures&#xD;&#xA;  [6]: http://www.google.com/search?q=casual%20game%20market%20research&#xD;&#xA;  [7]: http://www.google.com/search?q=casual%20game%20market%20share" />
  <row Id="33964" PostHistoryTypeId="25" PostId="15038" RevisionGUID="3f386ff0-fb6b-4a4b-bfd0-e7404277e12a" CreationDate="2011-07-20T15:32:08.703" Comment="http://twitter.com/#!/StackGameDev/status/93704751962791938" />
  <row Id="33965" PostHistoryTypeId="2" PostId="15045" RevisionGUID="aa781edd-8a92-4e4f-8efe-eacb3a8aff96" CreationDate="2011-07-20T15:56:40.683" UserId="51" Text="Isn't this a simple programming problem?&#xD;&#xA;&#xD;&#xA;Change your `for in` loop to a standard `for` loop, then in your problem area use `[targetsToDelete addObject:*something* atIndex:*i*]`" />
  <row Id="33966" PostHistoryTypeId="2" PostId="15046" RevisionGUID="0235de02-7bf3-4249-8d14-981f2acd794e" CreationDate="2011-07-20T16:19:31.130" UserId="7957" Text="I'm already on Steam and it can be hard to get a reply from Valve sometimes. They also have a LOT of turnaways - and their policy is to not tell you why. Which kind of sucks." />
  <row Id="33968" PostHistoryTypeId="5" PostId="14995" RevisionGUID="3977c4e8-aa05-45ca-963c-980e1de8965d" CreationDate="2011-07-20T16:52:39.927" UserId="2061" Comment="added 42 characters in body" Text="It sounds like you want to keep the speed of the object at some constant value over the entire curve - knowing the arc-length won't help you do this.  It will help you calculate at what time the object would reach its end-point *if* it were going at that speed, so it will be better than what you have now (the object will have the same average speed between all points), but the actual speed of the object will still vary as it moves around the curve.&#xD;&#xA;&#xD;&#xA;A better solution would be to change our parametric parameter *(the parameter that goes from 0 to 1, which I'll call `s` to avoid confusion with `t = time`)* at a variable-rate `ds/dt`, which is determined by what speed you want the object to be moving at that point on the curve.  So in other words, instead of changing `s` by 0.01 each frame, we might change it by 0.005 one frame, 0.02 the next, etc.&#xD;&#xA;&#xD;&#xA;We do this by calculating the derivatives of `x` (`dx/ds`) and `y` (`dy/ds`) each frame, then setting &#xD;&#xA;&lt;pre&gt;ds/dt = speed / sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;That is, by taking the speed we want to go, and dividing by the speed we'd actually be going if we were changing `s` at a fixed increment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;##Proof##&#xD;&#xA;&#xD;&#xA;We want the speed of our object to be constant; let's give that constant the name `speed`.&#xD;&#xA;&#xD;&#xA;We learn in second-year calculus that, for parametric equations `x(s)` and `y(s)`,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/dt)&lt;sup&gt;2&lt;/sup&gt;)&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;We also learn that&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;dx/dt = dx/ds * ds/dt &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;(chain rule)&lt;/em&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Thus,&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;speed = sqrt( (dx/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; + (dy/ds)&lt;sup&gt;2&lt;/sup&gt; (ds/dt)&lt;sup&gt;2&lt;/sup&gt; )&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Solving for `ds/dt`, we get the stated equation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;###Calculating the derivatives###&#xD;&#xA;&#xD;&#xA;I've never worked with those particular splines, but I understand they just give `x(s)` and `y(s)` in terms of cubic-equations of `s`.  Thus, we can find the derivative `dx/ds` easily:  if&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;x(s) = a*s&lt;sup&gt;3&lt;/sup&gt; + b*s&lt;sup&gt;2&lt;/sup&gt; + c*s + e&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;then&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;dx/ds = 3a*s&lt;sup&gt;2&lt;/sup&gt; + 2b*s + c&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;*(Same for `dy/ds`)* Of course, you'll need to know the exact values of `a`, `b`, and `c` to do this.  According this [this page][1], those values are easy to find.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Finally, to answer the question in the title:  finding the arc-length equation of a parametric function involves solving a [fairly complicated definite integral][2]; even for the simple case of a cubic-equation, it can't be done for the general case.&#xD;&#xA;&#xD;&#xA;Thus, you'll have to [estimate the integral numerically][3].  *&quot;Cutting the spline into 10 straight lines and summing their lengths&quot;* as you suggest is [one very simple way of doing this][4]; however, there are [slightly more complicated methods][5] that will give you much more accurate results using fewer line-segments.&#xD;&#xA;&#xD;&#xA;[1]: http://www.mvps.org/directx/articles/catmull/&#xD;&#xA;[2]: http://en.wikipedia.org/wiki/Arc_length#Finding_arc_lengths_by_integrating&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Numerical_integration&#xD;&#xA;[4]: http://en.wikipedia.org/wiki/Trapezoidal_rule&#xD;&#xA;[5]: http://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_quadrature" />
  <row Id="33969" PostHistoryTypeId="2" PostId="15047" RevisionGUID="ae8bc452-244a-4ebf-8b75-4774e03cd81f" CreationDate="2011-07-20T17:17:44.887" UserId="8750" Text="Im having some trouble with locomtions (Unity3D asset) IK feet placement. I wouldn't call it &quot;very bad&quot;, but it definitely isn't as smooth as the Locomotion System Examples.&#xD;&#xA;&#xD;&#xA;The strangest behavior (that is probably linked to the problem) are the rendered foot markers that &quot;guess&quot; where the characters next step will be. In the demo, they are smooth and stable. However, in my project, they keep flickering, as if Locomotion changed its &quot;guess&quot; every frame, and sometimes, the automatic defined step is too close to the previous step, or sometimes, too distant, creating a very irregular pattern.&#xD;&#xA;&#xD;&#xA;The configuration is (apparently)Identical to the human example in the demo, so I guessing the problem is my model and/or animation. Problem is, I can't figure out was it is =S&#xD;&#xA;&#xD;&#xA;Has anyone experienced the same problem? I uploaded a video of the bug to help interpreting the issue (excuse the HORRIBLE quality, I was in a hurry): http://www.youtube.com/watch?v=9jR9OYhB-ZQ&#xD;&#xA;" />
  <row Id="33970" PostHistoryTypeId="1" PostId="15047" RevisionGUID="ae8bc452-244a-4ebf-8b75-4774e03cd81f" CreationDate="2011-07-20T17:17:44.887" UserId="8750" Text="Locomotion-system with irregular IK" />
  <row Id="33971" PostHistoryTypeId="3" PostId="15047" RevisionGUID="ae8bc452-244a-4ebf-8b75-4774e03cd81f" CreationDate="2011-07-20T17:17:44.887" UserId="8750" Text="&lt;unity&gt;&lt;assets&gt;" />
  <row Id="33972" PostHistoryTypeId="2" PostId="15048" RevisionGUID="7cbd7507-4a71-4016-941c-ee104969939d" CreationDate="2011-07-20T17:23:39.160" UserId="1929" Text="So I'm planning to get into iPhone dev (2D games). I understand that my only real option is to get a Mac. I'll probably go the MonoTouch route.&#xD;&#xA;&#xD;&#xA;I'm not sure what hardware to buy; I just want the minimum that'll be &quot;good enough&quot; to develop with. [Some posts][1] recommend a Mac Mini, although it seems on the more expensive side; even on the iPhone front, I'm not sure what to look for.&#xD;&#xA;&#xD;&#xA;Also, I may skip on the iPhone until I'm ready to launch my first game, since I can get away with the MonoTouch evaluation version. (Albeit that it's probably not the best idea.)&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/5981/hardware-for-iphone-2d-games-development" />
  <row Id="33973" PostHistoryTypeId="1" PostId="15048" RevisionGUID="7cbd7507-4a71-4016-941c-ee104969939d" CreationDate="2011-07-20T17:23:39.160" UserId="1929" Text="Minimum Hardware for iPhone Dev" />
  <row Id="33974" PostHistoryTypeId="3" PostId="15048" RevisionGUID="7cbd7507-4a71-4016-941c-ee104969939d" CreationDate="2011-07-20T17:23:39.160" UserId="1929" Text="&lt;iphone&gt;&lt;hardware&gt;" />
  <row Id="33975" PostHistoryTypeId="2" PostId="15049" RevisionGUID="c317f41e-6458-4c39-a81c-aef1bd46936a" CreationDate="2011-07-20T17:50:38.963" UserId="7041" Text="The cheapest mac you can find that is capable of running Lion (somewhat future proof plan) will allow you to develop for iOS.&#xD;&#xA;&#xD;&#xA;Look at the Apple refurb store if its available online in your country.&#xD;&#xA;" />
  <row Id="33976" PostHistoryTypeId="16" PostId="14913" RevisionGUID="565411c6-c888-4983-a192-e892dbc9bc1f" CreationDate="2011-07-20T17:54:36.653" UserId="14" />
  <row Id="33977" PostHistoryTypeId="16" PostId="14977" RevisionGUID="3b0ad46b-507d-48ef-b83c-acdf297d19fb" CreationDate="2011-07-20T17:54:36.653" UserId="14" />
  <row Id="33978" PostHistoryTypeId="16" PostId="15040" RevisionGUID="3ab4bf03-8a1c-4ecf-a8b3-862ea751f89d" CreationDate="2011-07-20T17:54:36.653" UserId="14" />
  <row Id="33979" PostHistoryTypeId="2" PostId="15050" RevisionGUID="205a05e4-1fb8-42ae-9e75-115a12a9da20" CreationDate="2011-07-20T17:59:02.563" UserId="8240" Text="GLTools and GLUT are not the same thing. GLUT is responsible for dealing with things outside of OpenGL. GLUT creates and manages a window and an OpenGL context; the actual stuff that goes on within that context (aka: OpenGL) is not GLUT's responsibility.&#xD;&#xA;&#xD;&#xA;Maik already covered the reasons why you don't see GLUT in serious applications. GLTools is another matter.&#xD;&#xA;&#xD;&#xA;GLTools is just a framework, a wrapper around OpenGL stuff. There are many reasons not to use it in serious work:&#xD;&#xA;&#xD;&#xA; 1. It's inefficient. If performance matters, you're going to want to sidestep it.&#xD;&#xA; 2. It's not very good. Take the GLShaderManager for example. It either loads the shaders or returns 0. If there is a compiler/linker error, it gives no information on this. Yes, it writes the log to stderr, but not everyone has stderr piped to somewhere that is visible. Exceptions are rather harder to ignore.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&gt; I've had people arguing about the fact that the book doesn't really teach how to use OpenGL but instead it teaches how to use two of the wrapper libraries related to it&#xD;&#xA;&#xD;&#xA;This is an aside, but generally the problem with regard to this is quite simple. 5th teaches you to use the framework *before* explaining what that framework is doing. So you learn how to use its mesh loading, how to use its perspective matrix generation code, its default shaders, etc, all *before* learning what a shader is, what vertex attributes are, and so forth.&#xD;&#xA;&#xD;&#xA;It's basically fixed-function programming for the first part of the book. It just uses its own fixed-function code rather than OpenGL's.&#xD;&#xA;&#xD;&#xA;It's not that it uses a framework that's the problem. The problem is that it uses the framework to hide details that haven't been explained, rather than to hide details that are unimportant to the current lesson. After you've seen the shader loading code a few times, you don't need to see it again, so it can be a library function.&#xD;&#xA;&#xD;&#xA;A better way to structure the book would have been to use the pieces of the framework *after* showing the underlying OpenGL calls that the framework is doing. The standard set of shaders are fine, but it should use them only after the user has seen shaders in action manually. The same goes for mesh loading and handling, textures, etc." />
  <row Id="33980" PostHistoryTypeId="2" PostId="15051" RevisionGUID="46ab9500-b4f0-41b7-a595-cd038e9d40e7" CreationDate="2011-07-20T18:00:54.460" UserId="3830" Text="I think you can go with a pretty old &amp; bare bones system.  I'm currently using a 5 year old Mac Mini for iOS development with no issue.  Currently running OS X 10.6.8.  " />
  <row Id="33981" PostHistoryTypeId="5" PostId="15019" RevisionGUID="e6911729-ae85-4805-a949-8ae387b26ed3" CreationDate="2011-07-20T18:30:15.477" UserId="1198" Comment="deleted 27 characters in body" Text="I was wondering if anyone has released or tried to release on Steam and how much time it took Steam to respond to your game submissions, I cant find any info about it on their website and its been over a month now since I have submitted and have yet to even get a confirmation email.&#xD;&#xA;&#xD;&#xA;Is this to be expected from sources such as these? Ive sent them two emails so far at 3 weeks apart and have to make a decision on what to do with the game and can not wait much longer." />
  <row Id="33982" PostHistoryTypeId="25" PostId="15021" RevisionGUID="c114f75d-94dc-4bdb-8524-4ebc037a7c3e" CreationDate="2011-07-20T18:32:13.273" Comment="http://twitter.com/#!/StackGameDev/status/93750051448426496" />
  <row Id="33983" PostHistoryTypeId="5" PostId="15049" RevisionGUID="d3ce2388-012c-47cc-b8a3-38eb0740175c" CreationDate="2011-07-20T18:33:23.930" UserId="7041" Comment="added 18 characters in body" Text="The cheapest mac you can find that is capable of running Lion (somewhat future proof plan) will allow you to develop for iOS for years to come.&#xD;&#xA;&#xD;&#xA;Look at the Apple refurb store if its available online in your country.&#xD;&#xA;" />
  <row Id="33984" PostHistoryTypeId="6" PostId="15048" RevisionGUID="b0c00620-7f44-42e7-8eaa-2c91500cd29a" CreationDate="2011-07-20T19:19:02.760" UserId="1929" Comment="edited tags" Text="&lt;iphone&gt;&lt;hardware&gt;&lt;monogame&gt;" />
  <row Id="33985" PostHistoryTypeId="2" PostId="15052" RevisionGUID="30748cd0-fb28-4ea3-9678-0c72b74844fd" CreationDate="2011-07-20T19:31:56.153" UserId="8614" Text="I'm doing more than fine with a mac mini 2.53 GHz, the simulator is a bit slow when the game gets bigger, but I recommend you testing on an IPhone anyway.&#xD;&#xA;&#xD;&#xA;I remember reading on some forum that everyone recommended getting 4 GB of ram, because OS X use a lot or resources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="33986" PostHistoryTypeId="2" PostId="15053" RevisionGUID="fa550cc3-7523-4daf-8bd4-de03aeeeb717" CreationDate="2011-07-20T19:39:34.467" UserId="8753" Text="I am a CS student who finished his third year in school, and I'm interested in game development. This summer, I bought a book named &quot;Foundation Game Design with Flash&quot; by Rex Van Der Spuy. I'm halfway through it. It's a book for beginners, but it still helped me get familiar with Flash interface and AS3 syntax.&#xD;&#xA;&#xD;&#xA;After I finish this book, I want to continue learning. I'm going to buy another book soon, and currently I'm considering three different items: [Real-World Flash Game Development][2], [AdvancED Game Design with Flash][3] and &quot;Foundation ActionScript 3.0 Animation: Making Things Move!&quot; I want an intermediate level book. I now understand basic concepts of Flash and AS3, and can google my way through if I can't understand a concept in the book I'm going to buy.&#xD;&#xA;&#xD;&#xA;Do any of you have a suggestion among these three? I only have budget for one. If you think I can benefit more from a completely different book, that's also good advice. Keep in mind that I will keep buying books as I finish them, so you can suggest an order of books to follow, aswell.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://www.amazon.com/Real-World-Flash-Game-Development-Second/dp/0240817680/ref=ntt_at_ep_dpt_2&#xD;&#xA;  [3]: http://www.amazon.com/AdvancED-Game-Design-Flash-Spuy/dp/1430227397/ref=pd_sim_b_5" />
  <row Id="33987" PostHistoryTypeId="1" PostId="15053" RevisionGUID="fa550cc3-7523-4daf-8bd4-de03aeeeb717" CreationDate="2011-07-20T19:39:34.467" UserId="8753" Text="I need a book to continue experiencing with ActionScript 3" />
  <row Id="33988" PostHistoryTypeId="3" PostId="15053" RevisionGUID="fa550cc3-7523-4daf-8bd4-de03aeeeb717" CreationDate="2011-07-20T19:39:34.467" UserId="8753" Text="&lt;actionscript-3&gt;&lt;books&gt;" />
  <row Id="33989" PostHistoryTypeId="2" PostId="15054" RevisionGUID="a7325b03-4c5c-4e23-b877-ade4f1fdeb9c" CreationDate="2011-07-20T19:47:53.193" UserId="8754" Text="Let's say I have a terrain mesh of some triangles, and several smaller meshes which I want to add to that terrain mesh (think ground and some small mounds or berms for example). What would I look for to find algorithms to let me do this? I know it's like some kind of computational geometry but I wonder if anyone might know search terms or even better urls to look at. Ideally I would like to do this on the fly to simplify drawing of a terrain where the basic ground and the detailed &quot;interesting&quot; bits are stored separately. Right now we draw the ground and the other parts separately which is less than ideal." />
  <row Id="33990" PostHistoryTypeId="1" PostId="15054" RevisionGUID="a7325b03-4c5c-4e23-b877-ade4f1fdeb9c" CreationDate="2011-07-20T19:47:53.193" UserId="8754" Text="what algorithms exist for combining multiple triangle meshes into one mesh" />
  <row Id="33991" PostHistoryTypeId="3" PostId="15054" RevisionGUID="a7325b03-4c5c-4e23-b877-ade4f1fdeb9c" CreationDate="2011-07-20T19:47:53.193" UserId="8754" Text="&lt;opengl&gt;&lt;3d-meshes&gt;&lt;geometry&gt;" />
  <row Id="33992" PostHistoryTypeId="2" PostId="15055" RevisionGUID="10f4f232-ffb3-4554-afc3-58381daf8565" CreationDate="2011-07-20T19:50:56.427" UserId="7367" Text="Have a method in each vehicle where it performs a radial search around itself, if there are any other vehicles inside this radius, move away in a fashion suitable to your liking: 1) Move in the opposite vector, 2) slow down, 3) speed up, etc.&#xD;&#xA;&#xD;&#xA;You can even do combinations: If the other vehicle's vector is not straight ahead or directly behind: move away; else if it is straight ahead: slow down; else: speed up." />
  <row Id="33993" PostHistoryTypeId="2" PostId="15056" RevisionGUID="268692b6-42b2-4904-8e78-771d6b465216" CreationDate="2011-07-20T20:07:56.543" UserId="8755" Text="I'm interested in Game Development, I know OOP programming and so, but I never used a Stable Language.&#xD;&#xA;&#xD;&#xA;My favourite language is Java, but people say that is not a good Game Language, since it can be slow.&#xD;&#xA;&#xD;&#xA;I hate C# and Visual Studio (No offense), I use Linux and Windows; and probably I am going to buy a Mac in about... 2 years (Or when I get enough money)&#xD;&#xA;&#xD;&#xA;I'm searching for a alternative to XNA, no .NET languages.&#xD;&#xA;I thougt SDL, but I want a framework like XNA.&#xD;&#xA;&#xD;&#xA;PS: Not Pygame please, I use Python; but I don't like it.&#xD;&#xA;PS2: Why I can't see the Captcha in Opera ?!" />
  <row Id="33994" PostHistoryTypeId="1" PostId="15056" RevisionGUID="268692b6-42b2-4904-8e78-771d6b465216" CreationDate="2011-07-20T20:07:56.543" UserId="8755" Text="Alternative to C# and XNA ?" />
  <row Id="33995" PostHistoryTypeId="3" PostId="15056" RevisionGUID="268692b6-42b2-4904-8e78-771d6b465216" CreationDate="2011-07-20T20:07:56.543" UserId="8755" Text="&lt;xna&gt;&lt;c#&gt;&lt;java&gt;&lt;python&gt;&lt;sdl&gt;" />
  <row Id="33996" PostHistoryTypeId="2" PostId="15057" RevisionGUID="04906d53-9c66-4d06-9557-ff610d426e87" CreationDate="2011-07-20T20:13:05.433" UserId="1258" Text="Plenty of options if you look around; however, if you're comfortable with Java, do program your next game in Java. Anything else is pointless, just like hating languages and IDEs." />
  <row Id="33997" PostHistoryTypeId="10" PostId="15056" RevisionGUID="8c6eeefc-6f48-4d5c-a481-385083409496" CreationDate="2011-07-20T20:13:37.953" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="33998" PostHistoryTypeId="2" PostId="15058" RevisionGUID="c9e9caeb-aa5e-414d-8b12-b84a98612e58" CreationDate="2011-07-20T20:57:49.727" UserId="8349" Text="I've scoured the internet for the last few hours looking for an example of how to run even the most basic OpenGL ES 2 example using JOGL but &quot;by Jupiter!&quot; it has been a total fail. &#xD;&#xA;&#xD;&#xA;I tried converting the android example from the [OpenGL ES 2.0 Programming Guide]( http://code.google.com/p/opengles-book-samples/) examples (and at the same time looking at the WebGL example -- which worked fine) yet without any success.&#xD;&#xA;&#xD;&#xA;Are there any examples out there?" />
  <row Id="33999" PostHistoryTypeId="1" PostId="15058" RevisionGUID="c9e9caeb-aa5e-414d-8b12-b84a98612e58" CreationDate="2011-07-20T20:57:49.727" UserId="8349" Text="OpenGL ES 2.0 example for JOGL" />
  <row Id="34000" PostHistoryTypeId="3" PostId="15058" RevisionGUID="c9e9caeb-aa5e-414d-8b12-b84a98612e58" CreationDate="2011-07-20T20:57:49.727" UserId="8349" Text="&lt;jogl&gt;&lt;opengl-es2&gt;" />
  <row Id="34001" PostHistoryTypeId="25" PostId="15015" RevisionGUID="d013e923-834a-4469-9e13-29590ac06f78" CreationDate="2011-07-20T21:32:13.343" Comment="http://twitter.com/#!/StackGameDev/status/93795369649061888" />
  <row Id="34002" PostHistoryTypeId="2" PostId="15059" RevisionGUID="327ce413-c552-4c9a-bcac-7377e725fd45" CreationDate="2011-07-20T22:01:11.790" UserId="8757" Text="I think what you're asking is 2D polygon collision detection: detect that the car shape is over a certain road shape, and then apply some physics effect like slowing down to the car.&#xD;&#xA;&#xD;&#xA;[This site][1] has pretty pictures and has code that does what you're asking for, although you could probably pull it off just with bounding box collision detection. It really depends on what your game will really look like; &quot;The roads and dirt are not self contained all or nothing tiles either&quot; is somewhat vague.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pogopixels.com/blog/2d-polygon-collision-detection/" />
  <row Id="34003" PostHistoryTypeId="2" PostId="15060" RevisionGUID="2ac7ee23-8f7e-49ca-a712-38c94fbbc04e" CreationDate="2011-07-20T22:06:08.230" UserId="5899" Text="The book &quot;[Guide to Graphics Software Tools][1]&quot; uses JOGL to his examples. There are examples for shaders in GLSL, HLSL and Cg.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Guide-Graphics-Software-Tools-Chen/dp/1849968004/ref=reader_auth_dp" />
  <row Id="34004" PostHistoryTypeId="2" PostId="15061" RevisionGUID="363062f7-3b8d-4385-ad3d-56de0ae9487e" CreationDate="2011-07-20T22:08:05.247" UserId="5007" Text="Language: C++&#xD;&#xA;&#xD;&#xA;My question is as follows: I would like to know what would be the best or at least a good way to pack and send data from client to server and the reverse. There will be a few data composing a single packet. A packet will have a &quot;id&quot;, that defines what is it for, then the data in a pre-&#xD;&#xA;determined order for that &quot;action&quot; which the packet corresponds.&#xD;&#xA;&#xD;&#xA;For less performance-dependant systems, i would just send strings, that would be separated by a space, being them the data of the &quot;action&quot;and the first &quot;word&quot; the packet identifier and just chain if statements checking when there is a match.&#xD;&#xA;&#xD;&#xA;Now for a more critical system, what i tought so far was something like this:&#xD;&#xA;&#xD;&#xA;Make a string with packet id and data, and send it. Then, to unpack, i could extract the first integer in the string, and by having an array of packet handlers, with indices corresponding to the packet id they handle, and just do something like packetHandlers[packetID].Process(packetData) .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What do you think of it, any suggestions? greatly apreciated!" />
  <row Id="34005" PostHistoryTypeId="1" PostId="15061" RevisionGUID="363062f7-3b8d-4385-ad3d-56de0ae9487e" CreationDate="2011-07-20T22:08:05.247" UserId="5007" Text="Efficient data packaging for a client-server network" />
  <row Id="34006" PostHistoryTypeId="3" PostId="15061" RevisionGUID="363062f7-3b8d-4385-ad3d-56de0ae9487e" CreationDate="2011-07-20T22:08:05.247" UserId="5007" Text="&lt;c++&gt;&lt;network&gt;" />
  <row Id="34010" PostHistoryTypeId="2" PostId="15063" RevisionGUID="aef29f51-76ac-48ad-a920-da5334f738a7" CreationDate="2011-07-20T22:53:20.067" UserId="159" Text="Is there a known good way to have a &quot;computer&quot; opponent play a game like Bejewled? It doesn't have to be fancy, or even considered fair. If the AI always takes the best move on the board that would be OK with me." />
  <row Id="34011" PostHistoryTypeId="1" PostId="15063" RevisionGUID="aef29f51-76ac-48ad-a920-da5334f738a7" CreationDate="2011-07-20T22:53:20.067" UserId="159" Text="AI a Bejewled like game" />
  <row Id="34012" PostHistoryTypeId="3" PostId="15063" RevisionGUID="aef29f51-76ac-48ad-a920-da5334f738a7" CreationDate="2011-07-20T22:53:20.067" UserId="159" Text="&lt;algorithm&gt;&lt;ai&gt;" />
  <row Id="34013" PostHistoryTypeId="4" PostId="15063" RevisionGUID="a541f23f-f11e-4e0b-8f88-e50d07d71a98" CreationDate="2011-07-20T23:09:25.817" UserId="159" Comment="edited title" Text="AI for solving a Bejewled like game" />
  <row Id="34014" PostHistoryTypeId="2" PostId="15064" RevisionGUID="7983a3af-a7af-4e78-bc9a-05448a961e22" CreationDate="2011-07-20T23:10:08.627" UserId="6831" Text="Why use two different encoding schemes? Just use the second one for every system. Just keep it simple.&lt;br&gt;&#xD;&#xA;Consider using delta compression. I.e. send one full value and after that only the things that changed. After a few game iterations send a full value again.&lt;br&gt;&#xD;&#xA;Another encodig you could consider is Base 128 Varint. Google Protobufs use it. Have a look at the &quot;Encoding&quot; page of their developer guide: [Protocol Buffers Encoding][1] Could save a few bytes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/intl/de-DE/apis/protocolbuffers/docs/encoding.html" />
  <row Id="34016" PostHistoryTypeId="2" PostId="15065" RevisionGUID="79dfae27-bbde-4c62-8e3d-156b0e37b8ce" CreationDate="2011-07-20T23:53:56.890" UserId="8758" Text="I would really appreciate it if there aren't any answers like &quot;Making MMOs is too expensive&quot;, &quot;Don't even try making an MMO!&quot; etc.&#xD;&#xA;&#xD;&#xA;I'm trying to point out the elements/jobs that establish an MMO game.&#xD;&#xA;&#xD;&#xA;So, Here's what I've come up with:&#xD;&#xA;&#xD;&#xA;1. **Server Engine Design** -&lt;br&gt;&#xD;&#xA;some daemon that gets players' actions and returns &quot;what happens&quot;.&lt;br&gt;&#xD;&#xA;e.g Client says: &quot;I hit the monster&quot;.&lt;br&gt;&#xD;&#xA;Server says: &quot;You inflict 2 Damage&quot;.&lt;br&gt;&#xD;&#xA;&#xD;&#xA;2. **Database Design** - The Server also needs to store all the information in a DB.&#xD;&#xA;&#xD;&#xA;3. **Client Software Design** - probably mainly in charge of displaying graphics,&#xD;&#xA;&#xD;&#xA;4. **Game-play Design** - Writing the storyline, balancing the different character classes, the game's internal economic system, designing the entire game world - a big one :)&#xD;&#xA;&#xD;&#xA;5. **Graphic Design** - Creating all the graphics.&#xD;&#xA;&#xD;&#xA;6. **Customer Support** - To interact with the users, get feedback etc.&#xD;&#xA;&#xD;&#xA;7. **Artificial Intelligence** - program the A.I for NPCs&#xD;&#xA;&#xD;&#xA;Some may not be in low-budget games.&lt;br&gt;&#xD;&#xA;Nonetheless, is there more elements/jobs required for an MMO Game?&#xD;&#xA;&#xD;&#xA;I know this is a big question but I hope a lot of motivated Game Designers like me&#xD;&#xA;will read this question and it will help them.&#xD;&#xA;&#xD;&#xA;Regards, fiftyeight&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34017" PostHistoryTypeId="1" PostId="15065" RevisionGUID="79dfae27-bbde-4c62-8e3d-156b0e37b8ce" CreationDate="2011-07-20T23:53:56.890" UserId="8758" Text="What are the Elements of an MMO Game?" />
  <row Id="34018" PostHistoryTypeId="3" PostId="15065" RevisionGUID="79dfae27-bbde-4c62-8e3d-156b0e37b8ce" CreationDate="2011-07-20T23:53:56.890" UserId="8758" Text="&lt;mmo&gt;&lt;project-management&gt;" />
  <row Id="34019" PostHistoryTypeId="2" PostId="15066" RevisionGUID="fbcfd382-ccac-47d4-aa67-0b252e085df6" CreationDate="2011-07-21T00:13:58.437" UserId="3874" Text="I'm making a game with Box2D with a top left coordinate system. I multiply positions by an M_TO_PX_RATIO of 10.0f to convert from meters to pixels.&#xD;&#xA;&#xD;&#xA;I noticed that when I set gravity to 9.8, the simulation is rather slow. When I set gravity to 9.8 * M_TO_PX_RATIO, the simulation runs at the correct speed, like normal gravity. However, the high gravity causes jittering.&#xD;&#xA;&#xD;&#xA;Am I doing it properly? When using a top left, pixel coordinate system, must I do anything else to account for meters to pixels?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="34020" PostHistoryTypeId="1" PostId="15066" RevisionGUID="fbcfd382-ccac-47d4-aa67-0b252e085df6" CreationDate="2011-07-21T00:13:58.437" UserId="3874" Text="Setting the Box2D gravity for a pixel coordinate game?" />
  <row Id="34021" PostHistoryTypeId="3" PostId="15066" RevisionGUID="fbcfd382-ccac-47d4-aa67-0b252e085df6" CreationDate="2011-07-21T00:13:58.437" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;box2d&gt;" />
  <row Id="34022" PostHistoryTypeId="2" PostId="15067" RevisionGUID="b2121527-0f68-49c7-8cc1-b78ff1475813" CreationDate="2011-07-21T00:20:13.930" UserId="51" Text="Considering Bejeweled doesn't allow you to make a move that doesn't involve a match, couldn't you just figure out all subset of legal moves (you should already have this functionality if you prevent the player from making non-matching moves) and just pick the one that would give you the most points?  From my understanding there isn't a *ton* of skill in Bejeweled as you're mostly at the whim of what the random number generator picks for your filler blocks.&#xD;&#xA;&#xD;&#xA;Are you trying to design something more complicated like Puzzle Quest where looking ahead actually matters?" />
  <row Id="34023" PostHistoryTypeId="25" PostId="15065" RevisionGUID="c76e493a-368b-46c4-a7cf-e90d5616df0b" CreationDate="2011-07-21T00:32:13.320" Comment="http://twitter.com/#!/StackGameDev/status/93840668471988224" />
  <row Id="34024" PostHistoryTypeId="2" PostId="15068" RevisionGUID="a2cdc2a4-8c3b-43f7-b0a0-9e991ca769c5" CreationDate="2011-07-21T01:58:05.987" UserId="8524" Text="One approach would be a simple tree-search algorithm, similar to the methods used for many deterministic puzzles.&#xD;&#xA;&#xD;&#xA;The first problem is that the new gems added with each move are non-deterministic. One way to handle that is to consider all the possibilities for each new gem. This gives a way to estimate probabilities.&#xD;&#xA;&#xD;&#xA;The big problem is that the number of combinations to consider would be immense, even a small number of moves into the future. The solution to that is to use heuristics to prune the tree, and to guide the search. For the random gems, only consider a small random selection of the possibilities.&#xD;&#xA;&#xD;&#xA;For more tips and more detail, Google for `tree search nondeterministic games`.&#xD;&#xA;&#xD;&#xA;http://www.google.co.uk/#hl=en&amp;xhr=t&amp;q=tree+search+nondeterministic+games&amp;cp=34&amp;pf=p&amp;sclient=psy&amp;source=hp&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=tree+search+nondeterministic+games&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.&amp;fp=4f061ee8aa4abfcf&amp;biw=1109&amp;bih=878&#xD;&#xA;" />
  <row Id="34025" PostHistoryTypeId="5" PostId="15068" RevisionGUID="a0241a45-ca03-43b9-972d-e04535f091d1" CreationDate="2011-07-21T02:04:28.137" UserId="8524" Comment="added 471 characters in body" Text="One approach would be a simple tree-search algorithm, similar to the methods used for many deterministic puzzles.&#xD;&#xA;&#xD;&#xA;The first problem is that the new gems added with each move are non-deterministic. One way to handle that is to consider all the possibilities for each new gem. This gives a way to estimate probabilities.&#xD;&#xA;&#xD;&#xA;The big problem is that the number of combinations to consider would be immense, even a small number of moves into the future. The solution to that is to use heuristics to prune the tree, and to guide the search. For the random gems, only consider a small random selection of the possibilities.&#xD;&#xA;&#xD;&#xA;For more tips and more detail, Google for `tree search nondeterministic games`.&#xD;&#xA;&#xD;&#xA;http://www.google.co.uk/#hl=en&amp;xhr=t&amp;q=tree+search+nondeterministic+games&amp;cp=34&amp;pf=p&amp;sclient=psy&amp;source=hp&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=tree+search+nondeterministic+games&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.&amp;fp=4f061ee8aa4abfcf&amp;biw=1109&amp;bih=878&#xD;&#xA;&#xD;&#xA;On second thoughts, try `tree search nondeterministic puzzles`.&#xD;&#xA;&#xD;&#xA;http://www.google.co.uk/#hl=en&amp;xhr=t&amp;q=tree+search+nondeterministic+puzzles&amp;cp=36&amp;pf=p&amp;sclient=psy&amp;source=hp&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=tree+search+nondeterministic+puzzles&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.&amp;fp=4f061ee8aa4abfcf&amp;biw=1109&amp;bih=878&#xD;&#xA;&#xD;&#xA;Also, remember to keep it simple - there's probably *very* rapidly diminishing returns in Bejewelled, either for deeper searching or for more sophisticated heuristics.&#xD;&#xA;" />
  <row Id="34026" PostHistoryTypeId="2" PostId="15069" RevisionGUID="7f37f33a-2331-4b88-9385-2eef9d3cef08" CreationDate="2011-07-21T02:27:15.093" UserId="8454" Text="This question is very closely related to a previous question of mine:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/14576/scaling-a-game-view-with-letterboxes&#xD;&#xA;&#xD;&#xA;My game runs at 480x800 right now but when the screen is smaller or bigger than that I want it to scale up/down the image while maintaining the aspect ratio to fit it as best as it can and then put black letterboxes on the top/bottom or left/right to fill in the left over space if it is of a different aspect ratio. The newly scaled game screen should be centered in the middle of the screen.&#xD;&#xA;&#xD;&#xA;I don't know how to go about doing this at all since I want the playfield to be 480x800 because the touch controls use the X and Y coordinates of where the player touches the screen. So I have to figure out how to make it so if the display is centered then the (0,0) coordinate doesnt start in the middle of the letter box but in the top left corner of the playfield where it should be. Also I need to figure out how to make it so when the game is scaled up or down the touch screen controls still work relevant to the new position and scale of the scaled game screen.&#xD;&#xA;&#xD;&#xA;I don't know which would be easier, having the game image rendered then scaled up or make it so the gameplay remains the same with object and item positioning but renders a higher resolution image and then have higher resolution image resources rendered on big screens and smaller ones on smaller screens so they're pre-scaled instead of scaled by the hardware or software.&#xD;&#xA;&#xD;&#xA;I'm not sure what the best practice is or how to go about doing either method. Please help me out!" />
  <row Id="34027" PostHistoryTypeId="1" PostId="15069" RevisionGUID="7f37f33a-2331-4b88-9385-2eef9d3cef08" CreationDate="2011-07-21T02:27:15.093" UserId="8454" Text="Android Game Dev: Screen Scaling" />
  <row Id="34028" PostHistoryTypeId="3" PostId="15069" RevisionGUID="7f37f33a-2331-4b88-9385-2eef9d3cef08" CreationDate="2011-07-21T02:27:15.093" UserId="8454" Text="&lt;game-design&gt;&lt;java&gt;&lt;android&gt;&lt;graphics&gt;" />
  <row Id="34029" PostHistoryTypeId="2" PostId="15070" RevisionGUID="a84efff6-5ce5-4b74-ace2-f9ae8823c151" CreationDate="2011-07-21T02:33:17.750" UserId="7454" Text="I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion).  I want the target to rotate and be facing right at the player.  The target, when it shoots something should shoot right at the player.  &#xD;&#xA;&#xD;&#xA;I've seen plenty of examples of slerping to the player, but I don't want incremental rotation, well, I suppose that would be ok as long as I can make the slerp be 100%, and as long as it actually worked.&#xD;&#xA;&#xD;&#xA;FYI - Im able to use the position and rotation to do plenty of other things and it all works great except this last piece I cant figure out.&#xD;&#xA;&#xD;&#xA;Code samples run in the Target's class, Position = the targets position, Avatar = the player.&#xD;&#xA;&#xD;&#xA;Using the value of 1 for the Slerp doesn't work. This code below rotates some, but I think something is way off becuase when it's drawn the target scales up and then down as the player gets closer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var A = new Vector3(Position.X, Position.Y, Position.Z);&#xD;&#xA;    var B = new Vector3(GameState.Avatar.Position.X, GameState.Avatar.Position.Y, GameState.Avatar.Position.Z);&#xD;&#xA;    A.Normalize();&#xD;&#xA;    B.Normalize();&#xD;&#xA;    var angle = Math.Acos(Vector3.Dot(A, B));&#xD;&#xA;    var axis = Vector3.Normalize(Vector3.Cross(A, B));&#xD;&#xA;    var rotOnAngle = new Quaternion(axis, (float)angle);&#xD;&#xA;    var newRot = Quaternion.Slerp(Quaternion.Identity, rotOnAngle, 1f);&#xD;&#xA;    Rotation = newRot;&#xD;&#xA;    Cannon.Shoot(Position, Rotation, this);&#xD;&#xA;&#xD;&#xA;I tried using this and it doesn't quite work either...the target does rotate, but not to face the player.  But at least the scaling problem goes away.&#xD;&#xA;&#xD;&#xA;    Quaternion q = new Quaternion();&#xD;&#xA;    var pos = Vector3.Normalize(Position);&#xD;&#xA;    var pos2 = Vector3.Normalize(GameState.Avatar.Position);%&#xD;&#xA;    var a = Vector3.Cross(Position, GameState.Avatar.Position);&#xD;&#xA;    q.X = a.X; q.Y = a.Y; q.Z = a.Z;&#xD;&#xA;    q.W = (float)Math.Sqrt(((int)Position.Length() ^ 2) * ((int)GameState.Avatar.Position.Length() ^ 2)) + Vector3.Dot(Position, GameState.Avatar.Position);&#xD;&#xA;    q.Normalize();&#xD;&#xA;    Rotation = q;&#xD;&#xA;    Cannon.Shoot(Position, Rotation, this);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199001%28v=XNAGameStudio.10%29.aspx&#xD;&#xA;" />
  <row Id="34030" PostHistoryTypeId="1" PostId="15070" RevisionGUID="a84efff6-5ce5-4b74-ace2-f9ae8823c151" CreationDate="2011-07-21T02:33:17.750" UserId="7454" Text="Fully Rotate a Quaternion to a Vector" />
  <row Id="34031" PostHistoryTypeId="3" PostId="15070" RevisionGUID="a84efff6-5ce5-4b74-ace2-f9ae8823c151" CreationDate="2011-07-21T02:33:17.750" UserId="7454" Text="&lt;xna&gt;&lt;c#&gt;&lt;3d&gt;&lt;math&gt;&lt;quaternion&gt;" />
  <row Id="34032" PostHistoryTypeId="2" PostId="15071" RevisionGUID="e13bc47f-406d-4539-96bb-25d79075d43f" CreationDate="2011-07-21T02:50:14.403" UserId="2687" Text="QA. For a project this size QA is definitely worth mentioning, since this is the size of project where it's going to make a very large difference. Also I, personally, would probably break Game-play Design up into several jobs. You are definitely right that it is certainly a big one, but it's definitely large enough that you're going to want separate people doing combat and systems and story scripting, things like that. " />
  <row Id="34036" PostHistoryTypeId="5" PostId="15063" RevisionGUID="0fb31765-9112-4bf2-84b1-80abca40259e" CreationDate="2011-07-21T03:14:00.567" UserId="159" Comment="added 50 characters in body; edited title" Text="Is there a known good way to have a &quot;computer&quot; opponent play a Match 3 game? It doesn't have to be fancy, or even considered fair. If the AI always takes the best move on the board that would be OK with me. Note that a valid move is one that doesn't make a match." />
  <row Id="34037" PostHistoryTypeId="4" PostId="15063" RevisionGUID="0fb31765-9112-4bf2-84b1-80abca40259e" CreationDate="2011-07-21T03:14:00.567" UserId="159" Comment="added 50 characters in body; edited title" Text="AI for solving a Match 3  game" />
  <row Id="34038" PostHistoryTypeId="25" PostId="15061" RevisionGUID="0772343e-49cd-40e1-b242-a2e03b1b5164" CreationDate="2011-07-21T03:32:13.280" Comment="http://twitter.com/#!/StackGameDev/status/93885966820966401" />
  <row Id="34039" PostHistoryTypeId="2" PostId="15073" RevisionGUID="1e239876-6e4d-4085-9ef2-c34db4e87db2" CreationDate="2011-07-21T03:53:08.363" UserId="953" Text="Some stuff off the top of my head. Note that in real game development with large teams, people will often cross roles, so that more than one person does a task and a person does more than one task.&#xD;&#xA;&#xD;&#xA;Audio. Voice acting, music, sound effects, and so on.&#xD;&#xA;&#xD;&#xA;Graphics programming. Distinct from programming the core features of the client application and drawing/modelling the art. Someone needs to develop shaders and special graphical techniques.&#xD;&#xA;&#xD;&#xA;Web design and development. No MMO is complete without a web presence.&#xD;&#xA;&#xD;&#xA;Management. Someone needs to coordinate between the different groups and make sure they are able to do their jobs.&#xD;&#xA;&#xD;&#xA;Accounting. MMOs are complicated when it comes to money, especially in these days of free-to-play.&#xD;&#xA;&#xD;&#xA;Documentation. Hundreds of help files, internal documents, and tutorial bubbles.&#xD;&#xA;&#xD;&#xA;Localization. Do you want non-English speakers to play? You'll need a decent translator.&#xD;&#xA;&#xD;&#xA;Marketing. Distinct from customer support. Marketing gets players to your game.&#xD;&#xA;&#xD;&#xA;I would split &quot;server engine design&quot; into several chunks. The person who designs the back-end data models is probably not the person who focuses on managing the massive data replication and distribution issues with real-time MMOs.&#xD;&#xA;&#xD;&#xA;Like Aerathis said, Gameplay Design needs to be split up. Your User Experience person will not be your story writer will not be your low-level gameplay designer will not be your economist (and so on for the mapper, the person who designs and balances classes, and so on)." />
  <row Id="34040" PostHistoryTypeId="5" PostId="15063" RevisionGUID="50515315-0eae-47ca-9564-0709901a175a" CreationDate="2011-07-21T04:25:49.317" UserId="159" Comment="added 613 characters in body" Text="Is there a known good way to have a &quot;computer&quot; opponent play a Match 3 game? It doesn't have to be fancy, or even considered fair. If the AI always takes the best move on the board that would be OK with me. Note that a valid move is one that doesn't make a match.&#xD;&#xA;&#xD;&#xA;*Edit:*&#xD;&#xA;What I am currently doing is a brute force approach. I look at every tile on the board, and see what the best move that tile can do. I add it to a collection and give it a score (based on how many it will match 3 or 4). Once I have traversed the entire board I use the move with the  best score. In the event of a tie I pick one.&#xD;&#xA;&#xD;&#xA;If a 5 match combo is found I short circuit out to that one. 5 is the highest combo you can get)&#xD;&#xA;&#xD;&#xA;I may not be able to improve it, but it feels like this should have been solved already." />
  <row Id="34041" PostHistoryTypeId="2" PostId="15074" RevisionGUID="6262d96e-a72b-4a62-b708-3b72a9cc8dbc" CreationDate="2011-07-21T04:50:55.033" UserId="7911" Text="The only feature that distinguishes an MMO from any other type of game, online or not, is **lots of players**  Everything else is simply &quot;what are the elements of a game?&quot;" />
  <row Id="34042" PostHistoryTypeId="2" PostId="15075" RevisionGUID="76f37f48-bc41-419e-8326-05761b1356da" CreationDate="2011-07-21T04:51:24.017" UserId="1198" Text="What might be an example of the data you're sending? I don't see any reason to do anything overly fancy. Once the data is fully loaded into the receiver's buffer, inspect the first `int` based on its value, you then know how to process the rest of the data.&#xD;&#xA;&#xD;&#xA;So a packet that has four data parts `id`, `val1`, `val2`, and `val2` might look like this:&#xD;&#xA;&#xD;&#xA;    0001 1010 0111 0011 // I'm using dwords (two bytes) so my sample data is short&#xD;&#xA;&#xD;&#xA;As you read the first two bytes (which you know will always be there) you decide how to process the next set of data. If the first dword (id) is `0001` you know there are three more dwords following, and that is the end of the packet. To continue the example, you might have id = `0010` and your specification tells you that for id value 2, you process `float`, `float`, `float` in that order, which might specify a player position in world space.&#xD;&#xA;&#xD;&#xA;Think of it as writing your own binary file system, you have a header value, which describes the rest of the data, where it is located (what position) and what type of data to treat it as." />
  <row Id="34043" PostHistoryTypeId="5" PostId="15075" RevisionGUID="a2097ccc-dc15-4870-9cc7-9c2d59ae55e1" CreationDate="2011-07-21T04:56:45.437" UserId="1198" Comment="added 9 characters in body" Text="What might be an example of the data you're sending? I don't see any reason to do anything overly fancy. Once the data is fully loaded into the receiver's buffer, inspect the first `int` based on its value, you then know how to process the rest of the data.&#xD;&#xA;&#xD;&#xA;So a packet that has four data parts `id`, `val1`, `val2`, and `val2` might look like this:&#xD;&#xA;&#xD;&#xA;    // I'm using words (one byte) so my sample data is short&#xD;&#xA;    00000001 00101000 00010110 00010100 &#xD;&#xA;&#xD;&#xA;As you read the first byte (which you know will always be there) you decide how to process the next set of data. If the first word (id) is `00000001` you know there are three more dwords following, and that is the end of the packet. To continue the example, you might have id = `00000010` and your specification tells you that for id value 2, you process `float`, `float`, `float` in that order, which might specify a player position in world space.&#xD;&#xA;&#xD;&#xA;Think of it as writing your own binary file system, you have a header value, which describes the rest of the data, where it is located (what position) and what type of data to treat it as." />
  <row Id="34044" PostHistoryTypeId="5" PostId="15074" RevisionGUID="444478b4-c37d-4f71-99aa-826664dc3565" CreationDate="2011-07-21T05:12:13.103" UserId="7911" Comment="added 35 characters in body" Text="The only feature that distinguishes an MMO from any other type of game, online or not, is **lots of players** that can interact with each other in the same world.  Everything else is simply &quot;what are the elements of a game?&quot;" />
  <row Id="34045" PostHistoryTypeId="2" PostId="15076" RevisionGUID="62a0c228-b384-4061-83c1-ba4b5063c6e1" CreationDate="2011-07-21T06:22:06.097" UserId="229" Text="First, confirm you actually need a a fancy, efficient protocol before wasting resources developing it. Don't forget debugging/modifying your game will be more difficult and time-consuming due to your fancy protocol. **I would just abstract the network communication away so the actual implementation can be easily swapped for a more efficient one if needed in the future.** Use the simplest protocol possible until you hit performance issues.&#xD;&#xA;&#xD;&#xA;After confirming you need a fancy protocol, look at protocols that others have spent considerable time developing. Some examples:&#xD;&#xA;&#xD;&#xA;- Google's main bottleneck is network communication between computers, so they probably considered efficiency when developing [Protocol Buffers][1]. Gracefully handles forwards/backwards compatibility (*when* you decide to alter your data structures). Used by every major Google product (Gmail, Search, etc)&#xD;&#xA;- [Apache Thrift][2] is a similar protocol used by Facebook.&#xD;&#xA;- [RakNet][3] is an open-source network library specifically designed for game development.&#xD;&#xA;- [ZoidCom][4] is another networking library geared towards game development. It's not open-source, but you can still study it for design hints.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;&gt; The First Rule of Program Optimization: Don't do it. &lt;br&gt;&#xD;&#xA;&gt; The Second Rule of Program Optimization (for experts only!): Don't do it yet.&lt;br&gt;&lt;br&gt;&#xD;&#xA;&gt; [[Michael A. Jackson][5]]&#xD;&#xA;&#xD;&#xA;In other words: your primary optimization parameter should be: life (years of life per program implementation). [[How to Program Independent Games. Slide 21. Jonathan Blow.][6]]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/apis/protocolbuffers/&#xD;&#xA;  [2]: http://thrift.apache.org/&#xD;&#xA;  [3]: http://www.jenkinssoftware.com/&#xD;&#xA;  [4]: http://www.zoidcom.com/&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/Program_optimization#Quotes&#xD;&#xA;  [6]: http://the-witness.net/news/2011/06/how-to-program-independent-games/" />
  <row Id="34046" PostHistoryTypeId="25" PostId="15063" RevisionGUID="59639531-7a41-4506-93a7-3df6ff35e05a" CreationDate="2011-07-21T06:32:14.423" Comment="http://twitter.com/#!/StackGameDev/status/93931265069289473" />
  <row Id="34047" PostHistoryTypeId="2" PostId="15077" RevisionGUID="db7e5a3c-60fd-462c-8630-6831dbb3b6a2" CreationDate="2011-07-21T08:04:54.393" UserId="4894" Text="Usually, when you create a game for multiple displays, you create your game logic with a unit system independant from your display size. &#xD;&#xA;&#xD;&#xA;For example, to keep your aspect ratio you can have your game using a 6x10 units, and use the same scale for all you element. Then when moving a game object you always use the same unit system, independant from your display. &#xD;&#xA;&#xD;&#xA;Then you have to make a bridge between the display and the game, both in the rendering system (convert game unit to pixels, according to screen size) and in the input system (convert the input in pixels to position in game unit). &#xD;&#xA;&#xD;&#xA;Once you've done this, you can focus on your game logic, without having to touch the input and rendering to adapt to different scale. " />
  <row Id="34048" PostHistoryTypeId="2" PostId="15078" RevisionGUID="11b9dac3-dced-42d0-9980-7e91d7ba19fc" CreationDate="2011-07-21T09:08:04.397" UserId="1839" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rot_axis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-products&#xD;&#xA;&#xD;&#xA;        float rot_angle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rot_axis and rot_angle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;Tell me if you need help finding the avatars current forward vector, the input for 1)&#xD;&#xA;" />
  <row Id="34049" PostHistoryTypeId="5" PostId="15078" RevisionGUID="db3eb2f4-ac78-40d7-86e9-06237870001a" CreationDate="2011-07-21T09:14:06.813" UserId="1839" Comment="deleted 2 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-products&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rot_axis and rot_angle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;" />
  <row Id="34050" PostHistoryTypeId="5" PostId="15078" RevisionGUID="e5f56d44-e926-4564-878b-86f4cf897db1" CreationDate="2011-07-21T09:20:00.693" UserId="1839" Comment="deleted 1 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;" />
  <row Id="34052" PostHistoryTypeId="5" PostId="15078" RevisionGUID="faba7548-9c59-454f-a2a6-4b01e8634901" CreationDate="2011-07-21T09:36:22.713" UserId="1839" Comment="added 256 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;&#xD;&#xA;**EDIT:** Calculating the absolute orientation is actually a bit easier, use the forward vector of the identity-matrix instead of avatars forward vector as input for 1. And in 3. don't muliply it, just use it directly as the new orientation: `newRot = q`" />
  <row Id="34053" PostHistoryTypeId="2" PostId="15079" RevisionGUID="2dc6b328-28c2-42e6-9297-80081b8de25f" CreationDate="2011-07-21T09:38:25.450" UserId="4677" Text="I think the term you are look for is CSG, or [constructive solid geometry][1]. There are basically three different operations: boolean union, boolean intersection, and boolean difference. You need the boolean union to merge two overlapping meshes into one. I'm sure you'll be able find some useful information with those terms.&#xD;&#xA;&#xD;&#xA;Some links to get you started:&#xD;&#xA;&#xD;&#xA; - &lt;http://gts.sourceforge.net/&gt;&#xD;&#xA; - &lt;http://www.cs.man.ac.uk/~toby/alan/software/&gt;&#xD;&#xA; - [an implementation for Ogre][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Constructive_solid_geometry&#xD;&#xA;  [2]: http://www.ogre3d.org/forums/viewtopic.php?f=11&amp;t=48028" />
  <row Id="34054" PostHistoryTypeId="2" PostId="15080" RevisionGUID="100e0c56-13c0-49be-bfed-50346fe41508" CreationDate="2011-07-21T10:01:23.300" UserId="7737" Text="I have built a slideshow in slimDX and is scrolling a text at the bottom of the images. But I am running through a problem that when my new image is loaded in by the help of Texture.FromFile() function and i am giving the new image to the texture it is giving a little pause that is due to the loading of the image and moving text seems to jerky as it waits for some milli seconds when the new image is loaded. I am trying to resolve this problem by the help of a thread and also  threadPool but is not getting the right output. Can any body please help me out in this context." />
  <row Id="34055" PostHistoryTypeId="1" PostId="15080" RevisionGUID="100e0c56-13c0-49be-bfed-50346fe41508" CreationDate="2011-07-21T10:01:23.300" UserId="7737" Text="Problem while loading an image for a texture." />
  <row Id="34056" PostHistoryTypeId="3" PostId="15080" RevisionGUID="100e0c56-13c0-49be-bfed-50346fe41508" CreationDate="2011-07-21T10:01:23.300" UserId="7737" Text="&lt;slimdx&gt;" />
  <row Id="34057" PostHistoryTypeId="5" PostId="15060" RevisionGUID="98d4c42a-e52e-4264-b133-4d86537e6542" CreationDate="2011-07-21T10:59:58.780" UserId="5899" Comment="added 213 characters in body" Text="The book &quot;[Guide to Graphics Software Tools][1]&quot; uses JOGL to his examples. There are examples for shaders in GLSL, HLSL and Cg.&#xD;&#xA;&#xD;&#xA;**Edited**&#xD;&#xA;&#xD;&#xA;In http://www.davidcornette.com/glsl/download.html there are examples with source code.&#xD;&#xA;http://www.guyford.co.uk/index.php/forum/14-java-jogl/15-jogl-example-glsl-shader-setup has a bit of code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Guide-Graphics-Software-Tools-Chen/dp/1849968004/ref=reader_auth_dp" />
  <row Id="34058" PostHistoryTypeId="2" PostId="15081" RevisionGUID="34858172-45e8-4f3f-bb88-6aa42e39d596" CreationDate="2011-07-21T11:01:40.087" UserId="4830" Text="I am working on some Cocos2D tutorials (doodle drop) and have downloaded the program on my device. The program is working but I have to hold the iPhone in a very specific, and not very good, angle to make the little icon move. As it is i must hold the device horizontal with a small tilt forward. &#xD;&#xA;&#xD;&#xA;I would like to be able to hold the device horizontal to vertical and tip the device and get the little icon to move.&#xD;&#xA;&#xD;&#xA;Could someone please give me some hints how to code this?&#xD;&#xA;&#xD;&#xA;Here is my my code:&#xD;&#xA;&#xD;&#xA;    -(void) spiderBelowScreen:(id)sender {&#xD;&#xA;    &#xD;&#xA;    // Make sure sender is actually of the right class&#xD;&#xA;    NSAsser([sender isKindOfClass:[CCSprite class]], @&quot;sender is not a CCSprite!&quot;);&#xD;&#xA;    CCSprite *spider = (CCSprite*)sender;&#xD;&#xA;    &#xD;&#xA;    // Move the spider back up outside the top of the screen&#xD;&#xA;    CGPoint pos = spider.position;&#xD;&#xA;    CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    pos.y = screenSize.height + [spider texture].contentSize.height;&#xD;&#xA;    spider.position = pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) runSpiderMoveSequence:(CCSprite*)spider {&#xD;&#xA;    &#xD;&#xA;    // Slowly increase the spider speed over time&#xD;&#xA;    numSpidersMoved++;&#xD;&#xA;    &#xD;&#xA;    if (numSpidersMoved % 8 == 0 &amp;&amp; spiderMoveDuration &gt; 2.0f) {&#xD;&#xA;        spiderMoveDuration -= 0.1f;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // This is the sequence which controls the spiders' movement&#xD;&#xA;    CGPoint belowScreenPosition = CGPointMake(spider.position.x, [spider texture].contentSize.height);&#xD;&#xA;    CCMoveTo *move = [CCMoveTo actionWithDuration:spiderMoveDuration position:belowScreenPosition];&#xD;&#xA;    CCCallFuncN *call = [CCCallFuncN actionWithTarget:self selector:@selector(spiderBelowScreen)];&#xD;&#xA;    CCSequence *sequence = [CCSequence actions:move, call, nil];&#xD;&#xA;    [spider runAction:sequence];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) spidersUpdate:(ccTime)delta {&#xD;&#xA;    &#xD;&#xA;    // Try to find a spioder which isn't currently moving&#xD;&#xA;    for (int i = 0; i &lt; 10; i++) {&#xD;&#xA;        int randomSpiderIndex = CCRANDOM_0_1() * [spiders count];&#xD;&#xA;        CCSprite *spider = [spiders objectAtIndex:randomSpiderIndex];&#xD;&#xA;        &#xD;&#xA;        // If the spider isn't moving it won't have any running actions&#xD;&#xA;        if ([spider numberOfRunningActions] == 0) {&#xD;&#xA;            // This is the squense wich controls the spiders' movement&#xD;&#xA;            [self runSpiderMoveSequence:spider];&#xD;&#xA;            &#xD;&#xA;            // Only onbe spider should start moving at a time&#xD;&#xA;            break;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) resetSpiders {&#xD;&#xA;    &#xD;&#xA;    CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    &#xD;&#xA;    // Get any spider to get its image width&#xD;&#xA;    CCSprite *tempSpider = [spiders lastObject];&#xD;&#xA;    CGSize size = [tempSpider texture].contentSize;&#xD;&#xA;    &#xD;&#xA;    int numSpiders = [spiders count];&#xD;&#xA;    &#xD;&#xA;    for (int i = 0; i &lt; numSpiders; i++) {&#xD;&#xA;        &#xD;&#xA;        // Put each spider at its designated position outside the screen&#xD;&#xA;        CCSprite *spider = [spider objectAtIndex:i];&#xD;&#xA;        spider.position = CGPointMake(size.width * i + size.width * 0.5f, screenSize.height + size.height);&#xD;&#xA;        [spider stopAllActions];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Uschedule the selector just in case. If it isn't scheduled it wont do anything&#xD;&#xA;    [self unschedule:@selector(spidersUpdate:)];&#xD;&#xA;    &#xD;&#xA;    // Schedule the spider update logic to run at the given interval&#xD;&#xA;    [self schedule:@selector(spidersUpdate:) interval:0.7f];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) initSpiders {&#xD;&#xA;    &#xD;&#xA;    CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    &#xD;&#xA;    // using a temporary spider sprite is the easiest way to get the image's size&#xD;&#xA;    CCSprite *tempSpider = [CCSprite spriteWithFile:@&quot;spider.png&quot;];&#xD;&#xA;    float imageWidth = [tempSpider texture].contentSize.width;&#xD;&#xA;    &#xD;&#xA;    // Use as many spiders as can fit next to each other over the whole screen width&#xD;&#xA;    int numSpiders = screenSize.width / imageWidth;&#xD;&#xA;    &#xD;&#xA;    // Initialize the spider array using alloc&#xD;&#xA;    spiders = [[CCArray alloc] initWithCapacity:numSpiders];&#xD;&#xA;    &#xD;&#xA;    for (int i = 0; i &lt; numSpiders; i++) {&#xD;&#xA;        CCSprite *spider = [CCSprite spriteWithFile:@&quot;spider.png&quot;];&#xD;&#xA;        [self addChild:spider z:0 tag:2];&#xD;&#xA;        &#xD;&#xA;        // Also add the spider to the spider array&#xD;&#xA;        [spiders addObject:spider];&#xD;&#xA;    }&#xD;&#xA;    // call the method to reposition all spiders&#xD;&#xA;    [self resetSpiders];&#xD;&#xA;                    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) update:(ccTime)delta {&#xD;&#xA;    &#xD;&#xA;    // Keep adding up the playerVelocity to the players's position&#xD;&#xA;    CGPoint pos = player.position;&#xD;&#xA;    pos.x   += playerVelocity.x;&#xD;&#xA;&#xD;&#xA;    // The player should also be stopped from going outside the screen&#xD;&#xA;    CGSize  screenSize  = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    float   imageWidthHalved    = [player texture].contentSize.width * 0.5f;&#xD;&#xA;    float   leftBorderLimit     = imageWidthHalved;&#xD;&#xA;    float   rightBorderLimit    = screenSize.width - imageWidthHalved;&#xD;&#xA;    &#xD;&#xA;    // Preventing the player sprite from moving outside the screen&#xD;&#xA;    if (pos.x &lt; leftBorderLimit)&#xD;&#xA;    {&#xD;&#xA;        pos.x   = leftBorderLimit;&#xD;&#xA;        playerVelocity  = CGPointZero;&#xD;&#xA;    }&#xD;&#xA;    else if (pos.x &gt; rightBorderLimit)&#xD;&#xA;    {&#xD;&#xA;        pos.x   = rightBorderLimit;&#xD;&#xA;        playerVelocity  = CGPointZero;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    player.position = pos;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {&#xD;&#xA;    &#xD;&#xA;    // controls how quickly velocity decelerates (lower = quicker to change direction)&#xD;&#xA;    float   deceleration    = 0.2f;&#xD;&#xA;    &#xD;&#xA;    // determines how sensitive the accelerometer reacts (higher = more sensitivity)&#xD;&#xA;    float   sensitivity     = 6.0f;&#xD;&#xA;    &#xD;&#xA;    // how fast the velocity can be at most&#xD;&#xA;    float   maxVelocity     = 550;&#xD;&#xA;    &#xD;&#xA;    // adjust velocity based on current accelerometer acceleration&#xD;&#xA;    playerVelocity.x    = playerVelocity.x * deceleration + acceleration.x * sensitivity;&#xD;&#xA;&#xD;&#xA;    // we must limit the maximum velocity of the player sprite, in both directions&#xD;&#xA;    if (playerVelocity.x &gt; maxVelocity)&#xD;&#xA;    {&#xD;&#xA;        playerVelocity.x    = maxVelocity;&#xD;&#xA;    }&#xD;&#xA;    else if (playerVelocity.x &lt; -maxVelocity)&#xD;&#xA;    {&#xD;&#xA;        playerVelocity.x    = -maxVelocity;&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    +(id)scene {&#xD;&#xA;    CCScene *scene = [CCScene node];&#xD;&#xA;    CCLayer *layer = [GameScene node];&#xD;&#xA;    [scene addChild:layer];&#xD;&#xA;    return scene;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(id)init {&#xD;&#xA;    if ((self = [super init])) {&#xD;&#xA;        CCLOG(@&quot;%@: %@&quot;, NSStringFromSelector(_cmd), self);&#xD;&#xA;        &#xD;&#xA;        self.isAccelerometerEnabled = YES;&#xD;&#xA;        &#xD;&#xA;        player = [CCSprite spriteWithFile:@&quot;alien.png&quot;];&#xD;&#xA;        [self addChild:player z:0 tag:1];&#xD;&#xA;        &#xD;&#xA;        CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;        float imageHeight = [player texture].contentSize.height;&#xD;&#xA;        player.position = CGPointMake(screenSize.width / 2, imageHeight / 2);&#xD;&#xA;        &#xD;&#xA;        // scheduling the update method in order to adjust the player's speed every frame&#xD;&#xA;		[self scheduleUpdate];&#xD;&#xA;        [self initSpiders];&#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;    return self;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void) deallaoc {&#xD;&#xA;    CCLOG(@&quot;%@: %@&quot;, NSStringFromSelector(_cmd), self);&#xD;&#xA;    &#xD;&#xA;    // The spiders array must be released, it was created using [CCArray alloc]&#xD;&#xA;    [spiders release];&#xD;&#xA;    spiders = nil;&#xD;&#xA;    &#xD;&#xA;    // Never forget to call [super dealloc]&#xD;&#xA;    [super dealloc];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34059" PostHistoryTypeId="1" PostId="15081" RevisionGUID="34858172-45e8-4f3f-bb88-6aa42e39d596" CreationDate="2011-07-21T11:01:40.087" UserId="4830" Text="How to make the accelerometer work in different angels" />
  <row Id="34060" PostHistoryTypeId="3" PostId="15081" RevisionGUID="34858172-45e8-4f3f-bb88-6aa42e39d596" CreationDate="2011-07-21T11:01:40.087" UserId="4830" Text="&lt;cocos2d-iphone&gt;&lt;objective-c&gt;" />
  <row Id="34065" PostHistoryTypeId="2" PostId="15083" RevisionGUID="56087024-835c-4b88-8a87-dffeee2f09f2" CreationDate="2011-07-21T11:22:34.330" UserId="7981" Text="I want to know what options (or shaders) to set so that my OpenGL game looks like Playstation 1 game. I know it probably can not be achieved 100 % because PSX used television and television renders differently that monitor. Thanks. :)" />
  <row Id="34066" PostHistoryTypeId="1" PostId="15083" RevisionGUID="56087024-835c-4b88-8a87-dffeee2f09f2" CreationDate="2011-07-21T11:22:34.330" UserId="7981" Text="How to emulate PSX's graphics with OpenGL?" />
  <row Id="34067" PostHistoryTypeId="3" PostId="15083" RevisionGUID="56087024-835c-4b88-8a87-dffeee2f09f2" CreationDate="2011-07-21T11:22:34.330" UserId="7981" Text="&lt;opengl&gt;&lt;emulation&gt;" />
  <row Id="34073" PostHistoryTypeId="2" PostId="15086" RevisionGUID="322c358d-0e85-411a-936c-3c43eccdd2f3" CreationDate="2011-07-21T13:41:41.030" UserId="1742" Text="In my opinion, the most important bits to make an OpenGL scene look like a PSX scene would be to make sure the filtering is turned off (PS1 only had nearest neighbour), and turn off Z buffering (there wasn't any) and render your scene with painters algorithm.&#xD;&#xA;&#xD;&#xA;The lighting was only per vertex, in fact there actually wasn't any lighting hardware only gouraud shaded vertex colouring. The lighting was software driven so you could do anything within the limitations of the CPU time, of which there wasn't much spare for clever advanced things like &quot;lighting&quot;. :) We managed to get specular at one point, but as it was per vertex it made the scene look sparkley so we dropped it. We never managed to get specular to work with skinned meshes as blending normals and then using them just took too much time.&#xD;&#xA;&#xD;&#xA;The PS1 also had a bit of texture swim, I'm not sure how you'd implement that with OpenGL, but if you're after an authentic experience, maybe just trying to make the UVs breakdown when they're near the screen edge would give a reasonable approximation.&#xD;&#xA;&#xD;&#xA;I'd also recommend you look at the vertex transforms: the PS1 didn't have floats, so the rendering took place with fixed point pipelines, this is the cause of the jittery motion when playing animations. There were only so many positions a vertex could be in, and at 16bit fixed point, that wasn't even all that many positions. Have a watch of a few PS1 youtube videos to get an idea for how it affected the game, http://www.youtube.com/watch?v=RSV4IBa1pMI you can see here that it means that straight lines jitter around when the camera is close to horizontal. I think a good way of emulating this would be to transform your world in software (just like the PS1 did) and always output whole number screen coordinates to the emulated screen size (which was one of the major reasons why the polys jittered around, they couldn't be rendered to sub-pixels)." />
  <row Id="34074" PostHistoryTypeId="4" PostId="15081" RevisionGUID="2ec9e5ff-d18b-41e9-b871-562155278057" CreationDate="2011-07-21T13:43:24.380" UserId="953" Comment="Fixed typo in title." Text="How to make the accelerometer work in different angles" />
  <row Id="34076" PostHistoryTypeId="2" PostId="15087" RevisionGUID="e08bb1f7-7947-4487-bec1-dc3ee8258719" CreationDate="2011-07-21T14:37:45.727" UserId="8741" Text="3. A small shoe manufacturer makes two styles of shoes: oxfords and loafers. Two machines are used in the process: a cutting machine and a sewing machine. Each type of shoe requires 15 min per pair on the cutting machine. Oxfords require 10 min of sewing per pair, and loafers require 20 min of sewing per pair. Because the manufacturer can hire only one operator for each machine, each process is available for just 8 hours a day. If the profit is P750 on each pair of oxfords and P1,000 on each pair of loafers, how many pairs of each type should be produced per day for maximum profit?&#xD;&#xA;" />
  <row Id="34077" PostHistoryTypeId="1" PostId="15087" RevisionGUID="e08bb1f7-7947-4487-bec1-dc3ee8258719" CreationDate="2011-07-21T14:37:45.727" UserId="8741" Text="application of system of inequlites" />
  <row Id="34078" PostHistoryTypeId="3" PostId="15087" RevisionGUID="e08bb1f7-7947-4487-bec1-dc3ee8258719" CreationDate="2011-07-21T14:37:45.727" UserId="8741" Text="&lt;graphs&gt;" />
  <row Id="34079" PostHistoryTypeId="6" PostId="15087" RevisionGUID="11870c4d-2237-4d78-840c-9ded3d443fd8" CreationDate="2011-07-21T14:40:34.677" UserId="1430" Comment="edited tags" Text="&lt;homework&gt;" />
  <row Id="34080" PostHistoryTypeId="5" PostId="15078" RevisionGUID="1402beb2-34c9-471e-9b80-3377bdd72f6e" CreationDate="2011-07-21T15:10:01.260" UserId="1839" Comment="added 14 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;&#xD;&#xA;**EDIT:** Calculating the absolute orientation is actually a bit easier, use the forward vector of the identity-matrix instead of avatars forward vector as input for 1) and 2). &#xD;&#xA;And don't multiply it in 3), instead use it directly as the new orientation: `newRot = q`" />
  <row Id="34081" PostHistoryTypeId="25" PostId="15083" RevisionGUID="5498637b-fb63-4276-91a7-018778a3c6cb" CreationDate="2011-07-21T15:32:14.070" Comment="http://twitter.com/#!/StackGameDev/status/94067162800590848" />
  <row Id="34082" PostHistoryTypeId="2" PostId="15088" RevisionGUID="5aa6f159-f254-485a-8c43-3ee5ccf907b7" CreationDate="2011-07-21T15:36:26.380" UserId="8427" Text="It sounds like the root of what you're asking for is a way of determining the friction of the ground at a given point in your map.&#xD;&#xA;&#xD;&#xA;A simple way of doing this could be to create a one-channel (grayscale) texture that represents the friction of the ground. Sample this texture at the point of the car (or each of the four wheels if you're feeling fancy) to get friction at runtime.&#xD;&#xA;&#xD;&#xA;These textures should make it relatively easy to author content for. You could probably whip up a debug mode that overlays the friction map on top of the visual texture to double check that things line up right. It allows you a lot of freedom in the friction gradient at the fringe of the road. You could probably come up with a data structure that uses less memory, but with a top down sprite based game I'm guessing that's not going to be much of an issue." />
  <row Id="34084" PostHistoryTypeId="2" PostId="15090" RevisionGUID="997fe6eb-1048-429c-9703-aee00555df7b" CreationDate="2011-07-21T15:49:22.637" UserId="6126" Text="I'm almost finished a game for the PC (I should be releasing it in a day or two). I wanted to have a way to easily release patches over the net in case I find a bug in the game right after I release it, or I want to add a feature later on.&#xD;&#xA;&#xD;&#xA;I am using InstallJammer as my install system. I was wondering, are any good update/patch programs (preferably free) that can check for and send updates to players over the Internet?&#xD;&#xA;&#xD;&#xA;For instance, if a player opens my game, the game first starts the update program that checks for updates. And if updates are available, it will let the user know. I can modify the source code to the game engine I own, but I really don't feel like re-inventing the wheel on this.&#xD;&#xA;&#xD;&#xA;Any suggestions?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="34085" PostHistoryTypeId="1" PostId="15090" RevisionGUID="997fe6eb-1048-429c-9703-aee00555df7b" CreationDate="2011-07-21T15:49:22.637" UserId="6126" Text="Any Good Update Systems?" />
  <row Id="34086" PostHistoryTypeId="3" PostId="15090" RevisionGUID="997fe6eb-1048-429c-9703-aee00555df7b" CreationDate="2011-07-21T15:49:22.637" UserId="6126" Text="&lt;patching&gt;" />
  <row Id="34088" PostHistoryTypeId="2" PostId="15091" RevisionGUID="92a9da8f-cd01-4ebd-aed6-0f216208e43e" CreationDate="2011-07-21T16:01:41.313" UserId="229" Text="May be overkill, but [RakNet][1] includes an [autopatcher system][2]:&#xD;&#xA;&#xD;&#xA;&gt; The autopatcher is a class that manages the copying of missing or&#xD;&#xA;&gt; changed files between two or more systems. It handles transferring&#xD;&#xA;&gt; files, compressing transferred files, security, and file operations.&#xD;&#xA;&gt; It does not handle basic connectivity or provide a user interface.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.jenkinssoftware.com/features.html&#xD;&#xA;  [2]: http://www.raknet.net/raknet/manual/autopatcher.html" />
  <row Id="34092" PostHistoryTypeId="5" PostId="15078" RevisionGUID="f1c5a83e-f1fe-4c11-abde-4e28e4b687a9" CreationDate="2011-07-21T16:27:54.843" UserId="1839" Comment="added 1554 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;&#xD;&#xA;**EDIT:** Calculating the absolute orientation is actually a bit easier, use the forward vector of the identity-matrix instead of avatars forward vector as input for 1) and 2). &#xD;&#xA;And don't multiply it in 3), instead use it directly as the new orientation: `newRot = q`&#xD;&#xA;&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;**Important to note:** The solution has 2 anomalies caused by nature of the cross-product:&#xD;&#xA;&#xD;&#xA;  1. If the forward vectors are equal. Solution here is simply return the identity quaternion&#xD;&#xA;  &#xD;&#xA;  2. If the vectors point exactly in the opposite direction. The solution here is to create the quaternion by using avatars up axis as rotation axis and the angle 180.0 degrees.&#xD;&#xA;  &#xD;&#xA;Here is the implementation in C++ that takes care of those edge cases. Converting it to C# should be easy.&#xD;&#xA;&#xD;&#xA;    // returns a quaternion that rotates vector a to vector b&#xD;&#xA;    quaternion get_rotation(const vector &amp;a, const vector &amp;b, const vector &amp;up)&#xD;&#xA;    {   &#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(a);&#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(b);&#xD;&#xA;        &#xD;&#xA;        float dot = vector::dot(a, b);    &#xD;&#xA;        // test for dot -1&#xD;&#xA;        if(nearly_equal_eps_f(dot, -1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the opposite direction, &#xD;&#xA;            // so it is a 180 degrees turn around the up-axis&#xD;&#xA;            return quaternion(up, gdeg2rad(180.0f));&#xD;&#xA;        }&#xD;&#xA;        // test for dot 1&#xD;&#xA;        else if(nearly_equal_eps_f(dot, 1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the same direction&#xD;&#xA;            // so we return the identity quaternion&#xD;&#xA;            return quaternion(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(dot);&#xD;&#xA;        vector rotAxis = vector::normalize(vector::cross(a, b));&#xD;&#xA;        return quaternion(rotAxis, rotAngle);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="34093" PostHistoryTypeId="5" PostId="15078" RevisionGUID="a7c503e2-aa92-4d87-b7df-b9902a47591d" CreationDate="2011-07-21T16:35:04.480" UserId="1839" Comment="deleted 19 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;&#xD;&#xA;**EDIT:** Calculating the absolute orientation is actually a bit easier, use the forward vector of the identity-matrix instead of avatars forward vector as input for 1) and 2). &#xD;&#xA;And don't multiply it in 3), instead use it directly as the new orientation: `newRot = q`&#xD;&#xA;&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;**Important to note:** The solution has 2 anomalies caused by nature of the cross-product:&#xD;&#xA;&#xD;&#xA;  1. If the forward vectors are equal. Solution here is simply return the identity quaternion&#xD;&#xA;  &#xD;&#xA;  2. If the vectors point exactly in the opposite direction. The solution here is to create the quaternion by using avatars up axis as rotation axis and the angle 180.0 degrees.&#xD;&#xA;  &#xD;&#xA;Here is the implementation in C++ that takes care of those edge cases. Converting it to C# should be easy.&#xD;&#xA;&#xD;&#xA;    // returns a quaternion that rotates vector a to vector b&#xD;&#xA;    quaternion get_rotation(const vector &amp;a, const vector &amp;b, const vector &amp;up)&#xD;&#xA;    {   &#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(a);&#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(b);&#xD;&#xA;        &#xD;&#xA;        float dot = vector::dot(a, b);    &#xD;&#xA;        // test for dot -1&#xD;&#xA;        if(nearly_equal_eps_f(dot, -1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the opposite direction, &#xD;&#xA;            // so it is a 180 degrees turn around the up-axis&#xD;&#xA;            return quaternion(up, gdeg2rad(180.0f));&#xD;&#xA;        }&#xD;&#xA;        // test for dot 1&#xD;&#xA;        else if(nearly_equal_eps_f(dot, 1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the same direction&#xD;&#xA;            // so we return the identity quaternion&#xD;&#xA;            return quaternion(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(dot);&#xD;&#xA;        vector rotAxis = vector::cross(a, b);&#xD;&#xA;        return quaternion(rotAxis, rotAngle);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="34094" PostHistoryTypeId="2" PostId="15092" RevisionGUID="4e3b8369-dad3-4574-a53e-d22038a31250" CreationDate="2011-07-21T16:40:55.157" UserId="3874" Text="Right now I create my boxes where 1 meter is 85 pixels. Gravity is 10.  And&#xD;&#xA;&#xD;&#xA;	                        fixtureDef.restitution = 0.1f;&#xD;&#xA;				fixtureDef.friction = 0.5f;&#xD;&#xA;				fixtureDef.density = 1.0f;&#xD;&#xA;&#xD;&#xA;The problem I'm having is illustrated in the image I have provided:&#xD;&#xA;![http://www.box2d.org/forum/download/file.php?mode=view&amp;id=1044&amp;sid=86e8772dc965cba215f9a16cca2839e4][1]&#xD;&#xA;&#xD;&#xA;As you can see, there is a small gap between many, but not all the crates. What could cause this?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/QU3u5.jpg" />
  <row Id="34095" PostHistoryTypeId="1" PostId="15092" RevisionGUID="4e3b8369-dad3-4574-a53e-d22038a31250" CreationDate="2011-07-21T16:40:55.157" UserId="3874" Text="Rectangles render with gaps in between them (Box2D)" />
  <row Id="34096" PostHistoryTypeId="3" PostId="15092" RevisionGUID="4e3b8369-dad3-4574-a53e-d22038a31250" CreationDate="2011-07-21T16:40:55.157" UserId="3874" Text="&lt;c++&gt;&lt;game-design&gt;&lt;box2d&gt;" />
  <row Id="34097" PostHistoryTypeId="2" PostId="15093" RevisionGUID="b4fd4bb2-f1f3-4a2d-9739-0c4c0cd54098" CreationDate="2011-07-21T16:48:15.497" UserId="7328" Text="I guess that's some issue in box2d, there is such a bug to increase performance. since more accuracy needs much more computational power. to fix that issue I guess you only need reduce box physical sizes (for example you can create a 84px*84px rectangle for a 86px*86px image). you can also fade the pixels in the edges to get better results." />
  <row Id="34098" PostHistoryTypeId="2" PostId="15094" RevisionGUID="9ffbc36c-a5f2-47e3-9b60-d399446bdbb6" CreationDate="2011-07-21T17:30:33.620" UserId="8776" Text="I am programming a graphics engine for an old game. The game uses a BSP geometry which I have rendering perfectly. For it's lights however, it simply has light instances with the standard x, y, z, rgba, brightness, type. Now I know that OpenGL has an 8 light limit. How should I go about handling multiple lights.&#xD;&#xA;&#xD;&#xA;I am learning per fragment light just to have the concepts under my belt. I know per pixel lighting is the standard and I will eventually move there, just want to learn how to get this concept put in play as well.&#xD;&#xA;&#xD;&#xA;I assume I will just calculate which lights are the closest and render those 8. Does anyone have any other ideas?" />
  <row Id="34099" PostHistoryTypeId="1" PostId="15094" RevisionGUID="9ffbc36c-a5f2-47e3-9b60-d399446bdbb6" CreationDate="2011-07-21T17:30:33.620" UserId="8776" Text="Best approach to simple per-fragment lighting - OpenGL" />
  <row Id="34100" PostHistoryTypeId="3" PostId="15094" RevisionGUID="9ffbc36c-a5f2-47e3-9b60-d399446bdbb6" CreationDate="2011-07-21T17:30:33.620" UserId="8776" Text="&lt;c++&gt;&lt;opengl&gt;&lt;engine&gt;" />
  <row Id="34101" PostHistoryTypeId="2" PostId="15095" RevisionGUID="a875c2bc-0bd6-4af1-8e21-9a279eca9dec" CreationDate="2011-07-21T17:32:21.497" UserId="8776" Text="Let me get this straight. You come here and post your homework without any further information and no attempt at it. Change your habits my friend or you will really struggle in programming." />
  <row Id="34102" PostHistoryTypeId="2" PostId="15096" RevisionGUID="27d759c9-6859-40fd-82b0-edd2c1a5ad00" CreationDate="2011-07-21T17:51:12.783" UserId="3794" Text="There are two approaches:&#xD;&#xA;&#xD;&#xA; - **Forward rendering**, one render pass per light and using additive blending between trnfrt targets. It works for &quot;independent&quot; number of lights.&#xD;&#xA; - **Deferred rendering**, is something like screen space rendering. Using few textures containing world space information.&#xD;&#xA;&#xD;&#xA;Forward rendering is probably easier to handle. Also you don't have to use one shader pass per light as i mentioned. You can do it in a cycle in one shader pass. The only reason to have more shader passes per light is when light contains information like color texture (projective texturing) or intensity curve (stored in texture) ... so you run out of the texture units. &#xD;&#xA;&#xD;&#xA;So i suggest simple forward rendering of all lights in one shader pass. &#xD;&#xA;&#xD;&#xA;Deferred rendering is way faster than forward rendering (because it is practically screen space), but harder to handle. &#xD;&#xA;&#xD;&#xA;I'm sure that you will find lots of good resources by googling for those two key words." />
  <row Id="34103" PostHistoryTypeId="5" PostId="7603" RevisionGUID="31a7086c-4a6d-4aa6-8120-ad4525c9a0de" CreationDate="2011-07-21T17:53:02.270" UserId="3794" Comment="deleted 146 characters in body" Text="For each light do one render pass and use Additive blending. It is called *forward rendering*.&#xD;&#xA;&#xD;&#xA;Question is: Why to do it this way and not just send all of the light positions and params in few arrays? Answer is that this is much easier to handle once you start making some more complex effects. And there is one plus more. You can use your current shader. &#xD;&#xA;&#xD;&#xA;**Edit:** To prove my point, i added two renders, because this technique sometimes sounds weird. One is rendered with gpu renderer which using described technique. And second is same scene rendered with Maya. Scene is lighted with 3 lights. One emits red, one blue and one green color. Common shadow mapping is used. &#xD;&#xA;&#xD;&#xA;Realtime renderer:  &#xD;&#xA;![furryball][1] &#xD;&#xA; &#xD;&#xA;Rendered with maya&#xD;&#xA;&#xD;&#xA;![maya][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/n4ATo.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/gjWSW.png" />
  <row Id="34104" PostHistoryTypeId="5" PostId="15096" RevisionGUID="3e0a6a28-3930-41a7-8a6b-1e26a30d8ecf" CreationDate="2011-07-21T17:56:44.017" UserId="3794" Comment="added 197 characters in body" Text="There are two approaches:&#xD;&#xA;&#xD;&#xA; - **Forward rendering**, one render pass per light and using additive blending between render targets. It works for &quot;independent&quot; number of lights.&#xD;&#xA; - **Deferred rendering**, is something like screen space rendering. Using few textures containing world space information.&#xD;&#xA;&#xD;&#xA;Forward rendering is probably easier to handle. Also you don't have to use one shader pass per light as i mentioned. You can do it in a cycle in one shader pass. The only reason to have more shader passes per light is when light contains information like color texture (projective texturing) or intensity curve (stored in texture) ... so you run out of the texture units. &#xD;&#xA;&#xD;&#xA;So i suggest simple forward rendering of all lights in one shader pass. &#xD;&#xA;&#xD;&#xA;Deferred rendering is way faster than forward rendering (because it is practically screen space), but harder to handle. &#xD;&#xA;&#xD;&#xA;I'm sure that you will find lots of good resources by googling for those two key words.&#xD;&#xA;&#xD;&#xA;Some question from this site:&#xD;&#xA;&#xD;&#xA; - http://gamedev.stackexchange.com/questions/74/what-is-deferred-rendering&#xD;&#xA; - http://gamedev.stackexchange.com/questions/7595/d3d9-effects-variable-parameters" />
  <row Id="34105" PostHistoryTypeId="12" PostId="15096" RevisionGUID="b8dc728d-6999-402b-898d-828ce663be9d" CreationDate="2011-07-21T17:59:14.903" UserId="3794" Text="[{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;Notabene&quot;}]" />
  <row Id="34106" PostHistoryTypeId="25" PostId="15094" RevisionGUID="49630bd3-0810-43fc-a1cb-c9063dafedcc" CreationDate="2011-07-21T18:32:14.583" Comment="http://twitter.com/#!/StackGameDev/status/94112460059066370" />
  <row Id="34107" PostHistoryTypeId="2" PostId="15097" RevisionGUID="0c7371f3-315d-4d21-b378-5572652eade7" CreationDate="2011-07-21T18:33:41.983" UserId="8778" Text="I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this. &#xD;&#xA;&#xD;&#xA;What I'm looking for is the DirectX equivalent of **glFramebufferTextureLayer()**, which sets a slice of a GL_TEXTURE_2D_ARRAY_EXT as a texture resource of a Framebuffer Object.&#xD;&#xA;&#xD;&#xA;In D3D11, you set a render target using **ID3D11DeviceContext::OMSetRenderTargets**, and you can set a Texture2DArray resource view as a render target. However, the only way I see to select which slice of the texture is painted is to use the **SV_RenderTargetArrayIndex** semantic in an HLSL geometry shader. (The semantic is only available in a geometry shader).&#xD;&#xA;&#xD;&#xA;My pipline doesn't have a geometry shader, and I don't know at compile time which primitive type I will be rendering - I'm reading models out of input files. It seems like, to add a passthrough geometry shader I would need one shader program for every possible primitive type (terrible).&#xD;&#xA;&#xD;&#xA;The desired output slice will not change between rendering passes. Is there no way to set a slice of a Texture2DArray as a render target without using a geometry shader?" />
  <row Id="34108" PostHistoryTypeId="1" PostId="15097" RevisionGUID="0c7371f3-315d-4d21-b378-5572652eade7" CreationDate="2011-07-21T18:33:41.983" UserId="8778" Text="Render to Texture2DArray slices in DirectX11?" />
  <row Id="34109" PostHistoryTypeId="3" PostId="15097" RevisionGUID="0c7371f3-315d-4d21-b378-5572652eade7" CreationDate="2011-07-21T18:33:41.983" UserId="8778" Text="&lt;textures&gt;&lt;directx11&gt;" />
  <row Id="34110" PostHistoryTypeId="13" PostId="15096" RevisionGUID="1827909a-45e3-4acf-8788-df3a5d5efd82" CreationDate="2011-07-21T19:56:46.240" UserId="3794" Text="[{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;Notabene&quot;}]" />
  <row Id="34111" PostHistoryTypeId="5" PostId="15096" RevisionGUID="e0d5e43c-382b-4451-af91-11c51e7cfe44" CreationDate="2011-07-21T19:57:44.133" UserId="3794" Comment="added 63 characters in body" Text="*I expect that you are ok to use shaders*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are two approaches:&#xD;&#xA;&#xD;&#xA; - **Forward rendering**, one render pass per light and using additive blending between render targets. It works for &quot;independent&quot; number of lights.&#xD;&#xA; - **Deferred rendering**, is something like screen space rendering. Using few textures containing world space information.&#xD;&#xA;&#xD;&#xA;Forward rendering is probably easier to handle. Also you don't have to use one shader pass per light as i mentioned. You can do it in a cycle in one shader pass. The only reason to have more shader passes per light is when light contains information like color texture (projective texturing) or intensity curve (stored in texture) ... so you run out of the texture units. &#xD;&#xA;&#xD;&#xA;So i suggest simple forward rendering of all lights in one shader pass. &#xD;&#xA;&#xD;&#xA;Deferred rendering is way faster than forward rendering (because it is practically screen space), but harder to handle. &#xD;&#xA;&#xD;&#xA;I'm sure that you will find lots of good resources by googling for those two key words.&#xD;&#xA;&#xD;&#xA;Some question from this site:&#xD;&#xA;&#xD;&#xA; - http://gamedev.stackexchange.com/questions/74/what-is-deferred-rendering&#xD;&#xA; - http://gamedev.stackexchange.com/questions/7595/d3d9-effects-variable-parameters" />
  <row Id="34112" PostHistoryTypeId="10" PostId="15087" RevisionGUID="238a310c-8a7b-4814-8ba2-de1b854db30d" CreationDate="2011-07-21T21:09:30.477" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="34113" PostHistoryTypeId="4" PostId="15053" RevisionGUID="250c32c7-ab89-43d5-bbb5-fdcb12874946" CreationDate="2011-07-21T21:09:52.893" UserId="8771" Comment="I assume that's what was meant." Text="I need a book to continue experimenting with ActionScript 3" />
  <row Id="34114" PostHistoryTypeId="24" PostId="15053" RevisionGUID="250c32c7-ab89-43d5-bbb5-fdcb12874946" CreationDate="2011-07-21T21:09:52.893" Comment="Proposed by 8771 approved by 51 edit id of 574" />
  <row Id="34115" PostHistoryTypeId="25" PostId="15097" RevisionGUID="f8a14565-2639-474f-bc4e-0bda144130a9" CreationDate="2011-07-21T21:32:15.160" Comment="http://twitter.com/#!/StackGameDev/status/94157762879172608" />
  <row Id="34116" PostHistoryTypeId="2" PostId="15098" RevisionGUID="cff1a644-eed9-438c-a373-7b767292dd4e" CreationDate="2011-07-21T22:20:32.053" UserId="7588" Text="If you game is very data orientated, it could be easy to make your own loader to verify and download data from a server, then launch the game. It shouldn't take too long in a managed language.&#xD;&#xA;&#xD;&#xA;I made one a while back where the client downloaded a map of what the game folder shoulld look like, files, md5's, etc. And then looked through local files to see which ones it needed to download from the server.&#xD;&#xA;&#xD;&#xA;Not very secure or optimized, but you get the point.&#xD;&#xA;&#xD;&#xA;I also recall in my youth using [Patch Maker](http://www.clickteam.com/eng/patchmaker.php) by Clickteam. I'm not sure what it's capabilities are nowadays but it's free and can update binary files, you just distribute it as a setup file.&#xD;&#xA;&#xD;&#xA;Maybe some of the bigger install tools allow you to create manual patches, [Inno Setup](http://www.jrsoftware.org/isinfo.php) is free and quite complete, maybe you may have more luck there.&#xD;&#xA;" />
  <row Id="34117" PostHistoryTypeId="2" PostId="15099" RevisionGUID="42978918-4581-4980-9ebd-a673c7a0febe" CreationDate="2011-07-21T23:54:25.043" UserId="8491" Text="I have 1 png of many different textures. I want to use these textures in my iphone game using cocos2d. I found the program &quot;Zwoptex&quot; where you can combine many textures to one png and create a plist file that you can use in your program. &#xD;&#xA;&#xD;&#xA;But if you have already a png file how do you get all these textures out of this file automatically OR how do I create a plist file from this png file?&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="34118" PostHistoryTypeId="1" PostId="15099" RevisionGUID="42978918-4581-4980-9ebd-a673c7a0febe" CreationDate="2011-07-21T23:54:25.043" UserId="8491" Text="How do you get textures out of a png file" />
  <row Id="34119" PostHistoryTypeId="3" PostId="15099" RevisionGUID="42978918-4581-4980-9ebd-a673c7a0febe" CreationDate="2011-07-21T23:54:25.043" UserId="8491" Text="&lt;iphone&gt;&lt;textures&gt;&lt;sprites&gt;&lt;cocos2d&gt;" />
  <row Id="34120" PostHistoryTypeId="2" PostId="15100" RevisionGUID="93827ab3-db57-478f-818c-e0808f46f190" CreationDate="2011-07-22T00:26:01.587" UserId="4360" Text="I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine. &#xD;&#xA;&#xD;&#xA;My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect. &#xD;&#xA;&#xD;&#xA;The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.  &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;This image might explain better than I did:  &#xD;&#xA;After jumping on to the red platform the player character will fall off as the platform moves to the right  &#xD;&#xA;     &#xD;&#xA;![example](http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpg)" />
  <row Id="34121" PostHistoryTypeId="1" PostId="15100" RevisionGUID="93827ab3-db57-478f-818c-e0808f46f190" CreationDate="2011-07-22T00:26:01.587" UserId="4360" Text="Box2D Platform body not moving player body along with it" />
  <row Id="34122" PostHistoryTypeId="3" PostId="15100" RevisionGUID="93827ab3-db57-478f-818c-e0808f46f190" CreationDate="2011-07-22T00:26:01.587" UserId="4360" Text="&lt;2d&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;platform-games&gt;&lt;platformer&gt;" />
  <row Id="34123" PostHistoryTypeId="25" PostId="15090" RevisionGUID="eb4674c4-d2a5-4475-88c8-8a854c14dc66" CreationDate="2011-07-22T00:32:15.200" Comment="http://twitter.com/#!/StackGameDev/status/94203061593047040" />
  <row Id="34124" PostHistoryTypeId="2" PostId="15101" RevisionGUID="06534e45-26ac-4c13-ac4e-d67b6fba1e03" CreationDate="2011-07-22T01:12:20.640" UserId="8784" Text="I'm trying to follow the tutorial [found here.][1]&#xD;&#xA;&#xD;&#xA;Around 5:40 (ish) in the video, he adds a Bezier Circle. He then adds the existing Bezier Curve as the Bevel Object on the Circle. This makes the Curve go around the circle creating the 3D chess piece.&#xD;&#xA;&#xD;&#xA;I'm trying to do the exact same thing, but it's not working. I am using Blender 2.5 however too. When I set my curve to be the Bevel Object of the Circle, my Bezier Circle is just becoming a larger gray disc of goo. I was expecting it to be a 3D chess pawn.&#xD;&#xA;&#xD;&#xA;You can see a screenshot of what mine looks like:&#xD;&#xA;&#xD;&#xA;[Before Bevel Object is Placed][2]&#xD;&#xA;&#xD;&#xA;[After Bevel Object is Placed][3]&#xD;&#xA;&#xD;&#xA;For the record, the name of my Bezier Curve is &quot;BezierCurve&quot; and the name of my Bezier Circle is &quot;BezierCircle&quot;.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;Andy&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=81FZ3x7wtmk&#xD;&#xA;  [2]: https://skitch.com/ardavis/fmg4t/before-bevel-object&#xD;&#xA;  [3]: https://skitch.com/ardavis/fmg4s/after-bevel-object" />
  <row Id="34125" PostHistoryTypeId="1" PostId="15101" RevisionGUID="06534e45-26ac-4c13-ac4e-d67b6fba1e03" CreationDate="2011-07-22T01:12:20.640" UserId="8784" Text="Blender 2.5 - Using a Bezier Circle to set Bezier Curve as the Bevel Object" />
  <row Id="34126" PostHistoryTypeId="3" PostId="15101" RevisionGUID="06534e45-26ac-4c13-ac4e-d67b6fba1e03" CreationDate="2011-07-22T01:12:20.640" UserId="8784" Text="&lt;blender&gt;" />
  <row Id="34127" PostHistoryTypeId="2" PostId="15102" RevisionGUID="b46b42c7-4744-49ea-9143-990b506bdf6c" CreationDate="2011-07-22T01:34:18.203" UserId="560" Text="I have only read **Foundation ActionScript 3.0 Animation: Making Things Move!** by Keith Peters but it was a good read, covered some interesting topics and the code was good. The author also runs the blog [http://www.bit-101.com/blog/](http://www.bit-101.com/blog/). He has also written another book **AdvancED ActionScript 3.0 Animation** which is similar to the first, but with different topics, although I would read his first one to begin with." />
  <row Id="34128" PostHistoryTypeId="5" PostId="15101" RevisionGUID="3fb4e32c-809e-43db-8dca-ad825a18b0f5" CreationDate="2011-07-22T01:34:37.853" UserId="8784" Comment="added 252 characters in body" Text="I'm trying to follow the tutorial [found here.][1]&#xD;&#xA;&#xD;&#xA;Around 5:40 (ish) in the video, he adds a Bezier Circle. He then adds the existing Bezier Curve as the Bevel Object on the Circle. This makes the Curve go around the circle creating the 3D chess piece.&#xD;&#xA;&#xD;&#xA;I'm trying to do the exact same thing, but it's not working. I am using Blender 2.5 however too. When I set my curve to be the Bevel Object of the Circle, my Bezier Circle is just becoming a larger gray disc of goo. I was expecting it to be a 3D chess pawn.&#xD;&#xA;&#xD;&#xA;You can see a screenshot of what mine looks like:&#xD;&#xA;&#xD;&#xA;[Before Bevel Object is Placed][2]&#xD;&#xA;&#xD;&#xA;[After Bevel Object is Placed][3]&#xD;&#xA;&#xD;&#xA;For the record, the name of my Bezier Curve is &quot;BezierCurve&quot; and the name of my Bezier Circle is &quot;BezierCircle&quot;.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;Andy&#xD;&#xA;&#xD;&#xA;**UPDATE 1**&#xD;&#xA;&#xD;&#xA;I just added a plan unchanged Bezier Curve and unchanged Bezier Circle and performed the same steps and it does work. Something must be wrong with my Bezier Curve in that it isn't being projected correctly around the Circle. Thoughts?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=81FZ3x7wtmk&#xD;&#xA;  [2]: https://skitch.com/ardavis/fmg4t/before-bevel-object&#xD;&#xA;  [3]: https://skitch.com/ardavis/fmg4s/after-bevel-object" />
  <row Id="34129" PostHistoryTypeId="5" PostId="15101" RevisionGUID="813c782d-4428-4df3-bff4-81e6430cd35d" CreationDate="2011-07-22T02:13:16.070" UserId="8784" Comment="added 323 characters in body" Text="I'm trying to follow the tutorial [found here.][1]&#xD;&#xA;&#xD;&#xA;Around 5:40 (ish) in the video, he adds a Bezier Circle. He then adds the existing Bezier Curve as the Bevel Object on the Circle. This makes the Curve go around the circle creating the 3D chess piece.&#xD;&#xA;&#xD;&#xA;I'm trying to do the exact same thing, but it's not working. I am using Blender 2.5 however too. When I set my curve to be the Bevel Object of the Circle, my Bezier Circle is just becoming a larger gray disc of goo. I was expecting it to be a 3D chess pawn.&#xD;&#xA;&#xD;&#xA;You can see a screenshot of what mine looks like:&#xD;&#xA;&#xD;&#xA;[Before Bevel Object is Placed][2]&#xD;&#xA;&#xD;&#xA;[After Bevel Object is Placed][3]&#xD;&#xA;&#xD;&#xA;For the record, the name of my Bezier Curve is &quot;BezierCurve&quot; and the name of my Bezier Circle is &quot;BezierCircle&quot;.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;Andy&#xD;&#xA;&#xD;&#xA;**UPDATE 1**&#xD;&#xA;&#xD;&#xA;I just added a plan unchanged Bezier Curve and unchanged Bezier Circle and performed the same steps and it does work. Something must be wrong with my Bezier Curve in that it isn't being projected correctly around the Circle.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;&#xD;&#xA;Just realized that when I set the Bezier Curve handles to &quot;Automatic&quot; using the V shortcut (only for Blender 2.5), then my Circle no longer immitates the 3D curve. I need Automatic I think in order for the Bezier Curve to not be wavy. With Automatic, it does a slight curve directly from point to point. Thoughts?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=81FZ3x7wtmk&#xD;&#xA;  [2]: https://skitch.com/ardavis/fmg4t/before-bevel-object&#xD;&#xA;  [3]: https://skitch.com/ardavis/fmg4s/after-bevel-object" />
  <row Id="34130" PostHistoryTypeId="25" PostId="15101" RevisionGUID="82f21262-642d-4623-97bd-e25929030a3c" CreationDate="2011-07-22T03:32:14.850" Comment="http://twitter.com/#!/StackGameDev/status/94248359866531840" />
  <row Id="34133" PostHistoryTypeId="2" PostId="15104" RevisionGUID="06b28080-15d4-424c-9dc2-eb37e305fb09" CreationDate="2011-07-22T03:53:54.940" UserId="1929" Text="I'm looking for a vector art tool for gameart, similar to Flash, but preferably free. It just needs the following capabilities:&#xD;&#xA;&#xD;&#xA;- Create vector images (can scale up/down without losing quality)&#xD;&#xA;- Specify shape X/Y to the pixel (eg. set the X to 24.1, like in Flash)&#xD;&#xA;- Draw primitive shapes (square/circle/triangle) with border and colour (or gradient)&#xD;&#xA;- Specify shape width/height in precise pixels&#xD;&#xA;- Export to PNG&#xD;&#xA;&#xD;&#xA;Flash can do all this, but it's expensive (and heavy to install). Is there a free alternative that I can use?&#xD;&#xA;&#xD;&#xA;This is NOT for pixely, pixel-style art." />
  <row Id="34134" PostHistoryTypeId="1" PostId="15104" RevisionGUID="06b28080-15d4-424c-9dc2-eb37e305fb09" CreationDate="2011-07-22T03:53:54.940" UserId="1929" Text="Vector Art Tool: Size, Position, Shapes, Symbols" />
  <row Id="34135" PostHistoryTypeId="3" PostId="15104" RevisionGUID="06b28080-15d4-424c-9dc2-eb37e305fb09" CreationDate="2011-07-22T03:53:54.940" UserId="1929" Text="&lt;tools&gt;&lt;vector-art&gt;" />
  <row Id="34136" PostHistoryTypeId="2" PostId="15105" RevisionGUID="11a87d2d-d910-4f91-87f3-a6c23778490a" CreationDate="2011-07-22T06:23:19.430" UserId="7191" Text="Looks like Zwoptex uses XML files to define sprites in a file. Unless the program has some kind of wizard for creating a new XML file from an existing PNG, you'd have to create this XML file yourself. You can find the specifications for creating one here: [http://zwoptexapp.com/documentation][1], which includes a sample file.&#xD;&#xA;&#xD;&#xA; If there isn't a wizard, you're best bet is to break apart all your images to have Zwoptex put them back together (and in the process create it's XML sprite definition file). [Gimp][2] is a free photo editor if you need one, fairly simple to use. To break apart your images, just use the *Free Select Tool*, select a sprite, CTRL + C, then go to *File-&gt;Create-&gt;From Clipboard*. Then simply save the new image with an appropriate name.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zwoptexapp.com/documentation&#xD;&#xA;  [2]: http://www.gimp.org/" />
  <row Id="34137" PostHistoryTypeId="25" PostId="15104" RevisionGUID="95cce7bd-8d50-499b-9587-80be35052266" CreationDate="2011-07-22T06:32:14.493" Comment="http://twitter.com/#!/StackGameDev/status/94293658488143872" />
  <row Id="34138" PostHistoryTypeId="2" PostId="15106" RevisionGUID="31db9b48-9c60-41d0-8042-8ace9c2b366a" CreationDate="2011-07-22T07:01:01.817" UserId="20" Text="Blender is really picky when it comes to curve orientations and mostly doesn't what you would expect. Your chess piece should have the same orientation as the circle, eg. don't rotate the bevel shape in an upwards position, rather keep it on the same &quot;plane&quot; as the circle, as shown in this image:&#xD;&#xA;&#xD;&#xA;![blender curves top view][1]&#xD;&#xA;&#xD;&#xA;Rotating your &quot;BezierCurve&quot; should already have a visual impact on your chess-piece. Then you just have to go to edit mode and modify the offset of the curve to the origin, so that the chess piece actually begins to look like one :)&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tCPR7.png" />
  <row Id="34139" PostHistoryTypeId="5" PostId="15106" RevisionGUID="7c79519d-c0aa-4e2c-b1a7-972c40a1caf7" CreationDate="2011-07-22T07:06:53.997" UserId="20" Comment="small fix for clarity" Text="Blender is really picky when it comes to curve orientations and mostly doesn't do what you would expect. Your chess piece should have the same orientation as the circle, eg. don't rotate the bevel shape in an upwards position, rather keep it on the same &quot;plane&quot; as the circle, as shown in this image:&#xD;&#xA;&#xD;&#xA;![blender curves top view][1]&#xD;&#xA;&#xD;&#xA;Rotating your &quot;BezierCurve&quot; should already have a visual impact on your chess-piece. Then you just have to go to edit mode (chess-outline) and modify the offset of the curve to the origin, so that the chess piece actually begins to look like one :)&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tCPR7.png" />
  <row Id="34140" PostHistoryTypeId="2" PostId="15107" RevisionGUID="8d7ef2b0-3470-47d4-bc20-4f813759783e" CreationDate="2011-07-22T08:39:42.337" UserId="8790" Text="I was browsing through how to mod a game urban terror(mod of quacke 3)&#xD;&#xA;&#xD;&#xA;And i found that it can be done by editing qvm files in the game. Under the file named zpak000.pk3&#xD;&#xA;&#xD;&#xA;And i saw the files named&#xD;&#xA;&#xD;&#xA;    ui.qvm&#xD;&#xA;    qagame.qvm&#xD;&#xA;    cgame.qvm&#xD;&#xA;&#xD;&#xA;But i cant find a way with which i can edit these file ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34141" PostHistoryTypeId="1" PostId="15107" RevisionGUID="8d7ef2b0-3470-47d4-bc20-4f813759783e" CreationDate="2011-07-22T08:39:42.337" UserId="8790" Text="How can i edit qvm(quacke virtual machine) files ?" />
  <row Id="34142" PostHistoryTypeId="3" PostId="15107" RevisionGUID="8d7ef2b0-3470-47d4-bc20-4f813759783e" CreationDate="2011-07-22T08:39:42.337" UserId="8790" Text="&lt;modification&gt;&lt;quake3&gt;" />
  <row Id="34143" PostHistoryTypeId="6" PostId="15104" RevisionGUID="8fb5fe43-2605-4e50-b397-93ef63091622" CreationDate="2011-07-22T09:09:48.253" UserId="1929" Comment="edited tags" Text="&lt;2d&gt;&lt;tools&gt;&lt;vector-art&gt;" />
  <row Id="34144" PostHistoryTypeId="5" PostId="15086" RevisionGUID="d2ab3b14-08ee-4ed9-86a9-da3d2ec87061" CreationDate="2011-07-22T10:04:53.650" UserId="1742" Comment="explaining the reason for texture swim." Text="In my opinion, the most important bits to make an OpenGL scene look like a PSX scene would be to make sure the filtering is turned off (PS1 only had nearest neighbour), and turn off Z buffering (there wasn't any) and render your scene with painters algorithm.&#xD;&#xA;&#xD;&#xA;The lighting was only per vertex, in fact there actually wasn't any lighting hardware only gouraud shaded vertex colouring. The lighting was software driven so you could do anything within the limitations of the CPU time, of which there wasn't much spare for clever advanced things like &quot;lighting&quot;. :) We managed to get specular at one point, but as it was per vertex it made the scene look sparkley so we dropped it. We never managed to get specular to work with skinned meshes as blending normals and then using them just took too much time.&#xD;&#xA;&#xD;&#xA;The PS1 also had a bit of texture swim, I'm not sure how you'd implement that with OpenGL, but if you're after an authentic experience, maybe just trying to make the UVs breakdown when they're near the screen edge would give a reasonable approximation.&#xD;&#xA;&#xD;&#xA;I'd also recommend you look at the vertex transforms: the PS1 didn't have floats, so the rendering took place with fixed point pipelines, this is the cause of the jittery motion when playing animations. There were only so many positions a vertex could be in, and at 16bit fixed point, that wasn't even all that many positions. Have a watch of a few PS1 youtube videos to get an idea for how it affected the game, http://www.youtube.com/watch?v=RSV4IBa1pMI you can see here that it means that straight lines jitter around when the camera is close to horizontal. I think a good way of emulating this would be to transform your world in software (just like the PS1 did) and always output whole number screen coordinates to the emulated screen size (which was one of the major reasons why the polys jittered around, they couldn't be rendered to sub-pixels).&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;Texture swim was due to the PS1 having NO 3D interpolation at all. As mentioned by user712092, the affine renderer could only interpolate in screen space so we ended up with our diagonals all wrong. This can be emulated by hand transforming the scene, and discarding the final Z value in your vertex after you have divided the x and y screen coordinates by that z value" />
  <row Id="34147" PostHistoryTypeId="2" PostId="15109" RevisionGUID="89d69e3d-9e30-4a71-9fd7-704a0427effd" CreationDate="2011-07-22T11:02:13.627" UserId="6573" Text="We are developing an MMO using Smartfox Server. The targeted audience is kids from 7 -12 years.&#xD;&#xA;&#xD;&#xA;There is a global chat option in this MMO.  &#xD;&#xA;Whatever the user types in a textbox get displayed next to users avatar after he/she hits enter.&#xD;&#xA;&#xD;&#xA;We would like to filter abusive language / profanities from this chat.  &#xD;&#xA;We could capture the chat and read the text. The problem is getting the list of profanities itself.&#xD;&#xA;&#xD;&#xA;Our questions are&#xD;&#xA;&#xD;&#xA; 1. Where will one get exhaustive list of all profanities?&#xD;&#xA; 2. What method is adopted in similar scenario to filter out these?" />
  <row Id="34148" PostHistoryTypeId="1" PostId="15109" RevisionGUID="89d69e3d-9e30-4a71-9fd7-704a0427effd" CreationDate="2011-07-22T11:02:13.627" UserId="6573" Text="Profanity filter for an MMO chat" />
  <row Id="34149" PostHistoryTypeId="3" PostId="15109" RevisionGUID="89d69e3d-9e30-4a71-9fd7-704a0427effd" CreationDate="2011-07-22T11:02:13.627" UserId="6573" Text="&lt;game-design&gt;&lt;mmo&gt;" />
  <row Id="34150" PostHistoryTypeId="25" PostId="15092" RevisionGUID="2bdf8fa2-06e9-4692-8c3b-5de5fe46fb5f" CreationDate="2011-07-22T12:32:14.537" Comment="http://twitter.com/#!/StackGameDev/status/94384254439538688" />
  <row Id="34151" PostHistoryTypeId="2" PostId="15110" RevisionGUID="04e4f708-e1e6-42ae-a2c0-5c442fcc608a" CreationDate="2011-07-22T13:01:11.190" UserId="1743" Text="I'm working on a game that is going to involve *gasp* hexagons.&#xD;&#xA;&#xD;&#xA;At present, I have a hexagon image that I am using (all sides are the same length...it fits into a 50px by 50px image).&#xD;&#xA;&#xD;&#xA;I am somewhat new to C# and really new to XNA, but is there some sort of easy method that I can call rather than doing a convoluted if statement based on points and angles?" />
  <row Id="34152" PostHistoryTypeId="1" PostId="15110" RevisionGUID="04e4f708-e1e6-42ae-a2c0-5c442fcc608a" CreationDate="2011-07-22T13:01:11.190" UserId="1743" Text="Recognizing a hexoganal clickbox" />
  <row Id="34153" PostHistoryTypeId="3" PostId="15110" RevisionGUID="04e4f708-e1e6-42ae-a2c0-5c442fcc608a" CreationDate="2011-07-22T13:01:11.190" UserId="1743" Text="&lt;xna&gt;&lt;c#&gt;&lt;clickbox&gt;&lt;shape&gt;" />
  <row Id="34154" PostHistoryTypeId="6" PostId="15092" RevisionGUID="c4e1d8a7-371b-4df8-aee3-2c6bf919b5c5" CreationDate="2011-07-22T13:13:04.427" UserId="7588" Comment="edited tags" Text="&lt;c++&gt;&lt;box2d&gt;" />
  <row Id="34155" PostHistoryTypeId="2" PostId="15111" RevisionGUID="c9028573-d75a-456a-b6fc-202dccb81107" CreationDate="2011-07-22T13:25:17.153" UserId="165" Text="As I commented, filtering all offensive words is really hard - but you could turn it around, and use a whitelist of *allowed* words. Doing a google search, it seems fairly common for children's game to limit what they can type to a list. For instance, [Lego Universe][1] uses a whitelist.&#xD;&#xA;&#xD;&#xA;Also see: [Whitelisting for game chat][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.commonsensemedia.org/game-reviews/lego-universe&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4243768/whitelist-for-player-to-player-chat-in-kids-game" />
  <row Id="34156" PostHistoryTypeId="5" PostId="15111" RevisionGUID="7a55a93c-6750-47d3-8cd3-e09f125a67d8" CreationDate="2011-07-22T13:30:58.290" UserId="165" Comment="added 185 characters in body" Text="As I commented, filtering all offensive words is really hard - but you could turn it around, and use a **whitelist** of *allowed* words. Doing a google search, it seems fairly common for children's game to limit what they can type to a list. For instance, [Lego Universe][1] uses a whitelist.&#xD;&#xA;&#xD;&#xA;Also see: [Whitelisting for game chat][2]. And note that [whitelists can be circumvented][3]. There is no guaranteed solution.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.commonsensemedia.org/game-reviews/lego-universe&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4243768/whitelist-for-player-to-player-chat-in-kids-game&#xD;&#xA;  [3]: http://www.voxexmachina.com/news/wizard-101-how-to-insult-people-and-circumvent-the-filter/" />
  <row Id="34157" PostHistoryTypeId="5" PostId="15111" RevisionGUID="c967a5ca-ac81-472e-8e9c-153bf938f50c" CreationDate="2011-07-22T13:42:57.380" UserId="165" Comment="added 322 characters in body" Text="As I commented, filtering all offensive words is really hard - but you could turn it around, and use a **whitelist** of *allowed* words. Doing a google search, it seems fairly common for children's game to limit what they can type to a list. For instance, [Lego Universe][1] uses a whitelist.&#xD;&#xA;&#xD;&#xA;Also see: [Whitelisting for game chat][2]. And note that [whitelists can be circumvented][3]. There is no guaranteed solution.&#xD;&#xA;&#xD;&#xA;Considering that it's for young children, and mis-spelling could be a problem - depending on the client interface, you might consider [word auto-completion][4]. As the players start typing letters, offer a list of possible words and let them select the correct one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.commonsensemedia.org/game-reviews/lego-universe&#xD;&#xA;  [2]: http://stackoverflow.com/questions/4243768/whitelist-for-player-to-player-chat-in-kids-game&#xD;&#xA;  [3]: http://www.voxexmachina.com/news/wizard-101-how-to-insult-people-and-circumvent-the-filter/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Auto-completion" />
  <row Id="34158" PostHistoryTypeId="2" PostId="15112" RevisionGUID="b7121026-d0b0-417a-8dde-318498ea24d6" CreationDate="2011-07-22T13:45:08.610" UserId="7588" Text="I would try to implement a solution allowing for a blacklist and a whitelist, where you could add 'cunt' to the blacklist, and 'scunthorpe' to the whitelist for example.&#xD;&#xA;&#xD;&#xA;I don't believe that you could _ever_ implement a failsafe solution, so I'd try to get the most &quot;popular&quot; words in your dictionary, and make it as easy as possible to add new words to the lists.&#xD;&#xA;&#xD;&#xA;The reason for this is that languages, especially english, constantly evolve and something that has been inoffensive for decades could become offensive in the right context.&#xD;&#xA;&#xD;&#xA;Try to get the most words possible and go from there, have quick reaction times when people complain and show that this is generally a concern and I doubt you'll have any problems.&#xD;&#xA;&#xD;&#xA;It would be a good idea to know exactly what the guidelines are for censorship in the US: MBNL! (me be no lawyer!)" />
  <row Id="34159" PostHistoryTypeId="2" PostId="15113" RevisionGUID="1a366387-500a-4150-852e-8cc512535263" CreationDate="2011-07-22T13:52:19.480" UserId="5021" Text="There's no XNA method that does a hexagon hit test.&#xD;&#xA;&#xD;&#xA;You can implement your own, with some help from this article:&#xD;&#xA;&#xD;&#xA;[Coordinates in Hexagon Based Tile Maps][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/coordinates-in-hexagon-based-tile-maps-r1800&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This question also solves the problem directly:&#xD;&#xA;http://stackoverflow.com/questions/5193331/is-a-point-inside-regular-hexagon" />
  <row Id="34160" PostHistoryTypeId="2" PostId="15114" RevisionGUID="92a6636e-af05-4c15-92e6-f770218b030b" CreationDate="2011-07-22T13:56:26.297" UserId="7881" Text="A hexagon is a rectangle with clipped corners. The way I've seen this done, and I've heard the Civilization series does it this way with orthogonal maps, is to create a bitmap with a white space (orthogonal or hexagonal), and a red, green, blue, and yellow corner. (Or whatever colors you like.)&#xD;&#xA;&#xD;&#xA;![Hex mask][1]&#xD;&#xA;&#xD;&#xA;Then, just determine which rectangle the cursor is over, and test the color of the pixel at that location. If it's white, they're hovering over that space. Each other color is mapped to an offset, and they're hovering over that hexagon instead. This way is efficient, takes little geometry, and can be used for any arbitrarily tessellating space.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/IDPpp.png" />
  <row Id="34161" PostHistoryTypeId="5" PostId="15113" RevisionGUID="18adcaf8-f23d-41f3-b374-1cd9b7df8372" CreationDate="2011-07-22T13:58:43.380" UserId="5021" Comment="added 157 characters in body" Text="There's no XNA method that does a hexagon hit test.&#xD;&#xA;&#xD;&#xA;This article explains how to write a function that does the test, and gives you the function:&#xD;&#xA;&#xD;&#xA;**[How to Check if a Point is Inside a Hexagon][1]**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are some other useful related sources:&#xD;&#xA;&#xD;&#xA; - [Coordinates in Hexagon Based Tile Maps][2]&#xD;&#xA;   &#xD;&#xA; - [Is a point inside a regular hexagon?][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playchilla.com/how-to-check-if-a-point-is-inside-a-hexagon&#xD;&#xA;  [2]: http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/coordinates-in-hexagon-based-tile-maps-r1800&#xD;&#xA;  [3]: http://stackoverflow.com/questions/5193331/is-a-point-inside-regular-hexagon" />
  <row Id="34162" PostHistoryTypeId="5" PostId="15114" RevisionGUID="f5cc04f7-8430-41bd-9fd5-3a8904fa7e70" CreationDate="2011-07-22T14:06:01.097" UserId="7881" Comment="added 185 characters in body" Text="A hexagon is a rectangle with clipped corners. The way I've seen this done, and I've heard the Civilization series does it this way with orthogonal maps, is to create a bitmap with a white space (orthogonal or hexagonal), and a red, green, blue, and yellow corner. (Or whatever colors you like.)&#xD;&#xA;&#xD;&#xA;Hexagonal: ![Hex mask][1] or ![enter image description here][2]&#xD;&#xA;&#xD;&#xA;Orthogonal: ![enter image description here][3]&#xD;&#xA;&#xD;&#xA;Then, just determine which rectangle the cursor is over, and test the color of the pixel at that location. If it's white, they're hovering over that space. Each other color is mapped to an offset, and they're hovering over that hexagon instead. This way is efficient, takes little geometry, and can be used for any arbitrarily tessellating space.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/IDPpp.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/Jzy22.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/n4gb6.png" />
  <row Id="34163" PostHistoryTypeId="5" PostId="15113" RevisionGUID="f3490ab0-ce50-432c-ac15-4568e1a3dbe8" CreationDate="2011-07-22T14:06:48.007" UserId="5021" Comment="added 736 characters in body" Text="There's no XNA method that does a hexagon hit test.&#xD;&#xA;&#xD;&#xA;This article explains how to write a function that does the test, and gives you the function:&#xD;&#xA;&#xD;&#xA;**[How to Check if a Point is Inside a Hexagon][1]**&#xD;&#xA;&#xD;&#xA;From that article:&#xD;&#xA;![hexagon click box][2]&#xD;&#xA;&#xD;&#xA;And the function that does the test goes like this:&#xD;&#xA;&#xD;&#xA;    public function isInside(pos:Vec2Const):Boolean&#xD;&#xA;    {&#xD;&#xA;        const q2x:Number = Math.abs(pos.x - _center.x);         // transform the test point locally and to quadrant 2&#xD;&#xA;        const q2y:Number = Math.abs(pos.y - _center.y);         // transform the test point locally and to quadrant 2&#xD;&#xA;        if (q2x &gt; _hori || q2y &gt; _vert*2) return false;           // bounding test (since q2 is in quadrant 2 only 2 tests are needed)&#xD;&#xA;        return 2 * _vert * _hori - _vert * q2x - _hori * q2y &gt;= 0;   // finally the dot product can be reduced to this due to the hexagon symmetry&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are some other useful related sources:&#xD;&#xA;&#xD;&#xA; - [Coordinates in Hexagon Based Tile Maps][3]&#xD;&#xA;   &#xD;&#xA; - [Is a point inside a regular hexagon?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playchilla.com/how-to-check-if-a-point-is-inside-a-hexagon&#xD;&#xA;  [2]: http://i.stack.imgur.com/NtjWK.png&#xD;&#xA;  [3]: http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/coordinates-in-hexagon-based-tile-maps-r1800&#xD;&#xA;  [4]: http://stackoverflow.com/questions/5193331/is-a-point-inside-regular-hexagon" />
  <row Id="34164" PostHistoryTypeId="2" PostId="15115" RevisionGUID="c859eb76-9f44-4b47-ad9e-73c285e3017d" CreationDate="2011-07-22T14:08:49.130" UserId="8797" Text="Inkscape: http://inkscape.org/&#xD;&#xA;Seriously, how does everyone know about Sketch-Up but not Inkscape?! It's like the only good free SVG editor ffs!" />
  <row Id="34165" PostHistoryTypeId="5" PostId="15113" RevisionGUID="9d87ba5d-cdf8-4fc8-8f75-4d273ef2052a" CreationDate="2011-07-22T14:12:33.717" UserId="5021" Comment="added 736 characters in body" Text="There's no XNA method that does a hexagon hit test.&#xD;&#xA;&#xD;&#xA;This article explains how to write a function that does the test, and gives you the function:&#xD;&#xA;&#xD;&#xA;**[How to Check if a Point is Inside a Hexagon][1]**&#xD;&#xA;&#xD;&#xA;Here is a summary from that article:&#xD;&#xA;![hexagon click box][2]&#xD;&#xA;&#xD;&#xA;And the function that does the test goes like this:&#xD;&#xA;&#xD;&#xA; 1. Test the bounding box around the hexagon, early out if it does not&#xD;&#xA;    intersect it. &#xD;&#xA; 2. Transform the point into a local quadrant as shown&#xD;&#xA;    above. &#xD;&#xA; 3. Perform the following `isInside` test for the local quadrant.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;    public function isInside(pos:Vec2Const):Boolean&#xD;&#xA;    {&#xD;&#xA;        const q2x:Number = Math.abs(pos.x - _center.x);       &#xD;&#xA;        const q2y:Number = Math.abs(pos.y - _center.y);&#xD;&#xA;        if (q2x &gt; _hori || q2y &gt; _vert*2) return false;&#xD;&#xA;            return 2 * _vert * _hori - _vert * q2x - _hori * q2y &gt;= 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See the article for full details.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are some other useful related sources:&#xD;&#xA;&#xD;&#xA; - [Coordinates in Hexagon Based Tile Maps][3]&#xD;&#xA;   &#xD;&#xA; - [Is a point inside a regular hexagon?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playchilla.com/how-to-check-if-a-point-is-inside-a-hexagon&#xD;&#xA;  [2]: http://i.stack.imgur.com/NtjWK.png&#xD;&#xA;  [3]: http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/coordinates-in-hexagon-based-tile-maps-r1800&#xD;&#xA;  [4]: http://stackoverflow.com/questions/5193331/is-a-point-inside-regular-hexagon&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34166" PostHistoryTypeId="5" PostId="15113" RevisionGUID="b5f26e06-5575-49e5-9538-96848297dce0" CreationDate="2011-07-22T14:18:47.283" UserId="5021" Comment="added 10 characters in body" Text="There's no XNA method that does a hexagon hit test.&#xD;&#xA;&#xD;&#xA;This article explains how to write a function that does the test, and gives you the function:&#xD;&#xA;&#xD;&#xA;**[How to Check if a Point is Inside a Hexagon][1]**&#xD;&#xA;&#xD;&#xA;Here is a summary from that article:&#xD;&#xA;![hexagon click box][2]&#xD;&#xA;&#xD;&#xA;And the function that does the test goes like this:&#xD;&#xA;&#xD;&#xA; 1. Test the bounding box around the hexagon, early out if it does not&#xD;&#xA;    intersect it. &#xD;&#xA; 2. Transform the point into a local quadrant as shown&#xD;&#xA;    above. &#xD;&#xA; 3. Perform the following `isInside` test for the local quadrant.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;    public function isInside(pos:Vec2Const):Boolean&#xD;&#xA;    {&#xD;&#xA;        const q2x:Number = Math.abs(pos.x - _center.x);       &#xD;&#xA;        const q2y:Number = Math.abs(pos.y - _center.y);&#xD;&#xA;        if (q2x &gt; _hori || q2y &gt; _vert*2) &#xD;&#xA;            return false;&#xD;&#xA;        return 2 * _vert * _hori - _vert * q2x - _hori * q2y &gt;= 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See the article for full details.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are some other useful related sources:&#xD;&#xA;&#xD;&#xA; - [Coordinates in Hexagon Based Tile Maps][3]&#xD;&#xA;   &#xD;&#xA; - [Is a point inside a regular hexagon?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.playchilla.com/how-to-check-if-a-point-is-inside-a-hexagon&#xD;&#xA;  [2]: http://i.stack.imgur.com/NtjWK.png&#xD;&#xA;  [3]: http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/coordinates-in-hexagon-based-tile-maps-r1800&#xD;&#xA;  [4]: http://stackoverflow.com/questions/5193331/is-a-point-inside-regular-hexagon&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34167" PostHistoryTypeId="2" PostId="15116" RevisionGUID="e671b073-ef3b-4c2a-ae49-e7fdd9bd6105" CreationDate="2011-07-22T14:26:51.837" UserId="5021" Text="You create qvm files using the c-compiler in the Quake SDK.&#xD;&#xA;&#xD;&#xA;**You can't edit QVM files.**&#xD;&#xA;&#xD;&#xA;(You could technically modify them using a hex editor, in the same way that you can modify other compiled programs, but this is not useful for your purposes.)" />
  <row Id="34168" PostHistoryTypeId="5" PostId="15107" RevisionGUID="b8d58b80-29d8-4f07-bd49-0cc2bddc5095" CreationDate="2011-07-22T14:42:12.257" UserId="1430" Comment="added 4 characters in body; edited title" Text="I was browsing through how to mod a game (Urban Terror, a Quake 3 mod). I found that it can be done by editing .qvm files in the game. Under the file named zpak000.pk3. That file contains other files named&#xD;&#xA;&#xD;&#xA;    ui.qvm&#xD;&#xA;    qagame.qvm&#xD;&#xA;    cgame.qvm&#xD;&#xA;&#xD;&#xA;But I can't find a way in which I can edit these files. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34169" PostHistoryTypeId="4" PostId="15107" RevisionGUID="b8d58b80-29d8-4f07-bd49-0cc2bddc5095" CreationDate="2011-07-22T14:42:12.257" UserId="1430" Comment="added 4 characters in body; edited title" Text="How can I edit .qvm (Quake Virtual Machine) files?" />
  <row Id="34170" PostHistoryTypeId="2" PostId="15117" RevisionGUID="b583507f-d1ea-4ad0-b601-4bd3d22a3201" CreationDate="2011-07-22T14:52:28.670" UserId="7881" Text="**Don't.**&#xD;&#xA;&#xD;&#xA;**Filters don't work.** At least, *only* filters don't work. Whitelists, blacklists, it doesn't matter. Neither of these will ever prevent kids from harassing each other. The only way to make this work would be to not filter the chat, but to provide large building-blocks for sentences. For example, a kid might select &quot;Do you want to...&quot; and the options for &quot;go to...&quot; and &quot;trade...&quot; would be pulled up. Selecting &quot;go to...&quot; would bring up a list of places in the game.&#xD;&#xA;&#xD;&#xA;Disney settled on this method for their MMO &quot;Toontown&quot;, after their 14-year old whitelist test subject decided to [&quot;stick [his] long-necked Giraffe up [their] fluffy white bunny.&quot;][1] Simply put, you *cannot* blacklist or whitelist enough words to prevent abuse.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;That all being said, if I were designing a kid's MMO, I would actually implement a stringent blacklist filter, but only as a second line of defense. Your first line of defense should always be moderators and the ability to report abuse. I would weight blacklisted words, with each user getting a secret score of how profane they are trying to be.&#xD;&#xA;&#xD;&#xA;Chances are, any user who will try and circumvent your filter will trigger it first. The more obvious profanities, (as opposed to obscure or outdated ones,) or more repeated profanity attempts, put them on a watch list for moderators, or some sort of [ban list][2]. This way, moderators can focus on users who seem to be trying to harass others instead of wasting their time reading the comments of still-innocent kids.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://habitatchronicles.com/2007/03/the-untold-history-of-toontowns-speedchat-or-blockchattm-from-disney-finally-arrives/&#xD;&#xA;  [2]: http://www.codinghorror.com/blog/2011/06/suspension-ban-or-hellban.html" />
  <row Id="34171" PostHistoryTypeId="2" PostId="15118" RevisionGUID="bd8465e7-9c2c-4219-8b8f-8083fa2e2847" CreationDate="2011-07-22T15:15:49.357" UserId="7191" Text="I guess [inkscape][1] is the answer! I downloaded it last night, it does seem like a really nice program. I don't know a lot about it, but I'm fairly sure it does all the things you want it to. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://inkscape.org/" />
  <row Id="34172" PostHistoryTypeId="2" PostId="15119" RevisionGUID="ae4e3cb7-9161-4303-a312-4b0b463f6ecb" CreationDate="2011-07-22T15:18:24.777" UserId="7297" Text="Simple solution to the problem:&#xD;&#xA;&#xD;&#xA;0. Remove all spaces and punctuation from your input.&#xD;&#xA;1. Blacklist everything in the [Urban Dictionary][1].&#xD;&#xA;2. Blacklist all homophones etc&#xD;&#xA;3. Blacklist everything that could be use as a euphamism.&#xD;&#xA;4. Write your software to understand the content, intention and tone of what is left.&#xD;&#xA;5. Throw away game and go to market with sentient and omniscient creation from step 5.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.urbandictionary.com" />
  <row Id="34173" PostHistoryTypeId="25" PostId="15110" RevisionGUID="81df598a-bc87-4c9d-8b5f-e1ac112845ed" CreationDate="2011-07-22T15:32:14.567" Comment="http://twitter.com/#!/StackGameDev/status/94429554193612800" />
  <row Id="34174" PostHistoryTypeId="2" PostId="15120" RevisionGUID="093f4fd7-b343-4a35-89dc-e43ad813fe51" CreationDate="2011-07-22T16:06:33.377" UserId="2771" Text="&gt; I move the platform by calling SetPosition on the body&#xD;&#xA;&#xD;&#xA;I think this is the problem. Box2D is not designed to be used this way. Is there any way you can simulate sine function movement by applying impulses/forces?" />
  <row Id="34175" PostHistoryTypeId="5" PostId="15100" RevisionGUID="7ee0d0c3-5f2c-4a53-b502-413b6e6bb399" CreationDate="2011-07-22T16:07:12.643" UserId="4360" Comment="Added link" Text="I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine. &#xD;&#xA;&#xD;&#xA;My problem is when the player lands on the platform, as the platform moves along the X axis - the player is not moved along with it, as you visually would expect. &#xD;&#xA;&#xD;&#xA;The player can land on the object, and if it hits the side of the object, it does colide with it and is pushed.  &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;This image might explain better than I did:  &#xD;&#xA;After jumping on to the red platform the player character will fall off as the platform moves to the right  &#xD;&#xA;     &#xD;&#xA;![example](http://farm7.static.flickr.com/6136/5962208409_8d492aa3a6.jpg)&#xD;&#xA;&#xD;&#xA;**UPDATE:  &#xD;&#xA;Here is a live demo showing the problem:  &#xD;&#xA;http://onedayitwillmake.com/ChuClone/slideexample.php**" />
  <row Id="34176" PostHistoryTypeId="2" PostId="15121" RevisionGUID="af0d8a82-8917-475b-b26b-669b8388c28b" CreationDate="2011-07-22T16:18:14.840" UserId="8399" Text="You can create separate render target views for every slice and then set it using ID3D11DeviceContext::OMSetRenderTargets.&#xD;&#xA;&#xD;&#xA;[Subresources][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476901%28v=vs.85%29.aspx" />
  <row Id="34177" PostHistoryTypeId="2" PostId="15122" RevisionGUID="1e410db2-b452-4d33-9c7c-9f3cce3be175" CreationDate="2011-07-22T16:23:08.470" UserId="4360" Text="Solved! &#xD;&#xA;&#xD;&#xA;For future people:&#xD;&#xA;The solution was to use *`b2_Kinematic`* bodies. Do not move it by calling *`SetPosition`* on the platform.  &#xD;&#xA;&#xD;&#xA;Call *`SetLinearVelocity`*, and then any body's &quot;on top&quot; will interact as you would expect.&#xD;&#xA;&#xD;&#xA;Giving the answer credit to Den since he provided information that led me in the right direction." />
  <row Id="34178" PostHistoryTypeId="5" PostId="15121" RevisionGUID="5fc0c87b-73ba-4ae0-b8ee-44bc17a1b636" CreationDate="2011-07-22T16:27:48.780" UserId="8399" Comment="added 163 characters in body" Text="You can create separate render target views for every slice and then set it using ID3D11DeviceContext::OMSetRenderTargets.&#xD;&#xA;&#xD;&#xA;    D3D11_RENDER_TARGET_VIEW_DESC desc;&#xD;&#xA;    desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;&#xD;&#xA;    desc.Texture2D.MipSlice = D3D11CalcSubresource(0, arraySlice, mipLevels);&#xD;&#xA;&#xD;&#xA;Information about subresources http://msdn.microsoft.com/en-us/library/ff476901%28v=vs.85%29.aspx" />
  <row Id="34179" PostHistoryTypeId="4" PostId="15110" RevisionGUID="b0efae88-5a5b-4aef-bb0b-57485841f3c9" CreationDate="2011-07-22T17:20:23.217" UserId="5021" Comment="fixed typo" Text="Recognizing a hexagonal clickbox" />
  <row Id="34180" PostHistoryTypeId="24" PostId="15110" RevisionGUID="b0efae88-5a5b-4aef-bb0b-57485841f3c9" CreationDate="2011-07-22T17:20:23.217" Comment="Proposed by 5021 approved by 3830 edit id of 575" />
  <row Id="34181" PostHistoryTypeId="2" PostId="15123" RevisionGUID="bf9ca7fe-6368-4e29-9cd0-b8d20efd6b10" CreationDate="2011-07-22T17:30:54.777" UserId="7862" Text="There's an [answer](http://programmers.stackexchange.com/questions/91177/profanity-filter-performance-in-java/91179#91179) from Programmers describing one system for building a profanity filter. He doesn't explain how he actually built it in great detail, but it should be enough to get an idea for implementation." />
  <row Id="34182" PostHistoryTypeId="2" PostId="15124" RevisionGUID="554a1a83-6291-40e8-a2e4-c0dbf64f9189" CreationDate="2011-07-22T18:31:54.433" UserId="3830" Text="This is a problem best solved by humans and social design rather than code.&#xD;&#xA;&#xD;&#xA;Your best source for an exhaustive list is a live human who is present in the game and monitoring the chat stream.  Put people in your game and let them be your ultimate filter.&#xD;&#xA;&#xD;&#xA;Spend some time looking into Lane Merrifield's ideas and philosophies behind Club Penguin and about providing service.  Here are two writeups from his presentation at the Austin GDC in 2008.  I saw it and remember being very impressed with his style of solving human problems with humans and not code.&#xD;&#xA;&#xD;&#xA;http://gamasutra.com/php-bin/news_index.php?story=20234&#xD;&#xA;&#xD;&#xA;http://www.raphkoster.com/2008/09/15/agdc08-lane-merrifield-at-their-service/&#xD;&#xA;&#xD;&#xA;Specifically because your game is aimed at kids, it's more than just swear filters you'll need to think about.  You'll need to worry about people posing as kids who may or may not have bad motives.  You'll need to assure parents that their kids are safe.  You'll need to assure kids that they are safe too for that matter." />
  <row Id="34183" PostHistoryTypeId="25" PostId="15109" RevisionGUID="e911b8aa-c093-4305-bad8-85cc65ef4177" CreationDate="2011-07-22T18:32:14.787" Comment="http://twitter.com/#!/StackGameDev/status/94474852173492225" />
  <row Id="34184" PostHistoryTypeId="5" PostId="15124" RevisionGUID="884fabe6-a7ac-44a8-8337-27883411fcfb" CreationDate="2011-07-22T19:00:38.447" UserId="3830" Comment="added 145 characters in body" Text="This is a problem best solved by humans and social design rather than code.&#xD;&#xA;&#xD;&#xA;Your best source for an exhaustive list is a live human who is present in the game and monitoring the chat stream.  Put people in your game and let them be your ultimate filter.&#xD;&#xA;&#xD;&#xA;Spend some time looking into Lane Merrifield's ideas and philosophies behind Club Penguin and about providing service.  Here are two writeups from his presentation at the Austin GDC in 2008.  I saw it and remember being very impressed with his style of solving human problems with humans and not code.&#xD;&#xA;&#xD;&#xA;http://gamasutra.com/php-bin/news_index.php?story=20234&#xD;&#xA;&#xD;&#xA;http://www.raphkoster.com/2008/09/15/agdc08-lane-merrifield-at-their-service/&#xD;&#xA;&#xD;&#xA;Specifically because your game is aimed at kids, it's more than just swear filters you'll need to think about.  You'll need to worry about people posing as kids who may or may not have bad motives.  You'll need to assure parents that their kids are safe.  You'll need to assure kids that they are safe too for that matter.&#xD;&#xA;&#xD;&#xA;Another plus for humans is that they will understand context.  You don't want some kid saying, &quot;My Mom has breast cancer&quot; and getting kicked." />
  <row Id="34185" PostHistoryTypeId="6" PostId="15097" RevisionGUID="d986b177-9fb2-4833-824f-9a1c880cc3fb" CreationDate="2011-07-22T19:01:49.117" UserId="8399" Comment="Tag directx was added" Text="&lt;directx&gt;&lt;textures&gt;&lt;directx11&gt;" />
  <row Id="34186" PostHistoryTypeId="24" PostId="15097" RevisionGUID="d986b177-9fb2-4833-824f-9a1c880cc3fb" CreationDate="2011-07-22T19:01:49.117" Comment="Proposed by 8399 approved by 51 edit id of 576" />
  <row Id="34187" PostHistoryTypeId="2" PostId="15125" RevisionGUID="83977c62-8051-455a-997d-b1ed6512fac1" CreationDate="2011-07-22T19:26:26.070" UserId="2239" Text="Some MMOs for children simply replace chat with a predefined list of emotes and phrases and simply doesn't allow free-form chat. Perhaps the game could be designed to accommodate that." />
  <row Id="34188" PostHistoryTypeId="2" PostId="15126" RevisionGUID="679e2623-b6b5-4159-8fdf-07784164f8a5" CreationDate="2011-07-22T20:29:18.167" UserId="7197" Text="I've been trying to implement a spatial partitioning algorithm in my game, but both spatial hashes and quadtrees aren't what I'm looking for.&#xD;&#xA;&#xD;&#xA;My level size is not supposed to have a limit (only Int32 limits). I need a spatial partitioning algorithm that doesn't need a &quot;Level Width&quot; and a &quot;Level Height&quot;.&#xD;&#xA;&#xD;&#xA;I have many moving physical objects. I need the algorithm to be fast enough to support 500+ objects.&#xD;&#xA;&#xD;&#xA;Any alternative?" />
  <row Id="34189" PostHistoryTypeId="1" PostId="15126" RevisionGUID="679e2623-b6b5-4159-8fdf-07784164f8a5" CreationDate="2011-07-22T20:29:18.167" UserId="7197" Text="2D Spatial partitioning alternatives to spatial hashes and quadtrees" />
  <row Id="34190" PostHistoryTypeId="3" PostId="15126" RevisionGUID="679e2623-b6b5-4159-8fdf-07784164f8a5" CreationDate="2011-07-22T20:29:18.167" UserId="7197" Text="&lt;c#&gt;&lt;collision-detection&gt;&lt;physics&gt;&lt;tree&gt;" />
  <row Id="34191" PostHistoryTypeId="2" PostId="15127" RevisionGUID="464e38b9-4f81-467f-992a-7c2af13f72e0" CreationDate="2011-07-22T20:39:01.497" UserId="8799" Text="I've been working with the [Farseer Physics Engine][1] to try and build a simple 2D, sidescrolling game. Creating basic rectangle blocks worked easily enough, but I discovered when I tried to create some very simple triangle slopes that my existing 'character' avatar would not collide with them. This baffled me for a while until I began using the debug view to discover that while the body of the triangle appeared where I had placed them, the fixture which determined collisions was offset, as shown below (The debugging view is itself offset from the actual sprites because I'm clearly not smart enough to figure out the proper projection matrix):![Triangle offset][2].&#xD;&#xA;&#xD;&#xA;It turns out that whatever coordinates I give for the center of the triangle, the fixture appears at (2x, 2y). For example, in the attached image, there is a triangle sloping up to the left at (-4, -1) in the game's coordinate system. The fixture (light green triangle bordered in magenta) is at (-8, -2). &#xD;&#xA;&#xD;&#xA;I know this has to be a simple mistake I'm making, but damned if I can figure it out. Here's how I create a new slope in the level:&#xD;&#xA;&#xD;&#xA;    public override void AddToWorld(FarseerPhysics.Dynamics.World world, Vector2 position)&#xD;&#xA;            {&#xD;&#xA;                body = BodyFactory.CreateBody(world, position);&#xD;&#xA;                body.BodyType = FarseerPhysics.Dynamics.BodyType.Static;&#xD;&#xA;                &#xD;&#xA;                Vertices vertices = new Vertices();&#xD;&#xA;                if (type == SlopeType.LEFT)&#xD;&#xA;                {&#xD;&#xA;                    vertices.Add(new Vector2(position.X - 0.5f, position.Y - 0.5f));&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    vertices.Add(new Vector2(position.X + 0.5f, position.Y - 0.5f));&#xD;&#xA;                }&#xD;&#xA;                vertices.Add(new Vector2(Position.X + 0.5f, position.Y + 0.5f));&#xD;&#xA;                vertices.Add(new Vector2(position.X - 0.5f, position.Y + 0.5f));&#xD;&#xA;    &#xD;&#xA;                FixtureFactory.AttachPolygon(vertices, 1f, body, this);&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;The position parameter is given to be the center, thus the 0.5 offsets to create the triangle's edges.&#xD;&#xA;&#xD;&#xA;Any insight would be greatly appreciated; this engine seems powerful but the documentation is definitely lacking.&#xD;&#xA;  [1]: http://farseerphysics.codeplex.com/&#xD;&#xA;  [2]: http://i.stack.imgur.com/EnnDq.png" />
  <row Id="34192" PostHistoryTypeId="1" PostId="15127" RevisionGUID="464e38b9-4f81-467f-992a-7c2af13f72e0" CreationDate="2011-07-22T20:39:01.497" UserId="8799" Text="Issues with Polygon Fixtures in Farseer" />
  <row Id="34193" PostHistoryTypeId="3" PostId="15127" RevisionGUID="464e38b9-4f81-467f-992a-7c2af13f72e0" CreationDate="2011-07-22T20:39:01.497" UserId="8799" Text="&lt;box2d&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="34194" PostHistoryTypeId="2" PostId="15128" RevisionGUID="98cead1b-c441-4565-9c33-ab70e14d5c3c" CreationDate="2011-07-22T20:55:21.420" UserId="744" Text="You are creating a body and attaching a fixture at body-local position e.g. (10, 10).&#xD;&#xA;&#xD;&#xA;But the body was created at world position (10, 10). That means the fixture is now at (10, 10) + (10, 10) = (20, 20).&#xD;&#xA;&#xD;&#xA;Fixtures are always specified in body-local space; they should be roughly around the (0, 0) area regardless of where you intend to move the body." />
  <row Id="34195" PostHistoryTypeId="25" PostId="15126" RevisionGUID="1ba61b90-9e21-40f0-bb43-3df6d474d398" CreationDate="2011-07-22T21:32:14.507" Comment="http://twitter.com/#!/StackGameDev/status/94520149671034880" />
  <row Id="34196" PostHistoryTypeId="2" PostId="15129" RevisionGUID="508f7d3d-c3a5-466f-989d-27250cf27983" CreationDate="2011-07-22T21:56:33.097" UserId="6332" Text="Maybe the [r-tree algorithm][1] is what you are looking for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/R-tree&#xD;&#xA;&#xD;&#xA;I works really well for static geometry, but you can also use it for moving objects by removing and adding objects at their new positions." />
  <row Id="34197" PostHistoryTypeId="2" PostId="15130" RevisionGUID="492a2ff5-4393-4c94-bb59-82e698e8ccbe" CreationDate="2011-07-22T22:02:28.943" UserId="7881" Text="This is very close to a [similar question][1] asked here on Gamedev, but seeing as you're concerned with performance and not file storage, perhaps [my answer][2] there will be of more use to you. I'll include the bulk of it here for completeness, but the original answer provides a little more depth if you want to look into it.&#xD;&#xA;&#xD;&#xA;&gt; I ran into a similar problem and decided to create my own structure to&#xD;&#xA;&gt; handle the data. It's based loosely on a quadtree, but has infinite&#xD;&#xA;&gt; (at least as big as an Int) expandability in all directions. It was&#xD;&#xA;&gt; designed to handle grid-based data which expanded from a central&#xD;&#xA;&gt; point, much like Minecraft does now. It is space efficient in memory,&#xD;&#xA;&gt; and very fast.&#xD;&#xA;&gt;&#xD;&#xA;&gt; My code can be found [here][3]. The code is complete, tested (unit-&#xD;&#xA;&gt; and load-tests), and quite optimized. The inner workings aren't too&#xD;&#xA;&gt; well documented yet, however, but all the public methods are so it&#xD;&#xA;&gt; should be usable. If anyone decides to try it out, feel free to&#xD;&#xA;&gt; contact me with questions or comments.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/13349/7881&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/13349/a-way-to-store-potentially-infinite-2d-map-data/13388#13388&#xD;&#xA;  [3]: http://j.mp/mtRWVq" />
  <row Id="34198" PostHistoryTypeId="2" PostId="15131" RevisionGUID="d6ad93fe-6e84-47e7-afb8-b92732ab8423" CreationDate="2011-07-22T22:16:39.710" UserId="5899" Text="The web [alternativeto][1] is a good place to find alternatives similar to a program.&#xD;&#xA;&#xD;&#xA;These are the free alternatives to inkscape, that seems to be the free vector graphics editor reference:&#xD;&#xA;&#xD;&#xA;- [OpenOffice - Draw][2]&#xD;&#xA;- [Xara Xtreme][3]&#xD;&#xA;- [gpaint][4]&#xD;&#xA;- [Skencil][5]&#xD;&#xA;- [Ella][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://alternativeto.net/&#xD;&#xA;  [2]: http://www.openoffice.org/product/draw.html&#xD;&#xA;  [3]: http://xaraxtreme.org/&#xD;&#xA;  [4]: http://www.gnu.org/software/gpaint/&#xD;&#xA;  [5]: http://www.skencil.org/&#xD;&#xA;  [6]: http://ella.tuxfamily.org/" />
  <row Id="34199" PostHistoryTypeId="2" PostId="15132" RevisionGUID="14aa1615-4983-415c-91ad-fd89212bda9c" CreationDate="2011-07-22T22:48:35.303" UserId="8802" Text="In response to people saying to **not** provide the filter, I would argue that you **have to** provide a filter, for no other reason than to cover your own butt with respect to the parents of your intended audience. Just make sure it can be disabled by the user. By implementing a profanity filter (albeit an imperfect and totally optional one), you can say that you've done everything expected of you to protect the sensibilities of your younger audience. &#xD;&#xA;&#xD;&#xA;By making it possible to disable, you discourage users from trying to circumvent it using clever punctuation or substitution, since people who favor that sort of language will immediately disable the filter on their own computers, and will have long since forgotten that a filter even exists.&#xD;&#xA;&#xD;&#xA;With that understanding, don't worry so much about the implementation. It doesn't need to be foolproof (which is good, because it *can't* be foolproof), but it should be relatively complete and as un-intrusive as possible. That is, you wan't to make sure you don't make the &quot;[clbuttic](http://www.google.com/search?q=clbuttic) mistake&quot;.&#xD;&#xA;&#xD;&#xA;The implementation can be extremely simple -- get a word list, and replace any words found in the list with asterisks or something similar. Best to search for whole words only, as well.&#xD;&#xA;&#xD;&#xA;As for a word list, that's easy: &lt;http://www.google.com/search?q=profanity+word+list&gt;&#xD;&#xA;&#xD;&#xA;Remember, it doesn't have to be all-inclusive, it just has to be representative of a valiant effort on your part to protect the children.&#xD;&#xA;" />
  <row Id="34200" PostHistoryTypeId="2" PostId="15133" RevisionGUID="c6c52099-7bea-4d31-b11c-4be3196c25c8" CreationDate="2011-07-22T22:55:57.157" UserId="6126" Text="Thanks for all of the help guys, but after some looking around, I found a really good updater. It's called [Puchisoft Dispatcher][1]. They have a freeware version, and it is really good for non-commercial projects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://puchisoft.com/dispatcher.php" />
  <row Id="34201" PostHistoryTypeId="2" PostId="15134" RevisionGUID="fbf7a2b6-5dee-4165-9e3e-7296c69e8d3f" CreationDate="2011-07-22T23:23:45.847" UserId="7640" Text="Hey so i just learned about the i/o part of the STL, more specifically fstream. Although I can now save binary info and classes i've made to the hard drive, i am not sure how to define how the info should be read. &#xD;&#xA;&#xD;&#xA;I saw the answer for making a file format from [this][1] post:&#xD;&#xA;&#xD;&#xA;&gt; Typically you would define a lot of records/structures, such as&#xD;&#xA;&gt; BITMAPINFOHEADER, and specify in what order they should come, how they&#xD;&#xA;&gt; should be nestled, and you might need to write a lot of indicies and&#xD;&#xA;&gt; look-up tables. Such files consists of a number of records (maybe&#xD;&#xA;&gt; nestled), look-up tables, magic words (indicating structure begin,&#xD;&#xA;&gt; structures end, etc.) and strings in a custom-defined format.&#xD;&#xA;&#xD;&#xA;What i want to know specifcally is how to do this with **the STL and C++...**&#xD;&#xA;Since the format is meant simply for the use of a game i would think it would be much easier though. The format should:&#xD;&#xA;&#xD;&#xA; - Be traversable (i can look through it and find the start of structure and maybe check it's name&#xD;&#xA; - Be able to hold multiple classes and data in a single file&#xD;&#xA; - have identifiable starts and ends to sections: such as the space in text files&#xD;&#xA; - Maybe have it's own icon to represent it??&#xD;&#xA;&#xD;&#xA;**How do i do this in c++ ?**&#xD;&#xA;" />
  <row Id="34202" PostHistoryTypeId="1" PostId="15134" RevisionGUID="fbf7a2b6-5dee-4165-9e3e-7296c69e8d3f" CreationDate="2011-07-22T23:23:45.847" UserId="7640" Text="How to create a game save file format in c++ using STL" />
  <row Id="34203" PostHistoryTypeId="3" PostId="15134" RevisionGUID="fbf7a2b6-5dee-4165-9e3e-7296c69e8d3f" CreationDate="2011-07-22T23:23:45.847" UserId="7640" Text="&lt;c++&gt;&lt;file-format&gt;&lt;data-structure&gt;&lt;file&gt;" />
  <row Id="34204" PostHistoryTypeId="2" PostId="15135" RevisionGUID="adb3d538-c8f8-490e-84ef-b37f0ffa6866" CreationDate="2011-07-23T00:02:36.720" UserId="7328" Text="try using [boost serialize](http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/index.html)! other than that what you are asking for is how to implement serialization and that's a real complicated thing! I've recently implemented an implementation for serialization and it's no easy case to talk about. &#xD;&#xA;&#xD;&#xA;there is also another way to only save one class into file which contains all the information you need, which makes saving/loading classes much more simpler.&#xD;&#xA;&#xD;&#xA;by the way icon is not anything related to file format it's something OS generates per file, and usually icons are stored somewhere between OS files. except for windows executable files(as far as I know). windows executable files are like a zipped folder, containing the actual binary operations, icon data for some various resolutions, and maybe some other data related to OS itself." />
  <row Id="34205" PostHistoryTypeId="25" PostId="15127" RevisionGUID="140a1d78-c656-44f8-bd71-551a6f3945ac" CreationDate="2011-07-23T00:32:14.523" Comment="http://twitter.com/#!/StackGameDev/status/94565448598814720" />
  <row Id="34206" PostHistoryTypeId="2" PostId="15136" RevisionGUID="407a9b23-24a2-447f-96a8-151791f0ac5b" CreationDate="2011-07-23T01:59:40.423" UserId="8275" Text="This is a follow-up question to [this other one][1].&#xD;&#xA;&#xD;&#xA;I would like to know **if there is a common/typical/best pattern to scale my representation of the world** (currently 160Kmx160Km) **to fit it to the drawing area** (currently 800x600 pixels).&#xD;&#xA;&#xD;&#xA;I can think of at least four different approaches:&#xD;&#xA;&#xD;&#xA;**Naïve one** (the way I did it so far). I implemented a global function `sc(vector)` that will simply return a scaled down copy of the vector passed in. This of course works, but obliges me to write code like:&#xD;&#xA;&#xD;&#xA;    drawCircle(sc(radius), sc(position))&#xD;&#xA;&#xD;&#xA;**Wrapping functions**. I could define several functions, each of them wrapping the original middleware one. For example I could define `myDrawCircle` that would first scale the arguments that need scaling, and then call `drawCircle` with the latter. This would make my code perhaps more readable and easier to maintain, but I should write a lot of wrapping functions, which sound silly.&#xD;&#xA;&#xD;&#xA;**Function decorator**. I could simply decorate the existing middleware functions, providing automatic scaling for all the parameters that are an instantiation of the class `Vector3D`, but the problem is that those functions also work with the same parameters being `list` or `Vector2D` too, and the decorator would have no way to know which lists need to be scaled (the radius for example) and which not (the RGB values).&#xD;&#xA;&#xD;&#xA;**Surface initialisation**. When defining the surface I am going to draw on, I could define the scaling factor (so that I would then use metres and not pixels as parameters). This would work transparently for me and would be my solution of choice, but of course it should be implemented in the middleware, so it's not an real option.&#xD;&#xA;&#xD;&#xA;...anyhow: since this is a very common problem, I wonder if there is an established pattern that elegantly solves this problem that I failed to find.&#xD;&#xA;&#xD;&#xA;PS: For this project I am using python (with [pygame][2]), but - although a python/pygame-specific answer is very appreciated, I'm more interested in the general/high-level description of the pattern rather than its concrete implementation.&#xD;&#xA;&#xD;&#xA;Thank you in advance for your time and expertise.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/14827/8275&#xD;&#xA;  [2]: http://www.pygame.org/" />
  <row Id="34207" PostHistoryTypeId="1" PostId="15136" RevisionGUID="407a9b23-24a2-447f-96a8-151791f0ac5b" CreationDate="2011-07-23T01:59:40.423" UserId="8275" Text="Common pattern to scale &quot;real units&quot; to pixels?" />
  <row Id="34208" PostHistoryTypeId="3" PostId="15136" RevisionGUID="407a9b23-24a2-447f-96a8-151791f0ac5b" CreationDate="2011-07-23T01:59:40.423" UserId="8275" Text="&lt;maps&gt;&lt;design-patterns&gt;&lt;language-agnostic&gt;&lt;pygame&gt;&lt;resolution&gt;" />
  <row Id="34209" PostHistoryTypeId="25" PostId="15136" RevisionGUID="c0556f87-d1a7-4402-b1a8-e79f5633ed63" CreationDate="2011-07-23T03:32:14.577" Comment="http://twitter.com/#!/StackGameDev/status/94610747446931458" />
  <row Id="34210" PostHistoryTypeId="2" PostId="15137" RevisionGUID="06c29535-08e8-425d-945c-e9e19db4b57a" CreationDate="2011-07-23T05:45:03.447" UserId="8214" Text="I made a really basic 2D RPG. I want to know whether I can turn it into a free to play MMO. &#xD;&#xA;&#xD;&#xA;I cannot afford to rent a server with enough capacity to serve a big number of players but I'm wondering whether I could get a hosting plan that starts cheap but scales enough to eventually handle a big numer of users so I have minimum fixed costs and I can cover expenses on the go with ads or whatever.&#xD;&#xA;&#xD;&#xA;Is there such a thing? Thanks" />
  <row Id="34211" PostHistoryTypeId="1" PostId="15137" RevisionGUID="06c29535-08e8-425d-945c-e9e19db4b57a" CreationDate="2011-07-23T05:45:03.447" UserId="8214" Text="is it possible to make a MMO starting with scalable hosting?" />
  <row Id="34212" PostHistoryTypeId="3" PostId="15137" RevisionGUID="06c29535-08e8-425d-945c-e9e19db4b57a" CreationDate="2011-07-23T05:45:03.447" UserId="8214" Text="&lt;mmo&gt;&lt;server&gt;&lt;hosting&gt;" />
  <row Id="34213" PostHistoryTypeId="25" PostId="15099" RevisionGUID="d027755a-98f4-4241-950b-ce9fb1a192d5" CreationDate="2011-07-23T06:32:14.937" Comment="http://twitter.com/#!/StackGameDev/status/94656046743814144" />
  <row Id="34214" PostHistoryTypeId="25" PostId="15100" RevisionGUID="85242595-16f2-4c16-bcb2-949807a99ade" CreationDate="2011-07-23T09:32:14.733" Comment="http://twitter.com/#!/StackGameDev/status/94701345415766016" />
  <row Id="34216" PostHistoryTypeId="2" PostId="15139" RevisionGUID="2738b247-7a62-415b-a722-4f503bbed11c" CreationDate="2011-07-23T10:23:03.487" UserId="1588" Text="**Ingame tutorials disguised as levels**.&#xD;&#xA;&#xD;&#xA;Introduce gameplay mechanics / concepts one at a time, each new level introducing another mechanic and building on knowledge that the player has learnt in the previous level." />
  <row Id="34217" PostHistoryTypeId="2" PostId="15140" RevisionGUID="9498e5d0-bf9e-4c34-a647-ab0da5d5981d" CreationDate="2011-07-23T10:26:58.370" UserId="5824" Text="The standard way of doing that is to set up a transform matrix to do the conversion during rendering. For 3D rendering it's the view transform matrix for the camera that does it.&#xD;&#xA;&#xD;&#xA;Most 2D APIs have a way of specifying a view transform too, as either a 2x3 matrix or as a separate scale, translation and rotation.&#xD;&#xA;&#xD;&#xA;A quick look at the pygame documentation suggests you'll have to implement a view transform matrix yourself. Does it let you derive your own class from it's surface class to enable you to add that functionality?" />
  <row Id="34218" PostHistoryTypeId="2" PostId="15141" RevisionGUID="ded1e40e-c348-4489-892d-a87ba65e3720" CreationDate="2011-07-23T11:45:09.437" UserId="3794" Text="I think you should consider google's app engine. It uses google infrastructure, is fast and was proven to be fast enough for handling real-time game. It is simply scalable and you can use it for free at the begining, when the trafic starts to be bigger, you start to pay." />
  <row Id="34219" PostHistoryTypeId="25" PostId="15134" RevisionGUID="02f75f16-6023-4c9e-8e1b-d5f0fa817900" CreationDate="2011-07-23T12:32:15.643" Comment="http://twitter.com/#!/StackGameDev/status/94746644343570432" />
  <row Id="34220" PostHistoryTypeId="2" PostId="15142" RevisionGUID="79275196-9ecb-46d1-83f5-d32c05b0218c" CreationDate="2011-07-23T12:53:00.777" UserId="8807" Text="I am reading an iphone game dev book and I have a question about velocity.&#xD;&#xA;&#xD;&#xA;mainly it is this line&#xD;&#xA;&#xD;&#xA;    playerVelocity = ccp(playerVelocity.x * dec + acceleration.x * sens, 0);&#xD;&#xA;&#xD;&#xA;Why do you mutiple the playerVelocity.x by the deceleration. the book says it works by reducing the current velocity so it is easier to change direction and then add the ( acceleration.x * sens. )&#xD;&#xA;&#xD;&#xA;this piece of code is using the accelerometer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        float dec = 0.4f; //lower = quicker to change direction;&#xD;&#xA;        float sens = 6.0f; //higher more sensitive;&#xD;&#xA;        float maxVel = 100;&#xD;&#xA;        &#xD;&#xA;        playerVelocity = ccp(playerVelocity.x * dec + acceleration.x * sens, 0);" />
  <row Id="34221" PostHistoryTypeId="1" PostId="15142" RevisionGUID="79275196-9ecb-46d1-83f5-d32c05b0218c" CreationDate="2011-07-23T12:53:00.777" UserId="8807" Text="velocity question from book iPhone" />
  <row Id="34222" PostHistoryTypeId="3" PostId="15142" RevisionGUID="79275196-9ecb-46d1-83f5-d32c05b0218c" CreationDate="2011-07-23T12:53:00.777" UserId="8807" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="34223" PostHistoryTypeId="2" PostId="15143" RevisionGUID="6b430411-101d-4870-ba5d-1dc8c19f490f" CreationDate="2011-07-23T13:06:37.260" UserId="7328" Text="by acceleration I think you are referring to the value IPhone accecelometer returns.&#xD;&#xA;&#xD;&#xA;dec value may be used for two reasons :&#xD;&#xA;&#xD;&#xA;1. to simulate friction.&#xD;&#xA;2. to make velocity changes more smooth.&#xD;&#xA;&#xD;&#xA;dec value also creates some upper and lower bounds for player velocity. note that if `-1 &lt; acceleration.x &lt; 1` we can assume velocity should be somewhere between -10 and 10.&#xD;&#xA;&#xD;&#xA;for more information I need to know the code other than that lines." />
  <row Id="34227" PostHistoryTypeId="25" PostId="15048" RevisionGUID="a01c204f-bdcc-4396-8b25-38241513be9b" CreationDate="2011-07-23T15:32:16.597" Comment="http://twitter.com/#!/StackGameDev/status/94791948040273920" />
  <row Id="34228" PostHistoryTypeId="17" PostId="15145" RevisionGUID="1ae18843-95ac-45dc-8ff7-d10c481fa3ae" CreationDate="2011-07-23T16:14:22.863" UserId="-1" Comment="from http://stackoverflow.com/questions/6798936/pygame-how-to-use-collision" Text="" />
  <row Id="34229" PostHistoryTypeId="17" PostId="15146" RevisionGUID="ce0b6f8d-4555-413d-b6f1-f7fae6079dd9" CreationDate="2011-07-23T16:14:22.863" UserId="-1" Comment="from http://stackoverflow.com/questions/6798936/pygame-how-to-use-collision" Text="" />
  <row Id="34230" PostHistoryTypeId="2" PostId="15146" RevisionGUID="6d5a988a-bb33-4d05-ac35-d84865eb9634" CreationDate="2011-07-23T07:24:04.123" UserDisplayName="agf" Text="Take a look at:&#xD;&#xA;&#xD;&#xA;http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.collide_rect&#xD;&#xA;&#xD;&#xA;And the several methods following it. You can test against a rectangle, circle, mask, sprite, or group of sprites.&#xD;&#xA;&#xD;&#xA;You probably want &#xD;&#xA;&#xD;&#xA;    pygame.sprite.collide_mask(SpriteLeft, SpriteRight): return bool&#xD;&#xA;&#xD;&#xA;Which checks if two sprites collide based on their bitmasks." />
  <row Id="34231" PostHistoryTypeId="2" PostId="15145" RevisionGUID="7abfde97-6431-4acd-b668-c57fd3e73698" CreationDate="2011-07-23T07:19:17.543" UserDisplayName="Firetryer" Text="Can someone tell me how to implement collision in Pygame?  &#xD;&#xA;For example I have a sprite called A and another one called B.  &#xD;&#xA;How do I detect if they collide in Pygame?" />
  <row Id="34232" PostHistoryTypeId="1" PostId="15145" RevisionGUID="7abfde97-6431-4acd-b668-c57fd3e73698" CreationDate="2011-07-23T07:19:17.543" UserDisplayName="Firetryer" Text="Pygame How To Use Collision?" />
  <row Id="34233" PostHistoryTypeId="3" PostId="15145" RevisionGUID="7abfde97-6431-4acd-b668-c57fd3e73698" CreationDate="2011-07-23T07:19:17.543" UserDisplayName="Firetryer" Text="&lt;python&gt;&lt;collision-detection&gt;&lt;pygame&gt;" />
  <row Id="34234" PostHistoryTypeId="2" PostId="15147" RevisionGUID="83aa29ca-b9e9-40e9-a29a-648d129ed853" CreationDate="2011-07-23T16:16:46.353" UserId="5125" Text="I'm running my 3D (m)MORPG off of a cheap mono core Atom server (~18€/month) and if ever I get a lot of players I'll just hire a bigger server (a recent bi-quad Intel will be more than 50 times more powerful).&#xD;&#xA;Actually, even the Atom is overkill ATM so just go with what you can.&#xD;&#xA;&#xD;&#xA;That said, I don't know what language you are using nor what kind of framework you have (Is it inhouse? Is it effective?)." />
  <row Id="34238" PostHistoryTypeId="5" PostId="15142" RevisionGUID="59a4942a-58e3-490a-afdc-e2e0836b6268" CreationDate="2011-07-23T17:43:53.393" UserId="8807" Comment="added 221 characters in body" Text="I am reading an iphone game dev book and I have a question about velocity.&#xD;&#xA;&#xD;&#xA;mainly it is this line&#xD;&#xA;&#xD;&#xA;    playerVelocity = ccp(playerVelocity.x * dec + acceleration.x * sens, 0);&#xD;&#xA;&#xD;&#xA;Why do you mutiple the playerVelocity.x by the deceleration. the book says it works by reducing the current velocity so it is easier to change direction and then add the ( acceleration.x * sens. )&#xD;&#xA;&#xD;&#xA;this piece of code is using the accelerometer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    float dec = 0.4f; //lower = quicker to change direction;&#xD;&#xA;    float sens = 6.0f; //higher more sensitive;&#xD;&#xA;    float maxVel = 100;&#xD;&#xA;    &#xD;&#xA;    playerVelocity = ccp(playerVelocity.x * dec + acceleration.x * sens, 0);&#xD;&#xA;    NSLog(@&quot;%@&quot;, NSStringFromCGPoint(playerVelocity));&#xD;&#xA;    &#xD;&#xA;    if(playerVelocity.x &gt; maxVel)&#xD;&#xA;    {&#xD;&#xA;        playerVelocity.x = maxVel;&#xD;&#xA;    }&#xD;&#xA;    else if(playerVelocity.x &lt; - maxVel)&#xD;&#xA;    {&#xD;&#xA;        playerVelocity.x = - maxVel;&#xD;&#xA;    }" />
  <row Id="34239" PostHistoryTypeId="2" PostId="15149" RevisionGUID="d23a2fd8-18ee-458d-b01f-5c0eee758a05" CreationDate="2011-07-23T18:05:14.390" UserId="8812" Text="Facebook is not the exact same place as it was 2 years ago. Prepare to heavily advertise, very, very few games grow organically these days and Facebook gives preferential [treatment][1] for certain players so don't expect to be able to do what the big guys do either.&#xD;&#xA;&#xD;&#xA;Cost of advertising is also relatively high on facebook.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.businessinsider.com/facebook-basically-owns-zynga-2011-7" />
  <row Id="34241" PostHistoryTypeId="16" PostId="12180" RevisionGUID="bf303d66-3c38-4b22-828e-96cbb0c05915" CreationDate="2011-07-23T20:27:29.730" UserId="51" />
  <row Id="34242" PostHistoryTypeId="16" PostId="12184" RevisionGUID="c8afaeb2-94d1-4d19-955b-dc080e01b419" CreationDate="2011-07-23T20:27:29.730" UserId="51" />
  <row Id="34243" PostHistoryTypeId="16" PostId="15149" RevisionGUID="fcbef05a-8196-47a6-8f4b-c97a4a121d5b" CreationDate="2011-07-23T20:27:29.730" UserId="51" />
  <row Id="34246" PostHistoryTypeId="25" PostId="15145" RevisionGUID="9fe048b6-dd53-4679-8d3f-62c770377501" CreationDate="2011-07-23T21:32:16.753" Comment="http://twitter.com/#!/StackGameDev/status/94882547179339776" />
  <row Id="34247" PostHistoryTypeId="5" PostId="15070" RevisionGUID="676a27e7-6e7b-4085-aa42-d61e68e592c4" CreationDate="2011-07-24T00:30:04.890" UserId="7454" Comment="deleted 77 characters in body" Text="I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion).  I want the target to rotate and be facing right at the player.  The target, when it shoots something should shoot right at the player.  &#xD;&#xA;&#xD;&#xA;I've seen plenty of examples of slerping to the player, but I don't want incremental rotation, well, I suppose that would be ok as long as I can make the slerp be 100%, and as long as it actually worked.&#xD;&#xA;&#xD;&#xA;FYI - Im able to use the position and rotation to do plenty of other things and it all works great except this last piece I cant figure out.&#xD;&#xA;&#xD;&#xA;Code samples run in the Target's class, Position = the targets position, Avatar = the player.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Below is my implemetation in C# of Maik's answer which is currently causing the modeling scale funny and not rotate much at all.&#xD;&#xA;&#xD;&#xA;    var source = Vector3.Transform(Vector3.Forward, Rotation);&#xD;&#xA;    var dest = Vector3.Transform(Vector3.Forward, GameState.Avatar.Rotation);&#xD;&#xA;    Quaternion destQuat = Helpers.GetRotation(source, dest, Vector3.Up);&#xD;&#xA;    Rotation = destQuat;&#xD;&#xA;    Cannon.Shoot(Position, Rotation, this);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    public static Quaternion GetRotation(Vector3 source, Vector3 dest, Vector3 up)&#xD;&#xA;    {&#xD;&#xA;    	var a = new Vector3();&#xD;&#xA;    	var b = new Vector3();&#xD;&#xA;    	Vector3.Normalize(ref source, out a);&#xD;&#xA;    	Vector3.Normalize(ref dest, out b);&#xD;&#xA;    &#xD;&#xA;    	float dot = Vector3.Dot(a,b);&#xD;&#xA;    &#xD;&#xA;    	if (dot == -1.0f)&#xD;&#xA;    	{&#xD;&#xA;    		// vector a and b point exactly in the opposite direction, &#xD;&#xA;    		// so it is a 180 degrees turn around the up-axis&#xD;&#xA;    		return new Quaternion(up, MathHelper.ToRadians(180.0f));&#xD;&#xA;    	}&#xD;&#xA;    	else if (dot == 1.0f)&#xD;&#xA;    	{&#xD;&#xA;    		// vector a and b point exactly in the same direction&#xD;&#xA;    		// so we return the identity quaternion&#xD;&#xA;    		return Quaternion.Identity;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	float rotAngle = (float)Math.Acos(dot);&#xD;&#xA;    	Vector3 rotAxis = Vector3.Cross(a,b);&#xD;&#xA;    	return new Quaternion(rotAxis,rotAngle);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199001%28v=XNAGameStudio.10%29.aspx&#xD;&#xA;" />
  <row Id="34248" PostHistoryTypeId="25" PostId="15137" RevisionGUID="bc12e4e9-b1b0-4434-afc6-c2491800c4aa" CreationDate="2011-07-24T00:32:16.740" Comment="http://twitter.com/#!/StackGameDev/status/94927845322801153" />
  <row Id="34249" PostHistoryTypeId="25" PostId="15142" RevisionGUID="0869fab5-3732-48c5-bca1-4ec524307f5e" CreationDate="2011-07-24T03:32:17.353" Comment="http://twitter.com/#!/StackGameDev/status/94973144099586049" />
  <row Id="34250" PostHistoryTypeId="2" PostId="15150" RevisionGUID="9ef66ff1-6936-4625-b7db-aff6e86ce2b2" CreationDate="2011-07-24T04:02:45.527" UserId="370" Text="###Dynamic Tree&#xD;&#xA;&#xD;&#xA;[Box2D][1] is a well optimized engine designed by an [experienced physics/game programmer][2].  Originally Box2D used a hash grid that required a fixed height and width.&#xD;&#xA;&#xD;&#xA;When Erin upgraded to a better broadphase algorithm he went with Nathanael Presson's btDbvt.  This is the broadphase used by Bullet Physics.  Erin modified / optimized the algorithm for 2d.&#xD;&#xA;&#xD;&#xA;You can read a super high level overiew in the [Box2D manual][3] ( §4.11, or search for Dynamic Tree).&#xD;&#xA;&#xD;&#xA;Here's an except for the in [code documentation][4] (which is very good considering it not part of the public API).&#xD;&#xA;&#xD;&#xA;&gt; A dynamic AABB tree broad-phase, inspired by Nathanael Presson's&#xD;&#xA;&gt; btDbvt.  A dynamic tree arranges data in a binary tree to accelerate &#xD;&#xA;&gt; queries such as volume queries and ray casts. Leafs are proxies  with&#xD;&#xA;&gt; an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor  so&#xD;&#xA;&gt; that the proxy AABB is bigger than the client object. This allows the&#xD;&#xA;&gt; client object to move by small amounts without triggering a tree&#xD;&#xA;&gt; update.  &#xD;&#xA;&gt; &#xD;&#xA;&gt; Nodes are pooled and relocatable, so we use node indices rather than&#xD;&#xA;&gt; pointers.&#xD;&#xA;&#xD;&#xA;My understanding of the Dynamic Tree's algorithm is this.  The Dynamic tree is the cross between a classic [avl binary tree][5] and a quadtree.  The end effect is a quadtree that that only splits each node in half, and the split line isn't fixed (the two halves aren't equal sized like a quad tree).  AVL comes in because quadree with dynamic splits can degenerate to essentially list (O(n) lookup speed).  The AVL is used to rebalance subtrees so to ensure O lg(N) lookup speed.&#xD;&#xA;&#xD;&#xA;Best of all the code is MIT so feel free to copy/derived/shamelessly steal/etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.box2d.org/&#xD;&#xA;  [2]: https://plus.google.com/114825651948330685771/about&#xD;&#xA;  [3]: http://www.box2d.org/manual.html&#xD;&#xA;  [4]: http://code.google.com/p/box2d/source/browse/trunk/Box2D/Box2D/Collision/b2DynamicTree.h#53&#xD;&#xA;  [5]: http://en.wikipedia.org/wiki/AVL_tree" />
  <row Id="34251" PostHistoryTypeId="25" PostId="15070" RevisionGUID="49e89e60-a186-4ef1-b2e4-977a920508e0" CreationDate="2011-07-24T06:32:17.210" Comment="http://twitter.com/#!/StackGameDev/status/95018443060948993" />
  <row Id="34255" PostHistoryTypeId="5" PostId="15078" RevisionGUID="78096e56-317d-4cb3-8342-2060577f0774" CreationDate="2011-07-24T08:00:18.510" UserId="1839" Comment="added 1227 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;&#xD;&#xA;**EDIT:** Calculating the absolute orientation is actually a bit easier, use the forward vector of the identity-matrix instead of avatars forward vector as input for 1) and 2). &#xD;&#xA;And don't multiply it in 3), instead use it directly as the new orientation: `newRot = q`&#xD;&#xA;&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;**Important to note:** The solution has 2 anomalies caused by nature of the cross-product:&#xD;&#xA;&#xD;&#xA;  1. If the forward vectors are equal. Solution here is simply return the identity quaternion&#xD;&#xA;  &#xD;&#xA;  2. If the vectors point exactly in the opposite direction. The solution here is to create the quaternion by using avatars up axis as rotation axis and the angle 180.0 degrees.&#xD;&#xA;  &#xD;&#xA;Here is the implementation in C++ that takes care of those edge cases. Converting it to C# should be easy.&#xD;&#xA;&#xD;&#xA;    // returns a quaternion that rotates vector a to vector b&#xD;&#xA;    quaternion get_rotation(const vector &amp;a, const vector &amp;b, const vector &amp;up)&#xD;&#xA;    {   &#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(a);&#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(b);&#xD;&#xA;        &#xD;&#xA;        float dot = vector::dot(a, b);    &#xD;&#xA;        // test for dot -1&#xD;&#xA;        if(nearly_equal_eps_f(dot, -1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the opposite direction, &#xD;&#xA;            // so it is a 180 degrees turn around the up-axis&#xD;&#xA;            return quaternion(up, gdeg2rad(180.0f));&#xD;&#xA;        }&#xD;&#xA;        // test for dot 1&#xD;&#xA;        else if(nearly_equal_eps_f(dot, 1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the same direction&#xD;&#xA;            // so we return the identity quaternion&#xD;&#xA;            return quaternion(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(dot);&#xD;&#xA;        vector rotAxis = vector::cross(a, b);&#xD;&#xA;        rotAxis = vector::normalize(rotAxis);&#xD;&#xA;        return quaternion(rotAxis, rotAngle);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;----------------------------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:** Corrected version of Marc's XNA code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var dest = Vector3.Transform(Vector3.Forward, GameState.Avatar.Rotation);&#xD;&#xA;    Rotation = Helpers.GetRotation(Vector3.Forward, dest, Vector3.Up);&#xD;&#xA;    Cannon.Shoot(Position, Rotation, this);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    public static Quaternion GetRotation(Vector3 source, Vector3 dest, Vector3 up)&#xD;&#xA;    {&#xD;&#xA;        float dot = Vector3.Dot(source, dest);&#xD;&#xA;    &#xD;&#xA;        if (Math.Abs(dot - (-1.0f)) &lt; 0.000001f)&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the opposite direction, &#xD;&#xA;            // so it is a 180 degrees turn around the up-axis&#xD;&#xA;            return new Quaternion(up, MathHelper.ToRadians(180.0f));&#xD;&#xA;        }&#xD;&#xA;        if (Math.Abs(dot - (1.0f)) &lt; 0.000001f)&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the same direction&#xD;&#xA;            // so we return the identity quaternion&#xD;&#xA;            return Quaternion.Identity;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        float rotAngle = (float)Math.Acos(dot);&#xD;&#xA;        Vector3 rotAxis = Vector3.Cross(source, dest);&#xD;&#xA;        rotAxis = Vector3.Normalize(rotAxis);&#xD;&#xA;        return new Quaternion(rotAxis,rotAngle);&#xD;&#xA;    }" />
  <row Id="34256" PostHistoryTypeId="5" PostId="15078" RevisionGUID="ed19d67d-4d50-4b38-84de-9de340813a88" CreationDate="2011-07-24T08:15:12.170" UserId="1839" Comment="added 130 characters in body" Text="There are more than one ways to do it. You can calculate the absolute orientation or the rotation relative to your avatar, that means your new orientation = avatarOrientation * q. Here is the latter one:&#xD;&#xA;&#xD;&#xA;  1.  Calculate the rotation axis by taking the cross product of your avatar's unit forward vector and the unit vector from avatar to target, the new forward vector:&#xD;&#xA;&#xD;&#xA;        vector newForwardUnit = vector::normalize(target - avatarPosition);&#xD;&#xA;        vector rotAxis = vector::cross(avatarForwardUnit, newForwardUnit);&#xD;&#xA;   &#xD;&#xA;  2. Calculate the rotation angle using the dot-product&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(vector::dot(avatarForwardUnit, newForwardUnit));&#xD;&#xA;    &#xD;&#xA;  3. Create the quaternion using rotAxis and rotAngle and multiply it with avatar's current orientation&#xD;&#xA;&#xD;&#xA;        quaternion q(rotAxis, rotAngle);&#xD;&#xA;        quaternion newRot = avatarRot * q;&#xD;&#xA;    &#xD;&#xA;If you need help finding the avatar's current forward vector, the input for 1. just shoot :)&#xD;&#xA;&#xD;&#xA;**EDIT:** Calculating the absolute orientation is actually a bit easier, use the forward vector of the identity-matrix instead of avatars forward vector as input for 1) and 2). &#xD;&#xA;And don't multiply it in 3), instead use it directly as the new orientation: `newRot = q`&#xD;&#xA;&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;**Important to note:** The solution has 2 anomalies caused by nature of the cross-product:&#xD;&#xA;&#xD;&#xA;  1. If the forward vectors are equal. Solution here is simply return the identity quaternion&#xD;&#xA;  &#xD;&#xA;  2. If the vectors point exactly in the opposite direction. The solution here is to create the quaternion by using avatars up axis as rotation axis and the angle 180.0 degrees.&#xD;&#xA;  &#xD;&#xA;Here is the implementation in C++ that takes care of those edge cases. Converting it to C# should be easy.&#xD;&#xA;&#xD;&#xA;    // returns a quaternion that rotates vector a to vector b&#xD;&#xA;    quaternion get_rotation(const vector &amp;a, const vector &amp;b, const vector &amp;up)&#xD;&#xA;    {   &#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(a);&#xD;&#xA;        ASSERT_VECTOR_NORMALIZED(b);&#xD;&#xA;        &#xD;&#xA;        float dot = vector::dot(a, b);    &#xD;&#xA;        // test for dot -1&#xD;&#xA;        if(nearly_equal_eps_f(dot, -1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the opposite direction, &#xD;&#xA;            // so it is a 180 degrees turn around the up-axis&#xD;&#xA;            return quaternion(up, gdeg2rad(180.0f));&#xD;&#xA;        }&#xD;&#xA;        // test for dot 1&#xD;&#xA;        else if(nearly_equal_eps_f(dot, 1.0f, 0.000001f))&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the same direction&#xD;&#xA;            // so we return the identity quaternion&#xD;&#xA;            return quaternion(0.0f, 0.0f, 0.0f, 1.0f);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        float rotAngle = acos(dot);&#xD;&#xA;        vector rotAxis = vector::cross(a, b);&#xD;&#xA;        rotAxis = vector::normalize(rotAxis);&#xD;&#xA;        return quaternion(rotAxis, rotAngle);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;----------------------------------------------&#xD;&#xA;&#xD;&#xA;**EDIT:** Corrected version of Marc's XNA code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // the new forward vector, so the avatar faces the target&#xD;&#xA;    Vector3 newForward = Vector3.Normalize(Position - GameState.Avatar.Position);&#xD;&#xA;    // calc the rotation so the avatar faces the target&#xD;&#xA;    Rotation = Helpers.GetRotation(Vector3.Forward, newForward, Vector3.Up);&#xD;&#xA;    Cannon.Shoot(Position, Rotation, this);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    public static Quaternion GetRotation(Vector3 source, Vector3 dest, Vector3 up)&#xD;&#xA;    {&#xD;&#xA;        float dot = Vector3.Dot(source, dest);&#xD;&#xA;    &#xD;&#xA;        if (Math.Abs(dot - (-1.0f)) &lt; 0.000001f)&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the opposite direction, &#xD;&#xA;            // so it is a 180 degrees turn around the up-axis&#xD;&#xA;            return new Quaternion(up, MathHelper.ToRadians(180.0f));&#xD;&#xA;        }&#xD;&#xA;        if (Math.Abs(dot - (1.0f)) &lt; 0.000001f)&#xD;&#xA;        {&#xD;&#xA;            // vector a and b point exactly in the same direction&#xD;&#xA;            // so we return the identity quaternion&#xD;&#xA;            return Quaternion.Identity;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        float rotAngle = (float)Math.Acos(dot);&#xD;&#xA;        Vector3 rotAxis = Vector3.Cross(source, dest);&#xD;&#xA;        rotAxis = Vector3.Normalize(rotAxis);&#xD;&#xA;        return new Quaternion(rotAxis,rotAngle);&#xD;&#xA;    }" />
  <row Id="34257" PostHistoryTypeId="2" PostId="15152" RevisionGUID="efbdefa2-e1e5-4fb2-9b0d-97a8849eb18a" CreationDate="2011-07-24T09:21:57.953" UserId="1929" Text="How do people making 2D games maintain a consistent scale for everything in their game?&#xD;&#xA;&#xD;&#xA;Say I'm coding an RPG. A house needs to be proportionally bigger than a person; an item, smaller. Everything from enemies to locations to people.&#xD;&#xA;&#xD;&#xA;Is there a technique to doing this -- like picking a single item like the player sprite and scaling everything relative to that?" />
  <row Id="34258" PostHistoryTypeId="1" PostId="15152" RevisionGUID="efbdefa2-e1e5-4fb2-9b0d-97a8849eb18a" CreationDate="2011-07-24T09:21:57.953" UserId="1929" Text="Maintaining Consistent Scale (2D games)" />
  <row Id="34259" PostHistoryTypeId="3" PostId="15152" RevisionGUID="efbdefa2-e1e5-4fb2-9b0d-97a8849eb18a" CreationDate="2011-07-24T09:21:57.953" UserId="1929" Text="&lt;2d&gt;&lt;world-design&gt;" />
  <row Id="34260" PostHistoryTypeId="2" PostId="15153" RevisionGUID="6181a0f2-488c-4621-9e16-17db0f8554e1" CreationDate="2011-07-24T09:29:16.620" UserId="1156" Text="There's no real technique as such. The easiest way is to have a set pixel:real world units scale. If your character is 90 pixels tall, you'd have your ratio at about 45:1 in metres (assume your character is 1.8m, or 6 feet~).&#xD;&#xA;&#xD;&#xA;Then you can build everything from this. Your house may be 10m wide, so it would need to be 450 pixels in width.&#xD;&#xA;&#xD;&#xA;The main thing here is to build a single scale which is independent of what you started it from. It's easier to work with '10m in real objects is X pixels' than '10m in real objects is X times the player height'. What if you switch to a dwarf?" />
  <row Id="34261" PostHistoryTypeId="25" PostId="15152" RevisionGUID="c8c2ea56-fbfb-45c5-90e8-79457fc111bc" CreationDate="2011-07-24T09:32:16.877" Comment="http://twitter.com/#!/StackGameDev/status/95063739023376384" />
  <row Id="34262" PostHistoryTypeId="17" PostId="15154" RevisionGUID="5073ad44-4220-4a34-82c4-3a153b302d9e" CreationDate="2011-07-24T10:35:34.647" UserId="-1" Comment="from http://stackoverflow.com/questions/1901974/unreal-engine-3-vs-id-tech-3-vs-unity" Text="" />
  <row Id="34263" PostHistoryTypeId="17" PostId="15155" RevisionGUID="b915404a-b06d-45eb-81ac-f310d485e15a" CreationDate="2011-07-24T10:35:34.647" UserId="-1" Comment="from http://stackoverflow.com/questions/1901974/unreal-engine-3-vs-id-tech-3-vs-unity" Text="" />
  <row Id="34264" PostHistoryTypeId="2" PostId="15155" RevisionGUID="d32b5c28-971f-4e8b-ba59-f94bec9804fe" CreationDate="2009-12-14T20:15:43.463" UserDisplayName="Quintus" Text="Depending on your goals, [Ogre3D][1] can also be a valid option. It's free, open-source, portable, and there are quite a few high-quality toolsets to support different features you might be interested in.  Their development community is fairly active and responsive to questions and suggestions as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ogre3d.org/" />
  <row Id="34265" PostHistoryTypeId="2" PostId="15156" RevisionGUID="a112a614-fabd-49f4-92ee-06782c66905b" CreationDate="2009-12-15T21:35:28.377" UserId="138" Text="UDK, id Tech 3, and Unity are all vastly different tools.&#xD;&#xA;&#xD;&#xA;With UDK, you have script-level access, not native. As such, you are somewhat limited in the modifications you can perform. Additionally, UnrealScript is extremely slow; as such, it's difficult to optimize any product you do end up creating.&#xD;&#xA;&#xD;&#xA;Overall, it's not very well crafted for anything that drastically doesn't match Epic's product line.&#xD;&#xA;&#xD;&#xA;id Tech 3 will give you C++ access. That being said, it's much older technology, the tools aren't as robust, etc. Personally, I've never used it; but, it's not something you're going to build a commercial product with (unless you're looking for something scaled back. Check out this list: http://en.wikipedia.org/wiki/Id_Tech_3#Projects_based_on_the_GPL_source_release).&#xD;&#xA;&#xD;&#xA;As for Unity? It's a great place for a beginner/someone that doesn't want to have to delve into the complex details of an engine. Additionally, it's more flexible.&#xD;&#xA;&#xD;&#xA;Can you release a triple-A title on it? No. That being said, you're not going to be using it for that.&#xD;&#xA;&#xD;&#xA;With the ultimate goal of educating yourself without having to dive into C++, I'd highly recommend Unity." />
  <row Id="34266" PostHistoryTypeId="2" PostId="15154" RevisionGUID="36a73389-f4f9-4d5e-a2b8-9d7ab8e25809" CreationDate="2009-12-14T16:37:06.687" UserId="268" Text="I'm trying to decide which engine I should start using to try to start building a game in.&#xD;&#xA;&#xD;&#xA;I had chosen Unity, but upon hearing that Unreal engine 3 had just become kinda free to use, I found myself questioning my decision.&#xD;&#xA;&#xD;&#xA;Technically unreal is still the most expensive commercially, then Unity, then Id tech 3(free).&#xD;&#xA;&#xD;&#xA;But, it also could be the fastest to work in? Or is just the most powerful, but unity actually does so much for you, that it makes the most sense to work with this, and take a hit on performance/tuning (like java/c#).&#xD;&#xA;&#xD;&#xA;Thoughts please, can anyone speak from experience of all 3?&#xD;&#xA;&#xD;&#xA;I have experience with modding since the doom days, then in quake 1 and half life. I also have experience in 3ds max. I don't have a desire at this point my life to really get into the nitty gritty of c++ animation and rendering issues, I'd rather get something up and running quickly, to see if it's possible. But Unreal experience temps me greatly." />
  <row Id="34267" PostHistoryTypeId="1" PostId="15154" RevisionGUID="36a73389-f4f9-4d5e-a2b8-9d7ab8e25809" CreationDate="2009-12-14T16:37:06.687" UserId="268" Text="Unreal engine 3 vs Id tech 3 vs Unity" />
  <row Id="34268" PostHistoryTypeId="3" PostId="15154" RevisionGUID="36a73389-f4f9-4d5e-a2b8-9d7ab8e25809" CreationDate="2009-12-14T16:37:06.687" UserId="268" Text="&lt;unity&gt;" />
  <row Id="34269" PostHistoryTypeId="17" PostId="15156" RevisionGUID="e7d55616-1fed-4b60-a174-1a245e78fab6" CreationDate="2011-07-24T10:35:34.647" UserId="-1" Comment="from http://stackoverflow.com/questions/1901974/unreal-engine-3-vs-id-tech-3-vs-unity" Text="" />
  <row Id="34270" PostHistoryTypeId="17" PostId="15157" RevisionGUID="0136e8a0-2238-417d-829d-e2ddde75add6" CreationDate="2011-07-24T10:35:34.647" UserId="-1" Comment="from http://stackoverflow.com/questions/1901974/unreal-engine-3-vs-id-tech-3-vs-unity" Text="" />
  <row Id="34271" PostHistoryTypeId="17" PostId="15158" RevisionGUID="a5cc59db-40e5-4171-b1b6-746582472cb7" CreationDate="2011-07-24T10:35:34.647" UserId="-1" Comment="from http://stackoverflow.com/questions/1901974/unreal-engine-3-vs-id-tech-3-vs-unity" Text="" />
  <row Id="34272" PostHistoryTypeId="17" PostId="15159" RevisionGUID="c7e4dd2f-086e-4648-89a6-93db45bf37de" CreationDate="2011-07-24T10:35:34.647" UserId="-1" Comment="from http://stackoverflow.com/questions/1901974/unreal-engine-3-vs-id-tech-3-vs-unity" Text="" />
  <row Id="34273" PostHistoryTypeId="2" PostId="15157" RevisionGUID="d73bdfb3-03ac-4259-bf7b-cdd2bd00f14f" CreationDate="2010-07-22T14:24:25.217" UserDisplayName="Eric Collado" Text="@optician - Short answer for your question, of the 3 pieces of software you mentioned, you will do best with Unity 3D. You don't want to dive heavily into C/C++ so that rules out id Tech 3 (it's also a bit dated). Unity works with Javascript, C#, or Boo scripts attached to game objects and components so you can do as little or as much code as you feel comfortable with. Unreal is okay as well but I find the learning curve with Unity to be much shallower. You will put out a finished game more quickly and I think that is your ultimate goal, to make games. &#xD;&#xA;@Andreas - I am currently using Unity 3D v2.6 to learn the engine for a personal project. I don't want to say it is impossible to make a AAA title with it but at the very least it is very unlikely. For a prototype all I did was import a moderately detailed model of a large space cruiser and Unity choked on it (meshes must not exceed 65,000 vertices). Granted that's an extreme example and it's fairly easy to use lower detail models but that's not the only issue. Being a space concept, I used accurate astronomical scale distances in a test using 1 Astronomical Unit between a planet and its star. Only to run into 32-bit signed floating point precision errors that caused the camera to jitter, stutter, and gyrate like a crack addict despite the values being several orders of magnitude below the 32-bit limit. I could set the far viewing plane to a maximum 1e+15 units at 60 degrees viewing angle before the camera started to go wonky. Don't get me wrong, I like the engine and am a big fan. But for the purposes of AAA game development involving large teams with multi-million dollar budgets the currently available (to beginners) version of Unity is not as robust as Unreal Engine 3.5 ... id Tech 3 is a good place for a beginner to get a look at the C++ source code of a AAA quality game by the standards of several years ago but again, unless you want to go out and use someone else's tools written several years ago you will be spending a lot of your time constructing tools for the rest of your team before you can even start producing a &quot;AAA&quot; quality game. Note I am not saying you can't make a good game or even a great game. But it will not be competitive commercially with Modern Warfare 2, Halo 3, Gears of War 2, etc. That market is unforgiving with a different set of expectations and will not accept pre-DirectX 9 graphics quality." />
  <row Id="34274" PostHistoryTypeId="2" PostId="15158" RevisionGUID="6c8b0973-de44-4300-8eab-fb31a8dc0c70" CreationDate="2011-04-19T16:54:24.817" UserDisplayName="Soham Gupta" Text="Well, according to me, (I've tried Unity AND Unreal) I can't really find a fault in how tough or complex they are - both are great - but it actually depends on what sort of a game you wanna make. Unity let's you create game that are based on modern warefare (not Call of Duty 4 Modern Warfare), whearas Unreal is more sci-fi based. I know this dosen't help much, but if I come across something, I'll let you know (if I'm not too late, that is). As for iD Tech 3 - I've never tried it!" />
  <row Id="34275" PostHistoryTypeId="2" PostId="15159" RevisionGUID="a4e5e43f-69a7-4b7b-9289-32fc2a27724a" CreationDate="2011-07-23T09:40:54.523" UserDisplayName="Meh" Text="Torque 3D while you can still afford it, call it whatever you want but you can't beat the price nor is there a paid competition that lets you have the source code. With that said, you won't be stuck with shitty OpenGL crap with scaled back graphics, this is the real deal as far as close triple A engines of this nature can come." />
  <row Id="34276" PostHistoryTypeId="2" PostId="15160" RevisionGUID="d53452f9-8d38-4497-9974-14a6f306e8d8" CreationDate="2011-07-24T10:46:25.790" UserId="8819" Text="I agree with The Communist Duck, but there are other issues. Generally in 2D RPG and strategy games, closed areas and areas that access thru doors are smaller than what it should be. You may need to do that as well to make your towns smaller and easier to navigate. Similarly and potion would be bigger than what it should be to allow user to see and pick it up. Citing The Communist Duck's answer, a potion of 10cm hight will be 5 pixels. So the scale cannot be consistent all the time.&#xD;&#xA;&#xD;&#xA;Most of the time these does not apply to 3D RPGs." />
  <row Id="34277" PostHistoryTypeId="2" PostId="15161" RevisionGUID="5f3da1b4-bfec-418e-8885-a050f319dea4" CreationDate="2011-07-24T11:34:32.883" UserId="8820" Text="I'm looking at creating a fairly complex choose-your-own adventure style of game, but I'm looking for a technique or method to help with the game design.&#xD;&#xA;&#xD;&#xA;It will be a multi-branching story, and at times the branches will fold back in on themselves, and your major actions will be remembered and items will be collected.  For example, if the player goes to the swamp and the forest before going to the castle he has picked up a dinosaur bone, killed a unicorn and grown an extra arm.  If a player gets to the castle via the caves and the crypt he has picked up a bicycle and a strange smell.&#xD;&#xA;Now when developing puzzles for the castle I don't want to create a situation where two impossibilities are requires, for example - an extra arm and the smell are needed to kill an ogre.&#xD;&#xA;&#xD;&#xA;Other than documenting the events and items very very carefully is there a process, a technique I can use in a spreadsheet or a piece of software that can help me?" />
  <row Id="34278" PostHistoryTypeId="1" PostId="15161" RevisionGUID="5f3da1b4-bfec-418e-8885-a050f319dea4" CreationDate="2011-07-24T11:34:32.883" UserId="8820" Text="Avoiding impossible states in an adventure game" />
  <row Id="34279" PostHistoryTypeId="3" PostId="15161" RevisionGUID="5f3da1b4-bfec-418e-8885-a050f319dea4" CreationDate="2011-07-24T11:34:32.883" UserId="8820" Text="&lt;puzzle&gt;&lt;adventure&gt;" />
  <row Id="34281" PostHistoryTypeId="2" PostId="15163" RevisionGUID="74e9d75d-58d1-4ef9-875b-8d29545ddab7" CreationDate="2011-07-24T11:53:09.157" UserId="8148" Text="Here i got a method that can be used to detect click inside any polygon:&#xD;&#xA;&#xD;&#xA;    public bool PointInPolygon( Vector2 p, Vector2[] poly )&#xD;&#xA;		{&#xD;&#xA;			Vector2 p1, p2;&#xD;&#xA;			bool inside = false;&#xD;&#xA;&#xD;&#xA;			if( poly.Length &lt; 3 )&#xD;&#xA;			{&#xD;&#xA;				return inside;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Vector2 oldPoint = new Vector2( poly[poly.Length - 1].X, poly[poly.Length - 1].Y );&#xD;&#xA;&#xD;&#xA;			for( int i = 0; i &lt; poly.Length; i++ )&#xD;&#xA;			{&#xD;&#xA;				Vector2 newPoint = new Vector2( poly[i].X, poly[i].Y );&#xD;&#xA;&#xD;&#xA;				if( newPoint.X &gt; oldPoint.X )&#xD;&#xA;				{&#xD;&#xA;					p1 = oldPoint;&#xD;&#xA;					p2 = newPoint;&#xD;&#xA;				}&#xD;&#xA;				else&#xD;&#xA;				{&#xD;&#xA;					p1 = newPoint;&#xD;&#xA;					p2 = oldPoint;&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;				if( ( newPoint.X &lt; p.X ) == ( p.X &lt;= oldPoint.X )&#xD;&#xA;					&amp;&amp; ( (long)p.Y - (long)p1.Y ) * (long)( p2.X - p1.X )&#xD;&#xA;					 &lt; ( (long)p2.Y - (long)p1.Y ) * (long)( p.X - p1.X ) )&#xD;&#xA;				{&#xD;&#xA;					inside = !inside;&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;				oldPoint = newPoint;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			return inside;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;You need to give the corners in a vector2 array (poly) and the clicked position (p) to the method." />
  <row Id="34282" PostHistoryTypeId="5" PostId="15163" RevisionGUID="99769f88-4eca-4f6e-bb5b-58b9a9aa8d36" CreationDate="2011-07-24T11:58:27.237" UserId="8148" Comment="added 17 characters in body" Text="Here i got a method that can be used to detect clicks inside any polygon:&#xD;&#xA;&#xD;&#xA;    public bool PointInPolygon( Vector2 p, Vector2[] poly )&#xD;&#xA;		{&#xD;&#xA;			Vector2 p1, p2;&#xD;&#xA;			bool inside = false;&#xD;&#xA;&#xD;&#xA;			if( poly.Length &lt; 3 )&#xD;&#xA;			{&#xD;&#xA;				return inside;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Vector2 oldPoint = new Vector2( poly[poly.Length - 1].X, poly[poly.Length - 1].Y );&#xD;&#xA;&#xD;&#xA;			for( int i = 0; i &lt; poly.Length; i++ )&#xD;&#xA;			{&#xD;&#xA;				Vector2 newPoint = new Vector2( poly[i].X, poly[i].Y );&#xD;&#xA;&#xD;&#xA;				if( newPoint.X &gt; oldPoint.X )&#xD;&#xA;				{&#xD;&#xA;					p1 = oldPoint;&#xD;&#xA;					p2 = newPoint;&#xD;&#xA;				}&#xD;&#xA;				else&#xD;&#xA;				{&#xD;&#xA;					p1 = newPoint;&#xD;&#xA;					p2 = oldPoint;&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;				if( ( newPoint.X &lt; p.X ) == ( p.X &lt;= oldPoint.X )&#xD;&#xA;					&amp;&amp; ( (long)p.Y - (long)p1.Y ) * (long)( p2.X - p1.X )&#xD;&#xA;					 &lt; ( (long)p2.Y - (long)p1.Y ) * (long)( p.X - p1.X ) )&#xD;&#xA;				{&#xD;&#xA;					inside = !inside;&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;				oldPoint = newPoint;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			return inside;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;You need to give the corners of your hexagon in a vector2 array (poly) and the clicked position (p) to the method." />
  <row Id="34283" PostHistoryTypeId="2" PostId="15164" RevisionGUID="bd496936-0cf8-40e0-a69d-96af48e695f8" CreationDate="2011-07-24T12:05:14.097" UserId="5125" Text="You will likely also have a need for Managing the servers, a sort of SYSADMIN. So when the need arises, hire a new server (hardware) and infuse it with database, server (software) etc., fusioning servers if that need arises + backup strategies, maintaining the OS and so on.&#xD;&#xA;&#xD;&#xA;You'd like to have some sort of security strategy too, complicated as it spans several domains (the server soft of course, connections and reliability of the physical server, web services and even ingame hacks and exploits)." />
  <row Id="34284" PostHistoryTypeId="25" PostId="15161" RevisionGUID="ca3fc325-1c67-472f-9722-3185c0e887dd" CreationDate="2011-07-24T12:32:16.950" Comment="http://twitter.com/#!/StackGameDev/status/95109039834402816" />
  <row Id="34285" PostHistoryTypeId="2" PostId="15165" RevisionGUID="6328b3ac-b2f7-4829-973e-71662f699a3b" CreationDate="2011-07-24T15:21:08.327" UserId="7328" Text="this may seem an odd answer but you can easily check for impossible events using compilers (for example c++)! let me explain how: you have exactly one header file for every stage. and game ends in `main.cpp` file. whenever you can go from `stage a` to `stage b`, you just have to include file relate to `stage a` in `stage b`. whenever you get a new item in a stage you just define a value for that item. whenever you lost or use an item you just have to undef it. in the end in each stage you just have to use all the defined values for the items needed in that stage. here is a sample how to use this in code :&#xD;&#xA;&#xD;&#xA;a.h&#xD;&#xA;	&#xD;&#xA;	#define itemA&#xD;&#xA;&#xD;&#xA;b.h&#xD;&#xA;&#xD;&#xA;	#include &lt;a.h&gt;&#xD;&#xA;	#undef itemA&#xD;&#xA;	#define itemB&#xD;&#xA;&#xD;&#xA;c.h&#xD;&#xA;&#xD;&#xA;	#include &lt;a.h&gt;&#xD;&#xA;	&#xD;&#xA;	itemA;&#xD;&#xA;	&#xD;&#xA;	#include &lt;b.h&gt;&#xD;&#xA;			&#xD;&#xA;	itemB;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;main.cpp&#xD;&#xA;&#xD;&#xA;	#include &lt;c.h&gt;&#xD;&#xA;	int main()&#xD;&#xA;	{&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;although it may need some changes before really used but i guess you can create some code like this. you can also use inheritance and use classes for each stage instead of the approach i suggested. other than these i think you have to develop a tool yourself." />
  <row Id="34286" PostHistoryTypeId="25" PostId="15069" RevisionGUID="26c62e67-c184-46e9-851b-605d11efd747" CreationDate="2011-07-24T15:32:17.920" Comment="http://twitter.com/#!/StackGameDev/status/95154341849210880" />
  <row Id="34287" PostHistoryTypeId="2" PostId="15166" RevisionGUID="fdba8272-775c-4bc6-84cf-f55dec21befb" CreationDate="2011-07-24T16:01:56.090" UserId="7911" Text="Sounds kind of like a directed graph problem.&#xD;&#xA;&#xD;&#xA;Start at the beginning, for each branching in the story record the items you currently have and then branch the graph.  From there follow each branch and do the same, once you get to another branch record your current items and branch the graph.  This will end up with a pretty dense graph with lots of duplicated nodes (but each node got there from a different graph sequence) but you should get no loops.&#xD;&#xA;&#xD;&#xA;At the end you should have a graph of all the items you can have at any given point in your story and from all possible ways to get there.&#xD;&#xA;&#xD;&#xA;Now, with your completed graph: for each of your problems that require items X+Y+Z find all the nodes that have that problem and see if the items recorded can satisfy that condition.  If there's a failure simply walk back up the graph to find all the decisions that got you there without the proper items to solve that problem.&#xD;&#xA;&#xD;&#xA;With any luck your original design is already laid out like this, at least conceptually, so the code should mirror reality and be easy to verify.&#xD;&#xA;&#xD;&#xA;The processing time of the graph searches might get a bit heavy if you're building a large game, so build this like a utility that can take a while to run and outputs results into a report for you to use.&#xD;&#xA;" />
  <row Id="34288" PostHistoryTypeId="2" PostId="15167" RevisionGUID="446f356f-5d38-41ea-8421-e38d713873d2" CreationDate="2011-07-24T16:27:18.160" UserId="8822" Text="Does cocos2d has a method that returns the amount of CCSprites added to a CCLayer?&#xD;&#xA;&#xD;&#xA;A have SceneControlLayer object, and I added some CCSprites to it.&#xD;&#xA;&#xD;&#xA;    @interface SceneControlLayer : CCLayer {&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    @implementation SceneControlLayer&#xD;&#xA;    &#xD;&#xA;    -(id)init {&#xD;&#xA;    &#xD;&#xA;    CCSprite *spr1 = [CCSprite spriteWithFile:@&quot;spr1.png];&#xD;&#xA;    [self addChild:spr1 z:1 tag:1];&#xD;&#xA;    &#xD;&#xA;    CCSprite *spr2 = [CCSprite spriteWithFile:@&quot;spr2.png];&#xD;&#xA;    [self addChild:spr2 z:2 tag:2];&#xD;&#xA;    &#xD;&#xA;    ...&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    @end&#xD;&#xA;&#xD;&#xA;How do I retrieve an array of sprites added to the layer? Could I retrieve all the objects added through addChild and test its type?&#xD;&#xA;&#xD;&#xA;Since I'm starting with cocos2d/objectivec, please, give some examples how to do it...&#xD;&#xA;&#xD;&#xA;I also thought that I could create an array, and, besides adding it to the layer, add it to the array also. But I'm not so sure if it's a good option.&#xD;&#xA;&#xD;&#xA;TIA,&#xD;&#xA;&#xD;&#xA;Bob" />
  <row Id="34289" PostHistoryTypeId="1" PostId="15167" RevisionGUID="446f356f-5d38-41ea-8421-e38d713873d2" CreationDate="2011-07-24T16:27:18.160" UserId="8822" Text="Count number of CCSprite added to a CCLayer" />
  <row Id="34290" PostHistoryTypeId="3" PostId="15167" RevisionGUID="446f356f-5d38-41ea-8421-e38d713873d2" CreationDate="2011-07-24T16:27:18.160" UserId="8822" Text="&lt;cocos2d-iphone&gt;&lt;objective-c&gt;&lt;ccsprite&gt;" />
  <row Id="34291" PostHistoryTypeId="2" PostId="15168" RevisionGUID="39edb0de-2019-47d9-9c74-afff02596fa5" CreationDate="2011-07-24T16:50:49.433" UserId="20" Text="Every `CCNode` has a `children` property, which is a CCArray, containing all children. Since `CCLayer` is a subclass of `CCNode`, you can get the number of children added to the layer using: `[[layer children] count]`" />
  <row Id="34295" PostHistoryTypeId="2" PostId="15170" RevisionGUID="eea9e2c2-41a3-40ea-bbc9-217fd1c83a38" CreationDate="2011-07-24T17:14:04.200" UserId="2776" Text="Could you tell me hardware requirements for middle mobile gaming market on Android?&#xD;&#xA;&#xD;&#xA;What do you think about Samsung S5830 Galaxy Ace and it's hardware resources?  Is it modern for gaming on Android or it is very low? Do modern mobile games require more powerfull hardware?&#xD;&#xA;&#xD;&#xA;Sorry for this question, but for now I'm only pc developer and I wanna to start developing games for Android.&#xD;&#xA;&#xD;&#xA;It will be cool if you provide some links;)&#xD;&#xA;&#xD;&#xA;Thank you!" />
  <row Id="34296" PostHistoryTypeId="1" PostId="15170" RevisionGUID="eea9e2c2-41a3-40ea-bbc9-217fd1c83a38" CreationDate="2011-07-24T17:14:04.200" UserId="2776" Text="Hardware requirements for middle mobile gaming market on Android" />
  <row Id="34297" PostHistoryTypeId="3" PostId="15170" RevisionGUID="eea9e2c2-41a3-40ea-bbc9-217fd1c83a38" CreationDate="2011-07-24T17:14:04.200" UserId="2776" Text="&lt;android&gt;&lt;marketing&gt;&lt;hardware&gt;" />
  <row Id="34298" PostHistoryTypeId="25" PostId="15016" RevisionGUID="c88015a8-a913-4c0d-9d9a-ca994accab37" CreationDate="2011-07-24T18:32:18.760" Comment="http://twitter.com/#!/StackGameDev/status/95199645449461760" />
  <row Id="34299" PostHistoryTypeId="4" PostId="15070" RevisionGUID="ce4462a2-4790-4e59-929e-a12b6e178fd4" CreationDate="2011-07-24T19:10:00.007" UserId="2698" Comment="Clearer title" Text="Orienting a model to face a target" />
  <row Id="34300" PostHistoryTypeId="24" PostId="15070" RevisionGUID="ce4462a2-4790-4e59-929e-a12b6e178fd4" CreationDate="2011-07-24T19:10:00.007" Comment="Proposed by 2698 approved by 14 edit id of 577" />
  <row Id="34301" PostHistoryTypeId="5" PostId="15170" RevisionGUID="7c48c62d-8858-42db-9651-f0bad3a52275" CreationDate="2011-07-24T20:58:57.170" UserId="1198" Comment="deleted 12 characters in body" Text="Could you tell me hardware requirements for middle mobile gaming market on Android?&#xD;&#xA;&#xD;&#xA;What do you think about Samsung S5830 Galaxy Ace and it's hardware resources?  Is it modern for gaming on Android or it is very low? Do modern mobile games require more powerfull hardware?&#xD;&#xA;&#xD;&#xA;Sorry for this question, but for now I'm only pc developer and I wanna to start developing games for Android.&#xD;&#xA;&#xD;&#xA;It will be cool if you provide some links. ;)" />
  <row Id="34302" PostHistoryTypeId="25" PostId="15167" RevisionGUID="4619a162-331a-4c1a-af42-22fbdbf4bcff" CreationDate="2011-07-24T21:32:20.697" Comment="http://twitter.com/#!/StackGameDev/status/95244948735143936" />
  <row Id="34303" PostHistoryTypeId="5" PostId="15168" RevisionGUID="bb20cb54-8bcd-444e-a56b-5e49ba6fb67b" CreationDate="2011-07-24T21:35:00.323" UserId="20" Comment="updated according to comments" Text="Every `CCNode` has a `children` property, which is a CCArray, containing all children. Since `CCLayer` is a subclass of `CCNode`, you can get the number of children added to the layer using: `[[layer children] count]`&#xD;&#xA;&#xD;&#xA;**Update:** If you're not checking that sprite count very frequently, you can simply iterate through the `children` array and count the number of children that are actually sprites (using `isKindOfClass`). If you need to access these sprites constantly (eg. in every update) it would probably be wiser to also store them in a separate array." />
  <row Id="34310" PostHistoryTypeId="5" PostId="3472" RevisionGUID="26e2f9f1-569f-42ed-ad65-c73705a3599f" CreationDate="2011-07-25T01:10:19.633" UserId="288" Comment="added 113 characters in body" Text="Silverlight 3 introduced &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.media.projection(v=VS.95).aspx&quot;&gt;`Projection`&lt;/a&gt; which allows for 3D transformations of elements. And in Silverlight 4 it became hardware accelerated.&#xD;&#xA;&#xD;&#xA;(There are a very limited number of things that Silverlight 3 and 4 will hardware accelerate - and lots of ways to accidentally turn it off or make it perform poorly.)&#xD;&#xA;&#xD;&#xA;There are two projection elements: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.media.planeprojection(v=VS.95).aspx&quot;&gt;`PlaneProjection`&lt;/a&gt; and  &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.media.matrix3dprojection(v=VS.95).aspx&quot;&gt;`Matrix3DProjection`&lt;/a&gt;. The former is useful for making 3D interfaces. The latter will give you sufficient control to actually place elements in full 3D (providing you're pretty handy with your matrices).&#xD;&#xA;&#xD;&#xA;This is a **far cry** from a 3D engine that renders triangles. You will be basically placing textured quads in 3D space.&#xD;&#xA;&#xD;&#xA;Using this, a game that uses &quot;2.5D&quot; like Doom or Diablo 2 should be possible with *a lot* of work. It's worth pointing out that Silverlight as a whole is woefully inadequate for making games that require &quot;fancy&quot; graphics.&#xD;&#xA;&#xD;&#xA;For a more generic 3D engine, you could take a look at the Silverlight version of &lt;a href=&quot;http://balder.codeplex.com/&quot;&gt;Balder&lt;/a&gt;. Last time I looked, it was slow and buggy - although it seems to have improved since then. It does software rendering on Silverlight, so performance is going to limit you to the simplest of 3D environments.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;**UPDATE**: Silverlight 5 now supports real 3D with an API that is very close to the one used by XNA." />
  <row Id="34311" PostHistoryTypeId="6" PostId="15070" RevisionGUID="f576e569-2f28-466b-a3eb-860c47b9db30" CreationDate="2011-07-25T01:19:23.407" UserId="2698" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;3d&gt;&lt;models&gt;&lt;quaternion&gt;" />
  <row Id="34312" PostHistoryTypeId="2" PostId="15172" RevisionGUID="dc9de703-de42-4d3a-9ca8-18358b81a617" CreationDate="2011-07-25T01:37:22.240" UserId="849" Text="Nowadays, most music seems to be prerecorded, but that means they are rather static and take up a lot of space.&#xD;&#xA;&#xD;&#xA;I wonder if MIDI is still a viable option (especially considering consoles or iOS) and if I can expect General Midi 1 to be available everywhere?&#xD;&#xA;&#xD;&#xA;Alternatively, are there vendors of embeddable software instruments that can generate the desired sound at runtime?&#xD;&#xA;&#xD;&#xA;The whole point is to re-create a dynamic soundscape in which instruments can change their volume, speed or pitch - this can be partially simulated with individual tracks, but it doesn't offer the same flexibility." />
  <row Id="34313" PostHistoryTypeId="1" PostId="15172" RevisionGUID="dc9de703-de42-4d3a-9ca8-18358b81a617" CreationDate="2011-07-25T01:37:22.240" UserId="849" Text="MIDI or other Software Instruments?" />
  <row Id="34314" PostHistoryTypeId="3" PostId="15172" RevisionGUID="dc9de703-de42-4d3a-9ca8-18358b81a617" CreationDate="2011-07-25T01:37:22.240" UserId="849" Text="&lt;music&gt;&lt;midi&gt;&lt;instrument&gt;" />
  <row Id="34315" PostHistoryTypeId="2" PostId="15173" RevisionGUID="a001c5bd-c535-4612-9244-20688dff1963" CreationDate="2011-07-25T02:18:44.607" UserId="849" Text="id Tech 3 isn't really free - it's GPL, so your entire Game has to be GPL. You used to be able to license a non-GPL Version for $10,000 but that options seems to have disappeared after the Bethesda-acquisition.&#xD;&#xA;&#xD;&#xA;Apart from it's age, id Tech 3 doesn't have much in the realm of Single-Player AI. So if you want to make a &quot;traditional&quot; shooter, you have a lot of AI work to do yourself. Another problem is the tooling. There are a lot of Map Tools, but that's about it. There is very little assistance in the Asset Pipeline or Shader creation.&#xD;&#xA;&#xD;&#xA;On the upside, the Team Arena source contains an early version of MegaTexture and supports relatively large outdoor environments." />
  <row Id="34316" PostHistoryTypeId="2" PostId="15174" RevisionGUID="14e43aa2-467e-49eb-924e-5ce872bc3292" CreationDate="2011-07-25T02:21:20.363" UserId="101" Text="The soundtrack for the original Unreal Tournament took the form of tracker music, which packages together both audio samples and sequencing information for triggering those samples.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Tracker_%28music_software%29&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/Module_file&#xD;&#xA;&#xD;&#xA;You might also look to the demoscene for inspiration. Soundtracks created in tracker software are the rule rather than the exception, and runtime synthesis is frequently employed as well." />
  <row Id="34317" PostHistoryTypeId="2" PostId="15175" RevisionGUID="fcb8c204-b528-4c57-8196-347d859984ff" CreationDate="2011-07-25T02:35:18.213" UserId="8816" Text="The first step is understanding the difference between copyright and trademarks.&#xD;&#xA;&#xD;&#xA;Trademarks are a system for marking (distinguishing) one type of goods from another. &#xD;&#xA;[quote]From Wikipedia: A trademark, trade mark, or trade-mark[1] is a distinctive sign or indicator used by an individual, business organization, or other legal entity to identify that the products or services to consumers with which the trademark appears originate from a unique source, and to distinguish its products or services from those of other entities. [/quote]&#xD;&#xA;&#xD;&#xA;Google is a trademark. The trademark ‘Google’ is not copyrighted. You cannot copyright words, nor can you generally copyright name. You can copyright characterizations. For instance, you cannot copyright ‘Harry Potter’, however, ‘Harry Potter, a wizard, etcetera’ can be protected. At what point is a bit murky. Example: it isn’t enough that ‘Harry Potter A’ and Harry Potter B’ both be boys. The movie Troll (1986) introduced the name Harry Potter, years before the book. Further, even though there are over 100 various Harry Potter trademarks now associated with the Rowling’s character, these trademarks cannot prevent anyone from having a character named Harry Potter. What they can prevent is the use of the phrase Harry Potter to mark any conflicting goods. Stay with me a bit here.&#xD;&#xA;&#xD;&#xA;Troll is being remade. Even though the makers of Troll did not trademark Harry Potter, they can still use the name. What they cannot do it infringe on various ‘Harry Potter’ trademarks and call their movie Harry Potter Meets the Trolls, or Harry Potter VS Trolls, etc. This is not a matter of who used the name first. Trademarks protect how your goods (product) is represented in the marketplace.&#xD;&#xA;&#xD;&#xA;An additional aspect of trademarks to remember is that trademarks are by area. So even if you find a trademark with the same name it may not prevent use if it only covers an unrelated area. For instance, registering a trademark for ‘Vehicles’ doesn’t mean someone cannot use that same word or phrase for clothing. This is why if one looks carefully at X-Men trademarks you’ll see various types of separate registration by Marvel/Fox/Etcetera to cover, not only comics, but entertainment, toys, games, and even cakes.&#xD;&#xA;&#xD;&#xA;Copyright protects intellectual property. What some refer to as artistic or creative expression. Literally, it is the copyright owner’s right to control who can use the artist’s work. A list of the users of this site wouldn’t fall under copyright, but certain expressions of that list might. The standard example is that the information in a phonebook, the data, is not protected, but the form and layout may be.&#xD;&#xA;********************************* &#xD;&#xA;The easiest way to avoid trademark issues is to make up something. That’s what Google did. You’ll still have to check to make sure someone else didn’t make it up first. Combining words can help, Balloony, Ballunacy, Ballunatic Attack, etc.&#xD;&#xA;&#xD;&#xA;The easiest way to avoid copyright issues it to make your own art from scratch. Or Google copyright free, public domain, free art, royalty-free etcetera. Non-professional artists are often quite willing to allow you to use their artwork if you ask permission.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34318" PostHistoryTypeId="2" PostId="15176" RevisionGUID="d6321565-b33c-4926-8f7d-73541747ed0a" CreationDate="2011-07-25T03:03:38.733" UserId="7728" Text="Yes, MIDI is still heavily used in the music industry.  At the low end, you'll find tools like [Garage Band][1].  At the high end, you'll find tools like [Reason][2].  These can either output standard audio files, or can be used to create MIDI data which can be played back in other tools (or games!)&#xD;&#xA;&#xD;&#xA;For use in games, you might consider a library like [TiMidity++][3] for playing back midi music in a cross-platform way, optionally using a custom set of music instrument sample sound.  If you're a fan of [SDL][4], then [SDL_mixer][5] is an easy-to-use sound library which wraps around TiMidity++ and a few other sound libraries.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.apple.com/ilife/garageband/&#xD;&#xA;  [2]: http://www.propellerheads.se/products/reason/&#xD;&#xA;  [3]: http://timidity.sourceforge.net/&#xD;&#xA;  [4]: http://www.libsdl.org/&#xD;&#xA;  [5]: http://www.libsdl.org/projects/SDL_mixer/" />
  <row Id="34319" PostHistoryTypeId="2" PostId="15177" RevisionGUID="ffc665f1-acb0-4259-a11b-3ef0ea9754f9" CreationDate="2011-07-25T03:29:32.963" UserId="853" Text="I have a object in my game that when the main character hits it, all I want to do is have the object explode and then notify the character object that a hit has occurred. &#xD;&#xA;&#xD;&#xA;Would I use a b2Body and set it as a sensor for this or would I achieve this some other way? &#xD;&#xA;&#xD;&#xA;I'm using cocos2d by the way. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="34320" PostHistoryTypeId="1" PostId="15177" RevisionGUID="ffc665f1-acb0-4259-a11b-3ef0ea9754f9" CreationDate="2011-07-25T03:29:32.963" UserId="853" Text="Would a box2D sensor fit my needs?" />
  <row Id="34321" PostHistoryTypeId="3" PostId="15177" RevisionGUID="ffc665f1-acb0-4259-a11b-3ef0ea9754f9" CreationDate="2011-07-25T03:29:32.963" UserId="853" Text="&lt;box2d&gt;" />
  <row Id="34322" PostHistoryTypeId="25" PostId="15017" RevisionGUID="3939cea4-4ba9-4387-8c0c-afedff488727" CreationDate="2011-07-25T03:32:21.767" Comment="http://twitter.com/#!/StackGameDev/status/95335552097861632" />
  <row Id="34323" PostHistoryTypeId="2" PostId="15178" RevisionGUID="a2c16cde-78c5-458e-afc1-0a5bf0d80a2a" CreationDate="2011-07-25T03:57:53.480" UserId="45" Text="Yes, that sounds like something a sensor should be used for.&#xD;&#xA;&#xD;&#xA;As far as I'm aware, sensors should be used for any objects that don't actually cause a collision response with objects it collides with.&#xD;&#xA;&#xD;&#xA;In this case, you don't want the player to actually be moved when it hits the sensor (or the reverse). A sensor is definitely what you want." />
  <row Id="34324" PostHistoryTypeId="2" PostId="15179" RevisionGUID="2510b4bd-c8a7-4286-98c8-27accde58430" CreationDate="2011-07-25T04:06:01.230" UserId="4360" Text="Yes - it would work nicely. Don't forget that you will need to create a ContactListener for your application in order to be notified of the collision.&#xD;&#xA;&#xD;&#xA;Here's an implementation I used from before, to get you started - it might need some tweeks due to being a year old&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	#import &quot;Box2D.h&quot;&#xD;&#xA;	#import &quot;b2Contact.h&quot;&#xD;&#xA;	class ContactListener : public b2ContactListener&#xD;&#xA;	{&#xD;&#xA;	public:&#xD;&#xA;		ContactListener();&#xD;&#xA;	 &#xD;&#xA;		void* userData; /// Use this to store application specific body data.&#xD;&#xA;		void BeginContact(b2Contact* contact); // When we first contact&#xD;&#xA;		void EndContact(b2Contact* contact); // When we end contact&#xD;&#xA;	};&#xD;&#xA;	&#xD;&#xA;	#import &quot;ContactListener.h&quot;&#xD;&#xA;	#import &quot;Box2D.h&quot;&#xD;&#xA;	#import &quot;b2Contact.h&quot;&#xD;&#xA;	#import &quot;GameScreen.h&quot;&#xD;&#xA;	 &#xD;&#xA;	// Implement contact listener.&#xD;&#xA;	ContactListener::ContactListener(){};&#xD;&#xA;	 &#xD;&#xA;	void ContactListener::BeginContact(b2Contact* contact)&#xD;&#xA;	{&#xD;&#xA;		// Box2d objects that collided&#xD;&#xA;		b2Fixture* fixtureA = contact-&gt;GetFixtureA();&#xD;&#xA;		b2Fixture* fixtureB = contact-&gt;GetFixtureB();&#xD;&#xA;		// Sprites that collided&#xD;&#xA;		CocosNode* actorA = (CocosNode*) fixtureA-&gt;GetBody()-&gt;GetUserData();&#xD;&#xA;		CocosNode* actorB = (CocosNode*)  fixtureB-&gt;GetBody()-&gt;GetUserData();&#xD;&#xA;	 &#xD;&#xA;		// This is only true if for example a sprite touched something in your box2d simulation that was not a sprite such as the ground&#xD;&#xA;		// You may not want to return here, so keep that in mind&#xD;&#xA;		if(actorA == nil || actorB == nil) return;&#xD;&#xA;	 &#xD;&#xA;		// Information about the collision, such as where it hit exactly on each body &#xD;&#xA;		b2WorldManifold* worldManifold = new b2WorldManifold();&#xD;&#xA;		contact-&gt;GetWorldManifold(worldManifold);&#xD;&#xA;	 &#xD;&#xA;		// Maybe you wanna handle it differently but for this example, we're going to simply use our global object (see previous post)&#xD;&#xA;		// To store the gamescene where these bodies exist and tell it they collided&#xD;&#xA;		[[Global instance]._gameScene onActorDidStartContact:actorA against:actorB at:worldManifold];&#xD;&#xA;	}&#xD;&#xA;	 &#xD;&#xA;		// Implement contact listener.&#xD;&#xA;	void ContactListener::EndContact(b2Contact* contact)&#xD;&#xA;	{&#xD;&#xA;		// Box2d objects that collided&#xD;&#xA;		b2Fixture* fixtureA = contact-&gt;GetFixtureA();&#xD;&#xA;		b2Fixture* fixtureB = contact-&gt;GetFixtureB();&#xD;&#xA;		// Sprites that collided&#xD;&#xA;		CocosNode* actorA = (CocosNode*) fixtureA-&gt;GetBody()-&gt;GetUserData();&#xD;&#xA;		CocosNode* actorB = (CocosNode*)  fixtureB-&gt;GetBody()-&gt;GetUserData();&#xD;&#xA;	 &#xD;&#xA;		// This is only true if for example a sprite touched something in your box2d simulation that was not a sprite such as the ground&#xD;&#xA;		// You may not want to return here, so keep that in mind&#xD;&#xA;		if(actorA == nil || actorB == nil) return;&#xD;&#xA;	 &#xD;&#xA;		// Information about the collision, such as where it hit exactly on each body &#xD;&#xA;		b2WorldManifold* worldManifold = new b2WorldManifold();&#xD;&#xA;		contact-&gt;GetWorldManifold(worldManifold);&#xD;&#xA;	 &#xD;&#xA;		// Maybe you wanna handle it differently but for this example, we're going to simply use our global object (see previous post)&#xD;&#xA;		// To store the gamescene where these bodies exist and tell it they collided&#xD;&#xA;		[[Global instance]._gameScene onActorDidEndContact:actorA against:actorB at:worldManifold];&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	-(void) onBunnyDidLandOnCar:(GameObject*)actor&#xD;&#xA;	{&#xD;&#xA;		 // Nothing to see here, game ended already&#xD;&#xA;		if(self._gameIsOver) return;&#xD;&#xA;		// Cast the actor as the car&#xD;&#xA;		Car* car = (Car*) actor;&#xD;&#xA;		// Check if landing was valid&#xD;&#xA;		if(car._body-&gt;GetPosition().y + 3.0f &gt; _junny._body-&gt;GetPosition().y) { // Too far below the roof of the car to count as landing on it&#xD;&#xA;			//NSLog(@&quot;onJunnyDidLandOnCar: Too far below&quot;);&#xD;&#xA;			return; &#xD;&#xA;	 &#xD;&#xA;	// Do some other stuff&#xD;&#xA;	...&#xD;&#xA;	}" />
  <row Id="34325" PostHistoryTypeId="2" PostId="15180" RevisionGUID="0c49233a-cac7-404c-a862-1fa0d1e40b6f" CreationDate="2011-07-25T05:31:07.600" UserId="7662" Text="So after a few hours of searching on the internet, I have yet to find a pleasing answer on how to handle moving platforms in a 2d platform game. So I decided to make a simple prototype where you interact with 2 different platforms, one that moves vertically and one horizontally. I would love some help to dissect and see what isn't working, and how to fix them. I have submitted the .fla file + .as file below, accompanied with a link to the playable .swf. &#xD;&#xA;&#xD;&#xA;The goal is to make the Hero interact with the platforms as if they were solid objects that he can stand on, pushed alongside with, jump on/under etc etc. &#xD;&#xA;&#xD;&#xA;The problems with my prototype are these:&#xD;&#xA;&#xD;&#xA;* When you stand on the horizontally moving platform, without moving (not touching any keys), the Hero moves along with platform, **but with a slight delay** causing hero to slide back a little.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* When you stand on the horizontally moving platform, and jump, you move along with the platform midair (some games prefer having it like this, but it doesn't feel natural and is not wanted here). Which might be caused by the Hero retaining the velocity on the X-axis from the platform.&#xD;&#xA;&#xD;&#xA;* When you jump up to the bottom side on the vertically moving platform, whilst the platform is moving downwards, you sink inside it for a brief second. Hero penetrates through as if the collision was non existent for a moment.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* When you jump on vertically moving platform, the veloctiy on Y-axis is retained, so when you walk off the platform, you fall down at a higher speed. With the speed of the retained velocity, + gravity that is added (this is mostly because I cant figure out a way to reset velocity on Y-axis to 0 when you land on the platform, *without* the player freezing midair).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm a novice programmer so I am sure there are BETTER ways to do this, and I would love to hear them all. Any ideas on how to improve the code or other methods in which you can implement moving platforms into a Tilebased game are welcome. In the end, I am trying to find a solid way to handle moving platforms in 2d platformers.&#xD;&#xA;&#xD;&#xA;Playable SWF:  http://dl.dropbox.com/u/28271061/PlatformerhowtoFLA.html&#xD;&#xA;&#xD;&#xA;Sourcecode AS-file: http://dl.dropbox.com/u/28271061/Platformerhowto.as&#xD;&#xA;&#xD;&#xA;SourcefileFLA:  http://dl.dropbox.com/u/28271061/PlatformerhowtoFLA.fla&#xD;&#xA;&#xD;&#xA;If you prefer just to read the code through Pastie online: http://pastie.org/2266764&#xD;&#xA;&#xD;&#xA;Thanks in advance guys!&#xD;&#xA;" />
  <row Id="34326" PostHistoryTypeId="1" PostId="15180" RevisionGUID="0c49233a-cac7-404c-a862-1fa0d1e40b6f" CreationDate="2011-07-25T05:31:07.600" UserId="7662" Text="[AS3] How to make moving platforms in tilebased games?" />
  <row Id="34327" PostHistoryTypeId="3" PostId="15180" RevisionGUID="0c49233a-cac7-404c-a862-1fa0d1e40b6f" CreationDate="2011-07-25T05:31:07.600" UserId="7662" Text="&lt;physics&gt;&lt;platform-games&gt;&lt;actionscript&gt;&lt;moving-platforms&gt;" />
  <row Id="34328" PostHistoryTypeId="25" PostId="15177" RevisionGUID="193a2c49-cf0f-48c7-ac65-b30084e752dd" CreationDate="2011-07-25T06:32:21.337" Comment="http://twitter.com/#!/StackGameDev/status/95380850832719873" />
  <row Id="34329" PostHistoryTypeId="5" PostId="15180" RevisionGUID="794a9ffe-c8a8-4951-b4f0-21e3ab473ae7" CreationDate="2011-07-25T06:48:28.440" UserId="20" Comment="removed &quot;tag&quot; from title. Added AS-3 Tag" Text="So after a few hours of searching on the internet, I have yet to find a pleasing answer on how to handle moving platforms in a 2d platform game. So I decided to make a simple prototype where you interact with 2 different platforms, one that moves vertically and one horizontally. I would love some help to dissect and see what isn't working, and how to fix them. I have submitted the .fla file + .as file below, accompanied with a link to the playable .swf. &#xD;&#xA;&#xD;&#xA;The goal is to make the Hero interact with the platforms as if they were solid objects that he can stand on, pushed alongside with, jump on/under etc etc. &#xD;&#xA;&#xD;&#xA;The problems with my prototype are these:&#xD;&#xA;&#xD;&#xA;* When you stand on the horizontally moving platform, without moving (not touching any keys), the Hero moves along with platform, **but with a slight delay** causing hero to slide back a little.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* When you stand on the horizontally moving platform, and jump, you move along with the platform midair (some games prefer having it like this, but it doesn't feel natural and is not wanted here). Which might be caused by the Hero retaining the velocity on the X-axis from the platform.&#xD;&#xA;&#xD;&#xA;* When you jump up to the bottom side on the vertically moving platform, whilst the platform is moving downwards, you sink inside it for a brief second. Hero penetrates through as if the collision was non existent for a moment.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* When you jump on vertically moving platform, the veloctiy on Y-axis is retained, so when you walk off the platform, you fall down at a higher speed. With the speed of the retained velocity, + gravity that is added (this is mostly because I cant figure out a way to reset velocity on Y-axis to 0 when you land on the platform, *without* the player freezing midair).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm a novice programmer so I am sure there are BETTER ways to do this, and I would love to hear them all. Any ideas on how to improve the code or other methods in which you can implement moving platforms into a Tilebased game are welcome. In the end, I am trying to find a solid way to handle moving platforms in 2d platformers.&#xD;&#xA;&#xD;&#xA;Playable SWF:  http://dl.dropbox.com/u/28271061/PlatformerhowtoFLA.html&#xD;&#xA;&#xD;&#xA;Sourcecode AS-file: http://dl.dropbox.com/u/28271061/Platformerhowto.as&#xD;&#xA;&#xD;&#xA;SourcefileFLA:  http://dl.dropbox.com/u/28271061/PlatformerhowtoFLA.fla&#xD;&#xA;&#xD;&#xA;If you prefer just to read the code through Pastie online: http://pastie.org/2266764&#xD;&#xA;" />
  <row Id="34330" PostHistoryTypeId="4" PostId="15180" RevisionGUID="794a9ffe-c8a8-4951-b4f0-21e3ab473ae7" CreationDate="2011-07-25T06:48:28.440" UserId="20" Comment="removed &quot;tag&quot; from title. Added AS-3 Tag" Text="How to make moving platforms in tilebased games?" />
  <row Id="34331" PostHistoryTypeId="6" PostId="15180" RevisionGUID="794a9ffe-c8a8-4951-b4f0-21e3ab473ae7" CreationDate="2011-07-25T06:48:28.440" UserId="20" Comment="removed &quot;tag&quot; from title. Added AS-3 Tag" Text="&lt;physics&gt;&lt;actionscript-3&gt;&lt;platform-games&gt;&lt;moving-platforms&gt;" />
  <row Id="34332" PostHistoryTypeId="2" PostId="15181" RevisionGUID="ee6d6340-430a-49c6-9dc9-2383f9ae924c" CreationDate="2011-07-25T07:12:06.730" UserId="1588" Text="I use collisions based on rectangles. Both sprites need a .rect assigned to them.&#xD;&#xA;&#xD;&#xA;Then check for a collision&#xD;&#xA;&#xD;&#xA; - pygame.sprite.collide_rect(A, B)&#xD;&#xA;&#xD;&#xA;  (returns a boolean if there is a collision)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively you can use the rectangle to check for a collision, eg&#xD;&#xA;&#xD;&#xA; - A.rect.colliderect(B.rect)&#xD;&#xA;&#xD;&#xA;  (returns a boolean if there is a collision)&#xD;&#xA;&#xD;&#xA;I use rect collisions because they're faster than bitmap checks.&#xD;&#xA;&#xD;&#xA;Pygame rect docs http://www.pygame.org/docs/ref/rect.html&#xD;&#xA;" />
  <row Id="34335" PostHistoryTypeId="2" PostId="15183" RevisionGUID="6c0eecd7-7783-4503-9870-581fbb98ac24" CreationDate="2011-07-25T09:00:50.003" UserId="7466" Text="I'm curious about how this sort of animation is typically done code-wise.&#xD;&#xA;&#xD;&#xA;A few examples:&#xD;&#xA;&#xD;&#xA; * A character picks something up - only hand is animated towards the target&#xD;&#xA;http://www.youtube.com/watch?v=rW-7uatehx4 see from 4:50 when the player picks up the weapon.&#xD;&#xA; * Character hangs from a ledge - hands are set to a specific location(the ledge)&#xD;&#xA;http://www.youtube.com/watch?v=SOiwArn4Bmw right at the beginning.&#xD;&#xA; * Character looks at something - head is pointed at the target(npc looks at the pc)" />
  <row Id="34336" PostHistoryTypeId="1" PostId="15183" RevisionGUID="6c0eecd7-7783-4503-9870-581fbb98ac24" CreationDate="2011-07-25T09:00:50.003" UserId="7466" Text="How to dynamically animate a part of a 3d model towards something" />
  <row Id="34337" PostHistoryTypeId="3" PostId="15183" RevisionGUID="6c0eecd7-7783-4503-9870-581fbb98ac24" CreationDate="2011-07-25T09:00:50.003" UserId="7466" Text="&lt;3d&gt;&lt;animation&gt;&lt;models&gt;&lt;3d-meshes&gt;&lt;blending&gt;" />
  <row Id="34338" PostHistoryTypeId="5" PostId="15177" RevisionGUID="0db839a7-9781-40a3-b10a-be2925f3cc7e" CreationDate="2011-07-25T09:19:44.323" UserId="1156" Comment="added 2 characters in body; edited tags" Text="I have a object in my game that when the main character hits it, all I want to do is have the object explode and then notify the character object that a hit has occurred. &#xD;&#xA;&#xD;&#xA;Would I use a `b2Body` and set it as a sensor for this or would I achieve this some other way? &#xD;&#xA;&#xD;&#xA;I'm using cocos2d by the way. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="34339" PostHistoryTypeId="6" PostId="15177" RevisionGUID="0db839a7-9781-40a3-b10a-be2925f3cc7e" CreationDate="2011-07-25T09:19:44.323" UserId="1156" Comment="added 2 characters in body; edited tags" Text="&lt;box2d&gt;&lt;cocos2d&gt;" />
  <row Id="34340" PostHistoryTypeId="25" PostId="15180" RevisionGUID="79b5406a-c5f1-4d38-a586-59c81d1ae216" CreationDate="2011-07-25T09:32:22.667" Comment="http://twitter.com/#!/StackGameDev/status/95426153388572673" />
  <row Id="34341" PostHistoryTypeId="2" PostId="15184" RevisionGUID="caf1c8f2-bfba-487d-9dd4-74fa59fd854c" CreationDate="2011-07-25T09:44:10.720" UserId="8827" Text="This is called inverse kinematics. Google is probably your best friend on this one as it can get complex." />
  <row Id="34343" PostHistoryTypeId="2" PostId="15185" RevisionGUID="33289fae-6c1b-4168-a553-f28dcb306656" CreationDate="2011-07-25T09:50:17.993" UserId="8834" Text="It looks like they implemented some kind of screen-space reflections. The idea (and rough implementation) was posted on beyond3d forums:&#xD;&#xA;&#xD;&#xA;http://forum.beyond3d.com/showthread.php?t=56095" />
  <row Id="34347" PostHistoryTypeId="4" PostId="15180" RevisionGUID="eb2c3264-cce0-48f9-a0c9-ac0343c6fed2" CreationDate="2011-07-25T10:39:09.263" UserId="2698" Comment="This isn't a tilebased game. Better title, that doesn't clash with question #3964 (linked in comments)" Text="How to handle physics of moving platforms in a platformer?" />
  <row Id="34348" PostHistoryTypeId="24" PostId="15180" RevisionGUID="eb2c3264-cce0-48f9-a0c9-ac0343c6fed2" CreationDate="2011-07-25T10:39:09.263" Comment="Proposed by 2698 approved by 7662 edit id of 578" />
  <row Id="34349" PostHistoryTypeId="5" PostId="15180" RevisionGUID="d3ab94a8-a725-4460-a78a-be5165c0dd24" CreationDate="2011-07-25T10:39:45.580" UserId="7662" Comment="added 56 characters in body" Text="So after a few hours of searching on the internet, I have yet to find a pleasing answer on how to handle moving platforms in a 2d platform game. So I decided to make a simple prototype where you interact with 2 different platforms, one that moves vertically and one horizontally. I would love some help to dissect and see what isn't working, and how to fix them. I have submitted the .fla file + .as file below, accompanied with a link to the playable .swf. &#xD;&#xA;&#xD;&#xA;The goal is to make the Hero interact with the platforms as if they were solid objects that he can stand on, pushed alongside with, jump on/under etc etc. &#xD;&#xA;&#xD;&#xA;The problems with my prototype are these:&#xD;&#xA;&#xD;&#xA;* When you stand on the horizontally moving platform, without moving (not touching any keys), the Hero moves along with platform, **but with a slight delay** causing hero to slide back a little.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* When you stand on the horizontally moving platform, and jump, you move along with the platform midair (some games prefer having it like this, but it doesn't feel natural and is not wanted here). Which might be caused by the Hero retaining the velocity on the X-axis from the platform.&#xD;&#xA;&#xD;&#xA;* When you jump up to the bottom side on the vertically moving platform, whilst the platform is moving downwards, you sink inside it for a brief second. Hero penetrates through as if the collision was non existent for a moment.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* When you jump on vertically moving platform, the veloctiy on Y-axis is retained, so when you walk off the platform, you fall down at a higher speed. With the speed of the retained velocity, + gravity that is added (this is mostly because I cant figure out a way to reset velocity on Y-axis to 0 when you land on the platform, *without* the player freezing midair).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm a novice programmer so I am sure there are BETTER ways to do this, and I would love to hear them all. Any ideas on how to improve the code or other methods in which you can implement moving platforms into a Tilebased game are welcome. In the end, I am trying to find a solid way to handle moving platforms in 2d platformers.&#xD;&#xA;&#xD;&#xA;Playable SWF:  http://dl.dropbox.com/u/28271061/PlatformerhowtoFLA.html (Move with arrow keys, Jump with X key, Run with Z key)&#xD;&#xA;&#xD;&#xA;Sourcecode AS-file: http://dl.dropbox.com/u/28271061/Platformerhowto.as&#xD;&#xA;&#xD;&#xA;SourcefileFLA:  http://dl.dropbox.com/u/28271061/PlatformerhowtoFLA.fla&#xD;&#xA;&#xD;&#xA;If you prefer just to read the code through Pastie online: http://pastie.org/2266764&#xD;&#xA;" />
  <row Id="34352" PostHistoryTypeId="2" PostId="15188" RevisionGUID="83fed18a-f26a-4d87-8db5-d4f2921c6e3d" CreationDate="2011-07-25T11:36:44.080" UserId="1101" Text="I'm not sure every platform does have a complete set of General MIDI instruments, or an engine with which to play them, and if they did, I expect a lot of them would sound as bad as they did 10 years ago." />
  <row Id="34353" PostHistoryTypeId="2" PostId="15189" RevisionGUID="ea75f361-b28f-419e-ac1b-4d8f3cd919ab" CreationDate="2011-07-25T11:45:15.510" UserId="1101" Text="&gt; since this is a very common problem, I wonder if there is an established pattern that elegantly solves this problem that I failed to find.&#xD;&#xA;&#xD;&#xA;Usually people do not attempt to perform run-time scaling in 2D games. I don't agree that it's a common problem. If people want a mini-map or some other fixed rescaling, there is often a new set of graphics done for this purpose. It's rare that you need any single routine to run at 2 different zoom levels in a 2D game.&#xD;&#xA;&#xD;&#xA;If you use a 3D API, you can get this functionality for free - just change the camera/viewport parameters.&#xD;&#xA;&#xD;&#xA;PyGame is a very old API and unfortunately is only really suited to 2D. Even if you could work out adequate scaling systems for the different zoom levels, the performance will not be good enough and the appearance is likely to be unacceptably bad.&#xD;&#xA;&#xD;&#xA;I would advise that if you want to zoom in and out a lot, you move to a modern 3D API as soon as possible. I would recommend [pyglet][1] but there are likely to be others too.&#xD;&#xA;&#xD;&#xA;[1]: http://www.pyglet.org/" />
  <row Id="34354" PostHistoryTypeId="25" PostId="15183" RevisionGUID="78ce7c5f-f81a-490b-ac3a-64a1c2d9f619" CreationDate="2011-07-25T12:32:22.380" Comment="http://twitter.com/#!/StackGameDev/status/95471451582377984" />
  <row Id="34355" PostHistoryTypeId="2" PostId="15190" RevisionGUID="eccf5985-2f30-4cfb-b88f-923219f76919" CreationDate="2011-07-25T12:37:32.030" UserId="2698" Text="To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34356" PostHistoryTypeId="5" PostId="15190" RevisionGUID="260a3b6f-daf5-44f0-8fe0-17c2762ced60" CreationDate="2011-07-25T13:02:18.780" UserId="2698" Comment="Added collision detection solution" Text="Let's separate your problem into 3 different issues.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset gravity to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;I haven't taken a serious look at a solution for this one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34357" PostHistoryTypeId="2" PostId="15191" RevisionGUID="db8d807f-d4f5-4441-ac76-5d08dfcdc803" CreationDate="2011-07-25T13:18:57.220" UserId="1929" Text="Is there a well-known way (or perhaps reusable bit of code) for pixel-perfect collision detection in XNA?&#xD;&#xA;&#xD;&#xA;I assume this would also use polygons (boxes/triangles/circles) for a first-pass, quick-test for collisions, and if that test indicated a collision, it would then search for a per-pixel collision.&#xD;&#xA;&#xD;&#xA;This can be complicated, because we have to account for scale, rotation, and transparency." />
  <row Id="34358" PostHistoryTypeId="1" PostId="15191" RevisionGUID="db8d807f-d4f5-4441-ac76-5d08dfcdc803" CreationDate="2011-07-25T13:18:57.220" UserId="1929" Text="Pixel-Perfect Collision Detection in XNA" />
  <row Id="34359" PostHistoryTypeId="3" PostId="15191" RevisionGUID="db8d807f-d4f5-4441-ac76-5d08dfcdc803" CreationDate="2011-07-25T13:18:57.220" UserId="1929" Text="&lt;xna&gt;&lt;2d&gt;&lt;collision-detection&gt;" />
  <row Id="34360" PostHistoryTypeId="5" PostId="15190" RevisionGUID="bc9965d7-272c-4aa7-b61e-9d51af039f57" CreationDate="2011-07-25T13:27:01.660" UserId="2698" Comment="A word on code quality" Text="Let's separate your problem into 3 different issues.&#xD;&#xA;&#xD;&#xA;## A word on code quality&#xD;&#xA;&#xD;&#xA;Your code currently has your platforms directly controlling your player's velocity _and even the world's gravity constant_. It's hacky, and it's procedural when it should be object-oriented. Once you start expanding this game things are going to get ugly _fast_.&#xD;&#xA;&#xD;&#xA;You need to refactor your code. Implement a player class, a platform class and a floor class. Separate their concerns: have the player interpret keyboard controls and control how he runs and jumps, and have the platforms _alter_ his momentum as necessary (by adding their own speed to the player's already-determined speed, when necessary).&#xD;&#xA;&#xD;&#xA;This may deserve a separate topic as it's quite a separate issue from everything you've brought up. However, you're going to have to do it at some point.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;Note: You may have some difficulty implementing jSepia's solution before your code is refactored.&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset gravity to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;I haven't taken a serious look at a solution for this one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34361" PostHistoryTypeId="5" PostId="15190" RevisionGUID="836a6dac-888e-4870-894a-809d41e0e453" CreationDate="2011-07-25T13:36:26.830" UserId="2698" Comment="Solved slipping side-to-side" Text="Let's separate your problem into its distinct issues...&#xD;&#xA;&#xD;&#xA;## A word on code quality&#xD;&#xA;&#xD;&#xA;Your code currently has your platforms directly controlling your player's velocity _and even the world's gravity constant_. It's hacky, and it's procedural when it should be object-oriented. Once you start expanding this game things are going to get ugly _fast_.&#xD;&#xA;&#xD;&#xA;You need to refactor your code. Implement a player class, a platform class and a floor class. Separate their concerns: have the player interpret keyboard controls and control how he runs and jumps, and have the platforms _alter_ his momentum as necessary (by adding their own speed to the player's already-determined speed, when necessary).&#xD;&#xA;&#xD;&#xA;This may deserve a separate topic as it's quite a separate issue from everything you've brought up. However, you're going to have to do it at some point.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;Note: You may have some difficulty implementing jSepia's solution before your code is refactored.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;Your player isn't actually moved horizontally quite as fast as the platform moves him. It's not obvious to me why, but this solution would _also_ be solved by implementing jSepia's solution. There'd quite simply be no way for this to happen.&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset gravity to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34368" PostHistoryTypeId="2" PostId="15192" RevisionGUID="a56176eb-3766-44be-af6e-504cf78fd544" CreationDate="2011-07-25T13:54:32.573" UserId="8844" Text="I've been thinking about a multi player RTS game. The part that I can't seem to get around is keeping unit movement synced. If I move unit A to spot XY, I have to communicate that back to server that relays to the other client.&#xD;&#xA;&#xD;&#xA;I'm curious what the communications would look like. Would you just communicate to the server that I'm moving unit A to XY from JZ? Maybe you need to communicate movement coord by coord instead? What's the most efficient methodology to communicate movement of units from one client to the other?" />
  <row Id="34369" PostHistoryTypeId="1" PostId="15192" RevisionGUID="a56176eb-3766-44be-af6e-504cf78fd544" CreationDate="2011-07-25T13:54:32.573" UserId="8844" Text="RTS Game Protocol" />
  <row Id="34370" PostHistoryTypeId="3" PostId="15192" RevisionGUID="a56176eb-3766-44be-af6e-504cf78fd544" CreationDate="2011-07-25T13:54:32.573" UserId="8844" Text="&lt;movement&gt;&lt;rts&gt;" />
  <row Id="34371" PostHistoryTypeId="5" PostId="15190" RevisionGUID="c1a7ef76-3d07-4795-bdd5-968fcb6e8149" CreationDate="2011-07-25T14:04:10.863" UserId="2698" Comment="A word on player-centric collision detection" Text="Let's separate your problem into its distinct issues...&#xD;&#xA;&#xD;&#xA;## A word on code quality&#xD;&#xA;&#xD;&#xA;Your code currently has your platforms directly controlling your player's velocity _and even the world's gravity constant_. It's hacky, and it's procedural when it should be object-oriented. Once you start expanding this game things are going to get ugly _fast_.&#xD;&#xA;&#xD;&#xA;You need to refactor your code. Implement a player class, a platform class and a floor class. Separate their concerns: have the player interpret keyboard controls and control how he runs and jumps, and have the platforms _alter_ his momentum as necessary (by adding their own speed to the player's already-determined speed, when necessary).&#xD;&#xA;&#xD;&#xA;Have your player determine where it is in regards to a floor-type object (platforms and floors would both have a `BodyType = BodyTypes.Floor`, or something) and determine on its own where it is in regards to the object, how it should react and whether it's falling or on the ground.&#xD;&#xA;&#xD;&#xA;This may deserve a separate topic as it's quite a separate issue from everything you've brought up. However, you're going to have to do it at some point.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;Note: You may have some difficulty implementing jSepia's solution before your code is refactored.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;Your player isn't actually moved horizontally quite as fast as the platform moves him. It's not obvious to me why, but this solution would _also_ be solved by implementing jSepia's solution. There'd quite simply be no way for this to happen.&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset gravity to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34372" PostHistoryTypeId="2" PostId="15193" RevisionGUID="43aa970e-6cea-46d4-9117-5930c5217ea8" CreationDate="2011-07-25T14:13:48.933" UserId="7217" Text="I've made a TCP-networked RTS, in which I *passed the commands themselves, rather than the results of the commands*.  For instance, a player gives a move order.  If the move order is valid according to that client, it is sent to the server.  The server then sends it back to all clients, who validate and execute it.  &#xD;&#xA;&#xD;&#xA;So all client machines were running the game themselves, the server code just accepted messages and sent them back to all clients.  If a client gave a move order, it wouldn't start executing it until it was received back from the server.  &#xD;&#xA;&#xD;&#xA;The server would send a 'tick' number at which to execute the command as well, which was a few ticks ahead of the 'current' tick.  This way all commands would be executed at the same tick on all machines.&#xD;&#xA;" />
  <row Id="34373" PostHistoryTypeId="5" PostId="15191" RevisionGUID="97528018-6005-4251-9e4b-56a1a15d534a" CreationDate="2011-07-25T14:19:32.207" UserId="1929" Comment="added 260 characters in body" Text="Is there a well-known way (or perhaps reusable bit of code) for pixel-perfect collision detection in XNA?&#xD;&#xA;&#xD;&#xA;I assume this would also use polygons (boxes/triangles/circles) for a first-pass, quick-test for collisions, and if that test indicated a collision, it would then search for a per-pixel collision.&#xD;&#xA;&#xD;&#xA;This can be complicated, because we have to account for scale, rotation, and transparency.&#xD;&#xA;&#xD;&#xA;**Edit:** I'm sure there's an elegant hack solution to this. XNA is effectively 3D, so something as simple as &quot;cast a line through this position at (x, y) and see if it intersects both sprites.&quot; That's the kind of direction of solution I'm looking towards." />
  <row Id="34374" PostHistoryTypeId="5" PostId="15193" RevisionGUID="97592ecc-d335-4464-9706-f10db2864ed2" CreationDate="2011-07-25T14:25:50.977" UserId="7217" Comment="added 557 characters in body" Text="I've made a TCP-networked RTS, in which I **passed the commands themselves, rather than the results of the commands**.  For instance, a player gives a move order.  If the move order is valid according to that client, it is sent to the server.  The server then sends it back to all clients, who validate and execute it.  &#xD;&#xA;&#xD;&#xA;So all client machines run the game themselves, the server code accepts messages and sends them back to all clients.  If a client gives a move order, it won't start executing it until it is received back from the server.  &#xD;&#xA;&#xD;&#xA;The server sends a 'tick' number at which to execute the command as well, which is a few ticks ahead of the 'current' tick.  This way all commands can be executed at the same 'tick' on all machines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One benefit this method is that it doesn't depend on any individual client machine to validate the command.  If I passed the results of the move, I might be able to hack it to move my units faster.  All clients have to execute the same command and if one machine executes it differently, it will be obvious.&#xD;&#xA;&#xD;&#xA;Validating the command client-side before sending it to the server isn't necessary, but in theory it saves network traffic.  I used the same validation code to tell the UI that the move was possible, so it didn't require writing extra code." />
  <row Id="34375" PostHistoryTypeId="5" PostId="15193" RevisionGUID="b0b7a45a-ef1f-41fd-996b-dd87c4c8b9f2" CreationDate="2011-07-25T14:35:39.077" UserId="7217" Comment="added 557 characters in body" Text="I've made a TCP-networked RTS, in which I **passed the commands themselves, rather than the results of the commands**.  For instance, a player gives a move order.  If the move order is valid according to that client, it is sent to the server.  The server then sends it back to all clients, who validate and execute it.  &#xD;&#xA;&#xD;&#xA;So all client machines run the game themselves, the server code accepts messages and sends them back to all clients.  If a client gives a move order, it won't start executing it until it is received back from the server.  &#xD;&#xA;&#xD;&#xA;The server sends a 'tick' number at which to execute the command as well, which is a few ticks ahead of the 'current' tick.  This way all commands can be executed at the same 'tick' on all machines.&#xD;&#xA;&#xD;&#xA;One benefit this method is that it doesn't depend on any individual client machine to validate the command.  If I passed the results of the move, I might be able to hack it to move my units faster.  All clients have to execute the same command and if one machine executes it differently, it will be obvious.&#xD;&#xA;&#xD;&#xA;Validating the command client-side before sending it to the server isn't necessary, but in theory it saves network traffic.  I used the same validation code to tell the UI that the move was possible, so it didn't require writing extra code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As for what the messages might look like.  I wasn't concerned with ultra efficiency as it was my first networked game.  I passed commands as strings.  The commands would be formatted like this: `&quot;&lt;player_id&gt;:&lt;command&gt;:&lt;parameters&gt;&quot;`&#xD;&#xA;&#xD;&#xA;For a contrived example, a move command might look like this:  `&quot;3:move:522:100:200&quot;`.  This means Player `3` wants to `move` unit `522` to (`100`,`200`).  &#xD;&#xA;&#xD;&#xA;The server passes the command on to all clients, including the one who sent it, with a tick number attached like this: `&quot;153238:3:move:522:100:200&quot;`.  &#xD;&#xA;&#xD;&#xA;Then the clients would all execute this command when tick 153238 is executed." />
  <row Id="34376" PostHistoryTypeId="2" PostId="15194" RevisionGUID="f640a8b4-466f-4793-bbdc-7f74299291cc" CreationDate="2011-07-25T14:53:04.280" UserId="8847" Text="I'm starting work on a 2D Android game where the player will put their finger on a game piece and do a fling gesture to throw the piece across the gameboard.&#xD;&#xA;&#xD;&#xA;I've gone through some Android interpolation animation tutorials and have the fling working, and the game piece (currently the only item on the board) moving almost as intended.&#xD;&#xA;&#xD;&#xA;However, I'm utterly flumoxed as to how I would work collision detection into this, as it seems to me that the fling gesture, and the resulting movement of the piece is a complete, uninterruptable action.&#xD;&#xA;&#xD;&#xA;Are there any existing Android resources that implement 2D ball physics whilst also allowing things to be moved by flinging?  The next move in the game would only be made once all game pieces had come to rest, so it's only the initial action that requires the fling.&#xD;&#xA;&#xD;&#xA;Failing that, could someone kindly point out some good resources that might be relevant to my question?  My Google hunting has pretty much just liquified my brain." />
  <row Id="34377" PostHistoryTypeId="1" PostId="15194" RevisionGUID="f640a8b4-466f-4793-bbdc-7f74299291cc" CreationDate="2011-07-25T14:53:04.280" UserId="8847" Text="Android Fling Gesture, Animation And Collision - Resources?" />
  <row Id="34378" PostHistoryTypeId="3" PostId="15194" RevisionGUID="f640a8b4-466f-4793-bbdc-7f74299291cc" CreationDate="2011-07-25T14:53:04.280" UserId="8847" Text="&lt;collision-detection&gt;&lt;android&gt;&lt;2d-physics&gt;&lt;animation&gt;" />
  <row Id="34379" PostHistoryTypeId="5" PostId="15190" RevisionGUID="9936a003-9316-4501-b461-6019c4c56e2c" CreationDate="2011-07-25T14:53:15.160" UserId="2698" Comment="deleted 9 characters in body" Text="Let's separate your problem into its distinct issues...&#xD;&#xA;&#xD;&#xA;## A word on code quality&#xD;&#xA;&#xD;&#xA;Your code currently has your platforms directly controlling your player's velocity _and even the world's gravity constant_. It's hacky, and it's procedural when it should be object-oriented. Once you start expanding this game things are going to get ugly _fast_.&#xD;&#xA;&#xD;&#xA;You need to refactor your code. Implement a player class, a platform class and a floor class. Separate their concerns: have the player interpret keyboard controls and control how he runs and jumps, and have the platforms _alter_ his momentum as necessary (by adding their own speed to the player's already-determined speed, when necessary).&#xD;&#xA;&#xD;&#xA;Have your player determine where it is in regards to a floor-type object (platforms and floors would both have a `BodyType = BodyTypes.Floor`, or something) and determine on its own where it is in regards to the object, how it should react and whether it's falling or on the ground.&#xD;&#xA;&#xD;&#xA;This may deserve a separate topic as it's quite a separate issue from everything you've brought up. However, you're going to have to do it at some point.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;Note: You may have some difficulty implementing jSepia's solution before your code is refactored.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;Your player isn't actually moved horizontally quite as fast as the platform moves. It's not obvious to me why. This problem would _also_ be solved by implementing jSepia's solution. There'd quite simply be no way for this to happen.&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset gravity to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34380" PostHistoryTypeId="5" PostId="15192" RevisionGUID="1544c4d6-13fe-416e-8552-2a6719c45d8c" CreationDate="2011-07-25T14:53:51.977" UserId="8844" Comment="added 664 characters in body" Text="I've been thinking about a multi player RTS game. The part that I can't seem to get around is keeping unit movement synced. If I move unit A to spot XY, I have to communicate that back to server that relays to the other client.&#xD;&#xA;&#xD;&#xA;I'm curious what the communications would look like. Would you just communicate to the server that I'm moving unit A to XY from JZ? Maybe you need to communicate movement coord by coord instead? What's the most efficient methodology to communicate movement of units from one client to the other?&#xD;&#xA;&#xD;&#xA;***EDIT***&#xD;&#xA;&#xD;&#xA;This is a reposted question from stackoverflow.  I found that this site was probably a better place for the question.  &#xD;&#xA;&#xD;&#xA;One of the better answers from that post:&#xD;&#xA;&#xD;&#xA;I assume you're intending to use the Client-Server networking paradigm? In which case you cannot trust the clients to handle the actual positioning of units, you must delegate that task to the server. You then take the command list from each client per-tick, and compute the movement of each unit, once this has been completed, next tick you relay the position of each unit relevant to each client (either on a whole-map basis, or per-view basis), and start the process again.&#xD;&#xA;" />
  <row Id="34382" PostHistoryTypeId="16" PostId="14941" RevisionGUID="0d1032ea-9d5d-4173-8b5d-5b0d6a009e84" CreationDate="2011-07-25T15:08:09.490" UserId="14" />
  <row Id="34383" PostHistoryTypeId="16" PostId="14942" RevisionGUID="2513cea8-0245-45ea-9e1b-36f97edbdf23" CreationDate="2011-07-25T15:08:09.490" UserId="14" />
  <row Id="34384" PostHistoryTypeId="16" PostId="15175" RevisionGUID="ac71609c-f172-41fc-a21c-591d4aefd5db" CreationDate="2011-07-25T15:08:09.490" UserId="14" />
  <row Id="34385" PostHistoryTypeId="5" PostId="15190" RevisionGUID="9ae42bb4-4e85-4e33-919c-f36ad576b8d0" CreationDate="2011-07-25T15:19:50.923" UserId="2698" Comment="added 42 characters in body" Text="Let's separate your problem into its distinct issues...&#xD;&#xA;&#xD;&#xA;## A word on code quality&#xD;&#xA;&#xD;&#xA;Your code currently has your platforms directly controlling your player's velocity _and even the world's gravity constant_. It's hacky, and it's procedural when it should be object-oriented. Once you start expanding this game things are going to get ugly _fast_.&#xD;&#xA;&#xD;&#xA;You need to refactor your code. Implement a player class, a platform class and a floor class. Separate their concerns: have the player interpret keyboard controls and control how he runs and jumps, and have the platforms _alter_ his momentum as necessary (by adding their own speed to the player's already-determined speed, when necessary).&#xD;&#xA;&#xD;&#xA;Have your player determine where it is in regards to a floor-type object (platforms and floors would both have a `BodyType = BodyTypes.Floor`, or something) and determine on its own where it is in regards to the object, how it should react and whether it's falling or on the ground.&#xD;&#xA;&#xD;&#xA;This may deserve a separate topic as it's quite a separate issue from everything you've brought up. However, you're going to have to do it at some point.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;Note: You may have some difficulty implementing jSepia's solution before your code is refactored.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;Your player isn't actually moved horizontally quite as fast as the platform moves. It's not obvious to me why. This problem would _also_ probably be solved by implementing jSepia's solution and properly refactoring your code (the latter would simply make the cause obvious).&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset gravity to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34386" PostHistoryTypeId="25" PostId="15192" RevisionGUID="9ea2bd0d-8125-439d-8708-97404e9c1d5f" CreationDate="2011-07-25T15:32:22.720" Comment="http://twitter.com/#!/StackGameDev/status/95516750627606528" />
  <row Id="34387" PostHistoryTypeId="2" PostId="15195" RevisionGUID="b7f65d4b-dcf9-4874-8882-a01a0aa1b58a" CreationDate="2011-07-25T16:05:12.180" UserId="4894" Text="The default Fling and  Animations provided by the Android API are there for common animations. Here, you wan't something quite specific so I would suggest using a Fling detection as an input in a Physic simulation engine. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="34388" PostHistoryTypeId="2" PostId="15196" RevisionGUID="a9968107-c261-42f8-86f0-d5d9c5509e3d" CreationDate="2011-07-25T16:52:12.823" UserId="2061" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to sit around and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing you can do:  eliminate the server. This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][2] (P2P), and is what most RTS's use.&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands - you're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][1].&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game" />
  <row Id="34389" PostHistoryTypeId="2" PostId="15197" RevisionGUID="8d2e6ca0-6ed1-4313-b88b-4455b2cf0c60" CreationDate="2011-07-25T16:53:06.300" UserId="5006" Text="I'm creating a turn-based game that I'd like to integrate into Facebook.  Players may not necessarily be playing in real time so having a way for them to know when it's their turn is desirable.&#xD;&#xA;&#xD;&#xA;I was initially thinking facebook notifications, but it appears that has been deprecated:&#xD;&#xA;http://stackoverflow.com/questions/4619164/how-to-send-a-facebook-notification-through-their-api&#xD;&#xA;&#xD;&#xA;The alternatives don't sound terribly pleasant (writing on their wall, or having the player that just finished their turn send a request)&#xD;&#xA;&#xD;&#xA;Are there any better alternatives?" />
  <row Id="34390" PostHistoryTypeId="1" PostId="15197" RevisionGUID="8d2e6ca0-6ed1-4313-b88b-4455b2cf0c60" CreationDate="2011-07-25T16:53:06.300" UserId="5006" Text="Best way to notify a user on Facebook that it's their turn to act" />
  <row Id="34391" PostHistoryTypeId="3" PostId="15197" RevisionGUID="8d2e6ca0-6ed1-4313-b88b-4455b2cf0c60" CreationDate="2011-07-25T16:53:06.300" UserId="5006" Text="&lt;facebook&gt;&lt;notifications&gt;" />
  <row Id="34392" PostHistoryTypeId="2" PostId="15198" RevisionGUID="42e7f467-70fd-4021-84fa-d044cac472c2" CreationDate="2011-07-25T17:15:15.123" UserId="7224" Text="I'm looking for spritesheets for classic retro games, and old home computer games (c64, amiga etc.) Does anyone know of a source online?" />
  <row Id="34393" PostHistoryTypeId="1" PostId="15198" RevisionGUID="42e7f467-70fd-4021-84fa-d044cac472c2" CreationDate="2011-07-25T17:15:15.123" UserId="7224" Text="Anyone know of an online resource with spritesheets from classic games?" />
  <row Id="34394" PostHistoryTypeId="3" PostId="15198" RevisionGUID="42e7f467-70fd-4021-84fa-d044cac472c2" CreationDate="2011-07-25T17:15:15.123" UserId="7224" Text="&lt;2d&gt;&lt;graphics&gt;&lt;sprites&gt;&lt;spritesheet&gt;" />
  <row Id="34395" PostHistoryTypeId="5" PostId="15196" RevisionGUID="6a288fee-c106-40c9-b188-674ffd7bd2b1" CreationDate="2011-07-25T17:18:08.373" UserId="2061" Comment="added 1178 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to sit around and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing you can do:  eliminate the server. This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][2] (P2P), and is what most RTS's use.&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands - you're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][1].&#xD;&#xA;&#xD;&#xA;Here are a few more things to know when writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][3] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as Windows/PC) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][4]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is [out of][5] [the question][6]!  In this case, you may be better off using client-server.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;[5]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;[6]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18" />
  <row Id="34396" PostHistoryTypeId="5" PostId="15196" RevisionGUID="133d203a-228e-41eb-8a47-d4def76795ac" CreationDate="2011-07-25T17:27:53.683" UserId="2061" Comment="added 80 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to slow down and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing that is usually done:  **eliminate the server altogether**. Have every client send their commands to every other client.  This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][2] (P2P).&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands.  You're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][1].&#xD;&#xA;&#xD;&#xA;Here are a few more tips for writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][3] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as Windows/PC) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][4]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is out of the question *(see [here][5], [here][6], and [here][7])*!  In that case, you may be better off using client-server.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;[5]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;[6]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18&#xD;&#xA;[7]: http://stackoverflow.com/q/6683059/238419" />
  <row Id="34397" PostHistoryTypeId="5" PostId="15196" RevisionGUID="14e4f172-8c3a-4dcf-86ac-b2acc2f0e2f0" CreationDate="2011-07-25T17:34:07.420" UserId="2061" Comment="added 4 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to slow down and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing that is usually done:  **eliminate the server altogether**. Have every client send their commands to every other client.  This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][2] (P2P).&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands.  You're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][1].&#xD;&#xA;&#xD;&#xA;Here are a few more tips for writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][3] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as 32-bit Windows) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][4]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is out of the question *(see [here][5], [here][6], and [here][7])*!  In that case, you may be better off using client-server.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;[5]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;[6]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18&#xD;&#xA;[7]: http://stackoverflow.com/q/6683059/238419" />
  <row Id="34398" PostHistoryTypeId="2" PostId="15199" RevisionGUID="531cd602-570f-418e-bfa5-0ccdecb49175" CreationDate="2011-07-25T17:43:54.163" UserId="8852" Text="http://spriters-resource.com/ has tons of different spritesheets from games." />
  <row Id="34399" PostHistoryTypeId="5" PostId="15196" RevisionGUID="c09ccf5f-672d-43c5-beb5-a79f29541d14" CreationDate="2011-07-25T17:49:07.263" UserId="2061" Comment="added 217 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to slow down and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing that is usually done:  **eliminate the server altogether**. Have every client send their commands to every other client.  This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][2] (P2P).&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands.  You're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][1].&#xD;&#xA;&#xD;&#xA;Here are a few more tips for writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][3] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as 32-bit Windows) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][4]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is out of the question *(see [here][5], [here][6], and [here][7])*!  In that case, you may be better off using client-server.&#xD;&#xA;* You're going to want to send out all unit positions every once in a while, at least while debugging, to detect desync bugs (which, trust me, you *will* have).  Whether you keep that in the final game is up to you.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;[5]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;[6]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18&#xD;&#xA;[7]: http://stackoverflow.com/q/6683059/238419" />
  <row Id="34400" PostHistoryTypeId="5" PostId="15196" RevisionGUID="77ad22e8-49a7-43bf-bef8-9323e0409af6" CreationDate="2011-07-25T17:57:42.537" UserId="2061" Comment="added 64 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to slow down and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing that is usually done:  **eliminate the server altogether**. Have every client send their commands to every other client.  This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][2] (P2P).&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands.  You're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][1].&#xD;&#xA;&#xD;&#xA;Here are a few more tips for writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][3] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as 32-bit Windows) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][4]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is out of the question *(see [here][5], [here][6], and [here][7])*!  In that case, you may be better off using client-server.&#xD;&#xA;* You're going to want to send out all unit positions every once in a while, at least while debugging, to detect desync bugs (which, trust me, you *will* have).  Whether you keep that in the final game is up to you - I would sync at least some units, to detect attempted-hacking.&#xD;&#xA;&#xD;&#xA;[1]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;[3]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;[4]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;[5]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;[6]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18&#xD;&#xA;[7]: http://stackoverflow.com/q/6683059/238419" />
  <row Id="34401" PostHistoryTypeId="2" PostId="15200" RevisionGUID="cb649df1-f4c8-4d51-98c6-ce0c4aed2e3b" CreationDate="2011-07-25T18:07:05.950" UserId="8614" Text="There is an option to send direct message with the new Graph api (http://developers.facebook.com/docs/reference/api/message/) but it's still on develop and it can't be use yet for production applications. &#xD;&#xA;Maybe by the time you are going to deploy your application this function will available for production." />
  <row Id="34402" PostHistoryTypeId="5" PostId="15200" RevisionGUID="b70b872a-a7f7-46ac-9a9c-3229076afb64" CreationDate="2011-07-25T18:31:32.107" UserId="8614" Comment="added 3 characters in body" Text="There is an option to send direct message with the new Graph api (http://developers.facebook.com/docs/reference/api/message/) but it's still on develop and it can't be use yet for production applications. &#xD;&#xA;Maybe by the time you are going to deploy your application this function will be available for production." />
  <row Id="34403" PostHistoryTypeId="25" PostId="15197" RevisionGUID="5a0eca35-49d0-46f3-ab14-9d41f19fa816" CreationDate="2011-07-25T18:32:23.087" Comment="http://twitter.com/#!/StackGameDev/status/95562049551204353" />
  <row Id="34404" PostHistoryTypeId="2" PostId="15201" RevisionGUID="2c469db2-8ca1-4cc0-a7dc-c3597b6ff0cf" CreationDate="2011-07-25T18:35:58.763" UserId="118" Text="I see that you tagged the question as 2d, so I'll go ahead and dump my code:&#xD;&#xA;&#xD;&#xA;    class Sprite {&#xD;&#xA;        [...]&#xD;&#xA;        public bool CollidesWith(Sprite other)&#xD;&#xA;        {&#xD;&#xA;            return CollidesWith(other, true);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public bool CollidesWith(Sprite other, bool calcPerPixel)&#xD;&#xA;        {&#xD;&#xA;            int widthOther = other.Texture.Width;&#xD;&#xA;            int heightOther = other.Texture.Height;&#xD;&#xA;            int widthMe = Texture.Width;&#xD;&#xA;            int heightMe = Texture.Height;&#xD;&#xA;&#xD;&#xA;            if ( calcPerPixel &amp;&amp; &#xD;&#xA;                (( Math.Min(widthOther, heightOther) &gt; 100) ||&#xD;&#xA;                ( Math.Min(widthMe, heightMe) &gt; 100)))&#xD;&#xA;            {&#xD;&#xA;                return Bounds.Intersects(other.Bounds)&#xD;&#xA;                    &amp;&amp; PerPixelCollision(this, other);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            return Bounds.Intersects(other.Bounds);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        static bool PerPixelCollision(Sprite a, Sprite b)&#xD;&#xA;        {&#xD;&#xA;            uint[] bitsA = new uint[a.Texture.Width * a.Texture.Height];&#xD;&#xA;            a.Texture.GetData(bitsA);&#xD;&#xA;&#xD;&#xA;            uint[] bitsB = new uint[b.Texture.Width * b.Texture.Height];&#xD;&#xA;            b.Texture.GetData(bitsB);&#xD;&#xA;&#xD;&#xA;            int x1 = Math.Max(a.Bounds.X, b.Bounds.X);&#xD;&#xA;            int x2 = Math.Min(a.Bounds.X + a.Bounds.Width, b.Bounds.X + b.Bounds.Width);&#xD;&#xA;&#xD;&#xA;            int y1 = Math.Max(a.Bounds.Y, b.Bounds.Y);&#xD;&#xA;            int y2 = Math.Min(a.Bounds.Y + a.Bounds.Height, b.Bounds.Y + b.Bounds.Height);&#xD;&#xA;&#xD;&#xA;             for (int y = y1; y &lt; y2; ++y)&#xD;&#xA;             {&#xD;&#xA;                 for (int x = x1; x &lt; x2; ++x)&#xD;&#xA;                 {&#xD;&#xA;&#xD;&#xA;                     if (((bitsA[(x - a.Bounds.X) +&#xD;&#xA;                                 (y - a.Bounds.Y)*a.Texture.Width] &amp;&#xD;&#xA;                           0xFF000000) &gt;&gt; 24) &gt; 20 &amp;&amp;&#xD;&#xA;                         ((bitsB[(x - b.Bounds.X) +&#xD;&#xA;                                 (y - b.Bounds.Y)*b.Texture.Width] &amp;&#xD;&#xA;                           0xFF000000) &gt;&gt; 24) &gt; 20)&#xD;&#xA;                     {&#xD;&#xA;                         return true;&#xD;&#xA;                     }&#xD;&#xA;                 }&#xD;&#xA;             }&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private Rectangle bounds = Rectangle.Empty;&#xD;&#xA;        public virtual Rectangle Bounds&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return new Rectangle(&#xD;&#xA;                    (int)Position.X - Texture.Width,&#xD;&#xA;                    (int)Position.Y - Texture.Height,&#xD;&#xA;                    Texture.Width,&#xD;&#xA;                    Texture.Height);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34405" PostHistoryTypeId="2" PostId="15202" RevisionGUID="c241a9fe-02f3-41dd-8ac7-7c5749ea8779" CreationDate="2011-07-25T18:36:15.693" UserId="853" Text="I've been working on a 2D game for the iPhone and learning a lot about game design in the process. I've looked at some of the most popular games for the iPhone ( angry birds, cut the rope, doodle jump, tiny wings, etc..) and have noticed that they're all 2D. Now I understand that some graphics knowledge is needed to create these games, but does a indie game developer really need to know graphics programming beyond the basics?&#xD;&#xA;&#xD;&#xA;I feel there are two reasons that 2D games have greater success on mobile. One, lack of controller. Two, casual games need a more casual experience and 2D games cause less visual processing on the brain. &#xD;&#xA;&#xD;&#xA;I'm asking this question because I'm still in school getting a cs degree and trying to decide on taking a real-time rendering course that will focus on GLSL and GPU programming or artificial intelligence. I've actually already taken a computer graphics course, but it focused on theory and we touched opengl very little. We implemented the graphics pipeline ourselves. &#xD;&#xA;&#xD;&#xA;I get the feeling that studying color theory and basic drawing skills would be more helpful than GLSL or OpenGL ES 2.0 to master the aesthetics part of game design. &#xD;&#xA;&#xD;&#xA;I could be short sighted though, because games like Braid and World of Goo might of relied a lot on graphics programming and I would love to be able make games of the same quality of these two. &#xD;&#xA;&#xD;&#xA;Thanks to all that reply." />
  <row Id="34406" PostHistoryTypeId="1" PostId="15202" RevisionGUID="c241a9fe-02f3-41dd-8ac7-7c5749ea8779" CreationDate="2011-07-25T18:36:15.693" UserId="853" Text="Does an indie game developer really need to know graphics programming beyond the basics?" />
  <row Id="34407" PostHistoryTypeId="3" PostId="15202" RevisionGUID="c241a9fe-02f3-41dd-8ac7-7c5749ea8779" CreationDate="2011-07-25T18:36:15.693" UserId="853" Text="&lt;game-design&gt;" />
  <row Id="34408" PostHistoryTypeId="2" PostId="15203" RevisionGUID="9411bd42-359a-4a34-a80d-fd0589438f59" CreationDate="2011-07-25T19:00:39.973" UserId="7217" Text="Short answer: **No**.  You can &quot;be&quot; an indie game developer without knowing anything about graphics.&#xD;&#xA;&#xD;&#xA;More practically, it depends on the kind of graphics you want in your game.&#xD;&#xA;&#xD;&#xA;If you want &quot;fancy&quot; graphics, meaning graphics that require whatever knowledge you're referring to, then someone has to know it.  You either know it yourself and write the code, or you use a library written by someone[s] who knew it.  &#xD;&#xA;&#xD;&#xA;In any case, it will help to know &quot;it&quot;, but of course we each have only so much time and you can't learn everything.  The real question is, is there something else you'd be better off devoting time to learning, and the answer is that it really depends on what *you* want to do.  You said you want to make a game of the quality of &quot;Braid and World of Goo&quot;, and I'm not qualified to tell you what you need to know to do that.  Maybe someone else will be.  " />
  <row Id="34409" PostHistoryTypeId="5" PostId="15172" RevisionGUID="cfa193af-2139-44d6-9d90-2b866da84c70" CreationDate="2011-07-25T19:17:47.683" UserId="849" Comment="added 137 characters in body" Text="Nowadays, most music seems to be prerecorded, but that means they are rather static and take up a lot of space.&#xD;&#xA;&#xD;&#xA;I wonder if MIDI is still a viable option (especially considering consoles or iOS) and if I can expect General Midi 1 to be available everywhere? (Note: Referring to the [software instruments][1] for sound generation from notes)&#xD;&#xA;&#xD;&#xA;Alternatively, are there vendors of embeddable software instruments that can generate the desired sound at runtime?&#xD;&#xA;&#xD;&#xA;The whole point is to re-create a dynamic soundscape in which instruments can change their volume, speed or pitch - this can be partially simulated with individual tracks, but it doesn't offer the same flexibility.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/General_MIDI" />
  <row Id="34410" PostHistoryTypeId="2" PostId="15204" RevisionGUID="babf809c-f0b3-4cf7-bf5d-144e5da7a13c" CreationDate="2011-07-25T20:04:48.577" UserId="8819" Text="You will need some basic knowledge in any case, but that can be obtained quite easy. But for your course decision I recommend you to consider another course. Yes both can be helpful, but i doubt they will be helpful in your case. First of all, AI course will be related with pure AI while in games it is mostly expert systems. For the real time rendering course, it will be so deep that you will not be able to use that knowledge. Yes its a good thing to know but you dont really need that if you are not planning to write a game engine. Of course I can give more advice if I can see curriculum. I am both a graphics and game programmer. Most of the time knowledge on one subject does not help with another. If you want to be a good indie developer, learn how to write a striking story or design natural feeling control mechanisms, or focus on a unique game which will be enjoyable and challenging enough (but no more).&#xD;&#xA;&#xD;&#xA;If you ask me angry birds require more physics knowledge than graphics. I cannot comment other games since I dont know anything about them." />
  <row Id="34411" PostHistoryTypeId="2" PostId="15205" RevisionGUID="f004d07c-fd4e-4c9e-aa17-100d005660c4" CreationDate="2011-07-25T20:08:05.737" UserId="8819" Text="This is not from old games but it sure has some sprites: http://www.reinerstilesets.de/" />
  <row Id="34412" PostHistoryTypeId="5" PostId="15200" RevisionGUID="bea91963-3548-40cb-bdbf-29907d757bee" CreationDate="2011-07-25T20:10:15.700" UserId="8614" Comment="added 316 characters in body" Text="*EDIT*&#xD;&#xA;After reading Davy8 comment I remember that facebook doesn't allow applications to send direct messages. I think there is no way to generate a notification with an app on facebook, you can only write on the users wall.&#xD;&#xA;&#xD;&#xA;Maybe your best solution is to send an SMS, email or use twitter.&#xD;&#xA;&#xD;&#xA;** Old post**&#xD;&#xA;&#xD;&#xA;There is an option to send direct message with the new Graph api (http://developers.facebook.com/docs/reference/api/message/) but it's still on develop and it can't be use yet for production applications. &#xD;&#xA;Maybe by the time you are going to deploy your application this function will be available for production." />
  <row Id="34413" PostHistoryTypeId="2" PostId="15206" RevisionGUID="208a7490-d220-408e-bd54-0eb478298a2e" CreationDate="2011-07-25T20:14:27.433" UserId="998" Text="The [hemicube]() algorithm renders the scene to 5 sides of a half-cube, from the perspective of each polygon.&#xD;&#xA;&#xD;&#xA;Assume you place the hemicube around __me__ and render to the 5 sides.  The idea is, we can see exactly __how much__ of each other polygon in the scene __I__ see, and so determine the amount of light I receive from those respective polygons.&#xD;&#xA;&#xD;&#xA;![radiosity][1]&#xD;&#xA;&#xD;&#xA;The way I did this before was using DWORD colors, and assign a __different__ (integer) color to each poly, called its id.  This allows for 16M colors using DWORDS.  It worked fine with the fixed function pipeline, because I was able to choose [`D3DDECLTYPE_D3DCOLOR`](http://msdn.microsoft.com/en-us/library/bb172533(VS.85).aspx) in the vertex declaration, render to texture, and tally up the polygon coverage counts.&#xD;&#xA;&#xD;&#xA;Now that I've switched over to shaders, I can't seem to make DWORD colors work anymore.  All that works is 3x 32-bit `float`-type colors (I am using Cg, so `float4`'s.)&#xD;&#xA;&#xD;&#xA;Is there a way to force D3D9 or D3D11 to use integer colors in a shader, and if not, how can I guarantee the colors I choose as &quot;ids&quot; for the respective polygons __will end up being distinct colors in the texture I render to__?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/htRkH.png" />
  <row Id="34414" PostHistoryTypeId="1" PostId="15206" RevisionGUID="208a7490-d220-408e-bd54-0eb478298a2e" CreationDate="2011-07-25T20:14:27.433" UserId="998" Text="Hemicube algorithm d3d9 or d3d11, float valued colors" />
  <row Id="34415" PostHistoryTypeId="3" PostId="15206" RevisionGUID="208a7490-d220-408e-bd54-0eb478298a2e" CreationDate="2011-07-25T20:14:27.433" UserId="998" Text="&lt;directx9&gt;&lt;directx11&gt;&lt;color&gt;" />
  <row Id="34416" PostHistoryTypeId="5" PostId="15192" RevisionGUID="06a23c73-b522-4b9d-88fd-374ecfafc7bd" CreationDate="2011-07-25T20:29:45.663" UserId="2061" Comment="Added a link to the question mentioned" Text="I've been thinking about a multi player RTS game. The part that I can't seem to get around is keeping unit movement synced. If I move unit A to spot XY, I have to communicate that back to server that relays to the other client.&#xD;&#xA;&#xD;&#xA;I'm curious what the communications would look like. Would you just communicate to the server that I'm moving unit A to XY from JZ? Maybe you need to communicate movement coord by coord instead? What's the most efficient methodology to communicate movement of units from one client to the other?&#xD;&#xA;&#xD;&#xA;***EDIT***&#xD;&#xA;&#xD;&#xA;This is a [reposted question from stackoverflow][1].  I found that this site was probably a better place for the question.  &#xD;&#xA;&#xD;&#xA;One of the better answers from that post:&#xD;&#xA;&#xD;&#xA;I assume you're intending to use the Client-Server networking paradigm? In which case you cannot trust the clients to handle the actual positioning of units, you must delegate that task to the server. You then take the command list from each client per-tick, and compute the movement of each unit, once this has been completed, next tick you relay the position of each unit relevant to each client (either on a whole-map basis, or per-view basis), and start the process again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/6809062" />
  <row Id="34417" PostHistoryTypeId="24" PostId="15192" RevisionGUID="06a23c73-b522-4b9d-88fd-374ecfafc7bd" CreationDate="2011-07-25T20:29:45.663" Comment="Proposed by 2061 approved by 51 edit id of 579" />
  <row Id="34418" PostHistoryTypeId="2" PostId="15207" RevisionGUID="528bf357-41db-45f7-ac8a-a0fea54410e4" CreationDate="2011-07-25T20:38:57.797" UserId="8854" Text="Toucharcade.com has some good posts on new iPhone &lt;a href=&quot;http://www.gameshastra.com/Video-Game-Development.html&quot;&gt;game development&lt;/a&gt;. This gives you some idea on what is relevant in the industry today and what games are popular. " />
  <row Id="34419" PostHistoryTypeId="16" PostId="15207" RevisionGUID="314338db-8ac5-4cde-a678-27619ec12ed9" CreationDate="2011-07-25T20:38:57.797" UserId="8854" />
  <row Id="34420" PostHistoryTypeId="2" PostId="15208" RevisionGUID="ff85105a-0e7f-4889-a9ed-4fc138a93cfa" CreationDate="2011-07-25T20:39:49.073" UserId="8524" Text="Google for &quot;STOS sprites&quot; and &quot;AMOS sprites&quot;.&#xD;&#xA;&#xD;&#xA;STOS and AMOS were basic variants for the Atari ST and Amiga respectively - both had large communities and there were a lot of sprite collections available in the public domain.&#xD;&#xA;&#xD;&#xA;Also, try Googling for &quot;TOSEC&quot;. There are some torrents (probably illegal) that collect virtually everything ever released for the Atari ST, the Amiga etc. That includes some large collections of public domain disks, some of which will contain sprite collections. If you're only looking to collect the PD stuff, you're probably on the right side of the law (if anyone cares anyway).&#xD;&#xA;&#xD;&#xA;The big problem then is probably converting all those ancient file formats. It may be easier to view them in an emulator and get screenshots.&#xD;&#xA;" />
  <row Id="34421" PostHistoryTypeId="5" PostId="15196" RevisionGUID="39995a99-b696-4a3a-a350-f47a3332a482" CreationDate="2011-07-25T20:54:01.873" UserId="2061" Comment="added 114 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to slow down and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing that is usually done:  **eliminate the server altogether**. Have every client send their commands to every other client.  This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][1] (P2P).&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands.  You're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][2].&#xD;&#xA;&#xD;&#xA;![(image of networking in AoE)][3]&#xD;&#xA;&#xD;&#xA;Here are a few more tips for writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][4] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as 32-bit Windows) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][5]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is out of the question *(see [here][6], [here][7], and [here][8])*!  In that case, you may be better off using client-server.&#xD;&#xA;* You're going to want to send out all unit positions every once in a while, at least while debugging, to detect desync bugs (which, trust me, you *will* have).  Whether you keep that in the final game is up to you - I would sync at least some units, to detect attempted-hacking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;  [3]: http://i.stack.imgur.com/ebHSx.jpg&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;  [6]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;  [7]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18&#xD;&#xA;  [8]: http://stackoverflow.com/q/6683059/238419" />
  <row Id="34422" PostHistoryTypeId="25" PostId="15206" RevisionGUID="4a4494bb-f4cb-4235-a1ad-991d4dec85a1" CreationDate="2011-07-25T21:32:23.150" Comment="http://twitter.com/#!/StackGameDev/status/95607348307046400" />
  <row Id="34423" PostHistoryTypeId="5" PostId="15190" RevisionGUID="3701f9ef-8281-4b1e-bb86-14cf3a227023" CreationDate="2011-07-25T21:48:09.733" UserId="2698" Comment="Mistake-up" Text="Let's separate your problem into its distinct issues...&#xD;&#xA;&#xD;&#xA;## A word on code quality&#xD;&#xA;&#xD;&#xA;Your code currently has your platforms directly controlling your player's velocity _and even the world's gravity constant_. It's hacky, and it's procedural when it should be object-oriented. Once you start expanding this game things are going to get ugly _fast_.&#xD;&#xA;&#xD;&#xA;You need to refactor your code. Implement a player class, a platform class and a floor class. Separate their concerns: have the player interpret keyboard controls and control how he runs and jumps, and have the platforms _alter_ his momentum as necessary (by adding their own speed to the player's already-determined speed, when necessary).&#xD;&#xA;&#xD;&#xA;Have your player determine where it is in regards to a floor-type object (platforms and floors would both have a `BodyType = BodyTypes.Floor`, or something) and determine on its own where it is in regards to the object, how it should react and whether it's falling or on the ground.&#xD;&#xA;&#xD;&#xA;This may deserve a separate topic as it's quite a separate issue from everything you've brought up. However, you're going to have to do it at some point.&#xD;&#xA;&#xD;&#xA;## Horizontal/vertical inertia when leaving a platform&#xD;&#xA;&#xD;&#xA;To solve your vertical and horizontal velocity problems, note two things:&#xD;&#xA;&#xD;&#xA;* Regarding horizontal speed: Your code only sets the horizontal speed to 0 when the player hits the ground (on Pastie line 200) or a platform.&#xD;&#xA;* Regarding vertical speed: Your player has a constant falling acceleration. When he walks off the vertical platform, this falling acceleration just keeps getting added to his already downward movement.&#xD;&#xA;&#xD;&#xA;Your player is simply suffering from _inertia_: his momentum is maintained until something stops it.&#xD;&#xA;&#xD;&#xA;**Solution:** Both issues would be resolved by [jSepia's solution][1] to [How do I handle moving platforms in a platform game?][2] as it would _completely separate_ the player's movement process from how the platforms move him. You simply _would not_ fall faster walking off a vertical platform and _would not_ preserve your horizontal momentum jumping off a horizontal one, because the platforms will no longer affect your player's _vx_ and _vy_.&#xD;&#xA;&#xD;&#xA;Note: You may have some difficulty implementing jSepia's solution before your code is refactored.&#xD;&#xA;&#xD;&#xA;## Slipping side-to-side around the horizontal platform&#xD;&#xA;&#xD;&#xA;Your player isn't actually moved horizontally quite as fast as the platform moves. It's not obvious to me why. This problem would _also_ probably be solved by implementing jSepia's solution and properly refactoring your code (the latter would simply make the cause obvious).&#xD;&#xA;&#xD;&#xA;## Collision detection: overlapping with the vertical platform&#xD;&#xA;&#xD;&#xA;See Pastie line 381: every step it's resetting the player's _vy_ to 0 as long as the player's colliding with the underside of the vertical platform. In the following step, _vy_ is increased by the gravity acceleration and then the player's moved (and then it's reset to 0 again).&#xD;&#xA;&#xD;&#xA;This means for as long as your player's colliding with the bottom of the platform, he's moving down at a constant speed (the gravity constant). The vertical platform is faster than that so it overlaps him. If the vertical platform moved over a longer distance it would slide right through him until the player was registered as standing on the platform.&#xD;&#xA;&#xD;&#xA;**Solution:** Don't reset the player's _vy_ to 0. Just set the player's _vy_ to the platform's vertical speed (_if the platform is travelling downwards_). Your player will then be moving away from the vertical platform _at least_ as fast as the platform, and accelerate away from it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://gamedev.stackexchange.com/questions/3964/how-do-i-handle-moving-platforms-in-a-platform-game/3967#3967&#xD;&#xA;[2]:http://gamedev.stackexchange.com/questions/3964/" />
  <row Id="34424" PostHistoryTypeId="5" PostId="15196" RevisionGUID="25d36300-7a62-491c-82d1-2ee066baa407" CreationDate="2011-07-25T22:25:02.640" UserId="2061" Comment="added 31 characters in body" Text="You don't want to sync the positions of all the units from the server to each client; that will take up *way* more bandwidth than you need.  You'd also have to deal with interpolating/extrapolating unit positions, etc.  **Almost no professional RTS's use client/server!**&#xD;&#xA;&#xD;&#xA;Instead, you want to send only the players' commands.  Rather than moving the units immediately when the player clicks, you'll queue the move-command to be done at some point in the future  - usually just a couple of frames.  Everyone sends their commands to everyone.  A couple of frames later, everyone executes all the commands, and because the game is deterministic, they all see the same result.&#xD;&#xA;&#xD;&#xA;The downside is that every player is as slow as the slowest player - if anyone falls behind in sending out commands, everyone has to slow down and wait for him to catch up (in Starcraft 2, this is the *&quot;XXX is slowing down the game&quot;* dialog).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In fact, there is one more thing that is usually done:  **eliminate the server altogether**. Have every client send their commands to every other client.  This reduces lag *(instead of a command going from you--&gt;server--&gt;opponent, it just goes from you--&gt;opponent)* **and** makes coding easier, since you no longer need to code a separate server.  This sort of architecture is called [peer-to-peer][1] (P2P).&#xD;&#xA;&#xD;&#xA;The downside is that now you need a way of resolving conflicts, but since players' commands are independent of each other in most RTS's, this usually isn't much of a problem.  Also, it doesn't scale well - every time you add a new player, *every* player needs to send him their commands.  You're not going to be making an MMO RTS using P2P.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This setup *(sending only commands using P2P)* is how most RTS's, including Starcraft, C&amp;C, and AoE work, and is the only way AoE could possibly [support 1500 units on a 28.8kbps connection][2].&#xD;&#xA;&#xD;&#xA;![(image of networking in AoE)][3]&#xD;&#xA;&#xD;&#xA;Here are a few more tips for writing a P2P RTS:&#xD;&#xA;&#xD;&#xA;* For obvious reasons, this setup can only work if your game uses [fixed-step time][4] - you don't want the results of a calculation to be dependent on the framerate!  Fixed-step is easier to work with for most things, so this shouldn't be a problem.&#xD;&#xA;* In order for this to work, the results of every command must be **completely deterministic**.&#xD;&#xA;  * This is usually pretty easy if you restrict yourself to one system (such as 32-bit Windows) and force all clients to use the same executable: make sure any random-number generators have the same seed and are always called in the same order; be extremely careful when iterating over [unordered collections][5]; etc.&#xD;&#xA;  * This is *extremely* difficult if you plan on making the game playable across different platforms, or (as is often the case with Linux) allow the clients to compile the code themselves.  Not only are different system libraries pretty much guaranteed to use different implementations of `rand()`, `cos()` etc, but pretty much **all** floating-point math is out of the question *(see [here][6], [here][7], and [here][8])*!  In that case, you may be better off using client-server.&#xD;&#xA;* You're going to want to send out all unit positions every once in a while, at least while debugging, to detect desync bugs (which, trust me, you *will* have).  Whether you keep that in the final game is up to you - I would sync at least some units (or use some sort of checksum), to detect attempted-hacking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/3887/how-can-i-make-a-peer-to-peer-multiplayer-game&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA;  [3]: http://i.stack.imgur.com/ebHSx.jpg&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step&#xD;&#xA;  [5]: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx&#xD;&#xA;  [6]: http://blogs.msdn.com/b/shawnhar/archive/2009/03/25/is-floating-point-math-deterministic.aspx&#xD;&#xA;  [7]: http://www.parashift.com/c%2B%2B-faq-lite/newbie.html#faq-29.18&#xD;&#xA;  [8]: http://stackoverflow.com/q/6683059/238419" />
  <row Id="34425" PostHistoryTypeId="5" PostId="15201" RevisionGUID="e47469ff-509f-4b3c-98b3-8753cb777595" CreationDate="2011-07-25T22:26:05.413" UserId="118" Comment="forgot to change the type of the arrays" Text="I see that you tagged the question as 2d, so I'll go ahead and dump my code:&#xD;&#xA;&#xD;&#xA;&lt;!-- language-all: c# --&gt;&#xD;&#xA;&#xD;&#xA;    class Sprite {&#xD;&#xA;&#xD;&#xA;        [...]&#xD;&#xA;&#xD;&#xA;        public bool CollidesWith(Sprite other)&#xD;&#xA;        {&#xD;&#xA;            // Default behavior uses per-pixel collision detection&#xD;&#xA;            return CollidesWith(other, true);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public bool CollidesWith(Sprite other, bool calcPerPixel)&#xD;&#xA;        {&#xD;&#xA;            // Get dimensions of texture&#xD;&#xA;            int widthOther = other.Texture.Width;&#xD;&#xA;            int heightOther = other.Texture.Height;&#xD;&#xA;            int widthMe = Texture.Width;&#xD;&#xA;            int heightMe = Texture.Height;&#xD;&#xA;&#xD;&#xA;            if ( calcPerPixel &amp;&amp;                                // if we need per pixel&#xD;&#xA;                (( Math.Min(widthOther, heightOther) &gt; 100) ||  // at least avoid doing it&#xD;&#xA;                ( Math.Min(widthMe, heightMe) &gt; 100)))          // for small sizes (nobody will notice :P)&#xD;&#xA;            {&#xD;&#xA;                return Bounds.Intersects(other.Bounds) // If simple intersection fails, don't even bother with per-pixel&#xD;&#xA;                    &amp;&amp; PerPixelCollision(this, other);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            return Bounds.Intersects(other.Bounds);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        static bool PerPixelCollision(Sprite a, Sprite b)&#xD;&#xA;        {&#xD;&#xA;            // Get Color data of each Texture&#xD;&#xA;            Color[] bitsA = new Color[a.Texture.Width * a.Texture.Height];&#xD;&#xA;            a.Texture.GetData(bitsA);&#xD;&#xA;            Color[] bitsB = new Color[b.Texture.Width * b.Texture.Height];&#xD;&#xA;            b.Texture.GetData(bitsB);&#xD;&#xA;&#xD;&#xA;            // Calculate the intersecting rectangle&#xD;&#xA;            int x1 = Math.Max(a.Bounds.X, b.Bounds.X);&#xD;&#xA;            int x2 = Math.Min(a.Bounds.X + a.Bounds.Width, b.Bounds.X + b.Bounds.Width);&#xD;&#xA;&#xD;&#xA;            int y1 = Math.Max(a.Bounds.Y, b.Bounds.Y);&#xD;&#xA;            int y2 = Math.Min(a.Bounds.Y + a.Bounds.Height, b.Bounds.Y + b.Bounds.Height);&#xD;&#xA;&#xD;&#xA;             // For each single pixel in the intersecting rectangle&#xD;&#xA;             for (int y = y1; y &lt; y2; ++y)&#xD;&#xA;             {&#xD;&#xA;                 for (int x = x1; x &lt; x2; ++x)&#xD;&#xA;                 {&#xD;&#xA;                     // Get the color from each texture&#xD;&#xA;                     Color a = bitsA[(x - a.Bounds.X) + (y - a.Bounds.Y)*a.Texture.Width];&#xD;&#xA;                     Color b = bitsB[(x - b.Bounds.X) + (y - b.Bounds.Y)*b.Texture.Width];&#xD;&#xA;&#xD;&#xA;                     if (a.A != 0 &amp;&amp; b.A != 0) // If both colors are not transparent (the alpha channel is not 0), then there is a collision&#xD;&#xA;                     {&#xD;&#xA;                         return true;&#xD;&#xA;                     }&#xD;&#xA;                 }&#xD;&#xA;             }&#xD;&#xA;            // If no collision occurred by now, we're clear.&#xD;&#xA;            return false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private Rectangle bounds = Rectangle.Empty;&#xD;&#xA;        public virtual Rectangle Bounds&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                return new Rectangle(&#xD;&#xA;                    (int)Position.X - Texture.Width,&#xD;&#xA;                    (int)Position.Y - Texture.Height,&#xD;&#xA;                    Texture.Width,&#xD;&#xA;                    Texture.Height);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit**: While this code is almost self explanatory, I did feel bad for not having comments, so I added some ;) I also got rid of the bitwise operations since it was doing basically what the Color.A property does in a more complicated way ;)" />
  <row Id="34426" PostHistoryTypeId="2" PostId="15209" RevisionGUID="3dc061d7-a691-4747-9ea8-95612e0bbd13" CreationDate="2011-07-25T22:57:46.433" UserId="2061" Text="You have two major, basic problems.  First, this won't even compile because of this part:  `&amp;&amp; &gt;other.getHeight() &gt; y &amp;&amp;` (notice the `&gt;` before `other`).  Secondly, this:&#xD;&#xA;&#xD;&#xA;    if(something);&#xD;&#xA;    return true;&#xD;&#xA;&#xD;&#xA;will always return `true`.  What you probably meant was this:&#xD;&#xA;&#xD;&#xA;    if(something)&#xD;&#xA;        return true;&#xD;&#xA;    return false;&#xD;&#xA;&#xD;&#xA;which, since `something` is just a `boolean` expression, is the same as&#xD;&#xA;&#xD;&#xA;    return something;&#xD;&#xA;&#xD;&#xA;Both Eclipse and Netbeans have an &quot;AutoFormat&quot; option that would have made this error immediately obvious, while simultaneously fixing your horrendous formatting.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After you fix those, you still have problems with your logic, but those at least can be easily discovered with a debugger." />
  <row Id="34427" PostHistoryTypeId="2" PostId="15210" RevisionGUID="fcaf71b2-d3b9-46ca-9d9f-9984de2b7153" CreationDate="2011-07-25T23:18:48.047" UserId="7191" Text="Have you looked into **flocking algorithms**? When I look at your description that's what comes to mind for me. There's lots of articles around for this, here's [one I like][1]. Likely you won't be using all the aspects of flocking, like cohesion. Most of the aspects would be useful for what you're trying to do, like alignment and separation, both of which would help in avoiding collisions. You'd end up with something a bit different that flocking, but it should help you get started.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rocketmandevelopment.com/2010/10/08/steering-behaviors-flocking/" />
  <row Id="34428" PostHistoryTypeId="5" PostId="14169" RevisionGUID="59b0c3eb-969d-485b-8b86-1728b15f69fb" CreationDate="2011-07-25T23:35:43.650" UserId="2061" Comment="fixed code formatting (though this will won't compile...)" Text="Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the sprite disappears, this is in the Sprite class: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    public boolean isCollision(Bitmap other)&#xD;&#xA;    {	&#xD;&#xA;        if(other.getWidth() &gt; x &amp;&amp; other.getWidth() &lt; x + width &amp;&amp; &gt;other.getHeight() &gt; y &amp;&amp; other.getHeight() &lt; y + height);&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34429" PostHistoryTypeId="24" PostId="14169" RevisionGUID="59b0c3eb-969d-485b-8b86-1728b15f69fb" CreationDate="2011-07-25T23:35:43.650" Comment="Proposed by 2061 approved by 14 edit id of 580" />
  <row Id="34430" PostHistoryTypeId="2" PostId="15211" RevisionGUID="056a4e1b-f3fe-4681-ad4d-8df2c8bd3160" CreationDate="2011-07-25T23:51:23.463" UserId="8634" Text="I like the first one the best.&#xD;&#xA;http://www.videogamesprites.net/&#xD;&#xA;http://www.retrogamezone.co.uk/nes.htm&#xD;&#xA;http://www.spriters-resource.com/nes/A.html" />
  <row Id="34431" PostHistoryTypeId="2" PostId="15212" RevisionGUID="a8ff7152-89e5-40b8-b73c-535db6eed089" CreationDate="2011-07-26T00:17:08.830" UserId="1101" Text="&gt; My goal is to implement some sort of AI that will a 100% accurate collision avoidance (i.e. I will be sure that the vehicles will never ever collide).&#xD;&#xA;&#xD;&#xA;If this were possible, it would have been put into all the world's aircraft by now.&#xD;&#xA;&#xD;&#xA;I suggest relaxing the 'autonomous' aspect and having a function that resolves predicted collisions between 2 (or more) vehicles. It can be as naive as picking random new directions to travel in and seeing if that resolves the problem, but the important thing is that the function only returns when it's reached an agreement that suits both vehicles.&#xD;&#xA;&#xD;&#xA;I also suggest that any vehicle that is predicted to collide in the near future reduces its speed while maintaining the same look-ahead distance - this will give your vehicles more opportunity to avoid collisions, just as in real life." />
  <row Id="34432" PostHistoryTypeId="25" PostId="15198" RevisionGUID="4e43bda4-a25a-4365-a949-0ceb58444dbb" CreationDate="2011-07-26T00:32:22.727" Comment="http://twitter.com/#!/StackGameDev/status/95652647276773377" />
  <row Id="34433" PostHistoryTypeId="2" PostId="15213" RevisionGUID="ab34c588-dfce-411b-805e-733774514dc7" CreationDate="2011-07-26T01:55:06.447" UserId="5765" Text="anyone can share a link for a tutorial or article about optimizing A* for horizontal / vertical movement (no diagonal). Is not as easy as change the G values to 10 everytime.&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="34434" PostHistoryTypeId="1" PostId="15213" RevisionGUID="ab34c588-dfce-411b-805e-733774514dc7" CreationDate="2011-07-26T01:55:06.447" UserId="5765" Text="A* only for horizontal / vertical movement" />
  <row Id="34435" PostHistoryTypeId="3" PostId="15213" RevisionGUID="ab34c588-dfce-411b-805e-733774514dc7" CreationDate="2011-07-26T01:55:06.447" UserId="5765" Text="&lt;path-finding&gt;" />
  <row Id="34436" PostHistoryTypeId="2" PostId="15214" RevisionGUID="df6242dd-29c8-4641-ab6f-8552b7f5e8c4" CreationDate="2011-07-26T02:54:25.497" UserId="1430" Text="A* is a graph search; [the algorithm][1] doesn't know or care whether you're searching a grid (with or without permissible diagonal movement) or a free-form graph. To &quot;optimize&quot; for the case where diagonal movement isn't allowed, make sure to never return diagonally-adjacent nodes when computing the neighbors of the current node. Between that and selecting an appropriate heuristic for your scenario, there's little in the way of optimizations available specifically for the 4-directional grid case (as far as I'm aware). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A*_search_algorithm#Pseudocode" />
  <row Id="34437" PostHistoryTypeId="25" PostId="15191" RevisionGUID="92233c95-0648-4185-916b-b5e782d6515b" CreationDate="2011-07-26T03:32:23.320" Comment="http://twitter.com/#!/StackGameDev/status/95697946196189184" />
  <row Id="34438" PostHistoryTypeId="2" PostId="15215" RevisionGUID="cada57de-1f32-47a9-ac26-f9780f5bd3c7" CreationDate="2011-07-26T04:08:53.340" UserId="7715" Text="The game I've been working on uses opengl/sfml for graphics. I'm currently working on the interface and I've found determining all the proper offsets/positioning etc. to be a pain. To make it configurable, I'll likely end up parsing a making a bunch of xml files to parse that tell my program what images to use/where to position them stc. for the interface.&#xD;&#xA;&#xD;&#xA;Since I'm going to need to do that anyways, I was curious if it's possible to embed an html renderer into an app, and have it display over graphics drawn in opengl? That way i could theoretically use html pages to design the interface&#xD;&#xA;&#xD;&#xA;If it is possible, how difficult would it be and is it a good idea? are there any projects that do this already?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="34439" PostHistoryTypeId="1" PostId="15215" RevisionGUID="cada57de-1f32-47a9-ac26-f9780f5bd3c7" CreationDate="2011-07-26T04:08:53.340" UserId="7715" Text="Using HTML for interface?" />
  <row Id="34440" PostHistoryTypeId="3" PostId="15215" RevisionGUID="cada57de-1f32-47a9-ac26-f9780f5bd3c7" CreationDate="2011-07-26T04:08:53.340" UserId="7715" Text="&lt;c++&gt;&lt;opengl&gt;&lt;interface&gt;" />
  <row Id="34441" PostHistoryTypeId="2" PostId="15216" RevisionGUID="af238338-40e2-414d-b99e-630fef19f6f8" CreationDate="2011-07-26T04:12:09.197" UserId="4690" Text="I'm working on a SpaceWar-esque project to get comfortable with XNA. I have a Ship DrawableGameComponent and a Bullet DrawableGameComponent. The player's Ship is created at the start of the game, and the Bullets are created for each Ship as part of its constructor.&#xD;&#xA;&#xD;&#xA;In my Ship constructor, I have the following code:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; 5; i++)&#xD;&#xA;    {&#xD;&#xA;        activeBullets[i] = new Bullet(game);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The relevant part of my Ship's shoot() function is as follows:&#xD;&#xA;&#xD;&#xA;    activeBullets[bullet].Visible = true;&#xD;&#xA;    activeBullets[bullet].Enabled = true;&#xD;&#xA;    activeBullets[bullet].position = this.position;&#xD;&#xA;&#xD;&#xA;The first five times I shoot() (that is, once for each bullet object that the ship is allotted), there is lag that I think is due to the bullet sprite being loaded. I've tried setting Visible and Enabled to true in the ship constructor loop where the Bullets are instantiated, but the first-five-shots lag persists. Any shots beyond the first five are completely lag-free.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How do I load the Bullets properly ahead of time so that there is no lag on the first shots?" />
  <row Id="34442" PostHistoryTypeId="1" PostId="15216" RevisionGUID="af238338-40e2-414d-b99e-630fef19f6f8" CreationDate="2011-07-26T04:12:09.197" UserId="4690" Text="XNA: My bullets lag the game the first time they're fired, but not after" />
  <row Id="34443" PostHistoryTypeId="3" PostId="15216" RevisionGUID="af238338-40e2-414d-b99e-630fef19f6f8" CreationDate="2011-07-26T04:12:09.197" UserId="4690" Text="&lt;xna&gt;&lt;loading&gt;&lt;preload&gt;" />
  <row Id="34444" PostHistoryTypeId="2" PostId="15217" RevisionGUID="16a7d1e7-14ef-4da1-a4b2-766a4c4b863c" CreationDate="2011-07-26T04:50:08.620" UserId="2200" Text="Try looking at [Awesomium](http://awesomium.com/) - it wraps the Chromium engine in a 3D renderer and HTML UIs are one of their main selling points." />
  <row Id="34445" PostHistoryTypeId="2" PostId="15218" RevisionGUID="c037f702-5592-440e-a8ef-70460e4e466b" CreationDate="2011-07-26T05:15:01.137" UserId="2061" Text="`DrawableGameComponent`'s come with a certain amount of overhead - aside from the memory, every time you add a component to the collection it must be resorted *(because components have a `DrawOrder`)*.  You don't want to be constantly adding and removing components.&#xD;&#xA;&#xD;&#xA;For this reason, you don't want `Bullet` to be a `DrawableGameComponent`.  Instead, you should make something like a `ProjectileManager`, which loads all the projectiles (including their textures), and manages creating/destroying/updating/drawing them.  This simultaneously solves your texture-loading problem, as the textures can *(and should)* be loaded only once, in `LoadContent()`.&#xD;&#xA;&#xD;&#xA;If this does not work, then the textures are not your problem, and we'll need more information to help you further." />
  <row Id="34446" PostHistoryTypeId="5" PostId="15070" RevisionGUID="dedeb4d8-a714-4849-a85d-9602074e42e2" CreationDate="2011-07-26T05:39:31.573" UserId="7454" Comment="referenced code being used" Text="I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion).  I want the target to rotate and be facing right at the player.  The target, when it shoots something should shoot right at the player.  &#xD;&#xA;&#xD;&#xA;I've seen plenty of examples of slerping to the player, but I don't want incremental rotation, well, I suppose that would be ok as long as I can make the slerp be 100%, and as long as it actually worked.&#xD;&#xA;&#xD;&#xA;FYI - Im able to use the position and rotation to do plenty of other things and it all works great except this last piece I cant figure out.&#xD;&#xA;&#xD;&#xA;Code samples run in the Target's class, Position = the targets position, Avatar = the player.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Im now using Maik's c# code he has provided and still having problems that I outlined in my comments to him.&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199001%28v=XNAGameStudio.10%29.aspx&#xD;&#xA;" />
  <row Id="34447" PostHistoryTypeId="2" PostId="15219" RevisionGUID="2bd00e06-4233-4f4c-b39a-3d95b55e813e" CreationDate="2011-07-26T05:43:26.153" UserId="5765" Text="I found the info needed here: http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S7" />
  <row Id="34448" PostHistoryTypeId="12" PostId="15219" RevisionGUID="8c7e5a82-fb83-478b-83d1-b19ac9c27b5e" CreationDate="2011-07-26T05:44:04.047" UserId="5765" Text="[{&quot;Id&quot;:5765,&quot;DisplayName&quot;:&quot;Veehmot&quot;}]" />
  <row Id="34449" PostHistoryTypeId="25" PostId="15216" RevisionGUID="e44c8c3f-abeb-4f68-8ce6-17752956967a" CreationDate="2011-07-26T06:32:22.603" Comment="http://twitter.com/#!/StackGameDev/status/95743242146037760" />
  <row Id="34450" PostHistoryTypeId="2" PostId="15220" RevisionGUID="55a921b8-af55-4a17-b2ba-55515b3b8cd3" CreationDate="2011-07-26T07:14:47.247" UserId="8563" Text="After cocos2D, I look at box2D...And I have some questions.&#xD;&#xA;&#xD;&#xA;Interested:**How to cut the body into pieces.**&lt;br&gt;&#xD;&#xA;1. How do I determine the intersection point of the body with the cut line?&lt;br&gt;&#xD;&#xA;2. Create a new body in some &quot;update_body_method&quot;?&lt;br&gt;&#xD;&#xA;&#xD;&#xA;On the second question I have answer, for example between two points create vector from first point to second point. " />
  <row Id="34451" PostHistoryTypeId="1" PostId="15220" RevisionGUID="55a921b8-af55-4a17-b2ba-55515b3b8cd3" CreationDate="2011-07-26T07:14:47.247" UserId="8563" Text="[box2d] Cutting body" />
  <row Id="34452" PostHistoryTypeId="3" PostId="15220" RevisionGUID="55a921b8-af55-4a17-b2ba-55515b3b8cd3" CreationDate="2011-07-26T07:14:47.247" UserId="8563" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;physics-engine&gt;&lt;objective-c&gt;" />
  <row Id="34453" PostHistoryTypeId="2" PostId="15221" RevisionGUID="6921313d-114a-479d-bb0d-7aba03b066ee" CreationDate="2011-07-26T07:18:28.843" UserId="7640" Text="Hey i'm trying to make a class called `BodyRep` Which is supposed to use SFML too **sync a graphical representation and Box2D Bodies orientation/location.** &#xD;&#xA;&#xD;&#xA;To do this i plan to ovveride some Box2D function so that it does it's original steps, plus one extra: *to update the graphical representaions orientation based on the new Body orientation.*&#xD;&#xA;&#xD;&#xA;However I found this is not as easy as it seems as my class must be a descendent of another class that does the actual updates to the bodies in the World, so it CAN ovveride the function. On top of that, I know there is a ton of itterating in Box2D's solver, and i don't want my graphical reps. being updated if they don't have to yet....&#xD;&#xA;&#xD;&#xA;**So... What CLASS should I Descend from and what FUNCTION should I ovveride?**  &#xD;&#xA;        &#xD;&#xA;&#xD;&#xA; - if you have any other ideas on how i could accomplish my goal of&#xD;&#xA;   syncronization between SFML and Box2D bodies, feel free to suggest&#xD;&#xA;   them! =)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34454" PostHistoryTypeId="1" PostId="15221" RevisionGUID="6921313d-114a-479d-bb0d-7aba03b066ee" CreationDate="2011-07-26T07:18:28.843" UserId="7640" Text="Where would I update a graphical representation of a b2Body in Box2D's solver?" />
  <row Id="34455" PostHistoryTypeId="3" PostId="15221" RevisionGUID="6921313d-114a-479d-bb0d-7aba03b066ee" CreationDate="2011-07-26T07:18:28.843" UserId="7640" Text="&lt;box2d&gt;" />
  <row Id="34456" PostHistoryTypeId="5" PostId="15220" RevisionGUID="fcffac84-cefa-47f6-beaa-c44a0fa1ad9c" CreationDate="2011-07-26T07:30:34.390" UserId="20" Comment="Removed &quot;tag&quot; from title. Minor spelling changes." Text="After cocos2d, I'm looking at box2d... And I have some questions:&#xD;&#xA;&#xD;&#xA;I was wondering **how to cut a body into pieces.**&#xD;&#xA;&#xD;&#xA;1. How do I determine the intersection point of the body with the cut line?&#xD;&#xA;&#xD;&#xA;2. Create a new body in some &quot;update_body_method&quot;?&#xD;&#xA;&#xD;&#xA;On the second question I have answer, for example between two points create vector from first point to second point. " />
  <row Id="34457" PostHistoryTypeId="4" PostId="15220" RevisionGUID="fcffac84-cefa-47f6-beaa-c44a0fa1ad9c" CreationDate="2011-07-26T07:30:34.390" UserId="20" Comment="Removed &quot;tag&quot; from title. Minor spelling changes." Text="Cutting a body in box2d" />
  <row Id="34465" PostHistoryTypeId="2" PostId="15223" RevisionGUID="75a8d847-b108-4209-96f4-87e5f7950a1b" CreationDate="2011-07-26T08:37:49.430" UserId="8860" Text="I'm writing a 2D snake-like game for android (Hungry Birds, already in the market), and now I'm wondering if I should port it to OpenGL so that the performance can stay stable while I continuously add additional features to it. I'm still an apprentice (17yo), so I don't know any &quot;complicated&quot; math yet (matrix transformations, vector math etc). Should I risk the porting?" />
  <row Id="34466" PostHistoryTypeId="1" PostId="15223" RevisionGUID="75a8d847-b108-4209-96f4-87e5f7950a1b" CreationDate="2011-07-26T08:37:49.430" UserId="8860" Text="OpenGL or Canvas?" />
  <row Id="34467" PostHistoryTypeId="3" PostId="15223" RevisionGUID="75a8d847-b108-4209-96f4-87e5f7950a1b" CreationDate="2011-07-26T08:37:49.430" UserId="8860" Text="&lt;2d&gt;&lt;android&gt;&lt;opengl-es&gt;" />
  <row Id="34468" PostHistoryTypeId="2" PostId="15224" RevisionGUID="5e05eb03-89ae-4621-a36b-14605d91f085" CreationDate="2011-07-26T09:28:23.863" UserId="4894" Text="If you don't want (or have time) to learn all the math, i'd suggest you keep on working with Canvas, or using a Game engine that wraps OpenGL and do all the complicated math for you (for example [Andjine][1])&#xD;&#xA;&#xD;&#xA;[1]: http://www.andengine.org/" />
  <row Id="34469" PostHistoryTypeId="25" PostId="15221" RevisionGUID="959895c5-e76c-4695-abbf-67be96ea7eca" CreationDate="2011-07-26T09:32:22.863" Comment="http://twitter.com/#!/StackGameDev/status/95788541229019136" />
  <row Id="34470" PostHistoryTypeId="5" PostId="14905" RevisionGUID="f3a99164-34e6-44de-a976-c5a06cef69f4" CreationDate="2011-07-26T10:04:44.253" UserId="8050" Comment="added 21 characters in body" Text="If you need just to take into account a displacement, you simply have to know where your origin is in standard coordinate system (the one the listener returns).&#xD;&#xA;&#xD;&#xA;Say that your (0,0) is at (150,322), this means that when you get P = (x,y) you can get P' = (x-150,y-322) to get the point in your coordinate system. &#xD;&#xA;&#xD;&#xA;To make it clean try to transform your origin P = (x=150,y=322) =&gt; P' = (150-150,322-322) = (0,0); lets take a point that is 100 pixel on the right to your origin: P = (250,322) =&gt; P' = (250-150,322-322) = (100,0), that is what you need.&#xD;&#xA;&#xD;&#xA;If your coordinate system is not simply a displacement of the one your system provides (rotation, shear, scale involved), a change of homogeneus coordinate system is required.&#xD;&#xA;&#xD;&#xA;  **EDIT:**&#xD;&#xA;&#xD;&#xA;As pointed out, the requirement is that the coordinate system has to produce the same range coordinate even if the view area resizes.&#xD;&#xA;&#xD;&#xA;I assume that the aspect-ratio of the view and the scaled coordinate system is not an issue.&#xD;&#xA;&#xD;&#xA;Let say that the dimensions of your view area size is W x H and your system gives you values for x and y so x: [0,W] and y: [0,H]; we want that the transformed value to be x: [-w,w] and y: [-h,h]. Let start by computing the transformed x:&#xD;&#xA;&#xD;&#xA;x' = x/W =&gt; x : [0,1]; &#xD;&#xA;&#xD;&#xA;x' = x/W &amp;middot; (2w) =&gt; x : [0,2w]; &#xD;&#xA;&#xD;&#xA;x' = ( x/W &amp;middot; (2w) ) - w =&gt; x' : [-w,w] and hence&#xD;&#xA;&#xD;&#xA;y' = (y/H &amp;middot; (2h) ) - h =&gt; y' : [-h,h].&#xD;&#xA;&#xD;&#xA;You have to know - or ask the view for - W and H and set w = 319 and h = 239.&#xD;&#xA;" />
  <row Id="34471" PostHistoryTypeId="5" PostId="14852" RevisionGUID="b2282d31-90a7-49b3-82de-044824761342" CreationDate="2011-07-26T10:08:22.660" UserId="8050" Comment="added 3 characters in body" Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **A** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **A** = **A** + **G** make sure that **G** points toward the planet's center&#xD;&#xA; - update the velocity vector **V** = **V** + **A**&amp;middot;*dt*&#xD;&#xA; - update the position vector **X** = **X** + **V**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**G**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;G is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;As required some hint on implementation. You will need:&#xD;&#xA;&#xD;&#xA; - A vector library &#xD;&#xA; - Engine Model &#xD;&#xA; - Phisics Model&#xD;&#xA; - Collision Detection&#xD;&#xA; - User Interface (input and graphic rendering)&#xD;&#xA;&#xD;&#xA;First of all the vector library: your game can be mono/bi/tree/four... dimentional, as far as you consider your case to be a projection of a 3D word, the physical roules hold.&#xD;&#xA;&#xD;&#xA;If n is the dimension you choose (probably 2 or 3 in your case), the library must have:&#xD;&#xA;&#xD;&#xA; - a vector storage entity (a list of n floating point numbers for each vector)&#xD;&#xA; - a sum operator (sum component by component)&#xD;&#xA; - a scalar multiplication operator (each component multiplied by a float)&#xD;&#xA; - a dot-multiplication between vectors (multiplicate component by component and sum up all)&#xD;&#xA; - the vector length (square root of a vector dot-mutiplied by itself)&#xD;&#xA;&#xD;&#xA;You can use a library that does this or implement one by yourself; a vector can be a struct or a class, the choice is yours.&#xD;&#xA;&#xD;&#xA;Each engine should be described by:&#xD;&#xA;&#xD;&#xA; - a vector indicating its thrust strength and direction&#xD;&#xA; - a scalar that indicates the fuel usage per second when on full power; &#xD;&#xA;&#xD;&#xA;your user input will be used to provide to each engine a number that will be between 0 (unused engine) and 1 (full power): the engine (usage) factor.&#xD;&#xA;&#xD;&#xA;Multiply the engine factor for its thrust vector to obtain the engine real trust and sum up all the results of all the available engines; this will give you the **F** of the second step.&#xD;&#xA;&#xD;&#xA;Your engine factor can be used to know the real fuel usage for each engine: multiply the engine factor by the fuel usage and by *dt* to know the instantaneous fuel usage; you can substract this value from the total fuel capacity variable (this gives you the opportunity to update your total mass *m* if the fuel mass is considerable).&#xD;&#xA;&#xD;&#xA;Now you can proceed using the integration to compute the new position, check for the collision with your planet surface; if any, use the length of the velocity vector to say if the landing was a success or a disaster.&#xD;&#xA;&#xD;&#xA;Obviously other collision checks can/should be made, some surface entities cant be allowed as landing point so every collision is a fatal one.&#xD;&#xA;&#xD;&#xA;I leave how to get input and how to render your spaceship to you; you can use the engine factor to render the engine status frame by frame, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="34472" PostHistoryTypeId="5" PostId="15224" RevisionGUID="af50c269-d72a-4211-85ee-6ffb6d2a3142" CreationDate="2011-07-26T11:28:53.387" UserId="20" Comment="fixed link text" Text="If you don't want (or have time) to learn all the math, i'd suggest you keep on working with Canvas, or using a Game engine that wraps OpenGL and do all the complicated math for you (for example [Andengine][1])&#xD;&#xA;&#xD;&#xA;[1]: http://www.andengine.org/" />
  <row Id="34473" PostHistoryTypeId="2" PostId="15225" RevisionGUID="519d92d7-e837-4c95-a7b3-d89af2c5b178" CreationDate="2011-07-26T11:30:28.987" UserId="2771" Text="There is an implementation of this in the Farseer engine (C#) which is based on Box2D:&#xD;&#xA;&#xD;&#xA;http://farseerphysics.codeplex.com/SourceControl/changeset/view/90041#1436517&#xD;&#xA;&#xD;&#xA;..\Source Files\Common\Polygon Manipulation\CuttingTools.cs&#xD;&#xA;&#xD;&#xA;    // This is a high-level function to cuts fixtures inside the given world, using the start and end points.&#xD;&#xA;    public static void Cut(World world, Vector2 start, Vector2 end, float thickness)&#xD;&#xA;    &#xD;&#xA;    // Split a fixture into 2 vertice collections using the given entry and exit-point.&#xD;&#xA;    public static void SplitShape(Fixture fixture, Vector2 entryPoint, Vector2 exitPoint, float splitSize, out Vertices first, out Vertices second)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34474" PostHistoryTypeId="2" PostId="15226" RevisionGUID="0542d312-fb2b-4e53-9e01-265838e920cc" CreationDate="2011-07-26T12:08:29.500" UserId="744" Text="Box2D's body classes _are not open for subclassing_ (nor are most of its other classes). They come out of a factory method on b2World, and they cannot (should not) be copied.&#xD;&#xA;&#xD;&#xA;Generally, you should be using _composition_ rather than inheritance:&#xD;&#xA;&#xD;&#xA;    struct BodyRep {&#xD;&#xA;        b2Body *physics;&#xD;&#xA;        sf::Sprite *visual;&#xD;&#xA;    }&#xD;&#xA;    ....&#xD;&#xA;    for (BodyRep &amp;e : drawable_bodies) {&#xD;&#xA;        b2Vec2 pos = e.physics-&gt;GetPosition();&#xD;&#xA;        e.visual-&gt;SetPosition(pos.x, pos.y);&#xD;&#xA;        // + whatever other properties you need, e.g. size.&#xD;&#xA;        window.render(*e.visual);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="34475" PostHistoryTypeId="5" PostId="15226" RevisionGUID="3daf2048-9011-4b61-9ddd-219e8a447ee7" CreationDate="2011-07-26T12:21:07.357" UserId="744" Comment="added 1 characters in body" Text="Box2D's body classes _are not open for subclassing_ (nor are most of its other classes). They come out of a factory method on b2World, and they cannot (should not) be copied.&#xD;&#xA;&#xD;&#xA;Generally, you should be using _composition_ rather than inheritance:&#xD;&#xA;&#xD;&#xA;    struct BodyRep {&#xD;&#xA;        b2Body *physics;&#xD;&#xA;        sf::Sprite *visual;&#xD;&#xA;    };&#xD;&#xA;    ....&#xD;&#xA;    for (BodyRep &amp;e : drawable_bodies) {&#xD;&#xA;        b2Vec2 pos = e.physics-&gt;GetPosition();&#xD;&#xA;        e.visual-&gt;SetPosition(pos.x, pos.y);&#xD;&#xA;        // + whatever other properties you need, e.g. size.&#xD;&#xA;        window.Draw(*e.visual);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="34476" PostHistoryTypeId="6" PostId="15220" RevisionGUID="3b7cbde4-d849-4a93-b4b1-66c4012ca3cb" CreationDate="2011-07-26T12:22:55.203" UserId="744" Comment="edited tags" Text="&lt;box2d&gt;&lt;physics-engine&gt;" />
  <row Id="34477" PostHistoryTypeId="5" PostId="14852" RevisionGUID="986e1494-b75a-4577-b454-f5a76bbe9add" CreationDate="2011-07-26T12:25:05.730" UserId="744" Comment="Don't confuse G and g." Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **a** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **a** = **a** + **g** make sure that **g** points toward the planet's center&#xD;&#xA; - update the velocity vector **v** = **v** + **a**&amp;middot;*dt*&#xD;&#xA; - update the position vector **x** = **x** + **v**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**g**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;G is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;As required some hint on implementation. You will need:&#xD;&#xA;&#xD;&#xA; - A vector library &#xD;&#xA; - Engine Model &#xD;&#xA; - Phisics Model&#xD;&#xA; - Collision Detection&#xD;&#xA; - User Interface (input and graphic rendering)&#xD;&#xA;&#xD;&#xA;First of all the vector library: your game can be mono/bi/tree/four... dimentional, as far as you consider your case to be a projection of a 3D word, the physical roules hold.&#xD;&#xA;&#xD;&#xA;If n is the dimension you choose (probably 2 or 3 in your case), the library must have:&#xD;&#xA;&#xD;&#xA; - a vector storage entity (a list of n floating point numbers for each vector)&#xD;&#xA; - a sum operator (sum component by component)&#xD;&#xA; - a scalar multiplication operator (each component multiplied by a float)&#xD;&#xA; - a dot-multiplication between vectors (multiplicate component by component and sum up all)&#xD;&#xA; - the vector length (square root of a vector dot-mutiplied by itself)&#xD;&#xA;&#xD;&#xA;You can use a library that does this or implement one by yourself; a vector can be a struct or a class, the choice is yours.&#xD;&#xA;&#xD;&#xA;Each engine should be described by:&#xD;&#xA;&#xD;&#xA; - a vector indicating its thrust strength and direction&#xD;&#xA; - a scalar that indicates the fuel usage per second when on full power; &#xD;&#xA;&#xD;&#xA;your user input will be used to provide to each engine a number that will be between 0 (unused engine) and 1 (full power): the engine (usage) factor.&#xD;&#xA;&#xD;&#xA;Multiply the engine factor for its thrust vector to obtain the engine real trust and sum up all the results of all the available engines; this will give you the **F** of the second step.&#xD;&#xA;&#xD;&#xA;Your engine factor can be used to know the real fuel usage for each engine: multiply the engine factor by the fuel usage and by *dt* to know the instantaneous fuel usage; you can substract this value from the total fuel capacity variable (this gives you the opportunity to update your total mass *m* if the fuel mass is considerable).&#xD;&#xA;&#xD;&#xA;Now you can proceed using the integration to compute the new position, check for the collision with your planet surface; if any, use the length of the velocity vector to say if the landing was a success or a disaster.&#xD;&#xA;&#xD;&#xA;Obviously other collision checks can/should be made, some surface entities cant be allowed as landing point so every collision is a fatal one.&#xD;&#xA;&#xD;&#xA;I leave how to get input and how to render your spaceship to you; you can use the engine factor to render the engine status frame by frame, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="34478" PostHistoryTypeId="25" PostId="15220" RevisionGUID="573727a5-fd74-45ad-9f4d-48c9ffd692db" CreationDate="2011-07-26T12:32:22.630" Comment="http://twitter.com/#!/StackGameDev/status/95833839728996352" />
  <row Id="34481" PostHistoryTypeId="2" PostId="15228" RevisionGUID="eafe4f07-0179-4324-8f0b-f4a37922a821" CreationDate="2011-07-26T13:32:37.977" UserId="338" Text="I don't think there is a 100% avoidance method, but if you vehicles possess full world informations, you could encase each vehicle into a box whose length depend on its speed, and perform collision check on those boxes. If there is indeed a collision, steer away, with a strength depending on the imminence of impact (or area of the collision between the two boxes), and slow dow (but keep your box the same length during the avoidance operation). &#xD;&#xA;&#xD;&#xA;Obviously this won't work if the vehicles does not posses full informations, but in this case nothing will garanty a 100% avoidance (except, as already said, parallel movement)&#xD;&#xA;&#xD;&#xA;some methods described [here][1] would probably be useful&#xD;&#xA;&#xD;&#xA;regards&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="34482" PostHistoryTypeId="5" PostId="15228" RevisionGUID="d6d885c0-0332-4c5c-a9dd-e2ae33bb47fc" CreationDate="2011-07-26T13:39:54.633" UserId="338" Comment="added a link" Text="I don't think there is a 100% avoidance method, but if you vehicles possess full world informations, you could encase each vehicle into a box whose length depend on its speed, and perform collision check on those boxes. If there is indeed a collision, steer away, with a strength depending on the imminence of impact (or area of the collision between the two boxes), and slow dow (but keep your box the same length during the avoidance operation). &#xD;&#xA;&#xD;&#xA;Obviously this won't work if the vehicles does not posses full informations, but in this case nothing will garanty a 100% avoidance (except, as already said, parallel movement)&#xD;&#xA;&#xD;&#xA;some methods described [here][1] would probably be useful, notably this one :[Unaligned Collision Avoidance steering behavior][2]&#xD;&#xA;&#xD;&#xA;regards&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/&#xD;&#xA;  [2]: http://www.red3d.com/cwr/steer/Unaligned.html" />
  <row Id="34484" PostHistoryTypeId="5" PostId="14852" RevisionGUID="b3f630f5-18ca-4b19-a7a3-ab1a9de34c96" CreationDate="2011-07-26T13:55:21.883" UserId="8050" Comment="Please leave the Bold uppercase for vectors, since G is a scalar the italic uppercase G can suffice" Text="The simplest way is the Euler integration. You have to store position vector and velocity vector. At each frame:&#xD;&#xA;&#xD;&#xA; - measure the time passed since the last integration step: *dt*&#xD;&#xA; - compute the force vecor due your engines: **F**&#xD;&#xA; - compute the acceleration vector: **A** = **F**/*m* where m is the spaceship mass.&#xD;&#xA; - add the gravity vector: **A** = **A** + **G** make sure that **G** points toward the planet's center&#xD;&#xA; - update the velocity vector **V** = **V** + **A**&amp;middot;*dt*&#xD;&#xA; - update the position vector **X** = **X** + **V**&amp;middot;*dt*&#xD;&#xA;&#xD;&#xA;(*x* for scalars, **X** for vectors)&#xD;&#xA;&#xD;&#xA;be sure that *dt* is small...&#xD;&#xA;&#xD;&#xA;|**G**| is about 9.8 for earth and about 1.6 for moon&#xD;&#xA;&#xD;&#xA;in general the actraction Force due the gravital interaction is:&#xD;&#xA;&#xD;&#xA;![Newton's law of universal gravitation][1]&#xD;&#xA;&#xD;&#xA;It affects each body and it points toward the other one.&#xD;&#xA;&#xD;&#xA;The *G* scalar is the very famous *Gravitational constant* it is about 6.67e-011 N(m/Kg)&amp;sup2;&#xD;&#xA;&#xD;&#xA;Since you are interested in acceleration:&#xD;&#xA;&#xD;&#xA;![Acceleration][2]&#xD;&#xA;&#xD;&#xA;You only need to know the planet's mass (m2) and radius (r) to compute your acceleration.&#xD;&#xA;&#xD;&#xA;Typically the acceleration that moves the planet toward your spaceship is negligible because usually m1 is negligible compared to m2. &#xD;&#xA;&#xD;&#xA;However, if you are trying to land to a small asteroid you probably have to use the general formula adding that force to the total force vector in the second step.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;As required some hint on implementation. You will need:&#xD;&#xA;&#xD;&#xA; - A vector library &#xD;&#xA; - Engine Model &#xD;&#xA; - Phisics Model&#xD;&#xA; - Collision Detection&#xD;&#xA; - User Interface (input and graphic rendering)&#xD;&#xA;&#xD;&#xA;First of all the vector library: your game can be mono/bi/tree/four... dimentional, as far as you consider your case to be a projection of a 3D word, the physical roules hold.&#xD;&#xA;&#xD;&#xA;If n is the dimension you choose (probably 2 or 3 in your case), the library must have:&#xD;&#xA;&#xD;&#xA; - a vector storage entity (a list of n floating point numbers for each vector)&#xD;&#xA; - a sum operator (sum component by component)&#xD;&#xA; - a scalar multiplication operator (each component multiplied by a float)&#xD;&#xA; - a dot-multiplication between vectors (multiplicate component by component and sum up all)&#xD;&#xA; - the vector length (square root of a vector dot-mutiplied by itself)&#xD;&#xA;&#xD;&#xA;You can use a library that does this or implement one by yourself; a vector can be a struct or a class, the choice is yours.&#xD;&#xA;&#xD;&#xA;Each engine should be described by:&#xD;&#xA;&#xD;&#xA; - a vector indicating its thrust strength and direction&#xD;&#xA; - a scalar that indicates the fuel usage per second when on full power; &#xD;&#xA;&#xD;&#xA;your user input will be used to provide to each engine a number that will be between 0 (unused engine) and 1 (full power): the engine (usage) factor.&#xD;&#xA;&#xD;&#xA;Multiply the engine factor for its thrust vector to obtain the engine real trust and sum up all the results of all the available engines; this will give you the **F** of the second step.&#xD;&#xA;&#xD;&#xA;Your engine factor can be used to know the real fuel usage for each engine: multiply the engine factor by the fuel usage and by *dt* to know the instantaneous fuel usage; you can substract this value from the total fuel capacity variable (this gives you the opportunity to update your total mass *m* if the fuel mass is considerable).&#xD;&#xA;&#xD;&#xA;Now you can proceed using the integration to compute the new position, check for the collision with your planet surface; if any, use the length of the velocity vector to say if the landing was a success or a disaster.&#xD;&#xA;&#xD;&#xA;Obviously other collision checks can/should be made, some surface entities cant be allowed as landing point so every collision is a fatal one.&#xD;&#xA;&#xD;&#xA;I leave how to get input and how to render your spaceship to you; you can use the engine factor to render the engine status frame by frame, for example.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sITbg.gif&#xD;&#xA;  [2]: http://i.stack.imgur.com/Ne5ND.gif" />
  <row Id="34485" PostHistoryTypeId="2" PostId="15229" RevisionGUID="c3000960-0a41-4fac-8785-bcc3a00c78f4" CreationDate="2011-07-26T15:24:55.163" UserId="1430" Text="It's probably safe to say that BDD, like TDD, or (insert trendy development buzzword-paradigm here) is used by some game developers somewhere, but they probably don't know they are nor would they neccessarily be able to identify what BDD actually means. The question is really *how much* they use it and how much do they *have* to use it for it to matter to you? &#xD;&#xA;&#xD;&#xA;For example, where I work, all our unit test names are &quot;sentences&quot; like Dan North suggests in that article you linked. That alone isn't sufficient to say that we use BDD, of course, but maybe it's what you really care about?&#xD;&#xA;&#xD;&#xA;The focus, in my opinion, should not be on which buzzword you apply at a studio, but rather which productivity and development process techniques you employ overall. I find that the most productive teams are mixing and matching techniques from a variety of &quot;buzzword-paradigms&quot; rather than committing, dogmatically, to every bit of rigid doctrine some internet study says comprises one particular buzzword-paradigm.&#xD;&#xA;&#xD;&#xA;I see this most often with the Agile trend: teams that identify themselves as &quot;doing Agile&quot; tend to be more inflexible (ironically) about the process than teams that are organically incorporating the bits of Agile that make sense for them. The former teams almost always end up being less productive, in my experience.&#xD;&#xA;&#xD;&#xA;A development team is made up of humans, who are not interchangeable cogs in a machine. They operate uniquely as individuals and as the unique combination of themselves. The way to effective development is not to bend your humans into the {BDD, Agile, WhateverIsNext} mold but to be constantly re-assessing how the team is progressing and shoring up deficiences in the process, replacing broken techqniues, and reinforcing things that are working. In short, to focus on shipping a title and not on &quot;being Agile (or whatever).&quot;" />
  <row Id="34486" PostHistoryTypeId="25" PostId="15215" RevisionGUID="e4ae4767-8065-4635-9323-812dabfd3a39" CreationDate="2011-07-26T15:32:23.363" Comment="http://twitter.com/#!/StackGameDev/status/95879138946203648" />
  <row Id="34487" PostHistoryTypeId="2" PostId="15230" RevisionGUID="e8ed8c98-90f0-4046-8c8f-b3b0963447d4" CreationDate="2011-07-26T15:35:46.607" UserId="8867" Text="I would like to identify the name of a certain gameplay mechanism. It is fairly commonly seen but probably best illustrated with card games:&#xD;&#xA;&#xD;&#xA;A game played with a pack of cards usually has card values ordered in the following way:&#xD;&#xA;A&gt;K&gt;Q&gt;J&gt;10&gt;9&gt;8&gt;7&gt;6&gt;5&gt;4&gt;3&gt;2.&#xD;&#xA;&#xD;&#xA;Sometimes the lowest-ranked card (in this case 2) is specially ruled to trump the highest-ranked card (in this case A), is there a proper name for such a mechanism?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34488" PostHistoryTypeId="1" PostId="15230" RevisionGUID="e8ed8c98-90f0-4046-8c8f-b3b0963447d4" CreationDate="2011-07-26T15:35:46.607" UserId="8867" Text="Name of a certain gameplay mechanism" />
  <row Id="34489" PostHistoryTypeId="3" PostId="15230" RevisionGUID="e8ed8c98-90f0-4046-8c8f-b3b0963447d4" CreationDate="2011-07-26T15:35:46.607" UserId="8867" Text="&lt;game-mechanics&gt;&lt;balance&gt;&lt;card-game&gt;&lt;gameplay&gt;" />
  <row Id="34490" PostHistoryTypeId="2" PostId="15231" RevisionGUID="acae2b50-27ba-40bc-b027-dd6a446edc45" CreationDate="2011-07-26T15:53:10.023" UserId="8869" Text="I have a Dance Pad and i want use it in xna like a controller.  &#xD;&#xA;Dance pad have a usb connection ad is Hid. &#xD;&#xA;someone can help me?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;" />
  <row Id="34491" PostHistoryTypeId="1" PostId="15231" RevisionGUID="acae2b50-27ba-40bc-b027-dd6a446edc45" CreationDate="2011-07-26T15:53:10.023" UserId="8869" Text="How use pc dance Pad with Xna?" />
  <row Id="34492" PostHistoryTypeId="3" PostId="15231" RevisionGUID="acae2b50-27ba-40bc-b027-dd6a446edc45" CreationDate="2011-07-26T15:53:10.023" UserId="8869" Text="&lt;xna&gt;" />
  <row Id="34494" PostHistoryTypeId="2" PostId="15233" RevisionGUID="34969ceb-7754-4d8f-b948-d8541036802c" CreationDate="2011-07-26T16:03:04.413" UserId="1430" Text="It sounds like you are describing an extension of the rock-paper-scissors mechanic whereby every piece/card/token can defeat at least one other piece/card/token. &#xD;&#xA;&#xD;&#xA;(Your question made me think of Stratego, and specifically of the few pieces like the low-ranked Spy who can defeat the otherwise-top-ranked Marshal and the Miner who can defuse bombs.)" />
  <row Id="34495" PostHistoryTypeId="2" PostId="15234" RevisionGUID="b87ab2a8-2bde-466b-ac57-369e843a77bb" CreationDate="2011-07-26T16:05:00.950" UserId="7561" Text="It may be that it really is just referred to as **trumping**, and that the mechanism would simply be &quot;having a **trump**&quot;, or **trump rule variation** as AttackingHobo suggested.&#xD;&#xA;&#xD;&#xA;[This Wikipedia article][1] discusses the idea, but it seems to usually refer to suit trumping.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Trump#Trumps_in_card_games" />
  <row Id="34496" PostHistoryTypeId="2" PostId="15235" RevisionGUID="1b4ef956-047e-4e3c-8c2f-ac73033625a6" CreationDate="2011-07-26T16:05:31.870" UserId="1430" Text="iirc, XNA does not have support itself for non-XInput controllers. This means you'll have to use another API to access your dance pad (and you'll be limiting yourself to the PC in that case). &#xD;&#xA;&#xD;&#xA;[Here][1] is a blog post describing some options for non-360 controller support in XNA 3.1. The techniques should scale to 4.0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ksgamedev.wordpress.com/2011/02/23/using-non-xbox-controllers-with-xna-3-1/" />
  <row Id="34498" PostHistoryTypeId="2" PostId="15236" RevisionGUID="01f01b46-bcb1-4433-a3e1-4ed88c4aa97b" CreationDate="2011-07-26T18:10:00.513" UserId="1101" Text="Is it? Maybe. My opinion would be that it would make for a very poor fit for entertainment software generally, although it might work well for the low level libraries." />
  <row Id="34499" PostHistoryTypeId="25" PostId="15230" RevisionGUID="a452c7b4-9443-428c-aeea-9f7590fa133e" CreationDate="2011-07-26T18:32:23.960" Comment="http://twitter.com/#!/StackGameDev/status/95924441976012801" />
  <row Id="34504" PostHistoryTypeId="2" PostId="15237" RevisionGUID="08a8a32e-6e08-4211-80ab-9c9abff49765" CreationDate="2011-07-26T19:17:50.997" UserId="8871" Text="My 2D isometric game uses a hexagonal map. I have problem to rotate selected area by 60 degrees. Anybody can tell me how to do this? I'm talking about something like this: http://www.algonet.se/~afb/spriteworld/ongoing/HexMap.jpg I wanna to rotate the bright blue hexes around pink hex.&#xD;&#xA;&#xD;&#xA;Sorry for my bad english." />
  <row Id="34505" PostHistoryTypeId="1" PostId="15237" RevisionGUID="08a8a32e-6e08-4211-80ab-9c9abff49765" CreationDate="2011-07-26T19:17:50.997" UserId="8871" Text="Rotate hexagonal map" />
  <row Id="34506" PostHistoryTypeId="3" PostId="15237" RevisionGUID="08a8a32e-6e08-4211-80ab-9c9abff49765" CreationDate="2011-07-26T19:17:50.997" UserId="8871" Text="&lt;2d&gt;&lt;maps&gt;" />
  <row Id="34507" PostHistoryTypeId="2" PostId="15238" RevisionGUID="7ccecda4-8eb4-42e9-b99c-b9fb6db4e8c1" CreationDate="2011-07-26T19:35:25.457" UserId="8453" Text="I am looking for free to use (commercially) art for a small app I am making. Specifically I need some sort of animal (any animal will do), in three positions: &#xD;&#xA;&#xD;&#xA; 1. Standing idle&#xD;&#xA; 2. Leaping sideways&#xD;&#xA; 3. Stationary holding onto a wall to its left/right&#xD;&#xA;&#xD;&#xA;I am not looking for someone to make these custom for me, just need some free art available on the internet. If you know of something similar, please post anyway, it will help!" />
  <row Id="34508" PostHistoryTypeId="1" PostId="15238" RevisionGUID="7ccecda4-8eb4-42e9-b99c-b9fb6db4e8c1" CreationDate="2011-07-26T19:35:25.457" UserId="8453" Text="Free animation/sprite art" />
  <row Id="34509" PostHistoryTypeId="3" PostId="15238" RevisionGUID="7ccecda4-8eb4-42e9-b99c-b9fb6db4e8c1" CreationDate="2011-07-26T19:35:25.457" UserId="8453" Text="&lt;animation&gt;&lt;sprites&gt;&lt;art&gt;" />
  <row Id="34510" PostHistoryTypeId="2" PostId="15239" RevisionGUID="17a9a3a3-7009-4648-b606-89825c4c63e6" CreationDate="2011-07-26T20:04:31.227" UserId="5459" Text="I want to implement deformation of plastic material, like plasticine for example. Where should I start to study? What technique should I use?&#xD;&#xA;&#xD;&#xA;Thank you for any advice." />
  <row Id="34511" PostHistoryTypeId="1" PostId="15239" RevisionGUID="17a9a3a3-7009-4648-b606-89825c4c63e6" CreationDate="2011-07-26T20:04:31.227" UserId="5459" Text="Implementing material deformation" />
  <row Id="34512" PostHistoryTypeId="3" PostId="15239" RevisionGUID="17a9a3a3-7009-4648-b606-89825c4c63e6" CreationDate="2011-07-26T20:04:31.227" UserId="5459" Text="&lt;math&gt;&lt;physics&gt;" />
  <row Id="34513" PostHistoryTypeId="2" PostId="15240" RevisionGUID="cd3b958b-8f1a-4ac0-a39f-757398555f1b" CreationDate="2011-07-26T20:21:19.837" UserId="8857" Text="Is this for use in a real-time game or as a high-accuracy simulation? If you're just looking at it as an effect for a game, then it's quite possible that you could get away with using a procedural texture, determined by CPU, combined with a vertex-shader to move your vertices about as desired at run-time.&#xD;&#xA;&#xD;&#xA;If you're interested in accuracy, then you would need to take into account various material properties, such as Young's Modulus, limit of elasticity, Hardness, etc. (I'm not a material scientist so I don't know all of the variables affecting plastic/elastic deformation). I guess you'd first determine how accurate you want your simulation to be, and then just use this [article][1] to find out what variables you need, and then search for each of those variables for each material you want ([this site][2] is useful). You would then presumably have a very-high polygon object, or tessellate it as necessary.&#xD;&#xA;&#xD;&#xA;I also imagine you would have to have per-vertex collision detection, to ensure you don't end up with impossible shapes (self-intersection tests etc.), also, you could use the tesselation feature in DirectX 11, as mentioned earlier, to help smoothen your shape as you deform it (a cube only needs 6 faces, but when morphed you'll need to add more faces). &#xD;&#xA;&#xD;&#xA;Hope this helps, I'd like to see how your project progresses! :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Deformation_%28mechanics%29&#xD;&#xA;  [2]: http://www.wolframalpha.com/" />
  <row Id="34514" PostHistoryTypeId="5" PostId="15239" RevisionGUID="46e67a9d-a027-4131-baf1-fe8a26b5b1af" CreationDate="2011-07-26T20:38:02.773" UserId="5459" Comment="corrected question" Text="I want to implement deformation of plastic material, like plasticine for example. Where should I start to study? What technique should I use?&#xD;&#xA;&#xD;&#xA;Thank you for any advice.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;I want to use it in real-time in kind of a 3D game, not a physics simulation. When I &quot;push&quot; on the plasticine, it is expected to spill. I want to rotate it or any other actions.&#xD;&#xA;&#xD;&#xA;Look at this video: http://www.youtube.com/watch?v=mDbVHEg5qC4  " />
  <row Id="34515" PostHistoryTypeId="5" PostId="15237" RevisionGUID="e6009df5-a9e5-4331-9168-e8105360f41b" CreationDate="2011-07-26T21:02:19.403" UserId="7888" Comment="Clarified question and title; included linked image in question; added relevant tags" Text="My 2D isometric game uses a hexagonal grid map. In reference to the image below, how do I rotate the light blue hexagon structures by 60 degrees around the pink hexagons?&#xD;&#xA;&#xD;&#xA;![http://www.algonet.se/~afb/spriteworld/ongoing/HexMap.jpg][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/LrCok.jpg" />
  <row Id="34516" PostHistoryTypeId="4" PostId="15237" RevisionGUID="e6009df5-a9e5-4331-9168-e8105360f41b" CreationDate="2011-07-26T21:02:19.403" UserId="7888" Comment="Clarified question and title; included linked image in question; added relevant tags" Text="How do I rotate a structure of hexagonal tiles on a hexagonal grid?" />
  <row Id="34517" PostHistoryTypeId="6" PostId="15237" RevisionGUID="e6009df5-a9e5-4331-9168-e8105360f41b" CreationDate="2011-07-26T21:02:19.403" UserId="7888" Comment="Clarified question and title; included linked image in question; added relevant tags" Text="&lt;2d&gt;&lt;maps&gt;&lt;rotation&gt;&lt;grid&gt;" />
  <row Id="34518" PostHistoryTypeId="24" PostId="15237" RevisionGUID="e6009df5-a9e5-4331-9168-e8105360f41b" CreationDate="2011-07-26T21:02:19.403" Comment="Proposed by 7888 approved by 51 edit id of 581" />
  <row Id="34519" PostHistoryTypeId="5" PostId="15238" RevisionGUID="b6a7fcda-6b75-498d-9b65-16c13ec8d79a" CreationDate="2011-07-26T21:02:36.953" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am looking for free to use (commercially) art for a small app I am making. Specifically I need some sort of animal (any animal will do), in three positions: &#xD;&#xA;&#xD;&#xA; 1. Standing idle&#xD;&#xA; 2. Leaping sideways&#xD;&#xA; 3. Stationary holding onto a wall to its left/right&#xD;&#xA;&#xD;&#xA;I am not looking for someone to make these custom for me, just need some free art available on the internet. If you know of something similar, please post anyway, it will help!" />
  <row Id="34520" PostHistoryTypeId="10" PostId="15238" RevisionGUID="5961d249-dca1-4f22-ba6d-111e24c456d7" CreationDate="2011-07-26T21:02:36.470" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="34521" PostHistoryTypeId="25" PostId="15231" RevisionGUID="3446fa89-44b8-430d-ab6a-d920d9eb4d7a" CreationDate="2011-07-26T21:32:23.913" Comment="http://twitter.com/#!/StackGameDev/status/95969740362747905" />
  <row Id="34522" PostHistoryTypeId="2" PostId="15241" RevisionGUID="79ba4291-0d35-4192-bb8c-26597cb6812a" CreationDate="2011-07-26T22:22:04.890" UserId="8873" Text="There is [GameFromScratch.com][1] which is primarily about creating a video game from scratch favouring freely available tools where possible.  There are also various posts on game dev in general but generally are targeted towards [complete beginners][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamefromscratch.com&#xD;&#xA;  [2]: http://www.gamefromscratch.com/post/2011/07/25/I-want-to-be-a-game-developer.aspx" />
  <row Id="34523" PostHistoryTypeId="16" PostId="15241" RevisionGUID="c9661f42-f958-42a6-bf73-dd71f338f11d" CreationDate="2011-07-26T22:22:04.890" UserId="8873" />
  <row Id="34524" PostHistoryTypeId="2" PostId="15242" RevisionGUID="049ebe38-0859-4de5-85c4-0762aa73d3ae" CreationDate="2011-07-26T23:13:45.463" UserId="4690" Text="It appears that my Update function was being called at least twice before anything was being displayed, and that even though the bullets were part of the collection they were becoming disabled before being drawn and thus textures not loaded (?!?).&#xD;&#xA;&#xD;&#xA;By setting the lifetime (which is decremented once per Update, and when lifetime = 0 the bullets are no longer Visible/Enabled) of each Bullet to 3 or greater (this may vary depending on CPU speed?) when I instantiate the Bullets as part of the ship class, the textures are properly loaded at the beginning of the game.&#xD;&#xA;&#xD;&#xA;I'm still not sure why manually setting them to Enabled/Visible at creation doesn't force the texture to be loaded." />
  <row Id="34525" PostHistoryTypeId="2" PostId="15243" RevisionGUID="49e55a05-f2da-4df9-b2ba-d4732c731d3c" CreationDate="2011-07-26T23:23:54.880" UserId="8876" Text="What is the best cross-platform game engine there is for free available for development on Linux? I'm planning on creating multiple, non-commercial, fps games to gain real industry experience in C++ game development." />
  <row Id="34526" PostHistoryTypeId="1" PostId="15243" RevisionGUID="49e55a05-f2da-4df9-b2ba-d4732c731d3c" CreationDate="2011-07-26T23:23:54.880" UserId="8876" Text="Whats the best cross-platform game engine?" />
  <row Id="34527" PostHistoryTypeId="3" PostId="15243" RevisionGUID="49e55a05-f2da-4df9-b2ba-d4732c731d3c" CreationDate="2011-07-26T23:23:54.880" UserId="8876" Text="&lt;c++&gt;&lt;engine&gt;&lt;cross-platform&gt;" />
  <row Id="34528" PostHistoryTypeId="2" PostId="15244" RevisionGUID="101b7018-06e9-45dc-80ef-ecedc562b7c5" CreationDate="2011-07-26T23:38:41.540" UserId="8857" Text="Firstly, &quot;best&quot; is a rather subjective term, personally, I enjoy working with the Source engine (at least, the client and server which plug in to the base source engine, and determine your game play), making a MOD with a recent industry-standard engine is probably the closest you'll get to working within the confines of a restricted codebase in the industry. Other's swear by the Quake engine for it's open-source qualities, and other's prefer various other engines.&#xD;&#xA;&#xD;&#xA;If you are looking for industry experience, then I would say that it would be extremely advisable to develop your own engine, to get an idea of the scale of development that goes into producing a marketable industry-quality game. You will learn how to handle graphics development, AI development, handling performance and optimization of your code, understanding what goes into making a game cross-platform, and hopefully, have an enjoyable time. If you do decide to go down this route, I would recommend OpenGL for it's cross-platform ability, however, most games are written for Windows, so DirectX with an OpenGL fallback is also a possibility (this also allows you to learn about dynamic linking of DLLs etc.)&#xD;&#xA;&#xD;&#xA;Although you may only be interested primarily in one field (AI Programming, Weapons programming, Physics programming etc.), building your own game-engine demonstrates to a potential employer that you are, firstly, passionate about game programming and dedicated enough to do something about it, and secondly, have a well-rounded understanding of game development, which is extremely desirable especially for a senior programmer).&#xD;&#xA;&#xD;&#xA;Personally, other than the Source engine, I've never used another's engine for an FPS, however, I have heard good things about the [cafu engine][1], which is supposed to be cross-platform and relatively recent (and with good access to it's rendering process etc.)&#xD;&#xA;&#xD;&#xA;I hope this helps you to make a decision, and good luck with your future career in the gaming industry! :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cafu.de/" />
  <row Id="34529" PostHistoryTypeId="5" PostId="15244" RevisionGUID="25334a3e-6728-48b6-8f62-dc477da98963" CreationDate="2011-07-26T23:43:56.137" UserId="8857" Comment="Improved Grammar " Text="Firstly, &quot;best&quot; is a rather subjective term, personally, I enjoy working with the Source engine (at least, the client and server which plug in to the base source engine, and determine your game play), making a MOD with a recent industry-standard engine is probably the closest you'll get to working within the confines of a restricted codebase in the industry. Others swear by the Quake engine for it's open-source qualities, and other's prefer various other engines.&#xD;&#xA;&#xD;&#xA;If you are looking for industry experience, then I would say that it would be extremely advisable to develop your own engine, to get an idea of the scale of development that goes into producing a marketable industry-quality game. You will learn how to handle graphics development, AI development, handling performance and optimization of your code, understanding what goes into making a game cross-platform, and hopefully, have an enjoyable time. If you do decide to go down this route, I would recommend OpenGL for it's cross-platform ability, however, most games are written for Windows, so DirectX with an OpenGL fallback is also a possibility (this also allows you to learn about dynamic linking of DLLs etc.)&#xD;&#xA;&#xD;&#xA;Although you may only be interested primarily in one field (AI Programming, Weapons programming, Physics programming etc.), building your own game-engine demonstrates to a potential employer that you are, firstly, passionate about game programming and dedicated enough to do something about it, and secondly, have a well-rounded understanding of game development, which is extremely desirable especially for a senior programmer).&#xD;&#xA;&#xD;&#xA;Personally, other than the Source engine, I've never used another's engine for an FPS, however, I have heard good things about the [cafu engine][1], which is supposed to be cross-platform and relatively recent (and with good access to it's rendering process etc.)&#xD;&#xA;&#xD;&#xA;I hope this helps you to make a decision, and good luck with your future career in the gaming industry! :)&#xD;&#xA;&#xD;&#xA;EDIT: With regards to your edited question, I believe [OGRE][2] has a lot of commercial support, and has a regularly updated code-base (and fulfills all of your other criterion). However, I would still recommend writing your own engine, for the reasons highlighted above. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cafu.de/&#xD;&#xA;  [2]: http://www.ogre3d.org/" />
  <row Id="34530" PostHistoryTypeId="5" PostId="15243" RevisionGUID="efd5a67d-ac4b-489d-b5d9-222ac7442d93" CreationDate="2011-07-26T23:44:47.420" UserId="8876" Comment="added 40 characters in body" Text="What is the best cross-platform game engine, being the most commercially supported, there is for free available for development on Linux? I'm planning on creating multiple, non-commercial, fps games to gain real industry experience in C++ game development." />
  <row Id="34531" PostHistoryTypeId="4" PostId="15243" RevisionGUID="efed0aa6-9f41-40f2-bf2e-b06e65dc9f07" CreationDate="2011-07-27T00:01:52.313" UserId="51" Comment="edited title" Text="Whats the best cross-platform game engine that supports Linux?" />
  <row Id="34532" PostHistoryTypeId="5" PostId="15236" RevisionGUID="ba3e25ce-36b6-47d2-94d8-888c26703463" CreationDate="2011-07-27T00:30:41.073" UserId="1101" Comment="Justified my position!" Text="Is it? Maybe. My opinion would be that it would make for a very poor fit for entertainment software generally, although it might work well for the low level libraries.&#xD;&#xA;&#xD;&#xA;EDIT: Here's some justification for my opinion.&#xD;&#xA;&#xD;&#xA;Wikipedia defines BDD as a technique that *&quot;encourages collaboration between developers, QA and non-technical or business participants in a software project.&quot;* This already sounds like a bad idea because games differ from most software in that they are not designed as tools to meet a specific need for a 'non-technical or business participant', but are cohesive works broadly designed to entertain. There is an emphasis on &quot;desired software behaviour&quot; but games rarely have 'desired software behaviour' except at the technical level. There is definitely merit in checking that part of the code, but not with the end user, because they will never see it.&#xD;&#xA;&#xD;&#xA;But let's assume that you want to throw out that human stakeholder stuff and just use BDD to enforce contracts between different code modules, which as far as I can see doesn't differ much from normal test-driven development, which I also consider poorly-suited to games, for the following reason.&#xD;&#xA;&#xD;&#xA;Tests are useful for checking that discrete events happened when expected. This works well in event-driven programming, ie. most of the software world, where an action is performed, some output is generated, and then you just verify that the action and the result match up. However, game software is typically a simulation, where an action does not have a discrete result but a continuous change in the world state. If my hidden player makes a noise, I might want to check that the AI hunts me down. So, I can create a test to make sure that the AI is in 'hunting' state after a noise is created, and that's great. But how do I know the hunting even works? You can't check that instantly - you can only observe it over the passage of time. You can hack in various tests to test certain aspects but this is not well-suited to a typical testing approach.&#xD;&#xA;&#xD;&#xA;Additionally, a test-first approach can create a false sense of security, and lead people to believe code is better than it really is.&#xD;&#xA;&#xD;&#xA;    def check_dice_roll_in_range():&#xD;&#xA;        d = new Dice()&#xD;&#xA;        assert(d.roll() between 1 and 6)&#xD;&#xA;&#xD;&#xA;    class Dice:&#xD;&#xA;        def roll():&#xD;&#xA;            return 4&#xD;&#xA;&#xD;&#xA;Since a test result can give a false positive, you can never escape the basic need to check the code itself. But if the code itself is checked adequately, the test takes on secondary importance. This is why, in my opinion, tests are best used after the event, to test bug fixes.&#xD;&#xA;&#xD;&#xA;I wouldn't argue that there's never any benefit in testing that, when objects X and Y work together, the result you get is as expected. The issue is whether you are using the most effective way of verifying this. Methods could include formal verification, a code review, test-first methods, test-last methods, traditional QA black-box testing, or simply using the code as expected and observing the results. The last two options are surprisingly effective most of the time, because despite sounding like they lack rigour, most bugs are found during the course of typical use, and understanding a bug in its natural context can sometimes be easier than understanding it in an artificial test harness. On top of this, formal testing and verification often fails to find problems because (by definition) you can only test for the scenarios you expect - and it's not the expected scenarios that are typically the cause of poor software quality.&#xD;&#xA;&#xD;&#xA;So, in summary, I think that test driven development is not necessarily a great choice for software, that tests alone are never sufficient to ensure software quality (and thus the time spent writing them must be compared against alternative uses of that developer time), that games are an especially poor match for automated test cases, and that games are an especially poor match for development methods that look to emphasis 'business value' and 'acceptance testing'.&#xD;&#xA;&#xD;&#xA;(Hopefully that is a better answer, even if you don't agree with my points.)" />
  <row Id="34533" PostHistoryTypeId="25" PostId="15239" RevisionGUID="caa4987e-bdf6-48a6-b5e4-59e688bded63" CreationDate="2011-07-27T00:32:24.227" Comment="http://twitter.com/#!/StackGameDev/status/96015039030505472" />
  <row Id="34534" PostHistoryTypeId="25" PostId="15237" RevisionGUID="1e14d855-10b6-4c1d-b149-ec0254bb65e6" CreationDate="2011-07-27T03:32:25.163" Comment="http://twitter.com/#!/StackGameDev/status/96060341900951552" />
  <row Id="34535" PostHistoryTypeId="2" PostId="15245" RevisionGUID="89968c09-4e3b-4dbc-a48f-45abb5f2ebd7" CreationDate="2011-07-27T03:40:39.913" UserId="8227" Text="So as it turns out you should put as little on the Cocos thread as you can. Things you schedule here get run for every frane! It's sometimes an easy way to get things synced between GUI and background logic, but it will make your game slow." />
  <row Id="34536" PostHistoryTypeId="5" PostId="15070" RevisionGUID="7af690d5-dcfa-49bc-84af-244f31ca7fe4" CreationDate="2011-07-27T05:09:22.347" UserId="7454" Comment="deleted 45 characters in body" Text="I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion).  I want the target to rotate and be facing right at the player.  The target, when it shoots something should shoot right at the player.  &#xD;&#xA;&#xD;&#xA;I've seen plenty of examples of slerping to the player, but I don't want incremental rotation, well, I suppose that would be ok as long as I can make the slerp be 100%, and as long as it actually worked.&#xD;&#xA;&#xD;&#xA;FYI - Im able to use the position and rotation to do plenty of other things and it all works great except this last piece I cant figure out.&#xD;&#xA;&#xD;&#xA;Code samples run in the Target's class, Position = the targets position, Avatar = the player.&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;Im now using Maik's c# code he has provided and it works great!&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb199001%28v=XNAGameStudio.10%29.aspx&#xD;&#xA;" />
  <row Id="34537" PostHistoryTypeId="2" PostId="15246" RevisionGUID="15b9b3b9-f764-4710-b48c-6d87d17565db" CreationDate="2011-07-27T05:26:51.680" UserId="3327" Text="I am currently keeping a blog about the Android game I am working on. The game is in a very early stage and I consider myself a novice developer (the game is only my second real game), but I keep up with it regularly. Also contributing is the second half of my two-man team, the artist. We're keeping the blog mostly as a learning experience for ourserlves, but if you are interested, you can follow it at [rawdev.tumblr.com][1]. We always welcome any feedback as well!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rawdev.tumblr.com" />
  <row Id="34538" PostHistoryTypeId="16" PostId="15246" RevisionGUID="7ef17683-d5ff-4462-94a1-3732ddff6bb9" CreationDate="2011-07-27T05:26:51.680" UserId="3327" />
  <row Id="34539" PostHistoryTypeId="5" PostId="15246" RevisionGUID="48811640-02d7-40ce-a95f-8698c4051909" CreationDate="2011-07-27T05:47:49.057" UserId="3327" Comment="Added top link" Text="[RAWdev][1]&#xD;&#xA;&#xD;&#xA;I am currently keeping a blog about the Android game I am working on. The game is in a very early stage and I consider myself a novice developer (the game is only my second real game), but I keep up with it regularly. Also contributing is the second half of my two-man team, the artist. We're keeping the blog mostly as a learning experience for ourserlves, but if you are interested, you can follow it at [rawdev.tumblr.com][1]. We always welcome any feedback as well!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://rawdev.tumblr.com" />
  <row Id="34540" PostHistoryTypeId="2" PostId="15247" RevisionGUID="177a04ab-0ffa-4248-9b09-35701b5c00a6" CreationDate="2011-07-27T06:40:09.230" UserId="7787" Text="I'm working on my combo system and I keep getting this weird problem. It's a pretty basic setup: when the player hits the attack button it changes the character's current action to &quot;attack&quot;, if the player hits an enemy then an int (f) is set to the next combo number, after the attack finishes the character's current action turns to &quot;standing&quot; and an if statement makes the combo int equal to f.&#xD;&#xA;&#xD;&#xA;So basically it reads like this:&#xD;&#xA;&#xD;&#xA;    switch (action)&#xD;&#xA;    {&#xD;&#xA;        case &quot;attack&quot;:&#xD;&#xA;            if (combo == 0)&#xD;&#xA;            {&#xD;&#xA;                if (enemy.Hit(playerSquare))&#xD;&#xA;                {&#xD;&#xA;                    f = 1;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    f = 0;&#xD;&#xA;                }&#xD;&#xA;                if (animationDone)&#xD;&#xA;                {&#xD;&#xA;                    action = &quot;stand&quot;;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            else if (combo == 1)&#xD;&#xA;            {&#xD;&#xA;                same&#xD;&#xA;            }&#xD;&#xA;            else if (combo == 2)&#xD;&#xA;            {&#xD;&#xA;                same&#xD;&#xA;            }&#xD;&#xA;            break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    if (action != &quot;attack&quot;)&#xD;&#xA;    {&#xD;&#xA;        combo = f;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My setup works, however, if I press the attack button too quickly it either doesn't add to the combo int (keeping it at the same number as before) or adds to it twice (depending on whether or not I slow it's update rate.) I'm sure there's probably an easy way to fix this and I'm not seeing it or maybe there's a better way to do this that I haven't considered yet, so I'm hoping you guys can help out. Any suggestions?" />
  <row Id="34541" PostHistoryTypeId="1" PostId="15247" RevisionGUID="177a04ab-0ffa-4248-9b09-35701b5c00a6" CreationDate="2011-07-27T06:40:09.230" UserId="7787" Text="How can I fix my combo system?" />
  <row Id="34542" PostHistoryTypeId="3" PostId="15247" RevisionGUID="177a04ab-0ffa-4248-9b09-35701b5c00a6" CreationDate="2011-07-27T06:40:09.230" UserId="7787" Text="&lt;xna&gt;&lt;c#&gt;&lt;gameplay&gt;" />
  <row Id="34543" PostHistoryTypeId="2" PostId="15248" RevisionGUID="07a48145-6959-4743-861d-82d72b0c5623" CreationDate="2011-07-27T07:20:42.953" UserId="20" Text="I don't really understand how your states work, but your code seems like a really complicated way to do this. Why not do something like:&#xD;&#xA;&#xD;&#xA;    switch (action)&#xD;&#xA;    {&#xD;&#xA;        case &quot;attack&quot;:&#xD;&#xA;            if (animationDone){&#xD;&#xA;                action = &quot;attackComplete&quot;;&#xD;&#xA;                break;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if(enemy.Hit(playerSquare)){&#xD;&#xA;                f++; // increase f with every successful hit&#xD;&#xA;            } else {&#xD;&#xA;                f = 0; // reset the combo-counter&#xD;&#xA;            }&#xD;&#xA;            break;&#xD;&#xA;&#xD;&#xA;        case &quot;attackComplete&quot;:&#xD;&#xA;            combo = f; // store previous combo&#xD;&#xA;            f = 0; // reset f&#xD;&#xA;            action = &quot;stand&quot;;&#xD;&#xA;            break;&#xD;&#xA;&#xD;&#xA;        case &quot;stand&quot;:&#xD;&#xA;            // do whatever here&#xD;&#xA;            break;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But this might not solve your problem at all, since the way `f` is increased entirely depends on when and where you call that code." />
  <row Id="34544" PostHistoryTypeId="2" PostId="15249" RevisionGUID="5409f287-7b9e-4c6e-8343-96d7c77aff21" CreationDate="2011-07-27T08:24:06.797" UserId="5119" Text="&#xD;&#xA;I'm learning OpenGL and really like to know how the interaction with the Graphics card will be.&#xD;&#xA;&#xD;&#xA;I feel understanding how it was implemented in the Graphics driver, will let me know complete internals of the opengl(With this I can know what stages/factors influence my decisions regarding performance in opengl).&#xD;&#xA;&#xD;&#xA;Are there any ways for this path to proceed.Does exploring the 'Mesa lib' will help me in this aspect? Am I in the right path?&#xD;&#xA;&#xD;&#xA;[I posted this question in SOF but it seems here is the right place for this Question.]&#xD;&#xA;" />
  <row Id="34545" PostHistoryTypeId="1" PostId="15249" RevisionGUID="5409f287-7b9e-4c6e-8343-96d7c77aff21" CreationDate="2011-07-27T08:24:06.797" UserId="5119" Text="I would like to know how an OpenGL driver will be implemented to learn opengl internals?" />
  <row Id="34546" PostHistoryTypeId="3" PostId="15249" RevisionGUID="5409f287-7b9e-4c6e-8343-96d7c77aff21" CreationDate="2011-07-27T08:24:06.797" UserId="5119" Text="&lt;opengl&gt;&lt;architecture&gt;&lt;graphics&gt;&lt;gpu&gt;" />
  <row Id="34548" PostHistoryTypeId="17" PostId="15251" RevisionGUID="af508266-b4f8-4265-a0e2-bce6fe05b118" CreationDate="2011-07-27T09:06:13.323" UserId="-1" Comment="from http://stackoverflow.com/questions/6837734/how-to-implement-time-traveling-into-a-game-programmed-in-java" Text="" />
  <row Id="34549" PostHistoryTypeId="17" PostId="15252" RevisionGUID="218d61e2-1b90-4908-be33-7a94e83d4048" CreationDate="2011-07-27T09:06:13.323" UserId="-1" Comment="from http://stackoverflow.com/questions/6837734/how-to-implement-time-traveling-into-a-game-programmed-in-java" Text="" />
  <row Id="34550" PostHistoryTypeId="17" PostId="15253" RevisionGUID="7c6395c3-b73b-4912-9c59-3fd0fa1e920f" CreationDate="2011-07-27T09:06:13.323" UserId="-1" Comment="from http://stackoverflow.com/questions/6837734/how-to-implement-time-traveling-into-a-game-programmed-in-java" Text="" />
  <row Id="34551" PostHistoryTypeId="17" PostId="15254" RevisionGUID="ca120366-95b3-47c2-8339-c2e950733071" CreationDate="2011-07-27T09:06:13.323" UserId="-1" Comment="from http://stackoverflow.com/questions/6837734/how-to-implement-time-traveling-into-a-game-programmed-in-java" Text="" />
  <row Id="34552" PostHistoryTypeId="2" PostId="15252" RevisionGUID="81f5a882-34ed-4f18-b39f-5be60b3698a6" CreationDate="2011-07-26T23:22:14.373" UserDisplayName="Marvo" Text="Read up on the [Command Pattern][1].  It provides for undoing actions (and for later re-doing them.)  That would handle more than just position of a ship, but all actions the player takes.&#xD;&#xA;&#xD;&#xA;But I think your array idea is sound as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Command_pattern" />
  <row Id="34553" PostHistoryTypeId="2" PostId="15253" RevisionGUID="091890e3-4a2a-4812-bb57-f586c8df6897" CreationDate="2011-07-26T23:23:46.647" UserDisplayName="Eric J." Text="Rather than have two separate arrays, you should probably have one class that describes the player's position (there's probably a Point class in Java already... I'm a C# guy lately) and use one single array to hold past positions.&#xD;&#xA;&#xD;&#xA;You need to setup a &quot;ring buffer&quot;, meaning that when you get to the end of the array, you circle back to the beginning of the array, overwriting the oldest entries.  If you travel back in time, the opposite is true (when you get to the beginning, circle up to the end).&#xD;&#xA;&#xD;&#xA;If you want to hold 30 seconds worth of past data, you need to know your frame rate if you want to pre-allocate space and use a fixed-size array.  If you render the game at 10 frames/second, times 30 seconds, that's 300 elements." />
  <row Id="34554" PostHistoryTypeId="2" PostId="15254" RevisionGUID="c7b6b939-40e4-4857-a4c5-f6767eac3757" CreationDate="2011-07-26T23:26:21.617" UserId="8882" UserDisplayName="biziclop" Text="You can simply treat the game's virtual time as another space-like dimension. So what's time travel from the outside is a simple n+1 dimensional movement in the game's virtual universe.&#xD;&#xA;&#xD;&#xA;Assuming some user interaction and some sort of physics system that determine the behaviour of your universe when there's no user input, all you need to record is the effect of user interactions (for example, changes in the n+1 dimension speed/acceleration vectors), as your physics should be time-reversible.&#xD;&#xA;&#xD;&#xA;This way you'd need much less memory to calculate the state of the game universe at any given time coordinate." />
  <row Id="34555" PostHistoryTypeId="2" PostId="15251" RevisionGUID="3df44445-ac73-40e7-9f8b-e40fb70fab00" CreationDate="2011-07-26T23:15:16.477" UserDisplayName="Billy" Text="I was wondering how to implement time travel into a game. Nothing super complex, just time-reversal like what's in Braid, where the user can rewind/fast forward time by 30 seconds or whatever.&#xD;&#xA;&#xD;&#xA;I searched around the web a lot, but my results usually referred to using time as in like &quot;it's 3:00&quot; or a timer and such.&#xD;&#xA;&#xD;&#xA;The only thing I could think of was using 2 arrays, one for the player's x position and the other for the player's y position, and then iterating through those arrays and placing the character at that position as they rewind/fast forward time. Could that work? If it would work, how large would the array have to be and how often should I store the player's x and y? If it doesn't work, what else could I try?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="34556" PostHistoryTypeId="1" PostId="15251" RevisionGUID="3df44445-ac73-40e7-9f8b-e40fb70fab00" CreationDate="2011-07-26T23:15:16.477" UserDisplayName="Billy" Text="How to implement time traveling into a game programmed in java?" />
  <row Id="34557" PostHistoryTypeId="3" PostId="15251" RevisionGUID="3df44445-ac73-40e7-9f8b-e40fb70fab00" CreationDate="2011-07-26T23:15:16.477" UserDisplayName="Billy" Text="&lt;java&gt;" />
  <row Id="34558" PostHistoryTypeId="25" PostId="15202" RevisionGUID="f6fcb6e4-33b7-4d8f-acb0-b8cb3636acc0" CreationDate="2011-07-27T09:32:24.103" Comment="http://twitter.com/#!/StackGameDev/status/96150935688065025" />
  <row Id="34559" PostHistoryTypeId="2" PostId="15255" RevisionGUID="7555f4ee-6b20-420c-8064-4e8263c31f5c" CreationDate="2011-07-27T10:45:00.640" UserId="7684" Text="I explain my problem, I want to animate Model1 (an aicraft ) and I want an object, Model2 (a sphere), to follow it in translation an rotation, as it is a part of this aircraft.&#xD;&#xA;&#xD;&#xA;With the following code ( I use one or two tuto to write it) everything seems good when you just move one  angle at the time = the sphere gently follow the aircraft, if you move more than one angle at the same time, everything goes wrong !!&#xD;&#xA;&#xD;&#xA;I wonder if it's not a gimbal pb? but I use Quaternion !! or may be (it's more probable) I havn't understood all the stuff !&#xD;&#xA;&#xD;&#xA;See my code below, if you have an idea tell me please&#xD;&#xA;&#xD;&#xA;Thanks a lot for help&#xD;&#xA;&#xD;&#xA;Jean-gil&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            // Allows the game to exit&#xD;&#xA;            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                this.Exit();&#xD;&#xA;		&#xD;&#xA;		// Command input to airplane&#xD;&#xA;            float yokeUpDown = 0.0f;&#xD;&#xA;            float yokeRightLeft = 0.0f;&#xD;&#xA;            float RollRotation = 0.01f;&#xD;&#xA;&#xD;&#xA;                &#xD;&#xA;          //make quaternion rotation matrix of airplane&#xD;&#xA;            Quaternion additionalAircraftRotation = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), yokeUpDown) * Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), yokeRightLeft) *Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), RollRotation);&#xD;&#xA;&#xD;&#xA;		//increase or decrease aircraft rotation&#xD;&#xA;            spacecraftRotation = spacecraftRotation * additionalAircraftRotation;&#xD;&#xA;&#xD;&#xA;		// make vector3 sphere angle rotation&#xD;&#xA;            sphereAngle.X = sphereAngle.X + yokeUpDown;&#xD;&#xA;            sphereAngle.Y = sphereAngle.Y + yokeRightLeft;&#xD;&#xA;            sphereAngle.Z = sphereAngle.Z + RollRotation;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;		// make rotation quaternion for sphere&#xD;&#xA;            Quaternion additionalSphereRotation = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), sphereAngle.X) * Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), sphereAngle.Y) * Quaternion.CreateFromAxisAngle(new Vector3(1,0, 0), sphereAngle.Z);&#xD;&#xA;&#xD;&#xA;		//relative position of the sphere to the aircraft&#xD;&#xA;            Vector3 translationSphere = new Vector3(-distance_Aircraft_Sphere, 0,0);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            translationSphere = Vector3.Transform(translationSphere, additionalSphereRotation);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    		&#xD;&#xA;            sphereposition = aircraftposition + translationSphere;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;         	// “VectorToAdd” = direction of the airplane&#xD;&#xA;            Vector3 rotatedAircraftVector = Vector3.Transform(vectorToAdd, spacecraftRotation);&#xD;&#xA;&#xD;&#xA;            aircraftposition += moveSpeedAircraft * rotatedAircraftVector;&#xD;&#xA;&#xD;&#xA;            sphereposition += moveSpeedAircraft * rotatedAircraftVector;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;    enter code here" />
  <row Id="34560" PostHistoryTypeId="1" PostId="15255" RevisionGUID="7555f4ee-6b20-420c-8064-4e8263c31f5c" CreationDate="2011-07-27T10:45:00.640" UserId="7684" Text="with XNA 4.0, How can I combine 2 models to make one ?" />
  <row Id="34561" PostHistoryTypeId="3" PostId="15255" RevisionGUID="7555f4ee-6b20-420c-8064-4e8263c31f5c" CreationDate="2011-07-27T10:45:00.640" UserId="7684" Text="&lt;xna-4.0&gt;" />
  <row Id="34562" PostHistoryTypeId="2" PostId="15256" RevisionGUID="fdbed6bb-ffa6-402b-959c-4e564e0dcdb3" CreationDate="2011-07-27T11:22:25.833" UserId="6172" Text="I'm looking for high quality original 2D sprite collections which are animated where appropriate.  (IE not simply collections I can buy, we want original work).&#xD;&#xA;&#xD;&#xA;I've had a look online but am struggling to find out where I can hire such people!&#xD;&#xA;&#xD;&#xA; - Where do I find such people?&#xD;&#xA; - How much should I expect to pay?" />
  <row Id="34563" PostHistoryTypeId="1" PostId="15256" RevisionGUID="fdbed6bb-ffa6-402b-959c-4e564e0dcdb3" CreationDate="2011-07-27T11:22:25.833" UserId="6172" Text="Where to hire 2D sprite artists?" />
  <row Id="34564" PostHistoryTypeId="3" PostId="15256" RevisionGUID="fdbed6bb-ffa6-402b-959c-4e564e0dcdb3" CreationDate="2011-07-27T11:22:25.833" UserId="6172" Text="&lt;sprites&gt;&lt;hiring&gt;" />
  <row Id="34565" PostHistoryTypeId="2" PostId="15257" RevisionGUID="668b58ee-b188-43e0-b7be-5a1958dd1377" CreationDate="2011-07-27T11:22:37.770" UserId="5660" Text="Like [Erik J said](http://gamedev.stackexchange.com/questions/15251/how-to-implement-time-traveling-into-a-game-programmed-in-java/15253#15253), storing the player's past positions as a collection of point objects in a ring-buffer sounds reasonable.&#xD;&#xA;&#xD;&#xA;However, I would suggest using a [queue](http://en.wikipedia.org/wiki/FIFO) to implement the buffer. It's much cheaper to update than an array and you don't have to know your frame rate in advance: &#xD;&#xA;&#xD;&#xA;    update():&#xD;&#xA;       time_queue.push(player.positions)&#xD;&#xA;       if current_time() - start_time &gt; n:&#xD;&#xA;           queue.pop()&#xD;&#xA;&#xD;&#xA;This does not yet consider varying frame rates or what should happen if you actually do any time-traveling, so I suggest you store a time stamp with each entry and check that instead:&#xD;&#xA;&#xD;&#xA;    update():&#xD;&#xA;        time_queue.push({&#xD;&#xA;            'pos': player.positions,&#xD;&#xA;            'time': current_time()&#xD;&#xA;        })&#xD;&#xA;        first_entry = queue.peek()&#xD;&#xA;        while current_time() - first_entry['time'] &gt; n:&#xD;&#xA;           queue.pop()&#xD;&#xA;           first_entry = queue.peek()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="34566" PostHistoryTypeId="2" PostId="15258" RevisionGUID="1004cebf-b117-4cee-b62c-86a4537b106b" CreationDate="2011-07-27T11:30:47.220" UserId="5170" Text="It's simple.&#xD;&#xA;&#xD;&#xA;**Rewrite the spikes. It's the spikes' fault.**&#xD;&#xA;&#xD;&#xA;Your collisions should happen in discrete, tangible units. The problem as far as I can see it is:&#xD;&#xA;&#xD;&#xA;    1. Player is outside spikes&#xD;&#xA;    2. Spikes move into intersection position with the player&#xD;&#xA;    3. Player resolves incorrectly&#xD;&#xA;&#xD;&#xA;**The problem is with step 2, not 3!!**&#xD;&#xA;&#xD;&#xA;If you're trying to get things to feel solid, you should not let items slide into each other like that. Once you are in a position of intersection, if you lose your place, the problem becomes harder to solve.&#xD;&#xA;&#xD;&#xA;The spikes should ideally check for the existence of the player and, when they move, they should *push* him as necessary.&#xD;&#xA;&#xD;&#xA;An easy way to achieve this is for the Player to have `moveX` and `moveY` functions which understand the landscape and will shove the player by a certain delta **or as far as they can without hitting an obstacle**.&#xD;&#xA;&#xD;&#xA;Normally they will be called by the event loop. However they can also be called by objects in order to push the player.&#xD;&#xA;&#xD;&#xA;    function spikes going up:&#xD;&#xA;        &#xD;&#xA;        move spikes up&#xD;&#xA;        &#xD;&#xA;        if intersecting player:&#xD;&#xA;            d = player bottom edge + spikes top edge&#xD;&#xA;            &#xD;&#xA;            player.moveY(-d)&#xD;&#xA;        end if&#xD;&#xA;&#xD;&#xA;    end function&#xD;&#xA;&#xD;&#xA;Obviously the player still needs to react to the spikes if *he* goes into *them*.&#xD;&#xA;&#xD;&#xA;The overarching rule is, **after any object moves, it should end in a position without intersection.** This way, it's impossible to get the glitches you are seeing." />
  <row Id="34567" PostHistoryTypeId="2" PostId="15259" RevisionGUID="a5d833bf-71eb-4a18-baa6-e97c94ac0ee9" CreationDate="2011-07-27T11:45:30.503" UserId="8883" Text="You can start be reading this blog: http://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/" />
  <row Id="34568" PostHistoryTypeId="2" PostId="15260" RevisionGUID="91575c60-ab84-4900-a0e0-62bc80cb6a0b" CreationDate="2011-07-27T12:14:26.633" UserId="999" Text="Have a look at Mesa3D. It's an open source OpenGL implementation for GNU/Linux and many other OS's." />
  <row Id="34569" PostHistoryTypeId="2" PostId="15261" RevisionGUID="382a76f9-83c6-4858-bab3-a380cbbe2233" CreationDate="2011-07-27T12:25:22.527" UserId="8050" Text="I strongly suggest you to use a state machine to model your combo system. If your state machine library does not have it, you can add a timestamp to process your transition or timeout to force a status change. Using a state machine you can model every complex combo without big troubles." />
  <row Id="34570" PostHistoryTypeId="25" PostId="15256" RevisionGUID="1f03c4b7-42d3-4217-b01d-792c95cfdee6" CreationDate="2011-07-27T12:32:24.090" Comment="http://twitter.com/#!/StackGameDev/status/96196234561327104" />
  <row Id="34571" PostHistoryTypeId="2" PostId="15262" RevisionGUID="84839de6-1a50-45f4-b992-cb242a67a0d6" CreationDate="2011-07-27T12:34:16.097" UserId="8884" Text="I'm implementing non-projective decals. As described in many places (ie: lengyel in the gpg2) I first need to detect all triangles that lie within some sort of frustum.&#xD;&#xA;&#xD;&#xA;Besides obvious brute-force solutions (ie: checking each triangle), what are better ways to generally search triangles in a mesh?&#xD;&#xA;One solution i can think of is, for each mesh, keep some parallel data structure better suited for searching. are there any well know algo/solutions?" />
  <row Id="34572" PostHistoryTypeId="1" PostId="15262" RevisionGUID="84839de6-1a50-45f4-b992-cb242a67a0d6" CreationDate="2011-07-27T12:34:16.097" UserId="8884" Text="Best way to traverse triangles in a mesh" />
  <row Id="34573" PostHistoryTypeId="3" PostId="15262" RevisionGUID="84839de6-1a50-45f4-b992-cb242a67a0d6" CreationDate="2011-07-27T12:34:16.097" UserId="8884" Text="&lt;collision-detection&gt;&lt;algorithm&gt;&lt;3d-meshes&gt;&lt;data-structure&gt;" />
  <row Id="34574" PostHistoryTypeId="2" PostId="15263" RevisionGUID="08ada4e4-4b93-46be-b516-5c100db74039" CreationDate="2011-07-27T12:37:45.860" UserId="7779" Text="The Lost Garden blog ran a post a few months back where game artists could self promote. Quite a nice a list was generated as a result - [List of game artists][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lostgarden.com/2011/03/list-of-game-artists.html#comments" />
  <row Id="34575" PostHistoryTypeId="2" PostId="15264" RevisionGUID="0ebdf391-a819-4559-ba90-6650bf12398c" CreationDate="2011-07-27T12:51:39.657" UserId="8857" Text="Are you referring to [frustrum culling][1]? There are many algorithms developed to speed up the process, but primarily, you aim to perform as little comparisons as possible per-object. So for instance, rather than checking that each triangle within an object lies within the viewing frustrum, you can check the extremities (i.e. the left-most and right-most polygons), if these are both within the viewing frustrum, no further check is necessary, the entire object is within the viewing frustrum, if one of the extremities does not lie within the frustrum, then check the middle polygon, and think of it as the same principle as binary sorting. As the polygons are ordered by position, you can get away with a lot fewer checks than ***O***[n].&#xD;&#xA;&#xD;&#xA;Other techniques include that used by the Quake Engine (and by extension the Source engine), with their BSP mapping, this process involves sorting your map into VisLeafs (Visibility leaves), which allows the engine to determine when a player is at one point in the map, what it is impossible for him to see, and thus that is never rendered, even if it is technically within the viewing frustrum. This is done by dividing up the space using a series of planes and storing the information within the .bsp itself.&#xD;&#xA;&#xD;&#xA;I hope this answers your question, and I've not just digressed into something totally irrelevant to you, if I have then leave a comment and I'll try my best to ammend this answer. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Frustum_culling" />
  <row Id="34576" PostHistoryTypeId="5" PostId="15237" RevisionGUID="1a398bb5-e008-47a0-a640-fbe4c766c4d0" CreationDate="2011-07-27T13:17:52.287" UserId="14" Comment="added 778 characters in body" Text="My 2D isometric game uses a hexagonal grid map. In reference to the image below, how do I rotate the light blue hexagon structures by 60 degrees around the pink hexagons?&#xD;&#xA;&#xD;&#xA;![http://www.algonet.se/~afb/spriteworld/ongoing/HexMap.jpg][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Main hex is (0,0). Other hexes are childs, count of them is fixed.  I'm going to define only one position (in this case its right) and other directions calculate if needed (left-bottom, right-botom, right-top, left-top and left). Other hexes are defined like: Package.Add(-1,0), Package.Add(-2,0) and so on.&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;    switch(Direction)&#xD;&#xA;	{&#xD;&#xA;	case DirRightDown:&#xD;&#xA;		if(Number.Y % 2 &amp;&amp; Point.X % 2)&#xD;&#xA;			Number.X += 1;&#xD;&#xA;		Number.Y += Point.X + Point.Y / 2;&#xD;&#xA;&#xD;&#xA;		Number.X += Point.X / 2 - Point.Y / 1.5;&#xD;&#xA;		break;&#xD;&#xA;	}&#xD;&#xA;In this code 'Number' is Main Hex and Point is hex that i want to rotate. But i doesnt work:&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/LrCok.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/Kdc0k.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/5CD8g.png" />
  <row Id="34578" PostHistoryTypeId="2" PostId="15265" RevisionGUID="5172f7d9-71a2-4a05-8f13-0857238704cd" CreationDate="2011-07-27T14:08:06.440" UserId="7946" Text="The [Gamedev.net Help Wanted forums][1] is great place to search. When I've searched for artists in the past (paid and unpaid), I've usually received replies within a couple of hours.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/forum/8-help-wanted/" />
  <row Id="34579" PostHistoryTypeId="2" PostId="15266" RevisionGUID="6a764791-9b43-481c-8eb9-6c01b413bc9f" CreationDate="2011-07-27T14:19:45.980" UserId="8886" Text="In my simple game I use boundingBox for pick coins and other stuff, but I need use irregular area detection of Sprite(with out Alpha)... There is alternative to boundingBox?&#xD;&#xA;Here is code:&#xD;&#xA;&#xD;&#xA;    -(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event {&#xD;&#xA;	CGPoint location = [touch locationInView:[touch view]];&#xD;&#xA;	CGPoint point = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;    curentPosition = point;&#xD;&#xA;    arrToDel = [[NSMutableArray alloc] initWithCapacity:0];&#xD;&#xA;    &#xD;&#xA;    CCSprite *coin = nil;&#xD;&#xA;    &#xD;&#xA;    for (Coins *coins in self.bugs) {&#xD;&#xA;        if (CGRectContainsPoint([coins boundingBox], curentPosition)) {&#xD;&#xA;            coin = coins; // found sprite&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    if (coin != nil) {&#xD;&#xA;        NSMutableArray *checkList = [NSMutableArray arrayWithCapacity:0];&#xD;&#xA;        &#xD;&#xA;        for (Coins *coins in self.bugs) {&#xD;&#xA;            if (CGRectIntersectsRect([coin boundingBoxInPixels], [coins boundingBox]) &amp;&amp; coins != coin) {&#xD;&#xA;                [checkList addObject:coins];&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        int max = coin.zOrder;&#xD;&#xA;        &#xD;&#xA;        for (Coins *b in checkList) {&#xD;&#xA;            if (b.zOrder &gt; max)&#xD;&#xA;                max = b.zOrder;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        if (max == coin.zOrder) {&#xD;&#xA;            &#xD;&#xA;            [self removeChild:coin cleanup:YES];&#xD;&#xA;            &#xD;&#xA;            [arrToDel addObject:coin];&#xD;&#xA;            &#xD;&#xA;            for (Coins *coins in  arrToDel) {&#xD;&#xA; &#xD;&#xA;                [self.bugs removeObject:coin];&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}" />
  <row Id="34580" PostHistoryTypeId="1" PostId="15266" RevisionGUID="6a764791-9b43-481c-8eb9-6c01b413bc9f" CreationDate="2011-07-27T14:19:45.980" UserId="8886" Text="[Cocos2D] How to determine irregular area of the CCSprite?" />
  <row Id="34581" PostHistoryTypeId="3" PostId="15266" RevisionGUID="6a764791-9b43-481c-8eb9-6c01b413bc9f" CreationDate="2011-07-27T14:19:45.980" UserId="8886" Text="&lt;ccsprite&gt;" />
  <row Id="34582" PostHistoryTypeId="5" PostId="15255" RevisionGUID="8f5e8c86-4c67-4f09-8296-6783b7c7bd38" CreationDate="2011-07-27T14:36:28.523" UserId="1430" Comment="deleted 93 characters in body" Text="I want to animate Model1 (an aicraft) and I want an object, Model2 (a sphere), to follow it in translation and rotation, as it is a part of this aircraft.&#xD;&#xA;&#xD;&#xA;With the following code (I use one or two tutorials to write it) everything seems good when you just change just one angle at the time. The sphere gently follows the aircraft, but if you change more than one angle at the same time, everything goes wrong.&#xD;&#xA;&#xD;&#xA;I wonder if it's not a gimbal lock problem? But I use quaternions? Or maybe I haven't understood all this stuff?&#xD;&#xA;&#xD;&#xA;My code is below:&#xD;&#xA;&#xD;&#xA;    protected override void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            // Allows the game to exit&#xD;&#xA;            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                this.Exit();&#xD;&#xA;		&#xD;&#xA;		// Command input to airplane&#xD;&#xA;            float yokeUpDown = 0.0f;&#xD;&#xA;            float yokeRightLeft = 0.0f;&#xD;&#xA;            float RollRotation = 0.01f;&#xD;&#xA;&#xD;&#xA;                &#xD;&#xA;          //make quaternion rotation matrix of airplane&#xD;&#xA;            Quaternion additionalAircraftRotation = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), yokeUpDown) * Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), yokeRightLeft) *Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), RollRotation);&#xD;&#xA;&#xD;&#xA;		//increase or decrease aircraft rotation&#xD;&#xA;            spacecraftRotation = spacecraftRotation * additionalAircraftRotation;&#xD;&#xA;&#xD;&#xA;		// make vector3 sphere angle rotation&#xD;&#xA;            sphereAngle.X = sphereAngle.X + yokeUpDown;&#xD;&#xA;            sphereAngle.Y = sphereAngle.Y + yokeRightLeft;&#xD;&#xA;            sphereAngle.Z = sphereAngle.Z + RollRotation;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;		// make rotation quaternion for sphere&#xD;&#xA;            Quaternion additionalSphereRotation = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), sphereAngle.X) * Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), sphereAngle.Y) * Quaternion.CreateFromAxisAngle(new Vector3(1,0, 0), sphereAngle.Z);&#xD;&#xA;&#xD;&#xA;		//relative position of the sphere to the aircraft&#xD;&#xA;            Vector3 translationSphere = new Vector3(-distance_Aircraft_Sphere, 0,0);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            translationSphere = Vector3.Transform(translationSphere, additionalSphereRotation);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    		&#xD;&#xA;            sphereposition = aircraftposition + translationSphere;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;         	// “VectorToAdd” = direction of the airplane&#xD;&#xA;            Vector3 rotatedAircraftVector = Vector3.Transform(vectorToAdd, spacecraftRotation);&#xD;&#xA;&#xD;&#xA;            aircraftposition += moveSpeedAircraft * rotatedAircraftVector;&#xD;&#xA;&#xD;&#xA;            sphereposition += moveSpeedAircraft * rotatedAircraftVector;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;    enter code here" />
  <row Id="34583" PostHistoryTypeId="4" PostId="15266" RevisionGUID="ad4405cf-7662-4872-9fce-f15529ac003e" CreationDate="2011-07-27T14:40:06.023" UserId="1156" Comment="edited tags; edited title" Text="How to determine an irregular area of a CCSprite?" />
  <row Id="34584" PostHistoryTypeId="6" PostId="15266" RevisionGUID="ad4405cf-7662-4872-9fce-f15529ac003e" CreationDate="2011-07-27T14:40:06.023" UserId="1156" Comment="edited tags; edited title" Text="&lt;cocos2d-iphone&gt;&lt;objective-c&gt;&lt;ccsprite&gt;" />
  <row Id="34585" PostHistoryTypeId="2" PostId="15267" RevisionGUID="6b41080c-9108-41db-af67-26778628a96b" CreationDate="2011-07-27T14:51:08.060" UserId="8825" Text="I am developing a simple graphical game for Android (Java and OpenGL ES). There is no high-end graphics involved, basically a few (less than 10) sprites and some (about 10) dynamically drawn primitives. The performance of the game is quite fine, I get about 50-60 FPS on my HTC Desire.&#xD;&#xA;&#xD;&#xA;However, there is one specific performance issue. In my game I can fire a characters' gun, which then fires a laser beam that moves over the screen following its velocity vector. This beam is dynmically drawn. The thing is: when I fire the gut the first time, the laser beam is moving very unsteady (its &quot;hopping&quot; over the screen). But, after this first time, when I then fire the gun for how often I like, the laser beam is moving very smooth over the screen.&#xD;&#xA;&#xD;&#xA;I first thought this might be an issue with Android's garbage collector. But I double-checked my code. Not one single new object is created within the main game loop, I solely use pre-created objects (i.e. class instances). I also doubt the problem is related to the dynamic drawing of my primitives (laser beam), because as said its working fine and very smooth for every gun shot after the first one. It is solely this first shot where I encounter this performance issue.&#xD;&#xA;&#xD;&#xA;So my question is, does this behaviour sound familiar to anyone of you guys? I would appreciate any idea very much.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;Kind regards, Matthias" />
  <row Id="34586" PostHistoryTypeId="1" PostId="15267" RevisionGUID="6b41080c-9108-41db-af67-26778628a96b" CreationDate="2011-07-27T14:51:08.060" UserId="8825" Text="Graphical Android game: Bad performance in some situations" />
  <row Id="34587" PostHistoryTypeId="3" PostId="15267" RevisionGUID="6b41080c-9108-41db-af67-26778628a96b" CreationDate="2011-07-27T14:51:08.060" UserId="8825" Text="&lt;android&gt;&lt;graphics&gt;&lt;opengl-es&gt;&lt;performance&gt;&lt;graphic-effects&gt;" />
  <row Id="34588" PostHistoryTypeId="2" PostId="15268" RevisionGUID="5d3a7098-a38c-4c34-bdff-d8abc0c1dbfb" CreationDate="2011-07-27T14:51:11.067" UserId="1430" Text="If your sprites can be decomposed into a series of bounding boxes or other easy-to-detect primitive shapes, you could use that collection of bounding boxes instead. That probably won't scale, however, -- a more common approach is to use collision masks. A mask is essentially a B&amp;W version of the sprite where white means &quot;not part of the sprite&quot; and black means &quot;part of the sprite.&quot; &#xD;&#xA;&#xD;&#xA;If your source sprites have alpha or color key data, you can either use directly as the mask or use it produce the mask images programmatically. Otherwise you may need to author the mask images in a paint program.&#xD;&#xA;&#xD;&#xA;Anyhow, once you have the mask you first do a simple bounding-box check to trivially reject collisions that aren't even close. Then you test against the mask image -- in this case it looks like you'd transform currentPosition into the local space of the mask image (subtract the current position from the origin of the bounding box) and then see if the pixel in the mask at the transformed index was black or white, and that will let you know if the user touched part of the sprite or not.&#xD;&#xA;&#xD;&#xA;Note that you may also find that you'll need to enlarge the hit test area from a single pixel in order to make this feel good, especially on a real phone when you're using real fingers as the input instead of a mouse on the simulator.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34589" PostHistoryTypeId="2" PostId="15269" RevisionGUID="de4fc92e-22e2-4201-954b-5707c558b70a" CreationDate="2011-07-27T14:57:10.693" UserId="3659" Text="I asked a [similar question][1] a while back. It was suggested to me to look at the [DeviantArt Job Offers Forum][2] - Credit to André Paramés&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7421/how-much-to-pay-for-artwork-in-an-indie-game&#xD;&#xA;  [2]: http://forum.deviantart.com/jobs/offers/" />
  <row Id="34590" PostHistoryTypeId="2" PostId="15270" RevisionGUID="51b6135d-5677-443a-b5b0-349648e59494" CreationDate="2011-07-27T15:01:19.797" UserId="1430" Text="[The question that lists free existing sprites sets][1] may not give you want you want *directly*, but you might consider using it to track down the authors of some sprites you like the look of and approach them to see if you can work out a contract with them for some custom sprites.&#xD;&#xA;&#xD;&#xA;How much you pay probably depends on the artist, the type of work you want, how you want to handle the process of providing/requesting tweaks to the art, et cetera. To give you an example, while I have not contracted with artists for sprites before, I have done so on logos. I ended up paying anywhere from $50 to $300 for the final logo in both high-resolution vector form (and a few bitmap renders) and the rights to use it where and how I needed to. The final logo was the result of about a week, off and on, of back and forth iteration between myself and the artist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images" />
  <row Id="34591" PostHistoryTypeId="2" PostId="15271" RevisionGUID="07edb000-b4f5-47d8-a059-41dc20e3fe38" CreationDate="2011-07-27T15:09:41.647" UserId="8887" Text="What is the best general approach to implement scrolling for a 2D tile based game? &#xD;&#xA;&#xD;&#xA;I need to scroll the map with a constant speed, lets say 2 pixels every frame (like in a top down shooter).&#xD;&#xA;&#xD;&#xA;The tiles are 32x32 and the map is quite big, lets say 10 x 300.&#xD;&#xA;&#xD;&#xA;There are 2 layers: &#xD;&#xA;- first is the background layer&#xD;&#xA;- second is the forgeground layer with obstacles and enemies&#xD;&#xA;&#xD;&#xA;The target plattform is android and I want to use OpenGl.&#xD;&#xA;&#xD;&#xA;What is best practice?&#xD;&#xA;&#xD;&#xA;a) Draw only the visible Screen all the time (every frame)&#xD;&#xA;b) Load complete map into memory and just move the camera &#xD;&#xA;&#xD;&#xA;Is there a difference in performance and determining collision etc.?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help!" />
  <row Id="34592" PostHistoryTypeId="1" PostId="15271" RevisionGUID="07edb000-b4f5-47d8-a059-41dc20e3fe38" CreationDate="2011-07-27T15:09:41.647" UserId="8887" Text="Best method for 2 layer tile based map scrolling" />
  <row Id="34593" PostHistoryTypeId="3" PostId="15271" RevisionGUID="07edb000-b4f5-47d8-a059-41dc20e3fe38" CreationDate="2011-07-27T15:09:41.647" UserId="8887" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;tiles&gt;&lt;side-scroller&gt;&lt;parallaxscrolling&gt;" />
  <row Id="34594" PostHistoryTypeId="2" PostId="15272" RevisionGUID="9ce2fbb9-69de-413d-9096-078843da3aa8" CreationDate="2011-07-27T15:21:30.727" UserId="7514" Text="Try the game maker community, gmc.yoyogames.com&#xD;&#xA;&#xD;&#xA;They have quite a few good pixel artists there, quite a few who also will animate.&#xD;&#xA;The downfall is that you have to be very selective about who you pay, because the range of people who say they are &quot;good&quot; ranges all the way down to 8 year old noobs.&#xD;&#xA;&#xD;&#xA;However one major benefit, is that for individual pieces of art, you can tend to post a request and get half a dozen to choose from, and payment is very rarely required." />
  <row Id="34595" PostHistoryTypeId="25" PostId="15249" RevisionGUID="306329f8-dff6-4214-9269-08187271f6ce" CreationDate="2011-07-27T15:32:24.917" Comment="http://twitter.com/#!/StackGameDev/status/96241535561113601" />
  <row Id="34596" PostHistoryTypeId="2" PostId="15273" RevisionGUID="8ae78c4e-a18d-4aab-af73-1aa61702bbb4" CreationDate="2011-07-27T17:07:04.977" UserId="2061" Text="If the sprite doesn't change, you could give it a [convex bounding polygon][1].  Computing collisions is more complicated, but [not much more][2].&#xD;&#xA;&#xD;&#xA;Even if it does change, computing an appropriate polygon at runtime is [not terribly hard][3].&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Convex_and_concave_polygons&#xD;&#xA;[2]: http://www.gpwiki.org/index.php/Polygon_Collision&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Convex_hull_algorithms#Algorithms" />
  <row Id="34597" PostHistoryTypeId="2" PostId="15274" RevisionGUID="1dbe67c2-a8a1-440c-b8e3-8de9a4d7ca88" CreationDate="2011-07-27T17:54:21.410" UserId="159" Text="I can't answer specifically for Andriod as I have never done anything for it, but generally you will want to only draw the portion of the map that is visible. It requires much less memory to do it, and shouldn't mess with collision at all. In fact, you will only need to check for collision on the objects you are drawing rather than the entire map.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to have the bottom layer move at a separate speed than the top, the technique is called Parallax Scrolling. " />
  <row Id="34598" PostHistoryTypeId="2" PostId="15275" RevisionGUID="3180058f-44ed-4dbc-bedd-a034b454ead5" CreationDate="2011-07-27T17:55:21.503" UserId="1839" Text="    I wonder if it's not a gimbal lock problem? But I use quaternions?&#xD;&#xA;&#xD;&#xA;Yes, your code has a Gimbal Lock problem, since you use Euler Angles. There is a lot of myth out there about Gimbal Locks and how to prevent them. You can also have Gimbal Locks using quaternions, if you use them the way you do. The key is not to store the rotation around each axis separately and not to apply one after another, your code does it here:&#xD;&#xA;&#xD;&#xA;    Quaternion additionalAircraftRotation = &#xD;&#xA;        Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), yokeUpDown) * &#xD;&#xA;        Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), yokeRightLeft) *&#xD;&#xA;        Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), RollRotation);&#xD;&#xA;&#xD;&#xA;    Quaternion additionalSphereRotation = &#xD;&#xA;        Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), sphereAngle.X) *  &#xD;&#xA;        Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), sphereAngle.Y) * &#xD;&#xA;        Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), sphereAngle.Z);&#xD;&#xA;&#xD;&#xA;The solution is not to use Euler Angles. `{yokeUpDown, yokeRightLeft, RollRotation}` and `sphereAngle` are Euler Angles. Rather store them as matrices or quaternions, basically any representation of orientation/rotation will do, except Euler Angles." />
  <row Id="34599" PostHistoryTypeId="5" PostId="15275" RevisionGUID="dbd6c914-8c05-400c-8020-38b932950797" CreationDate="2011-07-27T18:02:04.867" UserId="1839" Comment="added 347 characters in body" Text="    I wonder if it's not a gimbal lock problem? But I use quaternions?&#xD;&#xA;&#xD;&#xA;Yes, your code has a Gimbal Lock problem, since you use Euler Angles. There is a lot of myth out there about Gimbal Locks and how to prevent them. You can also have Gimbal Locks using quaternions, if you use them the way you do. The key is not to store the rotation around each axis separately and not to apply one after another, your code does it here:&#xD;&#xA;&#xD;&#xA;        Quaternion additionalAircraftRotation = &#xD;&#xA;            Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), yokeUpDown) * &#xD;&#xA;            Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), yokeRightLeft) *&#xD;&#xA;            Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), RollRotation);&#xD;&#xA;&#xD;&#xA;        Quaternion additionalSphereRotation = &#xD;&#xA;            Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), sphereAngle.X) *  &#xD;&#xA;            Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), sphereAngle.Y) * &#xD;&#xA;            Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), sphereAngle.Z);&#xD;&#xA;&#xD;&#xA;The solution is not to use Euler Angles. `{yokeUpDown, yokeRightLeft, RollRotation}` and `sphereAngle` are Euler Angles. Rather store them as matrices or quaternions, basically any representation of orientation/rotation will do, except Euler Angles.&#xD;&#xA;&#xD;&#xA;Also this code does not do what you want, you can't just add Euler-Angles to combine 2 rotations: &#xD;&#xA;&#xD;&#xA;        // make vector3 sphere angle rotation&#xD;&#xA;        sphereAngle.X = sphereAngle.X + yokeUpDown;&#xD;&#xA;        sphereAngle.Y = sphereAngle.Y + yokeRightLeft;&#xD;&#xA;        sphereAngle.Z = sphereAngle.Z + RollRotation;" />
  <row Id="34600" PostHistoryTypeId="25" PostId="15271" RevisionGUID="c4edfbfa-0f4c-4ea6-bf5c-eb12ad582be6" CreationDate="2011-07-27T18:32:24.230" Comment="http://twitter.com/#!/StackGameDev/status/96286832404340736" />
  <row Id="34601" PostHistoryTypeId="5" PostId="15273" RevisionGUID="87389024-ad8b-4eef-99aa-5bdbea6c91c9" CreationDate="2011-07-27T18:55:05.180" UserId="2061" Comment="added 21 characters in body" Text="If the sprite doesn't change, you could give it a [convex bounding polygon][1].  Computing collisions is more complicated than with rectangles, but [not much more][2].&#xD;&#xA;&#xD;&#xA;Even if it does change, computing an appropriate polygon at runtime is [not terribly hard][3].&#xD;&#xA;&#xD;&#xA;[1]: http://en.wikipedia.org/wiki/Convex_and_concave_polygons&#xD;&#xA;[2]: http://www.gpwiki.org/index.php/Polygon_Collision&#xD;&#xA;[3]: http://en.wikipedia.org/wiki/Convex_hull_algorithms#Algorithms" />
  <row Id="34602" PostHistoryTypeId="13" PostId="15219" RevisionGUID="94159106-c833-4aae-a4e9-3f2cf6653101" CreationDate="2011-07-27T18:59:07.470" UserId="5765" Text="[{&quot;Id&quot;:5765,&quot;DisplayName&quot;:&quot;Veehmot&quot;}]" />
  <row Id="34603" PostHistoryTypeId="2" PostId="15276" RevisionGUID="7a21ae98-2bda-4038-af12-3a316a5b229d" CreationDate="2011-07-27T20:44:43.017" UserId="8616" Text="I want to create a map similar to how Mincraft and other related games do. I just haven't the faintest clue on how to do so. Can anyone point me to a decent tutorial or give me a decent run through? I program in java and use openGL. Thanks for any help." />
  <row Id="34604" PostHistoryTypeId="1" PostId="15276" RevisionGUID="7a21ae98-2bda-4038-af12-3a316a5b229d" CreationDate="2011-07-27T20:44:43.017" UserId="8616" Text="How do you create a fractal cube-map?" />
  <row Id="34605" PostHistoryTypeId="3" PostId="15276" RevisionGUID="7a21ae98-2bda-4038-af12-3a316a5b229d" CreationDate="2011-07-27T20:44:43.017" UserId="8616" Text="&lt;opengl&gt;&lt;java&gt;&lt;cubemap&gt;" />
  <row Id="34606" PostHistoryTypeId="2" PostId="15277" RevisionGUID="acab343c-769c-4502-9882-82b1927b93e6" CreationDate="2011-07-27T20:51:14.497" UserId="8891" Text="In software, at runtime, (C++ if it matters), is there a way to find out the maximum level of anisotropic filtering supported by the graphics card? &#xD;&#xA;" />
  <row Id="34607" PostHistoryTypeId="1" PostId="15277" RevisionGUID="acab343c-769c-4502-9882-82b1927b93e6" CreationDate="2011-07-27T20:51:14.497" UserId="8891" Text="How to determine the maximum supported level of anisotropic filtering for a graphics card" />
  <row Id="34608" PostHistoryTypeId="3" PostId="15277" RevisionGUID="acab343c-769c-4502-9882-82b1927b93e6" CreationDate="2011-07-27T20:51:14.497" UserId="8891" Text="&lt;graphics&gt;&lt;graphic-effects&gt;" />
  <row Id="34609" PostHistoryTypeId="2" PostId="15278" RevisionGUID="7aeca15a-594d-4f34-b664-a5566af45ee1" CreationDate="2011-07-27T21:28:00.813" UserId="5824" Text="In general you ask your graphics API you're using.&#xD;&#xA;&#xD;&#xA;For example if you're using D3D9 you call [IDirect3DDevice9::GetDeviceCaps()][1] and then check the MaxAnisotropy value in the D3DCAPS9 structure.&#xD;&#xA;&#xD;&#xA;On almost any reasonably modern graphics card the answer will be 16.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb174385%28v=vs.85%29.aspx" />
  <row Id="34610" PostHistoryTypeId="2" PostId="15279" RevisionGUID="9c58152c-802f-48e5-b478-c59021554d54" CreationDate="2011-07-27T21:31:20.280" UserId="8892" Text="First of all I have Xcode 4 installed in Mac OS X Snow Leopard 10.6.8. I have downloaded the Quake 3 source code 1.32b release but I can't open the Xcode project that is inside the /macosx folder since it is in the old .pbproj format and therefore it throws an &quot;incompatible version&quot; error. Has anyone been able to convert this to a Xcode format or is there any other way to compile the source code in Mac OS X Snow Leopard?  &#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="34611" PostHistoryTypeId="1" PostId="15279" RevisionGUID="9c58152c-802f-48e5-b478-c59021554d54" CreationDate="2011-07-27T21:31:20.280" UserId="8892" Text="Compiling Quake 3 in Snow Leopard" />
  <row Id="34612" PostHistoryTypeId="3" PostId="15279" RevisionGUID="9c58152c-802f-48e5-b478-c59021554d54" CreationDate="2011-07-27T21:31:20.280" UserId="8892" Text="&lt;macos&gt;&lt;quake3&gt;" />
  <row Id="34613" PostHistoryTypeId="2" PostId="15280" RevisionGUID="b121e12d-fa59-4b9a-be8a-df39afcf8518" CreationDate="2011-07-27T22:00:23.600" UserId="8295" Text="The original Quake 3 source was released quite some time ago.  I wouldn't be surprised if it's out of date.&#xD;&#xA;&#xD;&#xA;I would suggest the [ioquake3][1] version, except that I tried it recently on Leopard and the build failed for me.  Your mileage may vary.&#xD;&#xA;&#xD;&#xA;The ioquake there is essentially just bug fixes and maintenance work on top of the original quake3 source.  If you just want to study the engine or do some prototyping it should be a better starting point than the original source that id released.  Plus, it's in svn so you can get the history of changes if you need them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ioquake3.org/" />
  <row Id="34614" PostHistoryTypeId="2" PostId="15281" RevisionGUID="75fb57c7-0078-443d-80b7-a56d8b8457c9" CreationDate="2011-07-27T22:33:49.743" UserId="8240" Text="In OpenGL, you would (after creating a context and everything) do this:&#xD;&#xA;&#xD;&#xA;	GLfloat maxAniso = 0.0f;&#xD;&#xA;	glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &amp;maxAniso);&#xD;&#xA;&#xD;&#xA;Of course, this only works when the GL_EXT_texture_filter_anisotropic extension is available, but since every graphics card has supported this is about the year 2000, I wouldn't worry about it." />
  <row Id="34615" PostHistoryTypeId="2" PostId="15282" RevisionGUID="f4c0b3a9-033c-42cd-ad21-6acb3d497640" CreationDate="2011-07-27T22:39:07.090" UserId="8894" Text="I'm trying to create a simple topdown game, in which you control the player by WASD keys and use mouse to aim and shoot. So far, I have a player moving and firing, but I think there is something wrong with the shooting.&#xD;&#xA;&#xD;&#xA;Accuracy gets lower as the mouse cursor move away from the player.&#xD;&#xA;&#xD;&#xA;Please try the following SWF to see more clearly what I'm trying to say.&#xD;&#xA;&#xD;&#xA;http://dl.dropbox.com/u/24777511/gdstack.swf&#xD;&#xA;&#xD;&#xA;Here is a chunk of relevant code:&#xD;&#xA;&#xD;&#xA;    private function fireBullet(x:Number, y:Number, dFireAngle:Number):void {&#xD;&#xA;    			var b:Bullet = recycleBullet();&#xD;&#xA;    			var rFireAngle:Number;&#xD;&#xA;    			b.reset(x, y);&#xD;&#xA;    			b.angle = dFireAngle;&#xD;&#xA;    			rFireAngle = (dFireAngle * (Math.PI / 180));&#xD;&#xA;    			&#xD;&#xA;    			b.velocity.x = Math.cos(rFireAngle) * 385;&#xD;&#xA;    			b.velocity.y = Math.sin(rFireAngle) * 385;&#xD;&#xA;    		}&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;    if (FlxG.mouse.pressed()) {&#xD;&#xA;    				&#xD;&#xA;    					var p:FlxPoint = new FlxPoint(FlxG.mouse.screenX, FlxG.mouse.screenY);&#xD;&#xA;    					var angle:Number = FlxU.getAngle(new FlxPoint(player.x, player.y), p) - 90;&#xD;&#xA;    					fireBullet(player.x, player.y, angle);&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34616" PostHistoryTypeId="1" PostId="15282" RevisionGUID="f4c0b3a9-033c-42cd-ad21-6acb3d497640" CreationDate="2011-07-27T22:39:07.090" UserId="8894" Text="Incorrect angle calculation?" />
  <row Id="34617" PostHistoryTypeId="3" PostId="15282" RevisionGUID="f4c0b3a9-033c-42cd-ad21-6acb3d497640" CreationDate="2011-07-27T22:39:07.090" UserId="8894" Text="&lt;actionscript-3&gt;&lt;flixel&gt;" />
  <row Id="34618" PostHistoryTypeId="2" PostId="15283" RevisionGUID="a6c7799b-7c53-494d-84d3-d62bfae3a882" CreationDate="2011-07-27T23:36:36.073" UserId="8895" Text="This is a general question which aim is to allow me to start digging on the subject by myself.&#xD;&#xA;&#xD;&#xA;As I noticed the general opinion is that scene graphs are good for describing the scene in a level editor (or any editor that the game is using), but the game itself should use some sort of optimized data structure internally and the scene graphs should be somehow &quot;translated&quot; to that data structure before use.&#xD;&#xA;&#xD;&#xA;What such internal data structures would be? How one would &quot;translate&quot; a scene graph to such structures.&#xD;&#xA;&#xD;&#xA;In general - the more detail you can give me then better. Also references/links are more than welcome. :)" />
  <row Id="34619" PostHistoryTypeId="1" PostId="15283" RevisionGUID="a6c7799b-7c53-494d-84d3-d62bfae3a882" CreationDate="2011-07-27T23:36:36.073" UserId="8895" Text="Scene graphs vs in-game representation" />
  <row Id="34620" PostHistoryTypeId="3" PostId="15283" RevisionGUID="a6c7799b-7c53-494d-84d3-d62bfae3a882" CreationDate="2011-07-27T23:36:36.073" UserId="8895" Text="&lt;data-structure&gt;&lt;scene-graph&gt;&lt;position&gt;" />
  <row Id="34621" PostHistoryTypeId="2" PostId="15284" RevisionGUID="42870c26-8d02-4ed7-91bf-99e756cc6a98" CreationDate="2011-07-27T23:57:30.607" UserId="1588" Text="The pixelation forum, they are dedicated to pixel art and have a jobs section.&#xD;&#xA;http://www.wayofthepixel.net/pixelation/index.php" />
  <row Id="34625" PostHistoryTypeId="2" PostId="15286" RevisionGUID="27632a45-20f1-45a4-9e89-3a1082ab909a" CreationDate="2011-07-28T00:23:27.347" UserId="1101" Text="The Flixel code just calls `Math.atan2(Y,X) * 180 / Math.PI`, which looks ok. Have you checked that you're not accidentally rounding floats down to ints at any point in those calculations? " />
  <row Id="34626" PostHistoryTypeId="25" PostId="15279" RevisionGUID="bce16426-c866-4ae1-982b-a9ac5e4617d8" CreationDate="2011-07-28T00:32:24.537" Comment="http://twitter.com/#!/StackGameDev/status/96377429496569856" />
  <row Id="34627" PostHistoryTypeId="2" PostId="15287" RevisionGUID="7a7968a6-21cf-4c41-9544-16b206603aef" CreationDate="2011-07-28T00:51:24.007" UserId="7191" Text="&#xD;&#xA;Are you looking for something like this? &#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12277/voxel-heightmap-terrain-editor/12282#12282&#xD;&#xA;&#xD;&#xA;The article I mention in that answer is pretty good and talks about creating maps exactly like Minecraft. Using that article as a starter I was able to create maps like [this][1] for my game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://byte56screens.tumblr.com/post/7373767285/the-maps-are-almost-looking-playable-at-least-for" />
  <row Id="34628" PostHistoryTypeId="2" PostId="15288" RevisionGUID="6dc3b083-c040-46af-9784-defc410277a1" CreationDate="2011-07-28T02:14:19.100" UserId="1738" Text="I agree that frustum culling type algorithms are the way to go. Although, I would just use an Octree or KD-Tree, and hierarchically test for an intersection using that.  Unless you expect high depth complexity and a poor rendering order, I would skip a technique that does occlusion computation to save development time.  It is possible to use multiple Oct/KD-tree hierarchies to support complex animated objects, or dynamic Oct/KD-trees of simple objects to prevent testing against each moving object." />
  <row Id="34629" PostHistoryTypeId="2" PostId="15289" RevisionGUID="c0a70806-0862-4ef6-bcba-1f2ea106a911" CreationDate="2011-07-28T03:27:28.677" UserId="8897" Text="I am working on translating an old RTS game engine I wrote from DirectX9 to XNA. My old models didn't have animation &amp; are an old format, so I'm trying with an FBX file. I temporarily &quot;borrowed&quot; a model from League of Legends just to test if my rendering is working correctly.&#xD;&#xA;&#xD;&#xA;I imported the mesh/bones/skin/animation into Maya 2012 using an &quot;unnamed&quot; 3rd-party import tool. (obviously I'll have to get legit models later, but I just want to test if my programming is correct). Everything looks correct in maya and it renders the animations flawlessly.&#xD;&#xA;&#xD;&#xA;I exported everything into a single FBX file (with only a single animation).&#xD;&#xA;I then tried to load this model using the example at the following site:&#xD;&#xA;http://create.msdn.com/en-US/education/catalog/sample/skinned_model&#xD;&#xA;&#xD;&#xA;With my exported FBX, the animation looks correct for most of the frames, however at random times it screws up for a split second. Basically, the body/arms/head will look right, but the leg/foot will shoot out to a random point in space for a second &amp; then go back to the normal position. The original FBX from the sample looks correct in my program.&#xD;&#xA;&#xD;&#xA;It seems odd that my model was imported into maya wrong, since it displays fine in Maya. So, I'm thinking either I'm exporting it wrong, or the sample code is bad &amp; the model from the sample caters to the samples bad code.&#xD;&#xA;&#xD;&#xA;I'm new to 3D programming &amp; maya, so chances are I'm doing something wrong in the export. I'm using mostly the defaults, but I've tried all 3 interpolation modes (quaternion, euler, resample).&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="34630" PostHistoryTypeId="1" PostId="15289" RevisionGUID="c0a70806-0862-4ef6-bcba-1f2ea106a911" CreationDate="2011-07-28T03:27:28.677" UserId="8897" Text="XNA Skinned Animated Mesh Rendering Exported from Maya" />
  <row Id="34631" PostHistoryTypeId="3" PostId="15289" RevisionGUID="c0a70806-0862-4ef6-bcba-1f2ea106a911" CreationDate="2011-07-28T03:27:28.677" UserId="8897" Text="&lt;xna&gt;&lt;maya&gt;" />
  <row Id="34632" PostHistoryTypeId="25" PostId="15277" RevisionGUID="871d8785-b81a-4ae0-85e1-2e60caac5864" CreationDate="2011-07-28T03:32:35.803" Comment="http://twitter.com/#!/StackGameDev/status/96422774192619520" />
  <row Id="34636" PostHistoryTypeId="2" PostId="15291" RevisionGUID="d6ba2b05-22b9-4920-8037-8b93ac384562" CreationDate="2011-07-28T05:10:51.540" UserId="8899" Text="I have a point &amp; click type interface on a client (think RTS), which runs an A* on the server. What is the best way to synchronize the player movement with the server, from that point?&#xD;&#xA;&#xD;&#xA;Does the server need to sync the client on every animation step? or can it just tell the client &quot;go to position X,Y&quot; for each node on the path? Is it best to just run the animation timers on both client and server, and have it be implicitly synchronized?&#xD;&#xA;&#xD;&#xA;I'm wondering what's the typical granularity of synchronization required to make this work smoothly.&#xD;&#xA;" />
  <row Id="34637" PostHistoryTypeId="1" PostId="15291" RevisionGUID="d6ba2b05-22b9-4920-8037-8b93ac384562" CreationDate="2011-07-28T05:10:51.540" UserId="8899" Text="Multiplayer synchronization and pathfinding" />
  <row Id="34638" PostHistoryTypeId="3" PostId="15291" RevisionGUID="d6ba2b05-22b9-4920-8037-8b93ac384562" CreationDate="2011-07-28T05:10:51.540" UserId="8899" Text="&lt;animation&gt;&lt;multiplayer&gt;&lt;synchronization&gt;" />
  <row Id="34639" PostHistoryTypeId="5" PostId="15291" RevisionGUID="293e53f7-4bad-4f06-b5a3-da081fdb77f7" CreationDate="2011-07-28T05:39:09.940" UserId="8899" Comment="added 63 characters in body" Text="I have a point &amp; click type interface on a client (think RTS), which runs an A* on the server, for path-finding.&#xD;&#xA;&#xD;&#xA;What is the best way to synchronize the player movements between the server and client, once I've computed the path(s)?&#xD;&#xA;&#xD;&#xA;Does the server need to sync the clients on every animation step/frame? or can it just tell the client &quot;go to position X,Y&quot; for each node on the path, and each moving player? Or is it best to just run the animation timers on both client and server, and have it be implicitly synchronized that way?&#xD;&#xA;&#xD;&#xA;What would the typical data-exchange be like for path-based movement?&#xD;&#xA;" />
  <row Id="34640" PostHistoryTypeId="2" PostId="15292" RevisionGUID="0f970cb3-1b79-4145-8ce2-7ac21679dd26" CreationDate="2011-07-28T06:26:36.857" UserId="3680" Text="I have a png spritesheet that has all of my characters already on it. I downloaded Zwoptex, but that tools seems to be for creating the packed spritesheet, rather than generating regions for an already existing one.&#xD;&#xA;&#xD;&#xA;I've tried doing it by hand, but that didn't work out. Are there any tools that will take my sprite sheet, detect the regions and produce the plist file for me?" />
  <row Id="34641" PostHistoryTypeId="1" PostId="15292" RevisionGUID="0f970cb3-1b79-4145-8ce2-7ac21679dd26" CreationDate="2011-07-28T06:26:36.857" UserId="3680" Text="I have a spritesheet, how can I generate regions for it for cocos2d-iphone?" />
  <row Id="34642" PostHistoryTypeId="3" PostId="15292" RevisionGUID="0f970cb3-1b79-4145-8ce2-7ac21679dd26" CreationDate="2011-07-28T06:26:36.857" UserId="3680" Text="&lt;cocos2d-iphone&gt;&lt;spritesheet&gt;" />
  <row Id="34643" PostHistoryTypeId="25" PostId="15291" RevisionGUID="23228a66-f736-423d-aaa7-254a0af8939a" CreationDate="2011-07-28T06:32:36.783" Comment="http://twitter.com/#!/StackGameDev/status/96468078904360960" />
  <row Id="34644" PostHistoryTypeId="2" PostId="15293" RevisionGUID="3208e6ef-db56-48bb-8b72-3ba94eff9fa7" CreationDate="2011-07-28T07:04:39.090" UserId="8563" Text="[Look here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bobueland.com/cocos2d/?p=134" />
  <row Id="34645" PostHistoryTypeId="2" PostId="15294" RevisionGUID="3f56c28e-8d6a-4bdf-b1b6-55d1d6fbb125" CreationDate="2011-07-28T08:05:23.867" UserId="8901" Text="I love these old school type games that Kairosoft are doing which are a bit like Theme Park, all stat based stuff. I was wondering where I should start looking into developing something like the Kairosoft games on iPhone.&#xD;&#xA;&#xD;&#xA;For anyone that hasn't seen them, they are retro simulation games. Here is a quick video of Game Dev Story http://www.youtube.com/watch?v=DsMMnnOp7RU which is quite simple, although the NPCs in Pocket Academy seem much more sophisticated http://www.youtube.com/watch?v=HUXL2asK72s&#xD;&#xA;&#xD;&#xA;I understand how to take logs on in game stuff like unlocks and statistics of NPCs, i'm just unsure how you give the NPCs a kind of AI so they move about and do stuff based on their stats.&#xD;&#xA;&#xD;&#xA;I know this is a bit of a big question, but any guidance where I could look into something like this would be great." />
  <row Id="34646" PostHistoryTypeId="1" PostId="15294" RevisionGUID="3f56c28e-8d6a-4bdf-b1b6-55d1d6fbb125" CreationDate="2011-07-28T08:05:23.867" UserId="8901" Text="Where to start game development like Game Dev Story or Pocket Academy?" />
  <row Id="34647" PostHistoryTypeId="3" PostId="15294" RevisionGUID="3f56c28e-8d6a-4bdf-b1b6-55d1d6fbb125" CreationDate="2011-07-28T08:05:23.867" UserId="8901" Text="&lt;iphone&gt;&lt;simulations&gt;&lt;npc&gt;" />
  <row Id="34648" PostHistoryTypeId="5" PostId="15293" RevisionGUID="fa00d650-ba6c-46ae-8911-73bb1c7fd3f1" CreationDate="2011-07-28T08:06:10.710" UserId="8563" Comment="added 61 characters in body" Text="For this you may use CGPath. You can find answer on your question [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://bobueland.com/cocos2d/?p=134" />
  <row Id="34652" PostHistoryTypeId="2" PostId="15296" RevisionGUID="4be334c9-f206-4a39-94f4-fe50a7aea818" CreationDate="2011-07-28T08:22:48.017" UserId="8894" Text="I used the following code instead of Flixel's getAngle and strangely, it works:&#xD;&#xA;&#xD;&#xA;    var dx:Number = x2 - x1;&#xD;&#xA;    var dy:Number = y2 - y1;&#xD;&#xA;    return Math.atan2(dy,dx);" />
  <row Id="34656" PostHistoryTypeId="25" PostId="15289" RevisionGUID="dc77b78c-ea8d-4e27-969d-7ad34d5f4a4b" CreationDate="2011-07-28T09:32:36.927" Comment="http://twitter.com/#!/StackGameDev/status/96513377916043265" />
  <row Id="34657" PostHistoryTypeId="2" PostId="15297" RevisionGUID="2f38b2a0-9065-41dd-90ff-e0ad85d15fb9" CreationDate="2011-07-28T11:52:56.243" UserId="789" Text="RTS games typically have lockstep-sync (sync happens every frame). Telling any paths to the client would allow hacked clients to abuse the extra information." />
  <row Id="34658" PostHistoryTypeId="2" PostId="15298" RevisionGUID="a7f711aa-ac2f-4369-ad91-ab259dbf1f0a" CreationDate="2011-07-28T12:06:13.330" UserId="1883" Text="Neither.&#xD;&#xA;The only thing you should send are the commands. Example:&#xD;&#xA;These 20 units should move to (X,Y) and then let each player figure out how they get there. The tricky part is making sure they all do the exact same thing. To achieve this a lockstep model is used, the links below should explain it in detail. &#xD;&#xA;Also, you should only sync the important pieces. Anything that doesn't change the gameplay shouldn't get synced. Animations in RTS games is usually only for the visual side.&#xD;&#xA;&#xD;&#xA;Another thing, RTS games are usually not client-server, but P2P. That way one of the players can't cheat because when any inconsistency is detected, you simply disconnect.&#xD;&#xA;&#xD;&#xA;Here is something to help you get going:&#xD;&#xA;http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php&#xD;&#xA; http://altdevblogaday.com/2011/07/09/synchronous-rts-engines-and-a-tale-of-desyncs/ &#xD;&#xA;http://altdevblogaday.com/2011/07/24/synchronous-rts-engines-2-sync-harder/" />
  <row Id="34659" PostHistoryTypeId="2" PostId="15299" RevisionGUID="97af6554-8d5e-4157-be22-cceed7765657" CreationDate="2011-07-28T12:10:56.057" UserId="3990" Text="An alternative is to do pathfinding on the client that owns the unit. This has the advantage of spreading the work out more evenly. A disadvantage of doing all the pathfinding on the server is that the server has to do all of it; a disadvantage of sending only 'move to X,Y' commands to clients is that each client has to find every single path. Instead, every 'tick' in the lock-step cycle, each client tells the server, literally, each of their unit's next step. The server makes sure the unit actually can move there, and moves the unit. Since the client doesn't have all the information (Notably, what the other client's units are doing), an invalid movement command isn't treated as an error. This is giving up some bandwidth to gain more time for calculating paths.&#xD;&#xA;&#xD;&#xA;Replace server with peer; this method works for a peer-to-peer games as well, so long as you make sure the order in which unit movements are considered is the same on all machines." />
  <row Id="34660" PostHistoryTypeId="2" PostId="15300" RevisionGUID="41af2efd-f9af-4718-878b-b18e5cd0c9af" CreationDate="2011-07-28T12:13:14.527" UserId="7120" Text="So talking about this internal data structure, this can be a scenegraph too and a scene graph can be anything you want it to be. When you start with a game engine you can have an simple array which holds (object/position) pairs. So you can simple traverse this array and draw the objects on their respective position. When going further you can add rotation to that.&#xD;&#xA;Most engines will have a tree like scene graph which means that you can have a position/rotation relative to your parent.&#xD;&#xA;You can add anything you like to your scenegraph, but what is the most important is that start simple and add later. Once you grasp the basic concept you see that it is not so difficult.&#xD;&#xA;&#xD;&#xA;For the optimizing part I would say, optimize when framerate drops. Maybe you will never get to that point.&#xD;&#xA;There are several options like frustum culling which you can do when adding spatial information to your scene graph. Like putting AABBs around your objects so you can test them against the frustum." />
  <row Id="34661" PostHistoryTypeId="2" PostId="15301" RevisionGUID="cb7e939e-6ff5-4724-9730-9d02602d05da" CreationDate="2011-07-28T12:20:38.170" UserId="7120" Text="I think this site has some great information about the subject: http://www.songho.ca/opengl/gl_pipeline.html" />
  <row Id="34662" PostHistoryTypeId="2" PostId="15302" RevisionGUID="80c15393-9afa-4801-9497-96ce679c07c7" CreationDate="2011-07-28T12:30:47.100" UserId="2933" Text="Games like Super Metroid and Aquaria present the terrain with the other facing parts having rocks and stuff while deeper behind them (i.e. underground) there's different detail or just black.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I would like to do something similar using polygons. Terrain is created in my current level as a set of overlapping square boxes. I'm not sure if this rendering method will work such a system for creating terrain but if anyone has ideas I'd love to hear them. Otherwise I'd like to know how I should re-write the terrain rendering system so it actually works to draw terrain in this manner...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/dcadz.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/MzYzZ.jpg" />
  <row Id="34663" PostHistoryTypeId="1" PostId="15302" RevisionGUID="80c15393-9afa-4801-9497-96ce679c07c7" CreationDate="2011-07-28T12:30:47.100" UserId="2933" Text="Textures on edge of walls like in Super Metroid and Aquaria" />
  <row Id="34664" PostHistoryTypeId="3" PostId="15302" RevisionGUID="80c15393-9afa-4801-9497-96ce679c07c7" CreationDate="2011-07-28T12:30:47.100" UserId="2933" Text="&lt;xna&gt;&lt;rendering&gt;" />
  <row Id="34665" PostHistoryTypeId="25" PostId="15282" RevisionGUID="9a59452e-6e2d-498e-a1e4-cb729053de3c" CreationDate="2011-07-28T12:32:38.487" Comment="http://twitter.com/#!/StackGameDev/status/96558683466637312" />
  <row Id="34666" PostHistoryTypeId="2" PostId="15303" RevisionGUID="ff8c5b7f-3b82-4af6-ac9c-d92f6d439018" CreationDate="2011-07-28T12:34:10.457" UserId="8770" Text="What would be better for PC (Windows, Linux, Mac) games?&#xD;&#xA;&#xD;&#xA;I know Java is more mature/older and has a giant user base, but I see C# (Mono) slowly rising and showing that it has a growing user base as well.&#xD;&#xA;&#xD;&#xA;I've seen lots of games written in Java like Minecraft, Runescape etc. (Haven't really seen any popular C# games!)&#xD;&#xA;&#xD;&#xA;But what would be better?&#xD;&#xA;&#xD;&#xA;More Info(Ideas for games I'm going to make): 3D games (FPS, Racer, TPS?) and maybe 2D games (Platformer?) " />
  <row Id="34667" PostHistoryTypeId="1" PostId="15303" RevisionGUID="ff8c5b7f-3b82-4af6-ac9c-d92f6d439018" CreationDate="2011-07-28T12:34:10.457" UserId="8770" Text="C# vs Java for Cross-Platform Game Dev" />
  <row Id="34668" PostHistoryTypeId="3" PostId="15303" RevisionGUID="ff8c5b7f-3b82-4af6-ac9c-d92f6d439018" CreationDate="2011-07-28T12:34:10.457" UserId="8770" Text="&lt;c#&gt;&lt;java&gt;&lt;windows&gt;&lt;linux&gt;&lt;mono&gt;" />
  <row Id="34669" PostHistoryTypeId="2" PostId="15304" RevisionGUID="378a01c6-8879-4b0c-8baa-6e6ca5516cc9" CreationDate="2011-07-28T13:12:38.653" UserId="1141" Text="Let's first define a few new numbers. No worries, there won't be many.&#xD;&#xA;&#xD;&#xA;* *i*: *i* × *i* = -1&#xD;&#xA;* *f*: *f* × *f* = 3&#xD;&#xA;&#xD;&#xA;With these, a rotation by 60 degrees clockwise is the same as multiplication by **1/2 × (1 - *f* × *i*)**, and rotation by 60 degrees counter-clockwise the same as multiplication by **1/2 × (1 + *f* × *i*)**. If this sounds strange, remember that multiplication by a complex number is the same as rotation in the 2D plane. We just extend the complex numbers a bit to not have to deal with square roots.&#xD;&#xA;&#xD;&#xA;We can also write the point (a,b) as a + b × *i*.&#xD;&#xA;&#xD;&#xA;This lets us rotate any point in the plane; for example, the point (2,0) = 2 + 0 × *i* rotates to (1,-f), then to (-1,-f), (-2,0), (-1,f), (1,f) and finally back to (2,0), simply by multiplying it.&#xD;&#xA;&#xD;&#xA;Of course, we need a way to translate those points from our coordinates to those we do the rotations in, and then back again. For this, another bit of information is needed: If the point we do the rotation around is to the &quot;left&quot; or to the &quot;right&quot; of the vertical line. For simplicity, we declare that is has a &quot;wobble&quot; value *w* of 0 if it's to the left of it (like in your bottom two pictures), and of 1 if it's to the right of it. This extends our original points to be three dimensional; (*x*, *y*, *w*), with &quot;w&quot; being either 0 or 1 after normalisation. The normalisation function is:&#xD;&#xA;&#xD;&#xA;NORM: (*x*, *y*, *w*) -&gt; (*x* + floor(*w* / 2), *y*, *w* mod 2), with the &quot;mod&quot; operation defined such that it only returns positive values or zero.&#xD;&#xA;&#xD;&#xA;Our algorithm now looks as follows:&#xD;&#xA;&#xD;&#xA;1. Transform our points (*a*, *b*, *c*) to their positions relative to the rotational centre (*x*, *y*, *w*) by calculating (*a* - *x*, *b* - *y*, *c* - *w*), then normalising the result. This puts the rotational centre at (0,0,0) obviously.&#xD;&#xA;&#xD;&#xA;2. Transform our points from their &quot;native&quot; coordinates to the rotational complex ones: (*a*, *b*, *c*) -&gt; (2 × *a* + *c*, *b* × *f*) = 2 × *a* + *c* + *b* × *f* × *i*&#xD;&#xA;&#xD;&#xA;3. Rotate our points by multiplying them with one of the rotational numbers above, as needed.&#xD;&#xA;&#xD;&#xA;4. Ra-transform the points back from the rotational coordinates to their &quot;native&quot; ones: (*r*, *s* × *f*) -&gt; (floor(*r* / 2), *s*, *r* mod 2), with &quot;mod&quot; defined as above.&#xD;&#xA;&#xD;&#xA;5. Re-transform the points back to their original position by adding them to the rotational centre (*x*, *y*, *z*) and normalising.&#xD;&#xA;" />
  <row Id="34670" PostHistoryTypeId="5" PostId="15264" RevisionGUID="bb7a083b-3bfc-49e0-b337-43d6a807dcfc" CreationDate="2011-07-28T13:55:46.027" UserId="8857" Comment="deleted 1 characters in body" Text="Are you referring to [frustum culling][1]? There are many algorithms developed to speed up the process, but primarily, you aim to perform as little comparisons as possible per-object. So for instance, rather than checking that each triangle within an object lies within the viewing frustrum, you can check the extremities (i.e. the left-most and right-most polygons), if these are both within the viewing frustrum, no further check is necessary, the entire object is within the viewing frustrum, if one of the extremities does not lie within the frustrum, then check the middle polygon, and think of it as the same principle as binary sorting. As the polygons are ordered by position, you can get away with a lot fewer checks than ***O***[n].&#xD;&#xA;&#xD;&#xA;Other techniques include that used by the Quake Engine (and by extension the Source engine), with their BSP mapping, this process involves sorting your map into VisLeafs (Visibility leaves), which allows the engine to determine when a player is at one point in the map, what it is impossible for him to see, and thus that is never rendered, even if it is technically within the viewing frustrum. This is done by dividing up the space using a series of planes and storing the information within the .bsp itself.&#xD;&#xA;&#xD;&#xA;I hope this answers your question, and I've not just digressed into something totally irrelevant to you, if I have then leave a comment and I'll try my best to ammend this answer. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Frustum_culling" />
  <row Id="34671" PostHistoryTypeId="2" PostId="15305" RevisionGUID="1807f452-f083-493b-ab3b-953893c33419" CreationDate="2011-07-28T14:31:35.147" UserId="8310" Text="I need to render certain scenes and read the whole image back in main memory for further processing which is not suitable for rewriting into shaders of CUDA, and saving to disk. I've search for this and it seems that most video cards will accelerate the rendering but the read-back will be very slow. After a bit of research i only found this card mentioning [&quot;Hardware-Accelerated Pixel Read-Back&quot;][1]&#xD;&#xA;&#xD;&#xA;The other approach would do software rendering and the read-back problem doesn't exist, but then the rendering performance will be bad.&#xD;&#xA;&#xD;&#xA;Likely, i will have to implement both in order to be able to find the optimal trade-off, but my question is about what other alternative can i have hardware-wise; i understand Quadro is for modelling and designer market segment, which is precisely the client target of this application, Does this means that i'm not likely to find better pixel read-back performance in other video card lines? i.e: Tesla or Fermi, which don't even have video outputs btw&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pny.com/products/quadro/fx/1500PciEx.asp" />
  <row Id="34672" PostHistoryTypeId="1" PostId="15305" RevisionGUID="1807f452-f083-493b-ab3b-953893c33419" CreationDate="2011-07-28T14:31:35.147" UserId="8310" Text="optimal pixel-read back strategy" />
  <row Id="34673" PostHistoryTypeId="3" PostId="15305" RevisionGUID="1807f452-f083-493b-ab3b-953893c33419" CreationDate="2011-07-28T14:31:35.147" UserId="8310" Text="&lt;performance&gt;&lt;hardware-acceleration&gt;&lt;nvidia&gt;" />
  <row Id="34674" PostHistoryTypeId="2" PostId="15306" RevisionGUID="9b72dd5c-80d1-4474-98b9-ceecc3ceae3a" CreationDate="2011-07-28T14:36:18.677" UserId="2698" Text="Metroid's just using tiles, nothing special going on there.&#xD;&#xA;&#xD;&#xA;Aquaria however is doing something rather clever. If you'll notice, a lot of those rocks on the bed get repeated several times. For instance:&#xD;&#xA;&#xD;&#xA;![one variety of repeated rock with each instance circled][1]&#xD;&#xA;&#xD;&#xA;It looks like they've just dumped sprites along the edges of their terrain. It's kind of like what Metroid did - a massive arsenal of edge tiles, but if you pay attention you can notice the repetition of the tiles. Acquaria's doing the same thing, except with rock sprites, and not on a grid.&#xD;&#xA;&#xD;&#xA;### How to replicate it&#xD;&#xA;&#xD;&#xA;This might not be exactly how they do it, but it's one way of producing the same end result&#xD;&#xA;&#xD;&#xA;First, get yourself a nice bunch of rock sprites like this:&#xD;&#xA;&#xD;&#xA;![some perdy rock sprites][2]&#xD;&#xA;&#xD;&#xA;Now there's a process to follow so you know where to put them.&#xD;&#xA;&#xD;&#xA;![instructions][3]&#xD;&#xA;&#xD;&#xA;# Tada!&#xD;&#xA;&#xD;&#xA;You'll need to generate the terrain _once_ then store it. You probably don't need to keep regenerating those results - unless you _want_ the rocks to be constantly changing, which could actually be cool for, say, a fire pit or some alien terrain or whatever. Or you could just store the points and keep changing what sprite you draw on that point.&#xD;&#xA;&#xD;&#xA;[1]:http://www.yaharr.com/stackexchange/telltale%20signs.png&#xD;&#xA;[2]:http://www.yaharr.com/stackexchange/rocksprites.png&#xD;&#xA;[3]:http://www.yaharr.com/stackexchange/polygon%20edges.png" />
  <row Id="34675" PostHistoryTypeId="2" PostId="15307" RevisionGUID="848ca394-f3cd-4ac3-b3c7-88fd4afed241" CreationDate="2011-07-28T14:36:22.090" UserId="8910" Text="I personally prefer Java.&#xD;&#xA;&#xD;&#xA;Because:&#xD;&#xA;&#xD;&#xA;- Java have applets for web-based games (sliverlight is not already install by default). Applets are very good for demos.&#xD;&#xA;- Java is already install on Mac OS and on most Linux distributions.&#xD;&#xA;- You can run Java in mono or even compiling Java Code to x86 Code &quot;[http://www.mono-project.com/Java][1]&quot; and there is gcj also.&#xD;&#xA;- More and more people started to use java for games because of android today has the biggest market share in the mobile OS market.&#xD;&#xA;- I like to use Eclipse&#xD;&#xA;&#xD;&#xA;This just my point of view.&#xD;&#xA;Use whatever works best for you.&#xD;&#xA;&#xD;&#xA;You can look at some compaction between java and c#:&#xD;&#xA;&#xD;&#xA;[http://www.javacamp.org/javavscsharp/][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Java&#xD;&#xA;  [2]: http://www.javacamp.org/javavscsharp/" />
  <row Id="34677" PostHistoryTypeId="5" PostId="15306" RevisionGUID="ca16f898-ea03-45ac-9653-5345cda413c2" CreationDate="2011-07-28T14:42:39.623" UserId="2698" Comment="deleted 56 characters in body" Text="Metroid's just using tiles, nothing special going on there.&#xD;&#xA;&#xD;&#xA;Aquaria however is doing something rather clever. If you'll notice, a lot of those rocks on the bed get repeated several times. Here's one of the rocks for instance:&#xD;&#xA;&#xD;&#xA;![one variety of repeated rock with each instance circled][1]&#xD;&#xA;&#xD;&#xA;It looks like they've just dumped sprites along the edges of their terrain. It's kind of like what Metroid did - a massive arsenal of edge tiles, but if you pay attention you can notice the repetition of the tiles. Acquaria's doing the same thing, except with rock sprites, and not on a grid.&#xD;&#xA;&#xD;&#xA;### How to replicate it&#xD;&#xA;&#xD;&#xA;This might not be exactly how they do it, but it's one way of producing the same end result.&#xD;&#xA;&#xD;&#xA;First, get yourself a nice bunch of rock sprites like this:&#xD;&#xA;&#xD;&#xA;![some perdy rock sprites][2]&#xD;&#xA;&#xD;&#xA;Now there's a process to follow so you know where to put them.&#xD;&#xA;&#xD;&#xA;![instructions][3]&#xD;&#xA;&#xD;&#xA;# Tada!&#xD;&#xA;&#xD;&#xA;You can use this _once_ to generate a list of rocks and where to draw them, then you just draw all your rock sprites. Or maybe you can just draw all the points and pick a different sprite to draw on it on each step, making the edge of a lava pit or an alien terrain!&#xD;&#xA;&#xD;&#xA;[1]:http://www.yaharr.com/stackexchange/telltale%20signs.png&#xD;&#xA;[2]:http://www.yaharr.com/stackexchange/rocksprites.png&#xD;&#xA;[3]:http://www.yaharr.com/stackexchange/polygon%20edges.png" />
  <row Id="34678" PostHistoryTypeId="2" PostId="15308" RevisionGUID="a8d9d171-2e12-4748-bf28-4132151ca011" CreationDate="2011-07-28T14:58:40.317" UserId="1430" Text="&gt; I'm curious about where all the current ROMs available came from&#xD;&#xA;&gt; (mainly because unlike discs, cartridges are not typically supported&#xD;&#xA;&gt; by standard hardware).&#xD;&#xA;&#xD;&#xA;There are basically two kinds of ROMs -- images of commercial titles obtained through questionable legal means using cartridge dumping hardware, and images of homebrew titles that are written directly from your PCs memory to disk via the homebrew SDKs that are floating around. Most of the ROMs you are probably thinking of are the former kind. Cartridge dumpers are essentially hardware, sometimes custom-built, that copy the read-only memory chips on a cartridge to disk in some format.&#xD;&#xA;&#xD;&#xA;&gt; By any chance is there still a serious reason why the tools are still&#xD;&#xA;&gt; sealed?&#xD;&#xA;&#xD;&#xA;There is no business advantage to Nintendo to make the tools available. They would turn no profit from it. Plus, especially for older consoles, many of the older official SDKs talk with proprietary hardware (dev kits) that may not even be in production any longer, so there's very little you could likely *do* with the toolchain from Nintendo. &#xD;&#xA;&#xD;&#xA;Homebrew console SDKs produce ROMs because emulators already exist. It's unlikely that most official SDKs produced ROM images that could be consumed in exactly the same fashion.&#xD;&#xA;" />
  <row Id="34679" PostHistoryTypeId="5" PostId="15200" RevisionGUID="47a41019-d09f-4f99-b1fc-e11e6e454074" CreationDate="2011-07-28T15:02:49.970" UserId="2188" Comment="no point on keeping that here" Text="Facebook doesn't allow applications to send direct messages. I think there is no way to generate a notification with an app on facebook, you can only write on the users wall.&#xD;&#xA;&#xD;&#xA;Maybe your best solution is to send an SMS, email or use twitter." />
  <row Id="34680" PostHistoryTypeId="24" PostId="15200" RevisionGUID="47a41019-d09f-4f99-b1fc-e11e6e454074" CreationDate="2011-07-28T15:02:49.970" Comment="Proposed by 2188 approved by 14 edit id of 582" />
  <row Id="34681" PostHistoryTypeId="10" PostId="15294" RevisionGUID="05213669-7fc4-438f-aa95-639e76bf8d36" CreationDate="2011-07-28T15:04:35.477" UserId="14" CloseReasonId="4" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;Notabene&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="34682" PostHistoryTypeId="5" PostId="15306" RevisionGUID="72e392e7-e255-42fb-b429-613e9a0ec947" CreationDate="2011-07-28T15:09:57.103" UserId="2698" Comment="Added a note on other terrain features, increased size of first header" Text="Metroid's just using tiles, nothing special going on there.&#xD;&#xA;&#xD;&#xA;Aquaria however is doing something rather clever. If you'll notice, a lot of those rocks on the bed get repeated several times. Here's one of the rocks for instance:&#xD;&#xA;&#xD;&#xA;![one variety of repeated rock with each instance circled][1]&#xD;&#xA;&#xD;&#xA;It looks like they've just dumped sprites along the edges of their terrain. It's kind of like what Metroid did - a massive arsenal of edge tiles, but if you pay attention you can notice the repetition of the tiles. Acquaria's doing the same thing, except with rock sprites, and not on a grid.&#xD;&#xA;&#xD;&#xA;# How to replicate it&#xD;&#xA;&#xD;&#xA;This might not be exactly how they do it, but it's one way of producing the same end result.&#xD;&#xA;&#xD;&#xA;First, get yourself a nice bunch of rock sprites like this:&#xD;&#xA;&#xD;&#xA;![some perdy rock sprites][2]&#xD;&#xA;&#xD;&#xA;Now there's a process to follow so you know where to put them.&#xD;&#xA;&#xD;&#xA;![instructions][3]&#xD;&#xA;&#xD;&#xA;# Tada!&#xD;&#xA;&#xD;&#xA;You can use this _once_ to generate a list of rocks and where to draw them, then you just draw all your rock sprites. Or maybe you can just draw all the points and pick a different sprite to draw on it on each step, making the edge of a lava pit or an alien terrain!&#xD;&#xA;&#xD;&#xA;# And other terrain features...&#xD;&#xA;&#xD;&#xA;Aquaria could've used a very similar method to dump all the mushrooms, coral and other features on the seabed (including the giant rocky structures that form the backdrop). The mushrooms could have been generated like this:&#xD;&#xA;&#xD;&#xA;1. Gather some points at _random_ intervals, not fixed intervals.&#xD;&#xA;2. Don't just store the point. Also store the _normal_ of the edge you picked the point from.&#xD;&#xA;3. Pick a random rotation within a certain range of the normal's rotation. For example if the normal is pointing off at 30 degrees, pick a rotation within 20 degrees of that (i.e. between 10-50 degrees).&#xD;&#xA;4. Draw your mushroom at the chosen rotation, and at a random stalk length.&#xD;&#xA;&#xD;&#xA;Everything else is probably a variation on those same instructions: the coral isn't rotated much, those two shells/stones are probably only placed if the terrain normal is pointing roughly upwards (i.e. the terrain's flat).&#xD;&#xA;&#xD;&#xA;[1]:http://www.yaharr.com/stackexchange/telltale%20signs.png&#xD;&#xA;[2]:http://www.yaharr.com/stackexchange/rocksprites.png&#xD;&#xA;[3]:http://www.yaharr.com/stackexchange/polygon%20edges.png" />
  <row Id="34684" PostHistoryTypeId="10" PostId="15303" RevisionGUID="6308fa78-2ae6-439a-acf7-49fd68c3d4a6" CreationDate="2011-07-28T15:12:35.377" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:1101,&quot;DisplayName&quot;:&quot;Kylotan&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="34688" PostHistoryTypeId="5" PostId="15307" RevisionGUID="28fd0928-a8ba-46cb-b068-f54b63c62e21" CreationDate="2011-07-28T15:24:44.530" UserId="8910" Comment="added 4 characters in body" Text="I personally prefer Java.&#xD;&#xA;&#xD;&#xA;Because:&#xD;&#xA;&#xD;&#xA;- Java have applets for web-based games (sliverlight is not already installed by default). Applets are very good for demos.&#xD;&#xA;- Java is already installed on Mac OS and on most Linux distributions.&#xD;&#xA;- You can run Java in mono or even compiling Java Code to x86 Code &quot;[http://www.mono-project.com/Java][1]&quot; and there is gcj also.&#xD;&#xA;- More and more people started to use java for games because of android today has the biggest market share in the mobile OS market.&#xD;&#xA;- I like to use Eclipse&#xD;&#xA;&#xD;&#xA;This just my point of view.&#xD;&#xA;Use whatever works best for you.&#xD;&#xA;&#xD;&#xA;You can look at some compaction between java and c#:&#xD;&#xA;&#xD;&#xA;[http://www.javacamp.org/javavscsharp/][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Java&#xD;&#xA;  [2]: http://www.javacamp.org/javavscsharp/" />
  <row Id="34689" PostHistoryTypeId="5" PostId="15307" RevisionGUID="3fd38870-a650-42e9-9919-6b04f45d15a7" CreationDate="2011-07-28T15:29:55.540" UserId="8910" Comment="added 3 characters in body" Text="I personally prefer Java.&#xD;&#xA;&#xD;&#xA;Because:&#xD;&#xA;&#xD;&#xA;- Java have applets for web-based games (sliverlight is not already installed by default). Applets are very good for demos.&#xD;&#xA;- Java is already installed on Mac OS and on most Linux distributions.&#xD;&#xA;- You can run Java in mono or even compiling Java Code to x86 Code &quot;[http://www.mono-project.com/Java][1]&quot; and there is gcj also.&#xD;&#xA;- More and more people started to use java for games because of android today has the biggest market share in the mobile OS market.&#xD;&#xA;- I like to use Eclipse&#xD;&#xA;&#xD;&#xA;This is just my point of view.&#xD;&#xA;Use whatever works best for you.&#xD;&#xA;&#xD;&#xA;You can look at some compaction between java and c#:&#xD;&#xA;&#xD;&#xA;[http://www.javacamp.org/javavscsharp/][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Java&#xD;&#xA;  [2]: http://www.javacamp.org/javavscsharp/" />
  <row Id="34690" PostHistoryTypeId="25" PostId="15302" RevisionGUID="cb7278ea-3b5c-4f5b-b774-3a236772461f" CreationDate="2011-07-28T15:32:39.260" Comment="http://twitter.com/#!/StackGameDev/status/96603981656227840" />
  <row Id="34691" PostHistoryTypeId="2" PostId="15309" RevisionGUID="79ac765e-bbb7-4c4e-bea5-3b215275255d" CreationDate="2011-07-28T15:46:36.710" UserId="7911" Text="We're talking about relative performance here, it's not like suddenly your bitmap gets transferred at baudot speeds back to your main memory.  Is it slower than a main RAM copy?  Absolutely.  Is it slower than software rendering?  Absolutely NOT.&#xD;&#xA;&#xD;&#xA;Do you need to do this at interactive speeds, 30-60Hz, or is a slower overall throughput an option?  What bitmap sizes are you rendering, 4Kx4K will always be slow, 800x600 you could probably even do simple shaders in software at reasonable rates.&#xD;&#xA;&#xD;&#xA;If you want comparisons on what's possible in the consumer space, Fraps has spent a lot of time doing compressed captures to disk from video memory http://www.fraps.com/ and if you're trying to get performance that exceeds their limits you're looking at some heavy R&amp;D and probably hardware specific.&#xD;&#xA;" />
  <row Id="34692" PostHistoryTypeId="6" PostId="15305" RevisionGUID="b1c9a64b-0d09-469d-a281-feda89079a80" CreationDate="2011-07-28T16:20:17.813" UserId="8310" Comment="edited tags" Text="&lt;performance&gt;&lt;linux&gt;&lt;hardware-acceleration&gt;&lt;nvidia&gt;" />
  <row Id="34694" PostHistoryTypeId="5" PostId="15291" RevisionGUID="d66f901d-a384-45bf-b8ad-69c304127fee" CreationDate="2011-07-28T16:34:27.403" UserId="8899" Comment="clarified &quot;RTS&quot; aspect" Text="I have a point &amp; click type interface on a client, which runs an A* on the server, for path-finding.&#xD;&#xA;&#xD;&#xA;The game is controlled like an RTS, but the world is persistent, so players should be able to join/leave at any time, and there will only be 30 or so units at most on the screen.&#xD;&#xA;&#xD;&#xA;What is the best way to synchronize the player movements between the server and client, once I've computed the path(s)?&#xD;&#xA;&#xD;&#xA;Does the server need to sync the clients on every animation step/frame? or can it just tell the client &quot;go to position X,Y&quot; for each node on the path, and each moving player? Or is it best to just run the animation timers on both client and server, and have it be implicitly synchronized that way?&#xD;&#xA;&#xD;&#xA;What would the typical data-exchange be like for path-based movement?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Some of you have been suggesting lockstep, because I said &quot;RTS&quot;, but the game isn't an RTS, it just has the same kind of interface. The big difference is **I need to be able to have players join and leave the game at any time**. Sorry for not being more specific.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34695" PostHistoryTypeId="2" PostId="15310" RevisionGUID="dbc3c8fe-d209-4d2f-8430-10ebf5383f8b" CreationDate="2011-07-28T16:42:02.157" UserId="8911" Text="I am very new to game programming. I am currently studing java (android mainly) and I know what it takes to make a game, as well as how to render it via OpenGL. Finding some others at nearly my level I think would motivate me more and give me some experience to working with others. Do you know a good place to find some people? Thank you in advance!" />
  <row Id="34696" PostHistoryTypeId="1" PostId="15310" RevisionGUID="dbc3c8fe-d209-4d2f-8430-10ebf5383f8b" CreationDate="2011-07-28T16:42:02.157" UserId="8911" Text="Where can I find some beginners to learn and work with?" />
  <row Id="34697" PostHistoryTypeId="3" PostId="15310" RevisionGUID="dbc3c8fe-d209-4d2f-8430-10ebf5383f8b" CreationDate="2011-07-28T16:42:02.157" UserId="8911" Text="&lt;java&gt;" />
  <row Id="34699" PostHistoryTypeId="2" PostId="15311" RevisionGUID="d7569a50-85c3-4579-b890-ab4e8a504eaa" CreationDate="2011-07-28T16:53:53.433" UserId="1430" Text="You might try looking at the [GDNet Help Wanted][1] forums and/or the [TIGSource forums][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/forum/8-help-wanted/&#xD;&#xA;  [2]: http://forums.tigsource.com/" />
  <row Id="34700" PostHistoryTypeId="5" PostId="15306" RevisionGUID="30711920-ef11-4fc1-8d79-8987b4f408b7" CreationDate="2011-07-28T16:56:29.477" UserId="2698" Comment="Some accessibility - edited the tooltip for the instructions to describe the instructions." Text="Metroid's just using tiles, nothing special going on there.&#xD;&#xA;&#xD;&#xA;Aquaria however is doing something rather clever. If you'll notice, a lot of those rocks on the bed get repeated several times. Here's one of the rocks for instance:&#xD;&#xA;&#xD;&#xA;![one variety of repeated rock with each instance circled][1]&#xD;&#xA;&#xD;&#xA;It looks like they've just dumped sprites along the edges of their terrain. It's kind of like what Metroid did - a massive arsenal of edge tiles, but if you pay attention you can notice the repetition of the tiles. Acquaria's doing the same thing, except with rock sprites, and not on a grid.&#xD;&#xA;&#xD;&#xA;# How to replicate it&#xD;&#xA;&#xD;&#xA;This might not be exactly how they do it, but it's one way of producing the same end result.&#xD;&#xA;&#xD;&#xA;First, get yourself a nice bunch of rock sprites like this:&#xD;&#xA;&#xD;&#xA;![some perdy rock sprites][2]&#xD;&#xA;&#xD;&#xA;Now there's a process to follow so you know where to put them.&#xD;&#xA;&#xD;&#xA;![Determine the vertices and edges that make up your terrain. Traverse them like a spider walking across a line of web and at regular distances store the current coordinate. The inverval distance depends on the size of your sprites! Colour one side black then dump a sprite on each point you recorded.][3]&#xD;&#xA;&#xD;&#xA;# Tada!&#xD;&#xA;&#xD;&#xA;You can use this _once_ to generate a list of rocks and where to draw them, then you just draw all your rock sprites. Or maybe you can just draw all the points and pick a different sprite to draw on it on each step, making the edge of a lava pit or an alien terrain!&#xD;&#xA;&#xD;&#xA;# And other terrain features...&#xD;&#xA;&#xD;&#xA;Aquaria could've used a very similar method to dump all the mushrooms, coral and other features on the seabed (including the giant rocky structures that form the backdrop). The mushrooms could have been generated like this:&#xD;&#xA;&#xD;&#xA;1. Gather some points at _random_ intervals, not fixed intervals.&#xD;&#xA;2. Don't just store the point. Also store the _normal_ of the edge you picked the point from.&#xD;&#xA;3. Pick a random rotation within a certain range of the normal's rotation. For example if the normal is pointing off at 30 degrees, pick a rotation within 20 degrees of that (i.e. between 10-50 degrees).&#xD;&#xA;4. Draw your mushroom at the chosen rotation, and at a random stalk length.&#xD;&#xA;&#xD;&#xA;Everything else is probably a variation on those same instructions: the coral isn't rotated much, those two shells/stones are probably only placed if the terrain normal is pointing roughly upwards (i.e. the terrain's flat).&#xD;&#xA;&#xD;&#xA;[1]:http://www.yaharr.com/stackexchange/telltale%20signs.png&#xD;&#xA;[2]:http://www.yaharr.com/stackexchange/rocksprites.png&#xD;&#xA;[3]:http://www.yaharr.com/stackexchange/polygon%20edges.png" />
  <row Id="34702" PostHistoryTypeId="2" PostId="15312" RevisionGUID="bd6f36f6-a212-45cd-b6f8-fd201957aa0d" CreationDate="2011-07-28T18:05:27.127" UserId="8912" Text="I like this forum http://www.javagaming.org/" />
  <row Id="34703" PostHistoryTypeId="25" PostId="15310" RevisionGUID="3aac6c98-58e1-4e67-9174-2e52d6aa9613" CreationDate="2011-07-28T18:32:40.020" Comment="http://twitter.com/#!/StackGameDev/status/96649284564426752" />
  <row Id="34704" PostHistoryTypeId="2" PostId="15313" RevisionGUID="059f1af8-d680-4394-9a87-c83e6d929da1" CreationDate="2011-07-28T18:33:36.837" UserId="7249" Text="Requests were created for this purpose among others...&#xD;&#xA;&#xD;&#xA;&gt; App-generated requests: These requests can be initiated and sent only&#xD;&#xA;&gt; to users who have authorized your app. Developers can send these&#xD;&#xA;&gt; requests using the Graph API. Use these requests to update the&#xD;&#xA;&gt; bookmark count to encourage a user to re-engage in the app **(e.g., your&#xD;&#xA;&gt; friend finished her move in a game and it’s now your turn)**.&#xD;&#xA;&#xD;&#xA;See: http://developers.facebook.com/blog/post/464/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34705" PostHistoryTypeId="16" PostId="15313" RevisionGUID="fd69a483-2338-467e-bd84-766f7869f5ad" CreationDate="2011-07-28T18:33:36.837" UserId="7249" />
  <row Id="34706" PostHistoryTypeId="2" PostId="15314" RevisionGUID="bf6b50c5-cf95-4348-a80c-eaa208d97cc5" CreationDate="2011-07-28T18:37:39.920" UserId="1101" Text="Once the path is calculated, the server just uses that path to control the character. The presence of a path makes no difference to this problem - you still just send the same data, whether that is regular position updates or whatever. Usually it's fine to send regular positions (interpolated on the client to smooth them) and a separate message when the unit stops." />
  <row Id="34707" PostHistoryTypeId="16" PostId="15310" RevisionGUID="da77bc5b-fc02-4434-aa52-5d2310071840" CreationDate="2011-07-28T18:55:40.420" UserId="14" />
  <row Id="34708" PostHistoryTypeId="16" PostId="15311" RevisionGUID="88ae8e8a-a6cb-4474-98d3-d458be1a90c4" CreationDate="2011-07-28T18:55:40.420" UserId="14" />
  <row Id="34709" PostHistoryTypeId="16" PostId="15312" RevisionGUID="3975f17a-e392-4e73-9ac0-e909b390d171" CreationDate="2011-07-28T18:55:40.420" UserId="14" />
  <row Id="34710" PostHistoryTypeId="2" PostId="15315" RevisionGUID="37e26c1f-42d8-4926-aeca-751444d8a2b8" CreationDate="2011-07-28T19:10:14.807" UserId="5125" Text="In my game (a multiplayer RPG type game) I send parts of the path to the client (for NPC nearby), ie. the 3 next positions and the Time when the NPC should be there.&#xD;&#xA;For players I just send the latest valid position + its timestamp so that on the client I can do dead reckoning (or something more elaborate if wanted).&#xD;&#xA;&#xD;&#xA;This works completely OK mostly because there are no collisions between players/NPC (with a low lag you don't really notice anything, with a, say 250+ msec lag you notice the difference if you can see the two screens (of two players) at the same time but it still is not really noteciable on 'one screen').&#xD;&#xA;&#xD;&#xA;So I'd say: go with server authoring (validationg positions + timestamps of players and also for the AI in the beginning, you can make a more elaborated system for the NPC later on without any big problems) + client prediction.&#xD;&#xA;&#xD;&#xA;ps. I use a millisecond precision which works perfectly OK except that a signed int only holds for some 3 weeks before I have to restart the server.&#xD;&#xA;&#xD;&#xA;You might also want to check out time prediction (ie. trying to get in sync as closely as possible with the server)." />
  <row Id="34711" PostHistoryTypeId="2" PostId="15316" RevisionGUID="7acab9ab-b78b-459a-aef1-073a08ac09a6" CreationDate="2011-07-28T19:32:53.250" UserId="8913" Text="What is the term for that?  &#xD;&#xA;A game that used to cost money but is so old that it is now available for free (though not always open-sourced).  &#xD;&#xA;&#xD;&#xA;Also, does anyone know where I can find a list of such games?" />
  <row Id="34712" PostHistoryTypeId="1" PostId="15316" RevisionGUID="7acab9ab-b78b-459a-aef1-073a08ac09a6" CreationDate="2011-07-28T19:32:53.250" UserId="8913" Text="Term for a game that used to cost money but is now a public license" />
  <row Id="34713" PostHistoryTypeId="3" PostId="15316" RevisionGUID="7acab9ab-b78b-459a-aef1-073a08ac09a6" CreationDate="2011-07-28T19:32:53.250" UserId="8913" Text="&lt;game-industry&gt;&lt;licensing&gt;" />
  <row Id="34716" PostHistoryTypeId="2" PostId="15318" RevisionGUID="86ff4be2-b6bc-4413-898d-9ee9ed50ab27" CreationDate="2011-07-28T19:50:33.357" UserId="6558" Text="The term is 'Freeware' (if the game was officially released for free by the company late in it's life), or 'public domain' if the copyright ran out.  Copyrights last too long in the US, and no game has hit the 'automatic' lapse of copyright.&#xD;&#xA;&#xD;&#xA;There is also the term 'Abandonware', which usually means &quot;the game/software is old and no longer being sold or supported&quot;.  Many people think that abandonware can be distributed legally, but that is not true.  Someone still owns the copyright on those games, though in many cases the exact owner is a mystery even to the owner.&#xD;&#xA;&#xD;&#xA;Wikipedia has a list of freeware games: http://en.wikipedia.org/wiki/List_of_freeware_video_games" />
  <row Id="34719" PostHistoryTypeId="4" PostId="496" RevisionGUID="08657d8d-7ff9-44b1-86fe-1cd8614c2dad" CreationDate="2011-07-28T20:06:12.657" UserId="51" Comment="edited title" Text="How can I get involved with open source game projects?" />
  <row Id="34720" PostHistoryTypeId="2" PostId="15319" RevisionGUID="63d0a44e-c7a6-48b1-b2e6-c462d341cf06" CreationDate="2011-07-28T20:07:16.433" UserId="8913" Text="I am not a game developer by trade but am working on a card game (that is real time, not turn based).  I was wondering what the common mistakes are that people make when new to this sort of development so that I can avoid them!&#xD;&#xA;" />
  <row Id="34721" PostHistoryTypeId="1" PostId="15319" RevisionGUID="63d0a44e-c7a6-48b1-b2e6-c462d341cf06" CreationDate="2011-07-28T20:07:16.433" UserId="8913" Text="Commong mistakes when developing a game with Socket.io and Node.js" />
  <row Id="34722" PostHistoryTypeId="3" PostId="15319" RevisionGUID="63d0a44e-c7a6-48b1-b2e6-c462d341cf06" CreationDate="2011-07-28T20:07:16.433" UserId="8913" Text="&lt;node.js&gt;" />
  <row Id="34723" PostHistoryTypeId="4" PostId="15319" RevisionGUID="211a4b68-9a07-45df-b0a1-2116474edc3f" CreationDate="2011-07-28T20:24:51.763" UserId="1430" Comment="fixed typo in title" Text="Common mistakes when developing a game with Socket.io and Node.js" />
  <row Id="34724" PostHistoryTypeId="2" PostId="15320" RevisionGUID="504776f8-799a-4320-83db-f172eb15784b" CreationDate="2011-07-28T20:25:08.337" UserId="51" Text="Unless what you're wanting to do falls under copyright, trademarks, or patents, you're free to do whatever.  Generally speaking, *mechanics* aren't protected.  Names are.  Art is (and that includes things like music and level design).  You can make a &quot;clone&quot; in the sense that it's a very similar game, but you can't call your Tetris clone &quot;Tris&quot; and not expect some lawyers to get involved.  Likewise I wouldn't make a pacman clone with the same board layout and look of the characters.  But you could probably do something with nearly identical mechanics and a different skin." />
  <row Id="34725" PostHistoryTypeId="2" PostId="15321" RevisionGUID="6a0e0e76-7958-4b81-9f91-99ac4c787cdc" CreationDate="2011-07-28T20:38:16.150" UserId="8240" Text="I personally don't care much for answers that are just links to other stuff, but these [two][1] [tutorials][2] explain matrices and transformations really well. They explain why it is that creating a Y-rotation matrix doesn't rotate about world-space Y, and the second link explains how to rotate things in different spaces, and how to overcome these kinds of issues.&#xD;&#xA;&#xD;&#xA;Yes, the tutorials are for shader-based programming. But transformation matrices are the same, whether using shaders or fixed-function.&#xD;&#xA;&#xD;&#xA;In the interest of full disclosure, I wrote these, so take the above for what it's worth.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.arcsynthesis.org/gltut/Positioning/Tutorial%2006.html&#xD;&#xA;  [2]: http://www.arcsynthesis.org/gltut/Positioning/Tutorial%2008.html" />
  <row Id="34726" PostHistoryTypeId="2" PostId="15322" RevisionGUID="a722bfea-1570-4317-868d-da26e399cb96" CreationDate="2011-07-28T20:47:30.453" UserId="8312" Text="I have done multi pass rendering before and understand how it works. I did a simple example which rendered a basic scene with shadows. This was all done in one file. Now I am trying to figure out is how to put it into my game engine.&#xD;&#xA;&#xD;&#xA;Currently my game engine is single pass. It is in a hierarchical structure and uses Direct3D9. I have a graphics component which will load and draw a 3d model. In my game loop I update all the entities in the world then I call the draw function for each one.&#xD;&#xA;This draw function gets the vertex buffer, index buffer and texture/ material and draws the 3d model using a shader. This is fine.&#xD;&#xA;&#xD;&#xA;To do multi pass rendering to allow for shadows say I will need to draw each model multiple times. It doesn't seem right to me that in each models draw function I should put the 2nd pass code as this will then be completed before the next models 1st pass. Does anyone know of any design solutions or places where I can find some more information about this?&#xD;&#xA;&#xD;&#xA;I hope this question isn't too confusing, I have tried to explain what I currently have and what I would like to achieve to the best of my ability.&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;&#xD;&#xA;MD." />
  <row Id="34727" PostHistoryTypeId="1" PostId="15322" RevisionGUID="a722bfea-1570-4317-868d-da26e399cb96" CreationDate="2011-07-28T20:47:30.453" UserId="8312" Text="implementing multi pass rendering in a game engine" />
  <row Id="34728" PostHistoryTypeId="3" PostId="15322" RevisionGUID="a722bfea-1570-4317-868d-da26e399cb96" CreationDate="2011-07-28T20:47:30.453" UserId="8312" Text="&lt;engine&gt;&lt;directx&gt;&lt;shaders&gt;&lt;rendering&gt;" />
  <row Id="34729" PostHistoryTypeId="2" PostId="15323" RevisionGUID="dc752b33-ce0e-4ff2-bcbc-b05a2c979b4b" CreationDate="2011-07-28T21:06:32.857" UserId="7548" Text="The **terminology** you're asking about is **&quot;abandonware&quot;** (which is a combination of elements from the words &quot;abandoned&quot; and &quot;software&quot;), but free doesn't necessarily mean the vendor permitted it to be free (see my final paragraph about downloads below...).&#xD;&#xA;&#xD;&#xA;For a **list of abandonware game titles**, there is one famous web site that provides a fairly extensive list which is also categorized for further convenience:&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Abandonia&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.abandonia.com/&#xD;&#xA;&#xD;&#xA;A note about downloads:  There are a few vendors who are known for allowing the old copies to be distributed freely (and I'm not aware of any that are [intentionally] open source), but as far as I know this is so rare that you might as well assume that any abandoned game you can download likely involves a copyright violation even if the company has gone out of business (you'll need to consult legal expertise to find out how copyright works in your jurisdiction with regard to a particular title).&#xD;&#xA;" />
  <row Id="34733" PostHistoryTypeId="5" PostId="15323" RevisionGUID="07718200-9d9d-4162-be58-94cf74b4c0e2" CreationDate="2011-07-28T21:12:59.510" UserId="7548" Comment="added 10 characters in body" Text="The **terminology** you're asking about is **&quot;abandonware&quot;** (which is a combination of elements from the words &quot;abandoned&quot; and &quot;software&quot;), but free doesn't necessarily mean the copyright holder permitted it to be free (see my final paragraph about downloads below...).&#xD;&#xA;&#xD;&#xA;For a **list of abandonware game titles**, there is one famous web site that provides a fairly extensive list which is also categorized for further convenience:&#xD;&#xA;&#xD;&#xA;&amp;nbsp; Abandonia&lt;br&gt;&#xD;&#xA;&amp;nbsp; http://www.abandonia.com/&#xD;&#xA;&#xD;&#xA;A note about downloads:  There are a few vendors who are known for allowing the old copies to be distributed freely (and I'm not aware of any that are [intentionally] open source), but as far as I know this is so rare that you might as well assume that any abandoned game you can download likely involves a copyright violation even if the company has gone out of business (you'll need to consult legal expertise to find out how copyright works in your jurisdiction with regard to a particular title).&#xD;&#xA;" />
  <row Id="34734" PostHistoryTypeId="25" PostId="15319" RevisionGUID="2d8eca5e-de40-419b-8c88-d586afc968fd" CreationDate="2011-07-28T21:32:39.787" Comment="http://twitter.com/#!/StackGameDev/status/96694582363951104" />
  <row Id="34735" PostHistoryTypeId="2" PostId="15325" RevisionGUID="9afb43f0-f590-4c61-942a-bfe391ec9365" CreationDate="2011-07-28T22:15:55.823" UserId="7911" Text="With your current structure you'll need a second API for your models to handle the shadow pass.&#xD;&#xA;&#xD;&#xA;If you wanted to invert some of your logic then let the models store their data and a friendly description of how they want to be rendered, and let the graphics engine pull data from the models to render according to those descriptions.  This will let the graphics code handle the shadows (or post processing FX, etc...) in its own way with the second pass.&#xD;&#xA;" />
  <row Id="34736" PostHistoryTypeId="2" PostId="15326" RevisionGUID="89678868-0dbf-49b2-ac40-40e877c08625" CreationDate="2011-07-28T22:24:38.157" UserId="6275" Text="i have a simple question.&#xD;&#xA;&#xD;&#xA;For people that know and built [ogre3D](http://www.ogre3d.org) from source as a Static library, What is the order of which the libraries should be linked?&#xD;&#xA;&#xD;&#xA;The libraries I need to be organized are:&#xD;&#xA;&#xD;&#xA;Ogre Plugins&#xD;&#xA;&#xD;&#xA;'libOgreMain.a'&#xD;&#xA;&#xD;&#xA;Ogre RenderSystems&#xD;&#xA;&#xD;&#xA;Boost(version 1.47)[link](http://www.boost.org/)&#xD;&#xA;&#xD;&#xA;Ogre's Dependencies&#xD;&#xA;&#xD;&#xA;The reason im asking is because in the Ogre forums, I have asked about this and didnt get a good reply...yet.&#xD;&#xA;&#xD;&#xA;The other reason is because even though i link to the boost library, i get this error:&#xD;&#xA;&#xD;&#xA;`undefined reference to '_imp___ZN5boost6thread20hardware_concurrencyEv'`&#xD;&#xA;&#xD;&#xA;My compiler is MinGW with CodeBlocks as the IDE&#xD;&#xA;&#xD;&#xA;And my Main Computer Im building on is Windows Vista 32 bit" />
  <row Id="34737" PostHistoryTypeId="1" PostId="15326" RevisionGUID="89678868-0dbf-49b2-ac40-40e877c08625" CreationDate="2011-07-28T22:24:38.157" UserId="6275" Text="Ogre Specific libraries" />
  <row Id="34738" PostHistoryTypeId="3" PostId="15326" RevisionGUID="89678868-0dbf-49b2-ac40-40e877c08625" CreationDate="2011-07-28T22:24:38.157" UserId="6275" Text="&lt;c++&gt;&lt;ogre&gt;&lt;libraries&gt;&lt;mingw&gt;" />
  <row Id="34739" PostHistoryTypeId="2" PostId="15327" RevisionGUID="c09a9801-1967-4e50-a743-42925497d1c1" CreationDate="2011-07-28T22:41:30.710" UserId="8090" Text="The entities should not be responsible for drawing themselves. They (or just their renderable components) should be passed to the rendering engine and the rendering engine should have the responsibility of rendering them." />
  <row Id="34740" PostHistoryTypeId="2" PostId="15328" RevisionGUID="d96891e4-c771-4fe7-8b01-75c65fc04e57" CreationDate="2011-07-28T23:04:48.153" UserId="8915" Text="I asked this question at StackOverflow.com but it seems it was the wrong place, so I'm reasking here, sorry for that.&#xD;&#xA;&#xD;&#xA;Imagine a Sims-like 2D game for a touch based mobile phone where one can interact with virtually any object in the scene.&#xD;&#xA;&#xD;&#xA;**How can I efficiently detect which object is being touched by the player efficiently?**&#xD;&#xA;&#xD;&#xA;In my short experience, looping through all the visible objects in the scene and checking if they're touched has so far done the job, but when there may be many many moving objects in the screen that sounds kind of inefficient isn't it? Keeping the visible moving objects list can consume time in itself as one may have to loop through all of them each frame.&#xD;&#xA;&#xD;&#xA;Other solutions I've thought are:&#xD;&#xA;&#xD;&#xA;Spatial hashing. Divide the screen as a grid and place the visible objects in the corresponding bucket. Detection of the clicked object is fast but there's additional overhead for placing the objects in the correct bucket each frame.&#xD;&#xA;&#xD;&#xA;Maintaining a quad-tree. Moving objects have to be rearranged all the time, the previous solution looks better.&#xD;&#xA;&#xD;&#xA;What is usually done in this case?&#xD;&#xA;&#xD;&#xA;Thx a lot." />
  <row Id="34741" PostHistoryTypeId="1" PostId="15328" RevisionGUID="d96891e4-c771-4fe7-8b01-75c65fc04e57" CreationDate="2011-07-28T23:04:48.153" UserId="8915" Text="Efficient way of detecting a touched object in a game?" />
  <row Id="34742" PostHistoryTypeId="3" PostId="15328" RevisionGUID="d96891e4-c771-4fe7-8b01-75c65fc04e57" CreationDate="2011-07-28T23:04:48.153" UserId="8915" Text="&lt;2d&gt;&lt;java&gt;&lt;monotouch&gt;" />
  <row Id="34743" PostHistoryTypeId="2" PostId="15329" RevisionGUID="58224112-12bd-4217-88cc-0ab9ee88f7c1" CreationDate="2011-07-28T23:18:28.367" UserId="2111" Text="I'd recommend **profiling first** and check if the touching check really is a bottleneck. &#xD;&#xA;&#xD;&#xA;Test with the maximal amount of objects that your game will use as a final product and see if you get frame drops. &#xD;&#xA;&#xD;&#xA;If it is in fact a bottleneck, I'd say go with the spatial hasing option and see if it gets better this way.&#xD;&#xA;&#xD;&#xA;But this is just my personal opinion. I'd say test and see if you really need to optimize, and if you do, check for alternatives." />
  <row Id="34744" PostHistoryTypeId="2" PostId="15330" RevisionGUID="c5aa2eaa-b8ed-442c-a50a-78bd15fa4c04" CreationDate="2011-07-28T23:27:07.357" UserId="8524" Text="To me, this suggests an off-screen buffer with a specialized render of the view on the screen. Each object is entirely one colour (no lighting calculations etc) which uniquely identifies the object. Z buffering used as for a normal render. Maybe lower resolution than the main screen render - at the very least antialiassing would be bad, so no need to render higher resolution than the screen.&#xD;&#xA;&#xD;&#xA;This *may* be a way to offload most of the work to the graphics hardware.&#xD;&#xA;&#xD;&#xA;Warning - I'm not an experienced game developer - this is just an idea, it may not be possible.&#xD;&#xA;" />
  <row Id="34745" PostHistoryTypeId="5" PostId="15328" RevisionGUID="44269bca-8abd-424b-93ac-4a8d9a1da6d3" CreationDate="2011-07-28T23:46:00.593" UserId="51" Comment="deleted 135 characters in body; edited tags" Text="Imagine a Sims-like 2D game for a touch based mobile phone where one can interact with virtually any object in the scene.&#xD;&#xA;&#xD;&#xA;**How can I efficiently detect which object is being touched by the player efficiently?**&#xD;&#xA;&#xD;&#xA;In my short experience, looping through all the visible objects in the scene and checking if they're touched has so far done the job, but when there may be many many moving objects in the screen that sounds kind of inefficient isn't it? Keeping the visible moving objects list can consume time in itself as one may have to loop through all of them each frame.&#xD;&#xA;&#xD;&#xA;Other solutions I've thought are:&#xD;&#xA;&#xD;&#xA;Spatial hashing. Divide the screen as a grid and place the visible objects in the corresponding bucket. Detection of the clicked object is fast but there's additional overhead for placing the objects in the correct bucket each frame.&#xD;&#xA;&#xD;&#xA;Maintaining a quad-tree. Moving objects have to be rearranged all the time, the previous solution looks better.&#xD;&#xA;&#xD;&#xA;What is usually done in this case?" />
  <row Id="34746" PostHistoryTypeId="6" PostId="15328" RevisionGUID="44269bca-8abd-424b-93ac-4a8d9a1da6d3" CreationDate="2011-07-28T23:46:00.593" UserId="51" Comment="deleted 135 characters in body; edited tags" Text="&lt;2d&gt;&lt;java&gt;&lt;input&gt;&lt;monotouch&gt;" />
  <row Id="34747" PostHistoryTypeId="2" PostId="15331" RevisionGUID="a86ce954-1abb-4789-8012-0990bdd16e33" CreationDate="2011-07-28T23:49:49.553" UserId="7911" Text="I didn't know that there were link order dependencies in Ogre's basic SDK build, I certainly never had to rearrange anything on the Windows platform.  Are you sure that you're using the right version of Boost?&#xD;&#xA;&#xD;&#xA;Another thought, if you're using plugins it's possible that one of them is out of date and needs updating to a matching Boost with a recompile.&#xD;&#xA;&#xD;&#xA;Try the compiler option  -DBOOST_THREAD_USE_LIB&#xD;&#xA;" />
  <row Id="34748" PostHistoryTypeId="2" PostId="15332" RevisionGUID="9ef2e6f6-c10b-4fc2-90ec-a6a911087601" CreationDate="2011-07-29T00:11:22.947" UserId="8770" Text="Is it possible to use Java as a scripting language for a C++ engine/game?&#xD;&#xA;&#xD;&#xA;I understand that you need to make a binding to the interpreter, but I haven't seen any around." />
  <row Id="34749" PostHistoryTypeId="1" PostId="15332" RevisionGUID="9ef2e6f6-c10b-4fc2-90ec-a6a911087601" CreationDate="2011-07-29T00:11:22.947" UserId="8770" Text="Is it possible to use Java as a scripting language?" />
  <row Id="34750" PostHistoryTypeId="3" PostId="15332" RevisionGUID="9ef2e6f6-c10b-4fc2-90ec-a6a911087601" CreationDate="2011-07-29T00:11:22.947" UserId="8770" Text="&lt;c++&gt;&lt;java&gt;&lt;scripting&gt;" />
  <row Id="34751" PostHistoryTypeId="25" PostId="15328" RevisionGUID="23d1edbd-671a-4ee5-b9da-56e697e37562" CreationDate="2011-07-29T00:32:39.457" Comment="http://twitter.com/#!/StackGameDev/status/96739880645820416" />
  <row Id="34752" PostHistoryTypeId="5" PostId="15292" RevisionGUID="1f7d3a27-737d-4f73-950e-90fedc9f2c9b" CreationDate="2011-07-29T01:54:25.467" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How do you get textures out of a png file](http://gamedev.stackexchange.com/questions/15099/how-do-you-get-textures-out-of-a-png-file)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have a png spritesheet that has all of my characters already on it. I downloaded Zwoptex, but that tools seems to be for creating the packed spritesheet, rather than generating regions for an already existing one.&#xD;&#xA;&#xD;&#xA;I've tried doing it by hand, but that didn't work out. Are there any tools that will take my sprite sheet, detect the regions and produce the plist file for me?" />
  <row Id="34753" PostHistoryTypeId="10" PostId="15292" RevisionGUID="a3135f85-8c6e-4195-b726-5ba838c8462a" CreationDate="2011-07-29T01:54:25.077" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="34754" PostHistoryTypeId="25" PostId="15316" RevisionGUID="e2e632d6-75cf-48be-99b4-9840e70f50dd" CreationDate="2011-07-29T03:33:04.403" Comment="http://twitter.com/#!/StackGameDev/status/96785283860803584" />
  <row Id="34755" PostHistoryTypeId="2" PostId="15333" RevisionGUID="28140fbc-86ce-4629-8c4e-6c1df9552d56" CreationDate="2011-07-29T03:56:47.423" UserId="3830" Text="Quite possible.  &#xD;&#xA;&#xD;&#xA;You could probably use the [GNU Interpreter for Java][1] or some other such system.  However I think you'll find a lot more cases (as mentioned above) of people using Lua, Python or other languages in games.  Lua in particular is very well suited for the task of embedded scripting.&#xD;&#xA;&#xD;&#xA;Additionally, you might check [the jog interpreter][2] project, which touts itself as, &quot;...a lightweight but reasonably full-featured and fast Java compiler and interpreter.&quot; that is written in C++. &#xD;&#xA;&#xD;&#xA;Amusingly, googling for &quot;java interpreters in C++&quot; seems to yield as many (if not more) hits for C++ interpreters written in Java instead of the other way around :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/GNU_Interpreter_for_Java&#xD;&#xA;  [2]: http://code.google.com/p/jog-interpreter/" />
  <row Id="34756" PostHistoryTypeId="2" PostId="15334" RevisionGUID="717f9068-26e2-4ae4-9f0b-bc2d10ca42e7" CreationDate="2011-07-29T03:58:15.283" UserId="8194" Text="Okay, so I am using C++ with OpenGL, and I am going to create a loader to load in textures for my 3D game. (But the textures are 2D). I want the option of transparency, even if I decide not to use it. I need decent quality, although it doesn't have to be top notch. What do you guys suggest for format (PNG, TGA, etc.). Also, maybe make it something that is easy to create a loader for (I'm not going to use an already created one.). And also, if you have any links/tips to help out with the loader, that would be appreciated." />
  <row Id="34757" PostHistoryTypeId="1" PostId="15334" RevisionGUID="717f9068-26e2-4ae4-9f0b-bc2d10ca42e7" CreationDate="2011-07-29T03:58:15.283" UserId="8194" Text="Best (Most Popular?) Image Format For Texturing" />
  <row Id="34758" PostHistoryTypeId="3" PostId="15334" RevisionGUID="717f9068-26e2-4ae4-9f0b-bc2d10ca42e7" CreationDate="2011-07-29T03:58:15.283" UserId="8194" Text="&lt;c++&gt;&lt;opengl&gt;&lt;textures&gt;" />
  <row Id="34759" PostHistoryTypeId="2" PostId="15335" RevisionGUID="103de533-9551-469e-b73e-1e5efbb78b28" CreationDate="2011-07-29T04:19:12.243" UserId="1430" Text="I don't understand why you wouldn't want to use an off-the-shelf loader. [PNG][1], for example, is a good choice for a format but is complex to write a general purpose loader for (and probably not worth the effort of writing one that only loads the specific subset of PNG formats you care about).&#xD;&#xA;&#xD;&#xA;Given that somewhat unusual requirement, [TGA][2] is probably your best bet. TGA 2.0 has an alpha channel and is relatively simple compared to PNG.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.w3.org/TR/PNG/&#xD;&#xA;  [2]: http://paulbourke.net/dataformats/tga/" />
  <row Id="34760" PostHistoryTypeId="2" PostId="15336" RevisionGUID="f7a7381e-02ce-42b8-98b5-feff881e0cea" CreationDate="2011-07-29T04:29:51.733" UserId="1430" Text="Yes, it's possible. Way back in 1999, an article was published in [Game Developer][1] on the subject, entitled &quot;Dirty Java: Using the JNI Within Games.&quot; I still have my copy of issue in fact. Fortunately [the article also appears to be available online][2]. Of course, the code in that article is probably a tad out of date, so you can also check out these articles as well:&#xD;&#xA;&#xD;&#xA;  * [JNI – C++ integration made easy][3]&#xD;&#xA;  * [How to Call Java Functions from C using JNI][4]&#xD;&#xA;&#xD;&#xA;However, these days it's probably better to consider a language like Python, Lua or Javascript for your embedding needs. They're a lot more lightweight and, in the case of Lua in particular, designed with embedding and scripting in mind. &#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdmag.com/&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/3347/dirty_java_using_the_java_native_.php?print=1&#xD;&#xA;  [3]: http://www.cs.technion.ac.il/~gabr/papers/cuj_jni.pdf&#xD;&#xA;  [4]: http://www.codeproject.com/KB/cpp/CJniJava.aspx" />
  <row Id="34761" PostHistoryTypeId="2" PostId="15337" RevisionGUID="5aecb6a3-9d92-4277-a524-c56a781cb05e" CreationDate="2011-07-29T05:00:03.657" UserId="2566" Text="In Maya I use fur to create plants. In my game I want to render these plants with cel shading. I use .obj as a file format in my game for the models, but it doesn't seem to include the fur.&#xD;&#xA;&#xD;&#xA;Is there a way to export the fur with the model into the obj file? Generating the fur at runtime is a bit CPU expensive for the platform." />
  <row Id="34762" PostHistoryTypeId="1" PostId="15337" RevisionGUID="5aecb6a3-9d92-4277-a524-c56a781cb05e" CreationDate="2011-07-29T05:00:03.657" UserId="2566" Text="How to include fur in the exported obj file in Maya?" />
  <row Id="34763" PostHistoryTypeId="3" PostId="15337" RevisionGUID="5aecb6a3-9d92-4277-a524-c56a781cb05e" CreationDate="2011-07-29T05:00:03.657" UserId="2566" Text="&lt;models&gt;&lt;maya&gt;&lt;obj&gt;" />
  <row Id="34764" PostHistoryTypeId="5" PostId="15337" RevisionGUID="af230233-8223-4a79-8fce-bb707ee90981" CreationDate="2011-07-29T05:13:19.933" UserId="2566" Comment="added 27 characters in body" Text="In Maya I use fur to create plants. In my game I want to render these plants with cel shading. I use .obj as a file format in my game for the models, but it doesn't seem to include the fur.&#xD;&#xA;&#xD;&#xA;Is there a way to export the fur (as polygons or triangles) with the model into the obj file? Generating the fur at runtime is a bit CPU expensive for the platform." />
  <row Id="34765" PostHistoryTypeId="5" PostId="15337" RevisionGUID="c0eb7949-ff98-4b53-9991-3c011182b49b" CreationDate="2011-07-29T05:18:29.210" UserId="2566" Comment="deleted 13 characters in body" Text="In Maya I use fur to create plants. In my game I want to render these plants with cel shading. I use .obj as a file format in my game for the models, but it doesn't seem to include the fur.&#xD;&#xA;&#xD;&#xA;Is there a way to export the fur (as vertices) with the model into the obj file? Generating the fur at runtime is a bit CPU expensive for the platform." />
  <row Id="34766" PostHistoryTypeId="2" PostId="15338" RevisionGUID="e54d1a25-3ac9-4170-b17d-c95ae8515037" CreationDate="2011-07-29T05:20:00.787" UserId="8920" Text="I'm just starting to look into creating Source mods for HL2 and I'm a little bit confused. I've gone through some tutorials on level creating to get the basics and it seems to me that it's all that really goes into the creation of a mod. I know I'm wrong so could someone please explain to me where the programming comes in? Is it more than just sticking NPCs and objects on a map?" />
  <row Id="34767" PostHistoryTypeId="1" PostId="15338" RevisionGUID="e54d1a25-3ac9-4170-b17d-c95ae8515037" CreationDate="2011-07-29T05:20:00.787" UserId="8920" Text="What's the difference between creating a Source mod and just creating some levels?" />
  <row Id="34768" PostHistoryTypeId="3" PostId="15338" RevisionGUID="e54d1a25-3ac9-4170-b17d-c95ae8515037" CreationDate="2011-07-29T05:20:00.787" UserId="8920" Text="&lt;mods&gt;" />
  <row Id="34769" PostHistoryTypeId="5" PostId="15337" RevisionGUID="77fbbc4f-d8b6-43bb-9285-b98eed5dd566" CreationDate="2011-07-29T05:24:53.620" UserId="2566" Comment="added 10 characters in body" Text="In Maya I use fur to create plants. In my game I want to render these plants with cel shading. I use Wavefront .obj as a file format in my game for the models, but it doesn't seem to include the fur.&#xD;&#xA;&#xD;&#xA;Is there a way to export the fur (as vertices) with the model into the obj file? Generating the fur at runtime is a bit CPU expensive for the platform." />
  <row Id="34770" PostHistoryTypeId="2" PostId="15339" RevisionGUID="57c37e88-6736-4ed7-8793-683fbaa3e731" CreationDate="2011-07-29T05:32:22.960" UserId="1430" Text="Fur is usually implemented as a render effect -- there isn't a 1:1 correspondence with geometry, although geometry may be used to achieve the effect (textured polygonal strips, for example, or the newer and better looking '[shells and fins][1]' methods), so there isn't really anything to export unless you were you convert the fur representation to 3D geometry. *This would almost certainly result in extremely poor performance in your game.*&#xD;&#xA;&#xD;&#xA;The solution you probably want to is abandon using Maya to generate the foliage and employ a rendering effect in your game code to achieve the desired results instead. The article I linked to before provides one possible implementation; [here][2] is another example, using XNA.&#xD;&#xA;&#xD;&#xA;However, since you said you are using Maya's fur rendering to produce plants, you may instead want to consider rendering algorithms designed for exactly that effect. Game Rendering has a whole section on &quot;[vegetation][3].&quot; There's quite a few options for grass rendering, for example:&#xD;&#xA;&#xD;&#xA;   * [Rendering Grass with Instancing in D3D10][4]&#xD;&#xA;   * [Rendering Countless Blades of Waving Grass][5]&#xD;&#xA;&#xD;&#xA;I know you mentioned being CPU limited, but you didn't specify exactly how much so, or what the GPU resources you have available are. It should be reasonable these days to implement some level of these techniques with reasonable scalability back to older hardware and without too much CPU strain. &#xD;&#xA;&#xD;&#xA;If that fails, you can always fall back to using simple polygonal billboard strips and &quot;exporting&quot; your fur out of Maya by rendering it as a texture you eventually apply to the billboards in your game. But actually exporting the fur as geometry is almost certainly not the approach you want.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamecareerguide.com/education/theses/20051028/sheppard.pdf&#xD;&#xA;  [2]: http://www.sgtconker.com/2009/10/article-fur-rendering/&#xD;&#xA;  [3]: http://www.gamerendering.com/category/vegetation/&#xD;&#xA;  [4]: http://software.intel.com/en-us/articles/rendering-grass-with-instancing-in-directx-10/&#xD;&#xA;  [5]: http://http.developer.nvidia.com/GPUGems/gpugems_ch07.html" />
  <row Id="34771" PostHistoryTypeId="2" PostId="15340" RevisionGUID="b841d342-e29c-4ec0-a094-85d3635b0d46" CreationDate="2011-07-29T05:42:29.300" UserId="1430" Text="You can create levels -- place existing objects in them and specify their behavioral parameters to an extent -- without programming. Programming in mods generally comes in to play when you want to modify or tweak the intrinsic behavior of things in the game, or create entirely new kinds of things with unique AI or effects, beyond what is possible by the stock engine and object library.&#xD;&#xA;&#xD;&#xA;For [Source specifically][1] this tends to include things like entity behavior and AI, networking, rendering effects, and UI.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Category:Programming" />
  <row Id="34772" PostHistoryTypeId="6" PostId="15302" RevisionGUID="66558425-6587-4392-9487-f68672603546" CreationDate="2011-07-29T05:42:54.853" UserId="-1" Comment="Remove XNA from tags because the question has nothing to do with XNA." Text="&lt;rendering&gt;" />
  <row Id="34773" PostHistoryTypeId="24" PostId="15302" RevisionGUID="66558425-6587-4392-9487-f68672603546" CreationDate="2011-07-29T05:42:54.853" Comment="Proposed by 77.240.167.27|9bc6ce47-95ba-47c1-b255-0b026e439385 approved by 1430 edit id of 584" />
  <row Id="34774" PostHistoryTypeId="25" PostId="15322" RevisionGUID="aee12d17-2040-4c86-8394-7191fd388646" CreationDate="2011-07-29T06:33:03.890" Comment="http://twitter.com/#!/StackGameDev/status/96830580724989952" />
  <row Id="34776" PostHistoryTypeId="2" PostId="15342" RevisionGUID="12d7c252-9941-4285-8a3b-ca70418c1da1" CreationDate="2011-07-29T07:42:50.693" UserId="4677" Text="It seems like [DDS (DirectDraw Surface)][1] is the most popular choice for textures at the moment. Is has different pixel formats, transparency, and compression. It is supported in OpenGL through the GL_ARB_texture_compression extension.&#xD;&#xA;&#xD;&#xA;For example, there is an OpenGL loader [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/DirectDraw_Surface&#xD;&#xA;  [2]: http://users.telenet.be/tfautre/softdev/ddsload/" />
  <row Id="34777" PostHistoryTypeId="5" PostId="15328" RevisionGUID="0eb8488b-10e5-4273-9803-ee1e26154ca2" CreationDate="2011-07-29T08:31:38.810" UserId="8915" Comment="deleted 12 characters in body" Text="Imagine a Sims-like 2D game for a touch based mobile phone where one can interact with virtually any object in the scene.&#xD;&#xA;&#xD;&#xA;**How can I efficiently detect which object is being touched by the player?**&#xD;&#xA;&#xD;&#xA;In my short experience, looping through all the visible objects in the scene and checking if they're touched has so far done the job, but when there may be many many moving objects in the screen that sounds kind of inefficient isn't it? Keeping the visible moving objects list can consume time in itself as one may have to loop through all of them each frame.&#xD;&#xA;&#xD;&#xA;Other solutions I've thought are:&#xD;&#xA;&#xD;&#xA;Spatial hashing. Divide the screen as a grid and place the visible objects in the corresponding bucket. Detection of the clicked object is fast but there's additional overhead for placing the objects in the correct bucket each frame.&#xD;&#xA;&#xD;&#xA;Maintaining a quad-tree. Moving objects have to be rearranged all the time, the previous solution looks better.&#xD;&#xA;&#xD;&#xA;What is usually done in this case?" />
  <row Id="34778" PostHistoryTypeId="2" PostId="15343" RevisionGUID="6b0636be-ea21-477a-ad9b-3b50f56c5f9f" CreationDate="2011-07-29T09:11:46.043" UserId="8924" Text="Yes it is possible. Game Vampire the Masquerade - Redemption uses Java as a scripting language. And that game is the only serious game i know of using Java. Bear i mind, they are not using Java for their Nod engine.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;There is JMonkeyEngine written completely in Java." />
  <row Id="34779" PostHistoryTypeId="2" PostId="15344" RevisionGUID="bc955cef-b911-4dd8-9453-76ce0db16e3e" CreationDate="2011-07-29T09:18:46.280" UserId="8770" Text="What would be a easy/fast language that would be good for an Indie developer for a Racer or FPS or Platformer?&#xD;&#xA;&#xD;&#xA;Java?&#xD;&#xA;C#?&#xD;&#xA;C++?&#xD;&#xA;C?&#xD;&#xA;Anything else that would be good?&#xD;&#xA;&#xD;&#xA;Edit: (Platforms: Linux, Mac, Windows)" />
  <row Id="34780" PostHistoryTypeId="1" PostId="15344" RevisionGUID="bc955cef-b911-4dd8-9453-76ce0db16e3e" CreationDate="2011-07-29T09:18:46.280" UserId="8770" Text="What language for Indie dev?" />
  <row Id="34781" PostHistoryTypeId="3" PostId="15344" RevisionGUID="bc955cef-b911-4dd8-9453-76ce0db16e3e" CreationDate="2011-07-29T09:18:46.280" UserId="8770" Text="&lt;game-design&gt;&lt;programming&gt;&lt;indie&gt;&lt;hobby-development&gt;" />
  <row Id="34782" PostHistoryTypeId="25" PostId="15338" RevisionGUID="b4b41555-9b76-4048-a3fd-3c7b2a234864" CreationDate="2011-07-29T09:33:04.910" Comment="http://twitter.com/#!/StackGameDev/status/96875879736672256" />
  <row Id="34783" PostHistoryTypeId="5" PostId="15344" RevisionGUID="764e4c0b-1a32-4004-b791-d0fb000d8bf1" CreationDate="2011-07-29T09:50:50.777" UserId="8770" Comment="deleted 23 characters in body" Text="What would be a easy/fast language that would be good for an Indie developer for a FPS?&#xD;&#xA;&#xD;&#xA;Java?&#xD;&#xA;C#?&#xD;&#xA;C++?&#xD;&#xA;C?&#xD;&#xA;Anything else that would be good?&#xD;&#xA;&#xD;&#xA;Edit: (Platforms: Linux, Mac, Windows)" />
  <row Id="34784" PostHistoryTypeId="2" PostId="15345" RevisionGUID="e351e50c-6eb0-4e22-ad43-01b0824cf8e6" CreationDate="2011-07-29T09:58:12.063" UserId="364" Text="The one you know the better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;That works on the platform you want to build games on." />
  <row Id="34785" PostHistoryTypeId="2" PostId="15346" RevisionGUID="e48a46f1-b62d-4e01-954b-c11db7a459be" CreationDate="2011-07-29T10:27:45.383" UserId="7787" Text="I've been looking for articles or tutorials on this and I can't seem to find any, so I thought I'd ask here. I've created a bullet class in my game that is added and removed through a list. If I'm going to make these bullets work the way I want them to I need to be able to do two things:&#xD;&#xA;&#xD;&#xA;One, I need to check if the bullets are colliding with each other and then remove the two bullets that are colliding. I've tried doing it by updating the bullet list with a for statement and then checking for collision with another for statement, but that occasionally crashes the game.&#xD;&#xA;&#xD;&#xA;Two, I need to be able to check how far away every other bullet in the list is from the current one.&#xD;&#xA;&#xD;&#xA;So how can I go about doing this?" />
  <row Id="34786" PostHistoryTypeId="1" PostId="15346" RevisionGUID="e48a46f1-b62d-4e01-954b-c11db7a459be" CreationDate="2011-07-29T10:27:45.383" UserId="7787" Text="Some questions about lists." />
  <row Id="34787" PostHistoryTypeId="3" PostId="15346" RevisionGUID="e48a46f1-b62d-4e01-954b-c11db7a459be" CreationDate="2011-07-29T10:27:45.383" UserId="7787" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="34788" PostHistoryTypeId="2" PostId="15347" RevisionGUID="c6c0c31c-5d90-40fb-8870-4fbb9084b7b4" CreationDate="2011-07-29T10:36:18.000" UserId="1258" Text="I would use an array of Bullets (with Bullet value type), with an &quot;Alive&quot; flag to &quot;add/remove&quot; bullets without generating too much garbage. You can iterate over the array and simply skip bullets that are not currently used (make sure to clear data before deactivating them).&#xD;&#xA;&#xD;&#xA;The first point is tricky. If you check every bullet against all other bullets and repeat, you're going to have way too many checks. You could have a spatial partitioning system and move from there.&#xD;&#xA;&#xD;&#xA;Is it a &quot;bullet hell&quot;-type of game?" />
  <row Id="34789" PostHistoryTypeId="2" PostId="15348" RevisionGUID="634f3050-87ba-47b7-aab2-e3057f18b605" CreationDate="2011-07-29T10:45:52.360" UserId="4894" Text="If you wan't to minimize the amount of code to ship your game on the 3 platforms, I guess you should use a standard like C++ or Java. &#xD;&#xA;&#xD;&#xA;The advantage of C++ is that it is more fast at runtime, but you need to recompile your project for each platform, and sometimes use different libraries for OS specific features. Also you can control more easily how to handle your memory. &#xD;&#xA;&#xD;&#xA;The advantage of Java is that it's generic, and if you don't know pointer arithmetic, easier to write. &#xD;&#xA;&#xD;&#xA;I guess there are other solutions, like Flash, but these are the best solutions in my opinion. " />
  <row Id="34790" PostHistoryTypeId="5" PostId="15304" RevisionGUID="eba8b20a-7209-4519-9dbc-8f5c06bd34c1" CreationDate="2011-07-29T10:47:08.293" UserId="1141" Comment="Added an example implementation of the &quot;tri-complex&quot; (triplex) class, removed the use of *i* directly" Text="Let's first define a new number. No worries, it's an easy one.&#xD;&#xA;&#xD;&#xA;* *f*: *f* × *f* = -3&#xD;&#xA;&#xD;&#xA;Or, to put it simply: f = √3 × *i*, with *i* being the [imaginary unit][1]. With this, a rotation by 60 degrees clockwise is the same as multiplication by **1/2 × (1 - *f*)**, and rotation by 60 degrees counter-clockwise the same as multiplication by **1/2 × (1 + *f*)**. If this sounds strange, remember that multiplication by a complex number is the same as rotation in the 2D plane. We just &quot;squash&quot; the complex numbers in the imaginary direction a bit (by √3) to not have to deal with square roots ... or non-integers, for that matter.&#xD;&#xA;&#xD;&#xA;We can also write the point (a,b) as a + b × *f*.&#xD;&#xA;&#xD;&#xA;This lets us rotate any point in the plane; for example, the point (2,0) = 2 + 0 × *f* rotates to (1,-1), then to (-1,-1), (-2,0), (-1,1), (1,1) and finally back to (2,0), simply by multiplying it.&#xD;&#xA;&#xD;&#xA;Of course, we need a way to translate those points from our coordinates to those we do the rotations in, and then back again. For this, another bit of information is needed: If the point we do the rotation around is to the &quot;left&quot; or to the &quot;right&quot; of the vertical line. For simplicity, we declare that is has a &quot;wobble&quot; value *w* of 0 if it's to the left of it (like the center of the rotation [0,0] in your bottom two pictures), and of 1 if it's to the right of it. This extends our original points to be three-dimensional; (*x*, *y*, *w*), with &quot;w&quot; being either 0 or 1 after normalisation. The normalisation function is:&#xD;&#xA;&#xD;&#xA;NORM: (*x*, *y*, *w*) -&gt; (*x* + floor(*w* / 2), *y*, *w* mod 2), with the &quot;mod&quot; operation defined such that it only returns positive values or zero.&#xD;&#xA;&#xD;&#xA;Our algorithm now looks as follows:&#xD;&#xA;&#xD;&#xA;1. Transform our points (*a*, *b*, *c*) to their positions relative to the rotational centre (*x*, *y*, *w*) by calculating (*a* - *x*, *b* - *y*, *c* - *w*), then normalising the result. This puts the rotational centre at (0,0,0) obviously.&#xD;&#xA;&#xD;&#xA;2. Transform our points from their &quot;native&quot; coordinates to the rotational complex ones: (*a*, *b*, *c*) -&gt; (2 × *a* + *c*, *b*) = 2 × *a* + *c* + *b* × *f*&#xD;&#xA;&#xD;&#xA;3. Rotate our points by multiplying them with one of the rotational numbers above, as needed.&#xD;&#xA;&#xD;&#xA;4. Ra-transform the points back from the rotational coordinates to their &quot;native&quot; ones: (*r*, *s*) -&gt; (floor(*r* / 2), *s*, *r* mod 2), with &quot;mod&quot; defined as above.&#xD;&#xA;&#xD;&#xA;5. Re-transform the points back to their original position by adding them to the rotational centre (*x*, *y*, *z*) and normalising.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;A simple version of our &quot;triplex&quot; numbers based *f* in C++ would look like this:&#xD;&#xA;&#xD;&#xA;    class hex {&#xD;&#xA;        public:&#xD;&#xA;            int x;&#xD;&#xA;            int y;&#xD;&#xA;            int w; /* &quot;wobble&quot;; for any given map, y+w is either odd or&#xD;&#xA;                      even for ALL hexes of that map */&#xD;&#xA;        hex(int x, int y, int w) : x(x), y(y), w(w) {}&#xD;&#xA;        /* rest of the implementation */&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    class triplex {&#xD;&#xA;        public:&#xD;&#xA;            int r; /* real part */&#xD;&#xA;            int s; /* f-imaginary part */&#xD;&#xA;            triplex(int new_r, int new_s) : r(new_r), s(new_s) {}&#xD;&#xA;            triplex(const hex &amp;hexfield)&#xD;&#xA;            {&#xD;&#xA;                r = hexfield.x * 2 + hexfield.w;&#xD;&#xA;                s = hexfield.y;&#xD;&#xA;            }&#xD;&#xA;            triplex(const triplex &amp;other)&#xD;&#xA;            {&#xD;&#xA;                this-&gt;r = other.r; this-&gt;s = other.s;&#xD;&#xA;            }&#xD;&#xA;        private:&#xD;&#xA;            /* C++ has crazy integer division and mod semantics. */&#xD;&#xA;            int _div(int a, unsigned int b)&#xD;&#xA;            {&#xD;&#xA;                int res = a / b;&#xD;&#xA;                if( a &lt; 0 &amp;&amp; a % b != 0 ) { res -= 1; }&#xD;&#xA;                return res;&#xD;&#xA;            }&#xD;&#xA;            int _mod(int a, unsigned int b)&#xD;&#xA;            {&#xD;&#xA;                int res = a % b;&#xD;&#xA;                if( res &lt; 0 ) { res += a; }&#xD;&#xA;                return res;&#xD;&#xA;            }&#xD;&#xA;        public:&#xD;&#xA;            /*&#xD;&#xA;             * Self-assignment operator; simple enough&#xD;&#xA;             */&#xD;&#xA;            triplex &amp; operator=(const triplex &amp;rhs)&#xD;&#xA;            {&#xD;&#xA;                this-&gt;r = rhs.r; this-&gt;s = rhs.s;&#xD;&#xA;                return *this;&#xD;&#xA;            }&#xD;&#xA;            /*&#xD;&#xA;             * Multiplication operators - our main workhorse&#xD;&#xA;             * Watch out for overflows&#xD;&#xA;             */&#xD;&#xA;            triplex &amp; operator*=(const triplex &amp;rhs)&#xD;&#xA;            {&#xD;&#xA;                /*&#xD;&#xA;                 * (this-&gt;r + this-&gt;s * f) * (rhs.r + rhs.s * f)&#xD;&#xA;                 * = this-&gt;r * rhs.r + (this-&gt;r * rhs.s + this-&gt;s * rhs.r ) * f&#xD;&#xA;                 *   + this-&gt;s * rhs.s * f * f&#xD;&#xA;                 *&#xD;&#xA;                 * ... remembering that f * f = -3 ...&#xD;&#xA;                 *&#xD;&#xA;                 * = (this-&gt;r * rhs.r - 3 * this-&gt;s * rhs.s)&#xD;&#xA;                 *   + (this-&gt;r * rhs.s + this-&gt;s * rhs.r) * f&#xD;&#xA;                 */&#xD;&#xA;                int new_r = this-&gt;r * rhs.r - 3 * this-&gt;s * rhs.s;&#xD;&#xA;                int new_s = this-&gt;r * rhs.s + this-&gt;s * rhs.r;&#xD;&#xA;                this-&gt;r = new_r; this-&gt;s = new_s;&#xD;&#xA;                return *this;&#xD;&#xA;            }&#xD;&#xA;            const triplex operator*(const triplex &amp;other)&#xD;&#xA;            {&#xD;&#xA;                return triplex(*this) *= other;&#xD;&#xA;            }&#xD;&#xA;            /*&#xD;&#xA;             * Now for the rotations ...&#xD;&#xA;             */&#xD;&#xA;            triplex rotate60CW() /* rotate this by 60 degrees clockwise */&#xD;&#xA;            {&#xD;&#xA;                /*&#xD;&#xA;                 * The rotation is the same as multiplikation with (1,-1)&#xD;&#xA;                 * followed by halving all values (multiplication by (1/2, 0).&#xD;&#xA;                 * If the values come from transformation from a hex field,&#xD;&#xA;                 * they will always land back on the hex field; else&#xD;&#xA;                 * we might lose some information due to the last step.&#xD;&#xA;                 */&#xD;&#xA;                (*this) *= triplex(1, -1);&#xD;&#xA;                this-&gt;r /= 2;&#xD;&#xA;                this-&gt;s /= 2;&#xD;&#xA;            }&#xD;&#xA;            triplex rotate60CCW() /* Same, counter-clockwise */&#xD;&#xA;            {&#xD;&#xA;                (*this) *= triplex(1, 1);&#xD;&#xA;                this-&gt;r /= 2;&#xD;&#xA;                this-&gt;s /= 2;&#xD;&#xA;            }&#xD;&#xA;            /*&#xD;&#xA;             * Finally, we'd like to get a hex back (actually, I'd&#xD;&#xA;             * typically create this as a constructor of the hex class)&#xD;&#xA;             */&#xD;&#xA;            operator hex()&#xD;&#xA;            {&#xD;&#xA;                return hex(_div(this-&gt;r, 2), this-&gt;s, _mod(this-&gt;r, 2));&#xD;&#xA;            }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Imaginary_unit" />
  <row Id="34791" PostHistoryTypeId="2" PostId="15349" RevisionGUID="8f376eac-6442-4593-b1ad-3d8112480bfc" CreationDate="2011-07-29T11:09:35.893" UserId="-1" Text="" />
  <row Id="34792" PostHistoryTypeId="2" PostId="15350" RevisionGUID="da210ac1-cfcb-4490-8d8a-d5b23a1a5a8b" CreationDate="2011-07-29T11:09:35.893" UserId="-1" Text="" />
  <row Id="34793" PostHistoryTypeId="2" PostId="15351" RevisionGUID="3d50bd10-fb4c-4b6c-b77a-94242feec4b6" CreationDate="2011-07-29T11:12:06.513" UserId="8121" Text="Try [APE project](http://www.ape-project.org/)&#xD;&#xA;&#xD;&#xA;It's great for low-latency server pushing" />
  <row Id="34794" PostHistoryTypeId="2" PostId="15352" RevisionGUID="7169e326-4e1b-4cf8-ae83-6bfe9b4ee9f5" CreationDate="2011-07-29T12:07:30.603" UserId="8894" Text="My question sounds pretty simple but awfully, I couldn't find much information on the internet. &#xD;&#xA;&#xD;&#xA;How can I draw a circle in my FlxSprite?&#xD;&#xA;&#xD;&#xA;I couldn't find much information about drawing geometric objects or the usage of classic graphics API in Flixel." />
  <row Id="34795" PostHistoryTypeId="1" PostId="15352" RevisionGUID="7169e326-4e1b-4cf8-ae83-6bfe9b4ee9f5" CreationDate="2011-07-29T12:07:30.603" UserId="8894" Text="Using Actionscript 3's Graphics API in Flixel" />
  <row Id="34796" PostHistoryTypeId="3" PostId="15352" RevisionGUID="7169e326-4e1b-4cf8-ae83-6bfe9b4ee9f5" CreationDate="2011-07-29T12:07:30.603" UserId="8894" Text="&lt;actionscript-3&gt;&lt;geometry&gt;&lt;flixel&gt;" />
  <row Id="34797" PostHistoryTypeId="25" PostId="15332" RevisionGUID="e85d6fef-4bb4-4319-957d-9f81ec14fbb4" CreationDate="2011-07-29T12:33:05.013" Comment="http://twitter.com/#!/StackGameDev/status/96921178077282304" />
  <row Id="34798" PostHistoryTypeId="2" PostId="15353" RevisionGUID="4d99f601-192d-493e-a8c4-208f836a1b03" CreationDate="2011-07-29T13:05:44.827" UserId="1584" Text="I'm making a little dungeon crawler in space, and I'd like to hear some advice on how to make the backend of the engine nicer. Basically, currently everything is based on a crapload of managers:&#xD;&#xA;&#xD;&#xA; - BackgroundManager: has `AddBackground(image, parallax)` method for making cool background effects.&#xD;&#xA; - ConfigManager: reads/makes the config file and also holds the data read from that config file.&#xD;&#xA; - DrawManager: has `Draw(sprite)` method to draw stuff to the screen, and things like `SetView(view)`, `GetView()` etc.&#xD;&#xA; - EntityManager: holds all active entities and has methods for adding, removing and finding entities.&#xD;&#xA; - DungeonManager (actually called a GridManager, but this is for simplicity): has methods like `GenerateDungeon()`, `PlaceEnemies()`, `PlaceFinish()` etc.&#xD;&#xA;&#xD;&#xA;Now I'm not even halfway there listing all my managers, so I think this has got to change. My game is also based on Screens, which makes it more annoying because I don't need half of the stuff my managers are managing in, for example, the main menu (I don't need physics/entities/dungeons in my main menu!)&#xD;&#xA;&#xD;&#xA;Now I thought about making the managers not static, and giving my ScreenMainGame an instance of all game-specific managers. But that makes calling/getting anything related to the managers a huge mess... for example, if I wanted to draw my dungeon from any place that's not in `ScreenMainGame.Draw()`, I'd have to do this...&#xD;&#xA;&#xD;&#xA;    ((ScreenMainGame)ScreenManager.CurrentScreen).GridManager.Draw()&#xD;&#xA;That's really ugly.&#xD;&#xA;&#xD;&#xA;So, fellow game developers, does any of you have an idea how to solve this mess? I'd be appreciated!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34799" PostHistoryTypeId="1" PostId="15353" RevisionGUID="4d99f601-192d-493e-a8c4-208f836a1b03" CreationDate="2011-07-29T13:05:44.827" UserId="1584" Text="I want to get rid of my make-everything-static-and-global design pattern, but how?" />
  <row Id="34800" PostHistoryTypeId="3" PostId="15353" RevisionGUID="4d99f601-192d-493e-a8c4-208f836a1b03" CreationDate="2011-07-29T13:05:44.827" UserId="1584" Text="&lt;game-design&gt;&lt;c#&gt;&lt;design-patterns&gt;" />
  <row Id="34801" PostHistoryTypeId="2" PostId="15354" RevisionGUID="f35b1465-7c33-4a8c-a5b4-d0799f2c590e" CreationDate="2011-07-29T13:08:13.937" UserId="1929" Text="I've started down a line of art asset development that will allow me to (hopefully) reuse and improve assets for several games.&#xD;&#xA;&#xD;&#xA;But how do I go about storing and finding them? &#xD;&#xA;&#xD;&#xA;Let's say for example I decide to focus on RPGs for ~2 years. I would create items, monsters, etc. and store them somewhere. How would I categorize them and make them easier to search later on?&#xD;&#xA;&#xD;&#xA;Is the best solution &quot;use directories with broad categories like landscape/items/monsters/etc.?&quot;" />
  <row Id="34802" PostHistoryTypeId="1" PostId="15354" RevisionGUID="f35b1465-7c33-4a8c-a5b4-d0799f2c590e" CreationDate="2011-07-29T13:08:13.937" UserId="1929" Text="Storing and Finding Art Assets" />
  <row Id="34803" PostHistoryTypeId="3" PostId="15354" RevisionGUID="f35b1465-7c33-4a8c-a5b4-d0799f2c590e" CreationDate="2011-07-29T13:08:13.937" UserId="1929" Text="&lt;art&gt;&lt;asset-management&gt;" />
  <row Id="34804" PostHistoryTypeId="6" PostId="15353" RevisionGUID="2acca176-7719-4065-b359-00768bc4a73b" CreationDate="2011-07-29T13:09:49.460" UserId="1156" Comment="edited tags" Text="&lt;c#&gt;&lt;architecture&gt;&lt;design-patterns&gt;" />
  <row Id="34805" PostHistoryTypeId="2" PostId="15355" RevisionGUID="de47ef5e-7cde-428f-8095-01aa6b2172df" CreationDate="2011-07-29T13:25:53.313" UserId="8921" Text="The crash you are getting is probably because you are removing objects from the list while iterating through it. This will modify the `Count` of the list and the iterator will try to access elements that no longer exist.&#xD;&#xA;&#xD;&#xA;The solution is to use a second list to which you add the objects that must be deleted.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; bulletList.Count - 1; i++)&#xD;&#xA;    {&#xD;&#xA;        for(int j = i + 1; j &lt; bulletList.Count; j++)&#xD;&#xA;        {&#xD;&#xA;            if(bulletList[i].CollidesWith(bulletList[j])&#xD;&#xA;            {&#xD;&#xA;                bulletsColliding.Add(bulletList[i]);&#xD;&#xA;                bulletsColliding.Add(bulletList[j]);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; bulletsColliding.Count; i++)&#xD;&#xA;    {&#xD;&#xA;        bulletList.Remove(bulletsColliding[i]);&#xD;&#xA;    }&#xD;&#xA;    bulletsColliding.Clear();&#xD;&#xA;&#xD;&#xA;Unfortunately, the problem with this is that you can get duplicates of bullets in your bullets colliding list if a bullet is colliding with more than one bullet at a time. Using C# lists the `Remove` function will only return false though.&#xD;&#xA;&#xD;&#xA;To check the distance between bullets, you can use trignometry.&#xD;&#xA;In 2D :&#xD;&#xA;&#xD;&#xA;    float Distance(Bullet a, Bullet b)&#xD;&#xA;    {&#xD;&#xA;        float xDistance = b.x - a.x;&#xD;&#xA;        float yDistance = b.y - a.y;&#xD;&#xA;&#xD;&#xA;        float sqDistance = (xDistance * xDistance) + (yDistance * yDistance);&#xD;&#xA;&#xD;&#xA;        return Math.sqrt(sqDistance);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In very time-critical sections, it is common to use squared positions of objects and not perform the square-root operation, as it is quite expensive." />
  <row Id="34806" PostHistoryTypeId="2" PostId="15356" RevisionGUID="f4fa0600-a618-435c-bea4-e174c0e65b01" CreationDate="2011-07-29T13:26:51.940" UserId="6035" Text="Just because they are static or global doesn't mean they have to always be loaded/initialized. Use a Singleton pattern and allow the managers to be freeable and loaded again on demand." />
  <row Id="34807" PostHistoryTypeId="2" PostId="15357" RevisionGUID="2fc5d954-8c58-4e73-9ab1-de162ec12f91" CreationDate="2011-07-29T13:28:00.987" UserId="8930" Text="Doing this with Polygons would be quite simple, so long as you have a nice repeating/tiling pattern, you can easily set your models to duplicate along a curve, nothing complex at all.&#xD;&#xA;&#xD;&#xA;Hope that helps." />
  <row Id="34808" PostHistoryTypeId="2" PostId="15358" RevisionGUID="10bed098-cfd8-49a1-969f-55aa859f48d1" CreationDate="2011-07-29T13:31:24.470" UserId="8155" Text="Go for the easy ones like C# or Java because you need it fast and you don't seem to mind which language to choose.&#xD;&#xA;&#xD;&#xA;I think Java might be a good choice as it can run on all 3 platforms, and there is a good 3D engine [JMonkeyEngine][1]. C# would go with the XNA framework I think, but it's restricted to Windows only and not as high-level as the JMonkeyEngine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://jMonkeyEngine%203.0%20%7C%20Java%20OpenGL%20Game%20Engine%20www.jmonkeyengine.com/" />
  <row Id="34809" PostHistoryTypeId="5" PostId="15355" RevisionGUID="42b16833-8c16-4c23-8a89-40ecc72d3bc4" CreationDate="2011-07-29T13:38:09.810" UserId="8921" Comment="added 468 characters in body" Text="The crash you are getting is probably because you are removing objects from the list while iterating through it. This will modify the `Count` of the list and the iterator will try to access elements that no longer exist.&#xD;&#xA;&#xD;&#xA;The solution is to use a second list to which you add the objects that must be deleted.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; bulletList.Count - 1; i++)&#xD;&#xA;    {&#xD;&#xA;        for(int j = i + 1; j &lt; bulletList.Count; j++)&#xD;&#xA;        {&#xD;&#xA;            if(bulletList[i].CollidesWith(bulletList[j])&#xD;&#xA;            {&#xD;&#xA;                bulletsColliding.Add(bulletList[i]);&#xD;&#xA;                bulletsColliding.Add(bulletList[j]);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; bulletsColliding.Count; i++)&#xD;&#xA;    {&#xD;&#xA;        bulletList.Remove(bulletsColliding[i]);&#xD;&#xA;    }&#xD;&#xA;    bulletsColliding.Clear();&#xD;&#xA;&#xD;&#xA;Unfortunately, the problem with this is that you can get duplicates of bullets in your bullets colliding list if a bullet is colliding with more than one bullet at a time. Using C# lists the `Remove` function will only return false though.&#xD;&#xA;&#xD;&#xA;Using flags to set the bullets to `Alive` or not can be a good idea to stop you from having to instanciate a Bullet if dead ones aleady exist. I would however just 'move' the bullets into a second list which is neither `Draw()`'n nor `Update()`'d, and move them back when you need to create a new bullet, and the list isn't empty.&#xD;&#xA;&#xD;&#xA;You must be very careful though that the Bullet instance is properly reset before you re-insert it into the working list.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;To check the distance between bullets, you can use trignometry.&#xD;&#xA;In 2D :&#xD;&#xA;&#xD;&#xA;    float Distance(Bullet a, Bullet b)&#xD;&#xA;    {&#xD;&#xA;        float xDistance = b.x - a.x;&#xD;&#xA;        float yDistance = b.y - a.y;&#xD;&#xA;&#xD;&#xA;        float sqDistance = (xDistance * xDistance) + (yDistance * yDistance);&#xD;&#xA;&#xD;&#xA;        return Math.sqrt(sqDistance);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In very time-critical sections, it is common to use squared positions of objects and not perform the square-root operation, as it is quite expensive." />
  <row Id="34810" PostHistoryTypeId="5" PostId="15355" RevisionGUID="f2c04c51-0617-4a81-aa7e-dc9744739707" CreationDate="2011-07-29T13:44:16.153" UserId="8921" Comment="added 8 characters in body" Text="The crash you are getting is probably because you are removing objects from the list while iterating through it. This will modify the `Count` of the list and the iterator will try to access elements that no longer exist.&#xD;&#xA;&#xD;&#xA;The solution is to use a second list to which you add the objects that must be deleted.&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; bulletList.Count - 1; i++)&#xD;&#xA;    {&#xD;&#xA;        for(int j = i + 1; j &lt; bulletList.Count; j++)&#xD;&#xA;        {&#xD;&#xA;            if(bulletList[i].CollidesWith(bulletList[j])&#xD;&#xA;            {&#xD;&#xA;                bulletsColliding.Add(bulletList[i]);&#xD;&#xA;                bulletsColliding.Add(bulletList[j]);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for(int i = 0; i &lt; bulletsColliding.Count; i++)&#xD;&#xA;    {&#xD;&#xA;        bulletList.Remove(bulletsColliding[i]);&#xD;&#xA;    }&#xD;&#xA;    bulletsColliding.Clear();&#xD;&#xA;&#xD;&#xA;Unfortunately, the problem with this is that you can get duplicates of bullets in your bullets colliding list if a bullet is colliding with more than one bullet at a time. Using C# lists the `Remove` function will only return false though.&#xD;&#xA;&#xD;&#xA;Using flags to set the bullets to `Alive` or not can be a good idea to stop you from having to instanciate a Bullet if dead ones aleady exist. I would however just 'move' the bullets into a second list which is neither `Draw()`'n nor `Update()`'d, and move them back when you need to create a new bullet, and the list isn't empty.&#xD;&#xA;&#xD;&#xA;You must be very careful though that the Bullet instance is properly reset before you re-insert it into the working list.&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;To check the distance between bullets, you can use Pythagoras' theorem.&#xD;&#xA;In 2D :&#xD;&#xA;&#xD;&#xA;    float Distance(Bullet a, Bullet b)&#xD;&#xA;    {&#xD;&#xA;        float xDistance = b.x - a.x;&#xD;&#xA;        float yDistance = b.y - a.y;&#xD;&#xA;&#xD;&#xA;        float sqDistance = (xDistance * xDistance) + (yDistance * yDistance);&#xD;&#xA;&#xD;&#xA;        return Math.sqrt(sqDistance);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In very time-critical sections, it is common to use squared positions of objects and not perform the square-root operation, as it is quite expensive." />
  <row Id="34811" PostHistoryTypeId="2" PostId="15359" RevisionGUID="24433995-6547-4d2b-8962-962abe9ac62c" CreationDate="2011-07-29T13:49:04.930" UserId="2111" Text="What about a [component-based engine][1]?&#xD;&#xA;&#xD;&#xA;You would have a main class named `Engine`, which would keep a list of `GameScreens`, which would themselves hold a list of `Components`.&#xD;&#xA;&#xD;&#xA;The engine has an `Update` and a `Draw` method and both call the `GameScreen`'s `Update` and `Draw` methods, which themselves go through every component and call `Update` and `Draw`.&#xD;&#xA;&#xD;&#xA;Presented like that, I agree that it sounds like a poor and repetitive design. But believe me, my code became much cleaner by using a component-based approach than it did with all my old *manager* classes. &#xD;&#xA;&#xD;&#xA;It's much simpler to maintain such code too, since you're just going through a big class hierarchy and not having to search through `BackgroundManager` for all the specific different backgrounds. You just have a `ScrollingBackground`, `ParallaxBackground`, `StaticBackground`, etc.&#xD;&#xA;&#xD;&#xA;You'll eventually build up a pretty solid engine that you can reuse over all your projects with a lot of frequently used components and helper methods.&#xD;&#xA;&#xD;&#xA;You would no longer have a `BackgroundManager` class, but a `Background` class which would manage itself instead.&#xD;&#xA;&#xD;&#xA;When your game starts, all you have to do is this basically:&#xD;&#xA;&#xD;&#xA;    // when declaring variables:&#xD;&#xA;    Engine engine;&#xD;&#xA;&#xD;&#xA;    // when initializing:&#xD;&#xA;    engine = new Engine();&#xD;&#xA;    engine.Initialize();&#xD;&#xA;    engine.LoadContent();&#xD;&#xA;    engine.AddGameScreen(new MainMenuScreen());&#xD;&#xA;&#xD;&#xA;    // when updating:&#xD;&#xA;    engine.Update();&#xD;&#xA; &#xD;&#xA;    // when drawing:&#xD;&#xA;    engine.Draw();&#xD;&#xA;&#xD;&#xA;And that's it for your game start code.&#xD;&#xA;&#xD;&#xA;Then, for the main menu screen:&#xD;&#xA;&#xD;&#xA;    class MainMenuScreen : MenuScreen // where MenuScreen derives from the GameScreen class&#xD;&#xA;    {&#xD;&#xA;        const int ENEMY_COUNT = 10;&#xD;&#xA;&#xD;&#xA;        StaticBackground background;&#xD;&#xA;        Player player;&#xD;&#xA;        List&lt;Enemy&gt; enemies;&#xD;&#xA; &#xD;&#xA;        public override void Initialize()&#xD;&#xA;        {&#xD;&#xA;            background = new StaticBackground();&#xD;&#xA;            player = new Player();&#xD;&#xA;            enemies = new List&lt;Enemy&gt;();&#xD;&#xA;             &#xD;&#xA;            base.AddComponent(background); // defined within the GameScreen class&#xD;&#xA;            base.AddComponent(player);&#xD;&#xA;            for (int i = 0; i &lt; ENEMY_COUNT; ++i)&#xD;&#xA;            {&#xD;&#xA;                Enemy newEnemy = new Enemy();&#xD;&#xA;                enemies.Add(newEnemy);&#xD;&#xA;                base.AddComponent(newEnemy);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You get the general idea.&#xD;&#xA;&#xD;&#xA;You would also keep the reference of the `Engine` within all your `GameScreen` classes, to be able to add new screens even within a `GameScreen` class (e.g. when the user clicks on the *StartGame* button while within your `MainMenuScreen`, you can transition to the `GameplayScreen`.&#xD;&#xA;&#xD;&#xA;The same goes for the `Component` class: it should hold the reference of its parent `GameScreen`, to have both access to the `Engine` class and its parent `GameScreen` to add new components (e.g. you can make a HUD class called `DrawableButton` which holds a &#xD;&#xA;`DrawableText` component and a `StaticBackground` component).&#xD;&#xA;&#xD;&#xA;You can even apply other design patterns after that, like the &quot;service design pattern&quot;(not sure about the exact name) where you can keep different useful services within your `Engine` class(you simply keep a list of `IService`s and let other classes add services themselves). e.g. I would keep a `Camera2D` component over all my project as a service to apply its transformation when drawing other components. This avoids having to pass it as a parameter everywhere.&#xD;&#xA;&#xD;&#xA;In conclusion, there certainly may be other better designs for an engine, but I found the engine proposed by [this link][2] very elegant, extremely easily maintainable and reusable. I would personally recommend at least trying it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://roecode.wordpress.com/xna-gameengine-development-series/&#xD;&#xA;  [2]: http://www.innovativegames.net/blog/blog/2009/10/18/innovation-engine-roadmap-2009-2010/" />
  <row Id="34812" PostHistoryTypeId="5" PostId="15359" RevisionGUID="921d7f66-ec9a-49d9-b9b3-a4381ed518f3" CreationDate="2011-07-29T13:55:18.890" UserId="2111" Comment="added 220 characters in body" Text="What about a [component-based engine][1]?&#xD;&#xA;&#xD;&#xA;You would have a main class named `Engine`, which would keep a list of `GameScreens`, which would themselves hold a list of `Components`.&#xD;&#xA;&#xD;&#xA;The engine has an `Update` and a `Draw` method and both call the `GameScreen`'s `Update` and `Draw` methods, which themselves go through every component and call `Update` and `Draw`.&#xD;&#xA;&#xD;&#xA;Presented like that, I agree that it sounds like a poor and repetitive design. But believe me, my code became much cleaner by using a component-based approach than it did with all my old *manager* classes. &#xD;&#xA;&#xD;&#xA;It's much simpler to maintain such code too, since you're just going through a big class hierarchy and not having to search through `BackgroundManager` for all the specific different backgrounds. You just have a `ScrollingBackground`, `ParallaxBackground`, `StaticBackground`, etc. which all derive from a `Background` class.&#xD;&#xA;&#xD;&#xA;You'll eventually build up a pretty solid engine that you can reuse over all your projects with a lot of frequently used components and helper methods (e.g. a `FrameRateDisplayer` as a debugging utility, a `Sprite` class as a basic sprite with a texture and extension methods for vectors and random number generation).&#xD;&#xA;&#xD;&#xA;You would no longer have a `BackgroundManager` class, but a `Background` class which would manage itself instead.&#xD;&#xA;&#xD;&#xA;When your game starts, all you have to do is this basically:&#xD;&#xA;&#xD;&#xA;    // when declaring variables:&#xD;&#xA;    Engine engine;&#xD;&#xA;&#xD;&#xA;    // when initializing:&#xD;&#xA;    engine = new Engine();&#xD;&#xA;    engine.Initialize();&#xD;&#xA;    engine.LoadContent();&#xD;&#xA;    engine.AddGameScreen(new MainMenuScreen());&#xD;&#xA;&#xD;&#xA;    // when updating:&#xD;&#xA;    engine.Update();&#xD;&#xA; &#xD;&#xA;    // when drawing:&#xD;&#xA;    engine.Draw();&#xD;&#xA;&#xD;&#xA;And that's it for your game start code.&#xD;&#xA;&#xD;&#xA;Then, for the main menu screen:&#xD;&#xA;&#xD;&#xA;    class MainMenuScreen : MenuScreen // where MenuScreen derives from the GameScreen class&#xD;&#xA;    {&#xD;&#xA;        const int ENEMY_COUNT = 10;&#xD;&#xA;&#xD;&#xA;        StaticBackground background;&#xD;&#xA;        Player player;&#xD;&#xA;        List&lt;Enemy&gt; enemies;&#xD;&#xA; &#xD;&#xA;        public override void Initialize()&#xD;&#xA;        {&#xD;&#xA;            background = new StaticBackground();&#xD;&#xA;            player = new Player();&#xD;&#xA;            enemies = new List&lt;Enemy&gt;();&#xD;&#xA;             &#xD;&#xA;            base.AddComponent(background); // defined within the GameScreen class&#xD;&#xA;            base.AddComponent(player);&#xD;&#xA;            for (int i = 0; i &lt; ENEMY_COUNT; ++i)&#xD;&#xA;            {&#xD;&#xA;                Enemy newEnemy = new Enemy();&#xD;&#xA;                enemies.Add(newEnemy);&#xD;&#xA;                base.AddComponent(newEnemy);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You get the general idea.&#xD;&#xA;&#xD;&#xA;You would also keep the reference of the `Engine` within all your `GameScreen` classes, to be able to add new screens even within a `GameScreen` class (e.g. when the user clicks on the *StartGame* button while within your `MainMenuScreen`, you can transition to the `GameplayScreen`).&#xD;&#xA;&#xD;&#xA;The same goes for the `Component` class: it should hold the reference of its parent `GameScreen`, to have both access to the `Engine` class and its parent `GameScreen` to add new components (e.g. you can make a HUD-related class called `DrawableButton` which holds a &#xD;&#xA;`DrawableText` component and a `StaticBackground` component).&#xD;&#xA;&#xD;&#xA;You can even apply other design patterns after that, like the &quot;service design pattern&quot;(not sure about the exact name) where you can keep different useful services within your `Engine` class(you simply keep a list of `IService`s and let other classes add services themselves). e.g. I would keep a `Camera2D` component over all my project as a service to apply its transformation when drawing other components. This avoids having to pass it as a parameter everywhere.&#xD;&#xA;&#xD;&#xA;In conclusion, there certainly may be other better designs for an engine, but I found the engine proposed by [this link][2] very elegant, extremely easily maintainable and reusable. I would personally recommend at least trying it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://roecode.wordpress.com/xna-gameengine-development-series/&#xD;&#xA;  [2]: http://www.innovativegames.net/blog/blog/2009/10/18/innovation-engine-roadmap-2009-2010/" />
  <row Id="34813" PostHistoryTypeId="2" PostId="15360" RevisionGUID="0eb55c1d-cc3d-4b76-8f4d-d680ea4c3718" CreationDate="2011-07-29T14:04:49.637" UserId="2111" Text="What's wrong with using directories with broad categories? &#xD;&#xA;&#xD;&#xA;You can just put more specific categories if you find that you really have too many assets within a directory. &#xD;&#xA;&#xD;&#xA;You could just organize it this way:&#xD;&#xA;&#xD;&#xA;`ArtAssets`&#xD;&#xA;&#xD;&#xA;which contains:&#xD;&#xA;&#xD;&#xA;`Landscape` -&gt; (only if you have a lot of landscapes) `Forest`, `City`, `Sky`, etc.&#xD;&#xA;&#xD;&#xA;`Items` -&gt; `Weapons`, `Armors`, `Potions`, `Miscellaneous`, etc.&#xD;&#xA;&#xD;&#xA;`Characters` -&gt; `Enemies`, `Players`, `NPCs`, etc.&#xD;&#xA;&#xD;&#xA;I'd say start out with very broad categories and if you find yourself having to search a lot through a category to find an asset, get more specific categories." />
  <row Id="34814" PostHistoryTypeId="5" PostId="15350" RevisionGUID="da6c8aee-c123-4eb5-bcf1-efb87400d4df" CreationDate="2011-07-29T14:51:52.327" UserId="8121" Comment="added 133 characters in body" Text="PHP is a general-purpose scripting language that is especially suited for Web development. It is also good language for browser games" />
  <row Id="34815" PostHistoryTypeId="24" PostId="15350" RevisionGUID="da6c8aee-c123-4eb5-bcf1-efb87400d4df" CreationDate="2011-07-29T14:51:52.327" Comment="Proposed by 8121 approved by 1430 edit id of 585" />
  <row Id="34816" PostHistoryTypeId="2" PostId="15361" RevisionGUID="48d056db-3c40-4968-b255-3671bcb40117" CreationDate="2011-07-29T14:53:06.817" UserId="7237" Text="This is a really cool demo of a Canvas Doom Engine made back in 2006:&#xD;&#xA;&#xD;&#xA;http://canvex.lazyilluminati.com/84/play.xhtml&#xD;&#xA;&#xD;&#xA;Here is the e1m1 map in JSON format:&#xD;&#xA;&#xD;&#xA;http://canvex.lazyilluminati.com/84/map1.js&#xD;&#xA;&#xD;&#xA;Does anyone know of the tool used to convert Doom maps into JSON? I can't imagine this was done by hand :)" />
  <row Id="34817" PostHistoryTypeId="1" PostId="15361" RevisionGUID="48d056db-3c40-4968-b255-3671bcb40117" CreationDate="2011-07-29T14:53:06.817" UserId="7237" Text="Converting Doom maps to JSON" />
  <row Id="34818" PostHistoryTypeId="3" PostId="15361" RevisionGUID="48d056db-3c40-4968-b255-3671bcb40117" CreationDate="2011-07-29T14:53:06.817" UserId="7237" Text="&lt;javascript&gt;&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="34819" PostHistoryTypeId="2" PostId="15362" RevisionGUID="b27aff38-5372-4414-9528-ffa51fba71c3" CreationDate="2011-07-29T15:01:16.440" UserId="2061" Text="What you want to do is separate your code into components and services.&#xD;&#xA;&#xD;&#xA;See [this answer][1] on doing this in XNA, and [this more general answer][2] on services.&#xD;&#xA;&#xD;&#xA;[1]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/14217/several-classes-need-to-access-the-same-data-where-should-the-data-be-declared/14232#14232" />
  <row Id="34820" PostHistoryTypeId="5" PostId="15362" RevisionGUID="c1ea5284-8535-4891-813d-444c80d20a4c" CreationDate="2011-07-29T15:07:10.900" UserId="2061" Comment="added 215 characters in body" Text="What you want to do is separate your code into components and services.  XNA has built-in support for these already.&#xD;&#xA;&#xD;&#xA;See [this article][3] on `GameComponents` and services.  Then see [this answer][1] on using services in XNA, and [this more general answer][2] on services in any language.&#xD;&#xA;&#xD;&#xA;[1]: http://gamedev.stackexchange.com/questions/13723/xna-static-classes-from-game-libraries-executing-after-content-pipeline-extensi/13763#13763&#xD;&#xA;[2]: http://gamedev.stackexchange.com/questions/14217/several-classes-need-to-access-the-same-data-where-should-the-data-be-declared/14232#14232&#xD;&#xA;[3]: http://www.nuclex.org/articles/4-architecture/6-game-components-and-game-services" />
  <row Id="34821" PostHistoryTypeId="2" PostId="15363" RevisionGUID="b46c6743-8f3a-4cc1-afea-d79f498e23da" CreationDate="2011-07-29T15:09:24.703" UserId="1430" Text="It probably was not done by hand, but as the [WAD file format][1] is pretty well documented it was probably relatively easy to write a one-off tool to perform the conversion. It's possible one of the [WAD editors][2] floating around have the functionality buried away, but I suspect that the author used a tool he wrote himself (and has not released) in this case.&#xD;&#xA;&#xD;&#xA;The JSON structures and arrays used in the linked JSON file don't seem to correspond directly to the lump types in the WAD file, which suggests a custom tool to me. It looks like some of his maps aren't direct ports of DOOM maps either (at least none I recognize) so it's possible he's using an internal map building tool instead of just an internal JSON conversion tool.&#xD;&#xA;&#xD;&#xA;The author's email is at the bottom of his [homepage][3]. You'd probably get a better response if you ask him directly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://doom.wikia.com/wiki/WAD&#xD;&#xA;  [2]: http://doom.wikia.com/wiki/Choosing_a_WAD_editor&#xD;&#xA;  [3]: http://canvex.lazyilluminati.com/" />
  <row Id="34822" PostHistoryTypeId="2" PostId="15364" RevisionGUID="bc2a198a-9475-4300-a4df-440dcb6d1d50" CreationDate="2011-07-29T15:20:43.807" UserId="953" Text="You can access the underlying BitmapData of a FlxSprite by using sprite.pixels or sprite.framePixels. You can then use BitmapData's drawing methods for simple things. If you need to draw a circle, you'll probably want to make a DisplayObject like a proper Sprite, draw on it using Graphics, and then use the BitmapData's draw() function to draw it onto the FlxSprite.&#xD;&#xA;&#xD;&#xA;Note that this goes against Flixel's intended paradigm. If you're doing this once at the start of the game, or very rarely, it will work just fine to generate sprites procedurally. However, doing this every frame (e.g. in the render() code) will make probably make Flixel much slower. If you know ahead of time what sort of circle you need, you might want to just load the circle as a sprite from a file." />
  <row Id="34823" PostHistoryTypeId="5" PostId="15350" RevisionGUID="19e2e9e5-7b67-4663-8e6f-da634310fa96" CreationDate="2011-07-29T15:23:21.747" UserId="1430" Comment="deleted 41 characters in body" Text="PHP is a general-purpose programming language that is especially suited for web development." />
  <row Id="34824" PostHistoryTypeId="24" PostId="15350" RevisionGUID="19e2e9e5-7b67-4663-8e6f-da634310fa96" CreationDate="2011-07-29T15:23:21.747" Comment="Proposed by 1430 approved by 14 edit id of 587" />
  <row Id="34825" PostHistoryTypeId="5" PostId="15349" RevisionGUID="5bbdf04f-55b6-485d-a06a-de7af2ceae46" CreationDate="2011-07-29T15:23:25.367" UserId="1430" Comment="added 161 characters in body" Text="**Resources**&#xD;&#xA;&#xD;&#xA;* [The PHP Homepage][1]&#xD;&#xA;* Wikibooks: [PHP Programming][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.php.net/&#xD;&#xA;  [2]: http://en.wikibooks.org/wiki/PHP_Programming" />
  <row Id="34826" PostHistoryTypeId="24" PostId="15349" RevisionGUID="5bbdf04f-55b6-485d-a06a-de7af2ceae46" CreationDate="2011-07-29T15:23:25.367" Comment="Proposed by 1430 approved by 14 edit id of 586" />
  <row Id="34827" PostHistoryTypeId="25" PostId="15353" RevisionGUID="34b651de-00f9-4ad8-9742-2fbbd0d85083" CreationDate="2011-07-29T15:33:05.583" Comment="http://twitter.com/#!/StackGameDev/status/96966479035121664" />
  <row Id="34828" PostHistoryTypeId="2" PostId="15365" RevisionGUID="f521788d-9e6c-4e46-bc36-85816a395950" CreationDate="2011-07-29T15:34:21.493" UserId="2061" Text="SC2 maps do not have the ability to connect to databases or web services - this could easily be abused.  SoTiS can do it using a [separate application][3], but most maps do not use this.&#xD;&#xA;&#xD;&#xA;The only persistent storage SC2 maps are [the bank files][1], XML files saved with the extension `.SC2Bank` in your SC2 data folder.  *All* player stats, settings, etc. from that map are stored in that map's bank file.&#xD;&#xA;&#xD;&#xA;The maps usually do not actually keep track of global records - rather, they keep track locally of the best records seen so far.  Every time a game is started, everyone's individual leadboards are combined and overwritten with the combined leaderboard.  This causes the leaderboard records to spread very quickly, much like a computer virus.&#xD;&#xA;&#xD;&#xA;For example, if my top-3-players list consists of having seen player A with score 300, player B with 200, and C with 100; and you've seen player D with 400, A with 350 (he improved his score!) and E with 50; then when we play with each other, both of our high-score lists will be overwritten with player D with 400, A with 350, and B with 200.  There are a few more kinks to work through (ex. usernames are not unique, so you also need to propagate some sort of unique ID), but otherwise this solution works well.&#xD;&#xA;&#xD;&#xA;Of course, since the high-scores are stored locally, it will always be possible for someone to hack the scores.  The only reason stats-hacking is not more widespread than it currently is is that the [bank signature][2] algorithm has not been reverse-engineered and publically released by anyone yet.&#xD;&#xA;&#xD;&#xA;[1]: http://www.hiveworkshop.com/forums/starcraft-ii-editor-help-zone-647/sc2-bank-files-critics-167005/&#xD;&#xA;[2]: http://www.sc2mapster.com/wiki/galaxy/triggers/verify-bank/r3/&#xD;&#xA;[3]: http://www.playsotis.com/index.php?option=com_kunena&amp;func=view&amp;catid=7&amp;id=16342&amp;Itemid=210" />
  <row Id="34829" PostHistoryTypeId="10" PostId="15344" RevisionGUID="37ba83b4-c265-43ec-b481-cf15cc3ea5eb" CreationDate="2011-07-29T15:44:31.613" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:3794,&quot;DisplayName&quot;:&quot;Notabene&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="34830" PostHistoryTypeId="2" PostId="15366" RevisionGUID="699c7116-6e8d-40f6-b745-f9bba7b55258" CreationDate="2011-07-29T16:14:30.033" UserId="8830" Text="I am systems Administrator and during many years I worked with servers *nix servers and the systems around, my main experience programming is with Perl and Shell Scripting,but suddenly in my new job I've been told to learn Java and well... I'm not even interested in Java but what I'm interested in is in the games development, I was thinking about... ok! I  don't have interest in Java, but... what if I can't use it to develop (after learning enough off course) games?&#xD;&#xA;&#xD;&#xA;I was wondering about if is viable and which path should I follow been focused with Java, any advice?&#xD;&#xA;&#xD;&#xA;Thank you!" />
  <row Id="34831" PostHistoryTypeId="1" PostId="15366" RevisionGUID="699c7116-6e8d-40f6-b745-f9bba7b55258" CreationDate="2011-07-29T16:14:30.033" UserId="8830" Text="Java for games, any path as advise?" />
  <row Id="34832" PostHistoryTypeId="3" PostId="15366" RevisionGUID="699c7116-6e8d-40f6-b745-f9bba7b55258" CreationDate="2011-07-29T16:14:30.033" UserId="8830" Text="&lt;java&gt;" />
  <row Id="34834" PostHistoryTypeId="5" PostId="15366" RevisionGUID="56819d61-55d2-4fda-9f63-1542e772746e" CreationDate="2011-07-29T16:28:28.287" UserId="1430" Comment="cleaned up grammar, removed thanks" Text="I am a systems administrator and for many years I worked with *nix servers. My main experience programming is with Perl and shell scripting, but in my new job I've been told to learn Java and well... I'm not even interested in it. But what I am interested in is in game development, so while I don't have any interest in Java, I was wondering if I could use it to develop games?&#xD;&#xA;&#xD;&#xA;I was wondering whether this is viable and if so, what approach should I take?" />
  <row Id="34835" PostHistoryTypeId="4" PostId="15366" RevisionGUID="56819d61-55d2-4fda-9f63-1542e772746e" CreationDate="2011-07-29T16:28:28.287" UserId="1430" Comment="cleaned up grammar, removed thanks" Text="Learning Java for game development" />
  <row Id="34836" PostHistoryTypeId="2" PostId="15368" RevisionGUID="1a146001-b114-4a1d-a793-00426e3b8036" CreationDate="2011-07-29T16:34:43.230" UserId="2111" Text="I think java proved itself as quite a viable programming language for programming games the same way that C# did with libraries such as *XNA*. It may not be as efficient as a low-level language like C++ in some situations because it is managed but it doesn't change the fact that it is usually faster/easier to develop with it.&#xD;&#xA;&#xD;&#xA;Some successful java games: [Minecraft][1], [Runescape][2], [other java games][3]&#xD;&#xA;&#xD;&#xA;[Things java might be missing for game development.][4]&#xD;&#xA;&#xD;&#xA;I guess you could start out learning with [this link][5] and move on with other online tutorials after that.&#xD;&#xA;&#xD;&#xA;Even though java can do the job, I'd still recommend trying out C# with XNA. C#'s syntax is, in a way, similar to java and won't take too much time to learn (if you know java).&#xD;&#xA;&#xD;&#xA;[Here are some resources for learning XNA][6] and let me add [this link][7] that I recently discovered that is simply fantastic too.&#xD;&#xA;&#xD;&#xA;But, hey, if you like java, program in java! Just program games in the language you prefer. Don't worry too much about how &quot;efficient&quot; or &quot;viable&quot; a language is until you feel like you master the game development's concepts enough to chose a language to use it at its full potential.&#xD;&#xA;&#xD;&#xA;Just my little 2 cents on the subject.&#xD;&#xA;&#xD;&#xA;Happy coding!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.minecraft.net/&#xD;&#xA;  [2]: http://www.runescape.com/&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/10974/what-is-java-missing-that-might-make-it-difficult-to-develop-fully-featured-2d-ga&#xD;&#xA;  [5]: http://www.gamedev.net/page/resources/_/reference/programming/languages/java/java-game-programming-part-i-the-basics-r1262&#xD;&#xA;  [6]: http://gamedev.stackexchange.com/questions/13043/get-started-games-development-with-c/13050#13050&#xD;&#xA;  [7]: http://www.sgtconker.com/2010/01/article-i-can-has-platformer-part-1/" />
  <row Id="34837" PostHistoryTypeId="2" PostId="15369" RevisionGUID="f3bba86e-e66e-4dfd-9281-f7d7da733f44" CreationDate="2011-07-29T16:42:24.977" UserId="5311" Text="Java can definitely be used to develop games, and there have been some very successful games developed in Java.  I think Jesse has already done a good job of giving some examples of desktop game development in Java, but I wanted to point out that you can also write mobile games for Android in Java.  Don't expect to make much money on it, but the mobile space is very hot right now, and it's a great place to get some exposure for your work.&#xD;&#xA;&#xD;&#xA;Additionally, check out the [Java4K][1] site for some other small projects written in Java.  All of the games on the site use 4,096 bytes of memory or less in their compiled and packaged forms, including all art assets.&#xD;&#xA;&#xD;&#xA;The one concern I'd have about writing a game in Java is that it won't be as portable as if you'd written it in C++.  But for a starting game developer, that's a minor concern.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.java4k.com/index.php?action=home" />
  <row Id="34838" PostHistoryTypeId="2" PostId="15370" RevisionGUID="ce70d91d-6789-479e-9f44-5723ee668723" CreationDate="2011-07-29T16:53:04.710" UserId="8935" Text="I am try create Isometric in HTML5 Canvas, but don't know how to convert HTML5 Canvas Screen coordinates to Isometric coordinates.&#xD;&#xA;My code now is:&#xD;&#xA;&lt;pre&gt;&#xD;&#xA;&#xD;&#xA;    var mouseX = 0;&#xD;&#xA;    var mouseY = 0;&#xD;&#xA;    function mouseCheck(event) {&#xD;&#xA;        mouseX = event.pageX;&#xD;&#xA;        mouseY = event.pageY;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;And I get Canvas coordinates. But how to convert this coordinates to Isometric coordinates? If I am something like use 16x16 tiles.&#xD;&#xA;&#xD;&#xA;Thanks for everyone reply for this question and sorry for my English language." />
  <row Id="34839" PostHistoryTypeId="1" PostId="15370" RevisionGUID="ce70d91d-6789-479e-9f44-5723ee668723" CreationDate="2011-07-29T16:53:04.710" UserId="8935" Text="HTML5 Canvas ScreenToIso" />
  <row Id="34840" PostHistoryTypeId="3" PostId="15370" RevisionGUID="ce70d91d-6789-479e-9f44-5723ee668723" CreationDate="2011-07-29T16:53:04.710" UserId="8935" Text="&lt;javascript&gt;&lt;html5&gt;&lt;coordinates&gt;&lt;isometric&gt;&lt;canvas&gt;" />
  <row Id="34844" PostHistoryTypeId="5" PostId="15370" RevisionGUID="1af4c116-0ae9-467f-8241-cbd9c1ccad2b" CreationDate="2011-07-29T17:06:28.257" UserId="1430" Comment="deleted 88 characters in body; edited title" Text="I am trying to create an isometric game using HTML5 canvas, but don't know how to convert HTML5 canvas screen coordinates to isometric coordinates.&#xD;&#xA;My code now is:&#xD;&#xA;&#xD;&#xA;    var mouseX = 0;&#xD;&#xA;    var mouseY = 0;&#xD;&#xA;    function mouseCheck(event) {&#xD;&#xA;        mouseX = event.pageX;&#xD;&#xA;        mouseY = event.pageY;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;which gives me canvas coordinates. But how do I convert these coordinates to isometric coordinates? I am using 16x16 tiles." />
  <row Id="34845" PostHistoryTypeId="4" PostId="15370" RevisionGUID="1af4c116-0ae9-467f-8241-cbd9c1ccad2b" CreationDate="2011-07-29T17:06:28.257" UserId="1430" Comment="deleted 88 characters in body; edited title" Text="HTML5 canvas screen to isometric coordinate conversion" />
  <row Id="34846" PostHistoryTypeId="5" PostId="15368" RevisionGUID="18f1b31f-9440-4a85-a1f4-ff9b840e3882" CreationDate="2011-07-29T17:14:21.027" UserId="2111" Comment="added 2 characters in body" Text="I think java proved itself as quite a viable programming language for programming games the same way that C# did with libraries such as *XNA*. It may not be as efficient as a low-level language like C++ in some situations because it is managed but it doesn't change the fact that it removes the need to manage memory by yourself (but then you have to deal with the garbage collector though).&#xD;&#xA;&#xD;&#xA;Some successful java games: [Minecraft][1], [Runescape][2], [other java games][3]&#xD;&#xA;&#xD;&#xA;[Things java might be missing for game development.][4]&#xD;&#xA;&#xD;&#xA;I guess you could start out learning with [this link][5] and move on with other online tutorials after that.&#xD;&#xA;&#xD;&#xA;Even though java can do the job, I'd still recommend trying out C# with XNA. C#'s syntax is, in a way, similar to java and won't take too much time to learn (if you know java).&#xD;&#xA;&#xD;&#xA;[Here are some resources for learning XNA][6] and let me add [this link][7] that I recently discovered that is simply fantastic too.&#xD;&#xA;&#xD;&#xA;But, hey, if you like java, program in java! Just program games in the language you prefer. Don't worry too much about how &quot;efficient&quot; or &quot;viable&quot; a language is until you feel like you master the game development's concepts enough to chose a language to use it at its full potential.&#xD;&#xA;&#xD;&#xA;Just my little 2 cents on the subject.&#xD;&#xA;&#xD;&#xA;Happy coding!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.minecraft.net/&#xD;&#xA;  [2]: http://www.runescape.com/&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;  [4]: http://gamedev.stackexchange.com/questions/10974/what-is-java-missing-that-might-make-it-difficult-to-develop-fully-featured-2d-ga&#xD;&#xA;  [5]: http://www.gamedev.net/page/resources/_/reference/programming/languages/java/java-game-programming-part-i-the-basics-r1262&#xD;&#xA;  [6]: http://gamedev.stackexchange.com/questions/13043/get-started-games-development-with-c/13050#13050&#xD;&#xA;  [7]: http://www.sgtconker.com/2010/01/article-i-can-has-platformer-part-1/" />
  <row Id="34847" PostHistoryTypeId="2" PostId="15372" RevisionGUID="f235d10e-6044-470e-8ea6-436f8ee69fce" CreationDate="2011-07-29T17:26:43.357" UserId="8938" Text="You could always try and find an up and coming sound designer whose work seems up to the quality bar your game has.   You could get your sounds for cheaper and give the sound designer some portfolio stuffers!" />
  <row Id="34848" PostHistoryTypeId="2" PostId="15373" RevisionGUID="6669b9f6-509b-49c9-b317-b05807d671bb" CreationDate="2011-07-29T17:35:02.110" UserId="5125" Text="And of course you can always go with the old 32 bits BMP which is really easy to load (especially if the size is a power of 2 (actually, a multiple of 8 bytes IIRC)).&#xD;&#xA;&#xD;&#xA;Otherwise it seems weird that you want only one format, jpg is really cool for nice real-world hi res textures (jpeg does marvels with diskspace and (down)load-times), png for transparency and the occasionnal 32bits BMP for controle-textures (easy to create from a script or a 'quick and dirty' tool)." />
  <row Id="34852" PostHistoryTypeId="25" PostId="15361" RevisionGUID="4c52e3f1-e88a-4e3a-8692-8f1b55828f05" CreationDate="2011-07-29T18:33:04.690" Comment="http://twitter.com/#!/StackGameDev/status/97011777304408064" />
  <row Id="34853" PostHistoryTypeId="2" PostId="15375" RevisionGUID="d783ce0a-c8cf-41d7-a8c5-6adde99c240d" CreationDate="2011-07-29T18:58:45.147" UserId="721" Text="Image texture format is a performance choice too. I recommend you to use compressed textures too. On mobile platforms, it can improve greatly performance (40% or more). In our games, we have assets (textures) in many formats:&#xD;&#xA;&#xD;&#xA; - DDS format for DXTC textures (Desktop platforms: OS X, Linux, Windows)&#xD;&#xA; - PKM format for ETC1 texture (Mobile platforms)&#xD;&#xA; - PVR format for PVRT format (Mobile platforms)&#xD;&#xA; - PNG format for raw texture (we use a MIT licensed loader) &#xD;&#xA;&#xD;&#xA;ETC1 textures have no alpha channel so we use a special shader with two textures (rgb texture and alpha texture). Compressed format are very easy to load (100 or 200 loc).&#xD;&#xA;&#xD;&#xA;On desktop, DXTC is present on many cards. So, you shoud use it.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="34854" PostHistoryTypeId="5" PostId="15375" RevisionGUID="c94f0c35-b239-4944-afac-f203308f1e69" CreationDate="2011-07-29T19:10:46.903" UserId="721" Comment="added 180 characters in body" Text="Image texture format is a performance choice too. I recommend you to use compressed textures too. On mobile platforms, it can improve greatly performance (40% or more). In our games, we have assets (textures) in many formats:&#xD;&#xA;&#xD;&#xA; - DDS format for DXTC textures (Desktop platforms: OS X, Linux, Windows)&#xD;&#xA; - PKM format for ETC1 texture (Mobile platforms)&#xD;&#xA; - PVR format for PVRT format (Mobile platforms)&#xD;&#xA; - PNG format for raw texture (we use a MIT licensed loader) &#xD;&#xA;&#xD;&#xA;ETC1 textures have no alpha channel so we use a special shader with two textures (rgb texture and alpha texture). Compressed format are very easy to load (100 or 200 loc).&#xD;&#xA;&#xD;&#xA;On desktop, DXTC is present on many cards. So, you shoud use it.&#xD;&#xA;&#xD;&#xA;**Compressed Textures**&#xD;&#xA;&#xD;&#xA;*Pro*&#xD;&#xA;&#xD;&#xA; - Texture fillrate improved&#xD;&#xA; - Texture loading (4x or more)&#xD;&#xA; - Easy to load&#xD;&#xA;&#xD;&#xA;*Con*&#xD;&#xA;&#xD;&#xA; - Not supported on all platforms&#xD;&#xA; - artefacts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " />
  <row Id="34855" PostHistoryTypeId="2" PostId="15376" RevisionGUID="8ca02dd6-060f-4264-8f78-ec37151cdb28" CreationDate="2011-07-29T19:36:24.290" UserId="8941" Text="I've tried everything I can think of, but I cannot get a constant buffer to update a variable in my shader in DirectX 11. I followed the examples on msdn. I read and re-read the articles on constant buffers. I even followed the nearly identical thread on this site. But for some reason I simply cannot get this to work. Can someone point me in the right direction?&#xD;&#xA;&#xD;&#xA;Here's the relevant code:&#xD;&#xA;&#xD;&#xA;    //my data variable to keep everything together&#xD;&#xA;    struct VS_CONSTANT_BUFFER&#xD;&#xA;    {&#xD;&#xA;    	D3DXMATRIX mWorldViewProj;                              &#xD;&#xA;    	D3DXVECTOR4 vSomeVectorThatMayBeNeededByASpecificShader;&#xD;&#xA;    	float fSomeFloatThatMayBeNeededByASpecificShader;&#xD;&#xA;    	float fTime;                                            &#xD;&#xA;    	float fSomeFloatThatMayBeNeededByASpecificShader2;&#xD;&#xA;    	float fSomeFloatThatMayBeNeededByASpecificShader3;&#xD;&#xA;    };&#xD;&#xA;        //I initialize my data variable&#xD;&#xA;    	D3DXMATRIX identity;&#xD;&#xA;	D3DXMatrixIdentity( &amp;identity );&#xD;&#xA;	m_ConstantBufferContents.mWorldViewProj = identity;&#xD;&#xA;	m_ConstantBufferContents.vSomeVectorThatMayBeNeededByASpecificShader = D3DXVECTOR4(1,2,3,4);&#xD;&#xA;	m_ConstantBufferContents.fSomeFloatThatMayBeNeededByASpecificShader = 3.0f;&#xD;&#xA;	m_ConstantBufferContents.fTime = 1.0f;&#xD;&#xA;	m_ConstantBufferContents.fSomeFloatThatMayBeNeededByASpecificShader2 = 2.0f;&#xD;&#xA;	m_ConstantBufferContents.fSomeFloatThatMayBeNeededByASpecificShader3 = 4.0f;&#xD;&#xA;&#xD;&#xA;	// Fill in a buffer description.&#xD;&#xA;	D3D11_BUFFER_DESC cbDesc;&#xD;&#xA;	cbDesc.ByteWidth = sizeof( VS_CONSTANT_BUFFER );&#xD;&#xA;	cbDesc.Usage = D3D11_USAGE_DYNAMIC;&#xD;&#xA;	cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;&#xD;&#xA;	cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;	cbDesc.MiscFlags = 0;&#xD;&#xA;	cbDesc.StructureByteStride = 0;&#xD;&#xA;&#xD;&#xA;	// Fill in the subresource data.&#xD;&#xA;	D3D11_SUBRESOURCE_DATA InitData;&#xD;&#xA;	InitData.pSysMem = &amp;m_ConstantBufferContents;&#xD;&#xA;	InitData.SysMemPitch = 0;&#xD;&#xA;	InitData.SysMemSlicePitch = 0;&#xD;&#xA;&#xD;&#xA;	// Create the buffer.&#xD;&#xA;	HRESULT hr = pDevice-&gt;CreateBuffer( &amp;cbDesc, &amp;InitData, &amp;m_ConstantBuffer );&#xD;&#xA;&#xD;&#xA;        //from my update function, I update the contents of my buffer like so&#xD;&#xA;&#xD;&#xA;	m_ConstantBufferContents.mWorldViewProj = view;&#xD;&#xA;	// Set the buffer.&#xD;&#xA;	pDeviceContext-&gt;UpdateSubresource( m_ConstantBuffer, 0, 0, &amp;m_ConstantBufferContents, 0, 0 );&#xD;&#xA;	pDeviceContext-&gt;VSSetConstantBuffers( 0, 1, &amp;m_ConstantBuffer );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        //And this is how I attempt to use it in my shader&#xD;&#xA;        //--------------------------------------------------------------------------------------&#xD;&#xA;        // Constant Buffers&#xD;&#xA;        //--------------------------------------------------------------------------------------&#xD;&#xA;        cbuffer cbPerObject : register( b0 )&#xD;&#xA;        {&#xD;&#xA;           matrix  g_mWorldViewProjection  : packoffset( c0 );&#xD;&#xA;           matrix  g_mWorld                : packoffset( c4 );&#xD;&#xA;           float4  g_MaterialAmbientColor  : packoffset( c8 );&#xD;&#xA;           float4  g_MaterialDiffuseColor  : packoffset( c9 );&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm sure it's something simple and stupid that I've overlooked, but I cannot seem to find the problem myself. Any ideas?&#xD;&#xA;&#xD;&#xA; - Goishin&#xD;&#xA;" />
  <row Id="34856" PostHistoryTypeId="1" PostId="15376" RevisionGUID="8ca02dd6-060f-4264-8f78-ec37151cdb28" CreationDate="2011-07-29T19:36:24.290" UserId="8941" Text="I cannot update a shader constant via a constant buffer in DirectX 11" />
  <row Id="34857" PostHistoryTypeId="3" PostId="15376" RevisionGUID="8ca02dd6-060f-4264-8f78-ec37151cdb28" CreationDate="2011-07-29T19:36:24.290" UserId="8941" Text="&lt;shaders&gt;&lt;directx11&gt;" />
  <row Id="34859" PostHistoryTypeId="2" PostId="15377" RevisionGUID="ce46d5d7-3127-43d7-9a53-f148939cc767" CreationDate="2011-07-29T19:52:55.713" UserId="8240" Text="Textures are collections of one or more images. This means that a texture *could* be represented by a TGA or PNG, but neither format is capable of representing all possible features of textures. Why?&#xD;&#xA;&#xD;&#xA;Because each one can only hold a *single* image. There are no mipmaps. There are no 3D textures possible. No array textures. No cubemaps. Each of those files is just a single 2D image. They can be part of a texture, but unless you're not using mipmapping (and I strongly advise against not using mipmaps unless you have specific needs), a single image file in these formats cannot be a texture.&#xD;&#xA;&#xD;&#xA;They are fine image formats, but they make poor *texture* formats.&#xD;&#xA;&#xD;&#xA;DDS is the front-runner of texture formats because it actually supports things textures needs. It supports mipmaps and cubemaps. It supports 3D textures. DDSv10 support array textures. You can package a single texture within a DDS in a way that you couldn't with PNG or TGA.&#xD;&#xA;&#xD;&#xA;DDS supports uncompressed and compressed texture data. So long as the compressed texture format is one of the DXT/BC texture formats.&#xD;&#xA;&#xD;&#xA;PKM is useful for packaging ETC1-compressed images, but like with PNG, it doesn't support actual texture features.&#xD;&#xA;&#xD;&#xA;PVR files seem to be the mobile equivalent of DDS (though why they couldn't just use DDS's, I don't know). They support various compression techniques, but they lack advanced DDSv10 features like array textures, as well as 3D texture support.&#xD;&#xA;&#xD;&#xA;So DDS wins in terms of comprehensive texture support." />
  <row Id="34860" PostHistoryTypeId="2" PostId="15378" RevisionGUID="6d99a97e-943d-4934-a049-bfd347488465" CreationDate="2011-07-29T20:25:02.960" UserId="998" Text="How're you supposed to use vertex buffers?&#xD;&#xA;&#xD;&#xA;Say you have 500 distinct __deformable__ shapes/models in the world (ie you want to be able to change/delete vertices from the models somewhat arbitraily as the game progresses).  The requires you refresh the vertex buffers in the frames the model has become dirty, _at least_.&#xD;&#xA;&#xD;&#xA;So how should you handle your vertex buffer, assuming D3D11 interfaces (so vertex buffers are __your only option__ to draw anything):&#xD;&#xA;&#xD;&#xA;  - Store model vertices in CPU RAM.  Create one vertex buffer at program start. For each model, copy the vertices into the single vertex buffer, render&#xD;&#xA;  - Create 500 vertex buffers, update each when necessary, render.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34861" PostHistoryTypeId="1" PostId="15378" RevisionGUID="6d99a97e-943d-4934-a049-bfd347488465" CreationDate="2011-07-29T20:25:02.960" UserId="998" Text="Proper vertex buffer use" />
  <row Id="34862" PostHistoryTypeId="3" PostId="15378" RevisionGUID="6d99a97e-943d-4934-a049-bfd347488465" CreationDate="2011-07-29T20:25:02.960" UserId="998" Text="&lt;directx11&gt;&lt;vertex&gt;" />
  <row Id="34864" PostHistoryTypeId="2" PostId="15379" RevisionGUID="9cd2eb10-c370-4b12-b9b5-d9d0b87aa874" CreationDate="2011-07-29T20:53:00.390" UserId="8857" Text="Why have you defined your cbuffer as reading in from register `b0`? That might be a potential cause of your problem (the device context is writing to a different register than the one your buffer is reading in from). &#xD;&#xA;&#xD;&#xA;Also, before writing to your buffer, you should use the `ID3D11DeviceContext::Map()` function, as you need to prevent the GPU reading from it before you are ready to pass it. Try the following:&#xD;&#xA;&#xD;&#xA;Instead of this:&#xD;&#xA;&#xD;&#xA;    m_ConstantBufferContents.mWorldViewProj = view;&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;&#xD;&#xA;    D3D11_MAPPED_SUBRESOURCE mappedResource;&#xD;&#xA;    pDeviceContext-&gt;Map( &amp;m_ConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &amp;mappedResource )&#xD;&#xA;&#xD;&#xA;    VS_CONSTANT_BUFFER* dataPtr = (VS_CONSTANT_BUFFER*)mappedResource.pData;&#xD;&#xA;&#xD;&#xA;    dataPtr-&gt;mWorldViewProj = view;&#xD;&#xA;&#xD;&#xA;    pDeviceContext-&gt;Unmap( m_ConstantBuffer, 0 );&#xD;&#xA;&#xD;&#xA;I think that's the correct syntax (been away from DirectX for a while, gradually easing myself back into it :P), but the concept is to ensure that it doesn't read the information before you've written the new information to it. That also might be causing your issue. I also don't believe that you need to tell the shader the offsets of the elements within the buffer, that should be figured out when you bring in your shader for compilation.&#xD;&#xA;&#xD;&#xA;Other than that I don't see any issues that could be causing your problem. But then, I'm currently an &quot;untrained eye&quot;, so to speak, so if you still can't get it to work, then try looking at the tutorials from this [guy's website][1], they seem to be fairly good, and provide a good starting ground to build off of (I find once I have a working concept down, building on top of it is much easier, and enjoyable).&#xD;&#xA;&#xD;&#xA;Hope this helps! :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rastertek.com/tutindex.html" />
  <row Id="34865" PostHistoryTypeId="25" PostId="15370" RevisionGUID="509336d9-178f-4749-96ec-522a02d704d1" CreationDate="2011-07-29T21:33:04.760" Comment="http://twitter.com/#!/StackGameDev/status/97057076005711872" />
  <row Id="34866" PostHistoryTypeId="25" PostId="15378" RevisionGUID="2442fa18-01bb-4192-bae2-cd7125642fd8" CreationDate="2011-07-30T00:33:04.800" Comment="http://twitter.com/#!/StackGameDev/status/97102373943644160" />
  <row Id="34867" PostHistoryTypeId="2" PostId="15380" RevisionGUID="1cee0e63-86a7-48c6-8ebd-68f58640846c" CreationDate="2011-07-30T00:47:53.483" UserId="7640" Text="Hey i'm trying to make a GUI lib with SFML, and everything's done except one problem: Making the Interface stay still even when the camera moves or zooms in. &#xD;&#xA;&#xD;&#xA;This would be easy to fix if zooming wasn't possible, but **zooming out means scaling the contents of the Interface up, which causes it's text/images to become blurry**.&#xD;&#xA;&#xD;&#xA;*Does anyone have a way to get around this issue?* (***preferably only using SFML***, but if i must i can add OpenGL stuff....)" />
  <row Id="34868" PostHistoryTypeId="1" PostId="15380" RevisionGUID="1cee0e63-86a7-48c6-8ebd-68f58640846c" CreationDate="2011-07-30T00:47:53.483" UserId="7640" Text="how to keep a GUI on-screen without moving or resizing it according to camera movement" />
  <row Id="34869" PostHistoryTypeId="3" PostId="15380" RevisionGUID="1cee0e63-86a7-48c6-8ebd-68f58640846c" CreationDate="2011-07-30T00:47:53.483" UserId="7640" Text="&lt;c++&gt;&lt;gui&gt;&lt;sfml&gt;&lt;blur&gt;" />
  <row Id="34871" PostHistoryTypeId="2" PostId="15382" RevisionGUID="20510b9b-08ea-433a-9b7c-b77176be7c75" CreationDate="2011-07-30T01:09:38.123" UserId="6592" Text="When I provide the following struct definition in linked frag and vert shaders, my phone (Samsung Vibrant / Android 2.2) complains that the definition differs.&#xD;&#xA;&#xD;&#xA;    struct Light {&#xD;&#xA;	    mediump vec3 _position;&#xD;&#xA;	    lowp vec4 _ambient;&#xD;&#xA;	    lowp vec4 _diffuse;&#xD;&#xA;	    lowp vec4 _specular;&#xD;&#xA;	    bool _isDirectional;&#xD;&#xA;	    mediump vec3 _attenuation; // constant, linear, and quadratic components&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    uniform Light u_light;&#xD;&#xA;&#xD;&#xA;I know the struct is identical because its included from another file. These shaders work on a linux implementation and on my Android 3.0 tablet. Both shaders declare &quot;precision mediump float;&quot;&#xD;&#xA;&#xD;&#xA;The exact error is:&#xD;&#xA;&#xD;&#xA;    Uniform variable u_light type/precision does not match in vertex and fragment shader&#xD;&#xA;&#xD;&#xA;Am I doing anything wrong here, or is my phone's implementation broken? Any advice (other than file a bug report?)" />
  <row Id="34872" PostHistoryTypeId="1" PostId="15382" RevisionGUID="20510b9b-08ea-433a-9b7c-b77176be7c75" CreationDate="2011-07-30T01:09:38.123" UserId="6592" Text="Phone complains that identical GLSL struct definition differs in vert/frag programs" />
  <row Id="34873" PostHistoryTypeId="3" PostId="15382" RevisionGUID="20510b9b-08ea-433a-9b7c-b77176be7c75" CreationDate="2011-07-30T01:09:38.123" UserId="6592" Text="&lt;android&gt;&lt;opengl-es&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="34874" PostHistoryTypeId="2" PostId="15383" RevisionGUID="7dfae836-2c43-4d32-aa7a-693f135aede3" CreationDate="2011-07-30T01:30:51.460" UserId="8945" Text="I'm trying to implement a 3D camera of the &quot;Orbit around the origin&quot; variety in a game engine I'm developing in order to learn about 3D graphics and game programming. I have a basic handle on the required math, and have implemented my own crude 3D math library and matrix stack (functionally similar to the one in OpenGL's compatibility profile). My first attempts at a camera failed miserably, until I decided that I should use quaternions to represent rotation. Once I'd done that, I had a camera that moved in the direction I expected it to at about the right speed and fairly smoothly, but there is an odd spatial distortion effect that I can't seem to get rid of. I have posted a brief [video][1] on YouTube showing exactly what is happening.  &#xD;&#xA;&#xD;&#xA;I honestly don't know what could be causing this issue, the magnitude of the distortion appears to reach a maximum at certain angles, but beyond that I'm not sure what I should be looking at. Right now my chief suspect is my quaternion math code, because the matrix stack appears to be behaving itself and if something was wrong with my matrix math code I would be having more serious issues than this. &#xD;&#xA;&#xD;&#xA;I'm not sure what information or code I can provide that would be of any use, so I'll start with the code that handles quaternion math. &#xD;&#xA;&#xD;&#xA;    public class Quaternion {&#xD;&#xA;	private float w;&#xD;&#xA;	private float x;&#xD;&#xA;	private float y; &#xD;&#xA;	private float z;&#xD;&#xA;	&#xD;&#xA;	public Quaternion(){&#xD;&#xA;		this(1.0f,0.0f,0.0f,0.0f);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public Quaternion(float W, float X, float Y, float Z){&#xD;&#xA;		w = W;&#xD;&#xA;		x = X;&#xD;&#xA;		y = Y;&#xD;&#xA;		z = Z;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void loadIdentity(){&#xD;&#xA;		w = 1.0f;&#xD;&#xA;		x = 0.0f;&#xD;&#xA;		y = 0.0f;&#xD;&#xA;		z = 0.0f;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public float magnitude(){&#xD;&#xA;		//AKA the &quot;norm&quot;&#xD;&#xA;		return (float) Math.sqrt(w*w + x*x + y*y + z*z);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void qNormalize(){&#xD;&#xA;		float mag = this.magnitude();&#xD;&#xA;		w /= mag;&#xD;&#xA;		x /= mag;&#xD;&#xA;		y /= mag;&#xD;&#xA;		z /= mag;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void qMultiply(Quaternion q){&#xD;&#xA;		this.qMultiply(q.w, q.x, q.y, q.z);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	private void qMultiply(float w2, float x2, float y2, float z2){&#xD;&#xA;		//Performs A*B, where this Quaternion is A&#xD;&#xA;		this.w = w*w2 - x*x2 - y*y2 - z*z2;&#xD;&#xA;		this.x = w*x2 + x*w2 + y*z2 - z*y2;&#xD;&#xA;		this.y = w*y2 + y*w2 + z*x2 - x*z2;&#xD;&#xA;		this.z = w*z2 + z*w2 + x*y2 - y*x2;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public float[] qMatrix(){&#xD;&#xA;		//Return a 4x4 matrix representation of this Quaternion, column-major like OpenGL prefers&#xD;&#xA;		float w2 = w*w;&#xD;&#xA;		float x2 = x*x;&#xD;&#xA;		float y2 = y*y;&#xD;&#xA;		float z2 = z*z;&#xD;&#xA;		&#xD;&#xA;		if(Math.abs(w2+x2+y2+z2 - 1.0) &gt;= 0.000001){&#xD;&#xA;			this.qNormalize();&#xD;&#xA;			return this.qMatrix();&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		return new float[]{&#xD;&#xA;			1.0f - 2.0f*y2 -2.0f*z2, 2.0f*x*y + 2.0f*w*z, 2.0f*x*z - 2.0f*w*y, 0.0f,&#xD;&#xA;			2.0f*x*y - 2.0f*w*z, 1.0f - 2.0f*x2 - 2.0f*z2, 2.0f*y*z + 2.0f*w*x,0.0f,&#xD;&#xA;			2.0f*x*z - 2.0f*w*y, 2.0f*y*z + 2.0f*w*x, 1.0f - 2.0f*x2 - 2.0f*y2,0.0f,&#xD;&#xA;			0.0f,0.0f,0.0f,1.0f&#xD;&#xA;		};&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public void qFromAA(float angle, float[] axis){&#xD;&#xA;		//create a Quaternion from an axis-angle representation&#xD;&#xA;		&#xD;&#xA;		if(Vector.magnitude(axis) == 0.0f){&#xD;&#xA;			this.loadIdentity();&#xD;&#xA;			return;&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		float theta = angle/2.0f;&#xD;&#xA;		axis = Vector.scale((float)Math.sin(theta), Vector.normalize(axis));&#xD;&#xA;		&#xD;&#xA;		w = (float)Math.cos(theta);&#xD;&#xA;		x = axis[0];&#xD;&#xA;		y = axis[1];&#xD;&#xA;		z = axis[2];&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;	public String toString(){&#xD;&#xA;		return &quot;w: &quot;+w+&quot;\tx: &quot;+x+&quot;\ty: &quot;+y+&quot;\tz: &quot;+z+&quot;\tmag: &quot;+(x*x+y*y+z*z+w*w);&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Any ideas about where I should start?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://www.youtube.com/watch?v=-cFmF73yrQY" />
  <row Id="34875" PostHistoryTypeId="1" PostId="15383" RevisionGUID="7dfae836-2c43-4d32-aa7a-693f135aede3" CreationDate="2011-07-30T01:30:51.460" UserId="8945" Text="OpenGL Camera causes spatial distortion." />
  <row Id="34876" PostHistoryTypeId="3" PostId="15383" RevisionGUID="7dfae836-2c43-4d32-aa7a-693f135aede3" CreationDate="2011-07-30T01:30:51.460" UserId="8945" Text="&lt;opengl&gt;&lt;java&gt;&lt;math&gt;&lt;camera&gt;&lt;quaternion&gt;" />
  <row Id="34877" PostHistoryTypeId="2" PostId="15384" RevisionGUID="5b2d1293-37ef-4a88-9e13-a07f974d716d" CreationDate="2011-07-30T01:55:15.497" UserId="7911" Text="Is your camera really close and/or has a wide field of view angle?&#xD;&#xA;" />
  <row Id="34878" PostHistoryTypeId="2" PostId="15385" RevisionGUID="6f42197d-486d-4ad5-967f-a82d3d776cc5" CreationDate="2011-07-30T02:07:21.493" UserId="323" Text="After you've rendered the world, reset the camera position to something more useful for UIs. Then render the UI. Next frame, put it back to the world position before rendering the world. And so forth.&#xD;&#xA;&#xD;&#xA;By &quot;camera position&quot; I really mean &quot;transformation matrix&quot;. Nobody says all rendering has to go through the world transformation." />
  <row Id="34879" PostHistoryTypeId="2" PostId="15386" RevisionGUID="2890c3a6-4ba2-47e5-b6bd-c19e2758987a" CreationDate="2011-07-30T02:30:58.513" UserId="7981" Text="Enemies in this game take cover. AFAIK HL uses some logical decisions for enemy to start searching for cover and to abandon cover, and I am able so far to find them; but how does he find a cover place?&#xD;&#xA;&#xD;&#xA;I know HL has waypoints. I can only guess/speculate how they find cover point. They might search for nearest waypoint which has certain properties; I thought such node might have some &quot;cover&quot; tag but tutorials seem not to mention it; so maybe it is a node which is not visible by player AND offers attack possibility (crate or edge of wall).&#xD;&#xA;&#xD;&#xA;Thank You. :)" />
  <row Id="34880" PostHistoryTypeId="1" PostId="15386" RevisionGUID="2890c3a6-4ba2-47e5-b6bd-c19e2758987a" CreationDate="2011-07-30T02:30:58.513" UserId="7981" Text="How does Half Life's covering works?" />
  <row Id="34881" PostHistoryTypeId="3" PostId="15386" RevisionGUID="2890c3a6-4ba2-47e5-b6bd-c19e2758987a" CreationDate="2011-07-30T02:30:58.513" UserId="7981" Text="&lt;algorithm&gt;&lt;ai&gt;&lt;path-finding&gt;&lt;valve&gt;" />
  <row Id="34882" PostHistoryTypeId="2" PostId="15387" RevisionGUID="4e6ac5b8-3419-46c8-b29d-df8dd74b187f" CreationDate="2011-07-30T02:43:11.483" UserId="101" Text="You could always take a look at the [Half-Life source code][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.fileplanet.com/81538/80000/fileinfo/Full-Half-Life-SDK-2.3-%28source-only%29 &quot;Half-Life source code&quot;" />
  <row Id="34883" PostHistoryTypeId="2" PostId="15388" RevisionGUID="32e04650-d19a-463e-b68d-79c9ed1927eb" CreationDate="2011-07-30T02:54:02.483" UserId="8234" Text="Are you sure your code for quaternion multiplication and your code for quaternion matrix converion is correct?&#xD;&#xA;&#xD;&#xA;I had a typo in one of my formulas once that cost me nearly half a day.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;btw... http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm is a great reference for quaternion math." />
  <row Id="34884" PostHistoryTypeId="4" PostId="15302" RevisionGUID="09d9f385-e024-4ae4-9700-0975d2ac2305" CreationDate="2011-07-30T02:56:53.973" UserId="8771" Comment="saw this question in an ad. without being a full sentence it made no sense at all as an ad!" Text="How can I get textures on edge of walls like in Super Metroid and Aquaria?" />
  <row Id="34885" PostHistoryTypeId="24" PostId="15302" RevisionGUID="09d9f385-e024-4ae4-9700-0975d2ac2305" CreationDate="2011-07-30T02:56:53.973" Comment="Proposed by 8771 approved by 1430 edit id of 588" />
  <row Id="34886" PostHistoryTypeId="2" PostId="15389" RevisionGUID="f9c1314f-0628-4f58-b16b-8196524e199d" CreationDate="2011-07-30T03:16:51.720" UserId="8770" Text="It is very similar to this question: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;&#xD;&#xA;Does anyone know of any popular or famous games written in C?" />
  <row Id="34887" PostHistoryTypeId="1" PostId="15389" RevisionGUID="f9c1314f-0628-4f58-b16b-8196524e199d" CreationDate="2011-07-30T03:16:51.720" UserId="8770" Text="What popular/famous games are written in C?" />
  <row Id="34888" PostHistoryTypeId="3" PostId="15389" RevisionGUID="f9c1314f-0628-4f58-b16b-8196524e199d" CreationDate="2011-07-30T03:16:51.720" UserId="8770" Text="&lt;c&gt;&lt;game-industry&gt;&lt;languages&gt;" />
  <row Id="34889" PostHistoryTypeId="2" PostId="15390" RevisionGUID="a7dd3756-7446-46f6-aff8-25c01d585df2" CreationDate="2011-07-30T03:29:21.653" UserId="8770" Text="There is a C# wrapper for the well-known and open-source FFmpeg: http://www.ffmpeg-csharp.com/" />
  <row Id="34890" PostHistoryTypeId="25" PostId="15334" RevisionGUID="d383587f-2559-4fb1-8bd6-ea2c1e7ba5fb" CreationDate="2011-07-30T03:33:56.920" Comment="http://twitter.com/#!/StackGameDev/status/97147891793145856" />
  <row Id="34891" PostHistoryTypeId="2" PostId="15391" RevisionGUID="109cf1ef-4b9b-4b7f-9932-e6085b7d157b" CreationDate="2011-07-30T03:41:14.067" UserId="8947" Text="Doom, Quake, pretty much all id games up until id Tech 4." />
  <row Id="34892" PostHistoryTypeId="2" PostId="15392" RevisionGUID="912d2ab9-4294-40ed-88c0-7ce93b1b1341" CreationDate="2011-07-30T05:19:02.610" UserId="7981" Text="These steps You mention are most likely done in separate engines. It is just that simple game engines usually have them in one pass. Your sequence&#xD;&#xA;&#xD;&#xA;    for each object&#xD;&#xA;        do physics&#xD;&#xA;        do game logic&#xD;&#xA;        draw&#xD;&#xA;&#xD;&#xA;becomes&#xD;&#xA;&#xD;&#xA;    call physics subsystem&#xD;&#xA;    call game logic subsystem&#xD;&#xA;    call drawing subsystem&#xD;&#xA;&#xD;&#xA;Physics Engine takes care of positions and sizes.&#xD;&#xA;&#xD;&#xA;Game Logic Engine takes care of interpreting what Physics Engine changed (he could obstruct some waypoints ...), [what goals characters have and what behaviour they should be doing][4], he runs scheduled scripts (this **think** function).&#xD;&#xA;&#xD;&#xA;Drawing Engine draws what objects are visible, and he knows what objects are visible because Quake engines kind of cheat here (see Draw section).&#xD;&#xA;&#xD;&#xA;My advice to You is to rather study how simulations are done rather that game engines. There is a huge pop-culture relating game development and game engines are made in imperative languages (because of tradition&amp;speed); so it was more enlightening to me to get good textbooks (rather theory) and THEN look at engines (practice) rather than look at engines and puzzle for hours how they did it.&#xD;&#xA;&#xD;&#xA;Physics&#xD;&#xA;=======&#xD;&#xA;&#xD;&#xA;Whole notion of iterate all entities and do {think, draw} will probably lead to problems. There will be conflicts and so on. I belive Valve have Havok and I guess Havok takes care of enough-correct physics.&#xD;&#xA;&#xD;&#xA;Think&#xD;&#xA;=====&#xD;&#xA;&#xD;&#xA;**Think** function is run when a time in a game equals time in **nextthink**. It works this way in Quake engine, and Quake engine is basis for Half Life engines. It is NOT run every time.&#xD;&#xA;&#xD;&#xA;Internally it should be a simple iterating through a list of entities and checking if time has passed to call think function. Time complexity will be O(N), where N is number of entities.&#xD;&#xA;&#xD;&#xA;If there is a very large number of entities You should measure how much it will improve the fps. Note, that because of [Amdahl's law][1] it is potentially invisible speedup. I mean, You just iterate trough all items and decrease&amp;check one number.&#xD;&#xA;&#xD;&#xA;I would speed it up by sorting entities by nextthink (create list of pointers to entities and sort it each time; not array of entities, because entities might change their nextthink anytime, so rearanging them in array takes O(N) instead of O(1) in list).&#xD;&#xA;&#xD;&#xA;You should also look at [O(1) scheduler in Linux][2].&#xD;&#xA;&#xD;&#xA;Draw&#xD;&#xA;====&#xD;&#xA;&#xD;&#xA;Engine draws what is approximately visible from area at which is camera. Game level is partition into a tree, and a area is leaf of that tree. I won't bother You with [details about it][3]... So if an entity is visible it is put into a set of visible entities and they are drawn.&#xD;&#xA;&#xD;&#xA;They store what areas are potentially visible areas. It is called [&quot;potentialy visible set&quot;, PVS][5] for short. There is [visualisation of PVS][6], green capsule is player and around him is rendered what his PVS contains. &#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Amdahl%27s_law&#xD;&#xA;[2]:http://en.wikipedia.org/wiki/O%281%29_scheduler&#xD;&#xA;[3]:http://www.phatcode.net/res/224/files/html/ch70/70-01.html&#xD;&#xA;[4]:http://goo.gl/sVfnX&#xD;&#xA;[5]:http://www.bluesnews.com/abrash/chap64.shtml&#xD;&#xA;[6]:http://www.youtube.com/watch?v=bMN6DVWxi94" />
  <row Id="34893" PostHistoryTypeId="2" PostId="15393" RevisionGUID="185ee4a5-abfa-429c-9d97-20d946ed768b" CreationDate="2011-07-30T05:32:16.717" UserId="8950" Text="I'm currently working on an isometric game using the Microsoft XNA Framework. I'm looking of resources that would be of use for making this a successful project, such as isometric engines, physics engines, sprite engines(for isometric games), event handlers for ...&#xD;&#xA;&#xD;&#xA;Any input would be greatly appreciated." />
  <row Id="34894" PostHistoryTypeId="1" PostId="15393" RevisionGUID="185ee4a5-abfa-429c-9d97-20d946ed768b" CreationDate="2011-07-30T05:32:16.717" UserId="8950" Text="What are some great and useful resources for an Isometric game built on the XNA Framework? | Isometric Engine | C# | XNA Framework |" />
  <row Id="34895" PostHistoryTypeId="3" PostId="15393" RevisionGUID="185ee4a5-abfa-429c-9d97-20d946ed768b" CreationDate="2011-07-30T05:32:16.717" UserId="8950" Text="&lt;xna&gt;&lt;animation&gt;&lt;resources&gt;&lt;isometric&gt;&lt;microsoft&gt;" />
  <row Id="34896" PostHistoryTypeId="5" PostId="15369" RevisionGUID="96918fe7-d1e9-485b-a5f9-49e06e6d0dab" CreationDate="2011-07-30T05:38:50.153" UserId="5311" Comment="Clarified comments re Java portability" Text="Java can definitely be used to develop games, and there have been some very successful games developed in Java.  I think Jesse has already done a good job of giving some examples of desktop game development in Java, but I wanted to point out that you can also write mobile games for Android in Java.  Don't expect to make much money on it, but the mobile space is very hot right now, and it's a great place to get some exposure for your work.&#xD;&#xA;&#xD;&#xA;Additionally, check out the [Java4K][1] site for some other small projects written in Java.  All of the games on the site use 4,096 bytes of memory or less in their compiled and packaged forms, including all art assets.&#xD;&#xA;&#xD;&#xA;The one concern I'd have about writing a game in Java is that, while you get the convenience of automatic portability between PC operating systems, you'd have to completely rewrite your game if you wanted to port it to a platform like iOS.  If you wrote it in C or C++, you'd have a bit more work to make it portable in the first place, but there would be no limit to the number of platforms you could port it to.  But for a starting game developer, that's a minor concern.  You should focus on just making some games before you worry about portability.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.java4k.com/index.php?action=home" />
  <row Id="34897" PostHistoryTypeId="2" PostId="15394" RevisionGUID="7192aa72-1f0a-4808-ac40-fb1f010716dc" CreationDate="2011-07-30T06:02:53.150" UserId="7981" Text="Map is a grid. Grid is a graph. A* works on graph, it is a graphs searching algorithm. A* should search few nodes of graph.&#xD;&#xA;&#xD;&#xA;As has been mentioned they can use navigation mesh. But the A* (or something similar) will be on top of that mesh anyway, because polygons of this mesh are just nodes of a graph; A* will then search for path from one polygon to another polygon.&#xD;&#xA;&#xD;&#xA;Not sure about Warcraft or commercial games, but there is also technique called [Collaborative Diffusion][2] and it is very simple; it is usually done on grid. There is also technique called [Potential Fields][1], which is very similar to previous one if not the same.&#xD;&#xA;&#xD;&#xA;You might also try:&#xD;&#xA;&#xD;&#xA;* whether some of these games have source code available&#xD;&#xA;* whether some of clones of these games have source available&#xD;&#xA;* whether SDK or editors don't hint something&#xD;&#xA;* ask employers of companies making these games, some of them might be willing to share&#xD;&#xA;&#xD;&#xA;[1]:http://aigamedev.com/open/tutorials/potential-fields/&#xD;&#xA;[2]:http://scalablegamedesign.cs.colorado.edu/wiki/Collaborative_Diffusion" />
  <row Id="34898" PostHistoryTypeId="2" PostId="15395" RevisionGUID="87748c35-c484-40b3-9e81-4fc99fe0f67d" CreationDate="2011-07-30T06:32:58.533" UserId="7981" Text="It is same as waypoint pathfinding, only instead of way-points you have way-polygons and You can infer few things about navimesh from it:&#xD;&#xA;&#xD;&#xA;* way-polygons are areas where entities can safely walk&#xD;&#xA;    * other areas should probably be not considered &#xD;&#xA;    * way-points need to do leap of faith into space between them; remember NPCs stucking in walls? It was at places where two waypoints were not directly connected.&#xD;&#xA;* There is potentially less nodes (because polygons are biger)&#xD;&#xA;    * Therefore it is most likely faster&#xD;&#xA;    * Therefore it has potentially smaller memory requirements&#xD;&#xA;* It is more realistic (because polygon's area contains in theory infinite amount of points)&#xD;&#xA;    * At polygons You might do some [flocking behaviour][1] to avoid collisions between NPCs&#xD;&#xA;&#xD;&#xA;[1]:http://www.red3d.com/cwr/boids/" />
  <row Id="34899" PostHistoryTypeId="25" PostId="15393" RevisionGUID="ac0e6c9f-2c82-4d1e-8321-c4332bc689a8" CreationDate="2011-07-30T06:33:57.473" Comment="http://twitter.com/#!/StackGameDev/status/97193193560485888" />
  <row Id="34900" PostHistoryTypeId="2" PostId="15396" RevisionGUID="02c63126-b51b-430f-a746-1d8ef2c31b8b" CreationDate="2011-07-30T08:48:09.907" UserId="1839" Text="The isometric projection is not so much relevant for the underlying tools you choose, it's just the way (angle, no perspective distortion) you look at things, but that doesn't change the underlying principles of how things behave. That means you don't need to particularly search for isometric tools. &#xD;&#xA;&#xD;&#xA;The physics for instance is the same, no matter how you look at it. The math of a car crash does not change, whether you look at it from the left or from the right, it does not depend on the observer. The same is true for a bouncing ball, it does not care if you watch it from the left or from top, it will bounce the same way always. &#xD;&#xA;&#xD;&#xA;If you have particular doubts about how to implement such things in terms of isometric projections, please tell us an example and we can go into details :)&#xD;&#xA;" />
  <row Id="34902" PostHistoryTypeId="4" PostId="15393" RevisionGUID="4dfbe42c-63c8-4603-8b71-29933609aa03" CreationDate="2011-07-30T09:41:48.317" UserId="1156" Comment="edited tags; edited title" Text="What are some great and useful resources for an Isometric game built on the XNA Framework?" />
  <row Id="34903" PostHistoryTypeId="6" PostId="15393" RevisionGUID="4dfbe42c-63c8-4603-8b71-29933609aa03" CreationDate="2011-07-30T09:41:48.317" UserId="1156" Comment="edited tags; edited title" Text="&lt;xna&gt;&lt;c#&gt;&lt;animation&gt;&lt;resources&gt;&lt;isometric&gt;" />
  <row Id="34904" PostHistoryTypeId="25" PostId="15382" RevisionGUID="46cbf770-9f1c-47b2-8ca8-6d6cf54fd9cf" CreationDate="2011-07-30T12:33:57.407" Comment="http://twitter.com/#!/StackGameDev/status/97283789625106432" />
  <row Id="34905" PostHistoryTypeId="2" PostId="15397" RevisionGUID="a8bbab53-171e-4f11-8744-a2f8b6ef5a74" CreationDate="2011-07-30T12:35:53.767" UserId="5665" Text="Every single Xbox and Xbox 360 game." />
  <row Id="34906" PostHistoryTypeId="2" PostId="15398" RevisionGUID="69101e78-040f-49cf-96d7-ba8181e9771b" CreationDate="2011-07-30T12:39:42.737" UserId="5665" Text="Alienbrain asset manager is a good start." />
  <row Id="34907" PostHistoryTypeId="2" PostId="15399" RevisionGUID="c92f26ad-5a71-4bdd-9cc3-6472f3b924c7" CreationDate="2011-07-30T14:34:11.713" UserId="3128" Text="Should I give each character its own VBO or should I batch all characters into a single VBO?  What are the pros/cons?&#xD;&#xA;&#xD;&#xA;Any help is appreciated." />
  <row Id="34908" PostHistoryTypeId="1" PostId="15399" RevisionGUID="c92f26ad-5a71-4bdd-9cc3-6472f3b924c7" CreationDate="2011-07-30T14:34:11.713" UserId="3128" Text="I'm making a multiplayer 3d first person game. Should I give each character its own VBO or should I batch them into a single VBO?" />
  <row Id="34909" PostHistoryTypeId="3" PostId="15399" RevisionGUID="c92f26ad-5a71-4bdd-9cc3-6472f3b924c7" CreationDate="2011-07-30T14:34:11.713" UserId="3128" Text="&lt;opengl&gt;&lt;vbo&gt;" />
  <row Id="34910" PostHistoryTypeId="25" PostId="15386" RevisionGUID="2c28e113-46d8-49c6-8768-3abe548a80ba" CreationDate="2011-07-30T15:33:57.663" Comment="http://twitter.com/#!/StackGameDev/status/97329088661954561" />
  <row Id="34911" PostHistoryTypeId="4" PostId="15386" RevisionGUID="cfb0a4db-860f-47ba-8404-ced7f96fe836" CreationDate="2011-07-30T15:58:38.837" UserId="1839" Comment="grammar correction in title" Text="How does Half Life's covering work?" />
  <row Id="34912" PostHistoryTypeId="24" PostId="15386" RevisionGUID="cfb0a4db-860f-47ba-8404-ced7f96fe836" CreationDate="2011-07-30T15:58:38.837" Comment="Proposed by 1839 approved by 1430 edit id of 589" />
  <row Id="34913" PostHistoryTypeId="2" PostId="15400" RevisionGUID="eb3216d0-ea9b-4980-8cdc-20b4f082f0c1" CreationDate="2011-07-30T16:20:09.440" UserId="4662" Text="As far as I know, the AI is actually misleading. The AI in Half-Life is very scripted, even though it doesn't appear to be so, which is why they can appear to exhibit intelligent behaviours. " />
  <row Id="34914" PostHistoryTypeId="5" PostId="15399" RevisionGUID="e9a64b8c-f18d-4dbf-a62f-0bd61c9e4023" CreationDate="2011-07-30T17:49:33.043" UserId="1430" Comment="added 7 characters in body; edited title" Text="I'm making a 3D first person game. Should I give each character its own VBO or should I batch all characters into a single VBO?  What are the pros/cons?" />
  <row Id="34915" PostHistoryTypeId="4" PostId="15399" RevisionGUID="e9a64b8c-f18d-4dbf-a62f-0bd61c9e4023" CreationDate="2011-07-30T17:49:33.043" UserId="1430" Comment="added 7 characters in body; edited title" Text="Should I give each character its own VBO or should I batch them into a single VBO?" />
  <row Id="34917" PostHistoryTypeId="25" PostId="15352" RevisionGUID="de86cec0-23b2-4ca7-945c-cffdcbb90366" CreationDate="2011-07-30T18:33:57.297" Comment="http://twitter.com/#!/StackGameDev/status/97374385719099392" />
  <row Id="34918" PostHistoryTypeId="12" PostId="15384" RevisionGUID="67dbd105-8d0e-42db-bc48-6642a4dc0b23" CreationDate="2011-07-30T18:52:32.580" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="34919" PostHistoryTypeId="13" PostId="15384" RevisionGUID="e96545de-85ec-4709-9764-87e1e72204a4" CreationDate="2011-07-30T18:53:04.903" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="34920" PostHistoryTypeId="16" PostId="15389" RevisionGUID="9cf95555-b6ef-49d6-b725-fded75a6e60c" CreationDate="2011-07-30T18:53:39.583" UserId="51" />
  <row Id="34921" PostHistoryTypeId="16" PostId="15391" RevisionGUID="84d86d95-83cf-4b68-b818-0bdb51847cd5" CreationDate="2011-07-30T18:53:39.583" UserId="51" />
  <row Id="34922" PostHistoryTypeId="16" PostId="15397" RevisionGUID="8688a87e-e962-4f41-9c09-50ef0bb37d51" CreationDate="2011-07-30T18:53:39.583" UserId="51" />
  <row Id="34924" PostHistoryTypeId="2" PostId="15402" RevisionGUID="cf6d9d9a-45de-45a5-aef8-e8afd4543c28" CreationDate="2011-07-30T19:07:41.037" UserId="4794" Text="This is really a choice between performance and managable code, but I'll list my opinions about it.&#xD;&#xA;&#xD;&#xA;**One single VBO**:&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Just one draw call to draw your scene. This *increases* performance.&#xD;&#xA; - Not requiring state changes between your objects. This *increases* performance.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Hard to manage, although this depends on how you write your code, if it's properly designed etc.&#xD;&#xA; - By saying *hard to manage* I mean stuff like update the VBO, set correct offset for every object etc.&#xD;&#xA;&#xD;&#xA;**Individual VBO:s**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Easy to implement.&#xD;&#xA; - Easier to manage from the beginning.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Lot of state changes. This decreases performance.&#xD;&#xA; - Lots of draw calls. It will decrease the performance.&#xD;&#xA;&#xD;&#xA;I'd recommend you to profile your application; get your real bottleneck in data you can see. Premature optimization can be shown (in this case) as unnecessary. However, that being said, if you'd discover a real performance lost in your application, given the *individual VBO:s* scenario, you can start implementing a single VBO.&#xD;&#xA;&#xD;&#xA;However, as long as it's not needed (the number of objects are low, not many state changes overall, etc) I'd recommend to go with individual VBO:s unless you see that's not gonna work.&#xD;&#xA;" />
  <row Id="34925" PostHistoryTypeId="5" PostId="15402" RevisionGUID="fb7fceac-e126-40bc-812d-5ccda1dd696c" CreationDate="2011-07-30T19:13:01.623" UserId="4794" Comment="edited body" Text="This is really a choice between performance and flexibility, but I'll list my opinions about it.&#xD;&#xA;&#xD;&#xA;**One single VBO**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Just one draw call to draw your scene. This *increases* performance.&#xD;&#xA; - Not requiring state changes between your objects. This *increases* performance.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Hard to manage, although this depends on how you write your code, if it's properly designed etc.&#xD;&#xA; - By saying *hard to manage* I mean stuff like update the VBO, set correct offset for every object etc.&#xD;&#xA;&#xD;&#xA;**Individual VBO:s**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Easy to implement.&#xD;&#xA; - Easier to manage from the beginning.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Lot of state changes. This decreases performance.&#xD;&#xA; - Lots of draw calls. It will decrease the performance.&#xD;&#xA;&#xD;&#xA;**Summary**&#xD;&#xA;&#xD;&#xA;I'd recommend you to profile your application; get your real bottleneck in data you can see. Premature optimization can be shown (in this case) as unnecessary. However, that being said, if you'd discover a real performance loss in your application, given the *individual VBO:s* scenario, you can start implementing a single VBO.&#xD;&#xA;&#xD;&#xA;However, as long as it's not needed (the number of objects are low, not many state changes overall, etc) I'd recommend to go with individual VBO:s unless you see that's not gonna work.&#xD;&#xA;" />
  <row Id="34926" PostHistoryTypeId="2" PostId="15403" RevisionGUID="6ad3d058-b1c6-4f7b-8f1e-02a270f68721" CreationDate="2011-07-30T19:15:32.027" UserId="744" Text="Cryptic Studios's games - City of Heroes / Villians, Star Trek Online, and Champions Online (and presumably Neverwinter Nights, but I can't vouch for that 100% since I don't work there anymore) - were written in C." />
  <row Id="34927" PostHistoryTypeId="16" PostId="15403" RevisionGUID="84bdc4d9-3caf-4531-8218-067923925e5f" CreationDate="2011-07-30T19:15:32.027" UserId="744" />
  <row Id="34928" PostHistoryTypeId="5" PostId="15402" RevisionGUID="1a000708-c2fa-4d58-8fff-940264b8f353" CreationDate="2011-07-30T19:18:16.987" UserId="4794" Comment="added 1 characters in body" Text="This is really a choice between performance and flexibility, but I'll list my opinions about it.&#xD;&#xA;&#xD;&#xA;**One single VBO**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Just one draw call to draw your scene. This *increases* performance.&#xD;&#xA; - Not requiring state changes between your objects. This *increases* performance.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Hard to manage, although this depends on how you write your code, if it's properly designed etc.&#xD;&#xA; - By saying *hard to manage* I mean stuff like update the VBO, set correct offset for every object etc.&#xD;&#xA;&#xD;&#xA;**Individual VBO:s**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Easy to implement.&#xD;&#xA; - Easier to manage from the beginning.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Lots of state changes. This decreases performance.&#xD;&#xA; - Lots of draw calls. It will decrease the performance.&#xD;&#xA;&#xD;&#xA;**Summary**&#xD;&#xA;&#xD;&#xA;I'd recommend you to profile your application; get your real bottleneck in data you can see. Premature optimization can be shown (in this case) as unnecessary. However, that being said, if you'd discover a real performance loss in your application, given the *individual VBO:s* scenario, you can start implementing a single VBO.&#xD;&#xA;&#xD;&#xA;However, as long as it's not needed (the number of objects are low, not many state changes overall, etc) I'd recommend to go with individual VBO:s unless you see that's not gonna work.&#xD;&#xA;" />
  <row Id="34929" PostHistoryTypeId="2" PostId="15404" RevisionGUID="ac4e1ef5-8a45-483b-899b-a8ec0de53062" CreationDate="2011-07-30T19:42:44.953" UserId="8927" Text="I've recently begun working on a tile-based tactical game, and I have questions regarding a couple of key moments.&#xD;&#xA;&#xD;&#xA;Is it feasible to organize the tilemap as an array of containers, which can hold the game objects? What are the pros and cons of such an approach? Should I make a single container class for all the game objects, such as characters, walls, and terrain, or try to break it down to separate container types for every single game object class?&#xD;&#xA;&#xD;&#xA;Any examples of a container capable of storing objects of several different classes will be greatly appreciated.  " />
  <row Id="34930" PostHistoryTypeId="1" PostId="15404" RevisionGUID="ac4e1ef5-8a45-483b-899b-a8ec0de53062" CreationDate="2011-07-30T19:42:44.953" UserId="8927" Text="Container classes in tile-based games." />
  <row Id="34931" PostHistoryTypeId="3" PostId="15404" RevisionGUID="ac4e1ef5-8a45-483b-899b-a8ec0de53062" CreationDate="2011-07-30T19:42:44.953" UserId="8927" Text="&lt;c++&gt;&lt;architecture&gt;&lt;tiles&gt;" />
  <row Id="34932" PostHistoryTypeId="2" PostId="15405" RevisionGUID="005b71a1-59b8-4fa1-a264-ea87428e9c76" CreationDate="2011-07-30T19:45:59.567" UserId="8594" Text="Lots of Jap/PS1/DC games. Also Soul Reaver 1, parts of Soul Reaver 2 and there was quite some plain C code in Tomb Raider: Legend." />
  <row Id="34933" PostHistoryTypeId="16" PostId="15405" RevisionGUID="78f9f0ba-eee1-4f46-80e3-3fb87aa38602" CreationDate="2011-07-30T19:45:59.567" UserId="8594" />
  <row Id="34934" PostHistoryTypeId="2" PostId="15406" RevisionGUID="15b6fac8-b5c5-41c5-adf9-4a8eedada767" CreationDate="2011-07-30T20:00:56.700" UserId="8857" Text="For your tilemap, I'd recommend either using a C-style multidimensional array wrapped in your own class, or using a multidimensional `std::vector` for the same purpose. You can then read in this at run-time from your map file (how you do this will depend on how you design your map file).&#xD;&#xA;&#xD;&#xA;With regards to storing the entities in a game, it's really up to you, I'd suggest a container (probably a linked list is best in this case because you don't really want a contiguous memory block, and also you will no doubt regularly be adding and removing entities etc. so the amortized constant time may be of some advantage here, or perhaps `std::deque`, or even std::map depending on how you want to implement it) to store a pointer to each of your entities (which should derive from some base class, probably `CBaseEntity` or something like that, again depending on how you choose to structure it. Have a base entity to derive from will also help you in terms of your rendering pipeline as well, as you can call some derived `Render()` function for each entity in the container.&#xD;&#xA;&#xD;&#xA;The reason I would use one container rather than several is that it minimizes the number of loops needed in your rendering pipeline. It allows you to perform global entity operations, and if you use an std::map, or std::multimap (or their unordered counterparts) you can still make sure you only choose the entities you are interested in for entity specific proceedures. Moreover, it minimizes overhead (not that is much of an issue with only say, 20 types of entity, but if you move into several hundred types of entity (which could be quite easy depending on how in-depth your game becomes then you could give yourself quite a bit of overhead).&#xD;&#xA;&#xD;&#xA;An example of a game engine which keeps all of it's entities in a single container would be the Source engine (used by half-life, half-life 2 etc.)&#xD;&#xA;&#xD;&#xA;Hope this helps! :)" />
  <row Id="34935" PostHistoryTypeId="2" PostId="15407" RevisionGUID="6685b2d4-33b1-4151-b19e-5610708f8d6f" CreationDate="2011-07-30T20:43:40.727" UserId="1430" Text="&gt; Is it feasible to organize the tilemap as an array of containers,&#xD;&#xA;&gt; which can hold the game objects? What are the pros and cons of such an&#xD;&#xA;&gt; approach?&#xD;&#xA;&#xD;&#xA;I would use `std::vector&lt;Tile&gt;` or similar. I don't see the need for an array of containers or for multidimensional containers (unless perhaps you have multiple independent layers of tiles). Even a simple plain array of `Tile` objects would work fine, if you must (although I find the use of vectors far more convenient. You can use a single-dimensional container as a 2D one just fine, you simply make it contain `width * height` items and to access the tile at `(x,y)` use indexing math like `container[x + (y * width)]`. Generally one will encapsulate this indexing math behind a tilemap class or some other kind of abstraction.&#xD;&#xA;&#xD;&#xA;The reason for preferring a single-dimensional vector is that a multi-dimensional vector gives you no tangible, significant benefit over a single-dimensional one, but a single-dimensional vector provides the additional benefit of keeping the elements all contiguous in memory, resulting in better locality of reference and cache coherency. A vector-of-vectors-style multi-dimensional array does not have this property, nor does the sane form of a dynamically-allocated multi-dimensional plain array (although one with compile-time bounds will, but that is of limited utility in this scenario when you'll presumably want to read your data from a file eventually).&#xD;&#xA;&#xD;&#xA;Of course you could achieve that coherency via [pooling][1] allocators as well.&#xD;&#xA;&#xD;&#xA;&gt; Should I make a single container class for all the game objects, such&#xD;&#xA;&gt; as characters, walls, and terrain, or try to break it down to separate&#xD;&#xA;&gt; container types for every single game object class?&#xD;&#xA;&#xD;&#xA;If every object in your game can be treated exactly the same, then it may be more efficient to create a common base interface for them, and manage them all as a big list of that base interface. As the complexity of your game objects grows, this may be less true and it may be more beneficial to split them out into different lists based on type or other criteria.&#xD;&#xA;&#xD;&#xA;As a rule of thumb, if you keep objects that will be processed similarly with each other organizationally, you'll be able to process them more efficiently. &quot;Processing&quot; here includes not just what they do when they `Update()` every frame, but also how long they exist in the game world, what their lifetime management policy is, whether or not they must be processed in a certain order, et cetera. Keeping them together may also improve locality of reference and allow you to spread processing out onto multiple threads, which can be a big win for performance.&#xD;&#xA;&#xD;&#xA;&gt; Any examples of a container capable of storing objects of several&#xD;&#xA;&gt; different classes will be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Almost any container can; it matters more what you store rather than what you store it in. If you take advantage of [polymorphism][2], you can implement a base class or interface&#xD;&#xA;&#xD;&#xA;    struct Base{&#xD;&#xA;      virtual void DoThings() = 0;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;which everything to be stored together inherits from&#xD;&#xA;&#xD;&#xA;    struct ChildA : Base {&#xD;&#xA;      void DoThings() { /* ... */ }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    struct ChildB : Base {&#xD;&#xA;      void DoThings() { /* ... */ }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;you can create a `std::vector&lt;Base*&gt;` (as just one example) and store pointers to `ChildA` and `ChildB` in that vector and treat them uniformly by way of their common interface.&#xD;&#xA;&#xD;&#xA;You should also consider that its generally good practice to divorce your rendering and game logic code. The effect of storing different classifications of game object in different ways should have no impact on the organization of your rendering queue; you'd still want that to operate on (essentially) a single list of its own type of object (for example, sprites in a 2D game). The most straightforward way to achieve this is to store a pointer or reference to the renderable component (sprite, or some higher level construct if needed) inside the game logic components.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Memory_pool&#xD;&#xA;  [2]: http://www.cplusplus.com/doc/tutorial/polymorphism/" />
  <row Id="34936" PostHistoryTypeId="2" PostId="15408" RevisionGUID="9eafc8c2-a482-4184-b895-b6afc04a0c34" CreationDate="2011-07-30T21:13:41.853" UserId="8959" Text="I am working on a large scale real-time strategy game - ideally with thousands of units active at once - but I am having trouble managing all of the units at once without it becoming astonishingly slow. The problem is that it takes a while to update the positions and states of everything each time step. Do you know any design patterns/methodologies/tips for mitigating this?" />
  <row Id="34937" PostHistoryTypeId="1" PostId="15408" RevisionGUID="9eafc8c2-a482-4184-b895-b6afc04a0c34" CreationDate="2011-07-30T21:13:41.853" UserId="8959" Text="Manage a large number of independant actors in real-time" />
  <row Id="34938" PostHistoryTypeId="3" PostId="15408" RevisionGUID="9eafc8c2-a482-4184-b895-b6afc04a0c34" CreationDate="2011-07-30T21:13:41.853" UserId="8959" Text="&lt;architecture&gt;&lt;programming&gt;&lt;algorithm&gt;&lt;rts&gt;" />
  <row Id="34939" PostHistoryTypeId="5" PostId="15380" RevisionGUID="2af590cf-3683-4945-8a18-3bef3f91d6cd" CreationDate="2011-07-30T22:36:22.047" UserId="7640" Comment="added 39 characters in body" Text="Hey i'm trying to make a GUI lib with SFML, and everything's done except one problem: Making the Interface stay still even when the camera moves or zooms in/out. &#xD;&#xA;&#xD;&#xA;This would be easy to fix if zooming wasn't possible, but **zooming out means having to scale the contents of the Interface up so it doesn't shrink, which causes it's text/images to become blurry**.&#xD;&#xA;&#xD;&#xA;*Does anyone have a way to get around this issue?* (***preferably only using SFML as I don't want to make my lib openGL dependent***)" />
  <row Id="34940" PostHistoryTypeId="2" PostId="15409" RevisionGUID="ff71184e-bd17-499d-95bb-49d4923f06fa" CreationDate="2011-07-30T23:22:23.000" UserId="744" Text="(This is not game programming per se, but I'm certain if I asked this on SO I'd get told not to prematurely optimize, even though history tells us every large game ends up worrying about these things.)&#xD;&#xA;&#xD;&#xA;Is there a document anywhere that summarizes the differences in performance, and particularly memory usage, between different C++ standard library implementations? The details of some implementations are protected by NDA, but a comparison between even STLport vs. libstdc++ vs. libc++ vs. MSVC/Dinkumware (vs. EASTL?) seems like it would be immensely useful.&#xD;&#xA;&#xD;&#xA;In particular I'm looking for answers to questions like:&#xD;&#xA;&#xD;&#xA; * How much memory overhead is associated with the standard containers?&#xD;&#xA; * What containers, if any, do dynamic allocations merely by being declared?&#xD;&#xA; * Does std::string do copy-on-write? Short string optimization? Ropes?&#xD;&#xA; * Does std::deque use a ring buffer or is it crap?&#xD;&#xA;" />
  <row Id="34941" PostHistoryTypeId="1" PostId="15409" RevisionGUID="ff71184e-bd17-499d-95bb-49d4923f06fa" CreationDate="2011-07-30T23:22:23.000" UserId="744" Text="Is there any documentation comparing/contrasting C++ standard library implementations?" />
  <row Id="34942" PostHistoryTypeId="3" PostId="15409" RevisionGUID="ff71184e-bd17-499d-95bb-49d4923f06fa" CreationDate="2011-07-30T23:22:23.000" UserId="744" Text="&lt;c++&gt;&lt;performance&gt;&lt;memory-efficiency&gt;" />
  <row Id="34943" PostHistoryTypeId="5" PostId="15389" RevisionGUID="3fbc7165-71b3-4f17-abeb-70bfc67e5428" CreationDate="2011-07-30T23:42:50.903" UserId="8770" Comment="added 5 characters in body" Text="It is very similar to this question: http://gamedev.stackexchange.com/questions/3789/famous-games-written-in-java&#xD;&#xA;&#xD;&#xA;Does anyone know of any popular or famous games only written in C?" />
  <row Id="34944" PostHistoryTypeId="2" PostId="15410" RevisionGUID="0ff04dee-8628-4084-81ee-1a55ce8543f3" CreationDate="2011-07-31T00:04:39.560" UserId="8234" Text="How about using an octree to store the terrain?&#xD;&#xA;&#xD;&#xA;E.g. air = no node, all other terrain types would have a node with the terrain type.&#xD;&#xA;&#xD;&#xA;When inserting/removing nodes, you could check if all eight children of each node on the modified tree path have the same terain type and merge them if needed.&#xD;&#xA;That way, big blocks of the same material would only take up one node." />
  <row Id="34945" PostHistoryTypeId="2" PostId="15411" RevisionGUID="28090fe5-46d4-46fd-b168-619a48b0a4f8" CreationDate="2011-07-31T00:05:43.413" UserId="325" Text="I asked this on [StackOverflow][1], but it might make more sense here:&#xD;&#xA;&#xD;&#xA;Has anyone implemented deferred rendering/shading under OpenGL ES 2.0? It doesn't support MRTs, so with only one color buffer, it's not something that can be implemented in the &quot;usual&quot; manner.&#xD;&#xA;&#xD;&#xA;Specifically, I'm exploring on iPad, iPhone4 (maaaybe iPhone 3gs), and Android. On the GLESView app on iPad/iPhone4/iPhone3gs, the GL_OES_RGB8_RGBA8 extension is present, and I haven't looked too deeply yet, but with 8bits/channel, this idea is interesting: http://www.gamedev.net/topic/562138-opengl-es-20-and-deferred-shading/&#xD;&#xA;&#xD;&#xA;Any other ideas? Is it even worth doing, performance-wise?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/6885756/is-deferred-rendering-shading-possible-with-opengl-es-2-0" />
  <row Id="34946" PostHistoryTypeId="1" PostId="15411" RevisionGUID="28090fe5-46d4-46fd-b168-619a48b0a4f8" CreationDate="2011-07-31T00:05:43.413" UserId="325" Text="Is deferred rendering/shading possible with OpenGL ES 2.0 ?" />
  <row Id="34947" PostHistoryTypeId="3" PostId="15411" RevisionGUID="28090fe5-46d4-46fd-b168-619a48b0a4f8" CreationDate="2011-07-31T00:05:43.413" UserId="325" Text="&lt;android&gt;&lt;ios&gt;&lt;opengl-es2&gt;" />
  <row Id="34948" PostHistoryTypeId="25" PostId="15411" RevisionGUID="a7efc34b-5e61-4b6a-8e4f-e7e733bdae9c" CreationDate="2011-07-31T00:33:57.607" Comment="http://twitter.com/#!/StackGameDev/status/97464983306252288" />
  <row Id="34949" PostHistoryTypeId="2" PostId="15412" RevisionGUID="7a7c29d5-02cb-4cc1-992f-1f0f7606468e" CreationDate="2011-07-31T02:37:27.060" UserId="8770" Text="I've been learning C++ for about a week now (I haven't got through that much) because I'm finding it a very hard to understand most things (maybe because there is so much to it).&#xD;&#xA;&#xD;&#xA;As I've been looking around (on the internet), Ive figured 'Why don't I learn C?' because to me it looks easier, eventhough it doesn't have OOP and isn't used any more as a language to make games in, would it be good for a person finding C++ hard?&#xD;&#xA;&#xD;&#xA;Extra: Plus if C++ was still a good option, would learning C first make C++ easier to understand?" />
  <row Id="34950" PostHistoryTypeId="1" PostId="15412" RevisionGUID="7a7c29d5-02cb-4cc1-992f-1f0f7606468e" CreationDate="2011-07-31T02:37:27.060" UserId="8770" Text="C++ or C for Indie Dev" />
  <row Id="34951" PostHistoryTypeId="3" PostId="15412" RevisionGUID="7a7c29d5-02cb-4cc1-992f-1f0f7606468e" CreationDate="2011-07-31T02:37:27.060" UserId="8770" Text="&lt;c++&gt;&lt;opengl&gt;&lt;game-design&gt;&lt;programming&gt;&lt;c&gt;" />
  <row Id="34953" PostHistoryTypeId="10" PostId="15412" RevisionGUID="3f33cb68-8502-44c3-867a-a26715ce3d9d" CreationDate="2011-07-31T03:12:30.710" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="34954" PostHistoryTypeId="25" PostId="15409" RevisionGUID="3b180373-c3ee-4851-af09-a11d6a2837ec" CreationDate="2011-07-31T03:34:50.223" Comment="http://twitter.com/#!/StackGameDev/status/97510500119740416" />
  <row Id="34955" PostHistoryTypeId="25" PostId="15404" RevisionGUID="6bf5ae81-1a62-4aba-989a-82beb566656e" CreationDate="2011-07-31T06:34:50.350" Comment="http://twitter.com/#!/StackGameDev/status/97555802835001344" />
  <row Id="34961" PostHistoryTypeId="6" PostId="15412" RevisionGUID="41438aab-056c-4010-bd97-ce5119ee9d79" CreationDate="2011-07-31T07:58:19.280" UserId="51" Comment="edited tags" Text="&lt;c++&gt;&lt;programming&gt;&lt;c&gt;" />
  <row Id="34962" PostHistoryTypeId="2" PostId="15413" RevisionGUID="53286b16-d400-4134-b803-24a4075e9bef" CreationDate="2011-07-31T08:51:33.027" UserId="744" Text="In SFML terms, you should be &lt;a href=&quot;http://www.sfml-dev.org/documentation/1.6/classsf_1_1View.php&quot;&gt;changing the active sf::View on your RenderTarget&lt;/a&gt; between rendering the world and the GUI. Your world `View` should be whatever is most convenient for your world rendering and centered on your player position; your UI `View` should be pixels or some standard resolution, rooted at the origin." />
  <row Id="34963" PostHistoryTypeId="25" PostId="15408" RevisionGUID="926decad-5f2d-4ea3-89f9-705d6d4672cc" CreationDate="2011-07-31T09:34:51.157" Comment="http://twitter.com/#!/StackGameDev/status/97601101041385472" />
  <row Id="34964" PostHistoryTypeId="2" PostId="15414" RevisionGUID="34920122-8fbb-4e92-bb23-4afa8d954cf5" CreationDate="2011-07-31T10:30:18.147" UserId="8234" Text="&quot;Design Patterns of Successful Role-Playing Games&quot; is a free (by-nc-sa) ebook dedicated to using the concept of patterns in the design of roleplaying games. &#xD;&#xA;&#xD;&#xA;It is available through http://legendaryquest.netfirms.com/ (last item under 'downloads').&#xD;&#xA;&#xD;&#xA;This tome of information is quite a tough read, but great for easing the design of roleplaying game systems and finding a common base in communication about them.&#xD;&#xA;&#xD;&#xA;The book introduces a diagram language for modelling conflicts/tests in rpg systems visually and contains a bunch of sample diagrams of existing (pen and paper) rpg systems." />
  <row Id="34965" PostHistoryTypeId="2" PostId="15415" RevisionGUID="929bb75a-f9d6-4cd8-beaf-699510e987e9" CreationDate="2011-07-31T11:15:30.713" UserId="1839" Text="In case you don't find such a comparison chart, the alternative is to inject an own allocator to the STL classes in question and add some logging.&#xD;&#xA;&#xD;&#xA;The implementation I tested (VC 8.0) uses no memory allocation just by declaring a string/vector/deque. The string has a short string optimization, since adding 3 chars didn't trigger an allocation. The output is added below the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // basic allocator implementation used from here&#xD;&#xA;    // http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079&#xD;&#xA;    &#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    #include &lt;deque&gt;&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; class my_allocator;&#xD;&#xA;    &#xD;&#xA;    // specialize for void:&#xD;&#xA;    template &lt;&gt; &#xD;&#xA;    class my_allocator&lt;void&gt; &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef void*       pointer;&#xD;&#xA;        typedef const void* const_pointer;&#xD;&#xA;        // reference to void members are impossible.&#xD;&#xA;        typedef void        value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define LOG_ALLOC(call)                 std::cout &lt;&lt; call &lt;&lt; std::endl&#xD;&#xA;    #define LOG_ALLOC_SIZE(call, size)      std::cout &lt;&lt; call &lt;&lt; &quot; &quot; &lt;&lt; size &lt;&lt; &quot; byte&quot; &lt;&lt; std::endl&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; &#xD;&#xA;    class my_allocator &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef size_t    size_type;&#xD;&#xA;        typedef ptrdiff_t difference_type;&#xD;&#xA;        typedef T*        pointer;&#xD;&#xA;        typedef const T*  const_pointer;&#xD;&#xA;        typedef T&amp;        reference;&#xD;&#xA;        typedef const T&amp;  const_reference;&#xD;&#xA;        typedef T         value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        my_allocator() throw() : alloc() {}&#xD;&#xA;        my_allocator(const my_allocator&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;    &#xD;&#xA;        template &lt;class U&gt; my_allocator(const my_allocator&lt;U&gt;&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;        ~my_allocator() throw() {}&#xD;&#xA;    &#xD;&#xA;        pointer       address(reference x) const                    { return alloc.address(x); }&#xD;&#xA;        const_pointer address(const_reference x) const              { return alloc.address(x); }&#xD;&#xA;    &#xD;&#xA;        pointer allocate(size_type s, &#xD;&#xA;                   my_allocator&lt;void&gt;::const_pointer hint = 0)      { LOG_ALLOC_SIZE(&quot;my_allocator::allocate&quot;, s); return alloc.allocate(s, hint); }&#xD;&#xA;        void deallocate(pointer p, size_type n)                     { LOG_ALLOC_SIZE(&quot;my_allocator::deallocate&quot;, n); alloc.deallocate(p, n); }&#xD;&#xA;    &#xD;&#xA;        size_type max_size() const throw()                          { return alloc.max_size(); }&#xD;&#xA;    &#xD;&#xA;        void construct(pointer p, const T&amp; val)                     { LOG_ALLOC(&quot;my_allocator::construct&quot;); alloc.construct(p, val); }&#xD;&#xA;        void destroy(pointer p)                                     { LOG_ALLOC(&quot;my_allocator::destroy&quot;); alloc.destroy(p); }&#xD;&#xA;    &#xD;&#xA;        std::allocator&lt;T&gt; alloc;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;        {&#xD;&#xA;            typedef std::basic_string&lt;char, std::char_traits&lt;char&gt;, my_allocator&lt;char&gt; &gt; my_string;&#xD;&#xA;    &#xD;&#xA;            std::cout &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add 3 chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test = &quot;abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add a huge number of chars chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test += &quot;d df uodfug ondusgp idugnösndögs ifdögsdoiug ösodifugnösdiuödofu odsugöodiu niu od unoudö n nodsu nosfdi un abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string copy = test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string dtors start&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::vector&lt;int, my_allocator&lt;int&gt; &gt; v;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                v.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;vector dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::deque&lt;int, my_allocator&lt;int&gt; &gt; d;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                d.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;deque dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The output for string/vector/deque:&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;    my_allocator::allocate 128 byte&#xD;&#xA;    my_string copy&#xD;&#xA;    my_allocator::allocate 128 byte&#xD;&#xA;    my_string dtors start&#xD;&#xA;    my_allocator::deallocate 128 byte&#xD;&#xA;    my_allocator::deallocate 128 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;    my_allocator::allocate 1 byte&#xD;&#xA;    my_allocator::allocate 2 byte&#xD;&#xA;    my_allocator::deallocate 1 byte&#xD;&#xA;    my_allocator::allocate 3 byte&#xD;&#xA;    my_allocator::deallocate 2 byte&#xD;&#xA;    my_allocator::allocate 4 byte&#xD;&#xA;    my_allocator::deallocate 3 byte&#xD;&#xA;    my_allocator::allocate 6 byte&#xD;&#xA;    my_allocator::deallocate 4 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;    my_allocator::deallocate 6 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;    deque ctor end&#xD;&#xA;    my_allocator::allocate 8 byte&#xD;&#xA;    my_allocator::allocate 4 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::allocate 4 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    deque dtor starts&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 4 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 4 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 8 byte&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34966" PostHistoryTypeId="2" PostId="15416" RevisionGUID="d08f4f01-f9a6-4fae-b51b-166135405fca" CreationDate="2011-07-31T11:36:36.503" UserId="4662" Text="`std::string` does not do copy on write. CoW used to be an optimization, but as soon as multiple threads enter the picture it's beyond a pessimisation- it can slow the code by massive factors. It's so bad that the C++0x Standard actively bans it as an implementation strategy. Not just that, but the permissiveness of `std::string` with dishing out mutable iterators and character references mean that &quot;write&quot; for `std::string` entails almost every operation. &#xD;&#xA;&#xD;&#xA;Short string optimization is about 6 characters, I believe, or something in that region. Ropes are not allowed- `std::string` must store contiguous memory for the `c_str()` function. Technically, you could maintain both a contiguous string and a rope in the same class, but nobody ever did it. Moreover, from what I know of ropes, making them thread-safe to manipulate would be incredibly slow- maybe as bad or worse than CoW.&#xD;&#xA;&#xD;&#xA;No containers do memory allocation by being declared in modern STLs. Node-based containers like list and map used to do so but now they have an embedded end optimization and don't need it. It's common to perform an optimization called &quot;swaptimization&quot; where you swap with an empty container. Consider:&#xD;&#xA;&#xD;&#xA;    std::vector&lt;std::string&gt; MahFunction();&#xD;&#xA;    int main() {&#xD;&#xA;        std::vector&lt;std::string&gt; MahVariable;&#xD;&#xA;        MahFunction().swap(MahVariable);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course, in C++0x this is redundant, but in C++03 then when this was commonly used, if MahVariable allocates memory on declaration then it reduces the effectiveness.&#xD;&#xA;&#xD;&#xA;`deque` uses something referred to as an unrolled linked list. It's basically a list of arrays, usually fixed-size in-node. As such, for most uses, it retains the benefits of both data structures- contiguous access and amortized O(1) removal and being able to add to both front and back *and* better iterator invalidation than `vector`. `deque` can never be implemented by vector because of it's algorithmic complexity and iterator invalidation guarantees.&#xD;&#xA;&#xD;&#xA;How much memory overhead is associated? Well, honestly, that's a bit of a worthless question to ask. The STL containers are designed to be efficient, and if you were to replicate their functionality, you'd either end up with something that performs worse or in the same spot again. By knowing their underlying data structures, you can know the memory overhead they use, give or take, and it'll only be more than that for a good reason, such as small string optimization." />
  <row Id="34967" PostHistoryTypeId="5" PostId="15415" RevisionGUID="c065f1bd-b695-4500-8443-5f2c04c3eda0" CreationDate="2011-07-31T12:59:34.913" UserId="1839" Comment="added 3904 characters in body" Text="In case you don't find such a comparison chart, the alternative is to inject an own allocator to the STL classes in question and add some logging.&#xD;&#xA;&#xD;&#xA;The implementation I tested (VC 8.0) uses no memory allocation just by declaring a string/vector/deque, but for it does list and map. The string has a short string optimization, since adding 3 chars didn't trigger an allocation. The output is added below the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // basic allocator implementation used from here&#xD;&#xA;    // http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079&#xD;&#xA;    &#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    #include &lt;deque&gt;&#xD;&#xA;    #include &lt;list&gt;&#xD;&#xA;    #include &lt;map&gt;&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; class my_allocator;&#xD;&#xA;    &#xD;&#xA;    // specialize for void:&#xD;&#xA;    template &lt;&gt; &#xD;&#xA;    class my_allocator&lt;void&gt; &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef void*       pointer;&#xD;&#xA;        typedef const void* const_pointer;&#xD;&#xA;        // reference to void members are impossible.&#xD;&#xA;        typedef void value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define LOG_ALLOC(call)                 std::cout &lt;&lt; call &lt;&lt; std::endl&#xD;&#xA;    #define LOG_ALLOC_SIZE(call, size)      std::cout &lt;&lt; call &lt;&lt; &quot; &quot; &lt;&lt; size &lt;&lt; &quot; byte&quot; &lt;&lt; std::endl&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; &#xD;&#xA;    class my_allocator &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef size_t    size_type;&#xD;&#xA;        typedef ptrdiff_t difference_type;&#xD;&#xA;        typedef T*        pointer;&#xD;&#xA;        typedef const T*  const_pointer;&#xD;&#xA;        typedef T&amp;        reference;&#xD;&#xA;        typedef const T&amp;  const_reference;&#xD;&#xA;        typedef T         value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        my_allocator() throw() : alloc() {}&#xD;&#xA;        my_allocator(const my_allocator&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;    &#xD;&#xA;        template &lt;class U&gt; my_allocator(const my_allocator&lt;U&gt;&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;        ~my_allocator() throw() {}&#xD;&#xA;    &#xD;&#xA;        pointer       address(reference x) const                    { return alloc.address(x); }&#xD;&#xA;        const_pointer address(const_reference x) const              { return alloc.address(x); }&#xD;&#xA;    &#xD;&#xA;        pointer allocate(size_type s, &#xD;&#xA;                   my_allocator&lt;void&gt;::const_pointer hint = 0)      { LOG_ALLOC_SIZE(&quot;my_allocator::allocate&quot;, s * sizeof(T)); return alloc.allocate(s, hint); }&#xD;&#xA;        void deallocate(pointer p, size_type n)                     { LOG_ALLOC_SIZE(&quot;my_allocator::deallocate&quot;, n * sizeof(T)); alloc.deallocate(p, n); }&#xD;&#xA;    &#xD;&#xA;        size_type max_size() const throw()                          { return alloc.max_size(); }&#xD;&#xA;    &#xD;&#xA;        void construct(pointer p, const T&amp; val)                     { LOG_ALLOC(&quot;my_allocator::construct&quot;); alloc.construct(p, val); }&#xD;&#xA;        void destroy(pointer p)                                     { LOG_ALLOC(&quot;my_allocator::destroy&quot;); alloc.destroy(p); }&#xD;&#xA;    &#xD;&#xA;        std::allocator&lt;T&gt; alloc;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;        {&#xD;&#xA;            typedef std::basic_string&lt;char, std::char_traits&lt;char&gt;, my_allocator&lt;char&gt; &gt; my_string;&#xD;&#xA;    &#xD;&#xA;            std::cout &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add 3 chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test = &quot;abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add a huge number of chars chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test += &quot;d df uodfug ondusgp idugnösndögs ifdögsdoiug ösodifugnösdiuödofu odsugöodiu niu od unoudö n nodsu nosfdi un abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string copy = test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string dtors start&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::vector&lt;int, my_allocator&lt;int&gt; &gt; v;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                v.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;vector dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::deque&lt;int, my_allocator&lt;int&gt; &gt; d;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                d.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;deque dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::list&lt;int, my_allocator&lt;int&gt; &gt; l;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                l.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;list dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::map&lt;int, float, std::less&lt;int&gt;, my_allocator&lt;std::pair&lt;const int, float&gt; &gt; &gt; m;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                std::pair&lt;int, float&gt; a(i, (float)i);&#xD;&#xA;                m.insert(a);&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;map dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The output for string/vector/deque:&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;    my_allocator::allocate 128 byte&#xD;&#xA;    my_string copy&#xD;&#xA;    my_allocator::allocate 128 byte&#xD;&#xA;    my_string dtors start&#xD;&#xA;    my_allocator::deallocate 128 byte&#xD;&#xA;    my_allocator::deallocate 128 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;    my_allocator::allocate 4 byte&#xD;&#xA;    my_allocator::allocate 8 byte&#xD;&#xA;    my_allocator::deallocate 4 byte&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::deallocate 8 byte&#xD;&#xA;    my_allocator::allocate 16 byte&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    my_allocator::deallocate 16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;    deque ctor end&#xD;&#xA;    my_allocator::allocate 32 byte&#xD;&#xA;    my_allocator::allocate 16 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::allocate 16 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    deque dtor starts&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 16 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 16 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;    my_allocator::allocate 12 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    my_allocator::construct&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;    my_allocator::allocate 24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::destroy&#xD;&#xA;    my_allocator::deallocate 24 byte&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34968" PostHistoryTypeId="6" PostId="5483" RevisionGUID="f87a97dd-2c49-4d6b-93ff-b9b925bfce90" CreationDate="2011-07-31T13:24:08.807" UserId="1156" Comment="edited tags" Text="&lt;3d-meshes&gt;&lt;optimization&gt;&lt;voxels&gt;" />
  <row Id="34969" PostHistoryTypeId="5" PostId="15415" RevisionGUID="80d9b0ce-3ffa-4824-949f-4589f0e69896" CreationDate="2011-07-31T13:25:14.923" UserId="1839" Comment="deleted 1429 characters in body" Text="In case you don't find such a comparison chart, the alternative is to inject an own allocator to the STL classes in question and add some logging.&#xD;&#xA;&#xD;&#xA;The implementation I tested (VC 8.0) uses no memory allocation just by declaring a string/vector/deque, but for it does list and map. The string has a short string optimization, since adding 3 chars didn't trigger an allocation. The output is added below the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // basic allocator implementation used from here&#xD;&#xA;    // http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079&#xD;&#xA;    &#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    #include &lt;deque&gt;&#xD;&#xA;    #include &lt;list&gt;&#xD;&#xA;    #include &lt;map&gt;&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; class my_allocator;&#xD;&#xA;    &#xD;&#xA;    // specialize for void:&#xD;&#xA;    template &lt;&gt; &#xD;&#xA;    class my_allocator&lt;void&gt; &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef void*       pointer;&#xD;&#xA;        typedef const void* const_pointer;&#xD;&#xA;        // reference to void members are impossible.&#xD;&#xA;        typedef void value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define LOG_ALLOC_SIZE(call, size)      std::cout &lt;&lt; &quot;  &quot; &lt;&lt; call &lt;&lt; &quot;  &quot; &lt;&lt; std::setw(2) &lt;&lt; size &lt;&lt; &quot; byte&quot; &lt;&lt; std::endl&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; &#xD;&#xA;    class my_allocator &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef size_t    size_type;&#xD;&#xA;        typedef ptrdiff_t difference_type;&#xD;&#xA;        typedef T*        pointer;&#xD;&#xA;        typedef const T*  const_pointer;&#xD;&#xA;        typedef T&amp;        reference;&#xD;&#xA;        typedef const T&amp;  const_reference;&#xD;&#xA;        typedef T         value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        my_allocator() throw() : alloc() {}&#xD;&#xA;        my_allocator(const my_allocator&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;    &#xD;&#xA;        template &lt;class U&gt; my_allocator(const my_allocator&lt;U&gt;&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;        ~my_allocator() throw() {}&#xD;&#xA;    &#xD;&#xA;        pointer       address(reference x) const                    { return alloc.address(x); }&#xD;&#xA;        const_pointer address(const_reference x) const              { return alloc.address(x); }&#xD;&#xA;    &#xD;&#xA;        pointer allocate(size_type s, &#xD;&#xA;                   my_allocator&lt;void&gt;::const_pointer hint = 0)      { LOG_ALLOC_SIZE(&quot;my_allocator::allocate  &quot;, s * sizeof(T)); return alloc.allocate(s, hint); }&#xD;&#xA;        void deallocate(pointer p, size_type n)                     { LOG_ALLOC_SIZE(&quot;my_allocator::deallocate&quot;, n * sizeof(T)); alloc.deallocate(p, n); }&#xD;&#xA;    &#xD;&#xA;        size_type max_size() const throw()                          { return alloc.max_size(); }&#xD;&#xA;    &#xD;&#xA;        void construct(pointer p, const T&amp; val)                     { alloc.construct(p, val); }&#xD;&#xA;        void destroy(pointer p)                                     { alloc.destroy(p); }&#xD;&#xA;    &#xD;&#xA;        std::allocator&lt;T&gt; alloc;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;        &#xD;&#xA;        {&#xD;&#xA;            typedef std::basic_string&lt;char, std::char_traits&lt;char&gt;, my_allocator&lt;char&gt; &gt; my_string;&#xD;&#xA;    &#xD;&#xA;            std::cout &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add 3 chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test = &quot;abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add a huge number of chars chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test += &quot;d df uodfug ondusgp idugnösndögs ifdögsdoiug ösodifugnösdiuödofu odsugöodiu niu od unoudö n nodsu nosfdi un abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string copy = test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string dtors start&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::vector&lt;int, my_allocator&lt;int&gt; &gt; v;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                v.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;vector dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::deque&lt;int, my_allocator&lt;int&gt; &gt; d;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                d.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;deque dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::list&lt;int, my_allocator&lt;int&gt; &gt; l;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                l.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;list dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::map&lt;int, float, std::less&lt;int&gt;, my_allocator&lt;std::pair&lt;const int, float&gt; &gt; &gt; m;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                std::pair&lt;int, float&gt; a(i, (float)i);&#xD;&#xA;                m.insert(a);&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;map dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The output for string/vector/deque/list/map:&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;    deque ctor end&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;    deque dtor starts&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte" />
  <row Id="34970" PostHistoryTypeId="5" PostId="15416" RevisionGUID="3c0582b0-031f-46ab-b213-3a4acffdc484" CreationDate="2011-07-31T13:26:13.713" UserId="4662" Comment="added 152 characters in body" Text="`std::string` does not do copy on write. CoW used to be an optimization, but as soon as multiple threads enter the picture it's beyond a pessimisation- it can slow the code by massive factors. It's so bad that the C++0x Standard actively bans it as an implementation strategy. Not just that, but the permissiveness of `std::string` with dishing out mutable iterators and character references mean that &quot;write&quot; for `std::string` entails almost every operation. &#xD;&#xA;&#xD;&#xA;Short string optimization is about 6 characters, I believe, or something in that region. Ropes are not allowed- `std::string` must store contiguous memory for the `c_str()` function. Technically, you could maintain both a contiguous string and a rope in the same class, but nobody ever did it. Moreover, from what I know of ropes, making them thread-safe to manipulate would be incredibly slow- maybe as bad or worse than CoW.&#xD;&#xA;&#xD;&#xA;No containers do memory allocation by being declared in modern STLs. Node-based containers like list and map used to do so but now they have an embedded end optimization and don't need it. It's common to perform an optimization called &quot;swaptimization&quot; where you swap with an empty container. Consider:&#xD;&#xA;&#xD;&#xA;    std::vector&lt;std::string&gt; MahFunction();&#xD;&#xA;    int main() {&#xD;&#xA;        std::vector&lt;std::string&gt; MahVariable;&#xD;&#xA;        MahFunction().swap(MahVariable);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Of course, in C++0x this is redundant, but in C++03 then when this was commonly used, if MahVariable allocates memory on declaration then it reduces the effectiveness. I know for a fact that this was used for faster reallocations of containers like `vector` in the MSVC9 STL which removed the need to copy the elements.&#xD;&#xA;&#xD;&#xA;`deque` uses something referred to as an unrolled linked list. It's basically a list of arrays, usually fixed-size in-node. As such, for most uses, it retains the benefits of both data structures- contiguous access and amortized O(1) removal and being able to add to both front and back *and* better iterator invalidation than `vector`. `deque` can never be implemented by vector because of it's algorithmic complexity and iterator invalidation guarantees.&#xD;&#xA;&#xD;&#xA;How much memory overhead is associated? Well, honestly, that's a bit of a worthless question to ask. The STL containers are designed to be efficient, and if you were to replicate their functionality, you'd either end up with something that performs worse or in the same spot again. By knowing their underlying data structures, you can know the memory overhead they use, give or take, and it'll only be more than that for a good reason, such as small string optimization." />
  <row Id="34971" PostHistoryTypeId="5" PostId="15415" RevisionGUID="bcf4966b-4802-40b2-a2a6-87bb3cf00e39" CreationDate="2011-07-31T13:30:47.383" UserId="1839" Comment="deleted 10 characters in body" Text="In case you don't find such a comparison chart, the alternative is to inject an own allocator to the STL classes in question and add some logging.&#xD;&#xA;&#xD;&#xA;The implementation I tested (VC 8.0) uses no memory allocation just by declaring a string/vector/deque, but for it does list and map. The string has a short string optimization, since adding 3 chars didn't trigger an allocation. The output is added below the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // basic allocator implementation used from here&#xD;&#xA;    // http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079&#xD;&#xA;    &#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    #include &lt;deque&gt;&#xD;&#xA;    #include &lt;list&gt;&#xD;&#xA;    #include &lt;map&gt;&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; class my_allocator;&#xD;&#xA;    &#xD;&#xA;    // specialize for void:&#xD;&#xA;    template &lt;&gt; &#xD;&#xA;    class my_allocator&lt;void&gt; &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef void*       pointer;&#xD;&#xA;        typedef const void* const_pointer;&#xD;&#xA;        // reference to void members are impossible.&#xD;&#xA;        typedef void value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define LOG_ALLOC_SIZE(call, size)      std::cout &lt;&lt; &quot;  &quot; &lt;&lt; call &lt;&lt; &quot;  &quot; &lt;&lt; std::setw(2) &lt;&lt; size &lt;&lt; &quot; byte&quot; &lt;&lt; std::endl&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; &#xD;&#xA;    class my_allocator &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef size_t    size_type;&#xD;&#xA;        typedef ptrdiff_t difference_type;&#xD;&#xA;        typedef T*        pointer;&#xD;&#xA;        typedef const T*  const_pointer;&#xD;&#xA;        typedef T&amp;        reference;&#xD;&#xA;        typedef const T&amp;  const_reference;&#xD;&#xA;        typedef T         value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        my_allocator() throw() : alloc() {}&#xD;&#xA;        my_allocator(const my_allocator&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;    &#xD;&#xA;        template &lt;class U&gt; my_allocator(const my_allocator&lt;U&gt;&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;        ~my_allocator() throw() {}&#xD;&#xA;    &#xD;&#xA;        pointer       address(reference x) const                    { return alloc.address(x); }&#xD;&#xA;        const_pointer address(const_reference x) const              { return alloc.address(x); }&#xD;&#xA;    &#xD;&#xA;        pointer allocate(size_type s, &#xD;&#xA;                   my_allocator&lt;void&gt;::const_pointer hint = 0)      { LOG_ALLOC_SIZE(&quot;my_allocator::allocate  &quot;, s * sizeof(T)); return alloc.allocate(s, hint); }&#xD;&#xA;        void deallocate(pointer p, size_type n)                     { LOG_ALLOC_SIZE(&quot;my_allocator::deallocate&quot;, n * sizeof(T)); alloc.deallocate(p, n); }&#xD;&#xA;    &#xD;&#xA;        size_type max_size() const throw()                          { return alloc.max_size(); }&#xD;&#xA;    &#xD;&#xA;        void construct(pointer p, const T&amp; val)                     { alloc.construct(p, val); }&#xD;&#xA;        void destroy(pointer p)                                     { alloc.destroy(p); }&#xD;&#xA;    &#xD;&#xA;        std::allocator&lt;T&gt; alloc;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;        {&#xD;&#xA;            typedef std::basic_string&lt;char, std::char_traits&lt;char&gt;, my_allocator&lt;char&gt; &gt; my_string;&#xD;&#xA;    &#xD;&#xA;            std::cout &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add 3 chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test = &quot;abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add a huge number of chars chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test += &quot;d df uodfug ondusgp idugnösndögs ifdögsdoiug ösodifugnösdiuödofu odsugöodiu niu od unoudö n nodsu nosfdi un abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string copy = test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string dtors start&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::vector&lt;int, my_allocator&lt;int&gt; &gt; v;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                v.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;vector dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::deque&lt;int, my_allocator&lt;int&gt; &gt; d;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                d.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;deque dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::list&lt;int, my_allocator&lt;int&gt; &gt; l;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                l.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;list dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::map&lt;int, float, std::less&lt;int&gt;, my_allocator&lt;std::pair&lt;const int, float&gt; &gt; &gt; m;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                std::pair&lt;int, float&gt; a(i, (float)i);&#xD;&#xA;                m.insert(a);&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;map dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The output for string/vector/deque/list/map:&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;    deque ctor end&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;    deque dtor starts&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte" />
  <row Id="34973" PostHistoryTypeId="2" PostId="15417" RevisionGUID="85b13a92-5f5c-417a-963f-935e8cf668ac" CreationDate="2011-07-31T14:13:10.480" UserId="8822" Text="Does cocos2d (iphone) has an action to shake/vibrate an CCSprite?&#xD;&#xA;&#xD;&#xA;Of course that I could build a CCSequence to do it, but I thought that cocos2d maybe could have one.&#xD;&#xA;&#xD;&#xA;TIA,&#xD;&#xA;&#xD;&#xA;Bob" />
  <row Id="34974" PostHistoryTypeId="1" PostId="15417" RevisionGUID="85b13a92-5f5c-417a-963f-935e8cf668ac" CreationDate="2011-07-31T14:13:10.480" UserId="8822" Text="Cocos2d shake action" />
  <row Id="34975" PostHistoryTypeId="3" PostId="15417" RevisionGUID="85b13a92-5f5c-417a-963f-935e8cf668ac" CreationDate="2011-07-31T14:13:10.480" UserId="8822" Text="&lt;cocos2d-iphone&gt;" />
  <row Id="34976" PostHistoryTypeId="2" PostId="15418" RevisionGUID="912df747-50ec-4239-b917-34f247b5ffde" CreationDate="2011-07-31T14:56:26.823" UserId="8275" Text="Short version&#xD;&#xA;---&#xD;&#xA;&gt; Is there a design pattern for distributing vehicle labels in a non-overlapping fashion, placing them as close as possible to the vehicle they refer to? If not, is any of the method I suggest viable? How would you implement this yourself?&#xD;&#xA;&#xD;&#xA;Extended version&#xD;&#xA;---&#xD;&#xA;In the game I'm writing I have a bird-eye vision of my airborne vehicles. I also have next to each of the vehicles a small label with key-data about the vehicle. This is an actual screenshot:&#xD;&#xA;&#xD;&#xA;![Two vehicles with their labels][1]&#xD;&#xA;&#xD;&#xA;Now, since the vehicles could be flying at different altitudes, their icons could overlap. However I would like to never have their labels overlapping (or a label from vehicle 'A' overlap the icon of vehicle 'B').&#xD;&#xA;&#xD;&#xA;Currently, I can detect collisions between sprites and **I simply push away the offending label in a direction opposite to the otherwise-overlapped sprite**. This works in most situations, but when the airspace get crowded, **the label can get pushed very far away** from its vehicle, even if there was an alternate &quot;smarter&quot; alternative. For example I get:&#xD;&#xA;&#xD;&#xA;      B - label&#xD;&#xA;    A -----------label&#xD;&#xA;      C - label&#xD;&#xA;&#xD;&#xA;where it would be better (= label closer to the vehicle) to get:&#xD;&#xA;&#xD;&#xA;              B - label&#xD;&#xA;    label - A&#xD;&#xA;              C - label&#xD;&#xA;&#xD;&#xA;**I have two ideas on how to improve the present situation, but before spending time implementing them, I thought to turn to the community for advice (after all it seems like a &quot;common enough problem&quot; that a design pattern for it could exist).**&#xD;&#xA;&#xD;&#xA;For what it's worth, here's the two ideas I was thinking to:&#xD;&#xA;&#xD;&#xA;**Slot-isation of label space**&#xD;&#xA;&#xD;&#xA;In this scenario I would divide all the screen into &quot;slots&quot; for the labels. Then, each vehicle would always have its label placed in the closest empty one (empty = no other sprites at that location.&#xD;&#xA;&#xD;&#xA;**Spiralling search**&#xD;&#xA;&#xD;&#xA;From the location of the vehicle on the screen, I would try to place the label at increasing angles and then at increasing radiuses, until a non-overlapping location is found. Something down the line of:&#xD;&#xA;&#xD;&#xA;    try 0°, 10px&#xD;&#xA;    try 10°, 10px&#xD;&#xA;    try 20°, 10px&#xD;&#xA;    ...&#xD;&#xA;    try 350°, 10px&#xD;&#xA;    try 0°, 20px&#xD;&#xA;    try 10°, 20px&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/usKSS.png" />
  <row Id="34977" PostHistoryTypeId="1" PostId="15418" RevisionGUID="912df747-50ec-4239-b917-34f247b5ffde" CreationDate="2011-07-31T14:56:26.823" UserId="8275" Text="Algorithm for spreading labels in a visually appealing and intuitive way" />
  <row Id="34978" PostHistoryTypeId="3" PostId="15418" RevisionGUID="912df747-50ec-4239-b917-34f247b5ffde" CreationDate="2011-07-31T14:56:26.823" UserId="8275" Text="&lt;algorithm&gt;&lt;sprites&gt;&lt;language-agnostic&gt;&lt;labels&gt;&lt;collision-avoidance&gt;" />
  <row Id="34979" PostHistoryTypeId="5" PostId="15415" RevisionGUID="9d32ba34-c189-4fda-96ce-b40b508ab180" CreationDate="2011-07-31T15:14:10.040" UserId="1839" Comment="added 3860 characters in body" Text="In case you don't find such a comparison chart, the alternative is to inject an own allocator to the STL classes in question and add some logging.&#xD;&#xA;&#xD;&#xA;The implementation I tested (VC 8.0) uses no memory allocation just by declaring a string/vector/deque, but for it does list and map. The string has a short string optimization, since adding 3 chars didn't trigger an allocation. The output is added below the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // basic allocator implementation used from here&#xD;&#xA;    // http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079&#xD;&#xA;    &#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    #include &lt;deque&gt;&#xD;&#xA;    #include &lt;list&gt;&#xD;&#xA;    #include &lt;map&gt;&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; class my_allocator;&#xD;&#xA;    &#xD;&#xA;    // specialize for void:&#xD;&#xA;    template &lt;&gt; &#xD;&#xA;    class my_allocator&lt;void&gt; &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef void*       pointer;&#xD;&#xA;        typedef const void* const_pointer;&#xD;&#xA;        // reference to void members are impossible.&#xD;&#xA;        typedef void value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define LOG_ALLOC_SIZE(call, size)      std::cout &lt;&lt; &quot;  &quot; &lt;&lt; call &lt;&lt; &quot;  &quot; &lt;&lt; std::setw(2) &lt;&lt; size &lt;&lt; &quot; byte&quot; &lt;&lt; std::endl&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; &#xD;&#xA;    class my_allocator &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef size_t    size_type;&#xD;&#xA;        typedef ptrdiff_t difference_type;&#xD;&#xA;        typedef T*        pointer;&#xD;&#xA;        typedef const T*  const_pointer;&#xD;&#xA;        typedef T&amp;        reference;&#xD;&#xA;        typedef const T&amp;  const_reference;&#xD;&#xA;        typedef T         value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        my_allocator() throw() : alloc() {}&#xD;&#xA;        my_allocator(const my_allocator&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;    &#xD;&#xA;        template &lt;class U&gt; my_allocator(const my_allocator&lt;U&gt;&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;        ~my_allocator() throw() {}&#xD;&#xA;    &#xD;&#xA;        pointer       address(reference x) const                    { return alloc.address(x); }&#xD;&#xA;        const_pointer address(const_reference x) const              { return alloc.address(x); }&#xD;&#xA;    &#xD;&#xA;        pointer allocate(size_type s, &#xD;&#xA;                   my_allocator&lt;void&gt;::const_pointer hint = 0)      { LOG_ALLOC_SIZE(&quot;my_allocator::allocate  &quot;, s * sizeof(T)); return alloc.allocate(s, hint); }&#xD;&#xA;        void deallocate(pointer p, size_type n)                     { LOG_ALLOC_SIZE(&quot;my_allocator::deallocate&quot;, n * sizeof(T)); alloc.deallocate(p, n); }&#xD;&#xA;    &#xD;&#xA;        size_type max_size() const throw()                          { return alloc.max_size(); }&#xD;&#xA;    &#xD;&#xA;        void construct(pointer p, const T&amp; val)                     { alloc.construct(p, val); }&#xD;&#xA;        void destroy(pointer p)                                     { alloc.destroy(p); }&#xD;&#xA;    &#xD;&#xA;        std::allocator&lt;T&gt; alloc;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;        &#xD;&#xA;        {&#xD;&#xA;            typedef std::basic_string&lt;char, std::char_traits&lt;char&gt;, my_allocator&lt;char&gt; &gt; my_string;&#xD;&#xA;    &#xD;&#xA;            std::cout &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add 3 chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test = &quot;abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add a huge number of chars chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test += &quot;d df uodfug ondusgp idugnösndögs ifdögsdoiug ösodifugnösdiuödofu odsugöodiu niu od unoudö n nodsu nosfdi un abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string copy = test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy on write test&quot; &lt;&lt; std::endl;&#xD;&#xA;            copy[3] = 'X';&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string dtors start&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::vector&lt;int, my_allocator&lt;int&gt; &gt; v;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                v.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;vector dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::deque&lt;int, my_allocator&lt;int&gt; &gt; d;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;deque insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                d.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;deque insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;deque dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::list&lt;int, my_allocator&lt;int&gt; &gt; l;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                l.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;list dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::map&lt;int, float, std::less&lt;int&gt;, my_allocator&lt;std::pair&lt;const int, float&gt; &gt; &gt; m;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                std::pair&lt;int, float&gt; a(i, (float)i);&#xD;&#xA;                m.insert(a);&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;map dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So far VC8 and STLPort 5.2 tested, here is the comparison&#xD;&#xA;(included in test: string, vector, deque, list, map)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                        Allocation on declare   Overhead List Node      Overhead Map Node&#xD;&#xA;    &#xD;&#xA;    VC8                 map, list               8 Byte                  16 Byte&#xD;&#xA;    STLPort 5.2 (VC8)   deque                   8 Byte                  16 Byte&#xD;&#xA;&#xD;&#xA;VC8 output string/vector/deque/list/map:&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string copy on write test&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;    deque ctor end&#xD;&#xA;    deque insert start&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;    deque insert end&#xD;&#xA;    deque dtor starts&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;&#xD;&#xA;STLPort 5.2. output compiled with VC8&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    115 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    115 byte&#xD;&#xA;    my_string copy on write test&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  115 byte&#xD;&#xA;      my_allocator::deallocate  115 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::deallocate   0 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    deque ctor end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque dtor starts&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="34980" PostHistoryTypeId="2" PostId="15419" RevisionGUID="d272bbe7-fe1d-4922-b355-b4031dc27de8" CreationDate="2011-07-31T15:24:32.193" UserId="2933" Text="I'm having some problem figuring out how the character in my game should be moved relative to the control.&#xD;&#xA;&#xD;&#xA;Given the nature of the games art direction the best 'look' it can have must be very fluid, but fluid movement comes at the cost of control.&#xD;&#xA;&#xD;&#xA;I've recorded and uploaded the following videos demonstrating various kinds of movement:&#xD;&#xA;&#xD;&#xA;http://jabberworx.net/movea.wmv&#xD;&#xA;&#xD;&#xA;http://jabberworx.net/moveb.wmv&#xD;&#xA;&#xD;&#xA;http://jabberworx.net/movec.wmv&#xD;&#xA;&#xD;&#xA;a and c uses forces and movement damping while b sets the linear velocity and iterates towards it linearly. I think b has the tightest control but it looks a bit mechanical and therefore off...&#xD;&#xA;&#xD;&#xA;What do you guys think? Any suggestions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Oh and I've also been working on weapons, &#xD;&#xA;&#xD;&#xA;http://jabberworx.net/vid1.wmv&#xD;&#xA;&#xD;&#xA;http://jabberworx.net/vid2.wmv&#xD;&#xA;&#xD;&#xA;Any ideas for interesting weapons?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;(yes I know I'm using aquarias art work for tiled edges, my artist hasn't gotten around to doing those tiles yet and I'm hopeless with that sort of thing, I just wanted to make sure the code drawing the art was correct. It should go without saying that the final game won't have art from other games in it)." />
  <row Id="34981" PostHistoryTypeId="1" PostId="15419" RevisionGUID="d272bbe7-fe1d-4922-b355-b4031dc27de8" CreationDate="2011-07-31T15:24:32.193" UserId="2933" Text="Movement - smoothness vs. control problem" />
  <row Id="34982" PostHistoryTypeId="3" PostId="15419" RevisionGUID="d272bbe7-fe1d-4922-b355-b4031dc27de8" CreationDate="2011-07-31T15:24:32.193" UserId="2933" Text="&lt;game-design&gt;&lt;movement&gt;&lt;design&gt;" />
  <row Id="34983" PostHistoryTypeId="25" PostId="15399" RevisionGUID="a9d8cfa9-a7c9-43ad-9de3-02da8f0a0376" CreationDate="2011-07-31T15:34:50.893" Comment="http://twitter.com/#!/StackGameDev/status/97691698062307328" />
  <row Id="34987" PostHistoryTypeId="5" PostId="15417" RevisionGUID="7be62238-6352-4996-b31c-c6b16fc9de82" CreationDate="2011-07-31T15:37:57.320" UserId="8822" Comment="improved description" Text="Does cocos2d (iphone) has an action to shake/vibrate an CCSprite?&#xD;&#xA;&#xD;&#xA;Of course that I could build a CCSequence to do it, but I thought that cocos2d maybe could have one.&#xD;&#xA;&#xD;&#xA;TIA,&#xD;&#xA;&#xD;&#xA;Bob&#xD;&#xA;&#xD;&#xA;EDIT: I found CCShaky3D. It is what I was looking for. But, I didnt liked it. The shake effect is to much smooth. I am trying to reproduce the effect of an earthquake, so, my idea is to have something more brute/raw... Sorry if I am not able to express myself. English isnt my primary language." />
  <row Id="34989" PostHistoryTypeId="5" PostId="15418" RevisionGUID="5fb5466c-3b61-42b3-9ddf-d20943627968" CreationDate="2011-07-31T16:07:41.490" UserId="744" Comment="If the short version is enough to answer the question, that should be the only part. If it's not, it just makes the long version longer." Text="In the game I'm writing I have a bird-eye vision of my airborne vehicles. I also have next to each of the vehicles a small label with key-data about the vehicle. This is an actual screenshot:&#xD;&#xA;&#xD;&#xA;![Two vehicles with their labels][1]&#xD;&#xA;&#xD;&#xA;Now, since the vehicles could be flying at different altitudes, their icons could overlap. However I would like to never have their labels overlapping (or a label from vehicle 'A' overlap the icon of vehicle 'B').&#xD;&#xA;&#xD;&#xA;Currently, I can detect collisions between sprites and **I simply push away the offending label in a direction opposite to the otherwise-overlapped sprite**. This works in most situations, but when the airspace get crowded, **the label can get pushed very far away** from its vehicle, even if there was an alternate &quot;smarter&quot; alternative. For example I get:&#xD;&#xA;&#xD;&#xA;      B - label&#xD;&#xA;    A -----------label&#xD;&#xA;      C - label&#xD;&#xA;&#xD;&#xA;where it would be better (= label closer to the vehicle) to get:&#xD;&#xA;&#xD;&#xA;              B - label&#xD;&#xA;    label - A&#xD;&#xA;              C - label&#xD;&#xA;&#xD;&#xA;**I have two ideas on how to improve the present situation, but before spending time implementing them, I thought to turn to the community for advice (after all it seems like a &quot;common enough problem&quot; that a design pattern for it could exist).**&#xD;&#xA;&#xD;&#xA;For what it's worth, here's the two ideas I was thinking to:&#xD;&#xA;&#xD;&#xA;**Slot-isation of label space**&#xD;&#xA;&#xD;&#xA;In this scenario I would divide all the screen into &quot;slots&quot; for the labels. Then, each vehicle would always have its label placed in the closest empty one (empty = no other sprites at that location.&#xD;&#xA;&#xD;&#xA;**Spiralling search**&#xD;&#xA;&#xD;&#xA;From the location of the vehicle on the screen, I would try to place the label at increasing angles and then at increasing radiuses, until a non-overlapping location is found. Something down the line of:&#xD;&#xA;&#xD;&#xA;    try 0°, 10px&#xD;&#xA;    try 10°, 10px&#xD;&#xA;    try 20°, 10px&#xD;&#xA;    ...&#xD;&#xA;    try 350°, 10px&#xD;&#xA;    try 0°, 20px&#xD;&#xA;    try 10°, 20px&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/usKSS.png" />
  <row Id="34990" PostHistoryTypeId="5" PostId="15415" RevisionGUID="14d792ab-5723-4307-828b-87f8f0c333fa" CreationDate="2011-07-31T16:09:02.317" UserId="1839" Comment="added 2622 characters in body" Text="In case you don't find such a comparison chart, the alternative is to inject an own allocator to the STL classes in question and add some logging.&#xD;&#xA;&#xD;&#xA;The implementation I tested (VC 8.0) uses no memory allocation just by declaring a string/vector/deque, but for it does list and map. The string has a short string optimization, since adding 3 chars didn't trigger an allocation. The output is added below the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // basic allocator implementation used from here&#xD;&#xA;    // http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079&#xD;&#xA;    &#xD;&#xA;    #include &lt;iostream&gt;&#xD;&#xA;    #include &lt;iomanip&gt;&#xD;&#xA;    #include &lt;string&gt;&#xD;&#xA;    #include &lt;vector&gt;&#xD;&#xA;    #include &lt;deque&gt;&#xD;&#xA;    #include &lt;list&gt;&#xD;&#xA;    #include &lt;map&gt;&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; class my_allocator;&#xD;&#xA;    &#xD;&#xA;    // specialize for void:&#xD;&#xA;    template &lt;&gt; &#xD;&#xA;    class my_allocator&lt;void&gt; &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef void*       pointer;&#xD;&#xA;        typedef const void* const_pointer;&#xD;&#xA;        // reference to void members are impossible.&#xD;&#xA;        typedef void value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #define LOG_ALLOC_SIZE(call, size)      std::cout &lt;&lt; &quot;  &quot; &lt;&lt; call &lt;&lt; &quot;  &quot; &lt;&lt; std::setw(2) &lt;&lt; size &lt;&lt; &quot; byte&quot; &lt;&lt; std::endl&#xD;&#xA;    &#xD;&#xA;    template &lt;class T&gt; &#xD;&#xA;    class my_allocator &#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        typedef size_t    size_type;&#xD;&#xA;        typedef ptrdiff_t difference_type;&#xD;&#xA;        typedef T*        pointer;&#xD;&#xA;        typedef const T*  const_pointer;&#xD;&#xA;        typedef T&amp;        reference;&#xD;&#xA;        typedef const T&amp;  const_reference;&#xD;&#xA;        typedef T         value_type;&#xD;&#xA;        template &lt;class U&gt; &#xD;&#xA;        struct rebind &#xD;&#xA;        { &#xD;&#xA;            typedef my_allocator&lt;U&gt; other; &#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        my_allocator() throw() : alloc() {}&#xD;&#xA;        my_allocator(const my_allocator&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;    &#xD;&#xA;        template &lt;class U&gt; my_allocator(const my_allocator&lt;U&gt;&amp;b) throw() : alloc(b.alloc) {}&#xD;&#xA;        ~my_allocator() throw() {}&#xD;&#xA;    &#xD;&#xA;        pointer       address(reference x) const                    { return alloc.address(x); }&#xD;&#xA;        const_pointer address(const_reference x) const              { return alloc.address(x); }&#xD;&#xA;    &#xD;&#xA;        pointer allocate(size_type s, &#xD;&#xA;                   my_allocator&lt;void&gt;::const_pointer hint = 0)      { LOG_ALLOC_SIZE(&quot;my_allocator::allocate  &quot;, s * sizeof(T)); return alloc.allocate(s, hint); }&#xD;&#xA;        void deallocate(pointer p, size_type n)                     { LOG_ALLOC_SIZE(&quot;my_allocator::deallocate&quot;, n * sizeof(T)); alloc.deallocate(p, n); }&#xD;&#xA;    &#xD;&#xA;        size_type max_size() const throw()                          { return alloc.max_size(); }&#xD;&#xA;    &#xD;&#xA;        void construct(pointer p, const T&amp; val)                     { alloc.construct(p, val); }&#xD;&#xA;        void destroy(pointer p)                                     { alloc.destroy(p); }&#xD;&#xA;    &#xD;&#xA;        std::allocator&lt;T&gt; alloc;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    int main(int argc, char *argv[])&#xD;&#xA;    {&#xD;&#xA;        &#xD;&#xA;        {&#xD;&#xA;            typedef std::basic_string&lt;char, std::char_traits&lt;char&gt;, my_allocator&lt;char&gt; &gt; my_string;&#xD;&#xA;    &#xD;&#xA;            std::cout &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add 3 chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test = &quot;abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string add a huge number of chars chars&quot; &lt;&lt; std::endl;&#xD;&#xA;            test += &quot;d df uodfug ondusgp idugnösndögs ifdögsdoiug ösodifugnösdiuödofu odsugöodiu niu od unoudö n nodsu nosfdi un abc&quot;;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy&quot; &lt;&lt; std::endl;&#xD;&#xA;            my_string copy = test;&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string copy on write test&quot; &lt;&lt; std::endl;&#xD;&#xA;            copy[3] = 'X';&#xD;&#xA;            std::cout &lt;&lt; &quot;my_string dtors start&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::vector&lt;int, my_allocator&lt;int&gt; &gt; v;&#xD;&#xA;            std::cout &lt;&lt; &quot;vector ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                v.push_back(i);&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;vector dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::deque&lt;int, my_allocator&lt;int&gt; &gt; d;&#xD;&#xA;            std::cout &lt;&lt; &quot;deque ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;deque insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                d.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;deque insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;deque dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::list&lt;int, my_allocator&lt;int&gt; &gt; l;&#xD;&#xA;            std::cout &lt;&lt; &quot;list ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                l.push_back(i);&#xD;&#xA;                std::cout &lt;&lt; &quot;list insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;list dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        {&#xD;&#xA;            std::cout &lt;&lt; std::endl &lt;&lt; &quot;===============================================&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor start&quot; &lt;&lt; std::endl;&#xD;&#xA;            std::map&lt;int, float, std::less&lt;int&gt;, my_allocator&lt;std::pair&lt;const int, float&gt; &gt; &gt; m;&#xD;&#xA;            std::cout &lt;&lt; &quot;map ctor end&quot; &lt;&lt; std::endl;&#xD;&#xA;            for(int i = 0; i &lt; 5; ++i)&#xD;&#xA;            {&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert start&quot; &lt;&lt; std::endl;&#xD;&#xA;                std::pair&lt;int, float&gt; a(i, (float)i);&#xD;&#xA;                m.insert(a);&#xD;&#xA;                std::cout &lt;&lt; &quot;map insert end&quot; &lt;&lt; std::endl;&#xD;&#xA;            }&#xD;&#xA;            std::cout &lt;&lt; &quot;map dtor starts&quot; &lt;&lt; std::endl;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So far VC8 and STLPort 5.2 tested, here is the comparison&#xD;&#xA;(included in test: string, vector, deque, list, map)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                        Allocation on declare   Overhead List Node      Overhead Map Node&#xD;&#xA;    &#xD;&#xA;    VC8                 map, list               8 Byte                  16 Byte&#xD;&#xA;    STLPort 5.2 (VC8)   deque                   8 Byte                  16 Byte&#xD;&#xA;    Paulhodge's EASTL   (none)                  8 Byte                  16 Byte&#xD;&#xA;&#xD;&#xA;VC8 output string/vector/deque/list/map:&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    my_string copy on write test&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;    deque ctor end&#xD;&#xA;    deque insert start&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;    deque insert end&#xD;&#xA;    deque dtor starts&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;&#xD;&#xA;STLPort 5.2. output compiled with VC8&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    115 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    115 byte&#xD;&#xA;    my_string copy on write test&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  115 byte&#xD;&#xA;      my_allocator::deallocate  115 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::deallocate   0 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    deque ctor start&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::allocate    128 byte&#xD;&#xA;    deque ctor end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque insert start&#xD;&#xA;    deque insert end&#xD;&#xA;    deque dtor starts&#xD;&#xA;      my_allocator::deallocate  128 byte&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[EASTL][1] results, no deque available&#xD;&#xA;&#xD;&#xA;    ===============================================&#xD;&#xA;    my_string ctor start&#xD;&#xA;    my_string ctor end&#xD;&#xA;    my_string add 3 chars&#xD;&#xA;      my_allocator::allocate     9 byte&#xD;&#xA;    my_string add a huge number of chars chars&#xD;&#xA;      my_allocator::allocate    115 byte&#xD;&#xA;      my_allocator::deallocate   9 byte&#xD;&#xA;    my_string copy&#xD;&#xA;      my_allocator::allocate    115 byte&#xD;&#xA;    my_string copy on write test&#xD;&#xA;    my_string dtors start&#xD;&#xA;      my_allocator::deallocate  115 byte&#xD;&#xA;      my_allocator::deallocate  115 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    vector ctor start&#xD;&#xA;    vector ctor end&#xD;&#xA;      my_allocator::allocate     4 byte&#xD;&#xA;      my_allocator::allocate     8 byte&#xD;&#xA;      my_allocator::deallocate   4 byte&#xD;&#xA;      my_allocator::allocate    16 byte&#xD;&#xA;      my_allocator::deallocate   8 byte&#xD;&#xA;      my_allocator::allocate    32 byte&#xD;&#xA;      my_allocator::deallocate  16 byte&#xD;&#xA;    vector dtor starts&#xD;&#xA;      my_allocator::deallocate  32 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    list ctor start&#xD;&#xA;    list ctor end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list insert start&#xD;&#xA;      my_allocator::allocate    12 byte&#xD;&#xA;    list insert end&#xD;&#xA;    list dtor starts&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;      my_allocator::deallocate  12 byte&#xD;&#xA;    &#xD;&#xA;    ===============================================&#xD;&#xA;    map ctor start&#xD;&#xA;    map ctor end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map insert start&#xD;&#xA;      my_allocator::allocate    24 byte&#xD;&#xA;    map insert end&#xD;&#xA;    map dtor starts&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;      my_allocator::deallocate  24 byte&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paulhodge/EASTL#" />
  <row Id="34991" PostHistoryTypeId="2" PostId="15422" RevisionGUID="9707bae3-d029-4fbe-b421-aabefae47a13" CreationDate="2011-07-31T16:42:36.227" UserId="7191" Text="Essentially this issue is similar to a collision avoidance problem. Yes, the planes can fly at different altitudes, but their labels are all at the same &quot;altitude&quot;. &#xD;&#xA;&#xD;&#xA;There are algorithms like [Unaligned Collision Avoidance][1], that would be a step in the right direction for you. Of course for your situation, the labels are &quot;tethered&quot; to their planes, so they have a limited range of movement.&#xD;&#xA;&#xD;&#xA;If you look at [Flocking Behavior][2], you want to implement the first &quot;rule&quot; of flocking: short range repulsion. However, instead of &quot;steering&quot; in the direction that is away from the nearest neighbors, you'll use the &quot;away&quot; vector as the placement location for your label.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The large black circle represents your area of influence, the green circle represents the valid placements for the label, the center green dot is the plane your currently considering, small green dot is the point on the circle chosen for label placement. &#xD;&#xA;&#xD;&#xA;Now the black dots could represent either other labels, or other planes. I'm not sure which one would work best, you may get better avoidance if they were other labels, but I'm not sure. Obviously the &quot;force&quot; arrows are the direction vectors between your current plane and the &quot;objects of influence&quot;. Finally, the box is the label. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So using your example above, I think this would produce something like:&#xD;&#xA;&#xD;&#xA;                - label&#xD;&#xA;               / &#xD;&#xA;              B &#xD;&#xA;    label - A&#xD;&#xA;              C &#xD;&#xA;               \&#xD;&#xA;                - label&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Using this method there are some situations you'll have to make special cases for, like three planes vertically aligned:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;              - label       label -&#xD;&#xA;              |                   |&#xD;&#xA;              B                   B&#xD;&#xA;      label - A                   A - label&#xD;&#xA;              C                   C&#xD;&#xA;              |                   |&#xD;&#xA;              - label       label -&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All three labels could flip flop from right to left, depending on how your have your label corners defined. Basically, you'll just have to watch out for the angles around the circle where your labels can switch which corner they're drawn from: 0, 90, 180, 270.&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I think in the end, this would look kind of neat, watching the labels avoid each other. If it gets too distracting, perhaps you can round to the nearest 10 degrees for less frequent movement.&#xD;&#xA;&#xD;&#xA;Sorry for the weird details, most of this stuff I thought about when I was making a radial menu for my game, but I think in this &quot;dynamic&quot; form it would work pretty well.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/Unaligned.html&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Flocking_%28behavior%29&#xD;&#xA;  [3]: http://i.stack.imgur.com/xLDjs.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/235xr.png" />
  <row Id="34992" PostHistoryTypeId="8" PostId="15418" RevisionGUID="0dd4e5c4-20b8-4ee7-acd3-1faac49b5e08" CreationDate="2011-07-31T16:45:46.917" UserId="8275" Comment="Rollback to [912df747-50ec-4239-b917-34f247b5ffde]" Text="Short version&#xD;&#xA;---&#xD;&#xA;&gt; Is there a design pattern for distributing vehicle labels in a non-overlapping fashion, placing them as close as possible to the vehicle they refer to? If not, is any of the method I suggest viable? How would you implement this yourself?&#xD;&#xA;&#xD;&#xA;Extended version&#xD;&#xA;---&#xD;&#xA;In the game I'm writing I have a bird-eye vision of my airborne vehicles. I also have next to each of the vehicles a small label with key-data about the vehicle. This is an actual screenshot:&#xD;&#xA;&#xD;&#xA;![Two vehicles with their labels][1]&#xD;&#xA;&#xD;&#xA;Now, since the vehicles could be flying at different altitudes, their icons could overlap. However I would like to never have their labels overlapping (or a label from vehicle 'A' overlap the icon of vehicle 'B').&#xD;&#xA;&#xD;&#xA;Currently, I can detect collisions between sprites and **I simply push away the offending label in a direction opposite to the otherwise-overlapped sprite**. This works in most situations, but when the airspace get crowded, **the label can get pushed very far away** from its vehicle, even if there was an alternate &quot;smarter&quot; alternative. For example I get:&#xD;&#xA;&#xD;&#xA;      B - label&#xD;&#xA;    A -----------label&#xD;&#xA;      C - label&#xD;&#xA;&#xD;&#xA;where it would be better (= label closer to the vehicle) to get:&#xD;&#xA;&#xD;&#xA;              B - label&#xD;&#xA;    label - A&#xD;&#xA;              C - label&#xD;&#xA;&#xD;&#xA;**I have two ideas on how to improve the present situation, but before spending time implementing them, I thought to turn to the community for advice (after all it seems like a &quot;common enough problem&quot; that a design pattern for it could exist).**&#xD;&#xA;&#xD;&#xA;For what it's worth, here's the two ideas I was thinking to:&#xD;&#xA;&#xD;&#xA;**Slot-isation of label space**&#xD;&#xA;&#xD;&#xA;In this scenario I would divide all the screen into &quot;slots&quot; for the labels. Then, each vehicle would always have its label placed in the closest empty one (empty = no other sprites at that location.&#xD;&#xA;&#xD;&#xA;**Spiralling search**&#xD;&#xA;&#xD;&#xA;From the location of the vehicle on the screen, I would try to place the label at increasing angles and then at increasing radiuses, until a non-overlapping location is found. Something down the line of:&#xD;&#xA;&#xD;&#xA;    try 0°, 10px&#xD;&#xA;    try 10°, 10px&#xD;&#xA;    try 20°, 10px&#xD;&#xA;    ...&#xD;&#xA;    try 350°, 10px&#xD;&#xA;    try 0°, 20px&#xD;&#xA;    try 10°, 20px&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/usKSS.png" />
  <row Id="34993" PostHistoryTypeId="5" PostId="15418" RevisionGUID="a551f0fa-c95a-4727-bdc5-cd0289ede541" CreationDate="2011-07-31T16:53:59.390" UserId="8275" Comment="added note on presence of other vehicles in the airspace" Text="Short version&#xD;&#xA;---&#xD;&#xA;&gt; Is there a design pattern for distributing vehicle labels in a non-overlapping fashion, placing them as close as possible to the vehicle they refer to? If not, is any of the method I suggest viable? How would you implement this yourself?&#xD;&#xA;&#xD;&#xA;Extended version&#xD;&#xA;---&#xD;&#xA;In the game I'm writing I have a bird-eye vision of my airborne vehicles. I also have next to each of the vehicles a small label with key-data about the vehicle. This is an actual screenshot:&#xD;&#xA;&#xD;&#xA;![Two vehicles with their labels][1]&#xD;&#xA;&#xD;&#xA;Now, since the vehicles could be flying at different altitudes, their icons could overlap. However I would like to never have their labels overlapping (or a label from vehicle 'A' overlap the icon of vehicle 'B').&#xD;&#xA;&#xD;&#xA;Currently, I can detect collisions between sprites and **I simply push away the offending label in a direction opposite to the otherwise-overlapped sprite**. This works in most situations, but when the airspace get crowded, **the label can get pushed very far away** from its vehicle, even if there was an alternate &quot;smarter&quot; alternative. For example I get:&#xD;&#xA;&#xD;&#xA;      B - label&#xD;&#xA;    A -----------label&#xD;&#xA;      C - label&#xD;&#xA;&#xD;&#xA;where it would be better (= label closer to the vehicle) to get:&#xD;&#xA;&#xD;&#xA;              B - label&#xD;&#xA;    label - A&#xD;&#xA;              C - label&#xD;&#xA;&#xD;&#xA;**EDIT:** It also has to be considered that beside the represented overlapping vehicles, there might be additional ones with their labels, and these too must be &quot;safe from overlapping&quot;.&#xD;&#xA;&#xD;&#xA;**I have two ideas on how to improve the present situation, but before spending time implementing them, I thought to turn to the community for advice (after all it seems like a &quot;common enough problem&quot; that a design pattern for it could exist).**&#xD;&#xA;&#xD;&#xA;For what it's worth, here's the two ideas I was thinking to:&#xD;&#xA;&#xD;&#xA;**Slot-isation of label space**&#xD;&#xA;&#xD;&#xA;In this scenario I would divide all the screen into &quot;slots&quot; for the labels. Then, each vehicle would always have its label placed in the closest empty one (empty = no other sprites at that location.&#xD;&#xA;&#xD;&#xA;**Spiralling search**&#xD;&#xA;&#xD;&#xA;From the location of the vehicle on the screen, I would try to place the label at increasing angles and then at increasing radiuses, until a non-overlapping location is found. Something down the line of:&#xD;&#xA;&#xD;&#xA;    try 0°, 10px&#xD;&#xA;    try 10°, 10px&#xD;&#xA;    try 20°, 10px&#xD;&#xA;    ...&#xD;&#xA;    try 350°, 10px&#xD;&#xA;    try 0°, 20px&#xD;&#xA;    try 10°, 20px&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/usKSS.png" />
  <row Id="34996" PostHistoryTypeId="5" PostId="15418" RevisionGUID="0e2b776b-3378-4dc5-bed5-95bfde9901f5" CreationDate="2011-07-31T17:00:59.493" UserId="8275" Comment="added note on presence of other vehicles in the airspace" Text="Short version&#xD;&#xA;---&#xD;&#xA;&gt; Is there a design pattern for distributing vehicle labels in a non-overlapping fashion, placing them as close as possible to the vehicle they refer to? If not, is any of the method I suggest viable? How would you implement this yourself?&#xD;&#xA;&#xD;&#xA;Extended version&#xD;&#xA;---&#xD;&#xA;In the game I'm writing I have a bird-eye vision of my airborne vehicles. I also have next to each of the vehicles a small label with key-data about the vehicle. This is an actual screenshot:&#xD;&#xA;&#xD;&#xA;![Two vehicles with their labels][1]&#xD;&#xA;&#xD;&#xA;Now, since the vehicles could be flying at different altitudes, their icons could overlap. However I would like to never have their labels overlapping (or a label from vehicle 'A' overlap the icon of vehicle 'B').&#xD;&#xA;&#xD;&#xA;Currently, I can detect collisions between sprites and **I simply push away the offending label in a direction opposite to the otherwise-overlapped sprite**. This works in most situations, but when the airspace get crowded, **the label can get pushed very far away** from its vehicle, even if there was an alternate &quot;smarter&quot; alternative. For example I get:&#xD;&#xA;&#xD;&#xA;      B - label&#xD;&#xA;    A -----------label&#xD;&#xA;      C - label&#xD;&#xA;&#xD;&#xA;where it would be better (= label closer to the vehicle) to get:&#xD;&#xA;&#xD;&#xA;              B - label&#xD;&#xA;    label - A&#xD;&#xA;              C - label&#xD;&#xA;&#xD;&#xA;**EDIT:** It also has to be considered that beside the overlapping vehicles case, there might be other configurations in which vehicles'labels could overlap (the ASCII-art examples show for example three very close vehicles in which the label of `A` would overlap the icon of `B` and `C`).&#xD;&#xA;&#xD;&#xA;**I have two ideas on how to improve the present situation, but before spending time implementing them, I thought to turn to the community for advice (after all it seems like a &quot;common enough problem&quot; that a design pattern for it could exist).**&#xD;&#xA;&#xD;&#xA;For what it's worth, here's the two ideas I was thinking to:&#xD;&#xA;&#xD;&#xA;**Slot-isation of label space**&#xD;&#xA;&#xD;&#xA;In this scenario I would divide all the screen into &quot;slots&quot; for the labels. Then, each vehicle would always have its label placed in the closest empty one (empty = no other sprites at that location.&#xD;&#xA;&#xD;&#xA;**Spiralling search**&#xD;&#xA;&#xD;&#xA;From the location of the vehicle on the screen, I would try to place the label at increasing angles and then at increasing radiuses, until a non-overlapping location is found. Something down the line of:&#xD;&#xA;&#xD;&#xA;    try 0°, 10px&#xD;&#xA;    try 10°, 10px&#xD;&#xA;    try 20°, 10px&#xD;&#xA;    ...&#xD;&#xA;    try 350°, 10px&#xD;&#xA;    try 0°, 20px&#xD;&#xA;    try 10°, 20px&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/usKSS.png" />
  <row Id="34997" PostHistoryTypeId="2" PostId="15423" RevisionGUID="88715286-ee61-4f0f-8c33-161bc4973328" CreationDate="2011-07-31T17:25:56.817" UserId="7328" Text="as far as I can remember you'll always have less than 10,000 units a game. there is no game I can remember with more than that number, although empire earth could go up to 14000 trough a hack but no one will ever get to that point. so just having a static array of 10,000 objects seems to be more than needed.&#xD;&#xA;&#xD;&#xA;as you know iterating over 10000 objects is no big deal but it may consume a lot of time if your algorithm run slower than O(n). for example if you try checking every two object for collision detection it will take O(n^2) time which means a lot of time. so you have to break your algorithms somehow. let's review a sample algorithm for every thing that I can think of right now:&#xD;&#xA;&#xD;&#xA;1. collision detection: for every collision detection algorithm you have to check every two objects but you can eliminate some checking starting the loops. as I suggested in the comments you can use same algorithm given for [this question](http://gamedev.stackexchange.com/q/14369/7328). there is no need to use multiple threads or anything, even with one thread and 4 regions you'll reduce your checkings from n*(n-1) to 4 * (n/4)*((n-1)/4), and by optimizing the number of regions you can get even better results. I think by using best number regions you can even get to O(n*log(n)).&#xD;&#xA;&#xD;&#xA;2. you have to generate path for each moving object. the usual system i've seen so far is a very simple thing: whenever player commands units to move somewhere computer calculates it's path, after that in every cycle if the object can move it moves if it can't it skips that cycle. there is nothing special. although you can also change the algorithms given [here](http://gamedev.stackexchange.com/questions/12826/best-pathfinding-algorithm-for-a-tower-defense-game) to reduce you path finding calls and have real time pathfinding for each group of units but that's really not needed.&#xD;&#xA;&#xD;&#xA;3. you have to check if some bullet or bomb or similar thing hits one of the units : you can use same regions you created for collision detection here.&#xD;&#xA;&#xD;&#xA;4. for selecting units you can also use same regions.&#xD;&#xA;&#xD;&#xA;in general I would suggest using an static array (or a dynamic array with reserved size) of 10,000 or 20,000 at most. then use something around 10 or 15 loops each one iterating over all the units. that is a real big array containing all the units from all players. so each index have both data about unit owner and unit type. you cal also create some other arrays for each player. in each index of these secondary array you'll just have to store pointers to objects in main array.&#xD;&#xA;&#xD;&#xA;if you have any other questions put comments to add them to my answer.&#xD;&#xA;" />
  <row Id="35001" PostHistoryTypeId="25" PostId="15418" RevisionGUID="bbe4a52e-2582-4712-b489-29693e3ef375" CreationDate="2011-07-31T18:34:50.683" Comment="http://twitter.com/#!/StackGameDev/status/97736997006880768" />
  <row Id="35002" PostHistoryTypeId="2" PostId="15425" RevisionGUID="67e6797c-9f4e-4619-a8aa-4c4b25181d2a" CreationDate="2011-07-31T19:16:47.437" UserId="4546" Text="If we first consider the simple case of having two images that as a whole fades from one image in a seamless fashion into the other image, this would be cheapest to express as drawing a quad with a pixel shader.&#xD;&#xA;&#xD;&#xA;This shader would have a float shader parameter you set from your code in the range of [0,1]. You can then bind and sample your two textures and [lerp](http://msdn.microsoft.com/en-us/library/bb509618%28v=vs.85%29.aspx) between them based on this constant factor.&#xD;&#xA;&#xD;&#xA;A value of 0.0 would represent 100% of the first image, a value of 1.0 would be 100% of the second image, 0.25 would be a quarter of the first and three quarters of the second, and so on.&#xD;&#xA;&#xD;&#xA;You can then use additional textures to alter the value of this interpolation parameter, like:&#xD;&#xA;&#xD;&#xA; - you could a grayscale texture which could act as an offset to this parameter,&#xD;&#xA; - you could use the parameter to index inside a 3D texture or a texture array which would represent your wipe,&#xD;&#xA; - you could use the parameter to translate the texture coordinates used to sample a gradient texture, so that the static gradient band appears to move across your image.&#xD;&#xA; - you could do something entirely else - with programmable shaders your imagination is the only limit (barring shader complexity limits from the shader model, of course)." />
  <row Id="35003" PostHistoryTypeId="4" PostId="15408" RevisionGUID="132e7ad3-3eac-4823-8aeb-6e7f755770f4" CreationDate="2011-07-31T19:47:33.237" UserId="3830" Comment="spelling" Text="Manage a large number of independent actors in real-time" />
  <row Id="35004" PostHistoryTypeId="2" PostId="15426" RevisionGUID="079a834f-43a1-4fe6-adf9-016196ee51c4" CreationDate="2011-07-31T20:05:18.487" UserId="4546" Text="There are two distinct things to consider when measuring and optimizing the performance of such a large-scale system of entities.&#xD;&#xA;&#xD;&#xA;At the low level, you have the physical representation of your entities which tends to boil down to using efficient storage layouts like SoA (structs of arrays) to reduce the cost of iterating and updating all the active entities.&#xD;&#xA;&#xD;&#xA;At the higher level, you have decision making logic, general game logic, AI and pathfinding. These are all tasks that have in common that they do not have to run at the same update rate as your rendering does.&#xD;&#xA;&#xD;&#xA;As you would get an uneven frame time if you take the naive approach of just doing those tasks every N frames, it tends to be beneficial to amortize the cost over several frames.&#xD;&#xA;&#xD;&#xA;If the task is incremental in nature, you could run part of the algorithm every frame and use partial results in your updates.&#xD;&#xA;&#xD;&#xA;If the task is largely monolithic but separable per entity, you could perform that task for a subset of your game entities per frame, rotating among them in a round-robin fashion. This has the benefit of reducing the complexity of things like pathfinding and AI, as you don't have everyone trying to act at once.&#xD;&#xA;&#xD;&#xA;In the large-scale tactical RTS I worked on, we focused on having robust data structures for querying the low-level representation in the high-level algorithms, for finding the neighbours of game entities. The low level update process acted on intents provided by the slow-updating high-level simulation, and in the end boiled down to a cheap particle simulation, scaling up well into the thousands." />
  <row Id="35005" PostHistoryTypeId="2" PostId="15427" RevisionGUID="94baae84-2ea8-40c5-a988-ec8237d87e56" CreationDate="2011-07-31T20:15:18.453" UserId="8240" Text="Yes, it is possible. However, it isn't particularly worthwhile.&#xD;&#xA;&#xD;&#xA;First, unless you have access to the NV_draw_buffers extension (as the name implies, it is NVIDIA-only. So unless you're running on Tegra, you don't have it), framebuffer objects under ES 2.0 can only render to *one* image at a time. So to generate your G-buffers, you will need to render your scene multiple times, thus taking away one of the advantages of deferred rendering.&#xD;&#xA;&#xD;&#xA;Second, bandwidth on mobile platforms is not the same as you would get even on mid-grade GPUs. And bandwidth is critical to making deferred rendering (for many lights) worthwhile. Without that bandwidth, the light passes are really going to hurt, performance-wise.&#xD;&#xA;&#xD;&#xA;Third, PowerVR hardware is really not designed for this kind of thing. It optimizes rendering with its tile-based rendering hardware. So deferred rendering on top of that would be less helpful than in a traditional scan-conversion architecture." />
  <row Id="35006" PostHistoryTypeId="2" PostId="15428" RevisionGUID="46b0b9fb-aadf-4d67-a5aa-5eff2c8e1dcc" CreationDate="2011-07-31T21:31:39.020" UserId="721" Text="The main problem is Fillrate. On mobile GPUs, your fill rate is low that you can't do Deferred shading in realtime at native resolution.&#xD;&#xA;&#xD;&#xA;On iPhone 4 &amp; iPad 1, fillrate is just ridiculous. The only device IOS with good fillrate is iPad 2, but i doubt there is enough... On android, only Tegra devices have the GL_NV_draw_buffers to use MRT but fillrate is very low too. The Mali 400 seems to have the best fillrate. If you want cry, just try to fill a color rectangle at fullscreen resolution 4 times... Many devices can't do it 60 fps. &#xD;&#xA;&#xD;&#xA;On desktop GPUs, you have 10 times (or more) fillrate as mobile gpus. Don't forget that mobile GPUs use the same memory as CPU and you don't have dedicated memory.&#xD;&#xA;&#xD;&#xA;There are some examples in WebGL (same API) so that isn't a limitation of the API." />
  <row Id="35008" PostHistoryTypeId="2" PostId="15429" RevisionGUID="4aa587d7-45ab-48e9-b896-705ef109871d" CreationDate="2011-07-31T22:23:51.320" UserId="8973" Text="For me the easiest way to start testing a code base which doesn't have any tests, is to test bugs. When a you discover a bug, the first thing to do is write a test to reproduce it, then fix the bug to make the test pass. &#xD;&#xA;&#xD;&#xA;Other low-hangers are classes which contain logic or data. If you're using the MVC pattern, test your domain models first, and then your controllers. Its often easiest to do this while re-factoring, because you will probably need to make changes to the classes to make them testable (using Dependency Injection and Single Responsibility principles).&#xD;&#xA;&#xD;&#xA;For code which is not using patterns, see where re-factoring to a pattern might help, then approach it in a test-driven manner. Write tests for the structure you would like to have, then port your code into that structure to make the tests pass. At the very least, create a façade to act as an organised API over the spaghetti code. Write tests to develop the façade, then after it's working, write integration tests to get it working with your current code. You can then re-factor or re-write the spaghetti code without impacting the rest of the system.&#xD;&#xA;&#xD;&#xA;Testing client-server-interaction is also a big pay-off, as it is usually the most fragile code because it interacts asynchronously with a foreign data set. Start at very coarse granularity. So first test that the client-server operations happen in the expected order. Then write tests to ensure that the data is sent and received in the correct format, then test how it breaks when used in unexpected ways. Write tests to call operations out of order, pass invalid data, etc. In FlexUnit you can use `[Test(expects=&quot;Error&quot;)]` when you are testing conditions that are expected to throw exceptions. You can also use `[Test(async)] ` in conjunction with the `Async` methods to test asynchronous operations. &#xD;&#xA;&#xD;&#xA;Testing third-party code can also pay off for two reasons: firstly it provides documentation by example and use cases for the library, and also indicates compatibility with other versions of the library.&#xD;&#xA;&#xD;&#xA;The trick with writing ad-hoc tests (as with all re-factoring) is to do it in small steps, one line at a time until you have covered a method, then a method at a time until you have covered a class, then a class at a time until you have covered the entire library.&#xD;&#xA;&#xD;&#xA;Another tip to keep in mind, is to test behaviour, or rather test what the code does, not how it does it. So if you have collision detection code, test that it returns a positive result and depth vector for overlapping objects, and negative results for non-overlapping objects. You don't need to test the actual algorithm which provides these results, just that the correct results are returned. You may test specific optimisations in the algorithm, but keep these separate from the main test code in case you change the algorithm later. &#xD;&#xA;&#xD;&#xA;After you have written tests to cover the functionality in the code, then test edge cases (array lower and upper indexes, maximum and minimum numbers of sprites, level locations, inventory items, quest items). If you have combinations of items or quests, simulate testing them in all possible combinations using paramaterized tests in FlexUnit (use the Paramaterized test runner).&#xD;&#xA;&#xD;&#xA;Performance is important with a game engine While FlexUnit does provide times for each test, it comes with quite a large overhead. For this reason it is probably better to write your own framework for testing performance. It doesn't need to be complicated, it can be a simple class which calls a set of methods in order, measuring the time taken to run each function.&#xD;&#xA;&#xD;&#xA;A useful tool to have is an automatic game-play script. Either hand-roll or record a game sequence, then play it back and verify the game state at each frame. This can be especially useful when optimising to measure speed increases.&#xD;&#xA;&#xD;&#xA;The hardest code to test is visual and audio, as it requires some sort of signal processing to validate, and the resulting tests are usually fragile. Steer away from these initially, and do them last (if at all).&#xD;&#xA;&#xD;&#xA;[http://www.flexunit.org/?page_id=6][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flexunit.org/?page_id=6" />
  <row Id="35009" PostHistoryTypeId="5" PostId="14529" RevisionGUID="78e63b67-11a8-463c-add3-7759bb6397ef" CreationDate="2011-07-31T22:53:09.660" UserId="1198" Comment="added 1 characters in body" Text="Unit testing is hard. Since this is probably your first foray into testing, let me share some points with you from my years of experience:&#xD;&#xA;&#xD;&#xA;- Not everything is testable, nor easy to test, nor worth testing.&#xD;&#xA;- Tests, like code, need to be maintained and updated as the app changes.&#xD;&#xA;- If nobody is running tests, or keeping them up to date, you might as well not test.&#xD;&#xA;&#xD;&#xA;Having said that, the easy, low-hanging fruit are your plain classes -- classes with simple methods and properties. Call methods and verify that the state of your classes are as expected -- that's the easiest unit testing.&#xD;&#xA;&#xD;&#xA;Beyond this, it gets hard. Hudson/Maven integrate, but I'm not sure about with FlexUnit.&#xD;&#xA;&#xD;&#xA;My experience with testing is that over time, you get things done faster because you have a safety net -- you can risk bigger changes because you know if it broken.&#xD;&#xA;&#xD;&#xA;This is probably not the answer you want, but it's good advice-type information that I feel you need to know :)" />
  <row Id="35010" PostHistoryTypeId="25" PostId="15380" RevisionGUID="3da49b6b-eee7-4f22-933a-70bdc16cb138" CreationDate="2011-08-01T00:34:51.607" Comment="http://twitter.com/#!/StackGameDev/status/97827597685235712" />
  <row Id="35011" PostHistoryTypeId="2" PostId="15430" RevisionGUID="49af1251-6ec1-41ce-a128-69b6b11884f5" CreationDate="2011-08-01T02:05:15.040" UserId="6390" Text="I'm currently having issues with depth textures. When I sample from a depth texture it causes my other samplers to fail. For example, when I set gl_FragColor manually the depth buffer is correct. I can also sample from my Albedo and Lighting textures and composite an image but I then have to set gl_FragDepth manually. Could this be a hardware issue?&#xD;&#xA;&#xD;&#xA;I'm creating my FBOs like this:&#xD;&#xA;&#xD;&#xA;    glGenFramebuffers(1, &amp;m_glFBO);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_glFBO);&#xD;&#xA;    &#xD;&#xA;    glGenTextures(1, &amp;m_glDepth);&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, m_glDepth);&#xD;&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, Width, Height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;    glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, m_glDepth, 0);&#xD;&#xA;    &#xD;&#xA;    glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_Texture.m_glID, 0);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);&#xD;&#xA;&#xD;&#xA;I then bind to them and draw scene. Their individual depth buffers are correct (and linear).&#xD;&#xA;&#xD;&#xA;    #version 120&#xD;&#xA;    &#xD;&#xA;    uniform sampler2D Albedo;&#xD;&#xA;    uniform sampler2D Lights;&#xD;&#xA;    uniform sampler2D Depth;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    	vec4 AlbedoColor, LightsColor;&#xD;&#xA;    	AlbedoColor = texture2D(Albedo, gl_TexCoord[0].st);&#xD;&#xA;    	LightsColor = texture2D(Lights, gl_TexCoord[0].st);&#xD;&#xA;    	&#xD;&#xA;    	// Just by sampling from the depth texture my shader screws up (nothing shows up)&#xD;&#xA;    	// float d = texture2D(Depth, gl_TexCoord[0].st).r;&#xD;&#xA;    	&#xD;&#xA;    	gl_FragColor = AlbedoColor * vec4(LightsColor.rgb + LightsColor.rgb * LightsColor.a, 1.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I then create composite my final image in the backbuffer.&#xD;&#xA;&#xD;&#xA;![The desired result but w/ depth information][1]&#xD;&#xA;&#xD;&#xA;I should be getting this but with depth information.&#xD;&#xA;&#xD;&#xA;Thanks ahead of time!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/3oz6g.png" />
  <row Id="35012" PostHistoryTypeId="1" PostId="15430" RevisionGUID="49af1251-6ec1-41ce-a128-69b6b11884f5" CreationDate="2011-08-01T02:05:15.040" UserId="6390" Text="Sampling from depth texture causes shader to stop working" />
  <row Id="35013" PostHistoryTypeId="3" PostId="15430" RevisionGUID="49af1251-6ec1-41ce-a128-69b6b11884f5" CreationDate="2011-08-01T02:05:15.040" UserId="6390" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;depth-buffer&gt;" />
  <row Id="35014" PostHistoryTypeId="2" PostId="15431" RevisionGUID="7bdc18e6-4f94-4524-987a-eed2c809e1fe" CreationDate="2011-08-01T02:24:29.890" UserId="8974" Text="I'm trying to get a basic shader to work in XNA. I pass in a bool value called &quot;TextureEnabled&quot; to indicate whether or not it should expect some UV texture coordinates. But regardless of what I pass, it is always expecting the UV value, and it throws and InvalidOperationException -&quot;TextureCoordinate0 is missing&quot;:&#xD;&#xA;&#xD;&#xA;    VertexShaderOutput VertexShaderFunction(VertexShaderInput input)&#xD;&#xA;    {&#xD;&#xA;	VertexShaderOutput output;&#xD;&#xA;	&#xD;&#xA;	float4 worldPosition = mul(input.Position, World);&#xD;&#xA;	float4x4 viewProjection = mul(View, Projection);&#xD;&#xA;	output.Position = mul(worldPosition, viewProjection);&#xD;&#xA;&#xD;&#xA;	if (TextureEnabled == true)&#xD;&#xA;	{&#xD;&#xA;		output.UV = input.UV; //**// always executes**&#xD;&#xA;	}&#xD;&#xA;	else&#xD;&#xA;	{&#xD;&#xA;		output.UV = float2(1, 0);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	return output;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Here's the declaration at the top of the effect file:&#xD;&#xA;&#xD;&#xA;    float4x4 World;&#xD;&#xA;    float4x4 View;&#xD;&#xA;    float4x4 Projection;&#xD;&#xA;    texture BasicTexture;&#xD;&#xA;    bool TextureEnabled = false;&#xD;&#xA;&#xD;&#xA;I'm even setting the effect parameter in my XNA Draw() method:&#xD;&#xA;&#xD;&#xA;    paramName = &quot;TextureEnabled&quot;;&#xD;&#xA;    effect.Parameters[paramName].SetValue(false);&#xD;&#xA;&#xD;&#xA;If I just hard-code output.UV = float2(1, 0) instead of output.UV = input.UV, it does not throw an exception, so I know that has to be the problem. Its almost like the TextureEnabled variable isn't getting set up (or not evaluated), even though I can see SetValue(false) being called in the debugger. What am I doing wrong?" />
  <row Id="35015" PostHistoryTypeId="1" PostId="15431" RevisionGUID="7bdc18e6-4f94-4524-987a-eed2c809e1fe" CreationDate="2011-08-01T02:24:29.890" UserId="8974" Text="How to properly set up XNA shader?" />
  <row Id="35016" PostHistoryTypeId="3" PostId="15431" RevisionGUID="7bdc18e6-4f94-4524-987a-eed2c809e1fe" CreationDate="2011-08-01T02:24:29.890" UserId="8974" Text="&lt;xna&gt;&lt;shaders&gt;" />
  <row Id="35017" PostHistoryTypeId="5" PostId="15431" RevisionGUID="f8bfbf14-ffa4-4dc5-8c07-d830e3eea248" CreationDate="2011-08-01T02:36:39.427" UserId="8974" Comment="added 90 characters in body" Text="I'm trying to get a basic shader to work in XNA. I pass in a bool value called &quot;TextureEnabled&quot; to indicate whether or not it should expect some UV texture coordinates. But regardless of what I pass, it is always expecting the UV value, and it throws and InvalidOperationException -&quot;TextureCoordinate0 is missing&quot;:&#xD;&#xA;&#xD;&#xA;    VertexShaderOutput VertexShaderFunction(VertexShaderInput input)&#xD;&#xA;    {&#xD;&#xA;	VertexShaderOutput output;&#xD;&#xA;	&#xD;&#xA;	float4 worldPosition = mul(input.Position, World);&#xD;&#xA;	float4x4 viewProjection = mul(View, Projection);&#xD;&#xA;	output.Position = mul(worldPosition, viewProjection);&#xD;&#xA;&#xD;&#xA;	if (TextureEnabled == true)&#xD;&#xA;	{&#xD;&#xA;		output.UV = input.UV; //**// always executes**&#xD;&#xA;	}&#xD;&#xA;	else&#xD;&#xA;	{&#xD;&#xA;		output.UV = float2(1, 0);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	return output;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Here's the declaration at the top of the effect file:&#xD;&#xA;&#xD;&#xA;    float4x4 World;&#xD;&#xA;    float4x4 View;&#xD;&#xA;    float4x4 Projection;&#xD;&#xA;    texture BasicTexture;&#xD;&#xA;    bool TextureEnabled = false;&#xD;&#xA;&#xD;&#xA;I'm even setting the effect parameter in my XNA Draw() method:&#xD;&#xA;&#xD;&#xA;    paramName = &quot;TextureEnabled&quot;;&#xD;&#xA;    effect.Parameters[paramName].SetValue(false);&#xD;&#xA;&#xD;&#xA;If I just hard-code output.UV = float2(1, 0) instead of output.UV = input.UV, it does not throw an exception, so I know that has to be the problem. Its almost like the TextureEnabled variable isn't getting set up (or not evaluated), even though I can see SetValue(false) being called in the debugger. What am I doing wrong?&#xD;&#xA;&#xD;&#xA;Here's the relevant source files, if needed: http://www.mediafire.com/?g85tc5d9582vs8g" />
  <row Id="35018" PostHistoryTypeId="25" PostId="15354" RevisionGUID="3e212030-281c-47a4-b298-e2d04bac91d7" CreationDate="2011-08-01T03:35:38.187" Comment="http://twitter.com/#!/StackGameDev/status/97873091870457856" />
  <row Id="35019" PostHistoryTypeId="2" PostId="15432" RevisionGUID="3088af06-d903-4970-9b6f-931a0f93c956" CreationDate="2011-08-01T04:01:38.160" UserId="3990" Text="If it's in the vertex shader's input structure the shader needs it in the vertex stream, whether you use it or not. XNA is enforcing that.&#xD;&#xA;&#xD;&#xA;You're implementing optional texturing improperly. If you do it this way, you'll need to supply texture coordinates always. Also, branching is still to be avoided.&#xD;&#xA;&#xD;&#xA;Instead, have two techniques, referencing two different vertex shaders, with two different input structures. One input structure has texture coordinates, the other does not. Then, choose the correct technique for drawing. You don't need to have a 'texture enabled' constant in your shader at all." />
  <row Id="35020" PostHistoryTypeId="6" PostId="15302" RevisionGUID="86e46181-71a7-42f3-9acd-50edac7e1db3" CreationDate="2011-08-01T04:28:49.443" UserId="2698" Comment="edited tags" Text="&lt;2d&gt;&lt;programming&gt;&lt;algorithm&gt;&lt;rendering&gt;&lt;polygon&gt;" />
  <row Id="35021" PostHistoryTypeId="5" PostId="15430" RevisionGUID="b2e0d34f-6959-4f25-9f1e-fc507f054194" CreationDate="2011-08-01T04:54:25.537" UserId="6390" Comment="deleted 7 characters in body" Text="I'm currently having issues with depth textures. When I sample from a depth texture it causes my other samplers to fail. For example, when I set gl_FragColor manually the depth buffer is correct. I can also sample from my Albedo and Lighting textures and composite an image but I then have to set gl_FragDepth manually. Could this be a hardware issue?&#xD;&#xA;&#xD;&#xA;I'm creating my FBOs like this:&#xD;&#xA;&#xD;&#xA;    glGenFramebuffers(1, &amp;m_glFBO);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_glFBO);&#xD;&#xA;    &#xD;&#xA;    glGenTextures(1, &amp;m_glDepth);&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, m_glDepth);&#xD;&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, Width, Height, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;    glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, m_glDepth, 0);&#xD;&#xA;    &#xD;&#xA;    glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_Texture.m_glID, 0);&#xD;&#xA;    glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);&#xD;&#xA;&#xD;&#xA;I then bind to them and draw scene. Their individual depth buffers are correct (and linear).&#xD;&#xA;&#xD;&#xA;    #version 120&#xD;&#xA;    &#xD;&#xA;    uniform sampler2D Albedo;&#xD;&#xA;    uniform sampler2D Lights;&#xD;&#xA;    uniform sampler2D Depth;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    	vec4 AlbedoColor, LightsColor;&#xD;&#xA;    	AlbedoColor = texture2D(Albedo, gl_TexCoord[0].st);&#xD;&#xA;    	LightsColor = texture2D(Lights, gl_TexCoord[0].st);&#xD;&#xA;    	&#xD;&#xA;    	// Just by sampling from the depth texture my shader screws up (nothing shows up)&#xD;&#xA;    	// float d = texture2D(Depth, gl_TexCoord[0].st).r;&#xD;&#xA;    	&#xD;&#xA;    	gl_FragColor = AlbedoColor * vec4(LightsColor.rgb + LightsColor.rgb * LightsColor.a, 1.0);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I then composite my final image in the backbuffer.&#xD;&#xA;&#xD;&#xA;![The desired result but w/ depth information][1]&#xD;&#xA;&#xD;&#xA;I should be getting this but with depth information.&#xD;&#xA;&#xD;&#xA;Thanks ahead of time!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/3oz6g.png" />
  <row Id="35022" PostHistoryTypeId="25" PostId="15431" RevisionGUID="424c2789-7cb4-44a0-b675-845dae3640a1" CreationDate="2011-08-01T06:35:38.733" Comment="http://twitter.com/#!/StackGameDev/status/97918393218379776" />
  <row Id="35023" PostHistoryTypeId="2" PostId="15433" RevisionGUID="0d11bc3f-5067-4ba9-8ad3-df74d970faa3" CreationDate="2011-08-01T08:14:06.657" UserId="6908" Text="I'm writing a platform game which uses SDL for the main graphics code. There is a chance that I may be using OpenGL for the rendering at a later stage, so answers could relate to either.&#xD;&#xA;&#xD;&#xA;I'm needing a good method to include vector animations (such as a starting video) within the game.&#xD;&#xA;&#xD;&#xA;Being a platform game, I would prefer to limit the dependents and size of the data. This rules out using Theora as the resulting vector animations would be needlessly lossy and overly large compared to the rest of the content. Flash sounds like an OK option, however it is finicky to embed (or even use) on non-windows platforms, and requires significant amounts of dependencies.&#xD;&#xA;&#xD;&#xA;My idea is to use HTML5 animations, rendered by Gecko (the embeddable Firefox rendering engine) or WebKit (the Chrome rendering engine) in SDL, or rendered to an OpenGL surface in SDL. Quite simply - is this feasable? Are there any other examples as to how I should embed it? Is there a better (read: smaller and simpler) solution?" />
  <row Id="35024" PostHistoryTypeId="1" PostId="15433" RevisionGUID="0d11bc3f-5067-4ba9-8ad3-df74d970faa3" CreationDate="2011-08-01T08:14:06.657" UserId="6908" Text="SDL (or OpenGL), HTML5, Gecko and vector movies" />
  <row Id="35025" PostHistoryTypeId="3" PostId="15433" RevisionGUID="0d11bc3f-5067-4ba9-8ad3-df74d970faa3" CreationDate="2011-08-01T08:14:06.657" UserId="6908" Text="&lt;c++&gt;&lt;opengl&gt;&lt;html5&gt;&lt;sdl&gt;" />
  <row Id="35026" PostHistoryTypeId="2" PostId="15434" RevisionGUID="2c3d3cfe-b329-4ef8-bd71-06dd49dee03e" CreationDate="2011-08-01T08:32:43.213" UserId="8770" Text="I believe that there are tutorials for opengl 1.x and 2.x, but there most likely won't be tutorials showing how they are different with features or ease of use etc.&#xD;&#xA;&#xD;&#xA;It might be best to search up tutorials for the specific opengl version, find similar tutorials and compare them yourself." />
  <row Id="35027" PostHistoryTypeId="2" PostId="15435" RevisionGUID="2bca2b58-aa93-4ca7-8847-0719b9f2a33c" CreationDate="2011-08-01T08:37:23.853" UserId="8981" Text="I am learning OpenGL ES and I have setup the environment. I believe the best way to learn things is to grab a dummy project and start working on it. So what I plan to do is...&#xD;&#xA;&#xD;&#xA;Have a look at this image [goo.gl/8vN4R][1]&#xD;&#xA;&#xD;&#xA;Now I want this parachute to be created in OpenGL ES with sparkling effect at its tip. The sparkling effect must be shiny and animating like it's really sparkling. And the whole parachute would be moving down from top of the screen slowly and slightly fluctuating its position.&#xD;&#xA;&#xD;&#xA;Please tell me if this is what I can do using OpenGL ES or I should use some other framework for fast development.&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/8vN4R" />
  <row Id="35028" PostHistoryTypeId="1" PostId="15435" RevisionGUID="2bca2b58-aa93-4ca7-8847-0719b9f2a33c" CreationDate="2011-08-01T08:37:23.853" UserId="8981" Text="Can OpenGL ES halp in this game" />
  <row Id="35029" PostHistoryTypeId="3" PostId="15435" RevisionGUID="2bca2b58-aa93-4ca7-8847-0719b9f2a33c" CreationDate="2011-08-01T08:37:23.853" UserId="8981" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;effects&gt;" />
  <row Id="35030" PostHistoryTypeId="2" PostId="15436" RevisionGUID="14b7f17a-c089-4fc1-831a-23a2463285f3" CreationDate="2011-08-01T09:11:22.923" UserId="8240" Text="OpenGL versions, by and large, are *not* like Direct3D versions. Your old code still works with the new versions (with one exception). Therefore, OpenGL v1.4 will function just fine under OpenGL 2.1. OpenGL versions are additions, not subtractions.&#xD;&#xA;&#xD;&#xA;OpenGL 2.0 and 2.1 add shaders, in the OpenGL Shading Language. They also add several other features, like floating-point textures, non-power-of-two textures, and so forth. The full list is available in the [OpenGL 2.1 specification][1] itself. Just look at the &quot;Version&quot; sections; they will tell you what changed from the previous version.&#xD;&#xA;&#xD;&#xA;The only exception to the rule about API changes is OpenGL 3.1 (yes, 3.1, not 3.0). In OpenGL 3.0, a number of APIs were designated as &quot;deprecated&quot;. This means that the ARB, the committee in charge of OpenGL, could remove these functions from later versions. This removal happened in OpenGL 3.1. The 3.0 specification has a big list of deprecated stuff in it, and the 3.1 spec is trimmed down accordingly.&#xD;&#xA;&#xD;&#xA;Note that you don't have to care (at least on Windows and Linux. MacOSX is different). You can run just fine in &quot;[compatibility][2]&quot; mode, where all of the previously removed features return. Implementations of OpenGL don't have to support compatibility contexts (and Mac OS X Lion doesn't. It supports either 2.1 or 3.2 core, at you request), but all of them still do. Just for backwards compatibility with older applications.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/registry/doc/glspec21.20061201.pdf&#xD;&#xA;  [2]: http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts" />
  <row Id="35031" PostHistoryTypeId="25" PostId="15430" RevisionGUID="22f9d1f1-9313-4bd2-8352-e28412d4e2dd" CreationDate="2011-08-01T09:35:38.917" Comment="http://twitter.com/#!/StackGameDev/status/97963691768692736" />
  <row Id="35032" PostHistoryTypeId="2" PostId="15437" RevisionGUID="e2a29d7b-6d14-4f25-b952-fa667d7bf685" CreationDate="2011-08-01T09:40:45.680" UserId="741" Text="A C# tool is your friend here - you can quickly write something using the .NET System.Xml framework which iterates over the input file, spots parts you don't like, and eliminates (or tweaks) them from the document before writing it back out again. Effectively that's what XSLT does, but in practice I've always found it to be easier to write C# code to describe the transformation than to find the cryptic XSLT syntax to do the same thing.&#xD;&#xA;&#xD;&#xA;What you need to do is look at the 'bad' cases and spot what they have in common. For example if all of the diffuse techniques which have a texture which uses texcoord=&quot;CHANNEL0&quot;, that's easy to find. You just iterate all objects, and for each object, check all of its techniques for the offending attribute. If you don't find it, add the node to an output document and move on. If you don't recognise the node, add it to the output and move on. If you do find it, don't bother to add it to the output document and it will effectively be deleted.&#xD;&#xA;&#xD;&#xA;Spotting duplicate polygons is a little trickier however, since you'd have to analyse each pair of polygons for equivalence. Would be much simpler if you could decide on a rule, such as &quot;I don't care about flat colored polygons, only textured polygons&quot;, then you can just discard the appropriate polygons.&#xD;&#xA;&#xD;&#xA;However it seems very odd to me that you're actually getting duplicates out; duplication of geometry is a big no-no for obvious reasons, so I'm surprised FBX would do that. I've only ever used Collada with Maya/Max, so couldn't vouch for what FBX produces. But I'd ask, are you super doubly sure that there really isn't duplicate geometry in there in the FBX file?" />
  <row Id="35033" PostHistoryTypeId="2" PostId="15438" RevisionGUID="d716be78-1620-4f5d-b60a-181a192d92b9" CreationDate="2011-08-01T10:04:06.970" UserId="4546" Text="As you're using OpenGL as the underlying graphics technology it is beneficial to think of the problem in terms of what OpenGL is good at.&#xD;&#xA;&#xD;&#xA;As with any other 3D API, the focus is primarily on fast transformation and rasterisation of primitives like triangle, often with texture maps and in some cases programmable shaders.&#xD;&#xA;&#xD;&#xA;Your scenario can be modeled in two parts:&#xD;&#xA; - draw a 2D quad (or pair of triangles) which you translate and rotate according to the way you want it to move;&#xD;&#xA; - the sparkling effect can be a set of quads with an animated texture or which rotate in place to give local motion to things.&#xD;&#xA;&#xD;&#xA;Another approach for the &quot;sparkling&quot; could be to have a particle system attached which sends off sparks and particles into the air." />
  <row Id="35037" PostHistoryTypeId="6" PostId="15433" RevisionGUID="2e6e75c0-d8b1-4d50-b281-63856727eb0f" CreationDate="2011-08-01T10:33:29.593" UserId="1386" Comment="edited tags" Text="&lt;c++&gt;&lt;opengl&gt;&lt;html5&gt;&lt;sdl&gt;&lt;gecko&gt;" />
  <row Id="35039" PostHistoryTypeId="5" PostId="15417" RevisionGUID="59fa24bc-700b-4f3e-bef3-49f532b3e5f1" CreationDate="2011-08-01T12:17:15.037" UserId="20" Comment="improved title, improved grammar and formatting a bit" Text="Does cocos2d (iPhone) have an action/animation to shake/vibrate a `CCSprite`?&#xD;&#xA;&#xD;&#xA;Of course I could build a `CCSequence` to do that, but I thought that cocos2d may already have such an animation implemented.&#xD;&#xA;&#xD;&#xA;**EDIT:** I found `CCShaky3D`. It is almost what I was looking for, but, I didn't like it. The shake effect is too smooth. I am trying to reproduce the effect of an earthquake, so my idea is to have something more brute/raw... " />
  <row Id="35040" PostHistoryTypeId="4" PostId="15417" RevisionGUID="59fa24bc-700b-4f3e-bef3-49f532b3e5f1" CreationDate="2011-08-01T12:17:15.037" UserId="20" Comment="improved title, improved grammar and formatting a bit" Text="How to animate a Cocos2d sprite in a shake-like motion (earthquake)?" />
  <row Id="35041" PostHistoryTypeId="6" PostId="15417" RevisionGUID="59fa24bc-700b-4f3e-bef3-49f532b3e5f1" CreationDate="2011-08-01T12:17:15.037" UserId="20" Comment="improved title, improved grammar and formatting a bit" Text="&lt;animation&gt;&lt;cocos2d-iphone&gt;" />
  <row Id="35042" PostHistoryTypeId="2" PostId="15440" RevisionGUID="4071a877-6770-4f93-9634-96cbb4a837dc" CreationDate="2011-08-01T12:30:27.947" UserId="8770" Text="Also, Battlefield Heroes, the cartoony version of battlefield" />
  <row Id="35043" PostHistoryTypeId="16" PostId="15440" RevisionGUID="3bf9dbfe-c95c-4717-89ed-e75332e970bd" CreationDate="2011-08-01T12:30:27.947" UserId="8770" />
  <row Id="35044" PostHistoryTypeId="25" PostId="15435" RevisionGUID="9982c154-e21e-4600-9ce9-19af4065187c" CreationDate="2011-08-01T12:35:38.987" Comment="http://twitter.com/#!/StackGameDev/status/98008990885232640" />
  <row Id="35048" PostHistoryTypeId="2" PostId="15442" RevisionGUID="1d78d739-2523-4347-8be3-3dee62b52347" CreationDate="2011-08-01T13:29:58.720" UserId="1375" Text="I have a number of questions relating to using a 2D physics engine in a platform game, but one main one that I'm grappling with at the moment.  I managed to somewhat integrate the [Physics2D.Net][1] engine into a [Scrolling Game Development Kit 2][2] project.  I'm very pleased with the performance and the realism of the physics.  However, I've lost some things that my original SGDK2 physics engine (oriented more specifically to platform games) made easier:&#xD;&#xA;&#xD;&#xA; 1. Riding on a platform is very difficult now.  This is my main question.  It's not difficult to implement, but difficult to play.  Assuming I even do manage to get the player onto a platform (which is hard enough in itself), as soon as the platform moves, the player falls off because there's not enough friction between the player and the platform or something.  Do I just need to tweak things like friction, inertia, linear velocity dampening and the like to make it easier to ride on a platform, or is there something fundamentally difficult about riding on platform is the &quot;real&quot; world?  I've tried reducing the force applied to the platform that makes it move (so it would allow more time for the rider to match the platform's velocity), but then that's not enough force to keep the rider aloft, and the platform sinks to the ground.  I'm simply applying forces to move the platform.&#xD;&#xA; 2. What is the best way to stop the platform from rotating?  I've tried setting the Angular momentum and the angular position to 0 on each frame, but this can result in little twitches that cause anything on the platform to spring into the air a bit, just long enough to fall off.&#xD;&#xA; 3. Running along the ground: How do most platform games with realistic 2D physics implement the player?  My player is currently a square, but will often tumble and spring into the air due to friction hitting one of the corners.  My guess is that the player should be a circle and always drawn upright.  Is this standard practice, or is there another way?  If I use a circle I expect that riding a platform will be even more difficult!  The player will roll right off.  I'm thinking of Little Big Planet, which also seemed to keep the player on the ground pretty well.  Do I just have to put a lot of velocity damping on the player, or something like that, if I want to keep them grounded too?&#xD;&#xA; 4. Since SGDK2 is a tile-based engine/IDE, I have writen code that analyzes all the shapes of the terrain/tiles and turns them into physics bodies with infinite mass (merging them horizontally, but not vertically where appropriate; merging two directions was too difficult for me to figure out because I couldn't figure out how to trace and represent the hole in a torus-like formation).  Is that a good way for a platform game to implement something for the sprites to interact with to represent the solid ground?  Am I better off turning each tile into a physics body (few simple shapes, many bodies and internal surfaces between tiles), or merging them as I am doing (fewer bodies, but more shapes that are more complex)?&#xD;&#xA; 5. I'm having a hard time figuring out the optimal vertex subdivision level and grid spacing to use.  I don't really understand these concepts and documentation on Pysics2D.Net is sparse to non-existent as far as I can tell.  I am generally subdividing to about 6 and using a grid spacing of about the same.  My sprites and tiles are mostly 32x32 units (pixels), all square for the moment.&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/physics2d/&#xD;&#xA;  [2]: http://sgdk2.sf.net/" />
  <row Id="35049" PostHistoryTypeId="1" PostId="15442" RevisionGUID="1d78d739-2523-4347-8be3-3dee62b52347" CreationDate="2011-08-01T13:29:58.720" UserId="1375" Text="2D Physics Engine for Platform Games - Riding on a Platform" />
  <row Id="35050" PostHistoryTypeId="3" PostId="15442" RevisionGUID="1d78d739-2523-4347-8be3-3dee62b52347" CreationDate="2011-08-01T13:29:58.720" UserId="1375" Text="&lt;2d&gt;&lt;c#&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;game-mechanics&gt;" />
  <row Id="35051" PostHistoryTypeId="2" PostId="15443" RevisionGUID="994fe1f2-f405-45e8-acf7-1b7e06a8fbb6" CreationDate="2011-08-01T13:39:01.817" UserId="6098" Text="I originally posted this question on stack overflow, but realised it might be better here. The original question can be found [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a pixel shader &quot;preProc&quot; which processes my vertices and saves three textures of data. One for per-pixel normals, one for per-pixel position data and one for color (which I'm currently setting as black).&#xD;&#xA;&#xD;&#xA;I then later use these textures in a postprocessing shader in order to implement Screen Space Ambient Occlusion, however it seems none of the data is getting saved in the first shader.&#xD;&#xA;&#xD;&#xA;Here's my pixel shader:&#xD;&#xA;&#xD;&#xA;    PS_OUT PS( PS_IN input )&#xD;&#xA;    {&#xD;&#xA;    	PS_OUT output;&#xD;&#xA;    	output.col = float4(0,0,0,0);&#xD;&#xA;    	output.norm = float4(input.norm,1);&#xD;&#xA;    	output.pos = input.pos;&#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;which outputs the following struct:&#xD;&#xA;&#xD;&#xA;    struct PS_OUT&#xD;&#xA;    {&#xD;&#xA;    	float4 col : SV_TARGET0;&#xD;&#xA;    	float4 norm : SV_TARGET1;&#xD;&#xA;    	float4 pos : SV_TARGET2;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;and takes the following struct for input:&#xD;&#xA;&#xD;&#xA;    struct PS_IN&#xD;&#xA;    {&#xD;&#xA;        float4 pos : SV_POSITION;&#xD;&#xA;    	float2 tex : TEXCOORD0;&#xD;&#xA;    	float3 norm : TEXCOORD1;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;My post processing shader simply outputs the colour I set in my preShader, which should be black. However when I run the code I get a light blue, which is the colour I reset my render targets to when I clear them. If I change the pixelshader to instead sample the randomTex texture (which my code previously loaded from a file and is not from a render target) everything is rendered fine, so I am confident it is not my post processing shader.&#xD;&#xA;&#xD;&#xA;In case it's my slimDX code that's failing here's what I do:&#xD;&#xA;&#xD;&#xA;Creating my textures, shaderresourvecviews and rendertargetviews:&#xD;&#xA;&#xD;&#xA;    Texture2DDescription textureDescription = new Texture2DDescription()&#xD;&#xA;                    {&#xD;&#xA;                        Width=texWidth,&#xD;&#xA;                        Height=texHeight,&#xD;&#xA;                        MipLevels=1,&#xD;&#xA;                        ArraySize=3,&#xD;&#xA;                        Format=SlimDX.DXGI.Format.R32G32B32A32_Float,&#xD;&#xA;                        SampleDescription = new SlimDX.DXGI.SampleDescription(1,0),&#xD;&#xA;                        BindFlags = BindFlags.RenderTarget | BindFlags.ShaderResource,&#xD;&#xA;                        CpuAccessFlags= CpuAccessFlags.None,&#xD;&#xA;                        OptionFlags = ResourceOptionFlags.None,&#xD;&#xA;                        Usage= ResourceUsage.Default,&#xD;&#xA;                    };&#xD;&#xA;                texture = new Texture2D(device, textureDescription);&#xD;&#xA;    &#xD;&#xA;                renderTargetView = new RenderTargetView[3];&#xD;&#xA;                shaderResourceView = new ShaderResourceView[3];&#xD;&#xA;    &#xD;&#xA;                for (int i = 0; i &lt; 3; i++)&#xD;&#xA;                {&#xD;&#xA;                    RenderTargetViewDescription renderTargetViewDescription = new RenderTargetViewDescription()&#xD;&#xA;                        {&#xD;&#xA;                            Format = textureDescription.Format,&#xD;&#xA;                            Dimension = RenderTargetViewDimension.Texture2D,&#xD;&#xA;                            MipSlice = 0,&#xD;&#xA;                        };&#xD;&#xA;    &#xD;&#xA;                    renderTargetView[i] = new RenderTargetView(device, texture, renderTargetViewDescription);&#xD;&#xA;    &#xD;&#xA;                    ShaderResourceViewDescription shaderResourceViewDescription = new ShaderResourceViewDescription()&#xD;&#xA;                        {&#xD;&#xA;                            Format = textureDescription.Format,&#xD;&#xA;                            Dimension = ShaderResourceViewDimension.Texture2D,&#xD;&#xA;                            MostDetailedMip = 0,&#xD;&#xA;                            MipLevels = 1&#xD;&#xA;                        };&#xD;&#xA;    &#xD;&#xA;                    shaderResourceView[i] = new ShaderResourceView(device, texture, shaderResourceViewDescription);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;Rendering to my multiple render targets:&#xD;&#xA;&#xD;&#xA;    private void renderToTexture(Shader shader)&#xD;&#xA;        {&#xD;&#xA;            //set the vertex and pixel shaders&#xD;&#xA;            context.VertexShader.Set(shader.VertexShader);&#xD;&#xA;            context.PixelShader.Set(shader.PixelShader);&#xD;&#xA;&#xD;&#xA;            //send texture data and a linear sampler to the shader&#xD;&#xA;            context.PixelShader.SetShaderResource(texture, 0);&#xD;&#xA;            context.PixelShader.SetSampler(samplerState, 0);&#xD;&#xA;&#xD;&#xA;            //set the input assembler&#xD;&#xA;            SetInputAssembler(shader);&#xD;&#xA;&#xD;&#xA;            //reset the camera's constant buffer&#xD;&#xA;            camera.ResetConstantBuffer();&#xD;&#xA;&#xD;&#xA;            //set the render targets to the textures we will render to&#xD;&#xA;            context.OutputMerger.SetTargets(depthStencilView, renderTargetViews);&#xD;&#xA;            //clear the render targets and depth stencil&#xD;&#xA;            foreach (RenderTargetView view in renderTargetViews)&#xD;&#xA;            {&#xD;&#xA;                 context.ClearRenderTargetView(view, color);&#xD;&#xA;            }&#xD;&#xA;            context.ClearDepthStencilView(depthStencilView, DepthStencilClearFlags.Depth, 1.0f, 0);&#xD;&#xA;                //draw the scene&#xD;&#xA;                DrawScene();&#xD;&#xA;            &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;and then the function when I render my postProcessing shader to the screen:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    private void renderTexture(Shader shader)&#xD;&#xA;            {&#xD;&#xA;                //get a single quad to be the screen we render&#xD;&#xA;                Mesh mesh = CreateScreenFace();&#xD;&#xA;                //set vertex and pixel shaders&#xD;&#xA;                context.VertexShader.Set(shader.VertexShader);&#xD;&#xA;                context.PixelShader.Set(shader.PixelShader);&#xD;&#xA;                //set the input assembler&#xD;&#xA;                SetInputAssembler(shader);&#xD;&#xA;                //point the render target to the screen&#xD;&#xA;                context.OutputMerger.SetTargets(depthStencil, renderTarget);&#xD;&#xA;                //send the rendered textures and a linear sampler to the shader&#xD;&#xA;                    context.PixelShader.SetShaderResource(renderTargetViews[0], 1);&#xD;&#xA;                context.PixelShader.SetShaderResource(renderTargetViews[1], 2);&#xD;&#xA;                context.PixelShader.SetShaderResource(renderTargetViews[2], 3);&#xD;&#xA;                context.PixelShader.SetShaderResource(random, 4);&#xD;&#xA;                context.PixelShader.SetSampler(samplerState, 0);&#xD;&#xA;                //clear the render targets and depth stencils&#xD;&#xA;                context.ClearRenderTargetView(renderTarget, new Color4(0.52734375f, 0.8046875f, 0.9765625f));&#xD;&#xA;                context.ClearDepthStencilView(depthStencil, DepthStencilClearFlags.Depth, 1, 0);&#xD;&#xA;                //set the vertex and index buffers from the quad&#xD;&#xA;                context.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(mesh.VertexBuffer, Marshal.SizeOf(typeof(Vertex)), 0));&#xD;&#xA;                context.InputAssembler.SetIndexBuffer(mesh.IndexBuffer, Format.R16_UInt, 0);&#xD;&#xA;                //draw the quad&#xD;&#xA;                context.DrawIndexed(mesh.indices, 0, 0);&#xD;&#xA;                //dispose of the buffers&#xD;&#xA;                mesh.VertexBuffer.Dispose();&#xD;&#xA;                mesh.IndexBuffer.Dispose();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the PIX function call output for a single frame of the current run:&#xD;&#xA;&#xD;&#xA;    Frame 40&#xD;&#xA;    //setup&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B66190, 0x0028F068)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028F010, 0x0028EFF8, 0x0028F00C --&gt; 0x06BF8EE0)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8EE0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetConstantBuffers(0, 1, 0x0028F084 --&gt; { 0x06BF8EE0 })&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F8DEB58, 0x0F8DEB40, 0x0F8DEB54 --&gt; 0x06BF8F68)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8F68)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F70EAD8, 0x0F70EAC0, 0x0F70EAD4 --&gt; 0x06BF8FF0)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8FF0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FAAE9A8, 0x0FAAE990, 0x0FAAE9A4 --&gt; 0x06BF9078)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9078)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::GetImmediateContext(0x06BDA1D8 --&gt; 0x5BA8A8D8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F8DEB58, 0x0F8DEB40, 0x0F8DEB54 --&gt; 0x06BF9100)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9100)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F70EAD8, 0x0F70EAC0, 0x0F70EAD4 --&gt; 0x06BF9188)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9188)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::Release()&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::UpdateSubresource(0x06B59270, 0, NULL, 0x06287FA0, 0, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FAAE9A8, 0x0FAAE990, 0x0FAAE9A4 --&gt; 0x06BF9210)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9210)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetShader(0x06B66298, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FC0E978, 0x0FC0E960, 0x0FC0E974 --&gt; 0x06BF9298)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9298)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FE8EDE8, 0x0FE8EDD0, 0x0FE8EDE4 --&gt; 0x06BF9320)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9320)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShader(0x06B666F8, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FC0E978, 0x0FC0E960, 0x0FC0E974 --&gt; 0x06BF93A8)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF93A8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FE8EDE8, 0x0FE8EDD0, 0x0FE8EDE4 --&gt; 0x06BF9430)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9430)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateInputLayout(0x0028EBE0, 3, 0x06286CB8, 152, 0x0028EBD8 --&gt; 0x06BF9D68)&#xD;&#xA;    CreateObject(D3D11 Input Layout, 0x06BF9D68)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetInputLayout(0x06BF9D68)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::GetImmediateContext(0x06BDA1D8 --&gt; 0x5BA8A8D8)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::Release()&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetConstantBuffers(0, 1, 0x0028F024 --&gt; { 0x06B59270 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::OMSetRenderTargets(3, 0x0028F004 --&gt; { 0x06B65708, 0x06B657B8, 0x06B582E0 }, 0x06B66138)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B65708, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B657B8, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B582E0, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    //draw scene for preproc shader (this should output the three render targets)&#xD;&#xA;    //DRAW CALLS HIDDEN&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028EE04, 0x0028EDEC, 0x0028EE00 --&gt; 0x06BF94B8)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF94B8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028EE04, 0x0028EDEC, 0x0028EE00 --&gt; 0x06BF9540)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9540)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetShader(0x06B66BB8, NULL, 0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShader(0x06B66E50, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateInputLayout(0x0028EB64, 3, 0x05E988E0, 120, 0x0028EB5C --&gt; 0x06BF9E28)&#xD;&#xA;    CreateObject(D3D11 Input Layout, 0x06BF9E28)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetInputLayout(0x06BF9E28)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::OMSetRenderTargets(1, 0x0028EFC0 --&gt; { 0x06B66190 }, 0x06B66138)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShaderResources(1, 3, 0x0028EF3C --&gt; { 0x06B65760, 0x06B58288, 0x06B58338 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShaderResources(4, 1, 0x0028EFC0 --&gt; { 0x06B66FA0 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B66190, 0x0028EFA4)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetVertexBuffers(0, 1, 0x0028EFAC --&gt; { 0x06BF94B8 }, 0x0028EFB0, 0x0028EFB4)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetIndexBuffer(0x06BF9540, DXGI_FORMAT_R16_UINT, 0)&#xD;&#xA;    //draw quad for post proc shader. This shader takes the three textures in, as well as a random texture, which is added in the second PSSetShaderResources call. The random texture outputs fine.&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::DrawIndexed(6, 0, 0)&#xD;&#xA;    &lt;0x06BF94B8&gt; ID3D11Buffer::Release()&#xD;&#xA;    &lt;0x06BF9540&gt; ID3D11Buffer::Release()&#xD;&#xA;    &lt;0x06B65B00&gt; IDXGISwapChain::Present(0, 0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/6891194/multiple-render-targets-not-saving-data" />
  <row Id="35052" PostHistoryTypeId="1" PostId="15443" RevisionGUID="994fe1f2-f405-45e8-acf7-1b7e06a8fbb6" CreationDate="2011-08-01T13:39:01.817" UserId="6098" Text="Multiple Render Targets not saving data" />
  <row Id="35053" PostHistoryTypeId="3" PostId="15443" RevisionGUID="994fe1f2-f405-45e8-acf7-1b7e06a8fbb6" CreationDate="2011-08-01T13:39:01.817" UserId="6098" Text="&lt;textures&gt;&lt;shaders&gt;&lt;rendering&gt;&lt;directx11&gt;&lt;slimdx&gt;" />
  <row Id="35054" PostHistoryTypeId="17" PostId="15444" RevisionGUID="6a6bb368-8e3c-41fd-af29-7a1d1ffd985e" CreationDate="2011-08-01T14:00:14.937" UserId="-1" Comment="from http://stackoverflow.com/questions/6899290/game-engine-a-decent-way-architecture-wise-to-implement-scripting-support" Text="" />
  <row Id="35055" PostHistoryTypeId="2" PostId="15444" RevisionGUID="27f01495-948b-48f4-995b-314082466a8b" CreationDate="2011-08-01T13:44:12.143" UserId="8986" UserDisplayName="Artemiy" Text="I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture.&#xD;&#xA;&#xD;&#xA;It's a simple turn-based strategy with custom, logic-independent animations for battles. It has a global architecture layer for system/low-level stuff and, most importantly, two main modules - logic and game-view thingy - that communicate using an event manager. &#xD;&#xA;&#xD;&#xA;And the thing is, I would really like to have the scripts influence both stuff related to the game logic (changing unit parameters, etc) and stuff related to the game-view, such as special animations/dialogues for battles that might depend on a certain scripted trigger. &#xD;&#xA;&#xD;&#xA;*(To be honest, ideally I want the script to control the game flow, leaving only the core mechanics/graphics to the logic/view, but I'm new to this, so I'm not sure I can do it right now)*&#xD;&#xA;&#xD;&#xA;I've been thinking of three options:&#xD;&#xA;&#xD;&#xA;- Just let the scripting live in the logic, but let it know about the graphical side of the game. But this would make the logic/view division very vague, won't it...&#xD;&#xA;&#xD;&#xA;- Make the scripting a separate module that will exchange events with the others using the same event manager. But this would require to be very careful about event synchronization, I guess... and also add a whopping lot of event types to the manager. *(Still, personal favorite)*&#xD;&#xA;&#xD;&#xA;- Make the scripting a module above all, so it can directly influence/call functions of the logic/view. This allows for an inherently wider functionality at the cost of sort of screwing the entire event exchange scheme and being afraid that the script can break stuff even when it really shouldn't.&#xD;&#xA;&#xD;&#xA;So, I can neither decide on one of these nor think of a better way to insert the scripting module... Any suggestions or useful links?&#xD;&#xA;&#xD;&#xA;Thank you!" />
  <row Id="35056" PostHistoryTypeId="1" PostId="15444" RevisionGUID="27f01495-948b-48f4-995b-314082466a8b" CreationDate="2011-08-01T13:44:12.143" UserId="8986" UserDisplayName="Artemiy" Text="Game engine: a decent way, architecture-wise, to implement scripting support?" />
  <row Id="35057" PostHistoryTypeId="3" PostId="15444" RevisionGUID="27f01495-948b-48f4-995b-314082466a8b" CreationDate="2011-08-01T13:44:12.143" UserId="8986" UserDisplayName="Artemiy" Text="&lt;c#&gt;&lt;architecture&gt;&lt;scripting&gt;" />
  <row Id="35058" PostHistoryTypeId="2" PostId="15445" RevisionGUID="5d9a7c8d-68e7-4216-ace7-eadcaa690bb2" CreationDate="2011-08-01T14:32:20.637" UserId="6813" Text="One solution (probably the easiest at the moment but not necessary the best) is to include a web browser engine into your game. &#xD;&#xA;&#xD;&#xA;I'm currently trying some solution which wrap Chromium/WebKit in C++ (and C# or C) to use some HTML5 as UI elements.&#xD;&#xA;&#xD;&#xA;- [Awesomium][1] seems to be the more popular current Chromium/WebKit C++ wrapper.&#xD;&#xA;- [Berkelium][2] is an alternative solution using Chromium/WebKit too, that I didn't tried yet.&#xD;&#xA;&#xD;&#xA;The both can be used on Windows / OSX / Linux.&#xD;&#xA;&#xD;&#xA;I'm almost certain you can find similar frameworks for other web browser engines, but I as I don't know them I can tell for sure.&#xD;&#xA;&#xD;&#xA;A best practice is probably to integrate the web browser engine directly instead of using some frameworks but it request more time and work indeed.&#xD;&#xA;&#xD;&#xA;[1]: http://awesomium.com/&#xD;&#xA;[2]: http://berkelium.org/" />
  <row Id="35059" PostHistoryTypeId="2" PostId="15446" RevisionGUID="fbb97026-e51a-4f46-abec-7924021cb50e" CreationDate="2011-08-01T14:32:32.113" UserId="1463" Text="The scripting object needs to have access to the other objects it will provide data for.  Be careful not to pass those other objects directly into the scripting object.  Do so creates a brittle interface.  You might want to have something like a mediator class that manages those object references and provides data access to the scripting object." />
  <row Id="35060" PostHistoryTypeId="5" PostId="15435" RevisionGUID="e2e6bc8b-ce6f-4842-b274-b3be542f2646" CreationDate="2011-08-01T14:37:19.960" UserId="382" Comment="corrected spelling in title + inlined image" Text="I am learning OpenGL ES and I have setup the environment. I believe the best way to learn things is to grab a dummy project and start working on it. So what I plan to do is...&#xD;&#xA;&#xD;&#xA;![Flare on a parachute][1]&#xD;&#xA;&#xD;&#xA;Now I want this parachute to be created in OpenGL ES with sparkling effect at its tip. The sparkling effect must be shiny and animating like it's really sparkling. And the whole parachute would be moving down from top of the screen slowly and slightly fluctuating its position.&#xD;&#xA;&#xD;&#xA;Please tell me if this is what I can do using OpenGL ES or I should use some other framework for fast development.&#xD;&#xA;&#xD;&#xA;  [1]: http://goo.gl/8vN4R" />
  <row Id="35061" PostHistoryTypeId="4" PostId="15435" RevisionGUID="e2e6bc8b-ce6f-4842-b274-b3be542f2646" CreationDate="2011-08-01T14:37:19.960" UserId="382" Comment="corrected spelling in title + inlined image" Text="Can OpenGL ES help in this game?" />
  <row Id="35062" PostHistoryTypeId="24" PostId="15435" RevisionGUID="e2e6bc8b-ce6f-4842-b274-b3be542f2646" CreationDate="2011-08-01T14:37:19.960" Comment="Proposed by 382 approved by 1430 edit id of 590" />
  <row Id="35063" PostHistoryTypeId="5" PostId="15445" RevisionGUID="c746faca-9882-40e3-b9fd-3b1fd19447d3" CreationDate="2011-08-01T14:37:37.807" UserId="6813" Comment="added 9 characters in body" Text="One solution (probably the easiest at the moment but not necessary the best) is to include a complete web browser engine into your game. &#xD;&#xA;&#xD;&#xA;I'm currently trying some solution which wrap Chromium/WebKit in C++ (and C# or C) to use some HTML5 as GUI.&#xD;&#xA;&#xD;&#xA;- [Awesomium][1] seems to be the more popular current Chromium/WebKit C++ wrapper.&#xD;&#xA;- [Berkelium][2] is an alternative solution using Chromium/WebKit too, that I didn't tried yet.&#xD;&#xA;&#xD;&#xA;The both can be used on Windows / OSX / Linux.&#xD;&#xA;&#xD;&#xA;I'm almost certain you can find similar frameworks for other web browser engines, but I as I don't know them I can tell for sure.&#xD;&#xA;&#xD;&#xA;A best practice is probably to integrate the web browser engine directly instead of using some frameworks but it request more time and work indeed.&#xD;&#xA;&#xD;&#xA;[1]: http://awesomium.com/&#xD;&#xA;[2]: http://berkelium.org/" />
  <row Id="35064" PostHistoryTypeId="5" PostId="15445" RevisionGUID="e992e8ea-42be-457e-ad69-514aed4d3163" CreationDate="2011-08-01T14:45:50.323" UserId="6813" Comment="added 133 characters in body" Text="One solution (probably the easiest at the moment but not necessary the best) is to include a complete web browser engine into your game. &#xD;&#xA;&#xD;&#xA;I'm currently trying some solution which wrap Chromium/WebKit in C++ (and C# or C) to use some HTML5 as GUI.&#xD;&#xA;&#xD;&#xA;- [Awesomium][1] seems to be the more popular current Chromium/WebKit C++ wrapper.&#xD;&#xA;- [Berkelium][2] is an alternative solution using Chromium/WebKit too, that I didn't tried yet.&#xD;&#xA;&#xD;&#xA;The both can be used on Windows / OSX / Linux and as they both render the browser content into off-screen buffers, you can do what you want (save to file, display etc.) with them.&#xD;&#xA;&#xD;&#xA;I'm almost certain you can find similar frameworks for other web browser engines, but I as I don't know them I can tell for sure.&#xD;&#xA;&#xD;&#xA;A best practice is probably to integrate the web browser engine directly instead of using some frameworks but it request more time and work indeed.&#xD;&#xA;&#xD;&#xA;[1]: http://awesomium.com/&#xD;&#xA;[2]: http://berkelium.org/" />
  <row Id="35065" PostHistoryTypeId="2" PostId="15447" RevisionGUID="39aebdc4-d6a2-45b1-8d88-4e0cff2eef3e" CreationDate="2011-08-01T14:50:59.323" UserId="6422" Text="A simple solution would be to create an `InputBoxScreen`, `ColourPickerScreen` etc. all deriving from GameScreen. These would have in the constructor some context object (e.g. your model / object that was clicked on).&#xD;&#xA;&#xD;&#xA;It would also have a delegate to run.&#xD;&#xA;&#xD;&#xA;When the user made their selection it should run the delegate passing in the context, and the selection, then remove its self from the screen manager.&#xD;&#xA;&#xD;&#xA;An example usage below (using generics to strongly type the context object):&#xD;&#xA;&#xD;&#xA;    //User clicked the model&#xD;&#xA;    var colourPickerScreen =&#xD;&#xA;        new ColourPickerScreen&lt;Model&gt;(modelSelected, (context, colourSelected) =&gt;&#xD;&#xA;            {&#xD;&#xA;                context.Colour = colourSelected;&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;    screenManager.AddScreen(colourPickerScreen);&#xD;&#xA;&#xD;&#xA;The tricky part is often ensuring that the context/action is still valid when the user makes the selection. e.g. the model still exists." />
  <row Id="35066" PostHistoryTypeId="5" PostId="15444" RevisionGUID="17dc84f1-2a5e-4ed7-948d-82544b2b4391" CreationDate="2011-08-01T14:57:47.047" UserId="8986" Comment="added 101 characters in body" Text="I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture.&#xD;&#xA;&#xD;&#xA;It's a simple turn-based strategy with custom, logic-independent animations for battles. It has a global architecture layer for system/low-level stuff and, most importantly, two main modules - logic and game-view thingy - that communicate using an event manager. &#xD;&#xA;&#xD;&#xA;And the thing is, I would really like to have the scripts influence both stuff related to the game logic (changing unit parameters, etc) and stuff related to the game-view, such as special animations/dialogues for battles that might depend on a certain scripted trigger. &#xD;&#xA;&#xD;&#xA;*(To be honest, ideally I want the script to control the game flow, leaving only the core mechanics/graphics to the logic/view, but I'm new to this, so I'm not sure I can do it right now)*&#xD;&#xA;&#xD;&#xA;I've been thinking of three options:&#xD;&#xA;&#xD;&#xA;- Just let the scripting live in the logic, but let it know about the graphical side of the game. But this would make the logic/view division very vague, won't it...&#xD;&#xA;&#xD;&#xA;- Make the scripting a separate module that will exchange events with the others using the same event manager. But this would require to be very careful about event synchronization, I guess... and also add a whopping lot of event types to the manager. *(Still, personal favorite)*&#xD;&#xA;&#xD;&#xA;- Make the scripting a module above all, so it can directly influence/call functions of the logic/view. This allows for an inherently wider functionality at the cost of sort of screwing the entire event exchange scheme and being afraid that the script can break stuff even when it really shouldn't.&#xD;&#xA;&#xD;&#xA;So, I can neither decide on one of these nor think of a better way to insert the scripting module... Any suggestions or useful links?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;*P.s. thanks for migrating the question, didn't know there was a specialized section for gamedev*" />
  <row Id="35067" PostHistoryTypeId="2" PostId="15448" RevisionGUID="b340a3d4-0ebd-423c-b9ca-530956e53e01" CreationDate="2011-08-01T14:58:33.030" UserId="8962" Text="(originally posted this on regular stack overflow, somebody pointed this forum out :-) )&#xD;&#xA;&#xD;&#xA;Hi there,&#xD;&#xA;&#xD;&#xA;I'm implementing a physics engine for the simulation of worm-like creatures. Problem is, is that they're able to swim over each other and occupy the same point in space. So you have some idea of the environment, I provide a video here: http://www.box.net/shared/mlddkslszbxd59cfdhpc&#xD;&#xA;&#xD;&#xA;So what I need to do is incorporate a collision detection and resolution algorithm that would overcome this. For the detection part, I've been utilising bounding circles; each worm is given an outer coarse circle which if crossed then triggers detection around smaller fine grain detection circles as placed around each body segment.&#xD;&#xA;&#xD;&#xA;That bit is relatively easy. The more difficult bit is to decide what to do given a collision. My problem is how to derive and correctly set the velocities and forces of the point masses after a collision has taken place.&#xD;&#xA;&#xD;&#xA;Just in case its not entirely obvious, each worm is made out of springs and point masses. Each body segment of a worm assumes a rectangular shape at rest with 4 point masses and 6 springs (since there are also two diagonal springs).&#xD;&#xA;&#xD;&#xA;Now it was suggested over on regular stack overflow that I implement an elastic collision by summing the momentum of worm A and the momentum of worm B (when they collide). The way I do this is on a body segment by body segment basis: if two body segments from two different worms are close enough (i.e., colliding), then I sum the momentum of each and divide the result by 2. This yields a new velocity value which I then apply to the velocity of each body segment. This is meant to have the effect of 'springing' the colliding body segments away from each other.&#xD;&#xA;&#xD;&#xA;However, I don't think I'm implementing it correctly. The issues are: when worm A hits worm B, if they are both swimming strongly enough, they both still swim through each other albeit at a slower pace. An example of this is shown in this video here: http://www.box.net/shared/sankz3i7xeenilhzhqfo &#xD;&#xA;&#xD;&#xA;The second issue is that if two worms are within collision range and worm A swims away from worm B, then worm A proceeds to pull worm B along with it although at a slower speed than normal un-hindered swimming.&#xD;&#xA;&#xD;&#xA;I'm really not sure how to go about this. I've read about requiring the setting of angular velocity for two colliding bodies but I'm not sure whether this only applies to solid bodies or not..An elastic collision seems the most sensible given that I'm using a spring based model. &#xD;&#xA;&#xD;&#xA;If anyone can help, I'd greatly appreciate it&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;Ben." />
  <row Id="35068" PostHistoryTypeId="1" PostId="15448" RevisionGUID="b340a3d4-0ebd-423c-b9ca-530956e53e01" CreationDate="2011-08-01T14:58:33.030" UserId="8962" Text="Need help with collision detection/resolution in a 2D simulation of 'worm-like' creatures" />
  <row Id="35069" PostHistoryTypeId="3" PostId="15448" RevisionGUID="b340a3d4-0ebd-423c-b9ca-530956e53e01" CreationDate="2011-08-01T14:58:33.030" UserId="8962" Text="&lt;collision-detection&gt;&lt;2d-physics&gt;&lt;physics-engine&gt;" />
  <row Id="35070" PostHistoryTypeId="5" PostId="15443" RevisionGUID="1c850e6f-1c69-41ec-b03f-c2cdb34cfbaa" CreationDate="2011-08-01T15:00:20.530" UserId="6098" Comment="Added one hypothesis" Text="I originally posted this question on stack overflow, but realised it might be better here. The original question can be found [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a pixel shader &quot;preProc&quot; which processes my vertices and saves three textures of data. One for per-pixel normals, one for per-pixel position data and one for color (which I'm currently setting as black).&#xD;&#xA;&#xD;&#xA;I then later use these textures in a postprocessing shader in order to implement Screen Space Ambient Occlusion, however it seems none of the data is getting saved in the first shader.&#xD;&#xA;&#xD;&#xA;Here's my pixel shader:&#xD;&#xA;&#xD;&#xA;    PS_OUT PS( PS_IN input )&#xD;&#xA;    {&#xD;&#xA;    	PS_OUT output;&#xD;&#xA;    	output.col = float4(0,0,0,0);&#xD;&#xA;    	output.norm = float4(input.norm,1);&#xD;&#xA;    	output.pos = input.pos;&#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;which outputs the following struct:&#xD;&#xA;&#xD;&#xA;    struct PS_OUT&#xD;&#xA;    {&#xD;&#xA;    	float4 col : SV_TARGET0;&#xD;&#xA;    	float4 norm : SV_TARGET1;&#xD;&#xA;    	float4 pos : SV_TARGET2;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;and takes the following struct for input:&#xD;&#xA;&#xD;&#xA;    struct PS_IN&#xD;&#xA;    {&#xD;&#xA;        float4 pos : SV_POSITION;&#xD;&#xA;    	float2 tex : TEXCOORD0;&#xD;&#xA;    	float3 norm : TEXCOORD1;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;My post processing shader simply outputs the colour I set in my preShader, which should be black. However when I run the code I get a light blue, which is the colour I reset my render targets to when I clear them. If I change the pixelshader to instead sample the randomTex texture (which my code previously loaded from a file and is not from a render target) everything is rendered fine, so I am confident it is not my post processing shader.&#xD;&#xA;&#xD;&#xA;In case it's my slimDX code that's failing here's what I do:&#xD;&#xA;&#xD;&#xA;Creating my textures, shaderresourvecviews and rendertargetviews:&#xD;&#xA;&#xD;&#xA;    Texture2DDescription textureDescription = new Texture2DDescription()&#xD;&#xA;                    {&#xD;&#xA;                        Width=texWidth,&#xD;&#xA;                        Height=texHeight,&#xD;&#xA;                        MipLevels=1,&#xD;&#xA;                        ArraySize=3,&#xD;&#xA;                        Format=SlimDX.DXGI.Format.R32G32B32A32_Float,&#xD;&#xA;                        SampleDescription = new SlimDX.DXGI.SampleDescription(1,0),&#xD;&#xA;                        BindFlags = BindFlags.RenderTarget | BindFlags.ShaderResource,&#xD;&#xA;                        CpuAccessFlags= CpuAccessFlags.None,&#xD;&#xA;                        OptionFlags = ResourceOptionFlags.None,&#xD;&#xA;                        Usage= ResourceUsage.Default,&#xD;&#xA;                    };&#xD;&#xA;                texture = new Texture2D(device, textureDescription);&#xD;&#xA;    &#xD;&#xA;                renderTargetView = new RenderTargetView[3];&#xD;&#xA;                shaderResourceView = new ShaderResourceView[3];&#xD;&#xA;    &#xD;&#xA;                for (int i = 0; i &lt; 3; i++)&#xD;&#xA;                {&#xD;&#xA;                    RenderTargetViewDescription renderTargetViewDescription = new RenderTargetViewDescription()&#xD;&#xA;                        {&#xD;&#xA;                            Format = textureDescription.Format,&#xD;&#xA;                            Dimension = RenderTargetViewDimension.Texture2D,&#xD;&#xA;                            MipSlice = 0,&#xD;&#xA;                        };&#xD;&#xA;    &#xD;&#xA;                    renderTargetView[i] = new RenderTargetView(device, texture, renderTargetViewDescription);&#xD;&#xA;    &#xD;&#xA;                    ShaderResourceViewDescription shaderResourceViewDescription = new ShaderResourceViewDescription()&#xD;&#xA;                        {&#xD;&#xA;                            Format = textureDescription.Format,&#xD;&#xA;                            Dimension = ShaderResourceViewDimension.Texture2D,&#xD;&#xA;                            MostDetailedMip = 0,&#xD;&#xA;                            MipLevels = 1&#xD;&#xA;                        };&#xD;&#xA;    &#xD;&#xA;                    shaderResourceView[i] = new ShaderResourceView(device, texture, shaderResourceViewDescription);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;Rendering to my multiple render targets:&#xD;&#xA;&#xD;&#xA;    private void renderToTexture(Shader shader)&#xD;&#xA;        {&#xD;&#xA;            //set the vertex and pixel shaders&#xD;&#xA;            context.VertexShader.Set(shader.VertexShader);&#xD;&#xA;            context.PixelShader.Set(shader.PixelShader);&#xD;&#xA;&#xD;&#xA;            //send texture data and a linear sampler to the shader&#xD;&#xA;            context.PixelShader.SetShaderResource(texture, 0);&#xD;&#xA;            context.PixelShader.SetSampler(samplerState, 0);&#xD;&#xA;&#xD;&#xA;            //set the input assembler&#xD;&#xA;            SetInputAssembler(shader);&#xD;&#xA;&#xD;&#xA;            //reset the camera's constant buffer&#xD;&#xA;            camera.ResetConstantBuffer();&#xD;&#xA;&#xD;&#xA;            //set the render targets to the textures we will render to&#xD;&#xA;            context.OutputMerger.SetTargets(depthStencilView, renderTargetViews);&#xD;&#xA;            //clear the render targets and depth stencil&#xD;&#xA;            foreach (RenderTargetView view in renderTargetViews)&#xD;&#xA;            {&#xD;&#xA;                 context.ClearRenderTargetView(view, color);&#xD;&#xA;            }&#xD;&#xA;            context.ClearDepthStencilView(depthStencilView, DepthStencilClearFlags.Depth, 1.0f, 0);&#xD;&#xA;                //draw the scene&#xD;&#xA;                DrawScene();&#xD;&#xA;            &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;and then the function when I render my postProcessing shader to the screen:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    private void renderTexture(Shader shader)&#xD;&#xA;            {&#xD;&#xA;                //get a single quad to be the screen we render&#xD;&#xA;                Mesh mesh = CreateScreenFace();&#xD;&#xA;                //set vertex and pixel shaders&#xD;&#xA;                context.VertexShader.Set(shader.VertexShader);&#xD;&#xA;                context.PixelShader.Set(shader.PixelShader);&#xD;&#xA;                //set the input assembler&#xD;&#xA;                SetInputAssembler(shader);&#xD;&#xA;                //point the render target to the screen&#xD;&#xA;                context.OutputMerger.SetTargets(depthStencil, renderTarget);&#xD;&#xA;                //send the rendered textures and a linear sampler to the shader&#xD;&#xA;                    context.PixelShader.SetShaderResource(renderTargetViews[0], 1);&#xD;&#xA;                context.PixelShader.SetShaderResource(renderTargetViews[1], 2);&#xD;&#xA;                context.PixelShader.SetShaderResource(renderTargetViews[2], 3);&#xD;&#xA;                context.PixelShader.SetShaderResource(random, 4);&#xD;&#xA;                context.PixelShader.SetSampler(samplerState, 0);&#xD;&#xA;                //clear the render targets and depth stencils&#xD;&#xA;                context.ClearRenderTargetView(renderTarget, new Color4(0.52734375f, 0.8046875f, 0.9765625f));&#xD;&#xA;                context.ClearDepthStencilView(depthStencil, DepthStencilClearFlags.Depth, 1, 0);&#xD;&#xA;                //set the vertex and index buffers from the quad&#xD;&#xA;                context.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(mesh.VertexBuffer, Marshal.SizeOf(typeof(Vertex)), 0));&#xD;&#xA;                context.InputAssembler.SetIndexBuffer(mesh.IndexBuffer, Format.R16_UInt, 0);&#xD;&#xA;                //draw the quad&#xD;&#xA;                context.DrawIndexed(mesh.indices, 0, 0);&#xD;&#xA;                //dispose of the buffers&#xD;&#xA;                mesh.VertexBuffer.Dispose();&#xD;&#xA;                mesh.IndexBuffer.Dispose();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the PIX function call output for a single frame of the current run:&#xD;&#xA;&#xD;&#xA;    Frame 40&#xD;&#xA;    //setup&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B66190, 0x0028F068)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028F010, 0x0028EFF8, 0x0028F00C --&gt; 0x06BF8EE0)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8EE0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetConstantBuffers(0, 1, 0x0028F084 --&gt; { 0x06BF8EE0 })&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F8DEB58, 0x0F8DEB40, 0x0F8DEB54 --&gt; 0x06BF8F68)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8F68)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F70EAD8, 0x0F70EAC0, 0x0F70EAD4 --&gt; 0x06BF8FF0)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8FF0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FAAE9A8, 0x0FAAE990, 0x0FAAE9A4 --&gt; 0x06BF9078)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9078)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::GetImmediateContext(0x06BDA1D8 --&gt; 0x5BA8A8D8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F8DEB58, 0x0F8DEB40, 0x0F8DEB54 --&gt; 0x06BF9100)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9100)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F70EAD8, 0x0F70EAC0, 0x0F70EAD4 --&gt; 0x06BF9188)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9188)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::Release()&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::UpdateSubresource(0x06B59270, 0, NULL, 0x06287FA0, 0, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FAAE9A8, 0x0FAAE990, 0x0FAAE9A4 --&gt; 0x06BF9210)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9210)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetShader(0x06B66298, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FC0E978, 0x0FC0E960, 0x0FC0E974 --&gt; 0x06BF9298)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9298)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FE8EDE8, 0x0FE8EDD0, 0x0FE8EDE4 --&gt; 0x06BF9320)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9320)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShader(0x06B666F8, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FC0E978, 0x0FC0E960, 0x0FC0E974 --&gt; 0x06BF93A8)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF93A8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FE8EDE8, 0x0FE8EDD0, 0x0FE8EDE4 --&gt; 0x06BF9430)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9430)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateInputLayout(0x0028EBE0, 3, 0x06286CB8, 152, 0x0028EBD8 --&gt; 0x06BF9D68)&#xD;&#xA;    CreateObject(D3D11 Input Layout, 0x06BF9D68)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetInputLayout(0x06BF9D68)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::GetImmediateContext(0x06BDA1D8 --&gt; 0x5BA8A8D8)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::Release()&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetConstantBuffers(0, 1, 0x0028F024 --&gt; { 0x06B59270 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::OMSetRenderTargets(3, 0x0028F004 --&gt; { 0x06B65708, 0x06B657B8, 0x06B582E0 }, 0x06B66138)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B65708, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B657B8, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B582E0, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    //draw scene for preproc shader (this should output the three render targets)&#xD;&#xA;    //DRAW CALLS HIDDEN&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028EE04, 0x0028EDEC, 0x0028EE00 --&gt; 0x06BF94B8)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF94B8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028EE04, 0x0028EDEC, 0x0028EE00 --&gt; 0x06BF9540)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9540)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetShader(0x06B66BB8, NULL, 0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShader(0x06B66E50, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateInputLayout(0x0028EB64, 3, 0x05E988E0, 120, 0x0028EB5C --&gt; 0x06BF9E28)&#xD;&#xA;    CreateObject(D3D11 Input Layout, 0x06BF9E28)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetInputLayout(0x06BF9E28)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::OMSetRenderTargets(1, 0x0028EFC0 --&gt; { 0x06B66190 }, 0x06B66138)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShaderResources(1, 3, 0x0028EF3C --&gt; { 0x06B65760, 0x06B58288, 0x06B58338 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShaderResources(4, 1, 0x0028EFC0 --&gt; { 0x06B66FA0 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B66190, 0x0028EFA4)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetVertexBuffers(0, 1, 0x0028EFAC --&gt; { 0x06BF94B8 }, 0x0028EFB0, 0x0028EFB4)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetIndexBuffer(0x06BF9540, DXGI_FORMAT_R16_UINT, 0)&#xD;&#xA;    //draw quad for post proc shader. This shader takes the three textures in, as well as a random texture, which is added in the second PSSetShaderResources call. The random texture outputs fine.&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::DrawIndexed(6, 0, 0)&#xD;&#xA;    &lt;0x06BF94B8&gt; ID3D11Buffer::Release()&#xD;&#xA;    &lt;0x06BF9540&gt; ID3D11Buffer::Release()&#xD;&#xA;    &lt;0x06B65B00&gt; IDXGISwapChain::Present(0, 0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: I've been doing some reading and perhaps I need to deallocate the textures as render targets after the preProc pass before I pass them in as ShaderResourceViews to my postProcess shader. I assumed calling context.OutputMerger.SetTargets() would deallocate all of the currently assigned render targets and then assign only the render targets specified in the function's parameters. If this isn't the case (I can't yet be sure if it is or isn't), then how would I go about unassigning the render targets in SlimDX?&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/6891194/multiple-render-targets-not-saving-data" />
  <row Id="35071" PostHistoryTypeId="2" PostId="15449" RevisionGUID="7ec61560-cbf3-4d15-8c73-a6b153a5f1df" CreationDate="2011-08-01T15:09:40.943" UserId="6098" Text="Could you open all of the images before you start the slide show? Store them in an array of textures and then just loop through?&#xD;&#xA;&#xD;&#xA;If not, then I would suggest using the c# threading classes Josh Petrie suggested, or using the Thread class itself, which can be easier to use than it looks.&#xD;&#xA;&#xD;&#xA;If you are new to threading I would suggest avoiding it unless you are prepared to read up on a lot of nuances and problems unique to threading. It is certainly incredibly useful and powerful but you can end up causing a lot of problems if you're inexperienced." />
  <row Id="35072" PostHistoryTypeId="5" PostId="7544" RevisionGUID="309653ba-1380-4eda-ac27-6c978587f495" CreationDate="2011-08-01T15:11:14.113" UserId="1430" Comment="added 3 characters in body; edited tags" Text="Is there a good tutorial that shows the difference between OpenGL 1.* and 2.*?&#xD;&#xA;&#xD;&#xA;It would be very helpful to know which functions I should **not** be calling (like glBegin(), I assume)." />
  <row Id="35073" PostHistoryTypeId="6" PostId="7544" RevisionGUID="309653ba-1380-4eda-ac27-6c978587f495" CreationDate="2011-08-01T15:11:14.113" UserId="1430" Comment="added 3 characters in body; edited tags" Text="&lt;opengl&gt;" />
  <row Id="35074" PostHistoryTypeId="4" PostId="15080" RevisionGUID="bae7832b-c28e-4e77-aca2-437aaac44788" CreationDate="2011-08-01T15:47:10.397" UserId="1156" Comment="edited tags; edited title" Text="Problem while loading an image for a texture" />
  <row Id="35075" PostHistoryTypeId="6" PostId="15080" RevisionGUID="bae7832b-c28e-4e77-aca2-437aaac44788" CreationDate="2011-08-01T15:47:10.397" UserId="1156" Comment="edited tags; edited title" Text="&lt;c#&gt;&lt;textures&gt;&lt;loading&gt;&lt;slimdx&gt;" />
  <row Id="35076" PostHistoryTypeId="2" PostId="15450" RevisionGUID="de79d697-36c6-4866-8864-f522b9eb8793" CreationDate="2011-08-01T15:53:50.443" UserId="1743" Text="I am having a bit of a tooling problem...and I am unsure of how to solve it.&#xD;&#xA;&#xD;&#xA;I am currently using PyGame to try and write a simple Minesweeper clone, except my sprites that I made are hexagon based and therefore have diagonal lines.&#xD;&#xA;&#xD;&#xA;I drew up a nice, clean, crisp vector sprite set which looks very nice in Inkscape, however once I export it everything goes to hell.  I'm going to outline what I've done below and hopefully somebody here can set me straight :D&#xD;&#xA;&#xD;&#xA;**Disclaimer**: Unfortunately I'm behind a proxy and cannot provide screenshots at the moment..I'll do my best to describe.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I attempt to use a color key (`0xFF00FF`), then when I set the color key in PyGame I get a bunch of jagged pink edges along my sprite.  I believe this could be an anti-aliasing issue with Inkscape, but unfortunately my Googling didn't turn up a way to disable it.&#xD;&#xA;&#xD;&#xA;If I import my PNG into Photoshop or the Gimp and delete the background, then I run into an issue where the background appears to be black when running the game.  I have tried to follow the instructions I saw on [SO][1], but to no avail.&#xD;&#xA;&#xD;&#xA;I am open to suggestions, but at this point I'm debating importing another library which can handle SVG graphics, in order to keep my clean, crisp diagonal lines.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/1634208/how-do-i-blit-a-png-with-some-transparency-onto-a-surface-in-pygame" />
  <row Id="35077" PostHistoryTypeId="1" PostId="15450" RevisionGUID="de79d697-36c6-4866-8864-f522b9eb8793" CreationDate="2011-08-01T15:53:50.443" UserId="1743" Text="Problem in blitting a clean, crisp sprite" />
  <row Id="35078" PostHistoryTypeId="3" PostId="15450" RevisionGUID="de79d697-36c6-4866-8864-f522b9eb8793" CreationDate="2011-08-01T15:53:50.443" UserId="1743" Text="&lt;python&gt;&lt;pygame&gt;&lt;antialiasing&gt;&lt;colorkey&gt;" />
  <row Id="35079" PostHistoryTypeId="2" PostId="15451" RevisionGUID="4581b30e-4b79-4446-8993-6ba2115fdd83" CreationDate="2011-08-01T16:15:11.283" UserId="8427" Text="It sounds like you need to transform the values you're getting from the accelerometer so the &quot;neutral&quot; orientation of the device is different. The more correct way of doing this is to construct a rotation matrix to transform the accelerometer input. &#xD;&#xA;&#xD;&#xA;But if you don't want to deal with matrix multiplication and you just want a simple rotation about an axis, you can transform the input values you care about with some trig:&#xD;&#xA;&#xD;&#xA;    float holdAngle = 45.0f;&#xD;&#xA;    float localAccelX = acceleration.x * cos(holdAngle) - acceleration.y * sin(holdAngle);&#xD;&#xA;    &#xD;&#xA;    // adjust velocity based on current accelerometer acceleration&#xD;&#xA;    playerVelocity.x    = playerVelocity.x * deceleration + localAccelX  * sensitivity;&#xD;&#xA;&#xD;&#xA;You can change the angle value to suit your liking. You also may have to substitute acceleration.z for acceleration.y (I'm not sure what direction those axes point in with your device).&#xD;&#xA;" />
  <row Id="35080" PostHistoryTypeId="5" PostId="15443" RevisionGUID="005625a7-0c66-4298-9af9-97c384c12561" CreationDate="2011-08-01T16:24:09.273" UserId="6098" Comment="Added MSDN details on SetRenderTargets()" Text="I originally posted this question on stack overflow, but realised it might be better here. The original question can be found [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a pixel shader &quot;preProc&quot; which processes my vertices and saves three textures of data. One for per-pixel normals, one for per-pixel position data and one for color (which I'm currently setting as black).&#xD;&#xA;&#xD;&#xA;I then later use these textures in a postprocessing shader in order to implement Screen Space Ambient Occlusion, however it seems none of the data is getting saved in the first shader.&#xD;&#xA;&#xD;&#xA;Here's my pixel shader:&#xD;&#xA;&#xD;&#xA;    PS_OUT PS( PS_IN input )&#xD;&#xA;    {&#xD;&#xA;    	PS_OUT output;&#xD;&#xA;    	output.col = float4(0,0,0,0);&#xD;&#xA;    	output.norm = float4(input.norm,1);&#xD;&#xA;    	output.pos = input.pos;&#xD;&#xA;        return output;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;which outputs the following struct:&#xD;&#xA;&#xD;&#xA;    struct PS_OUT&#xD;&#xA;    {&#xD;&#xA;    	float4 col : SV_TARGET0;&#xD;&#xA;    	float4 norm : SV_TARGET1;&#xD;&#xA;    	float4 pos : SV_TARGET2;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;and takes the following struct for input:&#xD;&#xA;&#xD;&#xA;    struct PS_IN&#xD;&#xA;    {&#xD;&#xA;        float4 pos : SV_POSITION;&#xD;&#xA;    	float2 tex : TEXCOORD0;&#xD;&#xA;    	float3 norm : TEXCOORD1;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;My post processing shader simply outputs the colour I set in my preShader, which should be black. However when I run the code I get a light blue, which is the colour I reset my render targets to when I clear them. If I change the pixelshader to instead sample the randomTex texture (which my code previously loaded from a file and is not from a render target) everything is rendered fine, so I am confident it is not my post processing shader.&#xD;&#xA;&#xD;&#xA;In case it's my slimDX code that's failing here's what I do:&#xD;&#xA;&#xD;&#xA;Creating my textures, shaderresourvecviews and rendertargetviews:&#xD;&#xA;&#xD;&#xA;    Texture2DDescription textureDescription = new Texture2DDescription()&#xD;&#xA;                    {&#xD;&#xA;                        Width=texWidth,&#xD;&#xA;                        Height=texHeight,&#xD;&#xA;                        MipLevels=1,&#xD;&#xA;                        ArraySize=3,&#xD;&#xA;                        Format=SlimDX.DXGI.Format.R32G32B32A32_Float,&#xD;&#xA;                        SampleDescription = new SlimDX.DXGI.SampleDescription(1,0),&#xD;&#xA;                        BindFlags = BindFlags.RenderTarget | BindFlags.ShaderResource,&#xD;&#xA;                        CpuAccessFlags= CpuAccessFlags.None,&#xD;&#xA;                        OptionFlags = ResourceOptionFlags.None,&#xD;&#xA;                        Usage= ResourceUsage.Default,&#xD;&#xA;                    };&#xD;&#xA;                texture = new Texture2D(device, textureDescription);&#xD;&#xA;    &#xD;&#xA;                renderTargetView = new RenderTargetView[3];&#xD;&#xA;                shaderResourceView = new ShaderResourceView[3];&#xD;&#xA;    &#xD;&#xA;                for (int i = 0; i &lt; 3; i++)&#xD;&#xA;                {&#xD;&#xA;                    RenderTargetViewDescription renderTargetViewDescription = new RenderTargetViewDescription()&#xD;&#xA;                        {&#xD;&#xA;                            Format = textureDescription.Format,&#xD;&#xA;                            Dimension = RenderTargetViewDimension.Texture2D,&#xD;&#xA;                            MipSlice = 0,&#xD;&#xA;                        };&#xD;&#xA;    &#xD;&#xA;                    renderTargetView[i] = new RenderTargetView(device, texture, renderTargetViewDescription);&#xD;&#xA;    &#xD;&#xA;                    ShaderResourceViewDescription shaderResourceViewDescription = new ShaderResourceViewDescription()&#xD;&#xA;                        {&#xD;&#xA;                            Format = textureDescription.Format,&#xD;&#xA;                            Dimension = ShaderResourceViewDimension.Texture2D,&#xD;&#xA;                            MostDetailedMip = 0,&#xD;&#xA;                            MipLevels = 1&#xD;&#xA;                        };&#xD;&#xA;    &#xD;&#xA;                    shaderResourceView[i] = new ShaderResourceView(device, texture, shaderResourceViewDescription);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;Rendering to my multiple render targets:&#xD;&#xA;&#xD;&#xA;    private void renderToTexture(Shader shader)&#xD;&#xA;        {&#xD;&#xA;            //set the vertex and pixel shaders&#xD;&#xA;            context.VertexShader.Set(shader.VertexShader);&#xD;&#xA;            context.PixelShader.Set(shader.PixelShader);&#xD;&#xA;&#xD;&#xA;            //send texture data and a linear sampler to the shader&#xD;&#xA;            context.PixelShader.SetShaderResource(texture, 0);&#xD;&#xA;            context.PixelShader.SetSampler(samplerState, 0);&#xD;&#xA;&#xD;&#xA;            //set the input assembler&#xD;&#xA;            SetInputAssembler(shader);&#xD;&#xA;&#xD;&#xA;            //reset the camera's constant buffer&#xD;&#xA;            camera.ResetConstantBuffer();&#xD;&#xA;&#xD;&#xA;            //set the render targets to the textures we will render to&#xD;&#xA;            context.OutputMerger.SetTargets(depthStencilView, renderTargetViews);&#xD;&#xA;            //clear the render targets and depth stencil&#xD;&#xA;            foreach (RenderTargetView view in renderTargetViews)&#xD;&#xA;            {&#xD;&#xA;                 context.ClearRenderTargetView(view, color);&#xD;&#xA;            }&#xD;&#xA;            context.ClearDepthStencilView(depthStencilView, DepthStencilClearFlags.Depth, 1.0f, 0);&#xD;&#xA;                //draw the scene&#xD;&#xA;                DrawScene();&#xD;&#xA;            &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;and then the function when I render my postProcessing shader to the screen:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    private void renderTexture(Shader shader)&#xD;&#xA;            {&#xD;&#xA;                //get a single quad to be the screen we render&#xD;&#xA;                Mesh mesh = CreateScreenFace();&#xD;&#xA;                //set vertex and pixel shaders&#xD;&#xA;                context.VertexShader.Set(shader.VertexShader);&#xD;&#xA;                context.PixelShader.Set(shader.PixelShader);&#xD;&#xA;                //set the input assembler&#xD;&#xA;                SetInputAssembler(shader);&#xD;&#xA;                //point the render target to the screen&#xD;&#xA;                context.OutputMerger.SetTargets(depthStencil, renderTarget);&#xD;&#xA;                //send the rendered textures and a linear sampler to the shader&#xD;&#xA;                    context.PixelShader.SetShaderResource(renderTargetViews[0], 1);&#xD;&#xA;                context.PixelShader.SetShaderResource(renderTargetViews[1], 2);&#xD;&#xA;                context.PixelShader.SetShaderResource(renderTargetViews[2], 3);&#xD;&#xA;                context.PixelShader.SetShaderResource(random, 4);&#xD;&#xA;                context.PixelShader.SetSampler(samplerState, 0);&#xD;&#xA;                //clear the render targets and depth stencils&#xD;&#xA;                context.ClearRenderTargetView(renderTarget, new Color4(0.52734375f, 0.8046875f, 0.9765625f));&#xD;&#xA;                context.ClearDepthStencilView(depthStencil, DepthStencilClearFlags.Depth, 1, 0);&#xD;&#xA;                //set the vertex and index buffers from the quad&#xD;&#xA;                context.InputAssembler.SetVertexBuffers(0, new VertexBufferBinding(mesh.VertexBuffer, Marshal.SizeOf(typeof(Vertex)), 0));&#xD;&#xA;                context.InputAssembler.SetIndexBuffer(mesh.IndexBuffer, Format.R16_UInt, 0);&#xD;&#xA;                //draw the quad&#xD;&#xA;                context.DrawIndexed(mesh.indices, 0, 0);&#xD;&#xA;                //dispose of the buffers&#xD;&#xA;                mesh.VertexBuffer.Dispose();&#xD;&#xA;                mesh.IndexBuffer.Dispose();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the PIX function call output for a single frame of the current run:&#xD;&#xA;&#xD;&#xA;    Frame 40&#xD;&#xA;    //setup&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B66190, 0x0028F068)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028F010, 0x0028EFF8, 0x0028F00C --&gt; 0x06BF8EE0)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8EE0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetConstantBuffers(0, 1, 0x0028F084 --&gt; { 0x06BF8EE0 })&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F8DEB58, 0x0F8DEB40, 0x0F8DEB54 --&gt; 0x06BF8F68)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8F68)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F70EAD8, 0x0F70EAC0, 0x0F70EAD4 --&gt; 0x06BF8FF0)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF8FF0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FAAE9A8, 0x0FAAE990, 0x0FAAE9A4 --&gt; 0x06BF9078)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9078)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::GetImmediateContext(0x06BDA1D8 --&gt; 0x5BA8A8D8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F8DEB58, 0x0F8DEB40, 0x0F8DEB54 --&gt; 0x06BF9100)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9100)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0F70EAD8, 0x0F70EAC0, 0x0F70EAD4 --&gt; 0x06BF9188)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9188)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::Release()&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::UpdateSubresource(0x06B59270, 0, NULL, 0x06287FA0, 0, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FAAE9A8, 0x0FAAE990, 0x0FAAE9A4 --&gt; 0x06BF9210)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9210)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetShader(0x06B66298, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FC0E978, 0x0FC0E960, 0x0FC0E974 --&gt; 0x06BF9298)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9298)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FE8EDE8, 0x0FE8EDD0, 0x0FE8EDE4 --&gt; 0x06BF9320)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9320)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShader(0x06B666F8, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FC0E978, 0x0FC0E960, 0x0FC0E974 --&gt; 0x06BF93A8)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF93A8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0FE8EDE8, 0x0FE8EDD0, 0x0FE8EDE4 --&gt; 0x06BF9430)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9430)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateInputLayout(0x0028EBE0, 3, 0x06286CB8, 152, 0x0028EBD8 --&gt; 0x06BF9D68)&#xD;&#xA;    CreateObject(D3D11 Input Layout, 0x06BF9D68)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetInputLayout(0x06BF9D68)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::GetImmediateContext(0x06BDA1D8 --&gt; 0x5BA8A8D8)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::Release()&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetConstantBuffers(0, 1, 0x0028F024 --&gt; { 0x06B59270 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::OMSetRenderTargets(3, 0x0028F004 --&gt; { 0x06B65708, 0x06B657B8, 0x06B582E0 }, 0x06B66138)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B65708, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B657B8, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B582E0, 0x0028EFEC)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    //draw scene for preproc shader (this should output the three render targets)&#xD;&#xA;    //DRAW CALLS HIDDEN&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028EE04, 0x0028EDEC, 0x0028EE00 --&gt; 0x06BF94B8)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF94B8)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateBuffer(0x0028EE04, 0x0028EDEC, 0x0028EE00 --&gt; 0x06BF9540)&#xD;&#xA;    CreateObject(D3D11 Buffer, 0x06BF9540)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::VSSetShader(0x06B66BB8, NULL, 0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShader(0x06B66E50, NULL, 0)&#xD;&#xA;    &lt;0x0059FF78&gt; ID3D11Device::CreateInputLayout(0x0028EB64, 3, 0x05E988E0, 120, 0x0028EB5C --&gt; 0x06BF9E28)&#xD;&#xA;    CreateObject(D3D11 Input Layout, 0x06BF9E28)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetInputLayout(0x06BF9E28)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::OMSetRenderTargets(1, 0x0028EFC0 --&gt; { 0x06B66190 }, 0x06B66138)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShaderResources(1, 3, 0x0028EF3C --&gt; { 0x06B65760, 0x06B58288, 0x06B58338 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::PSSetShaderResources(4, 1, 0x0028EFC0 --&gt; { 0x06B66FA0 })&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearRenderTargetView(0x06B66190, 0x0028EFA4)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::ClearDepthStencilView(0x06B66138, 1, 1.000f, 0)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetVertexBuffers(0, 1, 0x0028EFAC --&gt; { 0x06BF94B8 }, 0x0028EFB0, 0x0028EFB4)&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::IASetIndexBuffer(0x06BF9540, DXGI_FORMAT_R16_UINT, 0)&#xD;&#xA;    //draw quad for post proc shader. This shader takes the three textures in, as well as a random texture, which is added in the second PSSetShaderResources call. The random texture outputs fine.&#xD;&#xA;    &lt;0x06BDA1D8&gt; ID3D11DeviceContext::DrawIndexed(6, 0, 0)&#xD;&#xA;    &lt;0x06BF94B8&gt; ID3D11Buffer::Release()&#xD;&#xA;    &lt;0x06BF9540&gt; ID3D11Buffer::Release()&#xD;&#xA;    &lt;0x06B65B00&gt; IDXGISwapChain::Present(0, 0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;EDIT: I've been doing some reading and perhaps I need to deallocate the textures as render targets after the preProc pass before I pass them in as ShaderResourceViews to my postProcess shader. I assumed calling context.OutputMerger.SetTargets() would deallocate all of the currently assigned render targets and then assign only the render targets specified in the function's parameters. If this isn't the case (I can't yet be sure if it is or isn't), then how would I go about unassigning the render targets in SlimDX?&#xD;&#xA;&#xD;&#xA;&gt;EDIT2: Ah, according to this [MSDN page][2], calling OutputMerger.SetRenderTargets() *&quot;overrides all bounded render targets and the depth stencil target regardless of the number of render targets in ppRenderTargetViews.&quot;* so all of my render targets are getting deallocated automatically when I tell the OutputMerger to render to the screen. This leaves me back to square one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/6891194/multiple-render-targets-not-saving-data&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb173597%28v=vs.85%29.aspx" />
  <row Id="35081" PostHistoryTypeId="2" PostId="15452" RevisionGUID="3827a956-540f-438a-91de-ed6dcd94d0d7" CreationDate="2011-08-01T16:28:27.510" UserId="7367" Text="For your pink halo-ing, the issue is exactly what you described: anti-aliasing. If you have Photoshop, just create the hexagon with two layers, one with all pink (0xFF00FF) and another with the hexagon. Make sure when you create the hexagon all feathering and anti-aliasing settings are set to zero for all the tools you use, and all brushes are set to 100% hardness. Save as a PNG.&#xD;&#xA;&#xD;&#xA;For best results, stick to the pencil and paint bucket tools." />
  <row Id="35082" PostHistoryTypeId="2" PostId="15453" RevisionGUID="27093a0e-2713-43c1-b744-a6567a2c325a" CreationDate="2011-08-01T16:59:54.610" UserId="8050" Text="Many tends to underestimate the powerful of dynamic languages thinking that such flexibility comes at cost of speed; This is true but often the cost is simply negligible.&#xD;&#xA;&#xD;&#xA;Personally I tend to develop as much as possible using dynamic languages ​​exploiting the expressiveness and then I profile the prototype to understand *where* and *if* optimization are needed.&#xD;&#xA;&#xD;&#xA;In your case this means that you should try to move toward the third option, developing the &quot;higher&quot; part using a suitable dynamic language that you can use as scripting language too.&#xD;&#xA;&#xD;&#xA;A lot of patterns can be used after you place the dynamism at the right depth. Your custom scripts can be integrated in an event based system as a callback system, when the core calls back it can provide a suitable environment so the script can alter the global status or just the state of a subset of the whole system.&#xD;&#xA;&#xD;&#xA;You can encapsulate the interface you script can interact by using the Fa&amp;ccedil;ade pattern. In the fa&amp;ccedil;ade methods you can put the logic that defines *how*, *when*, *if* the script can use a functionality and abstracting the script interaction from the core implementation.&#xD;&#xA;&#xD;&#xA;Your script interface should provide the relevant factory methods so the script can generate elements without instantiate them directly; these instances can be wrappers over the real objects so further control access logic can be implemented. " />
  <row Id="35083" PostHistoryTypeId="2" PostId="15454" RevisionGUID="3697206f-21d4-4aef-af1f-3f4ca6a48bbc" CreationDate="2011-08-01T17:04:07.793" UserId="1742" Text="Your math is right, but you're doing an in-place multiply (which means you're writing to values you're using later in the multiplication)&#xD;&#xA;&#xD;&#xA;    private void qMultiply(float w2, float x2, float y2, float z2){&#xD;&#xA;        //Performs A*B, where this Quaternion is A&#xD;&#xA;        this.w = w*w2 - x*x2 - y*y2 - z*z2;&#xD;&#xA;        this.x = w*x2 + x*w2 + y*z2 - z*y2;&#xD;&#xA;        this.y = w*y2 + y*w2 + z*x2 - x*z2;&#xD;&#xA;        this.z = w*z2 + z*w2 + x*y2 - y*x2;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Should be:&#xD;&#xA;&#xD;&#xA;    private void qMultiply(float w2, float x2, float y2, float z2){&#xD;&#xA;        *this = Quaternion(&#xD;&#xA;        w*w2 - x*x2 - y*y2 - z*z2,&#xD;&#xA;        w*x2 + x*w2 + y*z2 - z*y2,&#xD;&#xA;        w*y2 + y*w2 + z*x2 - x*z2,&#xD;&#xA;        w*z2 + z*w2 + x*y2 - y*x2 );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Which will store the final values in temporary variables until the calculation is finished." />
  <row Id="35084" PostHistoryTypeId="2" PostId="15455" RevisionGUID="656d02f0-812c-402a-b7ef-ae6a6eb4090c" CreationDate="2011-08-01T17:09:28.973" UserId="4443" Text="I believe you want the third option but you will find that you are right in your thinking that having logical events happening in potentially two locations a bad thing. You will find that you want the logic module of the engine to end up being an update tick that asks two questions 'What do I do now?' and 'How do I do that?' which you can then bind scripts to for handling answering those questions.&#xD;&#xA;&#xD;&#xA;Couple this with exposing the objects that contain the data and an API to access required Logic components (I mean you could script a the AI Path finding, but since that is a generic piece of code that is likely to be used and reused, why not embed it in the module and then add it to the API exposed to the scripting language?). This should give you the accessibility as well as the clearly defined locations where things are happening.&#xD;&#xA;&#xD;&#xA;Again, I caveat this with the same statement I always do. A finished working product is always more valuable than a good theory in programming :)&#xD;&#xA;&#xD;&#xA;Hope this helps!" />
  <row Id="35085" PostHistoryTypeId="25" PostId="15444" RevisionGUID="21fb7023-058b-4407-8545-cbf600386b3a" CreationDate="2011-08-01T18:35:39.303" Comment="http://twitter.com/#!/StackGameDev/status/98099588229120001" />
  <row Id="35086" PostHistoryTypeId="2" PostId="15456" RevisionGUID="92922470-1fd5-4c06-b91b-10aa40d6a694" CreationDate="2011-08-01T18:45:08.183" UserId="8240" Text="&gt; The question isn't so much &quot;Please do this comparison&quot; as &quot;where is a resource for this comparison&quot;&#xD;&#xA;&#xD;&#xA;If that's really your question (which is most assuredly *not* what you said in your actual question text, which ended in 4 questions, none of which were asking where you might find a resource), then the answer is simply:&#xD;&#xA;&#xD;&#xA;There isn't one.&#xD;&#xA;&#xD;&#xA;The majority of C++ programmers don't have to care that much about the overhead of standard library structures, cache performance of them (which is *highly* compiler dependent anyway), or that sort of thing. Not to mention, you usually don't get to pick your standard library implementation; you use what comes with your compiler. So even if it does some unpleasant things, the options for alternatives are limited.&#xD;&#xA;&#xD;&#xA;There are of course programmers who do care about this sort of thing. But they all swore off using the standard library a long time ago.&#xD;&#xA;&#xD;&#xA;So you have one group of programmers who simply don't care. And another group of programmers who would care if they were using it, but since they aren't using it, they don't care. Since nobody cares about it, there is no real information about this sort of thing. There are informal patches of information here and there (Effective C++ has a section on std::string implementations and the vast differences among them), but nothing comprehensive. And certainly nothing kept up-to-date." />
  <row Id="35087" PostHistoryTypeId="5" PostId="15445" RevisionGUID="201f017f-964a-40c4-aa21-3d9105480edf" CreationDate="2011-08-01T19:35:40.757" UserId="6813" Comment="added 1 characters in body" Text="One solution (probably the easiest at the moment but not necessary the best) is to include a complete web browser engine into your game. &#xD;&#xA;&#xD;&#xA;I'm currently trying some solutions which wrap Chromium/WebKit in C++ (and C# or C) to use some HTML5 as GUI.&#xD;&#xA;&#xD;&#xA;- [Awesomium][1] seems to be the more popular.&#xD;&#xA;- [Berkelium][2] is an alternative solution, that I didn't tried yet.&#xD;&#xA;&#xD;&#xA;The both are based on Chromium/WebKit and can be used on Windows / OSX / Linux. As they both render the browser content into off-screen buffers, you can do what you want (save to file, display etc.) with them.&#xD;&#xA;&#xD;&#xA;I'm almost certain you can find similar frameworks for other web browser engines, but I as I don't know them I can tell for sure.&#xD;&#xA;&#xD;&#xA;A best practice is probably to integrate the web browser engine directly instead of using some frameworks but it request more time and work indeed.&#xD;&#xA;&#xD;&#xA;[1]: http://awesomium.com/&#xD;&#xA;[2]: http://berkelium.org/" />
  <row Id="35088" PostHistoryTypeId="5" PostId="15429" RevisionGUID="e76b5991-776a-473d-982c-5771778600ac" CreationDate="2011-08-01T20:34:02.990" UserId="8973" Comment="Corrected spelling" Text="For me the easiest way to start testing a code base which doesn't have any tests, is to test bugs. When a you discover a bug, the first thing to do is write a test to reproduce it, then fix the bug to make the test pass. &#xD;&#xA;&#xD;&#xA;Other low-hangers are classes which contain logic or data. If you're using the MVC pattern, test your domain models first, and then your controllers. Its often easiest to do this while re-factoring, because you will probably need to make changes to the classes to make them testable (using Dependency Injection and Single Responsibility principles).&#xD;&#xA;&#xD;&#xA;For code which is not using patterns, see where re-factoring to a pattern might help, then approach it in a test-driven manner. Write tests for the structure you would like to have, then port your code into that structure to make the tests pass. At the very least, create a façade to act as an organised API over the spaghetti code. Write tests to develop the façade, then after it's working, write integration tests to get it working with your current code. You can then re-factor or re-write the spaghetti code without impacting the rest of the system.&#xD;&#xA;&#xD;&#xA;Testing client-server-interaction is also a big pay-off, as it is usually the most fragile code because it interacts asynchronously with a foreign data set. Start at very coarse granularity. So first test that the client-server operations happen in the expected order. Then write tests to ensure that the data is sent and received in the correct format, then test how it breaks when used in unexpected ways. Write tests to call operations out of order, pass invalid data, etc. In FlexUnit you can use `[Test(expects=&quot;Error&quot;)]` when you are testing conditions that are expected to throw exceptions. You can also use `[Test(async)] ` in conjunction with the `Async` methods to test asynchronous operations. &#xD;&#xA;&#xD;&#xA;Testing third-party code can also pay off for two reasons: firstly it provides documentation by example and use cases for the library, and also indicates compatibility with other versions of the library.&#xD;&#xA;&#xD;&#xA;The trick with writing ad-hoc tests (as with all re-factoring) is to do it in small steps, one line at a time until you have covered a method, then a method at a time until you have covered a class, then a class at a time until you have covered the entire library.&#xD;&#xA;&#xD;&#xA;Another tip to keep in mind, is to test behaviour, or rather test what the code does, not how it does it. So if you have collision detection code, test that it returns a positive result and depth vector for overlapping objects, and negative results for non-overlapping objects. You don't need to test the actual algorithm which provides these results, just that the correct results are returned. You may test specific optimisations in the algorithm, but keep these separate from the main test code in case you change the algorithm later. &#xD;&#xA;&#xD;&#xA;After you have written tests to cover the functionality in the code, then test edge cases (array lower and upper indexes, maximum and minimum numbers of sprites, level locations, inventory items, quest items). If you have combinations of items or quests, simulate testing them in all possible combinations using paramaterized tests in FlexUnit (use the Paramaterized test runner).&#xD;&#xA;&#xD;&#xA;Performance is important with a game engine While FlexUnit does provide timings for each test, it comes with quite a large overhead. For this reason it is probably better to write your own framework for testing performance. It doesn't need to be complicated, it can be a simple class which calls a set of methods in order, measuring the time taken to run each function.&#xD;&#xA;&#xD;&#xA;A useful tool to have is an automatic game-play script. Either hand-roll or record a game sequence, then play it back and verify the game state at each frame. This can be especially useful when optimising to measure speed increases.&#xD;&#xA;&#xD;&#xA;The hardest code to test is visual and audio, as it requires some sort of signal processing to validate, and the resulting tests are usually fragile. Steer away from these initially, and do them last (if at all).&#xD;&#xA;&#xD;&#xA;[http://www.flexunit.org/?page_id=6][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flexunit.org/?page_id=6" />
  <row Id="35089" PostHistoryTypeId="5" PostId="15445" RevisionGUID="2585c5dd-bdcc-4d63-a319-4312c021c63b" CreationDate="2011-08-01T20:36:54.113" UserId="6813" Comment="added 1 characters in body" Text="One solution (probably the easiest at the moment but not necessary the best) is to include a complete web browser engine into your game. &#xD;&#xA;&#xD;&#xA;I'm currently trying some solutions which wrap Chromium/WebKit in C++ (and C# or C) to use some HTML5 as GUI.&#xD;&#xA;&#xD;&#xA;- [Awesomium][1] seems to be the more popular.&#xD;&#xA;- [Berkelium][2] is an alternative solution, that I didn't tried yet.&#xD;&#xA;&#xD;&#xA;The both are based on Chromium/WebKit and can be used under Windows / OSX / Linux. As they both render the browser content into off-screen buffers, you can do what you want (save to file, display etc.) with them.&#xD;&#xA;&#xD;&#xA;I'm almost certain you can find similar frameworks for other web browser engines, but as I don't know them I can tell for sure.&#xD;&#xA;&#xD;&#xA;A best practice is probably to integrate the web browser engine directly instead of using some frameworks but it request more time and work indeed.&#xD;&#xA;&#xD;&#xA;[1]: http://awesomium.com/&#xD;&#xA;[2]: http://berkelium.org/" />
  <row Id="35090" PostHistoryTypeId="2" PostId="15457" RevisionGUID="77784f19-22e4-4eb7-88f5-3d03d97a0055" CreationDate="2011-08-01T20:39:54.773" UserId="3408" Text="Presumably a development machine for sure, but would it contain any sort of editor (of any kind)? Or are there any editors in existence that work with the SDK that are commercially available?" />
  <row Id="35091" PostHistoryTypeId="1" PostId="15457" RevisionGUID="77784f19-22e4-4eb7-88f5-3d03d97a0055" CreationDate="2011-08-01T20:39:54.773" UserId="3408" Text="What would come with Nintendo's DS SDK?" />
  <row Id="35092" PostHistoryTypeId="3" PostId="15457" RevisionGUID="77784f19-22e4-4eb7-88f5-3d03d97a0055" CreationDate="2011-08-01T20:39:54.773" UserId="3408" Text="&lt;editors&gt;&lt;nintendo&gt;&lt;sdk&gt;" />
  <row Id="35093" PostHistoryTypeId="2" PostId="15458" RevisionGUID="40f265a6-3940-4a70-99b4-562e90f08f0a" CreationDate="2011-08-01T20:49:41.803" UserId="1430" Text="The details of the content of the SDK are probably covered by NDA.&#xD;&#xA;&#xD;&#xA;That said, since SDKs generally contain compilers and other related tools and libraries. Access to the development hardware is often a separate issue, although to most developers they will appear to be part of the same package.&#xD;&#xA;&#xD;&#xA;You can use any text editor to write code, and just about any IDE that can work with external compilers (which is any decent one) can be made to incorporate the tools from a console SDK." />
  <row Id="35094" PostHistoryTypeId="25" PostId="15450" RevisionGUID="f492c3eb-3bc9-4d09-8ca9-40bb42c6184a" CreationDate="2011-08-01T21:35:39.937" Comment="http://twitter.com/#!/StackGameDev/status/98144889841254401" />
  <row Id="35095" PostHistoryTypeId="5" PostId="15402" RevisionGUID="4169e60c-39f2-4056-b638-9b345f70f8de" CreationDate="2011-08-01T21:52:12.767" UserId="4794" Comment="added 588 characters in body" Text="This is really a choice between performance and flexibility, but I'll list my opinions about it.&#xD;&#xA;&#xD;&#xA;**One single VBO**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Just one draw call to draw your scene. This *increases* performance. Although your application may require multiple draw calls, you can still have a single VBO and let the count and offset decide your drawing.&#xD;&#xA; - Not requiring state changes between your objects. This *increases* performance.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Hard to manage, although this depends on how you write your code, if it's properly designed etc.&#xD;&#xA; - By saying *hard to manage* I mean stuff like update the VBO, set correct offset for every object etc.&#xD;&#xA;&#xD;&#xA;**Individual VBO:s**&#xD;&#xA;&#xD;&#xA;The positive sides are:&#xD;&#xA;&#xD;&#xA; - Easy to implement.&#xD;&#xA; - Easier to manage from the beginning.&#xD;&#xA;&#xD;&#xA;and the negative sides are:&#xD;&#xA;&#xD;&#xA; - Lots of state changes. This decreases performance.&#xD;&#xA; - Lots of draw calls. It will decrease the performance.&#xD;&#xA;&#xD;&#xA;**Summary**&#xD;&#xA;&#xD;&#xA;I'd recommend you to profile your application; get your real bottleneck in data you can see. Premature optimization can be shown (in this case) as unnecessary. However, that being said, if you'd discover a real performance loss in your application, given the *individual VBO:s* scenario, you can start implementing a single VBO.&#xD;&#xA;&#xD;&#xA;However, as long as it's not needed (the number of objects are low, not many state changes overall, etc) I'd recommend to go with individual VBO:s unless you see that's not gonna work.&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;I forgot to mention that it'd be alright with multiple draw calls. The most important thing in performance critical times is to keep the state changes at a minimum. You can simply set the number of indices to process and an offset for every draw call, and this is fine. But however, keep state changes as low as possible and make as few draw calls as possible, that's the big *hello* of this answer, or at least what I tried to say.&#xD;&#xA;" />
  <row Id="35097" PostHistoryTypeId="2" PostId="15459" RevisionGUID="e425c276-214c-446c-9a2e-b3e221d830a9" CreationDate="2011-08-01T22:03:30.993" UserId="8973" Text="What you're asking is related to [probability theory][1]. It's easiest to work with one reel, and then extend it to multiple reels once you understand how it works. &#xD;&#xA;&#xD;&#xA;Consider if you had a reel with 10 stops, and you have some symbols which you want to assign to spread to the stops. More symbols on a reel will lead to greater control over the final results, but will feel more &quot;random&quot; to the player. You want to balance the number of stops so it feels less random, and the player has more of a chance.&#xD;&#xA;&#xD;&#xA;If you had 10 symbols and 10 stops, each symbol would have a 1 in 10 chance of appearing. It doesn't matter what order the symbols are in (in theory, in practice the randomness of the game is only as good as your random number generator). In other words, you might expect to see 10 different symbols in 10 spins, or a different symbol on every spin. The chance of getting one particular symbol though, is 1 in 10. So for every 10 spins, you can expect to see a particular symbol only once. So if you picked 1 symbol to be the &quot;winning&quot; symbol, the player would have to play 10 times before they won. Now it's quite easy to work out the payout rating. If you charge them $1 for each spin, they will have to spend $10 before they win. So now it's easy to work out the pay-out, which is $10 x 0.95 = $9.50. In other words, the prize for landing on the &quot;winning&quot; symbol must be $9.50 to have an expected payout of 95%.  Now remember that this is all based on average. There's no guarantee that the symbol will appear in exactly 10 spins, it may take 100 or 1000 or 1 spin for it to appear, but taken over a long enough time the machine will pay the correct percentage on average.&#xD;&#xA;&#xD;&#xA;To getting this to work on multiple reels you need to multiply the winning probability of each real. Consider an example of 3 reels, with 10 symbols on each reel, and 1 winning symbol on each reel as in the previous example. Lets say you wanted the player to win only when all three reels show the winning symbol at the same time. To do this, you work out the probability for each reel, and then multiply them. So we know from the previous example that the probability is 1 in 10. This can also be written as 1/10, or 0.1. The probability of all three reels landing on the winning symbol at the same time is 1/10 x 1/10 x 1/10, or 0.1 x 0.1 x 0.1, or 0.001. Or 1 in 1000. So now we have a much lower probability of the winning combination appearing - the player would need to spin 1000 times on average before they win. If each spin was $1 they would need to spend $1000 to win. To calculate the winning percentage then is as before, $1000 x 0.95 = $950.00. &#xD;&#xA;&#xD;&#xA;The rest is balancing balancing the different to make the game appear more interesting.&#xD;&#xA;&#xD;&#xA;In your case, if you have 22 stops, and 16 symbols, it means you will have 6 symbols which are the same as one other symbol. How you work out the probability of each particular reel is really up to you, but lets say you have 15 unique symbols, and 7 which are all duplicates. The chance of any one of the duplicates appearing is 7 in 22, or 7/22, or 32%. If you had 1 reel, at $1 a spin, the player would land on one of the duplicates 32 times in 100 spins. The payout is calculated as (1 / (32/100)) x 0.95 x $cost. So if it cost $1 per spin, you would pay the player $2.97 every time one of the duplicates appeared. As another example, if you had 3 reels and it cost $2 per spin, you would work out the pay out as follows: (1 / (32/100 x 32/100 x 32/100)) x 0.95 x $cost = 30.5 x 0.95 x $2 = $57.95 payout. You can calculate the probabilities of the other non-duplicates as follows: (1 / (1/22 x 1/22 x 1/22)) x 0.95 x $cost = 10648 x 0.95 x $2 = $20231.20. That's quite a large number, but then the probability of any of the sequences appearing is quite low.&#xD;&#xA;&#xD;&#xA;In the last example the differences are quite extreme, the player either wins $58 very often, or $20231 almost never, with nothing in between. The art of making the game engaging is in creating more opportunities to win with varying amounts. This is often accomplished by mixing reels with different probabilities. So instead of each reel having  &#xD;&#xA;the same number of each symbol, one reel might have more symbols, or more of one type of symbol, and so on. The formula for calculating the probability is the same as previously, just use the correct ratios for each reel. For example, if you have one reel with 22 stops and 3 occurrences of a symbol, another reel with 26 stops and 2 occurrences of the symbol, and one more reel with 20 stops and 5 occurrences of the symbol, the formula would look like this: (1 / (3/22 x 2/26 x 5/20)) x 0.95 x $cost.&#xD;&#xA;&#xD;&#xA;And that's all there is to it. Hopefully I didn't make too many mistakes in the examples so you'll still be able to find it useful :P&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Probability_theory" />
  <row Id="35098" PostHistoryTypeId="16" PostId="15459" RevisionGUID="00457b50-f889-4a8d-9691-bc79852837fa" CreationDate="2011-08-01T22:03:30.993" UserId="8973" />
  <row Id="35099" PostHistoryTypeId="2" PostId="15460" RevisionGUID="8772ad3c-bb3a-4d0f-9564-cf7c3e6a804e" CreationDate="2011-08-01T22:12:25.350" UserId="8991" Text="Game programming isn't all that different from general purpose programming. Basic software development patterns and practices are still relevant in game programming and the more proficient you are with these, the better. Get yourself some decent books on general development practices, figure out which direction you want to go with game development, then go from there.&#xD;&#xA;&#xD;&#xA;Where you can get into trouble is finding solutions problems that you don't even have and then complicating your code beyond understanding to no benefit.&#xD;&#xA;&#xD;&#xA;My suggestion would be to start a project and find books/articles/resources that help you solve specific issues or problems that arise. Game development is so broad, that you more than likely will learn five useless or outdated things for each one practical one unless you focus your efforts.&#xD;&#xA;&#xD;&#xA;Also I know that game programming is an extension of general programming, but I think I've got that down. Like is there a cookbook of some sort?" />
  <row Id="35100" PostHistoryTypeId="1" PostId="15460" RevisionGUID="8772ad3c-bb3a-4d0f-9564-cf7c3e6a804e" CreationDate="2011-08-01T22:12:25.350" UserId="8991" Text="Language agnostic game programming books" />
  <row Id="35101" PostHistoryTypeId="3" PostId="15460" RevisionGUID="8772ad3c-bb3a-4d0f-9564-cf7c3e6a804e" CreationDate="2011-08-01T22:12:25.350" UserId="8991" Text="&lt;programming&gt;&lt;game-mechanics&gt;&lt;javascript&gt;" />
  <row Id="35102" PostHistoryTypeId="2" PostId="15461" RevisionGUID="7cf913e7-7cfa-4896-a49d-6a9dbf9c7a7e" CreationDate="2011-08-01T22:16:00.370" UserId="8993" Text="Also posted on StackOverflow, hope this isn't a problem.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Recently I've been writing a bot for a game which uses a DirectX backend for its rendering. I have managed to 'hack' the game into allowing me to run multiple instances. Unfortunately, this has taken a serious toll on my computer's CPU/RAM usage. I would like to optimize &amp; reduce the amount of resources each instance eats up. Thus, I have a couple of questions:&#xD;&#xA;&#xD;&#xA; - If I stop DirectX from rendering, will this increase performance?&#xD;&#xA; - How can I do so?&#xD;&#xA; &#xD;&#xA;I have a few ideas about how to do this - I'm guessing I can just hook the rendering function and force it to return without doing anything. My question though - **will doing so noticeably improve performance?**&#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated." />
  <row Id="35103" PostHistoryTypeId="1" PostId="15461" RevisionGUID="7cf913e7-7cfa-4896-a49d-6a9dbf9c7a7e" CreationDate="2011-08-01T22:16:00.370" UserId="8993" Text="DirectX - Stop rendering to lessen amount of resources used?" />
  <row Id="35104" PostHistoryTypeId="3" PostId="15461" RevisionGUID="7cf913e7-7cfa-4896-a49d-6a9dbf9c7a7e" CreationDate="2011-08-01T22:16:00.370" UserId="8993" Text="&lt;directx&gt;&lt;optimization&gt;&lt;resources&gt;" />
  <row Id="35105" PostHistoryTypeId="5" PostId="15459" RevisionGUID="7e34d2b2-9dff-422b-84de-c502576a0f1d" CreationDate="2011-08-01T22:24:47.950" UserId="8973" Comment="Cleaned up wording" Text="What you're asking is related to [probability theory][1]. It's easiest to work with one reel, and then extend it to multiple reels once you understand how it works. &#xD;&#xA;&#xD;&#xA;Consider if you had a reel you have some symbols which you want to assign to the stops. More symbols on a reel will lead to greater control over the final results, but will feel more random to the player. The goal is to balance the number of symbols and stops so the machine feels less random to the player, and like they have more of a chance.&#xD;&#xA;&#xD;&#xA;If you had 10 symbols and 10 stops, each symbol would have a 1 in 10 chance of appearing. It doesn't matter what order the symbols are in (in theory, in practice the randomness of the game is only as good as your random number generator). In other words, you might expect to see 10 different symbols in 10 spins, or a different symbol on every spin. The chance of getting one particular symbol is 1 in 10. So for every 10 spins, you can expect to see each individual symbol once. If you picked 1 symbol to be the &quot;winning&quot; symbol, the player would have to play 10 times before they won. With this information it's quite straight-forward to work out the payout. If you charge them $1 for each spin, they will have to spend $10 before they land on a win. If your expected rating is 95%, the calculation is $10 x 95% = $9.50. In other words, the prize for landing on the &quot;winning&quot; symbol must be $9.50 to have an expected payout of 95%.  Now remember that this is all based on average. There's no guarantee that the symbol will appear in exactly 10 spins, it may take 100 or 1000 spins, or even just 1 spin to appear. Taken over a long enough time the machine will pay the correct amount on on average.&#xD;&#xA;&#xD;&#xA;To getting this to work on multiple reels you need to multiply the winning probability of each reel. Consider an example of 3 reels with 10 symbols on each reel, and 1 winning symbol on each reel as in the previous example. Lets say you wanted the player to win only when all three reels show the winning symbol at the same time. To do this, you need to work out the probability for each reel, and then multiply the probabilities together. We know from the previous example that the probability is 1 in 10. This can also be written as 1/10, or 0.1. The probability of all three reels landing on the winning symbol at the same time is 1/10 x 1/10 x 1/10, or 0.1 x 0.1 x 0.1, or 0.001, or 1 in 1000. We see that there is a much lower probability of the winning symbol appearing on all three reels at the same time. The player would need to spin 1000 times on average before they win. If each spin was $1 they would need to spend $1000 to win. The calculation for the winning percentage then is: $1000 x 95%** = $950.00.  &#xD;&#xA;&#xD;&#xA;** Just a note, 95% is identical to 0.95.&#xD;&#xA;&#xD;&#xA;That's the theory in a nutshell. The rest is balancing balancing the different probabilities to make the game appear more interesting.&#xD;&#xA;&#xD;&#xA;In your case, if you have 22 stops and 16 symbols. This means you will have 6 symbols which are the same as at least one other symbol. The exact probability of any particular symbol appearing depends on the total number of occurrences of that symbol on the reel. How many of each symbol is on each reel is really up to you. &#xD;&#xA;&#xD;&#xA;As an example lets say you have 15 unique symbols, and 7 which are all duplicates. The chance of any one of the duplicates appearing is 7 in 22, or 7/22, or 32%. If you had 1 reel, at $1 a spin, the player would land on one of the duplicates 32 times in 100 spins. The payout is calculated as (1 / (32/100)) x 95% x $cost. So if it cost $1 per spin, you would pay the player $2.97 every time one of the duplicates appeared. &#xD;&#xA;&#xD;&#xA;As another example, if you had 3 reels and it cost $2 per spin, you would work out the pay out as follows: (1 / (32/100 x 32/100 x 32/100)) x 0.95 x $cost = 30.5 x 95% x $2 = $57.95 payout. You can calculate the probabilities of the other non-duplicates as follows: (1 / (1/22 x 1/22 x 1/22)) x 0.95 x $cost = 10648 x 0.95 x $2 = $20231.20. That's quite a large number, but then the probability of any of the winning sequences appearing is quite low (it's roughly 9x10^-5).&#xD;&#xA;&#xD;&#xA;In the last examples the differences are quite extreme, the player either wins $58 very often, or $20231 almost never, with no variation in between. The art of making the game engaging is in creating more opportunities to win with varying amounts. This is often accomplished by mixing reels with different probabilities. So instead of each reel having  &#xD;&#xA;the same number of each symbol, one reel might have more symbols, or more of one type of symbol, and so on. The formula for calculating the probability is the same as before, just remember to use the correct ratios for each reel. For example, if you have reel A with 22 stops and 3 occurrences of a symbol, reel B with 26 stops and 2 occurrences of the symbol, and reel C with 20 stops and 5 occurrences of the symbol, the formula would look like this: (1 / (3/22 x 2/26 x 5/20)) x 95% x $cost.&#xD;&#xA;&#xD;&#xA;And that's all there is to it. Hopefully I didn't make too many mistakes in the examples so you'll still be able to find it useful :P&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Probability_theory" />
  <row Id="35106" PostHistoryTypeId="5" PostId="15459" RevisionGUID="2e33dcde-00c0-426c-8060-146e7fd3296f" CreationDate="2011-08-01T22:30:08.023" UserId="8973" Comment="Cleaned up wording, added a note on notation" Text="What you're asking is related to [probability theory][1]. It's easiest to work with one reel, and then extend it to multiple reels once you understand how it works. &#xD;&#xA;&#xD;&#xA;Consider if you had a reel you have some symbols which you want to assign to the stops. More symbols on a reel will lead to greater control over the final results, but will feel more random to the player. The goal is to balance the number of symbols and stops so the machine feels less random to the player, and like they have more of a chance.&#xD;&#xA;&#xD;&#xA;If you had 10 symbols and 10 stops, each symbol would have a 1 in 10 chance of appearing. It doesn't matter what order the symbols are in (in theory, in practice the randomness of the game is only as good as your random number generator). In other words, you might expect to see 10 different symbols in 10 spins, or a different symbol on every spin. The chance of getting one particular symbol is 1 in 10. So for every 10 spins, you can expect to see each individual symbol once. If you picked 1 symbol to be the &quot;winning&quot; symbol, the player would have to play 10 times before they won. With this information it's quite straight-forward to work out the payout. If you charge them $1 for each spin, they will have to spend $10 before they land on a win. If your expected rating is 95%, the calculation is $10 x 95% = $9.50. In other words, the prize for landing on the &quot;winning&quot; symbol must be $9.50 to have an expected payout of 95%.  Now remember that this is all based on average. There's no guarantee that the symbol will appear in exactly 10 spins, it may take 100 or 1000 spins, or even just 1 spin to appear. Taken over a long enough time the machine will pay the correct amount on on average.&#xD;&#xA;&#xD;&#xA;To getting this to work on multiple reels you need to multiply the winning probability of each reel. Consider an example of 3 reels with 10 symbols on each reel, and 1 winning symbol on each reel as in the previous example. Lets say you wanted the player to win only when all three reels show the winning symbol at the same time. To do this, you need to work out the probability for each reel, and then multiply the probabilities together. We know from the previous example that the probability is 1 in 10. This can also be written as 1/10, or 0.1. The probability of all three reels landing on the winning symbol at the same time is 1/10 x 1/10 x 1/10, or 0.1 x 0.1 x 0.1, or 0.001, or 1 in 1000. We see that there is a much lower probability of the winning symbol appearing on all three reels at the same time. The player would need to spin 1000 times on average before they win. If each spin was $1 they would need to spend $1000 to win. The calculation for the winning percentage then is: $1000 x 95%** = $950.00.  &#xD;&#xA;&#xD;&#xA;That's the theory in a nutshell. The rest is balancing balancing the different probabilities to make the game appear more interesting.&#xD;&#xA;&#xD;&#xA;In your case, if you have 22 stops and 16 symbols. This means you will have 6 symbols which are the same as at least one other symbol. The exact probability of any particular symbol appearing depends on the total number of occurrences of that symbol on the reel. How many of each symbol is on each reel is really up to you. &#xD;&#xA;&#xD;&#xA;As an example lets say you have 15 unique symbols, and 7 which are all duplicates. The chance of any one of the duplicates appearing is 7 in 22, or 7/22, or 32%. If you had 1 reel, at $1 a spin, the player would land on one of the duplicates 32 times in 100 spins. The payout is calculated as (1 / (32/100)) x 95% x $cost. So if it cost $1 per spin, you would pay the player $2.97 every time one of the duplicates appeared. &#xD;&#xA;&#xD;&#xA;As another example, if you had 3 reels and it cost $2 per spin, you would work out the pay out as follows: (1 / (32/100 x 32/100 x 32/100)) x 0.95 x $cost = 30.5 x 95% x $2 = $57.95 payout. You can calculate the probabilities of the other non-duplicates as follows: (1 / (1/22 x 1/22 x 1/22)) x 0.95 x $cost = 10648 x 0.95 x $2 = $20231.20. That's quite a large number, but then the probability of any of the winning sequences appearing is quite low (it's roughly 9x10^-5).&#xD;&#xA;&#xD;&#xA;In the last examples the differences are quite extreme, the player either wins $58 very often, or $20231 almost never, with no variation in between. The art of making the game engaging is in creating more opportunities to win with varying amounts. This is often accomplished by mixing reels with different probabilities. So instead of each reel having  &#xD;&#xA;the same number of each symbol, one reel might have more symbols, or more of one type of symbol, and so on. The formula for calculating the probability is the same as before, just remember to use the correct ratios for each reel. For example, if you have reel A with 22 stops and 3 occurrences of a symbol, reel B with 26 stops and 2 occurrences of the symbol, and reel C with 20 stops and 5 occurrences of the symbol, the formula would look like this: (1 / (3/22 x 2/26 x 5/20)) x 95% x $cost.&#xD;&#xA;&#xD;&#xA;And that's all there is to it. Hopefully I didn't make too many mistakes in the examples so you'll still be able to find it useful :P&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;** A note on notation, 95% is identical to 0.95. 32/100 is identical to 0.32, 7/22 is identical to 0.31818.. etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Probability_theory" />
  <row Id="35107" PostHistoryTypeId="5" PostId="3137" RevisionGUID="9c9298ac-ec41-4da2-b423-6a02b5af0972" CreationDate="2011-08-01T22:51:43.283" UserId="3327" Comment="made links into links" Text="How-to:&#xD;&#xA;&#xD;&#xA;[www.gamasutra.com/view/feature/4117/building_buzz_for_indie_games.php][1]&#xD;&#xA;&#xD;&#xA;How to deal with the press:&#xD;&#xA;&#xD;&#xA;[gillen.cream.org/wordpress_html/?page_id=693][2]&#xD;&#xA;&#xD;&#xA;List of PC game reviewers:&#xD;&#xA;&#xD;&#xA;[fallout.bethsoft.com/eng/links/fallout3-reviews.php][3]&#xD;&#xA;&#xD;&#xA;Marketing Book:&#xD;&#xA;&#xD;&#xA;[www.sellmorevideogames.com][4]&#xD;&#xA;&#xD;&#xA;Viral Marketing&#xD;&#xA;&#xD;&#xA;[www.gamasutra.com/view/feature/4210/building_the_foundation_of_a_.php][5]&#xD;&#xA;&#xD;&#xA;Marketing for Indie Games&#xD;&#xA;&#xD;&#xA;[www.slideshare.net/simoniker/igs-gdc-austin-john-graham-effective-marketing-for-indie-game-developers?src=related_normal&amp;rel=2670032][6]&#xD;&#xA;&#xD;&#xA;Indie Press Release service&#xD;&#xA;&#xD;&#xA;[www.gamerelease.net][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/4117/building_buzz_for_indie_games.php&#xD;&#xA;  [2]: http://gillen.cream.org/wordpress_html/?page_id=693&#xD;&#xA;  [3]: http://fallout.bethsoft.com/eng/links/fallout3-reviews.php&#xD;&#xA;  [4]: http://www.sellmorevideogames.com&#xD;&#xA;  [5]: http://www.gamasutra.com/view/feature/4210/building_the_foundation_of_a_.php&#xD;&#xA;  [6]: http://www.slideshare.net/simoniker/igs-gdc-austin-john-graham-effective-marketing-for-indie-game-developers?src=related_normal&amp;rel=2670032&#xD;&#xA;  [7]: http://www.gamerelease.net" />
  <row Id="35108" PostHistoryTypeId="16" PostId="15460" RevisionGUID="8c32cf98-1753-44f9-a9db-b491b033059e" CreationDate="2011-08-01T23:35:53.203" UserId="51" />
  <row Id="35109" PostHistoryTypeId="2" PostId="15462" RevisionGUID="4178c04a-99d9-4d09-a351-0aca3c093e2c" CreationDate="2011-08-01T23:43:25.047" UserId="1430" Text="If you stop D3D from rendering -- typically by [detouring the D3D calls][1] directly -- you *may* see an increase in performance. It will depend primarily on whether the application's performance is actually bound by limitations on the GPUs resources. &#xD;&#xA;&#xD;&#xA;You may also destabilize the game, which may be making some decisions based on responses it gets from the GPU (for example by using [queries][2]) which it will of course no longer get, since you suppressed transmission of any commands to the device. Ideally of course, rendering and game logic are wholly separate, but sometimes this isn't the case.&#xD;&#xA;&#xD;&#xA;You'll probably have to do a fair bit of juggling and balancing what you detour. You could, for example, allow all resource creation to succeed so that you don't have to deal with the game not coping with your proxy resources (which may not match its internal validation), but if the problem you're seeing with performance is that you're overloading the resources stored on the GPU, you will not see any benefit from this approach. &#xD;&#xA;&#xD;&#xA;If at possible, profile before you commit to a lot of work. Use Resource Monitor to watch system [performance counters][3] and be aware of the [complexities of profiling the GPU][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dxresearch.codeplex.com/&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/bb147308%28v=vs.85%29.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/aa373083%28v=vs.85%29.aspx&#xD;&#xA;  [4]: http://msdn.microsoft.com/en-us/library/bb172234%28v=vs.85%29.aspx" />
  <row Id="35110" PostHistoryTypeId="6" PostId="15460" RevisionGUID="542bd684-ee2b-43f3-b4d9-6ae2e030866c" CreationDate="2011-08-01T23:46:11.300" UserId="1430" Comment="The question appears to have no relationship to javascript at all; tag removed" Text="&lt;programming&gt;&lt;game-mechanics&gt;" />
  <row Id="35111" PostHistoryTypeId="2" PostId="15463" RevisionGUID="d8da9ebe-6ced-455c-ac40-22136b9d3fb5" CreationDate="2011-08-01T23:48:01.790" UserId="8962" Text="Solved using a slightly modified version of the code found here:&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/12059/why-do-objects-interpenetrate-in-this-simple-collision-solver&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;&#xD;&#xA;Ben.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35112" PostHistoryTypeId="5" PostId="15440" RevisionGUID="b18ecff5-b28f-4e18-85ac-e8068e9e2da3" CreationDate="2011-08-01T23:57:35.830" UserId="8770" Comment="added 43 characters in body; added 29 characters in body; added 2 characters in body" Text="Also, Battlefield Heroes, the cartoony version of battlefield&#xD;&#xA;&#xD;&#xA;And, BattleField 2 and 2142&#xD;&#xA;&#xD;&#xA;http://wiki.python.org/moin/PythonGames" />
  <row Id="35113" PostHistoryTypeId="5" PostId="15440" RevisionGUID="407395bb-7b08-4f46-a432-ff44727e3413" CreationDate="2011-08-02T00:10:56.903" UserId="8770" Comment="added 67 characters in body" Text="Also, Battlefield Heroes, the cartoony version of battlefield (Handles most of the game logic)&#xD;&#xA;&#xD;&#xA;And, BattleField 2 and 2142 (For logic and server controls)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;http://wiki.python.org/moin/PythonGames" />
  <row Id="35114" PostHistoryTypeId="25" PostId="15448" RevisionGUID="3111eaa6-d933-4b10-8625-f56a7fdfa702" CreationDate="2011-08-02T00:35:40.977" Comment="http://twitter.com/#!/StackGameDev/status/98190192569106434" />
  <row Id="35115" PostHistoryTypeId="2" PostId="15464" RevisionGUID="63e9cdbf-6b15-4a73-93d4-a4fe8377ca42" CreationDate="2011-08-02T00:43:02.947" UserId="6098" Text="Fixed it by discovering just how silly I am.&#xD;&#xA;&#xD;&#xA;When I create my rendertarget I create a Texture2DArray but I'm treating it like an array of Texture2D objects, instead of one object. I have since altered my code to use an array of Texture2D objects and it works very well." />
  <row Id="35116" PostHistoryTypeId="2" PostId="15465" RevisionGUID="1183e0dc-d549-4976-9e94-a60b4b52abe5" CreationDate="2011-08-02T00:54:15.823" UserId="160" Text="Try this in Photoshop:&#xD;&#xA;&#xD;&#xA;1. Make a new document.&#xD;&#xA;2. Make a new layer. It will be transparent.&#xD;&#xA;3. Delete the background layer.&#xD;&#xA;4. Your document should be all transparent now. It will look like a checkerboard.&#xD;&#xA;5. Draw the hexagon onto that transparent layer.&#xD;&#xA;6. Save this as a 24-bit PNG with transparency.&#xD;&#xA;&#xD;&#xA;Now bring that into PyGame. You may need to do some `convert_alpha()` thing to enable the alpha channel. That should give you correct anti-aliased transparency." />
  <row Id="35117" PostHistoryTypeId="2" PostId="15466" RevisionGUID="790d365b-4331-44e5-bf0b-a69174c82a4d" CreationDate="2011-08-02T01:03:15.773" UserId="3990" Text="1) Friction is the correct solution. It's what keeps you on a moving thing in real life. Once the person has accelerated to the same speed as the platform, inertia will keep them on it. If a platform moves down and sideways at the same time, a player might still appear to 'float off' if they don't fall fast enough to keep up with the platform.&#xD;&#xA;&#xD;&#xA;1.5 and 2) The platform should (probably) be a kinematic body. As one, it won't respond to collisions, so it will never rotate, and the player won't be able to push it to the ground. If your physics library doesn't support kinematic bodies, it might have angular inertia, which can be set to an absurdly high value. &#xD;&#xA;&#xD;&#xA;3) I've never done this with tiles, but I have with worlds that had little corners the player could get stuck on. My solution was to make the player out of two shapes, a circular 'foot' and a rectangular body. The round foot slid easily over small corners and up slopes.&#xD;&#xA;&#xD;&#xA;4) You're probably better off with fewer, larger shapes. Depending on the library, it may perform better with slightly more convex shapes rather than fewer concave ones. A torus is impossible if you use only convex shapes.&#xD;&#xA;&#xD;&#xA;5) This sounds like a value you'll have to experiment with. Not knowing specifics of the library, I would guess that a smaller value trades performance for accuracy." />
  <row Id="35118" PostHistoryTypeId="5" PostId="15460" RevisionGUID="7154ef3f-2817-43d9-a888-2347e51cb96b" CreationDate="2011-08-02T01:53:57.867" UserId="8991" Comment="added 197 characters in body" Text="Was wondering if anyone knew any good language independent game programming books? My problem is that I'm a college student with a busy schedule, so I'm not quite up to learning yet another language at the time being. And most game development books are targeted towards C/C++/C# variants. The languages I have a good understanding of are Javascript, Python, Scheme/Lisp, some light Vala. I would go to some c# books but my os is linux and I don't know about the whole mono thing when most C# books use XNA.&#xD;&#xA;&#xD;&#xA;Maybe I'll just do some html5 canvas or pygame stuff, but in the mean time I know nothing about game programming or practices! Any good books just about the practices of building a game's structure? Like scene-graphs, handling sprites, layers, collision detection, effects, events? Or at least agnostic enough that I could easily translate their code structures to javascript or python? I think I'm a pretty confident enough programmer to be able to pull off anything I see in another language in my languages&#xD;&#xA;&#xD;&#xA;Also I know that game programming is an extension of general programming, but I think I've got that down. Like is there a cookbook of some sort?" />
  <row Id="35119" PostHistoryTypeId="2" PostId="15467" RevisionGUID="f0484773-acda-4630-baca-64df5f559bcd" CreationDate="2011-08-02T03:30:27.860" UserId="8072" Text="Try changing b2_velocityThreshold variable in b2Settings.h - this setting keeps the simulation stable by ignoring tiny bounces but that's probably not what you want in a billiards game." />
  <row Id="35120" PostHistoryTypeId="25" PostId="15433" RevisionGUID="4db16944-ac55-4fae-92af-94e1b37eb702" CreationDate="2011-08-02T03:36:41.607" Comment="http://twitter.com/#!/StackGameDev/status/98235745470386177" />
  <row Id="35121" PostHistoryTypeId="2" PostId="15468" RevisionGUID="747d83b5-536f-43aa-801e-6a9f60e9627b" CreationDate="2011-08-02T04:49:42.880" UserId="6188" Text="I'm writing a component-based entity system and one of the components is the entity's state, which dictates how it reacts to game events. In case anyone has experience with implementing states, how granular should they be? &#xD;&#xA;&#xD;&#xA;To give you an idea about how granular they are in my case, I have a `WalkingLeft` state and a `WalkingRight` state (as opposed to simply a `Walking` state) and I fear that they might be too granular. What do you think?" />
  <row Id="35122" PostHistoryTypeId="1" PostId="15468" RevisionGUID="747d83b5-536f-43aa-801e-6a9f60e9627b" CreationDate="2011-08-02T04:49:42.880" UserId="6188" Text="How granular should entity states be?" />
  <row Id="35123" PostHistoryTypeId="3" PostId="15468" RevisionGUID="747d83b5-536f-43aa-801e-6a9f60e9627b" CreationDate="2011-08-02T04:49:42.880" UserId="6188" Text="&lt;state&gt;&lt;entity-system&gt;" />
  <row Id="35124" PostHistoryTypeId="5" PostId="10922" RevisionGUID="eca9ff63-380e-4676-ae8f-c3039f862407" CreationDate="2011-08-02T04:59:38.103" UserId="1430" Comment="deleted 41 characters in body; edited title" Text="I setup a simple simulation environment something like billiards. There are four circle balls (dynamic) and four box walls (static).&#xD;&#xA;&#xD;&#xA;Simulation works... except one thing. Sometimes when a ball rest against a wall, it sticks to the wall eternally. The other balls hits the stuck ball so many times, but the ball never wants to separated with the wall. The only situation where the ball will become unstuck from the wall is another if another ball is rests against the same wall such that it hits the already-stuck ball.&#xD;&#xA;&#xD;&#xA;Why does this situation occur? How can I avoid it?" />
  <row Id="35125" PostHistoryTypeId="4" PostId="10922" RevisionGUID="eca9ff63-380e-4676-ae8f-c3039f862407" CreationDate="2011-08-02T04:59:38.103" UserId="1430" Comment="deleted 41 characters in body; edited title" Text="Why are my objects becoming permanently stuck to walls using Box2D?" />
  <row Id="35126" PostHistoryTypeId="5" PostId="15460" RevisionGUID="13887c57-7c11-49c9-97e8-6c6ce7c4d81e" CreationDate="2011-08-02T05:47:05.427" UserId="2698" Comment="Attempting to trim the fat and make this more readable and to-the-point." Text="Does anyone know any good language independent game programming books?&#xD;&#xA;&#xD;&#xA;I don't currently know anything about game programming or practices - any good books on stuff like: scene-graphs, handling sprites, layers, collision detection, effects, events?&#xD;&#xA;&#xD;&#xA;I'm a college student without the time to learn a new language so the concepts need to be language-agnostic enough they can fit into the languages I know: Javascript, Python, Scheme/Lisp and some light Vala (I'm considering using HTML5 or PyGame). I would use C# books but my OS is Linux and I don't know about the whole mono thing when most C# books use XNA.&#xD;&#xA;&#xD;&#xA;Also I know that game programming is an extension of general programming, but I think I've got that down. Like is there a cookbook of some sort?" />
  <row Id="35127" PostHistoryTypeId="2" PostId="15469" RevisionGUID="9c6980e6-5da7-47fe-824e-57e8e98a8afc" CreationDate="2011-08-02T06:29:06.487" UserId="6867" Text="In XNA, the spritefont technology is horrible. Nuclex does the job so much better, but I don't want to have any external references, and I'm nearly done with my game.&#xD;&#xA;&#xD;&#xA;When using fonts like Sansation or Quicksand, it looks terrible in smaller sizes of the fonts. It's so bad!&#xD;&#xA;&#xD;&#xA;Is there a known workaround for this? I tried setting the fontsizes to extremely high, and then scaling them down in the spritebatch with no luck." />
  <row Id="35128" PostHistoryTypeId="1" PostId="15469" RevisionGUID="9c6980e6-5da7-47fe-824e-57e8e98a8afc" CreationDate="2011-08-02T06:29:06.487" UserId="6867" Text="XNA - Why is the spritefont tech so bad?" />
  <row Id="35129" PostHistoryTypeId="3" PostId="15469" RevisionGUID="9c6980e6-5da7-47fe-824e-57e8e98a8afc" CreationDate="2011-08-02T06:29:06.487" UserId="6867" Text="&lt;xna&gt;&lt;fonts&gt;" />
  <row Id="35130" PostHistoryTypeId="25" PostId="15469" RevisionGUID="29462770-8136-4089-8881-023b38360c7a" CreationDate="2011-08-02T06:36:41.980" Comment="http://twitter.com/#!/StackGameDev/status/98281045807476736" />
  <row Id="35131" PostHistoryTypeId="2" PostId="15470" RevisionGUID="56bff5c7-3d9a-4e5a-9877-b8a520e4e82a" CreationDate="2011-08-02T06:46:04.517" UserId="2698" Text="You could use [pixel fonts](http://www.dafont.com/bitmap.php):&#xD;&#xA;&#xD;&#xA;![pf tempesta variant](http://www.dafont.com/img/preview/p/f/pf_tempesta_five2.png)&#xD;&#xA;&#xD;&#xA;If you use the optimal size of the font you choose you'll be guaranteed text that will be small and yet attractive and reasonable, because XNA will never have to do any antialiasing - which is where XNA's Sprite Fonts break down ([this article](http://www.nuclex.org/blog/2-gamedev/113-xna-sprite-font-quality) examines the anti-aliasing of XNA and Nuclex).&#xD;&#xA;&#xD;&#xA;The only downside is if you increase the font size, it must be 2x, 3x, 4x... the optimal size. No 1.5x, etc or it'll look terrible and get anti-aliased." />
  <row Id="35132" PostHistoryTypeId="4" PostId="15469" RevisionGUID="8bd91c2e-84f7-4965-bc8a-98992103373e" CreationDate="2011-08-02T06:49:42.243" UserId="2698" Comment="Let's give this a title that actually has something to do with the question" Text="How do I get attractive small text in XNA without using external libraries?" />
  <row Id="35133" PostHistoryTypeId="24" PostId="15469" RevisionGUID="8bd91c2e-84f7-4965-bc8a-98992103373e" CreationDate="2011-08-02T06:49:42.243" Comment="Proposed by 2698 approved by 51 edit id of 591" />
  <row Id="35134" PostHistoryTypeId="5" PostId="15470" RevisionGUID="6ea55013-7ecc-4b02-bc11-6ed7974cefc8" CreationDate="2011-08-02T06:52:55.243" UserId="2698" Comment="Rephrased" Text="You could use [pixel fonts](http://www.dafont.com/bitmap.php):&#xD;&#xA;&#xD;&#xA;![pf tempesta variant](http://www.dafont.com/img/preview/p/f/pf_tempesta_five2.png)&#xD;&#xA;&#xD;&#xA;When you use a pixel font at the font size it was designed for (or a whole multiple of it, e.g. 2x, 3x, 4x) you are guaranteed pixel-perfect text that requires no anti-aliasing. This means you never have to deal with the terrible anti-aliasing which makes XNA's sprite fonts so bad and Nuclex so good ([see this examination/comparison](http://www.nuclex.org/blog/2-gamedev/113-xna-sprite-font-quality))." />
  <row Id="35135" PostHistoryTypeId="5" PostId="15470" RevisionGUID="b4ecbaac-c571-4c7a-9b98-849c011f19c1" CreationDate="2011-08-02T07:09:24.923" UserId="2698" Comment="added 3 characters in body; added 25 characters in body" Text="You could use [pixel fonts](http://www.dafont.com/bitmap.php):&#xD;&#xA;&#xD;&#xA;![pf tempesta variant](http://www.dafont.com/img/preview/p/f/pf_tempesta_five2.png)&#xD;&#xA;&#xD;&#xA;When you use a pixel font at the font size it was designed for (or a whole multiple of it, e.g. 2x, 3x, 4x) you are guaranteed pixel-perfect text that requires no anti-aliasing. This means you never have to deal with the terrible anti-aliasing which makes XNA's sprite fonts so bad and Nuclex so much better. ([This article](http://www.nuclex.org/blog/2-gamedev/113-xna-sprite-font-quality) examines that problem and compares them)" />
  <row Id="35136" PostHistoryTypeId="12" PostId="15470" RevisionGUID="d5a5a47b-658b-42f8-832b-d25c34107ccd" CreationDate="2011-08-02T08:23:04.160" UserId="2698" Text="[{&quot;Id&quot;:2698,&quot;DisplayName&quot;:&quot;Jonathan Hobbs&quot;}]" />
  <row Id="35137" PostHistoryTypeId="2" PostId="15471" RevisionGUID="34b8e166-ffbd-49b1-a6a8-905c2f121c11" CreationDate="2011-08-02T08:33:46.543" UserId="20" Text="While I would personally resort to munificents solution, here's a way to get a crisp sprite using [ImageMagick][1].&#xD;&#xA;&#xD;&#xA;Use the tool of your choice to draw your sprite. Export it as PNG with alpha channel. Your exported image might look like this:&#xD;&#xA;&#xD;&#xA;![sprite with alpha][2]&#xD;&#xA;&#xD;&#xA;Then you can use ImageMagick to convert this image to a sprite with magenta background using the following command:&#xD;&#xA;&#xD;&#xA;    convert sourceFile.png -channel alpha -threshold 50% -background &quot;#ff00ff&quot; -flatten destFile.png&#xD;&#xA;&#xD;&#xA;The resulting file should look like this:&#xD;&#xA;&#xD;&#xA;![alpha flattened image][3]&#xD;&#xA;&#xD;&#xA;You can tweak the resulting &quot;alpha&quot; by changing the [threshold][4] parameter. And since this is ImageMagick, you can also easily batch convert lots of sprites.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.imagemagick.org&#xD;&#xA;  [2]: http://i.stack.imgur.com/5llMp.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/KDjnl.png&#xD;&#xA;  [4]: http://www.imagemagick.org/script/command-line-options.php#threshold" />
  <row Id="35138" PostHistoryTypeId="2" PostId="15472" RevisionGUID="9ee8f20e-ca8a-4c1f-9a68-52c165637452" CreationDate="2011-08-02T09:09:21.153" UserId="8665" Text="You'd be better picking up a book in a language you know well already. The principles will translate OK to other languages once you've grasped them in one.&#xD;&#xA;&#xD;&#xA;If you have more book ideas for game developers please submit them here: http://www.google.com/moderator/#15/e=7d41d&amp;t=7d41d.40 Thanks!" />
  <row Id="35139" PostHistoryTypeId="16" PostId="15472" RevisionGUID="040e0221-baf2-45ea-95e9-7e3efd803bf1" CreationDate="2011-08-02T09:09:21.153" UserId="8665" />
  <row Id="35140" PostHistoryTypeId="4" PostId="15469" RevisionGUID="5e69ae81-90cf-4ab4-b234-0bfa6bb6a3c8" CreationDate="2011-08-02T09:21:44.843" UserId="6867" Comment="edited title" Text="How do I get beautiful small text in XNA without using external libraries?" />
  <row Id="35141" PostHistoryTypeId="25" PostId="15442" RevisionGUID="e28b465c-c43f-4627-a577-f56a6d8ff3c9" CreationDate="2011-08-02T09:36:41.630" Comment="http://twitter.com/#!/StackGameDev/status/98326343401480192" />
  <row Id="35142" PostHistoryTypeId="2" PostId="15473" RevisionGUID="73bdead1-2d89-4623-b91c-36f5c8a58870" CreationDate="2011-08-02T10:08:45.940" UserId="9002" Text="XNA [lets you import a texture as a spritefont](http://blogs.msdn.com/b/shawnhar/archive/2007/04/26/bitmap-fonts-in-xna.aspx). You can probably get better hinting and anti-aliasing in your font if you lay each character out manually in a good image editing program, rather than relying on the sprite sheet that XNA generates." />
  <row Id="35143" PostHistoryTypeId="2" PostId="15474" RevisionGUID="629461cc-8a61-41fa-be08-9d9076d9e264" CreationDate="2011-08-02T11:24:39.433" UserId="8776" Text="I have coded myself a OpenGL BSP viewer for an old game format. It is very similar to the Quake 3 file format. Because my interest is developing graphics engines, I want to be developing while looking at using current technology. So I turn to you, the experts on the subject for direction of what to focus on. I would like this to be as fast as possible and considering the old file formats are very simple and have few polygons, I think it should be doable. Here are my questions:&#xD;&#xA;&#xD;&#xA;1. Lighting&#xD;&#xA;a. Does it make sense for me to learn vertex lighting or should I just implement per pixel lighting instead? &#xD;&#xA;b .I know OpenGL has an 8 light limit. Should I realistically only use one of those for ambient light and the rest computer through shaders? If not, what should I do?&#xD;&#xA;&#xD;&#xA;2. Sorting/Culling&#xD;&#xA;a. What is the fastest most common used algorithm for sorting surfaces to render. Complexity is not really an issue. I want to learn what is currently being used and ways to really only render the things I can see. I have seen a number of algorithms described like the painter's algorithm and am wondering what makes the most sense for BSP based geometry.&#xD;&#xA;b. If I have textures with alpha masks, I was told that sorting has some sort of involvement with this process. How do I allow them to render correctly in 3d space?&#xD;&#xA;&#xD;&#xA;3. Graphics Pipeline&#xD;&#xA;a. Should I be sending my geometry data via VBOs? Is this the standard used today? &#xD;&#xA;b. If I have a number of &quot;regions&quot;, possibly 200-300, should I find a better way to send them to the GPU without sending 200-300 chunks. Should I combine them into one and keep a reference associated with each.&#xD;&#xA;&#xD;&#xA;Any other tips for BSP based rendering and things of that nature?&#xD;&#xA;&#xD;&#xA;Also, if I said something that was incorrect, please correct me. I'm that person who would rather be corrected and slightly embarrassed than ignorant and unaware.&#xD;&#xA;&#xD;&#xA;Thank you for your time. I really do appreciate it." />
  <row Id="35144" PostHistoryTypeId="1" PostId="15474" RevisionGUID="629461cc-8a61-41fa-be08-9d9076d9e264" CreationDate="2011-08-02T11:24:39.433" UserId="8776" Text="Need advice for 3D BSP based graphics engine" />
  <row Id="35145" PostHistoryTypeId="3" PostId="15474" RevisionGUID="629461cc-8a61-41fa-be08-9d9076d9e264" CreationDate="2011-08-02T11:24:39.433" UserId="8776" Text="&lt;opengl&gt;&lt;engine&gt;&lt;bsp&gt;" />
  <row Id="35146" PostHistoryTypeId="5" PostId="15460" RevisionGUID="5d2d2fae-fa3e-4c92-ba2f-a5b523e3b44d" CreationDate="2011-08-02T11:27:19.523" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicates:**  &#xA;&gt; [Game programming books that don&amp;#39;t teach programming?](http://gamedev.stackexchange.com/questions/11948/game-programming-books-that-dont-teach-programming)  &#xA;&gt; [Must read game development books](http://gamedev.stackexchange.com/questions/1265/must-read-game-development-books)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Does anyone know any good language independent game programming books?&#xD;&#xA;&#xD;&#xA;I don't currently know anything about game programming or practices - any good books on stuff like: scene-graphs, handling sprites, layers, collision detection, effects, events?&#xD;&#xA;&#xD;&#xA;I'm a college student without the time to learn a new language so the concepts need to be language-agnostic enough they can fit into the languages I know: Javascript, Python, Scheme/Lisp and some light Vala (I'm considering using HTML5 or PyGame). I would use C# books but my OS is Linux and I don't know about the whole mono thing when most C# books use XNA.&#xD;&#xA;&#xD;&#xA;Also I know that game programming is an extension of general programming, but I think I've got that down. Like is there a cookbook of some sort?" />
  <row Id="35147" PostHistoryTypeId="10" PostId="15460" RevisionGUID="fef29f61-1a89-4c1d-b109-2a5ee02e51fb" CreationDate="2011-08-02T11:27:18.680" UserId="-1" CloseReasonId="1" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:160,&quot;DisplayName&quot;:&quot;munificent&quot;},{&quot;Id&quot;:1156,&quot;DisplayName&quot;:&quot;The Communist Duck&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;}]" />
  <row Id="35148" PostHistoryTypeId="25" PostId="15474" RevisionGUID="8a8011ee-7ace-450e-85b9-aeef1e625ad2" CreationDate="2011-08-02T12:36:41.773" Comment="http://twitter.com/#!/StackGameDev/status/98371642601906176" />
  <row Id="35149" PostHistoryTypeId="2" PostId="15475" RevisionGUID="d346aa80-e32c-4aa4-bae5-e799e0e6b86e" CreationDate="2011-08-02T12:41:06.573" UserId="8279" Text="So I love javascript as a language and how it is able to be run anywhere. I'm gonna enumerate my concerns:&#xD;&#xA;&#xD;&#xA;Does it make sense to make money from javascript? I mean, the second I publish my game online, people can download it, and post it on their own site and put their own ads into the game.&#xD;&#xA;There are rumors that Facebook is working on an HTML5 platform. Still, even if you require the use of secret keys with your online part of the game, people can still just download the source code and implement their own online version. It's a little inconvenient, but the game itself didn't lose any value. They just need to build their own community now - which should be easy with a great game.&#xD;&#xA;I don't have a smartphone, can someone explain if it's possible to view the source if I publish my game as a javascript application? (maybe it's wrapped into native code by the marketplace, I would appreciate the information)&#xD;&#xA;&#xD;&#xA;I know Flash is somewhat similar, but it's my understanding that good obfuscators can effectively make the source code so ugly that it would be a mountain of work to modify.&#xD;&#xA;Native games can be cracked too of course, but that doesn't mean they have the source code. They'll still rely on my online part and my updates to the game.&#xD;&#xA;&#xD;&#xA;Tell me I'm not paranoid :)&#xD;&#xA;How can someone justify spending resources on a javascript game?" />
  <row Id="35150" PostHistoryTypeId="1" PostId="15475" RevisionGUID="d346aa80-e32c-4aa4-bae5-e799e0e6b86e" CreationDate="2011-08-02T12:41:06.573" UserId="8279" Text="Are commercial javascript games sensible?" />
  <row Id="35151" PostHistoryTypeId="3" PostId="15475" RevisionGUID="d346aa80-e32c-4aa4-bae5-e799e0e6b86e" CreationDate="2011-08-02T12:41:06.573" UserId="8279" Text="&lt;javascript&gt;&lt;commercial&gt;" />
  <row Id="35152" PostHistoryTypeId="2" PostId="15476" RevisionGUID="f3ea176b-f4df-44c9-9007-ca1b0e569e60" CreationDate="2011-08-02T13:10:56.797" UserId="288" Text="The XNA sprite font processor uses DXT3 compression that does not work well with the new premultiplied alpha in XNA 4.0. Hence the blocky look of the text.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;https://devel.nuclex.org/framework/wiki/SpriteFonts&quot;&gt;The Nuclex sprite font processor&lt;/a&gt; outputs exactly the same data, except that the internal `Texture2D` that holds the font bitmap data is not compressed - so it has no quality issues.&#xD;&#xA;&#xD;&#xA;Because the data from the Nuclex processor is in the same format, the XNA `SpriteFont` reader can read it, and **you do not need to include any Nuclex libraries for distribution with your game.**&#xD;&#xA;&#xD;&#xA;(It also conveniently allows you to use the same XML format as XNA's native sprite font definitions.)&#xD;&#xA;&#xD;&#xA;That being said: there's nothing wrong with bundling external libraries with your game. It's not like they get installed on your system or anything. (You could even go so far as to merge the two assemblies).&#xD;&#xA;&#xD;&#xA;And the same thing goes for the code (if you're worried about version control, for example). You can just put `Nuclex.Fonts.Content.TrueTypeImporter.dll` in with your source code. It's actually not a big deal." />
  <row Id="35153" PostHistoryTypeId="13" PostId="15470" RevisionGUID="2f48ffd1-9df3-4031-a779-be0a275b7801" CreationDate="2011-08-02T13:16:24.327" UserId="2698" Text="[{&quot;Id&quot;:2698,&quot;DisplayName&quot;:&quot;Jonathan Hobbs&quot;}]" />
  <row Id="35154" PostHistoryTypeId="2" PostId="15477" RevisionGUID="b6f60db2-fcaf-422d-8187-1e1febb3c0a8" CreationDate="2011-08-02T14:03:12.807" UserId="1929" Text="Sfxr (and also [Bfxr][1]) is a great tool for generating sound-effects for games. Is there something like this for speech synthesis?&#xD;&#xA;&#xD;&#xA;Not every game development tool and platform has a speech synthesis engine, and it would be great to at least get some decent-sounding placeholders in place to see how the usability/experience plays out. Even better if the results are tweakable, like sfxr.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bfxr.net/" />
  <row Id="35155" PostHistoryTypeId="1" PostId="15477" RevisionGUID="b6f60db2-fcaf-422d-8187-1e1febb3c0a8" CreationDate="2011-08-02T14:03:12.807" UserId="1929" Text="SFXR-Like Tool for Speech" />
  <row Id="35156" PostHistoryTypeId="3" PostId="15477" RevisionGUID="b6f60db2-fcaf-422d-8187-1e1febb3c0a8" CreationDate="2011-08-02T14:03:12.807" UserId="1929" Text="&lt;speech-synthesis&gt;" />
  <row Id="35157" PostHistoryTypeId="2" PostId="15478" RevisionGUID="8f8387f6-98b3-45c0-86a9-550787cf1cc6" CreationDate="2011-08-02T14:10:45.530" UserId="744" Text="&lt;a href=&quot;http://festvox.org/festival/index.html&quot;&gt;Festival&lt;/a&gt; has a free software license and one set of voice samples for American English that is also free. It has C++ and Java APIs as well as a Lisp-like command interface.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.speech.cs.cmu.edu/flite/&quot;&gt;Flite&lt;/a&gt; is based on the same principles and is mostly compatible; it has only a C interface and is considerably lighter." />
  <row Id="35158" PostHistoryTypeId="2" PostId="15479" RevisionGUID="993e0584-b60f-42be-8382-17bf8e6ee165" CreationDate="2011-08-02T14:16:39.317" UserId="744" Text="&gt; I'm writing a component-based entity system and one of the components is the entity's state&#xD;&#xA;&#xD;&#xA;You have missed the point. In a component based system, the entity's state is parceled and distributed among different components, each of which has a well-defined and limited data storage and processing task. There is not one component that is &quot;the state component&quot;.&#xD;&#xA;&#xD;&#xA;As to how many you need, the only correct answer is exactly as many as you need to implement your game logic." />
  <row Id="35159" PostHistoryTypeId="5" PostId="15477" RevisionGUID="2c805fd2-8f22-4f5a-b004-686a20d88ec1" CreationDate="2011-08-02T14:32:48.973" UserId="1929" Comment="added 166 characters in body" Text="Sfxr (and also [Bfxr][1]) is a great tool for generating sound-effects for games. Is there something like this for speech synthesis?&#xD;&#xA;&#xD;&#xA;Not every game development tool and platform has a speech synthesis engine, and it would be great to at least get some decent-sounding placeholders in place to see how the usability/experience plays out. Even better if the results are tweakable, like sfxr.&#xD;&#xA;&#xD;&#xA;I'm looking for something I can at least **run on windows,** though preferably (like Bfxr) I would like a **web application** that I can just run out of my browser.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bfxr.net/" />
  <row Id="35160" PostHistoryTypeId="2" PostId="15480" RevisionGUID="d199eab6-17b1-40a3-b867-9f17db3ea05d" CreationDate="2011-08-02T15:22:12.190" UserId="3505" Text="You are paranoid.&#xD;&#xA;&#xD;&#xA;There is such a thing as copyright, which means that people stealing your application are eligible for being sued. It's not really different from other programs." />
  <row Id="35161" PostHistoryTypeId="2" PostId="15481" RevisionGUID="a5fb061d-1671-4c27-ad95-6efd066c4907" CreationDate="2011-08-02T15:27:53.413" UserId="7946" Text="It should be as granular as you **need** the entities to be. &#xD;&#xA;&#xD;&#xA;That means that if you don't ever have a case where an entity can walk to the left, but not to the right, you shouldn't split it up and just keep the &quot;walking&quot; component since anything else will just add unnecessary overhead.&#xD;&#xA;&#xD;&#xA;And don't worry about how to find out what you're going to need in the future: The advantage of an component based model is that you can very easily exchange and split up small parts.&#xD;&#xA;&#xD;&#xA;Always keep in mind: These kinds of architectures are not there to make your code look prettier, but to help you achieve what you want faster and more easily, plus less bug-prone. Splitting up walking to walking left and walking right if you don't ever need it has neither of the qualities above." />
  <row Id="35162" PostHistoryTypeId="25" PostId="15443" RevisionGUID="f066bd77-7ed4-4fbb-8537-052cb03e6489" CreationDate="2011-08-02T15:36:41.727" Comment="http://twitter.com/#!/StackGameDev/status/98416941169000449" />
  <row Id="35163" PostHistoryTypeId="4" PostId="15461" RevisionGUID="83574d98-d403-46eb-9a4e-880a0fb55964" CreationDate="2011-08-02T15:46:40.687" UserId="1430" Comment="edited title" Text="Stop rendering to lessen amount of resources used?" />
  <row Id="35164" PostHistoryTypeId="2" PostId="15482" RevisionGUID="e2bf1380-0e1c-4f0d-9354-00f015f4f4bb" CreationDate="2011-08-02T16:58:59.467" UserId="9007" Text="I've been using box2D for a few months, but I now badly need a physics library which can use boolean shapes (ie; cutting a circle out of a square) and/or curved surfaces. Does anyone have any suggestions?" />
  <row Id="35165" PostHistoryTypeId="1" PostId="15482" RevisionGUID="e2bf1380-0e1c-4f0d-9354-00f015f4f4bb" CreationDate="2011-08-02T16:58:59.467" UserId="9007" Text="2D physics library that supports curved surfaces and inverse or boolean shapes?" />
  <row Id="35166" PostHistoryTypeId="3" PostId="15482" RevisionGUID="e2bf1380-0e1c-4f0d-9354-00f015f4f4bb" CreationDate="2011-08-02T16:58:59.467" UserId="9007" Text="&lt;2d-physics&gt;" />
  <row Id="35167" PostHistoryTypeId="6" PostId="15482" RevisionGUID="d95abdb6-8503-4c5a-bd4e-f0a2c7dff7af" CreationDate="2011-08-02T17:05:23.253" UserId="1156" Comment="edited tags" Text="&lt;c++&gt;&lt;2d-physics&gt;&lt;c&gt;" />
  <row Id="35168" PostHistoryTypeId="5" PostId="15482" RevisionGUID="31d90617-770c-4ab9-be6b-0c6a401c52f3" CreationDate="2011-08-02T17:05:38.010" UserId="9007" Comment="added 27 characters in body; edited tags" Text="I've been using box2D for a few months, but I now badly need a physics library which can use boolean shapes (ie; cutting a circle out of a square) and/or curved surfaces. Does anyone have any suggestions?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;Language is c++ " />
  <row Id="35169" PostHistoryTypeId="6" PostId="15482" RevisionGUID="31d90617-770c-4ab9-be6b-0c6a401c52f3" CreationDate="2011-08-02T17:05:38.010" UserId="9007" Comment="added 27 characters in body; edited tags" Text="&lt;c++&gt;&lt;2d-physics&gt;&lt;c&gt;" />
  <row Id="35170" PostHistoryTypeId="2" PostId="15483" RevisionGUID="57d5ea2d-718c-433e-8d9b-66cf7ec0e613" CreationDate="2011-08-02T17:08:51.207" UserId="7548" Text="**Does it make sense to make money from JavaScript?**&#xD;&#xA;&#xD;&#xA;Yes.&#xD;&#xA;&#xD;&#xA;If you can write a game (or nifty tool, etc.) using the programming language that you prefer, and it becomes popular enough that you can get users to pay for subscriptions and/or click on banner ads (or be financially beneficial to you in some other way such as by selling licenses to re-use your source code), then you'll have succeeded.&#xD;&#xA;&#xD;&#xA;Perhaps the question you might want to ask though is &quot;Is it possible?&quot; which is where the &quot;popular enough&quot; aspect comes into play.  It really boils down to what your potential customer base likes (in this case, the people playing your game), and if they really like your game then you have one of the more important elements to make it possible to turn it into a success (other elements would be the offset of operational costs such as server hardware and bandwidth, or hosting costs, support staff costs {if you end up needing support staff}, etc.).&#xD;&#xA;&#xD;&#xA;**Technological challenges**&#xD;&#xA;&#xD;&#xA;One of the problems with JavaScript programming is that each web browser implements it a little bit differently (and then there's one, which I shall not name, which implements it so differently that developers regularly have to code special work-arounds that are used conditionally based on whether the user is using that web browser).&#xD;&#xA;&#xD;&#xA;Although most of these work-arounds are very well-known, they do come with the burden of needing more development resources (such as more time for testing with all the major web browsers).  _Note:  I'm not trying to discourage you, I just want to make sure you are aware of this common problem before your start._&#xD;&#xA;&#xD;&#xA;Of course, each language has its challenges, so you may benefit from spending a bit of time researching the &quot;pros and cons&quot; of the various languages available before making your decision.&#xD;&#xA;&#xD;&#xA;**Source code obfuscation**&#xD;&#xA;&#xD;&#xA;Although obfuscation may seem to be a popular move, if you really are worried about this then perhaps JavaScript isn't the right language to use -- you may need to evaluate other options where the source code gets compiled into some form (such as Java's byte codes or a native executable for the target Operating Systems you're interested in).&#xD;&#xA;&#xD;&#xA;Also, when it comes to source code obfuscators, there are also de-obfuscators which can aid significantly in the reverse-engineering process, so you may find that obfuscation doesn't actually provide as much protection as you're hoping for (and it could very well be a wasted effort for the most part).  What obfuscators can sometimes provide is a bit of optimization in that variable names are shortened (so the JavaScript interpreter has a few less characters to sift through), but on the client-side this may not be very noticeable.&#xD;&#xA;&#xD;&#xA;One aspect to consider as well is that if you are constantly updating your JavaScript code, copying could prove to be a lot of work for a third party because they'd always be having to keep their copied system up-to-date, especially when major changes are introduced.&#xD;&#xA;&#xD;&#xA;If your server is making all the decisions, then only the client-side of your source code would be available to the general public, so it might not really matter since it's the server that would be running the majority of the really important code anyway.&#xD;&#xA;&#xD;&#xA;**Flash vs. JavaScript**&#xD;&#xA;&#xD;&#xA;Flash and JavaScript are generally focused in different directions, although either one can often be used for many of the same tasks.  Of course, when it comes to the need for fast graphics, Flash is usually the more suitable choice between these two; if your game doesn't require the type of fast graphics that Flash is well-suited for, then I certainly don't see why you couldn't use JavaScript without much trouble.&#xD;&#xA;&#xD;&#xA;Take a look at http://maps.google.com/ for one example of JavaScript being used in a graphics-heavy client-side application -- it uses JavaScript (and more specifically AJAX) to essentially download tiles that are pieces of photographs of the Earth that previously came from orbiting Satellites, and lets the user use the arrow keys _and_ the mouse to navigate in various ways.  If this kind of performance will suit your game design needs, then it may make JavaScript a more viable choice for you.&#xD;&#xA;&#xD;&#xA;**Paranoia**&#xD;&#xA;&#xD;&#xA;You're not paranoid.  There, you've been told what you wanted to be told.  =)&#xD;&#xA;&#xD;&#xA;**Justify spending resources**&#xD;&#xA;&#xD;&#xA;Open source isn't the only consideration...&#xD;&#xA;&#xD;&#xA;When it comes to spending money, a business plan can be very helpful -- understanding your market (potential customer base, competitors, etc.), your budget (costs for equipment, services, marketing, sales projections, etc.), your eventual staffing requirements (developers, artists, technical support, accountants, etc.), etc., can be very helpful, especially if you're serious about making a business out of this.&#xD;&#xA;&#xD;&#xA;For every investment, there's always a risk somewhere (although the risks aren't always apparent, so investors may identify different risks).  The bottom line is that investors expect a profitable return on their investments, and so they'll want [at least some] assurance that you can overcome the risks.&#xD;&#xA;" />
  <row Id="35171" PostHistoryTypeId="2" PostId="15484" RevisionGUID="754d3d60-00dc-4f52-af4c-95caaf5ff5ba" CreationDate="2011-08-02T18:19:12.500" UserId="2771" Text="Have you considered combining standard box2d shapes and convex polygon attaching them to same body?&#xD;&#xA;&#xD;&#xA;If you want you can even implement concave decomposition algorithms like the ones provided by this .NET(C#) Box2d port (at the bottom, it also supports some boolean operations): &#xD;&#xA;&#xD;&#xA;http://farseerphysics.codeplex.com/documentation&#xD;&#xA;&#xD;&#xA;PS: there should be some performance/complexity reason(s) for not supporting concave polygons as is." />
  <row Id="35172" PostHistoryTypeId="25" PostId="15477" RevisionGUID="7c2617aa-9823-4c34-952d-8097220a5365" CreationDate="2011-08-02T18:36:41.643" Comment="http://twitter.com/#!/StackGameDev/status/98462240239403008" />
  <row Id="35173" PostHistoryTypeId="2" PostId="15485" RevisionGUID="6068f320-abf1-4b90-b46a-89cb9dbc9ccb" CreationDate="2011-08-02T19:02:16.320" UserId="8275" Text="After some thought, I finally decided to implement the ***spiralling search*** method I briefly described in the original question.&#xD;&#xA;&#xD;&#xA;The rationale is that the [Byte56][1]'s method needs special treatment for certain conditions, while the *spiralling search* doesn't, and **it codes in a really compact way**. Also, the *spriralling search* emphasise **finding the closer spot to the vehicle** to place the label, which IMO is the main factor in making the map readable.&#xD;&#xA;&#xD;&#xA;However please continue to upvote his answer, as it's not only useful, it's also very well written!&#xD;&#xA;&#xD;&#xA;Here's a screenshot of the result achieved with the spiralling code:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;And here's the code which - although not self-contained - it gives an idea on how simple is the implementation:&#xD;&#xA;&#xD;&#xA;    def place_tags(self):&#xD;&#xA;        for tag in self.tags:&#xD;&#xA;            start_angle = tag.angle&#xD;&#xA;            while not tag.place() or is_colliding(tag):  #See note n.1&#xD;&#xA;                tag.angle = (tag.angle + angle_step) % 360&#xD;&#xA;                if tag.angle == start_angle:&#xD;&#xA;                    tag.radius += radius_step&#xD;&#xA;            tag.connector.update()                       #See note n.2&#xD;&#xA;&#xD;&#xA;**Note 1** - `tag.place()` returns True if the tag is entirely on the visible area of the screen/radar. So that line reads like &quot;if it's visible on radar screen and doesn't overlap something else...&quot;&#xD;&#xA;&#xD;&#xA;**Note 2** - `tag.connector.update` is the method that draw the line connecting the aeroplane icon to the label/tag with the text information.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/15418/algorithm-for-spreading-labels-in-a-visually-appealing-and-intuitive-way/15422#15422&#xD;&#xA;  [2]: http://i.stack.imgur.com/34dsf.png" />
  <row Id="35174" PostHistoryTypeId="5" PostId="15485" RevisionGUID="0a8a6b48-3fca-46bd-8cf1-ded5f746585a" CreationDate="2011-08-02T19:08:32.460" UserId="8275" Comment="added 11 characters in body" Text="After some thought, I finally decided to implement the ***spiralling search*** method I briefly described in the original question.&#xD;&#xA;&#xD;&#xA;The rationale is that the [Byte56][1]'s method needs special treatment for certain conditions, while the *spiralling search* doesn't, and **it codes in a really compact way**. Also, the *spriralling search* emphasise **finding the closer spot to the vehicle** to place the label, which IMO is the main factor in making the map readable.&#xD;&#xA;&#xD;&#xA;However please continue to upvote his answer, as it's not only useful, it's also very well written!&#xD;&#xA;&#xD;&#xA;Here's a screenshot of the result achieved with the spiralling code:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;And here's the code which - although not self-contained - it gives an idea on how simple is the implementation:&#xD;&#xA;&#xD;&#xA;    def place_tags(self):&#xD;&#xA;        for tag in self.tags:&#xD;&#xA;            start_angle = tag.angle&#xD;&#xA;            while not tag.place() or is_colliding(tag):  #See note n.1&#xD;&#xA;                tag.angle = (tag.angle + angle_step) % 360&#xD;&#xA;                if tag.angle == start_angle:&#xD;&#xA;                    tag.radius += radius_step&#xD;&#xA;            tag.connector.update()                       #See note n.2&#xD;&#xA;&#xD;&#xA;**Note 1** - `tag.place()` returns True if the tag is entirely on the visible area of the screen/radar. So that line reads like &quot;keep on looping if the tag is outside the radar or it overlaps something else...&quot;&#xD;&#xA;&#xD;&#xA;**Note 2** - `tag.connector.update` is the method that draw the line connecting the aeroplane icon to the label/tag with the text information.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/15418/algorithm-for-spreading-labels-in-a-visually-appealing-and-intuitive-way/15422#15422&#xD;&#xA;  [2]: http://i.stack.imgur.com/34dsf.png" />
  <row Id="35176" PostHistoryTypeId="5" PostId="5818" RevisionGUID="f6d58a2c-4583-4c0d-a77a-83643d2fd6a6" CreationDate="2011-08-02T19:13:38.087" UserId="1386" Comment="Added new information" Text="Many aspects of Unlimited Details Unlimited Detail Technology seems dubious to me, even the introductory paragraph (because of the usage of the word unlimited):&#xD;&#xA;&#xD;&#xA;&gt; Unlimited Detail is a new technology&#xD;&#xA;&gt; for making realtime 3D graphics. &#xD;&#xA;&gt; Unlimited Detail is different from&#xD;&#xA;&gt; existing 3D graphics systems because&#xD;&#xA;&gt; it can process unlimited point cloud&#xD;&#xA;&gt; data in real time, giving the highest&#xD;&#xA;&gt; level of geometry ever seen.&#xD;&#xA;&#xD;&#xA;The quote above is from the [Unlimited Detail Technology Site][1]&#xD;&#xA;&#xD;&#xA;My question is: **Does this unlimited detail technology *actually* exist?&#xD;&#xA;And if it does, why isn't it currently being used in games?**&#xD;&#xA;&#xD;&#xA;Other references to the Unlimited Detail Technology:&#xD;&#xA;&#xD;&#xA; - [Article on Rock Paper Shotgun][2]&#xD;&#xA; - [A video demonstration on Game&#xD;&#xA;   Trailers.com][3]&#xD;&#xA; - [An interview With&#xD;&#xA;   The Creator (Bruce Dell)][4]&#xD;&#xA; - [Article&#xD;&#xA;   on Download Squad][5]&#xD;&#xA;&#xD;&#xA;Update&#xD;&#xA;======&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Unlimited Detail recently released a new [YouTube video][6]. I'm not any more convinced about it. I wrote a [blog post][7] about it, and [Notch also did][8] (he thinks it's a scam).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unlimiteddetailtechnology.com/&#xD;&#xA;  [2]: http://www.rockpapershotgun.com/2010/03/10/unlimited-detail-wants-to-kill-3d-cards/&#xD;&#xA;  [3]: http://www.gametrailers.com/user-movie/future-of-game-graphics/341479&#xD;&#xA;  [4]: http://thisismyjoystick.com/interviews/interview-bruce-roberts-dell-unlimited-detail-technology/&#xD;&#xA;  [5]: http://www.downloadsquad.com/2010/03/10/unlimited-detail-claims-to-leave-current-3d-technologies-in-the/&#xD;&#xA;  [6]: http://www.youtube.com/watch?v=UKUuUvDSXk4&#xD;&#xA;  [7]: http://secondreality.co.uk/blog/is-unlimited-detail-real/&#xD;&#xA;  [8]: http://notch.tumblr.com/post/8386977075/its-a-scam" />
  <row Id="35177" PostHistoryTypeId="5" PostId="5818" RevisionGUID="9bfb8ddf-f6a5-40f4-8a47-dd73ca0d0166" CreationDate="2011-08-02T19:54:15.790" UserId="1386" Comment="deleted 15 characters in body" Text="Many aspects of Unlimited Details Unlimited Detail Technology seems dubious to me, even the introductory paragraph (because of the usage of the word unlimited):&#xD;&#xA;&#xD;&#xA;&gt; Unlimited Detail is a new technology&#xD;&#xA;&gt; for making realtime 3D graphics. &#xD;&#xA;&gt; Unlimited Detail is different from&#xD;&#xA;&gt; existing 3D graphics systems because&#xD;&#xA;&gt; it can process unlimited point cloud&#xD;&#xA;&gt; data in real time, giving the highest&#xD;&#xA;&gt; level of geometry ever seen.&#xD;&#xA;&#xD;&#xA;The quote above is from the [Unlimited Detail Technology Site][1]&#xD;&#xA;&#xD;&#xA;My question is: **Does this unlimited detail technology *actually* exist?&#xD;&#xA;And if it does, why isn't it currently being used in games?**&#xD;&#xA;&#xD;&#xA;Other references to the Unlimited Detail Technology:&#xD;&#xA;&#xD;&#xA; - [Article on Rock Paper Shotgun][2]&#xD;&#xA; - [A video demonstration on Game&#xD;&#xA;   Trailers.com][3]&#xD;&#xA; - [An interview With&#xD;&#xA;   The Creator (Bruce Dell)][4]&#xD;&#xA; - [Article&#xD;&#xA;   on Download Squad][5]&#xD;&#xA;&#xD;&#xA;Update&#xD;&#xA;======&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Unlimited Detail recently released a new [YouTube video][6]. I'm not any more convinced. I wrote a [blog post][7] about it, [as did Notch][8] (he thinks it's a scam).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unlimiteddetailtechnology.com/&#xD;&#xA;  [2]: http://www.rockpapershotgun.com/2010/03/10/unlimited-detail-wants-to-kill-3d-cards/&#xD;&#xA;  [3]: http://www.gametrailers.com/user-movie/future-of-game-graphics/341479&#xD;&#xA;  [4]: http://thisismyjoystick.com/interviews/interview-bruce-roberts-dell-unlimited-detail-technology/&#xD;&#xA;  [5]: http://www.downloadsquad.com/2010/03/10/unlimited-detail-claims-to-leave-current-3d-technologies-in-the/&#xD;&#xA;  [6]: http://www.youtube.com/watch?v=UKUuUvDSXk4&#xD;&#xA;  [7]: http://secondreality.co.uk/blog/is-unlimited-detail-real/&#xD;&#xA;  [8]: http://notch.tumblr.com/post/8386977075/its-a-scam" />
  <row Id="35178" PostHistoryTypeId="2" PostId="15486" RevisionGUID="55d7d436-b62a-4e64-97aa-36d15683ad43" CreationDate="2011-08-02T19:54:46.410" UserId="9012" Text="It comes with compilers (Metroworks Codewarrior, and GCC via cygwin), lots of documentation, lots of sample code for different techniques, a Nintendo designed emulator, and optionally development hardware.  From a code perspective, it's all really low level, basically directly talking to hardware registers with macros.  Lower level than even something like OpenGL or Direct3D." />
  <row Id="35179" PostHistoryTypeId="2" PostId="15487" RevisionGUID="c4ee4645-28d8-4cf3-95a9-9dacd5af183c" CreationDate="2011-08-02T20:12:25.883" UserId="1463" Text="Lua is a popular choice for a general purpose scripting language.  You can create your own scripting language using Lex and Yacc (check out the article in Game Programming Gems 3) but I would say most of your needs could be taken care of with Lua no matter how big or small." />
  <row Id="35180" PostHistoryTypeId="2" PostId="15488" RevisionGUID="928c84dc-7a9d-47ae-a121-fc75f86038df" CreationDate="2011-08-02T20:34:22.200" UserId="9013" Text="When my data(vertices, textures etc.) from VRAM will be missing, how i can know that?" />
  <row Id="35181" PostHistoryTypeId="1" PostId="15488" RevisionGUID="928c84dc-7a9d-47ae-a121-fc75f86038df" CreationDate="2011-08-02T20:34:22.200" UserId="9013" Text="Is any notification when my data uploaded to VRam are erased? OpenGL" />
  <row Id="35182" PostHistoryTypeId="3" PostId="15488" RevisionGUID="928c84dc-7a9d-47ae-a121-fc75f86038df" CreationDate="2011-08-02T20:34:22.200" UserId="9013" Text="&lt;opengl&gt;" />
  <row Id="35183" PostHistoryTypeId="5" PostId="15488" RevisionGUID="cc89eadc-5543-4133-9298-521517f61908" CreationDate="2011-08-02T20:37:47.560" UserId="1430" Comment="added 1 characters in body; edited title" Text="When my data (vertices, textures, et cetera) is purged from VRAM, how I can know that?" />
  <row Id="35184" PostHistoryTypeId="4" PostId="15488" RevisionGUID="cc89eadc-5543-4133-9298-521517f61908" CreationDate="2011-08-02T20:37:47.560" UserId="1430" Comment="added 1 characters in body; edited title" Text="Is there any notification when my data uploaded to VRAM is erased?" />
  <row Id="35185" PostHistoryTypeId="6" PostId="15488" RevisionGUID="6e229740-4b18-4b74-a6fc-f10d8fda0a31" CreationDate="2011-08-02T20:42:24.690" UserId="9013" Comment="edited tags" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="35186" PostHistoryTypeId="2" PostId="15489" RevisionGUID="bf70dde9-3e60-45ba-96d2-97aa8477bce4" CreationDate="2011-08-02T20:49:45.903" UserId="4129" Text="I have computed the four corners of the viewable bit of 2d map in my 3d view.  So I know the trapezoid that is visible, and I want to 'visit' these tiles in my map.&#xD;&#xA;&#xD;&#xA;So my algorithm is basically a convex polygon scanline fill, specifically with four points.&#xD;&#xA;&#xD;&#xA;However, I have trouble finding simple sample code to borrow; all want to cope with the complexities of concave and complex polygons and apply winding and such, which is unnecessary in my case and cluttering.&#xD;&#xA;&#xD;&#xA;I've contemplated sitting down and writing my own simple trapezoid scanline fill implementation from first principles but was wondering if anyone had a tried and tested version to share that I could copy instead?&#xD;&#xA;&#xD;&#xA;Or maybe I've just been googling for the wrong terms and there are some on the net to point me at?" />
  <row Id="35187" PostHistoryTypeId="1" PostId="15489" RevisionGUID="bf70dde9-3e60-45ba-96d2-97aa8477bce4" CreationDate="2011-08-02T20:49:45.903" UserId="4129" Text="scanline filling a trapezoid" />
  <row Id="35188" PostHistoryTypeId="3" PostId="15489" RevisionGUID="bf70dde9-3e60-45ba-96d2-97aa8477bce4" CreationDate="2011-08-02T20:49:45.903" UserId="4129" Text="&lt;c++&gt;&lt;c&gt;&lt;geometry&gt;" />
  <row Id="35192" PostHistoryTypeId="2" PostId="15491" RevisionGUID="28d469bb-3c15-440d-adf6-ef8feb3b38cd" CreationDate="2011-08-02T21:33:54.940" UserId="8799" Text="I'm working on a 2D platformer using XNA and Farseer. I would like the player's character to be able to grab and climb up ledges. Detecting a collision between the player and the side of a wall is simple enough with the OnCollision delegate, but I have to admit I'm a bit stumped on how to detect that there's enough clearance for the PC to mount the ledge.&#xD;&#xA;&#xD;&#xA;Essentially, I want to ensure there's an appropriately sized rectangle above and to the left or right of the PC (depending on their direction) and I'm not sure how I would check for such a space.&#xD;&#xA;&#xD;&#xA;Any suggestions on how to determine there is nothing in the simulated world within some bounding rectangle?" />
  <row Id="35193" PostHistoryTypeId="1" PostId="15491" RevisionGUID="28d469bb-3c15-440d-adf6-ef8feb3b38cd" CreationDate="2011-08-02T21:33:54.940" UserId="8799" Text="Detect Open Space in Farseer" />
  <row Id="35194" PostHistoryTypeId="3" PostId="15491" RevisionGUID="28d469bb-3c15-440d-adf6-ef8feb3b38cd" CreationDate="2011-08-02T21:33:54.940" UserId="8799" Text="&lt;xna&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="35195" PostHistoryTypeId="25" PostId="15489" RevisionGUID="afa435c0-6a00-4b5b-a958-f7c9d7798b08" CreationDate="2011-08-02T21:36:42.097" Comment="http://twitter.com/#!/StackGameDev/status/98507539100078082" />
  <row Id="35196" PostHistoryTypeId="2" PostId="15492" RevisionGUID="543bf8ef-5303-4b12-81f1-b05885704c93" CreationDate="2011-08-02T22:07:36.143" UserId="9016" Text="Data in your VRAM won't get erased unless you explicitly call the glDelete* function. Therefore, OpenGL does not contain such notifications.&#xD;&#xA;&#xD;&#xA;If you for some reason need such notifications, you'll need to wrap all glDelete* functions in your code into functions that call a notification routine." />
  <row Id="35197" PostHistoryTypeId="2" PostId="15493" RevisionGUID="17ef34c1-f5b8-4a8a-9419-20e936187c4f" CreationDate="2011-08-02T22:09:46.233" UserId="2798" Text="You can't. When you destroy your OpenGL resources (textures, VBO, etc) you are telling the graphics card that you don't need that resource anymore and it can do whatever it wants with the space they used; now, the driver can instantly delete them, mark them for purging or just mark the space as available for use. This implementation is transparent to the user and you can't know when or what happens." />
  <row Id="35198" PostHistoryTypeId="2" PostId="15494" RevisionGUID="4913d7b5-97d9-4cb0-b2d5-0d60cfbf057d" CreationDate="2011-08-02T22:14:35.963" UserId="9016" Text="1.a Per-vertex lighting is easier then per-pixel lighting (per-vertex lighting is built-in into OpenGL, perpixel lighting requires a custom shader).&#xD;&#xA;&#xD;&#xA;1.b If you have eight lights, use them! You'll have to calculate which lights are visible, though.&#xD;&#xA;&#xD;&#xA;3.a Use VBOS. Never use glBegin/glEnd (unless you use display lists, but in your situation VBOs are the better solution)&#xD;&#xA;&#xD;&#xA;3.b You should not worry about performance while the program is still in development. Especially with todays hardware. So, send out your 200-300 chunks.&#xD;&#xA;&#xD;&#xA;I don't know BSP maps well enough to help you with your other questions." />
  <row Id="35199" PostHistoryTypeId="2" PostId="15495" RevisionGUID="3fbfceb1-ceae-4810-9695-42e2e68d952f" CreationDate="2011-08-02T23:20:14.927" UserId="962" Text="Yes it is real, &#xD;&#xA;---------------&#xD;&#xA;**It really can render things at any detail density without slowing down.**&#xD;&#xA;&#xD;&#xA;But it does have some notable restrictions.&#xD;&#xA;&#xD;&#xA; - The environment is static. No dynamic lights, animations, or shaders.&#xD;&#xA;   &#xD;&#xA; - All objects are data heavy both in memory and in storage.&#xD;&#xA;   &#xD;&#xA; - The amount of unique objects is limited by the amount of memory and&#xD;&#xA;   storage that the user has.&#xD;&#xA; - Character animation would either have to be standard polygon, use some kind of sparse-voxel character animation technique(computationally heavy), or load a different model for each frame of animation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With those restrictions a large amount of game types would not be possible. But there are game types that already have static environments that could work well with this technology. &#xD;&#xA;&#xD;&#xA;**Most likely developers who use this tech will use a hybrid approach of Point Cloud rendering for static environments, and high resolution polygon rasterization on the GPU for character and other dynamic objects.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35200" PostHistoryTypeId="2" PostId="15496" RevisionGUID="0bae487a-8bc5-4b09-9c2c-65c17a9eae12" CreationDate="2011-08-02T23:30:29.143" UserId="5824" Text="Since a trapezoid is made of two triangles you could just split it up and use some triangle drawing code, which I'm sure you can find plenty of examples of.&#xD;&#xA;&#xD;&#xA;If you want to implement it yourself, all you need to do is iterate down the left and right sides of the trapezoid drawing horizontal lines between those points. Use a standard line drawing algorithm like Breshenam's for following the sides. You'll probably also need to clip off screen pixels." />
  <row Id="35201" PostHistoryTypeId="2" PostId="15497" RevisionGUID="12c0abb6-5b0a-4095-a57e-3e178abe2737" CreationDate="2011-08-03T00:18:54.550" UserId="2698" Text="The video for Overgrowth Alpha 132 shows how they implemented ledge climbing, including how they detected open space using a collision sphere.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=GFu44oeLYPI&#xD;&#xA;&#xD;&#xA;It doesn't matter what engine you're using, it's pretty basic stuff that should work with any one." />
  <row Id="35202" PostHistoryTypeId="5" PostId="15497" RevisionGUID="c4df61ac-f639-4945-94f1-0ed9ee53d92d" CreationDate="2011-08-03T00:31:50.217" UserId="2698" Comment="added 358 characters in body" Text="The video for Overgrowth Alpha 132 shows how they implemented ledge climbing, including how they detected open space using a collision sphere &amp; cylinder: one to detect space either side of the player, the other to detect space above the ledge.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=GFu44oeLYPI&#xD;&#xA;&#xD;&#xA;It doesn't matter what engine you're using, it's pretty basic stuff that should work with any one.&#xD;&#xA;&#xD;&#xA;The central idea being:&#xD;&#xA;&#xD;&#xA;* if moving the sphere in the direction you want to move the player in causes a collision, you can't move the player in that direction.&#xD;&#xA;* if the cylinder can't contact the ledge, it's not a ledge the player can climb up onto." />
  <row Id="35203" PostHistoryTypeId="2" PostId="15498" RevisionGUID="4490b52c-7906-4969-bab6-d72b2a3b16cc" CreationDate="2011-08-03T00:44:09.403" UserId="8524" Text="If you draw horizontal scanlines, convex polygons (including quads) divide vertically into sections as follows...&#xD;&#xA;&#xD;&#xA;1.  Possibly a triangle on the top, with a horizontal base.&#xD;&#xA;2.  A (possibly empty) sequence of quadrilaterals with horizontal edges top and bottom.&#xD;&#xA;3.  Possibly a triangle on the bottom, with a horizontal top edge.&#xD;&#xA;&#xD;&#xA;The triangles can be viewed as quads where one of those horizontal edges just happens to have a zero length, so all you really need to worry about are quads with horizontal edges top and bottom.&#xD;&#xA;&#xD;&#xA;There isn't a lot of simplification of this for the quads case - you'll have at most 3 parts to draw (each of the four corners on a different scanline), but that doesn't help much.&#xD;&#xA;&#xD;&#xA;Anyway, as you scan from top to bottom, you always have a next-significant-scanline at which you'll change the left edge, the right edge, or both. Following these edges can be done with a variant of Bresenhams. Be aware, though, that it's valid for the edge to move over multiple pixels per scanline - it's not quite the standard Bresenhams algorithm you need for those edges.&#xD;&#xA;&#xD;&#xA;You may need to clip off the top and bottom chunks with each scan-line, but the easiest way to clip stuff that's horizontally out of range is to individually clip the scanlines before drawing - without affecting the two (left and right edge) Bresenhams-algorithm states.&#xD;&#xA;&#xD;&#xA;This kind of thing was explained well in 3D graphics books for the 16-bit era, but got more neglected when 3D graphics cards became the norm, for obvious reasons.&#xD;&#xA;" />
  <row Id="35204" PostHistoryTypeId="5" PostId="15498" RevisionGUID="a9fd9611-24e0-4a01-9da3-7630a0bed4e1" CreationDate="2011-08-03T00:57:29.433" UserId="8524" Comment="Left and right edge vertex sequences" Text="If you draw horizontal scanlines, convex polygons (including quads) divide vertically into sections as follows...&#xD;&#xA;&#xD;&#xA;1.  Possibly a triangle on the top, with a horizontal base.&#xD;&#xA;2.  A (possibly empty) sequence of quadrilaterals with horizontal edges top and bottom.&#xD;&#xA;3.  Possibly a triangle on the bottom, with a horizontal top edge.&#xD;&#xA;&#xD;&#xA;The triangles can be viewed as quads where one of those horizontal edges just happens to have a zero length, so all you really need to worry about are quads with horizontal edges top and bottom.&#xD;&#xA;&#xD;&#xA;There isn't a lot of simplification of this for the quads case - you'll have at most 3 parts to draw (each of the four corners on a different scanline), but that doesn't help much.&#xD;&#xA;&#xD;&#xA;Anyway, as you scan from top to bottom, you always have a next-significant-scanline at which you'll change the left edge, the right edge, or both. Following these edges can be done with a variant of Bresenhams. Be aware, though, that it's valid for the edge to move over multiple pixels per scanline - it's not quite the standard Bresenhams algorithm you need for those edges.&#xD;&#xA;&#xD;&#xA;You may need to clip off the top and bottom chunks with each scan-line, but the easiest way to clip stuff that's horizontally out of range is to individually clip the scanlines before drawing - without affecting the two (left and right edge) Bresenhams-algorithm states.&#xD;&#xA;&#xD;&#xA;Often, the vertices of a polygon are stored in clockwise or counter-clockwise order to support visibility calculations. If that's the case here, it can also help with this &quot;rendering&quot;. View the list of vertices as a circular array&quot;. Find the highest vertex/vertices and the lowest vertex/vertices. The left-edges vertices are in one span of that circular array, and the right-edges vertices in the another. One of those spans is in the correct order for rendering, the other is in the reverse order. It may be easier to make those lists of left-edge and right-edge vertices before you start, rather than work within the circular array, but it shouldn't be that difficult either way.&#xD;&#xA;&#xD;&#xA;This kind of thing was explained well in 3D graphics books for the 16-bit era, but got more neglected when 3D graphics cards became the norm, for obvious reasons.&#xD;&#xA;" />
  <row Id="35205" PostHistoryTypeId="2" PostId="15499" RevisionGUID="a78602ae-a1dd-43be-b4d9-e220103eb099" CreationDate="2011-08-03T01:24:17.823" UserId="8524" Text="Current hardware supports an evolution of the kind of graphics that appeared in the 16 bit days - arguably even the 8 bit days. A completely different approach may not be a bad idea, but there already are alternative approaches - ray-tracing and voxel-based, at least.&#xD;&#xA;&#xD;&#xA;&quot;Unlimited detail&quot; sounds to me like the old fractal-compression fallacy. Fractal compression *can* represent any image, but with compression ratios not so different from JPEG.&#xD;&#xA;&#xD;&#xA;At one point, there were claims of massive compression ratios - but the logic for that was the same as for &quot;vector graphics compression&quot;. A single rectangle is a very simple shape to represent in vector graphics, giving an impressive compression ratio, but it's a special case that isn't useful for encoding a typical photo. The same applies to the old fractal compression fallacy. A single simple fractal may have a tiny encoding using fractal compression, but that's hardly a miracle of compression.&#xD;&#xA;&#xD;&#xA;Another answer has already associated point-clouds with voxels. The only way I can image &quot;unlimited detail&quot; being justified is if there's some repeating-patterns and/or fractal aspect to those point-clouds, and some of those example images seem to suggest that too. Otherwise you'd need infinite data to represent that unlimited detail.&#xD;&#xA;&#xD;&#xA;A fractal arguably gives an infinite level of detail. Theoretically, that is - discrete rendering automatically implies a finite cutoff to that detail, and that applies to voxels as well as pixels. However, you can't easily represent anything you want in that fractal form - it may be possible to define arbitrary point-clouds, but you'll need complex point-cloud descriptions to get the forms that aren't so naturally described as a single simple fractal.&#xD;&#xA;&#xD;&#xA;None of this means the idea isn't interesting or useful. It's just a kind of &quot;beware of the marketing claims&quot; thing. And just because something looks good now, doesn't mean it won't be &quot;just another tediously obvious point-cloud effect&quot; in five years time.&#xD;&#xA;" />
  <row Id="35206" PostHistoryTypeId="5" PostId="15497" RevisionGUID="da6819b3-5b2d-4eec-b820-522b4592ef1f" CreationDate="2011-08-03T02:23:01.143" UserId="2698" Comment="added 24 characters in body" Text="The video for Overgrowth Alpha 132 shows how they implemented ledge climbing, including how they detected open space using a collision sphere &amp; cylinder: one to detect space either side of the player, the other to detect space above the ledge.&#xD;&#xA;&#xD;&#xA;http://www.youtube.com/watch?v=GFu44oeLYPI&#xD;&#xA;&#xD;&#xA;It doesn't matter what engine you're using, it's pretty basic stuff that should work with any one.&#xD;&#xA;&#xD;&#xA;The central idea being:&#xD;&#xA;&#xD;&#xA;* If the player wants to move left, and moving the collision sphere left produces no collision, the player can move left.&#xD;&#xA;* If the cylinder can contact some floor above the ledge you're on, the player should be capable of climbing up onto the ledge." />
  <row Id="35207" PostHistoryTypeId="5" PostId="15497" RevisionGUID="98d35e06-9ea2-4c26-a11d-db65a873f979" CreationDate="2011-08-03T02:44:54.200" UserId="2698" Comment="Added image, bit of rephrasing" Text="The video for Overgrowth Alpha 132 shows how they implemented ledge climbing: http://www.youtube.com/watch?v=GFu44oeLYPI&#xD;&#xA;&#xD;&#xA;![video screenshot](http://img228.imageshack.us/img228/7207/af88591ce43a4ac1ad74a11.png)&#xD;&#xA;&#xD;&#xA;They use a method which should work in any engine: drop a cylinder down to see if you can climb up onto the ledge, and use a collision sphere to see if there's room to climb along the ledge's length.&#xD;&#xA;&#xD;&#xA;The central idea is this:&#xD;&#xA;&#xD;&#xA;* If the player wants to move left, and moving the collision sphere left produces no collision, the player can move left.&#xD;&#xA;* If the cylinder can contact some floor above the ledge you're on, the player should be capable of climbing up onto the ledge. The video explains how they use the cylinder." />
  <row Id="35208" PostHistoryTypeId="5" PostId="15497" RevisionGUID="48925850-a1a4-4056-8aed-c300615e412b" CreationDate="2011-08-03T02:56:38.090" UserId="2698" Comment="Added image, bit of rephrasing" Text="The video for Overgrowth Alpha 132 shows how they implemented ledge climbing: http://www.youtube.com/watch?v=GFu44oeLYPI&#xD;&#xA;&#xD;&#xA;![video screenshot](http://img228.imageshack.us/img228/7207/af88591ce43a4ac1ad74a11.png)&#xD;&#xA;&#xD;&#xA;Their method should work in any engine. It works in two parts:&#xD;&#xA;&#xD;&#xA;###Wall detection (using the sphere)&#xD;&#xA;&#xD;&#xA;The game checks if the player's currently colliding with a wall. If there's a wall, there might be ledges the player can grab onto. The second part takes over to analyse the ledges.&#xD;&#xA;&#xD;&#xA;###Ledge detection (using the cylinder)&#xD;&#xA;If the player's contacting a wall, a cylinder is swept downwards from a certain distance above the player's position until it touches a ledge. This can determine three things:&#xD;&#xA;&#xD;&#xA;* Whether a ledge exists above the player&#xD;&#xA;* The ledge's height&#xD;&#xA;* Whether there is room for the player to climb up onto the ledge, considering the cylinder occupies the same horizontal space as the player." />
  <row Id="35209" PostHistoryTypeId="2" PostId="15500" RevisionGUID="de22cad9-5d82-4169-9488-f29da8421139" CreationDate="2011-08-03T03:07:08.943" UserId="5060" Text="Well, you already have the tools, you just need to think of it differently. Rather than thinking trying to find empty space, you just need to find space with no collisions. Basically, all you have to do is test the area above the player with a rectangle the size of the player, and then if there are collisions, the player can't climb up. If there aren't collisions, the space is open and the player can get up." />
  <row Id="35210" PostHistoryTypeId="5" PostId="15497" RevisionGUID="41065d8a-6544-4bb8-80b5-64e7f1bf9ccb" CreationDate="2011-08-03T03:25:17.457" UserId="2698" Comment="General editing" Text="The video for Overgrowth Alpha 132 shows how they implemented ledge climbing: http://www.youtube.com/watch?v=GFu44oeLYPI&#xD;&#xA;&#xD;&#xA;Their method should work in any engine, **even 2D engines** where you'd use a rectangle and circle instead of a cylinder and sphere.&#xD;&#xA;&#xD;&#xA;![video screenshot](http://img228.imageshack.us/img228/7207/af88591ce43a4ac1ad74a11.png)&#xD;&#xA;&#xD;&#xA;Their ledge detection involves two parts:&#xD;&#xA;&#xD;&#xA;###Wall detection (using the sphere)&#xD;&#xA;&#xD;&#xA;The game checks if the player's currently colliding with a wall. If there's a wall, there might be ledges the player can grab onto. The second part takes over to analyse the ledges.&#xD;&#xA;&#xD;&#xA;###Ledge detection (using the cylinder)&#xD;&#xA;If the player's contacting a wall, a cylinder is swept downwards from a certain distance above the player's position until it touches a ledge. This can determine three things:&#xD;&#xA;&#xD;&#xA;* Whether a ledge exists above the player&#xD;&#xA;* The ledge's height&#xD;&#xA;* Whether there is room for the player to climb up onto the ledge, considering the cylinder occupies the same horizontal space as the player." />
  <row Id="35211" PostHistoryTypeId="25" PostId="15475" RevisionGUID="fd75991f-5cfb-4142-b57f-1a7b1fb2599e" CreationDate="2011-08-03T03:36:42.540" Comment="http://twitter.com/#!/StackGameDev/status/98598137119256576" />
  <row Id="35212" PostHistoryTypeId="2" PostId="15501" RevisionGUID="5b002535-80b2-4903-94eb-655283d97548" CreationDate="2011-08-03T04:41:35.497" UserId="3408" Text="Is it possible to use OpenGL purely with C instead of C++? I am wanting to make sure there won't be any problems with my using C and not C++. OpenGL does not depend on any C++ libraries right?" />
  <row Id="35213" PostHistoryTypeId="1" PostId="15501" RevisionGUID="5b002535-80b2-4903-94eb-655283d97548" CreationDate="2011-08-03T04:41:35.497" UserId="3408" Text="Is it possible to use OpenGL purely with C instead of C++?" />
  <row Id="35214" PostHistoryTypeId="3" PostId="15501" RevisionGUID="5b002535-80b2-4903-94eb-655283d97548" CreationDate="2011-08-03T04:41:35.497" UserId="3408" Text="&lt;c++&gt;&lt;opengl&gt;&lt;c&gt;" />
  <row Id="35215" PostHistoryTypeId="2" PostId="15502" RevisionGUID="934049e5-cf05-4c49-8892-ff4cd35d4b72" CreationDate="2011-08-03T04:56:44.593" UserId="3408" Text="What should I use to handle input? I am wanting to use OpenGL so that my games are cross platform. DirectX provides input libraries, and OpenGL does not. Because my games need to be cross platform, I cannot use DirectX's libraries. What should I do, or what is the common solution to this type of problem?" />
  <row Id="35216" PostHistoryTypeId="1" PostId="15502" RevisionGUID="934049e5-cf05-4c49-8892-ff4cd35d4b72" CreationDate="2011-08-03T04:56:44.593" UserId="3408" Text="What should I use to handle input?" />
  <row Id="35217" PostHistoryTypeId="3" PostId="15502" RevisionGUID="934049e5-cf05-4c49-8892-ff4cd35d4b72" CreationDate="2011-08-03T04:56:44.593" UserId="3408" Text="&lt;opengl&gt;&lt;directx&gt;&lt;input&gt;&lt;cross-platform&gt;" />
  <row Id="35218" PostHistoryTypeId="2" PostId="15503" RevisionGUID="1d9f73a5-80ab-42e9-ae4a-369b3258a81e" CreationDate="2011-08-03T05:28:29.980" UserId="1839" Text="Yes, in fact OpenGL is a C library. You can perfectly use it with C." />
  <row Id="35219" PostHistoryTypeId="2" PostId="15504" RevisionGUID="2fbb3eb3-34eb-43cf-96f5-d10626704fa0" CreationDate="2011-08-03T05:32:45.747" UserId="3408" Text="I want to use Python as a scripting language for my game, can I use it purely with C (not C++)?  It is important to me that I not use C++, and purely use C instead." />
  <row Id="35220" PostHistoryTypeId="1" PostId="15504" RevisionGUID="2fbb3eb3-34eb-43cf-96f5-d10626704fa0" CreationDate="2011-08-03T05:32:45.747" UserId="3408" Text="I want to use Python as a scripting language for my game, can I use it purely with C (not C++)?" />
  <row Id="35221" PostHistoryTypeId="3" PostId="15504" RevisionGUID="2fbb3eb3-34eb-43cf-96f5-d10626704fa0" CreationDate="2011-08-03T05:32:45.747" UserId="3408" Text="&lt;c++&gt;&lt;python&gt;&lt;c&gt;&lt;scripting&gt;" />
  <row Id="35222" PostHistoryTypeId="2" PostId="15505" RevisionGUID="ab56b85f-4870-47eb-90db-c7b45823fb99" CreationDate="2011-08-03T05:45:31.040" UserId="6813" Text="As the official Python website/documentation suggest, &quot;yes&quot; it look like you can embed Python purely with C.&#xD;&#xA;&#xD;&#xA;- http://docs.python.org/c-api/" />
  <row Id="35223" PostHistoryTypeId="5" PostId="15505" RevisionGUID="eeaecb7d-336d-43fb-831a-8e2767d95c9e" CreationDate="2011-08-03T05:50:31.287" UserId="6813" Comment="added 51 characters in body" Text="As the official Python website/documentation suggest, &quot;yes&quot; you can embed Python purely with C.&#xD;&#xA;&#xD;&#xA;- http://docs.python.org/c-api/&#xD;&#xA;- http://docs.python.org/extending/embedding.html" />
  <row Id="35224" PostHistoryTypeId="2" PostId="15506" RevisionGUID="f7fbeb32-73b6-4b39-8014-4304ec68111a" CreationDate="2011-08-03T06:17:33.383" UserId="999" Text="SDL and SFML are cross-platform and widely used." />
  <row Id="35225" PostHistoryTypeId="25" PostId="15488" RevisionGUID="9c2c5799-d677-4c72-a0c1-c810a565a3bc" CreationDate="2011-08-03T06:36:41.870" Comment="http://twitter.com/#!/StackGameDev/status/98643431986966528" />
  <row Id="35226" PostHistoryTypeId="2" PostId="15507" RevisionGUID="934693ea-9438-4e88-8c3c-7cddaf18e115" CreationDate="2011-08-03T07:16:55.220" UserId="8050" Text="I know that is not strictly related to your question (for which the answer is simply yes) but you should consider to **extend** Python with your C function or to use **another language for scripting**, *Lua* perhaps. &#xD;&#xA;&#xD;&#xA;You can try the first option by compiling your C functions as dynamic library and then use **ctypes**. This gives you the chance to have a **working prototype in almost no time**.&#xD;&#xA;&#xD;&#xA;If you profiled your C app before, you can profile the protype too, comparing the two to evaluate the ctypes overhead; **ctypes** (*Foreign Function Interface* in general) **is not embedding** but you have chances to see that this is **suitable for you with little or no modification**" />
  <row Id="35231" PostHistoryTypeId="2" PostId="15509" RevisionGUID="8a7c0101-b568-49c4-9da8-5adaa7834957" CreationDate="2011-08-03T09:11:09.200" UserId="8681" Text="OIS is a good input library but it doesn't support mac very well." />
  <row Id="35232" PostHistoryTypeId="25" PostId="15491" RevisionGUID="08f4970e-0d58-4102-81af-748cb1a71829" CreationDate="2011-08-03T09:36:41.810" Comment="http://twitter.com/#!/StackGameDev/status/98688730499530752" />
  <row Id="35233" PostHistoryTypeId="2" PostId="15510" RevisionGUID="97fe1330-5cbe-4e8b-ba12-912be5c48a39" CreationDate="2011-08-03T09:49:39.067" UserId="4129" Text="So I implemented my own; here's the python prototype:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class Pt:&#xD;&#xA;        def __init__(self,x,y):&#xD;&#xA;            self.x = x&#xD;&#xA;            self.y = y&#xD;&#xA;        def __repr__(self): &#xD;&#xA;            return &quot;(%s,%s)&quot;%(self.x,self.y)    &#xD;&#xA;    &#xD;&#xA;    class TrapeziumIterator:&#xD;&#xA;        def __init__(self,map,width,height,a,b,c,d):&#xD;&#xA;            # create an iterator over the cells in the map that are in the trapezium described by a,b,c,d corners&#xD;&#xA;            # a,b,c,d describes the CLOCKWISE perimeter of the trapezium, e.g. tl,tr,br,bl from screenspace&#xD;&#xA;            self.map = map&#xD;&#xA;            self.width = width&#xD;&#xA;            self.height = height&#xD;&#xA;            # we re-orientate the trapezium so the lowest y is topmost&#xD;&#xA;            t = [a,b,c,d]&#xD;&#xA;            start_y = min(pt.y for pt in t)&#xD;&#xA;            while t[0].y != start_y:&#xD;&#xA;                t.append(t[0])&#xD;&#xA;                del t[0]&#xD;&#xA;            print t&#xD;&#xA;            self.t = t&#xD;&#xA;            self.y = int(max(0,start_y)) # init y before x!&#xD;&#xA;            self.x = self._start_x(self.y)-1&#xD;&#xA;            self.stop_x = self._stop_x(self.y)&#xD;&#xA;            self.stop_y = int(min(height,max(pt.y for pt in t)+1))&#xD;&#xA;        def next(self):&#xD;&#xA;            self.x += 1&#xD;&#xA;            while self.x &gt;= self.stop_x:&#xD;&#xA;                self.y += 1&#xD;&#xA;                if self.y &gt;= self.stop_y:&#xD;&#xA;                    return False&#xD;&#xA;                self.x = self._start_x(self.y)&#xD;&#xA;                self.stop_x = self._stop_x(self.y)&#xD;&#xA;            assert self.x &gt;= 0 and self.x &lt; self.width, self.x&#xD;&#xA;            assert self.y &gt;= 0 and self.y &lt; self.height, self.y&#xD;&#xA;            return True&#xD;&#xA;        def _start_x(self,y):&#xD;&#xA;            # go down the left side&#xD;&#xA;            return max(0,self._side(y,0,3))&#xD;&#xA;        def _stop_x(self,y):&#xD;&#xA;            # go down the right side&#xD;&#xA;            return min(self.width,self._side(y,3,0)+1)&#xD;&#xA;        def _side(self,y,start,stop):&#xD;&#xA;            inc = -1 if start &lt; stop else 1&#xD;&#xA;            while self.t[stop].y &lt; y:&#xD;&#xA;                start = stop&#xD;&#xA;                stop += inc&#xD;&#xA;            f = (y - self.t[start].y)&#xD;&#xA;            f /= (self.t[stop].y - self.t[start].y)&#xD;&#xA;            return int(self.t[start].x + (self.t[stop].x - self.t[start].x) * f)&#xD;&#xA;            &#xD;&#xA;    def test(image,col,a,b,c,d):&#xD;&#xA;        w,h = image.size&#xD;&#xA;        it = TrapeziumIterator(image,w,h,a,b,c,d)&#xD;&#xA;        while it.next(): &#xD;&#xA;            image.putpixel((it.x,it.y),col)&#xD;&#xA;    &#xD;&#xA;    # test it&#xD;&#xA;    import Image&#xD;&#xA;    w,h = 100,100&#xD;&#xA;    image = Image.new(&quot;RGB&quot;,(w,h),(255,255,255))&#xD;&#xA;    test(image,(0,255,0),Pt(-60.3,-10.4),Pt(20.2,25.3),Pt(70,90.2),Pt(60,110))&#xD;&#xA;    test(image,(255,0,0),Pt(30.3,40.4),Pt(60.2,25.3),Pt(70,50.2),Pt(33,47.7))&#xD;&#xA;    # debug show it a bit larger&#xD;&#xA;    image = image.resize((w*6,h*6))&#xD;&#xA;    image.show()&#xD;&#xA;&#xD;&#xA;Feedback welcome!" />
  <row Id="35234" PostHistoryTypeId="2" PostId="15511" RevisionGUID="ccd3ce69-4313-463a-976d-26205ee24768" CreationDate="2011-08-03T11:29:06.080" UserId="9024" Text="With [PreviewLabs, a company specialized in rapid prototyping][1], we're often using Unity3D to prototype 2D Games.&#xD;&#xA;&#xD;&#xA;Although it's a 3D engine, there are several ways to use it for 2D prototyping.&#xD;&#xA;These are the main advantages:&#xD;&#xA;&#xD;&#xA; - It's free to use for the PC and Mac platforms&#xD;&#xA; - The paid versions also work for iOS and Android, allowing you to see how your concept would work on a different platform.&#xD;&#xA; - It comes with a physics engine, which you can also use when prototyping 2D games.&#xD;&#xA;&#xD;&#xA;I'm writing a series of blog posts on how Unity3D can be used for 2D game prototyping; this is the first one: [Prototyping 2D Games in Unity3D][2]&#xD;&#xA; &#xD;&#xA;  [1]: http://www.previewlabs.com&#xD;&#xA;  [2]: http://www.previewlabs.com/prototyping-2d-games-in-unity3d/" />
  <row Id="35235" PostHistoryTypeId="16" PostId="15511" RevisionGUID="1d7302d4-4b40-4b72-9881-48e9b7a58a5d" CreationDate="2011-08-03T11:29:06.080" UserId="9024" />
  <row Id="35236" PostHistoryTypeId="2" PostId="15512" RevisionGUID="71d9db09-518f-424b-bb63-9fb25fe3510a" CreationDate="2011-08-03T12:10:02.127" UserId="4662" Text="DirectInput is quite deprecated, as far as I know, and very rarely used. If you're using OGL directly and not through any abstraction, then you will have to go to the operating system API to collect input, or use an abstracting library that has already done this work like SDL, SFML and more." />
  <row Id="35237" PostHistoryTypeId="2" PostId="15513" RevisionGUID="956d29a5-1709-45c8-aa85-4ac4edf9d2b0" CreationDate="2011-08-03T12:20:00.347" UserId="1743" Text="A tutorial that I have followed had me collect and blit all of my sprites with the following lines:&#xD;&#xA;&#xD;&#xA;    allsprites = pygame.sprite.RenderPlain((l_sprites))&#xD;&#xA;    allsprites.draw()&#xD;&#xA;&#xD;&#xA;At the moment, this is fine for me, as all of my sprites make use of the same base image.&#xD;&#xA;However, I find myself in need of having various sprites animated, some changing, and some going to a basic colored rectangle.&#xD;&#xA;&#xD;&#xA;My question is if this batch drawing method is still viable when all of my sprites are in flux.  My previous experience has been in straight C with SDL, and normally I would simply roll my own update loop.&#xD;&#xA;" />
  <row Id="35238" PostHistoryTypeId="1" PostId="15513" RevisionGUID="956d29a5-1709-45c8-aa85-4ac4edf9d2b0" CreationDate="2011-08-03T12:20:00.347" UserId="1743" Text="Batch blit vs separate blit" />
  <row Id="35239" PostHistoryTypeId="3" PostId="15513" RevisionGUID="956d29a5-1709-45c8-aa85-4ac4edf9d2b0" CreationDate="2011-08-03T12:20:00.347" UserId="1743" Text="&lt;python&gt;&lt;pygame&gt;" />
  <row Id="35240" PostHistoryTypeId="5" PostId="15510" RevisionGUID="eab51dfd-03dd-4d4c-a07b-e3b47d4956dd" CreationDate="2011-08-03T12:20:18.240" UserId="4129" Comment="added 240 characters in body" Text="So I implemented my own; here's the python prototype:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class Pt:&#xD;&#xA;        def __init__(self,x,y):&#xD;&#xA;            self.x = x&#xD;&#xA;            self.y = y&#xD;&#xA;        def __repr__(self): &#xD;&#xA;            return &quot;(%s,%s)&quot;%(self.x,self.y)    &#xD;&#xA;    &#xD;&#xA;    class TrapeziumIterator:&#xD;&#xA;        def __init__(self,map,width,height,a,b,c,d):&#xD;&#xA;            # create an iterator over the cells in the map that are in the trapezium described by a,b,c,d corners&#xD;&#xA;            # a,b,c,d describes the CLOCKWISE perimeter of the trapezium, e.g. tl,tr,br,bl from screenspace&#xD;&#xA;            self.map = map&#xD;&#xA;            self.width = width&#xD;&#xA;            self.height = height&#xD;&#xA;            # we re-orientate the trapezium so the lowest y is topmost&#xD;&#xA;            t = [a,b,c,d]&#xD;&#xA;            start_y = min(pt.y for pt in t)&#xD;&#xA;            while t[0].y != start_y:&#xD;&#xA;                t.append(t[0])&#xD;&#xA;                del t[0]&#xD;&#xA;            self.t = t&#xD;&#xA;            # work out starting position&#xD;&#xA;            self.y = int(max(0,start_y)) # init y before x!&#xD;&#xA;            self.x = self._start_x(self.y)-1 # x is iterated in the first call to next()&#xD;&#xA;            # work out stopping positions&#xD;&#xA;            self.stop_x = self._stop_x(self.y)&#xD;&#xA;            self.stop_y = int(min(height,max(pt.y for pt in t)+1))&#xD;&#xA;        def next(self):&#xD;&#xA;            self.x += 1&#xD;&#xA;            while self.x &gt;= self.stop_x:&#xD;&#xA;                self.y += 1&#xD;&#xA;                if self.y &gt;= self.stop_y:&#xD;&#xA;                    return False&#xD;&#xA;                self.x = self._start_x(self.y)&#xD;&#xA;                self.stop_x = self._stop_x(self.y)&#xD;&#xA;            assert self.x &gt;= 0 and self.x &lt; self.width, self.x&#xD;&#xA;            assert self.y &gt;= 0 and self.y &lt; self.height, self.y&#xD;&#xA;            return True&#xD;&#xA;        def _start_x(self,y):&#xD;&#xA;            # go down the left side&#xD;&#xA;            return max(0,self._side(y,0,3))&#xD;&#xA;        def _stop_x(self,y):&#xD;&#xA;            # go down the right side&#xD;&#xA;            return min(self.width,self._side(y,3,0)+1)&#xD;&#xA;        def _side(self,y,start,stop):&#xD;&#xA;            inc = -1 if start &lt; stop else 1&#xD;&#xA;            while self.t[stop].y &lt; y:&#xD;&#xA;                start = stop&#xD;&#xA;                stop += inc&#xD;&#xA;            f = (y - self.t[start].y)&#xD;&#xA;            f /= (self.t[stop].y - self.t[start].y)&#xD;&#xA;            return int(self.t[start].x + (self.t[stop].x - self.t[start].x) * f)&#xD;&#xA;            &#xD;&#xA;    def test(image,col,a,b,c,d):&#xD;&#xA;        w,h = image.size&#xD;&#xA;        it = TrapeziumIterator(image,w,h,a,b,c,d)&#xD;&#xA;        while it.next(): &#xD;&#xA;            image.putpixel((it.x,it.y),col)&#xD;&#xA;    &#xD;&#xA;    # test it&#xD;&#xA;    import Image&#xD;&#xA;    w,h = 100,100&#xD;&#xA;    image = Image.new(&quot;RGB&quot;,(w,h),(255,255,255))&#xD;&#xA;    test(image,(0,255,0),Pt(-60.3,-10.4),Pt(20.2,25.3),Pt(70,90.2),Pt(60,110))&#xD;&#xA;    test(image,(255,0,0),Pt(30.3,40.4),Pt(60.2,25.3),Pt(70,50.2),Pt(33,47.7))&#xD;&#xA;    # debug show it a bit larger&#xD;&#xA;    image = image.resize((w*6,h*6))&#xD;&#xA;    image.show()&#xD;&#xA;&#xD;&#xA;The quad is described by its four corners in clockwise order.  The algorithm finds the top-most corner, and then walks down the left and right sides." />
  <row Id="35242" PostHistoryTypeId="25" PostId="15482" RevisionGUID="1d054b1e-d614-4e70-9af6-8249b3434ce1" CreationDate="2011-08-03T12:36:41.777" Comment="http://twitter.com/#!/StackGameDev/status/98734029976768512" />
  <row Id="35243" PostHistoryTypeId="5" PostId="15510" RevisionGUID="9f06642a-1c35-4971-9934-ef55cc2a7fe3" CreationDate="2011-08-03T12:37:27.667" UserId="4129" Comment="added 186 characters in body" Text="So I implemented my own; here's the python prototype:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class Pt:&#xD;&#xA;        def __init__(self,x,y):&#xD;&#xA;            self.x = x&#xD;&#xA;            self.y = y&#xD;&#xA;        def __repr__(self): &#xD;&#xA;            return &quot;(%s,%s)&quot;%(self.x,self.y)    &#xD;&#xA;    &#xD;&#xA;    class TrapeziumIterator:&#xD;&#xA;        def __init__(self,map,width,height,a,b,c,d):&#xD;&#xA;            # create an iterator over the cells in the map that are in the trapezium described by a,b,c,d corners&#xD;&#xA;            # a,b,c,d describes the CLOCKWISE perimeter of the trapezium, e.g. tl,tr,br,bl from screenspace&#xD;&#xA;            self.map = map&#xD;&#xA;            self.width = width&#xD;&#xA;            self.height = height&#xD;&#xA;            # we re-orientate the trapezium so the lowest y is topmost&#xD;&#xA;            t = [a,b,c,d]&#xD;&#xA;            start_y = min(pt.y for pt in t)&#xD;&#xA;            while t[0].y != start_y:&#xD;&#xA;                t.append(t[0])&#xD;&#xA;                del t[0]&#xD;&#xA;            self.t = t&#xD;&#xA;            # work out starting position&#xD;&#xA;            self.y = int(max(0,start_y)) # init y before x!&#xD;&#xA;            self.x = self._start_x(self.y)-1 # x is iterated in the first call to next()&#xD;&#xA;            # work out stopping positions&#xD;&#xA;            self.stop_x = self._stop_x(self.y)&#xD;&#xA;            self.stop_y = int(min(height,max(pt.y for pt in t)+1))&#xD;&#xA;        def next(self):&#xD;&#xA;            &quot;return True if there is a square to be visited; then the x and y variables member are set; else return False&quot;&#xD;&#xA;            self.x += 1&#xD;&#xA;            while self.x &gt;= self.stop_x:&#xD;&#xA;                self.y += 1&#xD;&#xA;                if self.y &gt;= self.stop_y:&#xD;&#xA;                    return False # reached the end&#xD;&#xA;                self.x = self._start_x(self.y)&#xD;&#xA;                self.stop_x = self._stop_x(self.y)&#xD;&#xA;            assert self.x &gt;= 0 and self.x &lt; self.width, self.x&#xD;&#xA;            assert self.y &gt;= 0 and self.y &lt; self.height, self.y&#xD;&#xA;            return True # you can read the x and y member variables&#xD;&#xA;        def _start_x(self,y):&#xD;&#xA;            # go down the left side&#xD;&#xA;            return max(0,self._side(y,0,3))&#xD;&#xA;        def _stop_x(self,y):&#xD;&#xA;            # go down the right side&#xD;&#xA;            return min(self.width,self._side(y,3,0)+1)&#xD;&#xA;        def _side(self,y,start,stop):&#xD;&#xA;            inc = -1 if start &lt; stop else 1&#xD;&#xA;            while self.t[stop].y &lt; y:&#xD;&#xA;                start = stop&#xD;&#xA;                stop += inc&#xD;&#xA;            f = (y - self.t[start].y)&#xD;&#xA;            f /= (self.t[stop].y - self.t[start].y)&#xD;&#xA;            return int(self.t[start].x + (self.t[stop].x - self.t[start].x) * f)&#xD;&#xA;            &#xD;&#xA;    def test(image,col,a,b,c,d):&#xD;&#xA;        w,h = image.size&#xD;&#xA;        it = TrapeziumIterator(image,w,h,a,b,c,d)&#xD;&#xA;        while it.next(): &#xD;&#xA;            image.putpixel((it.x,it.y),col)&#xD;&#xA;    &#xD;&#xA;    # test it&#xD;&#xA;    import Image&#xD;&#xA;    w,h = 100,100&#xD;&#xA;    image = Image.new(&quot;RGB&quot;,(w,h),(255,255,255))&#xD;&#xA;    test(image,(0,255,0),Pt(-60.3,-10.4),Pt(20.2,25.3),Pt(70,90.2),Pt(60,110))&#xD;&#xA;    test(image,(255,0,0),Pt(30.3,40.4),Pt(60.2,25.3),Pt(70,50.2),Pt(33,47.7))&#xD;&#xA;    # debug show it a bit larger&#xD;&#xA;    image = image.resize((w*6,h*6))&#xD;&#xA;    image.show()&#xD;&#xA;&#xD;&#xA;The quad is described by its four corners in clockwise order.  The algorithm finds the top-most corner, and then walks down the left and right sides." />
  <row Id="35244" PostHistoryTypeId="2" PostId="15515" RevisionGUID="fa43ebab-b75d-4dc5-8377-26f5e01686f0" CreationDate="2011-08-03T12:41:45.510" UserId="696" Text="I've really enjoyed reading [Level Up - The Guide to Great Video Game Design][1]&#xD;&#xA;It's pretty comprehensive about the entire spectrum of game design.&#xD;&#xA;&#xD;&#xA;Written by the game designer behind the Maximo series of games it's illustrated in an approachable style. Well worth a read.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/gp/product/047068867X/ref=oss_product" />
  <row Id="35245" PostHistoryTypeId="16" PostId="15515" RevisionGUID="eae5cc75-13bb-4619-95ab-a65a68089c45" CreationDate="2011-08-03T12:41:45.510" UserId="696" />
  <row Id="35246" PostHistoryTypeId="2" PostId="15516" RevisionGUID="4229ef5d-6f70-4d8c-bedf-7cf3003b85c4" CreationDate="2011-08-03T13:26:48.863" UserId="5473" Text="The problem here is that you are trying to get a controlled object (screen you're in) to direct it's controlling object (ScreenManager). Two approaches come to mind:&#xD;&#xA;&#xD;&#xA;1. Adapt the code of the library so that the ScreenManager listens for and acts on custom events fired from the screens it manages. You could  send events that carry an instance of class `object` that you can fill with data every time, and respond accordingly in the ScreenManager.&#xD;&#xA;&#xD;&#xA;2. Define an object with static data members, which you can then reference from any other class. When you want to change state with context, push the context into this central class; fire the request to change; when the change is about to occur, check the central class and act accordingly. I find this approach hackish as I hate relying on statics to hold globally accessible info this way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I developed a gamestate system for [Disjunction][1], I got around this by method 1: I explicitly designed the state subsystem to carry data on every transition, informing the new state as to the old state's intent. Whether you do this via events or direct references is up to you. The state pattern is a really easy one to get to grips with -- maybe you should roll your own.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/disjunction/" />
  <row Id="35247" PostHistoryTypeId="4" PostId="2563" RevisionGUID="baa30295-16d5-4eb3-9558-9ac03886cc1c" CreationDate="2011-08-03T13:32:46.440" UserId="9025" Comment="spellchecking" Text="Attributes for calculating a hit in a turn based game or Roguelikes" />
  <row Id="35248" PostHistoryTypeId="24" PostId="2563" RevisionGUID="baa30295-16d5-4eb3-9558-9ac03886cc1c" CreationDate="2011-08-03T13:32:46.440" Comment="Proposed by 9025 approved by 14 edit id of 593" />
  <row Id="35249" PostHistoryTypeId="6" PostId="4177" RevisionGUID="c35344ae-f12d-4a2e-a81a-8a1ce1782378" CreationDate="2011-08-03T13:32:54.100" UserId="8921" Comment="The game-design tag is irrelevant, the design feature is user feedback" Text="&lt;xna&gt;&lt;2d&gt;&lt;lighting&gt;&lt;graphic-effects&gt;" />
  <row Id="35250" PostHistoryTypeId="24" PostId="4177" RevisionGUID="c35344ae-f12d-4a2e-a81a-8a1ce1782378" CreationDate="2011-08-03T13:32:54.100" Comment="Proposed by 8921 approved by 14 edit id of 592" />
  <row Id="35251" PostHistoryTypeId="2" PostId="15517" RevisionGUID="dd630e05-a64b-4a9c-b2b2-0d98e9743d55" CreationDate="2011-08-03T14:13:22.373" UserId="9029" Text="If you're - as you say - interested in *current* technology :&#xD;&#xA;&#xD;&#xA;1) Lighting : Per-pixel lighting, definitely. If you want to look at current-gen rendering, you'll be looking at writing vertex- and pixelshaders. Simple as that. They offer almost unlimited flexibility and are not much harder to use than the fixed-function pipeline, if you start to learn them properly. OpenGL's 8 light limit is only applicable for old-fashioned fixed-function pipeline setups. Don't go that route, learn OpenGL Core and forget about all the dated glBegin/glEnd stuff.&#xD;&#xA;&#xD;&#xA;2) Sorting / Culling : To start out : only sort if you need to for transparency. Only cull objects that are outside the view-frustum.&#xD;&#xA;&#xD;&#xA;3) If you're using OpenGL, use VBO's and VAO's.&#xD;&#xA;&#xD;&#xA;-&#xD;&#xA;&#xD;&#xA;Unasked : if you're making a viewer for an old-fashioned BSP format (I suspect something from an ould Valve / ID engine ?) you should be able to get away with drawing the entire level without any sort of optimization (culling / bsp) at all and still get full framerate on modern hardware ;)&#xD;&#xA;&#xD;&#xA;OpenGL Tip: Get the OpenGL Superbible 5th edition.&#xD;&#xA;This will teach you how to do modern OpenGL and will not cloud your mind with stuff you'll later find out is outdated.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35252" PostHistoryTypeId="2" PostId="15518" RevisionGUID="3f47db94-8d50-426b-8e46-ce7b54eec738" CreationDate="2011-08-03T15:00:42.150" UserId="6588" Text="A good architecture is keeping the GameState and ScreenManager objects separate so they don't directly know about each other and only indirectly communicate though an EventDispatcher object; ScreenManager registers with EventDispatcher as listening for messages about models being picked, and GameState sends a message to EventDispatcher about a model being picked (along with a parameter for which model was picked).&#xD;&#xA;&#xD;&#xA;Going in the other direction is as simple as having ScreenManager dispatch events about buttons being clicked, and GameState listens for messages about buttons being clicked.&#xD;&#xA;&#xD;&#xA;Now you can change either the GameState object or the ScreenManager at will and, as long as you don't change the messages each is dispatching/listening to, changing one will never affect the other.&#xD;&#xA;&#xD;&#xA;I believe this is the Observer pattern, although frankly my knowledge of design patterns is kinda ad hoc." />
  <row Id="35253" PostHistoryTypeId="2" PostId="15519" RevisionGUID="465224b2-82a9-42c0-9e25-26f672bc8f93" CreationDate="2011-08-03T15:28:36.210" UserId="8830" Text="I was thinking about howto organize the stage about getting informed about whatever game is needed to develop, what would you do.&#xD;&#xA;&#xD;&#xA;Fe example if I would want to develop a game about car races I should figure out all the factors during the race, from the car factor to the pilots, etc. etc, weather, circuit conditions, etc.. so... how do you manage this stage?&#xD;&#xA;&#xD;&#xA;thanks" />
  <row Id="35254" PostHistoryTypeId="1" PostId="15519" RevisionGUID="465224b2-82a9-42c0-9e25-26f672bc8f93" CreationDate="2011-08-03T15:28:36.210" UserId="8830" Text="investigation stage before starting a game?" />
  <row Id="35255" PostHistoryTypeId="3" PostId="15519" RevisionGUID="465224b2-82a9-42c0-9e25-26f672bc8f93" CreationDate="2011-08-03T15:28:36.210" UserId="8830" Text="&lt;planning&gt;" />
  <row Id="35256" PostHistoryTypeId="2" PostId="15520" RevisionGUID="f0e8fcc5-b301-454e-9efd-9ff83bf811b7" CreationDate="2011-08-03T15:33:52.290" UserId="8830" Text=" how it is more proper to pay your team during  for a game development, how would you pay to a graphist and to a musician for them work, base in the nowadays APP selling system as appleapp store or the Android market?&#xD;&#xA;&#xD;&#xA;it is better to pay in advance the graphic and music artist, or could be better to share the incomes proportionally as an app it gets successful?&#xD;&#xA;&#xD;&#xA;Thank you" />
  <row Id="35257" PostHistoryTypeId="1" PostId="15520" RevisionGUID="f0e8fcc5-b301-454e-9efd-9ff83bf811b7" CreationDate="2011-08-03T15:33:52.290" UserId="8830" Text="paying people who works in a game development" />
  <row Id="35258" PostHistoryTypeId="3" PostId="15520" RevisionGUID="f0e8fcc5-b301-454e-9efd-9ff83bf811b7" CreationDate="2011-08-03T15:33:52.290" UserId="8830" Text="&lt;monetization&gt;&lt;transparency&gt;" />
  <row Id="35259" PostHistoryTypeId="25" PostId="15172" RevisionGUID="fc9c5885-c57b-444a-8598-9bd6a963b74c" CreationDate="2011-08-03T15:36:42.260" Comment="http://twitter.com/#!/StackGameDev/status/98779330657796096" />
  <row Id="35260" PostHistoryTypeId="2" PostId="15521" RevisionGUID="dd832633-15ec-4755-98e5-cdfc2110a7ea" CreationDate="2011-08-03T15:47:38.580" UserId="3830" Text="I'd think you have two approaches:  you can hire them as contractors, or as partners.&#xD;&#xA;&#xD;&#xA;As contractors, you are paying them one time for what they do - e.g., &quot;I will pay you X for a total of 4 music tracks&quot;  You own what they make outright, and it's yours to do with as you please. &#xD;&#xA;&#xD;&#xA;As partners, they may (or may not) be paid for their work on the project, but at the same time they also are given some kind of royalty or income based on the sales of your game.&#xD;&#xA;&#xD;&#xA;My personal opinion is that if the artists are not deeply involved in your game's design, hire them as contractors.  Pay them once, and never worry about it again.  If they an integral part of the design process, then bring them in as partners so they feel a greater sense of pride (and ownership) in what they do.&#xD;&#xA;" />
  <row Id="35261" PostHistoryTypeId="2" PostId="15522" RevisionGUID="6c3ec665-6804-437a-975e-da45de267fcc" CreationDate="2011-08-03T15:52:10.237" UserId="7548" Text="Each project will be different, and may also find that your potential employees have a variety expectations.&#xD;&#xA;&#xD;&#xA;For example, many folks may prefer a salary because they have a practical personal need to pay rent/mortgage and put food on their table.  Especially if there is a need to hire them for a lot of hours (e.g., 40 hours per week for 6 months), your employees will probably be more comfortable with regular paycheques.&#xD;&#xA;&#xD;&#xA;If the jobs are really small (e.g., less than a week's work), then paying on a per-project basis may work better.  They may wish to get partial payment up front, with the remainder after the project is completed (or for larger projects there could be a number of payments in between as the work progresses).&#xD;&#xA;&#xD;&#xA;There may some employees who will find a &quot;hybrid&quot; of these two ideas acceptable, such as in the form of a base salary plus a percentage of the profits after the game is released (&quot;profit sharing&quot; which is similar to paying royalties, except that you'll probably want to be the owner of the work they've done for you).&#xD;&#xA;&#xD;&#xA;This &quot;profit sharing&quot; approach can provide a subtle long-term marketing advantage because those who get a share of the profits as long as the game is profitable will likely feel motivated to do &quot;word of mouth marketing&quot; for you by telling people &quot;you know, I contributed to _that_ game, you should try it!&quot;&#xD;&#xA;&#xD;&#xA;**Advice from professionals**&#xD;&#xA;&#xD;&#xA;You will need to talk to an **accountant** (a CGA designation is highly recommended) to make sure you get all the payroll and taxation aspects of your employment arrangements set up correctly.&#xD;&#xA;&#xD;&#xA;You will also need to talk to a **lawyer** (one with experience in both contract law and employment standards is preferred) to get any employment contracts set up correctly.&#xD;&#xA;&#xD;&#xA;For the profit sharing arrangements, you may even need to have one short meeting with both your lawyer and your accountant at the same time.&#xD;&#xA;" />
  <row Id="35262" PostHistoryTypeId="5" PostId="15522" RevisionGUID="c6804e05-315d-440f-9b72-ea987a430c71" CreationDate="2011-08-03T16:01:01.507" UserId="7548" Comment="added 4 characters in body" Text="Each project will be different, and you may also find that your potential employees have a variety of expectations.&#xD;&#xA;&#xD;&#xA;For example, many folks may prefer a salary because they have a practical personal need to pay rent/mortgage and put food on their table.  Especially if there is a need to hire them for a lot of hours (e.g., 40 hours per week for 6 months), your employees will probably be more comfortable with regular paycheques.&#xD;&#xA;&#xD;&#xA;If the jobs are really small (e.g., less than a week's work), then paying on a per-project basis may work better.  They may wish to get partial payment up front, with the remainder after the project is completed (and with larger projects there could also be a number of payments in between as the work progresses).&#xD;&#xA;&#xD;&#xA;There may some employees who will find a &quot;hybrid&quot; of these two ideas acceptable, such as in the form of a base salary plus a percentage of the profits after the game is released (&quot;profit sharing&quot; which is similar to paying royalties, except that you'll probably want to be the owner of the work they've done for you).&#xD;&#xA;&#xD;&#xA;This &quot;profit sharing&quot; approach can provide a subtle long-term marketing advantage because those who get a share of the profits as long as the game is profitable will likely feel motivated to do &quot;word of mouth marketing&quot; for you by telling people &quot;you know, I contributed to _that_ game, you should try it!&quot;&#xD;&#xA;&#xD;&#xA;**Advice from professionals**&#xD;&#xA;&#xD;&#xA;You will need to talk to an **accountant** (a CGA designation is highly recommended) to make sure you get all the payroll and taxation aspects of your employment arrangements set up correctly.&#xD;&#xA;&#xD;&#xA;You will also need to talk to a **lawyer** (one with experience in both contract law and employment standards is preferred) to get any employment contracts set up correctly.&#xD;&#xA;&#xD;&#xA;For the profit sharing arrangements, you may even need to have one short meeting with both your lawyer and your accountant at the same time.&#xD;&#xA;" />
  <row Id="35263" PostHistoryTypeId="5" PostId="15520" RevisionGUID="ab393b09-292b-4011-942a-48b4771627b5" CreationDate="2011-08-03T16:01:56.407" UserId="1430" Comment="deleted 19 characters in body; edited tags; edited title" Text="What is the proper way to pay your team for a game development project? For example, how would you pay to a graphics artists or a musician for their work, especially in the context of today's app marketplaces like the Apple App Store or the Android Market?&#xD;&#xA;&#xD;&#xA;It is better to pay in advance, or to share the incomes proportionally as an app becomes successful?" />
  <row Id="35264" PostHistoryTypeId="4" PostId="15520" RevisionGUID="ab393b09-292b-4011-942a-48b4771627b5" CreationDate="2011-08-03T16:01:56.407" UserId="1430" Comment="deleted 19 characters in body; edited tags; edited title" Text="How should I pay people who work on my game development project?" />
  <row Id="35265" PostHistoryTypeId="6" PostId="15520" RevisionGUID="ab393b09-292b-4011-942a-48b4771627b5" CreationDate="2011-08-03T16:01:56.407" UserId="1430" Comment="deleted 19 characters in body; edited tags; edited title" Text="&lt;project-management&gt;&lt;payment&gt;" />
  <row Id="35266" PostHistoryTypeId="5" PostId="15522" RevisionGUID="9f6c2ee9-8a4f-410a-99db-0f139e138451" CreationDate="2011-08-03T16:07:23.153" UserId="7548" Comment="added 4 characters in body" Text="Each project will be different, and you may also find that your potential employees have a variety of expectations.&#xD;&#xA;&#xD;&#xA;For example, many folks may prefer a salary because they have a practical personal need to pay rent/mortgage and put food on their table.  Especially if there is a need to hire them for a lot of hours (e.g., 40 hours per week for 6 months), your employees will probably be more comfortable with regular paycheques.&#xD;&#xA;&#xD;&#xA;If the jobs are really small (e.g., less than a week's work), then paying on a per-project basis may work better.  They may wish to get partial payment up front, with the remainder after the project is completed (and with larger projects there could also be a number of payments in between as the work progresses).&#xD;&#xA;&#xD;&#xA;There may also some employees who are willing to agree to a &quot;hybrid&quot; of these two ideas, such as in the form of a base salary plus a percentage of the profits after the game is released (&quot;profit sharing&quot; which is similar to paying royalties, except that you'll probably want to be the owner of the work they've done for you).  The risk is, of course, that the game never turns a profit and they don't get to realize the potential benefits of profit sharing (you'll want to make sure this is explained clearly in the contract -- the &quot;Advice from professionals&quot; section below recommends getting legal advice).&#xD;&#xA;&#xD;&#xA;The positive side of this &quot;profit sharing&quot; approach is that it can provide a subtle long-term marketing advantage because those who get a share of the profits [as long as, or whenever, the game is profitable] will likely feel motivated to do &quot;word of mouth marketing&quot; for you by telling people &quot;I contributed to _that_ game; you should try it!&quot;&#xD;&#xA;&#xD;&#xA;**Advice from professionals**&#xD;&#xA;&#xD;&#xA;Hire an **accountant** (a CGA designation is highly recommended) to make sure you get all the payroll and taxation aspects of your employment arrangements set up correctly.&#xD;&#xA;&#xD;&#xA;Hire a **lawyer** (one with experience in both contract law and employment standards is preferred) to make sure your employment and/or profit sharing contracts are set up correctly.&#xD;&#xA;&#xD;&#xA;For the profit sharing arrangements, you will probably need to have one short meeting with both your lawyer and your accountant at the same time.&#xD;&#xA;" />
  <row Id="35267" PostHistoryTypeId="2" PostId="15523" RevisionGUID="026ba85f-4344-490b-acd3-fae0f8be2ad9" CreationDate="2011-08-03T16:14:12.930" UserId="7548" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially); perhaps this will be helpful to you?&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called Infinity Complex on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in he 1990s the internet swept the public by storm, and I _upgraded_ (or scaled up) my vision.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;   * Concepts&#xD;&#xA;   * Story&#xD;&#xA;   * Miscellaneous&#xD;&#xA;   * Source&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;[I'm currently expanding on this answer, updates will be available shortly...]&#xD;&#xA;" />
  <row Id="35268" PostHistoryTypeId="5" PostId="15523" RevisionGUID="0e1c07ee-d7ad-4855-a456-95c6a5b9286a" CreationDate="2011-08-03T16:24:13.110" UserId="7548" Comment="added 1104 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially); perhaps this will be helpful to you?&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called Infinity Complex on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in he 1990s the internet swept the public by storm, and I _upgraded_ (or scaled up) my vision.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Story&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;      * Story (mine is currently larger than 65 MBs of pure ASCII text)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;&#xD;&#xA;[I'm currently expanding on this answer, updates will be available shortly...]&#xD;&#xA;" />
  <row Id="35269" PostHistoryTypeId="5" PostId="15523" RevisionGUID="f84b5334-27ff-4905-9ca8-6220be6345d0" CreationDate="2011-08-03T16:30:08.893" UserId="7548" Comment="added 1104 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially); perhaps this will be helpful to you?&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called Infinity Complex on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in he 1990s the internet swept the public by storm, and I _upgraded_ (or scaled up) my vision.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Story&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;      * Story (mine is currently larger than 65 MBs of pure ASCII text)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;&#xD;&#xA;Within many of these diretories, I have a variety of text files named simply and logically, and then in many cases I also have accompanying &quot;Research&quot; directories where I store more files that are the result of research that I've done over the years...&#xD;&#xA;&#xD;&#xA;For the Orc species I have a file called &quot;Concepts/Species/Orc.txt&quot; which contains specifications, the various races, abilities, natural intelligence levels, and other information about Orcs.  I also have a &quot;Concepts/Species/Research/Orc/&quot; directory which contains pictures and other information about Orcs which I have researched over the years.  If I create art for Orcs some day, then I will store it in the &quot;Concepts/Species/Art/Orc/&quot; directory (and make any subdirectories there for the different races, or whatever, if necessary).&#xD;&#xA;&#xD;&#xA;For other species, just change &quot;Orc&quot; to whatever the name of that species is.  For a species I created where there is no pre-existing data anywhere to be found, if there is something similar to it then I store a copy of it in the relevant &quot;Research&quot; directory for that species.  If I need to add a note to a .PDF file, for example, then I'll create a .txt file with the same base filename and save my notes in there.&#xD;&#xA;&#xD;&#xA;The key with using a hierarchy like this effectively though is to try to keep the structure deep instead of flat.  In other words, don't fill up your higher (closer to the &quot;root&quot; or &quot;top&quot;) in your structure with too many categories -- sub-categorize instead.  (If you're so inclined, use a database to store your information; my personal preference just happens to be a deep directory structure instead, and it works quite well for my needs.)  If you go flat-and-wide instead of deep, it will become a challenge to navigate and manage, and over time it will feel &quot;disorganized&quot; and be more of a pain to work with.&#xD;&#xA;" />
  <row Id="35270" PostHistoryTypeId="5" PostId="15523" RevisionGUID="9c03cda2-7d8b-4b60-af31-6983a9982e4f" CreationDate="2011-08-03T16:43:32.873" UserId="7548" Comment="added 1104 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially).  Perhaps this will be helpful to you...&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called Infinity Complex on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in he 1990s the internet swept the public by storm, and I _upgraded_ (or _scaled up_) my vision to accommodate a much larger multi-player base.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Story&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Chapters (mine is currently larger than 65 MBs of pure ASCII text, divided up into separate files like &quot;chapter8.txt&quot;)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;&#xD;&#xA;Within many of these diretories, I have a variety of text files named simply and logically, and then in many cases I also have accompanying &quot;Research&quot; directories where I store more files that are the result of research that I've done over the years...&#xD;&#xA;&#xD;&#xA;For the Orc species I have a file called &quot;Concepts/Species/Orc.txt&quot; which contains specifications, the various races, abilities, natural intelligence levels, and other information about Orcs.  I also have a &quot;Concepts/Species/Research/Orc/&quot; directory which contains pictures and other information about Orcs which I have researched over the years.  If I create art for Orcs some day, then I will store it in the &quot;Concepts/Species/Art/Orc/&quot; directory (and make any subdirectories there for the different races, or whatever, if necessary).&#xD;&#xA;&#xD;&#xA;For other species, just change &quot;Orc&quot; to whatever the name of that species is.  For a species I created where there is no pre-existing data anywhere to be found, if there is something similar to it then I store a copy of it in the relevant &quot;Research&quot; directory for that species.  If I need to add a note to a .PDF file, for example, then I'll create a .txt file with the same base filename and save my notes in there.&#xD;&#xA;&#xD;&#xA;Another example would be &quot;Shops&quot; which works in pretty much the same way.  For the Weapons shop (which is sometimes combined with the Armoury and/or Archery shops in some towns), I have a text file called &quot;Concepts/Shops/Weaponry.txt&quot; which contains a list of various armour that these shops can carry.  There's also another sub-heading for &quot;specialized armour&quot; in this same text file that lists certain armour that is only available in a few shops throughout the world, along with a little bit of background about why (e.g., the merchant has a specialized skill that is needed to create this particular type of armour, and there are only three characters throughout the world that have this skill).  For shops that are sometimes combined with other shops, I have a special sub-heading in my text file for this too, with references to the filenames for those shops (and then I make sure those shops reference back as well).  For pictures of armour and documentation about how various armour works (from researching the internet, scanning in pages from library books, etc.), I store these files in the &quot;Concepts/Shops/Research/Armoury/&quot; directory.&#xD;&#xA;&#xD;&#xA;The key with using a hierarchy like this effectively though is to try to keep the structure deep instead of flat.  In other words, don't fill up your higher (closer to the &quot;root&quot; or &quot;top&quot;) in your structure with too many categories -- sub-categorize instead.  (If you're so inclined, use a database to store your information; my personal preference just happens to be a deep directory structure instead, and it works quite well for my needs.)  If you go flat-and-wide instead of deep, it will become a challenge to navigate and manage, and over time it will feel &quot;disorganized&quot; and be more of a pain to work with.&#xD;&#xA;&#xD;&#xA;Under &quot;Project_name&quot; I do keep a few text files, which are:&#xD;&#xA;&#xD;&#xA;* credits.txt (a list of people who have contributed a few ideas, support, etc.)&#xD;&#xA;* description.txt (a generalized description of the project, will be useful in marketing)&#xD;&#xA;* names.txt (literally thousands of names I've been dreaming up all these years)&#xD;&#xA;* vision.txt (general purpose of this project, key features, benefits to users, etc.)&#xD;&#xA;&#xD;&#xA;Under the other directories I often have a &quot;resources.txt&quot; file that includes links to web sites (and the dates I found them just in case I need to use a service like &quot;archive.org&quot; to view them in the future) with a note about why the link is relevant.  These are the types of resources that I don't absolutely have to have, but would be useful in expanding on further research should I need to at some point (searching for stuff in Google is very helpful, but pre-determined resources like this can still save a lot of time).&#xD;&#xA;&#xD;&#xA;I hope this is helpful to you.&#xD;&#xA;" />
  <row Id="35271" PostHistoryTypeId="5" PostId="15523" RevisionGUID="6cd87ac0-63e7-4500-a95a-6686fb5fa04c" CreationDate="2011-08-03T16:49:04.447" UserId="7548" Comment="added 1104 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially).  Perhaps this will be helpful to you...&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called Infinity Complex on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in he 1990s the internet swept the public by storm, and I _upgraded_ (or _scaled up_) my vision to accommodate a much larger multi-player base.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Story&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Chapters (mine is currently larger than 65 MBs of pure ASCII text, divided up into separate files like &quot;chapter8.txt&quot;)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;&#xD;&#xA;Within many of these diretories, I have a variety of text files named simply and logically, and then in many cases I also have accompanying &quot;Research&quot; directories where I store more files that are the result of research that I've done over the years...&#xD;&#xA;&#xD;&#xA;For the Orc species I have a file called &quot;Concepts/Species/Orc.txt&quot; which contains specifications, the various races, abilities, natural intelligence levels, and other information about Orcs.  I also have a &quot;Concepts/Species/Research/Orc/&quot; directory which contains pictures and other information about Orcs which I have researched over the years.  If I create art for Orcs some day, then I will store it in the &quot;Concepts/Species/Art/Orc/&quot; directory (and make any subdirectories there for the different races, or whatever, if necessary).&#xD;&#xA;&#xD;&#xA;For other species, just change &quot;Orc&quot; to whatever the name of that species is.  For a species I created where there is no pre-existing data anywhere to be found, if there is something similar to it then I store a copy of it in the relevant &quot;Research&quot; directory for that species.  If I need to add a note to a .PDF file, for example, then I'll create a .txt file with the same base filename and save my notes in there.&#xD;&#xA;&#xD;&#xA;Another example would be &quot;Shops&quot; which works in pretty much the same way.  For the Weapons shop (which is sometimes combined with the Armoury and/or Archery shops in some towns), I have a text file called &quot;Concepts/Shops/Weaponry.txt&quot; which contains a list of various weapons that these shops can carry.  There's also another sub-heading for &quot;specialized weapons&quot; in this same text file that lists certain specific weapons that is only available in a few shops throughout the world, along with a little bit of background about why (e.g., the merchant has a specialized skill that is needed to create this particular type of weapon, and there are only three characters throughout the world that have this skill).  For shops that are sometimes combined with other shops, I have a special sub-heading in my text file for this too, with references to the filenames for those shops (and then I make sure those shops reference back as well).  For pictures of armour and documentation about how various weapons work (from researching the internet, scanning pages from library books, etc.), I store these files in the &quot;Concepts/Shops/Research/Weaponry/&quot; directory.&#xD;&#xA;&#xD;&#xA;The key with using a hierarchy like this effectively though is to try to keep the structure deep instead of flat.  In other words, don't fill up your higher (closer to the &quot;root&quot; or &quot;top&quot;) in your structure with too many categories -- sub-categorize instead.  (If you're so inclined, use a database to store your information; my personal preference just happens to be a deep directory structure instead, and it works quite well for my needs.)  If you go flat-and-wide instead of deep, it will become a challenge to navigate and manage, and over time it will feel &quot;disorganized&quot; and be more of a pain to work with.&#xD;&#xA;&#xD;&#xA;Under &quot;Project_name&quot; I do keep a few text files, which are:&#xD;&#xA;&#xD;&#xA;* credits.txt (a list of people who have contributed a few ideas, support, etc.)&#xD;&#xA;* description.txt (a generalized description of the project, will be useful in marketing)&#xD;&#xA;* names.txt (literally thousands of names I've been dreaming up all these years)&#xD;&#xA;* vision.txt (general purpose of this project, key features, benefits to users, etc.)&#xD;&#xA;&#xD;&#xA;Under the other directories I often have a &quot;resources.txt&quot; file that includes links to web sites (and the dates I found them just in case I need to use a service like &quot;archive.org&quot; to view them in the future) with a note about why the link is relevant.  These are the types of resources that I don't absolutely have to have, but would be useful in expanding on further research should I need to at some point (searching for stuff in Google is very helpful, but pre-determined resources like this can still save a lot of time).&#xD;&#xA;&#xD;&#xA;I hope this is helpful to you, or, at the very least, interesting enough to get you started.&#xD;&#xA;" />
  <row Id="35272" PostHistoryTypeId="5" PostId="15523" RevisionGUID="0c1a33d6-ff00-4575-b697-944b34c5bdc1" CreationDate="2011-08-03T16:55:12.583" UserId="7548" Comment="added 1 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially).  Perhaps this will be helpful to you...&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called Infinity Complex on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in he 1990s the internet swept the public by storm, and I _upgraded_ (or _scaled up_) my vision to accommodate a much larger multi-player base.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Documents&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;      * Story (mine is currently larger than 65 MBs of pure ASCII text, divided up into numbered book sub-directories each containing separate files like &quot;chapter8.txt&quot;)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;&#xD;&#xA;Within many of these diretories, I have a variety of text files named simply and logically, and then in many cases I also have accompanying &quot;Research&quot; directories where I store more files that are the result of research that I've done over the years...&#xD;&#xA;&#xD;&#xA;For the Orc species I have a file called &quot;Concepts/Species/Orc.txt&quot; which contains specifications, the various races, abilities, natural intelligence levels, and other information about Orcs.  I also have a &quot;Concepts/Species/Research/Orc/&quot; directory which contains pictures and other information about Orcs which I have researched over the years.  If I create art for Orcs some day, then I will store it in the &quot;Concepts/Species/Art/Orc/&quot; directory (and make any subdirectories there for the different races, or whatever, if necessary).&#xD;&#xA;&#xD;&#xA;For other species, just change &quot;Orc&quot; to whatever the name of that species is.  For a species I created where there is no pre-existing data anywhere to be found, if there is something similar to it then I store a copy of it in the relevant &quot;Research&quot; directory for that species.  If I need to add a note to a .PDF file, for example, then I'll create a .txt file with the same base filename and save my notes in there.&#xD;&#xA;&#xD;&#xA;Another example would be &quot;Shops&quot; which works in pretty much the same way.  For the Weapons shop (which is sometimes combined with the Armoury and/or Archery shops in some towns), I have a text file called &quot;Concepts/Shops/Weaponry.txt&quot; which contains a list of various weapons that these shops can carry.  There's also another sub-heading for &quot;specialized weapons&quot; in this same text file that lists certain specific weapons that is only available in a few shops throughout the world, along with a little bit of background about why (e.g., the merchant has a specialized skill that is needed to create this particular type of weapon, and there are only three characters throughout the world that have this skill).  For shops that are sometimes combined with other shops, I have a special sub-heading in my text file for this too, with references to the filenames for those shops (and then I make sure those shops reference back as well).  For pictures of armour and documentation about how various weapons work (from researching the internet, scanning pages from library books, etc.), I store these files in the &quot;Concepts/Shops/Research/Weaponry/&quot; directory.&#xD;&#xA;&#xD;&#xA;The key with using a hierarchy like this effectively though is to try to keep the structure deep instead of flat.  In other words, don't fill up your higher (closer to the &quot;root&quot; or &quot;top&quot;) in your structure with too many categories -- sub-categorize instead.  (If you're so inclined, use a database to store your information; my personal preference just happens to be a deep directory structure instead, and it works quite well for my needs.)  If you go flat-and-wide instead of deep, it will become a challenge to navigate and manage, and over time it will feel &quot;disorganized&quot; and be more of a pain to work with.&#xD;&#xA;&#xD;&#xA;Under &quot;Project_name&quot; I do keep a few text files, which are:&#xD;&#xA;&#xD;&#xA;* credits.txt (a list of people who have contributed a few ideas, support, etc.)&#xD;&#xA;* description.txt (a generalized description of the project, will be useful in marketing)&#xD;&#xA;* names.txt (literally thousands of names I've been dreaming up all these years)&#xD;&#xA;* vision.txt (general purpose of this project, key features, benefits to users, etc.)&#xD;&#xA;&#xD;&#xA;Under the other directories I often have a &quot;resources.txt&quot; file that includes links to web sites (and the dates I found them just in case I need to use a service like &quot;archive.org&quot; to view them in the future) with a note about why the link is relevant.  These are the types of resources that I don't absolutely have to have, but would be useful in expanding on further research should I need to at some point (searching for stuff in Google is very helpful, but pre-determined resources like this can still save a lot of time).&#xD;&#xA;&#xD;&#xA;I hope this is helpful to you, or, at the very least, interesting enough to get you started.&#xD;&#xA;" />
  <row Id="35273" PostHistoryTypeId="5" PostId="15519" RevisionGUID="256311e2-edbf-4513-bab5-41c907dbbd27" CreationDate="2011-08-03T16:55:28.700" UserId="7548" Comment="Added tags for design and research, and also improved the question." Text="I was thinking about _how_ to organize the stage about getting informed about whatever game is needed to develop, what would others do.&#xD;&#xA;&#xD;&#xA;Fe example, if I wanted to develop a game about car racing, I should figure out all the factors during the race, from the car factor to the pilots, etc., environmental factors like weather, circuit conditions, etc.&#xD;&#xA;&#xD;&#xA;How does one manage this stage?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;" />
  <row Id="35274" PostHistoryTypeId="4" PostId="15519" RevisionGUID="256311e2-edbf-4513-bab5-41c907dbbd27" CreationDate="2011-08-03T16:55:28.700" UserId="7548" Comment="Added tags for design and research, and also improved the question." Text="Investigation stage before starting a game" />
  <row Id="35275" PostHistoryTypeId="6" PostId="15519" RevisionGUID="256311e2-edbf-4513-bab5-41c907dbbd27" CreationDate="2011-08-03T16:55:28.700" UserId="7548" Comment="Added tags for design and research, and also improved the question." Text="&lt;game-design&gt;&lt;design-patterns&gt;&lt;planning&gt;&lt;research&gt;" />
  <row Id="35276" PostHistoryTypeId="24" PostId="15519" RevisionGUID="256311e2-edbf-4513-bab5-41c907dbbd27" CreationDate="2011-08-03T16:55:28.700" Comment="Proposed by 7548 approved by -1 edit id of 594" />
  <row Id="35277" PostHistoryTypeId="5" PostId="15519" RevisionGUID="da66d62f-ef3e-497e-81ad-5a3118636279" CreationDate="2011-08-03T16:55:29.213" UserId="1430" Comment="Added tags for design and research, and also improved the question." Text="I was thinking about _how_ to organize the stage about getting informed about whatever game is needed to develop, what would others do.&#xD;&#xA;&#xD;&#xA;For example, if I wanted to develop a game about car racing, I should figure out all the factors during the race, from the car factor to the pilots, etc., environmental factors like weather, circuit conditions, etc.&#xD;&#xA;&#xD;&#xA;How does one manage this stage?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;" />
  <row Id="35280" PostHistoryTypeId="25" PostId="15520" RevisionGUID="8158d830-0798-419e-8ec9-0e7093a6fde6" CreationDate="2011-08-03T18:36:42.387" Comment="http://twitter.com/#!/StackGameDev/status/98824630063726592" />
  <row Id="35281" PostHistoryTypeId="5" PostId="15518" RevisionGUID="0ebf6ae5-6819-4c73-ae93-c78567c164a0" CreationDate="2011-08-03T18:59:54.787" UserId="6588" Comment="added 337 characters in body" Text="A good architecture is keeping the GameState and ScreenManager objects separate so they don't directly know about each other and only indirectly communicate though an EventDispatcher object; ScreenManager registers with EventDispatcher as listening for messages about models being picked, and GameState sends a message to EventDispatcher about a model being picked (along with a parameter for which model was picked).&#xD;&#xA;&#xD;&#xA;Going in the other direction is as simple as having ScreenManager dispatch events about buttons being clicked, and GameState listens for messages about buttons being clicked.&#xD;&#xA;&#xD;&#xA;Now you can change either the GameState object or the ScreenManager at will and, as long as you don't change the messages each is dispatching/listening to, changing one will never affect the other.&#xD;&#xA;&#xD;&#xA;I believe this is the Observer pattern, although frankly my knowledge of design patterns is kinda ad hoc.&#xD;&#xA;&#xD;&#xA;EDIT: I misunderstood the question slightly, but I'm not changing my answer because it's still how I would do it. The relationship between the Game object and the ScreenManager in GSM is different from what I originally thought you were talking about, but using an EventDispatcher like this is still how I would pass messages around." />
  <row Id="35282" PostHistoryTypeId="2" PostId="15524" RevisionGUID="967479f0-54d8-42df-b45b-be3bf1d17f31" CreationDate="2011-08-03T19:07:45.350" UserId="9033" Text="**There is always [GLBasic][1].**&#xD;&#xA;&#xD;&#xA;It's a fairly high level language and has recently been expanding its mobile support.&#xD;&#xA;&#xD;&#xA; - It's both 2D and 3D&#xD;&#xA; - Free for non commercial&#xD;&#xA; - Basic sprite commands, with pixel or block collision&#xD;&#xA; - Write once and deploy to many devices and platforms (mostly)&#xD;&#xA; - Has Box2D support via wrapper (search forums)&#xD;&#xA; - Custom data TYPES with functions (close to a class but missing much OOP functionality)&#xD;&#xA; - Can get a sprite moving on the screen in a short time with few lines of code&#xD;&#xA;&#xD;&#xA;  [1]: http://www.glbasic.com/" />
  <row Id="35283" PostHistoryTypeId="16" PostId="15524" RevisionGUID="28e8d3b8-3de1-4a73-8caf-eebe970d5e7c" CreationDate="2011-08-03T19:07:45.350" UserId="9033" />
  <row Id="35284" PostHistoryTypeId="2" PostId="15525" RevisionGUID="c6bce301-44f8-43a8-83c5-b63b366d5936" CreationDate="2011-08-03T19:11:49.217" UserId="9034" Text="I tend to work more iteratively, and break the idea I have down into smaller problems that can be solved more easily.  By doing this it helps me see my progress more clearly with concrete results rather than spending weeks researching something that might never make it into the final game." />
  <row Id="35285" PostHistoryTypeId="2" PostId="15526" RevisionGUID="8191d606-67f9-4fa3-89b8-8f73ea2479eb" CreationDate="2011-08-03T19:22:33.887" UserId="8927" Text="After spending time today to jot down some notes regarding the implementation of walls into my tile-based game, I've suddenly realized it's not going to be as simple as I imagined before. While the current stage of my work is not even close to actually making the wall-related code, I've come up with three different ways to do it. Right now I'm unsure which one of my ideas will work best, and whether I missed something or not.&#xD;&#xA;&#xD;&#xA;Important: a character **CAN** stand on a tile that has walls, regardless of their form.&#xD;&#xA;&#xD;&#xA;The common thing for all the three variants: the tilemap will be &quot;kept&quot; in an single-dimension std::vector (or similar) based container. The reasons for that are (awesomely) explained in answers to a different question.&#xD;&#xA;&#xD;&#xA;http://gamedev.stackexchange.com/questions/15404/container-classes-in-tile-based-games&#xD;&#xA;&#xD;&#xA;Back to walls.&#xD;&#xA;&#xD;&#xA;**A) The simple approach.**&#xD;&#xA;&#xD;&#xA;Nothing fancy here. Each tile-container can hold not only characters, but one or several Wall objects, which are attached to the edge **inside** the tile. &#xD;&#xA;&#xD;&#xA;![First approach] (http://i.imgur.com/a551h.jpg)&#xD;&#xA;&#xD;&#xA;Pros: easy to implement, nothing to change in the engine.&#xD;&#xA;Cons: Two things. One - it might be just in my head, but some combinations just look ugly. Second - this approach allows to make a double-wall from two adjacent tiles. Building will be an important part of the game, and double-walls allow the builders to possibly forego upgrading the material of the walls through game means, and just achieve increased durability with doubling the existing wall. That's not desirable. Sure, I could include a procedure that forbids double-walling, but it will have a bad feel to it.&#xD;&#xA;&#xD;&#xA;**B)The smart(?) approach.**&#xD;&#xA;&#xD;&#xA;Instead of letting the players double-wall the whole map, I'm going to beat them to it. Every wall has two halves that are attached to the edge of the tile from inside. So, to make a single &quot;Wall unit&quot; I'll have to create two Half-Wall objects in two adjacent tiles.&#xD;&#xA;&#xD;&#xA;![Second approach] (http://i.imgur.com/hPVji.jpg)&#xD;&#xA;&#xD;&#xA;Pros: It's symmetrical!!! Also, no significant change of current engine specs is needed.&#xD;&#xA;Cons: More hassle, more objects, and, of course, the &quot;caps&quot;.&#xD;&#xA;As you can see in the picture, a corner will basically cry for a &quot;cap&quot; object. I'm actually cool with it, it's not so hard to add. Hey, I already have a plan for thin columns made out of four connected caps. Sweet. Still, I have some worries regarding possible Field of View and Line of Sight issues.&#xD;&#xA;&#xD;&#xA;**C) The total overhaul variant.**&#xD;&#xA;&#xD;&#xA;Or, I could just create borders and corners as separate containers for game objects. Just like that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![Third approach] (http://i.imgur.com/ZX8Yh.jpg)&#xD;&#xA;&#xD;&#xA;Pros: Not even sure. Well, it's straightforward. Definitely. &#xD;&#xA;Cons: It will require an overhaul. Not of code, thankfully, but of the current game mechanic mentality - that's for sure. The benefits are not so obvious. Also, this aprroach requires **much** more containers than the two previous ones. The indexing math will also be a bit of pain.&#xD;&#xA;&#xD;&#xA;So here we have it - three distinct ways of making walls between tiles. If there are any alternatives out there - I'll be happy to check them out. If there are any benefits/downfalls to any of the approaches that I didn't see - please point them out. " />
  <row Id="35286" PostHistoryTypeId="1" PostId="15526" RevisionGUID="8191d606-67f9-4fa3-89b8-8f73ea2479eb" CreationDate="2011-08-03T19:22:33.887" UserId="8927" Text="Making walls in tile-based games: what am I missing?" />
  <row Id="35287" PostHistoryTypeId="3" PostId="15526" RevisionGUID="8191d606-67f9-4fa3-89b8-8f73ea2479eb" CreationDate="2011-08-03T19:22:33.887" UserId="8927" Text="&lt;c++&gt;&lt;tiles&gt;&lt;level-design&gt;" />
  <row Id="35288" PostHistoryTypeId="5" PostId="15523" RevisionGUID="d99741d0-60a2-42d9-9c04-c132fc07ec0a" CreationDate="2011-08-03T20:08:51.810" UserId="7548" Comment="deleted 35 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially)...&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called _Infinity Complex_ on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in the 1990s the internet swept the public by storm, and I _upgraded_ (or _scaled up_) my vision to accommodate a much larger multi-player base.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Documents&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;      * Story (mine is currently larger than 65 MBs of pure ASCII text, divided up into numbered book sub-directories each containing separate files like &quot;chapter8.txt&quot;)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;&#xD;&#xA;Within many of these diretories, I have a variety of text files named simply and logically, and then in many cases I also have accompanying &quot;Research&quot; directories where I store more files that are the result of research that I've done over the years...&#xD;&#xA;&#xD;&#xA;For the Orc species I have a file called &quot;Concepts/Species/Orc.txt&quot; which contains specifications, the various races, abilities, natural intelligence levels, and other information about Orcs.  I also have a &quot;Concepts/Species/Research/Orc/&quot; directory which contains pictures and other information about Orcs which I have researched over the years.  If I create art for Orcs some day, then I will store it in the &quot;Concepts/Species/Art/Orc/&quot; directory (and make any subdirectories there for the different races, or whatever, if necessary).&#xD;&#xA;&#xD;&#xA;For other species, just change &quot;Orc&quot; to whatever the name of that species is.  For a species I created where there is no pre-existing data anywhere to be found, if there is something similar to it then I store a copy of it in the relevant &quot;Research&quot; directory for that species.  If I need to add a note to a .PDF file, for example, then I'll create a .txt file with the same base filename and save my notes in there.&#xD;&#xA;&#xD;&#xA;Another example would be &quot;Shops&quot; which works in pretty much the same way.  For the Weapons shop (which is sometimes combined with the Armoury and/or Archery shops in some towns), I have a text file called &quot;Concepts/Shops/Weaponry.txt&quot; which contains a list of various weapons that these shops can carry.  There's also another sub-heading for &quot;specialized weapons&quot; in this same text file that lists certain specific weapons that is only available in a few shops throughout the world, along with a little bit of background about why (e.g., the merchant has a specialized skill that is needed to create this particular type of weapon, and there are only three characters throughout the world that have this skill).  For shops that are sometimes combined with other shops, I have a special sub-heading in my text file for this too, with references to the filenames for those shops (and then I make sure those shops reference back as well).  For pictures of armour and documentation about how various weapons work (from researching the internet, scanning pages from library books, etc.), I store these files in the &quot;Concepts/Shops/Research/Weaponry/&quot; directory.&#xD;&#xA;&#xD;&#xA;The key with using a hierarchy like this effectively though is to try to keep the structure deep instead of flat.  In other words, don't fill up your higher (closer to the &quot;root&quot; or &quot;top&quot;) in your structure with too many categories -- sub-categorize instead.  (If you're so inclined, use a database to store your information; my personal preference just happens to be a deep directory structure instead, and it works quite well for my needs.)  If you go flat-and-wide instead of deep, it will become a challenge to navigate and manage, and over time it will feel &quot;disorganized&quot; and be more of a pain to work with.&#xD;&#xA;&#xD;&#xA;Under &quot;Project_name&quot; I do keep a few text files, which are:&#xD;&#xA;&#xD;&#xA;* credits.txt (a list of people who have contributed a few ideas, support, etc.)&#xD;&#xA;* description.txt (a generalized description of the project, will be useful in marketing)&#xD;&#xA;* names.txt (literally thousands of names I've been dreaming up all these years)&#xD;&#xA;* vision.txt (general purpose of this project, key features, benefits to users, etc.)&#xD;&#xA;&#xD;&#xA;Under the other directories I often have a &quot;resources.txt&quot; file that includes links to web sites (and the dates I found them just in case I need to use a service like &quot;archive.org&quot; to view them in the future) with a note about why the link is relevant.  These are the types of resources that I don't absolutely have to have, but would be useful in expanding on further research should I need to at some point (searching for stuff in Google is very helpful, but pre-determined resources like this can still save a lot of time).&#xD;&#xA;&#xD;&#xA;I hope this is helpful to you, or, at the very least, interesting enough to get you started.&#xD;&#xA;" />
  <row Id="35289" PostHistoryTypeId="2" PostId="15527" RevisionGUID="8bcc0ec0-1a4e-4e2a-b724-db9c1ec9fa81" CreationDate="2011-08-03T20:20:19.220" UserId="9035" Text="OpenGLES 2.0 does not directly support point sprites.  You can either [texture your glPoints](http://klazuka.tumblr.com/post/249698151/point-sprites-and-opengl-es-2-0) or manually create a camera-facing and camera-aligned quad centered on a point." />
  <row Id="35290" PostHistoryTypeId="2" PostId="15528" RevisionGUID="0d16f669-52cf-45a4-b365-1a3d4eee20cf" CreationDate="2011-08-03T20:39:55.643" UserId="721" Text="OpenGL ES 2.0 support Point Sprites. I use them for particles.&#xD;&#xA;&#xD;&#xA;In vertex shader, you set the size with gl_PointSize and use gl_PointCoord in fragment shader for texture mapping.&#xD;&#xA;&#xD;&#xA;My vertex shader:&#xD;&#xA;&#xD;&#xA;uniform mat4 uMvp;&#xD;&#xA;uniform float uThickness;&#xD;&#xA;&#xD;&#xA;    attribute vec3 aPosition;&#xD;&#xA;    attribute vec2 aTexCoord; &#xD;&#xA;    attribute vec4 aColor;&#xD;&#xA;&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;        vec4 position = uMvp * vec4(aPosition.xyz, 1.);&#xD;&#xA;        vColor = aColor;&#xD;&#xA;        gl_PointSize = uThickness;&#xD;&#xA;	gl_Position =  position ;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My fragment shader:&#xD;&#xA;&#xD;&#xA;    uniform sampler2D tex0;&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;&#xD;&#xA;    void main() &#xD;&#xA;    {&#xD;&#xA;       gl_FragColor = texture2D(tex0, gl_PointCoord) * vColor;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="35291" PostHistoryTypeId="2" PostId="15529" RevisionGUID="e908f491-faf5-4fe9-8e7b-160a42a83383" CreationDate="2011-08-03T20:44:51.800" UserId="8974" Text="I'm trying to learn how to use VertexBuffers in XNA 4.0. I can render wireframe shapes and I can render textured shapes. However, I'm having some trouble rendering them both at once. &#xD;&#xA; I'm initializing the buffers like this:&#xD;&#xA;&#xD;&#xA;    vertexBuffer1 = new VertexBuffer(graphics.GraphicsDevice, vertexDeclarationWireframe, numPointsWireframe, BufferUsage.None);&#xD;&#xA;    vertexBuffer1.SetData&lt;VertexPositionColor&gt;(pointList1);&#xD;&#xA;&#xD;&#xA;    vertexBuffer3 = new VertexBuffer(graphics.GraphicsDevice, vertexDeclarationTexture, numPointsTexture, BufferUsage.None);&#xD;&#xA;    vertexBuffer3.SetData&lt;VertexPositionTexture&gt;(pointList3);&#xD;&#xA;&#xD;&#xA;The above code fails during Draw() because the vertex buffers are using two different types of vertexDeclarations, one for wireframe (VertexPositionColor) and one for textures (VertexPositionTexture). I tried moving the call to VertexBuffer.SetData() to just before the relevant geometry is drawn but that didn't work. &#xD;&#xA;&#xD;&#xA;I've also tried setting my Effect object TextureEnabled = false when wireframe is being rendered and resetting it when the textured geometry is rendering, but that didn't work either. The effect seems to be expecting a TextureCoordinate regardless.&#xD;&#xA;&#xD;&#xA;What's the proper way to do this?" />
  <row Id="35292" PostHistoryTypeId="1" PostId="15529" RevisionGUID="e908f491-faf5-4fe9-8e7b-160a42a83383" CreationDate="2011-08-03T20:44:51.800" UserId="8974" Text="XNA - multiple VertexBuffers?" />
  <row Id="35293" PostHistoryTypeId="3" PostId="15529" RevisionGUID="e908f491-faf5-4fe9-8e7b-160a42a83383" CreationDate="2011-08-03T20:44:51.800" UserId="8974" Text="&lt;xna&gt;&lt;shaders&gt;&lt;vertex&gt;&lt;effect&gt;" />
  <row Id="35294" PostHistoryTypeId="5" PostId="15528" RevisionGUID="bb111269-3a7d-4e5e-ac35-dda3c53265de" CreationDate="2011-08-03T20:45:26.297" UserId="721" Comment="added 40 characters in body" Text="OpenGL ES 2.0 support Point Sprites; i use them for particles. Just use glDrawElements with GL_POINTS.&#xD;&#xA;&#xD;&#xA;In vertex shader, you set the size with gl_PointSize and use gl_PointCoord in fragment shader for texture mapping.&#xD;&#xA;&#xD;&#xA;My vertex shader:&#xD;&#xA;&#xD;&#xA;    uniform mat4 uMvp;&#xD;&#xA;    uniform float uThickness;&#xD;&#xA;&#xD;&#xA;    attribute vec3 aPosition;&#xD;&#xA;    attribute vec2 aTexCoord; &#xD;&#xA;    attribute vec4 aColor;&#xD;&#xA;&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;&#xD;&#xA;    void main() {&#xD;&#xA;        vec4 position = uMvp * vec4(aPosition.xyz, 1.);&#xD;&#xA;        vColor = aColor;&#xD;&#xA;        gl_PointSize = uThickness;&#xD;&#xA;        gl_Position =  position;  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My fragment shader:&#xD;&#xA;&#xD;&#xA;    uniform sampler2D tex0;&#xD;&#xA;    varying vec4 vColor;&#xD;&#xA;&#xD;&#xA;    void main() &#xD;&#xA;    {&#xD;&#xA;       gl_FragColor = texture2D(tex0, gl_PointCoord) * vColor;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If you are on Android, you can look [my french Tutorial][1]. There is a full project with point sprites.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scigems.org/downloads/Articles/Episode1.php" />
  <row Id="35295" PostHistoryTypeId="2" PostId="15530" RevisionGUID="1f224387-c5fa-4bf3-9b25-d98a3931eb3e" CreationDate="2011-08-03T21:00:46.600" UserId="5125" Text="Sorry to say but the third way is really the way to think,&#xD;&#xA;well, you already have the ability to do that so lets move on and think about the other two!&#xD;&#xA;&#xD;&#xA;The thing is that a wall is a zero width, two dimentional (height*length, in a 3D world) square partitioning two Boxes.&#xD;&#xA;You should consider them as such but you might use a simpler solution as when to build your dungeon (especially if other people might build parts).&#xD;&#xA;&#xD;&#xA;It seems it is a Top-Down 2D game where walls have &quot;a width&quot; so they need that corner (your 'cap' object). This is exclusively 'graphics' though so I'd go with some sort of:&#xD;&#xA;&#xD;&#xA;A 2D map with the tiles (ie. type of tile and such).&#xD;&#xA;&#xD;&#xA;A 2D map with 2 walls, ex. bottom and right (the left wall will be the 'right wall' in the tile left from this one).&#xD;&#xA;&#xD;&#xA;\+ a Logic that draws all the walls and 'caps' etc.&#xD;&#xA;&#xD;&#xA;Thus separating logic and graphics. You might do an &quot;interface&quot; taking care of things like SetWall(ThisTile, LEFT, NOWALL) -&gt; setting the right wall of the tile left of ThisTile to &quot;NOWALL&quot;...&#xD;&#xA;&#xD;&#xA;Maybe this seems blurry but the thing is that you should always try to have at one side the logic (the actual data, without redundancy) and on the other side the 'drawing of the data' which calculates if there is need for a 'cap' etc.&#xD;&#xA;&#xD;&#xA;++&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35299" PostHistoryTypeId="6" PostId="15482" RevisionGUID="16bccda0-ce07-4ea0-9818-426796a4884b" CreationDate="2011-08-03T21:18:08.670" UserId="4662" Comment="edited tags" Text="&lt;c++&gt;&lt;2d-physics&gt;" />
  <row Id="35301" PostHistoryTypeId="2" PostId="15532" RevisionGUID="794e7f73-ab17-417e-95f4-1b556c701617" CreationDate="2011-08-03T21:33:28.257" UserId="5473" Text="1. Use your imagination on the general topic if you haven't already.&#xD;&#xA;2. Do some research online and in libraries / museums too if you're keen.&#xD;&#xA;3. Play a few similar games, or at least watch youtube vids / read reviews of them. Know your competition.&#xD;&#xA;4. Rinse, repeat steps 1-3. Slowly your imagination will feed off the ongoing research you are doing, and your game idea will become more defined / refined.&#xD;&#xA;5. (Optional) Take notes as your major ideas take shape, if you don't have an amazingly good memory.&#xD;&#xA;&#xD;&#xA;And before you do any of the above: Get a google account if you don't already have one, and set it up for tagging so you can use it as an all purpose database. Gmail, google docs and google bookmarks all use tagging as you probably know, to cross reference information by topic. What if you have two categories, &quot;fuel&quot; and &quot;circuit conditions&quot;, and a single article matches both? -- So, tag to keep track of the cool stuff you'll find. You can search gmail more easily by typing eg. `label:&quot;circuit conditions&quot; label:&quot;crashes&quot;` into the gmail searchbar by the way.&#xD;&#xA;&#xD;&#xA;And as Phil has stated -- using a cyclical approach like this will show you quickly enough if your idea is not something you wish to pursue.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35302" PostHistoryTypeId="2" PostId="15533" RevisionGUID="07e0ae6a-45b7-4552-b45d-564ea1cec99f" CreationDate="2011-08-03T21:35:07.183" UserId="9033" Text="I'm not too clear on your requirements, but if the following is allowed, it may be a simple to follow algorithm.&#xD;&#xA;Probably a bug in there, especially since it uses a recursive function.  Also, it checks if a door leads to the room you came from, but I don't know how a three room circular path would handle, it may just keep looping forever in those three rooms.  You may have to add a history to ensure no room is checked twice.  But by reading your description that may not be allowed.&#xD;&#xA;&#xD;&#xA;    solved = FALSE&#xD;&#xA;    &#xD;&#xA;    SearchRoom(1,-1)    // Start at room 1 (or any room)&#xD;&#xA;    IF solved THEN&#xD;&#xA;      // solvable&#xD;&#xA;    ELSE&#xD;&#xA;      // unsolvable&#xD;&#xA;    ENDIF&#xD;&#xA;    END&#xD;&#xA;    &#xD;&#xA;    // Recursive function, should run until it searches every room or finds the exit&#xD;&#xA;    FUNCTION SearchRoom: curRoom, prevRoom&#xD;&#xA;      // Is this room the 'exit' room&#xD;&#xA;      IF curRoom.IsExit() THEN&#xD;&#xA;        solved = TRUE&#xD;&#xA;        RETURN&#xD;&#xA;      ENDIF&#xD;&#xA;    &#xD;&#xA;      // Deadend?&#xD;&#xA;      IF curRoom.doors &lt;= 1 THEN RETURN&#xD;&#xA;    &#xD;&#xA;      // Search each room the current room leads to&#xD;&#xA;      FOREACH room IN curRoom&#xD;&#xA;        // Skip the room we just came from&#xD;&#xA;        IF room &lt;&gt; prevRoom THEN&#xD;&#xA;          SearchRoom(room, curRoom)&#xD;&#xA;        ENDIF&#xD;&#xA;      NEXT&#xD;&#xA;    &#xD;&#xA;      RETURN&#xD;&#xA;    ENDFUNCTION" />
  <row Id="35304" PostHistoryTypeId="5" PostId="15532" RevisionGUID="b12ad2b8-1293-41f6-8c78-92f970f8d061" CreationDate="2011-08-03T21:38:36.113" UserId="5473" Comment="added 58 characters in body" Text="1. Use your imagination on the general topic if you haven't already.&#xD;&#xA;2. Do some research online and in libraries / museums too if you're keen.&#xD;&#xA;3. Play a few similar games, or at least watch youtube vids / read reviews of them. Know your competition.&#xD;&#xA;4. Rinse, repeat steps 1-3. Slowly your imagination will feed off the ongoing research you are doing, and your game idea will become more defined / refined.&#xD;&#xA;5. (Optional) Take notes as your major ideas take shape, if you don't have an amazingly good memory.&#xD;&#xA;&#xD;&#xA;And before you do any of the above: Get a google account if you don't already have one, and set it up for tagging so you can use it as an all purpose database. Gmail, google docs and google bookmarks all use tagging as you probably know, to cross reference information by topic. What if you have two categories, &quot;fuel&quot; and &quot;circuit conditions&quot;, and a single article matches both? -- So, tag to keep track of the cool stuff you'll find. You can search gmail more easily by typing eg. `label:&quot;circuit conditions&quot; label:&quot;crashes&quot;` into the gmail searchbar to find an article you know you saw somewhere on both these topics...&#xD;&#xA;&#xD;&#xA;And as Phil has stated -- using a cyclical approach like this will show you quickly enough if your idea is not something you wish to pursue.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35305" PostHistoryTypeId="2" PostId="15534" RevisionGUID="66b2ec54-b280-48d4-b04a-2be1a4d4a58a" CreationDate="2011-08-03T21:59:25.443" UserId="5473" Text="Late to the party, but I think the simple answer is, &quot;Learn what code profiling is and how to apply it&quot;. Because you cannot make any assumptions as to what is causing your performance drop until you do." />
  <row Id="35306" PostHistoryTypeId="2" PostId="15535" RevisionGUID="01ff8ae2-33db-45bc-9f3b-e862bce3b702" CreationDate="2011-08-03T22:12:25.687" UserId="7191" Text="Since the rooms are always in the same order in the exit lists, we can make a quick map of the rooms while looking for an exit.&#xD;&#xA;&#xD;&#xA;My pseudo code is somewhat Javaish, sorry, I've been using it a lot lately.&#xD;&#xA;&#xD;&#xA;Unvisited_Rooms is a hashmap holding a room ID, and a list of indexes of the un-mapped rooms&#xD;&#xA;Or a 2d array, whatever works.&#xD;&#xA;&#xD;&#xA; I imagine the algorithm could go something like this:&#xD;&#xA;    &#xD;&#xA;    Unvisited_Rooms.add(currentRoom.ID, currentRoom.exits) //add the starting room exits&#xD;&#xA;    while(Unvisited_Rooms.Keys.Count &gt; 0 &amp;&amp; currentRoom != end) //keep going while there are unmapped exits and we're not at the end&#xD;&#xA;        Room1 = currentRoom&#xD;&#xA;        ExitID = Room1.get_first_unmapped_Room() //returns the index of the first unmapped room&#xD;&#xA;        if(ExitID == -1) //this room didn't have any more unmapped rooms, it's totally mapped&#xD;&#xA;            PathTo(Get_Next_Room_With_Unmapped_Exits)&#xD;&#xA;            continue&#xD;&#xA;        GoToExit(ExitID) //goes to the room, setting current room to the room on the other side&#xD;&#xA;        Room1.Exits[exitID].connection = currentRoom.ID //maps the connection for later path finding&#xD;&#xA;        Unvisited_Rooms[Room1.ID].remove(exitID) //removes the index so we don't worry about it&#xD;&#xA;        if(Unvisited_Rooms[Room1.ID].size &lt; 1) //checks if all the rooms exits have been accounted for&#xD;&#xA;            Unvisited_Rooms.remove(Room1.ID)  //removes the room if it's exits are all mapped&#xD;&#xA;        Unvisited_Rooms.add(currentRoom.ID, currentRoom.unvisited_exits) //adds more exits to the list&#xD;&#xA;&#xD;&#xA;    If(currentRoom != end &amp;&amp; Unvisited_Rooms.Keys.Count &lt; 1)&#xD;&#xA;       print(No exit found!)&#xD;&#xA;    else&#xD;&#xA;       print(exit is roomID: currentRoom.ID)&#xD;&#xA;&#xD;&#xA;You'll need to use one of the common node path finders to PathTo() rooms across &quot;the map&quot;&#xD;&#xA;Hopefully that's clear enough to get you started on something.&#xD;&#xA;    " />
  <row Id="35307" PostHistoryTypeId="5" PostId="15535" RevisionGUID="99740117-d2d6-4185-bea1-06e6e8611c38" CreationDate="2011-08-03T22:19:02.687" UserId="7191" Comment="added more comments" Text="Since the rooms are always in the same order in the exit lists, we can make a quick map of the rooms while looking for an exit.&#xD;&#xA;&#xD;&#xA;My pseudo code is somewhat Javaish, sorry, I've been using it a lot lately.&#xD;&#xA;&#xD;&#xA;Unvisited_Rooms is a hashmap holding a room ID, and a list of indexes of the un-mapped rooms&#xD;&#xA;Or a 2d array, whatever works.&#xD;&#xA;&#xD;&#xA; I imagine the algorithm could go something like this:&#xD;&#xA;    &#xD;&#xA;    Unvisited_Rooms.add(currentRoom.ID, currentRoom.exits) //add the starting room exits&#xD;&#xA;    while(Unvisited_Rooms.Keys.Count &gt; 0 &amp;&amp; currentRoom != end) //keep going while there are unmapped exits and we're not at the end&#xD;&#xA;        Room1 = currentRoom&#xD;&#xA;        ExitID = Room1.get_first_unmapped_Room() //returns the index of the first unmapped room&#xD;&#xA;        if(ExitID == -1) //this room didn't have any more unmapped rooms, it's totally mapped&#xD;&#xA;            PathTo(Get_Next_Room_With_Unmapped_Exits) //we need to go to a room with unmapped exits&#xD;&#xA;            continue //we need to start over once we're there, so we don't create false links&#xD;&#xA;        GoToExit(ExitID) //goes to the room, setting current room to the room on the other side&#xD;&#xA;        Room1.Exits[exitID].connection = currentRoom.ID //maps the connection for later path finding&#xD;&#xA;        Unvisited_Rooms[Room1.ID].remove(exitID) //removes the index so we don't worry about it&#xD;&#xA;        if(Unvisited_Rooms[Room1.ID].size &lt; 1) //checks if all the rooms exits have been accounted for&#xD;&#xA;            Unvisited_Rooms.remove(Room1.ID)  //removes the room if it's exits are all mapped&#xD;&#xA;        Unvisited_Rooms.add(currentRoom.ID, currentRoom.unvisited_exits) //adds more exits to the list&#xD;&#xA;&#xD;&#xA;    If(currentRoom != end &amp;&amp; Unvisited_Rooms.Keys.Count &lt; 1)&#xD;&#xA;       print(No exit found!)&#xD;&#xA;    else&#xD;&#xA;       print(exit is roomID: currentRoom.ID)&#xD;&#xA;&#xD;&#xA;You'll need to use one of the common node path finders to PathTo() rooms across &quot;the map&quot;&#xD;&#xA;Hopefully that's clear enough to get you started on something.&#xD;&#xA;    " />
  <row Id="35308" PostHistoryTypeId="5" PostId="15533" RevisionGUID="8040d905-1fff-4069-8d44-ccbd63c219fc" CreationDate="2011-08-03T22:35:40.613" UserId="9033" Comment="added 97 characters in body" Text="I'm not too clear on your requirements, but if the following is allowed, it may be a simple to follow algorithm.&#xD;&#xA;Probably a bug in there, especially since it uses a recursive function.  Also, it checks if a door leads to the room you came from, but I don't know how a three room circular path would handle, it may just keep looping forever in those three rooms.  You may have to add a history to ensure no room is checked twice.  But by reading your description that may not be allowed.&#xD;&#xA;&#xD;&#xA;    solved = FALSE&#xD;&#xA;    &#xD;&#xA;    SearchRoom(rooms[0],NULL)    // Start at room 1 (or any room)&#xD;&#xA;    IF solved THEN&#xD;&#xA;      // solvable&#xD;&#xA;    ELSE&#xD;&#xA;      // unsolvable&#xD;&#xA;    ENDIF&#xD;&#xA;    END&#xD;&#xA;    &#xD;&#xA;    // Recursive function, should run until it searches every room or finds the exit&#xD;&#xA;    FUNCTION SearchRoom: curRoom, prevRoom&#xD;&#xA;      // Is this room the 'exit' room&#xD;&#xA;      IF curRoom.IsExit() THEN&#xD;&#xA;        solved = TRUE&#xD;&#xA;        RETURN&#xD;&#xA;      ENDIF&#xD;&#xA;    &#xD;&#xA;      // Deadend?&#xD;&#xA;      IF curRoom.doors &lt;= 1 THEN RETURN&#xD;&#xA;    &#xD;&#xA;      // Search each room the current room leads to&#xD;&#xA;      FOREACH room IN curRoom&#xD;&#xA;        // Skip the room we just came from&#xD;&#xA;        IF room.id &lt;&gt; prevRoom.id THEN&#xD;&#xA;          SearchRoom(room, curRoom)&#xD;&#xA;        ENDIF&#xD;&#xA;      NEXT&#xD;&#xA;    &#xD;&#xA;      RETURN&#xD;&#xA;    ENDFUNCTION&#xD;&#xA;&#xD;&#xA;[Edit] Added 'id' to previous check, and updated to make more object oriented." />
  <row Id="35309" PostHistoryTypeId="5" PostId="15533" RevisionGUID="f7f5ca67-ddac-4771-af35-2823a951d040" CreationDate="2011-08-03T22:54:32.623" UserId="9033" Comment="Added 'sovled' check in FOREACH loop" Text="I'm not too clear on your requirements, but if the following is allowed, it may be a simple to follow algorithm.&#xD;&#xA;Probably a bug in there, especially since it uses a recursive function.  Also, it checks if a door leads to the room you came from, but I don't know how a three room circular path would handle, it may just keep looping forever in those three rooms.  You may have to add a history to ensure no room is checked twice.  But by reading your description that may not be allowed.&#xD;&#xA;&#xD;&#xA;    solved = FALSE&#xD;&#xA;    &#xD;&#xA;    SearchRoom(rooms[0],NULL)    // Start at room 1 (or any room)&#xD;&#xA;    IF solved THEN&#xD;&#xA;      // solvable&#xD;&#xA;    ELSE&#xD;&#xA;      // unsolvable&#xD;&#xA;    ENDIF&#xD;&#xA;    END&#xD;&#xA;    &#xD;&#xA;    // Recursive function, should run until it searches every room or finds the exit&#xD;&#xA;    FUNCTION SearchRoom: curRoom, prevRoom&#xD;&#xA;      // Is this room the 'exit' room&#xD;&#xA;      IF curRoom.IsExit() THEN&#xD;&#xA;        solved = TRUE&#xD;&#xA;        RETURN&#xD;&#xA;      ENDIF&#xD;&#xA;    &#xD;&#xA;      // Deadend?&#xD;&#xA;      IF curRoom.doors &lt;= 1 THEN RETURN&#xD;&#xA;    &#xD;&#xA;      // Search each room the current room leads to&#xD;&#xA;      FOREACH room IN curRoom&#xD;&#xA;        // Skip the room we just came from&#xD;&#xA;        IF room.id &lt;&gt; prevRoom.id THEN&#xD;&#xA;          SearchRoom(room, curRoom)&#xD;&#xA;        ENDIF&#xD;&#xA;        IF solved THEN EXIT LOOP&#xD;&#xA;      NEXT&#xD;&#xA;    &#xD;&#xA;      RETURN&#xD;&#xA;    ENDFUNCTION&#xD;&#xA;&#xD;&#xA;[Edit] Added 'id' to previous check, and updated to make more object oriented." />
  <row Id="35310" PostHistoryTypeId="5" PostId="15533" RevisionGUID="aa945486-81aa-444d-a99f-0e01b0d04117" CreationDate="2011-08-03T23:02:14.117" UserId="9033" Comment="edited body" Text="I'm not too clear on your requirements, but if the following is allowed, it may be a simple to follow algorithm.&#xD;&#xA;Probably a bug in there, especially since it uses a recursive function.  Also, it checks if a door leads to the room you came from, but I don't know how a three room circular path would handle, it may just keep looping forever in those three rooms.  You may have to add a history to ensure no room is checked twice.  But by reading your description that may not be allowed.&#xD;&#xA;&#xD;&#xA;    solved = FALSE&#xD;&#xA;    &#xD;&#xA;    SearchRoom(rooms[0],NULL)    // Start at room 1 (or any room)&#xD;&#xA;    IF solved THEN&#xD;&#xA;      // solvable&#xD;&#xA;    ELSE&#xD;&#xA;      // unsolvable&#xD;&#xA;    ENDIF&#xD;&#xA;    END&#xD;&#xA;    &#xD;&#xA;    // Recursive function, should run until it searches every room or finds the exit&#xD;&#xA;    FUNCTION SearchRoom: curRoom, prevRoom&#xD;&#xA;      // Is this room the 'exit' room&#xD;&#xA;      IF curRoom.IsExit() THEN&#xD;&#xA;        solved = TRUE&#xD;&#xA;        RETURN&#xD;&#xA;      ENDIF&#xD;&#xA;    &#xD;&#xA;      // Deadend?&#xD;&#xA;      IF curRoom.doors &lt;= 1 THEN RETURN&#xD;&#xA;    &#xD;&#xA;      // Search each room the current room leads to&#xD;&#xA;      FOREACH door IN curRoom&#xD;&#xA;        // Skip the room we just came from&#xD;&#xA;        IF door.id &lt;&gt; prevRoom.id THEN&#xD;&#xA;          SearchRoom(door, curRoom)&#xD;&#xA;        ENDIF&#xD;&#xA;        IF solved THEN EXIT LOOP&#xD;&#xA;      NEXT&#xD;&#xA;    &#xD;&#xA;      RETURN&#xD;&#xA;    ENDFUNCTION&#xD;&#xA;&#xD;&#xA;[Edit] Added 'id' to previous check, and updated to make more object oriented." />
  <row Id="35311" PostHistoryTypeId="5" PostId="2564" RevisionGUID="c10400b0-b667-4729-bc6e-ac931da565ed" CreationDate="2011-08-03T23:24:17.523" UserId="1504" Comment="added 888 characters in body" Text="I have a file containing mesh data whose blocks seem to start with DWORDS like:&#xD;&#xA;&#xD;&#xA;0x1 0x1 0x3100026f 0x1 0x30000112&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;0x1 0x1 0x310007b2 0x1 0x30000112&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;0x10000006 0x3 0x310001f6 0x310001f6 0x310001f6&#xD;&#xA;&#xD;&#xA;They don't look like .x binaries. Any other ideas?&#xD;&#xA;&#xD;&#xA;**UPDATE:**&#xD;&#xA;&#xD;&#xA;Here's more: 00000001 00000001 3100026F 00000001 30000112 000000C7 BD869270 3F0372D4 00000000 BD41F15F 3F11A611 3F522E05 3E40EF5A 3E17CDF8 3E40993C BF504FBD 3F0CCC2A BF78001B BE654B6A 3DDA7965 BD80EB99 3F003679 3C0BDAE1 BD3DD880 3F112A76 3F528732 3E8EFD04 3E185DD8 3E3984B8 BF48A923 3F180DA9 BF7854DC BE6599AE 3DBF7319 BCD7235C 3F041CCC 00000000 BF52314E 3F12223D 00000000 3F727B04 3C22FD80 3E29BCD1 3F7C0367 3D6FCD12 3E70A826 BCE91707 BF78B921 BCD7235C 3F008C87 3C28E0F6 BF6B36D8 3BD28E32 3ECA109F 3F4AEA89 3D894EC0 BE18A98D 3F7CC7A8 3D57AE4B 3E48D2F6 B46C577B 3F7B0753 BE3DBAC2 3EF41E67&#xD;&#xA;&#xD;&#xA;It looks like some of these are almost certainly floats and others are almost certainly not. And it appears (not shown here) that after a long list of valid floats, there is a long list of DWORDS that aren't valid floats. A list of vertices followed by some table of indices?&#xD;&#xA;" />
  <row Id="35312" PostHistoryTypeId="2" PostId="15536" RevisionGUID="230b20a8-b7fa-489a-9f0b-edf6bef413e2" CreationDate="2011-08-03T23:57:54.583" UserId="9033" Text="I'd use your method 'B'.&#xD;&#xA;&#xD;&#xA;To avoid needing 'caps', just extend each wall &quot;1/2 wall thickness&quot; in both directions.&#xD;&#xA;This will create overlapping walls where they meet, but your diagrams already suggests this is not a problem.&#xD;&#xA;&#xD;&#xA;So, in Method 'B', Pic #3, the horizontal wall would extend to the left a bit, and the vertical wall would extend up a bit.&#xD;&#xA;&#xD;&#xA;[I'm new here, just registered.  Am I missing something, as I can't see an 'Add Comment' button to your original post.  Is that a privilege of people with higher reputations?  Or am I overlooking the obvious?  Sorry for adding this as an 'answer'.]" />
  <row Id="35313" PostHistoryTypeId="2" PostId="15537" RevisionGUID="376690ca-73c2-411f-8829-75f29288c19f" CreationDate="2011-08-04T00:12:55.833" UserId="9039" Text="I'm starting development on a 2D overhead RPG game, and am wondering what the best approach for handling weapon collision and dealing damage to enemies is.&#xD;&#xA;&#xD;&#xA;I'm currently using a basic Entity/Component structure for my game objects.  I have a CharacterEntity, that has an EquipableEntity data member.  The CharacterEntity has a component that listens for input.  When a command to attack is received, the CharacterEntity is set into an attack mode where an attacking component gets the equipped entity and moves it in the attacking motion.  Any collisions detected with the moving equipped entity in the world are then registered as successful attacks.  Once the attacking component determines the attack is finished, the CharacterEntity leaves attack mode and returns to it's normal state.  &#xD;&#xA;&#xD;&#xA;Weapon collision is a basic LWJGL Rectangle that tests the .interesects() method, checking against all enemy rectangles.  Currently it's just a stabbing motion (it moves out to x length, then returns).&#xD;&#xA;&#xD;&#xA;The reason I did it this way was: &#xD;&#xA;&#xD;&#xA;1) I wanted enemies to receive and respond damage as the sword crosses their path, instead of just saying &quot;attack occurred in this general area&quot; and having all enemies update at once.  In the stabbing case, an enemy at the full length of the sword wouldn't take damage until the actual sword entity crosses it's path.  &#xD;&#xA;2) The weapons define their own appearance and boundary on the screen, making it easier to animate and sync with the game.&#xD;&#xA;&#xD;&#xA;I'm entirely new to game development (if you haven't figured that out already).  Is this the appropriate way to achieve the result I'm looking for, or complete overkill?  How does a game like Terraria (where weapons move in a sweeping motion) or the Zelda series handle attacking and determining what enemies to hit and when?  Am I on the right path or totally off?&#xD;&#xA;&#xD;&#xA;Any advice or suggestions would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35314" PostHistoryTypeId="1" PostId="15537" RevisionGUID="376690ca-73c2-411f-8829-75f29288c19f" CreationDate="2011-08-04T00:12:55.833" UserId="9039" Text="Checking for Weapon Collision in a 2D overhead RPG game" />
  <row Id="35315" PostHistoryTypeId="3" PostId="15537" RevisionGUID="376690ca-73c2-411f-8829-75f29288c19f" CreationDate="2011-08-04T00:12:55.833" UserId="9039" Text="&lt;collision-detection&gt;&lt;rpg&gt;&lt;component-based&gt;&lt;entity-system&gt;&lt;combat&gt;" />
  <row Id="35316" PostHistoryTypeId="25" PostId="15526" RevisionGUID="9076a4e2-4d5d-4835-b53e-2aac97620dca" CreationDate="2011-08-04T00:36:43.770" Comment="http://twitter.com/#!/StackGameDev/status/98915232403034113" />
  <row Id="35318" PostHistoryTypeId="2" PostId="15538" RevisionGUID="442d616f-1ddc-45ed-ac81-39c735f8c4b8" CreationDate="2011-08-04T02:27:29.143" UserId="4513" Text="You say you found a long list of valid vertices?&#xD;&#xA;Draw them in point form; if they resemble a model, then chances are your correct.&#xD;&#xA;&#xD;&#xA;From that you could then count how many vertices there are, and then from that count, search the binary for anywhere that count might pop up. This could allow you to find the header which then describes said vertices (ID, count etc).&#xD;&#xA;&#xD;&#xA;From this information you could then extrapolate other headers and find similar patterns, and maybe distinguish some more valid data.&#xD;&#xA;&#xD;&#xA;Food for thought. " />
  <row Id="35319" PostHistoryTypeId="12" PostId="15538" RevisionGUID="09ea2829-e3f7-41e0-a0f3-88a8c946e9d5" CreationDate="2011-08-04T02:30:21.463" UserId="4513" Text="[{&quot;Id&quot;:4513,&quot;DisplayName&quot;:&quot;Daniel&quot;}]" />
  <row Id="35320" PostHistoryTypeId="13" PostId="15538" RevisionGUID="a19d4607-3c90-43c4-a501-f4948581a34b" CreationDate="2011-08-04T02:31:00.527" UserId="4513" Text="[{&quot;Id&quot;:4513,&quot;DisplayName&quot;:&quot;Daniel&quot;}]" />
  <row Id="35321" PostHistoryTypeId="25" PostId="15502" RevisionGUID="e5b2f440-9785-4c4f-963c-15ac2649d6f6" CreationDate="2011-08-04T03:36:43.660" Comment="http://twitter.com/#!/StackGameDev/status/98960530563280897" />
  <row Id="35322" PostHistoryTypeId="2" PostId="15539" RevisionGUID="391a5605-31ab-45b6-a7de-fb43bae2355c" CreationDate="2011-08-04T04:01:04.997" UserId="2910" Text="You noted that a character can stand on a tile containing a wall but have you considered treating each tile as wall itself? Even half a tile as a wall in a horizontal or Vertical fashion?&#xD;&#xA;&#xD;&#xA;Pros: Calculations and placements are trivial, collision is trivial where all calculations and collisions are just based on the coordinates of the walls placement.&#xD;&#xA;&#xD;&#xA;Cons: It could impact your entire implementation, code and graphics. You don't want to totally abandon your method either, you still want special cases where only part of a tile is wall (Link to the Past with cliffs).&#xD;&#xA;&#xD;&#xA;This is how I would I have based my implementation, going forward, knowing that I can always reference a tile and perform a calculation on it depending on my characters location and what kind of tile it is. &#xD;&#xA;&#xD;&#xA;A castle wall I could just perform a calculation from the center drawing a box that I could not pass through or if its a round rock I could do the same calculation from the center but as a circle so my character can move around in like it was rounded.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35323" PostHistoryTypeId="5" PostId="15523" RevisionGUID="e9ae5b60-5d20-4e16-9031-defb0ba039cf" CreationDate="2011-08-04T06:16:52.697" UserId="7548" Comment="added 3 characters in body" Text="There are many different approaches you can use.  Since the 1980s, I've been designing an MMORPG and using a hierarchial point-form layout in simple ASCII text files (which are also organized hierarchially)...&#xD;&#xA;&#xD;&#xA;Initially, I started out with a vision of having a system with a bank of modems, which was inspired by a real-time multi-user game called _Infinity Complex_ on a multi-line BBS which was apparently running the Galacticom BBS software.  Then in the 1990s the internet swept the public by storm, and I _upgraded_ (or _scaled up_) my vision to accommodate a much larger multi-player base.&#xD;&#xA;&#xD;&#xA;To organize the data, I have a set of directories like this:&#xD;&#xA;&#xD;&#xA;* Project_name&#xD;&#xA;&#xD;&#xA;   * Concepts&#xD;&#xA;&#xD;&#xA;      * Cartography (maps of the planet, continents, cities, dungeons, etc.)&#xD;&#xA;      * Creatures (monsters that are computer-controlled)&#xD;&#xA;      * Environment (plants, buildings, terrain, etc.)&#xD;&#xA;      * Foods (some real, some fantasy)&#xD;&#xA;      * Items (things the players can pick up and use like tools, art, etc.)&#xD;&#xA;      * Magic (spells, potions, equipment like wands, etc.)&#xD;&#xA;      * Quests&#xD;&#xA;      * Shops&#xD;&#xA;      * Species (the player-controlled characters, most species have multiple races)&#xD;&#xA;&#xD;&#xA;   * Documents&#xD;&#xA;&#xD;&#xA;      * Background (detailed histories that are not fully explained in the story)&#xD;&#xA;      * Dictionary (almost exclusively for made-up words)&#xD;&#xA;      * Encyclopedia (almost exclusively for made-up things and places)&#xD;&#xA;      * Story (mine is currently larger than 65 MBs of pure ASCII text, divided up into numbered book sub-directories each containing separate files like &quot;chapter8.txt&quot;)&#xD;&#xA;&#xD;&#xA;   * Miscellaneous&#xD;&#xA;&#xD;&#xA;      * Marketing ideas&#xD;&#xA;      * Screen shots from other games&#xD;&#xA;&#xD;&#xA;   * Source&#xD;&#xA;&#xD;&#xA;      * Database&#xD;&#xA;      * Prototypes&#xD;&#xA;      * Production (this one is currently empty as I'm currently developing prototypes)&#xD;&#xA;&#xD;&#xA;   * Specifications&#xD;&#xA;&#xD;&#xA;      * Interface&#xD;&#xA;      * Protocol (for client-server communications)&#xD;&#xA;      * Size of elements (or tiles, etc.)&#xD;&#xA;&#xD;&#xA;Within many of these directories, I have a variety of text files named simply and logically, and then in many cases I also have accompanying &quot;Research&quot; directories where I store more files that are the result of research that I've done over the years...&#xD;&#xA;&#xD;&#xA;For the Orc species I have a file called &quot;Concepts/Species/Orc.txt&quot; which contains specifications, the various races, abilities, natural intelligence levels, and other information about Orcs.  I also have a &quot;Concepts/Species/Research/Orc/&quot; directory which contains pictures and other information about Orcs which I have researched over the years.  If I create art for Orcs some day, then I will store it in the &quot;Concepts/Species/Art/Orc/&quot; directory (and make any subdirectories there for the different races, or whatever, if necessary).&#xD;&#xA;&#xD;&#xA;For other species, just change &quot;Orc&quot; to whatever the name of that species is.  For a species I created where there is no pre-existing data anywhere to be found, if there is something similar to it then I store a copy of it in the relevant &quot;Research&quot; directory for that species.  If I need to add a note to a .PDF file, for example, then I'll create a .txt file with the same base filename and save my notes in there.&#xD;&#xA;&#xD;&#xA;Another example would be &quot;Shops&quot; which works in pretty much the same way.  For the Weapons shop (which is sometimes combined with the Armoury and/or Archery shops in some towns), I have a text file called &quot;Concepts/Shops/Weaponry.txt&quot; which contains a list of various weapons that these shops can carry.  There's also another sub-heading for &quot;specialized weapons&quot; in this same text file that lists certain specific weapons that are only available in a few shops throughout the world, along with a little bit of background about why (e.g., the merchant has a specialized skill that is needed to create this particular type of weapon, and there are only three characters throughout the world that have this skill).  For shops that are sometimes combined with other shops, I have a special sub-heading in my text file for this too, with references to the filenames for those shops (and then I make sure those shops reference back as well).  For pictures of weapons and documentation about how various weapons work (from researching the internet, scanning pages from library books, etc.), I store these files in the &quot;Concepts/Shops/Research/Weaponry/&quot; directory.&#xD;&#xA;&#xD;&#xA;The key with using a hierarchy like this effectively though is to try to keep the structure deep instead of flat.  In other words, don't fill up your higher (closer to the &quot;root&quot; or &quot;top&quot;) in your structure with too many categories -- sub-categorize instead.  (If you're so inclined, use a database to store your information; my personal preference just happens to be a deep directory structure instead, and it works quite well for my needs.)  If you go flat-and-wide instead of deep, it will become a challenge to navigate and manage, and over time it will feel &quot;disorganized&quot; and be more of a pain to work with.&#xD;&#xA;&#xD;&#xA;Under &quot;Project_name&quot; I do keep a few text files, which are:&#xD;&#xA;&#xD;&#xA;* credits.txt (a list of people who have contributed a few ideas, support, etc.)&#xD;&#xA;* description.txt (a generalized description of the project, will be useful in marketing)&#xD;&#xA;* names.txt (literally thousands of names I've been dreaming up all these years)&#xD;&#xA;* vision.txt (general purpose of this project, key features, benefits to users, etc.)&#xD;&#xA;&#xD;&#xA;Under the other directories I often have a &quot;resources.txt&quot; file that includes links to web sites (and the dates I found them just in case I need to use a service like &quot;archive.org&quot; to view them in the future) with a note about why the link is relevant.  These are the types of resources that I don't absolutely have to have, but would be useful in expanding on further research should I need to at some point (searching for stuff in Google is very helpful, but pre-determined resources like this can still save a lot of time).&#xD;&#xA;&#xD;&#xA;I hope this is helpful to you, or, at the very least, interesting enough to get you started.&#xD;&#xA;" />
  <row Id="35324" PostHistoryTypeId="2" PostId="15540" RevisionGUID="c8bd82ac-4a7e-49fb-9e2a-b72c61e55a68" CreationDate="2011-08-04T06:21:33.083" UserId="9046" Text="I convert the image into texture in a thread using the following line of code to reduce the image to texture converting time.&#xD;&#xA;&#xD;&#xA;[[CCTextureCache sharedTextureCache] addImage:@&quot;imageName&quot;];&#xD;&#xA;&#xD;&#xA;But when i retrieve this image from cache i am getting a blank image. If i am calling the above line of code in main thread i am getting the image. &#xD;&#xA;" />
  <row Id="35325" PostHistoryTypeId="1" PostId="15540" RevisionGUID="c8bd82ac-4a7e-49fb-9e2a-b72c61e55a68" CreationDate="2011-08-04T06:21:33.083" UserId="9046" Text="Cocos2d not getting the texture which is added to CCTextureCache using thread" />
  <row Id="35326" PostHistoryTypeId="3" PostId="15540" RevisionGUID="c8bd82ac-4a7e-49fb-9e2a-b72c61e55a68" CreationDate="2011-08-04T06:21:33.083" UserId="9046" Text="&lt;cocos2d-iphone&gt;&lt;ccsprite&gt;" />
  <row Id="35327" PostHistoryTypeId="2" PostId="15541" RevisionGUID="a6851377-bdbe-4936-a645-be0746f7d677" CreationDate="2011-08-04T06:32:12.163" UserId="8635" Text="This is cross-posted from [StackOverflow][2], please feel free to answer there too:&#xD;&#xA;--------------------------------------------&#xD;&#xA;&#xD;&#xA;I'm working on a real-time isometric RPG in python, and wish to target mobile devices as a platform. The main area where I'm having difficulties is with my pathfinding. I have tried a few algorithms including A* and a few tweaks to better fit the maps I'm using. &#xD;&#xA;&#xD;&#xA;I am satisfied with the results of my algorithm - they give the illusion of some intelligence while being deterministic, and being consistent in either direction so that two characters targeting each others' locations will collide in the middle.&#xD;&#xA;&#xD;&#xA;My problem is that while the results look good on the PC where I have all the processing power I could ask for, on my mobile it's quite another story, and there is often a second or more delay while the algorithm is calculated. For this reason I am considering writing a library for this with the most performance-intensive code written in C, however if there is an existing solution for this, or a better way I could do this, I would be all ears.&#xD;&#xA;&#xD;&#xA;I stumbled across [python-pathfinding][1] but this seems to be slower than what I have built myself for my use case.&#xD;&#xA;___&#xD;&#xA;&#xD;&#xA;My use case:&#xD;&#xA;------------&#xD;&#xA;My maps are build from levels, which are surrounded by walls (visible or invisible), and must be linked by doors (visible or invisible). &#xD;&#xA;&#xD;&#xA;My current approach is to have two different algorithms:&#xD;&#xA;&#xD;&#xA; - Within a room I search individual tiles as nodes, with each boundary as an equal-cost edge, using a depth-first in the direction of the target location&#xD;&#xA;&#xD;&#xA; - Between rooms where each door is a node. The shortest possible path through a room (from door to door) is calculated using the first algorithm and stored in a hash table as the edge cost between those nodes. Sets of edges that can be traversed to get from one node to another are then calculated and also stored in the hash table, and it is not permitted to include the same edge more than once in the same path.&#xD;&#xA;&#xD;&#xA;I spawn a separate process on start-up that generates a graph for the second algorithm using the first, and this solves many of my issues, rooms tend to be relatively small and so the penalty of on-the-fly path-finding is kept lower than it otherwise could be, and then for longer distances:&#xD;&#xA;&#xD;&#xA; - the first algorithm is used to calculate the distance from the current location to every door in the current room.&#xD;&#xA; - the first algorithm is used to calculate the distance from each door in the target room to the target location.&#xD;&#xA; - the output of the second algorithm is used to get the set of paths between rooms&#xD;&#xA; - the cost of these is added to the cost of getting to the first door and from the last door&#xD;&#xA; - the set of solutions is sorted by cost in such a way that the order of paths of the same cost will always be consistent&#xD;&#xA; - the first item in the set of solutions is chosen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/python-pathfinding/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://stackoverflow.com/q/6897924/655372" />
  <row Id="35328" PostHistoryTypeId="1" PostId="15541" RevisionGUID="a6851377-bdbe-4936-a645-be0746f7d677" CreationDate="2011-08-04T06:32:12.163" UserId="8635" Text="Are there any usable performant path-finding libraries for python?" />
  <row Id="35329" PostHistoryTypeId="3" PostId="15541" RevisionGUID="a6851377-bdbe-4936-a645-be0746f7d677" CreationDate="2011-08-04T06:32:12.163" UserId="8635" Text="&lt;ai&gt;&lt;path-finding&gt;&lt;libraries&gt;" />
  <row Id="35330" PostHistoryTypeId="25" PostId="15519" RevisionGUID="6b36045c-a777-4496-8a3d-9970c8414517" CreationDate="2011-08-04T06:36:43.913" Comment="http://twitter.com/#!/StackGameDev/status/99005829642067968" />
  <row Id="35335" PostHistoryTypeId="2" PostId="15543" RevisionGUID="28a61826-3249-46a2-abe2-fc37707a8ef1" CreationDate="2011-08-04T09:12:02.717" UserId="997" Text="There is a [Google Techtalk featuring Rob Hawkes][1], creator of [Rawkets][2], who talks about the problems he ran into while creating his game with Websockets and Node.js. He also comes up with some pretty slick solutions for the problems that he faced. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=zj1qTrpuXJ8&#xD;&#xA;  [2]: http://rawkets.com/" />
  <row Id="35337" PostHistoryTypeId="25" PostId="15541" RevisionGUID="60a26b1b-8b2e-493a-befe-5a8d358fa3cc" CreationDate="2011-08-04T09:36:43.507" Comment="http://twitter.com/#!/StackGameDev/status/99051126833414144" />
  <row Id="35338" PostHistoryTypeId="5" PostId="15532" RevisionGUID="e93c4f51-1966-4dc2-a510-d533abe72aa8" CreationDate="2011-08-04T10:12:15.740" UserId="5473" Comment="added 189 characters in body" Text="1. Use your imagination on the general topic if you haven't already.&#xD;&#xA;2. Do some research online and in libraries / museums too if you're keen.&#xD;&#xA;3. Play a few similar games, or at least watch youtube vids / read reviews of them. Know your competition.&#xD;&#xA;4. Rinse, repeat steps 1-3. Slowly your imagination will feed off the ongoing research you are doing, and your game idea will become more defined / refined.&#xD;&#xA;5. (Optional) Take notes as your major ideas take shape, if you don't have an amazingly good memory.&#xD;&#xA;&#xD;&#xA;And before you do any of the above: Get a google account if you don't already have one, and set it up for tagging so you can use it as an all purpose database. Gmail, google docs and google bookmarks all use tagging as you probably know, to cross reference information by topic. What if you have two categories, &quot;fuel&quot; and &quot;circuit conditions&quot;, and a single article matches both? -- So, tag to keep track of the cool stuff you'll find. You can search gmail more easily by typing eg. `label:&quot;circuit conditions&quot; label:&quot;crashes&quot;` into the gmail searchbar to find an article you know you saw somewhere on both these topics...&#xD;&#xA;&#xD;&#xA;And as Phil has stated -- using a cyclical approach like this will show you quickly enough if your idea is not something you wish to pursue.&#xD;&#xA;&#xD;&#xA;EDIT: And as Randolf has suggested, even if you only scribble notes that you will never look at again, scribbling notes and sketches has the impact of solidifying concepts in your mind.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35339" PostHistoryTypeId="6" PostId="15519" RevisionGUID="fde0b741-47bc-4d5c-8ee8-79853ecff2ba" CreationDate="2011-08-04T10:20:33.470" UserId="1156" Comment="edited tags" Text="&lt;game-design&gt;&lt;planning&gt;&lt;research&gt;" />
  <row Id="35342" PostHistoryTypeId="2" PostId="15546" RevisionGUID="36f9fa65-a9e0-4f8a-9bc6-e24620be375a" CreationDate="2011-08-04T11:22:20.437" UserId="4508" Text="i'm using vertex array to draw 2d geometry.&#xD;&#xA;but i can't achive smoothness.&#xD;&#xA;&#xD;&#xA;this is the code i'm using:&#xD;&#xA;&#xD;&#xA;	glEnableClientState(GL_COLOR_ARRAY);&#xD;&#xA;	glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;&#xD;&#xA;	glEnable(GL_BLEND);&#xD;&#xA;	glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;&#xD;&#xA;	glColorPointer(4, GL_UNSIGNED_BYTE, 0, shared_colors);&#xD;&#xA;	glVertexPointer(3, GL_FLOAT, 0, shared_vertex);&#xD;&#xA;&#xD;&#xA;	glDrawArrays(GL_LINES, 0, shared_counter);&#xD;&#xA;&#xD;&#xA;	glDisableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;	glDisableClientState(GL_COLOR_ARRAY);&#xD;&#xA;	glDisable(GL_BLEND);&#xD;&#xA;&#xD;&#xA;some advice?" />
  <row Id="35343" PostHistoryTypeId="1" PostId="15546" RevisionGUID="36f9fa65-a9e0-4f8a-9bc6-e24620be375a" CreationDate="2011-08-04T11:22:20.437" UserId="4508" Text="vertex array with smotthness" />
  <row Id="35344" PostHistoryTypeId="3" PostId="15546" RevisionGUID="36f9fa65-a9e0-4f8a-9bc6-e24620be375a" CreationDate="2011-08-04T11:22:20.437" UserId="4508" Text="&lt;c++&gt;&lt;vertex-arrays&gt;" />
  <row Id="35345" PostHistoryTypeId="2" PostId="15547" RevisionGUID="7582387b-1d79-4e86-86b6-1b6d7fa80ba7" CreationDate="2011-08-04T11:29:02.507" UserId="4794" Text="Simply use `glShadeModel(GL_SMOOTH)` when you want to smooth out the colors between your primtitive's vertices. The initial value is `GL_SMOOTH`, so if you haven't changed it, you'll probably don't need to set it.&#xD;&#xA;&#xD;&#xA;If you want smooth lines, use `glEnable(GL_LINE_SMOOTH)`." />
  <row Id="35346" PostHistoryTypeId="12" PostId="15547" RevisionGUID="74e54c4f-f980-49f5-b8c9-e28813d927bd" CreationDate="2011-08-04T11:29:18.683" UserId="4794" Text="[{&quot;Id&quot;:4794,&quot;DisplayName&quot;:&quot;Pompe de velo&quot;}]" />
  <row Id="35347" PostHistoryTypeId="13" PostId="15547" RevisionGUID="a51b9cda-abfe-406f-9bdf-5aa0ca9fde60" CreationDate="2011-08-04T11:31:09.323" UserId="4794" Text="[{&quot;Id&quot;:4794,&quot;DisplayName&quot;:&quot;Pompe de velo&quot;}]" />
  <row Id="35348" PostHistoryTypeId="2" PostId="15548" RevisionGUID="9461dbf7-9877-428c-91b3-6bee082f40e2" CreationDate="2011-08-04T11:47:17.500" UserId="7520" Text="Consider A* searching on a tile based map. A straight forward code would be: If there is an unit inside that cell, then it is unreachable, this is ok.&#xD;&#xA;&#xD;&#xA;But there is map resolution issue. When I look into war3, there monsters and structures does have different radius, and you can walk very close, which is more like vector based, how this was implemented?&#xD;&#xA;&#xD;&#xA;Also, what is the standard solution to incorporate moving obstacles collision detection with path finding algorithm, like war3?" />
  <row Id="35349" PostHistoryTypeId="1" PostId="15548" RevisionGUID="9461dbf7-9877-428c-91b3-6bee082f40e2" CreationDate="2011-08-04T11:47:17.500" UserId="7520" Text="pathfinding with obstacles in a war3 like game" />
  <row Id="35350" PostHistoryTypeId="3" PostId="15548" RevisionGUID="9461dbf7-9877-428c-91b3-6bee082f40e2" CreationDate="2011-08-04T11:47:17.500" UserId="7520" Text="&lt;collision-detection&gt;&lt;path-finding&gt;&lt;collision-avoidance&gt;" />
  <row Id="35351" PostHistoryTypeId="2" PostId="15549" RevisionGUID="5ead81f3-d9b6-4356-95c9-b6a0c8ea7e11" CreationDate="2011-08-04T11:53:00.287" UserId="2771" Text="The answer to your question depends on the features and style of your game. For example your approach may be useful if it will be possible to throw the sword(dagger) or damage regions of enemies bodies (like in Fallout).&#xD;&#xA;" />
  <row Id="35352" PostHistoryTypeId="2" PostId="15550" RevisionGUID="767e09f4-8276-4272-a3a9-07211f52cd57" CreationDate="2011-08-04T11:53:05.650" UserId="5473" Text="Does the game resolve collisions the way you want it to? If so, I don't think you're off track at all. There is no right or wrong answer here. These kinds of logic decisions are totally open and have to be made based on how you envision your game behaving. Game developers make these decisions on a daily basis.&#xD;&#xA;&#xD;&#xA;What I would say is this: Terraria is platform game, and a very retro one at that. What this means is you can typically get away with a more simplistic approach to collision detection, eg. the approach you've implemented. I'm also writing a top down action game with melee combat. My approach was to use Box2D for the collision detection so that sword swings etc. are accurate, realistic, and very fast to process. Realistic means attacks will impart linear and angular impulse to objects. So when you hit something, it can spin and be knocked back. It's a simple step to add breakable objects, too, i.e. `if (force &gt; object.strength) object.break();`&#xD;&#xA;&#xD;&#xA;If you are planning on making future games, you can't go wrong learning Box2D, it's available for every major language. However if you are just testing the waters of game development, so to speak, then KISS: stick with your present solution for now." />
  <row Id="35353" PostHistoryTypeId="2" PostId="15551" RevisionGUID="4b5e07d3-78f5-4dd6-af37-66d3c37e9e07" CreationDate="2011-08-04T12:09:25.593" UserId="7594" Text="I have some experience with Red5.  It is similar to BlazeDS in that it uses a Tomcat server. It has a built-in Tomcat server but I've heard some people got it to run on a stand-alone Tomcat (7) server. That would be an option if you find a host that provides Tomcat.&#xD;&#xA;&#xD;&#xA;You can probably keep the Java code to a minimum by having Red5 provide no more than a gateway to pass (remote procedure call or state update) messages.  I think there are standard classes that already do something like that, but I have no experience with them." />
  <row Id="35354" PostHistoryTypeId="2" PostId="15552" RevisionGUID="63d05f53-c2d2-478a-a4ea-9d7648ce3926" CreationDate="2011-08-04T12:13:11.660" UserId="5473" Text="It would use tesselation to create pathing regions. [This article][1] explains the concept with full diagrams.&#xD;&#xA;&#xD;&#xA;You can still maintain A* as your pathfinding approach, however your network is no longer a grid (4-connected graph), but a graph representing the arbitrary connectivity between your polygonal regions. So you will have to adapt your algorithm to suit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ai-blog.net/archives/000152.html" />
  <row Id="35355" PostHistoryTypeId="5" PostId="15550" RevisionGUID="d55f6ff2-a04c-40c4-8020-5229404116c6" CreationDate="2011-08-04T12:18:24.167" UserId="5473" Comment="Changed &quot;KISS&quot; to &quot;keep it simple&quot; so as not to offend the OP!?" Text="Does the game resolve collisions the way you want it to? If so, I don't think you're off track at all. There is no right or wrong answer here. These kinds of logic decisions are totally open and have to be made based on how you envision your game behaving. Game developers make these decisions on a daily basis.&#xD;&#xA;&#xD;&#xA;What I would say is this: Terraria is platform game, and a very retro one at that. What this means is you can typically get away with a more simplistic approach to collision detection, eg. the approach you've implemented. I'm also writing a top down action game with melee combat. My approach was to use Box2D for the collision detection so that sword swings etc. are accurate, realistic, and very fast to process. Realistic means attacks will impart linear and angular impulse to objects. So when you hit something, it can spin and be knocked back. It's a simple step to add breakable objects, too, i.e. `if (force &gt; object.strength) object.break();`&#xD;&#xA;&#xD;&#xA;If you are planning on making future games, you can't go wrong learning Box2D, it's available for every major language. However if you are just testing the waters of game development, so to speak, then keep it simple: stick with your present solution for now." />
  <row Id="35356" PostHistoryTypeId="25" PostId="15537" RevisionGUID="24832ce4-e48a-4496-97cc-8ccd9e1901b7" CreationDate="2011-08-04T12:36:43.600" Comment="http://twitter.com/#!/StackGameDev/status/99096425882857473" />
  <row Id="35357" PostHistoryTypeId="5" PostId="15552" RevisionGUID="9e5c06ff-65db-431f-ae55-c66c57eddf31" CreationDate="2011-08-04T12:37:58.143" UserId="5473" Comment="added 22 characters in body" Text="It would use tesselation to create pathing regions AKA navigation meshes. [This article][1] explains the concept with full diagrams.&#xD;&#xA;&#xD;&#xA;You can still maintain A* as your pathfinding approach, however your network is no longer a grid (4-connected graph), but a graph representing the arbitrary connectivity between your polygonal regions. So you will have to adapt your algorithm to suit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ai-blog.net/archives/000152.html" />
  <row Id="35358" PostHistoryTypeId="5" PostId="15546" RevisionGUID="1885f691-32bf-41c0-a954-0ad8bf3ae1f9" CreationDate="2011-08-04T12:52:59.130" UserId="8400" Comment="fixed spelling" Text="I'm using vertex array to draw 2d geometry,&#xD;&#xA;but I can't achieve smoothness.&#xD;&#xA;&#xD;&#xA;This is the code I'm using:&#xD;&#xA;&#xD;&#xA;	glEnableClientState(GL_COLOR_ARRAY);&#xD;&#xA;	glEnableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;&#xD;&#xA;	glEnable(GL_BLEND);&#xD;&#xA;	glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;&#xD;&#xA;	glColorPointer(4, GL_UNSIGNED_BYTE, 0, shared_colors);&#xD;&#xA;	glVertexPointer(3, GL_FLOAT, 0, shared_vertex);&#xD;&#xA;&#xD;&#xA;	glDrawArrays(GL_LINES, 0, shared_counter);&#xD;&#xA;&#xD;&#xA;	glDisableClientState(GL_VERTEX_ARRAY);&#xD;&#xA;	glDisableClientState(GL_COLOR_ARRAY);&#xD;&#xA;	glDisable(GL_BLEND);&#xD;&#xA;&#xD;&#xA;Some advice?" />
  <row Id="35359" PostHistoryTypeId="4" PostId="15546" RevisionGUID="1885f691-32bf-41c0-a954-0ad8bf3ae1f9" CreationDate="2011-08-04T12:52:59.130" UserId="8400" Comment="fixed spelling" Text="vertex array with smoothness" />
  <row Id="35360" PostHistoryTypeId="24" PostId="15546" RevisionGUID="1885f691-32bf-41c0-a954-0ad8bf3ae1f9" CreationDate="2011-08-04T12:52:59.130" Comment="Proposed by 8400 approved by 1156 edit id of 595" />
  <row Id="35361" PostHistoryTypeId="2" PostId="15553" RevisionGUID="a6f14613-58a4-4150-833b-d2e45cf98de2" CreationDate="2011-08-04T13:08:30.050" UserId="8279" Text="I'm blanking on this one. I can anker stuff on edges of course, that would make my UI resolution independent...until it changes so much that the graphics are too small. How do I scale appropiately whenever needed? How do I keep my graphics at the right proportion while scaling? I don't want them stretched if the resolution has a different proportion like 16:10 as opposed to whatever else.&#xD;&#xA;Is there a true and tested approach to this? Video players show black borders because of this problem, is this not properly solvable?" />
  <row Id="35362" PostHistoryTypeId="1" PostId="15553" RevisionGUID="a6f14613-58a4-4150-833b-d2e45cf98de2" CreationDate="2011-08-04T13:08:30.050" UserId="8279" Text="How do I make a resolution independent system?" />
  <row Id="35363" PostHistoryTypeId="3" PostId="15553" RevisionGUID="a6f14613-58a4-4150-833b-d2e45cf98de2" CreationDate="2011-08-04T13:08:30.050" UserId="8279" Text="&lt;xna&gt;&lt;resolution&gt;" />
  <row Id="35364" PostHistoryTypeId="5" PostId="15553" RevisionGUID="fd65edbe-d44c-4ad9-8273-1f35c5c685fd" CreationDate="2011-08-04T13:29:48.537" UserId="2698" Comment="Some typo fixes" Text="I'm blanking on this one. I can anchor stuff on edges of course, that would make my UI resolution independent...until it changes so much that the graphics are too small. How do I scale appropriately whenever needed? How do I keep my graphics at the right proportion while scaling? I don't want them stretched if the resolution has a different proportion like 16:10 as opposed to whatever else.&#xD;&#xA;&#xD;&#xA;Is there a true and tested approach to this? Video players show black borders because of this problem, is this not properly solvable?" />
  <row Id="35365" PostHistoryTypeId="17" PostId="15554" RevisionGUID="caa17783-0799-456d-9365-d9195836e633" CreationDate="2011-08-04T13:30:25.807" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/98391/solving-maze-without-return-ability" Text="" />
  <row Id="35366" PostHistoryTypeId="2" PostId="15555" RevisionGUID="830f594a-c0ad-4286-ab10-8a6835513876" CreationDate="2011-08-03T21:29:07.300" UserId="9052" UserDisplayName="thorsten müller" Text="Hmm, you know the number of the actual room. So you can build a data structure. I guess the list of exits does not have the room numbers attached to it. But after choosing one randomly, you know at least, that there is a connection.&#xD;&#xA;&#xD;&#xA;Say you are in room 4 and choose one of three random exit.&#xD;&#xA;Now the system tells you, you are in room 6 and have only one exit left. You choose that and are back in room 4.&#xD;&#xA;At this point you have gathered some information about the structure of the maze.&#xD;&#xA;You now choose another exit and end in room 5. Moe information about room 4 (one exit to 6, one exit to 5)&#xD;&#xA;&#xD;&#xA;Can you choose a specific exit? are they numbered, say if in room 4 you choose exit one you always end in 6?&#xD;&#xA;Otherwise you at least can find out about possible routes.&#xD;&#xA;&#xD;&#xA;Ok, just read you comment. So if the exits have IDs and those are statically linked to a room (even if you don't know which one for a start) you just choose a new one and remember the exit/room connections and remember which exit was already tried. Try untried exits until you have searched each single room.&#xD;&#xA;&#xD;&#xA;That way it's actually simple. After a few steps you should have a more or less complete list of connections. Only when you enter a new room you may (for a few steps) run around randomly. But with every step you get more info and whenever you enter a room visited before, you can make a smarter decision (not testing dead end room 6 again for example when you find back to 4, since it has no exits that are untested).&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;The idea is to make random steps first and log the information you find as I described (Dan's description is more concise). If you find yourself in a room with no unknown exits, you can use any known pathfinder to find the shortest way to a room that has exits which you didn't explore yet.&#xD;&#xA;&#xD;&#xA;Not 100% sure, but I think Peter Norvig wrote about a similar problem (The Wumpus maze) in his book &quot;Artificial Intelligence: A Modern Approach&quot;. Though if I remember right, it was less about path finding and more about decision making regarding some information the system could get about neighboring rooms.&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;No, it's not only random. By keeping track of already tried exits you remove unnecessary redundancy. Actually you do no even need to choose randomly.&#xD;&#xA;&#xD;&#xA;Assume you start in room 4. Info you get: 3 exits A,B,C&#xD;&#xA;You always choose the first by now unused exit. So start with A.&#xD;&#xA;You end in room 6. Now you remember 4A =&gt; 6 (and used)&#xD;&#xA;in room 6 you get the info 1 exit A.&#xD;&#xA;Again you choose the first unused (and in this case only exit)&#xD;&#xA;Back in room for knowing 6A =&gt; 4 (and no further exits in room 6)&#xD;&#xA;Now you choose the next exit B and reach room 5...&#xD;&#xA;&#xD;&#xA;Sooner or later you will have searched all rooms that way. But in a systematic matter.&#xD;&#xA;&#xD;&#xA;The only reason for what you would need a path finding is, when you find yourself in a room where all exits are already explored. Then you will want to find a direct way to the next room with unexplored exits to go own with your search. So the main trick is less to know which exit leads to which room (though this may be helpful) but to keep track of yet not tried exits.&#xD;&#xA;&#xD;&#xA;This way for example you can avoid running in circles all the time, what would be a risk for a purely random approach.&#xD;&#xA;&#xD;&#xA;In you example maze this would most likely not matter much. But in a large maze with many rooms and connections and maybe tricky circular arranged rooms this system guarantees that you will find the exit with as few trials as possible.&#xD;&#xA;&#xD;&#xA;(I think that's probably the same system as Byte56 came up with in Gamers)" />
  <row Id="35367" PostHistoryTypeId="2" PostId="15554" RevisionGUID="c88d93e1-49b7-4c30-9e81-61bc15cbd60f" CreationDate="2011-08-03T21:13:05.607" UserId="5742" Text="I need to write a program that will solve maze. Maze has graph structure, where each node - some room, and edges - exits to other rooms:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Specification:&#xD;&#xA;&#xD;&#xA; - We start from a random room.&#xD;&#xA; - Maze has dead-ends, 0 or few exits.&#xD;&#xA; - We don't know anything about **all** maze, only the number of current&#xD;&#xA;   room and list of doors from it.&#xD;&#xA; - When we enter new room we don't know where we came from (what door&#xD;&#xA;   from current room leads us back to previous room).&#xD;&#xA; - We can recognize when we reach exit.&#xD;&#xA; - Each step we move from current room to some available door from it.&#xD;&#xA; - If we are at room 6 for example, we can't just jump to begin. It's like robot movement.&#xD;&#xA; - We know exactly ID of current room. We know ID of each door in current room (not in all maze).&#xD;&#xA; - We control robot.&#xD;&#xA;&#xD;&#xA;I looked all known algorithms, but they all require at least additional ability to return to previous room. According to specification we can't use any algorithms that search for shortest path (actually, I don't need the shortest), because we know only about current room. We can't use Left-(Right-)hand following algorithms, because don't know direction of exits. Probably, the only solution that meets specification is choosing random exit in every room in hope that some time exit will be found...&#xD;&#xA;&#xD;&#xA;Any suggestion how to solve such maze in more smart way?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/njKXR.png" />
  <row Id="35368" PostHistoryTypeId="1" PostId="15554" RevisionGUID="c88d93e1-49b7-4c30-9e81-61bc15cbd60f" CreationDate="2011-08-03T21:13:05.607" UserId="5742" Text="Solving maze without return ability" />
  <row Id="35369" PostHistoryTypeId="3" PostId="15554" RevisionGUID="c88d93e1-49b7-4c30-9e81-61bc15cbd60f" CreationDate="2011-08-03T21:13:05.607" UserId="5742" Text="&lt;homework&gt;" />
  <row Id="35370" PostHistoryTypeId="17" PostId="15555" RevisionGUID="9e251b1f-2067-43b2-8014-04cb2d4d1b5e" CreationDate="2011-08-04T13:30:25.807" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/98391/solving-maze-without-return-ability" Text="" />
  <row Id="35371" PostHistoryTypeId="17" PostId="15556" RevisionGUID="b8c2ca99-08f1-48bd-ae0d-7bb9715f309e" CreationDate="2011-08-04T13:30:25.807" UserId="-1" Comment="from http://programmers.stackexchange.com/questions/98391/solving-maze-without-return-ability" Text="" />
  <row Id="35372" PostHistoryTypeId="2" PostId="15556" RevisionGUID="af4798a9-373e-4d87-84e9-e5072df503bf" CreationDate="2011-08-03T21:29:38.837" UserId="7881" Text="Essentially, you have a directional graph, where every connected room is connected by two unknown passages - one in either direction. Say you start in node `1`, and doors `A` and `B` lead out. You don't know what lies beyond each door, so you just pick door `A`. You get to room `2`, which has doors `C`, `D`, and `E`. You now know that door `A` leads from room `1` to room `2`, but you don't know how to get back, so you randomly pick door `C`. You get back to room `1`! Now you know how to get between rooms `1` and `2`. Continue to explore through the closest unknown door until you find the exit!" />
  <row Id="35373" PostHistoryTypeId="2" PostId="15557" RevisionGUID="95a3502d-4595-4b16-852c-f934f8f856ff" CreationDate="2011-08-04T14:13:49.593" UserId="6422" Text="Generally what you'd want to do depends on the game.&#xD;&#xA;&#xD;&#xA;One option is to have black borders if the aspect ratio (proportion) is different (probably easiest, just render to texture, then render that to screen, resizing as appropriate).&#xD;&#xA;&#xD;&#xA;Another option is to have different render paths for different aspect ratios. You could have one for widescreen, one for 'normal'.&#xD;&#xA;&#xD;&#xA;Yet another option is to scale things separately, e.g. make a UI message box larger or smaller depending on resolution. Whenever you need to work out where to draw to, instead of using exact pixels, do things like 0.2 down, 0.8 across, width 0.1, height 0.3. Ovbiously in this case you'd get stretching of things, although depending on how you're drawing things that could be fine (i.e. stretch a UI background, but not the text).&#xD;&#xA;&#xD;&#xA;In terms of 3D, as long as you set the viewport up correctly you should end up with widescreen players being able to see slightly more than non-widescreen setups. (alternatively draw black borders / or stretch the view)." />
  <row Id="35374" PostHistoryTypeId="2" PostId="15558" RevisionGUID="2a7ba6e3-7d88-4a70-8f21-1edc414ec854" CreationDate="2011-08-04T14:31:24.537" UserId="2708" Text="I want to make an Event scheduler for my Game, I basically want to be able to schedule the triggering of a Game Event. This can be a one time trigger, or a periodic trigger (trigger event &quot;E_BIG_EXPLOSION&quot; on a 5 seconds basis...).&#xD;&#xA;&#xD;&#xA;It is tempting to think that this may be a good place to use a Singleton, but singletons can be quite evil and they tend to spread like a disease... so I try to avoid them at all cost.&#xD;&#xA;&#xD;&#xA;What design would you propose to avoid the singleton usage in this case?" />
  <row Id="35375" PostHistoryTypeId="1" PostId="15558" RevisionGUID="2a7ba6e3-7d88-4a70-8f21-1edc414ec854" CreationDate="2011-08-04T14:31:24.537" UserId="2708" Text="Avoiding singleton pattern for Event Scheduler?" />
  <row Id="35376" PostHistoryTypeId="3" PostId="15558" RevisionGUID="2a7ba6e3-7d88-4a70-8f21-1edc414ec854" CreationDate="2011-08-04T14:31:24.537" UserId="2708" Text="&lt;architecture&gt;&lt;engine&gt;&lt;design-patterns&gt;&lt;events&gt;" />
  <row Id="35377" PostHistoryTypeId="2" PostId="15559" RevisionGUID="acd7ac75-4af3-4f8c-bcad-4c2c7e81fe64" CreationDate="2011-08-04T14:42:35.153" UserId="6588" Text="I tend to avoid singletons too but there are a few objects that make the most sense as singletons and a central messaging system is one of them. Despite the rants I've heard, singletons are certainly much better than global variables/functions because you always have to deliberately address it (versus global values just magically appearing out of thin air).&#xD;&#xA;&#xD;&#xA;In the end every message sender and receiver must have *some* common point of intersection, and it is much better to keep your objects decoupled by having a common singleton shared by everything rather than have each of your message senders directly know about the message receivers.&#xD;&#xA;&#xD;&#xA;While I'm sure some other architecture could be devised for your Event Scheduler, to me it seems like a waste of effort to over-think it, especially when using an Event Scheduler is already a big win over not using one." />
  <row Id="35378" PostHistoryTypeId="2" PostId="15560" RevisionGUID="0b473938-d1de-4094-9b09-34c3bad1724d" CreationDate="2011-08-04T14:46:47.753" UserId="853" Text=" I ask this because I'm curious to know from people who actually support themselves by making games, if their project management skills contribute to determining the success of a project?&#xD;&#xA;&#xD;&#xA; I'm also have this feeling for some reason that having too much project management can strangle the creative process. Maybe there is a way to prevent that from happening. I don't know. &#xD;&#xA;&#xD;&#xA; Thanks to all that reply." />
  <row Id="35379" PostHistoryTypeId="1" PostId="15560" RevisionGUID="0b473938-d1de-4094-9b09-34c3bad1724d" CreationDate="2011-08-04T14:46:47.753" UserId="853" Text="How important is understanding Software Project Management for an indie?" />
  <row Id="35380" PostHistoryTypeId="3" PostId="15560" RevisionGUID="0b473938-d1de-4094-9b09-34c3bad1724d" CreationDate="2011-08-04T14:46:47.753" UserId="853" Text="&lt;project-management&gt;" />
  <row Id="35381" PostHistoryTypeId="5" PostId="15559" RevisionGUID="3783c7e0-5cc1-4cf7-aa50-aa45e41cd0a3" CreationDate="2011-08-04T14:51:26.253" UserId="6588" Comment="added 320 characters in body" Text="I tend to avoid singletons too but there are a few objects that make the most sense as singletons and a central messaging system is one of them. Despite the rants I've heard, singletons are certainly much better than global variables/functions because you always have to deliberately address it (versus global values just magically appearing out of thin air).&#xD;&#xA;&#xD;&#xA;In the end every message sender and receiver must have *some* common point of intersection, and it is much better to keep your objects decoupled by having a common singleton shared by everything rather than have each of your message senders directly know about the message receivers.&#xD;&#xA;&#xD;&#xA;While I'm sure some other architecture could be devised for your event system, to me it seems like a waste of effort to over-think it, especially when using an event system is already a big win over not using one.&#xD;&#xA;&#xD;&#xA;EDIT: As for your specific example of an explosion event dispatched on a periodic trigger, I would probably have the events dispatched in some other object (like the turret gun or whatever causing those explosions) and not in the central event system. However those events would still be dispatched *to* the central event system." />
  <row Id="35382" PostHistoryTypeId="2" PostId="15561" RevisionGUID="db9a7061-a7fa-4957-848d-da94efe121a3" CreationDate="2011-08-04T14:58:51.677" UserId="1430" Text="You should have a very well-defined set of interfaces that are allowed to transmit or receive messages -- giving them a reference to a EventScheduler should be trivial. If it isn't, or if you feel like that would involve passing the event scheduler to &quot;too many&quot; distinct types, then you might have a larger design problem on your hands (a promiscuous dependency, which singletons tend to exacerbate, not solve).&#xD;&#xA;&#xD;&#xA;Remember that while the technique of passing the scheduler to the interfaces that need it is a form of &quot;[dependency injection][1],&quot; you aren't in this case injecting a *new* dependency. This is a dependency you already have in the system, but you are now making it an explicit one (versus a singleton's implicit dependency). As a rule of thumb, explicit dependencies are more preferable as they are more self-documenting.&#xD;&#xA;&#xD;&#xA;You also afford yourself more flexibility by decoupling the consumers of the event scheduling from each other (since they are not all necessarily tied to the same scheduler), which can be useful for testing or simulating local client/server setups or a number of other options -- you may not need these other options, but you have not expended effort to artificially restrict yourself from them, which is a plus.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dependency_injection" />
  <row Id="35383" PostHistoryTypeId="2" PostId="15562" RevisionGUID="dfc8f71c-7abe-4710-9ecb-a13bf2fbf5e0" CreationDate="2011-08-04T15:00:15.167" UserId="2897" Text="I can't say for sure what kind of approach was used by WC3 developers, but it looks pretty much like Hierarchical Annotated A*. Unit radius defined in the WC3Editor was used as-is for 3d model scaling, but actual unit size for pathfinding was discrete, maybe something like unitSize = (int)(unitRadius / 10). It wasn't vector-based, that's for sure.&#xD;&#xA;&#xD;&#xA;Let's say there are a lot of path nodes making high-resolution node grid. Simple unit like a ghoul has a size of 2, so in order to place it somewhere in a grid we need 4 free path nodes near each other. A death knight hero is slightly larger with a size of 3, taking 9 path nodes total. Now we place 2 ziggurats together leaving a 2 node-wide space in-between, and send a ghoul and a death knight on the other side.  Ghoul will be able to pass between two ziggurats, while death knight will have to move around. How can it be determined? &#xD;&#xA;&#xD;&#xA;In order to see whether a node can accommodate a unit of specific size, let's assign a special clearance value to each node defining a maximum allowed unit size. Basically, it means that several bounding checks were made for a node, and the largest possible bounds were remembered as node's clearance. So when we want to place a death knight on some node, it becomes as simple as comparing node's clearance with death knight’s size. Of course, things are going to become much more complex when there are several units hopping around competing for nodes, but that’s another story.&#xD;&#xA;&#xD;&#xA;For further detail you may want to check out this article:&#xD;&#xA;&#xD;&#xA;http://harablog.wordpress.com/2009/01/29/clearance-based-pathfinding/&#xD;&#xA;" />
  <row Id="35384" PostHistoryTypeId="5" PostId="15560" RevisionGUID="3517abbe-73b3-45a9-bb9d-35365ae49e40" CreationDate="2011-08-04T15:21:07.647" UserId="853" Comment="deleted 3 characters in body" Text=" I ask this because I'm curious to know from people who actually support themselves by making games, if their project management skills contribute to determining the success of a project?&#xD;&#xA;&#xD;&#xA; I also have this feeling for some reason that having too much project management can strangle the creative process. Maybe there is a way to prevent that from happening. I don't know. &#xD;&#xA;&#xD;&#xA; Thanks to all that reply." />
  <row Id="35388" PostHistoryTypeId="18" PostId="15533" RevisionGUID="c4b417fb-8125-48c0-9d5f-a61c8a4a9535" CreationDate="2011-08-04T15:23:29.123" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/15531/solve-maze-without-return-ability" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="35389" PostHistoryTypeId="18" PostId="15535" RevisionGUID="c4b417fb-8125-48c0-9d5f-a61c8a4a9535" CreationDate="2011-08-04T15:23:29.123" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/15531/solve-maze-without-return-ability" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="35390" PostHistoryTypeId="18" PostId="15554" RevisionGUID="c4b417fb-8125-48c0-9d5f-a61c8a4a9535" CreationDate="2011-08-04T15:23:29.123" UserId="51" Comment="from http://gamedev.stackexchange.com/questions/15531/solve-maze-without-return-ability" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="35392" PostHistoryTypeId="6" PostId="15554" RevisionGUID="622ccbed-bfd3-4235-9ff4-50add45a5a22" CreationDate="2011-08-04T15:25:46.313" UserId="51" Comment="edited tags" Text="&lt;algorithm&gt;&lt;homework&gt;" />
  <row Id="35393" PostHistoryTypeId="5" PostId="15548" RevisionGUID="9185fa9f-3a7a-41cf-908c-b3eaf939f97c" CreationDate="2011-08-04T15:27:07.327" UserId="6558" Comment="clarity: war3 -&gt; warcraft 3" Text="Consider A* searching on a tile based map. A straight forward code would be: If there is an unit inside that cell, then it is unreachable, this is ok.&#xD;&#xA;&#xD;&#xA;But there is map resolution issue. When I look into Warcraft 3, there monsters and structures does have different radius, and you can walk very close, which is more like vector based, how this was implemented?&#xD;&#xA;&#xD;&#xA;Also, what is the standard solution to incorporate moving obstacles collision detection with path finding algorithm, like Warcraft 3?" />
  <row Id="35394" PostHistoryTypeId="4" PostId="15548" RevisionGUID="9185fa9f-3a7a-41cf-908c-b3eaf939f97c" CreationDate="2011-08-04T15:27:07.327" UserId="6558" Comment="clarity: war3 -&gt; warcraft 3" Text="pathfinding with obstacles in a Warcraft 3 like game" />
  <row Id="35395" PostHistoryTypeId="24" PostId="15548" RevisionGUID="9185fa9f-3a7a-41cf-908c-b3eaf939f97c" CreationDate="2011-08-04T15:27:07.327" Comment="Proposed by 6558 approved by 51 edit id of 596" />
  <row Id="35396" PostHistoryTypeId="2" PostId="15563" RevisionGUID="9adb39ba-0b6f-4133-b112-110de6710d3f" CreationDate="2011-08-04T15:35:02.280" UserId="51" Text="Sometimes &quot;strangling the creative process is necessary&quot;, if the creative process is so out of control that it's preventing you from shipping a game.&#xD;&#xA;&#xD;&#xA;PM (project management) is one of those things that, if things are going smoothly, you hardly notice that it's there.  It's primary goal is to keep the team focused on what the real goal is.&#xD;&#xA;&#xD;&#xA;Some things in the PM toolbox can actually help the creative process.  The idea of short sprints to a &quot;shippable product&quot; can put you in the quick iteration mindset.  Daily standups are useful as a communication tool.  But it's all about how you apply it and where.&#xD;&#xA;&#xD;&#xA;The relative importance of PM depends on the project and the team.  Sometimes it doesn't add anything.  Sometimes it's the difference between success and failure.  " />
  <row Id="35398" PostHistoryTypeId="2" PostId="15564" RevisionGUID="2e9cffbd-22de-4ca4-91e3-73eedef49488" CreationDate="2011-08-04T15:38:48.677" UserId="160" Text="The short answer is depth-first search with backtracking. You can do breadth-first if you prefer, but your little robot will do a lot more walking back and forth then.&#xD;&#xA;&#xD;&#xA;More concretely, assume we're given:&#xD;&#xA;&#xD;&#xA;    // Moves to the given room, which must have a door between&#xD;&#xA;    // it and the current room.&#xD;&#xA;    moveTo(room);&#xD;&#xA;&#xD;&#xA;    // Returns the list of room ids directly reachable from&#xD;&#xA;    // the current room.&#xD;&#xA;    getDoors();&#xD;&#xA;&#xD;&#xA;    // Returns true if this room is the exit.&#xD;&#xA;    isExit();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To find the exit, we just need:&#xD;&#xA;&#xD;&#xA;    void escape(int startingRoom) {&#xD;&#xA;      Stack&lt;int&gt; path = new Stack&lt;int&gt;();&#xD;&#xA;      path.push(startingRoom);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    boolean escape(Stack&lt;int&gt; path) {&#xD;&#xA;      for (int door : getDoors()) {&#xD;&#xA;        // Stop if we've escaped.&#xD;&#xA;        if (isExit()) return true;&#xD;&#xA;&#xD;&#xA;        // Don't walk in circles.&#xD;&#xA;        if (path.contains(door)) continue;&#xD;&#xA;&#xD;&#xA;        moveTo(door);&#xD;&#xA;        path.push(door);&#xD;&#xA;        if (escape(path)) return true;&#xD;&#xA;&#xD;&#xA;        // If we got here, the door didn't lead to an exit. Backtrack.&#xD;&#xA;        path.pop();&#xD;&#xA;        moveTo(path.peek());&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Call `escape()` with the ID of the start room and it will move the robot to the exit (by calling `moveTo()`)." />
  <row Id="35399" PostHistoryTypeId="2" PostId="15565" RevisionGUID="b63f74cf-3eda-4fa5-9544-b487f2269eb2" CreationDate="2011-08-04T15:41:18.237" UserId="160" Text="An event dispatcher is one of those cases where a singleton isn't the *worst* idea in the world, but I applaud you for trying to avoid it. You might find some ideas [here](http://gameprogrammingpatterns.com/singleton.html#what-we-can-do-instead)." />
  <row Id="35401" PostHistoryTypeId="2" PostId="15566" RevisionGUID="5ba44777-95df-4743-87b6-e77f26d719aa" CreationDate="2011-08-04T16:23:21.777" UserId="2897" Text="It is pretty important, just like a cooking oil: its presence seems inessential, but its absence becomes noticeable with passing of time :) &#xD;&#xA;Well, game project's activity can be divided into two categories: enjoyable and painful. Consider this: &#xD;&#xA;&#xD;&#xA; - Writing a complex artificial life simulation or complex particle system feels good and rewarding.&#xD;&#xA; - Analysis of competitors, accountancy and various evaluations feels like abominable waste of time.  &#xD;&#xA; - Its only natural for one to strive for a pleasant while avoiding unpleasant. &#xD;&#xA; - Success comes naturally to those who diligently challenge painful tasks instead of just happily coding away from them.&#xD;&#xA;&#xD;&#xA;It is easy to spot a problem here, without proper project management you may fail to adequately deal with accumulating problems, arising challenges and various other things which come up in project's lifetime.&#xD;&#xA;&#xD;&#xA;So project management is not here to strangle creativity, it is to aid you by providing a systematic way of solving both pleasant and unpleasant tasks." />
  <row Id="35402" PostHistoryTypeId="5" PostId="15533" RevisionGUID="49e0d6b5-2373-48f7-b760-cd37f5c5f672" CreationDate="2011-08-04T16:42:02.400" UserId="9033" Comment="Fixed starting with a room with only one door." Text="I'm not too clear on your requirements, but if the following is allowed, it may be a simple to follow algorithm.&#xD;&#xA;Probably a bug in there, especially since it uses a recursive function.  Also, it checks if a door leads to the room you came from, but I don't know how a three room circular path would handle, it may just keep looping forever in those three rooms.  You may have to add a history to ensure no room is checked twice.  But by reading your description that may not be allowed.&#xD;&#xA;&#xD;&#xA;    solved = FALSE&#xD;&#xA;    &#xD;&#xA;    SearchRoom(rooms[0], rooms[0])    // Start at room 1 (or any room)&#xD;&#xA;    IF solved THEN&#xD;&#xA;      // solvable&#xD;&#xA;    ELSE&#xD;&#xA;      // unsolvable&#xD;&#xA;    ENDIF&#xD;&#xA;    END&#xD;&#xA;    &#xD;&#xA;    // Recursive function, should run until it searches every room or finds the exit&#xD;&#xA;    FUNCTION SearchRoom: curRoom, prevRoom&#xD;&#xA;      // Is this room the 'exit' room&#xD;&#xA;      IF curRoom.IsExit() THEN&#xD;&#xA;        solved = TRUE&#xD;&#xA;        RETURN&#xD;&#xA;      ENDIF&#xD;&#xA;    &#xD;&#xA;      // Deadend?  (skip starting room)&#xD;&#xA;      IF (curRoom.id &lt;&gt; prevRoom.id) AND (curRoom.doors &lt;= 1) THEN RETURN&#xD;&#xA;    &#xD;&#xA;      // Search each room the current room leads to&#xD;&#xA;      FOREACH door IN curRoom&#xD;&#xA;        // Skip the room we just came from&#xD;&#xA;        IF door.id &lt;&gt; prevRoom.id THEN&#xD;&#xA;          SearchRoom(door, curRoom)&#xD;&#xA;        ENDIF&#xD;&#xA;        IF solved THEN EXIT LOOP&#xD;&#xA;      NEXT&#xD;&#xA;    &#xD;&#xA;      RETURN&#xD;&#xA;    ENDFUNCTION&#xD;&#xA;&#xD;&#xA;[Edit] Added 'id' to previous check, and updated to make more object oriented." />
  <row Id="35403" PostHistoryTypeId="2" PostId="15567" RevisionGUID="c1cac364-97d3-47a4-aeb8-6af0d82ae5e4" CreationDate="2011-08-04T16:46:25.457" UserId="5473" Text="I think the first question you have to ask (perhaps clarify in your question) is: Are you managing only yourself? Or are you managing others?&#xD;&#xA;&#xD;&#xA;Because if you're only managing yourself, I would frame it as &quot;self-discipline&quot; and &quot;effective time management&quot; as opposed to what PM generally refers to, which is managing a group who are on the floor, getting the actual nitty gritty done.&#xD;&#xA;&#xD;&#xA;From my experience, being an actual indie (&quot;individual&quot; in the original sense) means having a solid grip on where to dedicate your time to what, eg. production, support, networking, promotion, etc. And once you can effectively manage yourself, that's when you have something to offer (your indie business) as a manager of others.&#xD;&#xA;&#xD;&#xA;I guess what I'm saying is, everything comes with time. If you're not at the point where you have to worry about traditional PM skills yet, then don't. Focus on improving your ability as a creative, a developer, and a businessman." />
  <row Id="35404" PostHistoryTypeId="2" PostId="15568" RevisionGUID="c34a623d-d8b9-4324-bdb3-b3f190d24fa9" CreationDate="2011-08-04T17:30:41.373" UserId="2978" Text="I'm trying to build a simple world editor and I would like to implement a camera similar to what's used in 3ds Max, Maya or even Unity.&#xD;&#xA;&#xD;&#xA;From what I can figure out from Unity, the panning behavior seems to be relatively simple : the camera is moving on the plane defined by the camera position and direction. However, rotation is more complex. Most of the time, the camera is looking at a fixed point on the xz plane and rotating around it. I'm not entirely sure how this point is determined and this is what I'm trying to find out. Also, I've noticed that, after a certain height, the camera fall back to a rotation-only control.&#xD;&#xA;&#xD;&#xA;Does anybody implemented something similar this?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35405" PostHistoryTypeId="1" PostId="15568" RevisionGUID="c34a623d-d8b9-4324-bdb3-b3f190d24fa9" CreationDate="2011-08-04T17:30:41.373" UserId="2978" Text="3D Camera control in DCC" />
  <row Id="35406" PostHistoryTypeId="3" PostId="15568" RevisionGUID="c34a623d-d8b9-4324-bdb3-b3f190d24fa9" CreationDate="2011-08-04T17:30:41.373" UserId="2978" Text="&lt;camera&gt;&lt;map-editor&gt;" />
  <row Id="35407" PostHistoryTypeId="2" PostId="15569" RevisionGUID="0020e4cc-0470-477f-b7e7-75e114be5f72" CreationDate="2011-08-04T17:32:12.357" UserId="3830" Text="Caveat and summary - I'm basing my answer on the idea that you have a good team to start with.  A good team doesn't need a project manager, but can work together towards a common goal as a team.  &quot;Bad&quot; teams (or really complex projects) need a project manager.&#xD;&#xA;&#xD;&#xA;There's an old joke in the modding world of the guy who posts on some forum that he has an awesome game idea, and he just needs a coder, a modeller, a skinner, a sound guy and a level designer.  And what's he going to do?  He's the &quot;leader&quot; or the &quot;idea guy&quot;.  The point being, the poster doesn't have much to offer, and really needs to be part of the development team.   &#xD;&#xA;&#xD;&#xA;Don't let your desire to add project management to a game turn your project into one of these.  Indie implies small team, and small team implies very flat organizational structure.  And that implies that your team can work independently towards a common goal that they all share and understand.  &#xD;&#xA;&#xD;&#xA;Some teams need no management and are self managing - a team of equals who's synergistic efforts combine into something good.  This is true when the developers are working towards a common shared vision and goal.  &#xD;&#xA;&#xD;&#xA;If that vision is *not* shared, then there needs to be something that guides everyone towards the same goal.  That can be a project manager, but it just as easily can be a good design document that everyone follows.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="35408" PostHistoryTypeId="5" PostId="15568" RevisionGUID="15b5e969-c074-419f-80f0-809eba6354c6" CreationDate="2011-08-04T17:55:39.500" UserId="2978" Comment="added 3 characters in body" Text="I'm trying to build a simple world editor and I would like to implement a camera similar to what's used in 3ds Max, Maya or even Unity.&#xD;&#xA;&#xD;&#xA;From what I can figure out from Unity, the panning behavior seems to be relatively simple : the camera is moving on the plane defined by the camera position and direction. However, rotation is more complex. Most of the time, the camera is looking at a fixed point on the xz plane and rotating around it. I'm not entirely sure how this point is determined and this is what I'm trying to find out. Also, I've noticed that, after a certain height, the camera fall back to a rotation-only control.&#xD;&#xA;&#xD;&#xA;Does anybody implemented something similar to this?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35409" PostHistoryTypeId="2" PostId="15570" RevisionGUID="e5a108b6-9409-4382-b3bb-e28f621d3e30" CreationDate="2011-08-04T18:11:01.543" UserId="5473" Text="When maintaining fullscreen across different resolutions, if you want pixel-perfection (i.e. &quot;As the artist produced it&quot;), then the problem is that there is no _fully_ automated way to scale sprites up OR down (or to rotate them) that doesn't require human approval. Ultimately that's because the placement of pixels is a subjective thing. The rendering algorithm performs some scaling, or rotation, and has to use some approximation techniques to do this, eg. bilinear filtering. If you still want hard edges on the pixels in order to have that &quot;pixel perfection&quot; (i.e. not using AA or BF), then you are going to have to accept that scaling by some non-power-of-2 degree is _going_ to produce some undesirable artifacting.&#xD;&#xA;&#xD;&#xA;An interesting approach to a similar problem is found in [RotSprite][1], an application/algorithm designed to perform &quot;automatic&quot; rotations of sprites. By that, I mean it produces a number of possibly desirable end results after intensive processing, for the human operator to pick from. The hand-picked sprites then end up going into the game, meaning this is a content creation step, and not a runtime one.&#xD;&#xA;&#xD;&#xA;One possible answer to your &quot;arbitrary magical dimension agnostic pixel&quot; question: OpenGL (which you may well be intending to use if you're going cross-platform) works in a totally different way from a software raster renderer. It considers the width and height of the display in floating-point range 0.0-&gt;1.0, and maps pixels accordingly on the GPU. Of course this can itself result in artifacting, unless eg. BF is turned on for textures (which is what your sprites are in OpenGL).&#xD;&#xA;&#xD;&#xA;  [1]: http://info.sonicretro.org/RotSprite" />
  <row Id="35410" PostHistoryTypeId="5" PostId="15567" RevisionGUID="2a1707b6-ebd8-418e-a0d4-88e1acbc672f" CreationDate="2011-08-04T18:15:09.607" UserId="5473" Comment="corrected a misnomer" Text="I think the first question you have to ask (perhaps clarify in your question) is: Are you managing only yourself? Or are you managing others?&#xD;&#xA;&#xD;&#xA;Because if you're only managing yourself, I would frame it as &quot;self-discipline&quot; and &quot;effective time management&quot; as opposed to what PM generally refers to, which is managing a group who are on the floor, getting the actual nitty gritty done.&#xD;&#xA;&#xD;&#xA;From my experience, being an &quot;individual indie&quot; means having a solid grip on where to dedicate your time to what, eg. production, support, networking, promotion, etc. And once you can effectively manage yourself, that's when you have something to offer (your indie business) as a manager of others.&#xD;&#xA;&#xD;&#xA;I guess what I'm saying is, everything comes with time. If you're not at the point where you have to worry about traditional PM skills yet, then don't. Focus on improving your ability as a creative, a developer, and a businessman." />
  <row Id="35411" PostHistoryTypeId="25" PostId="15558" RevisionGUID="c216d0f5-27b1-40c4-b91a-c65e302f354c" CreationDate="2011-08-04T18:36:43.890" Comment="http://twitter.com/#!/StackGameDev/status/99187023251914752" />
  <row Id="35412" PostHistoryTypeId="2" PostId="15571" RevisionGUID="14da052d-37f8-4718-8816-dff9f1b0060a" CreationDate="2011-08-04T19:06:58.777" UserId="5957" Text="I have a small project I've coded for Android that uses a small about of NDK/JNI code. I'd like to share this code between two projects but I'm having little luck so far. First off, I've tried to refactor off the NDK specific code into a library which I think link to both projects using &#xD;&#xA;&#xD;&#xA;'project-&gt;java build path-&gt;source-&gt;link source'&#xD;&#xA;&#xD;&#xA;and specifying the native library in there. Sounds good but it's wrong. The project from which I refactored the code still requires the .so library file in &#xD;&#xA;&#xD;&#xA;MyOriginalProject\libs\armeabi\MyNativeLibrary.so&#xD;&#xA;&#xD;&#xA;Removing that from the original project whilst still linking the source of the refactored library fails.&#xD;&#xA;&#xD;&#xA;Secondly, creating a new project and attempting to use the NDK library I wrote by both including the source of the library and copying over the .so files from 'obj' and 'libs' into the root directory of the new project fails. It seems to pass&#xD;&#xA;&#xD;&#xA;System.loadLibrary(&quot;MyNativeLibrary&quot;)&#xD;&#xA;&#xD;&#xA;At least, it didn't assert.&#xD;&#xA;&#xD;&#xA;The code gets as far as my first NDK call and then crashes without being caught by my exception handler.&#xD;&#xA;&#xD;&#xA;Any hints would be welcome - such as foolproof ways to get NDK to load a library, typical gotchas and NDK debugging techniques.&#xD;&#xA;&#xD;&#xA;Thanks in advance,&#xD;&#xA;&#xD;&#xA;Tim." />
  <row Id="35413" PostHistoryTypeId="1" PostId="15571" RevisionGUID="14da052d-37f8-4718-8816-dff9f1b0060a" CreationDate="2011-08-04T19:06:58.777" UserId="5957" Text="Android NDK - moving .so files from one project to another" />
  <row Id="35414" PostHistoryTypeId="3" PostId="15571" RevisionGUID="14da052d-37f8-4718-8816-dff9f1b0060a" CreationDate="2011-08-04T19:06:58.777" UserId="5957" Text="&lt;java&gt;&lt;android&gt;&lt;ndk&gt;&lt;jni&gt;&lt;eclipse&gt;" />
  <row Id="35415" PostHistoryTypeId="2" PostId="15572" RevisionGUID="f6278287-887f-45ee-a6a2-27cbe4aee82d" CreationDate="2011-08-04T19:45:55.873" UserId="5060" Text="It seems to me that how the point is determined is really up to you. You could set the initial point to be the centre of your world and then set your camera up with an appropriate angle and distance looking at that point.&#xD;&#xA;&#xD;&#xA; - Panning would move the camera AND the point.&#xD;&#xA; - Rotating, as you said, would rotate the camera around it.&#xD;&#xA; - Zooming would move the camera closer to the point along the &quot;target&quot; vector of the camera to the point.&#xD;&#xA;&#xD;&#xA;Doing it this way allows you to focus and rotate around a specific object within the world. &#xD;&#xA;&#xD;&#xA;Some other options:&#xD;&#xA; - Display the point so the user knows what they're rotating around/looking at&#xD;&#xA; - Tether it to the ground of the world (if applicable/possible)&#xD;&#xA;&#xD;&#xA;You seem to understand how the other tools work with the exception of figuring out the point. So, I would say just implement the point in a way that makes sense and works for your world editor." />
  <row Id="35416" PostHistoryTypeId="2" PostId="15573" RevisionGUID="6f3b05a4-61c9-4385-8c4e-a8bf5de50e7c" CreationDate="2011-08-04T19:47:55.113" UserId="5573" Text="    1. What are the main differences between all these three?&#xD;&#xA;    2. Can you form a &quot;smooth&quot; terrain with Voxels, I mean, can you for example get a smooth mountain with Voxels, or Voxels are limited to cubes?&#xD;&#xA;    3. Performance wise, a world 2000x2000 units, what would be faster Heightmap terrain, Voxel terrain or Polygon based, geometry terrain? (Assuming that there is &quot;reasonable&quot; performance gains/optimization done for rendering)&#xD;&#xA;    4. Are there any more techniques used for terrain creation?&#xD;&#xA;    5. Any good titles representing each of types?&#xD;&#xA;&#xD;&#xA;P.S. Polygon based terrain should be fully traingulated, no squareish stuff.&#xD;&#xA;&#xD;&#xA;Thanks in advance!" />
  <row Id="35417" PostHistoryTypeId="1" PostId="15573" RevisionGUID="6f3b05a4-61c9-4385-8c4e-a8bf5de50e7c" CreationDate="2011-08-04T19:47:55.113" UserId="5573" Text="Heightmap, Voxel, Polygon (geometry) terrains" />
  <row Id="35418" PostHistoryTypeId="3" PostId="15573" RevisionGUID="6f3b05a4-61c9-4385-8c4e-a8bf5de50e7c" CreationDate="2011-08-04T19:47:55.113" UserId="5573" Text="&lt;level-design&gt;&lt;terrain-rendering&gt;&lt;terrain&gt;" />
  <row Id="35419" PostHistoryTypeId="5" PostId="15573" RevisionGUID="bd93ed4d-db8e-4e7e-a5a9-0c2f031542dd" CreationDate="2011-08-04T19:59:01.187" UserId="5060" Comment="Formatted it a bit better" Text="In relation to Heightmap, Voxel and Polygon (geometry) terrains:&#xD;&#xA;&#xD;&#xA;  1. What are the main differences between all these three?&#xD;&#xA;  2. Can you form a &quot;smooth&quot; terrain with Voxels, I mean, can you for example get a smooth mountain with Voxels, or Voxels are limited to cubes?&#xD;&#xA;  3. Performance wise, a world 2000x2000 units, what would be faster Heightmap terrain, Voxel terrain or Polygon based, geometry terrain? (Assuming that there is &quot;reasonable&quot; performance gains/optimization done for rendering)&#xD;&#xA;  4. Are there any more techniques used for terrain creation?&#xD;&#xA;  5. Any good titles representing each of types?&#xD;&#xA;&#xD;&#xA;P.S. Polygon based terrain should be fully traingulated, no squareish stuff." />
  <row Id="35420" PostHistoryTypeId="24" PostId="15573" RevisionGUID="bd93ed4d-db8e-4e7e-a5a9-0c2f031542dd" CreationDate="2011-08-04T19:59:01.187" Comment="Proposed by 5060 approved by 51 edit id of 597" />
  <row Id="35421" PostHistoryTypeId="5" PostId="15572" RevisionGUID="b2e79cdb-22f7-4d66-adc3-6100d22d2202" CreationDate="2011-08-04T20:10:30.207" UserId="5060" Comment="Fixed formatting" Text="It seems to me that how the point is determined is really up to you. You could set the initial point to be the centre of your world and then set your camera up with an appropriate angle and distance looking at that point.&#xD;&#xA;&#xD;&#xA; - Panning would move the camera AND the point.&#xD;&#xA; - Rotating, as you said, would rotate the camera around it.&#xD;&#xA; - Zooming would move the camera closer to the point along the &quot;target&quot; vector of the camera to the point.&#xD;&#xA;&#xD;&#xA;Doing it this way allows you to focus and rotate around a specific object within the world. &#xD;&#xA;&#xD;&#xA;Some other options:&#xD;&#xA;&#xD;&#xA; - Display the point so the user knows what they're rotating around/looking at&#xD;&#xA; - Tether it to the ground of the world (if applicable/possible)&#xD;&#xA;&#xD;&#xA;You seem to understand how the other tools work with the exception of figuring out the point. So, I would say just implement the point in a way that makes sense and works for your world editor." />
  <row Id="35422" PostHistoryTypeId="2" PostId="15574" RevisionGUID="3264a790-77b9-464c-9911-a9d823db4138" CreationDate="2011-08-04T20:15:18.863" UserId="6867" Text="I am looking for a function to generate a random tile-based map as the visual boundaries of the map change (by going through the map). I want the map to be infinitely large, and have maze-like structure.&#xD;&#xA;&#xD;&#xA;However, if the world is infinite, going back to where a player has already been before raises a problem. The game must remember how everything back there actually looked like.&#xD;&#xA;&#xD;&#xA;So, I was thinking - &quot;How does Minecraft solve this issue?&quot; and I thought to myself that they must be using some kind of random-number function with a seed, that can both go forward but also backwards, and in that way, re-generate old tiles exactly as they were, but in new instances.&#xD;&#xA;&#xD;&#xA;What are your thoughts on this?" />
  <row Id="35423" PostHistoryTypeId="1" PostId="15574" RevisionGUID="3264a790-77b9-464c-9911-a9d823db4138" CreationDate="2011-08-04T20:15:18.863" UserId="6867" Text="Random seed function for map generation?" />
  <row Id="35424" PostHistoryTypeId="3" PostId="15574" RevisionGUID="3264a790-77b9-464c-9911-a9d823db4138" CreationDate="2011-08-04T20:15:18.863" UserId="6867" Text="&lt;tiles&gt;&lt;random&gt;&lt;minecraft&gt;&lt;tilemap&gt;" />
  <row Id="35425" PostHistoryTypeId="2" PostId="15575" RevisionGUID="aaa53f50-b36a-4d20-8dd7-8e7fed2dfb49" CreationDate="2011-08-04T20:37:34.910" UserId="9057" Text="I'm programming a Bomberman in Java (my first game) and I'm having problems with the player's sprites and position in the map. I'm using a 2D integer array to represent:&#xD;&#xA;&#xD;&#xA;+ Unbreakable blocks&#xD;&#xA;+ Explodable brick walls&#xD;&#xA;+ Free spaces&#xD;&#xA;+ Player itself (not sure if this is correct)&#xD;&#xA;&#xD;&#xA;By now I could correctly place every background tile (40*40 each) iterating the array. Bomberman's sprites are MAX 40*40 (sometimes a little smaller). My question is, how can I correctly handle the collisions with walls? I already tried to do it, but that solution was very horribly buggy.&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="35426" PostHistoryTypeId="1" PostId="15575" RevisionGUID="aaa53f50-b36a-4d20-8dd7-8e7fed2dfb49" CreationDate="2011-08-04T20:37:34.910" UserId="9057" Text="How to coordinate sprites, player's position and collisions in a Bomberman-like 2D game?" />
  <row Id="35427" PostHistoryTypeId="3" PostId="15575" RevisionGUID="aaa53f50-b36a-4d20-8dd7-8e7fed2dfb49" CreationDate="2011-08-04T20:37:34.910" UserId="9057" Text="&lt;game-design&gt;&lt;2d&gt;&lt;java&gt;&lt;collision-detection&gt;&lt;sprites&gt;" />
  <row Id="35428" PostHistoryTypeId="2" PostId="15576" RevisionGUID="17d8a8bf-0193-401c-a84d-0e08b2eadeb4" CreationDate="2011-08-04T20:38:24.413" UserId="7888" Text="The way Minecraft controls its generation is by creating a level seed which is used to seed all the random number generation for the game. If a chunk doesn't exist on disk when it is requested, it will be generated using Notch's [generation function][1] based on the level's seed; it's then [saved to disk][2] for later. &#xD;&#xA;&#xD;&#xA;It sounds like you're looking to achieve similar behaviour, so that's a safe way to go.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1&#xD;&#xA;  [2]: http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/" />
  <row Id="35429" PostHistoryTypeId="2" PostId="15577" RevisionGUID="1b81632d-bd39-452f-94bf-0299940b0196" CreationDate="2011-08-04T20:41:59.087" UserId="744" Text="What you've noticed is the difference between a &lt;a href=&quot;http://en.wikipedia.org/wiki/Random_number_generator&quot;&gt;random number generator&lt;/a&gt; and a &lt;a href=&quot;http://www.noisemachine.com/talk1/&quot;&gt;noise function&lt;/a&gt;. A random number generator spits out a different number each time you call it. A noise function takes some arguments - say, a map x and y - and spits out numbers with _random-like statistical properties_, but _the same value for the same arguments every time_, i.e. it is a proper mathematical function.&#xD;&#xA;&#xD;&#xA;The two are very closely related. A noise function can simulate a random number generator, by passing in a different value each time - e.g. `noise(1)`, `noise(2)`, and so on. And a random number generator, dumped into a giant table, can act as a noise function. In both cases though, you're using the wrong tool for the job.&#xD;&#xA;&#xD;&#xA;Minecraft in particular uses &lt;a href=&quot;http://en.wikipedia.org/wiki/Perlin_noise&quot;&gt;Perlin noise&lt;/a&gt;, a type of noise which is cheap to compute, and has a desirable property of being _continuous_ in as many dimensions as you need - if you graph `f(x)` to `f(x + 1)`, there won't be any sudden jumps. This makes it very useful for many things like texture modulation, volumetric clouds and gases, and terrain generation.&#xD;&#xA;&#xD;&#xA;If you are looking for an implementation to start playing with, &lt;a href=&quot;http://mrl.nyu.edu/~perlin/noise/&quot;&gt;Ken Perlin's improved Perlin noise generator&lt;/a&gt; is one of the simplest implementations." />
  <row Id="35430" PostHistoryTypeId="2" PostId="15578" RevisionGUID="35623479-3a59-4012-ab7b-d7d3b123e7b5" CreationDate="2011-08-04T20:58:58.340" UserId="1386" Text="I recognise that you've probably got the gist from other answers, but it was a fun question and I felt like doing a little Python coding. This is my object-oriented approach. Indentation defines scope.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Graph Representation&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;The graph can easily be stored as a key, value map where the key is the room id, and the value is an array of the rooms it leads to.&#xD;&#xA;&#xD;&#xA;    map = {&#xD;&#xA;    1:[5, 2],&#xD;&#xA;    2:[1, 3, 5],&#xD;&#xA;    3:[2, 4],&#xD;&#xA;    4:[3, 5, 6],&#xD;&#xA;    5:[2, 4, 1],&#xD;&#xA;    6:[4]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Agent Interface&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;First we should think about what information the agent should be able to learn from the environment, and the operations it should be able to perform. This will simplify thinking about the algorithm.&#xD;&#xA;&#xD;&#xA;In this case the agent should be able to query the environment for the id of the room it is in, it should be able to get a count of the doors in a particular room (*note this is not the id's of the rooms the doors lead to!*) and he should be able to move through a door by specifying a door index. Anything else an agent knows has to be figured out by the agent itself.&#xD;&#xA;&#xD;&#xA;    class AgentInterface(object):&#xD;&#xA;    	def __init__(self, map, starting_room):&#xD;&#xA;    		self.map = map&#xD;&#xA;    		self.current_room = starting_room&#xD;&#xA;    		&#xD;&#xA;    	def get_door_count(self):&#xD;&#xA;    		return len(self.map[self.current_room])&#xD;&#xA;    	&#xD;&#xA;    	def go_through_door(self, door):&#xD;&#xA;    		result = self.current_room = self.map[self.current_room][door]&#xD;&#xA;    		return result&#xD;&#xA;&#xD;&#xA;Agent Knowledge&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When the agent first enters the map it only knows the amount of doors in the room, and the id of the room it's currently in. I needed to create a structure that would store information the agent had learned such as which doors it had not been through, and where the doors lead to that is had been through.&#xD;&#xA;&#xD;&#xA;This class represents the information about a single room. I chose to store the unvisited doors as a set. And the visited doors as map, where the key is the door id and the value is the id of the room it leads to.&#xD;&#xA;&#xD;&#xA;    class RoomKnowledge(object):&#xD;&#xA;    	def __init__(self, unvisited_door_count):&#xD;&#xA;    		self.unvisited_doors = set(range(unvisited_door_count))&#xD;&#xA;    		self.visited_doors = {}&#xD;&#xA;&#xD;&#xA;Agent algorithm&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Each time the agent enters a room it searches its knowledge map for information on the room. If there are no entries for this room in the map then it creates a new RoomKnowledge and adds this to it's knowledge map.&#xD;&#xA;&#xD;&#xA;It checks to see if the current room is the target room, if so then it returns.&#xD;&#xA;&#xD;&#xA;If there are doors in this room we haven't visited, we go through the door and store where it lead to. We then continue the loop. &#xD;&#xA;&#xD;&#xA;If there weren't any unvisited doors, we backtrack through the rooms we have visited to find one with unvisited doors.&#xD;&#xA;&#xD;&#xA;    class Agent(AgentInterface):&#xD;&#xA;    		&#xD;&#xA;    	def find_exit(self, exit_room_id):&#xD;&#xA;    		knowledge = { }&#xD;&#xA;    		room_history = [] # For display purposes only&#xD;&#xA;    		history_stack = [] # Used when we need to backtrack if we've visited all the doors in the room&#xD;&#xA;    		while True:&#xD;&#xA;    			room_knowledge = knowledge.setdefault(self.current_room, RoomKnowledge(self.get_door_count()))&#xD;&#xA;    			room_history.append(self.current_room)&#xD;&#xA;    			&#xD;&#xA;    			if self.current_room==exit_room_id:&#xD;&#xA;    				return room_history&#xD;&#xA;    			&#xD;&#xA;    			if len(room_knowledge.unvisited_doors)==0:&#xD;&#xA;    				# I have destination room id. I need door id:&#xD;&#xA;    				door = find_key(room_knowledge.visited_doors, history_stack.pop())&#xD;&#xA;    				self.go_through_door(door)&#xD;&#xA;    			else:	&#xD;&#xA;    				history_stack.append(self.current_room)&#xD;&#xA;    				# Enter the first unopened door:&#xD;&#xA;    				opened_door = room_knowledge.unvisited_doors.pop()&#xD;&#xA;    				room_knowledge.visited_doors[opened_door]=self.go_through_door(opened_door)&#xD;&#xA;&#xD;&#xA;Supporting functions&#xD;&#xA;---&#xD;&#xA;I had to write a little function the would find a key in a dictionary given a value, since when backtracking we know the id of the room we are trying to get to, but not which door to use to get to it.&#xD;&#xA;&#xD;&#xA;    def find_key(dictionary, value):&#xD;&#xA;    	for key in dictionary:&#xD;&#xA;    		if dictionary[key]==value:&#xD;&#xA;    			return key&#xD;&#xA;&#xD;&#xA;Testing&#xD;&#xA;---&#xD;&#xA;I tested all combinations of start/end position in the map given above. For each combination it prints out the visited rooms.&#xD;&#xA;&#xD;&#xA;    for start in range(1, 7):&#xD;&#xA;    	for exit in range(1, 7):&#xD;&#xA;    		print(&quot;start room: %d target room: %d&quot;%(start,exit))&#xD;&#xA;    		james_bond = Agent(map, start)&#xD;&#xA;    		print(james_bond.find_exit(exit))&#xD;&#xA;&#xD;&#xA;Notes&#xD;&#xA;---&#xD;&#xA;The backtracking isn't very efficient - in the worst case scenario it could go through every room to get to an adjacent room, but backtracking is fairly rare - in the above tests it only backtracks three times. Any comments on my Python appreciated :)" />
  <row Id="35431" PostHistoryTypeId="2" PostId="15579" RevisionGUID="ff011d5d-5352-4fc0-b2de-5330ea9b597a" CreationDate="2011-08-04T21:02:14.200" UserId="7881" Text="As Joe pointed out, you're looking for a hash function. Generally, random functions are just hash functions seeded with the last returned number. So if `Random()` returned `Hash(seed)=1234`, a second call `Random()` would return `Hash(1234)`, at so on.&#xD;&#xA;&#xD;&#xA;If you're looking for a simple hashing function for pseudo random numbers, check out [MurMurHash][1]. I've implemented it in C# and can post it somewhere if you're interested. More detailed information of Perlin Noise, which uses such a hash function, can be found at [here][2], and an implementation of it in C# is [here][3].&#xD;&#xA;&#xD;&#xA;All of this information came from a question I asked a year ago [here][4] on Stack Overflow. What you're looking into is called procedural content generation, so if you need more information, do a search for that. Happy terrain-generating!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/murmurhash/&#xD;&#xA;  [2]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;  [3]: http://www.gutgames.com/post/Perlin-Noise.aspx&#xD;&#xA;  [4]: http://stackoverflow.com/questions/3134759/how-can-i-best-generate-a-static-array-of-random-number-on-demand" />
  <row Id="35432" PostHistoryTypeId="5" PostId="15578" RevisionGUID="198b15df-1d57-422f-8f9c-2f043a44ceac" CreationDate="2011-08-04T21:04:39.707" UserId="1386" Comment="added 63 characters in body, I was using two meanings of the word map, so I replaced some with dictionary." Text="I recognise that you've probably got the gist from other answers, but it was a fun question and I felt like doing a little Python coding. This is my object-oriented approach. Indentation defines scope.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Graph Representation&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;The graph can easily be stored as a key, value dictionary where the key is the room id, and the value is an array of the rooms it leads to.&#xD;&#xA;&#xD;&#xA;    map = {&#xD;&#xA;    1:[5, 2],&#xD;&#xA;    2:[1, 3, 5],&#xD;&#xA;    3:[2, 4],&#xD;&#xA;    4:[3, 5, 6],&#xD;&#xA;    5:[2, 4, 1],&#xD;&#xA;    6:[4]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Agent Interface&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;First we should think about what information the agent should be able to learn from the environment, and the operations it should be able to perform. This will simplify thinking about the algorithm.&#xD;&#xA;&#xD;&#xA;In this case the agent should be able to query the environment for the id of the room it is in, it should be able to get a count of the doors in a particular room (*note this is not the id's of the rooms the doors lead to!*) and he should be able to move through a door by specifying a door index. Anything else an agent knows has to be figured out by the agent itself.&#xD;&#xA;&#xD;&#xA;    class AgentInterface(object):&#xD;&#xA;    	def __init__(self, map, starting_room):&#xD;&#xA;    		self.map = map&#xD;&#xA;    		self.current_room = starting_room&#xD;&#xA;    		&#xD;&#xA;    	def get_door_count(self):&#xD;&#xA;    		return len(self.map[self.current_room])&#xD;&#xA;    	&#xD;&#xA;    	def go_through_door(self, door):&#xD;&#xA;    		result = self.current_room = self.map[self.current_room][door]&#xD;&#xA;    		return result&#xD;&#xA;&#xD;&#xA;Agent Knowledge&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When the agent first enters the map it only knows the amount of doors in the room, and the id of the room it's currently in. I needed to create a structure that would store information the agent had learned such as which doors it had not been through, and where the doors lead to that is had been through.&#xD;&#xA;&#xD;&#xA;This class represents the information about a single room. I chose to store the unvisited doors as a `set` and the visited doors as a `dictionary`, where the key is the door id and the value is the id of the room it leads to.&#xD;&#xA;&#xD;&#xA;    class RoomKnowledge(object):&#xD;&#xA;    	def __init__(self, unvisited_door_count):&#xD;&#xA;    		self.unvisited_doors = set(range(unvisited_door_count))&#xD;&#xA;    		self.visited_doors = {}&#xD;&#xA;&#xD;&#xA;Agent algorithm&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Each time the agent enters a room it searches its knowledge dictionary for information on the room. If there are no entries for this room then it creates a new RoomKnowledge and adds this to it's knowledge dictionary.&#xD;&#xA;&#xD;&#xA;It checks to see if the current room is the target room, if so then it returns.&#xD;&#xA;&#xD;&#xA;If there are doors in this room we haven't visited, we go through the door and store where it lead to. We then continue the loop. &#xD;&#xA;&#xD;&#xA;If there weren't any unvisited doors, we backtrack through the rooms we have visited to find one with unvisited doors.&#xD;&#xA;&#xD;&#xA;The `Agent` class inherits from the `AgentInterface` class.&#xD;&#xA;&#xD;&#xA;    class Agent(AgentInterface):&#xD;&#xA;    		&#xD;&#xA;    	def find_exit(self, exit_room_id):&#xD;&#xA;    		knowledge = { }&#xD;&#xA;    		room_history = [] # For display purposes only&#xD;&#xA;    		history_stack = [] # Used when we need to backtrack if we've visited all the doors in the room&#xD;&#xA;    		while True:&#xD;&#xA;    			room_knowledge = knowledge.setdefault(self.current_room, RoomKnowledge(self.get_door_count()))&#xD;&#xA;    			room_history.append(self.current_room)&#xD;&#xA;    			&#xD;&#xA;    			if self.current_room==exit_room_id:&#xD;&#xA;    				return room_history&#xD;&#xA;    			&#xD;&#xA;    			if len(room_knowledge.unvisited_doors)==0:&#xD;&#xA;    				# I have destination room id. I need door id:&#xD;&#xA;    				door = find_key(room_knowledge.visited_doors, history_stack.pop())&#xD;&#xA;    				self.go_through_door(door)&#xD;&#xA;    			else:	&#xD;&#xA;    				history_stack.append(self.current_room)&#xD;&#xA;    				# Enter the first unopened door:&#xD;&#xA;    				opened_door = room_knowledge.unvisited_doors.pop()&#xD;&#xA;    				room_knowledge.visited_doors[opened_door]=self.go_through_door(opened_door)&#xD;&#xA;&#xD;&#xA;Supporting functions&#xD;&#xA;---&#xD;&#xA;I had to write a little function the would find a key in a dictionary given a value, since when backtracking we know the id of the room we are trying to get to, but not which door to use to get to it.&#xD;&#xA;&#xD;&#xA;    def find_key(dictionary, value):&#xD;&#xA;    	for key in dictionary:&#xD;&#xA;    		if dictionary[key]==value:&#xD;&#xA;    			return key&#xD;&#xA;&#xD;&#xA;Testing&#xD;&#xA;---&#xD;&#xA;I tested all combinations of start/end position in the map given above. For each combination it prints out the visited rooms.&#xD;&#xA;&#xD;&#xA;    for start in range(1, 7):&#xD;&#xA;    	for exit in range(1, 7):&#xD;&#xA;    		print(&quot;start room: %d target room: %d&quot;%(start,exit))&#xD;&#xA;    		james_bond = Agent(map, start)&#xD;&#xA;    		print(james_bond.find_exit(exit))&#xD;&#xA;&#xD;&#xA;Notes&#xD;&#xA;---&#xD;&#xA;The backtracking isn't very efficient - in the worst case scenario it could go through every room to get to an adjacent room, but backtracking is fairly rare - in the above tests it only backtracks three times. Any comments on my Python appreciated :)" />
  <row Id="35433" PostHistoryTypeId="5" PostId="15578" RevisionGUID="765228fd-2600-4973-a07e-a1207c141f29" CreationDate="2011-08-04T21:10:15.800" UserId="1386" Comment="added 63 characters in body, I was using two meanings of the word map, so I replaced some with dictionary." Text="I recognise that you've probably got the gist from other answers, but it was a fun question and I felt like doing a little Python coding. This is my object-oriented approach. Indentation defines scope.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Graph Representation&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;The graph can easily be stored as a key, value dictionary where the key is the room id, and the value is an array of the rooms it leads to.&#xD;&#xA;&#xD;&#xA;    map = {&#xD;&#xA;    1:[5, 2],&#xD;&#xA;    2:[1, 3, 5],&#xD;&#xA;    3:[2, 4],&#xD;&#xA;    4:[3, 5, 6],&#xD;&#xA;    5:[2, 4, 1],&#xD;&#xA;    6:[4]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Agent Interface&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;First we should think about what information the agent should be able to learn from the environment, and the operations it should be able to perform. This will simplify thinking about the algorithm.&#xD;&#xA;&#xD;&#xA;In this case the agent should be able to query the environment for the id of the room it is in, it should be able to get a count of the doors **in the room it is in** (*note this is not the id's of the rooms the doors lead to!*) and he should be able to move through a door by specifying a door index. Anything else an agent knows has to be figured out by the agent itself.&#xD;&#xA;&#xD;&#xA;    class AgentInterface(object):&#xD;&#xA;    	def __init__(self, map, starting_room):&#xD;&#xA;    		self.map = map&#xD;&#xA;    		self.current_room = starting_room&#xD;&#xA;    		&#xD;&#xA;    	def get_door_count(self):&#xD;&#xA;    		return len(self.map[self.current_room])&#xD;&#xA;    	&#xD;&#xA;    	def go_through_door(self, door):&#xD;&#xA;    		result = self.current_room = self.map[self.current_room][door]&#xD;&#xA;    		return result&#xD;&#xA;&#xD;&#xA;Agent Knowledge&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When the agent first enters the map it only knows the amount of doors in the room, and the id of the room it's currently in. I needed to create a structure that would store information the agent had learned such as which doors it had not been through, and where the doors lead to that is had been through.&#xD;&#xA;&#xD;&#xA;This class represents the information about a single room. I chose to store the unvisited doors as a `set` and the visited doors as a `dictionary`, where the key is the door id and the value is the id of the room it leads to.&#xD;&#xA;&#xD;&#xA;    class RoomKnowledge(object):&#xD;&#xA;    	def __init__(self, unvisited_door_count):&#xD;&#xA;    		self.unvisited_doors = set(range(unvisited_door_count))&#xD;&#xA;    		self.visited_doors = {}&#xD;&#xA;&#xD;&#xA;Agent algorithm&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;Each time the agent enters a room it searches its knowledge dictionary for information on the room. If there are no entries for this room then it creates a new RoomKnowledge and adds this to it's knowledge dictionary.&#xD;&#xA;&#xD;&#xA;It checks to see if the current room is the target room, if so then it returns.&#xD;&#xA;&#xD;&#xA;If there are doors in this room we haven't visited, we go through the door and store where it lead to. We then continue the loop. &#xD;&#xA;&#xD;&#xA;If there weren't any unvisited doors, we backtrack through the rooms we have visited to find one with unvisited doors.&#xD;&#xA;&#xD;&#xA;The `Agent` class inherits from the `AgentInterface` class.&#xD;&#xA;&#xD;&#xA;    class Agent(AgentInterface):&#xD;&#xA;    		&#xD;&#xA;    	def find_exit(self, exit_room_id):&#xD;&#xA;    		knowledge = { }&#xD;&#xA;    		room_history = [] # For display purposes only&#xD;&#xA;    		history_stack = [] # Used when we need to backtrack if we've visited all the doors in the room&#xD;&#xA;    		while True:&#xD;&#xA;    			room_knowledge = knowledge.setdefault(self.current_room, RoomKnowledge(self.get_door_count()))&#xD;&#xA;    			room_history.append(self.current_room)&#xD;&#xA;    			&#xD;&#xA;    			if self.current_room==exit_room_id:&#xD;&#xA;    				return room_history&#xD;&#xA;    			&#xD;&#xA;    			if len(room_knowledge.unvisited_doors)==0:&#xD;&#xA;    				# I have destination room id. I need door id:&#xD;&#xA;    				door = find_key(room_knowledge.visited_doors, history_stack.pop())&#xD;&#xA;    				self.go_through_door(door)&#xD;&#xA;    			else:	&#xD;&#xA;    				history_stack.append(self.current_room)&#xD;&#xA;    				# Enter the first unopened door:&#xD;&#xA;    				opened_door = room_knowledge.unvisited_doors.pop()&#xD;&#xA;    				room_knowledge.visited_doors[opened_door]=self.go_through_door(opened_door)&#xD;&#xA;&#xD;&#xA;Supporting functions&#xD;&#xA;---&#xD;&#xA;I had to write a little function the would find a key in a dictionary given a value, since when backtracking we know the id of the room we are trying to get to, but not which door to use to get to it.&#xD;&#xA;&#xD;&#xA;    def find_key(dictionary, value):&#xD;&#xA;    	for key in dictionary:&#xD;&#xA;    		if dictionary[key]==value:&#xD;&#xA;    			return key&#xD;&#xA;&#xD;&#xA;Testing&#xD;&#xA;---&#xD;&#xA;I tested all combinations of start/end position in the map given above. For each combination it prints out the visited rooms.&#xD;&#xA;&#xD;&#xA;    for start in range(1, 7):&#xD;&#xA;    	for exit in range(1, 7):&#xD;&#xA;    		print(&quot;start room: %d target room: %d&quot;%(start,exit))&#xD;&#xA;    		james_bond = Agent(map, start)&#xD;&#xA;    		print(james_bond.find_exit(exit))&#xD;&#xA;&#xD;&#xA;Notes&#xD;&#xA;---&#xD;&#xA;The backtracking isn't very efficient - in the worst case scenario it could go through every room to get to an adjacent room, but backtracking is fairly rare - in the above tests it only backtracks three times. Any comments on my Python appreciated :)" />
  <row Id="35434" PostHistoryTypeId="5" PostId="15578" RevisionGUID="b2193812-e7e4-4fe8-9b35-1c35bb1e3157" CreationDate="2011-08-04T21:18:00.927" UserId="1386" Comment="changed algorithm description to list." Text="I recognise that you've probably got the gist from other answers, but it was a fun question and I felt like doing a little Python coding. This is my object-oriented approach. Indentation defines scope.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Graph Representation&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;The graph can easily be stored as a key, value dictionary where the key is the room id, and the value is an array of the rooms it leads to.&#xD;&#xA;&#xD;&#xA;    map = {&#xD;&#xA;    1:[5, 2],&#xD;&#xA;    2:[1, 3, 5],&#xD;&#xA;    3:[2, 4],&#xD;&#xA;    4:[3, 5, 6],&#xD;&#xA;    5:[2, 4, 1],&#xD;&#xA;    6:[4]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Agent Interface&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;First we should think about what information the agent should be able to learn from the environment, and the operations it should be able to perform. This will simplify thinking about the algorithm.&#xD;&#xA;&#xD;&#xA;In this case the agent should be able to query the environment for the id of the room it is in, it should be able to get a count of the doors **in the room it is in** (*note this is not the id's of the rooms the doors lead to!*) and he should be able to move through a door by specifying a door index. Anything else an agent knows has to be figured out by the agent itself.&#xD;&#xA;&#xD;&#xA;    class AgentInterface(object):&#xD;&#xA;    	def __init__(self, map, starting_room):&#xD;&#xA;    		self.map = map&#xD;&#xA;    		self.current_room = starting_room&#xD;&#xA;    		&#xD;&#xA;    	def get_door_count(self):&#xD;&#xA;    		return len(self.map[self.current_room])&#xD;&#xA;    	&#xD;&#xA;    	def go_through_door(self, door):&#xD;&#xA;    		result = self.current_room = self.map[self.current_room][door]&#xD;&#xA;    		return result&#xD;&#xA;&#xD;&#xA;Agent Knowledge&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When the agent first enters the map it only knows the amount of doors in the room, and the id of the room it's currently in. I needed to create a structure that would store information the agent had learned such as which doors it had not been through, and where the doors lead to that is had been through.&#xD;&#xA;&#xD;&#xA;This class represents the information about a single room. I chose to store the unvisited doors as a `set` and the visited doors as a `dictionary`, where the key is the door id and the value is the id of the room it leads to.&#xD;&#xA;&#xD;&#xA;    class RoomKnowledge(object):&#xD;&#xA;    	def __init__(self, unvisited_door_count):&#xD;&#xA;    		self.unvisited_doors = set(range(unvisited_door_count))&#xD;&#xA;    		self.visited_doors = {}&#xD;&#xA;&#xD;&#xA;Agent algorithm&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA; - Each time the agent enters a room it searches its knowledge&#xD;&#xA;   dictionary for information on the room. If there are no entries for&#xD;&#xA;   this room then it creates a new `RoomKnowledge` and adds this to it's&#xD;&#xA;   knowledge dictionary.&#xD;&#xA;   &#xD;&#xA; - It checks to see if the current room is the target room, if so then&#xD;&#xA;   it returns.&#xD;&#xA;   &#xD;&#xA; - If there are doors in this room we haven't visited, we go through the&#xD;&#xA;   door and store where it lead to. We then continue the loop. &#xD;&#xA;   &#xD;&#xA; - If there weren't any unvisited doors, we backtrack through the rooms&#xD;&#xA;   we have visited to find one with unvisited doors.&#xD;&#xA;&#xD;&#xA;The `Agent` class inherits from the `AgentInterface` class.&#xD;&#xA;&#xD;&#xA;    class Agent(AgentInterface):&#xD;&#xA;    		&#xD;&#xA;    	def find_exit(self, exit_room_id):&#xD;&#xA;    		knowledge = { }&#xD;&#xA;    		room_history = [] # For display purposes only&#xD;&#xA;    		history_stack = [] # Used when we need to backtrack if we've visited all the doors in the room&#xD;&#xA;    		while True:&#xD;&#xA;    			room_knowledge = knowledge.setdefault(self.current_room, RoomKnowledge(self.get_door_count()))&#xD;&#xA;    			room_history.append(self.current_room)&#xD;&#xA;    			&#xD;&#xA;    			if self.current_room==exit_room_id:&#xD;&#xA;    				return room_history&#xD;&#xA;    			&#xD;&#xA;    			if len(room_knowledge.unvisited_doors)==0:&#xD;&#xA;    				# I have destination room id. I need door id:&#xD;&#xA;    				door = find_key(room_knowledge.visited_doors, history_stack.pop())&#xD;&#xA;    				self.go_through_door(door)&#xD;&#xA;    			else:	&#xD;&#xA;    				history_stack.append(self.current_room)&#xD;&#xA;    				# Enter the first unopened door:&#xD;&#xA;    				opened_door = room_knowledge.unvisited_doors.pop()&#xD;&#xA;    				room_knowledge.visited_doors[opened_door]=self.go_through_door(opened_door)&#xD;&#xA;&#xD;&#xA;Supporting functions&#xD;&#xA;---&#xD;&#xA;I had to write a little function the would find a key in a dictionary given a value, since when backtracking we know the id of the room we are trying to get to, but not which door to use to get to it.&#xD;&#xA;&#xD;&#xA;    def find_key(dictionary, value):&#xD;&#xA;    	for key in dictionary:&#xD;&#xA;    		if dictionary[key]==value:&#xD;&#xA;    			return key&#xD;&#xA;&#xD;&#xA;Testing&#xD;&#xA;---&#xD;&#xA;I tested all combinations of start/end position in the map given above. For each combination it prints out the visited rooms.&#xD;&#xA;&#xD;&#xA;    for start in range(1, 7):&#xD;&#xA;    	for exit in range(1, 7):&#xD;&#xA;    		print(&quot;start room: %d target room: %d&quot;%(start,exit))&#xD;&#xA;    		james_bond = Agent(map, start)&#xD;&#xA;    		print(james_bond.find_exit(exit))&#xD;&#xA;&#xD;&#xA;Notes&#xD;&#xA;---&#xD;&#xA;The backtracking isn't very efficient - in the worst case scenario it could go through every room to get to an adjacent room, but backtracking is fairly rare - in the above tests it only backtracks three times. I've avoided putting exception handling in to keep the code concise. Any comments on my Python appreciated :)" />
  <row Id="35435" PostHistoryTypeId="5" PostId="15573" RevisionGUID="2324d27f-311d-4732-a0c5-e3a1dce9db0a" CreationDate="2011-08-04T21:19:08.963" UserId="5573" Comment="added 27 characters in body" Text="In relation to Heightmap, Voxel and Polygon (geometry) terrains:&#xD;&#xA;&#xD;&#xA;  1. What are the main differences between all these three?&#xD;&#xA;  2. Can you form a &quot;smooth&quot; terrain with Voxels, I mean, can you for example get a smooth mountain with Voxels, or Voxels are limited to cubes?&#xD;&#xA;  3. Performance wise, a world 2000x2000 units, what would be faster Heightmap terrain, Voxel terrain or Polygon based, geometry terrain? (Assuming that there is &quot;reasonable&quot; performance gains/optimization done for rendering for every of possibilities)&#xD;&#xA;  4. Are there any more techniques used for terrain creation?&#xD;&#xA;  5. Any good titles representing each of types?&#xD;&#xA;&#xD;&#xA;P.S. Polygon based terrain should be fully traingulated, no squareish stuff." />
  <row Id="35436" PostHistoryTypeId="2" PostId="15580" RevisionGUID="c528a520-4bb0-4ce8-a6bd-a404ac5c334e" CreationDate="2011-08-04T21:27:40.857" UserId="1386" Text="I'd store the positions of items as integers as you are doing now in a array.&#xD;&#xA;Testing for a collision with a wall could be as simple as testing the map array for the wall piece, for example:&#xD;&#xA;&#xD;&#xA;    if(map[player_x+1][player_y]!=WALL)&#xD;&#xA;    {&#xD;&#xA;      // player can move right&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If you need certain sprites to move between tiles smoothly such as bomberman himself or sliding bombs you could store an additional offset as a float." />
  <row Id="35437" PostHistoryTypeId="5" PostId="15577" RevisionGUID="7a3957e5-fe4d-4af6-9042-90b88f3fea4b" CreationDate="2011-08-04T21:29:00.340" UserId="744" Comment="Link to cite for Minecraft using Perlin noise." Text="What you've noticed is the difference between a &lt;a href=&quot;http://en.wikipedia.org/wiki/Random_number_generator&quot;&gt;random number generator&lt;/a&gt; and a &lt;a href=&quot;http://www.noisemachine.com/talk1/&quot;&gt;noise function&lt;/a&gt;. A random number generator spits out a different number each time you call it. A noise function takes some arguments - say, a map x and y - and spits out numbers with _random-like statistical properties_, but _the same value for the same arguments every time_, i.e. it is a proper mathematical function.&#xD;&#xA;&#xD;&#xA;The two are very closely related. A noise function can simulate a random number generator, by passing in a different value each time - e.g. `noise(1)`, `noise(2)`, and so on. And a random number generator, dumped into a giant table, can act as a noise function. In both cases though, you're using the wrong tool for the job.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://notch.tumblr.com/post/3746989361/terrain-generation-part-1&quot;&gt;Minecraft in particular&lt;/a&gt; uses &lt;a href=&quot;http://en.wikipedia.org/wiki/Perlin_noise&quot;&gt;Perlin noise&lt;/a&gt;, a type of noise which is cheap to compute, and has a desirable property of being _continuous_ in as many dimensions as you need - if you graph `f(x)` to `f(x + 1)`, there won't be any sudden jumps. This makes it very useful for many things like texture modulation, volumetric clouds and gases, and terrain generation.&#xD;&#xA;&#xD;&#xA;If you are looking for an implementation to start playing with, &lt;a href=&quot;http://mrl.nyu.edu/~perlin/noise/&quot;&gt;Ken Perlin's improved Perlin noise generator&lt;/a&gt; is one of the simplest implementations." />
  <row Id="35438" PostHistoryTypeId="25" PostId="15574" RevisionGUID="a853c1d6-2a2a-4f70-967d-b01bf2125983" CreationDate="2011-08-04T21:36:44.000" Comment="http://twitter.com/#!/StackGameDev/status/99232321626062848" />
  <row Id="35439" PostHistoryTypeId="5" PostId="15578" RevisionGUID="b2c4bedd-f848-44ac-a8c7-682b3b238056" CreationDate="2011-08-04T21:51:31.193" UserId="1386" Comment="deleted 6 characters in body" Text="I recognise that you've probably got the gist from other answers, but it was a fun question and I felt like doing a little Python coding. This is my object-oriented approach. Indentation defines scope.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Graph Representation&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;The graph can easily be stored as a key, value dictionary where the key is the room id, and the value is an array of the rooms it leads to.&#xD;&#xA;&#xD;&#xA;    map = {&#xD;&#xA;    1:[5, 2],&#xD;&#xA;    2:[1, 3, 5],&#xD;&#xA;    3:[2, 4],&#xD;&#xA;    4:[3, 5, 6],&#xD;&#xA;    5:[2, 4, 1],&#xD;&#xA;    6:[4]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Agent Interface&#xD;&#xA;---------------&#xD;&#xA;&#xD;&#xA;First we should think about what information the agent should be able to learn from the environment, and the operations it should be able to perform. This will simplify thinking about the algorithm.&#xD;&#xA;&#xD;&#xA;In this case the agent should be able to query the environment for the id of the room it is in, it should be able to get a count of the doors **in the room it is in** (*note this is not the id's of the rooms the doors lead to!*) and he should be able to move through a door by specifying a door index. Anything else an agent knows has to be figured out by the agent itself.&#xD;&#xA;&#xD;&#xA;    class AgentInterface(object):&#xD;&#xA;    	def __init__(self, map, starting_room):&#xD;&#xA;    		self.map = map&#xD;&#xA;    		self.current_room = starting_room&#xD;&#xA;    		&#xD;&#xA;    	def get_door_count(self):&#xD;&#xA;    		return len(self.map[self.current_room])&#xD;&#xA;    	&#xD;&#xA;    	def go_through_door(self, door):&#xD;&#xA;    		result = self.current_room = self.map[self.current_room][door]&#xD;&#xA;    		return result&#xD;&#xA;&#xD;&#xA;Agent Knowledge&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When the agent first enters the map it only knows the amount of doors in the room, and the id of the room it's currently in. I needed to create a structure that would store information the agent had learned such as which doors it had not been through, and where the doors lead to that is had been through.&#xD;&#xA;&#xD;&#xA;This class represents the information about a single room. I chose to store the unvisited doors as a `set` and the visited doors as a `dictionary`, where the key is the door id and the value is the id of the room it leads to.&#xD;&#xA;&#xD;&#xA;    class RoomKnowledge(object):&#xD;&#xA;    	def __init__(self, unvisited_door_count):&#xD;&#xA;    		self.unvisited_doors = set(range(unvisited_door_count))&#xD;&#xA;    		self.visited_doors = {}&#xD;&#xA;&#xD;&#xA;Agent algorithm&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA; - Each time the agent enters a room it searches its knowledge&#xD;&#xA;   dictionary for information on the room. If there are no entries for&#xD;&#xA;   this room then it creates a new `RoomKnowledge` and adds this to it's&#xD;&#xA;   knowledge dictionary.&#xD;&#xA;   &#xD;&#xA; - It checks to see if the current room is the target room, if so then&#xD;&#xA;   it returns.&#xD;&#xA;   &#xD;&#xA; - If there are doors in this room we haven't visited, we go through the&#xD;&#xA;   door and store where it lead to. We then continue the loop. &#xD;&#xA;   &#xD;&#xA; - If there weren't any unvisited doors, we backtrack through the rooms&#xD;&#xA;   we have visited to find one with unvisited doors.&#xD;&#xA;&#xD;&#xA;The `Agent` class inherits from the `AgentInterface` class.&#xD;&#xA;&#xD;&#xA;    class Agent(AgentInterface):&#xD;&#xA;    		&#xD;&#xA;    	def find_exit(self, exit_room_id):&#xD;&#xA;    		knowledge = { }&#xD;&#xA;    		room_history = [] # For display purposes only&#xD;&#xA;    		history_stack = [] # Used when we need to backtrack if we've visited all the doors in the room&#xD;&#xA;    		while True:&#xD;&#xA;    			room_knowledge = knowledge.setdefault(self.current_room, RoomKnowledge(self.get_door_count()))&#xD;&#xA;    			room_history.append(self.current_room)&#xD;&#xA;    			&#xD;&#xA;    			if self.current_room==exit_room_id:&#xD;&#xA;    				return room_history&#xD;&#xA;    			&#xD;&#xA;    			if len(room_knowledge.unvisited_doors)==0:&#xD;&#xA;    				# I have destination room id. I need door id:&#xD;&#xA;    				door = find_key(room_knowledge.visited_doors, history_stack.pop())&#xD;&#xA;    				self.go_through_door(door)&#xD;&#xA;    			else:	&#xD;&#xA;    				history_stack.append(self.current_room)&#xD;&#xA;    				# Enter the first unopened door:&#xD;&#xA;    				opened_door = room_knowledge.unvisited_doors.pop()&#xD;&#xA;    				room_knowledge.visited_doors[opened_door]=self.go_through_door(opened_door)&#xD;&#xA;&#xD;&#xA;Supporting functions&#xD;&#xA;---&#xD;&#xA;I had to write a function that would find a key in a dictionary given a value, since when backtracking we know the id of the room we are trying to get to, but not which door to use to get to it.&#xD;&#xA;&#xD;&#xA;    def find_key(dictionary, value):&#xD;&#xA;    	for key in dictionary:&#xD;&#xA;    		if dictionary[key]==value:&#xD;&#xA;    			return key&#xD;&#xA;&#xD;&#xA;Testing&#xD;&#xA;---&#xD;&#xA;I tested all combinations of start/end position in the map given above. For each combination it prints out the visited rooms.&#xD;&#xA;&#xD;&#xA;    for start in range(1, 7):&#xD;&#xA;    	for exit in range(1, 7):&#xD;&#xA;    		print(&quot;start room: %d target room: %d&quot;%(start,exit))&#xD;&#xA;    		james_bond = Agent(map, start)&#xD;&#xA;    		print(james_bond.find_exit(exit))&#xD;&#xA;&#xD;&#xA;Notes&#xD;&#xA;---&#xD;&#xA;The backtracking isn't very efficient - in the worst case scenario it could go through every room to get to an adjacent room, but backtracking is fairly rare - in the above tests it only backtracks three times. I've avoided putting exception handling in to keep the code concise. Any comments on my Python appreciated :)" />
  <row Id="35440" PostHistoryTypeId="2" PostId="15581" RevisionGUID="f80534b3-c7ba-497b-ad3e-da995bb999f6" CreationDate="2011-08-04T22:22:22.840" UserId="9061" Text="This might be what you're looking for.&#xD;&#xA;&#xD;&#xA;http://micah5.com/2011/05/30/pixel-perfect-collision-detection-for-andengine.html" />
  <row Id="35441" PostHistoryTypeId="2" PostId="15582" RevisionGUID="5e54fdb4-3621-405b-b6fd-fbdc9bd60c6e" CreationDate="2011-08-05T00:05:33.353" UserId="4306" Text="When I export my Mudbox mesh (level 1), with its skeleton selected, to a .fbx and import it into unity, I don't get the bones/joints/skeleton/whatever under my mesh in the hierarchy.&#xD;&#xA;&#xD;&#xA;Am I missing something?" />
  <row Id="35442" PostHistoryTypeId="1" PostId="15582" RevisionGUID="5e54fdb4-3621-405b-b6fd-fbdc9bd60c6e" CreationDate="2011-08-05T00:05:33.353" UserId="4306" Text="How can I export mudbox joints to .fbx?" />
  <row Id="35443" PostHistoryTypeId="3" PostId="15582" RevisionGUID="5e54fdb4-3621-405b-b6fd-fbdc9bd60c6e" CreationDate="2011-08-05T00:05:33.353" UserId="4306" Text="&lt;unity&gt;&lt;rigging&gt;&lt;fbx&gt;" />
  <row Id="35444" PostHistoryTypeId="2" PostId="15583" RevisionGUID="1422b221-930e-4f1b-b69c-006e7d507cf9" CreationDate="2011-08-05T00:12:56.287" UserId="4360" Text="The biggest mistake, is simply playing the games on the client side, and allowing them to communicate their information as they see it. Have the clients simply communicate their input,  and render a model sent from the server at discrete intervals. (Store these models in an array with a server-timestamp, then interpolate between two known timestamps to render all actors everyframe)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have created a framework specifically for creating HTML5 realtime multiplayer games, based on the Client/Server model. In this model, players send only input to the server (keys being pressed) - and the game occurs on the server.&#xD;&#xA;&#xD;&#xA;The server sends timed world-snapshots to all clients, and clients render themselves say 75 ms back in time from the current time, by finding two known world updates their rendertime falls between.&#xD;&#xA;&#xD;&#xA;Repository (contains 3 demos)&#xD;&#xA;https://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs&#xD;&#xA;&#xD;&#xA;Video Box2D demo in action:&#xD;&#xA;http://vimeo.com/24149718&#xD;&#xA;&#xD;&#xA;Slides from JSConf 2011:&#xD;&#xA;http://www.slideshare.net/MarioGonzalez15/realtime-html5-multiplayergameswithnodejs-7868336&#xD;&#xA;&#xD;&#xA;It's based on Quakeworld and Valve's Source engine whitepapers:&#xD;&#xA;http://fabiensanglard.net/quakeSource/index.php http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking  &#xD;&#xA;" />
  <row Id="35445" PostHistoryTypeId="25" PostId="15560" RevisionGUID="c3e20f50-90fd-486b-ad3e-43be93121873" CreationDate="2011-08-05T00:36:43.903" Comment="http://twitter.com/#!/StackGameDev/status/99277620214116352" />
  <row Id="35446" PostHistoryTypeId="2" PostId="15584" RevisionGUID="ed3012cf-1c96-4c11-96f7-c61e9bba5ae2" CreationDate="2011-08-05T00:50:51.597" UserId="1386" Text="I'd like to point out that none of the terms you mentioned are mutually exclusive with each other - you could even have a voxel based game that used heightmaps and rendered using polygons.&#xD;&#xA;&#xD;&#xA; 1. Height-maps are two-dimensional representations of the height of the&#xD;&#xA;    ground at each specific point. They are often stored as greyscale images, where the brightness represents the height of that point. Voxels are basically a 3D bitmap. There are a variety of techniques used to render a voxel space.&#xD;&#xA;&#xD;&#xA; 2. You can create a smooth terrain with voxels, and they aren't limited to cubes. One such way is to use an algorithm like [marching cubes][1], which can convert a voxel representation into a polygon list.&#xD;&#xA;&#xD;&#xA; 3. The one with the least triangles would render the fastest :3&#xD;&#xA;&#xD;&#xA; 4. Fractal algorithms such as Perlin noise can be used to create landscapes with a lot of   &#xD;&#xA;    detail. Parametric surfaces such as nurbs can be used to create smooth terrains with little permanent storage requirements.&#xD;&#xA;&#xD;&#xA; 5. Delta Force is an old game that uses voxels.&#xD;&#xA;Minecraft may use voxel storage to represent the landscape (unsure).&#xD;&#xA;Sacrifice by Shiny is a game that uses heightmaps to good effect.&#xD;&#xA;Most games with landscapes use geometry terrains.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Marching_cubes" />
  <row Id="35447" PostHistoryTypeId="2" PostId="15585" RevisionGUID="d7f29ebe-72f3-4330-9767-2c11cd760371" CreationDate="2011-08-05T00:58:47.573" UserId="9063" Text="Title says it all.&#xD;&#xA;&#xD;&#xA;What's efficient way to draw a lot of textured cubes in XNA4?" />
  <row Id="35448" PostHistoryTypeId="1" PostId="15585" RevisionGUID="d7f29ebe-72f3-4330-9767-2c11cd760371" CreationDate="2011-08-05T00:58:47.573" UserId="9063" Text="What's efficient way to draw a lot of textured cubes in XNA4?" />
  <row Id="35449" PostHistoryTypeId="3" PostId="15585" RevisionGUID="d7f29ebe-72f3-4330-9767-2c11cd760371" CreationDate="2011-08-05T00:58:47.573" UserId="9063" Text="&lt;xna&gt;&lt;textures&gt;&lt;xna-4.0&gt;&lt;efficiency&gt;" />
  <row Id="35450" PostHistoryTypeId="2" PostId="15586" RevisionGUID="6da650d5-1491-4ebe-a653-350c2b7ce53e" CreationDate="2011-08-05T01:00:56.463" UserId="9064" Text="I made an attempt to answer your question on your original post, on Stack Overflow:&#xD;&#xA;&#xD;&#xA;If you are simply using the array to represent a game grid (so that the player can not be in-between blocks other than for animation purposes), then it would be extremely efficient to simply check the space the player wants to move (can only be 4 spaces, up, left, right, or down), see if they are passable terrain, and then allow the player to move there.&#xD;&#xA;&#xD;&#xA;This is how I am imagining your board to look, please let me know if this is incorrect:&#xD;&#xA;&#xD;&#xA;WWW&#xD;&#xA;&#xD;&#xA;O P O&#xD;&#xA;&#xD;&#xA;WOW&#xD;&#xA;&#xD;&#xA;(A 3 by 3 visualization of the array; W represents a wall, O represents open space, and P represents the player)&#xD;&#xA;&#xD;&#xA;I am going to assume, for this example, that the top-left corner is represented by locationArray[0][0] and the bottom-left is locationArray[2][2]. X is the first array parameter, Y is the second.&#xD;&#xA;&#xD;&#xA;The player is at locationArray[1][1]&#xD;&#xA;&#xD;&#xA;In the above case, if the player opted to move left, you would check the array location to his left, locationArray[2][1], find it open, and allow the player to move.&#xD;&#xA;&#xD;&#xA;If the player opted to move up, locationArray[1][0], the check would not allow the player to move, as it is impassable terrain (a wall)." />
  <row Id="35451" PostHistoryTypeId="2" PostId="15587" RevisionGUID="3d1c822b-af02-4ad2-9186-1424de5c218f" CreationDate="2011-08-05T01:44:24.603" UserId="9065" Text="//I am trying to make a pong game that uses a burger as a ball and a plate as its paddle, I have everything right but the burger goes right through the plate I have everything right except for the collision detection. Can anyone help me????&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;using System;&#xD;&#xA;using System.Collections.Generic;&#xD;&#xA;using System.Linq;&#xD;&#xA;using Microsoft.Xna.Framework;&#xD;&#xA;using Microsoft.Xna.Framework.Audio;&#xD;&#xA;using Microsoft.Xna.Framework.Content;&#xD;&#xA;using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;using Microsoft.Xna.Framework.Input;&#xD;&#xA;using Microsoft.Xna.Framework.Media;&#xD;&#xA;&#xD;&#xA;namespace Burger_Attack_Mitch_McCauley&#xD;&#xA;{&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// This is the main type for your game&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;    {&#xD;&#xA;        GameSprite myGameSprite;&#xD;&#xA;        GraphicsDeviceManager graphics;&#xD;&#xA;        SpriteBatch spriteBatch;&#xD;&#xA;&#xD;&#xA;        Texture2D imageBurger;&#xD;&#xA;        Texture2D imagePlate;&#xD;&#xA;        Texture2D imageStart;&#xD;&#xA;        Texture2D imageEnd;&#xD;&#xA;&#xD;&#xA;        KeyboardState keyState_01;&#xD;&#xA;        KeyboardState keyState_01_Old;&#xD;&#xA;&#xD;&#xA;        GamePadState pad_01;&#xD;&#xA;        GamePadState pad_01_Old;&#xD;&#xA;&#xD;&#xA;        int intGameState;&#xD;&#xA;&#xD;&#xA;        GameSprite spriteStartScreen_01;&#xD;&#xA;        GameSprite spriteEndScreen_01;&#xD;&#xA;        GameSprite spritePlate;&#xD;&#xA;        GameSprite spriteBurger;&#xD;&#xA;&#xD;&#xA;        public Game1()&#xD;&#xA;        {&#xD;&#xA;            graphics = new GraphicsDeviceManager(this);&#xD;&#xA;            Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Allows the game to perform any initialization it needs to before starting to run.&#xD;&#xA;        /// This is where it can query for any required services and load any non-graphic&#xD;&#xA;        /// related content.  Calling base.Initialize will enumerate through any components&#xD;&#xA;        /// and initialize them as well.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        protected override void Initialize()&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            // TODO: Add your initialization logic here&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;            myGameSprite = new GameSprite();&#xD;&#xA;&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            spriteStartScreen_01 = new GameSprite();&#xD;&#xA;            spriteEndScreen_01 = new GameSprite();&#xD;&#xA;            spritePlate = new GameSprite(300, 425, 150, 50);&#xD;&#xA;            spriteBurger = new GameSprite(300, 300, 150, 100, 1, -1);&#xD;&#xA;&#xD;&#xA;            intGameState = 5;&#xD;&#xA;&#xD;&#xA;            base.Initialize();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// LoadContent will be called once per game and is the place to load&#xD;&#xA;        /// all of your content.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        protected override void LoadContent()&#xD;&#xA;        {&#xD;&#xA;            // Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;            spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            imageBurger = Content.Load&lt;Texture2D&gt;(&quot;Images\\DeathBurger&quot;);&#xD;&#xA;            imagePlate = Content.Load&lt;Texture2D&gt;(&quot;Images\\Plate&quot;);&#xD;&#xA;            imageStart = Content.Load&lt;Texture2D&gt;(&quot;Images\\StartScreen_01&quot;);&#xD;&#xA;            imageEnd = Content.Load&lt;Texture2D&gt;(&quot;Images\\EndScreen_01&quot;);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            spriteStartScreen_01.spriteTexture = imageStart;&#xD;&#xA;            spriteEndScreen_01.spriteTexture = imageEnd;&#xD;&#xA;            spriteBurger.spriteTexture = imageBurger;&#xD;&#xA;            spritePlate.spriteTexture = imagePlate;&#xD;&#xA;&#xD;&#xA;                &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            // TODO: use this.Content to load your game content here&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// UnloadContent will be called once per game and is the place to unload&#xD;&#xA;        /// all content.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        protected override void UnloadContent()&#xD;&#xA;        {&#xD;&#xA;            // TODO: Unload any non ContentManager content here&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// Allows the game to run logic such as updating the world,&#xD;&#xA;        /// checking for collisions, gathering input, and playing audio.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;        protected override void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            // Allows the game to exit&#xD;&#xA;            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                this.Exit();&#xD;&#xA;&#xD;&#xA;            GetUserInput();&#xD;&#xA;            ChangeGameState();&#xD;&#xA;            &#xD;&#xA;            switch (intGameState)&#xD;&#xA;            {&#xD;&#xA;                case 5:&#xD;&#xA;                    break;&#xD;&#xA;                    &#xD;&#xA;                case 86:&#xD;&#xA;                    break;&#xD;&#xA;                default:&#xD;&#xA;                    MoveUserControlledSprites();&#xD;&#xA;                    MoveSprites();&#xD;&#xA;                    TestForCollisions();&#xD;&#xA;                    break;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            // TODO: Add your update logic here&#xD;&#xA;&#xD;&#xA;            base.Update(gameTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// This is called when the game should draw itself.&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;        protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;            spriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;            switch (intGameState)&#xD;&#xA;            {&#xD;&#xA;                case 5:&#xD;&#xA;                    spriteBatch.Draw(spriteStartScreen_01.spriteTexture,&#xD;&#xA;                        spriteStartScreen_01.spritePos, Color.White);&#xD;&#xA;                    break;&#xD;&#xA;&#xD;&#xA;                case 86:&#xD;&#xA;                    spriteBatch.Draw(spriteEndScreen_01.spriteTexture,&#xD;&#xA;                        spriteEndScreen_01.spritePos, Color.White);&#xD;&#xA;                    break;&#xD;&#xA;                default:&#xD;&#xA;&#xD;&#xA;                    spriteBatch.Draw(spriteBurger.spriteTexture,&#xD;&#xA;                        spriteBurger.spritePos, Color.White);&#xD;&#xA;                    spriteBatch.Draw(spritePlate.spriteTexture,&#xD;&#xA;                        spritePlate.spritePos, Color.White);&#xD;&#xA;                    break;&#xD;&#xA;            }&#xD;&#xA;            spriteBatch.End();&#xD;&#xA;&#xD;&#xA;            // TODO: Add your drawing code here&#xD;&#xA;&#xD;&#xA;            base.Draw(gameTime);&#xD;&#xA;        }&#xD;&#xA;        private void GetUserInput()&#xD;&#xA;        {&#xD;&#xA;            keyState_01_Old = keyState_01;&#xD;&#xA;            pad_01_Old = pad_01;&#xD;&#xA;&#xD;&#xA;            keyState_01 = Keyboard.GetState();&#xD;&#xA;            pad_01 = GamePad.GetState(PlayerIndex.One);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;            private void ChangeGameState()&#xD;&#xA;            {if (intGameState == 5 &amp;&amp;&#xD;&#xA;                pad_01.Buttons.B == ButtonState.Pressed &amp;&amp;&#xD;&#xA;                pad_01_Old.Buttons.B == ButtonState.Released)&#xD;&#xA;            {&#xD;&#xA;                intGameState = 10;&#xD;&#xA;            }&#xD;&#xA;                if (intGameState == 5 &amp;&amp;&#xD;&#xA;                    keyState_01.IsKeyDown (Keys.Space) &amp;&amp;&#xD;&#xA;                    keyState_01_Old.IsKeyUp(Keys.Space))&#xD;&#xA;                {&#xD;&#xA;                    intGameState = 10;&#xD;&#xA;                }&#xD;&#xA;                 &#xD;&#xA;                if (intGameState == 86 &amp;&amp;&#xD;&#xA;                    pad_01.Buttons.B == ButtonState. Pressed &amp;&amp;&#xD;&#xA;                        pad_01_Old.Buttons.B == ButtonState.Released)&#xD;&#xA;                {&#xD;&#xA;                    intGameState = 5;&#xD;&#xA;                    spriteBurger.spritePos.X = 300;&#xD;&#xA;                    spriteBurger.spritePos.Y = 0;&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;                if (intGameState == 86 &amp;&amp;&#xD;&#xA;                    keyState_01.IsKeyDown(Keys.Space) &amp;&amp;&#xD;&#xA;                    keyState_01_Old.IsKeyUp(Keys.Space))&#xD;&#xA;                {&#xD;&#xA;                    intGameState = 5;&#xD;&#xA;                    spriteBurger.spritePos.X = 300;&#xD;&#xA;                    spriteBurger.spritePos.Y = 0;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;                private void MoveSprites()&#xD;&#xA;                {&#xD;&#xA;                    if (spriteBurger.spritePos.X &lt;= 0)&#xD;&#xA;                    {&#xD;&#xA;                        spriteBurger.spriteSpeed.X = 2;&#xD;&#xA;                    }&#xD;&#xA;                    if (spriteBurger.spriteSpeed.Y &lt;= 0)&#xD;&#xA;                    {&#xD;&#xA;                        spriteBurger.spriteSpeed.Y = 2;&#xD;&#xA;                    }&#xD;&#xA;                    if (spriteBurger.spritePos.X +&#xD;&#xA;                        spriteBurger.spriteDims.X &gt;=&#xD;&#xA;                        Window.ClientBounds.Width)&#xD;&#xA;                    {&#xD;&#xA;                        spriteBurger.spriteSpeed.X = -2;&#xD;&#xA;                    }&#xD;&#xA;                    if (spriteBurger.spritePos.Y +&#xD;&#xA;                        spriteBurger.spriteDims.Y &gt;+&#xD;&#xA;                        Window.ClientBounds.Height)&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 86;&#xD;&#xA;                    }&#xD;&#xA;                    spriteBurger.spritePos.X += spriteBurger.spriteSpeed.X;&#xD;&#xA;                    spriteBurger.spritePos.Y += spriteBurger.spriteSpeed.Y;&#xD;&#xA;                }&#xD;&#xA;        private void MoveUserControlledSprites()&#xD;&#xA;        {&#xD;&#xA;            if (keyState_01.IsKeyDown(Keys.Left))&#xD;&#xA;            {&#xD;&#xA;                spritePlate.spritePos.X -= 3;&#xD;&#xA;            }&#xD;&#xA;            if (keyState_01.IsKeyDown(Keys.Right))&#xD;&#xA;            {&#xD;&#xA;                spritePlate.spritePos.X += 3;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            spritePlate.spritePos.X += pad_01.ThumbSticks.Right.X * 5;&#xD;&#xA;            &#xD;&#xA;            if (spritePlate.spritePos.X &lt; 0)&#xD;&#xA;            {&#xD;&#xA;                spritePlate.spritePos.X = 0;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if (Window.ClientBounds.Width &lt; (spritePlate.spritePos.X + spritePlate.spriteDims.X))&#xD;&#xA;            {&#xD;&#xA;                spritePlate.spritePos.X = (Window.ClientBounds.Width - spritePlate.spriteDims.X);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        private void TestForCollisions()&#xD;&#xA;        {&#xD;&#xA;            Rectangle plateRect = new Rectangle(&#xD;&#xA;                (int)spritePlate.spritePos.X,&#xD;&#xA;                (int)spritePlate.spritePos.Y,&#xD;&#xA;                (int)spritePlate.spriteDims.X,&#xD;&#xA;                (int)spritePlate.spriteDims.Y);&#xD;&#xA;&#xD;&#xA;            Rectangle burgerRect = new Rectangle(&#xD;&#xA;                (int)spriteBurger.spritePos.X,&#xD;&#xA;                (int)spriteBurger.spritePos.Y,&#xD;&#xA;                (int)spriteBurger.spriteDims.X,&#xD;&#xA;                (int)spriteBurger.spriteDims.Y);&#xD;&#xA;&#xD;&#xA;            if (plateRect.Intersects(burgerRect))&#xD;&#xA;            {&#xD;&#xA;                spriteBurger.spriteSpeed.Y = -1 *&#xD;&#xA;                    Math.Abs(spriteBurger.spriteSpeed.Y);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35452" PostHistoryTypeId="1" PostId="15587" RevisionGUID="3d1c822b-af02-4ad2-9186-1424de5c218f" CreationDate="2011-08-05T01:44:24.603" UserId="9065" Text="C# XNA Framework Paddle Collision Problems" />
  <row Id="35453" PostHistoryTypeId="3" PostId="15587" RevisionGUID="3d1c822b-af02-4ad2-9186-1424de5c218f" CreationDate="2011-08-05T01:44:24.603" UserId="9065" Text="&lt;xna&gt;&lt;c#&gt;&lt;collision-detection&gt;" />
  <row Id="35454" PostHistoryTypeId="6" PostId="9792" RevisionGUID="98e6d2e8-3a03-464c-b285-58e86eba45cd" CreationDate="2011-08-05T02:12:03.970" UserId="4513" Comment="edited tags" Text="&lt;opengl&gt;&lt;c&gt;&lt;normals&gt;&lt;vertex&gt;" />
  <row Id="35455" PostHistoryTypeId="2" PostId="15588" RevisionGUID="d2c1c835-c2a5-4e3d-8333-a238a5a2337e" CreationDate="2011-08-05T02:14:03.303" UserId="9021" Text="can anybody help me to convert this objective-c code to android java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;    if (_mouseJoint != NULL) return;&#xD;&#xA; &#xD;&#xA;    UITouch *myTouch = [touches anyObject];&#xD;&#xA;&#xD;&#xA;    CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;&#xD;&#xA;    location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;&#xD;&#xA;    b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;    if (_paddleFixture-&gt;TestPoint(locationWorld)) {&#xD;&#xA;&#xD;&#xA;        b2MouseJointDef md;&#xD;&#xA;        md.bodyA = _groundBody;&#xD;&#xA;        md.bodyB = _paddleBody;&#xD;&#xA;        md.target = locationWorld;&#xD;&#xA;        md.collideConnected = true;&#xD;&#xA;        md.maxForce = 1000.0f * _paddleBody-&gt;GetMass();&#xD;&#xA; &#xD;&#xA;        _mouseJoint = (b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);&#xD;&#xA;        _paddleBody-&gt;SetAwake(true);&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;I tried below is my code but getting exception. java.lang.nullpointer .&#xD;&#xA;Is anything wrong ?&#xD;&#xA;&#xD;&#xA;public boolean ccTouchesBegan(MotionEvent event) {&#xD;&#xA;&#xD;&#xA;			 if (_mouseJoint != null){ &#xD;&#xA;				 return true;&#xD;&#xA;				&#xD;&#xA;			}&#xD;&#xA;			 else{&#xD;&#xA;				&#xD;&#xA;				 &#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 &#xD;&#xA;			 // return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			   //_mouseJoint.setTarget(locationWorld);&#xD;&#xA;						 &#xD;&#xA;			if(_paddleFixture.testPoint(locationWorld)){&#xD;&#xA;				&#xD;&#xA;				 MouseJointDef md = new MouseJointDef();&#xD;&#xA;				 md.bodyA = _body;&#xD;&#xA;				 md.bodyB = _paddleBody;&#xD;&#xA;				 md.target.set(locationWorld);&#xD;&#xA;				 md.collideConnected = true;&#xD;&#xA;				 md.maxForce = (float)(1000.0f * _paddleBody.getMass());&#xD;&#xA;				 _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;				 _paddleBody.setAwake(true);&#xD;&#xA;			 }&#xD;&#xA;			}&#xD;&#xA;		 //return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			&#xD;&#xA;			return true;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Jubin" />
  <row Id="35456" PostHistoryTypeId="1" PostId="15588" RevisionGUID="d2c1c835-c2a5-4e3d-8333-a238a5a2337e" CreationDate="2011-08-05T02:14:03.303" UserId="9021" Text="Iphone code converstion?" />
  <row Id="35457" PostHistoryTypeId="3" PostId="15588" RevisionGUID="d2c1c835-c2a5-4e3d-8333-a238a5a2337e" CreationDate="2011-08-05T02:14:03.303" UserId="9021" Text="&lt;android&gt;&lt;cocos2d&gt;" />
  <row Id="35458" PostHistoryTypeId="5" PostId="15587" RevisionGUID="919b07b7-9f54-44ac-af53-6c3cf71bbfea" CreationDate="2011-08-05T02:30:14.233" UserId="5060" Comment="Fixed formatting." Text="I am trying to make a pong game that uses a burger as a ball and a plate as its paddle, I have everything right but the burger goes right through the plate I have everything right except for the collision detection. Can anyone help me?&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Audio;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Media;&#xD;&#xA;    &#xD;&#xA;    namespace Burger_Attack_Mitch_McCauley&#xD;&#xA;    {&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// This is the main type for your game&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;        {&#xD;&#xA;            GameSprite myGameSprite;&#xD;&#xA;            GraphicsDeviceManager graphics;&#xD;&#xA;            SpriteBatch spriteBatch;&#xD;&#xA;    &#xD;&#xA;            Texture2D imageBurger;&#xD;&#xA;            Texture2D imagePlate;&#xD;&#xA;            Texture2D imageStart;&#xD;&#xA;            Texture2D imageEnd;&#xD;&#xA;    &#xD;&#xA;            KeyboardState keyState_01;&#xD;&#xA;            KeyboardState keyState_01_Old;&#xD;&#xA;    &#xD;&#xA;            GamePadState pad_01;&#xD;&#xA;            GamePadState pad_01_Old;&#xD;&#xA;    &#xD;&#xA;            int intGameState;&#xD;&#xA;    &#xD;&#xA;            GameSprite spriteStartScreen_01;&#xD;&#xA;            GameSprite spriteEndScreen_01;&#xD;&#xA;            GameSprite spritePlate;&#xD;&#xA;            GameSprite spriteBurger;&#xD;&#xA;    &#xD;&#xA;            public Game1()&#xD;&#xA;            {&#xD;&#xA;                graphics = new GraphicsDeviceManager(this);&#xD;&#xA;                Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Allows the game to perform any initialization it needs to before starting to run.&#xD;&#xA;            /// This is where it can query for any required services and load any non-graphic&#xD;&#xA;            /// related content.  Calling base.Initialize will enumerate through any components&#xD;&#xA;            /// and initialize them as well.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void Initialize()&#xD;&#xA;            {&#xD;&#xA;                &#xD;&#xA;                // TODO: Add your initialization logic here&#xD;&#xA;    &#xD;&#xA;                &#xD;&#xA;    &#xD;&#xA;                myGameSprite = new GameSprite();&#xD;&#xA;    &#xD;&#xA;               &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                spriteStartScreen_01 = new GameSprite();&#xD;&#xA;                spriteEndScreen_01 = new GameSprite();&#xD;&#xA;                spritePlate = new GameSprite(300, 425, 150, 50);&#xD;&#xA;                spriteBurger = new GameSprite(300, 300, 150, 100, 1, -1);&#xD;&#xA;    &#xD;&#xA;                intGameState = 5;&#xD;&#xA;    &#xD;&#xA;                base.Initialize();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// LoadContent will be called once per game and is the place to load&#xD;&#xA;            /// all of your content.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void LoadContent()&#xD;&#xA;            {&#xD;&#xA;                // Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;                spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;    &#xD;&#xA;               &#xD;&#xA;    &#xD;&#xA;                imageBurger = Content.Load&lt;Texture2D&gt;(&quot;Images\\DeathBurger&quot;);&#xD;&#xA;                imagePlate = Content.Load&lt;Texture2D&gt;(&quot;Images\\Plate&quot;);&#xD;&#xA;                imageStart = Content.Load&lt;Texture2D&gt;(&quot;Images\\StartScreen_01&quot;);&#xD;&#xA;                imageEnd = Content.Load&lt;Texture2D&gt;(&quot;Images\\EndScreen_01&quot;);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                spriteStartScreen_01.spriteTexture = imageStart;&#xD;&#xA;                spriteEndScreen_01.spriteTexture = imageEnd;&#xD;&#xA;                spriteBurger.spriteTexture = imageBurger;&#xD;&#xA;                spritePlate.spriteTexture = imagePlate;&#xD;&#xA;    &#xD;&#xA;                    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                // TODO: use this.Content to load your game content here&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// UnloadContent will be called once per game and is the place to unload&#xD;&#xA;            /// all content.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void UnloadContent()&#xD;&#xA;            {&#xD;&#xA;                // TODO: Unload any non ContentManager content here&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Allows the game to run logic such as updating the world,&#xD;&#xA;            /// checking for collisions, gathering input, and playing audio.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;            protected override void Update(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                // Allows the game to exit&#xD;&#xA;                if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                    this.Exit();&#xD;&#xA;    &#xD;&#xA;                GetUserInput();&#xD;&#xA;                ChangeGameState();&#xD;&#xA;                &#xD;&#xA;                switch (intGameState)&#xD;&#xA;                {&#xD;&#xA;                    case 5:&#xD;&#xA;                        break;&#xD;&#xA;                        &#xD;&#xA;                    case 86:&#xD;&#xA;                        break;&#xD;&#xA;                    default:&#xD;&#xA;                        MoveUserControlledSprites();&#xD;&#xA;                        MoveSprites();&#xD;&#xA;                        TestForCollisions();&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                // TODO: Add your update logic here&#xD;&#xA;    &#xD;&#xA;                base.Update(gameTime);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// This is called when the game should draw itself.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;            protected override void Draw(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;    &#xD;&#xA;                spriteBatch.Begin();&#xD;&#xA;    &#xD;&#xA;                switch (intGameState)&#xD;&#xA;                {&#xD;&#xA;                    case 5:&#xD;&#xA;                        spriteBatch.Draw(spriteStartScreen_01.spriteTexture,&#xD;&#xA;                            spriteStartScreen_01.spritePos, Color.White);&#xD;&#xA;                        break;&#xD;&#xA;    &#xD;&#xA;                    case 86:&#xD;&#xA;                        spriteBatch.Draw(spriteEndScreen_01.spriteTexture,&#xD;&#xA;                            spriteEndScreen_01.spritePos, Color.White);&#xD;&#xA;                        break;&#xD;&#xA;                    default:&#xD;&#xA;    &#xD;&#xA;                        spriteBatch.Draw(spriteBurger.spriteTexture,&#xD;&#xA;                            spriteBurger.spritePos, Color.White);&#xD;&#xA;                        spriteBatch.Draw(spritePlate.spriteTexture,&#xD;&#xA;                            spritePlate.spritePos, Color.White);&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;                spriteBatch.End();&#xD;&#xA;    &#xD;&#xA;                // TODO: Add your drawing code here&#xD;&#xA;    &#xD;&#xA;                base.Draw(gameTime);&#xD;&#xA;            }&#xD;&#xA;            private void GetUserInput()&#xD;&#xA;            {&#xD;&#xA;                keyState_01_Old = keyState_01;&#xD;&#xA;                pad_01_Old = pad_01;&#xD;&#xA;    &#xD;&#xA;                keyState_01 = Keyboard.GetState();&#xD;&#xA;                pad_01 = GamePad.GetState(PlayerIndex.One);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;                private void ChangeGameState()&#xD;&#xA;                {if (intGameState == 5 &amp;&amp;&#xD;&#xA;                    pad_01.Buttons.B == ButtonState.Pressed &amp;&amp;&#xD;&#xA;                    pad_01_Old.Buttons.B == ButtonState.Released)&#xD;&#xA;                {&#xD;&#xA;                    intGameState = 10;&#xD;&#xA;                }&#xD;&#xA;                    if (intGameState == 5 &amp;&amp;&#xD;&#xA;                        keyState_01.IsKeyDown (Keys.Space) &amp;&amp;&#xD;&#xA;                        keyState_01_Old.IsKeyUp(Keys.Space))&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 10;&#xD;&#xA;                    }&#xD;&#xA;                     &#xD;&#xA;                    if (intGameState == 86 &amp;&amp;&#xD;&#xA;                        pad_01.Buttons.B == ButtonState. Pressed &amp;&amp;&#xD;&#xA;                            pad_01_Old.Buttons.B == ButtonState.Released)&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 5;&#xD;&#xA;                        spriteBurger.spritePos.X = 300;&#xD;&#xA;                        spriteBurger.spritePos.Y = 0;&#xD;&#xA;                    }&#xD;&#xA;                    &#xD;&#xA;                    if (intGameState == 86 &amp;&amp;&#xD;&#xA;                        keyState_01.IsKeyDown(Keys.Space) &amp;&amp;&#xD;&#xA;                        keyState_01_Old.IsKeyUp(Keys.Space))&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 5;&#xD;&#xA;                        spriteBurger.spritePos.X = 300;&#xD;&#xA;                        spriteBurger.spritePos.Y = 0;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                    private void MoveSprites()&#xD;&#xA;                    {&#xD;&#xA;                        if (spriteBurger.spritePos.X &lt;= 0)&#xD;&#xA;                        {&#xD;&#xA;                            spriteBurger.spriteSpeed.X = 2;&#xD;&#xA;                        }&#xD;&#xA;                        if (spriteBurger.spriteSpeed.Y &lt;= 0)&#xD;&#xA;                        {&#xD;&#xA;                            spriteBurger.spriteSpeed.Y = 2;&#xD;&#xA;                        }&#xD;&#xA;                        if (spriteBurger.spritePos.X +&#xD;&#xA;                            spriteBurger.spriteDims.X &gt;=&#xD;&#xA;                            Window.ClientBounds.Width)&#xD;&#xA;                        {&#xD;&#xA;                            spriteBurger.spriteSpeed.X = -2;&#xD;&#xA;                        }&#xD;&#xA;                        if (spriteBurger.spritePos.Y +&#xD;&#xA;                            spriteBurger.spriteDims.Y &gt;+&#xD;&#xA;                            Window.ClientBounds.Height)&#xD;&#xA;                        {&#xD;&#xA;                            intGameState = 86;&#xD;&#xA;                        }&#xD;&#xA;                        spriteBurger.spritePos.X += spriteBurger.spriteSpeed.X;&#xD;&#xA;                        spriteBurger.spritePos.Y += spriteBurger.spriteSpeed.Y;&#xD;&#xA;                    }&#xD;&#xA;            private void MoveUserControlledSprites()&#xD;&#xA;            {&#xD;&#xA;                if (keyState_01.IsKeyDown(Keys.Left))&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X -= 3;&#xD;&#xA;                }&#xD;&#xA;                if (keyState_01.IsKeyDown(Keys.Right))&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X += 3;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                spritePlate.spritePos.X += pad_01.ThumbSticks.Right.X * 5;&#xD;&#xA;                &#xD;&#xA;                if (spritePlate.spritePos.X &lt; 0)&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X = 0;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if (Window.ClientBounds.Width &lt; (spritePlate.spritePos.X + spritePlate.spriteDims.X))&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X = (Window.ClientBounds.Width - spritePlate.spriteDims.X);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            private void TestForCollisions()&#xD;&#xA;            {&#xD;&#xA;                Rectangle plateRect = new Rectangle(&#xD;&#xA;                    (int)spritePlate.spritePos.X,&#xD;&#xA;                    (int)spritePlate.spritePos.Y,&#xD;&#xA;                    (int)spritePlate.spriteDims.X,&#xD;&#xA;                    (int)spritePlate.spriteDims.Y);&#xD;&#xA;    &#xD;&#xA;                Rectangle burgerRect = new Rectangle(&#xD;&#xA;                    (int)spriteBurger.spritePos.X,&#xD;&#xA;                    (int)spriteBurger.spritePos.Y,&#xD;&#xA;                    (int)spriteBurger.spriteDims.X,&#xD;&#xA;                    (int)spriteBurger.spriteDims.Y);&#xD;&#xA;    &#xD;&#xA;                if (plateRect.Intersects(burgerRect))&#xD;&#xA;                {&#xD;&#xA;                    spriteBurger.spriteSpeed.Y = -1 *&#xD;&#xA;                        Math.Abs(spriteBurger.spriteSpeed.Y);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }" />
  <row Id="35459" PostHistoryTypeId="24" PostId="15587" RevisionGUID="919b07b7-9f54-44ac-af53-6c3cf71bbfea" CreationDate="2011-08-05T02:30:14.233" Comment="Proposed by 5060 approved by 2698 edit id of 598" />
  <row Id="35460" PostHistoryTypeId="5" PostId="15564" RevisionGUID="cc6dbaf4-28ef-42ac-b897-7a7325c31a2a" CreationDate="2011-08-05T02:37:30.780" UserId="160" Comment="added 21 characters in body" Text="The short answer is depth-first search with backtracking. You can do breadth-first if you prefer, but your little robot will do a lot more walking back and forth then.&#xD;&#xA;&#xD;&#xA;More concretely, assume we're given:&#xD;&#xA;&#xD;&#xA;    // Moves to the given room, which must have a door between&#xD;&#xA;    // it and the current room.&#xD;&#xA;    moveTo(room);&#xD;&#xA;&#xD;&#xA;    // Returns the list of room ids directly reachable from&#xD;&#xA;    // the current room.&#xD;&#xA;    getDoors();&#xD;&#xA;&#xD;&#xA;    // Returns true if this room is the exit.&#xD;&#xA;    isExit();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To find the exit, we just need:&#xD;&#xA;&#xD;&#xA;    void escape(int startingRoom) {&#xD;&#xA;      Stack&lt;int&gt; path = new Stack&lt;int&gt;();&#xD;&#xA;      path.push(startingRoom);&#xD;&#xA;      escape(path);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    boolean escape(Stack&lt;int&gt; path) {&#xD;&#xA;      for (int door : getDoors()) {&#xD;&#xA;        // Stop if we've escaped.&#xD;&#xA;        if (isExit()) return true;&#xD;&#xA;&#xD;&#xA;        // Don't walk in circles.&#xD;&#xA;        if (path.contains(door)) continue;&#xD;&#xA;&#xD;&#xA;        moveTo(door);&#xD;&#xA;        path.push(door);&#xD;&#xA;        if (escape(path)) return true;&#xD;&#xA;&#xD;&#xA;        // If we got here, the door didn't lead to an exit. Backtrack.&#xD;&#xA;        path.pop();&#xD;&#xA;        moveTo(path.peek());&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Call `escape()` with the ID of the start room and it will move the robot to the exit (by calling `moveTo()`)." />
  <row Id="35461" PostHistoryTypeId="6" PostId="9792" RevisionGUID="5a2010ae-f8a3-4edb-9a92-654178ec3887" CreationDate="2011-08-05T02:58:45.683" UserId="8240" Comment="edited tags" Text="&lt;opengl&gt;&lt;c&gt;&lt;vertex&gt;" />
  <row Id="35462" PostHistoryTypeId="2" PostId="15589" RevisionGUID="1d5fe1c1-e171-445a-ba70-45386959a637" CreationDate="2011-08-05T03:02:35.947" UserId="8830" Text="I was thinking about a game engine development, I understand as Engine the main program that can develope next duties: &#xD;&#xA;&#xD;&#xA;**1. Receives parameters.**&#xD;&#xA;&#xD;&#xA;**2. calculates what is needed.**&#xD;&#xA;&#xD;&#xA;**3. Delivers results.** &#xD;&#xA;&#xD;&#xA; As an example lets say I'm writing an sports game, so I was thinking that instead of starting with something big I could start with a very small objectives and always **(now not even thinking in graphics management so maybe I could be speaking about a simulation and not yet even about a game)** just getting data result through the shell.&#xD;&#xA;&#xD;&#xA;What about next steps?:&#xD;&#xA;#1.#&#xD;&#xA; Develop an script wich gets all the data stored in a database and after calculating everything based on that data it releases the result of the match or race.&#xD;&#xA;&#xD;&#xA;#2.#&#xD;&#xA; Get more in detail and a part of calculating the result it delivers too details through the match or race (not jet in real time).&#xD;&#xA;&#xD;&#xA;#3.#&#xD;&#xA; In that third stage what it happens is that the program will temporize the details and final result progress in real time through the shell delivering messages before the final result.&#xD;&#xA;&#xD;&#xA;#4.#&#xD;&#xA; though the real time data delivering the user will be available to interact introducing parameters when is asked.&#xD;&#xA;&#xD;&#xA; Many thanks I hope it gets your interest, I'm just trying to clarify the process and catch advice and sugestions from experienced people." />
  <row Id="35463" PostHistoryTypeId="1" PostId="15589" RevisionGUID="1d5fe1c1-e171-445a-ba70-45386959a637" CreationDate="2011-08-05T03:02:35.947" UserId="8830" Text="is my &quot;Engine&quot; development process right? need advice" />
  <row Id="35464" PostHistoryTypeId="3" PostId="15589" RevisionGUID="1d5fe1c1-e171-445a-ba70-45386959a637" CreationDate="2011-08-05T03:02:35.947" UserId="8830" Text="&lt;engine&gt;&lt;methodology&gt;&lt;process&gt;" />
  <row Id="35465" PostHistoryTypeId="5" PostId="15588" RevisionGUID="fe528d18-8bce-43c8-ab5d-e027fd0426b6" CreationDate="2011-08-05T03:04:01.897" UserId="51" Comment="added 83 characters in body" Text="can anybody help me to convert this objective-c code to android java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    - (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA;        if (_mouseJoint != NULL) return;&#xD;&#xA;     &#xD;&#xA;        UITouch *myTouch = [touches anyObject];&#xD;&#xA;    &#xD;&#xA;        CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;    &#xD;&#xA;        location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;    &#xD;&#xA;        b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA;     &#xD;&#xA;        if (_paddleFixture-&gt;TestPoint(locationWorld)) {&#xD;&#xA;    &#xD;&#xA;            b2MouseJointDef md;&#xD;&#xA;            md.bodyA = _groundBody;&#xD;&#xA;            md.bodyB = _paddleBody;&#xD;&#xA;            md.target = locationWorld;&#xD;&#xA;            md.collideConnected = true;&#xD;&#xA;            md.maxForce = 1000.0f * _paddleBody-&gt;GetMass();&#xD;&#xA;     &#xD;&#xA;            _mouseJoint = (b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);&#xD;&#xA;            _paddleBody-&gt;SetAwake(true);&#xD;&#xA;        }&#xD;&#xA;     &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I tried below is my code but getting exception. java.lang.nullpointer .&#xD;&#xA;Is anything wrong ?&#xD;&#xA;&#xD;&#xA;    public boolean ccTouchesBegan(MotionEvent event) {&#xD;&#xA;&#xD;&#xA;			 if (_mouseJoint != null){ &#xD;&#xA;				 return true;&#xD;&#xA;				&#xD;&#xA;			}&#xD;&#xA;			 else{&#xD;&#xA;				&#xD;&#xA;				 &#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 &#xD;&#xA;			 // return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			   //_mouseJoint.setTarget(locationWorld);&#xD;&#xA;						 &#xD;&#xA;			if(_paddleFixture.testPoint(locationWorld)){&#xD;&#xA;				&#xD;&#xA;				 MouseJointDef md = new MouseJointDef();&#xD;&#xA;				 md.bodyA = _body;&#xD;&#xA;				 md.bodyB = _paddleBody;&#xD;&#xA;				 md.target.set(locationWorld);&#xD;&#xA;				 md.collideConnected = true;&#xD;&#xA;				 md.maxForce = (float)(1000.0f * _paddleBody.getMass());&#xD;&#xA;				 _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;				 _paddleBody.setAwake(true);&#xD;&#xA;			 }&#xD;&#xA;			}&#xD;&#xA;		 //return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			&#xD;&#xA;			return true;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35466" PostHistoryTypeId="2" PostId="15590" RevisionGUID="f83dc1c2-5dc2-412f-8580-1dfd77555667" CreationDate="2011-08-05T03:04:57.403" UserId="51" Text="The key difference between obj-c and pretty much any other language is that you don't have to check for `null` (or `nil` in obj-c).  Basically you need to see what line your exception is occurring on, and wrap that with a null check." />
  <row Id="35467" PostHistoryTypeId="2" PostId="15591" RevisionGUID="28787be8-8221-41d7-b305-df77226d9f84" CreationDate="2011-08-05T03:08:00.370" UserId="8240" Text="This is an old question, but the current answer doesn't really explain what you would use them for.&#xD;&#xA;&#xD;&#xA;It's all about saving space. And with vertex attributes, less space can mean higher performance (if you're vertex transfer bound).&#xD;&#xA;&#xD;&#xA;Colors typically don't need much more than 8-bits per component. Sometimes you need 16-bits, if it's a HDR light value or something. But for surface characteristics (which is what most vertex attributes are), 8 bits is fine. So unsigned normalized bytes are a good vertex format.&#xD;&#xA;&#xD;&#xA;Texture coordinates do not need 32-bits of floating-point precision. A 16-bit value from [0, 1] is sufficient. So normalized unsigned shorts are a reasonable vertex format.&#xD;&#xA;&#xD;&#xA;Normals *never* need 32-bits of precision. They're directions. 8-bit signed normalized bytes tend to be a bit small, but 10-bit normalized values are good enough most of the time. OpenGL (3.3+) even allows you to use 10-bit normals via a 10/10/10/2 bit packed format, stored in a single 32-bit unsigned integer.&#xD;&#xA;&#xD;&#xA;You can even play games with vertex positions, if you find yourself in grave need of more memory.&#xD;&#xA;&#xD;&#xA;Without normalization, you would have to waste precious cycles in your shader dividing byte attributes by 255.0. Why do this, when the hardware can do it *for free?*" />
  <row Id="35468" PostHistoryTypeId="25" PostId="15582" RevisionGUID="a88cc5da-96a3-4583-84a8-dd0c570717dc" CreationDate="2011-08-05T03:36:43.607" Comment="http://twitter.com/#!/StackGameDev/status/99322917673902080" />
  <row Id="35469" PostHistoryTypeId="2" PostId="15592" RevisionGUID="6610ce81-ba1c-4350-a8ea-3b380b7132f3" CreationDate="2011-08-05T03:56:08.357" UserId="9066" Text="When your spriteBurger.spriteSpeed is set to -2 (when it's moving upwards I'm guessing) the following line of code you have won't have any effect:&#xD;&#xA;&#xD;&#xA;    spriteBurger.spriteSpeed.Y = -1 * Math.Abs(spriteBurger.spriteSpeed.Y);&#xD;&#xA;&#xD;&#xA;This is because you're essentially saying -1 * 2 which equals -2, which is where you started.&#xD;&#xA;&#xD;&#xA;You can simply use the following code to reverse the direction your spriteBurger is going:&#xD;&#xA;&#xD;&#xA;    spriteBurger.spriteSpeed.Y = -spriteBurger.spriteSpeed.Y;&#xD;&#xA;&#xD;&#xA;Based on looking at the code above though, I don't think spriteBurger.spriteSpeed.Y is ever set to -2 so I'm not sure what the change above will do for you." />
  <row Id="35470" PostHistoryTypeId="5" PostId="15589" RevisionGUID="8019c031-43d1-46f3-a781-bff549f84ce3" CreationDate="2011-08-05T04:48:31.017" UserId="1430" Comment="normalizing the formatting" Text="I was thinking about a game engine development, I understand as engine the main program that can develope next duties: &#xD;&#xA;&#xD;&#xA;1. Receives parameters.&#xD;&#xA;1. calculates what is needed.&#xD;&#xA;1. Delivers results.&#xD;&#xA;&#xD;&#xA;As an example lets say I'm writing an sports game, so I was thinking that instead of starting with something big I could start with a very small objectives and always (now not even thinking in graphics management so maybe I could be speaking about a simulation and not yet even about a game) just getting data result through the shell.&#xD;&#xA;&#xD;&#xA;What about next steps?&#xD;&#xA;&#xD;&#xA;1. Develop an script which gets all the data stored in a database and after calculating everything based on that data it releases the result of the match or race.&#xD;&#xA;1. Get more in detail and a part of calculating the result it delivers too details through the match or race (not jet in real time).&#xD;&#xA;1. In that third stage what it happens is that the program will temporize the details and final result progress in real time through the shell delivering messages before the final result.&#xD;&#xA;1. Though the real time data delivering the user will be available to interact introducing parameters when is asked.&#xD;&#xA;&#xD;&#xA;Many thanks I hope it gets your interest, I'm just trying to clarify the process and catch advice and suggestions from experienced people." />
  <row Id="35471" PostHistoryTypeId="4" PostId="15589" RevisionGUID="8019c031-43d1-46f3-a781-bff549f84ce3" CreationDate="2011-08-05T04:48:31.017" UserId="1430" Comment="normalizing the formatting" Text="Is my &quot;engine&quot; development process ideal?" />
  <row Id="35472" PostHistoryTypeId="5" PostId="15587" RevisionGUID="562c2078-1877-4af8-b2f4-4b5e20e883e6" CreationDate="2011-08-05T05:00:00.260" UserId="1430" Comment="deleted 51 characters in body" Text="I am trying to make a pong game that uses a burger as a ball and a plate as its paddle. I have everything right except that the burger goes right through the plate. Can anyone help me?&#xD;&#xA;&#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Audio;&#xD;&#xA;    using Microsoft.Xna.Framework.Content;&#xD;&#xA;    using Microsoft.Xna.Framework.GamerServices;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Media;&#xD;&#xA;    &#xD;&#xA;    namespace Burger_Attack_Mitch_McCauley&#xD;&#xA;    {&#xD;&#xA;        /// &lt;summary&gt;&#xD;&#xA;        /// This is the main type for your game&#xD;&#xA;        /// &lt;/summary&gt;&#xD;&#xA;        public class Game1 : Microsoft.Xna.Framework.Game&#xD;&#xA;        {&#xD;&#xA;            GameSprite myGameSprite;&#xD;&#xA;            GraphicsDeviceManager graphics;&#xD;&#xA;            SpriteBatch spriteBatch;&#xD;&#xA;    &#xD;&#xA;            Texture2D imageBurger;&#xD;&#xA;            Texture2D imagePlate;&#xD;&#xA;            Texture2D imageStart;&#xD;&#xA;            Texture2D imageEnd;&#xD;&#xA;    &#xD;&#xA;            KeyboardState keyState_01;&#xD;&#xA;            KeyboardState keyState_01_Old;&#xD;&#xA;    &#xD;&#xA;            GamePadState pad_01;&#xD;&#xA;            GamePadState pad_01_Old;&#xD;&#xA;    &#xD;&#xA;            int intGameState;&#xD;&#xA;    &#xD;&#xA;            GameSprite spriteStartScreen_01;&#xD;&#xA;            GameSprite spriteEndScreen_01;&#xD;&#xA;            GameSprite spritePlate;&#xD;&#xA;            GameSprite spriteBurger;&#xD;&#xA;    &#xD;&#xA;            public Game1()&#xD;&#xA;            {&#xD;&#xA;                graphics = new GraphicsDeviceManager(this);&#xD;&#xA;                Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Allows the game to perform any initialization it needs to before starting to run.&#xD;&#xA;            /// This is where it can query for any required services and load any non-graphic&#xD;&#xA;            /// related content.  Calling base.Initialize will enumerate through any components&#xD;&#xA;            /// and initialize them as well.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void Initialize()&#xD;&#xA;            {&#xD;&#xA;                &#xD;&#xA;                // TODO: Add your initialization logic here&#xD;&#xA;    &#xD;&#xA;                &#xD;&#xA;    &#xD;&#xA;                myGameSprite = new GameSprite();&#xD;&#xA;    &#xD;&#xA;               &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                spriteStartScreen_01 = new GameSprite();&#xD;&#xA;                spriteEndScreen_01 = new GameSprite();&#xD;&#xA;                spritePlate = new GameSprite(300, 425, 150, 50);&#xD;&#xA;                spriteBurger = new GameSprite(300, 300, 150, 100, 1, -1);&#xD;&#xA;    &#xD;&#xA;                intGameState = 5;&#xD;&#xA;    &#xD;&#xA;                base.Initialize();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// LoadContent will be called once per game and is the place to load&#xD;&#xA;            /// all of your content.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void LoadContent()&#xD;&#xA;            {&#xD;&#xA;                // Create a new SpriteBatch, which can be used to draw textures.&#xD;&#xA;                spriteBatch = new SpriteBatch(GraphicsDevice);&#xD;&#xA;    &#xD;&#xA;               &#xD;&#xA;    &#xD;&#xA;                imageBurger = Content.Load&lt;Texture2D&gt;(&quot;Images\\DeathBurger&quot;);&#xD;&#xA;                imagePlate = Content.Load&lt;Texture2D&gt;(&quot;Images\\Plate&quot;);&#xD;&#xA;                imageStart = Content.Load&lt;Texture2D&gt;(&quot;Images\\StartScreen_01&quot;);&#xD;&#xA;                imageEnd = Content.Load&lt;Texture2D&gt;(&quot;Images\\EndScreen_01&quot;);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                spriteStartScreen_01.spriteTexture = imageStart;&#xD;&#xA;                spriteEndScreen_01.spriteTexture = imageEnd;&#xD;&#xA;                spriteBurger.spriteTexture = imageBurger;&#xD;&#xA;                spritePlate.spriteTexture = imagePlate;&#xD;&#xA;    &#xD;&#xA;                    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                // TODO: use this.Content to load your game content here&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// UnloadContent will be called once per game and is the place to unload&#xD;&#xA;            /// all content.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            protected override void UnloadContent()&#xD;&#xA;            {&#xD;&#xA;                // TODO: Unload any non ContentManager content here&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// Allows the game to run logic such as updating the world,&#xD;&#xA;            /// checking for collisions, gathering input, and playing audio.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;            protected override void Update(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                // Allows the game to exit&#xD;&#xA;                if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)&#xD;&#xA;                    this.Exit();&#xD;&#xA;    &#xD;&#xA;                GetUserInput();&#xD;&#xA;                ChangeGameState();&#xD;&#xA;                &#xD;&#xA;                switch (intGameState)&#xD;&#xA;                {&#xD;&#xA;                    case 5:&#xD;&#xA;                        break;&#xD;&#xA;                        &#xD;&#xA;                    case 86:&#xD;&#xA;                        break;&#xD;&#xA;                    default:&#xD;&#xA;                        MoveUserControlledSprites();&#xD;&#xA;                        MoveSprites();&#xD;&#xA;                        TestForCollisions();&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;                // TODO: Add your update logic here&#xD;&#xA;    &#xD;&#xA;                base.Update(gameTime);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// &lt;summary&gt;&#xD;&#xA;            /// This is called when the game should draw itself.&#xD;&#xA;            /// &lt;/summary&gt;&#xD;&#xA;            /// &lt;param name=&quot;gameTime&quot;&gt;Provides a snapshot of timing values.&lt;/param&gt;&#xD;&#xA;            protected override void Draw(GameTime gameTime)&#xD;&#xA;            {&#xD;&#xA;                GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;    &#xD;&#xA;                spriteBatch.Begin();&#xD;&#xA;    &#xD;&#xA;                switch (intGameState)&#xD;&#xA;                {&#xD;&#xA;                    case 5:&#xD;&#xA;                        spriteBatch.Draw(spriteStartScreen_01.spriteTexture,&#xD;&#xA;                            spriteStartScreen_01.spritePos, Color.White);&#xD;&#xA;                        break;&#xD;&#xA;    &#xD;&#xA;                    case 86:&#xD;&#xA;                        spriteBatch.Draw(spriteEndScreen_01.spriteTexture,&#xD;&#xA;                            spriteEndScreen_01.spritePos, Color.White);&#xD;&#xA;                        break;&#xD;&#xA;                    default:&#xD;&#xA;    &#xD;&#xA;                        spriteBatch.Draw(spriteBurger.spriteTexture,&#xD;&#xA;                            spriteBurger.spritePos, Color.White);&#xD;&#xA;                        spriteBatch.Draw(spritePlate.spriteTexture,&#xD;&#xA;                            spritePlate.spritePos, Color.White);&#xD;&#xA;                        break;&#xD;&#xA;                }&#xD;&#xA;                spriteBatch.End();&#xD;&#xA;    &#xD;&#xA;                // TODO: Add your drawing code here&#xD;&#xA;    &#xD;&#xA;                base.Draw(gameTime);&#xD;&#xA;            }&#xD;&#xA;            private void GetUserInput()&#xD;&#xA;            {&#xD;&#xA;                keyState_01_Old = keyState_01;&#xD;&#xA;                pad_01_Old = pad_01;&#xD;&#xA;    &#xD;&#xA;                keyState_01 = Keyboard.GetState();&#xD;&#xA;                pad_01 = GamePad.GetState(PlayerIndex.One);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;                private void ChangeGameState()&#xD;&#xA;                {if (intGameState == 5 &amp;&amp;&#xD;&#xA;                    pad_01.Buttons.B == ButtonState.Pressed &amp;&amp;&#xD;&#xA;                    pad_01_Old.Buttons.B == ButtonState.Released)&#xD;&#xA;                {&#xD;&#xA;                    intGameState = 10;&#xD;&#xA;                }&#xD;&#xA;                    if (intGameState == 5 &amp;&amp;&#xD;&#xA;                        keyState_01.IsKeyDown (Keys.Space) &amp;&amp;&#xD;&#xA;                        keyState_01_Old.IsKeyUp(Keys.Space))&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 10;&#xD;&#xA;                    }&#xD;&#xA;                     &#xD;&#xA;                    if (intGameState == 86 &amp;&amp;&#xD;&#xA;                        pad_01.Buttons.B == ButtonState. Pressed &amp;&amp;&#xD;&#xA;                            pad_01_Old.Buttons.B == ButtonState.Released)&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 5;&#xD;&#xA;                        spriteBurger.spritePos.X = 300;&#xD;&#xA;                        spriteBurger.spritePos.Y = 0;&#xD;&#xA;                    }&#xD;&#xA;                    &#xD;&#xA;                    if (intGameState == 86 &amp;&amp;&#xD;&#xA;                        keyState_01.IsKeyDown(Keys.Space) &amp;&amp;&#xD;&#xA;                        keyState_01_Old.IsKeyUp(Keys.Space))&#xD;&#xA;                    {&#xD;&#xA;                        intGameState = 5;&#xD;&#xA;                        spriteBurger.spritePos.X = 300;&#xD;&#xA;                        spriteBurger.spritePos.Y = 0;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                    private void MoveSprites()&#xD;&#xA;                    {&#xD;&#xA;                        if (spriteBurger.spritePos.X &lt;= 0)&#xD;&#xA;                        {&#xD;&#xA;                            spriteBurger.spriteSpeed.X = 2;&#xD;&#xA;                        }&#xD;&#xA;                        if (spriteBurger.spriteSpeed.Y &lt;= 0)&#xD;&#xA;                        {&#xD;&#xA;                            spriteBurger.spriteSpeed.Y = 2;&#xD;&#xA;                        }&#xD;&#xA;                        if (spriteBurger.spritePos.X +&#xD;&#xA;                            spriteBurger.spriteDims.X &gt;=&#xD;&#xA;                            Window.ClientBounds.Width)&#xD;&#xA;                        {&#xD;&#xA;                            spriteBurger.spriteSpeed.X = -2;&#xD;&#xA;                        }&#xD;&#xA;                        if (spriteBurger.spritePos.Y +&#xD;&#xA;                            spriteBurger.spriteDims.Y &gt;+&#xD;&#xA;                            Window.ClientBounds.Height)&#xD;&#xA;                        {&#xD;&#xA;                            intGameState = 86;&#xD;&#xA;                        }&#xD;&#xA;                        spriteBurger.spritePos.X += spriteBurger.spriteSpeed.X;&#xD;&#xA;                        spriteBurger.spritePos.Y += spriteBurger.spriteSpeed.Y;&#xD;&#xA;                    }&#xD;&#xA;            private void MoveUserControlledSprites()&#xD;&#xA;            {&#xD;&#xA;                if (keyState_01.IsKeyDown(Keys.Left))&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X -= 3;&#xD;&#xA;                }&#xD;&#xA;                if (keyState_01.IsKeyDown(Keys.Right))&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X += 3;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                spritePlate.spritePos.X += pad_01.ThumbSticks.Right.X * 5;&#xD;&#xA;                &#xD;&#xA;                if (spritePlate.spritePos.X &lt; 0)&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X = 0;&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if (Window.ClientBounds.Width &lt; (spritePlate.spritePos.X + spritePlate.spriteDims.X))&#xD;&#xA;                {&#xD;&#xA;                    spritePlate.spritePos.X = (Window.ClientBounds.Width - spritePlate.spriteDims.X);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            private void TestForCollisions()&#xD;&#xA;            {&#xD;&#xA;                Rectangle plateRect = new Rectangle(&#xD;&#xA;                    (int)spritePlate.spritePos.X,&#xD;&#xA;                    (int)spritePlate.spritePos.Y,&#xD;&#xA;                    (int)spritePlate.spriteDims.X,&#xD;&#xA;                    (int)spritePlate.spriteDims.Y);&#xD;&#xA;    &#xD;&#xA;                Rectangle burgerRect = new Rectangle(&#xD;&#xA;                    (int)spriteBurger.spritePos.X,&#xD;&#xA;                    (int)spriteBurger.spritePos.Y,&#xD;&#xA;                    (int)spriteBurger.spriteDims.X,&#xD;&#xA;                    (int)spriteBurger.spriteDims.Y);&#xD;&#xA;    &#xD;&#xA;                if (plateRect.Intersects(burgerRect))&#xD;&#xA;                {&#xD;&#xA;                    spriteBurger.spriteSpeed.Y = -1 *&#xD;&#xA;                        Math.Abs(spriteBurger.spriteSpeed.Y);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }" />
  <row Id="35473" PostHistoryTypeId="8" PostId="15589" RevisionGUID="0cce529a-502a-40f6-a4bb-833afc9742b5" CreationDate="2011-08-05T05:34:15.877" UserId="8830" Comment="Rollback to [1d5fe1c1-e171-445a-ba70-45386959a637]" Text="I was thinking about a game engine development, I understand as Engine the main program that can develope next duties: &#xD;&#xA;&#xD;&#xA;**1. Receives parameters.**&#xD;&#xA;&#xD;&#xA;**2. calculates what is needed.**&#xD;&#xA;&#xD;&#xA;**3. Delivers results.** &#xD;&#xA;&#xD;&#xA; As an example lets say I'm writing an sports game, so I was thinking that instead of starting with something big I could start with a very small objectives and always **(now not even thinking in graphics management so maybe I could be speaking about a simulation and not yet even about a game)** just getting data result through the shell.&#xD;&#xA;&#xD;&#xA;What about next steps?:&#xD;&#xA;#1.#&#xD;&#xA; Develop an script wich gets all the data stored in a database and after calculating everything based on that data it releases the result of the match or race.&#xD;&#xA;&#xD;&#xA;#2.#&#xD;&#xA; Get more in detail and a part of calculating the result it delivers too details through the match or race (not jet in real time).&#xD;&#xA;&#xD;&#xA;#3.#&#xD;&#xA; In that third stage what it happens is that the program will temporize the details and final result progress in real time through the shell delivering messages before the final result.&#xD;&#xA;&#xD;&#xA;#4.#&#xD;&#xA; though the real time data delivering the user will be available to interact introducing parameters when is asked.&#xD;&#xA;&#xD;&#xA; Many thanks I hope it gets your interest, I'm just trying to clarify the process and catch advice and sugestions from experienced people." />
  <row Id="35474" PostHistoryTypeId="7" PostId="15589" RevisionGUID="0cce529a-502a-40f6-a4bb-833afc9742b5" CreationDate="2011-08-05T05:34:15.877" UserId="8830" Comment="Rollback to [1d5fe1c1-e171-445a-ba70-45386959a637]" Text="is my &quot;Engine&quot; development process right? need advice" />
  <row Id="35475" PostHistoryTypeId="2" PostId="15593" RevisionGUID="999668db-6456-41bc-bca0-921baffe056d" CreationDate="2011-08-05T06:03:39.387" UserId="2897" Text="I guess it is for another minecraft-inspired game, so &quot;a lot&quot; means several million cubes :) &#xD;&#xA;Well, be it minecraft, warcraft, XNA, OGL or whatever else, the task of drawing &quot;a lot of anything&quot; consists of two parts:&#xD;&#xA;&#xD;&#xA; - Reducing the size of the task.&#xD;&#xA; - Making the actual drawing efficient.&#xD;&#xA;&#xD;&#xA;It's possible to write an entire book about these problem facets, so let's keep it simple.&#xD;&#xA;&#xD;&#xA;**How to reduce the amount of the cubes you need to worry about?** Use [octrees][1] and perform frustum culling for visibility determination.&#xD;&#xA;&#xD;&#xA;**How to optimize the draw method for lots of cubes?** Large number of cubes (maybe even all of them depending on your approach) will share the same material, so it will be easy to utilize [instancing][2].&#xD;&#xA;&#xD;&#xA;Then again, depending on how much &quot;a lot&quot; actually is, you may want to stop caring about rendering optimizations at all. With the modern hardware you can draw like ten million of textured cubes easily with almost no hassle: just divide them into large chunks and draw with basic batching and a simple index buffer.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/7161/what-library-for-octrees-or-kd-trees&#xD;&#xA;  [2]: http://create.msdn.com/en-US/education/catalog/sample/mesh_instancing" />
  <row Id="35476" PostHistoryTypeId="25" PostId="15548" RevisionGUID="5bebf059-a118-4fee-a778-c9ea6bb23c50" CreationDate="2011-08-05T06:36:43.593" Comment="http://twitter.com/#!/StackGameDev/status/99368216366817280" />
  <row Id="35477" PostHistoryTypeId="2" PostId="15594" RevisionGUID="f46f9e60-da0a-4706-9227-dd707a63f906" CreationDate="2011-08-05T07:46:13.433" UserId="8050" Text="As far as I understand - *and I'm not sure to have understood right* - you are describing something like a test-driven developing system.&#xD;&#xA;&#xD;&#xA;If it is your case you should focus on: adding a functionality, test for (some sort of) correctness, test it does not break existing functionalities, profile it, tune performace.&#xD;&#xA;&#xD;&#xA;Your engine should be a kind of library that has the responsibility to abstract a complexity. What are the complexities on your game? How can those breaked down into decoupled ones? How each complexity can be abstracted throught functionalities?&#xD;&#xA;&#xD;&#xA;What you described should be seen into a process of testing the incremental adding of functionalities. In this scenario you can use mock data so you can foresee the results and mantain the functionalities decoupling." />
  <row Id="35478" PostHistoryTypeId="2" PostId="15595" RevisionGUID="cd46b235-6551-4034-931d-df4ae3bd36d9" CreationDate="2011-08-05T07:58:31.843" UserId="6521" Text="First keep in mind that with rasterization there technically is no such thing as true resolution independence. With high enough magnification individual texels will start to become visible. The only solution to this is to write a vector graphics system.&#xD;&#xA;&#xD;&#xA;That being said there are a few steps to creating a robust raster based resolution independent system: sizing, coordinate systems, and layout.&#xD;&#xA;&#xD;&#xA;For sizing and positioning we need to use some set of units that maintain a ratio to the actual application resolution. In this case lets use inches because I'm American and you can scale elements with DPI (dots per inch). For example lets say your application is running at 800x600. Default Windows DPI is 96 so that means the application has a resolution of (800 / 96) x (600 / 96) inches or 8.33x6.25 inches.&#xD;&#xA;&#xD;&#xA;Since you need to be able to work with, at the very least, both 4:3 and 16:9 aspect ratios how you handle your screen coordinate system gets a little bit tricky. What I recommend doing is putting (0,0) in the center of the display area (as well as windows and controls). This works well because if you put (0,0) in a corner then as that corner moves around based on resolution and aspect ratio it's going to translate all of your sprites whereas the center of the screen will always be the center of the screen no matter the device. Continuing our example with 800x600 this would result in a coordinate system that is (left to right) -4.165in to 4.165in and (top to bottom) 3.125in to -3.125in.&#xD;&#xA;&#xD;&#xA;So at the moment you have DPI independent UI system with items that will always be at the same spot relative to the center of the screen - not quite resolution independent. Fortunately what DPI independence allows you to do is scale the UI by scaling DPI based on some heuristic. For example we can scale DPI using vertical resolution as our heuristic. If 800x600 is 96 DPI then we'll use 123 DPI for 1024x768 or 115 DPI for 1280x720.&#xD;&#xA;&#xD;&#xA;Lastly you will need to build a layout system that handles both absolute positioning as well as relative positioning. Excellent examples of this are WPF and the web. You can specify that controls/boxes fill some % of the parent element while docking it to an edge along with many other useful automatic layout options. All of this together will result in a UI system capable of looking nearly identical across many different resolutions and aspect ratios.&#xD;&#xA;&#xD;&#xA;To summarize I highly recommend you study WPF as it does nearly all of this except it maintains an origin at the top-left corner coordinate system and doesn't automatically scale DPI based on vertical resolution." />
  <row Id="35479" PostHistoryTypeId="2" PostId="15596" RevisionGUID="fb8b466f-6075-487a-9652-69a23d0f4ca0" CreationDate="2011-08-05T08:13:07.270" UserId="6521" Text="All you need to do is set a new RasterizerState object on your GraphicsDevice that specifies wireframe (or not). Specifically to accomplish what you're trying to do here are the steps:&#xD;&#xA;&#xD;&#xA; 1. Draw your vertex buffer with depth &amp; depth write enabled and filled shading&#xD;&#xA; 2. On your GraphicsDevice object set a new RasterizerState that specifies wireframe and a new DepthStencilState that disables both depth testing and depth writing&#xD;&#xA; 3. Draw the same vertex buffer again but use a different effect. For example when you draw the wireframe mesh only output a constant color or maybe just vertex colors. If you don't change the Effect being used then the wireframe mesh won't show up because it'll be the same color as the original.&#xD;&#xA;&#xD;&#xA;This is all accomplished with only 1 vertex buffer." />
  <row Id="35480" PostHistoryTypeId="2" PostId="15597" RevisionGUID="14301265-f38e-4159-9433-4abca3ce9fec" CreationDate="2011-08-05T08:36:57.257" UserId="2897" Text="Mitch, you're going to run into a lot of similar problems on your way to the finished game.  It's often pointless to ask others to debug your code, especially when it's not so hard to do it yourself. Like they say, “Teach a man to fish; and you will not have to listen to his questions about debugging basics”, so lets do a debugging 101:&#xD;&#xA;&#xD;&#xA;You say that a ball goes right trough a paddle. A simple assumption can be made that either collision check via rectangle bounds or reaction to the ball after collision is wrong. Lets see if its one of these cases:&#xD;&#xA;&#xD;&#xA; 1. Place a breakpoint in the body of condition `if (plateRect.Intersects(burgerRect)) {...}` and see if it hits. &#xD;&#xA; 2. If it does hit, collision is working and your modification of ball's coordinates does not work.&#xD;&#xA; 3. If it doesn't hit, collision is not working. Place a breakpoint after creation of your two bounding rectangles and check their properties, especially this spriteDims thingies.&#xD;&#xA; 4. If everything is seemingly fine, look at your sources again, check every coordinate assignment, breakpoint every line if you have to, and sooner or later you will catch a bug :)&#xD;&#xA;&#xD;&#xA;Further down the development process you will probably want to increase difficulty over time by increasing your ball's speed, and at one point it may start going through paddle again :) &#xD;&#xA;&#xD;&#xA;When collisions are done with a naive collision check and assignments like `spritePos.Y += spriteSpeed.Y`, your ball can go right through paddle even if everything is seemingly right; e.g. if a ball's position is increased by a number which is larger than a paddle's bounding rectangle dimension. You may want to google &quot;collision detection&quot;, there are a lot of good things to read." />
  <row Id="35481" PostHistoryTypeId="5" PostId="2655" RevisionGUID="e1702bcf-b2fd-4aa8-9787-8275c5aaae10" CreationDate="2011-08-05T09:18:00.657" UserId="1141" Comment="added 686 characters in body" Text="At least part of it looks like a variabe-length list of the format: (number of entities) [(entity ID) times the number]:&#xD;&#xA;&#xD;&#xA;    00000001 3100026f 00000001 30000112&#xD;&#xA;&#xD;&#xA;-&gt; two lists of 1 entity each&#xD;&#xA;&#xD;&#xA;    00000003 310001f6 310001f6 310001f6&#xD;&#xA;&#xD;&#xA;-&gt; one list of 3 entities&#xD;&#xA;&#xD;&#xA;What those might *mean*, though? No idea. It doesn't look like a floating-point number (at least not an IEEE-754 one). It would be some unpractically (for a 3D artist) small numbers, on the order of 1E-9. It's more likely something like a bunch of flags and/or IDs. EDIT: Or byte offsets into the file, for that matter.&#xD;&#xA;&#xD;&#xA;--------------------&#xD;&#xA;EDIT: So far, the format looks like follows (guessing some info):&#xD;&#xA;&#xD;&#xA;    [amount of sub-models]:uint_32&#xD;&#xA;    [amount of data for first (unknown) block]:uint_32&#xD;&#xA;    [unknown data]:array of uint_32&#xD;&#xA;    [amount of data in the second (unknown) block]:uint_32&#xD;&#xA;    [unknown data]:array of uint_32&#xD;&#xA;    [amount of vertices]:uint_32&#xD;&#xA;    [vertex data]:array of vertex_data&#xD;&#xA;&#xD;&#xA;vertex_data looks like follows:&#xD;&#xA;&#xD;&#xA;    [position]:vector3 of float&#xD;&#xA;    [normal]:vector3 of float, normalised&#xD;&#xA;    [UV_mapping]:vector2 of float, in the range [0.0f ... 1.0f]&#xD;&#xA;    [first unknown normal]:vector3 of float, normalised&#xD;&#xA;    [second unknown normal]:vector3 of float, normalised&#xD;&#xA;" />
  <row Id="35482" PostHistoryTypeId="2" PostId="15598" RevisionGUID="dd38941c-6b13-40b5-b21d-a0f9ff8f7374" CreationDate="2011-08-05T09:26:24.757" UserId="7640" Text="I'm not sure there's such a thing as what you're describing. Everything is/can be made out of convex shapes, especially in graphics/physics math (this makes operating on bodies much easier)&#xD;&#xA;&#xD;&#xA;It's more about finding, making, and implementing algorithms that break complex shapes down into as few simple shapes as possible. This is called **Polygon Partitioning**, and to do this i would suggest this [simple, nearly includable library][1]:&#xD;&#xA;&#xD;&#xA;Physics math can much more accurately work with curved items such as circles though, as there are very quick equations when shapes have a common radius. I would suggest simply putting **circles (or only a section of a cirlce) and polygons** together to form whatever curved, pointy, or other crazy shapes you want to make. *And again there are most likely algorithms for this out there even now.*&#xD;&#xA;&#xD;&#xA;also if you didn't know; **sine and cos waves** are very helpful for making curved hills and such.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/polypartition/" />
  <row Id="35483" PostHistoryTypeId="5" PostId="15598" RevisionGUID="a2973105-1c83-4477-8aea-2c11ca065b16" CreationDate="2011-08-05T09:34:44.267" UserId="7640" Comment="added 195 characters in body" Text="I'm not sure there's such a thing as what you're describing. Everything is/can be made out of convex shapes, especially in graphics/physics math (this makes operating on bodies much easier)&#xD;&#xA;&#xD;&#xA;It's more about finding, making, and implementing algorithms that break complex shapes down into as few simple shapes as possible. This is called **Polygon Partitioning**, and to do this i would suggest this [simple, nearly includable library][1]:&#xD;&#xA;&#xD;&#xA;Physics math can much more accurately work with curved items such as circles though, as there are very quick equations when shapes have a common radius. I would suggest simply putting **circles (or only a section of a cirlce) and polygons** together to form whatever curved, pointy, or other crazy shapes you want to make. *And again there are most likely algorithms for this out there even now.*&#xD;&#xA;&#xD;&#xA;you can also put &quot;holes&quot; into shapes by adding a &quot;hole&quot; shape to a body, and then test at run time whether a colliding shape is inside the whole or not. Then don't do any collision if it is. &#xD;&#xA;&#xD;&#xA;also if you didn't know; **sine and cos waves** are very helpful for making curved hills and such.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/polypartition/" />
  <row Id="35484" PostHistoryTypeId="25" PostId="15585" RevisionGUID="47528001-e54c-4105-aefa-4fc5293a0bfa" CreationDate="2011-08-05T09:36:43.500" Comment="http://twitter.com/#!/StackGameDev/status/99413514732584960" />
  <row Id="35485" PostHistoryTypeId="2" PostId="15599" RevisionGUID="47fde035-67c4-4bf9-b66b-f3abf299a9fa" CreationDate="2011-08-05T09:54:18.527" UserId="6831" Text="When I worked with the NDK a year ago, I build the .so file with the NDK make. Then I copied the .so from the NDK to the /lib folder of my project. It worked without a problem.&#xD;&#xA;Do the method names in your NDK-Project match the fully qualified class-/methodnames of the classes where you want to call the JNI functions?&#xD;&#xA;If you have a class:&#xD;&#xA;&#xD;&#xA;    package com.example;&#xD;&#xA;     public class Foo{&#xD;&#xA;      native public void bar();&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Then the method in your C file must be something like:&#xD;&#xA;&#xD;&#xA;    void com_example_Foo_bar();&#xD;&#xA;&#xD;&#xA;If that didn't help, could you then post the exception?" />
  <row Id="35486" PostHistoryTypeId="2" PostId="15600" RevisionGUID="f3a53aff-39c7-49bb-b584-8e3524010dc7" CreationDate="2011-08-05T09:55:37.313" UserId="744" Text="The `Group` class (for which `RenderPlain` has been a deprecated alias for many years) is more a logical tool than a performance tool. It provides no speed benefit over looping over the sprites yourself. If you are constructing it every frame, it's definitely a net negative.&#xD;&#xA;&#xD;&#xA;What you should do instead is replace your `l_sprites` list of sprites with a group directly. Rather than appending sprites to the list, add them to the group. This lets you use &lt;a href=&quot;http://www.pygame.org/docs/ref/sprite.html#Group.update&quot;&gt;Group.update&lt;/a&gt; to update the sprites rather than rolling your own update loop. It also lets sprites remove themselves from the group using &lt;a href=&quot;http://www.pygame.org/docs/ref/sprite.html#Sprite.kill&quot;&gt;Sprite.kill&lt;/a&gt;, which is often a more convenient way to remove them.&#xD;&#xA;&#xD;&#xA;If you want a performance gain out of using sprite groups, you should turn to &lt;a href=&quot;http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.RenderUpdates&quot;&gt;RenderUpdates&lt;/a&gt;, which returns a list of rectangles appropriate for passing to &lt;a href=&quot;http://www.pygame.org/docs/ref/display.html#pygame.display.update&quot;&gt;pygame.display.update&lt;/a&gt;.&#xD;&#xA;&#xD;&#xA;(If you want good performance, you should give up Pygame's sprite library and turn to OpenGL or one of its Python wrappers instead.)" />
  <row Id="35487" PostHistoryTypeId="2" PostId="15601" RevisionGUID="c854b502-8842-46db-931e-e8bd0b8c3709" CreationDate="2011-08-05T10:21:16.807" UserId="9073" Text="I've been searching every where for clear answer, and have yet to find one. Im basically trying to mimic 'FindGameObjectsWithTag' with FindGameObjectswithName'. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on instantiation through the inspector.&#xD;&#xA;&#xD;&#xA; My goal is create multiple enemy spawners. My current spawner has a drag and drop variable for enemyprefabs. It looks for enemies tagged &quot;ReSpawn&quot;, then checks if that length is below (x) to start spawning more. I would like to upgrade my current single spawner to still check for enemies name respawn, but then check if those respawn have a child object named &quot;blank&quot; (an input string name I can specify in the editor). &#xD;&#xA;&#xD;&#xA;This way, I can set the enemy spawners anywhere (near water, tall grass, forests, etc), and when I defeat one, the specific spawner will instantiate one of its opponent for that area.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var ThisSpot:String;&#xD;&#xA;    var Oppos : GameObject [];&#xD;&#xA;    var OppoCount : GameObject [];&#xD;&#xA;    &#xD;&#xA;    var HowMany = 3;&#xD;&#xA;    var spawnSizeArea = 25;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Start(){&#xD;&#xA;    StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Update () {&#xD;&#xA;    &#xD;&#xA;    OppoCount = GameObject.FindGameObjectsWithTag(&quot;Respawn&quot;);&#xD;&#xA;    // OppoCount = GameObject.FindWithName(ThisSpot);  This is what I am trying to achieve&#xD;&#xA;    &#xD;&#xA;    if(OppoCount.length &lt; HowMany){&#xD;&#xA;    &#xD;&#xA;    StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Spawn(){&#xD;&#xA;    &#xD;&#xA;    var length = Oppos.length-1;&#xD;&#xA;    var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;    curSpawn = Oppos[index];&#xD;&#xA;    &#xD;&#xA;    var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;    var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;    &#xD;&#xA;    Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;    &#xD;&#xA;    // Then I could use these 2 lines of code below to use multiple spawners&#xD;&#xA;    &#xD;&#xA;    //var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;    //newOp.transform.Find(&quot;fighter&quot;).gameObject.name=ThisSpot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for anyhelp, anyone" />
  <row Id="35488" PostHistoryTypeId="1" PostId="15601" RevisionGUID="c854b502-8842-46db-931e-e8bd0b8c3709" CreationDate="2011-08-05T10:21:16.807" UserId="9073" Text="Unity3d- Find all Game Objects with an Input string name (not Tag)" />
  <row Id="35489" PostHistoryTypeId="3" PostId="15601" RevisionGUID="c854b502-8842-46db-931e-e8bd0b8c3709" CreationDate="2011-08-05T10:21:16.807" UserId="9073" Text="&lt;engine&gt;&lt;javascript&gt;" />
  <row Id="35490" PostHistoryTypeId="2" PostId="15602" RevisionGUID="dc4d2eb8-351f-4923-86e1-a692c57661e8" CreationDate="2011-08-05T10:29:05.533" UserId="5473" Text="&gt; I now badly need a physics library which can use boolean shapes (ie;&#xD;&#xA;&gt; cutting a circle out of a square) and/or curved surfaces&#xD;&#xA;&#xD;&#xA;The term you are looking for is&#xD;&#xA;&#xD;&#xA; - (2D) CPG -- constructive planar geometry&#xD;&#xA; - (3D) CSG -- constructive solid geometry&#xD;&#xA;&#xD;&#xA;If you can live without curves (at least in your cut-out areas), go for the approach @Den &#xD;&#xA;suggests.&#xD;&#xA;&#xD;&#xA;If you need to be able to slice polygons along curves, you are pretty much going to have to find a CSG library such as [GPC][1]. And you are going to have to be able to find one that supports spline-based polygons in its intersections. And then you are going to have to transport that spline data into Box2D. And be warned -- good CPG libraries cost several hundred to several thousand dollars. There are free ones out there but they are by no means as full featured or as well optimised (in general, though they are not intended for real time use).&#xD;&#xA;&#xD;&#xA;One thing I will warn you on -- if you don't have _at minimum_ a graduate level background in mathematics, do not attempt a custom solution to this problem at home. There is a reason they charge big bucks for these solutions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.man.ac.uk/~toby/alan/software/" />
  <row Id="35491" PostHistoryTypeId="5" PostId="15602" RevisionGUID="a9dd9f25-605e-4dc1-82b3-45cd8b050491" CreationDate="2011-08-05T10:34:50.177" UserId="5473" Comment="added 20 characters in body" Text="&gt; I now badly need a physics library which can use boolean shapes (ie;&#xD;&#xA;&gt; cutting a circle out of a square) and/or curved surfaces&#xD;&#xA;&#xD;&#xA;The term you are looking for is&#xD;&#xA;&#xD;&#xA; - (2D) CPG -- constructive planar geometry&#xD;&#xA; - (3D) CSG -- constructive solid geometry&#xD;&#xA;&#xD;&#xA;If you can live without curves (at least in your cut-out areas), go for the approach @Den &#xD;&#xA;suggests.&#xD;&#xA;&#xD;&#xA;If you need to be able to slice polygons along curves, you are pretty much going to have to find a CSG library such as [GPC][1]. And you are going to have to be able to find one that supports spline-based polygons in its intersections. And then you are going to have to transport that spline data into Box2D. And be warned -- good CPG libraries cost several hundred to several thousand dollars. There are free ones out there but they are by no means as full featured or as well optimised (in general, though they are not intended for real time use).&#xD;&#xA;&#xD;&#xA;One thing I will warn you on -- if you don't have _at minimum_ a graduate level background in mathematics, do not attempt a custom solution to the polygon intersection problem at home. There is a reason they charge big bucks for these solutions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.man.ac.uk/~toby/alan/software/" />
  <row Id="35492" PostHistoryTypeId="2" PostId="15603" RevisionGUID="b9619da1-da0d-4e48-83ab-c422e6acfc0c" CreationDate="2011-08-05T11:22:06.380" UserId="8921" Text="From [Unity Reference](http://unity3d.com/support/documentation/ScriptReference/GameObject.Find.html) :&#xD;&#xA;&#xD;&#xA;    // This will return the game object named Hand in the scene.&#xD;&#xA;    hand = GameObject.Find(&quot;Hand&quot;);&#xD;&#xA;&#xD;&#xA;You must remember that when trying to access objects via script, any inactive GameObjects are not included in the search." />
  <row Id="35493" PostHistoryTypeId="5" PostId="15603" RevisionGUID="77d0e0c5-b4a9-4eb4-90eb-8117c247591f" CreationDate="2011-08-05T11:35:35.650" UserId="8921" Comment="added 834 characters in body" Text="From [Unity Reference](http://unity3d.com/support/documentation/ScriptReference/GameObject.Find.html) :&#xD;&#xA;&#xD;&#xA;    // This will return the game object named Hand in the scene.&#xD;&#xA;    hand = GameObject.Find(&quot;Hand&quot;);&#xD;&#xA;&#xD;&#xA;You must remember that when trying to access objects via script, any inactive GameObjects are not included in the search. And that this will only return one object.&#xD;&#xA;&#xD;&#xA;If you want to create the same behaviour as 'FindGameObjectsWithTag', you'll have to implement the function yourself.&#xD;&#xA;&#xD;&#xA;In one of my games, for each level I used a GameObject to parent all the other objects, this way it was easier to access the objects. You could do something like :&#xD;&#xA;&#xD;&#xA;    GameObject[] children = GetComponentsInChildren&lt;GameObject&gt;();&#xD;&#xA;    foreach (GameObjectchild in children )&#xD;&#xA;    {&#xD;&#xA;        if(children.name == &quot;WantedName&quot;)&#xD;&#xA;            //DoSomething&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;While this should work (from memory) I would not recommend it, as it goes against the Component style that Unity imposes. I would instead implement a script that makes use of the messaging systems, via [SendMessage](http://unity3d.com/support/documentation/ScriptReference/Component.SendMessage.html)." />
  <row Id="35494" PostHistoryTypeId="5" PostId="15603" RevisionGUID="c39e5d55-3d28-4371-836c-45c3c3adb710" CreationDate="2011-08-05T11:41:46.223" UserId="8921" Comment="added 834 characters in body" Text="From [Unity Reference](http://unity3d.com/support/documentation/ScriptReference/GameObject.Find.html) :&#xD;&#xA;&#xD;&#xA;    // This will return the game object named Hand in the scene.&#xD;&#xA;    hand = GameObject.Find(&quot;Hand&quot;);&#xD;&#xA;&#xD;&#xA;You must remember that when trying to access objects via script, any inactive GameObjects are not included in the search. And that this will only return one object.&#xD;&#xA;&#xD;&#xA;If you want to create the same behaviour as 'FindGameObjectsWithTag', you'll have to implement the function yourself.&#xD;&#xA;&#xD;&#xA;In one of my games, for each level I used a GameObject to parent all the other objects, this way it was easier to access the objects. You could do something like :&#xD;&#xA;&#xD;&#xA;    GameObject[] children = GetComponentsInChildren&lt;GameObject&gt;();&#xD;&#xA;    foreach (GameObjectchild in children )&#xD;&#xA;    {&#xD;&#xA;        if(children.name == &quot;WantedName&quot;)&#xD;&#xA;            //DoSomething&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;While this should work (from memory) I would not recommend it. I would instead implement a script that makes use of the messaging systems, via [SendMessage](http://unity3d.com/support/documentation/ScriptReference/Component.SendMessage.html).&#xD;&#xA;&#xD;&#xA;I'll need to get out Unity later and check, but this should work, although I'm not sure exactly what it is you're trying to do ;)" />
  <row Id="35495" PostHistoryTypeId="2" PostId="15604" RevisionGUID="88a92491-7848-4830-b976-c028fede68d8" CreationDate="2011-08-05T11:43:59.370" UserId="5705" Text="I've implemented the game using cirrus.&#xD;&#xA;Its free, atleast for now.&#xD;&#xA;No need to change my hosting server - its a simple php-mysql web server.&#xD;&#xA;I also use zendAMF in the backend - so the solution is a combination of zendAMF + Cirrus.&#xD;&#xA;With Red5 and BlazeDS I'd need to find a new hosting service which is a needless expense." />
  <row Id="35496" PostHistoryTypeId="5" PostId="15603" RevisionGUID="d70983d5-1c29-4c99-a77a-fc1520118af5" CreationDate="2011-08-05T11:47:40.587" UserId="8921" Comment="added 15 characters in body" Text="From [Unity Reference](http://unity3d.com/support/documentation/ScriptReference/GameObject.Find.html) :&#xD;&#xA;&#xD;&#xA;    // This will return the game object named Hand in the scene.&#xD;&#xA;    hand = GameObject.Find(&quot;Hand&quot;);&#xD;&#xA;&#xD;&#xA;You must remember that when trying to access objects via script, any inactive GameObjects are not included in the search. And that this will only return one object.&#xD;&#xA;&#xD;&#xA;If you want to create the same behaviour as 'FindGameObjectsWithTag', you'll have to implement the function yourself.&#xD;&#xA;&#xD;&#xA;In one of my games, for each level I used a GameObject to parent all the other objects, this way it was easier to access the objects. You could do something like :&#xD;&#xA;&#xD;&#xA;    int count = 0;&#xD;&#xA;    GameObject[] children = GetComponentsInChildren&lt;GameObject&gt;();&#xD;&#xA;    foreach (GameObjectchild in children )&#xD;&#xA;    {&#xD;&#xA;        if(children.name == &quot;WantedName&quot;)&#xD;&#xA;            ++count;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;While this should work (from memory) I would not recommend it. I would instead implement a script that makes use of the messaging systems, via [SendMessage](http://unity3d.com/support/documentation/ScriptReference/Component.SendMessage.html).&#xD;&#xA;&#xD;&#xA;I'll need to get out Unity later and check, but this should work, although I'm not sure exactly what it is you're trying to do ;)" />
  <row Id="35497" PostHistoryTypeId="25" PostId="15573" RevisionGUID="92db3f18-a655-4991-8435-df62bd438fd9" CreationDate="2011-08-05T12:36:43.737" Comment="http://twitter.com/#!/StackGameDev/status/99458814419537920" />
  <row Id="35498" PostHistoryTypeId="5" PostId="15603" RevisionGUID="95bd2d30-a705-4fc2-94ad-9ace0bf570ae" CreationDate="2011-08-05T12:45:09.647" UserId="8921" Comment="added 204 characters in body" Text="From [Unity Reference](http://unity3d.com/support/documentation/ScriptReference/GameObject.Find.html) :&#xD;&#xA;&#xD;&#xA;    // This will return the game object named Hand in the scene.&#xD;&#xA;    hand = GameObject.Find(&quot;Hand&quot;);&#xD;&#xA;&#xD;&#xA;You must remember that when trying to access objects via script, any inactive GameObjects are not included in the search. And that this will only return one object.&#xD;&#xA;&#xD;&#xA;If you want to create the same behaviour as 'FindGameObjectsWithTag', you'll have to implement the function yourself.&#xD;&#xA;&#xD;&#xA;In one of my games, for each level I used a GameObject to parent all the other objects, this way it was easier to access the objects. You could do something like :&#xD;&#xA;&#xD;&#xA;    int count = 0;&#xD;&#xA;    GameObject[] children = GetComponentsInChildren&lt;GameObject&gt;();&#xD;&#xA;    foreach (GameObjectchild in children )&#xD;&#xA;    {&#xD;&#xA;        if(children.name == &quot;WantedName&quot;)&#xD;&#xA;            ++count;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;__Edit:__&#xD;&#xA;&#xD;&#xA;If you're using the UI to add instances to the spawner, that means that the spawner, and the objects it is supposed to spawn, are already instanced at startup. I don't think this is the best way to go about it. I would personally add a script to the spawner with an Enum for each monster type. This scripts behaviour would be to check if it holds an instance to an object, if not create one of the Enum type and keep the reference.&#xD;&#xA;&#xD;&#xA;If you haven't tried overloading UI yet, it can be quite easy and help enormously in creating a more suitable editor for your game." />
  <row Id="35499" PostHistoryTypeId="2" PostId="15605" RevisionGUID="58e51269-cdf1-4cec-93bf-cedc5f9e4109" CreationDate="2011-08-05T12:53:24.563" UserId="9074" Text="I've managed to find a [USB driver][1] to connect to the PS3 controller in OSX, and as [reported here][2], can connect to the controller via Bluetooth.&#xD;&#xA;&#xD;&#xA;I've verified that the input is working properly via Snes9x.&#xD;&#xA;&#xD;&#xA;Anyway, that's just background for my **actual** question. Is there any way to access the PS3 HID, via C++, on the Mac? I'm relatively new to c++ dev on mac using XCode, and the internet has been dissapointing in my search for a possibly library to use.&#xD;&#xA;&#xD;&#xA;Does anybody have any ideas on how I could access the controller button/axis states in code, so I can transfer them to my input maps?&#xD;&#xA;&#xD;&#xA;  [1]: http://tattiebogle.net/index.php/ProjectRoot/Ps3Controller &quot;PS3 Driver&quot;&#xD;&#xA;  [2]: http://arstechnica.com/civis/viewtopic.php?f=19&amp;t=42277 &quot;Bluetooth support&quot;" />
  <row Id="35500" PostHistoryTypeId="1" PostId="15605" RevisionGUID="58e51269-cdf1-4cec-93bf-cedc5f9e4109" CreationDate="2011-08-05T12:53:24.563" UserId="9074" Text="Using PS3 controller for input on Mac OSX" />
  <row Id="35501" PostHistoryTypeId="3" PostId="15605" RevisionGUID="58e51269-cdf1-4cec-93bf-cedc5f9e4109" CreationDate="2011-08-05T12:53:24.563" UserId="9074" Text="&lt;c++&gt;&lt;input&gt;&lt;playstation3&gt;&lt;macos&gt;" />
  <row Id="35502" PostHistoryTypeId="5" PostId="15312" RevisionGUID="5f630474-8dbe-4d25-ae3a-d814287c8993" CreationDate="2011-08-05T13:07:09.347" UserId="8912" Comment="added 1 characters in body" Text="I like this forum http://www.java-gaming.org/" />
  <row Id="35503" PostHistoryTypeId="2" PostId="15606" RevisionGUID="ba961bda-af11-453c-b3f0-ae93773c3775" CreationDate="2011-08-05T13:42:34.353" UserId="5661" Text="I'm curious how the sphere effects were done in Osmos from Hemisphere Games.  Any ideas how the resolution independent zoom in was achieved?&#xD;&#xA;&#xD;&#xA;[Gameplay video][1]&#xD;&#xA;&#xD;&#xA;[Hemisphere Games][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=FiMVNwt-8f8 &quot;Video&quot;&#xD;&#xA;  [2]: http://www.hemispheregames.com/osmos/" />
  <row Id="35504" PostHistoryTypeId="1" PostId="15606" RevisionGUID="ba961bda-af11-453c-b3f0-ae93773c3775" CreationDate="2011-08-05T13:42:34.353" UserId="5661" Text="How'd they do it: sphere effects in Osmos" />
  <row Id="35505" PostHistoryTypeId="3" PostId="15606" RevisionGUID="ba961bda-af11-453c-b3f0-ae93773c3775" CreationDate="2011-08-05T13:42:34.353" UserId="5661" Text="&lt;glsl&gt;&lt;ipad&gt;&lt;graphic-effects&gt;" />
  <row Id="35506" PostHistoryTypeId="5" PostId="15484" RevisionGUID="65c04472-0f9c-4d27-a9f7-b37ed75fd121" CreationDate="2011-08-05T14:38:08.653" UserId="5473" Comment="Added in &quot;fixture&quot; as well as &quot;shapes&quot;. This depends on the version of Box2D which the OP is using." Text="Have you considered combining standard box2d shapes/fixtures and convex polygon attaching them to same body?&#xD;&#xA;&#xD;&#xA;If you want you can even implement concave decomposition algorithms like the ones provided by this .NET(C#) Box2d port (at the bottom, it also supports some boolean operations): &#xD;&#xA;&#xD;&#xA;http://farseerphysics.codeplex.com/documentation&#xD;&#xA;&#xD;&#xA;PS: there should be some performance/complexity reason(s) for not supporting concave polygons as is." />
  <row Id="35507" PostHistoryTypeId="24" PostId="15484" RevisionGUID="65c04472-0f9c-4d27-a9f7-b37ed75fd121" CreationDate="2011-08-05T14:38:08.653" Comment="Proposed by 5473 approved by 1430 edit id of 599" />
  <row Id="35508" PostHistoryTypeId="5" PostId="15605" RevisionGUID="ed993d39-2fff-469d-b40c-7dfbc6b4d02b" CreationDate="2011-08-05T14:50:04.213" UserId="1430" Comment="added 6 characters in body" Text="I've managed to find a [USB driver][1] to connect to the PS3 controller in OSX, and as [reported here][2], can connect to the controller via Bluetooth.&#xD;&#xA;&#xD;&#xA;I've verified that the input is working properly via Snes9x.&#xD;&#xA;&#xD;&#xA;Anyway, that's just background for my *actual* question. Is there any way to access the PS3 HID, via C++, on the Mac? I'm relatively new to C++ development on Mac using XCode, and the internet has been disappointing in my search for a possibly library to use.&#xD;&#xA;&#xD;&#xA;Does anybody have any ideas on how I could access the controller button/axis states in code, so I can transfer them to my input maps?&#xD;&#xA;&#xD;&#xA;  [1]: http://tattiebogle.net/index.php/ProjectRoot/Ps3Controller &quot;PS3 Driver&quot;&#xD;&#xA;  [2]: http://arstechnica.com/civis/viewtopic.php?f=19&amp;t=42277 &quot;Bluetooth support&quot;" />
  <row Id="35509" PostHistoryTypeId="5" PostId="15602" RevisionGUID="258e6487-82fb-4757-a172-ad97fdf34d1c" CreationDate="2011-08-05T15:30:47.660" UserId="5473" Comment="deleted 14 characters in body" Text="&gt; I now badly need a physics library which can use boolean shapes (ie;&#xD;&#xA;&gt; cutting a circle out of a square) and/or curved surfaces&#xD;&#xA;&#xD;&#xA;The term you are looking for is&#xD;&#xA;&#xD;&#xA; - (2D) CPG -- constructive planar geometry&#xD;&#xA; - (3D) CSG -- constructive solid geometry&#xD;&#xA;&#xD;&#xA;If you can live without curves (at least in your cut-out areas), go for the approach @Den &#xD;&#xA;suggests.&#xD;&#xA;&#xD;&#xA;If you need to be able to slice polygons along curves, you are pretty much going to have to find a CSG library such as [GPC][1]. And you are going to have to be able to find one that supports splines in its intersections. And then you are going to have to transport that spline data into Box2D. And be warned -- good CPG libraries cost several hundred to several thousand dollars. There are free ones out there but they are by no means as full featured or as well optimised (in general, though they are not intended for real time use).&#xD;&#xA;&#xD;&#xA;One thing I will warn you on -- if you don't have _at minimum_ a graduate level background in mathematics, do not attempt a custom solution to the polygon intersection problem at home. There is a reason they charge big bucks for these solutions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.man.ac.uk/~toby/alan/software/" />
  <row Id="35510" PostHistoryTypeId="25" PostId="15606" RevisionGUID="d437f2a6-e721-407d-98cc-e78687c0b7e9" CreationDate="2011-08-05T15:36:44.063" Comment="http://twitter.com/#!/StackGameDev/status/99504113246666752" />
  <row Id="35511" PostHistoryTypeId="5" PostId="15561" RevisionGUID="aae58476-e067-406c-b786-94f4378990fc" CreationDate="2011-08-05T16:22:54.150" UserId="1430" Comment="added 1838 characters in body" Text="You should have a very well-defined set of interfaces that are allowed to transmit or receive messages -- giving them a reference to a EventScheduler should be trivial. If it isn't, or if you feel like that would involve passing the event scheduler to &quot;too many&quot; distinct types, then you might have a larger design problem on your hands (a promiscuous dependency, which singletons tend to exacerbate, not solve).&#xD;&#xA;&#xD;&#xA;Remember that while the technique of passing the scheduler to the interfaces that need it is a form of &quot;[dependency injection][1],&quot; you aren't in this case injecting a *new* dependency. This is a dependency you already have in the system, but you are now making it an explicit one (versus a singleton's implicit dependency). As a rule of thumb, explicit dependencies are more preferable as they are more self-documenting.&#xD;&#xA;&#xD;&#xA;You also afford yourself more flexibility by decoupling the consumers of the event scheduling from each other (since they are not all necessarily tied to the same scheduler), which can be useful for testing or simulating local client/server setups or a number of other options -- you may not need these other options, but you have not expended effort to artificially restrict yourself from them, which is a plus.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;All I mean when I talk about passing the scheduler around is this: if you have some game component that is responsible for responding to collision, it's probably created via some collision responder factory that is part of your physics layer. If you construct the factory with a scheduler instance, it can then pass that instance to any responders it creates, which can then make use of it to raise events (or perhaps subscribe to other events).&#xD;&#xA;&#xD;&#xA;    class CollisionResponderFactory {&#xD;&#xA;      public CollisionResponderFactory (EventScheduler scheduler) {&#xD;&#xA;         this.scheduler = scheduler;&#xD;&#xA;      }&#xD;&#xA;  &#xD;&#xA;      CollisionResponder CreateResponder() {&#xD;&#xA;        return new CollisionResponder(scheduler);&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      EventScheduler scheduler;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class CollisionResponder {&#xD;&#xA;      public CollisionResponder (EventScheduler scheduler) {&#xD;&#xA;        this.scheduler = scheduler;&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      public void OnCollision(GameObject a, GameObject b) {&#xD;&#xA;        if(a.IsBullet) {&#xD;&#xA;          scheduler.RaiseEvent(E_BIG_EXPLOSION);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      EventScheduler scheduler;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is obviously a terribly contrived and simplified example since I don't know what your game object model is; it does however illustrate making the dependency on the event scheduler explicit and shows some potential for further encapsulation (you wouldn't necessarily need to pass the responders the scheduler if they communicated through to a higher level collision response system at the same conceptual level as the factory that dealt with the nuts and bolts of raising events via the scheduler. This would isolate each individual responder implementation from the implementation details of the event dispatch system, such as which specific event to raise on collision, which may be ideal for your system -- or not).&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Dependency_injection" />
  <row Id="35512" PostHistoryTypeId="2" PostId="15607" RevisionGUID="86f436c0-7e5f-4cf2-aa80-3014796d8d4a" CreationDate="2011-08-05T16:28:37.343" UserId="1742" Text="I don't have the cash to stump up for a PS3 or 360 devkit, but the G3, G4 and G5 macs are running with PowerPC chips, which I believe is virtually the same architecture as the 360, and only missing the SPUs from the PS3, so I would like to know which Macs would be good for profiling code with.&#xD;&#xA;&#xD;&#xA;I'm after a machine that would give me equivalent timings (not actual timings, but scale the same given difference code) so I'm looking for ones that have about the same cache size and memory bandwidth ratios as the consoles. Are there any specific Macs that have these traits?" />
  <row Id="35513" PostHistoryTypeId="1" PostId="15607" RevisionGUID="86f436c0-7e5f-4cf2-aa80-3014796d8d4a" CreationDate="2011-08-05T16:28:37.343" UserId="1742" Text="What's a good alternative to buying a console devkit?" />
  <row Id="35514" PostHistoryTypeId="3" PostId="15607" RevisionGUID="86f436c0-7e5f-4cf2-aa80-3014796d8d4a" CreationDate="2011-08-05T16:28:37.343" UserId="1742" Text="&lt;xbox360&gt;&lt;playstation3&gt;&lt;ppc&gt;&lt;mac&gt;" />
  <row Id="35515" PostHistoryTypeId="2" PostId="15608" RevisionGUID="958bbb94-8d01-4af0-82d0-00334d012617" CreationDate="2011-08-05T16:49:04.037" UserId="998" Text="D3D10/D3D11 drops support for point primitives. I'm trying to render a set of points for quick and dirty debug, any suggestions/quick hacks for getting large size points to show up in D3D11?" />
  <row Id="35516" PostHistoryTypeId="1" PostId="15608" RevisionGUID="958bbb94-8d01-4af0-82d0-00334d012617" CreationDate="2011-08-05T16:49:04.037" UserId="998" Text="Points in d3d11" />
  <row Id="35517" PostHistoryTypeId="3" PostId="15608" RevisionGUID="958bbb94-8d01-4af0-82d0-00334d012617" CreationDate="2011-08-05T16:49:04.037" UserId="998" Text="&lt;directx11&gt;&lt;point-cloud&gt;" />
  <row Id="35518" PostHistoryTypeId="2" PostId="15609" RevisionGUID="1c9f2152-00cb-43bb-b05b-530d55329a54" CreationDate="2011-08-05T17:01:57.427" UserId="1839" Text="If you want to develop games for 360/PS3, there is no alternative to getting a Devkit.&#xD;&#xA;&#xD;&#xA;Consoles are more than just a CPU. It's graphics card, OS, memory, SDKs and a lot more. If your idea is to port later, thats not gonna work as easy as getting a more less similar machine in terms of its specs. The entire environment is different to a normal PC/Mac.&#xD;&#xA;&#xD;&#xA;If your plan is to develop for consoles, focus on them right from the beginning. Most likely you won't get Devkits anyway, its not as simple as just ordering them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35519" PostHistoryTypeId="5" PostId="15609" RevisionGUID="16469139-d93e-488d-93ce-87d74f0c96d3" CreationDate="2011-08-05T17:08:19.807" UserId="1839" Comment="added 196 characters in body" Text="If you want to develop games for 360/PS3, there is no alternative to getting a Devkit.&#xD;&#xA;&#xD;&#xA;Consoles are more than just a CPU. It's graphics card, OS, memory, File-System, SDKs and a lot more. If your idea is to port later, thats not gonna work as easy as getting a more less similar machine in terms of its specs. The entire environment is different to a normal PC/Mac, not to mention the certification process (TRC/TCR) by Sony/Microsoft before you can actually release your game. You should be aware of the certification requirements right from the start.&#xD;&#xA;&#xD;&#xA;If your plan is to develop for consoles, focus on them right from the beginning. Most likely you won't get Devkits anyway, its not as simple as just ordering them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35520" PostHistoryTypeId="2" PostId="15610" RevisionGUID="796a4668-cf3e-4bed-8992-59b027b56d4e" CreationDate="2011-08-05T17:14:18.070" UserId="998" Text="Ok, hold on, there's still &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff476189(VS.85).aspx&quot;&gt;D3D11_PRIMITIVE_TOPOLOGY_POINTLIST&lt;/a&gt;, not sure why I was under the impression D3D11 didn't support point primitives." />
  <row Id="35521" PostHistoryTypeId="5" PostId="15609" RevisionGUID="ceb28623-c53e-4c77-9bb4-4a2cbf5b2216" CreationDate="2011-08-05T17:17:32.730" UserId="1839" Comment="added 7 characters in body" Text="If you want to develop native games for 360/PS3, there is no alternative to getting a Devkit.&#xD;&#xA;&#xD;&#xA;Consoles are more than just a CPU. It's graphics card, OS, memory, File-System, SDKs and a lot more. If your idea is to port later, thats not gonna work as easy as getting a more less similar machine in terms of its specs. The entire environment is different to a normal PC/Mac, not to mention the certification process (TRC/TCR) by Sony/Microsoft before you can actually release your game. You should be aware of the certification requirements right from the start.&#xD;&#xA;&#xD;&#xA;If your plan is to develop for consoles, focus on them right from the beginning. Most likely you won't get Devkits anyway, its not as simple as just ordering them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35522" PostHistoryTypeId="2" PostId="15611" RevisionGUID="bd6d5051-3462-40da-90fa-7ee7c9edceed" CreationDate="2011-08-05T17:22:28.360" UserId="9076" Text="I'm trying to construct an editor in C# that exposes game components to IronPython, so it may create the game object definitions to be used within the editor:&#xD;&#xA;&#xD;&#xA; - C# Exposes the components to the python script (Spatial, Movement, SpriteView, etc.)&#xD;&#xA; - IronPython creates the game object definitions (or templates) by attaching components to a game object.&#xD;&#xA;&#xD;&#xA;At the startup of the editor:&#xD;&#xA;&#xD;&#xA; 1. The Python script is loaded with all of the game object definitions.&#xD;&#xA; 2. Tools are updated with the new objects (availability for painting).&#xD;&#xA;&#xD;&#xA;The problem I'm having lies when I'm saving and opening the editor data:&#xD;&#xA;&#xD;&#xA; 1. When saving, I use C# to serialize all of the constructed game objects (including the game object definitions generated from python) to a file.&#xD;&#xA; 2. When opening, I use C# to deserialize the data.  - Since the Python script is not synchronized with the serialized components, I will run into a big problem when I change anything in the script.&#xD;&#xA;&#xD;&#xA;One solution I had was to only serialize the definition name of a game object, therefore when I deserialize my data I will have to do a lookup for the target definition (created by the script) and simply clone it. But, it still will not be entirely in sync with the editor data (some data will be changed on each game object like for example the position (note when I say game object I do not mean the definition)).&#xD;&#xA;&#xD;&#xA;Another solution might be to use a database and save out all of my editor data to it (perhaps using the entity database in C#). I'm not entirely sure if this will solve my problem.&#xD;&#xA;&#xD;&#xA;Any help would be appreciated, thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35523" PostHistoryTypeId="1" PostId="15611" RevisionGUID="bd6d5051-3462-40da-90fa-7ee7c9edceed" CreationDate="2011-08-05T17:22:28.360" UserId="9076" Text="Component System - Editor Data Management" />
  <row Id="35524" PostHistoryTypeId="3" PostId="15611" RevisionGUID="bd6d5051-3462-40da-90fa-7ee7c9edceed" CreationDate="2011-08-05T17:22:28.360" UserId="9076" Text="&lt;c#&gt;&lt;editors&gt;&lt;databases&gt;" />
  <row Id="35525" PostHistoryTypeId="5" PostId="15609" RevisionGUID="aeb29486-7c39-40a9-b0a5-75c4355bc917" CreationDate="2011-08-05T17:22:58.470" UserId="1839" Comment="added 7 characters in body" Text="If you want to develop native games for 360/PS3, there is no alternative to getting a Devkit.&#xD;&#xA;&#xD;&#xA;Consoles are more than just a CPU. It's graphics card, OS, memory, File-System, SDKs and a lot more. If your idea is to port later, thats not gonna work as easy as getting a more less similar machine in terms of its specs. The entire environment is different to a normal PC/Mac, not to mention the certification process (TRC/TCR) by Sony/Microsoft before you can actually release your game. You should be aware of the certification requirements before writing too much code.&#xD;&#xA;&#xD;&#xA;If your plan is to develop for consoles, focus on them right from the beginning. Most likely you won't get Devkits anyway, its not as simple as just ordering them.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35526" PostHistoryTypeId="2" PostId="15612" RevisionGUID="c9648362-8942-4a37-bb77-cf9df7665019" CreationDate="2011-08-05T17:33:30.740" UserId="8957" Text="I've been working up a game engine similar to [Terraria][1], mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one time. Creating around 500.000 tiles, that is 1/20th of what's possible in [Terraria][1], in my engine causes the frame-rate to drop from 60 to around 20, even tho I'm still only rendering the tiles in view. Mind you, I'm not doing anything with the tiles, only keeping them in memory.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://terraria.org" />
  <row Id="35527" PostHistoryTypeId="1" PostId="15612" RevisionGUID="c9648362-8942-4a37-bb77-cf9df7665019" CreationDate="2011-08-05T17:33:30.740" UserId="8957" Text="How'd they do it: Millions of tiles in Terraria" />
  <row Id="35528" PostHistoryTypeId="3" PostId="15612" RevisionGUID="c9648362-8942-4a37-bb77-cf9df7665019" CreationDate="2011-08-05T17:33:30.740" UserId="8957" Text="&lt;xna-4.0&gt;&lt;frame-rate&gt;&lt;memory-efficiency&gt;" />
  <row Id="35529" PostHistoryTypeId="5" PostId="15609" RevisionGUID="5c5062d9-7178-4678-b0da-0b70dec4375d" CreationDate="2011-08-05T17:34:23.843" UserId="1839" Comment="added 79 characters in body" Text="If you want to develop native games for 360/PS3, there is no alternative to getting a Devkit.&#xD;&#xA;&#xD;&#xA;Consoles are more than just a CPU. It's graphics card, OS, memory, File-System, SDKs and a lot more. If your idea is to port later, thats not gonna work as easy as getting a more less similar machine in terms of its specs. The entire environment is different to a normal PC/Mac, not to mention the certification process (TRC/TCR) by Sony/Microsoft before you can actually release your game. You should be aware of the certification requirements before writing too much code.&#xD;&#xA;&#xD;&#xA;If your plan is to develop for consoles, focus on them right from the beginning. But most likely you won't get Devkits, its not as simple as just ordering them. So the whole getting-a-similar-system-idea renders useless from different angles.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35530" PostHistoryTypeId="2" PostId="15613" RevisionGUID="6bc0de27-8e83-4b58-aa5e-1ca59db665de" CreationDate="2011-08-05T17:45:10.433" UserId="9078" Text="MS offers its development stack for the 360 (XNA Game Studio, Expression Blend) for free.  And they also offer a pretty cheap entrace to market via " />
  <row Id="35531" PostHistoryTypeId="2" PostId="15614" RevisionGUID="77a30a06-4ea6-479e-b477-7599ec7d5f09" CreationDate="2011-08-05T17:45:20.400" UserId="4410" Text="In addition to what Maik said, you'll struggle to find something with the same performance profile as the Xbox 360 CPU. From the public version of the hardware spec on [Wikipedia][1] (as the XDK stuff is under NDA) you can see that the CPU is &quot;[in-order][2]&quot; execution where most if not all &quot;desktop&quot; CPU's. This one big difference can make a massive difference to the performance profile of the CPU alone, let alone the way all the different systems are hooked together. It completely changes the way the code needs to be optimised because of the way any stalls now affect the speed the CPU executes code. The CPU also includes custom logic for performing vector operations you won't find elsewhere.&#xD;&#xA;&#xD;&#xA;It's also not as simple as just &quot;having enough money&quot; to buy a devkit. You'll also need to show MS you have a decent enough concept and also probably more discussion before they'd let you licence one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Xbox_360_hardware&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Out_of_order_execution#In-order_processors" />
  <row Id="35532" PostHistoryTypeId="2" PostId="15615" RevisionGUID="69894d99-ecfa-4e3c-a084-856f87068376" CreationDate="2011-08-05T17:55:26.553" UserId="9078" Text="There's different encoding techniques you could use. &#xD;&#xA;&#xD;&#xA;RLE:  So you start with a coordinate (x,y) and then count how many of the same tile exist side-by-side (length) along one of the axies.  Example:  (1,1,10,5) would mean that starting at coordinate 1,1 there are 10 tiles side-by-side of tile type 5.&#xD;&#xA;&#xD;&#xA;The massive array (bitmap):  each element of the array holds onto the tile type that resides in that area.&#xD;&#xA;&#xD;&#xA;For simplicities sake I would be tempted to go with the bitmap, and only load tiles that are on-screen, as well as 20-to-40 tiles in each direction (or whatever makes sense for your memory/tile size).  As a player approaches the edge of loaded tiles, load the next set." />
  <row Id="35533" PostHistoryTypeId="2" PostId="15616" RevisionGUID="dd6b32b3-21b0-41bd-ba1d-16ad9c7a4670" CreationDate="2011-08-05T18:03:27.903" UserId="6558" Text="Are you looping through all 500,000 tiles when you're rendering?  If so, that's likely going to cause part of your problems.  If you loop through half a million tiles when rendering, and half a million tiles when performing the 'update' ticks on them, then you're looping though a million tiles each frame.&#xD;&#xA;&#xD;&#xA;Obviously, there's ways around this.  You could perform your update ticks while also rendering, thus saving you half the time spent looping through all those tiles.  But that ties your rendering code and your update code together into one function, and is generally a *BAD IDEA*.&#xD;&#xA;&#xD;&#xA;You could keep track of the tiles that are on the screen, and only loop through (and render) those.  Depending on things like the size of your tiles, and screen size, this could easily cut down the amount of tiles you need to loop through, and that would save quite a bit of processing time.&#xD;&#xA;&#xD;&#xA;Finally, and perhaps the best option (most large world games do this), is to split your terrain into regions.  Split the world into chunks of, say, 512x512 tiles, and load/unload the regions as the player gets close to, or further away from, a region.  This also saves you from having to loop through far away tiles to perform any sort of 'update' tick.&#xD;&#xA;&#xD;&#xA;(Obviously, if your engine doesn't perform any sort of update tick on tiles, you can ignore the part of this answers that mentions those.)" />
  <row Id="35534" PostHistoryTypeId="5" PostId="15601" RevisionGUID="3e29e6ac-f013-471a-a446-c43bf6707ac3" CreationDate="2011-08-05T18:06:43.813" UserId="51" Comment="deleted 114 characters in body; edited tags" Text="I'm trying to mimic `FindGameObjectsWithTag` with `FindGameObjectswithName`. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on instantiation through the inspector.&#xD;&#xA;&#xD;&#xA; My goal is create multiple enemy spawners. My current spawner has a drag and drop variable for enemyprefabs. It looks for enemies tagged &quot;ReSpawn&quot;, then checks if that length is below (x) to start spawning more. I would like to upgrade my current single spawner to still check for enemies name respawn, but then check if those respawn have a child object named &quot;blank&quot; (an input string name I can specify in the editor). &#xD;&#xA;&#xD;&#xA;This way, I can set the enemy spawners anywhere (near water, tall grass, forests, etc), and when I defeat one, the specific spawner will instantiate one of its opponent for that area.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var ThisSpot:String;&#xD;&#xA;    var Oppos : GameObject [];&#xD;&#xA;    var OppoCount : GameObject [];&#xD;&#xA;    &#xD;&#xA;    var HowMany = 3;&#xD;&#xA;    var spawnSizeArea = 25;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Start(){&#xD;&#xA;    StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Update () {&#xD;&#xA;    &#xD;&#xA;    OppoCount = GameObject.FindGameObjectsWithTag(&quot;Respawn&quot;);&#xD;&#xA;    // OppoCount = GameObject.FindWithName(ThisSpot);  This is what I am trying to achieve&#xD;&#xA;    &#xD;&#xA;    if(OppoCount.length &lt; HowMany){&#xD;&#xA;    &#xD;&#xA;    StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Spawn(){&#xD;&#xA;    &#xD;&#xA;    var length = Oppos.length-1;&#xD;&#xA;    var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;    curSpawn = Oppos[index];&#xD;&#xA;    &#xD;&#xA;    var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;    var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;    &#xD;&#xA;    Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;    &#xD;&#xA;    // Then I could use these 2 lines of code below to use multiple spawners&#xD;&#xA;    &#xD;&#xA;    //var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;    //newOp.transform.Find(&quot;fighter&quot;).gameObject.name=ThisSpot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35535" PostHistoryTypeId="6" PostId="15601" RevisionGUID="3e29e6ac-f013-471a-a446-c43bf6707ac3" CreationDate="2011-08-05T18:06:43.813" UserId="51" Comment="deleted 114 characters in body; edited tags" Text="&lt;engine&gt;&lt;unity&gt;&lt;javascript&gt;" />
  <row Id="35536" PostHistoryTypeId="5" PostId="15615" RevisionGUID="56393195-6bde-46a9-9731-05cfdd2b94c3" CreationDate="2011-08-05T18:08:07.637" UserId="9078" Comment="deleted 62 characters in body" Text="There's different encoding techniques you could use. &#xD;&#xA;&#xD;&#xA;RLE:  So you start with a coordinate (x,y) and then count how many of the same tile exist side-by-side (length) along one of the axies.  Example:  (1,1,10,5) would mean that starting at coordinate 1,1 there are 10 tiles side-by-side of tile type 5.&#xD;&#xA;&#xD;&#xA;The massive array (bitmap):  each element of the array holds onto the tile type that resides in that area.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I just came across this excellent question here:  http://gamedev.stackexchange.com/questions/15574/random-seed-function-for-map-generation&#xD;&#xA;&#xD;&#xA;The Perlin noise generator looks to be like a good answer." />
  <row Id="35537" PostHistoryTypeId="2" PostId="15617" RevisionGUID="351efbca-28bd-42e4-a6c2-d74918275a65" CreationDate="2011-08-05T18:12:38.737" UserId="51" Text="Unity best practices are to *never* use `Find` in any of its incarnations at run time.  It's slow and unnecessarily ties the name of the object with its functionality.  &#xD;&#xA;&#xD;&#xA;Any time you call `Instantiate` you can save off the return value and store it somewhere (i.e. a `List` in some component your write.  Then you can just iterate over the elements of that list to get what you want.&#xD;&#xA;&#xD;&#xA;So for your spawner example, your spawner could have a list of game objects that it has spawned.  In `Update` you can iterate over that list and count the number of non-null gameobjects (to check for destroyed objects).  Alternatively the enemy can have a reference to its spawner and remove itself from that list in `OnDestroy`.  Then if that number is less than a certain value spawn a new one." />
  <row Id="35538" PostHistoryTypeId="5" PostId="15606" RevisionGUID="799001dd-0afa-45c9-bafd-a477ebbf869c" CreationDate="2011-08-05T18:17:22.167" UserId="5661" Comment="More specific questions." Text="I'm curious how the sphere effects were done in Osmos from Hemisphere Games.  Any ideas how the resolution independent zoom in was achieved?&#xD;&#xA;&#xD;&#xA;Edit, more specifics on questions:&#xD;&#xA;&#xD;&#xA; 1. How do you render the spheres so they look good at full zoom out, and full zoom in?&#xD;&#xA; 2. How would one make the nice particle effects in 100's of spheres all at once?&#xD;&#xA; 3. How to construct your scene/spheres so the big spheres look round even at full zoom?&#xD;&#xA;&#xD;&#xA;[Gameplay video][1]&#xD;&#xA;&#xD;&#xA;[Hemisphere Games][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=FiMVNwt-8f8 &quot;Video&quot;&#xD;&#xA;  [2]: http://www.hemispheregames.com/osmos/" />
  <row Id="35539" PostHistoryTypeId="25" PostId="15612" RevisionGUID="3586490d-7782-431d-9658-c63b5486a712" CreationDate="2011-08-05T18:36:45.117" Comment="http://twitter.com/#!/StackGameDev/status/99549415487967232" />
  <row Id="35540" PostHistoryTypeId="5" PostId="15617" RevisionGUID="34919d71-a5f6-4c6d-b06e-6194c0ae6e0e" CreationDate="2011-08-05T18:45:18.770" UserId="51" Comment="added 1 characters in body" Text="Unity best practices are to *never* use `Find` in any of its incarnations at run time.  It's slow and unnecessarily ties the name of the object with its functionality.  &#xD;&#xA;&#xD;&#xA;Any time you call `Instantiate` you can save off the return value and store it somewhere (i.e. a `List` in some component your write).  Then you can just iterate over the elements of that list to get what you want.&#xD;&#xA;&#xD;&#xA;So for your spawner example, your spawner could have a list of game objects that it has spawned.  In `Update` you can iterate over that list and count the number of non-null gameobjects (to check for destroyed objects).  Alternatively the enemy can have a reference to its spawner and remove itself from that list in `OnDestroy`.  Then if that number is less than a certain value spawn a new one." />
  <row Id="35543" PostHistoryTypeId="2" PostId="15620" RevisionGUID="ae259c07-e3e5-4841-9401-bb24380517dd" CreationDate="2011-08-05T18:54:58.593" UserId="3505" Text="1 and 3: It's all pretty basic functionality of a modern graphics chip, there is a pixel sampling method which ensures that things look smooth even though an image is rendered in non-native resolution. You just have to make sure that the image is of reasonable size for the big spheres not to become blurry.&#xD;&#xA;&#xD;&#xA;The common method is to use a 3D api for invoking this, even though your game is 2D. Often you'd use a piece of middleware that translates 2D commands into 3D equivalents.&#xD;&#xA;&#xD;&#xA;I don't know how it specifically works on the iPhone, but it's certainly nothing out of the ordinary so there should be plenty material covering the topic.&#xD;&#xA;&#xD;&#xA;2: I don't see a lot of particle effects in that video, there is a few particles of exhaust, but they don't need to be implemented in a different manner than the spheres." />
  <row Id="35546" PostHistoryTypeId="5" PostId="15601" RevisionGUID="dc3ead98-b907-45e4-a6d2-a2fb1f418db9" CreationDate="2011-08-05T19:29:04.650" UserId="7888" Comment="Indented code blocks for easier reading" Text="I'm trying to mimic `FindGameObjectsWithTag` with `FindGameObjectswithName`. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on instantiation through the inspector.&#xD;&#xA;&#xD;&#xA;My goal is create multiple enemy spawners. My current spawner has a drag and drop variable for enemyprefabs. It looks for enemies tagged &quot;ReSpawn&quot;, then checks if that length is below (x) to start spawning more. I would like to upgrade my current single spawner to still check for enemies name respawn, but then check if those respawn have a child object named &quot;blank&quot; (an input string name I can specify in the editor). &#xD;&#xA;&#xD;&#xA;This way, I can set the enemy spawners anywhere (near water, tall grass, forests, etc), and when I defeat one, the specific spawner will instantiate one of its opponent for that area.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var ThisSpot:String;&#xD;&#xA;    var Oppos : GameObject[];&#xD;&#xA;    var OppoCount : GameObject[];&#xD;&#xA;    &#xD;&#xA;    var HowMany = 3;&#xD;&#xA;    var spawnSizeArea = 25;&#xD;&#xA;    &#xD;&#xA;    function Start() {&#xD;&#xA;        StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Update () {&#xD;&#xA;        OppoCount = GameObject.FindGameObjectsWithTag(&quot;Respawn&quot;);&#xD;&#xA;        // OppoCount = GameObject.FindWithName(ThisSpot);  This is what I am trying to achieve&#xD;&#xA;        &#xD;&#xA;        if(OppoCount.length &lt; HowMany) {&#xD;&#xA;            StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Spawn() {&#xD;&#xA;        var length = Oppos.length-1;&#xD;&#xA;        var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;        curSpawn = Oppos[index];&#xD;&#xA;        &#xD;&#xA;        var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;        var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;        &#xD;&#xA;        yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;        &#xD;&#xA;        Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        &#xD;&#xA;        // Then I could use these 2 lines of code below to use multiple spawners      &#xD;&#xA;        //var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        //newOp.transform.Find(&quot;fighter&quot;).gameObject.name=ThisSpot;&#xD;&#xA;        &#xD;&#xA;        StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;    }" />
  <row Id="35547" PostHistoryTypeId="24" PostId="15601" RevisionGUID="dc3ead98-b907-45e4-a6d2-a2fb1f418db9" CreationDate="2011-08-05T19:29:04.650" Comment="Proposed by 7888 approved by 14 edit id of 600" />
  <row Id="35548" PostHistoryTypeId="8" PostId="15589" RevisionGUID="a4a3b211-117b-400f-821e-38a56349723a" CreationDate="2011-08-05T19:31:14.490" UserId="962" Comment="Rollback to [8019c031-43d1-46f3-a781-bff549f84ce3]" Text="I was thinking about a game engine development, I understand as engine the main program that can develope next duties: &#xD;&#xA;&#xD;&#xA;1. Receives parameters.&#xD;&#xA;1. calculates what is needed.&#xD;&#xA;1. Delivers results.&#xD;&#xA;&#xD;&#xA;As an example lets say I'm writing an sports game, so I was thinking that instead of starting with something big I could start with a very small objectives and always (now not even thinking in graphics management so maybe I could be speaking about a simulation and not yet even about a game) just getting data result through the shell.&#xD;&#xA;&#xD;&#xA;What about next steps?&#xD;&#xA;&#xD;&#xA;1. Develop an script which gets all the data stored in a database and after calculating everything based on that data it releases the result of the match or race.&#xD;&#xA;1. Get more in detail and a part of calculating the result it delivers too details through the match or race (not jet in real time).&#xD;&#xA;1. In that third stage what it happens is that the program will temporize the details and final result progress in real time through the shell delivering messages before the final result.&#xD;&#xA;1. Though the real time data delivering the user will be available to interact introducing parameters when is asked.&#xD;&#xA;&#xD;&#xA;Many thanks I hope it gets your interest, I'm just trying to clarify the process and catch advice and suggestions from experienced people." />
  <row Id="35549" PostHistoryTypeId="7" PostId="15589" RevisionGUID="a4a3b211-117b-400f-821e-38a56349723a" CreationDate="2011-08-05T19:31:14.490" UserId="962" Comment="Rollback to [8019c031-43d1-46f3-a781-bff549f84ce3]" Text="Is my &quot;engine&quot; development process ideal?" />
  <row Id="35550" PostHistoryTypeId="2" PostId="15621" RevisionGUID="2147a3b4-9b26-4db7-87e6-4ab5dd08afdf" CreationDate="2011-08-05T19:38:28.450" UserId="7197" Text="![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This question is a &quot;follow-up&quot; question from my previous one, regarding collision detection and resolution, which you can find [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you don't want to read the previous question, here's a brief description on how my physics engine works:&#xD;&#xA;&#xD;&#xA;&gt; Every physical entity is stored in a class called SSSPBody. &#xD;&#xA;&#xD;&#xA;&gt; Only AABBs are supported.&#xD;&#xA;&#xD;&#xA;&gt; Every SSSPBody is stored in a class called SSSPWorld, which updates every body and handles gravity.&#xD;&#xA;&#xD;&#xA;&gt; Every frame, SSSPWorld updates every body.&#xD;&#xA;&#xD;&#xA;&gt; Every updated body looks for nearby bodies in a spatial hash, checks if they need to detect collisions with them. If yes, they invoke a &quot;collision&quot; event and check if they need to resolve collisions with them. If yes, they calculate the penetration vector and directional overlap, then change their position in order to resolve the penetration.&#xD;&#xA;&#xD;&#xA;&gt; When a body collides with another, it transfers its velocity to the other one by simply setting the body's velocity to its own.&#xD;&#xA;&#xD;&#xA;&gt; A body is velocity is set to 0 when it hasn't changed position from the last frame. If it also collides with a moving body (such as a lift or a moving platforms) it calculates the movement difference of the lift to see if the body hasn't moved from its last position.&#xD;&#xA;&#xD;&#xA;&gt; Also, a body invokes a &quot;crushed&quot; event when all its AABB corners overlapped something in a frame.&#xD;&#xA;&#xD;&#xA;[This][3] is the FULL source code of my game. It's divided in three projects. SFMLStart is a simple library handling input, drawing and updating of entities. SFMLStartPhysics is the most important one, where the SSSPBody and SSSPWorld classes are. PlatformerPhysicsTest is the game project, containing all the game logic.&#xD;&#xA;&#xD;&#xA;And [this][4] is the &quot;update&quot; method in the SSSPBody class, commented and simplified. You can take a look only at this if you don't feel like looking at the whole SFMLStartSimplePhysics project. (And even if you do, you should still take a look at this since it's commented.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The .gif shows two problems.&#xD;&#xA;&#xD;&#xA; 1. If bodies are placed in a different order, different results happen. The crates on the left are identical to the crates on the right, only placed in the inverse order (in the editor).&#xD;&#xA; 2. Both crates should be propelled towards the top of the screen. In the situation on the left, no crates are propelled. On the right, only one of them is. Both situations are unintended.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## First problem: order of update ##&#xD;&#xA;&#xD;&#xA;This is fairly simple to understand. In the situation on the left, the topmost crate is updated before the other one. Even if the crate on the bottom &quot;transfers&quot; velocity to the other one, it needs to wait the next frame to move. Since it didn't move, the bottom crate's velocity is set to 0.&#xD;&#xA;&#xD;&#xA;I don't have any idea how to fix this. I'd prefer the solution to not be dependent on &quot;sorting&quot; the update list, because I feel I'm doing something wrong in the whole physics engine design. &#xD;&#xA;&#xD;&#xA;How do the major physics engines (Box2D, Bullet, Chipmunk) handle the update order?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Second problem: only one crate is propelled towards the ceiling ##&#xD;&#xA;&#xD;&#xA;I yet don't understand why this happens. What the &quot;spring&quot; entity does is set the body's velocity to -4000 and re-position it on top of the spring itself. Even if I disable the re-positioning code, the problem still occurs.&#xD;&#xA;&#xD;&#xA;My idea is that when the bottom crate collides with the top crate, its velocity is set to 0. I'm not sure why this happens. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Despite the chance of looking like someone who gives up at the first problem, I posted the whole project source code above. I don't have anything to prove it, but believe me, I tried hard to fix this but I just couldn't find a solution and I don't have any previous experience with physics and collisions. I've been trying to solve these two problems for more than a week and now I'm desperate. &#xD;&#xA;&#xD;&#xA;I don't think I can find a solution on my own without stripping many features out of the game (velocity transfer and springs, for example).&#xD;&#xA;&#xD;&#xA;Thanks a lot for the time spent reading this question, and thanks even more if you even try coming up with a solution or a suggestion.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/UIq3q.gif&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/14486/2d-platformer-aabb-collision-problems&#xD;&#xA;  [3]: http://dl.dropbox.com/u/3724424/Programming/ProjectSource.rar&#xD;&#xA;  [4]: http://pastebin.com/hsr9rrZj" />
  <row Id="35551" PostHistoryTypeId="1" PostId="15621" RevisionGUID="2147a3b4-9b26-4db7-87e6-4ab5dd08afdf" CreationDate="2011-08-05T19:38:28.450" UserId="7197" Text="Momentum and order of update problems in my physics engine" />
  <row Id="35552" PostHistoryTypeId="3" PostId="15621" RevisionGUID="2147a3b4-9b26-4db7-87e6-4ab5dd08afdf" CreationDate="2011-08-05T19:38:28.450" UserId="7197" Text="&lt;c#&gt;&lt;collision-detection&gt;&lt;physics&gt;&lt;.net&gt;&lt;aabb&gt;" />
  <row Id="35553" PostHistoryTypeId="2" PostId="15622" RevisionGUID="f6268074-19a8-4933-a682-afdccc76d70d" CreationDate="2011-08-05T19:40:00.487" UserId="6867" Text="I have a perlin noise generator as shown below.&#xD;&#xA;&#xD;&#xA;    public class ImprovedNoise&#xD;&#xA;    {&#xD;&#xA;        private const int GradientSizeTable = 256;&#xD;&#xA;        private readonly Random _random;&#xD;&#xA;        private readonly double[] _gradients = new double[GradientSizeTable * 3];&#xD;&#xA;        /* Borrowed from Darwyn Peachey (see references above).&#xD;&#xA;           The gradient table is indexed with an XYZ triplet, which is first turned&#xD;&#xA;           into a single random index using a lookup in this table. The table simply&#xD;&#xA;           contains all numbers in [0..255] in random order. */&#xD;&#xA;        private readonly byte[] _perm = new byte[] {&#xD;&#xA;              225,155,210,108,175,199,221,144,203,116, 70,213, 69,158, 33,252,&#xD;&#xA;                5, 82,173,133,222,139,174, 27,  9, 71, 90,246, 75,130, 91,191,&#xD;&#xA;              169,138,  2,151,194,235, 81,  7, 25,113,228,159,205,253,134,142,&#xD;&#xA;              248, 65,224,217, 22,121,229, 63, 89,103, 96,104,156, 17,201,129,&#xD;&#xA;               36,  8,165,110,237,117,231, 56,132,211,152, 20,181,111,239,218,&#xD;&#xA;              170,163, 51,172,157, 47, 80,212,176,250, 87, 49, 99,242,136,189,&#xD;&#xA;              162,115, 44, 43,124, 94,150, 16,141,247, 32, 10,198,223,255, 72,&#xD;&#xA;               53,131, 84, 57,220,197, 58, 50,208, 11,241, 28,  3,192, 62,202,&#xD;&#xA;               18,215,153, 24, 76, 41, 15,179, 39, 46, 55,  6,128,167, 23,188,&#xD;&#xA;              106, 34,187,140,164, 73,112,182,244,195,227, 13, 35, 77,196,185,&#xD;&#xA;               26,200,226,119, 31,123,168,125,249, 68,183,230,177,135,160,180,&#xD;&#xA;               12,  1,243,148,102,166, 38,238,251, 37,240,126, 64, 74,161, 40,&#xD;&#xA;              184,149,171,178,101, 66, 29, 59,146, 61,254,107, 42, 86,154,  4,&#xD;&#xA;              236,232,120, 21,233,209, 45, 98,193,114, 78, 19,206, 14,118,127,&#xD;&#xA;               48, 79,147, 85, 30,207,219, 54, 88,234,190,122, 95, 67,143,109,&#xD;&#xA;              137,214,145, 93, 92,100,245,  0,216,186, 60, 83,105, 97,204, 52};&#xD;&#xA;&#xD;&#xA;        private static ImprovedNoise instance;&#xD;&#xA;        public static ImprovedNoise Instance&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                if (instance == null)&#xD;&#xA;                {&#xD;&#xA;                    instance = new ImprovedNoise((int)DateTime.Now.Ticks);&#xD;&#xA;                }&#xD;&#xA;                return instance;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private ImprovedNoise(int seed)&#xD;&#xA;        {&#xD;&#xA;            _random = new Random(seed);&#xD;&#xA;            InitGradients();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public double Noise(double x, double y, double z)&#xD;&#xA;        {&#xD;&#xA;            /* The main noise function. Looks up the pseudorandom gradients at the nearest&#xD;&#xA;               lattice points, dots them with the input vector, and interpolates the&#xD;&#xA;               results to produce a single output value in [0, 1] range. */&#xD;&#xA;&#xD;&#xA;            int ix = (int)System.Math.Floor(x);&#xD;&#xA;            double fx0 = x - ix;&#xD;&#xA;            double fx1 = fx0 - 1;&#xD;&#xA;            double wx = Smooth(fx0);&#xD;&#xA;&#xD;&#xA;            int iy = (int)System.Math.Floor(y);&#xD;&#xA;            double fy0 = y - iy;&#xD;&#xA;            double fy1 = fy0 - 1;&#xD;&#xA;            double wy = Smooth(fy0);&#xD;&#xA;&#xD;&#xA;            int iz = (int)System.Math.Floor(z);&#xD;&#xA;            double fz0 = z - iz;&#xD;&#xA;            double fz1 = fz0 - 1;&#xD;&#xA;            double wz = Smooth(fz0);&#xD;&#xA;&#xD;&#xA;            double vx0 = Lattice(ix, iy, iz, fx0, fy0, fz0);&#xD;&#xA;            double vx1 = Lattice(ix + 1, iy, iz, fx1, fy0, fz0);&#xD;&#xA;            double vy0 = Lerp(wx, vx0, vx1);&#xD;&#xA;&#xD;&#xA;            vx0 = Lattice(ix, iy + 1, iz, fx0, fy1, fz0);&#xD;&#xA;            vx1 = Lattice(ix + 1, iy + 1, iz, fx1, fy1, fz0);&#xD;&#xA;            double vy1 = Lerp(wx, vx0, vx1);&#xD;&#xA;&#xD;&#xA;            double vz0 = Lerp(wy, vy0, vy1);&#xD;&#xA;&#xD;&#xA;            vx0 = Lattice(ix, iy, iz + 1, fx0, fy0, fz1);&#xD;&#xA;            vx1 = Lattice(ix + 1, iy, iz + 1, fx1, fy0, fz1);&#xD;&#xA;            vy0 = Lerp(wx, vx0, vx1);&#xD;&#xA;&#xD;&#xA;            vx0 = Lattice(ix, iy + 1, iz + 1, fx0, fy1, fz1);&#xD;&#xA;            vx1 = Lattice(ix + 1, iy + 1, iz + 1, fx1, fy1, fz1);&#xD;&#xA;            vy1 = Lerp(wx, vx0, vx1);&#xD;&#xA;&#xD;&#xA;            double vz1 = Lerp(wy, vy0, vy1);&#xD;&#xA;            return Lerp(wz, vz0, vz1);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private void InitGradients()&#xD;&#xA;        {&#xD;&#xA;            for (int i = 0; i &lt; GradientSizeTable; i++)&#xD;&#xA;            {&#xD;&#xA;                double z = 1f - 2f * _random.NextDouble();&#xD;&#xA;                double r = System.Math.Sqrt(1f - z * z);&#xD;&#xA;                double theta = 2 * System.Math.PI * _random.NextDouble();&#xD;&#xA;                _gradients[i * 3] = r * System.Math.Cos(theta);&#xD;&#xA;                _gradients[i * 3 + 1] = r * System.Math.Sin(theta);&#xD;&#xA;                _gradients[i * 3 + 2] = z;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private int Permutate(int x)&#xD;&#xA;        {&#xD;&#xA;            const int mask = GradientSizeTable - 1;&#xD;&#xA;            return _perm[x &amp; mask];&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private int Index(int ix, int iy, int iz)&#xD;&#xA;        {&#xD;&#xA;            // Turn an XYZ triplet into a single gradient table index.&#xD;&#xA;            return Permutate(ix + Permutate(iy + Permutate(iz)));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private double Lattice(int ix, int iy, int iz, double fx, double fy, double fz)&#xD;&#xA;        {&#xD;&#xA;            // Look up a random gradient at [ix,iy,iz] and dot it with the [fx,fy,fz] vector.&#xD;&#xA;            int index = Index(ix, iy, iz);&#xD;&#xA;            int g = index * 3;&#xD;&#xA;            return _gradients[g] * fx + _gradients[g + 1] * fy + _gradients[g + 2] * fz;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private double Lerp(double t, double value0, double value1)&#xD;&#xA;        {&#xD;&#xA;            // Simple linear interpolation.&#xD;&#xA;            return value0 + t * (value1 - value0);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        private double Smooth(double x)&#xD;&#xA;        {&#xD;&#xA;            /* Smoothing curve. This is used to calculate interpolants so that the noise&#xD;&#xA;              doesn't look blocky when the frequency is low. */&#xD;&#xA;            return x / 1.25; //* x * (3 - 2 * x);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I use this algorithm by doing threshold detection (at specific values, it will generate tiles, at other values it won't). However, the results I have right now are not as I intend them to.&#xD;&#xA;&#xD;&#xA;I would like more &quot;space&quot; between the &quot;walls&quot;. Scaling is not an option, because I like the size of the tiles now.&#xD;&#xA;&#xD;&#xA;See my attached screenshot below.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/rejv8.png" />
  <row Id="35554" PostHistoryTypeId="1" PostId="15622" RevisionGUID="f6268074-19a8-4933-a682-afdccc76d70d" CreationDate="2011-08-05T19:40:00.487" UserId="6867" Text="Optimizing perlin noise generation" />
  <row Id="35555" PostHistoryTypeId="3" PostId="15622" RevisionGUID="f6268074-19a8-4933-a682-afdccc76d70d" CreationDate="2011-08-05T19:40:00.487" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;terrain-rendering&gt;&lt;terrain&gt;" />
  <row Id="35556" PostHistoryTypeId="2" PostId="15623" RevisionGUID="19bb122c-28c9-47a3-9b3f-a98ad9ceef01" CreationDate="2011-08-05T19:41:11.753" UserId="3505" Text="In order to get on the Xbox you can start out making a PC game using XNA, and if it's good it shouldn't be a big problem to get the right permissions so that you can port it to Xbox 360. If you are on the &quot;a dev kit is probably too expensive&quot; stage, don't even bother considering the PlayStation 3 a potential target platform." />
  <row Id="35557" PostHistoryTypeId="5" PostId="15613" RevisionGUID="4013c96b-9bfb-403f-8bf8-1a03601e28c7" CreationDate="2011-08-05T19:44:50.377" UserId="9078" Comment="added 9 characters in body" Text="MS offers its development stack for the 360 (XNA Game Studio, Expression Blend) for free.  And they also offer a pretty cheap entrace to market via Xbox live" />
  <row Id="35558" PostHistoryTypeId="2" PostId="15624" RevisionGUID="6a94af04-ff6e-4701-9bf8-9c4f1710a6a9" CreationDate="2011-08-05T20:23:45.010" UserId="337" Text="The easiest way I can think of is simply adjusting the threshold parameter, a smaller value would result in thicker walls, while a higher value would result in thinner walls (or vice versa, depending on your threshold test)" />
  <row Id="35559" PostHistoryTypeId="2" PostId="15625" RevisionGUID="1c495d24-37c4-4917-9a6a-f5a9e76d9d90" CreationDate="2011-08-05T20:33:34.560" UserId="6867" Text="I am trying to generate an ellipse outside two points (two-dimensional vectors).&#xD;&#xA;&#xD;&#xA;Is there a formular for that, or a cool way of doing that in C# XNA?&#xD;&#xA;&#xD;&#xA;What I am trying to do is have a particle circle around one player and another." />
  <row Id="35560" PostHistoryTypeId="1" PostId="15625" RevisionGUID="1c495d24-37c4-4917-9a6a-f5a9e76d9d90" CreationDate="2011-08-05T20:33:34.560" UserId="6867" Text="An ellipse outside two points?" />
  <row Id="35561" PostHistoryTypeId="3" PostId="15625" RevisionGUID="1c495d24-37c4-4917-9a6a-f5a9e76d9d90" CreationDate="2011-08-05T20:33:34.560" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;math&gt;" />
  <row Id="35562" PostHistoryTypeId="5" PostId="15612" RevisionGUID="4ab4e8e9-2997-429b-b7ce-2561f5416fbb" CreationDate="2011-08-05T20:54:31.097" UserId="8957" Comment="added 2014 characters in body" Text="I've been working up a game engine similar to [Terraria][1], mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one time. Creating around 500.000 tiles, that is 1/20th of what's possible in [Terraria][1], in my engine causes the frame-rate to drop from 60 to around 20, even tho I'm still only rendering the tiles in view. Mind you, I'm not doing anything with the tiles, only keeping them in memory.&#xD;&#xA;&#xD;&#xA;**Update**: Code added to show how I do things.&#xD;&#xA;&#xD;&#xA;This is part of a class, which handles the tiles and draws them. I'm guessing the culprit is the &quot;foreach&quot; part, which iterates everything, even empty indexes.&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            foreach (Tile tile in this.Tiles)&#xD;&#xA;            {&#xD;&#xA;                if (tile != null)&#xD;&#xA;                {&#xD;&#xA;                    if (tile.Position.X &lt; -this.Offset.X + 32)&#xD;&#xA;                        continue;&#xD;&#xA;                    if (tile.Position.X &gt; -this.Offset.X + 1024 - 48)&#xD;&#xA;                        continue;&#xD;&#xA;                    if (tile.Position.Y &lt; -this.Offset.Y + 32)&#xD;&#xA;                        continue;&#xD;&#xA;                    if (tile.Position.Y &gt; -this.Offset.Y + 768 - 48)&#xD;&#xA;                        continue;&#xD;&#xA;                    tile.Draw(spriteBatch, gameTime);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Also here is the Tile.Draw method, which could also do with an update, as each Tile uses four calls to the SpriteBatch.Draw method. This is part of my autotiling system, which means drawing each corner depending on neighboring tiles. texture_* are Rectangles, are set once at level creation, not each update.&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;        public virtual void Draw(SpriteBatch spriteBatch, GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            if (this.type == TileType.TileSet)&#xD;&#xA;            {&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position, texture_tl, this.BlendColor);&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 0), texture_tr, this.BlendColor);&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(0, 8), texture_bl, this.BlendColor);&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 8), texture_br, this.BlendColor);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Any critique or suggestions to my code is welcome.&#xD;&#xA;&#xD;&#xA;  [1]: http://terraria.org" />
  <row Id="35563" PostHistoryTypeId="2" PostId="15626" RevisionGUID="2cddb038-e1ac-4078-ba2d-65ceadd91090" CreationDate="2011-08-05T21:05:03.790" UserId="9080" Text="I'm trying to make a tile-world adventure game on iOS similar to Zelda Link to the Past on SNES, and one issue I've run into is having my camera move beyond walls revealing the rooms on the other side.&#xD;&#xA;I like the way Zelda handled room changes where once you went through a door the screen would slide over to show the new room, but I can't figure out how they did it.&#xD;&#xA;I'm using Obj-C on my own tile-world engine, so I'm more interested in logic than code, but anything would help.&#xD;&#xA;&#xD;&#xA;I'd also be interested to hear any alternative suggestions for limiting the movement of the camera. &#xD;&#xA;(Presently I have the position of the camera restricted to the bounds of the level being drawn, but in order to reduce loading I've decided to increase the size of levels to put multiple rooms/floors on the same map.)" />
  <row Id="35564" PostHistoryTypeId="1" PostId="15626" RevisionGUID="2cddb038-e1ac-4078-ba2d-65ceadd91090" CreationDate="2011-08-05T21:05:03.790" UserId="9080" Text="Zelda LttP (Super Nintendo) room changes?" />
  <row Id="35565" PostHistoryTypeId="3" PostId="15626" RevisionGUID="2cddb038-e1ac-4078-ba2d-65ceadd91090" CreationDate="2011-08-05T21:05:03.790" UserId="9080" Text="&lt;2d&gt;&lt;maps&gt;&lt;camera&gt;&lt;loading&gt;" />
  <row Id="35566" PostHistoryTypeId="2" PostId="15627" RevisionGUID="52c9a820-3086-4499-bc02-f733ba6a54ed" CreationDate="2011-08-05T21:13:11.063" UserId="4546" Text="One approach would be to consider the coordinates of the two entities (the player and the opponent) to be somewhere on the major axis of the ellipse, preferably placed such that their visual extents do not intersect with the intended ellipse. From that you should be able to compute the extents of the major axis. The minor axis is then derivable from the major axis by multiplying the extent of the major axis by some aspect ratio.&#xD;&#xA;&#xD;&#xA;Once you have the equation for a parametric ellipse, you can sample along it to compute coordinates suitable for particle placement - if you combine this with some perturbation of the equation you can probably get some nice artistic control over the effect." />
  <row Id="35567" PostHistoryTypeId="2" PostId="15628" RevisionGUID="a9527806-861f-4adf-8b97-067d65725733" CreationDate="2011-08-05T21:17:36.227" UserId="1323" Text="#Heightmaps&#xD;&#xA;&#xD;&#xA;With a heightmap, you store only the height component for each vertex (usually as 2D texture) and provide position and resolution only once for the whole quad. The landscape geometry is generated each frame using the geometry shader or hardware tessellation (fast!).&#xD;&#xA;&#xD;&#xA;##Pros:&#xD;&#xA;&#xD;&#xA; - **(Very) Low memory usage**: You only need to store one value per vertex and no indices.  &#xD;&#xA;This means you use **less than 1/3 of the VRAM** that a mesh would require. It's possible to improve this further by using detail maps or a noise filter to increase perceived detail.&#xD;&#xA;&#xD;&#xA; - **Relatively fast**: The geometry shader for heightmaps is small and runs fast. It's not as fast as geometry terrain though.&#xD;&#xA;&#xD;&#xA; - **Dynamic LOD/terrain**: It's possible to change the resolution of the generated mesh based on distance from the camera. [This will cause the shifting geometry if the resolution drops too far (around 0:40), but can be used for interesting effects.](http://www.youtube.com/watch?v=7jUGPFRt4bg)&#xD;&#xA;&#xD;&#xA; - **Easy terrain generation/creation**: Heightmaps can easily be created by blending noise functions like fractal [Perlin Noise](http://en.wikipedia.org/wiki/Perlin_noise) and heightmap editors are fast and easy to use. Both approaches can be combined.&#xD;&#xA;&#xD;&#xA;##Cons:&#xD;&#xA;&#xD;&#xA; - **Exactly one height per x/y coordinate**: There usually can't be holes in the ground or overhanging cliffs.&#xD;&#xA;&#xD;&#xA; - **Less control**: You can only control the precise height of each point if the grid size matches the texture coordinates.&#xD;&#xA;&#xD;&#xA; - **Artifacts**: If the four vertices that define a sub-quad aren't on the same plane, the split between the two vertices will become visible. This usually happens on steep cliffs with edges that don't follow a cardinal direction.&#xD;&#xA;&#xD;&#xA;Heightmaps are the most efficient way of rendering terrain by far and are used in many newer games that don't rely on advanced terrain features and have large outdoor areas. [Wikipedia has a list of programs that use heightmaps](http://en.wikipedia.org/wiki/Heightmap#Programs_that_use_heightmaps), but I'm not sure if that means they only use them as resources or also for rendering, so here a some games that are *likely* to use them:&#xD;&#xA;&#xD;&#xA; - Just Cause 2: Regions are loaded in square sectors and there are no holes in the terrain. In the demo, there's a deep hole with stretched triangles along the edges where there normally would be a building. (The area is normally inaccessible, but there are mods to remove some of the demo's limitations...)&#xD;&#xA;&#xD;&#xA; - Sims 2 (*maybe*): Neighborhood terrain is loaded as heightmap, but there are holes where lots (building sites) are placed. There are typical artifacts if you create cliffs on a lot, though, and it's quite tedious to add a cellar to a house (and hide the cliff under a veranda).&#xD;&#xA;&#xD;&#xA; - Valve's Source engine games: Rectangular brushes (static level geometry) can have heightmapped terrain on their faces. In these games, the usual quirks are often hidden with other brushes or props.&#xD;&#xA;&#xD;&#xA;It's impossible to tell for sure without looking at the shaders because every heightmap terrain can be rendered as mesh.&#xD;&#xA;&#xD;&#xA;#Voxels&#xD;&#xA;&#xD;&#xA;Voxel terrain stores terrain data for each point in a 3D grid. This method always uses the most storage per meaningful surface detail, even if you use compression methods like sparse octrees.&#xD;&#xA;&#xD;&#xA;##Pros:&#xD;&#xA;&#xD;&#xA; - **Continuous 3D data**: Voxels are pretty much the only efficient way to store continuous data about hidden terrain features like ore veins.&#xD;&#xA;&#xD;&#xA; - **Easy to modify**: Uncompressed voxel data can be changed easily.&#xD;&#xA;&#xD;&#xA; - **Advanced terrain features**: It's possible to create overhangs. Tunnels are seamless.&#xD;&#xA;&#xD;&#xA; - **Interesting terrain generation**: [Minecraft](http://www.minecraft.net/) does this by overlaying noise functions and gradients with predefined terrain features (trees, dungeons). (Read [Terrain Generation, Part 1](http://notch.tumblr.com/post/3746989361/terrain-generation-part-1) in Notch's blog for more info. There is no part 2 as of 05.8.2011.)&#xD;&#xA;&#xD;&#xA;##Cons:&#xD;&#xA;&#xD;&#xA; - **Slow**: To render voxel data, you either have to [use a ray tracer](http://www.youtube.com/watch?v=lpfaFrazOn4) or compute a mesh, for example with [marching cubes](http://de.wikipedia.org/wiki/Marching_Cubes) (There will be artifacts). Neighboring voxel aren't independent for mesh generation and the shaders are more complicated and usually produce more complex geometry. Rendering voxel data with high LOD can be very slow.&#xD;&#xA;&#xD;&#xA; - **Huge storage requirements**: Storing voxel data uses **lots of memory**. It's often not practicable to load the voxel data into VRAM for this reason, as you'd have to use smaller textures to compensate for it, even on modern hardware.&#xD;&#xA;&#xD;&#xA;It's not practical to use voxels for games that don't rely on voxel features like deformable terrain, but it can allow interesting game mechanics in some cases. [Voxel engines are more common in older games](http://en.wikipedia.org/wiki/Voxel#Computer_gaming), but there are also newer examples:&#xD;&#xA;&#xD;&#xA; - [Atomontage engine](http://atomontage.com/): Voxel rendering.&#xD;&#xA;&#xD;&#xA; - Worms 4: Uses &quot;poxels&quot;. According to Wikipedia it's a mix of voxels and polygons.&#xD;&#xA;&#xD;&#xA; - Minecraft: Uses voxel to represent the terrain in RAM, the graphics are polygon graphics. It's mostly software calculated though.&#xD;&#xA;&#xD;&#xA; - Terraria: An example for 2D voxels. I don't know how it renders.&#xD;&#xA;&#xD;&#xA; - [Voxels combined with physics](http://www.youtube.com/watch?v=eQMBGLMtdFE): Not a game. but it nicely showcases the destruction potential.&#xD;&#xA;&#xD;&#xA;#Meshes&#xD;&#xA;&#xD;&#xA;Polygon meshes are the most flexible and precise way of storing and rendering terrain. They are often used in games where precise control or advanced terrain features are needed.&#xD;&#xA;&#xD;&#xA;##Pros:&#xD;&#xA;&#xD;&#xA; - **Very fast**: You only have to do the usual projection calculation in the vertex shader. A geometry shader isn't needed.&#xD;&#xA;&#xD;&#xA; - **Very precise**: All coordinates are store individually for each vertex, so it's possible to move them horizontally and increase mesh density in places with finer details.&#xD;&#xA;&#xD;&#xA; - **No artifacts**: The mesh is rendered as-is, so there won't be any glitches or strange-looking borders.&#xD;&#xA;&#xD;&#xA; - **Advanced terrain features**: It's possible to leave holes and create overhangs. Tunnels are seamless.&#xD;&#xA;&#xD;&#xA;##Cons:&#xD;&#xA;&#xD;&#xA; - **Poor dynamic LOD**: Only possible with precomputed meshes. This will cause &quot;jumps&quot; when switching.&#xD;&#xA;&#xD;&#xA; - **Not easy to modify**: Finding vertices that correspond to an area that should be modified is slow.&#xD;&#xA;&#xD;&#xA; - **Not really efficient**: It's much smaller than voxel data, but still uses much more memory than a heightmap.&#xD;&#xA;&#xD;&#xA;Polygon terrain is often uses in games that don't have large open areas or can't use heightmap terrain because of its lack of precision and overhangs. I don't have a list, but I'm pretty sure that&#xD;&#xA;&#xD;&#xA; - every 3D Zelda and&#xD;&#xA;&#xD;&#xA; - every 3D Mario game&#xD;&#xA;&#xD;&#xA;use this.&#xD;&#xA;&#xD;&#xA;#Other methods&#xD;&#xA;&#xD;&#xA;It's possible to create a terrain entirely in the shader pipeline. If the algorithm runs only in the fragment/pixel shader, the detail can be virtually unlimited while memory impact is almost zero. The obvious downsides are almost no control over the shape and problems when the camera intersects the original rendering surface. It's still useful in space games where players don't interact with the surface of a planet.&#xD;&#xA;Parameter animations work best with this kind of terrain.&#xD;&#xA;&#xD;&#xA;#Conclusion&#xD;&#xA;&#xD;&#xA;There is no method that works well for every scenario, but it's fairly easy to choose one for a certain task:&#xD;&#xA;&#xD;&#xA; - **Heightmaps** are the best solution if you don't need overhangs or holes in the terrain surface. They are scalable and work well for most games.&#xD;&#xA;&#xD;&#xA; - **Meshes** have the highest precision and can describe overhangs, holes and tunnels. Use them if you have complex terrain with many of these features that doesn't change often.&#xD;&#xA;&#xD;&#xA; - **Voxels** are good for describing very dynamic terrain with many complex features. Avoid rendering them directly as they need large amounts of memory and processing.&#xD;&#xA;&#xD;&#xA; - **Other methods** may be better than any of the above if you don't have to interact with the terrain or need very detailed graphics. They usually work only for very specific scenarios.&#xD;&#xA;&#xD;&#xA;It's possible to combine different methods to get features from more than one, for example by tessellating mesh terrain with a heightmap to increase the detail structure of a cliff." />
  <row Id="35568" PostHistoryTypeId="2" PostId="15629" RevisionGUID="cf4a0e44-509b-4643-947d-d855188735d9" CreationDate="2011-08-05T21:29:57.490" UserId="6558" Text="The 2d Zelda games likely had a set of points (basically a rectangle) that contained the 'max scroll' limits on the camera, and when Link walked to a different room, it would move the camera and change where those points were set.  If you've already got bounds on the camera, then you can likely add these sort of room transitions without too much work.  During transitions, disable player input and quickly move the camera in the direction you want, then return control to the player.&#xD;&#xA;&#xD;&#xA;Pointless extra trivia time: Link's Awakening (and likely the other 2d zelda games) contained only a few maps that contained many different rooms, along the overworld and caves and dungeons mixed together (there's examples of this out on the internet, but I can't seem to find them right now).  I believe Link's Awakening in particular had 3 maps total, and many transitions would simply warp you to a different spot on the same map." />
  <row Id="35569" PostHistoryTypeId="2" PostId="15630" RevisionGUID="c206b21c-9216-40b2-bb69-c32e2d6a6af2" CreationDate="2011-08-05T21:31:33.793" UserId="9081" Text="You should probably partition the tilemap as already suggested. For example with [Quadtree structure][1] to get rid of any potential processing(e.g. even simply looping through) of the unnecessary(not visile) tiles. This way you only process what might need processing and increasing the size of the dataset(tile map) does not cause any practical performance penalty. Of course, assuming that the tree is well balanced.&#xD;&#xA;&#xD;&#xA;I don't want to sound dull or anything by repeating the &quot;old&quot;, but when optimizing, always remember to use the optimizations supported by your toolchain/compiler, you should experiment with them a bit. And yes, premature optimization is the root of all evil. Trust your compiler, it knows better than you in most cases, but always, **always** measure twice and never ever rely on guesstimates. It's not about having the fast implementation of the fastest algorithm as long as you don't know where the actual bottleneck is. That's why you should use a profiler to find the slowest(hot) paths of the code and focus on eliminating(or optimizing) them. Low-level knowledge of the target architecture is often essential for squeezing out everything the hardware has to offer, so study those CPU caches and learn what a branch predictor is. See what your profiler tells you about cache/branch hits/misses. And as using some form of a tree data structure shows, it's better to have intelligent data structures and dumb algorithms, than the other way around. Data comes first, when it comes to performance. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree " />
  <row Id="35570" PostHistoryTypeId="2" PostId="15631" RevisionGUID="297fe09b-5f49-46f1-9e2e-782df7dbc6d9" CreationDate="2011-08-05T21:34:10.157" UserId="6877" Text="In the title you are talking about engine development but, there in only 1-2 lines of actual engine development talk. Most of the thing that you've talked about is the logic part of the game, which in *not related to engine development*.They are related to game logic, which varies from game to game.&#xD;&#xA;&#xD;&#xA;Nonetheless, just for the title's sake I am going to put my cent here, cause I am also working on my own game engine right now.&#xD;&#xA;&#xD;&#xA;Game engine is an library which you develop to handle the game logic and assets. As anything else out there, there is not ideal process of developing a game engine. Whenever you want to develop a game engine, I can safely assume that you have worked(or have some idea) with several game engines before and now you want to make one of your own. In my case I am a big fan of [jMonkey Game Engine](http://jmonkeyengine.org/) and I am trying to mimic that engine in C++(jMonkey is Java based). Why copy instead of new architecture, for 2 reasons. I can use their architecture, cause they are developing it for years so, there should be a reason why they choose it.Rather then creating something new on my own from the scratch, and later finding it's not good for implementing certain feature. Another reason is the documentation will be same ;)&#xD;&#xA;&#xD;&#xA;So, first what I did is gathered enough knowledge about Opengl and java to read through the jMonkey source code. They I am trying to abstract out the important parts which can work independently. Say, you are going to drop the *Game State* &amp; *Render Manager* part. Just the object loading &amp; setting up material should be enough for prototype 0.1.&#xD;&#xA;&#xD;&#xA;Then add other features. You will find problem while adding new features to the existing code. You may end up with re-writing the major part of your code but you will learn a lot about what-shouldn't-be-done along the way. From here, its a iterative process. After a certain point, you'll find yourself in a position when you can think about your own engine without looking into other engines. That's when things get a lot of fun.&#xD;&#xA;&#xD;&#xA;Hope it helps someway.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35571" PostHistoryTypeId="25" PostId="15621" RevisionGUID="737f98b5-729c-47e4-9812-a1dafcee045b" CreationDate="2011-08-05T21:36:44.663" Comment="http://twitter.com/#!/StackGameDev/status/99594712507359233" />
  <row Id="35572" PostHistoryTypeId="2" PostId="15632" RevisionGUID="7b75543f-8ca6-40ef-bccc-3d957ec5efe9" CreationDate="2011-08-05T21:44:55.987" UserId="2897" Text="This is easy. The most obvious logic would be:&#xD;&#xA;&#xD;&#xA;  - Calculate camera viewport bounds and convert them to the world coordinates with current camera translation.&#xD;&#xA;  - Check resulting &quot;camera bounding rectangle&quot; with bounds of the current room and forbid further camera movement if needed.&#xD;&#xA;  - When your game charater moves onto a door trigger move camera to the next room.&#xD;&#xA;&#xD;&#xA;**The real question is, do you really want to break player's game flow after each room?** This day and age there are lots of memory, and it's possible to avoid such form of a loading screen which slows down and irritates a player. Rarely a game can incorporate loading transitions into its atmosphere, like doors in the Resident Evil or Parasite Eve, end even then it's a mild annoyance.&#xD;&#xA;&#xD;&#xA;I can't see your game world, but maybe other techniques which wont require waiting for a transition to end can be used, like fog of war, room roofs, vague silhouettes or some other form of &quot;terra incognita&quot;?" />
  <row Id="35573" PostHistoryTypeId="5" PostId="15628" RevisionGUID="4eb8fdee-9793-42b5-b361-e2b204812b97" CreationDate="2011-08-05T21:46:59.697" UserId="1323" Comment="added notes about downloading terrain from the graphics card and procedural space simulations as examples of terrain generation" Text="#Heightmaps&#xD;&#xA;&#xD;&#xA;With a heightmap, you store only the height component for each vertex (usually as 2D texture) and provide position and resolution only once for the whole quad. The landscape geometry is generated each frame using the geometry shader or hardware tessellation (fast!).&#xD;&#xA;&#xD;&#xA;##Pros:&#xD;&#xA;&#xD;&#xA; - **(Very) Low memory usage**: You only need to store one value per vertex and no indices.  &#xD;&#xA;This means you use **less than 1/3 of the VRAM** that a mesh would require. It's possible to improve this further by using detail maps or a noise filter to increase perceived detail.&#xD;&#xA;&#xD;&#xA; - **Relatively fast**: The geometry shader for heightmaps is small and runs fast. It's not as fast as geometry terrain though.&#xD;&#xA;&#xD;&#xA; - **Dynamic LOD/terrain**: It's possible to change the resolution of the generated mesh based on distance from the camera. [This will cause the shifting geometry if the resolution drops too far (around 0:40), but can be used for interesting effects.](http://www.youtube.com/watch?v=7jUGPFRt4bg)&#xD;&#xA;&#xD;&#xA; - **Easy terrain generation/creation**: Heightmaps can easily be created by blending noise functions like fractal [Perlin Noise](http://en.wikipedia.org/wiki/Perlin_noise) and heightmap editors are fast and easy to use. Both approaches can be combined.&#xD;&#xA;&#xD;&#xA;##Cons:&#xD;&#xA;&#xD;&#xA; - **Exactly one height per x/y coordinate**: There usually can't be holes in the ground or overhanging cliffs.&#xD;&#xA;&#xD;&#xA; - **Less control**: You can only control the precise height of each point if the grid size matches the texture coordinates.&#xD;&#xA;&#xD;&#xA; - **Artifacts**: If the four vertices that define a sub-quad aren't on the same plane, the split between the two vertices will become visible. This usually happens on steep cliffs with edges that don't follow a cardinal direction.&#xD;&#xA;&#xD;&#xA;Heightmaps are the most efficient way of rendering terrain by far and are used in many newer games that don't rely on advanced terrain features and have large outdoor areas. [Wikipedia has a list of programs that use heightmaps](http://en.wikipedia.org/wiki/Heightmap#Programs_that_use_heightmaps), but I'm not sure if that means they only use them as resources or also for rendering, so here a some games that are *likely* to use them:&#xD;&#xA;&#xD;&#xA; - Just Cause 2: Regions are loaded in square sectors and there are no holes in the terrain. In the demo, there's a deep hole with stretched triangles along the edges where there normally would be a building. (The area is normally inaccessible, but there are mods to remove some of the demo's limitations...)&#xD;&#xA;&#xD;&#xA; - Sims 2 (*maybe*): Neighborhood terrain is loaded as heightmap, but there are holes where lots (building sites) are placed. There are typical artifacts if you create cliffs on a lot, though, and it's quite tedious to add a cellar to a house (and hide the cliff under a veranda).&#xD;&#xA;&#xD;&#xA; - Valve's Source engine games: Rectangular brushes (static level geometry) can have heightmapped terrain on their faces. In these games, the usual quirks are often hidden with other brushes or props.&#xD;&#xA;&#xD;&#xA;It's impossible to tell for sure without looking at the shaders because every heightmap terrain can be rendered as mesh.&#xD;&#xA;&#xD;&#xA;#Voxels&#xD;&#xA;&#xD;&#xA;Voxel terrain stores terrain data for each point in a 3D grid. This method always uses the most storage per meaningful surface detail, even if you use compression methods like sparse octrees.&#xD;&#xA;&#xD;&#xA;##Pros:&#xD;&#xA;&#xD;&#xA; - **Continuous 3D data**: Voxels are pretty much the only efficient way to store continuous data about hidden terrain features like ore veins.&#xD;&#xA;&#xD;&#xA; - **Easy to modify**: Uncompressed voxel data can be changed easily.&#xD;&#xA;&#xD;&#xA; - **Advanced terrain features**: It's possible to create overhangs. Tunnels are seamless.&#xD;&#xA;&#xD;&#xA; - **Interesting terrain generation**: [Minecraft](http://www.minecraft.net/) does this by overlaying noise functions and gradients with predefined terrain features (trees, dungeons). (Read [Terrain Generation, Part 1](http://notch.tumblr.com/post/3746989361/terrain-generation-part-1) in Notch's blog for more info. There is no part 2 as of 05.8.2011.)&#xD;&#xA;&#xD;&#xA;##Cons:&#xD;&#xA;&#xD;&#xA; - **Slow**: To render voxel data, you either have to [use a ray tracer](http://www.youtube.com/watch?v=lpfaFrazOn4) or compute a mesh, for example with [marching cubes](http://de.wikipedia.org/wiki/Marching_Cubes) (There will be artifacts). Neighboring voxel aren't independent for mesh generation and the shaders are more complicated and usually produce more complex geometry. Rendering voxel data with high LOD can be very slow.&#xD;&#xA;&#xD;&#xA; - **Huge storage requirements**: Storing voxel data uses **lots of memory**. It's often not practicable to load the voxel data into VRAM for this reason, as you'd have to use smaller textures to compensate for it, even on modern hardware.&#xD;&#xA;&#xD;&#xA;It's not practical to use voxels for games that don't rely on voxel features like deformable terrain, but it can allow interesting game mechanics in some cases. [Voxel engines are more common in older games](http://en.wikipedia.org/wiki/Voxel#Computer_gaming), but there are also newer examples:&#xD;&#xA;&#xD;&#xA; - [Atomontage engine](http://atomontage.com/): Voxel rendering.&#xD;&#xA;&#xD;&#xA; - Worms 4: Uses &quot;poxels&quot;. According to Wikipedia it's a mix of voxels and polygons.&#xD;&#xA;&#xD;&#xA; - Minecraft: Uses voxel to represent the terrain in RAM, the graphics are polygon graphics. It's mostly software calculated though.&#xD;&#xA;&#xD;&#xA; - Terraria: An example for 2D voxels. I don't know how it renders.&#xD;&#xA;&#xD;&#xA; - [Voxels combined with physics](http://www.youtube.com/watch?v=eQMBGLMtdFE): Not a game. but it nicely showcases the destruction potential.&#xD;&#xA;&#xD;&#xA;#Meshes&#xD;&#xA;&#xD;&#xA;Polygon meshes are the most flexible and precise way of storing and rendering terrain. They are often used in games where precise control or advanced terrain features are needed.&#xD;&#xA;&#xD;&#xA;##Pros:&#xD;&#xA;&#xD;&#xA; - **Very fast**: You only have to do the usual projection calculation in the vertex shader. A geometry shader isn't needed.&#xD;&#xA;&#xD;&#xA; - **Very precise**: All coordinates are store individually for each vertex, so it's possible to move them horizontally and increase mesh density in places with finer details.&#xD;&#xA;&#xD;&#xA; - **No artifacts**: The mesh is rendered as-is, so there won't be any glitches or strange-looking borders.&#xD;&#xA;&#xD;&#xA; - **Advanced terrain features**: It's possible to leave holes and create overhangs. Tunnels are seamless.&#xD;&#xA;&#xD;&#xA;##Cons:&#xD;&#xA;&#xD;&#xA; - **Poor dynamic LOD**: Only possible with precomputed meshes. This will cause &quot;jumps&quot; when switching.&#xD;&#xA;&#xD;&#xA; - **Not easy to modify**: Finding vertices that correspond to an area that should be modified is slow.&#xD;&#xA;&#xD;&#xA; - **Not really efficient**: It's much smaller than voxel data, but still uses much more memory than a heightmap.&#xD;&#xA;&#xD;&#xA;Polygon terrain is often uses in games that don't have large open areas or can't use heightmap terrain because of its lack of precision and overhangs. I don't have a list, but I'm pretty sure that&#xD;&#xA;&#xD;&#xA; - every 3D Zelda and&#xD;&#xA;&#xD;&#xA; - every 3D Mario game&#xD;&#xA;&#xD;&#xA;use this.&#xD;&#xA;&#xD;&#xA;#Other methods&#xD;&#xA;&#xD;&#xA;It's possible to create a terrain entirely in the shader pipeline. If the algorithm runs only in the fragment/pixel shader, the detail can be virtually unlimited while memory impact is almost zero. The obvious downsides are almost no control over the shape and problems when the camera intersects the original rendering surface. It's still useful in space games where players don't interact with the surface of a planet.&#xD;&#xA;Parameter animations work best with this kind of terrain.&#xD;&#xA;&#xD;&#xA;It should be possible to download the generated terrain geometry from the graphics card to use it for the rest of the game engine, but I don't know how the performance of that is or whether this has been done so far.&#xD;&#xA;&#xD;&#xA;#Conclusion&#xD;&#xA;&#xD;&#xA;There is no method that works well for every scenario, but it's fairly easy to choose one for a certain task:&#xD;&#xA;&#xD;&#xA; - **Heightmaps** are the best solution if you don't need overhangs or holes in the terrain surface. They are scalable and work well for most games.&#xD;&#xA;&#xD;&#xA; - **Meshes** have the highest precision and can describe overhangs, holes and tunnels. Use them if you have complex terrain with many of these features that doesn't change often.&#xD;&#xA;&#xD;&#xA; - **Voxels** are good for describing very dynamic terrain with many complex features. Avoid rendering them directly as they need large amounts of memory and processing.&#xD;&#xA;&#xD;&#xA; - **Other methods** may be better than any of the above if you don't have to interact with the terrain or need very detailed graphics. They usually work only for very specific scenarios.&#xD;&#xA;&#xD;&#xA;It's possible to combine different methods to get features from more than one, for example by tessellating mesh terrain with a heightmap to increase the detail structure of a cliff.&#xD;&#xA;&#xD;&#xA;Dynamic terrain generation is heavily used in [procedural space simulation](http://freegamer.blogspot.com/2011/01/oh-my-god-its-full-of-stars-free-and.html) and [some have become really advanced in the last years](http://www.infinity-universe.com/). The forums of these projects should have some resources on the topic." />
  <row Id="35574" PostHistoryTypeId="5" PostId="15607" RevisionGUID="0754fa0d-e7a4-4661-99be-0658e7a27269" CreationDate="2011-08-05T22:27:21.703" UserId="1742" Comment="trying to make it more obvious I'm not aiming at making a game, but really need a CPU" Text="I don't have the cash to stump up for a PS3 or 360 devkit, but the G3, G4 and G5 macs are running with PowerPC chips, which I believe is virtually the same architecture as the 360, and only missing the SPUs from the PS3, so I would like to know which Macs would be good for profiling code with.&#xD;&#xA;&#xD;&#xA;I'm after a machine that would give me equivalent timings (not actual timings, but scale the same given difference code) so I'm looking for ones that have about the same cache size and memory bandwidth ratios as the consoles. Are there any specific Macs that have these traits?&#xD;&#xA;&#xD;&#xA;The reason I need one is that I'm developing a new programming language for games development that specifically targets the current and potential future of console hardware. One aspect of this is the in-order microcode expanding risc chips at the core of both the 360 and the PS3, and probably the next generation too, which is why I want a PPC based mac, as I'd heard that places like where I work used to use Macs as pretend 360 devkits until the hardware design was in a fit state to send out prototype 360s.&#xD;&#xA;&#xD;&#xA;At a later date, I'll want to get my hands on an FPGA (as that's the only other route I can see consoles heading any time soon), and a cluster (as they are good practice for ensuring your task scheduling and separation are up to scratch), but for now I just need to know if there is a sweetspot machine that had very similar specs to the current consoles' CPU and memory bandwidth." />
  <row Id="35575" PostHistoryTypeId="5" PostId="15601" RevisionGUID="b307d1f6-aec1-458f-b499-3df4d5ed36dd" CreationDate="2011-08-05T22:32:04.147" UserId="9073" Comment="added 1123 characters in body" Text="I'm trying to mimic `FindGameObjectsWithTag` with `FindGameObjectswithName`. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on instantiation through the inspector.&#xD;&#xA;&#xD;&#xA;My goal is create multiple enemy spawners. My current spawner has a drag and drop variable for enemyprefabs. It looks for enemies tagged &quot;ReSpawn&quot;, then checks if that length is below (x) to start spawning more. I would like to upgrade my current single spawner to still check for enemies name respawn, but then check if those respawn have a child object named &quot;blank&quot; (an input string name I can specify in the editor). &#xD;&#xA;&#xD;&#xA;This way, I can set the enemy spawners anywhere (near water, tall grass, forests, etc), and when I defeat one, the specific spawner will instantiate one of its opponent for that area.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var ThisSpot:String;&#xD;&#xA;    var Oppos : GameObject[];&#xD;&#xA;    var OppoCount : GameObject[];&#xD;&#xA;    &#xD;&#xA;    var HowMany = 3;&#xD;&#xA;    var spawnSizeArea = 25;&#xD;&#xA;    &#xD;&#xA;    function Start() {&#xD;&#xA;        StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Update () {&#xD;&#xA;        OppoCount = GameObject.FindGameObjectsWithTag(&quot;Respawn&quot;);&#xD;&#xA;        // OppoCount = GameObject.FindWithName(ThisSpot);  This is what I am trying to achieve&#xD;&#xA;        &#xD;&#xA;        if(OppoCount.length &lt; HowMany) {&#xD;&#xA;            StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Spawn() {&#xD;&#xA;        var length = Oppos.length-1;&#xD;&#xA;        var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;        curSpawn = Oppos[index];&#xD;&#xA;        &#xD;&#xA;        var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;        var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;        &#xD;&#xA;        yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;        &#xD;&#xA;        Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        &#xD;&#xA;        // Then I could use these 2 lines of code below to use multiple spawners      &#xD;&#xA;        //var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        //newOp.transform.Find(&quot;fighter&quot;).gameObject.name=ThisSpot;&#xD;&#xA;        &#xD;&#xA;        StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;    **function Update () {&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    for (var i =0; i &lt; OppoCount.length ; i ++)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    if(OppoCount.length &gt; 0){&#xD;&#xA;    &#xD;&#xA;    if (OppoCount[i].active == false)&#xD;&#xA;    &#xD;&#xA;    OppoCount.RemoveAt(i);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    if(OppoCount.length &lt; HowMany){&#xD;&#xA;    StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    function Spawn(){&#xD;&#xA;    &#xD;&#xA;    var length = Oppos.length-1;&#xD;&#xA;    var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;    curSpawn = Oppos[index];&#xD;&#xA;    &#xD;&#xA;    //var newPosition  = Random.insideUnitCircle* spawnSizeArea;&#xD;&#xA;    var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;    var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    //yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;    yield WaitForSeconds(Random.Range(2,4));&#xD;&#xA;    &#xD;&#xA;    //Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;    &#xD;&#xA;    var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;    &#xD;&#xA;    //newOp.transform.Find(&quot;fighter&quot;).gameObject.active = false;&#xD;&#xA;    &#xD;&#xA;    OppoCount.Push(newOp);&#xD;&#xA;    &#xD;&#xA;    StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;    }**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35576" PostHistoryTypeId="5" PostId="15601" RevisionGUID="d31748f2-0167-48b8-b47a-1dac22793ac3" CreationDate="2011-08-05T22:37:56.653" UserId="9073" Comment="added 163 characters in body" Text="I'm trying to mimic `FindGameObjectsWithTag` with `FindGameObjectswithName`. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on instantiation through the inspector.&#xD;&#xA;&#xD;&#xA;My goal is create multiple enemy spawners. My current spawner has a drag and drop variable for enemyprefabs. It looks for enemies tagged &quot;ReSpawn&quot;, then checks if that length is below (x) to start spawning more. I would like to upgrade my current single spawner to still check for enemies name respawn, but then check if those respawn have a child object named &quot;blank&quot; (an input string name I can specify in the editor). &#xD;&#xA;&#xD;&#xA;This way, I can set the enemy spawners anywhere (near water, tall grass, forests, etc), and when I defeat one, the specific spawner will instantiate one of its opponent for that area.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    var ThisSpot:String;&#xD;&#xA;    var Oppos : GameObject[];&#xD;&#xA;    var OppoCount : GameObject[];&#xD;&#xA;    &#xD;&#xA;    var HowMany = 3;&#xD;&#xA;    var spawnSizeArea = 25;&#xD;&#xA;    &#xD;&#xA;    function Start() {&#xD;&#xA;        StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Update () {&#xD;&#xA;        OppoCount = GameObject.FindGameObjectsWithTag(&quot;Respawn&quot;);&#xD;&#xA;        // OppoCount = GameObject.FindWithName(ThisSpot);  This is what I am trying to achieve&#xD;&#xA;        &#xD;&#xA;        if(OppoCount.length &lt; HowMany) {&#xD;&#xA;            StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Spawn() {&#xD;&#xA;        var length = Oppos.length-1;&#xD;&#xA;        var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;        curSpawn = Oppos[index];&#xD;&#xA;        &#xD;&#xA;        var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;        var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;        &#xD;&#xA;        yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;        &#xD;&#xA;        Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        &#xD;&#xA;        // Then I could use these 2 lines of code below to use multiple spawners      &#xD;&#xA;        //var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        //newOp.transform.Find(&quot;fighter&quot;).gameObject.name=ThisSpot;&#xD;&#xA;        &#xD;&#xA;        StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT - the solution. Instead of looking for gameobject names/tags, just keep track of a list&#xD;&#xA;&#xD;&#xA;        **function Update () {&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        for (var i =0; i &lt; OppoCount.length ; i ++)&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        if(OppoCount.length &gt; 0){&#xD;&#xA;    &#xD;&#xA;    if (OppoCount[i].gameObject == null)&#xD;&#xA;    &#xD;&#xA;    OppoCount.RemoveAt(i);&#xD;&#xA;    }&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        if(OppoCount.length &lt; HowMany){&#xD;&#xA;        StartCoroutine (&quot;Spawn&quot;);&#xD;&#xA;        }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        function Spawn(){&#xD;&#xA;        &#xD;&#xA;        var length = Oppos.length-1;&#xD;&#xA;        var index = Mathf.Round(length*UnityEngine.Random.value);&#xD;&#xA;        curSpawn = Oppos[index];&#xD;&#xA;        &#xD;&#xA;        //var newPosition  = Random.insideUnitCircle* spawnSizeArea;&#xD;&#xA;        var xz = Random.insideUnitCircle * spawnSizeArea;&#xD;&#xA;        var newPosition = Vector3(xz.x,0,xz.x)+transform.position;&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        //yield WaitForSeconds(Random.Range(70,120));&#xD;&#xA;        yield WaitForSeconds(Random.Range(2,4));&#xD;&#xA;        &#xD;&#xA;        //Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        &#xD;&#xA;        var newOp : GameObject = Instantiate(curSpawn, newPosition, transform.rotation);&#xD;&#xA;        &#xD;&#xA;        //newOp.transform.Find(&quot;fighter&quot;).gameObject.active = false;&#xD;&#xA;        &#xD;&#xA;        OppoCount.Push(newOp);&#xD;&#xA;        &#xD;&#xA;        StopCoroutine(&quot;Spawn&quot;);&#xD;&#xA;        }**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35577" PostHistoryTypeId="2" PostId="15633" RevisionGUID="d2bff1be-3289-4cdd-8af0-a405129057d0" CreationDate="2011-08-05T23:25:31.027" UserId="6109" Text="How did the folks at Dice create the destructible environments in the Battlefield series? Do they just assemble the buildings out of predefined sub-regions the break apart when there is an explosion or something like that? I can't think of anything else." />
  <row Id="35578" PostHistoryTypeId="1" PostId="15633" RevisionGUID="d2bff1be-3289-4cdd-8af0-a405129057d0" CreationDate="2011-08-05T23:25:31.027" UserId="6109" Text="How'd they do it: Destructible enviornments in BFbc2 and BF3" />
  <row Id="35579" PostHistoryTypeId="3" PostId="15633" RevisionGUID="d2bff1be-3289-4cdd-8af0-a405129057d0" CreationDate="2011-08-05T23:25:31.027" UserId="6109" Text="&lt;engine&gt;" />
  <row Id="35580" PostHistoryTypeId="2" PostId="15634" RevisionGUID="bee6794a-7251-459e-a5e8-3adfdb413732" CreationDate="2011-08-05T23:27:13.010" UserId="5957" Text="Solved it - the missing signature was a bug in the C++ code that didn't manifest in the other project as that function was never called. Just a miss named function signature, that's all. " />
  <row Id="35581" PostHistoryTypeId="2" PostId="15635" RevisionGUID="00218292-ed1a-4186-8494-669e1cc2bdac" CreationDate="2011-08-06T00:09:33.363" UserId="4306" Text="How can I make **extremely** huge terrains in Unity? It seems like I can set width and length to large values. But the Heightmap resolution only goes up to 4097 and the Detail resolution only goes up to 4048.&#xD;&#xA;&#xD;&#xA;Any ideas? This is for an MMO that I'm going to make." />
  <row Id="35582" PostHistoryTypeId="1" PostId="15635" RevisionGUID="00218292-ed1a-4186-8494-669e1cc2bdac" CreationDate="2011-08-06T00:09:33.363" UserId="4306" Text="How can I make huge terrains in Unity?" />
  <row Id="35583" PostHistoryTypeId="3" PostId="15635" RevisionGUID="00218292-ed1a-4186-8494-669e1cc2bdac" CreationDate="2011-08-06T00:09:33.363" UserId="4306" Text="&lt;mmo&gt;&lt;unity&gt;&lt;terrain&gt;&lt;heightmap&gt;" />
  <row Id="35584" PostHistoryTypeId="25" PostId="15607" RevisionGUID="e14e12dc-a5ba-4214-ae26-f8fb20d6dd0e" CreationDate="2011-08-06T00:36:45.133" Comment="http://twitter.com/#!/StackGameDev/status/99640011623903232" />
  <row Id="35585" PostHistoryTypeId="2" PostId="15636" RevisionGUID="31889066-38f0-438d-ad10-957ed29dcfe9" CreationDate="2011-08-06T01:19:12.947" UserId="953" Text="Some games of this sort, especially ones with single-screen non-scrolling rooms (but also many with scrolling rooms!) don't actually move the camera over to the next room. They move the next room over to the camera. The math to do so is trivial but quite a few lines of code, but you can imagine the new room &quot;pushing&quot; the old one out of the way. If that then places the camera in a weird place, you can reset the position of the camera and the new room in one impossible-to-notice step.&#xD;&#xA;&#xD;&#xA;If you're working in 2D and only loading a room at a time, you shouldn't have to worry about load times." />
  <row Id="35586" PostHistoryTypeId="2" PostId="15637" RevisionGUID="08912e1f-6786-475e-98a1-8ce5a835f6fc" CreationDate="2011-08-06T02:55:56.603" UserId="9074" Text="So, an hour or so of fiddling and trying different libraries, and it seems [OIS][1] just recognises the controller as a joystick and provides me with everything I need. &#xD;&#xA;&#xD;&#xA;If you install OIS from the link above, and make/run the 'ConsoleTest' project, you can see the output from the controller in the debug window.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/wgois/%20OIS" />
  <row Id="35587" PostHistoryTypeId="5" PostId="15633" RevisionGUID="a88cfc3b-8179-4922-9a7a-4548669daa7e" CreationDate="2011-08-06T03:19:47.187" UserId="4513" Comment="formatting?" Text="How did the folks at Dice create the destructible environments in the more recent Battlefield games?&#xD;&#xA;&#xD;&#xA;Did they just assemble the buildings out of predefined sub-regions that break apart when there is an explosion or something similar? I can't think of anything else." />
  <row Id="35588" PostHistoryTypeId="4" PostId="15633" RevisionGUID="a88cfc3b-8179-4922-9a7a-4548669daa7e" CreationDate="2011-08-06T03:19:47.187" UserId="4513" Comment="formatting?" Text="How'd they do it: Destructible environments in BF:BC2 and BF3" />
  <row Id="35589" PostHistoryTypeId="6" PostId="15633" RevisionGUID="a88cfc3b-8179-4922-9a7a-4548669daa7e" CreationDate="2011-08-06T03:19:47.187" UserId="4513" Comment="formatting?" Text="&lt;engine&gt;&lt;physics&gt;" />
  <row Id="35590" PostHistoryTypeId="24" PostId="15633" RevisionGUID="a88cfc3b-8179-4922-9a7a-4548669daa7e" CreationDate="2011-08-06T03:19:47.187" Comment="Proposed by 4513 approved by 6109 edit id of 601" />
  <row Id="35591" PostHistoryTypeId="25" PostId="15635" RevisionGUID="5d0349c0-dcab-4fa0-b8d0-fd5913b3f6ce" CreationDate="2011-08-06T03:36:45.537" Comment="http://twitter.com/#!/StackGameDev/status/99685313466744832" />
  <row Id="35592" PostHistoryTypeId="5" PostId="15626" RevisionGUID="ceef49e9-7a53-4993-a152-bf4c3530a292" CreationDate="2011-08-06T04:10:17.130" UserId="9080" Comment="added 713 characters in body" Text="I'm trying to make a tile-world adventure game on iOS similar to Zelda Link to the Past on SNES, and one issue I've run into is having my camera move beyond walls revealing the rooms on the other side.&#xD;&#xA;I like the way Zelda handled room changes where once you went through a door the screen would slide over to show the new room, but I can't figure out how they did it.&#xD;&#xA;I'm using Obj-C on my own tile-world engine, so I'm more interested in logic than code, but anything would help.&#xD;&#xA;&#xD;&#xA;I'd also be interested to hear any alternative suggestions for limiting the movement of the camera. &#xD;&#xA;(Presently I have the position of the camera restricted to the bounds of the level being drawn, but in order to reduce loading I've decided to increase the size of levels to put multiple rooms/floors on the same map.)&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;One of the key things that the transition I am asking about offers is the ability for the player to leave the center of the screen. I think that you lose a sense of motion or progress when the player is always dead center in the screen. My camera is designed to stop moving at the world bounds, but I'm having trouble figuring out how to define 'room bounds' within a world for the camera to stay within until triggered to move.&#xD;&#xA;&#xD;&#xA;I also recognize how transitions break up gameplay, but when you're dealing with a top-down 2D adventure game, if you want to conceal the contents of the next room over and also allow for some range of motion free of the camera, I'm not sure what better way there is." />
  <row Id="35593" PostHistoryTypeId="5" PostId="15612" RevisionGUID="5ea6462c-ee84-4f6d-8d58-e5c2d29b3376" CreationDate="2011-08-06T04:26:59.863" UserId="8957" Comment="Added the choosen solution." Text="I've been working up a game engine similar to [Terraria][1], mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one time. Creating around 500.000 tiles, that is 1/20th of what's possible in [Terraria][1], in my engine causes the frame-rate to drop from 60 to around 20, even tho I'm still only rendering the tiles in view. Mind you, I'm not doing anything with the tiles, only keeping them in memory.&#xD;&#xA;&#xD;&#xA;**Update**: Code added to show how I do things.&#xD;&#xA;&#xD;&#xA;This is part of a class, which handles the tiles and draws them. I'm guessing the culprit is the &quot;foreach&quot; part, which iterates everything, even empty indexes.&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            foreach (Tile tile in this.Tiles)&#xD;&#xA;            {&#xD;&#xA;                if (tile != null)&#xD;&#xA;                {&#xD;&#xA;                    if (tile.Position.X &lt; -this.Offset.X + 32)&#xD;&#xA;                        continue;&#xD;&#xA;                    if (tile.Position.X &gt; -this.Offset.X + 1024 - 48)&#xD;&#xA;                        continue;&#xD;&#xA;                    if (tile.Position.Y &lt; -this.Offset.Y + 32)&#xD;&#xA;                        continue;&#xD;&#xA;                    if (tile.Position.Y &gt; -this.Offset.Y + 768 - 48)&#xD;&#xA;                        continue;&#xD;&#xA;                    tile.Draw(spriteBatch, gameTime);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Also here is the Tile.Draw method, which could also do with an update, as each Tile uses four calls to the SpriteBatch.Draw method. This is part of my autotiling system, which means drawing each corner depending on neighboring tiles. texture_* are Rectangles, are set once at level creation, not each update.&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;        public virtual void Draw(SpriteBatch spriteBatch, GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            if (this.type == TileType.TileSet)&#xD;&#xA;            {&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position, texture_tl, this.BlendColor);&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 0), texture_tr, this.BlendColor);&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(0, 8), texture_bl, this.BlendColor);&#xD;&#xA;                spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 8), texture_br, this.BlendColor);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;Any critique or suggestions to my code is welcome.&#xD;&#xA;&#xD;&#xA;**Update**: Solution added.&#xD;&#xA;&#xD;&#xA;Here's the final Level.Draw method. The Level.TileAt method simply checks the inputted values, to avoid OutOfRange exceptions.&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            Int32 startx = (Int32)Math.Floor((-this.Offset.X - 32) / 16);&#xD;&#xA;            Int32 endx = (Int32)Math.Ceiling((-this.Offset.X + 1024 + 32) / 16);&#xD;&#xA;            Int32 starty = (Int32)Math.Floor((-this.Offset.Y - 32) / 16);&#xD;&#xA;            Int32 endy = (Int32)Math.Ceiling((-this.Offset.Y + 768 + 32) / 16);&#xD;&#xA;&#xD;&#xA;            for (Int32 x = startx; x &lt; endx; x += 1)&#xD;&#xA;            {&#xD;&#xA;                for (Int32 y = starty; y &lt; endy; y += 1)&#xD;&#xA;                {&#xD;&#xA;                    Tile tile = this.TileAt(x, y);&#xD;&#xA;                    if (tile != null)&#xD;&#xA;                        tile.Draw(spriteBatch, gameTime);&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;  [1]: http://terraria.org" />
  <row Id="35594" PostHistoryTypeId="2" PostId="15638" RevisionGUID="b7f6559c-340f-477f-8d3f-343b51da921d" CreationDate="2011-08-06T05:28:52.607" UserId="8974" Text="I'm writing code in XNA 4.0, and part of my game entails drawing a textured grid of cubes. It is working, but the problem is the memory usage is growing way too rapidly. Each cube has 8 points, and each point is a VertexPositionTexture. A 16x9 grid takes 50MB memory, and that is just the grid and lines, no textures or anything else. Doubling the grid to 32x18 makes the memory jump to 150MB....I don't understand what is taking up so much room. I draw the grid using DrawUserIndexedPrimitives. The cubes can move around and be different sizes so I can't consolidate them to one set of vertices. What is the proper way to render a few thousand vertices without using so much memory?&#xD;&#xA;&#xD;&#xA;These are all the members for my Cube class so far:&#xD;&#xA;&#xD;&#xA;    GraphicsDevice graphicsDevice; // for drawing this cube&#xD;&#xA;    Tileset tileset; // reference to parent object&#xD;&#xA;    VertexPositionTexture[] pointList; // the list of 8 vertices&#xD;&#xA;    BasicEffect basicEffect; // effect to draw using a shader&#xD;&#xA;    Vector3 localTranslation; // just 3 floats&#xD;&#xA;    VertexBuffer vertexBuffer; // for sending the vertices to the GPU&#xD;&#xA;&#xD;&#xA;There are also a few functions that allocate memory for the pointList...but nothing out of the ordinary..." />
  <row Id="35595" PostHistoryTypeId="1" PostId="15638" RevisionGUID="b7f6559c-340f-477f-8d3f-343b51da921d" CreationDate="2011-08-06T05:28:52.607" UserId="8974" Text="XNA help - too much memory used?" />
  <row Id="35596" PostHistoryTypeId="3" PostId="15638" RevisionGUID="b7f6559c-340f-477f-8d3f-343b51da921d" CreationDate="2011-08-06T05:28:52.607" UserId="8974" Text="&lt;xna&gt;" />
  <row Id="35597" PostHistoryTypeId="25" PostId="15638" RevisionGUID="08e08f1b-1f16-4c1c-8762-e6d078ae53e8" CreationDate="2011-08-06T06:36:45.587" Comment="http://twitter.com/#!/StackGameDev/status/99730613585707008" />
  <row Id="35598" PostHistoryTypeId="2" PostId="15639" RevisionGUID="7ec3d365-245e-4750-bdc9-aabcda871a39" CreationDate="2011-08-06T07:29:04.103" UserId="1742" Text="There is no alternative to actually organising the tests and then running them on final hardware. A Mac has&#xD;&#xA;&#xD;&#xA;&gt; &quot;a completely different performance profile from the final kits (in both the CPU, GPU and other components)&quot;&#xD;&#xA;&#xD;&#xA;So, I should just work on the project until such time as I can get access to the hardware then submit a set of tests and get profiles back and iterate like that until I'm happy with the state of the project.&#xD;&#xA;&#xD;&#xA;Please vote to close as this question is too limited in use to anyone." />
  <row Id="35599" PostHistoryTypeId="2" PostId="15640" RevisionGUID="bee29c87-c52a-4681-93da-2d8b7f69eebd" CreationDate="2011-08-06T08:17:34.737" UserId="1499" Text="Have a look at this SunBurn instancing example: [http://indiefreaks.com/2011/01/27/hardware-instancing-with-igf-sunburn-rd-part-1/][1] and then part 2 &#xD;&#xA;[http://indiefreaks.com/2011/01/28/hardware-instancing-with-igf-sunburn-rd-part-2/][2]&#xD;&#xA;It handles massive amounts of instanced objects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://indiefreaks.com/2011/01/27/hardware-instancing-with-igf-sunburn-rd-part-1/&#xD;&#xA;  [2]: http://indiefreaks.com/2011/01/28/hardware-instancing-with-igf-sunburn-rd-part-2/" />
  <row Id="35600" PostHistoryTypeId="2" PostId="15641" RevisionGUID="900b93c8-d1a7-4626-95e1-4d915665c941" CreationDate="2011-08-06T08:45:01.133" UserId="6877" Text="To put it simple yes that what they do. But the go an extra length to cover up the straight edges using *destruction mask*. After removing the part of the geometry, they add *detailed mesh* around the destroyed section to make it look believable.&#xD;&#xA;&#xD;&#xA;Here is how it works,&#xD;&#xA;&#xD;&#xA;  ![enter image description here][1]&#xD;&#xA;&#xD;&#xA;  ![When destroying a part of this house, we begin by removing a piece of the geometry][2]  &#xD;&#xA;&#xD;&#xA;When destroying a part of this house, they begin by removing a piece of the geometry&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/6H8Sp.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://i.stack.imgur.com/01iWs.jpg&#xD;&#xA;&#xD;&#xA;  ![enter image description here][3]&#xD;&#xA;Then added detail meshes around the destroyed section.&#xD;&#xA;&#xD;&#xA;  ![enter image description here][4]&#xD;&#xA;&#xD;&#xA;And the final step is to add the destruction mask.&#xD;&#xA;&#xD;&#xA;  [3]: http://i.stack.imgur.com/kvTCl.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/GX4u8.jpg&#xD;&#xA;&#xD;&#xA;They also use particle effects and mesh debris for more dramatic look.&#xD;&#xA;&#xD;&#xA;*(All the reference is taken from those 2 publications I mentioned in the comment)*" />
  <row Id="35604" PostHistoryTypeId="2" PostId="15643" RevisionGUID="9ce35600-6f13-4280-addd-7aadf412797f" CreationDate="2011-08-06T09:28:11.323" UserId="5473" Text="The proper term for this in computational geometry is CSG -- Constructive Solid Geometry (although in this case, it's destructive, strictly speaking), if you want to do more research on how the algorithms actually work." />
  <row Id="35605" PostHistoryTypeId="2" PostId="15644" RevisionGUID="bf89899b-0e85-4c21-9253-316c98092599" CreationDate="2011-08-06T09:35:28.977" UserId="2897" Text="Well, you're obviously not a someone who gives up easily, you're a real man of iron, I would have thrown my hands in the air much earlier, since this project bears a strong resemblance to a kelp forest :)&#xD;&#xA;&#xD;&#xA;First of all, positions and velocities are set all over the place, from a viewpoint of physics subsystem it's a recipe for a disaster. Also, when changing these things by various subsystems, create a private methods like &quot;ChangeVelocityByPhysicsEngine&quot;, &quot;ChangeVelocityBySpring&quot;, &quot;ChangeVelocityByCrate&quot;, etc. That way debugging would be easier.&#xD;&#xA;&#xD;&#xA;**First problem.**&#xD;&#xA;&#xD;&#xA;Onto the question itself. Now you're just applying position and velocities fixes &quot;as they go&quot; in order of appearance and game logic. That won't work for complex interactions without carefully hard-coding the physics of each complex thing. A separate physics engine is not needed then.&#xD;&#xA;&#xD;&#xA;In order to do complex interactions without hacks, you need to add an additional step between detecting collisions based on positions which were changed by initial velocities and final changes of positions based on &quot;after-velocity&quot;. I imagine it would go like this:&#xD;&#xA;&#xD;&#xA;  - integrate velocity using the all the forces acting on bodies *(you're applying velocity fixes directly now, leave velocity calculations to your physics engine and use forces to move things instead)*, then use the new velocity to integrate positions.&#xD;&#xA;  - detect collisions, then restore velocity and positions,&#xD;&#xA;  - then process collisions (using impulses without immediate position update, ofc, only velocity is changed until the final step)&#xD;&#xA;  - integrate new velocity again and process all collisions using impulses again, except now collisions are inelastic.&#xD;&#xA;  - make final integration of positions using resulting velocity.&#xD;&#xA;&#xD;&#xA;Additional things may pop up, like dealing with jerking, refusal to stack up when FPS is small, or other things like that, be prepared :)&#xD;&#xA;&#xD;&#xA;**Second problem**&#xD;&#xA;&#xD;&#xA;Vertical velocity of both those &quot;deadweight&quot; crates never changes from zero. Strangely, in PhysSpring's Update loop you assign velocity, but in PhysCrate's Update loop it's already zero. It's possible to find a line where velocity goes wrong, but I stopped debugging here since it's &quot;Reap What You Sew&quot; situation. It's time to stop coding and start rethinking everything when debugging becomes hard. But if it comes to a point where it's impossible even for code's author to understand what's going on in the code, then your code base is already dead without you realizing it :)&#xD;&#xA;&#xD;&#xA;**Third problem**&#xD;&#xA;&#xD;&#xA;I think that something is off when you need to recreate a portion of Farseer to do a simple tile-based platformer. Personally, I would think of your current engine as of tremendous experience, and then ditch it completely for more simple and straightforward tile-based physics. While doing so, it would be wise to pick up on things like Debug.Assert and maybe even, oh the horror, unit tests, since it would be possible to catch unexpected things earlier." />
  <row Id="35606" PostHistoryTypeId="2" PostId="15645" RevisionGUID="96d8b532-e4e5-4e82-84c6-d99a657a5b68" CreationDate="2011-08-06T09:36:37.020" UserId="5125" Text="You'll need to break up the terrains in chunks, ie. several smaller terrains.&#xD;&#xA;Yo'll need to 'seam' those agains eachother (with a script) so there won't be 'holes' between them but otherwise you can just start doing them right away.&#xD;&#xA;&#xD;&#xA;You might want to know too that since Unity3D ~3.0 you can't move items (read terrains and items) too far away (like +/-100000 steps IIRC) so this will influence the maximum size of your world.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using this in my online RPG game anyway (with the exception that I only use Unity3D for level design, not for the actual game).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Just because I'm curious, would you like to share some info about your game (like advancement, type, graphics, style etc.)?" />
  <row Id="35607" PostHistoryTypeId="25" PostId="15633" RevisionGUID="c1da6320-25d3-4d03-89b9-215403cc0a73" CreationDate="2011-08-06T09:36:45.603" Comment="http://twitter.com/#!/StackGameDev/status/99775912358313984" />
  <row Id="35608" PostHistoryTypeId="2" PostId="15646" RevisionGUID="82ae0361-39e6-4076-a48e-6078e5337e67" CreationDate="2011-08-06T09:40:19.313" UserId="1141" Text="Split the terrain into square &quot;chunks&quot;, load those you care about (mostly: Those near the currently active camera) in Update() and - if you are strapped for space (you likely will be), unload the not needed ones far away.&#xD;&#xA;&#xD;&#xA;Use pre-calculated low-poly models for far-away terrain LoD, unless you don't mind having a low view distance. Also, if you need the terrain heightmap of far away terrain for anything (like NPC movement or some other simulation), create a low-resolution or variable resolution variant of your terrain to keep in memory; don't use the full terrain data for it. This can be done automatically on game load, but generally it's a better idea to make a tool which creates this pre-generated data during the build or package.&#xD;&#xA;&#xD;&#xA;Finally: To avoid floating point precision problems, you'll have to reposition the whole scene every time your main camera moves far away from (0.0f, 0.0f, 0.0f).&#xD;&#xA;&#xD;&#xA;Possibly relevant question on Unity Answers http://answers.unity3d.com/questions/17225/dynamic-terrain-loading.html&#xD;&#xA;" />
  <row Id="35609" PostHistoryTypeId="5" PostId="15643" RevisionGUID="0e44ed8d-1164-42d8-96dc-381e7a8be918" CreationDate="2011-08-06T09:43:00.407" UserId="5473" Comment="added 1172 characters in body" Text="The proper term for this in computational geometry is CSG -- Constructive Solid Geometry (although in this case, it's destructive, strictly speaking), if you want to do more research on how the algorithms actually work.&#xD;&#xA;&#xD;&#xA;The standard approach is to use the nodes and edges of each original mesh (the  to generate a couple of specialised graphs (which is all a mesh really is anyway). A third graph is created from points where the two &#xD;&#xA;&#xD;&#xA;The standard approach is to use the two existing meshes A &amp; B (the house and the subtracted &quot;explosion&quot; volume) to generate a third &quot;mesh&quot; -- or rather, graph, C -- which describes the area they share. In 2D:&#xD;&#xA;&#xD;&#xA;          / \&#xD;&#xA;         /   \&#xD;&#xA;        /  A  \&#xD;&#xA;         |   |&#xD;&#xA;         | /-|-\&#xD;&#xA;         | |C| |&#xD;&#xA;    ---  ----- | ------- G&#xD;&#xA;           |  B|&#xD;&#xA;           \---/&#xD;&#xA;&#xD;&#xA;A is the house, B is the  is the explosion volume, C is the union / intersective area between A and B. G is the ground.&#xD;&#xA;&#xD;&#xA;The mathematics / logic behind it is not trivial, as there are many edge cases to deal with and half or more of this task is just recognising which of the possible types of outcome graphs are special cases which need to be catered for in code. I've seen the problem described by the veterans on gamedev.net as &quot;a very hard problem&quot; and I can tell you from attempting it in 2D, even, and having a moderate degree of success where only a couple of edge cases fail, that it is no small task.&#xD;&#xA;&#xD;&#xA;A way that might be easier is to use a polygon decomposition algorithm, and use the geometry that creates as a basis for your geometry destruction instead." />
  <row Id="35610" PostHistoryTypeId="5" PostId="15643" RevisionGUID="ade0eb1e-b88d-493e-8b0f-e1326cba1c4f" CreationDate="2011-08-06T10:00:38.487" UserId="5473" Comment="deleted 182 characters in body" Text="The proper term for this in computational geometry is CSG -- Constructive Solid Geometry (although in this case, it's destructive, strictly speaking), if you want to do more research on how the algorithms actually work.&#xD;&#xA;&#xD;&#xA;The standard approach is to use the two existing meshes A &amp; B (the house and the subtracted &quot;explosion&quot; volume) to generate a third &quot;mesh&quot; (graph) where the two meshes planes and edges intersect, C -- which describes the area they share. In 2D:&#xD;&#xA;&#xD;&#xA;          / \&#xD;&#xA;         /   \&#xD;&#xA;        /  A  \&#xD;&#xA;         |   |&#xD;&#xA;         | /-|-\&#xD;&#xA;         | |C| |&#xD;&#xA;    ---  ----- | ------- G&#xD;&#xA;           |  B|&#xD;&#xA;           \---/&#xD;&#xA;&#xD;&#xA;A is the house, B is the  is the explosion volume, C is the union / intersective area between A and B. G is the ground.&#xD;&#xA;&#xD;&#xA;The mathematics / logic behind it is not trivial, as there are many edge cases to deal with and half or more of this task is just recognising which of the possible types of outcome graphs are special cases which need to be catered for in code. I've seen the problem described by the veterans on gamedev.net as &quot;a very hard problem&quot; and I can tell you from attempting it in 2D, even, and having a moderate degree of success where only a couple of edge cases fail, that it is no small task.&#xD;&#xA;&#xD;&#xA;A way that might be easier is to use a polygon decomposition algorithm, and use the geometry that creates as a basis for your geometry destruction instead." />
  <row Id="35611" PostHistoryTypeId="5" PostId="15643" RevisionGUID="1fbbbdfa-b62a-4b24-ad3a-2d09a8e9f88e" CreationDate="2011-08-06T10:12:57.230" UserId="5473" Comment="deleted 46 characters in body" Text="This is CSG -- Constructive Solid Geometry (although in this case, it's destructive, strictly speaking), if you want to do more research on how the algorithms actually work.&#xD;&#xA;&#xD;&#xA;The standard approach is to use the two existing meshes A &amp; B (the house and the subtracted &quot;explosion&quot; volume) to generate a third &quot;mesh&quot; (graph) where the two meshes planes and edges intersect, C -- which describes the area they share. In 2D:&#xD;&#xA;&#xD;&#xA;          / \&#xD;&#xA;         /   \&#xD;&#xA;        /  A  \&#xD;&#xA;         |   |&#xD;&#xA;         | /-|-\&#xD;&#xA;         | |C| |&#xD;&#xA;    ---  ----- | ------- G&#xD;&#xA;           |  B|&#xD;&#xA;           \---/&#xD;&#xA;&#xD;&#xA;A is the house, B is the  is the explosion volume, C is the union / intersective area between A and B. G is the ground.&#xD;&#xA;&#xD;&#xA;The mathematics / logic behind it is not trivial, as there are many edge cases to deal with and half or more of this task is just recognising which of the possible types of outcome graphs are special cases which need to be catered for in code. I've seen the problem described by the veterans on gamedev.net as &quot;a very hard problem&quot; and I can tell you from attempting it in 2D, even, and having a moderate degree of success where only a couple of edge cases fail, that it is no small task.&#xD;&#xA;&#xD;&#xA;A way that might be easier is to use a polygon decomposition algorithm, and use the geometry that creates as a basis for your geometry destruction instead." />
  <row Id="35612" PostHistoryTypeId="5" PostId="15641" RevisionGUID="a23375ef-97ba-4cc1-b998-c522b4743a23" CreationDate="2011-08-06T11:03:25.093" UserId="6877" Comment="edited body" Text="To put it simply yes that what they do. But the go an extra length to cover up the straight edges using *destruction mask*. After removing the part of the geometry, they add *detailed mesh* around the destroyed section to make it look believable.&#xD;&#xA;&#xD;&#xA;Here is how it works,&#xD;&#xA;&#xD;&#xA;  ![enter image description here][1]&#xD;&#xA;&#xD;&#xA;  ![When destroying a part of this house, we begin by removing a piece of the geometry][2]  &#xD;&#xA;&#xD;&#xA;When destroying a part of this house, they begin by removing a piece of the geometry&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/6H8Sp.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: http://i.stack.imgur.com/01iWs.jpg&#xD;&#xA;&#xD;&#xA;  ![enter image description here][3]&#xD;&#xA;Then added detail meshes around the destroyed section.&#xD;&#xA;&#xD;&#xA;  ![enter image description here][4]&#xD;&#xA;&#xD;&#xA;And the final step is to add the destruction mask.&#xD;&#xA;&#xD;&#xA;  [3]: http://i.stack.imgur.com/kvTCl.jpg&#xD;&#xA;  [4]: http://i.stack.imgur.com/GX4u8.jpg&#xD;&#xA;&#xD;&#xA;They also use particle effects and mesh debris for more dramatic look.&#xD;&#xA;&#xD;&#xA;*(All the reference is taken from those 2 publications I mentioned in the comment)*" />
  <row Id="35613" PostHistoryTypeId="5" PostId="15644" RevisionGUID="2e6031c9-4f02-4e6c-9455-ef1d6f0ee325" CreationDate="2011-08-06T11:16:37.673" UserId="2897" Comment="added 68 characters in body" Text="Well, you're obviously not a someone who gives up easily, you're a real man of iron, I would have thrown my hands in the air much earlier, since this project bears a strong resemblance to a kelp forest :)&#xD;&#xA;&#xD;&#xA;First of all, positions and velocities are set all over the place, from a viewpoint of physics subsystem it's a recipe for a disaster. Also, when changing these things by various subsystems, create a private methods like &quot;ChangeVelocityByPhysicsEngine&quot;, &quot;ChangeVelocityBySpring&quot;, &quot;ChangeVelocityByCrate&quot;, something like that to add a layer of meaning to these velocity changes. That way debugging would be easier.&#xD;&#xA;&#xD;&#xA;**First problem.**&#xD;&#xA;&#xD;&#xA;Onto the question itself. Now you're just applying position and velocities fixes &quot;as they go&quot; in order of appearance and game logic. That won't work for complex interactions without carefully hard-coding the physics of each complex thing. A separate physics engine is not needed then.&#xD;&#xA;&#xD;&#xA;In order to do complex interactions without hacks, you need to add an additional step between detecting collisions based on positions which were changed by initial velocities and final changes of positions based on &quot;after-velocity&quot;. I imagine it would go like this:&#xD;&#xA;&#xD;&#xA;  - integrate velocity using the all the forces acting on bodies *(you're applying velocity fixes directly now, leave velocity calculations to your physics engine and use forces to move things instead)*, then use the new velocity to integrate positions.&#xD;&#xA;  - detect collisions, then restore velocity and positions,&#xD;&#xA;  - then process collisions (using impulses without immediate position update, ofc, only velocity is changed until the final step)&#xD;&#xA;  - integrate new velocity again and process all collisions using impulses again, except now collisions are inelastic.&#xD;&#xA;  - make final integration of positions using resulting velocity.&#xD;&#xA;&#xD;&#xA;Additional things may pop up, like dealing with jerking, refusal to stack up when FPS is small, or other things like that, be prepared :)&#xD;&#xA;&#xD;&#xA;**Second problem**&#xD;&#xA;&#xD;&#xA;Vertical velocity of both those &quot;deadweight&quot; crates never changes from zero. Strangely, in PhysSpring's Update loop you assign velocity, but in PhysCrate's Update loop it's already zero. It's possible to find a line where velocity goes wrong, but I stopped debugging here since it's &quot;Reap What You Sew&quot; situation. It's time to stop coding and start rethinking everything when debugging becomes hard. But if it comes to a point where it's impossible even for code's author to understand what's going on in the code, then your code base is already dead without you realizing it :)&#xD;&#xA;&#xD;&#xA;**Third problem**&#xD;&#xA;&#xD;&#xA;I think that something is off when you need to recreate a portion of Farseer to do a simple tile-based platformer. Personally, I would think of your current engine as of tremendous experience, and then ditch it completely for more simple and straightforward tile-based physics. While doing so, it would be wise to pick up on things like Debug.Assert and maybe even, oh the horror, unit tests, since it would be possible to catch unexpected things earlier." />
  <row Id="35614" PostHistoryTypeId="5" PostId="15644" RevisionGUID="f2167dd2-c61a-44ec-a56c-49633f6fe212" CreationDate="2011-08-06T11:23:00.133" UserId="2897" Comment="added 68 characters in body" Text="Well, you're obviously not a someone who gives up easily, you're a real man of iron, I would have thrown my hands in the air much earlier, since this project bears a strong resemblance to a kelp forest :)&#xD;&#xA;&#xD;&#xA;First of all, positions and velocities are set all over the place, from a viewpoint of physics subsystem it's a recipe for a disaster. Also, when changing integral things by various subsystems, create a private methods like &quot;ChangeVelocityByPhysicsEngine&quot;, &quot;ChangeVelocityBySpring&quot;, &quot;LimitVelocity&quot;, &quot;TransferVelocity&quot; or something like that. It will add an ability of checking changes made by a specific part of logic and provide an additional meaning to these velocity changes. That way debugging would be easier.&#xD;&#xA;&#xD;&#xA;**First problem.**&#xD;&#xA;&#xD;&#xA;Onto the question itself. Now you're just applying position and velocities fixes &quot;as they go&quot; in order of appearance and game logic. That won't work for complex interactions without carefully hard-coding the physics of each complex thing. A separate physics engine is not needed then.&#xD;&#xA;&#xD;&#xA;In order to do complex interactions without hacks, you need to add an additional step between detecting collisions based on positions which were changed by initial velocities and final changes of positions based on &quot;after-velocity&quot;. I imagine it would go like this:&#xD;&#xA;&#xD;&#xA;  - integrate velocity using the all the forces acting on bodies *(you're applying velocity fixes directly now, leave velocity calculations to your physics engine and use forces to move things instead)*, then use the new velocity to integrate positions.&#xD;&#xA;  - detect collisions, then restore velocity and positions,&#xD;&#xA;  - then process collisions (using impulses without immediate position update, ofc, only velocity is changed until the final step)&#xD;&#xA;  - integrate new velocity again and process all collisions using impulses again, except now collisions are inelastic.&#xD;&#xA;  - make final integration of positions using resulting velocity.&#xD;&#xA;&#xD;&#xA;Additional things may pop up, like dealing with jerking, refusal to stack up when FPS is small, or other things like that, be prepared :)&#xD;&#xA;&#xD;&#xA;**Second problem**&#xD;&#xA;&#xD;&#xA;Vertical velocity of both those &quot;deadweight&quot; crates never changes from zero. Strangely, in PhysSpring's Update loop you assign velocity, but in PhysCrate's Update loop it's already zero. It's possible to find a line where velocity goes wrong, but I stopped debugging here since it's &quot;Reap What You Sew&quot; situation. It's time to stop coding and start rethinking everything when debugging becomes hard. But if it comes to a point where it's impossible even for code's author to understand what's going on in the code, then your code base is already dead without you realizing it :)&#xD;&#xA;&#xD;&#xA;**Third problem**&#xD;&#xA;&#xD;&#xA;I think that something is off when you need to recreate a portion of Farseer to do a simple tile-based platformer. Personally, I would think of your current engine as of tremendous experience, and then ditch it completely for more simple and straightforward tile-based physics. While doing so, it would be wise to pick up on things like Debug.Assert and maybe even, oh the horror, unit tests, since it would be possible to catch unexpected things earlier." />
  <row Id="35615" PostHistoryTypeId="2" PostId="15647" RevisionGUID="10b34a80-81d0-4d88-977b-0e962f31faab" CreationDate="2011-08-06T12:00:31.223" UserId="744" Text="&gt; When a body collides with another, it transfers its velocity to the other one by simply setting the body's velocity to its own.&#xD;&#xA;&#xD;&#xA;Your problem is that these are fundamentally wrong assumptions about motion, so what you're getting doesn't resemble motion as you're familiar with it.&#xD;&#xA;&#xD;&#xA;When a body collides with another, momentum is conserved. To think of this as &quot;A hits B&quot; versus &quot;B hits A&quot; is to apply a transitive verb to an intransitive situation. A and B collide; the resulting momentum must be equal to the initial momentum. That is, if A and B are equal mass, they are now both traveling with the mean of their original velocities.&#xD;&#xA;&#xD;&#xA;You will also likely need some collision slop and an iterative solver, or you'll run into stability issues. &lt;a href=&quot;http://code.google.com/p/box2d/downloads/list&quot;&gt;You should probably read through some of Erin Catto's GDC presentations.&lt;/a&gt;" />
  <row Id="35616" PostHistoryTypeId="25" PostId="15626" RevisionGUID="8428bd01-b1e3-4865-9d3a-f55e8155e6cd" CreationDate="2011-08-06T12:36:45.810" Comment="http://twitter.com/#!/StackGameDev/status/99821211177070592" />
  <row Id="35622" PostHistoryTypeId="18" PostId="14534" RevisionGUID="9d7f7e2c-2e67-4c77-8da5-cc9fbcfbfbf3" CreationDate="2011-08-06T14:38:35.587" UserId="14" Comment="from http://gamedev.stackexchange.com/questions/14533/cuberealm-opengl-rotation-problems-need-help" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="35623" PostHistoryTypeId="18" PostId="14510" RevisionGUID="9d7f7e2c-2e67-4c77-8da5-cc9fbcfbfbf3" CreationDate="2011-08-06T14:38:35.587" UserId="14" Comment="from http://gamedev.stackexchange.com/questions/14533/cuberealm-opengl-rotation-problems-need-help" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="35626" PostHistoryTypeId="2" PostId="15649" RevisionGUID="4d63fa5b-c27c-483f-b69a-f5811d96604f" CreationDate="2011-08-06T14:46:38.633" UserId="3505" Text="Actually, order of update problems are quite common for normal impulse physics engines, you can't just delay applying the force as Vigil suggests, you'd end up breaking energy preservation when an object simultaneously collides with 2 other. Usually they do though manage to make something that seems pretty real, even though a different order of update would have made a significantly different outcome.&#xD;&#xA;&#xD;&#xA;In any case, for your purpose there is enough hiccups in an impulse system that I'd suggest you instead build a mass-spring model.&#xD;&#xA;&#xD;&#xA;The basic idea is that instead of trying to resolve a collision in one step you apply a force to the objects colliding, this force should be equivalent to the amount of overlap between the objects, this is comparable to how real objects during a collision transform their movement energy into deformation and then back into movement, the great thing about this system is that it allows force to travel through an object without that object having to bounce back and forth, and it can reasonably be done completely order of update independent.&#xD;&#xA;&#xD;&#xA;In order for objects to come to a halt rather than bounce around indefinitely you will have to apply some form of dampening, you can greatly affect the style and feel of your game depending on how you do it, but a very basic approach would be to apply a force to two touching objects equivalent to their internal movement, you may choose to apply it only when they are moving towards one another, or also when they move away from one another, the latter can be used to completely prevent objects from bouncing back when they hit the ground, but will also make them a little sticky.&#xD;&#xA;&#xD;&#xA;You can also make a friction effect by braking an object in the perpendicular direction of a collision, the amount of braking should be equivalent to the amount of overlap.&#xD;&#xA;&#xD;&#xA;You could get around the concept of mass pretty easily by making all objects have the same mass, and immovable objects will work like having infinite mass if you simply neglect accelerating them.&#xD;&#xA;&#xD;&#xA;Some pseudo-code, just in case the above wasn't clear enough:&#xD;&#xA;&#xD;&#xA;    //Presuming that you have done collision checks between two objects and now have  &#xD;&#xA;    //numbers for how much they overlap in each direction.&#xD;&#xA;    overlapX&#xD;&#xA;    overlapY&#xD;&#xA;    if(overlapX&lt;overlapY){ //Do collision in direction X&#xD;&#xA;        if(obj1.X&gt;obj2.X){&#xD;&#xA;            swap(obj1,obj2)&#xD;&#xA;        }&#xD;&#xA;        //Spring effect:&#xD;&#xA;        obj1.addXvelocity-=overlapX*0.1 //Constant, the lower this is set the softer the  &#xD;&#xA;                                        //collision will be.&#xD;&#xA;        obj2.addXvelocity+=overlapX*0.1&#xD;&#xA;        //Dampener effect:&#xD;&#xA;        velocityDifference=obj2.Xvelocity-obj1.Xvelocity&#xD;&#xA;        //velocityDifference=min(velocityDifference,0) //Uncomment to only dampen when  &#xD;&#xA;                                                       //objects move towards each other.&#xD;&#xA;        obj1.addXvelocity+=velocityDifference*0.1 //Constant, higher for more dampening.&#xD;&#xA;        obj2.addXvelocity-=velocityDifference*0.1&#xD;&#xA;        //Friction effect:&#xD;&#xA;        if(obj1.Yvelocity&gt;obj2.Yvelocity){&#xD;&#xA;            swap(obj1,obj2)&#xD;&#xA;        }&#xD;&#xA;        friction=overlapX*0.01&#xD;&#xA;        if(2*friction&gt;obj2.Yvelocity-obj1.Yvelocity){&#xD;&#xA;            obj1.addYvelocity+=(obj2.Yvelocity-obj1.Yvelocity)/2&#xD;&#xA;            obj2.addYvelocity-=(obj2.Yvelocity-obj1.Yvelocity)/2&#xD;&#xA;        }&#xD;&#xA;        else{&#xD;&#xA;            obj1.addYvelocity+=friction&#xD;&#xA;            obj2.addYvelocity-=friction&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    else{ //Do collision in direction Y&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The point of the addXvelocity and addYvelocity properties is that these are added to their object's velocity after all collision handling is done." />
  <row Id="35627" PostHistoryTypeId="25" PostId="15605" RevisionGUID="69fb7289-ab0c-42dc-8d4e-34b7aa41c8e1" CreationDate="2011-08-06T15:36:45.623" Comment="http://twitter.com/#!/StackGameDev/status/99866509010149376" />
  <row Id="35628" PostHistoryTypeId="2" PostId="15650" RevisionGUID="394e9511-a9ef-4f5f-b3b9-d9b7fec7acdf" CreationDate="2011-08-06T17:16:51.563" UserId="2513" Text="As a mental exercise, I'm trying to imagine projecting an arbitrary 4D mesh onto the screen (2D).&#xD;&#xA;&#xD;&#xA;I'm guessing a single 4D triangle would still consist of only 3 points, however each of those 3 points would be defined by column with 4 dimensions.&#xD;&#xA;&#xD;&#xA;Would it make more sense to define a projection matrix to map 4D space to 3D space first and then have OpenGL do its own projection from that data to 2D space?&#xD;&#xA;&#xD;&#xA;Or would it be best to just plan on projecting down from 4 to 2 directly?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Many thanks." />
  <row Id="35629" PostHistoryTypeId="1" PostId="15650" RevisionGUID="394e9511-a9ef-4f5f-b3b9-d9b7fec7acdf" CreationDate="2011-08-06T17:16:51.563" UserId="2513" Text="Downprojecting an imaginary 4D mesh to the screen" />
  <row Id="35630" PostHistoryTypeId="3" PostId="15650" RevisionGUID="394e9511-a9ef-4f5f-b3b9-d9b7fec7acdf" CreationDate="2011-08-06T17:16:51.563" UserId="2513" Text="&lt;matrix&gt;&lt;vector&gt;&lt;projection&gt;" />
  <row Id="35631" PostHistoryTypeId="2" PostId="15651" RevisionGUID="0baebfe8-9e9d-4349-a36f-0f528823341c" CreationDate="2011-08-06T17:23:00.013" UserId="8508" Text="I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, currently right now there is a really bad flicker on this geometry.&#xD;&#xA;&#xD;&#xA;I am using DirectX11 my initialization and remap code is here http://codepad.org/rTvSYKMG . Though it is flickering, the flicker looks correct. I know it is the vertex buffer mapping because if I recreate the entire VB then it will render fine. However, as an optimization I figured I would just remap it. Does anyone know what the problem is?&#xD;&#xA;&#xD;&#xA;The length (width, size) of the vertex buffer is always the same.&#xD;&#xA;&#xD;&#xA;One might think it is double buffering, however, it would not be double buffering because it only happens when I map/unmap the buffer, so that leads me to believe that I am setting some parameters wrong on the creation or mapping" />
  <row Id="35632" PostHistoryTypeId="1" PostId="15651" RevisionGUID="0baebfe8-9e9d-4349-a36f-0f528823341c" CreationDate="2011-08-06T17:23:00.013" UserId="8508" Text="Mapping a Vertex Buffer in DirectX11" />
  <row Id="35633" PostHistoryTypeId="3" PostId="15651" RevisionGUID="0baebfe8-9e9d-4349-a36f-0f528823341c" CreationDate="2011-08-06T17:23:00.013" UserId="8508" Text="&lt;directx&gt;&lt;rendering&gt;&lt;directx11&gt;&lt;vertex&gt;" />
  <row Id="35634" PostHistoryTypeId="2" PostId="15652" RevisionGUID="a48c3d6b-8491-450c-a5f4-df0fbb992761" CreationDate="2011-08-06T17:35:31.567" UserId="4584" Text="I'm messing around with XNA in a very simple Minecraft-esque world I'm making and I'm wondering how I can do the &quot;breaking the block&quot; visuals in XNA.&#xD;&#xA;&#xD;&#xA;If you're unfamiliar with the game, you begin interacting with the cube and based one what tool you're using, the block will take X amount of time to break. There's about 10 different stages of cracking that the cube will display before the cube breaks. I'm curious about how to display those 10 stages of cracking on top of the original skin of the block.&#xD;&#xA;&#xD;&#xA;I know the game works using a Sprite sheet to color the blocks. This sprite sheet does not include every possible design at every possible stage of breaking the block, each stage is a different sprite with some transparency.&#xD;&#xA;&#xD;&#xA;In short, how can I quickly and efficiently overlay a texture on a surface that already has a texture?&#xD;&#xA;&#xD;&#xA;Do I have to combine them? If so, how?" />
  <row Id="35635" PostHistoryTypeId="1" PostId="15652" RevisionGUID="a48c3d6b-8491-450c-a5f4-df0fbb992761" CreationDate="2011-08-06T17:35:31.567" UserId="4584" Text="Displaying 2 textures on the same surface?" />
  <row Id="35636" PostHistoryTypeId="3" PostId="15652" RevisionGUID="a48c3d6b-8491-450c-a5f4-df0fbb992761" CreationDate="2011-08-06T17:35:31.567" UserId="4584" Text="&lt;textures&gt;" />
  <row Id="35637" PostHistoryTypeId="2" PostId="15653" RevisionGUID="aac82a72-d18e-45d8-acc8-c59bdae9756a" CreationDate="2011-08-06T17:53:04.320" UserId="2798" Text="Use XNA's `DualTextureEffect` when drawing your block. It's a standard shader that lets you overlay one texture in top of another. Just use the same base texture and overlay different cracking textures in top of the other." />
  <row Id="35639" PostHistoryTypeId="2" PostId="15654" RevisionGUID="f08f9545-1fdb-40b7-85d3-d7625b1fe328" CreationDate="2011-08-06T18:26:31.517" UserId="4546" Text="If you want to do it in an effect of your own, there's two common ways of doing it.&#xD;&#xA;&#xD;&#xA; - Bind two textures and make a sample from both of them, followed by multiplying or adding them together in the pixel shader while computing the output colour.&#xD;&#xA; - Write an effect with multiple passes (assuming that XNA supports it), where the first pass draws the base opaque texture and the second pass draws the overlay texture with multiplicative or additive blending." />
  <row Id="35640" PostHistoryTypeId="2" PostId="15655" RevisionGUID="a4337027-3f52-4930-b560-31fa441fc907" CreationDate="2011-08-06T18:34:14.973" UserId="4546" Text="When you invoke Map with D3D11_MAP_WRITE_DISCARD, Direct3D considers the whole buffer contents invalid and will replace it with the data that exists inside the memory that the new data buffer points at when invoking Unmap.&#xD;&#xA;&#xD;&#xA;Your problem is that instead of copying your data into the memory that Direct3D provides to you when you map the buffer, you instead change the pointer to point somewhere else.&#xD;&#xA;&#xD;&#xA;Direct3D does not expect that, nor will care about where the pointer points. It will just assume that you've filled in the buffer that the pData pointer originally pointed at.&#xD;&#xA;&#xD;&#xA;The reason for your flicker is because the buffer may contain bogus uninitialized data, as it expects you to fill it in completely." />
  <row Id="35641" PostHistoryTypeId="25" PostId="15650" RevisionGUID="0b35c6bf-2a03-4e30-91ed-d768c00eb400" CreationDate="2011-08-06T18:36:45.687" Comment="http://twitter.com/#!/StackGameDev/status/99911807761793024" />
  <row Id="35642" PostHistoryTypeId="2" PostId="15656" RevisionGUID="82dead83-5fba-4976-83c7-e1fc48e4c7b6" CreationDate="2011-08-06T18:55:06.613" UserId="4306" Text="In the new version of Unity 3.4, unity announced that they would now support procedural materials (which is awesome, by the way). While I was researching it, I found this in the [manual][1]:&#xD;&#xA;&#xD;&#xA;&gt; Allegorithmic's Substance Designer can be used to create Procedural Materials, but there are **other applications** (3D modeling apps, for example) that incorporate the Substance technology and work just as well with Unity.&#xD;&#xA;&#xD;&#xA;I don't have Allegorithmic's substance editor and don't plan on buying it soon. What other applications or 3D modeling apps can make procedural materials that work in Unity?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/Manual/Procedural%20Materials.html" />
  <row Id="35643" PostHistoryTypeId="1" PostId="15656" RevisionGUID="82dead83-5fba-4976-83c7-e1fc48e4c7b6" CreationDate="2011-08-06T18:55:06.613" UserId="4306" Text="Other procedural material generators for Unity?" />
  <row Id="35644" PostHistoryTypeId="3" PostId="15656" RevisionGUID="82dead83-5fba-4976-83c7-e1fc48e4c7b6" CreationDate="2011-08-06T18:55:06.613" UserId="4306" Text="&lt;unity&gt;&lt;procedural&gt;" />
  <row Id="35645" PostHistoryTypeId="5" PostId="15656" RevisionGUID="ab7eebbf-045c-4cf3-af2d-07160b903325" CreationDate="2011-08-06T21:34:09.910" UserId="4306" Comment="added 108 characters in body; edited tags" Text="In the new version of Unity 3.4, unity announced that they would now support procedural materials (which is awesome, by the way). While I was researching it, I found this in the [manual][1]:&#xD;&#xA;&#xD;&#xA;&gt; Allegorithmic's Substance Designer can be used to create Procedural Materials, but there are **other applications** (3D modeling apps, for example) that incorporate the Substance technology and work just as well with Unity.&#xD;&#xA;&#xD;&#xA;I don't have Allegorithmic's substance designer and don't plan on buying it soon. What other applications or 3D modeling apps can make procedural materials that work in Unity?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Edit*: I found that Allegorithmic has a program called Player. But it is on Windows only. I'm on mac.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/support/documentation/Manual/Procedural%20Materials.html" />
  <row Id="35646" PostHistoryTypeId="6" PostId="15656" RevisionGUID="ab7eebbf-045c-4cf3-af2d-07160b903325" CreationDate="2011-08-06T21:34:09.910" UserId="4306" Comment="added 108 characters in body; edited tags" Text="&lt;textures&gt;&lt;unity&gt;&lt;procedural&gt;" />
  <row Id="35647" PostHistoryTypeId="25" PostId="15652" RevisionGUID="781e954d-1131-4f0b-a498-57de1aa7de0b" CreationDate="2011-08-06T21:36:45.787" Comment="http://twitter.com/#!/StackGameDev/status/99957107335512065" />
  <row Id="35648" PostHistoryTypeId="5" PostId="15651" RevisionGUID="43692be7-33d0-4ca2-9685-cf46f3023f20" CreationDate="2011-08-06T21:45:30.257" UserId="4546" Comment="Inlined source code blocks from pastesite, due to unknown lifespan of external sites." Text="I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, currently right now there is a really bad flicker on this geometry.&#xD;&#xA;&#xD;&#xA;Although it is flickering, the flicker looks correct. I know it is the vertex buffer mapping because if I recreate the entire VB then it will render fine. However, as an optimization I figured I would just remap it. Does anyone know what the problem is?&#xD;&#xA;&#xD;&#xA;The length (width, size) of the vertex buffer is always the same.&#xD;&#xA;&#xD;&#xA;One might think it is double buffering, however, it would not be double buffering because it only happens when I map/unmap the buffer, so that leads me to believe that I am setting some parameters wrong on the creation or mapping.&#xD;&#xA;&#xD;&#xA;I am using DirectX11, my initialization and remap code are:&#xD;&#xA;### Initialization code ###&#xD;&#xA;&#xD;&#xA;      D3D11_BUFFER_DESC bd;&#xD;&#xA;      ZeroMemory( &amp;bd, sizeof(bd) );&#xD;&#xA;      bd.Usage = D3D11_USAGE_DYNAMIC;&#xD;&#xA;      bd.ByteWidth = vertCount * vertexTypeWidth;&#xD;&#xA;      bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;&#xD;&#xA;      //bd.CPUAccessFlags = 0;&#xD;&#xA;      bd.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;&#xD;&#xA;&#xD;&#xA;      D3D11_SUBRESOURCE_DATA InitData;&#xD;&#xA;      ZeroMemory( &amp;InitData, sizeof(InitData) );&#xD;&#xA;      InitData.pSysMem = vertices;&#xD;&#xA;&#xD;&#xA;      mVertexType = vertexType;&#xD;&#xA;&#xD;&#xA;      HRESULT hResult = device-&gt;CreateBuffer( &amp;bd, &amp;InitData, &amp;m_pVertexBuffer );&#xD;&#xA;&#xD;&#xA;      // This will be S_OK&#xD;&#xA;      if(hResult != S_OK)&#xD;&#xA;         return false;&#xD;&#xA;&#xD;&#xA;### Remap code ###&#xD;&#xA;&#xD;&#xA;      D3D11_MAPPED_SUBRESOURCE resource;&#xD;&#xA;      HRESULT hResult = deviceContext-&gt;Map(m_pVertexBuffer, 0,&#xD;&#xA;         D3D11_MAP_WRITE_DISCARD, 0, &amp;resource);&#xD;&#xA;&#xD;&#xA;      // This will be S_OK&#xD;&#xA;      if(hResult != S_OK)&#xD;&#xA;         return false;&#xD;&#xA;&#xD;&#xA;      resource.pData = vertices;&#xD;&#xA;&#xD;&#xA;      deviceContext-&gt;Unmap(m_pVertexBuffer, 0);" />
  <row Id="35649" PostHistoryTypeId="24" PostId="15651" RevisionGUID="43692be7-33d0-4ca2-9685-cf46f3023f20" CreationDate="2011-08-06T21:45:30.257" Comment="Proposed by 4546 approved by 1430 edit id of 602" />
  <row Id="35650" PostHistoryTypeId="2" PostId="15657" RevisionGUID="099bb052-4ec4-42bd-90cc-7e1ac0393c78" CreationDate="2011-08-06T22:13:49.473" UserId="1839" Text="The multidimensional generalization of a triangle is an [N-Simplex](http://en.wikipedia.org/wiki/Simplex), [here](http://www.youtube.com/watch?v=Jp2gnFLQCxs) is a video of a projection of such an object. [Here](http://www.youtube.com/watch?v=S_DIQqT455c) is another interesting video of a 4D hypercube. &#xD;&#xA;&#xD;&#xA;This [wiki](http://en.wikipedia.org/wiki/Four-dimensional_space) page is a good starting point if you want to learn more about the fourth dimension and how to visualize such objects. It also links a wiki page with a [list of 4D games](http://en.wikipedia.org/wiki/List_of_four-dimensional_games)." />
  <row Id="35651" PostHistoryTypeId="5" PostId="15657" RevisionGUID="16502f21-f599-4fa0-bd40-973c0b20d600" CreationDate="2011-08-06T22:38:24.893" UserId="1839" Comment="added 378 characters in body" Text="The multidimensional generalization of a triangle is an [N-Simplex](http://en.wikipedia.org/wiki/Simplex), [here](http://www.youtube.com/watch?v=Jp2gnFLQCxs) is a video of a projection of such an object. [Here](http://www.youtube.com/watch?v=S_DIQqT455c) is another interesting video of a 4D hypercube. &#xD;&#xA;&#xD;&#xA;This [wiki](http://en.wikipedia.org/wiki/Four-dimensional_space) page is a good starting point if you want to learn more about the fourth dimension and how to visualize such objects. It also links a wiki page with a [list of 4D games](http://en.wikipedia.org/wiki/List_of_four-dimensional_games).&#xD;&#xA;&#xD;&#xA;Regarding your question about the projection: [here][1] is a paper explaining orthographic and perspective projection matrices for higher dimensions.&#xD;&#xA;&#xD;&#xA;[Here][2] is the source of an N-dimensional renderer using OpenGL.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://webcache.googleusercontent.com/search?q=cache:xjUgbjKOkJIJ:www.cs.earlham.edu/~mccoyjo/project/survey/ndopengl.ps%20render%204%20dimensional%20objects&amp;cd=10&amp;hl=en&amp;ct=clnk&amp;client=opera&amp;source=www.google.com&#xD;&#xA;  [2]: http://www.flowerfire.com/ADSODA/" />
  <row Id="35652" PostHistoryTypeId="2" PostId="15658" RevisionGUID="be64ffd5-cef1-4004-80a4-8c8998553397" CreationDate="2011-08-06T22:40:10.243" UserId="4584" Text="In XNA, how can I draw a sprite on the screen that inverts the colors behind that sprite (i.e. the colors that would appear if the sprite weren't in the way of them)?&#xD;&#xA;&#xD;&#xA;I feel this is the best technique for an aiming cursor in a game, but I'm unsure how I can achieve this. I'm open to other ideas for aiming cursors if this is less than ideal." />
  <row Id="35653" PostHistoryTypeId="1" PostId="15658" RevisionGUID="be64ffd5-cef1-4004-80a4-8c8998553397" CreationDate="2011-08-06T22:40:10.243" UserId="4584" Text="Inverted Reticle for aiming?" />
  <row Id="35654" PostHistoryTypeId="3" PostId="15658" RevisionGUID="be64ffd5-cef1-4004-80a4-8c8998553397" CreationDate="2011-08-06T22:40:10.243" UserId="4584" Text="&lt;xna&gt;&lt;aiming&gt;" />
  <row Id="35655" PostHistoryTypeId="5" PostId="15657" RevisionGUID="48e92e2f-49e6-471a-9de6-c6f45869c751" CreationDate="2011-08-06T22:51:39.877" UserId="1839" Comment="added 227 characters in body" Text="The multidimensional generalization of a triangle is an [N-Simplex](http://en.wikipedia.org/wiki/Simplex), [here](http://www.youtube.com/watch?v=Jp2gnFLQCxs) is a video of a projection of such an object. [Here](http://www.youtube.com/watch?v=S_DIQqT455c) is another interesting video of a 4D hypercube. &#xD;&#xA;&#xD;&#xA;This [wiki](http://en.wikipedia.org/wiki/Four-dimensional_space) page is a good starting point if you want to learn more about the fourth dimension and how to visualize such objects. It also links a wiki page with a [list of 4D games](http://en.wikipedia.org/wiki/List_of_four-dimensional_games).&#xD;&#xA;&#xD;&#xA;Regarding your question about the projection: [This paper][1] explains the math of orthographic and perspective projection matrices for higher dimensions. Another great paper is [Four-Space Visualization of 4D Objects](http://steve.hollasch.net/thesis/index.html) by Steven Richard Hollasch. Particularly the paragraph &quot;4.1: High-Level Overview of 4D to 2D Projection&quot; answers your projection question in detail and comes with source code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://webcache.googleusercontent.com/search?q=cache:xjUgbjKOkJIJ:www.cs.earlham.edu/~mccoyjo/project/survey/ndopengl.ps%20render%204%20dimensional%20objects&amp;cd=10&amp;hl=en&amp;ct=clnk&amp;client=opera&amp;source=www.google.com&#xD;&#xA;  [2]: http://www.flowerfire.com/ADSODA/" />
  <row Id="35656" PostHistoryTypeId="2" PostId="15659" RevisionGUID="5e6ffa03-7ad0-46b1-bef1-889829cc786a" CreationDate="2011-08-06T22:53:10.543" UserId="9093" Text="&lt;a href=&quot;http://infiniteammo.ca/blog/tag/podcast/&quot;&gt;Infinite Ammo Podcast&lt;/a&gt;: Interviews with indie game developers.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://gambit.mit.edu/updates/audio/looking_glass_studios_podcast/&quot;&gt;Looking Glass Podcast&lt;/a&gt;: Interviews with developers who once formed that great team." />
  <row Id="35657" PostHistoryTypeId="16" PostId="15659" RevisionGUID="265c66b0-ae28-4f6a-a66f-ffba6280f6ee" CreationDate="2011-08-06T22:53:10.543" UserId="9093" />
  <row Id="35658" PostHistoryTypeId="5" PostId="15657" RevisionGUID="0b6189ea-de97-4070-a87c-9ff826374980" CreationDate="2011-08-06T22:57:57.680" UserId="1839" Comment="added 227 characters in body" Text="The multidimensional generalization of a triangle is an [N-Simplex](http://en.wikipedia.org/wiki/Simplex), [here](http://www.youtube.com/watch?v=Jp2gnFLQCxs) is a video of a projection of such an object. [Here](http://www.youtube.com/watch?v=S_DIQqT455c) is another interesting video of a 4D hypercube. &#xD;&#xA;&#xD;&#xA;This [wiki](http://en.wikipedia.org/wiki/Four-dimensional_space) page is a good starting point if you want to learn more about the fourth dimension and how to visualize such objects. It also links a wiki page with a [list of 4D games](http://en.wikipedia.org/wiki/List_of_four-dimensional_games).&#xD;&#xA;&#xD;&#xA;Regarding your question about the projection: [This paper][1] explains the math of orthographic and perspective projection matrices for higher dimensions. Another great paper is [Four-Space Visualization of 4D Objects](http://steve.hollasch.net/thesis/index.html) by Steven Richard Hollasch. Particularly the paragraph &quot;4.1: High-Level Overview of 4D to 2D Projection&quot; answers your projection question in detail and comes with source code.&#xD;&#xA;&#xD;&#xA;Finally [here](http://www.flowerfire.com/ADSODA) is an N-dimensional renderer using OpenGL coming with full source code.&#xD;&#xA;&#xD;&#xA;  [1]: http://webcache.googleusercontent.com/search?q=cache:xjUgbjKOkJIJ:www.cs.earlham.edu/~mccoyjo/project/survey/ndopengl.ps%20render%204%20dimensional%20objects&amp;cd=10&amp;hl=en&amp;ct=clnk&amp;client=opera&amp;source=www.google.com&#xD;&#xA;  [2]: http://www.flowerfire.com/ADSODA/" />
  <row Id="35659" PostHistoryTypeId="2" PostId="15660" RevisionGUID="ea918aac-0a21-44cb-91d5-c9c326b3dbe3" CreationDate="2011-08-06T23:08:05.903" UserId="3990" Text="To do this in XNA, you will need to use a shader. You will need to render your scene to a texture (Or, render just the portion the cursor covers), and then draw the cursor using that texture and a shader that inverts the color. Unless you've already got a deferred renderer, this will probably be more hassle than it's worth. If you do, you can use the existing depth/color buffers, and re-shade the pixels covered by the cursor in your color-inverting shader." />
  <row Id="35660" PostHistoryTypeId="2" PostId="15661" RevisionGUID="70c7fc3e-95ec-4961-bfd6-3b4a50b37e57" CreationDate="2011-08-06T23:43:38.860" UserId="1499" Text="You can do this by altering the way that you are rendering the game. First render to a texture [http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Render_to_texture.php][1].&#xD;&#xA;&#xD;&#xA;After you have rendered the frame to the texture you can then edit the colours of the location that you are interested in:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    Color pixel;&#xD;&#xA;    int xlocationOfSprite;&#xD;&#xA;    int ylocationOfSprite;&#xD;&#xA;    int widthOfSprite;&#xD;&#xA;    int heightOfSprite;&#xD;&#xA;    &#xD;&#xA;    for (int x = xlocationOfSprite; x &lt; widthOfSprite; x++)&#xD;&#xA;    {&#xD;&#xA;        for (int y = ylocationOfSprite; y &lt; heightOfSprite; y++)&#xD;&#xA;        {&#xD;&#xA;            pixel = bitmap.GetPixel(x, y);&#xD;&#xA;                    &#xD;&#xA;            // Do what ever color manipulation you want&#xD;&#xA;    &#xD;&#xA;            bitmap.SetPixel(x, y, pixel);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then render the modified texture to the screen.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Render_to_texture.php" />
  <row Id="35661" PostHistoryTypeId="2" PostId="15662" RevisionGUID="7038fe38-8c1a-46ca-8c56-70fd131c16fe" CreationDate="2011-08-06T23:51:10.623" UserId="9002" Text="&gt; I would like more &quot;space&quot; between the &quot;walls&quot;. Scaling is not an option, because I like the size of the tiles now.&#xD;&#xA;&#xD;&#xA;If you want to change the scale of your noise, rather than scaling your tiles up or down, you can scale the coordinates where you sample the noise. So, instead of sampling the noise at `Noise(tile.x, tile.y, z)`, sample at `Noise(tile.x * scaleX, tile.y * scaleY, z)`. You can also change the threshold value for deciding what's a wall if you want to make the walls thicker or thinner with the same scale noise." />
  <row Id="35662" PostHistoryTypeId="25" PostId="15651" RevisionGUID="092ab374-9b32-4163-b847-a7fe1eadba10" CreationDate="2011-08-07T00:36:45.767" Comment="http://twitter.com/#!/StackGameDev/status/100002403633463296" />
  <row Id="35663" PostHistoryTypeId="2" PostId="15663" RevisionGUID="b23effc8-0448-48e7-927a-c6aad21cfd6d" CreationDate="2011-08-07T00:41:48.400" UserId="8524" Text="The following approach doesn't rely on (or benefit from) your use of Perlin noise.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you have a black-and-white image and want to thicken-up (or thin-down) the filled areas, a way to handle this in a graphics application using common filters would be...&#xD;&#xA;&#xD;&#xA;1.  Apply a [gaussian blur][1], converting the image to greyscale.&#xD;&#xA;2.  Apply a threshold, so that the darker greys become black and the lighter greys become white.&#xD;&#xA;&#xD;&#xA;Depending on the radius of the blur and the threshold value used, you tend to get larger (or smaller) filled areas. And of course there's lots of variations by applying alternative filters in place of the blur, giving effects other than simple thickening/thining.&#xD;&#xA;&#xD;&#xA;The gaussian blur is basically a 2D moving weighted average. If you're coding this yourself, each pixel can do this blur calculation and threshold in one step.&#xD;&#xA;&#xD;&#xA;The gaussian-blur based pattern of weights can be something else - any kind of 2D pattern can be used. And the thresholds can even be varied, based on the co-ordinates. This is very similar to the algorithms for dithering in images with limited colour palettes. [Floyd-Steinberg][2] is a well-known approach, but remember that your goals are different.&#xD;&#xA;&#xD;&#xA;One way you could vary these weights is to have higher thresholds nearer some marker points, and lower thresholds near others. In that way, you could thicken the walls in some areas and thin them in others.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Gaussian_blur&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering" />
  <row Id="35664" PostHistoryTypeId="2" PostId="15664" RevisionGUID="8612a195-f0c5-43f3-bab2-776950e42da4" CreationDate="2011-08-07T02:30:20.163" UserId="8578" Text="Love all these minecraft inspired games!  What an awesome project to get a kickstart into development.  Glad you managed to track down the problem yourself as well!&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Another optimization you might want to consider down the line: as many cubes form larger surfaces, instead of storing 100 cubes as a 10x10, store it as one big cube.  This way you just need 8 vertices instead of 800.  If one needs to be removed make a 9x10 block, then a row of 9 individual blocks (or even a 9x1 size block for bonus points).&#xD;&#xA;Remember just because something 'looks' like a million blocks, doesn't mean you need a million blocks.  There is no such thing as cheating in computer science, only innovation." />
  <row Id="35665" PostHistoryTypeId="25" PostId="15658" RevisionGUID="c5b1bf5e-c12b-48c2-b75f-bd5eb6bed18f" CreationDate="2011-08-07T03:36:45.757" Comment="http://twitter.com/#!/StackGameDev/status/100047701797896193" />
  <row Id="35666" PostHistoryTypeId="25" PostId="15554" RevisionGUID="3fd46175-62e8-4b75-b44c-a078f1ecfcc5" CreationDate="2011-08-07T06:36:45.780" Comment="http://twitter.com/#!/StackGameDev/status/100093000868302848" />
  <row Id="35667" PostHistoryTypeId="2" PostId="15665" RevisionGUID="72147b39-63b4-4425-84c4-600be120baee" CreationDate="2011-08-07T07:39:25.467" UserId="7595" Text="The [Kingdom of Loathing][1] guys run [an entertaining podcast][2] (or two - [Video Games Hotdog][3]) that often talks about game design, balance and interacting with their community. Video Games Hotdog talk about video games in general.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kingdomofloathing.com/&#xD;&#xA;  [2]: http://radio.kingdomofloathing.com/&#xD;&#xA;  [3]: http://videogameshotdog.com/" />
  <row Id="35668" PostHistoryTypeId="16" PostId="15665" RevisionGUID="c26d23d2-2410-4e09-b461-71a68e5f15ec" CreationDate="2011-08-07T07:39:25.467" UserId="7595" />
  <row Id="35669" PostHistoryTypeId="25" PostId="15611" RevisionGUID="8f879124-421f-4228-910e-271c071882d1" CreationDate="2011-08-07T09:36:45.763" Comment="http://twitter.com/#!/StackGameDev/status/100138299032735744" />
  <row Id="35670" PostHistoryTypeId="2" PostId="15666" RevisionGUID="427f73ec-19ed-40b4-ba7e-bf52217f4bc2" CreationDate="2011-08-07T11:04:08.427" UserId="5957" Text="I asked this over on stack overflow but I usually get better (or any, actually) answers from this site:&#xD;&#xA;&#xD;&#xA;Android seems to make life pretty easy for loading resources of certain types. Once I leave the beaten path a little bit, it seems less helpful. I can load in images, sounds and other objects from the assets folder if and only if they are of certain types. If I try to load a binary file of my own format, I get a less than helpful 'file not found' exception, even though listing the directory shows that it is clearly there.&#xD;&#xA;&#xD;&#xA;I've tried using the following methods to read a binary file of a custom format from the assets directory:&#xD;&#xA;&#xD;&#xA;    File jfile = new File(&quot;file://android_asset/&quot;+filename); //tried to get the URI of the assets folder&#xD;&#xA;    JarFile file = new JarFile(&quot;assets/&quot;+filename); //tried assuming the assets folder is root&#xD;&#xA;    fd = am.openNonAssetFd( filename); //tried getting my file as an non asset in the assets folder (n.b. it is definitely there)&#xD;&#xA;    fs = am.open(filename, AssetManager.ACCESS_BUFFER); //tried loading it as an asset&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm thinking that there's something fundamental about android file I/O that I don't understand yet. The documentation for asset management seems incomplete and there must be some reason for deliberately making this unintuitive (something to do with security?). So, what's the fool proof, canonical way of loading a binary file of my own format within an android app?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="35671" PostHistoryTypeId="1" PostId="15666" RevisionGUID="427f73ec-19ed-40b4-ba7e-bf52217f4bc2" CreationDate="2011-08-07T11:04:08.427" UserId="5957" Text="Android file within android" />
  <row Id="35672" PostHistoryTypeId="3" PostId="15666" RevisionGUID="427f73ec-19ed-40b4-ba7e-bf52217f4bc2" CreationDate="2011-08-07T11:04:08.427" UserId="5957" Text="&lt;android&gt;&lt;file&gt;&lt;android-assets&gt;&lt;io&gt;" />
  <row Id="35673" PostHistoryTypeId="2" PostId="15667" RevisionGUID="8e0f9f24-036c-4c03-8a14-5928545706f2" CreationDate="2011-08-07T11:16:15.547" UserId="6867" Text="I have successfully made a Perlin noise algorithm on the GPU. It works as expected, and generates great results. Now, as part of the physics calculations in my game, I need to replicate the exact same algorithm on the CPU, so that I can (given an X, Y and Z coordinate) determine whether or not that is inside a wall, or a walkable area.&#xD;&#xA;&#xD;&#xA;I have debugged the shader through PIX, and I've gotten everything almost right, except for the part below (seen in shader code).&#xD;&#xA;&#xD;&#xA;**GPU (shader) code (HLSL)**&#xD;&#xA;&#xD;&#xA;    float4 perm2d(float2 p)&#xD;&#xA;    {&#xD;&#xA;    	return tex2D(permSampler2d, p);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;permSampler2d samples a texture that I generate out of Color structures and then pump to the GPU. The way I generate the texture on the CPU is the following:&#xD;&#xA;&#xD;&#xA;**CPU code (XNA C#)**&#xD;&#xA;&#xD;&#xA;    int createPerm2d(int i)&#xD;&#xA;    {&#xD;&#xA;        return permutation[i % 256];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Texture2D GeneratePermTexture2d()&#xD;&#xA;    {&#xD;&#xA;        permTexture2d = new Texture2D(device, 256, 256, true, SurfaceFormat.Color);&#xD;&#xA;        permutationData = new Color[256 * 256];&#xD;&#xA;        for (int x = 0; x &lt; 256; x++)&#xD;&#xA;        {&#xD;&#xA;            for (int y = 0; y &lt; 256; y++)&#xD;&#xA;            {&#xD;&#xA;                int A = createPerm2d(x) + y;&#xD;&#xA;                int AA = createPerm2d(A);&#xD;&#xA;                int AB = createPerm2d(A + 1);&#xD;&#xA;                int B = createPerm2d(x + 1) + y;&#xD;&#xA;                int BA = createPerm2d(B);&#xD;&#xA;                int BB = createPerm2d(B + 1);&#xD;&#xA;                permutationData[x + (y * 256)] = new Color((byte)(AA), (byte)(AB),&#xD;&#xA;                                                (byte)(BA), (byte)(BB));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        permTexture2d.SetData&lt;Color&gt;(permutationData);&#xD;&#xA;        return permTexture2d;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As said before, all this works as expected, until I run the code on the CPU to get the noise data back later.&#xD;&#xA;&#xD;&#xA;According to PIX, the part that fails is indeed perm2d on the CPU (as seen below), which produces incorrect results.&#xD;&#xA;&#xD;&#xA;**CPU code (XNA C#)**&#xD;&#xA;&#xD;&#xA;    static Vector4 perm2d(Vector2 p)&#xD;&#xA;    {&#xD;&#xA;        return permutationData[(int)p.X + ((int)(p.Y) * 256)].ToVector4();&#xD;&#xA;    }" />
  <row Id="35674" PostHistoryTypeId="1" PostId="15667" RevisionGUID="8e0f9f24-036c-4c03-8a14-5928545706f2" CreationDate="2011-08-07T11:16:15.547" UserId="6867" Text="Perlin noise - copying the algorithm on the CPU?" />
  <row Id="35675" PostHistoryTypeId="3" PostId="15667" RevisionGUID="8e0f9f24-036c-4c03-8a14-5928545706f2" CreationDate="2011-08-07T11:16:15.547" UserId="6867" Text="&lt;xna&gt;&lt;c#&gt;&lt;hlsl&gt;&lt;terrain-rendering&gt;" />
  <row Id="35676" PostHistoryTypeId="5" PostId="15667" RevisionGUID="26870504-6397-412f-b4cd-c08011b00757" CreationDate="2011-08-07T11:23:51.003" UserId="6867" Comment="added 386 characters in body" Text="I have successfully made a Perlin noise algorithm on the GPU. It works as expected, and generates great results. Now, as part of the physics calculations in my game, I need to replicate the exact same algorithm on the CPU, so that I can (given an X, Y and Z coordinate) determine whether or not that is inside a wall, or a walkable area.&#xD;&#xA;&#xD;&#xA;I have debugged the shader through PIX, and I've gotten everything almost right, except for the part below (seen in shader code).&#xD;&#xA;&#xD;&#xA;**GPU (shader) code (HLSL)**&#xD;&#xA;&#xD;&#xA;    float4 perm2d(float2 p)&#xD;&#xA;    {&#xD;&#xA;    	return tex2D(permSampler2d, p);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;permSampler2d samples a texture that I generate out of Color structures and then pump to the GPU. The way I generate the texture on the CPU is the following:&#xD;&#xA;&#xD;&#xA;**CPU code (XNA C#)**&#xD;&#xA;&#xD;&#xA;    int createPerm2d(int i)&#xD;&#xA;    {&#xD;&#xA;        return permutation[i % 256];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Texture2D GeneratePermTexture2d()&#xD;&#xA;    {&#xD;&#xA;        permTexture2d = new Texture2D(device, 256, 256, true, SurfaceFormat.Color);&#xD;&#xA;        permutationData = new Color[256 * 256];&#xD;&#xA;        for (int x = 0; x &lt; 256; x++)&#xD;&#xA;        {&#xD;&#xA;            for (int y = 0; y &lt; 256; y++)&#xD;&#xA;            {&#xD;&#xA;                int A = createPerm2d(x) + y;&#xD;&#xA;                int AA = createPerm2d(A);&#xD;&#xA;                int AB = createPerm2d(A + 1);&#xD;&#xA;                int B = createPerm2d(x + 1) + y;&#xD;&#xA;                int BA = createPerm2d(B);&#xD;&#xA;                int BB = createPerm2d(B + 1);&#xD;&#xA;                permutationData[x + (y * 256)] = new Color((byte)(AA), (byte)(AB),&#xD;&#xA;                                                (byte)(BA), (byte)(BB));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        permTexture2d.SetData&lt;Color&gt;(permutationData);&#xD;&#xA;        return permTexture2d;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As said before, all this works as expected, until I run the code on the CPU to get the noise data back later.&#xD;&#xA;&#xD;&#xA;According to PIX, the part that fails is indeed perm2d on the CPU (as seen below), which produces incorrect results.&#xD;&#xA;&#xD;&#xA;**CPU code (XNA C#)**&#xD;&#xA;&#xD;&#xA;    static Vector4 perm2d(Vector2 p)&#xD;&#xA;    {&#xD;&#xA;        return permutationData[(int)p.X + ((int)(p.Y) * 256)].ToVector4();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;At the particular area (in the exact same pixel with the exact same seed used to generate the map= where it returns the incorrect results, PIX reports that the GPU returns &quot;{0.035, 0.067, 0.365, 0.408}&quot; from the perm2d function whereas the CPU code returns &quot;{X:0,7450981 Y:0,345098 Z:0,5137255 W:0,09803922}&quot;.&#xD;&#xA;&#xD;&#xA;Other than that, the rest of the functions produce the right outputs." />
  <row Id="35677" PostHistoryTypeId="5" PostId="15667" RevisionGUID="a24629b9-62ad-499e-885f-cbe837c7a815" CreationDate="2011-08-07T11:29:20.187" UserId="6867" Comment="edited body" Text="I have successfully made a Perlin noise algorithm on the GPU. It works as expected, and generates great results. Now, as part of the physics calculations in my game, I need to replicate the exact same algorithm on the CPU, so that I can (given an X, Y and Z coordinate) determine whether or not that is inside a wall, or a walkable area.&#xD;&#xA;&#xD;&#xA;I have debugged the shader through PIX, and I've gotten everything almost right, except for the part below (seen in shader code).&#xD;&#xA;&#xD;&#xA;**GPU (shader) code (HLSL)**&#xD;&#xA;&#xD;&#xA;    float4 perm2d(float2 p)&#xD;&#xA;    {&#xD;&#xA;    	return tex2D(permSampler2d, p);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;permSampler2d samples a texture that I generate out of Color structures and then pump to the GPU. The way I generate the texture on the CPU is the following:&#xD;&#xA;&#xD;&#xA;**CPU code (XNA C#)**&#xD;&#xA;&#xD;&#xA;    int createPerm2d(int i)&#xD;&#xA;    {&#xD;&#xA;        return permutation[i % 256];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Texture2D GeneratePermTexture2d()&#xD;&#xA;    {&#xD;&#xA;        permTexture2d = new Texture2D(device, 256, 256, true, SurfaceFormat.Color);&#xD;&#xA;        permutationData = new Color[256 * 256];&#xD;&#xA;        for (int x = 0; x &lt; 256; x++)&#xD;&#xA;        {&#xD;&#xA;            for (int y = 0; y &lt; 256; y++)&#xD;&#xA;            {&#xD;&#xA;                int A = createPerm2d(x) + y;&#xD;&#xA;                int AA = createPerm2d(A);&#xD;&#xA;                int AB = createPerm2d(A + 1);&#xD;&#xA;                int B = createPerm2d(x + 1) + y;&#xD;&#xA;                int BA = createPerm2d(B);&#xD;&#xA;                int BB = createPerm2d(B + 1);&#xD;&#xA;                permutationData[x + (y * 256)] = new Color((byte)(AA), (byte)(AB),&#xD;&#xA;                                                (byte)(BA), (byte)(BB));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        permTexture2d.SetData&lt;Color&gt;(permutationData);&#xD;&#xA;        return permTexture2d;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As said before, all this works as expected, until I run the code on the CPU to get the noise data back later.&#xD;&#xA;&#xD;&#xA;According to PIX, the part that fails is indeed perm2d on the CPU (as seen below), which produces incorrect results.&#xD;&#xA;&#xD;&#xA;**CPU code (XNA C#)**&#xD;&#xA;&#xD;&#xA;    static Vector4 perm2d(Vector2 p)&#xD;&#xA;    {&#xD;&#xA;        return permutationData[(int)p.X + ((int)(p.Y) * 256)].ToVector4();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;At the particular area (in the exact same pixel with the exact same seed used to generate the map, where it returns the incorrect results, PIX reports that the GPU returns &quot;{0.035, 0.067, 0.365, 0.408}&quot; from the perm2d function whereas the CPU code returns &quot;{X:0,7450981 Y:0,345098 Z:0,5137255 W:0,09803922}&quot;.&#xD;&#xA;&#xD;&#xA;Other than that, the rest of the functions produce the right outputs." />
  <row Id="35678" PostHistoryTypeId="2" PostId="15668" RevisionGUID="69a24e40-66e3-4f7d-b7af-63f81763d502" CreationDate="2011-08-07T11:29:48.493" UserId="744" Text="Are your vector x/y values that you're passing to perm2d always integers? On the GPU that will interpolate, on the CPU you're truncating and always getting an exact value.&#xD;&#xA;&#xD;&#xA;(This also doesn't look like Perlin noise.)" />
  <row Id="35679" PostHistoryTypeId="4" PostId="15666" RevisionGUID="e8f6277d-cf37-4d88-ab6a-f887d2ccff00" CreationDate="2011-08-07T12:03:35.923" UserId="5957" Comment="edited title" Text="Binary  file within android" />
  <row Id="35680" PostHistoryTypeId="2" PostId="15669" RevisionGUID="686b03fc-e4fd-4873-bc40-57c2705c912a" CreationDate="2011-08-07T12:09:27.280" UserId="6867" Text="There's a few things that come to my mind.&#xD;&#xA;&#xD;&#xA;First of all, the SpriteBatch object is quite large. Is it nescessary to instantiate it for every cube? &#xD;&#xA;&#xD;&#xA;The same could be said about the VertexBuffer. If the cubes are similar, you can re-use the vertex buffer. &#xD;&#xA;&#xD;&#xA;As for the effect, again, if the cubes are similar, re-use it." />
  <row Id="35681" PostHistoryTypeId="5" PostId="15666" RevisionGUID="9290b078-119a-45ec-b47e-93a41ff8ff15" CreationDate="2011-08-07T12:17:59.803" UserId="5957" Comment="added 21 characters in body" Text="I asked this over on stack overflow but I more often get answers from this site:&#xD;&#xA;&#xD;&#xA;update: are cross postings frowned upon?&#xD;&#xA;&#xD;&#xA;Android seems to make life pretty easy for loading resources of certain types. Once I leave the beaten path a little bit, it seems less helpful. I can load in images, sounds and other objects from the assets folder if and only if they are of certain types. If I try to load a binary file of my own format, I get a less than helpful 'file not found' exception, even though listing the directory shows that it is clearly there.&#xD;&#xA;&#xD;&#xA;I've tried using the following methods to read a binary file of a custom format from the assets directory:&#xD;&#xA;&#xD;&#xA;    File jfile = new File(&quot;file://android_asset/&quot;+filename); //tried to get the URI of the assets folder&#xD;&#xA;    JarFile file = new JarFile(&quot;assets/&quot;+filename); //tried assuming the assets folder is root&#xD;&#xA;    fd = am.openNonAssetFd( filename); //tried getting my file as an non asset in the assets folder (n.b. it is definitely there)&#xD;&#xA;    fs = am.open(filename, AssetManager.ACCESS_BUFFER); //tried loading it as an asset&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm thinking that there's something fundamental about android file I/O that I don't understand yet. The documentation for asset management seems incomplete and there must be some reason for deliberately making this unintuitive (something to do with security?). So, what's the fool proof, canonical way of loading a binary file of my own format within an android app?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" />
  <row Id="35682" PostHistoryTypeId="5" PostId="15637" RevisionGUID="4df35cb6-a9c4-47f0-b0ca-e6dddfb7ed2b" CreationDate="2011-08-07T12:30:23.517" UserId="-1" Comment="fixed broken link" Text="So, an hour or so of fiddling and trying different libraries, and it seems [OIS][1] just recognises the controller as a joystick and provides me with everything I need. &#xD;&#xA;&#xD;&#xA;If you install OIS from the link above, and make/run the 'ConsoleTest' project, you can see the output from the controller in the debug window.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/wgois/" />
  <row Id="35683" PostHistoryTypeId="24" PostId="15637" RevisionGUID="4df35cb6-a9c4-47f0-b0ca-e6dddfb7ed2b" CreationDate="2011-08-07T12:30:23.517" Comment="Proposed by 24.215.211.163|da696430-b49a-4db6-ab27-c5c2a0294293 approved by -1 edit id of 604" />
  <row Id="35684" PostHistoryTypeId="5" PostId="15637" RevisionGUID="81ca75d3-3a8c-4e57-a553-8860bc533576" CreationDate="2011-08-07T12:30:23.660" UserId="9074" Comment="fixed broken link, added enums, SDL info" Text="So, an hour or so of fiddling and trying different libraries, and it seems [OIS][1] (and [SDL][2]) just recognises the controller as a joystick and provides me with everything I need. &#xD;&#xA;&#xD;&#xA;If you install OIS from the link above, and make/run the 'ConsoleTest' project, you can see the output from the controller in the debug window.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Additionally, here's enums i've been using that match to the axes/button numbers produced by **SDL** (note not OIS, which i've now decided not to use, numberings could well be the same). Notice that the trigger buttons are not classified as an axis, which i'm pretty sure they should be (0-255 from memory):&#xD;&#xA;&#xD;&#xA;	//Values SDL attributes to individual PS3 axes&#xD;&#xA;	enum EPS3RawAxesIndex&#xD;&#xA;	{&#xD;&#xA;		EPS3RawAxesIndex_LeftX = 0,&#xD;&#xA;		EPS3RawAxesIndex_LeftY = 1,&#xD;&#xA;		EPS3RawAxesIndex_RightX = 2,&#xD;&#xA;		EPS3RawAxesIndex_RightY = 3&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	//Values SDL attributes to individual PS3 controller buttons&#xD;&#xA;	enum EPS3RawButtonIndex&#xD;&#xA;	{&#xD;&#xA;		EPS3RawButtonIndex_Select			= 0,&#xD;&#xA;		&#xD;&#xA;		EPS3RawButtonIndex_JoyClickLeft		= 1,&#xD;&#xA;		EPS3RawButtonIndex_JoyClickRight	= 2,&#xD;&#xA;		&#xD;&#xA;		EPS3RawButtonIndex_Start			= 3,&#xD;&#xA;		&#xD;&#xA;		EPS3RawButtonIndex_DpadUp			= 4,&#xD;&#xA;		EPS3RawButtonIndex_DpadRight		= 5,&#xD;&#xA;		EPS3RawButtonIndex_DpadDown			= 6,&#xD;&#xA;		EPS3RawButtonIndex_DpadLeft			= 7,&#xD;&#xA;	&#xD;&#xA;		EPS3RawButtonIndex_TriggerLeft		= 8,&#xD;&#xA;		EPS3RawButtonIndex_TriggerRight		= 9,&#xD;&#xA;		&#xD;&#xA;		EPS3RawButtonIndex_ShoulderLeft		= 10,&#xD;&#xA;		EPS3RawButtonIndex_ShoulderRight	= 11,&#xD;&#xA;		&#xD;&#xA;		EPS3RawButtonIndex_Triangle			= 12,&#xD;&#xA;		EPS3RawButtonIndex_Circle			= 13,&#xD;&#xA;		EPS3RawButtonIndex_Cross			= 14,&#xD;&#xA;		EPS3RawButtonIndex_Square			= 15,&#xD;&#xA;		&#xD;&#xA;		EPS3RawButtonIndex_PSButton			= 16&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sourceforge.net/projects/wgois/&#xD;&#xA;  [2]: http://www.libsdl.org/index.php" />
  <row Id="35685" PostHistoryTypeId="25" PostId="15667" RevisionGUID="b8c11df1-2cb2-493a-9559-e72188207b22" CreationDate="2011-08-07T12:36:45.647" Comment="http://twitter.com/#!/StackGameDev/status/100183597482385408" />
  <row Id="35686" PostHistoryTypeId="2" PostId="15670" RevisionGUID="5f0688eb-0629-4575-b2b1-efc92fb8d3a6" CreationDate="2011-08-07T13:38:58.293" UserId="2063" Text="I currently read out XML data with the following scheme: Position x,y,z&#xD;&#xA;&#xD;&#xA;I try to add one new Vertex for each position node and add it to a Vertex array.&#xD;&#xA;&#xD;&#xA;Then I try to render this list of vertices so I get all those lines connected to represent a &quot;path&quot; through space.&#xD;&#xA;(Space is 3D)&#xD;&#xA;&#xD;&#xA;What I tried so far:&#xD;&#xA;&#xD;&#xA;        [STAThread]&#xD;&#xA;        static void Main()&#xD;&#xA;        {&#xD;&#xA;            var form = new RenderForm(&quot;SlimDX - MiniTri Direct3D9 Sample&quot;);&#xD;&#xA;            var device = new Device(new Direct3D(), 0, DeviceType.Hardware, form.Handle, CreateFlags.HardwareVertexProcessing, new PresentParameters()&#xD;&#xA;            {&#xD;&#xA;                BackBufferWidth = form.ClientSize.Width,&#xD;&#xA;                BackBufferHeight = form.ClientSize.Height&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;            Vertex[] waypoints = new Vertex[1024];&#xD;&#xA;&#xD;&#xA;            XmlDocument paths = new XmlDocument();&#xD;&#xA;            paths.Load(&quot;pathdata.xml&quot;);&#xD;&#xA;            XmlNode rootNode = paths.DocumentElement;&#xD;&#xA;&#xD;&#xA;            int index = 0;&#xD;&#xA;            foreach (XmlNode waypoint in rootNode)&#xD;&#xA;            {&#xD;&#xA;                foreach (XmlNode position in waypoint)&#xD;&#xA;                {&#xD;&#xA;                    float x = float.Parse(position.ChildNodes[0].InnerText);&#xD;&#xA;                    float y = float.Parse(position.ChildNodes[1].InnerText);&#xD;&#xA;                    float z = float.Parse(waypoint.ChildNodes[2].InnerText);&#xD;&#xA;                    if (index % 2 &gt; 0)&#xD;&#xA;                        waypoints[index].Color = Color.Yellow.ToArgb();&#xD;&#xA;                    else&#xD;&#xA;                        waypoints[index].Color = Color.Red.ToArgb();&#xD;&#xA;                    waypoints[index].Position = new Vector4(x, y, z, 1.0f);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            var vertices = new VertexBuffer(device, 3 * 20, Usage.WriteOnly, VertexFormat.None, Pool.Managed);&#xD;&#xA;            vertices.Lock(0, 0, LockFlags.None).WriteRange(waypoints&#xD;&#xA;            });&#xD;&#xA;            vertices.Unlock();&#xD;&#xA;&#xD;&#xA;            var vertexElems = new[] {&#xD;&#xA;                        new VertexElement(0, 0, DeclarationType.Float4, DeclarationMethod.Default, DeclarationUsage.PositionTransformed, 0),&#xD;&#xA;                        new VertexElement(0, 16, DeclarationType.Color, DeclarationMethod.Default, DeclarationUsage.Color, 0),&#xD;&#xA;                                VertexElement.VertexDeclarationEnd&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;            var vertexDecl = new VertexDeclaration(device, vertexElems);&#xD;&#xA;&#xD;&#xA;            MessagePump.Run(form, () =&gt;&#xD;&#xA;            {&#xD;&#xA;                device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);&#xD;&#xA;                device.BeginScene();&#xD;&#xA;&#xD;&#xA;                device.SetStreamSource(0, vertices, 0, 20);&#xD;&#xA;                device.VertexDeclaration = vertexDecl;&#xD;&#xA;                //device.DrawPrimitives(PrimitiveType.TriangleList, 0, 1);&#xD;&#xA;                device.DrawPrimitives(PrimitiveType.LineStrip, 0, 2);&#xD;&#xA;                device.DrawIndexedUserPrimitives&lt;Vertex&gt;(&#xD;&#xA;                &#xD;&#xA;                device.EndScene();&#xD;&#xA;                device.Present();&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;            foreach (var item in ObjectTable.Objects)&#xD;&#xA;                item.Dispose();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But this does not work, and I am sure it is the complete wrong approach!" />
  <row Id="35687" PostHistoryTypeId="1" PostId="15670" RevisionGUID="5f0688eb-0629-4575-b2b1-efc92fb8d3a6" CreationDate="2011-08-07T13:38:58.293" UserId="2063" Text="SlimDX drawing multiple lines connected via &quot;nodes&quot;" />
  <row Id="35688" PostHistoryTypeId="3" PostId="15670" RevisionGUID="5f0688eb-0629-4575-b2b1-efc92fb8d3a6" CreationDate="2011-08-07T13:38:58.293" UserId="2063" Text="&lt;c#&gt;&lt;directx&gt;&lt;.net&gt;&lt;slimdx&gt;" />
  <row Id="35689" PostHistoryTypeId="2" PostId="15671" RevisionGUID="4f826514-0b31-41d1-b71f-780a4cb44701" CreationDate="2011-08-07T14:22:49.783" UserId="5399" Text="I am trying to implement dual-pass alpha sorting using Ogre material scripts, as part of my debugging attempts I want to compare two PIX captures, but when I attempt to debug a pixel in PIX, previously working 'geometry' is not displayed correctly.&#xD;&#xA;&#xD;&#xA;My 'reference' blended geometry which works consistently, consists of a simple box with a translucent material, sitting over a set of opaque primitives. In my app this displays fine with the 'smoked' box tinting the objects/pixels behind it.&#xD;&#xA;When I load up my app starting through PIX this continues to work, but once I load a capture taken from this in PIX, it no longer blends the pixels and instead culls them. &#xD;&#xA;&#xD;&#xA;I know it is PIX because in the debugger tab, I see the initial value of the pixel I am debugging is the correct blended colour, but the final frame buffer value is the darker incorrect colour - its as if PIX is 're-rendering' the shot and doing it wrong!&#xD;&#xA;&#xD;&#xA;Could anyone suggest a reason for this behaviour?" />
  <row Id="35690" PostHistoryTypeId="1" PostId="15671" RevisionGUID="4f826514-0b31-41d1-b71f-780a4cb44701" CreationDate="2011-08-07T14:22:49.783" UserId="5399" Text="Under what circumstances will a PIX 'Render' be different to the actual 'render'?" />
  <row Id="35691" PostHistoryTypeId="3" PostId="15671" RevisionGUID="4f826514-0b31-41d1-b71f-780a4cb44701" CreationDate="2011-08-07T14:22:49.783" UserId="5399" Text="&lt;directx&gt;&lt;ogre&gt;&lt;debugging&gt;&lt;pix&gt;" />
  <row Id="35692" PostHistoryTypeId="2" PostId="15672" RevisionGUID="5e8d8877-e233-43be-9679-beede1f5f9d4" CreationDate="2011-08-07T15:02:16.000" UserId="4662" Text="If the reference rasterizer displays it correctly, then your code is correct and it is a bug in PIX." />
  <row Id="35693" PostHistoryTypeId="2" PostId="15673" RevisionGUID="13963764-8955-4062-815d-8b4685983f27" CreationDate="2011-08-07T15:33:17.433" UserId="9092" Text="Howdie!&#xD;&#xA;&#xD;&#xA;I'm making a little RPG multiplayer game where each player can travel long distances. Traveling from point A to B can take up to 10 minutes and once initiated is an automatic process. Now, I am not quite sure how togo about this in the server, the server has to be the one telling the clients that the traveling player has arrived or not.&#xD;&#xA;&#xD;&#xA;Do I have to run some sort of timer where I check every X seconds/miliseconds if all the traveling players have reached their destinations in order to update the DB? (the characters are saved on the server to prevent cheating) .&#xD;&#xA;&#xD;&#xA;The way I imagined it was simply to capture the timestamp at the start of travel, then based on the distance calculate what the time (timestamp) should be when the player has arrived, and then run some sort of timer that checks each traveling player &quot;start time&quot; , &quot;actual time&quot; and &quot;destination time&quot; , but since I have never done this before I'm not sure if this is a good way of doing it.&#xD;&#xA;&#xD;&#xA;Any hints or suggestions would be very welcome, thx!" />
  <row Id="35694" PostHistoryTypeId="1" PostId="15673" RevisionGUID="13963764-8955-4062-815d-8b4685983f27" CreationDate="2011-08-07T15:33:17.433" UserId="9092" Text="Gameserver travel time checks" />
  <row Id="35695" PostHistoryTypeId="3" PostId="15673" RevisionGUID="13963764-8955-4062-815d-8b4685983f27" CreationDate="2011-08-07T15:33:17.433" UserId="9092" Text="&lt;server&gt;&lt;timer&gt;&lt;client&gt;" />
  <row Id="35696" PostHistoryTypeId="25" PostId="15622" RevisionGUID="672f1a84-a57f-4132-9e28-c5e38c45d52e" CreationDate="2011-08-07T15:36:45.867" Comment="http://twitter.com/#!/StackGameDev/status/100228896267579392" />
  <row Id="35697" PostHistoryTypeId="2" PostId="15674" RevisionGUID="3b0499c7-4b10-4476-890a-474194ca3c24" CreationDate="2011-08-07T16:20:07.883" UserId="7133" Text="You only need to update the database in two cases:&#xD;&#xA;&#xD;&#xA; - the user performs an action or requests information from the server&#xD;&#xA; - another player wants to interact with said user&#xD;&#xA;&#xD;&#xA;Periodically checking if the database needs to be updated would put a lot of strain on your servers. Instead, information should be **updated only when it is needed**. In other words, you don't need to update the travel-status in the database from '*travelling*' to '*not-travelling*' unless a user requests that information or wants to perform an action that is affected by that information.&#xD;&#xA;&#xD;&#xA;For example, let's assume that the player cannot do anything while traveling and that once he has arrived at his destination, he can be attacked by another player. Once the player starts moving, you could update the database with the following information:&#xD;&#xA;&#xD;&#xA; - the user's position will be set to his final destination (even though&#xD;&#xA;   he's not there yet)&#xD;&#xA; - a travel timestamp will show when he'll get there&#xD;&#xA;&#xD;&#xA;Let's now consider another user present at the same location. He's looking for someone to attack and will ask the server for a list of people in the area. The server will look for players who are both at that location AND have an expired timestamp.&#xD;&#xA;&#xD;&#xA;If the second user decides to attack the first, or the first user logs in and requests his character data, before sending any information to the players check if any of them have an expired travel timestamp. If they do, update their records (maybe the player that did the traveling is tired and has a penalty applied to his attributes) and only then perform the actual action.&#xD;&#xA;&#xD;&#xA;If you want your server to notify the users that they've reached their destination, do it the other way around: when the user logs in, tell them when traveling should end and start a timer on their machine. When the timer hits zero, make the client ask for an update from the server. Requesting character data should lead to the server noticing that the travel timestamp has expired and thus updating all of the data." />
  <row Id="35698" PostHistoryTypeId="2" PostId="15675" RevisionGUID="9c83c415-1d10-4266-a204-3310c04c8a9c" CreationDate="2011-08-07T16:50:50.210" UserId="2897" Text="It's been a while since I looked at SlimDX, so I feel like drawing some lines to remember how it feels :) Well, it looks like several colored lines are all we need, so lets arrange vertices as a list, describe it's order and draw it:&#xD;&#xA;&#xD;&#xA;    // Simple vertex with position and color.&#xD;&#xA;    public struct LineVertex&#xD;&#xA;    {&#xD;&#xA;        public Vector3 Position;&#xD;&#xA;        public int Color;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /* ...typical device initialization skipped here... */&#xD;&#xA;    &#xD;&#xA;    var lines  = new LineVertex[100];&#xD;&#xA;    var random = new Random();&#xD;&#xA;    &#xD;&#xA;    // Prepare line vertices. &#xD;&#xA;    // You will fill this array from XML instead of random generator. &#xD;&#xA;    // LineList will be used as a 3D primitive, so a line will be drawn&#xD;&#xA;    // between each pair of vertices, total of 50 lines in our case.&#xD;&#xA;    for (int i = 0; i &lt; lines .Length; i++)&#xD;&#xA;    {&#xD;&#xA;    	lines[i] = new LineVertex();&#xD;&#xA;    	float x = (float)(random.NextDouble() * 2) - 1;&#xD;&#xA;    	float y = (float)(random.NextDouble() * 2) - 1;&#xD;&#xA;    	lines[i].Position = new Vector3(x, y, 0f);&#xD;&#xA;    	lines[i].Color = Color.Gold.ToArgb();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    MessagePump.Run(form, () =&gt;&#xD;&#xA;    {&#xD;&#xA;    	device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue.ToArgb(), 0f, 1);&#xD;&#xA;    	// Since we don't have any lights in our scene, our lines won't receive &#xD;&#xA;        // any light and will therefore be black...&#xD;&#xA;    	// ...but we want them golden as an asinus aureus, so let's disable lighting.&#xD;&#xA;    	device.SetRenderState(RenderState.Lighting, false);	 &#xD;&#xA;    	device.BeginScene();&#xD;&#xA;    	&#xD;&#xA;    	// Our struct was meant to describe a position and a color,&#xD;&#xA;        // let's tell the device about it.&#xD;&#xA;    	device.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;&#xD;&#xA;    	&#xD;&#xA;    	// In this particular case SlimDX does not need the &#xD;&#xA;        // vertex stride, it will be automatically calculated.&#xD;&#xA;    	device.DrawUserPrimitives(PrimitiveType.LineList, 0, lines.Length / 2, lines);&#xD;&#xA;    	&#xD;&#xA;    	device.EndScene();&#xD;&#xA;    	device.Present();&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;You may notice that these lines don't look very beautiful. Later in your development cycle you will probably want to replace them by lines made from triangles with a custom texture. By this point it may be easier to check out some nice book about DirectX rather than fighting it all by yourself.&#xD;&#xA;" />
  <row Id="35699" PostHistoryTypeId="6" PostId="15635" RevisionGUID="95793917-6d77-4b5f-aa5e-b6f92b795e85" CreationDate="2011-08-07T16:56:40.957" UserId="8578" Comment="Tagged optimiation " Text="&lt;mmo&gt;&lt;unity&gt;&lt;optimization&gt;&lt;terrain&gt;&lt;heightmap&gt;" />
  <row Id="35700" PostHistoryTypeId="24" PostId="15635" RevisionGUID="95793917-6d77-4b5f-aa5e-b6f92b795e85" CreationDate="2011-08-07T16:56:40.957" Comment="Proposed by 8578 approved by 51 edit id of 603" />
  <row Id="35701" PostHistoryTypeId="10" PostId="15666" RevisionGUID="4334de17-a001-42f5-a194-68eda951e269" CreationDate="2011-08-07T17:07:52.973" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="35702" PostHistoryTypeId="2" PostId="15676" RevisionGUID="481d2c0d-b702-40ba-8d7c-d5920b2bac62" CreationDate="2011-08-07T18:36:03.047" UserId="6117" Text="I'm planning to buy animated 3D assets to render and use as 2D sprites in my game, but i don't know anything about 3ds max or own any software. How do i render the animations (i need top-down ones) to turn them into a bunch of pngs? &#xD;&#xA;&#xD;&#xA;From there i already know how to create a spritesheet.&#xD;&#xA;&#xD;&#xA;I assume there is a more streamlined way of doing this than opening each file in the 3D software, looking at each animation frame, and capturing the screen? " />
  <row Id="35703" PostHistoryTypeId="1" PostId="15676" RevisionGUID="481d2c0d-b702-40ba-8d7c-d5920b2bac62" CreationDate="2011-08-07T18:36:03.047" UserId="6117" Text="Turning model from 3ds max file into sprite" />
  <row Id="35704" PostHistoryTypeId="3" PostId="15676" RevisionGUID="481d2c0d-b702-40ba-8d7c-d5920b2bac62" CreationDate="2011-08-07T18:36:03.047" UserId="6117" Text="&lt;3d&gt;&lt;sprites&gt;&lt;models&gt;&lt;3dsmax&gt;" />
  <row Id="35705" PostHistoryTypeId="25" PostId="15670" RevisionGUID="1f11af30-fe5b-44c0-853e-d9c7847ee5ff" CreationDate="2011-08-07T18:36:45.773" Comment="http://twitter.com/#!/StackGameDev/status/100274194796916736" />
  <row Id="35706" PostHistoryTypeId="2" PostId="15677" RevisionGUID="8491a2b7-5749-4816-b1d5-178314c1c5c7" CreationDate="2011-08-07T19:05:41.323" UserId="1430" Text="Max (and most other modellers) also have rendering support, so they can render your scenes out to images -- you don't need to capture the screen to get your models into an image.&#xD;&#xA;&#xD;&#xA;The process of creating sprites from a model is essentially invoking the modeller's renderer with the desired settings (for lighting, anti-aliasing, and what have you) repeatedly at every desired camera angle. The settings you have to select really will depend on the desired effect you want in your sprite images -- you'll have to experiment.&#xD;&#xA;&#xD;&#xA;Most serious modelling tools have scripting support, so you can create scripts to automatically render the scene from all the desired camera angles and possibly even stitch the resulting images together in a sprite sheet. [Here's one of many available scripts for Max][1], for example.&#xD;&#xA;&#xD;&#xA;Since Max is quite expensive and you don't currently own it, you probably don't want to drop the cash on it. You can use [Blender][2], which is free and has Python scripting support that should allow you to build an automated workflow for your sprite rendering. Just make sure the assets you purchase are loadable by Blender -- try to get a sample file from the author first and make sure everything works well (this is a good idea even if you don't use Blender, note).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scriptspot.com/3ds-max/scripts/sprite-render-script&#xD;&#xA;  [2]: http://www.blender.org/" />
  <row Id="35707" PostHistoryTypeId="2" PostId="15678" RevisionGUID="189701f6-8606-478c-a9d9-d93ac28cc749" CreationDate="2011-08-07T19:22:43.017" UserId="1430" Text="There are a few things you are doing that you shouldn't. You also appear to have a type on or near the line where you call `WriteRange`, as there is an errant `}` in the code that will render it non-compilable. Similarly with the call to `DrawIndexedPrimitives` -- it makes it difficult to track down the actual cause of your problem. It would also help if you described the failure better than &quot;it doesn't work.&quot; &#xD;&#xA;&#xD;&#xA;That said, here are some things I noticed about your code:&#xD;&#xA;&#xD;&#xA;1. You create an array of 1024 vertices, which you write into your vertex buffer using `WriteRange`. This is bad because it will attempt to write all 1024 elements of the array (it utilizes the array's `Length` property), and your buffer is only 60 bytes. &#xD;&#xA;1. You hard-code the size of the vertex buffer, the primitive count, and the stride of the vertex. You should instead derive this information from the vertex type and the list of vertices itself.&#xD;&#xA;1. You are using pre-transformed positions, which means your data must be in screen space coordinates already (-1 to 1 along the X and Y axis). If your vertices have positions outside that range, they are way outside of the visible area of the screen. You should not, in general, use pre-transformed coordinates unless you understand their implications (the transformation pipeline will not run).&#xD;&#xA;&#xD;&#xA;This isn't related directly to your problem, but it's also not good to rely on the ability to iterate the object table and call Dispose on all it's members. That functionality will be going away in v2 of SlimDX and it just encourages sloppy reference handling." />
  <row Id="35708" PostHistoryTypeId="2" PostId="15679" RevisionGUID="2c17bfbb-26b5-4f90-bb2c-0b07b505e2da" CreationDate="2011-08-07T19:31:33.943" UserId="3561" Text="I'm currently trying to teach myself OpenGL... and quickly discovering that the Immediate Mode taught in old OpenGL tutorials is basically obsolete... which leads me to VBO's... which I kind of get but would like to start learning them in context.&#xD;&#xA;&#xD;&#xA;What is the workflow involved in taking a 3D object from Maya or 3DS Max and converting it to something that can be turned into a VBO?&#xD;&#xA;&#xD;&#xA;On that token, do these export workflows also deal with materials and textures, or is that handled in an entirely different manner?" />
  <row Id="35709" PostHistoryTypeId="1" PostId="15679" RevisionGUID="2c17bfbb-26b5-4f90-bb2c-0b07b505e2da" CreationDate="2011-08-07T19:31:33.943" UserId="3561" Text="How to convert a Maya object to a VBO?" />
  <row Id="35710" PostHistoryTypeId="3" PostId="15679" RevisionGUID="2c17bfbb-26b5-4f90-bb2c-0b07b505e2da" CreationDate="2011-08-07T19:31:33.943" UserId="3561" Text="&lt;opengl&gt;&lt;maya&gt;&lt;vbo&gt;" />
  <row Id="35711" PostHistoryTypeId="2" PostId="15680" RevisionGUID="e02eaf55-6cfd-4e82-8aec-d6f82ac11e74" CreationDate="2011-08-07T20:16:57.753" UserId="6867" Text="I am looking for an example site with a Perlin Noise implementation in both CPU and GPU, that generates somewhat the same results in those two places.&#xD;&#xA;&#xD;&#xA;I see many CPU implementations of Perlin Noise, but they don't match up with the GPU implementations that I found.&#xD;&#xA;&#xD;&#xA;The reason I need this is for physics. The map is generated with Perlin Noise on the GPU in 2D, but this also means that to do physics, I must have a CPU version of the algorithm that generates the same results." />
  <row Id="35712" PostHistoryTypeId="1" PostId="15680" RevisionGUID="e02eaf55-6cfd-4e82-8aec-d6f82ac11e74" CreationDate="2011-08-07T20:16:57.753" UserId="6867" Text="Perlin noise example the same on CPU as GPU?" />
  <row Id="35713" PostHistoryTypeId="3" PostId="15680" RevisionGUID="e02eaf55-6cfd-4e82-8aec-d6f82ac11e74" CreationDate="2011-08-07T20:16:57.753" UserId="6867" Text="&lt;physics&gt;&lt;math&gt;&lt;hlsl&gt;&lt;terrain-rendering&gt;" />
  <row Id="35714" PostHistoryTypeId="2" PostId="15681" RevisionGUID="d79af532-d389-4e22-a3b2-755385d80369" CreationDate="2011-08-07T21:01:18.683" UserId="9106" Text="I don't know if the answer you are looking for exists, but personally I don't like the idea of independently generating values that you hope will end up identical.&#xD;&#xA;&#xD;&#xA;I'm assuming that the map data is something you only generate once in the beginning of the scene. If so, much better to generate the data once, and use it twice. You should either generate the data on the CPU, and pass it to the GPU as a texture, or generate it on the GPU and write it to a texture, then give it back to the CPU.&#xD;&#xA;" />
  <row Id="35715" PostHistoryTypeId="25" PostId="15679" RevisionGUID="eae59db5-24a5-4b31-b402-d8a2f095ea16" CreationDate="2011-08-07T21:36:45.723" Comment="http://twitter.com/#!/StackGameDev/status/100319493305270272" />
  <row Id="35716" PostHistoryTypeId="2" PostId="15682" RevisionGUID="cd588e7e-bcea-48d9-a464-2f273271df89" CreationDate="2011-08-07T22:31:05.160" UserId="3184" Text="What are the technologies (programming languages and engines for example) to create &quot;Metal Gear: Snake Eater&quot; and &quot;Metal Gear: Sons of The Patriots&quot;?&#xD;&#xA;&#xD;&#xA;Is it usually to keep those things secret?" />
  <row Id="35717" PostHistoryTypeId="1" PostId="15682" RevisionGUID="cd588e7e-bcea-48d9-a464-2f273271df89" CreationDate="2011-08-07T22:31:05.160" UserId="3184" Text="What are the technologies used to create Metal Gear game?" />
  <row Id="35718" PostHistoryTypeId="3" PostId="15682" RevisionGUID="cd588e7e-bcea-48d9-a464-2f273271df89" CreationDate="2011-08-07T22:31:05.160" UserId="3184" Text="&lt;engine&gt;&lt;programming&gt;&lt;languages&gt;" />
  <row Id="35719" PostHistoryTypeId="2" PostId="15683" RevisionGUID="be1a2816-791e-4955-8c09-ffd1d40aedfa" CreationDate="2011-08-07T22:53:33.797" UserId="6877" Text="From 3d application you have to export the data to any format that you can parse. VBO are storage to hold vertex, index... information. In your program you have to parse back the information and feed it into the VBO, so OpenGL can draw them." />
  <row Id="35720" PostHistoryTypeId="2" PostId="15684" RevisionGUID="871c8eb3-fd40-49f4-81ca-3f4877af8f74" CreationDate="2011-08-07T23:06:00.503" UserId="5957" Text="Saving it as a very simple text format or binary (wavefront obj is a common one) and then parsing it in the usual way. This is exactly the same as any other data parsing task. A vertex buffer object is essentially just an array of data that's held in video card memory. You'll probably want to read the data into system memory first and then convert it to a VBO. With that in mind, you might be best of starting with a simple shape (e.g. a cube) that you generate in code, convert that to a VBO and then try loading files. This ensures that you're working on one problem at a time. So, get the spinning cube running first (That's the 3D graphics programmers 'hello world') and then worry about importing meshes from other sources.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35721" PostHistoryTypeId="2" PostId="15685" RevisionGUID="b259d154-e4d5-452e-94ba-a4404be7af0b" CreationDate="2011-08-07T23:07:41.657" UserId="6877" Text="For Metal Gear : Guns of The Patriots, [Kojima](http://en.wikipedia.org/wiki/Kojima_Productions) used their own in-house engine. Its unavailable to general public." />
  <row Id="35722" PostHistoryTypeId="5" PostId="15682" RevisionGUID="1f1c7918-2d7d-4f17-ba05-0d157d565e5a" CreationDate="2011-08-07T23:15:21.533" UserId="6877" Comment="fixed wrong name" Text="What are the technologies (programming languages and engines for example) to create &quot;Metal Gear : Snake Eater&quot; and &quot;Metal Gear : Guns of The Patriots&quot;?&#xD;&#xA;&#xD;&#xA;Is it usually to keep those things secret?" />
  <row Id="35723" PostHistoryTypeId="24" PostId="15682" RevisionGUID="1f1c7918-2d7d-4f17-ba05-0d157d565e5a" CreationDate="2011-08-07T23:15:21.533" Comment="Proposed by 6877 approved by 3184 edit id of 605" />
  <row Id="35724" PostHistoryTypeId="5" PostId="15682" RevisionGUID="abed3e9c-a6ba-4d50-8291-344d5b3f9c06" CreationDate="2011-08-07T23:15:45.400" UserId="3184" Comment="added 5 characters in body" Text="What are the technologies (programming languages and engines for example) used to create &quot;Metal Gear : Snake Eater&quot; and &quot;Metal Gear : Guns of The Patriots&quot;?&#xD;&#xA;&#xD;&#xA;Is it usually to keep those things secret?" />
  <row Id="35725" PostHistoryTypeId="25" PostId="15553" RevisionGUID="0674a9e5-21f7-4c24-8538-9991ef212786" CreationDate="2011-08-08T00:36:45.803" Comment="http://twitter.com/#!/StackGameDev/status/100364791729762304" />
  <row Id="35726" PostHistoryTypeId="5" PostId="15685" RevisionGUID="502264a7-d125-4e53-a90f-fa679cf44155" CreationDate="2011-08-08T00:48:34.367" UserId="6877" Comment="added 285 characters in body" Text="For Metal Gear : Guns of The Patriots, [Kojima](http://en.wikipedia.org/wiki/Kojima_Productions) used their own in-house engine. Its unavailable to general public. C++ is the de-facto of the console game industry. So, I believe it was in this case too.&#xD;&#xA;&#xD;&#xA;Recently they are developing a new engine which they have revealed E3 of this year, named [Fox Engine](http://www.joystiq.com/2011/06/02/kojima-announces-multiplatform-fox-engine-powering-upcoming-p/). They say they will be using this multi-platform engine for their future titles." />
  <row Id="35727" PostHistoryTypeId="2" PostId="15686" RevisionGUID="a6d0eee0-de96-4d69-ae5b-a59744944b22" CreationDate="2011-08-08T01:54:42.057" UserId="3184" Text="At any time, a game will likely have many objects rendering textures.  &#xD;&#xA;So what is a texture? an image for example?" />
  <row Id="35728" PostHistoryTypeId="1" PostId="15686" RevisionGUID="a6d0eee0-de96-4d69-ae5b-a59744944b22" CreationDate="2011-08-08T01:54:42.057" UserId="3184" Text="What are Textures in games development?" />
  <row Id="35729" PostHistoryTypeId="3" PostId="15686" RevisionGUID="a6d0eee0-de96-4d69-ae5b-a59744944b22" CreationDate="2011-08-08T01:54:42.057" UserId="3184" Text="&lt;textures&gt;" />
  <row Id="35730" PostHistoryTypeId="2" PostId="15687" RevisionGUID="891fb4df-5d5b-4a45-9c35-48e9e02bc30e" CreationDate="2011-08-08T02:26:55.973" UserId="7548" Text="Yes, it typically is an image (often of a pattern) that is usually applied to the surface of a 3D model." />
  <row Id="35731" PostHistoryTypeId="2" PostId="15688" RevisionGUID="32a790da-97b8-40d5-8ed8-8afc9f9ce650" CreationDate="2011-08-08T02:27:26.947" UserId="4306" Text="Textures are basically images that are used in 3D games on 3D objects, 2D planes in 3D space, or GUI elements.&#xD;&#xA;&#xD;&#xA;Textures can also be generated at real time." />
  <row Id="35732" PostHistoryTypeId="2" PostId="15689" RevisionGUID="89e1b041-92f9-4e33-9ed2-5a54ddbb248b" CreationDate="2011-08-08T02:52:04.620" UserId="998" Text="Yes, a texture for most purposes is an image.&#xD;&#xA;&#xD;&#xA;Once a texture is loaded from a file, it can be applied as a sort of &quot;decal&quot; to any polygon you wish.&#xD;&#xA;&#xD;&#xA;When you see textures in an image file they typically appear a bit warped,&#xD;&#xA;&#xD;&#xA;![a texture][1]&#xD;&#xA;&#xD;&#xA;That's because when the texture is &quot;wrapped&quot; around the model, it will all even out and wrap around the model properly.  You use a technique called [UV mapping](http://www.youtube.com/watch?v=iIvTUDgaXik) to be able to create a nice texture that will wrap around the model properly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/8NadC.jpg" />
  <row Id="35733" PostHistoryTypeId="5" PostId="15687" RevisionGUID="6d55105e-1c5f-4775-8404-f9c4f50ec38a" CreationDate="2011-08-08T03:33:50.350" UserId="7548" Comment="added 124 characters in body" Text="Yes, it typically is an image (often of a pattern) that is usually applied to the surface of a 3D model&#xD;&#xA;&#xD;&#xA;Note:  Textures can be applied to 2D models as well (thanks to @The Legend of 1982 for pointing that out in a Comment).&#xD;&#xA;" />
  <row Id="35734" PostHistoryTypeId="25" PostId="15686" RevisionGUID="ba4ea9c1-9859-42ec-b186-9cd5532710b1" CreationDate="2011-08-08T03:36:46.080" Comment="http://twitter.com/#!/StackGameDev/status/100410091135696896" />
  <row Id="35735" PostHistoryTypeId="2" PostId="15690" RevisionGUID="b7bb3ac8-a063-4dee-a5b9-984dcbecd7d7" CreationDate="2011-08-08T04:04:28.580" UserId="3830" Text="Get Sprite Forge ([http://www.d-grafix.com/?page=spriteforge][1]). It can automatically render out a full sprite sheet of your model (including animations) with incremental camera angles.  A bit old, but I haven't regretted spending the money on it.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.d-grafix.com/?page=spriteforge" />
  <row Id="35736" PostHistoryTypeId="2" PostId="15691" RevisionGUID="fde858bd-208d-4550-a5ab-c1cbe2479014" CreationDate="2011-08-08T04:11:26.057" UserId="4306" Text="How can I generate a terrain heightmap from the perlin algorithm? I am trying to make a terrain generator (like [World Machine][1]). [This][2] is the source code I have for the perlin. The only thing that I can't figure out is how to use the perlin algorithm to generate a heightmap image.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://world-machine.com&#xD;&#xA;  [2]: http://paulbourke.net/libraries/perlin.c" />
  <row Id="35737" PostHistoryTypeId="1" PostId="15691" RevisionGUID="fde858bd-208d-4550-a5ab-c1cbe2479014" CreationDate="2011-08-08T04:11:26.057" UserId="4306" Text="How can I generate a terrain heightmap from the perlin algorithm?" />
  <row Id="35738" PostHistoryTypeId="3" PostId="15691" RevisionGUID="fde858bd-208d-4550-a5ab-c1cbe2479014" CreationDate="2011-08-08T04:11:26.057" UserId="4306" Text="&lt;algorithm&gt;&lt;terrain-rendering&gt;&lt;terrain&gt;" />
  <row Id="35739" PostHistoryTypeId="2" PostId="15692" RevisionGUID="68538b57-e889-4c70-aa9b-67b4ab3d6697" CreationDate="2011-08-08T05:28:51.880" UserId="9076" Text="I decided to go with the database for my objects." />
  <row Id="35740" PostHistoryTypeId="2" PostId="15693" RevisionGUID="3c7960f5-fef9-420a-9c94-72a445384032" CreationDate="2011-08-08T05:33:49.860" UserId="2897" Text="Each time I see a new Final Fantasy or a MGS game I ask myself the same question. It's obviously the same models, animations, shaders, particle systems and whatnot, but in the hands of certain developers they feel like something out of this world.&#xD;&#xA;&#xD;&#xA;I'm quite sure it's was not the bare technologies that made those games, but an amazing art itself, design direction and overall producing. You may find:&#xD;&#xA;&#xD;&#xA; - [this forum post][1] an interesting read, &#xD;&#xA; - and watch [these videos][2] later. &#xD;&#xA;&#xD;&#xA;See, it's nothing really special or totally unknown, but MGS staff turned usual high-tech into a great experience by a burning intent to make an amazing game, also by pouring millions into their art and coding departments :)&#xD;&#xA;&#xD;&#xA;  [1]: http://mgsforums.com/topic/7131309/1/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=uvMZ8Lw479s" />
  <row Id="35741" PostHistoryTypeId="5" PostId="15693" RevisionGUID="23b41d20-b6e4-492e-8ce1-7d2568a145b1" CreationDate="2011-08-08T05:41:36.560" UserId="2897" Comment="more clear meaning I guess" Text="Each time I see a new Final Fantasy or a MGS game I ask myself the same question. It's obviously the same models, animations, shaders, particle systems and whatnot, but in the hands of certain developers they feel like something out of this world.&#xD;&#xA;&#xD;&#xA;I'm quite sure it's was not the bare technologies that made those games, but an amazing art itself, design direction and overall producing. You may find:&#xD;&#xA;&#xD;&#xA; - [this forum post][1] an interesting read, &#xD;&#xA; - and watch [these videos][2] later. &#xD;&#xA;&#xD;&#xA;As you can find out by following the links above, it's nothing totally special or absolutely unknown, but MGS staff turned usual high-tech into a great experience by a burning intent to make an amazing game, also by pouring millions into their art and coding departments :)&#xD;&#xA;&#xD;&#xA;  [1]: http://mgsforums.com/topic/7131309/1/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=uvMZ8Lw479s" />
  <row Id="35742" PostHistoryTypeId="25" PostId="15691" RevisionGUID="6e5d1f1c-c14c-416c-a862-9baab037621a" CreationDate="2011-08-08T06:36:46.803" Comment="http://twitter.com/#!/StackGameDev/status/100455393335062528" />
  <row Id="35743" PostHistoryTypeId="2" PostId="15694" RevisionGUID="816b2de2-b601-4264-838a-93c845383ea7" CreationDate="2011-08-08T07:03:13.297" UserId="9114" Text="I have a good grasp in C++ and C and have also experience developing AAA game using C++.&#xD;&#xA;Now, I'm shamelessly thinking to dive into mobile game development either in iOS or Android. Unfortunately, I don't know objective-C and java and neither have courage to learn it.&#xD;&#xA;So, As above mentioned reason, Is there any possibility to do mobile development in C++ without using any single statement of JAVA and Objective-C ?" />
  <row Id="35744" PostHistoryTypeId="1" PostId="15694" RevisionGUID="816b2de2-b601-4264-838a-93c845383ea7" CreationDate="2011-08-08T07:03:13.297" UserId="9114" Text="Mobile Game Development in C++" />
  <row Id="35745" PostHistoryTypeId="3" PostId="15694" RevisionGUID="816b2de2-b601-4264-838a-93c845383ea7" CreationDate="2011-08-08T07:03:13.297" UserId="9114" Text="&lt;c++&gt;&lt;java&gt;&lt;android&gt;&lt;ios&gt;&lt;objective-c&gt;" />
  <row Id="35746" PostHistoryTypeId="2" PostId="15695" RevisionGUID="074907e5-6a63-4cef-9414-bfc3bc23e930" CreationDate="2011-08-08T07:29:39.690" UserId="51" Text="Some objective C has to be written for iPhone apps. That being said, you can write a pretty thin layer of obj-c and then do all you game code in C or C++. &#xD;&#xA;&#xD;&#xA;On android look up the NDK. I don't have any experience with it, but it promises to be a native sdk so you should be able to write most things in C or C++. &#xD;&#xA;&#xD;&#xA;That being said, you're artificially limiting yourself with the language barrier. On iOS, if you want to do anything with the OS layer (like GameCenter, their social platform), or use any kind of middleware, you'd probably be faced with an objective C API. &#xD;&#xA;&#xD;&#xA;I can kind of understand the sentiment. C++ in particular is a huge language. But obj-c isn't a big. It's a bolt on to C (so the fundamentals should be familiar) with a few extra things added on top. It isn't nearly as complex or deep as C++. " />
  <row Id="35747" PostHistoryTypeId="2" PostId="15696" RevisionGUID="000f5a18-3aea-471a-a697-7be12f5896cb" CreationDate="2011-08-08T07:50:31.180" UserId="7328" Text="I'm using [cocos2d-x](http://www.cocos2d-x.org/) for a while, it's a game engine based on c++. (it actually a c++ port of cocos2d-iphone). using this engine you can easily run and test your codes on windows and then compile the same code for iphone/android export." />
  <row Id="35748" PostHistoryTypeId="2" PostId="15697" RevisionGUID="02d4d58e-96d7-4eb3-b495-eddc80e1e7a8" CreationDate="2011-08-08T08:20:31.110" UserId="9115" Text="Most of the papers i've read base their terrain in some form or another on a quadtree. See this at &lt;strong&gt;page 38&lt;/strong&gt;: &#xD;&#xA;&#xD;&#xA;http://www.slideshare.net/repii/terrain-rendering-in-frostbite-using-procedural-shader-splatting-presentation?from=ss_embed&#xD;&#xA;&#xD;&#xA;Doesn't the first point contradict the bottom two? How can you have a fixed 33x33 vertex grid per leaf yet talk about adaptive division in a quad tree? The terminology is confusing and i'd appreciate any clarity on this!" />
  <row Id="35749" PostHistoryTypeId="1" PostId="15697" RevisionGUID="02d4d58e-96d7-4eb3-b495-eddc80e1e7a8" CreationDate="2011-08-08T08:20:31.110" UserId="9115" Text="Quadtree terrain splitting - I don't get it" />
  <row Id="35750" PostHistoryTypeId="3" PostId="15697" RevisionGUID="02d4d58e-96d7-4eb3-b495-eddc80e1e7a8" CreationDate="2011-08-08T08:20:31.110" UserId="9115" Text="&lt;terrain-rendering&gt;&lt;terrain&gt;" />
  <row Id="35751" PostHistoryTypeId="2" PostId="15698" RevisionGUID="2dfe9616-dc69-47bf-bb5b-711c4e6b9a53" CreationDate="2011-08-08T08:46:15.857" UserId="678" Text="The &quot;unit&quot; of terrain are 33x33 blocks. If you are close, that is what you will see. If you are further away, these blocks are fused into lower LOD chunks.&#xD;&#xA;&#xD;&#xA;The reason they use fixed chunks at the lowest level (leaf), is because modern hardware is a lot faster with static geometry. Systems like ROAM, where a lot of work is performed to reduce eventual polygon count, incur into sizable performance penalties." />
  <row Id="35752" PostHistoryTypeId="2" PostId="15699" RevisionGUID="fae4c817-2d32-42de-9d0b-d84d42542b48" CreationDate="2011-08-08T09:04:02.350" UserId="9116" Text="I am using Torque 3D pro 1.1.  I have an outdoor level and I am using Environment -&gt; Ground cover with the default tree mesh to create a forest. I would like to scale up the tree's. In the properties window under transform there is a scale property set to [1 1 1].  If I change this to [2 2 2] I would expect the trees to be twice as large, however the forest re-renders and there is no change.  Does anybody know how to scale ground cover?" />
  <row Id="35753" PostHistoryTypeId="1" PostId="15699" RevisionGUID="fae4c817-2d32-42de-9d0b-d84d42542b48" CreationDate="2011-08-08T09:04:02.350" UserId="9116" Text="Torque 3D ground cover not scaling" />
  <row Id="35754" PostHistoryTypeId="3" PostId="15699" RevisionGUID="fae4c817-2d32-42de-9d0b-d84d42542b48" CreationDate="2011-08-08T09:04:02.350" UserId="9116" Text="&lt;torque&gt;" />
  <row Id="35755" PostHistoryTypeId="2" PostId="15700" RevisionGUID="026b3a12-74f8-4e66-96c1-46781c849f62" CreationDate="2011-08-08T09:05:12.863" UserId="4546" Text="A terrain heightmap texture is a regular grid of point samples, which indicate the height at that particular location on the terrain. When you want to create such a heightmap from a function, you evaluate the function with the position of each of the grid points of the terrain to get the value at those points, and let that be the color value in the texture.&#xD;&#xA;&#xD;&#xA;If the function expects parameters in a different range than the pixel coordinates of your texture, you need to scale and offset them to map to the region of parameter space you wish to render. The output values might have the wrong scale or offset, so you might need to compensate those too:&#xD;&#xA;&#xD;&#xA;    foreach (y in [0..height))&#xD;&#xA;      foreach (x in [0..width))&#xD;&#xA;        vec2 p = translate_pixel_position_to_parameter_space(x, y);&#xD;&#xA;        tex(x,y) = height_offset + height_scale * f(p.x, p.y);" />
  <row Id="35756" PostHistoryTypeId="25" PostId="15694" RevisionGUID="7125943e-6f96-4c43-ac58-5171f84afe9a" CreationDate="2011-08-08T09:36:46.683" Comment="http://twitter.com/#!/StackGameDev/status/100500690971009024" />
  <row Id="35757" PostHistoryTypeId="5" PostId="15697" RevisionGUID="e09c8bd0-d9b7-4ae9-b3af-2cf1e76bf600" CreationDate="2011-08-08T09:43:01.507" UserId="9115" Comment="Attached pretty graphic" Text="Most of the papers i've read base their terrain in some form or another on a quadtree. See this at &lt;strong&gt;page 38&lt;/strong&gt;: &#xD;&#xA;&#xD;&#xA;http://www.slideshare.net/repii/terrain-rendering-in-frostbite-using-procedural-shader-splatting-presentation?from=ss_embed&#xD;&#xA;&#xD;&#xA;Doesn't the first point contradict the bottom two? How can you have a fixed 33x33 vertex grid per leaf yet talk about adaptive division in a quad tree? The terminology is confusing and i'd appreciate any clarity on this!&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Here are my assumptions:&lt;br/&gt;&#xD;&#xA;&lt;em&gt;Re-placing the patches everytime the quadtree changes would be a hit wouldn't it?&lt;/em&gt;&#xD;&#xA;&#xD;&#xA;![http://www.dukecg.net/QuadtreeTerrain.png][1]&#xD;&#xA;&#xD;&#xA;&lt;ol&gt;&#xD;&#xA;&lt;li&gt;&#xD;&#xA;Quadtree starting at terrain bounds.&#xD;&#xA;&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&#xD;&#xA;Iterate down to observer location.&#xD;&#xA;&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&#xD;&#xA;Constrained version (no more than 1 level difference between neighbours)&#xD;&#xA;&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&#xD;&#xA;Frustum cull.&#xD;&#xA;&lt;/li&gt;&#xD;&#xA;&lt;li&gt;&#xD;&#xA;Place terrain patch in each resulting leaf, where the scale differs but the resolution is always 33x33.&#xD;&#xA;&lt;/li&gt;&#xD;&#xA;&lt;/ol&gt;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/pQCps.png" />
  <row Id="35758" PostHistoryTypeId="2" PostId="15701" RevisionGUID="ff3bc959-0b16-4a79-bfd3-8e1c6f25026b" CreationDate="2011-08-08T10:50:36.260" UserId="8701" Text="I was wondering if anybody knows about any good pieces of equipment fit for recording sound effects for games.&#xD;&#xA;If you can, also tell please me the price range for professional equipment." />
  <row Id="35759" PostHistoryTypeId="1" PostId="15701" RevisionGUID="ff3bc959-0b16-4a79-bfd3-8e1c6f25026b" CreationDate="2011-08-08T10:50:36.260" UserId="8701" Text="Recording equipment for game sounds" />
  <row Id="35760" PostHistoryTypeId="3" PostId="15701" RevisionGUID="ff3bc959-0b16-4a79-bfd3-8e1c6f25026b" CreationDate="2011-08-08T10:50:36.260" UserId="8701" Text="&lt;audio&gt;&lt;sound&gt;&lt;sound-effects&gt;" />
  <row Id="35761" PostHistoryTypeId="2" PostId="15702" RevisionGUID="961c3d2c-a867-4d87-87fa-2d7d26077bf8" CreationDate="2011-08-08T11:09:44.523" UserId="8921" Text="Recording sound effects is an expensive process, and requires sound-proofing, expensive equipment and professional actors / real life objects.&#xD;&#xA;&#xD;&#xA;Game studios and Film studios generally have huge sound banks from which they take basic sounds and mix, filter, compress and generally manipulate the basic sounds to their needs.&#xD;&#xA;&#xD;&#xA;[The Wilhelm Scream](http://www.youtube.com/watch?v=cdbYsoEasio) is a great example of re-use of sound effects in films: I never noticed it until I saw this video and now I hear it everywhere!&#xD;&#xA;&#xD;&#xA;I believe that a lot of the work a Sound Designer has to do is find the right sounds from a sound bank and mess about with them until they're perfect for the game. This is why I think that with any basic recording equipment you could start recording and just use noise filters and compression to get some ok quality sounds. If you're starting off the best thing to know is how to use filters and apply sounds to a certain situation.&#xD;&#xA;&#xD;&#xA;Software-wise I know [SoundForge](http://www.sonycreativesoftware.com/soundforgesoftware) is widely used for sound editing, I really think it's a great, but expensive tool. For other software you can search the site, but [Audacity](http://audacity.sourceforge.net/) is a good free sound editing tool.&#xD;&#xA;&#xD;&#xA;Equipment-wise you'd be best going to a local store and asking for professional advice; the price is dependant on your budget and the target of what you want to do exactly." />
  <row Id="35762" PostHistoryTypeId="5" PostId="15702" RevisionGUID="d0fbe42d-7caf-43b9-a32d-bb58ec8876ca" CreationDate="2011-08-08T11:16:09.790" UserId="8921" Comment="added 157 characters in body" Text="Recording sound effects is an expensive process, and requires sound-proofing, expensive equipment and professional actors / real life objects.&#xD;&#xA;&#xD;&#xA;Game studios and Film studios generally have huge sound banks from which they take basic sounds and mix, filter, compress and generally manipulate the basic sounds to their needs.&#xD;&#xA;&#xD;&#xA;[The Wilhelm Scream](http://www.youtube.com/watch?v=cdbYsoEasio) is a great example of re-use of sound effects in films: I never noticed it until I saw this video and now I hear it everywhere!&#xD;&#xA;&#xD;&#xA;I believe that a lot of the work a Sound Designer has to do is find the right sounds from a sound bank and mess about with them until they're perfect for the game. This is why I think that with any basic recording equipment you could start recording and just use noise filters and compression to get some ok quality sounds. If you're starting off the best thing to know is how to use filters and apply sounds to a certain situation.&#xD;&#xA;&#xD;&#xA;Software-wise I know [SoundForge](http://www.sonycreativesoftware.com/soundforgesoftware) is widely used for sound editing, I really think it's a great, but expensive tool. For other software you can search the site, but [Audacity](http://audacity.sourceforge.net/) is a good free sound editing tool.&#xD;&#xA;&#xD;&#xA;You can then take a look at this question to get some free sounds : http://gamedev.stackexchange.com/questions/8/where-can-i-find-free-sounds-for-my-game&#xD;&#xA;&#xD;&#xA;Equipment-wise you'd be best going to a local store and asking for professional advice; the price is dependant on your budget and the target of what you want to do exactly." />
  <row Id="35763" PostHistoryTypeId="25" PostId="15701" RevisionGUID="57a058a1-a843-4f81-85fc-d0a489d4b38e" CreationDate="2011-08-08T12:36:46.653" Comment="http://twitter.com/#!/StackGameDev/status/100545990091735043" />
  <row Id="35764" PostHistoryTypeId="2" PostId="15703" RevisionGUID="2be5361d-0cc7-4ab8-8c4a-777c0c2722e8" CreationDate="2011-08-08T13:35:23.650" UserId="5911" Text="I would like to port my 2D flash game to Android and iOS. Is there any cross platform engine you could recommend? [Corona][1] is the only promising one I have found so far.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.anscamobile.com/" />
  <row Id="35765" PostHistoryTypeId="1" PostId="15703" RevisionGUID="2be5361d-0cc7-4ab8-8c4a-777c0c2722e8" CreationDate="2011-08-08T13:35:23.650" UserId="5911" Text="2D Engine for iOS/Android" />
  <row Id="35766" PostHistoryTypeId="3" PostId="15703" RevisionGUID="2be5361d-0cc7-4ab8-8c4a-777c0c2722e8" CreationDate="2011-08-08T13:35:23.650" UserId="5911" Text="&lt;2d&gt;&lt;android&gt;&lt;iphone&gt;&lt;flash&gt;&lt;ios&gt;" />
  <row Id="35767" PostHistoryTypeId="2" PostId="15704" RevisionGUID="474258c5-6817-4d50-b48b-7ef8411fb832" CreationDate="2011-08-08T13:55:17.277" UserId="9119" Text="There is also [Marmalade](http://www.madewithmarmalade.com) which allows you to use c++ to create mobile applications for a broad range of devices such as iPhone, Android, Win Mobile, Bada, and some more." />
  <row Id="35768" PostHistoryTypeId="2" PostId="15705" RevisionGUID="609b1484-af01-4623-8b54-b8dd621f1c24" CreationDate="2011-08-08T14:07:41.360" UserId="5091" Text="So, basically I'm looking for a way to get some 3D models and animations for my game.&#xD;&#xA;&#xD;&#xA;I know this is kind of vague, but I don't need a precise answer, the details would be like this:&#xD;&#xA;&#xD;&#xA;- The 3D models are for humanoid units, but there could be some alien-ish units too.&#xD;&#xA;- The level of detail of the units would be similar to Warcraft III ones&#xD;&#xA;- Amount of units, to begin with, 30-35&#xD;&#xA;- The units will need to have animations like: walk, attack, block and attack, and maybe some special movement.&#xD;&#xA;&#xD;&#xA;That's all.&#xD;&#xA;&#xD;&#xA;Now, the question is, how hard/expensive/complicated would be to get those units made by an artist, bought in a website, etc.&#xD;&#xA;&#xD;&#xA;I just want to know what to expect.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="35769" PostHistoryTypeId="1" PostId="15705" RevisionGUID="609b1484-af01-4623-8b54-b8dd621f1c24" CreationDate="2011-08-08T14:07:41.360" UserId="5091" Text="How difficult and expensive would be to obtain 3D models for my game?" />
  <row Id="35770" PostHistoryTypeId="3" PostId="15705" RevisionGUID="609b1484-af01-4623-8b54-b8dd621f1c24" CreationDate="2011-08-08T14:07:41.360" UserId="5091" Text="&lt;3d&gt;&lt;models&gt;&lt;art&gt;&lt;costs&gt;" />
  <row Id="35771" PostHistoryTypeId="2" PostId="15706" RevisionGUID="a93f0de4-a08b-4009-a5a2-c34286ea7fb5" CreationDate="2011-08-08T14:45:05.793" UserId="6592" Text="I can't provide a useful answer for how much time or money it would cost to pay a professional to make these models, but I can say that it would be a small fraction of the cost to buy them pre-made on a website like turbosquid. You will almost certainly not get exactly what you want this way, but the time and money investment will be much less. I would suggest you start shopping around for off-the-shelf models to get a feel for whether that will work for you and how much it will cost." />
  <row Id="35772" PostHistoryTypeId="2" PostId="15707" RevisionGUID="009c6a94-25bb-464d-a244-feeb9ae5cb44" CreationDate="2011-08-08T15:07:57.280" UserId="6592" Text="I've been writing a game for quite a while in c++ for Android. I have to touch the java code once every few weeks, but for the most part I modified one of the sample apps that comes with the NDK and have written c++ otherwise. I've had to do a bit of JNI work as well, which is never fun. However, I have many years of java experience, so having to write java or JNI doesn't particularly slow me down.&#xD;&#xA;&#xD;&#xA;My game runs just as well on my linux box as it does on my test devices. The linux version is pure C++ and the trouble I went through to make this work pays for itself every time I make an iterative change to my game.&#xD;&#xA;&#xD;&#xA;My project has 836 lines of java code, 331 lines of hideous jni C code and about 40k lines of C++ code." />
  <row Id="35773" PostHistoryTypeId="2" PostId="15708" RevisionGUID="b58a89b1-b5c3-407d-a1a9-7987b6525c79" CreationDate="2011-08-08T15:26:45.553" UserId="9123" Text="How I can implement the gravity? Not for a particular language, just pseudocode...&#xD;&#xA;&#xD;&#xA;Sorry for bad English,&#xD;&#xA;    thanks previously." />
  <row Id="35774" PostHistoryTypeId="1" PostId="15708" RevisionGUID="b58a89b1-b5c3-407d-a1a9-7987b6525c79" CreationDate="2011-08-08T15:26:45.553" UserId="9123" Text="Gravity (of the situation)" />
  <row Id="35775" PostHistoryTypeId="3" PostId="15708" RevisionGUID="b58a89b1-b5c3-407d-a1a9-7987b6525c79" CreationDate="2011-08-08T15:26:45.553" UserId="9123" Text="&lt;programming&gt;&lt;physics&gt;" />
  <row Id="35776" PostHistoryTypeId="25" PostId="15697" RevisionGUID="bedc32d2-caed-454b-8d85-d419a43f2da4" CreationDate="2011-08-08T15:36:46.673" Comment="http://twitter.com/#!/StackGameDev/status/100591288247791616" />
  <row Id="35777" PostHistoryTypeId="2" PostId="15709" RevisionGUID="48c50081-e274-44b3-8e9e-6948bb28b2f8" CreationDate="2011-08-08T15:59:08.400" UserId="1279" Text="I would try http://gamesalad.com/. While Android publishing is not yet supported (planned for fall according to http://gamesalad.com/corporate/roadmap/) it can publish in HTML5, which should work well in many places, possibly android browsers too. YMMV." />
  <row Id="35778" PostHistoryTypeId="2" PostId="15710" RevisionGUID="244ea4e8-7691-4000-9aa8-df3a34e75dcf" CreationDate="2011-08-08T16:05:39.627" UserId="8185" Text="I already read a thread which had the same title, but it was closed before anyone could really elaborate on any alternatives to XNA, so I figured I might remake this.&#xD;&#xA;&#xD;&#xA;I'm actually looking for some kind of alternative to XNA - I don't care whether it's a 2D or 3D engine. It's not because I dislike Windows or am anti-Microsoft, it's because I like running Linux, code in Linux completely (for C# I use Mono, obviously), and by no means have any hardware to actually support programming in XNA, simply because my video card is 6 years old and I don't have a Windows 7/Vista CD for DirectX 10.&#xD;&#xA;&#xD;&#xA;Thus, for game development I'm kind of stuck in the stone age. Yet, I like C# very much and would hate to have to drop it as a language due to this. &#xD;&#xA;&#xD;&#xA;Is there anything I can do?" />
  <row Id="35779" PostHistoryTypeId="1" PostId="15710" RevisionGUID="244ea4e8-7691-4000-9aa8-df3a34e75dcf" CreationDate="2011-08-08T16:05:39.627" UserId="8185" Text="Alternative to XNA" />
  <row Id="35780" PostHistoryTypeId="3" PostId="15710" RevisionGUID="244ea4e8-7691-4000-9aa8-df3a34e75dcf" CreationDate="2011-08-08T16:05:39.627" UserId="8185" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="35781" PostHistoryTypeId="5" PostId="15710" RevisionGUID="c91ff0dd-cb0f-42ce-890e-0707090288f2" CreationDate="2011-08-08T16:12:14.813" UserId="8185" Comment="added 2 characters in body" Text="I already read a thread which had the same title, but it was closed before anyone could really elaborate on any alternatives to XNA, so I figured I might remake this.&#xD;&#xA;&#xD;&#xA;I'm actually looking for some kind of alternative to XNA - I don't care whether it's a 2D or 3D engine. It's not because I dislike Windows or am anti-Microsoft; it's because I like running Linux, code in Linux completely (for C# I use Mono, obviously), and by no means have any hardware to actually support programming in XNA, simply because my video card is 6 years old. I also don't have a Windows 7/Vista CD for DirectX 10.&#xD;&#xA;&#xD;&#xA;Thus, for game development I'm kind of stuck in the stone age. Yet, I like C# very much and would hate to have to drop it as a language due to this. &#xD;&#xA;&#xD;&#xA;Is there anything I can do?" />
  <row Id="35782" PostHistoryTypeId="2" PostId="15711" RevisionGUID="831c31aa-a35c-4a3f-bf5a-fa2c7e40884b" CreationDate="2011-08-08T16:24:49.297" UserId="6592" Text="I've been struggling with a decision regarding whether or not to implement a scene graph in my game. I have some use cases that call for such a tool, but I haven't been able to get through some of the implementation details.&#xD;&#xA;&#xD;&#xA;Some background: I'm writing a space shooter type game targeted at mobile platform (Android, primarily) and my code is almost entirely C++. I'm not using any middleware; the rendering and physics engines in particular are my own creations. My physics engine updates locations of objects based on forces and impulses. I have no animation system as of yet but may visit this at some point (which may or may not have anything to do with this discussion).&#xD;&#xA;&#xD;&#xA;First, I'll describe a good use case. I would like to have a boss that is made up of several discrete parts, each of which can be damaged / destroyed independently. For example, I might have a boss that has an arm that can receive damage independently of the rest of the boss entity. When the arm is destroyed, a fire particle effect located at the bosses' shoulder could indicate that the arm is now destroyed.&#xD;&#xA;&#xD;&#xA;As it is, I have decided to try solving such problems with constraints in my physics engine to keep such compound objects together. One such constraint provides 0 degrees of freedom and is essentially a transformation matrix. This is really an attempt to circumvent a problem that ultimately turned me off of scene graphs in the first place, described below.&#xD;&#xA;&#xD;&#xA;The primary reason I turned away from use of a scene graph is because I could not find an efficient way to keep nested objects (objects that inherit a transformation from their parent) in both the physics world and the rendering scene. The physics world needs objects to be in world-space (or at least the same space) while the rendering scene needs objects in parent-space. Tracking locations in both spaces might help (and be inevitable) but raises its own concerns, not the least of which relates to performance.&#xD;&#xA;&#xD;&#xA;However, given use cases like the one described above, I think that being able to 'work' in parent space will become very important, and trying to force my physics engine to maintain these relationships through the use of constraints is going to become problematic.&#xD;&#xA;&#xD;&#xA;Given the use case and predicament described above, should I use a graph structure to pass transformations from one object to another? If so, how should my physics engine calculate new locations and perform intersection tests for objects in different spaces?" />
  <row Id="35783" PostHistoryTypeId="1" PostId="15711" RevisionGUID="831c31aa-a35c-4a3f-bf5a-fa2c7e40884b" CreationDate="2011-08-08T16:24:49.297" UserId="6592" Text="To scene graph or not to scene graph?" />
  <row Id="35784" PostHistoryTypeId="3" PostId="15711" RevisionGUID="831c31aa-a35c-4a3f-bf5a-fa2c7e40884b" CreationDate="2011-08-08T16:24:49.297" UserId="6592" Text="&lt;scene-graph&gt;&lt;graph&gt;&lt;structure&gt;" />
  <row Id="35785" PostHistoryTypeId="2" PostId="15712" RevisionGUID="42361914-f731-4607-9984-a7c1912830c5" CreationDate="2011-08-08T16:40:48.543" UserId="8852" Text="Every update loop of your game, do this:&#xD;&#xA;&#xD;&#xA;    if (collidingBelow())&#xD;&#xA;        gravity = 0;&#xD;&#xA;    else gravity = [insert gravity value here];&#xD;&#xA;    &#xD;&#xA;    velocity.y += gravity;&#xD;&#xA;&#xD;&#xA;For instance, in a platformer, once you jump gravity would be enabled (collidingBelow tells you whether or not there is ground right below you) and once you hit the ground it would be disabled." />
  <row Id="35786" PostHistoryTypeId="2" PostId="15713" RevisionGUID="15b0f3e2-b908-41fc-9a97-776b6cab43bd" CreationDate="2011-08-08T16:48:03.977" UserId="3830" Text="A couple of resources for you to check out...&#xD;&#xA;&#xD;&#xA; - Here is a good list of sites with 3D models available for free and for pay:  [http://www.hongkiat.com/blog/60-excellent-free-3d-model-websites/][1]&#xD;&#xA; - Check out [http://www.frogames.net/][2] and their content packs.  They have a specific style, but this is the kind of offering you may be looking for in terms of cost, quality and flexibility.&#xD;&#xA; - The following page on the Unity site offers a pretty good list:  [http://answers.unity3d.com/questions/16650/game-asset-website-list-free-and-paid-textures-mod.html][3].  Because Unity is so popular now, I would definitely look into their support forums and such for resources. &#xD;&#xA;&#xD;&#xA;My experience has been that the quality of models can vary widely, and often the 3D models that are free are often of low quality, or ironically of such a high level of detail that they aren't useable in a game environment (too many polys).  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.hongkiat.com/blog/60-excellent-free-3d-model-websites/&#xD;&#xA;  [2]: http://www.frogames.net/&#xD;&#xA;  [3]: http://answers.unity3d.com/questions/16650/game-asset-website-list-free-and-paid-textures-mod.html" />
  <row Id="35787" PostHistoryTypeId="2" PostId="15714" RevisionGUID="6e652ca8-ddcf-458b-ab5f-eabd95047cf6" CreationDate="2011-08-08T16:54:40.340" UserId="9125" Text="I need to control a 3D object using wii remote (motion plus inbuilt) in xna gaming environment. I am using C#. Actually I want to do something like in wii cricket or in wii tennis in xna gaming environment using c#.&#xD;&#xA;&#xD;&#xA;its a pleasure you can suggest me a place where I can got some help, sample codes, sample projects or any kind of help related to this question as soon as possible.&#xD;&#xA;&#xD;&#xA;Thank for you for your valuable consideration..............!!!!!!!" />
  <row Id="35788" PostHistoryTypeId="1" PostId="15714" RevisionGUID="6e652ca8-ddcf-458b-ab5f-eabd95047cf6" CreationDate="2011-08-08T16:54:40.340" UserId="9125" Text="control a 3D object using wii remote plus" />
  <row Id="35789" PostHistoryTypeId="3" PostId="15714" RevisionGUID="6e652ca8-ddcf-458b-ab5f-eabd95047cf6" CreationDate="2011-08-08T16:54:40.340" UserId="9125" Text="&lt;xna&gt;&lt;c#&gt;&lt;3d&gt;&lt;directx&gt;&lt;wii&gt;" />
  <row Id="35790" PostHistoryTypeId="2" PostId="15715" RevisionGUID="7b6d382e-7ad9-4f88-b585-1aab24929c3d" CreationDate="2011-08-08T17:05:12.053" UserId="2897" Text="I'm afraid there is no such thing as a complete alternative to XNA in the world of C#-based cross-platform frameworks. Monoxna is long dead, and very few other cross-platform tools use C# as their language of choice. &#xD;&#xA;&#xD;&#xA;However, this soon-to-be port of XNA on iOS and Android looks very promising: [ExEn][3]. Don't know about requirements though.&#xD;&#xA;&#xD;&#xA;Since you've used word &quot;engine&quot; you may want something more complex. I can remember only one cheap full-fledged C# engine that can run on Linux and has pretty forgiving hardware requirements: [NeoAxis][1].&#xD;&#xA;&#xD;&#xA;However, if your primary target is 2D games, then you may check out this little cross-platform game library: [AgateLib][2]. Two years ago it was nice to use yet somewhat buggy, maybe now things are better.&#xD;&#xA;&#xD;&#xA;Anyway, if anything else fails, you can always use OpenGL with SDL via [OpenTK][4] or [SDL.Net][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.neoaxis.com/&#xD;&#xA;  [2]: http://www.agatelib.org/&#xD;&#xA;  [3]: http://rockethub.com/projects/752-exen-xna-for-iphone-android-and-silverlight&#xD;&#xA;  [4]: http://www.opentk.com/&#xD;&#xA;  [5]: http://cs-sdl.sourceforge.net/" />
  <row Id="35791" PostHistoryTypeId="2" PostId="15716" RevisionGUID="7b16f01b-dcd4-49a8-b4a2-2e5bad343d85" CreationDate="2011-08-08T17:05:29.397" UserId="7911" Text="Have you actually tried a hierarchical graph and **measured the performance?**&#xD;&#xA;&#xD;&#xA;Have you investigated simple physics engines to see how they handle the problem, even a 2D engine that has linkage between objects would help guide you in a proven direction.&#xD;&#xA;&#xD;&#xA;I would not try to run your physics in multiple spaces, the complexity would be daunting.  Run the physics in world space and add functionality to create transforms of your hierarchy to move local space objects out to world space and back.  Your constraints, of necessity, must be in local space relative to the parent object.&#xD;&#xA;&#xD;&#xA;As a side note even a pure array of objects is a &quot;scene graph,&quot; just a very simple one.  Don't be afraid to organize data in ways to solve problems and especially don't decide that performance of that data organization is a factor without even having measured that performance.&#xD;&#xA;" />
  <row Id="35792" PostHistoryTypeId="2" PostId="15717" RevisionGUID="a7d15eff-4e05-45d6-b322-3a1a5958a66e" CreationDate="2011-08-08T17:21:51.970" UserId="9126" Text="I'm trying to figure out a way to do &quot;bullet holes&quot; but actually apply the texture at the shader level?  If I'm dealing with a model which doesn't have a &quot;flat&quot; face I'd like to be able to wrap the &quot;decal&quot; across the model.  Anyone point me at a tutorial that will do something similar to this. " />
  <row Id="35793" PostHistoryTypeId="1" PostId="15717" RevisionGUID="a7d15eff-4e05-45d6-b322-3a1a5958a66e" CreationDate="2011-08-08T17:21:51.970" UserId="9126" Text="Alternative to Decals" />
  <row Id="35794" PostHistoryTypeId="3" PostId="15717" RevisionGUID="a7d15eff-4e05-45d6-b322-3a1a5958a66e" CreationDate="2011-08-08T17:21:51.970" UserId="9126" Text="&lt;shaders&gt;" />
  <row Id="35795" PostHistoryTypeId="5" PostId="15714" RevisionGUID="0a09877c-e11d-442c-9a05-bb839a4fdcb5" CreationDate="2011-08-08T18:00:00.987" UserId="5060" Comment="Formatting, grammar, etc." Text="I need to control a 3D object using a Wii remote (with built-in motion plus) in XNA. I am using C#. I want to do something like in Wii cricket or Wii tennis with XNA and C#.&#xD;&#xA;&#xD;&#xA;Can you please suggest a place where I can get some help, sample codes, sample projects or anything else about this as soon as possible?" />
  <row Id="35796" PostHistoryTypeId="4" PostId="15714" RevisionGUID="0a09877c-e11d-442c-9a05-bb839a4fdcb5" CreationDate="2011-08-08T18:00:00.987" UserId="5060" Comment="Formatting, grammar, etc." Text="How do I control a 3D object using wii remote plus in XNA?" />
  <row Id="35797" PostHistoryTypeId="6" PostId="15714" RevisionGUID="0a09877c-e11d-442c-9a05-bb839a4fdcb5" CreationDate="2011-08-08T18:00:00.987" UserId="5060" Comment="Formatting, grammar, etc." Text="&lt;xna&gt;&lt;c#&gt;&lt;controllers&gt;" />
  <row Id="35798" PostHistoryTypeId="24" PostId="15714" RevisionGUID="0a09877c-e11d-442c-9a05-bb839a4fdcb5" CreationDate="2011-08-08T18:00:00.987" Comment="Proposed by 5060 approved by -1 edit id of 606" />
  <row Id="35799" PostHistoryTypeId="5" PostId="15714" RevisionGUID="7bd88ca1-6065-48c7-bed7-b60138671cf8" CreationDate="2011-08-08T18:00:01.423" UserId="20" Comment="Formatting, grammar, etc." Text="I need to control a 3D object using a Wii remote (with built-in motion plus) in XNA. I am using C#. I want to create something like Wii cricket or Wii tennis with XNA and C#.&#xD;&#xA;&#xD;&#xA;Can you please suggest a place where I can get some help, sample code, sample projects or anything else that will help me getting started?" />
  <row Id="35800" PostHistoryTypeId="2" PostId="15718" RevisionGUID="3675cb87-e96a-497f-aa31-6f10e0c21f54" CreationDate="2011-08-08T18:04:10.287" UserId="2771" Text="Why seek an alternative when you can use a port?&#xD;&#xA;&#xD;&#xA;&quot;MonoGame is a free OpenGL implementation of the XNA 4.0 Framework. It is built upon the excellent range of Mono compilers and is compatible with MonoTouch (iOS), Mono for Android (Android), MonoMac (Mac OS X), Mono for Windows and now Linux!&#xD;&#xA;&#xD;&#xA;Our goal is to allow XNA developers on Windows &amp; Windows Phone 7 to port of their games to the iOS / Android / Mac OS X / Windows / Linux and visa versa, with minimal hassle.&quot;&#xD;&#xA;&#xD;&#xA;http://monogame.codeplex.com&#xD;&#xA;&#xD;&#xA;https://github.com/mono/MonoGame&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35801" PostHistoryTypeId="2" PostId="15719" RevisionGUID="f1461560-12fb-47a3-aed1-fc18ba349ed5" CreationDate="2011-08-08T18:17:07.770" UserId="5473" Text="2 libraries good for software rendering:&#xD;&#xA;&#xD;&#xA; 1. SDL (C/C++) or SDL.NET, since they are built for *OLD* hardware and can optionally use OpenGL, if you want to upgrade your hardware later. SDL's totally cross-platform for desktop systems.&#xD;&#xA; 2. Allegro is another old-school library good for pushing pixels individually without the need for special graphics hardware.&#xD;&#xA;&#xD;&#xA;I fing Allegro more powerful from a pixel pushing standpoint, but I do not think it sees the same level of activity that SDL does, and while SDL is kept up to date by its author, I think this is much less the case with Allegro." />
  <row Id="35802" PostHistoryTypeId="25" PostId="15711" RevisionGUID="4f67df9d-ccd2-4636-b2c9-4ccefbfe708a" CreationDate="2011-08-08T18:36:46.813" Comment="http://twitter.com/#!/StackGameDev/status/100636587037175809" />
  <row Id="35803" PostHistoryTypeId="2" PostId="15720" RevisionGUID="8384fcd4-02a5-4391-ba2f-65554306608d" CreationDate="2011-08-08T19:16:57.670" UserId="9129" Text="I'm writting a code in OpenGL and using two computers - an old and a new one.&#xD;&#xA;&#xD;&#xA;On the old computer (which I use for debugging/creating implementation for the old GL) I have GeForce 5500 FX. Before windows reinstall on it, I had NVIDIA drivers with OpenGL 1.5. And **everything worked perfectly**. Games made quite good FPS, even with dozens or hundreds sprites.&#xD;&#xA;&#xD;&#xA;However, after XP reinstall, I installed the drivers provided with my video card but it seems there's no OpenGL at all (mysterious 'GDI Generic' renderer). So I tried to download the newest NVidia drivers. **After their installation** I saw there's **OpenGL 2.3** but when I runned my app it worked with **extremely low FPS** (about 0.25, I mean I had to wait four seconds for any app reaction) with only **one sprite**. And as I loaded smaller images, the FPS relatively increased, but on the new computer it's always (no matter how big and how many sprites) speed, so it must be the perfomance problem. Without any sprites, it seemed it worked normal, but game without graphics doesn't make any sense.&#xD;&#xA;&#xD;&#xA;That's why I downloaded the oldest drivers for NVIDIA GeForce 5500 FX I found on the Nvidia site. But they're still providing OpenGL &gt; 2.0 (2.1 exactly). The problem's the same.&#xD;&#xA;&#xD;&#xA;I also tried to change all the properties of OpenGL to increase performance but it didn't help too.&#xD;&#xA;&#xD;&#xA;So what can I do? **I'd like to find drivers with OpenGL 1.5** but it seems they're not on the NVIDIA site and most people say it's the best to download they from there." />
  <row Id="35804" PostHistoryTypeId="1" PostId="15720" RevisionGUID="8384fcd4-02a5-4391-ba2f-65554306608d" CreationDate="2011-08-08T19:16:57.670" UserId="9129" Text="Why OpenGL provided with latest GeForce drivers is so extremely slow?" />
  <row Id="35805" PostHistoryTypeId="3" PostId="15720" RevisionGUID="8384fcd4-02a5-4391-ba2f-65554306608d" CreationDate="2011-08-08T19:16:57.670" UserId="9129" Text="&lt;opengl&gt;&lt;performance&gt;&lt;nvidia&gt;" />
  <row Id="35806" PostHistoryTypeId="5" PostId="15191" RevisionGUID="d4958e40-fb17-47fc-b221-0041bea1968a" CreationDate="2011-08-08T20:06:02.593" UserId="1929" Comment="deleted 38 characters in body" Text="Is there a well-known way (or perhaps reusable bit of code) for pixel-perfect collision detection in XNA?&#xD;&#xA;&#xD;&#xA;I assume this would also use polygons (boxes/triangles/circles) for a first-pass, quick-test for collisions, and if that test indicated a collision, it would then search for a per-pixel collision.&#xD;&#xA;&#xD;&#xA;This can be complicated, because we have to account for scale, rotation, and transparency.&#xD;&#xA;&#xD;&#xA;**WARNING:** If you're using the sample code from the link from the answer below, be aware that **the scaling of the matrix is commented out for good reason.** You don't need to uncomment it out to get scaling to work." />
  <row Id="35809" PostHistoryTypeId="25" PostId="15710" RevisionGUID="532e67d3-b705-4730-91bf-fb5a01965d07" CreationDate="2011-08-08T21:36:47.333" Comment="http://twitter.com/#!/StackGameDev/status/100681885780414464" />
  <row Id="35810" PostHistoryTypeId="2" PostId="15722" RevisionGUID="5730b2fe-1939-472a-a7cf-2f1c4f0f5c98" CreationDate="2011-08-08T21:53:47.020" UserId="5957" Text="Check out paged/virtualized texturing system such as MegaTexture. These could be used to replace decals by drawing into the texture pages as they get paged in.&#xD;&#xA;&#xD;&#xA;http://en.wikipedia.org/wiki/MegaTexture" />
  <row Id="35811" PostHistoryTypeId="2" PostId="15723" RevisionGUID="38d23603-259b-4049-9f27-15be80f0950a" CreationDate="2011-08-08T22:05:44.133" UserId="1323" Text="[Wikipedia about Perlin noise](http://en.wikipedia.org/wiki/Perlin_noise):&#xD;&#xA;&#xD;&#xA;&gt;  The function has a pseudo-random appearance, yet all of its visual details are the same size (see image).&#xD;&#xA;&#xD;&#xA;Landscapes have much more varying detail size than Perlin noise, wich is why a single 2D noise used as a heightmap looks unrealistically smooth. You can add additional layers of noise to improve this; a layer with low noise scale also should have a low weight on the overall result height. You can use irregular fractions for the scale to avoid repetitions.&#xD;&#xA;&#xD;&#xA;World Machine seems to have a lot of additional features that don't seem to directly rely on only noise, like the valleys perpendicular to the mountains, that may be difficult or impossible to replicate this way.  &#xD;&#xA;Perlin noise is also relatively smooth, no matter how many layers you add onto each other, so it can't produce a mountain ridge without running an additional function on the output." />
  <row Id="35812" PostHistoryTypeId="4" PostId="15710" RevisionGUID="69e32ee4-73ee-438b-a63e-cc2445b7fe08" CreationDate="2011-08-08T22:15:54.430" UserId="2061" Comment="Clarified to avoid confusion" Text="Linux alternative to XNA" />
  <row Id="35813" PostHistoryTypeId="24" PostId="15710" RevisionGUID="69e32ee4-73ee-438b-a63e-cc2445b7fe08" CreationDate="2011-08-08T22:15:54.430" Comment="Proposed by 2061 approved by 14 edit id of 607" />
  <row Id="35814" PostHistoryTypeId="17" PostId="15724" RevisionGUID="0251ad88-41d0-4a0e-aa2f-905e48733448" CreationDate="2011-08-08T22:21:35.633" UserId="-1" Comment="from http://superuser.com/questions/320570/why-is-opengl-provided-with-latest-geforce-drivers-so-extremely-slow" Text="" />
  <row Id="35815" PostHistoryTypeId="17" PostId="15725" RevisionGUID="2365ffc6-0f6b-4029-a2a2-a58c2abf36f4" CreationDate="2011-08-08T22:21:35.633" UserId="-1" Comment="from http://superuser.com/questions/320570/why-is-opengl-provided-with-latest-geforce-drivers-so-extremely-slow" Text="" />
  <row Id="35816" PostHistoryTypeId="17" PostId="15726" RevisionGUID="8ad0ea7e-dd56-4344-b7b7-cf0df4e3c8f6" CreationDate="2011-08-08T22:21:35.633" UserId="-1" Comment="from http://superuser.com/questions/320570/why-is-opengl-provided-with-latest-geforce-drivers-so-extremely-slow" Text="" />
  <row Id="35817" PostHistoryTypeId="2" PostId="15725" RevisionGUID="bd01ea44-23e8-446e-b46e-fad218d6d3a7" CreationDate="2011-08-08T20:05:19.753" UserId="382" Text="It sounds like the 2nd machine is doing software rendering - hence the slow frame rate.&#xD;&#xA;&#xD;&#xA;I'd check that the new version of OpenGL is detecting the card properly. It could be that it thinks that it doesn't support OpenGL fully - or at least the bits you are using - hence the fall back to software.&#xD;&#xA;&#xD;&#xA;Do other applications that use OpenGL work OK?&#xD;&#xA;&#xD;&#xA;If it's just your program it could be the way you are initialising OpenGL. I'd post a question on Stack Overflow - with the code." />
  <row Id="35818" PostHistoryTypeId="2" PostId="15726" RevisionGUID="ef50bf38-1488-4f8f-a4e5-00a36e29d60b" CreationDate="2011-08-08T20:06:13.683" UserDisplayName="Mokubai" Text="Nvidia have an entire archive of all their older driver versions that you can find at their [Windows XP/2000 Driver Archive](http://www.nvidia.com/object/winxp-2k_archive.html)&#xD;&#xA;&#xD;&#xA;Specifically [this version (71.84)](http://www.nvidia.com/object/winxp_2k_71.84.html) Claims to have OpenGL v1.5 so if you want to give it a shot with an older version to see if that truly is the problem then there is nothing actually stopping you." />
  <row Id="35819" PostHistoryTypeId="2" PostId="15724" RevisionGUID="d0c363ac-3f4a-412d-bee8-c00d004b2603" CreationDate="2011-08-08T19:35:22.773" UserDisplayName="somnock" Text="I'm writting a code in OpenGL and using two computers - an old and a new one.&#xD;&#xA;&#xD;&#xA;On the old computer (which I use for debugging/creating implementation for the old GL) I have GeForce 5500 FX. Before windows reinstall on it, I had NVIDIA drivers with OpenGL 1.5. And everything worked perfectly. Games made quite good FPS, even with dozens or hundreds sprites.&#xD;&#xA;&#xD;&#xA;However, after XP reinstall, I installed the drivers provided with my video card but it seems there's no OpenGL at all (mysterious 'GDI Generic' renderer). So I tried to download the newest NVidia drivers. After their installation I saw there's **OpenGL 2.3** but when I runned my app it worked with **extremely low FPS** (about 0.25, I mean I had to wait four seconds for any app reaction) with only one sprite. And as I loaded smaller images, the FPS relatively increased, but on the new computer it's always (no matter how big and how many sprites) speed, so it must be the perfomance problem. Without any sprites, it seemed it worked normal, but game without graphics doesn't make any sense.&#xD;&#xA;&#xD;&#xA;That's why I downloaded the oldest drivers for NVIDIA GeForce 5500 FX I found on the Nvidia site. But they're still providing OpenGL &gt; 2.0 (2.1 exactly). The problem's the same.&#xD;&#xA;&#xD;&#xA;I also tried to change all the properties of OpenGL to increase performance but it didn't help too.&#xD;&#xA;&#xD;&#xA;So what can I do? **I'd like to find drivers with OpenGL 1.5** but it seems they're not on the NVIDIA site and most people say it's the best to download they from there." />
  <row Id="35820" PostHistoryTypeId="1" PostId="15724" RevisionGUID="d0c363ac-3f4a-412d-bee8-c00d004b2603" CreationDate="2011-08-08T19:35:22.773" UserDisplayName="somnock" Text="Why is OpenGL provided with latest GeForce drivers so extremely slow?" />
  <row Id="35821" PostHistoryTypeId="3" PostId="15724" RevisionGUID="d0c363ac-3f4a-412d-bee8-c00d004b2603" CreationDate="2011-08-08T19:35:22.773" UserDisplayName="somnock" Text="&lt;opengl&gt;" />
  <row Id="35822" PostHistoryTypeId="18" PostId="15720" RevisionGUID="a8077ef2-3f61-452e-b533-798fc36d0c1a" CreationDate="2011-08-08T22:23:04.123" UserId="14" Comment="to http://gamedev.stackexchange.com/questions/15724/why-is-opengl-provided-with-latest-geforce-drivers-so-extremely-slow" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="35823" PostHistoryTypeId="18" PostId="15724" RevisionGUID="a8077ef2-3f61-452e-b533-798fc36d0c1a" CreationDate="2011-08-08T22:23:04.123" UserId="14" Comment="from http://gamedev.stackexchange.com/questions/15720/why-opengl-provided-with-latest-geforce-drivers-is-so-extremely-slow" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="35824" PostHistoryTypeId="14" PostId="15720" RevisionGUID="1b738be2-07f5-47b9-ad21-cf15da2f094c" CreationDate="2011-08-08T22:23:05.293" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="35825" PostHistoryTypeId="2" PostId="15727" RevisionGUID="7658d68c-6923-4983-b764-75058149b9fb" CreationDate="2011-08-08T22:40:01.493" UserId="3184" Text="We all read job vacancies via the internet like GitHub jobs or StackExchange Careers 2.0 for example. You know, web apps development, iOS/Android jobs and many other things.  &#xD;&#xA;We even read about jobs ads in Google, Apple or any other big boy.&#xD;&#xA;&#xD;&#xA;Why we don't read about &quot;Games Developer&quot; vacancies? Is the demanding for games developers is so low? or games developers are really rare?  &#xD;&#xA;&#xD;&#xA;How companies like EA, Konami or Activision are getting their developers?  &#xD;&#xA;&#xD;&#xA;How to overcome this: You can't work for us because you don't have experience in developing games.  How I'm supposed to get experience if I'm not able to work in the field?" />
  <row Id="35826" PostHistoryTypeId="1" PostId="15727" RevisionGUID="7658d68c-6923-4983-b764-75058149b9fb" CreationDate="2011-08-08T22:40:01.493" UserId="3184" Text="Games development, a super elite club?" />
  <row Id="35827" PostHistoryTypeId="3" PostId="15727" RevisionGUID="7658d68c-6923-4983-b764-75058149b9fb" CreationDate="2011-08-08T22:40:01.493" UserId="3184" Text="&lt;career&gt;&lt;jobs&gt;" />
  <row Id="35828" PostHistoryTypeId="2" PostId="15728" RevisionGUID="a5583f42-c0bf-411b-bfed-fd1f19057a5e" CreationDate="2011-08-08T22:41:46.420" UserId="9134" Text="The problem is most likely that you're using non-power-of-two textures.  The drivers for the GeForce FX series support these texture sizes, but will force your program to run in software mode.  If this is the case then you'll need to use power-of-2 texture sizes (2, 4, 8, 16, 32, 64, etc) instead." />
  <row Id="35829" PostHistoryTypeId="2" PostId="15729" RevisionGUID="cf0f1723-8be6-40b2-967a-7e3e3cb5de11" CreationDate="2011-08-08T22:49:17.130" UserId="3184" Text="These days, I'm focusing on games development on the iOS.  &#xD;&#xA;C++ is the lingua franca for games development but seriously, I prefer to code in C programming language, not in C++.  &#xD;&#xA;&#xD;&#xA;So for iOS games development, are C and Objective-C sufficient for creating games?" />
  <row Id="35830" PostHistoryTypeId="1" PostId="15729" RevisionGUID="cf0f1723-8be6-40b2-967a-7e3e3cb5de11" CreationDate="2011-08-08T22:49:17.130" UserId="3184" Text="Are C and Objective-C sufficient for creating games on the iOS?" />
  <row Id="35831" PostHistoryTypeId="3" PostId="15729" RevisionGUID="cf0f1723-8be6-40b2-967a-7e3e3cb5de11" CreationDate="2011-08-08T22:49:17.130" UserId="3184" Text="&lt;c++&gt;&lt;programming&gt;&lt;c&gt;&lt;objective-c&gt;&lt;languages&gt;" />
  <row Id="35833" PostHistoryTypeId="2" PostId="15731" RevisionGUID="d94a25c6-4e9a-4f8f-86e8-ee4868d890f2" CreationDate="2011-08-08T23:00:36.570" UserId="4235" Text="I've been using SDL 1.2.14 for awhile without using many of the features from newer OpenGL versions. I'm now interested working only with the 3.3 API (not using the deprecated functions, etc... that's the latest my graphics card supports), but I'm having trouble getting set up. &#xD;&#xA;&#xD;&#xA;Here's some information about my development environment:&#xD;&#xA;&#xD;&#xA;- Windows 7 64 bit&#xD;&#xA;- Eclipse Helios CDT&#xD;&#xA;- Mingw Toolchain&#xD;&#xA;- C++&#xD;&#xA;&#xD;&#xA;I've tried building SDL 1.3 and following [this tutorial][1]. This ended up being a pretty big pain and I gave up amid a stream of compile errors - I'd prefer to not go this route if possible. I know also that GLEW/GLEE or some do-it-yourself extension function pointers will be required.&#xD;&#xA;&#xD;&#xA;So basically: is it possible? If so, what is the best/easiest way to make it happen? Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL_%28C_/_SDL%29" />
  <row Id="35834" PostHistoryTypeId="1" PostId="15731" RevisionGUID="d94a25c6-4e9a-4f8f-86e8-ee4868d890f2" CreationDate="2011-08-08T23:00:36.570" UserId="4235" Text="Setting up OpenGL 3.3 in SDL 1.2" />
  <row Id="35835" PostHistoryTypeId="3" PostId="15731" RevisionGUID="d94a25c6-4e9a-4f8f-86e8-ee4868d890f2" CreationDate="2011-08-08T23:00:36.570" UserId="4235" Text="&lt;c++&gt;&lt;opengl&gt;&lt;sdl&gt;&lt;mingw&gt;&lt;eclipse&gt;" />
  <row Id="35836" PostHistoryTypeId="2" PostId="15732" RevisionGUID="e0174ed1-305c-4255-b09c-b1a87419aede" CreationDate="2011-08-08T23:02:00.337" UserId="3561" Text="Yes. There are numerous iOS games made with only these languages. C++ is optional if you absolutely need it." />
  <row Id="35837" PostHistoryTypeId="2" PostId="15733" RevisionGUID="68c04e0a-21e7-48f9-bbc4-0e7c0fb94de8" CreationDate="2011-08-08T23:17:38.247" UserId="14" Text="The first question is where are you looking? If you are interested in a particular studio, outside of industry sites the best place to find jobs for the studios is on their own site.&#xD;&#xA;&#xD;&#xA;In my experience (from just looking around, speaking to people) the industry has no shortage of applicants. Because of that, there is no real need to expend extra resources paying a premium to get listed on various jobs sites. People interested in their companies will already be checking their website.&#xD;&#xA;&#xD;&#xA;Finally, the experience issue. The positions that you see advertised on these sites are generally *not* for entry-level positions.The larger game development companies get tons of entry-level resumes sent to them (from students, people who just want to cross over, etc) as such, there is little need to actually advertise that they are looking for entry level people (generally, among software companies it's understood that fresh blood is needed, and I haven't met a recruiter who wasn't okay with holding onto my resume yet). But what they have trouble with (and what a lot of software shops have trouble with) is finding the people with the talent and experience they need to get the job done.&#xD;&#xA;&#xD;&#xA;For more information on applying for a job in the games industry, I turn to Sloperama: http://www.sloperama.com/advice/jobapp.htm" />
  <row Id="35838" PostHistoryTypeId="5" PostId="15733" RevisionGUID="371b51a0-fcc7-49dc-b423-3cc5a8e3d484" CreationDate="2011-08-08T23:24:46.380" UserId="14" Comment="Playing with the formating." Text="The first question is where are you looking? If you are interested in a particular studio, outside of industry sites the best place to find jobs for the studios is on their own site.&#xD;&#xA;&#xD;&#xA;In my experience (from just looking around, speaking to people) the industry has no shortage of applicants. Because of that, there is no real need to expend extra resources paying a premium to get listed on various jobs sites. People interested in their companies will already be checking their website.&#xD;&#xA;&#xD;&#xA;Finally, the experience issue. The positions that you see advertised on these sites are generally *not* for entry-level positions.&#xD;&#xA;&#xD;&#xA; - Larger game companies (like the ones you listed) get tons of entry level resumes sent to them from a variety of people. There is little financial incentive to advertise that they are looking for entry level people. &#xD;&#xA;  - *Also, I've yet to meet a recruiter that wasn't ok with having my resume on file. It's generally understood that comapnies need fresh blood.*&#xD;&#xA;&#xD;&#xA; - What isn't always known, is if they have any place to fit the higher experience people (at their right pay grades and all) so it's beneficial to advertise it. Also, these people are generally harder to find, and might be otherwise employed.&#xD;&#xA;  - *These people are less likely to shoot resume's into the dark.*&#xD;&#xA;&#xD;&#xA;Of course, making a cool demo never hurts.&#xD;&#xA;&#xD;&#xA;For more information on applying for a job in the games industry, I turn to Sloperama: http://www.sloperama.com/advice/jobapp.htm" />
  <row Id="35839" PostHistoryTypeId="2" PostId="15734" RevisionGUID="aee0b9af-d58a-4091-9a50-908c27ea733f" CreationDate="2011-08-08T23:38:44.260" UserId="7328" Text="the only real restriction you have while developing for iphone is the sdk apple released for iphone. other than that you will mainly use OpenGL and OpenAL which are both pure C code. in some cases you might want to use some c++ libraries (like box2d) but there are equivalents both in C and Obj-C. &#xD;&#xA;&#xD;&#xA;so every game you release for iphone should at least have some obj-c codes to load your application and to do some basic file read/write things, other than that you are free to use pure C, Obj-C or C++ or even a combination of those languages.&#xD;&#xA;&#xD;&#xA;also as jasconius said there are many games written and published using only Obj-C. there is even a opensource gameengine named [cocos2d-iphone](www.cocos2d-iphone.org) out there that powered many iOS games so far." />
  <row Id="35840" PostHistoryTypeId="2" PostId="15735" RevisionGUID="e65e7ead-201e-4bd0-9550-fb723cc0bb3d" CreationDate="2011-08-09T00:11:41.200" UserId="8993" Text="I am playing a game called **Starcraft II** that restricts me from running multiple instances. However, when I run a second instance [sandboxed in Sandboxie](http://www.sandboxie.com/), I can do so perfectly fine. What might account for this? How might I replicate this behaviour?&#xD;&#xA;&#xD;&#xA;I realise that this is a very vague question, but I'm not really sure how else to ask. How do games typically detect &amp; prevent multiple instances from running? I have heard that a CreateMutexW hook often does the trick, but even if this were the case here, I don't know what the the mutex that Starcraft would create is named.&#xD;&#xA;&#xD;&#xA;Any ideas? Has anyone had experience with this particular game?&#xD;&#xA;&#xD;&#xA;(also, please, no comments about how much this shows that I lack moral rectitude)" />
  <row Id="35841" PostHistoryTypeId="1" PostId="15735" RevisionGUID="e65e7ead-201e-4bd0-9550-fb723cc0bb3d" CreationDate="2011-08-09T00:11:41.200" UserId="8993" Text="Forcing Starcraft II to run multiple instances" />
  <row Id="35842" PostHistoryTypeId="3" PostId="15735" RevisionGUID="e65e7ead-201e-4bd0-9550-fb723cc0bb3d" CreationDate="2011-08-09T00:11:41.200" UserId="8993" Text="&lt;starcraft-2&gt;" />
  <row Id="35843" PostHistoryTypeId="25" PostId="15727" RevisionGUID="d5645350-cf55-4387-bafa-05bd93d3070b" CreationDate="2011-08-09T00:36:47.743" Comment="http://twitter.com/#!/StackGameDev/status/100727188218855424" />
  <row Id="35844" PostHistoryTypeId="2" PostId="15736" RevisionGUID="0c30a089-d0cb-4f17-b958-53f01d4714e9" CreationDate="2011-08-09T01:10:17.717" UserId="9021" Text="i want to use the b2MouseJoint in android java . i am new in android game development.i don't have idea how to use the mouse join in android java.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Jubin mehta" />
  <row Id="35845" PostHistoryTypeId="1" PostId="15736" RevisionGUID="0c30a089-d0cb-4f17-b958-53f01d4714e9" CreationDate="2011-08-09T01:10:17.717" UserId="9021" Text="how to use the mouse joint in android ?" />
  <row Id="35846" PostHistoryTypeId="3" PostId="15736" RevisionGUID="0c30a089-d0cb-4f17-b958-53f01d4714e9" CreationDate="2011-08-09T01:10:17.717" UserId="9021" Text="&lt;android&gt;&lt;cocos2d&gt;" />
  <row Id="35847" PostHistoryTypeId="5" PostId="15736" RevisionGUID="d748da96-3a3e-4ff0-b24f-f013032928b9" CreationDate="2011-08-09T01:19:05.303" UserId="962" Comment="deleted 30 characters in body; edited title" Text="i want to use the b2MouseJoint in android java . i am new in android game development.i don't have idea how to use the mouse join in android java." />
  <row Id="35848" PostHistoryTypeId="4" PostId="15736" RevisionGUID="d748da96-3a3e-4ff0-b24f-f013032928b9" CreationDate="2011-08-09T01:19:05.303" UserId="962" Comment="deleted 30 characters in body; edited title" Text="how to use the mouse joint in android?" />
  <row Id="35849" PostHistoryTypeId="2" PostId="15737" RevisionGUID="90b3e993-7f38-4061-a065-263d7ac1ac1b" CreationDate="2011-08-09T01:23:32.270" UserId="8578" Text="Your answer might lie in making additive multiple passes:&#xD;&#xA;&#xD;&#xA;Pass 1:&#xD;&#xA;Make a 2D array storing values from the perlin generator.  The bigger the array the more detail.&#xD;&#xA;&#xD;&#xA;Then scale this array to your maximum/minimum height values for terrain.&#xD;&#xA;&#xD;&#xA;Pass 2 through N:&#xD;&#xA;Offset values of array by further perlin generations, with each pass carrying a smaller weight.  This should allow for further detail, taking away from the 'smoothness' of a single pass.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;Now the world making suite you mentioned seems (at a glance) to support things like natural water formations/erosion over time.  These can be a bit more complicated to replicate simply, but the general idea is:&#xD;&#xA;&#xD;&#xA;Water can only lower/smooth out land, so in any place water must rest, find the deepest point, then create a quadratic gradient outwards (where higher polynomials represent further complexity, drop offs, that sort of thing).&#xD;&#xA;&#xD;&#xA;Flora and other plant life can easily be added using rules like: &#xD;&#xA;Plant A can only exist a certain distance from water, and only on a circular area with an average height differential between each point less than a certain amount.&#xD;&#xA;&#xD;&#xA;That should make for some nifty looking terrain on the cheap (processor wise).&#xD;&#xA;" />
  <row Id="35850" PostHistoryTypeId="2" PostId="15738" RevisionGUID="01490a4c-7e04-4d69-a21e-3af379bdb1e7" CreationDate="2011-08-09T01:46:26.707" UserId="2513" Text="&#xD;&#xA;No, not really.  If you are thinking of using a quadtree for terrain level-of-detail, the nodes you store will all usually possess the same data structure.&#xD;&#xA;&#xD;&#xA;In your example, that structure is a 33x33 submesh that the nodes will hold.  Depending on the level of the node, that 33x33 mesh will adapt (adaptive) to cover a wider area.  The larger node will fill a larger space, but it's submesh is still a 33x33 vertex patch.&#xD;&#xA;&#xD;&#xA;After the tree is built you can do your frustrum culling by going down the tree and discarding the nodes that don't intersect.&#xD;&#xA;&#xD;&#xA;One thing to keep in mind, is that you will very likely need to address the cracks that come up when a larger node draws next to a smaller node.  One easy way is to simply adjust (collapse) any unshared vertices between the meshes.&#xD;&#xA;&#xD;&#xA;As for you other question about the tree being replaced, yes.  Unless you want to get into data managing the tree, I suggest just making a stack and flush it out when the view moves sufficiently.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35851" PostHistoryTypeId="2" PostId="15739" RevisionGUID="6763c2ee-988c-4eec-9595-6136e8ad660b" CreationDate="2011-08-09T02:15:36.950" UserId="51" Text="You don't see game development positions on general programming job sites because good candidates don't come from there. With few exceptions (web/database guys, for one), game programming is such a different beast than the majority of programming jobs out there. And &quot;game programmer&quot; is one of those &quot;sexy&quot; titles that has a lot of casual people throwing their hat into the ring and not being good fits for it.  Your signal/noise ratio from the responses would be crap.  Not to mention, most [experienced] game programmers aren't looking at sites like that because they're not the kinds of jobs they're trained for or want to do.&#xD;&#xA;&#xD;&#xA;Even if a person you find on a general programming site is a smart guy and can pick up on the topics, their salary expectations are probably not in the ballpark of what most game programmers make.  Most people who have a cushy 100k/year programming job aren't going to take one with most likely longer hours and a steep pay cut.&#xD;&#xA;&#xD;&#xA;So most game companies put their high profile positions on their own site and on game specific job boards like gamasutra. From the applicant's perspective, there usually aren't that many game companies in any given city (with a few notable exceptions like L.A.), so for looking for a job if you're not in a position to move you can usually get the short list and apply directly.&#xD;&#xA;&#xD;&#xA;There are a few other places to get good people.  Job fairs at game educational places is one.  Booths at industry events (i.e. GDC) is another.  If you manage to go to GDC, it's amusing to see the huge line for &quot;students&quot; vs &quot;professionals&quot; for the larger, well known companies out there." />
  <row Id="35852" PostHistoryTypeId="2" PostId="15740" RevisionGUID="7a5a2b54-fe9f-4a2c-87f0-5905b6996059" CreationDate="2011-08-09T03:03:01.733" UserId="9033" Text="A simple method to reduce the likelihood that your cursor is the same color as your background is to sample the center pixel beneath your cursor, and invert that color.  You would draw your entire cursor with that color, or use it to apply a shading.&#xD;&#xA;&#xD;&#xA;Or sample say 5 pixels (if it's a cross hair you could sample the center, top, bottom, left, right pixel) and average them, then invert the average." />
  <row Id="35853" PostHistoryTypeId="25" PostId="15717" RevisionGUID="8c33bb3b-1a7f-4522-a99a-e8f0720abe7b" CreationDate="2011-08-09T03:36:47.813" Comment="http://twitter.com/#!/StackGameDev/status/100772486551044097" />
  <row Id="35854" PostHistoryTypeId="2" PostId="15741" RevisionGUID="1430cb88-015e-49b4-9bf2-b1bf57839bc0" CreationDate="2011-08-09T04:00:35.320" UserId="4584" Text="It appears that if a image is undersized for covering the model it's set to cover, it anti-aliases instead of stretches. How can I control this behavior?" />
  <row Id="35855" PostHistoryTypeId="1" PostId="15741" RevisionGUID="1430cb88-015e-49b4-9bf2-b1bf57839bc0" CreationDate="2011-08-09T04:00:35.320" UserId="4584" Text="Preventing XNA from anti-aliasing textures?" />
  <row Id="35856" PostHistoryTypeId="3" PostId="15741" RevisionGUID="1430cb88-015e-49b4-9bf2-b1bf57839bc0" CreationDate="2011-08-09T04:00:35.320" UserId="4584" Text="&lt;textures&gt;&lt;antialiasing&gt;" />
  <row Id="35857" PostHistoryTypeId="2" PostId="15742" RevisionGUID="74913fcc-c2fb-45f2-a6ef-98bbe6da4931" CreationDate="2011-08-09T04:14:08.250" UserId="222" Text="You should set the sampler state to Point:&#xD;&#xA;&#xD;&#xA;    graphicsDevice.SamplerStates[0] = SamplerState.PointClamp;" />
  <row Id="35858" PostHistoryTypeId="2" PostId="15743" RevisionGUID="7fc3bc77-ac5f-431f-9c4d-2bb7304f2d6a" CreationDate="2011-08-09T04:36:46.413" UserId="8240" Text="Only SDL version 1.3 provides support for creating an OpenGL 3.3 **core** context. So you should upgrade. And if you're having a problem upgrading, that's something you need to get worked out.&#xD;&#xA;&#xD;&#xA;However, if you want to use a 3.3 **[compatibility][1]** context, all you need is recent drivers. Well, that and 3.3-capable hardware (anything advertised as DX10. Except from Intel).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts" />
  <row Id="35859" PostHistoryTypeId="25" PostId="15724" RevisionGUID="032efba6-4f78-4e0c-bbb5-6dcea40045ac" CreationDate="2011-08-09T06:36:47.777" Comment="http://twitter.com/#!/StackGameDev/status/100817785663389696" />
  <row Id="35860" PostHistoryTypeId="5" PostId="15735" RevisionGUID="d051fd48-5a9c-4bea-8aa6-c53e412f1391" CreationDate="2011-08-09T07:02:03.503" UserId="20" Comment="changed title, minor formatting changes" Text="I am playing a game called **Starcraft II** that restricts me from running multiple instances. However, when I run a second instance [sandboxed in Sandboxie](http://www.sandboxie.com/), I can do so perfectly fine. What might account for this? How might I replicate this behaviour?&#xD;&#xA;&#xD;&#xA;I realise that this is a very vague question, but I'm not really sure how else to ask. How do games typically detect &amp; prevent multiple instances from running? I have heard that a `CreateMutexW` hook often does the trick, but even if this were the case here, I don't know what the the mutex that Starcraft would create is named." />
  <row Id="35861" PostHistoryTypeId="4" PostId="15735" RevisionGUID="d051fd48-5a9c-4bea-8aa6-c53e412f1391" CreationDate="2011-08-09T07:02:03.503" UserId="20" Comment="changed title, minor formatting changes" Text="How does a game like Starcraft 2 prevent me from running multiple instances of the game?" />
  <row Id="35862" PostHistoryTypeId="2" PostId="15744" RevisionGUID="f4b6b802-31d8-4243-a792-afabd5192a06" CreationDate="2011-08-09T07:21:01.760" UserId="9139" Text="Have you tried to use CS5.5 or Flash Builder 4.5 to take your existing game to mobile?&#xD;&#xA;&#xD;&#xA;http://blogs.adobe.com/flashplatform/2011/06/build-mobile-apps-for-android-devices-blackberry-playbook-iphone-and-ipad-today.html&#xD;&#xA;&#xD;&#xA;AIR 3.0, currently in beta, will also bring captive runtime (already available for iOS), where you can bundle the runtime with your app. The Flash Player 11 and AIR 3 betas are on Adobe Labs labs.adobe.com. If it doesn't work out for you, let us know why!&#xD;&#xA;&#xD;&#xA;Emmy Huang, Group Product Manager, Adobe Gaming Solutions" />
  <row Id="35863" PostHistoryTypeId="2" PostId="15745" RevisionGUID="997af464-6a07-4c96-9adf-736a72bc12b1" CreationDate="2011-08-09T07:39:09.663" UserId="1141" Text="Aside from Starcraft 2, the general answer to this is: Acquire (and lock, if the acquisition itself isn't already equivalent to locking) a specific resource from the operating system. Exit the game if the acquisition/locking fails. Example of such resources are:&#xD;&#xA;&#xD;&#xA;1. Specific TCP or UDP ports.&#xD;&#xA;2. Mutually exclusive locks (&quot;mutexes&quot;) or semaphores (those two are often related on OS level)&#xD;&#xA;3. Files (log files are often the most obvious choice)&#xD;&#xA;&#xD;&#xA;On the top-end, most pain-in-the-ass for the customer way, specialised hardware which (sometimes necessarily, like for some robotic control components) can only be used exclusively by a single thread can be used this way, too." />
  <row Id="35864" PostHistoryTypeId="2" PostId="15746" RevisionGUID="d37d2a8e-0ad4-44cf-8eb8-27b009495711" CreationDate="2011-08-09T07:52:20.083" UserId="2897" Text="&quot;Flat&quot; face is not a requirement for the decals at all. [Here is a visual explanation][1] of how you can project a decal geometrically onto a complicated object.&#xD;&#xA;&#xD;&#xA;Also there is that one [site which gets referenced quite often here][2], it has a DX 10 implementation of such decals, search for &quot;volume decals&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blog.wolfire.com/2009/06/how-to-project-decals/&#xD;&#xA;  [2]: http://www.humus.name/index.php?page=3D" />
  <row Id="35865" PostHistoryTypeId="2" PostId="15747" RevisionGUID="665d22c3-e961-47d6-a514-fba5cfa33035" CreationDate="2011-08-09T09:16:13.400" UserId="4546" Text="The default texture magnification filter seems to be bilinear filtering, which will interpolate linearly between texels if the texture needs to be blown up to cover the target. If the sample doesn't lie on a texel center, bilinear filtering takes the closest pixels horizontally and vertically and blends them together based on their distance to the sample point.&#xD;&#xA;&#xD;&#xA;If you want a _square pixel_ look you probably want the Point (or Nearest in other APIs) filter, which instead picks the closest texel to the sample coordinates and uses the value of that texel alone." />
  <row Id="35866" PostHistoryTypeId="6" PostId="15741" RevisionGUID="771c69e2-0f8a-4187-8bb4-ef97a8f0ae7f" CreationDate="2011-08-09T09:24:22.730" UserId="2188" Comment="edited tags" Text="&lt;xna&gt;&lt;textures&gt;&lt;antialiasing&gt;" />
  <row Id="35867" PostHistoryTypeId="25" PostId="15741" RevisionGUID="40d6ec75-ea58-48e9-835e-0d8de102cbd7" CreationDate="2011-08-09T09:36:47.373" Comment="http://twitter.com/#!/StackGameDev/status/100863083253215232" />
  <row Id="35868" PostHistoryTypeId="2" PostId="15748" RevisionGUID="5cf78615-6c4b-41a6-9902-abcae39b5cb2" CreationDate="2011-08-09T11:58:37.597" UserId="5473" Text="First, on optimisation...&#xD;&#xA;&#xD;&#xA;I'm not sure which mobile platforms you're targeting, but be aware that any floating point math you are doing may seriously adversely affect the ability of the mobile device to keep up. This brings me to my second point.&#xD;&#xA;&#xD;&#xA;Moreover, if you haven't started profiling your code is yet, you cannot know where the bottleneck lies. You cannot just assume you need a different library -- at this late stage, it is far better to assume your code (which you know does what it needs to in the way you want it to) simply has one or two simple failing points causing the bottleneck. It's like a good relationship really -- If you've got something good going already, don't discard it, put the effort in to fix it. You probably understand enough about the heuristics and so on to know how to work in the guts of it.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Next, assuming you have a real and valid concern about performance after profiling your code...&#xD;&#xA;&#xD;&#xA;Let's look at this from the top down. Any pathfinding algorithm makes use of a graph. A* does too -- it's graph is simply a grid of 4-connected graph nodes, each grid cell being a graph node. Given A*'s ability to process many, many individual cells, is an excellent and generally highly efficient algorithm. But when it comes to the crunch, A* still _has to process that many nodes_ of the graph. So how do we reduce this to a manageable level?&#xD;&#xA;&#xD;&#xA;The immediate answer that comes to mind is through spatial subdivision, AKA resolution reduction. Essentially what you want to do is to generalise regions of your graph; visually, this could be compared to dividing an image's height and width by 2 each while using a blending algorithm: each group of 4 pixels will be merged into 1, with that 1 being the result of the colours of those 4.&#xD;&#xA;&#xD;&#xA;The basic principle is this: When travelling to a city in another country, does one say, &quot;I'm going to 11 Hill Street, Yoursuburb, Yourcity, Yourstate, Yourcountry&quot;? No, one says &#xD;&#xA;&quot;I'm going to Yourcountry, and only when I get through immigration will I start navigating at a smaller level of detail: City, state, suburb, street etc.&quot; until one is then navigating on a house-by-house and then footstep-by-footstep basis (to whatever level of ultimate detail you want (in your case, your basic tiles). This effectively reduces the number of cells you need to process. This &#xD;&#xA;&#xD;&#xA;Spatial subdivision can be eg. a quadtree approach for subdividing 2D planar topographies (as you presently have), or something closer to a navigation mesh, where you greatly reduce the number of nodes but the connections are now arbitrary (more organic) rather than grid-aligned.&#xD;&#xA;&#xD;&#xA;PS. As a final note, consider any approach that make heavy use of precalculation to reduce runtime overheads. Spatial subdivision is just one of these, but if after profiling you see other opportunities for improving performance, precalculation is your friend. It is my trusty pocket knife in all such situations -- the time-for-space tradeoff." />
  <row Id="35869" PostHistoryTypeId="5" PostId="15748" RevisionGUID="9471e138-e7e6-4a0c-b774-b89afa8a9257" CreationDate="2011-08-09T12:04:00.363" UserId="5473" Comment="added 407 characters in body" Text="First, on general optimisation which may apply in your case...&#xD;&#xA;&#xD;&#xA;I'm not sure which mobile platforms you're targeting, but be aware that any floating point math you are doing may have a seriously impact on the mobile device's ability to keep up. Considering that processors in modern mobiles are pretty powerful, it is a little suprising that you're having issues with A*, however this obviously depends very much on what you are trying to achieve. This brings me to my second point.&#xD;&#xA;&#xD;&#xA;Moreover, if you haven't started profiling your code is yet, you cannot know where the bottleneck lies. You cannot just assume you need a different library -- at this late stage, it is far better to assume your code (which you know does what it needs to in the way you want it to) simply has one or two simple failing points causing the bottleneck. It's like a good relationship really -- If you've got something good going already, don't discard it, put the effort in to fix it. You probably understand enough about the heuristics and so on to know how to work in the guts of it.&#xD;&#xA;&#xD;&#xA;Lastly, balancing your A* heuristic value appropriately is critical to achieving optimal performance -- I take it you are already aware of this as it is one of the fundamentals for this algorithm.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Next, assuming you have a real and valid concern about performance after profiling your code, here is an overarching approach to improving pathfinding performance...&#xD;&#xA;&#xD;&#xA;Let's look at this from the top down. Any pathfinding algorithm makes use of a graph. A* does too -- it's graph is simply a grid of cells, each cell being a 4-connected graph node. Given A*'s ability to process many, many individual cells, is an excellent and generally highly efficient algorithm. But when it comes to the crunch, A* still _has to process that many nodes_ of the graph. So how do we reduce this count?&#xD;&#xA;&#xD;&#xA;The immediate answer that comes to mind is spatial subdivision AKA resolution reduction. Essentially what you want to do is to generalise regions of your graph; visually, this could be compared to dividing an image's height and width by 2 each while using a blending algorithm: each group of 4 pixels will be merged into 1, with that 1 being the result of the colours of those 4.&#xD;&#xA;&#xD;&#xA;The basic principle is this: When travelling to a city in another country, does one say, &quot;I'm going to 11 Hill Street, Yoursuburb, Yourcity, Yourstate, Yourcountry&quot;? No, one says &#xD;&#xA;&quot;I'm going to Yourcountry, and only when I get through immigration will I start navigating at a smaller level of detail: City, state, suburb, street etc.&quot; until one is then navigating on a house-by-house and then footstep-by-footstep basis (to whatever level of ultimate detail you want (in your case, your basic tiles). This effectively reduces the number of cells you need to process. This &#xD;&#xA;&#xD;&#xA;Spatial subdivision can be eg. a quadtree approach for subdividing 2D planar topographies (as you presently have), or something closer to a navigation mesh, where you greatly reduce the number of nodes but the connections are now arbitrary (more organic) rather than grid-aligned.&#xD;&#xA;&#xD;&#xA;PS. As a final note, consider any approach that makes heavy use of precalculation to reduce runtime overheads. Spatial subdivision is just one of these, but if after profiling you see other opportunities for improving performance, precalculation is your friend. It is my trusty pocket knife in all such situations -- the time-for-space tradeoff." />
  <row Id="35870" PostHistoryTypeId="2" PostId="15749" RevisionGUID="a4e5a2af-11d9-438e-9a89-37a89a7ca7b4" CreationDate="2011-08-09T12:08:08.253" UserId="2897" Text="Colleague of mine was looking for a freelance 3d-artists lately, I've got to participate a bit. From what I gathered, there are a lot of nuances strictly defining the final price, but basically, it's all stands on time-per-feature basis. I will briefly describe a process from a layman's point of view, corrections are welcome. Also prices in this post are based on Russian market, I suspect prices in Europe or USA will be lower due to much bigger amount of good artists and resulting competition.&#xD;&#xA;&#xD;&#xA;**Base model**&#xD;&#xA;&#xD;&#xA;So lets say you have your concept art and now you need a low poly models based off it with textures and animations. Let's talk about model itself. Most time-consuming part is going to be an optimization of initial high-poly model to make it low-poly while preserving distinct features. (3d-artist will make a high-poly model from you concept art first, even if you need a low-poly), and then a lot of time will be spent by preparing the model for animation by optimizing vertex grid so it won't make weird bumps and spikes when animated. Lastly it's going to be unwrapped for future texturing, and that's it.&#xD;&#xA;&#xD;&#xA;If you stop here, you will receive a model ready for texturing and animating. Depending on complexity of the concept and skill of the 3d-artist, this will take 1-4 days of pure work time, and you best be sure to avoid changes like: &quot;I wanted this alien creature to have two legs, but now I changed my mind and it needs a third leg ASAP&quot;. Here in Russia an unskilled student can make you this kind of model for $40, and a professional would ask for about $250.&#xD;&#xA;&#xD;&#xA;**Texturing**&#xD;&#xA;&#xD;&#xA;Actual texturing and animating of prepared model is a different story. Price for texturing depends on the concept art. If it's of very high quality, and modeller is strictly required to keep the style of art intact, it's going to be expensive. All in all a professional guy would take another $150 for diffuse, normal and color specular textures. Don't economize here, quality textures can make bad models look good.&#xD;&#xA;&#xD;&#xA;So all in all, I would say that a price of a high-quality low-poly model is about $400-500 here.&#xD;&#xA;Just an example, see [this gal][1] ? She also has two another heads, 4 sets of armor and civilian clothes, it all took about 19 work days and a total cost was $2500.&#xD;&#xA;&#xD;&#xA;**Animations**&#xD;&#xA;&#xD;&#xA;You may notice that price is climbing high already, and we still have animations to cover. What can I say, it's beyond expensive. Unskilled animator may ask for about $80 per 1 minute of low-poly animation, but it will be crappy as hell. Professional guys will ask for about $50 per second (or ~$20 per second if you're fine with sloppy moments). &#xD;&#xA;&#xD;&#xA;Bad animations can kill the game pretty easily, so the usual solution here is for small developers to ask large companies like Akella to use their mo-cap equipment, they're often generous and charge about $330 per 15 minutes of mo-cap.&#xD;&#xA;&#xD;&#xA;Sorry for a long post,especially since you need to take it with a grain of salt: actual result is all about diplomacy, bargaining and business approach. Who knows, maybe you will even find a real team member who will do it all for free hoping for a large profit share.&#xD;&#xA;&#xD;&#xA;*Little footnotes:*&#xD;&#xA;&#xD;&#xA;  - You don't have a concept art? You're doing it wrong, you need to find a lead artist so your game won't look like a mix of jigsaw puzzles assembled together.&#xD;&#xA;  - If you're making a FPS, scale all prices by a magnitude of 4 :)&#xD;&#xA;  - If you're doing all this steps with a single modeller, then ask for a discount.&#xD;&#xA;  - If you're doing a lot of characters, scale all prices by a magnitude of 0.75 :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://lionwood-studios.com/portfolio/mmo/g21.jpg" />
  <row Id="35871" PostHistoryTypeId="5" PostId="15748" RevisionGUID="c5f62f60-e028-4c17-9eab-85b667c2cf66" CreationDate="2011-08-09T12:09:48.747" UserId="5473" Comment="added 407 characters in body" Text="**First, on simple optimisation issues which may apply:**&#xD;&#xA;&#xD;&#xA;I'm not sure which mobile platforms you're targeting, but be aware that any floating point math you are doing in a highly iterative algorithm like A* may have a major impact on the mobile device's ability to keep up. Considering that processors in modern mobiles are pretty powerful, it is a little suprising that you're having issues with A*, however this obviously depends very much on what you are trying to achieve. This brings me to my second point.&#xD;&#xA;&#xD;&#xA;If you haven't started profiling your code is yet, you cannot know where the bottleneck lies. You cannot just assume you need a different library -- at this late stage, it is far better to assume your code (which you know does what it needs to in the way you want it to) simply has one or two simple failing points causing the bottleneck. It's like a good relationship really -- If you've got something good going already, don't discard it, put the effort in to fix it. You probably understand enough about the heuristics and so on to know how to work in the guts of it.&#xD;&#xA;&#xD;&#xA;Lastly, balancing your A* heuristic value appropriately is critical to achieving optimal performance -- I take it you are already aware of this as it is one of the fundamentals for this algorithm.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Assuming there is no simple way to solve your problem after tackling the above, here is a bolt-on approach to improving pathfinding performance:**&#xD;&#xA;&#xD;&#xA;Let's look at this from the top down. Any pathfinding algorithm makes use of a graph. A* does too -- it's graph is simply a grid of cells, each cell being a 4-connected graph node. Given A*'s ability to process many, many individual cells, is an excellent and generally highly efficient algorithm. But when it comes to the crunch, A* still _has to process that many nodes_ of the graph. So how do we reduce this count?&#xD;&#xA;&#xD;&#xA;The immediate answer that comes to mind is spatial subdivision AKA resolution reduction. Essentially what you want to do is to generalise regions of your graph; visually, this could be compared to halving an image's width and height while using a pixel blending algorithm: each group of 4 pixels will be merged into 1, with that 1 being the result of the colours of those 4. In the case of pathfinding, your would for example merge the positions (and perhaps weights, depending on how you implement this) of your nodes.&#xD;&#xA;&#xD;&#xA;The basic principle is this: When travelling to a city in another country, does one say, &quot;I'm going to 11 Hill Street, Yoursuburb, Yourcity, Yourstate, Yourcountry&quot;? No, one says &#xD;&#xA;&quot;I'm going to Yourcountry, and only when I get through immigration will I start navigating at a smaller level of detail: City, then state, suburb, street etc.&quot; until finally one is navigating on a house-by-house and footstep-by-footstep basis (to whatever level of ultimate detail you want (in your case, your basic tiles). This effectively reduces the number of cells you need to process. This &#xD;&#xA;&#xD;&#xA;Spatial subdivision can be eg. a quadtree approach for subdividing 2D planar topographies (as you presently have), or something closer to a navigation mesh, where you greatly reduce the number of nodes but the connections are now arbitrary (more organic) rather than grid-aligned.&#xD;&#xA;&#xD;&#xA;PS. As a final note, consider any approach that makes heavy use of precalculation to reduce runtime overheads. Spatial subdivision is just one of these, but if after profiling you see other opportunities for improving performance, precalculation is your friend. It is my trusty pocket knife in all such situations -- the time-for-space tradeoff." />
  <row Id="35872" PostHistoryTypeId="5" PostId="15749" RevisionGUID="4e43777c-bf1a-4e90-a595-3796858e2fc4" CreationDate="2011-08-09T12:15:16.077" UserId="2897" Comment="added 157 characters in body" Text="Colleague of mine was looking for a freelance 3d-artists lately, I've got to participate a bit. From what I gathered, there are a lot of nuances strictly defining the final price, but basically, it's all stands on time-per-feature basis. I will briefly describe a process from a layman's point of view, corrections are welcome. Also prices in this post are based on Russian market, I suspect prices in Europe or USA will be lower due to much bigger amount of good artists and resulting competition.&#xD;&#xA;&#xD;&#xA;**Base model**&#xD;&#xA;&#xD;&#xA;So lets say you have your concept art and now you need a low poly models based off it with textures and animations. Let's talk about model itself. Most time-consuming part is going to be an optimization of initial high-poly model to make it low-poly while preserving distinct features. (3d-artist will make a high-poly model from you concept art first, even if you need a low-poly), and then a lot of time will be spent by preparing the model for animation by optimizing vertex grid so it won't make weird bumps and spikes when animated. Lastly it's going to be unwrapped for future texturing, and that's it.&#xD;&#xA;&#xD;&#xA;If you stop here, you will receive a model ready for texturing and animating. Depending on complexity of the concept and skill of the 3d-artist, this will take 1-4 days of pure work time, and you best be sure to avoid changes like: &quot;I wanted this alien creature to have two legs, but now I changed my mind and it needs a third leg ASAP&quot;. Here in Russia an unskilled student can make you this kind of model for $40, and a professional would ask for about $250.&#xD;&#xA;&#xD;&#xA;**Texturing**&#xD;&#xA;&#xD;&#xA;Actual texturing and animating of prepared model is a different story. Price for texturing depends on the concept art. If it's of very high quality, and modeller is strictly required to keep the style of art intact, it's going to be expensive. All in all a professional guy would take another $150 for diffuse, normal and color specular textures. Don't economize here, quality textures can make bad models look good.&#xD;&#xA;&#xD;&#xA;So all in all, I would say that a price of a high-quality low-poly model is about $400-500 here.&#xD;&#xA;Just an example, see [this gal][1] ? She also has two another heads, 4 sets of armor and civilian clothes, it all took about 19 work days and a total cost was $2500.&#xD;&#xA;&#xD;&#xA;**Animations**&#xD;&#xA;&#xD;&#xA;You may notice that price is climbing high already, and we still have animations to cover. What can I say, it's beyond expensive. Unskilled animator may ask for about $80 per 1 minute of low-poly animation, but it will be crappy as hell. Professional guys will ask for about $50 per second (or ~$20 per second if you're fine with sloppy moments). &#xD;&#xA;&#xD;&#xA;Bad animations can kill the game pretty easily, so the usual solution here is for small developers to ask large companies like Akella to use their mo-cap equipment, they're often generous and charge about $330 per 15 minutes of mo-cap.&#xD;&#xA;&#xD;&#xA;Sorry for a long post,especially since you need to take it with a grain of salt: actual result is all about diplomacy, bargaining and business approach. Who knows, maybe you will even find a real team member who will do it all for free hoping for a large profit share.&#xD;&#xA;&#xD;&#xA;*Little footnotes:*&#xD;&#xA;&#xD;&#xA;  - You don't have a concept art? You're doing it wrong, you need to find a lead artist so your game won't look like a mix of jigsaw puzzles assembled together.&#xD;&#xA;  - Buying models from &quot;art markets&quot; is much cheaper, but often unacceptable due to difference from art direction. If you can use them, do so by all means.&#xD;&#xA;  - If you're making a FPS, scale all prices by a magnitude of 4 :)&#xD;&#xA;  - If you're doing all this steps with a single modeller, then ask for a discount.&#xD;&#xA;  - If you're doing a lot of characters, scale all prices by a magnitude of 0.75 :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://lionwood-studios.com/portfolio/mmo/g21.jpg" />
  <row Id="35873" PostHistoryTypeId="5" PostId="15748" RevisionGUID="406229fd-d245-45c6-b19e-93049e2fcc77" CreationDate="2011-08-09T12:18:07.937" UserId="5473" Comment="links" Text="**Disclaimer**&#xD;&#xA;&#xD;&#xA;I am not a python programmer primarily; I looked briefly for other libs and came across [this][1].&#xD;&#xA;&#xD;&#xA;However, that is not the main thrust of my answer: instead it is to challenge whether you need to find another library at all, or whether you in fact just need to optimise what you have. Ultimately, I'm still trying to help you find a solution to your problem.&#xD;&#xA;&#xD;&#xA;**First, on simple optimisation issues which may apply:**&#xD;&#xA;&#xD;&#xA;I'm not sure which mobile platforms you're targeting, but be aware that any floating point math you are doing in a highly iterative algorithm like A* may have a major impact on the mobile device's ability to keep up. Considering that processors in modern mobiles are pretty powerful, it is a little suprising that you're having issues with A*, however this obviously depends very much on what you are trying to achieve. This brings me to my second point.&#xD;&#xA;&#xD;&#xA;If you haven't started profiling your code is yet, you cannot know where the bottleneck lies. You cannot just assume you need a different library -- at this late stage, it is far better to assume your code (which you know does what it needs to in the way you want it to) simply has one or two simple failing points causing the bottleneck. It's like a good relationship really -- If you've got something good going already, don't discard it, put the effort in to fix it. You probably understand enough about the heuristics and so on to know how to work in the guts of it.&#xD;&#xA;&#xD;&#xA;Lastly, balancing your A* heuristic value appropriately is critical to achieving optimal performance -- I take it you are already aware of this as it is one of the fundamentals for this algorithm.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Assuming there is no simple way to solve your problem after tackling the above, here is a bolt-on approach to improving pathfinding performance:**&#xD;&#xA;&#xD;&#xA;Let's look at this from the top down. Any pathfinding algorithm makes use of a graph. A* does too -- it's graph is simply a grid of cells, each cell being a 4-connected graph node. Given A*'s ability to process many, many individual cells, is an excellent and generally highly efficient algorithm. But when it comes to the crunch, A* still _has to process that many nodes_ of the graph. So how do we reduce this count?&#xD;&#xA;&#xD;&#xA;The immediate answer that comes to mind is spatial subdivision AKA resolution reduction. Essentially what you want to do is to generalise regions of your graph; visually, this could be compared to halving an image's width and height while using a pixel blending algorithm: each group of 4 pixels will be merged into 1, with that 1 being the result of the colours of those 4. In the case of pathfinding, your would for example merge the positions (and perhaps weights, depending on how you implement this) of your nodes.&#xD;&#xA;&#xD;&#xA;The basic principle is this: When travelling to a city in another country, does one say, &quot;I'm going to 11 Hill Street, Yoursuburb, Yourcity, Yourstate, Yourcountry&quot;? No, one says &#xD;&#xA;&quot;I'm going to Yourcountry, and only when I get through immigration will I start navigating at a smaller level of detail: City, then state, suburb, street etc.&quot; until finally one is navigating on a house-by-house and footstep-by-footstep basis (to whatever level of ultimate detail you want (in your case, your basic tiles). This effectively reduces the number of cells you need to process. This &#xD;&#xA;&#xD;&#xA;Spatial subdivision can be eg. a quadtree approach for subdividing 2D planar topographies (as you presently have), or something closer to a navigation mesh, where you greatly reduce the number of nodes but the connections are now arbitrary (more organic) rather than grid-aligned.&#xD;&#xA;&#xD;&#xA;PS. As a final note, consider any approach that makes heavy use of precalculation to reduce runtime overheads. Spatial subdivision is just one of these, but if after profiling you see other opportunities for improving performance, precalculation is your friend. It is my trusty pocket knife in all such situations -- the time-for-space tradeoff.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pygame.org/project-AStar-195-.html" />
  <row Id="35874" PostHistoryTypeId="2" PostId="15750" RevisionGUID="e452c67b-cbc5-4783-9cf0-8004297b476b" CreationDate="2011-08-09T12:30:50.467" UserId="9142" Text="OK i have decent amount of knowledge of C++. I want to make cool games for iPhone using unreal engine and I have access to UDN. But everything seems cluttered on UDN. I have downloaded source from there. It would be great if someone can provide information about How to get started and list of resources. Thanks!" />
  <row Id="35875" PostHistoryTypeId="1" PostId="15750" RevisionGUID="e452c67b-cbc5-4783-9cf0-8004297b476b" CreationDate="2011-08-09T12:30:50.467" UserId="9142" Text="How to get started with Unreal Engine for iPhone?" />
  <row Id="35876" PostHistoryTypeId="3" PostId="15750" RevisionGUID="e452c67b-cbc5-4783-9cf0-8004297b476b" CreationDate="2011-08-09T12:30:50.467" UserId="9142" Text="&lt;c++&gt;&lt;unreal&gt;" />
  <row Id="35877" PostHistoryTypeId="5" PostId="15712" RevisionGUID="0997bac6-e99a-4630-91c1-1c7802e87fea" CreationDate="2011-08-09T12:41:19.817" UserId="8852" Comment="added 301 characters in body" Text="Every update loop of your game, do this:&#xD;&#xA;&#xD;&#xA;    if (collidingBelow())&#xD;&#xA;        gravity = 0;&#xD;&#xA;    else gravity = [insert gravity value here];&#xD;&#xA;    &#xD;&#xA;    velocity.y += gravity;&#xD;&#xA;&#xD;&#xA;For instance, in a platformer, once you jump gravity would be enabled (collidingBelow tells you whether or not there is ground right below you) and once you hit the ground it would be disabled.&#xD;&#xA;&#xD;&#xA;Besides this, to implement jumps, then do this:&#xD;&#xA;&#xD;&#xA;    if (pressingJumpButton() &amp;&amp; collidingBelow())&#xD;&#xA;        velocity.y = [insert jump speed here]; // the jump speed should be negative&#xD;&#xA;&#xD;&#xA;And pretty obviously, in the update loop you also have to update your position:&#xD;&#xA;&#xD;&#xA;    position += velocity;" />
  <row Id="35878" PostHistoryTypeId="2" PostId="15751" RevisionGUID="29d42a00-1646-4034-b73d-374c76881c59" CreationDate="2011-08-09T12:57:47.973" UserId="7359" Text="I have bounding box in model space and I want to intersect it with ray. I have tried to transform ray like there:&lt;http://forums.create.msdn.com/forums/p/79838/483278.aspx&gt;. Rotating and scaling works good but transition not.&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;    Xbouding = new BoundingBox(new Vector3(50, 10, 10), new Vector3(120, -10, -10));&#xD;&#xA;&#xD;&#xA;    ray.Position = Vector3.Transform(ray.Position, Matrix.Invert(MathUtil.CreateWorldMatrix(Position, Rotation, Scale)));&#xD;&#xA;    ray.Direction= Vector3.Transform(ray.Direction, Matrix.Invert(MathUtil.CreateWorldMatrix(Position, Rotation, Scale)));&#xD;&#xA;    float? dist = ray.Intersects(Xbouding);&#xD;&#xA;&#xD;&#xA;And second question what means &quot;float?&quot; ? What's the differece between &quot;float&quot; and &quot;float?&quot; ?" />
  <row Id="35879" PostHistoryTypeId="1" PostId="15751" RevisionGUID="29d42a00-1646-4034-b73d-374c76881c59" CreationDate="2011-08-09T12:57:47.973" UserId="7359" Text="Problem with bounding box in model space and intercection with ray" />
  <row Id="35880" PostHistoryTypeId="3" PostId="15751" RevisionGUID="29d42a00-1646-4034-b73d-374c76881c59" CreationDate="2011-08-09T12:57:47.973" UserId="7359" Text="&lt;c#&gt;&lt;xna-4.0&gt;&lt;bounding-boxes&gt;" />
  <row Id="35881" PostHistoryTypeId="2" PostId="15752" RevisionGUID="8f3a7aa0-331b-44be-a6de-d098d5318f9e" CreationDate="2011-08-09T13:19:28.680" UserId="5473" Text="Translation should be simple. Take the Ray vector, and simply add it to a vector representing the amount you want to translate by (in each axis).&#xD;&#xA;&#xD;&#xA;So a vector (3.6, 7, 9) translated by (-4, 15, 12.2) results in a vector (-0.4, 22, 21.2).&#xD;&#xA;&#xD;&#xA;`float?` (or any typename appended with `?`) is what's called a **nullable type**. Without that `?` you would not be able to set the variable to null. Of course, nullable types incur an overhead -- if they didn't, all types would be nullable by default." />
  <row Id="35882" PostHistoryTypeId="5" PostId="15752" RevisionGUID="dba18fa8-54dd-4db6-b7dd-b1956cb43491" CreationDate="2011-08-09T13:24:44.973" UserId="5473" Comment="added 41 characters in body" Text="Translation should be simple. Take the Ray vector, and simply add it to a vector representing the amount you want to translate by (in each axis). I don't see you doing this in your code.&#xD;&#xA;&#xD;&#xA;So a vector (3.6, 7, 9) translated by (-4, 15, 12.2) results in a vector (-0.4, 22, 21.2).&#xD;&#xA;&#xD;&#xA;`float?` (or any typename appended with `?`) is what's called a **nullable type**. Without that `?` you would not be able to set the variable to null. Of course, nullable types incur an overhead -- if they didn't, all types would be nullable by default." />
  <row Id="35883" PostHistoryTypeId="2" PostId="15753" RevisionGUID="13291bdb-e474-47a4-a615-98925cacfe88" CreationDate="2011-08-09T13:29:39.520" UserId="6877" Text="Simplest starting point would be,&#xD;&#xA;&#xD;&#xA; * [Getting Started: iOS Development](http://udn.epicgames.com/Three/GettingStartediOSDevelopment.html)&#xD;&#xA;&#xD;&#xA; * [UDK Mobile documentation!](http://forums.epicgames.com/showthread.php?t=754537) a forum post you might miss.&#xD;&#xA;&#xD;&#xA; * A full game [Jazz Jackrabbit UDK iOS Tutorial](http://forums.epicgames.com/showthread.php?t=754555)&#xD;&#xA;&#xD;&#xA; * [Eat3d](http://eat3d.com/training_videos) has some good tutorial on different aspects of Unreal Editor. Like [Kismet](http://eat3d.com/kismet), [Cascade](http://eat3d.com/cascade) etc. Which is not biased towards mobile development, but you need to know them to get a hold onto UDK.&#xD;&#xA;&#xD;&#xA; * [3dBuzz](http://www.3dbuzz.com/vbforum/sv_videonav.php?fid=56797c0cd321ddc111e9059535cb3f24) has some tutorials of on Unreal Editor too.&#xD;&#xA;&#xD;&#xA;Basically you can start of with any tutorials you like(even non-Mobile). First your goal should be getting used to with development environment. If you want to deploy you game to iOS devices then, you just have to follow their constrain." />
  <row Id="35884" PostHistoryTypeId="5" PostId="15753" RevisionGUID="065a3072-1f26-4ed0-8846-6249c1311e08" CreationDate="2011-08-09T13:40:21.550" UserId="6877" Comment="deleted 34 characters in body" Text="You can start of with any tutorials you like(even non-Mobile). First your goal should be getting used to with development environment. If you want to deploy you game to iOS devices then, you just have to follow constrain of that device.&#xD;&#xA;&#xD;&#xA; * [Getting Started: iOS Development](http://udn.epicgames.com/Three/GettingStartediOSDevelopment.html)&#xD;&#xA;&#xD;&#xA; * [UDK Mobile documentation!](http://forums.epicgames.com/showthread.php?t=754537) a forum post you might miss.&#xD;&#xA;&#xD;&#xA; * A full game [Jazz Jackrabbit UDK iOS Tutorial](http://forums.epicgames.com/showthread.php?t=754555)&#xD;&#xA;&#xD;&#xA; * [Eat3d](http://eat3d.com/training_videos) has some good tutorial on different aspects of Unreal Editor. Like [Kismet](http://eat3d.com/kismet), [Cascade](http://eat3d.com/cascade) etc. Which is not biased towards mobile development, but you need to know them to get a hold onto UDK.&#xD;&#xA;&#xD;&#xA; * [3dBuzz](http://www.3dbuzz.com/vbforum/sv_videonav.php?fid=56797c0cd321ddc111e9059535cb3f24) has some tutorials of on Unreal Editor too.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="35885" PostHistoryTypeId="5" PostId="15751" RevisionGUID="b5f80212-d876-4e6c-b978-0c461325f1a6" CreationDate="2011-08-09T13:54:02.613" UserId="7359" Comment="added 231 characters in body" Text="I have bounding box in model space and I want to intersect it with ray. I have tried to transform ray like there:&lt;http://forums.create.msdn.com/forums/p/79838/483278.aspx&gt;. Rotating and scaling works good but transition not.&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;    Xbouding = new BoundingBox(new Vector3(50, 10, 10), new Vector3(120, -10, -10));&#xD;&#xA;&#xD;&#xA;    ray.Position = Vector3.Transform(ray.Position, Matrix.Invert(MathUtil.CreateWorldMatrix(Position, Rotation, Scale)));&#xD;&#xA;    ray.Direction= Vector3.Transform(ray.Direction, Matrix.Invert(MathUtil.CreateWorldMatrix(Position, Rotation, Scale)));&#xD;&#xA;    float? dist = ray.Intersects(Xbouding);&#xD;&#xA;&#xD;&#xA;I have this: &lt;http://t.zvb.cz/imperium/databaze/lidi/vodacek/Editor3.png&gt; and I want to know that ray from mouse intersects with boxes shown at image. Pick works fine unles when model is translated (rotating and scaling works).&#xD;&#xA;&#xD;&#xA;And second question what means &quot;float?&quot; ? What's the differece between &quot;float&quot; and &quot;float?&quot; ?" />
  <row Id="35886" PostHistoryTypeId="5" PostId="15708" RevisionGUID="f20d07fb-4727-4299-abcb-0ef6798e4827" CreationDate="2011-08-09T14:29:07.910" UserId="2188" Comment="fixed language" Text="How can I implement gravity? Not for a particular language, just pseudocode...&#xD;&#xA;&#xD;&#xA;Sorry for bad English, thanks in advance." />
  <row Id="35887" PostHistoryTypeId="4" PostId="15708" RevisionGUID="f20d07fb-4727-4299-abcb-0ef6798e4827" CreationDate="2011-08-09T14:29:07.910" UserId="2188" Comment="fixed language" Text="How can I implement gravity?" />
  <row Id="35888" PostHistoryTypeId="24" PostId="15708" RevisionGUID="f20d07fb-4727-4299-abcb-0ef6798e4827" CreationDate="2011-08-09T14:29:07.910" Comment="Proposed by 2188 approved by 14 edit id of 608" />
  <row Id="35889" PostHistoryTypeId="2" PostId="15754" RevisionGUID="b3ddcbb2-8cfc-4335-996a-43a28d9925c1" CreationDate="2011-08-09T14:48:52.217" UserId="8155" Text="Different sound effects are played differently across different speakers. For example, when I use my laptop speakers, sounds are notably softer and low pitch sounds often become inaudible unless I turn my volume up from 20% to 80%. Yet if I try to increase the sound's amplitude, when I plug in my Creative T10 speakers, everything sounds too loud.&#xD;&#xA;&#xD;&#xA;My problem is that I cannot increase sound uniformly across the board just to make the soft sounds more audible on a laptop, since as mentioned, everything sounds perfectly balanced on good speakers, it's just bad speakers (laptops) that ruin things.&#xD;&#xA;&#xD;&#xA;What options do I have to ensure the volume is consistent across different speaker configurations?&#xD;&#xA;&#xD;&#xA;PS: I'm using Flash, so there's no way to check hardware." />
  <row Id="35890" PostHistoryTypeId="1" PostId="15754" RevisionGUID="b3ddcbb2-8cfc-4335-996a-43a28d9925c1" CreationDate="2011-08-09T14:48:52.217" UserId="8155" Text="Tailoring sound volume for different speakers" />
  <row Id="35891" PostHistoryTypeId="3" PostId="15754" RevisionGUID="b3ddcbb2-8cfc-4335-996a-43a28d9925c1" CreationDate="2011-08-09T14:48:52.217" UserId="8155" Text="&lt;sound&gt;&lt;sound-effects&gt;" />
  <row Id="35892" PostHistoryTypeId="6" PostId="15754" RevisionGUID="5d12f473-fa35-4cc8-a8e9-daab2906d10e" CreationDate="2011-08-09T15:18:05.977" UserId="5060" Comment="Added Flash tag" Text="&lt;flash&gt;&lt;sound&gt;&lt;sound-effects&gt;" />
  <row Id="35893" PostHistoryTypeId="24" PostId="15754" RevisionGUID="5d12f473-fa35-4cc8-a8e9-daab2906d10e" CreationDate="2011-08-09T15:18:05.977" Comment="Proposed by 5060 approved by 1430 edit id of 609" />
  <row Id="35894" PostHistoryTypeId="2" PostId="15755" RevisionGUID="41b6d369-6b65-46f1-abd4-a40f7a63d64a" CreationDate="2011-08-09T15:30:04.440" UserId="6558" Text="The problem here seems to be that certain speakers just aren't very good, I'm not sure if there's a solution, since there's no way to check if the user has a set of $1,000 5.1 surround sound speakers plugged in, or is using headphones, or if they're using the generally crappy built in speakers on a laptop.  This is actually a problem for pretty much anyone, since even if you could check their hardware configuration, the user might have their hardware configuration set up wrong, or they might occasionally switch out their 5.1 speaker system for a pair of crappy headphones because it's 1am and they don't want people calling the police for noise complaints (or they don't want to wake their roommates/parents/etc).&#xD;&#xA;&#xD;&#xA;So, the best solution would be to make sure your sounds sound good on a decent pair of speakers, and they all have an equal volume between themselves.  Basically, no sound is ear drum breakingly loud, or whisper quiet when compared to the other sounds.  If your game has speech, then include subtitles so users can play with the sound turned low, or muted entirely.  Include volume controls so users can set the volume themselves (including a mute button because that 30 second music loop is starting to get annoying).&#xD;&#xA;&#xD;&#xA;In short, you can't control if someone has bad speakers, so don't worry too much about it.  If sound is vital to your game, then include a note at the start saying so.&#xD;&#xA;&#xD;&#xA;**Sidenote**: there's probably some fun stuff you can do in audio editing programs to fix some the issues with lower or higher pitched sounds, but all speakers have a maximum and minimum frequency range, and there's very little you can do to check that, even if you were making a native game (except for mobile development, where you know the range in advance)" />
  <row Id="35895" PostHistoryTypeId="25" PostId="15754" RevisionGUID="a7c65cb6-852d-4405-94f0-06e00a927de1" CreationDate="2011-08-09T15:36:48.113" Comment="http://twitter.com/#!/StackGameDev/status/100953681138171904" />
  <row Id="35896" PostHistoryTypeId="5" PostId="15748" RevisionGUID="cde20973-4efa-4ffc-aee0-4ed8ac26f14c" CreationDate="2011-08-09T16:00:54.907" UserId="5473" Comment="punctuation" Text="**Disclaimer**&#xD;&#xA;&#xD;&#xA;I am not a python programmer primarily; I looked briefly for other libs and came across [this][1].&#xD;&#xA;&#xD;&#xA;However, that is not the main thrust of my answer: instead it is to challenge whether you need to find another library at all, or whether you in fact just need to optimise what you have. Ultimately, I'm still trying to help you find a solution to your problem.&#xD;&#xA;&#xD;&#xA;**First, on simple optimisation issues which may apply:**&#xD;&#xA;&#xD;&#xA;I'm not sure which mobile platforms you're targeting, but be aware that any floating point math you are doing in a highly iterative algorithm like A* may have a major impact on the mobile device's ability to keep up. Considering that processors in modern mobiles are pretty powerful, it is a little suprising that you're having issues with A*, however this obviously depends very much on what you are trying to achieve. This brings me to my second point.&#xD;&#xA;&#xD;&#xA;If you haven't started profiling your code is yet, you cannot know where the bottleneck lies. You cannot just assume you need a different library -- at this late stage, it is far better to assume your code (which you know does what it needs to in the way you want it to) simply has one or two simple failing points causing the bottleneck. It's like a good relationship really -- If you've got something good going already, don't discard it, put the effort in to fix it. You probably understand enough about the heuristics and so on to know how to work in the guts of it.&#xD;&#xA;&#xD;&#xA;Lastly, balancing your A* heuristic value appropriately is critical to achieving optimal performance -- I take it you are already aware of this as it is one of the fundamentals for this algorithm.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Assuming there is no simple way to solve your problem after tackling the above, here is a bolt-on approach to improving pathfinding performance:**&#xD;&#xA;&#xD;&#xA;Let's look at this from the top down. Any pathfinding algorithm makes use of a graph. A* does too -- it's graph is simply a grid of cells, each cell being a 4-connected graph node. Given A*'s ability to process many, many individual cells, is an excellent and generally highly efficient algorithm. But when it comes to the crunch, A* still _has to process that many nodes_ of the graph. So how do we reduce this count?&#xD;&#xA;&#xD;&#xA;The immediate answer that comes to mind is spatial subdivision AKA resolution reduction. Essentially what you want to do is to generalise regions of your graph; visually, this could be compared to halving an image's width and height while using a pixel blending algorithm: each group of 4 pixels will be merged into 1, with that 1 being the result of the colours of those 4. In the case of pathfinding, your would for example merge the positions (and perhaps weights, depending on how you implement this) of your nodes.&#xD;&#xA;&#xD;&#xA;The basic principle is this: When travelling to a city in another country, does one say, &quot;I'm going to 11 Hill Street, Yoursuburb, Yourcity, Yourstate, Yourcountry&quot;? No, one says &#xD;&#xA;&quot;I'm going to Yourcountry, and only when I get through immigration will I start navigating at a smaller level of detail: City, then state, suburb, street etc.&quot; until finally one is navigating on a house-by-house and footstep-by-footstep basis (to whatever level of ultimate detail you want -- in your case, your basic tiles). This effectively reduces the number of cells you need to process.&#xD;&#xA;&#xD;&#xA;Spatial subdivision can be eg. a quadtree approach for subdividing 2D planar topographies (as you presently have), or something closer to a navigation mesh, where you greatly reduce the number of nodes but the connections are now arbitrary (more organic) rather than grid-aligned.&#xD;&#xA;&#xD;&#xA;PS. As a final note, consider any approach that makes heavy use of precalculation to reduce runtime overheads. Spatial subdivision is just one of these, but if after profiling you see other opportunities for improving performance, precalculation is your friend. It is my trusty pocket knife in all such situations -- the time-for-space tradeoff.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pygame.org/project-AStar-195-.html" />
  <row Id="35897" PostHistoryTypeId="2" PostId="15756" RevisionGUID="a6b78259-1961-4a1a-a3f1-4f6fa2ba84b3" CreationDate="2011-08-09T16:03:14.637" UserId="2061" Text="I recommend the mutex approach, but:&#xD;&#xA;&#xD;&#xA;Another method that is often used is simply checking if another process with the same name is running.&#xD;&#xA;&#xD;&#xA;The advantage is that it's ridiculously easy - you don't have to worry about file permissions or know what a mutex is.  The downside is, you'll get a false-positive if a *different* program called `starcraft2.exe` is running on the machine." />
  <row Id="35898" PostHistoryTypeId="2" PostId="15757" RevisionGUID="d4b3aa18-bcc7-48c9-b31e-383d88102d02" CreationDate="2011-08-09T16:16:39.923" UserId="3830" Text="Give the user a volume control and allow them to adjust it to their preferences." />
  <row Id="35899" PostHistoryTypeId="5" PostId="15757" RevisionGUID="231dff18-7f00-4768-9c2b-7fbb501d82eb" CreationDate="2011-08-09T16:40:43.480" UserId="3830" Comment="added 287 characters in body" Text="**Short answer**&#xD;&#xA;&#xD;&#xA;Give the user a volume control and allow them to adjust it to their preferences.&#xD;&#xA;&#xD;&#xA;**Long answer**&#xD;&#xA;&#xD;&#xA;There are so many variables out of your control in this problem that you won't be able to solve it.  It's not just the speakers, it's how they are setup, what the ambient noise is in the room, and even the user's hearing ability (or lack of).&#xD;&#xA;" />
  <row Id="35901" PostHistoryTypeId="16" PostId="15750" RevisionGUID="079a4480-0433-40bc-824c-61dc8825f71e" CreationDate="2011-08-09T18:16:17.747" UserId="51" />
  <row Id="35902" PostHistoryTypeId="16" PostId="15753" RevisionGUID="63d5624d-96d6-4d56-b51a-cc8a29c780d1" CreationDate="2011-08-09T18:16:17.747" UserId="51" />
  <row Id="35904" PostHistoryTypeId="2" PostId="15759" RevisionGUID="fd9d1cbf-c484-4d44-9c6a-467feea94937" CreationDate="2011-08-09T18:22:14.800" UserId="8781" Text="Check out the [Tiled Map Editor][1]. It's a fairly flexible and user-friendly program, and Slick natively supports its file format, which makes it very easy to use.&#xD;&#xA;&#xD;&#xA;You will want to have at least two layers in your map: one with the map graphics, and one collision layer (which won't be displayed in the game). When the player tries to move into a new tile, check the collision layer to see if a tile exists there, and if so, block the player from moving into the tile.&#xD;&#xA;&#xD;&#xA;If you want to use arbitrary terrain shapes, you'll have to use something more like skyuzo suggested. Tile maps are less flexible, but they can still allow for a large variety of levels, and they're easier to work with as a beginner.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mapeditor.org/" />
  <row Id="35905" PostHistoryTypeId="25" PostId="15751" RevisionGUID="00409d32-9ab1-4cc0-86c4-3c2e38a90e1e" CreationDate="2011-08-09T18:36:48.490" Comment="http://twitter.com/#!/StackGameDev/status/100998983232663552" />
  <row Id="35906" PostHistoryTypeId="2" PostId="15760" RevisionGUID="5e1bdaed-0e25-45e8-8a85-1b2ed0f27b7a" CreationDate="2011-08-09T19:30:46.250" UserId="9155" Text="I need sites for 2D textures and 2D sprites? I've been looking for them but I can't just find a really good one who has alot of choices and free downloads THANK YOU GUYS." />
  <row Id="35907" PostHistoryTypeId="1" PostId="15760" RevisionGUID="5e1bdaed-0e25-45e8-8a85-1b2ed0f27b7a" CreationDate="2011-08-09T19:30:46.250" UserId="9155" Text="2D Spirtes,Textures site" />
  <row Id="35908" PostHistoryTypeId="3" PostId="15760" RevisionGUID="5e1bdaed-0e25-45e8-8a85-1b2ed0f27b7a" CreationDate="2011-08-09T19:30:46.250" UserId="9155" Text="&lt;xna&gt;&lt;c#&gt;" />
  <row Id="35909" PostHistoryTypeId="5" PostId="15760" RevisionGUID="e3177e5c-5d43-46ed-bcc9-bc09bc11a3a3" CreationDate="2011-08-09T20:00:32.670" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I need sites for 2D textures and 2D sprites? I've been looking for them but I can't just find a really good one who has alot of choices and free downloads THANK YOU GUYS." />
  <row Id="35910" PostHistoryTypeId="10" PostId="15760" RevisionGUID="ebd8cb7f-8e47-420c-b0f7-9ff02ad0ec43" CreationDate="2011-08-09T20:00:31.890" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="35912" PostHistoryTypeId="25" PostId="5818" RevisionGUID="9f2c5631-8d3f-4f66-bb08-c10542470bae" CreationDate="2011-08-09T20:36:48.387" Comment="http://twitter.com/#!/StackGameDev/status/101029182431178752" />
  <row Id="35913" PostHistoryTypeId="5" PostId="15586" RevisionGUID="b5e0aa12-c091-4a97-bcd5-133389fabba7" CreationDate="2011-08-09T20:50:51.410" UserId="20" Comment="formatting for readability, minor spelling changes." Text="I made an attempt to answer your question on your original post, on Stack Overflow:&#xD;&#xA;&#xD;&#xA;If you are simply using the array to represent a game grid (so that the player can not be inbetween blocks other than for animation purposes), then it would be extremely efficient to simply check the space the player wants to move to (can only be 4 spaces, up, left, right, or down), see if they are passable terrain, and then allow the player to move there.&#xD;&#xA;&#xD;&#xA;This is how I am imagining your board to look, please let me know if this is incorrect:&#xD;&#xA;&#xD;&#xA;    W W W&#xD;&#xA;    O P O&#xD;&#xA;    W O W&#xD;&#xA;&#xD;&#xA;(A 3 by 3 visualization of the array; `W` represents a wall, `O` represents open space, and `P` represents the player)&#xD;&#xA;&#xD;&#xA;for this example I'm going to assume that the top-left corner is represented by `locationArray[0][0]` and the bottom-right is `locationArray[2][2]`. `X` is the first array parameter, `Y` is the second.&#xD;&#xA;&#xD;&#xA;The player is at `locationArray[1][1]`&#xD;&#xA;&#xD;&#xA;In the above case, if the player opted to move left, you would check the array location to his left, `locationArray[2][1]`, find it open, and allow the player to move.&#xD;&#xA;&#xD;&#xA;If the player opted to move up, `locationArray[1][0]`, the check would not allow the player to move, as it is impassable terrain (a wall)." />
  <row Id="35915" PostHistoryTypeId="5" PostId="15673" RevisionGUID="57ee741c-57ab-481a-ba39-5108df1f9c4d" CreationDate="2011-08-09T20:59:26.440" UserId="20" Comment="removed &quot;hi&quot; and &quot;thanks&quot;, minor spelling changes" Text="I'm making a little RPG multiplayer game where each player can travel long distances. Traveling from point A to B can take up to 10 minutes and – once initiated – is an automatic process. Now, I am not quite sure how to go about this on the server-side, the server has to be the one telling the clients that the traveling player has arrived or not.&#xD;&#xA;&#xD;&#xA;Do I have to run some sort of timer where I check every X seconds/milliseconds if all the traveling players have reached their destination in order to update the DB? (the characters are saved on the server to prevent cheating).&#xD;&#xA;&#xD;&#xA;The way I imagined it was simply to capture the timestamp at the start of travel, then use the distance to calculate what the time should be when the player will arrive, and then run some sort of timer that checks each traveling players &quot;start time&quot; , &quot;actual time&quot; and &quot;destination time&quot;, but since I have never done this before I'm not sure if this is a good way of doing it?" />
  <row Id="35916" PostHistoryTypeId="4" PostId="15694" RevisionGUID="1640792f-c36b-4054-88cf-1000d36bec59" CreationDate="2011-08-09T21:02:35.367" UserId="8771" Comment="made title a question" Text="Can I develop games for mobile platforms in C++?" />
  <row Id="35917" PostHistoryTypeId="24" PostId="15694" RevisionGUID="1640792f-c36b-4054-88cf-1000d36bec59" CreationDate="2011-08-09T21:02:35.367" Comment="Proposed by 8771 approved by 1430 edit id of 610" />
  <row Id="35918" PostHistoryTypeId="5" PostId="15727" RevisionGUID="70ec3374-5864-4d52-8f38-31d4048702b8" CreationDate="2011-08-09T21:14:12.103" UserId="8771" Comment="improved english" Text="We all read job vacancies via the internet like GitHub jobs or StackExchange Careers 2.0 for example. You know, web app development, iOS/Android jobs and many other things. We even read about jobs ads in Google, Apple or any other big company.&#xD;&#xA;&#xD;&#xA;Why don't we read about &quot;Game Developer&quot; vacancies? Is the demand for game developers so low? Or are game developers really rare?&#xD;&#xA;&#xD;&#xA;How are companies like EA, Konami or Activision are getting their developers?  &#xD;&#xA;&#xD;&#xA;How can I overcome this response to an application: &quot;You can't work for us because you don't have experience in developing games.&quot; How am I supposed to get experience if I'm not able to work in the field?" />
  <row Id="35919" PostHistoryTypeId="4" PostId="15727" RevisionGUID="70ec3374-5864-4d52-8f38-31d4048702b8" CreationDate="2011-08-09T21:14:12.103" UserId="8771" Comment="improved english" Text="Is game development a super elite club?" />
  <row Id="35920" PostHistoryTypeId="24" PostId="15727" RevisionGUID="70ec3374-5864-4d52-8f38-31d4048702b8" CreationDate="2011-08-09T21:14:12.103" Comment="Proposed by 8771 approved by 1430 edit id of 614" />
  <row Id="35921" PostHistoryTypeId="5" PostId="15751" RevisionGUID="832972cb-e0d0-4f21-9dba-d1109c3af797" CreationDate="2011-08-09T21:14:21.667" UserId="8771" Comment="english improvements" Text="I have a bounding box in model space and I want to intersect it with a ray. I have tried to transform the ray like [this](http://forums.create.msdn.com/forums/p/79838/483278.aspx). Rotating and scaling works well, but transition does not.&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;    Xbouding = new BoundingBox(new Vector3(50, 10, 10), new Vector3(120, -10, -10));&#xD;&#xA;&#xD;&#xA;    ray.Position = Vector3.Transform(ray.Position, Matrix.Invert(MathUtil.CreateWorldMatrix(Position, Rotation, Scale)));&#xD;&#xA;    ray.Direction= Vector3.Transform(ray.Direction, Matrix.Invert(MathUtil.CreateWorldMatrix(Position, Rotation, Scale)));&#xD;&#xA;    float? dist = ray.Intersects(Xbouding);&#xD;&#xA;&#xD;&#xA;I have this: &#xD;&#xA;![this is what I have][1] &#xD;&#xA;&#xD;&#xA;I want to know if the ray from the mouse intersects with the boxes shown in the image. Pick works fine unless the model is translated (rotating and scaling works).&#xD;&#xA;&#xD;&#xA;Another little question: what does `float?` mean? What's the difference between `float` and `float?`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2PL1R.png" />
  <row Id="35922" PostHistoryTypeId="4" PostId="15751" RevisionGUID="832972cb-e0d0-4f21-9dba-d1109c3af797" CreationDate="2011-08-09T21:14:21.667" UserId="8771" Comment="english improvements" Text="Problem with bounding box in model space and intersection with ray" />
  <row Id="35923" PostHistoryTypeId="24" PostId="15751" RevisionGUID="832972cb-e0d0-4f21-9dba-d1109c3af797" CreationDate="2011-08-09T21:14:21.667" Comment="Proposed by 8771 approved by 1430 edit id of 612" />
  <row Id="35924" PostHistoryTypeId="4" PostId="15191" RevisionGUID="79c8ea49-26a2-41a5-931c-f5d4050aee3b" CreationDate="2011-08-09T21:43:52.293" UserId="8771" Comment="made title a question" Text="Is there a good way to get pixel-perfect collision detection in XNA?" />
  <row Id="35925" PostHistoryTypeId="24" PostId="15191" RevisionGUID="79c8ea49-26a2-41a5-931c-f5d4050aee3b" CreationDate="2011-08-09T21:43:52.293" Comment="Proposed by 8771 approved by 51 edit id of 617" />
  <row Id="35926" PostHistoryTypeId="4" PostId="15703" RevisionGUID="d78cecd3-d2d1-4b94-8bde-c8c614c6bf02" CreationDate="2011-08-09T21:44:00.747" UserId="8771" Comment="made title a question" Text="What 2D engine can I use to port my flash game to iOS and Android?" />
  <row Id="35927" PostHistoryTypeId="24" PostId="15703" RevisionGUID="d78cecd3-d2d1-4b94-8bde-c8c614c6bf02" CreationDate="2011-08-09T21:44:00.747" Comment="Proposed by 8771 approved by 51 edit id of 615" />
  <row Id="35928" PostHistoryTypeId="5" PostId="15736" RevisionGUID="c9cb9ea4-ab7d-4895-9aaa-db69d652fa5c" CreationDate="2011-08-09T21:44:30.107" UserId="8771" Comment="improved english" Text="I want to use the b2MouseJoint in Java for Android. I am new in Android game development. I don't know how to use the mouse joint." />
  <row Id="35929" PostHistoryTypeId="4" PostId="15736" RevisionGUID="c9cb9ea4-ab7d-4895-9aaa-db69d652fa5c" CreationDate="2011-08-09T21:44:30.107" UserId="8771" Comment="improved english" Text="How to use the mouse joint in Android?" />
  <row Id="35930" PostHistoryTypeId="24" PostId="15736" RevisionGUID="c9cb9ea4-ab7d-4895-9aaa-db69d652fa5c" CreationDate="2011-08-09T21:44:30.107" Comment="Proposed by 8771 approved by 51 edit id of 616" />
  <row Id="35931" PostHistoryTypeId="4" PostId="15658" RevisionGUID="2f327a5d-2122-4587-87b5-84ade8caab1b" CreationDate="2011-08-09T21:44:37.220" UserId="8771" Comment="made title a question" Text="How can I draw a sprite that inverts the colors behind it for an aiming reticle?" />
  <row Id="35932" PostHistoryTypeId="24" PostId="15658" RevisionGUID="2f327a5d-2122-4587-87b5-84ade8caab1b" CreationDate="2011-08-09T21:44:37.220" Comment="Proposed by 8771 approved by 51 edit id of 618" />
  <row Id="35933" PostHistoryTypeId="4" PostId="15717" RevisionGUID="7a5c512e-3eee-4b2a-9294-3f850c881171" CreationDate="2011-08-09T21:45:28.187" UserId="8771" Comment="made title a question" Text="Is there an alternative to decals that will let me put bullet holes on a complicated object?" />
  <row Id="35934" PostHistoryTypeId="24" PostId="15717" RevisionGUID="7a5c512e-3eee-4b2a-9294-3f850c881171" CreationDate="2011-08-09T21:45:28.187" Comment="Proposed by 8771 approved by 1430 edit id of 613" />
  <row Id="35935" PostHistoryTypeId="4" PostId="15710" RevisionGUID="5614cc17-4ac4-4957-9f8c-8b05f70fa2a6" CreationDate="2011-08-09T21:48:20.587" UserId="8771" Comment="made title a more detailed question" Text="I don't have the hardware for XNA. Is there a good Linux alternative?" />
  <row Id="35936" PostHistoryTypeId="24" PostId="15710" RevisionGUID="5614cc17-4ac4-4957-9f8c-8b05f70fa2a6" CreationDate="2011-08-09T21:48:20.587" Comment="Proposed by 8771 approved by -1 edit id of 611" />
  <row Id="35937" PostHistoryTypeId="5" PostId="15710" RevisionGUID="4c85451c-2d0e-487a-8871-b90c1c6b1f38" CreationDate="2011-08-09T21:48:20.697" UserId="51" Comment="made title a more detailed question, directed the question to be less about XNA and more about C# on Linux." Text="I'm looking for something like an alternative to XNA - I don't care whether it's a 2D or 3D engine. It's not because I dislike Windows or am anti-Microsoft; it's because I like running Linux, code in Linux completely (for C# I use Mono, obviously), and by no means have any hardware to actually support programming in XNA, simply because my video card is 6 years old. I also don't have a Windows 7/Vista CD for DirectX 10.&#xD;&#xA;&#xD;&#xA;Thus, for game development I'm kind of stuck in the stone age. Yet, I like C# very much and would hate to have to drop it as a language due to this. &#xD;&#xA;&#xD;&#xA;Is there anything I can do?" />
  <row Id="35938" PostHistoryTypeId="4" PostId="15710" RevisionGUID="4c85451c-2d0e-487a-8871-b90c1c6b1f38" CreationDate="2011-08-09T21:48:20.697" UserId="51" Comment="made title a more detailed question, directed the question to be less about XNA and more about C# on Linux." Text="Are there any frameworks that allow me to write games in C# on Linux?" />
  <row Id="35939" PostHistoryTypeId="25" PostId="7395" RevisionGUID="dec198b9-7ffe-45b4-91a5-c792581996bc" CreationDate="2011-08-09T22:36:48.763" Comment="http://twitter.com/#!/StackGameDev/status/101059381088624641" />
  <row Id="35940" PostHistoryTypeId="2" PostId="15762" RevisionGUID="907f4f85-5f22-48b0-86a8-619266d490c1" CreationDate="2011-08-09T23:05:34.567" UserId="1929" Text="It seems like every (2D) game and game maker has their own convention for sizes of tilesets, frames of animations, etc.&#xD;&#xA;&#xD;&#xA;I'm looking to start collecting a set of tiles (characters, tilesets, etc.) that I can reuse across multiple games. Are there any sort of standards?&#xD;&#xA;&#xD;&#xA;I recall that there was at least one convention out there, but I can't find it now. Does it matter? What's the best way to start collecting (and dare I say, creating) reusable assets?&#xD;&#xA;&#xD;&#xA;I'm looking for something in the vein of the Final Fantasy series (SNES), Legend of Zelda, etc." />
  <row Id="35941" PostHistoryTypeId="1" PostId="15762" RevisionGUID="907f4f85-5f22-48b0-86a8-619266d490c1" CreationDate="2011-08-09T23:05:34.567" UserId="1929" Text="Standards and Reusable Tilesets for 2D Games (RPG style)" />
  <row Id="35942" PostHistoryTypeId="3" PostId="15762" RevisionGUID="907f4f85-5f22-48b0-86a8-619266d490c1" CreationDate="2011-08-09T23:05:34.567" UserId="1929" Text="&lt;tiles&gt;&lt;assets&gt;" />
  <row Id="35944" PostHistoryTypeId="5" PostId="15762" RevisionGUID="5914f1f7-132a-4098-93dd-4b650cf7c022" CreationDate="2011-08-09T23:23:30.450" UserId="1929" Comment="added 331 characters in body; edited tags; edited title" Text="For 2D top-down style sprites, what kind of systems of tilesets are out there? I want to know my options. This is *not* another &quot;free tilesets&quot; question, but a &quot;free tileset systems&quot; question.&#xD;&#xA;&#xD;&#xA;Allow me to explain. RPG Maker XP defines character tilesets as having four states (directional) and four frames of animation. There are a huge number of tilesets (character and terrain); but the characters are very limited in terms of animations.&#xD;&#xA;&#xD;&#xA;Compare this to, say, Final Fantasy 6. Copyright aside, each character has a *huge* array of actions they can do; anything from crouching, falling unconcious, being surprised, etc. and it's supported for all the party members.&#xD;&#xA;&#xD;&#xA;So given that I'm going to make several 2d top-down RPG/adventure/etc. games, **what are the tileset systems out there that I can use? What's the best combination of &quot;features&quot; and freely available assets?**&#xD;&#xA;&#xD;&#xA;I don't know if this question makes sense, but that's what it is." />
  <row Id="35945" PostHistoryTypeId="4" PostId="15762" RevisionGUID="5914f1f7-132a-4098-93dd-4b650cf7c022" CreationDate="2011-08-09T23:23:30.450" UserId="1929" Comment="added 331 characters in body; edited tags; edited title" Text="Systems of Tilesets for 2D Top-Downish Games" />
  <row Id="35946" PostHistoryTypeId="6" PostId="15762" RevisionGUID="5914f1f7-132a-4098-93dd-4b650cf7c022" CreationDate="2011-08-09T23:23:30.450" UserId="1929" Comment="added 331 characters in body; edited tags; edited title" Text="&lt;assets&gt;" />
  <row Id="35948" PostHistoryTypeId="25" PostId="11067" RevisionGUID="3385e222-52b7-4d09-b165-7b4e73143904" CreationDate="2011-08-10T00:36:48.863" Comment="http://twitter.com/#!/StackGameDev/status/101089580903698432" />
  <row Id="35949" PostHistoryTypeId="2" PostId="15763" RevisionGUID="a695ac43-713d-480f-b59e-1788d763ed59" CreationDate="2011-08-10T01:02:52.570" UserId="1101" Text="The problem is not about the performance of a path-finding library as such. Path-finding is a specific application of state-space search, and the length of time it takes to search a state-space grows (often exponentially) in relation to the size of that state. Therefore the biggest problem here is how you represent that state, and the second biggest problem is the algorithm you choose to search it. Only third comes the quality of the implementation, typically. No matter how good the library, it can only search the state space you provide it with, and if that space is too large, the exponential growth of the search space will dwarf any other optimisations.&#xD;&#xA;&#xD;&#xA;Judging by your last set of bullet points, it sounds like you're needlessly generating more solutions than you need. An algorithm such as A* will return the best solution first, solving that problem. Given your topology it would seem like you can generate a path that is combined of nodes (for the current room and the destination room) and super-nodes (for the intermediate rooms where you're going from door to door, and where the costs are precomputed). The number of states to be searched here should be fairly minimal and once the result is returned, a post-processing step would expand the super-nodes out into individual tiles.&#xD;&#xA;&#xD;&#xA;I'd be very surprised if such a solution didn't perform perfectly well on Python on pretty much any size of map. However, it's also worth making sure you're using the right data structures - if you're testing a list for membership (eg. the typical 'closed' list) then you'd be better off with a set, and if you're looking up nodes by some value, you're better off with a dict or a set than a list. If you really need a queue object, then a collections.deque may be better than a list. And so on.&#xD;&#xA;&#xD;&#xA;Finally, sometimes it is faster to replace the typical A* with something like [iterative deepening A*][1] which, although less efficient on paper, can be more efficient in practice due to requiring fewer memory allocations and expensive queue operations. This is less likely to hold true in Python however because the relationship between pseudocode instructions and low-level operations is not as strong as it is with a typical C implementation.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/IDA*" />
  <row Id="35950" PostHistoryTypeId="2" PostId="15764" RevisionGUID="0012ba57-6a5a-4f84-b444-3ff3d8476e2b" CreationDate="2011-08-10T01:11:17.013" UserId="1923" Text="Your bounding box, xbouding, is somewhat inside out. Min.Y &amp; min.Z are both greater in value than max.Y &amp; max.Z. That's impossible for a correct bounding box &amp; won't produce expected results because it wont allow the intersection tests to work correctly. Might or might not factor into current issue, but assuredly it will cause you problems somewhere.&#xD;&#xA;&#xD;&#xA;try a min of (50,-10,-10) &amp; a max of (120, 10, 10)." />
  <row Id="35951" PostHistoryTypeId="2" PostId="15765" RevisionGUID="5f6013db-7c1d-4955-8fac-9e834741b6bd" CreationDate="2011-08-10T01:45:51.587" UserId="9040" Text="If you are using C++ and the Windows API, one way you can do is using `FindWindow`, where you can pass parameters like the class name and/or the window name. Then if you find a match, just exit your program before you even load or create a window." />
  <row Id="35952" PostHistoryTypeId="25" PostId="13805" RevisionGUID="7c852258-e006-4921-90f0-ff87b01fd4bb" CreationDate="2011-08-10T02:36:48.480" Comment="http://twitter.com/#!/StackGameDev/status/101119778772631552" />
  <row Id="35953" PostHistoryTypeId="2" PostId="15766" RevisionGUID="72d38ac3-76bb-4f69-afb1-7cbcf6cdc5cd" CreationDate="2011-08-10T03:31:13.967" UserId="9162" Text="I have a BA degree, but no experience in developing computer games or computer programming. What topics do I need to learn to find a job related to computer game development? Where should I start?&#xD;&#xA;&#xD;&#xA;(if it helps I have experience in painting and drawing.)&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="35954" PostHistoryTypeId="1" PostId="15766" RevisionGUID="72d38ac3-76bb-4f69-afb1-7cbcf6cdc5cd" CreationDate="2011-08-10T03:31:13.967" UserId="9162" Text="What are the skills an art student needs to learn to work in computer game industary?" />
  <row Id="35955" PostHistoryTypeId="3" PostId="15766" RevisionGUID="72d38ac3-76bb-4f69-afb1-7cbcf6cdc5cd" CreationDate="2011-08-10T03:31:13.967" UserId="9162" Text="&lt;art&gt;&lt;career&gt;&lt;jobs&gt;" />
  <row Id="35956" PostHistoryTypeId="2" PostId="15767" RevisionGUID="fdcb4cb7-64f4-4dc2-94ea-a4f1dc14bca8" CreationDate="2011-08-10T03:50:36.707" UserId="2910" Text="Start Drawing, Animating, constructing characters, build a portfolio. Have something to showcase your abilities, there is no real silver-bullet &quot;skill&quot;. You need to show that you have passion for it and can do it well well. " />
  <row Id="35957" PostHistoryTypeId="2" PostId="15768" RevisionGUID="01e9f59c-c943-4ffa-a9a5-c846c8b32749" CreationDate="2011-08-10T04:31:25.500" UserId="9126" Text="What I had been imagining is determining during the &quot;picking&quot; determine the specific position on the model and pass that exact position to the sharer along with a bullet texture to apply. Of course this still results in the issue of &quot;filing across faces.   The geometric projection seems the best option. " />
  <row Id="35958" PostHistoryTypeId="25" PostId="15735" RevisionGUID="3de6d12c-7ec3-49ba-8893-531dda5cea87" CreationDate="2011-08-10T04:36:48.440" Comment="http://twitter.com/#!/StackGameDev/status/101149978268934144" />
  <row Id="35959" PostHistoryTypeId="2" PostId="15769" RevisionGUID="4e9501ec-5b63-4caa-9dee-b7abfcf00dfe" CreationDate="2011-08-10T05:31:50.113" UserId="9001" Text="I am trying to implement the collision detection and response in 3D car racing game.&#xD;&#xA;&#xD;&#xA;I have a car model, for collision i am assuming my car as a cuboid. my collision detection with walls is quite good and the response is also good.&#xD;&#xA;my model have a velocity, position, acceleration and orientation.&#xD;&#xA;i am using matrix to save the orientation and position.&#xD;&#xA;my problem is collision and its response with the ground(in my case its road).&#xD;&#xA;When the ground is simple a plane with y axis constant, then there is no need for collision detection as there is no force in y direction and no movement in y direction.&#xD;&#xA;but if my road is not linear , it has some elevations then i am getting problem for collision detection and mainly for calculating its orientation.&#xD;&#xA;Any help and suggestions will be of great help. " />
  <row Id="35960" PostHistoryTypeId="1" PostId="15769" RevisionGUID="4e9501ec-5b63-4caa-9dee-b7abfcf00dfe" CreationDate="2011-08-10T05:31:50.113" UserId="9001" Text="Collision detection and Response in 3D" />
  <row Id="35961" PostHistoryTypeId="3" PostId="15769" RevisionGUID="4e9501ec-5b63-4caa-9dee-b7abfcf00dfe" CreationDate="2011-08-10T05:31:50.113" UserId="9001" Text="&lt;collision-detection&gt;&lt;physics&gt;" />
  <row Id="35962" PostHistoryTypeId="2" PostId="15770" RevisionGUID="c68da56c-8076-4ff1-a1a9-f458d9261263" CreationDate="2011-08-10T06:01:21.723" UserId="9163" Text="Pecant's answser ignored frame time, and that makes your physics behavior differently from time to time.&#xD;&#xA;&#xD;&#xA;If you are going to make a very simple game, you can make your own little physics engine -- assign mass and all kinds of physics parameters for every moving object, and do collision detection, then update their position and velocity every frame. In order to accelerate this progress, you need to simplify the collision mesh, reduce calls of collision detection, etc. In most cases, that's a pain.&#xD;&#xA;&#xD;&#xA;It's better to use physics engine like physix, ODE and bullet. Any of them will be stable and efficient enough for you.&#xD;&#xA;&#xD;&#xA;http://www.nvidia.com/object/physx_new.html&#xD;&#xA;&#xD;&#xA;http://bulletphysics.org/wordpress/" />
  <row Id="35963" PostHistoryTypeId="5" PostId="15708" RevisionGUID="37a09fba-8ad5-4f86-a184-95e0f1b3310e" CreationDate="2011-08-10T06:10:06.263" UserId="51" Comment="deleted 45 characters in body" Text="How can I implement gravity? Not for a particular language, just pseudocode..." />
  <row Id="35964" PostHistoryTypeId="6" PostId="15735" RevisionGUID="56e7c254-2c50-4c6e-9819-bce82965df67" CreationDate="2011-08-10T06:20:32.073" UserId="51" Comment="edited tags" Text="&lt;programming&gt;&lt;starcraft-2&gt;" />
  <row Id="35965" PostHistoryTypeId="25" PostId="15766" RevisionGUID="d87c4c84-ffb4-4600-a8db-4855cef8a6a3" CreationDate="2011-08-10T06:36:48.120" Comment="http://twitter.com/#!/StackGameDev/status/101180176469213184" />
  <row Id="35966" PostHistoryTypeId="2" PostId="15771" RevisionGUID="d79d65a0-3231-4f66-a898-3cdfe1386e99" CreationDate="2011-08-10T07:15:52.253" UserId="9161" Text="Imagine that I created a very successful game called Super Pedro Brothers that looks pretty similar to the Nintendo's Mario game. Nintendo got really upset because of all the money I gained. So, they decided to sue me.&#xD;&#xA;&#xD;&#xA;How do I make Pedro unsueable?&#xD;&#xA;&#xD;&#xA;If I choose a completely different name, would that do the trick?&#xD;&#xA;&#xD;&#xA;In other words: which parts of Super Mario Brothers (e.g. the soundtrack, the green pipes, the evil mushrooms, the idea that some guy runs forward from left to right, etc) belong to Nintendo?&#xD;&#xA;&#xD;&#xA;Please keep in mind that the whole Nintendo &amp; Mario thing is just an example. I'm trying to get the general idea of how to tell copyrightable parts of a game from those that aren't.&#xD;&#xA;&#xD;&#xA;Thanks for your time :)&#xD;&#xA; " />
  <row Id="35967" PostHistoryTypeId="1" PostId="15771" RevisionGUID="d79d65a0-3231-4f66-a898-3cdfe1386e99" CreationDate="2011-08-10T07:15:52.253" UserId="9161" Text="Which parts of a game are actually copyrightable?" />
  <row Id="35968" PostHistoryTypeId="3" PostId="15771" RevisionGUID="d79d65a0-3231-4f66-a898-3cdfe1386e99" CreationDate="2011-08-10T07:15:52.253" UserId="9161" Text="&lt;copyright&gt;" />
  <row Id="35969" PostHistoryTypeId="2" PostId="15772" RevisionGUID="ebe25947-767c-45eb-acd1-285bacc5827f" CreationDate="2011-08-10T08:03:56.650" UserId="5473" Text="While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different platforms (desktop / mobile).&#xD;&#xA;&#xD;&#xA;What is the best way to tackle developing a cross-platform game in C++ (given any cross-platform threading API) considering the following:&#xD;&#xA;&#xD;&#xA; - different numbers of cores&#xD;&#xA; - vastly different processing capabilities per core&#xD;&#xA; - A generally different systems architecture with eg. different latencies for cache, RAM , and I/O access&#xD;&#xA;&#xD;&#xA;I get the feel that the only way to do this is evaluate how many threads may be run per device. However, this still leaves me in the dark as to the total amount of processing power available. Am I right in assuming the only way to do this effectively is to actively develop for the lowest spec mobile device I intend to support, throughout development? -- i.e. the lowest common denominator? Or is there more to it than this?&#xD;&#xA;" />
  <row Id="35970" PostHistoryTypeId="1" PostId="15772" RevisionGUID="ebe25947-767c-45eb-acd1-285bacc5827f" CreationDate="2011-08-10T08:03:56.650" UserId="5473" Text="Multi-platform multi-threading: What are the real challenges?" />
  <row Id="35971" PostHistoryTypeId="3" PostId="15772" RevisionGUID="ebe25947-767c-45eb-acd1-285bacc5827f" CreationDate="2011-08-10T08:03:56.650" UserId="5473" Text="&lt;multithreading&gt;&lt;cross&gt;" />
  <row Id="35972" PostHistoryTypeId="5" PostId="15772" RevisionGUID="0c7a7842-9ba3-4dde-be47-29b30d65234c" CreationDate="2011-08-10T08:09:27.127" UserId="5473" Comment="added 84 characters in body" Text="While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different platforms (desktop / mobile).&#xD;&#xA;&#xD;&#xA;What is the best way to tackle developing in this way (given any cross-platform threading API) considering the following:&#xD;&#xA;&#xD;&#xA; - different numbers of cores&#xD;&#xA; - vastly different processing capabilities per core&#xD;&#xA; - A generally different systems architecture with eg. different latencies for cache, RAM , and I/O access&#xD;&#xA;&#xD;&#xA;I get the feeling that the only way to do this is evaluate how many threads may be run per each device you intend to support, and find out what the lowest common denominator is. However, this still leaves me in the dark as to the total amount of processing throughput available. Am I right in assuming the only way to do this effectively is to actively develop for the lowest spec mobile device I intend to support, throughout development? -- i.e. the lowest common denominator? Should this _roughly_ be sufficient? Or is there more to it than this?&#xD;&#xA;" />
  <row Id="35973" PostHistoryTypeId="6" PostId="15772" RevisionGUID="0c7a7842-9ba3-4dde-be47-29b30d65234c" CreationDate="2011-08-10T08:09:27.127" UserId="5473" Comment="added 84 characters in body" Text="&lt;cross-platform&gt;&lt;multithreading&gt;" />
  <row Id="35974" PostHistoryTypeId="2" PostId="15773" RevisionGUID="4832f96f-4041-4221-b2e7-44c92fbef749" CreationDate="2011-08-10T08:24:09.483" UserId="2897" Text="It looks like you don't want to use a car simulation middleware, or even a physics engine to model a &quot;classic car&quot; from a box, four spheres and some hinge joints for the suspension. Well then, I guess for a simple solution you could try something like this: &#xD;&#xA;&#xD;&#xA; - Take your cuboid's bottom plane.&#xD;&#xA; - Cast 4 rays downward from each of its's corners and find their collisions with road. This collisions will be your &quot;imaginary wheels&quot;.&#xD;&#xA; - Now you can make a height check to hold the car at the right distance from the road (the radius of the imaginary wheel), then set cuboid's lower plane's corner coordinates to the new found wheel's positions. It will be a somewhat working solution, but also give a unique feeling of driving a large concrete brick.&#xD;&#xA;&#xD;&#xA;  - For a more realistic approach you may want to simulate a spring system at each imaginary wheel to make it a bouncy concrete brick. Maybe you will also replace wall collisions with it.&#xD;&#xA;  - Then you may want to simulate friction of imaginary wheels. To this point your car was glued to the road, but know it will start to roll-over. Roll overs can be battled with artificial anti-sway torque and GTA-like modifying of max correctional torque by the amount of &quot;wheel turn value&quot;, so a player would be able to steer out of roll-over. Unrealistic yet funny :)&#xD;&#xA;&#xD;&#xA;Things will quickly become more and more complicated here, it won't be easy to make a fun car physics. Nowadays most if not all physics engines have a built-in car class with tweakable parameters, so you may want to look at their sources." />
  <row Id="35975" PostHistoryTypeId="25" PostId="4703" RevisionGUID="10491c09-ac17-4a5d-8ff7-571c7276377b" CreationDate="2011-08-10T08:36:48.750" Comment="http://twitter.com/#!/StackGameDev/status/101210375785160704" />
  <row Id="35976" PostHistoryTypeId="2" PostId="15774" RevisionGUID="ac031e8c-0320-4cea-af65-6c0fadbedb7b" CreationDate="2011-08-10T08:58:37.523" UserId="5125" Text="When I did mobile games we first developed a 'gold' version (ie. a fully functionnal game) and then we split it up in 3 major versions (big screen, middle sized and small screen).&#xD;&#xA;These ones was further converted into 11 versions: demanding graphics (read takes much memory / cpu) vs low profile etc. (there were a couple 'special platform versions too).&#xD;&#xA;&#xD;&#xA;The biggest problem was (that was my job among others) to isolate the platforms needed and determin those versions and how to create them (ie. big-screen but Low profile should be a downgraded varsion of big screen / hi profile or should it be middle sized screen / lo profile made big screen?).&#xD;&#xA;&#xD;&#xA;Of course we coded with this in mind so games were very losely attached to the screen size.&#xD;&#xA;&#xD;&#xA;HTH" />
  <row Id="35977" PostHistoryTypeId="6" PostId="15772" RevisionGUID="96818e7a-78ed-4c30-89a9-fbcd1ba17e8a" CreationDate="2011-08-10T09:06:16.533" UserId="5473" Comment="edited tags" Text="&lt;cross-platform&gt;&lt;multithreading&gt;&lt;sdl&gt;" />
  <row Id="35978" PostHistoryTypeId="2" PostId="15775" RevisionGUID="27bfd367-bee8-41e1-9cd3-c4c23c02af1d" CreationDate="2011-08-10T10:31:20.213" UserId="2437" Text="I'm building an Island. I use the classical heightmap solution : with a hill-building function, avoiding the corners of the map, I make altitude. Then, perlin noise give me some climatic variables to handle the biomes.&#xD;&#xA;Now, I'm facing two challenges who are, in some way, connected :&#xD;&#xA;&#xD;&#xA;- In Dwarf Fortress, one of the neat aspects of world generation is how the game seems to &quot;know&quot; areas, and give them names, though they are not rectangular shapes. I would like to be able to &quot;recognize&quot; my forests, my rivers, my hills... any idea what kind of algorithm I could use to scan my map and interpret its areas ? And how would you store that ? I'm using a basic C++ graph made out of a vector of vector of &quot;tiles object&quot;.&#xD;&#xA;&#xD;&#xA;- This Island should be divided in political areas, not only purely natural regions. I could use mountains and rivers to make &quot;natural borders&quot;, but my procedurally generated map doesn't garantee I will have nice &quot;enclaves&quot; that would form a kingdom ; I could find myself having a gigantic &quot;ribbon-formed&quot; political areas surounded by micro-kingdoms. &#xD;&#xA;Another possibility would be to look for appropriate areas for a city or a castle. Then, &quot;grow&quot; a political area around it. But there again, I'd like to have some well-known algorithms before trying to devise my own.&#xD;&#xA;&#xD;&#xA;This question could be interpreted as a bit too vague, so one way of rephrasing it would be : how to partition (without modifying !) a procedurally generated world into areas suitable for gameplay ? Thanks in advance for your help." />
  <row Id="35979" PostHistoryTypeId="1" PostId="15775" RevisionGUID="27bfd367-bee8-41e1-9cd3-c4c23c02af1d" CreationDate="2011-08-10T10:31:20.213" UserId="2437" Text="Regions recognition in a procedurally generated 2D world" />
  <row Id="35980" PostHistoryTypeId="3" PostId="15775" RevisionGUID="27bfd367-bee8-41e1-9cd3-c4c23c02af1d" CreationDate="2011-08-10T10:31:20.213" UserId="2437" Text="&lt;2d&gt;&lt;maps&gt;&lt;procedural-generation&gt;" />
  <row Id="35981" PostHistoryTypeId="25" PostId="8013" RevisionGUID="5e04d4ed-02b3-409a-a765-d3bbe4ec6d62" CreationDate="2011-08-10T10:36:48.523" Comment="http://twitter.com/#!/StackGameDev/status/101240574782353408" />
  <row Id="35982" PostHistoryTypeId="5" PostId="15773" RevisionGUID="15586b4e-6c5a-4bc4-a49a-f7b558ff203d" CreationDate="2011-08-10T11:00:18.277" UserId="2897" Comment="Corrected spelling" Text="It looks like you don't want to use a car simulation middleware, or even a physics engine to model a &quot;classic car&quot; from a box, four spheres and some hinge joints for the suspension. Well then, I guess for a simple solution you could try something like this: &#xD;&#xA;&#xD;&#xA; - Take your cuboid's bottom plane.&#xD;&#xA; - Cast 4 rays downward from each of its's corners and find their collisions with road. This collisions will be your &quot;imaginary wheels&quot;.&#xD;&#xA; - Now you can make a height check to hold the car at the right distance from the road (the radius of the imaginary wheel), then set cuboid's lower plane's corner coordinates to the new found wheel's positions. It will be a somewhat working solution, but also give a unique feeling of driving a large concrete brick.&#xD;&#xA;&#xD;&#xA;  - For a more realistic approach you may want to simulate a spring system at each imaginary wheel to make it a bouncy concrete brick. Maybe you will also replace wall collisions with it.&#xD;&#xA;  - Then you may want to simulate friction of imaginary wheels. To this point your car was glued to the road, but now it will start to roll-over. Roll overs can be battled with artificial anti-sway torque and GTA-like modifying of max correctional torque by the amount of &quot;wheel turn value&quot;, so a player would be able to steer out of roll-over. Unrealistic yet funny :)&#xD;&#xA;&#xD;&#xA;Things will quickly become more and more complicated here, it won't be easy to make a fun car physics. Nowadays most if not all physics engines have a built-in car class with tweakable parameters, so you may want to look at their sources." />
  <row Id="35983" PostHistoryTypeId="5" PostId="15670" RevisionGUID="d8795c3b-bfef-416d-8c91-92b9e1cf0fec" CreationDate="2011-08-10T11:07:08.397" UserId="2063" Comment="added 712 characters in body" Text="I currently read out XML data with the following scheme: Position x,y,z&#xD;&#xA;&#xD;&#xA;I try to add one new Vertex for each position node and add it to a Vertex array.&#xD;&#xA;&#xD;&#xA;Then I try to render this list of vertices so I get all those lines connected to represent a &quot;path&quot; through space.&#xD;&#xA;(Space is 3D)&#xD;&#xA;&#xD;&#xA;What I tried so far:&#xD;&#xA;&#xD;&#xA;        [STAThread]&#xD;&#xA;        static void Main()&#xD;&#xA;        {&#xD;&#xA;            var form = new RenderForm(&quot;SlimDX - MiniTri Direct3D9 Sample&quot;);&#xD;&#xA;            var device = new Device(new Direct3D(), 0, DeviceType.Hardware, form.Handle, CreateFlags.HardwareVertexProcessing, new PresentParameters()&#xD;&#xA;            {&#xD;&#xA;                BackBufferWidth = form.ClientSize.Width,&#xD;&#xA;                BackBufferHeight = form.ClientSize.Height&#xD;&#xA;                &#xD;&#xA;            });&#xD;&#xA;            form.Height = 900;&#xD;&#xA;            form.Width = 900;&#xD;&#xA;&#xD;&#xA;            LineVertex[] waypoints = new LineVertex[1024];&#xD;&#xA;&#xD;&#xA;            XmlDocument paths = new XmlDocument();&#xD;&#xA;            paths.Load(&quot;data.xml&quot;);&#xD;&#xA;            XmlNode rootNode = paths.DocumentElement;&#xD;&#xA;&#xD;&#xA;            int index = 0;&#xD;&#xA;            foreach (XmlNode waypoint in rootNode)&#xD;&#xA;            {&#xD;&#xA;                foreach (XmlNode position in waypoint)&#xD;&#xA;                {&#xD;&#xA;                    Console.WriteLine(position.ChildNodes[0].InnerText);&#xD;&#xA;                    float b = 1000.0f;&#xD;&#xA;                    float x, y, z;&#xD;&#xA;&#xD;&#xA;                    x = (float.Parse(position.ChildNodes[0].InnerText) / (b * b));&#xD;&#xA;                    y = (float.Parse(position.ChildNodes[1].InnerText) / (b * b);&#xD;&#xA;                    z = (float.Parse(position.ChildNodes[2].InnerText) / (b * b));&#xD;&#xA;&#xD;&#xA;                    Console.WriteLine(x.ToString() + &quot; / &quot; + y.ToString() + &quot; / &quot; + z.ToString());&#xD;&#xA;&#xD;&#xA;                    if (index % 2 &gt; 0)&#xD;&#xA;                        waypoints[index].Color = Color.Yellow.ToArgb();&#xD;&#xA;                    else&#xD;&#xA;                        waypoints[index].Color = Color.Red.ToArgb();&#xD;&#xA;                    waypoints[index].Position = new Vector3(x, y, 0.0f);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            MessagePump.Run(form, () =&gt;&#xD;&#xA;            {&#xD;&#xA;                device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue.ToArgb(), 0f, 1);&#xD;&#xA;                // Since we don't have any lights in our scene, our lines won't receive &#xD;&#xA;                // any light and will therefore be black...&#xD;&#xA;                // ...but we want them golden as an asinus aureus, so let's disable lighting.&#xD;&#xA;                device.SetRenderState(RenderState.Lighting, true);&#xD;&#xA;                device.BeginScene();&#xD;&#xA;&#xD;&#xA;                // Our struct was meant to describe a position and a color,&#xD;&#xA;                // let's tell the device about it.&#xD;&#xA;                device.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;&#xD;&#xA;&#xD;&#xA;                // In this particular case SlimDX does not need the &#xD;&#xA;                // vertex stride, it will be automatically calculated.&#xD;&#xA;                device.DrawUserPrimitives(PrimitiveType.LineList, 0, waypoints.Length / 2, waypoints);&#xD;&#xA;&#xD;&#xA;                device.EndScene();&#xD;&#xA;                device.Present();&#xD;&#xA;&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;            foreach (var item in ObjectTable.Objects)&#xD;&#xA;                item.Dispose();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;But this does not work, and I am sure it is the complete wrong approach!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: So far one solution worked out, but not very well.&#xD;&#xA;And I also need the Vertices to be changeable at runtime, so I locked at the documentation and samples, they always use VertexBuffer() to make it possible to dynamically change the Vertices by using a DataStream as Input for the VertexBuffer.&#xD;&#xA;&#xD;&#xA;A question still open to me is, since I am used to &quot;Update(Time time)&quot; formats the procedural still of DX/OpenGL oftens confuses me.&#xD;&#xA;So I assume that MessagePump.Run() represents the drawing call that's repeated each frame.&#xD;&#xA;So if some values before the drawing call change like a Vertex, that's put into the datastream, I can instantly see the updated result on the screen.&#xD;&#xA;Is that assumption right?" />
  <row Id="35984" PostHistoryTypeId="2" PostId="15776" RevisionGUID="2dc21e99-83aa-4981-8744-aadacd0e5913" CreationDate="2011-08-10T11:09:20.000" UserId="5473" Text="ForPlay is lauded as a pretty amazing accomplishment by Google's own. But I'm holding off on making any solid judgements as yet...&#xD;&#xA;&#xD;&#xA;I'm wondering if anyone has used this and has found any major flaws? I'd like to know what these are. Considering that the code is written in Java and is compiled for Flash, Android and HTML5 additionally, I'm wondering how it performs on those platforms as compared with games written natively for those platforms -- if anyone has done any comparisons in this regard.&#xD;&#xA;&#xD;&#xA;For those who are unaware of what ForPlay is, see the [repository][1] and this [video][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/forplay/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=F_sbusEUz5w" />
  <row Id="35985" PostHistoryTypeId="1" PostId="15776" RevisionGUID="2dc21e99-83aa-4981-8744-aadacd0e5913" CreationDate="2011-08-10T11:09:20.000" UserId="5473" Text="Google's ForPlay library, what are the cons?" />
  <row Id="35986" PostHistoryTypeId="3" PostId="15776" RevisionGUID="2dc21e99-83aa-4981-8744-aadacd0e5913" CreationDate="2011-08-10T11:09:20.000" UserId="5473" Text="&lt;forplay&gt;&lt;gwt-game&gt;" />
  <row Id="35987" PostHistoryTypeId="2" PostId="15777" RevisionGUID="66bbf85a-e91b-405f-9fb1-a00e5241b789" CreationDate="2011-08-10T11:10:20.060" UserId="-1" Text="" />
  <row Id="35988" PostHistoryTypeId="2" PostId="15778" RevisionGUID="79bebf1d-9bad-4e45-b973-be3e67ebe3c2" CreationDate="2011-08-10T11:10:20.060" UserId="-1" Text="" />
  <row Id="35989" PostHistoryTypeId="2" PostId="15779" RevisionGUID="95332589-7f1d-470d-bc25-404ca03fe11b" CreationDate="2011-08-10T11:11:51.790" UserId="-1" Text="" />
  <row Id="35990" PostHistoryTypeId="2" PostId="15780" RevisionGUID="5b337c94-bf11-48dd-883e-c0f1243c5c6a" CreationDate="2011-08-10T11:11:51.790" UserId="-1" Text="" />
  <row Id="35991" PostHistoryTypeId="2" PostId="15781" RevisionGUID="d70a58b2-a073-48f0-9c9b-f0a4cd1b6a96" CreationDate="2011-08-10T11:44:20.690" UserId="9169" Text="As a Direct3D developer I can use the default sprite class (in D3DX library) for drawing 2d graphic. What's the best way to implement this functionality in OpenGL?" />
  <row Id="35992" PostHistoryTypeId="1" PostId="15781" RevisionGUID="d70a58b2-a073-48f0-9c9b-f0a4cd1b6a96" CreationDate="2011-08-10T11:44:20.690" UserId="9169" Text="The best way for sprite drawing in OpenGL" />
  <row Id="35993" PostHistoryTypeId="3" PostId="15781" RevisionGUID="d70a58b2-a073-48f0-9c9b-f0a4cd1b6a96" CreationDate="2011-08-10T11:44:20.690" UserId="9169" Text="&lt;opengl&gt;&lt;directx&gt;&lt;sprites&gt;" />
  <row Id="35994" PostHistoryTypeId="2" PostId="15782" RevisionGUID="7e9f3dec-d78c-4c0f-a1d2-2edcc5f81b1c" CreationDate="2011-08-10T11:52:33.833" UserId="9170" Text="I just started reading about games, i'm going to develop a game like where person moving around a MAP surface(2D).my preferred language is java, is it good to develop games? i'm going to develop a desktop app like game?need some push to start up. some one please give me some good resources to newbies. thank you!&#xD;&#xA;" />
  <row Id="35995" PostHistoryTypeId="1" PostId="15782" RevisionGUID="7e9f3dec-d78c-4c0f-a1d2-2edcc5f81b1c" CreationDate="2011-08-10T11:52:33.833" UserId="9170" Text="2D map game using java" />
  <row Id="35996" PostHistoryTypeId="3" PostId="15782" RevisionGUID="7e9f3dec-d78c-4c0f-a1d2-2edcc5f81b1c" CreationDate="2011-08-10T11:52:33.833" UserId="9170" Text="&lt;game-design&gt;&lt;java&gt;&lt;maps&gt;" />
  <row Id="35997" PostHistoryTypeId="5" PostId="15771" RevisionGUID="3794cfce-55f9-4298-a45a-85d92da3cdad" CreationDate="2011-08-10T11:54:30.890" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [How closely can a game resemble another game without legal problems](http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Imagine that I created a very successful game called Super Pedro Brothers that looks pretty similar to the Nintendo's Mario game. Nintendo got really upset because of all the money I gained. So, they decided to sue me.&#xD;&#xA;&#xD;&#xA;How do I make Pedro unsueable?&#xD;&#xA;&#xD;&#xA;If I choose a completely different name, would that do the trick?&#xD;&#xA;&#xD;&#xA;In other words: which parts of Super Mario Brothers (e.g. the soundtrack, the green pipes, the evil mushrooms, the idea that some guy runs forward from left to right, etc) belong to Nintendo?&#xD;&#xA;&#xD;&#xA;Please keep in mind that the whole Nintendo &amp; Mario thing is just an example. I'm trying to get the general idea of how to tell copyrightable parts of a game from those that aren't.&#xD;&#xA;&#xD;&#xA;Thanks for your time :)&#xD;&#xA; " />
  <row Id="35998" PostHistoryTypeId="10" PostId="15771" RevisionGUID="3d9fbba6-73d6-442d-86b1-fe0ea33ca475" CreationDate="2011-08-10T11:54:30.470" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="35999" PostHistoryTypeId="5" PostId="15778" RevisionGUID="91e2b4eb-45cd-4450-97e5-bfc29c6db4f1" CreationDate="2011-08-10T11:55:28.847" UserId="5473" Comment="added 135 characters in body" Text="ForPlay is a cross-platform game abstraction library for writing games that compile to desktop Java, HTML5 Browsers, Android and Flash." />
  <row Id="36000" PostHistoryTypeId="24" PostId="15778" RevisionGUID="91e2b4eb-45cd-4450-97e5-bfc29c6db4f1" CreationDate="2011-08-10T11:55:28.847" Comment="Proposed by 5473 approved by 14 edit id of 620" />
  <row Id="36001" PostHistoryTypeId="5" PostId="15780" RevisionGUID="395f2953-851c-455d-bd20-626d6ea755b9" CreationDate="2011-08-10T11:55:30.640" UserId="5473" Comment="added 144 characters in body" Text="The game engine library for Google Web Toolkit. It provides the basis for ForPlay, Google's cross-platform game development abstraction library." />
  <row Id="36002" PostHistoryTypeId="24" PostId="15780" RevisionGUID="395f2953-851c-455d-bd20-626d6ea755b9" CreationDate="2011-08-10T11:55:30.640" Comment="Proposed by 5473 approved by 14 edit id of 621" />
  <row Id="36003" PostHistoryTypeId="5" PostId="15772" RevisionGUID="d42dd1fe-e7e6-4d4f-8324-a33f95a719b5" CreationDate="2011-08-10T12:03:25.310" UserId="5473" Comment="added 119 characters in body" Text="While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different platforms (desktop / mobile).&#xD;&#xA;&#xD;&#xA;What is the best way to tackle developing in this way (given any cross-platform threading API) considering the following:&#xD;&#xA;&#xD;&#xA; - different numbers of cores&#xD;&#xA; - vastly different processing capabilities per core&#xD;&#xA; - A generally different systems architecture with eg. different latencies for cache, RAM , and I/O access&#xD;&#xA;&#xD;&#xA;I get the feeling that the only way to do this is evaluate how many threads may be run per each device you intend to support, and find out what the lowest common denominator is. However, this still leaves me in the dark as to the total amount of processing throughput available. Am I right in assuming the only way to do this effectively is to actively develop for the lowest spec mobile device I intend to support, throughout development? -- i.e. the lowest common denominator? Should this _roughly_ be sufficient? Or is there more to it than this?&#xD;&#xA;&#xD;&#xA;EDIT: Please could others offer further experience on this as I don't feel my question has been answered fully yet.&#xD;&#xA;" />
  <row Id="36004" PostHistoryTypeId="2" PostId="15783" RevisionGUID="993bf7fa-4b24-45b2-8e5f-22ddc6f2717c" CreationDate="2011-08-10T12:07:56.700" UserId="4947" Text="I think, that if you want to draw just 2D sprite on screen, you can simply draw textured rectangle. &#xD;&#xA;&#xD;&#xA;If sprite should be square, you can also draw point with point size set bigger than 1 and some texture enabled. But I don't know, if you can set some texture coordinates in vertex shader (but probably not, because you have just one point). Other way is to split this one point in geometry shader and assign corresponding texture coordinates." />
  <row Id="36005" PostHistoryTypeId="2" PostId="15784" RevisionGUID="469d0e8f-e106-4d3c-9a9e-67d4419dc948" CreationDate="2011-08-10T12:19:37.823" UserId="6877" Text="Personally I am a big fan of [jMonkey Engine](http://jmonkeyengine.org/).Its a shader based &amp; geared toward high end games productions. Apart from this one [jGame](http://www.13thmonkey.org/~boris/jgame/) &amp; [Slick2D](http://slick.cokeandcode.com/index.php) is good for 2d games. [ligGDX](http://libgdx.badlogicgames.com/) might interest you.&#xD;&#xA;&#xD;&#xA;I will whole heartily suggest you to start with jMonkey Engine, cause its fun, easy to use , has a very active community and has an awesome [jMonkey Platform](http://jmonkeyengine.com/sdk/) which is build on top of Netbeans platform, where every update &amp; features is just one click away. You might find it using for lot of others projects even after this 2d game.&#xD;&#xA;&#xD;&#xA;There are other libraries too, but they lack community activity. &#xD;&#xA;&#xD;&#xA; * Genuts - last update 2004&#xD;&#xA; * PulpCore - last update 2009&#xD;&#xA; * GOLDEN T GAME ENGINE (GTGE) - last update 2010&#xD;&#xA; * Basilisk Game Library - last update 2009&#xD;&#xA;" />
  <row Id="36006" PostHistoryTypeId="25" PostId="13577" RevisionGUID="e023901f-af4f-4e27-9204-bce54bbb6ac9" CreationDate="2011-08-10T12:36:49.000" Comment="http://twitter.com/#!/StackGameDev/status/101270774517731328" />
  <row Id="36007" PostHistoryTypeId="2" PostId="15785" RevisionGUID="4471e2f7-de05-430e-a3f2-35bf03c07cda" CreationDate="2011-08-10T12:38:11.150" UserId="4894" Text="For your first question, my best guess would be to use an edge detection algorithm to find the limits of your natural regions (forest, hills, ...). Lots of algorithms exist for this kind of problem. &#xD;&#xA;&#xD;&#xA;For the second question, you could use your own idea to spawn a castle (usually on top of a hill for good defense, and near fresh water), then use a voronoi algorithm to have regions around each castle. You can use noise or your biomes limits to make the boundaries more realistic. " />
  <row Id="36008" PostHistoryTypeId="5" PostId="1259" RevisionGUID="dde65e9b-be3e-4383-9762-4bb05bb64a11" CreationDate="2011-08-10T12:55:20.260" UserId="7871" Comment="fixed the link to answers.unity3d.com" Text="  * [arteriamusic.com][1]&#xD;&#xA;  * [audiojungle.net][2]&#xD;&#xA;  * [beatsuite.com][3]&#xD;&#xA;  * [firstcom.com][4]&#xD;&#xA;  * [ibaudio.com][5]&#xD;&#xA;  * [instantroyaltyfreemusic.com][6]&#xD;&#xA;  * [istockaudio.com][7]&#xD;&#xA;  * [revostock.com][8]&#xD;&#xA;  * [sounddogs.com][9]&#xD;&#xA;  * [soundeffects.com][10]&#xD;&#xA;  * [soundsnap.com][11]&#xD;&#xA;  * [stockmusic.net][12]&#xD;&#xA;  * [tallarico.com][13]&#xD;&#xA;  * [AmppiStore][14]&#xD;&#xA;&#xD;&#xA;That's a list of the paid sources from [where can I find music/sound effects?][15], which see the link for more, including free sources.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.arteriamusic.com&#xD;&#xA;  [2]: http://www.audiojungle.net/&#xD;&#xA;  [3]: http://www.beatsuite.com/sounds/bsengine/advsearch.php?advgo=1&amp;sortby=date&#xD;&#xA;  [4]: http://www.firstcom.com/&#xD;&#xA;  [5]: http://www.ibaudio.com/&#xD;&#xA;  [6]: http://www.instantroyaltyfreemusic.com/&#xD;&#xA;  [7]: http://www.istockaudio.com/&#xD;&#xA;  [8]: http://www.revostock.com/&#xD;&#xA;  [9]: http://sounddogs.com&#xD;&#xA;  [10]: http://soundeffects.com&#xD;&#xA;  [11]: http://www.soundsnap.com/&#xD;&#xA;  [12]: http://www.stockmusic.net/&#xD;&#xA;  [13]: http://tallarico.com/&#xD;&#xA;  [14]: http://www.amppistore.com/&#xD;&#xA;  [15]: http://answers.unity3d.com/questions/7743/where-can-i-find-music-or-sound-effects-for-my-gam.html" />
  <row Id="36009" PostHistoryTypeId="5" PostId="15784" RevisionGUID="5efcbfb4-5d6a-4b64-819c-42bf71282447" CreationDate="2011-08-10T13:16:30.590" UserId="6877" Comment="added 12 characters in body" Text="Personally I am a big fan of [jMonkey Engine](http://jmonkeyengine.org/).Its a shader based &amp; geared toward high end games productions. Apart from this one [jGame](http://www.13thmonkey.org/~boris/jgame/) &amp; [Slick2D](http://slick.cokeandcode.com/index.php) is good for 2d games. [ligGDX](http://libgdx.badlogicgames.com/) might interest you.&#xD;&#xA;&#xD;&#xA;I will whole heartily suggest you to start with jMonkey Engine, cause its fun, easy to use , has a very active community and has an awesome [jMonkey Platform](http://jmonkeyengine.com/sdk/) which is build on top of Netbeans platform, where every update &amp; features is just one click away. You might find it using for lot of others projects even after this 2d game.&#xD;&#xA;&#xD;&#xA;There are other libraries too, but they lack community/development activity. &#xD;&#xA;&#xD;&#xA; * Genuts - last update 2004&#xD;&#xA; * PulpCore - last update 2009&#xD;&#xA; * GOLDEN T GAME ENGINE (GTGE) - last update 2010&#xD;&#xA; * Basilisk Game Library - last update 2009&#xD;&#xA;" />
  <row Id="36010" PostHistoryTypeId="5" PostId="15782" RevisionGUID="d2e7b755-5175-49cd-bd58-340d5017cd88" CreationDate="2011-08-10T13:35:45.350" UserId="20" Comment="changed spelling tags and title" Text="I just started reading about games, and I'm going to develop a game where a person is moving around on a 2D map. My preferred language is Java. Is that suitable to develop games? &#xD;&#xA;&#xD;&#xA;I'm going to develop a desktop app and need some help to get started. Can someone please give me some good resources for newbies?&#xD;&#xA;" />
  <row Id="36011" PostHistoryTypeId="4" PostId="15782" RevisionGUID="d2e7b755-5175-49cd-bd58-340d5017cd88" CreationDate="2011-08-10T13:35:45.350" UserId="20" Comment="changed spelling tags and title" Text="Looking for help developing a top-down 2D game in Java" />
  <row Id="36012" PostHistoryTypeId="6" PostId="15782" RevisionGUID="d2e7b755-5175-49cd-bd58-340d5017cd88" CreationDate="2011-08-10T13:35:45.350" UserId="20" Comment="changed spelling tags and title" Text="&lt;2d&gt;&lt;java&gt;" />
  <row Id="36013" PostHistoryTypeId="5" PostId="15784" RevisionGUID="4e5c8c94-1ffe-4a1a-bb66-564851a42c42" CreationDate="2011-08-10T14:13:44.343" UserId="6877" Comment="added 143 characters in body" Text="Personally I am a big fan of [jMonkey Engine](http://jmonkeyengine.org/).Its a shader based &amp; geared toward high end games productions. Apart from this one [jGame](http://www.13thmonkey.org/~boris/jgame/) &amp; [Slick2D](http://slick.cokeandcode.com/index.php) is good for 2d games. [ligGDX](http://libgdx.badlogicgames.com/) might interest you.&#xD;&#xA;&#xD;&#xA;There is no problem in choosing 3d engines for making 2d games. Just ignore that extra D, unless you have some serious issues with that one.&#xD;&#xA;&#xD;&#xA;So, I whole heartily suggest you to start with jMonkey Engine, cause its fun, easy to use , has a very active community and has an awesome [jMonkey Platform](http://jmonkeyengine.com/sdk/) which is build on top of Netbeans platform, where every update &amp; features is just one click away. You might find it using for lot of others projects even after this 2d game.&#xD;&#xA;&#xD;&#xA;There are other libraries too, but they lack community/development activity. &#xD;&#xA;&#xD;&#xA; * Genuts - last update 2004&#xD;&#xA; * PulpCore - last update 2009&#xD;&#xA; * GOLDEN T GAME ENGINE (GTGE) - last update 2010&#xD;&#xA; * Basilisk Game Library - last update 2009&#xD;&#xA;" />
  <row Id="36014" PostHistoryTypeId="2" PostId="15786" RevisionGUID="891d10de-6b84-4631-b162-ea40af7c40cc" CreationDate="2011-08-10T14:19:35.290" UserId="9173" Text="mybe irrlicht (http://code.google.com/p/pyirrlicht)" />
  <row Id="36015" PostHistoryTypeId="2" PostId="15787" RevisionGUID="445972f5-5d20-43c2-943c-fb7e9e541ec0" CreationDate="2011-08-10T14:23:57.730" UserId="7881" Text="[Amitp][1] suggests using [watersheds][2] to define various regions, as explained in his post on [polygonal map generation][3]. The watersheds are best seen by generating a map using his [demo][4]. The advantage of using watersheds to help subdivide continents is that it provides boundaries perpendicular to the shoreline, while mountains usually provide parallel boundaries.&#xD;&#xA;&#xD;&#xA;If I were subdividing regions, I would use a combination of mountains, watersheds, and edge detection on the various biomes on my map.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/2472/amitp&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Drainage_basin&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/&#xD;&#xA;  [4]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/mapgen2.swf" />
  <row Id="36016" PostHistoryTypeId="2" PostId="15788" RevisionGUID="22026653-3d68-4a6b-a49d-534d74ed0154" CreationDate="2011-08-10T14:25:38.957" UserId="9171" Text="I recently found this thing called DarkGDK for programmign 3D games is this something good or is this limited or something how good games i can make with it? &#xD;&#xA;I tried to find theese answears on the web but i didn't find any usefull information..&#xD;&#xA;&#xD;&#xA;Would be nice to clear my head and get some answears." />
  <row Id="36017" PostHistoryTypeId="1" PostId="15788" RevisionGUID="22026653-3d68-4a6b-a49d-534d74ed0154" CreationDate="2011-08-10T14:25:38.957" UserId="9171" Text="DarkGDK good or not?" />
  <row Id="36018" PostHistoryTypeId="3" PostId="15788" RevisionGUID="22026653-3d68-4a6b-a49d-534d74ed0154" CreationDate="2011-08-10T14:25:38.957" UserId="9171" Text="&lt;c++&gt;&lt;3d&gt;" />
  <row Id="36019" PostHistoryTypeId="5" PostId="8290" RevisionGUID="2d77029c-2ba6-44dc-a4d7-72b7a5fd8a53" CreationDate="2011-08-10T14:28:46.430" UserId="8771" Comment="improved structure and made title a question" Text="I want a straight 3d Python engine that's easily obtainable for linux and easy to use. Soya3D failed for me because of the lack of documentation. I should be able to load common 3D models without an issue.&#xD;&#xA;" />
  <row Id="36020" PostHistoryTypeId="4" PostId="8290" RevisionGUID="2d77029c-2ba6-44dc-a4d7-72b7a5fd8a53" CreationDate="2011-08-10T14:28:46.430" UserId="8771" Comment="improved structure and made title a question" Text="What's the best Python 3D engine?" />
  <row Id="36021" PostHistoryTypeId="24" PostId="8290" RevisionGUID="2d77029c-2ba6-44dc-a4d7-72b7a5fd8a53" CreationDate="2011-08-10T14:28:46.430" Comment="Proposed by 8771 approved by 14 edit id of 622" />
  <row Id="36022" PostHistoryTypeId="16" PostId="15782" RevisionGUID="6a7cc377-a21d-4ae5-8858-728f60f2ff61" CreationDate="2011-08-10T14:29:20.407" UserId="14" />
  <row Id="36023" PostHistoryTypeId="16" PostId="15784" RevisionGUID="36c9bafe-8fce-487d-af13-d0c23b4bcf53" CreationDate="2011-08-10T14:29:20.407" UserId="14" />
  <row Id="36024" PostHistoryTypeId="10" PostId="15788" RevisionGUID="845b3559-4b2d-44c5-aeff-80da6632f886" CreationDate="2011-08-10T14:31:20.183" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36025" PostHistoryTypeId="4" PostId="15735" RevisionGUID="1823c06a-fd8c-4496-a6e8-30e6095a91fb" CreationDate="2011-08-10T14:34:20.837" UserId="2188" Comment="generalised the title" Text="How can a game prevent people from running multiple instances of itself?" />
  <row Id="36026" PostHistoryTypeId="24" PostId="15735" RevisionGUID="1823c06a-fd8c-4496-a6e8-30e6095a91fb" CreationDate="2011-08-10T14:34:20.837" Comment="Proposed by 2188 approved by 14 edit id of 619" />
  <row Id="36027" PostHistoryTypeId="5" PostId="15769" RevisionGUID="5ce4c1fb-e5e8-40e5-aa8b-c777371674a0" CreationDate="2011-08-10T14:34:33.940" UserId="8771" Comment="made title a question and improved english" Text="I am trying to implement the collision detection and response in 3D car racing game.&#xD;&#xA;&#xD;&#xA;I have a car model, for collision I am assuming my car as a cuboid. my collision detection with walls is quite good and the response is also good. My model has a velocity, position, acceleration and orientation. I am using matrix to save the orientation and position.&#xD;&#xA;&#xD;&#xA;My problem is collision and its response with the ground (in my case it's road). When the ground is a simple plane with a constant y-axis, then there is no need for collision detection as there is no force or movement in the y direction. But if my road is not linear, if it has some elevation, then I am having a collision detection problem when it comes to calculating its orientation.&#xD;&#xA;&#xD;&#xA;Any help and suggestions will be of great help. " />
  <row Id="36028" PostHistoryTypeId="4" PostId="15769" RevisionGUID="5ce4c1fb-e5e8-40e5-aa8b-c777371674a0" CreationDate="2011-08-10T14:34:33.940" UserId="8771" Comment="made title a question and improved english" Text="Can you help with collision detection and response in a 3D car racing game?" />
  <row Id="36029" PostHistoryTypeId="24" PostId="15769" RevisionGUID="5ce4c1fb-e5e8-40e5-aa8b-c777371674a0" CreationDate="2011-08-10T14:34:33.940" Comment="Proposed by 8771 approved by 14 edit id of 624" />
  <row Id="36030" PostHistoryTypeId="5" PostId="15787" RevisionGUID="a5f6531e-ae0e-4dba-b7e0-741b4e03c1eb" CreationDate="2011-08-10T14:35:03.363" UserId="7881" Comment="added 549 characters in body" Text="[Amitp][1] suggests using [watersheds][2] to define various regions, as explained in his post on [polygonal map generation][3]. The watersheds are best seen by generating a map using his [demo][4]. The advantage of using watersheds to help subdivide continents is that it provides boundaries perpendicular to the shoreline, while mountains usually provide parallel boundaries.&#xD;&#xA;&#xD;&#xA;If I were subdividing geographic regions, I would use a combination of mountains, watersheds, and edge detection on the various biomes on my map.&#xD;&#xA;&#xD;&#xA;I'll also point out that political regions generally span many geographic regions. I would generate geographic regions first, then assign each region a desirability rating (is it a cost? is there gold? good farm land?) and travel cost (steep terrain? heavy woods?.) Then using your favorite pathing algorithm, generate a heatmap of travel between desirable regions. These will end up being your roads, and you can build your political boundaries from there. These boundaries will generally have many roads within them, and less roads between them.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/2472/amitp&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Drainage_basin&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/&#xD;&#xA;  [4]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/mapgen2.swf" />
  <row Id="36031" PostHistoryTypeId="4" PostId="15782" RevisionGUID="f02efedf-fb1d-4ffd-8ed0-ae05393343f8" CreationDate="2011-08-10T14:35:13.050" UserId="8771" Comment="made title a question" Text="Can I develop a top-down 2D game in Java?" />
  <row Id="36032" PostHistoryTypeId="24" PostId="15782" RevisionGUID="f02efedf-fb1d-4ffd-8ed0-ae05393343f8" CreationDate="2011-08-10T14:35:13.050" Comment="Proposed by 8771 approved by -1 edit id of 623" />
  <row Id="36033" PostHistoryTypeId="4" PostId="15782" RevisionGUID="4249c9e4-72fe-493c-a061-ba52ee2ab3d6" CreationDate="2011-08-10T14:35:13.143" UserId="14" Comment="made title a question" Text="Can you help me find resources for developing a top-down 2D game in Java?" />
  <row Id="36034" PostHistoryTypeId="25" PostId="15775" RevisionGUID="5f250ca6-2f15-47e2-b23f-07ccc1fdfe3e" CreationDate="2011-08-10T14:36:49.520" Comment="http://twitter.com/#!/StackGameDev/status/101300977906352129" />
  <row Id="36035" PostHistoryTypeId="5" PostId="15787" RevisionGUID="46997734-c825-418f-ba20-140362cb8869" CreationDate="2011-08-10T14:43:12.793" UserId="7881" Comment="added 1 characters in body" Text="[Amitp][1] suggests using [watersheds][2] to define various regions, as explained in his post on [polygonal map generation][3]. The watersheds are best seen by generating a map using his [demo][4]. The advantage of using watersheds to help subdivide continents is that it provides boundaries perpendicular to the shoreline, while mountains usually provide parallel boundaries.&#xD;&#xA;&#xD;&#xA;If I were subdividing geographic regions, I would use a combination of mountains, watersheds, and edge detection on the various biomes on my map.&#xD;&#xA;&#xD;&#xA;I'll also point out that political regions generally span many geographic regions. I would generate geographic regions first, then assign each region a desirability rating (is it a coast? is there gold? good farm land?) and travel cost (steep terrain? heavy woods?.) Then using your favorite pathing algorithm, generate a heatmap of travel between desirable regions. These will end up being your roads, and you can build your political boundaries from there. These boundaries will generally have many roads within them, and less roads between them.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/2472/amitp&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Drainage_basin&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/&#xD;&#xA;  [4]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/mapgen2.swf" />
  <row Id="36036" PostHistoryTypeId="4" PostId="15776" RevisionGUID="287f4927-b056-4cf9-96ed-e0b0196eb427" CreationDate="2011-08-10T14:49:56.903" UserId="5473" Comment="edited title" Text="Google's ForPlay library, where does it fall down?" />
  <row Id="36037" PostHistoryTypeId="2" PostId="15789" RevisionGUID="92cea40a-34b2-49c8-b353-db1dba947823" CreationDate="2011-08-10T14:50:45.873" UserId="20" Text="I never used it, but one point against using it is certainly that it's currently at alpha stage, there's basically no documentation and Android support is broken.&#xD;&#xA;&#xD;&#xA;From the presentation video it seems like audio support/capabilities is kinda bad. Also there's no socket support (yet).&#xD;&#xA;&#xD;&#xA;As with every language that provides a high abstraction layer, you're going to sacrifice some performance. In this special case a lot depends on the &quot;compiler&quot; that will generate the native code for the platform. No problem for Android, since Java is already the native language there, the JavaScript compiler seems to be very good, just the Flash output is not at a level that is comparable to a native app.&#xD;&#xA;&#xD;&#xA;You'll also have to consider that to create a game that actually runs on all platforms by simply swapping the &quot;main&quot; class (as demonstrated in the video), you're also going to have to restrict yourself to the common capabilities of the target platforms. That might mean that you cannot use multi-touch as a core gameplay element, or keyboard input etc. unless you start to code some platform specific bits. But that's a problem all cross-platform developers are going to face.&#xD;&#xA;&#xD;&#xA;These are some &quot;generic&quot; cons to consider. But the project looks interesting and could provide a great platform to deploy to HTML5, Android, Desktop and Flash once it enters a more mature stage." />
  <row Id="36038" PostHistoryTypeId="4" PostId="15775" RevisionGUID="a13321db-8f67-4b42-8e3f-16a27ebfddf8" CreationDate="2011-08-10T14:52:55.377" UserId="1430" Comment="edited title" Text="How can I identify feature regions in a procedurally generated world?" />
  <row Id="36039" PostHistoryTypeId="2" PostId="15790" RevisionGUID="16197537-c5e8-47b5-bab3-8d8c4d112901" CreationDate="2011-08-10T14:56:00.723" UserId="8781" Text="What pros or cons should a beginner be aware of when deciding between a 2d game engine (like Slick2D/Flixel/FlashPunk) and a 3d engine (like Unity) for 2d game development?&#xD;&#xA;&#xD;&#xA;I am just getting started in indie game development, though I have dabbled a bit with Game Maker, Flash, and XNA in the past. I've heard a lot of positive things about Unity, and its cross-platform nature makes it appealing, but as I understand, it's a 3d engine at its core.&#xD;&#xA;&#xD;&#xA;For a strictly 2d game, are there any compelling reasons to work with a 3d engine like Unity? Or would it just add unneeded complexity to my initial learning experience?" />
  <row Id="36040" PostHistoryTypeId="1" PostId="15790" RevisionGUID="16197537-c5e8-47b5-bab3-8d8c4d112901" CreationDate="2011-08-10T14:56:00.723" UserId="8781" Text="What are the pros/cons of using a 3d engine for 2d games?" />
  <row Id="36041" PostHistoryTypeId="3" PostId="15790" RevisionGUID="16197537-c5e8-47b5-bab3-8d8c4d112901" CreationDate="2011-08-10T14:56:00.723" UserId="8781" Text="&lt;2d&gt;&lt;3d&gt;&lt;engine&gt;" />
  <row Id="36042" PostHistoryTypeId="5" PostId="15781" RevisionGUID="5daed38f-7ebf-40a1-a45a-d4efb1c5f078" CreationDate="2011-08-10T14:56:48.413" UserId="1430" Comment="deleted 2 characters in body; edited title" Text="As a Direct3D developer I can use the ID3DXSprite class (in D3DX library) for drawing 2D graphics. What's the best way to implement this functionality in OpenGL?" />
  <row Id="36043" PostHistoryTypeId="4" PostId="15781" RevisionGUID="5daed38f-7ebf-40a1-a45a-d4efb1c5f078" CreationDate="2011-08-10T14:56:48.413" UserId="1430" Comment="deleted 2 characters in body; edited title" Text="What is an OpenGL equivalent to ID3DXSprite?" />
  <row Id="36044" PostHistoryTypeId="4" PostId="15670" RevisionGUID="e583915b-c891-404e-8f4f-81aa5fe7a5c7" CreationDate="2011-08-10T14:58:27.287" UserId="1430" Comment="edited title" Text="How can I draw multiple lines connected via &quot;nodes&quot; with SlimDX?" />
  <row Id="36045" PostHistoryTypeId="2" PostId="15791" RevisionGUID="be9780c7-b6f2-4f29-9d96-bbbe9014a52d" CreationDate="2011-08-10T15:13:39.587" UserId="1430" Text="One big drawback *is* the extra complexity -- 3D engines don't always have the same level of first-class support for 2D graphics as dedicated 2D engines would. This means that it's either a lot of extra work to deal with composing and managing a 2D scene, and/or you're still having to deal with the complexity of the 3D math and transformation pipeline. Especially if you're not entirely familiar with the fundamentals of 3D graphics theory, you can find yourself lost and confused when your images don't show up and if you are not careful, you can stumble on to a &quot;solution&quot; that makes your images appear but isn't necessarily correct (and will thus bite you later on).&#xD;&#xA;&#xD;&#xA;But beyond the human aspect, as long as the 3D engine has the tools you need to build your 2D game, it's not a *bad* idea to use one. They are far more prevalent these days and tend to be developed more aggressively, so that's a plus. Additionally there are probably still a handful of 2D-focused engines or frameworks out there that aren't using D3D or OpenGL behind the scenes, and thus may not be getting the benefits of modern GPUs.&#xD;&#xA;&#xD;&#xA;[In this related question][1] you can see a lot of discussion about what might make 3D more difficult (you will only have to deal with a subset of that were you to only use the 3D engine for a 2D game though).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/631/what-to-consider-when-deciding-on-2d-vs-3d-for-a-game" />
  <row Id="36046" PostHistoryTypeId="5" PostId="15787" RevisionGUID="8b460d91-f2c8-4061-ba1e-bb7f333ef270" CreationDate="2011-08-10T15:16:18.913" UserId="7881" Comment="added 78 characters in body" Text="[Amitp][1] suggests using [watersheds][2] to define various regions, as explained in his post on [polygonal map generation][3]. The watersheds are best seen by generating a map using his [demo][4]. The advantage of using watersheds to help subdivide continents is that it provides boundaries perpendicular to the shoreline, while mountains usually provide parallel boundaries.&#xD;&#xA;&#xD;&#xA;If I were subdividing geographic regions, I would use a combination of mountains, watersheds, and edge detection on the various biomes on my map.&#xD;&#xA;&#xD;&#xA;I'll also point out that political regions generally span many geographic regions. I would generate geographic regions first, then assign each region a desirability rating (is it a coast? is there gold? good farm land?) and travel cost (steep terrain? heavy woods?.) Then using your [favorite pathing algorithm][5], generate a heatmap of travel between desirable regions. These will end up being your roads, and you can build your political boundaries from there. These boundaries will generally have many roads within them, and less roads between them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/2472/amitp&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Drainage_basin&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/&#xD;&#xA;  [4]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/mapgen2.swf&#xD;&#xA;  [5]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#paths" />
  <row Id="36047" PostHistoryTypeId="2" PostId="15792" RevisionGUID="45ebafdb-efbc-4ee9-bdfa-442c46e86b60" CreationDate="2011-08-10T15:24:41.523" UserId="9178" Text="hi i am trying to create my online chess game &#xD;&#xA;&#xD;&#xA;It's work good for 2 players work on the same pc &#xD;&#xA;&#xD;&#xA;but if i want publish as web app how i can transfer the move from user to another &#xD;&#xA;&#xD;&#xA;and the another to see this move &#xD;&#xA;&#xD;&#xA;sorry 4 my bad english &#xD;&#xA;&#xD;&#xA;" />
  <row Id="36048" PostHistoryTypeId="1" PostId="15792" RevisionGUID="45ebafdb-efbc-4ee9-bdfa-442c46e86b60" CreationDate="2011-08-10T15:24:41.523" UserId="9178" Text="How to transfer a move from a user to another and how he can see the move" />
  <row Id="36049" PostHistoryTypeId="3" PostId="15792" RevisionGUID="45ebafdb-efbc-4ee9-bdfa-442c46e86b60" CreationDate="2011-08-10T15:24:41.523" UserId="9178" Text="&lt;programming&gt;&lt;actionscript-3&gt;&lt;flex&gt;" />
  <row Id="36050" PostHistoryTypeId="2" PostId="15793" RevisionGUID="cb92882e-0505-42ad-b1aa-b33cf0a63c63" CreationDate="2011-08-10T15:25:28.070" UserId="1964" Text="I had a concept for a game come to me this morning but I can't figure out how I'd go about implementing the movement.&#xD;&#xA;&#xD;&#xA;The general idea involves the left and right controls causing a sprite to go round the center of the plane/(or the centre of the game area) in an orbit rather than moving left and right and the up and down will cause the orbit distance to either increase or decrease unless there is something in the way.&#xD;&#xA;&#xD;&#xA;The best way I can think of doing this would be to maintain the polar coordinates of my sprite and convert that to Cartesian coordinates for drawing. Would that work? Is there an easier way?&#xD;&#xA;&#xD;&#xA;Also how would I go about ensuring that the sprite was rotated such that it was at a right angle to the line from the center point?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Would I be better off implementing this using gravity and a using a repelling force to keep the character at the desired distance? If so How would I go about doing this?" />
  <row Id="36051" PostHistoryTypeId="1" PostId="15793" RevisionGUID="cb92882e-0505-42ad-b1aa-b33cf0a63c63" CreationDate="2011-08-10T15:25:28.070" UserId="1964" Text="How do you get an object to orbit around a certain point on a 2d plane?" />
  <row Id="36052" PostHistoryTypeId="3" PostId="15793" RevisionGUID="cb92882e-0505-42ad-b1aa-b33cf0a63c63" CreationDate="2011-08-10T15:25:28.070" UserId="1964" Text="&lt;movement&gt;&lt;coordinates&gt;" />
  <row Id="36053" PostHistoryTypeId="5" PostId="15784" RevisionGUID="4ba1df67-77f1-4ff4-a3ee-f0df18f5e591" CreationDate="2011-08-10T15:27:14.890" UserId="6877" Comment="added 13 characters in body" Text="Personally I am a big fan of [jMonkey Engine](http://jmonkeyengine.org/).Its a shader based &amp; geared toward high end games productions. [jGame](http://www.13thmonkey.org/~boris/jgame/) &amp; [Slick2D](http://slick.cokeandcode.com/index.php) are very good for 2d games. [ligGDX](http://libgdx.badlogicgames.com/) might interest you. All of these are under very active development.&#xD;&#xA;&#xD;&#xA;There is no problem in choosing 3d engines for making 2d games. Just ignore that extra D, unless you have some serious issues with that one.&#xD;&#xA;&#xD;&#xA;So, I whole heartily suggest you to start with jMonkey Engine, cause its fun, easy to use, has a very active community and comes with an awesome [jMonkey Platform](http://jmonkeyengine.com/sdk/) which is build on top of Netbeans platform, where every update &amp; features is just one click away. You might end up in using it with many other projects.&#xD;&#xA;&#xD;&#xA;There are other libraries too, but they lack community/development activity. &#xD;&#xA;&#xD;&#xA; * Genuts - last update 2004&#xD;&#xA; * PulpCore - last update 2009&#xD;&#xA; * GOLDEN T GAME ENGINE (GTGE) - last update 2010&#xD;&#xA; * Basilisk Game Library - last update 2009&#xD;&#xA;" />
  <row Id="36054" PostHistoryTypeId="6" PostId="15793" RevisionGUID="445aef7b-e389-4b59-a26d-336ada93250a" CreationDate="2011-08-10T15:37:04.837" UserId="1964" Comment="edited tags" Text="&lt;math&gt;&lt;movement&gt;&lt;coordinates&gt;" />
  <row Id="36055" PostHistoryTypeId="2" PostId="15794" RevisionGUID="328186c4-a508-4ce1-8063-86a31815b555" CreationDate="2011-08-10T15:38:50.080" UserId="3051" Text="Unless you're going to have so much going on that the speed of trig functions is going to be a concern, I think focusing on a Polar system will be sufficient.&#xD;&#xA;&#xD;&#xA;Storing the angle and distance-from-center for your sprite (`Theta` and `R`, respectively) will make the logic for moving based on Left, Right, Up, and Down understandable: Moving Left and Right would change your angle while Up and Down change the distance.&#xD;&#xA;&#xD;&#xA;To draw the sprite, converting to Cartesian coordinates is pretty straight forward: `x = R cos(Theta)` and `y = R sin(Theta)` (plus some offset to rotate around the center of the screen/playing area/whatever).&#xD;&#xA;&#xD;&#xA;Rotation of the sprite would simply be based on the `Theta` you're already storing.  Either exactly equal to or plus a constant, depending on the initial orientation of the sprite." />
  <row Id="36056" PostHistoryTypeId="5" PostId="15784" RevisionGUID="98f7f264-f016-4c45-a8b9-c7c4fc5c85f6" CreationDate="2011-08-10T15:39:16.340" UserId="6877" Comment="added 168 characters in body" Text="Personally I am a big fan of [jMonkey Engine](http://jmonkeyengine.org/).Its a shader based &amp; geared toward high end games productions. [jGame](http://www.13thmonkey.org/~boris/jgame/) &amp; [Slick2D](http://slick.cokeandcode.com/index.php) are very good for 2d games. [ligGDX](http://libgdx.badlogicgames.com/) might interest you. All of these are under very active development.&#xD;&#xA;&#xD;&#xA;There is no problem in choosing 3d engines for making 2d games. Just ignore that extra D, unless you have some serious issues with that one.&#xD;&#xA;&#xD;&#xA;So, I whole heartily suggest you to start with jMonkey Engine, cause its fun, easy to use, has a very active community and comes with an awesome [jMonkey Platform](http://jmonkeyengine.com/sdk/) which is build on top of Netbeans platform, where every update &amp; features is just one click away. You might end up in using it with many other projects.&#xD;&#xA;&#xD;&#xA;There are other libraries too, but they lack community/development activity. &#xD;&#xA;&#xD;&#xA; * Genuts - last update 2004&#xD;&#xA; * PulpCore - last update 2009&#xD;&#xA; * GOLDEN T GAME ENGINE (GTGE) - last update 2010&#xD;&#xA; * Basilisk Game Library - last update 2009&#xD;&#xA;&#xD;&#xA;You can write your own engine if want to.Then you should use opengl wrapper library, either [LWJGL](http://lwjgl.org/) or JOGL. Lwjgl is more widely used then JOGL.&#xD;&#xA;" />
  <row Id="36057" PostHistoryTypeId="2" PostId="15795" RevisionGUID="e424f158-c5f2-415d-bedd-53fde02c3ed6" CreationDate="2011-08-10T15:44:31.947" UserId="9175" Text="Are there (or can someone recommend) any minimalistic JavaScript based libraries for sprite(s) manipulation? Preferably DOM oriented." />
  <row Id="36058" PostHistoryTypeId="1" PostId="15795" RevisionGUID="e424f158-c5f2-415d-bedd-53fde02c3ed6" CreationDate="2011-08-10T15:44:31.947" UserId="9175" Text="Minimalistic JavaScript sprite manipulation libraries" />
  <row Id="36059" PostHistoryTypeId="3" PostId="15795" RevisionGUID="e424f158-c5f2-415d-bedd-53fde02c3ed6" CreationDate="2011-08-10T15:44:31.947" UserId="9175" Text="&lt;sprites&gt;&lt;javascript&gt;&lt;libraries&gt;" />
  <row Id="36060" PostHistoryTypeId="2" PostId="15796" RevisionGUID="ea16f3d9-4025-4055-9c60-8b58a9f6cfaa" CreationDate="2011-08-10T15:49:43.177" UserId="2472" Text="To add to [Dan Rasmussen's][1] answer: &#xD;&#xA;&#xD;&#xA;One of the main reasons I switched from Perlin Noise ([this project][2]) to using polygons ([this project][3]) is that polygons provide some nice *structure* for assigning larger areas (political regions, forests, deserts, named areas, boundaries, etc.). Starting with the structure and then generating the map is similar to polygon rendering — something that is relatively easy. Starting with the map and then inferring the structure is similar to computer vision — something that is relatively hard, but possible.  I want both the structure and the map so I decided to go the relatively easy route of building a map on top of the structure (nodes and edges).&#xD;&#xA;&#xD;&#xA;Even then, I found that I wanted larger structures than what I had generated. Watersheds were one attempt to build those larger structures but I need to try more approaches of grouping polygons together. I haven't found something I'm happy with.&#xD;&#xA;&#xD;&#xA;I'm not sure how Dwarf Fortress does it. Given how brilliant those guys are I wouldn't be surprised if they have a sophisticated “computer vision” type of algorithm.&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/users/7881/dan-rasmussen&#xD;&#xA;  [2]: http://simblob.blogspot.com/2010/01/simple-map-generation.html&#xD;&#xA;  [3]: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/" />
  <row Id="36061" PostHistoryTypeId="2" PostId="15797" RevisionGUID="052f0aff-c88e-424f-87f6-e6574cf79a66" CreationDate="2011-08-10T16:01:24.257" UserId="1964" Text="Following on [from my question about moving a sprite in a circle][1], assuming that you have a maze which is shaped like a a set of circles with holes in them and barriers between them.&#xD;&#xA;&#xD;&#xA;Location of a sprite is stored in polar coordinates and then translated into cartesian coordinates to be rendered.&#xD;&#xA;&#xD;&#xA;I'm going to assume that most path finding algorithms rely on cartesian geometry, is there a path finding algorithm I can use to allow &quot;beasties&quot; to chase my players sprite? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/q/15793/1964" />
  <row Id="36062" PostHistoryTypeId="1" PostId="15797" RevisionGUID="052f0aff-c88e-424f-87f6-e6574cf79a66" CreationDate="2011-08-10T16:01:24.257" UserId="1964" Text="Path-finding algorithms for Polar coordinate based maze?" />
  <row Id="36063" PostHistoryTypeId="3" PostId="15797" RevisionGUID="052f0aff-c88e-424f-87f6-e6574cf79a66" CreationDate="2011-08-10T16:01:24.257" UserId="1964" Text="&lt;path-finding&gt;&lt;coordinates&gt;" />
  <row Id="36064" PostHistoryTypeId="2" PostId="15798" RevisionGUID="d7b4459e-f655-43a1-86c7-88cd6c918701" CreationDate="2011-08-10T16:30:09.350" UserId="4584" Text="How can I draw a 2D sprite to look like it's at a particular placement in the 3D world?&#xD;&#xA;&#xD;&#xA;My goal is to use this as loose items in the world.&#xD;&#xA;&#xD;&#xA;Minecraft Example: https://lh6.googleusercontent.com/-HMk5tW_cI-Y/TiYx71XkwtI/AAAAAAAAAZQ/jeaTfiMW1Ow/2011-07-19_20.26.18.png" />
  <row Id="36065" PostHistoryTypeId="1" PostId="15798" RevisionGUID="d7b4459e-f655-43a1-86c7-88cd6c918701" CreationDate="2011-08-10T16:30:09.350" UserId="4584" Text="2D sprites in 3D space?" />
  <row Id="36066" PostHistoryTypeId="3" PostId="15798" RevisionGUID="d7b4459e-f655-43a1-86c7-88cd6c918701" CreationDate="2011-08-10T16:30:09.350" UserId="4584" Text="&lt;xna&gt;&lt;sprites&gt;" />
  <row Id="36067" PostHistoryTypeId="2" PostId="15799" RevisionGUID="aa508c75-656b-4f7a-8b03-ca58cd3dcac8" CreationDate="2011-08-10T16:31:40.810" UserId="3081" Text="The exact geometry doesn't matter for path-finding algorithms.  All that matters are connections between nodes.  Applying any traditionally-Cartesian path-finding algorithm to your polar coordinates should be seamless--the algorithm doesn't care whether `x` and `y` are *actually* `angle` and `distance`." />
  <row Id="36068" PostHistoryTypeId="2" PostId="15800" RevisionGUID="a1a56554-8b59-4a4a-8c57-cfd6a12ad7d7" CreationDate="2011-08-10T16:35:11.140" UserId="7946" Text="Actually, &quot;most pathfinding algorithms&quot; don't rely on any specific set of coordinate systems at all. &#xD;&#xA;&#xD;&#xA;Most algorithms, like the most widely spread and probably most popular of them, the [A*][1] algorithm, just rely on a set of connected nodes in a graph and functions which estimate or straight up calculate the cost of moving from one node to another. &#xD;&#xA;&#xD;&#xA;The awesome thing about this is that they work anywhere, in any kind of space or structure that you can imagine, as long as you have a way of calculating the cost of moving from one node to another.&#xD;&#xA;&#xD;&#xA;As an answer to your question: You can (for example) use A* and construct your circle-y maze as a graph where the nodes are simply points on the imaginary circles that run through your maze, and the heuristic functions can still be based on the distance between two nodes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A-star" />
  <row Id="36069" PostHistoryTypeId="2" PostId="15801" RevisionGUID="57999d38-8fca-405e-aeb8-d112d363389f" CreationDate="2011-08-10T16:36:48.760" UserId="3081" Text="Traditionally, this is done by rendering a single quad with the sprite applied to it as a texture.  The quad is generally rotated so that it always faces the player (usually only around the vertical axis)." />
  <row Id="36070" PostHistoryTypeId="25" PostId="7228" RevisionGUID="80627e02-17ec-4394-83c5-897fb87adb72" CreationDate="2011-08-10T16:36:50.270" Comment="http://twitter.com/#!/StackGameDev/status/101331177587220480" />
  <row Id="36071" PostHistoryTypeId="2" PostId="15802" RevisionGUID="a17b55e8-9384-4d9a-8aa6-cb6841aa7838" CreationDate="2011-08-10T16:38:31.233" UserId="1430" Text="You'd render a quad in 3D space, using the sprite as the texture for that quad. You can [billboard][1] that quad so that it always faces the player (this is what Minecraft does for its non-block inventory items when they're on the ground, if I recall correctly).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://blogs.msdn.com/b/shawnhar/archive/2011/01/12/spritebatch-billboards-in-a-3d-world.aspx" />
  <row Id="36072" PostHistoryTypeId="5" PostId="15792" RevisionGUID="e9b7a253-f70c-443c-9f1e-0be15636e700" CreationDate="2011-08-10T16:54:55.730" UserId="5311" Comment="Fixed grammar" Text="Hi.  I am trying to create an online chess game.  It works well when I have two players on the same PC, but I want to publish it as a web app.  How can I transmit a move or action from one user to another, such that the other user sees what the first one did?" />
  <row Id="36073" PostHistoryTypeId="24" PostId="15792" RevisionGUID="e9b7a253-f70c-443c-9f1e-0be15636e700" CreationDate="2011-08-10T16:54:55.730" Comment="Proposed by 5311 approved by -1 edit id of 625" />
  <row Id="36074" PostHistoryTypeId="5" PostId="15792" RevisionGUID="d144f719-d73a-4f31-9481-f6a7fdf4a672" CreationDate="2011-08-10T16:54:55.997" UserId="1430" Comment="title" Text="I am trying to create an online chess game.  It works well when I have two players on the same PC, but I want to publish it as a web app.  How can I transmit a move or action from one user to another, such that the other user sees what the first one did?" />
  <row Id="36075" PostHistoryTypeId="4" PostId="15792" RevisionGUID="d144f719-d73a-4f31-9481-f6a7fdf4a672" CreationDate="2011-08-10T16:54:55.997" UserId="1430" Comment="title" Text="How can I transmit move information from player to player in a web application?" />
  <row Id="36076" PostHistoryTypeId="2" PostId="15803" RevisionGUID="e887b52a-fdc7-45d0-a3fb-4040034d2a45" CreationDate="2011-08-10T16:57:27.430" UserId="9179" Text="iamcreasy gave you some great examples of some engines to use for making a game in Java. They will definitely be helpful in your development process.&#xD;&#xA;&#xD;&#xA;I wanted to give you a link to a good set of tutorials for 2D games in Java, without any engines. It walks through how to create some of the classics (like Tetris) in Java. The author walks you through them, explains the code, and is in general, a very big help.&#xD;&#xA;&#xD;&#xA;You can find the above-mention tutorials here: [http://zetcode.com/tutorials/javagamestutorial/][1]&#xD;&#xA;&#xD;&#xA;Hope this was a help, and good luck.&#xD;&#xA;&#xD;&#xA;  [1]: http://zetcode.com/tutorials/javagamestutorial/" />
  <row Id="36077" PostHistoryTypeId="16" PostId="15803" RevisionGUID="205711f8-4c24-4cc9-99dc-574bb5230674" CreationDate="2011-08-10T16:57:27.430" UserId="9179" />
  <row Id="36079" PostHistoryTypeId="2" PostId="15805" RevisionGUID="4dfb98e2-062f-482a-b978-dd2666e85807" CreationDate="2011-08-10T17:48:22.233" UserId="7911" Text="Pro:&#xD;&#xA;More effort is spent by video card manufacturers optimizing their 3D drivers.&#xD;&#xA;You're not stuck in 2D for special FX or fluorishes.&#xD;&#xA;You don't have to simulate over-and-under yourself.&#xD;&#xA;Switching viewpoints doesn't require a complete re-do of all your art.&#xD;&#xA;I'll argue that 3D scales better visually.&#xD;&#xA;&#xD;&#xA;Con:&#xD;&#xA;Asset pipelines will probably have to be adapted to your engine.&#xD;&#xA;Some operations that are simple in 2D are more complex in 3D.&#xD;&#xA;Libraries will probably have extra functionality that you'll never use.&#xD;&#xA;" />
  <row Id="36081" PostHistoryTypeId="5" PostId="15792" RevisionGUID="1d36a460-ca82-4b5f-b1aa-be798b32e96e" CreationDate="2011-08-10T17:55:57.847" UserId="3830" Comment="Added explicit mention of platform" Text="I am trying to create an online chess game using ActionScript and Flex.  It works well when I have two players on the same PC, but I want to publish it as a web app.  How can I transmit a move or action from one user to another, such that the other user sees what the first one did?" />
  <row Id="36082" PostHistoryTypeId="2" PostId="15806" RevisionGUID="383d129c-08c4-4868-81f4-64b7e952675b" CreationDate="2011-08-10T17:56:07.700" UserId="9180" Text="I realize that this will depend on a game-to-game, situation-to-situation basis and that this is not a very technical question, but I remember hearing in a tech podcast a few years ago that inflated numbers of points (e.g. 1000 points vs. 1 points) was preferable in games because it was either a standard or because it had been shown to produce better feedback/experience from users. Either case, it seemed to make users happier than lower numbers of points.&#xD;&#xA;&#xD;&#xA;I have since been unable to find supportive evidence either way for the theory that inflating scores can keep the user engaged.&#xD;&#xA;&#xD;&#xA;Is this inflated-point theory true? Where can I find more information about this?" />
  <row Id="36083" PostHistoryTypeId="1" PostId="15806" RevisionGUID="383d129c-08c4-4868-81f4-64b7e952675b" CreationDate="2011-08-10T17:56:07.700" UserId="9180" Text="Score theory - will inflating scores make the user of the game happier?" />
  <row Id="36084" PostHistoryTypeId="3" PostId="15806" RevisionGUID="383d129c-08c4-4868-81f4-64b7e952675b" CreationDate="2011-08-10T17:56:07.700" UserId="9180" Text="&lt;leaderboards&gt;&lt;feedback&gt;&lt;experience&gt;" />
  <row Id="36085" PostHistoryTypeId="2" PostId="15807" RevisionGUID="59d74052-a631-4f3c-b45d-c6d72666be27" CreationDate="2011-08-10T18:01:40.457" UserId="7981" Text="See [Graph and tree search algorithms on Wikipedia][1]. They are pretty much just a variations of State Space Search, You just have to go trough all of these and find where they differ.&#xD;&#xA;&#xD;&#xA;There is also [Collaborative Diffusion][2]. Which is one of previously mentioned algorithms done interesting way.&#xD;&#xA;&#xD;&#xA;[1]:http://en.wikipedia.org/wiki/Tree_traversal&#xD;&#xA;[2]:http://scalablegamedesign.cs.colorado.edu/wiki/Collaborative_Diffusion" />
  <row Id="36086" PostHistoryTypeId="2" PostId="15808" RevisionGUID="f6d8e278-120f-47ff-b5cf-9962937884b0" CreationDate="2011-08-10T18:03:34.420" UserId="3830" Text="You will need some kind of server in the middle to manage the game state and transmit game data to the players.  &#xD;&#xA;&#xD;&#xA;The server's role is to take a player's move, make sure it is legal, update the board state based on the move, then push that change out to the other player so their game updates.  &#xD;&#xA;&#xD;&#xA;As far as technology goes, check out SmartFoxServer (http://www.smartfoxserver.com/) - something like it would do very well as your back-end technology.&#xD;&#xA;&#xD;&#xA;Additionally, a quick Google search of &quot;open source chess server&quot; shows quite a few of them exist.  You might be better off leveraging someone else's work.  Remember, the server's job is not just to pass messages between game clients.  It also has to confirm that all moves are legal, and that players aren't trying to cheat by sending illegal moves. " />
  <row Id="36087" PostHistoryTypeId="2" PostId="15809" RevisionGUID="cf2a032d-9e03-4b9a-9eb8-203e3fd11ad4" CreationDate="2011-08-10T18:06:08.280" UserId="7911" Text="Experiment.&#xD;&#xA;&#xD;&#xA;Make two games, differing only in the graphics and scoring systems.  Give these games to your friends, ask which they liked better.&#xD;&#xA;" />
  <row Id="36088" PostHistoryTypeId="2" PostId="15810" RevisionGUID="7594b50b-0bfa-43dc-86bc-dc5bc67fefd5" CreationDate="2011-08-10T18:13:06.077" UserId="9134" Text="A quick 'n' cheesy way goes something like:&#xD;&#xA;&#xD;&#xA; - Enable alpha blending&#xD;&#xA; - Set your source blend factor to one minus dest color&#xD;&#xA; - Set your dest blend factor to one minus source alpha&#xD;&#xA; - Set your blend equation to additive&#xD;&#xA; - Draw the sprite as normal&#xD;&#xA; - Disable any states you need to disable&#xD;&#xA;&#xD;&#xA;Just tested this (in OpenGL, not XNA, but the principle is the same) and it works well enough." />
  <row Id="36089" PostHistoryTypeId="2" PostId="15811" RevisionGUID="e0f490dc-042e-4066-80de-aaaf8c780b00" CreationDate="2011-08-10T18:19:43.647" UserId="6558" Text="It depends on the game, but for the most part, it will be easier to make a strictly 2d game using an engine that is specifically designed for 2d.&#xD;&#xA;&#xD;&#xA;Now for some of the pros and cons (some of these will be related to Unity specifically, some of them are more general)&#xD;&#xA;&#xD;&#xA;## Cons ##&#xD;&#xA;&#xD;&#xA; 1. 3d engines are usually designed around game objects being 3d models (polygons and textures).  While it's certainly possible to make a flat plane and apply a texture to it, you're actively working against the engine when you do that.&#xD;&#xA;&#xD;&#xA; 2. Additionally, many 3d engines lack the ability to deal with sprite sheets (all frames of animation on one texture), because they expect animation to act on the model (though rigging and other methods), not the texture.  Again, there's ways around this, but again, you're actively working against the engine to accomplish this.&#xD;&#xA;&#xD;&#xA; 3. Added complexity.  As mentioned in Josh Petrie's answer, 3d is a huge bit more complex than 2d, mostly in math and scene management.  Moving objects and handling 3d space is tough, and if this is one of your first games, it's just going to be all that much harder.  The good news: Unity abstracts away some of these issues, though there's going to be some things you still have to handle (and much of the abstraction is, yet again, meant for 3d models, not 2d sprites)&#xD;&#xA;&#xD;&#xA; 4. Most libraries that Unity comes with or that you can get for it are meant for 3d objects.  This includes stuff like lighting, pathfinding, physics, etc.  In the meantime, box2d will easily work with Flash, or XNA, or something (well, maybe).&#xD;&#xA;&#xD;&#xA;## Pros ##&#xD;&#xA; 1. 3d Acceleration.  Graphics cards are a lot better at handling lots of objects in a scene than a CPU, and with Unity you can get that benefit really easily.  This lets you display thousands of sprites on the screen, or include particle effects easily, or add in something fun like shaders to support cool effects like warping space and time to your will.  Unity has many of these effects built in, which makes it really easy.&#xD;&#xA;&#xD;&#xA; 2. Support for models.  Remember that thing that was a problem earlier?  Yeah, it can be a benefit, too.  Depending on the game, being able to include rotating spheres or something cool like a 3d object in the background can be a benefit.  You can also have a game made out of 3d, but simply forced into a 2d perspective, which can give you the option of rotating the world geometry without having to do tons of extra graphics to handle it.&#xD;&#xA;&#xD;&#xA; 3. Learning 3d.  Let's face it, lots of games are written in 3d, and if you learn how to use Unity, you'll be able to apply many of those skills to the next game which might require 3d.  Additionally, a lot of artists coming out of school right now are being taught 3d modelling, so it's &quot;easier&quot; to find a 3d artist than a traditional 2d game artist (whether said artists are any good....)&#xD;&#xA;&#xD;&#xA;## Conclusion ##&#xD;&#xA;&#xD;&#xA;There's a lot of cons, there's also a decent amount of pros.  It's all going to depend on the sort of game you want to make, it's up to you to decide if it's worth it.  Flash is still an extremely viable option, so there's nothing wrong with going with a 2d engine if that's what fits your game better." />
  <row Id="36090" PostHistoryTypeId="5" PostId="15811" RevisionGUID="630b94b2-00b6-4833-a48d-26a50140e417" CreationDate="2011-08-10T18:25:09.350" UserId="6558" Comment="added 128 characters in body" Text="It depends on the game, but for the most part, it will be easier to make a strictly 2d game using an engine that is specifically designed for 2d.&#xD;&#xA;&#xD;&#xA;Now for some of the pros and cons (some of these will be related to Unity specifically, some of them are more general)&#xD;&#xA;&#xD;&#xA;## Cons ##&#xD;&#xA;&#xD;&#xA; 1. 3d engines are usually designed around game objects being 3d models (polygons and textures).  While it's certainly possible to make a flat plane and apply a texture to it, you're actively working against the engine when you do that.&#xD;&#xA;&#xD;&#xA; 2. Additionally, many 3d engines lack the ability to deal with sprite sheets (all frames of animation on one texture), because they expect animation to act on the model (though rigging and other methods), not the texture.  Again, there's ways around this, but again, you're actively working against the engine to accomplish this.&#xD;&#xA;&#xD;&#xA; 3. Added complexity.  As mentioned in Josh Petrie's answer, 3d is a huge bit more complex than 2d, mostly in math and scene management.  Moving objects and handling 3d space is tough, and if this is one of your first games, it's just going to be all that much harder.  The good news: Unity abstracts away some of these issues, though there's going to be some things you still have to handle (and much of the abstraction is, yet again, meant for 3d models, not 2d sprites)&#xD;&#xA;&#xD;&#xA; 4. Most libraries that Unity comes with or that you can get for it are meant for 3d objects.  This includes stuff like lighting, pathfinding, physics, etc.  In the meantime, box2d will easily work with Flash, or XNA, or something (well, maybe).&#xD;&#xA;&#xD;&#xA;## Pros ##&#xD;&#xA; 1. 3d Acceleration.  Graphics cards are a lot better at handling lots of objects in a scene than a CPU, and with Unity you can get that benefit really easily.  This lets you display thousands of sprites on the screen, or include particle effects easily, or add in something fun like shaders to support cool effects like warping space and time to your will.  Unity has many of these effects built in, which makes it really easy.  Note that a lot of 2d engines use OpenGL or DirectX behind the scenes, and in many cases can be hardware accelerated, as well.&#xD;&#xA;&#xD;&#xA; 2. Support for models.  Remember that thing that was a problem earlier?  Yeah, it can be a benefit, too.  Depending on the game, being able to include rotating spheres or something cool like a 3d object in the background can be a benefit.  You can also have a game made out of 3d, but simply forced into a 2d perspective, which can give you the option of rotating the world geometry without having to do tons of extra graphics to handle it.&#xD;&#xA;&#xD;&#xA; 3. Learning 3d.  Let's face it, lots of games are written in 3d, and if you learn how to use Unity, you'll be able to apply many of those skills to the next game which might require 3d.  Additionally, a lot of artists coming out of school right now are being taught 3d modelling, so it's &quot;easier&quot; to find a 3d artist than a traditional 2d game artist (whether said artists are any good....)&#xD;&#xA;&#xD;&#xA;## Conclusion ##&#xD;&#xA;&#xD;&#xA;There's a lot of cons, there's also a decent amount of pros.  It's all going to depend on the sort of game you want to make, it's up to you to decide if it's worth it.  Flash is still an extremely viable option, so there's nothing wrong with going with a 2d engine if that's what fits your game better." />
  <row Id="36091" PostHistoryTypeId="25" PostId="15798" RevisionGUID="8a05cdfb-9d93-44c1-8b96-df97e2b5bf7a" CreationDate="2011-08-10T18:36:50.823" Comment="http://twitter.com/#!/StackGameDev/status/101361380090855424" />
  <row Id="36092" PostHistoryTypeId="2" PostId="15812" RevisionGUID="119ad2fc-9565-46f2-846f-d2c86e6c3a93" CreationDate="2011-08-10T18:55:38.920" UserId="1839" Text="I would say the main reason why some games use such high numbers is, because they don't want to deal with fractions. &quot;0.375 Experience Points&quot; just isn't as _catchy_ as &quot;375 Experience Point&quot;. Those numbers have a wider range and variation for balancing without the need of fractions." />
  <row Id="36093" PostHistoryTypeId="5" PostId="15812" RevisionGUID="3a89a11a-82bf-4084-bd08-0d5520de900e" CreationDate="2011-08-10T19:03:58.297" UserId="1839" Comment="added 217 characters in body" Text="I would say the main reason why some games use such high numbers is, because they don't want to deal with fractions. &quot;0.375 Experience Points&quot; just isn't as _catchy_ as &quot;375 Experience Point&quot;. Those numbers have a wider range and variation for balancing without the need of fractions.&#xD;&#xA;&#xD;&#xA;The developer can still decide later in a patch to use 1015 points as damage instead of 1000 for the super gun. If the original value would have been a damage of 1, it would become 1.015 damage after the patch. That fractional number just doesn't look so nice rendered highlighted in your HUD" />
  <row Id="36094" PostHistoryTypeId="2" PostId="15813" RevisionGUID="8444c7a9-3816-4485-81db-2bf76cc3ecaf" CreationDate="2011-08-10T19:16:56.230" UserId="337" Text="Also, take a look at [libRocket][1].&#xD;&#xA;&#xD;&#xA;It's kind of based on HTML4 but it allows you to extend it rather easily with custom components, if you import a [reset stylesheet][2] things like h1 and hr will work, and by default it supports [these elements][3].&#xD;&#xA;&#xD;&#xA; there are also samples with a SFML renderer available and it's open source (MIT licence, allows you to use it in closed source projects without problems).&#xD;&#xA;&#xD;&#xA;I've not used it with SFML yet myself, but with the Ogre3d samples it was really easy to set up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://librocket.com/&#xD;&#xA;  [2]: http://librocket.com/wiki/documentation/RML/HTML4StyleSheet&#xD;&#xA;  [3]: http://librocket.com/wiki/documentation/RML/ElementIndex" />
  <row Id="36095" PostHistoryTypeId="2" PostId="15814" RevisionGUID="70928ab3-e12d-4e5c-89b9-92a62a4615c9" CreationDate="2011-08-10T19:17:17.510" UserId="9182" Text="I know that what both glEdgeFlagv and glEdgeFlag do is toggle boundary edge status, but my question is why does the v version exist when the documentation specifies that the only difference is that glEdgeFlagv takes (quoting from documentation):&#xD;&#xA;&#xD;&#xA;&gt; a pointer to an array that contains a single Boolean element, which&#xD;&#xA;&gt; replaces the current edge flag value.&#xD;&#xA;&#xD;&#xA;What's the point of having a special version that takes a pointer to an array of length one? I can't imagine its to let you toggle the pointed-to bool to change the value later because the documentation would have to mention that to avoid inadvertent frees. I don't know of any platform where a pointer is smaller than a bool. When would one use glEdgeFlagv instead of glEdgeFlag?" />
  <row Id="36096" PostHistoryTypeId="1" PostId="15814" RevisionGUID="70928ab3-e12d-4e5c-89b9-92a62a4615c9" CreationDate="2011-08-10T19:17:17.510" UserId="9182" Text="What is the purpose of glEdgeFlagv?" />
  <row Id="36097" PostHistoryTypeId="3" PostId="15814" RevisionGUID="70928ab3-e12d-4e5c-89b9-92a62a4615c9" CreationDate="2011-08-10T19:17:17.510" UserId="9182" Text="&lt;c++&gt;&lt;opengl&gt;&lt;geometry&gt;&lt;polygon&gt;" />
  <row Id="36098" PostHistoryTypeId="2" PostId="15815" RevisionGUID="b5c2fe1b-150c-4d48-aa17-da9b6b008805" CreationDate="2011-08-10T19:33:47.670" UserId="9183" Text="So I'm trying to code a game using the Model-View-Controller pattern, and therefore have a need to separate the models for my game objects with their sprite representations. The problem that I'm running into is with PyGame's sprite class. For example, let's take the code below for a Tank object in my game.&#xD;&#xA;&#xD;&#xA;    class Tank(Projectile):&#xD;&#xA;        '''A tank object.'''&#xD;&#xA;        MAX_SPEED = 8.0&#xD;&#xA;    &#xD;&#xA;        @property&#xD;&#xA;        def MAX_TURN(self):&#xD;&#xA;            return 10.0 - 0.75 * abs(self.velocity)&#xD;&#xA;    &#xD;&#xA;        def __init__(self, position=(0, 0), heading=0.0, power=100.0, name=None):&#xD;&#xA;            Projectile.__init__(self, position, heading)&#xD;&#xA;            &#xD;&#xA;            self.gun = Gun(self)&#xD;&#xA;            self.radar = Radar(self)&#xD;&#xA;            &#xD;&#xA;            self.power = power&#xD;&#xA;            self.name = name&#xD;&#xA;    &#xD;&#xA;        def update(self, dt):&#xD;&#xA;            self.run()&#xD;&#xA;            super(Tank, self).update(dt)&#xD;&#xA;    &#xD;&#xA;        def run(self):&#xD;&#xA;            '''Override this.'''&#xD;&#xA;            try:&#xD;&#xA;                self.accelerate(random.gauss(0, 1))&#xD;&#xA;            except:&#xD;&#xA;                pass&#xD;&#xA;            self.turn(0)&#xD;&#xA;            self.gun.turn(3)&#xD;&#xA;            self.radar.turn(44)&#xD;&#xA;            try:&#xD;&#xA;                self.gun.fire(1.0)&#xD;&#xA;            except ValueError as e:&#xD;&#xA;                print e&#xD;&#xA;Additionally, in a separate views file, I have the code for the basis of a sprite:&#xD;&#xA;&#xD;&#xA;    class TankSprite(RotatableSprite):&#xD;&#xA;        _image = pygame.image.load('images/tank/body.png').convert_alpha()&#xD;&#xA;        _layer = 0&#xD;&#xA;    TankSprite.groups = tank_group, all_group&#xD;&#xA;&#xD;&#xA;Now the standard solution might just be to merge these two into one, and then use pygame's pygame.sprite.group.update() method to update and draw everything as desired. But with a MVC pattern, I run into a few problems:&#xD;&#xA;-First, there is no way of knowing when a new object is created. For example, when the Tank fires its Gun, its creates a Bullet object. Since the Bullet is a model, there is no way to detect this creation without some awkward View code in the Models.&#xD;&#xA;-Second, I don't believe I can use pygame's collision methods or Group objects, which isn't the worst, but somewhat awkward.&#xD;&#xA;&#xD;&#xA;Really, the bullet problem is killing me more than anything else. Any help would be appreciated." />
  <row Id="36099" PostHistoryTypeId="1" PostId="15815" RevisionGUID="b5c2fe1b-150c-4d48-aa17-da9b6b008805" CreationDate="2011-08-10T19:33:47.670" UserId="9183" Text="Separating Sprites from Models with PyGame" />
  <row Id="36100" PostHistoryTypeId="3" PostId="15815" RevisionGUID="b5c2fe1b-150c-4d48-aa17-da9b6b008805" CreationDate="2011-08-10T19:33:47.670" UserId="9183" Text="&lt;architecture&gt;&lt;sprites&gt;&lt;models&gt;&lt;pygame&gt;" />
  <row Id="36101" PostHistoryTypeId="2" PostId="15816" RevisionGUID="cefb9d1f-ab29-414b-adec-3be6a37da983" CreationDate="2011-08-10T19:35:21.823" UserId="8012" Text="I was recently listen to a talk that Jonathan Blow gave, you can find it [here][1].  In the talk, he was talking about what data structures he (and he seemed to imply many others) use, and why.  Which is to say that he simply used arrays to store data, and use the naive approach to find data in it, meaning iterate through the array until you found what you wanted, assuming it wasn't in a performance critical place in the code.  He gave the example of loading data from a wad file in doom, which while fast, still took that naive approach (at least according to the talk, I haven't looked at the source code since I have not a clue to where I should begin).  The reason he gave for this was because while it may be slightly slower to do things the naive way, it's not much, and in many cases, not noticeable, so it's better to optomize how much work you can get done in your lifetime, than to make things a millisecond faster, again, assuming it's not in your physics engine or something like that.&#xD;&#xA;&#xD;&#xA;All this seems well and good, except I have one question, why not linked lists rather than arrays?  Sure, if you had to make your own linked list class, I would be on board, but in c++ anyway, assuming your using STL, you only need to declare the type as a list, rather than as a vector, and use iterators to loop over it, rather than looping an index.&#xD;&#xA;&#xD;&#xA;The advantages of using a linked list though seem much greater, for example, if you can be guaranteed that nothing is going to be removed from it while your iterating, you don't need to have locks around it, because adding data doesn't have the possibility of moving everything (or is that a bad assumption).  Also, in general, moving data is slow, although this could potentially be avoided if you know the size of your data by reserving the space.&#xD;&#xA;&#xD;&#xA;Another advantage is when you do remove data, you just tell the list to remove it, and it just needs to change a few pointers, and call a destructor, which can be done pretty quickly.  But to remove something from an array/vector, you have to either shift everything back one, or possibly add a flag saying that it has been deleted.  (Or, another possibility if you don't care about the order of the data, is move the data at the end index, to the data in the now deleted position).  Either way, this seems like it is a lot of extra, unneeded work, or potentially too slow.&#xD;&#xA;&#xD;&#xA;I did take a look around and found [this][2], which claimed that a lot of older developers didn't want to use STL because it wasn't mature enough.  Also, older games AFAIK, used C rather than C++, which also doesn't have STL.  And I could see a case there for using arrays rather than linked lists, because you would have to make your own (which while simple enough to do, could potentially lead to many more errors).&#xD;&#xA;&#xD;&#xA;I also read that it's a bad idea to create iterators in Java (due to the garbage collector), but that idea seems moot in languages such as C++, where there isn't a garbage collector, and I would imagine that linked list iterators are pretty lightweight (admittedly probably not as lightweight as vector iterators though).  Or is this also a bad assumption, and it's better/faster just to use an index in your loop, and increase that.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;  [1]: http://the-witness.net/news/2011/06/how-to-program-independent-games/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8980/why-dont-c-game-developers-use-the-boost-library" />
  <row Id="36102" PostHistoryTypeId="1" PostId="15816" RevisionGUID="cefb9d1f-ab29-414b-adec-3be6a37da983" CreationDate="2011-08-10T19:35:21.823" UserId="8012" Text="Why aren't linked lists more common data structres for enimies?" />
  <row Id="36103" PostHistoryTypeId="3" PostId="15816" RevisionGUID="cefb9d1f-ab29-414b-adec-3be6a37da983" CreationDate="2011-08-10T19:35:21.823" UserId="8012" Text="&lt;c++&gt;&lt;vector&gt;&lt;data-structure&gt;" />
  <row Id="36104" PostHistoryTypeId="5" PostId="15815" RevisionGUID="1b810601-5fa4-46fe-bcf1-42574261c2e5" CreationDate="2011-08-10T19:42:18.593" UserId="9183" Comment="added 22 characters in body" Text="So I'm trying to code a game using the Model-View-Controller pattern, and therefore have a need to separate the models for my game objects with their sprite representations. The problem that I'm running into is with PyGame's sprite class. For example, let's take the code below for a Tank object in my game.&#xD;&#xA;&#xD;&#xA;    class Tank(Projectile):&#xD;&#xA;        '''A tank object.'''&#xD;&#xA;        MAX_SPEED = 8.0&#xD;&#xA;    &#xD;&#xA;        @property&#xD;&#xA;        def MAX_TURN(self):&#xD;&#xA;            return 10.0 - 0.75 * abs(self.velocity)&#xD;&#xA;    &#xD;&#xA;        def __init__(self, position=(0, 0), heading=0.0, power=100.0, name=None):&#xD;&#xA;            Projectile.__init__(self, position, heading)&#xD;&#xA;            &#xD;&#xA;            self.gun = Gun(self)&#xD;&#xA;            self.radar = Radar(self)&#xD;&#xA;            &#xD;&#xA;            self.power = power&#xD;&#xA;            self.name = name&#xD;&#xA;    &#xD;&#xA;        def update(self, dt):&#xD;&#xA;            self.run()&#xD;&#xA;            super(Tank, self).update(dt)&#xD;&#xA;    &#xD;&#xA;        def run(self):&#xD;&#xA;            '''Override this.'''&#xD;&#xA;            try:&#xD;&#xA;                self.accelerate(random.gauss(0, 1))&#xD;&#xA;            except:&#xD;&#xA;                pass&#xD;&#xA;            self.turn(0)&#xD;&#xA;            self.gun.turn(3)&#xD;&#xA;            self.radar.turn(44)&#xD;&#xA;            try:&#xD;&#xA;                self.gun.fire(1.0)&#xD;&#xA;            except ValueError as e:&#xD;&#xA;                print e&#xD;&#xA;Additionally, in a separate views file, I have the code for the basis of a sprite:&#xD;&#xA;&#xD;&#xA;    class TankSprite(RotatableSprite):&#xD;&#xA;        _image = pygame.image.load('images/tank/body.png').convert_alpha()&#xD;&#xA;        _layer = 0&#xD;&#xA;    TankSprite.groups = tank_group, all_group&#xD;&#xA;&#xD;&#xA;Now the standard solution might just be to merge these two into one, and then use pygame's pygame.sprite.group.update() method to update and draw everything as desired. But with a MVC pattern, I run into a few problems:&#xD;&#xA;&#xD;&#xA; - First, there is no way of knowing when a new object is created. For&#xD;&#xA;   example, when the Tank fires its Gun, its creates a Bullet object.&#xD;&#xA;   Since the Bullet is a model, there is no way to detect this creation&#xD;&#xA;   without some awkward View code in the Models.&#xD;&#xA; - Second, I don't believe I can use pygame's collision methods or&#xD;&#xA;   Group objects, which isn't the worst, but somewhat awkward.&#xD;&#xA;&#xD;&#xA;Really, the bullet problem is killing me more than anything else. Any help would be appreciated." />
  <row Id="36105" PostHistoryTypeId="2" PostId="15817" RevisionGUID="48d1a42f-cde6-4d92-b60f-f726cf21de7e" CreationDate="2011-08-10T19:55:13.673" UserId="9184" Text="I have an idea for a first person shooter game and I have plenty of free time to work on it.&#xD;&#xA;&#xD;&#xA;I know java and objective-c very well and I also know autodesk inventor. &#xD;&#xA;&#xD;&#xA;How would I go about starting to develop a small fps? What programming language should I use? What modeling/animation software should I use?&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="36106" PostHistoryTypeId="1" PostId="15817" RevisionGUID="48d1a42f-cde6-4d92-b60f-f726cf21de7e" CreationDate="2011-08-10T19:55:13.673" UserId="9184" Text="How to develop a first person shooter with a one man team" />
  <row Id="36107" PostHistoryTypeId="3" PostId="15817" RevisionGUID="48d1a42f-cde6-4d92-b60f-f726cf21de7e" CreationDate="2011-08-10T19:55:13.673" UserId="9184" Text="&lt;first-person-shooter&gt;" />
  <row Id="36108" PostHistoryTypeId="2" PostId="15818" RevisionGUID="05149181-4419-4ac7-a48b-acf6cbd5db5c" CreationDate="2011-08-10T19:58:55.180" UserId="4830" Text="go look at www.unity3d.com and it's tutorials. Also check out the &quot;Tornado Twins&quot; home page and their free Unity tutorials." />
  <row Id="36109" PostHistoryTypeId="2" PostId="15819" RevisionGUID="a40a3a43-2206-4866-b3a6-2068993f38a8" CreationDate="2011-08-10T19:59:34.037" UserId="5401" Text="I'm using OpenGL on windows (have been for a while now), and I've come across a strange issue.&#xD;&#xA;&#xD;&#xA;Once every so often, the rate at which frames are presented on the screen drops to roughly 10 fps. However, my framerate counter stays at the usual framerate (2000fps in the menu, 300fps in game).&#xD;&#xA;&#xD;&#xA;My framerate counter is based on the time between draw calls, so the graphics card is definitly rendering 2000 frames a second.&#xD;&#xA;&#xD;&#xA;What is the problem? How can I fix it?" />
  <row Id="36110" PostHistoryTypeId="1" PostId="15819" RevisionGUID="a40a3a43-2206-4866-b3a6-2068993f38a8" CreationDate="2011-08-10T19:59:34.037" UserId="5401" Text="Wierd framerate issues on Windows" />
  <row Id="36111" PostHistoryTypeId="3" PostId="15819" RevisionGUID="a40a3a43-2206-4866-b3a6-2068993f38a8" CreationDate="2011-08-10T19:59:34.037" UserId="5401" Text="&lt;opengl&gt;&lt;graphics&gt;&lt;frame-rate&gt;" />
  <row Id="36112" PostHistoryTypeId="5" PostId="15675" RevisionGUID="b67d03a2-f8ef-46c1-8dd4-feb62e8bb2bc" CreationDate="2011-08-10T20:04:20.743" UserId="2897" Comment="added 3253 characters in body; deleted 22 characters in body" Text="It's been a while since I looked at SlimDX, so I feel like drawing some lines to remember how it feels :) Well, it looks like several colored lines are all we need, so lets arrange vertices as a list, describe it's order and draw it:&#xD;&#xA;&#xD;&#xA;    // Simple vertex with position and color.&#xD;&#xA;    public struct LineVertex&#xD;&#xA;    {&#xD;&#xA;        public Vector3 Position;&#xD;&#xA;        public int Color;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /* ...typical device initialization skipped here... */&#xD;&#xA;    &#xD;&#xA;    var lines  = new LineVertex[100];&#xD;&#xA;    var random = new Random();&#xD;&#xA;    &#xD;&#xA;    // Prepare line vertices. &#xD;&#xA;    // You will fill this array from XML instead of random generator. &#xD;&#xA;    // LineList will be used as a 3D primitive, so a line will be drawn&#xD;&#xA;    // between each pair of vertices, total of 50 lines in our case.&#xD;&#xA;    for (int i = 0; i &lt; lines .Length; i++)&#xD;&#xA;    {&#xD;&#xA;    	lines[i] = new LineVertex();&#xD;&#xA;    	float x = (float)(random.NextDouble() * 2) - 1;&#xD;&#xA;    	float y = (float)(random.NextDouble() * 2) - 1;&#xD;&#xA;    	lines[i].Position = new Vector3(x, y, 0f);&#xD;&#xA;    	lines[i].Color = Color.Gold.ToArgb();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    MessagePump.Run(form, () =&gt;&#xD;&#xA;    {&#xD;&#xA;    	device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue.ToArgb(), 0f, 1);&#xD;&#xA;    	// Since we don't have any lights in our scene, our lines won't receive &#xD;&#xA;        // any light and will therefore be black...&#xD;&#xA;    	// ...but we want them golden as an asinus aureus, so let's disable lighting.&#xD;&#xA;    	device.SetRenderState(RenderState.Lighting, false);	 &#xD;&#xA;    	device.BeginScene();&#xD;&#xA;    	&#xD;&#xA;    	// Our struct was meant to describe a position and a color,&#xD;&#xA;        // let's tell the device about it.&#xD;&#xA;    	device.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;&#xD;&#xA;    	&#xD;&#xA;    	// In this particular case SlimDX does not need the &#xD;&#xA;        // vertex stride, it will be automatically calculated.&#xD;&#xA;    	device.DrawUserPrimitives(PrimitiveType.LineList, 0, lines.Length / 2, lines);&#xD;&#xA;    	&#xD;&#xA;    	device.EndScene();&#xD;&#xA;    	device.Present();&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;You may notice that these lines don't look very beautiful. Later in your development cycle you will probably want to replace them by lines made from triangles with a custom texture. By this point it may be easier to check out some nice book about DirectX rather than fighting it all by yourself.&#xD;&#xA;&#xD;&#xA;EDIT: You wanted vertex buffers and interconnected lines? Actually, it would be a nice exercise to remember how this things work, so lets try and do it:&#xD;&#xA;&#xD;&#xA;    /* skipped device initialization */&#xD;&#xA;    &#xD;&#xA;    var rnd = new Random();&#xD;&#xA;    &#xD;&#xA;    // The maximum number of vertices we will ever have in a buffer, &#xD;&#xA;    // basically a buffer size limit.&#xD;&#xA;    const int maxVertexCount = 1024;&#xD;&#xA;    int lineVertexSize = Marshal.SizeOf(typeof(LineVertex));&#xD;&#xA;    &#xD;&#xA;    // Create buffers once.&#xD;&#xA;    // You may notice Dynamic flag. This usage flag causes Direct3D to optimize for frequent lock operations.&#xD;&#xA;    // It's only useful when the buffer is locked frequently, &#xD;&#xA;    // otherwise a static vertex or index buffer should be used.&#xD;&#xA;    var vertexBuffer = new VertexBuffer(device, maxVertexCount * lineVertexSize,&#xD;&#xA;    	Usage.WriteOnly | Usage.Dynamic, VertexFormat.None, Pool.Default);&#xD;&#xA;    &#xD;&#xA;    // Why such number of max indices? Read further :)&#xD;&#xA;    var indexBuffer = new IndexBuffer(device, sizeof(int) * maxVertexCount * 2 - 2, &#xD;&#xA;    	Usage.WriteOnly | Usage.Dynamic, Pool.Default, false);&#xD;&#xA;    &#xD;&#xA;    MessagePump.Run(form, () =&gt;&#xD;&#xA;    {&#xD;&#xA;    	device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue.ToArgb(), 0f, 1);&#xD;&#xA;    	device.SetRenderState(RenderState.Lighting, false);&#xD;&#xA;    &#xD;&#xA;    	device.BeginScene();&#xD;&#xA;    &#xD;&#xA;    	device.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;&#xD;&#xA;    &#xD;&#xA;    	// Simulate variable vertex count.&#xD;&#xA;    	int vertexCount = rnd.Next(1, 51) * 2;&#xD;&#xA;    &#xD;&#xA;    	// Create a new vertex data each frame and setup vertices by changing their properties randomly.&#xD;&#xA;    	var vertexData = new LineVertex[vertexCount];&#xD;&#xA;    	for (int i = 0; i &lt; vertexData.Length; i++)&#xD;&#xA;    	{&#xD;&#xA;    		float x = (float)(rnd.NextDouble() * 2) - 1;&#xD;&#xA;    		float y = (float)(rnd.NextDouble() * 2) - 1;&#xD;&#xA;    		vertexData[i].Position = new Vector3(x, y, 0f);&#xD;&#xA;    		vertexData[i].Color = (rnd.Next(2) == 0) ? Color.Gold.ToArgb() : Color.GreenYellow.ToArgb();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Setup indices each frame in a special interconnected way: &#xD;&#xA;    	// the end point of the first line is the start point of the second line.&#xD;&#xA;    	var indices = new int[(vertexCount * 2) - 2];&#xD;&#xA;    	for (int i = 0; i &lt; vertexCount - 1; i++)&#xD;&#xA;    	{&#xD;&#xA;    		indices[i * 2] = i;&#xD;&#xA;    		indices[(i * 2) + 1] = i + 1;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Write generated vertices to the vertex buffer.&#xD;&#xA;    	// Lets receive a free performance improvement and use a &#xD;&#xA;        // Discard flag since we aren't using old buffer data.&#xD;&#xA;    	// This flag tells Direct3D not to need to keep the old vertex or&#xD;&#xA;        // index data in the buffer.&#xD;&#xA;    	var vertexStream = vertexBuffer.Lock(0, 0, LockFlags.Discard);&#xD;&#xA;    	vertexStream.WriteRange(vertexData);&#xD;&#xA;    	vertexBuffer.Unlock();&#xD;&#xA;    &#xD;&#xA;    	// Write generated indices to the index buffer.&#xD;&#xA;    	var indexStream = indexBuffer.Lock(0, 0, LockFlags.Discard);&#xD;&#xA;    	indexStream.WriteRange(indices);&#xD;&#xA;    	indexBuffer.Unlock();&#xD;&#xA;    &#xD;&#xA;    	device.SetStreamSource(0, vertexBuffer, 0, lineVertexSize);&#xD;&#xA;    	device.Indices = indexBuffer;&#xD;&#xA;    	device.DrawIndexedPrimitives(PrimitiveType.LineList, 0, 0, vertexCount, 0, indices.Length / 2);&#xD;&#xA;    	&#xD;&#xA;    	device.EndScene();&#xD;&#xA;    &#xD;&#xA;    	device.Present();&#xD;&#xA;    });" />
  <row Id="36113" PostHistoryTypeId="2" PostId="15820" RevisionGUID="605a9374-f4ad-4453-a817-a20cf8b73be7" CreationDate="2011-08-10T20:17:21.067" UserId="9185" Text="What GUI programming tool can I use to make a board game that uses 6 sided hexes?" />
  <row Id="36114" PostHistoryTypeId="1" PostId="15820" RevisionGUID="605a9374-f4ad-4453-a817-a20cf8b73be7" CreationDate="2011-08-10T20:17:21.067" UserId="9185" Text="Make a board game that uses 6 sided hexes" />
  <row Id="36115" PostHistoryTypeId="3" PostId="15820" RevisionGUID="605a9374-f4ad-4453-a817-a20cf8b73be7" CreationDate="2011-08-10T20:17:21.067" UserId="9185" Text="&lt;gui&gt;" />
  <row Id="36116" PostHistoryTypeId="2" PostId="15821" RevisionGUID="321005b9-c113-44a8-9df7-aff057ae7f46" CreationDate="2011-08-10T20:18:21.530" UserId="545" Text="Usually for performance reasons.  Take a look at the example of the WAD file that you gave.  You know at the time that you pack that level how many elements of the array/list that you are going to have.  Therefore you can allocate one chunk of memory, fill it in once via DMA from the media to the structure and keep moving.  As you walk the array you can take advantage of the cache of the CPU as it will be loading in the next elements that you are going to be iterating on.  As for removing the data, it's a WAD file describing a level, what exactly are you going to remove?&#xD;&#xA;&#xD;&#xA;That's not to say that linked lists aren't useful, just that there are a lot of uses for a plain old array particularly when it comes to streaming in resources for a level.&#xD;&#xA;&#xD;&#xA;Another issue is overhead.  Are you loading in thousands or tens of thousands (vertices in a model / world) of elements?  Great that 32 bit pointer to the next element, or 64 bits if it's doubly linked just increased your memory footprint by 33% without actually buying you anything because you're still never going to remove a vertex from the middle of a model.&#xD;&#xA;&#xD;&#xA;Also take a look at the Electronic Arts version of the STL EASTL http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html" />
  <row Id="36117" PostHistoryTypeId="2" PostId="15822" RevisionGUID="94c77804-0a95-4b73-8d38-468fcb6a05b8" CreationDate="2011-08-10T20:20:38.740" UserId="51" Text="My answer to this question would be the same as my answer to this other question: http://gamedev.stackexchange.com/questions/4887/when-should-vector-list-be-used&#xD;&#xA;&#xD;&#xA;Basically, cache-coherency-related performance gains from having everything be contiguous in memory is more valuable than &quot;Big O&quot; algorithm theoretical performance from linked lists." />
  <row Id="36118" PostHistoryTypeId="2" PostId="15823" RevisionGUID="d550a73d-4b7a-4e0f-ac1e-1e6ec3d6a217" CreationDate="2011-08-10T20:24:05.217" UserId="8240" Text="It is there for the sake of completeness and consistency with the other APIs. There are vector forms of glVertex, glColor, glTexCoord, etc. glEdgeFlag is part of that group of functions; therefore, there is a vector version of glEdgeFlag." />
  <row Id="36119" PostHistoryTypeId="2" PostId="15824" RevisionGUID="7f337705-4148-48d1-967b-fe1ad3263e60" CreationDate="2011-08-10T20:24:35.653" UserId="744" Text="As you've written it, your `Tank` is both your model and your controller. Normally, you either have a view controller and a model controller that talk to each other and their appropriate other part, or a single controller that mediates between the view and model directly.&#xD;&#xA;&#xD;&#xA;There are a variety of ways to solve this:&#xD;&#xA;&#xD;&#xA; * Accept that Tanks are models and controllers. Let the Tank manage its own view.&#xD;&#xA; * Split the Tank class into separate model and controller classes. The controller mediates the two so they don't need to know about each other; object creation is a controller responsibility.&#xD;&#xA; * Realize that MVC is about abstractions, and there are ways to do abstractions that do not require three totally separate classes; two or three mixins communicating via shared state on the same object work just as well in Python.&#xD;&#xA; * Realize that MVC is a bad pattern for games, especially simple games in very high level languages, and just do what works." />
  <row Id="36120" PostHistoryTypeId="2" PostId="15825" RevisionGUID="5be59809-0e53-4a8c-9ffe-acbbd360a408" CreationDate="2011-08-10T20:24:50.697" UserId="3874" Text="In my game, I need a way to produce convex polygons from pngs of objects.&#xD;&#xA;&#xD;&#xA;For example, a maple leaf would result like this:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Essentially right now, the way my algorithm works is by putting all pixels that have an alpha of 255 in a list. I then create a convex hull from this list, and finally optimize the hull with a graph algorithm. The part I'm trying to optimize is the first part. I'd like a way to have the outline / border pixels of the shape rather than all pixels of the shape.&#xD;&#xA;&#xD;&#xA;What sort of algorithm could do this?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/jXYlf.png" />
  <row Id="36121" PostHistoryTypeId="1" PostId="15825" RevisionGUID="5be59809-0e53-4a8c-9ffe-acbbd360a408" CreationDate="2011-08-10T20:24:50.697" UserId="3874" Text="Find the contour points of a png" />
  <row Id="36122" PostHistoryTypeId="3" PostId="15825" RevisionGUID="5be59809-0e53-4a8c-9ffe-acbbd360a408" CreationDate="2011-08-10T20:24:50.697" UserId="3874" Text="&lt;c++&gt;&lt;algorithm&gt;" />
  <row Id="36123" PostHistoryTypeId="2" PostId="15826" RevisionGUID="48c8bdc4-42d8-48bb-bd28-3b8dcb8c89fb" CreationDate="2011-08-10T20:27:11.897" UserId="7911" Text="Arrays are dependable, static in size and are never prone to run time degradation and fragmenting.  I believe that using complex structures like linked lists smells of optimizing before measuring and over-engineering before need, and those are a sin if ever there was one.&#xD;&#xA;&#xD;&#xA;This is, of course, in the arena of small budget development where wasted effort that doesn't directly improve the end user experience means hamburger on the table instead of steak.  Or to put it another way, Jonathan is optimizing for user experience and not run time performance.&#xD;&#xA;" />
  <row Id="36124" PostHistoryTypeId="25" PostId="6300" RevisionGUID="62758284-7721-4b19-999e-a2029bb1eea5" CreationDate="2011-08-10T20:36:50.533" Comment="http://twitter.com/#!/StackGameDev/status/101391578471481344" />
  <row Id="36125" PostHistoryTypeId="5" PostId="15815" RevisionGUID="dc8c7cdf-4a72-4d40-8030-848274ce0d65" CreationDate="2011-08-10T20:39:44.757" UserId="9183" Comment="deleted 349 characters in body" Text="So I'm trying to code a game using the Model-View-Controller pattern, and therefore have a need to separate the models for my game objects with their sprite representations. The problem that I'm running into is with PyGame's sprite class. For example, let's take the code below for a Tank object in my game.&#xD;&#xA;&#xD;&#xA;    class Tank(Projectile):&#xD;&#xA;        '''A tank object.'''&#xD;&#xA;        MAX_SPEED = 8.0&#xD;&#xA;    &#xD;&#xA;        @property&#xD;&#xA;        def MAX_TURN(self):&#xD;&#xA;            return 10.0 - 0.75 * abs(self.velocity)&#xD;&#xA;    &#xD;&#xA;        def __init__(self, position=(0, 0), heading=0.0, power=100.0, name=None):&#xD;&#xA;            Projectile.__init__(self, position, heading)&#xD;&#xA;            &#xD;&#xA;            self.gun = Gun(self)&#xD;&#xA;            self.radar = Radar(self)&#xD;&#xA;            &#xD;&#xA;            self.power = power&#xD;&#xA;            self.name = name&#xD;&#xA;    &#xD;&#xA;        def update(self, dt):&#xD;&#xA;            super(Tank, self).update(dt) #Just writing this here for illustrative purposes&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;Additionally, in a separate views file, I have the code for the basis of a sprite:&#xD;&#xA;&#xD;&#xA;    class TankSprite(RotatableSprite):&#xD;&#xA;        _image = pygame.image.load('images/tank/body.png').convert_alpha()&#xD;&#xA;        _layer = 0&#xD;&#xA;    TankSprite.groups = tank_group, all_group&#xD;&#xA;&#xD;&#xA;Now the standard solution might just be to merge these two into one, and then use pygame's pygame.sprite.group.update() method to update and draw everything as desired. But with a MVC pattern, I run into a few problems:&#xD;&#xA;&#xD;&#xA; - First, there is no way of knowing when a new object is created. For&#xD;&#xA;   example, when the Tank fires its Gun, its creates a Bullet object.&#xD;&#xA;   Since the Bullet is a model, there is no way to detect this creation&#xD;&#xA;   without some awkward View code in the Models.&#xD;&#xA; - Second, I don't believe I can use pygame's collision methods or&#xD;&#xA;   Group objects, which isn't the worst, but somewhat awkward.&#xD;&#xA;&#xD;&#xA;Really, the bullet problem is killing me more than anything else. Any help would be appreciated." />
  <row Id="36126" PostHistoryTypeId="2" PostId="15827" RevisionGUID="c577de45-e5b8-4ff2-a772-8c7f99591f6b" CreationDate="2011-08-10T20:40:28.797" UserId="3626" Text="I know there is already a thread asking for example 3d games written using Qt. What I'd like to have a discussion about is whether or not Qt is a good framework for game development.&#xD;&#xA;&#xD;&#xA;In my experience Qt is a joy to work with and thanks to QML and QML/3d it's looking like it could be a viable framework for game development. The thought of using signals and slots for gamedev is exciting.&#xD;&#xA;&#xD;&#xA;I'd like to hear some opinions on Qt in general as a game development platform. What are it's limitations? What are it's advantages?" />
  <row Id="36127" PostHistoryTypeId="1" PostId="15827" RevisionGUID="c577de45-e5b8-4ff2-a772-8c7f99591f6b" CreationDate="2011-08-10T20:40:28.797" UserId="3626" Text="Qt for game development" />
  <row Id="36128" PostHistoryTypeId="3" PostId="15827" RevisionGUID="c577de45-e5b8-4ff2-a772-8c7f99591f6b" CreationDate="2011-08-10T20:40:28.797" UserId="3626" Text="&lt;framework&gt;&lt;qt&gt;" />
  <row Id="36129" PostHistoryTypeId="2" PostId="15828" RevisionGUID="07909603-6606-4da3-85d2-47eabb1aefa9" CreationDate="2011-08-10T20:45:16.007" UserId="7911" Text="Scan each line and only record a point on entry to your 255 areas and then another point on exit from the 255 areas.  You can then pick a point and start finding closest neighbors and walk all the way around to build your contour lines.&#xD;&#xA;&#xD;&#xA;That will end up being pretty dense, but then you could collapse multiple points that are on the same slope into a beginning and end point for your final result.&#xD;&#xA;" />
  <row Id="36130" PostHistoryTypeId="2" PostId="15829" RevisionGUID="4eb8dca6-ec6d-4211-aba9-231740c34b77" CreationDate="2011-08-10T20:47:24.277" UserId="2897" Text="Definitely rendering at 2000 fps? Nah, I guess you're measuring elapsed frame time like usual, which means you're measuring time it took for the driver to generate the GPU commands and not the time it took the GPU to actually render the frame. After a while CPU waits for the GPU to catch up and it shows as spike in frame time. &#xD;&#xA;&#xD;&#xA;As for possible reasons... Well, it could be everything starting from bad hardware or drivers and ending with bad code. Try to do the simplest graphics call possible:&#xD;&#xA;&#xD;&#xA;    while(1) &#xD;&#xA;    {&#xD;&#xA;      glXSwapBuffers();&#xD;&#xA;      CalculateElapsedTime();&#xD;&#xA;    }&#xD;&#xA;And then see if it still spikes. If it doesn't, add a code until it spikes again, and if it does, then it's a technical issue. For additional confirmation enable VSync and see if spiking rate changes. Launch a HWMonitor and see if temperatures and voltages are OK, check System Event Log, use GPUView with xperf, maybe try to somehow debug it with [gDEBugger][1], change drivers, change hardware... Possibilities are endless :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gremedy.com/" />
  <row Id="36131" PostHistoryTypeId="2" PostId="15830" RevisionGUID="1b5be448-d566-4b1c-afd0-b91253711858" CreationDate="2011-08-10T20:50:44.020" UserId="3626" Text="[&quot;How to Program Independent Games&quot;][1] is a really good presentation from Jonathan Blow (creator of Braid) about how to take on the development of a game by yourself.&#xD;&#xA;&#xD;&#xA;My best advice would be to make the smallest FPS you can (with any language/engine) and then expand on that.&#xD;&#xA;&#xD;&#xA;Try [Unity][2]. That seems like the fastest way to make an FPS these days. Another way to do it would be to use an engine from another FPS such as, Half-Life, Quake or Unreal and basically make a total-conversion that in no way resembles the game the engine was made for. Counter-Strike was made this way. Heavily modding/totally converting a game is game development too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://the-witness.net/news/2011/06/how-to-program-independent-games/ &quot;How to program independent games&quot;&#xD;&#xA;  [2]: http://www.unity3d.com" />
  <row Id="36132" PostHistoryTypeId="10" PostId="15817" RevisionGUID="17950b20-2a4e-484e-9ed1-667660be56ed" CreationDate="2011-08-10T20:55:58.800" UserId="14" CloseReasonId="4" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36133" PostHistoryTypeId="10" PostId="15827" RevisionGUID="93e09659-257a-435f-ab6a-fa3186c730fa" CreationDate="2011-08-10T20:56:29.923" UserId="14" CloseReasonId="3" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36134" PostHistoryTypeId="5" PostId="15829" RevisionGUID="b6def989-2a65-43ce-8e41-f7ac7dd1a8a8" CreationDate="2011-08-10T20:57:18.257" UserId="2897" Comment="added 77 characters in body" Text="Definitely rendering at 2000 fps? Nah, I guess you're measuring elapsed frame time like usual, which means you're measuring time it took for the driver to generate the GPU commands and not the time it took the GPU to actually render the frame. After a while CPU waits for the GPU to catch up and it shows as spike in frame time. &#xD;&#xA;&#xD;&#xA;As for possible reasons... Well, it could be everything starting from bad hardware or drivers and ending with bad code. Try to do the simplest graphics call possible:&#xD;&#xA;&#xD;&#xA;    while(1) &#xD;&#xA;    {&#xD;&#xA;      glXSwapBuffers();&#xD;&#xA;      // This should use QueryPerformanceCounter/QueryPerformanceFrequency&#xD;&#xA;      CalculateElapsedTime(); &#xD;&#xA;    }&#xD;&#xA;And then see if it still spikes. If it doesn't, add a code until it spikes again, and if it does, then it's a technical issue. For additional confirmation enable VSync and see if spiking rate changes. Launch a HWMonitor and see if temperatures and voltages are OK, check System Event Log, use GPUView with xperf, maybe try to somehow debug it with [gDEBugger][1], change drivers, change hardware... Possibilities are endless :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gremedy.com/" />
  <row Id="36135" PostHistoryTypeId="11" PostId="15827" RevisionGUID="fd3cc1a1-1d25-4a79-ad18-5d0b93aa08f7" CreationDate="2011-08-10T21:04:05.013" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36136" PostHistoryTypeId="16" PostId="15827" RevisionGUID="bf2213fa-ef51-4226-9dd6-756c4bc18ea2" CreationDate="2011-08-10T21:04:10.097" UserId="14" />
  <row Id="36137" PostHistoryTypeId="2" PostId="15831" RevisionGUID="85a5dd44-68ae-4152-ae50-e5bb416214b1" CreationDate="2011-08-10T21:14:31.510" UserId="9033" Text="If you are looking for just the outline portion of the graphic, you could try using an emboss filter on it.  The outline will be highlighted in white and remove the other non-white pixels below a certain tolerance.&#xD;&#xA;&#xD;&#xA;Here's a decent link talking about various image filters and matrices for accomplishing them:&#xD;&#xA;[Image Processing for Dummies with C# and GDI+ Part 2 - Convolution Filters][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeproject.com/KB/GDI-plus/csharpfilters.aspx" />
  <row Id="36138" PostHistoryTypeId="5" PostId="15829" RevisionGUID="e23255d0-f4e6-4354-801f-62933055659c" CreationDate="2011-08-10T21:17:31.493" UserId="2897" Comment="added 177 characters in body" Text="Definitely rendering at 2000 fps? Nah, I guess you're measuring elapsed frame time like usual, which means you're measuring time it took for the driver to generate the GPU commands and not the time it took the GPU to actually render the frame. After a while CPU waits for the GPU to catch up and it shows as spike in frame time. &#xD;&#xA;&#xD;&#xA;As for possible reasons... Well, it could be everything starting from bad hardware or drivers and ending with bad code. Try to do the simplest graphics call possible:&#xD;&#xA;&#xD;&#xA;    while(1) &#xD;&#xA;    {&#xD;&#xA;      glXSwapBuffers();&#xD;&#xA;      // This should use QueryPerformanceCounter/QueryPerformanceFrequency&#xD;&#xA;      CalculateElapsedTime(); &#xD;&#xA;    }&#xD;&#xA;And then see if it still spikes. If it doesn't, add a code until it spikes again, and if it does, then it's a technical issue. For additional confirmation enable VSync and see if spiking rate changes. Launch a HWMonitor and see if temperatures and voltages are OK, check System Event Log, use GPUView with xperf, maybe try to somehow debug it with [gDEBugger][1], change drivers, change hardware... Possibilities are endless :)&#xD;&#xA;&#xD;&#xA;EDIT:  Maik Semder actually gave a better advice :) Your problem may be completely unrelated to the video at all, so check what you're doing every frame, and look at the GC.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gremedy.com/" />
  <row Id="36139" PostHistoryTypeId="5" PostId="15829" RevisionGUID="34564cf5-dc56-4e1f-b587-6c911cdb4d8d" CreationDate="2011-08-10T21:31:54.690" UserId="2897" Comment="added 54 characters in body" Text="Definitely rendering at 2000 fps? Nah, I guess you're measuring elapsed frame time like usual, which means you're measuring time it took for the driver to generate the GPU commands and not the time it took the GPU to actually render the frame. After a while CPU waits for the GPU to catch up and it shows as spike in frame time. &#xD;&#xA;&#xD;&#xA;As for possible reasons... Well, it could be everything starting from bad hardware or drivers and ending with bad code. Try to do the simplest graphics call possible:&#xD;&#xA;&#xD;&#xA;    while(1) &#xD;&#xA;    {&#xD;&#xA;      glXSwapBuffers();&#xD;&#xA;      // This should use QueryPerformanceCounter/QueryPerformanceFrequency&#xD;&#xA;      CalculateElapsedTime(); &#xD;&#xA;    }&#xD;&#xA;And then see if it still spikes. If it doesn't, add a code until it spikes again, and if it does, then it's a technical issue. For additional confirmation enable VSync and see if spiking rate changes. Launch a HWMonitor and see if temperatures and voltages are OK, check System Event Log, use GPUView with xperf, maybe try to somehow debug it with [gDEBugger][1], change drivers, change hardware... Possibilities are endless :)&#xD;&#xA;&#xD;&#xA;EDIT:  Maik Semder actually gave a better advice :) Your problem may be completely unrelated to the video at all, so check what you're doing every frame, look at the GC, wrap different OpenGL calls with QueryPerformanceCounter.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gremedy.com/" />
  <row Id="36140" PostHistoryTypeId="2" PostId="15832" RevisionGUID="1d55cfbe-6cbb-4816-9a19-cb014f217614" CreationDate="2011-08-10T22:07:33.410" UserId="8578" Text="I'm working in Flash AS3, but pseudo-code or any other language is fine.&#xD;&#xA;&#xD;&#xA;How can I make a circular progress bar?  Akin to the ship bars in Pax Britanica, you can see them in the screenshot [here][1].&#xD;&#xA;&#xD;&#xA;Apart from making them frame by frame, is there some obvious solution I'm missing here?&#xD;&#xA;&#xD;&#xA;I'm seeking the equivalent of stretching a rectangle for a regular progress bar, or using a simple mask (if such a solution exists).&#xD;&#xA;&#xD;&#xA;(Also I can't tag this with circle or progress bar due to lack of rep if anyone could that would be great)&#xD;&#xA;&#xD;&#xA;  [1]: https://market.android.com/details?id=de.swagner.paxbritannica" />
  <row Id="36141" PostHistoryTypeId="1" PostId="15832" RevisionGUID="1d55cfbe-6cbb-4816-9a19-cb014f217614" CreationDate="2011-08-10T22:07:33.410" UserId="8578" Text="How To Make A Circular Progress Bar Mathematically" />
  <row Id="36142" PostHistoryTypeId="3" PostId="15832" RevisionGUID="1d55cfbe-6cbb-4816-9a19-cb014f217614" CreationDate="2011-08-10T22:07:33.410" UserId="8578" Text="&lt;math&gt;&lt;actionscript-3&gt;" />
  <row Id="36143" PostHistoryTypeId="25" PostId="6522" RevisionGUID="6292ff93-7aa9-477a-97e6-0e7f3ba58e68" CreationDate="2011-08-10T22:36:50.570" Comment="http://twitter.com/#!/StackGameDev/status/101421778097807360" />
  <row Id="36144" PostHistoryTypeId="2" PostId="15833" RevisionGUID="aaaef4ec-ca49-4220-b09d-e2cf5b9beb10" CreationDate="2011-08-10T22:50:53.590" UserId="7946" Text="First I'll explain the principle, then the drawing part:&#xD;&#xA;&#xD;&#xA;In my example I'm assuming that you have a progress value of 0 to 100 (%), even though anything else will do.&#xD;&#xA;&#xD;&#xA;On a straight line, the current position of progress-bar would simply be that progress value. &#xD;&#xA;&#xD;&#xA;On a circle you get that position with trigonometry. Any point on a circle is given as:&#xD;&#xA;&#xD;&#xA;    point.x = r * cos(angle);&#xD;&#xA;    point.y = r * sin(angle); &#xD;&#xA;&#xD;&#xA;where r is the radius of the circle. As you see, the angle is the only variable in those equations. That means that you somehow have to integrate your progress into the angle. &#xD;&#xA;&#xD;&#xA;The solution is simple: One &quot;run&quot; around the circle equals 2*Pi (or 360 degrees). You have to split that distance into 100 smaller parts, so that when the progress value is 100, the value inside cos() and sin() is 2*pi (or 360 degrees). &#xD;&#xA;&#xD;&#xA;You achieve that by simply dividing 2*pi (or 360 degrees) by 100 and multiplying it with the progress:&#xD;&#xA;&#xD;&#xA;    float step = 2*pi/100;&#xD;&#xA;    &#xD;&#xA;    point.x = r * cos(progress * step);&#xD;&#xA;    point.y = r * sin(progress * step);&#xD;&#xA;&#xD;&#xA;Now to the drawing part. &#xD;&#xA;&#xD;&#xA;I don't know anything about Actionscript3 (or Flash, for that matter), so I can't tell you the exact procedures, but in general there would be two ways to do this:&#xD;&#xA;&#xD;&#xA;First, and (in my opinion easier of the two): Draw the partial circle manually as simply a connection of colored lines with a certain thickness (if you don't need a texture on it and a simple color suffices), or draw the circle as a connection of textured quads (if you need texturing). &#xD;&#xA;&#xD;&#xA;Second: You draw a picture which represents your fully-loaded circle and load it as a texture, put it on a quad and render it. Then, you again manually draw a partial circle over that quad and only render the part of the textured quad where the circle is rendered in front of it. In OpenGL, for example, you could easily do this using the stencil buffer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to know how to calculate the different points on your circle to use them to assemble the required polygons/lines, you can take a look at the above equations again: &#xD;&#xA;&#xD;&#xA;    point.x = r * cos(angle);&#xD;&#xA;    point.y = r * sin(angle); &#xD;&#xA;&#xD;&#xA;You can run those inside a for-loop that runs from 0 to your current progress, for example, if it was a circle that consisted of a series of connected dots (in c++ syntax):&#xD;&#xA;&#xD;&#xA;    float granularity = 2*PI/required_granularity; //determines how smooth your circle will look&#xD;&#xA;    float step = 2*PI/100.0f;&#xD;&#xA;    &#xD;&#xA;    list&lt;Vector2&gt; points; //list of all the calculated points&#xD;&#xA;    for(float angle=0; angle &lt; progress*step; angle += granularity)&#xD;&#xA;    {&#xD;&#xA;        Vector2 point(radius*cos(angle), radius*sin(angle));&#xD;&#xA;        points.push_back(point); //adds the point to the list&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now these points will all be centered on the origin of your coordinate system, so you need to move them to whatever position where you want your circle to be. But I think you can figure that one out yourself :P&#xD;&#xA;" />
  <row Id="36145" PostHistoryTypeId="2" PostId="15834" RevisionGUID="a28f87d5-261e-4533-9147-d887c677859e" CreationDate="2011-08-10T22:53:22.197" UserId="7191" Text="Looks like you're wanting to draw an arc. An arc that's thick. I found [this article][1] for doing just that in AS3. Check out the demo at the bottom.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.emanueleferonato.com/2009/09/22/drawing-arcs-with-as3/" />
  <row Id="36148" PostHistoryTypeId="2" PostId="15836" RevisionGUID="b067c426-4153-42c7-8ba6-76b17e8c1b49" CreationDate="2011-08-10T23:10:58.133" UserId="7946" Text="I have static objects and movable objects. The collisions are detected using the separating-axis-theorem. &#xD;&#xA;&#xD;&#xA;For example, in this situation I have two static objects (in red):&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;and a movable object between the two:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My algorithm is able to compute the collision between two of these objects, and it also spits out a perfect resolution vector (meaning a minimum-displacement-vector) to the collision. &#xD;&#xA;&#xD;&#xA;So for example, when I check the collision between the green rectangle and the right red rectangle, the algorithm spits out a vector that tells me how I need to move the green rectangle in order to resolve the collision:&#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;Notice that I just quickly drew this in MSPaint, so in that picture it could actually be that the minimum-translation-vector pushes the green rectangle out on the top, but I'm going to assume here that pushing it out to the left/right is actually shorter.&#xD;&#xA;&#xD;&#xA;The general way of approaching this would be to only resolve the collision of one collision per frame, instead of all at once. But in my case, this would result in flip-flopping:&#xD;&#xA;&#xD;&#xA;First, the solver detects two collisions but only resolves the collision between the right rectangle and the green rectangle:&#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;Then, in the next frame, it detects only one collision which is between the left red rectangle and the green rectangle, and resolves it:&#xD;&#xA;&#xD;&#xA;![enter image description here][5]&#xD;&#xA;&#xD;&#xA;As you can see, this doesn't actually resolve the collision (for example by pushing the green rectangle out to the top), and instead just flip flops between the two states infinitely.&#xD;&#xA;&#xD;&#xA;How can I solve this?&#xD;&#xA;  [1]: http://i.stack.imgur.com/xMWzm.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/kz9ev.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/5AWeg.png&#xD;&#xA;  [4]: http://i.stack.imgur.com/ryRn8.png&#xD;&#xA;  [5]: http://i.stack.imgur.com/HiI7R.png" />
  <row Id="36149" PostHistoryTypeId="1" PostId="15836" RevisionGUID="b067c426-4153-42c7-8ba6-76b17e8c1b49" CreationDate="2011-08-10T23:10:58.133" UserId="7946" Text="(2D) Collision resolution in case of collision with multiple objects" />
  <row Id="36150" PostHistoryTypeId="3" PostId="15836" RevisionGUID="b067c426-4153-42c7-8ba6-76b17e8c1b49" CreationDate="2011-08-10T23:10:58.133" UserId="7946" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;collision-resolution&gt;&lt;separating-axis-theorem&gt;" />
  <row Id="36151" PostHistoryTypeId="2" PostId="15837" RevisionGUID="fbcef863-aea9-4afa-a435-82141d2a62c0" CreationDate="2011-08-11T00:07:00.440" UserId="9188" Text="If used properly, Qt can be great for games.  It has good OpenGL support if you want hardware acceleration, and if you're dealing with 2D elements or custom widgets, the QPainter class and its friends have decent performance (just stay away from QPainter::SetOpacity, that'll kill your performance).&#xD;&#xA;&#xD;&#xA;The other great thing about Qt for games is Qt Style Sheets.  You can create a custom look-and-feel for your GUI using a CSS-like syntax, so your game's GUI won't look like a boring gray platform-specific interface." />
  <row Id="36152" PostHistoryTypeId="16" PostId="15837" RevisionGUID="6fdf6839-422a-4a23-8794-59287ececcd5" CreationDate="2011-08-11T00:07:00.440" UserId="9188" />
  <row Id="36153" PostHistoryTypeId="11" PostId="15817" RevisionGUID="ae4a7384-1001-4cca-9556-a7ef26ab4fa9" CreationDate="2011-08-11T00:14:18.467" UserId="14" Text="[{&quot;Id&quot;:3830,&quot;DisplayName&quot;:&quot;Tim Holt&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36155" PostHistoryTypeId="25" PostId="15790" RevisionGUID="6b91f848-c8e0-4ac5-b9fa-4b8fd8f36052" CreationDate="2011-08-11T00:36:51.420" Comment="http://twitter.com/#!/StackGameDev/status/101451981176061952" />
  <row Id="36156" PostHistoryTypeId="2" PostId="15838" RevisionGUID="514f77cd-39c7-44bf-99f4-5852db7a5032" CreationDate="2011-08-11T02:05:18.057" UserId="2698" Text="There are no &quot;tileset systems&quot; as if there is a set of generic solutions games pick up.&#xD;&#xA;&#xD;&#xA;They all work precisely as follows:&#xD;&#xA;&#xD;&#xA;* The sprite sheets contain sprites.&#xD;&#xA;* Some of these sprites belong to a certain state, e.g. the &quot;dead&quot; sprite belongs to the &quot;dead&quot; state, whilst all the &quot;walking right&quot; sprites belong to the &quot;walking right&quot; state.&#xD;&#xA;* A state may have any number of animation frames, or one frame (no animation). Different states can have different amount of animation frames. Some animations can be played faster, slower, or irregularly compared to others.&#xD;&#xA;* A character uses the sprites + animation for whatever state it's in.&#xD;&#xA;&#xD;&#xA;FF6 and RPG Maker both do _exactly the same thing_ only FF6 has more states and more frames of animation than RPG Maker. Every other game uses _the exact same process_, including whatever states they want with whatever animations they want. RPG Maker only simplified it because they're not making a ton of money out of an expansive sprite system like FF6 is.&#xD;&#xA;&#xD;&#xA;There is no generic system solution here. There is just games fulfilling their specific requirements.&#xD;&#xA;&#xD;&#xA;That means you should do the same thing, and stop fretting about whether there might be a generic solution.&#xD;&#xA;&#xD;&#xA;What states do you want? How do you want each of them animated? Now go make that happen." />
  <row Id="36157" PostHistoryTypeId="5" PostId="15838" RevisionGUID="24e93d5e-fca6-4bc0-b1c8-1e60acc19348" CreationDate="2011-08-11T02:12:08.063" UserId="2698" Comment="added 129 characters in body" Text="There are no &quot;tileset systems&quot; as if there is a set of generic solutions games pick up.&#xD;&#xA;&#xD;&#xA;They all work precisely as follows:&#xD;&#xA;&#xD;&#xA;* The sprite sheets contain sprites. These sprites all belong to a &quot;region&quot; which corresponds to a particular state. All those &quot;walking right&quot; sprites arranged in a row are in the region with the &quot;walking right&quot; state. The &quot;dead&quot; sprite (a still body, with no frames of animation) is its own region with the &quot;dead&quot; state.&#xD;&#xA;* A state may have any number of animation frames, or one frame (no animation). Different states can have different amount of animation frames. Some animations can be played faster, slower, or irregularly compared to others.&#xD;&#xA;* A character uses the sprites + animation for whatever state it's in.&#xD;&#xA;&#xD;&#xA;Both FF6 and RPG maker do _exactly the same thing_ and fulfilled their unique requirements. FF6 has more states and finer animation because they want it, not because they chose a system which requires it. RPG Maker has less states and animation because they're not making enough money to make it worth doing that.&#xD;&#xA;&#xD;&#xA;See a pattern here? **They are just fulfilling their unique requirements** and the only generic system involved is _the fundamental underpinnings of how sprite sheets work_.&#xD;&#xA;&#xD;&#xA;**What are _your_ requirements?** What states do you want? How do you want each of them animated? Start wondering about that, create the sprites, and throw them on a sprite sheet and animate them." />
  <row Id="36158" PostHistoryTypeId="5" PostId="15838" RevisionGUID="9cc2b5cb-fd2c-4228-bdfa-d215ce2ad902" CreationDate="2011-08-11T02:19:17.387" UserId="2698" Comment="Improved the answer massively" Text="There are no &quot;tileset systems.&quot; The only generic solution games pick up is _how tilesets work on a basic level._&#xD;&#xA;&#xD;&#xA;Here's how tilesets work:&#xD;&#xA;&#xD;&#xA;* The sprite sheets contain sprites. These sprites all belong to a &quot;region&quot; which corresponds to a particular state. All those &quot;walking right&quot; sprites arranged in a row are in the region with the &quot;walking right&quot; state. The &quot;dead&quot; sprite (a still body, with no frames of animation) is its own region with the &quot;dead&quot; state.&#xD;&#xA;* A state may have any number of animation frames, or one frame (no animation). Different states can have different amount of animation frames. Some animations can be played faster, slower, or irregularly compared to others.&#xD;&#xA;* A character uses the sprites + animation for whatever state it's in.&#xD;&#xA;&#xD;&#xA;Both FF6 and RPG maker do exactly that. FF6 however picked more states and more animation than RPG maker did, probably because they were actually going to make some money for it. Every other game has done the same thing, choosing exactly the states that suit them and exactly the frames of animation they want.&#xD;&#xA;&#xD;&#xA;They're all just companies fulfilling their unique requirements using the same technique: sprite sheets. It's not like there's a third party offering an engine which features certain states and offers Y frames of animation for each. Each developer just developed _their own_ system.&#xD;&#xA;&#xD;&#xA;So here's your generic solution: **Start wondering about _your_ requirements!** What states do you want? How do you want each of them animated? Then use the same basic technique as anyone else: draw them, arrange them in regions and animate them." />
  <row Id="36159" PostHistoryTypeId="25" PostId="15836" RevisionGUID="a61d9437-8ecc-44b9-a6ff-bf9f6374bda5" CreationDate="2011-08-11T02:36:51.917" Comment="http://twitter.com/#!/StackGameDev/status/101482180361981953" />
  <row Id="36160" PostHistoryTypeId="2" PostId="15839" RevisionGUID="9f3aac24-3cd3-4952-8976-03b84417d69b" CreationDate="2011-08-11T02:48:02.093" UserId="8185" Text="I'm implementing a basic skill and attribute system, though I'm having second thoughts about how I should go about it. &#xD;&#xA;&#xD;&#xA;For example, I could use a Dictionary/HashMap which uses SkillType enums to represent keys, and integer values representing the values. But should I do this?&#xD;&#xA;&#xD;&#xA;    public class SKills&#xD;&#xA;    {&#xD;&#xA;        public IDictionary&lt;StatType, Int&gt; skills; //StatType is enum, being the key; the int //is the value.&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    vs.&#xD;&#xA;    &#xD;&#xA;    public class Skills&#xD;&#xA;    {&#xD;&#xA;        public int LongBlade, Armor, Marskman; //...etc&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'd like to know the benefits of type safety here, as opposed to just using basic integers. Any recommendations?&#xD;&#xA;" />
  <row Id="36161" PostHistoryTypeId="1" PostId="15839" RevisionGUID="9f3aac24-3cd3-4952-8976-03b84417d69b" CreationDate="2011-08-11T02:48:02.093" UserId="8185" Text="Enum Vs. Integer for Skill Values" />
  <row Id="36162" PostHistoryTypeId="3" PostId="15839" RevisionGUID="9f3aac24-3cd3-4952-8976-03b84417d69b" CreationDate="2011-08-11T02:48:02.093" UserId="8185" Text="&lt;c#&gt;" />
  <row Id="36163" PostHistoryTypeId="5" PostId="15839" RevisionGUID="2969bbd9-020e-4ec5-af66-db8d4a64ecd7" CreationDate="2011-08-11T02:53:56.030" UserId="8185" Comment="Fixed typos." Text="I'm implementing a basic skill and attribute system, though I'm having second thoughts about how I should go about it. &#xD;&#xA;&#xD;&#xA;For example, I could use a Dictionary/HashMap which uses SkillType enums to represent keys, and integer values representing the values. But should I do this?&#xD;&#xA;&#xD;&#xA;    public class Skills&#xD;&#xA;    {&#xD;&#xA;        public IDictionary&lt;StatType, Int&gt; skills; //StatType is enum, being the key; the int //is the value.&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    vs.&#xD;&#xA;    &#xD;&#xA;    public class Skills&#xD;&#xA;    {&#xD;&#xA;        public int LongBlade, Armor, Marksman; //...etc&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'd like to know the benefits of type safety here, as opposed to just using basic integers. Any recommendations?&#xD;&#xA;" />
  <row Id="36164" PostHistoryTypeId="2" PostId="15840" RevisionGUID="f7b866ab-6588-422d-af89-e5cc8ed23d44" CreationDate="2011-08-11T03:12:50.313" UserId="9033" Text="I haven't tried the following, but it sounds like it should work.&#xD;&#xA;&#xD;&#xA;You need two images:&#xD;&#xA;&#xD;&#xA; 1. the outer HUD graphic, make the portion you want the progress to show through transparent&#xD;&#xA; 2. a solid color circle image the radius of the progress meter, then cut the bottom half off and make that transparent (it could be a half square really as the HUD portion will cover the rest)&#xD;&#xA;&#xD;&#xA;The following assumes your 0% (and 100%) mark is at the 9 o'clock position.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**If your progress is 50% or less:**&#xD;&#xA;&#xD;&#xA; - Rotate and draw the semi-circle so the desired percent is visible in the top portion&#xD;&#xA; - Do a rectangular cut of the bottom half area to remove the left starting of the semi-circle showing in the bottom area&#xD;&#xA; - Draw the top layer HUD graphic&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**If your progress is &gt; 50%:**&#xD;&#xA;&#xD;&#xA; - Draw the semi-circle so that it fills the entire top half (50% mark).  You should need no rotation&#xD;&#xA; - Rotate and draw the semi-circle again to reflect the remaining percentage&#xD;&#xA; - For example, if you want 60%, draw the first copy to show 50% then rotate and draw the second copy to show another 10%&#xD;&#xA; - Draw the top layer HUD graphic&#xD;&#xA;&#xD;&#xA;I'm not sure how to do this specifically (or if it's even possible) in AS3.&#xD;&#xA;I hope this makes sense (oh, and actually works!)." />
  <row Id="36165" PostHistoryTypeId="2" PostId="15841" RevisionGUID="58f0013d-b425-4182-a6cd-f56c8bf6ce10" CreationDate="2011-08-11T04:27:56.370" UserId="6080" Text="If there is eventually going to be:&#xD;&#xA;&#xD;&#xA; * a large variety of skill types across your game,&#xD;&#xA; * or ability-granting items,&#xD;&#xA; * or ability-granting buffs,&#xD;&#xA; * or a large ability tree,&#xD;&#xA;&#xD;&#xA;then I start to prefer the flexibility of string or integer keys in a dictionary instead of individual instance fields or even a dictionary with an enum key.&#xD;&#xA;&#xD;&#xA;My reasoning-- *Because you may soon realize...*&#xD;&#xA;&#xD;&#xA;&gt; Boy, it'd be nice if I could tweak my mathcraft and select unit abilities in &#xD;&#xA;&gt; (my favorite text editor | Excel | a custom tool ).&#xD;&#xA;&#xD;&#xA;...at which point a dictionary with string or integer keys become a more natural fit than having to maintain enum values or a long list of instance fields yourself. However, said tool could always be written to generate C# code too, so you may be able to find a happy hybrid.&#xD;&#xA;&#xD;&#xA;If your game complexity is going to be fairly simple and your variety of skills small, then managing instance fields by hand (instead of dictionary &amp; enum) seems more convenient and avoids a level of indirection, both at run-time and &quot;keystroke&quot;-time.&#xD;&#xA;" />
  <row Id="36166" PostHistoryTypeId="25" PostId="4555" RevisionGUID="4ba9a5d4-6271-4579-bb1d-8a129174e203" CreationDate="2011-08-11T04:36:52.033" Comment="http://twitter.com/#!/StackGameDev/status/101512380227391488" />
  <row Id="36167" PostHistoryTypeId="2" PostId="15842" RevisionGUID="94b98afc-9fd3-48b1-83a9-bb085be2d0b0" CreationDate="2011-08-11T04:37:17.150" UserId="9033" Text="Another method I saw was using shaders.&#xD;&#xA;&#xD;&#xA;You only need one image, the entire HUD image, with the progress area in a gradient gray scale.  Start at the 0% position (9 o'clock for example) with pure white and gradually progress to black at the 100% position.  &#xD;&#xA;&#xD;&#xA;You can't have any gray in your HUD portion, including no white or black.  If you need to use those colors, then choose another pure color for your gradient scale (a color not used anywhere else).&#xD;&#xA;&#xD;&#xA;Have your program pass the shader the progress value in the range of '0.0' to '1.0' (or whatever scale your shader language uses for it's color ranges).&#xD;&#xA;You could also pass the shader a progress bar color (and the 'off' color if you wish) if you want the color to change dynamically, such as when empty (or full) to warn the player.&#xD;&#xA;&#xD;&#xA;In your shader you evaluate each source pixel, and if it's pure gray (each R,G,B has the same value) then that pixel is part of the progress meter.  If it's not just pass the original color through.  If it's a progress meter pixel, you have to determine if it should be the 'on' color, or the 'off' color.  Just simply check the pixel color (it's pure gray, so you only need to check say the 'red' component) to see if it's above or below the passed progress value.  The effect is that any gray color below the progress value will turn on, the others will turn off." />
  <row Id="36168" PostHistoryTypeId="2" PostId="15843" RevisionGUID="0e147421-e066-4367-9008-02ba9ff11294" CreationDate="2011-08-11T05:15:11.313" UserId="159" Text="I'm trying to figure out how to draw good looking lines using XNA on the WP7 platform. By good looking I mean something not skinny and flat that a simple primitive gives you. A nice gradient, or texture or something applied. &#xD;&#xA;&#xD;&#xA;It would be pretty easy if the lines were all straight, but I need to be able to make 45* and 90* turns.&#xD;&#xA;&#xD;&#xA;Has anyone else tried doing this? I have found ways to do it, but they all require custom shaders which the platform doesn't support" />
  <row Id="36169" PostHistoryTypeId="1" PostId="15843" RevisionGUID="0e147421-e066-4367-9008-02ba9ff11294" CreationDate="2011-08-11T05:15:11.313" UserId="159" Text="Drawing beautiful lines in XNA on WP7" />
  <row Id="36170" PostHistoryTypeId="3" PostId="15843" RevisionGUID="0e147421-e066-4367-9008-02ba9ff11294" CreationDate="2011-08-11T05:15:11.313" UserId="159" Text="&lt;xna&gt;&lt;windows-phone-7&gt;" />
  <row Id="36171" PostHistoryTypeId="4" PostId="15843" RevisionGUID="ccb1ae67-d1ac-4ec0-aa58-5b8a898445fc" CreationDate="2011-08-11T05:33:49.850" UserId="1430" Comment="edited title" Text="How can I draw beautiful lines with XNA on WP7?" />
  <row Id="36172" PostHistoryTypeId="5" PostId="15843" RevisionGUID="7e269df0-20a7-4db1-b2c6-c24298b707ed" CreationDate="2011-08-11T05:34:12.913" UserId="159" Comment="added 58 characters in body; edited title" Text="I'm trying to figure out how to draw good looking lines using XNA on the WP7 platform. By good looking I mean something not skinny and flat that a simple primitive gives you. A nice gradient, or texture or something applied. &#xD;&#xA;&#xD;&#xA;It would be pretty easy if the lines were all straight, but I need to be able to make 45* and 90* turns.&#xD;&#xA;&#xD;&#xA;Has anyone else tried doing this? I have found ways to do it, but they all require custom shaders which the platform doesn't support. Like this one for example http://roundline.codeplex.com/" />
  <row Id="36173" PostHistoryTypeId="4" PostId="15843" RevisionGUID="7e269df0-20a7-4db1-b2c6-c24298b707ed" CreationDate="2011-08-11T05:34:12.913" UserId="159" Comment="added 58 characters in body; edited title" Text="How can I draw beautiful lines with XNA on WP7?" />
  <row Id="36174" PostHistoryTypeId="4" PostId="15832" RevisionGUID="c5cabad8-8c93-4ca2-97d9-bdbfd337e499" CreationDate="2011-08-11T05:35:28.710" UserId="1430" Comment="edited title" Text="How can I render a circular progress bar procedurally?" />
  <row Id="36175" PostHistoryTypeId="5" PostId="15817" RevisionGUID="739a2e71-7542-486f-aded-17100ee1c31d" CreationDate="2011-08-11T05:48:54.507" UserId="1430" Comment="deleted 9 characters in body; edited title" Text="I have an idea for a first person shooter game and I have plenty of free time to work on it.&#xD;&#xA;&#xD;&#xA;I know java and objective-c very well and I also know autodesk inventor. &#xD;&#xA;&#xD;&#xA;How would I go about starting to develop a small fps? What programming language should I use? What modeling/animation software should I use?&#xD;&#xA;" />
  <row Id="36176" PostHistoryTypeId="4" PostId="15817" RevisionGUID="739a2e71-7542-486f-aded-17100ee1c31d" CreationDate="2011-08-11T05:48:54.507" UserId="1430" Comment="deleted 9 characters in body; edited title" Text="How does one develop a first person shooter with a one man team?" />
  <row Id="36177" PostHistoryTypeId="2" PostId="15844" RevisionGUID="6656e2e9-3c61-4396-a656-9aad4216fe09" CreationDate="2011-08-11T06:10:42.710" UserId="288" Text="What the vertex shader for the round-line library that you linked does is simply take your two positions and use those to transform a pre-calculated outline of a line (including appropriate stretching).&#xD;&#xA;&#xD;&#xA;You could do simply do the same transformations on the CPU, using `DrawUserPrimitives` or a `DynamicVertexBuffer` to draw them via `BasicEffect`.&#xD;&#xA;&#xD;&#xA;You could then also calculate appropriate texture-coordinates on the CPU, to apply a texture of your choice (or use vertex colours for a gradient, and so on).&#xD;&#xA;&#xD;&#xA;For a small number of lines, this should be perfectly acceptable, performance-wise." />
  <row Id="36178" PostHistoryTypeId="25" PostId="15839" RevisionGUID="34d3dd74-9a0c-47db-a8e6-ff257db9b1f6" CreationDate="2011-08-11T06:36:51.557" Comment="http://twitter.com/#!/StackGameDev/status/101542577953701888" />
  <row Id="36179" PostHistoryTypeId="2" PostId="15845" RevisionGUID="e6b00062-91d9-43e3-a948-372519913ea4" CreationDate="2011-08-11T06:54:05.107" UserId="849" Text="I'm trying to start OpenGL programming on a Mac, which brings me into unknown territory on a lot of things.&#xD;&#xA;&#xD;&#xA;During the day, I'm a Web Developer, working in C# and before that in PHP and Delphi, all on Windows.&#xD;&#xA;&#xD;&#xA;During the night, I try to pick up Mac/OpenGL skills, but everything is so different. I've been trying to look for some books, but the OpenGL books are usually for iOS (tons of them out there) and the Mac Books usually cover &quot;normal&quot; application Development.&#xD;&#xA;&#xD;&#xA;I want to start simple with Pong, Tetris and Wolfenstein.&#xD;&#xA;&#xD;&#xA;I see that there are a bunch of different OpenGL Versions out there. I know about OpenGL ES 1&amp;2, but I don't know about the &quot;big&quot; OpenGL Versions - which ones are commonly supported on 10.6 and 10.7 on current (2010/2011) Macs? Are there any up to date (XCode 4) books or tutorials?&#xD;&#xA;&#xD;&#xA;I don't want to use a premade Engine like Unity yet - again, I know next to nothing about any Mac development." />
  <row Id="36180" PostHistoryTypeId="1" PostId="15845" RevisionGUID="e6b00062-91d9-43e3-a948-372519913ea4" CreationDate="2011-08-11T06:54:05.107" UserId="849" Text="Starting OpenGL on Mac OS X?" />
  <row Id="36181" PostHistoryTypeId="3" PostId="15845" RevisionGUID="e6b00062-91d9-43e3-a948-372519913ea4" CreationDate="2011-08-11T06:54:05.107" UserId="849" Text="&lt;opengl&gt;&lt;macos&gt;" />
  <row Id="36182" PostHistoryTypeId="2" PostId="15846" RevisionGUID="0d1eec00-fbcf-4628-af2f-931937113ae0" CreationDate="2011-08-11T07:33:56.150" UserId="721" Text="OpenGL Versions supported depends on two factor on OS X:&#xD;&#xA;&#xD;&#xA; - OS Version (10.7, 10.6, 10.5 ...)&#xD;&#xA; - GPUs&#xD;&#xA;&#xD;&#xA;If you have a GMA 950 Card (Intel chipset), you should have problems.&#xD;&#xA;&#xD;&#xA;On my mbp, it is:&#xD;&#xA;&#xD;&#xA; - OS X 10.7 (Lion), OpenGL 3.2 Core is supported. &#xD;&#xA; - OS X 10.6 (Snow Leopard), OpenGL 3.0 Core is supported.&#xD;&#xA;&#xD;&#xA;Use [OpenGL Extensions Viewer][1] to know OpenGL versions supported by your Hardware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtech-vr.com/glview/" />
  <row Id="36183" PostHistoryTypeId="5" PostId="15846" RevisionGUID="0d5cc339-259a-4ded-b701-26f975d0ddec" CreationDate="2011-08-11T07:39:03.880" UserId="721" Comment="added 16 characters in body" Text="OpenGL Versions supported depends on two factors on OS X:&#xD;&#xA;&#xD;&#xA; - OS Version (10.7, 10.6, 10.5 ...)&#xD;&#xA; - GPUs or drivers&#xD;&#xA;&#xD;&#xA;But at least, you can use OpenGL 2.1 on every recent mac.&#xD;&#xA;&#xD;&#xA;Note: OpenGL is the desktop version, and OpenGL ES is the mobile one. Don't use ES on desktop platforms.&#xD;&#xA;&#xD;&#xA;Ps: if you have a GMA 950 Card (Intel chipset), you should have problems. Don't support them.&#xD;&#xA;&#xD;&#xA;On my mbp, it is:&#xD;&#xA;&#xD;&#xA; - OS X 10.7 (Lion), OpenGL 3.2 Core is supported. &#xD;&#xA; - OS X 10.6 (Snow Leopard), OpenGL 3.0 Core is supported.&#xD;&#xA;&#xD;&#xA;Use [OpenGL Extensions Viewer][1] to know OpenGL versions supported by your Hardware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtech-vr.com/glview/" />
  <row Id="36184" PostHistoryTypeId="5" PostId="15846" RevisionGUID="be6420d5-7c08-4b2a-abaa-a3d4a548472d" CreationDate="2011-08-11T07:48:48.500" UserId="721" Comment="added 184 characters in body" Text="**OpenGL Versions**&#xD;&#xA;&#xD;&#xA;OpenGL Versions supported depends on two factors on OS X:&#xD;&#xA;&#xD;&#xA; - OS Version (10.7, 10.6, 10.5 ...)&#xD;&#xA; - GPUs or drivers&#xD;&#xA;&#xD;&#xA;But at least, you can use OpenGL 2.1 on every recent mac.&#xD;&#xA;&#xD;&#xA;Note: OpenGL is the desktop version, and OpenGL ES is the mobile one. Don't use ES on desktop platforms.&#xD;&#xA;&#xD;&#xA;Ps: if you have a GMA 950 Card (Intel chipset), you should have problems. Don't support them.&#xD;&#xA;&#xD;&#xA;On my mbp, it is:&#xD;&#xA;&#xD;&#xA; - OS X 10.7 (Lion), OpenGL 3.2 Core is supported. &#xD;&#xA; - OS X 10.6 (Snow Leopard), OpenGL 3.0 Core is supported.&#xD;&#xA;&#xD;&#xA;Use [OpenGL Extensions Viewer][1] to know OpenGL versions supported by your Hardware.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Start OpenGL on OS X**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Use XCode 4.1 (4.2 beta for Completion with C++/C). They are samples provided by Apple for AGL, the link between OpenGL and Window system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.realtech-vr.com/glview/" />
  <row Id="36185" PostHistoryTypeId="25" PostId="15772" RevisionGUID="839c0c5f-37d0-4f1a-bd88-70043df2bfba" CreationDate="2011-08-11T08:36:51.330" Comment="http://twitter.com/#!/StackGameDev/status/101572776300785664" />
  <row Id="36186" PostHistoryTypeId="5" PostId="15806" RevisionGUID="4ce734c4-a973-4f4c-b4ed-3f2ee6232b14" CreationDate="2011-08-11T09:36:21.903" UserId="9180" Comment="typo and extra tag" Text="I realize that this will depend on a game-to-game, situation-to-situation basis and that this is not a very technical question, but I remember hearing in a tech podcast a few years ago that inflated numbers of points (e.g. 1000 points vs. 1 point) was preferable in games because it was either a standard or because it had been shown to produce better feedback/experience from users. Either case, it seemed to make users happier than lower numbers of points.&#xD;&#xA;&#xD;&#xA;I have since been unable to find supportive evidence either way for the theory that inflating scores can keep the user engaged.&#xD;&#xA;&#xD;&#xA;Is this inflated-point theory true? Where can I find more information about this?" />
  <row Id="36187" PostHistoryTypeId="6" PostId="15806" RevisionGUID="4ce734c4-a973-4f4c-b4ed-3f2ee6232b14" CreationDate="2011-08-11T09:36:21.903" UserId="9180" Comment="typo and extra tag" Text="&lt;leaderboards&gt;&lt;feedback&gt;&lt;experience&gt;&lt;scoring&gt;" />
  <row Id="36188" PostHistoryTypeId="2" PostId="15847" RevisionGUID="4e455199-c396-49d3-8184-43b3ff6038cf" CreationDate="2011-08-11T09:45:14.043" UserId="2798" Text="If you are experienced with C#, then better use [Mono][1]  and [OpenTK][2] for your OpenGL learning. Mono is a free, cross-platform implementation of .NET (so you won't need to learn any new APIs) and OpenTK is a C# wrapper for all OpenGL functions, including some basic math, input and sound libraries.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mono-project.com/Main_Page&#xD;&#xA;  [2]: http://www.opentk.com/" />
  <row Id="36189" PostHistoryTypeId="5" PostId="15819" RevisionGUID="155b219b-13ba-4ed3-928c-45101e092b69" CreationDate="2011-08-11T09:53:18.783" UserId="5401" Comment="added 79 characters in body" Text="I'm using OpenGL on windows (have been for a while now), and I've come across a strange issue.&#xD;&#xA;&#xD;&#xA;Once every so often, the rate at which frames are presented on the screen drops to roughly 10 fps. However, my framerate counter stays at the usual framerate (2000fps in the menu, 300fps in game).&#xD;&#xA;&#xD;&#xA;My framerate counter is based on the time between draw calls, so the graphics card is definitly rendering 2000 frames a second.&#xD;&#xA;&#xD;&#xA;What is the problem? How can I fix it?&#xD;&#xA;&#xD;&#xA;EDIT: I forgot to mention, this only happens when running in windowed mode." />
  <row Id="36190" PostHistoryTypeId="25" PostId="15845" RevisionGUID="19beb889-6f89-41ad-ad00-0590f64982c1" CreationDate="2011-08-11T10:36:52.143" Comment="http://twitter.com/#!/StackGameDev/status/101602975927123968" />
  <row Id="36191" PostHistoryTypeId="2" PostId="15848" RevisionGUID="ecdcf7d1-59ee-4085-8a9b-69d234999860" CreationDate="2011-08-11T11:07:22.730" UserId="8921" Text="Indeed higher scores tend to make the player feel like he's playing better, and hence _can_ enhance user experience.&#xD;&#xA;&#xD;&#xA;As Maik said, higher scores are not only easier on the programming side of things, but are much easier for the user to _understand_.&#xD;&#xA;&#xD;&#xA;Whether you give your player 100 points for a coin, or 2000 doesn't matter: if it is the first object a player picks up in a game, this will be his _&quot;score reference&quot;_. (In this case though I would said 100 points is inherently easier to understand than 2000, but that's more in the realm of psychology).&#xD;&#xA;&#xD;&#xA;What's important then is not to necessarily have a high score reference, just an _understandable_ one.&#xD;&#xA;&#xD;&#xA;What really gives the player satisfaction is when you give him 5000 points for hitting the top of the flag-pole. It's worth 50 times what the player spends tims jumping around trying to get.&#xD;&#xA;&#xD;&#xA;A great game for user satisfaction in my opinion is Peggle by PopCap.&#xD;&#xA;&#xD;&#xA;In Peggle, when you finish the level, you get a zoom and slow-mo on the last peggle, and huge explosions when you hit it. When your score is being recapped, with fireworks and Ode to Joy, things are exploding in colours everywhere. And you score doubles, triples thanks to bonuses, still with blasts of colours and music.&#xD;&#xA;&#xD;&#xA;What is interesting is the mix of visually pleasing feedback, and score multipliers; if I remember correctly, the base score for a peggle is also 100 points, 500 for the ones needed to complete the level. 1 &amp; 5 are therefore the same, but less easy to understand when things are hectic and your score is going up constantly.&#xD;&#xA;&#xD;&#xA;So easy, understandable base scores, and huge bonuses and multipliers for doing things well. (Lovely explosions and classical music is also win ^^)." />
  <row Id="36192" PostHistoryTypeId="2" PostId="15849" RevisionGUID="367a89bf-3f96-46b9-87cd-c1415da4e13e" CreationDate="2011-08-11T11:08:52.260" UserId="1964" Text="I think you need to look in the right places, [Edge magazine][1] in the UK always has a section on game jobs, and all the articles have adverts for games companies looking for developers.&#xD;&#xA;&#xD;&#xA;Likewise [Gamesindustry.biz][2] advertises for developer jobs.&#xD;&#xA;&#xD;&#xA;There are recruiters who specialize in the games industry here is a [list of agencies and sites that might be of help][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.next-gen.biz/&#xD;&#xA;  [2]: http://www.gamesindustry.biz/&#xD;&#xA;  [3]: http://www.skillset.org/games/links/article_4411_1.asp" />
  <row Id="36193" PostHistoryTypeId="2" PostId="15850" RevisionGUID="49bfdaae-b3ac-4cdc-866a-1b933c746c8e" CreationDate="2011-08-11T11:13:56.997" UserId="20" Text="The [marching squares][1] algorithm should work really well for this. Another really good algorithm is the &quot;[Canny edge-detection algorithm][2]&quot;.&#xD;&#xA;&#xD;&#xA;For your purposes, marching squares should be good enough (and way faster than canny), since you don't want to actually detect lines &quot;inside&quot; the image but just the outlines of the shape (using the alpha).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://devblog.phillipspiess.com/2010/02/23/better-know-an-algorithm-1-marching-squares/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Canny_edge_detector" />
  <row Id="36194" PostHistoryTypeId="5" PostId="15800" RevisionGUID="cd6499cd-b834-4729-a843-1ec3da8685fc" CreationDate="2011-08-11T11:40:44.203" UserId="7946" Comment="added 725 characters in body" Text="Actually, &quot;most pathfinding algorithms&quot; don't rely on any specific set of coordinate systems at all. &#xD;&#xA;&#xD;&#xA;Most algorithms, like the most widely spread and probably most popular of them, the [A*][1] algorithm, just rely on a set of connected nodes in a graph and functions which estimate or straight up calculate the cost of moving from one node to another. &#xD;&#xA;&#xD;&#xA;The awesome thing about this is that they work anywhere, in any kind of space or structure that you can imagine, as long as you have a way of calculating the cost of moving from one node to another.&#xD;&#xA;&#xD;&#xA;As an answer to your question: You can (for example) use A* and construct your circle-y maze as a graph where the nodes are simply points on the imaginary circles that run through your maze, and the heuristic functions can still be based on the distance between two nodes.&#xD;&#xA;&#xD;&#xA;If you wonder what your graph inside a circular maze should look like (*wink wink :P*), here's how I would basically do it (the black dots being the nodes and the lines being the connections between them):&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I think my graph even has too many points, since you only need so much that your entities run into walls when they try to run straight from one node to another. &#xD;&#xA;&#xD;&#xA;The better way to do this would be to use navigation meshes, meaning &quot;surfaces as nodes&quot; instead of just points (in this case a lot faster, since you'd need very few of them) would ). But if you understand how A* generally works they're not hard to implement at all.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A-star&#xD;&#xA;  [2]: http://i.stack.imgur.com/VJzCP.png" />
  <row Id="36195" PostHistoryTypeId="5" PostId="15800" RevisionGUID="69f6ea3f-dcb6-4876-b6f1-cf96cfa63ed0" CreationDate="2011-08-11T11:48:22.510" UserId="7946" Comment="added 5 characters in body" Text="Actually, &quot;most pathfinding algorithms&quot; don't rely on any specific set of coordinate systems at all. &#xD;&#xA;&#xD;&#xA;Most algorithms, like the most widely spread and probably most popular of them, the [A*][1] algorithm, just rely on a set of connected nodes in a graph and functions which estimate or straight up calculate the cost of moving from one node to another. &#xD;&#xA;&#xD;&#xA;The awesome thing about this is that they work anywhere, in any kind of space or structure that you can imagine, as long as you have a way of calculating the cost of moving from one node to another.&#xD;&#xA;&#xD;&#xA;As an answer to your question: You can (for example) use A* and construct your circle-y maze as a graph where the nodes are simply points on the imaginary circles that run through your maze, and the heuristic functions can still be based on the distance between two nodes.&#xD;&#xA;&#xD;&#xA;If you wonder what your graph inside a circular maze should look like (*wink wink :P*), here's how I would basically do it (the black dots being the nodes and the lines being the connections between them):&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;I think my graph even has too many points, since you only need so much that your entities don't run into walls when they try to go straight from one node to another. &#xD;&#xA;&#xD;&#xA;The better way to do this would be to use navigation meshes, meaning &quot;surfaces as nodes&quot; instead of just points (in this case a lot faster, since you'd need very few of them) would ). But if you understand how A* generally works they're not hard to implement at all.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/A-star&#xD;&#xA;  [2]: http://i.stack.imgur.com/VJzCP.png" />
  <row Id="36196" PostHistoryTypeId="25" PostId="15832" RevisionGUID="bdd4c4bc-88cd-43cc-b2c9-5dc960d220b1" CreationDate="2011-08-11T12:36:52.117" Comment="http://twitter.com/#!/StackGameDev/status/101633176287444992" />
  <row Id="36197" PostHistoryTypeId="2" PostId="15851" RevisionGUID="18c59683-8002-43b1-bb27-69a1612b22bd" CreationDate="2011-08-11T13:19:21.227" UserId="8861" Text="You can first compute all vectors needed to solve each collision then compute a resultant from them.&#xD;&#xA;&#xD;&#xA;The only case when this can byte you is if these vectors nullify each other, just like in your example. In that case the collision cannot be solved." />
  <row Id="36198" PostHistoryTypeId="5" PostId="15827" RevisionGUID="566f9aec-b285-4d3e-847d-81ce6799bbc5" CreationDate="2011-08-11T13:30:09.333" UserId="3626" Comment="added 123 characters in body" Text="I know there is already a thread asking for example 3d games written using Qt. What I'd like to have a discussion about is whether or not Qt is a good framework for game development.&#xD;&#xA;&#xD;&#xA;In my experience Qt is a joy to work with and thanks to QML and QML/3d it's looking like it could be a viable framework for game development. The thought of using signals and slots for gamedev is exciting.&#xD;&#xA;&#xD;&#xA;I'd like to hear some opinions on Qt in general as a game development platform. What are it's limitations? What are it's advantages?&#xD;&#xA;&#xD;&#xA;Edit: I found an [official Qt game development forum][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.qt.nokia.com/forums/viewforum/17" />
  <row Id="36199" PostHistoryTypeId="2" PostId="15852" RevisionGUID="76e9946a-bb56-43df-988e-e62af260a2c1" CreationDate="2011-08-11T13:58:18.767" UserId="9196" Text="We had an &quot;accident&quot; with WorldEdit and despite having BoarderGuard installed it sent a tunnel thousands of chunks away. Regardless now the map looks ridiculous. Of course the servercraft.co server crashed during this process and we were robbed of doing a simple /undo!&#xD;&#xA;&#xD;&#xA;The worst part is, we did not notice the problem until a few days later and the several dozen players on our server would be a tad irked if we had to roll back the server a week.&#xD;&#xA;&#xD;&#xA;I have read that deleting chunks etc is totally possible with MCedit. But since we chose to go with Servercraft, dowloading, editing offline, and then trying to reinsert the file back to servercraft is almost a nightmare scenerio. We have Bukkit running, and we are using a mod called BorderGuard so I know exactly what regions we are using. I was just curious if anyone understands what happens when you just delete .mcr files from the /world/region folder?  Do they go away permanently?&#xD;&#xA;&#xD;&#xA;I do see that if we were ever to expand the BorderGuard those regions/chunks would come back the same since the seed is the same.  &#xD;&#xA;&#xD;&#xA;Anyone manually lop off part of their world and survived?" />
  <row Id="36200" PostHistoryTypeId="1" PostId="15852" RevisionGUID="76e9946a-bb56-43df-988e-e62af260a2c1" CreationDate="2011-08-11T13:58:18.767" UserId="9196" Text="Can we manually reduce the file size of Minecraft SMP server by just deleting .mcr files?" />
  <row Id="36201" PostHistoryTypeId="3" PostId="15852" RevisionGUID="76e9946a-bb56-43df-988e-e62af260a2c1" CreationDate="2011-08-11T13:58:18.767" UserId="9196" Text="&lt;maps&gt;&lt;minecraft&gt;&lt;editors&gt;" />
  <row Id="36202" PostHistoryTypeId="4" PostId="15827" RevisionGUID="1f5a3b7e-7aca-4dc9-bad8-bd53aefed9e6" CreationDate="2011-08-11T13:59:21.500" UserId="8771" Comment="made title a question" Text="What are the advantages and limitations of using Qt for game development?" />
  <row Id="36203" PostHistoryTypeId="4" PostId="15836" RevisionGUID="f925135a-e0e3-4fa6-957c-4c3170c66537" CreationDate="2011-08-11T14:30:11.267" UserId="20" Comment="removed &quot;tag&quot; from the title" Text="Collision resolution in case of collision with multiple objects" />
  <row Id="36204" PostHistoryTypeId="2" PostId="15853" RevisionGUID="92ca9f18-0546-448b-9809-0ac6113d28b7" CreationDate="2011-08-11T14:30:29.707" UserId="5021" Text="Depending on exactly what you are trying to achieve (high physical accuracy or just a close-enough real-time simulation), you could try using speculative contacts.&#xD;&#xA;&#xD;&#xA;Here are the details:&#xD;&#xA;http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/&#xD;&#xA;&#xD;&#xA;He describes in that article what you need to know to implement it, and it's very simple compared to other approaches (such as sphere casting and then sorting collision resolutions by time of impact).&#xD;&#xA;&#xD;&#xA;If you need/want more, you can purchase his source code for (IIRC) $7.&#xD;&#xA;&#xD;&#xA;Here is a video of my implementation in 3D:&#xD;&#xA;http://www.youtube.com/watch?v=JvT2H1RmOas&#xD;&#xA;&#xD;&#xA;Notice how stable the simulation is with just a single iteration. You could easily use multiple iterations per frame to resolve multiple collisions to a stable state, which would be more accurate." />
  <row Id="36205" PostHistoryTypeId="25" PostId="8795" RevisionGUID="db9b7466-ffb5-4430-90c6-f7461d85846d" CreationDate="2011-08-11T14:36:51.610" Comment="http://twitter.com/#!/StackGameDev/status/101663373724364800" />
  <row Id="36206" PostHistoryTypeId="2" PostId="15854" RevisionGUID="34ab5340-4984-4796-b1f3-7118bf8053c0" CreationDate="2011-08-11T14:43:37.270" UserId="9198" Text="I want to do a mobile ver of old game i used to like called Bow And Arrow ([video][1], [game][2]) and there's a project already port it in [ruby][3] . im wondering can i do a remake of this game, do i have to get permissions from the creator or i only have to get if i use the same resources (like image and sound) ?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=iDcC7oeXym8&amp;feature=related&#xD;&#xA;  [2]: http://www.undeb.bangor.ac.uk/archery/game.htm&#xD;&#xA;  [3]: https://github.com/elia/bow_and_arrow" />
  <row Id="36207" PostHistoryTypeId="1" PostId="15854" RevisionGUID="34ab5340-4984-4796-b1f3-7118bf8053c0" CreationDate="2011-08-11T14:43:37.270" UserId="9198" Text="Game License: when do i need to ask for permeation to recreate an old game" />
  <row Id="36208" PostHistoryTypeId="3" PostId="15854" RevisionGUID="34ab5340-4984-4796-b1f3-7118bf8053c0" CreationDate="2011-08-11T14:43:37.270" UserId="9198" Text="&lt;game-design&gt;&lt;game-industry&gt;" />
  <row Id="36209" PostHistoryTypeId="4" PostId="15816" RevisionGUID="835dd803-f1ab-41a5-896e-ae93bd8ad8a6" CreationDate="2011-08-11T15:01:54.470" UserId="8771" Comment="improved spelling in title" Text="Why aren't linked lists more common data structures for enemies?" />
  <row Id="36210" PostHistoryTypeId="24" PostId="15816" RevisionGUID="835dd803-f1ab-41a5-896e-ae93bd8ad8a6" CreationDate="2011-08-11T15:01:54.470" Comment="Proposed by 8771 approved by 1430 edit id of 629" />
  <row Id="36211" PostHistoryTypeId="4" PostId="15819" RevisionGUID="dd44cda5-709c-4cc0-8329-5671ae59bfab" CreationDate="2011-08-11T15:02:04.847" UserId="8771" Comment="made title a question" Text="Why am I having these weird framerate issues with OpenGL on Windows?" />
  <row Id="36212" PostHistoryTypeId="24" PostId="15819" RevisionGUID="dd44cda5-709c-4cc0-8329-5671ae59bfab" CreationDate="2011-08-11T15:02:04.847" Comment="Proposed by 8771 approved by 1430 edit id of 627" />
  <row Id="36213" PostHistoryTypeId="4" PostId="15820" RevisionGUID="6bdd5ff8-3608-4dd5-9db7-d0ca619bd9ec" CreationDate="2011-08-11T15:02:09.510" UserId="8771" Comment="made title a question" Text="What GUI programming tool can I use to make a board game that uses 6 sided hexes?" />
  <row Id="36214" PostHistoryTypeId="24" PostId="15820" RevisionGUID="6bdd5ff8-3608-4dd5-9db7-d0ca619bd9ec" CreationDate="2011-08-11T15:02:09.510" Comment="Proposed by 8771 approved by 1430 edit id of 630" />
  <row Id="36215" PostHistoryTypeId="4" PostId="15825" RevisionGUID="8c9ecfc6-0c42-4d7b-a889-447bc1d10bf3" CreationDate="2011-08-11T15:02:15.047" UserId="8771" Comment="made title a question" Text="How do I find the contour points of a png?" />
  <row Id="36216" PostHistoryTypeId="24" PostId="15825" RevisionGUID="8c9ecfc6-0c42-4d7b-a889-447bc1d10bf3" CreationDate="2011-08-11T15:02:15.047" Comment="Proposed by 8771 approved by 1430 edit id of 626" />
  <row Id="36217" PostHistoryTypeId="4" PostId="15845" RevisionGUID="95ae03d6-410a-4ceb-ba97-2c2c5910312d" CreationDate="2011-08-11T15:02:16.717" UserId="8771" Comment="made title a question" Text="How can I get started programming OpenGL on Mac OS X?" />
  <row Id="36218" PostHistoryTypeId="24" PostId="15845" RevisionGUID="95ae03d6-410a-4ceb-ba97-2c2c5910312d" CreationDate="2011-08-11T15:02:16.717" Comment="Proposed by 8771 approved by 1430 edit id of 628" />
  <row Id="36219" PostHistoryTypeId="2" PostId="15855" RevisionGUID="c28ba8da-dc09-4349-807b-cef8af4c9f86" CreationDate="2011-08-11T15:09:17.193" UserId="1141" Text="Generally, and nearly universally around the world: *game systems* (pure mathematical formulas and algorithms) can't be copyrighted, and thus can be copied freely, even without being nice and asking. However, In some jurisdictions they can be protected - in parts or whole - by *patents*.&#xD;&#xA;&#xD;&#xA;For everything else, **ask a lawyer**." />
  <row Id="36220" PostHistoryTypeId="6" PostId="15854" RevisionGUID="de7edd89-1227-4bab-ae51-9df48d755436" CreationDate="2011-08-11T15:14:00.260" UserId="2188" Comment="edited tags" Text="&lt;game-design&gt;&lt;legal&gt;&lt;game-industry&gt;" />
  <row Id="36221" PostHistoryTypeId="5" PostId="15854" RevisionGUID="48f433ba-29b9-4554-b3e7-d69f5df11098" CreationDate="2011-08-11T15:15:59.720" UserId="1430" Comment="deleted 5 characters in body; edited tags; edited title" Text="I want to do a mobile version of an old game I used to like called Bow And Arrow ([video][1], [game][2]). There's a project already port it in [Ruby][3]. I'm wondering if I can do a remake of this game. Do I have to get permission from the creator, or does it only matter if I use the same resources (graphics and sound)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=iDcC7oeXym8&amp;feature=related&#xD;&#xA;  [2]: http://www.undeb.bangor.ac.uk/archery/game.htm&#xD;&#xA;  [3]: https://github.com/elia/bow_and_arrow" />
  <row Id="36222" PostHistoryTypeId="4" PostId="15854" RevisionGUID="48f433ba-29b9-4554-b3e7-d69f5df11098" CreationDate="2011-08-11T15:15:59.720" UserId="1430" Comment="deleted 5 characters in body; edited tags; edited title" Text="When do I need to ask for permission to recreate an old game?" />
  <row Id="36223" PostHistoryTypeId="6" PostId="15854" RevisionGUID="48f433ba-29b9-4554-b3e7-d69f5df11098" CreationDate="2011-08-11T15:15:59.720" UserId="1430" Comment="deleted 5 characters in body; edited tags; edited title" Text="&lt;legal&gt;&lt;copyright&gt;" />
  <row Id="36224" PostHistoryTypeId="5" PostId="15817" RevisionGUID="f085f8e1-4b78-42bc-8810-5ba75eea24b5" CreationDate="2011-08-11T15:37:29.687" UserId="9184" Comment="added 30 characters in body" Text="I have an idea for a first person shooter game and I have plenty of free time to work on it.&#xD;&#xA;&#xD;&#xA;I know java and objective-c very well and I also know autodesk inventor (which is similar to 3ds max). &#xD;&#xA;&#xD;&#xA;How would I go about starting to develop a small fps? What programming language should I use? What modeling/animation software should I use?&#xD;&#xA;" />
  <row Id="36225" PostHistoryTypeId="2" PostId="15856" RevisionGUID="bb97c43c-642f-4d65-addb-e7d536277781" CreationDate="2011-08-11T15:49:12.667" UserId="3827" Text="I've always wanted to write games, and recently the chance has come up to do so in a couple of different ways for the Android OS using OpenGL (and I figure once I learn OpenGL on one platform I can transfer those skills to other platforms).  I've been a developer for many years and I've learned a good many languages in my time, and I know that experience counts for everything.  In the short time I've been looking at games dev, I've learned a few things which made me open my eyes a bit (i.e. accessing class members directly - instead of through getters/setters, declaring most vars at the class level to avoid making the garbage collector angry etc) - so whilst I'm still eager and not jaded I want to jump on this with everything I've got but also wouldn't mind doing so  in a slightly more intelligent way than both feet first - so...&#xD;&#xA;&#xD;&#xA;1. What do you know now that you wish you'd known when you'd started? (ignoring the long hours and tight deadlines) What advice would you give a younger you? &#xD;&#xA;2. What tips would you give a technically competent developer just starting games dev?&#xD;&#xA;3. Whats the hardest lesson you learned?" />
  <row Id="36226" PostHistoryTypeId="1" PostId="15856" RevisionGUID="bb97c43c-642f-4d65-addb-e7d536277781" CreationDate="2011-08-11T15:49:12.667" UserId="3827" Text="Killer tips for a beginner" />
  <row Id="36227" PostHistoryTypeId="3" PostId="15856" RevisionGUID="bb97c43c-642f-4d65-addb-e7d536277781" CreationDate="2011-08-11T15:49:12.667" UserId="3827" Text="&lt;game-design&gt;&lt;engine&gt;&lt;game-mechanics&gt;&lt;game-industry&gt;" />
  <row Id="36228" PostHistoryTypeId="2" PostId="15857" RevisionGUID="9bb6c778-db82-41fc-92c3-ae3fbda47add" CreationDate="2011-08-11T15:57:20.097" UserId="3827" Text="Try limiting your delta time (time between updates) to 0.1 or something similar - I've read about a bug where sometimes on Android the time is incorrectly reported and could cause an issue similar to the one you're having." />
  <row Id="36229" PostHistoryTypeId="5" PostId="15856" RevisionGUID="feb943d8-2b81-49e0-a1ea-4e5bd2f88ecb" CreationDate="2011-08-11T16:02:01.283" UserId="1430" Comment="Title as a question, removed leading examples, clarified formatting and minor grammar edit." Text="I've always wanted to write games, and recently the chance has come up to do so in a couple of different ways for the Android OS using OpenGL (and I figure once I learn OpenGL on one platform I can transfer those skills to other platforms).&#xD;&#xA;&#xD;&#xA;I've been a developer for many years and I've learned a good many languages in my time, and I know that experience counts for everything.  In the short time I've been looking at game development, I've learned a few things which made me open my eyes a bit. So, while I'm still eager and not jaded I want to jump on this with everything I've got. But I also wouldn't mind doing so in a slightly more intelligent fashion that &quot;both feet first.&quot; With that in mind...&#xD;&#xA;&#xD;&#xA;1. What do you know now that you wish you'd known when you'd started? What advice would you give a younger you? &#xD;&#xA;2. What tips would you give a technically competent developer just starting game development?&#xD;&#xA;3. Whats the hardest lesson you learned?" />
  <row Id="36230" PostHistoryTypeId="4" PostId="15856" RevisionGUID="feb943d8-2b81-49e0-a1ea-4e5bd2f88ecb" CreationDate="2011-08-11T16:02:01.283" UserId="1430" Comment="Title as a question, removed leading examples, clarified formatting and minor grammar edit." Text="What are some great tips for a beginner?" />
  <row Id="36231" PostHistoryTypeId="6" PostId="15856" RevisionGUID="feb943d8-2b81-49e0-a1ea-4e5bd2f88ecb" CreationDate="2011-08-11T16:02:01.283" UserId="1430" Comment="Title as a question, removed leading examples, clarified formatting and minor grammar edit." Text="&lt;game-industry&gt;&lt;education&gt;&lt;career&gt;" />
  <row Id="36232" PostHistoryTypeId="5" PostId="15856" RevisionGUID="07016c18-2f61-4eb9-9da0-157b9c06cda0" CreationDate="2011-08-11T16:04:18.637" UserId="3827" Comment="edited body" Text="I've always wanted to write games, and recently the chance has come up to do so in a couple of different ways for the Android OS using OpenGL (and I figure once I learn OpenGL on one platform I can transfer those skills to other platforms).&#xD;&#xA;&#xD;&#xA;I've been a developer for many years and I've learned a good many languages in my time, and I know that experience counts for everything.  In the short time I've been looking at game development, I've learned a few things which made me open my eyes a bit. So, while I'm still eager and not jaded I want to jump on this with everything I've got. But I also wouldn't mind doing so in a slightly more intelligent fashion than &quot;both feet first.&quot; With that in mind...&#xD;&#xA;&#xD;&#xA;1. What do you know now that you wish you'd known when you'd started? What advice would you give a younger you? &#xD;&#xA;2. What tips would you give a technically competent developer just starting game development?&#xD;&#xA;3. What's the hardest lesson you've learned?" />
  <row Id="36233" PostHistoryTypeId="10" PostId="7348" RevisionGUID="8d77aec6-3fa8-4f5f-b8fa-8ef3b6ca52c2" CreationDate="2011-08-11T16:20:30.847" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36234" PostHistoryTypeId="2" PostId="15858" RevisionGUID="780facef-eded-4632-8475-6f9797b407e8" CreationDate="2011-08-11T16:21:05.027" UserId="1198" Text="If I could give my younger self advice from my current self, I would probably say the following.&#xD;&#xA;&#xD;&#xA; 1. Don't make it perfect, younger me spent way too much time developing code for any possible case, which meant I got bored and gave up on some games I shouldn't have. &#xD;&#xA; 2. During development, programmer art is more than sufficient, even many games have been released with &quot;programmer art.&quot; Know your weakness (maybe you're a good artist and programmer so this may or may not apply). I struggle with building assets for my games, so I know that is going to take a large portion of my development time. I try to start out with basic art, and when I get stuck trying to solve a coding problem, I take a break and jump into fixing up my assets and making them a little bit better.&#xD;&#xA; 3. Aim high but be realistic. Set a high goal, then break it down in to managable chunks and knock each one out one at a time. Don't spread yourself too thin.&#xD;&#xA; 4. Don't be afraid to use code (ideas, concepts, etc) you found on-line. Don't suffer from not-invented-here synrdome. Its easy to want all the code in your game to be from scratch, but then you'll never finish your game. When you make a cake, you don't harvest the grain, gather the eggs, grind the flour, you buy them at the store and mix them together to make something great. Just make sure you attribute correctly.&#xD;&#xA; 5. Take a feature driven approach. Break each bit of your design into a &quot;feature&quot; and build it up one feature at a time until you have something fun.&#xD;&#xA; 6. Get something into a playable state as soon as possible, this works wonders for keeping enthused about the project.&#xD;&#xA; 7. Get as many people playing as possible, as early into development as possible. As you continue to playtest yourself, you'll master it quickly. So your idea of &quot;Easy, Medium, Hard&quot; might be someone elses, &quot;Insane, Ungodly, Unplayable.&quot; Maybe thats what you are going for, but make sure you know it up front.&#xD;&#xA; 8. Don't worry about multiplayer on your first game(s). Its hard to do right, its even harder to do well. Make your game fun in single player first. If thats successful, either refactor that code so it can be networked, or start a new project with multiplayer in mind.&#xD;&#xA; 9. Know that your game will not be in the same class World Of Warcraft, Elder Scrolls, Half-Life, Call Of Duty, and that is OK. There is plenty of money to be made making games in the Angry Birds, Fruit Ninja, Plants vs. Zombies class. There is equal fun in both (I presume, I've only worked on the latter type).&#xD;&#xA; 10. If you're not enjoiny the project, take a break, but set a goal with yourself of when you are going to return, and what you're going to acomplish first upon your return to the project.&#xD;&#xA; &#xD;&#xA;If I could pick one of those to put the most emphasis on, it would be the feature driven approach. Make each feature a managable size, and take a standard methotical approach to finishing each one. Once its finished, do not go back and re-work it unless a subsequent feature requires it." />
  <row Id="36235" PostHistoryTypeId="16" PostId="15856" RevisionGUID="c5ccb5a7-a1b2-4f06-a645-e31940b5a9dd" CreationDate="2011-08-11T16:21:43.700" UserId="51" />
  <row Id="36236" PostHistoryTypeId="16" PostId="15858" RevisionGUID="0ffe0cf6-fd30-45c4-b6e6-e320fb3b8ed6" CreationDate="2011-08-11T16:21:43.700" UserId="51" />
  <row Id="36237" PostHistoryTypeId="2" PostId="15859" RevisionGUID="a3a34ccc-1c00-4acb-9a4f-728db9620f95" CreationDate="2011-08-11T16:22:00.473" UserId="998" Text="  - Start writing games&#xD;&#xA;&#xD;&#xA;  - Stop obsessing with optimizing which technology you're going to use.  Just choose the easiest one and get started (which is GLUT / OpenGL in my opinion).&#xD;&#xA;&#xD;&#xA;  - Your first game should be 2D, and __complete__&#xD;&#xA;&#xD;&#xA;  - Don't waste forever developing an engine&#xD;&#xA;&#xD;&#xA;  - You will throw away/totally refactor 90% of your first game engine anyway&#xD;&#xA;&#xD;&#xA;  - Don't fixate on cross-platform stuff.  Just choose a game, choose a platform, choose a technology, and __complete a game in it.__ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36238" PostHistoryTypeId="16" PostId="15859" RevisionGUID="d7ac2fd3-c347-43cd-8f96-fec0fa887c09" CreationDate="2011-08-11T16:22:00.473" UserId="998" />
  <row Id="36239" PostHistoryTypeId="5" PostId="15854" RevisionGUID="44eab0c8-9315-41d3-b3c2-7f8adce9be38" CreationDate="2011-08-11T16:23:22.687" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicates:**  &#xA;&gt; [How closely can a game resemble another game without legal problems](http://gamedev.stackexchange.com/questions/1653/how-closely-can-a-game-resemble-another-game-without-legal-problems)  &#xA;&gt; [Legal issues for a &amp;quot;fangame&amp;quot; of a commercial franchise?](http://gamedev.stackexchange.com/questions/712/legal-issues-for-a-fangame-of-a-commercial-franchise)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I want to do a mobile version of an old game I used to like called Bow And Arrow ([video][1], [game][2]). There's a project already port it in [Ruby][3]. I'm wondering if I can do a remake of this game. Do I have to get permission from the creator, or does it only matter if I use the same resources (graphics and sound)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=iDcC7oeXym8&amp;feature=related&#xD;&#xA;  [2]: http://www.undeb.bangor.ac.uk/archery/game.htm&#xD;&#xA;  [3]: https://github.com/elia/bow_and_arrow" />
  <row Id="36240" PostHistoryTypeId="10" PostId="15854" RevisionGUID="4dcd00f1-9987-4d89-91cc-3a617945c5a8" CreationDate="2011-08-11T16:23:22.390" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36241" PostHistoryTypeId="5" PostId="15267" RevisionGUID="2770c826-7517-4267-8052-bdc893baf646" CreationDate="2011-08-11T16:28:51.307" UserId="51" Comment="deleted 48 characters in body" Text="I am developing a simple graphical game for Android (Java and OpenGL ES). There is no high-end graphics involved, basically a few (less than 10) sprites and some (about 10) dynamically drawn primitives. The performance of the game is quite fine, I get about 50-60 FPS on my HTC Desire.&#xD;&#xA;&#xD;&#xA;However, there is one specific performance issue. In my game I can fire a characters' gun, which then fires a laser beam that moves over the screen following its velocity vector. This beam is dynmically drawn. The thing is: when I fire the gut the first time, the laser beam is moving very unsteady (its &quot;hopping&quot; over the screen). But, after this first time, when I then fire the gun for how often I like, the laser beam is moving very smooth over the screen.&#xD;&#xA;&#xD;&#xA;I first thought this might be an issue with Android's garbage collector. But I double-checked my code. Not one single new object is created within the main game loop, I solely use pre-created objects (i.e. class instances). I also doubt the problem is related to the dynamic drawing of my primitives (laser beam), because as said its working fine and very smooth for every gun shot after the first one. It is solely this first shot where I encounter this performance issue.&#xD;&#xA;&#xD;&#xA;So my question is, does this behaviour sound familiar to anyone of you guys? I would appreciate any idea very much." />
  <row Id="36242" PostHistoryTypeId="4" PostId="15806" RevisionGUID="162cf7a9-c256-4240-8eb5-37bf0688cea1" CreationDate="2011-08-11T16:29:28.060" UserId="744" Comment="edited title" Text="Does inflating scores make players happier?" />
  <row Id="36243" PostHistoryTypeId="25" PostId="15856" RevisionGUID="2e489fe5-a62d-476b-8a55-4c9c43445d77" CreationDate="2011-08-11T16:36:51.633" Comment="http://twitter.com/#!/StackGameDev/status/101693573266804736" />
  <row Id="36244" PostHistoryTypeId="2" PostId="15860" RevisionGUID="68f83ac2-4eb7-4224-8371-f474bf5b445d" CreationDate="2011-08-11T16:38:41.387" UserId="51" Text="Fundamentally creating a game with a one man team isn't really any different than creating a game with a huge team other than the fact that you don't have as many (or any, really) specialized people or parallelization of tasks.  The decisions you would make here are the same decisions you would make if you were running a team who's goal was to get to ship as quickly as possible.&#xD;&#xA;&#xD;&#xA;So you have to play to your strengths and *design* away from your faults.  If you aren't very good at high poly art, you either need to pick a style that works with your skill set, or use existing art in the form of mods or buying art off stock websites.  If you don't know anything about multiplayer networking, use middleware that solves most of the problems for you.&#xD;&#xA;&#xD;&#xA;In particular, getting bogged down by non-critical-to-gameplay technology and features is going to suck away your time and not get you closer to your end goal.  I'm personally a big fan of Unity due to it's super quick iteration time, easy art pipeline (just drop in pretty much any format and it'll work), and the ability play the game from within the editor.  All of these will help you get up and running quicker than using something more &quot;professional&quot;.&#xD;&#xA;&#xD;&#xA;&gt;What programming language should I use? What modeling/animation software should I use?&#xD;&#xA;&#xD;&#xA;Use whatever you're comfortable with.  If you're not comfortable with any of them, just pick one of the popular ones.  The choice of tool here isn't going to make or break your progress by any significant factor compared to the design decisions you decide to go with." />
  <row Id="36245" PostHistoryTypeId="5" PostId="15762" RevisionGUID="bbc130f9-dc12-43d2-a431-03965eebe9a3" CreationDate="2011-08-11T16:41:28.277" UserId="1929" Comment="deleted 36 characters in body" Text="For 2D top-down style sprites, what kind of systems of tilesets are out there? I want to know my options. This is *not* another &quot;free tilesets&quot; question, but a &quot;free tileset systems&quot; question.&#xD;&#xA;&#xD;&#xA;Allow me to explain. RPG Maker XP defines character tilesets as having four states -- facing up, down, left, and right, each with animation.&#xD;&#xA;&#xD;&#xA;Compare this to, say, Final Fantasy 6. Copyright aside, each character has a *huge* array of actions they can do; anything from crouching, falling unconcious, being surprised, etc. and it's supported for all the party members.&#xD;&#xA;&#xD;&#xA;So, **what are the tileset systems out there that I can use? What's the best combination of &quot;features&quot; and freely available assets?**&#xD;&#xA;&#xD;&#xA;Again, because it's hard to explain: I'm looking for a system of sprites, like RPG Maker XP, with more states. It's not the specific sprites I'm after; it's knowing the system, and being able to find resources based on that. Just like I can find free RPG Maker XP sprites if I want, once I know that this is what I'm after." />
  <row Id="36246" PostHistoryTypeId="5" PostId="15816" RevisionGUID="67c68246-2b5b-459b-a1e5-e1463f45de8d" CreationDate="2011-08-11T16:43:27.700" UserId="51" Comment="deleted 14 characters in body" Text="I was recently listen to a talk that Jonathan Blow gave, you can find it [here][1].  In the talk, he was talking about what data structures he (and he seemed to imply many others) use, and why.  Which is to say that he simply used arrays to store data, and use the naive approach to find data in it, meaning iterate through the array until you found what you wanted, assuming it wasn't in a performance critical place in the code.  He gave the example of loading data from a wad file in doom, which while fast, still took that naive approach (at least according to the talk, I haven't looked at the source code since I have not a clue to where I should begin).  The reason he gave for this was because while it may be slightly slower to do things the naive way, it's not much, and in many cases, not noticeable, so it's better to optomize how much work you can get done in your lifetime, than to make things a millisecond faster, again, assuming it's not in your physics engine or something like that.&#xD;&#xA;&#xD;&#xA;All this seems well and good, except I have one question, why not linked lists rather than arrays?  Sure, if you had to make your own linked list class, I would be on board, but in c++ anyway, assuming your using STL, you only need to declare the type as a list, rather than as a vector, and use iterators to loop over it, rather than looping an index.&#xD;&#xA;&#xD;&#xA;The advantages of using a linked list though seem much greater, for example, if you can be guaranteed that nothing is going to be removed from it while your iterating, you don't need to have locks around it, because adding data doesn't have the possibility of moving everything (or is that a bad assumption).  Also, in general, moving data is slow, although this could potentially be avoided if you know the size of your data by reserving the space.&#xD;&#xA;&#xD;&#xA;Another advantage is when you do remove data, you just tell the list to remove it, and it just needs to change a few pointers, and call a destructor, which can be done pretty quickly.  But to remove something from an array/vector, you have to either shift everything back one, or possibly add a flag saying that it has been deleted.  (Or, another possibility if you don't care about the order of the data, is move the data at the end index, to the data in the now deleted position).  Either way, this seems like it is a lot of extra, unneeded work, or potentially too slow.&#xD;&#xA;&#xD;&#xA;I did take a look around and found [this][2], which claimed that a lot of older developers didn't want to use STL because it wasn't mature enough.  Also, older games AFAIK, used C rather than C++, which also doesn't have STL.  And I could see a case there for using arrays rather than linked lists, because you would have to make your own (which while simple enough to do, could potentially lead to many more errors).&#xD;&#xA;&#xD;&#xA;I also read that it's a bad idea to create iterators in Java (due to the garbage collector), but that idea seems moot in languages such as C++, where there isn't a garbage collector, and I would imagine that linked list iterators are pretty lightweight (admittedly probably not as lightweight as vector iterators though).  Or is this also a bad assumption, and it's better/faster just to use an index in your loop, and increase that.&#xD;&#xA;&#xD;&#xA;  [1]: http://the-witness.net/news/2011/06/how-to-program-independent-games/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/8980/why-dont-c-game-developers-use-the-boost-library" />
  <row Id="36247" PostHistoryTypeId="14" PostId="15852" RevisionGUID="2274ece2-f2bf-4726-87ce-79186d2f825d" CreationDate="2011-08-11T16:46:38.007" UserId="-1" Text="[{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;}]" />
  <row Id="36248" PostHistoryTypeId="17" PostId="15852" RevisionGUID="0b22cee6-a1ee-46f4-bb78-4849f59de76e" CreationDate="2011-08-11T16:46:38.023" UserId="51" Comment="to http://gaming.stackexchange.com/questions/27706/can-we-manually-reduce-the-file-size-of-minecraft-smp-server-by-just-deleting-mc" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36249" PostHistoryTypeId="10" PostId="15852" RevisionGUID="615b3ab3-a3d2-483e-a7bd-1aa04f457982" CreationDate="2011-08-11T16:46:35.887" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36250" PostHistoryTypeId="12" PostId="15848" RevisionGUID="b9c84030-73c1-4e3e-8aad-196287f1a8c1" CreationDate="2011-08-11T17:54:18.667" UserId="8921" Text="[{&quot;Id&quot;:8921,&quot;DisplayName&quot;:&quot;Jonathan Connell&quot;}]" />
  <row Id="36251" PostHistoryTypeId="2" PostId="15861" RevisionGUID="5919fdca-5469-4aba-9cc3-bb95090d9a19" CreationDate="2011-08-11T17:56:08.233" UserId="6558" Text="As stated, there's not really any &quot;standard system&quot; for sprites or tiles.  The closest such thing is something like RPG Maker sprites, which are only standard because there's a community built around the game (much in the same way that there's tilesets or mods for other popular games)&#xD;&#xA;&#xD;&#xA;That said, there's a few options.  You could find a set of free graphics to use and load them into game in that format.  Many times the same artist will create sprites with a &quot;standard&quot; layout.  The downside to this approach is that your options would be pretty limited.&#xD;&#xA;&#xD;&#xA;A potentially better solution is to use one of the RPG Maker formats.  The trick is that you are NOT limited in the same way that RPG Maker is, since you can define the layout of the sprite sheet.  So, you can expand on the different actions per character to be whatever you want.  The RPG Maker sprites have 12 frames for each 'character', 4 directions with 3 frames of animation per direction.  A lot of times, an artist would make more 'actions' for a specific character, and would simply use another 'character' slot to allow for another 12 frames of animation, or poses, or whatever.&#xD;&#xA;&#xD;&#xA;The reason commercial games (like FF6) have unique spritesheet layouts is because **each game customized the layout for the game being made**.  RPG maker uses a standard layout format because it's a tool to make the games, and so it needed to be able to have a standard.  Unless you're making a tool to make other games, you can easily make whatever changes you want to that standard.  It might require some time spent editing graphics, but when making games, it's pretty important to have skills to edit graphics files, unless you plan on only making text based game." />
  <row Id="36252" PostHistoryTypeId="6" PostId="15806" RevisionGUID="d8a6dbfd-76c2-437f-a2ef-f309673a4852" CreationDate="2011-08-11T18:04:53.363" UserId="8921" Comment="Added game design tag" Text="&lt;game-design&gt;&lt;leaderboards&gt;&lt;feedback&gt;&lt;experience&gt;&lt;scoring&gt;" />
  <row Id="36253" PostHistoryTypeId="24" PostId="15806" RevisionGUID="d8a6dbfd-76c2-437f-a2ef-f309673a4852" CreationDate="2011-08-11T18:04:53.363" Comment="Proposed by 8921 approved by 1430 edit id of 631" />
  <row Id="36254" PostHistoryTypeId="25" PostId="15806" RevisionGUID="b8b41871-3c78-46af-801f-da9903e91ebf" CreationDate="2011-08-11T18:36:51.470" Comment="http://twitter.com/#!/StackGameDev/status/101723771479666690" />
  <row Id="36255" PostHistoryTypeId="2" PostId="15862" RevisionGUID="b86c47b5-f71c-4061-800b-df13270961c0" CreationDate="2011-08-11T18:42:21.513" UserId="5125" Text="I've been working with Qt and it is quite nice, defenitely OK for a not too complicated game, for a 2D game it would be perfect I'd say.&#xD;&#xA;&#xD;&#xA;The pros I found:&#xD;&#xA;&#xD;&#xA;* integrated translation&#xD;&#xA;* simplicity when creating menus&#xD;&#xA;&#xD;&#xA;The cons I've stumbled into:&#xD;&#xA;&#xD;&#xA;* no draw calls from other threads than the main thread.&#xD;&#xA;* complicated to debug signals&#xD;&#xA;" />
  <row Id="36256" PostHistoryTypeId="16" PostId="15862" RevisionGUID="d7567b8f-9bf0-49eb-b2ed-749348b03bd8" CreationDate="2011-08-11T18:42:21.513" UserId="5125" />
  <row Id="36257" PostHistoryTypeId="5" PostId="15649" RevisionGUID="36b718be-1ecc-4c1d-a97a-20737ac6d6c5" CreationDate="2011-08-11T18:44:30.333" UserId="3505" Comment="added 876 characters in body" Text="Actually, order of update problems are quite common for normal impulse physics engines, you can't just delay applying the force as Vigil suggests, you'd end up breaking energy preservation when an object simultaneously collides with 2 other. Usually they do though manage to make something that seems pretty real, even though a different order of update would have made a significantly different outcome.&#xD;&#xA;&#xD;&#xA;In any case, for your purpose there is enough hiccups in an impulse system that I'd suggest you instead build a mass-spring model.&#xD;&#xA;&#xD;&#xA;The basic idea is that instead of trying to resolve a collision in one step you apply a force to the objects colliding, this force should be equivalent to the amount of overlap between the objects, this is comparable to how real objects during a collision transform their movement energy into deformation and then back into movement, the great thing about this system is that it allows force to travel through an object without that object having to bounce back and forth, and it can reasonably be done completely order of update independent.&#xD;&#xA;&#xD;&#xA;In order for objects to come to a halt rather than bounce around indefinitely you will have to apply some form of dampening, you can greatly affect the style and feel of your game depending on how you do it, but a very basic approach would be to apply a force to two touching objects equivalent to their internal movement, you may choose to apply it only when they are moving towards one another, or also when they move away from one another, the latter can be used to completely prevent objects from bouncing back when they hit the ground, but will also make them a little sticky.&#xD;&#xA;&#xD;&#xA;You can also make a friction effect by braking an object in the perpendicular direction of a collision, the amount of braking should be equivalent to the amount of overlap.&#xD;&#xA;&#xD;&#xA;You could get around the concept of mass pretty easily by making all objects have the same mass, and immovable objects will work like having infinite mass if you simply neglect accelerating them.&#xD;&#xA;&#xD;&#xA;Some pseudo-code, just in case the above wasn't clear enough:&#xD;&#xA;&#xD;&#xA;    //Presuming that you have done collision checks between two objects and now have  &#xD;&#xA;    //numbers for how much they overlap in each direction.&#xD;&#xA;    overlapX&#xD;&#xA;    overlapY&#xD;&#xA;    if(overlapX&lt;overlapY){ //Do collision in direction X&#xD;&#xA;        if(obj1.X&gt;obj2.X){&#xD;&#xA;            swap(obj1,obj2)&#xD;&#xA;        }&#xD;&#xA;        //Spring effect:&#xD;&#xA;        obj1.addXvelocity-=overlapX*0.1 //Constant, the lower this is set the softer the  &#xD;&#xA;                                        //collision will be.&#xD;&#xA;        obj2.addXvelocity+=overlapX*0.1&#xD;&#xA;        //Dampener effect:&#xD;&#xA;        velocityDifference=obj2.Xvelocity-obj1.Xvelocity&#xD;&#xA;        //velocityDifference=min(velocityDifference,0) //Uncomment to only dampen when  &#xD;&#xA;                                                       //objects move towards each other.&#xD;&#xA;        obj1.addXvelocity+=velocityDifference*0.1 //Constant, higher for more dampening.&#xD;&#xA;        obj2.addXvelocity-=velocityDifference*0.1&#xD;&#xA;        //Friction effect:&#xD;&#xA;        if(obj1.Yvelocity&gt;obj2.Yvelocity){&#xD;&#xA;            swap(obj1,obj2)&#xD;&#xA;        }&#xD;&#xA;        friction=overlapX*0.01&#xD;&#xA;        if(2*friction&gt;obj2.Yvelocity-obj1.Yvelocity){&#xD;&#xA;            obj1.addYvelocity+=(obj2.Yvelocity-obj1.Yvelocity)/2&#xD;&#xA;            obj2.addYvelocity-=(obj2.Yvelocity-obj1.Yvelocity)/2&#xD;&#xA;        }&#xD;&#xA;        else{&#xD;&#xA;            obj1.addYvelocity+=friction&#xD;&#xA;            obj2.addYvelocity-=friction&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    else{ //Do collision in direction Y&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The point of the addXvelocity and addYvelocity properties is that these are added to their object's velocity after all collision handling is done.&#xD;&#xA;&#xD;&#xA;**Edit:**  &#xD;&#xA;You could do stuff in the following order, where each bullet must be performed on all elements before the next is performed:&#xD;&#xA;&#xD;&#xA;- Detect collisions, they may be resolved as soon as they are detected.&#xD;&#xA;- Add the addVelocity values to the velocity values, add gravity Yvelocity, reset the addVelocity values to 0, move objects according to their velocity.&#xD;&#xA;- Render the scene.&#xD;&#xA;&#xD;&#xA;Also, I realize that the following might not be completely clear in my initial post, under the influence of gravity objects will overlap when resting on top of one another, this suggests that their collision box should be slightly higher than their graphical representation to avoid overlapping visually. This problem will be lesser if the physics is run at a higher update rate. I suggest you try running at 120Hz for a reasonable compromise between CPU time and physics accuracy." />
  <row Id="36258" PostHistoryTypeId="6" PostId="15806" RevisionGUID="69c283a9-00a7-4255-947f-2664a0894d54" CreationDate="2011-08-11T19:03:27.853" UserId="51" Comment="edited tags" Text="&lt;game-design&gt;&lt;leaderboards&gt;&lt;feedback&gt;&lt;scoring&gt;&lt;user-experience&gt;" />
  <row Id="36259" PostHistoryTypeId="2" PostId="15863" RevisionGUID="6b2a485d-8957-400f-8daa-e44088b7b72f" CreationDate="2011-08-11T19:21:26.060" UserId="5540" Text="I'm looking at creating a real time strategy/tower defense mashup game for facebook (and other platforms like google+) along the same feel, but of course different mechanics, as [backyard monsters][1]. &#xD;&#xA;&#xD;&#xA;The model animations will hopefully be fairly thorough, with maybe three different animations (walking, attacking, resting) and 30 different monsters to model. The models themselves will be VERY simple and likely low texture since I'm not an animator, so I'm looking for the solution that's the best balance between ease of use and processor cost. &#xD;&#xA;&#xD;&#xA;When creating a game like this is it generally better to go a full fledged 3d model route for the &quot;monsters&quot; or is it better to model the animations in an external editor and [turn them into a sprite][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.facebook.com/apps/application.php?id=342684208824&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/13852/render-angles-of-a-3d-model-into-2d-images" />
  <row Id="36260" PostHistoryTypeId="1" PostId="15863" RevisionGUID="6b2a485d-8957-400f-8daa-e44088b7b72f" CreationDate="2011-08-11T19:21:26.060" UserId="5540" Text="Sprite vs 3d Model in Flash Facebook Game" />
  <row Id="36261" PostHistoryTypeId="3" PostId="15863" RevisionGUID="6b2a485d-8957-400f-8daa-e44088b7b72f" CreationDate="2011-08-11T19:21:26.060" UserId="5540" Text="&lt;3d&gt;&lt;flash&gt;&lt;sprites&gt;" />
  <row Id="36262" PostHistoryTypeId="2" PostId="15864" RevisionGUID="ec18c1b2-0df0-434e-a1ff-be7acde79aaf" CreationDate="2011-08-11T19:48:08.967" UserId="20" Text="The workflow for 3D models is most likely less complicated than rendering all your models to sprites. If you change some detail in a texture, you don't have to render all the sprites again etc.&#xD;&#xA;&#xD;&#xA;Since you're targeting flash, you'll have to consider the limitations of the platform as well. The new 3D APIs ([molehill][1]) are capable of performant 3D graphics, however it might take quite some time till this player will be released and has a wide user-base.&#xD;&#xA;&#xD;&#xA;Current flash 3D engines like [Papervision][2] or [Away3D][3] could work, they will put a heavy load on the CPU though, even with low poly-count. Also z-fighting is a constant issue with these engines. If you plan to use a fixed viewing-angle, you can prepare your models in a way that minimizes these issues though.&#xD;&#xA;&#xD;&#xA;If you go the sprite-route, you can leverage existing frameworks like [Flixel][4] or [Flashpunk][5] and it won't matter how complex your models are. Also the amount of monsters/entities you can display on screen will be much higher with the sprite approach.&#xD;&#xA;&#xD;&#xA;There's probably lots of people that play games on Facebook that have an old and/or slow CPU (eg. netbooks), so performance can be an issue.&#xD;&#xA;&#xD;&#xA;So for your target audience, it would be best to go the sprite/bitmap route as of now. 3D will become viable with the new flash 3D APIs. If you're interested in that, this project might be a good way to learn about this new technology. Early adoption might give you more visitors, but it's also harder to do since APIs might change or tools/frameworks aren't mature yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://labs.adobe.com/technologies/flash/molehill/&#xD;&#xA;  [2]: http://blog.papervision3d.org/&#xD;&#xA;  [3]: http://away3d.com/&#xD;&#xA;  [4]: http://flixel.org/&#xD;&#xA;  [5]: http://flashpunk.net/" />
  <row Id="36263" PostHistoryTypeId="2" PostId="15865" RevisionGUID="5a9bc248-21b4-40ba-95f9-7d465d389fde" CreationDate="2011-08-11T20:25:28.407" UserId="7512" Text="I find myself most satisfied when I see what appear at first glance to be prime numbers.&#xD;&#xA;&#xD;&#xA;If the score always just adds a 0 (10, 20, 50, 200, 300 etc.) at the end, I feel cheated.&#xD;&#xA;&#xD;&#xA;Multiples of 5 (5, 25, 45, 80, 95 etc.) are a bit better, but you quickly catch on to the fact that your accomplishment is worth 1/5 of what's being shown.&#xD;&#xA;&#xD;&#xA;Numbers like 47, 76, 298 etc. feel more meaningful than 45, 75, 300 etc., and you end up with the illusion that there's some really precise math and balancing going on, legitimizing your score.&#xD;&#xA;&#xD;&#xA;So to answer your question, big numbers are probably better, but only if it's not obvious that they're inflated.&#xD;&#xA;&#xD;&#xA;Oh, and don't forget the thousands separators -- those are achievements in themselves." />
  <row Id="36264" PostHistoryTypeId="25" PostId="15863" RevisionGUID="c6702101-19f2-4efc-a3bd-570d7d6cbd1b" CreationDate="2011-08-11T20:36:51.877" Comment="http://twitter.com/#!/StackGameDev/status/101753971043086336" />
  <row Id="36265" PostHistoryTypeId="2" PostId="15866" RevisionGUID="8d668858-c08b-4812-8342-8396d5478b8d" CreationDate="2011-08-11T20:58:55.553" UserId="163" Text="I'm interested in developing a game who's background music changes with the mood and scenario of the game's action. Of course many existing games do this (halo for example), but I was interested in any resources/papers/articles talking about the techniques to develop a system like this.&#xD;&#xA;&#xD;&#xA;I have some ideas, and I understand that this will be equally challenging to implement at the code level as it will be to come up or acquire music that fits this model. Any links or, answers with ideas in them would he appreciated." />
  <row Id="36266" PostHistoryTypeId="1" PostId="15866" RevisionGUID="8d668858-c08b-4812-8342-8396d5478b8d" CreationDate="2011-08-11T20:58:55.553" UserId="163" Text="Dynamic audio score/music" />
  <row Id="36267" PostHistoryTypeId="3" PostId="15866" RevisionGUID="8d668858-c08b-4812-8342-8396d5478b8d" CreationDate="2011-08-11T20:58:55.553" UserId="163" Text="&lt;xna&gt;&lt;engine&gt;&lt;audio&gt;&lt;design&gt;" />
  <row Id="36268" PostHistoryTypeId="2" PostId="15867" RevisionGUID="c31631e5-7c31-4cea-b026-15c9973cdaac" CreationDate="2011-08-11T21:05:13.590" UserId="7249" Text="Good question! A more specific question is what are some common requirements that a game would have that cannot be met with STL and Boost.&#xD;&#xA;&#xD;&#xA;In my experience, the tight memory limitations of console hardware make any kind of dynamic sized container a bad idea regardless of how clever your custom allocator is. Containers that have no deliberate bounds encourage programmers to write code that does not constrain the bounds of their data sets. Depending on countless variables that are difficult to track you may exceed your memory limitations. I have a hunch that this is one of the primary causes of instability in modern games.&#xD;&#xA;&#xD;&#xA;Additionally, overuse of templates can lead to very long compile times in a large code base, and will bloat the size of your executable so that it would no longer fit within the cache of, say, an auxiliary core on a ps3.&#xD;&#xA;&#xD;&#xA;However, for PC-only development I think STL and Boost are very good. While general-case solutions are not always ideal, they are often good enough. Your first solution to a problem is almost never ideal, and you improve or replace the inadequacies until it is good enough.&#xD;&#xA;" />
  <row Id="36269" PostHistoryTypeId="2" PostId="15868" RevisionGUID="3fc86c1a-9c2e-4093-a9f5-3347d9714499" CreationDate="2011-08-11T21:27:47.500" UserId="744" Text="The earliest system I'm aware of is &lt;a href=&quot;http://www.google.com/patents?id=JJN7AAAAEBAJ&amp;printsec=frontcover&amp;dq=5315057&amp;hl=en&amp;ei=pEhETq2CJcfJswbVqrC3Bw&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCkQ6AEwAA&quot;&gt;LucasArts's iMUSE system&lt;/a&gt;, used in most of the SCUMM games.&#xD;&#xA;&#xD;&#xA;(That is a link to a patent document, but the patent has expired, leaving a very detailed description of how it worked available in the public domain. Hooray for the patent system actually working correctly for once!)" />
  <row Id="36270" PostHistoryTypeId="6" PostId="15866" RevisionGUID="1de09bad-9c90-465a-9e49-df24c5979082" CreationDate="2011-08-11T21:38:59.730" UserId="3626" Comment="This question isn't XNA specific." Text="&lt;engine&gt;&lt;audio&gt;&lt;design&gt;" />
  <row Id="36271" PostHistoryTypeId="24" PostId="15866" RevisionGUID="1de09bad-9c90-465a-9e49-df24c5979082" CreationDate="2011-08-11T21:38:59.730" Comment="Proposed by 3626 approved by -1 edit id of 632" />
  <row Id="36272" PostHistoryTypeId="5" PostId="15866" RevisionGUID="52c003c6-688b-4207-abde-06ed2203902f" CreationDate="2011-08-11T21:38:59.980" UserId="163" Comment="added link" Text="I'm interested in developing a game who's background music changes with the mood and scenario of the game's action. Of course many existing games do this (halo for example), but I was interested in any resources/papers/articles talking about the techniques to develop a system like this.&#xD;&#xA;&#xD;&#xA;I have some ideas, and I understand that this will be equally challenging to implement at the code level as it will be to come up or acquire music that fits this model. Any links or, answers with ideas in them would he appreciated.&#xD;&#xA;&#xD;&#xA;Edit: this is the kind of info I'm looking for :)&#xD;&#xA;http://halo.bungie.org/misc/gdc.2002.music/" />
  <row Id="36273" PostHistoryTypeId="2" PostId="15869" RevisionGUID="335997f3-5f21-43ae-97c0-44a16e6bc36b" CreationDate="2011-08-11T21:39:29.440" UserId="9016" Text="**Preamble:** As Patrick Hughes noted, for the &quot;correct&quot; answer to your question, take a sample of test playes. Give one group your game with standard scores, and a second group the same game but with 100x/1000x the scores.&#xD;&#xA;&#xD;&#xA;**Fractions:** Depends on your Game, really. Commenter Joe provided an example of where rounding can occur, but that's about Hit Points rather than scores. It's relatively rare for a game to have adaptive scores, because scores are supposed to reflect the player's skill, whereas, for example, adaptive damage tries to deal more damage to more expierenced players than less expierienced ones. If you suspect fractions for another reason, then avoiding rounding does legitimate for raising everything by a factor of 10 or 100. I can't think of a reason why this could happen, though.&#xD;&#xA;&#xD;&#xA;**Comparing scores**: Again, relatively subjective. Larger scores are easier to compare than smaller ones, though. Try this:&#xD;&#xA;&#xD;&#xA; - Team Alpha got 38 Points&#xD;&#xA; - Team Beta got 20 Points&#xD;&#xA; - Team Charlie got 80 Points&#xD;&#xA;&#xD;&#xA;versus&#xD;&#xA;&#xD;&#xA; - Team Alpha got 3800 Points&#xD;&#xA; - Team Beta got 2000 Points&#xD;&#xA; - Team Charlie got 8000 Points&#xD;&#xA;&#xD;&#xA;Which team was better, and how much better? Mathematically seen, both representations are absolutely equivalent.&#xD;&#xA;&#xD;&#xA;**Satisfaction**: I'd say it depends on whether your game is fast-paced or slow-paced. If your game is fast-paced with a lot of action, then &quot;busting the high score&quot; gives me *much* more satisfication if I cracked the high score not by 80 points, but by 80000. If your game is slow-paced, with lots of tactical thinking, then scores usually aren't the most relevant satisfaction factor at the end of the game. I'd compare the time I needed to beat the round/level. How many mistakes did I make? How many units did I need?&#xD;&#xA;&#xD;&#xA;**Conclusion**: It depends on your game, and know your target audience.&#xD;&#xA;&#xD;&#xA;Also, I haven't seen a game which gives you sub-one scores. It's an interesting concept. Getting finaly a score of 1.0319049.&#xD;&#xA;&#xD;&#xA;As you can see in the answers and comments, it varies from player to player." />
  <row Id="36274" PostHistoryTypeId="2" PostId="15870" RevisionGUID="dd2992a4-ea38-48d9-a1ed-be998b1f19aa" CreationDate="2011-08-11T22:01:41.973" UserId="9211" Text="The enemy at that point in the array has probably been destroyed. Instead of looping through an array full of potentially-gone instance ids, you should use `with`:&#xD;&#xA;&#xD;&#xA;    var hv;&#xD;&#xA;    hv = -1&#xD;&#xA;    with (enemy) {&#xD;&#xA;        if (range &gt; hv)&#xD;&#xA;            hv = range&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Replace the inner for loop of your step event with that and then you can create and destroy enemies all you like without worrying about updating the now-unnecessary array." />
  <row Id="36275" PostHistoryTypeId="2" PostId="15871" RevisionGUID="7400f641-1d21-44fc-a01c-b2f3e672e11f" CreationDate="2011-08-11T22:16:30.357" UserId="6117" Text="I'm kind of confused about what you're asking, but if a file format and tilemap editor in any way helps you, check out the [Tiled][1] editor and the [TMX][2] tile map format that it works with. I've used it for a sneaking game (top down tilemap) and for shmup levels (just lined up the spawns).&#xD;&#xA;&#xD;&#xA;If you're developing for the iPhone/Mac and in objective-c, cocos2d supports reading TMX maps and rendering them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CCIQFjAA&amp;url=http://www.mapeditor.org/&amp;ei=81NETs6EMoWyhAeS55iEBg&amp;usg=AFQjCNFLbGxDlifw8VM3Op1Ohc5Ef2jkkQ&amp;sig2=63i4U-zbZQ5eMBrkI_uuhg&#xD;&#xA;  [2]: https://github.com/bjorn/tiled/wiki/TMX-Map-Format" />
  <row Id="36276" PostHistoryTypeId="5" PostId="15649" RevisionGUID="39c43e42-705d-456f-8bd7-972aa37002e5" CreationDate="2011-08-11T22:18:06.033" UserId="3505" Comment="added 274 characters in body" Text="Actually, order of update problems are quite common for normal impulse physics engines, you can't just delay applying the force as Vigil suggests, you'd end up breaking energy preservation when an object simultaneously collides with 2 other. Usually they do though manage to make something that seems pretty real, even though a different order of update would have made a significantly different outcome.&#xD;&#xA;&#xD;&#xA;In any case, for your purpose there is enough hiccups in an impulse system that I'd suggest you instead build a mass-spring model.&#xD;&#xA;&#xD;&#xA;The basic idea is that instead of trying to resolve a collision in one step you apply a force to the objects colliding, this force should be equivalent to the amount of overlap between the objects, this is comparable to how real objects during a collision transform their movement energy into deformation and then back into movement, the great thing about this system is that it allows force to travel through an object without that object having to bounce back and forth, and it can reasonably be done completely order of update independent.&#xD;&#xA;&#xD;&#xA;In order for objects to come to a halt rather than bounce around indefinitely you will have to apply some form of dampening, you can greatly affect the style and feel of your game depending on how you do it, but a very basic approach would be to apply a force to two touching objects equivalent to their internal movement, you may choose to apply it only when they are moving towards one another, or also when they move away from one another, the latter can be used to completely prevent objects from bouncing back when they hit the ground, but will also make them a little sticky.&#xD;&#xA;&#xD;&#xA;You can also make a friction effect by braking an object in the perpendicular direction of a collision, the amount of braking should be equivalent to the amount of overlap.&#xD;&#xA;&#xD;&#xA;You could get around the concept of mass pretty easily by making all objects have the same mass, and immovable objects will work like having infinite mass if you simply neglect accelerating them.&#xD;&#xA;&#xD;&#xA;Some pseudo-code, just in case the above wasn't clear enough:&#xD;&#xA;&#xD;&#xA;    //Presuming that you have done collision checks between two objects and now have  &#xD;&#xA;    //numbers for how much they overlap in each direction.&#xD;&#xA;    overlapX&#xD;&#xA;    overlapY&#xD;&#xA;    if(overlapX&lt;overlapY){ //Do collision in direction X&#xD;&#xA;        if(obj1.X&gt;obj2.X){&#xD;&#xA;            swap(obj1,obj2)&#xD;&#xA;        }&#xD;&#xA;        //Spring effect:&#xD;&#xA;        obj1.addXvelocity-=overlapX*0.1 //Constant, the lower this is set the softer the  &#xD;&#xA;                                        //collision will be.&#xD;&#xA;        obj2.addXvelocity+=overlapX*0.1&#xD;&#xA;        //Dampener effect:&#xD;&#xA;        velocityDifference=obj2.Xvelocity-obj1.Xvelocity&#xD;&#xA;        //velocityDifference=min(velocityDifference,0) //Uncomment to only dampen when  &#xD;&#xA;                                                       //objects move towards each other.&#xD;&#xA;        obj1.addXvelocity+=velocityDifference*0.1 //Constant, higher for more dampening.&#xD;&#xA;        obj2.addXvelocity-=velocityDifference*0.1&#xD;&#xA;        //Friction effect:&#xD;&#xA;        if(obj1.Yvelocity&gt;obj2.Yvelocity){&#xD;&#xA;            swap(obj1,obj2)&#xD;&#xA;        }&#xD;&#xA;        friction=overlapX*0.01&#xD;&#xA;        if(2*friction&gt;obj2.Yvelocity-obj1.Yvelocity){&#xD;&#xA;            obj1.addYvelocity+=(obj2.Yvelocity-obj1.Yvelocity)/2&#xD;&#xA;            obj2.addYvelocity-=(obj2.Yvelocity-obj1.Yvelocity)/2&#xD;&#xA;        }&#xD;&#xA;        else{&#xD;&#xA;            obj1.addYvelocity+=friction&#xD;&#xA;            obj2.addYvelocity-=friction&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    else{ //Do collision in direction Y&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The point of the addXvelocity and addYvelocity properties is that these are added to their object's velocity after all collision handling is done.&#xD;&#xA;&#xD;&#xA;**Edit:**  &#xD;&#xA;You could do stuff in the following order, where each bullet must be performed on all elements before the next is performed:&#xD;&#xA;&#xD;&#xA;- Detect collisions, they may be resolved as soon as they are detected.&#xD;&#xA;- Add the addVelocity values to the velocity values, add gravity Yvelocity, reset the addVelocity values to 0, move objects according to their velocity.&#xD;&#xA;- Render the scene.&#xD;&#xA;&#xD;&#xA;Also, I realize that the following might not be completely clear in my initial post, under the influence of gravity objects will overlap when resting on top of one another, this suggests that their collision box should be slightly higher than their graphical representation to avoid overlapping visually. This problem will be lesser if the physics is run at a higher update rate. I suggest you try running at 120Hz for a reasonable compromise between CPU time and physics accuracy.&#xD;&#xA;&#xD;&#xA;**Edit2:**  &#xD;&#xA;Very basic physics engine flow:&#xD;&#xA;&#xD;&#xA;- Collisions and gravity produce force/acceleration. `acceleration = [Complicated formulas]`&#xD;&#xA;- Force/acceleration are added to velocity. `velocity += acceleration`&#xD;&#xA;- Velocity is added to position. `position += velocity`" />
  <row Id="36277" PostHistoryTypeId="25" PostId="15866" RevisionGUID="e5cc1dc2-99f3-4fa5-bd99-23a4e0dafe34" CreationDate="2011-08-11T22:36:51.947" Comment="http://twitter.com/#!/StackGameDev/status/101784170782666752" />
  <row Id="36278" PostHistoryTypeId="2" PostId="15872" RevisionGUID="4ebf0027-9574-436a-b4b2-dfe2f6435a59" CreationDate="2011-08-11T23:06:23.460" UserId="8781" Text="[IndieGames.com Podcast][1] has a lot of good interviews with indie developers. The interviews tend to be framed from a journalist/player perspective, but there's still a lot of decent design talk.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://indiegames.com/podcast/" />
  <row Id="36279" PostHistoryTypeId="16" PostId="15872" RevisionGUID="fe461a53-3056-4ac2-8d28-582e0c6a79db" CreationDate="2011-08-11T23:06:23.460" UserId="8781" />
  <row Id="36280" PostHistoryTypeId="25" PostId="15816" RevisionGUID="4ff99e69-8302-4b5c-9dba-d07845d2b3d0" CreationDate="2011-08-12T00:36:52.437" Comment="http://twitter.com/#!/StackGameDev/status/101814369079406594" />
  <row Id="36281" PostHistoryTypeId="5" PostId="15762" RevisionGUID="e361c5fe-8d0c-402a-a50e-f286e5a779ab" CreationDate="2011-08-12T01:07:02.333" UserId="2698" Comment="Big overhaul" Text="For 2D top-down style sprites, what commonly used spritesheet formats are available?&#xD;&#xA;&#xD;&#xA;By a sprite sheet format, I mean this: for any RPG Maker sprite sheet, you can count on all the walk animations being in the same place on the image between characters. For Final Fantasy 6's characters, you could open all their sprite sheets and compare them and in each one, the walk animations, crouching sprites, surprised sprites, etc would all be in the same places. They all adhere to a standard.&#xD;&#xA;&#xD;&#xA;I'm using RPG Maker XP right now and it defines character tilesets as having four states -- facing up, down, left, and right, each with animation. This is really restrictive, and I'd rather have more options like Final Fantasy 6.&#xD;&#xA;&#xD;&#xA;So are there any more common sprite sheet formats out there that I can use?" />
  <row Id="36282" PostHistoryTypeId="4" PostId="15762" RevisionGUID="e361c5fe-8d0c-402a-a50e-f286e5a779ab" CreationDate="2011-08-12T01:07:02.333" UserId="2698" Comment="Big overhaul" Text="What common spritesheet formats for 2D Top-Downish Games are there?" />
  <row Id="36283" PostHistoryTypeId="6" PostId="15866" RevisionGUID="d3e8aa6c-67bb-4237-9b2a-00a4f94aabb0" CreationDate="2011-08-12T01:50:30.690" UserId="288" Comment="Creating a tag" Text="&lt;engine&gt;&lt;audio&gt;&lt;design&gt;&lt;dynamic-music&gt;" />
  <row Id="36284" PostHistoryTypeId="25" PostId="482" RevisionGUID="b06fba37-1608-4375-8e96-ac659f241b07" CreationDate="2011-08-12T02:36:52.740" Comment="http://twitter.com/#!/StackGameDev/status/101844573076205568" />
  <row Id="36285" PostHistoryTypeId="2" PostId="15873" RevisionGUID="41791452-3b2e-4b6c-ad57-cbd5bbf17267" CreationDate="2011-08-12T04:18:25.163" UserId="9215" Text="I have an object that has a dynamic body. Currently, I'm setting it's position to follow the sprite when the parallax layer move. After a certain event, the object suppose to fall to the ground. That's when I set it to Awake. But as the object falls and the parallax is moving, how do I control these factor?&#xD;&#xA;&#xD;&#xA;When the object falls by right the sprite should be updated to follow the dynamic body position. Let's say I have a character, to avoid the falling object, I move the parallax layer. The sprite is attached to the parallax layer. I'm asking what should I do in this case. Any advice?&#xD;&#xA;" />
  <row Id="36286" PostHistoryTypeId="1" PostId="15873" RevisionGUID="41791452-3b2e-4b6c-ad57-cbd5bbf17267" CreationDate="2011-08-12T04:18:25.163" UserId="9215" Text="Dynamic bodies with Parallax Scrolling" />
  <row Id="36287" PostHistoryTypeId="3" PostId="15873" RevisionGUID="41791452-3b2e-4b6c-ad57-cbd5bbf17267" CreationDate="2011-08-12T04:18:25.163" UserId="9215" Text="&lt;iphone&gt;&lt;physics&gt;&lt;box2d&gt;&lt;cocos2d&gt;&lt;parallaxscrolling&gt;" />
  <row Id="36288" PostHistoryTypeId="25" PostId="10170" RevisionGUID="17ef4013-fde1-4780-b207-64eb056b76ed" CreationDate="2011-08-12T04:36:54.417" Comment="http://twitter.com/#!/StackGameDev/status/101874776137666561" />
  <row Id="36289" PostHistoryTypeId="25" PostId="15873" RevisionGUID="1e45486b-b092-4f94-8529-d06cc509d330" CreationDate="2011-08-12T06:36:54.907" Comment="http://twitter.com/#!/StackGameDev/status/101904978762924032" />
  <row Id="36290" PostHistoryTypeId="2" PostId="15874" RevisionGUID="68e2107b-a75e-4d0d-b497-e660ade45bd0" CreationDate="2011-08-12T07:00:04.420" UserId="9217" Text="Create Digital Music has covered adaptive game music a couple of times; I think [this article about Max/MSP and the Unity game engine][1] is the closest to what you are looking for. It's also worth reading the comments, there are links to a lot more resources on this topic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://createdigitalmusic.com/2009/04/teaching-adaptive-music-with-games-unity-maxmsp-meet-space-invaders/" />
  <row Id="36291" PostHistoryTypeId="5" PostId="15874" RevisionGUID="11c376d9-e80a-4dfe-bc26-3f0b660ffb08" CreationDate="2011-08-12T07:19:10.760" UserId="9217" Comment="added 247 characters in body" Text="Create Digital Music has covered adaptive game music a couple of times; I think [this article about Max/MSP and the Unity game engine][1] is the closest to what you are looking for. It's also worth reading the comments, there are links to a lot more resources on this topic.  &#xD;&#xA;There is a more technical and in-depth [article][2] about game audio at Gamasutra, which discusses the use of Puredata, the open-source sibling of Max/MSP.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://createdigitalmusic.com/2009/04/teaching-adaptive-music-with-games-unity-maxmsp-meet-space-invaders/&#xD;&#xA;  [2]: http://www.gamasutra.com/view/feature/2849/audio_prototyping_with_pure_data.php" />
  <row Id="36292" PostHistoryTypeId="2" PostId="15875" RevisionGUID="2468e5a6-01ef-4d33-81c0-ec304f82f821" CreationDate="2011-08-12T07:22:01.117" UserId="9219" Text="I am working on a 2D game with sprite sheets. I might be completely overlooking something here, but I can't figure out for the life of me how to use sprite sheets with z-buffer testing.&#xD;&#xA;&#xD;&#xA;Here are the conflicting issues as I understand them:&#xD;&#xA;&#xD;&#xA;1. A sprite in a spritesheet will have transparent pixels all around it that define where the sprite doesn't exist (since each frame in the sprite sheet &quot;grid&quot; is a rectangle, but the sprite is contained within that rectangle).&#xD;&#xA;&#xD;&#xA;2. Transparency doesn't work with z-testing.&#xD;&#xA;&#xD;&#xA;Therefore, it's impossible to use spritesheets with the z-buffer? I should just use painter's algorithm then?&#xD;&#xA;&#xD;&#xA;Are both of those conclusions correct?" />
  <row Id="36293" PostHistoryTypeId="1" PostId="15875" RevisionGUID="2468e5a6-01ef-4d33-81c0-ec304f82f821" CreationDate="2011-08-12T07:22:01.117" UserId="9219" Text="Using spritesheets with z-buffer" />
  <row Id="36294" PostHistoryTypeId="3" PostId="15875" RevisionGUID="2468e5a6-01ef-4d33-81c0-ec304f82f821" CreationDate="2011-08-12T07:22:01.117" UserId="9219" Text="&lt;spritesheet&gt;" />
  <row Id="36295" PostHistoryTypeId="2" PostId="15876" RevisionGUID="e3b0cc78-adf1-4e4e-9e89-d4965e9648a5" CreationDate="2011-08-12T07:32:38.140" UserId="20" Text="I'd say higher numbers tend to make players happy. It's better to get $1000 instead of $10, right? Big numbers also go better together with effects. Imagine a particle explosion and sound-effects every time you achieve something in the game. That would certainly look better with an accompanying *14'500*, than some low number like *34*. Big numbers give the impression of something, well, big, that warrants an audiovisual firework. &#xD;&#xA;&#xD;&#xA;Why do big numbers feel like they are more of an achievement? In our daily life, we deal a lot with low numbers. Our daily purchases are usually not in the thousands of dollars, also we don't have thousands of friends or a hundred pair of shoes etc. &#xD;&#xA;Numbers from one to ten are probably most common and are very *normal* to us. It's also the amount we can show using just our fingers. So are numbers from 10 to 50. Higher numbers are more and more rare in our daily life and therefore become special or more valuable.&#xD;&#xA;&#xD;&#xA;On the other hand, you shouldn't use numbers for your total score that are so high that your average person doesn't even know how to pronounce it. Anything above several million is too high and too hard to decipher. This is readable: *1'400'000*, this is not: *1'400'000'000'000*. This means that your score distribution should be in a way that your total score won't go higher than about 6-8 digits.&#xD;&#xA;&#xD;&#xA;Beware though, that if you start throwing really high numbers at the user right from the start, it might feel as if there's no room for improvement. A good example are RPGs, where your hero starts really week and deals low damage at around 1-10, but at a high level with &quot;uber&quot; gear, the damage goes into the thousands. That really gives an impression of progress and achievement.&#xD;&#xA;&#xD;&#xA;That being said, it's also a matter game-type and player expectations. As Joe Wreschnig pointed out in his comment, pinball machines started to work with very high scores quite early and this has established as some sort of standard. Doing anything else might dampen the users enjoyment. Eg. &quot;What, only 1'041 points? I got a highscore of 1'300'000 on that other machine&quot;.&#xD;&#xA;&#xD;&#xA;When you're creating a simulation type-of game, your scores (eg. currency) should be somewhat realistic. Realistically You won't get $1000 per visitor in your theme-park (unless the value of the dollar keeps sinking, but that's another story).&#xD;&#xA;&#xD;&#xA;A lot of answers have covered technical reasons for high scores. One that you should keep in mind is screen-size and readability. If your game runs on a mobile device, you simply don't have the space for really high numbers. Also on devices that run on a TV, you're limited by the lowest possible resolution, where readability can become an issue. I'd rather have a very well readable score of *450* than an unreadable *450'000'000*.&#xD;&#xA;&#xD;&#xA;**TL;DR:** When designing your scores, think about it as a reward and never forget the context and player expectations. Will 10 points feel good in the context of a pinball game? Probably not. Also try to give the player some feel of progress by increasing scores, maybe giving higher scores more *oomph* by adding audiovisual effects. So that it really feels rewarding getting better scores." />
  <row Id="36296" PostHistoryTypeId="2" PostId="15877" RevisionGUID="8a7c36f0-f314-404c-98fd-451cfe54bc0e" CreationDate="2011-08-12T07:43:06.063" UserId="8240" Text="You can make things transparent while using depth testing. You just have to do it correctly.&#xD;&#xA;&#xD;&#xA;One way is with alpha test. If your transparency is a simple binary on/off (not translucency, where something can be partially transparent), then alpha testing is all you need. You can set your renderer to simply ignore fragments that have an alpha value less than a given alpha. Or greater than, but generally, you're probably looking for less than.&#xD;&#xA;&#xD;&#xA;However, if there is actual translucency, then you will have to draw things back-to-front. You can use depth testing on non-translucent objects, but you'll have to turn off depth writes on the translucent ones." />
  <row Id="36297" PostHistoryTypeId="2" PostId="15878" RevisionGUID="93603c15-0eaa-4022-937e-10c6f7a91b4e" CreationDate="2011-08-12T07:43:42.270" UserId="5371" Text="If you want to make games, why don't you start by developing your own, there is many ways to start, and like noctrine said, making a cool demo won't hurt and it should give you more chances when applying in a big company.&#xD;&#xA;&#xD;&#xA;You can start looking in a website like game programming wiki, they have a lot of useful advice, you can for example check the &quot;how I get started&quot; section to help you make your primary choices [Getting started][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gpwiki.org/index.php/How_do_I_get_Started&#xD;&#xA;&#xD;&#xA;After that, maybe you can find some people who'd like to start developing games too, maybe some of your friends, or you can gather a group of people on the internet.&#xD;&#xA;&#xD;&#xA;You can as well check some open source games, and participate in their development, or you can start your own.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36298" PostHistoryTypeId="25" PostId="15705" RevisionGUID="382fb41d-204f-46f6-8471-90d639596bd4" CreationDate="2011-08-12T08:36:54.650" Comment="http://twitter.com/#!/StackGameDev/status/101935177512665088" />
  <row Id="36299" PostHistoryTypeId="2" PostId="15879" RevisionGUID="6104bdb8-c4dc-46a5-877b-e7c776fecceb" CreationDate="2011-08-12T08:38:48.860" UserId="3827" Text="I'm planning my first game and am planning on using the engine set out in [Beginning Android Games][1], as it deals with a load of stuff that is just noise at the moment to me (because I've no real world experience yet).  &#xD;&#xA;&#xD;&#xA;The way the book tells me how to do movement has been very much acceleration and velocity based with other forces thrown in (wind, gravity etc) but it's not covered how I can set a predetermined path for an enemy to follow.  I was thinking that I could use a lookup table to map points for the enemy to head for, and then I'd just need a way of smoothing out the turning so that the motion is fluid.&#xD;&#xA;&#xD;&#xA;I know this is a bit of a vague question, and I would give you some code, but I'm very much in the planning phase at the moment, so I'm just looking for some pointers or things to think about whilst I'm trying to work out how it's all going to hang together.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.apress.com/9781430230427" />
  <row Id="36300" PostHistoryTypeId="1" PostId="15879" RevisionGUID="6104bdb8-c4dc-46a5-877b-e7c776fecceb" CreationDate="2011-08-12T08:38:48.860" UserId="3827" Text="Intro to path following" />
  <row Id="36301" PostHistoryTypeId="3" PostId="15879" RevisionGUID="6104bdb8-c4dc-46a5-877b-e7c776fecceb" CreationDate="2011-08-12T08:38:48.860" UserId="3827" Text="&lt;game-design&gt;" />
  <row Id="36302" PostHistoryTypeId="2" PostId="15880" RevisionGUID="0421df41-2b19-4bcb-b346-da2538d7c46e" CreationDate="2011-08-12T09:10:54.567" UserId="3827" Text="I'm interested in path finding between multiple maps - could be indoor/outdoor maps, different levels in a building etc but the main restraint is that there are one (or more) ingress/egress points between the different maps.  I've looked and couldn't find any good solutions, yet I'm aware of several games which use similar systems.&#xD;&#xA;&#xD;&#xA;I've found this paper - [Hierarchical Shortest Path Finding Applied to Route-Planning for Wheelchair Users][1] which seems to address a similar issue, but it is purely theoretical.&#xD;&#xA;&#xD;&#xA;Anyone done similar with some experience they could share, or some tips?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.cs.ubc.ca/~mack/Publications/FICCDAT07.pdf" />
  <row Id="36303" PostHistoryTypeId="1" PostId="15880" RevisionGUID="0421df41-2b19-4bcb-b346-da2538d7c46e" CreationDate="2011-08-12T09:10:54.567" UserId="3827" Text="Path finding between multiple maps" />
  <row Id="36304" PostHistoryTypeId="3" PostId="15880" RevisionGUID="0421df41-2b19-4bcb-b346-da2538d7c46e" CreationDate="2011-08-12T09:10:54.567" UserId="3827" Text="&lt;path-finding&gt;" />
  <row Id="36305" PostHistoryTypeId="25" PostId="12646" RevisionGUID="1848866f-a343-4ddf-8591-aff924460cf9" CreationDate="2011-08-12T10:36:54.547" Comment="http://twitter.com/#!/StackGameDev/status/101965376564371456" />
  <row Id="36306" PostHistoryTypeId="5" PostId="14593" RevisionGUID="66e00ff8-a22c-4ff2-a328-60a26dce3a7f" CreationDate="2011-08-12T10:41:46.247" UserId="5021" Comment="added 9 characters in body" Text="The performance of a game does not usually get bottlenecked by poly count first. This is one of the reasons that pixel shaders have been gaining speed faster than vertex shaders over the past several years.&#xD;&#xA;&#xD;&#xA;To put it somewhat bluntly: If you are asking about how many polygons your models should have, then you should not be working on an MMO.&#xD;&#xA;&#xD;&#xA;MMO production has bankrupted large corporations, yet in every game development community (XNA forums, gamedev.net, gamedev.SE,...) there seems to be a weekly newcomer asking about how to fix some widget in the MMO he's making as a one man show.&#xD;&#xA;&#xD;&#xA;There actually have been a few successful MMOs that started as one man projects, however they were all created by game developers with a lot of experience.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Studies have shown that players notice and care more about shadows, lighting, and aliasing before they care about poly count. Look at minecraft.&#xD;&#xA;&#xD;&#xA;You can get away with very low polygon counts if your lighting effects are excellent. Global illumination approximations, shadow quality, antialiasing post processes, deferred lighting pipelines, should all be a much greater concern than polygon count.&#xD;&#xA;&#xD;&#xA;Since your question is about polycount, I'll point out that (new) critters in wow are typically in the range of 50-100 polygons.&#xD;&#xA;&#xD;&#xA;Mobs are in the 300-500 polygon range.&#xD;&#xA;&#xD;&#xA;CPU speed is typically a bottleneck for most wow players in my experience though, especially in cities where the number individual objects (and therefore the number of draw calls gets large)." />
  <row Id="36307" PostHistoryTypeId="6" PostId="15806" RevisionGUID="e0723102-cde3-4ed3-ba59-cdcaad2ec51b" CreationDate="2011-08-12T10:48:06.150" UserId="9180" Comment="removed tag" Text="&lt;game-design&gt;&lt;feedback&gt;&lt;scoring&gt;&lt;user-experience&gt;" />
  <row Id="36308" PostHistoryTypeId="5" PostId="15876" RevisionGUID="c065bf4f-6f1f-4711-b4a2-e6bd7b475820" CreationDate="2011-08-12T11:01:32.297" UserId="20" Comment="spelling fix" Text="I'd say higher numbers tend to make players happy. It's better to get *$1000* instead of *$10*, right? Big numbers also go better together with effects. Imagine a particle explosion and sound-effects every time you achieve something in the game. That would certainly look better with an accompanying *14'500*, than some low number like *34*. Big numbers give the impression of something, well, big, that warrants an audiovisual firework. &#xD;&#xA;&#xD;&#xA;Why do big numbers feel like they are more of an achievement? In our daily life, we deal a lot with low numbers. Our daily purchases are usually not in the thousands of dollars, also we don't have thousands of friends or a hundred pair of shoes etc. &#xD;&#xA;Numbers from one to ten are probably most common and are very *normal* to us. It's also the amount we can show using just our fingers. So are numbers from 10 to 50. Higher numbers are more and more rare in our daily life and therefore become special or more valuable.&#xD;&#xA;&#xD;&#xA;On the other hand, you shouldn't use numbers for your total score that are so high that your average person doesn't even know how to pronounce it. Anything above several million is too high and too hard to decipher. This is readable: *1'400'000*, this is not: *1'400'000'000'000*. This means that your score distribution should be in a way that your total score won't go higher than about 6-8 digits.&#xD;&#xA;&#xD;&#xA;Beware though, that if you start throwing really high numbers at the user right from the start, it might feel as if there's no room for improvement. A good example are RPGs, where your hero starts really weak and deals low damage at around 1-10, but at a high level with &quot;uber&quot; gear, the damage goes into the thousands. That really gives an impression of progress and achievement.&#xD;&#xA;&#xD;&#xA;That being said, it's also a matter game-type and player expectations. As Joe Wreschnig pointed out in his comment, pinball machines started to work with very high scores quite early and this has established as some sort of standard. Doing anything else might dampen the users enjoyment. Eg. &quot;What, only 1'041 points? I got a highscore of 1'300'000 on that other machine&quot;.&#xD;&#xA;&#xD;&#xA;When you're creating a simulation type-of game, your scores (eg. currency) should be somewhat realistic. Realistically You won't get $1000 per visitor in your theme-park (unless the value of the dollar keeps sinking, but that's another story).&#xD;&#xA;&#xD;&#xA;A lot of answers have covered technical reasons for high scores. One that you should keep in mind is screen-size and readability. If your game runs on a mobile device, you simply don't have the space for really high numbers. Also on devices that run on a TV, you're limited by the lowest possible resolution, where readability can become an issue. I'd rather have a very well readable score of *450* than an unreadable *450'000'000*.&#xD;&#xA;&#xD;&#xA;**TL;DR:** When designing your scores, think about it as a reward and never forget the context and player expectations. Will 10 points feel good in the context of a pinball game? Probably not. Also try to give the player some feel of progress by increasing scores, maybe giving higher scores more *oomph* by adding audiovisual effects. So that it really feels rewarding getting better scores." />
  <row Id="36309" PostHistoryTypeId="5" PostId="15879" RevisionGUID="e22377e2-3a28-47db-a394-976b41bd8df5" CreationDate="2011-08-12T11:07:15.927" UserId="3827" Comment="added 176 characters in body" Text="I'm planning my first game and am planning on using the engine set out in [Beginning Android Games][1], as it deals with a load of stuff that is just noise at the moment to me (because I've no real world experience yet).  There's no real time restraint - this is a learning experience more than a real world project, although I would love to be able to release something at the end of this project.&#xD;&#xA;&#xD;&#xA;The way the book tells me how to do movement has been very much acceleration and velocity based with other forces thrown in (wind, gravity etc) but it's not covered how I can set a predetermined path for an enemy to follow.  I was thinking that I could use a lookup table to map points for the enemy to head for, and then I'd just need a way of smoothing out the turning so that the motion is fluid.&#xD;&#xA;&#xD;&#xA;I know this is a bit of a vague question, and I would give you some code, but I'm very much in the planning phase at the moment, so I'm just looking for some pointers or things to think about whilst I'm trying to work out how it's all going to hang together.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.apress.com/9781430230427" />
  <row Id="36310" PostHistoryTypeId="2" PostId="15881" RevisionGUID="e0d6cdad-e3fe-414c-9bb9-55845362ecb3" CreationDate="2011-08-12T11:18:08.007" UserId="9175" Text="Are there any platform or language agnostic (preferably step by step) tutorials regarding creating hexagonal grid based maps/games? I'm mainly interested in grid/tiles basics and not advanced game engine stuff. So far I have found these:&#xD;&#xA;&#xD;&#xA; * [Hexagonal grid for games and other projects][1]&#xD;&#xA; * [Hexagonal grid math][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.codeproject.com/KB/graphics/hexagonal_part1.aspx&#xD;&#xA;  [2]: http://www.gdreflections.com/2011/02/hexagonal-grid-math.html" />
  <row Id="36311" PostHistoryTypeId="1" PostId="15881" RevisionGUID="e0d6cdad-e3fe-414c-9bb9-55845362ecb3" CreationDate="2011-08-12T11:18:08.007" UserId="9175" Text="Hexagonal grid/tiles tutorials" />
  <row Id="36312" PostHistoryTypeId="3" PostId="15881" RevisionGUID="e0d6cdad-e3fe-414c-9bb9-55845362ecb3" CreationDate="2011-08-12T11:18:08.007" UserId="9175" Text="&lt;tiles&gt;&lt;tutorials&gt;&lt;grid&gt;" />
  <row Id="36313" PostHistoryTypeId="2" PostId="15882" RevisionGUID="ea8f17a0-c083-4041-a071-91de3f38a8c2" CreationDate="2011-08-12T11:27:59.417" UserId="3644" Text="Let's take some old popular at a time but abandoned game: WorldRacing/HiOctane/Constructor/any other. Say I with a team want to revitalize said game and bring it to year 2011 without major changes and then work on improving it (e.g. add multiplayer). Also it is important to keep the games spirit, assets, story, music, so basically game remains the same, but gets better (e.g. adapting DOW game to Win7).&#xD;&#xA;&#xD;&#xA;My questions are from &quot;How is it usually made?&quot; area:&#xD;&#xA;&#xD;&#xA; - How do I purchase rights to the title and games assets (graphics, sounds, music, storyline). Whom to contact and what purchase options are possible? Is it possible to obtain source codes, design documents.&#xD;&#xA; - How to deal with various platforms, is it terms of contract saying which platforms are allowed to be used if there are several?&#xD;&#xA; - How to deal with localizations in other languages, are they to obtain from other companies or do they belong to master publisher?&#xD;&#xA; - What could be the reasonable price for said games in example?&#xD;&#xA; - Is it possible to pursue owners to release the game as open-source?&#xD;&#xA;&#xD;&#xA;Remember Heroes of Might&amp;Magic was owned by New World Computing, but later changed it's owner to Nival. I'm interested in that sort of process." />
  <row Id="36314" PostHistoryTypeId="1" PostId="15882" RevisionGUID="ea8f17a0-c083-4041-a071-91de3f38a8c2" CreationDate="2011-08-12T11:27:59.417" UserId="3644" Text="How to buy rights for a game?" />
  <row Id="36315" PostHistoryTypeId="3" PostId="15882" RevisionGUID="ea8f17a0-c083-4041-a071-91de3f38a8c2" CreationDate="2011-08-12T11:27:59.417" UserId="3644" Text="&lt;copyright&gt;&lt;licensing&gt;&lt;how-its-made&gt;" />
  <row Id="36316" PostHistoryTypeId="6" PostId="15882" RevisionGUID="d572fc73-7a4e-46d5-8f58-5b4a35917bca" CreationDate="2011-08-12T11:36:27.987" UserId="3644" Comment="edited tags" Text="&lt;game-industry&gt;&lt;copyright&gt;&lt;licensing&gt;&lt;how-its-made&gt;" />
  <row Id="36317" PostHistoryTypeId="2" PostId="15883" RevisionGUID="39fb73d7-f760-43b2-9ec1-d5370d7a3617" CreationDate="2011-08-12T12:03:23.647" UserId="9005" Text="Currently I am learning silverlight game development. I think [Paper Toss](http://itunes.apple.com/us/app/paper-toss/id317917431?mt=8) is fun and looks like a good start.&#xD;&#xA;&#xD;&#xA;Due to my work is done on Siverlight 4 which do not support 3d, despite it exists some workaround, I don't know how to implement throwing action in 2d spaces.&#xD;&#xA;&#xD;&#xA;I try to do 2d-3d spaces conversion, but I don't know how to integrate physics engine like Farseer to work with my 2d-3d algorithm code.&#xD;&#xA;&#xD;&#xA;Any suggestion or code is appreciate!" />
  <row Id="36318" PostHistoryTypeId="1" PostId="15883" RevisionGUID="39fb73d7-f760-43b2-9ec1-d5370d7a3617" CreationDate="2011-08-12T12:03:23.647" UserId="9005" Text="How to implement a paper toss game in silverlight?" />
  <row Id="36319" PostHistoryTypeId="3" PostId="15883" RevisionGUID="39fb73d7-f760-43b2-9ec1-d5370d7a3617" CreationDate="2011-08-12T12:03:23.647" UserId="9005" Text="&lt;silverlight&gt;" />
  <row Id="36320" PostHistoryTypeId="2" PostId="15884" RevisionGUID="d6a0f326-44a7-42fd-b3bc-e01dbc215299" CreationDate="2011-08-12T12:13:18.867" UserId="1743" Text="So I'm attempting to learn Python by way of Minesweeper.  I've got experience with SDL, so I figured playing around with PyGame sounded like a fun way to learn the syntax of the language.&#xD;&#xA;&#xD;&#xA;Anywho, I'm having an issue in uncovering adjacent open squares as you would in a normal game of Minesweeper.  I click on a cell with 0 neighboring mines, and attempt to scan the top, left, right, and bottom to see if those also have 0 neighboring mines, and I do this recursively.&#xD;&#xA;&#xD;&#xA;Here is the error that I receive:&#xD;&#xA;&#xD;&#xA;    RuntimeError: maximum recursion depth exceeded in cmp&#xD;&#xA;&#xD;&#xA;And here is my algorithm:&#xD;&#xA;&#xD;&#xA;    #open up blank mines&#xD;&#xA;    def open_blank_cells(mines, cr, cc):&#xD;&#xA;      #top&#xD;&#xA;      if (cr &gt; 0):&#xD;&#xA;        t_mine = mines[cr-1][cc]&#xD;&#xA;        t_mine.switch_state(3)&#xD;&#xA;        if (t_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr-1, cc)&#xD;&#xA;    &#xD;&#xA;      #right&#xD;&#xA;      if (cc &lt; 9):&#xD;&#xA;        r_mine = mines[cr][cc+1]&#xD;&#xA;        r_mine.switch_state(3)&#xD;&#xA;        if (r_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr, cc+1)&#xD;&#xA;    &#xD;&#xA;      #bottom&#xD;&#xA;      if (cr &lt; 9):&#xD;&#xA;        r_mine = mines[cr+1][cc]&#xD;&#xA;        r_mine.switch_state(3)&#xD;&#xA;        if (r_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr+1, cc)&#xD;&#xA;    &#xD;&#xA;      #left&#xD;&#xA;      if (cc &gt; 0):&#xD;&#xA;        l_mine = mines[cr][cc-1]&#xD;&#xA;        l_mine.switch_state(3)&#xD;&#xA;        if (l_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr, cc-1)&#xD;&#xA;    &#xD;&#xA;      return&#xD;&#xA;&#xD;&#xA;where `mines` is my 2D array of cells, `cr` is the index of the current row (first array index), and `cc` is the index of the current column (second array index).&#xD;&#xA;&#xD;&#xA;I thought that my algorithm was decently solid (but please tell me if I'm wrong there!!!), so I turned to the Internet and found that the default Python recursion limit of 1000 could be to blame.  However, when I bump it higher with the call to `sys.setrecursionlimit` the game either exhibits the same behavior, or simply crashes as the system kills it.&#xD;&#xA;&#xD;&#xA;When I comment out 2 of the 4 recursive checks in the function, it will open up blank cells without any problem.  3 or more however breaks the algorithm." />
  <row Id="36321" PostHistoryTypeId="1" PostId="15884" RevisionGUID="d6a0f326-44a7-42fd-b3bc-e01dbc215299" CreationDate="2011-08-12T12:13:18.867" UserId="1743" Text="Issue with implemented Minesweeper algorithm" />
  <row Id="36322" PostHistoryTypeId="3" PostId="15884" RevisionGUID="d6a0f326-44a7-42fd-b3bc-e01dbc215299" CreationDate="2011-08-12T12:13:18.867" UserId="1743" Text="&lt;algorithm&gt;&lt;python&gt;&lt;pygame&gt;&lt;recursion&gt;&lt;minesweeper&gt;" />
  <row Id="36323" PostHistoryTypeId="2" PostId="15885" RevisionGUID="d2437650-9907-4703-bf3a-d2bb881ed2be" CreationDate="2011-08-12T12:19:19.757" UserId="744" Text="&lt;a href=&quot;http://www.savetz.com/articles/byte-abandonware.php&quot;&gt;Byte published a high-level summary of the &quot;abandonware&quot; situation in 2001, which answers many of these questions.&lt;/a&gt; However, it's dealing with the case where you simply want the company to re-release the software or release it into the public domain. If you intend to license it and resell it, you will definitely need a lawyer to draft up a contract to protect _your_ commercial rights, at some point in the process.&#xD;&#xA;&#xD;&#xA;&gt; How To Do It&#xD;&#xA;&#xD;&#xA;&gt; You don't need to be an attorney or work at a software publisher to bring new life to old software anyone can help make it happen. The hardest part is often finding the right person to ask. If the company that published the software has been sold, you'll have to find out who bought it: A little Web research goes a long way here.&#xD;&#xA;&#xD;&#xA;&gt; Once you find the company, it's time to approach their attorneys. Call the company's main office and ask for the legal department, or write to the company. The person you talk to may not have heard of the software you're referring to, so be ready to provide as many details as possible, including who published it, in what year, and for what platforms.&#xD;&#xA;&#xD;&#xA;&gt; Also, know what you want: Asking for a license to distribute the software for free on your web site may be reasonable to many publishers. Or perhaps you'd like the publisher to release the software into the public domain an option that will be distasteful to many publishers who are unwilling to completely give up rights to their work, no matter how old. Don't expect an answer right away even once you find a helpful individual, it may take months for them to give you an answer.&#xD;&#xA;&#xD;&#xA;To answer your specific queries:&#xD;&#xA;&#xD;&#xA;&gt; Whom to contact and what purchase options are possible?&#xD;&#xA;&#xD;&#xA;You contact whoever owns the copyrights. This can actually be very tricky to track down in the case of some old games, and unfortunately, there is no general way to handle it. In some cases the paper trail may just be buried too deep, and you're SOL. For example, as described in the Byte article, the legal records needed to transfer the rights to MECC's game catalog are apparently gone forever.&#xD;&#xA;&#xD;&#xA;&gt; Is it possible to obtain source codes, design documents.&#xD;&#xA;&gt; How to deal with localizations in other languages, are they to obtain from other companies or do they belong to master publisher?&#xD;&#xA;&#xD;&#xA;They're assets like any other. These may have been owned by a different party to begin with; they may have been sold to a different party during liquidation; they may be lost forever.&#xD;&#xA;&#xD;&#xA;Some things, like trademarks, may now be owned by entirely unrelated entities. If they're actually using them for their unrelated business, you probably can't get them at all.&#xD;&#xA;&#xD;&#xA;&gt; How to deal with various platforms, is it terms of contract saying which platforms are allowed to be used if there are several?&#xD;&#xA;&gt; What could be the reasonable price for said games in example?&#xD;&#xA;&#xD;&#xA;This depends entirely on your negotiating skill. You want to convince the current holders it's worth $0 to them, and that even $1 would be a great move on their part to let you remake the game on all platforms.&#xD;&#xA;&#xD;&#xA;&gt; Is it possible to pursue owners to release the game as open-source?&#xD;&#xA;&#xD;&#xA;Sure. Open source licensing is licensing like any other. If you have the rights, you can do what you want." />
  <row Id="36324" PostHistoryTypeId="2" PostId="15886" RevisionGUID="322b35b2-d7c0-4224-84a5-2028c97a1281" CreationDate="2011-08-12T12:28:55.533" UserId="9220" Text="I had the same dilemma when I ventured into Android gaming. SmartFox was beyond my budget but I was keen to use a third-party SDK which I could leverage across multiple games. Further, I don't really have the programming knowledge to design a socket library interface by myself. I came across Skiller - a free SDK for developing turn-based multi-player games which integrates with Eclipse and abstracts such details from developers.&#xD;&#xA;&#xD;&#xA;I'd suggest you take a look at Skiller's TicTacToe. It would give you a good idea of whether their SDK would suit your needs. I hope this helps." />
  <row Id="36325" PostHistoryTypeId="2" PostId="15887" RevisionGUID="288f1a86-0496-4b3f-8d90-f3c8185701c9" CreationDate="2011-08-12T12:34:46.150" UserId="9220" Text="If your gaming involves 3D gaming, Unity is a good option. If you are comfortable with JavaScript, I'd recommend going for Appcelerator Titanium.&#xD;&#xA;&#xD;&#xA;On the other hand, you may also want to look at Skiller SDK, it provides multi-platform support (Android, J2ME, Symbian and iOS in the works). It's a third-party SDK which augments gaming capabilities on multiple native platforms." />
  <row Id="36326" PostHistoryTypeId="16" PostId="15887" RevisionGUID="cb3e686c-f2b7-4cef-87b9-1787ed60b28d" CreationDate="2011-08-12T12:34:46.150" UserId="9220" />
  <row Id="36327" PostHistoryTypeId="25" PostId="15882" RevisionGUID="47c4506a-8c5d-42c0-aece-c7f51dda5af2" CreationDate="2011-08-12T12:36:54.680" Comment="http://twitter.com/#!/StackGameDev/status/101995576626913280" />
  <row Id="36328" PostHistoryTypeId="5" PostId="15884" RevisionGUID="12cb2cd5-4369-4b63-92ec-7beef49a2f52" CreationDate="2011-08-12T13:03:43.407" UserId="1743" Comment="added calculation of neighbors and state switching" Text="So I'm attempting to learn Python by way of Minesweeper.  I've got experience with SDL, so I figured playing around with PyGame sounded like a fun way to learn the syntax of the language.&#xD;&#xA;&#xD;&#xA;Anywho, I'm having an issue in uncovering adjacent open squares as you would in a normal game of Minesweeper.  I click on a cell with 0 neighboring mines, and attempt to scan the top, left, right, and bottom to see if those also have 0 neighboring mines, and I do this recursively.&#xD;&#xA;&#xD;&#xA;Here is the error that I receive:&#xD;&#xA;&#xD;&#xA;    RuntimeError: maximum recursion depth exceeded in cmp&#xD;&#xA;&#xD;&#xA;And here is my algorithm:&#xD;&#xA;&#xD;&#xA;    #open up blank mines&#xD;&#xA;    def open_blank_cells(mines, cr, cc):&#xD;&#xA;      #top&#xD;&#xA;      if (cr &gt; 0):&#xD;&#xA;        t_mine = mines[cr-1][cc]&#xD;&#xA;        t_mine.switch_state(3)&#xD;&#xA;        if (t_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr-1, cc)&#xD;&#xA;    &#xD;&#xA;      #right&#xD;&#xA;      if (cc &lt; 9):&#xD;&#xA;        r_mine = mines[cr][cc+1]&#xD;&#xA;        r_mine.switch_state(3)&#xD;&#xA;        if (r_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr, cc+1)&#xD;&#xA;    &#xD;&#xA;      #bottom&#xD;&#xA;      if (cr &lt; 9):&#xD;&#xA;        r_mine = mines[cr+1][cc]&#xD;&#xA;        r_mine.switch_state(3)&#xD;&#xA;        if (r_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr+1, cc)&#xD;&#xA;    &#xD;&#xA;      #left&#xD;&#xA;      if (cc &gt; 0):&#xD;&#xA;        l_mine = mines[cr][cc-1]&#xD;&#xA;        l_mine.switch_state(3)&#xD;&#xA;        if (l_mine.neighbor_mines == 0):&#xD;&#xA;          open_blank_cells(mines, cr, cc-1)&#xD;&#xA;    &#xD;&#xA;      return&#xD;&#xA;&#xD;&#xA;where `mines` is my 2D array of cells, `cr` is the index of the current row (first array index), and `cc` is the index of the current column (second array index).&#xD;&#xA;&#xD;&#xA;I thought that my algorithm was decently solid (but please tell me if I'm wrong there!!!), so I turned to the Internet and found that the default Python recursion limit of 1000 could be to blame.  However, when I bump it higher with the call to `sys.setrecursionlimit` the game either exhibits the same behavior, or simply crashes as the system kills it.&#xD;&#xA;&#xD;&#xA;When I comment out 2 of the 4 recursive checks in the function, it will open up blank cells without any problem.  3 or more however breaks the algorithm.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;As requested....&#xD;&#xA;&#xD;&#xA;**Calculation of neighbor_mines**&#xD;&#xA;&#xD;&#xA;    # if not a mine, figure out how many surround it&#xD;&#xA;      for i in xrange(10):&#xD;&#xA;        for j in xrange(10):&#xD;&#xA;          if (mines[i][j].is_mine == False):&#xD;&#xA;            #check top 3&#xD;&#xA;            if (i &gt; 0):&#xD;&#xA;              if (j &gt; 0):&#xD;&#xA;                if (mines[i-1][j-1].is_mine == True):&#xD;&#xA;                  mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;              if (mines[i-1][j].is_mine == True):&#xD;&#xA;                mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;              if (j &lt; 9):&#xD;&#xA;                if (mines[i-1][j+1].is_mine == True):&#xD;&#xA;                  mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;            #check left and right&#xD;&#xA;            if (j &gt; 0):&#xD;&#xA;              if (mines[i][j-1].is_mine == True):&#xD;&#xA;                mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;            if (j &lt; 9):&#xD;&#xA;              if (mines[i][j+1].is_mine == True):&#xD;&#xA;                mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;            #check bottom 3&#xD;&#xA;            if (i &lt; 9):&#xD;&#xA;              if (j &gt; 0):&#xD;&#xA;                if (mines[i+1][j-1].is_mine == True):&#xD;&#xA;                  mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;              if (mines[i+1][j].is_mine == True):&#xD;&#xA;                mines[i][j].neighbor_mines += 1&#xD;&#xA;    &#xD;&#xA;              if (j &lt; 9):&#xD;&#xA;                if (mines[i+1][j+1].is_mine == True):&#xD;&#xA;                  mines[i][j].neighbor_mines += 1&#xD;&#xA;&#xD;&#xA;**Switch_state**&#xD;&#xA;&#xD;&#xA;     def switch_state(self, newstate):&#xD;&#xA;        self.state = newstate&#xD;&#xA;    &#xD;&#xA;        #marked as mine&#xD;&#xA;        if (newstate == 1):&#xD;&#xA;          nf = &quot;sq_mine_marked.png&quot;&#xD;&#xA;        elif (newstate == 2):&#xD;&#xA;          nf = &quot;sq_mine_question.png&quot;&#xD;&#xA;        elif (newstate == 3):&#xD;&#xA;          nf = &quot;sq_mine_open.png&quot;&#xD;&#xA;        elif (newstate == 4):&#xD;&#xA;          nf = &quot;sq_mine_mine.png&quot;&#xD;&#xA;        else:&#xD;&#xA;          nf = &quot;sq_mine.png&quot;&#xD;&#xA;    &#xD;&#xA;        oldrect = self.rect #save old rect as load_image overwrites it&#xD;&#xA;        self.image, self.rect = load_image(nf, (255,0,255))&#xD;&#xA;        self.rect = oldrect" />
  <row Id="36329" PostHistoryTypeId="2" PostId="15888" RevisionGUID="87fa8809-3975-4da3-94a2-149ab8420ad3" CreationDate="2011-08-12T13:13:08.550" UserId="7133" Text="Imagine the following setup:&#xD;&#xA;&#xD;&#xA; - 1 1 1 1 1 1 &#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 1 1 1 1 1&#xD;&#xA;&#xD;&#xA;As a side note, I refer to squares in the matrix like this: (row, column). I've represented mines with &quot;1&quot; and empty spaces with &quot;0&quot;. Assume the user clicks on the empty space at (2, 2) (the corner at the top-left is (0, 0)).&#xD;&#xA;&#xD;&#xA;This is what would happen:&#xD;&#xA;&#xD;&#xA; - the square at (2, 3) is empty and has no adjacent mines. Let's call&#xD;&#xA;   our function for those coordinates&#xD;&#xA; - in the new function call we notice that (3, 3) is empty and has no adjacent mines, let's call the function for that space as well&#xD;&#xA; - (3, 2) is a valid place too, let's call again&#xD;&#xA; - in the fourth call we'll notice that (2, 2) is empty and has no nearby mines, so we're back at square one, thus creating an endless loop&#xD;&#xA;&#xD;&#xA;Any adjacent squares that each do not have adjacent mines will create an endless loop once your recursive function is called for either of them. Simply putting in a condition to not call the function again for the square you just came from isn't enough, as can be seen in the example above.&#xD;&#xA;&#xD;&#xA;One solution is to create another matrix that can show what squares have already been visited. If the current square has already been visited, return from the function immediately. Otherwise, mark is as a visited square and carry on with your usual code." />
  <row Id="36330" PostHistoryTypeId="13" PostId="15848" RevisionGUID="ae77eb1f-908d-4217-8fa3-e70cf88ba949" CreationDate="2011-08-12T13:20:31.460" UserId="8921" Text="[{&quot;Id&quot;:8921,&quot;DisplayName&quot;:&quot;Jonathan Connell&quot;}]" />
  <row Id="36331" PostHistoryTypeId="2" PostId="15889" RevisionGUID="ddf4f841-b6ea-4ef6-8b01-0ed3a604421d" CreationDate="2011-08-12T13:23:23.983" UserId="7881" Text="Here are some resources to get you started:&#xD;&#xA;&#xD;&#xA; - [What path finding algorithms are there?][1]&#xD;&#xA; - [Amit’s Game Programming Information][2]&#xD;&#xA;   - [This article][3] in particular discusses path smoothing, like you had mentioned.&#xD;&#xA; - [Pfadsuche-Applet][4] (Pathfinding Applet)&#xD;&#xA; - [Clearance-based Pathfinding][5]&#xD;&#xA;   - This technique is useful for games with units of variable sizes.&#xD;&#xA;&#xD;&#xA;You can find more on Wikipedia, which has some good articles on specific algorithms, and of course Google. Once you start investigating a little more, feel free to post more questions specific to your implementation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1/what-path-finding-algorithms-are-there&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#paths&#xD;&#xA;  [3]: http://theory.stanford.edu/~amitp/GameProgramming/MapRepresentations.html#S12&#xD;&#xA;  [4]: http://www.stefan-baur.de/cs.web.mashup.pathfinding.html&#xD;&#xA;  [5]: http://harablog.wordpress.com/2009/01/29/clearance-based-pathfinding/" />
  <row Id="36332" PostHistoryTypeId="5" PostId="15848" RevisionGUID="0a8dbbcf-f4de-4319-8aa2-a0b837ad363c" CreationDate="2011-08-12T13:29:09.063" UserId="8921" Comment="editing to reflect opinion" Text="Indeed higher scores are said to make the player feel like he's playing better, and hence _could_ enhance user experience. This needs to be experimented for you to really find if this makes a difference in your specific game. If you compare an arcade game like [Every Extend Extra Extreme](http://www.gamekult.com/jeux/every-extend-extra-extreme-J000082429.html) and a platformer like Mario, the effect score has on the player is widely different.&#xD;&#xA;&#xD;&#xA;As Maik said, higher scores are not only easier on the programming side of things, but are generally much easier for the user to _understand_ at a glance.&#xD;&#xA;&#xD;&#xA;Whether you give your player 100 points for a coin, or 2000 doesn't matter: if it is the first object a player picks up in a game, this will be his _&quot;score reference&quot;_. (In this case though I would said 100 points is inherently easier to understand than 2000, but that's more in the realm of psychology).&#xD;&#xA;&#xD;&#xA;In my opinion, what's important then is not to necessarily have a high score reference, just an _understandable_ one. What could really give the player satisfaction is when you give him 5000 points instead of the default 200 because he did something well.&#xD;&#xA;&#xD;&#xA;A great game for user satisfaction in my opinion is Peggle by PopCap.&#xD;&#xA;&#xD;&#xA;In Peggle, when you finish the level, you get a zoom and slow-mo on the last peggle, and huge explosions when you hit it. Very nice. Any bonuses you get multiply your score by huge amounts, again with colourful explosions everywhere.&#xD;&#xA;&#xD;&#xA;What is interesting is the mix of visually pleasing feedback, and score multipliers; if I remember correctly, the base score for a peggle is also 100 points, 500 for the ones needed to complete the level. 1 &amp; 5 are mathematically the same, but probably less easy to understand when things are hectic and your score is going up constantly.&#xD;&#xA;&#xD;&#xA;So easy, understandable base scores, and huge bonuses and multipliers for doing things well. (Lovely explosions and classical music is also win ^^).&#xD;&#xA;&#xD;&#xA;I know that some of the top companies are currently recruiting &quot;Score Designers&quot; to think out how players should be awarded; this shows that it's not something that's simple, and is probably worth investing time into to do right." />
  <row Id="36333" PostHistoryTypeId="5" PostId="15889" RevisionGUID="70500fb2-629c-46a9-948a-138c40a41709" CreationDate="2011-08-12T13:30:44.427" UserId="7881" Comment="added 185 characters in body" Text="Here are some resources to get you started:&#xD;&#xA;&#xD;&#xA; - [What path finding algorithms are there?][1]&#xD;&#xA; - [Amit’s Game Programming Information][2]&#xD;&#xA;   - [This article][3] in particular discusses path smoothing, like you had mentioned.&#xD;&#xA; - [Pfadsuche-Applet][4] (Pathfinding Applet)&#xD;&#xA;   - This site's in German, but useful once you figure it out. Hint: The big green Start button doesn't start the applet, it changes the brush. The little grey Start button starts it.&#xD;&#xA; - [Clearance-based Pathfinding][5]&#xD;&#xA;   - This technique is useful for games with units of variable sizes.&#xD;&#xA;&#xD;&#xA;You can find more on Wikipedia, which has some good articles on specific algorithms, and of course Google. Once you start investigating a little more, feel free to post more questions specific to your implementation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/1/what-path-finding-algorithms-are-there&#xD;&#xA;  [2]: http://www-cs-students.stanford.edu/~amitp/gameprog.html#paths&#xD;&#xA;  [3]: http://theory.stanford.edu/~amitp/GameProgramming/MapRepresentations.html#S12&#xD;&#xA;  [4]: http://www.stefan-baur.de/cs.web.mashup.pathfinding.html&#xD;&#xA;  [5]: http://harablog.wordpress.com/2009/01/29/clearance-based-pathfinding/" />
  <row Id="36334" PostHistoryTypeId="2" PostId="15890" RevisionGUID="127f3623-9572-43b4-a920-c339c1686eb8" CreationDate="2011-08-12T13:32:12.633" UserId="2897" Text="I did something similiar several years ago for a mockup demo of cyberpunk-themed &quot;Jagged Alliance&quot; clone which was supposed to have large maps filled with skyscrapers. It was a stupid idea, apparently maps for tactical combat should be tidy and easily understandable :)&#xD;&#xA;&#xD;&#xA;In order to have a quicker pathfinding one global map was divided into several discrete square-shaped areas. Once we have a criteria for areas, it's time to find possible &quot;entrances&quot; between each pair of adjacent areas. &quot;Entrance&quot; is a transition point which shows that this agent can enter this area at this point. &#xD;&#xA;&#xD;&#xA;In your example with building of several floors, each floor would be an area with borders defined by floor, ceiling and outer walls; and varius holes in wall or floor, or ladders would be entrances, there could be a lot of them. So entrances basically link path nodes from one area to path nodes in the other area. &#xD;&#xA;&#xD;&#xA;Once you identified entrances, you'll need to find all possible ways to traverse each area resulting in a &quot;map of area entrances to adjacent area entrances&quot; with edges between entrances showing length of this path through area. &#xD;&#xA;&#xD;&#xA;If everything went right, your agent standing on the 1-st floor will be able to find its way to that special box on the 4-th floor quickly. Maybe something similiar could be used in your problem of multiple maps, so hope it helps." />
  <row Id="36335" PostHistoryTypeId="5" PostId="15888" RevisionGUID="cb55081c-7e5f-46b6-810e-20d8930a3a11" CreationDate="2011-08-12T13:53:51.027" UserId="7133" Comment="minor grammar fix to make things clearer" Text="Imagine the following setup:&#xD;&#xA;&#xD;&#xA; - 1 1 1 1 1 1 &#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 0 0 0 0 1&#xD;&#xA; - 1 1 1 1 1 1&#xD;&#xA;&#xD;&#xA;As a side note, I refer to squares in the matrix like this: (row, column). I've represented mines with &quot;1&quot; and empty spaces with &quot;0&quot;. Assume the user clicks on the empty space at (2, 2) (the corner at the top-left is (0, 0)).&#xD;&#xA;&#xD;&#xA;This is what would happen:&#xD;&#xA;&#xD;&#xA; - the square at (2, 3) is empty and has no adjacent mines. Let's call&#xD;&#xA;   our function for those coordinates&#xD;&#xA; - in the new function call we notice that (3, 3) is empty and has no adjacent mines, let's call the function for that space as well&#xD;&#xA; - (3, 2) is a valid place too, let's call again&#xD;&#xA; - in the fourth call we'll notice that (2, 2) is empty and has no nearby mines, so we're back at square one, thus creating an endless loop&#xD;&#xA;&#xD;&#xA;Any adjacent squares that each do not have adjacent mines will create an endless loop once your recursive function is called for either of them. Simply putting in a condition to not call the function again for the square you just came from wouldn't have been enough, as can be seen in the example above.&#xD;&#xA;&#xD;&#xA;One solution is to create another matrix that can show what squares have already been visited. If the current square has already been visited, return from the function immediately. Otherwise, mark is as a visited square and carry on with your usual code." />
  <row Id="36336" PostHistoryTypeId="2" PostId="15891" RevisionGUID="f2e9c57c-f25f-4569-ba89-0d88607372fa" CreationDate="2011-08-12T13:54:07.050" UserId="5275" Text="I've come across a C++ Sample of from Programming Game AI by Example. For the most part it is fairly understandable, the only thing confusing me is the reference to &quot;m_pVehicle-&gt;Heading()&quot; I'm not sure what it means by heading. If anyone could clarify this, I would really appreciate it. &#xD;&#xA;&#xD;&#xA;     Vector2D SteeringBehaviors::Pursuit(const Vehicle* evader)&#xD;&#xA;        {&#xD;&#xA;          //if the evader is ahead and facing the agent then we can just seek&#xD;&#xA;          //for the evader's current position.&#xD;&#xA;          Vector2D ToEvader = evader-&gt;Pos() - m_pVehicle-&gt;Pos();&#xD;&#xA;        &#xD;&#xA;          double RelativeHeading = m_pVehicle-&gt;Heading().Dot(evader-&gt;Heading());&#xD;&#xA;        &#xD;&#xA;          if ((ToEvader.Dot(m_pVehicle-&gt;Heading()) &gt; 0) &amp;&amp;&#xD;&#xA;              (RelativeHeading &lt; -0.95))  //acos(0.95)=18 degs&#xD;&#xA;          {&#xD;&#xA;            return Seek(evader-&gt;Pos());&#xD;&#xA;          }&#xD;&#xA;        &#xD;&#xA;          //Not considered ahead so we predict where the evader will be.&#xD;&#xA;        &#xD;&#xA;          //the look-ahead time is proportional to the distance between the evader&#xD;&#xA;          //and the pursuer; and is inversely proportional to the sum of the&#xD;&#xA;          //agents' velocities&#xD;&#xA;          double LookAheadTime = ToEvader.Length() /&#xD;&#xA;                                (m_pVehicle-&gt;MaxSpeed() + evader-&gt;Speed());&#xD;&#xA;        &#xD;&#xA;          //now seek to the predicted future position of the evader&#xD;&#xA;          return Seek(evader-&gt;Pos() + evader-&gt;Velocity() * LookAheadTime);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36337" PostHistoryTypeId="1" PostId="15891" RevisionGUID="f2e9c57c-f25f-4569-ba89-0d88607372fa" CreationDate="2011-08-12T13:54:07.050" UserId="5275" Text="Translating Steering Behaviour Pursuit sample" />
  <row Id="36338" PostHistoryTypeId="3" PostId="15891" RevisionGUID="f2e9c57c-f25f-4569-ba89-0d88607372fa" CreationDate="2011-08-12T13:54:07.050" UserId="5275" Text="&lt;c++&gt;&lt;ai&gt;" />
  <row Id="36339" PostHistoryTypeId="2" PostId="15892" RevisionGUID="cb5c4892-ab8f-442e-a427-a5b29786c5b4" CreationDate="2011-08-12T14:12:51.453" UserId="9222" Text="I have everything I need to make a Mario type game. I just have no idea how to design the levels to make it challenging or fun. :p Any tips? &#xD;&#xA;&#xD;&#xA;The only way to kill enemies is by jumping on them, so I thought it would be too hard to make a boss. I was just going to make the last level long. Is this a bad idea?&#xD;&#xA;&#xD;&#xA;thank you!" />
  <row Id="36340" PostHistoryTypeId="1" PostId="15892" RevisionGUID="cb5c4892-ab8f-442e-a427-a5b29786c5b4" CreationDate="2011-08-12T14:12:51.453" UserId="9222" Text="Level Game Design Tips" />
  <row Id="36341" PostHistoryTypeId="3" PostId="15892" RevisionGUID="cb5c4892-ab8f-442e-a427-a5b29786c5b4" CreationDate="2011-08-12T14:12:51.453" UserId="9222" Text="&lt;2d&gt;&lt;level-design&gt;" />
  <row Id="36342" PostHistoryTypeId="4" PostId="15879" RevisionGUID="742eda1d-c0d9-4623-b61e-1accfbb5ed7c" CreationDate="2011-08-12T14:17:55.953" UserId="7881" Comment="Edited title to clarify OP's intent." Text="How can I make my units follow predetermined paths?" />
  <row Id="36343" PostHistoryTypeId="24" PostId="15879" RevisionGUID="742eda1d-c0d9-4623-b61e-1accfbb5ed7c" CreationDate="2011-08-12T14:17:55.953" Comment="Proposed by 7881 approved by 3827 edit id of 633" />
  <row Id="36344" PostHistoryTypeId="5" PostId="15879" RevisionGUID="c01f37d6-0a56-4931-8c0f-34b676445129" CreationDate="2011-08-12T14:18:29.597" UserId="3827" Comment="added a question mark" Text="I'm planning my first game and am planning on using the engine set out in [Beginning Android Games][1], as it deals with a load of stuff that is just noise at the moment to me (because I've no real world experience yet).  There's no real time restraint - this is a learning experience more than a real world project, although I would love to be able to release something at the end of this project.&#xD;&#xA;&#xD;&#xA;The way the book tells me how to do movement has been very much acceleration and velocity based with other forces thrown in (wind, gravity etc) but it's not covered how I can set a predetermined path for an enemy to follow.  I was thinking that I could use a lookup table to map points for the enemy to head for, and then I'd just need a way of smoothing out the turning so that the motion is fluid.  Is this the correct approach?&#xD;&#xA;&#xD;&#xA;I know this is a bit of a vague question, and I would give you some code, but I'm very much in the planning phase at the moment, so I'm just looking for some pointers or things to think about whilst I'm trying to work out how it's all going to hang together.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.apress.com/9781430230427" />
  <row Id="36345" PostHistoryTypeId="25" PostId="15884" RevisionGUID="3392c799-adce-42d9-8608-cfb98d5e0a1c" CreationDate="2011-08-12T14:36:56.733" Comment="http://twitter.com/#!/StackGameDev/status/102025781907169281" />
  <row Id="36346" PostHistoryTypeId="2" PostId="15893" RevisionGUID="ea5b84ed-2646-41f8-a0a4-dc54cac134c8" CreationDate="2011-08-12T14:42:24.790" UserId="8781" Text="[This tutorial at XNA Resources][1] shows one approach.&#xD;&#xA;&#xD;&#xA;Basically, you store your waypoints as a queue of coordinates, then move the entity toward the first point in the list. Once you reach that point, remove it from the queue and continue to the next point. Depending on your game, you might want to set some limits on how quickly the entity can change speed/angle so the corners aren't so sharp.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnaresources.com/default.asp?page=Tutorial:SpriteEngine:4" />
  <row Id="36347" PostHistoryTypeId="2" PostId="15894" RevisionGUID="a05ac808-255b-45da-b803-d7105268a625" CreationDate="2011-08-12T14:52:34.573" UserId="2913" Text="On p.87 of the book, you will find the definition of m_vHeading as:&#xD;&#xA;&#xD;&#xA;    //a normalized vector pointing in the direction the entity is heading.&#xD;&#xA;    SVector2D m_vHeading;&#xD;&#xA;&#xD;&#xA;If you look through the source, you will find:&#xD;&#xA;&#xD;&#xA;    Vector2D  Heading()const{return m_vHeading;}&#xD;&#xA;&#xD;&#xA;Right before your code snippet he explains that if the target being pursued is ahead and almost directly facing the agent, it should just seek directly towards the target's position.&#xD;&#xA;&#xD;&#xA;A way to easily determine if the target is ahead, or &quot;in front&quot;, of the agent is by using the dot product of the vector from the agent's position to the target's position `ToEvader` and the agent's heading vector `m_pVehicle-&gt;Heading()`. If the dot product is greater than 0, the target is in front of the agent:&#xD;&#xA;&#xD;&#xA;    (ToEvader.Dot(m_pVehicle-&gt;Heading()) &gt; 0)&#xD;&#xA;&#xD;&#xA;You can read more on the dot product and it's uses on pages 23-26." />
  <row Id="36348" PostHistoryTypeId="2" PostId="15895" RevisionGUID="08abb0f1-3248-437b-82ed-ef16af186325" CreationDate="2011-08-12T14:59:03.037" UserId="9224" Text="If you had an unlimited budget what software would you buy to create a good 3D game. Right now I am thinking (1) UDK, (2) 3D Studio Max, (3) Maya, ... what else?" />
  <row Id="36349" PostHistoryTypeId="1" PostId="15895" RevisionGUID="08abb0f1-3248-437b-82ed-ef16af186325" CreationDate="2011-08-12T14:59:03.037" UserId="9224" Text="Software needed to develop 3D Game" />
  <row Id="36350" PostHistoryTypeId="3" PostId="15895" RevisionGUID="08abb0f1-3248-437b-82ed-ef16af186325" CreationDate="2011-08-12T14:59:03.037" UserId="9224" Text="&lt;3d&gt;&lt;udk&gt;" />
  <row Id="36351" PostHistoryTypeId="2" PostId="15896" RevisionGUID="42f4927a-9c08-49a4-81c8-88d4f0a194ae" CreationDate="2011-08-12T15:00:19.517" UserId="1352" Text="Just a short list of things I could come up with.&#xD;&#xA;&#xD;&#xA;If jumping on enemies and jumping in general are your only two gameplay mechanics:&#xD;&#xA;&#xD;&#xA;* Gradually introduce new enemies with new movement patterns.&#xD;&#xA;* Gradually introduce new obstacles.&#xD;&#xA;* Gradually increase jump precision / speed / timing requirements&#xD;&#xA;* Consider making the game harder by having your character move faster or with less precision. Or make character movement super-tight and the levels super difficult (Super Meat Boy).&#xD;&#xA;* Instead of bosses you could have hard jump sequences. Just remember not to frustrate the player too much.&#xD;&#xA;* Introduce things as walljump or gravity manipulation to spruce things up?&#xD;&#xA;* Make sure that the player dies because he's bad not because you trick him. (eg. one hit kill spikes that teleport out of nowhere(I Want To Be The Guy))" />
  <row Id="36352" PostHistoryTypeId="2" PostId="15897" RevisionGUID="ba776062-c97a-41ea-91b3-9935504cb39e" CreationDate="2011-08-12T15:18:03.937" UserId="338" Text="You could use a steering algorythm, giving the entity a (set of) goals/waypoints and let the entity manage itself, considering its position/velocity/acceleration and its goal. &#xD;&#xA;&#xD;&#xA; - The avantage is that is easy to go from a static waypoint to a mobile target :)&#xD;&#xA; - The inconvenient is that its not really a pathfinding, and more a local search : the entity react to obstacle, but does not search the map (to avoid ntering a cul-de-sac for exemple). You may have to add some waypoints using some higher level reasonning (ie high level pathfinding to get the waypoints, and low-level steering to go from one waypoint to another one)&#xD;&#xA;&#xD;&#xA;There are some good algo and exemples [here][1], with differents method. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.red3d.com/cwr/steer/" />
  <row Id="36353" PostHistoryTypeId="5" PostId="10694" RevisionGUID="baad5fd0-f375-4543-b82f-cf5f3ca821be" CreationDate="2011-08-12T15:20:49.883" UserId="1198" Comment="added 23 characters in body" Text="If your game is turn based, a combination of [long-polling][1] (read Push) and web services (SOAP or REST) should be more than sufficient for any turn-based game. They are simple to implement on a server and consume on a multitude of clients.&#xD;&#xA;&#xD;&#xA;The advantage of using web services, are two fold. First, just about every platform worth its salt will have a mechanism to invoke web services natively without much ruckus. Second, is that adding additional platforms, or even letting web (desktop based browser) players play against anyone else, is easy since you're just passing messages back and forth over an HTTP connection.&#xD;&#xA;&#xD;&#xA;In addition to that, since you're talking about Android and iOS -- where 3G connections are likely to occur, an HTTP web service wont completely die in a &quot;flaky-connection&quot; mode, where as pure TCP sockets would have issues staying connected.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Push_technology" />
  <row Id="36354" PostHistoryTypeId="6" PostId="15879" RevisionGUID="e9ee6ccb-c316-45ab-b727-fbcef2f027b9" CreationDate="2011-08-12T15:32:01.090" UserId="1430" Comment="i think path finding is a more focused tag than game design" Text="&lt;path-finding&gt;" />
  <row Id="36355" PostHistoryTypeId="5" PostId="15892" RevisionGUID="f403ad0d-c1f9-45b5-9a9c-e8b8b285d484" CreationDate="2011-08-12T15:37:04.127" UserId="1430" Comment="deleted 17 characters in body; edited title" Text="I have everything I need to make a Mario type game. I just have no idea how to design the levels to make it challenging or fun. Any tips? &#xD;&#xA;&#xD;&#xA;The only way to kill enemies is by jumping on them, so I thought it would be too hard to make a boss. I was just going to make the last level long. Is this a bad idea?" />
  <row Id="36356" PostHistoryTypeId="4" PostId="15892" RevisionGUID="f403ad0d-c1f9-45b5-9a9c-e8b8b285d484" CreationDate="2011-08-12T15:37:04.127" UserId="1430" Comment="deleted 17 characters in body; edited title" Text="What are some techniques for designing fun, challenging Mario-style platformer levels?" />
  <row Id="36357" PostHistoryTypeId="2" PostId="15898" RevisionGUID="cd44f3d6-fe6e-47f3-8908-e78cb2b371eb" CreationDate="2011-08-12T15:39:14.833" UserId="3051" Text="Here's [another article][1] about Mario-style level design.&#xD;&#xA;&#xD;&#xA;And here's [an article][2] I came across some time ago while researching procedural level design for platform games.  It discusses difficulty and design patterns.  &#xD;&#xA;&#xD;&#xA;Try to strike a balance between tricky platforming sections and places to &quot;rest.&quot;  Note that very few platform games are constantly challenging but, instead, provide places to pause and revel in the completion of a difficult section or psych themselves up for the next block.  Often, this is done through obvious checkpoints but it doesn't always have to be this discrete.&#xD;&#xA;&#xD;&#xA;Remember that in Super Mario Bros, there _are_ bosses even though your primary attack is jumping (fireballs notwithstanding).  Bowser can't be defeated by jumping on him but getting past him is a challenge that breaks from the jump-on-everything's-head mold that many simple platformers exhibit.  Additionally, Super Meat Boy features several different types of bosses, many with a unique gimmick.  But you don't actually attack any of them directly since you can only jump.  Not being able to attack doesn't make bosses out of the question; it can actually make them better.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.auntiepixelante.com/?p=465&#xD;&#xA;  [2]: http://pcg.wikidot.com/pcg-paper:procedural-level-design-for-platform-games" />
  <row Id="36358" PostHistoryTypeId="16" PostId="15895" RevisionGUID="371d3790-8d2b-450a-b627-d770a229fedf" CreationDate="2011-08-12T15:44:44.083" UserId="14" />
  <row Id="36359" PostHistoryTypeId="2" PostId="15899" RevisionGUID="9a393f6c-4146-448b-87ca-e6efa54ec383" CreationDate="2011-08-12T15:45:38.937" UserId="3051" Text="I'd get Maya, ZBrush, Photoshop, and Illustrator for my artists.&#xD;&#xA;&#xD;&#xA;An extra Mac, Unity pro (with asset server), and Visual Studio 2010 for my programmers.&#xD;&#xA;&#xD;&#xA;I'm not sure what sound guys would need outside of Audacity.&#xD;&#xA;&#xD;&#xA;Nor do I know what music guys want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36360" PostHistoryTypeId="16" PostId="15899" RevisionGUID="b667ade6-b8db-4848-92c3-930a8332a654" CreationDate="2011-08-12T15:45:38.937" UserId="3051" />
  <row Id="36361" PostHistoryTypeId="5" PostId="15888" RevisionGUID="21544ffd-ce8e-4224-a41c-2e24e2ca45d1" CreationDate="2011-08-12T15:48:16.087" UserId="5060" Comment="Replaced bullets with code formatting since they were kind-of distracting" Text="Imagine the following setup:&#xD;&#xA;&#xD;&#xA;    1 1 1 1 1 1 &#xD;&#xA;    1 0 0 0 0 1&#xD;&#xA;    1 0 0 0 0 1&#xD;&#xA;    1 0 0 0 0 1&#xD;&#xA;    1 0 0 0 0 1&#xD;&#xA;    1 1 1 1 1 1&#xD;&#xA;&#xD;&#xA;As a side note, I refer to squares in the matrix like this: (row, column). I've represented mines with &quot;1&quot; and empty spaces with &quot;0&quot;. Assume the user clicks on the empty space at (2, 2) (the corner at the top-left is (0, 0)).&#xD;&#xA;&#xD;&#xA;This is what would happen:&#xD;&#xA;&#xD;&#xA; - the square at (2, 3) is empty and has no adjacent mines. Let's call&#xD;&#xA;   our function for those coordinates&#xD;&#xA; - in the new function call we notice that (3, 3) is empty and has no adjacent mines, let's call the function for that space as well&#xD;&#xA; - (3, 2) is a valid place too, let's call again&#xD;&#xA; - in the fourth call we'll notice that (2, 2) is empty and has no nearby mines, so we're back at square one, thus creating an endless loop&#xD;&#xA;&#xD;&#xA;Any adjacent squares that each do not have adjacent mines will create an endless loop once your recursive function is called for either of them. Simply putting in a condition to not call the function again for the square you just came from wouldn't have been enough, as can be seen in the example above.&#xD;&#xA;&#xD;&#xA;One solution is to create another matrix that can show what squares have already been visited. If the current square has already been visited, return from the function immediately. Otherwise, mark is as a visited square and carry on with your usual code." />
  <row Id="36362" PostHistoryTypeId="24" PostId="15888" RevisionGUID="21544ffd-ce8e-4224-a41c-2e24e2ca45d1" CreationDate="2011-08-12T15:48:16.087" Comment="Proposed by 5060 approved by 1430 edit id of 634" />
  <row Id="36363" PostHistoryTypeId="2" PostId="15900" RevisionGUID="117a49d9-7430-453c-a9e9-a0d9456a6564" CreationDate="2011-08-12T15:53:01.473" UserId="4088" Text="I have been working on a hex tile game and found these tutorials useful:&#xD;&#xA;&#xD;&#xA; - [Coordinates in Hexagon-Based Tile Maps][1]&#xD;&#xA; - [Isometric 'n Hexogonal Maps Part I][2]&#xD;&#xA; - [Isometric 'n Hexogonal Maps Part II][3]&#xD;&#xA; - [Drawing a Hex Grid in Illustrator][4] (for designing maps)&#xD;&#xA;&#xD;&#xA;Good luck with your project!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/coordinates-in-hexagon-based-tile-maps-r1800&#xD;&#xA;  [2]: http://www.gamedev.net/page/resources/_/reference/programming/isometric-and-tile-based-games/298/isometric-n-hexagonal-maps-part-i-r747&#xD;&#xA;  [3]: http://www.gamedev.net/page/resources/_/reference/programming/isometric-and-tile-based-games/298/isometric-r748&#xD;&#xA;  [4]: http://forums.adobe.com/message/3603631" />
  <row Id="36364" PostHistoryTypeId="2" PostId="15901" RevisionGUID="97ffbbf4-fed0-4ef0-bc75-dac5e8740061" CreationDate="2011-08-12T16:05:14.453" UserId="8921" Text="I am currently developing a racing game akin to F-Zero in that the race is held at very fast speeds. The player is therefore placed in a 3rd person view.&#xD;&#xA;&#xD;&#xA;Graphically, I'm thinking of using motion blur and lowering the camera angle when the ship is going faster to give the player the impression of speed. This from the fact that the closer you are to the ground, the more you percieve speed.&#xD;&#xA;&#xD;&#xA;[This question](http://gamedev.stackexchange.com/questions/8535/effects-to-make-a-speeding-spaceship-look-faster) has intersting answers, but don't really apply because the effect needs to be progressive and constant, not like a boost effect.&#xD;&#xA;&#xD;&#xA;I was wondering if these techniques are viable, and if any other techniques exist?" />
  <row Id="36365" PostHistoryTypeId="1" PostId="15901" RevisionGUID="97ffbbf4-fed0-4ef0-bc75-dac5e8740061" CreationDate="2011-08-12T16:05:14.453" UserId="8921" Text="How can I give the player the impression of speed?" />
  <row Id="36366" PostHistoryTypeId="3" PostId="15901" RevisionGUID="97ffbbf4-fed0-4ef0-bc75-dac5e8740061" CreationDate="2011-08-12T16:05:14.453" UserId="8921" Text="&lt;graphic-effects&gt;&lt;user-experience&gt;" />
  <row Id="36367" PostHistoryTypeId="25" PostId="14081" RevisionGUID="7d0b920e-c8b5-4d14-899f-40dd0f6f3168" CreationDate="2011-08-12T16:36:57.397" Comment="http://twitter.com/#!/StackGameDev/status/102055983597096960" />
  <row Id="36368" PostHistoryTypeId="2" PostId="15902" RevisionGUID="99e3e057-4322-4cc0-b66e-a82cdbf49ee1" CreationDate="2011-08-12T16:46:04.223" UserId="2137" Text="So I was watching ikaruga:&#xD;&#xA;http://www.youtube.com/watch?v=Aj23K8Ri68E&#xD;&#xA;&#xD;&#xA;And then raystorm:&#xD;&#xA;http://www.youtube.com/watch?v=TQ4V0G5ykAg&amp;feature=related&#xD;&#xA;&#xD;&#xA;After looking at their 3D backgrounds for a little bit, it seems that they use a lot of repeated segments.&#xD;&#xA;&#xD;&#xA;How would one start with the development with such systems? Would there be editors that can be used (or at least help) with creating the environments? Perhaps a 3D map with splines describing the path of the ship, as well as events on the splines?" />
  <row Id="36369" PostHistoryTypeId="1" PostId="15902" RevisionGUID="99e3e057-4322-4cc0-b66e-a82cdbf49ee1" CreationDate="2011-08-12T16:46:04.223" UserId="2137" Text="Looping 3D environment in shmups" />
  <row Id="36370" PostHistoryTypeId="3" PostId="15902" RevisionGUID="99e3e057-4322-4cc0-b66e-a82cdbf49ee1" CreationDate="2011-08-12T16:46:04.223" UserId="2137" Text="&lt;3d&gt;&lt;graphics&gt;&lt;level-design&gt;&lt;shoot-em-up&gt;" />
  <row Id="36371" PostHistoryTypeId="4" PostId="15882" RevisionGUID="78204b5a-6d1f-49c6-bac7-4c5f6aec8065" CreationDate="2011-08-12T16:46:31.360" UserId="1430" Comment="edited title" Text="How does one buy the rights for a game?" />
  <row Id="36372" PostHistoryTypeId="2" PostId="15903" RevisionGUID="25e08cde-c0cc-4dba-8a58-187ab39baadb" CreationDate="2011-08-12T16:52:28.093" UserId="3051" Text="Many of the answers at the linked question may help.  Here are some other ideas off the top of my head.&#xD;&#xA;&#xD;&#xA;Lots of what I remember about FZero was the ground and barrier textures that were very obviously striped/tiled in ways that they weren't very &quot;long&quot; in the &quot;forward&quot; direction.  As you pass by these elements, they seemed to whiz by at very high speed.  Very commonly, the ground textures would change to a different pattern, further enhancing that feel of speed.&#xD;&#xA;&#xD;&#xA;Very responsive, almost jumpy/jittery, controls give a feel of speed as well.  In FZero, very slight shifts left and right are actually rather noticeable.&#xD;&#xA;&#xD;&#xA;Speed lines (wind-like particles) may or may not work for your environment.  They're probably at least worth an iteration or two.&#xD;&#xA;&#xD;&#xA;Banked turns.  Play off the knowledge players may have that banked turns are related to high-speed driving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I like the idea of the lower camera angle. Staying tight(-ish) on the vehicle will certainly make the environment local to the camera pass by more quickly.  The closer the camera is to the vehicle will increase this effect but, of course, be wary of making the game unplayable through being unable to see enough." />
  <row Id="36373" PostHistoryTypeId="10" PostId="15895" RevisionGUID="a945fe43-8a3c-44ef-9f7e-dd94127a191a" CreationDate="2011-08-12T17:09:52.643" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:1430,&quot;DisplayName&quot;:&quot;Josh Petrie&quot;},{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36374" PostHistoryTypeId="10" PostId="15883" RevisionGUID="dbbd029d-d917-47e7-857f-65c551a19876" CreationDate="2011-08-12T17:15:43.833" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36375" PostHistoryTypeId="5" PostId="15902" RevisionGUID="109021b9-90a9-41ff-a518-8aea02b9dcbd" CreationDate="2011-08-12T17:21:03.523" UserId="7548" Comment="Shortened second link by removing an unneeded element, fixed formatting, and a few other minor improvements." Text="So I was watching Ikaruga:&lt;br&gt;&#xD;&#xA;http://www.youtube.com/watch?v=Aj23K8Ri68E&#xD;&#xA;&#xD;&#xA;And then raystorm:&lt;br&gt;&#xD;&#xA;http://www.youtube.com/watch?v=TQ4V0G5ykAg&#xD;&#xA;&#xD;&#xA;After looking at their 3D backgrounds for a little bit, it appears that they use a lot of repeated segments.&#xD;&#xA;&#xD;&#xA;How would one start with the development with such systems?  Would there be editors that can be used (or at least help) with creating the environments?  Perhaps a 3D map with splines describing the path of the ship, as well as events on the splines?&#xD;&#xA;" />
  <row Id="36376" PostHistoryTypeId="24" PostId="15902" RevisionGUID="109021b9-90a9-41ff-a518-8aea02b9dcbd" CreationDate="2011-08-12T17:21:03.523" Comment="Proposed by 7548 approved by 51 edit id of 635" />
  <row Id="36377" PostHistoryTypeId="2" PostId="15904" RevisionGUID="c6f63ffe-73b6-4498-8d94-74a6fd64d38a" CreationDate="2011-08-12T17:25:48.833" UserId="3184" Text="Unity and [Sio2][1] look really solid and impressive. Pricey yes but I understand how much it is challenging to create such products.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sio2interactive.com/" />
  <row Id="36378" PostHistoryTypeId="16" PostId="15904" RevisionGUID="4e219873-8da9-4e59-8234-b972c6a3ae02" CreationDate="2011-08-12T17:25:48.833" UserId="3184" />
  <row Id="36379" PostHistoryTypeId="2" PostId="15905" RevisionGUID="db99fa2c-0931-4fef-a71b-0eff7865ee95" CreationDate="2011-08-12T17:33:48.117" UserId="9230" Text="Does anyone have any insight or experience into the successfullness of placing Facebook or Twitter &quot;share&quot; buttons within an iOS game?  For example, when a user gets a high score, presenting them with the option to share their score via Facebook or Twitter.&#xD;&#xA;&#xD;&#xA;My reservations/bias against including Facebook or Twitter buttons in my game are:&#xD;&#xA;&#xD;&#xA; - Distrust of buttons that auto-post without giving one the chance to format the text yourself&#xD;&#xA; - I don't use themself because I tend to manually create tweets or Facebook wall posts on my own&#xD;&#xA;&#xD;&#xA;On the other hand, the potential benefits of such buttons can obviously be profound.  The question is simply: do iOS users actually use such buttons?" />
  <row Id="36380" PostHistoryTypeId="1" PostId="15905" RevisionGUID="db99fa2c-0931-4fef-a71b-0eff7865ee95" CreationDate="2011-08-12T17:33:48.117" UserId="9230" Text="Success of Facebook and Twitter buttons within an iOS game" />
  <row Id="36381" PostHistoryTypeId="3" PostId="15905" RevisionGUID="db99fa2c-0931-4fef-a71b-0eff7865ee95" CreationDate="2011-08-12T17:33:48.117" UserId="9230" Text="&lt;ios&gt;&lt;facebook&gt;&lt;social&gt;&lt;twitter&gt;" />
  <row Id="36385" PostHistoryTypeId="17" PostId="15907" RevisionGUID="50cd04fc-3461-4321-8761-5b73f2f756ed" CreationDate="2011-08-12T18:02:27.980" UserId="-1" Comment="from http://stackoverflow.com/questions/6232178/walkin-on-terrain-opengl" Text="" />
  <row Id="36386" PostHistoryTypeId="17" PostId="15908" RevisionGUID="7400908d-0ed8-4e0d-ac5e-c1d2810f92ac" CreationDate="2011-08-12T18:02:27.980" UserId="-1" Comment="from http://stackoverflow.com/questions/6232178/walkin-on-terrain-opengl" Text="" />
  <row Id="36387" PostHistoryTypeId="17" PostId="15909" RevisionGUID="552934e5-8e1c-4d52-85cf-d8ba88fdacec" CreationDate="2011-08-12T18:02:27.980" UserId="-1" Comment="from http://stackoverflow.com/questions/6232178/walkin-on-terrain-opengl" Text="" />
  <row Id="36388" PostHistoryTypeId="17" PostId="15910" RevisionGUID="ccdc7b29-03e3-493e-9da3-7b68a96bbb29" CreationDate="2011-08-12T18:02:27.980" UserId="-1" Comment="from http://stackoverflow.com/questions/6232178/walkin-on-terrain-opengl" Text="" />
  <row Id="36389" PostHistoryTypeId="2" PostId="15908" RevisionGUID="4e67b232-d4fa-47c3-9a9d-0a97d35beead" CreationDate="2011-06-12T15:33:33.117" UserDisplayName="Chris Mennie" Text="You may have some luck with using gluLookAt() to manipulate the camera. It'd probably be easier to move the camera position and the point that it's looking at instead of rotating the camera yourself. This would also simplify doing things like &quot;looking around&quot; from a stationary point." />
  <row Id="36390" PostHistoryTypeId="2" PostId="15909" RevisionGUID="457b4ca7-9b9e-4bc8-89cb-1a94a005f866" CreationDate="2011-08-12T16:02:11.773" UserId="9246" UserDisplayName="przemo_li" Text="The answer is very simple.&#xD;&#xA;&#xD;&#xA;When you render terrain you supply 3 values, x,y,z. Lets assume that z value is height. So when walking you just need to keep camera above z value! You get camera x,y query height in that spot and place camera above z value.When there is no z value for this spot interpolate from near by points.&#xD;&#xA;&#xD;&#xA;Thats all.&#xD;&#xA;&#xD;&#xA;You also may want to keep camera some constant above terrain itself (to give illusion of being physical character).&#xD;&#xA;&#xD;&#xA;You also may want to put all height in one array. And assume that x and y change by const interval, to simplify your terrain generation. And you get height-map!" />
  <row Id="36391" PostHistoryTypeId="2" PostId="15910" RevisionGUID="fa24e354-79e6-4523-b6e3-2e912859fbf3" CreationDate="2011-08-12T17:28:54.990" UserId="345" Text="The best way to make sure you're above a triangle is to use [barycentric coordinates][1].  In short, this is a coordinate system local to a triangle that allows you to get the height of a point somewhere in the interior of the triangle.&#xD;&#xA;&#xD;&#xA;So your algorithm would go something like:&#xD;&#xA;&#xD;&#xA; - Get the camera/player position&#xD;&#xA; - Figure out what triangle that player is on (assuming you have a regular grid of triangles in the (x,y) plane this should be trivial).&#xD;&#xA; - Using the 3 points of that triangle convert the camera point to triangle space and use the barycentric coordinates to solve for the height.&#xD;&#xA; - Unproject it from triangle space back to world space and you'll have the point on the triangle where the camera should be.  You'll probably want to move this up so that it appears the camera is on the terrain proper.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Barycentric_coordinates_%28mathematics%29" />
  <row Id="36392" PostHistoryTypeId="2" PostId="15907" RevisionGUID="ab635370-f934-457c-a592-19bab7b50700" CreationDate="2011-06-03T20:15:23.957" UserDisplayName="Gabriel" Text="i wanna walk to terrain...&#xD;&#xA;first i created the terrain&#xD;&#xA;&#xD;&#xA;    void desenha_terreno(float px, float pz){&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	for (int z = 0; z &lt; iwidth-1; z++)&#xD;&#xA;	{&#xD;&#xA;		glBegin(GL_TRIANGLE_STRIP);&#xD;&#xA;		&#xD;&#xA;		for (int x = 0; x &lt; iheight-1; x++)&#xD;&#xA;		{&#xD;&#xA;			// for each vertex, we calculate the grayscale shade color, &#xD;&#xA;			// we set the texture coordinate, and we draw the vertex.&#xD;&#xA;			/*&#xD;&#xA;			   the vertices are drawn in this order:&#xD;&#xA;&#xD;&#xA;			   0  ---&gt; 1&#xD;&#xA;			          /&#xD;&#xA;				    /&#xD;&#xA;			     |/&#xD;&#xA;			   2  ---&gt; 3&#xD;&#xA;			*/&#xD;&#xA;		&#xD;&#xA;			// draw vertex 0&#xD;&#xA;			glColor3f(terreno[x][z][1]/255.0f, terreno[x][z][1]/255.0f, terreno[x][z][1]/255.0f);&#xD;&#xA;			glTexCoord2f(0.0f, 0.0f);&#xD;&#xA;			glVertex3f(terreno[x][z][0], terreno[x][z][1], terreno[x][z][2]);&#xD;&#xA;			&#xD;&#xA;			// draw vertex 1&#xD;&#xA;			glTexCoord2f(1.0f, 0.0f);&#xD;&#xA;			glColor3f(terreno[x+1][z][1]/255.0f, terreno[x+1][z][1]/255.0f, terreno[x+1][z][1]/255.0f);&#xD;&#xA;			glVertex3f(terreno[x+1][z][0], terreno[x+1][z][1], terreno[x+1][z][2]);&#xD;&#xA;&#xD;&#xA;			// draw vertex 2&#xD;&#xA;			glTexCoord2f(0.0f, 1.0f);&#xD;&#xA;			glColor3f(terreno[x][z+1][1]/255.0f, terreno[x][z+1][1]/255.0f, terreno[x][z+1][1]/255.0f);&#xD;&#xA;			glVertex3f(terreno[x][z+1][0], terreno[x][z+1][1], terreno[x][z+1][2]);&#xD;&#xA;&#xD;&#xA;			// draw vertex 3&#xD;&#xA;			glColor3f(terreno[x+1][z+1][1]/255.0f, terreno[x+1][z+1][1]/255.0f, terreno[x+1][z+1][1]/255.0f);&#xD;&#xA;			glTexCoord2f(1.0f, 1.0f);&#xD;&#xA;			glVertex3f(terreno[x+1][z+1][0], terreno[x+1][z+1][1], terreno[x+1][z+1][2]);&#xD;&#xA;&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		glEnd();&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I can move the camera with the functions:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    void keyboard (unsigned char key, int x, int y) {&#xD;&#xA;	if (key=='w')&#xD;&#xA;	{&#xD;&#xA;		float xrotrad, yrotrad;&#xD;&#xA;		yrotrad = (yrot / 180 * 3.141592654f);&#xD;&#xA;		xrotrad = (xrot / 180 * 3.141592654f); &#xD;&#xA;		xpos += float(sin(yrotrad))*5;&#xD;&#xA;		zpos -= float(cos(yrotrad))*5;&#xD;&#xA;		ypos -= float(sin(xrotrad))*5;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='s')&#xD;&#xA;	{&#xD;&#xA;		float xrotrad, yrotrad;&#xD;&#xA;		yrotrad = (yrot / 180 * 3.141592654f);&#xD;&#xA;		xrotrad = (xrot / 180 * 3.141592654f); &#xD;&#xA;		xpos -= float(sin(yrotrad))*5;&#xD;&#xA;		zpos += float(cos(yrotrad))*5;&#xD;&#xA;		ypos += float(sin(xrotrad))*5;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='d')&#xD;&#xA;	{&#xD;&#xA;		float yrotrad;&#xD;&#xA;		yrotrad = (yrot / 180 * 3.141592654f);&#xD;&#xA;		xpos += float(cos(yrotrad))*5;&#xD;&#xA;		zpos += float(sin(yrotrad))*5;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='a')&#xD;&#xA;	{&#xD;&#xA;		float yrotrad;&#xD;&#xA;		yrotrad = (yrot / 180 * 3.141592654f);&#xD;&#xA;		xpos -= float(cos(yrotrad))*5;&#xD;&#xA;		zpos -= float(sin(yrotrad))*5;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='q')&#xD;&#xA;	{&#xD;&#xA;		yrot += (float) -0.5*5;    //set the xrot to yrot with the addition of the difference in the x position&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='e')&#xD;&#xA;	{&#xD;&#xA;		yrot += (float) 0.5*5;    //set the xrot to yrot with the addition of the difference in the x position&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='r')&#xD;&#xA;	{&#xD;&#xA;		xrot += (float) -0.5*5;    //set the xrot to yrot with the addition of the difference in the x position&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key=='f')&#xD;&#xA;	{&#xD;&#xA;		xrot += (float) 0.5*5;    //set the xrot to yrot with the addition of the difference in the x position&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	if (key==27)&#xD;&#xA;	{&#xD;&#xA;		exit(0);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	glutPostRedisplay();&#xD;&#xA;	`&#xD;&#xA;&#xD;&#xA;and, i change the position with the values of x,y,z positions&#xD;&#xA;&#xD;&#xA;        // clear screen and depth buffer&#xD;&#xA;	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);		&#xD;&#xA;	glLoadIdentity();&#xD;&#xA;&#xD;&#xA;	//glTranslatef(0.0f, 0.0f, -cRadius);&#xD;&#xA;	glRotatef(xrot,1.0,0.0,0.0);&#xD;&#xA;	glRotatef(yrot,0.0,1.0,0.0);  //rotate our camera on the 	y-axis (up and down)&#xD;&#xA;	&#xD;&#xA;	glTranslated(-xpos,-ypos,-zpos); //translate the screen	to the position of our camera&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	// set the camera position&#xD;&#xA;	//gluLookAt(cameraX, cameraY, cameraZ, lookX, lookY, lookZ, 0.0, 1.0, 0.0);&#xD;&#xA;&#xD;&#xA;	// set the current texture to the land texture&#xD;&#xA;	//glBindTexture(GL_TEXTURE_2D, land);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        desenha_terreno(xpos,ypos);&#xD;&#xA;        glEnable(GL_BLEND);&#xD;&#xA;&#xD;&#xA;	// enable read-only depth buffer&#xD;&#xA;	glDepthMask(GL_FALSE);&#xD;&#xA;&#xD;&#xA;	// set the blend function to what we use for transparency&#xD;&#xA;	glBlendFunc(GL_SRC_ALPHA, GL_ONE);&#xD;&#xA;&#xD;&#xA;	// set back to normal depth buffer mode (writable)&#xD;&#xA;	glDepthMask(GL_TRUE);&#xD;&#xA;&#xD;&#xA;	// disable blending&#xD;&#xA;	glDisable(GL_BLEND);&#xD;&#xA;&#xD;&#xA;		glFlush();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        glutSwapBuffers();&#xD;&#xA;&#xD;&#xA;        angle++; //increase the angle&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;well... i need to walk to the terrain, above the terrain, help me please!&#xD;&#xA;" />
  <row Id="36393" PostHistoryTypeId="1" PostId="15907" RevisionGUID="ab635370-f934-457c-a592-19bab7b50700" CreationDate="2011-06-03T20:15:23.957" UserDisplayName="Gabriel" Text="Walkin on terrain - Opengl" />
  <row Id="36394" PostHistoryTypeId="3" PostId="15907" RevisionGUID="ab635370-f934-457c-a592-19bab7b50700" CreationDate="2011-06-03T20:15:23.957" UserDisplayName="Gabriel" Text="&lt;c++&gt;&lt;c&gt;&lt;opengl&gt;&lt;3d&gt;" />
  <row Id="36395" PostHistoryTypeId="2" PostId="15911" RevisionGUID="e0ef1bfe-04b8-4ae5-98aa-886ede0f07e3" CreationDate="2011-08-12T18:06:33.687" UserId="9229" Text="I'm trying to create projectiles which bounce/ricochet off one another when they collide in mid-air.&#xD;&#xA;&#xD;&#xA;Each projectile is represented by one vector representing its current location and another representing its direction and speed.  (Vectors, here, basically being `&lt;x,y,z&gt;` tuples.)  The distance/direction between the two projectiles can easily be calculated as a fifth vector.&#xD;&#xA;&#xD;&#xA;In my head, I envision the ricochet as reflecting each projectile's velocity off of a plane perpendicular to the line between the two projectiles, but Googling for &quot;vector reflection&quot; and the like just gets me [pages](http://mathworld.wolfram.com/Reflection.html) full of [math](http://mathworld.wolfram.com/Reflection.html) I don't know how to translate into code.  :-)&#xD;&#xA;&#xD;&#xA;How can I model this collision?  I'm not worried about real-world factors like drag, friction, or gravity — simple reflection is enough.&#xD;&#xA;&#xD;&#xA;&lt;!-- language: java --&gt;&#xD;&#xA;&#xD;&#xA;    static void ricochet(Projectile projectile1, Projectile projectile2) {&#xD;&#xA;        Vector position1 = projectile1.position;&#xD;&#xA;        Vector position2 = projectile2.position;&#xD;&#xA;&#xD;&#xA;        Vector direction1 = projectile1.direction;&#xD;&#xA;        Vector direction2 = projectile2.direction;&#xD;&#xA;&#xD;&#xA;        Vector distance = new Vector(position1).subtract(position2);&#xD;&#xA;&#xD;&#xA;        Vector reflection1 = new Vector();&#xD;&#xA;        Vector reflection2 = new Vector();&#xD;&#xA;&#xD;&#xA;        // MAGIC!&#xD;&#xA;&#xD;&#xA;        projectile1.direction = reflection1;&#xD;&#xA;        projectile2.direction = reflection2;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="36396" PostHistoryTypeId="1" PostId="15911" RevisionGUID="e0ef1bfe-04b8-4ae5-98aa-886ede0f07e3" CreationDate="2011-08-12T18:06:33.687" UserId="9229" Text="How do I calculate the exit vectors of colliding projectiles?" />
  <row Id="36397" PostHistoryTypeId="3" PostId="15911" RevisionGUID="e0ef1bfe-04b8-4ae5-98aa-886ede0f07e3" CreationDate="2011-08-12T18:06:33.687" UserId="9229" Text="&lt;3d&gt;&lt;java&gt;&lt;projectile-physics&gt;" />
  <row Id="36398" PostHistoryTypeId="5" PostId="13191" RevisionGUID="a6b6643b-77bb-4e73-a6e6-5d02fdeda5f1" CreationDate="2011-08-12T18:10:49.703" UserId="6540" Comment="edited body" Text="What would be a good algorithm for the Fifteen puzzle, if the puzzle is slightly modified in that you only have a small number of pieces that should be placed correctly  and these correctly placed pieces can be located anywhere on the board&#xD;&#xA;&#xD;&#xA;Say we had the board&#xD;&#xA;&#xD;&#xA;1100  &#xD;&#xA;1000  &#xD;&#xA;0000  &#xD;&#xA;000  &#xD;&#xA;&#xD;&#xA;and we need the shape &#xD;&#xA;&#xD;&#xA;111 anywhere in the board so&#xD;&#xA;&#xD;&#xA;1110  &#xD;&#xA;0000  &#xD;&#xA;0000  &#xD;&#xA;000   &#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;0000  &#xD;&#xA;0000  &#xD;&#xA;0111  &#xD;&#xA;000    &#xD;&#xA;&#xD;&#xA;are winning results." />
  <row Id="36399" PostHistoryTypeId="2" PostId="15912" RevisionGUID="7159b352-4e18-45c8-a62d-c6ef9b5b70d3" CreationDate="2011-08-12T18:31:25.310" UserId="9231" Text="I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out as anything useful.&#xD;&#xA;&#xD;&#xA;I have tried a few different techniques like Perlin Noise and read about some others such as Midpoint Displacement, although I'm not sure what one would be best, or a combination of different techniques to generate different areas. (Such as Midpoint Displacement for the general shape of the terrain and Perlin Noise for the caves.)&#xD;&#xA;&#xD;&#xA;I have found an &lt;a href=&quot;http://accidentalnoise.sourceforge.net/minecraftworlds.html&quot;&gt;excellent explanation&lt;/a&gt; of how I could layer it up with the &lt;a href=&quot;http://accidentalnoise.sourceforge.net/index.html&quot;&gt;Accidental Noise Library&lt;/a&gt;, although it is in C++, and I do not know enough C++ to compile it into a DLL that I can use from C#. I have tried to copy this in C#, although, I do not know how I can merge two effects together (the gradient for the general base, and then the fractal for detail).&#xD;&#xA;&#xD;&#xA;Currently I am using a Plasma Fractal and the results are extremely varied. For example it can generate terrain where there is hardly any surface, or it can generate terrain where there is no surface at all.&#xD;&#xA;&#xD;&#xA;An example of an okay map, would be better with some more improvements, though. (Black is solid, white is air): -http://i.stack.imgur.com/3C1sR.png&#xD;&#xA;&#xD;&#xA;And an example of a terrible map. (Black is solid, white is air): -http://i.stack.imgur.com/LhxgR.png&#xD;&#xA;&#xD;&#xA;Sorry about the links, I can't post more than 2, and I'm not able to post any images.&#xD;&#xA;&#xD;&#xA;Basically, what I'm asking is, what would be a better way of generating the terrain, or forcing it to make sure that there is a reasonable amount of surface area, with the generation time as quick as possible. Or, alternatively, how I would be able to achieve the same result as the Accidental Noise Library, but in C#.&#xD;&#xA;&#xD;&#xA;Any examples would be very much appreciated." />
  <row Id="36400" PostHistoryTypeId="1" PostId="15912" RevisionGUID="7159b352-4e18-45c8-a62d-c6ef9b5b70d3" CreationDate="2011-08-12T18:31:25.310" UserId="9231" Text="Terrain Generation for Tile-Based 2D Platformer" />
  <row Id="36401" PostHistoryTypeId="3" PostId="15912" RevisionGUID="7159b352-4e18-45c8-a62d-c6ef9b5b70d3" CreationDate="2011-08-12T18:31:25.310" UserId="9231" Text="&lt;xna&gt;&lt;2d&gt;&lt;terrain&gt;" />
  <row Id="36402" PostHistoryTypeId="25" PostId="15825" RevisionGUID="57a593aa-8595-47c9-8a26-3e87ce8b4af6" CreationDate="2011-08-12T18:36:57.997" Comment="http://twitter.com/#!/StackGameDev/status/102086186574688257" />
  <row Id="36403" PostHistoryTypeId="2" PostId="15913" RevisionGUID="bc645ced-a17e-43ce-b5cb-548e72ddd513" CreationDate="2011-08-12T18:48:13.963" UserId="6947" Text="Are there any other OSX game engines out there similar to [Torque](http://www.garagegames.com/products/torque-2d) from Garage Games? I looked into Torque awhile back but the current version 2D version hasn't been updated in a long time and there are a lot of known bugs that the company has said it will not fix. I has asked about Torque2D (the new engine) but was told it wont be out for an undetermined amount of time. Its unfortunate but their website lists Torque2D but actually its their old product Torque Game Builder.&#xD;&#xA;&#xD;&#xA;I've tried [Unity](http://unity3d.com/) but at this point I dont want to do 3D, I'm looking for a nice 2D engine that you can just start a game in. [Impact](http://impactjs.com/) looks interesting, but I'm looking for a little more mature of a project (builtin networking) and I think I would rather end up with native applications rather than web based. I'm *not* looking for things like [Ogre](http://www.ogre3d.org/) or [LÖVE](http://love2d.org/) where you are given a framework and not a whole game engine and environment to built it in.&#xD;&#xA;&#xD;&#xA;I would like to be able to target multiple platforms if possible and have multi-player support as well. I am willing to pay money for a nice product with good support." />
  <row Id="36404" PostHistoryTypeId="1" PostId="15913" RevisionGUID="bc645ced-a17e-43ce-b5cb-548e72ddd513" CreationDate="2011-08-12T18:48:13.963" UserId="6947" Text="OSX 2D game engine" />
  <row Id="36405" PostHistoryTypeId="3" PostId="15913" RevisionGUID="bc645ced-a17e-43ce-b5cb-548e72ddd513" CreationDate="2011-08-12T18:48:13.963" UserId="6947" Text="&lt;engine&gt;&lt;unity&gt;&lt;macos&gt;&lt;torque&gt;" />
  <row Id="36406" PostHistoryTypeId="2" PostId="15914" RevisionGUID="4f64c75e-ff5c-4aa7-8b4a-b74eeca5676a" CreationDate="2011-08-12T19:02:37.300" UserId="7946" Text="    Are there any other OSX game engines out there similar to Torque from Garage Games?&#xD;&#xA;&#xD;&#xA;I'm afraid not, if you're looking for fully-featured game engines (which already include things like gamestate management, physics, scripting, pathfinding, editors etc.). &#xD;&#xA;&#xD;&#xA;I've done some research into this in the recent past myself, since I was contemplating writing my own engine instead of an open-source-engine, but I found that fully-featured 2D game engines, which can really call themselves **game** engines as opposed to graphics engines with a couple of extra features, are extremely rare, I might even say non-existent. &#xD;&#xA;&#xD;&#xA;There are a couple of libraries that provide some comfort features beyond just the ability of drawing textured rectangles (such as tilemaps, particle systems etc.), for example, Haaf's Game Engine ([which recently was ported to Linux and OSX systems][1], but probably nothing with the complete functionality that you are looking for.&#xD;&#xA;&#xD;&#xA;But if the most important thing for you is networking, and you're willing to go the hard route, [SFML][2] (and it's [Mac port][3]) provides some decently high-level networking functionality, as well as an excellent API overall with fairly high-level features in the areas of graphics (most notably the support of fragment shaders and in the near future vertex shaders, which sadly is something that a lot of 2D engines leave out), audio, input and networking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://hg.icculus.org/icculus/hge-unix/&#xD;&#xA;  [2]: http://sfml-dev.org/&#xD;&#xA;  [3]: http://www.sfml-dev.org/forum/viewtopic.php?t=3613" />
  <row Id="36407" PostHistoryTypeId="2" PostId="15915" RevisionGUID="5b31cb88-85a7-42b1-9026-7848194c9c06" CreationDate="2011-08-12T19:09:11.460" UserId="8973" Text="Reflection is unnecessarily complex, the problem is much simpler than that.&#xD;&#xA;&#xD;&#xA;Consider two projectiles (A and B), where A is moving and B is stationery. At the point of collision all the force in A will be passed onto B, resulting in A coming to a complete stop, and B shooting off at the speed that A was travelling at when it hit. That's exactly how a [newtons cradle][1] works.&#xD;&#xA;&#xD;&#xA;What actually happens is that A's velocity is added to B. We know that every action has an equal and opposite reaction, so the same velocity is subtracted from A. The result is A's velocity vector is transferred to B, and vice-versa. &#xD;&#xA;&#xD;&#xA;Now consider if A and B are flying directly towards each other. Let's say A has a velocity of [1, 0], and B has a velocity of [-1, 0]. At the point of collision we add A's velocity to B, and subtract the same value from A. The code would look something like this:&#xD;&#xA;&#xD;&#xA;    Vector newVelocityA = velocityA.add(velocityB).subtract(velocityA);&#xD;&#xA;    Vector newVelocityB = velocityB.add(velocityA).subtract(velocityB);&#xD;&#xA;&#xD;&#xA;This can be simplified by removing the unnecessary arithmetic:&#xD;&#xA;&#xD;&#xA;    Vector newVelocityA = velocityB;&#xD;&#xA;    Vector newVelocityB = velocityA;&#xD;&#xA;&#xD;&#xA;As you can see it basically boils down to swapping the vectors of the two particles. &#xD;&#xA;&#xD;&#xA;The reason why such a simple system works is that we're assuming perfect elastic collision and projectiles with identical masses. In a more complex system with different masses you would need to base the calculations on the force rather than the velocity, but is based on the same principles.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Newton%27s_cradle" />
  <row Id="36408" PostHistoryTypeId="5" PostId="15915" RevisionGUID="cdd19aa8-19e8-413a-882c-ad249611d0b1" CreationDate="2011-08-12T19:15:40.527" UserId="8973" Comment="Added link to 3 fundamental laws of physics" Text="Reflection is unnecessarily complex, the problem is much simpler than that.&#xD;&#xA;&#xD;&#xA;Consider two projectiles (A and B), where A is moving and B is stationery. At the point of collision all the force in A will be passed onto B, resulting in A coming to a complete stop, and B shooting off at the speed that A was travelling at when it hit. That's exactly how a [newtons cradle][1] works.&#xD;&#xA;&#xD;&#xA;What actually happens is that A's velocity is added to B. [We know that every action has an equal and opposite reaction][2], so the same velocity is subtracted from A. The result is A's velocity vector is transferred to B, and vice-versa. &#xD;&#xA;&#xD;&#xA;Now consider if A and B are flying directly towards each other.  At the point of collision we add A's velocity to B, and subtract the same value from A. We apply the same calculation to B since it is also moving. The code would look something like this:&#xD;&#xA;&#xD;&#xA;    Vector newVelocityA = velocityA.add(velocityB).subtract(velocityA);&#xD;&#xA;    Vector newVelocityB = velocityB.add(velocityA).subtract(velocityB);&#xD;&#xA;&#xD;&#xA;This can be simplified by removing the unnecessary arithmetic:&#xD;&#xA;&#xD;&#xA;    Vector newVelocityA = velocityB;&#xD;&#xA;    Vector newVelocityB = velocityA;&#xD;&#xA;&#xD;&#xA;As you can see it basically boils down to swapping the vectors of the two particles. &#xD;&#xA;&#xD;&#xA;The reason why such a simple system works is that we're assuming perfect elastic collision and projectiles with identical masses. In a more complex system with different masses you would need to base the calculations on the force rather than the velocity, but is based on the same principles.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Newton%27s_cradle&#xD;&#xA;  [2]: http://csep10.phys.utk.edu/astr161/lect/history/newton3laws.html" />
  <row Id="36409" PostHistoryTypeId="5" PostId="15913" RevisionGUID="6b8325c1-8dad-4e49-940c-d4fee535f328" CreationDate="2011-08-12T19:26:59.327" UserId="6947" Comment="minor clarification" Text="Are there any other OSX game engines out there similar to [Torque](http://www.garagegames.com/products/torque-2d) from Garage Games? I looked into Torque awhile back but the current version 2D version hasn't been updated in a long time and there are a lot of known bugs that the company has said it will not fix. I has asked about Torque2D (the new engine) but was told it wont be out for an undetermined amount of time. Its unfortunate but their website lists Torque2D but actually its their old product Torque Game Builder.&#xD;&#xA;&#xD;&#xA;I've tried [Unity](http://unity3d.com/) but at this point I dont want to do 3D, I'm looking for a nice 2D engine that you can just start a game in. [Impact](http://impactjs.com/) looks interesting, but I'm looking for a little more mature of a project (builtin networking) and I think I would rather end up with native applications rather than web based. I'm *not* looking for things like [Ogre](http://www.ogre3d.org/) or [LÖVE](http://love2d.org/) where you are given a framework and not a whole game engine and environment to built it in.&#xD;&#xA;&#xD;&#xA;I would like to be able to target multiple platforms if possible and have multi-player support as well, not that multi-player is the only thing I'm looking for feature wise. the game engine itself over a game framework is much more important. I am willing to pay money for a nice product with good support." />
  <row Id="36410" PostHistoryTypeId="2" PostId="15916" RevisionGUID="a235dac6-eb5e-452f-b216-c66423bfd186" CreationDate="2011-08-12T19:30:10.103" UserId="7881" Text="I would try sticking with Perlin noise, but adding a weight to it based on height, to ensure a certain average density at certain altitudes. To quote part of Notch's [post on Minecraft terrain generation][1]:&#xD;&#xA;&#xD;&#xA;&gt; So I switched the system over into a similar system based off 3D&#xD;&#xA;&gt; Perlin noise. Instead of sampling the “ground height”, I treated the&#xD;&#xA;&gt; noise value as the “density”, where anything lower than 0 would be&#xD;&#xA;&gt; air, and anything higher than or equal to 0 would be ground. To make&#xD;&#xA;&gt; sure the bottom layer is solid and the top isn’t, I just add the&#xD;&#xA;&gt; height (offset by the water level) to the sampled result.&#xD;&#xA;&#xD;&#xA;Essentially, you're taking a little slice of a Minecraft terrain. So generate 2D Perlin noise, but weight it so that anything above a certain point is *likely* to be air, and anything below a certain point is *likely* to be earth.&#xD;&#xA;&#xD;&#xA;This will give you a good ground terrain, with some overhangs and interesting features, as well as some caves and floating islands. (If you don't want floating islands, you can test for them and remove them manually.) This method won't give you things like tunnels, so you'll want a method for adding those in after terrain generation, such as a [random-walk][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Random_walk" />
  <row Id="36411" PostHistoryTypeId="5" PostId="15912" RevisionGUID="f39c559d-3a3e-441d-b6e7-af280694f408" CreationDate="2011-08-12T19:48:45.807" UserId="7881" Comment="Linkified OP's pictures, added tag." Text="I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out as anything useful.&#xD;&#xA;&#xD;&#xA;I have tried a few different techniques like Perlin Noise and read about some others such as Midpoint Displacement, although I'm not sure what one would be best, or a combination of different techniques to generate different areas. (Such as Midpoint Displacement for the general shape of the terrain and Perlin Noise for the caves.)&#xD;&#xA;&#xD;&#xA;I have found an &lt;a href=&quot;http://accidentalnoise.sourceforge.net/minecraftworlds.html&quot;&gt;excellent explanation&lt;/a&gt; of how I could layer it up with the &lt;a href=&quot;http://accidentalnoise.sourceforge.net/index.html&quot;&gt;Accidental Noise Library&lt;/a&gt;, although it is in C++, and I do not know enough C++ to compile it into a DLL that I can use from C#. I have tried to copy this in C#, although, I do not know how I can merge two effects together (the gradient for the general base, and then the fractal for detail).&#xD;&#xA;&#xD;&#xA;Currently I am using a Plasma Fractal and the results are extremely varied. For example it can generate terrain where there is hardly any surface, or it can generate terrain where there is no surface at all.&#xD;&#xA;&#xD;&#xA;An example of an okay map, would be better with some more improvements, though. (Black is solid, white is air):&#xD;&#xA;&#xD;&#xA;![Good map][1]&#xD;&#xA;&#xD;&#xA;And an example of a terrible map. (Black is solid, white is air): &#xD;&#xA;&#xD;&#xA;![Terrible map][2]&#xD;&#xA;&#xD;&#xA;Sorry about the links, I can't post more than 2, and I'm not able to post any images.&#xD;&#xA;&#xD;&#xA;Basically, what I'm asking is, what would be a better way of generating the terrain, or forcing it to make sure that there is a reasonable amount of surface area, with the generation time as quick as possible. Or, alternatively, how I would be able to achieve the same result as the Accidental Noise Library, but in C#.&#xD;&#xA;&#xD;&#xA;Any examples would be very much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JsYe1.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/uHjyO.png" />
  <row Id="36412" PostHistoryTypeId="6" PostId="15912" RevisionGUID="f39c559d-3a3e-441d-b6e7-af280694f408" CreationDate="2011-08-12T19:48:45.807" UserId="7881" Comment="Linkified OP's pictures, added tag." Text="&lt;xna&gt;&lt;2d&gt;&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="36413" PostHistoryTypeId="24" PostId="15912" RevisionGUID="f39c559d-3a3e-441d-b6e7-af280694f408" CreationDate="2011-08-12T19:48:45.807" Comment="Proposed by 7881 approved by 1430 edit id of 636" />
  <row Id="36414" PostHistoryTypeId="5" PostId="15912" RevisionGUID="99c575ff-c5b5-4aad-8255-db9320353add" CreationDate="2011-08-12T19:49:01.907" UserId="9231" Comment="Linkified OP's pictures, added tag." Text="I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out as anything useful.&#xD;&#xA;&#xD;&#xA;I have tried a few different techniques like Perlin Noise and read about some others such as Midpoint Displacement, although I'm not sure what one would be best, or a combination of different techniques to generate different areas. (Such as Midpoint Displacement for the general shape of the terrain and Perlin Noise for the caves.)&#xD;&#xA;&#xD;&#xA;I have found an &lt;a href=&quot;http://accidentalnoise.sourceforge.net/minecraftworlds.html&quot;&gt;excellent explanation&lt;/a&gt; of how I could layer it up with the &lt;a href=&quot;http://accidentalnoise.sourceforge.net/index.html&quot;&gt;Accidental Noise Library&lt;/a&gt;, although it is in C++, and I do not know enough C++ to compile it into a DLL that I can use from C#. I have tried to copy this in C#, although, I do not know how I can merge two effects together (the gradient for the general base, and then the fractal for detail).&#xD;&#xA;&#xD;&#xA;Currently I am using a Plasma Fractal and the results are extremely varied. For example it can generate terrain where there is hardly any surface, or it can generate terrain where there is no surface at all.&#xD;&#xA;&#xD;&#xA;An example of an okay map, would be better with some more improvements, though. (Black is solid, white is air):&#xD;&#xA;&#xD;&#xA;![Good map][1]&#xD;&#xA;&#xD;&#xA;And an example of a terrible map. (Black is solid, white is air): &#xD;&#xA;&#xD;&#xA;![Terrible map][2]&#xD;&#xA;&#xD;&#xA;Basically, what I'm asking is, what would be a better way of generating the terrain, or forcing it to make sure that there is a reasonable amount of surface area, with the generation time as quick as possible. Or, alternatively, how I would be able to achieve the same result as the Accidental Noise Library, but in C#.&#xD;&#xA;&#xD;&#xA;Any examples would be very much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JsYe1.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/uHjyO.png" />
  <row Id="36415" PostHistoryTypeId="6" PostId="15912" RevisionGUID="99c575ff-c5b5-4aad-8255-db9320353add" CreationDate="2011-08-12T19:49:01.907" UserId="9231" Comment="Linkified OP's pictures, added tag." Text="&lt;xna&gt;&lt;2d&gt;&lt;procedural-generation&gt;&lt;terrain&gt;" />
  <row Id="36416" PostHistoryTypeId="5" PostId="15912" RevisionGUID="6831757c-e099-4823-aa5b-2720590da6b8" CreationDate="2011-08-12T19:49:05.540" UserId="1430" Comment="deleted 89 characters in body" Text="I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out as anything useful.&#xD;&#xA;&#xD;&#xA;I have tried a few different techniques like Perlin Noise and read about some others such as Midpoint Displacement, although I'm not sure what one would be best, or a combination of different techniques to generate different areas. (Such as Midpoint Displacement for the general shape of the terrain and Perlin Noise for the caves.)&#xD;&#xA;&#xD;&#xA;I have found an &lt;a href=&quot;http://accidentalnoise.sourceforge.net/minecraftworlds.html&quot;&gt;excellent explanation&lt;/a&gt; of how I could layer it up with the &lt;a href=&quot;http://accidentalnoise.sourceforge.net/index.html&quot;&gt;Accidental Noise Library&lt;/a&gt;, although it is in C++, and I do not know enough C++ to compile it into a DLL that I can use from C#. I have tried to copy this in C#, although, I do not know how I can merge two effects together (the gradient for the general base, and then the fractal for detail).&#xD;&#xA;&#xD;&#xA;Currently I am using a Plasma Fractal and the results are extremely varied. For example it can generate terrain where there is hardly any surface, or it can generate terrain where there is no surface at all.&#xD;&#xA;&#xD;&#xA;An example of an okay map, would be better with some more improvements, though. (Black is solid, white is air):&#xD;&#xA;&#xD;&#xA;![Good map][1]&#xD;&#xA;&#xD;&#xA;And an example of a terrible map. (Black is solid, white is air): &#xD;&#xA;&#xD;&#xA;![Terrible map][2]&#xD;&#xA;&#xD;&#xA;Basically, what I'm asking is, what would be a better way of generating the terrain, or forcing it to make sure that there is a reasonable amount of surface area, with the generation time as quick as possible. Or, alternatively, how I would be able to achieve the same result as the Accidental Noise Library, but in C#.&#xD;&#xA;&#xD;&#xA;Any examples would be very much appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/JsYe1.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/uHjyO.png" />
  <row Id="36417" PostHistoryTypeId="5" PostId="15911" RevisionGUID="fdf247fa-4ce4-42d6-bed2-1fe518234353" CreationDate="2011-08-12T20:02:41.560" UserId="9229" Comment="added more detail about the projectiles" Text="I'm trying to create projectiles which bounce/ricochet off one another when they collide in mid-air.&#xD;&#xA;&#xD;&#xA;All projectiles are spherical and have identical size, mass, and speed.  Each has two vectors: one representing its current location and the other its direction and speed.  (Vectors, here, basically being `&lt;x,y,z&gt;` tuples.)  The distance/direction between the two projectiles can easily be calculated as a fifth vector.&#xD;&#xA;&#xD;&#xA;In my head, I envision the ricochet as reflecting each projectile's velocity off of a plane perpendicular to the line between the two projectiles, but Googling for &quot;vector reflection&quot; and the like just gets me [pages](http://mathworld.wolfram.com/Reflection.html) full of [math](http://mathworld.wolfram.com/Reflection.html) I don't know how to translate into code.  :-)&#xD;&#xA;&#xD;&#xA;How can I model this collision?  I'm not worried about real-world factors like drag, friction, or gravity — simple reflection is enough.&#xD;&#xA;&#xD;&#xA;&lt;!-- language: java --&gt;&#xD;&#xA;&#xD;&#xA;    static void ricochet(Projectile projectile1, Projectile projectile2) {&#xD;&#xA;        Vector position1 = projectile1.position;&#xD;&#xA;        Vector position2 = projectile2.position;&#xD;&#xA;&#xD;&#xA;        Vector direction1 = projectile1.direction;&#xD;&#xA;        Vector direction2 = projectile2.direction;&#xD;&#xA;&#xD;&#xA;        Vector distance = new Vector(position1).subtract(position2);&#xD;&#xA;&#xD;&#xA;        Vector reflection1 = new Vector();&#xD;&#xA;        Vector reflection2 = new Vector();&#xD;&#xA;&#xD;&#xA;        // MAGIC!&#xD;&#xA;&#xD;&#xA;        projectile1.direction = reflection1;&#xD;&#xA;        projectile2.direction = reflection2;&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="36418" PostHistoryTypeId="2" PostId="15917" RevisionGUID="e5c8fad3-898a-4343-ab20-a59f6fddb193" CreationDate="2011-08-12T20:30:50.917" UserId="8781" Text="One thing that has always stuck out to me about the NES/SNES Mario games is that they give the player the opportunity to show off.&#xD;&#xA;&#xD;&#xA;This can be done by making some of the trickier sections optional. So the player *could* choose to wait for a moving platform to cross the gap, but it's more fun to nail a jump off three flying enemies and score some extra coins in the process. Or the player *could* wait for the piranha plant to retreat back into its pipe, but it's more fun to make the narrow leap over its head. Reward the players when they complete a tough section, but you don't have to penalize the ones who decide to take the easy route (unless you're going for the super hard twitch platformer style). Give players the chance to identify bonus areas, so they can tackle them later when they have more confidence in their skills.&#xD;&#xA;&#xD;&#xA;As for bosses, a lot of the bosses in &quot;simple&quot; platformer-style games are based around simply surviving their patterns until they reveals an opportunity to attack. Though there's nothing wrong with having the final challenge be jumping challenges rather than a boss enemy. If you decide to do that, I would suggest throwing in some kind of new mechanic to pressure the player, rather than just having a longer level." />
  <row Id="36419" PostHistoryTypeId="25" PostId="15815" RevisionGUID="1a8ef86d-e4d1-4a58-9861-3acc53eeb0bf" CreationDate="2011-08-12T20:36:59.283" Comment="http://twitter.com/#!/StackGameDev/status/102116390101729280" />
  <row Id="36420" PostHistoryTypeId="5" PostId="15901" RevisionGUID="55e91490-27d0-45d3-bc25-5e5aa9434f9f" CreationDate="2011-08-12T20:50:29.843" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Effects to make a speeding spaceship look faster](http://gamedev.stackexchange.com/questions/8535/effects-to-make-a-speeding-spaceship-look-faster)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I am currently developing a racing game akin to F-Zero in that the race is held at very fast speeds. The player is therefore placed in a 3rd person view.&#xD;&#xA;&#xD;&#xA;Graphically, I'm thinking of using motion blur and lowering the camera angle when the ship is going faster to give the player the impression of speed. This from the fact that the closer you are to the ground, the more you percieve speed.&#xD;&#xA;&#xD;&#xA;[This question](http://gamedev.stackexchange.com/questions/8535/effects-to-make-a-speeding-spaceship-look-faster) has intersting answers, but don't really apply because the effect needs to be progressive and constant, not like a boost effect.&#xD;&#xA;&#xD;&#xA;I was wondering if these techniques are viable, and if any other techniques exist?" />
  <row Id="36421" PostHistoryTypeId="10" PostId="15901" RevisionGUID="251d49bc-80fa-45bd-a225-d7a08897c859" CreationDate="2011-08-12T20:50:27.923" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:962,&quot;DisplayName&quot;:&quot;AttackingHobo&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36422" PostHistoryTypeId="2" PostId="15918" RevisionGUID="f6787069-ca68-4ac8-acce-a18977a22767" CreationDate="2011-08-12T20:50:45.833" UserId="3830" Text="From [The Big List of Game Design][1], here are several articles that discuss Mario level design in particular.  There's a wealth of information in them, as well as in the original article that lists them.&#xD;&#xA;&#xD;&#xA;[Super Mario Bros. 101][2]&#xD;&#xA;&#xD;&#xA;[Super Mario Bros 3 Level Design Lessons, Part 1][3]&#xD;&#xA;&#xD;&#xA;[Super Mario Bros 3 Level Design Lesson, Part 2][4]&#xD;&#xA;&#xD;&#xA;[level design lesson: to the right, hold on tight][5]&#xD;&#xA;&#xD;&#xA;A really important takeaway in several of these articles is how the level design teaches the player *how* to play the game.  You need to create a situation where they can first learn that they can jump, then learn that jumping on something can have an effect on it before you toss them into a level with monsters that can be jumped on.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pixelprospector.com/the-big-list-of-game-design/#&#xD;&#xA;  [2]: http://8bithorse.blogspot.com/2010/11/super-mario-bros-101.html&#xD;&#xA;  [3]: http://www.significant-bits.com/super-mario-bros-3-level-design-lessons&#xD;&#xA;  [4]: http://www.significant-bits.com/super-mario-bros-3-level-design-lessons-part-2&#xD;&#xA;  [5]: http://www.auntiepixelante.com/?p=465" />
  <row Id="36423" PostHistoryTypeId="2" PostId="15919" RevisionGUID="91a92863-2e2f-4387-8e7a-4a3ec9926f3e" CreationDate="2011-08-12T21:06:19.103" UserId="9244" Text="I realize this question is complex and subjective, but bear with me for a moment.&#xD;&#xA;&#xD;&#xA;I firmly believe that video-game software is essentially different from, for example spreadsheet software, as from a user point of view, some games have more similarities with film art than with regular software. However, when it comes to requirements prioritization methods that help developers sort out which feature or idea is most important, there is none that facilitate the **creative aspects** of video games. Most available techniques only help regular software development where focus is on the risk and cost of requirements, and do not take into account the creative aspect of a video-game requirements – the ideas that can make or break the game.&#xD;&#xA;&#xD;&#xA;To illustrate the problem, I ask you to think of a requirement (i.e. idea) such as the one seen in Super Paper Mario, where [Mario can exit the 3D world and enter a 2D world][1], and vice versa in order to go around obstacles. This is a fairly challenging requirement to implement and probably costly, but definitely crucial to the success of the game. Available prioritization methods will overlook the **creative/entertainment value** of this requirement and will just estimate how costly and (technologically) risky implementation is. When it comes to value calculation, academic research doesn't provide game developers with an adequate way to estimate the value of game requirements. Of course, this is a very simplistic example, but you can imagine a case where there is a pool of great game ideas (functional and non-functional requirements) and not enough resources to realize them all.&#xD;&#xA;&#xD;&#xA;In my research, I try to refine part of the preproduction process by developing a requirements prioritization method tailored to the needs of game development industry. A pivotal element in such a method is the ability to identify and estimate the creative/entertainment value of requirements. However, in order to do that, I need to understand how game developers perceive this creative/entertainment value of requirements. In a nutshell, **I am seeking answers to the following questions**:&#xD;&#xA;&#xD;&#xA;Question 1: **How would you define the creative/entertainment value of video-game requirements?**&#xD;&#xA;&#xD;&#xA;Question 2: **How would you measure it?**&#xD;&#xA;&#xD;&#xA;Question 3: **Who should measure it?**&#xD;&#xA;&#xD;&#xA;I would love to see how these issues are perceived by game developers and I would appreciate you take on them here, but if you want to contribute to this research – receiving my eternal gratitude and a proper credit/citation in the research and all the publications that will follow, please fill up my extremely short survey (just 7 questions, 3 of which you already see above):&#xD;&#xA;&#xD;&#xA;[The extremely short survey][2] which will cement you as my personal hero.&#xD;&#xA;&#xD;&#xA;Research information and trigger&#xD;&#xA;--------------------------------&#xD;&#xA;&#xD;&#xA;This research is being conducted at Utrecht University, The Netherlands, as part of an Information Science master’s thesis.&#xD;&#xA;&#xD;&#xA;Game development is in many ways similar to product software development as developers follow certain software development processes. Following a poor development method (or none at all) could result in longer development times, going over budget and/or delivering buggy products (Bethke, 2003). What makes video games different is the creative game vision that must be shared by the entire team to ensure that the end product is consistent and of good quality. This is especially true for full-blown game titles where from a user point of view, there are more similarities with film art than with any other software. Unfortunately, this curious creative aspect renders many software product management techniques unadoptable by the gaming industry.&#xD;&#xA;&#xD;&#xA;I am quite interested in working towards improving the game development process in the preproduction stage, by creating a requirements prioritization method tailored to the specific needs of the game industry and **I need your help!** The easiest way to contribute to the research is by filling up my short survey (link above). If find this research interesting, please contact me at a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;**Researcher information**&#xD;&#xA;&#xD;&#xA;My name is Alex Chervenkoff, an avid gamer and quite excited about this research! You can contact me at: a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;Degree in BSc Computer Science, The University of Sheffield, UK.&#xD;&#xA;&#xD;&#xA;Currently doing MSc Information Science at Utrecht University, The Netherlands.&#xD;&#xA;&#xD;&#xA;**Thank you!**&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/en/e/e5/SPM_3D.jpg&#xD;&#xA;  [2]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dFJfVUIwb2dKSkNWYnZfcTFnakZTcFE6MQ" />
  <row Id="36424" PostHistoryTypeId="1" PostId="15919" RevisionGUID="91a92863-2e2f-4387-8e7a-4a3ec9926f3e" CreationDate="2011-08-12T21:06:19.103" UserId="9244" Text="How can the &quot;creative value&quot; or the &quot;entertainment value&quot; of video-game requirements be measured?" />
  <row Id="36425" PostHistoryTypeId="3" PostId="15919" RevisionGUID="91a92863-2e2f-4387-8e7a-4a3ec9926f3e" CreationDate="2011-08-12T21:06:19.103" UserId="9244" Text="&lt;game-industry&gt;&lt;project-management&gt;&lt;methodology&gt;&lt;academic-research&gt;&lt;requirements&gt;" />
  <row Id="36426" PostHistoryTypeId="2" PostId="15920" RevisionGUID="75e12e1c-05b3-4d33-9904-4fe5c441c37e" CreationDate="2011-08-12T21:06:47.393" UserId="8275" Text="In aviation, runways are named according to their magnetic orientation seen from the pilot's perspective. For example: a strip of asphalt oriented along the east-west axis will be named `9` for the pilot coming from west (east is at 90° from North) and `27` for a pilot coming from east (west is 270° from North).&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;When several runways have the same orientation, the naming convention uses letters L/C/R for distinguishing between the Left/Centre/Right ones (look at the `22` runways in the capture above).&#xD;&#xA;&#xD;&#xA;In the game I'm coding, I chose to describe runways by the following three attributes:&#xD;&#xA;&#xD;&#xA; - **Orientation** (between 0° and 180°).&#xD;&#xA; - **Position of their geometrical centre** relative to the aeroport one.&#xD;&#xA; - **Length**&#xD;&#xA;&#xD;&#xA;With this data I'm able to generate all the touchdown points and give them the correct *number*, but I can't find a straightforward method to assign the correct *letter*, as **I could not think to a straightforward way to mathematically determine which one is &quot;left/centre/right&quot;** from a &quot;landing pilot's perspective&quot;.&#xD;&#xA;&#xD;&#xA;So the question is:&#xD;&#xA;&#xD;&#xA;&gt; **Is there a simple, straightforward vector formula that - given two&#xD;&#xA;&gt; parallel vectors pointing in the same direction - will return the&#xD;&#xA;&gt; leftmost (or rightmost) one?**&#xD;&#xA;&#xD;&#xA;Please note that **this question is really about the *straightforwardness* of the formula**, as I already found a *non-straightforward* way to get the result, but I would like to find a more elegant way to solve the problem.&#xD;&#xA;&#xD;&#xA;Many thanks in advance for your expertise and contributions!&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/QrjmI.png" />
  <row Id="36427" PostHistoryTypeId="1" PostId="15920" RevisionGUID="75e12e1c-05b3-4d33-9904-4fe5c441c37e" CreationDate="2011-08-12T21:06:47.393" UserId="8275" Text="Vector problem: which one is the left / centre / right one?" />
  <row Id="36428" PostHistoryTypeId="3" PostId="15920" RevisionGUID="75e12e1c-05b3-4d33-9904-4fe5c441c37e" CreationDate="2011-08-12T21:06:47.393" UserId="8275" Text="&lt;vector&gt;&lt;language-agnostic&gt;&lt;formula&gt;" />
  <row Id="36429" PostHistoryTypeId="5" PostId="15919" RevisionGUID="8d59615f-1fe6-404e-9742-56ed0e36bb7b" CreationDate="2011-08-12T21:11:36.323" UserId="9244" Comment="deleted 2 characters in body" Text="I realize this question is complex and subjective, but bear with me for a moment.&#xD;&#xA;&#xD;&#xA;I firmly believe that video-game software is essentially different from, for example spreadsheet software, as from a user point of view, some games have more similarities with film art than with regular software. However, when it comes to requirements prioritization methods that help developers sort out which feature or idea is most important, there is none that facilitate the **creative aspects** of video games. Most available techniques only aid regular software development where focus is on the risk and cost of requirements, and do not take into account the creative aspect of video-game requirements.&#xD;&#xA;&#xD;&#xA;To illustrate the problem, I ask you to think of a requirement (i.e. idea) such as the one seen in Super Paper Mario, where [Mario can exit the 3D world and enter a 2D world][1], and vice versa in order to go around obstacles. This is a fairly challenging requirement to implement and probably costly, but definitely crucial to the success of the game. Available prioritization methods will overlook the **creative/entertainment value** of this requirement and will just estimate how costly and (technologically) risky implementation is. Of course, this is a very simplistic example, but you can imagine a case where there is a pool of great game ideas (functional and non-functional requirements) and not enough resources to realize them all. When it comes to value calculation, academic research doesn't provide game developers with an adequate way to estimate the value of game requirements.&#xD;&#xA;&#xD;&#xA;In my research, I try to refine part of the preproduction process by developing a requirements prioritization method tailored to the needs of game development industry. A pivotal element in such a method is the ability to identify and estimate the creative/entertainment value of requirements. However, in order to do that, I need to understand how game developers perceive this creative/entertainment value of requirements. In a nutshell, **I am seeking answers to the following questions**:&#xD;&#xA;&#xD;&#xA;Question 1: **How would you define the creative/entertainment value of video-game requirements?**&#xD;&#xA;&#xD;&#xA;Question 2: **How would you measure it?**&#xD;&#xA;&#xD;&#xA;Question 3: **Who should measure it?**&#xD;&#xA;&#xD;&#xA;I would love to see how these issues are perceived by game developers and I would appreciate you take on them here, but if you want to contribute to this research – receiving my eternal gratitude and a proper credit/citation in the research and all the publications that will follow, please fill up my extremely short survey (just 7 questions, 3 of which you already see above):&#xD;&#xA;&#xD;&#xA;[The extremely short survey][2] which will cement you as my personal hero.&#xD;&#xA;&#xD;&#xA;Research information and trigger&#xD;&#xA;--------------------------------&#xD;&#xA;&#xD;&#xA;This research is being conducted at Utrecht University, The Netherlands, as part of an Information Science master’s thesis.&#xD;&#xA;&#xD;&#xA;Game development is in many ways similar to product software development as developers follow certain software development processes. Following a poor development method (or none at all) could result in longer development times, going over budget and/or delivering buggy products (Bethke, 2003). What makes video games different is the creative game vision that must be shared by the entire team to ensure that the end product is consistent and of good quality. This is especially true for full-blown game titles where from a user point of view, there are more similarities with film art than with any other software. Unfortunately, this curious creative aspect renders many software product management techniques unadoptable by the gaming industry.&#xD;&#xA;&#xD;&#xA;I am quite interested in working towards improving the game development process in the preproduction stage, by creating a requirements prioritization method tailored to the specific needs of the game industry and **I need your help!** The easiest way to contribute to the research is by filling up my short survey (link above). If find this research interesting, please contact me at a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;**Researcher information**&#xD;&#xA;&#xD;&#xA;My name is Alex Chervenkoff, an avid gamer and quite excited about this research! You can contact me at: a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;Degree in BSc Computer Science, The University of Sheffield, UK.&#xD;&#xA;&#xD;&#xA;Currently doing MSc Information Science at Utrecht University, The Netherlands.&#xD;&#xA;&#xD;&#xA;**Thank you!**&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/en/e/e5/SPM_3D.jpg&#xD;&#xA;  [2]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dFJfVUIwb2dKSkNWYnZfcTFnakZTcFE6MQ" />
  <row Id="36430" PostHistoryTypeId="4" PostId="15919" RevisionGUID="8d59615f-1fe6-404e-9742-56ed0e36bb7b" CreationDate="2011-08-12T21:11:36.323" UserId="9244" Comment="deleted 2 characters in body" Text="How can I measure the &quot;creative value&quot; or the &quot;entertainment value&quot; of video-game requirements?" />
  <row Id="36431" PostHistoryTypeId="6" PostId="15919" RevisionGUID="97ecbc92-71d9-41b8-a392-3336a7d68bc5" CreationDate="2011-08-12T21:19:46.963" UserId="9244" Comment="edited tags" Text="&lt;tools&gt;&lt;game-industry&gt;&lt;methodology&gt;&lt;academic-research&gt;&lt;requirements&gt;" />
  <row Id="36432" PostHistoryTypeId="2" PostId="15921" RevisionGUID="d0503221-b11b-4236-a56c-0196a4dd0dae" CreationDate="2011-08-12T21:38:28.197" UserId="4546" Text="Compute a vector perpendicular to the runways that share an orientation, in such a fashion that it always points in a particular direction (right, for example) as seen from the runway's perspective. As you have the orientation, such a vector can be computed by rotating an unit vector like &lt;0, 1&gt; by the angle+90 to get a vector that points &quot;rightward&quot;.&#xD;&#xA;&#xD;&#xA;Then you can project the runway centers onto this right-vector, which will result in a scalar that denotes how far along the right-vector they are, which is what you want to order by to get them in local left-to-right.&#xD;&#xA;&#xD;&#xA;An alternative and mathematically equivalent method is to rotate the center points by -angle and project them onto the X axis, ordering them by their position there." />
  <row Id="36433" PostHistoryTypeId="16" PostId="15881" RevisionGUID="a273f828-28b1-415a-9b09-1249299b4e0b" CreationDate="2011-08-12T21:42:16.360" UserId="51" />
  <row Id="36434" PostHistoryTypeId="16" PostId="15900" RevisionGUID="cba08c19-7b36-49e7-8a31-57cc7d425bac" CreationDate="2011-08-12T21:42:16.360" UserId="51" />
  <row Id="36435" PostHistoryTypeId="2" PostId="15922" RevisionGUID="97c4e381-bfb8-41e8-a7c8-0723b8068257" CreationDate="2011-08-12T21:45:53.307" UserId="3505" Text="Of course there is. Compute the determinant of the orientation vector of the runways and the vector from one runway centre to another, the result will be positive or negative depending on which runway are to the right of the other.&#xD;&#xA;&#xD;&#xA;    Det(A,B) = Ax*By - Ay*Bx" />
  <row Id="36436" PostHistoryTypeId="5" PostId="15917" RevisionGUID="35373b8e-840b-4ca7-ad2b-d1369e48bd4c" CreationDate="2011-08-12T22:22:35.863" UserId="8781" Comment="deleted 1 characters in body" Text="One thing that has always stuck out to me about the NES/SNES Mario games is that they give the player the opportunity to show off.&#xD;&#xA;&#xD;&#xA;This can be done by making some of the trickier sections optional. So the player *could* choose to wait for a moving platform to cross the gap, but it's more fun to nail a jump off three flying enemies and score some extra coins in the process. Or the player *could* wait for the piranha plant to retreat back into its pipe, but it's more fun to make the narrow leap over its head. Reward the players when they complete a tough section, but you don't have to penalize the ones who decide to take the easy route (unless you're going for the super hard twitch platformer style). Give players the chance to identify bonus areas, so they can tackle them later when they have more confidence in their skills.&#xD;&#xA;&#xD;&#xA;As for bosses, a lot of the bosses in &quot;simple&quot; platformer-style games are based around simply surviving their patterns until they reveal an opportunity to attack. Though there's nothing wrong with having the final challenge be jumping challenges rather than a boss enemy. If you decide to do that, I would suggest throwing in some kind of new mechanic to pressure the player, rather than just having a longer level." />
  <row Id="36437" PostHistoryTypeId="25" PostId="15905" RevisionGUID="e7093934-84bd-4948-a124-bd704f3b9cf0" CreationDate="2011-08-12T22:37:00.533" Comment="http://twitter.com/#!/StackGameDev/status/102146592949284864" />
  <row Id="36438" PostHistoryTypeId="5" PostId="15915" RevisionGUID="2afeed4d-6363-4e58-96ac-31fe9ef5cb3f" CreationDate="2011-08-12T22:39:04.393" UserId="8973" Comment="Added flash example and image" Text="Reflection is unnecessarily complex, the problem is much simpler than that.&#xD;&#xA;&#xD;&#xA;Consider two projectiles (A and B), where A is moving and B is stationery. At the point of collision all the force in A will be passed onto B, resulting in A coming to a complete stop, and B shooting off at the speed that A was travelling at when it hit. That's exactly how a [newtons cradle][1] works.&#xD;&#xA;&#xD;&#xA;What actually happens is that A's velocity is added to B. [We know that every action has an equal and opposite reaction][2], so the same velocity is subtracted from A. The result is A's velocity vector is transferred to B, and vice-versa. &#xD;&#xA;&#xD;&#xA;Now consider if A and B are flying directly towards each other.  At the point of collision we add A's velocity to B, and subtract the same value from A. We apply the same calculation to B since it is also moving. The code would look something like this:&#xD;&#xA;&#xD;&#xA;    Vector newVelocityA = velocityA.add(velocityB).subtract(velocityA);&#xD;&#xA;    Vector newVelocityB = velocityB.add(velocityA).subtract(velocityB);&#xD;&#xA;&#xD;&#xA;This can be simplified by removing the unnecessary arithmetic:&#xD;&#xA;&#xD;&#xA;    Vector newVelocityA = velocityB;&#xD;&#xA;    Vector newVelocityB = velocityA;&#xD;&#xA;&#xD;&#xA;As you can see it basically boils down to swapping the vectors of the two particles. &#xD;&#xA;&#xD;&#xA;The reason why such a simple system works is that we're assuming perfect elastic collision and projectiles with identical masses. In a more complex system with different masses you would need to base the calculations on the force rather than the velocity, but is based on the same principles.&#xD;&#xA;&#xD;&#xA;**Update:**&#xD;&#xA;&#xD;&#xA;[Here's an example in Flash][3] which I put together to illustrate the concept.&#xD;&#xA;&#xD;&#xA;![Collision example][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Newton%27s_cradle&#xD;&#xA;  [2]: http://csep10.phys.utk.edu/astr161/lect/history/newton3laws.html&#xD;&#xA;  [3]: http://wonderfl.net/c/jeF1&#xD;&#xA;  [4]: http://i.stack.imgur.com/scFjD.png" />
  <row Id="36439" PostHistoryTypeId="2" PostId="15923" RevisionGUID="0c46b8ff-e15c-4871-ac22-e07891949bf3" CreationDate="2011-08-12T22:44:03.783" UserId="3184" Text="Currently I'm investing in games development, iOS particularly. I'm reading a book and visiting this site regularly :)  &#xD;&#xA;&#xD;&#xA;But one question came to my mind: if you are a solo developer creating a game, what do you do for the graphics and art part?  &#xD;&#xA;&#xD;&#xA;Should I work with graphics artist to draw the characters and the environment? I don't know how to draw any way.  &#xD;&#xA;&#xD;&#xA;(Sorry if it is an obvious question but I'm really new to games development universe). " />
  <row Id="36440" PostHistoryTypeId="1" PostId="15923" RevisionGUID="0c46b8ff-e15c-4871-ac22-e07891949bf3" CreationDate="2011-08-12T22:44:03.783" UserId="3184" Text="If you are a solo developer, how do you manage the graphics artistry part?" />
  <row Id="36441" PostHistoryTypeId="3" PostId="15923" RevisionGUID="0c46b8ff-e15c-4871-ac22-e07891949bf3" CreationDate="2011-08-12T22:44:03.783" UserId="3184" Text="&lt;graphics&gt;&lt;art&gt;&lt;ios&gt;" />
  <row Id="36442" PostHistoryTypeId="5" PostId="15922" RevisionGUID="0a34a08d-b7b2-4660-9bdc-d76b713ffd0b" CreationDate="2011-08-12T23:12:58.327" UserId="3505" Comment="added 183 characters in body" Text="Of course there is. Compute the determinant of the orientation vector of the runways and the vector from one runway centre to another, the result will be positive or negative depending on which runway are to the right of the other.&#xD;&#xA;&#xD;&#xA;Calculation of determinant for a pair of 2D vectors:&#xD;&#xA;&#xD;&#xA;    Det(A,B) = Ax*By - Ay*Bx&#xD;&#xA;&#xD;&#xA;There is a load of other stuff one can learn about the use of determinants, but for this purpose it's all you need to know." />
  <row Id="36443" PostHistoryTypeId="2" PostId="15924" RevisionGUID="e75a1930-8d62-4045-8034-f57af1262b95" CreationDate="2011-08-12T23:21:03.077" UserId="5251" Text="I just finished porting my Space Strategy game from Silverlight/C# to pure HTML5/Javascript/Canvas:&#xD;&#xA;&#xD;&#xA;[Astriarch - Ruler of the Stars][1]&#xD;&#xA;&#xD;&#xA;It is a 2D game and graphically very simple, so it lends itself nicely to using the canvas because there isn't lots of painting going on.  That being said, I'm impressed with what some of the other, more animated games are doing out there with the same technology.  Like angry birds at the chrome web store: [Angry Birds][2], you might also want to check out some of the other games in the Chrome Web store for more examples.&#xD;&#xA;&#xD;&#xA;One reason I ported my game was I wanted it to be able to run on tablet/mobile devices without having to re-code the whole thing in Java or Objective C. iOS and Android both have 'WebView' controls to make this easier, but I've had trouble in the little bit of tinkering around I've done with it (iOS requires all your assets to be in one folder as far as I've seen).  &#xD;&#xA;&#xD;&#xA;This type of cross-platform requirement is a good reason why some people are moving away from Flash and towards HTML5, but the downside is that you have to test on N different browsers and versions and have all the headaches associated with typical web development.  These problems are alleviated by libraries like jQuery and some of the other HTML5 game libraries/platforms mentioned here ([ImpactJS][3] is one I've seen but haven't tried).&#xD;&#xA;Also these problems will not be as much of an issue when FireFox 7 is out and IE 9+ becomes more pervasive.&#xD;&#xA;&#xD;&#xA;If you are interested in some of the problems I faced porting from Silverlight to HTML5 Canvas you should check out my blog post here:[Porting Silverlight App to javascript using HTML5 Canvas tag ][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.astriarch.com/ &quot;Astriarch - Ruler of the Stars&quot;&#xD;&#xA;  [2]: https://chrome.google.com/webstore/detail/aknpkdffaafgjchaibgeefbgmgeghloj?hl=en-US&amp;hc=hp-pr&amp;hcp=pr1-1&#xD;&#xA;  [3]: http://impactjs.com/&#xD;&#xA;  [4]: http://computercabal.blogspot.com/2011/02/porting-silverlight-app-to-javascript.html" />
  <row Id="36444" PostHistoryTypeId="16" PostId="15924" RevisionGUID="0d27d598-8333-4e28-818f-16e98ecd370a" CreationDate="2011-08-12T23:21:03.077" UserId="5251" />
  <row Id="36445" PostHistoryTypeId="16" PostId="15892" RevisionGUID="4dd5b144-30eb-463e-9f08-e50117fc6643" CreationDate="2011-08-12T23:25:43.287" UserId="51" />
  <row Id="36446" PostHistoryTypeId="16" PostId="15896" RevisionGUID="cd0c978d-8d84-423f-9672-a19e63031f72" CreationDate="2011-08-12T23:25:43.287" UserId="51" />
  <row Id="36447" PostHistoryTypeId="16" PostId="15898" RevisionGUID="eb99c6e1-0288-475c-9115-41252e3d8851" CreationDate="2011-08-12T23:25:43.287" UserId="51" />
  <row Id="36448" PostHistoryTypeId="16" PostId="15917" RevisionGUID="07dca3a2-4058-4123-8ba7-c265119d80e5" CreationDate="2011-08-12T23:25:43.287" UserId="51" />
  <row Id="36449" PostHistoryTypeId="16" PostId="15918" RevisionGUID="c92fc2a6-fe67-4fef-9fdb-c8cf0556238a" CreationDate="2011-08-12T23:25:43.287" UserId="51" />
  <row Id="36450" PostHistoryTypeId="2" PostId="15925" RevisionGUID="c7403808-3136-40ae-9485-6d40ef65849c" CreationDate="2011-08-12T23:38:45.643" UserId="8973" Text="Here's some [code from Gamasutra][1] which calculate the velocity vector of two colliding circles (edited to exclude mass):&#xD;&#xA;&#xD;&#xA;    // First, find the normalized vector n from the center of &#xD;&#xA;    // circle1 to the center of circle2&#xD;&#xA;    Vector n = circle1.center - circle2.center;&#xD;&#xA;    n.normalize();&#xD;&#xA;    // Find the length of the component of each of the movement&#xD;&#xA;    // vectors along n. &#xD;&#xA;    // a1 = v1 . n&#xD;&#xA;    // a2 = v2 . n&#xD;&#xA;    float a1 = v1.dot(n);&#xD;&#xA;    float a2 = v2.dot(n);&#xD;&#xA;    &#xD;&#xA;    // Using the optimized version, &#xD;&#xA;    // optimizedP =  2(a1 - a2)&#xD;&#xA;    float optimizedP = (2.0 * (a1 - a2));&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v1' = v1 - optimizedP * n&#xD;&#xA;    Vector v1' = v1 - optimizedP * 1 * n;&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v2' = v2 + optimizedP * n&#xD;&#xA;    Vector v2' = v2 + optimizedP * 1 * n;&#xD;&#xA;    &#xD;&#xA;    circle1.setMovementVector(v1');&#xD;&#xA;    circle2.setMovementVector(v2');&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php?page=3" />
  <row Id="36454" PostHistoryTypeId="5" PostId="15925" RevisionGUID="f549f4ee-bea3-4037-89d0-ceb5f5351918" CreationDate="2011-08-12T23:54:28.177" UserId="8973" Comment="Corrected code" Text="Here's some [code from Gamasutra][1] which calculate the velocity vector of two colliding circles (edited to exclude mass):&#xD;&#xA;&#xD;&#xA;    // First, find the normalized vector n from the center of &#xD;&#xA;    // circle1 to the center of circle2&#xD;&#xA;    Vector n = circle1.center - circle2.center;&#xD;&#xA;    n.normalize();&#xD;&#xA;    // Find the length of the component of each of the movement&#xD;&#xA;    // vectors along n. &#xD;&#xA;    // a1 = v1 . n&#xD;&#xA;    // a2 = v2 . n&#xD;&#xA;    float a1 = v1.dot(n);&#xD;&#xA;    float a2 = v2.dot(n);&#xD;&#xA;    &#xD;&#xA;    // Using the optimized version, &#xD;&#xA;    // optimizedP =  2(a1 - a2)&#xD;&#xA;    float optimizedP = (2.0 * (a1 - a2));&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v1' = v1 - optimizedP * n&#xD;&#xA;    Vector v1' = v1 - optimizedP *  n;&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v2' = v2 + optimizedP * n&#xD;&#xA;    Vector v2' = v2 + optimizedP * n;&#xD;&#xA;    &#xD;&#xA;    circle1.setMovementVector(v1');&#xD;&#xA;    circle2.setMovementVector(v2');&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php?page=3" />
  <row Id="36455" PostHistoryTypeId="25" PostId="15912" RevisionGUID="f09b4bda-85fd-4d1b-97ff-8e3aaacf666b" CreationDate="2011-08-13T00:37:02.120" Comment="http://twitter.com/#!/StackGameDev/status/102176798481199105" />
  <row Id="36456" PostHistoryTypeId="2" PostId="15927" RevisionGUID="95721c3e-eb30-41c1-a8bb-c32790eb7ae4" CreationDate="2011-08-13T01:18:54.850" UserId="8155" Text="You can check out Adobe AIR, which lets you write-once-run-anywhere in Flash and Actionscript for platforms like desktop, iOS and Android. It requires a bit more optimisation skill to optimise for mobile platforms, but once that's done deploying to either iOS or Android shouldn't be a problem.&#xD;&#xA;&#xD;&#xA;See http://corlan.org/2011/07/18/using-adobe-air-to-reach-multiple-devices-conqu/ for an example of reaching multiple platforms using 1 code base." />
  <row Id="36457" PostHistoryTypeId="16" PostId="15927" RevisionGUID="271c6216-71ce-4942-a895-2b9ae4664ab7" CreationDate="2011-08-13T01:18:54.850" UserId="8155" />
  <row Id="36458" PostHistoryTypeId="5" PostId="779" RevisionGUID="71b608b1-ec79-407d-8019-fafd80265ac2" CreationDate="2011-08-13T02:21:46.367" UserId="9190" Comment="corrected grammar in two instances." Text="One tip I've heard is to **build as much of the game as possible before looking for artists**. Build the game with placeholder art before you post about the game so that artists can get a feel for the game, its play style and environment, etc before building assets for it. They can also use the prototype to decide if it's a project they'd actually like to work on.&#xD;&#xA;&#xD;&#xA;Another tip I've heard is to avoid asking for people to &quot;join your team&quot; as this seems &quot;noobish&quot;. Instead post the prototype and say that you need an artist or artists to finish it. If you post at the right communities someone will almost always come along that is interested.&#xD;&#xA;&#xD;&#xA;You can, of course, pay an artist per asset, etc from a more &quot;professional&quot; site. This is really a personal choice. Modelers, musicians, voice actors, etc can all be hired from sites that can be found with some quick googling. However keep in mind that you should still provide these people with as much of a game as possible so they can create something that &quot;fits&quot;. You can also easily determine if a model will deform properly, light well, etc before accepting the asset if you have build as much of the game as possible beforehand.&#xD;&#xA;&#xD;&#xA;One final note, if you are building any artist tools: be sure to have them rock solid and well documented before sending them to an artist, or you will waste time and money sending them revised versions of the tool or having them rebuild assets." />
  <row Id="36459" PostHistoryTypeId="24" PostId="779" RevisionGUID="71b608b1-ec79-407d-8019-fafd80265ac2" CreationDate="2011-08-13T02:21:46.367" Comment="Proposed by 9190 approved by 1430 edit id of 637" />
  <row Id="36460" PostHistoryTypeId="25" PostId="15913" RevisionGUID="722592bf-adea-448d-a547-5666d73eb5a7" CreationDate="2011-08-13T02:37:02.113" Comment="http://twitter.com/#!/StackGameDev/status/102206998124302339" />
  <row Id="36462" PostHistoryTypeId="2" PostId="15928" RevisionGUID="faf027d2-beda-47d4-b8bf-06837b4343e1" CreationDate="2011-08-13T03:38:38.993" UserId="9239" Text="If your mostly looking to create a website/web app definitely check out PhoneGap here [PhoneGap][1]it has a huge assortment of supported features on each device and that with the combination of JQueryMobile [JqueryMobile][2] you can build some serious cross platform apps. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.phonegap.com/&#xD;&#xA;  [2]: http://jquerymobile.com/" />
  <row Id="36463" PostHistoryTypeId="16" PostId="15928" RevisionGUID="23122269-33c7-4790-83b4-164561fa12c6" CreationDate="2011-08-13T03:38:38.993" UserId="9239" />
  <row Id="36464" PostHistoryTypeId="25" PostId="4604" RevisionGUID="9831c2ca-5795-4783-9cac-a6e5a8977635" CreationDate="2011-08-13T04:37:02.680" Comment="http://twitter.com/#!/StackGameDev/status/102237201450016768" />
  <row Id="36465" PostHistoryTypeId="5" PostId="15882" RevisionGUID="756752cb-ab32-4994-a736-80e14d7dcd58" CreationDate="2011-08-13T04:49:58.137" UserId="3644" Comment="edited body" Text="Let's take some old popular at a time but abandoned game: WorldRacing/HiOctane/Constructor/any other. Say I with a team want to revitalize said game and bring it to year 2011 without major changes and then work on improving it (e.g. add multiplayer). Also it is important to keep the games spirit, assets, story, music, so basically game remains the same, but gets better (e.g. adapting DOS game to Win7).&#xD;&#xA;&#xD;&#xA;My questions are from &quot;How is it usually made?&quot; area:&#xD;&#xA;&#xD;&#xA; - How do I purchase rights to the title and games assets (graphics, sounds, music, storyline). Whom to contact and what purchase options are possible? Is it possible to obtain source codes, design documents.&#xD;&#xA; - How to deal with various platforms, is it terms of contract saying which platforms are allowed to be used if there are several?&#xD;&#xA; - How to deal with localizations in other languages, are they to obtain from other companies or do they belong to master publisher?&#xD;&#xA; - What could be the reasonable price for said games in example?&#xD;&#xA; - Is it possible to pursue owners to release the game as open-source?&#xD;&#xA;&#xD;&#xA;Remember Heroes of Might&amp;Magic was owned by New World Computing, but later changed it's owner to Nival. I'm interested in that sort of process." />
  <row Id="36466" PostHistoryTypeId="2" PostId="15929" RevisionGUID="0318eec4-2cf7-49d7-9ac3-f9579b3ecd63" CreationDate="2011-08-13T05:01:57.233" UserId="159" Text="Given the image below, I need to detect the most optimal sequence on the board (the green line). The blue/red lines represent possible, but not the best moves.&#xD;&#xA;&#xD;&#xA;Here are the rules:&#xD;&#xA;&#xD;&#xA; 1. You can move to any tile that is the same, and is your neighbor (diagonal is valid)&#xD;&#xA; 2. Once you have visited a tile, you can't visit it again.&#xD;&#xA;&#xD;&#xA;I have thought about looping through each node, and looking at its neighbors, then recursively going through. Once I find a possible move I can put it into a structure. Once all possible moves are found I just pick the move with the highest count of node. It becomes more difficult when a node has more than one neighbor that matches.&#xD;&#xA;&#xD;&#xA;So, is there some algorithm that I can use? I was thinking some sort of flood fill, but that doesn't meet rules #2.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Wz8Lw.png" />
  <row Id="36467" PostHistoryTypeId="1" PostId="15929" RevisionGUID="0318eec4-2cf7-49d7-9ac3-f9579b3ecd63" CreationDate="2011-08-13T05:01:57.233" UserId="159" Text="Detecting a sequence of nodes in a grid" />
  <row Id="36468" PostHistoryTypeId="3" PostId="15929" RevisionGUID="0318eec4-2cf7-49d7-9ac3-f9579b3ecd63" CreationDate="2011-08-13T05:01:57.233" UserId="159" Text="&lt;algorithm&gt;" />
  <row Id="36469" PostHistoryTypeId="2" PostId="15930" RevisionGUID="7f7dfbdb-580d-4670-8105-936a388c0a62" CreationDate="2011-08-13T05:12:29.457" UserId="1430" Text="You basically have three options:&#xD;&#xA;&#xD;&#xA;1. You can outsource it -- Tetrad's links in his comment provide a great starting point for outsourcing -- either in terms of hiring somebody to produce the art for you, or gathering it from art repositories that make their contents available for free and/or under a permissive license.&#xD;&#xA;&#xD;&#xA;1. You can learn to produce it yourself. This could mean learning to model or draw yourself -- there's a lot of information out there on learning to use 3D modelling programs (for example if you use the freely-available [Blender][1], you can [check this out][2]). It could also mean learning to draw -- this *is* a learnable skill to an extent. I took a drawing class in college (we used [this book][3]) and I was surprised how much I improved. It will take a lot of practice, of course.&#xD;&#xA;&#xD;&#xA;1. You can design your game such that it requires very little in the way of &quot;real art.&quot; Simple or primitive graphics, perhaps built procedurally, can look good in the right contexts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.blender.org/&#xD;&#xA;  [2]: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro&#xD;&#xA;  [3]: http://www.drawright.com/" />
  <row Id="36471" PostHistoryTypeId="25" PostId="521" RevisionGUID="555b0255-16d6-449f-af82-f008f676fe52" CreationDate="2011-08-13T06:37:02.657" Comment="http://twitter.com/#!/StackGameDev/status/102267400162000896" />
  <row Id="36472" PostHistoryTypeId="2" PostId="15931" RevisionGUID="faa827e1-7652-48ed-adb2-802535c3a079" CreationDate="2011-08-13T07:28:57.623" UserId="6618" Text="If your game is a commercial project, or you plan on going the commercial route in the future, one test tool you might want to research is heat mapping.  The following link talks about it, and www.gdmag.com had an article on it in their Sept 2010 issue (with a download of python code).  The article was by Chris Pruett, entitled &quot;Hot Failure&quot;. His resources were Goerg Zoeller's BioWare telemetry talk (http://gdc.gulbsoft.org/talk) , Replica Island player metric snapshot (http://replicaisland.net/index.php?view=en/player_metrics.php) and the use of ImageMagick (www.imagemagick.org).&#xD;&#xA;&#xD;&#xA;http://lucasartsworkshop.wordpress.com/2009/10/09/telemetry-data-heat-maps-and-unlearning-what-you-have-learned/&#xD;&#xA;&#xD;&#xA;You basically run your game with the heat map system collecting data and prioritizing by color. One test would be player lives lost, the map would show literally, problematic &quot;hot spots&quot; where an enemy battle was more difficult that others, or where you require a difficult move or jump to move further through the level.  If your game is for personal or non-commercial use, heat-mapping would be considered over-kill.    " />
  <row Id="36473" PostHistoryTypeId="16" PostId="15931" RevisionGUID="a02dc3b3-6bbb-435b-851e-e202d77a673f" CreationDate="2011-08-13T07:28:57.623" UserId="6618" />
  <row Id="36474" PostHistoryTypeId="2" PostId="15932" RevisionGUID="672c8dcd-b8a5-4482-b9a6-806d4cc6c6b8" CreationDate="2011-08-13T08:07:51.173" UserId="6618" Text="Josh raises some good points, with Blender the latest version is 2.5x and it has a built in game engine, you can use for prototyping.  If you use 3d models, it lets you import pictures as a background, and set the transparency. Using pictures, you can literally trace your 3D model.&#xD;&#xA;&#xD;&#xA;- Just remember, when building a game, the more you can do yourself, the less dependent you are on others to get &quot;their work&quot; done.&#xD;&#xA;&#xD;&#xA;There are considerable resources that are &quot;open source&quot;, here is a link. It covers sprites, sounds, tiles, etc.  Pick your search engine and type, &quot;open source game art&quot;.&#xD;&#xA;&#xD;&#xA;http://letsmakegames.org/resources/art-assets-for-game-developers/ " />
  <row Id="36475" PostHistoryTypeId="25" PostId="15929" RevisionGUID="eab46f5e-92f0-467b-84cf-e8e6d724e4b0" CreationDate="2011-08-13T08:37:03.803" Comment="http://twitter.com/#!/StackGameDev/status/102297602854359040" />
  <row Id="36476" PostHistoryTypeId="2" PostId="15933" RevisionGUID="c30e9e7e-a481-4989-bb23-602f6f837c01" CreationDate="2011-08-13T08:56:38.883" UserId="4432" Text="I want to rotate the canvas circularly on its center axis based on user touch.&#xD;&#xA;&#xD;&#xA;Like a old phone dialer .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have tried like as follows&#xD;&#xA;&#xD;&#xA;    onDraw(Canvas canvas){&#xD;&#xA;      canvas.save();&#xD;&#xA;      // do my rotation&#xD;&#xA;      canvas.rotate(rotation,0,0);&#xD;&#xA;      canvas.drawBitmap( ((BitmapDrawable)d).getBitmap(),0,0,p );&#xD;&#xA;      canvas.restore();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    @Override&#xD;&#xA;    	    public boolean onTouchEvent(MotionEvent e) {&#xD;&#xA;                      float x = e.getX();&#xD;&#xA;    	          float y = e.getY();&#xD;&#xA;    	          updateRotation(x,y);&#xD;&#xA;    	          mPreviousX = x;&#xD;&#xA;    	          mPreviousY = y;&#xD;&#xA;                invalidate();&#xD;&#xA;    	    }&#xD;&#xA;    &#xD;&#xA;      private void updateRotation(float x, float y) {&#xD;&#xA;    		&#xD;&#xA;    		  double r = Math.atan2(x - centerX, centerY - y);&#xD;&#xA;    		    rotation = (int) Math.toDegrees(r);&#xD;&#xA;    		}" />
  <row Id="36477" PostHistoryTypeId="1" PostId="15933" RevisionGUID="c30e9e7e-a481-4989-bb23-602f6f837c01" CreationDate="2011-08-13T08:56:38.883" UserId="4432" Text="Rotate canvas along its center based on user touch - Android" />
  <row Id="36478" PostHistoryTypeId="3" PostId="15933" RevisionGUID="c30e9e7e-a481-4989-bb23-602f6f837c01" CreationDate="2011-08-13T08:56:38.883" UserId="4432" Text="&lt;android&gt;&lt;rotation&gt;&lt;canvas&gt;" />
  <row Id="36480" PostHistoryTypeId="5" PostId="15925" RevisionGUID="6d6cdd25-8e6b-4a8b-957d-9247cc03d6b2" CreationDate="2011-08-13T09:28:19.663" UserId="8973" Comment="Corrected code" Text="Here's some [code from Gamasutra][1] which calculate the velocity vector of two colliding circles (edited to exclude mass):&#xD;&#xA;&#xD;&#xA;    // First, find the normalized vector n from the center of &#xD;&#xA;    // circle1 to the center of circle2&#xD;&#xA;    Vector n = circle1.center - circle2.center;&#xD;&#xA;    n.normalize();&#xD;&#xA;    // Find the length of the component of each of the movement&#xD;&#xA;    // vectors along n. &#xD;&#xA;    // a1 = v1 . n&#xD;&#xA;    // a2 = v2 . n&#xD;&#xA;    float a1 = v1.dot(n);&#xD;&#xA;    float a2 = v2.dot(n);&#xD;&#xA;    &#xD;&#xA;    // Using the optimized version, &#xD;&#xA;    // optimizedP =  2(a1 - a2)&#xD;&#xA;    float optimizedP = (2.0 * (a1 - a2)) / 2;&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v1' = v1 - optimizedP * n&#xD;&#xA;    Vector v1' = v1 - optimizedP *  n;&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v2' = v2 + optimizedP * n&#xD;&#xA;    Vector v2' = v2 + optimizedP * n;&#xD;&#xA;    &#xD;&#xA;    circle1.setMovementVector(v1');&#xD;&#xA;    circle2.setMovementVector(v2');&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php?page=3" />
  <row Id="36481" PostHistoryTypeId="5" PostId="15925" RevisionGUID="a9948e5e-1c44-47d9-a094-81aca12f373f" CreationDate="2011-08-13T09:49:55.697" UserId="8973" Comment="Added Flash demo" Text="Here's some [code from Gamasutra][1] which calculate the velocity vector of two colliding circles (edited to exclude mass):&#xD;&#xA;&#xD;&#xA;    // First, find the normalized vector n from the center of &#xD;&#xA;    // circle1 to the center of circle2&#xD;&#xA;    Vector n = circle1.center - circle2.center;&#xD;&#xA;    n.normalize();&#xD;&#xA;    // Find the length of the component of each of the movement&#xD;&#xA;    // vectors along n. &#xD;&#xA;    // a1 = v1 . n&#xD;&#xA;    // a2 = v2 . n&#xD;&#xA;    float a1 = v1.dot(n);&#xD;&#xA;    float a2 = v2.dot(n);&#xD;&#xA;    &#xD;&#xA;    // Using the optimized version, &#xD;&#xA;    // optimizedP =  2(a1 - a2)&#xD;&#xA;    float optimizedP = (2.0 * (a1 - a2)) / 2;&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v1' = v1 - optimizedP * n&#xD;&#xA;    Vector v1' = v1 - optimizedP *  n;&#xD;&#xA;    &#xD;&#xA;    // Calculate v1', the new movement vector of circle1&#xD;&#xA;    // v2' = v2 + optimizedP * n&#xD;&#xA;    Vector v2' = v2 + optimizedP * n;&#xD;&#xA;    &#xD;&#xA;    circle1.setMovementVector(v1');&#xD;&#xA;    circle2.setMovementVector(v2');&#xD;&#xA;&#xD;&#xA;**Update:**&#xD;&#xA;&#xD;&#xA;[Here's a flash demo][2] I created to illustrate the concept:&#xD;&#xA;&#xD;&#xA;![Screengrab of particle collisions demo][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php?page=3&#xD;&#xA;  [2]: http://wonderfl.net/c/rp7P&#xD;&#xA;  [3]: http://i.stack.imgur.com/KBrmD.png" />
  <row Id="36482" PostHistoryTypeId="25" PostId="534" RevisionGUID="055cfe28-efd0-483f-96c9-385ecd80bdb8" CreationDate="2011-08-13T10:37:03.827" Comment="http://twitter.com/#!/StackGameDev/status/102327802430373888" />
  <row Id="36483" PostHistoryTypeId="2" PostId="15935" RevisionGUID="72953a37-a7aa-4324-b759-291b1e94311f" CreationDate="2011-08-13T10:37:13.140" UserId="9021" Text="When i use this code and execute its gives the Exception Glthread 8 Java.lang.null.pointer&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; MouseJointDef md = new MouseJointDef();&#xD;&#xA;&#xD;&#xA;				 md.bodyA = _body;&#xD;&#xA;				 md.bodyB = _body;&#xD;&#xA;				 md.target.set(locationWorld);&#xD;&#xA;				 md.collideConnected = true;&#xD;&#xA;				 md.maxForce = 1000.0f * _body.getMass();&#xD;&#xA;				&#xD;&#xA;				 _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;				 _body.setAwake(true);&#xD;&#xA;Thanks,&#xD;&#xA;jubin Mehta&#xD;&#xA;" />
  <row Id="36484" PostHistoryTypeId="1" PostId="15935" RevisionGUID="72953a37-a7aa-4324-b759-291b1e94311f" CreationDate="2011-08-13T10:37:13.140" UserId="9021" Text="Null pointer exception?" />
  <row Id="36485" PostHistoryTypeId="3" PostId="15935" RevisionGUID="72953a37-a7aa-4324-b759-291b1e94311f" CreationDate="2011-08-13T10:37:13.140" UserId="9021" Text="&lt;android&gt;" />
  <row Id="36486" PostHistoryTypeId="5" PostId="15933" RevisionGUID="77b5ab81-a165-43df-b905-3d03b5b6938f" CreationDate="2011-08-13T10:42:06.317" UserId="4432" Comment="added 150 characters in body" Text="I want to rotate the canvas circularly on its center axis based on user touch.&#xD;&#xA;&#xD;&#xA;i want to rotate based on center but its rotating based on top left corner .&#xD;&#xA;&#xD;&#xA;so i am able to see only 1/4 for rotation of image.&#xD;&#xA;&#xD;&#xA;any idea.. &#xD;&#xA;&#xD;&#xA;Like a old phone dialer .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have tried like as follows&#xD;&#xA;&#xD;&#xA;    onDraw(Canvas canvas){&#xD;&#xA;      canvas.save();&#xD;&#xA;      // do my rotation&#xD;&#xA;      canvas.rotate(rotation,0,0);&#xD;&#xA;      canvas.drawBitmap( ((BitmapDrawable)d).getBitmap(),0,0,p );&#xD;&#xA;      canvas.restore();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    @Override&#xD;&#xA;    	    public boolean onTouchEvent(MotionEvent e) {&#xD;&#xA;                      float x = e.getX();&#xD;&#xA;    	          float y = e.getY();&#xD;&#xA;    	          updateRotation(x,y);&#xD;&#xA;    	          mPreviousX = x;&#xD;&#xA;    	          mPreviousY = y;&#xD;&#xA;                invalidate();&#xD;&#xA;    	    }&#xD;&#xA;    &#xD;&#xA;      private void updateRotation(float x, float y) {&#xD;&#xA;    		&#xD;&#xA;    		  double r = Math.atan2(x - centerX, centerY - y);&#xD;&#xA;    		    rotation = (int) Math.toDegrees(r);&#xD;&#xA;    		}" />
  <row Id="36487" PostHistoryTypeId="2" PostId="15936" RevisionGUID="9e06a78b-d200-488e-971a-99e4a3f58d7a" CreationDate="2011-08-13T11:02:26.797" UserId="3505" Text="A little correction to lukevanin's answer, the balls can end up sticking to one another by colliding perpetually, this problem can be resolved by preventing collisions between balls moving away from one another, this phenomena happens to coincide with `optimizedP` being negative, so here is a simple fix:&#xD;&#xA;&#xD;&#xA;    private function collideMoving(pA:Point, vA:Point, pB:Point, vB:Point):void&#xD;&#xA;    {&#xD;&#xA;        // excerpt from http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php?page=3&#xD;&#xA;        &#xD;&#xA;        // First, find the normalized vector n from the center of &#xD;&#xA;        // circle1 to the center of circle2&#xD;&#xA;        var normal:Point = pA.subtract(pB);&#xD;&#xA;        normal.normalize(1);&#xD;&#xA;        &#xD;&#xA;        // Find the length of the component of each of the movement&#xD;&#xA;        // vectors along n. &#xD;&#xA;        // a1 = v1 . n&#xD;&#xA;        // a2 = v2 . n&#xD;&#xA;        var tA:Number = dotproduct(vA, normal);&#xD;&#xA;        var tB:Number = dotproduct(vB, normal);&#xD;&#xA;&#xD;&#xA;        // Using the optimized version, &#xD;&#xA;        // optimizedP =  2(a1 - a2)&#xD;&#xA;        //              -----------&#xD;&#xA;        //                m1 + m2&#xD;&#xA;        // Math.min added to prevent collisions between balls moving away&#xD;&#xA;        // from one another, thus preventing &quot;entanglement&quot;.&#xD;&#xA;        var optimizedP:Number = Math.min((2.0 * (tA - tB)) / 2, 0);&#xD;&#xA;&#xD;&#xA;        // Calculate v1', the new movement vector of circle1&#xD;&#xA;        // v1' = v1 - optimizedP * m2 * n&#xD;&#xA;        vA.x = vA.x - (optimizedP * normal.x);&#xD;&#xA;        vA.y = vA.y - (optimizedP * normal.y);&#xD;&#xA;        &#xD;&#xA;        // Calculate v1', the new movement vector of circle1&#xD;&#xA;        // v2' = v2 + optimizedP * m1 * n&#xD;&#xA;        vB.x = vB.x + (optimizedP * normal.x);&#xD;&#xA;        vB.y = vB.y + (optimizedP * normal.y);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;http://wonderfl.net/c/qZbk" />
  <row Id="36489" PostHistoryTypeId="2" PostId="15937" RevisionGUID="04b6c16f-3918-447e-9db3-d2b7d50740c5" CreationDate="2011-08-13T11:18:12.307" UserId="7133" Text="You can consider each group of linked identical symbols (and by linked I mean you can travel from one symbol to another) a separate [graph][1]. For each such graph apply a [Depth First Search][2] (DFS) starting from each node in the graph *that isn't already part of the longest path for that graph*. Every time you reach a dead end while applying a DFS, check to see if the path you've just traversed is longer than the global maximum that you've found so far. If it is, store it as the new longest path.&#xD;&#xA;&#xD;&#xA;The absolute worse case scenario for this algorithm would be a board filled or mostly filled with a single symbol type, however that's unlikely to happen in the game. Also, be careful how you store the longest paths for each graph. If you don't optimize this bit, you might be better off just calling a DFS for each node on the stage. Assuming that you don't work with very large boards and that speed isn't that big of an issue, this solution should be fast enough.&#xD;&#xA;&#xD;&#xA;Technically speaking, by breaking down your board into separate graphs you end up with multiple &quot;[Longest path problem][3]&quot;s. As we can see from your example, you can have cycles in your graph (for example, having all of the symbols on the outside of the stage of the same type), which means that in this particular problem you need to find the longest path in several cyclic undirected graphs, which [can't be done in polynomial time][4].&#xD;&#xA;&#xD;&#xA;If you find that this is too slow, see [this answer][5] on StackOverflow for more details on how to optimize the individual &quot;Longest Path Problems&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graph_%28data_structure%29&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Depth-first_search&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Longest_path_problem&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/NP_%28complexity%29&#xD;&#xA;  [5]: http://stackoverflow.com/questions/4252215/optimizations-for-longest-path-problem-in-cyclic-graph" />
  <row Id="36490" PostHistoryTypeId="2" PostId="15938" RevisionGUID="4b5e1602-5719-456a-b117-68c188292f15" CreationDate="2011-08-13T12:33:37.473" UserId="2913" Text="This is a case of &quot;give a man a fish/teach a man to fish&quot;. You should learn to use the debugger to figure this problem out yourself.&#xD;&#xA;&#xD;&#xA;Here is a good place to start:&#xD;&#xA;&#xD;&#xA;[http://www.infinitezest.com/articles/debugging-an-android-application.aspx][1]&#xD;&#xA;&#xD;&#xA;and you can find more here:&#xD;&#xA;&#xD;&#xA;[the google][2]&#xD;&#xA;&#xD;&#xA;FWIW as your code stands, the most likely perpetrator are `md.target`, `_body` and `_world`.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.infinitezest.com/articles/debugging-an-android-application.aspx&#xD;&#xA;  [2]: http://lmgtfy.com/?q=android%20debugger" />
  <row Id="36491" PostHistoryTypeId="25" PostId="15892" RevisionGUID="f76644d4-1b08-40f7-b836-4c0ff44ec78c" CreationDate="2011-08-13T12:37:03.600" Comment="http://twitter.com/#!/StackGameDev/status/102358000857120769" />
  <row Id="36492" PostHistoryTypeId="5" PostId="15937" RevisionGUID="7b1d6898-55b2-4871-b90e-94b301d0f781" CreationDate="2011-08-13T13:06:19.417" UserId="7133" Comment="added a detailed explanation for one of the ideas" Text="You can consider each group of linked identical symbols (and by linked I mean you can travel from one symbol to another) a separate [graph][1]. For each such graph apply a [Depth First Search][2] (DFS) starting from each node in the graph *that isn't already part of the longest path for that graph*. Every time you reach a dead end while applying a DFS, check to see if the path you've just traversed is longer than the global maximum that you've found so far. If it is, store it as the new longest path.&#xD;&#xA;&#xD;&#xA;You'll notice that in the previous paragraph I mentioned applying a DFS multiple times for each graph. A single DFS ran on a graph wouldn't be enough. Consider this particular case:&#xD;&#xA;&#xD;&#xA;        1&#xD;&#xA;    1 1 1&#xD;&#xA;        1&#xD;&#xA;        1&#xD;&#xA;        1&#xD;&#xA;        1&#xD;&#xA;&#xD;&#xA;If by chance you would first run a DFS on this graph in the topmost node, you would discover the longest possible path as being the vertical line, but that wouldn't be correct. This would happen every time you start the DFS algorithm in a node that's somewhere inside the resulting path or is not part of it at all. What you need to do in this particular example is also start  a DFS algorithm from the left-most node in the second line. That will find the correct path. Generally speaking, you'll need to run DFS algorithms in each node that isn't currently part of the longest path for that graph, as stated above.&#xD;&#xA;&#xD;&#xA;The absolute worse case scenario for this algorithm would be a board filled or mostly filled with a single symbol type, however that's unlikely to happen in the game. Also, be careful how you store the longest paths for each graph. If you don't optimize this bit, you might be better off just calling a DFS for each node on the stage. Assuming that you don't work with very large boards and that speed isn't that big of an issue, this solution should be fast enough.&#xD;&#xA;&#xD;&#xA;Technically speaking, by breaking down your board into separate graphs you end up with multiple &quot;[Longest path problem][3]&quot;s. As we can see from your example, you can have cycles in your graph (for example, having all of the symbols on the outside of the stage of the same type), which means that in this particular problem you need to find the longest path in several cyclic undirected graphs, which [can't be done in polynomial time][4].&#xD;&#xA;&#xD;&#xA;If you find that this is too slow, see [this answer][5] on StackOverflow for more details on how to optimize the individual &quot;Longest Path Problems&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Graph_%28data_structure%29&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Depth-first_search&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Longest_path_problem&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/NP_%28complexity%29&#xD;&#xA;  [5]: http://stackoverflow.com/questions/4252215/optimizations-for-longest-path-problem-in-cyclic-graph" />
  <row Id="36493" PostHistoryTypeId="2" PostId="15939" RevisionGUID="a5175a0b-ada0-4253-ab66-a1d8e86ce204" CreationDate="2011-08-13T13:32:47.253" UserId="4830" Text="I am currently doing the tutorials in the book: &quot;learn iPhone and iPad cocos2d Game Development&quot; by Steffen Itterheim and have been running into problems with the code for the DoodleDrop tutorial, chapter 4. I have tried to find the source of the problem but i am not able to do so.&#xD;&#xA;&#xD;&#xA;Here is the code i am using:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #import &quot;GameScene.h&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    @implementation GameScene&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) spiderBelowScreen:(id)sender {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;spiderBelowScreen&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    // Make sure sender is actually of the right class&#xD;&#xA;    NSAssert([sender isKindOfClass:[CCSprite class]], @&quot;sender is not a CCSprite!&quot;);&#xD;&#xA;    CCSprite* spider = (CCSprite*)sender;&#xD;&#xA;    &#xD;&#xA;    // Move the spider back up outside the top of the screen&#xD;&#xA;    CGPoint pos = spider.position;&#xD;&#xA;    CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    pos.y = screenSize.height + [spider texture].contentSize.height;&#xD;&#xA;    spider.position = pos;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) runSpiderMoveSequence:(CCSprite*)spider {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;runSpiderMoveSequence&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    // Slowly increase the spider speed over time&#xD;&#xA;    numSpidersMoved++;&#xD;&#xA;    &#xD;&#xA;    if (numSpidersMoved % 8 == 0 &amp;&amp; spiderMoveDuration &gt; 2.0f) {&#xD;&#xA;        spiderMoveDuration -= 0.1f;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // This is the sequence which controls the spiders' movement&#xD;&#xA;    CGPoint belowScreenPosition = CGPointMake(spider.position.x, [spider texture].contentSize.height);&#xD;&#xA;    CCMoveTo *move = [CCMoveTo actionWithDuration:spiderMoveDuration position:belowScreenPosition];&#xD;&#xA;    CCCallFuncN *call = [CCCallFuncN actionWithTarget:self selector:@selector(spiderBelowScreen)];&#xD;&#xA;    CCSequence *sequence = [CCSequence actions:move, call, nil];&#xD;&#xA;    [spider runAction:sequence];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) spidersUpdate:(ccTime)delta {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;spidersUpdate&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    // Try to find a spioder which isn't currently moving&#xD;&#xA;    for (int i = 0; i &lt; 10; i++) {&#xD;&#xA;        int randomSpiderIndex = CCRANDOM_0_1() * [spiders count];&#xD;&#xA;        CCSprite *spider = [spiders objectAtIndex:randomSpiderIndex];&#xD;&#xA;        &#xD;&#xA;        // If the spider isn't moving it won't have any running actions&#xD;&#xA;        if ([spider numberOfRunningActions] == 0) {&#xD;&#xA;            // This is the squense wich controls the spiders' movement&#xD;&#xA;            [self runSpiderMoveSequence:spider];&#xD;&#xA;            &#xD;&#xA;            // Only onbe spider should start moving at a time&#xD;&#xA;            break;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) resetSpiders {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;resetSpiders&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    &#xD;&#xA;    // Get any spider to get its image width&#xD;&#xA;    CCSprite *tempSpider = [spiders lastObject];&#xD;&#xA;    CGSize size = [tempSpider texture].contentSize;&#xD;&#xA;    &#xD;&#xA;    int numSpiders = [spiders count];&#xD;&#xA;    &#xD;&#xA;    for (int i = 0; i &lt; numSpiders; i++) {&#xD;&#xA;        &#xD;&#xA;        // Put each spider at its designated position outside the screen&#xD;&#xA;        CCSprite *spider = [spiders objectAtIndex:i];&#xD;&#xA;        spider.position = CGPointMake(size.width * i + size.width * 0.5f, screenSize.height + size.height);&#xD;&#xA;        [spider stopAllActions];&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Uschedule the selector just in case. If it isn't scheduled it wont do anything&#xD;&#xA;    [self unschedule:@selector(spidersUpdate:)];&#xD;&#xA;    &#xD;&#xA;    // Schedule the spider update logic to run at the given interval&#xD;&#xA;    [self schedule:@selector(spidersUpdate:) interval:0.7f];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) initSpiders {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;initSpiders&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    &#xD;&#xA;    // using a temporary spider sprite is the easiest way to get the image's size&#xD;&#xA;    CCSprite *tempSpider = [CCSprite spriteWithFile:@&quot;spider.png&quot;];&#xD;&#xA;    float imageWidth = [tempSpider texture].contentSize.width;&#xD;&#xA;    &#xD;&#xA;    // Use as many spiders as can fit next to each other over the whole screen width&#xD;&#xA;    int numSpiders = screenSize.width / imageWidth;&#xD;&#xA;    &#xD;&#xA;    // Initialize the spider array using alloc&#xD;&#xA;    spiders = [[CCArray alloc] initWithCapacity:numSpiders];&#xD;&#xA;    &#xD;&#xA;    for (int i = 0; i &lt; numSpiders; i++) {&#xD;&#xA;        CCSprite *spider = [CCSprite spriteWithFile:@&quot;spider.png&quot;];&#xD;&#xA;        [self addChild:spider z:0 tag:2];&#xD;&#xA;        &#xD;&#xA;        // Also add the spider to the spider array&#xD;&#xA;        [spiders addObject:spider];&#xD;&#xA;    }&#xD;&#xA;    // call the method to reposition all spiders&#xD;&#xA;    [self resetSpiders];&#xD;&#xA;                    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) update:(ccTime)delta {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;update:(ccTime)delta&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    // Keep adding up the playerVelocity to the players's position&#xD;&#xA;    CGPoint pos = player.position;&#xD;&#xA;    pos.x   += playerVelocity.x;&#xD;&#xA;&#xD;&#xA;    // The player should also be stopped from going outside the screen&#xD;&#xA;    CGSize  screenSize  = [[CCDirector sharedDirector] winSize];&#xD;&#xA;    float   imageWidthHalved    = [player texture].contentSize.width * 0.5f;&#xD;&#xA;    float   leftBorderLimit     = imageWidthHalved;&#xD;&#xA;    float   rightBorderLimit    = screenSize.width - imageWidthHalved;&#xD;&#xA;    &#xD;&#xA;    // Preventing the player sprite from moving outside the screen&#xD;&#xA;    if (pos.x &lt; leftBorderLimit)&#xD;&#xA;    {&#xD;&#xA;        pos.x   = leftBorderLimit;&#xD;&#xA;        playerVelocity  = CGPointZero;&#xD;&#xA;    }&#xD;&#xA;    else if (pos.x &gt; rightBorderLimit)&#xD;&#xA;    {&#xD;&#xA;        pos.x   = rightBorderLimit;&#xD;&#xA;        playerVelocity  = CGPointZero;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    player.position = pos;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    -(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;accelerometer&lt;&lt;&quot;);&#xD;&#xA;    &#xD;&#xA;    // controls how quickly velocity decelerates (lower = quicker to change direction)&#xD;&#xA;    float   deceleration    = 0.2f;&#xD;&#xA;    &#xD;&#xA;    // determines how sensitive the accelerometer reacts (higher = more sensitivity)&#xD;&#xA;    float   sensitivity     = 6.0f;&#xD;&#xA;    &#xD;&#xA;    // how fast the velocity can be at most&#xD;&#xA;    float   maxVelocity     = 550;&#xD;&#xA;    &#xD;&#xA;    // adjust velocity based on current accelerometer acceleration&#xD;&#xA;    playerVelocity.x    = playerVelocity.x * deceleration + acceleration.x * sensitivity;&#xD;&#xA;&#xD;&#xA;    // we must limit the maximum velocity of the player sprite, in both directions&#xD;&#xA;    if (playerVelocity.x &gt; maxVelocity)&#xD;&#xA;    {&#xD;&#xA;        playerVelocity.x    = maxVelocity;&#xD;&#xA;    }&#xD;&#xA;    else if (playerVelocity.x &lt; -maxVelocity)&#xD;&#xA;    {&#xD;&#xA;        playerVelocity.x    = -maxVelocity;&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    +(id)scene {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;scene&lt;&lt;&quot;);&#xD;&#xA;    CCScene *scene = [CCScene node];&#xD;&#xA;    CCLayer *layer = [GameScene node];&#xD;&#xA;    [scene addChild:layer];&#xD;&#xA;    return scene;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(id)init {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;init&lt;&lt;&quot;);&#xD;&#xA;    if ((self = [super init])) {&#xD;&#xA;        CCLOG(@&quot;%@: %@&quot;, NSStringFromSelector(_cmd), self);&#xD;&#xA;        &#xD;&#xA;        self.isAccelerometerEnabled = YES;&#xD;&#xA;        &#xD;&#xA;        player = [CCSprite spriteWithFile:@&quot;alien.png&quot;];&#xD;&#xA;        [self addChild:player z:0 tag:1];&#xD;&#xA;        &#xD;&#xA;        CGSize screenSize = [[CCDirector sharedDirector] winSize];&#xD;&#xA;        float imageHeight = [player texture].contentSize.height;&#xD;&#xA;        player.position = CGPointMake(screenSize.width / 2, imageHeight / 2);&#xD;&#xA;        &#xD;&#xA;        // scheduling the update method in order to adjust the player's speed every frame&#xD;&#xA;		[self scheduleUpdate];&#xD;&#xA;        [self initSpiders];&#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;    return self;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    -(void) deallaoc {&#xD;&#xA;    NSLog(@&quot;&gt;&gt;dealloc&lt;&lt;&quot;);&#xD;&#xA;    CCLOG(@&quot;%@: %@&quot;, NSStringFromSelector(_cmd), self);&#xD;&#xA;    &#xD;&#xA;    // The spiders array must be released, it was created using [CCArray alloc]&#xD;&#xA;    [spiders release];&#xD;&#xA;    spiders = nil;&#xD;&#xA;    &#xD;&#xA;    // Never forget to call [super dealloc]&#xD;&#xA;    [super dealloc];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    @end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The result i get (edited), including the NSLog i have included, is:&#xD;&#xA;&#xD;&#xA;    2011-08-13 15:18:38.401 DoodleDrop[1751:707] &gt;&gt;update:(ccTime)delta&lt;&lt;&#xD;&#xA;    2011-08-13 15:18:38.404 DoodleDrop[1751:707] -[GameScene spiderBelowScreen]: unrecognized selector sent to instance 0x257f50&#xD;&#xA;    2011-08-13 15:18:38.407 DoodleDrop[1751:707] &gt;&gt;accelerometer&lt;&lt;&#xD;&#xA;    2011-08-13 15:18:38.417 DoodleDrop[1751:707] &gt;&gt;update:(ccTime)delta&lt;&lt;&#xD;&#xA;    2011-08-13 15:18:38.419 DoodleDrop[1751:707] -[GameScene spiderBelowScreen]: unrecognized selector sent to instance 0x257f50&#xD;&#xA;&#xD;&#xA;I wonder if there is someone nice that can help me here?&#xD;&#xA;" />
  <row Id="36494" PostHistoryTypeId="1" PostId="15939" RevisionGUID="a5175a0b-ada0-4253-ab66-a1d8e86ce204" CreationDate="2011-08-13T13:32:47.253" UserId="4830" Text="Help: -[GameScene spiderBelowScreen]: unrecognized selector sent to instance 0x257f50" />
  <row Id="36495" PostHistoryTypeId="3" PostId="15939" RevisionGUID="a5175a0b-ada0-4253-ab66-a1d8e86ce204" CreationDate="2011-08-13T13:32:47.253" UserId="4830" Text="&lt;iphone&gt;&lt;cocos2d-iphone&gt;&lt;objective-c&gt;" />
  <row Id="36496" PostHistoryTypeId="5" PostId="15922" RevisionGUID="54fa0f4f-cb90-46c6-b505-e56cd9ff6d96" CreationDate="2011-08-13T13:35:32.427" UserId="3505" Comment="Introduced both a new word and a new letter in the English language." Text="Of course there is. Compute the determinant of the orientation vector of the runways and the vector from one runway centre to another, the result will be positive or negative depending on which runway are to the right of the other.&#xD;&#xA;&#xD;&#xA;Calculation of determinant for a pair of 2D vectors:&#xD;&#xA;&#xD;&#xA;    Det(A,B) = Ax*By - Ay*Bx&#xD;&#xA;&#xD;&#xA;There is a load of other stuff one can learn about the use of determinants, but for this purpose it's all you need to know.&#xD;&#xA;&#xD;&#xA;**Edit, same thing in different words:**  &#xD;&#xA;Compute the dot product of the orientation vector of the runways and the tværvector of the vector from one runway centre to another, the result will be positive or negative depending on which runway are to the right of the other.&#xD;&#xA;&#xD;&#xA;    DotProduct(A,B) = Ax*Bx + Ay*By&#xD;&#xA;&#xD;&#xA;A tværvector is the rotation of a 2D vector 90 degrees counter-clockwise. The tværvector T of A is calculated as follow:&#xD;&#xA;&#xD;&#xA;    Tx = -Ay&#xD;&#xA;    Ty = Ax" />
  <row Id="36497" PostHistoryTypeId="5" PostId="15922" RevisionGUID="0bb1adf7-ba81-4881-b143-e509d7151ca6" CreationDate="2011-08-13T14:14:06.437" UserId="3505" Comment="added 1049 characters in body" Text="Of course there is. Compute the determinant of the orientation vector of the runways and the vector from one runway centre to another, the result will be positive or negative depending on which runway are to the right of the other.&#xD;&#xA;&#xD;&#xA;Calculation of determinant for a pair of 2D vectors:&#xD;&#xA;&#xD;&#xA;    Det(A,B) = Ax*By - Ay*Bx&#xD;&#xA;&#xD;&#xA;There is a load of other stuff one can learn about the use of determinants, but for this purpose it's all you need to know.&#xD;&#xA;&#xD;&#xA;**Edit, same thing in different words:**  &#xD;&#xA;Compute the dot product of the orientation vector of the runways and the tværvector of the vector from one runway centre to another, the result will be positive or negative depending on which runway are to the right of the other.&#xD;&#xA;&#xD;&#xA;    DotProduct(A,B) = Ax*Bx + Ay*By&#xD;&#xA;&#xD;&#xA;A tværvector is the rotation of a 2D vector 90 degrees counter-clockwise. The tværvector T of A is calculated as follow:&#xD;&#xA;&#xD;&#xA;    Tx = -Ay&#xD;&#xA;    Ty = Ax&#xD;&#xA;&#xD;&#xA;**Edit, I guess I should try to explain why this works.**  &#xD;&#xA;The result of a dot product is equal to the product of the length of the two vectors, by the cosine of the angle between them. Since lengths are always positive and cosine is positive for angles in the range `]-90 deg; 90 deg[` the dot product is positive for acute angles, and negative for obtuse angles.&#xD;&#xA;&#xD;&#xA;Imagine two parallel lines and a vector from any point on line 1 to any point on line 2, this vector may point in any direction within a 180 degrees arc, except from the two extremes. If we rotate this vector 90 degrees we also rotate the arc 90 degrees. This rotated arc is positioned exactly so that a vector parallel to the lines will either have an acute angle to all vectors within the arc, or an obtuse angle to all of them, depending on the position of the lines and the direction of the vector. Since the dot product works as an acute/obtuse test it can be used to tell whether a line is to the right of left of another, depending on which direction you look at them." />
  <row Id="36498" PostHistoryTypeId="2" PostId="15940" RevisionGUID="99253d0d-7757-4978-9736-8c20fba01e1d" CreationDate="2011-08-13T14:21:39.200" UserId="9245" Text="I have a [10, 11] array in my game. What is the best structure and way to store the connections between the elements of the array.&#xD;&#xA;Some info about the connections:&#xD;&#xA;- they are simple (2 elements are connected or not)&#xD;&#xA;- an element can be connected with its 8 neighbours&#xD;&#xA;- when I move from one position to another I need to add that connection&#xD;&#xA;- when Im in a position I need to check that element's connections&#xD;&#xA;&#xD;&#xA;Any sugestions?" />
  <row Id="36499" PostHistoryTypeId="1" PostId="15940" RevisionGUID="99253d0d-7757-4978-9736-8c20fba01e1d" CreationDate="2011-08-13T14:21:39.200" UserId="9245" Text="Multidimensional array" />
  <row Id="36500" PostHistoryTypeId="3" PostId="15940" RevisionGUID="99253d0d-7757-4978-9736-8c20fba01e1d" CreationDate="2011-08-13T14:21:39.200" UserId="9245" Text="&lt;game-mechanics&gt;" />
  <row Id="36501" PostHistoryTypeId="2" PostId="15941" RevisionGUID="549935b1-9640-47cb-b8df-67b596b76219" CreationDate="2011-08-13T14:29:24.280" UserId="51" Text="I think you need to use `@selector(spiderBelowScreen:)`. Note the `:`." />
  <row Id="36502" PostHistoryTypeId="2" PostId="15942" RevisionGUID="ae73136f-cec7-46b8-a350-5f306f3a376c" CreationDate="2011-08-13T14:30:47.663" UserId="9231" Text="I'm making a 2D platformer similar to Terraria, although I'm having some problems with some collision detection code. I'm using the code from the &lt;a href=&quot;http://create.msdn.com/en-US/education/catalog/sample/platformer&quot;&gt;AppHub Platformer sample&lt;/a&gt;, but tweaked so it fits with my character size and tilesize. Although, I am having a few problems:&#xD;&#xA;&#xD;&#xA;![Jump Problem #1][1]&#xD;&#xA;&#xD;&#xA;If I box myself in, and then jump. Instead of just canceling the jump it will move me through a wall (most likely to the right) and then when it can jump, it performs the jump.&#xD;&#xA;&#xD;&#xA;![Jump Problem #2][2]&#xD;&#xA;&#xD;&#xA;Next problem I'm having is if I have a 1x1 gap above the character, I am freely able to jump through it. The character size is 2 blocks wide by 3 high.&#xD;&#xA;&#xD;&#xA;I don't want to use a physics engine because I will not be using 95% of the features, and I don't really want to add it if i'm not going to use most of it. I just require a basic collision detection and basic physics. Honestly, I can't see anything wrong with my code and it's pretty much the same as the sample. Just by changing the tile size must have added these bugs and I'm not exactly sure how to fix it. &lt;a href=&quot;http://pastebin.com/fT5mKkfE&quot;&gt;This is my existing code.&lt;/a&gt;&#xD;&#xA;&#xD;&#xA;**Basically, what I'm asking is:** How could I modify my current system to eliminate these bugs, or what new system could I implement to have a better, fully functional physics system without these bugs. (Without implementing a whole engine).&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RBEnC.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/D2RFZ.png" />
  <row Id="36503" PostHistoryTypeId="1" PostId="15942" RevisionGUID="ae73136f-cec7-46b8-a350-5f306f3a376c" CreationDate="2011-08-13T14:30:47.663" UserId="9231" Text="2D Platformer Collision/Physics Problems" />
  <row Id="36504" PostHistoryTypeId="3" PostId="15942" RevisionGUID="ae73136f-cec7-46b8-a350-5f306f3a376c" CreationDate="2011-08-13T14:30:47.663" UserId="9231" Text="&lt;xna&gt;&lt;2d&gt;&lt;c#&gt;&lt;physics&gt;" />
  <row Id="36505" PostHistoryTypeId="25" PostId="283" RevisionGUID="801e1640-cb5a-435b-b4f4-2c72d5214534" CreationDate="2011-08-13T14:37:03.450" Comment="http://twitter.com/#!/StackGameDev/status/102388199661387777" />
  <row Id="36506" PostHistoryTypeId="6" PostId="15940" RevisionGUID="f9d09f06-07e1-4bdb-b499-2a71054270b4" CreationDate="2011-08-13T14:41:45.050" UserId="9245" Comment="edited tags" Text="&lt;c#&gt;&lt;game-mechanics&gt;" />
  <row Id="36507" PostHistoryTypeId="2" PostId="15943" RevisionGUID="5f7feb78-1e5d-48f6-9198-171aa3dff09a" CreationDate="2011-08-13T15:15:10.003" UserId="9246" Text="My answer is:&#xD;&#xA;Decide if you want to make a game or game engine. And then choose Unity ;P&#xD;&#xA;&#xD;&#xA;Seriously, start with some free game engine bundled with some good SDK. This way you will not have to worry about 10001 small iritaiting bugs when writing your own game." />
  <row Id="36508" PostHistoryTypeId="2" PostId="15944" RevisionGUID="49dd13e4-d860-4ecc-8c12-bfb5f38c30d4" CreationDate="2011-08-13T15:35:51.170" UserId="9248" Text="Want to make a similar browser online multiplayer game like duelingnetwork, but for a different TCG.&#xD;&#xA;&#xD;&#xA;What technologies you believe they used to create it?&#xD;&#xA;&#xD;&#xA;Could anyone kindly refer to any good resources/books to start from, so that eventally(not soon) I myself can create something very similar to the game mentioned above, perhaphs a little more simpler. &#xD;&#xA;&#xD;&#xA;Assuming Flash and AS3 are involved, and I have 0 knowledge of them. Only have been exposed to VB, C#, and most web programming languages." />
  <row Id="36509" PostHistoryTypeId="1" PostId="15944" RevisionGUID="49dd13e4-d860-4ecc-8c12-bfb5f38c30d4" CreationDate="2011-08-13T15:35:51.170" UserId="9248" Text="what technologies were used" />
  <row Id="36510" PostHistoryTypeId="3" PostId="15944" RevisionGUID="49dd13e4-d860-4ecc-8c12-bfb5f38c30d4" CreationDate="2011-08-13T15:35:51.170" UserId="9248" Text="&lt;flash&gt;" />
  <row Id="36511" PostHistoryTypeId="2" PostId="15945" RevisionGUID="bca7e60f-7da5-4a0b-8a5d-c6d025566753" CreationDate="2011-08-13T15:51:29.960" UserId="7881" Text="I would create a simple `node` class, with eight `node` properties, one for each direction. (N, NE, S, etc.) Any connection that does not exist has a null `node` element in that direction's property. Store these in your array, and use them like sort of like a linked list. It's simple and understandable. Each node could have a `value` property, which points to what you had originally stored in the array, or you could simply add the eight navigation properties to your existing data." />
  <row Id="36512" PostHistoryTypeId="25" PostId="15923" RevisionGUID="ac55956e-7226-4176-a552-5034b113dc24" CreationDate="2011-08-13T16:37:03.713" Comment="http://twitter.com/#!/StackGameDev/status/102418399149297665" />
  <row Id="36513" PostHistoryTypeId="2" PostId="15946" RevisionGUID="8d19ba01-f54b-4494-a947-e29e4afadbb9" CreationDate="2011-08-13T16:49:33.673" UserId="9219" Text="How does one do alpha-testing in XNA 4.0? I've read a lot of tutorials, but it just doesn't seem to work. Here's the code as suggested by a tutorial, using the built-in AlphaTestEffect class:&#xD;&#xA;&#xD;&#xA;    Matrix projection = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, 1);&#xD;&#xA;    Matrix halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);&#xD;&#xA;    alphaTest = new AlphaTestEffect(GraphicsDevice);&#xD;&#xA;    alphaTest.VertexColorEnabled = true;&#xD;&#xA;    alphaTest.DiffuseColor = Color.White.ToVector3();&#xD;&#xA;    alphaTest.AlphaFunction = CompareFunction.Greater;&#xD;&#xA;    alphaTest.ReferenceAlpha = 128;&#xD;&#xA;    alphaTest.World = Matrix.Identity;&#xD;&#xA;    alphaTest.View = Matrix.Identity;&#xD;&#xA;    alphaTest.Projection = halfPixelOffset * projection;&#xD;&#xA;&#xD;&#xA;Then this object is just passed in to the SpriteBatch.Begin method. The result: Nothing appears on the screen. Note that this is the case even with CompareFunction.Always! (I tried CompareFunction.Never too in case I misunderstand the comparison order).&#xD;&#xA;&#xD;&#xA;The tutorial I got this from is here, but I've also seen that same code elsewhere:&#xD;&#xA;http://www.crappycoding.com/2010/08/texture-modification-using-render-targets-with-some-stencil-buffer-action/&#xD;&#xA;&#xD;&#xA;The tutorial has a downloadable file for XNA 4.0 to demonstrate it. I downloaded and tried it, and - *It doesn't work*. No craters show up. So what the heck is going on?" />
  <row Id="36514" PostHistoryTypeId="1" PostId="15946" RevisionGUID="8d19ba01-f54b-4494-a947-e29e4afadbb9" CreationDate="2011-08-13T16:49:33.673" UserId="9219" Text="How to do alpha testing in XNA 4.0" />
  <row Id="36515" PostHistoryTypeId="3" PostId="15946" RevisionGUID="8d19ba01-f54b-4494-a947-e29e4afadbb9" CreationDate="2011-08-13T16:49:33.673" UserId="9219" Text="&lt;xna-4.0&gt;" />
  <row Id="36516" PostHistoryTypeId="5" PostId="15946" RevisionGUID="0ce70430-dd60-430c-9baf-7224f7c34b70" CreationDate="2011-08-13T17:18:20.730" UserId="9219" Comment="added 92 characters in body" Text="How does one do alpha-testing in XNA 4.0? I've read a lot of tutorials, but it just doesn't seem to work. Here's the code as suggested by a tutorial, using the built-in AlphaTestEffect class:&#xD;&#xA;&#xD;&#xA;    Matrix projection = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, 1);&#xD;&#xA;    Matrix halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);&#xD;&#xA;    alphaTest = new AlphaTestEffect(GraphicsDevice);&#xD;&#xA;    alphaTest.VertexColorEnabled = true;&#xD;&#xA;    alphaTest.DiffuseColor = Color.White.ToVector3();&#xD;&#xA;    alphaTest.AlphaFunction = CompareFunction.Greater;&#xD;&#xA;    alphaTest.ReferenceAlpha = 128;&#xD;&#xA;    alphaTest.World = Matrix.Identity;&#xD;&#xA;    alphaTest.View = Matrix.Identity;&#xD;&#xA;    alphaTest.Projection = halfPixelOffset * projection;&#xD;&#xA;&#xD;&#xA;Then this object is just passed in to the SpriteBatch.Begin method. The result: Nothing appears on the screen, whereas the exact same code that doesn't pass in the alphaTest object renders correctly.&#xD;&#xA;&#xD;&#xA;Note that this is the case even with CompareFunction.Always! (I tried CompareFunction.Never too in case I misunderstand the comparison order).&#xD;&#xA;&#xD;&#xA;The tutorial I got this from is here, but I've also seen that same code elsewhere:&#xD;&#xA;http://www.crappycoding.com/2010/08/texture-modification-using-render-targets-with-some-stencil-buffer-action/&#xD;&#xA;&#xD;&#xA;The tutorial has a downloadable file for XNA 4.0 to demonstrate it. I downloaded and tried it, and - *It doesn't work*. No craters show up. So what the heck is going on?" />
  <row Id="36517" PostHistoryTypeId="5" PostId="15919" RevisionGUID="244caa38-9bb1-4696-9e6e-770082b0e878" CreationDate="2011-08-13T17:23:07.420" UserId="9244" Comment="Slight editing of the question. By the way, the post is mine, but at the time of posting, I was not a registered user. Is it possible to transfer this question to my registered account, as well as the reputation that I have already gain (as un registered user)? Thanks!" Text="I realize this question is complex and subjective, but bear with me for a moment.&#xD;&#xA;&#xD;&#xA;I firmly believe that video-game software is essentially different from, for example spreadsheet software, as from a user point of view, some games have more similarities with film art than with regular software. However, when it comes to requirements prioritization methods that help developers sort out which feature or idea is most important, there is none that facilitate the **creative aspects** of video games. Most available techniques only aid regular software development where focus is on the risk and cost of requirements, and do not take into account the creative aspect of video-game requirements.&#xD;&#xA;&#xD;&#xA;To illustrate the problem, think of a requirement (i.e. feature idea) such as the one seen in Super Paper Mario, where [Mario can exit the 3D world and enter a 2D world][1], and vice versa in order to go around obstacles. This is a fairly challenging requirement to implement and probably costly, but definitely crucial to the success of the game. Available prioritization methods overlook the **creative/entertainment value** of this requirement and mainly just estimate how costly and (technologically) risky implementation is. Of course, this is a very simplistic example, but you can imagine a case where there is a pool of great game ideas (functional and non-functional requirements) and not enough resources to realize them all. When it comes to value calculation, academic research doesn't provide game developers with an adequate way to estimate the value of game requirements.&#xD;&#xA;&#xD;&#xA;In my research, I try to refine part of the preproduction process by developing a requirements prioritization method tailored to the needs of game development industry. A pivotal element in such a method is the ability to identify and estimate the creative/entertainment value of requirements. However, in order to do that, I need to understand how game developers perceive this creative/entertainment value of requirements. In a nutshell, **I am seeking answers to the following questions**:&#xD;&#xA;&#xD;&#xA;Question 1: **How would you define the creative/entertainment value of video-game requirements?**&#xD;&#xA;&#xD;&#xA;Question 2: **How would you measure it?**&#xD;&#xA;&#xD;&#xA;Question 3: **Who should measure it?**&#xD;&#xA;&#xD;&#xA;I would love to see how these issues are perceived by game developers and I would appreciate your take on them here, but if you want to contribute to this research – receiving my eternal gratitude and a proper credit/citation in the research and all the publications that will follow, please fill up my extremely short survey (just 7 questions, 3 of which you already see above):&#xD;&#xA;&#xD;&#xA;[The extremely short survey][2] which will cement you as my personal hero.&#xD;&#xA;&#xD;&#xA;Research information and trigger&#xD;&#xA;--------------------------------&#xD;&#xA;&#xD;&#xA;This research is being conducted at Utrecht University, The Netherlands, as part of an Information Science master’s thesis.&#xD;&#xA;&#xD;&#xA;Game development is in many ways similar to product software development as developers follow certain software development processes. Following a poor development method (or none at all) could result in longer development times, going over budget and/or delivering buggy products (Bethke, 2003). What makes video games different is the creative game vision that must be shared by the entire team to ensure that the end product is consistent and of good quality. This is especially true for full-blown game titles where from a user point of view, there are more similarities with film art than with any other software. Unfortunately, this curious creative aspect renders many software product management techniques unadoptable by the gaming industry.&#xD;&#xA;&#xD;&#xA;I am quite interested in working towards improving the game development process in the preproduction stage, by creating a requirements prioritization method tailored to the specific needs of the game industry and **I need your help!** The easiest way to contribute to the research is by filling up my short survey (link above). If you find this research interesting, please contact me at a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;**Researcher information**&#xD;&#xA;&#xD;&#xA;My name is Alex Chervenkoff, an avid gamer and quite excited about this research! You can contact me at: a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;Degree in BSc Computer Science, The University of Sheffield, UK.&#xD;&#xA;&#xD;&#xA;Currently doing MSc Information Science at Utrecht University, The Netherlands.&#xD;&#xA;&#xD;&#xA;**Thank you!**&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/en/e/e5/SPM_3D.jpg&#xD;&#xA;  [2]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dFJfVUIwb2dKSkNWYnZfcTFnakZTcFE6MQ" />
  <row Id="36518" PostHistoryTypeId="4" PostId="15919" RevisionGUID="244caa38-9bb1-4696-9e6e-770082b0e878" CreationDate="2011-08-13T17:23:07.420" UserId="9244" Comment="Slight editing of the question. By the way, the post is mine, but at the time of posting, I was not a registered user. Is it possible to transfer this question to my registered account, as well as the reputation that I have already gain (as un registered user)? Thanks!" Text="How can I measure the &quot;creative/entertainment value&quot; of video-game requirements?" />
  <row Id="36519" PostHistoryTypeId="24" PostId="15919" RevisionGUID="244caa38-9bb1-4696-9e6e-770082b0e878" CreationDate="2011-08-13T17:23:07.420" Comment="Proposed by 9244 approved by 1430 edit id of 638" />
  <row Id="36520" PostHistoryTypeId="5" PostId="15944" RevisionGUID="7eb10b02-a150-46fd-8d00-30230b2cc710" CreationDate="2011-08-13T17:23:21.147" UserId="2913" Comment="Improved title, added link to game with NSFW warning, added tags, some minor spelling fixes" Text="I want to make a similar browser online multiplayer game like &quot;Dueling Network&quot; (link below) but for a different TCG.&#xD;&#xA;&#xD;&#xA;What technologies you believe they used to create it?&#xD;&#xA;&#xD;&#xA;Could anyone kindly refer to any good resources/books to start from, so that eventally (not soon) I myself can create something very similar to the game mentioned above, perhaps a little more simpler. &#xD;&#xA;&#xD;&#xA;Assuming Flash and AS3 are involved, and I have 0 knowledge of them. Only have been exposed to VB, C#, and most web programming languages.&#xD;&#xA;&#xD;&#xA;[Dueling Network][1] NSFW: loud music&#xD;&#xA;&#xD;&#xA;  [1]: http://www.duelingnetwork.com/" />
  <row Id="36521" PostHistoryTypeId="4" PostId="15944" RevisionGUID="7eb10b02-a150-46fd-8d00-30230b2cc710" CreationDate="2011-08-13T17:23:21.147" UserId="2913" Comment="Improved title, added link to game with NSFW warning, added tags, some minor spelling fixes" Text="What technologies were used to create &quot;Dueling Network&quot;?" />
  <row Id="36522" PostHistoryTypeId="6" PostId="15944" RevisionGUID="7eb10b02-a150-46fd-8d00-30230b2cc710" CreationDate="2011-08-13T17:23:21.147" UserId="2913" Comment="Improved title, added link to game with NSFW warning, added tags, some minor spelling fixes" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;multiplayer&gt;&lt;online&gt;" />
  <row Id="36523" PostHistoryTypeId="24" PostId="15944" RevisionGUID="7eb10b02-a150-46fd-8d00-30230b2cc710" CreationDate="2011-08-13T17:23:21.147" Comment="Proposed by 2913 approved by 1430 edit id of 640" />
  <row Id="36524" PostHistoryTypeId="5" PostId="15935" RevisionGUID="b8bf18d9-b263-4d32-98d7-d2683f57d967" CreationDate="2011-08-13T17:23:27.763" UserId="6248" Comment="improved source code formatting" Text="When i use this code and execute its gives the Exception Glthread 8 Java.lang.null.pointer&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    MouseJointDef md = new MouseJointDef();  &#xD;&#xA;    md.bodyA = _body;&#xD;&#xA;    md.bodyB = _body;&#xD;&#xA;    md.target.set(locationWorld);&#xD;&#xA;    md.collideConnected = true;&#xD;&#xA;    md.maxForce = 1000.0f * _body.getMass();&#xD;&#xA;    &#xD;&#xA;    _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;    _body.setAwake(true);&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;jubin Mehta&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36525" PostHistoryTypeId="24" PostId="15935" RevisionGUID="b8bf18d9-b263-4d32-98d7-d2683f57d967" CreationDate="2011-08-13T17:23:27.763" Comment="Proposed by 6248 approved by 1430 edit id of 639" />
  <row Id="36526" PostHistoryTypeId="2" PostId="15947" RevisionGUID="5b1d5095-1e1b-4c13-96ac-4485c1c041ce" CreationDate="2011-08-13T18:06:03.697" UserId="4546" Text="The core problem in your code is probably that you pass in `0, 0` as the pivot point to rotate about in your rotate call.&#xD;&#xA;&#xD;&#xA;For a more robust way of expressing your transformation, in linear algebra the way to rotate about an _arbitrary point_ is to _translate_ the world in such a way that the point is at the origin, _rotate_, and then _translate back_.&#xD;&#xA;&#xD;&#xA;That is, `translate(-px, -py) * rotate(theta) * translate(px, py)`, where p is the point." />
  <row Id="36527" PostHistoryTypeId="2" PostId="15948" RevisionGUID="ecd5aab3-da9e-4dd0-8fd9-e79a20d35857" CreationDate="2011-08-13T18:08:12.693" UserId="9251" Text="You've asked a lot of questions here - let me cherry pick one of them.&#xD;&#xA;&#xD;&#xA;&gt; How to deal with localizations in other languages, are they to obtain&#xD;&#xA;&gt; from other companies or do they belong to master publisher?&#xD;&#xA;&#xD;&#xA;Localization is also one of those areas where it could be managed on a case-by-case basis. &#xD;&#xA;&#xD;&#xA;Most companies I have worked with treat any localization work provided by the republisher (the localizing local publisher) as a slightly limited work for hire, meaning, the republisher probably has exclusive rights for the localized version while the republishing agreement is in effect. That said, if you acquire the rights to a product, you need to do proper due diligence and have your expectations incorporated into the agreement." />
  <row Id="36528" PostHistoryTypeId="2" PostId="15949" RevisionGUID="7adad3e7-e532-411f-b75b-21289f783489" CreationDate="2011-08-13T18:26:51.753" UserId="20" Text="Since the amount of nodes is known, an efficient way to store connections would be an [adjacency matrix][1].&#xD;&#xA;&#xD;&#xA;It's basically a two-dimensional array of booleans (or ints/floats if you want to store edge-costs) that has a row and a column for each node. So if you want to get/set the edge from node `3` to node `6`, you would look up the entry in row `3` and column `6`. If the value there is `true` (or not zero), then there's an edge from `3` to `6`.&#xD;&#xA;&#xD;&#xA;Since you have 110 nodes, your adjacency matrix will be a 110x110 array.&#xD;&#xA;&#xD;&#xA;This way of storing the graph is suitable for a dense graph (eg. you have lots of connections) and it's *very* fast to get and set edges (connections).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Adjacency_matrix" />
  <row Id="36529" PostHistoryTypeId="25" PostId="533" RevisionGUID="8fbcc577-6e29-4cbb-b690-2512e8f9f699" CreationDate="2011-08-13T18:37:04.003" Comment="http://twitter.com/#!/StackGameDev/status/102448598670774273" />
  <row Id="36530" PostHistoryTypeId="2" PostId="15950" RevisionGUID="8a9361ac-3119-4326-a567-455c13cf0ac0" CreationDate="2011-08-13T19:29:52.223" UserId="744" Text="bummzack's answer is good if you need to store an arbitrary graph. Since you are storing a graph that is also a 2D grid, there is an even better way.&#xD;&#xA;&#xD;&#xA;Associate eight bits with each index; each bit indicates whether a connection is available in one of the eight possible directions. If the connection costs are not uniform, you can instead store eight bytes (or eight ints, or eight floats). This will use significantly less memory than a full adjacency matrix, and scales linearly rather than quadratically with the number of nodes." />
  <row Id="36531" PostHistoryTypeId="5" PostId="15940" RevisionGUID="5298309c-3cdb-427a-8266-f435cc26abc5" CreationDate="2011-08-13T19:44:42.810" UserId="744" Comment="deleted 19 characters in body; edited tags; edited title" Text="I have a 10x11 array in my game. What is the best structure and way to store the connections between the elements of the array?&#xD;&#xA;&#xD;&#xA;Some info about the connections:&#xD;&#xA;- they are simple (2 elements are connected or not)&#xD;&#xA;- an element can be connected with its 8 neighbours&#xD;&#xA;- when I move from one position to another I need to add that connection&#xD;&#xA;- when I'm in a position I need to check that element's connections" />
  <row Id="36532" PostHistoryTypeId="4" PostId="15940" RevisionGUID="5298309c-3cdb-427a-8266-f435cc26abc5" CreationDate="2011-08-13T19:44:42.810" UserId="744" Comment="deleted 19 characters in body; edited tags; edited title" Text="How can I store information about what cells are connected to others in a 2D array?" />
  <row Id="36533" PostHistoryTypeId="6" PostId="15940" RevisionGUID="5298309c-3cdb-427a-8266-f435cc26abc5" CreationDate="2011-08-13T19:44:42.810" UserId="744" Comment="deleted 19 characters in body; edited tags; edited title" Text="&lt;c#&gt;&lt;data-structure&gt;" />
  <row Id="36534" PostHistoryTypeId="5" PostId="15940" RevisionGUID="d7093c8d-bffd-4108-9c24-3eafbc5f6bbd" CreationDate="2011-08-13T19:58:53.357" UserId="9245" Comment="added an example" Text="I have a 10x11 array in my game. What is the best structure and way to store the connections between the elements of the array?&#xD;&#xA;&#xD;&#xA;Some info about the connections:&#xD;&#xA;- they are simple (2 elements are connected or not)&#xD;&#xA;- an element can be connected with its 8 neighbours&#xD;&#xA;- when I move from one position to another I need to add that connection&#xD;&#xA;- when I'm in a position I need to check that element's connections&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;![example_image]:(http://img97.imageshack.us/img97/3406/example1v.gif)&#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;1. &quot;the player&quot; is at [6,1]&#xD;&#xA;2. I need to check for all 8 directions if there is a connection there or not&#xD;&#xA;   (this function returns a byte or int[8], doesn't matter)&#xD;&#xA;3. If the player wants to move to [6,2] I dont allow it&#xD;&#xA;   If the player wants to move to [6,1] I allow it and store the new connection" />
  <row Id="36535" PostHistoryTypeId="5" PostId="15940" RevisionGUID="1a1dea26-126d-40a1-a173-7eadf838f1cd" CreationDate="2011-08-13T19:59:19.607" UserId="744" Comment="Fix edit race condition." Text="I have a 10x11 array in my game. What is the best structure and way to store the connections between the elements of the array?&#xD;&#xA;&#xD;&#xA;Some info about the connections:&#xD;&#xA;&#xD;&#xA;- they are simple (2 elements are connected or not)&#xD;&#xA;- an element can be connected with its 8 neighbours&#xD;&#xA;- when I move from one position to another I need to add that connection&#xD;&#xA;- when I'm in a position I need to check that element's connections&#xD;&#xA;&#xD;&#xA;![Example image ][1]&#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;1. &quot;the player&quot; is at [6,1]&#xD;&#xA;2. I need to check for all 8 directions if there is a connection there or not&#xD;&#xA;   (this function returns a byte or int[8], doesn't matter)&#xD;&#xA;3. If the player wants to move to [6,2] I dont allow it&#xD;&#xA;   If the player wants to move to [6,1] I allow it and store the new connection&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Ok6rv.gif" />
  <row Id="36536" PostHistoryTypeId="5" PostId="15940" RevisionGUID="65d33906-36af-48e9-97fd-3263055e55a2" CreationDate="2011-08-13T20:02:22.210" UserId="9245" Comment="image link" Text="I have a 10x11 array in my game. What is the best structure and way to store the connections between the elements of the array?&#xD;&#xA;&#xD;&#xA;Some info about the connections:&#xD;&#xA;&#xD;&#xA;- they are simple (2 elements are connected or not)&#xD;&#xA;- an element can be connected with its 8 neighbours&#xD;&#xA;- when I move from one position to another I need to add that connection&#xD;&#xA;- when I'm in a position I need to check that element's connections&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;http://img97.imageshack.us/img97/3406/example1v.gif&#xD;&#xA;&#xD;&#xA;For example: &quot;the player&quot; is at [6,1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. I need to check for all 8 directions if there is a connection there or not(this function returns a byte or int[8], doesn't matter)&#xD;&#xA; 2. If the player wants to move to [6,2] I dont allow it&#xD;&#xA; 3. If the player wants to move to [6,1] I allow it and store the new connection" />
  <row Id="36537" PostHistoryTypeId="2" PostId="15951" RevisionGUID="3e3b68e8-a309-452b-a339-8e586dbfc576" CreationDate="2011-08-13T20:05:03.580" UserId="8973" Text="I think you have made a really noble effort, but it seems there are fundamental problems with how the code is structured. As other have suggested, it may help to separate the operations into discreet parts, eg:&#xD;&#xA;&#xD;&#xA; 1. **Broad phase**: Loop through all the objects - do a quick test (eg, AABB) to determine which objects may be colliding - discard those that aren't.&#xD;&#xA; 1. **Narrow phase**: Loop through all the colliding objects - calculate a penetration vector for the collision (eg, using SAT).&#xD;&#xA; 1. **Collision response**: Loop through the list of collision vectors - calculate a force vector based on the mass, then use this to calculate an acceleration vector.&#xD;&#xA; 1. **Integration**: Loop through all the acceleration vectors and integrate position (and rotation if needed).&#xD;&#xA; 1. **Rendering**: Loop through all the calculated positions and render each object.&#xD;&#xA;&#xD;&#xA;By separating the phases all objects are updated progressively in sync and you won't have the order dependencies you are currently struggling with. The code also generally turns out to be simpler and easier to change. Each of these phases is fairly generic, and it's often possible to substitute better algorithms after you have a working system.&#xD;&#xA;&#xD;&#xA;That said, each of these parts is a science in itself, and can occupy a great deal of time trying to find the optimal solution. It may be better to start with some of the most commonly used algorithms:&#xD;&#xA;&#xD;&#xA; - **Broad phase collision detection**: [Spatial hashing][1].&#xD;&#xA; - **Narrow phase collision detection**: For simple tile physics, you can just apply Axis Aligned Bounding Box (AABB) intersection tests. For more complicated shapes you can use [Separating Axis Theorem][2]. Whatever algorithm you use, it should return the direction and depth of an intersection between two objects. &#xD;&#xA; - **Collision response**: [Projection][3]. &#xD;&#xA; - **Integration**: The integrator is the largest determinant of the engine's stability and speed. Two popular options are [Verlet][4] (fast but simple) or RK4 (accurate but slow) integration. Using verlet integration can lead to an extremely simple design as most physical behaviours (bounce, rotation) just work without too much effort. One of the best references I have seen for learning RK4 integration is [Glen Fiedler's series on physics for games][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freespace.virgin.net/hugo.elias/models/m_colide.htm&#xD;&#xA;  [2]: http://www.metanetsoftware.com/technique/tutorialA.html&#xD;&#xA;  [3]: http://www.metanetsoftware.com/technique/tutorialA.html&#xD;&#xA;  [4]: http://www.bit-101.com/fotb/AdvancedASAnimation.pdf&#xD;&#xA;  [5]: http://gafferongames.com/game-physics/" />
  <row Id="36538" PostHistoryTypeId="16" PostId="15951" RevisionGUID="bf3acb95-e460-4a18-9cbc-4f452071e885" CreationDate="2011-08-13T20:05:03.580" UserId="8973" />
  <row Id="36539" PostHistoryTypeId="5" PostId="15929" RevisionGUID="46d0defa-0b2d-4b27-b54e-48931eff4535" CreationDate="2011-08-13T20:11:05.210" UserId="159" Comment="added 85 characters in body" Text="Given the image below, I need to detect the most optimal sequence on the board (the green line). The blue/red lines represent possible, but not the best moves.&#xD;&#xA;&#xD;&#xA;Here are the rules:&#xD;&#xA;&#xD;&#xA; 1. You can move to any tile that is the same, and is your neighbor (diagonal is valid)&#xD;&#xA; 2. Once you have visited a tile, you can't visit it again.&#xD;&#xA;&#xD;&#xA;I have thought about looping through each node, and looking at its neighbors, then recursively going through. Once I find a possible move I can put it into a structure. Once all possible moves are found I just pick the move with the highest count of node. It becomes more difficult when a node has more than one neighbor that matches.&#xD;&#xA;&#xD;&#xA;So, is there some algorithm that I can use? I was thinking some sort of flood fill, but that doesn't meet rules #2.&#xD;&#xA;&#xD;&#xA;As requested, here is a video of similar gameplay youtube.com/watch?v=eumnCTG0AE8&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Wz8Lw.png" />
  <row Id="36540" PostHistoryTypeId="5" PostId="15940" RevisionGUID="130ca89f-0503-414e-add5-8274cdf7488a" CreationDate="2011-08-13T20:14:06.807" UserId="744" Comment="Let's try this again..." Text="I have a 10x11 array in my game. What is the best structure and way to store the connections between the elements of the array?&#xD;&#xA;&#xD;&#xA;Some info about the connections:&#xD;&#xA;&#xD;&#xA;- they are simple (2 elements are connected or not)&#xD;&#xA;- an element can be connected with its 8 neighbours&#xD;&#xA;- when I move from one position to another I need to add that connection&#xD;&#xA;- when I'm in a position I need to check that element's connections&#xD;&#xA;&#xD;&#xA;![example of grid][1]&#xD;&#xA;&#xD;&#xA;For example: &quot;the player&quot; is at [6,1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. I need to check for all 8 directions if there is a connection there or not(this function returns a byte or int[8], doesn't matter)&#xD;&#xA; 2. If the player wants to move to [6,2] I dont allow it&#xD;&#xA; 3. If the player wants to move to [6,1] I allow it and store the new connection&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/jjUhs.gif" />
  <row Id="36542" PostHistoryTypeId="25" PostId="15940" RevisionGUID="ba5d716a-398a-4c64-ae5d-a8a5d5d1e2f9" CreationDate="2011-08-13T20:37:03.807" Comment="http://twitter.com/#!/StackGameDev/status/102478797353394176" />
  <row Id="36543" PostHistoryTypeId="25" PostId="15942" RevisionGUID="b908dcaf-addb-40c8-9123-8e326e8bee98" CreationDate="2011-08-13T22:37:03.903" Comment="http://twitter.com/#!/StackGameDev/status/102508996006653952" />
  <row Id="36544" PostHistoryTypeId="2" PostId="15952" RevisionGUID="cb112138-946b-4840-910d-c745fea8da20" CreationDate="2011-08-13T22:50:38.623" UserId="5824" Text="I'd suggest creating a list of cubic [Bézier curves][1] for each unit to follow. This will give you nice smooth paths.&#xD;&#xA;&#xD;&#xA;To join multiple curves into a single curve smoothly, every control point at which two curves join must be on the line between the two control points on either side.&#xD;&#xA;&#xD;&#xA;They only difficulty with them is that maintaining a consistent speed of travel requires a bit of extra work. One way to achieve that is to do a binary search each frame to find the new value of the curve parameter required to travel a specified distance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/B%C3%A9zier_curve" />
  <row Id="36545" PostHistoryTypeId="5" PostId="15929" RevisionGUID="892a3c67-09ea-48f7-997c-778dee3026a1" CreationDate="2011-08-13T23:07:22.680" UserId="159" Comment="added 8 characters in body" Text="Given the image below, I need to detect the most optimal sequence on the board (the green line). The blue/red lines represent possible, but not the best moves.&#xD;&#xA;&#xD;&#xA;Here are the rules:&#xD;&#xA;&#xD;&#xA; 1. You can move to any tile that is the same, and is your neighbor (diagonal is valid)&#xD;&#xA; 2. Once you have visited a tile, you can't visit it again.&#xD;&#xA;&#xD;&#xA;I have thought about looping through each node, and looking at its neighbors, then recursively going through. Once I find a possible move I can put it into a structure. Once all possible moves are found I just pick the move with the highest count of node. It becomes more difficult when a node has more than one neighbor that matches.&#xD;&#xA;&#xD;&#xA;So, is there some algorithm that I can use? I was thinking some sort of flood fill, but that doesn't meet rules #2.&#xD;&#xA;&#xD;&#xA;As requested, here is a video of similar gameplay. http://youtube.com/watch?v=eumnCTG0AE8&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Wz8Lw.png" />
  <row Id="36546" PostHistoryTypeId="2" PostId="15953" RevisionGUID="aad8890e-e700-4058-812c-9926bba7c127" CreationDate="2011-08-13T23:23:50.240" UserId="8240" Text="The only real way we have to test such things is with, well, *testing*. Professional game developers will tell you all the time that the single most effective way to know if certain gameplay is working and fun is to give it to players and observe.&#xD;&#xA;&#xD;&#xA;Indeed, one of the reasons that achievements are everywhere these days in games is because they give invaluable information to the developer. If you want to know where players stopped playing your game, make an achievement for completing each level. If you want to know how many players *aren't* playing a certain race in Civilization, look at how many people got the achievement for playing that race. And so on." />
  <row Id="36547" PostHistoryTypeId="2" PostId="15954" RevisionGUID="bb1264ff-2c0e-4294-bcc7-484661256428" CreationDate="2011-08-13T23:26:09.377" UserId="9254" Text="Fireworks have all you need believe me, I invest almost a mont looking for the best tool for this work-" />
  <row Id="36548" PostHistoryTypeId="2" PostId="15955" RevisionGUID="767ea4e4-6a10-4800-8432-9f79095ccb7f" CreationDate="2011-08-13T23:45:35.460" UserId="7946" Text="Can you recommend a scripting language which allows me to easily parse &quot;one-liner&quot; types of scripts (they're just commands, really)?&#xD;&#xA;&#xD;&#xA;For example, a C/C++ function which simply sets the value of a 2-dimensional vector (position, for example):&#xD;&#xA;&#xD;&#xA;    void SetVector(Vector2 &amp;vector, float x, float y)&#xD;&#xA;    {&#xD;&#xA;        vector.x = x;&#xD;&#xA;        vector.y = y;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And in the scripting language, the entire script should be able to just be one line long. For example, this would be a script to set the components of vector &quot;a&quot; to 123.0f and 456.0f (x and y) (syntax of the language doesn't really matter, just as an example):&#xD;&#xA;&#xD;&#xA;    set_vector a 123,456 &#xD;&#xA;&#xD;&#xA;I'd use these short scripts to do simple things like change the position of objects during runtime (for debugging or other purposes), create simple config files for all kinds of entities which would go like:&#xD;&#xA;&#xD;&#xA;bomb.script:&#xD;&#xA;&#xD;&#xA;    set_damage 1000&#xD;&#xA;    set_range 250&#xD;&#xA;    set_texture Data/Sprites/bomb.png&#xD;&#xA;&#xD;&#xA;etc.&#xD;&#xA;&#xD;&#xA;From a superficial glance, Lua, AngelScript etc. seem to be a little bit bloated for my simple needs (Although I must admit I haven't put tons of time into those two). Can you recommend something better?" />
  <row Id="36549" PostHistoryTypeId="1" PostId="15955" RevisionGUID="767ea4e4-6a10-4800-8432-9f79095ccb7f" CreationDate="2011-08-13T23:45:35.460" UserId="7946" Text="Simple scripting language for &quot;one-liner&quot;-type scripts?" />
  <row Id="36550" PostHistoryTypeId="3" PostId="15955" RevisionGUID="767ea4e4-6a10-4800-8432-9f79095ccb7f" CreationDate="2011-08-13T23:45:35.460" UserId="7946" Text="&lt;c++&gt;&lt;scripting&gt;" />
  <row Id="36551" PostHistoryTypeId="25" PostId="15920" RevisionGUID="8177fa59-905d-47f9-9eba-f8ebfbf85dd0" CreationDate="2011-08-14T00:37:04.003" Comment="http://twitter.com/#!/StackGameDev/status/102539196065001472" />
  <row Id="36552" PostHistoryTypeId="2" PostId="15956" RevisionGUID="05640cc4-8253-4a58-8a55-f84145290096" CreationDate="2011-08-14T00:41:54.637" UserId="9256" Text="I am drawing a Texture2d onto the screen and have the need to rotate the texture forward, in a 3d way.  I'm using the spritebatch.draw() function and it only allows limited 2d rotation in a circle.  From tons of research online I have boiled down the solution to passing either an effect or matrix to the spritebatch.begin; however, after many hours of trial and error I haven't come up with anything working.&#xD;&#xA;&#xD;&#xA;Hopefully this question makes sense - thanks ahead of time for your help." />
  <row Id="36553" PostHistoryTypeId="1" PostId="15956" RevisionGUID="05640cc4-8253-4a58-8a55-f84145290096" CreationDate="2011-08-14T00:41:54.637" UserId="9256" Text="XNA Rotate Texture2d Forward(3d)" />
  <row Id="36554" PostHistoryTypeId="3" PostId="15956" RevisionGUID="05640cc4-8253-4a58-8a55-f84145290096" CreationDate="2011-08-14T00:41:54.637" UserId="9256" Text="&lt;xna&gt;&lt;spritebatch&gt;" />
  <row Id="36555" PostHistoryTypeId="2" PostId="15957" RevisionGUID="cfb8e075-4289-4bfb-b1a1-b2bedda4c9c2" CreationDate="2011-08-14T00:51:34.360" UserId="9257" Text="Would finishing an entire course about C# at HomeAndLearn.co.uk and then jumping into XNA be a wise path to take?&#xD;&#xA;&#xD;&#xA;Ultimate goal is to be able to create **quality/polished** multiplayer 2D and some simple 3D games." />
  <row Id="36556" PostHistoryTypeId="1" PostId="15957" RevisionGUID="cfb8e075-4289-4bfb-b1a1-b2bedda4c9c2" CreationDate="2011-08-14T00:51:34.360" UserId="9257" Text="Wise approach to becoming good at C# XNA" />
  <row Id="36557" PostHistoryTypeId="3" PostId="15957" RevisionGUID="cfb8e075-4289-4bfb-b1a1-b2bedda4c9c2" CreationDate="2011-08-14T00:51:34.360" UserId="9257" Text="&lt;xna&gt;&lt;c#&gt;&lt;multiplayer&gt;" />
  <row Id="36558" PostHistoryTypeId="5" PostId="15957" RevisionGUID="93e39b55-8aa1-4437-bf0d-75d044f95468" CreationDate="2011-08-14T01:04:06.077" UserId="9257" Comment="deleted 50 characters in body" Text="Would finishing an entire course about C# at HomeAndLearn.co.uk and then jumping into XNA be a wise path to take?&#xD;&#xA;&#xD;&#xA;Ultimate goal is to create a multiplayer 2D game." />
  <row Id="36559" PostHistoryTypeId="2" PostId="15958" RevisionGUID="0ca54acb-ca38-416d-9207-a6f03289dbaf" CreationDate="2011-08-14T01:08:18.507" UserId="8240" Text="As far as simple, &quot;one-liner&quot; scripts are concerned, Lua is a perfectly legitimate choice. Function binding is easy, even with the native API (though there are plenty of helpers for this). It's syntax is pretty easy to learn.&#xD;&#xA;&#xD;&#xA;Lua also makes a good data-description language, much like JSON or XML.&#xD;&#xA;&#xD;&#xA;Also, don't cut yourself short in terms of room to grow. Right now, you may only want &quot;configuration scripts.&quot; But you'd be surprised how easily you might want logic to start creeping into those configurations. Maybe you spawn certain entities based on game state. Or change the texture of something based on game state. Whatever.&#xD;&#xA;&#xD;&#xA;Lua can handle all of these kinds of things quite readily.&#xD;&#xA;&#xD;&#xA;It is much easier to have too much power and not use it, than it is to have less power and then suddenly need more. Lua's power will be there if you use it, and if you don't, then you won't care. It'll still be quick and simple." />
  <row Id="36560" PostHistoryTypeId="2" PostId="15959" RevisionGUID="25c0f89b-ba60-4d03-be37-7e6cbd553650" CreationDate="2011-08-14T01:13:47.657" UserId="9258" Text="The code below compiles fine on the Flex 4 SDK on Fedora 15.  Mouse-click opens the dialog box, I click okay, and a file is saved, **but the file is empty**.  I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data.&#xD;&#xA;&#xD;&#xA;I was thinking there was a permissions problem, but if that were so, *why should I be able to even save a file*?&#xD;&#xA;&#xD;&#xA;    /*&#xD;&#xA;    WriteTheFile.as&#xD;&#xA;    Based on Original code by Brian Hodge&#xD;&#xA;    Test to see if ActionScript/Flash can write files&#xD;&#xA;    */&#xD;&#xA;    package{&#xD;&#xA;    import flash.display.Sprite;&#xD;&#xA;    import flash.events.Event;&#xD;&#xA;    import flash.events.MouseEvent;&#xD;&#xA;    import flash.utils.ByteArray;&#xD;&#xA;    import flash.net.FileReference;&#xD;&#xA;&#xD;&#xA;	public class WriteTheFile extends Sprite &#xD;&#xA;	{&#xD;&#xA;		private var _xml:String;&#xD;&#xA;&#xD;&#xA;		public function WriteTheFile():void &#xD;&#xA;		{&#xD;&#xA;				if (stage) init();&#xD;&#xA;				else addEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		private function init(e:Event = null):void &#xD;&#xA;		{&#xD;&#xA;				removeEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;				//Calling the save method requires user interaction and Flash Player 10&#xD;&#xA;				stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown);&#xD;&#xA;		}&#xD;&#xA;		private function _onMouseDown(e:MouseEvent):void&#xD;&#xA;		{&#xD;&#xA;				fr.save(&quot;&lt;xml&gt;&lt;test&gt;data&lt;/test&gt;&lt;/xml&gt;&quot;, &quot;filename.txt&quot;);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;    }" />
  <row Id="36561" PostHistoryTypeId="1" PostId="15959" RevisionGUID="25c0f89b-ba60-4d03-be37-7e6cbd553650" CreationDate="2011-08-14T01:13:47.657" UserId="9258" Text="Flash saves in Windows, not in Linux, FileReference.save()" />
  <row Id="36562" PostHistoryTypeId="3" PostId="15959" RevisionGUID="25c0f89b-ba60-4d03-be37-7e6cbd553650" CreationDate="2011-08-14T01:13:47.657" UserId="9258" Text="&lt;actionscript-3&gt;&lt;file&gt;" />
  <row Id="36563" PostHistoryTypeId="5" PostId="15959" RevisionGUID="84e69ce5-6647-4956-962c-76cfa86c490a" CreationDate="2011-08-14T01:36:37.573" UserId="9258" Comment="Added missing line" Text="The code below compiles fine on the Flex 4 SDK on Fedora 15.  Mouse-click opens the dialog box, I click okay, and a file is saved, **but the file is empty**.  I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data.&#xD;&#xA;&#xD;&#xA;I was thinking there was a permissions problem, but if that were so, *why should I be able to even save a file*?&#xD;&#xA;&#xD;&#xA;        /*&#xD;&#xA;    WriteTheFile.as&#xD;&#xA;    Original code by Brian Hodge (brian@hodgedev.com)&#xD;&#xA;    Test to see if ActionScript/Flash can write files&#xD;&#xA;    */&#xD;&#xA;    package{&#xD;&#xA;    import flash.display.Sprite;&#xD;&#xA;    import flash.events.Event;&#xD;&#xA;    import flash.events.MouseEvent;&#xD;&#xA;    import flash.utils.ByteArray;&#xD;&#xA;    import flash.net.FileReference;&#xD;&#xA;&#xD;&#xA;	public class WriteTheFile extends Sprite &#xD;&#xA;	{&#xD;&#xA;		private var _xml:String;&#xD;&#xA;&#xD;&#xA;		public function WriteTheFile():void &#xD;&#xA;		{&#xD;&#xA;				if (stage) init();&#xD;&#xA;				else addEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		private function init(e:Event = null):void &#xD;&#xA;		{&#xD;&#xA;				removeEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;				//Calling the save method requires user interaction and Flash Player 10&#xD;&#xA;				stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown);&#xD;&#xA;		}&#xD;&#xA;		private function _onMouseDown(e:MouseEvent):void&#xD;&#xA;		{&#xD;&#xA;				var fr:FileReference = new FileReference();&#xD;&#xA;				fr.save(&quot;&lt;xml&gt;&lt;test&gt;data&lt;/test&gt;&lt;/xml&gt;&quot;, &quot;filename.txt&quot;);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;    }" />
  <row Id="36564" PostHistoryTypeId="25" PostId="15817" RevisionGUID="76e79070-3651-4223-9b44-68fbf9b0f062" CreationDate="2011-08-14T02:37:03.843" Comment="http://twitter.com/#!/StackGameDev/status/102569393715814400" />
  <row Id="36565" PostHistoryTypeId="2" PostId="15960" RevisionGUID="d608a9bc-aa91-45ca-a0c9-afa6229447f9" CreationDate="2011-08-14T03:00:04.323" UserId="159" Text="Since I have never taken those courses, I can't speak for that site. However, I can tell you that no amount of classes or lessons will compare to experience. The best way to learn is to jump in and do stuff.&#xD;&#xA;&#xD;&#xA;C# is a pretty easy language to pick up. There are plenty of sites that offer tutorials free. Also, XNA is just a library that sits on C#. There really isn't any reason why you can't learn C# by making simple games. &#xD;&#xA;&#xD;&#xA;Start by making something simple. Maybe a static sprite that moves across the screen when you press certain buttons. Add some objects to play with collision. Then when you feel comfortable with that work on sprite animations, and a simple camera. It really isn't hard.&#xD;&#xA;&#xD;&#xA;If you want a jump start, look at something like [Flat Red Ball][1]. It is simple 2.5D game engine that might help. If you want to make your own, look at [this tile engine series][2]. It will show you stuff like how to make a camera, animations, collision, and the rest. There is also [this 2d tutorial series][3]. I don't have a nice playlist for it so you will have to search youtube for the different parts.&#xD;&#xA;&#xD;&#xA;If you really want to take classes, I can vouch for http://LearnVisualStudio.net. I know a few people who have taken them, and have seen the content. It is presented nicely and easy to follow.&#xD;&#xA;&#xD;&#xA;When in doubt, come back here and ask questions. The people here are very responsive and helpful. If you need help on general C#/programming concepts try http://stackoverflow.com. It is another wonderful resource.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com&#xD;&#xA;  [2]: http://www.youtube.com/view_play_list?p=0A865073DA96A7DA&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=caLSZStt050" />
  <row Id="36566" PostHistoryTypeId="5" PostId="15958" RevisionGUID="8733d103-c8e4-4bec-8771-0b0acddd5a0a" CreationDate="2011-08-14T03:11:40.227" UserId="8240" Comment="added 183 characters in body" Text="As far as simple, &quot;one-liner&quot; scripts are concerned, Lua is a perfectly legitimate choice. Function binding is easy, even with the native API (though there are plenty of helpers for this). It's syntax is pretty easy to learn. Oh, and the runtime is *tiny*, if that sort of thing matters to you. You won't even have to include its standard libraries, so it'll be even smaller than the compiled static library.&#xD;&#xA;&#xD;&#xA;Lua also makes a good data-description language, much like JSON or XML.&#xD;&#xA;&#xD;&#xA;Also, don't cut yourself short in terms of room to grow. Right now, you may only want &quot;configuration scripts.&quot; But you'd be surprised how easily you might want logic to start creeping into those configurations. Maybe you spawn certain entities based on game state. Or change the texture of something based on game state. Whatever.&#xD;&#xA;&#xD;&#xA;Lua can handle all of these kinds of things quite readily.&#xD;&#xA;&#xD;&#xA;It is much easier to have too much power and not use it, than it is to have less power and then suddenly need more. Lua's power will be there if you use it, and if you don't, then you won't care. It'll still be quick and simple." />
  <row Id="36567" PostHistoryTypeId="2" PostId="15961" RevisionGUID="7fe23c8f-449c-4c84-a244-f92d26d1327b" CreationDate="2011-08-14T03:23:31.570" UserId="9084" Text="The object should be offset along with the parallax in addition to its movement within the layer.&#xD;&#xA;&#xD;&#xA;When doing parallax rendering, the layers themself aren't actually moving, its just the viewport that changes. Anything on the same depth as a parallax layer should be moving along with it, and if it is moving, you should simply add that on top." />
  <row Id="36568" PostHistoryTypeId="25" PostId="15959" RevisionGUID="fc4e3c92-bd17-4b45-bb35-3666272e6194" CreationDate="2011-08-14T04:37:04.087" Comment="http://twitter.com/#!/StackGameDev/status/102599593497329664" />
  <row Id="36569" PostHistoryTypeId="2" PostId="15962" RevisionGUID="dca131cf-007e-4a71-92e4-fafc6b8fdae1" CreationDate="2011-08-14T04:48:28.810" UserId="14" Text="Apache Server, Flash, PHP, Javascript, and a few other things. &#xD;&#xA;&#xD;&#xA;Source: http://builtwith.com/duelingnetwork.com&#xD;&#xA;&#xD;&#xA;This may not be 100% accurate, but it at least lets you tell what technology that front page is reporting." />
  <row Id="36570" PostHistoryTypeId="5" PostId="15960" RevisionGUID="148a1185-65a6-4819-ab5c-d4b79950d52d" CreationDate="2011-08-14T05:10:12.583" UserId="159" Comment="added 150 characters in body" Text="Since I have never taken those courses, I can't speak for that site. However, I can tell you that no amount of classes or lessons will compare to experience. The best way to learn is to jump in and do stuff.&#xD;&#xA;&#xD;&#xA;C# is a pretty easy language to pick up. There are plenty of sites that offer tutorials free. Also, XNA is just a library that sits on C#. There really isn't any reason why you can't learn C# by making simple games. &#xD;&#xA;&#xD;&#xA;Start by making something simple. Maybe a static sprite that moves across the screen when you press certain buttons. Add some objects to play with collision. Then when you feel comfortable with that work on sprite animations, and a simple camera. It really isn't hard.&#xD;&#xA;&#xD;&#xA;If you want a jump start, look at something like [Flat Red Ball][1]. It is simple 2.5D game engine that might help. If you want to make your own, look at [this tile engine series][2]. It will show you stuff like how to make a camera, animations, collision, and the rest. There is also [this 2d tutorial series][3]. I don't have a nice playlist for it so you will have to search youtube for the different parts. For even more resources, check out the [ever-growing list of samples][4] on the App Hub site.&#xD;&#xA;&#xD;&#xA;If you really want to take classes, I can vouch for http://LearnVisualStudio.net. I know a few people who have taken them, and have seen the content. It is presented nicely and easy to follow.&#xD;&#xA;&#xD;&#xA;When in doubt, come back here and ask questions. The people here are very responsive and helpful. If you need help on general C#/programming concepts try http://stackoverflow.com. It is another wonderful resource.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com&#xD;&#xA;  [2]: http://www.youtube.com/view_play_list?p=0A865073DA96A7DA&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=caLSZStt050&#xD;&#xA;  [4]: http://create.msdn.com/en-US/education/catalog/" />
  <row Id="36571" PostHistoryTypeId="2" PostId="15963" RevisionGUID="1a7b8c00-04e1-42ac-afad-206bced426cf" CreationDate="2011-08-14T05:39:57.203" UserId="7641" Text="This is a more academic type question, because I've already decided this is not what I want for the game I'm writing. But it came up as a possible approach, and it seems easily solvable, albeit with some math that is beyond me. That's why I'm just interested to see how someone more experienced would approach it.&#xD;&#xA;&#xD;&#xA;The problem: An autonomous ship starts at the outskirts of a solar system, and wants to move to a moving target, which is one of the planets. There are also many other planets moving at the same time, and these should be considered the only obstacles. I want to find the optimal path to the target. To keep it simple, the world is 2D, and the planets are moving in uniform circular motion around the sun as opposed to how planets actually behave.  Also, assume the ship knows pretty much everything about the world. Most importantly, the location, speed, and orbit radius of every planet.&#xD;&#xA;&#xD;&#xA;With complete knowledge, this seems conceptually simple. For any planet and any time, you can find its location by doing some fairly simple math. But how would you apply this to pathfinding? Would it be just to pathfind in 3 dimensions: x, y, and t? In theory this makes sense, but I think working that out to an actual solution would involve a lot of complications. Is it really as simple as 'setup a* on a grid with x,y,t values'?" />
  <row Id="36572" PostHistoryTypeId="1" PostId="15963" RevisionGUID="1a7b8c00-04e1-42ac-afad-206bced426cf" CreationDate="2011-08-14T05:39:57.203" UserId="7641" Text="Pathfinding while avoiding obstacles moving in uniform circular motion" />
  <row Id="36573" PostHistoryTypeId="3" PostId="15963" RevisionGUID="1a7b8c00-04e1-42ac-afad-206bced426cf" CreationDate="2011-08-14T05:39:57.203" UserId="7641" Text="&lt;path-finding&gt;" />
  <row Id="36574" PostHistoryTypeId="25" PostId="15956" RevisionGUID="52b3ed7a-0516-4fc9-ab94-200834c579e3" CreationDate="2011-08-14T06:37:03.653" Comment="http://twitter.com/#!/StackGameDev/status/102629790846160896" />
  <row Id="36575" PostHistoryTypeId="2" PostId="15964" RevisionGUID="8b78d3d0-128f-4134-a16d-215ffaed9354" CreationDate="2011-08-14T08:12:54.727" UserId="3505" Text="A* is an optimization of the simpler Dijkstra algorithm, in it's base form that optimization assumes that the target is standing still. Basic Dijkstra is perfectly applicable to a moving system. You could try to gain some of A*'s advantage by calculating a simple interception vector to use instead of distance in A*.&#xD;&#xA;&#xD;&#xA;Though all this does assume that your spaceship moves in a simple grid, the problem will be much harder if it has a more complex movement structure." />
  <row Id="36576" PostHistoryTypeId="2" PostId="15965" RevisionGUID="9cd1ddf6-7780-4149-b2fc-f39d9d53da4b" CreationDate="2011-08-14T08:18:31.603" UserId="2897" Text="I followed your link and checked out the tutorial, your code seemed a little strange after looking at crater's texture which had alpha pixels as mask, so I downloaded tutorial's source. It's working fine for me, and there are differences from your code in these lines:&#xD;&#xA;&#xD;&#xA;      alphaTestEffect.AlphaFunction = CompareFunction.Equal;&#xD;&#xA;      alphaTestEffect.ReferenceAlpha = 0;&#xD;&#xA;&#xD;&#xA;These code lines mean pixels whose alpha is equal to zero will be kicked out. In the context of this tutorial it means only actual transparent crater with it's half-transparent edges will be drawn to the stencil buffer setting it to 1, and solid white background will be discarded." />
  <row Id="36578" PostHistoryTypeId="25" PostId="15797" RevisionGUID="2a83da73-8a72-41d1-a074-166a370cab68" CreationDate="2011-08-14T08:37:03.933" Comment="http://twitter.com/#!/StackGameDev/status/102659990992584704" />
  <row Id="36579" PostHistoryTypeId="2" PostId="15967" RevisionGUID="c9b86e5b-3dc5-4f90-a34f-24f0fe9f2f14" CreationDate="2011-08-14T08:49:12.073" UserId="9259" Text="I am a bit confused about that I need to move my basic square .Should i use my translate matrix or just change the object vertexes. Which one is accurate ?.&#xD;&#xA;&#xD;&#xA;I use vertex shader gl_Position = myPMVMatrix * a_vertex;&#xD;&#xA;&#xD;&#xA;and also i use VBO&#xD;&#xA;&#xD;&#xA;sorry guys for my english.&#xD;&#xA;" />
  <row Id="36580" PostHistoryTypeId="1" PostId="15967" RevisionGUID="c9b86e5b-3dc5-4f90-a34f-24f0fe9f2f14" CreationDate="2011-08-14T08:49:12.073" UserId="9259" Text="Moving objects Opengl 2.0" />
  <row Id="36581" PostHistoryTypeId="3" PostId="15967" RevisionGUID="c9b86e5b-3dc5-4f90-a34f-24f0fe9f2f14" CreationDate="2011-08-14T08:49:12.073" UserId="9259" Text="&lt;opengl&gt;" />
  <row Id="36582" PostHistoryTypeId="2" PostId="15968" RevisionGUID="60f67b2a-a232-48ac-a1cc-4c7f66a874ea" CreationDate="2011-08-14T09:36:36.847" UserId="5116" Text="What I usually do in my code is quite simple:&#xD;&#xA;&#xD;&#xA;First of all, you must calculate how much your character has penetrated inside the other object, in each axis.&#xD;&#xA;&#xD;&#xA;    int penX = (character.Left &lt; object.Right)&#xD;&#xA;      ? character.Left - object.Right&#xD;&#xA;      : character.Right - object.Left;&#xD;&#xA;&#xD;&#xA;Then, one at a time, substract this distance, which will be smaller than the character's delta, from the character position and check if the collision is no more. If the collision still exists, undo the substraction and test the next axis (or both at the same time). If, on the other hand, the collision is no more, your character is now collision free, right beside/above/below the object it collided with.&#xD;&#xA;&#xD;&#xA;Since it is a one step system, there is no way you'll end appearing above the object you collided with. That is, unless the character is completely inside a wall or something like that. In this case, adding a couple more calculations to take movement delta into account (knowing where you are coming from) would fix the problem.&#xD;&#xA;&#xD;&#xA;Note: it only works when calculating collisions of one moving object against a static one. For collisions of two moving objects it requires a precedence system or some tweaks (e.g. distinguishing dynamic from kinematic objects, as Unity does). Otherwise, strange things happen.&#xD;&#xA;&#xD;&#xA;P.S.: I'm sorry I am not adding the code. It's in an old project in my SVN, and finding it would take quite some time." />
  <row Id="36583" PostHistoryTypeId="4" PostId="15967" RevisionGUID="6812c918-dcc7-4f72-bb99-8c9f03eb60a8" CreationDate="2011-08-14T09:44:35.667" UserId="9259" Comment="edited title" Text="Moving objects Opengl ES 2.0" />
  <row Id="36584" PostHistoryTypeId="5" PostId="15951" RevisionGUID="3a2844ff-378e-4ecd-aa40-aa08069d8564" CreationDate="2011-08-14T09:56:50.477" UserId="8973" Comment="Added penetration vector. Added links to newtons laws of motion." Text="I think you have made a really noble effort, but it seems there are fundamental problems with how the code is structured. As other have suggested, it may help to separate the operations into discreet parts, eg:&#xD;&#xA;&#xD;&#xA; 1. **Broad phase**: Loop through all the objects - do a quick test (eg, AABB) to determine which objects may be colliding - discard those that aren't.&#xD;&#xA; 1. **Narrow phase**: Loop through all the colliding objects - calculate a penetration vector for the collision (eg, using SAT).&#xD;&#xA; 1. **Collision response**: Loop through the list of collision vectors - calculate a force vector based on the mass, then use this to calculate an acceleration vector.&#xD;&#xA; 1. **Integration**: Loop through all the acceleration vectors and integrate position (and rotation if needed).&#xD;&#xA; 1. **Rendering**: Loop through all the calculated positions and render each object.&#xD;&#xA;&#xD;&#xA;By separating the phases all objects are updated progressively in sync and you won't have the order dependencies you are currently struggling with. The code also generally turns out to be simpler and easier to change. Each of these phases is fairly generic, and it's often possible to substitute better algorithms after you have a working system.&#xD;&#xA;&#xD;&#xA;That said, each of these parts is a science in itself, and can occupy a great deal of time trying to find the optimal solution. It may be better to start with some of the most commonly used algorithms:&#xD;&#xA;&#xD;&#xA; - **Broad phase collision detection**: [Spatial hashing][1].&#xD;&#xA; - **Narrow phase collision detection**: For simple tile physics, you can just apply Axis Aligned Bounding Box (AABB) intersection tests. For more complicated shapes you can use [Separating Axis Theorem][2]. Whatever algorithm you use, it should return the direction and depth of an intersection between two objects (called the penetration vector). &#xD;&#xA; - **Collision response**: Use [Projection][3] to resolve inter-penetration. &#xD;&#xA; - **Integration**: The integrator is the largest determinant of the engine's stability and speed. Two popular options are [Verlet][4] (fast but simple) or RK4 (accurate but slow) integration. Using verlet integration can lead to an extremely simple design as most physical behaviours (bounce, rotation) just work without too much effort. One of the best references I have seen for learning RK4 integration is [Glen Fiedler's series on physics for games][5].&#xD;&#xA;&#xD;&#xA;A good (and obvious) place to start is with [Newton's laws of motion][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freespace.virgin.net/hugo.elias/models/m_colide.htm&#xD;&#xA;  [2]: http://www.metanetsoftware.com/technique/tutorialA.html&#xD;&#xA;  [3]: http://www.metanetsoftware.com/technique/tutorialA.html&#xD;&#xA;  [4]: http://www.bit-101.com/fotb/AdvancedASAnimation.pdf&#xD;&#xA;  [5]: http://gafferongames.com/game-physics/&#xD;&#xA;  [6]: http://en.wikipedia.org/wiki/Newton%27s_laws_of_motion" />
  <row Id="36585" PostHistoryTypeId="25" PostId="15963" RevisionGUID="00e33514-397a-4e67-9b20-c74a45aa6270" CreationDate="2011-08-14T10:37:04.017" Comment="http://twitter.com/#!/StackGameDev/status/102690190602153984" />
  <row Id="36586" PostHistoryTypeId="2" PostId="15969" RevisionGUID="8e5e30ae-9349-4e09-b041-a1399ca425df" CreationDate="2011-08-14T10:58:47.407" UserId="8973" Text="The problem is due to the garbage collector disposing the `FileReference` object before it has completed writing to the file. &#xD;&#xA;&#xD;&#xA;As for why it works on Linux and not Windows could be attributed to a different memory management strategy in the Linux version of the player compared to the Windows version.&#xD;&#xA;&#xD;&#xA;The solution is to keep a reference to the `FileReference`, eg:&#xD;&#xA;&#xD;&#xA;    public class WriteTheFile extends Sprite &#xD;&#xA;    {&#xD;&#xA;        private var _xml:String;&#xD;&#xA;        private var fr:FileReference = new FileReference();&#xD;&#xA;&#xD;&#xA;        private function _onMouseDown(e:MouseEvent):void&#xD;&#xA;        {&#xD;&#xA;            fr.save(&quot;&lt;xml&gt;&lt;test&gt;data&lt;/test&gt;&lt;/xml&gt;&quot;, &quot;filename.txt&quot;);&#xD;&#xA;        }&#xD;&#xA;    }" />
  <row Id="36587" PostHistoryTypeId="2" PostId="15970" RevisionGUID="7841bc9d-90d4-457a-838f-729f63716e0f" CreationDate="2011-08-14T11:19:39.593" UserId="2798" Text="The best approach is to change the value of your matrix. It is a parameter that is sent to the shader once per object and costs very little to update; changing all your vertices would mean updating the VBO with a very high bandwith cost." />
  <row Id="36588" PostHistoryTypeId="2" PostId="15971" RevisionGUID="2c363c03-d986-4984-a665-94f2dc5d830c" CreationDate="2011-08-14T11:22:52.273" UserId="2897" Text="Well, there is no solution to debug, so let's play a guessing game :)&#xD;&#xA;&#xD;&#xA; - First problem seems to be caused by resolving jump collision on&#xD;&#xA;   the X axis alone thanks to absDepthX always being bigger in `if&#xD;&#xA;   (absDepthY &lt; absDepthX ...)` condition. &#xD;&#xA;   &#xD;&#xA; - Second problem seems to be caused by either bad intersection&#xD;&#xA;   detection or velocity which is bigger than single block dimension,&#xD;&#xA;   then collision logic would fail to detect any collisions.&#xD;&#xA;   &#xD;&#xA; - Not really a big problem, just a strange thing: it looks like velocity is scaled by frame delta time twice.&#xD;&#xA;&#xD;&#xA;I would fix those problems by creating a strong mental image of how I want my collision system to work, imagining its progression by time, drawing several images of main hero colliding with walls and ceiling to keep weird cases in mind, and then writing code from scratch while using other developer's code sample only for insight on some concrete feature implementation details or general inspiration. Well, it's possible to tweak code of others, but then it is a must to understand the said code even better than its original author, or esoteric behavior will emerge sooner or later." />
  <row Id="36589" PostHistoryTypeId="2" PostId="15972" RevisionGUID="d2ec14ed-cc83-4723-b22b-b0df52c1659d" CreationDate="2011-08-14T11:28:07.607" UserId="8973" Text="A simple solution is:&#xD;&#xA;&#xD;&#xA; 1. Calculate the new position for the character (based on velocity, or button presses, or platforms, etc), but don't move them just yet.&#xD;&#xA; 2. Check for collisions with the character at the new position. &#xD;&#xA; 3. If there are no collisions at the new position, then move the character, otherwise, keep the character where they are.&#xD;&#xA;&#xD;&#xA;Apply these steps separately to the X and Y axis so that the character can slide along the unconstrained axis. &#xD;&#xA;&#xD;&#xA;By decoupling the movement of the character from the actual position, the character will only move until it collides with an object.&#xD;&#xA;&#xD;&#xA;Additional info: &#xD;&#xA;If the character is moving at high speed, then you may end up with a problem where the character collides a few pixels before a boundary. In that case you can apply the steps by recursively sub-dividing the distance in halves until the distance between the colliding and non-colliding positions is one pixel. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="36590" PostHistoryTypeId="2" PostId="15973" RevisionGUID="8d357db3-1d0b-4688-9a97-993ac0d9ac2e" CreationDate="2011-08-14T11:28:16.863" UserId="2933" Text="I'm running box2d in C++ and hooking it up to C# via p/invoke. All physics stuff occurs in C++.&#xD;&#xA;&#xD;&#xA;My problem is that bodes know when they are colliding and do so with great precision. However if I have two boxes which are 10x10 units, one located at the origin and is static while another is set 30 units in the sky 4 units across and is dynamic, when the dynamic box falls and hits the static one it stops falling but doesn't turn and slide off the edge.&#xD;&#xA;&#xD;&#xA;Here's a screenshot of what I mean: &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The box on top is as far to the left as it possibly can be, any further left and it will fall past the box on the bottom. There is barely a pixel overlap that's keeping the top box there. As you can see it's not rotating to fall off.&#xD;&#xA;&#xD;&#xA;This also happens (again only the lowest most box is static, the rest fell down a distance to get there),&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any ideas what I'm doing wrong?&#xD;&#xA;&#xD;&#xA;My code for creating boxes is as such:&#xD;&#xA;&#xD;&#xA;    extern &quot;C&quot;&#xD;&#xA;    int CreateBox(b2Vec2 dim, b2Vec2 pos, bool dynamic, int worldid)&#xD;&#xA;    {&#xD;&#xA;        dim.x /= 100.0f;&#xD;&#xA;        dim.y /= 100.0f;&#xD;&#xA;        pos.x /= 100.0f;&#xD;&#xA;        pos.y /= 100.0f;&#xD;&#xA;            &#xD;&#xA;        World &amp;g = GetWorld(worldid);&#xD;&#xA;        b2BodyDef bodef;&#xD;&#xA;        &#xD;&#xA;        bodef.type = b2_kinematicBody;&#xD;&#xA;        if(dynamic)&#xD;&#xA;        {&#xD;&#xA;            bodef.type = b2_dynamicBody;&#xD;&#xA;        }&#xD;&#xA;        bodef.position = pos;&#xD;&#xA;        bodef.angle = 0;&#xD;&#xA;        b2Body* pBody = g.m_pWorld-&gt;CreateBody(&amp;bodef);&#xD;&#xA;    &#xD;&#xA;        b2PolygonShape groundBox;&#xD;&#xA;        b2Vec2 center = b2Vec2(-dim.x / 2.0f, -dim.y / 2.0f);&#xD;&#xA;        groundBox.SetAsBox(dim.x / 2.0f, dim.y / 2.0f, center, 0);&#xD;&#xA;        for(int i = 0; i &lt; b2_maxPolygonVertices; i++)&#xD;&#xA;        {&#xD;&#xA;            b2Vec2 vert = groundBox.m_vertices[i];&#xD;&#xA;            vert.x += dim.x / 2.0f;&#xD;&#xA;            vert.y += dim.y / 2.0f;&#xD;&#xA;            groundBox.m_vertices[i] = vert;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        b2FixtureDef fixtureDef; &#xD;&#xA;        fixtureDef.shape = &amp;groundBox;&#xD;&#xA;        pBody-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;        //fixtureDef.density = 10;&#xD;&#xA;        &#xD;&#xA;        pBody-&gt;SetUserData((void*)++g.m_actorid);&#xD;&#xA;        &#xD;&#xA;        g.m_bodies.push_back(pBody);&#xD;&#xA;        &#xD;&#xA;        if(dynamic)&#xD;&#xA;        {&#xD;&#xA;         //   pBody-&gt;SetAngularVelocity(0.5f);&#xD;&#xA;        }&#xD;&#xA;            &#xD;&#xA;        return g.m_actorid;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I create the boxes in C# like so:&#xD;&#xA;&#xD;&#xA;m_worldid = CreateWorld(ToB2(new Vector2(0, -1.8f)));&#xD;&#xA;					&#xD;&#xA;m_boxID1 = CreateBox(ToB2(new Vector2(50, 50)), ToB2(new Vector2(-51,300)), true, m_worldid);&#xD;&#xA;m_boxID2 = CreateBox(ToB2(new Vector2(50, 50)), ToB2(new Vector2(0,0)), false, m_worldid);&#xD;&#xA;&#xD;&#xA;Using the box ids I grab positions and rotations from the C++ code (and the get functions take into account that I've /= 100 the dimensions), it all works fine on that front, code here for those interested:&#xD;&#xA;&#xD;&#xA;    extern &quot;C&quot;&#xD;&#xA;    ActorTransform BodyTransform(int bodyid, int worldid)&#xD;&#xA;    {&#xD;&#xA;        World &amp;g = GetWorld(worldid);&#xD;&#xA;        &#xD;&#xA;        for(int i = 0; i &lt; g.m_bodies.size(); i++)&#xD;&#xA;        {&#xD;&#xA;            if( (int)g.m_bodies[i]-&gt;GetUserData() == bodyid)&#xD;&#xA;            {&#xD;&#xA;                ActorTransform c;&#xD;&#xA;                c.Position = g.m_bodies[i]-&gt;GetPosition();&#xD;&#xA;                c.Rotation = g.m_bodies[i]-&gt;GetAngle();&#xD;&#xA;                c.Position *= 100.0f;&#xD;&#xA;    &#xD;&#xA;                return c;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Another interesting thing to note is if I set an angular velocity on the box it actually is physically represented on screen and it can cause the box to fall off, setting rotatens on bodes also seemst o work.&#xD;&#xA;&#xD;&#xA;so any ideas?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/KbnZ3.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/UsLtO.png" />
  <row Id="36591" PostHistoryTypeId="1" PostId="15973" RevisionGUID="8d357db3-1d0b-4688-9a97-993ac0d9ac2e" CreationDate="2011-08-14T11:28:16.863" UserId="2933" Text="Bodies are colliding but refusing to rotate in Box2D" />
  <row Id="36592" PostHistoryTypeId="3" PostId="15973" RevisionGUID="8d357db3-1d0b-4688-9a97-993ac0d9ac2e" CreationDate="2011-08-14T11:28:16.863" UserId="2933" Text="&lt;2d&gt;&lt;physics&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;ios&gt;" />
  <row Id="36593" PostHistoryTypeId="5" PostId="15973" RevisionGUID="1987e8a9-3aa6-432c-a4ed-ecd187efae24" CreationDate="2011-08-14T11:38:33.900" UserId="2933" Comment="added 257 characters in body" Text="I'm running box2d in C++ and hooking it up to C# via p/invoke. All physics stuff occurs in C++.&#xD;&#xA;&#xD;&#xA;My problem is that bodes know when they are colliding and do so with great precision. However if I have two boxes which are 10x10 units, one located at the origin and is static while another is set 30 units in the sky 4 units across and is dynamic, when the dynamic box falls and hits the static one it stops falling but doesn't turn and slide off the edge.&#xD;&#xA;&#xD;&#xA;Here's a screenshot of what I mean: &#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The box on top is as far to the left as it possibly can be, any further left and it will fall past the box on the bottom. There is barely a pixel overlap that's keeping the top box there. As you can see it's not rotating to fall off.&#xD;&#xA;&#xD;&#xA;This also happens (again only the lowest most box is static, the rest fell down a distance to get there),&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any ideas what I'm doing wrong?&#xD;&#xA;&#xD;&#xA;My code for creating boxes is as such:&#xD;&#xA;&#xD;&#xA;    extern &quot;C&quot;&#xD;&#xA;    int CreateBox(b2Vec2 dim, b2Vec2 pos, bool dynamic, int worldid)&#xD;&#xA;    {&#xD;&#xA;        dim.x /= 100.0f;&#xD;&#xA;        dim.y /= 100.0f;&#xD;&#xA;        pos.x /= 100.0f;&#xD;&#xA;        pos.y /= 100.0f;&#xD;&#xA;            &#xD;&#xA;        World &amp;g = GetWorld(worldid);&#xD;&#xA;        b2BodyDef bodef;&#xD;&#xA;        &#xD;&#xA;        bodef.type = b2_staticBody;&#xD;&#xA;        if(dynamic)&#xD;&#xA;        {&#xD;&#xA;            bodef.type = b2_dynamicBody;&#xD;&#xA;        }&#xD;&#xA;        bodef.position = pos;&#xD;&#xA;        bodef.angle = 0;&#xD;&#xA;        b2Body* pBody = g.m_pWorld-&gt;CreateBody(&amp;bodef);&#xD;&#xA;    &#xD;&#xA;        b2PolygonShape groundBox;&#xD;&#xA;        b2Vec2 center = b2Vec2(-dim.x / 2.0f, -dim.y / 2.0f);&#xD;&#xA;        groundBox.SetAsBox(dim.x / 2.0f, dim.y / 2.0f, center, 0);&#xD;&#xA;        for(int i = 0; i &lt; b2_maxPolygonVertices; i++)&#xD;&#xA;        {&#xD;&#xA;            b2Vec2 vert = groundBox.m_vertices[i];&#xD;&#xA;            vert.x += dim.x / 2.0f;&#xD;&#xA;            vert.y += dim.y / 2.0f;&#xD;&#xA;            groundBox.m_vertices[i] = vert;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        b2FixtureDef fixtureDef; &#xD;&#xA;        fixtureDef.shape = &amp;groundBox;&#xD;&#xA;        pBody-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;        //fixtureDef.density = 10;&#xD;&#xA;        &#xD;&#xA;        pBody-&gt;SetUserData((void*)++g.m_actorid);&#xD;&#xA;        &#xD;&#xA;        g.m_bodies.push_back(pBody);&#xD;&#xA;        &#xD;&#xA;        if(dynamic)&#xD;&#xA;        {&#xD;&#xA;         //   pBody-&gt;SetAngularVelocity(0.5f);&#xD;&#xA;        }&#xD;&#xA;            &#xD;&#xA;        return g.m_actorid;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I create the boxes in C# like so:&#xD;&#xA;&#xD;&#xA;m_worldid = CreateWorld(ToB2(new Vector2(0, -1.8f)));&#xD;&#xA;					&#xD;&#xA;m_boxID1 = CreateBox(ToB2(new Vector2(50, 50)), ToB2(new Vector2(-51,300)), true, m_worldid);&#xD;&#xA;m_boxID2 = CreateBox(ToB2(new Vector2(50, 50)), ToB2(new Vector2(0,0)), false, m_worldid);&#xD;&#xA;&#xD;&#xA;Using the box ids I grab positions and rotations from the C++ code (and the get functions take into account that I've /= 100 the dimensions), it all works fine on that front, code here for those interested:&#xD;&#xA;&#xD;&#xA;    extern &quot;C&quot;&#xD;&#xA;    ActorTransform BodyTransform(int bodyid, int worldid)&#xD;&#xA;    {&#xD;&#xA;        World &amp;g = GetWorld(worldid);&#xD;&#xA;        &#xD;&#xA;        for(int i = 0; i &lt; g.m_bodies.size(); i++)&#xD;&#xA;        {&#xD;&#xA;            if( (int)g.m_bodies[i]-&gt;GetUserData() == bodyid)&#xD;&#xA;            {&#xD;&#xA;                ActorTransform c;&#xD;&#xA;                c.Position = g.m_bodies[i]-&gt;GetPosition();&#xD;&#xA;                c.Rotation = g.m_bodies[i]-&gt;GetAngle();&#xD;&#xA;                c.Position *= 100.0f;&#xD;&#xA;    &#xD;&#xA;                return c;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Another interesting thing to note is if I set an angular velocity on the box it actually is physically represented on screen and it can cause the box to fall off, setting rotatens on bodes also seems to work.&#xD;&#xA;&#xD;&#xA;Actually continuing on from setting angular velocities. I found that if I set an angular velocity just once the velocity doesn't go away, even after it lands on the static box it continues to rotate as if it were a motor or something. I'm guessing this has something to do with my core problem since bodies aren't meant to maintain an angular velocity that was set on them just once..&#xD;&#xA;&#xD;&#xA;so any ideas?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/KbnZ3.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/UsLtO.png" />
  <row Id="36594" PostHistoryTypeId="2" PostId="15974" RevisionGUID="eea97763-48ae-4510-ba67-52d51ba7c819" CreationDate="2011-08-14T11:59:20.560" UserId="7328" Text="I'm trying to implement scene graph for my 2d game in xna, and I was looking for a way to draw every object with saving only local transform of object. this seems a bit like glPushMatrix. if such a function exist I can only call push matrix for every node and then call draw function for all it's children.&#xD;&#xA;&#xD;&#xA;I mean the whole idea is to avoid passing parent transformation to it's children. is there anyway to do so?" />
  <row Id="36595" PostHistoryTypeId="1" PostId="15974" RevisionGUID="eea97763-48ae-4510-ba67-52d51ba7c819" CreationDate="2011-08-14T11:59:20.560" UserId="7328" Text="is there any equivalent to glPushMatrix in xna?" />
  <row Id="36596" PostHistoryTypeId="3" PostId="15974" RevisionGUID="eea97763-48ae-4510-ba67-52d51ba7c819" CreationDate="2011-08-14T11:59:20.560" UserId="7328" Text="&lt;xna&gt;" />
  <row Id="36597" PostHistoryTypeId="5" PostId="5201" RevisionGUID="06ac950d-3066-457a-8352-60e7fb0fecc1" CreationDate="2011-08-14T12:20:41.130" UserId="146" Comment="deleted 22 characters in body" Text="Game Development - Stack Exchange is for **professional and amateur video/computer game developers**. If you have questions relating to &amp;hellip;&#xA;&#xA; - Game design (architecture, gameplay, mechanics, etc)&#xA; - Game assets (creation, storage, editing, etc)&#xA; - Game programming (engine architecture, game-related APIs, networking, etc)&#xA; - Game development (testing, team management, tools, etc)&#xA; - Game release (hosting, publishing, etc)&#xA; - Game industry (careers, trends, technology, etc)&#xA;&#xA;Then you are likely in the right place.&#xA;&#xA;A note on programming-related questions: general programming questions more likely belong on &lt;a href=&quot;http://stackoverflow.com&quot;&gt;Stack Overflow&lt;/a&gt; instead of here.  A good rule of thumb is to ask yourself &amp;hellip;&#xA;&#xA;&gt; Would a professional game developer give me a better/different/more specific answer to this question than other programmers?&#xA;&#xA;If yes, then feel free to ask it here.  For more discussion on that topic, see &lt;a href=&quot;http://meta.gamedev.stackexchange.com/questions/3/programming-questions-here-or-belongs-on-stackoverflow&quot;&gt;this question&lt;/a&gt; on our meta site." />
  <row Id="36598" PostHistoryTypeId="2" PostId="15975" RevisionGUID="6b197eec-8831-40fc-9159-15887a7994de" CreationDate="2011-08-14T12:33:51.727" UserId="4546" Text="XNA (nor D3D) does not expose any kind of API-side matrix stack.&#xD;&#xA;&#xD;&#xA;There is not that much of a difference between a scene graph visitor that uses the OpenGL matrix stacks and a visitor that maintains its own private stacks.&#xD;&#xA;&#xD;&#xA;    class GLStyleVisitor&#xD;&#xA;    {&#xD;&#xA;        public void visit(GroupNode node)&#xD;&#xA;        {&#xD;&#xA;            glMatrixMode(GL_MODELVIEW);&#xD;&#xA;            glPushMatrix(glGetMatrix() * node.mtx);&#xD;&#xA;            foreach (Node child in node.children)&#xD;&#xA;            {&#xD;&#xA;                visit(child);&#xD;&#xA;            }&#xD;&#xA;            glPopMatrix();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;The traditional visitor shown above doesn't have to be changed much to bundle its own stack or any other context along when visiting the graph. At any place inside the visitor, you have access to the state you need for passing into whoever needs it.&#xD;&#xA;&#xD;&#xA;    class PersonalVisitor&#xD;&#xA;    {&#xD;&#xA;        Stack&lt;Matrix&gt; transforms;&#xD;&#xA;&#xD;&#xA;        public PersonalVisitor()&#xD;&#xA;        {&#xD;&#xA;            transforms.push(Matrix.Identity());&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        public void visit(GroupNode node)&#xD;&#xA;        {&#xD;&#xA;            transforms.push(transforms.top() * node.mtx);&#xD;&#xA;            foreach (Node child in node.children)&#xD;&#xA;            {&#xD;&#xA;                Visit(child);&#xD;&#xA;            }&#xD;&#xA;            transforms.pop();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;Note that class names and methods are not overly accurate, as I am not fluent in C# or XNA." />
  <row Id="36599" PostHistoryTypeId="25" PostId="15957" RevisionGUID="0a7337f2-f672-4766-ace4-509bd27c8197" CreationDate="2011-08-14T12:37:04.287" Comment="http://twitter.com/#!/StackGameDev/status/102720389683220480" />
  <row Id="36600" PostHistoryTypeId="2" PostId="15976" RevisionGUID="663b4ad5-e32a-4d0a-b837-029ccc44e2d3" CreationDate="2011-08-14T12:46:31.547" UserId="9245" Text="In my game I have 2+ forms and 4+ usercontrols.&#xD;&#xA;Where should I declare, lets say a textbox that I use in form2, but I need to modify it in form1.&#xD;&#xA;&#xD;&#xA;Should I make them public in their own form/usercontrol or should I make a static class with all the controls?&#xD;&#xA;&#xD;&#xA;The question is simple, I know, but I want to know other people's opinions." />
  <row Id="36601" PostHistoryTypeId="1" PostId="15976" RevisionGUID="663b4ad5-e32a-4d0a-b837-029ccc44e2d3" CreationDate="2011-08-14T12:46:31.547" UserId="9245" Text="Declaring controls in multi form/usercontroll game" />
  <row Id="36602" PostHistoryTypeId="3" PostId="15976" RevisionGUID="663b4ad5-e32a-4d0a-b837-029ccc44e2d3" CreationDate="2011-08-14T12:46:31.547" UserId="9245" Text="&lt;c#&gt;" />
  <row Id="36603" PostHistoryTypeId="2" PostId="15977" RevisionGUID="d8b9928c-6e1c-4827-80ed-ff468af1aed0" CreationDate="2011-08-14T13:12:50.160" UserId="6210" Text="I think I would make the actual TextBox private in its Form, then expose functionality (like get/set text) using either methods or properties, depending on 'obviousness' factor, ie:&#xD;&#xA;&#xD;&#xA;    public string Text1&#xD;&#xA;    {&#xD;&#xA;        get { return myTextBox1.Text; }&#xD;&#xA;        set { myTextBox1.Text = value; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;or...&#xD;&#xA;&#xD;&#xA;    public void SetTextFromVars(int var1, DateTime var2)&#xD;&#xA;    {&#xD;&#xA;        myTextBox1.Text = String.Format(&quot;Hey, I have got {0} objects since {1}&quot;, var1, var2);&#xD;&#xA;    }" />
  <row Id="36604" PostHistoryTypeId="17" PostId="15978" RevisionGUID="e44a23ed-436f-4c61-83bc-ff0a859b54bd" CreationDate="2011-08-14T13:23:06.980" UserId="-1" Comment="from http://stackoverflow.com/questions/7056733/udk-sidescrolling-camera-not-working" Text="" />
  <row Id="36605" PostHistoryTypeId="2" PostId="15978" RevisionGUID="0cdaba04-5a14-4639-868a-3b0512cf9833" CreationDate="2011-08-14T12:13:23.743" UserId="9262" Text="I tried the sidescrolling camera from http://udn.epicgames.com/Three/CameraTechnicalGuide.html#Example%20Side-Scrolling%20Camera but there are some warnings&#xD;&#xA;&#xD;&#xA;http://imageshack.us/photo/my-images/690/warningse.png/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;when parsing the scripts and also the eidot says when running the pie mode and all i get is:&#xD;&#xA;&#xD;&#xA;    Engine.GameMessage.Failed Spawn Message&#xD;&#xA;&#xD;&#xA;also looked at some tutorials in youtube for sidescrolling in UDK, but i have always the same issues." />
  <row Id="36606" PostHistoryTypeId="1" PostId="15978" RevisionGUID="0cdaba04-5a14-4639-868a-3b0512cf9833" CreationDate="2011-08-14T12:13:23.743" UserId="9262" Text="UDK: Sidescrolling Camera not working" />
  <row Id="36607" PostHistoryTypeId="3" PostId="15978" RevisionGUID="0cdaba04-5a14-4639-868a-3b0512cf9833" CreationDate="2011-08-14T12:13:23.743" UserId="9262" Text="&lt;side-scroller&gt;" />
  <row Id="36608" PostHistoryTypeId="6" PostId="15978" RevisionGUID="fb6054a1-1995-472f-889d-f869320188e0" CreationDate="2011-08-14T13:41:36.357" UserId="9262" Comment="edited tags" Text="&lt;camera&gt;&lt;udk&gt;&lt;side-scroller&gt;" />
  <row Id="36609" PostHistoryTypeId="2" PostId="15979" RevisionGUID="efd6b490-c2fd-4836-9a49-04d1e8cc9fd5" CreationDate="2011-08-14T13:46:38.443" UserId="8578" Text="I may not be able to answer the direct question of what technologies this specific game uses, but the more general question of what technologies are ideal.&#xD;&#xA;&#xD;&#xA;For an MMO-WEB style game Flash (AS3) is an extremely useful client interface for the game.  Flash is cross browser and cross platform compatible, and has access to a high level socket layer (used for network communications).&#xD;&#xA;&#xD;&#xA;AS3 has two kinds of sockets:&#xD;&#xA;The [Socket][1] and the [XMLSocket][2].  Now most people make the very faulty assumption that XMLSockets are easier to use, when in reality they are identical except one is meant to parse only XML data (from things like feeds, or web page data), which isn't very useful for games.&#xD;&#xA;The regular plain Socket is what you should spend time learning.  Unfortunately there are very few tutorials around the web, as Socket programming is still quite young in Flash, but still very useful.&#xD;&#xA;&#xD;&#xA;The basic idea from the Flash (Client) side of things is:&#xD;&#xA;&#xD;&#xA;&gt; Create Socket Object -&gt; Give It Server IP/Port To Connect To -&gt; Attempt Connection -&gt; Create Listener For Incoming Data -&gt; Wait For All Data On Line -&gt; Use Data -&gt; Send Data -&gt; Listen For Incoming...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Now as for the Server side, DO NOT USE FLASH.  Flash may be very useful as a Client, but as a Server it's pretty much useless.  You need a language that supports threading, I'm currently using C# as my Server backend so that's the only I can recommend (but it is by no means the only or best option).  C# provides easy use of threads and has a similar Socket system.&#xD;&#xA;&#xD;&#xA;The Server is FAR more complicated than the Client, as you must manage every connection asynchronously (at the same time), and worry about things like bad data, attacks, disconnects, flooding, overloading, timeouts, lost packets, and a seemingly endless list of trivialities.&#xD;&#xA;&#xD;&#xA;You also have to manage all user data, lobby handling, game handling for which I personally use mySQL.  It looks super complicated on the surface, but it's pretty much a beefy excel (please no flames for the slack comparison).  It's quite easy to make a simple database to store usernames/passwords, or game information, and if you use raw access from C# it's also quite zippy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;So in a nutshell, you don't need a book.  Go look for information on simple socket interfaces in AS3 and C# (or a language of your choice, but I recommend C#).  Learn about threading and why it's used, there are plenty of great tutorials.  Then learn about how games transfer data to and from the server, and why they do the things they do.  But before you do all of this make sure you have a STRONG working knowledge of both Flash, AS3 and C#.  You should be able to create the game to be made networked in full, start to finish - then only after it is complete add networking last.&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html?filter_flash=cs5&amp;filter_flashplayer=10.2&amp;filter_air=2.6&#xD;&#xA;  [2]: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/XMLSocket.html?filter_flash=cs5&amp;filter_flashplayer=10.2&amp;filter_air=2.6" />
  <row Id="36613" PostHistoryTypeId="25" PostId="15793" RevisionGUID="bbe38cbf-af59-48ae-8a84-1015368a4257" CreationDate="2011-08-14T14:37:05.317" Comment="http://twitter.com/#!/StackGameDev/status/102750593524834306" />
  <row Id="36614" PostHistoryTypeId="2" PostId="15981" RevisionGUID="a0fac6a4-01e7-456f-882c-a9bd67d7fafb" CreationDate="2011-08-14T14:43:12.067" UserId="744" Text="Without precision requirements, there's no way to get an optimal solution, because traditional pathfinding must consider the time / space discretely at some level. But I don't recommend traditional pathfinding for this problem anyway, at least not for the entire problem. It won't look particularly realistic, and it will use a lot of resources.&#xD;&#xA;&#xD;&#xA;Assuming the motion of the target planet is described by `planet(t)`, ignoring obstacles, there is a closed form solution to find the intersection:&#xD;&#xA;&#xD;&#xA;    position + velocity * t  = planet(t)&#xD;&#xA;&#xD;&#xA;Doing some basic algebra,&#xD;&#xA;&#xD;&#xA;    velocity * t             = (planet(t) - position)&#xD;&#xA;    ||velocity|| * speed * t = (planet(t) - position)&#xD;&#xA;    ||velocity||             = (planet(t) - position) / (t * speed)&#xD;&#xA;&#xD;&#xA;Space is mostly empty and that holds true of most space games as well; 99% of the time, the ship can simply follow that vector to intercept the planet. This equation is trivial to solve in both CPU time and memory required.&#xD;&#xA;&#xD;&#xA;To avoid collisions, I would use a &lt;a href=&quot;http://www.red3d.com/cwr/steer/&quot;&gt;steering behaviors&lt;/a&gt;, notably &lt;a href=&quot;http://www.red3d.com/cwr/steer/Obstacle.html&quot;&gt;obstacle avoidance&lt;/a&gt;. Once obstacles are avoided, you evaluate the equation again.&#xD;&#xA;&#xD;&#xA;This is much lighter-weight than A*, and probably better approximates what an actual pilot would do. It also works even if there are unpredictable obstacles." />
  <row Id="36615" PostHistoryTypeId="5" PostId="15981" RevisionGUID="05f2e0bc-0a17-4e77-94de-6c93242690d8" CreationDate="2011-08-14T14:50:20.097" UserId="744" Comment="added 92 characters in body" Text="Without precision requirements, there's no way to get an optimal solution, because traditional pathfinding must consider the time / space discretely at some level. But I don't recommend traditional pathfinding for this problem anyway, at least not for the entire problem. It won't look particularly realistic, and it will use a lot of resources.&#xD;&#xA;&#xD;&#xA;Assuming the motion of the target planet is described by `planet(t)`, ignoring obstacles, there is a closed form solution to find the intersection:&#xD;&#xA;&#xD;&#xA;    position + velocity * t  = planet(t)&#xD;&#xA;&#xD;&#xA;Doing some basic algebra,&#xD;&#xA;&#xD;&#xA;    velocity * t             = (planet(t) - position)&#xD;&#xA;    ||velocity|| * speed * t = (planet(t) - position)&#xD;&#xA;    ||velocity||             = (planet(t) - position) / (speed * t)&#xD;&#xA;&#xD;&#xA;Space is mostly empty and that holds true of most space games as well; 99% of the time, the ship can simply follow that vector to intercept the planet. This equation is trivial to solve in both CPU time and memory required.&#xD;&#xA;&#xD;&#xA;To avoid collisions, I would use a &lt;a href=&quot;http://www.red3d.com/cwr/steer/&quot;&gt;steering behaviors&lt;/a&gt;, notably &lt;a href=&quot;http://www.red3d.com/cwr/steer/Obstacle.html&quot;&gt;obstacle avoidance&lt;/a&gt;. Once obstacles are avoided, you evaluate the equation again.&#xD;&#xA;&#xD;&#xA;This is much lighter-weight than A*, and probably better approximates what an actual pilot would do. It also works even if there are unpredictable obstacles, and for targets following any motion function, regardless of whether it is circular or not." />
  <row Id="36616" PostHistoryTypeId="5" PostId="15963" RevisionGUID="665437fd-371c-44b5-b072-d04b19093b7d" CreationDate="2011-08-14T14:55:34.087" UserId="744" Comment="Make title a question. Remove meta paragraph." Text="The problem: An autonomous ship starts at the outskirts of a solar system, and wants to move to a moving target, which is one of the planets. There are also many other planets moving at the same time, and these should be considered the only obstacles. I want to find the optimal path to the target. To keep it simple, the world is 2D, and the planets are moving in uniform circular motion around the sun as opposed to how planets actually behave.  Also, assume the ship knows pretty much everything about the world. Most importantly, the location, speed, and orbit radius of every planet.&#xD;&#xA;&#xD;&#xA;With complete knowledge, this seems conceptually simple. For any planet and any time, you can find its location by doing some fairly simple math. But how would you apply this to pathfinding? Would it be just to pathfind in 3 dimensions: x, y, and t? In theory this makes sense, but I think working that out to an actual solution would involve a lot of complications. Is it really as simple as 'setup a* on a grid with x,y,t values'?" />
  <row Id="36617" PostHistoryTypeId="4" PostId="15963" RevisionGUID="665437fd-371c-44b5-b072-d04b19093b7d" CreationDate="2011-08-14T14:55:34.087" UserId="744" Comment="Make title a question. Remove meta paragraph." Text="How can I navigate to a target between bodies moving along fixed paths?" />
  <row Id="36618" PostHistoryTypeId="5" PostId="15981" RevisionGUID="3609c4bd-109c-4bcc-920b-5cf7dc903117" CreationDate="2011-08-14T14:56:07.050" UserId="744" Comment="deleted 2 characters in body" Text="Without precision requirements, there's no way to get an optimal solution, because traditional pathfinding must consider the time / space discretely at some level. But I don't recommend traditional pathfinding for this problem anyway, at least not for the entire problem. It won't look particularly realistic, and it will use a lot of resources.&#xD;&#xA;&#xD;&#xA;Assuming the motion of the target planet is described by `planet(t)`, ignoring obstacles, there is a closed form solution to find the intersection:&#xD;&#xA;&#xD;&#xA;    position + velocity * t  = planet(t)&#xD;&#xA;&#xD;&#xA;Doing some basic algebra,&#xD;&#xA;&#xD;&#xA;    velocity * t             = (planet(t) - position)&#xD;&#xA;    ||velocity|| * speed * t = (planet(t) - position)&#xD;&#xA;    ||velocity||             = (planet(t) - position) / (speed * t)&#xD;&#xA;&#xD;&#xA;Space is mostly empty and that holds true of most space games as well; 99% of the time, the ship can simply follow that vector to intercept the planet. This equation is trivial to solve in both CPU time and memory required.&#xD;&#xA;&#xD;&#xA;To avoid collisions, I would use &lt;a href=&quot;http://www.red3d.com/cwr/steer/&quot;&gt;steering behaviors&lt;/a&gt;, notably &lt;a href=&quot;http://www.red3d.com/cwr/steer/Obstacle.html&quot;&gt;obstacle avoidance&lt;/a&gt;. Once obstacles are avoided, you evaluate the equation again.&#xD;&#xA;&#xD;&#xA;This is much lighter-weight than A*, and probably better approximates what an actual pilot would do. It also works even if there are unpredictable obstacles, and for targets following any motion function, regardless of whether it is circular or not." />
  <row Id="36619" PostHistoryTypeId="5" PostId="15974" RevisionGUID="98e16a54-ac7c-4b22-9860-ed58b275d9b1" CreationDate="2011-08-14T15:05:30.287" UserId="744" Comment="Grammar." Text="I'm trying to implement a scene graph for my 2D game in XNA, and I was looking for a way to draw every object while saving only the local transformation of the object. This seems a bit like glPushMatrix. If such a function exists I can just push a matrix for every node and then call the draw function for all its children.&#xD;&#xA;&#xD;&#xA;The whole idea is to avoid passing parent transformations to children. Is there anyway to do so?" />
  <row Id="36620" PostHistoryTypeId="4" PostId="15974" RevisionGUID="98e16a54-ac7c-4b22-9860-ed58b275d9b1" CreationDate="2011-08-14T15:05:30.287" UserId="744" Comment="Grammar." Text="Is there any equivalent to glPushMatrix in XNA?" />
  <row Id="36621" PostHistoryTypeId="6" PostId="15974" RevisionGUID="98e16a54-ac7c-4b22-9860-ed58b275d9b1" CreationDate="2011-08-14T15:05:30.287" UserId="744" Comment="Grammar." Text="&lt;xna&gt;&lt;rendering&gt;" />
  <row Id="36622" PostHistoryTypeId="5" PostId="15967" RevisionGUID="53d6bd0e-cbd5-447d-99b7-4013f61e57e2" CreationDate="2011-08-14T15:10:30.290" UserId="744" Comment="Fix grammar, tags." Text="I am a bit confused about what I need to move a basic square. Should I use a translation matrix or just change the object vertices? Which one is better?&#xD;&#xA;&#xD;&#xA;I use a simple vertex shader, `gl_Position = myPMVMatrix * a_vertex`, along with a VBO." />
  <row Id="36623" PostHistoryTypeId="4" PostId="15967" RevisionGUID="53d6bd0e-cbd5-447d-99b7-4013f61e57e2" CreationDate="2011-08-14T15:10:30.290" UserId="744" Comment="Fix grammar, tags." Text="How should I move 2D objects in OpenGL ES 2?" />
  <row Id="36624" PostHistoryTypeId="6" PostId="15967" RevisionGUID="53d6bd0e-cbd5-447d-99b7-4013f61e57e2" CreationDate="2011-08-14T15:10:30.290" UserId="744" Comment="Fix grammar, tags." Text="&lt;opengl&gt;&lt;rendering&gt;&lt;opengl-es2&gt;" />
  <row Id="36625" PostHistoryTypeId="4" PostId="15946" RevisionGUID="45174730-024c-4fef-b2a5-53dae23f026d" CreationDate="2011-08-14T15:14:10.887" UserId="8578" Comment="Alpha-testing is extremely misleading (alpha-beta vs alpha-transparency) modified title" Text="How to do alpha(transparency) testing in XNA 4.0" />
  <row Id="36626" PostHistoryTypeId="6" PostId="15946" RevisionGUID="45174730-024c-4fef-b2a5-53dae23f026d" CreationDate="2011-08-14T15:14:10.887" UserId="8578" Comment="Alpha-testing is extremely misleading (alpha-beta vs alpha-transparency) modified title" Text="&lt;xna-4.0&gt;&lt;transparency&gt;" />
  <row Id="36627" PostHistoryTypeId="24" PostId="15946" RevisionGUID="45174730-024c-4fef-b2a5-53dae23f026d" CreationDate="2011-08-14T15:14:10.887" Comment="Proposed by 8578 approved by -1 edit id of 641" />
  <row Id="36628" PostHistoryTypeId="5" PostId="15946" RevisionGUID="64ed589f-3d35-4f42-acfd-eca5edd7ddbf" CreationDate="2011-08-14T15:14:11.013" UserId="744" Comment="Fix title and link." Text="I've read a lot of tutorials, but it just doesn't seem to work. Here's the code as suggested by a tutorial, using the built-in AlphaTestEffect class:&#xD;&#xA;&#xD;&#xA;    Matrix projection = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, 1);&#xD;&#xA;    Matrix halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);&#xD;&#xA;    alphaTest = new AlphaTestEffect(GraphicsDevice);&#xD;&#xA;    alphaTest.VertexColorEnabled = true;&#xD;&#xA;    alphaTest.DiffuseColor = Color.White.ToVector3();&#xD;&#xA;    alphaTest.AlphaFunction = CompareFunction.Greater;&#xD;&#xA;    alphaTest.ReferenceAlpha = 128;&#xD;&#xA;    alphaTest.World = Matrix.Identity;&#xD;&#xA;    alphaTest.View = Matrix.Identity;&#xD;&#xA;    alphaTest.Projection = halfPixelOffset * projection;&#xD;&#xA;&#xD;&#xA;Then this object is just passed in to the SpriteBatch.Begin method. The result: Nothing appears on the screen, whereas the exact same code that doesn't pass in the alphaTest object renders correctly.&#xD;&#xA;&#xD;&#xA;Note that this is the case even with CompareFunction.Always! (I tried CompareFunction.Never too in case I misunderstand the comparison order).&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://www.crappycoding.com/2010/08/texture-modification-using-render-targets-with-some-stencil-buffer-action/&quot;&gt;I am following this tutorial, but I've also seen that same code elsewhere.&lt;/a&gt; The tutorial has a downloadable file for XNA 4.0 to demonstrate it. I downloaded and tried it, and - *It doesn't work*. No craters show up. So what the heck is going on?" />
  <row Id="36629" PostHistoryTypeId="4" PostId="15946" RevisionGUID="64ed589f-3d35-4f42-acfd-eca5edd7ddbf" CreationDate="2011-08-14T15:14:11.013" UserId="744" Comment="Fix title and link." Text="How does one do alpha transparency testing in XNA 4.0?" />
  <row Id="36630" PostHistoryTypeId="2" PostId="15982" RevisionGUID="229f6915-de45-45a6-a9f8-de420f08ec46" CreationDate="2011-08-14T15:57:40.263" UserId="9171" Text="Im now starting to create my own side scroller in java but before i start i want one question answeared.. I didn't find any answear for this on google so i will try my luck here..&#xD;&#xA;&#xD;&#xA;Basicaly i think i've seen somewhere that when you create a game in java there is something you can extend your class with something like GamePanel or something or is this not true? Do you just use Jframe for your java games?" />
  <row Id="36631" PostHistoryTypeId="1" PostId="15982" RevisionGUID="229f6915-de45-45a6-a9f8-de420f08ec46" CreationDate="2011-08-14T15:57:40.263" UserId="9171" Text="JFrame for Java game?" />
  <row Id="36632" PostHistoryTypeId="3" PostId="15982" RevisionGUID="229f6915-de45-45a6-a9f8-de420f08ec46" CreationDate="2011-08-14T15:57:40.263" UserId="9171" Text="&lt;java&gt;" />
  <row Id="36633" PostHistoryTypeId="5" PostId="15956" RevisionGUID="642c43bd-a00f-4a98-8cfb-56c404525347" CreationDate="2011-08-14T16:01:53.460" UserId="744" Comment="deleted 66 characters in body; edited title" Text="I am drawing a Texture2D onto the screen and have the need to rotate the texture forward, in a 3D way.  I'm using the SpriteBatch Draw() method and it only allows limited 2D rotation around the Z axis.  From tons of research online I have boiled down the solution to passing either an effect or matrix to SpriteBatch's Begin() method; however, after many hours of trial and error I haven't come up with anything working." />
  <row Id="36634" PostHistoryTypeId="4" PostId="15956" RevisionGUID="642c43bd-a00f-4a98-8cfb-56c404525347" CreationDate="2011-08-14T16:01:53.460" UserId="744" Comment="deleted 66 characters in body; edited title" Text="How can I rotate a Texture2D into / out of the screen?" />
  <row Id="36635" PostHistoryTypeId="5" PostId="15923" RevisionGUID="a8cf3e5c-4eaf-4d99-bfeb-84a8aaaa56af" CreationDate="2011-08-14T16:03:15.017" UserId="744" Comment="deleted 250 characters in body; edited title" Text="If you are a solo programmer creating a game, what do you do for the graphics and art part?  &#xD;&#xA;&#xD;&#xA;Should I work with graphics artist to draw the characters and the environment? I don't know how to draw any way." />
  <row Id="36636" PostHistoryTypeId="4" PostId="15923" RevisionGUID="a8cf3e5c-4eaf-4d99-bfeb-84a8aaaa56af" CreationDate="2011-08-14T16:03:15.017" UserId="744" Comment="deleted 250 characters in body; edited title" Text="If you are a solo programmer, how do you manage the graphics artistry part?" />
  <row Id="36640" PostHistoryTypeId="4" PostId="15905" RevisionGUID="dacf9988-87e6-4329-b0fa-99d4d1885c01" CreationDate="2011-08-14T16:06:58.540" UserId="744" Comment="edited tags; edited title" Text="Do iOS users use Facebook and Twitter buttons within games?" />
  <row Id="36641" PostHistoryTypeId="6" PostId="15905" RevisionGUID="dacf9988-87e6-4329-b0fa-99d4d1885c01" CreationDate="2011-08-14T16:06:58.540" UserId="744" Comment="edited tags; edited title" Text="&lt;ios&gt;&lt;marketing&gt;&lt;facebook&gt;&lt;social&gt;&lt;twitter&gt;" />
  <row Id="36642" PostHistoryTypeId="2" PostId="15984" RevisionGUID="6e85dc9d-af90-43e6-9fe8-ba3b1068716c" CreationDate="2011-08-14T16:10:12.137" UserId="2933" Text="Ok fixed it thanks to someone from the box2d forums correct an obvious mistake.&#xD;&#xA;&#xD;&#xA;Change this:&#xD;&#xA;&#xD;&#xA;    pBody-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;    //fixtureDef.density = 10;&#xD;&#xA;&#xD;&#xA;into this:&#xD;&#xA;&#xD;&#xA;    fixtureDef.density = 10;&#xD;&#xA;    pBody-&gt;CreateFixture(&amp;fixtureDef);&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;Done." />
  <row Id="36643" PostHistoryTypeId="2" PostId="15985" RevisionGUID="1a862442-1ba0-401f-ad34-ba88f0e5c991" CreationDate="2011-08-14T16:11:00.187" UserId="2933" Text="So to know when contacts happen can derive from b2ContactListener and implement our own solution which is great.&#xD;&#xA;&#xD;&#xA;Now I'm wondering is there anyway we can cancel contact, that is to say when we hit begin contact we do call a function or do something to destroy the contact before it has a chance to be resolved?&#xD;&#xA;&#xD;&#xA;The reason I ask is currently my game logic relies on setting any number of collision groups (which are basically integers). Collision groups can have settings to interact with one another, for example collision group 41 and 13 may be set to never collide while group 41 and 56 will collide. Some groups which are set not to collide are still meant to generate an OnContact callback (but will obviously never get to end contact).&#xD;&#xA;&#xD;&#xA;Any ideas? " />
  <row Id="36644" PostHistoryTypeId="1" PostId="15985" RevisionGUID="1a862442-1ba0-401f-ad34-ba88f0e5c991" CreationDate="2011-08-14T16:11:00.187" UserId="2933" Text="Cancel a collision from b2ContactListener::BeginContact in box2D?" />
  <row Id="36645" PostHistoryTypeId="3" PostId="15985" RevisionGUID="1a862442-1ba0-401f-ad34-ba88f0e5c991" CreationDate="2011-08-14T16:11:00.187" UserId="2933" Text="&lt;collision-detection&gt;&lt;2d-physics&gt;&lt;box2d&gt;&lt;callbacks&gt;" />
  <row Id="36647" PostHistoryTypeId="2" PostId="15986" RevisionGUID="33407bff-5ceb-496c-ae35-f8fe96241094" CreationDate="2011-08-14T16:20:52.097" UserId="744" Text="Use `PreSolve` rather than `BeginContact`. &lt;a href=&quot;http://box2d.org/manual.html#_Toc258082975&quot;&gt;From the Box2D documentation&lt;/a&gt;:&#xD;&#xA;&#xD;&#xA;&gt; Pre-Solve Event&#xD;&#xA;&gt;&#xD;&#xA;&gt; This is called after collision detection, but before collision resolution. **This gives you a chance to disable the contact based on the current configuration**. For example, you can implement a one-sided platform using this callback and calling  **b2Contact::SetEnabled(false). The contact will be re-enabled each time through collision processing, so you will need to disable the contact every time-step.** The pre-solve event may be fired multiple times per time step per contact due to continuous collision detection." />
  <row Id="36648" PostHistoryTypeId="5" PostId="15985" RevisionGUID="f32ca03e-463d-4d98-b497-cbd71773e64d" CreationDate="2011-08-14T16:23:51.977" UserId="744" Comment="deleted 51 characters in body; edited title" Text="To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin contact we call a function or do something to destroy the contact before it has a chance to be resolved?&#xD;&#xA;&#xD;&#xA;My game logic relies on setting any number of collision groups (which are basically integers). Collision groups can have settings to interact with one another, for example collision group 41 and 13 may be set to never collide while group 41 and 56 will collide. Some groups which are set not to collide are still meant to generate an OnContact callback (but will obviously never get to end contact).&#xD;&#xA;" />
  <row Id="36649" PostHistoryTypeId="4" PostId="15985" RevisionGUID="f32ca03e-463d-4d98-b497-cbd71773e64d" CreationDate="2011-08-14T16:23:51.977" UserId="744" Comment="deleted 51 characters in body; edited title" Text="How can I cancel a contact in a b2ContactListener?" />
  <row Id="36650" PostHistoryTypeId="5" PostId="15976" RevisionGUID="65af7043-2bc3-44d5-aa77-46750922e209" CreationDate="2011-08-14T16:27:48.863" UserId="9245" Comment="clarify my question" Text="In my game I have 2+ forms and 4+ usercontrols.&#xD;&#xA;Where should I declare, lets say a textbox that I use in form2, but I need to modify it in form1.&#xD;&#xA;&#xD;&#xA;Should I make them public in their own form/usercontrol or should I make a static class with all the controls?&#xD;&#xA;&#xD;&#xA;(Edited to clarify my question)&#xD;&#xA;I want to know the most used and flexible way." />
  <row Id="36651" PostHistoryTypeId="25" PostId="15985" RevisionGUID="fb5b6beb-b16d-4600-903c-80fe36d7413b" CreationDate="2011-08-14T16:37:05.967" Comment="http://twitter.com/#!/StackGameDev/status/102780795550306304" />
  <row Id="36652" PostHistoryTypeId="2" PostId="15987" RevisionGUID="79c92f45-cc2d-4467-bdd2-d428d4e0b780" CreationDate="2011-08-14T16:44:56.497" UserId="8185" Text="I'd like to draw a 2Dimensional coordinate system using C#. Unfortunately, in terms of a graphics rendering engine, XNA is out of the question since I'm running Linux. Thus, is this possible without XNA? How exactly would I go about doing this? My goal is to have something which allows the user to click on any specific area and have a dot appear in the spot where the mouse has clicked.&#xD;&#xA;&#xD;&#xA;If I can't do this in C#, how would I go about coding it in C++?" />
  <row Id="36653" PostHistoryTypeId="1" PostId="15987" RevisionGUID="79c92f45-cc2d-4467-bdd2-d428d4e0b780" CreationDate="2011-08-14T16:44:56.497" UserId="8185" Text="Drawing a 2D Coordinate Map" />
  <row Id="36654" PostHistoryTypeId="3" PostId="15987" RevisionGUID="79c92f45-cc2d-4467-bdd2-d428d4e0b780" CreationDate="2011-08-14T16:44:56.497" UserId="8185" Text="&lt;c++&gt;&lt;c#&gt;" />
  <row Id="36655" PostHistoryTypeId="25" PostId="15974" RevisionGUID="eb3fc45e-0d43-49a6-9d52-216612f3a33a" CreationDate="2011-08-14T18:37:06.050" Comment="http://twitter.com/#!/StackGameDev/status/102810995235373057" />
  <row Id="36656" PostHistoryTypeId="2" PostId="15988" RevisionGUID="6ca132f9-01f9-49da-b720-d62282c44862" CreationDate="2011-08-14T18:51:32.197" UserId="8185" Text="I'm making a text-based RPG. One thing I've been trying to implement for a long time now is the ability for the player to move North, South, East, or West. I  have my code placed in a MoveBehavior class, which exists in my main Character class. &#xD;&#xA;&#xD;&#xA;The problem is that, while my algorithm should work in theory, the locations the player moves to don't change unless the MoveDirection is North/South. East/West, for whatever reason, remains to be the same. &#xD;&#xA;&#xD;&#xA;I'll post the class I have (with comments), and then explain in detail further down:&#xD;&#xA;&#xD;&#xA;    public class MoveBehavior &#xD;&#xA;    	{&#xD;&#xA;    		const int MAX_EAST_WEST_INDEX = 1;&#xD;&#xA;    		const int MAX_NORTH_SOUTH_INDEX = 5;&#xD;&#xA;    		const int MIN_INDEX = 0;&#xD;&#xA;    		&#xD;&#xA;    		//Property Getters...&#xD;&#xA;    		public Location CurrentLocation { get { return this.currentLocation; } }&#xD;&#xA;    		public int AreaIndex { get { return this.areaIndex; } }&#xD;&#xA;    		public int LocationIndex { get { return this.locationIndex; } }&#xD;&#xA;    		//Readonly Props&#xD;&#xA;    		public readonly Character ClassOwner;&#xD;&#xA;    		public readonly int CharacterID; //ID of Character this instance belongs to.&#xD;&#xA;    		//Location Handlers&#xD;&#xA;    		private Location currentLocation;&#xD;&#xA;    		private int areaIndex, locationIndex;&#xD;&#xA;    &#xD;&#xA;    		//Jagged Array of Locations&#xD;&#xA;    		private Location[][] locations;&#xD;&#xA;    		&#xD;&#xA;    		public MoveBehavior() {} //Default ctor.&#xD;&#xA;    		&#xD;&#xA;    		//Constructor takes ID of character, along with a reference to the character object holding it.&#xD;&#xA;    		public MoveBehavior (int id, Character character)&#xD;&#xA;    		{&#xD;&#xA;    			this.CharacterID = id;&#xD;&#xA;    			this.ClassOwner = character;&#xD;&#xA;    			&#xD;&#xA;    			InitializeIndexes();&#xD;&#xA;    			InitializeLocations();&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		//Public Methods...&#xD;&#xA;    		&#xD;&#xA;    		public void Move(MoveDirection moveDir)&#xD;&#xA;    		{&#xD;&#xA;    			Location pastLocation = null; //Past location is null to ensure its initialization.&#xD;&#xA;    			&#xD;&#xA;    			switch (moveDir)&#xD;&#xA;    			{&#xD;&#xA;    			case MoveDirection.North:&#xD;&#xA;    				this.areaIndex++;&#xD;&#xA;    				pastLocation = locations[areaIndex - 1][locationIndex];&#xD;&#xA;    				break;&#xD;&#xA;    			case MoveDirection.South:&#xD;&#xA;    				this.areaIndex--;&#xD;&#xA;    				pastLocation = locations[areaIndex + 1][locationIndex];&#xD;&#xA;    				break;&#xD;&#xA;    			case MoveDirection.East:&#xD;&#xA;    				this.locationIndex++;&#xD;&#xA;    				pastLocation = locations[areaIndex][locationIndex - 1];&#xD;&#xA;    				break;&#xD;&#xA;    			case MoveDirection.West:&#xD;&#xA;    				this.locationIndex--;&#xD;&#xA;    				pastLocation = locations[areaIndex][locationIndex + 1];&#xD;&#xA;    				break;&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;    			if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX) //Check to ensure array indexes aren't out of bounds.&#xD;&#xA;    			{&#xD;&#xA;    				locationIndex = 0;&#xD;&#xA;    			}&#xD;&#xA;    			if (areaIndex &gt; MAX_NORTH_SOUTH_INDEX || areaIndex &lt; MIN_INDEX)&#xD;&#xA;    			{&#xD;&#xA;    				areaIndex = 0;&#xD;&#xA;    			}&#xD;&#xA;    		&#xD;&#xA;    			this.currentLocation = locations[areaIndex][locationIndex]; //Update location&#xD;&#xA;    			&#xD;&#xA;    			TravelMessage(pastLocation, this.currentLocation, moveDir); //Output Message&#xD;&#xA;    			&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		void TravelMessage(Location pastLocation, Location currentLocation, MoveDirection moveDir)&#xD;&#xA;    		{&#xD;&#xA;    			int pastNorthSouthIndex;&#xD;&#xA;    			switch(moveDir)&#xD;&#xA;    			{&#xD;&#xA;    			&#xD;&#xA;    			case MoveDirection.North:&#xD;&#xA;    				pastNorthSouthIndex = areaIndex - 1; &#xD;&#xA;    				break;&#xD;&#xA;    			default:&#xD;&#xA;    				pastNorthSouthIndex =  areaIndex;&#xD;&#xA;    				break;&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;    			Console.WriteLine(&quot;{0} has moved {1} from Area {2}, {3} to Area {4}, {5}&quot;, &#xD;&#xA;    			                  this.ClassOwner.Name, &#xD;&#xA;    			                  moveDir.ToString(), &#xD;&#xA;    			                  pastNorthSouthIndex,&#xD;&#xA;    			                  pastLocation.Name,&#xD;&#xA;    			                  areaIndex,&#xD;&#xA;    			                  currentLocation.Name);		&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		void InitializeIndexes()&#xD;&#xA;    		{&#xD;&#xA;    			this.areaIndex = 0;&#xD;&#xA;    			this.locationIndex = 0;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		void InitializeLocations()&#xD;&#xA;    		{&#xD;&#xA;    			int iterationCount = 0;&#xD;&#xA;    			&#xD;&#xA;    			locations = new Location[6][];&#xD;&#xA;    			&#xD;&#xA;    			for (int i = 0; i &lt; 6; i++)&#xD;&#xA;    			{&#xD;&#xA;    				locations[i] = new Location[3];&#xD;&#xA;    				for (int j = 0; j &lt; 3; j++)&#xD;&#xA;    				{&#xD;&#xA;    					locations[i][j] = new Location(&quot;Location: &quot; + iterationCount, &#xD;&#xA;    					                               &quot; &quot;, &#xD;&#xA;    					                               new List&lt;Item&gt;(), &#xD;&#xA;    					                               new List&lt;Npc&gt;()&#xD;&#xA;    					                               ); &#xD;&#xA;    					iterationCount++;&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    				&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The idea is to use a jagged array. The first dimension of this array is what dictates where the player is on the North/South coordinate, while the second dimension takes care of the East/West movement. &#xD;&#xA;&#xD;&#xA;I use two indexes, an areaIndex(North/South), and a locationIndex(East/West). &#xD;&#xA;&#xD;&#xA;If I wish to move North, the areaIndex would increment by one; likewise, to move South, the areaIndex would decrement by one. To move East would require the locationIndex to increment by one; West would decrement the locationIndex by one.&#xD;&#xA;&#xD;&#xA;The problem is that, while the code clearly states this in the Move(MoveDirection moveDir) method, nothing happens. &#xD;&#xA;&#xD;&#xA;I use the following code:&#xD;&#xA;&#xD;&#xA;    public static class Program&#xD;&#xA;    	{&#xD;&#xA;    		static void Main(string[] args)&#xD;&#xA;    		{&#xD;&#xA;    			&#xD;&#xA;    			Character johnDoe = new Npc(&quot;ID01&quot;);&#xD;&#xA;    			&#xD;&#xA;    			johnDoe.MoveCharacter(MoveDirection.North);&#xD;&#xA;    			johnDoe.MoveCharacter(MoveDirection.North);&#xD;&#xA;    			johnDoe.MoveCharacter(MoveDirection.West);&#xD;&#xA;                        johnDoe.MoveCharacter(MoveDirection.East);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;To provide this output:&#xD;&#xA;&#xD;&#xA;    John Doe has moved North from Area 0, Location: 0 to Area 1, Location: 3&#xD;&#xA;    John Doe has moved North from Area 1, Location: 3 to Area 2, Location: 6&#xD;&#xA;    John Doe has moved West from Area 2, Location: 6 to Area 2, Location: 6&#xD;&#xA;    John Doe has moved East from Area 2, Location: 6 to Area 2, Location: 7&#xD;&#xA;&#xD;&#xA;The third line indicates the west movement. To further clarify the issue, John Doe should be moving from Area 2, Location: 6 to Area 2, Location 5. Yet, it doesn't. Thus, my main question is, why isn't this working properly? I have tried a number of different solutions, most of them revolving around using multidimensional and jagged arrays. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36657" PostHistoryTypeId="1" PostId="15988" RevisionGUID="6ca132f9-01f9-49da-b720-d62282c44862" CreationDate="2011-08-14T18:51:32.197" UserId="8185" Text="Player Move Algorithm" />
  <row Id="36658" PostHistoryTypeId="3" PostId="15988" RevisionGUID="6ca132f9-01f9-49da-b720-d62282c44862" CreationDate="2011-08-14T18:51:32.197" UserId="8185" Text="&lt;c#&gt;&lt;algorithm&gt;" />
  <row Id="36659" PostHistoryTypeId="2" PostId="15989" RevisionGUID="bf2953ca-14b8-49b3-baeb-81c592aa94ac" CreationDate="2011-08-14T19:18:31.640" UserId="853" Text="I've come to a crossroads where I need to choose between focusing on AI or Graphics programming as a career in games. I'm interested in both and am really wanting to know which area might have more job opportunities or even which might be a more interesting career. I'm also curious if I'm unable to find a job in games what the outlook might be outside of games for each career path.&#xD;&#xA;&#xD;&#xA;Thanks to all the reply" />
  <row Id="36660" PostHistoryTypeId="1" PostId="15989" RevisionGUID="bf2953ca-14b8-49b3-baeb-81c592aa94ac" CreationDate="2011-08-14T19:18:31.640" UserId="853" Text="AI or Graphics Programmer as a career?" />
  <row Id="36661" PostHistoryTypeId="3" PostId="15989" RevisionGUID="bf2953ca-14b8-49b3-baeb-81c592aa94ac" CreationDate="2011-08-14T19:18:31.640" UserId="853" Text="&lt;career&gt;" />
  <row Id="36662" PostHistoryTypeId="2" PostId="15990" RevisionGUID="8c530c28-f649-4103-8548-616a64e39b8b" CreationDate="2011-08-14T19:42:31.943" UserId="744" Text="_Good_ graphics programmers are usually the most in-demand in the industry.&#xD;&#xA;&#xD;&#xA;No one is going to force you to choose between them professionally until you've had some real-world experience.&#xD;&#xA;&#xD;&#xA;The outlook for both is fine outside the industry, which is to say, both have focused skillsets that no one outside of games and simulation software will use, but if you're good at either you'll have no trouble dealing with normal software. (Except perhaps incredible frustration at your coworkers and tools.)&#xD;&#xA;&#xD;&#xA;No one can tell you which is more interesting to you. Pick the one you want to do most." />
  <row Id="36663" PostHistoryTypeId="5" PostId="15989" RevisionGUID="0633d732-80de-4c2e-82e4-901ef4df9a6e" CreationDate="2011-08-14T19:45:24.953" UserId="744" Comment="deleted 24 characters in body; edited tags; edited title" Text="I've come to a crossroads where I need to choose between focusing on AI or graphics programming for a career in games. I'm interested in both and am really wanting to know which area might have more job opportunities or even which might be a more interesting career. I'm also curious if I'm unable to find a job in games what the outlook might be outside of games for each career path.&#xD;&#xA;" />
  <row Id="36664" PostHistoryTypeId="4" PostId="15989" RevisionGUID="0633d732-80de-4c2e-82e4-901ef4df9a6e" CreationDate="2011-08-14T19:45:24.953" UserId="744" Comment="deleted 24 characters in body; edited tags; edited title" Text="Do AI or graphics programmers have more job opportunities?" />
  <row Id="36665" PostHistoryTypeId="6" PostId="15989" RevisionGUID="0633d732-80de-4c2e-82e4-901ef4df9a6e" CreationDate="2011-08-14T19:45:24.953" UserId="744" Comment="deleted 24 characters in body; edited tags; edited title" Text="&lt;programming&gt;&lt;career&gt;" />
  <row Id="36667" PostHistoryTypeId="2" PostId="15991" RevisionGUID="97628505-aae8-4f7f-8762-dbc223336c46" CreationDate="2011-08-14T21:11:17.253" UserId="5125" Text="I'd say go for what you like the most as it will surely make you be better on that than something you don't like as much.&#xD;&#xA;&#xD;&#xA;For the day you want to change and go for a non game programming job (I did that this year so I don't have That much experience about this kind of changing. But changing is usually the first time that counts right?) sure there are some things to learn (usually, it seems, a Lot of talking, more docs than in the WG industry, a better salary and shorter days ^^ ) but I don't think you will have any greater problem that a more or less experienced video game programmer can't handle.&#xD;&#xA;&#xD;&#xA;That said, I can't promise anything of course :-)" />
  <row Id="36668" PostHistoryTypeId="2" PostId="15992" RevisionGUID="3d2efeac-052e-4d9f-ac94-e2a548e05156" CreationDate="2011-08-14T21:28:48.690" UserId="2897" Text="I remember advocating AgateLib, but it's hard to get into and it wont work without a bit of OpenGL knowledge. So it is as good time as ever to remember some OpenGL :)&#xD;&#xA;&#xD;&#xA;First step would be to download [OpenTK][1]. You may want to google for any OpenTK tutorials, but since I doubt their existence, we will just code away.&#xD;&#xA;&#xD;&#xA;After unpacking OpenTK somewhere, lauch MonoDevelop, Ctrl+Shift+N, select empty project, add references to the OpenTK.dll and System.Drawing, add new empty class named &quot;PointsExample&quot; or something, and that's it.&#xD;&#xA;&#xD;&#xA;Now let's get those points on the screen! Here is a complete code with commentaries.&#xD;&#xA;&#xD;&#xA;    namespace Points&#xD;&#xA;    {&#xD;&#xA;    	using System;&#xD;&#xA;    	using System.Drawing;&#xD;&#xA;    	using System.Collections.Generic;&#xD;&#xA;    	using OpenTK;&#xD;&#xA;    	using OpenTK.Input;&#xD;&#xA;    	using OpenTK.Platform;&#xD;&#xA;    	using OpenTK.Graphics.OpenGL;&#xD;&#xA;    &#xD;&#xA;        public class PointsExample : GameWindow&#xD;&#xA;        {&#xD;&#xA;    	    // These are clipping planes, forget them for now.&#xD;&#xA;    		private const int nearPlane = 1;&#xD;&#xA;    		private const int farPlane = 11;&#xD;&#xA;    &#xD;&#xA;    		// Here we will store mouse position on click.&#xD;&#xA;    		private List&lt;Vector2&gt; points = new List&lt;Vector2&gt;(32);&#xD;&#xA;    &#xD;&#xA;            public PointsExample()&#xD;&#xA;                : base(800, 600, OpenTK.Graphics.GraphicsMode.Default, &quot;The shortest distance between two points is under construction.&quot;)&#xD;&#xA;            {&#xD;&#xA;    			// It's a bad karma to place complex logic in constructors,&#xD;&#xA;    			// so we will perform initialization elsewhere.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnLoad(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// This method will be called on window load,&#xD;&#xA;    			// looks like a good place for initialization.&#xD;&#xA;    &#xD;&#xA;    			// Lets enable VSync and remove distracting buzz of coolers.&#xD;&#xA;    			OpenTK.Graphics.GraphicsContext.CurrentContext.VSync = true;&#xD;&#xA;    &#xD;&#xA;    			// Depth buffer isn't needed for simple 2D drawing,&#xD;&#xA;    			// so we tell OpenGl to not update it.&#xD;&#xA;            	GL.Disable(EnableCap.DepthTest);&#xD;&#xA;    &#xD;&#xA;    			// Disable polygon culling, it's not needed in 2D drawing.&#xD;&#xA;                GL.Disable(EnableCap.CullFace);&#xD;&#xA;    &#xD;&#xA;    			// Points will be drawn with anti-aliasing.&#xD;&#xA;    			GL.Enable(EnableCap.PointSmooth);&#xD;&#xA;    			GL.PointSize(24.0f); // Make points large and noticable.&#xD;&#xA;    &#xD;&#xA;    			// Points will have smooth edges.&#xD;&#xA;        		GL.Enable(EnableCap.Blend);&#xD;&#xA;        		GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    			&#xD;&#xA;    			// Grab a kvass and read: http://www.songho.ca/opengl/gl_transform.html&#xD;&#xA;    			// It's important to understand matrices, or your attempts at drawing&#xD;&#xA;    			// will be constantly thwarted by math.&#xD;&#xA;    &#xD;&#xA;    			// Lets setup a projection by switching to projection matrix stack,&#xD;&#xA;    			// then multiply identity matrix and a transformation that produces a parallel projection.&#xD;&#xA;    			// Now (0, 0) is the top left, X coord is going to the right&#xD;&#xA;    			// and Y coord is going to the bottom, both coords maps to the screen pixels.&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;    			&#xD;&#xA;    			// Still confused? &#xD;&#xA;    			// Selectively read this: http://www.falloutsoftware.com/tutorials/gl/gl0.htm&#xD;&#xA;    			// and keep in mind that even though we're drawing 2d stuff, we're doing so in the 3d world.&#xD;&#xA;    			&#xD;&#xA;    			// Also notice that the near clip plane is set at depth of 1, and far plane at the depth of 10.&#xD;&#xA;    			// Everything closer than 1 and farther than 11 will be cut off.&#xD;&#xA;    			&#xD;&#xA;    			// Now coord (31, 63) would mean 32-nd pixel to the right from left border&#xD;&#xA;    			// and 64-th pixel downwards from top border of the screen.&#xD;&#xA;    &#xD;&#xA;    			Mouse.ButtonDown += OnMouseClick;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    		private void OnMouseClick(object sender, MouseButtonEventArgs e)&#xD;&#xA;    		{&#xD;&#xA;    			// User clicks — we add a point for drawing later.&#xD;&#xA;    			// Thanks to orthographic projection mouse coords&#xD;&#xA;    			// directly correspond to the world coords.&#xD;&#xA;    			// Later you may want to read about Project/Unproject.&#xD;&#xA;    			points.Add(new Vector2(e.X, e.Y));&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            protected override void OnUnload(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Not used in this example,&#xD;&#xA;    			// but typically you will want to do a complete deinitialization here.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnResize(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Update viewport when resizing window.&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    &#xD;&#xA;    			// Uncomment these lines to disable scaling on screen resize:&#xD;&#xA;    			// GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			// GL.LoadIdentity();&#xD;&#xA;    			// GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnUpdateFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Typically your game logic will be updated in this update loop.&#xD;&#xA;    			// We don't have any time-dependent progress logic yet, so it's empty.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnRenderFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			GL.ClearColor(Color.CornflowerBlue);  // It's almost like XNA :)&#xD;&#xA;    			GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);&#xD;&#xA;    			&#xD;&#xA;    			// Finally, it's time to draw the points in the draw loop.&#xD;&#xA;    &#xD;&#xA;    			// Remember the setup of the clipping planes?&#xD;&#xA;    			// We will need to draw our geometry somewhere between the two clip planes&#xD;&#xA;    			// so it will be visible.&#xD;&#xA;    &#xD;&#xA;    			// Start operations on model-view matrix stack...&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Modelview);&#xD;&#xA;    &#xD;&#xA;    			// Pushing matrices is not really needed in this simple example,&#xD;&#xA;    			// but typically you will use PushMatrix before drawing object&#xD;&#xA;    			// whose transformations depend on previously computed matrix,&#xD;&#xA;    			// and that's going to happen very often.&#xD;&#xA;    			GL.PushMatrix();&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			GL.Translate(0.0f, 0.0f, -((nearPlane+farPlane) / 2f));&#xD;&#xA;    &#xD;&#xA;    			// Begin drawing points. &#xD;&#xA;    			// Read about drawing primitives here:&#xD;&#xA;    			// http://www.opentk.com/doc/chapter/2/opengl/geometry/primitives&#xD;&#xA;        		GL.Begin(BeginMode.Points);		&#xD;&#xA;    			GL.Color3(Color.Gold);  // From now on all vertices will be golden.&#xD;&#xA;    			&#xD;&#xA;    			foreach(var point in points)&#xD;&#xA;    			{&#xD;&#xA;    				GL.Vertex2(point);&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;        		GL.End(); // End drawing points.&#xD;&#xA;    &#xD;&#xA;    			GL.PopMatrix(); // We pushed, so now we need to pop previous matrix from the stack.&#xD;&#xA;    &#xD;&#xA;                SwapBuffers();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            [STAThread]&#xD;&#xA;            static void Main()&#xD;&#xA;            {&#xD;&#xA;                using (var game = new PointsExample())&#xD;&#xA;                {&#xD;&#xA;                    game.Run(200.0, 0.0);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And that's all for a simple task of drawing colored points. I hope that you've found it useful and that I didn't do anything wrong :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opentk.com/" />
  <row Id="36669" PostHistoryTypeId="5" PostId="15992" RevisionGUID="deab5638-5466-4a9c-b846-84f4db5953a2" CreationDate="2011-08-14T21:35:31.290" UserId="2897" Comment="Forgot a commentary" Text="I remember advocating AgateLib to you, but it's hard to get into and it wont work without a bit of OpenGL knowledge. So it is as good time as ever to remember some OpenGL :)&#xD;&#xA;&#xD;&#xA;First step would be to download [OpenTK][1]. You may want to google for any OpenTK tutorials, but since I doubt their existence, we will just code away.&#xD;&#xA;&#xD;&#xA;After unpacking OpenTK somewhere, lauch MonoDevelop, Ctrl+Shift+N, select empty project, add references to the OpenTK.dll and System.Drawing, add new empty class named &quot;PointsExample&quot; or something, and that's it.&#xD;&#xA;&#xD;&#xA;Now let's get those points on the screen! Here is a complete code with commentaries.&#xD;&#xA;&#xD;&#xA;    namespace Points&#xD;&#xA;    {&#xD;&#xA;    	using System;&#xD;&#xA;    	using System.Drawing;&#xD;&#xA;    	using System.Collections.Generic;&#xD;&#xA;    	using OpenTK;&#xD;&#xA;    	using OpenTK.Input;&#xD;&#xA;    	using OpenTK.Platform;&#xD;&#xA;    	using OpenTK.Graphics.OpenGL;&#xD;&#xA;    &#xD;&#xA;        public class PointsExample : GameWindow&#xD;&#xA;        {&#xD;&#xA;    	    // These are clipping planes, forget them for now.&#xD;&#xA;    		private const int nearPlane = 1;&#xD;&#xA;    		private const int farPlane = 11;&#xD;&#xA;    &#xD;&#xA;    		// Here we will store mouse position on click.&#xD;&#xA;    		private List&lt;Vector2&gt; points = new List&lt;Vector2&gt;(32);&#xD;&#xA;    &#xD;&#xA;            public PointsExample()&#xD;&#xA;                : base(800, 600, OpenTK.Graphics.GraphicsMode.Default, &quot;The shortest distance between two points is under construction.&quot;)&#xD;&#xA;            {&#xD;&#xA;    			// It's a bad karma to place complex logic in constructors,&#xD;&#xA;    			// so we will perform initialization elsewhere.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnLoad(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// This method will be called on window load,&#xD;&#xA;    			// looks like a good place for initialization.&#xD;&#xA;    &#xD;&#xA;    			// Lets enable VSync and remove distracting buzz of coolers.&#xD;&#xA;    			// Actually, coolers are still buzzing, because VSync won't work in windowed mode.&#xD;&#xA;    			OpenTK.Graphics.GraphicsContext.CurrentContext.VSync = true;&#xD;&#xA;    &#xD;&#xA;    			// Depth buffer isn't needed for simple 2D drawing,&#xD;&#xA;    			// so we tell OpenGl to not update it.&#xD;&#xA;            	GL.Disable(EnableCap.DepthTest);&#xD;&#xA;    &#xD;&#xA;    			// Disable polygon culling, it's not needed in 2D drawing.&#xD;&#xA;                GL.Disable(EnableCap.CullFace);&#xD;&#xA;    &#xD;&#xA;    			// Points will be drawn with anti-aliasing.&#xD;&#xA;    			GL.Enable(EnableCap.PointSmooth);&#xD;&#xA;    			GL.PointSize(24.0f); // Make points large and noticable.&#xD;&#xA;    &#xD;&#xA;    			// Points will have smooth edges.&#xD;&#xA;        		GL.Enable(EnableCap.Blend);&#xD;&#xA;        		GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    			&#xD;&#xA;    			// Grab a kvass and read: http://www.songho.ca/opengl/gl_transform.html&#xD;&#xA;    			// It's important to understand matrices, or your attempts at drawing&#xD;&#xA;    			// will be constantly thwarted by math.&#xD;&#xA;    &#xD;&#xA;    			// Lets setup a projection by switching to projection matrix stack,&#xD;&#xA;    			// then multiply identity matrix and a transformation that produces a parallel projection.&#xD;&#xA;    			// Now (0, 0) is the top left, X coord is going to the right&#xD;&#xA;    			// and Y coord is going to the bottom, both coords maps to the screen pixels.&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;    			&#xD;&#xA;    			// Still confused? &#xD;&#xA;    			// Selectively read this: http://www.falloutsoftware.com/tutorials/gl/gl0.htm&#xD;&#xA;    			// and keep in mind that even though we're drawing 2d stuff, we're doing so in the 3d world.&#xD;&#xA;    			&#xD;&#xA;    			// Also notice that the near clip plane is set at depth of 1, and far plane at the depth of 10.&#xD;&#xA;    			// Everything closer than 1 and farther than 11 will be cut off.&#xD;&#xA;    			&#xD;&#xA;    			// Now coord (31, 63) would mean 32-nd pixel to the right from left border&#xD;&#xA;    			// and 64-th pixel downwards from top border of the screen.&#xD;&#xA;    &#xD;&#xA;    			Mouse.ButtonDown += OnMouseClick;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    		private void OnMouseClick(object sender, MouseButtonEventArgs e)&#xD;&#xA;    		{&#xD;&#xA;    			// User clicks — we add a point for drawing later.&#xD;&#xA;    			// Thanks to orthographic projection mouse coords&#xD;&#xA;    			// directly correspond to the world coords.&#xD;&#xA;    			// Later you may want to read about Project/Unproject.&#xD;&#xA;    			points.Add(new Vector2(e.X, e.Y));&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            protected override void OnUnload(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Not used in this example,&#xD;&#xA;    			// but typically you will want to do a complete deinitialization here.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnResize(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Update viewport when resizing window.&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    &#xD;&#xA;    			// Uncomment these lines to disable scaling on screen resize:&#xD;&#xA;    			// GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			// GL.LoadIdentity();&#xD;&#xA;    			// GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnUpdateFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Typically your game logic will be updated in this update loop.&#xD;&#xA;    			// We don't have any time-dependent progress logic yet, so it's empty.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnRenderFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			GL.ClearColor(Color.CornflowerBlue);  // It's almost like XNA :)&#xD;&#xA;    			GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);&#xD;&#xA;    			&#xD;&#xA;    			// Finally, it's time to draw the points in the draw loop.&#xD;&#xA;    &#xD;&#xA;    			// Remember the setup of the clipping planes?&#xD;&#xA;    			// We will need to draw our geometry somewhere between the two clip planes&#xD;&#xA;    			// so it will be visible.&#xD;&#xA;    &#xD;&#xA;    			// Start operations on model-view matrix stack...&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Modelview);&#xD;&#xA;    &#xD;&#xA;    			// Pushing matrices is not really needed in this simple example,&#xD;&#xA;    			// but typically you will use PushMatrix before drawing object&#xD;&#xA;    			// whose transformations depend on previously computed matrix,&#xD;&#xA;    			// and that's going to happen very often.&#xD;&#xA;    			GL.PushMatrix();&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			// Remember that negative Z axis is going &quot;into the screen&quot;, so we move vertices away from camera.&#xD;&#xA;    			GL.Translate(0.0f, 0.0f, -((nearPlane+farPlane) / 2f));&#xD;&#xA;    &#xD;&#xA;    			// Begin drawing points. &#xD;&#xA;    			// Read about drawing primitives here:&#xD;&#xA;    			// http://www.opentk.com/doc/chapter/2/opengl/geometry/primitives&#xD;&#xA;        		GL.Begin(BeginMode.Points);		&#xD;&#xA;    			GL.Color3(Color.Gold);  // From now on all vertices will be golden.&#xD;&#xA;    			&#xD;&#xA;    			foreach(var point in points)&#xD;&#xA;    			{&#xD;&#xA;    				GL.Vertex2(point);&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;        		GL.End(); // End drawing points.&#xD;&#xA;    &#xD;&#xA;    			GL.PopMatrix(); // We pushed, so now we need to pop previous matrix from the stack.&#xD;&#xA;    &#xD;&#xA;                SwapBuffers();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            [STAThread]&#xD;&#xA;            static void Main()&#xD;&#xA;            {&#xD;&#xA;                using (var game = new PointsExample())&#xD;&#xA;                {&#xD;&#xA;                    game.Run(200.0, 0.0);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And that's all for a simple task of drawing colored points. I hope that you've found it useful and that I didn't do anything wrong :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opentk.com/" />
  <row Id="36670" PostHistoryTypeId="2" PostId="15993" RevisionGUID="18725219-59b8-4414-818e-049c4717899c" CreationDate="2011-08-14T22:13:13.153" UserId="9256" Text="I have a sprite batch that is set to draw to a RenderTarget2d that is 500px larger in both height/width. However, whenever I call the spritebatch draw command using a point outside of the physical screen width/height it will not draw the object.&#xD;&#xA;&#xD;&#xA;I am performing some 3d transforms on the texture so I need the areas outside the screen to be drawn. I have tried turning culling to none and this had no effect.&#xD;&#xA;&#xD;&#xA;Thanks ahead of time for your help.&#xD;&#xA;" />
  <row Id="36671" PostHistoryTypeId="1" PostId="15993" RevisionGUID="18725219-59b8-4414-818e-049c4717899c" CreationDate="2011-08-14T22:13:13.153" UserId="9256" Text="XNA SpriteBatch - drawing off screen" />
  <row Id="36672" PostHistoryTypeId="3" PostId="15993" RevisionGUID="18725219-59b8-4414-818e-049c4717899c" CreationDate="2011-08-14T22:13:13.153" UserId="9256" Text="&lt;xna&gt;&lt;spritebatch&gt;" />
  <row Id="36673" PostHistoryTypeId="25" PostId="14528" RevisionGUID="b5313778-5f7f-4d5b-b5fe-b86d990a97ca" CreationDate="2011-08-14T22:37:07.387" Comment="http://twitter.com/#!/StackGameDev/status/102871398762037248" />
  <row Id="36674" PostHistoryTypeId="2" PostId="15994" RevisionGUID="e064c75e-c4e6-40c8-9b85-1f65259de570" CreationDate="2011-08-15T00:29:29.023" UserId="3184" Text="I started my journey to learn games programming from the scratch (I'm a software developer but not in gaming field), I'm targeting iOS games development.&#xD;&#xA;&#xD;&#xA;Currently I'm ready &quot;O'reilly iPhone Game Development&quot;, then I'm considering reading &quot;Apress Learn iPhone and iPad Cocos2D Game Development&quot;.&#xD;&#xA;&#xD;&#xA;Am I on the right track? Should I read and learn OpenGL ES? If yes, when to start?&#xD;&#xA;&#xD;&#xA;What is the Math type do I need for games development? Algebra and 2D Geometry?  &#xD;&#xA;&#xD;&#xA;Books like &quot;Challenges for Game Designers&quot; and &quot;Game Design Workshop, 2nd Edition&quot; are on my list also.&#xD;&#xA;&#xD;&#xA;I really appreciate if you know a better path to follow.&#xD;&#xA;" />
  <row Id="36675" PostHistoryTypeId="1" PostId="15994" RevisionGUID="e064c75e-c4e6-40c8-9b85-1f65259de570" CreationDate="2011-08-15T00:29:29.023" UserId="3184" Text="I started my journey this way, am I on the right track?" />
  <row Id="36676" PostHistoryTypeId="3" PostId="15994" RevisionGUID="e064c75e-c4e6-40c8-9b85-1f65259de570" CreationDate="2011-08-15T00:29:29.023" UserId="3184" Text="&lt;opengl-es&gt;&lt;books&gt;&lt;learning&gt;" />
  <row Id="36677" PostHistoryTypeId="25" PostId="15989" RevisionGUID="efee577b-c738-4820-be68-588e0983ae3d" CreationDate="2011-08-15T00:37:08.480" Comment="http://twitter.com/#!/StackGameDev/status/102901602163236864" />
  <row Id="36678" PostHistoryTypeId="2" PostId="15995" RevisionGUID="8d5ece3a-4f05-49db-b209-8706c16972e6" CreationDate="2011-08-15T01:22:08.937" UserId="9270" Text="You might should start learning a little object-C first, but you you do not need to learn OpenGL ES before Cocos2D." />
  <row Id="36679" PostHistoryTypeId="2" PostId="15996" RevisionGUID="dcf258c6-a1a9-4c99-80ea-1a24cdec0f60" CreationDate="2011-08-15T01:22:25.240" UserId="9269" Text="I am building a MMO and want to add NPCs. The thing is I don't know the basic design. What does the calculations, the clients or the server? I would understand the server calculating events and reactions, but when it comes down to A* pathfinding and position and movement of player, who calculates that??&#xD;&#xA;&#xD;&#xA;Who calculate the AI the server or client? I couldn't imagine the server calculating the pathfinding, position, movement and so on. Please I need help understanding this, thanks, anything will help. " />
  <row Id="36680" PostHistoryTypeId="1" PostId="15996" RevisionGUID="dcf258c6-a1a9-4c99-80ea-1a24cdec0f60" CreationDate="2011-08-15T01:22:25.240" UserId="9269" Text="AI on MMO, who does the calculations" />
  <row Id="36681" PostHistoryTypeId="3" PostId="15996" RevisionGUID="dcf258c6-a1a9-4c99-80ea-1a24cdec0f60" CreationDate="2011-08-15T01:22:25.240" UserId="9269" Text="&lt;ai&gt;&lt;mmo&gt;" />
  <row Id="36682" PostHistoryTypeId="2" PostId="15997" RevisionGUID="22dbdeac-f706-476a-b68d-87c377e0032d" CreationDate="2011-08-15T01:35:29.823" UserId="7328" Text="So far you seem to be on the right track. those books can really give you a boost if you are going to develop your games using objective-c. if you have some a good knowledge about obj-c you can easily try changing tech-demo codes, released with the game engine. at least that's the way I usually learn how to work with new tools.&#xD;&#xA;&#xD;&#xA;and there are other options for iphone development too. if you feel more comfortable with other languages like c# or c++ or other popular languages, there are engines to based on them.&#xD;&#xA;&#xD;&#xA;you may need both OpenGL and mathematics knowledge while developing but just working on the engine helps you learn almost every thing you need to know. and later if you get into any problems, you can easily pinpoint them and directly ask about those specific opengl/math problem you are facing.&#xD;&#xA;&#xD;&#xA;just put a comment if you have specific language in mind." />
  <row Id="36683" PostHistoryTypeId="2" PostId="15998" RevisionGUID="df2c9642-53d1-4e41-9ecc-bc3aa837569c" CreationDate="2011-08-15T01:39:32.950" UserId="9268" Text="in a previous question asked here:[how-to-create-a-hexagon-world-map][1] @Tim Holt has provided code that does the job that i'm wanted to do, the only difference I would like is to have it as squares rather than hex. Is this easy to convert, or is there a better way?&#xD;&#xA;thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/6382/how-to-create-a-hexagon-world-map-in-php-from-a-database-for-a-browser-based-stra" />
  <row Id="36684" PostHistoryTypeId="1" PostId="15998" RevisionGUID="df2c9642-53d1-4e41-9ecc-bc3aa837569c" CreationDate="2011-08-15T01:39:32.950" UserId="9268" Text="hexagon tiles to square tiled map" />
  <row Id="36685" PostHistoryTypeId="3" PostId="15998" RevisionGUID="df2c9642-53d1-4e41-9ecc-bc3aa837569c" CreationDate="2011-08-15T01:39:32.950" UserId="9268" Text="&lt;tiles&gt;&lt;php&gt;" />
  <row Id="36686" PostHistoryTypeId="5" PostId="15959" RevisionGUID="19f4ab3d-5384-4a70-a2a4-961dfb4976fd" CreationDate="2011-08-15T02:04:52.013" UserId="9258" Comment="added 848 characters in body" Text="The code below compiles fine on the Flex 4 SDK on Fedora 15.  Mouse-click opens the dialog box, I click okay, and a file is saved, **but the file is empty**.  I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data.&#xD;&#xA;&#xD;&#xA;Then I broke the FileReference declaration out of the function into the class level, hoping to avoid [a known bug][1] and to keep a reference to the file alive outside the function.  However, the same problem persists.&#xD;&#xA;&#xD;&#xA;Hoping to set up a workaround, I added the debug Flash player to my path and ran the file from Flash without the benefit of the browser, and it **works**.  So now a Flex problem has become a Firefox problem, maybe owing to a [shady procedure I used to install the plugin][2] without really understanding what was happening.  I am running Firefox 5.0.&#xD;&#xA;&#xD;&#xA;In essence my workflow is fixed, but perhaps people who performed the above will not be able to use projects with FileReference.save()?  Should I be worried about this edge case?&#xD;&#xA;&#xD;&#xA;    /*&#xD;&#xA;    WriteTheFile.as&#xD;&#xA;    Original code by Brian Hodge (brian@hodgedev.com)&#xD;&#xA;    Test to see if ActionScript/Flash can write files&#xD;&#xA;    */&#xD;&#xA;    package{&#xD;&#xA;        import flash.display.Sprite;&#xD;&#xA;        import flash.events.Event;&#xD;&#xA;        import flash.events.MouseEvent;&#xD;&#xA;        import flash.utils.ByteArray;&#xD;&#xA;        import flash.net.FileReference;&#xD;&#xA;    &#xD;&#xA;        public class WriteTheFile extends Sprite &#xD;&#xA;        {&#xD;&#xA;            private var _xml:String;&#xD;&#xA;            private var fr:FileReference;&#xD;&#xA;    &#xD;&#xA;            public function WriteTheFile():void &#xD;&#xA;            {&#xD;&#xA;                if (stage) init();&#xD;&#xA;                else addEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            private function init(e:Event = null):void &#xD;&#xA;            {&#xD;&#xA;                removeEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;                //Calling the save method requires user interaction and Flash Player 10&#xD;&#xA;                stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown);&#xD;&#xA;            }&#xD;&#xA;            private function _onMouseDown(e:MouseEvent):void&#xD;&#xA;            {&#xD;&#xA;                fr = new FileReference()&#xD;&#xA;                fr.save(&quot;&lt;xml&gt;&lt;test&gt;data&lt;/test&gt;&lt;/xml&gt;&quot;, &quot;filename.txt&quot;);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;EDIT: addressed answer in code above, but the same problem exists.&#xD;&#xA;&#xD;&#xA;EDIT: This works on the same system when the standalone player is invoked.  Therefore this is a browser (FF 5.0) plugin problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.techper.net/2007/12/30/flash-filereferencebrowse-problems-on-linux/&#xD;&#xA;  [2]: http://www.if-not-true-then-false.com/2010/install-adobe-flash-player-10-on-fedora-centos-red-hat-rhel/#install-adobe-flash-player-64-bit" />
  <row Id="36687" PostHistoryTypeId="5" PostId="15959" RevisionGUID="484bf229-0a8b-4fd0-a27b-e1720b80280b" CreationDate="2011-08-15T02:11:52.767" UserId="9258" Comment="deleted 21 characters in body" Text="The code below compiles fine on the Flex 4 SDK on Fedora 15.  Mouse-click opens the dialog box, I click okay, and a file is saved, **but the file is empty**.  I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data.&#xD;&#xA;&#xD;&#xA;Then I broke the FileReference declaration out of the function into the class level, hoping to avoid [a known bug][1] and to keep a reference to the file alive outside the function.  However, the same problem persists.&#xD;&#xA;&#xD;&#xA;Hoping to set up a workaround, I added the debug Flash player to my path and ran the file from Flash without the benefit of the browser, and it **works**.  So now a Flex problem has become a Firefox problem, maybe owing to a [shady procedure I used to install the plugin][2] without really understanding what was happening.  I am running Firefox 5.0.&#xD;&#xA;&#xD;&#xA;In essence my workflow is fixed, but perhaps people who performed the above will not be able to use projects with FileReference.save()?  Should I be worried about this edge case?&#xD;&#xA;&#xD;&#xA;    /*&#xD;&#xA;    WriteTheFile.as&#xD;&#xA;    Original code by Brian Hodge&#xD;&#xA;    Test to see if ActionScript/Flash can write files&#xD;&#xA;    */&#xD;&#xA;    package{&#xD;&#xA;        import flash.display.Sprite;&#xD;&#xA;        import flash.events.Event;&#xD;&#xA;        import flash.events.MouseEvent;&#xD;&#xA;        import flash.utils.ByteArray;&#xD;&#xA;        import flash.net.FileReference;&#xD;&#xA;    &#xD;&#xA;        public class WriteTheFile extends Sprite &#xD;&#xA;        {&#xD;&#xA;            private var _xml:String;&#xD;&#xA;            private var fr:FileReference;&#xD;&#xA;    &#xD;&#xA;            public function WriteTheFile():void &#xD;&#xA;            {&#xD;&#xA;                if (stage) init();&#xD;&#xA;                else addEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            private function init(e:Event = null):void &#xD;&#xA;            {&#xD;&#xA;                removeEventListener(Event.ADDED_TO_STAGE, init);&#xD;&#xA;                //Calling the save method requires user interaction and Flash Player 10&#xD;&#xA;                stage.addEventListener(MouseEvent.MOUSE_DOWN, _onMouseDown);&#xD;&#xA;            }&#xD;&#xA;            private function _onMouseDown(e:MouseEvent):void&#xD;&#xA;            {&#xD;&#xA;                fr = new FileReference()&#xD;&#xA;                fr.save(&quot;&lt;xml&gt;&lt;test&gt;data&lt;/test&gt;&lt;/xml&gt;&quot;, &quot;filename.txt&quot;);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;EDIT: addressed answer in code above, but the same problem exists.&#xD;&#xA;&#xD;&#xA;EDIT: This works on the same system when the standalone player is invoked.  Therefore this is a browser (FF 5.0) plugin problem.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.techper.net/2007/12/30/flash-filereferencebrowse-problems-on-linux/&#xD;&#xA;  [2]: http://www.if-not-true-then-false.com/2010/install-adobe-flash-player-10-on-fedora-centos-red-hat-rhel/#install-adobe-flash-player-64-bit" />
  <row Id="36688" PostHistoryTypeId="2" PostId="15999" RevisionGUID="5bb1eb6f-2122-4bfb-9912-7c4a5cf87ffb" CreationDate="2011-08-15T02:13:20.830" UserId="1259" Text="Usually the server should calculate or validate every data passed to or received from the client. But It depends on how much you can trust the client and how important that calculation is. Sometimes the main calculation could be done on the client and the server might be able to use a simple method to validate the resulting data." />
  <row Id="36689" PostHistoryTypeId="2" PostId="16000" RevisionGUID="ee5a677a-d9c4-415b-9a13-0220c385a1bf" CreationDate="2011-08-15T02:14:39.377" UserId="7728" Text="The short answer is that for a standard MMO, the AI calculations are always performed by the server.&#xD;&#xA;&#xD;&#xA;Some games will have the client try to predict the AI, so that NPCs will appear to react more quickly, but that's just an illusion;  the real NPC is always controlled by the server." />
  <row Id="36690" PostHistoryTypeId="2" PostId="16001" RevisionGUID="a7311881-2436-4f63-9af7-dd1086ce9e6a" CreationDate="2011-08-15T02:27:33.410" UserId="9271" Text="I recently did the programming on a [game][1] that was just released and i've decided that for my next project I want to do something a little bigger scale.  I plan to develop a game to be sold on Steam, it will be 3D.  I've done large-scale games in Flash and a small game in C++ written with OpenGL.  I realize that flash-based games can be submitted to Steam but I'd like for it to be written in some variation of C.  I'm looking for information on a couple things.&#xD;&#xA;&#xD;&#xA; 1.  What engine should I use? Ideally I'd like it to work on both Mac and PC. Seeing as it would be released on Steam, I'd like to use the Source Engine but I'm worried about having to pay licensing fees when I don't plan to make loads of money on it - it's mainly for the experience and as a resume builder.&#xD;&#xA; 2.  What sorts of things should I keep in mind when developing so that when, and if, it gets accepted, the process of adding the [Steam-specific functionality][3] will be less painful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.newgrounds.com/portal/view/576557&#xD;&#xA;  [3]: http://www.steampowered.com/steamworks/FAQ.php#Technical" />
  <row Id="36691" PostHistoryTypeId="1" PostId="16001" RevisionGUID="a7311881-2436-4f63-9af7-dd1086ce9e6a" CreationDate="2011-08-15T02:27:33.410" UserId="9271" Text="What should I keep in mind while developing a game for Steam?" />
  <row Id="36692" PostHistoryTypeId="3" PostId="16001" RevisionGUID="a7311881-2436-4f63-9af7-dd1086ce9e6a" CreationDate="2011-08-15T02:27:33.410" UserId="9271" Text="&lt;engine&gt;&lt;valve&gt;&lt;steam&gt;&lt;process&gt;" />
  <row Id="36693" PostHistoryTypeId="25" PostId="15996" RevisionGUID="a1d1ef93-d376-4b60-b196-5c89af0d427e" CreationDate="2011-08-15T02:37:09.620" Comment="http://twitter.com/#!/StackGameDev/status/102931804910129153" />
  <row Id="36694" PostHistoryTypeId="2" PostId="16002" RevisionGUID="9b9d14ff-5afb-4320-8e9e-963243006ac8" CreationDate="2011-08-15T03:03:22.653" UserId="237" Text="An MMO is a public- (Internet-) facing server. Anything that you want to be able to control completely should not be accessible to the public, otherwise you risk allowing an attacker to control NPCs. Unless you're doing some sort of encryption on your commands (which will impact performance), you can't trust the client to be running only your own code.&#xD;&#xA;&#xD;&#xA;Predicting NPC movements on the client to compensate for lag is a great idea; you could theoretically include as much of the AI behaviour as you wanted in the client program and have them sync up periodically - but allowing the client to dictate the behaviour of an NPC would grant the client the potential to mess with the game world. If the client descynchronises from the game world on the server then you'll end up with uncontrollable rogue NPCs.&#xD;&#xA;&#xD;&#xA;Which is a shame, really, because distributing AI over clients could impact scalability." />
  <row Id="36695" PostHistoryTypeId="2" PostId="16003" RevisionGUID="2a9258b0-1303-44da-8a69-43dac228e108" CreationDate="2011-08-15T03:05:59.323" UserId="9190" Text="Most MMOs these days have anything important done server-side, for safety reasons. You can't off-load much to the client, which is why one of the first things axed are AI routines. I think most developers consider client-side to be hackable as a rule, not an exception.&#xD;&#xA;&#xD;&#xA;Scalify's Badumna ( http://www.scalify.com/badumna.php ) tries to off-load part of it on the clients in that they'll have calculations done client-side and sent to each other; some data is also sent to an authorative peer to be validated before it's passed on to clients, just like a dedicated server. The issue is that ALL data in a multiplayer game MUST be sent through an authoritative peer if you want to prevent cheating. I brought up Badumna as it seemed the closest to what you'd might want, but even that won't be able to catch cheaters -- it might catch some, but anything critical (ie. everything, pretty much) has to be done server-side." />
  <row Id="36696" PostHistoryTypeId="5" PostId="16003" RevisionGUID="d871d399-8d83-4796-bd20-ea58829e67bd" CreationDate="2011-08-15T03:13:42.900" UserId="9190" Comment="added 1514 characters in body" Text="Most MMOs these days have anything important done server-side, for safety reasons. You can't off-load much to the client, which is why one of the first things axed are AI routines. I think most developers consider client-side to be hackable as a rule, not an exception.&#xD;&#xA;&#xD;&#xA;Scalify's Badumna ( http://www.scalify.com/badumna.php ) tries to off-load part of it on the clients in that they'll have calculations done client-side and sent to each other; some data is also sent to an authorative peer to be validated before it's passed on to clients, just like a dedicated server. The issue is that ALL data in a multiplayer game MUST be sent through an authoritative peer if you want to prevent cheating. I brought up Badumna as it seemed the closest to what you'd might want, but even that won't be able to catch cheaters -- it might catch some, but anything critical (ie. everything, pretty much) has to be done server-side.&#xD;&#xA;&#xD;&#xA;I might expand some on Badumna, because it could still be something you'll find useful (but I urge you to reconsider off-loading anything important on the clients, because the clients WILL cheat).&#xD;&#xA;&#xD;&#xA;Badumna offers a hybrid architecture for data operations. It provides complete control to the developer in deciding what is critical (and must be verified) and what isn't (and so can be sent by the decentralized network). &#xD;&#xA;&#xD;&#xA;If an MMO requires that every single bit of information has to be verified then Badumna will function as a client-server solution. However, I believe that there are different categories of MMO applications with varying requirements. For example, quite often an MMO will have combat zones where players are likely to cheat and hence every bit of information has to be verified. However, there are also zones where players can only walk/run/dance/chat. Such zones do not require complete verification and can utilize Badumna's decentralized network and benefit from the scalability that it can offer. &#xD;&#xA;&#xD;&#xA;Secondly, Badumna provides additional security features that developers can access such as identity protection (so that users cannot pretend to be someone else), complaint proxy (allowing clients to be configured to report malicious/cheating players to a trusted source), and black listing (banning malicious players from the games).&#xD;&#xA;&#xD;&#xA;I've not really explored Badumna that much, so there migh be issues and features I'm unaware of, but at least I've given a cursory glance on it.&#xD;&#xA;&#xD;&#xA;tl;dr: the client should really just be a keyboard and mouse hooked up to the internet." />
  <row Id="36697" PostHistoryTypeId="2" PostId="16004" RevisionGUID="b3bb471c-1675-4d24-9c61-d81774c32011" CreationDate="2011-08-15T03:22:22.637" UserId="9299" Text="My game involves a level with deformable terrain and units that can travel in any direction but are slowed down by uneven terrain. Normal A-star should work fine in most cases, except on flat land where no matter how the general purpose pathfinder worked it would not send units on a direct path. Theta-star would work if the entire level was fairly flat, but would be much slower if it initially had to take uneven terrain into account.&#xD;&#xA;&#xD;&#xA;I think a Manhattan-distance base A-star algorithm would be fast and give a good enough hint to allow other path finding or steering algorithms to take over, but I'm not sure what type of algorithm to use to look ahead and decide when to abandon the path, take a more direct route, and where to jump back on the path later.&#xD;&#xA;&#xD;&#xA;(Theta-star seems like it would be too inefficient if it was adjusted to take things like slopes, obstacles, or roads into account. See the solution proposed to the comment about avoiding minefields at: http://aigamedev.com/open/tutorials/theta-star-any-angle-paths/ )" />
  <row Id="36698" PostHistoryTypeId="1" PostId="16004" RevisionGUID="b3bb471c-1675-4d24-9c61-d81774c32011" CreationDate="2011-08-15T03:22:22.637" UserId="9299" Text="Techniques for (literally) cutting corners on square grid maps" />
  <row Id="36699" PostHistoryTypeId="3" PostId="16004" RevisionGUID="b3bb471c-1675-4d24-9c61-d81774c32011" CreationDate="2011-08-15T03:22:22.637" UserId="9299" Text="&lt;path-finding&gt;" />
  <row Id="36700" PostHistoryTypeId="2" PostId="16005" RevisionGUID="428c58b3-47f0-4ce3-8633-0bf6deee9801" CreationDate="2011-08-15T03:41:31.747" UserId="159" Text="I can only answer for myself, and that is a NO. I have never used them (on ios or wp7) and never plan on using them.&#xD;&#xA;&#xD;&#xA;That being said, I am planning on adding twitter buttons in my current game. I know quite a few people who DO use them, and like that they are there. People like to brag about accomplishments they have done (whether it be at their job, or in a game.) Look at the Kindle. I see a few tweets a week from people I follow saying they finished xyz book. (From what I understand the Kindle posts that for you.)&#xD;&#xA;&#xD;&#xA;As far as point #1, as long as you display exactly what is going to be posted, and provide a &quot;submit/cancel&quot; button, it should be fine. I also suggest making it an opt-in, and very easy to see how to disable it. " />
  <row Id="36701" PostHistoryTypeId="5" PostId="16005" RevisionGUID="2d3f5553-2321-40f0-9abb-5801a4f5e849" CreationDate="2011-08-15T03:53:05.723" UserId="159" Comment="added 41 characters in body" Text="I can only answer for myself, and that is a NO. I have never used them (on ios or wp7) and never plan on using them.&#xD;&#xA;&#xD;&#xA;That being said, I know quite a few people who DO use them and like that they are there. A few have actually requested that I add them, so I am planning on adding twitter in my current game. People like to brag about accomplishments they have done (whether it be at their job, or in a game.) Look at the Kindle. I see a few tweets a week from people I follow saying they finished xyz book. (From what I understand the Kindle posts that for you.)&#xD;&#xA;&#xD;&#xA;As far as point #1, as long as you display exactly what is going to be posted, and provide a &quot;submit/cancel&quot; button, it should be fine. I also suggest making it an opt-in, and very easy to see how to disable it. " />
  <row Id="36702" PostHistoryTypeId="5" PostId="16005" RevisionGUID="ba92579c-c383-47bb-a28d-90d98edac220" CreationDate="2011-08-15T04:19:33.213" UserId="159" Comment="added 211 characters in body" Text="I can only answer for myself, and that is a NO. I have never used them (on ios or wp7) and never plan on using them.&#xD;&#xA;&#xD;&#xA;That being said, I know quite a few people who DO use them and like that they are there. A few have actually requested that I add them, so I am planning on adding twitter in my current game. People like to brag about accomplishments they have done (whether it be at their job, or in a game.) Look at the Kindle. I see a few tweets a week from people I follow saying they finished xyz book. (From what I understand the Kindle posts that for you.)&#xD;&#xA;&#xD;&#xA;As far as point #1, as long as you display exactly what is going to be posted, and provide a &quot;submit/cancel&quot; button, it should be fine. I also suggest making it an opt-in, and very easy to see how to disable it. &#xD;&#xA;&#xD;&#xA;Try asking yourself &quot;Will it hurt my game to have facebook/twitter buttons available?&quot; I can't think of any reason why people *wouldn't* buy your game just because you included a feature they don't care for." />
  <row Id="36704" PostHistoryTypeId="25" PostId="15955" RevisionGUID="7793ea6a-c49e-438f-b876-a98324d953f3" CreationDate="2011-08-15T04:37:10.403" Comment="http://twitter.com/#!/StackGameDev/status/102962008156155904" />
  <row Id="36705" PostHistoryTypeId="2" PostId="16006" RevisionGUID="771ac8ac-c0e7-460b-a242-25e702aac9ae" CreationDate="2011-08-15T05:22:38.863" UserId="9273" Text="I'm looking for a tutorial about how to implement a horizontally scrolling background with various objects that auto-scrolls as your character/player moves just like various car/motorbikes games.&#xD;&#xA;&#xD;&#xA;I'll have images for various obstacles, objects along the path. I'm concerned if I load everything on start of game. /i would want these to be loaded for visible area as the player moves (or appears to move).&#xD;&#xA;&#xD;&#xA;Though I'm looking for a tutorial in android and I'm new to opengl, but I welcome any sort of help.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36706" PostHistoryTypeId="1" PostId="16006" RevisionGUID="771ac8ac-c0e7-460b-a242-25e702aac9ae" CreationDate="2011-08-15T05:22:38.863" UserId="9273" Text="Opengl scrolling world guidance" />
  <row Id="36707" PostHistoryTypeId="3" PostId="16006" RevisionGUID="771ac8ac-c0e7-460b-a242-25e702aac9ae" CreationDate="2011-08-15T05:22:38.863" UserId="9273" Text="&lt;opengl&gt;&lt;game-design&gt;&lt;android&gt;" />
  <row Id="36708" PostHistoryTypeId="25" PostId="16001" RevisionGUID="a3fe16c0-c5ab-4717-81b5-2bbac3b795ba" CreationDate="2011-08-15T06:37:11.393" Comment="http://twitter.com/#!/StackGameDev/status/102992211817414656" />
  <row Id="36709" PostHistoryTypeId="2" PostId="16007" RevisionGUID="ea550f40-7198-4f52-b4fa-2ed462ee5690" CreationDate="2011-08-15T06:48:09.570" UserId="9002" Text="Have you tried A* yet? Provided you weight your costs for different types of terrain appropriately, it will find a best path given the available nodes. It will not however find a straight line over open plains if you give it a square grid, which seems to be your problem with it.&#xD;&#xA;&#xD;&#xA;If you want to be able to create straight-line paths across plains, you can collapse the edges of your path into segments wherever the new path is equal or lower cost (I.E. same or less distance and doesn't pass through rougher terrain.) Just take each two pairs of nodes in the path (A-B and B-C) and see if A-C is a better route. If A-C is equal or lesser cost, remove B from the list. Repeat over the list until the iteration where the list doesn't change anymore, and that will solve your plains problem.&#xD;&#xA;&#xD;&#xA;You could also slightly improve this by giving A* more options for nodes to traverse. For instance, just adding diagonals with a x√2 cost will produce a much better path.&#xD;&#xA;&#xD;&#xA;&gt; I'm not sure what type of algorithm to use to look ahead and decide when to abandon the path, take a more direct route, and where to jump back on the path later.&#xD;&#xA;&#xD;&#xA;A* handles this already. As soon as the node currently being explored is no longer the lowest cost+heuristic, it moves on to the lowest cost+heuristic node." />
  <row Id="36710" PostHistoryTypeId="5" PostId="16007" RevisionGUID="23eb0edb-c2cf-4ff3-a693-eeb86b1c68b2" CreationDate="2011-08-15T06:54:23.153" UserId="9002" Comment="added 368 characters in body" Text="Have you given A* a chance yet? Provided you weight your costs for different types of terrain appropriately, it will find a best path given the available nodes. It will not however find a straight line over open plains if you give it a square grid, which seems to be your problem with it.&#xD;&#xA;&#xD;&#xA;If you want to be able to create straight-line paths across plains, you can collapse the edges of your path into segments wherever the new path is equal or lower cost (I.E. same or less distance and doesn't pass through rougher terrain.) Just take each two pairs of nodes in the path (A-B and B-C) and see if A-C is a better route. If A-C is equal or lesser cost, remove B from the list. Repeat over the list until the iteration where the list doesn't change anymore, and that will solve your plains problem. You do have to do some extra processing to ensure that A-C is a legal move, and to calculate the cost across an arbitrary distance. Or, you could have your units use the path as a general guideline, and move toward the node several positions of them, using simple obstacle avoidance at the same time.&#xD;&#xA;&#xD;&#xA;You can also significantly improve your quality of your path by giving A* more options for nodes to traverse. For instance, just adding diagonals with a x√2 cost will produce a much better path than simple 4-direction traversal.&#xD;&#xA;&#xD;&#xA;&gt; I'm not sure what type of algorithm to use to look ahead and decide when to abandon the path, take a more direct route, and where to jump back on the path later.&#xD;&#xA;&#xD;&#xA;A* handles this already. As soon as the node currently being explored is no longer the lowest cost+heuristic, it moves on to the lowest cost+heuristic node." />
  <row Id="36711" PostHistoryTypeId="2" PostId="16008" RevisionGUID="3836560e-28c6-4fe5-b31d-0e3803df04a5" CreationDate="2011-08-15T07:11:15.383" UserId="9002" Text="There's no need to manually create and assign your effect's transformation matrices. Spritebatch creates these for you. The simplest way is to create an effect with no vertex shader (unless you're doing something in there besides the expected world-view-projection), since SpriteBatch already has a vertex shader that will take care of the transformation. Then it will use your pixel shader.&#xD;&#xA;&#xD;&#xA;Also, I'm not sure if the way you're currently doing it works correctly, but there is a different overload of `spriteBatch.Begin` that takes an Effect as a parameter. I'm not sure if SpriteBatch can properly assign to the current effect if you don't pass it in on `Begin()`." />
  <row Id="36712" PostHistoryTypeId="2" PostId="16009" RevisionGUID="31e7de25-9703-4c66-8ecd-2d8d9f4fd1e6" CreationDate="2011-08-15T07:45:59.287" UserId="4264" Text="I don't think it matters which engine you use; from what I've seen, steam accepts games that are of high enough quality (polish) and are relevant to the steam customer base.&#xD;&#xA;&#xD;&#xA;Winning IGF or some such also helps." />
  <row Id="36713" PostHistoryTypeId="2" PostId="16010" RevisionGUID="2c10c2e6-ec79-490c-80c0-52c5bb70f5f8" CreationDate="2011-08-15T07:47:25.010" UserId="118" Text="For a Java game that uses no libraries, I would suggest you extend the [Canvas](http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Canvas.html) class and override the [paint(Graphics)](http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Canvas.html#paint%28java.awt.Graphics%29) method. It is the most basic component you can use without a lot of overhead.&#xD;&#xA;&#xD;&#xA;However, I strongly suggest you look into [Slick](http://slick.cokeandcode.com/) or [JMonkeyEngine](http://jmonkeyengine.com/). They both use [LWJGL](http://lwjgl.org/); the former is for 2D while the latter is for 2D and 3D.&#xD;&#xA;&#xD;&#xA;To kill two birds with one stone, I would also suggest you look into [Artemis](http://www.gamadu.com/artemis/), which is an awesome Entity System that works on top of Slick. The site contains some example games to help you get started." />
  <row Id="36714" PostHistoryTypeId="25" PostId="16004" RevisionGUID="107b2a77-5a90-4d0e-bab2-f3f8771deeb5" CreationDate="2011-08-15T08:37:12.043" Comment="http://twitter.com/#!/StackGameDev/status/103022412924334080" />
  <row Id="36715" PostHistoryTypeId="5" PostId="15988" RevisionGUID="1a7c7f6f-c8bc-4ae6-bbbe-ea507316967d" CreationDate="2011-08-15T09:13:03.450" UserId="744" Comment="Hopefully shut up whiners." Text="    public class MoveBehavior &#xD;&#xA;    {&#xD;&#xA;    	const int MAX_EAST_WEST_INDEX = 1;&#xD;&#xA;    	const int MAX_NORTH_SOUTH_INDEX = 5;&#xD;&#xA;    	const int MIN_INDEX = 0;&#xD;&#xA;        ....&#xD;&#xA;&#xD;&#xA;    	public void Move(MoveDirection moveDir)&#xD;&#xA;    	{&#xD;&#xA;    		switch (moveDir)&#xD;&#xA;    		{&#xD;&#xA;    		case MoveDirection.North:&#xD;&#xA;    			this.areaIndex++;&#xD;&#xA;    			break;&#xD;&#xA;    		case MoveDirection.South:&#xD;&#xA;    			this.areaIndex--;&#xD;&#xA;    			break;&#xD;&#xA;    		case MoveDirection.East:&#xD;&#xA;    			this.locationIndex++;&#xD;&#xA;    			break;&#xD;&#xA;    		case MoveDirection.West:&#xD;&#xA;    			this.locationIndex--;&#xD;&#xA;    			break;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX)&#xD;&#xA;    		{&#xD;&#xA;    			locationIndex = 0;&#xD;&#xA;    		}&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Why is `locationIndex` only ever 0 or 1?" />
  <row Id="36716" PostHistoryTypeId="4" PostId="15988" RevisionGUID="1a7c7f6f-c8bc-4ae6-bbbe-ea507316967d" CreationDate="2011-08-15T09:13:03.450" UserId="744" Comment="Hopefully shut up whiners." Text="Why, when I write an if condition, does it work properly?" />
  <row Id="36717" PostHistoryTypeId="2" PostId="16011" RevisionGUID="afb1924e-b570-4e27-aada-95c1b9eeae86" CreationDate="2011-08-15T09:21:48.693" UserId="9169" Text="As I read in OpenGL matrices are column major. It means that if I create a 16 element array first four elements are the first column in matrix. Is it the same for Direct3D or any transformation's required." />
  <row Id="36718" PostHistoryTypeId="1" PostId="16011" RevisionGUID="afb1924e-b570-4e27-aada-95c1b9eeae86" CreationDate="2011-08-15T09:21:48.693" UserId="9169" Text="Direct3D and OpenGL Matrix representation" />
  <row Id="36719" PostHistoryTypeId="3" PostId="16011" RevisionGUID="afb1924e-b570-4e27-aada-95c1b9eeae86" CreationDate="2011-08-15T09:21:48.693" UserId="9169" Text="&lt;opengl&gt;&lt;directx&gt;&lt;matrix&gt;" />
  <row Id="36720" PostHistoryTypeId="6" PostId="11201" RevisionGUID="5829022c-2a97-4cb4-b494-cbdd7a4f8ce8" CreationDate="2011-08-15T09:51:24.327" UserId="3644" Comment="edited tags" Text="&lt;math&gt;&lt;homework&gt;" />
  <row Id="36721" PostHistoryTypeId="2" PostId="16012" RevisionGUID="c34536d4-30e3-46b9-9dc1-64fbf2bed918" CreationDate="2011-08-15T09:58:31.917" UserId="7946" Text="DirectX matrices are right-handed and OpenGL requires left handed matrices, but while OpenGLs matrices are column-major, DirectX's matrices are row-major, so they're layout in memory is the same. " />
  <row Id="36722" PostHistoryTypeId="25" PostId="15993" RevisionGUID="23f61be5-7f19-4312-a7c1-137cd25e1599" CreationDate="2011-08-15T10:37:11.733" Comment="http://twitter.com/#!/StackGameDev/status/103052610944253952" />
  <row Id="36723" PostHistoryTypeId="25" PostId="15911" RevisionGUID="2d075b36-ca44-4b15-8ede-8e8af2baeeb7" CreationDate="2011-08-15T12:37:12.003" Comment="http://twitter.com/#!/StackGameDev/status/103082810511855616" />
  <row Id="36724" PostHistoryTypeId="2" PostId="16013" RevisionGUID="1ec2c3ac-54f3-4501-a2eb-7eed62e52f66" CreationDate="2011-08-15T12:43:01.590" UserId="6588" Text="Because of this:&#xD;&#xA;&#xD;&#xA;    if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX)&#xD;&#xA;    {&#xD;&#xA;      locationIndex = 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36725" PostHistoryTypeId="2" PostId="16014" RevisionGUID="ea9af0fd-da19-41d4-b64b-9e4954a52fef" CreationDate="2011-08-15T12:57:07.783" UserId="4204" Text="So I have decided to try a bit of javascript/html5 game development (worked with XNA/Unity so far).  Wondering if anyone had any suggestions.  I am currently looking at impact, gameQuery and Jaws.  &#xD;&#xA;&#xD;&#xA;(also a little nervous that I won't be able to make as powerful games as in XNA...only doing 2d though)" />
  <row Id="36726" PostHistoryTypeId="1" PostId="16014" RevisionGUID="ea9af0fd-da19-41d4-b64b-9e4954a52fef" CreationDate="2011-08-15T12:57:07.783" UserId="4204" Text="jquery/javascript game engines?" />
  <row Id="36727" PostHistoryTypeId="3" PostId="16014" RevisionGUID="ea9af0fd-da19-41d4-b64b-9e4954a52fef" CreationDate="2011-08-15T12:57:07.783" UserId="4204" Text="&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="36728" PostHistoryTypeId="17" PostId="16015" RevisionGUID="1fd03b7f-30ec-4b48-bfe9-9fb98a7cb0e6" CreationDate="2011-08-15T13:46:19.320" UserId="-1" Comment="from http://stackoverflow.com/questions/7064995/xna-source-code-projects-samples" Text="" />
  <row Id="36729" PostHistoryTypeId="17" PostId="16016" RevisionGUID="efccdb5f-2bc3-4f07-a1eb-9f988d0564e0" CreationDate="2011-08-15T13:46:19.320" UserId="-1" Comment="from http://stackoverflow.com/questions/7064995/xna-source-code-projects-samples" Text="" />
  <row Id="36730" PostHistoryTypeId="17" PostId="16017" RevisionGUID="c4d34ae8-26bf-430a-b4c7-0c830ba4f29b" CreationDate="2011-08-15T13:46:19.320" UserId="-1" Comment="from http://stackoverflow.com/questions/7064995/xna-source-code-projects-samples" Text="" />
  <row Id="36731" PostHistoryTypeId="17" PostId="16018" RevisionGUID="61b743a1-25d9-488e-93be-dcf982034a04" CreationDate="2011-08-15T13:46:19.320" UserId="-1" Comment="from http://stackoverflow.com/questions/7064995/xna-source-code-projects-samples" Text="" />
  <row Id="36732" PostHistoryTypeId="2" PostId="16016" RevisionGUID="a3af7247-dd2d-4245-9d9d-c12ac477b96e" CreationDate="2011-08-15T12:46:36.167" UserDisplayName="Haris Hasan" Text="see [full XNA source code samples][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://compsci.ca/blog/full-xna-source-code-samples/" />
  <row Id="36733" PostHistoryTypeId="2" PostId="16017" RevisionGUID="28dd4457-acc0-4b51-86b8-15eb102aa170" CreationDate="2011-08-15T12:46:48.753" UserId="3350" Text="Searching [GitHub][1] for xna GameObject gives a fair amount of results. Otherwise the MSDN contains an exemple project named [FuelCell][2], which have a [chapter][3] that make use of gameObject and some of its feature.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/search?q=xna%20GameObject&amp;type=Everything&amp;repo=&amp;langOverride=&amp;start_value=1&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/dd940288.aspx&#xD;&#xA;  [3]: http://msdn.microsoft.com/en-us/library/dd254739.aspx" />
  <row Id="36734" PostHistoryTypeId="2" PostId="16018" RevisionGUID="76923713-f5d7-4c33-af8c-8efeb49749b5" CreationDate="2011-08-15T12:50:50.720" UserDisplayName="Vano Maisuradze" Text="See [this][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/?devarea=5" />
  <row Id="36735" PostHistoryTypeId="2" PostId="16015" RevisionGUID="77fe3274-8250-4d97-91ca-b09122fd046b" CreationDate="2011-08-15T12:39:24.697" UserDisplayName="Rich Porter" Text="I'm looking for good project samples of XNA who containing GameObject class, since I'm having problems with it and I'd like to get the idea of it.&#xD;&#xA;&#xD;&#xA;Can anyone post a link for downloading source code please?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;EDIT: 2D games only." />
  <row Id="36736" PostHistoryTypeId="1" PostId="16015" RevisionGUID="77fe3274-8250-4d97-91ca-b09122fd046b" CreationDate="2011-08-15T12:39:24.697" UserDisplayName="Rich Porter" Text="XNA source code projects samples" />
  <row Id="36737" PostHistoryTypeId="3" PostId="16015" RevisionGUID="77fe3274-8250-4d97-91ca-b09122fd046b" CreationDate="2011-08-15T12:39:24.697" UserDisplayName="Rich Porter" Text="&lt;c#&gt;&lt;xna&gt;" />
  <row Id="36738" PostHistoryTypeId="2" PostId="16019" RevisionGUID="41c9f6d7-bea1-45a8-93b4-1c02cecd70a9" CreationDate="2011-08-15T13:56:17.503" UserId="9281" Text="I am looking for a simple real-time OpenGL based render engine to show a 3D model on screen.&#xD;&#xA;&#xD;&#xA;I prefer using 3DS Max's 'shader' materials (real-time materials) for editing.&#xD;&#xA;&#xD;&#xA;Do you know any good simple API to include it in an OpenGL screen?&#xD;&#xA;Is there a simple tool to export from 3DS Max to that tool?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;BJoe&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36739" PostHistoryTypeId="1" PostId="16019" RevisionGUID="41c9f6d7-bea1-45a8-93b4-1c02cecd70a9" CreationDate="2011-08-15T13:56:17.503" UserId="9281" Text="3D Model Viewer with Shading" />
  <row Id="36740" PostHistoryTypeId="3" PostId="16019" RevisionGUID="41c9f6d7-bea1-45a8-93b4-1c02cecd70a9" CreationDate="2011-08-15T13:56:17.503" UserId="9281" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;3d-engines&gt;&lt;libraries&gt;" />
  <row Id="36741" PostHistoryTypeId="2" PostId="16020" RevisionGUID="0890188f-2a1d-41dd-83a3-487da0324989" CreationDate="2011-08-15T13:56:50.697" UserId="9280" Text="To build on the other answers, the &quot;offload and verify&quot; strategy could indeed be useful, in situations where the verification is easier than the original calculation (or where only occasional spot checks would be enough to catch cheaters).&#xD;&#xA;&#xD;&#xA;For example, if you had the client do A* pathfinding and send the results to the server, all the server would have to do is check that&#xD;&#xA;a) the path is valid, and&#xD;&#xA;b) there is no shorter path.&#xD;&#xA;Checking path validity should be easy, and checking optimality _could_ be easier than finding the optimal path to begin with, since you now have an upper bound on the length of the paths you need to check.  (In particular, if the client returns a straight-line path, it is obviously optimal as long as it is valid.)  To be honest, I have no idea whether this particular trick would be useful in practice, but I see no fundamental obstacle to it.&#xD;&#xA;&#xD;&#xA;Do note, however, that if you offload NPC AI to the clients, then a hacked client could potentially use it to predict NPC behavior in advance.  For some types of games or situations this could be a serious issue." />
  <row Id="36742" PostHistoryTypeId="2" PostId="16021" RevisionGUID="ce809e50-f280-4033-95a3-c1a06f59ad48" CreationDate="2011-08-15T14:08:25.337" UserId="953" Text="Unity is a tool I often recommend. You can code it in C#; that's a long way from C, but it's in the same family. It's cross-platform and easy for people with as much 3D experience as you have." />
  <row Id="36743" PostHistoryTypeId="2" PostId="16022" RevisionGUID="1da96fa4-8a78-4f9e-839d-6d89c9c23a75" CreationDate="2011-08-15T14:33:21.587" UserId="2897" Text="Heishe is right about memory layout and matrices being the same, but his answer is somewhat misleading. Such things as right-handed or left-handed matrices don't exist. Be it a right- or left- handed coordinate system, math and the matrix stays the same, matrix operations give the same result for both of these systems. How we will interpret the data later, thats the difference. &#xD;&#xA;&#xD;&#xA;In OpenGL, matrix operations are pre-concatenated, which means concatenated transformations are applied from right to left. Direct3D, however, applies concatenated transformations from left to right.&#xD;&#xA;&#xD;&#xA;So what you need to do is to match the order of operation in OpenGL to the order of Direct3D. When writing OpenGL code, you apply the transform that you want to occur first last; when writing DirectX you're doing the opposite. Let's say you just transformed vector `v` in OpenGL by matrices `A` and `B`: `v' = ABv` In Direct3D the same transformation would be `v' = vBA`." />
  <row Id="36744" PostHistoryTypeId="25" PostId="16011" RevisionGUID="e3fe46ac-a1a0-4292-a2be-89c11f42ff1a" CreationDate="2011-08-15T14:37:13.037" Comment="http://twitter.com/#!/StackGameDev/status/103113014408003584" />
  <row Id="36745" PostHistoryTypeId="5" PostId="15992" RevisionGUID="710acfcf-d784-4052-8b34-660d1bbae682" CreationDate="2011-08-15T14:39:04.763" UserId="2897" Comment="fixed wrong comment" Text="I remember advocating AgateLib to you, but it's hard to get into and it wont work without a bit of OpenGL knowledge. So it is as good time as ever to remember some OpenGL :)&#xD;&#xA;&#xD;&#xA;First step would be to download [OpenTK][1]. You may want to google for any OpenTK tutorials, but since I doubt their existence, we will just code away.&#xD;&#xA;&#xD;&#xA;After unpacking OpenTK somewhere, lauch MonoDevelop, Ctrl+Shift+N, select empty project, add references to the OpenTK.dll and System.Drawing, add new empty class named &quot;PointsExample&quot; or something, and that's it.&#xD;&#xA;&#xD;&#xA;Now let's get those points on the screen! Here is a complete code with commentaries.&#xD;&#xA;&#xD;&#xA;    namespace Points&#xD;&#xA;    {&#xD;&#xA;    	using System;&#xD;&#xA;    	using System.Drawing;&#xD;&#xA;    	using System.Collections.Generic;&#xD;&#xA;    	using OpenTK;&#xD;&#xA;    	using OpenTK.Input;&#xD;&#xA;    	using OpenTK.Platform;&#xD;&#xA;    	using OpenTK.Graphics.OpenGL;&#xD;&#xA;    &#xD;&#xA;        public class PointsExample : GameWindow&#xD;&#xA;        {&#xD;&#xA;    	    // These are clipping planes, forget them for now.&#xD;&#xA;    		private const int nearPlane = 1;&#xD;&#xA;    		private const int farPlane = 11;&#xD;&#xA;    &#xD;&#xA;    		// Here we will store mouse position on click.&#xD;&#xA;    		private List&lt;Vector2&gt; points = new List&lt;Vector2&gt;(32);&#xD;&#xA;    &#xD;&#xA;            public PointsExample()&#xD;&#xA;                : base(800, 600, OpenTK.Graphics.GraphicsMode.Default, &quot;The shortest distance between two points is under construction.&quot;)&#xD;&#xA;            {&#xD;&#xA;    			// It's a bad karma to place complex logic in constructors,&#xD;&#xA;    			// so we will perform initialization elsewhere.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnLoad(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// This method will be called on window load,&#xD;&#xA;    			// looks like a good place for initialization.&#xD;&#xA;    &#xD;&#xA;    			// Lets enable VSync and remove distracting buzz of coolers.&#xD;&#xA;    			// Actually, coolers are still buzzing, because VSync won't work in windowed mode.&#xD;&#xA;    			OpenTK.Graphics.GraphicsContext.CurrentContext.VSync = true;&#xD;&#xA;    &#xD;&#xA;    			// Depth buffer isn't needed for simple 2D drawing,&#xD;&#xA;    			// so we tell OpenGl to not update it.&#xD;&#xA;            	GL.Disable(EnableCap.DepthTest);&#xD;&#xA;    &#xD;&#xA;    			// Disable polygon culling, it's not needed in 2D drawing.&#xD;&#xA;                GL.Disable(EnableCap.CullFace);&#xD;&#xA;    &#xD;&#xA;    			// Points will be drawn with anti-aliasing.&#xD;&#xA;    			GL.Enable(EnableCap.PointSmooth);&#xD;&#xA;    			GL.PointSize(24.0f); // Make points large and noticable.&#xD;&#xA;    &#xD;&#xA;    			// Points will have smooth edges.&#xD;&#xA;        		GL.Enable(EnableCap.Blend);&#xD;&#xA;        		GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    			&#xD;&#xA;    			// Grab a kvass and read: http://www.songho.ca/opengl/gl_transform.html&#xD;&#xA;    			// It's important to understand matrices, or your attempts at drawing&#xD;&#xA;    			// will be constantly thwarted by math.&#xD;&#xA;    &#xD;&#xA;    			// Lets setup a projection by switching to projection matrix stack,&#xD;&#xA;    			// then multiply identity matrix and a transformation that produces a parallel projection.&#xD;&#xA;    			// Now (0, 0) is the top left, X coord is going to the right&#xD;&#xA;    			// and Y coord is going to the bottom, both coords maps to the screen pixels.&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;    			&#xD;&#xA;    			// Still confused? &#xD;&#xA;    			// Selectively read this: http://www.falloutsoftware.com/tutorials/gl/gl0.htm&#xD;&#xA;    			// and keep in mind that even though we're drawing 2d stuff, we're doing so in the 3d world.&#xD;&#xA;    			&#xD;&#xA;    			// Also notice that the near clip plane is set at depth of 1, and far plane at the depth of 11.&#xD;&#xA;    			// Everything closer than 1 and farther than 11 will be cut off.&#xD;&#xA;    			&#xD;&#xA;    			// Now coord (31, 63) would mean 32-nd pixel to the right from left border&#xD;&#xA;    			// and 64-th pixel downwards from top border of the screen.&#xD;&#xA;    &#xD;&#xA;    			Mouse.ButtonDown += OnMouseClick;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    		private void OnMouseClick(object sender, MouseButtonEventArgs e)&#xD;&#xA;    		{&#xD;&#xA;    			// User clicks — we add a point for drawing later.&#xD;&#xA;    			// Thanks to orthographic projection mouse coords&#xD;&#xA;    			// directly correspond to the world coords.&#xD;&#xA;    			// Later you may want to read about Project/Unproject.&#xD;&#xA;    			points.Add(new Vector2(e.X, e.Y));&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            protected override void OnUnload(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Not used in this example,&#xD;&#xA;    			// but typically you will want to do a complete deinitialization here.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnResize(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Update viewport when resizing window.&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    &#xD;&#xA;    			// Uncomment these lines to disable scaling on screen resize:&#xD;&#xA;    			// GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			// GL.LoadIdentity();&#xD;&#xA;    			// GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnUpdateFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Typically your game logic will be updated in this update loop.&#xD;&#xA;    			// We don't have any time-dependent progress logic yet, so it's empty.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnRenderFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			GL.ClearColor(Color.CornflowerBlue);  // It's almost like XNA :)&#xD;&#xA;    			GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);&#xD;&#xA;    			&#xD;&#xA;    			// Finally, it's time to draw the points in the draw loop.&#xD;&#xA;    &#xD;&#xA;    			// Remember the setup of the clipping planes?&#xD;&#xA;    			// We will need to draw our geometry somewhere between the two clip planes&#xD;&#xA;    			// so it will be visible.&#xD;&#xA;    &#xD;&#xA;    			// Start operations on model-view matrix stack...&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Modelview);&#xD;&#xA;    &#xD;&#xA;    			// Pushing matrices is not really needed in this simple example,&#xD;&#xA;    			// but typically you will use PushMatrix before drawing object&#xD;&#xA;    			// whose transformations depend on previously computed matrix,&#xD;&#xA;    			// and that's going to happen very often.&#xD;&#xA;    			GL.PushMatrix();&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			// Remember that negative Z axis is going &quot;into the screen&quot;, so we move vertices away from camera.&#xD;&#xA;    			GL.Translate(0.0f, 0.0f, -((nearPlane+farPlane) / 2f));&#xD;&#xA;    &#xD;&#xA;    			// Begin drawing points. &#xD;&#xA;    			// Read about drawing primitives here:&#xD;&#xA;    			// http://www.opentk.com/doc/chapter/2/opengl/geometry/primitives&#xD;&#xA;        		GL.Begin(BeginMode.Points);		&#xD;&#xA;    			GL.Color3(Color.Gold);  // From now on all vertices will be golden.&#xD;&#xA;    			&#xD;&#xA;    			foreach(var point in points)&#xD;&#xA;    			{&#xD;&#xA;    				GL.Vertex2(point);&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;        		GL.End(); // End drawing points.&#xD;&#xA;    &#xD;&#xA;    			GL.PopMatrix(); // We pushed, so now we need to pop previous matrix from the stack.&#xD;&#xA;    &#xD;&#xA;                SwapBuffers();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            [STAThread]&#xD;&#xA;            static void Main()&#xD;&#xA;            {&#xD;&#xA;                using (var game = new PointsExample())&#xD;&#xA;                {&#xD;&#xA;                    game.Run(200.0, 0.0);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And that's all for a simple task of drawing colored points. I hope that you've found it useful and that I didn't do anything wrong :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opentk.com/" />
  <row Id="36746" PostHistoryTypeId="2" PostId="16023" RevisionGUID="cdfc2602-10bb-4404-bb5e-e330a56f4c8d" CreationDate="2011-08-15T14:44:46.147" UserId="9171" Text="I've been trying to figure out now if i have a map in my platformer game and i want my character be able to jump on some platform for example.. Is there any easy way to tell the game where the platforms are and where the player can jump and start??&#xD;&#xA;&#xD;&#xA;Also the games like Super Mario Bros and such are their maps made in .txt files ? Because i watched a tutorial for maps and he said all proffesional game developers make a .txt file for the map and write numbers for example:&#xD;&#xA;&#xD;&#xA;111111111111111111111&#xD;&#xA;-&#xD;&#xA;111111111111111111111&#xD;&#xA;-&#xD;&#xA;111111111111111111111&#xD;&#xA;-&#xD;&#xA;111111111111111111111&#xD;&#xA;-&#xD;&#xA;2222222222222222222&#xD;&#xA;-&#xD;&#xA;To create a map.. Is this correct or how did the developers do maps in the Super mario bros or Mega man games ?? &#xD;&#xA;&#xD;&#xA;What i am wondering is.. If i want my player to be able to jump up on some platform or something.. Thats what am looking for." />
  <row Id="36747" PostHistoryTypeId="1" PostId="16023" RevisionGUID="cdfc2602-10bb-4404-bb5e-e330a56f4c8d" CreationDate="2011-08-15T14:44:46.147" UserId="9171" Text="Collission in 2D games?" />
  <row Id="36748" PostHistoryTypeId="3" PostId="16023" RevisionGUID="cdfc2602-10bb-4404-bb5e-e330a56f4c8d" CreationDate="2011-08-15T14:44:46.147" UserId="9171" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;programming&gt;" />
  <row Id="36749" PostHistoryTypeId="2" PostId="16024" RevisionGUID="31d305de-2c41-45ed-b4ac-13258f19be70" CreationDate="2011-08-15T14:44:59.267" UserId="1743" Text="I was bored and dragging my game window around the screen and noticed something interesting.&#xD;&#xA;&#xD;&#xA;When I drag my game window over to my secondary monitor, the screen updating just completely freezes.&#xD;&#xA;&#xD;&#xA;Is there something I need to do to enable updating on a screen other than the primary monitor?" />
  <row Id="36750" PostHistoryTypeId="1" PostId="16024" RevisionGUID="31d305de-2c41-45ed-b4ac-13258f19be70" CreationDate="2011-08-15T14:44:59.267" UserId="1743" Text="Secondary monitor freezes game window" />
  <row Id="36751" PostHistoryTypeId="3" PostId="16024" RevisionGUID="31d305de-2c41-45ed-b4ac-13258f19be70" CreationDate="2011-08-15T14:44:59.267" UserId="1743" Text="&lt;python&gt;&lt;pygame&gt;&lt;screen&gt;&lt;refresh&gt;" />
  <row Id="36752" PostHistoryTypeId="4" PostId="15996" RevisionGUID="d94db5d5-2459-436f-acbb-5fcf5e3bf3a0" CreationDate="2011-08-15T15:11:42.223" UserId="8771" Comment="made title a question" Text="Who does the AI calculations in an MMO?" />
  <row Id="36753" PostHistoryTypeId="24" PostId="15996" RevisionGUID="d94db5d5-2459-436f-acbb-5fcf5e3bf3a0" CreationDate="2011-08-15T15:11:42.223" Comment="Proposed by 8771 approved by 51 edit id of 642" />
  <row Id="36754" PostHistoryTypeId="4" PostId="16014" RevisionGUID="da98a00e-8547-49d2-b96e-d01d15955588" CreationDate="2011-08-15T15:11:45.983" UserId="8771" Comment="made title a question" Text="What are some good jquery/javascript game engines?" />
  <row Id="36755" PostHistoryTypeId="24" PostId="16014" RevisionGUID="da98a00e-8547-49d2-b96e-d01d15955588" CreationDate="2011-08-15T15:11:45.983" Comment="Proposed by 8771 approved by 51 edit id of 643" />
  <row Id="36756" PostHistoryTypeId="5" PostId="16019" RevisionGUID="b4861656-1890-4f2f-9820-0797c33e1bde" CreationDate="2011-08-15T15:11:50.430" UserId="8771" Comment="made title a question" Text="I am looking for a simple real-time OpenGL based render engine to show a 3D model on screen.&#xD;&#xA;&#xD;&#xA;I prefer using 3DS Max's 'shader' materials (real-time materials) for editing.&#xD;&#xA;&#xD;&#xA;Do you know any good simple API to include it in an OpenGL screen? Is there a simple tool to export from 3DS Max to that tool?&#xD;&#xA;" />
  <row Id="36757" PostHistoryTypeId="4" PostId="16019" RevisionGUID="b4861656-1890-4f2f-9820-0797c33e1bde" CreationDate="2011-08-15T15:11:50.430" UserId="8771" Comment="made title a question" Text="Can anyone recommend a 3D model viewer with shading?" />
  <row Id="36758" PostHistoryTypeId="24" PostId="16019" RevisionGUID="b4861656-1890-4f2f-9820-0797c33e1bde" CreationDate="2011-08-15T15:11:50.430" Comment="Proposed by 8771 approved by 51 edit id of 644" />
  <row Id="36759" PostHistoryTypeId="5" PostId="15992" RevisionGUID="5f06b272-2880-48a2-b37d-76ccbbe75f62" CreationDate="2011-08-15T15:24:22.100" UserId="2897" Comment="Fixed spelling" Text="I remember advocating AgateLib to you, but it's hard to get into and it wont work without a bit of OpenGL knowledge. So it is as good time as ever to remember some OpenGL :)&#xD;&#xA;&#xD;&#xA;First step would be to download [OpenTK][1]. You may want to google for any OpenTK tutorials, but since I doubt their existence, we will just code away.&#xD;&#xA;&#xD;&#xA;After unpacking OpenTK somewhere, lauch MonoDevelop, Ctrl+Shift+N, select empty project, add references to the OpenTK.dll and System.Drawing, add new empty class named &quot;PointsExample&quot; or something, and that's it.&#xD;&#xA;&#xD;&#xA;Now let's get those points on the screen! Here is a complete code with commentaries.&#xD;&#xA;&#xD;&#xA;    namespace Points&#xD;&#xA;    {&#xD;&#xA;    	using System;&#xD;&#xA;    	using System.Drawing;&#xD;&#xA;    	using System.Collections.Generic;&#xD;&#xA;    	using OpenTK;&#xD;&#xA;    	using OpenTK.Input;&#xD;&#xA;    	using OpenTK.Platform;&#xD;&#xA;    	using OpenTK.Graphics.OpenGL;&#xD;&#xA;    &#xD;&#xA;        public class PointsExample : GameWindow&#xD;&#xA;        {&#xD;&#xA;    	    // These are clipping planes, forget them for now.&#xD;&#xA;    		private const int nearPlane = 1;&#xD;&#xA;    		private const int farPlane = 11;&#xD;&#xA;    &#xD;&#xA;    		// Here we will store mouse position on click.&#xD;&#xA;    		private List&lt;Vector2&gt; points = new List&lt;Vector2&gt;(32);&#xD;&#xA;    &#xD;&#xA;            public PointsExample()&#xD;&#xA;                : base(800, 600, OpenTK.Graphics.GraphicsMode.Default, &quot;The shortest distance between two points is under construction.&quot;)&#xD;&#xA;            {&#xD;&#xA;    			// It's a bad karma to place complex logic in constructors,&#xD;&#xA;    			// so we will perform initialization elsewhere.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnLoad(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// This method will be called on window load,&#xD;&#xA;    			// looks like a good place for initialization.&#xD;&#xA;    &#xD;&#xA;    			// Lets enable VSync and remove distracting buzz of coolers.&#xD;&#xA;    			// Actually, coolers are still buzzing, because VSync won't work in windowed mode.&#xD;&#xA;    			OpenTK.Graphics.GraphicsContext.CurrentContext.VSync = true;&#xD;&#xA;    &#xD;&#xA;    			// Depth buffer isn't needed for simple 2D drawing,&#xD;&#xA;    			// so we tell OpenGl to not update it.&#xD;&#xA;            	GL.Disable(EnableCap.DepthTest);&#xD;&#xA;    &#xD;&#xA;    			// Disable polygon culling, it's not needed in 2D drawing.&#xD;&#xA;                GL.Disable(EnableCap.CullFace);&#xD;&#xA;    &#xD;&#xA;    			// Points will be drawn with anti-aliasing.&#xD;&#xA;    			GL.Enable(EnableCap.PointSmooth);&#xD;&#xA;    			GL.PointSize(24.0f); // Make points large and noticable.&#xD;&#xA;    &#xD;&#xA;    			// Points will have smooth edges.&#xD;&#xA;        		GL.Enable(EnableCap.Blend);&#xD;&#xA;        		GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);&#xD;&#xA;&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    			&#xD;&#xA;    			// Grab a kvass and read: http://www.songho.ca/opengl/gl_transform.html&#xD;&#xA;    			// It's important to understand matrices, or your attempts at drawing&#xD;&#xA;    			// will be constantly thwarted by math.&#xD;&#xA;    &#xD;&#xA;    			// Lets setup a projection by switching to projection matrix stack,&#xD;&#xA;    			// then multiply identity matrix and a transformation that produces a parallel projection.&#xD;&#xA;    			// Now (0, 0) is the top left, X coord is going to the right&#xD;&#xA;    			// and Y coord is going to the bottom, both coords map to the screen pixels.&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;    			&#xD;&#xA;    			// Still confused? &#xD;&#xA;    			// Selectively read this: http://www.falloutsoftware.com/tutorials/gl/gl0.htm&#xD;&#xA;    			// and keep in mind that even though we're drawing 2d stuff, we're doing so in the 3d world.&#xD;&#xA;    			&#xD;&#xA;    			// Also notice that the near clip plane is set at depth of 1, and far plane at the depth of 11.&#xD;&#xA;    			// Everything closer than 1 and farther than 11 will be cut off.&#xD;&#xA;    			&#xD;&#xA;    			// Now coord (31, 63) would mean 32-nd pixel to the right from left border&#xD;&#xA;    			// and 64-th pixel downwards from top border of the screen.&#xD;&#xA;    &#xD;&#xA;    			Mouse.ButtonDown += OnMouseClick;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    		private void OnMouseClick(object sender, MouseButtonEventArgs e)&#xD;&#xA;    		{&#xD;&#xA;    			// User clicks — we add a point for drawing later.&#xD;&#xA;    			// Thanks to orthographic projection mouse coords&#xD;&#xA;    			// directly correspond to the world coords.&#xD;&#xA;    			// Later you may want to read about Project/Unproject.&#xD;&#xA;    			points.Add(new Vector2(e.X, e.Y));&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            protected override void OnUnload(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Not used in this example,&#xD;&#xA;    			// but typically you will want to do a complete deinitialization here.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnResize(EventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Update viewport when resizing window.&#xD;&#xA;    			GL.Viewport(ClientRectangle);&#xD;&#xA;    &#xD;&#xA;    			// Uncomment these lines to disable scaling on screen resize:&#xD;&#xA;    			// GL.MatrixMode(MatrixMode.Projection);&#xD;&#xA;    			// GL.LoadIdentity();&#xD;&#xA;    			// GL.Ortho(0, Width, Height, 0, nearPlane, farPlane);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnUpdateFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			// Typically your game logic will be updated in this update loop.&#xD;&#xA;    			// We don't have any time-dependent progress logic yet, so it's empty.&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            protected override void OnRenderFrame(FrameEventArgs e)&#xD;&#xA;            {&#xD;&#xA;    			GL.ClearColor(Color.CornflowerBlue);  // It's almost like XNA :)&#xD;&#xA;    			GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);&#xD;&#xA;    			&#xD;&#xA;    			// Finally, it's time to draw the points in the draw loop.&#xD;&#xA;    &#xD;&#xA;    			// Remember the setup of the clipping planes?&#xD;&#xA;    			// We will need to draw our geometry somewhere between the two clip planes&#xD;&#xA;    			// so it will be visible.&#xD;&#xA;    &#xD;&#xA;    			// Start operations on model-view matrix stack...&#xD;&#xA;    			GL.MatrixMode(MatrixMode.Modelview);&#xD;&#xA;    &#xD;&#xA;    			// Pushing matrices is not really needed in this simple example,&#xD;&#xA;    			// but typically you will use PushMatrix before drawing object&#xD;&#xA;    			// whose transformations depend on previously computed matrix,&#xD;&#xA;    			// and that's going to happen very often.&#xD;&#xA;    			GL.PushMatrix();&#xD;&#xA;    			GL.LoadIdentity();&#xD;&#xA;    			// Remember that negative Z axis is going &quot;into the screen&quot;, so we move vertices away from camera.&#xD;&#xA;    			GL.Translate(0.0f, 0.0f, -((nearPlane+farPlane) / 2f));&#xD;&#xA;    &#xD;&#xA;    			// Begin drawing points. &#xD;&#xA;    			// Read about drawing primitives here:&#xD;&#xA;    			// http://www.opentk.com/doc/chapter/2/opengl/geometry/primitives&#xD;&#xA;        		GL.Begin(BeginMode.Points);		&#xD;&#xA;    			GL.Color3(Color.Gold);  // From now on all vertices will be golden.&#xD;&#xA;    			&#xD;&#xA;    			foreach(var point in points)&#xD;&#xA;    			{&#xD;&#xA;    				GL.Vertex2(point);&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;        		GL.End(); // End drawing points.&#xD;&#xA;    &#xD;&#xA;    			GL.PopMatrix(); // We pushed, so now we need to pop previous matrix from the stack.&#xD;&#xA;    &#xD;&#xA;                SwapBuffers();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            [STAThread]&#xD;&#xA;            static void Main()&#xD;&#xA;            {&#xD;&#xA;                using (var game = new PointsExample())&#xD;&#xA;                {&#xD;&#xA;                    game.Run(200.0, 0.0);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And that's all for a simple task of drawing colored points. I hope that you've found it useful and that I didn't do anything wrong :)&#xD;&#xA;&#xD;&#xA;  [1]: http://www.opentk.com/" />
  <row Id="36760" PostHistoryTypeId="2" PostId="16025" RevisionGUID="e1a3fbad-7939-4f1e-90a5-6b75ea01f079" CreationDate="2011-08-15T15:24:53.667" UserId="8821" Text="Take a look at this guide... Especially the sprite class witch is this examples &quot;gameobject&quot;&#xD;&#xA;&#xD;&#xA; http://www.xnadevelopment.com/tutorials.shtml" />
  <row Id="36761" PostHistoryTypeId="2" PostId="16026" RevisionGUID="95774e22-2c8f-43e2-a492-934116acf565" CreationDate="2011-08-15T16:09:11.030" UserId="9279" Text="[Three.js][1] got my attention a few weeks ago, I haven't gotten to play with it yet, but it seems to be pretty good and there's some [good tutorials][2] out there. It may be worth it checking it out :-).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mrdoob/three.js/&#xD;&#xA;  [2]: http://www.html5rocks.com/en/tutorials/three/intro/" />
  <row Id="36762" PostHistoryTypeId="25" PostId="16024" RevisionGUID="0e78f7bb-a09e-4dee-9c4c-4e44d85199e1" CreationDate="2011-08-15T16:37:13.963" Comment="http://twitter.com/#!/StackGameDev/status/103143217595297792" />
  <row Id="36763" PostHistoryTypeId="2" PostId="16027" RevisionGUID="eeb6d882-4aa2-441f-b26b-5207304bc73d" CreationDate="2011-08-15T16:38:18.270" UserId="8367" Text="I believe you already have great answers, but here is my $0.02 of theoretical solution to the problem.&#xD;&#xA;&#xD;&#xA;What you want is NOT the longest path, but longest shortest path. You want the room that is the farthest away, given you are considering the shortest path to the room. This probably sounds confusing, but it is very easy to calculate.&#xD;&#xA;&#xD;&#xA; 1. Start at your starting room. Mark each of its neighbors 1. They are&#xD;&#xA;    distance 1 away from the starting room. &#xD;&#xA; 2. For each room marked 1, visit each of its UNMARKED neighbors and mark them 2. They are 2 distance away from the start. &#xD;&#xA; 3. Continue until you have covered all the rooms. The room with the maximum number is farthest away from the start.&#xD;&#xA;&#xD;&#xA;Computing an actual longest path (wont take too long for say 10 rooms) will not work because you cannot make the player take that longest path. So putting the entry and exit in two rooms farthest away from each other is your best bet. To find this, calculate the farthest rooms, for every room." />
  <row Id="36764" PostHistoryTypeId="2" PostId="16028" RevisionGUID="487891d8-65e8-4bd4-b5d4-373f028d8742" CreationDate="2011-08-15T17:10:11.383" UserId="3830" Text="Here is a very good list on GitHub of JS game engines...&#xD;&#xA;&#xD;&#xA;  https://github.com/bebraw/jswiki/wiki/Game-Engines&#xD;&#xA;&#xD;&#xA;As I've explored different JS game engines for a project, I've found that the good ones have good demos, where someone actually has made a real game with it to show what it can do.  [Impact][1] is good for this, as is [LimeJS][2].  Lack of demos doesn't mean bad engine necessarily, but it does show the developer has a sense of using their project for something actually functional.&#xD;&#xA;&#xD;&#xA;Which ever you try, do make sure you test it out on all browsers, especially IE.  People hate on it, but [a lot of people use it][4].&#xD;&#xA;&#xD;&#xA;PS&#xD;&#xA;&#xD;&#xA;A shout out for [Crafty][3] for having some good polish on the website along with good documentation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://impactjs.com/&#xD;&#xA;  [2]: http://www.limejs.com/&#xD;&#xA;  [3]: http://craftyjs.com/&#xD;&#xA;  [4]: http://en.wikipedia.org/wiki/Usage_share_of_web_browsers" />
  <row Id="36765" PostHistoryTypeId="2" PostId="16029" RevisionGUID="0f3a04bb-a125-46d8-a7c4-10e44de94750" CreationDate="2011-08-15T17:23:01.163" UserId="9033" Text="I was in the same situation as you, I'm a developer, but not in the gaming field, and I wanted to target iOS.&#xD;&#xA;&#xD;&#xA;The SDK that I found to be productive and fairly easy to get into from a development background was [Unity3D][1].  You can code in either their version of Javascript (Unityscript) or in C#.  Mind you it is very 3D oriented, but they have sprite engines you can use to create 2D only games.&#xD;&#xA;&#xD;&#xA;The other advantage with using Unity is that it doesn't bind you to a specific platform.  You can write once and deploy to many platforms (with minor platform specific tweaks perhaps).  You can develop on a Mac or a PC which may be more convenient depending on your situation.&#xD;&#xA;&#xD;&#xA;Another SDK that I use is [GLBasic][2].  It is much simpler and you develop using pure code, and you don't have the fancy interface as Unity (which can be quite confusing for the non-game programmer!).  It has all the required 2D gaming commands that you should need, and it also has 3D commands if you wish.  It doesn't have built in physics, but you can add the Box2D library which people have done.  I love it for its simplicity and how quickly you can get something working.&#xD;&#xA;&#xD;&#xA;Both offer a free version to try for as long as you wish, and you can upgrade the licenses if you want to deploy to iOS.&#xD;&#xA;&#xD;&#xA;And as far as math is concerned, learning and mastering vectors would go a long way.  That and basic algebra, but not much more that regular development.  My biggest learning curve was the graphical side of things, and how to organize a game project.  Plus allowing yourself to break traditional programming 'rules' such as globals (etc) to create faster game loops.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://www.glbasic.com/" />
  <row Id="36766" PostHistoryTypeId="2" PostId="16030" RevisionGUID="61eb0209-5393-425d-a597-25f98ac76fc9" CreationDate="2011-08-15T17:28:12.477" UserId="9284" Text="Yes.  Even the illusion of progress is a great motivator." />
  <row Id="36767" PostHistoryTypeId="2" PostId="16031" RevisionGUID="a357e288-703e-4e70-ab69-fb0c27e1b024" CreationDate="2011-08-15T17:29:58.060" UserId="457" Text="we are in the process of porting a game from iphone(made with cocos2s) to android(using the andEngine), and it has been a pain to do. So for our next project (a 2d game) we are thinking about using some multiplatform engine/framework. For now we are thinking about testing both unity, marmaled(former airplay sdk) and cocos2d-x. Do you have any opinion about this? Does someon have experience developing 2d games using Unity?" />
  <row Id="36768" PostHistoryTypeId="1" PostId="16031" RevisionGUID="a357e288-703e-4e70-ab69-fb0c27e1b024" CreationDate="2011-08-15T17:29:58.060" UserId="457" Text="The best option to multi-platform 2d mobile development" />
  <row Id="36769" PostHistoryTypeId="3" PostId="16031" RevisionGUID="a357e288-703e-4e70-ab69-fb0c27e1b024" CreationDate="2011-08-15T17:29:58.060" UserId="457" Text="&lt;android&gt;&lt;iphone&gt;&lt;cross-platform&gt;&lt;mobile&gt;" />
  <row Id="36770" PostHistoryTypeId="2" PostId="16032" RevisionGUID="1d8ee34b-f3b7-4057-a51e-69d0c82b915f" CreationDate="2011-08-15T17:46:36.377" UserId="9285" Text="Is it possible to build 2d games with a good GUI like cut the rope or angry birds by just using eclipse alone ??? If not, could someone pls suggest the tools i probably will need to build basic 2d games. I'm quite confused on this topic and haven't found much help yet. It would b nice if someone cud help me out. Thank you ! " />
  <row Id="36771" PostHistoryTypeId="1" PostId="16032" RevisionGUID="1d8ee34b-f3b7-4057-a51e-69d0c82b915f" CreationDate="2011-08-15T17:46:36.377" UserId="9285" Text="Building 2d games in android" />
  <row Id="36772" PostHistoryTypeId="3" PostId="16032" RevisionGUID="1d8ee34b-f3b7-4057-a51e-69d0c82b915f" CreationDate="2011-08-15T17:46:36.377" UserId="9285" Text="&lt;game-design&gt;&lt;android&gt;&lt;tools&gt;" />
  <row Id="36773" PostHistoryTypeId="2" PostId="16033" RevisionGUID="c84b4e09-fd2b-427e-bfd3-7bb9bfc9c56d" CreationDate="2011-08-15T17:52:01.363" UserId="457" Text="We are using the andEngine for our games, if this is what you are asking and we have a good looking GUI, but this is because we have awesome artists. And yes, with andEngine you develop in java using your favorite IDE." />
  <row Id="36774" PostHistoryTypeId="2" PostId="16034" RevisionGUID="d8c51ac0-474d-45d5-bf55-42f74d18aa2e" CreationDate="2011-08-15T17:54:53.780" UserId="9286" Text="&#xD;&#xA;Title says it all. &#xD;&#xA;&#xD;&#xA;Does anyone know what language or platform is used to develop apps for Google+?&#xD;&#xA;&#xD;&#xA;I'm hoping Python, but I know google has a lot of other mediums they could use for this. I'm fine with hearsay as I know the game portion of google+ is pretty new." />
  <row Id="36775" PostHistoryTypeId="1" PostId="16034" RevisionGUID="d8c51ac0-474d-45d5-bf55-42f74d18aa2e" CreationDate="2011-08-15T17:54:53.780" UserId="9286" Text="I know it might not be public knowledge yet, but does anyone know what language or platform is used to develop apps for Google+?" />
  <row Id="36776" PostHistoryTypeId="3" PostId="16034" RevisionGUID="d8c51ac0-474d-45d5-bf55-42f74d18aa2e" CreationDate="2011-08-15T17:54:53.780" UserId="9286" Text="&lt;python&gt;&lt;hobby-development&gt;&lt;social&gt;&lt;google-app-engine&gt;&lt;google-web-toolkit&gt;" />
  <row Id="36777" PostHistoryTypeId="2" PostId="16035" RevisionGUID="9f7f6849-2810-4780-a5c3-c38e16050a14" CreationDate="2011-08-15T17:55:13.280" UserId="457" Text="In our games, Bunny Shooter and Ant Smasher people use those buttons, not many of them do, as a simple twitter search reveals. But they were easy enough to implement, so we will put them on our next projects." />
  <row Id="36778" PostHistoryTypeId="2" PostId="16036" RevisionGUID="07bc5add-2568-4596-b46d-1421f4a6b920" CreationDate="2011-08-15T18:23:05.550" UserId="9134" Text="Neither D3D nor OpenGL specify or enforce a matrix handedness.  True, the matrix stack functions in OpenGL are RH, but there's absolutely nothing to stop you from writing your own matrix library (or using a 3rd party one) that uses LH coords and loading the result using glLoadMatrixf.  Likewise D3D has a full set of both RH and LH matrix functions.  This is an old old old misunderstanding and needs to be put to bed.&#xD;&#xA;&#xD;&#xA;Regarding row-major vs column major, please see the following: http://www.opengl.org/resources/faq/technical/transformations.htm:&#xD;&#xA;&#xD;&#xA;&gt; Column-major versus row-major is purely a notational convention. Note that post-multiplying with column-major matrices produces the same result as pre-multiplying with row-major matrices. The OpenGL Specification and the OpenGL Reference Manual both use column-major notation. You can use any notation, as long as it's clearly stated.&#xD;&#xA;&gt;&#xD;&#xA;&gt; Sadly, the use of column-major format in the spec and blue book has resulted in endless confusion in the OpenGL programming community. Column-major notation suggests that matrices are not laid out in memory as a programmer would expect.&#xD;&#xA;" />
  <row Id="36779" PostHistoryTypeId="2" PostId="16037" RevisionGUID="c87a0656-be12-4e43-b483-88d17079e55c" CreationDate="2011-08-15T18:24:48.857" UserId="9279" Text="I'm working on a project using opengl-es 2.0, and I'm having some trouble setting up perspective projection. &#xD;&#xA;&#xD;&#xA;If I don't set up the perspective projection and simply multiply the object-to-world matrix (I believe it's also called model matrix) by the vertex positions, the objects on screen are rendered correctly, they appear stretched, but as far as I know, that's something the projection matrix would fix. The problem is, whenever I set the perspective matrix and use it, the objects on screen disappear, and no matter how much I move them around they never show up in screen. &#xD;&#xA;&#xD;&#xA;The calculations to get the Model-View-Projection matrix are done in CPU and the last multiplication the MVP-Matrix by the actual object-space vertex data is done in the vertex shader, this is why I believe the problem might be on the process to get that MVP-Matrix. I've run a bunch of unit tests, but according to those tests (and my basic knowledge of linear algebra) those matrices are being correctly calculated, and my internet-research throughout the day isn't helping for now. :-/&#xD;&#xA;&#xD;&#xA;This is the code I use to calculate the MVP-Matrix:&#xD;&#xA;&#xD;&#xA;    Matrix4D projection_matrix;&#xD;&#xA;    projection_matrix.makePerspective(45.0f, 0.001f, 100.0f, 480.0f/320.0f);&#xD;&#xA;    &#xD;&#xA;    Matrix4D view_matrix;&#xD;&#xA;    view_matrix.makeIdentity(); //Should be a real view matrix. TODO.&#xD;&#xA;    &#xD;&#xA;    Matrix4D model_matrix(getWorldMatrix());&#xD;&#xA;    &#xD;&#xA;    Matrix4D mvp_matrix(projection_matrix);&#xD;&#xA;    mvp_matrix *= view_matrix;&#xD;&#xA;    mvp_matrix *= model_matrix;&#xD;&#xA;    &#xD;&#xA;    mMesh-&gt;draw(time, mvp_matrix.getRawData());&#xD;&#xA;&#xD;&#xA;I think this code is pretty self-explanatory, but just in case, those Matrix4D are 4x4 matrices, and calling makePerspective/makeIdentity on them will make that matrix the Perspective or Identity matrix. The getRawData() call on Matrix4D objects returns the matrix data as a float array in column-major notation, and the mMesh variable is another object which, when draw is called, will simply send all the vertex and material data to the shaders.&#xD;&#xA;&#xD;&#xA;The makePerspective function's code is the following:&#xD;&#xA;&#xD;&#xA;    Matrix4D&amp; Matrix4D::makePerspective(const float field_of_view, &#xD;&#xA;            const float near, const float far, const float aspect_ratio) {&#xD;&#xA;        float size = near * tanf(DEGREES_TO_RADIANS(field_of_view) / 2.0f); &#xD;&#xA;        &#xD;&#xA;        return this-&gt;makeFrustum(-size, size, -size / aspect_ratio,&#xD;&#xA;                 size / aspect_ratio, near, far);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Matrix4D&amp; Matrix4D::makeFrustum(const float left, const float right, &#xD;&#xA;            const float bottom, const float top, const float near, &#xD;&#xA;            const float far) {&#xD;&#xA;        this-&gt;mRawData[0] = 2.0f * near / (right - left);  &#xD;&#xA;        this-&gt;mRawData[1] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[2] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[4] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[5] = 2.0f * near / (top - bottom); &#xD;&#xA;        this-&gt;mRawData[6] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[7] =  0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[8] = (right + left) / (right - left);&#xD;&#xA;        this-&gt;mRawData[9] = (top + bottom) / (top - bottom); &#xD;&#xA;        this-&gt;mRawData[10] = - (far + near) / (far - near); &#xD;&#xA;        this-&gt;mRawData[11] = -1.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[12] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[13] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[14] = -2.0f * far * near / (far - near); &#xD;&#xA;        this-&gt;mRawData[15] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        return *this;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And the getWorldMatrix() call does this(with some related code):&#xD;&#xA;&#xD;&#xA;    const Matrix4D&amp; getWorldMatrix() {&#xD;&#xA;        return mWorldMatrix = &#xD;&#xA;                getTranslationMatrix() *&#xD;&#xA;                getRotationMatrix() *&#xD;&#xA;                getScaleMatrix();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const Matrix4D&amp; getRotationMatrix() {&#xD;&#xA;        return this-&gt;mRotationMatrix.makeRotationFromEuler(this-&gt;mPitchAngle,&#xD;&#xA;            this-&gt;mRollAngle, this-&gt;mYawAngle);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const Matrix4D&amp; getTranslationMatrix() {&#xD;&#xA;        return this-&gt;mTranslationMatrix.makeTranslation(this-&gt;mPosition.x,&#xD;&#xA;            this-&gt;mPosition.y, this-&gt;mPosition.z);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const Matrix4D&amp; getScaleMatrix() {&#xD;&#xA;        return this-&gt;mScaleMatrix.makeScale(this-&gt;mScaleX, this-&gt;mScaleY, this-&gt;mScaleZ);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ///This code goes in the Matrix4D class.&#xD;&#xA;    Matrix4D&amp; Matrix4D::makeTranslation(const float x, const float y, &#xD;&#xA;            const float z) {&#xD;&#xA;        this-&gt;mRawData[0] = 1.0f; &#xD;&#xA;        this-&gt;mRawData[1] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[2] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[4] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[5] = 1.0f; &#xD;&#xA;        this-&gt;mRawData[6] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[7] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[8] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[9] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[10] = 1.0f; &#xD;&#xA;        this-&gt;mRawData[11] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[12] =    x; &#xD;&#xA;        this-&gt;mRawData[13] =    y; &#xD;&#xA;        this-&gt;mRawData[14] =    z; &#xD;&#xA;        this-&gt;mRawData[15] = 1.0f;&#xD;&#xA;        &#xD;&#xA;        return *this;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Matrix4D&amp; Matrix4D::makeScale(const float x, const float y, &#xD;&#xA;            const float z) {&#xD;&#xA;        this-&gt;mRawData[0] =    x; &#xD;&#xA;        this-&gt;mRawData[1] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[2] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[4] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[5] =    y; &#xD;&#xA;        this-&gt;mRawData[6] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[7] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[8] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[9] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[10] =    z; &#xD;&#xA;        this-&gt;mRawData[11] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[12] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[13] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[14] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[15] = 1.0f;&#xD;&#xA;        &#xD;&#xA;        return *this;&#xD;&#xA;    } &#xD;&#xA;    &#xD;&#xA;    Matrix4D&amp; Matrix4D::makeRotationFromEuler(const float angle_x, &#xD;&#xA;            const float angle_y, const float angle_z) {&#xD;&#xA;        float a = cosf(angle_x);&#xD;&#xA;        float b = sinf(angle_x);&#xD;&#xA;        float c = cosf(angle_y);&#xD;&#xA;        float d = sinf(angle_y);&#xD;&#xA;        float e = cosf(angle_z);&#xD;&#xA;        float f = sinf(angle_z);&#xD;&#xA;        float ad = a * d;&#xD;&#xA;        float bd = b * d;&#xD;&#xA;            &#xD;&#xA;        this-&gt;mRawData[0] = c * e;&#xD;&#xA;        this-&gt;mRawData[1] = -bd * e + a * f;&#xD;&#xA;        this-&gt;mRawData[2] = ad * e + b * f;&#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        this-&gt;mRawData[4] = -c * f; &#xD;&#xA;        this-&gt;mRawData[5] = bd * f + a * e;&#xD;&#xA;        this-&gt;mRawData[6] = -ad * f + b * e; &#xD;&#xA;        this-&gt;mRawData[7] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        this-&gt;mRawData[8] = -d; &#xD;&#xA;        this-&gt;mRawData[9] = -b * c;&#xD;&#xA;        this-&gt;mRawData[10] = a * c; &#xD;&#xA;        this-&gt;mRawData[11] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        this-&gt;mRawData[12] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[13] = 0.0f;&#xD;&#xA;        this-&gt;mRawData[14] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[15] = 1.0f;&#xD;&#xA;    &#xD;&#xA;        return *this;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, the vertex shader is pretty much this:&#xD;&#xA;&#xD;&#xA;    #version 110&#xD;&#xA;    &#xD;&#xA;    const float c_one = 1.0;&#xD;&#xA;    const float c_cero = 0.0;&#xD;&#xA;    &#xD;&#xA;    uniform float time;&#xD;&#xA;    uniform mat4 mvp_matrix;&#xD;&#xA;    &#xD;&#xA;    attribute vec3 position;&#xD;&#xA;    attribute vec3 normal;&#xD;&#xA;    attribute vec2 texture_coordinate;&#xD;&#xA;    &#xD;&#xA;    varying vec2 v_texture_coordinate;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {   &#xD;&#xA;        gl_Position = mvp_matrix * vec4(position, c_one);&#xD;&#xA;        v_texture_coordinate = texture_coordinate;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Just in case, the object being rendered is rendered on position (0.0f, 0.0f, -3.0f) with 0.5f scale applied to all the three axis's.&#xD;&#xA;&#xD;&#xA;I don't really know what could be wrong, I'm hoping someone can spot what I may be missing, and any help would be appreciated. Debugging this would be a lot easier if I could get per-vertex results on the shader :-/.&#xD;&#xA;&#xD;&#xA;As a side note, I'm having doubts on how to calculate the View or camera matrix, as far as I know it's simply a matrix with the inverted transformations the camera has to do, by which I understand something like, if I want to move the camera 100 units to the right, I move it 100 units to the left, is that right? " />
  <row Id="36780" PostHistoryTypeId="1" PostId="16037" RevisionGUID="c87a0656-be12-4e43-b483-88d17079e55c" CreationDate="2011-08-15T18:24:48.857" UserId="9279" Text="Setting up perspective projection on Opengl ES 2.0 makes objects disappear" />
  <row Id="36781" PostHistoryTypeId="3" PostId="16037" RevisionGUID="c87a0656-be12-4e43-b483-88d17079e55c" CreationDate="2011-08-15T18:24:48.857" UserId="9279" Text="&lt;programming&gt;&lt;matrix&gt;&lt;projection&gt;&lt;opengl-es2&gt;" />
  <row Id="36782" PostHistoryTypeId="25" PostId="16019" RevisionGUID="03d06914-f235-44b5-ac15-266bc6afa9e1" CreationDate="2011-08-15T18:37:14.920" Comment="http://twitter.com/#!/StackGameDev/status/103173419968905216" />
  <row Id="36783" PostHistoryTypeId="2" PostId="16038" RevisionGUID="e2b9fd88-e4f4-4da0-b00e-c85e4bcc0aea" CreationDate="2011-08-15T18:45:26.107" UserId="4443" Text="Assuming you are using two separate graphics cards for the monitors in question, you have bound to the primary graphics card on the main monitor, and then drag it to the monitor the second card is rendering with. on -most- systems you will just take a huge performance hit as it still renders on the primary graphic card but then copies the data to the other one for display. In your case however it would seem its not capable of doing that.&#xD;&#xA;&#xD;&#xA;All I know however is the hardware flow behind it, not the python and pygame software on top of it all.. But I would assume this hardware issue is why you are seeing your issues." />
  <row Id="36784" PostHistoryTypeId="4" PostId="15988" RevisionGUID="b203f819-ea06-4b16-ac57-c27b3303e85b" CreationDate="2011-08-15T18:50:55.207" UserId="6588" Comment="edited title" Text="Why, when I write an if condition, doesn't it work properly?" />
  <row Id="36785" PostHistoryTypeId="5" PostId="15997" RevisionGUID="5580dcf3-4f9c-4fcd-af9a-c1befd1f14b2" CreationDate="2011-08-15T18:53:17.530" UserId="7328" Comment="added 445 characters in body" Text="So far you seem to be on the right track. those books can really give you a boost if you are going to develop your games using objective-c. if you have some a good knowledge about obj-c you can easily try changing tech-demo codes, released with the game engine. at least that's the way I usually learn how to work with new tools.&#xD;&#xA;&#xD;&#xA;and there are other options for iphone development too. if you feel more comfortable with other languages like c# or c++ or other popular languages, there are engines to based on them.&#xD;&#xA;&#xD;&#xA;you may need both OpenGL and mathematics knowledge while developing but just working on the engine helps you learn almost every thing you need to know. and later if you get into any problems, you can easily pinpoint them and directly ask about those specific opengl/math problem you are facing.&#xD;&#xA;&#xD;&#xA;As far as I know, there is no game engine using java for iOS, since iOS doesn't support JVM or equivalent softwares. the most related one is JavaScript which is supported by unity. other than that the main programming language you need to use for iOS development is Obj-C, and cocos2d-iphone is one of the most successful gameengines using that language. but you need to learn c++ since there are many libraries written with it. even in cocos2d the main physics engine offered is box2D written in c++. " />
  <row Id="36786" PostHistoryTypeId="5" PostId="16029" RevisionGUID="426d05ec-3f5d-4e57-b531-91778349a833" CreationDate="2011-08-15T18:56:03.863" UserId="9033" Comment="added 3 characters in body" Text="I was in the same situation as you, I'm a developer, but not in the gaming field, and I wanted to target iOS.&#xD;&#xA;&#xD;&#xA;The SDK that I found to be productive and fairly easy to get into from a development background was [Unity3D][1].  You can code in either their version of Javascript (Unityscript) or in C#.  Mind you it is very 3D oriented, but they have sprite engines you can use to create 2D only games.&#xD;&#xA;&#xD;&#xA;The other advantage with using Unity is that it doesn't bind you to a specific platform.  You can write once and deploy to many platforms (with minor platform specific tweaks perhaps).  You can develop on a Mac or a PC which may be more convenient depending on your situation.&#xD;&#xA;&#xD;&#xA;Another SDK that I use is [GLBasic][2].  It is much simpler and you develop using pure code, and you don't have the fancy interface as Unity (which can be quite confusing for the non-game programmer!).  It has all the required 2D gaming commands that you should need, and it also has 3D commands if you wish.  It doesn't have built in physics, but you can add the Box2D library which people have done.  I love it for its simplicity and how quickly you can get something working.&#xD;&#xA;&#xD;&#xA;Both offer a free version to try for as long as you wish, and you can upgrade the licenses if you want to deploy to iOS.&#xD;&#xA;&#xD;&#xA;And as far as math is concerned, learning and mastering vectors would go a long way.  That and basic algebra, but not much more than in regular development.  My biggest learning curve was the graphical side of things, and how to organize a game project.  Plus allowing yourself to break traditional programming 'rules' such as globals (etc) to create faster game loops.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://unity3d.com/&#xD;&#xA;  [2]: http://www.glbasic.com/" />
  <row Id="36787" PostHistoryTypeId="2" PostId="16039" RevisionGUID="53b0dd30-3516-448f-9958-e1bc9ee80f0f" CreationDate="2011-08-15T19:19:27.033" UserId="9289" Text="I'm currently working on Unity to make a 2d game, not for mobile devices though. What I'm doing to keep it 2d is just to set the Z axis rotation of the camera to 0, and only move it on the X and Y axes. If you can afford the iOS license of Unity, then go for it, Unity really saves time on development, and you can make 3d games easily without messing with openGLES." />
  <row Id="36788" PostHistoryTypeId="2" PostId="16040" RevisionGUID="aaa5c8d7-32f4-41e4-8c2b-92ac5a5ef7ff" CreationDate="2011-08-15T19:19:39.313" UserId="9153" Text="I think the [Sword &amp; Sworcery][1] is a great example of how to effectively implement social media posting into a game. In this case it was strictly twitter, but I think they owe a large portion of their success to this feature.&#xD;&#xA;&#xD;&#xA;Instead of posting scores or progress in a traditional sense, all of the story in the game is broken into 140 character chunks, which the user has the option to share as they want. Other people seeing these random, but interesting phrases showing up in their friend's feeds investigated and checked out the game. It also gave it quite a lot of press and buzz that wasn't directly related to its gameplay.&#xD;&#xA;&#xD;&#xA;It offered a way for people to share aspects of their experience without it feeling like an ad.&#xD;&#xA;&#xD;&#xA;This article offers a decent summary of how they made it work for their game: http://geraldonascimento.net/sworcery-how-4-four-guys-managed-to-hijack-the-world/&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swordandsworcery.com/" />
  <row Id="36789" PostHistoryTypeId="5" PostId="16023" RevisionGUID="348a8a39-d88c-4a16-bf28-9d2189ec99f1" CreationDate="2011-08-15T19:35:16.930" UserId="5060" Comment="Formatting and grammar." Text="If I have a map in my platformer game and I want my character be able to jump on some platform, for example. Is there an easy way to tell the game where the platforms are and where the player can jump to and start jumping from?&#xD;&#xA;&#xD;&#xA;Also, for games like Super Mario Bros and such, are the maps made in .txt files ? I watched a tutorial for maps and he said all professional game developers make a .txt file for the map and write numbers for example using...&#xD;&#xA;&#xD;&#xA;    111111111111111111111&#xD;&#xA;    111111111111111111111&#xD;&#xA;    111111111111111111111&#xD;&#xA;    111111111111111111111&#xD;&#xA;    222222222222222222222&#xD;&#xA;&#xD;&#xA;...to create a map. Is this correct or how did the developers do the maps in the Super Mario Bros or MegaMan games?&#xD;&#xA;&#xD;&#xA;What I am wondering is, if I want my player to be able to jump up on some platform or something, how do I do it?" />
  <row Id="36790" PostHistoryTypeId="4" PostId="16023" RevisionGUID="348a8a39-d88c-4a16-bf28-9d2189ec99f1" CreationDate="2011-08-15T19:35:16.930" UserId="5060" Comment="Formatting and grammar." Text="How to handle platform collisions in a 2D game?" />
  <row Id="36791" PostHistoryTypeId="24" PostId="16023" RevisionGUID="348a8a39-d88c-4a16-bf28-9d2189ec99f1" CreationDate="2011-08-15T19:35:16.930" Comment="Proposed by 5060 approved by 14 edit id of 645" />
  <row Id="36792" PostHistoryTypeId="5" PostId="16033" RevisionGUID="d57ce3d5-540c-4091-bad9-a9313b50a431" CreationDate="2011-08-15T19:35:30.830" UserId="6877" Comment="link added" Text="We are using the [andEngine](www.andengine.org) for our games, if this is what you are asking and we have a good looking GUI, but this is because we have awesome artists. And yes, with andEngine you develop in java using your favorite IDE." />
  <row Id="36793" PostHistoryTypeId="24" PostId="16033" RevisionGUID="d57ce3d5-540c-4091-bad9-a9313b50a431" CreationDate="2011-08-15T19:35:30.830" Comment="Proposed by 6877 approved by 14 edit id of 646" />
  <row Id="36794" PostHistoryTypeId="2" PostId="16041" RevisionGUID="17b0e194-015a-42d7-8354-dd9b2fa8d3f1" CreationDate="2011-08-15T20:10:24.507" UserId="6558" Text="App development for Google+ looks to be similar to app development for Facebook.  That is to say, you will likely be able to use any language or platform that allows the game to be played in a browser, and you will interface with the API via RESTful style requests (basically making an HTTP call to something like api.plus.google.com)&#xD;&#xA;&#xD;&#xA;My guess is that this will mostly translate to a lot of people using Flash, Unity, and HTML5/Javascript." />
  <row Id="36795" PostHistoryTypeId="5" PostId="16034" RevisionGUID="c7180f4e-41c3-4914-9d96-ee0e8e2cc9b4" CreationDate="2011-08-15T20:22:54.797" UserId="744" Comment="deleted 25 characters in body; edited tags; edited title" Text="Does anyone know what language or platform is used to develop apps for Google+?&#xD;&#xA;&#xD;&#xA;I'm hoping Python, but I know google has a lot of other mediums they could use for this. I'm fine with hearsay as I know the game portion of google+ is pretty new." />
  <row Id="36796" PostHistoryTypeId="4" PostId="16034" RevisionGUID="c7180f4e-41c3-4914-9d96-ee0e8e2cc9b4" CreationDate="2011-08-15T20:22:54.797" UserId="744" Comment="deleted 25 characters in body; edited tags; edited title" Text="What language or platform is used to develop apps for Google+?" />
  <row Id="36797" PostHistoryTypeId="6" PostId="16034" RevisionGUID="c7180f4e-41c3-4914-9d96-ee0e8e2cc9b4" CreationDate="2011-08-15T20:22:54.797" UserId="744" Comment="deleted 25 characters in body; edited tags; edited title" Text="&lt;web&gt;&lt;social&gt;" />
  <row Id="36798" PostHistoryTypeId="2" PostId="16042" RevisionGUID="f0e80820-bc00-4432-8d5e-5ac7a3e678a1" CreationDate="2011-08-15T20:24:15.297" UserId="3051" Text="You're asking at least two questions here so I'm a little thrown off.  Your primary question _seems_ to be asking about how 2D tiled levels are stored but your subject line and tags are more directed toward collision detection.  Can you clarify your question(s)?&#xD;&#xA;&#xD;&#xA;There are myriad ways to represent level data and I certainly wouldn't say that all pro game developers store 2D tiled level data as .txt files.  However, for a simple project, a .txt file that's read into a two-dimensional array is certainly a good fit&amp;mdash;just not necessarily the only fit.&#xD;&#xA;&#xD;&#xA;[Over on Stack Overflow][1], I've posted the same generalized pseudocode for 2D, tile-based collision detection/resolution.  Check that out and see if it helps answer your collision question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/6673822/collision-reaction-in-a-2d-side-scroller-game-similar-to-mario/6699728#6699728" />
  <row Id="36799" PostHistoryTypeId="2" PostId="16043" RevisionGUID="9fe8aa17-45da-4f3e-9cd4-cc460d5bf8f8" CreationDate="2011-08-15T20:28:12.623" UserId="2897" Text="I can't really say if there is an easy way to do collisions without knowing everything about your game :) Anyway, it depends on your definition of word &quot;easy&quot;. It looks like you knowledge about collisions is rather limited, so chances are that it won't be very easy. &#xD;&#xA;&#xD;&#xA;If I guessed right and you're aiming at a simplest form of collision, 2D rectangle tile collision, then there is a simple and quite complete [tutorial series](http://www.tonypa.pri.ee/tbw/start.html). There you will feel how basic things are done with tile-based collisions, jumping and platforms included. No need to code it yourself in Flash, just read it and remember terms for Googling later.&#xD;&#xA;&#xD;&#xA;Onto the next question, I highly doubt that MegaMan and SuperMario used .txt map file format considering the fact that games back then were often written in assembly language and had limited memory, so they were probably just storing tile arrangement in some segment of the ROM. Game developers use any map format they want within platform limitations, I've seen bitmap file formats where pixel colors represented tile types, but it's usually some kind of a binary format.&#xD;&#xA;&#xD;&#xA;Seriously though, investigate topic of collisions by reading that tutorial link and using help of mighty Google, think and let it sink for a while, come back with specific questions later. For a map file either save/load your data manually into/from any format you want or use serialization." />
  <row Id="36800" PostHistoryTypeId="7" PostId="15988" RevisionGUID="b0867b42-552b-4547-898c-0ba0bb74cfc6" CreationDate="2011-08-15T20:33:19.960" UserId="744" Comment="Rollback to [1a7c7f6f-c8bc-4ae6-bbbe-ea507316967d]" Text="Why, when I write an if condition, does it work properly?" />
  <row Id="36801" PostHistoryTypeId="2" PostId="16044" RevisionGUID="97b9be1c-f666-4a51-ac8d-2b18b678e68f" CreationDate="2011-08-15T20:34:33.023" UserId="3830" Text="Purely speculation here but...&#xD;&#xA;&#xD;&#xA;The Google App Engine supports Python, Java and Go for site development.  It wouldn't be unreasonable to suggest Google will give all three GAE languages the right hooks for Google+ application development.&#xD;&#xA;&#xD;&#xA;My current approach is to use GAE and Users Python API, since to use a Google+ app you will have to authenticate with a Google account." />
  <row Id="36802" PostHistoryTypeId="25" PostId="15967" RevisionGUID="22c8d7df-d4e1-451f-ab4f-1d93d5fca2b5" CreationDate="2011-08-15T20:37:15.223" Comment="http://twitter.com/#!/StackGameDev/status/103203620790603776" />
  <row Id="36803" PostHistoryTypeId="2" PostId="16045" RevisionGUID="2da4a368-3f68-4ded-9970-02eb9079619d" CreationDate="2011-08-15T21:00:12.787" UserId="9290" Text="I'm working on a project for which I will need to create a large item database, with plenty of different types of items which will all have different data structures and attributes.  I'm hoping to either find or implement a tool which will help my collaborators and I create item data collaboratively, something like a database frontend, basically. I've considered setting up an instance of a rails backend like [railsAdmin](https://github.com/sferik/rails_admin) and creating models for each type of item we'll need (e.g. weapon, vehicle, etc) and allowing team members to simply create new database records and populate data fields, then pull the data out of the DB and convert it to whatever format we need down the road.&#xD;&#xA;&#xD;&#xA;My question is whether anyone has any experience with another tool, preferably something web-based, which would allow users to edit records in a database while easily adding or removing fields for specific tables? How did you and your team catalog all the items for your last project?&#xD;&#xA;&#xD;&#xA;Thanks in advance and apologies for my poorly worded query." />
  <row Id="36804" PostHistoryTypeId="1" PostId="16045" RevisionGUID="2da4a368-3f68-4ded-9970-02eb9079619d" CreationDate="2011-08-15T21:00:12.787" UserId="9290" Text="Tools for creating an item database" />
  <row Id="36805" PostHistoryTypeId="3" PostId="16045" RevisionGUID="2da4a368-3f68-4ded-9970-02eb9079619d" CreationDate="2011-08-15T21:00:12.787" UserId="9290" Text="&lt;tools&gt;&lt;databases&gt;" />
  <row Id="36806" PostHistoryTypeId="2" PostId="16046" RevisionGUID="a3308c30-3f46-48f6-b822-3561d18f9fcd" CreationDate="2011-08-15T21:19:18.137" UserId="3624" Text="i need to import model from two separate files.&#xD;&#xA;&#xD;&#xA;I have&#xD;&#xA;&#xD;&#xA;  - dog.mesh&#xD;&#xA;  - pet.material&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;dog.mesh contains vertices (converted to GeometryContent) and string &quot;pet.material&quot; (reference to .material file)&#xD;&#xA;&#xD;&#xA;My MeshImporter that handles .mesh files returns **NodeContent** (one of children should be MaterialEffectContent)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Problem is, that in ContentImporter there is nothing to handle loading of additional assets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Should pet.material be build by content pipeline in some way? To EffectMaterialContent for example. (Now i build it into MaterialDescription by MaterialImporter - contains string reference to .fx file)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The question is, can you even do things like this in xna? Split something that xna expects to be in one file (MeshContent) into two?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36807" PostHistoryTypeId="1" PostId="16046" RevisionGUID="a3308c30-3f46-48f6-b822-3561d18f9fcd" CreationDate="2011-08-15T21:19:18.137" UserId="3624" Text="Xna Import two files at once" />
  <row Id="36808" PostHistoryTypeId="3" PostId="16046" RevisionGUID="a3308c30-3f46-48f6-b822-3561d18f9fcd" CreationDate="2011-08-15T21:19:18.137" UserId="3624" Text="&lt;xna&gt;" />
  <row Id="36809" PostHistoryTypeId="5" PostId="16040" RevisionGUID="fffd38f7-54cc-406b-98ac-d18223d55094" CreationDate="2011-08-15T21:20:21.173" UserId="9153" Comment="Added link to article summarizing twitter success" Text="I think the [Sword &amp; Sworcery][1] is a great example of how to effectively implement social media posting into a game. In this case it was strictly twitter, but I think they owe a large portion of their success to this feature.&#xD;&#xA;&#xD;&#xA;Instead of posting scores or progress in a traditional sense, all of the story in the game is broken into 140 character chunks, which the user has the option to share as they want. Other people seeing these random, but interesting phrases showing up in their friend's feeds investigated and checked out the game. It also gave it quite a lot of press and buzz that wasn't directly related to its gameplay.&#xD;&#xA;&#xD;&#xA;It offered a way for people to share aspects of their experience without it feeling like an ad.&#xD;&#xA;&#xD;&#xA;This article offers a decent summary of how they made it work for their game: http://geraldonascimento.net/sworcery-how-4-four-guys-managed-to-hijack-the-world/&#xD;&#xA;&#xD;&#xA;For some more empirical results, the superbrothers team estimates over 200,000 tweets sporting their #sworcery hashtag [http://www.swordandsworcery.com/news/2011/6/7/applause.html][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.swordandsworcery.com/&#xD;&#xA;  [2]: http://www.swordandsworcery.com/news/2011/6/7/applause.html" />
  <row Id="36812" PostHistoryTypeId="5" PostId="16013" RevisionGUID="a93e9f4d-50d6-43b0-a67c-958b73a43d0f" CreationDate="2011-08-15T21:47:18.887" UserId="6588" Comment="added 292 characters in body" Text="Because of this:&#xD;&#xA;&#xD;&#xA;    if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX)&#xD;&#xA;    {&#xD;&#xA;      locationIndex = 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;EDIT: Although it isn't specified in the question, I can take a pretty good guess that what you actually want is -1 means Move West, 1 means Move East, and 0 means Don't Move. In which case your condition should be:&#xD;&#xA;&#xD;&#xA;    if (abs(locationIndex) &gt; MAX_EAST_WEST_INDEX)&#xD;&#xA;    {&#xD;&#xA;      locationIndex = 0;&#xD;&#xA;    }" />
  <row Id="36814" PostHistoryTypeId="2" PostId="16049" RevisionGUID="ee3c4fe6-1066-44d5-bbf3-2f1d2e09bc1a" CreationDate="2011-08-15T21:51:00.423" UserId="5060" Text="Do you have some kind-of development tool (eg. for making maps)? If so, (and this is how I do it) build an item editor into that. That way, all of your development tools are in one single spot. So, a user editing a map through your map editor, doesn't have to go to the website to set up items they want to use on that map (or the creatures on the map, or whatever). They can just pull down a menu, open the item editor, add the item and go right back to their map.&#xD;&#xA;&#xD;&#xA;This works even better for me since my game is multiplayer so I can control access to the different editors based on user logins (to the development tool)." />
  <row Id="36816" PostHistoryTypeId="2" PostId="16051" RevisionGUID="fb8b09b4-d4ac-415a-8101-510e3e9ed456" CreationDate="2011-08-15T22:06:34.190" UserId="3505" Text="You are trying to move west from the west-most location, so `locationIndex` becomes -1 and is therefore reset to 0 by the following code:&#xD;&#xA;&#xD;&#xA;            if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX) //Check to ensure array indexes aren't out of bounds.&#xD;&#xA;            {&#xD;&#xA;                locationIndex = 0;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;There is few other things in your code which you might want to change:&#xD;&#xA;&#xD;&#xA;`MAX_EAST_WEST_INDEX` is set to 1, which makes it impossible to visit some of the areas, I guess it should be set to 2.&#xD;&#xA;&#xD;&#xA;The method you use to limit movement to be within bounds is a bit peculiar, as it is now if you go too far east or north you will &quot;roll over&quot; and be at the west-most or south-most location, but trying to go too far in the other directions you will simply be blocked. Unless this is actually the desired behaviour you should make 4 individual statements to handle each of the directions separately." />
  <row Id="36817" PostHistoryTypeId="5" PostId="15988" RevisionGUID="38c08de5-e66f-4378-955f-3804f4900d24" CreationDate="2011-08-15T22:15:09.367" UserId="3505" Comment="Rollback to the actual question." Text="I'm making a text-based RPG. One thing I've been trying to implement for a long time now is the ability for the player to move North, South, East, or West. I  have my code placed in a MoveBehavior class, which exists in my main Character class. &#xD;&#xA;&#xD;&#xA;The problem is that, while my algorithm should work in theory, the locations the player moves to don't change unless the MoveDirection is North/South. East/West, for whatever reason, remains to be the same. &#xD;&#xA;&#xD;&#xA;I'll post the class I have (with comments), and then explain in detail further down:&#xD;&#xA;&#xD;&#xA;    public class MoveBehavior &#xD;&#xA;    	{&#xD;&#xA;    		const int MAX_EAST_WEST_INDEX = 1;&#xD;&#xA;    		const int MAX_NORTH_SOUTH_INDEX = 5;&#xD;&#xA;    		const int MIN_INDEX = 0;&#xD;&#xA;    		&#xD;&#xA;    		//Property Getters...&#xD;&#xA;    		public Location CurrentLocation { get { return this.currentLocation; } }&#xD;&#xA;    		public int AreaIndex { get { return this.areaIndex; } }&#xD;&#xA;    		public int LocationIndex { get { return this.locationIndex; } }&#xD;&#xA;    		//Readonly Props&#xD;&#xA;    		public readonly Character ClassOwner;&#xD;&#xA;    		public readonly int CharacterID; //ID of Character this instance belongs to.&#xD;&#xA;    		//Location Handlers&#xD;&#xA;    		private Location currentLocation;&#xD;&#xA;    		private int areaIndex, locationIndex;&#xD;&#xA;    &#xD;&#xA;    		//Jagged Array of Locations&#xD;&#xA;    		private Location[][] locations;&#xD;&#xA;    		&#xD;&#xA;    		public MoveBehavior() {} //Default ctor.&#xD;&#xA;    		&#xD;&#xA;    		//Constructor takes ID of character, along with a reference to the character object holding it.&#xD;&#xA;    		public MoveBehavior (int id, Character character)&#xD;&#xA;    		{&#xD;&#xA;    			this.CharacterID = id;&#xD;&#xA;    			this.ClassOwner = character;&#xD;&#xA;    			&#xD;&#xA;    			InitializeIndexes();&#xD;&#xA;    			InitializeLocations();&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		//Public Methods...&#xD;&#xA;    		&#xD;&#xA;    		public void Move(MoveDirection moveDir)&#xD;&#xA;    		{&#xD;&#xA;    			Location pastLocation = null; //Past location is null to ensure its initialization.&#xD;&#xA;    			&#xD;&#xA;    			switch (moveDir)&#xD;&#xA;    			{&#xD;&#xA;    			case MoveDirection.North:&#xD;&#xA;    				this.areaIndex++;&#xD;&#xA;    				pastLocation = locations[areaIndex - 1][locationIndex];&#xD;&#xA;    				break;&#xD;&#xA;    			case MoveDirection.South:&#xD;&#xA;    				this.areaIndex--;&#xD;&#xA;    				pastLocation = locations[areaIndex + 1][locationIndex];&#xD;&#xA;    				break;&#xD;&#xA;    			case MoveDirection.East:&#xD;&#xA;    				this.locationIndex++;&#xD;&#xA;    				pastLocation = locations[areaIndex][locationIndex - 1];&#xD;&#xA;    				break;&#xD;&#xA;    			case MoveDirection.West:&#xD;&#xA;    				this.locationIndex--;&#xD;&#xA;    				pastLocation = locations[areaIndex][locationIndex + 1];&#xD;&#xA;    				break;&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;    			if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX) //Check to ensure array indexes aren't out of bounds.&#xD;&#xA;    			{&#xD;&#xA;    				locationIndex = 0;&#xD;&#xA;    			}&#xD;&#xA;    			if (areaIndex &gt; MAX_NORTH_SOUTH_INDEX || areaIndex &lt; MIN_INDEX)&#xD;&#xA;    			{&#xD;&#xA;    				areaIndex = 0;&#xD;&#xA;    			}&#xD;&#xA;    		&#xD;&#xA;    			this.currentLocation = locations[areaIndex][locationIndex]; //Update location&#xD;&#xA;    			&#xD;&#xA;    			TravelMessage(pastLocation, this.currentLocation, moveDir); //Output Message&#xD;&#xA;    			&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		void TravelMessage(Location pastLocation, Location currentLocation, MoveDirection moveDir)&#xD;&#xA;    		{&#xD;&#xA;    			int pastNorthSouthIndex;&#xD;&#xA;    			switch(moveDir)&#xD;&#xA;    			{&#xD;&#xA;    			&#xD;&#xA;    			case MoveDirection.North:&#xD;&#xA;    				pastNorthSouthIndex = areaIndex - 1; &#xD;&#xA;    				break;&#xD;&#xA;    			default:&#xD;&#xA;    				pastNorthSouthIndex =  areaIndex;&#xD;&#xA;    				break;&#xD;&#xA;    			}&#xD;&#xA;    			&#xD;&#xA;    			Console.WriteLine(&quot;{0} has moved {1} from Area {2}, {3} to Area {4}, {5}&quot;, &#xD;&#xA;    			                  this.ClassOwner.Name, &#xD;&#xA;    			                  moveDir.ToString(), &#xD;&#xA;    			                  pastNorthSouthIndex,&#xD;&#xA;    			                  pastLocation.Name,&#xD;&#xA;    			                  areaIndex,&#xD;&#xA;    			                  currentLocation.Name);		&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		void InitializeIndexes()&#xD;&#xA;    		{&#xD;&#xA;    			this.areaIndex = 0;&#xD;&#xA;    			this.locationIndex = 0;&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		void InitializeLocations()&#xD;&#xA;    		{&#xD;&#xA;    			int iterationCount = 0;&#xD;&#xA;    			&#xD;&#xA;    			locations = new Location[6][];&#xD;&#xA;    			&#xD;&#xA;    			for (int i = 0; i &lt; 6; i++)&#xD;&#xA;    			{&#xD;&#xA;    				locations[i] = new Location[3];&#xD;&#xA;    				for (int j = 0; j &lt; 3; j++)&#xD;&#xA;    				{&#xD;&#xA;    					locations[i][j] = new Location(&quot;Location: &quot; + iterationCount, &#xD;&#xA;    					                               &quot; &quot;, &#xD;&#xA;    					                               new List&lt;Item&gt;(), &#xD;&#xA;    					                               new List&lt;Npc&gt;()&#xD;&#xA;    					                               ); &#xD;&#xA;    					iterationCount++;&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    				&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;The idea is to use a jagged array. The first dimension of this array is what dictates where the player is on the North/South coordinate, while the second dimension takes care of the East/West movement. &#xD;&#xA;&#xD;&#xA;I use two indexes, an areaIndex(North/South), and a locationIndex(East/West). &#xD;&#xA;&#xD;&#xA;If I wish to move North, the areaIndex would increment by one; likewise, to move South, the areaIndex would decrement by one. To move East would require the locationIndex to increment by one; West would decrement the locationIndex by one.&#xD;&#xA;&#xD;&#xA;The problem is that, while the code clearly states this in the Move(MoveDirection moveDir) method, nothing happens. &#xD;&#xA;&#xD;&#xA;I use the following code:&#xD;&#xA;&#xD;&#xA;    public static class Program&#xD;&#xA;    	{&#xD;&#xA;    		static void Main(string[] args)&#xD;&#xA;    		{&#xD;&#xA;    			&#xD;&#xA;    			Character johnDoe = new Npc(&quot;ID01&quot;);&#xD;&#xA;    			&#xD;&#xA;    			johnDoe.MoveCharacter(MoveDirection.North);&#xD;&#xA;    			johnDoe.MoveCharacter(MoveDirection.North);&#xD;&#xA;    			johnDoe.MoveCharacter(MoveDirection.West);&#xD;&#xA;                        johnDoe.MoveCharacter(MoveDirection.East);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;To provide this output:&#xD;&#xA;&#xD;&#xA;    John Doe has moved North from Area 0, Location: 0 to Area 1, Location: 3&#xD;&#xA;    John Doe has moved North from Area 1, Location: 3 to Area 2, Location: 6&#xD;&#xA;    John Doe has moved West from Area 2, Location: 6 to Area 2, Location: 6&#xD;&#xA;    John Doe has moved East from Area 2, Location: 6 to Area 2, Location: 7&#xD;&#xA;&#xD;&#xA;The third line indicates the west movement. To further clarify the issue, John Doe should be moving from Area 2, Location: 6 to Area 2, Location 5. Yet, it doesn't. Thus, my main question is, why isn't this working properly? I have tried a number of different solutions, most of them revolving around using multidimensional and jagged arrays. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36818" PostHistoryTypeId="4" PostId="15988" RevisionGUID="38c08de5-e66f-4378-955f-3804f4900d24" CreationDate="2011-08-15T22:15:09.367" UserId="3505" Comment="Rollback to the actual question." Text="Player Move Algorithm" />
  <row Id="36819" PostHistoryTypeId="24" PostId="15988" RevisionGUID="38c08de5-e66f-4378-955f-3804f4900d24" CreationDate="2011-08-15T22:15:09.367" Comment="Proposed by 3505 approved by 51 edit id of 647" />
  <row Id="36820" PostHistoryTypeId="10" PostId="15988" RevisionGUID="f477618f-f017-47e2-b4bd-8186e4622a87" CreationDate="2011-08-15T22:16:27.257" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36821" PostHistoryTypeId="5" PostId="16032" RevisionGUID="d92558be-53fa-433b-8b01-e354252db032" CreationDate="2011-08-15T22:22:34.833" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [What tools are available for developing 2D games like Tetris or Angry Birds for Android?](http://gamedev.stackexchange.com/questions/14495/what-tools-are-available-for-developing-2d-games-like-tetris-or-angry-birds-for-a)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;Is it possible to build 2d games with a good GUI like cut the rope or angry birds by just using eclipse alone ??? If not, could someone pls suggest the tools i probably will need to build basic 2d games. I'm quite confused on this topic and haven't found much help yet. It would b nice if someone cud help me out. Thank you ! " />
  <row Id="36822" PostHistoryTypeId="10" PostId="16032" RevisionGUID="b73591ac-f55a-4c13-a8a4-3481e01ceb15" CreationDate="2011-08-15T22:22:34.133" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36823" PostHistoryTypeId="2" PostId="16052" RevisionGUID="1ce83faf-9261-41c7-b106-e727c75b3ee0" CreationDate="2011-08-15T22:24:30.603" UserId="101" Text="I swear I added this an answer to this question back closer to when it was originally asked...&#xD;&#xA;&#xD;&#xA;Check the &quot;max frames to render ahead&quot; setting in the NVIDIA Control Panel, or whatever the comparable setting in the AMD drivers is if using an AMD card.&#xD;&#xA;&#xD;&#xA;I believe it defaults to 3, which would correspond exactly to what PIX is showing you (the GPU is rendering 3 frames ahead of what it's currently displaying)." />
  <row Id="36824" PostHistoryTypeId="16" PostId="16014" RevisionGUID="82a5296f-7a92-4489-9959-1646022c5077" CreationDate="2011-08-15T22:30:24.720" UserId="51" />
  <row Id="36825" PostHistoryTypeId="16" PostId="16026" RevisionGUID="889e67fc-063d-4c8b-997a-3b2ae286261d" CreationDate="2011-08-15T22:30:24.720" UserId="51" />
  <row Id="36826" PostHistoryTypeId="16" PostId="16028" RevisionGUID="b328a643-d4a6-4be0-943f-fcbf454d3cbc" CreationDate="2011-08-15T22:30:24.720" UserId="51" />
  <row Id="36827" PostHistoryTypeId="25" PostId="16034" RevisionGUID="8dc44100-a8c5-4dcf-9586-9f4f3e0717d5" CreationDate="2011-08-15T22:37:16.437" Comment="http://twitter.com/#!/StackGameDev/status/103233824158265344" />
  <row Id="36828" PostHistoryTypeId="11" PostId="15988" RevisionGUID="f7caccfe-716f-43b1-9d2e-9840be3991e7" CreationDate="2011-08-15T22:41:57.283" UserId="51" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="36829" PostHistoryTypeId="5" PostId="11932" RevisionGUID="61c4cc82-1cec-440a-835f-6418a418f13f" CreationDate="2011-08-15T22:42:43.633" UserId="744" Comment="added 1 characters in body; edited title" Text="When my application goes into a fullscreen state my movement is not smooth. It seems like frames are not rendered in the correct order, doing something like: 1, 3, 2, 4, 6, 5, ...&#xD;&#xA;making the movement flicker.&#xD;&#xA;&#xD;&#xA;For my PIX test, I draw really a low number of primitives (1140 triangle exactly) inside six vertex / index buffers. I clearly see a difference in the GPU frame &quot;ordering&quot; in PIX. Here is the result when in windowed mode:&#xD;&#xA;&#xD;&#xA;![PIX screenshot1][1]&#xD;&#xA;&#xD;&#xA;You can see that the GPU time needed for the frame is nearly in sync with the CPU time needed to generate it.&#xD;&#xA;&#xD;&#xA;But in the fullscreen state here is what I got (same scene, without camera movement):&#xD;&#xA;&#xD;&#xA;![PIX screenshot2][3]&#xD;&#xA;&#xD;&#xA;You can see that each GPU frame processing is split into at least two parts, and the GPU doesn't wait the end of a frame before starting another one.&#xD;&#xA;&#xD;&#xA;What could cause this?&#xD;&#xA;&#xD;&#xA;  [1]: http://www.s33m3.be/PIX/PIX2.png&#xD;&#xA;  [3]: http://www.s33m3.be/PIX/PIX.png" />
  <row Id="36830" PostHistoryTypeId="4" PostId="11932" RevisionGUID="61c4cc82-1cec-440a-835f-6418a418f13f" CreationDate="2011-08-15T22:42:43.633" UserId="744" Comment="added 1 characters in body; edited title" Text="Why does PIX suggest my frames are rendering out of order?" />
  <row Id="36831" PostHistoryTypeId="5" PostId="16013" RevisionGUID="ca4fd9b4-3578-42ff-af6e-a393d0a16577" CreationDate="2011-08-15T22:46:15.547" UserId="6588" Comment="deleted 312 characters in body" Text="Because of this:&#xD;&#xA;&#xD;&#xA;    if (locationIndex &gt; MAX_EAST_WEST_INDEX || locationIndex &lt; MIN_INDEX)&#xD;&#xA;    {&#xD;&#xA;      locationIndex = 0;&#xD;&#xA;    }" />
  <row Id="36832" PostHistoryTypeId="4" PostId="15988" RevisionGUID="1e5492c9-2dbf-4ff0-8091-a3dbe5b1692a" CreationDate="2011-08-15T22:52:13.030" UserId="51" Comment="made the title a question" Text="Why isn't my player movement code working properly?" />
  <row Id="36833" PostHistoryTypeId="2" PostId="16053" RevisionGUID="03934426-c868-4873-95d1-f4fa445d5144" CreationDate="2011-08-16T00:24:00.683" UserId="7328" Text="I've checked intelisence and googled for it but it seems there is no 3x3 matrix in xna. I'm just wondering should I just write a matrix class for xna to work freely with matrix class? &#xD;&#xA;&#xD;&#xA;by the way I'm trying to multiply vector3 into 3x3 matrix to have both rotation and transformation in one matrix class." />
  <row Id="36834" PostHistoryTypeId="1" PostId="16053" RevisionGUID="03934426-c868-4873-95d1-f4fa445d5144" CreationDate="2011-08-16T00:24:00.683" UserId="7328" Text="does XNA have 3x3 matrix?" />
  <row Id="36835" PostHistoryTypeId="3" PostId="16053" RevisionGUID="03934426-c868-4873-95d1-f4fa445d5144" CreationDate="2011-08-16T00:24:00.683" UserId="7328" Text="&lt;xna&gt;" />
  <row Id="36836" PostHistoryTypeId="5" PostId="16041" RevisionGUID="c86ae7be-0a27-4895-95df-cd1623185ec9" CreationDate="2011-08-16T00:37:07.323" UserId="6558" Comment="added more detail" Text="App development for Google+ looks to be similar to app development for Facebook.  That is to say, you will likely be able to use any language or platform that allows the game to be played in a browser, and you will interface with the API via RESTful style requests (basically making an HTTP call to something like api.plus.google.com)&#xD;&#xA;&#xD;&#xA;My guess is that this will mostly translate to a lot of people using Flash, Unity, and HTML5/Javascript.&#xD;&#xA;&#xD;&#xA;To add more to this, since I can now check what various games are using: Angry Birds is using HTML5/Javascript (most likely the same one they're using for Google Chrome's app store).  City of Wonder is using Flash.  Those are the only games I really bothered looking at, but it's enough proof that multiple languages are possible." />
  <row Id="36837" PostHistoryTypeId="25" PostId="16045" RevisionGUID="90f72e4d-5e56-4e7f-8a89-f833cbe02d21" CreationDate="2011-08-16T00:37:17.707" Comment="http://twitter.com/#!/StackGameDev/status/103264029073620993" />
  <row Id="36838" PostHistoryTypeId="2" PostId="16054" RevisionGUID="df875bac-51f3-4f6e-b8c0-7f55e9571d42" CreationDate="2011-08-16T00:46:32.843" UserId="2232" Text="Let's say you have an n-by-m grid. Some squares are occupied, some are not.&#xD;&#xA;&#xD;&#xA;You want to know where in the grid you can fit arbitrary shapes such as to not hit an occupied square. The shapes would variable, and could be x-by-y rectangles, trapezoidal-ish shapes, etc.&#xD;&#xA;&#xD;&#xA;Are there algorithmic approaches to this?" />
  <row Id="36839" PostHistoryTypeId="1" PostId="16054" RevisionGUID="df875bac-51f3-4f6e-b8c0-7f55e9571d42" CreationDate="2011-08-16T00:46:32.843" UserId="2232" Text="Algortihm to fit shapes to 2D grid?" />
  <row Id="36840" PostHistoryTypeId="3" PostId="16054" RevisionGUID="df875bac-51f3-4f6e-b8c0-7f55e9571d42" CreationDate="2011-08-16T00:46:32.843" UserId="2232" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;grid&gt;" />
  <row Id="36841" PostHistoryTypeId="4" PostId="16054" RevisionGUID="8d65abdc-3ad2-4b52-b681-ef9936095b59" CreationDate="2011-08-16T01:25:15.513" UserId="51" Comment="edited title" Text="Algorithm to fit shapes to 2D grid?" />
  <row Id="36842" PostHistoryTypeId="2" PostId="16055" RevisionGUID="fbf06972-b771-420d-9352-360f04e9d5ca" CreationDate="2011-08-16T02:01:20.010" UserId="9296" Text="Just started and after pondering with registered users' table everything came to a halt.&#xD;&#xA;&#xD;&#xA;So far:&#xD;&#xA;table name: tblUsers&#xD;&#xA;columns: userID(primaryKey), username, password(hashed), accountStatus(0=not activated, 1=activated, 2=suspended)&#xD;&#xA;&#xD;&#xA;Still haven't decided on each of the field's data type. But the question is: should I have one big massive table for all the cards or split them into say tblCreatures, tblSpells, tblTraps, tblQuests tables? &#xD;&#xA;&#xD;&#xA;Plus, for example, some of the creatures have special abilities besides the usual strength and health stats. So I assume if there was tblCreatures, it would have  cardTitle, cardStrength, cardHealth, cardDescription and then it would have cardAbility0...4, because I doubt that a single creature card can have more than 2 abilities? &#xD;&#xA;&#xD;&#xA;Also how would I contain each user's decks? A single user for example can have up to 10 decks created by themselves, which will be saved on the server.&#xD;&#xA;&#xD;&#xA;Any suggestions/remarks?&#xD;&#xA;&#xD;&#xA;The project will either be purely written(both client and server) in C# and XNA4, or maybe in the future the client will be ported to Flash+AS3 while server will be done in C#." />
  <row Id="36843" PostHistoryTypeId="1" PostId="16055" RevisionGUID="fbf06972-b771-420d-9352-360f04e9d5ca" CreationDate="2011-08-16T02:01:20.010" UserId="9296" Text="Database structure for a TCG video game" />
  <row Id="36844" PostHistoryTypeId="3" PostId="16055" RevisionGUID="fbf06972-b771-420d-9352-360f04e9d5ca" CreationDate="2011-08-16T02:01:20.010" UserId="9296" Text="&lt;xna&gt;&lt;c#&gt;&lt;design-patterns&gt;&lt;databases&gt;" />
  <row Id="36845" PostHistoryTypeId="2" PostId="16056" RevisionGUID="c5bc1160-7efb-45ce-89f8-15c99328fa4b" CreationDate="2011-08-16T02:02:39.353" UserId="853" Text="I've recently purchased the Orange book( GLSL ) and am wondering if it is important at all to read through the red and blue books as well? &#xD;&#xA;&#xD;&#xA;Any thoughts?" />
  <row Id="36846" PostHistoryTypeId="1" PostId="16056" RevisionGUID="c5bc1160-7efb-45ce-89f8-15c99328fa4b" CreationDate="2011-08-16T02:02:39.353" UserId="853" Text="Learning OpenGL: Red and Blue book still relevant?" />
  <row Id="36847" PostHistoryTypeId="3" PostId="16056" RevisionGUID="c5bc1160-7efb-45ce-89f8-15c99328fa4b" CreationDate="2011-08-16T02:02:39.353" UserId="853" Text="&lt;opengl&gt;" />
  <row Id="36848" PostHistoryTypeId="2" PostId="16057" RevisionGUID="d583111c-8c46-491b-aec6-b4501319729f" CreationDate="2011-08-16T02:17:38.443" UserId="288" Text="XNA has a 4x4 `Matrix` class (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.matrix.aspx&quot;&gt;MSDN&lt;/a&gt;) which can be used everywhere that you might use a 3x3 matrix (just leave the last row/column as their identity values). In most cases you should just use that. The only benefit of writing your own 3x3 matrix is if you need the smaller data structure (36 bytes instead of 64).&#xD;&#xA;&#xD;&#xA;If you intend to apply *translation* transformations to your 3D vector, then you *need* a 4x4 matrix. The vector implicitly has a fourth element that is equal to 1. Without going through the maths - this allows it to multiply in the translation elements of the matrix. (&lt;a href=&quot;http://en.wikipedia.org/wiki/Translation_matrix&quot;&gt;Details on Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Transformation_matrix&quot;&gt;see also&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;Matrices can be multiplied together to combine multiple transformation operations into a single matrix. For example:&#xD;&#xA;&#xD;&#xA;    Matrix transform = Matrix.CreateScale(2f)&#xD;&#xA;            * Matrix.CreateRotationZ(1f)&#xD;&#xA;            * Matrix.CreateTranslation(10f, 10f, 10f);" />
  <row Id="36849" PostHistoryTypeId="2" PostId="16058" RevisionGUID="2a4e8b7a-2eb5-4163-b090-4507843d3d45" CreationDate="2011-08-16T02:41:12.137" UserId="288" Text="There are a few ways to bring in external files. They all revolve around the `ContentProcessorContext` object (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.content.pipeline.contentprocessorcontext_members.aspx&quot;&gt;MSDN&lt;/a&gt;) that you get as a parameter in both `ContentImporter.Import` and `ContentProcessor.Process` (so you can bring in external files from both importers and processors).&#xD;&#xA;&#xD;&#xA;The one you probably want is `AddDependency`, which signals to the content pipeline that your main content file is bringing in an external file. Then you just load your `pet.material` file as a normal file and process it as you see fit. All this does is let the content pipeline know to check if `pet.material` has changed, when it needs to check what content needs rebuilding.&#xD;&#xA;&#xD;&#xA;If, however, your `pet.material` might be shared between multiple meshes (including when it is loaded into a shared data structure that multiple meshes might reference), then you might want to use `BuildAsset` or `BuildAndLoadAsset`. The data structures a somewhat complicated (you have to figure out how to use `ExternalReference`), but then the pipeline will create a separate output XNB file for `pet.material`, and `ContentManager` will automatically load it for you when required, and share that instance around any meshes that need it." />
  <row Id="36850" PostHistoryTypeId="5" PostId="16053" RevisionGUID="2a4068b1-2742-4ada-b8a9-575dc30ab9b7" CreationDate="2011-08-16T02:53:43.937" UserId="7328" Comment="deleted 3 characters in body" Text="I've checked intelisence and googled for it but it seems there is no 3x3 matrix in xna. I'm just wondering should I just write a matrix class for xna to work freely with matrix class? &#xD;&#xA;&#xD;&#xA;by the way I'm trying to multiply vector3 into 3x3 matrix to have both rotation and translation in one matrix class." />
  <row Id="36851" PostHistoryTypeId="2" PostId="16059" RevisionGUID="7fda84a9-3f6b-4d2c-a778-8d7b14b2875e" CreationDate="2011-08-16T03:12:47.160" UserId="9033" Text="I'm not familiar with TGC.  I assume you trade cards and each card can be categorized into one of four types: tblCreatures, tblSpells, tblTraps, tblQuests&#xD;&#xA;&#xD;&#xA;If the four types are very unrelated, then I would split them into four tables, so you can manage each type independently, much like you outlined your tblCreatues.  You would need to add a cardID to each of these four tables, and this ID should be unique amongst the four tables (don't use the same ID in more than one table).&#xD;&#xA;&#xD;&#xA;You would need a tblDeck, such as:&#xD;&#xA;&#xD;&#xA; - deckID &#xD;&#xA; - cardType &#xD;&#xA; - cardID&#xD;&#xA;&#xD;&#xA;'cardType' would tell you which of the four card type tables to search in.&#xD;&#xA;'cardID' would be the index into that table.&#xD;&#xA;('cardID' doesn't NEED to be unique like I mentioned above, but it would make things cleaner IMO)&#xD;&#xA;&#xD;&#xA;I'd keep your tblUsers much like you outlined, with a unique userID.&#xD;&#xA;&#xD;&#xA;Lastly, each user can have multiple decks, so you need a new table to join the two:&#xD;&#xA;tblUserDeck:&#xD;&#xA;&#xD;&#xA; - userID&#xD;&#xA; - deckID" />
  <row Id="36852" PostHistoryTypeId="2" PostId="16060" RevisionGUID="7cc66b65-a73b-4866-9b3a-8d63f206748e" CreationDate="2011-08-16T03:15:15.540" UserId="2749" Text="I'm working on my first XNA 2D game (overhead view), and I'm pondering how to manage the difference in position on screen vs. the position of a sprite on a global map.&#xD;&#xA;&#xD;&#xA;The solution I'm currently thinking about is having the map keep track of everything on it, the player, other sprites, etc. The sprites will know where they are on the map, and when `.Draw()` is called on the map it will delegate drawing items to the items themselves, but pass a position to draw on the screen. For instance, something akin to the following:&#xD;&#xA;&#xD;&#xA;    class Map {&#xD;&#xA;        Vector2D ScreenCenter;&#xD;&#xA;        List&lt;DrawableItem&gt; Content;&#xD;&#xA;&#xD;&#xA;        void Draw(GameTime gameTime) {&#xD;&#xA;            foreach (var i in Content) { &#xD;&#xA;                i.Draw(spriteBatch, i.Position - ScreenCenter);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class DrawableItem {&#xD;&#xA;        Vector2D Position;&#xD;&#xA;&#xD;&#xA;        void Draw(SpriteBatch spriteBatch, Vector2D screenPosition) {&#xD;&#xA;            // Draw ourselves at screenPosition&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Is there some better way of doing this? Or am I on the right sort of track here?" />
  <row Id="36853" PostHistoryTypeId="1" PostId="16060" RevisionGUID="7cc66b65-a73b-4866-9b3a-8d63f206748e" CreationDate="2011-08-16T03:15:15.540" UserId="2749" Text="How to track position on a map vs position on screen with XNA 4.0?" />
  <row Id="36854" PostHistoryTypeId="3" PostId="16060" RevisionGUID="7cc66b65-a73b-4866-9b3a-8d63f206748e" CreationDate="2011-08-16T03:15:15.540" UserId="2749" Text="&lt;xna&gt;&lt;xna-4.0&gt;" />
  <row Id="36855" PostHistoryTypeId="2" PostId="16061" RevisionGUID="1165222e-020d-4a7c-9f05-7f9fe010f1ae" CreationDate="2011-08-16T03:31:48.970" UserId="5060" Text="I think the best way to do this is to use a `Camera` class which has conversion methods that allow you to convert from &quot;World Coordinates&quot; (which are the pixel/tile coordinates of your map) to &quot;Screen Coordinates&quot; (which are the pixels shown on screen). The `Camera` has a `Location` property which is in `World Coordinates` and allows the `Camera` object to figure out what to draw within the `Screen Coordinates`.&#xD;&#xA;&#xD;&#xA;This has the added benefit of allowing you to move the `Camera` independently from sprites/characters on the screen.&#xD;&#xA;&#xD;&#xA;There's a really good [tutorial series](http://xnaresources.com/default.asp?page=TUTORIALS) on xnaresources.com that goes through designing a tile engine that uses a camera class. I highly recommend it.&#xD;&#xA;&#xD;&#xA;I've also gone on with the `Camera` class to make it utilize an interface called `ICameraTarget` (which just defines an `X` and `Y` coordinate for the target, in `World Coordinates`). I implement the interface on my player characters so that it will lock on a player and update itself automatically to their location during the game loop." />
  <row Id="36856" PostHistoryTypeId="2" PostId="16062" RevisionGUID="4d4f003c-fd81-45bc-9145-6cec944997fe" CreationDate="2011-08-16T03:32:36.523" UserId="9256" Text="I have a tile based game that is in a semi-isometric view created by a transformation. The tiles are created by a Texture2d rendered on a 3d surface.&#xD;&#xA;&#xD;&#xA;Map Image: http://balancedcms.com/Capture.PNG&#xD;&#xA;&#xD;&#xA;I am using the following code for transformation:&#xD;&#xA;&#xD;&#xA;    View = Matrix.CreateLookAt(new Vector3(0, -1.1f, 1.6f), new Vector3(0, 0, 0), new Vector3(0, 53, 0));&#xD;&#xA;    Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.Pi - 2.4f, 4.0f / 3.0f, 1, 500);&#xD;&#xA;&#xD;&#xA;    quadEffect = new BasicEffect(device);&#xD;&#xA;&#xD;&#xA;    quadEffect.World = Matrix.Identity;&#xD;&#xA;    quadEffect.View = View;&#xD;&#xA;    quadEffect.Projection = Projection;&#xD;&#xA;    quadEffect.TextureEnabled = true;&#xD;&#xA;&#xD;&#xA;    quad = new Quad(new Vector3(0, 0, 0), Vector3.Backward, Vector3.Up, 3, 3);&#xD;&#xA;&#xD;&#xA;My problem comes along when I attempt to get the current tile that I am hovering the mouse over. I have a mouse X and Y however I can't seem to figure out how to transform these screen coordinates into a tile X and Y. The tiles are 128px by 128px; however, after the camera transformation they are smaller on the top and larger on the bottom(to create the isometric view)&#xD;&#xA;&#xD;&#xA;I've tried transforming the mouse X and Y with the same projection matrix. However, this didn't work. I think it is due to the view matrix not being taken into account... sample below:&#xD;&#xA;&#xD;&#xA;Vector3.Transform(new Vector3(Mouse.GetState().X, Mouse.GetState().Y, 0), Projection);&#xD;&#xA;&#xD;&#xA;This image may provide more information... is also shows the hours I've put into figuring this out: http://balancedcms.com/1111.png&#xD;&#xA;" />
  <row Id="36857" PostHistoryTypeId="1" PostId="16062" RevisionGUID="4d4f003c-fd81-45bc-9145-6cec944997fe" CreationDate="2011-08-16T03:32:36.523" UserId="9256" Text="XNA Tile from Screen Location" />
  <row Id="36858" PostHistoryTypeId="3" PostId="16062" RevisionGUID="4d4f003c-fd81-45bc-9145-6cec944997fe" CreationDate="2011-08-16T03:32:36.523" UserId="9256" Text="&lt;xna&gt;" />
  <row Id="36859" PostHistoryTypeId="25" PostId="16060" RevisionGUID="e3577875-0dfc-4613-ba00-422f0ee00a02" CreationDate="2011-08-16T03:37:17.620" Comment="http://twitter.com/#!/StackGameDev/status/103309326327885824" />
  <row Id="36860" PostHistoryTypeId="5" PostId="16061" RevisionGUID="52a88a88-f195-4c7b-8c32-8769f1ac0645" CreationDate="2011-08-16T03:42:46.007" UserId="5060" Comment="Elaborated a bit more." Text="I think the best way to do this is to use a `Camera` class which has conversion methods that allow you to convert from &quot;World Coordinates&quot; (which are the pixel/tile coordinates of your map) to &quot;Screen Coordinates&quot; (which are the pixels shown on screen). The `Camera` has a `Location` property (`Vector2`) which is in `World Coordinates` and allows the `Camera` object to figure out what to draw within the `Screen Coordinates`.&#xD;&#xA;&#xD;&#xA;This has the added benefit of allowing you to move the `Camera` independently from sprites/characters on the screen.&#xD;&#xA;&#xD;&#xA;There's a really good [tutorial series](http://xnaresources.com/default.asp?page=TUTORIALS) on xnaresources.com that goes through designing a tile engine that uses a camera class. I highly recommend it.&#xD;&#xA;&#xD;&#xA;I've also gone on with the `Camera` class to make it utilize an interface called `ICameraTarget` (which just defines an `X` and `Y` coordinate for the target, in `World Coordinates`). I implement the interface on my player characters so that it will lock on a player and update itself automatically to their location during the game loop.&#xD;&#xA;&#xD;&#xA;*Edit*  &#xD;&#xA;To elaborate a bit more: in my game, the map is in tiles, so every player, item, etc has a tile coordinate and an offset (how far off the tile they are, used for when they are moving across tiles). The `Camera` class has a function that I use in my `.Draw()` that is called `WorldTileToScreen(int tileX, int tileY)`. This returns a `Point()` or `Vector2()` (I use point, but it's up to you). This takes the player's (/item's/etc.) X/Y values (in tiles) and multiplies them by the width and height of the map's tiles in pixels (respectively). It then subtracts the `Camera`'s `Location` property (which is an X/Y value) from that to find the object's `Screen Coordinates`. Then, I add the object's offset to those values to that to get the position to draw the object on screen." />
  <row Id="36861" PostHistoryTypeId="5" PostId="16061" RevisionGUID="9ee59718-5f40-4196-9d8b-4f4fead9cdfc" CreationDate="2011-08-16T03:56:56.170" UserId="5060" Comment="Just added something to make it more clear." Text="I think the best way to do this is to use a `Camera` class which has conversion methods that allow you to convert from &quot;World Coordinates&quot; (which are the pixel/tile coordinates of your map) to &quot;Screen Coordinates&quot; (which are the pixels shown on screen). The `Camera` has a `Location` property (`Vector2`) which is in `World Coordinates` and allows the `Camera` object to figure out what to draw within the `Screen Coordinates`.&#xD;&#xA;&#xD;&#xA;This has the added benefit of allowing you to move the `Camera` independently from sprites/characters on the screen.&#xD;&#xA;&#xD;&#xA;There's a really good [tutorial series](http://xnaresources.com/default.asp?page=TUTORIALS) on xnaresources.com that goes through designing a tile engine that uses a camera class. I highly recommend it.&#xD;&#xA;&#xD;&#xA;I've also gone on with the `Camera` class to make it utilize an interface called `ICameraTarget` (which just defines an `X` and `Y` coordinate for the target, in `World Coordinates`). I implement the interface on my player characters so that it will lock on a player and update itself automatically to their location during the game loop.&#xD;&#xA;&#xD;&#xA;*Edit*  &#xD;&#xA;To elaborate a bit more: in my game, the map is in tiles, so every player, item, etc has a tile coordinate and an offset (how far off the tile they are in pixels, used for when they are moving across tiles). The `Camera` class has a function that I use in my `.Draw()` that is called `WorldTileToScreen(int tileX, int tileY)`. This returns a `Point()` or `Vector2()` (I use point, but it's up to you). This takes the player's (/item's/etc.) X/Y values (in tiles) and multiplies them by the width and height of the map's tiles in pixels (respectively). It then subtracts the `Camera`'s `Location` property (which is an X/Y value) from that to find the object's `Screen Coordinates`. Then, I add the object's offset to those values to that to get the position to draw the object on screen." />
  <row Id="36862" PostHistoryTypeId="2" PostId="16063" RevisionGUID="403d4eb4-2798-407a-b3f2-45dbccbd3cce" CreationDate="2011-08-16T04:48:07.430" UserId="168" Text="These lines work (compile fine):&#xD;&#xA;&#xD;&#xA;	float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);&#xD;&#xA;	input.Position.xyzw += float4(0, 1, 0, 0);&#xD;&#xA;&#xD;&#xA;These do not (any use of offset together with input/output Position causes the error):&#xD;&#xA;&#xD;&#xA;	float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);&#xD;&#xA;	input.Position.xyzw += offset;&#xD;&#xA;&#xD;&#xA;Debug output:&#xD;&#xA;&#xD;&#xA;    (32,9): error X4532: cannot map expression to vs_5_0 instruction set&#xD;&#xA;    (62,19): There was an error compiling expression&#xD;&#xA;    (49): Error compiling effect hr=S_OK (0x00000000)&#xD;&#xA;&#xD;&#xA;Anyone have an idea why?" />
  <row Id="36863" PostHistoryTypeId="1" PostId="16063" RevisionGUID="403d4eb4-2798-407a-b3f2-45dbccbd3cce" CreationDate="2011-08-16T04:48:07.430" UserId="168" Text="Why can't I add a float4 read from a Texture2D.Sample in the Vertex Shader" />
  <row Id="36864" PostHistoryTypeId="3" PostId="16063" RevisionGUID="403d4eb4-2798-407a-b3f2-45dbccbd3cce" CreationDate="2011-08-16T04:48:07.430" UserId="168" Text="&lt;textures&gt;&lt;hlsl&gt;&lt;heightmap&gt;" />
  <row Id="36865" PostHistoryTypeId="2" PostId="16064" RevisionGUID="2789f4fe-dfae-4e0a-82bd-03ea90e0da56" CreationDate="2011-08-16T05:01:01.870" UserId="3116" Text="I have an O3D mesh and I need to open it in Blender - but there seems to be no importer for O3D files. Is there some tool that can convert the mesh to a format that Blender *can* import?" />
  <row Id="36866" PostHistoryTypeId="1" PostId="16064" RevisionGUID="2789f4fe-dfae-4e0a-82bd-03ea90e0da56" CreationDate="2011-08-16T05:01:01.870" UserId="3116" Text="Tool to convert O3D mesh to a format that can be opened in Blender?" />
  <row Id="36867" PostHistoryTypeId="3" PostId="16064" RevisionGUID="2789f4fe-dfae-4e0a-82bd-03ea90e0da56" CreationDate="2011-08-16T05:01:01.870" UserId="3116" Text="&lt;3d-meshes&gt;&lt;blender&gt;" />
  <row Id="36868" PostHistoryTypeId="5" PostId="16063" RevisionGUID="b8f167a2-2be3-4dac-9533-268c6f4b438d" CreationDate="2011-08-16T05:18:59.407" UserId="168" Comment="added 361 characters in body" Text="These lines work (compile fine):&#xD;&#xA;&#xD;&#xA;	float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);&#xD;&#xA;	input.Position.xyzw += float4(0, 1, 0, 0);&#xD;&#xA;&#xD;&#xA;These do not (any use of offset together with input/output Position causes the error):&#xD;&#xA;&#xD;&#xA;	float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);&#xD;&#xA;	input.Position.xyzw += offset;&#xD;&#xA;&#xD;&#xA;No matter what I try to do to use the offset values to change the positions it breaks:&#xD;&#xA;&#xD;&#xA;	float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);&#xD;&#xA;	matrix&lt;float, 4, 4&gt; offs = {&#xD;&#xA;		1, 0, 0, 0,&#xD;&#xA;		0, 1, 0, 0,&#xD;&#xA;		0, 0, 1, 0,&#xD;&#xA;		offset.x, offset.y, offset.z, 1&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	output.Position = input.Position;&#xD;&#xA;	output.Position = mul(output.Position, offs);&#xD;&#xA;&#xD;&#xA;Debug output:&#xD;&#xA;&#xD;&#xA;    (32,9): error X4532: cannot map expression to vs_5_0 instruction set&#xD;&#xA;    (62,19): There was an error compiling expression&#xD;&#xA;    (49): Error compiling effect hr=S_OK (0x00000000)&#xD;&#xA;&#xD;&#xA;Anyone have an idea why?" />
  <row Id="36869" PostHistoryTypeId="2" PostId="16065" RevisionGUID="dcf80eff-d937-4fc9-8727-8f2d83955524" CreationDate="2011-08-16T05:27:33.383" UserId="9190" Text="One industry-sponsored study claims that only 22% of customers had a positive attitude toward social media advertising, and 8% of consumers abandoned an SNS (Social-networking sites) because of what they perceived as excessive advertising[1].&#xD;&#xA;&#xD;&#xA;Schlosser, Shavitt and Kanfer reached the conclusion that users who &quot;actively contribute content&quot; view online advertisements more negatively than users that only consume it.[2]&#xD;&#xA;&#xD;&#xA;Another study found that when SNA delivered content or impressions that provided entertainment or informational value, or offered social value, consumers appeared more likely to respond favorably toward the ad stimuli themselves. It also found that &quot;these results suggested that one prerequisite to more successful SNA execution would be for advertisers to create messages that provide some sort of explicit value to [...] users. And by a wide margin, the value that appeared most likely to be highly regarded by SNS users was entertainment&quot;.[3]&#xD;&#xA;&#xD;&#xA;Social Network Advertising is, still, a fairly new playground for researchers. I'll look into it some more later, computer access from where I am leaves much to be desired.&#xD;&#xA;&#xD;&#xA;[1]: AdReAction. “Brands + Consumers + Social Media: What Marketers Should Know About Who’s Getting Social and Why.” Dynamic Logic, January 26, 2010 [URL: http://www.dynamiclogic.com/na/research/industry_presentations/docs/DynamicLogic_AdReaction09_OMMASocial_26Jan2010.pdf ] -- Removed, but QuickView accessible at http://docs.google.com/viewer?a=v&amp;q=cache:trRMTon_4LMJ:www.dynamiclogic.com/na/research/industry_presentations/docs/DynamicLogic_AdReaction09_OMMASocial_26Jan2010.pdf+Brands+%2B+Consumers+%2B+Social+Media:+What+Marketers+Should+Know+About+Who%E2%80%99s+Getting+Social+and+Why.&amp;hl=en&amp;pid=bl&amp;srcid=ADGEEShjU13aNKo1iwBcY18M-q46ibn2IVU9yuTOycBYkO1-CFi1RbXUejlhd31UWNavQWXdTSVDUWuvpHSI89CqS_cZlJmhyHw2wt7UhY_cnZmzaDbsMjdbPvnrhkFn-wUAmzbv6B5Z&amp;sig=AHIEtbTG1BZyzd4Vlf_tsxLk3X-6af0tXg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[2]: Schlosser, A. E., S. Shavitt, and A. Kanfer. “Survey of Internet Users’ Attitudes toward Internet Advertising.” Journal of Interactive Marketing 13, 3 (1999): 34–54.&#xD;&#xA;&#xD;&#xA;[3]: Friends, Fans, and Followers: Do Ads Work on Social Networks?. (2011). Journal of Advertising Research, 51(1), 258-275. Retrieved from EBSCOhost." />
  <row Id="36870" PostHistoryTypeId="5" PostId="16003" RevisionGUID="9507f590-566d-4cfc-8e88-f7007152c5fb" CreationDate="2011-08-16T05:33:09.070" UserId="9190" Comment="deleted 2 characters in body" Text="Most MMOs these days have anything important done server-side, for safety reasons. You can't off-load much to the client, which is why one of the first things axed are AI routines. I think most developers consider client-side to be hackable as a rule, not an exception.&#xD;&#xA;&#xD;&#xA;Scalify's Badumna ( http://www.scalify.com/badumna.php ) tries to off-load part of it on the clients in that they'll have calculations done client-side and sent to each other; some data is also sent to an authorative peer to be validated before it's passed on to clients, just like a dedicated server. The issue is that ALL data in a multiplayer game MUST be sent through an authoritative peer if you want to prevent cheating. I brought up Badumna as it seemed the closest to what you might want, but even that won't be able to catch cheaters -- it might catch some, but anything critical (ie. everything, pretty much) has to be done server-side.&#xD;&#xA;&#xD;&#xA;I might expand some on Badumna, because it could still be something you'll find useful (but I urge you to reconsider off-loading anything important on the clients, because the clients WILL cheat).&#xD;&#xA;&#xD;&#xA;Badumna offers a hybrid architecture for data operations. It provides complete control to the developer in deciding what is critical (and must be verified) and what isn't (and so can be sent by the decentralized network). &#xD;&#xA;&#xD;&#xA;If an MMO requires that every single bit of information has to be verified then Badumna will function as a client-server solution. However, I believe that there are different categories of MMO applications with varying requirements. For example, quite often an MMO will have combat zones where players are likely to cheat and hence every bit of information has to be verified. However, there are also zones where players can only walk/run/dance/chat. Such zones do not require complete verification and can utilize Badumna's decentralized network and benefit from the scalability that it can offer. &#xD;&#xA;&#xD;&#xA;Secondly, Badumna provides additional security features that developers can access such as identity protection (so that users cannot pretend to be someone else), complaint proxy (allowing clients to be configured to report malicious/cheating players to a trusted source), and black listing (banning malicious players from the games).&#xD;&#xA;&#xD;&#xA;I've not really explored Badumna that much, so there migh be issues and features I'm unaware of, but at least I've given a cursory glance on it.&#xD;&#xA;&#xD;&#xA;tl;dr: the client should really just be a keyboard and mouse hooked up to the internet." />
  <row Id="36871" PostHistoryTypeId="2" PostId="16066" RevisionGUID="1a3b1c7a-c670-4a07-988b-8e411a6898f0" CreationDate="2011-08-16T05:42:05.013" UserId="8240" Text="GLSL is just the shading language. It doesn't deal with where vertex data comes from, where textures come from, fragment blending, depth testing, the viewport, framebuffer objects, etc. Shaders are important, but they're not everything.&#xD;&#xA;&#xD;&#xA;While I'm sure the Orange Book talks about these, as necessary for discussing GLSL, it doesn't go into the detail that other books would." />
  <row Id="36872" PostHistoryTypeId="2" PostId="16067" RevisionGUID="d0772911-e728-4ac9-9102-d77e0138367a" CreationDate="2011-08-16T06:14:39.490" UserId="8390" Text="You can use Viewport.UnProject with two source values:&#xD;&#xA;&#xD;&#xA;A(MouseX, MouseY, 0)&#xD;&#xA;B(MouseX, MouseY, 1)&#xD;&#xA;&#xD;&#xA;You will get the two unprojects points that can be used to get a ray, then you have to get the ray intersection with the plane where are the tiles.&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.viewport.unproject.aspx" />
  <row Id="36873" PostHistoryTypeId="2" PostId="16068" RevisionGUID="d6a7555c-33d7-45cc-a623-bcd9a80b7d1c" CreationDate="2011-08-16T06:17:43.977" UserId="168" Text="The problem is that you can't use a simple Sample() call in the vertex shader as it doesn't know what mipmap level to sample from, so the data coming back isn't really a float 4. In the pixel shader, you need to use:&#xD;&#xA;&#xD;&#xA;    float4 offset = HeightMap.SampleLevel(HeightSampler, input.Texcoord, 0);&#xD;&#xA;&#xD;&#xA;Changing to that worked perfectly.&#xD;&#xA;&#xD;&#xA;http://www.gamedev.net/topic/604632-texture2d-sample-in-hlsl/" />
  <row Id="36874" PostHistoryTypeId="25" PostId="16064" RevisionGUID="a417d20f-d95b-4bb8-a58b-ce968f65b859" CreationDate="2011-08-16T06:37:21.087" Comment="http://twitter.com/#!/StackGameDev/status/103354640711684096" />
  <row Id="36875" PostHistoryTypeId="5" PostId="16004" RevisionGUID="e42a4359-7f6c-4ee6-b4d6-d6bcd3a99d5f" CreationDate="2011-08-16T06:40:51.737" UserId="9299" Comment="updated to clarify" Text="My game involves a level with deformable terrain and units that can travel in any direction but are slowed down by uneven terrain. Normal A-star should work fine in most cases, except on flat land where no matter how the general purpose pathfinder worked it would not send units on a direct path. Theta-star would work if the entire level was fairly flat, but would be much slower if it initially had to take uneven terrain into account.&#xD;&#xA;&#xD;&#xA;I think a Manhattan-distance base A-star algorithm would be fast and give a good enough hint to allow other path finding or steering algorithms to take over, but I'm not sure what type of algorithm to use to look ahead and decide when to abandon the path, take a more direct route, and where to jump back on the path later.&#xD;&#xA;&#xD;&#xA;(Theta-star seems like it would be too inefficient if it was adjusted to take things like slopes, obstacles, or roads into account. See the solution proposed to the comment about avoiding minefields at: http://aigamedev.com/open/tutorials/theta-star-any-angle-paths/ )&#xD;&#xA;&#xD;&#xA;Edit: I did not mention that I already implemented and tested A-star on a similar grid. (I think I accidentally deleted something in this question.) Some of the more obvious cost/heuristic functions I considered just don't result in realistic paths on a grid when an obstacle blocks the most direct path (basically when path-finding is useful) ([example pictures](http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S7)). The change to the cost function used by the Theta-star algorithm seems like an ideal solution (considering the constraint of using a grid), but it makes the assumption that tiles have the same travel costs (and it takes much longer).&#xD;&#xA;&#xD;&#xA;My original reasoning behind using Manhattan distance was to outsource the &quot;corner cutting&quot; algorithm from the path-finding algorithm, since it was more important to have a fast path-finding algorithm in case the obstacle layout or terrain changed. It makes more sense to do the &quot;corner cutting&quot; algorithm once when the unit arrives than on every permutation of every search of path-finding algorithm (the results of which may end up being scrapped anyway.) A four-neighbor search with Manhattan distance is also interesting because you can see boxes of alternate paths and identify right triangles formed by the original path and the shortest path.&#xD;&#xA;&#xD;&#xA;A better question would have been &quot;What is a fast way to identify shortcuts in a path with 90 degree turns?&quot;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36876" PostHistoryTypeId="24" PostId="16004" RevisionGUID="e42a4359-7f6c-4ee6-b4d6-d6bcd3a99d5f" CreationDate="2011-08-16T06:40:51.737" Comment="Proposed by 9299 approved by 1430 edit id of 648" />
  <row Id="36877" PostHistoryTypeId="5" PostId="16058" RevisionGUID="8e887d6c-9eb1-483b-a5ae-4981995ef394" CreationDate="2011-08-16T06:48:40.297" UserId="288" Comment="added 274 characters in body" Text="There are a few ways to bring in external files. In `ContentImporter.Import` you get a `ContentImporterContext` (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb195420.aspx&quot;&gt;MSDN&lt;/a&gt;) as a parameter. In `ContentProcessor.Process` you get a `ContentProcessorContext` (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb195445.aspx&quot;&gt;MSDN&lt;/a&gt;). &#xD;&#xA;&#xD;&#xA;Both of these context objects have an **`AddDependency`** method. This signals to the content pipeline that your content importer/processor is bringing in another file. From that point you simply load yout `pet.material` file like you would any file (eg: using `System.IO.File`).&#xD;&#xA;&#xD;&#xA;All this does is signal to the content pipeline that another file is being used in the build, and that subsequent changes to that file should (like the main file) cause the content that depend on that file to be rebuilt.&#xD;&#xA;&#xD;&#xA;The remaining methods are only available in the content processor:&#xD;&#xA;&#xD;&#xA;If `pet.material` is something that the content pipeline knows how to import and process, you can use **`BuildAndLoadAsset`** to load it through the content pipeline. The loaded content can then be embedded in your output content object.&#xD;&#xA;&#xD;&#xA;If, however, your `pet.material` might be shared between multiple meshes at runtime, then you might want to use **`BuildAsset`**. The data structures you need to create are somewhat complicated (you need to use `ExternalReference` at build time), but then the pipeline will create a separate output XNB file for `pet.material`, and `ContentManager` will automatically load it for you when required, and share that instance around any meshes that need it." />
  <row Id="36878" PostHistoryTypeId="2" PostId="16069" RevisionGUID="76907058-149b-4a11-aadc-7e2322b99ab0" CreationDate="2011-08-16T08:21:33.023" UserId="1352" Text="It seems like the last version of the blue book is from 2007(Open GL 2.1) and the last version of the red book is from 2009 (Open GL 3.0 - 3.1). &#xD;&#xA;&#xD;&#xA;The current version of Open GL is 4.1&#xD;&#xA;&#xD;&#xA;I would try getting my hands on something newer, although knowing legacy Open GL might be useful if you're going to read and maintain old open gl code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="36881" PostHistoryTypeId="25" PostId="550" RevisionGUID="63d76133-b357-47df-a47d-88bd49b3635f" CreationDate="2011-08-16T09:37:22.047" Comment="http://twitter.com/#!/StackGameDev/status/103399941271060480" />
  <row Id="36882" PostHistoryTypeId="2" PostId="16070" RevisionGUID="3524f55e-bcfb-4357-a070-551c5c20aedd" CreationDate="2011-08-16T10:33:10.487" UserId="5473" Text="This is better known as the Packing Problem.&#xD;&#xA;&#xD;&#xA;Here are your options:&#xD;&#xA;&#xD;&#xA; - Brute force it as Tetrad has mentioned. This can be aided by doing a pre-evaluation of existing space in your world grid, so as to find maximal axis-aligned bounding boxes. [This article][1] should give you some insight into how one developer applied solutions to the Packing Problem, in regards to packing arbitrarily-sized sprites into a spritesheet.&#xD;&#xA; - Use a more physically-based approach the Packing Problem; this requires a non-integer grid since you are doing geometric ops here. Do as follows: Create a tiny (&quot;infinitesimal&quot;) cell. Randomize to try to place it at arbitrary locations (not only on integer values of your grid, but literally anywhere in the floating point space) until you hit an open space. Now grow your cell along each axis, by a small amount. If it is now overlapping a solid cell eg. on the left side, you retract the expansion on that side, and push it out on the opposite side instead (same applies vice versa and for top/bottom).eventually you will get to a point where you cannot expand it anymore in any direction. That's when you have a maximised cell. Detecting whether you are overlapping on any side requires really basic AABB overlap logic; since everything is axis-aligned, there is not even any trig to handle.&#xD;&#xA;&#xD;&#xA;The second &quot;continuous&quot; approach might seem cooler / more organic, and it may in some ways be  easier to handle than the large amounts of logic you might have to write for &quot;discrete&quot; Packing Problem solutions (as in the article above). But remember that for each subsequent AABB that you &quot;grow&quot; this way to it's maximal size, you will be doing a haphazard, randomised placement -- which may eventually end up being much slower than brute-forcing, as your grid fills up. It will depend on the sparseness of your grid, i.e. the average proportion of filled vs empty cells." />
  <row Id="36883" PostHistoryTypeId="5" PostId="16070" RevisionGUID="6fa7673a-cd16-4853-b09e-6a8b5c633790" CreationDate="2011-08-16T10:40:36.550" UserId="5473" Comment="deleted 280 characters in body" Text="This is better known as the Packing Problem.&#xD;&#xA;&#xD;&#xA;Here are your options:&#xD;&#xA;&#xD;&#xA; - Brute force it as Tetrad has mentioned. This can be aided by doing a pre-evaluation of existing space in your world grid, so as to find maximal axis-aligned bounding boxes. [This article][1] should give you some insight into how one developer applied solutions to the Packing Problem, in regards to packing arbitrarily-sized sprites into a spritesheet.&#xD;&#xA; - Use a more physically-based approach to the Packing Problem; I call this &quot;Place-and-Grow&quot; for lack of having seen a better term elsewhere. Select a single pixel/cell of your bitmap/source grid to place -- I would start with the centremost pixel. Randomly pick a position in your bacgkround bitmap / destination grid, to place it on. Keep randomising till you find an open space (this process can be optimised in other ways). If it is now overlapping a solid pixel eg. on the left side, push it out in the opposite direction instead (same applies vice versa and for top/bottom). Eventually you will get to a point where either your image is completely drawn in to background space, or you cannot expand it anymore in any direction, and will have to try again. Basically this approach is described as &quot;physical&quot; because you are pushing away from any boundaries you meet -- until such time as the algorithm is done or it falls out because there is no space on any side to push out toward.&#xD;&#xA;&#xD;&#xA;The second &quot;continuous&quot; approach is more organic, and it may in some ways be easier to handle than the large amounts of logic you might have to write for &quot;discrete&quot; Packing Problem solutions (as in the article above). BUT remember that for each subsequent AABB that you &quot;grow&quot; this way to it's maximal size, you will be doing a haphazard, randomised placement -- which may eventually end up being much slower than brute-forcing, as your grid fills up. It will depend on the sparseness of your grid, i.e. the average proportion of filled vs empty cells. If I wanted to do this efficiently, as you seem to, I think I would opt for the first approach. For procedural world generation algorithms, I would find the second approach to be more useful as it would produce more random / less ordered results." />
  <row Id="36884" PostHistoryTypeId="5" PostId="16070" RevisionGUID="e8d8e8a5-0ae9-475b-bdd9-aa06313b1896" CreationDate="2011-08-16T10:47:17.307" UserId="5473" Comment="added 275 characters in body" Text="This is a form of the [Packing Problem.][1]&#xD;&#xA;&#xD;&#xA;Here are your options:&#xD;&#xA;&#xD;&#xA; - Brute force it as Tetrad has mentioned. This can be aided by doing a pre-evaluation of existing space in your world grid, so as to find maximal axis-aligned bounding boxes. [This article][2] should give you some insight into how one developer applied solutions to the Packing Problem, in regards to packing arbitrarily-sized sprites into a spritesheet.&#xD;&#xA; - Use a more physically-based approach to the Packing Problem; I call this &quot;Place-and-Grow&quot; for lack of having seen a better term elsewhere. Select a single pixel/cell of your bitmap/source grid to place -- I would start with the centremost pixel. Randomly pick a position in your bacgkround bitmap / destination grid, to place it on. Keep randomising till you find an open space (this process can be optimised in other ways). If it is now overlapping a solid pixel eg. on the left side, push it out in the opposite direction instead (same applies vice versa and for top/bottom). If you now find it in an empty space once more, you're good to go to the next step. &quot;Grow&quot; the pixel in in all 8 directions around itself, in terms of the source grid / bitmap. Then go back and repeat the shifting step to ensure it's not overlapping anything. Rinse, repeat. Eventually you will get to a point where either your image is completely drawn in to background space, or you cannot expand it anymore in any direction, and will have to try again. Basically this approach is described as &quot;physical&quot; because you are pushing away from any boundaries you meet -- until such time as the algorithm is done or it falls out because there is no space on any side to push out toward.&#xD;&#xA;&#xD;&#xA;The second &quot;continuous&quot; approach is more organic, and it may in some ways be easier to handle than the large amounts of logic you might have to write for &quot;discrete&quot; Packing Problem solutions (as in the article above). BUT remember that for each subsequent AABB that you &quot;grow&quot; this way to it's maximal size, you will be doing a haphazard, randomised placement -- which may eventually end up being much slower than brute-forcing, as your grid fills up. It will depend on the sparseness of your grid, i.e. the average proportion of filled vs empty cells. If I wanted to do this efficiently, as you seem to, I think I would opt for the first approach. For procedural world generation algorithms, I would find the second approach to be more useful as it would produce more random / less ordered results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Packing_problem&#xD;&#xA;  [2]: http://www.codeproject.com/KB/web-image/rectanglepacker.aspx" />
  <row Id="36885" PostHistoryTypeId="2" PostId="16071" RevisionGUID="b484c4f2-d68e-4823-a9ce-ccbacfc2e3d0" CreationDate="2011-08-16T11:36:58.107" UserId="9302" Text="My question is, what game engine/graphics engine should I use for my first indie game?&#xD;&#xA;To note, that is not my first game, and previously I've already used Allegro for my 2d development (pong, chess and stuff).&#xD;&#xA;&#xD;&#xA;I am open to offers of other engines. &#xD;&#xA;To get you an idea, I was planning a game like &quot;The legend of Zelda&quot; for the NES.&#xD;&#xA;&#xD;&#xA;I've heard of SDL, I've used Allegro, my friends does something on OpenGL, what is the best for starting? (SDL seemed a bit hard in their Wiki, a lot of stuff I haven't used before).&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;BTW, the language is C++." />
  <row Id="36886" PostHistoryTypeId="1" PostId="16071" RevisionGUID="b484c4f2-d68e-4823-a9ce-ccbacfc2e3d0" CreationDate="2011-08-16T11:36:58.107" UserId="9302" Text="What is the best engine for my first sirious 2d game?" />
  <row Id="36887" PostHistoryTypeId="3" PostId="16071" RevisionGUID="b484c4f2-d68e-4823-a9ce-ccbacfc2e3d0" CreationDate="2011-08-16T11:36:58.107" UserId="9302" Text="&lt;opengl&gt;&lt;engine&gt;&lt;sdl&gt;&lt;allegro&gt;" />
  <row Id="36888" PostHistoryTypeId="2" PostId="16072" RevisionGUID="36a9499d-9479-4fba-817b-3c07d3af026a" CreationDate="2011-08-16T11:40:26.543" UserId="2749" Text="I created a [`FpsCounter` `DrawableGameComponent` (linked to code, it's longish)][fpscounter]. It seems to work great, it displays 60.0 fps normally, and if I artificially slow down the game loop then it drops.&#xD;&#xA;&#xD;&#xA;Given that my 'game' at the moment is a single sprite that the user can control with the keyboard, it should be capable of a lot more than 60 frames a second. My Game constructor looks like this:&#xD;&#xA;&#xD;&#xA;    public Game1()&#xD;&#xA;    {&#xD;&#xA;        _graphics = new GraphicsDeviceManager(this)&#xD;&#xA;                        {&#xD;&#xA;                            PreferredBackBufferWidth = WindowWidth,&#xD;&#xA;                            PreferredBackBufferHeight = WindowHeight,&#xD;&#xA;                            SynchronizeWithVerticalRetrace = false,&#xD;&#xA;                        };&#xD;&#xA;        _graphics.ApplyChanges();&#xD;&#xA;        Content.RootDirectory = &quot;Content&quot;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;However, even though the above code seems like it should turn off vsync, it doesn't seem to be. Is there something wrong with my constructor, or perhaps my FPS calculations? Or is there something else that may be limiting the frame count?&#xD;&#xA;&#xD;&#xA;  [fpscounter]: http://files.scharley.me/private/FpsCounter.cs" />
  <row Id="36889" PostHistoryTypeId="1" PostId="16072" RevisionGUID="36a9499d-9479-4fba-817b-3c07d3af026a" CreationDate="2011-08-16T11:40:26.543" UserId="2749" Text="How to turn off vsync in XNA 4.0?" />
  <row Id="36890" PostHistoryTypeId="3" PostId="16072" RevisionGUID="36a9499d-9479-4fba-817b-3c07d3af026a" CreationDate="2011-08-16T11:40:26.543" UserId="2749" Text="&lt;xna&gt;&lt;xna-4.0&gt;&lt;vsync&gt;" />
  <row Id="36891" PostHistoryTypeId="2" PostId="16073" RevisionGUID="60d038bf-3623-4ed5-b614-a9d29cc52fb3" CreationDate="2011-08-16T11:47:10.777" UserId="9169" Text="It depends on your video card settings (in Windows). I had the same issue and than I found that my nVidia card has its own vsync settings in control panel where vsync can be set to forced-on mode (application settings will be ignored in this case)." />
  <row Id="36892" PostHistoryTypeId="5" PostId="16037" RevisionGUID="502c3bd5-1cc4-4e28-823c-bd6d88c8b678" CreationDate="2011-08-16T11:53:47.533" UserId="9279" Comment="added 1476 characters in body" Text="I'm working on a project using opengl-es 2.0, and I'm having some trouble setting up perspective projection. &#xD;&#xA;&#xD;&#xA;If I don't set up the perspective projection and simply multiply the object-to-world matrix (I believe it's also called model matrix) by the vertex positions, the objects on screen are rendered correctly, they appear stretched, but as far as I know, that's something the projection matrix would fix. The problem is, whenever I set the perspective matrix and use it, the objects on screen disappear, and no matter how much I move them around they never show up in screen. &#xD;&#xA;&#xD;&#xA;The calculations to get the Model-View-Projection matrix are done in CPU and the last multiplication the MVP-Matrix by the actual object-space vertex data is done in the vertex shader, this is why I believe the problem might be on the process to get that MVP-Matrix. I've run a bunch of unit tests, but according to those tests (and my basic knowledge of linear algebra) those matrices are being correctly calculated, and my internet-research throughout the day isn't helping for now. :-/&#xD;&#xA;&#xD;&#xA;This is the code I use to calculate the MVP-Matrix:&#xD;&#xA;&#xD;&#xA;    Matrix4D projection_matrix;&#xD;&#xA;    projection_matrix.makePerspective(45.0f, 0.001f, 100.0f, 480.0f/320.0f);&#xD;&#xA;    &#xD;&#xA;    Matrix4D view_matrix;&#xD;&#xA;    view_matrix.makeIdentity(); //Should be a real view matrix. TODO.&#xD;&#xA;    &#xD;&#xA;    Matrix4D model_matrix(getWorldMatrix());&#xD;&#xA;    &#xD;&#xA;    Matrix4D mvp_matrix(projection_matrix);&#xD;&#xA;    mvp_matrix *= view_matrix;&#xD;&#xA;    mvp_matrix *= model_matrix;&#xD;&#xA;    &#xD;&#xA;    mMesh-&gt;draw(time, mvp_matrix.getRawData());&#xD;&#xA;&#xD;&#xA;I think this code is pretty self-explanatory, but just in case, those Matrix4D are 4x4 matrices, and calling makePerspective/makeIdentity on them will make that matrix the Perspective or Identity matrix. The getRawData() call on Matrix4D objects returns the matrix data as a float array in column-major notation, and the mMesh variable is another object which, when draw is called, will simply send all the vertex and material data to the shaders.&#xD;&#xA;&#xD;&#xA;The makePerspective function's code is the following:&#xD;&#xA;&#xD;&#xA;    Matrix4D&amp; Matrix4D::makePerspective(const float field_of_view, &#xD;&#xA;            const float near, const float far, const float aspect_ratio) {&#xD;&#xA;        float size = near * tanf(DEGREES_TO_RADIANS(field_of_view) / 2.0f); &#xD;&#xA;        &#xD;&#xA;        return this-&gt;makeFrustum(-size, size, -size / aspect_ratio,&#xD;&#xA;                 size / aspect_ratio, near, far);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Matrix4D&amp; Matrix4D::makeFrustum(const float left, const float right, &#xD;&#xA;            const float bottom, const float top, const float near, &#xD;&#xA;            const float far) {&#xD;&#xA;        this-&gt;mRawData[0] = 2.0f * near / (right - left);  &#xD;&#xA;        this-&gt;mRawData[1] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[2] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[4] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[5] = 2.0f * near / (top - bottom); &#xD;&#xA;        this-&gt;mRawData[6] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[7] =  0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[8] = (right + left) / (right - left);&#xD;&#xA;        this-&gt;mRawData[9] = (top + bottom) / (top - bottom); &#xD;&#xA;        this-&gt;mRawData[10] = - (far + near) / (far - near); &#xD;&#xA;        this-&gt;mRawData[11] = -1.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[12] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[13] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[14] = -2.0f * far * near / (far - near); &#xD;&#xA;        this-&gt;mRawData[15] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        return *this;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And the getWorldMatrix() call does this(with some related code):&#xD;&#xA;&#xD;&#xA;    const Matrix4D&amp; getWorldMatrix() {&#xD;&#xA;        return mWorldMatrix = &#xD;&#xA;                getTranslationMatrix() *&#xD;&#xA;                getRotationMatrix() *&#xD;&#xA;                getScaleMatrix();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const Matrix4D&amp; getRotationMatrix() {&#xD;&#xA;        return this-&gt;mRotationMatrix.makeRotationFromEuler(this-&gt;mPitchAngle,&#xD;&#xA;            this-&gt;mRollAngle, this-&gt;mYawAngle);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const Matrix4D&amp; getTranslationMatrix() {&#xD;&#xA;        return this-&gt;mTranslationMatrix.makeTranslation(this-&gt;mPosition.x,&#xD;&#xA;            this-&gt;mPosition.y, this-&gt;mPosition.z);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const Matrix4D&amp; getScaleMatrix() {&#xD;&#xA;        return this-&gt;mScaleMatrix.makeScale(this-&gt;mScaleX, this-&gt;mScaleY, this-&gt;mScaleZ);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ///This code goes in the Matrix4D class.&#xD;&#xA;    Matrix4D&amp; Matrix4D::makeTranslation(const float x, const float y, &#xD;&#xA;            const float z) {&#xD;&#xA;        this-&gt;mRawData[0] = 1.0f; &#xD;&#xA;        this-&gt;mRawData[1] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[2] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[4] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[5] = 1.0f; &#xD;&#xA;        this-&gt;mRawData[6] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[7] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[8] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[9] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[10] = 1.0f; &#xD;&#xA;        this-&gt;mRawData[11] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[12] =    x; &#xD;&#xA;        this-&gt;mRawData[13] =    y; &#xD;&#xA;        this-&gt;mRawData[14] =    z; &#xD;&#xA;        this-&gt;mRawData[15] = 1.0f;&#xD;&#xA;        &#xD;&#xA;        return *this;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Matrix4D&amp; Matrix4D::makeScale(const float x, const float y, &#xD;&#xA;            const float z) {&#xD;&#xA;        this-&gt;mRawData[0] =    x; &#xD;&#xA;        this-&gt;mRawData[1] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[2] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[4] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[5] =    y; &#xD;&#xA;        this-&gt;mRawData[6] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[7] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[8] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[9] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[10] =    z; &#xD;&#xA;        this-&gt;mRawData[11] = 0.0f;&#xD;&#xA;        &#xD;&#xA;        this-&gt;mRawData[12] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[13] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[14] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[15] = 1.0f;&#xD;&#xA;        &#xD;&#xA;        return *this;&#xD;&#xA;    } &#xD;&#xA;    &#xD;&#xA;    Matrix4D&amp; Matrix4D::makeRotationFromEuler(const float angle_x, &#xD;&#xA;            const float angle_y, const float angle_z) {&#xD;&#xA;        float a = cosf(angle_x);&#xD;&#xA;        float b = sinf(angle_x);&#xD;&#xA;        float c = cosf(angle_y);&#xD;&#xA;        float d = sinf(angle_y);&#xD;&#xA;        float e = cosf(angle_z);&#xD;&#xA;        float f = sinf(angle_z);&#xD;&#xA;        float ad = a * d;&#xD;&#xA;        float bd = b * d;&#xD;&#xA;            &#xD;&#xA;        this-&gt;mRawData[0] = c * e;&#xD;&#xA;        this-&gt;mRawData[1] = -bd * e + a * f;&#xD;&#xA;        this-&gt;mRawData[2] = ad * e + b * f;&#xD;&#xA;        this-&gt;mRawData[3] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        this-&gt;mRawData[4] = -c * f; &#xD;&#xA;        this-&gt;mRawData[5] = bd * f + a * e;&#xD;&#xA;        this-&gt;mRawData[6] = -ad * f + b * e; &#xD;&#xA;        this-&gt;mRawData[7] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        this-&gt;mRawData[8] = -d; &#xD;&#xA;        this-&gt;mRawData[9] = -b * c;&#xD;&#xA;        this-&gt;mRawData[10] = a * c; &#xD;&#xA;        this-&gt;mRawData[11] = 0.0f;&#xD;&#xA;    &#xD;&#xA;        this-&gt;mRawData[12] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[13] = 0.0f;&#xD;&#xA;        this-&gt;mRawData[14] = 0.0f; &#xD;&#xA;        this-&gt;mRawData[15] = 1.0f;&#xD;&#xA;    &#xD;&#xA;        return *this;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, the vertex shader is pretty much this:&#xD;&#xA;&#xD;&#xA;    #version 110&#xD;&#xA;    &#xD;&#xA;    const float c_one = 1.0;&#xD;&#xA;    const float c_cero = 0.0;&#xD;&#xA;    &#xD;&#xA;    uniform float time;&#xD;&#xA;    uniform mat4 mvp_matrix;&#xD;&#xA;    &#xD;&#xA;    attribute vec3 position;&#xD;&#xA;    attribute vec3 normal;&#xD;&#xA;    attribute vec2 texture_coordinate;&#xD;&#xA;    &#xD;&#xA;    varying vec2 v_texture_coordinate;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {   &#xD;&#xA;        gl_Position = mvp_matrix * vec4(position, c_one);&#xD;&#xA;        v_texture_coordinate = texture_coordinate;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Just in case, the object being rendered is rendered on position (0.0f, 0.0f, -3.0f) with 0.5f scale applied to all the three axis's.&#xD;&#xA;&#xD;&#xA;I don't really know what could be wrong, I'm hoping someone can spot what I may be missing, and any help would be appreciated. Debugging this would be a lot easier if I could get per-vertex results on the shader :-/.&#xD;&#xA;&#xD;&#xA;As a side note, I'm having doubts on how to calculate the View or camera matrix, as far as I know it's simply a matrix with the inverted transformations the camera has to do, by which I understand something like, if I want to move the camera 100 units to the right, I move it 100 units to the left, is that right? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT:** Just trying to give more information, maybe that way someone will be able to help me. I've noticed the model matrix is incorrect with the code above, mostly because of the matrix order, I've changed it to the following and now the model matrix seems good:&#xD;&#xA;&#xD;&#xA;    const Matrix4D&amp; getWorldMatrix() {&#xD;&#xA;        return mWorldMatrix = &#xD;&#xA;                getScaleMatrix() * getRotationMatrix() * getTranslationMatrix();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Despite this, still no luck. The matrices resulting from my test data are these:&#xD;&#xA;&#xD;&#xA;    Projection matrix:&#xD;&#xA;    [1.609506,0.000000,0.000000,0.000000]&#xD;&#xA;    [0.000000,2.414258,0.000000,0.000000]&#xD;&#xA;    [0.000000,0.000000,-1.000020,-0.002000]&#xD;&#xA;    [0.000000,0.000000,-1.000000,0.000000]&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;    Model matrix:&#xD;&#xA;    [0.500000,0.000000,0.000000,0.000000]&#xD;&#xA;    [0.000000,0.500000,0.000000,0.000000]&#xD;&#xA;    [0.000000,0.000000,0.500000,-3.000000]&#xD;&#xA;    [0.000000,0.000000,0.000000,1.000000]&#xD;&#xA;    &#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;    MVP matrix:&#xD;&#xA;    [0.804753,0.000000,0.000000,0.000000]&#xD;&#xA;    [0.000000,1.207129,0.000000,0.000000]&#xD;&#xA;    [0.000000,0.000000,2.499990,-0.001000]&#xD;&#xA;    [0.000000,0.000000,-1.000000,0.000000]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And the mesh I'm using to test all this is a simple cube going from 1.0f to -1.0f on each axis, centered on the origin. As far as I know, this should position the vertex closest to the near limit (0.0001f) on position -2.0f along the z axis, so the cube is in front of the camera and withing the view frustum. Any clues someone?" />
  <row Id="36893" PostHistoryTypeId="2" PostId="16074" RevisionGUID="d6b14089-03d4-443a-a8d5-7925dc9b477e" CreationDate="2011-08-16T12:08:47.377" UserId="8390" Text="&#xD;&#xA;if Game.IsFixedTimeStep is true the update method will be called every 1/60 seconds&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.isfixedtimestep.aspx" />
  <row Id="36894" PostHistoryTypeId="2" PostId="16075" RevisionGUID="3857ea24-0df7-4a32-810e-02a35f6c12a5" CreationDate="2011-08-16T12:19:40.757" UserId="5275" Text="I have a tile based engine and in the middle of translating out the example wall avoidance alogrithm in the book AI programming by example.  I was wondering if the method below can be modified so that it takes a rectangle instead of vector C and D and still produce the same output ?&#xD;&#xA;&#xD;&#xA;    /-------------------- LineIntersection2D-------------------------&#xD;&#xA;    //&#xD;&#xA;    //	Given 2 lines in 2D space AB, CD this returns true if an &#xD;&#xA;    //	intersection occurs and sets dist to the distance the intersection&#xD;&#xA;    //  occurs along AB. Also sets the 2d vector point to the point of&#xD;&#xA;    //  intersection&#xD;&#xA;    //----------------------------------------------------------------- &#xD;&#xA;    inline bool LineIntersection2D(Vector2D   A,&#xD;&#xA;                                   Vector2D   B,&#xD;&#xA;                                   Vector2D   C, &#xD;&#xA;                                   Vector2D   D,&#xD;&#xA;                                   double&amp;     dist,&#xD;&#xA;                                   Vector2D&amp;  point)&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;      double rTop = (A.y-C.y)*(D.x-C.x)-(A.x-C.x)*(D.y-C.y);&#xD;&#xA;    	double rBot = (B.x-A.x)*(D.y-C.y)-(B.y-A.y)*(D.x-C.x);&#xD;&#xA;    &#xD;&#xA;    	double sTop = (A.y-C.y)*(B.x-A.x)-(A.x-C.x)*(B.y-A.y);&#xD;&#xA;    	double sBot = (B.x-A.x)*(D.y-C.y)-(B.y-A.y)*(D.x-C.x);&#xD;&#xA;    &#xD;&#xA;    	if ( (rBot == 0) || (sBot == 0))&#xD;&#xA;    	{&#xD;&#xA;    		//lines are parallel&#xD;&#xA;    		return false;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	double r = rTop/rBot;&#xD;&#xA;    	double s = sTop/sBot;&#xD;&#xA;    &#xD;&#xA;    	if( (r &gt; 0) &amp;&amp; (r &lt; 1) &amp;&amp; (s &gt; 0) &amp;&amp; (s &lt; 1) )&#xD;&#xA;      {&#xD;&#xA;      	dist = Vec2DDistance(A,B) * r;&#xD;&#xA;    &#xD;&#xA;        point = A + r * (B - A);&#xD;&#xA;    &#xD;&#xA;        return true;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;    	else&#xD;&#xA;      {&#xD;&#xA;    		dist = 0;&#xD;&#xA;    &#xD;&#xA;        return false;&#xD;&#xA;      }&#xD;&#xA;    } " />
  <row Id="36895" PostHistoryTypeId="1" PostId="16075" RevisionGUID="3857ea24-0df7-4a32-810e-02a35f6c12a5" CreationDate="2011-08-16T12:19:40.757" UserId="5275" Text="Examples of wall avoidance algorithm dealing with rectangles instead of lines?" />
  <row Id="36896" PostHistoryTypeId="3" PostId="16075" RevisionGUID="3857ea24-0df7-4a32-810e-02a35f6c12a5" CreationDate="2011-08-16T12:19:40.757" UserId="5275" Text="&lt;c++&gt;&lt;ai&gt;" />
  <row Id="36897" PostHistoryTypeId="5" PostId="16074" RevisionGUID="0983959a-2688-48e2-b714-309bdb5bc6da" CreationDate="2011-08-16T12:25:37.043" UserId="2332" Comment="added useful quote from the site" Text="if Game.IsFixedTimeStep is true the update method will be called every 1/60 seconds&#xD;&#xA;&#xD;&#xA;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.isfixedtimestep.aspx&#xD;&#xA;&#xD;&#xA;&quot;The default value for IsFixedTimeStep is true.&quot;" />
  <row Id="36898" PostHistoryTypeId="2" PostId="16076" RevisionGUID="d33acca5-5d81-4e27-b09b-08475cbc0976" CreationDate="2011-08-16T12:33:06.250" UserId="2332" Text="Sorry to state the obvious, but rectangles are essentially 4 lines. &#xD;&#xA;&#xD;&#xA;Why not just reuse the code and have something like:&#xD;&#xA;&#xD;&#xA;    RectangleIntersectionWithLine( Vector2D a, Vector2D b, BoundingBox box )  &#xD;&#xA;    {  &#xD;&#xA;        LineIntersection2D( a, b, box.Min, Vector2D( box.Min.x, box.Max.y ) );  &#xD;&#xA;        LineIntersection2D( a, b, box.Min, Vector2D( box.Max.x, box.Min.y ) );  &#xD;&#xA;        LineIntersection2D( a, b, box.Max, Vector2D( box.Min.x, box.Max.y ) );  &#xD;&#xA;        LineIntersection2D( a, b, box.Max, Vector2D( box.Max.x, box.Min.y ) );  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I leave the return values, etc up to you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36899" PostHistoryTypeId="25" PostId="16072" RevisionGUID="e414cc2d-8248-4ab6-941f-f7c730ee161a" CreationDate="2011-08-16T12:37:22.827" Comment="http://twitter.com/#!/StackGameDev/status/103445244305092608" />
  <row Id="36900" PostHistoryTypeId="2" PostId="16077" RevisionGUID="5096ed97-a5ad-4d90-a5cf-99c70fd809ae" CreationDate="2011-08-16T12:53:14.597" UserId="9282" Text="I'm looking at creating a tower-defence-style game on Android, developed in Java. I'm spending a lot of time trying to just get a background image (drawn onto a canvas) that pans/zooms within the bounds of the screen etc. that I will eventually draw my game onto.&#xD;&#xA;&#xD;&#xA;It seems to be a lot of work just to get theses basics working correctly. Is there a simple barebones project that has this stuff taken care of that I can build my game on top of?" />
  <row Id="36901" PostHistoryTypeId="1" PostId="16077" RevisionGUID="5096ed97-a5ad-4d90-a5cf-99c70fd809ae" CreationDate="2011-08-16T12:53:14.597" UserId="9282" Text="Is there a simple 2D Android barebones starter project?" />
  <row Id="36902" PostHistoryTypeId="3" PostId="16077" RevisionGUID="5096ed97-a5ad-4d90-a5cf-99c70fd809ae" CreationDate="2011-08-16T12:53:14.597" UserId="9282" Text="&lt;2d&gt;&lt;android&gt;" />
  <row Id="36903" PostHistoryTypeId="4" PostId="16071" RevisionGUID="15f847c2-6f27-4a07-b1b9-be479242bde3" CreationDate="2011-08-16T12:55:07.777" UserId="382" Comment="corrected spelling in title" Text="What is the best engine for my first serious 2d game?" />
  <row Id="36904" PostHistoryTypeId="24" PostId="16071" RevisionGUID="15f847c2-6f27-4a07-b1b9-be479242bde3" CreationDate="2011-08-16T12:55:07.777" Comment="Proposed by 382 approved by 20 edit id of 651" />
  <row Id="36905" PostHistoryTypeId="5" PostId="16071" RevisionGUID="4761cedf-7755-420f-b8e1-1ea9a418af93" CreationDate="2011-08-16T12:55:33.593" UserId="20" Comment="changed spelling, added c++ tag" Text="What game engine/graphics engine should I use for my first indie game?&#xD;&#xA;I'd like to add that this is not my first game, I've previously used Allegro for 2d development (pong, chess and stuff).&#xD;&#xA;&#xD;&#xA;I am open to suggestions for other engines. &#xD;&#xA;I was thinking about a game like &quot;The legend of Zelda&quot; for the NES (just to give you an idea what I was planning).&#xD;&#xA;&#xD;&#xA;I've heard of SDL, I've used Allegro, my friends use OpenGL, what is the best for starting? (SDL seemed a bit hard, judging from their Wiki, a lot of stuff I haven't used before).&#xD;&#xA;&#xD;&#xA;BTW, the language is C++." />
  <row Id="36906" PostHistoryTypeId="6" PostId="16071" RevisionGUID="4761cedf-7755-420f-b8e1-1ea9a418af93" CreationDate="2011-08-16T12:55:33.593" UserId="20" Comment="changed spelling, added c++ tag" Text="&lt;c++&gt;&lt;opengl&gt;&lt;engine&gt;&lt;sdl&gt;&lt;allegro&gt;" />
  <row Id="36907" PostHistoryTypeId="2" PostId="16078" RevisionGUID="8fae91cb-e00c-4d35-a5ff-494f024c3710" CreationDate="2011-08-16T13:45:06.233" UserId="6137" Text="If you haven't come across it already, Stefan Gustavson's [Simplex Noise Demystified][1] is a good explanation of how the algorithm works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf" />
  <row Id="36908" PostHistoryTypeId="2" PostId="16079" RevisionGUID="470abd58-92db-41c2-a82e-98242e96df11" CreationDate="2011-08-16T14:13:12.247" UserId="7946" Text="First of all, what you're looking for isn't really an engine. You're looking for a graphics API or a graphics API Wrapper to do your drawing.&#xD;&#xA;&#xD;&#xA;I can recommend [SFML][1]. It's a C++ library that manages most of the basic things that everyone needs for you. &#xD;&#xA;&#xD;&#xA;It features a relatively powerful graphics part which wraps around OpenGL, but also includes basic support for window-management, input (keyboard, mouse, joystick/gamepad), audio (playing sounds and music) and networking. &#xD;&#xA;&#xD;&#xA;Since it's C++ and entirely object-oriented, it will be very simple to understand. For example, loading an image and displaying it more or less looks as simple as this (in SFML2.0):&#xD;&#xA;&#xD;&#xA;    sf::Texture texture.&#xD;&#xA;    texture.LoadFromFile(&quot;blabla/test/supermario.png&quot;);&#xD;&#xA;    &#xD;&#xA;    sf::Sprite sprite;&#xD;&#xA;    sprite.SetTexture(texture);&#xD;&#xA;    &#xD;&#xA;    //somewhere else&#xD;&#xA;    window.Draw(sprite /*, myAwesomeShader Optional shader argument */);&#xD;&#xA;&#xD;&#xA;Apart from the superior code-design, it's also a lot faster than the current version of SDL and has more features (if you use the basic SDL libs). &#xD;&#xA;&#xD;&#xA;I can really recommend it if you're using C++.&#xD;&#xA;&#xD;&#xA;Also, if you're going to pick SFML, start with SFML2 instead of 1.6. It isn't officially released yet, but it is going to be very soon and not a lot will change in the API until then. The latest SVN snapshots of SFML are always available on the download page.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sfml-dev.org" />
  <row Id="36909" PostHistoryTypeId="2" PostId="16080" RevisionGUID="f2b97c0d-66ed-4ca6-a612-8b4933c0ab34" CreationDate="2011-08-16T14:31:02.107" UserId="5661" Text="I found my first edition (June 1993) copy of the red book (covering OpenGL 1.0) was sufficient and roughly equivalent to GLES 1 on the iPhone.  GLSL and OpenGL 3+ are very different (no more fixed pipelines), and I wouldn't bother with the red book unless you need to support GLES 1." />
  <row Id="36910" PostHistoryTypeId="5" PostId="15919" RevisionGUID="c8266ad6-0e3a-4b2a-8d0c-877c6902253c" CreationDate="2011-08-16T14:35:11.077" UserId="9244" Comment="I needed to clarify the research at hand. I have spoken to other developers and found out some of the explanation was misleading. With the added paragraphs, the questions should be better understood." Text="I realize this question is complex and subjective, but bear with me for a moment.&#xD;&#xA;&#xD;&#xA;I firmly believe that video-game software is essentially different from, for example spreadsheet software, as from a user point of view, some games have more similarities with film art than with regular software. However, when it comes to requirements prioritization methods that help developers sort out which feature or idea is most important, there is none that facilitate the **creative aspects** of video games. Most available techniques only aid regular software development where focus is on the risk and cost of requirements, and do not take into account the creative aspect of video-game requirements.&#xD;&#xA;&#xD;&#xA;To illustrate the problem, think of a requirement (i.e. feature idea) such as the one seen in Super Paper Mario, where [Mario can exit the 3D world and enter a 2D world][1], and vice versa in order to go around obstacles. This is a fairly challenging requirement to implement and probably costly, but definitely crucial to the success of the game. Available prioritization methods overlook the **creative/entertainment value** of this requirement and mainly just estimate how costly and (technologically) risky implementation is. Of course, this is a very simplistic example, but you can imagine a case where there is a pool of great game ideas (functional and non-functional requirements) and not enough resources to realize them all. When it comes to value calculation, academic research doesn't provide game developers with an adequate way to estimate the value of game requirements.&#xD;&#xA;&#xD;&#xA;**UPDATE / Clarification:** In my research, I study available software product management solutions (more specifically requirements prioritization algorithms) and try to find out why are they not suitable for game development. It seems that it is the creative or entertainment nature of the software itself that introduces this incompatibility. It is the (available) techniques inadequacy, to recognize the core value of the software and its conceptually different purpose.&#xD;&#xA;&#xD;&#xA;With regular software, it is the user or his/her needs that most often help estimate the value of requirements. Moreover, it is the user that produces most requirements. In video-game software, it is the creative vision that drives the requirements. With regards to requirements origin, it is the outside in vs. the inside out paradigm. Having established this fundamental difference, we can deduce that if requirements prioritization (RP) algorithms focus on user ideas/needs in order to estimate the value of requirements for regular software, then in the case of video-game software, the RP algorithm should satisfy the creative vision. By creative/entertainment value of a requirement, I refer to the degree to which the core vision relies on this particular requirement.&#xD;&#xA;&#xD;&#xA;What I try to do is find a way to prioritize the requirements according to their relevance/importance to this core creative vision. This will ultimately provide a creative value, but it is relative to the central idea and the stakeholders’ ability to subjectively assess the requirements. This is just one side of the RP algorithm, as other factors such as risk and cost need to be taken into account as well, but the available RP solutions already offer adequate ways to do that, and they are compatible with the needs of game development.&#xD;&#xA;&#xD;&#xA;The reason I’m writing here is because I am trying to see how developers deal with these problems (PR and focusing on the core idea) when dealing with more complex projects.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I try to refine part of the preproduction process by developing a requirements prioritization method tailored to the needs of game development industry. A pivotal element in such a method is the ability to identify and estimate the creative/entertainment value of requirements. However, in order to do that, I need to understand how game developers perceive this creative/entertainment value of requirements. In a nutshell, **I am seeking answers to the following questions**:&#xD;&#xA;&#xD;&#xA;Question 1: **How would you define the creative/entertainment value of video-game requirements?**&#xD;&#xA;&#xD;&#xA;Question 2: **How would you measure it?**&#xD;&#xA;&#xD;&#xA;Question 3: **Who should measure it?**&#xD;&#xA;&#xD;&#xA;I would love to see how these issues are perceived by game developers and I would appreciate your take on them here, but if you want to contribute to this research – receiving my eternal gratitude and a proper credit/citation in the research and all the publications that will follow, please fill up my extremely short survey (just 7 questions, 3 of which you already see above):&#xD;&#xA;&#xD;&#xA;[The extremely short survey][2] which will cement you as my personal hero.&#xD;&#xA;&#xD;&#xA;Research information and trigger&#xD;&#xA;--------------------------------&#xD;&#xA;&#xD;&#xA;This research is being conducted at Utrecht University, The Netherlands, as part of an Information Science master’s thesis.&#xD;&#xA;&#xD;&#xA;Game development is in many ways similar to product software development as developers follow certain software development processes. Following a poor development method (or none at all) could result in longer development times, going over budget and/or delivering buggy products (Bethke, 2003). What makes video games different is the creative game vision that must be shared by the entire team to ensure that the end product is consistent and of good quality. This is especially true for full-blown game titles where from a user point of view, there are more similarities with film art than with any other software. Unfortunately, this curious creative aspect renders many software product management techniques unadoptable by the gaming industry.&#xD;&#xA;&#xD;&#xA;I am quite interested in working towards improving the game development process in the preproduction stage, by creating a requirements prioritization method tailored to the specific needs of the game industry and **I need your help!** The easiest way to contribute to the research is by filling up my short survey (link above). If you find this research interesting, please contact me at a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;**Researcher information**&#xD;&#xA;&#xD;&#xA;My name is Alex Chervenkoff, an avid gamer and quite excited about this research! You can contact me at: a.cherv@gmail.com&#xD;&#xA;&#xD;&#xA;Degree in BSc Computer Science, The University of Sheffield, UK.&#xD;&#xA;&#xD;&#xA;Currently doing MSc Information Science at Utrecht University, The Netherlands.&#xD;&#xA;&#xD;&#xA;**Thank you!**&#xD;&#xA;&#xD;&#xA;  [1]: http://upload.wikimedia.org/wikipedia/en/e/e5/SPM_3D.jpg&#xD;&#xA;  [2]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dFJfVUIwb2dKSkNWYnZfcTFnakZTcFE6MQ" />
  <row Id="36911" PostHistoryTypeId="24" PostId="15919" RevisionGUID="c8266ad6-0e3a-4b2a-8d0c-877c6902253c" CreationDate="2011-08-16T14:35:11.077" Comment="Proposed by 9244 approved by 14 edit id of 650" />
  <row Id="36912" PostHistoryTypeId="25" PostId="16077" RevisionGUID="40f8ea70-1650-4f47-b8c2-e239771df6eb" CreationDate="2011-08-16T15:37:23.783" Comment="http://twitter.com/#!/StackGameDev/status/103490548438024192" />
  <row Id="36913" PostHistoryTypeId="2" PostId="16081" RevisionGUID="254dcbe2-2c4a-4727-ae23-eff51c3d0c26" CreationDate="2011-08-16T15:55:36.437" UserId="6469" Text="found this the other day. auto generates the levels based on the players skills :) is a lot of fun to play and learned a lot from it. &#xD;&#xA;&#xD;&#xA;http://eis-blog.ucsc.edu/2010/09/a-probabilistic-multi-pass-level-generator/&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36914" PostHistoryTypeId="16" PostId="16081" RevisionGUID="66f6b68f-9ecf-437b-8465-bb7a85d3922b" CreationDate="2011-08-16T15:55:36.437" UserId="6469" />
  <row Id="36916" PostHistoryTypeId="2" PostId="16082" RevisionGUID="9554ced1-8153-4eaa-af21-e40949cc336d" CreationDate="2011-08-16T16:08:38.910" UserId="9259" Text="I have tiled map 100*75 and tiles are 32*32 pixel.I want to use batching for performance .I don't figure it out , because of my game needs scrolling and every frame i draw 22*16 tiles (my screen is 20*16 tile) .I thought that batching tiles for every frame .Is it good or any suggestion? " />
  <row Id="36917" PostHistoryTypeId="1" PostId="16082" RevisionGUID="9554ced1-8153-4eaa-af21-e40949cc336d" CreationDate="2011-08-16T16:08:38.910" UserId="9259" Text="Scrolling with Batched Objects" />
  <row Id="36918" PostHistoryTypeId="3" PostId="16082" RevisionGUID="9554ced1-8153-4eaa-af21-e40949cc336d" CreationDate="2011-08-16T16:08:38.910" UserId="9259" Text="&lt;game-design&gt;&lt;parallaxscrolling&gt;" />
  <row Id="36919" PostHistoryTypeId="5" PostId="15882" RevisionGUID="d52e52e0-d85a-44cf-80e1-8476994925e4" CreationDate="2011-08-16T16:17:06.340" UserId="3538" Comment="language, grammar" Text="Let's take some old popular at a time but abandoned game: WorldRacing/HiOctane/Constructor/any other. Say I with a team want to revitalize said game and bring it to year 2011 without major changes and then work on improving it (e.g. add multiplayer). Also it is important to keep the game's spirit, assets, story, music, so basically the game remains the same, but gets better (e.g. adapting DOS game to Win7).&#xD;&#xA;&#xD;&#xA;My questions are from &quot;How is it usually made?&quot; area:&#xD;&#xA;&#xD;&#xA; - How do I purchase rights to the title and the game's assets (graphics, sounds, music, storyline). Whom to contact and what purchase options are possible? Is it possible to obtain source codes, design documents.&#xD;&#xA; - How to deal with various platforms, is it terms of contract saying which platforms are allowed to be used if there are several?&#xD;&#xA; - How to deal with localizations in other languages, are they to obtain from other companies or do they belong to master publisher?&#xD;&#xA; - What could be the reasonable price for said games in example?&#xD;&#xA; - Is it possible to pursue owners to release the game as open source?&#xD;&#xA;&#xD;&#xA;Remember Heroes of Might and Magic was owned by New World Computing, but later changed its owner to Nival. I'm interested in that sort of process." />
  <row Id="36920" PostHistoryTypeId="24" PostId="15882" RevisionGUID="d52e52e0-d85a-44cf-80e1-8476994925e4" CreationDate="2011-08-16T16:17:06.340" Comment="Proposed by 3538 approved by 1430 edit id of 649" />
  <row Id="36921" PostHistoryTypeId="2" PostId="16083" RevisionGUID="3caff99b-ceb8-456b-a8bf-563e0224a558" CreationDate="2011-08-16T16:46:10.053" UserId="3505" Text="What tools are you using, what platforms do you intend to release for? Most probably it doesn't really matter how you do the drawing, unless you use some really obscure technique a modern computer should be plenty fast." />
  <row Id="36922" PostHistoryTypeId="2" PostId="16084" RevisionGUID="c8892533-c378-41f6-935c-6a9e19d4edd6" CreationDate="2011-08-16T16:55:30.023" UserId="4306" Text="There's [GameSalad][1]. &#xD;&#xA;&#xD;&#xA;&gt; Create games for iPhone, iPad, Mac, and HTML5. No coding required. Did we mention it's free?&#xD;&#xA;&#xD;&#xA;But, it looks like there is no coding.&#xD;&#xA;&#xD;&#xA;&gt; **No coding. Ever.**&#xD;&#xA;GameSalad aims to open the doors of game design to anyone who wants to create. With GameSalad's complete set of tools and editors, bring your game to market faster and easier than with any other development platform; and without coding a single line. That's development in days and weeks - not months. That's the democratization of game creation.&#xD;&#xA;&#xD;&#xA;If you aren't much of a programmer I would recommend to use this. If you are a good programmer you could use [Cocos2d][2], which doesn't have any GUI (only code).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamesalad.com/products/&#xD;&#xA;  [2]: http://www.cocos2d-iphone.org/" />
  <row Id="36923" PostHistoryTypeId="6" PostId="16082" RevisionGUID="8937c45c-7ad9-4a73-86db-07b0cef2580f" CreationDate="2011-08-16T17:38:03.417" UserId="3505" Comment="edited tags" Text="&lt;game-design&gt;&lt;android&gt;&lt;parallaxscrolling&gt;&lt;opengl-es2&gt;" />
  <row Id="36924" PostHistoryTypeId="2" PostId="16085" RevisionGUID="41690e45-78fc-466c-a784-2362b7e42f9e" CreationDate="2011-08-16T18:22:33.643" UserId="9307" Text="From a DB programmer passing by...&#xD;&#xA;&#xD;&#xA;It depends how different are your items.&#xD;&#xA;I think for your case, that you should have a main table, for all main shared fields,&#xD;&#xA;and additional specific tables for each specific field.&#xD;&#xA;&#xD;&#xA;The main table, must have a special field that indicates what kind of specific table relates that item.&#xD;&#xA;&#xD;&#xA;When you read info from the database you read the main table, and later, if applies, bring additional specific info for that card." />
  <row Id="36925" PostHistoryTypeId="6" PostId="16082" RevisionGUID="5c3b3644-da57-4b39-9c64-dbd75de533c6" CreationDate="2011-08-16T18:32:09.267" UserId="51" Comment="edited tags" Text="&lt;android&gt;&lt;graphics-programming&gt;&lt;parallaxscrolling&gt;&lt;opengl-es2&gt;" />
  <row Id="36926" PostHistoryTypeId="25" PostId="16082" RevisionGUID="238fcfdb-8c85-46c5-9fc4-d63167cc5710" CreationDate="2011-08-16T18:37:25.533" Comment="http://twitter.com/#!/StackGameDev/status/103535852713558016" />
  <row Id="36927" PostHistoryTypeId="2" PostId="16086" RevisionGUID="7ffc2d01-52af-4bf1-8666-8e0338bad07a" CreationDate="2011-08-16T19:45:35.190" UserId="9308" Text="It seems that in most cases the name of the weapon is partially changed and sometimes the model, though usually the weapon models are very similar to the actual weapon. tvtropes has several good real world examples of guns in games that have had changes to their names: http://tvtropes.org/pmwiki/pmwiki.php/Main/AKA47" />
  <row Id="36928" PostHistoryTypeId="2" PostId="16087" RevisionGUID="c59b6739-17d2-4799-8e42-a5423026b4a5" CreationDate="2011-08-16T20:31:02.250" UserId="3327" Text="What you may be looking for is an engine. In that case, refer to this question: http://stackoverflow.com/questions/5206089/game-engine-for-android. I would recommend AndEngine or LibGDX. However, the best way to learn, in my opinion, is to power through the beginning things, learning along the way. Ask questions here and on StackOverflow and you'll be able to make your own &quot;barebones&quot; project in no time!" />
  <row Id="36929" PostHistoryTypeId="2" PostId="16088" RevisionGUID="5984a9a8-fd5c-4b9f-bf21-5bbe0ca8b0d5" CreationDate="2011-08-16T20:32:49.270" UserId="6774" Text="Seeing as today's machines have insane computing power and near endless memory, it's tough for a hobbyist programmer to actually hit the limits of his machine without doing something totally boneheaded. This raises a question: Is there a machine (be it a computer or a console) from the past that would be a good learning platform for someone that has never touched low-level code? I'm very much looking at this from the perspective of someone that wants to understand exactly how to get the best out of the specific set of hardware a machine has.&#xD;&#xA;&#xD;&#xA;I'd imagine that the internet probably has manuals for most well known older machines, and it shouldn't be too hard to find an emulator of some sort either. I'm just at a little bit of a loss when it comes to actually choosing a good platform to go for. Any ideas?&#xD;&#xA;&#xD;&#xA;Obviously if someone has ideas that don't fit the exact parameters of the question, I'm open for that as well." />
  <row Id="36930" PostHistoryTypeId="1" PostId="16088" RevisionGUID="5984a9a8-fd5c-4b9f-bf21-5bbe0ca8b0d5" CreationDate="2011-08-16T20:32:49.270" UserId="6774" Text="Where to start with hardware-specific low-level programming?" />
  <row Id="36931" PostHistoryTypeId="3" PostId="16088" RevisionGUID="5984a9a8-fd5c-4b9f-bf21-5bbe0ca8b0d5" CreationDate="2011-08-16T20:32:49.270" UserId="6774" Text="&lt;performance&gt;&lt;hardware&gt;" />
  <row Id="36932" PostHistoryTypeId="2" PostId="16089" RevisionGUID="f1e04ef7-ab74-437c-adf5-d873cd924c1d" CreationDate="2011-08-16T21:00:20.860" UserId="9134" Text="The red book is fine, like others said you can still get value from it for a lot of things, particularly if you ever need to code for embedded and/or downlevel hardware that may not support shaders.  Beware though that the free version online is hideously outdated.&#xD;&#xA;&#xD;&#xA;I also make occasional use of the blue book, but that's because I like a good reference manual with everything in the one place, and I prefer dead tree to electronic for this kind of thing." />
  <row Id="36933" PostHistoryTypeId="2" PostId="16090" RevisionGUID="b6fb2d36-d0bb-441f-ae98-26ffc6d314b5" CreationDate="2011-08-16T21:02:47.033" UserId="9311" Text="I have a tile based game that is in a semi-isometric view created by a transformation. The tiles are created by a Texture2d rendered on a 3d surface.&#xD;&#xA;&#xD;&#xA;My map Image: http://balancedcms.com/Capture.PNG&#xD;&#xA;&#xD;&#xA;I am using the following code for my transformation:&#xD;&#xA;&#xD;&#xA;    View = Matrix.CreateLookAt(new Vector3(0, -1.1f, 1.6f), new Vector3(0, 0, 0), new Vector3(0, 53, 0));&#xD;&#xA;    Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.Pi - 2.4f, 4.0f / 3.0f, 1, 500);&#xD;&#xA;    &#xD;&#xA;    quadEffect = new BasicEffect(device);&#xD;&#xA;    &#xD;&#xA;    quadEffect.World = Matrix.Identity;&#xD;&#xA;    quadEffect.View = View;&#xD;&#xA;    quadEffect.Projection = Projection;&#xD;&#xA;    quadEffect.TextureEnabled = true;&#xD;&#xA;    &#xD;&#xA;    quad = new Quad(new Vector3(0, 0, 0), Vector3.Backward, Vector3.Up, 3, 3);&#xD;&#xA;&#xD;&#xA;My problem comes along when I attempt to get the current tile that I am hovering the mouse over. I have a mouse X and Y however I can't seem to figure out how to transform these screen coordinates into a tile X and Y. The tiles are 128px by 128px; however, after the camera transformation they are smaller on the top and larger on the bottom(to create the isometric view)&#xD;&#xA;&#xD;&#xA;I've tried transforming the mouse X and Y with the same projection matrix. However, this didn't work. I think it is due to the view matrix not being taken into account... sample below:&#xD;&#xA;&#xD;&#xA;Vector3.Transform(new Vector3(Mouse.GetState().X, Mouse.GetState().Y, 0), Projection);&#xD;&#xA;&#xD;&#xA;This image may provide more information... is also shows the hours I've put into figuring this out: http://balancedcms.com/1111.png&#xD;&#xA;" />
  <row Id="36934" PostHistoryTypeId="1" PostId="16090" RevisionGUID="b6fb2d36-d0bb-441f-ae98-26ffc6d314b5" CreationDate="2011-08-16T21:02:47.033" UserId="9311" Text="XNA Tile Location from Screen Location" />
  <row Id="36935" PostHistoryTypeId="3" PostId="16090" RevisionGUID="b6fb2d36-d0bb-441f-ae98-26ffc6d314b5" CreationDate="2011-08-16T21:02:47.033" UserId="9311" Text="&lt;xna&gt;" />
  <row Id="36936" PostHistoryTypeId="2" PostId="16091" RevisionGUID="3e8c2c83-63dc-4aba-8df7-ea65c642732c" CreationDate="2011-08-16T21:22:35.563" UserId="9312" Text="Returning to a legacy machine which you have no emotional tie to seems pretty masochistic. If I were doing it I would choose the first computer I had, Apple ][c...&#xD;&#xA;&#xD;&#xA;J2ME Java for mobile phones might be another suitable choice : Eclipse is free and test devices (for example S40, S60 Symbian phones ) easily available for cheap. Even modern smartphones are very limited, though they are reaching something in the direction of PlayStation 1 or better as we speak. An example 256 Mb RAM can be tanked fairly quickly if you load up everything in a medium-sized game." />
  <row Id="36937" PostHistoryTypeId="25" PostId="16088" RevisionGUID="94c4817c-87a6-4814-a363-c4d258b25cd3" CreationDate="2011-08-16T21:37:25.507" Comment="http://twitter.com/#!/StackGameDev/status/103581151570038784" />
  <row Id="36938" PostHistoryTypeId="5" PostId="16065" RevisionGUID="9b95b47d-c797-480e-87a6-7df2b40c8aea" CreationDate="2011-08-16T22:21:45.590" UserId="9190" Comment="added 2720 characters in body" Text="One industry-sponsored study claims that only 22% of customers had a positive attitude toward social media advertising, and 8% of consumers abandoned an SNS (Social-networking sites) because of what they perceived as excessive advertising[1].&#xD;&#xA;&#xD;&#xA;Schlosser, Shavitt and Kanfer reached the conclusion that users who &quot;actively contribute content&quot; view online advertisements more negatively than users that only consume it.[2]&#xD;&#xA;&#xD;&#xA;Another study found that when SNA delivered content or impressions that provided entertainment or informational value, or offered social value, consumers appeared more likely to respond favorably toward the ad stimuli themselves. It also found that &quot;these results suggested that one prerequisite to more successful SNA execution would be for advertisers to create messages that provide some sort of explicit value to [...] users. And by a wide margin, the value that appeared most likely to be highly regarded by SNS users was entertainment&quot;.[3]&#xD;&#xA;&#xD;&#xA;Activision ran an extensive advertising campaign when releasing Modern Warfare 2, which included (amongst other advertising channels) Twitter, Youtube and Facebook[4,5]. When the game launched it grossed $550M in what Activision Blizzard calls the &quot;biggest entertainment launch ever&quot;[5].&#xD;&#xA;&#xD;&#xA;Deviating a bit on the topic, a study by Nielsen Games polled some 534 &quot;gamers&quot; on whether they responded to advertising in games -- 11% said they purchased a brand, 19% said they talked about it and 10% said they recommended the product, 11% said they sought more information. (While no direct comparison rates were offered against other forms of media, 1% of consumers exposed to direct response advertising eventually buy the advertised product.)[6]&#xD;&#xA;&#xD;&#xA;Estimates on how much a &quot;fan&quot; or &quot;like&quot; on facebook is worth ranges between 44 cents and $3.60; the issue seem to be that facebook lack the metrics necessary to correctly analyze advertising impacts on-site[7]. Luckily, facebook has agreed to partner with Nielsen Ratings, and Nielsen Ratings are planning to launch a new &quot;Online Campaign Ratings&quot; system that tracks ad performance and audience demographics[8].&#xD;&#xA;&#xD;&#xA;It's clear that facebook advertising does have an impact, however; &quot;Texas Pete Hot Sauce&quot; ran a campaign on facebook which allegedly had a direct, measurable and effective result.[9]&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;There are obviously issues to deal with when looking at this data: it's only tangentially related to the question, there are no major studies done on advertising impact on SNS, and I am not an expert in the field of advertising  or the research associated with it (I do know my statistics though).&#xD;&#xA;&#xD;&#xA;The Activision ad campaign is largely anecdotal; given that we can't see any impact data, but I figured that the academical standards on gamedev.SE is slightly lower than peer reviewed journals, and as such it might be of some interest.&#xD;&#xA;&#xD;&#xA;As for a &quot;personal&quot; answer (remember folks: anecdotal evidence is not data), I'd say that yes, a portion of users will probably post stuff on facebook, if it's either relevant or amusing (for instance, Doodle Jump posts your high score and checks your friends list to see if they have any high scores you can compare against. I'd go with &quot;Friends, Fans and Followers: Do Ads Work on Social Networks?&quot; as the most relevant study for your question. Unfortunately, they reach the same conclusion I do:&#xD;&#xA;&quot;Anecdotal evidence indicates that social-networking advertising (SNA) can be effective when users accept it, but the perception of excessive commercialization may lead to user abandonment. Empirical support for these propositions, however, is lacking.&quot; and then goes on to look at how users attitudes toward SNA (Social Network Advertising) are affected by things like content, structure and social factors.&#xD;&#xA;&#xD;&#xA;--&#xD;&#xA;&#xD;&#xA;[1]: AdReAction. “Brands + Consumers + Social Media: What Marketers Should Know About Who’s Getting Social and Why.” Dynamic Logic, January 26, 2010 [URL: http://tinyurl.com/ycxfewn (dynamiclogic.com) ] -- Removed, but accessible at http://tinyurl.com/3mwmnda (Google Docs QuickView)&lt;br&gt;[2]: Schlosser, A. E., S. Shavitt, and A. Kanfer. “Survey of Internet Users’ Attitudes toward Internet Advertising.” Journal of Interactive Marketing 13, 3 (1999): 34–54.&lt;br&gt;[3]: Friends, Fans, and Followers: Do Ads Work on Social Networks?. (2011). Journal of Advertising Research, 51(1), 258-275. Retrieved from EBSCOhost.&lt;br&gt;[4] http://modernwarfare2.infinityward.com/&lt;br&gt;[5] http://adage.com/article/digital/modern-warfare-2-vanquished-harry-potter/140755/&lt;br&gt;[6] Beirne, Mike. 2008. &quot;Study: Gamers Respond to Ads.&quot; Brandweek 49, no. 32: 6. Academic Search Elite, EBSCOhost (accessed August 16, 2011).&lt;br&gt;[7] Bruner, Jon. 2011. &quot;What's a &quot;Like&quot; Worth?.&quot; Forbes 188, no. 2: 28-30. Academic Search Elite, EBSCOhost (accessed August 16, 2011).&lt;br&gt;[8] http://www.insidefacebook.com/2011/08/16/nielsen-online-campaign-ratings/&lt;br&gt;[9] http://www.insidefacebook.com/2009/09/22/nielsen-deal-part-of-facebooks-ad-momentum/" />
  <row Id="36939" PostHistoryTypeId="2" PostId="16092" RevisionGUID="601e33c9-2fda-4297-8dcf-375e81b6bcca" CreationDate="2011-08-16T22:23:04.323" UserId="9313" Text="Cocos2D. It was recently bought by Zygna who will ensure it gets the professional development it needs long into the future. And it's currently still open source.&#xD;&#xA;&#xD;&#xA;+1 to anyone who recommends it." />
  <row Id="36940" PostHistoryTypeId="2" PostId="16093" RevisionGUID="25db497d-e1b9-4f7f-9d51-bd7eabdba097" CreationDate="2011-08-16T22:42:23.450" UserId="9314" Text="I'm an iPhone app developer. I want to get into iOS gaming. The question is-should I start with learning 2D like Cocos 2D or Corona SDK before learning 3D gaming like Unity? I'm more interested in 3D gaming, but do you think that knowing 2D gaming is a prerequisite to learning 3D development?" />
  <row Id="36941" PostHistoryTypeId="1" PostId="16093" RevisionGUID="25db497d-e1b9-4f7f-9d51-bd7eabdba097" CreationDate="2011-08-16T22:42:23.450" UserId="9314" Text="Should I learn 2d game development before 3d?" />
  <row Id="36942" PostHistoryTypeId="3" PostId="16093" RevisionGUID="25db497d-e1b9-4f7f-9d51-bd7eabdba097" CreationDate="2011-08-16T22:42:23.450" UserId="9314" Text="&lt;2d&gt;&lt;3d&gt;&lt;ios&gt;" />
  <row Id="36943" PostHistoryTypeId="2" PostId="16094" RevisionGUID="82a9b37f-86f2-4d75-9c82-737bb236569d" CreationDate="2011-08-16T22:53:20.690" UserId="9315" Text="I'm currently trying to make a fairly simple game in javascript and it isn't going to well...&#xD;&#xA;&#xD;&#xA;Before I started I thought I'd only need to know three things (on top of what I already know) which were:&#xD;&#xA;1: How to 'spawn' an object (ie a bullet) by pressing an on-screen button.&#xD;&#xA;2: How to make that bullet move across the screen.&#xD;&#xA;3: How to make that bullet collide with something.&#xD;&#xA;&#xD;&#xA;I thought the first two would be pretty simple, but I cannot find anything online to help me with them. Source code and tutorials appear to be either too simple or too complicated, and I'm starting to worry this project will be a lot more complicated than I thought.&#xD;&#xA;&#xD;&#xA;So, can anyone help me do any of the listed things? If so it'd be much appreciated!" />
  <row Id="36944" PostHistoryTypeId="1" PostId="16094" RevisionGUID="82a9b37f-86f2-4d75-9c82-737bb236569d" CreationDate="2011-08-16T22:53:20.690" UserId="9315" Text="Need help making a semi-simple javascript game" />
  <row Id="36945" PostHistoryTypeId="3" PostId="16094" RevisionGUID="82a9b37f-86f2-4d75-9c82-737bb236569d" CreationDate="2011-08-16T22:53:20.690" UserId="9315" Text="&lt;javascript&gt;" />
  <row Id="36946" PostHistoryTypeId="2" PostId="16095" RevisionGUID="1f2cc58a-6684-407c-80ed-41e048328b6e" CreationDate="2011-08-16T22:55:49.293" UserId="9314" Text="I'm reading up on 3D game development for the iPhone. I'm looking into programs like Unity for 3D development. My question is are these the best ways to go for 3D development for the iPhone-Unity or say Shiva? Is it common to use other 3D programs like Maya? What would be the disadvantages of using Maya or 3DsMax-or is this not even a possibility for iPhone development?" />
  <row Id="36947" PostHistoryTypeId="1" PostId="16095" RevisionGUID="1f2cc58a-6684-407c-80ed-41e048328b6e" CreationDate="2011-08-16T22:55:49.293" UserId="9314" Text="iPhone 3D Game Development using Maya?" />
  <row Id="36948" PostHistoryTypeId="3" PostId="16095" RevisionGUID="1f2cc58a-6684-407c-80ed-41e048328b6e" CreationDate="2011-08-16T22:55:49.293" UserId="9314" Text="&lt;3d&gt;&lt;ios&gt;&lt;maya&gt;" />
  <row Id="36949" PostHistoryTypeId="2" PostId="16096" RevisionGUID="c2be4294-c1ef-43ee-a5f6-d8dc8815cce1" CreationDate="2011-08-16T23:25:54.877" UserId="51" Text="Maybe it's just a language barrier but there seems to be some misunderstanding here.&#xD;&#xA;&#xD;&#xA;Maya and Max are 3D model authoring tools.  Either one of these are going to spit out models that pretty much whatever 3D engine you want can use.  It doesn't matter what platform it's going to be on.  How else would you author 3D models for your 3D engine?&#xD;&#xA;&#xD;&#xA;As far as &quot;which one&quot;, well, http://blog.stackoverflow.com/2011/08/gorilla-vs-shark/" />
  <row Id="36950" PostHistoryTypeId="2" PostId="16097" RevisionGUID="c1ec10f1-c362-45d4-9733-379e831559bf" CreationDate="2011-08-16T23:30:48.133" UserId="51" Text="The only fundamental difference between 2D and 3D game development is whether or not you use the 3rd axis.  If you're using an engine like Unity you can just as easily make 2D games as 3D games by simply using an orthographic camera projection and sprites instead of models.  &#xD;&#xA;&#xD;&#xA;That being said, if you're not using an engine that does a lot of the 3D heavy lifting for you, it is a lot harder.  See the answer to this question: http://gamedev.stackexchange.com/questions/631/what-to-consider-when-deciding-on-2d-vs-3d-for-a-game&#xD;&#xA;&#xD;&#xA;What you should do is decide what game you want to make and the art and design will tell you if it needs to be 2D or 3D." />
  <row Id="36952" PostHistoryTypeId="25" PostId="16093" RevisionGUID="8bc72099-7507-4495-bbb1-dfcf0d91b09d" CreationDate="2011-08-17T00:37:25.430" Comment="http://twitter.com/#!/StackGameDev/status/103626450787254273" />
  <row Id="36953" PostHistoryTypeId="2" PostId="16098" RevisionGUID="48c66da7-1ad0-45ad-839f-e0822d59553d" CreationDate="2011-08-17T01:29:33.353" UserId="853" Text="I agree with Tetrad that you should think about the art and design and that will lead you if it needs to be 2D or 3D. I also will say that it may be a good idea to create a 2D game first so that you won't have to think about the harder things that come along with 3D games. Also, one thing to realize is that the brain will process less information with 2D games which is what you want for a more casual experience. &#xD;&#xA;&#xD;&#xA;If you look at most of the successful indie games over the passed 3 years, many of them were 2D. &#xD;&#xA;&#xD;&#xA;http://www.braid-game.com/ &lt;br /&gt;&#xD;&#xA;http://limbogame.org/ &lt;br /&gt;&#xD;&#xA;http://supermeatboy.com/ &lt;br /&gt;&#xD;&#xA;http://www.andyetitmoves.net/&#xD;&#xA;&#xD;&#xA;So a company can be successful making just 2D games. The success of games comes from game mechanics, story, aesthetics, and technology. Otherwise known as the tetrad. I'm getting off topic so I digress." />
  <row Id="36954" PostHistoryTypeId="2" PostId="16099" RevisionGUID="fc8c4fa5-18bf-419d-921a-197e643aaaa2" CreationDate="2011-08-17T01:45:43.077" UserId="853" Text="If you're going to be doing 3D Game Dev on the iPhone I would suggest:&#xD;&#xA;&#xD;&#xA;http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html &lt;br /&gt;&#xD;&#xA;He has code samples that imports models from blender. &#xD;&#xA;&#xD;&#xA;Discussion of 3D Game Engines for iOS:&#xD;&#xA;http://iphonedevelopment.blogspot.com/2011/05/3d-game-and-graphics-engines.html&#xD;&#xA;" />
  <row Id="36955" PostHistoryTypeId="25" PostId="16090" RevisionGUID="f350aff5-b275-495f-96fb-f2f332a78bed" CreationDate="2011-08-17T03:37:26.027" Comment="http://twitter.com/#!/StackGameDev/status/103671750168031232" />
  <row Id="36956" PostHistoryTypeId="2" PostId="16100" RevisionGUID="eaa7e4b5-9070-49aa-912f-1a4a30802aea" CreationDate="2011-08-17T03:38:18.317" UserId="998" Text="__It depends on how strong you are with mathematics,__ _and_ __3D game programming concepts__.&#xD;&#xA;&#xD;&#xA;2D you can get by using only concepts of x,y positions and velocities (and adding and subtracting them - basically vectors) and 2D box collision.&#xD;&#xA;&#xD;&#xA;In 3D, you have to worry about a lot more math:  projection matrices, viewing matrices, frusta..&#xD;&#xA;&#xD;&#xA;In addition, you have to interact with a ___much richer set of functions___ from the drawing API you're using, (just by virtue of the fact that you're doing 3D, so you have to learn a lot more functions that deal with 3D).&#xD;&#xA;&#xD;&#xA;Microsoft XNA has __excellent__ support for starting out in 2D, and makes rendering easy using [SpriteBatch](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritebatch.aspx).  As soon as you venture into 3D, you automatically have to learn [VertexBuffer](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.vertexbuffer.aspx), or [Model](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.model.aspx), and then comes ModelBones and everything else that goes with it.&#xD;&#xA;&#xD;&#xA;You're best off starting 2D just because the concepts you need to grasp is less (2D sprites? A cakewalk!).  After you have some experience under your belt, then you should be fine doing 3D." />
  <row Id="36957" PostHistoryTypeId="5" PostId="16090" RevisionGUID="5671b44b-3aac-498b-9968-99ca4b3928da" CreationDate="2011-08-17T03:51:13.363" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [XNA Tile from Screen Location](http://gamedev.stackexchange.com/questions/16062/xna-tile-from-screen-location)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have a tile based game that is in a semi-isometric view created by a transformation. The tiles are created by a Texture2d rendered on a 3d surface.&#xD;&#xA;&#xD;&#xA;My map Image: http://balancedcms.com/Capture.PNG&#xD;&#xA;&#xD;&#xA;I am using the following code for my transformation:&#xD;&#xA;&#xD;&#xA;    View = Matrix.CreateLookAt(new Vector3(0, -1.1f, 1.6f), new Vector3(0, 0, 0), new Vector3(0, 53, 0));&#xD;&#xA;    Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.Pi - 2.4f, 4.0f / 3.0f, 1, 500);&#xD;&#xA;    &#xD;&#xA;    quadEffect = new BasicEffect(device);&#xD;&#xA;    &#xD;&#xA;    quadEffect.World = Matrix.Identity;&#xD;&#xA;    quadEffect.View = View;&#xD;&#xA;    quadEffect.Projection = Projection;&#xD;&#xA;    quadEffect.TextureEnabled = true;&#xD;&#xA;    &#xD;&#xA;    quad = new Quad(new Vector3(0, 0, 0), Vector3.Backward, Vector3.Up, 3, 3);&#xD;&#xA;&#xD;&#xA;My problem comes along when I attempt to get the current tile that I am hovering the mouse over. I have a mouse X and Y however I can't seem to figure out how to transform these screen coordinates into a tile X and Y. The tiles are 128px by 128px; however, after the camera transformation they are smaller on the top and larger on the bottom(to create the isometric view)&#xD;&#xA;&#xD;&#xA;I've tried transforming the mouse X and Y with the same projection matrix. However, this didn't work. I think it is due to the view matrix not being taken into account... sample below:&#xD;&#xA;&#xD;&#xA;Vector3.Transform(new Vector3(Mouse.GetState().X, Mouse.GetState().Y, 0), Projection);&#xD;&#xA;&#xD;&#xA;This image may provide more information... is also shows the hours I've put into figuring this out: http://balancedcms.com/1111.png&#xD;&#xA;" />
  <row Id="36958" PostHistoryTypeId="10" PostId="16090" RevisionGUID="e33ca212-ff2d-4a6c-ae9c-b91631bef9a1" CreationDate="2011-08-17T03:51:13.130" UserId="14" CloseReasonId="1" Text="[{&quot;Id&quot;:288,&quot;DisplayName&quot;:&quot;Andrew Russell&quot;},{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36959" PostHistoryTypeId="18" PostId="16090" RevisionGUID="3d5817f5-b7c2-4120-ade6-661221331bd6" CreationDate="2011-08-17T03:51:51.647" UserId="14" Comment="to http://gamedev.stackexchange.com/questions/16062/xna-tile-from-screen-location" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36960" PostHistoryTypeId="18" PostId="16062" RevisionGUID="3d5817f5-b7c2-4120-ade6-661221331bd6" CreationDate="2011-08-17T03:51:51.647" UserId="14" Comment="from http://gamedev.stackexchange.com/questions/16090/xna-tile-location-from-screen-location" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36961" PostHistoryTypeId="14" PostId="16090" RevisionGUID="0c6d1311-99d1-4bc1-866a-85e65322e3ab" CreationDate="2011-08-17T03:51:52.163" UserId="14" Text="[{&quot;Id&quot;:14,&quot;DisplayName&quot;:&quot;Noctrine&quot;}]" />
  <row Id="36962" PostHistoryTypeId="5" PostId="16094" RevisionGUID="f2ee2673-facc-4f65-a8b4-f930aa551803" CreationDate="2011-08-17T03:57:00.003" UserId="5060" Comment="formatting" Text="I'm currently trying to make a fairly simple game in JavaScript and it isn't going too well.&#xD;&#xA;&#xD;&#xA;Before I started, I thought I'd only need to know three things (on top of what I already know) which were:&#xD;&#xA;&#xD;&#xA;1. How to 'spawn' an object (i.e. a bullet) by pressing an on-screen button.&#xD;&#xA;2. How to make that bullet move across the screen.&#xD;&#xA;3. How to make that bullet collide with something.&#xD;&#xA;&#xD;&#xA;I thought the first two would be pretty simple, but I cannot find anything online to help me with them. Source code and tutorials appear to be either too simple or too complicated, and I'm starting to worry this project will be a lot more complicated than I thought.&#xD;&#xA;&#xD;&#xA;So, can anyone help me do any of the listed things? If so it'd be much appreciated!" />
  <row Id="36963" PostHistoryTypeId="24" PostId="16094" RevisionGUID="f2ee2673-facc-4f65-a8b4-f930aa551803" CreationDate="2011-08-17T03:57:00.003" Comment="Proposed by 5060 approved by 14 edit id of 652" />
  <row Id="36964" PostHistoryTypeId="2" PostId="16101" RevisionGUID="bfc9b078-4546-403c-a017-81c87b7a6269" CreationDate="2011-08-17T04:01:34.287" UserId="3830" Text="Though the game idea you're talking about is pretty simple, there's a fair bit of work that has to go into coding such a game in JavaScript, or any other language for that matter.&#xD;&#xA;&#xD;&#xA;Fortunately though, there are lots of libraries available that can help you out with a lot of the details, like spawning a bullet, moving it, and detecting when it hits something.&#xD;&#xA;&#xD;&#xA;My advice would be to go check out a JavaScript game library such as jQuery.  jQuery is one of many game libraries available, but it has a good introductory tutorial that you might find useful.&#xD;&#xA;&#xD;&#xA;So if you want to get started with a basic game, head over to http://gamequery.onaluf.org/tutorials/1/ and read the tutorial on creating a basic game with jQuery.  Do the tutorial first as is, and then later modify it to change how the game looks or behaves if you'd like something different.  Working from an existing game (modding as it's called sometimes) is a great way to get started -- a lot better than starting from scratch." />
  <row Id="36965" PostHistoryTypeId="25" PostId="16056" RevisionGUID="a8040749-3542-42e1-bf7d-f7126cff212d" CreationDate="2011-08-17T06:37:25.640" Comment="http://twitter.com/#!/StackGameDev/status/103717047543926784" />
  <row Id="36966" PostHistoryTypeId="5" PostId="16070" RevisionGUID="50a31648-b32d-49f5-9c0f-98801f114faf" CreationDate="2011-08-17T07:33:48.320" UserId="5473" Comment="deleted 1 characters in body" Text="This is a form of the [Packing Problem.][1]&#xD;&#xA;&#xD;&#xA;Here are your options:&#xD;&#xA;&#xD;&#xA; - Brute force it as Gajet has mentioned. This can be aided by doing a pre-evaluation of existing space in your world grid, so as to find maximal axis-aligned bounding boxes. [This article][2] should give you some insight into how one developer applied solutions to the Packing Problem, in regards to packing arbitrarily-sized sprites into a spritesheet.&#xD;&#xA; - Use a more physically-based approach to the Packing Problem; I call this &quot;Place-and-Grow&quot; for lack of having seen a better term elsewhere. Select a single pixel/cell of your bitmap/source grid to place -- I would start with the centremost pixel. Randomly pick a position in your bacgkround bitmap / destination grid, to place it on. Keep randomising till you find an open space (this process can be optimised in other ways). If it is now overlapping a solid pixel eg. on the left side, push it out in the opposite direction instead (same applies vice versa and for top/bottom). If you now find it in an empty space once more, you're good to go to the next step. &quot;Grow&quot; the pixel in in all 8 directions around itself, in terms of the source grid / bitmap. Then go back and repeat the shifting step to ensure it's not overlapping anything. Rinse, repeat. Eventually you will get to a point where either your image is completely drawn in to background space, or you cannot expand it anymore in any direction, and will have to try again. Basically this approach is described as &quot;physical&quot; because you are pushing away from any boundaries you meet -- until such time as the algorithm is done or it falls out because there is no space on any side to push out toward.&#xD;&#xA;&#xD;&#xA;The second &quot;continuous&quot; approach is more organic, and it may in some ways be easier to handle than the large amounts of logic you might have to write for &quot;discrete&quot; Packing Problem solutions (as in the article above). BUT remember that for each subsequent AABB that you &quot;grow&quot; this way to it's maximal size, you will be doing a haphazard, randomised placement -- which may eventually end up being much slower than brute-forcing, as your grid fills up. It will depend on the sparseness of your grid, i.e. the average proportion of filled vs empty cells. If I wanted to do this efficiently, as you seem to, I think I would opt for the first approach. For procedural world generation algorithms, I would find the second approach to be more useful as it would produce more random / less ordered results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Packing_problem&#xD;&#xA;  [2]: http://www.codeproject.com/KB/web-image/rectanglepacker.aspx" />
  <row Id="36967" PostHistoryTypeId="2" PostId="16102" RevisionGUID="1c366ac1-d5f0-4b1c-b514-b4598ee65484" CreationDate="2011-08-17T07:39:59.313" UserId="9318" Text="Say i had a Monster class&#xD;&#xA;&#xD;&#xA;    public class Monster {&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now this class has a set of properties like &#xD;&#xA;&#xD;&#xA;    int health&#xD;&#xA;    int speed&#xD;&#xA;    int weaponDamage&#xD;&#xA;&#xD;&#xA;which details the core information about the monster.&#xD;&#xA;&#xD;&#xA;in addition it also needs gui information stored in the model. probably something like this:&#xD;&#xA;&#xD;&#xA;    int positionX;&#xD;&#xA;    int positionY;&#xD;&#xA;    int positionZ;&#xD;&#xA;    int rotation;&#xD;&#xA;&#xD;&#xA;So let's say those are the main properties in our Monster definition. Now we have a couple of methods that do things (besides data getters and setters).&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;    public void move(){&#xD;&#xA;      //do changes to position.. and rotation variables&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void eventIncomingDamage(Projectile p){&#xD;&#xA;      //Incoming projectile did damage to monster&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void doDamage(Target aTarget){&#xD;&#xA;      //fire off an damage event on target.&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So, my question is, how should one go about separating the different data types and methods in such a way it conforms to separation of concerns? Should i have one MonsterController which has the `move,eventIncomingDamage and doDamage` methods, a Monster class which only has the core information (`health,speed,weaponDamage`) and what about a MonsterRenderer class (view), how should it fit into all this?&#xD;&#xA;&#xD;&#xA;In my example &quot;solution&quot; im thinking along the lines of the MVC pattern. But are there other patterns that should be used in combination or instead?&#xD;&#xA;&#xD;&#xA;How would you go about organizing this code into managable and separated blocks?&#xD;&#xA;&#xD;&#xA;I hope this can start a good discussion around structuring data, actions and events.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="36968" PostHistoryTypeId="1" PostId="16102" RevisionGUID="1c366ac1-d5f0-4b1c-b514-b4598ee65484" CreationDate="2011-08-17T07:39:59.313" UserId="9318" Text="Design pattern on class level, how would do seperation of concerns through mvc or alike?" />
  <row Id="36969" PostHistoryTypeId="3" PostId="16102" RevisionGUID="1c366ac1-d5f0-4b1c-b514-b4598ee65484" CreationDate="2011-08-17T07:39:59.313" UserId="9318" Text="&lt;java&gt;&lt;design-patterns&gt;" />
  <row Id="36970" PostHistoryTypeId="2" PostId="16103" RevisionGUID="b83e5fb1-828d-449d-9c7c-a6a37a0d3e62" CreationDate="2011-08-17T07:48:41.047" UserId="4677" Text="You don't really need to go back that far to find limited devices. As we are on gamedev here, I'd suggest looking at the Nintendo DS with its 67 MHz processor and 4 MB RAM ([see here for some specs][1]).&#xD;&#xA;&#xD;&#xA;While development for the DS is limited to licensed developers, there is a pretty active homebrew scene and there are several emulators. You can also run your programs on the actual device using special gamecards. A really detailed reference can be found [here][2]. The software you need for development is known as devkitARM and can be found [here][3]. There is lots of good information on DS development around the internet.&#xD;&#xA;&#xD;&#xA;However, I can't say anything about the legality of homebrew DS development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Nintendo_ds#Technical_specifications&#xD;&#xA;  [2]: http://nocash.emubase.de/gbatek.htm&#xD;&#xA;  [3]: http://devkitpro.org/" />
  <row Id="36971" PostHistoryTypeId="5" PostId="16082" RevisionGUID="7a3ece72-e352-4896-85bf-d65c5c926091" CreationDate="2011-08-17T07:50:56.120" UserId="9259" Comment="added 539 characters in body" Text="I have tiled map 100*75 and tiles are 32*32 pixel.I want to use batching for performance .I don't figure it out , because of my game needs scrolling and every frame i draw 22*16 tiles (my screen is 20*16 tile) .I thought that batching tiles for every frame .Is it good or any suggestion? &#xD;&#xA;&#xD;&#xA;edit :to more clarify&#xD;&#xA;I want to use occlusion culling and batching at the same time.I thought that drawing only visible areas and batching them together .But there is a something i couldn't figure out .When scrolling screen with translate matrix , if one row become invisible , I bind new row and batch them again.Every batched objects needs to buffer again.So I batch tiles  and buffer to VBO every time when one row become invisible .I don't know these way is efficient or not .This is my question .And i am open to any suggestions." />
  <row Id="36972" PostHistoryTypeId="6" PostId="16102" RevisionGUID="3c0aa400-8903-42ad-9763-7d003b00cfe7" CreationDate="2011-08-17T08:20:04.330" UserId="5473" Comment="edited tags" Text="&lt;java&gt;&lt;design-patterns&gt;&lt;mvc&gt;" />
  <row Id="36973" PostHistoryTypeId="6" PostId="16102" RevisionGUID="69e12705-62d8-4762-a8c1-18b5d0335d48" CreationDate="2011-08-17T08:20:21.053" UserId="5473" Comment="edited tags" Text="&lt;architecture&gt;&lt;java&gt;&lt;design-patterns&gt;&lt;mvc&gt;" />
  <row Id="36974" PostHistoryTypeId="25" PostId="16094" RevisionGUID="a55b0e8c-d390-41a9-b7bd-83106b72966c" CreationDate="2011-08-17T09:37:25.283" Comment="http://twitter.com/#!/StackGameDev/status/103762345540599808" />
  <row Id="36975" PostHistoryTypeId="2" PostId="16104" RevisionGUID="bebf0dd6-c0cf-41d7-8381-11ee76aa44b2" CreationDate="2011-08-17T09:44:53.410" UserId="5473" Text="Each entity consists (as you said) of&#xD;&#xA;&#xD;&#xA; 1. EntityModel&#xD;&#xA; 2. EntityRenderData&#xD;&#xA; 3. EntityController&#xD;&#xA;&#xD;&#xA;To process these:&#xD;&#xA;&#xD;&#xA; 1. Have a GameController class which runs all core logic by running through every EntityController on each update.&#xD;&#xA; 2. Have a GameView class which extracts necessary rendering information from each EntityRenderData&#xD;&#xA;&#xD;&#xA;(For both of the above, you can add custom logic that runs aside from entity processing.)&#xD;&#xA;&#xD;&#xA;You can also have a GameModel which holds your &quot;current&quot; entity list, your &quot;just added&quot; entity list and your &quot;to remove&quot; entity list. You update your &quot;current&quot; list at the end of each Controller update by removing those &quot;to remove&quot; and adding those &quot;to add&quot;. It can further add more general world data that doesn't specifically apply to entities, if necessary.&#xD;&#xA;&#xD;&#xA;As an aside, you can have your GameController and your GameView on the same or separate timers in order to update. Separate is good if you want to decouple view updates from logical updates as suggested by [Gaffer][1].&#xD;&#xA;&#xD;&#xA;You'll obviously need to use dependency injection at the appropriate times to ensure everything has a reference to everything else (V-&gt;M, C-&gt;M, C-&gt;V) at both the Game and Entity levels.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="36976" PostHistoryTypeId="5" PostId="16104" RevisionGUID="b01e8fdd-24a2-4777-9308-eecc0a7d334b" CreationDate="2011-08-17T10:20:17.300" UserId="5473" Comment="added 24 characters in body" Text="One way of doing it:&#xD;&#xA;&#xD;&#xA;Each entity consists (as you said) of&#xD;&#xA;&#xD;&#xA; 1. EntityModel&#xD;&#xA; 2. EntityRenderData&#xD;&#xA; 3. EntityController&#xD;&#xA;&#xD;&#xA;To process these:&#xD;&#xA;&#xD;&#xA; 1. Have a GameController class which runs all core logic by running through every EntityController on each update.&#xD;&#xA; 2. Have a GameView class which extracts necessary rendering information from each EntityRenderData&#xD;&#xA;&#xD;&#xA;(For both of the above, you can add custom logic that runs aside from entity processing.)&#xD;&#xA;&#xD;&#xA;You can also have a GameModel which holds your &quot;current&quot; entity list, your &quot;just added&quot; entity list and your &quot;to remove&quot; entity list. You update your &quot;current&quot; list at the end of each Controller update by removing those &quot;to remove&quot; and adding those &quot;to add&quot;. It can further add more general world data that doesn't specifically apply to entities, if necessary.&#xD;&#xA;&#xD;&#xA;As an aside, you can have your GameController and your GameView on the same or separate timers in order to update. Separate is good if you want to decouple view updates from logical updates as suggested by [Gaffer][1].&#xD;&#xA;&#xD;&#xA;You'll obviously need to use dependency injection at the appropriate times to ensure everything has a reference to everything else (V-&gt;M, C-&gt;M, C-&gt;V) at both the Game and Entity levels.&#xD;&#xA;&#xD;&#xA;  [1]: http://gafferongames.com/game-physics/fix-your-timestep/" />
  <row Id="36977" PostHistoryTypeId="2" PostId="16105" RevisionGUID="1c4bb0cc-54fd-4c52-a137-f27b37f0cda1" CreationDate="2011-08-17T11:09:19.477" UserId="7737" Text="I have coded for a video player using Slimdx and Directshow library and is displaying my video on a texture of Slimdx.But i am getting a problem of tearing in my video when i am trying to play a high definition video, but my player is working fine when a normal video plays. I am extracting the frames using ISampleGrabberCB interface in directshow and storing them in a new byte and then writing the new byte on the texture whenever a new frame is available. Can anyone help me out to solve my problem or can tell me how can I code for a video player using Slimdx texture and DirectShow library which does not cause any tearing while playing a high definition video. " />
  <row Id="36978" PostHistoryTypeId="1" PostId="16105" RevisionGUID="1c4bb0cc-54fd-4c52-a137-f27b37f0cda1" CreationDate="2011-08-17T11:09:19.477" UserId="7737" Text="Problem of tearing in Slimdx and DirectShow video" />
  <row Id="36979" PostHistoryTypeId="3" PostId="16105" RevisionGUID="1c4bb0cc-54fd-4c52-a137-f27b37f0cda1" CreationDate="2011-08-17T11:09:19.477" UserId="7737" Text="&lt;directx&gt;&lt;slimdx&gt;&lt;video&gt;" />
  <row Id="36980" PostHistoryTypeId="4" PostId="16102" RevisionGUID="193d22b2-3f2a-4ada-ae16-ec55f1b55c98" CreationDate="2011-08-17T11:10:48.897" UserId="8400" Comment="corrected spelling and clarified meaning in title" Text="Design pattern on class level, how to do separation of concerns through mvc or alike?" />
  <row Id="36981" PostHistoryTypeId="24" PostId="16102" RevisionGUID="193d22b2-3f2a-4ada-ae16-ec55f1b55c98" CreationDate="2011-08-17T11:10:48.897" Comment="Proposed by 8400 approved by 20 edit id of 653" />
  <row Id="36987" PostHistoryTypeId="25" PostId="16055" RevisionGUID="e90e3dce-15e7-4f91-aa06-46f44047e29e" CreationDate="2011-08-17T12:37:25.957" Comment="http://twitter.com/#!/StackGameDev/status/103807645009461250" />
  <row Id="36988" PostHistoryTypeId="2" PostId="16107" RevisionGUID="cba6954d-fe5b-4b84-a630-0c4a259ed3f6" CreationDate="2011-08-17T12:49:27.017" UserId="9245" Text="I would create a main table Cards with the fields: (pk - primary key | fk - foreign key)&#xD;&#xA;&#xD;&#xA; - -card_id (pk)&#xD;&#xA; - -name&#xD;&#xA; - -description&#xD;&#xA; - -type (creature, spell, trap, quest)&#xD;&#xA; - -health&#xD;&#xA; - -strength&#xD;&#xA; - -ability_id 1 (fk)&#xD;&#xA; - -ability_id 2 (fk)&#xD;&#xA; - -ability_id 3 (fk)&#xD;&#xA; - -ability_id 4 (fk)&#xD;&#xA; - -spelleffect_id (fk)&#xD;&#xA; - -trapeffect_id (fk)&#xD;&#xA; - -quest_id (fk)&#xD;&#xA;&#xD;&#xA;Then I would create tables like AbilityEffects, SpellEffects, TrapEffects, Quests&#xD;&#xA;If a spellcard does not have health then you can just leave it null&#xD;&#xA;&#xD;&#xA;For the decks I think you will need a table PlayerDecks with deck_id (pk), player_id (fk). And a table DeckCards with deckcard_id (pk), deck_id (fk), card_id (fk)&#xD;&#xA;(example: if the player has 40 cards in his first deck, then in PlayerDecks you have 1 row with the deck_id and player_id, and in DeckCards you have 40 rows)&#xD;&#xA;&#xD;&#xA;There are other ways too but I would do like this because a deck can contain a card multiple times" />
  <row Id="36989" PostHistoryTypeId="5" PostId="16055" RevisionGUID="f70d2c5f-d74b-42bc-9f6c-8222236cc9c8" CreationDate="2011-08-17T13:31:38.047" UserId="20" Comment="formatting for readability, minor spelling changes." Text="Just started and after pondering with registered users' table everything came to a halt.&#xD;&#xA;&#xD;&#xA;So far I've got:&#xD;&#xA;&#xD;&#xA;    +----------------------+&#xD;&#xA;    | tblUsers             |&#xD;&#xA;    +----------------------+&#xD;&#xA;    | userID(primaryKey)   |&#xD;&#xA;    | username             |&#xD;&#xA;    | password *           |&#xD;&#xA;    | accountStatus **     |&#xD;&#xA;    +----------------------+&#xD;&#xA;&#xD;&#xA;    * hashed&#xD;&#xA;    ** 0=not activated, 1=activated, 2=suspended&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Still haven't decided on each of the field's data type. But the question is: should I have one big massive table for all the cards or split them into say `tblCreatures`, `tblSpells`, `tblTraps`, `tblQuests` tables? &#xD;&#xA;&#xD;&#xA;Plus, for example, some of the creatures have special abilities besides the usual strength and health stats. So I assume if there was `tblCreatures`, it would have  `cardTitle`, `cardStrength`, `cardHealth`, `cardDescription` and then it would have `cardAbility0...4`, because I doubt that a single creature card can have more than 2 abilities? &#xD;&#xA;&#xD;&#xA;Also how would I contain each user's decks? A single user for example can have up to 10 decks created by themselves, which will be saved on the server.&#xD;&#xA;&#xD;&#xA;Any suggestions/remarks?&#xD;&#xA;&#xD;&#xA;The project will either be purely written in C# (both client and server) and XNA4, or maybe in the future the client will be ported to Flash+AS3 while server will be done in C#." />
  <row Id="36990" PostHistoryTypeId="4" PostId="16055" RevisionGUID="f70d2c5f-d74b-42bc-9f6c-8222236cc9c8" CreationDate="2011-08-17T13:31:38.047" UserId="20" Comment="formatting for readability, minor spelling changes." Text="Database structure for a trading cards video game (TCG)" />
  <row Id="36991" PostHistoryTypeId="5" PostId="16083" RevisionGUID="82967be4-4339-4551-ab05-fdb3e0afd758" CreationDate="2011-08-17T13:50:29.690" UserId="3505" Comment="added 125 characters in body" Text="What tools are you using, what platforms do you intend to release for? Most probably it doesn't really matter how you do the drawing, unless you use some really obscure technique a modern computer should be plenty fast.&#xD;&#xA;&#xD;&#xA;Try out your options, flicking together a benchmark to find out how fast the different options are shouldn't be too hard." />
  <row Id="36992" PostHistoryTypeId="2" PostId="16108" RevisionGUID="1ab88415-22cc-4e99-b5d5-694eb812aace" CreationDate="2011-08-17T13:54:04.427" UserId="5006" Text="I'm working on a TCG myself, so I have a little bit of experience with it.&#xD;&#xA;&#xD;&#xA;I would have a base &quot;Card&quot; table which would have the columns common to all cards, such as Name, Description, CastingCost or whatever.&#xD;&#xA;&#xD;&#xA;Then for each type you'd have the type specific columns which would foreign key to the Card table.  The CardId can be both PK and FK in the Creature/Spell/Trap/Quest table.&#xD;&#xA;&#xD;&#xA;You can either have an explicit &quot;CardType&quot; column, or you can simply say that if the CardId is in the Creature table, then it's a creature.&#xD;&#xA;&#xD;&#xA;As far as decks go, I have a CardInstance table which represents a specific card instance that a user owns, then I have a table called joining table between that and Deck (For lack of a better name, it's Deck_CardInstance) that represents a card in a specific deck.  This allows a specific card instance to be in multiple decks.  &#xD;&#xA;&#xD;&#xA;You may or may not want this, but if someone wants to share a rare card they own between decks, they're going to do so by swapping which deck the card's in anyway.  Might as well make it less annoying for them.  The other benefit of this is that a CardInstance may be in no deck.  The user hasn't organized it into a deck yet.&#xD;&#xA;&#xD;&#xA;In this setup it's assumed that a deck and a card instance belongs to a single user, which seems like a safe assumption.  &#xD;&#xA;&#xD;&#xA;Below is a database diagram similar to what I'm using but simplified to your example. (For instance I don't know if you just have ability names that match to abilities in code or if you have data-driven abilities stored in the database.)&#xD;&#xA;&#xD;&#xA;![TCG Diagram][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/IwyDz.png" />
  <row Id="36993" PostHistoryTypeId="2" PostId="16109" RevisionGUID="2d16d588-a09b-4d47-b8b7-cc9000bb2cdf" CreationDate="2011-08-17T14:07:10.973" UserId="3505" Text="I say go for modern X86, just because the processor is fast doesn't mean you can't benchmark and optimize. And really, it is not just more useful to know a modern architecture, the new processors also have a quite different performance profile.&#xD;&#xA;&#xD;&#xA;In the old days a processor would primarily be limited by it's ability to perform calculations, today it is much more important how fast it can access data and resolve branch instructions, because getting plenty high performance in raw calculations is no feat.&#xD;&#xA;&#xD;&#xA;At best learning an old architecture would be a waste of time, at worst you teach yourself the wrong stuff and end up writing slower code for modern computers." />
  <row Id="36994" PostHistoryTypeId="2" PostId="16110" RevisionGUID="04984e0d-3c0a-4391-b02c-3e982ae1f8f3" CreationDate="2011-08-17T14:26:01.607" UserId="6588" Text="Keep in mind, it will be simpler for you to get 2D art assets to practice with. So while I don't think learning 2D game development is a prerequisite to learning 3D game development (either way the game code on top of the graphics code is pretty much the same) I would still recommend most beginners start with 2D games unless you already have a solid resource for 3D graphics (eg. you'll be learning alongside a buddy who is a 3D artist).&#xD;&#xA;&#xD;&#xA;Code-wise, the difficulty depends on what you are trying to learn and what engine you will be using (and in particular if you will be writing your own engine). Low-level 3D graphics code is much more complicated than low-level 2D graphics code, but if you will be using an engine like Unity then you won't be writing low-level graphics code. The code for a 3D game built in that engine is no more complicated than the code for a 2D game. Indeed, it may be considerably less complicated, depending again on the specific engine you are talking about." />
  <row Id="36995" PostHistoryTypeId="5" PostId="16105" RevisionGUID="90f17da8-4939-41e9-a39b-99cd724f8f37" CreationDate="2011-08-17T14:40:32.840" UserId="4546" Comment="Corrected grammar, reformatted question, removed redundant statements, linked docs." Text="I have written a video player using SlimDX and DirectShow which is displaying the video on a SlimDX texture.&#xD;&#xA;&#xD;&#xA;I am extracting the video frames using the [ISampleGrabberCB](http://msdn.microsoft.com/en-us/library/dd376985%28v=vs.85%29.aspx) interface from DirectShow and storing them in a byte array, writing the array into the texture whenever a new frame is available.&#xD;&#xA;&#xD;&#xA;The problem is that my video is exhibiting tearing when playing a high definition video, but displays correctly for normal video playback, what can the causes for this problem be, and what possible solutions are there for displaying high definition video from DirectShow via SlimDX?" />
  <row Id="36996" PostHistoryTypeId="24" PostId="16105" RevisionGUID="90f17da8-4939-41e9-a39b-99cd724f8f37" CreationDate="2011-08-17T14:40:32.840" Comment="Proposed by 4546 approved by 14 edit id of 654" />
  <row Id="36997" PostHistoryTypeId="5" PostId="16101" RevisionGUID="9c041206-5bff-49a3-99c4-95ec9769adc2" CreationDate="2011-08-17T14:48:14.573" UserId="3830" Comment="added 24 characters in body" Text="Though the game idea you're talking about is pretty simple, there's a fair bit of work that has to go into coding such a game in JavaScript, or any other language for that matter.&#xD;&#xA;&#xD;&#xA;Fortunately though, there are lots of libraries available that can help you out with a lot of the details, like spawning a bullet, moving it, and detecting when it hits something.&#xD;&#xA;&#xD;&#xA;My advice would be to go check out a JavaScript game library such as gameQuery.  gameQuery is one of many game libraries available, and it has a good introductory tutorial that you might find useful.&#xD;&#xA;&#xD;&#xA;So if you want to get started with a basic game, head over to http://gamequery.onaluf.org/tutorials/1/ and read the tutorial on creating a basic game with gameQuery and JavaScript.  Do the tutorial first as is, and then later modify it to change how the game looks or behaves if you'd like something different.  Working from an existing game (modding as it's called sometimes) is a great way to get started -- a lot better than starting from scratch." />
  <row Id="36998" PostHistoryTypeId="25" PostId="16102" RevisionGUID="e448c374-5e06-42d8-88dc-ff3b644d7107" CreationDate="2011-08-17T15:37:25.727" Comment="http://twitter.com/#!/StackGameDev/status/103852943425544192" />
  <row Id="36999" PostHistoryTypeId="10" PostId="14839" RevisionGUID="52c87aac-e222-40ca-b60d-ed541db765e9" CreationDate="2011-08-17T15:46:51.033" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37000" PostHistoryTypeId="2" PostId="16111" RevisionGUID="418aab9e-c5ee-4eba-b0f9-7e12b280ec58" CreationDate="2011-08-17T16:54:28.043" UserId="2897" Text="Let's stir up the discussion with a somewhat provocative point of view. It's possible for a mind to create abstractions as beautiful as a crystal castle in the sky, and in many games it would be just as useful.&#xD;&#xA;&#xD;&#xA;Personally, I found it quite beneficial for game architectures to &quot;flow from below&quot;: first think about data, then about feasible limitations of various kinds, and only after that think about ways of manipulating said data, instead of conjuring up some architecture based on a currently opened page of a book about patterns. That way your code will be structured and effective in a way most optimal for your game and your task. Otherwise it is a potential end in a Procrustean bed of patterns and imaginary data. It's not that bad, especially for an enterprise application with a team of fellow developers on an outsorce basis, maybe even for beginner game developer, but we can do better. For an example on a code organization of a very complex game I would recommend looking at &quot;Jagged Alliance 2&quot; sources. It's definitely not the most beautiful thing in the world, but since it's basically naked functions operating on data, it shows a way of game development from times when patterned thought process wasn't a devotion.&#xD;&#xA; &#xD;&#xA;Let's say we're developing a pathfinding for a turn-based strategy. In theory it's possible to make the pathfinding architecture ideal and abstract to the point where we can make a RTS instead of a TBS using the same architecture with ease. Do we need to do that? Pathfinding for a single unit of fixed size in a turn-based tactical game with small fixed map has substantially different data from a pathfinding for a lot of units with different sizes and traversal capabilities in real time strategy with dynamic map of large size. So in reality such approach will yield us a slower pathfinding, which will frustrate gamers, with more entities than needed for an actual task, which will frustrate developers, and only a limited ability to be more agile before it would be needed to rewrite a pathfinding engine. So nope, we don't need to design overly complex interactions to support something illusional unless developing a generic game engine or construction set.&#xD;&#xA;&#xD;&#xA;Back to the original monster case. The most obvious, clear and blatantly generic way to express intent of moving a monster would be:&#xD;&#xA;&#xD;&#xA;     monster.Move(position); &#xD;&#xA;     // or oif there is a reason for logic extraction, &#xD;&#xA;     MoveEngine.Move(monster, position).&#xD;&#xA;&#xD;&#xA;It's good for a game where you often move single monsters around by hand, i gueess. &#xD;&#xA;&#xD;&#xA;But what if our game is about wasps, and they come in numbers, and if even a single wasp comes somewhere, other needs to be notified to come after him soon? And wasps are actually controlled by evil wasp hiveminds competing for power? Moving a single monster would become like a 1% of all move cases; it's counter-productive to guide every wasp manually, and now moving intent expressed like this: &#xD;&#xA;&#xD;&#xA;    enemyHivemind.CurrentAI.AddNewTask(new ScoutTask(position)); &#xD;&#xA;&#xD;&#xA;Then AI engine will check that swarm can move, has scouts, can find path to the position, and create appropriate move behaviour it the to-do list with the highest priority, which will be executed the nearest update, where it fill finally move that single scout one way or the other, it doesn't matter to us much. Needless to say, all movement routines and pathfinding would be optimized for a swarm movement, not for a single unit.&#xD;&#xA;&#xD;&#xA;You see in our mind we started with a generic single monster as a main entity, but with the actual game in mind it quickly can become just a small and insignificant part of something greater, basically a set of data for others to operate on.&#xD;&#xA;&#xD;&#xA;**So the main point is, think about your data, write a design document first, choose your architecture later**, and it will be a good choice whether you decide to use naked objects, MVC, PAC, MVP, SOA, event-driven entity systems or not — in your mind you've already won." />
  <row Id="37001" PostHistoryTypeId="2" PostId="16112" RevisionGUID="318f59b9-a3ce-4b00-b451-492d6f94f3ba" CreationDate="2011-08-17T17:02:25.413" UserId="1839" Text="There is a conceptual misunderstanding in your question. positionX is to the same degree a &quot;core&quot; property as health or speed is. In fact, speed is nothing else than the length of the rate-of-change-vector of the position. &#xD;&#xA;&#xD;&#xA;This conceptual wrong distinction leads to a bad design. The update logic and the render logic uses the same properties, i.e. position, rotation and even health. health can be rendered as a number above the pawn, there is no fundamental difference between those properties. Using MVC here is forcing a design pattern into data rather than the other way around, drawing a line where no such line exists.&#xD;&#xA;&#xD;&#xA;    How would you go about organizing this code into managable and separated blocks?&#xD;&#xA;&#xD;&#xA;This data from your question:&#xD;&#xA; &#xD;&#xA;    int health&#xD;&#xA;    int speed&#xD;&#xA;    int weaponDamage&#xD;&#xA;    int positionX;&#xD;&#xA;    int positionY;&#xD;&#xA;    int positionZ;&#xD;&#xA;    int rotation;&#xD;&#xA;&#xD;&#xA;simple belongs into 1 class. Don't over engineer, don't put unnecessary layers of complexity." />
  <row Id="37002" PostHistoryTypeId="17" PostId="16113" RevisionGUID="b109b746-f5b7-4688-88f8-1fbfcd204b0a" CreationDate="2011-08-17T17:03:31.927" UserId="-1" Comment="from http://stackoverflow.com/questions/7087089/xna-2d-transform-matrix-scale-at-zoom-question" Text="" />
  <row Id="37003" PostHistoryTypeId="2" PostId="16113" RevisionGUID="394e4338-f5f4-4e4c-9d24-e51557a51f2d" CreationDate="2011-08-17T01:38:00.943" UserId="9326" UserDisplayName="RogueDeus" Text="This is the complete code I am currently using for my camera. It is incomplete and only partially understood by me (I am working off an example), but I have managed to hack some functionality with some brute force, only to realize I went about it all wrong. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Text;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;&#xD;&#xA;    namespace _2DCameraPractice&#xD;&#xA;    {&#xD;&#xA;      class Camera&#xD;&#xA;      {&#xD;&#xA;        int speed;&#xD;&#xA;        int maxZoom;&#xD;&#xA;        float zoom;&#xD;&#xA;        float rotation;&#xD;&#xA;        bool moveToWorldPoint;&#xD;&#xA;        bool keyPressed;&#xD;&#xA;&#xD;&#xA;        Game game;&#xD;&#xA;        GraphicsDevice graphicsDevice;&#xD;&#xA;        Camera camera;&#xD;&#xA;        Matrix matrixTransform;&#xD;&#xA;&#xD;&#xA;        Vector2 cameraPosition;&#xD;&#xA;        Vector2 worldPoint;&#xD;&#xA;&#xD;&#xA;        KeyboardState currKeyboardState;&#xD;&#xA;        MouseState currMouseState;&#xD;&#xA;        MouseState prevMouseState;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Camera(Game game, GraphicsDevice graphicsDevice)&#xD;&#xA;        {&#xD;&#xA;            this.game = game;&#xD;&#xA;            this.graphicsDevice = graphicsDevice;&#xD;&#xA;            zoom = 1;&#xD;&#xA;            maxZoom = 5;&#xD;&#xA;            rotation = 0;&#xD;&#xA;            cameraPosition = Vector2.Zero;&#xD;&#xA;            camera = this;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public float Zoom&#xD;&#xA;        {&#xD;&#xA;            get { return zoom; }&#xD;&#xA;            // Negative flips image&#xD;&#xA;            set { zoom = value; if (zoom &lt; 0.1f) zoom = 0.1f; } &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public float Rotation&#xD;&#xA;        {&#xD;&#xA;            get { return rotation; }&#xD;&#xA;            set { rotation = value; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Vector2 Position&#xD;&#xA;        {&#xD;&#xA;            get { return cameraPosition; }&#xD;&#xA;            set { cameraPosition = value; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        Vector2 CamCenterOffset&#xD;&#xA;        {&#xD;&#xA;            get { return new Vector2(game.Window.ClientBounds.Height &#xD;&#xA;                / 2, game.Window.ClientBounds.Width / 2); }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        Vector2 CamCenterInWorld&#xD;&#xA;        {&#xD;&#xA;            get { return cameraPosition + CamCenterOffset; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        Vector2 MouseCursorInWorld&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                currMouseState = Mouse.GetState();&#xD;&#xA;                return cameraPosition + new Vector2(currMouseState.X,&#xD;&#xA;                    currMouseState.Y);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public void Direction(Vector2 direction)&#xD;&#xA;        {&#xD;&#xA;            cameraPosition += direction;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Matrix Transform(GraphicsDevice graphicsDevice)&#xD;&#xA;        {&#xD;&#xA;            float ViewportWidth = graphicsDevice.Viewport.Width;&#xD;&#xA;            float ViewportHeight = graphicsDevice.Viewport.Height;&#xD;&#xA;&#xD;&#xA;            matrixTransform =&#xD;&#xA;              Matrix.CreateTranslation(new Vector3(-cameraPosition.X, -cameraPosition.Y, 0)) *&#xD;&#xA;                  Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;                  Matrix.CreateScale(new Vector3(Zoom, Zoom, 1)) *&#xD;&#xA;                  //Matrix.CreateScale(Zoom) *&#xD;&#xA;                  Matrix.CreateTranslation(&#xD;&#xA;                        new Vector3(ViewportWidth * 0.5f, ViewportHeight * 0.5f, 0));&#xD;&#xA;            return matrixTransform;&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        //Zoom in to mouse cursor.&#xD;&#xA;        private Vector2 ZoomToMouse(Vector2 mousePos, Vector2 cameraPos)&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            Vector2 newCamPosition = cameraPos + ((mousePos - CamCenterOffset) / 3);&#xD;&#xA;            &#xD;&#xA;            //Need to figure a way to center mouse on screen as zooming.&#xD;&#xA;&#xD;&#xA;            return newCamPosition;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        private void CenterMouseOnZoom(Vector2 mousePos)&#xD;&#xA;        {&#xD;&#xA;            //The farther from center the cursor is, the more shifts it takes to center&#xD;&#xA;            bool shift = false;&#xD;&#xA;            int X = 0;&#xD;&#xA;            int Y = 0;&#xD;&#xA;&#xD;&#xA;            //If the X axis is within 100 units of center, jump once. &#xD;&#xA;            if ( (mousePos.X - CamCenterOffset.X) &lt;= 100&#xD;&#xA;                &amp;&amp; (mousePos.X - CamCenterOffset.X) &gt;= -100)&#xD;&#xA;            {&#xD;&#xA;                shift = true;&#xD;&#xA;                X = (int)CamCenterOffset.X;&#xD;&#xA;                //Mouse.SetPosition((int)GetCamCenterInView.X, Y);&#xD;&#xA;            }&#xD;&#xA;            if ((mousePos.Y - CamCenterOffset.Y) &lt;= 100&#xD;&#xA;                &amp;&amp; (mousePos.Y - CamCenterOffset.Y) &gt;= -100)&#xD;&#xA;            {&#xD;&#xA;                shift = true;&#xD;&#xA;                Y = (int)CamCenterOffset.Y;&#xD;&#xA;            }&#xD;&#xA;            if(shift)&#xD;&#xA;                Mouse.SetPosition(X, Y);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        public void CameraControlls()&#xD;&#xA;        {&#xD;&#xA;            MouseControl();&#xD;&#xA;&#xD;&#xA;            KeyboardControl();&#xD;&#xA;            KeyboardSpecials();&#xD;&#xA;            &#xD;&#xA;            //Camera special commands&#xD;&#xA;            if (moveToWorldPoint == true)&#xD;&#xA;                CenterCameraOnWorldPoint();&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        private void KeyboardSpecials()&#xD;&#xA;        {&#xD;&#xA;            //Output camera and mouse coordinate details.&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Space))&#xD;&#xA;            {   //Bool check to prevent repeat outputs.&#xD;&#xA;                if(!keyPressed)&#xD;&#xA;                {&#xD;&#xA;                    System.Console.WriteLine(&quot;Camera : &quot; + cameraPosition);&#xD;&#xA;                    System.Console.WriteLine(&quot;Zoom   : &quot; + camera.Zoom);&#xD;&#xA;                    System.Console.WriteLine(&quot;InWorld: &quot; + CamCenterInWorld + &quot;Camera&quot;);&#xD;&#xA;                    System.Console.WriteLine();&#xD;&#xA;                    System.Console.WriteLine(&quot;WorldPT: &quot; + worldPoint);&#xD;&#xA;                    System.Console.WriteLine(&quot;InWOrld: &quot; + MouseCursorInWorld + &quot;Mouse&quot;);&#xD;&#xA;                    System.Console.WriteLine();&#xD;&#xA;                    System.Console.WriteLine();&#xD;&#xA;                    keyPressed = true;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if(currKeyboardState.IsKeyUp(Keys.Space))&#xD;&#xA;                keyPressed = false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        private void KeyboardControl()&#xD;&#xA;        {&#xD;&#xA;            //Camera movement (Keyboard)&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Right) || currKeyboardState.IsKeyDown(Keys.A))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(-(1 * speed), 0));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Left) || currKeyboardState.IsKeyDown(Keys.D))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(1 * speed, 0));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Up) || currKeyboardState.IsKeyDown(Keys.S))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(0, 1 * speed));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Down) || currKeyboardState.IsKeyDown(Keys.W))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(0, -(1 * speed)));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            //Camera zoom (Keyboard)&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Z))&#xD;&#xA;                camera.Zoom += 0.1f;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.X))&#xD;&#xA;                camera.Zoom -= 0.1f;&#xD;&#xA;&#xD;&#xA;            //Camera rotation (Keyboard)&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.C))&#xD;&#xA;                camera.Rotation += 0.1f;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.V))&#xD;&#xA;                camera.Rotation -= 0.1f;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Home))&#xD;&#xA;                camera.Rotation = 0.0f;&#xD;&#xA;&#xD;&#xA;            //Speed up scroll when zoomed way out.&#xD;&#xA;            if(camera.Zoom &lt; 0.2)&#xD;&#xA;                speed = 1 + ((1 - (int)camera.Zoom) * 40);&#xD;&#xA;            else if(camera.Zoom &lt; 0.4)&#xD;&#xA;                speed = 1 + ((1 - (int)camera.Zoom) * 20);&#xD;&#xA;            else if(camera.Zoom &lt; 0.7)&#xD;&#xA;                speed = 1 + ((1 - (int)camera.Zoom) * 8);&#xD;&#xA;            else if(camera.Zoom &lt; 1)&#xD;&#xA;                speed = 2 + ((1 - (int)camera.Zoom) * 4);&#xD;&#xA;            else&#xD;&#xA;                speed = 6 - (int)camera.Zoom;&#xD;&#xA;            if(speed &lt; 1)&#xD;&#xA;                speed = 1;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        private void MouseControl()&#xD;&#xA;        {&#xD;&#xA;            Vector2 mousePosition = new Vector2(currMouseState.X, currMouseState.Y);&#xD;&#xA;&#xD;&#xA;            //Enable moveTo for world Point on [L.CTRL + L.Click] if mouse is inside &#xD;&#xA;            // window bounds.&#xD;&#xA;            if (currMouseState.LeftButton == ButtonState.Pressed&#xD;&#xA;                &amp;&amp; mousePosition.X &gt;= 0 &amp;&amp; mousePosition.Y &gt;= 0&#xD;&#xA;                &amp;&amp; mousePosition.X &lt;= game.Window.ClientBounds.Width&#xD;&#xA;                &amp;&amp; mousePosition.Y &lt;= game.Window.ClientBounds.Height)&#xD;&#xA;&#xD;&#xA;            {&#xD;&#xA;                //SetWorldPoint(MouseCursorInWorld);&#xD;&#xA;                SetWorldPoint(MouseCursorInWorld);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Enable moveTo for world Point on [L.CTRL + L.Click]&#xD;&#xA;            if(currMouseState.LeftButton == ButtonState.Pressed&#xD;&#xA;                &amp;&amp; currKeyboardState.IsKeyDown(Keys.LeftControl))&#xD;&#xA;            //if (currKeyboardState.IsKeyDown(Keys.LeftControl))&#xD;&#xA;            {&#xD;&#xA;                moveToWorldPoint = true;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Camera zoom (MouseWheel)&#xD;&#xA;            //Mouse wheel is (up to) ~120 points per click... No shit.&#xD;&#xA;            if(currMouseState.ScrollWheelValue &lt; prevMouseState.ScrollWheelValue)&#xD;&#xA;            {&#xD;&#xA;                //Holding shift while zooming 10+ times more sensative.&#xD;&#xA;                if(currKeyboardState.IsKeyDown(Keys.LeftShift))&#xD;&#xA;                {&#xD;&#xA;                    camera.Zoom += (float)((prevMouseState.ScrollWheelValue -&#xD;&#xA;                        currMouseState.ScrollWheelValue) / 10) * 0.001f;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    camera.Zoom -= (float)((prevMouseState.ScrollWheelValue -&#xD;&#xA;                        currMouseState.ScrollWheelValue) / 10) * 0.015f;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if(currMouseState.ScrollWheelValue &gt; prevMouseState.ScrollWheelValue)&#xD;&#xA;            {&#xD;&#xA;                if(camera.Zoom &lt;= maxZoom) &#xD;&#xA;                {&#xD;&#xA;                    if(currKeyboardState.IsKeyDown(Keys.LeftShift))&#xD;&#xA;                    {&#xD;&#xA;                        camera.Zoom -= (float)((currMouseState.ScrollWheelValue -&#xD;&#xA;                            prevMouseState.ScrollWheelValue) / 10) * 0.001f;&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        camera.Zoom += (float)((currMouseState.ScrollWheelValue -&#xD;&#xA;                            prevMouseState.ScrollWheelValue) / 10) * 0.015f;&#xD;&#xA;&#xD;&#xA;                        //Reposition camera towards cursor durring zoom.&#xD;&#xA;     //                   cameraPosition = ZoomToMouse(mousePosition, cameraPosition);&#xD;&#xA;     //                   CenterMouseOnZoom(mousePosition);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            prevMouseState = currMouseState;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        private void SetWorldPoint(Vector2 worldPoint)&#xD;&#xA;        {&#xD;&#xA;            this.worldPoint = worldPoint;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        private void CenterCameraOnWorldPoint()&#xD;&#xA;        {&#xD;&#xA;            int pixelsLarge = 10;&#xD;&#xA;            int pixelsFine = 1;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Shift Left&#xD;&#xA;            if (worldPoint.X &lt; (cameraPosition.X + CamCenterOffset.X)&#xD;&#xA;                &amp;&amp; (cameraPosition.X + CamCenterOffset.X) - worldPoint.X &gt; 20)&#xD;&#xA;                cameraPosition.X -= pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.X -= pixelsFine;&#xD;&#xA;&#xD;&#xA;            //Shift Right&#xD;&#xA;            if (worldPoint.X &gt; (cameraPosition.X + CamCenterOffset.X)&#xD;&#xA;                &amp;&amp; worldPoint.X - (cameraPosition.X + CamCenterOffset.X) &gt; 20)&#xD;&#xA;                cameraPosition.X += pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.X += pixelsFine;&#xD;&#xA;&#xD;&#xA;            //Shift Up&#xD;&#xA;            if(worldPoint.Y &lt; (cameraPosition.Y + CamCenterOffset.Y)&#xD;&#xA;                &amp;&amp; (cameraPosition.Y + CamCenterOffset.Y) - worldPoint.Y &gt; 20)&#xD;&#xA;                cameraPosition.Y -= pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.Y -= pixelsFine;&#xD;&#xA;&#xD;&#xA;            //Shift Down&#xD;&#xA;            if (worldPoint.Y &gt; (cameraPosition.Y + CamCenterOffset.Y)&#xD;&#xA;                &amp;&amp; worldPoint.Y - (cameraPosition.Y + CamCenterOffset.Y) &gt; 20)&#xD;&#xA;                cameraPosition.Y += pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.Y += pixelsFine;&#xD;&#xA;&#xD;&#xA;            if(worldPoint.X - (cameraPosition.X + CamCenterOffset.X) &lt; 5&#xD;&#xA;                &amp;&amp; worldPoint.Y - (cameraPosition.Y + CamCenterOffset.Y) &lt; 5)&#xD;&#xA;            {&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            currKeyboardState = Keyboard.GetState();&#xD;&#xA;            currMouseState = Mouse.GetState();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            this.CameraControlls();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Essentially what I am trying to do is make a 2D camera with these basic features:&#xD;&#xA; &#xD;&#xA; - [optional] Zoom out straight, Zoom in towards mouse cursor (centering on it as it goes) &#xD;&#xA; - [optional] Hotkey + L.Click, shift view to click location. (Farther zoom = faster shift) &#xD;&#xA; - L.Click, Select world object, at any zoom level.&#xD;&#xA; - WASD &amp; Arrow, view move(s).&#xD;&#xA;&#xD;&#xA;As you can see I managed to hack in some very quirky examples of these (have not dome arrow select yet), but they are not working as I expected and I am sure it has to do with the Matrix transform, and my lack of understanding it in code terms. (I have read up on it in many places)&#xD;&#xA;&#xD;&#xA;For example. At zoom 1, everything pretty much works, and X,Y coordinates line up with window resolution as it should. But if I zoom in or out, X,Y coordinates do not scale with the new size of the viewable world space. What was once 600x600 pixels is now 60x60 (at zoom 0.1) but clicking in the far bottom right corner, still returns a world vector of ~600x600 rather then the much larger distance. &#xD;&#xA;&#xD;&#xA;I have looked for HOURS to find a good explanation on how to code the matrix in XNA, as well as why you would use one of the overloads vs. another. But all I find are simple static JRPG and platformer camera examples. Or first person shooter type cameras. &#xD;&#xA;&#xD;&#xA;Now before you answer I hope you will understand when I say that I am a stare and compare learner. If I have a working example of code, with a minimum of explanation, I can infer most of the rest and figure out hat remains by poking it and seeing what happens. So if anyone would be willing to simply adjust the code I have posted WITH VERBOSE COMMENTING, It would help me most. But I will be grateful for any assistance you are willing to give. &#xD;&#xA;" />
  <row Id="37004" PostHistoryTypeId="1" PostId="16113" RevisionGUID="394e4338-f5f4-4e4c-9d24-e51557a51f2d" CreationDate="2011-08-17T01:38:00.943" UserId="9326" UserDisplayName="RogueDeus" Text="XNA 2D Transform Matrix Scale at Zoom Question" />
  <row Id="37005" PostHistoryTypeId="3" PostId="16113" RevisionGUID="394e4338-f5f4-4e4c-9d24-e51557a51f2d" CreationDate="2011-08-17T01:38:00.943" UserId="9326" UserDisplayName="RogueDeus" Text="&lt;c#&gt;&lt;matrix&gt;&lt;xna&gt;" />
  <row Id="37006" PostHistoryTypeId="5" PostId="16112" RevisionGUID="2071ac47-a6e4-4c58-a544-cc121e1428e8" CreationDate="2011-08-17T17:08:51.167" UserId="1839" Comment="added 17 characters in body" Text="There is a conceptual misunderstanding in your question. positionX is to the same degree a &quot;core&quot; property as health or speed is. In fact, speed is nothing else than the length of the rate-of-change-vector of the position. &#xD;&#xA;&#xD;&#xA;This conceptual wrong distinction leads to a bad design. The update logic and the render logic uses the same properties, i.e. position, rotation and even health. health can be rendered as a number above the pawn, there is no fundamental difference between those properties. &#xD;&#xA;&#xD;&#xA;The entire question is trying to force a design pattern into data rather than the other way around, drawing a line where no such line exists.&#xD;&#xA;&#xD;&#xA;    How would you go about organizing this code into managable and separated blocks?&#xD;&#xA;&#xD;&#xA;This data from your question:&#xD;&#xA; &#xD;&#xA;    int health&#xD;&#xA;    int speed&#xD;&#xA;    int weaponDamage&#xD;&#xA;    int positionX;&#xD;&#xA;    int positionY;&#xD;&#xA;    int positionZ;&#xD;&#xA;    int rotation;&#xD;&#xA;&#xD;&#xA;simply belongs into 1 class. Don't over engineer, don't put unnecessary layers of complexity." />
  <row Id="37007" PostHistoryTypeId="5" PostId="16112" RevisionGUID="edddee18-f94a-4575-a43e-e780eb3c5cca" CreationDate="2011-08-17T17:19:03.357" UserId="1839" Comment="added 16 characters in body" Text="There is a conceptual misunderstanding in your question. positionX is to the same degree a &quot;core&quot; property as health or speed is. In fact, speed is nothing else than the length of the rate-of-change-vector of the position. &#xD;&#xA;&#xD;&#xA;This conceptual wrong distinction leads to a bad design. The update logic and the render logic uses the same properties, i.e. position, rotation and even health. health can be rendered as a number above the monster for instance, there is no fundamental difference between those properties. &#xD;&#xA;&#xD;&#xA;The entire question is trying to force a design pattern into data rather than the other way around, drawing a line where no such line exists.&#xD;&#xA;&#xD;&#xA;    How would you go about organizing this code into managable and separated blocks?&#xD;&#xA;&#xD;&#xA;This data from your question:&#xD;&#xA; &#xD;&#xA;    int health&#xD;&#xA;    int speed&#xD;&#xA;    int weaponDamage&#xD;&#xA;    int positionX;&#xD;&#xA;    int positionY;&#xD;&#xA;    int positionZ;&#xD;&#xA;    int rotation;&#xD;&#xA;&#xD;&#xA;simply belongs into 1 class. Don't over engineer, don't put unnecessary layers of complexity." />
  <row Id="37008" PostHistoryTypeId="5" PostId="16112" RevisionGUID="0f20526b-3a05-4c6b-8318-d16a19dd706a" CreationDate="2011-08-17T18:07:54.750" UserId="1839" Comment="deleted 6 characters in body" Text="There is a conceptual misunderstanding in your question. positionX is to the same degree a &quot;core&quot; property as health or speed is. In fact, speed is nothing else than the length of the rate-of-change-vector of the position. &#xD;&#xA;&#xD;&#xA;This conceptual wrong distinction leads to a bad design. The update- and the render-logic use the same properties, i.e. position, rotation and even health. health can be rendered as a number above the monster for instance, there is no fundamental difference between those properties. &#xD;&#xA;&#xD;&#xA;The entire question is trying to force a design pattern into data rather than the other way around, drawing a line where no such line exists.&#xD;&#xA;&#xD;&#xA;    How would you go about organizing this code into managable and separated blocks?&#xD;&#xA;&#xD;&#xA;This data from your question:&#xD;&#xA; &#xD;&#xA;    int health&#xD;&#xA;    int speed&#xD;&#xA;    int weaponDamage&#xD;&#xA;    int positionX;&#xD;&#xA;    int positionY;&#xD;&#xA;    int positionZ;&#xD;&#xA;    int rotation;&#xD;&#xA;&#xD;&#xA;simply belongs into 1 class. Don't over engineer, don't put unnecessary layers of complexity." />
  <row Id="37009" PostHistoryTypeId="2" PostId="16114" RevisionGUID="e2734e25-22dd-44e5-86b6-a9aa78218a9b" CreationDate="2011-08-17T18:18:14.193" UserId="41" Text="It's probably best to have some simple AI routines and game-critical calculations on the server side, while handling the complex non-game-critical operations on the client side.&#xD;&#xA;&#xD;&#xA;For example, the server knows where a hostile NPC is and where the player characters are. When the player character gets within range of the NPC a server-side calculation can be done to see if the NPC should attack the player, and a simple pathfinding routing can be done to determine how long it will take the NPC to reach the player.&#xD;&#xA;&#xD;&#xA;Once the NPC has been transitioned to the attack state the client can deal with animation and fine-grained path finding. When the NPC is close enough to the client to attack the server can perform calculations to see if the attack hit, what the damage was, etc...&#xD;&#xA;&#xD;&#xA;You'll want to make sure that any calculations that truly effect the outcome of the game are handled by the server and passed to the client, while the non-critical calculations are handled by the client.&#xD;&#xA;&#xD;&#xA;In the simplest case you'll be keeping the client in sync with where it expects the server to be, the server will verify, then the client will calculate again." />
  <row Id="37010" PostHistoryTypeId="2" PostId="16115" RevisionGUID="56e96437-2204-4767-83b1-1bbcbd06c8d0" CreationDate="2011-08-17T18:36:24.367" UserId="2994" Text="I'd wait to get the red book(if you are going to buy it), a new version is on the way (December?) that covers OpenGL 4.2. The current (7th edition) red book covers both 3.0 and 3.1 and talks about the deprecated fixed function pipeline stuff. The new book will only talk about the current programmable pipeline. &#xD;&#xA;&#xD;&#xA;If you really need a book to learn the new OpenGL API the OpenGL Superbible 5th edition is the only book in the series that covers the new OpenGL pipeline (3.1 and higher). &#xD;&#xA;&#xD;&#xA;" />
  <row Id="37011" PostHistoryTypeId="25" PostId="542" RevisionGUID="972f2547-1e8a-42be-8a40-023402d29d29" CreationDate="2011-08-17T18:37:26.167" Comment="http://twitter.com/#!/StackGameDev/status/103898244702146560" />
  <row Id="37012" PostHistoryTypeId="2" PostId="16116" RevisionGUID="106e88b2-a151-4e01-b8f6-4e3aea42751c" CreationDate="2011-08-17T19:06:55.057" UserId="9325" Text="In order to get components to be able to update every frame I got the idea to make an UpdateComponent component.  Other components like `MovableComponent` (which holds velocity) would inherit from the `IUpdatable` abstract class.  This forces `MovableComponent` to implement an `Update(gametime dt)` method and another `RegisterWithUpdater()` that gives `UpdateComponent` a pointer to the `MovableComponent`.  Many components could do this and then `UpdateComponent` could call all of their `Update(gametime dt)` methods without having to care about who or what they are.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;&#xD;&#xA; 1. Does this seem like anything that is normal or used by anyone?  I cannot find anything on the subject.&#xD;&#xA; 2. How could I maintain an order to the components like physics then position change?  Is this even necessary?&#xD;&#xA; 3. What are other ways of insuring that components that should be process every frame are in fact processed?&#xD;&#xA;&#xD;&#xA;Boiled down code for previous example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        virtual void Update(float dt) = 0;&#xD;&#xA;    protected:&#xD;&#xA;        virtual void RegisterAsUpdatable() = 0;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Component&#xD;&#xA;    {&#xD;&#xA;        ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class MovableComponent: public Component, public IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        virtual void Update(float dt);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        virtual void RegisterWithUpdater();&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class UpdateComponent: public Component&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        void UpdateAll();&#xD;&#xA;        void RegisterUpdatable(Component* component);&#xD;&#xA;        void RemoveUpdatable(Component* component);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        std::set&lt;Component*&gt; updatables_;&#xD;&#xA;    };" />
  <row Id="37013" PostHistoryTypeId="1" PostId="16116" RevisionGUID="106e88b2-a151-4e01-b8f6-4e3aea42751c" CreationDate="2011-08-17T19:06:55.057" UserId="9325" Text="Component entity system - Updates and call orders" />
  <row Id="37014" PostHistoryTypeId="3" PostId="16116" RevisionGUID="106e88b2-a151-4e01-b8f6-4e3aea42751c" CreationDate="2011-08-17T19:06:55.057" UserId="9325" Text="&lt;c++&gt;&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="37015" PostHistoryTypeId="5" PostId="16116" RevisionGUID="15b6689c-3ec9-44f3-838e-6085f9e23f31" CreationDate="2011-08-17T19:19:58.017" UserId="9325" Comment="clarified that I don't need Update() in EVERY component" Text="In order to get components to be able to update **every frame** (and leave this functionality out of components that don't need to) I got the idea to make an UpdateComponent component.  Other components like `MovableComponent` (which holds velocity) would inherit from the `IUpdatable` abstract class.  This forces `MovableComponent` to implement an `Update(gametime dt)` method and another `RegisterWithUpdater()` that gives `UpdateComponent` a pointer to the `MovableComponent`.  Many components could do this and then `UpdateComponent` could call all of their `Update(gametime dt)` methods without having to care about who or what they are.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;&#xD;&#xA; 1. Does this seem like anything that is normal or used by anyone?  I cannot find anything on the subject.&#xD;&#xA; 2. How could I maintain an order to the components like physics then position change?  Is this even necessary?&#xD;&#xA; 3. What are other ways of insuring that components that should be process every frame are in fact processed?&#xD;&#xA;&#xD;&#xA;Boiled down code for previous example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        virtual void Update(float dt) = 0;&#xD;&#xA;    protected:&#xD;&#xA;        virtual void RegisterAsUpdatable() = 0;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Component&#xD;&#xA;    {&#xD;&#xA;        ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class MovableComponent: public Component, public IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        virtual void Update(float dt);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        virtual void RegisterWithUpdater();&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class UpdateComponent: public Component&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        void UpdateAll();&#xD;&#xA;        void RegisterUpdatable(Component* component);&#xD;&#xA;        void RemoveUpdatable(Component* component);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        std::set&lt;Component*&gt; updatables_;&#xD;&#xA;    };" />
  <row Id="37016" PostHistoryTypeId="2" PostId="16117" RevisionGUID="d1e6fd36-3e17-47f5-b55f-4a531ef79f9c" CreationDate="2011-08-17T19:22:53.120" UserId="9326" Text="I seem to have figured out how to get the coordinates to scale...&#xD;&#xA;&#xD;&#xA;I was assuming that the current mouse status would reflect the world matrix its clicked on, but apparently it never actually does this. It is always linked to the view matrix. (The screen itself) and that value needs to scale along with the world matrix (in the transform). &#xD;&#xA;&#xD;&#xA;So as the transform is effected by Zoom in the Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)) so too does the mouseState X &amp; Y coordinates need to be scaled by it to virtually mirror the world matrix.&#xD;&#xA;&#xD;&#xA;        //Offsets any cam location by a zoom scaled window bounds&#xD;&#xA;        Vector2 CamCenterOffset&#xD;&#xA;        {&#xD;&#xA;            get { return new Vector2((game.Window.ClientBounds.Height / Zoom)&#xD;&#xA;                 * 0.5f, (game.Window.ClientBounds.Width / Zoom) * 0.5f);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        //Scales the mouse.X and mouse.Y by the same Zoom as everything.&#xD;&#xA;        Vector2 MouseCursorInWorld&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                currMouseState = Mouse.GetState();&#xD;&#xA;                return cameraPosition + new Vector2(currMouseState.X / Zoom,&#xD;&#xA;                    currMouseState.Y / Zoom);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;" />
  <row Id="37017" PostHistoryTypeId="5" PostId="16113" RevisionGUID="78fca4db-786a-4124-b30c-4e227152193a" CreationDate="2011-08-17T19:23:49.310" UserId="9326" Comment="deleted 48 characters in body" Text="This is the complete code I am currently using for my camera. It is incomplete and only partially understood by me (I am working off an example), but I have managed to hack some functionality with some brute force, only to realize I went about it all wrong. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;    using System;&#xD;&#xA;    using System.Collections.Generic;&#xD;&#xA;    using System.Linq;&#xD;&#xA;    using System.Text;&#xD;&#xA;    using Microsoft.Xna.Framework;&#xD;&#xA;    using Microsoft.Xna.Framework.Input;&#xD;&#xA;    using Microsoft.Xna.Framework.Graphics;&#xD;&#xA;&#xD;&#xA;    namespace _2DCameraPractice&#xD;&#xA;    {&#xD;&#xA;      class Camera&#xD;&#xA;      {&#xD;&#xA;        int speed;&#xD;&#xA;        int maxZoom;&#xD;&#xA;        float zoom;&#xD;&#xA;        float rotation;&#xD;&#xA;        bool moveToWorldPoint;&#xD;&#xA;        bool keyPressed;&#xD;&#xA;&#xD;&#xA;        Game game;&#xD;&#xA;        GraphicsDevice graphicsDevice;&#xD;&#xA;        Camera camera;&#xD;&#xA;        Matrix matrixTransform;&#xD;&#xA;&#xD;&#xA;        Vector2 cameraPosition;&#xD;&#xA;        Vector2 worldPoint;&#xD;&#xA;&#xD;&#xA;        KeyboardState currKeyboardState;&#xD;&#xA;        MouseState currMouseState;&#xD;&#xA;        MouseState prevMouseState;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Camera(Game game, GraphicsDevice graphicsDevice)&#xD;&#xA;        {&#xD;&#xA;            this.game = game;&#xD;&#xA;            this.graphicsDevice = graphicsDevice;&#xD;&#xA;            zoom = 1;&#xD;&#xA;            maxZoom = 5;&#xD;&#xA;            rotation = 0;&#xD;&#xA;            cameraPosition = Vector2.Zero;&#xD;&#xA;            camera = this;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public float Zoom&#xD;&#xA;        {&#xD;&#xA;            get { return zoom; }&#xD;&#xA;            // Negative flips image&#xD;&#xA;            set { zoom = value; if (zoom &lt; 0.1f) zoom = 0.1f; } &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public float Rotation&#xD;&#xA;        {&#xD;&#xA;            get { return rotation; }&#xD;&#xA;            set { rotation = value; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Vector2 Position&#xD;&#xA;        {&#xD;&#xA;            get { return cameraPosition; }&#xD;&#xA;            set { cameraPosition = value; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        Vector2 CamCenterOffset&#xD;&#xA;        {&#xD;&#xA;            get { return new Vector2(game.Window.ClientBounds.Height &#xD;&#xA;                / 2, game.Window.ClientBounds.Width / 2); }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        Vector2 CamCenterInWorld&#xD;&#xA;        {&#xD;&#xA;            get { return cameraPosition + CamCenterOffset; }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        Vector2 MouseCursorInWorld&#xD;&#xA;        {&#xD;&#xA;            get&#xD;&#xA;            {&#xD;&#xA;                currMouseState = Mouse.GetState();&#xD;&#xA;                return cameraPosition + new Vector2(currMouseState.X,&#xD;&#xA;                    currMouseState.Y);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public void Direction(Vector2 direction)&#xD;&#xA;        {&#xD;&#xA;            cameraPosition += direction;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public Matrix Transform(GraphicsDevice graphicsDevice)&#xD;&#xA;        {&#xD;&#xA;            float ViewportWidth = graphicsDevice.Viewport.Width;&#xD;&#xA;            float ViewportHeight = graphicsDevice.Viewport.Height;&#xD;&#xA;&#xD;&#xA;            matrixTransform =&#xD;&#xA;              Matrix.CreateTranslation(new Vector3(-cameraPosition.X, -cameraPosition.Y, 0)) *&#xD;&#xA;                  Matrix.CreateRotationZ(Rotation) *&#xD;&#xA;                  Matrix.CreateScale(new Vector3(Zoom, Zoom, 0)) *&#xD;&#xA;                  Matrix.CreateTranslation(&#xD;&#xA;                        new Vector3(ViewportWidth * 0.5f, ViewportHeight * 0.5f, 0));&#xD;&#xA;            return matrixTransform;&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        //Zoom in to mouse cursor.&#xD;&#xA;        private Vector2 ZoomToMouse(Vector2 mousePos, Vector2 cameraPos)&#xD;&#xA;        {&#xD;&#xA;            &#xD;&#xA;            Vector2 newCamPosition = cameraPos + ((mousePos - CamCenterOffset) / 3);&#xD;&#xA;            &#xD;&#xA;            //Need to figure a way to center mouse on screen as zooming.&#xD;&#xA;&#xD;&#xA;            return newCamPosition;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        private void CenterMouseOnZoom(Vector2 mousePos)&#xD;&#xA;        {&#xD;&#xA;            //The farther from center the cursor is, the more shifts it takes to center&#xD;&#xA;            bool shift = false;&#xD;&#xA;            int X = 0;&#xD;&#xA;            int Y = 0;&#xD;&#xA;&#xD;&#xA;            //If the X axis is within 100 units of center, jump once. &#xD;&#xA;            if ( (mousePos.X - CamCenterOffset.X) &lt;= 100&#xD;&#xA;                &amp;&amp; (mousePos.X - CamCenterOffset.X) &gt;= -100)&#xD;&#xA;            {&#xD;&#xA;                shift = true;&#xD;&#xA;                X = (int)CamCenterOffset.X;&#xD;&#xA;                //Mouse.SetPosition((int)GetCamCenterInView.X, Y);&#xD;&#xA;            }&#xD;&#xA;            if ((mousePos.Y - CamCenterOffset.Y) &lt;= 100&#xD;&#xA;                &amp;&amp; (mousePos.Y - CamCenterOffset.Y) &gt;= -100)&#xD;&#xA;            {&#xD;&#xA;                shift = true;&#xD;&#xA;                Y = (int)CamCenterOffset.Y;&#xD;&#xA;            }&#xD;&#xA;            if(shift)&#xD;&#xA;                Mouse.SetPosition(X, Y);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        public void CameraControlls()&#xD;&#xA;        {&#xD;&#xA;            MouseControl();&#xD;&#xA;&#xD;&#xA;            KeyboardControl();&#xD;&#xA;            KeyboardSpecials();&#xD;&#xA;            &#xD;&#xA;            //Camera special commands&#xD;&#xA;            if (moveToWorldPoint == true)&#xD;&#xA;                CenterCameraOnWorldPoint();&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        private void KeyboardSpecials()&#xD;&#xA;        {&#xD;&#xA;            //Output camera and mouse coordinate details.&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Space))&#xD;&#xA;            {   //Bool check to prevent repeat outputs.&#xD;&#xA;                if(!keyPressed)&#xD;&#xA;                {&#xD;&#xA;                    System.Console.WriteLine(&quot;Camera : &quot; + cameraPosition);&#xD;&#xA;                    System.Console.WriteLine(&quot;Zoom   : &quot; + camera.Zoom);&#xD;&#xA;                    System.Console.WriteLine(&quot;InWorld: &quot; + CamCenterInWorld + &quot;Camera&quot;);&#xD;&#xA;                    System.Console.WriteLine();&#xD;&#xA;                    System.Console.WriteLine(&quot;WorldPT: &quot; + worldPoint);&#xD;&#xA;                    System.Console.WriteLine(&quot;InWOrld: &quot; + MouseCursorInWorld + &quot;Mouse&quot;);&#xD;&#xA;                    System.Console.WriteLine();&#xD;&#xA;                    System.Console.WriteLine();&#xD;&#xA;                    keyPressed = true;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if(currKeyboardState.IsKeyUp(Keys.Space))&#xD;&#xA;                keyPressed = false;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        private void KeyboardControl()&#xD;&#xA;        {&#xD;&#xA;            //Camera movement (Keyboard)&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Right) || currKeyboardState.IsKeyDown(Keys.A))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(-(1 * speed), 0));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Left) || currKeyboardState.IsKeyDown(Keys.D))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(1 * speed, 0));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Up) || currKeyboardState.IsKeyDown(Keys.S))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(0, 1 * speed));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Down) || currKeyboardState.IsKeyDown(Keys.W))&#xD;&#xA;            {&#xD;&#xA;                camera.Direction(new Vector2(0, -(1 * speed)));&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            //Camera zoom (Keyboard)&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Z))&#xD;&#xA;                camera.Zoom += 0.1f;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.X))&#xD;&#xA;                camera.Zoom -= 0.1f;&#xD;&#xA;&#xD;&#xA;            //Camera rotation (Keyboard)&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.C))&#xD;&#xA;                camera.Rotation += 0.1f;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.V))&#xD;&#xA;                camera.Rotation -= 0.1f;&#xD;&#xA;            if(currKeyboardState.IsKeyDown(Keys.Home))&#xD;&#xA;                camera.Rotation = 0.0f;&#xD;&#xA;&#xD;&#xA;            //Speed up scroll when zoomed way out.&#xD;&#xA;            if(camera.Zoom &lt; 0.2)&#xD;&#xA;                speed = 1 + ((1 - (int)camera.Zoom) * 40);&#xD;&#xA;            else if(camera.Zoom &lt; 0.4)&#xD;&#xA;                speed = 1 + ((1 - (int)camera.Zoom) * 20);&#xD;&#xA;            else if(camera.Zoom &lt; 0.7)&#xD;&#xA;                speed = 1 + ((1 - (int)camera.Zoom) * 8);&#xD;&#xA;            else if(camera.Zoom &lt; 1)&#xD;&#xA;                speed = 2 + ((1 - (int)camera.Zoom) * 4);&#xD;&#xA;            else&#xD;&#xA;                speed = 6 - (int)camera.Zoom;&#xD;&#xA;            if(speed &lt; 1)&#xD;&#xA;                speed = 1;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;        private void MouseControl()&#xD;&#xA;        {&#xD;&#xA;            Vector2 mousePosition = new Vector2(currMouseState.X, currMouseState.Y);&#xD;&#xA;&#xD;&#xA;            //Enable moveTo for world Point on [L.CTRL + L.Click] if mouse is inside &#xD;&#xA;            // window bounds.&#xD;&#xA;            if (currMouseState.LeftButton == ButtonState.Pressed&#xD;&#xA;                &amp;&amp; mousePosition.X &gt;= 0 &amp;&amp; mousePosition.Y &gt;= 0&#xD;&#xA;                &amp;&amp; mousePosition.X &lt;= game.Window.ClientBounds.Width&#xD;&#xA;                &amp;&amp; mousePosition.Y &lt;= game.Window.ClientBounds.Height)&#xD;&#xA;&#xD;&#xA;            {&#xD;&#xA;                //SetWorldPoint(MouseCursorInWorld);&#xD;&#xA;                SetWorldPoint(MouseCursorInWorld);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Enable moveTo for world Point on [L.CTRL + L.Click]&#xD;&#xA;            if(currMouseState.LeftButton == ButtonState.Pressed&#xD;&#xA;                &amp;&amp; currKeyboardState.IsKeyDown(Keys.LeftControl))&#xD;&#xA;            //if (currKeyboardState.IsKeyDown(Keys.LeftControl))&#xD;&#xA;            {&#xD;&#xA;                moveToWorldPoint = true;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Camera zoom (MouseWheel)&#xD;&#xA;            //Mouse wheel is (up to) ~120 points per click... No shit.&#xD;&#xA;            if(currMouseState.ScrollWheelValue &lt; prevMouseState.ScrollWheelValue)&#xD;&#xA;            {&#xD;&#xA;                //Holding shift while zooming 10+ times more sensative.&#xD;&#xA;                if(currKeyboardState.IsKeyDown(Keys.LeftShift))&#xD;&#xA;                {&#xD;&#xA;                    camera.Zoom += (float)((prevMouseState.ScrollWheelValue -&#xD;&#xA;                        currMouseState.ScrollWheelValue) / 10) * 0.001f;&#xD;&#xA;                }&#xD;&#xA;                else&#xD;&#xA;                {&#xD;&#xA;                    camera.Zoom -= (float)((prevMouseState.ScrollWheelValue -&#xD;&#xA;                        currMouseState.ScrollWheelValue) / 10) * 0.015f;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if(currMouseState.ScrollWheelValue &gt; prevMouseState.ScrollWheelValue)&#xD;&#xA;            {&#xD;&#xA;                if(camera.Zoom &lt;= maxZoom) &#xD;&#xA;                {&#xD;&#xA;                    if(currKeyboardState.IsKeyDown(Keys.LeftShift))&#xD;&#xA;                    {&#xD;&#xA;                        camera.Zoom -= (float)((currMouseState.ScrollWheelValue -&#xD;&#xA;                            prevMouseState.ScrollWheelValue) / 10) * 0.001f;&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        camera.Zoom += (float)((currMouseState.ScrollWheelValue -&#xD;&#xA;                            prevMouseState.ScrollWheelValue) / 10) * 0.015f;&#xD;&#xA;&#xD;&#xA;                        //Reposition camera towards cursor durring zoom.&#xD;&#xA;     //                   cameraPosition = ZoomToMouse(mousePosition, cameraPosition);&#xD;&#xA;     //                   CenterMouseOnZoom(mousePosition);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            prevMouseState = currMouseState;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        private void SetWorldPoint(Vector2 worldPoint)&#xD;&#xA;        {&#xD;&#xA;            this.worldPoint = worldPoint;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        private void CenterCameraOnWorldPoint()&#xD;&#xA;        {&#xD;&#xA;            int pixelsLarge = 10;&#xD;&#xA;            int pixelsFine = 1;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            //Shift Left&#xD;&#xA;            if (worldPoint.X &lt; (cameraPosition.X + CamCenterOffset.X)&#xD;&#xA;                &amp;&amp; (cameraPosition.X + CamCenterOffset.X) - worldPoint.X &gt; 20)&#xD;&#xA;                cameraPosition.X -= pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.X -= pixelsFine;&#xD;&#xA;&#xD;&#xA;            //Shift Right&#xD;&#xA;            if (worldPoint.X &gt; (cameraPosition.X + CamCenterOffset.X)&#xD;&#xA;                &amp;&amp; worldPoint.X - (cameraPosition.X + CamCenterOffset.X) &gt; 20)&#xD;&#xA;                cameraPosition.X += pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.X += pixelsFine;&#xD;&#xA;&#xD;&#xA;            //Shift Up&#xD;&#xA;            if(worldPoint.Y &lt; (cameraPosition.Y + CamCenterOffset.Y)&#xD;&#xA;                &amp;&amp; (cameraPosition.Y + CamCenterOffset.Y) - worldPoint.Y &gt; 20)&#xD;&#xA;                cameraPosition.Y -= pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.Y -= pixelsFine;&#xD;&#xA;&#xD;&#xA;            //Shift Down&#xD;&#xA;            if (worldPoint.Y &gt; (cameraPosition.Y + CamCenterOffset.Y)&#xD;&#xA;                &amp;&amp; worldPoint.Y - (cameraPosition.Y + CamCenterOffset.Y) &gt; 20)&#xD;&#xA;                cameraPosition.Y += pixelsLarge;&#xD;&#xA;            else&#xD;&#xA;                cameraPosition.Y += pixelsFine;&#xD;&#xA;&#xD;&#xA;            if(worldPoint.X - (cameraPosition.X + CamCenterOffset.X) &lt; 5&#xD;&#xA;                &amp;&amp; worldPoint.Y - (cameraPosition.Y + CamCenterOffset.Y) &lt; 5)&#xD;&#xA;            {&#xD;&#xA;                moveToWorldPoint = false;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public void Update(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            currKeyboardState = Keyboard.GetState();&#xD;&#xA;            currMouseState = Mouse.GetState();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            this.CameraControlls();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Essentially what I am trying to do is make a 2D camera with these basic features:&#xD;&#xA; &#xD;&#xA; - [optional] Zoom out straight, Zoom in towards mouse cursor (centering on it as it goes) &#xD;&#xA; - [optional] Hotkey + L.Click, shift view to click location. (Farther zoom = faster shift) &#xD;&#xA; - L.Click, Select world object, at any zoom level.&#xD;&#xA; - WASD &amp; Arrow, view move(s).&#xD;&#xA;&#xD;&#xA;As you can see I managed to hack in some very quirky examples of these (have not dome arrow select yet), but they are not working as I expected and I am sure it has to do with the Matrix transform, and my lack of understanding it in code terms. (I have read up on it in many places)&#xD;&#xA;&#xD;&#xA;For example. At zoom 1, everything pretty much works, and X,Y coordinates line up with window resolution as it should. But if I zoom in or out, X,Y coordinates do not scale with the new size of the viewable world space. What was once 600x600 pixels is now 60x60 (at zoom 0.1) but clicking in the far bottom right corner, still returns a world vector of ~600x600 rather then the much larger distance. &#xD;&#xA;&#xD;&#xA;I have looked for HOURS to find a good explanation on how to code the matrix in XNA, as well as why you would use one of the overloads vs. another. But all I find are simple static JRPG and platformer camera examples. Or first person shooter type cameras. &#xD;&#xA;&#xD;&#xA;Now before you answer I hope you will understand when I say that I am a stare and compare learner. If I have a working example of code, with a minimum of explanation, I can infer most of the rest and figure out hat remains by poking it and seeing what happens. So if anyone would be willing to simply adjust the code I have posted WITH VERBOSE COMMENTING, It would help me most. But I will be grateful for any assistance you are willing to give. &#xD;&#xA;" />
  <row Id="37018" PostHistoryTypeId="2" PostId="16118" RevisionGUID="337321fb-1595-4898-a44a-a03045088c06" CreationDate="2011-08-17T19:33:05.737" UserId="953" Text="There are a bunch of questions there, but I'll just deal with one. I'd recommend making Abilities a different table and making a many-to-many table that connects cards with Abilities. It's common in TCGs to have multiple creatures with the same ability, and Ability0, 1, 2, and so on is sort of clumsy and limits your future options." />
  <row Id="37019" PostHistoryTypeId="5" PostId="16116" RevisionGUID="0d85888d-ae13-4bb4-b289-c446cf96cbb1" CreationDate="2011-08-17T19:37:12.847" UserId="9325" Comment="New Idea: Update components by type." Text="In order to get components to be able to update **every frame** (and leave this functionality out of components that don't need to) I got the idea to make an UpdateComponent component.  Other components like `MovableComponent` (which holds velocity) would inherit from the `IUpdatable` abstract class.  This forces `MovableComponent` to implement an `Update(gametime dt)` method and another `RegisterWithUpdater()` that gives `UpdateComponent` a pointer to the `MovableComponent`.  Many components could do this and then `UpdateComponent` could call all of their `Update(gametime dt)` methods without having to care about who or what they are.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;&#xD;&#xA; 1. Does this seem like anything that is normal or used by anyone?  I cannot find anything on the subject.&#xD;&#xA; 2. How could I maintain an order to the components like physics then position change?  Is this even necessary?&#xD;&#xA; 3. What are other ways of insuring that components that should be process every frame are in fact processed?&#xD;&#xA;&#xD;&#xA;**EDIT**  &#xD;&#xA;I think I will be concidering how to give the entity manager a list of types that are updatable. Then ALL of the components of that type can update rather than managing it per entity (which are just indexes in my system anyway).  &#xD;&#xA;&#xD;&#xA;Still.  My questions remain valid to me.  I don't know if this is reasonabl/normal, or what others tend to do.  &#xD;&#xA;**/EDIT**&#xD;&#xA;&#xD;&#xA;Boiled down code for previous example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        virtual void Update(float dt) = 0;&#xD;&#xA;    protected:&#xD;&#xA;        virtual void RegisterAsUpdatable() = 0;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Component&#xD;&#xA;    {&#xD;&#xA;        ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class MovableComponent: public Component, public IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        virtual void Update(float dt);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        virtual void RegisterWithUpdater();&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class UpdateComponent: public Component&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        void UpdateAll();&#xD;&#xA;        void RegisterUpdatable(Component* component);&#xD;&#xA;        void RemoveUpdatable(Component* component);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        std::set&lt;Component*&gt; updatables_;&#xD;&#xA;    };" />
  <row Id="37020" PostHistoryTypeId="5" PostId="16068" RevisionGUID="9b18ea04-3ed2-413b-bbb4-3ceed6aa1a9d" CreationDate="2011-08-17T19:40:49.643" UserId="168" Comment="added 47 characters in body" Text="The problem is that you can't use a simple Sample() call in the vertex shader as it doesn't know what mipmap level to sample from, so the data coming back can't really be a float 4 and the call just doesn't really make sense. In the pixel shader, you need to use:&#xD;&#xA;&#xD;&#xA;    float4 offset = HeightMap.SampleLevel(HeightSampler, input.Texcoord, 0);&#xD;&#xA;&#xD;&#xA;Changing to that worked perfectly.&#xD;&#xA;&#xD;&#xA;http://www.gamedev.net/topic/604632-texture2d-sample-in-hlsl/" />
  <row Id="37021" PostHistoryTypeId="2" PostId="16119" RevisionGUID="c700daae-e3bb-408e-9444-23b7927a4d01" CreationDate="2011-08-17T19:47:55.443" UserId="470" Text="I'm the creator of Trainyard for iOS. It's a puzzle game, and when players solve a puzzle, they can share their solution on Facebook, Twitter, or directly on the Trainyard site. &#xD;&#xA;&#xD;&#xA;I don't do in-app analytics, but I can tell you that players do use the buttons. You can do a simple twitter search to see the people that have tweeted from the game in the past week: https://twitter.com/#search?q=trainyard.ca&#xD;&#xA;&#xD;&#xA;A *ton* of players press the share button to share their solutions on trainyard.ca without taking that link and posting it on Twitter or Facebook. To date, over 1.5 million solutions have been shared. You can see them here http://trainyard.ca/solutions&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37022" PostHistoryTypeId="5" PostId="16116" RevisionGUID="783c692c-93e7-4ed2-a0b7-9764c2677c0a" CreationDate="2011-08-17T20:08:39.377" UserId="9325" Comment="added 155 characters in body" Text="In order to get components to be able to update **every frame** (and leave this functionality out of components that don't need to) I got the idea to make an UpdateComponent component.  Other components like `MovableComponent` (which holds velocity) would inherit from the `IUpdatable` abstract class.  This forces `MovableComponent` to implement an `Update(gametime dt)` method and another `RegisterWithUpdater()` that gives `UpdateComponent` a pointer to the `MovableComponent`.  Many components could do this and then `UpdateComponent` could call all of their `Update(gametime dt)` methods without having to care about who or what they are.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;&#xD;&#xA; 1. Does this seem like anything that is normal or used by anyone?  I cannot find anything on the subject.&#xD;&#xA; 2. How could I maintain an order to the components like physics then position change?  Is this even necessary?&#xD;&#xA; 3. What are other ways of insuring that components that should be process every frame are in fact processed?&#xD;&#xA;&#xD;&#xA;**EDIT**  &#xD;&#xA;I think I will be concidering how to give the entity manager a list of types that are updatable. Then ALL of the components of that type can update rather than managing it per entity (which are just indexes in my system anyway).  &#xD;&#xA;&#xD;&#xA;Still.  My questions remain valid to me.  I don't know if this is reasonabl/normal, or what others tend to do.&#xD;&#xA;&#xD;&#xA;Also, the people at [Insomniac][1] are awesome!&#xD;&#xA;**/EDIT**&#xD;&#xA;&#xD;&#xA;Boiled down code for previous example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    class IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        virtual void Update(float dt) = 0;&#xD;&#xA;    protected:&#xD;&#xA;        virtual void RegisterAsUpdatable() = 0;&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class Component&#xD;&#xA;    {&#xD;&#xA;        ...&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class MovableComponent: public Component, public IUpdatable&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        virtual void Update(float dt);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        virtual void RegisterWithUpdater();&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    class UpdateComponent: public Component&#xD;&#xA;    {&#xD;&#xA;    public:&#xD;&#xA;        ...&#xD;&#xA;        void UpdateAll();&#xD;&#xA;        void RegisterUpdatable(Component* component);&#xD;&#xA;        void RemoveUpdatable(Component* component);&#xD;&#xA;    private:&#xD;&#xA;        ...&#xD;&#xA;        std::set&lt;Component*&gt; updatables_;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.insomniacgames.com/a-dynamic-component-architecture-for-high-performance-gameplay/" />
  <row Id="37023" PostHistoryTypeId="2" PostId="16120" RevisionGUID="cdc8c7c5-9c1d-4311-940a-bceec65a9976" CreationDate="2011-08-17T20:32:05.203" UserId="744" Text="One of the primary benefits of a component system is the ability to take advantage of caching patterns - good icache and prediction because you run the same code over and over, good dcache because you can allocate the objects in homogeneous pools and because the vtables, if any, stay hot.&#xD;&#xA;&#xD;&#xA;The way you have structured your components, this advantage disappears completely, and in fact can become a performance liability compared to an inheritance-based system, as you're making far more virtual calls and more objects with vtables.&#xD;&#xA;&#xD;&#xA;What you should be doing is storing pools per type, and iterating each type independently to perform updates.&#xD;&#xA;&#xD;&#xA;&gt; Does this seem like anything that is normal or used by anyone? I cannot find anything on the subject.&#xD;&#xA;&#xD;&#xA;It's not as common in large games because it is not advantageous. It's common in plenty of games, but it's not technically interesting, so no one writes about it.&#xD;&#xA;&#xD;&#xA;&gt; How could I maintain an order to the components like physics then position change? Is this even necessary?&#xD;&#xA;&#xD;&#xA;Code in languages like C++ has a natural way to order execution: type the statements in that order.&#xD;&#xA;&#xD;&#xA;    for (PhysicsComponent *c : physics_components)&#xD;&#xA;        c-&gt;update(dt);&#xD;&#xA;    for (PositionComponent *c : position_components)&#xD;&#xA;        c-&gt;update(dt);&#xD;&#xA;&#xD;&#xA;In reality, that doesn't make sense because no robust physics system is structured that way - you can't update one single physics object. Instead, the code would look more like:&#xD;&#xA;&#xD;&#xA;    physics_step();&#xD;&#xA;    for (PositionComponent *c : position_components)&#xD;&#xA;        c-&gt;update(dt);&#xD;&#xA;    // Updates the position data from the physics data.&#xD;&#xA;" />
  <row Id="37024" PostHistoryTypeId="2" PostId="16121" RevisionGUID="71323c1c-dda8-430f-8b8e-a7af6249f224" CreationDate="2011-08-17T20:56:23.793" UserId="9327" Text="For example, your game has 100 enemies (on different teams) running around and their AI wants to inspect the nearby entities to see which it should attack.  What is a fast way to organize those entities so that each enemy does not have to calculate the distance between itself and all other entities?&#xD;&#xA;&#xD;&#xA;In short, what is a fast way for an AI entity to answer the question &quot;Who is near me?&quot;" />
  <row Id="37025" PostHistoryTypeId="1" PostId="16121" RevisionGUID="71323c1c-dda8-430f-8b8e-a7af6249f224" CreationDate="2011-08-17T20:56:23.793" UserId="9327" Text="Data Structure (or algorithm) for fast distance-based entity lookups" />
  <row Id="37026" PostHistoryTypeId="3" PostId="16121" RevisionGUID="71323c1c-dda8-430f-8b8e-a7af6249f224" CreationDate="2011-08-17T20:56:23.793" UserId="9327" Text="&lt;3d&gt;&lt;ai&gt;&lt;entity-system&gt;&lt;data-structure&gt;" />
  <row Id="37027" PostHistoryTypeId="2" PostId="16122" RevisionGUID="21293acf-bbc2-4c6e-a841-4fc87e2b3d42" CreationDate="2011-08-17T20:57:25.523" UserId="8578" Text="The game I'm working on currently has a Client in Flash AS3, and a Server in C# (multithreaded).&#xD;&#xA;&#xD;&#xA;Currently I use mySQL to handle logins (Raw access: no middleman for accessing the database) which seems to be extremely quick.&#xD;&#xA;&#xD;&#xA;My question is would using a mySQL database be quick enough for a fairly simple real time game?&#xD;&#xA;&#xD;&#xA;My game functions in a similar way to Diablo2, League of Legends, or even Starcraft:&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; 1. User logs in &#xD;&#xA; 2. User is taken to lobby &#xD;&#xA; 3. From lobby user may view active games&#xD;&#xA; 4. User's group into 2-8 for games which exist on the server in it's own thread&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Now, the game has been designed in such a way to minimize server calculations, while still providing zero trust to clients.  Is it possible to use SQL in a way to store and manipulate all game data, for each game? ie:&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA; &#xD;&#xA; 1. Users 1 through 8 all create 50 units&#xD;&#xA; 2. Each user commands all of their units to move to a location on the map&#xD;&#xA; 3. Units attack each other&#xD;&#xA; 4. etc.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Is SQL fast enough to handle this kind of data traffic?  Or would it be better to store it all in memory?  Or is there some alternative (such as paging) I haven't considered?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37028" PostHistoryTypeId="1" PostId="16122" RevisionGUID="21293acf-bbc2-4c6e-a841-4fc87e2b3d42" CreationDate="2011-08-17T20:57:25.523" UserId="8578" Text="Using SQL for a Realtime Multiplayer Game Server's Working Data (Fast Enough?)" />
  <row Id="37029" PostHistoryTypeId="3" PostId="16122" RevisionGUID="21293acf-bbc2-4c6e-a841-4fc87e2b3d42" CreationDate="2011-08-17T20:57:25.523" UserId="8578" Text="&lt;architecture&gt;&lt;optimization&gt;&lt;client-server&gt;&lt;sql&gt;" />
  <row Id="37030" PostHistoryTypeId="2" PostId="16123" RevisionGUID="86dd71b8-59c6-4282-80cd-40dd21047e2a" CreationDate="2011-08-17T21:36:04.163" UserId="3505" Text="What do you mean by &quot;Raw access&quot;? If it means what I think it means you have got a gaping security hole.&#xD;&#xA;&#xD;&#xA;As for the performance question, it would be stupid to try using a database for such a job, for a ballpark figure I'd say an average database is 1000 times slower than memory. Just keep everything in application memory, I don't think you'll run out of memory before you hit some other bottleneck." />
  <row Id="37031" PostHistoryTypeId="25" PostId="16046" RevisionGUID="b9de98aa-fbbd-4f8b-8f14-e904b04b1baf" CreationDate="2011-08-17T21:37:27.047" Comment="http://twitter.com/#!/StackGameDev/status/103943545332842496" />
  <row Id="37032" PostHistoryTypeId="2" PostId="16124" RevisionGUID="2114d37f-57da-442b-9bc6-e29a324620f8" CreationDate="2011-08-17T21:38:04.290" UserId="7911" Text="Typically, simulation state is kept in memory and the server will send it out to the clients while longer term info like active games and who is connected would be kept in a database that all the services like the lobby can pull info from.&#xD;&#xA;&#xD;&#xA;Raw access, direct from the client with SQL commands?  Bad idea.  Have the server receive requests, which you then internally create the SQL commands from.&#xD;&#xA;" />
  <row Id="37033" PostHistoryTypeId="2" PostId="16125" RevisionGUID="4e15adf2-e1c4-4253-ad71-0b81f210b270" CreationDate="2011-08-17T21:57:58.823" UserId="1855" Text="I'd have to say it really depends on your game/simulation and how well you can model it in SQL.&#xD;&#xA;&#xD;&#xA;Nowadays SQL Servers can keep lots of data 'live' in memory, and optimize access and processing of the data extremely well.&#xD;&#xA;&#xD;&#xA;And SQL should scale, in many ways, number of users, servers, processors, memory etc. - Some of this really difficult stuff to do from scratch....&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37034" PostHistoryTypeId="2" PostId="16126" RevisionGUID="a61e002e-2ec2-452c-a95d-feb40e57cbe1" CreationDate="2011-08-17T22:53:50.660" UserId="4306" Text="Personally I think that it's really annoying when I go to a friend's FB profile or my profile and I see all is this: &lt;br /&gt;&#xD;&#xA;&#xD;&#xA;![Spamage!][1]&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;**Nevertheless**, I think that it is a huge marketing tool that can make your game grow extremely fast. I've seen few games on the iOS that use FB and twitter in their game. One game I've seen that does it the best is [Haypi Kingdom][2], it only posts to your wall when you level up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tuhd0.png&#xD;&#xA;  [2]: http://haypi.com/" />
  <row Id="37035" PostHistoryTypeId="5" PostId="16126" RevisionGUID="1d04e62b-ce23-493d-980d-590318cd76e7" CreationDate="2011-08-17T23:16:25.337" UserId="4306" Comment="added 1 characters in body" Text="Personally, I think that it's really annoying when I go to a friend's FB profile or my profile and I see all is this: &lt;br /&gt;&#xD;&#xA;&#xD;&#xA;![Spamage!][1]&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;**Nevertheless**, I think that it is a huge marketing tool that can make your game grow extremely fast. I've seen few games on the iOS that use FB and twitter in their game. One game I've seen that does it the best is [Haypi Kingdom][2], it only posts to your wall when you level up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tuhd0.png&#xD;&#xA;  [2]: http://haypi.com/" />
  <row Id="37036" PostHistoryTypeId="17" PostId="16127" RevisionGUID="2e306691-febe-4385-9a4a-1f4dc04705c9" CreationDate="2011-08-17T23:34:58.603" UserId="-1" Comment="from http://stackoverflow.com/questions/7097905/c-game-setting-message-takes-away-first-character" Text="" />
  <row Id="37037" PostHistoryTypeId="2" PostId="16128" RevisionGUID="c02a22cd-27a8-4687-9a2c-4a638c4aa76f" CreationDate="2011-08-17T18:55:31.567" UserDisplayName="Trey Schroeder" Text="char is 16 bits, are you sure you aren't reading the first char when you try to read the length?&#xD;&#xA;&#xD;&#xA;Try reading the whole block as text:&#xD;&#xA;&#xD;&#xA;    else if (Type == 6)&#xD;&#xA;    {&#xD;&#xA;        if (Character.Network.Stall.isOpened) return;&#xD;&#xA;        Character.Network.Stall.WelcomeMsg = Reader.Text3();&#xD;&#xA;        Character.Network.Stall.Send(Packet.StallWelcome(Character.Network.Stall.WelcomeMsg));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37038" PostHistoryTypeId="2" PostId="16127" RevisionGUID="28b991dd-b568-4f14-92da-d8d139fb1ef7" CreationDate="2011-08-17T18:51:48.610" UserDisplayName="user897199" Text="So If you set it to like &#xD;&#xA;&#xD;&#xA;&gt; abcdefg&#xD;&#xA;&#xD;&#xA;it will come out like&#xD;&#xA;&#xD;&#xA;&gt; bcdefg&#xD;&#xA;&#xD;&#xA;Here's changing the message&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;   &#xD;&#xA;Here's the result&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here's the code&#xD;&#xA;&#xD;&#xA;    //Set Welcome msg&#xD;&#xA;    else if (Type == 6)&#xD;&#xA;    {&#xD;&#xA;        if (Character.Network.Stall.isOpened) return;&#xD;&#xA;        short length = Reader.Int16();&#xD;&#xA;        Character.Network.Stall.WelcomeMsg = Reader.Text3();&#xD;&#xA;        Character.Network.Stall.Send(Packet.StallWelcome(Character.Network.Stall.WelcomeMsg));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Any help?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/RhjHv.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/OMmCC.jpg" />
  <row Id="37039" PostHistoryTypeId="1" PostId="16127" RevisionGUID="28b991dd-b568-4f14-92da-d8d139fb1ef7" CreationDate="2011-08-17T18:51:48.610" UserDisplayName="user897199" Text="C# Game Setting message Takes away first character" />
  <row Id="37040" PostHistoryTypeId="3" PostId="16127" RevisionGUID="28b991dd-b568-4f14-92da-d8d139fb1ef7" CreationDate="2011-08-17T18:51:48.610" UserDisplayName="user897199" Text="&lt;c#&gt;" />
  <row Id="37041" PostHistoryTypeId="17" PostId="16128" RevisionGUID="c4ed9b0e-2aaf-4c90-81be-b56634a97150" CreationDate="2011-08-17T23:34:58.603" UserId="-1" Comment="from http://stackoverflow.com/questions/7097905/c-game-setting-message-takes-away-first-character" Text="" />
  <row Id="37042" PostHistoryTypeId="25" PostId="16122" RevisionGUID="0f631cf5-00cd-425d-9ee0-087d98d7cb50" CreationDate="2011-08-18T00:37:26.647" Comment="http://twitter.com/#!/StackGameDev/status/103988842763264000" />
  <row Id="37043" PostHistoryTypeId="5" PostId="15996" RevisionGUID="29f0051f-9885-4c5b-a4ff-458e8ae6f246" CreationDate="2011-08-18T02:21:43.033" UserId="4306" Comment="forgot your 's', added tags and other punctuation" Text="I am building an MMO and want to add NPCs. The thing is I don't know the basic design. What does the calculations, the clients or the server? I would understand the server calculating events and reactions, but when it comes down to pathfinding and position and movement of player, who calculates that?&#xD;&#xA;&#xD;&#xA;Who calculates the AI the server or client? I couldn't imagine the server calculating the pathfinding, position, movement and so on. Please I need help understanding this, thanks, anything will help." />
  <row Id="37044" PostHistoryTypeId="6" PostId="15996" RevisionGUID="29f0051f-9885-4c5b-a4ff-458e8ae6f246" CreationDate="2011-08-18T02:21:43.033" UserId="4306" Comment="forgot your 's', added tags and other punctuation" Text="&lt;ai&gt;&lt;mmo&gt;&lt;server&gt;&lt;movement&gt;&lt;npc&gt;" />
  <row Id="37045" PostHistoryTypeId="24" PostId="15996" RevisionGUID="29f0051f-9885-4c5b-a4ff-458e8ae6f246" CreationDate="2011-08-18T02:21:43.033" Comment="Proposed by 4306 approved by 51 edit id of 655" />
  <row Id="37046" PostHistoryTypeId="2" PostId="16129" RevisionGUID="19e266dd-35f4-488b-b67f-b0e3f5f0af86" CreationDate="2011-08-18T03:19:05.587" UserId="1573" Text="I'm trying to build a very simple rhythm game (as a one-off art installation, not a commercial project) demonstrating a novel controller, but I've got an extremely short timeframe to do it in. Are there any open-source rhythm games or frameworks out there that I could use instead of writing such a game from scratch?&#xD;&#xA;&#xD;&#xA;I could probably bang the code together in PyGame or Processing over a few days, but any time I can save on programming can be spent instead on the physical build, which would make the overall installation better.  The requirements for the game itself are super simple -- I just need to scroll notes across the screen, register points based on how well the player matches them, and play a song (ducking one of the channels when a note is missed). &#xD;&#xA;&#xD;&#xA;The custom controller is Arduino-based, sending its data as bytes over a serial port, so I don't need any fancy DirectX support. Just something that can run with &lt;60ms latency. " />
  <row Id="37047" PostHistoryTypeId="1" PostId="16129" RevisionGUID="19e266dd-35f4-488b-b67f-b0e3f5f0af86" CreationDate="2011-08-18T03:19:05.587" UserId="1573" Text="Is there an open source rhythm / music game framework?" />
  <row Id="37048" PostHistoryTypeId="3" PostId="16129" RevisionGUID="19e266dd-35f4-488b-b67f-b0e3f5f0af86" CreationDate="2011-08-18T03:19:05.587" UserId="1573" Text="&lt;framework&gt;&lt;music&gt;&lt;prototyping&gt;" />
  <row Id="37049" PostHistoryTypeId="25" PostId="16127" RevisionGUID="aed0092c-cd85-4051-88ed-4b7018ec457f" CreationDate="2011-08-18T03:37:27.007" Comment="http://twitter.com/#!/StackGameDev/status/104034143628820480" />
  <row Id="37050" PostHistoryTypeId="2" PostId="16130" RevisionGUID="78bd3c86-21b8-447a-aba1-4556db91d3fe" CreationDate="2011-08-18T04:07:26.197" UserId="51" Text="It probably would be more effort to strip them down, but if you're curious both &lt;a href=&quot;http://sourceforge.net/projects/stepmania/&quot;&gt;StepMania&lt;/a&gt; and &lt;a href=&quot;http://sourceforge.net/projects/fretsonfire/&quot;&gt;Frets on Fire&lt;/a&gt; are open source." />
  <row Id="37051" PostHistoryTypeId="2" PostId="16131" RevisionGUID="a00d6073-d136-4ec5-a65d-eb6de912afb8" CreationDate="2011-08-18T04:32:08.390" UserId="2744" Text="As mentioned in other answer(s), the definitive answer is testing.&#xD;&#xA;&#xD;&#xA;The usual &quot;silent observer&quot; method of user testing I suspect is sufficient for a lot of metrics with follow up questions to explore any areas of confusion about what the testers might be feeling.&#xD;&#xA;&#xD;&#xA;Sidenote: I would suggest that your core premise that games are fundamentally different to applications due to the entertainment factor is incorrect. Sneak a peek at something like Danc's &quot;Princess rescuing application&quot; presentation ( http://blog.iainlobb.com/2008/10/princess-rescuing-application.html ) and see what you think." />
  <row Id="37052" PostHistoryTypeId="2" PostId="16132" RevisionGUID="39074b21-b6a4-4856-b6df-7ca8b9e43738" CreationDate="2011-08-18T05:48:17.287" UserId="4129" Text="You want a spatial index such as [quadtree][1] (2D) or [octree][2] (3D).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Octree" />
  <row Id="37053" PostHistoryTypeId="25" PostId="16129" RevisionGUID="411d14ed-0166-450c-874b-22030724632f" CreationDate="2011-08-18T06:37:27.550" Comment="http://twitter.com/#!/StackGameDev/status/104079442900561920" />
  <row Id="37054" PostHistoryTypeId="2" PostId="16133" RevisionGUID="f5553089-bdb8-44bd-aa40-6fdd8c710f03" CreationDate="2011-08-18T06:57:43.603" UserId="1072" Text="There's a heck of a lot of free games available out there, some of which are as good as games that you have to pay for. My question is, what makes the difference between a game that people will be willing to pay for, and one which is best left as a free to download/play online game subsidised with advertising?&#xD;&#xA;" />
  <row Id="37055" PostHistoryTypeId="1" PostId="16133" RevisionGUID="f5553089-bdb8-44bd-aa40-6fdd8c710f03" CreationDate="2011-08-18T06:57:43.603" UserId="1072" Text="What distinguishes a free to play game from one worth paying for?" />
  <row Id="37056" PostHistoryTypeId="3" PostId="16133" RevisionGUID="f5553089-bdb8-44bd-aa40-6fdd8c710f03" CreationDate="2011-08-18T06:57:43.603" UserId="1072" Text="&lt;marketing&gt;&lt;free-to-play&gt;" />
  <row Id="37057" PostHistoryTypeId="2" PostId="16134" RevisionGUID="543356f3-6424-4522-b40b-29798d314a0e" CreationDate="2011-08-18T07:30:46.093" UserId="20" Text="It's a decision made by the developers/publishers. In markets where a price-tag is an obstacle (eg. Apps), a lot of developers choose to go with a free-to-play game and get their revenue from ads or in-app purchases.&#xD;&#xA;&#xD;&#xA;This business-model is also very common in browser-games. I'm not aware of any browser game that you actually buy before you can play it.&#xD;&#xA;&#xD;&#xA;That being said, it's not a matter of how &quot;good&quot; a game is that makes it fall into the category of free-to-play or pay in advance.&#xD;&#xA;&#xD;&#xA;As with everything else you want to sell, you'll have to study your target market/audience and find the appropriate way to sell your game. Also you'll have to decide whether or not you want to release a demo (or light) version of your game *and* a paid version, or if you want to just ship one version which is free-to-play and has in-app purchases." />
  <row Id="37058" PostHistoryTypeId="2" PostId="16135" RevisionGUID="86eed133-b002-4b67-b7b3-b39f0aee5c25" CreationDate="2011-08-18T09:16:41.393" UserId="9332" Text="I have a look [one dama game][1].. And want to know about the which algorithm works in it...&#xD;&#xA;&#xD;&#xA;Thanks.. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=zPi0hELfGY8&amp;amp;feature=related" />
  <row Id="37059" PostHistoryTypeId="1" PostId="16135" RevisionGUID="86eed133-b002-4b67-b7b3-b39f0aee5c25" CreationDate="2011-08-18T09:16:41.393" UserId="9332" Text="Which algorithm works in dama game?" />
  <row Id="37060" PostHistoryTypeId="3" PostId="16135" RevisionGUID="86eed133-b002-4b67-b7b3-b39f0aee5c25" CreationDate="2011-08-18T09:16:41.393" UserId="9332" Text="&lt;algorithm&gt;&lt;cocos2d-iphone&gt;&lt;ios&gt;&lt;objective-c&gt;" />
  <row Id="37061" PostHistoryTypeId="25" PostId="16133" RevisionGUID="a9bfa7a8-8e56-40b5-9286-37a44ffc8023" CreationDate="2011-08-18T09:37:27.273" Comment="http://twitter.com/#!/StackGameDev/status/104124740943355904" />
  <row Id="37062" PostHistoryTypeId="5" PostId="16135" RevisionGUID="aad57c8f-4f05-44b3-8ad5-7c1aca241d7c" CreationDate="2011-08-18T09:45:26.197" UserId="20" Comment="changed title and wording. removed iOS related tags since they are not relevant" Text="I saw this [checkers game][1] and I wondered how the A.I. was implemented.&#xD;&#xA;&#xD;&#xA;How should I implement an A.I. for [checkers][2] (draughts, dama, dame)? Are there any known algorithms?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=zPi0hELfGY8&amp;amp;feature=related&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Draughts" />
  <row Id="37063" PostHistoryTypeId="4" PostId="16135" RevisionGUID="aad57c8f-4f05-44b3-8ad5-7c1aca241d7c" CreationDate="2011-08-18T09:45:26.197" UserId="20" Comment="changed title and wording. removed iOS related tags since they are not relevant" Text="How to implement A.I. for checkers/draughts?" />
  <row Id="37064" PostHistoryTypeId="6" PostId="16135" RevisionGUID="aad57c8f-4f05-44b3-8ad5-7c1aca241d7c" CreationDate="2011-08-18T09:45:26.197" UserId="20" Comment="changed title and wording. removed iOS related tags since they are not relevant" Text="&lt;algorithm&gt;&lt;ai&gt;" />
  <row Id="37065" PostHistoryTypeId="2" PostId="16136" RevisionGUID="9d860f3e-2011-47e0-a2f2-e51a045799be" CreationDate="2011-08-18T09:45:42.670" UserId="5163" Text="I'm writing a game which uses obj files. I created an object in blender and I applied texture without UV coordinates and my question is: how to export this object to obj file, but with texture coordinates?" />
  <row Id="37066" PostHistoryTypeId="1" PostId="16136" RevisionGUID="9d860f3e-2011-47e0-a2f2-e51a045799be" CreationDate="2011-08-18T09:45:42.670" UserId="5163" Text="Blender - exporting .obj with texture coords" />
  <row Id="37067" PostHistoryTypeId="3" PostId="16136" RevisionGUID="9d860f3e-2011-47e0-a2f2-e51a045799be" CreationDate="2011-08-18T09:45:42.670" UserId="5163" Text="&lt;3d&gt;&lt;textures&gt;&lt;coordinates&gt;&lt;blender&gt;&lt;obj&gt;" />
  <row Id="37069" PostHistoryTypeId="5" PostId="16105" RevisionGUID="e3c5977e-90b0-4d5a-bb64-1b109407bfb4" CreationDate="2011-08-18T10:59:37.263" UserId="7737" Comment="added 257 characters in body" Text="I have written a video player using SlimDX and DirectShow which is displaying the video on a SlimDX texture.&#xD;&#xA;&#xD;&#xA;I am extracting the video frames using the [ISampleGrabberCB](http://msdn.microsoft.com/en-us/library/dd376985%28v=vs.85%29.aspx) interface from DirectShow and storing them in a byte array, writing the array into the texture whenever a new frame is available.&#xD;&#xA;&#xD;&#xA;The problem is that my video is exhibiting tearing when playing a high definition video, but displays correctly for normal video playback, what can the causes for this problem be, and what possible solutions are there for displaying high definition video from DirectShow via SlimDX?&#xD;&#xA;         &#xD;&#xA;    _OutputFrame.LockRectangle(i, LockFlags.Discard).Data.WriteRange&lt;byte&gt;_VideoFrameBytes);&#xD;&#xA;                    _OutputFrame.UnlockRectangle(i);                                                                                            " />
  <row Id="37070" PostHistoryTypeId="2" PostId="16138" RevisionGUID="b2225319-184f-4031-bffa-186a1b740669" CreationDate="2011-08-18T11:21:57.807" UserId="1101" Text="&gt; Question 1: How would you define the creative/entertainment value of video-game requirements?&#xD;&#xA;&#xD;&#xA;I don't know. I'm not convinced the science is ready, yet.&#xD;&#xA;&#xD;&#xA;&gt; Question 2: How would you measure it?&#xD;&#xA;&#xD;&#xA;We can't.&#xD;&#xA;&#xD;&#xA;&gt; Question 3: Who should measure it?&#xD;&#xA;&#xD;&#xA;Us. :(&#xD;&#xA;&#xD;&#xA;Right now, the only useful metrics we have are sales figures and ratings (eg. MetaCritic). We don't understand the domain well enough to do much more than that, which is why you see a lot of copycat games - taking a game that we know to have worked and tweaking the formula a bit gives a good chance of having a second game that works. *'The acorn doesn't fall far from the tree'*, and all that.&#xD;&#xA;&#xD;&#xA;Some designers have attempted to come up with broad checklists or systems for judging the quality of a game or its mechanics. eg. In Jesse Schell's *'The Art of Game Design'* he describes 100 'lenses' which are each a way of critically evaluating a game. This provides a system of measurement, but the measurements themselves are still fairly subjective. Similarly the MDA system (Mechanics/Dynamics/Aesthetics) broadly implies that your mechanics should combine to form dynamics, and your dynamics should support the aesthetic, but again this provides a tool for measurement but no units of measurement." />
  <row Id="37071" PostHistoryTypeId="2" PostId="16139" RevisionGUID="762c3c32-e2e2-4f4d-92ad-7890dd3e1271" CreationDate="2011-08-18T11:52:05.870" UserId="20" Text="As you already noticed, there's no way around UV coordinates for games. Thankfully, blender comes with some very good UV unwrapping tools.&#xD;&#xA;&#xD;&#xA;The simplest way to get UV coordinates from a 3D model in blender is to use *Smart UV Project*. You can do that by pressing &lt;kbd&gt;U&lt;/kbd&gt; while in edit-mode and then select &quot;Smart UV Project&quot; from the menu.&#xD;&#xA;&#xD;&#xA;This creates UV &quot;patches&quot; given some angular threshold. The result can look like this:&#xD;&#xA;&#xD;&#xA;![UV coordinates created by &quot;Smart UV Project&quot;][1]&#xD;&#xA;&#xD;&#xA;Done, you've got UV coordinates now. However, these coordinates are most likely not that useful, since you'll end up with a ton of seams. A good unwrapped mesh has less seams, preferably at places where they can easily be hidden (eg. where an uniform color meets) or where the seams will be obstructed by other geometry. That's why you usually mark the seams yourself (in edit-mode select the edges that should be a seam and press &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;E&lt;/kbd&gt; and select &quot;Mark Seam&quot; in the menu). Then use the regular &quot;Unwrap&quot; (not &quot;Smart UV Project&quot;) to unwrap the mesh,&#xD;&#xA;&#xD;&#xA;Good UV unwrapping is hard and requires practice. This [video-tutorial][2] might help you getting started.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sSX7m.png&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/16136/blender-exporting-obj-with-texture-coords" />
  <row Id="37072" PostHistoryTypeId="2" PostId="16140" RevisionGUID="67288a2f-7d0e-415f-a0d0-dff1f352b08f" CreationDate="2011-08-18T12:13:51.793" UserId="1386" Text="Any any point in the game the amount of possible moves for a player is quite low (around 5) this means that thinking a few moves ahead, evaluating every possible move and selecting the best move is doable.&#xD;&#xA;&#xD;&#xA;This approach is called [minimax (wikipedia)][1].&#xD;&#xA;&#xD;&#xA;To implement minimax you'll need a evaluation function that returns a score for a given board layout and player. For draughts a naive implementation would be a function that returns one point for every piece the player has alive.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Minimax" />
  <row Id="37073" PostHistoryTypeId="5" PostId="16140" RevisionGUID="5e91280f-c59a-4d8e-9094-15f0b996a0b5" CreationDate="2011-08-18T12:25:51.303" UserId="1386" Comment="added 291 characters in body" Text="Any any point in the game the amount of possible moves for a player is quite low (around 5) this means that thinking a few moves ahead, evaluating every possible move and selecting the best move is doable.&#xD;&#xA;&#xD;&#xA;This approach is called [minimax (wikipedia)][1].&#xD;&#xA;&#xD;&#xA;To implement minimax you'll need a evaluation function that returns a score for a given board layout and player. For draughts a naive implementation would be a function that returns one point for every piece the player has alive.&#xD;&#xA;&#xD;&#xA;![minimax decision tree][2]&#xD;&#xA;&#xD;&#xA;A visualisation of a minimax decision tree (from the wikipedia article).&#xD;&#xA;Down the left hand side is the turn number. The leaf nodes each have an evaluated score which is fed back up the tree to make a decision.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Minimax&#xD;&#xA;  [2]: http://i.stack.imgur.com/O0b1g.png" />
  <row Id="37074" PostHistoryTypeId="5" PostId="16140" RevisionGUID="6f95ca75-d7df-4976-9137-57629221923c" CreationDate="2011-08-18T12:31:11.110" UserId="1386" Comment="added 291 characters in body" Text="Any any point in the game the amount of possible moves for a player is quite low* (around 5) this means that thinking a few moves ahead, evaluating every possible move and selecting the best move is doable.&#xD;&#xA;&#xD;&#xA;This approach is called [minimax (wikipedia)][1].&#xD;&#xA;&#xD;&#xA;To implement minimax you'll need a evaluation function that returns a score for a given board layout and player. For draughts a naive implementation would be a function that returns one point for every piece the player has alive.&#xD;&#xA;&#xD;&#xA;![minimax decision tree][2]&#xD;&#xA;&#xD;&#xA;A visualisation of a minimax decision tree (from the wikipedia article).&#xD;&#xA;Down the left hand side is the turn number. The leaf nodes each have an evaluated score which is fed back up the tree to make a decision.&#xD;&#xA;&#xD;&#xA;`*` however draughts is the game with the highest branching factor that has been completely [solved][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Minimax&#xD;&#xA;  [2]: http://i.stack.imgur.com/O0b1g.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Solved_game" />
  <row Id="37075" PostHistoryTypeId="2" PostId="16141" RevisionGUID="d1062f7a-39b2-4569-ac03-2e6d591c9faa" CreationDate="2011-08-18T12:35:31.007" UserId="8578" Text="Oh I do love these games!&#xD;&#xA;&#xD;&#xA;So first things first, in order for a computer to play a game, it needs: &#xD;&#xA;&#xD;&#xA; 1. a structure to work with &#xD;&#xA; 2. rules to play by&#xD;&#xA; 3. a win condition to work towards&#xD;&#xA;&#xD;&#xA;Let's tackle this one piece at a time.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Structure&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Since the board is an 8x8 grid (but could easily scale), and each grid space may exist in only one of five states, let's define those states: &#xD;&#xA;&#xD;&#xA;    [EMPTY, WHITE_PIECE, BLACK_PIECE, WHITE_PIECE_PROMOTED, BLACK_PIECE_PROMOTED]&#xD;&#xA;&#xD;&#xA;Respectively ENUM'd to:&#xD;&#xA;&#xD;&#xA;    [0, 1, 2, 3, 4]&#xD;&#xA;&#xD;&#xA;Now that we know what each space can be we need some way to represent all the spaces, or the board if you will.  Almost every strong language will support a multi-dimensional array (an array where each element is an array holding data).&#xD;&#xA;So take the following slack-code for defining our array:&#xD;&#xA;&#xD;&#xA;    BOARD_ARRAY = array(8, 8)&#xD;&#xA;&#xD;&#xA;This will give us an 8 x 8 array in which we can store integers (our enums from before):&#xD;&#xA;&#xD;&#xA;    (&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;Now you can already see how that this is beginning to look like a board!&#xD;&#xA;I've never played the variant mentioned in the youtube video but it appears to start with 2 rows of white pieces one row from the bottom, and 2 rows of black pieces one row from the top.  Which would mean when we start a game our array should look like this:&#xD;&#xA;&#xD;&#xA;    (&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [2, 2, 2, 2, 2, 2, 2, 2],&#xD;&#xA;    [2, 2, 2, 2, 2, 2, 2, 2],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [1, 1, 1, 1, 1, 1, 1, 1],&#xD;&#xA;    [1, 1, 1, 1, 1, 1, 1, 1],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;(Remember 2 represents 'BLACK_PIECE' and 1 represents 'WHITE_PIECE')&#xD;&#xA;&#xD;&#xA;So now the computer has a structure to work with. Step 1 complete!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Rules&#xD;&#xA;---&#xD;&#xA;Let's imagine you had an actual board set up in front of you, playing against a master player.  If you tried to move one of his pieces, you'd get your hand slapped.  If you tried to move a piece in a way you couldn't, you'd get your hand slapped.  If you tried to cheat well... you get the idea.  But the problem is, computers don't.  So it's our job to provide **strict** rules to play within.&#xD;&#xA;&#xD;&#xA;We need to create a way to check if any given move is 'legal'.  Which means we first need some way to represent a 'move'.  One way would be to use array positions; For example to move a piece from [0, 0] to [0, 1], we could create a function that will update the board given that move.  So back to slack:&#xD;&#xA;&#xD;&#xA;    MY_MOVE = array( [0, 0], [0, 1] )&#xD;&#xA;&#xD;&#xA;The above represents one piece, moving one space down from the top corner of the board (assuming 0, 0 is the top left corner).  You may also notice I chose to use a multidimensional array for the move.  This is because pieces may theoretically move a great number of times in one turn (for 'jumping' other pieces).  So let's pretend at 0, 1 there was an opponents piece, meaning we would land at 0, 2:&#xD;&#xA;&#xD;&#xA;    MY_MOVE = array( [0, 0], [0, 2] )&#xD;&#xA;    &#xD;&#xA;Pretty simple eh.  The program should understand that if we skip a space we are jumping another piece (or else it's an illegal move, and should throw an error).  Now let's jump two pieces:&#xD;&#xA;&#xD;&#xA;    MY_MOVE = array ( [0, 0], [0, 2], [0, 4] )&#xD;&#xA;    &#xD;&#xA;This gives us a way to describe any move on the board. Yay!  Now since I don't fully understand the rules of the exact game in question (although I've played a bit of Canadian checkers in my day) the exact move legality will need to be defined by you.  A good flow up to this point would look like:&#xD;&#xA;&#xD;&#xA;    FUNCTION_FIND_ALL_LEGAL_MOVES( MY_BOARD ) Returns: array ALL_LEGAL_MOVES&#xD;&#xA;    FUNCTION_FIND_BEST_MOVE( MY_BOARD, ALL_LEGAL_MOVES ) Returns: array MY_MOVE&#xD;&#xA;    FUNCTION_DO_MOVE( MY_BOARD, MY_MOVE ) Throws: error ILLEGAL_MOVE Updates: MY_BOARD&#xD;&#xA;    repeat from start for each turn&#xD;&#xA;&#xD;&#xA;The above assumes you can cycle through each piece to find all it's legal moves, then given a collection of all the legal moves somehow choose the best one (strategy here).  The move is then applied to the board, or throws an error.  Then the next player takes their turn.&#xD;&#xA;So we have an AI that knows how to play!  Joy!  Moving on.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Winning&#xD;&#xA;---&#xD;&#xA;Simple games are wonderful, because winning is defined by a very simple state.  Ain't no white pieces on the board?  Well I guess you've won!  This is implemented in step 2 when we choose the best move to take us closer to the winning condition.&#xD;&#xA;&#xD;&#xA;To make some very intelligent AI you could keep a database that stored every possible board as a state, with every possible move from every possible state, to find chains towards winning.&#xD;&#xA;&#xD;&#xA;You could also create strategies, like: if there is a piece that WILL be jumped, save that piece or if a piece is able to jump more than one other piece do that jump.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That should give you a good jumping off point, it is only one method of literally unlimited possibilities.  You could theoretically build a giant robot to draw with crayons then conduct spectral analysis on the drawing to choose moves... but it wouldn't work very good, or fast.  This way has worked in the past, and worked well (:  Hope that helps!&#xD;&#xA;" />
  <row Id="37076" PostHistoryTypeId="2" PostId="16142" RevisionGUID="50793c6c-47ba-4c8b-a9c5-175cd4521466" CreationDate="2011-08-18T12:37:02.520" UserId="9337" Text="There's this game, that I've been wanting to make for quite some time. It's a project that I've started and had to abandon in the middle a couple of times. However, this time I'm determined to finish it. I want to make a RPG (tile based) game, I'm okay with having it be 2D but am considering something in the middle of 2D and 3D. I would also like the game to be at least partially multilayer if not an MMO. I'm not a bad programmer, so I can work my way through any problems I might come across, I just don't have any experience making games, so I'm interested in any technologies I can use that I might not yet be aware of, or what type of architecture I can implement and what strategies I can use to make a decent (and secure game). &#xD;&#xA;&#xD;&#xA;I made this game (2D tile based and partially multiplayer) before using MySql, PHP and JavaScript/Ajax. But now I would like it to be a bit more advanced with fluid graphics, and multiplayer where user's (or at least friends) can explore the maps together. &#xD;&#xA;&#xD;&#xA;My first thought was to use Flash, PHP and MySql. Where Flash calls to a php file that returns an xml object with coordinates and etc., but I'm not sure how fast or efficient this will be.&#xD;&#xA;&#xD;&#xA;With all that said, I'm wondering if anyone has any suggestions to what other technologies are out there that I can use. I would prefer that the game is browser based, but if it has to be run on the desktop I would like it to be at least cross-platform. I am familiar with HTML, JavaScript/jQuery, PHP, Flash, C#, WPF/XAML already and would prefer a combination of what I already know, but I don't mind learning something new either. &#xD;&#xA;&#xD;&#xA;Any helpful links on this are appreciated as well. &#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37077" PostHistoryTypeId="1" PostId="16142" RevisionGUID="50793c6c-47ba-4c8b-a9c5-175cd4521466" CreationDate="2011-08-18T12:37:02.520" UserId="9337" Text="Which platform and what strategies can I use" />
  <row Id="37078" PostHistoryTypeId="3" PostId="16142" RevisionGUID="50793c6c-47ba-4c8b-a9c5-175cd4521466" CreationDate="2011-08-18T12:37:02.520" UserId="9337" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;engine&gt;&lt;multiplayer&gt;&lt;tiles&gt;" />
  <row Id="37079" PostHistoryTypeId="25" PostId="16135" RevisionGUID="06243884-231e-4854-bd16-1f3254eb4f2d" CreationDate="2011-08-18T12:37:27.370" Comment="http://twitter.com/#!/StackGameDev/status/104170040621932545" />
  <row Id="37080" PostHistoryTypeId="2" PostId="16143" RevisionGUID="480da32a-866e-41f3-a946-615ea1894c66" CreationDate="2011-08-18T12:40:11.357" UserId="323" Text="I think you're conflating two unrelated concepts - &quot;free-to-play&quot; and &quot;advertising supported&quot;. A lot of the free-to-play games have *many* ways you can plow money into the game if you so choose, and they encourage you to do so at every opportunity. See Puzzle Pirates for an elegant example of this and Age of Wonders Online for a significantly more hamfisted version. Both of those games are &quot;free to play&quot;, neither of them have advertising, and both of them make money off users anyway.&#xD;&#xA;&#xD;&#xA;(Puzzle Pirates, with true design elegance, manages to make money off even the users who aren't interested in putting money in.)" />
  <row Id="37081" PostHistoryTypeId="6" PostId="16142" RevisionGUID="20111c7f-9846-4e24-96ea-a2161f25be50" CreationDate="2011-08-18T13:08:22.390" UserId="7946" Comment="edited tags" Text="&lt;engine&gt;&lt;multiplayer&gt;&lt;tiles&gt;&lt;libraries&gt;" />
  <row Id="37082" PostHistoryTypeId="6" PostId="16142" RevisionGUID="49772605-7095-4266-95b3-93fb0cf52c94" CreationDate="2011-08-18T13:08:39.800" UserId="7946" Comment="edited tags" Text="&lt;engine&gt;&lt;multiplayer&gt;&lt;tiles&gt;" />
  <row Id="37083" PostHistoryTypeId="2" PostId="16144" RevisionGUID="5907a2cf-31b6-46a6-9486-5bb1220b23d1" CreationDate="2011-08-18T13:09:32.370" UserId="8380" Text="For the independent game studio Mode 7 it took 4 years and 3 developers plus contractors. Do you think it could have been done faster (according that you have played it) ?&#xD;&#xA;&#xD;&#xA;What would it take to just make a clone of that game ?" />
  <row Id="37084" PostHistoryTypeId="1" PostId="16144" RevisionGUID="5907a2cf-31b6-46a6-9486-5bb1220b23d1" CreationDate="2011-08-18T13:09:32.370" UserId="8380" Text="What would it take to create a clone of Frozen Synapse?" />
  <row Id="37085" PostHistoryTypeId="3" PostId="16144" RevisionGUID="5907a2cf-31b6-46a6-9486-5bb1220b23d1" CreationDate="2011-08-18T13:09:32.370" UserId="8380" Text="&lt;indie&gt;" />
  <row Id="37086" PostHistoryTypeId="5" PostId="16139" RevisionGUID="dcbc301e-708b-4d75-80b2-eacea1225d3a" CreationDate="2011-08-18T13:21:50.970" UserId="20" Comment="fixed link" Text="As you already noticed, there's no way around UV coordinates for games. Thankfully, blender comes with some very good UV unwrapping tools.&#xD;&#xA;&#xD;&#xA;The simplest way to get UV coordinates from a 3D model in blender is to use *Smart UV Project*. You can do that by pressing &lt;kbd&gt;U&lt;/kbd&gt; while in edit-mode and then select &quot;Smart UV Project&quot; from the menu.&#xD;&#xA;&#xD;&#xA;This creates UV &quot;patches&quot; given some angular threshold. The result can look like this:&#xD;&#xA;&#xD;&#xA;![UV coordinates created by &quot;Smart UV Project&quot;][1]&#xD;&#xA;&#xD;&#xA;Done, you've got UV coordinates now. However, these coordinates are most likely not that useful, since you'll end up with a ton of seams. A good unwrapped mesh has less seams, preferably at places where they can easily be hidden (eg. where an uniform color meets) or where the seams will be obstructed by other geometry. That's why you usually mark the seams yourself (in edit-mode select the edges that should be a seam and press &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;E&lt;/kbd&gt; and select &quot;Mark Seam&quot; in the menu). Then use the regular &quot;Unwrap&quot; (not &quot;Smart UV Project&quot;) to unwrap the mesh,&#xD;&#xA;&#xD;&#xA;Good UV unwrapping is hard and requires practice. This [video-tutorial][2] might help you getting started.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/sSX7m.png&#xD;&#xA;  [2]: http://www.blendercookie.com/2011/01/21/intro_uvmapping/" />
  <row Id="37087" PostHistoryTypeId="2" PostId="16145" RevisionGUID="5c16da0e-19ce-49a1-a212-2e8c5bdbb260" CreationDate="2011-08-18T13:33:09.727" UserId="8193" Text="So I'm creating a game and I would like to know how to perform resource streaming (rather than loading the whole file into the buffer) for things such as my maps, sounds, music, etc. I'm using C++ and DirectX9 if in case you need to know." />
  <row Id="37088" PostHistoryTypeId="1" PostId="16145" RevisionGUID="5c16da0e-19ce-49a1-a212-2e8c5bdbb260" CreationDate="2011-08-18T13:33:09.727" UserId="8193" Text="Resource Streaming" />
  <row Id="37089" PostHistoryTypeId="3" PostId="16145" RevisionGUID="5c16da0e-19ce-49a1-a212-2e8c5bdbb260" CreationDate="2011-08-18T13:33:09.727" UserId="8193" Text="&lt;resources&gt;&lt;resource-management&gt;" />
  <row Id="37090" PostHistoryTypeId="2" PostId="16146" RevisionGUID="c3cd973b-d345-402c-a649-2a0c190e2d5d" CreationDate="2011-08-18T13:50:13.710" UserId="5473" Text="Flash. For single player, can't see why not. I've written a pseudo-3D display engine in AS3 that performs very well and is adapted to any sort of isometric game, about as intensive as view logic gets without going full 3D. If, however, you plan multiplayer -- and its probably best to make the decision ASAP -- and your game ie eg. an action gam, you'll have problems with your Flash/PHP/MySQL; HTTP requests (which run over TCP) are not known for their speediness; then there's the DB calls too (which, while very fast, are another overhead). It's reasonable to expect 250-500ms if packets start dropping over TCP. Bear in mind that you will have to pay for bandwidth and maintain your server. That's why there are cost-effective server solutions like Player.IO and SmartFox Server out there. See link below.&#xD;&#xA;&#xD;&#xA;HTML5 as @heishe said. I've used HTML5 + the canvas tag briefly for rendering. You can't easily rely on it being fast as Flash across different browsers and platforms... although on some, and for very specific things, and on very specific browsers eg. Chrome and IE9, it is undoubtedly faster. The full set of HTML5 rendering technologies (such as compositing which you get right off the bat in Flash) aren't full implemented yet. Sound is the biggest problem with HTML5 right now. As a result, a number of engine solutions actually use Flash just to do the sound bit (obviously they abstract this away from the engine user inasmuch as possible). Having said all this, there are numerous game engines out there for HTML5 which attempt to address it's biggest flaws i.e. reliable cross-browser rendering efficiency and sound. &#xD;&#xA;&#xD;&#xA;Unity. About as cross-platform and web-deployable as you'll get until HTML5 becomes more production-worthy. With the free version, and DropBox for source control, you can do a lot. There are tutorials out there on how to do 2D in Unity -- it's been done a lot. You can also deploy to desktop if you like. You write your code in C#, JS or a Python variant. It's got a nice IDE, if you like such things. It's also very easy to import 3D models into (though I'm not suggesting you go 3D).&#xD;&#xA;&#xD;&#xA;C++ with SDL. Cross platform, very mature, good for 2D stuff, only need use OpenGL if you want to.&#xD;&#xA;&#xD;&#xA;As for multiplayer, have a look at this [comparison chart][1] of socket servers. It's on the Unity forums, but because they're socket servers, it doesn't matter what your client is written in... although it is nice to have client and server in the same language, eg. C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://forum.unity3d.com/threads/95277-Networking-Server-Comparison-Chart/page2" />
  <row Id="37091" PostHistoryTypeId="5" PostId="16146" RevisionGUID="02328f73-fc01-44b8-a5a7-9cc8eea42ea8" CreationDate="2011-08-18T13:55:54.590" UserId="5473" Comment="added 153 characters in body" Text="**Flash.** For single player, can't see why not. I've written a pseudo-3D display engine in AS3 that performs very well and is adapted to any sort of isometric game, about as intensive as view logic gets without going full 3D. If, however, you plan multiplayer -- and its probably best to make the decision ASAP -- and your game ie eg. an action gam, you'll have problems with your Flash/PHP/MySQL; HTTP requests (which run over TCP) are not known for their speediness; then there's the DB calls too (which, while very fast, are another overhead). It's reasonable to expect 250-500ms if packets start dropping over TCP. Bear in mind that you will have to pay for bandwidth and maintain your server. That's why there are cost-effective server solutions like Player.IO and SmartFox Server out there. See link below.&#xD;&#xA;&#xD;&#xA;**HTML5** as @heishe said. I've used HTML5 + the canvas tag briefly for rendering. You can't easily rely on it being fast as Flash across different browsers and platforms... although on some, and for very specific things, and on very specific browsers eg. Chrome and IE9, it is undoubtedly faster. The full set of HTML5 rendering technologies (such as compositing which you get right off the bat in Flash) aren't fully implemented yet. Sound is the biggest problem with HTML5 right now. As a result, a number of engine solutions actually use Flash just to do the sound bit (obviously they abstract this away from the engine user inasmuch as possible). Having said all this, there are numerous game engines out there for HTML5 which attempt to address it's biggest flaws i.e. reliable cross-browser rendering efficiency and sound. &#xD;&#xA;&#xD;&#xA;**Unity**. About as cross-platform and web-deployable as you'll get until HTML5 becomes more production-worthy. With the free version, and DropBox for source control, you can do a lot. There are tutorials out there on how to do 2D in Unity -- it's been done a lot. You can also deploy to desktop if you like. You write your code in C#, JS or a Python variant. It's got a nice IDE, if you like such things. It's also very easy to import 3D models into (though I'm not suggesting you go 3D).&#xD;&#xA;&#xD;&#xA;**C++ with SDL**. Desktop only, but cross-platform, very mature, good for 2D stuff, only need use OpenGL if you want to. Of course, stepping into the realms of C++ may be more than you want to deal with right now.&#xD;&#xA;&#xD;&#xA;You could even go with something like the [Google Web Toolkit][1] for your game.&#xD;&#xA;&#xD;&#xA;**Multiplayer**, have a look at this [comparison chart][2] of socket servers. It's on the Unity forums, but because they're socket servers, it doesn't matter what your client is written in... although it is nice to have client and server in the same language, eg. C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=F_sbusEUz5w&amp;feature=relmfu&#xD;&#xA;  [2]: http://forum.unity3d.com/threads/95277-Networking-Server-Comparison-Chart/page2" />
  <row Id="37092" PostHistoryTypeId="6" PostId="16142" RevisionGUID="502c5b37-261e-4c7d-9d1c-4d6bf0f449da" CreationDate="2011-08-18T14:07:10.947" UserId="4306" Comment="I added the '2d' tag" Text="&lt;2d&gt;&lt;engine&gt;&lt;multiplayer&gt;&lt;tiles&gt;" />
  <row Id="37093" PostHistoryTypeId="24" PostId="16142" RevisionGUID="502c5b37-261e-4c7d-9d1c-4d6bf0f449da" CreationDate="2011-08-18T14:07:10.947" Comment="Proposed by 4306 approved by 20 edit id of 656" />
  <row Id="37094" PostHistoryTypeId="5" PostId="16146" RevisionGUID="de4a347c-dbf9-4f23-9655-f9d8436f30d6" CreationDate="2011-08-18T14:21:52.443" UserId="5473" Comment="deleted 3 characters in body" Text="**Flash.** For single player, can't see why not. I've written a pseudo-3D display engine in AS3 that performs very well and is adapted to any sort of isometric game, about as intensive as view logic gets without going full 3D. If, however, you plan multiplayer -- and its probably best to make the decision ASAP -- and yours is eg. an action game, you'll have problems with your Flash/PHP/MySQL; HTTP requests (which run over TCP) are not known for their speediness; then there's the DB calls too (which, while very fast, are another overhead). It's reasonable to expect 250-500ms if packets start dropping over TCP. Bear in mind that you will have to pay for bandwidth and maintain your server. That's why there are cost-effective server solutions like Player.IO and SmartFox Server out there. See link below.&#xD;&#xA;&#xD;&#xA;**HTML5** as @heishe said. I've used HTML5 + the canvas tag briefly for rendering. You can't easily rely on it being fast as Flash across different browsers and platforms... although on some, and for very specific things, and on very specific browsers eg. Chrome and IE9, it is undoubtedly faster. The full set of HTML5 rendering technologies (such as compositing which you get right off the bat in Flash) aren't fully implemented yet. Sound is the biggest problem with HTML5 right now. As a result, a number of engine solutions actually use Flash just to do the sound bit (obviously they abstract this away from the engine user inasmuch as possible). Having said all this, there are numerous game engines out there for HTML5 which attempt to address it's biggest flaws i.e. reliable cross-browser rendering efficiency and sound. &#xD;&#xA;&#xD;&#xA;**Unity**. About as cross-platform and web-deployable as you'll get until HTML5 becomes more production-worthy. With the free version, and DropBox for source control, you can do a lot. There are tutorials out there on how to do 2D in Unity -- it's been done a lot. You can also deploy to desktop if you like. You write your code in C#, JS or a Python variant. It's got a nice IDE, if you like such things. It's also very easy to import 3D models into (though I'm not suggesting you go 3D).&#xD;&#xA;&#xD;&#xA;**C++ with SDL**. Desktop only, but cross-platform, very mature, good for 2D stuff, only need use OpenGL if you want to. Of course, stepping into the realms of C++ may be more than you want to deal with right now.&#xD;&#xA;&#xD;&#xA;You could even go with something like the [Google Web Toolkit][1] for your game.&#xD;&#xA;&#xD;&#xA;**Multiplayer**, have a look at this [comparison chart][2] of socket servers. It's on the Unity forums, but because they're socket servers, it doesn't matter what your client is written in... although it is nice to have client and server in the same language, eg. C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=F_sbusEUz5w&amp;feature=relmfu&#xD;&#xA;  [2]: http://forum.unity3d.com/threads/95277-Networking-Server-Comparison-Chart/page2" />
  <row Id="37095" PostHistoryTypeId="2" PostId="16147" RevisionGUID="c41a1cc4-08f8-4875-80f2-aac7a5e2db2d" CreationDate="2011-08-18T14:25:47.983" UserId="3505" Text="Don't use XML, it is in all ways an unnecessary resource hog with a big overhead on both data size and parsing time. You could use JSON, the size overhead is manageable (though it depends a lot on your specific implementation), and parsing in JavaScript is quick.&#xD;&#xA;&#xD;&#xA;For the back end, you should avoid storing time critical data in a database, keep it in application memory instead. That means PHP is out, I'm not sure if you can get ASP.NET to behave, but I wouldn't bet on it. [Node.js](http://nodejs.org) seems like a prominent candidate for the back end code, being both easy to use and relatively fast.&#xD;&#xA;&#xD;&#xA;If I were to do this I'd code the front end in old school HTML 4.01, once you have learned the quirks it works okay for 2D stuff, within the inherent limit of not being able to rotate images that is. Flash is the more traditional choice, and a decent one as well. Digging into the new fancy HTML 5 features is dangerous, you risk losing a significant amount of users due to not supporting their browser of choice." />
  <row Id="37096" PostHistoryTypeId="5" PostId="16144" RevisionGUID="67008048-f973-46ba-8415-3bc3e673e534" CreationDate="2011-08-18T14:28:06.950" UserId="8380" Comment="specified for indie" Text="For the independent game studio Mode 7 it took 4 years and 3 developers plus contractors. Do you think it could have been done faster (according that you have played it) ?&#xD;&#xA;&#xD;&#xA;What would it take to just make a clone of that game ? **for another indie that is**, not for a big studio." />
  <row Id="37097" PostHistoryTypeId="2" PostId="16148" RevisionGUID="f6ffbb0c-eaa7-435c-b266-10c95cc1c419" CreationDate="2011-08-18T14:42:33.710" UserId="3830" Text="It really depends on the skill level of your artists and programmers, the clarity of your design document, and what resources you have available.  If this is a full time job for everyone, it will go faster than if it's an &quot;on the side&quot; evenings and weekends job.  &#xD;&#xA;&#xD;&#xA;Probably a lot of what went into that original 4 years of development time was design, trial and error, prototyping and polishing the idea.  If you're going to just copy them, clearly you don't need to spend time on thinking much - just coding and art.&#xD;&#xA;&#xD;&#xA;You might find [this article][1] interesting.  It's about how Farmville was created in 5 weeks.  It was a clone of various games and so the developers didn't need to come up with a completely original idea.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/news/view/98990-How-FarmVille-Was-Written-In-Five-Weeks" />
  <row Id="37098" PostHistoryTypeId="10" PostId="16144" RevisionGUID="04d18ac9-57ab-4d4f-bcf9-451a89ace496" CreationDate="2011-08-18T14:45:33.137" UserId="51" CloseReasonId="3" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37099" PostHistoryTypeId="5" PostId="16148" RevisionGUID="6e1a7e5f-79ab-47bd-9532-ac511b0fa5a4" CreationDate="2011-08-18T14:49:23.623" UserId="3830" Comment="added 734 characters in body" Text="It depends on whether you've ever made a game before, whether you have money, time, resources or a team, or any one of other many things it takes to make this happen.&#xD;&#xA;&#xD;&#xA;It really depends on the skill level of your artists and programmers, the clarity of your design document, and what resources you have available.  If this is a full time job for everyone, it will go faster than if it's an &quot;on the side&quot; evenings and weekends job. &#xD;&#xA;&#xD;&#xA;Also, if you have previous game development experience it will go faster.  If you don't, it will go slower.  If you have a reliable team, it will go faster.  If your team is not reliable, it will go slower.&#xD;&#xA;&#xD;&#xA;Perhaps others can fill in more dependencies in the comments.&#xD;&#xA;&#xD;&#xA;If you REALLY stick to making a clone and not changing the game, it will go faster.  If you start making changes and tweaking, it may take longer.&#xD;&#xA;&#xD;&#xA;To the point about the original game you're cloning...&#xD;&#xA;&#xD;&#xA;Probably a lot of what went into that original 4 years of development time was design, trial and error, prototyping and polishing the idea.  If you're going to just copy them, clearly you don't need to spend time on thinking much - just coding and art.&#xD;&#xA;&#xD;&#xA;And lastly for some advice from the mouths of pros who've cloned other games..&#xD;&#xA;&#xD;&#xA;You might find [this article][1] interesting.  It's about how Farmville was created in 5 weeks.  It was a clone of various games and so the developers didn't need to come up with a completely original idea.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.escapistmagazine.com/news/view/98990-How-FarmVille-Was-Written-In-Five-Weeks" />
  <row Id="37100" PostHistoryTypeId="5" PostId="16146" RevisionGUID="40a4c3a2-c947-44dc-93e2-236ade3f965c" CreationDate="2011-08-18T14:59:42.203" UserId="5473" Comment="added 5 characters in body" Text="**Flash.** For single player, can't see why not. I've written a pseudo-3D display engine in AS3 that performs very well and is adapted to any sort of isometric game, about as intensive as view logic gets without going full 3D. If, however, you plan multiplayer -- and its probably best to make the decision ASAP -- and yours is eg. an action game, you'll have problems with your Flash/PHP/MySQL; HTTP requests (which run over TCP) are not known for their speediness; then there's the DB calls too (which, while very fast, are another overhead). It's reasonable to expect 250-500ms ping if packets start dropping over TCP. Bear in mind that you will have to pay for bandwidth and maintain your server. That's why there are cost-effective server solutions like Player.IO and SmartFox Server out there. See link below.&#xD;&#xA;&#xD;&#xA;**HTML5** as @heishe said. I've used HTML5 + the canvas tag briefly for rendering. You can't easily rely on it being fast as Flash across different browsers and platforms... although on some, and for very specific things, and on very specific browsers eg. Chrome and IE9, it is undoubtedly faster. The full set of HTML5 rendering technologies (such as compositing which you get right off the bat in Flash) aren't fully implemented yet. Sound is the biggest problem with HTML5 right now. As a result, a number of engine solutions actually use Flash just to do the sound bit (obviously they abstract this away from the engine user inasmuch as possible). Having said all this, there are numerous game engines out there for HTML5 which attempt to address it's biggest flaws i.e. reliable cross-browser rendering efficiency and sound. &#xD;&#xA;&#xD;&#xA;**Unity**. About as cross-platform and web-deployable as you'll get until HTML5 becomes more production-worthy. With the free version, and DropBox for source control, you can do a lot. There are tutorials out there on how to do 2D in Unity -- it's been done a lot. You can also deploy to desktop if you like. You write your code in C#, JS or a Python variant. It's got a nice IDE, if you like such things. It's also very easy to import 3D models into (though I'm not suggesting you go 3D).&#xD;&#xA;&#xD;&#xA;**C++ with SDL**. Desktop only, but cross-platform, very mature, good for 2D stuff, only need use OpenGL if you want to. Of course, stepping into the realms of C++ may be more than you want to deal with right now.&#xD;&#xA;&#xD;&#xA;You could even go with something like the [Google Web Toolkit][1] for your game.&#xD;&#xA;&#xD;&#xA;**Multiplayer**, have a look at this [comparison chart][2] of socket servers. It's on the Unity forums, but because they're socket servers, it doesn't matter what your client is written in... although it is nice to have client and server in the same language, eg. C#.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=F_sbusEUz5w&amp;feature=relmfu&#xD;&#xA;  [2]: http://forum.unity3d.com/threads/95277-Networking-Server-Comparison-Chart/page2" />
  <row Id="37101" PostHistoryTypeId="2" PostId="16149" RevisionGUID="0fe6826a-5015-4fa5-a1fb-0dcced36f599" CreationDate="2011-08-18T15:08:02.103" UserId="5473" Text="Specifically re streaming world data, I believe it was GPG's Dungeon Siege that was the first well-known title to achieve this really efficiently for a really large world. It enabled the modern MMO (post tile-based, Ultima Online era).&#xD;&#xA;&#xD;&#xA;[Here][1]'s an article where Scott Bilas outlines the solutions they used. I don't doubt it would help to do further searches on the same topic. I seem to recall a GamaSutra article, but not too sure. Could be the same one.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.floatingorigin.com/mirror/continuous-world.htm&#xD;&#xA;&#xD;&#xA;I am sure things have come a long way since then, but that should get you started." />
  <row Id="37102" PostHistoryTypeId="5" PostId="16149" RevisionGUID="cf5d8f4c-a6d2-473b-97f6-b88893a96333" CreationDate="2011-08-18T15:13:06.830" UserId="5473" Comment="added 3 characters in body" Text="Specifically re streaming world data, I believe it was GPG's Dungeon Siege that was the first well-known title to achieve this really efficiently for a really large 3D world. It enabled the modern MMO (post tile-based, Ultima Online era).&#xD;&#xA;&#xD;&#xA;[Here][1]'s an article where Scott Bilas outlines the solutions they used. I don't doubt it would help to do further searches on the same topic. I seem to recall a GamaSutra article, but not too sure. Could be the same one.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.floatingorigin.com/mirror/continuous-world.htm&#xD;&#xA;&#xD;&#xA;I am sure things have come a long way since then, but that should get you started." />
  <row Id="37103" PostHistoryTypeId="5" PostId="16140" RevisionGUID="d323725c-f86d-475e-b5a3-3f50018b5c8b" CreationDate="2011-08-18T15:25:30.260" UserId="1386" Comment="deleted 1 characters in body" Text="At any point in the game the amount of possible moves for a player is quite low* (around 5) this means that thinking a few moves ahead, evaluating every possible move and selecting the best move is doable.&#xD;&#xA;&#xD;&#xA;This approach is called [minimax (wikipedia)][1].&#xD;&#xA;&#xD;&#xA;To implement minimax you'll need a evaluation function that returns a score for a given board layout and player. For draughts a naive implementation would be a function that returns one point for every piece the player has alive.&#xD;&#xA;&#xD;&#xA;![minimax decision tree][2]&#xD;&#xA;&#xD;&#xA;A visualisation of a minimax decision tree (from the wikipedia article).&#xD;&#xA;Down the left hand side is the turn number. The leaf nodes each have an evaluated score which is fed back up the tree to make a decision.&#xD;&#xA;&#xD;&#xA;`*` however draughts is the game with the highest branching factor that has been completely [solved][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Minimax&#xD;&#xA;  [2]: http://i.stack.imgur.com/O0b1g.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Solved_game" />
  <row Id="37104" PostHistoryTypeId="2" PostId="16150" RevisionGUID="bc80453d-ac98-4b29-842a-39c70a915230" CreationDate="2011-08-18T15:29:53.463" UserId="7482" Text="I have a successful puzzle game and I'm thinking about doing a new version and bringing that new version to FB, and selling it using FB credits. Does anyone have ideas on what the FB credits price point should be? I have some idea, and obviously I know what some of the virtual goods price points are, but I'm curious what peoples views would be on a price point for an entire game, and if the availability of free facebook credits could hurt sells etc." />
  <row Id="37105" PostHistoryTypeId="1" PostId="16150" RevisionGUID="bc80453d-ac98-4b29-842a-39c70a915230" CreationDate="2011-08-18T15:29:53.463" UserId="7482" Text="What would be a good Facebook credits price point for a puzzle game on Facebook?" />
  <row Id="37106" PostHistoryTypeId="3" PostId="16150" RevisionGUID="bc80453d-ac98-4b29-842a-39c70a915230" CreationDate="2011-08-18T15:29:53.463" UserId="7482" Text="&lt;facebook&gt;" />
  <row Id="37107" PostHistoryTypeId="25" PostId="560" RevisionGUID="40f27e3c-372f-44ec-afea-d7b638ac403a" CreationDate="2011-08-18T15:37:28.100" Comment="http://twitter.com/#!/StackGameDev/status/104215339671359488" />
  <row Id="37108" PostHistoryTypeId="2" PostId="16151" RevisionGUID="9825c9ce-ca56-4442-b3f6-031b1ebe768b" CreationDate="2011-08-18T15:39:03.787" UserId="51" Text="I know of very few games that actually charge admission.  You most likely won't make any money that way, simply due to the fact that people can easily find something else to play with their time.&#xD;&#xA;&#xD;&#xA;There are a few examples I remember seeing that lock certain modes behind a paywall, but if people are getting enough enjoyment out of the free one then they won't feel obligated to try the other one (this is the same problem with demos that give away too much).  It also isn't as good of a monetization strategy because it's something the user only buys once.&#xD;&#xA;&#xD;&#xA;If you want to bring a puzzle game to facebook, my suggestion it to look and see what Popcap did with Bejeweled Blitz and Zuma Blitz.  They basically added a monetization layer on top of the existing games with things like purchasable powerups and the like.  They also made it very social with the weekly tournament idea and very visible friends scores." />
  <row Id="37109" PostHistoryTypeId="5" PostId="16149" RevisionGUID="e67c472e-5b70-407b-97a6-4c7b1e47d812" CreationDate="2011-08-18T15:41:50.000" UserId="5473" Comment="added 9 characters in body" Text="Specifically re streaming world data, I believe it was GPG's Dungeon Siege that was the first well-known title to achieve this really efficiently for a really large 3D world. It enabled the modern MMO (post the whole tile-based Ultima Online era).&#xD;&#xA;&#xD;&#xA;[Here][1]'s an article where Scott Bilas outlines the solutions they used. I don't doubt it would help to do further searches on the same topic. I seem to recall a GamaSutra article, but not too sure. Could be the same one.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.floatingorigin.com/mirror/continuous-world.htm&#xD;&#xA;&#xD;&#xA;I am sure things have come a long way since then, but that should get you started." />
  <row Id="37110" PostHistoryTypeId="2" PostId="16152" RevisionGUID="0e530450-174c-429e-a949-41640e4a258f" CreationDate="2011-08-18T15:58:49.403" UserId="3830" Text="David Edery (Spry Fox) posted a piece earlier on Google+ discussing this topic.  I think you'd find his post and the followup comments and discussion worth a read for this particular question.&#xD;&#xA;&#xD;&#xA;Rather than copy and paste the text, I'm linking to it below.  Do read it.&#xD;&#xA;&#xD;&#xA;[https://plus.google.com/104582272037881191614/posts/PLqGbor8q9J][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://plus.google.com/104582272037881191614/posts/PLqGbor8q9J" />
  <row Id="37111" PostHistoryTypeId="2" PostId="16153" RevisionGUID="c5e7bdd3-76f8-41a6-9329-e7142f766fde" CreationDate="2011-08-18T16:11:57.970" UserId="9343" Text="Please help! I'm trying to spawn 5 balls one by one from the sky and have them disappear as soon as they hit the ground or when they hit another user-controlled object that's on the ground. The good thing is that I can spawn the balls successfully as intended, but when they hit the ground (or the other user-controlled object on the ground), they don't disappear. I've been going through a ton of sample code since the past 2 days but I can't figure out how to do it. The game does run, but the debug terminal gives me an error saying: runtime error - attempt to index global 'self' &lt;a nil value&gt;. Here's the source code:&#xD;&#xA;&#xD;&#xA;    local randomBall = function()&#xD;&#xA;    	ball = display.newImage( &quot;hardball.png&quot; )&#xD;&#xA;    	ball.x = math.random (30, 450); ball.y = -20&#xD;&#xA;    	physics.addBody( ball, { density=2.9, friction=0.5, bounce=0.7, radius=24 } )&#xD;&#xA;    	local function whenHit (event)&#xD;&#xA;    		if(event.phase == &quot;began&quot;) then&#xD;&#xA;    			self:removeSelf()		&#xD;&#xA;    		end&#xD;&#xA;    	end&#xD;&#xA;    	ball:addEventListener(&quot;collision&quot;, whenHit)&#xD;&#xA;    end&#xD;&#xA;    &#xD;&#xA;    timer.performWithDelay( 500, randomBall, 5 )" />
  <row Id="37112" PostHistoryTypeId="1" PostId="16153" RevisionGUID="c5e7bdd3-76f8-41a6-9329-e7142f766fde" CreationDate="2011-08-18T16:11:57.970" UserId="9343" Text="Multiple spawned objects on collision - Corona SDK" />
  <row Id="37113" PostHistoryTypeId="3" PostId="16153" RevisionGUID="c5e7bdd3-76f8-41a6-9329-e7142f766fde" CreationDate="2011-08-18T16:11:57.970" UserId="9343" Text="&lt;2d&gt;&lt;iphone&gt;&lt;physics&gt;&lt;box2d&gt;&lt;ios&gt;" />
  <row Id="37114" PostHistoryTypeId="4" PostId="16145" RevisionGUID="243231ba-5e79-4ce8-9965-5e3b69df1219" CreationDate="2011-08-18T16:42:21.300" UserId="1198" Comment="updated title to better reflect question" Text="Help streaming resources (maps, sounds, music, etc) from many files for contiguous world" />
  <row Id="37115" PostHistoryTypeId="2" PostId="16154" RevisionGUID="81e6dc64-e6ef-4cad-81a8-7549cca9b44a" CreationDate="2011-08-18T17:51:24.263" UserId="9345" Text="Here John Carmack claims that PCs are still slower that current gen console hardware because of the overhead.&#xD;&#xA;&#xD;&#xA;&gt; &quot;A lot of it's driver overhead issues, where there's so much that we&#xD;&#xA;&gt; do in the game, all of this dynamic texture updating where on the&#xD;&#xA;&gt; console we say 'alright, we've got a new page of data', we put that&#xD;&#xA;&gt; page in and update the page table that points to that. &#xD;&#xA;&gt; &#xD;&#xA;&gt; &quot;On the console that may just be a matter of writing it to memory,&#xD;&#xA;&gt; it's like 'here's the texture, let's calculate exactly where this part&#xD;&#xA;&gt; of the page table is' and then we just poke it right in there,&quot; he&#xD;&#xA;&gt; explained.&#xD;&#xA;&#xD;&#xA;http://www.computerandvideogames.com/314566/carmack-extremely-frustrated-that-pc-is-10-times-as-powerful-as-ps3-360/?cid=OTC-RSS&amp;attr=CVG-General-RSS&#xD;&#xA;&#xD;&#xA;Is the situation really that dire? And are there any features or changes in Windows 8 planed that will improve the current state of the PC Gaming ?" />
  <row Id="37116" PostHistoryTypeId="1" PostId="16154" RevisionGUID="81e6dc64-e6ef-4cad-81a8-7549cca9b44a" CreationDate="2011-08-18T17:51:24.263" UserId="9345" Text="Is Carmack right about PC performance? And do windows 8 do something to address his concerns" />
  <row Id="37117" PostHistoryTypeId="3" PostId="16154" RevisionGUID="81e6dc64-e6ef-4cad-81a8-7549cca9b44a" CreationDate="2011-08-18T17:51:24.263" UserId="9345" Text="&lt;performance&gt;&lt;windows&gt;" />
  <row Id="37118" PostHistoryTypeId="2" PostId="16155" RevisionGUID="0665064d-530d-4c85-a215-313dc23ce3f6" CreationDate="2011-08-18T17:55:49.657" UserId="7911" Text="A note, setting off multiple reads will be slower because the disk I/O keeps seeking around to pull bits of data from each open request.&#xD;&#xA;&#xD;&#xA;To get around this I created an intermediate streaming traffic cop that prioritized multiple async read requests and serialized them to the OS.  In your own game you can create priorities based on data type or how soon the new data will be needed so that audio can come in first to avoid skipping and far away data will be loaded last.&#xD;&#xA;&#xD;&#xA;A note on audio: you do want to stream audio because data is pretty large, but you want your game to stream the data before it's needed because waiting for the actual &quot;Play sound&quot; call before loading will cause all sorts of delay and spoil the user experience.&#xD;&#xA;&#xD;&#xA;Since background loading and preparing data is a complex sequence of events involving threads, callbacks and voodoo that spans several systems in your game I suggest designing the interactions carefully before laying down any code to avoid massive debugging headaches later.&#xD;&#xA;" />
  <row Id="37119" PostHistoryTypeId="5" PostId="16154" RevisionGUID="08c6290b-edca-463d-b876-7a523baf5217" CreationDate="2011-08-18T18:24:57.830" UserId="6877" Comment="link fixed" Text="[Here](http://www.computerandvideogames.com/314566/carmack-extremely-frustrated-that-pc-is-10-times-as-powerful-as-ps3-360) John Carmack claims that PCs are still slower that current gen console hardware because of the overhead.&#xD;&#xA;&#xD;&#xA;&gt; &quot;A lot of it's driver overhead issues, where there's so much that we&#xD;&#xA;&gt; do in the game, all of this dynamic texture updating where on the&#xD;&#xA;&gt; console we say 'alright, we've got a new page of data', we put that&#xD;&#xA;&gt; page in and update the page table that points to that. &#xD;&#xA;&gt; &#xD;&#xA;&gt; &quot;On the console that may just be a matter of writing it to memory,&#xD;&#xA;&gt; it's like 'here's the texture, let's calculate exactly where this part&#xD;&#xA;&gt; of the page table is' and then we just poke it right in there,&quot; he&#xD;&#xA;&gt; explained.&#xD;&#xA;&#xD;&#xA;Is the situation really that dire? And are there any features or changes in Windows 8 planed that will improve the current state of the PC Gaming ?" />
  <row Id="37120" PostHistoryTypeId="24" PostId="16154" RevisionGUID="08c6290b-edca-463d-b876-7a523baf5217" CreationDate="2011-08-18T18:24:57.830" Comment="Proposed by 6877 approved by 20 edit id of 657" />
  <row Id="37121" PostHistoryTypeId="2" PostId="16156" RevisionGUID="07b76611-5925-43aa-b688-0326384a5174" CreationDate="2011-08-18T18:35:18.780" UserId="7911" Text="Console: static hardware that never varies across every single iteration.&#xD;&#xA;Home PC: hardware that changes from day to day, with a million different chip designs.&#xD;&#xA;&#xD;&#xA;Console: closed system that lives in its own, secure environment from birth to death.&#xD;&#xA;Home PC: wild west, barroom brawls and your OS is the sheriff keeping everyone from getting shot.&#xD;&#xA;&#xD;&#xA;Carmack: writing a system that depends on slinging around large texture blocks and is apparently sad that he doesn't get to personally write a hardware interface to every single graphics chip and OS variant from the last 5 years.  Not to mention that he also apparently wants to give customer support to millions of people, hundreds of thousands of whom will have some kind of compatibility issue that Id must solve for them.&#xD;&#xA;&#xD;&#xA;What's there to improve, given that on home PCs you have to support tens of different chipsets that have to work flawlessly against millions of programs written across the past decade or more?  Personally I think that it's a miracle that the house of cards keeps standing!&#xD;&#xA;&#xD;&#xA;Not much of an answer I know, but PC gaming is actually quite good and easy to develop for outside of certain esoteric optimization issues.  A better question might be why are consoles so extremely limited?" />
  <row Id="37122" PostHistoryTypeId="25" PostId="539" RevisionGUID="ac2841dd-a202-4f87-a080-a2a3063d5aa0" CreationDate="2011-08-18T18:37:29.147" Comment="http://twitter.com/#!/StackGameDev/status/104260644076924928" />
  <row Id="37123" PostHistoryTypeId="2" PostId="16157" RevisionGUID="e0f3f376-540a-4b30-97d3-cebe2bc43437" CreationDate="2011-08-18T19:12:42.663" UserId="8684" Text="Can anyway please explain to me what this means?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The division of time between the physics (or-game-model) update and graphics update stages and an explanation and analysis of the relative importance of these in a game that involves real times physics calculations&#xD;&#xA;&#xD;&#xA;Any information would be appreciated." />
  <row Id="37124" PostHistoryTypeId="1" PostId="16157" RevisionGUID="e0f3f376-540a-4b30-97d3-cebe2bc43437" CreationDate="2011-08-18T19:12:42.663" UserId="8684" Text="game-model update and graphics update" />
  <row Id="37125" PostHistoryTypeId="3" PostId="16157" RevisionGUID="e0f3f376-540a-4b30-97d3-cebe2bc43437" CreationDate="2011-08-18T19:12:42.663" UserId="8684" Text="&lt;gameloop&gt;" />
  <row Id="37126" PostHistoryTypeId="6" PostId="16157" RevisionGUID="5ebac00a-f916-4eed-bb62-1ca40b7de90f" CreationDate="2011-08-18T19:23:37.233" UserId="6558" Comment="edited tags" Text="&lt;gameloop&gt;&lt;homework&gt;" />
  <row Id="37127" PostHistoryTypeId="2" PostId="16158" RevisionGUID="aa4d11a3-a622-426d-8c41-864c6c0c2a97" CreationDate="2011-08-18T19:27:13.360" UserId="9350" Text="Hey guys I am the creator of &quot;The Game Developer's Radio&quot; want to say thanks for linking to my show! It's been on a bit of a Hiatus for a while, but I finally released a new episode :-D http://bit.ly/qq46WP And will be releasing plenty more, very soon! &#xD;&#xA;&#xD;&#xA;Also if you want a list of more game dev podcast links id recommend checking out this blog post http://blog.iainlobb.com/2010/07/gamedev-and-indie-games-podcasts.html has tons of links to game dev podcasts." />
  <row Id="37128" PostHistoryTypeId="16" PostId="16158" RevisionGUID="4914dbae-e532-415a-a9d3-58298307f9b7" CreationDate="2011-08-18T19:27:13.360" UserId="9350" />
  <row Id="37129" PostHistoryTypeId="2" PostId="16159" RevisionGUID="cc809133-2d8e-429e-b64c-ab1e00e67f71" CreationDate="2011-08-18T20:32:13.453" UserId="4443" Text="You want to use the concept of chunks or pack files or the like where the entire chunk is streamed. The chunk should contain the data that it needs when used in the game. World Geo, specific models for that area, textures, sound effects, scripts and the like. It should not contain background audio, that should be a streaming system on its own.&#xD;&#xA;&#xD;&#xA;You really dont want to read an individual packed file for each of these, but you definitely do not want to read each individual asset. The FileIO will kill any overhead. (Ideally the chunk files are all packed together into one large file you can just fseek() through to get to the right chunk you want to load)&#xD;&#xA;&#xD;&#xA;Hope this helps." />
  <row Id="37130" PostHistoryTypeId="2" PostId="16160" RevisionGUID="b0392105-cde4-44f9-bc45-df3ed24f71fc" CreationDate="2011-08-18T20:57:20.853" UserId="1573" Text="It's more than just streaming the assets &amp;mdash; the disk itself is a mechanical device and you need to minimize seeks and simultaneous parallel streams. So you need to chunk up your data so it can be streamed en masse, and then evicted all at once without any risk of leaks. &#xD;&#xA;&#xD;&#xA;I liked [DoubleFine's GDC talk about their chunking solution][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdcvault.com/play/1012445/Data-is-a-Four-Letter" />
  <row Id="37131" PostHistoryTypeId="2" PostId="16161" RevisionGUID="be92371d-ff78-4067-943e-4f97582dc82c" CreationDate="2011-08-18T21:00:27.650" UserId="9352" Text="Is there a language similar to Arduino language (c++ language with fewer functions) for software visualization or game development?" />
  <row Id="37132" PostHistoryTypeId="1" PostId="16161" RevisionGUID="be92371d-ff78-4067-943e-4f97582dc82c" CreationDate="2011-08-18T21:00:27.650" UserId="9352" Text="computer language like arduino language for visualization or game development" />
  <row Id="37133" PostHistoryTypeId="3" PostId="16161" RevisionGUID="be92371d-ff78-4067-943e-4f97582dc82c" CreationDate="2011-08-18T21:00:27.650" UserId="9352" Text="&lt;c++&gt;&lt;visualization&gt;" />
  <row Id="37134" PostHistoryTypeId="5" PostId="16161" RevisionGUID="84c83cba-1170-4ec5-93e5-2da5ac975c1a" CreationDate="2011-08-18T21:27:38.480" UserId="9352" Comment="deleted 20 characters in body" Text="Is there a language similar to Arduino language (c++ language with fewer functions) for software visualization?" />
  <row Id="37135" PostHistoryTypeId="2" PostId="16162" RevisionGUID="85eefb42-eb9a-499d-835c-22bcb2f12430" CreationDate="2011-08-18T21:29:05.407" UserId="3830" Text="You might check out [Lua][1].  It's a lightweight scripting language.  &#xD;&#xA;&#xD;&#xA;Here's an article about game development using it...&#xD;&#xA;&#xD;&#xA;http://gamedevgeek.com/tutorials/getting-started-with-lua/&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lua.org/" />
  <row Id="37136" PostHistoryTypeId="25" PostId="16145" RevisionGUID="72c76da8-dd4f-43e0-a233-cc0815023197" CreationDate="2011-08-18T21:37:29.993" Comment="http://twitter.com/#!/StackGameDev/status/104305947094155264" />
  <row Id="37137" PostHistoryTypeId="2" PostId="16163" RevisionGUID="5b8ccf22-fa51-4d04-8298-228bdc3a90a7" CreationDate="2011-08-18T22:34:22.950" UserId="222" Text="I'm creating a platformer and have implemented per-pixel collision detection. However, this has caused 2 obstacles that I've yet to figure out. The first obstacle, which this question is about, is that I don't know how to efficiently find the point of impact (my other problem will probably be a different question on this StackExchange).&#xD;&#xA;&#xD;&#xA;I have my character fall or jump at a given rate in pixels. That is, every frame the character might fall 4 pixels or jump 4 pixels, for instance. If the character falls and intersects an object then the character should land on that object (and vice versa, if they're jumping and hit an object they should start falling again). However, if, for instance, a character falls 4 pixels and this puts them 3 pixels into an object, they'll stop falling but won't be in the proper location. The character should appear to stop at the first pixel of impact.&#xD;&#xA;&#xD;&#xA;So, how can I efficiently find the point of impact? I only have a vague idea of only comparing the outline pixels, testing for collision, and incrementing them up or down by one until there's a collision, but it seems like it might be complicated to pull off.&#xD;&#xA;&#xD;&#xA;If you want to know the platform, I'm developing using XNA for Windows Phone 7." />
  <row Id="37138" PostHistoryTypeId="1" PostId="16163" RevisionGUID="5b8ccf22-fa51-4d04-8298-228bdc3a90a7" CreationDate="2011-08-18T22:34:22.950" UserId="222" Text="How to find point of impact with 2D per-pixel collision detection?" />
  <row Id="37139" PostHistoryTypeId="3" PostId="16163" RevisionGUID="5b8ccf22-fa51-4d04-8298-228bdc3a90a7" CreationDate="2011-08-18T22:34:22.950" UserId="222" Text="&lt;collision-detection&gt;&lt;efficiency&gt;" />
  <row Id="37140" PostHistoryTypeId="5" PostId="16141" RevisionGUID="9a9b3834-3d27-439c-a5ac-0a38fea7df07" CreationDate="2011-08-18T22:51:34.490" UserId="8578" Comment="Added a wee tid bit on implementation " Text="Oh I do love these games!&#xD;&#xA;&#xD;&#xA;So first things first, in order for a computer to play a game, it needs: &#xD;&#xA;&#xD;&#xA; 1. a structure to work with &#xD;&#xA; 2. rules to play by&#xD;&#xA; 3. a win condition to work towards&#xD;&#xA;&#xD;&#xA;Let's tackle this one piece at a time.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Structure&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Since the board is an 8x8 grid (but could easily scale), and each grid space may exist in only one of five states, let's define those states: &#xD;&#xA;&#xD;&#xA;    [EMPTY, WHITE_PIECE, BLACK_PIECE, WHITE_PIECE_PROMOTED, BLACK_PIECE_PROMOTED]&#xD;&#xA;&#xD;&#xA;Respectively ENUM'd to:&#xD;&#xA;&#xD;&#xA;    [0, 1, 2, 3, 4]&#xD;&#xA;&#xD;&#xA;Now that we know what each space can be we need some way to represent all the spaces, or the board if you will.  Almost every strong language will support a multi-dimensional array (an array where each element is an array holding data).&#xD;&#xA;So take the following slack-code for defining our array:&#xD;&#xA;&#xD;&#xA;    BOARD_ARRAY = array(8, 8)&#xD;&#xA;&#xD;&#xA;This will give us an 8 x 8 array in which we can store integers (our enums from before):&#xD;&#xA;&#xD;&#xA;    (&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;Now you can already see how that this is beginning to look like a board!&#xD;&#xA;I've never played the variant mentioned in the youtube video but it appears to start with 2 rows of white pieces one row from the bottom, and 2 rows of black pieces one row from the top.  Which would mean when we start a game our array should look like this:&#xD;&#xA;&#xD;&#xA;    (&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [2, 2, 2, 2, 2, 2, 2, 2],&#xD;&#xA;    [2, 2, 2, 2, 2, 2, 2, 2],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    [1, 1, 1, 1, 1, 1, 1, 1],&#xD;&#xA;    [1, 1, 1, 1, 1, 1, 1, 1],&#xD;&#xA;    [0, 0, 0, 0, 0, 0, 0, 0],&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;(Remember 2 represents 'BLACK_PIECE' and 1 represents 'WHITE_PIECE')&#xD;&#xA;&#xD;&#xA;So now the computer has a structure to work with. Step 1 complete!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Rules&#xD;&#xA;---&#xD;&#xA;Let's imagine you had an actual board set up in front of you, playing against a master player.  If you tried to move one of his pieces, you'd get your hand slapped.  If you tried to move a piece in a way you couldn't, you'd get your hand slapped.  If you tried to cheat well... you get the idea.  But the problem is, computers don't.  So it's our job to provide **strict** rules to play within.&#xD;&#xA;&#xD;&#xA;We need to create a way to check if any given move is 'legal'.  Which means we first need some way to represent a 'move'.  One way would be to use array positions; For example to move a piece from [0, 0] to [0, 1], we could create a function that will update the board given that move.  So back to slack:&#xD;&#xA;&#xD;&#xA;    MY_MOVE = array( [0, 0], [0, 1] )&#xD;&#xA;&#xD;&#xA;The above represents one piece, moving one space down from the top corner of the board (assuming 0, 0 is the top left corner).  You may also notice I chose to use a multidimensional array for the move.  This is because pieces may theoretically move a great number of times in one turn (for 'jumping' other pieces).  So let's pretend at 0, 1 there was an opponents piece, meaning we would land at 0, 2:&#xD;&#xA;&#xD;&#xA;    MY_MOVE = array( [0, 0], [0, 2] )&#xD;&#xA;    &#xD;&#xA;Pretty simple eh.  The program should understand that if we skip a space we are jumping another piece (or else it's an illegal move, and should throw an error).  Now let's jump two pieces:&#xD;&#xA;&#xD;&#xA;    MY_MOVE = array ( [0, 0], [0, 2], [0, 4] )&#xD;&#xA;    &#xD;&#xA;This gives us a way to describe any move on the board. Yay!  Now since I don't fully understand the rules of the exact game in question (although I've played a bit of Canadian checkers in my day) the exact move legality will need to be defined by you.  A good flow up to this point would look like:&#xD;&#xA;&#xD;&#xA;    FUNCTION_FIND_ALL_LEGAL_MOVES( MY_BOARD ) Returns: array ALL_LEGAL_MOVES&#xD;&#xA;    FUNCTION_FIND_BEST_MOVE( MY_BOARD, ALL_LEGAL_MOVES ) Returns: array MY_MOVE&#xD;&#xA;    FUNCTION_DO_MOVE( MY_BOARD, MY_MOVE ) Throws: error ILLEGAL_MOVE Updates: MY_BOARD&#xD;&#xA;    repeat from start for each turn&#xD;&#xA;&#xD;&#xA;The above assumes you can cycle through each piece to find all it's legal moves, then given a collection of all the legal moves somehow choose the best one (strategy here).  The move is then applied to the board, or throws an error.  Then the next player takes their turn.&#xD;&#xA;So we have an AI that knows how to play!  Joy!  Moving on.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Winning&#xD;&#xA;---&#xD;&#xA;Simple games are wonderful, because winning is defined by a very simple state.  Ain't no white pieces on the board?  Well I guess you've won!  This is implemented in step 2 when we choose the best move to take us closer to the winning condition.&#xD;&#xA;&#xD;&#xA;To make some very intelligent AI you could keep a database that stored every possible board as a state, with every possible move from every possible state, to find chains towards winning.&#xD;&#xA;&#xD;&#xA;You could also create strategies, like: if there is a piece that WILL be jumped, save that piece or if a piece is able to jump more than one other piece do that jump.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That should give you a good jumping off point, it is only one method of literally unlimited possibilities.  You could theoretically build a giant robot to draw with crayons then conduct spectral analysis on the drawing to choose moves... but it wouldn't work very good, or fast.  This way has worked in the past, and worked well (:  Hope that helps!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;A Few Words On Implementation&#xD;&#xA;---&#xD;&#xA;Checkers is what is referred to as a 'solved' game, in that we can calculate every move with no unknowns.  But that's a whole whack of moves!  So there is no way to do it all manually... if only there was some... oh right we're programmers. *fist pump*&#xD;&#xA;&#xD;&#xA;SQL is a wonderful tool for storing all these seemingly endless moves.  For those with no experience with SQL, mySQL is a free (fairly easy to use) and open source SQL server.  SQL is used for managing databases, sorta like a spreadsheet on steroids.  It is also able to hold seriously large amounts of data and work with it very quickly.&#xD;&#xA;&#xD;&#xA;So how can we use this?  Since we know that if the board is in an exact state (each piece in a certain position) we can calculate all the available moves, and save them. For example:&#xD;&#xA;&#xD;&#xA;    +Board State+          +All Possible Moves+               +Best Move+&#xD;&#xA;    ([0,0,1,2,3],[3..)     ([0,1],[0,2]), ([7,6],[7,7],[5..)  ([7,6],[7,7])&#xD;&#xA;    ([0,0,2,2,3],[3..)     ([0,1],[0,2]), ([7,6],[7,7],[5..)  ([5,5],[5,4])&#xD;&#xA;    ([0,0,1,3,3],[3..)     ([0,1],[0,2]), ([7,6],[7,7],[5..)  ([4,4],[4,3])&#xD;&#xA;    etc...&#xD;&#xA;&#xD;&#xA;So when the computer needs to make a move it simply looks up the board state (stored as the primary key) in the database, and can either choose the best move (should be unbeatable) or one of the other moves to make a more friendly AI.&#xD;&#xA;&#xD;&#xA;Great now let's build this database.  First we need to calculate every board state.  Which can be done with a great big nasty loop, if someone wants to spend some time and work it out that would be awesome.  Look at the array as one big number, then count upwards, except in base 5 (0, 1, 2, 3, 4), and condition that each player may only have 16 pieces.&#xD;&#xA;&#xD;&#xA;At this point we should have every board state stored and can go through calculating all possible moves.&#xD;&#xA;&#xD;&#xA;Once all possible moves are calculated comes the fun part of pathfinding the best possible moves.  This is where my knowledge begins to fall short, and things like Minimax or A* start to come into play.  Sorry I can't be of more help on that :/" />
  <row Id="37141" PostHistoryTypeId="2" PostId="16164" RevisionGUID="8df4410b-f9b1-4066-b532-917956d79d02" CreationDate="2011-08-18T23:51:45.087" UserId="9312" Text="Demo programming opensource, also links to some other demo/game engines : http://elsewhere.stc.cx/demoprogramming/" />
  <row Id="37142" PostHistoryTypeId="25" PostId="16163" RevisionGUID="954584e6-0f36-4fdc-8993-ff5befca77ff" CreationDate="2011-08-19T00:37:30.567" Comment="http://twitter.com/#!/StackGameDev/status/104351246319751168" />
  <row Id="37143" PostHistoryTypeId="2" PostId="16165" RevisionGUID="633fc9ab-b7ac-4343-8466-c4463607c2e6" CreationDate="2011-08-19T00:51:37.740" UserId="160" Text="[Processing](http://processing.org/) is probably exactly what you want." />
  <row Id="37144" PostHistoryTypeId="2" PostId="16166" RevisionGUID="048a763b-3ecd-4857-afaf-e438cfc5f379" CreationDate="2011-08-19T00:59:51.750" UserId="160" Text="The simplest solution is a [grid](http://en.wikipedia.org/wiki/Grid_%28spatial_index%29). Lay a 2D grid over your level. Each cell in the grid maintains a collection of which entities are currently occupying it. As the entities move, take them out of the cell they're leaving and add them to the one they enter.&#xD;&#xA;&#xD;&#xA;You can then find nearby entities just by examining the nearby cells. A quadtree refines this by recursively subdividing the grid, but sometimes a flat one is adequate, especially if your level size is fixed and relatively small." />
  <row Id="37145" PostHistoryTypeId="2" PostId="16167" RevisionGUID="2b6124c6-16c0-46f3-a7a2-a9e06a19b3b7" CreationDate="2011-08-19T01:02:19.273" UserId="7602" Text="You should also look into [Scratch][1]. It is educational programming language &#xD;&#xA;to create games. The good thing is you'll find many open source [projects][2] in Scratch to study.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Scratch_%28programming_language%29&#xD;&#xA;  [2]: http://scratch.mit.edu/channel/featured" />
  <row Id="37146" PostHistoryTypeId="2" PostId="16168" RevisionGUID="46cf7fd3-7129-4a3b-a982-ef29917d31c4" CreationDate="2011-08-19T01:03:14.740" UserId="160" Text="What you're talking about is reasonable and fairly common, I think. [This](http://gameprogrammingpatterns.com/component.html) might give you some more information." />
  <row Id="37147" PostHistoryTypeId="2" PostId="16169" RevisionGUID="91878acd-74db-458c-9b2e-6146854b82c7" CreationDate="2011-08-19T02:13:42.093" UserId="8240" Text="What John Carmack really wants is to write his own graphics drivers. He lived and worked in the pre-Direct3D/OpenGL days, when the game was responsible for talking to every little piece of hardware that existed.&#xD;&#xA;&#xD;&#xA;AMD actually made a [similar statement][1], about how APIs are getting in the way of high-end graphics.&#xD;&#xA;&#xD;&#xA;I don't know if Carmack's numbers are right, but his general statement is true: performance is being sacrificed on the PC. But what is gained is vendor neutrality to a very great degree. The ability to write the same code that works on different hardware.&#xD;&#xA;&#xD;&#xA;There is the potential for some middle ground. Something that is thinner than D3D/OpenGL, but still allows for a reasonable degree of abstraction. The problem is that what a &quot;reasonable degree of abstraction&quot; means changes from hardware generation to hardware generation. A reasonable abstraction for one set of hardware is no longer reasonable for another. And while AMD and NVIDIA have been keeping relatively close to one another in basic graphics functionality, there are still lots of low level differences. And that doesn't even count Intel, who is way behind the both of them in even basic graphics functionality.&#xD;&#xA;&#xD;&#xA;I imagine that Intel would jump at the chance to have such an API though, because they are absolutely *terrible* at implementing drivers. This way, they could just write a thin client.&#xD;&#xA;&#xD;&#xA;As to whether Windows 8 will address this, that seems unlikely. Not unless it comes with a Direct3D 12 or some other API that allows lower-level access.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.bit-tech.net/hardware/graphics/2011/03/16/farewell-to-directx/1" />
  <row Id="37148" PostHistoryTypeId="25" PostId="16161" RevisionGUID="f7bd2dec-4dbc-42d8-8b7b-37dee360c530" CreationDate="2011-08-19T03:37:30.523" Comment="http://twitter.com/#!/StackGameDev/status/104396545511784448" />
  <row Id="37149" PostHistoryTypeId="25" PostId="16142" RevisionGUID="7699c853-55b5-4721-a988-26af446ac3d2" CreationDate="2011-08-19T06:37:30.277" Comment="http://twitter.com/#!/StackGameDev/status/104441843751727104" />
  <row Id="37150" PostHistoryTypeId="2" PostId="16170" RevisionGUID="591b9561-9d0d-46ad-ae8a-48cbd1495b5f" CreationDate="2011-08-19T07:17:43.303" UserId="2029" Text="I tried using the methods on lazyfoo's site for frame rate independence. One problem I'm having though is that my game is running at different speeds on different computers. The differences are drastic. For example, on a Core 2 Duo 2.4 ghz 2gb ram PC, the ball will move extremely fast, but the paddle moves slowly. On an Intel Centrino laptop running Win7 w/plenty of ram, the ball moves slowly, but the paddle moves fast. On older computers like a Pentium 4 2.4 ghz, 768 ram computer, the ball moves realllllllllyyyyyyy sllllooowwww. Yes, that slow. &#xD;&#xA;&#xD;&#xA;What might be some reasons this is happening, and how can I fix it? I can only assume that the code I wrote that deals with frame rate independence is wrong. Here are the relevant parts of the code. (btw, it's a breakout clone).&#xD;&#xA;&#xD;&#xA;Code to move the ball&#xD;&#xA;[code]&#xD;&#xA;    &#xD;&#xA;    bool Ball::MoveBall( Uint32 deltaTicks ) { // X-COORDINATE&#xD;&#xA;    xOffset += cos( radians ) * ( ballVelocity / 1000.f ) * flipx;&#xD;&#xA;    ballPosition.x = (Sint16)xOffset;&#xD;&#xA;&#xD;&#xA;        .......&#xD;&#xA;&#xD;&#xA;         // Y-COORDINATE&#xD;&#xA;    yOffset += sin( radians ) * ( ballVelocity / 1000.f ) * flipy;&#xD;&#xA;    ballPosition.y = (Sint16)yOffset;&#xD;&#xA;&#xD;&#xA;        .....&#xD;&#xA;}[/code]&#xD;&#xA;&#xD;&#xA;Code to move the paddle&#xD;&#xA;[code]void Paddle::Move( Uint32 deltaTicks ) {&#xD;&#xA;    xOffset += xVel * ( deltaTicks / 1000.f );&#xD;&#xA;    paddlePosition.x = (Sint16)xOffset;&#xD;&#xA;}[/code]&#xD;&#xA;&#xD;&#xA;Main loop&#xD;&#xA;[code]....&#xD;&#xA;....&#xD;&#xA;&#xD;&#xA;while ( SDL_PollEvent( &amp;gEvent ) ) {&#xD;&#xA;            handle.PaddleInput( &amp;gEvent, stick );&#xD;&#xA;&#xD;&#xA;            if ( gEvent.type == SDL_QUIT || gEvent.key.keysym.sym == SDLK_ESCAPE )&#xD;&#xA;                quit = true;&#xD;&#xA;        }&#xD;&#xA;        stick.Move( time.GetTicks() );&#xD;&#xA;&#xD;&#xA;        if ( ball.MoveBall( time.GetTicks() ) )&#xD;&#xA;            wallSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.CheckPaddleCollision( stick ) )&#xD;&#xA;            paddleSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.CheckBrickCollision( brickmap ) )&#xD;&#xA;            brickSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.IsBallDead() ) {&#xD;&#xA;            ball.ResetBallPosition();&#xD;&#xA;            stick.ResetPaddlePosition();&#xD;&#xA;            stick.SetPaddleState( Paddle::RESET );&#xD;&#xA;            launched = false;&#xD;&#xA;            draw.GameObjects( lvl, brickmap, stick, ball );&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        draw.GameObjects( lvl, brickmap, stick, ball );&#xD;&#xA;        time.Start();&#xD;&#xA;        draw.Refresh();&#xD;&#xA;.....&#xD;&#xA;....[/code]" />
  <row Id="37151" PostHistoryTypeId="1" PostId="16170" RevisionGUID="591b9561-9d0d-46ad-ae8a-48cbd1495b5f" CreationDate="2011-08-19T07:17:43.303" UserId="2029" Text="Frame Rate Independence and Speed" />
  <row Id="37152" PostHistoryTypeId="3" PostId="16170" RevisionGUID="591b9561-9d0d-46ad-ae8a-48cbd1495b5f" CreationDate="2011-08-19T07:17:43.303" UserId="2029" Text="&lt;frame-rate&gt;" />
  <row Id="37153" PostHistoryTypeId="5" PostId="16170" RevisionGUID="aa57b889-8e2b-4018-a8c4-75e8dd389a44" CreationDate="2011-08-19T07:23:18.613" UserId="2029" Comment="deleted 11 characters in body" Text="I tried using the methods on lazyfoo's site for frame rate independence. One problem I'm having though is that my game is running at different speeds on different computers. The differences are drastic. For example, on a Core 2 Duo 2.4 ghz 2gb ram PC, the ball will move extremely fast, but the paddle moves slowly. On an Intel Centrino laptop running Win7 w/plenty of ram, the ball moves slowly, but the paddle moves fast. On older computers like a Pentium 4 2.4 ghz, 768 ram computer, the ball moves realllllllllyyyyyyy sllllooowwww. Yes, that slow. &#xD;&#xA;&#xD;&#xA;What might be some reasons this is happening, and how can I fix it? I can only assume that the code I wrote that deals with frame rate independence is wrong. Here are the relevant parts of the code. (btw, it's a breakout clone).&#xD;&#xA;&#xD;&#xA;Code to move the ball&#xD;&#xA;[code]&#xD;&#xA;    &#xD;&#xA;    bool Ball::MoveBall( Uint32 deltaTicks ) { // X-COORDINATE&#xD;&#xA;    xOffset += cos( radians ) * ( ballVelocity / 1000.f ) * flipx;&#xD;&#xA;    ballPosition.x = (Sint16)xOffset;&#xD;&#xA;&#xD;&#xA;        .......&#xD;&#xA;&#xD;&#xA;         // Y-COORDINATE&#xD;&#xA;    yOffset += sin( radians ) * ( ballVelocity / 1000.f ) * flipy;&#xD;&#xA;    ballPosition.y = (Sint16)yOffset;&#xD;&#xA;&#xD;&#xA;        .....&#xD;&#xA;}[/code]&#xD;&#xA;&#xD;&#xA;Code to move the paddle&#xD;&#xA;`void Paddle::Move( Uint32 deltaTicks ) {&#xD;&#xA;    xOffset += xVel * ( deltaTicks / 1000.f );&#xD;&#xA;    paddlePosition.x = (Sint16)xOffset;&#xD;&#xA;}`&#xD;&#xA;&#xD;&#xA;Main loop&#xD;&#xA;[code]....&#xD;&#xA;....&#xD;&#xA;&#xD;&#xA;while ( SDL_PollEvent( &amp;gEvent ) ) {&#xD;&#xA;            handle.PaddleInput( &amp;gEvent, stick );&#xD;&#xA;&#xD;&#xA;            if ( gEvent.type == SDL_QUIT || gEvent.key.keysym.sym == SDLK_ESCAPE )&#xD;&#xA;                quit = true;&#xD;&#xA;        }&#xD;&#xA;        stick.Move( time.GetTicks() );&#xD;&#xA;&#xD;&#xA;        if ( ball.MoveBall( time.GetTicks() ) )&#xD;&#xA;            wallSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.CheckPaddleCollision( stick ) )&#xD;&#xA;            paddleSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.CheckBrickCollision( brickmap ) )&#xD;&#xA;            brickSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.IsBallDead() ) {&#xD;&#xA;            ball.ResetBallPosition();&#xD;&#xA;            stick.ResetPaddlePosition();&#xD;&#xA;            stick.SetPaddleState( Paddle::RESET );&#xD;&#xA;            launched = false;&#xD;&#xA;            draw.GameObjects( lvl, brickmap, stick, ball );&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        draw.GameObjects( lvl, brickmap, stick, ball );&#xD;&#xA;        time.Start();&#xD;&#xA;        draw.Refresh();&#xD;&#xA;.....&#xD;&#xA;....[/code]" />
  <row Id="37154" PostHistoryTypeId="5" PostId="16170" RevisionGUID="7819c28b-a7ed-482d-ba6e-ee1c2d40132d" CreationDate="2011-08-19T07:25:06.880" UserId="51" Comment="fixed formatting for code blocks" Text="I tried using the methods on lazyfoo's site for frame rate independence. One problem I'm having though is that my game is running at different speeds on different computers. The differences are drastic. For example, on a Core 2 Duo 2.4 ghz 2gb ram PC, the ball will move extremely fast, but the paddle moves slowly. On an Intel Centrino laptop running Win7 w/plenty of ram, the ball moves slowly, but the paddle moves fast. On older computers like a Pentium 4 2.4 ghz, 768 ram computer, the ball moves realllllllllyyyyyyy sllllooowwww. Yes, that slow. &#xD;&#xA;&#xD;&#xA;What might be some reasons this is happening, and how can I fix it? I can only assume that the code I wrote that deals with frame rate independence is wrong. Here are the relevant parts of the code. (btw, it's a breakout clone).&#xD;&#xA;&#xD;&#xA;Code to move the ball&#xD;&#xA;    &#xD;&#xA;    bool Ball::MoveBall( Uint32 deltaTicks ) &#xD;&#xA;    { &#xD;&#xA;        // X-COORDINATE&#xD;&#xA;        xOffset += cos( radians ) * ( ballVelocity / 1000.f ) * flipx;&#xD;&#xA;        ballPosition.x = (Sint16)xOffset;&#xD;&#xA;        &#xD;&#xA;            .......&#xD;&#xA;        &#xD;&#xA;        // Y-COORDINATE&#xD;&#xA;        yOffset += sin( radians ) * ( ballVelocity / 1000.f ) * flipy;&#xD;&#xA;        ballPosition.y = (Sint16)yOffset;&#xD;&#xA;        &#xD;&#xA;        .....&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Code to move the paddle&#xD;&#xA;&#xD;&#xA;    void Paddle::Move( Uint32 deltaTicks ) &#xD;&#xA;    {&#xD;&#xA;        xOffset += xVel * ( deltaTicks / 1000.f );&#xD;&#xA;        paddlePosition.x = (Sint16)xOffset;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Main loop&#xD;&#xA;&#xD;&#xA;        while ( SDL_PollEvent( &amp;gEvent ) ) &#xD;&#xA;        {&#xD;&#xA;            handle.PaddleInput( &amp;gEvent, stick );&#xD;&#xA;&#xD;&#xA;            if ( gEvent.type == SDL_QUIT || gEvent.key.keysym.sym == SDLK_ESCAPE )&#xD;&#xA;                quit = true;&#xD;&#xA;        }&#xD;&#xA;        stick.Move( time.GetTicks() );&#xD;&#xA;&#xD;&#xA;        if ( ball.MoveBall( time.GetTicks() ) )&#xD;&#xA;            wallSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.CheckPaddleCollision( stick ) )&#xD;&#xA;            paddleSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.CheckBrickCollision( brickmap ) )&#xD;&#xA;            brickSound.Play();&#xD;&#xA;&#xD;&#xA;        if ( ball.IsBallDead() ) {&#xD;&#xA;            ball.ResetBallPosition();&#xD;&#xA;            stick.ResetPaddlePosition();&#xD;&#xA;            stick.SetPaddleState( Paddle::RESET );&#xD;&#xA;            launched = false;&#xD;&#xA;            draw.GameObjects( lvl, brickmap, stick, ball );&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        draw.GameObjects( lvl, brickmap, stick, ball );&#xD;&#xA;        time.Start();&#xD;&#xA;        draw.Refresh();&#xD;&#xA;" />
  <row Id="37155" PostHistoryTypeId="2" PostId="16171" RevisionGUID="e34b043b-5bf5-44f8-98ca-cbf934ea18b7" CreationDate="2011-08-19T07:56:34.130" UserId="20" Text="The movement of your ball varies from platform to platform because you're not using the delta-time at all for your movement calculation.&#xD;&#xA;&#xD;&#xA;First of all you should convert your ticks to seconds in your update loop and then call the `Move` functions with the delta-time in seconds.. otherwise you'll have to convert to seconds in every `Move` function.&#xD;&#xA;&#xD;&#xA;All your speed definitions should be in units per second. Eg. `ballVelocity` would be `100` if your ball should move at a rate of 100 units (pixels) per second.&#xD;&#xA;&#xD;&#xA;Then a simple `Move` method could look like this:&#xD;&#xA;&#xD;&#xA;    bool Ball::MoveBall(float dt) &#xD;&#xA;    { &#xD;&#xA;        ballPosition.x += cos(radians) * ballVelocity * dt;&#xD;&#xA;        ballPosition.y += sin(radians) * ballVelocity * dt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;A further optimization would be to not always calculate cos/sin, but rather have a `direction` vector that you only recalculate whenever the direction changes... Then it would turn into: `ballPosition.x += direction.x * ballVelocity * dt;`" />
  <row Id="37156" PostHistoryTypeId="25" PostId="16116" RevisionGUID="d6ed1c84-80fb-44a4-847a-e65a57c8fc95" CreationDate="2011-08-19T09:37:31.660" Comment="http://twitter.com/#!/StackGameDev/status/104487146433429505" />
  <row Id="37157" PostHistoryTypeId="2" PostId="16172" RevisionGUID="20c20df4-6413-41d4-8e88-11ed4b3ad835" CreationDate="2011-08-19T11:38:07.117" UserId="9358" Text="Look at this sprite sheet.&#xD;&#xA;&#xD;&#xA;[Megaman](http://i.imgur.com/Q1OQM.png) (I don't have 10 reputation so I can't include the image in this post, sorry about that).&#xD;&#xA;&#xD;&#xA;It is clear that frame 1-3  the &quot;jump up&quot; which the last frame will be fixed until the &quot;peak&quot; of the jump (when gravity starts pulling back). When moving back down frame (4-7) are used and it all ends with an &quot;idle&quot; frame (which is not shown here in this jump sprite).&#xD;&#xA;&#xD;&#xA;My question is about frame 6 and 7 in this sprite. When the entity &quot;lands&quot; after a jump it is suppose to run animation 6-7 as the &quot;landing&quot; animation. When moving down in a jump frame 4-5 are easy because they are the &quot;start&quot; of the animation. Frame 5 can be kept for as long as you fall... but what is the appropriate way to go from frame 5 to 6-7-x? Do you check if the frame after the next is a fall and then &quot;initiate&quot; landing or do you do that when you have actually landed?&#xD;&#xA;&#xD;&#xA;It can't be timed because of various scenarios such as jumping off a cliff or jumping under a low roof hitting your head and bouncing you back down.&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="37158" PostHistoryTypeId="1" PostId="16172" RevisionGUID="20c20df4-6413-41d4-8e88-11ed4b3ad835" CreationDate="2011-08-19T11:38:07.117" UserId="9358" Text="How to properly handle the landing part in a jump animation" />
  <row Id="37159" PostHistoryTypeId="3" PostId="16172" RevisionGUID="20c20df4-6413-41d4-8e88-11ed4b3ad835" CreationDate="2011-08-19T11:38:07.117" UserId="9358" Text="&lt;animation&gt;&lt;sprites&gt;" />
  <row Id="37160" PostHistoryTypeId="5" PostId="16172" RevisionGUID="a97ee930-c258-4261-bfba-748528a5c090" CreationDate="2011-08-19T11:44:56.190" UserId="9358" Comment="added 22 characters in body" Text="Look at this sprite sheet.&#xD;&#xA;&#xD;&#xA;[Megaman](http://i.imgur.com/Q1OQM.png) (I don't have 10 reputation so I can't include the image in this post, sorry about that).&#xD;&#xA;&#xD;&#xA;It is clear that frame 1-3 are the &quot;jump up&quot; frames after which the last frame will be fixed until the &quot;peak&quot; of the jump (when gravity starts pulling back). When moving back down frame 4-7 are used and it all ends with an &quot;idle&quot; frame (which is not shown here in this jump sprite).&#xD;&#xA;&#xD;&#xA;My question is about frame 6 and 7 in this sprite. When the entity &quot;lands&quot; after a jump it is suppose to run animation 6-7 as the &quot;landing&quot; animation. When moving down in a jump frame 4-5 are easy because they are the &quot;start&quot; of the animation. Frame 5 can be kept for as long as you fall... but what is the appropriate way to go from frame 5 to 6-7-x? Do you check if the frame after the next is a fall and then &quot;initiate&quot; landing or do you do that when you have actually hit the ground?&#xD;&#xA;&#xD;&#xA;It can't be timed because of various scenarios such as jumping off a cliff or jumping under a low roof hitting your head and bouncing you back down.&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="37161" PostHistoryTypeId="5" PostId="16172" RevisionGUID="0a343bee-6b62-4fe7-b7c9-e5de2ada89e2" CreationDate="2011-08-19T12:08:41.207" UserId="9358" Comment="deleted 89 characters in body" Text="Look at this sprite sheet.&#xD;&#xA;&#xD;&#xA;![Megaman](http://i.imgur.com/Q1OQM.png)&#xD;&#xA;&#xD;&#xA;It is clear that frame 1-3 are the &quot;jump up&quot; frames after which the last frame will be fixed until the &quot;peak&quot; of the jump (when gravity starts pulling back). When moving back down frame 4-7 are used and it all ends with an &quot;idle&quot; frame (which is not shown here in this jump sprite).&#xD;&#xA;&#xD;&#xA;My question is about frame 6 and 7 in this sprite. When the entity &quot;lands&quot; after a jump it is suppose to run animation 6-7 as the &quot;landing&quot; animation. When moving down in a jump frame 4-5 are easy because they are the &quot;start&quot; of the animation. Frame 5 can be kept for as long as you fall... but what is the appropriate way to go from frame 5 to 6-7-x? Do you check if the frame after the next is a fall and then &quot;initiate&quot; landing or do you do that when you have actually hit the ground?&#xD;&#xA;&#xD;&#xA;It can't be timed because of various scenarios such as jumping off a cliff or jumping under a low roof hitting your head and bouncing you back down.&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="37162" PostHistoryTypeId="2" PostId="16173" RevisionGUID="998af603-fe15-4bac-987b-fc90a3316b01" CreationDate="2011-08-19T12:19:43.563" UserId="8578" Text="I've seen this done two ways:&#xD;&#xA;&#xD;&#xA; 1. When the bounding box first collides with the ground make a fast transition 5-&gt;6-&gt;7.&#xD;&#xA; 2. Have a second 'ghost' bounding box, that extends a small portion below the actual bounding box to initiate the 5-&gt;6, then upon the actual bounding box colliding do 6-&gt;7." />
  <row Id="37163" PostHistoryTypeId="2" PostId="16174" RevisionGUID="6e542696-2fce-4a1b-879c-66f2488f0057" CreationDate="2011-08-19T12:21:36.303" UserId="6079" Text="[EaselJS][1] does sprite animation with HTML Canvas if that is something you could use. It's not really minimalistic, but does a really good job of handling sprite sheets. &#xD;&#xA;&#xD;&#xA;The source is split across multiple files, so with a bit of work you could probably pull apart just the bits to do sprite animation ([BitmapSequence][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://easeljs.com/&#xD;&#xA;  [2]: http://easeljs.com/docs/BitmapSequence.html" />
  <row Id="37164" PostHistoryTypeId="2" PostId="16175" RevisionGUID="39fb9c21-4130-4cdd-b507-2c5be0ec2a97" CreationDate="2011-08-19T12:28:13.720" UserId="2897" Text="I guess the usual approach is to have three jump-related states: *Jumping* (a hero rises to the highest point of jump), *Falling* (from the highest point of jump to the ground), *Landing* (jump ends with hero standing on the ground).&#xD;&#xA;&#xD;&#xA;There are several ways of detecting these states, usually it's a several collision checks setting state flags. For example, in a character's physics step we may check for collisions below, and if there aren't any, then character is in the air. Now if a character has positive vertical speed, it's a *Jumping* state, otherwise it's a *Falling* state. If it's a *Falling* state, and we detected a collision below, than it's a *Landing* state, so lets switch to the landing animation. &#xD;&#xA;&#xD;&#xA;This animation usually plays when hero has actually hit the ground. The animation sequence is short, so landing will look high-speed, also it  creates a feeling of crisp and precise controls. Sometimes character can do a long landing sequence, but then it's possible for a character to cancel landing animation and start running, e.g. Castlevania: SotN." />
  <row Id="37165" PostHistoryTypeId="2" PostId="16176" RevisionGUID="b989dbff-a91e-4bfa-beb1-2387a4b8fcc4" CreationDate="2011-08-19T12:34:50.027" UserId="6469" Text="I have an attack class that has the basics like damage and cost and works in the game. Originally I slapped it together to the the ai targeting algorithm so you choose your attack and you see the enemy take damage. &#xD;&#xA;&#xD;&#xA;The problem is now I want to animate the attacks I find they don't conform to a single pattern like the other graphics. &#xD;&#xA;If you thing of a final fantasy game there is attacks the shoot fire balls so a single image would move across the screen. attacks that are like laser beams so an image would grow as it moves across the screen. attacks the would have things come from the top of the screen is a variety of manners.&#xD;&#xA;&#xD;&#xA;I thought of making the class i have now a abstract class with an animation method and deriving several types of attack class from it but im worried about all the extra complexity that would add. &#xD;&#xA;I could override the animation method but that would make the attack class huge and waste memory. &#xD;&#xA;&#xD;&#xA;Does anyone have any advice on what I can do ?" />
  <row Id="37166" PostHistoryTypeId="1" PostId="16176" RevisionGUID="b989dbff-a91e-4bfa-beb1-2387a4b8fcc4" CreationDate="2011-08-19T12:34:50.027" UserId="6469" Text="How to code the animations of attacks in RPG game" />
  <row Id="37167" PostHistoryTypeId="3" PostId="16176" RevisionGUID="b989dbff-a91e-4bfa-beb1-2387a4b8fcc4" CreationDate="2011-08-19T12:34:50.027" UserId="6469" Text="&lt;c++&gt;&lt;design-patterns&gt;" />
  <row Id="37168" PostHistoryTypeId="25" PostId="16172" RevisionGUID="0ad8dc57-9182-427f-867f-97d81d77635a" CreationDate="2011-08-19T12:37:32.783" Comment="http://twitter.com/#!/StackGameDev/status/104532449127698432" />
  <row Id="37169" PostHistoryTypeId="2" PostId="16177" RevisionGUID="34a7b5fc-6287-4022-a061-332d90f93922" CreationDate="2011-08-19T13:33:22.070" UserId="3166" Text="I asked this question on [stackoverflow][1] but assumed this might be a better area to ask it as well for a more informed answer.&#xD;&#xA;&#xD;&#xA;My problem is that I am trying to create a camera class and have it so that my camera follows the proper RHS, however the Y axis seems to be inverted since on the screen the 0 starts at the top.&#xD;&#xA;&#xD;&#xA;Here is my Camera2D Class:&#xD;&#xA;&lt;!-- language: lang-csharp --&gt;&#xD;&#xA;    class Camera2D&#xD;&#xA;        {&#xD;&#xA;            private Vector2 _position;&#xD;&#xA;            private float _zoom;&#xD;&#xA;            private float _rotation;&#xD;&#xA;            private float _cameraSpeed;&#xD;&#xA;            private Viewport _viewport;&#xD;&#xA;            private Matrix _viewMatrix;&#xD;&#xA;            private Matrix _viewMatrixIverse;&#xD;&#xA;    &#xD;&#xA;            public static float MinZoom = float.Epsilon;&#xD;&#xA;            public static float MaxZoom = float.MaxValue;&#xD;&#xA;    &#xD;&#xA;            public Camera2D(Viewport viewport)&#xD;&#xA;            {&#xD;&#xA;                _viewMatrix = Matrix.Identity;&#xD;&#xA;                _viewport = viewport;&#xD;&#xA;                _cameraSpeed = 4.0f;&#xD;&#xA;                _zoom = 1.0f;&#xD;&#xA;                _rotation = 0.0f;&#xD;&#xA;                _position = Vector2.Zero;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Move(Vector2 amount)&#xD;&#xA;            {&#xD;&#xA;                _position += amount;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Zoom(float amount)&#xD;&#xA;            {&#xD;&#xA;                _zoom += amount;&#xD;&#xA;                _zoom = MathHelper.Clamp(_zoom, MaxZoom, MinZoom);&#xD;&#xA;                UpdateViewTransform();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public Vector2 Position&#xD;&#xA;            {&#xD;&#xA;                get { return _position; }&#xD;&#xA;                set { _position = value; UpdateViewTransform(); }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public Matrix ViewMatrix&#xD;&#xA;            {&#xD;&#xA;                get { return _viewMatrix; }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            private void UpdateViewTransform()&#xD;&#xA;            {&#xD;&#xA;                 Matrix proj = Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0)) * &#xD;&#xA;                               Matrix.CreateScale(new Vector3(1f, 1f, 1f));&#xD;&#xA;    &#xD;&#xA;                 _viewMatrix = Matrix.CreateRotationZ(_rotation) *&#xD;&#xA;                              Matrix.CreateScale(new Vector3(_zoom, _zoom, 1.0f)) *&#xD;&#xA;                              Matrix.CreateTranslation(_position.X, _position.Y, 0.0f);&#xD;&#xA;    &#xD;&#xA;                 _viewMatrix = proj * _viewMatrix;&#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I test it using SpriteBatch in the following way:&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-csharp --&gt;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;        Vector2 position = new Vector2(0, 0);&#xD;&#xA;        // TODO: Add your drawing code here&#xD;&#xA;        spriteBatch.Begin(SpriteSortMode.Immediate,&#xD;&#xA;            BlendState.AlphaBlend,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            camera.ViewMatrix);&#xD;&#xA;&#xD;&#xA;        Texture2D circle = CreateCircle(100);&#xD;&#xA;        spriteBatch.Draw(circle, position, Color.Red);&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/7114463/xna-4-0-2d-camera-y-and-x-are-going-in-wrong-direction/7116343#7116343" />
  <row Id="37170" PostHistoryTypeId="1" PostId="16177" RevisionGUID="34a7b5fc-6287-4022-a061-332d90f93922" CreationDate="2011-08-19T13:33:22.070" UserId="3166" Text="XNA 4.0: 2D Camera Y and X are going in wrong direction" />
  <row Id="37171" PostHistoryTypeId="3" PostId="16177" RevisionGUID="34a7b5fc-6287-4022-a061-332d90f93922" CreationDate="2011-08-19T13:33:22.070" UserId="3166" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;camera&gt;&lt;matrix&gt;" />
  <row Id="37172" PostHistoryTypeId="2" PostId="16178" RevisionGUID="94db758f-f32d-42bf-b4c2-6e64081f8e00" CreationDate="2011-08-19T13:42:06.767" UserId="7173" Text="This is the mistake:&#xD;&#xA;Matrix.CreateTranslation(_position.X, _position.Y, 0.0f)&#xD;&#xA;&#xD;&#xA;Make it like this:&#xD;&#xA;Matrix.CreateTranslation(-_position.X, -_position.Y, 0.0f)&#xD;&#xA;&#xD;&#xA;Explanation:&#xD;&#xA;The matrix specifies how the world should be transformed, not how the camera is transformed.&#xD;&#xA;Thats why you need to insert the **negative** values." />
  <row Id="37173" PostHistoryTypeId="4" PostId="16170" RevisionGUID="9e07a868-ebc8-4bc0-9777-d55e342007f8" CreationDate="2011-08-19T14:11:59.193" UserId="51" Comment="Title -&gt; question " Text="How can I get my objects to move at the same speed regardless of frame rate?" />
  <row Id="37174" PostHistoryTypeId="5" PostId="16177" RevisionGUID="ce9260ec-d9e4-4eee-b113-042154d21f8a" CreationDate="2011-08-19T14:16:39.593" UserId="51" Comment="fixed code blocks" Text="I asked this question on [stackoverflow][1] but assumed this might be a better area to ask it as well for a more informed answer.&#xD;&#xA;&#xD;&#xA;My problem is that I am trying to create a camera class and have it so that my camera follows the proper RHS, however the Y axis seems to be inverted since on the screen the 0 starts at the top.&#xD;&#xA;&#xD;&#xA;Here is my Camera2D Class:&#xD;&#xA;&#xD;&#xA;        class Camera2D&#xD;&#xA;        {&#xD;&#xA;            private Vector2 _position;&#xD;&#xA;            private float _zoom;&#xD;&#xA;            private float _rotation;&#xD;&#xA;            private float _cameraSpeed;&#xD;&#xA;            private Viewport _viewport;&#xD;&#xA;            private Matrix _viewMatrix;&#xD;&#xA;            private Matrix _viewMatrixIverse;&#xD;&#xA;    &#xD;&#xA;            public static float MinZoom = float.Epsilon;&#xD;&#xA;            public static float MaxZoom = float.MaxValue;&#xD;&#xA;    &#xD;&#xA;            public Camera2D(Viewport viewport)&#xD;&#xA;            {&#xD;&#xA;                _viewMatrix = Matrix.Identity;&#xD;&#xA;                _viewport = viewport;&#xD;&#xA;                _cameraSpeed = 4.0f;&#xD;&#xA;                _zoom = 1.0f;&#xD;&#xA;                _rotation = 0.0f;&#xD;&#xA;                _position = Vector2.Zero;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Move(Vector2 amount)&#xD;&#xA;            {&#xD;&#xA;                _position += amount;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Zoom(float amount)&#xD;&#xA;            {&#xD;&#xA;                _zoom += amount;&#xD;&#xA;                _zoom = MathHelper.Clamp(_zoom, MaxZoom, MinZoom);&#xD;&#xA;                UpdateViewTransform();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public Vector2 Position&#xD;&#xA;            {&#xD;&#xA;                get { return _position; }&#xD;&#xA;                set { _position = value; UpdateViewTransform(); }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public Matrix ViewMatrix&#xD;&#xA;            {&#xD;&#xA;                get { return _viewMatrix; }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            private void UpdateViewTransform()&#xD;&#xA;            {&#xD;&#xA;                 Matrix proj = Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0)) * &#xD;&#xA;                               Matrix.CreateScale(new Vector3(1f, 1f, 1f));&#xD;&#xA;    &#xD;&#xA;                 _viewMatrix = Matrix.CreateRotationZ(_rotation) *&#xD;&#xA;                              Matrix.CreateScale(new Vector3(_zoom, _zoom, 1.0f)) *&#xD;&#xA;                              Matrix.CreateTranslation(_position.X, _position.Y, 0.0f);&#xD;&#xA;    &#xD;&#xA;                 _viewMatrix = proj * _viewMatrix;&#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I test it using SpriteBatch in the following way:&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;        Vector2 position = new Vector2(0, 0);&#xD;&#xA;        // TODO: Add your drawing code here&#xD;&#xA;        spriteBatch.Begin(SpriteSortMode.Immediate,&#xD;&#xA;            BlendState.AlphaBlend,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            camera.ViewMatrix);&#xD;&#xA;&#xD;&#xA;        Texture2D circle = CreateCircle(100);&#xD;&#xA;        spriteBatch.Draw(circle, position, Color.Red);&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/7114463/xna-4-0-2d-camera-y-and-x-are-going-in-wrong-direction/7116343#7116343" />
  <row Id="37175" PostHistoryTypeId="16" PostId="16161" RevisionGUID="32b6c94f-d3c9-424f-86b4-2d29d5b8e30f" CreationDate="2011-08-19T14:17:21.807" UserId="51" />
  <row Id="37176" PostHistoryTypeId="16" PostId="16162" RevisionGUID="5ec5e562-7209-4f16-b5d7-b76a9d679357" CreationDate="2011-08-19T14:17:21.807" UserId="51" />
  <row Id="37177" PostHistoryTypeId="16" PostId="16165" RevisionGUID="4f16bbdf-19d2-413c-9a40-5cb4d75dfb47" CreationDate="2011-08-19T14:17:21.807" UserId="51" />
  <row Id="37178" PostHistoryTypeId="16" PostId="16167" RevisionGUID="822e2c85-4301-4a89-ac33-c2c73615c116" CreationDate="2011-08-19T14:17:21.807" UserId="51" />
  <row Id="37179" PostHistoryTypeId="2" PostId="16179" RevisionGUID="1c9d7f0b-e70b-43b3-b601-83f2aece98a9" CreationDate="2011-08-19T14:46:52.353" UserId="3505" Text="This really depends on how your code is organized, I don't think anyone can give a really good answer to what you should and shouldn't do without knowing your code and style in depth. In any case, it doesn't sound like a problem that is prone to consuming problematic amounts of memory. But it could cause problems for you the programmer to manage because it is a lot of code. So don't worry too much about memory, worry about making something that you can work with." />
  <row Id="37180" PostHistoryTypeId="25" PostId="16177" RevisionGUID="2b6361ab-4efa-46c4-8290-24752d8a831f" CreationDate="2011-08-19T15:37:32.897" Comment="http://twitter.com/#!/StackGameDev/status/104577748969857024" />
  <row Id="37181" PostHistoryTypeId="2" PostId="16180" RevisionGUID="e3d14a51-fd8a-4275-8a1e-3b986af48174" CreationDate="2011-08-19T15:43:12.980" UserId="9170" Text="i'm developing a Map kind of simple game using slick 2D library, i want to get the current location of the user and when he run in to a special location (ex: hole) to indicate that is dangerous. how can i achieve this, please give me some good advice. i'm a new comer to games.&#xD;&#xA;&#xD;&#xA;regards,&#xD;&#xA;Rangana" />
  <row Id="37182" PostHistoryTypeId="1" PostId="16180" RevisionGUID="e3d14a51-fd8a-4275-8a1e-3b986af48174" CreationDate="2011-08-19T15:43:12.980" UserId="9170" Text="getting the current location - slick 2D libray" />
  <row Id="37183" PostHistoryTypeId="3" PostId="16180" RevisionGUID="e3d14a51-fd8a-4275-8a1e-3b986af48174" CreationDate="2011-08-19T15:43:12.980" UserId="9170" Text="&lt;java&gt;&lt;maps&gt;&lt;slick&gt;" />
  <row Id="37184" PostHistoryTypeId="4" PostId="16180" RevisionGUID="41d4c48c-4218-4131-9247-9bebd1737da1" CreationDate="2011-08-19T16:49:29.187" UserId="3830" Comment="edited title" Text="getting the current location - slick 2D library" />
  <row Id="37185" PostHistoryTypeId="2" PostId="16181" RevisionGUID="851e3406-bc9d-43e8-9e05-15811b125923" CreationDate="2011-08-19T17:06:22.757" UserId="118" Text="Assuming that I understand what you are trying to do, that is, a 2D dungeon-like tiled game, here is what I would do:&#xD;&#xA;&#xD;&#xA;Have a list of triggers that will fire whenever the player is inside an area. The triggers could be a rectangular location, a circle or anything. In general, you would have something like this:&#xD;&#xA;&#xD;&#xA;    class Level : TriggerListener {&#xD;&#xA;      List&lt;LevelTriggers&gt; levelTriggers;&#xD;&#xA;      Sprite player;&#xD;&#xA;    &#xD;&#xA;      ...&#xD;&#xA;    &#xD;&#xA;      void Initialize()&#xD;&#xA;      {&#xD;&#xA;         // Initialize all triggers&#xD;&#xA;         for (int i = 0; i &lt; 10; i++)&#xD;&#xA;         {&#xD;&#xA;            LevelTrigger trigger = new LevelTrigger();&#xD;&#xA;            trigger.AddListener(this);&#xD;&#xA;            levelTriggers.Add(trigger);&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      void Update(...)&#xD;&#xA;      {&#xD;&#xA;         ...&#xD;&#xA;         for (LevelTrigger trigger in levelTriggers)&#xD;&#xA;         {&#xD;&#xA;            if (trigger.IsIn(player.Position))&#xD;&#xA;            {&#xD;&#xA;               trigger.Fire();&#xD;&#xA;            }&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      ...&#xD;&#xA;      &#xD;&#xA;      void OnTriggered()&#xD;&#xA;      {&#xD;&#xA;         // Show your message&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    abstract class LevelTrigger {&#xD;&#xA;        List&lt;TriggerListeners&gt; triggerListeners;&#xD;&#xA;    &#xD;&#xA;        void AddListener(TriggerListener triggerListener)&#xD;&#xA;        {&#xD;&#xA;           triggerLIsteners.Add(triggerListeners);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void Fire()&#xD;&#xA;        {&#xD;&#xA;           foreach (TriggerListener listener in triggerListeners)&#xD;&#xA;           {&#xD;&#xA;              listener.OnTriggered();&#xD;&#xA;           }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        abstract bool IsIn(Vector position);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    interface TriggerListener&#xD;&#xA;    {&#xD;&#xA;        OnTriggered();&#xD;&#xA;    }" />
  <row Id="37186" PostHistoryTypeId="5" PostId="16181" RevisionGUID="cdd67fd5-d820-430f-8d00-38a4dc5554bf" CreationDate="2011-08-19T17:18:32.987" UserId="118" Comment="added 942 characters in body" Text="EDIT: Totally forgot to mention the &quot;current location&quot; part.&#xD;&#xA;&#xD;&#xA;Assuming that I understand what you are trying to do, that is, a 2D dungeon-like tiled game, here is what I would do:&#xD;&#xA;&#xD;&#xA;The current location of the player can be stored in a Point class, and the entire player entity into a sprite, as is typically done in simple 2D game. I.e.:&#xD;&#xA;&#xD;&#xA;class Sprite {&#xD;&#xA;  Point position;&#xD;&#xA;  Texture texture;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;So, to move your player all you do is listen for keyboard events and update the location:&#xD;&#xA;&#xD;&#xA;    class MyGame implements KeyListener&#xD;&#xA;    {&#xD;&#xA;        Sprite player;&#xD;&#xA;        ...&#xD;&#xA;        public void keyPressed(int key, char c) {&#xD;&#xA;            if (key == Input.KEY_W) {&#xD;&#xA;                player.Position.X += 1;&#xD;&#xA;            } else if (key == Input.KEY_S) {&#xD;&#xA;                player.Position.X -= 1;&#xD;&#xA;            } else if (key == Input.KEY_A) {&#xD;&#xA;                player.Poisition.Y -= 1;&#xD;&#xA;            } else if (key == Input.KEY_D) {&#xD;&#xA;                player.Position.Y += 1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As for informing the player of dangerous locations, have a list of triggers that will fire whenever the player is inside an area. The triggers could be a rectangular location, a circle or anything. In general, you would have something like this:&#xD;&#xA;&#xD;&#xA;    class Level : TriggerListener {&#xD;&#xA;      List&lt;LevelTriggers&gt; levelTriggers;&#xD;&#xA;      Sprite player;&#xD;&#xA;    &#xD;&#xA;      ...&#xD;&#xA;    &#xD;&#xA;      void Initialize()&#xD;&#xA;      {&#xD;&#xA;         // Initialize all triggers&#xD;&#xA;         for (int i = 0; i &lt; 10; i++)&#xD;&#xA;         {&#xD;&#xA;            LevelTrigger trigger = new LevelTrigger();&#xD;&#xA;            trigger.AddListener(this);&#xD;&#xA;            levelTriggers.Add(trigger);&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      void Update(...)&#xD;&#xA;      {&#xD;&#xA;         ...&#xD;&#xA;         for (LevelTrigger trigger in levelTriggers)&#xD;&#xA;         {&#xD;&#xA;            if (trigger.IsIn(player.Position))&#xD;&#xA;            {&#xD;&#xA;               trigger.Fire();&#xD;&#xA;            }&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      ...&#xD;&#xA;      &#xD;&#xA;      void OnTriggered()&#xD;&#xA;      {&#xD;&#xA;         // Show your message&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    abstract class LevelTrigger {&#xD;&#xA;        List&lt;TriggerListeners&gt; triggerListeners;&#xD;&#xA;    &#xD;&#xA;        void AddListener(TriggerListener triggerListener)&#xD;&#xA;        {&#xD;&#xA;           triggerLIsteners.Add(triggerListeners);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void Fire()&#xD;&#xA;        {&#xD;&#xA;           foreach (TriggerListener listener in triggerListeners)&#xD;&#xA;           {&#xD;&#xA;              listener.OnTriggered();&#xD;&#xA;           }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        abstract bool IsIn(Vector position);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    interface TriggerListener&#xD;&#xA;    {&#xD;&#xA;        OnTriggered();&#xD;&#xA;    }" />
  <row Id="37187" PostHistoryTypeId="5" PostId="16180" RevisionGUID="d1e13094-7dbf-4702-b10a-3a3530cab598" CreationDate="2011-08-19T17:44:56.303" UserId="7630" Comment="grammar, changed title into a proper question" Text="I'm developing a map kind of simple game using slick 2D library, and I want to get the current location of the user.  When the user runs into a special location (ex: hole) to indicate that is dangerous. How can I achieve this?  I'm a new comer to games.&#xD;&#xA;" />
  <row Id="37188" PostHistoryTypeId="4" PostId="16180" RevisionGUID="d1e13094-7dbf-4702-b10a-3a3530cab598" CreationDate="2011-08-19T17:44:56.303" UserId="7630" Comment="grammar, changed title into a proper question" Text="How do I get the current location when using slick 2D library?" />
  <row Id="37189" PostHistoryTypeId="24" PostId="16180" RevisionGUID="d1e13094-7dbf-4702-b10a-3a3530cab598" CreationDate="2011-08-19T17:44:56.303" Comment="Proposed by 7630 approved by 20 edit id of 658" />
  <row Id="37190" PostHistoryTypeId="2" PostId="16182" RevisionGUID="eec93968-545d-4aff-bae7-00540ec301fd" CreationDate="2011-08-19T18:16:30.833" UserId="9170" Text="    @Override&#xD;&#xA;    public void mouseMoved(int oldx, int oldy, int newx, int newy) {&#xD;&#xA;      super.mouseMoved(oldx, oldy, newx, newy); &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;we can get the mouse location in this method via newx, newy . i want to know is there any such way to get the location in slick2D? when we press the arrow keys and move a image of a man on the game surface(tile map)? " />
  <row Id="37191" PostHistoryTypeId="1" PostId="16182" RevisionGUID="eec93968-545d-4aff-bae7-00540ec301fd" CreationDate="2011-08-19T18:16:30.833" UserId="9170" Text="how to get the current location in the map surface - slick 2D" />
  <row Id="37192" PostHistoryTypeId="3" PostId="16182" RevisionGUID="eec93968-545d-4aff-bae7-00540ec301fd" CreationDate="2011-08-19T18:16:30.833" UserId="9170" Text="&lt;java&gt;&lt;slick&gt;" />
  <row Id="37193" PostHistoryTypeId="2" PostId="16183" RevisionGUID="c778688b-9428-4db1-9868-0f828de0760a" CreationDate="2011-08-19T18:34:34.940" UserId="8958" Text="First of all, I am a beginner developer so please don't get me wrong. I just want to know what programs do high end games use. By high end I mean games that me and you would buy, say Splinter Cell, Starcraft, WoW, GTA and the list goes on. Do they use Visual Studio? Unity? I have no idea :P&#xD;&#xA;&#xD;&#xA;PS: Sorry for the tags, not sure if I chose the best I could." />
  <row Id="37194" PostHistoryTypeId="1" PostId="16183" RevisionGUID="c778688b-9428-4db1-9868-0f828de0760a" CreationDate="2011-08-19T18:34:34.940" UserId="8958" Text="What engines and tools do high end games use?" />
  <row Id="37195" PostHistoryTypeId="3" PostId="16183" RevisionGUID="c778688b-9428-4db1-9868-0f828de0760a" CreationDate="2011-08-19T18:34:34.940" UserId="8958" Text="&lt;architecture&gt;&lt;ide&gt;" />
  <row Id="37196" PostHistoryTypeId="25" PostId="16170" RevisionGUID="0b626682-7a47-4e45-89ab-d508b754eef6" CreationDate="2011-08-19T18:37:35.043" Comment="http://twitter.com/#!/StackGameDev/status/104623056256901120" />
  <row Id="37197" PostHistoryTypeId="2" PostId="16184" RevisionGUID="171e8204-fdd1-48a0-99a2-89701e8a98b9" CreationDate="2011-08-19T18:42:22.973" UserId="9366" Text="A lot of big development companies will have their own engines, others will pay for licenses to use some of the big-name engines like:&#xD;&#xA;&#xD;&#xA; - Unreal: http://www.unrealengine.com/  ([http://en.wikipedia.org/wiki/List_of_Unreal_Engine_games][1])&#xD;&#xA; - Source: http://source.valvesoftware.com/index.php&#xD;&#xA; - CryEngine: http://www.crytek.com/cryengine   ([http://en.wikipedia.org/wiki/List_of_CryEngine_games][2])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_Unreal_Engine_games&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/List_of_CryEngine_games" />
  <row Id="37198" PostHistoryTypeId="5" PostId="16184" RevisionGUID="a0880856-c335-4528-86bc-4172f4e904ae" CreationDate="2011-08-19T18:51:23.740" UserId="9366" Comment="added 168 characters in body" Text="A lot of big development companies will have their own engines, others will pay for licenses to use some of the big-name engines like:&#xD;&#xA;&#xD;&#xA; - Unreal: http://www.unrealengine.com/  ([http://en.wikipedia.org/wiki/List_of_Unreal_Engine_games][1])&#xD;&#xA; - Source: http://source.valvesoftware.com/index.php&#xD;&#xA; - CryEngine: http://www.crytek.com/cryengine   ([http://en.wikipedia.org/wiki/List_of_CryEngine_games][2])&#xD;&#xA;&#xD;&#xA;Doing a quick google reveals that Splinter Cell uses the Unreal engine, WoW and Starcraft use proprietary engines, and the GTA series uses Rockstar's own RAGE engine.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/List_of_Unreal_Engine_games&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/List_of_CryEngine_games" />
  <row Id="37199" PostHistoryTypeId="5" PostId="16181" RevisionGUID="f33a53dd-d86f-412e-b6c9-cf57df04bd22" CreationDate="2011-08-19T18:57:30.983" UserId="118" Comment="added 191 characters in body" Text="Assuming that I understand what you are trying to do, that is, a 2D dungeon-like tiled game, here is what I would do:&#xD;&#xA;&#xD;&#xA;The current location of the player can be stored in a Point class, and the entire player entity into a sprite, as is typically done in simple 2D game. I.e.:&#xD;&#xA;&#xD;&#xA;    class Sprite {&#xD;&#xA;      Point position;&#xD;&#xA;      Texture texture;&#xD;&#xA;      ...&#xD;&#xA;      public Point getPosition() {&#xD;&#xA;         return this.position;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So, to move your player all you do is listen for keyboard events and update the location:&#xD;&#xA;&#xD;&#xA;    class MyGame implements KeyListener&#xD;&#xA;    {&#xD;&#xA;        Sprite player;&#xD;&#xA;        ...&#xD;&#xA;        public void keyPressed(int key, char c) {&#xD;&#xA;            if (key == Input.KEY_W) {&#xD;&#xA;                player.getPosition().X += 1;&#xD;&#xA;            } else if (key == Input.KEY_S) {&#xD;&#xA;                player.getPosition().X -= 1;&#xD;&#xA;            } else if (key == Input.KEY_A) {&#xD;&#xA;                player.getPoisition().Y -= 1;&#xD;&#xA;            } else if (key == Input.KEY_D) {&#xD;&#xA;                player.getPosition().Y += 1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As for informing the player of dangerous locations, have a list of triggers that will fire whenever the player is inside an area. The triggers could be a rectangular location, a circle or anything. In general, you would have something like this:&#xD;&#xA;&#xD;&#xA;    class Level implements TriggerListener {&#xD;&#xA;      List&lt;LevelTriggers&gt; levelTriggers;&#xD;&#xA;      Sprite player;&#xD;&#xA;    &#xD;&#xA;      ...&#xD;&#xA;    &#xD;&#xA;      void initialize() {&#xD;&#xA;         // Initialize all triggers (usually you read this part from a file)&#xD;&#xA;         for (int i = 0; i &lt; numberOfTriggers; i++) {&#xD;&#xA;            LevelTrigger trigger = new LevelTrigger();&#xD;&#xA;            trigger.addListener(this);&#xD;&#xA;            levelTriggers.add(trigger);&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      void update(...) {&#xD;&#xA;         ...&#xD;&#xA;         for (LevelTrigger trigger : levelTriggers) {&#xD;&#xA;            if (trigger.isIn(player.getPosition())) {&#xD;&#xA;               trigger.fire();&#xD;&#xA;            }&#xD;&#xA;         }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      ...&#xD;&#xA;      &#xD;&#xA;      void triggered() {&#xD;&#xA;         // Show your message&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    abstract class LevelTrigger {&#xD;&#xA;        List&lt;TriggerListeners&gt; triggerListeners;&#xD;&#xA;    &#xD;&#xA;        void addListener(TriggerListener triggerListener)&#xD;&#xA;        {&#xD;&#xA;           triggerLIsteners.add(triggerListeners);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        void fire()&#xD;&#xA;        {&#xD;&#xA;           for (TriggerListener listener : triggerListeners)&#xD;&#xA;           {&#xD;&#xA;              listener.triggered();&#xD;&#xA;           }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        abstract bool isIn(Point position);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    interface TriggerListener&#xD;&#xA;    {&#xD;&#xA;        triggered();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;EDIT: Totally forgot to mention the &quot;current location&quot; part.  &#xD;&#xA;EDIT2: OK, I GOT to stop writing C# code in Java questions :/" />
  <row Id="37200" PostHistoryTypeId="2" PostId="16185" RevisionGUID="954e47b3-3b5b-4a64-a7df-ae50a14b8c62" CreationDate="2011-08-19T18:57:39.607" UserId="2581" Text="All of my Camera classes start with this as a base:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;public class Camera {&#xD;&#xA;&#xD;&#xA;    private Vector2 position = Vector2.Zero;&#xD;&#xA;&#xD;&#xA;    public float Left {&#xD;&#xA;        get { return position.X; }&#xD;&#xA;        set { position.X = value; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public float Top {&#xD;&#xA;        get { return position.Y; }&#xD;&#xA;        set { position.Y = value; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Matrix TransformMatrix {&#xD;&#xA;        get {&#xD;&#xA;            return Matrix.CreateTranslation( new Vector3( -position, 0f ) );&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public Camera( ) { }&#xD;&#xA;&#xD;&#xA;} // Camera&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;I use the same method that Felheart has highlighted by inserting the negative values (&lt;code&gt;-position&lt;/code&gt;) into the &lt;code&gt;Matrix.CreateTranslation&lt;/code&gt; function call and have never had a problem with the camera moving in the wrong direction.  My camera is used just like yours:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;code&gt;&#xD;&#xA;spriteBatch.Begin( &#xD;&#xA;    SpriteSortMode.Deferred, &#xD;&#xA;    BlendState.Additive, &#xD;&#xA;    SamplerState.AnisotropicClamp, &#xD;&#xA;    null, &#xD;&#xA;    null, &#xD;&#xA;    null, &#xD;&#xA;    camera.TransformMatrix );&#xD;&#xA;&#xD;&#xA;spriteBatch.Draw( &#xD;&#xA;    someTexture, &#xD;&#xA;    x, &#xD;&#xA;    y, &#xD;&#xA;    width, &#xD;&#xA;    height, &#xD;&#xA;    color );&#xD;&#xA;&#xD;&#xA;spriteBatch.End();&#xD;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xD;&#xA;" />
  <row Id="37201" PostHistoryTypeId="2" PostId="16186" RevisionGUID="dbe80de7-18e7-4533-9c68-1ae0bf32977c" CreationDate="2011-08-19T19:19:39.763" UserId="118" Text="I think you are confusing some concepts..... If you use your **keyboard** to move your player, then you usually store the location of the player's position in the player's object. &#xD;&#xA;&#xD;&#xA;If you use your **mouse** to move the player, then you use the location of the mouse on the screen to set the player's position on the game.&#xD;&#xA;&#xD;&#xA;So, there is no such thing as *location of keyboard* as there is for *location of mouse pointer*.&#xD;&#xA;&#xD;&#xA;In any case, whichever way you update the location of your player, his position is still stored in the object. I.e.&#xD;&#xA;&#xD;&#xA;    class Sprite {&#xD;&#xA;        Point position;&#xD;&#xA;        Texture texture;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    class Level implements MouseListener, KeyListener {&#xD;&#xA;        Sprite player;&#xD;&#xA;        ...&#xD;&#xA;        void update(...) {&#xD;&#xA;            // THIS IS THE POSITION OF YOUR PLAYER  &#xD;&#xA;            //whether you updated it with mouse or keybaord&#xD;&#xA;            Point position = player.getPosition(); &#xD;&#xA;&#xD;&#xA;            // Do something with this...&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Update player position using mouse&#xD;&#xA;        public void mouseMoved(int oldx, int oldy, int newx, int newy) {&#xD;&#xA;            player.setPosition(new Point(newx, newy);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Update player position using keyboard&#xD;&#xA;        public void keyPressed(int key, char c) {&#xD;&#xA;            if (key == Input.KEY_W) {&#xD;&#xA;                player.getPosition().X += 1;&#xD;&#xA;            } else if (key == Input.KEY_S) {&#xD;&#xA;                player.getPosition().X -= 1;&#xD;&#xA;            } else if (key == Input.KEY_A) {&#xD;&#xA;                player.getPoisition().Y -= 1;&#xD;&#xA;            } else if (key == Input.KEY_D) {&#xD;&#xA;                player.getPosition().Y += 1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Hope this helped clear some things..." />
  <row Id="37202" PostHistoryTypeId="2" PostId="16187" RevisionGUID="4a8147aa-71fb-48ca-a532-f134441334aa" CreationDate="2011-08-19T19:48:09.920" UserId="118" Text="Let's say I have a background and a set of entities.  &#xD;&#xA;I have managed to draw the background into a Texture2D using a RenderTarget   &#xD;&#xA;I have also managed to draw all my entities into another RenderTarget&#xD;&#xA;&#xD;&#xA;Now I want to take these two Textures and render them on the screen as so:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Top-level rendering&#xD;&#xA;    entitiesSystem.Process();&#xD;&#xA;    background.Process();&#xD;&#xA;    Texture2D entitiesTexture = entitiesSystem.EntitiesTexture;&#xD;&#xA;    Texture2D backgroundTexture = background.BackgroundTexture;&#xD;&#xA;    &#xD;&#xA;    graphicsDevice.SetRenderTarget(null);&#xD;&#xA;    graphicsDevice.Clear(Color.Black);&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    spriteBatch.Draw(&#xD;&#xA;        backgroundTexture,&#xD;&#xA;        LevelManager.LEVEL_RECTANGLE,&#xD;&#xA;        null,&#xD;&#xA;        Color.White,&#xD;&#xA;        0.0f,&#xD;&#xA;        Vector2.Zero,&#xD;&#xA;        SpriteEffects.None,&#xD;&#xA;        1&#xD;&#xA;    );&#xD;&#xA;    spriteBatch.Draw(&#xD;&#xA;        entitiesTexture,&#xD;&#xA;        LevelManager.LEVEL_RECTANGLE,&#xD;&#xA;        null,&#xD;&#xA;        Color.White,&#xD;&#xA;        0.0f,&#xD;&#xA;        Vector2.Zero,&#xD;&#xA;        SpriteEffects.None,&#xD;&#xA;        0&#xD;&#xA;    );&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;Here is how the background system renders the background:&#xD;&#xA;&#xD;&#xA;    graphicsDevice.SetRenderTarget(BackgroundTexture);&#xD;&#xA;    spriteBatch.Begin();&#xD;&#xA;    for (int i = 0; i &lt; 2; i++)&#xD;&#xA;        spriteBatch.Draw(textures[i], positions[i], Color.White);&#xD;&#xA;    spriteBatch.End();&#xD;&#xA;&#xD;&#xA;Almost the same thing happens for the entities: I set the render target to the relevant one (not the same as the one for the background), start the spritebatch (again, not the same one), draw the entities and end the spritebatch.&#xD;&#xA;&#xD;&#xA;If I set BlendMode to additive, the result is correct (they blend together). However, if I set to to AlphaBlend, then I can only render one of them (depending on the SpriteSortMode).&#xD;&#xA;&#xD;&#xA;I have come as far as understanding that the problem lies in not preserving... something, but I am not sure how to preserve it :P&#xD;&#xA;&#xD;&#xA;By the way, I read that multiple render targets are not supported for the XBOX... Soooooooo... what is the alternative of doing what I am doing now?&#xD;&#xA;" />
  <row Id="37203" PostHistoryTypeId="1" PostId="16187" RevisionGUID="4a8147aa-71fb-48ca-a532-f134441334aa" CreationDate="2011-08-19T19:48:09.920" UserId="118" Text="Rendering multiple RenderTargets to the screen" />
  <row Id="37204" PostHistoryTypeId="3" PostId="16187" RevisionGUID="4a8147aa-71fb-48ca-a532-f134441334aa" CreationDate="2011-08-19T19:48:09.920" UserId="118" Text="&lt;xna&gt;&lt;rendering&gt;" />
  <row Id="37205" PostHistoryTypeId="2" PostId="16188" RevisionGUID="a9353a6b-6af9-4d7a-aaf1-b96c555ea311" CreationDate="2011-08-19T20:05:31.333" UserId="9367" Text="There's breaking news about Zynga being sued over some very obvious implementations. This is making me think that the game industry is full of landmines to be stepped on at every turn. What input does everyone have to minimize the damage?&#xD;&#xA;&#xD;&#xA;Latest:&lt;br&gt;&#xD;&#xA;http://www.gamasutra.com/view/news/36657/Zynga_Sued_Over_Prize_Redemption_Patents.php&#xD;&#xA;&#xD;&#xA;Another example:&lt;br&gt;&#xD;&#xA;https://w2.eff.org/patent/wanted/patent.php?p=sheldon" />
  <row Id="37206" PostHistoryTypeId="1" PostId="16188" RevisionGUID="a9353a6b-6af9-4d7a-aaf1-b96c555ea311" CreationDate="2011-08-19T20:05:31.333" UserId="9367" Text="How do we keep ourselves from being sued for unknown patent infringements?" />
  <row Id="37207" PostHistoryTypeId="3" PostId="16188" RevisionGUID="a9353a6b-6af9-4d7a-aaf1-b96c555ea311" CreationDate="2011-08-19T20:05:31.333" UserId="9367" Text="&lt;game-design&gt;&lt;architecture&gt;&lt;game-mechanics&gt;&lt;design-patterns&gt;&lt;game-industry&gt;" />
  <row Id="37208" PostHistoryTypeId="2" PostId="16189" RevisionGUID="95ec7eea-bd8c-4e02-945a-8145c198fc00" CreationDate="2011-08-19T20:08:04.490" UserId="9366" Text="In my XNA-based game, I have multiple layers like this too. I just draw the background, then draw the foreground. Using multiple render targets is often reserved for special effects and taking screenshots. Here is some doc on multiple render targets:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb975911%28XNAGameStudio.31%29.aspx#ID4E4F" />
  <row Id="37209" PostHistoryTypeId="5" PostId="16189" RevisionGUID="687f0b04-c6a4-47c2-ae76-2dc51319faeb" CreationDate="2011-08-19T20:27:33.693" UserId="9366" Comment="added 3 characters in body" Text="In my 2D XNA-based game, I have multiple layers like this too. I just draw the background, then draw the foreground. Using multiple render targets is often reserved for special effects and taking screenshots. Here is some doc on multiple render targets:&#xD;&#xA;http://msdn.microsoft.com/en-us/library/bb975911%28XNAGameStudio.31%29.aspx#ID4E4F" />
  <row Id="37210" PostHistoryTypeId="2" PostId="16190" RevisionGUID="0578948b-c153-40c3-a67c-813ad93301f5" CreationDate="2011-08-19T20:37:12.970" UserId="9134" Text="It's reasonably safe to assume that Carmack knows what he's talking about, but you need to realise that he's referring to a very specific problem domain which may not even exist outside of the stuff he's currently working on.  My understanding is that his current engine uses completely dynamic texturing, so obviously the ability to efficiently update dynamic textures is something of a sticking point for him.  The specific capability he's referring to - just being able to grap a pointer to texture memory and write directly to it, instead of having to go through API layers - is what I'll present as evidence for my argument, which is that he's right in the context of the specific problem he's referring to, and may even be right in the general case, but the general case would be to a somewhat significantly lesser degree to his special case." />
  <row Id="37211" PostHistoryTypeId="5" PostId="16177" RevisionGUID="d6764f19-21c7-4b63-99fd-e25fb464c6a4" CreationDate="2011-08-19T20:41:01.220" UserId="3166" Comment="Added solution" Text="I asked this question on [stackoverflow][1] but assumed this might be a better area to ask it as well for a more informed answer.&#xD;&#xA;&#xD;&#xA;My problem is that I am trying to create a camera class and have it so that my camera follows the proper RHS, however the Y axis seems to be inverted since on the screen the 0 starts at the top.&#xD;&#xA;&#xD;&#xA;Here is my Camera2D Class:&#xD;&#xA;&#xD;&#xA;        class Camera2D&#xD;&#xA;        {&#xD;&#xA;            private Vector2 _position;&#xD;&#xA;            private float _zoom;&#xD;&#xA;            private float _rotation;&#xD;&#xA;            private float _cameraSpeed;&#xD;&#xA;            private Viewport _viewport;&#xD;&#xA;            private Matrix _viewMatrix;&#xD;&#xA;            private Matrix _viewMatrixIverse;&#xD;&#xA;    &#xD;&#xA;            public static float MinZoom = float.Epsilon;&#xD;&#xA;            public static float MaxZoom = float.MaxValue;&#xD;&#xA;    &#xD;&#xA;            public Camera2D(Viewport viewport)&#xD;&#xA;            {&#xD;&#xA;                _viewMatrix = Matrix.Identity;&#xD;&#xA;                _viewport = viewport;&#xD;&#xA;                _cameraSpeed = 4.0f;&#xD;&#xA;                _zoom = 1.0f;&#xD;&#xA;                _rotation = 0.0f;&#xD;&#xA;                _position = Vector2.Zero;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Move(Vector2 amount)&#xD;&#xA;            {&#xD;&#xA;                _position += amount;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public void Zoom(float amount)&#xD;&#xA;            {&#xD;&#xA;                _zoom += amount;&#xD;&#xA;                _zoom = MathHelper.Clamp(_zoom, MaxZoom, MinZoom);&#xD;&#xA;                UpdateViewTransform();&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public Vector2 Position&#xD;&#xA;            {&#xD;&#xA;                get { return _position; }&#xD;&#xA;                set { _position = value; UpdateViewTransform(); }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            public Matrix ViewMatrix&#xD;&#xA;            {&#xD;&#xA;                get { return _viewMatrix; }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            private void UpdateViewTransform()&#xD;&#xA;            {&#xD;&#xA;                 Matrix proj = Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0)) * &#xD;&#xA;                               Matrix.CreateScale(new Vector3(1f, 1f, 1f));&#xD;&#xA;    &#xD;&#xA;                 _viewMatrix = Matrix.CreateRotationZ(_rotation) *&#xD;&#xA;                              Matrix.CreateScale(new Vector3(_zoom, _zoom, 1.0f)) *&#xD;&#xA;                              Matrix.CreateTranslation(_position.X, _position.Y, 0.0f);&#xD;&#xA;    &#xD;&#xA;                 _viewMatrix = proj * _viewMatrix;&#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I test it using SpriteBatch in the following way:&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;    {&#xD;&#xA;        GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;        Vector2 position = new Vector2(0, 0);&#xD;&#xA;        // TODO: Add your drawing code here&#xD;&#xA;        spriteBatch.Begin(SpriteSortMode.Immediate,&#xD;&#xA;            BlendState.AlphaBlend,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            camera.ViewMatrix);&#xD;&#xA;&#xD;&#xA;        Texture2D circle = CreateCircle(100);&#xD;&#xA;        spriteBatch.Draw(circle, position, Color.Red);&#xD;&#xA;        spriteBatch.End();&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**SOLUTION**&#xD;&#xA;&#xD;&#xA;So after just thinking **logically**, I was able to deduce the proper transformation.&#xD;&#xA;I'll outline the steps here incase anyone wants the real breakdown:&#xD;&#xA;&#xD;&#xA;It is important to understand what is a *Camera Transformation or View Transformation*.&#xD;&#xA;A View Transformation is normally what is needed to go from Coordinates **relative** to your Camera to World-Space coordinates. The inverse of the View Transformation would then  make a world coordinate relative to your Camera!&#xD;&#xA;&#xD;&#xA;*Creating a View Matrix*&#xD;&#xA;&#xD;&#xA; 1. Apply the camera's rotation. We are doing it in the Z axis only because this is for a 2D camera.&#xD;&#xA; 2. Apply the transformation of the Camera. This make sense since we want the World coordinate which is the sum of the camera coordinate and the object relative to the camera.&#xD;&#xA;1. You might notice that I multiplied the Y Component by -1. This is so that increasing the Camera's Y Position correlates to moving up since the screen's Y value points downward.&#xD;&#xA; 3. Apply the camera's zoom&#xD;&#xA;&#xD;&#xA;Now the inverse of the matrix will do World Coordinate -&gt; View Cordinates.&#xD;&#xA;&#xD;&#xA;I also chose to center my camera in the center of the screen, so I included a pre-appended translation.&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-csharp --&gt;&#xD;&#xA;&#xD;&#xA;    Matrix proj = Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0));&#xD;&#xA;    &#xD;&#xA;            _viewMatrix = Matrix.CreateRotationZ(moveComponent.Rotation) *&#xD;&#xA;                        Matrix.CreateTranslation(moveComponent.Position.X, -1 * moveComponent.Position.Y, 0.0f) *&#xD;&#xA;                         Matrix.CreateScale(new Vector3(zoomComponent.Zoom, zoomComponent.Zoom, 1.0f));&#xD;&#xA;    &#xD;&#xA;            _viewMatrix = proj * Matrix.Invert(_viewMatrix);&#xD;&#xA;&#xD;&#xA;  [1]: http://stackoverflow.com/questions/7114463/xna-4-0-2d-camera-y-and-x-are-going-in-wrong-direction/7116343#7116343" />
  <row Id="37212" PostHistoryTypeId="2" PostId="16191" RevisionGUID="d08c5119-67b4-4b36-b43a-e987d8bf66cc" CreationDate="2011-08-19T20:47:11.383" UserId="3166" Text="I've been reading about Entity Component design and thought it's pretty neat.&#xD;&#xA;I've been trying to write a quick 2D engine in XNA.&#xD;&#xA;&#xD;&#xA;I think I've laid the proper groundwork for registering and updating entities, since I've created some &quot;PositionComponents&quot; that seem to work with my Camera Entity (an Entity that simply owns ZoomableComponent, PositionComponent, MouseInputComponent).&#xD;&#xA;&#xD;&#xA;All the tutorials seem to however seem to *end* at this stage of design. &#xD;&#xA;I'm pretty lose now on how I would like to design my animation/sprite components.&#xD;&#xA;&#xD;&#xA; - I know I want some sort of 'RenderableComponent' which you assign it a Texture&#xD;&#xA; - I need some sort of FSM (Finite State Machine) to hold Entity States&#xD;&#xA; - I need some sort of Animation Manager.&#xD;&#xA;&#xD;&#xA;Does anyone have any tips?" />
  <row Id="37213" PostHistoryTypeId="1" PostId="16191" RevisionGUID="d08c5119-67b4-4b36-b43a-e987d8bf66cc" CreationDate="2011-08-19T20:47:11.383" UserId="3166" Text="XNA Entity Component Design: Lost on how to include Sprite Animation" />
  <row Id="37214" PostHistoryTypeId="3" PostId="16191" RevisionGUID="d08c5119-67b4-4b36-b43a-e987d8bf66cc" CreationDate="2011-08-19T20:47:11.383" UserId="3166" Text="&lt;xna&gt;&lt;architecture&gt;&lt;xna-4.0&gt;&lt;component-based&gt;&lt;entity-system&gt;" />
  <row Id="37215" PostHistoryTypeId="2" PostId="16192" RevisionGUID="47e2f3a8-eec1-408e-ad49-05882660837b" CreationDate="2011-08-19T20:48:56.257" UserId="3659" Text="I asked myself a similar question a while back and here is what I came up with (using a component-based system):&#xD;&#xA;&#xD;&#xA;Create an `AnimationFrame` class which only has a duration. When this updates, it updates the time passed. (If you have a `baseObject` class, make sure this derives from it)&#xD;&#xA;&#xD;&#xA;Create an `ImageAnimation` class derived from `AnimationFrame`, which has a `SpriteSheet` variable to hold your image, and possibly a `matrix` to resize/crop the spritesheet. When this updates, it draws the image (cropped/resized). It should also `super.update()` to update the time passed.&#xD;&#xA;&#xD;&#xA;Create a `SpriteSheetManager` class that can hold `ImageAnimation` objects. When `SpriteSheetManager` updates, it updates the current `ImageAnimation` object - ie the current frame. When the current `ImageAnimation` is done (duration has passed), the manager should move on to the next `ImageAnimation`. You would have to manually add in `ImageAnimations` and specify the image/duration/matrix (or somehow pull it from a data file).&#xD;&#xA;&#xD;&#xA;Add the `SpriteSheetManager` to your Player objects, so they update when Players update.&#xD;&#xA;&#xD;&#xA;Now if you had a `baseObject` class and your game objects are stored as an array of `baseObjects`, then you can add `SpriteSheetManager` to the game objects so it updates then. This would be useful for large spells that take up the whole screen.&#xD;&#xA;&#xD;&#xA;You can also enhance the `ImageAnimation` class (or create a derived class) to handle scrolling images.&#xD;&#xA;&#xD;&#xA;Hopefully this could give you some ideas..." />
  <row Id="37216" PostHistoryTypeId="2" PostId="16193" RevisionGUID="ae77db9b-2e2d-425e-b1fe-2fb6cfd1084d" CreationDate="2011-08-19T20:52:01.310" UserId="9134" Text="Four main solutions spring to mind.&#xD;&#xA;&#xD;&#xA;First one is to use an older version of the DirectX SDK.  I seem to remember that versions from roundabout 2004 or earlier were statically linked (but if a larger executable size frightens you that might not be an option), and it's also the case that if you use a version from 2006/2007 or earlier then the D3DX DLLs you need will stand a much higher chance on being on the machine.  Downside of this is that you'll be missing out on bugfixes, performance enhancements and improved functionality in the newer SDKs (it also rules out any version of D3D other than 9).&#xD;&#xA;&#xD;&#xA;Second solution is to use LoadLibrary and GetProcAddress on the D3DX functions.  You pick a maximum and minimum supported version (say, from _42 to _34), then go into a loop from max to min, construct the DLL name, and attempt to LoadLibrary it.  If you load it OK, you then do a bunch of GetProcAddress calls and use your function pointers instead of the raw D3DX functions.  Kind of like OpenGL extensions, if you know what I'm talking about.  This one's potentially a little hairy, and you might still have to deal with the case where you can't find any DLL in your range.  But I have used this one in the past and it works well enough.&#xD;&#xA;&#xD;&#xA;Third solution is to just not use D3DX.  Might be an option in some cases, might not be an option in your case.&#xD;&#xA;&#xD;&#xA;Fourth and final solution is to just tell your users to upgrade their Direct 3D.  They really should be doing this anyway, it's a small and fast download from Microsoft, and it's an instant problem solver.  Your users may not like to have to do so, and you may have to deal with questions like &quot;I've already got D3D11, why do I need to upgrade my D3D9&quot;, but on balance it may work out more economical overall to take it on the nose." />
  <row Id="37217" PostHistoryTypeId="2" PostId="16194" RevisionGUID="7c829cb3-95b7-4de8-baf0-c7975464a882" CreationDate="2011-08-19T20:58:11.773" UserId="9368" Text="I'm using the &quot;Zig-Zag&quot; approach to drawing my isometric map (as seen here http://stackoverflow.com/questions/892811/drawing-isometric-game-worlds).  Now I need to do collision detection on the irregularly shaped map.&#xD;&#xA;&#xD;&#xA;All I need to know is how to figure out if point (x, y) is colliding with the zig-zag isometric map." />
  <row Id="37218" PostHistoryTypeId="1" PostId="16194" RevisionGUID="7c829cb3-95b7-4de8-baf0-c7975464a882" CreationDate="2011-08-19T20:58:11.773" UserId="9368" Text="Collision Detection with Isometric Map" />
  <row Id="37219" PostHistoryTypeId="3" PostId="16194" RevisionGUID="7c829cb3-95b7-4de8-baf0-c7975464a882" CreationDate="2011-08-19T20:58:11.773" UserId="9368" Text="&lt;isometric&gt;" />
  <row Id="37220" PostHistoryTypeId="2" PostId="16195" RevisionGUID="db1c924b-987b-4079-9655-1bad54f035b4" CreationDate="2011-08-19T21:23:53.447" UserId="118" Text="Let me stop you there before going any further with your implementation and suggest you look at the awesome [Artemis](http://www.gamadu.com/artemis/) library. I recently discovered this and I think I have found the light! :P&#xD;&#xA;&#xD;&#xA;There is a [port for C#](https://github.com/thelinuxlich/artemis_CSharp) which I use for my XNA game, and there are examples there to clear many things.&#xD;&#xA;&#xD;&#xA;Definitely have a look at it!&#xD;&#xA;&#xD;&#xA;Basically, in Artemis, Components are plain data and you use Systems to manipulate the data (which make it also easy to have your game data-driven).&#xD;&#xA;&#xD;&#xA;So, for example, a TextureComponent would have an array of Texture2Ds, and then you would have a TextureSystem that will render them to screen." />
  <row Id="37221" PostHistoryTypeId="2" PostId="16196" RevisionGUID="93bdf312-3291-4982-9c92-e383590886b1" CreationDate="2011-08-19T21:26:43.787" UserId="744" Text="There is no way to write software to avoid infringing patents, period, in the US right now. There are steps you can take to mitigate the problem.&#xD;&#xA;&#xD;&#xA;* Get a relationship with a lawyer. They don't have to be on your staff. They don't even have to be on retainer. But scout some out ahead of time and know who you can trust if you do get an infringement notice. &#xD;&#xA;* Don't educate yourself about specific patents in your field unless you intend from the start on licensing them. &lt;a href=&quot;http://en.wikipedia.org/wiki/Treble_damages&quot;&gt;Knowingly infringing a patent carries more damages than ignorantly infringing one.&lt;/a&gt; Whatever you're doing, _it violates patents_; only worry about specificity when it happens.&#xD;&#xA;* Don't build up a defensive patent portfolio. It'll just waste your time and money. The nature of a patent troll is that they own many/broad patents, threaten indiscriminately, and don't actually do anything so won't counter-infringe. The MAD strategy defensive portfolios are based on only works if you're capable of destroying the other company, and the other company is rational. Unless you're EA/Activision/etc you can't do the former, and if you're up against a patent troll you can't count on the later. (There are other reasons to build up patent portfolios, like if you want to inflate your company's perceived value to investors - but this road only leads to your patents being used to troll other people in the future.)&#xD;&#xA;* Don't lose sleep over it. Zynga's getting sued. Would you swap your company's financials with Zynga's despite that? I sure would. They are getting sued because someone wants a piece of that gigantic Zynga pie, not because there's a company somewhere actually disadvantaged because Zynga did not license their patent. If you don't have fat stacks of cash, most of those organizations won't come knocking." />
  <row Id="37222" PostHistoryTypeId="5" PostId="16196" RevisionGUID="fa9f29a7-689b-491a-8fea-8b638f2ee8e1" CreationDate="2011-08-19T21:35:56.203" UserId="744" Comment="added 384 characters in body" Text="There is no way to write software to avoid infringing patents, period, in the US right now. There are steps you can take to mitigate the problem.&#xD;&#xA;&#xD;&#xA;* Get a relationship with a lawyer. They don't have to be on your staff. They don't even have to be on retainer. But scout some out ahead of time and know who you can trust if you do get an infringement notice. &#xD;&#xA;* Don't educate yourself about specific patents in your field unless you intend from the start on licensing them. &lt;a href=&quot;http://en.wikipedia.org/wiki/Treble_damages&quot;&gt;Knowingly infringing a patent carries more damages than ignorantly infringing one.&lt;/a&gt; Whatever you're doing, _it violates patents_; only worry about specificity when it happens.&#xD;&#xA;* Don't build up a defensive patent portfolio. It'll just waste your time and money. The nature of a patent troll is that they own many/broad patents, threaten indiscriminately, and don't actually do anything so won't counter-infringe. The MAD strategy defensive portfolios are based on only works if you're capable of destroying the other company, and the other company is rational. Unless you're EA/Activision/etc you can't do the former, and if you're up against a patent troll you can't count on the later. (There are other reasons to build up patent portfolios, like if you want to inflate your company's perceived value to investors - but this road only leads to your patents being used to troll other people in the future.)&#xD;&#xA;* Don't lose sleep over it. Zynga's getting sued. Would you swap your company's financials with Zynga's despite that? I sure would. They are getting sued because someone wants a piece of that gigantic Zynga pie, not because there's a company somewhere actually disadvantaged because Zynga did not license their patent. If you don't have fat stacks of cash, most of those organizations won't come knocking.&#xD;&#xA;&#xD;&#xA;Oh, and&#xD;&#xA;&#xD;&#xA;* Don't be a dick and copy someone else's game wholesale and try to undercut them just because it's probably legal. You'll still be a dick. Take good ideas when you find them, but be open and honest about your influences, and make the game you want to make because it's the game you think is important to make, not because it's the game you think you can get away with." />
  <row Id="37223" PostHistoryTypeId="25" PostId="16188" RevisionGUID="1a20eaa1-aa1c-4ff7-a00a-efaa1dd2d6e7" CreationDate="2011-08-19T21:37:34.627" Comment="http://twitter.com/#!/StackGameDev/status/104668352370315264" />
  <row Id="37224" PostHistoryTypeId="2" PostId="16197" RevisionGUID="8d2577fb-3d88-4eec-a9cc-b43b7af7e92a" CreationDate="2011-08-19T21:49:16.377" UserId="1021" Text="I'm curious about the data structures used when programming older games like Super Mario Brothers for NES and Super Mario World for SNES.  My understanding is that games of this period were written in assembly.  Did the programmers define/use any data structures?&#xD;&#xA;&#xD;&#xA;For example: when a group of coins appears on the screen how are they stored?  Did the programmers just use arrays?  Or perhaps they had linked-lists?&#xD;&#xA;&#xD;&#xA;Cheers!" />
  <row Id="37225" PostHistoryTypeId="1" PostId="16197" RevisionGUID="8d2577fb-3d88-4eec-a9cc-b43b7af7e92a" CreationDate="2011-08-19T21:49:16.377" UserId="1021" Text="Data structures in older games" />
  <row Id="37226" PostHistoryTypeId="3" PostId="16197" RevisionGUID="8d2577fb-3d88-4eec-a9cc-b43b7af7e92a" CreationDate="2011-08-19T21:49:16.377" UserId="1021" Text="&lt;data-structure&gt;&lt;old-school&gt;" />
  <row Id="37227" PostHistoryTypeId="2" PostId="16198" RevisionGUID="f05b7502-3b50-4c23-84d0-3106a485da26" CreationDate="2011-08-19T22:18:14.963" UserId="323" Text="I suspect this is one of those things that isn't elegant, just involves a lot of code. You can try to come up with reasonable building blocks to create attacks. You can try to generalize things massively. But you may spend more time trying to invent generalization than you would just coding it a dubious way, and there's no way you're accomplishing this without a significant chunk of code.&#xD;&#xA;&#xD;&#xA;I'd just start coding new visual effects, either via a branch in your animation method, or via inheritance. Generalize where it makes sense (i.e. it's silly to write &quot;animate fireball hitting enemy&quot; and &quot;animate energy bolt hitting enemy&quot; classes, just write &quot;animate image hitting enemy&quot; and specify the image based on the spell.) As you write more visual effects, look for ways to combine them sensibly into a larger structure. Maybe one will become apparently. Maybe it won't! Maybe it's just annoyingly complex code." />
  <row Id="37228" PostHistoryTypeId="2" PostId="16199" RevisionGUID="520970a8-5308-4af5-a3c9-9ff65456eb13" CreationDate="2011-08-19T22:57:57.193" UserId="118" Text="Here is an interesting discussion on GameDev.net for the Super Mario Bros source code: [Super Mario source code](http://www.gamedev.net/topic/454803-super-mario-source-code/)" />
  <row Id="37229" PostHistoryTypeId="2" PostId="16200" RevisionGUID="8ccc05f0-8d28-46cb-ab12-c8f594d4e297" CreationDate="2011-08-19T23:52:53.063" UserId="1573" Text="Even in the 16-bit days, game consoles were basically just small, embedded computers running realtime software, and the data structures we used are the same ones you'd find anywhere in computer science: arrays, matrices, heaps, trees. Not many linked lists because they're so slow (indirect lookups have a long latency).&#xD;&#xA;&#xD;&#xA;The difference is that before the STL, and with performance so critical, we usually had to write the structures and algorithms ourselves! " />
  <row Id="37230" PostHistoryTypeId="2" PostId="16201" RevisionGUID="225efe6e-3846-479a-9bd0-63d419dd0daa" CreationDate="2011-08-20T00:03:10.270" UserId="4443" Text="Ok, this is just a quick End of Week brain dump&#xD;&#xA;&#xD;&#xA;    // IRenderable is the interface for your renderable components&#xD;&#xA;    public class CmpAnimation : IRenderable&#xD;&#xA;    {&#xD;&#xA;      // Updates the animation, Inherited from IRenderable&#xD;&#xA;      public bool Update(float ElapsedTime);&#xD;&#xA;      // Dumps your data into a render stream or whatever you do to render, Inherited from IRenderable&#xD;&#xA;      public bool Render();&#xD;&#xA;&#xD;&#xA;      // Called from Update when our current frames is &#xD;&#xA;      public bool OnAnimationComplete();&gt; our End Frame value&#xD;&#xA;&#xD;&#xA;      // Some way to load the animation data, either the sprite sheet or a keyframe data file&#xD;&#xA;      public bool LoadAnimation(string AnimationName);&#xD;&#xA;&#xD;&#xA;      // The animation to go to once we are done with this one&#xD;&#xA;      public CmpAnimation NextLinkedAnimation { get; set; }&#xD;&#xA;&#xD;&#xA;      // Loaded values that you may want to change or access at run time&#xD;&#xA;      // The rate at which the animation plays&#xD;&#xA;      public float Rate { get; set; }&#xD;&#xA;      // The frame the animation starts on&#xD;&#xA;      public int BeginFrame { get; set; }&#xD;&#xA;      // The fame the animation ends on&#xD;&#xA;      public int EndFrame { get; set; }&#xD;&#xA;      // Does this animation loop until stopped by some external thing?&#xD;&#xA;      public bool CanLoop { get; set; }&#xD;&#xA;&#xD;&#xA;      // Informational values for internal or external use&#xD;&#xA;      public bool IsAtEnd { get; }&#xD;&#xA;      public bool IsAtStart { get; }&#xD;&#xA;      public bool IsPlaying { get; }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Basically Update() updates its internal state so advance the animation to where it should be for its time stamp, if it reaches the end it should then go to the next animation (mark it as active, deactivate this one.. however you want to do that part based on your component systems flow).&#xD;&#xA;&#xD;&#xA;This lets you put your FSM in to data, the animations know where they exist within the data they have loaded (Good for having a single 'Jump' animation but where you want the jump to have 'Jump', 'Jumping', 'Falling' and 'Landing' at different key frame indexes within that data). &#xD;&#xA;&#xD;&#xA;Again, end of the week brain dump to help get you going in the direction you want to go in :)&#xD;&#xA;&#xD;&#xA;I hope this helps." />
  <row Id="37231" PostHistoryTypeId="5" PostId="16197" RevisionGUID="b7d79c70-fa1d-4498-9e15-e0f21effc298" CreationDate="2011-08-20T00:03:38.727" UserId="1021" Comment="clarification" Text="I'm curious about the data structures used when programming older games like Super Mario Brothers for NES and Super Mario World for SNES.  My understanding is that games of this period were written in assembly.  Did the programmers define/use any data structures?&#xD;&#xA;&#xD;&#xA;For example: when a group of coins appears on the screen how are they stored?  Did the programmers just use arrays?  Or perhaps they had linked-lists?&#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;**Edit**: I'm interested in various approaches... not necessarily a universal approach." />
  <row Id="37232" PostHistoryTypeId="5" PostId="16197" RevisionGUID="e6196e3a-38ce-4412-8da1-d1d4d2dc1bf7" CreationDate="2011-08-20T00:10:34.803" UserId="1021" Comment="more info" Text="I'm curious about the data structures used when programming older games like Super Mario Brothers for NES and Super Mario World for SNES.  My understanding is that games of this period were written in assembly.  Did the programmers define/use any data structures?&#xD;&#xA;&#xD;&#xA;For example: when a group of coins appears on the screen how are they stored?  Did the programmers just use arrays?  Or perhaps they had linked-lists?&#xD;&#xA;&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;**Edit**: I'm interested in various approaches... not necessarily a universal approach.&#xD;&#xA;&#xD;&#xA;**Edit 2**:  In a few of my games I use a (potentially bad) approach towards collections and I want to know if any of the older games used a similar approach.  I like to do the following:&#xD;&#xA;&#xD;&#xA;    // statically allocated arrays (max number of coins is 4)&#xD;&#xA;    int coinsXs[4] = {0, 0, 0, 0};&#xD;&#xA;    int coinsYs[4] = {0, 0, 0, 0};&#xD;&#xA;&#xD;&#xA;    // bitset that keeps track of which coins are active&#xD;&#xA;    int coinsActive = 0;&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    // update the active coins in an update function&#xD;&#xA;    for(int i = 0; i &lt; 4; i++){&#xD;&#xA;        if(coinsActive &amp; (1 &lt;&lt; i)){&#xD;&#xA;            // update ith coin&#xD;&#xA;        }&#xD;&#xA;     }" />
  <row Id="37233" PostHistoryTypeId="5" PostId="16190" RevisionGUID="27973fa1-dc0a-40a3-a239-253ba757606c" CreationDate="2011-08-20T00:15:54.567" UserId="9134" Comment="mis-spelled &quot;grab&quot;" Text="It's reasonably safe to assume that Carmack knows what he's talking about, but you need to realise that he's referring to a very specific problem domain which may not even exist outside of the stuff he's currently working on.  My understanding is that his current engine uses completely dynamic texturing, so obviously the ability to efficiently update dynamic textures is something of a sticking point for him.  The specific capability he's referring to - just being able to grab a pointer to texture memory and write directly to it, instead of having to go through API layers - is what I'll present as evidence for my argument, which is that he's right in the context of the specific problem he's referring to, and may even be right in the general case, but the general case would be to a somewhat significantly lesser degree to his special case." />
  <row Id="37234" PostHistoryTypeId="5" PostId="16200" RevisionGUID="c20eab08-c7fb-4c24-b294-e73ea1608094" CreationDate="2011-08-20T00:24:35.897" UserId="1573" Comment="added 338 characters in body" Text="Even in the 16-bit days, game consoles were basically just small, embedded computers running realtime software, and the data structures we used are the same ones you'd find anywhere in computer science: arrays, matrices, heaps, trees. Not many linked lists because they're so slow (indirect lookups have a long latency).&#xD;&#xA;&#xD;&#xA;The difference is that before the STL, and with performance so critical, we usually had to write the structures and algorithms ourselves! &#xD;&#xA;&#xD;&#xA;David Braben did [a fun lecture][1] at the 2011 GDC where he talked about all the crazy tricks he used to fit *[Elite][2]* onto a [BBC Micro][3] in 1984. [You can watch it for free at the GDC Vault][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gdcvault.com/play/1014628/Classic-Game-Postmortem&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Elite_%28game%29&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/BBC_Micro&#xD;&#xA;  [4]: http://www.gdcvault.com/play/1014628/Classic-Game-Postmortem" />
  <row Id="37235" PostHistoryTypeId="2" PostId="16202" RevisionGUID="63923a88-0c37-4579-86b6-9591e0c8759f" CreationDate="2011-08-20T00:34:59.760" UserId="6362" Text="Like mentioned above, it really depends on the way you wrote your code. &#xD;&#xA;But this seems like a general method that woudn't be too hard to implement:&#xD;&#xA;&#xD;&#xA;(Pseudo code)&#xD;&#xA;&#xD;&#xA;        public class User {&#xD;&#xA;    	&#xD;&#xA;    	&#xD;&#xA;    	public void ExecuteAttack(Enemy target, string selectedAttack){&#xD;&#xA;    		&#xD;&#xA;    		//calculates damage&#xD;&#xA;    		int dmg = (baseDamge * somedamageformula);&#xD;&#xA;    		Animation animation = AttackDictionary.getAnimation(name)&#xD;&#xA;    		&#xD;&#xA;    		Animator.animateAttack(animation, damage); //executes the animation, might want to show damage number in animation&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    public class battle{&#xD;&#xA;    	&#xD;&#xA;    	array enemies;&#xD;&#xA;    	array party;&#xD;&#xA;    	//etc&#xD;&#xA;    	&#xD;&#xA;    	public void ExecuteAttack(PartyMember user, Enemy target){&#xD;&#xA;    		&#xD;&#xA;    		user.attack(target, selectedAttack);&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	private void animationComplete(e Event){&#xD;&#xA;    		&#xD;&#xA;    		nextTurn();&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    public class AttackDictionary{&#xD;&#xA;    &#xD;&#xA;    	enum attacks{&#xD;&#xA;    		&#xD;&#xA;    		//long list of all atacks, could be an array an enem or you could collect it from xml or whatevr&#xD;&#xA;    	}&#xD;&#xA;    	&#xD;&#xA;    	public static void getAnimation(String attackname){&#xD;&#xA;&#xD;&#xA;    //you could prevent a big switch statement by using xml or a different method that&#xD;&#xA;    //allows you to couple info in 1 item (associative array for example)&#xD;&#xA;    		switch attacks.attackname{&#xD;&#xA;    		&#xD;&#xA;    			case attacks.slash{&#xD;&#xA;    				&#xD;&#xA;    				return new slashanimation.png; //return the animation (spritesheet, model etc)&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm not saying that this is the best method, this just what I would have done :)" />
  <row Id="37236" PostHistoryTypeId="25" PostId="16197" RevisionGUID="822d6329-9dd7-4083-8992-29a504894f22" CreationDate="2011-08-20T00:37:35.550" Comment="http://twitter.com/#!/StackGameDev/status/104713655525982208" />
  <row Id="37237" PostHistoryTypeId="2" PostId="16203" RevisionGUID="94dc26dc-5892-4c91-88e2-66788e4338b8" CreationDate="2011-08-20T00:47:09.757" UserId="9372" Text="Completely read Head First C#. &#xD;&#xA;&#xD;&#xA;Should I read something else or get personal with XNA from here on? &lt;strike&gt;Got links?&lt;/strike&gt;&#xD;&#xA;" />
  <row Id="37238" PostHistoryTypeId="1" PostId="16203" RevisionGUID="94dc26dc-5892-4c91-88e2-66788e4338b8" CreationDate="2011-08-20T00:47:09.757" UserId="9372" Text="Pickup another book or submerge into XNA" />
  <row Id="37239" PostHistoryTypeId="3" PostId="16203" RevisionGUID="94dc26dc-5892-4c91-88e2-66788e4338b8" CreationDate="2011-08-20T00:47:09.757" UserId="9372" Text="&lt;xna&gt;&lt;c#&gt;&lt;2d&gt;&lt;programming&gt;&lt;2.5d&gt;" />
  <row Id="37240" PostHistoryTypeId="5" PostId="16203" RevisionGUID="790d8cee-ef04-4051-94e7-0367d9fd7dec" CreationDate="2011-08-20T01:06:38.587" UserId="9372" Comment="added 182 characters in body; deleted 1 characters in body" Text="Completely read Head First C#. &#xD;&#xA;&#xD;&#xA;Should I read something else or get personal with XNA from here on? &lt;strike&gt;Got links?&lt;/strike&gt;&#xD;&#xA;&#xD;&#xA;Edit: Hobby. Interested in 2D and 2.5D gamedev for personal fun, nothing serious. Multiplayer(in 2D/2.5D games) is also a very interesting topic for me. Basically not sure where to go now from here." />
  <row Id="37241" PostHistoryTypeId="2" PostId="16204" RevisionGUID="5b2b0332-1b5a-4240-b284-55761e531c4b" CreationDate="2011-08-20T01:18:46.383" UserId="118" Text="Well, start programming! &#xD;&#xA;&#xD;&#xA;You can google for some basic tutorials to get you started, but if you don't know with what game to start, this answer is a great starting point: [What are good games to &quot;earn your wings&quot; with?](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with/862#862)&#xD;&#xA;&#xD;&#xA;As for books, I would suggest you start from something like [XNA 4.0 Game Development by Example: Beginner's Guide](http://www.amazon.com/XNA-4-0-Game-Development-Example/dp/1849690669/ref=sr_1_3?ie=UTF8&amp;qid=1313802908&amp;sr=8-3) and then move to [Microsoft XNA Game Studio 3.0 Unleashed](http://www.amazon.com/Microsoft-XNA-Game-Studio-Unleashed/dp/0672330229/ref=sr_1_12?ie=UTF8&amp;qid=1313802908&amp;sr=8-12)&#xD;&#xA;&#xD;&#xA;Personally, I would get my hands dirty and then move on reading a book for more advanced topics." />
  <row Id="37242" PostHistoryTypeId="2" PostId="16205" RevisionGUID="b74c1b9d-7a0f-4fd6-b549-fea4be7919ec" CreationDate="2011-08-20T01:31:20.960" UserId="288" Text="Setting a render target will clear it by default, as this is the only fast path on Xbox 360.&#xD;&#xA;&#xD;&#xA;You can adjust this by setting the appropriate `RenderTargetUsage`.&#xD;&#xA;&#xD;&#xA;&lt;a href=&quot;http://blogs.msdn.com/b/shawnhar/archive/2007/11/21/rendertarget-changes-in-xna-game-studio-2-0.aspx&quot;&gt;See this blog post for details&lt;/a&gt;." />
  <row Id="37243" PostHistoryTypeId="2" PostId="16206" RevisionGUID="6189cef8-0816-4cd7-b27d-1685e8cd7ffb" CreationDate="2011-08-20T01:46:03.950" UserId="2749" Text="When I first created my code, there were quite a few cases where I would get horizontal and vertical gaps between tiles when displayed. I put this down to rounding issues with `float`s and just moved on to other things. Now that I've revisited the issue, I can't seem to get it working properly, even after trying my hardest to eliminate places where this sort of issue might happen. It seems to only happen when I place the camera at certain positions, which is why I think it's likely to be a `float` issue. If anyone could help me with the correct way to draw the tile layout, it'd be much appreciated.&#xD;&#xA;&#xD;&#xA;This is my drawing method for the map:&#xD;&#xA;&#xD;&#xA;    public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)&#xD;&#xA;    {&#xD;&#xA;        var topLeft = Camera.ScreenCoordinateToWorld(new Vector2(0, 0));&#xD;&#xA;        // Readjust the position of the topLeft element so we get the actual &#xD;&#xA;        // drawing position for the tile here&#xD;&#xA;        topLeft = new WorldCoordinate(topLeft.X - 1, topLeft.Y - 1, &#xD;&#xA;                                      -TileSize / 2, -TileSize / 2);&#xD;&#xA;        var topLeftDrawPosition = topLeft.DrawPosition;&#xD;&#xA;        var screenWidthInTiles = Game.GraphicsDevice.Viewport.Width / TileSize + 1;&#xD;&#xA;        var screenHeightInTiles = Game.GraphicsDevice.Viewport.Height / TileSize + 1;&#xD;&#xA;&#xD;&#xA;        for (var y = topLeft.Y; y &lt;= topLeft.Y + screenHeightInTiles; y++)&#xD;&#xA;        {&#xD;&#xA;            for (var x = topLeft.X; x &lt;= topLeft.X + screenWidthInTiles; x++)&#xD;&#xA;            {&#xD;&#xA;                if (x &lt; 0 || y &lt; 0 || y &gt;= MapData.Count || x &gt;= MapData[y].Count)&#xD;&#xA;                {&#xD;&#xA;                    // Ignore out of range tiles to avoid exceptions&#xD;&#xA;                    continue;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                var tile = MapData[y][x];&#xD;&#xA;                var drawPosition = topLeftDrawPosition + &#xD;&#xA;                                   new Vector2((x - topLeft.X)*TileSize, &#xD;&#xA;                                               (y - topLeft.Y)*TileSize);&#xD;&#xA;                Tileset[tile].Draw(spriteBatch, drawPosition);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        base.Draw(gameTime, spriteBatch);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Broken:&#xD;&#xA;&#xD;&#xA;![Screenshot of broken rendering][1]&#xD;&#xA;&#xD;&#xA;Semi-working:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/XSo3m.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/nUcyX.png" />
  <row Id="37244" PostHistoryTypeId="1" PostId="16206" RevisionGUID="6189cef8-0816-4cd7-b27d-1685e8cd7ffb" CreationDate="2011-08-20T01:46:03.950" UserId="2749" Text="How to get map tiles to line up nicely?" />
  <row Id="37245" PostHistoryTypeId="3" PostId="16206" RevisionGUID="6189cef8-0816-4cd7-b27d-1685e8cd7ffb" CreationDate="2011-08-20T01:46:03.950" UserId="2749" Text="&lt;xna&gt;&lt;2d&gt;" />
  <row Id="37246" PostHistoryTypeId="5" PostId="16204" RevisionGUID="5dd56edd-7456-44d3-95d5-4596cb0ff75b" CreationDate="2011-08-20T02:04:25.623" UserId="118" Comment="wrong book" Text="Well, start programming! &#xD;&#xA;&#xD;&#xA;You can google for some basic tutorials to get you started, but if you don't know with what game to start, this answer is a great starting point: [What are good games to &quot;earn your wings&quot; with?](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with/862#862)&#xD;&#xA;&#xD;&#xA;As for books, I would suggest you start from something like [Building XNA 2.0 Games: A Practical Guide for Independent Game Development](http://www.amazon.com/Building-XNA-2-0-Games-Professionals/dp/1430209798/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1313805808&amp;sr=1-1) and then move to [Microsoft XNA Game Studio 3.0 Unleashed](http://www.amazon.com/Microsoft-XNA-Game-Studio-Unleashed/dp/0672330229/ref=sr_1_12?ie=UTF8&amp;qid=1313802908&amp;sr=8-12)&#xD;&#xA;&#xD;&#xA;Personally, I would get my hands dirty and then move on reading a book for more advanced topics." />
  <row Id="37247" PostHistoryTypeId="8" PostId="16204" RevisionGUID="a68f0d75-13a3-4a68-80df-853cc3c7e03d" CreationDate="2011-08-20T02:05:52.327" UserId="118" Comment="Rollback to [5b2b0332-1b5a-4240-b284-55761e531c4b]" Text="Well, start programming! &#xD;&#xA;&#xD;&#xA;You can google for some basic tutorials to get you started, but if you don't know with what game to start, this answer is a great starting point: [What are good games to &quot;earn your wings&quot; with?](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with/862#862)&#xD;&#xA;&#xD;&#xA;As for books, I would suggest you start from something like [XNA 4.0 Game Development by Example: Beginner's Guide](http://www.amazon.com/XNA-4-0-Game-Development-Example/dp/1849690669/ref=sr_1_3?ie=UTF8&amp;qid=1313802908&amp;sr=8-3) and then move to [Microsoft XNA Game Studio 3.0 Unleashed](http://www.amazon.com/Microsoft-XNA-Game-Studio-Unleashed/dp/0672330229/ref=sr_1_12?ie=UTF8&amp;qid=1313802908&amp;sr=8-12)&#xD;&#xA;&#xD;&#xA;Personally, I would get my hands dirty and then move on reading a book for more advanced topics." />
  <row Id="37248" PostHistoryTypeId="5" PostId="16204" RevisionGUID="8721f471-7bf9-4e83-b352-0e1f2ba57ec2" CreationDate="2011-08-20T02:06:09.487" UserId="118" Comment="added 42 characters in body" Text="Well, start programming! &#xD;&#xA;&#xD;&#xA;You can google for some basic tutorials to get you started, but if you don't know with what game to start, this answer is a great starting point: [What are good games to &quot;earn your wings&quot; with?](http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with/862#862)&#xD;&#xA;&#xD;&#xA;As for books, I would suggest you start from something like [XNA 4.0 Game Development by Example: Beginner's Guide](http://www.amazon.com/XNA-4-0-Game-Development-Example/dp/1849690669/ref=sr_1_3?ie=UTF8&amp;qid=1313802908&amp;sr=8-3) and then move to [Building XNA 2.0 Games: A Practical Guide for Independent Game Development](http://www.amazon.com/Building-XNA-2-0-Games-Professionals/dp/1430209798/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1313805808&amp;sr=1-1)&#xD;&#xA;&#xD;&#xA;Personally, I would get my hands dirty and then move on reading a book for more advanced topics." />
  <row Id="37249" PostHistoryTypeId="2" PostId="16207" RevisionGUID="c8df3c75-a6ec-41cd-8e93-8d3f57674190" CreationDate="2011-08-20T03:01:35.593" UserId="9021" Text="Could any body covert this code to android&#xD;&#xA;--------------------------------------------------&#xD;&#xA;&#xD;&#xA;- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;    if (_mouseJoint != NULL) return;&#xD;&#xA; &#xD;&#xA;    UITouch *myTouch = [touches anyObject];&#xD;&#xA;    CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;    location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;    b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;    if (_paddleFixture-&gt;TestPoint(locationWorld)) {&#xD;&#xA;        b2MouseJointDef md;&#xD;&#xA;        md.bodyA = _groundBody;&#xD;&#xA;        md.bodyB = _paddleBody;&#xD;&#xA;        md.target = locationWorld;&#xD;&#xA;        md.collideConnected = true;&#xD;&#xA;        md.maxForce = 1000.0f * _paddleBody-&gt;GetMass();&#xD;&#xA; &#xD;&#xA;        _mouseJoint = (b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);&#xD;&#xA;        _paddleBody-&gt;SetAwake(true);&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;-(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;    if (_mouseJoint == NULL) return;&#xD;&#xA; &#xD;&#xA;    UITouch *myTouch = [touches anyObject];&#xD;&#xA;    CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;    location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;    b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;    _mouseJoint-&gt;SetTarget(locationWorld);&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;-(void)ccTouchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;    if (_mouseJoint) {&#xD;&#xA;        _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA; &#xD;&#xA;- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA;    if (_mouseJoint) {&#xD;&#xA;        _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;    }  &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below i tried but it is giving the null pointer exception Glthread 8&#xD;&#xA;--------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;public boolean ccTouchesBegan(MotionEvent event) {&#xD;&#xA;			 if (_mouseJoint != null){ &#xD;&#xA;				 return true;&#xD;&#xA;				&#xD;&#xA;			}&#xD;&#xA;			 else{&#xD;&#xA;				&#xD;&#xA;				 &#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 &#xD;&#xA;			 // return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			   //_mouseJoint.setTarget(locationWorld);&#xD;&#xA;						 &#xD;&#xA;			if(_paddleFixture.testPoint(locationWorld)){&#xD;&#xA;				Log.v(&quot;MyActivity&quot;, &quot;this is testing&quot;);&#xD;&#xA;				 MouseJointDef md = new MouseJointDef();&#xD;&#xA;				 md.bodyA = _body;&#xD;&#xA;				 md.bodyB = _paddleBody;&#xD;&#xA;				 md.target.set(locationWorld);&#xD;&#xA;				 md.collideConnected = true;&#xD;&#xA;				 md.maxForce = (float)(1000.0f * _paddleBody.getMass());&#xD;&#xA;				 _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;				 _paddleBody.setAwake(true);&#xD;&#xA;			 }&#xD;&#xA;			return true;&#xD;&#xA;			}&#xD;&#xA;		 //return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		@Override&#xD;&#xA;		public boolean ccTouchesMoved(MotionEvent event){&#xD;&#xA;			&#xD;&#xA;			 if (_mouseJoint == null) return true;&#xD;&#xA;			  	&#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 _mouseJoint.setTarget(locationWorld);&#xD;&#xA;			 return true;&#xD;&#xA;		}&#xD;&#xA;		@Override&#xD;&#xA;		public boolean ccTouchesEnded(MotionEvent event)&#xD;&#xA;		{&#xD;&#xA;			 if (_mouseJoint != null) {&#xD;&#xA;			        _world.destroyJoint(_mouseJoint);&#xD;&#xA;			        _mouseJoint = null;&#xD;&#xA;			    }&#xD;&#xA;			 &#xD;&#xA;			 return true;&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;		public boolean ccTouchesCancelled(MotionEvent event)&#xD;&#xA;		{&#xD;&#xA;			 if (_mouseJoint != null) {&#xD;&#xA;			        _world.destroyJoint(_mouseJoint);&#xD;&#xA;			        _mouseJoint = null;&#xD;&#xA;			    }&#xD;&#xA;			 &#xD;&#xA;			 return true;&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;I am using this tutorial&#xD;&#xA;http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12 &#xD;&#xA;can somebody help me to convert it in java android.&#xD;&#xA;Thanks in advance. Sorry for my english also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37250" PostHistoryTypeId="1" PostId="16207" RevisionGUID="c8df3c75-a6ec-41cd-8e93-8d3f57674190" CreationDate="2011-08-20T03:01:35.593" UserId="9021" Text="Code conversion" />
  <row Id="37251" PostHistoryTypeId="3" PostId="16207" RevisionGUID="c8df3c75-a6ec-41cd-8e93-8d3f57674190" CreationDate="2011-08-20T03:01:35.593" UserId="9021" Text="&lt;android&gt;" />
  <row Id="37252" PostHistoryTypeId="25" PostId="16206" RevisionGUID="f6cbf8e3-bb6c-4c2d-9fc5-0f0a78049dcb" CreationDate="2011-08-20T03:37:37.183" Comment="http://twitter.com/#!/StackGameDev/status/104758960069947393" />
  <row Id="37253" PostHistoryTypeId="5" PostId="16207" RevisionGUID="f1edf444-ba29-4425-b773-f25abc72fc88" CreationDate="2011-08-20T03:41:36.493" UserId="9255" Comment="Indented code to fix code block display" Text="Could any body covert this code to android&#xD;&#xA;--------------------------------------------------&#xD;&#xA;&#xD;&#xA;    - (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;      if (_mouseJoint != NULL) return;&#xD;&#xA; &#xD;&#xA;      UITouch *myTouch = [touches anyObject];&#xD;&#xA;      CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;      location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;      b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;      if (_paddleFixture-&gt;TestPoint(locationWorld)) {&#xD;&#xA;        b2MouseJointDef md;&#xD;&#xA;        md.bodyA = _groundBody;&#xD;&#xA;        md.bodyB = _paddleBody;&#xD;&#xA;        md.target = locationWorld;&#xD;&#xA;        md.collideConnected = true;&#xD;&#xA;        md.maxForce = 1000.0f * _paddleBody-&gt;GetMass();&#xD;&#xA; &#xD;&#xA;        _mouseJoint = (b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);&#xD;&#xA;        _paddleBody-&gt;SetAwake(true);&#xD;&#xA;      }&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;    -(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;      if (_mouseJoint == NULL) return;&#xD;&#xA; &#xD;&#xA;      UITouch *myTouch = [touches anyObject];&#xD;&#xA;      CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;      location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;      b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;      _mouseJoint-&gt;SetTarget(locationWorld);&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;    -(void)ccTouchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;      if (_mouseJoint) {&#xD;&#xA;        _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;      }&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;    - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA;      if (_mouseJoint) {&#xD;&#xA;        _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;      }  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below i tried but it is giving the null pointer exception Glthread 8&#xD;&#xA;--------------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;public boolean ccTouchesBegan(MotionEvent event) {&#xD;&#xA;			 if (_mouseJoint != null){ &#xD;&#xA;				 return true;&#xD;&#xA;				&#xD;&#xA;			}&#xD;&#xA;			 else{&#xD;&#xA;				&#xD;&#xA;				 &#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 &#xD;&#xA;			 // return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			   //_mouseJoint.setTarget(locationWorld);&#xD;&#xA;						 &#xD;&#xA;			if(_paddleFixture.testPoint(locationWorld)){&#xD;&#xA;				Log.v(&quot;MyActivity&quot;, &quot;this is testing&quot;);&#xD;&#xA;				 MouseJointDef md = new MouseJointDef();&#xD;&#xA;				 md.bodyA = _body;&#xD;&#xA;				 md.bodyB = _paddleBody;&#xD;&#xA;				 md.target.set(locationWorld);&#xD;&#xA;				 md.collideConnected = true;&#xD;&#xA;				 md.maxForce = (float)(1000.0f * _paddleBody.getMass());&#xD;&#xA;				 _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;				 _paddleBody.setAwake(true);&#xD;&#xA;			 }&#xD;&#xA;			return true;&#xD;&#xA;			}&#xD;&#xA;		 //return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		@Override&#xD;&#xA;		public boolean ccTouchesMoved(MotionEvent event){&#xD;&#xA;			&#xD;&#xA;			 if (_mouseJoint == null) return true;&#xD;&#xA;			  	&#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 _mouseJoint.setTarget(locationWorld);&#xD;&#xA;			 return true;&#xD;&#xA;		}&#xD;&#xA;		@Override&#xD;&#xA;		public boolean ccTouchesEnded(MotionEvent event)&#xD;&#xA;		{&#xD;&#xA;			 if (_mouseJoint != null) {&#xD;&#xA;			        _world.destroyJoint(_mouseJoint);&#xD;&#xA;			        _mouseJoint = null;&#xD;&#xA;			    }&#xD;&#xA;			 &#xD;&#xA;			 return true;&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;		public boolean ccTouchesCancelled(MotionEvent event)&#xD;&#xA;		{&#xD;&#xA;			 if (_mouseJoint != null) {&#xD;&#xA;			        _world.destroyJoint(_mouseJoint);&#xD;&#xA;			        _mouseJoint = null;&#xD;&#xA;			    }&#xD;&#xA;			 &#xD;&#xA;			 return true;&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;I am using this tutorial&#xD;&#xA;http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12 &#xD;&#xA;can somebody help me to convert it in java android.&#xD;&#xA;Thanks in advance. Sorry for my english also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37254" PostHistoryTypeId="24" PostId="16207" RevisionGUID="f1edf444-ba29-4425-b773-f25abc72fc88" CreationDate="2011-08-20T03:41:36.493" Comment="Proposed by 9255 approved by -1 edit id of 660" />
  <row Id="37255" PostHistoryTypeId="5" PostId="16207" RevisionGUID="e81db338-11ac-4b9b-be20-7390952756cc" CreationDate="2011-08-20T03:41:36.743" UserId="953" Comment="Indented code to fix code block display, fixed spelling and grammar" Text="Could anybody convert this code to Android?&#xD;&#xA;&#xD;&#xA;iPhone:&#xD;&#xA;&#xD;&#xA;    -(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;      if (_mouseJoint != NULL) return;&#xD;&#xA; &#xD;&#xA;      UITouch *myTouch = [touches anyObject];&#xD;&#xA;      CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;      location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;      b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;      if (_paddleFixture-&gt;TestPoint(locationWorld)) {&#xD;&#xA;        b2MouseJointDef md;&#xD;&#xA;        md.bodyA = _groundBody;&#xD;&#xA;        md.bodyB = _paddleBody;&#xD;&#xA;        md.target = locationWorld;&#xD;&#xA;        md.collideConnected = true;&#xD;&#xA;        md.maxForce = 1000.0f * _paddleBody-&gt;GetMass();&#xD;&#xA; &#xD;&#xA;        _mouseJoint = (b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);&#xD;&#xA;        _paddleBody-&gt;SetAwake(true);&#xD;&#xA;      }&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;    -(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;      if (_mouseJoint == NULL) return;&#xD;&#xA; &#xD;&#xA;      UITouch *myTouch = [touches anyObject];&#xD;&#xA;      CGPoint location = [myTouch locationInView:[myTouch view]];&#xD;&#xA;      location = [[CCDirector sharedDirector] convertToGL:location];&#xD;&#xA;      b2Vec2 locationWorld = b2Vec2(location.x/PTM_RATIO, location.y/PTM_RATIO);&#xD;&#xA; &#xD;&#xA;      _mouseJoint-&gt;SetTarget(locationWorld);&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;    -(void)ccTouchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA; &#xD;&#xA;      if (_mouseJoint) {&#xD;&#xA;        _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;      }&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;    - (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {&#xD;&#xA;      if (_mouseJoint) {&#xD;&#xA;        _world-&gt;DestroyJoint(_mouseJoint);&#xD;&#xA;        _mouseJoint = NULL;&#xD;&#xA;      }  &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below I tried converting it to Java for Android but it is giving the null pointer exception &quot;Glthread 8&quot;&#xD;&#xA;&#xD;&#xA;    public boolean ccTouchesBegan(MotionEvent event) {&#xD;&#xA;		 if (_mouseJoint != null){ &#xD;&#xA;			 return true;&#xD;&#xA;				&#xD;&#xA;		}&#xD;&#xA;		 else{&#xD;&#xA;				&#xD;&#xA;				 &#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 &#xD;&#xA;			 // return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			   //_mouseJoint.setTarget(locationWorld);&#xD;&#xA;						 &#xD;&#xA;			if(_paddleFixture.testPoint(locationWorld)){&#xD;&#xA;				Log.v(&quot;MyActivity&quot;, &quot;this is testing&quot;);&#xD;&#xA;				 MouseJointDef md = new MouseJointDef();&#xD;&#xA;				 md.bodyA = _body;&#xD;&#xA;				 md.bodyB = _paddleBody;&#xD;&#xA;				 md.target.set(locationWorld);&#xD;&#xA;				 md.collideConnected = true;&#xD;&#xA;				 md.maxForce = (float)(1000.0f * _paddleBody.getMass());&#xD;&#xA;				 _mouseJoint =  (MouseJoint) _world.createJoint(md);&#xD;&#xA;				 _paddleBody.setAwake(true);&#xD;&#xA;			 }&#xD;&#xA;			return true;&#xD;&#xA;			}&#xD;&#xA;		 //return CCTouchDispatcher.kEventHandled;&#xD;&#xA;			&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		@Override&#xD;&#xA;		public boolean ccTouchesMoved(MotionEvent event){&#xD;&#xA;			&#xD;&#xA;			 if (_mouseJoint == null) return true;&#xD;&#xA;			  	&#xD;&#xA;			 CGPoint convertedLocation = CCDirector.sharedDirector().convertToGL(CGPoint.make(event.getX(), event.getY()));&#xD;&#xA;			 Vector2 locationWorld = new Vector2(convertedLocation.x/PTM_RATIO, convertedLocation.y/PTM_RATIO);&#xD;&#xA;			 _mouseJoint.setTarget(locationWorld);&#xD;&#xA;			 return true;&#xD;&#xA;		}&#xD;&#xA;		@Override&#xD;&#xA;		public boolean ccTouchesEnded(MotionEvent event)&#xD;&#xA;		{&#xD;&#xA;			 if (_mouseJoint != null) {&#xD;&#xA;			        _world.destroyJoint(_mouseJoint);&#xD;&#xA;			        _mouseJoint = null;&#xD;&#xA;			    }&#xD;&#xA;			 &#xD;&#xA;			 return true;&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;		public boolean ccTouchesCancelled(MotionEvent event)&#xD;&#xA;		{&#xD;&#xA;			 if (_mouseJoint != null) {&#xD;&#xA;			        _world.destroyJoint(_mouseJoint);&#xD;&#xA;			        _mouseJoint = null;&#xD;&#xA;			    }&#xD;&#xA;			 &#xD;&#xA;			 return true;&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;I am using this tutorial&#xD;&#xA;http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12 &#xD;&#xA;can somebody help me to convert it in java android.&#xD;&#xA;Thanks in advance. Sorry for my english also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37256" PostHistoryTypeId="2" PostId="16208" RevisionGUID="a396d7da-713e-4c6d-be20-66b3c00ddf54" CreationDate="2011-08-20T05:53:04.763" UserId="2933" Text="I've ported my engine to iOS and have been using the C++ version of Box2D. Everything runs fine except on collisions, it seems Box2D and Farseer handle collisions somewhat differently.&#xD;&#xA;&#xD;&#xA;Anyone know what these differences are exactly and if I can disable the difference and make them mimic one another?&#xD;&#xA;&#xD;&#xA;Initial behaviours tend to be fine, for example falling speeds and the first moment of impact both cases exhibit the exact same behaviour, velocities etc. &#xD;&#xA;&#xD;&#xA;Just after the first impact is resolved however the second impact (which occurs as a result of bodies being bumped around) is different. box2d records a higher velocity on a second collision than the first and shows less 'bounce back' from the collision.&#xD;&#xA;&#xD;&#xA;Velocity, position iterations are the same, as are the bodies masses, densities etc. Pretty sure everything in Farseer.Settings matches up with Box2Ds settings." />
  <row Id="37257" PostHistoryTypeId="1" PostId="16208" RevisionGUID="a396d7da-713e-4c6d-be20-66b3c00ddf54" CreationDate="2011-08-20T05:53:04.763" UserId="2933" Text="What's the difference with how Box2D and Farseer behave in terms of collisions?" />
  <row Id="37258" PostHistoryTypeId="3" PostId="16208" RevisionGUID="a396d7da-713e-4c6d-be20-66b3c00ddf54" CreationDate="2011-08-20T05:53:04.763" UserId="2933" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;farseer-physics-engine&gt;&lt;porting&gt;&lt;windows-phone&gt;" />
  <row Id="37259" PostHistoryTypeId="2" PostId="16209" RevisionGUID="bda41cf2-552d-45bd-be8b-15acfc1a3609" CreationDate="2011-08-20T06:00:34.723" UserId="998" Text="It looks like the TEXTURE WRAP mode is wrong.  You want to set it to CLAMP.  See [Texture address mode](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.textureaddressmode.aspx)." />
  <row Id="37260" PostHistoryTypeId="10" PostId="16207" RevisionGUID="eb75456f-550a-44ce-bd46-7a074aa638ae" CreationDate="2011-08-20T06:01:50.850" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37264" PostHistoryTypeId="25" PostId="16176" RevisionGUID="6c0a6a20-b3a1-4861-b59e-38afb0b1e25d" CreationDate="2011-08-20T06:37:37.780" Comment="http://twitter.com/#!/StackGameDev/status/104804261216518144" />
  <row Id="37265" PostHistoryTypeId="2" PostId="16211" RevisionGUID="47e941aa-5246-4f86-8caf-19160e995eaa" CreationDate="2011-08-20T08:00:20.407" UserId="2749" Text="One method I've discovered to fix this is to use a two-pass approach; first render the tiles onto a texture, then render the texture in the correct place. This seems to be mildly more expensive, as you'd expect, but does the job perfectly.&#xD;&#xA;&#xD;&#xA;    public override void LoadContent()&#xD;&#xA;    {&#xD;&#xA;        MapSprite = new RenderTarget2D(Game.GraphicsDevice, ScreenWidthInTiles * TileSize, ScreenHeightInTiles * TileSize, true, Game.GraphicsDevice.DisplayMode.Format, DepthFormat.Depth24);&#xD;&#xA;        MapSpriteBatch = new SpriteBatch(Game.GraphicsDevice);&#xD;&#xA;&#xD;&#xA;        base.LoadContent();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)&#xD;&#xA;    {&#xD;&#xA;        var topLeft = Camera.ScreenCoordinateToWorld(Vector2.Zero);&#xD;&#xA;        // Readjust the position of the topLeft element so we get the actual drawing position for the tile here&#xD;&#xA;        var topLeftTile = new WorldCoordinate(topLeft.X - 1, topLeft.Y - 1, -TileSize / 2, -TileSize / 2);&#xD;&#xA;        Vector2 drawPosition;&#xD;&#xA;            &#xD;&#xA;        Game.GraphicsDevice.SetRenderTarget(MapSprite);&#xD;&#xA;        Game.GraphicsDevice.Clear(Color.Black);&#xD;&#xA;&#xD;&#xA;        MapSpriteBatch.Begin();&#xD;&#xA;&#xD;&#xA;        for (var y = topLeftTile.Y; y &lt;= topLeftTile.Y + ScreenHeightInTiles; y++)&#xD;&#xA;        {&#xD;&#xA;            for (var x = topLeftTile.X; x &lt;= topLeftTile.X + ScreenWidthInTiles; x++)&#xD;&#xA;            {&#xD;&#xA;                if (x &lt; 0 || y &lt; 0 || y &gt;= MapData.Count || x &gt;= MapData[y].Count)&#xD;&#xA;                {&#xD;&#xA;                    // Ignore out of range tiles to avoid exceptions&#xD;&#xA;                    continue;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                var tile = MapData[y][x];&#xD;&#xA;                drawPosition = new Vector2((x - topLeftTile.X)*TileSize,&#xD;&#xA;                                            (y - topLeftTile.Y)*TileSize);&#xD;&#xA;                Tileset[tile].Draw(MapSpriteBatch, drawPosition);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        MapSpriteBatch.End();&#xD;&#xA;        Game.GraphicsDevice.SetRenderTarget(null);&#xD;&#xA;&#xD;&#xA;        // Render the result into the right place. First push the sprite up into the top left corner&#xD;&#xA;        drawPosition = Camera.Position.DrawPosition - Game1.ScreenCentre - &#xD;&#xA;                        // The account for the offset of the camera&#xD;&#xA;                        topLeft.Offset -&#xD;&#xA;                        // And account for centering issues&#xD;&#xA;                        new Vector2(TileSize*1.5f);&#xD;&#xA;        spriteBatch.Draw(MapSprite, drawPosition, null, Color.White, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 1.0f);&#xD;&#xA;            &#xD;&#xA;        base.Draw(gameTime, spriteBatch);&#xD;&#xA;    }" />
  <row Id="37266" PostHistoryTypeId="2" PostId="16212" RevisionGUID="17f46ca9-e0c7-41bf-ba1b-6e553abd9a61" CreationDate="2011-08-20T08:08:51.720" UserId="865" Text="Disclaimer: I am a professional games programmer, and use quaternions most days but they are close to black magic to me. I am relatively at home with math but imaginary numbers always confused me. I tend to treat quats as useful and end up reversing multiplications more than once. I try to reason about them like I would with matrices with limited success.&#xD;&#xA;&#xD;&#xA;Anyhow....&#xD;&#xA;&#xD;&#xA;What baffles me, is the following.&#xD;&#xA;When I want to rotate an object around it's local axis I multiply its rotation with the quaternion that represents the rotation I want to apply. It is therefore a rotation in local space.&#xD;&#xA;&#xD;&#xA;Now if I want to rotate it around an axis in world space, my reasoning would be:&#xD;&#xA;Take the rotation in world space as a quaternion.&#xD;&#xA;Multiply the inverse of my object rotation with this quaternion. This will bring my world rotation in local space.&#xD;&#xA;Multiply my rotation with this new quaternion.&#xD;&#xA;ie: newRot = oldRot * (inverse oldRot * worldRot)&#xD;&#xA;&#xD;&#xA;However, what I need to do is&#xD;&#xA;newRot = oldRot * (inverse oldRot * worldRot) * oldRot.&#xD;&#xA;&#xD;&#xA;Why do I, after multiplying with the inverse quat still need to multiply with my own quat before applying it? I know there must be a perfect valid reason, but I can't reason my way out of it and it's frustrating as heck to me. I tried the various faqs and whatnot, but most go to deep in the math, making it less clear to me.&#xD;&#xA;&#xD;&#xA;Anyone who can explain this to me like I'm a 5 year old?&#xD;&#xA;" />
  <row Id="37267" PostHistoryTypeId="1" PostId="16212" RevisionGUID="17f46ca9-e0c7-41bf-ba1b-6e553abd9a61" CreationDate="2011-08-20T08:08:51.720" UserId="865" Text="Quaternions and rotation around world axis" />
  <row Id="37268" PostHistoryTypeId="3" PostId="16212" RevisionGUID="17f46ca9-e0c7-41bf-ba1b-6e553abd9a61" CreationDate="2011-08-20T08:08:51.720" UserId="865" Text="&lt;quaternion&gt;" />
  <row Id="37269" PostHistoryTypeId="25" PostId="16212" RevisionGUID="22de4953-3822-45c8-b517-a19c7ca97f3b" CreationDate="2011-08-20T09:37:37.737" Comment="http://twitter.com/#!/StackGameDev/status/104849560303702016" />
  <row Id="37270" PostHistoryTypeId="2" PostId="16213" RevisionGUID="8099434b-196a-49fd-a2a6-4536194f6ee7" CreationDate="2011-08-20T11:42:21.673" UserId="1742" Text="Quaternions are associative:&#xD;&#xA;&#xD;&#xA;you mention that your solution is:&#xD;&#xA;&#xD;&#xA;    newRot = oldRot * (inverse oldRot * worldRot) * oldRot&#xD;&#xA;&#xD;&#xA;which is the same as:&#xD;&#xA;&#xD;&#xA;    newRot = oldRot * inverse oldRot * worldRot * oldRot&#xD;&#xA;&#xD;&#xA;which is the same as:&#xD;&#xA;&#xD;&#xA;    newRot = identity * worldRot * oldRot&#xD;&#xA;    newRot = worldRot * oldRot&#xD;&#xA;&#xD;&#xA;which actually brings you back to what's really happening:&#xD;&#xA;&#xD;&#xA;    localTransformed = oldRot * localRot&#xD;&#xA;    worldTransformed = worldRot * oldRot&#xD;&#xA;&#xD;&#xA;The order of application is changing, that is all. Going back to matrices, when you apply an object matrix to a transform and store that as your new object matrix, that's your local space transform. When you apply the transform to the object matrix and store that, that's you world transform. It's all about the order of application and nothing more." />
  <row Id="37276" PostHistoryTypeId="17" PostId="16216" RevisionGUID="e58c89a7-73b7-4297-8b62-ca0887689f6d" CreationDate="2011-08-20T12:32:33.387" UserId="-1" Comment="from http://stackoverflow.com/questions/7124695/efficient-method-of-rendering-massive-terrain-in-xna" Text="" />
  <row Id="37277" PostHistoryTypeId="17" PostId="16217" RevisionGUID="49b5f3a7-9620-4889-9dff-5f05d1338ebb" CreationDate="2011-08-20T12:32:33.387" UserId="-1" Comment="from http://stackoverflow.com/questions/7124695/efficient-method-of-rendering-massive-terrain-in-xna" Text="" />
  <row Id="37278" PostHistoryTypeId="17" PostId="16218" RevisionGUID="24f750aa-9e51-4b86-b697-d5bda1b63ce1" CreationDate="2011-08-20T12:32:33.387" UserId="-1" Comment="from http://stackoverflow.com/questions/7124695/efficient-method-of-rendering-massive-terrain-in-xna" Text="" />
  <row Id="37279" PostHistoryTypeId="17" PostId="16219" RevisionGUID="637693cf-adda-4a08-92c0-076f385b0611" CreationDate="2011-08-20T12:32:33.387" UserId="-1" Comment="from http://stackoverflow.com/questions/7124695/efficient-method-of-rendering-massive-terrain-in-xna" Text="" />
  <row Id="37280" PostHistoryTypeId="2" PostId="16217" RevisionGUID="a77ccb17-7000-4947-85bf-ff2aa5aec84a" CreationDate="2011-08-19T16:52:52.383" UserId="345" Text="The chunks approach is typically what is used. Rarely is it efficient to test every triangle out of hundreds of thousands to see if you should be rendering it.  Instead most terrain rendering algorithms employ a *spatial data structure* to dynamically render the visible parts of the terrain.&#xD;&#xA;&#xD;&#xA;An easy to implement data structure is called a [quadtree][1].  In short, to use a quadtree you would find the player's viewing frustum, intersect it against the top level of the quadtree, and for any chunks that are partially viewable (ie, the frustum planes intersect the chunk) you subdivide and test all the children chunks, omitting ones outside the frustum.  This will give a pretty close approximation to the actual visible geometry with only a few levels of recursion.&#xD;&#xA;&#xD;&#xA;More advanced terrain renderers use an algorithm to tune not only the viewable geometry but the detail of that geometry as well. [Geomipmapping][3] (and its relative geoclipmapping) is relatively popular at the moment for doing that but isn't a trivial thing to implement.&#xD;&#xA;&#xD;&#xA;**edit:** [Here][2] is a decent description of both geoclipmapping and the frustum culling.&#xD;&#xA;&#xD;&#xA;I also have some doubt as to whether 4 bits for the heightmap is actually enough to produce a nice looking terrain unless you're doing a lot of smoothing on the result. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Quadtree&#xD;&#xA;  [2]: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter02.html&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/Geomipmapping" />
  <row Id="37281" PostHistoryTypeId="2" PostId="16218" RevisionGUID="c233b980-2851-4eda-bca3-e75be458b122" CreationDate="2011-08-19T17:00:38.133" UserId="9391" UserDisplayName="Karoly S" Text="I'm not an expert at XNA by any means so please correct me if I am wrong but I was under the impression that there is actually built in optimization for situations like this. I know you are able to set a render distance and after that point it does not render anything, in your case it would be the remaining terrain. However this leaves a fairly unattractive edge to your rendered world, so you would have to implement something like fogging that most open world games have. " />
  <row Id="37282" PostHistoryTypeId="2" PostId="16219" RevisionGUID="65954c81-0367-4062-92dc-34556882a0c2" CreationDate="2011-08-20T01:25:30.940" UserId="288" Text="Any approach that requires you to do per-frame work to load data onto the GPU is going to be flawed.&#xD;&#xA;&#xD;&#xA;Here's a rough outline of one approach that should perform well:&#xD;&#xA;&#xD;&#xA;You should be dividing your terrain up into (fairly large) chunks, loading those chunks into fixed vertex buffers (the bit-depth of your height-map doesn't matter!). Those vertex buffers will simply sit in GPU memory, waiting to be rendered. You'll have to experiment with what is an appropriate chunk size, but 128x128 is perhaps a good place to start.&#xD;&#xA;&#xD;&#xA;For a 4096x4096 terrain you're a little bit beyond the limit of what I'd be comfortable loading onto the GPU at once - it's probably a few hundred MB of vertex data (although you could get it down to ~64MB if you're clever). So you may have to load and unload vertex buffers from the GPU in the background.&#xD;&#xA;&#xD;&#xA;(If you implement background loading of chunks, this should be extremely scalable!)&#xD;&#xA;&#xD;&#xA;*After* you have the vertex data on the GPU it is an appropriate time to do visibility culling on a *per-chunk* basis. There is no need to send the command to render a chunk, if you know it's behind the camera.&#xD;&#xA;&#xD;&#xA;**You should almost never be doing *per-triangle* culling on the CPU!**&#xD;&#xA;&#xD;&#xA;The GPU will cull triangles that are off-screen *much* faster than you'll ever be able to.&#xD;&#xA;&#xD;&#xA;For more information about performance, take a look at &lt;a href=&quot;http://gamedev.stackexchange.com/questions/9277/optimizing-an-xna-2d-game/9289#9289&quot;&gt;this answer&lt;/a&gt; over on the Game Dev site." />
  <row Id="37283" PostHistoryTypeId="2" PostId="16216" RevisionGUID="13d72e62-7c49-48bd-b79e-24ae300ac927" CreationDate="2011-08-19T16:38:10.360" UserId="9380" UserDisplayName="sammarks" Text="I'm creating an XNA game that requires a huge space for players. Currently, the test heightmap I'm using is 4096x4096, and is saved as a 4-bit BMP.&#xD;&#xA;&#xD;&#xA;What I'm trying to do is take that huge heightmap file and render it in the game. The problem I'm running into is the fact that it's inefficient to load the entire terrain into memory at once, as it will use majority of available memory.&#xD;&#xA;&#xD;&#xA;Another problem I've run into is that I cannot render the terrain all in one primitive because of a hard-limit set within XNA.&#xD;&#xA;&#xD;&#xA;With that said, I've come across a number of solutions, all of which I have listed below:&#xD;&#xA;&#xD;&#xA; - Rendering based on the current user's location - basically drawing a square around the user no matter their orientation within the world. This isn't exactly what I wanted either, because you're still rendering space that the user does not see.&#xD;&#xA; - Rendering based on the user's orientation and position - I found a formula to retrieve a triangle that is supposed to have what pixels of the heightmap are supposed to be rendered, but this proved to be very difficult.&#xD;&#xA; - Splitting the terrain into multiple chunks and rendering which ones are closest to the user - Still not very efficient as you're still rendering chunks that people won't see. And it's work-intensive because then I have to split my heightmap into several pieces, and scalability becomes a large problem.&#xD;&#xA;&#xD;&#xA;After trying those solutions, I'm fresh out of ideas for what to do. I've received some answers where people are telling me to do these complex algorithms, but I simply have no idea even how to approach doing them.&#xD;&#xA;&#xD;&#xA;So basically I'm asking for a simple, straightforward way of rendering humongous terrains in XNA with utmost efficiency.&#xD;&#xA;&#xD;&#xA;I'm rather new to game development in general, but I am willing to research if it seems promising." />
  <row Id="37284" PostHistoryTypeId="1" PostId="16216" RevisionGUID="13d72e62-7c49-48bd-b79e-24ae300ac927" CreationDate="2011-08-19T16:38:10.360" UserId="9380" UserDisplayName="sammarks" Text="Efficient Method of Rendering Massive Terrain in XNA" />
  <row Id="37285" PostHistoryTypeId="3" PostId="16216" RevisionGUID="13d72e62-7c49-48bd-b79e-24ae300ac927" CreationDate="2011-08-19T16:38:10.360" UserId="9380" UserDisplayName="sammarks" Text="&lt;c#&gt;&lt;xna&gt;" />
  <row Id="37287" PostHistoryTypeId="25" PostId="16208" RevisionGUID="76e39b33-c678-40f1-bd9a-80f740882c4f" CreationDate="2011-08-20T12:37:37.900" Comment="http://twitter.com/#!/StackGameDev/status/104894858472337408" />
  <row Id="37289" PostHistoryTypeId="5" PostId="16216" RevisionGUID="650da179-3705-43f3-87b4-e4c235cc8697" CreationDate="2011-08-20T15:34:12.643" UserId="9380" Comment="Added Update #1" Text="I'm creating an XNA game that requires a huge space for players. Currently, the test heightmap I'm using is 4096x4096, and is saved as a 4-bit BMP.&#xD;&#xA;&#xD;&#xA;What I'm trying to do is take that huge heightmap file and render it in the game. The problem I'm running into is the fact that it's inefficient to load the entire terrain into memory at once, as it will use majority of available memory.&#xD;&#xA;&#xD;&#xA;Another problem I've run into is that I cannot render the terrain all in one primitive because of a hard-limit set within XNA.&#xD;&#xA;&#xD;&#xA;With that said, I've come across a number of solutions, all of which I have listed below:&#xD;&#xA;&#xD;&#xA; - Rendering based on the current user's location - basically drawing a square around the user no matter their orientation within the world. This isn't exactly what I wanted either, because you're still rendering space that the user does not see.&#xD;&#xA; - Rendering based on the user's orientation and position - I found a formula to retrieve a triangle that is supposed to have what pixels of the heightmap are supposed to be rendered, but this proved to be very difficult.&#xD;&#xA; - Splitting the terrain into multiple chunks and rendering which ones are closest to the user - Still not very efficient as you're still rendering chunks that people won't see. And it's work-intensive because then I have to split my heightmap into several pieces, and scalability becomes a large problem.&#xD;&#xA;&#xD;&#xA;After trying those solutions, I'm fresh out of ideas for what to do. I've received some answers where people are telling me to do these complex algorithms, but I simply have no idea even how to approach doing them.&#xD;&#xA;&#xD;&#xA;So basically I'm asking for a simple, straightforward way of rendering humongous terrains in XNA with utmost efficiency.&#xD;&#xA;&#xD;&#xA;I'm rather new to game development in general, but I am willing to research if it seems promising.&#xD;&#xA;&#xD;&#xA;**Update 1:** After researching the geoclipmapping method, I started to code with that. I have all the math done, and the game runs. However, it is extremely inefficient - which is probably bad coding on my part. It runs at 2FPS and uses an entire core of my CPU. I'm going to try and improve the code, but I think I'll need more help, so [here is a Pastebin of the code][1] for the Terrain manager class. I'll post back with more results later if I ever get it to be more efficient.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pastebin.com/V3Ycv2zc" />
  <row Id="37290" PostHistoryTypeId="25" PostId="16216" RevisionGUID="097bbe26-3bf4-4f83-a760-ac1c9a4e8d70" CreationDate="2011-08-20T15:37:38.060" Comment="http://twitter.com/#!/StackGameDev/status/104940157605642243" />
  <row Id="37291" PostHistoryTypeId="2" PostId="16220" RevisionGUID="5dc3fc1b-a4e8-447f-bd43-9abdd27acde8" CreationDate="2011-08-20T15:56:34.557" UserId="2079" Text="What is the most common way of handling mouse clicks in games? &#xD;&#xA;&#xD;&#xA;Given that all you have in way of detecting input from the mouse is whether a button is up or down.&#xD;&#xA;&#xD;&#xA;I currently just rely on the mouse down being a click, but this simple approach limits me greatly in what I want to achieve. For example I have some code that should only be run once on a mouse click, but using mouse down as a mouse click can cause the code to run more then once depending on how long the button is held down for. So I need to do it on a click!&#xD;&#xA;&#xD;&#xA;But what is the best way to handle a click? Is a click when the mouse goes from mouse up to down or from down to up or is it a click if the button was down for less then x frames/milliseconds and then if so, is it considered mouse down and a click if its down for x frames/milliseconds or a click then mouse down?&#xD;&#xA;&#xD;&#xA;I can see that each of the approaches can have their uses but which is the most common in games? And maybe i'll ask more specifically which is the most common in RTS games? " />
  <row Id="37292" PostHistoryTypeId="1" PostId="16220" RevisionGUID="5dc3fc1b-a4e8-447f-bd43-9abdd27acde8" CreationDate="2011-08-20T15:56:34.557" UserId="2079" Text="Handling clicks versus mouse down in Games" />
  <row Id="37293" PostHistoryTypeId="3" PostId="16220" RevisionGUID="5dc3fc1b-a4e8-447f-bd43-9abdd27acde8" CreationDate="2011-08-20T15:56:34.557" UserId="2079" Text="&lt;input&gt;&lt;mouse&gt;&lt;control&gt;" />
  <row Id="37294" PostHistoryTypeId="2" PostId="16221" RevisionGUID="d5178807-3a83-4ab1-83bf-b6a0474fc86e" CreationDate="2011-08-20T16:07:54.033" UserId="9381" Text="I am working on a game that uses simple 2d vector graphics. I want a tool that will let me visually draw things like arbitrary polygons by placing points.&#xD;&#xA;&#xD;&#xA;A perfect tool would present a grid that I could scale larger or smaller (ie: the window is 10 units across or the window is 20 units across). It would let me draw a polygon on this grid, and will tell me, simply, the coordinates of each point.&#xD;&#xA;&#xD;&#xA;It would be great if this tool could then export a file format that was something like&#xD;&#xA;&#xD;&#xA;    0, 5&#xD;&#xA;    3, -2&#xD;&#xA;    0, 0&#xD;&#xA;    -3, -2&#xD;&#xA;&#xD;&#xA;For bonus points, it would be great to be able to assign other attributes to each point. In the end, this will get passed to OpenGL, so things like color and opacity could possibly be used." />
  <row Id="37295" PostHistoryTypeId="1" PostId="16221" RevisionGUID="d5178807-3a83-4ab1-83bf-b6a0474fc86e" CreationDate="2011-08-20T16:07:54.033" UserId="9381" Text="What can I use to generate 2d vector graphics as a list of coordinates?" />
  <row Id="37296" PostHistoryTypeId="3" PostId="16221" RevisionGUID="d5178807-3a83-4ab1-83bf-b6a0474fc86e" CreationDate="2011-08-20T16:07:54.033" UserId="9381" Text="&lt;tools&gt;&lt;vector&gt;" />
  <row Id="37297" PostHistoryTypeId="2" PostId="16222" RevisionGUID="a449c2dc-6492-4682-b9e0-36850e592c70" CreationDate="2011-08-20T16:34:07.863" UserId="9379" Text="I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate. And now I have come to the engine architecture itself.&#xD;&#xA;&#xD;&#xA;As I intend to use server-client architecture, I prefer to be more &quot;data-driven oriented&quot; so I can dump my game state to database. I recently read about a component based design which plays nicely with data-driven systems. The idea is that game object components are bare properties and no behavior. The behavior is implemented in so-called Systems. Each system (like Physics, Render, Animation, Sound) processes game objects and knows only about needed components and also is able to tie itself to other systems if needed. Systems are like singletons.&#xD;&#xA;&#xD;&#xA;I could use the observer pattern so each System can subscribe to property changes which interests the particular System. The Systems subscribe to prop change events in some particular order thus creating subscription chains. &#xD;&#xA;&#xD;&#xA;Now there is one problem: SystemA detected change in propA and needed to change some propB, but SystemX is listening to propB changes and affects propA .. and we have an infinite loop. **Is this a common weakness of such systems or I have wrong implementation ideas?**&#xD;&#xA;&#xD;&#xA;The last system in the subscription chain could be the NetworkSystem, and I can spit out a small package on every subscribed prop change ... **or it is a bad idea and I should pack more changes together?** (I'll be using enet library for networking).&#xD;&#xA;&#xD;&#xA;I guess, rendering and physics will be separate threads where RenderSystem (client-side only) is polling the entities for their properties which have changed since last frame and PhysicsSystem (both server and client for some prediction) is modyfing properties on each iteration; InputSystem (client-side only) and NetworkSystem also are modifying properties and I could also have a WorldClock which could modify some properties on timer events. &#xD;&#xA;&#xD;&#xA;But the major problem starts when I think how to implement custom scripting in such systems. Let's say, I want to allow users to upload their custom logic and animation script called Respect which has one property called goodDeeds with a rule - if a person with goodDeeds&gt;100 passes by, I run some RespectAnimation. So I would need to allow this user to install a global scripting system which subscribes to position changes of every character and check for the Respect component and goodDeeds property and then somehow tell to Animation system to run Respect animation on this object. **Is this the way it is supposed to work, isn't it dangerous that the behavior now is a global object and not a property of the entity which uses it?** If we think again about the problem of looping observed/modified properties, it means that one wrong xxxSystem script could stall the entire server with some bad loop (but from the other hand, the admin of the server should have enough sanity to see such problems before allowing the user to upload that script).&#xD;&#xA;&#xD;&#xA;Anyway, it would be great to find some book or article which better describes how to use component-based systems where components are properties and behavior are singletons, but somehow all articles I have read, explain only the idea itself but not how to implement it in a real game engine with scripting and networking." />
  <row Id="37298" PostHistoryTypeId="1" PostId="16222" RevisionGUID="a449c2dc-6492-4682-b9e0-36850e592c70" CreationDate="2011-08-20T16:34:07.863" UserId="9379" Text="Some practical issues with component-based game object systems" />
  <row Id="37299" PostHistoryTypeId="3" PostId="16222" RevisionGUID="a449c2dc-6492-4682-b9e0-36850e592c70" CreationDate="2011-08-20T16:34:07.863" UserId="9379" Text="&lt;network&gt;&lt;component-based&gt;&lt;scripting&gt;" />
  <row Id="37300" PostHistoryTypeId="5" PostId="16222" RevisionGUID="b4e85bea-44e7-4de5-a971-c46bc9359c55" CreationDate="2011-08-20T16:48:00.660" UserId="9379" Comment="added 129 characters in body" Text="I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate. And now I have come to the engine architecture itself.&#xD;&#xA;&#xD;&#xA;As I intend to use server-client architecture, I prefer to be more &quot;data-driven oriented&quot; so I can dump my game state to database. I recently read about a component based design which plays nicely with data-driven systems. The idea is that game object components are bare properties and no behavior. The behavior is implemented in so-called Systems. Each system (like Physics, Render, Animation, Sound) processes game objects and knows only about needed components and also is able to tie itself to other systems if needed. Systems are like singletons.&#xD;&#xA;&#xD;&#xA;I could use the observer pattern so each System can subscribe to property changes which interests the particular System. The Systems subscribe to prop change events in some particular order thus creating subscription chains. &#xD;&#xA;&#xD;&#xA;Now there is one problem: SystemA detected change in propA and needed to change some propB, but SystemX is listening to propB changes and affects propA .. and we have an infinite loop. **Is this a common weakness of such systems or I have wrong implementation ideas?**&#xD;&#xA;&#xD;&#xA;The last system in the subscription chain could be the NetworkSystem, and I can spit out a small package on every subscribed prop change ... **or it is a bad idea and I should pack more changes together?** (I'll be using enet library for networking).&#xD;&#xA;&#xD;&#xA;I guess, rendering and physics will be separate threads where RenderSystem (client-side only) is polling the entities for their properties which have changed since last frame and PhysicsSystem (both server and client for some prediction) is modyfing properties on each iteration; InputSystem (client-side only) and NetworkSystem also are modifying properties and I could also have a WorldClock which could modify some properties on timer events. &#xD;&#xA;&#xD;&#xA;But the major problem starts when I think how to implement custom scripting in such systems. Let's say, I want to allow users to upload their custom logic and animation script called Respect which has one property called goodDeeds with a rule - if a person with goodDeeds&gt;100 passes by, I run some RespectAnimation. So I would need to allow this user to install a global scripting system which subscribes to position changes of every character and check for the Respect component and goodDeeds property and then somehow tell to Animation system to run Respect animation on this object. **Is this the way it is supposed to work, isn't it dangerous that the behavior now is a global object and not a property of the entity which uses it?** If we think again about the problem of looping observed/modified properties, it means that one wrong xxxSystem script could stall the entire server with some bad loop (but from the other hand, the admin of the server should have enough sanity to see such problems before allowing the user to upload that script). **And what if I want to use Finite State Machine in scripts - will this also become a FSMSybsystem somehow exposed to scripts?**&#xD;&#xA;&#xD;&#xA;Anyway, it would be great to find some book or article which better describes how to use component-based systems where components are properties and behavior are singletons, but somehow all articles I have read, explain only the idea itself but not how to implement it in a real game engine with scripting and networking." />
  <row Id="37301" PostHistoryTypeId="2" PostId="16223" RevisionGUID="0ff21c3e-d683-4544-9d65-210f940e0865" CreationDate="2011-08-20T16:50:35.010" UserId="9170" Text="i'm going to describe what need to be done... &quot;there are circular areas marked in a map, large areas a person can easily move in to them and out of them&quot; what i'm trying to do is deciding weather the person is moving in to or moving out of that circular area. i can get the user location and see weather it falls inside the circle(weather the person is inside the circle) by pure mathematics theories(theories of circle), but how can we decide weather the person in moving in to the circle or moving out of the circle? please give me some advice guys?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37302" PostHistoryTypeId="1" PostId="16223" RevisionGUID="0ff21c3e-d683-4544-9d65-210f940e0865" CreationDate="2011-08-20T16:50:35.010" UserId="9170" Text="deciding user movement path - slick 2D" />
  <row Id="37303" PostHistoryTypeId="3" PostId="16223" RevisionGUID="0ff21c3e-d683-4544-9d65-210f940e0865" CreationDate="2011-08-20T16:50:35.010" UserId="9170" Text="&lt;java&gt;&lt;slick&gt;" />
  <row Id="37304" PostHistoryTypeId="2" PostId="16224" RevisionGUID="f924bc23-b731-45eb-b6d5-e7b9d71188a4" CreationDate="2011-08-20T17:12:30.280" UserId="4690" Text="You're on the right track with figuring out when the mouse is transitioning from down to up and writing a handler for that. For a lot of games, it's good enough to treat a mouseUp event as a click.&#xD;&#xA;&#xD;&#xA;Depending on your game, you're probably want to handle both events -- for example, in an RTS, you'll probably want to incorporate drag-box selecting as well as single-click selecting. The difference is in determining how long the mouse was in the Down state before it's released.&#xD;&#xA;&#xD;&#xA;(Yes, you basically answered your own question)&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37305" PostHistoryTypeId="5" PostId="16213" RevisionGUID="44b82560-7905-4428-802c-303c9ba3dfc8" CreationDate="2011-08-20T17:34:50.710" UserId="1742" Comment="added 14 characters in body" Text="Quaternions are associative:&#xD;&#xA;&#xD;&#xA;you mention that your solution is:&#xD;&#xA;&#xD;&#xA;    newRot = oldRot * (inverse oldRot * worldRot) * oldRot&#xD;&#xA;&#xD;&#xA;which is the same as:&#xD;&#xA;&#xD;&#xA;    newRot = oldRot * inverse oldRot * worldRot * oldRot&#xD;&#xA;&#xD;&#xA;which is the same as:&#xD;&#xA;&#xD;&#xA;    newRot = identity * worldRot * oldRot&#xD;&#xA;    newRot = worldRot * oldRot&#xD;&#xA;&#xD;&#xA;which actually brings you back to what's really happening:&#xD;&#xA;&#xD;&#xA;    localTransformed = oldRot * rot&#xD;&#xA;    worldTransformed = rot * oldRot&#xD;&#xA;&#xD;&#xA;The order of application is changing, that is all. Going back to matrices, when you apply an object matrix to a transform matrix and store that as your new object matrix, that's your local space transformation. When you apply the transform matrix to the object matrix and store that, that's you world transformation. It's all about the order of application and nothing more." />
  <row Id="37309" PostHistoryTypeId="6" PostId="16188" RevisionGUID="8ca6aa13-4541-46b9-9ab7-084e5b21bc1d" CreationDate="2011-08-20T17:46:14.697" UserId="744" Comment="edited tags" Text="&lt;legal&gt;&lt;game-industry&gt;" />
  <row Id="37310" PostHistoryTypeId="5" PostId="16222" RevisionGUID="0e1c6e9b-4227-4e99-bfc8-7f91aab87f95" CreationDate="2011-08-20T18:01:56.260" UserId="9379" Comment="deleted 3 characters in body" Text="I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate. And now I have come to the engine architecture itself.&#xD;&#xA;&#xD;&#xA;As I intend to use server-client architecture, I prefer to be more &quot;data-driven oriented&quot; so I can dump my game state to database. I recently read about a component based design which plays nicely with data-driven systems. The idea is that game object components are bare properties and no behavior. The behavior is implemented in so-called Systems. Each system (like Physics, Render, Animation, Sound) processes game objects and knows only about needed components and also is able to tie itself to other systems if needed. Systems are like singletons.&#xD;&#xA;&#xD;&#xA;I could use the observer pattern so each System can subscribe to property changes which interests the particular System. The Systems subscribe to prop change events in some particular order thus creating subscription chains. &#xD;&#xA;&#xD;&#xA;Now there is one problem: SystemA detected change in propA and needed to change some propB, but SystemX is listening to propB changes and affects propA .. and we have an infinite loop. **Is this a common weakness of such systems or I have wrong implementation ideas?**&#xD;&#xA;&#xD;&#xA;The last system in the subscription chain could be the NetworkSystem, and I can spit out a small package on every subscribed prop change ... **or it is a bad idea and I should pack more changes together?** (I'll be using enet library for networking).&#xD;&#xA;&#xD;&#xA;I guess, rendering and physics will be separate threads where RenderSystem (client-side only) is polling the entities for their properties which have changed since last frame and PhysicsSystem (both server and client for some prediction) is modyfing properties on each iteration; InputSystem (client-side only) and NetworkSystem also are modifying properties and I could also have a WorldClock which could modify some properties on timer events. &#xD;&#xA;&#xD;&#xA;But the major problem starts when I think how to implement custom scripting in such systems. Let's say, I want to allow users to upload their custom logic and animation script called Respect which has one property called goodDeeds with a rule - if a person with goodDeeds&gt;100 passes by, I run some RespectAnimation. So I would need to allow this user to install a global scripting system which subscribes to position changes of every character and check for the Respect component and goodDeeds property and then somehow tell to Animation system to run Respect animation on this object. **Is this the way it is supposed to work, isn't it dangerous that the behavior now is a global object and not a property of the entity which uses it?** If we think again about the problem of looping observed/modified properties, it means that one wrong xxxSystem script could stall the entire server with some bad loop (but from the other hand, the admin of the server should have enough sanity to see such problems before allowing the user to upload that script). **And what if I want to use Finite State Machine in scripts - will this also become a FSMSystem somehow exposed to scripts?**&#xD;&#xA;&#xD;&#xA;Anyway, it would be great to find some book or article which better describes how to use component-based systems where components are properties and behavior are singletons, but somehow all articles I have read, explain only the idea itself but not how to implement it in a real game engine with scripting and networking." />
  <row Id="37311" PostHistoryTypeId="2" PostId="16226" RevisionGUID="e3012253-f835-4597-afa8-4ff83a8380ff" CreationDate="2011-08-20T18:02:30.587" UserId="118" Text="You can do this by using the [dot product](http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/) of the velocity of your player.&#xD;&#xA;&#xD;&#xA;First, you need to store your player's velocity and use it to update his position. Then, for each trigger in your level you will test if the user is moving towards the center of the trigger (using the dot product between the velocity and the trigger):&#xD;&#xA;&#xD;&#xA;    Sprite {&#xD;&#xA;        Point position;&#xD;&#xA;        Point velocity;&#xD;&#xA;        Texture texture;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Level implements MouseListener, KeyListener {&#xD;&#xA;        Sprite player;&#xD;&#xA;        List&lt;LevelTrigger&gt; triggers;&#xD;&#xA;        ...&#xD;&#xA;        void update(double deltaTime) {&#xD;&#xA;            //Update player's position&#xD;&#xA;            player.getPosition().X += player.getVelocity().X * SPEED * deltaTime;&#xD;&#xA;            player.getPosition().Y += player.getVelocity().Y * SPEED * deltaTime;&#xD;&#xA;            &#xD;&#xA;            // Get player velocity and normalize its components&#xD;&#xA;            Point velocity = player.getVelocity();&#xD;&#xA;            velocity = velocity.normalize();&#xD;&#xA;            for (LevelTrigger trigger : triggers) {&#xD;&#xA;                // Get a vector that points to the trigger's center&#xD;&#xA;                Point raycast = trigger.getCenter().substract(velocity);&#xD;&#xA;                // Get the angle between the raycast and the velocity&#xD;&#xA;                double angle = Math.acos(velocity.dot(reycast));&#xD;&#xA;                // The narrower the angle, the more &quot;focused&quot; his moving view is&#xD;&#xA;                if (angle &lt; 30 &amp;&amp; raycast.length() &lt; 10) {&#xD;&#xA;                    trigger.fireIsArriving();&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Update player position using mouse&#xD;&#xA;        public void mouseMoved(int oldx, int oldy, int newx, int newy) {&#xD;&#xA;            Point newVelocity = new Point(newx, newy).normalize();&#xD;&#xA;            player.setVelocity(newVelocity);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Update player position using keyboard&#xD;&#xA;        public void keyPressed(int key, char c) {&#xD;&#xA;            if (key == Input.KEY_W) {&#xD;&#xA;                player.getVelocity().X += 1;&#xD;&#xA;            } else if (key == Input.KEY_S) {&#xD;&#xA;                player.getVelocity().X -= 1;&#xD;&#xA;            } else if (key == Input.KEY_A) {&#xD;&#xA;                player.getVelocity().Y -= 1;&#xD;&#xA;            } else if (key == Input.KEY_D) {&#xD;&#xA;                player.getVelocity().Y += 1;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37312" PostHistoryTypeId="2" PostId="16227" RevisionGUID="bbdb7065-09d2-42aa-a3ba-91bd04c5464e" CreationDate="2011-08-20T18:18:47.123" UserId="8498" Text="***If this is not the right place for this question, could you please direct me to a more suitable site/forum?***&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm a beginner in game development (and in the use of this site). I've worked with C++ only for rather small scientific simulations, so I can &quot;code&quot; but I've never done a full-blown design of an OO program, much less of a game. You can tell from what I'll write next :P&#xD;&#xA;&#xD;&#xA;I've decided to write an open source educational game that simulates accurately the motion of the Sun, the planets and of one or more spacecraft controlled by the player. By &quot;simulates accurately&quot; I mean that I want to use a scientifically valid and precise algorithm to obtain the forces and thus the motions of the bodies.&#xD;&#xA;&#xD;&#xA;The game will be in 3D and will use the Ogre3D engine for the graphics. Graphically it will look similar to Celestia.&#xD;&#xA;&#xD;&#xA;The first difficulty is that I've never designed the structure and the classes of any game. By reading a few references and guides I think I have a vague idea of how the dynamics could work, but it's *vague*: each entity (planet or spacecraft) could store its own state information and then have an &quot;update&quot; function that updates the state based on some input (like user commands). There are probably many other ways to do this, I guess.&#xD;&#xA;&#xD;&#xA;The main problem, however, comes from the particular needs of this project:&#xD;&#xA;&#xD;&#xA; 1. my objects must not only respond to user input, but also obey accurate physical laws, and **the algorithm that computes them must be centralized**. This is because it needs to know the positions of all the bodies at the same time to perform its computations;&#xD;&#xA; 2. I plan to add different kinds of spacecraft with different types of propulsion, and some of them would **react to the other bodies in special ways** (think antigravity).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The Question&#xD;&#xA;------------&#xD;&#xA;*Is there a design pattern or architecture suitable for this problem?*&#xD;&#xA;&#xD;&#xA;The best I can think of is to have a singleton Universe class containing the central algorithm for the dynamics. The various objects of the solar system then communicate with Universe. They would contain basic parameters like mass and size, and they would listen to Universe telling them where to stand.&#xD;&#xA;&#xD;&#xA;However this doesn't sound right. Where do I put the ever-changing trajectory data of all the bodies, in Universe? What's the point of having all those objects then? Only for the graphical part of the game?&#xD;&#xA;&#xD;&#xA;And what about the special dynamical properties of some spacecraft? I can't possibly include them all in the central algorithm from the beginning.&#xD;&#xA;&#xD;&#xA;------------------------&#xD;&#xA;Ok, I think you can tell how confused I am about the matter much better than me. I would be grateful for any kind of input." />
  <row Id="37313" PostHistoryTypeId="1" PostId="16227" RevisionGUID="bbdb7065-09d2-42aa-a3ba-91bd04c5464e" CreationDate="2011-08-20T18:18:47.123" UserId="8498" Text="Designing the main classes in a solar system simulation game in C++" />
  <row Id="37314" PostHistoryTypeId="3" PostId="16227" RevisionGUID="bbdb7065-09d2-42aa-a3ba-91bd04c5464e" CreationDate="2011-08-20T18:18:47.123" UserId="8498" Text="&lt;architecture&gt;&lt;physics&gt;&lt;design-patterns&gt;&lt;objects&gt;" />
  <row Id="37315" PostHistoryTypeId="2" PostId="16228" RevisionGUID="f464df30-4351-4578-a9d3-f248cbac776d" CreationDate="2011-08-20T18:19:37.977" UserId="9379" Text="I really like the apporach which is mentioned here:&#xD;&#xA;http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/page__st__40__p__4089913#entry4089913&#xD;&#xA;&#xD;&#xA;and also here:&#xD;&#xA;http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/&#xD;&#xA;&#xD;&#xA;Shortly: Avoid mixing inheritance with components. Components **are not** behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.&#xD;&#xA;" />
  <row Id="37316" PostHistoryTypeId="25" PostId="16203" RevisionGUID="852f8a96-b23f-4f82-9be4-cd304793b53f" CreationDate="2011-08-20T18:37:38.110" Comment="http://twitter.com/#!/StackGameDev/status/104985457191948288" />
  <row Id="37318" PostHistoryTypeId="2" PostId="16229" RevisionGUID="d1e2d051-6963-41af-bb4c-7e097598d454" CreationDate="2011-08-20T18:52:04.043" UserId="7911" Text="Don't conflate the physics modeling of the universe with the graphics, that way leads to madness =)  For something like what you're talking about an MVC architecture might work well.&#xD;&#xA;&#xD;&#xA;M = model.  Your model is the physics simulation of the universe.  While this may be a singleton you'll find many more arguments to making it a class that can stand alone but of which you could make many.  Your model is responsible for number crunching the simulation, that's it.  This is completely independent of Ogre and would exist as pure data.&#xD;&#xA;&#xD;&#xA;V = view.  Your view gets its parameters from the Model and decides how to render them.  There can be many different views of a model; maybe you have one that shows a condensed overhead, a second view that follows a spaceship around, and a third that, well you get the idea.  A view simply looks at the model and shows it to the end user, and each view is specialized so you don't have a mega-view with a million options.  This is where you would extract the numbers from the model and set them into your Ogre objects to render.&#xD;&#xA;&#xD;&#xA;C = controller.  The controller is where you interact with the model, adding new physics objects or piloting spaceships.  Note that there can be many different controllers, one for each spaceship that an AI or end user controls, you get the idea.&#xD;&#xA;&#xD;&#xA;The rest of your program is now a framework to setup and run the MVC.&#xD;&#xA;&#xD;&#xA;There are many other ways to design your idea, MVC is mainly suited towards information displays and games like Eve but it does let you neatly organize how your program works.&#xD;&#xA;&#xD;&#xA;**You'll get many more ideas from other people** but no matter how you choose your final design please separate the simulation from the graphics.&#xD;&#xA;" />
  <row Id="37319" PostHistoryTypeId="2" PostId="16230" RevisionGUID="1a5cd5c5-3f5a-4082-9361-4842a9cda2f9" CreationDate="2011-08-20T19:06:54.570" UserId="5021" Text="Store the position of the person at this frame and the position of the person at the last frame.&#xD;&#xA;&#xD;&#xA;Measure the distance to the circle center at this frame, and the distance to the circle center at the last frame.&#xD;&#xA;&#xD;&#xA;If the distance to the circle center at this frame is less than at the last frame, then the person is moving toward the circle, otherwise the person is moving away from the circle." />
  <row Id="37320" PostHistoryTypeId="5" PostId="16216" RevisionGUID="ae4bff0e-11d4-4ceb-ba5d-70dc2065b37c" CreationDate="2011-08-20T19:40:31.073" UserId="9380" Comment="Added Update #2" Text="I'm creating an XNA game that requires a huge space for players. Currently, the test heightmap I'm using is 4096x4096, and is saved as a 4-bit BMP.&#xD;&#xA;&#xD;&#xA;What I'm trying to do is take that huge heightmap file and render it in the game. The problem I'm running into is the fact that it's inefficient to load the entire terrain into memory at once, as it will use majority of available memory.&#xD;&#xA;&#xD;&#xA;Another problem I've run into is that I cannot render the terrain all in one primitive because of a hard-limit set within XNA.&#xD;&#xA;&#xD;&#xA;With that said, I've come across a number of solutions, all of which I have listed below:&#xD;&#xA;&#xD;&#xA; - Rendering based on the current user's location - basically drawing a square around the user no matter their orientation within the world. This isn't exactly what I wanted either, because you're still rendering space that the user does not see.&#xD;&#xA; - Rendering based on the user's orientation and position - I found a formula to retrieve a triangle that is supposed to have what pixels of the heightmap are supposed to be rendered, but this proved to be very difficult.&#xD;&#xA; - Splitting the terrain into multiple chunks and rendering which ones are closest to the user - Still not very efficient as you're still rendering chunks that people won't see. And it's work-intensive because then I have to split my heightmap into several pieces, and scalability becomes a large problem.&#xD;&#xA;&#xD;&#xA;After trying those solutions, I'm fresh out of ideas for what to do. I've received some answers where people are telling me to do these complex algorithms, but I simply have no idea even how to approach doing them.&#xD;&#xA;&#xD;&#xA;So basically I'm asking for a simple, straightforward way of rendering humongous terrains in XNA with utmost efficiency.&#xD;&#xA;&#xD;&#xA;I'm rather new to game development in general, but I am willing to research if it seems promising.&#xD;&#xA;&#xD;&#xA;**Update 1:** After researching the geoclipmapping method, I started to code with that. I have all the math done, and the game runs. However, it is extremely inefficient - which is probably bad coding on my part. It runs at 2FPS and uses an entire core of my CPU. I'm going to try and improve the code, but I think I'll need more help, so [here is a Pastebin of the code][1] for the Terrain manager class. I'll post back with more results later if I ever get it to be more efficient.&#xD;&#xA;&#xD;&#xA;**Update 2:** I've ditched geoclipmapping for the time being. Now I'm going with slicing the main heightmap into several different parts, each sized at 128x128 each. Then I'll make a manager that determines the player's current position and load the selected one into memory. And, for the sake of simplicity, for the moment I'm using the heightmap importer sample from the XNA website. I'll report back with my results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pastebin.com/V3Ycv2zc" />
  <row Id="37321" PostHistoryTypeId="5" PostId="16216" RevisionGUID="1e45d579-3eb3-4d06-886f-8c3bf24afd5f" CreationDate="2011-08-20T19:50:26.900" UserId="9380" Comment="Removed Update 2." Text="I'm creating an XNA game that requires a huge space for players. Currently, the test heightmap I'm using is 4096x4096, and is saved as a 4-bit BMP.&#xD;&#xA;&#xD;&#xA;What I'm trying to do is take that huge heightmap file and render it in the game. The problem I'm running into is the fact that it's inefficient to load the entire terrain into memory at once, as it will use majority of available memory.&#xD;&#xA;&#xD;&#xA;Another problem I've run into is that I cannot render the terrain all in one primitive because of a hard-limit set within XNA.&#xD;&#xA;&#xD;&#xA;With that said, I've come across a number of solutions, all of which I have listed below:&#xD;&#xA;&#xD;&#xA; - Rendering based on the current user's location - basically drawing a square around the user no matter their orientation within the world. This isn't exactly what I wanted either, because you're still rendering space that the user does not see.&#xD;&#xA; - Rendering based on the user's orientation and position - I found a formula to retrieve a triangle that is supposed to have what pixels of the heightmap are supposed to be rendered, but this proved to be very difficult.&#xD;&#xA; - Splitting the terrain into multiple chunks and rendering which ones are closest to the user - Still not very efficient as you're still rendering chunks that people won't see. And it's work-intensive because then I have to split my heightmap into several pieces, and scalability becomes a large problem.&#xD;&#xA;&#xD;&#xA;After trying those solutions, I'm fresh out of ideas for what to do. I've received some answers where people are telling me to do these complex algorithms, but I simply have no idea even how to approach doing them.&#xD;&#xA;&#xD;&#xA;So basically I'm asking for a simple, straightforward way of rendering humongous terrains in XNA with utmost efficiency.&#xD;&#xA;&#xD;&#xA;I'm rather new to game development in general, but I am willing to research if it seems promising.&#xD;&#xA;&#xD;&#xA;**Update 1:** After researching the geoclipmapping method, I started to code with that. I have all the math done, and the game runs. However, it is extremely inefficient - which is probably bad coding on my part. It runs at 2FPS and uses an entire core of my CPU. I'm going to try and improve the code, but I think I'll need more help, so [here is a Pastebin of the code][1] for the Terrain manager class. I'll post back with more results later if I ever get it to be more efficient.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://pastebin.com/V3Ycv2zc" />
  <row Id="37322" PostHistoryTypeId="5" PostId="16222" RevisionGUID="ea2c44a8-93bf-420c-a12c-bba366050909" CreationDate="2011-08-20T19:52:26.070" UserId="9379" Comment="deleted 277 characters in body" Text="I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate and now I have come to the engine architecture.&#xD;&#xA;&#xD;&#xA;I intend to use server-client architecture and I prefer to be more &quot;data-driven&quot; so I can organize my game state in MySQL database. I recently read about a component based design which plays nicely with data-driven systems. The idea is that game object components are bare properties and the behavior is implemented in so-called subsystems. Each subsystem (like Physics, Render, Animation, Sound) &quot;knows&quot; only about related components and also is able to tie itself to other systems if needed. Those subsystems are singletons (single instances).&#xD;&#xA;&#xD;&#xA;I can use the observer pattern so each subsystem can subscribe to property changes which are important for the particular subsystem. The subsystems subscribe to prop change events in some particular order thus creating subscription chains. But this can create one problem: SystemA detected change in propA and needed to change some propB, but SystemX is listening to propB changes and affects propA .. and we have an infinite loop. **Is this a common weakness of such systems or I have wrong implementation ideas?**&#xD;&#xA;&#xD;&#xA;The last system in the subscription chain could be the NetworkSystem, which sends out a small package on every subscribed property change ... **or it is a bad idea and I should pack more changes together?**.&#xD;&#xA;&#xD;&#xA;I guess, rendering and physics will be separate threads where RenderSystem (client-side only) is polling the entities for their properties which have changed since last frame and PhysicsSystem is modyfing properties on each iteration; InputSystem (client-side only) and NetworkSystem also are modifying properties and WorldClockSystem could modify some properties on timer events. &#xD;&#xA;&#xD;&#xA;But the major problem is when I think how to implement custom scripting in such systems. Let's say, users are allowed to upload their custom logic and animation script called Respect which has one property called goodDeeds with a rule &quot;if a person with goodDeeds&gt;100 passes by, I run some RespectAnimation&quot;. So I would install a global RespectSystem which subscribes to position changes of every character and checks for the Respect component and goodDeeds property and then somehow tells to Animation system to run Respect animation on this object. **Is this the way it is supposed to work, isn't it dangerous that the behavior now is a global object and not a property of the entity which uses it?** If I think again about the problem of neverending loops of observed/modified properties, it means that one wrong xxxSystem script could stall the entire server (but from the other hand, the admin of the server should have enough sanity to see such problems before allowing the user to upload that script).&#xD;&#xA;&#xD;&#xA;Anyway, it would be great to find some book or article which better describes how to use component-based systems where components are properties and behavior are singletons, but somehow all articles I have read, explain only the idea itself but not how to attach it to a real game engine with scripting and networking." />
  <row Id="37323" PostHistoryTypeId="2" PostId="16231" RevisionGUID="e42240f2-2a27-4249-a217-dcbb18ad59f8" CreationDate="2011-08-20T20:34:50.407" UserId="3505" Text="Mouse buttons and keyboard keys can have a number of different events, what is available depends on your choice of language/library, most common:&#xD;&#xA;&#xD;&#xA;Key down, triggers when a button is pressed.&#xD;&#xA;Key up, triggers when a button is released.&#xD;&#xA;Retarded key down, triggers when a button is pressed, and then fires repeatedly at some system dependent interval until the key is released.&#xD;&#xA;&#xD;&#xA;On top of this there may also be a call to tell whether or not a key is currently held down.&#xD;&#xA;&#xD;&#xA;It is important that you are aware exactly what tool you are using, most commonly you will need the two first, if they are not available, build them from whatever is available.&#xD;&#xA;&#xD;&#xA;Standard method for registering that an on-screen button is pressed using the mouse is to assert that the same button was pointed at both at the down and the up event. For many game elements this may however be too slow, so for a lot of actions it may be prudent to make them happen at the down event." />
  <row Id="37324" PostHistoryTypeId="2" PostId="16232" RevisionGUID="96ca7880-8ce8-4bcd-bbfc-073894776841" CreationDate="2011-08-20T20:54:27.407" UserId="7822" Text="XOr can be your friend in this situation.&#xD;&#xA;&#xD;&#xA;    bool oldIsButtonUp = true;&#xD;&#xA;    &#xD;&#xA;    void pollMouse(bool isButtonUp) {&#xD;&#xA;        if ((oldIsButtonUp ^ isButtonUp) &amp;&amp; isButtonUp) {&#xD;&#xA;            sendMouseClickEvent();&#xD;&#xA;        }&#xD;&#xA;        oldIsButtonUp = isButtonUp;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This will call sendMouseClickEvent() whenever the mouse button state changes from false to true." />
  <row Id="37325" PostHistoryTypeId="2" PostId="16233" RevisionGUID="6d1f98aa-4033-4e06-91af-74d9e0a26824" CreationDate="2011-08-20T20:59:40.950" UserId="1839" Text="You need to define &quot;accurate&quot;. Even [Newtonian Mechanics](http://en.wikipedia.org/wiki/Newtonian_mechanics) is not accurate enough to simulate Mercury properly. Newton is off by [43 arc seconds per tropical century](http://en.wikipedia.org/wiki/Perihelion_precession_of_Mercury#Perihelion_precession_of_Mercury). This was discovered with technics used in 1859, so its not a small deviance. In fact this was the first test case for Einstein's Relativity Theory, and he succeeded explaining mercuries perihelion precession using this theory. Most likely you don't want to use Relativity Theory for your simulation, so you probably need to relax a bit on &quot;accurate&quot;." />
  <row Id="37326" PostHistoryTypeId="2" PostId="16234" RevisionGUID="bd508a5c-0cdc-4cda-ba89-bdf2cf6a0abf" CreationDate="2011-08-20T21:36:38.703" UserId="2390" Text="&gt; Is this a common weakness of such systems or I have wrong implementation ideas?&#xD;&#xA;&#xD;&#xA;It's not a weakness in the system, but a weakness in your game logic. If the value of propA depends on propB and probB depends on propA then you have cyclic dependencies. It doesn't matter what system you use, this can't work.&#xD;&#xA;&#xD;&#xA;Of course, it could happen by accident, but it's easy to detect cyclic dependencies, so you can provide diagnostics in those cases.&#xD;&#xA;&#xD;&#xA;Do you have a particular example of where you think this might happen, or are you just thinking ahead?&#xD;&#xA;&#xD;&#xA;&gt; ... or it is a bad idea and I should pack more changes together?.&#xD;&#xA;&#xD;&#xA;Generally, you want to pack things together as much as possible in a network situation because each packet will necessarily have some overhead.&#xD;&#xA;&#xD;&#xA;Also, sending property changes across the network isn't going to work in the general case. There are many approaches to networking games, and each approach is designed for particular types of games, and won't work in others. For example, sending the property changes of each unit in an RTS game is simply not going to work. There are no silver bullets in game networking -- it needs to be designed on a per-game basis.&#xD;&#xA;&#xD;&#xA;&gt; Is this the way it is supposed to work, isn't it dangerous that the behavior now is a global object and not a property of the entity which uses it?&#xD;&#xA;&#xD;&#xA;Why does it have to be a global object?&#xD;&#xA;&#xD;&#xA;If you allow users to upload scripts then you basically need to be **very** careful with what you allow. If you allow arbitrary scripts then they will need to be run in a VM where you can limit their resource usage. You would probably be better off with a more restricted &quot;scripting&quot; system where you only have control over a very specific subset of the game behaviour (e.g. pre-define a set of triggers and behaviours, but allow the users to combine them in any way they like, but design the triggers so that nothing bad can happen).&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37327" PostHistoryTypeId="25" PostId="16121" RevisionGUID="9bde4eca-b8b4-4397-baf6-059d1e62a781" CreationDate="2011-08-20T21:37:38.883" Comment="http://twitter.com/#!/StackGameDev/status/105030758539853825" />
  <row Id="37328" PostHistoryTypeId="2" PostId="16235" RevisionGUID="10051b0e-227b-4067-bad0-e57cac2252ee" CreationDate="2011-08-20T21:54:37.387" UserId="3128" Text="In Minecraft when you look at water the deeper you view the darker it gets.  Does anyone know how to code something like that?&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/PphWX.jpg" />
  <row Id="37329" PostHistoryTypeId="1" PostId="16235" RevisionGUID="10051b0e-227b-4067-bad0-e57cac2252ee" CreationDate="2011-08-20T21:54:37.387" UserId="3128" Text="Does anyone know how to make water appear darker by depth? (like Minecraft)" />
  <row Id="37330" PostHistoryTypeId="3" PostId="16235" RevisionGUID="10051b0e-227b-4067-bad0-e57cac2252ee" CreationDate="2011-08-20T21:54:37.387" UserId="3128" Text="&lt;minecraft&gt;" />
  <row Id="37331" PostHistoryTypeId="5" PostId="16235" RevisionGUID="3e17067a-53d8-42d3-b199-250bfc134ab1" CreationDate="2011-08-20T22:05:34.957" UserId="3128" Comment="Added game without the effect for comparison" Text="In Minecraft when you look at water the deeper you view the darker it gets.  Does anyone know how to code something like that?&#xD;&#xA;&#xD;&#xA;Minecraft with effect&#xD;&#xA;![minecraft with effect][1]&#xD;&#xA;&#xD;&#xA;similar game without effect&#xD;&#xA;![similar game without effect][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/PphWX.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/7kWpW.jpg" />
  <row Id="37332" PostHistoryTypeId="6" PostId="16235" RevisionGUID="5d9e2f77-d0fd-4a70-93e8-8f0a6d46e129" CreationDate="2011-08-20T22:25:51.987" UserId="118" Comment="edited tags" Text="&lt;effects&gt;" />
  <row Id="37333" PostHistoryTypeId="6" PostId="16208" RevisionGUID="44db3158-afd6-4b06-aa38-fefc87e0667c" CreationDate="2011-08-20T22:27:09.460" UserId="118" Comment="edited tags" Text="&lt;iphone&gt;&lt;box2d&gt;&lt;windows-phone-7&gt;&lt;farseer-physics-engine&gt;&lt;porting&gt;" />
  <row Id="37334" PostHistoryTypeId="2" PostId="16236" RevisionGUID="3ef1c963-3872-4336-8588-fa3212817c18" CreationDate="2011-08-20T23:01:36.343" UserId="5275" Text="I have a enemy in my game that is supposed to chase the player around the world and I thought it be a good idea for the enemy not to pass through the walls like a ghost, the levels are tile based, I've initially gone with the wall avoidance since a tile is essentially four lines, but I'm beginning second guessing the idea. &#xD;&#xA;&#xD;&#xA;So should I go with Wall Avoidance Steering Behavior or Obstacle Avoidance Behavior ? " />
  <row Id="37335" PostHistoryTypeId="1" PostId="16236" RevisionGUID="3ef1c963-3872-4336-8588-fa3212817c18" CreationDate="2011-08-20T23:01:36.343" UserId="5275" Text="Obstacle Avoidance or Wall Avoidance for Tiles ?" />
  <row Id="37336" PostHistoryTypeId="3" PostId="16236" RevisionGUID="3ef1c963-3872-4336-8588-fa3212817c18" CreationDate="2011-08-20T23:01:36.343" UserId="5275" Text="&lt;ai&gt;" />
  <row Id="37337" PostHistoryTypeId="2" PostId="16237" RevisionGUID="22984f11-339b-433a-9716-bd193af87e8d" CreationDate="2011-08-20T23:24:23.613" UserId="2390" Text="Perhaps I'm misunderstanding the question, but why can't you just change the colour of the blocks depending on their depth?&#xD;&#xA;&#xD;&#xA;If you have the depth *d* (in blocks, starting at 0) then a reasonable equation for brightness would be:&#xD;&#xA;&#xD;&#xA;*L* = (1-*m*) *e*&lt;sup&gt;-*kd*&lt;/sup&gt;+ *m*&#xD;&#xA;&#xD;&#xA;*k* controls how fast it gets darker (higher = faster). A reasonable value would be 0.5.  &#xD;&#xA;*m* is the minimum brightness you want.  &#xD;&#xA;*L* varies from 0 to 1.&#xD;&#xA;&#xD;&#xA;If you don't know how to change the colour of the blocks in whatever graphics API you are using then please ask that as a separate question (stating what API you use, and whether or not you are using shaders)." />
  <row Id="37338" PostHistoryTypeId="5" PostId="16237" RevisionGUID="20f7e057-a246-4bfe-b224-65075e4c62d1" CreationDate="2011-08-20T23:50:44.210" UserId="2390" Comment="Added code." Text="Perhaps I'm misunderstanding the question, but why can't you just change the colour of the blocks depending on their depth?&#xD;&#xA;&#xD;&#xA;If you have the depth *d* (in blocks, starting at 0) then a reasonable equation for brightness would be:&#xD;&#xA;&#xD;&#xA;*L* = (1-*m*) *e*&lt;sup&gt;-*kd*&lt;/sup&gt;+ *m*&#xD;&#xA;&#xD;&#xA;Code: `L = (1.0 - m) * exp(-k * d) + m;`&#xD;&#xA;&#xD;&#xA;*k* controls how fast it gets darker (higher = faster). A reasonable value would be 0.5.  &#xD;&#xA;*m* is the minimum brightness you want.  &#xD;&#xA;*L* varies from 0 to 1.&#xD;&#xA;&#xD;&#xA;If you don't know how to change the colour of the blocks in whatever graphics API you are using then please ask that as a separate question (stating what API you use, and whether or not you are using shaders)." />
  <row Id="37339" PostHistoryTypeId="2" PostId="16238" RevisionGUID="30133c14-3a74-49e4-b16d-8bfaa6d8b48d" CreationDate="2011-08-21T00:07:47.923" UserId="7946" Text="Pure obstacle avoidance algorithms in situations like this will create incredibly odd-looking behavior. For example, the creature will look like it's drunk when it's wiggling around some static obstacle in the middle of the way. Or it might take a very long route to get around some obstacles when going around the other way would've taken the enemy a tenth of the time to get to you.&#xD;&#xA;&#xD;&#xA;It can also introduce some bugs. For example, if you mark your blocking tiles as obstacles and let the enemies steer away from them based on both distance to the obstacle and distance to you (both in terms of magnitude as well as direction), you  might get a situation like this, where the algorithm will make the enemy walk away from the player instead of towards him or where the creature simply may get stuck:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;Or your enemy looks like a dumbass:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;(or like a cheater if it simply pushes through the small passage :P)&#xD;&#xA;&#xD;&#xA;These are pretty dumb examples since it assumes that your avoidance algorithm is very simple (and stupid), but these kinds of scenarios occur sometimes, no matter what kind of algorithm for steering or avoidance you use. &#xD;&#xA;&#xD;&#xA;The reason for this is that the enemy has no &quot;whole path&quot;-information, which means that while its current decision based upon the currently relevant obstacle may be correct, it may push him into a state towards the next obstacle where this kind of equilibrium or false decision behavior occurs.&#xD;&#xA;&#xD;&#xA;There are probably weird things that you can incorporate into your avoidance algorithm which minimizes these scenarios or makes them go away completely, but I can't help but think that this is ugly.&#xD;&#xA;&#xD;&#xA;Instead, just use a regular path finding algorithm like [A*][3] to search a path towards your character. Especially in tile-based games, where the cost between nodes (your tiles) usually stays constant, that kind of algorithm is an easy choice.&#xD;&#xA;&#xD;&#xA;A* is usually pretty costly if you want to recalculate the path at every frame, but as long as it stays simple (just a couple of enemies) this shouldn't be a problem at all (processors are **fast**). &#xD;&#xA;&#xD;&#xA;You can also opt to only update the path every couple of frames or so since the player won't notice it if the path was calculated once or twice in those 60 frames during the last second.&#xD;&#xA;&#xD;&#xA;By the way, if you look for some good explanation for the A* algorithm, I can really recommend the chapter on it in [Game Programming Gems 1][4] (3.3 to 3.5). The book may be hard (or expensive) to come by (it's been a while, but when I searched for it a while ago it was pretty expensive if you wanted to buy it new), but it's worth the money.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/ID2X9.png&#xD;&#xA;  [2]: http://i.stack.imgur.com/ZaDAz.png&#xD;&#xA;  [3]: http://en.wikipedia.org/wiki/A_star&#xD;&#xA;  [4]: http://www.asawicki.info/Download/Misc/GameProgrammingGemsTOC.html" />
  <row Id="37340" PostHistoryTypeId="2" PostId="16239" RevisionGUID="7e9d9616-129d-4f28-a43f-e5d3e47b5d41" CreationDate="2011-08-21T00:31:58.990" UserId="5824" Text="Is your entities texture created with a format that has an alpha channel, and cleared to transparent before use?" />
  <row Id="37341" PostHistoryTypeId="2" PostId="16240" RevisionGUID="deb10da9-33af-406f-b383-422ccaba9c90" CreationDate="2011-08-21T00:32:03.333" UserId="2332" Text="You should get [Programming Game AI by Example][1]&#xD;&#xA;&#xD;&#xA;Yes, steering behaviours are easy to implement, but the seek/pursuit behaviour only works as a decent &quot;hunting&quot; behaviour when there are no obstacles between the player and the enemy. If there are obstacles or walls, then you're pretty much screwed in most situations.&#xD;&#xA;&#xD;&#xA;You should seriously consider using A* to generate a path between the enemy and the player. It's not a very difficult algorithm to implement and there are countless examples on the internet. If by &quot;realism&quot; you mean you don't want your enemy to rigidly follow a list of points on a path, that's absolutely fine. Just seek to each point in the path. It will still give a realistic looking hunting motion without getting stuck anywhere.&#xD;&#xA;&#xD;&#xA;That being said, your implementation of the wall avoidance algorithm should not be causing you that much hassle if you know how to get it working with lines. Your agent should have a feeler extending from its front that intersects with the line and you can calculate the repulsion force from:&#xD;&#xA;&#xD;&#xA;Force = Penetration Depth of Feeler x Wall Normal&#xD;&#xA;&#xD;&#xA;Regardless of your wall being a tile (assuming a tile here means a square or rectangle), each side of the tile will have a normal and this combined with the feeler is the key to getting wall avoidance right.&#xD;&#xA;&#xD;&#xA;Buckland's implementation of Obstacle Avoidance created two more &quot;feelers&quot; for the agent heading forward-left and forward-right of the agent. When any three of the feelers intersects and object the appropriate repulsion force is calculated and applied to the agent.&#xD;&#xA;&#xD;&#xA;***TL;DR*** - Use A*! Wall Avoidance is the same whether you're using a single line or a square/rectangle/hexagon. Each side of the shape has a normal.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.co.uk/Programming-Game-Example-Mat-Buckland/dp/1556220782/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1313885574&amp;sr=1-1" />
  <row Id="37342" PostHistoryTypeId="2" PostId="16241" RevisionGUID="6be0a353-16ed-48d8-b9e0-fbb9d3d60859" CreationDate="2011-08-21T00:37:26.043" UserId="3830" Text="I believe that the sky lighting effect in Minecraft is straight down - things get shaded by what is above them no matter where the sun is.  Then local lighting from torches, etc. is applied with a dropoff effect - the farther away from the light source, the less light a cube gets.&#xD;&#xA;&#xD;&#xA;If done this way, each layer of water would cumulatively shadow the layer below it, so each becomes progressively darker.  Tree foliage provides shade like this, however it is not cumulative.  You get the same shade under a tree whether it's 1 or 100 foliage cubes.&#xD;&#xA;&#xD;&#xA;One clue that this is the method being used is that water doesn't get darker when farther away from the viewer - only as you go down.  Yes, the fog effect does kick in at distance, but not the water dark effect.&#xD;&#xA;&#xD;&#xA;So the basic formula for calculating lighting would be something like this in pseudo-code...&#xD;&#xA;&#xD;&#xA;    light_on_cube = 1.0&#xD;&#xA;    for each cube above target cube, from lowest to highest {&#xD;&#xA;       if cube being examined is tree foliage&#xD;&#xA;          light_on_cube = 0.5&#xD;&#xA;       else if cube being examined is water&#xD;&#xA;          light_on_cube = light_on_cube - 0.1&#xD;&#xA;       else if cube being examined is solid &#xD;&#xA;          light_on_cube = 0&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This isn't perfect for calculating lighting under overhangs or in caves, as it would be pitch dark under an overhang using this method.  But one could add in both local light sources (torches, fires, etc.) as well as treating sun lit blocks as light sources.  Something like this might do it...&#xD;&#xA;&#xD;&#xA; 1. Calculate light from sun from directly above (via above pseudo-code) for each cube.&#xD;&#xA; 2. If a cube has a light source next to it, consider it fully lit (1.0)&#xD;&#xA; 2. If a cube is receiving no sun from directly above, give it some light based on how far away it is from a fully lit cube.  Closer means more light, farther away means less (until zero).&#xD;&#xA;&#xD;&#xA;The idea here is that if a cube is lit by the sun or a torch, the cube next to it is going to also be lit in some way.  And the farther away you are from that lit cube, the less light there will be.  It's sort of a kludge way to estimate diffuse lighting but I think (?) it would work.&#xD;&#xA;" />
  <row Id="37343" PostHistoryTypeId="25" PostId="16235" RevisionGUID="73a25d85-394a-4e83-9b4d-040b0f2bf162" CreationDate="2011-08-21T00:37:39.213" Comment="http://twitter.com/#!/StackGameDev/status/105076059099242496" />
  <row Id="37344" PostHistoryTypeId="2" PostId="16242" RevisionGUID="451c58b7-d317-44c4-b1d5-32f936a74906" CreationDate="2011-08-21T00:44:58.283" UserId="8240" Text="You cannot really expect two different physics engines to get binary identical results. They all do their computations differently, and thus they will come up with different results." />
  <row Id="37345" PostHistoryTypeId="2" PostId="16243" RevisionGUID="401b051a-2726-43be-9c32-cd4f27d7f50a" CreationDate="2011-08-21T01:08:56.327" UserId="9384" Text="I'm not quite sure what I need to do, but I have a ball falling from the sky and it needs to bounce when it hits an object. Do I configure the ball in some way or do I need to setup a spring object or possibly do something on collision?" />
  <row Id="37346" PostHistoryTypeId="1" PostId="16243" RevisionGUID="401b051a-2726-43be-9c32-cd4f27d7f50a" CreationDate="2011-08-21T01:08:56.327" UserId="9384" Text="Bouncing effect in Farseer WP7" />
  <row Id="37347" PostHistoryTypeId="3" PostId="16243" RevisionGUID="401b051a-2726-43be-9c32-cd4f27d7f50a" CreationDate="2011-08-21T01:08:56.327" UserId="9384" Text="&lt;windows-phone-7&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="37348" PostHistoryTypeId="2" PostId="16244" RevisionGUID="f450619b-f280-4e3f-a8ec-71ac061a3dfb" CreationDate="2011-08-21T01:10:25.030" UserId="9385" Text="You might want to think about using delta time, that's the time taken from 1 frame to the other.&#xD;&#xA;&#xD;&#xA;When you implemented it, it'll return you float: 1 if it has taken 1 second to draw the next frame, and it'll return around: 0.0166666666666667 for a nice fps of 60.&#xD;&#xA;&#xD;&#xA;This way you can multiply your moving speed with the delta time, meaning your object will move the &quot;moving speed&quot; you gave it per second, but then nicely divided over all frames.&#xD;&#xA;&#xD;&#xA;O yeah before I forget if the object moves in (example in 2d) both ways (X and Y) use Sinus and Co-sinus to calculate the real X and Y value it moves. (also in 3D).&#xD;&#xA;&#xD;&#xA;Save it all to an Vector3 or just in some self made floats/doubles and let all object use it as a relative point, like: my position is? parent.position + my.position = my real position.&#xD;&#xA;&#xD;&#xA;Hope this will help you further. and good luck!" />
  <row Id="37349" PostHistoryTypeId="5" PostId="16057" RevisionGUID="0bfdce59-024e-4b87-a674-d52907bfd144" CreationDate="2011-08-21T01:11:11.037" UserId="288" Comment="added 37 characters in body" Text="XNA has a 4x4 `Matrix` class (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.matrix.aspx&quot;&gt;MSDN&lt;/a&gt;) which can be used everywhere that you might use a 3x3 matrix - just leave the third or last (depends on your usage) row and column as their identity values. In most cases you should just use that. The only benefit of writing your own 3x3 matrix is if you need the smaller data structure (36 bytes instead of 64).&#xD;&#xA;&#xD;&#xA;If you intend to apply *translation* transformations to your 3D vector, then you *need* a 4x4 matrix. The vector implicitly has a fourth element that is equal to 1. Without going through the maths - this allows it to multiply in the translation elements of the matrix. (&lt;a href=&quot;http://en.wikipedia.org/wiki/Translation_matrix&quot;&gt;Details on Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Transformation_matrix&quot;&gt;see also&lt;/a&gt;)&#xD;&#xA;&#xD;&#xA;Matrices can be multiplied together to combine multiple transformation operations into a single matrix. For example:&#xD;&#xA;&#xD;&#xA;    Matrix transform = Matrix.CreateScale(2f)&#xD;&#xA;            * Matrix.CreateRotationZ(1f)&#xD;&#xA;            * Matrix.CreateTranslation(10f, 10f, 10f);" />
  <row Id="37350" PostHistoryTypeId="5" PostId="16244" RevisionGUID="c2a3c9dc-61c5-4b71-90f3-c82b581b5a53" CreationDate="2011-08-21T01:16:32.107" UserId="9385" Comment="added 149 characters in body" Text="You might want to think about using delta time, that's the time taken from 1 frame to the other.&#xD;&#xA;&#xD;&#xA;When you implemented it, it'll return you a float/double: 1 if it has taken 1 second to draw the next frame.&#xD;&#xA;It'll return around: 0.0166666666666667 for a nice fps of 60.&#xD;&#xA;&#xD;&#xA;This way you can multiply your moving speed with the delta time, meaning your object will move the &quot;moving speed&quot; you gave it per second, but then nicely divided over all frames.&#xD;&#xA;&#xD;&#xA;O yeah before I forget if the object moves in (example in 2d) both ways (X and Y) use Sinus and Co-sinus to calculate the real X and Y value it moves. (also in 3D).&#xD;&#xA;&#xD;&#xA;Save it all to an Vector3 or just in some self made floats/doubles and let all object use it as a relative point, like: my position is? parent.position + my.position = my real position.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For your other questions:&#xD;&#xA;I think drawing separated images will be my goal, both ways will take in around the same amount of memory.&#xD;&#xA;&#xD;&#xA;Hope this will help you further. and good luck!&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37351" PostHistoryTypeId="2" PostId="16245" RevisionGUID="dcc974cd-ce78-4b24-a2a7-36a60df19976" CreationDate="2011-08-21T01:29:44.983" UserId="9384" Text="I figured it out. Requires a bit of tweaking but it works as I expect.&#xD;&#xA;&#xD;&#xA;    Body ball1 = PrefabBodtFactory.CreateBody(PrefabType.Ball, _world, new Vector2(3.8f, -0.75f));&#xD;&#xA;                ball1.CreateFixture(new CircleShape(0.25f, 0.5f));&#xD;&#xA;                ball1.FixtureList[0].Restitution = 1f;&#xD;&#xA;                ball1.ApplyLinearImpulse(new Vector2(0.1f, 0));&#xD;&#xA;                _bodies.Add(ball1);" />
  <row Id="37352" PostHistoryTypeId="2" PostId="16246" RevisionGUID="1d533e07-8196-4ae0-86f1-a62061847651" CreationDate="2011-08-21T01:58:38.287" UserId="4360" Text="I have a webgl based 2.5D platformer game, and I would like to add a simple blob shadow under the character to help the player with the platforming. &#xD;&#xA;&#xD;&#xA;How is this normally done?  &#xD;&#xA;As you can see below, I do not need to worry about sloped terrain if that matters.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/OcxxU.jpg" />
  <row Id="37353" PostHistoryTypeId="1" PostId="16246" RevisionGUID="1d533e07-8196-4ae0-86f1-a62061847651" CreationDate="2011-08-21T01:58:38.287" UserId="4360" Text="Creating a blob shadow under the character" />
  <row Id="37354" PostHistoryTypeId="3" PostId="16246" RevisionGUID="1d533e07-8196-4ae0-86f1-a62061847651" CreationDate="2011-08-21T01:58:38.287" UserId="4360" Text="&lt;webgl&gt;&lt;blobshadow&gt;&lt;shadow&gt;" />
  <row Id="37355" PostHistoryTypeId="5" PostId="16228" RevisionGUID="76adf23a-ef36-4fbb-b7ea-4a7568cf3797" CreationDate="2011-08-21T02:00:08.150" UserId="2698" Comment="Improved links" Text="I like these approaches:&#xD;&#xA;&#xD;&#xA;* [Outboard component-based entity system architecture][1]&#xD;&#xA;* [Entity Systems are the Future of MMOs Part 5][2]&#xD;&#xA;&#xD;&#xA;Shortly: Avoid mixing inheritance with components. Components **are not** behavior. Behavior is implemented in some single-instanced subsystems. In such way you can easy manage component creation, templating and also storing game entity structure and current state in a relational database.&#xD;&#xA;&#xD;&#xA;[1]:http://www.gamedev.net/topic/463508-outboard-component-based-entity-system-architecture/page__st__40__p__4089913#entry4089913&#xD;&#xA;[2]:http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/" />
  <row Id="37356" PostHistoryTypeId="2" PostId="16247" RevisionGUID="fd323381-9db8-498b-9b0f-eb4e1f9b09ac" CreationDate="2011-08-21T02:11:24.167" UserId="1323" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the oceans floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\min(\left ( \vec{n}\cdot \vec{p} - s\right ),0) \cdot \cos(\alpha)](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction and the water's surface normal.&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The rightmost factor will equal 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down.&#xD;&#xA;&#xD;&#xA;##Faking caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth." />
  <row Id="37357" PostHistoryTypeId="2" PostId="16248" RevisionGUID="49707970-7562-4b6b-9780-ced118e0d949" CreationDate="2011-08-21T02:17:29.317" UserId="9386" Text="I have used Kodu with nearly 1000 students from age 8 to 17. Great for making simple to more complex games.&#xD;&#xA;&#xD;&#xA;Web based game creation tools like Sploder and Atmosphir are also popular with kids." />
  <row Id="37358" PostHistoryTypeId="16" PostId="16248" RevisionGUID="f992f218-441a-479e-8415-093d2fa153b0" CreationDate="2011-08-21T02:17:29.317" UserId="9386" />
  <row Id="37359" PostHistoryTypeId="5" PostId="16247" RevisionGUID="bc4e03d0-2810-45e6-9f59-a4b3c6401dee" CreationDate="2011-08-21T02:25:00.490" UserId="1323" Comment="added note about colour gradient" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the oceans floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\min(\left ( \vec{n}\cdot \vec{p} - s\right ),0) \cdot \cos(\alpha)](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction and the water's surface normal.&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The rightmost factor will equal 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface." />
  <row Id="37360" PostHistoryTypeId="2" PostId="16249" RevisionGUID="199f0919-bb62-49f5-8b4b-2e1998945d5a" CreationDate="2011-08-21T03:13:51.243" UserId="9387" Text="Whats the best way to start game development in C#?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" />
  <row Id="37361" PostHistoryTypeId="1" PostId="16249" RevisionGUID="199f0919-bb62-49f5-8b4b-2e1998945d5a" CreationDate="2011-08-21T03:13:51.243" UserId="9387" Text="Starting Game Development in C#" />
  <row Id="37362" PostHistoryTypeId="3" PostId="16249" RevisionGUID="199f0919-bb62-49f5-8b4b-2e1998945d5a" CreationDate="2011-08-21T03:13:51.243" UserId="9387" Text="&lt;c#&gt;" />
  <row Id="37363" PostHistoryTypeId="25" PostId="16236" RevisionGUID="962e91ec-0436-4f45-b2dc-e3a4bbfc2c04" CreationDate="2011-08-21T03:37:39.327" Comment="http://twitter.com/#!/StackGameDev/status/105121358903644161" />
  <row Id="37364" PostHistoryTypeId="2" PostId="16250" RevisionGUID="ee586f36-01e4-444b-8082-8cbb2a23337d" CreationDate="2011-08-21T03:57:49.887" UserId="9388" Text="Slick2D and GOLDEN T GAME ENGINE" />
  <row Id="37365" PostHistoryTypeId="16" PostId="16250" RevisionGUID="32145b46-2e60-4702-97b2-8a35d24174df" CreationDate="2011-08-21T03:57:49.887" UserId="9388" />
  <row Id="37366" PostHistoryTypeId="2" PostId="16251" RevisionGUID="1d2673b8-77e7-436f-b026-7731a8e4d776" CreationDate="2011-08-21T04:11:17.773" UserId="159" Text="&quot;Best&quot; is very hard to answer. Each person learns differently, and what works for me may not work for you. That being said, look into the XNA framework. You will be able to create games for the PC, Xbox, and Windows Phone. It is a pretty easy library to pick up (if you already know C#)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Start by making something simple. Maybe a static sprite that moves across the screen when you press certain buttons. Add some objects to play with collision. Then when you feel comfortable with that work on sprite animations, and a simple camera. It really isn't hard.&#xD;&#xA;&#xD;&#xA;If you want a jump start, look at something like [Flat Red Ball][1]. It is simple 2.5D game engine that might help. If you want to make your own, look at [this tile engine series][2]. It will show you stuff like how to make a camera, animations, collision, and the rest. There is also [this 2d tutorial series][3]. I don't have a nice playlist for it so you will have to search youtube for the different parts. For even more resources, check out the [ever-growing list of samples][4] on the App Hub site.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com&#xD;&#xA;  [2]: http://www.youtube.com/view_play_list?p=0A865073DA96A7DA&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=caLSZStt050&#xD;&#xA;  [4]: http://create.msdn.com/en-US/education/catalog/" />
  <row Id="37367" PostHistoryTypeId="5" PostId="9464" RevisionGUID="ff559b87-cae6-4b6a-8404-d43945f1745d" CreationDate="2011-08-21T04:24:30.387" UserId="159" Comment="the kodu link was broken. fixed it" Text="Not looked at it myself, but I thought I'd mention [Kodu][1]. What works for you will depend a lot on age and how keen they are.&#xD;&#xA;&#xD;&#xA;Way back when I was a kid we had the [Shoot'Em-Up Construction Kit][2]. :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://research.microsoft.com/en-us/projects/kodu/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Shoot'Em-Up_Construction_Kit" />
  <row Id="37368" PostHistoryTypeId="2" PostId="16252" RevisionGUID="5d8aa162-7f0c-47d3-8617-afe9bcf110e1" CreationDate="2011-08-21T05:34:40.973" UserId="9389" Text="This is my first post at this section (XNA and game development). I'm trying to get something the below image. As you can see, there's a highway and inside of it, there'll be some objects moving (millisecond). I guess the streeth behavier is like a pipeline. When the highway loads an object, it appears at the beggining and it'll be moving through the highware until it arrives in the another extreme of the highway.&#xD;&#xA;&#xD;&#xA;My main problem is, how can I do to move several objects only inside of the highway?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/WToTj.png&#xD;&#xA;&#xD;&#xA;Thanks in advance." />
  <row Id="37369" PostHistoryTypeId="1" PostId="16252" RevisionGUID="5d8aa162-7f0c-47d3-8617-afe9bcf110e1" CreationDate="2011-08-21T05:34:40.973" UserId="9389" Text="What I need to know to create this control? (Like pipeline)" />
  <row Id="37370" PostHistoryTypeId="3" PostId="16252" RevisionGUID="5d8aa162-7f0c-47d3-8617-afe9bcf110e1" CreationDate="2011-08-21T05:34:40.973" UserId="9389" Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;windows-phone-7&gt;" />
  <row Id="37371" PostHistoryTypeId="2" PostId="16253" RevisionGUID="1bd82b19-9c06-4126-bf51-93c7a3eeff6c" CreationDate="2011-08-21T05:58:49.360" UserId="1167" Text="The way most windowing systems handle it, as well as the games that I've worked on (and had to partially implement myself) is to have a bit on each button that detects if the mouse entered the mouse down state over the given button. It is only set the frame that the mouse goes down and only cleared when the mouse button is released. If and only if the mouse is released over the button and the bit is set, then fire off the button clicked event. &#xD;&#xA;&#xD;&#xA;(You probably also want a flag that is set true when the bit is set and the mouse is hovering over your button, so that you can change the button to use a pressed texture instead of it's normal one.)&#xD;&#xA;&#xD;&#xA;This is the basic scheme behind most buttons. Go ahead and find a dialog prompt. Press down on the cancel button but do not let go. The button becomes depressed while the mouse is over it, and goes back to normal if your mouse stops hovering over it, but it will go back to pressed if you move back over it. It only runs its action if you let go and you're over it. Do not use a millisecond count, that's mostly just for detecting double clicks within your threshold. &#xD;&#xA;&#xD;&#xA;(and if you really want to get fancy, have events that you can hook up to each one of those transitions. e.g. MouseOver on enter, and on exit, MouseDown enter/exit, MouseUp enter/exit, MouseClicked enter/exit, etc.)" />
  <row Id="37372" PostHistoryTypeId="25" PostId="16136" RevisionGUID="53122ba6-49c4-47be-a367-ffb72c37246a" CreationDate="2011-08-21T06:37:40.073" Comment="http://twitter.com/#!/StackGameDev/status/105166659051982848" />
  <row Id="37374" PostHistoryTypeId="2" PostId="16254" RevisionGUID="9e0ccd0c-21f8-4aea-9518-684a51ef8b68" CreationDate="2011-08-21T07:05:12.263" UserId="9021" Text="I`m new to cocos2d library, How can I handle a touch event in Cocos2d for Android?&#xD;&#xA;&#xD;&#xA;And How to move the sprite with the ccTouchesMoved.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Jubin mehta&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37375" PostHistoryTypeId="1" PostId="16254" RevisionGUID="9e0ccd0c-21f8-4aea-9518-684a51ef8b68" CreationDate="2011-08-21T07:05:12.263" UserId="9021" Text="Cocos2D Touch Events" />
  <row Id="37376" PostHistoryTypeId="3" PostId="16254" RevisionGUID="9e0ccd0c-21f8-4aea-9518-684a51ef8b68" CreationDate="2011-08-21T07:05:12.263" UserId="9021" Text="&lt;cocos2d&gt;" />
  <row Id="37377" PostHistoryTypeId="2" PostId="16255" RevisionGUID="973661e8-b8dc-44ae-b204-6c5fdee80e6f" CreationDate="2011-08-21T07:50:55.887" UserId="2698" Text="That depends: how do you _want_ them to move?&#xD;&#xA;&#xD;&#xA;### The unnatural option&#xD;&#xA;&#xD;&#xA;Define a preset path with a series of vertices and have the balloons follow the path strictly.&#xD;&#xA;&#xD;&#xA;### A more natural option&#xD;&#xA;&#xD;&#xA;Make the balloons [boids][1] and implement [crowd path following behaviour][2], which will have them follow the path (and not get too far from it) whilst avoiding collision with each other. Both those pages contain Java applet examples.&#xD;&#xA;&#xD;&#xA;The author of those pages notes he cannot distribute the source code of the examples, however [OpenSteer][3] offers C++ implementations of those algorithms.&#xD;&#xA;&#xD;&#xA;(I don't know of any existing C# boids library)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.red3d.com/cwr/boids/&#xD;&#xA;[2]:http://www.red3d.com/cwr/steer/CrowdPath.html&#xD;&#xA;[3]:http://opensteer.sourceforge.net/" />
  <row Id="37378" PostHistoryTypeId="5" PostId="16255" RevisionGUID="7ccb87df-e8a0-4215-b486-c7ed0ddbc352" CreationDate="2011-08-21T08:07:02.397" UserId="2698" Comment="added 69 characters in body" Text="That depends: how do you _want_ them to move?&#xD;&#xA;&#xD;&#xA;### The unnatural option&#xD;&#xA;&#xD;&#xA;Define a preset path with a series of vertices and have the balloons follow the path strictly.&#xD;&#xA;&#xD;&#xA;### A more natural option&#xD;&#xA;&#xD;&#xA;Make the balloons [boids][1] and implement [crowd path following behaviour][2], which will have them follow the path (and not get too far from it) whilst avoiding collision with each other. Both those pages contain Java applet examples.&#xD;&#xA;&#xD;&#xA;The author of those pages notes he cannot distribute the source code of the examples, however [OpenSteer][3] offers C++ implementations of those algorithms.&#xD;&#xA;&#xD;&#xA;(I'm not aware of any C# boids libraries, or any decent tutorials - the best I've done is just follow code examples)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:http://www.red3d.com/cwr/boids/&#xD;&#xA;[2]:http://www.red3d.com/cwr/steer/CrowdPath.html&#xD;&#xA;[3]:http://opensteer.sourceforge.net/" />
  <row Id="37379" PostHistoryTypeId="2" PostId="16256" RevisionGUID="3f1b352f-fe48-4dd9-b45b-6e1070e80878" CreationDate="2011-08-21T09:16:43.293" UserId="5473" Text="Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. &#xD;&#xA;&#xD;&#xA;The tougher bit comes in where your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms. In that case you need a way to split that shadow plane over one or more platforms.&#xD;&#xA;&#xD;&#xA;**Geometric clipping** (more accurate)&#xD;&#xA;&#xD;&#xA;This is the more human way to think about the problem, being analog. Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :) This clipping should be particularly easy, as every plane in your screenshot appears to be aligned to your world axes. If this should change and no longer be the case (eg. you implement ramps) I would stick with this approach over the one mentioned below.&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance.&#xD;&#xA;&#xD;&#xA;**Grid-based shadow using discrete cells** Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to become the case later in your development, I would definitely opt for the geometric approach as it will be easier to maintain your sanity under those circumstances." />
  <row Id="37380" PostHistoryTypeId="5" PostId="16256" RevisionGUID="f83f1198-757b-40f3-a518-e6ae06a5a95b" CreationDate="2011-08-21T09:22:10.150" UserId="5473" Comment="deleted 256 characters in body" Text="Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. &#xD;&#xA;&#xD;&#xA;The tougher bit comes in where your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms. In that case you need a way to split that shadow plane over one or more platforms.&#xD;&#xA;&#xD;&#xA;**Geometric clipping** (more accurate)&#xD;&#xA;&#xD;&#xA;This is the more analog approach. Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto -- you'll need to do multiple raycasts to determine this. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :)&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance.&#xD;&#xA;&#xD;&#xA;**Grid-based shadow using discrete cells** Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to b the case, I would opt for the geometric approach as it will be easier to maintain your sanity under those circumstances." />
  <row Id="37381" PostHistoryTypeId="5" PostId="16256" RevisionGUID="b1b19b38-2ae3-498f-8214-76a60cf2745f" CreationDate="2011-08-21T09:27:37.050" UserId="5473" Comment="deleted 256 characters in body" Text="Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. &#xD;&#xA;&#xD;&#xA;The tougher bit comes in where your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms. In that case you need a way to split that shadow plane over one or more platforms.&#xD;&#xA;&#xD;&#xA;**Geometric clipping** (more accurate)&#xD;&#xA;&#xD;&#xA;This is the more analog approach. Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto -- you'll need to do multiple raycasts, one from each corner of your shadow plane, to determine this. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :)&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance.&#xD;&#xA;&#xD;&#xA;**Grid-based shadow using discrete cells** Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to b the case, I would opt for the geometric approach as it will be easier to maintain your sanity under those circumstances. However under other circumstance I would use the grid based approach." />
  <row Id="37382" PostHistoryTypeId="5" PostId="16256" RevisionGUID="43e44ef0-60ed-4511-9d00-72910af3391c" CreationDate="2011-08-21T09:33:25.263" UserId="5473" Comment="deleted 256 characters in body" Text="**The Basics**&#xD;&#xA;&#xD;&#xA;Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. This will work, but if your character is near a plaform edge, his shadow will go off into empty space.&#xD;&#xA;&#xD;&#xA;**Beyond the Basics**&#xD;&#xA;&#xD;&#xA;So what about when your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms? In that case you need a way to split that shadow plane over one or more platforms. There's a question that needs to be answered first, here: Will your platforms ever be situated differently along the z axis, as well as x and y (as in your screenshot) i.e. will your world be true 3D rather than pseudo-3D? This fundamentally affects the logic you can use for shadow clipping (and everything else, too).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Geometric clipping*&#xD;&#xA;&#xD;&#xA;Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto -- you'll need to do multiple raycasts, one from each corner of your shadow plane, to determine this. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :)&#xD;&#xA;&#xD;&#xA;If you are using 2D, this can be greatly simplified to line math, i.e. checking range overlaps.&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance.&#xD;&#xA;&#xD;&#xA;*Grid-based clipping*&#xD;&#xA;&#xD;&#xA;(Applies only if you really want a nice 3D shadow, or are otherwise using true 3D platform placements)&#xD;&#xA;&#xD;&#xA;Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to b the case, I would opt for the geometric approach as it will be easier to maintain your sanity under those circumstances. However if using platforms placed arbitrarily in all 3 dimensions, I would definitely opt for the grid-based approach." />
  <row Id="37383" PostHistoryTypeId="5" PostId="16254" RevisionGUID="b15c7168-21a0-4c04-af41-88cc541ad696" CreationDate="2011-08-21T09:33:42.473" UserId="20" Comment="changed title, spelling" Text="I`m new to the cocos2d library. How can I handle a touch event in cocos2d for Android?&#xD;&#xA;&#xD;&#xA;And how to move a sprite using `ccTouchesMoved`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37384" PostHistoryTypeId="4" PostId="16254" RevisionGUID="b15c7168-21a0-4c04-af41-88cc541ad696" CreationDate="2011-08-21T09:33:42.473" UserId="20" Comment="changed title, spelling" Text="How to handle touch events in cocos2d for android" />
  <row Id="37385" PostHistoryTypeId="25" PostId="16150" RevisionGUID="4802d926-293c-406d-94d4-3bfd6b7cfef7" CreationDate="2011-08-21T09:37:40.560" Comment="http://twitter.com/#!/StackGameDev/status/105211960425070593" />
  <row Id="37386" PostHistoryTypeId="2" PostId="16257" RevisionGUID="7716f3ce-070b-46e3-9766-f92dc9b1b47d" CreationDate="2011-08-21T09:48:20.280" UserId="20" Text="You need to enable touches by adding `this.setIsTouchEnabled(true);` to the constructor of your `CCLayer`. Then override `ccTouchesMoved`, like this:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    public boolean ccTouchesMoved(MotionEvent e)&#xD;&#xA;    {&#xD;&#xA;        // convert event location to CCPoint&#xD;&#xA;        CCPoint p = CCDirector.sharedDirector().convertToGL(e.getX(), e.getY());&#xD;&#xA;        &#xD;&#xA;        // update the position of your sprite&#xD;&#xA;        yourSprite.setPosition(p.x, p.y);&#xD;&#xA;     &#xD;&#xA;        return true;&#xD;&#xA;    }" />
  <row Id="37387" PostHistoryTypeId="2" PostId="16258" RevisionGUID="779a4887-8f77-4369-8e7e-c7432f59283f" CreationDate="2011-08-21T09:54:34.760" UserId="5473" Text="Well, Flash, Illustrator and so on allow you to draw vectors while snapping to a grid. You could then export as SVG and do some processing on the SVG data, but be warned, I've heard it said that the SVG specification is nightmare.&#xD;&#xA;&#xD;&#xA;Why not write your own? Seems really straightforward to do, from what you've said. Set up your onscreen grid according to the scaling the user has specified. Do some simple math, on mouse release, to see what the closest point on the on-screen grid is, and snap to that. I would write this in something like Adobe AIR (Flash for desktop) since Flash supports easy-to-use vector drawing in code. While normal Flash can't access the file system, AIR can, so you can just write your CSV-like file to disk. You could write each vertex as something like&#xD;&#xA;&#xD;&#xA;    [x, y, (metadata1, metadata2, ...)]&#xD;&#xA;&#xD;&#xA;...to elaborate on your example.&#xD;&#xA;&#xD;&#xA;You could even use a bit of Flex for the UI part of it, if you wanted to go that far. Sounds like a good FOSS project in fact -- although I don't doubt there are similar things out there, somewhere." />
  <row Id="37388" PostHistoryTypeId="5" PostId="16256" RevisionGUID="7b9e142b-6db3-45db-b986-8738e47ad50c" CreationDate="2011-08-21T10:52:23.963" UserId="5473" Comment="added 5 characters in body" Text="**The Basics**&#xD;&#xA;&#xD;&#xA;Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. This will work, but if your character is near a plaform edge, his shadow will go off into empty space.&#xD;&#xA;&#xD;&#xA;**Beyond the Basics**&#xD;&#xA;&#xD;&#xA;So what about when your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms? In that case you need a way to split that shadow plane over one or more platforms. There's a question that needs to be answered first, here: Will your platforms ever be situated differently along the z axis, as well as x and y (as in your screenshot) i.e. will your world be true 3D rather than pseudo-3D? This fundamentally affects the logic you can use for shadow clipping (and everything else, too).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Geometric clipping*&#xD;&#xA;&#xD;&#xA;Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto -- you'll need to do multiple raycasts, one from each corner of your shadow plane, to determine this. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :)&#xD;&#xA;&#xD;&#xA;If your game logic is 2D, this can be greatly simplified to line math, i.e. checking range overlaps.&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance. You can merge them into one mesh though, by creating a single plane mesh matching that cellular outline.&#xD;&#xA;&#xD;&#xA;*Grid-based clipping*&#xD;&#xA;&#xD;&#xA;(Applies only if you really want a nice 3D shadow, or are otherwise using true 3D platform placements)&#xD;&#xA;&#xD;&#xA;Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to be the case, I would opt for the geometric approach as it will be easier to maintain your sanity under those circumstances. However if using platforms placed arbitrarily in all 3 dimensions, I would definitely opt for the grid-based approach." />
  <row Id="37389" PostHistoryTypeId="5" PostId="16256" RevisionGUID="3b3b3cd8-0f11-4bea-8cff-0e7d0a8aec5f" CreationDate="2011-08-21T10:58:01.523" UserId="5473" Comment="added 5 characters in body" Text="**The Basics**&#xD;&#xA;&#xD;&#xA;Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. This will work, but if your character is near a plaform edge, his shadow will go off into empty space.&#xD;&#xA;&#xD;&#xA;**Beyond the Basics**&#xD;&#xA;&#xD;&#xA;So what about when your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms? In that case you need a way to split that shadow plane over one or more platforms. There's a question that needs to be answered first, here: Will your platforms ever be situated differently along the z axis, as well as x and y (as in your screenshot) i.e. will your world be true 3D rather than pseudo-3D? This fundamentally affects the logic you can use for shadow clipping (and everything else, too).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Geometric clipping*&#xD;&#xA;&#xD;&#xA;Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto -- you'll need to do multiple raycasts, one from each corner of your shadow plane, to determine this. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :)&#xD;&#xA;&#xD;&#xA;If your game logic is 2D, this can be greatly simplified to line math, i.e. checking range overlaps.&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance. You can merge them into one mesh though, by creating a single plane mesh matching that cellular outline.&#xD;&#xA;&#xD;&#xA;*Grid-based clipping*&#xD;&#xA;&#xD;&#xA;(Applies only if you really want a nice 3D shadow, or are otherwise using true 3D platform placements)&#xD;&#xA;&#xD;&#xA;Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to be the case, I would opt for the geometric approach as it will be easier to maintain your sanity under those circumstances. However if using platforms placed arbitrarily in all 3 dimensions, and provided these all lie flat (0 degrees to horizon) I would definitely opt for the grid-based approach." />
  <row Id="37390" PostHistoryTypeId="5" PostId="16247" RevisionGUID="2a27234b-8d6e-4607-8788-3227a385b4b0" CreationDate="2011-08-21T11:04:24.463" UserId="1323" Comment="fixed studip mistakes in distance formula" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the oceans floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\max(\left ( s - \vec{n}\cdot \vec{p}\right ), 0) \cdot \sqrt{1+\sin(\alpha)^2}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction and the water's surface normal.&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The square root will equal 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down in both cases.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface." />
  <row Id="37391" PostHistoryTypeId="5" PostId="16247" RevisionGUID="cf2646f2-d2c8-4d09-8edd-e5322c888a00" CreationDate="2011-08-21T11:17:46.873" UserId="1323" Comment="surface normal must be inverted" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the oceans floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal towards the body of water ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\max(\left ( s - \vec{n}\cdot \vec{p}\right ),0) \cdot \left ( 1 + \tan(\alpha) \right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction and the water's surface normal.&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The right factor equals 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down in both cases.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface." />
  <row Id="37392" PostHistoryTypeId="5" PostId="16247" RevisionGUID="7c48d37e-4b36-4b8a-be80-1a2f59aceac9" CreationDate="2011-08-21T11:23:58.217" UserId="1323" Comment="spelling" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;Source: [Minecraft Wiki - Light](http://www.minecraftwiki.net/wiki/Light#Non-Opaque_Blocks)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the ocean floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal towards the body of water ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\max(\left ( s - \vec{n}\cdot \vec{p}\right ),0) \cdot \left ( 1 + \tan(\alpha) \right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction and the water's surface normal.&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The right factor equals 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down in both cases.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface." />
  <row Id="37393" PostHistoryTypeId="2" PostId="16259" RevisionGUID="e98e4ca2-7346-4756-ba82-d79e1f4581e8" CreationDate="2011-08-21T11:34:34.223" UserId="1101" Text="There is no 'best' - you need all of them.&#xD;&#xA;&#xD;&#xA;If I'm firing a gun, I don't want to wait for the mouse to be released to trigger the weapon firing effect. And if you're dragging a box around a bunch of units, you start the drag action on mouse-down.&#xD;&#xA;&#xD;&#xA;On the other hand, if I'm clicking a GUI item then I want to wait for the full click because that's what I'm used to.&#xD;&#xA;&#xD;&#xA;So, you should probably implement mouse down, mouse up, mouse drag (mouse up in significantly different place to mouse down) and and mouse click (mouse up in same place as mouse down), and hook them up to parts of your game as you see fit." />
  <row Id="37394" PostHistoryTypeId="5" PostId="16256" RevisionGUID="6f78d86f-1699-432d-9e29-ef7aef4e4926" CreationDate="2011-08-21T11:52:01.823" UserId="5473" Comment="deleted 106 characters in body" Text="**The Basics**&#xD;&#xA;&#xD;&#xA;Create a plane. Give it a shadow decal texture. Attach it to your character per the scene graph. Cast a ray from the underside of your character, check where (if anywhere) it intersects with your platforms, and push your shadow plane down accordingly to that vertical level (usually positive y-axis) where the platform top is. This will work, but if your character is near a plaform edge, his shadow will go off into empty space.&#xD;&#xA;&#xD;&#xA;**Beyond the Basics**&#xD;&#xA;&#xD;&#xA;So what about when your character is eg. standing on the edge of the platform, or if he is directly over a &quot;step&quot; between two platforms? In that case you need a way to split that shadow plane over one or more platforms. There's a question that needs to be answered first, here: Will your platforms ever be situated differently along the z axis, as well as x and y (as in your screenshot) i.e. will your world be true 3D rather than pseudo-3D? This fundamentally affects the logic you can use for shadow clipping (and everything else, too).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Geometric clipping*&#xD;&#xA;&#xD;&#xA;Create your full plane mesh with blob shadow decal on it. If your shadow is over a breach or edge, you'll need a single mesh for each platform that the shadow will fall onto -- you'll need to do multiple raycasts, one from each corner of your shadow plane, to determine this. For each platform the shadow falls over, clip that platform's shadow plane, or clip the texture on that plane -- whichever is easiest in the 3D API you're working in -- so that it looks the shadow doesn't &quot;lie into empty space&quot; off the edge of that platform. The pro here is its more accurate to do things this way; the cons here are that (a) it could get a little messy if the shadow could be split over platforms in both x and y rather than just x; (b)  you won't be able to have a silhouette shadow (but that wasn't one of your requirements, anyway :)&#xD;&#xA;&#xD;&#xA;If your game logic is 2D, this can be greatly simplified to line math, i.e. checking range overlaps.&#xD;&#xA;&#xD;&#xA;The pro here is that you don't need to fiddle with mesh vertices. The con is that you are creating many individual plane meshes which may impact performance. You can merge them into one mesh though, by creating a single plane mesh matching that cellular outline.&#xD;&#xA;&#xD;&#xA;*Grid-based clipping*&#xD;&#xA;&#xD;&#xA;Considering the potential splitting scenario, this can make things easier. Pick a resolution for your grid. Cast a ray for each cell in the grid, and create a miniature shadow plane at each location, in this way building up the character's entire shadow. Another benefit to this is that you could (with a bit of further effort to determine your characters silhouette from below) have a pretty accurate silhouette shadow rather than just a blob shadow. But that's up to you. Assuming your character doesn't move along the z axis, only x and y, you won't even need a grid, you'd only need strips of your original blob decal. I'm sure this will make sense if you give it some thought -- subdivision in this case, is only required along the x-axis.&#xD;&#xA;&#xD;&#xA;The pros here are this approach lends itself to both splitting your shadow across platforms in numerous dimensions, and that you can have proper silhouette shadows. The con  is that you are &quot;rasterising&quot; your shadow, resolution is a trade-off between good looks and performance. But considering you were willing to go for a blob shadow, if I were you I might opt for this approach.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Considering everything appears to be arranged orthogonally along your world axes, both these approaches will work well. If you were to implement ramps etc., you should still be able to tilt your shadow planes, but if this is likely to be the case, I would opt for the geometric approach as it will be easier to maintain your sanity under those circumstances. However if using platforms placed arbitrarily in all 3 dimensions, and provided these all lie flat (0 degrees to horizon) I would definitely opt for the grid-based approach." />
  <row Id="37395" PostHistoryTypeId="2" PostId="16260" RevisionGUID="594aaedf-2fde-43de-90f6-ce884adbe943" CreationDate="2011-08-21T12:15:37.840" UserId="5473" Text="Hmm. You may be mixing up your game (control) logic with your rendering (view) logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are 3 ways:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. Logical grid-only checks using the logical, axis-aligned grid representing your world in your game logic.  In the link you posted, this would be the abstract 2D (or 3D) grid you store in memory as array, that represents the city blocks. This would help in eg. a Sim City type game where you only need to know, &quot;Can I put this here?&quot; Useful for placement, but not so much for analog movement -- good for Chess, but not for PacMan.&#xD;&#xA; 2. Logical grid checks as axis-aligned boxes PLUS circular collision checks. Here you can use your logical grid as a set of boxes which you can very easily check against one another; but you can also check them against circles representing mobile entities in your game eg. the player, cars on the streets, or whatever. This is simple to implement and very fast because no trig is required really, the only thing you use is overlap checks on the x and y axis (bounding box checks) and pythagoras for radius checks, and point-in-square checks.&#xD;&#xA; 3. You may want pixel-perfect collision detection. If you do, do a search on it, you will find stuff on here, on gamedev.net forums, on gpwiki.org, all over in fact. It involves checking which pixels of one sprite overlap which pixels of another sprite, in a given rectangular region that represents the overlapping area of the 2 square bitmaps which constitute those sprites. Consider this only if you need a high degree of accuracy, for example in an action game with large, relatively slow moving sprites this might be useful. If your sprites are small and fast moving, check out option 1 -- it will be good enough!&#xD;&#xA;&#xD;&#xA;If you use approach 1 or 2, how you end up rendering it after doing the logic I've outlined, is your choice entirely. It could be isometric, it could be top down, side on, full 3D, whatever. But there is a distinct difference between your *world* and how it is *represented*." />
  <row Id="37396" PostHistoryTypeId="5" PostId="16260" RevisionGUID="c7eb34a3-3cd8-44f6-9181-b33272fd8de6" CreationDate="2011-08-21T12:20:56.630" UserId="5473" Comment="added 160 characters in body" Text="Hmm. You may be mixing up your game (control) logic with your rendering (view) logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are a few ways:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. Logical grid-only checks using the logical, axis-aligned grid representing your world in your game logic.  In the link you posted, this would be the abstract 2D (or 3D) grid you store in memory as array, that represents the city blocks. This would help in eg. a Sim City type game where you only need to know, &quot;Can I put this here?&quot; Useful for placement, but not so much for analog movement -- good for Chess, but not for PacMan.&#xD;&#xA; 2. Logical grid checks as axis-aligned boxes PLUS circular collision checks. Here you can use your logical grid as a set of boxes which you can very easily check against one another; but you can also check them against circles representing mobile entities in your game eg. the player, cars on the streets, or whatever. This is simple to implement and very fast because no trig is required really, the only thing you use is overlap checks on the x and y axis (bounding box checks) and pythagoras for radius checks, and point-in-square checks.&#xD;&#xA; 3. You may want pixel-perfect collision detection. If you do, do a search on it, you will find stuff on here, on gamedev.net forums, on gpwiki.org, all over in fact. It involves checking which pixels of one sprite overlap which pixels of another sprite, in a given rectangular region that represents the overlapping area of the 2 square bitmaps which constitute those sprites. Consider this only if you need a high degree of accuracy, for example in an action game with large, relatively slow moving sprites this might be useful. If your sprites are small and fast moving, check out option 1 -- it will be good enough!&#xD;&#xA; 4. Use a physics engine like Box2D for collisions if you need really fast collision detection for a great many objects and once, i.e. most of your objects are not static.  &#xD;&#xA;&#xD;&#xA;If you use approach 1 or 2 or 4, then how you end up rendering after doing the logic I've outlined, is your choice entirely. It could be isometric, it could be top down, side on, full 3D, whatever. But generally there is a distinct difference between your *actual world* (which is just data) and how it is *represented* (which is usually just pixels)." />
  <row Id="37397" PostHistoryTypeId="25" PostId="16246" RevisionGUID="1965fa84-aed8-40c4-8e17-d1304b6de5c6" CreationDate="2011-08-21T12:37:40.313" Comment="http://twitter.com/#!/StackGameDev/status/105257258589487104" />
  <row Id="37398" PostHistoryTypeId="5" PostId="16247" RevisionGUID="ac5f589a-9d87-41c5-96ef-727b5d1bb867" CreationDate="2011-08-21T12:54:34.497" UserId="1323" Comment="added note about maximum alpha at sunset" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;Source: [Minecraft Wiki - Light](http://www.minecraftwiki.net/wiki/Light#Non-Opaque_Blocks)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the ocean floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal towards the body of water ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\max(\left ( s - \vec{n}\cdot \vec{p}\right ),0) \cdot \left ( 1 + \tan(\alpha) \right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction beneath the surface and the water's surface normal.&#xD;&#xA;&#xD;&#xA;At sunset, ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) only reaches a bit less than 50° because the light is refracted when entering the water.&#xD;&#xA;Here's a blog post with a good explanation: [The Digital Camera: Total Internal Reflection](http://uptrout.com/2011/08/19/the-digital-camera-total-internal-reflection/)&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The right factor equals 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down in both cases.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface." />
  <row Id="37399" PostHistoryTypeId="2" PostId="16261" RevisionGUID="2e96bdfe-daa8-453a-bdb2-d37986a0a9fe" CreationDate="2011-08-21T13:32:15.327" UserId="2555" Text="I'm developing a 2D physics platformer game, with commercial purposes. Almost everything is finished:&#xD;&#xA;&#xD;&#xA; - An original game concept&#xD;&#xA; - The whole 2D self-written game engine&#xD;&#xA; - A level interpreter to read xml levels&#xD;&#xA; - A level editor with an advanced GUI to generate levels in xml&#xD;&#xA; - An advanced level object system&#xD;&#xA; - Profile manager (load &amp; save game progress)&#xD;&#xA; - etc ...&#xD;&#xA;&#xD;&#xA;But, my problems are of course inspiration for levels...&#xD;&#xA;&#xD;&#xA;Is it possible to publish my game concept and ask community for level designs? And still keep my game concept save from being copied by others. Do I have copyrights on a game concept for a game which isn't officially released?&#xD;&#xA;&#xD;&#xA;And if I should ask community, should I do an action like, for everyone who submits an approved level design (not the xml, but only a sketch), they receive one cent per sold copy of the game?&#xD;&#xA;&#xD;&#xA;What do you think? Tips, pitfalls?&#xD;&#xA;&#xD;&#xA;Thank you in advance!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For the interested people, here is a screenshot from the level-editor:&#xD;&#xA;&#xD;&#xA;[Fullscreen image][1]&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/2WNG2.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/2WNG2.jpg" />
  <row Id="37400" PostHistoryTypeId="1" PostId="16261" RevisionGUID="2e96bdfe-daa8-453a-bdb2-d37986a0a9fe" CreationDate="2011-08-21T13:32:15.327" UserId="2555" Text="Level design community help?" />
  <row Id="37401" PostHistoryTypeId="3" PostId="16261" RevisionGUID="2e96bdfe-daa8-453a-bdb2-d37986a0a9fe" CreationDate="2011-08-21T13:32:15.327" UserId="2555" Text="&lt;level-design&gt;&lt;publishing&gt;" />
  <row Id="37402" PostHistoryTypeId="5" PostId="16247" RevisionGUID="08f1c34e-152f-46f6-91ff-626073a26730" CreationDate="2011-08-21T13:36:43.743" UserId="1323" Comment="added link to blog post with more background information about Snell's Law" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;Source: [Minecraft Wiki - Light](http://www.minecraftwiki.net/wiki/Light#Non-Opaque_Blocks)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the ocean floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal towards the body of water ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\max(\left ( s - \vec{n}\cdot \vec{p}\right ),0) \cdot \left ( 1 + \tan(\alpha) \right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction beneath the surface and the water's surface normal.&#xD;&#xA;&#xD;&#xA;At sunset, ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) only reaches a bit less than 50° because the light is refracted when entering the water.  &#xD;&#xA;Here's a blog post with a good explanation: [The Digital Camera: Total Internal Reflection](http://uptrout.com/2011/08/19/the-digital-camera-total-internal-reflection/)  &#xD;&#xA;Another post with more details: [The Digital Camera: Snell’s Law of Refraction](http://uptrout.com/2011/07/27/the-digital-camera-snells-law-of-refraction/)&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The right factor equals 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*If you render both the solid geometry and the water from the lights point of view with depth peeling and add the depths together (positive depth for back-face water, negative for front-face, negative depths for solid geometry), it may be possible to correctly render self-occluding water volumes to the shadow map.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down in both cases.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface." />
  <row Id="37403" PostHistoryTypeId="2" PostId="16262" RevisionGUID="787da8e6-17d2-4367-a92a-ab84f1317a63" CreationDate="2011-08-21T14:26:52.123" UserId="3505" Text="Let's take the basic legal first. Your copyright applies no matter if you have released the game or not. You do not have copyright for a concept, only for the very game you made. Except for extreme plagiarism you do not have means for stopping other people from making a similar game.&#xD;&#xA;&#xD;&#xA;Given that you basically have no community, and is unlikely to get one unless you have a good game it would hard to ask them. The better a game you have already made, the easier it will be to persuade other people to build upon it.&#xD;&#xA;&#xD;&#xA;For now, if you can't make levels on your own, I think you'll have to pay someone, and for a physics game it's probably a pretty big job, good or bad levels tend to really make or break those." />
  <row Id="37404" PostHistoryTypeId="2" PostId="16263" RevisionGUID="69bfc83e-f399-44f9-ad1a-fb76ffed5e34" CreationDate="2011-08-21T14:44:04.210" UserId="6558" Text=" - Is it possible to publish my game concept and ask community for level&#xD;&#xA;   designs? **Yes.**&#xD;&#xA; - And still keep my game concept save from being&#xD;&#xA;   copied by others. **No, once you release your game, anyone can copy&#xD;&#xA;   your concept.**&#xD;&#xA; - Do I have copyrights on a game concept for a game&#xD;&#xA;   which isn't officially released? **As eBusiness said, you can't&#xD;&#xA;   copyright a concept, just the specific elements of your game (mostly,&#xD;&#xA;   art, music, and code)**&#xD;&#xA; - And if I should ask community, should I do an action like, for everyone who submits an approved level design (not the xml, but only a sketch), they receive one cent per sold copy of the game? **No, because if 100 people submit level sketches and you want to sell the game for $10, then you'd be sending all your income to the level designers.**&#xD;&#xA;&#xD;&#xA;Unless you already have a community of people waiting to play your game, you're going to have a hard time getting people to design levels for you.  And if your concept is truly original, then people are going to have a hard time designing good levels, because they don't know how your game works.&#xD;&#xA;&#xD;&#xA;The best solution (or at least, the one that's been done many, many times before with decent success) is to release your game with a set of levels made by you (or possibly a friend, or a level designer that you hire, if you can afford one), and then release the tools used to make those levels.  If people like your game, then they'll build levels for it, and if you encourage this, you'll have all sorts of people making content for your game with very little effort on your part.  Done properly, this can extend the life of your game and encourage new people to buy it.&#xD;&#xA;&#xD;&#xA;The trick to all of this is to have a good set of levels to start with, which will encourage people to buy the game.  One possible idea is to give the game (and level editor) away for free, but make it so that you have to buy the game to play more levels." />
  <row Id="37405" PostHistoryTypeId="5" PostId="16262" RevisionGUID="397a33d7-43f5-4e37-b91d-ef21974e299d" CreationDate="2011-08-21T14:47:06.287" UserId="3505" Comment="added 4 characters in body" Text="Let's take the basic legal first. Your copyright applies no matter if you have released the game or not. You do not have copyright for a concept, only for the very game you made. Except for extreme plagiarism you do not have means for stopping other people from making a similar game.&#xD;&#xA;&#xD;&#xA;Given that you basically have no community, and is unlikely to get one unless you have a good game, it would be hard to ask them. The better a game you have already made, the easier it will be to persuade other people to build upon it.&#xD;&#xA;&#xD;&#xA;For now, if you can't make levels on your own, I think you'll have to pay someone, and for a physics game it's probably a pretty big job, good or bad levels tend to really make or break those." />
  <row Id="37406" PostHistoryTypeId="2" PostId="16264" RevisionGUID="a69e1958-7137-4c25-8ea2-5f930360a0a0" CreationDate="2011-08-21T14:58:58.630" UserId="2897" Text="Basically, you lack the only interesting thing which people actually play platformers for. All these technical stuff you've listed can be done rather quickly compared to the interesting game levels. Levels need a lot of thought, work and polish, also they tend to spawn features when some idea cannot be expressed by existing components. So if you don't have the levels, you don't have the game. &#xD;&#xA;&#xD;&#xA;Summing up, you're basically going to publish a specialized game engine and ask people to make your game for you in return for a small fee while forbidding them to use this engine for anything but your own idea. Capitalism, ho! I've never seen it's done, considering how hard it would be to make a consistent game out of levels made by many different people. Just remember how nicely levels were themed in &quot;World of Goo&quot; versus list of abrupt challenges in &quot;N&quot;. &#xD;&#xA;&#xD;&#xA;If you don't mind these things, I guess it could work in theory, lets consider criteria for the best case: &#xD;&#xA;&#xD;&#xA; - Community around your soon-to-be-game is large, so percent of creative people with nothing to do is high.&#xD;&#xA; - Your concept and engine are heavenly good and/or money share is really tempting and/or it's otherwise attractive, so said people will want to become involved. Chances are, if you have troubles using your concept after the first level, it would be difficult for others to use it as well.&#xD;&#xA; - It's would be frustrating for a community member to create a level only to find out that it won't be inserted into a game. You'll need to make this custom levels playable one way or another, or invent some other form of compensation for wasted time.&#xD;&#xA; - You will spend a lot of time by helping lots of people with your toolset.&#xD;&#xA; - You will spend a lot of time by sending feedback and doing overall community management, since you will receive lots of low and mediocre quality levels.&#xD;&#xA;&#xD;&#xA;**All points considered, it might be best to employ a &quot;level-driven development&quot; (think of possible cool applications of game mechanics, then build levels around them) or find yourself a level designer to do it for you.** Also if your concept is good, it will be stolen regardless of what you do. Don't worry about it, real value lies not in a concept but in what you do with it." />
  <row Id="37407" PostHistoryTypeId="2" PostId="16265" RevisionGUID="809d394a-d0e1-4b19-9261-6305dc76fb9a" CreationDate="2011-08-21T15:03:47.533" UserId="7460" Text="http://www.raywenderlich.com/2343/how-to-drag-and-drop-sprites-with-cocos2d" />
  <row Id="37413" PostHistoryTypeId="2" PostId="16267" RevisionGUID="96c318de-13c3-4473-8fea-915720a81041" CreationDate="2011-08-21T15:35:53.183" UserId="953" Text="There are multiple questions here, but I'll only answer a couple. &#xD;&#xA;&#xD;&#xA;Do you have copyrights? Yes. In most countries, you have copyright over anything you create ever as soon as you create it. Of course, this only applies to the code and assets; the game concept is not protected by copyright.&#xD;&#xA;&#xD;&#xA;Is your game concept safe? It doesn't matter. The true success of a game is in the implementation, not the idea. The only games that get cloned exactly are those which are *already successful.* Any decent game designer will have a hundred unmade ideas of their own, and no one will be able to implement your concept better than you." />
  <row Id="37415" PostHistoryTypeId="25" PostId="16261" RevisionGUID="5a1a3c4f-64b1-45b5-9c95-9317c9fbb4e6" CreationDate="2011-08-21T15:37:40.823" Comment="http://twitter.com/#!/StackGameDev/status/105302557609570304" />
  <row Id="37416" PostHistoryTypeId="4" PostId="16220" RevisionGUID="7bd3a708-c26e-4ffd-8fac-85199f6677a5" CreationDate="2011-08-21T16:18:45.163" UserId="7630" Comment="Edited title into a question per meta SO initiative." Text="How do I identify mouse clicks versus mouse down in games?" />
  <row Id="37417" PostHistoryTypeId="24" PostId="16220" RevisionGUID="7bd3a708-c26e-4ffd-8fac-85199f6677a5" CreationDate="2011-08-21T16:18:45.163" Comment="Proposed by 7630 approved by 51 edit id of 661" />
  <row Id="37418" PostHistoryTypeId="4" PostId="16252" RevisionGUID="6605e3b8-d491-4843-8c3b-b75ccc850eb5" CreationDate="2011-08-21T16:33:46.643" UserId="9389" Comment="edited title" Text="Object following a path" />
  <row Id="37419" PostHistoryTypeId="25" PostId="16252" RevisionGUID="c2d7f56b-71d1-4d2a-bc0b-105af848f757" CreationDate="2011-08-21T18:37:40.450" Comment="http://twitter.com/#!/StackGameDev/status/105347855274876928" />
  <row Id="37420" PostHistoryTypeId="2" PostId="16268" RevisionGUID="71d121ed-e703-4a82-8ba9-83db3fe74ada" CreationDate="2011-08-21T19:31:23.877" UserId="9396" Text="I'm venturing into Mobile/Tablet based development coming from the world of Web Applications.&#xD;&#xA;&#xD;&#xA;I want to write a game similar to 1942/43 video game from the 80's:&#xD;&#xA;http://www.ilovethe80s.com/1943.gif&#xD;&#xA;&#xD;&#xA;...similar in the sense that I have a plane/spaceship that flies vertically &quot;up&quot; the screen and stuff comes down to attack it (otherwise nothing that would violate copyright).&#xD;&#xA;&#xD;&#xA;I'm familiar with collision detection, sprites, object pooling, etc. but what I'm spinning my wheels on is how to layout all the code for this game.  e.g. it doesn't fit my normal MVC pattern, I don't have a DB, and the user input will likely be limited to touch based movement around the screen with &quot;auto-fire&quot; on all the time.&#xD;&#xA;&#xD;&#xA;What I'm blanking out on is how to do all the &quot;levels&quot; and sequence &quot;waves&quot; of attackers within a level.&#xD;&#xA;&#xD;&#xA;Should I just have a &quot;level&quot; file for each level, that queue's up attack waves? if so, based on time? based on some event? based on a position passed by the player?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;    &lt;level id=&quot;1&quot;&gt;&#xD;&#xA;      &lt;event timeoffset=&quot;500&quot; type=&quot;attack&quot; name=&quot;vConfiguration&quot; position=&quot;50&quot;/&gt;&#xD;&#xA;      &lt;event timeoffset=&quot;1250&quot; type=&quot;attack&quot; name=&quot;jConfiguration&quot; position=&quot;75&quot;/&gt;&#xD;&#xA;      &lt;event timeoffset=&quot;1300&quot; type=&quot;bonus&quot; name=&quot;quadGunUpgrade&quot; position=&quot;10&quot;/&gt;&#xD;&#xA;      ...&#xD;&#xA;    &lt;/level&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Part of me thinks this would be really easy to setup levels this way, then read in the file to queue up the events for the attacks/bonus/? to occur (where each named &quot;attack&quot; is a bit of configured code to position &quot;N&quot; enemies and start their flight sequences)&#xD;&#xA;&#xD;&#xA;The other part of me thinks - whoa! before you even dream of implementing this - determine how others would approach it - no need to re-invent the wheel or create a monster.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/iobm6.gif" />
  <row Id="37421" PostHistoryTypeId="1" PostId="16268" RevisionGUID="71d121ed-e703-4a82-8ba9-83db3fe74ada" CreationDate="2011-08-21T19:31:23.877" UserId="9396" Text="Game Design - Code Structure / Patterns" />
  <row Id="37422" PostHistoryTypeId="3" PostId="16268" RevisionGUID="71d121ed-e703-4a82-8ba9-83db3fe74ada" CreationDate="2011-08-21T19:31:23.877" UserId="9396" Text="&lt;design-patterns&gt;&lt;level-design&gt;&lt;language-agnostic&gt;" />
  <row Id="37423" PostHistoryTypeId="5" PostId="16260" RevisionGUID="958990fa-a486-4b9a-9f83-1854bdbf818b" CreationDate="2011-08-21T19:58:38.463" UserId="5473" Comment="deleted 25 characters in body" Text="Hmm. You may be mixing up your game (control) logic with your rendering (view) logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are a few ways:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. Grid-placement checks using the grid representing your world in your game logic.  In the link you posted, this would be the abstract 2D (or 3D) grid you store in memory as array, that represents the city blocks. This would help in eg. a Sim City type game where you only need to know, &quot;Can I put this here?&quot; Useful for placement, but not so much for analog movement -- good for Chess, but not for PacMan.&#xD;&#xA; 2. Logical grid checks as axis-aligned boxes PLUS circular collision checks. Here you can use your logical grid as a set of boxes which you can very easily check against one another; but you can also check them against circles representing mobile entities in your game eg. the player, cars on the streets, or whatever. This is simple to implement and very fast because no trig is required really, the only thing you use is overlap checks on the x and y axis (bounding box checks) and pythagoras for radius checks, and point-in-square checks.&#xD;&#xA; 3. You may want pixel-perfect collision detection. If you do, do a search on it, you will find stuff on here, on gamedev.net forums, on gpwiki.org, all over in fact. It involves checking which pixels of one sprite overlap which pixels of another sprite, in a given rectangular region that represents the overlapping area of the 2 square bitmaps which constitute those sprites. Consider this only if you need a high degree of accuracy, for example in an action game with large, relatively slow moving sprites this might be useful. If your sprites are small and fast moving, check out option 2 -- it will be good enough!&#xD;&#xA; 4. Use a physics engine like Box2D for collisions if you need really fast collision detection for a great many objects and once, i.e. most of your objects are not static.  &#xD;&#xA;&#xD;&#xA;If you use approach 1 or 2 or 4, then how you end up rendering after doing the logic I've outlined, is your choice entirely. It could be isometric, it could be top down, side on, full 3D, whatever. But generally there is a distinct difference between your *actual world* (which is just data) and how it is *represented* (which is usually just pixels). So don't let the fact that your world is viewed isometrically, confuse you -- it's still just a plain old grid. Do the collision checks on that grid, then worry about whether its isometric or not." />
  <row Id="37424" PostHistoryTypeId="2" PostId="16269" RevisionGUID="310be34b-83f6-4bcb-8ff5-5850e93ce551" CreationDate="2011-08-21T20:01:58.793" UserId="7911" Text="That is, in fact, how many old arcade games were created.  Not the XML part of course, but the game is actually a playback engine that eats timed events that are simply a static data listing like what you have above.&#xD;&#xA;&#xD;&#xA;All of the triggers you mention would be valid: time is the most common because it puts pressure on the player; events like &quot;destroyed the wall&quot; are used a lot; and position triggers, too.  Other events like &quot;specific enemy killed&quot; can be used to build boss sequences, etc...&#xD;&#xA;&#xD;&#xA;All just from reading data from a table and playing them back in the engine.  It makes for compact code and fits in tiny memory spaces.&#xD;&#xA;&#xD;&#xA;You're on a proven track with this design.&#xD;&#xA;" />
  <row Id="37425" PostHistoryTypeId="2" PostId="16270" RevisionGUID="b7a391d6-e990-447a-9cb7-49f6a842e2cb" CreationDate="2011-08-21T20:47:39.180" UserId="853" Text="I've recently read The Art of Game Design and am currently reading Why Reality is Broken and am wanting to learn more about the psychology behind game design. I'm a computer science student but I'm intrigued by the subject and have thought about minoring in psychology. &#xD;&#xA;&#xD;&#xA;For the veteran game design people out there, would academically studying psychology give a huge advantage to a game designer? There is one class in particular called Sensation and Perception that studies that gets down to what goes on in the nervous system when we are stimulated through our five senses and how these stimulations creates certain perceptions. &#xD;&#xA;&#xD;&#xA;So, basically is this over doing it for someone who wants to create games/become a game designer? &#xD;&#xA;&#xD;&#xA;What originally caught my interest in this subject was reading about how zynga hired a psychologist to help design the mechanics for farmville.   " />
  <row Id="37426" PostHistoryTypeId="1" PostId="16270" RevisionGUID="b7a391d6-e990-447a-9cb7-49f6a842e2cb" CreationDate="2011-08-21T20:47:39.180" UserId="853" Text="Psychology of Game Design" />
  <row Id="37427" PostHistoryTypeId="3" PostId="16270" RevisionGUID="b7a391d6-e990-447a-9cb7-49f6a842e2cb" CreationDate="2011-08-21T20:47:39.180" UserId="853" Text="&lt;game-design&gt;" />
  <row Id="37428" PostHistoryTypeId="4" PostId="16268" RevisionGUID="56c52d6e-ecd0-4535-8a70-57e5fe8f898e" CreationDate="2011-08-21T20:52:13.607" UserId="744" Comment="edited title" Text="How should I approach architecting a data-driven shoot-em-up?" />
  <row Id="37429" PostHistoryTypeId="4" PostId="16270" RevisionGUID="9afcec0d-99e0-4a9e-9112-9a26f4229a38" CreationDate="2011-08-21T20:54:56.257" UserId="744" Comment="edited title" Text="Would studying psychology give an advantage to a game designer?" />
  <row Id="37430" PostHistoryTypeId="2" PostId="16271" RevisionGUID="41ee6f6a-7b81-4a72-9fe3-af2ed03e0779" CreationDate="2011-08-21T21:02:59.820" UserId="9387" Text="My problem:&#xD;&#xA;&#xD;&#xA;If the other user puts a item in then the other guy puts a item in the person that last puts the item in will crash&#xD;&#xA;&#xD;&#xA;heres my trade code:&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            // Exchange Request&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            void Exchange_Request()&#xD;&#xA;            {&#xD;&#xA;                try&#xD;&#xA;                {&#xD;&#xA;                    PacketReader Reader = new PacketReader(PacketInformation.buffer);&#xD;&#xA;                    int targetid = Reader.Int32();&#xD;&#xA;                    Reader.Close();&#xD;&#xA;    &#xD;&#xA;                    Systems sys = GetPlayer(targetid);&#xD;&#xA;                    Character.Network.TargetID = targetid;&#xD;&#xA;    &#xD;&#xA;                    sys.Character.Network.TargetID = this.Character.Information.UniqueID;&#xD;&#xA;                    sys.client.Send(Packet.P_Request(1, this.Character.Information.UniqueID, 0));&#xD;&#xA;    &#xD;&#xA;                    Character.State.Exchanging = true;&#xD;&#xA;                    sys.Character.State.Exchanging = true;&#xD;&#xA;                }&#xD;&#xA;                catch (Exception ex)&#xD;&#xA;                {&#xD;&#xA;                    deBug.Write(ex);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            // Exchange Request Check&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            void Request()&#xD;&#xA;            {&#xD;&#xA;                try&#xD;&#xA;                {&#xD;&#xA;                    PacketReader Reader = new PacketReader(PacketInformation.buffer);&#xD;&#xA;    &#xD;&#xA;                    if (Reader.Byte() == 1 &amp;&amp; Reader.Byte() == 0)&#xD;&#xA;                    {&#xD;&#xA;                        Systems sys = GetPlayer(Character.Network.TargetID);&#xD;&#xA;                        sys.client.Send(Packet.Exchange_Cancel());&#xD;&#xA;                    }&#xD;&#xA;                    else&#xD;&#xA;                    {&#xD;&#xA;                        Systems sys = GetPlayer(Character.Network.TargetID);&#xD;&#xA;                        sys.client.Send(Packet.OpenExhangeWindow(1, this.Character.Information.UniqueID));&#xD;&#xA;                        client.Send(Packet.OpenExhangeWindow(sys.Character.Information.UniqueID));&#xD;&#xA;    &#xD;&#xA;                        Character.Network.Exchange.Window = true;&#xD;&#xA;                        Character.Network.Exchange.ItemList = new List&lt;Game.Global.slotItem&gt;();&#xD;&#xA;                        sys.Character.Network.Exchange.Window = true;&#xD;&#xA;                        sys.Character.Network.Exchange.ItemList = new List&lt;Game.Global.slotItem&gt;();&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                catch (Exception ex)&#xD;&#xA;                {&#xD;&#xA;                    deBug.Write(ex);&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            // Exchange Close&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            void Exchange_Close()&#xD;&#xA;            {&#xD;&#xA;                try&#xD;&#xA;                {&#xD;&#xA;                    Systems sys = GetPlayer(Character.Network.TargetID);&#xD;&#xA;                    client.Send(Packet.Exchange_Cancel());&#xD;&#xA;                    client.Send(Packet.CloseExhangeWindow());&#xD;&#xA;                    Character.Network.Exchange.Window = false;&#xD;&#xA;                    Character.Network.Exchange.ItemList = null;&#xD;&#xA;    &#xD;&#xA;                    if (sys != null)&#xD;&#xA;                    {&#xD;&#xA;                        sys.client.Send(Packet.Exchange_Cancel());&#xD;&#xA;                        sys.client.Send(Packet.CloseExhangeWindow());&#xD;&#xA;                        sys.Character.Network.Exchange.Window = false;&#xD;&#xA;                        sys.Character.Network.Exchange.ItemList = null;&#xD;&#xA;                        Character.State.Exchanging = false;&#xD;&#xA;                        sys.Character.State.Exchanging = false;&#xD;&#xA;                    }&#xD;&#xA;                    Character.State.Exchanging = false;&#xD;&#xA;                    sys.Character.State.Exchanging = false;&#xD;&#xA;                }&#xD;&#xA;                catch (Exception ex)&#xD;&#xA;                {&#xD;&#xA;                    Console.WriteLine(ex);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            // Exchange Accepted&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            void Exchange_Accept()&#xD;&#xA;            {&#xD;&#xA;    &#xD;&#xA;                try&#xD;&#xA;                {&#xD;&#xA;                    Systems sys = GetPlayer(Character.Network.TargetID);&#xD;&#xA;    &#xD;&#xA;                    client.Send(Packet.Exchange_ItemPacket(this.Character.Information.UniqueID, this.Character.Network.Exchange.ItemList, true));&#xD;&#xA;                    client.Send(Packet.Exchange_Accept());&#xD;&#xA;    &#xD;&#xA;                    sys.client.Send(Packet.Exchange_ItemPacket(this.Character.Information.UniqueID, this.Character.Network.Exchange.ItemList, false));&#xD;&#xA;                    sys.client.Send(Packet.Exchange_Gold(Character.Network.Exchange.Gold));&#xD;&#xA;                    sys.client.Send(Packet.Exchange_Accept2());&#xD;&#xA;                }&#xD;&#xA;                catch (Exception ex)&#xD;&#xA;                {&#xD;&#xA;                    deBug.Write(ex);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            // Exchange Approve&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&#xD;&#xA;            void Exchange_Approve()&#xD;&#xA;            {&#xD;&#xA;                try&#xD;&#xA;                {&#xD;&#xA;                    Systems sys = GetPlayer(Character.Network.TargetID);&#xD;&#xA;                    client.Send(Packet.Exchange_Approve());&#xD;&#xA;                    Character.Network.Exchange.Approved = true;&#xD;&#xA;                    if (sys.Character.Network.Exchange.Approved)&#xD;&#xA;                    {&#xD;&#xA;                        #region Gold update&#xD;&#xA;                        if (Character.Network.Exchange.Gold != 0)&#xD;&#xA;                        {&#xD;&#xA;                            Character.Information.Gold -= Character.Network.Exchange.Gold;&#xD;&#xA;                            client.Send(Packet.UpdateGold(Character.Information.Gold));&#xD;&#xA;                            SaveGold();&#xD;&#xA;    &#xD;&#xA;                            sys.Character.Information.Gold += Character.Network.Exchange.Gold;&#xD;&#xA;                            sys.client.Send(Packet.UpdateGold(sys.Character.Information.Gold));&#xD;&#xA;                            sys.SaveGold();&#xD;&#xA;                        }&#xD;&#xA;                        if (sys.Character.Network.Exchange.Gold != 0)&#xD;&#xA;                        {&#xD;&#xA;                            sys.Character.Information.Gold -= sys.Character.Network.Exchange.Gold;&#xD;&#xA;                            sys.client.Send(Packet.UpdateGold(sys.Character.Information.Gold));&#xD;&#xA;                            sys.SaveGold();&#xD;&#xA;    &#xD;&#xA;                            Character.Information.Gold += sys.Character.Network.Exchange.Gold;&#xD;&#xA;                            client.Send(Packet.UpdateGold(Character.Information.Gold));&#xD;&#xA;                            SaveGold();&#xD;&#xA;                        }&#xD;&#xA;                        #endregion&#xD;&#xA;    &#xD;&#xA;                        #region Items&#xD;&#xA;                        if (Character.Network.Exchange.ItemList.Count &gt; 0)&#xD;&#xA;                        {&#xD;&#xA;                            foreach (Global.slotItem item in Character.Network.Exchange.ItemList)&#xD;&#xA;                            {&#xD;&#xA;                                byte t_slot = sys.GetFreeSlot();&#xD;&#xA;                                Systems.MsSQL.InsertData(&quot;UPDATE char_items SET owner='&quot; + sys.Character.Information.CharacterID + &quot;' WHERE owner='&quot; + Character.Information.CharacterID + &quot;' AND itemid='&quot; + item.ID + &quot;' AND id='&quot; + item.dbID + &quot;' AND storagetype='0'&quot;);&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        if (sys.Character.Network.Exchange.ItemList.Count &gt; 0)&#xD;&#xA;                        {&#xD;&#xA;                            foreach (Global.slotItem item in sys.Character.Network.Exchange.ItemList)&#xD;&#xA;                            {&#xD;&#xA;                                byte t_slot = GetFreeSlot();&#xD;&#xA;                                Systems.MsSQL.InsertData(&quot;UPDATE char_items SET owner='&quot; + Character.Information.CharacterID + &quot;' WHERE owner='&quot; + sys.Character.Information.CharacterID + &quot;' AND itemid='&quot; + item.ID + &quot;' AND id='&quot; + item.dbID + &quot;' AND storagetype='0'&quot;);&#xD;&#xA;                            }&#xD;&#xA;                        }&#xD;&#xA;                        #endregion&#xD;&#xA;    &#xD;&#xA;                        client.Send(Packet.Exchange_Finish());&#xD;&#xA;                        sys.client.Send(Packet.Exchange_Finish());&#xD;&#xA;                        Character.State.Exchanging = false;&#xD;&#xA;                        sys.Character.State.Exchanging = false;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;                catch (Exception ex)&#xD;&#xA;                {&#xD;&#xA;                    deBug.Write(ex);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37431" PostHistoryTypeId="1" PostId="16271" RevisionGUID="41ee6f6a-7b81-4a72-9fe3-af2ed03e0779" CreationDate="2011-08-21T21:02:59.820" UserId="9387" Text="C# Exchange bug" />
  <row Id="37432" PostHistoryTypeId="3" PostId="16271" RevisionGUID="41ee6f6a-7b81-4a72-9fe3-af2ed03e0779" CreationDate="2011-08-21T21:02:59.820" UserId="9387" Text="&lt;c#&gt;" />
  <row Id="37433" PostHistoryTypeId="5" PostId="16270" RevisionGUID="a7ca08e6-1ea3-4255-9b9a-ee2a96cd2d4b" CreationDate="2011-08-21T21:23:59.067" UserId="853" Comment="deleted 16 characters in body" Text="I've recently read The Art of Game Design and am currently reading Why Reality is Broken and am wanting to learn more about the psychology behind game design. I'm a computer science student but I'm intrigued by the subject and have thought about minoring in psychology. &#xD;&#xA;&#xD;&#xA;For the veteran game design people out there, would academically studying psychology give a huge advantage to a game designer? There is one class in particular called Sensation and Perception that gets into what goes on in the nervous system when we are stimulated through our five senses and how these stimulations creates certain perceptions. &#xD;&#xA;&#xD;&#xA;So, basically is this over doing it for someone who wants to create games/become a game designer? &#xD;&#xA;&#xD;&#xA;What originally caught my interest in this subject was reading about how zynga hired a psychologist to help design the mechanics for farmville.   " />
  <row Id="37434" PostHistoryTypeId="25" PostId="16270" RevisionGUID="13703006-548e-41ef-bea9-1faf621ea244" CreationDate="2011-08-21T21:37:40.267" Comment="http://twitter.com/#!/StackGameDev/status/105393153732911105" />
  <row Id="37435" PostHistoryTypeId="4" PostId="16246" RevisionGUID="20b16605-61c4-449b-9ba9-cd9b67ae50bb" CreationDate="2011-08-21T21:46:49.237" UserId="7630" Comment="Changed title into a question per meta" Text="How do I create a blob shadow under a character?" />
  <row Id="37436" PostHistoryTypeId="24" PostId="16246" RevisionGUID="20b16605-61c4-449b-9ba9-cd9b67ae50bb" CreationDate="2011-08-21T21:46:49.237" Comment="Proposed by 7630 approved by 1430 edit id of 663" />
  <row Id="37437" PostHistoryTypeId="5" PostId="16252" RevisionGUID="d0a01259-ed36-46a1-89c4-b41f48f1352f" CreationDate="2011-08-21T21:46:54.620" UserId="7630" Comment="several grammatical, added tower flag and change title to a question." Text="I'm trying to get something like the below image. As you can see, there's a highway and inside of it, there'll be some objects moving (millisecond). I guess the street behavior is like a pipeline. When the highway loads an object, it appears at the beginning and it'll be moving through the highway until it arrives in the other extreme of the highway.&#xD;&#xA;&#xD;&#xA;My main problem is, how can I move several objects only inside of the highway?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![screen capture from bloons td4 level 1][1]&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/WToTj.png" />
  <row Id="37438" PostHistoryTypeId="4" PostId="16252" RevisionGUID="d0a01259-ed36-46a1-89c4-b41f48f1352f" CreationDate="2011-08-21T21:46:54.620" UserId="7630" Comment="several grammatical, added tower flag and change title to a question." Text="How do I make objects move along a path?" />
  <row Id="37439" PostHistoryTypeId="6" PostId="16252" RevisionGUID="d0a01259-ed36-46a1-89c4-b41f48f1352f" CreationDate="2011-08-21T21:46:54.620" UserId="7630" Comment="several grammatical, added tower flag and change title to a question." Text="&lt;xna&gt;&lt;c#&gt;&lt;xna-4.0&gt;&lt;windows-phone-7&gt;&lt;tower-defense&gt;" />
  <row Id="37440" PostHistoryTypeId="24" PostId="16252" RevisionGUID="d0a01259-ed36-46a1-89c4-b41f48f1352f" CreationDate="2011-08-21T21:46:54.620" Comment="Proposed by 7630 approved by 1430 edit id of 662" />
  <row Id="37441" PostHistoryTypeId="2" PostId="16272" RevisionGUID="d0d49d18-a3ae-4f90-a10c-e923f55bbd4b" CreationDate="2011-08-21T22:01:02.280" UserId="9387" Text="im getting the blue line under the 0 &#xD;&#xA;&#xD;&#xA;    if (label1.Text = 0)&#xD;&#xA;            {&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37442" PostHistoryTypeId="1" PostId="16272" RevisionGUID="d0d49d18-a3ae-4f90-a10c-e923f55bbd4b" CreationDate="2011-08-21T22:01:02.280" UserId="9387" Text="C# Cannot implicitly convert type 'int' to 'string'" />
  <row Id="37443" PostHistoryTypeId="3" PostId="16272" RevisionGUID="d0d49d18-a3ae-4f90-a10c-e923f55bbd4b" CreationDate="2011-08-21T22:01:02.280" UserId="9387" Text="&lt;c#&gt;" />
  <row Id="37444" PostHistoryTypeId="5" PostId="16272" RevisionGUID="bee17a9d-156c-4343-bdd3-c3e7bde130d9" CreationDate="2011-08-21T22:10:59.637" UserId="9387" Comment="added 42 characters in body" Text="im getting the blue line under the 0 &#xD;&#xA;&#xD;&#xA;http://www.i55.tinypic.com/2zf08y9.png&#xD;&#xA;&#xD;&#xA;    if (label1.Text = 0)&#xD;&#xA;            {&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;            else&#xD;&#xA;            {&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37445" PostHistoryTypeId="2" PostId="16273" RevisionGUID="a92a2f27-d63a-4987-a00e-66a3f7dbe1ad" CreationDate="2011-08-21T22:13:06.427" UserId="9312" Text="Crossreferencing a list of legendary game creators, e.g. http://open-tube.com/greatest-game-developers-who-changed-the-world-of-computer-games/ and hunting down their histories might shed light on the matter, but I would imagine makers have very varied backgrounds, a fair number being highschool dropouts. It's not a major part of any game-oriented academic curriculums so far, but story-telling history definitely is. It's an entertainment field in essence. I would imagine serious psychologists are mainly working on stuff like cancer treatment virtual visualization exercises, post traumatic de-stress simulations, and gambling applications." />
  <row Id="37446" PostHistoryTypeId="2" PostId="16274" RevisionGUID="7d0f3f39-4eb3-4515-b852-98ed21c48525" CreationDate="2011-08-21T23:50:13.903" UserId="2332" Text="I'm not strong on psychology, although the subject interests me greatly. In my opinion, either path you choose, I can't see it giving a disadvantage. Knowing how a person thinks will definitely be important when it comes to creating emotional attachment to characters, scaring the player, etc.&#xD;&#xA;&#xD;&#xA;Although, these skills can also be gained just by playing and analyzing games that currently do what you're after. If you're going after something disturbing and scary, play and analyze Silent Hill games, for example.&#xD;&#xA;&#xD;&#xA;Knowing the reasoning behind people's decisions could aid you in implementing mechanics to create positive perceptions of your games (or whatever perception you're trying to put across), but I would be cautious of the course itself as a lot of material will most likely be fairly irrelevant to games. As you say, Sense and Perception sounds like a good step. If you can, find out more about it, talk to the professors, etc. Be up front about your intentions about what you want to do with the knowledge you're provided and they should be able to tell you directly whether it could help you out.&#xD;&#xA;&#xD;&#xA;Personally, I would find out more about the course, make sure the subject matter is stuff that you're really interested in. On top of that, keep playing a wide variety of games, even if you don't like them. Analyze the best games you've ever played and ask yourself what makes them so great. I believe understanding that is the key to understanding how to make great games.&#xD;&#xA;&#xD;&#xA;Good luck mate." />
  <row Id="37447" PostHistoryTypeId="25" PostId="16268" RevisionGUID="4de1b3a4-c105-4d37-b8b7-170f63938486" CreationDate="2011-08-22T00:37:40.987" Comment="http://twitter.com/#!/StackGameDev/status/105438453524725760" />
  <row Id="37448" PostHistoryTypeId="10" PostId="16271" RevisionGUID="52993dbc-f51c-49b8-ae34-7ca2896105da" CreationDate="2011-08-22T00:37:47.453" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37449" PostHistoryTypeId="10" PostId="16272" RevisionGUID="c9af8960-e966-4cc2-986f-a834841381e7" CreationDate="2011-08-22T00:38:06.907" UserId="51" CloseReasonId="2" Text="[{&quot;Id&quot;:744,&quot;DisplayName&quot;:&quot;Joe Wreschnig&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37450" PostHistoryTypeId="2" PostId="16275" RevisionGUID="5cfcbf0a-ce57-416e-b314-643a7eb244b3" CreationDate="2011-08-22T00:58:54.743" UserId="9134" Text="A cheesy way might be to set up some linear fog.  Make the fog colour black, draw all your geometry white, and voila." />
  <row Id="37451" PostHistoryTypeId="5" PostId="16268" RevisionGUID="9b807182-433d-4f01-8591-1b716db8f3e0" CreationDate="2011-08-22T01:15:17.293" UserId="9396" Comment="moved image inline (now that I have enough rep)" Text="I'm venturing into Mobile/Tablet based development coming from the world of Web Applications.&#xD;&#xA;&#xD;&#xA;I want to write a game similar to 1942/43 video game from the 80's:&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;...similar in the sense that I have a plane/spaceship that flies vertically &quot;up&quot; the screen and stuff comes down to attack it (otherwise nothing that would violate copyright).&#xD;&#xA;&#xD;&#xA;I'm familiar with collision detection, sprites, object pooling, etc. but what I'm spinning my wheels on is how to layout all the code for this game.  e.g. it doesn't fit my normal MVC pattern, I don't have a DB, and the user input will likely be limited to touch based movement around the screen with &quot;auto-fire&quot; on all the time.&#xD;&#xA;&#xD;&#xA;What I'm blanking out on is how to do all the &quot;levels&quot; and sequence &quot;waves&quot; of attackers within a level.&#xD;&#xA;&#xD;&#xA;Should I just have a &quot;level&quot; file for each level, that queue's up attack waves? if so, based on time? based on some event? based on a position passed by the player?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;    &lt;level id=&quot;1&quot;&gt;&#xD;&#xA;      &lt;event timeoffset=&quot;500&quot; type=&quot;attack&quot; name=&quot;vConfiguration&quot; position=&quot;50&quot;/&gt;&#xD;&#xA;      &lt;event timeoffset=&quot;1250&quot; type=&quot;attack&quot; name=&quot;jConfiguration&quot; position=&quot;75&quot;/&gt;&#xD;&#xA;      &lt;event timeoffset=&quot;1300&quot; type=&quot;bonus&quot; name=&quot;quadGunUpgrade&quot; position=&quot;10&quot;/&gt;&#xD;&#xA;      ...&#xD;&#xA;    &lt;/level&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Part of me thinks this would be really easy to setup levels this way, then read in the file to queue up the events for the attacks/bonus/? to occur (where each named &quot;attack&quot; is a bit of configured code to position &quot;N&quot; enemies and start their flight sequences)&#xD;&#xA;&#xD;&#xA;The other part of me thinks - whoa! before you even dream of implementing this - determine how others would approach it - no need to re-invent the wheel or create a monster.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/pDko4.gif" />
  <row Id="37452" PostHistoryTypeId="25" PostId="16220" RevisionGUID="089837a0-fe26-4037-82a5-6287e5efa93a" CreationDate="2011-08-22T03:37:41.053" Comment="http://twitter.com/#!/StackGameDev/status/105483752880340992" />
  <row Id="37453" PostHistoryTypeId="2" PostId="16276" RevisionGUID="cfd184ed-e993-4a8f-9d6c-3d76348780e2" CreationDate="2011-08-22T03:47:02.113" UserId="7728" Text="I have a psychology degree, and have been working as a programmer in the mainstream video game industry for the last thirteen years.&#xD;&#xA;&#xD;&#xA;For me, having the psychology degree (rather than a computer science degree) was a major hurdle to getting hired as a programmer, and if I had it to do over again, I'd almost definitely get the computer science degree instead of the psychology one.&#xD;&#xA;&#xD;&#xA;But you're not talking about getting hired as a programmer;  you're talking about a job in design.  And specifically which degree you get is less important for design jobs than it is for programming jobs, so I think you wouldn't have any trouble at all justifying why you wanted the psychology degree.  &#xD;&#xA;&#xD;&#xA;In fact, I think one could make a very strong argument for why psychology would be an ideal degree for a game designer.  Alternate strong contenders might be history, literature, philosophy, filmmaking, and similar broad disciplines which cross across a lot of areas of knowledge.  As a game designer, you really want a wide breadth of knowledge, rather than a lot of depth in a single area.  Check [Tom Sloper's site][1] for more details about further useful areas of study.&#xD;&#xA;&#xD;&#xA;I will mention, though, that I've personally found that working in the game industry can be doubly stressful when you have a background in psychology.  I've trained rats in [skinner boxes][2], and I've been through the process of vetting human studies for ethics violations.  And sometimes, the things you get asked to do to your players start feeling more like the players are rats in skinner boxes, rather than humans in ethically designed tests.  And that can be a bit distressing, sometimes.&#xD;&#xA;&#xD;&#xA;Or at least, that's been my experience.  None of my colleagues have ever seemed to notice or be bothered.  And so I assume that it's just my psychology background which has made me hyper-sensitive to this sort of thing.  So I thought I'd mention it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.sloperama.com/advice/designprep.htm&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Operant_conditioning_chamber" />
  <row Id="37454" PostHistoryTypeId="2" PostId="16277" RevisionGUID="b7548c66-8c90-4112-b5ac-4636b15a9495" CreationDate="2011-08-22T04:13:13.500" UserId="9400" Text="Check out http://www.kesiev.com/akihabara/ , looked interesting to me as I am researching this also for my pet project.&#xD;&#xA;&#xD;&#xA;Also http://www.limejs.com/ comes with pretty good documentation, which isn't always the case for others." />
  <row Id="37455" PostHistoryTypeId="16" PostId="16277" RevisionGUID="b476cb7f-ef08-44c5-877b-5832f80e3df5" CreationDate="2011-08-22T04:13:13.500" UserId="9400" />
  <row Id="37456" PostHistoryTypeId="5" PostId="16247" RevisionGUID="ba9204f5-b4b6-400e-9249-5f11c28c9852" CreationDate="2011-08-22T05:49:05.690" UserId="1323" Comment="clarified surface vector directions, improved method for mapping depth with occluding surfaces, added note about angle of incidence" Text="There are essentially two different approaches for lighting water based on depth:&#xD;&#xA;&#xD;&#xA;#Voxel-Lighting&#xD;&#xA;&#xD;&#xA;Minecraft uses voxel-based lighting, wich works by propagating light to adjacent cubes, lowering the brightness depending on the block type. Dark oceans are a side effect of this system.&#xD;&#xA;&#xD;&#xA;Water blocks sunlight and reduces the light by 3 levels per block (instead of the default 1 level), wich means the brightness in an ocean for each distance from the surface is:&#xD;&#xA;&#xD;&#xA;    0 (surface): 15 (direct sunlight)&#xD;&#xA;    1:           12&#xD;&#xA;    2:            9&#xD;&#xA;    3:            6&#xD;&#xA;    4:            3&#xD;&#xA;    5 and below:  0 (darkness)&#xD;&#xA;&#xD;&#xA;Source: [Minecraft Wiki - Light](http://www.minecraftwiki.net/wiki/Light#Non-Opaque_Blocks)&#xD;&#xA;&#xD;&#xA;#Distance-Based Shadowing&#xD;&#xA;&#xD;&#xA;In games with a traditional lighting model, this effect can be created by measuring the amount of water that is between the light source and the ocean floor. The light is then faded based on this distance.&#xD;&#xA;There are a few methods for doing this:&#xD;&#xA;&#xD;&#xA;##Direct Calculation&#xD;&#xA;If you have a flat surface, you can easily calculate the distance the light travels in the water if you pass the surface normal away from body of water ![\vec{n}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/n.gif) and the dot product of this normal and a surface position ![s](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s.gif) into the geometry shader.&#xD;&#xA;&#xD;&#xA;The effective water distance is&#xD;&#xA;&#xD;&#xA;![\max(\left ( s - \vec{n}\cdot \vec{p}\right ),0) \cdot \left ( 1 + \tan(\alpha) \right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/Formula.gif)&#xD;&#xA;&#xD;&#xA;where ![\vec{p}](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/p.gif) is the position of the vertex and ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) is the angle between the light direction beneath the surface and the water's surface normal towards the body of water.&#xD;&#xA;&#xD;&#xA;At sunset, ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) only reaches a bit less than 50° because the light is refracted when entering the water.  &#xD;&#xA;Here's a blog post with a good explanation: [The Digital Camera: Total Internal Reflection](http://uptrout.com/2011/08/19/the-digital-camera-total-internal-reflection/)  &#xD;&#xA;Another post with more details: [The Digital Camera: Snell’s Law of Refraction](http://uptrout.com/2011/07/27/the-digital-camera-snells-law-of-refraction/)&#xD;&#xA;&#xD;&#xA;If you're using a heightmap on a surface parallel to the water, ![\left (s - \vec{n}\cdot \vec{p}\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-np.gif) becomes ![\left ( s - h\right )](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/s-h.gif).&#xD;&#xA;The right factor equals 1 if the sun is directly above the water surface.  &#xD;&#xA;  With a point light, you have to calculate ![alpha](http://dl.dropbox.com/u/5013896/Stack%20Overflow/Gamedev/OceanDimming/alpha.gif) for each vertex based on the relative position to the light source.&#xD;&#xA;&#xD;&#xA;With a fixed water level or a fixed light direction, parts of the equation are constant and shouldn't be calculated in the shader for performance reasons.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Fast and accurate&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Only works for flat water surfaces or only for light from directly above, as only one surface is normally taken into account. (The combination of a rough surface and tilted light could work to some extend with parallax mapping.)&#xD;&#xA; - No caustics&#xD;&#xA;&#xD;&#xA;##Shadow Mapping&#xD;&#xA;&#xD;&#xA;If you render the water surface to a separate depth map (as seen from the light source), you can use that depth texture to calculate the distance the light travels in the water before hitting the surface.  &#xD;&#xA;To do this, you project each vertex into the light source's view projection in the vertex shader and do the texture lookup in the pixel shader.&#xD;&#xA;&#xD;&#xA;If the surface is relatively flat, you should use a refracted light origin for better results.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works with relatively complex water geometry, as long as it doesn't occlude itself.*&#xD;&#xA; - Can be reused for almost any kind of partially transparent volume.&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slower than the direct calculation.&#xD;&#xA; - Needs additional VRAM for the depth map.&#xD;&#xA; - Not 100% accurate.&#xD;&#xA;&#xD;&#xA;*You can determine the amount of water in front of the nearest solid surface by counting the depth from the light's POV as follows:&#xD;&#xA;&#xD;&#xA; 1. Render the solid geometry in your scene as normal. For each fragment, you add the depth value to the result texture.&#xD;&#xA; 2. Render the water's front-faces without updating the depth buffer and subtract the fragments' depths from the result.&#xD;&#xA; 3. Render the back-faces in the same way, but add the fragment depth to the result.&#xD;&#xA;&#xD;&#xA;The result texture now contains the amount of water in front of the light in light-view-space, so the value must be transformed back before you use it. This method works to calculate the directional light (minus refraction), but will lead to incorrect ambient light if the surfaces are very irregular and there's a large amount of air between to bodies of water affecting the same fragments.  &#xD;&#xA;The pros and cons are the same as for normal shadow mapping, except that you need one more buffer while calculating depth and the performance is worse because you have to draw more geometry.&#xD;&#xA;&#xD;&#xA;##Ray-Tracing&#xD;&#xA;&#xD;&#xA;Ray tracing is by far the most accurate but also the most expensive solution for rendering transparent volumes. There are two ways of doing this: 1. Tracing from the ocean floor towards the surface and 2. Tracing from the light source towards the water. Multiple rays are needed for each point on the floor to calculate the brightness.&#xD;&#xA;&#xD;&#xA;###Pros:&#xD;&#xA;&#xD;&#xA; - Works correctly with every geometry.&#xD;&#xA; - Correct caustics!&#xD;&#xA;&#xD;&#xA;###Cons:&#xD;&#xA;&#xD;&#xA; - Slow!&#xD;&#xA;&#xD;&#xA;#Additional effects&#xD;&#xA;&#xD;&#xA;There are a few more things to take into account when rendering water:&#xD;&#xA;&#xD;&#xA;##Fog&#xD;&#xA;&#xD;&#xA;Light in water is scattered again while travelling to the observer, so you should blend it towards a solid color.&#xD;&#xA;&#xD;&#xA;**If the observer is submerged**, you can just render fog based on the final result of the depth buffer. The fog color, but not its density should change with the observer's distance from the surface! (Minecraft only uses this part of the effect.)&#xD;&#xA;&#xD;&#xA;**If the observer looks at the water from above**, you need to calculate the fog based on the depth difference between the surface and the geometry under water. The fog colour should get slightly darker with larger depth differences, but should only change to the point where the fog is fully opaque.&#xD;&#xA;&#xD;&#xA;The fog colour should also depend on the view direction for each pixel, so it's slightly darker when looking down in both cases.&#xD;&#xA;&#xD;&#xA;##Faking Caustics&#xD;&#xA;&#xD;&#xA;If you use a seamless tiling 3D-Texture instead of a decal for fake caustics, you can avoid stretching on vertical surfaces. The strength of scattered light near the surface varies in three dimensions, so using a 2D-Texture usually produces stretching somewhere in the scene. You can model changing light angles by projecting the vertex positions of the floor into a different coordinate system.&#xD;&#xA;&#xD;&#xA;Another possibility is to calculate the light density based on the surface position in the light's coordinate system, although that would most likely cost some performance.&#xD;&#xA;&#xD;&#xA;The caustics should fade faster than the diffuse light with increasing depth.&#xD;&#xA;&#xD;&#xA;##Colour Gradient&#xD;&#xA;&#xD;&#xA;Colours are scattered differently, so the light colour should change with increasing depth. This also prevents abrupt edges where, for example, a beach intersects the water surface.&#xD;&#xA;&#xD;&#xA;##Angle of Incidence&#xD;&#xA;&#xD;&#xA;Because of refraction, the light hits the ocean floor much steeper than it normally would. The [Wikipedia article about Snell's law](http://en.wikipedia.org/wiki/Snell's_law#Derivations_and_formulae) has formulae for angles and vectors." />
  <row Id="37457" PostHistoryTypeId="2" PostId="16278" RevisionGUID="7a4cb6a4-f9e9-4f51-8857-fa486f98926b" CreationDate="2011-08-22T05:51:26.870" UserId="6882" Text="I've been playing with loading and displaying Source Engine models (TF2, specifically) and have had mild success, but there are some aspects of it that are eluding me still. I've been primarily looking at http://developer.valvesoftware.com/wiki/MDL and online forks of the SDK headers like http://hlssmod.net/he_code/public/studio.h to understand the formats, but I've found the headers to be helpful, but lacking some crucial implementation details. The Developer Community pages do talk implementation, but much of it is speculation and I've already identified several points where it is wrong, so I'm struggling to locate some better resources.&#xD;&#xA;&#xD;&#xA;I've got the whole .VVD file parsing now (as in: I can get the correct verts for a given LOD, verified by rendering a pointcloud.) The specific issue I'm looking at now is in the .dx90.VTX file. Drilling down into the Mesh Strip Groups, it seems like I can render the first strip group just fine (I have the Heavy's chest, arms, and legs rendering) but subsequent meshes are a mess of random triangles. It feels to me as if there should be a per-mesh offset into the .VVDs vertexes somewhere within the .VTXs structure, but I can't locate one. Maybe there's something in the .MDL, which I haven't started looking into yet, but it feels very odd to me to have such closely related data in separate files.&#xD;&#xA;&#xD;&#xA;I know that's probably all gibberish to anyone that's not intimately familiar with the Source model formats. Really what I could use more than anything else is some reference code from another app that is loading these files. Are there any open-source exporters/viewers out there?" />
  <row Id="37458" PostHistoryTypeId="1" PostId="16278" RevisionGUID="7a4cb6a4-f9e9-4f51-8857-fa486f98926b" CreationDate="2011-08-22T05:51:26.870" UserId="6882" Text="Source Engine VVD and VTX formats" />
  <row Id="37459" PostHistoryTypeId="3" PostId="16278" RevisionGUID="7a4cb6a4-f9e9-4f51-8857-fa486f98926b" CreationDate="2011-08-22T05:51:26.870" UserId="6882" Text="&lt;models&gt;&lt;loading&gt;" />
  <row Id="37460" PostHistoryTypeId="25" PostId="16278" RevisionGUID="9a1985a2-7a45-47bb-a59f-b11d6e216ce1" CreationDate="2011-08-22T06:37:41.350" Comment="http://twitter.com/#!/StackGameDev/status/105529053670424577" />
  <row Id="37462" PostHistoryTypeId="2" PostId="16280" RevisionGUID="bd94647e-fb16-4e4b-acc0-a9afd954042f" CreationDate="2011-08-22T07:50:22.233" UserId="9394" Text="I'm trying to make a similar to http://www.cultofmac.com/edge-for-iphone-controversy-rumbles-on-game-again-pulled-from-app-store/13115, but I'm not sure if it's real-time 3D or just really good 2D. Any thoughts?" />
  <row Id="37463" PostHistoryTypeId="1" PostId="16280" RevisionGUID="bd94647e-fb16-4e4b-acc0-a9afd954042f" CreationDate="2011-08-22T07:50:22.233" UserId="9394" Text="3D or isometric 2D?" />
  <row Id="37464" PostHistoryTypeId="3" PostId="16280" RevisionGUID="bd94647e-fb16-4e4b-acc0-a9afd954042f" CreationDate="2011-08-22T07:50:22.233" UserId="9394" Text="&lt;3d&gt;&lt;isometric&gt;" />
  <row Id="37466" PostHistoryTypeId="4" PostId="16235" RevisionGUID="67ad11c4-154b-458f-8581-67f3d039adf8" CreationDate="2011-08-22T08:09:29.473" UserId="744" Comment="edited title" Text="How can I make water appear darker with depth, like in Minecraft?" />
  <row Id="37467" PostHistoryTypeId="4" PostId="16278" RevisionGUID="84252830-1fdb-4adb-a521-f8ea000f668f" CreationDate="2011-08-22T08:10:43.027" UserId="744" Comment="edited title" Text="Are there any open source Source engine VTX/VVD viewers?" />
  <row Id="37468" PostHistoryTypeId="6" PostId="16278" RevisionGUID="84252830-1fdb-4adb-a521-f8ea000f668f" CreationDate="2011-08-22T08:10:43.027" UserId="744" Comment="edited title" Text="&lt;models&gt;&lt;file-format&gt;&lt;loading&gt;" />
  <row Id="37469" PostHistoryTypeId="4" PostId="13930" RevisionGUID="da98768f-3a59-4748-9624-95646e69c154" CreationDate="2011-08-22T08:11:35.117" UserId="744" Comment="edited tags; edited title" Text="How can I draw the depth value in GLSL?" />
  <row Id="37470" PostHistoryTypeId="6" PostId="13930" RevisionGUID="da98768f-3a59-4748-9624-95646e69c154" CreationDate="2011-08-22T08:11:35.117" UserId="744" Comment="edited tags; edited title" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;" />
  <row Id="37471" PostHistoryTypeId="5" PostId="16254" RevisionGUID="f90e1490-c0f1-4866-a79c-cde8bc695b16" CreationDate="2011-08-22T08:13:24.160" UserId="744" Comment="deleted 39 characters in body; edited tags; edited title" Text="How can I handle a touch event in cocos2d for Android? And how to move a sprite using `ccTouchesMoved`?&#xD;&#xA;" />
  <row Id="37472" PostHistoryTypeId="4" PostId="16254" RevisionGUID="f90e1490-c0f1-4866-a79c-cde8bc695b16" CreationDate="2011-08-22T08:13:24.160" UserId="744" Comment="deleted 39 characters in body; edited tags; edited title" Text="How can I handle a touch event in cocos2d for Android?" />
  <row Id="37473" PostHistoryTypeId="6" PostId="16254" RevisionGUID="f90e1490-c0f1-4866-a79c-cde8bc695b16" CreationDate="2011-08-22T08:13:24.160" UserId="744" Comment="deleted 39 characters in body; edited tags; edited title" Text="&lt;android&gt;&lt;cocos2d&gt;" />
  <row Id="37474" PostHistoryTypeId="2" PostId="16281" RevisionGUID="5e4636e1-fe29-4a0d-8c22-ca0fa1bc739a" CreationDate="2011-08-22T09:00:21.223" UserId="8866" Text="I will keep this simple. The question pretty much sums up what I am looking for. Where are some locations for 2D effects. Specifically ones like those used in old Amiga demos. They do not need to have source code. I am just looking for inspiration to code and replicate some of the effects.&#xD;&#xA;&#xD;&#xA;It would be nice to have a list of links to images and examples as opposed to downloading old demos and running them through an emulator." />
  <row Id="37475" PostHistoryTypeId="1" PostId="16281" RevisionGUID="5e4636e1-fe29-4a0d-8c22-ca0fa1bc739a" CreationDate="2011-08-22T09:00:21.223" UserId="8866" Text="Where can I find examples of demoscene-like pixel art effects?" />
  <row Id="37476" PostHistoryTypeId="3" PostId="16281" RevisionGUID="5e4636e1-fe29-4a0d-8c22-ca0fa1bc739a" CreationDate="2011-08-22T09:00:21.223" UserId="8866" Text="&lt;graphic-effects&gt;&lt;special-effects&gt;" />
  <row Id="37477" PostHistoryTypeId="2" PostId="16282" RevisionGUID="cf6f3c96-1185-411d-add8-062f2490e12e" CreationDate="2011-08-22T09:08:52.460" UserId="4129" Text="I have a 2d heightfield converted into a very simple mesh and textured with tiles from a texture atlas.  The tiles texture is created with:&#xD;&#xA;&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);&#xD;&#xA;&#xD;&#xA;On my integrated Intel card, it draws correctly.  On a friend's ATI card, it has very visible edges.&#xD;&#xA;&#xD;&#xA;What causes this, and how can I avoid it?&#xD;&#xA;&#xD;&#xA;![artifacts][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GA93d.jpg" />
  <row Id="37478" PostHistoryTypeId="1" PostId="16282" RevisionGUID="cf6f3c96-1185-411d-add8-062f2490e12e" CreationDate="2011-08-22T09:08:52.460" UserId="4129" Text="texture edge artifacts on some cards but not others" />
  <row Id="37479" PostHistoryTypeId="3" PostId="16282" RevisionGUID="cf6f3c96-1185-411d-add8-062f2490e12e" CreationDate="2011-08-22T09:08:52.460" UserId="4129" Text="&lt;opengl&gt;" />
  <row Id="37480" PostHistoryTypeId="5" PostId="16282" RevisionGUID="d534d019-e49d-46fa-9612-525c9bed776c" CreationDate="2011-08-22T09:30:02.770" UserId="4129" Comment="added 31 characters in body" Text="I have a 2d heightfield converted into a very simple mesh and textured with tiles from a texture atlas.  The tiles texture is drawn with:&#xD;&#xA;&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);&#xD;&#xA;&#xD;&#xA;On my integrated Intel card, it draws as I intend (top picture).  On a friend's ATI card, it has very visible edges (bottom picture).&#xD;&#xA;&#xD;&#xA;What causes this, and how can I avoid it?&#xD;&#xA;&#xD;&#xA;![artifacts][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GA93d.jpg" />
  <row Id="37481" PostHistoryTypeId="25" PostId="16221" RevisionGUID="c04471db-1560-4e87-ac7b-da64300fed60" CreationDate="2011-08-22T09:37:42.613" Comment="http://twitter.com/#!/StackGameDev/status/105574355882352640" />
  <row Id="37483" PostHistoryTypeId="2" PostId="16284" RevisionGUID="9bda2b0d-78d1-486b-99df-cad57e5a2427" CreationDate="2011-08-22T10:53:17.447" UserId="9405" Text="Hornet archives have the biggest collection of oldschool sources and docs in the internets (mostly from PC though)&#xD;&#xA;&#xD;&#xA;ftp://ftp.scene.org/mirrors/hornet/code/&#xD;&#xA;&#xD;&#xA;Pouet, among other goodies, has a metric ton of links to youtube vids, so you don't have to use any emulator&#xD;&#xA;&#xD;&#xA;http://www.pouet.net&#xD;&#xA;&#xD;&#xA;dunno about the Amiga scene, i'd be interested as well." />
  <row Id="37484" PostHistoryTypeId="2" PostId="16285" RevisionGUID="a41220a4-10c4-453e-bdde-9ee90a81b796" CreationDate="2011-08-22T11:18:05.527" UserId="6362" Text="In my opinion, the thing that adds most to isometric games is the 2D graphics. You are trying to simulate a 3D enviroment with 2D graphics, so it will take some workaround to get the 3D effect you desire (depth sorting, rotating the view). The game you showed doesn't use any 2D assets. So 3D seems like a more logical choice.&#xD;&#xA;" />
  <row Id="37485" PostHistoryTypeId="2" PostId="16286" RevisionGUID="a4916f9f-4c33-4a44-8193-cfc1f6435280" CreationDate="2011-08-22T11:22:03.697" UserId="6362" Text="It's not free, but this seems to be THE gesture library for actionscript. http://gestureworks.com/features/" />
  <row Id="37486" PostHistoryTypeId="2" PostId="16287" RevisionGUID="21dfa78a-fb0d-4a95-adc5-6bd0db67a7df" CreationDate="2011-08-22T11:37:21.670" UserId="3217" Text="&#xD;&#xA;I'm creating a logic game based on Fox and Hounds game. The player plays the fox and AI plays the hounds. (as far as I can see) I managed to make the AI perfect, so it never loses. Leaving it as such would not be much fun for human players.&#xD;&#xA;&#xD;&#xA;Now, I have to dumb-down the AI so human can win, but I'm not sure how. The current AI logic is based on pattern-matching - if I introduce random moves which make the board go out of pattern space the AI would most probably play dumb until the end of the game.&#xD;&#xA;&#xD;&#xA;Any ideas how to dumb down the AI in such way that is does not go from &quot;genius&quot; to &quot;completely dumb&quot; in a single move?&#xD;&#xA;" />
  <row Id="37487" PostHistoryTypeId="1" PostId="16287" RevisionGUID="21dfa78a-fb0d-4a95-adc5-6bd0db67a7df" CreationDate="2011-08-22T11:37:21.670" UserId="3217" Text="How to create a reasonable AI?" />
  <row Id="37488" PostHistoryTypeId="3" PostId="16287" RevisionGUID="21dfa78a-fb0d-4a95-adc5-6bd0db67a7df" CreationDate="2011-08-22T11:37:21.670" UserId="3217" Text="&lt;ai&gt;" />
  <row Id="37489" PostHistoryTypeId="2" PostId="16288" RevisionGUID="6606f947-2768-4e94-99cf-6a45f2ff2daf" CreationDate="2011-08-22T11:58:58.123" UserId="2792" Text="The Art of Demomaking from the old flipcode archives might be a good start&#xD;&#xA;http://www.flipcode.com/archives/The_Art_of_Demomaking-Issue_01_Prologue.shtml&#xD;&#xA;&#xD;&#xA;The whole site has a lot of stuff, but is mostly PC centric although pre 3D hardware.&#xD;&#xA;&#xD;&#xA;http://www.flipcode.com/archives/articles.shtml" />
  <row Id="37490" PostHistoryTypeId="5" PostId="16282" RevisionGUID="0f373171-177e-453f-9dac-b90443f5a273" CreationDate="2011-08-22T12:16:56.973" UserId="4129" Comment="added 105 characters in body" Text="I have a 2d heightfield converted into a very simple mesh and textured with tiles from a texture atlas.  The tiles texture is drawn with:&#xD;&#xA;&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);&#xD;&#xA;&#xD;&#xA;On my integrated Intel card, it draws as I intend (top picture).  On a friend's ATI card, it has very visible edges (bottom picture).&#xD;&#xA;&#xD;&#xA;What causes this, and how can I avoid it?&#xD;&#xA;&#xD;&#xA;![artifacts][1]&#xD;&#xA;&#xD;&#xA;Extra info:&#xD;&#xA;&#xD;&#xA; - the texture atlas is a simple vertical strip, so the right-side of each tile is 1.0f.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GA93d.jpg" />
  <row Id="37491" PostHistoryTypeId="5" PostId="16282" RevisionGUID="b22fba3e-b68c-4e8b-9d05-ac2712d936ed" CreationDate="2011-08-22T12:22:43.503" UserId="4129" Comment="added 105 characters in body" Text="I have a 2d heightfield converted into a very simple mesh and textured with tiles from a texture atlas.  The tiles texture is drawn with:&#xD;&#xA;&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);&#xD;&#xA;&#xD;&#xA;On my integrated Intel card, it draws as I intend (top picture).  On a friend's ATI card, it has very visible edges (bottom picture).&#xD;&#xA;&#xD;&#xA;What causes this, and how can I avoid it?&#xD;&#xA;&#xD;&#xA;![artifacts][1]&#xD;&#xA;&#xD;&#xA;Extra info:&#xD;&#xA;&#xD;&#xA; - glColor4f(1,1,1,1) has been called before drawing the mesh&#xD;&#xA; - the texture atlas is a simple vertical strip, so the right-side of each tile has `x=1.0f`&#xD;&#xA; - the vertices are being shared so there isn't really a 'hole' between my rows&#xD;&#xA; - the resolution on both systems is the same&#xD;&#xA; - the vertices and texture coordinates are all passed as GL_FLOAT&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GA93d.jpg" />
  <row Id="37492" PostHistoryTypeId="2" PostId="16289" RevisionGUID="72ea8783-a0ff-49a6-83d4-9109f647bd3a" CreationDate="2011-08-22T12:31:44.150" UserId="9134" Text="At a guess you should be using GL_CLAMP_TO_EDGE instead of GL_CLAMP.  I don't have an Intel to verify on but I suspect that the ATI is actually the one doing the right thing (OpenGL on Intel can suck badly - their drivers are notorious)." />
  <row Id="37493" PostHistoryTypeId="5" PostId="16282" RevisionGUID="bd24248a-86f0-4616-8a03-8dfc8a41ec41" CreationDate="2011-08-22T12:34:00.920" UserId="4129" Comment="added 33 characters in body" Text="I have a 2d heightfield converted into a very simple mesh and textured with tiles from a texture atlas.  The tiles texture is drawn with:&#xD;&#xA;&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);&#xD;&#xA;	glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);&#xD;&#xA;&#xD;&#xA;On my integrated Intel card, it draws as I intend (top picture).  On a friend's ATI card, it has very visible edges (bottom picture).&#xD;&#xA;&#xD;&#xA;What causes this, and how can I avoid it?&#xD;&#xA;&#xD;&#xA;![artifacts][1]&#xD;&#xA;&#xD;&#xA;Extra info:&#xD;&#xA;&#xD;&#xA; - glColor4f(1,1,1,1) has been called before drawing the mesh&#xD;&#xA; - the texture atlas is a simple vertical strip, so the right-side of each tile has `x=1.0f`&#xD;&#xA; - the vertices are being shared so there isn't really a 'hole' between my rows&#xD;&#xA; - the resolution on both systems is the same&#xD;&#xA; - the vertices and texture coordinates are all passed as GL_FLOAT&#xD;&#xA; - the tiles atlas is mipmapped&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/GA93d.jpg" />
  <row Id="37494" PostHistoryTypeId="25" PostId="16287" RevisionGUID="f8a264ca-6021-44e7-bd2a-92ab14c85d62" CreationDate="2011-08-22T12:37:42.583" Comment="http://twitter.com/#!/StackGameDev/status/105619654990508032" />
  <row Id="37495" PostHistoryTypeId="2" PostId="16290" RevisionGUID="02f8fb3a-e5bd-4598-97fb-dbf0a101922b" CreationDate="2011-08-22T12:39:10.077" UserId="6362" Text="I used this book: [Foundation ActionScript 3.0 Animation: Making Things Move! ][1]&#xD;&#xA;It pretty much discusses the basics, not only about actionscript but also about flash itself. Which is pretty essential if you wan't to build graphics heavy applications (games!)&#xD;&#xA;&#xD;&#xA;The book doesn't *really* discuss games, but does teach you the fundamentals of making games. You will create a sphere that you will be able to controll with your keyboard using some easy physics for example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I understand the copy pasting without understanding, I had the same problem when I got my first semester in actionscript (failed miserably, then passed with a 9/10 next year). I will give you a very brief and basic explanation of all the things I found confusing.&#xD;&#xA;&#xD;&#xA;**Variables**&#xD;&#xA;-------------&#xD;&#xA;&#xD;&#xA;Everything with a [var] notation in front of it is a variable. A variable is simple a holder for a certain value. A real world example of a variable is your bank balance - it holds your balance! &#xD;&#xA;Every variable has a type, just to name some: &#xD;&#xA;&#xD;&#xA; - Number: holds a number&#xD;&#xA; - String: holds a piece of text&#xD;&#xA; - Sprite: A graphic&#xD;&#xA;&#xD;&#xA;So your bank balance could be a variable with the type number.&#xD;&#xA;&#xD;&#xA;Note: You will see &quot;int&quot; and &quot;number&quot; both being used as numeric values. The difference is that int can't hold floating point values and is therefore calculated faster. Number can hold floating values but is slower.&#xD;&#xA;&#xD;&#xA;In code: (everything with &quot;//&quot; in front of it is a comment and is not executable code)&#xD;&#xA;&#xD;&#xA;        //var: we tell actionscript that we're making a variable&#xD;&#xA;		//balance: the name to refer to this variable is named ballance&#xD;&#xA;		//:Number: We tell actionscript that the variable is the type number&#xD;&#xA;		//=100: We assign the value 100 to the variable&#xD;&#xA;		var balance:Number = 100;&#xD;&#xA;		&#xD;&#xA;		//we can also change the variable's value later on like this:&#xD;&#xA;		balance = 200;&#xD;&#xA;		&#xD;&#xA;		//or creating a new variable and add them up&#xD;&#xA;		var paycheck:Number = 100;&#xD;&#xA;		&#xD;&#xA;		balance += paycheck; //200 + 100 = 300!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now we know that balance is 300, but how would we check in flash? We can use the trace() command for this. Trace doesn't actually add anything for your application, it is mainly for debugging purposes. trace will display a value to an external panel in flash. So if we would want to check the value for the balance we would do the following:&#xD;&#xA;&#xD;&#xA;    trace(balance);&#xD;&#xA;&#xD;&#xA;Try tracing before and after you added the paycheck, you will see that the value has changed!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now using sprites is ofcourse a little different, since it doesn't hold any numbers, but a graphic. Flash uses a canvas called the stage. If we want to display something we need to add it to the stage. Just as you would add your paint to the canvas to make a painting. Adding things to the stage is done by using addchild(objectToBeAddedHere).&#xD;&#xA;&#xD;&#xA;However, just making an empty sprite will display nothing, since it doesn't contain any graphics yet. Using a brush without paint on it wouldn't create anything right? Creating simple graphics with flash is done as following:&#xD;&#xA;&#xD;&#xA;    //we want to create a variable called example sprite with the type Sprite.&#xD;&#xA;		//what should it hold? A new Sprite!&#xD;&#xA;		var examplesprite:Sprite = new Sprite();&#xD;&#xA;		&#xD;&#xA;		//we have created a new sprite, but by default a sprite is empty. Let's create some graphics&#xD;&#xA;		//to create create grahpics, the sprite has a graphics property. You can access properties by using a point (.)&#xD;&#xA;		//examplesprite.graphics -&gt; we have now accessed the graphics, let's call a function within those graphics!&#xD;&#xA;		//we will talk about functions later on, don't worry. Let's call the function beginfill to give the sprite a colour.&#xD;&#xA;		examplesprite.graphics.beginFill(0x000000); //0x000000 = black;&#xD;&#xA;		&#xD;&#xA;		//we have given it some colour, but what exactle have we given colour? exactly, nothing!&#xD;&#xA;		//lets create a circle shape using the graphics property again.&#xD;&#xA;		examplesprite.graphics.drawCircle(0, 0, 10); //x, y, radius&#xD;&#xA;		&#xD;&#xA;		examplesprite.graphics.endFill(); //We are done filling our shape, so we need to use endFill now&#xD;&#xA;		&#xD;&#xA;		//the sprite is complete! but how do we show it on the stage? using addchild!&#xD;&#xA;		addChild(examplesprite);&#xD;&#xA;&#xD;&#xA;You have now created a circle shaped sprite with 10 pixel radius at the location's given in drawCircle (0,0). Flash's coordinate system begins in the topleft corner, so x and y 0 is 0 pixels from the top left. x = 10 woul move the sprite 10 pixels to the right. y = 10 would move the sprite 10 pixels below.&#xD;&#xA;&#xD;&#xA;Try it:&#xD;&#xA;&#xD;&#xA;		var examplesprite:Sprite = new Sprite();&#xD;&#xA;		examplesprite.graphics.beginFill(0x000000); //0x000000 = black;&#xD;&#xA;		examplesprite.graphics.drawCircle(0, 0, 10); //x, y, radius&#xD;&#xA;		examplesprite.graphics.endFill(); &#xD;&#xA;	&#xD;&#xA;		addChild(examplesprite);&#xD;&#xA;		examplesprite.x = 10;&#xD;&#xA;		examplesprite.y = 10;&#xD;&#xA;&#xD;&#xA;## Functions ##&#xD;&#xA;These are the basics for variables. let's move on to functions&#xD;&#xA;A function is sequence of code to be executed. drawCircle(x, y, radius) is a function that holds a sequence of code to draw a circle. &#xD;&#xA;&#xD;&#xA;A function can have parameter variables that you need to input. The drawCircle has x, y and radius as parameters. You can pass it values, but also variables of the given type into the parameter. x, y and radius are all of the type number.&#xD;&#xA;&#xD;&#xA;Let's move the drawing of a circle into a function now.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;		//we're not using a variable but a function now, so note function in front. drawCircle is the name to refer to the function&#xD;&#xA;		//X, Y and Radius are the parameters, all with the type number. colour holds a colour, which is of the type uint in this case;&#xD;&#xA;		function drawCircle(X:Number, Y:Number, Radius:Number, colour:uint) {&#xD;&#xA;			&#xD;&#xA;			//let this function create a new sprite!&#xD;&#xA;			var circle:Sprite = new Sprite();&#xD;&#xA;			circle.graphics.beginFill(colour);&#xD;&#xA;			circle.graphics.drawCircle(X, Y, Radius);&#xD;&#xA;			circle.graphics.endFill();&#xD;&#xA;			&#xD;&#xA;			addchild(circle);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		//to use the function, you call it like this:&#xD;&#xA;		drawCircle(10, 10, 20, 0x000000);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;    //we could also pass it variables if we wanted:&#xD;&#xA;    		var x:Number = 10;&#xD;&#xA;    		var y:Number = 10;&#xD;&#xA;    		var radius:Number = 20;&#xD;&#xA;    		var colour:uint = 0x000000;&#xD;&#xA;    		&#xD;&#xA;    		drawCircle(x, y, radius, colour);&#xD;&#xA;    		&#xD;&#xA;    		//important! we cannot acces the circle variable outside of the function, if you want to acces the circle&#xD;&#xA;    		//outside of the function you should make the variable before the function.&#xD;&#xA;    		&#xD;&#xA;    		var circle:Sprite;&#xD;&#xA;    		&#xD;&#xA;    		function drawCircle(X:Number, Y:Number, Radius:Number, colour:uint) {&#xD;&#xA;    			circle = new Sprite();&#xD;&#xA;    			//blablabla&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    		//the circle is outside of the function, we can acces it, hurray.&#xD;&#xA;    		circle.x = 10;&#xD;&#xA;&#xD;&#xA;## Events ##&#xD;&#xA;Last but not least events!&#xD;&#xA;Events are as you might have figgured, events that happen during your application. There are events for when you click your mouse, when you press your keyboard, etc etc. You can react to these event with a function. It works likes this:&#xD;&#xA;&#xD;&#xA;     //we want to &quot;listen&quot; to an event of the type MouseEvent, and the mousevent action is CLICK.&#xD;&#xA;		//so we will wait for when the mouse is clicked, and attach a function to be executed when that happens&#xD;&#xA;		stage.addEventListener(MouseEvent.CLICK, functionWeWantToCall);&#xD;&#xA;		&#xD;&#xA;		//the parameter is the type of event we use, in this case MouseEvent&#xD;&#xA;		function functionWeWantToCall(e:MouseEvent) {&#xD;&#xA;			&#xD;&#xA;			//do something&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;		//the eventlistener is attached to the stage right now, so it happend when the stage is pressed.&#xD;&#xA;		//you could also attach it to a created sprite for example;&#xD;&#xA;		var circle:Sprite = new Sprite();&#xD;&#xA;		circle.graphics.beginFill(colour);&#xD;&#xA;		circle.graphics.drawCircle(X, Y, Radius);&#xD;&#xA;		circle.graphics.endFill();&#xD;&#xA;			&#xD;&#xA;		addchild(circle);&#xD;&#xA;		&#xD;&#xA;		circle.addEventListener(MouseEvent.CLICK, clickCircle);&#xD;&#xA;		&#xD;&#xA;		function clickCircle(e:MouseEvent) {&#xD;&#xA;			&#xD;&#xA;			//we change the scale of the sprite when the sprite is clicked&#xD;&#xA;			//we can detect the target of the click by using e.target property&#xD;&#xA;			e.target.scaleX += 1; //increase the scale on the X axis by 1;&#xD;&#xA;			e.target.scaleY += 1;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;There are events for bassicly everything, shouldn't be too hard to find online. The Event.ENTER_FRAME is very important for games. The function attached to the event is called every time a new frame starts (30 times a second default in flash). So if you add 1 to the x position of a sprite each time that function is called, the sprite will move :)&#xD;&#xA;&#xD;&#xA;Using keyboard events, you can add or subtract values from the x and y of a sprite. You can essientally controll it usin your keyboard!&#xD;&#xA;&#xD;&#xA;Sorry for the lengthy write-up. I remember how frustrating it was for me. Good luck!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Foundation-ActionScript-3-0-Animation-Making/dp/1590597915" />
  <row Id="37496" PostHistoryTypeId="2" PostId="16291" RevisionGUID="13deaeee-95b5-4586-89a5-92ca778e003d" CreationDate="2011-08-22T12:39:20.990" UserId="8578" Text="Since this appears to be a 'solved' game, the only answer is that the computer must make intentionally bad moves.&#xD;&#xA;&#xD;&#xA;A quick solution may be to calculate the best move, then also calculate another legal move that may not be so good.  The difficulty rating of the AI would be measured in the percent chance it picks the other not so good move, over the perfect move.&#xD;&#xA;&#xD;&#xA; - Difficult - 90% good moves&#xD;&#xA; - Hard - 70% good moves&#xD;&#xA; - Normal - 50% good moves&#xD;&#xA; - Simple - 20% good moves&#xD;&#xA; - Was Dropped As A Child - &lt;5% good moves&#xD;&#xA; - Hotdog - All Random&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37503" PostHistoryTypeId="2" PostId="16294" RevisionGUID="1bbe9551-4b39-4f3e-8a6b-a80ef2fd1e0b" CreationDate="2011-08-22T14:08:04.610" UserId="7831" Text="Try using `GL_CLAMP_TO_EDGE`. The GL spec says, that `GL_CLAMP` clamps to [0,1], so you get problems at the edge (maybe a wraparound or the border color, don't know), whereas `GL_CLAMP_TO_EDGE` clamps to `[0.5/size, 1-0.5/size]`, which is what you want, as GL returns exact texel values at the texel center.&#xD;&#xA;&#xD;&#xA;I'm not sure who is doing it right, maybe it's just undefined behaviour, or the ATI is right, as it seems to use the border color when out of the valid texture range. In either case, you are on the safe side with using `GL_CLAMP_TO_EDGE`." />
  <row Id="37505" PostHistoryTypeId="5" PostId="16294" RevisionGUID="2d7d1a3f-f133-476d-b9d5-3beb7629b2e7" CreationDate="2011-08-22T14:17:51.237" UserId="7831" Comment="added 184 characters in body" Text="Try using `GL_CLAMP_TO_EDGE`. The GL spec says, that `GL_CLAMP` clamps to [0,1], so you get problems at the edge where the border color gets in, whereas `GL_CLAMP_TO_EDGE` clamps to `[0.5/size, 1-0.5/size]`, which is what you want, as GL returns exact texel values at the texel center.&#xD;&#xA;&#xD;&#xA;I think the ATI is right, as it uses the border color for values out of the valid texture range. which would either dim the edge region (when filtering linear) or make one side completely black (the default border color) when using nearest neighbour filtering. Or maybe on the Intel you just don't get exact 1.0, so in nearest filtering you still get the last valid texel. In either case, you are on the safe side with using `GL_CLAMP_TO_EDGE`." />
  <row Id="37506" PostHistoryTypeId="16" PostId="6522" RevisionGUID="100ce57f-094b-4f09-ad1e-36f0c95cad8c" CreationDate="2011-08-22T14:23:33.310" UserId="51" />
  <row Id="37509" PostHistoryTypeId="16" PostId="16286" RevisionGUID="63a6faa4-ebc6-44e3-a7bc-f94d2bddc396" CreationDate="2011-08-22T14:23:33.310" UserId="51" />
  <row Id="37511" PostHistoryTypeId="4" PostId="16282" RevisionGUID="7a79b732-ee7c-41ba-b989-364d45443438" CreationDate="2011-08-22T14:26:09.537" UserId="7630" Comment="making title into question per SO meta's recommendations" Text="What is causing these texture edge artifacts on some video cards?" />
  <row Id="37512" PostHistoryTypeId="24" PostId="16282" RevisionGUID="7a79b732-ee7c-41ba-b989-364d45443438" CreationDate="2011-08-22T14:26:09.537" Comment="Proposed by 7630 approved by 51 edit id of 664" />
  <row Id="37513" PostHistoryTypeId="2" PostId="16295" RevisionGUID="b22e3c3c-bcd3-49a3-9fb0-9faf1e5cd142" CreationDate="2011-08-22T14:36:40.697" UserId="7328" Text="There is one big difference between 2d isometric and 3d games. isometric games always have some **specific** camera and object angles. &#xD;&#xA;&#xD;&#xA;If you are going to create a game similar to that one, I guess you can use a isometric view since the games feels complete even without rotating the camera, and it's obvious that object in the game also can only be rendered with some specific angles. &#xD;&#xA;&#xD;&#xA;in general you can choose both isometric or 3d game, but 3d rendering consumes much more computational power and may cause low fps in handheld devices like iphone. in the other hand managing game scene in a 3d game is much more easier." />
  <row Id="37514" PostHistoryTypeId="2" PostId="16296" RevisionGUID="6b85a8a9-11ff-4bdb-8530-de6c3c86e197" CreationDate="2011-08-22T14:52:46.420" UserId="3166" Text="So after just thinking **logically**, I was able to deduce the proper transformation.&#xD;&#xA;I'll outline the steps here incase anyone wants the real breakdown:&#xD;&#xA;&#xD;&#xA;It is important to understand what is a *Camera Transformation or View Transformation*.&#xD;&#xA;A View Transformation is normally what is needed to go from Coordinates **relative** to your Camera to World-Space coordinates. The inverse of the View Transformation would then  make a world coordinate relative to your Camera!&#xD;&#xA;&#xD;&#xA;*Creating a View Matrix*&#xD;&#xA;&#xD;&#xA; 1. Apply the camera's rotation. We are doing it in the Z axis only because this is for a 2D camera.&#xD;&#xA; 2. Apply the transformation of the Camera. This make sense since we want the World coordinate which is the sum of the camera coordinate and the object relative to the camera.&#xD;&#xA;1. You might notice that I multiplied the Y Component by -1. This is so that increasing the Camera's Y Position correlates to moving up since the screen's Y value points downward.&#xD;&#xA; 3. Apply the camera's zoom&#xD;&#xA;&#xD;&#xA;Now the inverse of the matrix will do World Coordinate -&gt; View Cordinates.&#xD;&#xA;&#xD;&#xA;Once yo&#xD;&#xA;&#xD;&#xA;&lt;!-- language: lang-csharp --&gt;&#xD;&#xA;&#xD;&#xA;    Matrix proj = Matrix.CreateTranslation(new Vector3(_viewport.Width * 0.5f, _viewport.Height * 0.5f, 0));&#xD;&#xA;    &#xD;&#xA;            _viewMatrix = Matrix.CreateRotationZ(moveComponent.Rotation) *&#xD;&#xA;                        Matrix.CreateTranslation(moveComponent.Position.X, -1 * moveComponent.Position.Y, 0.0f) *&#xD;&#xA;                         Matrix.CreateScale(new Vector3(zoomComponent.Zoom, zoomComponent.Zoom, 1.0f));&#xD;&#xA;    &#xD;&#xA;            _viewMatrix = proj * Matrix.Invert(_viewMatrix);" />
  <row Id="37515" PostHistoryTypeId="2" PostId="16297" RevisionGUID="5b61ed57-d725-4582-8823-555daf3ce671" CreationDate="2011-08-22T15:15:11.670" UserId="5473" Text="These'll blow your mind nicely...&#xD;&#xA;&#xD;&#xA;http://www.effectgames.com/effect/article.psp.html/joe/Old_School_Color_Cycling_with_HTML5" />
  <row Id="37517" PostHistoryTypeId="25" PostId="16282" RevisionGUID="7a92be45-9842-4b5f-8f75-52a8c791f7eb" CreationDate="2011-08-22T15:37:42.273" Comment="http://twitter.com/#!/StackGameDev/status/105664952957804544" />
  <row Id="37518" PostHistoryTypeId="2" PostId="16298" RevisionGUID="bfe893f7-d5d0-4159-b841-8fdde7be343f" CreationDate="2011-08-22T16:09:03.027" UserId="3051" Text="Your question is a little vague.  Are you specifically asking if Edge uses 2D or 3D graphics?  Or looking for thoughts on whether your similar game should be in 2D or 3D?&#xD;&#xA;&#xD;&#xA;Edge certainly looks like it's using full 3D graphics, a fixed camera angle, and orthographic projection.  The fact that a number of game objects rotate leads me to believe that it's all 3D cubes that can be transformed in various ways.  Rather than going through the process of animating a sprite for the necessary cube rotations, 3D graphics would look smoother with less overhead, in my opinion.  However, one could very easily make a similar style of game in isometric 2D.&#xD;&#xA;&#xD;&#xA;If you're asking how you should do it, what does your past experience point to?  Do you have more 2D or 3D work experience and do you want to branch out into what you don't know as well?  What engine(s) are you considering?  I think, all things being equal, a simple 2D version of that style of game would be quicker to set up than a 3D one." />
  <row Id="37519" PostHistoryTypeId="2" PostId="16299" RevisionGUID="0b548bf7-1f73-4a0c-a37e-c630c600d4d5" CreationDate="2011-08-22T16:31:13.680" UserId="696" Text="[Kobold2D][1] is still in development but they're taking beta signups as of August 2011.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.kobold2d.org/" />
  <row Id="37520" PostHistoryTypeId="2" PostId="16300" RevisionGUID="616a54b9-4d41-499e-8d4b-ec5b64431f67" CreationDate="2011-08-22T17:23:33.760" UserId="4690" Text="Many implementations may lead to a random weighted chance for moves -- say, a chance to make an optimal move and a chance to make a suboptimal move. Determining how suboptimal a move is could be a very tricky problem, but will also lead your AI to making much more seemingly-intelligent decisions.&#xD;&#xA;&#xD;&#xA;Important note: No matter the difficulty setting, it would probably be a bad idea to have the AI pass up a chance to immediately win the game. If there is a possibility to make a move that would finish the game that turn, it should always be taken. If not, it will absolutely destroy the player's impression of how the AI is acting." />
  <row Id="37522" PostHistoryTypeId="25" PostId="16280" RevisionGUID="1b8e0cf5-fd71-4813-931a-e61f5ee08a8f" CreationDate="2011-08-22T18:37:43.037" Comment="http://twitter.com/#!/StackGameDev/status/105710253143896065" />
  <row Id="37523" PostHistoryTypeId="4" PostId="16280" RevisionGUID="f73a0988-5495-4be6-bfaf-34404f42a5fa" CreationDate="2011-08-22T19:39:47.990" UserId="14" Comment="edited title" Text="Is Edge by Mobigames 3D or isometric 2D?" />
  <row Id="37524" PostHistoryTypeId="5" PostId="13616" RevisionGUID="07107e79-82ed-4d8f-9d6c-f402a3683aa0" CreationDate="2011-08-22T19:40:41.060" UserId="14" Comment="Made title a question, removed salutation. " Text="i am learning 3d game development on android , i was wondering is it possible to add text areas or any thing that allows a user to enter a text in a 3d world ? and how ?" />
  <row Id="37525" PostHistoryTypeId="4" PostId="13616" RevisionGUID="07107e79-82ed-4d8f-9d6c-f402a3683aa0" CreationDate="2011-08-22T19:40:41.060" UserId="14" Comment="Made title a question, removed salutation. " Text="How do I add a text area to my 3D android world" />
  <row Id="37527" PostHistoryTypeId="5" PostId="16231" RevisionGUID="41e7787c-7e87-489f-90dc-502abf6ede06" CreationDate="2011-08-22T20:48:46.830" UserId="3505" Comment="added 4 characters in body" Text="Mouse buttons and keyboard keys can have a number of different events, what is available depends on your choice of language/library, most common:&#xD;&#xA;&#xD;&#xA;Key down, triggers when a button is pressed.  &#xD;&#xA;Key up, triggers when a button is released.  &#xD;&#xA;Retarded key down, triggers when a button is pressed, and then fires repeatedly at some system dependent interval until the key is released.&#xD;&#xA;&#xD;&#xA;On top of this there may also be a call to tell whether or not a key is currently held down.&#xD;&#xA;&#xD;&#xA;It is important that you are aware exactly what tool you are using, most commonly you will need the two first, if they are not available, build them from whatever is available.&#xD;&#xA;&#xD;&#xA;Standard method for registering that an on-screen button is pressed using the mouse is to assert that the same button was pointed at both at the down and the up event. For many game elements this may however be too slow, so for a lot of actions it may be prudent to make them happen at the down event." />
  <row Id="37528" PostHistoryTypeId="25" PostId="16281" RevisionGUID="3cfca1b3-f473-4003-805d-300a9ee4bc8e" CreationDate="2011-08-22T21:37:42.883" Comment="http://twitter.com/#!/StackGameDev/status/105755551731941376" />
  <row Id="37529" PostHistoryTypeId="2" PostId="16301" RevisionGUID="ea0fc617-0bb0-4655-aa83-39a4ffd1f0c8" CreationDate="2011-08-22T21:48:42.757" UserId="9415" Text="Many of the sprite sheets online have non-uniform sized rectangles as the animation frames and often use a portion of the image for credits, etc., this makes it hard for a game engine to correctly clip the sheets.  &#xD;&#xA;&#xD;&#xA;Is there any tool that can help you quickly define frames in a sheet, export animation data which the game engine would use?&#xD;&#xA; &#xD;&#xA;The closest I've got by googling is Sprite Vortex: http://spritevortex.codeplex.com/&#xD;&#xA;&#xD;&#xA;But it's very buggy with a lot of crashes and unsuccessful imports. Any alternative out there? Thanks! " />
  <row Id="37530" PostHistoryTypeId="1" PostId="16301" RevisionGUID="ea0fc617-0bb0-4655-aa83-39a4ffd1f0c8" CreationDate="2011-08-22T21:48:42.757" UserId="9415" Text="Is there a tool to help quickly define animation frames from non-uniform size sprite sheets?" />
  <row Id="37531" PostHistoryTypeId="3" PostId="16301" RevisionGUID="ea0fc617-0bb0-4655-aa83-39a4ffd1f0c8" CreationDate="2011-08-22T21:48:42.757" UserId="9415" Text="&lt;animation&gt;&lt;spritesheet&gt;" />
  <row Id="37532" PostHistoryTypeId="2" PostId="16302" RevisionGUID="8be01c2b-5bd6-437e-893c-b5d2f2b8e1cc" CreationDate="2011-08-22T22:15:46.950" UserId="721" Text="&#xD;&#xA;&#xD;&#xA;You can read my old tutorial with code and the phil hassey blogs about porting its game from IOS to Android.&#xD;&#xA;&#xD;&#xA; - use a dialog box and give the string to your code&#xD;&#xA;[enter link description here][1]&#xD;&#xA; - [Phil hassey blog][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.ellismarkov.com/page/2&#xD;&#xA;  [2]: http://www.philhassey.com/blog/2010/08/05/android-day-7-bug-fixin/" />
  <row Id="37533" PostHistoryTypeId="5" PostId="16302" RevisionGUID="fd30b9e2-1408-49fb-a7e7-a1742bd5c1a3" CreationDate="2011-08-22T22:23:58.817" UserId="721" Comment="added 565 characters in body" Text="On android, there are many ways to read strings input:&#xD;&#xA;&#xD;&#xA; - As gameloft, develop your own widget and code your own Virtual Keyboard; that is probably the better to way for an immersive experience&#xD;&#xA; - Or use the Android Libraries to do it. &#xD;&#xA;&#xD;&#xA;About the second solution:&#xD;&#xA;&#xD;&#xA; - in your Layout, there is probably a GLSurfaceView but you can add others views. So you can use a EditText to read input. Just show or hide it when you need it.&#xD;&#xA; - otherwise you don't want use Android View because that's too different with your GUI. Use the Virtual Keyboard when needed. &#xD;&#xA;&#xD;&#xA;You can read my old tutorial with code and the phil hassey blogs about porting its game from IOS to Android.&#xD;&#xA;&#xD;&#xA; - use a dialog box and give the string to your code&#xD;&#xA;[enter link description here][1]&#xD;&#xA; - [Phil hassey blog][2]&#xD;&#xA;&#xD;&#xA;we're talking about JNI (Java bridge with C) because our engines are C/C++ code... &#xD;&#xA;&#xD;&#xA;  [1]: http://www.ellismarkov.com/page/2&#xD;&#xA;  [2]: http://www.philhassey.com/blog/2010/08/05/android-day-7-bug-fixin/" />
  <row Id="37534" PostHistoryTypeId="2" PostId="16303" RevisionGUID="09004697-9fe4-4a1c-9849-d4556baed0c9" CreationDate="2011-08-22T22:24:46.550" UserId="9182" Text="You could use the source code for [DuctTape][1] as a reference. Be aware it's GPL licensed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://ducttape.sourceforge.net/" />
  <row Id="37535" PostHistoryTypeId="5" PostId="16302" RevisionGUID="bcde791d-2a7b-4e37-9a43-9c54f320ee9b" CreationDate="2011-08-22T22:29:24.163" UserId="721" Comment="added 565 characters in body" Text="On android, there are many ways to read strings input:&#xD;&#xA;&#xD;&#xA; - As gameloft, develop your own widget and code your own Virtual Keyboard; that is probably the better to way for an immersive experience&#xD;&#xA; - Or use the Android Libraries to do it. &#xD;&#xA;&#xD;&#xA;About the second solution:&#xD;&#xA;&#xD;&#xA; - in your Layout, there is probably a GLSurfaceView but you can add others views. So you can use an EditText to read input. Just show or hide it when you need it.&#xD;&#xA; - otherwise you don't want use Android View because you have your own GUI. Use only the Virtual Keyboard when needed. &#xD;&#xA;&#xD;&#xA;You can read my old tutorial with code and the phil hassey blogs about porting its game from IOS to Android.&#xD;&#xA;&#xD;&#xA; - use a dialog box and give the string to your code&#xD;&#xA;[enter link description here][1]&#xD;&#xA; - [Phil hassey blog][2]&#xD;&#xA;&#xD;&#xA;we're talking about JNI (Java bridge with C) because our engines are C/C++ code... &#xD;&#xA;&#xD;&#xA;  [1]: http://www.ellismarkov.com/page/2&#xD;&#xA;  [2]: http://www.philhassey.com/blog/2010/08/05/android-day-7-bug-fixin/" />
  <row Id="37536" PostHistoryTypeId="2" PostId="16304" RevisionGUID="5a52db49-79ba-4a4d-97fa-3636fe25a7af" CreationDate="2011-08-22T22:42:58.813" UserId="9417" Text="I decided recently write a 3D game in my spare time, as I was tired of my daily  &quot;corporate programming&quot;. If I expect to be done in 6 months/1 year, which version of OpenGL should I use as baseline? In other words, which version of OpenGL should I require my potential users to have?&#xD;&#xA;&#xD;&#xA;I did some OpenGL has a student, but that was in the days of the *first edition* of the red book. Things have changed a lot since then." />
  <row Id="37537" PostHistoryTypeId="1" PostId="16304" RevisionGUID="5a52db49-79ba-4a4d-97fa-3636fe25a7af" CreationDate="2011-08-22T22:42:58.813" UserId="9417" Text="What is a reasonable OpenGL version baseline for a mid-range 3D game?" />
  <row Id="37538" PostHistoryTypeId="3" PostId="16304" RevisionGUID="5a52db49-79ba-4a4d-97fa-3636fe25a7af" CreationDate="2011-08-22T22:42:58.813" UserId="9417" Text="&lt;opengl&gt;" />
  <row Id="37539" PostHistoryTypeId="2" PostId="16305" RevisionGUID="140e3e07-5f11-487f-b83b-31aa37acd167" CreationDate="2011-08-22T23:24:10.853" UserId="7831" Text="First you can always assume GL2, I think, as you won't find much pre-2.0 hardware around. Next, it is mostly a question of the major version, as these are mainly dependent on the hardware, whereas minor versions often are more of a driver question. For example a hardware supporting GL 3.1 is likely to support GL 3.2 (and 3.3), too.&#xD;&#xA;&#xD;&#xA;Next, it depends on the features you need. For example these are IMHO the major features of the newer versions (forgive me for forgetting your favourite feature):&#xD;&#xA;&#xD;&#xA;OpenGL 3:&#xD;&#xA;&#xD;&#xA; - geometry shaders&#xD;&#xA; - texture buffers&#xD;&#xA; - instanced rendering&#xD;&#xA; - integer textures and attributes&#xD;&#xA; - integer operations in shaders&#xD;&#xA; - transform feedback&#xD;&#xA; - FBOs&#xD;&#xA; - floating point textures&#xD;&#xA;&#xD;&#xA;The first six of these are real hardware features of GL3/DX10 hardware, whereas the last two (important ones, I think) are core since 3.0, but are supported on most newer GL2 hardware by extensions (since GeForce 6, I think)&#xD;&#xA;&#xD;&#xA;OpenGL 4:&#xD;&#xA;&#xD;&#xA; - tessellation shaders&#xD;&#xA; - double precision attributes and shader operations (and textures?)&#xD;&#xA; - improvements of shader managment&#xD;&#xA; - image load/store operations&#xD;&#xA;&#xD;&#xA;In my opinion GL3 brings some really nice features, but there is nothing that prevents you from writing modern and future ready GL applications (without fixed-function) with only OpenGL 2.0/2.1, that may later be easily improved by new features of newer hardware. But maybe nowadays GL3 might also be a valid requirement, although I still sit on 2.1 hardware. But honestly, it just depends on the hardware features you need and GL 2.0/2.1 might suffice for a solid &quot;baseline&quot;. But as you say you last time used the old and deprecated way of OpenGL you might first need to make yourself acquainted with the new and modern shader-only approach, as this is the way to do hardware accelerated real-time graphics today (and tomorrow).&#xD;&#xA;&#xD;&#xA;Finally, if you're more familiar with DirectX (and as that seems the one people classify hardware by, nowadays), the relations GL2 ~ DX9, GL3 ~ DX10 and GL4 ~ DX11 may also guide you." />
  <row Id="37540" PostHistoryTypeId="2" PostId="16306" RevisionGUID="a9b8a634-2790-47c3-8643-ac9125e57d28" CreationDate="2011-08-23T00:05:57.877" UserId="9057" Text="I'm about to program a copy of Mario in Java. I'm thinking on 2 representations/data structures for the levels but I'm not sure which one should I choose:&#xD;&#xA;&#xD;&#xA; + A 2D integer array.&#xD;&#xA; + A quadtree to divide the level in pieces.&#xD;&#xA;&#xD;&#xA;What are its advantages and disadvantages?" />
  <row Id="37541" PostHistoryTypeId="1" PostId="16306" RevisionGUID="a9b8a634-2790-47c3-8643-ac9125e57d28" CreationDate="2011-08-23T00:05:57.877" UserId="9057" Text="Appropriate level representation / data stucture for a 2D platfrom game?" />
  <row Id="37542" PostHistoryTypeId="3" PostId="16306" RevisionGUID="a9b8a634-2790-47c3-8643-ac9125e57d28" CreationDate="2011-08-23T00:05:57.877" UserId="9057" Text="&lt;2d&gt;&lt;game-design&gt;&lt;java&gt;&lt;data-structure&gt;&lt;platform-games&gt;" />
  <row Id="37543" PostHistoryTypeId="2" PostId="16307" RevisionGUID="f08d2e18-cbc0-4925-89af-29dfa10c5f64" CreationDate="2011-08-23T00:31:58.107" UserId="6588" Text="I can't off the top of my head think of any advantages to quadtrees for a 2D game. The point of a quadtree is to efficiently cull large chunks of the data so that you only spend time on the data in the immediate vicinity, and a 2D array already gives you location-specific random access. In a 3D game you can't use an array to locate everything and that's where quadtrees (or better yet octrees) are handy.&#xD;&#xA;&#xD;&#xA;Now, I'm talking here about the underlying data representation for the level. Depending on how your graphic architecture is setup, you may want to use quadtrees in order to efficiently cull graphical content." />
  <row Id="37544" PostHistoryTypeId="5" PostId="16307" RevisionGUID="8e246783-91ee-4bc3-bdf8-b8b863839b17" CreationDate="2011-08-23T00:37:08.050" UserId="6588" Comment="added 30 characters in body" Text="I can't off the top of my head think of any advantages to quadtrees for a 2D game. The point of a quadtree is to efficiently cull large chunks of the data so that you only spend time on the data in the immediate vicinity, and a 2D array already gives you location-specific random access. In a 3D game you can't use an array to locate everything and that's where quadtrees (or better yet octrees) are handy.&#xD;&#xA;&#xD;&#xA;Now, I'm talking here about the underlying data representation for the level. Depending on how your graphic architecture is setup (eg. doing 2D graphics with planes in a 3D engine) you may want to use quadtrees in the scene graph in order to efficiently cull graphical content." />
  <row Id="37545" PostHistoryTypeId="25" PostId="16301" RevisionGUID="cf499efc-c753-439b-9b37-d14b70db017e" CreationDate="2011-08-23T00:37:42.417" Comment="http://twitter.com/#!/StackGameDev/status/105800848982028288" />
  <row Id="37546" PostHistoryTypeId="5" PostId="16307" RevisionGUID="a677c116-b762-456f-908a-aa2eb5f55fc1" CreationDate="2011-08-23T00:43:30.270" UserId="6588" Comment="added 30 characters in body" Text="The point of a quadtree is to efficiently cull large chunks of the data so that you only spend time on the data in the immediate vicinity. However a 2D array already gives you location-specific random access, so for a 2D game that may make a quadtree redundant. In a 3D game you can't use an array to locate everything and that's where quadtrees (or better yet octrees) are handy.&#xD;&#xA;&#xD;&#xA;Now, I'm talking here about the underlying data representation for the level. Depending on how your graphic architecture is setup (eg. doing 2D graphics with planes in a 3D engine) you may want to use quadtrees in the scene graph in order to efficiently cull graphical content.&#xD;&#xA;&#xD;&#xA;And then don't forget various enemies and other interactive objects in your level. Perhaps you use a 2D array to manage the tiles of the level, but use quadtrees to organize all the interactive elements (eg. for a physics engine)." />
  <row Id="37547" PostHistoryTypeId="5" PostId="16307" RevisionGUID="db80a657-8b49-47da-b82e-af403e0b13f3" CreationDate="2011-08-23T00:51:32.643" UserId="6588" Comment="added 30 characters in body" Text="The point of a quadtree is to efficiently cull large chunks of the data so that you only spend time on the data in the immediate vicinity. However a 2D array already gives you location-specific random access, so for a 2D game that may make a quadtree redundant. In a 3D game you can't use an array to locate everything and that's where quadtrees (or better yet octrees) are handy.&#xD;&#xA;&#xD;&#xA;Now, I'm talking here about the underlying data representation for the level. Depending on how your graphic architecture is setup (eg. doing 2D graphics with planes in a 3D engine) you may want to use quadtrees in the scene graph in order to efficiently cull graphical content.&#xD;&#xA;&#xD;&#xA;And then don't forget various enemies and other interactive objects in your level. Perhaps you use a 2D array to manage the tiles of the level, but use quadtrees to organize all the interactive elements (eg. for a physics engine).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Think of it this way: pick a point at random in your level, and then think about how much work it'll take to figure out everything within a 1000 pixel radius of that point. If you can do that quickly because everything is organized by location in a 2D array, then you don't need a quadtree. If however you would have to loop through everything and check each object's distance individually, then you could make the search much more efficient by using a quadtree." />
  <row Id="37548" PostHistoryTypeId="2" PostId="16308" RevisionGUID="8fbe9d7b-36ca-43b4-800e-7ee35d1cdec6" CreationDate="2011-08-23T03:15:48.547" UserId="8240" Text="&gt; If I expect to be done in 6 months/1 year, which version of OpenGL should I use as baseline?&#xD;&#xA;&#xD;&#xA;None. If you expect to be done in 6 months to a year, unless your game has negligible graphics (SpaceChem, Tetris, etc) directly using OpenGL is going to slow you down. If you want to make a game quickly, then you should be using something higher level than OpenGL. Ogre3D, Irrilicht, etc, there are any number of engines that don't require direct usage of OpenGL.&#xD;&#xA;&#xD;&#xA;Taking the time factor out of it, you can think of the populations for each version like this:&#xD;&#xA;&#xD;&#xA;2.1: People who have bought a graphics card in the last 8 years. This also covers more recent Intel hardware (though don't expect these to work well without fiddling with it).&#xD;&#xA;&#xD;&#xA;3.3: People who have bought a graphics card in the last 5 years. Or an integrated graphics chipset (from AMD) in the last 5 years.&#xD;&#xA;&#xD;&#xA;4.2: People who have bought a graphics card in the last 2 years. This also covers more recent AMD integrated chipsets, as well as on-die CPUs that AMD is starting to make." />
  <row Id="37549" PostHistoryTypeId="2" PostId="16309" RevisionGUID="151093bf-7427-48e0-bd1a-c96aac937ec5" CreationDate="2011-08-23T03:26:41.590" UserId="9334" Text="&#xD;&#xA;Can easily get better manage stack overflow -although this is your game, it's really programming. During this time... ... Can you just put your executable file of the same folder in the &lt;a href=&quot;http://www.dllcure.com/&quot;&gt;DLL&lt;/a&gt;?&#xD;&#xA;" />
  <row Id="37550" PostHistoryTypeId="25" PostId="16304" RevisionGUID="4780f52e-b5b3-4651-9c20-ca1b679b4b65" CreationDate="2011-08-23T03:37:43.443" Comment="http://twitter.com/#!/StackGameDev/status/105846150216695808" />
  <row Id="37553" PostHistoryTypeId="25" PostId="16306" RevisionGUID="341c510d-3534-4e3d-8ace-e77ec4048827" CreationDate="2011-08-23T06:37:44.130" Comment="http://twitter.com/#!/StackGameDev/status/105891452378288128" />
  <row Id="37554" PostHistoryTypeId="2" PostId="16310" RevisionGUID="ea2de860-283e-4267-9a5d-754ccf7a7eae" CreationDate="2011-08-23T06:46:53.173" UserId="20" Text="Usually such sprite sheets come with an additional file with coordinates for the packed frames (some might even be rotated). Extracting frames without these coordinates can really be a cumbersome task. Automating it would also be very hard to do, since a single sprite doesn't necessarily have a contiguous shape.&#xD;&#xA;&#xD;&#xA;If the coordinates file is missing, I'd probably use the [Photoshop Slice tool][1] to mark individual frames and then you can export all slices at once by using &quot;Save for Web &amp; Devices&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://help.adobe.com/en_US/Photoshop/11.0/WSE311D2B1-CA39-4bab-8BEE-25CF899D1486a.html#WSfd1234e1c4b69f30ea53e41001031ab64-756ba" />
  <row Id="37555" PostHistoryTypeId="2" PostId="16311" RevisionGUID="b4827cfb-b539-48aa-a5b0-bc164ae5ec82" CreationDate="2011-08-23T07:28:29.540" UserId="9423" Text="Presently working on a 3D car racing game on ios platform. I had to implement replay system and then record that replay in a video file then upload it to youtube. &#xD;&#xA;&#xD;&#xA;I only had an issue with the recording part rest is done . What m doing is using glReadPixels() command of opengl es 1.1 to capture framebuffer content and creating video from these frames during runtime using AVFoundation framework. The problem m facing is that  i had to call glReadPixels() in each drawing which is very slow . It decreases the FPS from around 30 to 2-3 only...&#xD;&#xA;Is there any alternative to glReadPixels() command ? &#xD;&#xA;or anyone created replay system and recorded accordingly ? &#xD;&#xA;Please guide me in right direction ...&#xD;&#xA;Thanks " />
  <row Id="37556" PostHistoryTypeId="1" PostId="16311" RevisionGUID="b4827cfb-b539-48aa-a5b0-bc164ae5ec82" CreationDate="2011-08-23T07:28:29.540" UserId="9423" Text="Recording the gameplay in the game itself?" />
  <row Id="37557" PostHistoryTypeId="3" PostId="16311" RevisionGUID="b4827cfb-b539-48aa-a5b0-bc164ae5ec82" CreationDate="2011-08-23T07:28:29.540" UserId="9423" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;ipad&gt;&lt;video&gt;" />
  <row Id="37558" PostHistoryTypeId="2" PostId="16312" RevisionGUID="d4f454ad-6048-4e7b-8d85-45a5805906c1" CreationDate="2011-08-23T07:35:46.387" UserId="9424" Text="I'm developing a game in Flash and i need a litle help. It can be considered a math problem.&#xD;&#xA;My object is flying with speed X and my object can collide with stones. When it collides with a stone I need my object to break the stone and continue, but with less velocity.&#xD;&#xA;It's easy to hard code it and write something like: &quot;myVelocity -= 10;&quot; , but my main problem is that I want it to lose less velocity the higher the velocity is.&#xD;&#xA;&#xD;&#xA;F.e. if the velocity is 300 i want it to lose 10 and if it was 200 i want it to lose 20...&#xD;&#xA;&#xD;&#xA;Can this be done with some kind of formula? " />
  <row Id="37559" PostHistoryTypeId="1" PostId="16312" RevisionGUID="d4f454ad-6048-4e7b-8d85-45a5805906c1" CreationDate="2011-08-23T07:35:46.387" UserId="9424" Text="How to get object to lose less velocity the higher speed it got" />
  <row Id="37560" PostHistoryTypeId="3" PostId="16312" RevisionGUID="d4f454ad-6048-4e7b-8d85-45a5805906c1" CreationDate="2011-08-23T07:35:46.387" UserId="9424" Text="&lt;collision-detection&gt;&lt;physics&gt;&lt;math&gt;&lt;algorithm&gt;&lt;2d-physics&gt;" />
  <row Id="37561" PostHistoryTypeId="2" PostId="16313" RevisionGUID="075dd2e6-db57-4db6-8cf0-ff32c4046a5e" CreationDate="2011-08-23T08:18:06.003" UserId="4947" Text="I think, you can use just simple division by velocity. For example: lost = 3 000 / myVelocity. When velocity is 300, you will lose 10, when it's 200, you will lose 15. It's up to you to choose correct constants. &#xD;&#xA;&#xD;&#xA;If you want, you can use more complex formula, like: constant / (constant2 * velocity^2 + constant3 * velocity). Again - just choose constants, which will suit you. " />
  <row Id="37562" PostHistoryTypeId="2" PostId="16314" RevisionGUID="2bddc8de-f651-4aff-8d30-b02b14a35e58" CreationDate="2011-08-23T08:19:17.530" UserId="2555" Text="I would invert the speed and multiply by something you like:&#xD;&#xA;&#xD;&#xA;    float velocity = 300.0f;&#xD;&#xA;    float collisionEffect = 3000.0f / velocity;&#xD;&#xA;    if (collisionEffect &gt; velocity)&#xD;&#xA;    {&#xD;&#xA;        // Choose which one you like: with or without restitution&#xD;&#xA;&#xD;&#xA;        // No restitution&#xD;&#xA;        collisionEffect = velocity;&#xD;&#xA;&#xD;&#xA;        // Restitution&#xD;&#xA;        collisionEffect = velocity + (collisionEffect - velocity) * 0.3f;&#xD;&#xA;    }&#xD;&#xA;    velocity -= collisionEffect;&#xD;&#xA;&#xD;&#xA;This example gives these effects:&#xD;&#xA;&#xD;&#xA;    400 loses 7.5&#xD;&#xA;    300 loses 10&#xD;&#xA;    200 loses 15&#xD;&#xA;    100 loses 30&#xD;&#xA;     50 loses 50  // Using no restitution&#xD;&#xA;     50 loses 53  // Using restitution&#xD;&#xA;     20 loses 20  // Using no restitution&#xD;&#xA;     20 loses 59  // Using restitution&#xD;&#xA;" />
  <row Id="37563" PostHistoryTypeId="2" PostId="16315" RevisionGUID="639d9013-c39e-42d1-8474-ef8db924cc47" CreationDate="2011-08-23T08:24:52.333" UserId="7328" Text="What you are looking for will not generate real looking physics. the main formula is 0.5*m*v^2 (kinematic energy) is decreased by a **constant** value whenever object hits somewhere. &#xD;&#xA;&#xD;&#xA;" />
  <row Id="37564" PostHistoryTypeId="2" PostId="16316" RevisionGUID="dbcd3310-f6b9-42b4-a324-0f62228ce338" CreationDate="2011-08-23T08:28:09.443" UserId="5473" Text="You've not really given enough information to tell what sort of range you want, i.e. whether it is capped, whether you want geometric progression, etc.&#xD;&#xA;&#xD;&#xA;First thing you want to do is derive a number proportional to the amount of speed you want to lose (it doesn't have to be the same, but it should decrease as the speed increases to make it proportional to your loss). The standard way to do that is to take the *reciprocal*:&#xD;&#xA;&#xD;&#xA;    temp = 1 / currentVelocity;&#xD;&#xA;&#xD;&#xA;Now, for 100 you will have 0.01, for 200 you'll have 0.005, for 300 you'll have 0.0033 and so on.&#xD;&#xA;&#xD;&#xA;Now you just need to adjust that number to whatever you really want, by multiplying it. So&#xD;&#xA;&#xD;&#xA;    k = 3000;&#xD;&#xA;    newVelocity = temp * k;&#xD;&#xA;&#xD;&#xA;will give you your 20 for 300, but it will give you 15 for 200 rather than 10. This may be fine for you, in that case you don't need to read further. You can adjust k as you like but you may not get numbers the way you like them unless you do a little more, such as implement geometric progression, or change the base for increase. I'm not going to go into geometric progressions here, but if you want to change the base, you do it as follows:&#xD;&#xA;&#xD;&#xA;    base = 100;&#xD;&#xA;    temp = 1 / (currentVelocity - base);&#xD;&#xA;    if (temp &lt; 0) temp = 0; //adjust temp so never less than zero, cannot gain force!&#xD;&#xA;    &#xD;&#xA;    k = 2000;&#xD;&#xA;    velocityLoss= temp * k;&#xD;&#xA;    if (velocityLoss &gt; currentVelocity) //(1) or make currentVelocity an unsigned int&#xD;&#xA;        velocityLoss = currentVelocity; //(2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This will provide you with the range you originally asked for in your question, 300 -&gt; loss of 10, 200 -&gt; loss of 20. FYI 100 -&gt;loss of 40, and 50 -&gt; loss of 80(!) which means you'd need to restrict your subtraction -- which is what I've done in lines (1) and (2).&#xD;&#xA;&#xD;&#xA;There are other ways of approaching this whole problem, of course, which I'm sure those more mathematically adept that I am will post here." />
  <row Id="37565" PostHistoryTypeId="5" PostId="16315" RevisionGUID="450e6d94-d9f1-44cb-88ad-95614434fe97" CreationDate="2011-08-23T08:40:17.770" UserId="7328" Comment="added 329 characters in body" Text="those system you and others describe will not will not generate real looking physics. the main formula is to decrease 0.5*m*v^2 (kinematic energy) by a **constant** value whenever object hits somewhere. &#xD;&#xA;&#xD;&#xA;so if an object with weight 2Kg hits some block, which needs 16j energy before it breaks:&#xD;&#xA;object movement speed will change according to this table :&#xD;&#xA;&#xD;&#xA;	4  m/s -&gt; the block will not break&#xD;&#xA;	5  m/s -&gt; 3   m/s&#xD;&#xA;	6  m/s -&gt; 4.4 m/s&#xD;&#xA;	7  m/s -&gt; 5.7 m/s&#xD;&#xA;	8  m/s -&gt; 6.9 m/s&#xD;&#xA;	9  m/s -&gt; 8   m/s&#xD;&#xA;	10 m/s -&gt; 9.1 m/s" />
  <row Id="37566" PostHistoryTypeId="2" PostId="16317" RevisionGUID="f3ca4066-fb16-4446-a77a-f4be337ab62c" CreationDate="2011-08-23T08:48:57.670" UserId="9426" Text="I want to to develop a game like Populous: The Beginning with my friend. But we could not find out what type of geometry they have used for the world.&#xD;&#xA;&#xD;&#xA;We know that&#xD;&#xA;- all tiles have the same size&#xD;&#xA;- all tiles are squares&#xD;&#xA;&#xD;&#xA;So.. It cannot be a Icosahedron, because there are triangles, nor cant it be a standard sphere geometry, because not all tiles have the same size.&#xD;&#xA;&#xD;&#xA;Can someone help me?" />
  <row Id="37567" PostHistoryTypeId="1" PostId="16317" RevisionGUID="f3ca4066-fb16-4446-a77a-f4be337ab62c" CreationDate="2011-08-23T08:48:57.670" UserId="9426" Text="Geometry System of Populous: The Beginning" />
  <row Id="37568" PostHistoryTypeId="3" PostId="16317" RevisionGUID="f3ca4066-fb16-4446-a77a-f4be337ab62c" CreationDate="2011-08-23T08:48:57.670" UserId="9426" Text="&lt;3d&gt;&lt;geometry&gt;" />
  <row Id="37569" PostHistoryTypeId="5" PostId="16316" RevisionGUID="13a8e554-7031-4bbd-a9e1-b8679ec6f484" CreationDate="2011-08-23T08:59:06.880" UserId="5473" Comment="deleted 2 characters in body" Text="You've not really given enough information to tell what sort of range you want, i.e. whether it is capped, whether you want geometric progression, etc.&#xD;&#xA;&#xD;&#xA;First thing you want to do is derive a number proportional to the amount of speed you want to lose (it doesn't have to be the same, but it should decrease as the speed increases to make it proportional to your loss). The standard way to do that is to take the *reciprocal*:&#xD;&#xA;&#xD;&#xA;    temp = 1 / currentVelocity;&#xD;&#xA;&#xD;&#xA;Now, for 100 you will have 0.01, for 200 you'll have 0.005, for 300 you'll have 0.0033 and so on.&#xD;&#xA;&#xD;&#xA;Now you just need to adjust that number to whatever you really want, by multiplying it. So&#xD;&#xA;&#xD;&#xA;    k = 3000;&#xD;&#xA;    newVelocity = temp * k;&#xD;&#xA;&#xD;&#xA;will give you your 20 for 300, but it will give you 15 for 200 rather than 10. This may be fine for you, in that case you don't need to read further. You can adjust k as you like but you may not get numbers the way you like them unless you do a little more, such as implement geometric progression, or change the base for increase. I'm not going to go into geometric progressions here, but if you want to change the base, you do it as follows:&#xD;&#xA;&#xD;&#xA;    base = 100;&#xD;&#xA;    temp = 1 / (currentVelocity - base);&#xD;&#xA;    if (temp &lt; 0) temp = 0; //adjust temp so never less than zero, cannot gain force!&#xD;&#xA;    &#xD;&#xA;    k = 2000;&#xD;&#xA;    velocityLoss= temp * k;&#xD;&#xA;    if (velocityLoss &gt; currentVelocity) //(1) or make currentVelocity an unsigned int&#xD;&#xA;        velocityLoss = currentVelocity; //(2)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This will provide you with the range you originally asked for in your question, 300 -&gt; loss of 10, 200 -&gt; loss of 20. FYI 100 -&gt;loss of 40, and 50 -&gt; loss of 80(!) which means you'd need to restrict your subtraction -- which is what I've done in lines (1) and (2).&#xD;&#xA;&#xD;&#xA;There are other ways of approaching this whole problem, of course, which I'm sure those more mathematically adept than I, will post here." />
  <row Id="37570" PostHistoryTypeId="2" PostId="16318" RevisionGUID="afb980b0-1efe-49df-9e2d-163568d219e5" CreationDate="2011-08-23T09:04:30.773" UserId="5473" Text="Triangles you are seeing are likely just a product of the rendering system -- everything, in the end, *has* to be broken down into triangles for rendering.&#xD;&#xA;&#xD;&#xA;I suggest you do this: search google (images) for &quot;sphere tesselation&quot;. You will get an idea of the many, many ways of doing this. Your game does not need to be tesselated in exactly the same way as Populous: The Beginning (which, by the way, is a great game which I love). Meaning you don't even need to use square tiles, if you don't want to; you could use any hexagons, triangles, pentagons, arbitrary quadrilaterals like kites, or even voronoi tesselation (irregular, non-repeated polygons).&#xD;&#xA;&#xD;&#xA;What's important in any tessellation used for game logic is *connectivity*, i.e. the fact that your &quot;grid&quot; forms a (somewhat) connected graph for movement purposes.&#xD;&#xA;" />
  <row Id="37571" PostHistoryTypeId="5" PostId="16311" RevisionGUID="1aab160a-c9d2-4644-be7c-9f58a8fd5d64" CreationDate="2011-08-23T09:28:34.767" UserId="20" Comment="spelling, formatting, added iOS tag" Text="I'm presently working on a 3D car racing game for the iOS platform. I had to implement a replay system and then record that replay in a video file to upload it to YouTube. &#xD;&#xA;&#xD;&#xA;I'm only having issues with the recording part, the rest is done. What I'm doing is using the `glReadPixels()` command of OpenGL ES 1.1 to capture the framebuffer content and creating a video from these frames during runtime (using AVFoundation framework). &#xD;&#xA;&#xD;&#xA;The problem I'm facing is that I have to call `glReadPixels()` in each update which is very slow . It decreases the FPS from around 30 to only 2-3...&#xD;&#xA;Is there any alternative to the `glReadPixels()` command? &#xD;&#xA;Or did anyone create a replay system and recorded to video?" />
  <row Id="37572" PostHistoryTypeId="6" PostId="16311" RevisionGUID="1aab160a-c9d2-4644-be7c-9f58a8fd5d64" CreationDate="2011-08-23T09:28:34.767" UserId="20" Comment="spelling, formatting, added iOS tag" Text="&lt;iphone&gt;&lt;opengl-es&gt;&lt;ios&gt;&lt;ipad&gt;&lt;video&gt;" />
  <row Id="37573" PostHistoryTypeId="2" PostId="16319" RevisionGUID="cd3b0018-62aa-4717-adc2-c15fb7fd4b31" CreationDate="2011-08-23T09:33:04.480" UserId="20" Text="Since you have the replay system in place, I'd suggest you only store the replay-data during gameplay and then render a video from that replay offline. Eg. after the game has finished and the user chooses to post the replay as video, then you would render the video from the replay-data (by playing the replay and using `glReadPixels`)." />
  <row Id="37578" PostHistoryTypeId="25" PostId="16311" RevisionGUID="101d4307-7a5f-4aa9-8736-00445717688a" CreationDate="2011-08-23T09:37:44.057" Comment="http://twitter.com/#!/StackGameDev/status/105936751155093504" />
  <row Id="37579" PostHistoryTypeId="5" PostId="16318" RevisionGUID="3c17fc18-14cc-4284-a9cf-b990705dacb8" CreationDate="2011-08-23T09:43:53.283" UserId="5473" Comment="added 344 characters in body" Text="Triangles you are seeing are likely just a product of the rendering system -- everything, in the end, *has* to be broken down into triangles for rendering.&#xD;&#xA;&#xD;&#xA;I suggest you do this: search google (images) for &quot;sphere tesselation&quot;. You will get an idea of the many, many ways of doing this. Your game does not need to be tesselated in exactly the same way as Populous: The Beginning (which, by the way, is a great game which I love). Meaning you don't even need to use square tiles, if you don't want to; you could use any hexagons, triangles, pentagons, arbitrary quadrilaterals like kites, or even voronoi tesselation (irregular, non-repeated polygons).&#xD;&#xA;&#xD;&#xA;What's important in any tessellation used for game logic is *connectivity*, i.e. the fact that your &quot;grid&quot; forms a (somewhat) connected graph for movement purposes.&#xD;&#xA;&#xD;&#xA;EDIT:  Probably what they've done is something a little like StarControl's melee -- they actually have a wrapping 2D grid (modulo in x and y). Then, when you view the sphere, you can only see one hemisphere at once, which makes it possible to map the tiles without too much noticeable distortion. And at a closer zoom, all would look perfect." />
  <row Id="37580" PostHistoryTypeId="2" PostId="16321" RevisionGUID="5496a104-22a4-407a-aeb9-92eae7d009b1" CreationDate="2011-08-23T09:58:41.790" UserId="5473" Text="[Game Engine for Google Web Toolkit][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/gwt-game/" />
  <row Id="37581" PostHistoryTypeId="2" PostId="16322" RevisionGUID="2c2c54dc-5f14-469a-a937-e18dbd8d3aff" CreationDate="2011-08-23T10:04:18.220" UserId="6106" Text="I tend to build games with strong stories, which usually involves quite an indepth world environment. Typically I develope typical 2.5 over head view JRPG style (think Zelda, Final Fantasy 3, etc) because I have it stuck in my head that you can only achieve world depth using this style. &#xD;&#xA;&#xD;&#xA;This question is limited to the 2D environment. Can this be achieved in a 2D side scroller? Can a user experience the world when only seeing it from the side? Can he/she explore villages in this manner? Any examples would be great.&#xD;&#xA;&#xD;&#xA;The closest thing that comes to my mind at the moment is Castle Crashers. " />
  <row Id="37582" PostHistoryTypeId="1" PostId="16322" RevisionGUID="2c2c54dc-5f14-469a-a937-e18dbd8d3aff" CreationDate="2011-08-23T10:04:18.220" UserId="6106" Text="Can world depth be achieved in a side scroller?" />
  <row Id="37583" PostHistoryTypeId="3" PostId="16322" RevisionGUID="2c2c54dc-5f14-469a-a937-e18dbd8d3aff" CreationDate="2011-08-23T10:04:18.220" UserId="6106" Text="&lt;game-design&gt;&lt;level-design&gt;&lt;side-scroller&gt;" />
  <row Id="37584" PostHistoryTypeId="2" PostId="16323" RevisionGUID="2b8eb7e1-5aa9-4379-901a-3fa8faa003ff" CreationDate="2011-08-23T10:10:49.790" UserId="5473" Text="Yes. There were a few games, many years ago, that used a 2D side view world, that were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;Obviously the key thing is to allow your characters to move &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and Shadows of Mystara by giving the characters some vertical movement spaces -- this makes combat more interesting.&#xD;&#xA;" />
  <row Id="37585" PostHistoryTypeId="5" PostId="16323" RevisionGUID="6aa9cd10-46e0-4947-8f9e-d3b95c7180c8" CreationDate="2011-08-23T10:16:37.737" UserId="5473" Comment="added 232 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;Obviously the key thing is to allow your characters to move &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement spaces -- this makes combat more interesting.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;" />
  <row Id="37586" PostHistoryTypeId="5" PostId="16323" RevisionGUID="620ac620-5aa2-47b4-a778-8237c3239b18" CreationDate="2011-08-23T10:24:52.030" UserId="5473" Comment="added 40 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;A number of these were highly rated in their day (around 1990), I recall most of these were rated 80-90% by ST and Amiga Format magazines at the time. Stronghold was also around 70-80%. So clearly the games *were* immersive. Mobygames has more info.&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;Obviously the key thing is to allow your characters to move &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;" />
  <row Id="37587" PostHistoryTypeId="5" PostId="16323" RevisionGUID="63c53fee-832f-46c9-8421-f1089a4bd59d" CreationDate="2011-08-23T10:31:36.060" UserId="5473" Comment="added 296 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;A number of these were highly rated in their day (around 1990), I recall most of these were rated 80-90% by ST and Amiga Format magazines at the time. Stronghold was also around 70-80%. So clearly the games *were* immersive. Mobygames has more info.&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;Obviously the key thing is to allow your characters to move &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting.&#xD;&#xA;&#xD;&#xA;Sapiens was a particularly innovative approach to a game. One aspect was that you could [see your x, y position on a map][1], although each location was a side-scroller view. Stronghold does much the same.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/atari-st/sapiens/screenshots/gameShotId,96117/" />
  <row Id="37588" PostHistoryTypeId="5" PostId="16323" RevisionGUID="ba594535-1fe6-4819-97d2-350cb27a3628" CreationDate="2011-08-23T10:39:26.203" UserId="5473" Comment="added 65 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;A number of these were highly rated in their day (around 1990), I recall most of these were rated 80-90% by ST and Amiga Format magazines at the time. Stronghold was also around 70-80%. So clearly the games *were* immersive. Mobygames has more info.&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;Obviously the key thing is to allow your characters to move &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting, and you can evade enemies and go past them into other locations.&#xD;&#xA;&#xD;&#xA;Sapiens was a particularly innovative approach to a game. One aspect was that you could [see your x, y position on a map][1], although each location was a side-scroller view. Stronghold does much the same.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/atari-st/sapiens/screenshots/gameShotId,96117/" />
  <row Id="37589" PostHistoryTypeId="5" PostId="16323" RevisionGUID="956bd584-2e3a-4478-8483-167bc5d3179d" CreationDate="2011-08-23T10:46:39.013" UserId="5473" Comment="deleted 23 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;&#xD;&#xA;A number of these were highly rated in their day (around 1990), I recall around 80-90% by the ST and Amiga magazines back then. Stronghold was also around 70-80%. So clearly the games *were* immersive. Mobygames has more info.&#xD;&#xA;&#xD;&#xA;One of my criteria in picking these, is that they allowed movement &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) of the screen as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens -- enabling a non-linear world.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting, and you can evade enemies and go past them into other locations.&#xD;&#xA;&#xD;&#xA;Sapiens was a particularly innovative approach to a game. One aspect was that you could [see your x, y position on a map][1], although each location was a side-scroller view. Stronghold does much the same.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/atari-st/sapiens/screenshots/gameShotId,96117/" />
  <row Id="37590" PostHistoryTypeId="5" PostId="16323" RevisionGUID="d6d6d6cc-15a1-4189-8859-c0a62066b7ab" CreationDate="2011-08-23T10:55:25.410" UserId="5473" Comment="added 338 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. Colorado / Starblade (same engine, action / adventure)&#xD;&#xA; 2. Drakkhen (action / adventure)&#xD;&#xA; 3. Sapiens (action / adventure)&#xD;&#xA; 4. Stronghold (a strategy RPG)&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;&#xD;&#xA;A number of these were highly rated in their day (around 1990), I recall around 80-90% by the ST and Amiga magazines back then. Stronghold was also around 70-80%. So clearly the games *were* immersive. Mobygames has more info.&#xD;&#xA;&#xD;&#xA;One of my criteria in picking these, is that they allowed movement &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) of the screen as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens -- enabling a non-linear world.&#xD;&#xA;&#xD;&#xA;The main limitation here is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting, and you can evade enemies and go past them into other locations.&#xD;&#xA;&#xD;&#xA;Sapiens was a particularly innovative approach to a game. One aspect was that you could [see your x, y position on a map][1], although each location was a side-scroller view. Stronghold does much the same.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;&#xD;&#xA;Finally, I'd say that there's the potential to achieve even greater world depth in sidescrollers. The reason is that, unlike top-down or isometric views, and like FPSes, this is a natural view for a human being to see other creatures, and their world from -- eyes level to the horizon. So it can actually be quite evocative as a result.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/atari-st/sapiens/screenshots/gameShotId,96117/" />
  <row Id="37591" PostHistoryTypeId="2" PostId="16324" RevisionGUID="c2c25673-626c-4fda-afa9-c6fe678290b0" CreationDate="2011-08-23T11:09:59.330" UserId="8390" Text="You need a list of points and a list of sprites&#xD;&#xA;&#xD;&#xA;    class Path &#xD;&#xA;    {&#xD;&#xA;       List&lt;Vector2&gt; Points;&#xD;&#xA;       float[] Lengths;&#xD;&#xA;       Vector2[] Directions;&#xD;&#xA;    &#xD;&#xA;       void Build()&#xD;&#xA;       {&#xD;&#xA;           Lengths = new float[Points.Count-1];&#xD;&#xA;           Directions = new float[Points.Count-1];&#xD;&#xA;           for (int i=0; i&lt;Points.Count-1;i++)&#xD;&#xA;           {&#xD;&#xA;                Directions[i] = Points[i+1] - Points[i];&#xD;&#xA;                Lengths[i] = Directions[i].Length();&#xD;&#xA;                Directions[i].Normalize();&#xD;&#xA;           }  &#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Sprite &#xD;&#xA;    {&#xD;&#xA;         Vector2 Position;&#xD;&#xA;         float StagePos;&#xD;&#xA;         int StageIndex;&#xD;&#xA;         Path Path;&#xD;&#xA;         float Speed;&#xD;&#xA;    &#xD;&#xA;         void Update(float Seconds)&#xD;&#xA;         {&#xD;&#xA;             if (StageIndex!=Path.Points.Count-1)&#xD;&#xA;             {&#xD;&#xA;                 StagePos += Speed * Seconds;&#xD;&#xA;                 while (StagePos&gt;Path.Lengths[StageIndex])&#xD;&#xA;                 {&#xD;&#xA;                     StagePos -= Path.Lengths[StageIndex]; &#xD;&#xA;                     StageIndex++;              &#xD;&#xA;                     if (StageIndex == Path.Points.Count-1) &#xD;&#xA;                     {&#xD;&#xA;                         Position = Path.Points[StageIndex];&#xD;&#xA;                         return;&#xD;&#xA;                     }&#xD;&#xA;                 }&#xD;&#xA;                 Position = Path.Points[StageIndex] + Directions[StageIndex] * StagePos;&#xD;&#xA;             }&#xD;&#xA;         }    &#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="37592" PostHistoryTypeId="5" PostId="16323" RevisionGUID="85ff7ea6-7815-42f8-a816-d8183f02e3f1" CreationDate="2011-08-23T11:11:19.100" UserId="5473" Comment="added 54 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. [Colorado][1] / [Starblade][2] (same engine, action / adventure)&#xD;&#xA; 2. [Drakkhen][3] (action / adventure)&#xD;&#xA; 3. [Sapiens][4] (action / adventure)&#xD;&#xA; 4. [Stronghold][5] (a strategy RPG)&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;&#xD;&#xA;These all allowed movement &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) of the screen as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens -- enabling a non-linear world.&#xD;&#xA;&#xD;&#xA;The main limitation for the sidescroller is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting, and you can evade enemies and go past them into other locations.&#xD;&#xA;&#xD;&#xA;Sapiens was a particularly innovative approach to a game considering how old it is. One aspect was that you could [see your x, y position on a map][6], although each location was a side-scroller view. Stronghold does much the same.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;&#xD;&#xA;Finally, I'd say that in some ways, there's even more potential to achieve greater world depth in sidescrollers than in top-down or isometric views because, like FPSes, this is a natural view for a human being to see other creatures, and their world from -- eyes level to the horizon. So it can actually be quite evocative as a result.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/colorado/screenshots&#xD;&#xA;  [2]: http://www.mobygames.com/game/starblade/screenshots&#xD;&#xA;  [3]: http://www.mobygames.com/game/drakkhen/screenshots&#xD;&#xA;  [4]: http://www.mobygames.com/game/sapiens/screenshots&#xD;&#xA;  [5]: http://www.mobygames.com/game/stronghold/screenshots&#xD;&#xA;  [6]: http://www.mobygames.com/game/atari-st/sapiens/screenshots/gameShotId,96117/" />
  <row Id="37593" PostHistoryTypeId="2" PostId="16325" RevisionGUID="7d3700b6-194b-417a-ac9f-df5938044ef2" CreationDate="2011-08-23T11:17:33.457" UserId="7367" Text="&#xD;&#xA;I think the simplest way is to record user and AI actions and state during gameplay, not actual frames. After gameplay has finished, either the player completing the race or quitting back to the main menu they are given the option to look at a replay (or save one) and only then are those actions used to recreate the frames by playing back the actions and state through the game engine. This has the additional benefit of not (essentially) having to draw each full frame multiple additional times during gameplay." />
  <row Id="37594" PostHistoryTypeId="2" PostId="16326" RevisionGUID="f8848414-1519-40f1-b88b-ec7d94e65df6" CreationDate="2011-08-23T11:38:57.673" UserId="163" Text="As a kid hanging out in my local arcade, me and my friends used to swear up and down that our computerized sf2 opponents would learn our strategies. &#xD;&#xA;&#xD;&#xA;I wonder if anyone here might know whether that was the case. It feels as if it couldn't have been as simple as a finite state machine, because the opponent's tactics were definitely different depending on how early in the session you'd encounter them. And as each fight went on, it was as if old tactics would stop working. Brilliant games :)&#xD;&#xA;&#xD;&#xA;anyways, I know it's a relatively open ended question. I had so many great memories playing that game, and it would be interesting to know whether the AI was that sophisticated, or otherwise what techniques it may have used so I can potentially use similar techniques in my own game designs.&#xD;&#xA;" />
  <row Id="37595" PostHistoryTypeId="1" PostId="16326" RevisionGUID="f8848414-1519-40f1-b88b-ec7d94e65df6" CreationDate="2011-08-23T11:38:57.673" UserId="163" Text="Did Street Fighter II Employ Machine Learning?" />
  <row Id="37596" PostHistoryTypeId="3" PostId="16326" RevisionGUID="f8848414-1519-40f1-b88b-ec7d94e65df6" CreationDate="2011-08-23T11:38:57.673" UserId="163" Text="&lt;ai&gt;&lt;design&gt;" />
  <row Id="37597" PostHistoryTypeId="2" PostId="16327" RevisionGUID="e04bda94-9215-4a64-a3f6-458be3d02734" CreationDate="2011-08-23T12:22:34.403" UserId="9429" Text="I'm working on a **realtime** multiplayer game that will require a database (for features such as player profiles, friends, unlocks, news, etc.) This is a standard PC game (not browser-based) and will use a **client-server** architecture. I am new to using databases, and have done some research over the past few days when I stumbled upon the heated debate: **RDBMS vs NoSQL**. Currently I am leaning towards **NoSQL** but after reading about the uses for each (RDBMS and NoSQL), I'm tempted to use **both**. I know that may seem strange, but let me explain my situation:&#xD;&#xA;&#xD;&#xA;My team has a **shared webhosting package** that offers **unlimited mySQL** storage and bandwidth, the only caveat being that we can only have **25 connections** open at one time (shared hosting rule). I am intending on using this for my website (a typical usage no doubt) in order to post news updates, support community features (like comments, uploading fan art, etc.) and the like. That's all fine and good - but! this is where things get interesting... I want to **display** this **same information** that is posted on my website, **in-game**. This means **using mySQL** for **both** my **website** and my **game**. In addition to **news posts** and the like, I plan on using it in-game for things like **chat** and a **server list**. I am concerned about that 25-connection-rule mostly.&#xD;&#xA;Which leads me to ask **Question #1: Will this work and is there a better alternative?**&#xD;&#xA;&#xD;&#xA;Now **besides this**, I have read about how well **NoSQL performs** and is **suited** for **realtime** games (I could be wrong, I've walked through a huge RDBMS vs NoSQL flame war to get here and probably am burned). Basically, I would like to use **MongoDB** for **all** of my **game object data**. And again, it will be helpful if I provide some context: I have found a host (**MongoLab**) which offers a **240MB MongoDB package** for **free**, which I intend on using until it's necessary to upgrade. Given 240MB, I've calculated that I will be able to store **roughly 60,000 players** (if **each player** is **roughly 4KB** and we ignore other things that might be stored). The storage space, and having to pay for more in the future (should our game be successful) is not a problem. The only reason I currently **intend** on using **MongoDB** for all of my game object data is because of **how often** this **game object data** will be **accessed** (such as **whenever** a player is killed, picks up an item, fires a gun, etc.) I also like the straight forward **schema-free documents** (which make it easier to map game object data). I should **note** that, **at one time**, there will **only ever** be **one server** writing to a player's profile in the database (the server the player is in). I **intend** on **using the same MongoDB** in my **website**, to **display player profile** information (I'm not concerned with complete consistency, some delay from in-game updates is fine).&#xD;&#xA;Which leads me to my second question, **Question #2: Is this a good idea or is there something better I should do?**&#xD;&#xA;&#xD;&#xA;The **game** will have a **start up experience** similar to this:&#xD;&#xA;&#xD;&#xA; 1. Client logs in (**MongoDB**)&#xD;&#xA; 2. Client is at in-game home page w/ chat rooms (**MySQL**)&#xD;&#xA; 3. Client goes to server list (**MySQL**)&#xD;&#xA; 4. Client connects to a server and plays in it&#xD;&#xA;&#xD;&#xA; 5. Server communicates updates for all players (**MongoDB**)&#xD;&#xA;&#xD;&#xA;This is just the way I imagined it would work (keep in mind, I'm new to using databases).&#xD;&#xA;So lastly, **Question #3: Does this look good to you, or do you have suggestions on how this plan can be improved?**&#xD;&#xA;&#xD;&#xA;Any help would be **greatly appreciated!** :)" />
  <row Id="37598" PostHistoryTypeId="1" PostId="16327" RevisionGUID="e04bda94-9215-4a64-a3f6-458be3d02734" CreationDate="2011-08-23T12:22:34.403" UserId="9429" Text="Which Database (RDBMS vs NoSQL vs BOTH) to use for a Realtime Multiplayer Game?" />
  <row Id="37599" PostHistoryTypeId="3" PostId="16327" RevisionGUID="e04bda94-9215-4a64-a3f6-458be3d02734" CreationDate="2011-08-23T12:22:34.403" UserId="9429" Text="&lt;multiplayer&gt;&lt;performance&gt;&lt;client-server&gt;&lt;databases&gt;" />
  <row Id="37600" PostHistoryTypeId="25" PostId="16312" RevisionGUID="cf194373-e0b9-4bcf-8f56-3034bd015796" CreationDate="2011-08-23T12:37:44.583" Comment="http://twitter.com/#!/StackGameDev/status/105982050489737216" />
  <row Id="37601" PostHistoryTypeId="2" PostId="16328" RevisionGUID="bf2491b3-cadc-4113-8181-8474ebdd42d1" CreationDate="2011-08-23T12:44:55.677" UserId="7787" Text="I'm working on a 2D game where you use paint to add tiles to a level and right now I'm working to add warp tiles. I have it set up so certain direction-oriented paints use two points (a start and end) to determine which direction the tiles will point (left, right, up, down.) The warp tiles have these points, but they'll be added to two other lists (warp start and end). The way the warps work is: if the player hits one tile they'll be teleported to the corresponding warp tile. Now, if I'm going to get this to work properly, I need to make it so the player can't be teleported into a wall or off the map. So I need to move the point to an open tile exactly one space away from any walls.&#xD;&#xA;&#xD;&#xA;What would be the best way to do this?" />
  <row Id="37602" PostHistoryTypeId="1" PostId="16328" RevisionGUID="bf2491b3-cadc-4113-8181-8474ebdd42d1" CreationDate="2011-08-23T12:44:55.677" UserId="7787" Text="What would be the best way to find an open space in a level?" />
  <row Id="37603" PostHistoryTypeId="3" PostId="16328" RevisionGUID="bf2491b3-cadc-4113-8181-8474ebdd42d1" CreationDate="2011-08-23T12:44:55.677" UserId="7787" Text="&lt;xna&gt;&lt;c#&gt;&lt;tiles&gt;" />
  <row Id="37604" PostHistoryTypeId="2" PostId="16329" RevisionGUID="dec3c3d3-931a-4413-9a43-76676c372ec1" CreationDate="2011-08-23T13:11:49.977" UserId="8349" Text="If anyone else wants some extra help regarding this question see [this](http://forum.jogamp.org/GL2ES2-implementation-td3270403.html#a3277843) thread on the official Jogamp forum." />
  <row Id="37605" PostHistoryTypeId="5" PostId="16323" RevisionGUID="0207537d-cd29-4e4a-8df8-38572778d9f7" CreationDate="2011-08-23T13:27:53.657" UserId="5473" Comment="added 5 characters in body" Text="Yes. There were a few games, many years ago, that used a 2D side scroller viewpoint, which were very immersive and highly explorable:&#xD;&#xA;&#xD;&#xA; 1. [Colorado][1] / [Starblade][2] (same engine, action / adventure)&#xD;&#xA; 2. [Drakkhen][3] (action / adventure)&#xD;&#xA; 3. [Sapiens][4] (action / adventure)&#xD;&#xA; 4. [Stronghold][5] (a strategy RPG)&#xD;&#xA;&#xD;&#xA;You can find videos for all of these on youtube.&#xD;&#xA;&#xD;&#xA;These all allowed movement &quot;in&quot; and &quot;out&quot; (&quot;north&quot; and &quot;south&quot;) of the screen as well as left and right (&quot;east&quot;/&quot;west&quot;), between screens -- enabling a non-linear world.&#xD;&#xA;&#xD;&#xA;The main limitation for the sidescroller is the restriction in vertical space. This was overcome in games like Golden Axe and D&amp;D: Shadows Over Mystara by giving the characters some vertical movement room without changing the perspective too much -- this makes combat more interesting, and you can evade enemies and go past them into other locations.&#xD;&#xA;&#xD;&#xA;Sapiens was a particularly innovative approach to game design considering how old it is. One aspect was that you could [see your x, y position on a map][6], although each location was a side-scroller view. Stronghold does much the same.&#xD;&#xA;&#xD;&#xA;Stronghold is a particularly interesting/unique game in that it used a primitive vector based approach to show vistas of the world behind the current location, however the perspective is much the same as a platform game. &#xD;&#xA;&#xD;&#xA;Finally, I'd say that in some ways, there's even more potential to achieve greater world depth in sidescrollers than in top-down or isometric views because, like FPSes, this is a natural view for a human being to see other creatures, and their world from -- eyes level to the horizon. So it can actually be quite evocative as a result.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.mobygames.com/game/colorado/screenshots&#xD;&#xA;  [2]: http://www.mobygames.com/game/starblade/screenshots&#xD;&#xA;  [3]: http://www.mobygames.com/game/drakkhen/screenshots&#xD;&#xA;  [4]: http://www.mobygames.com/game/sapiens/screenshots&#xD;&#xA;  [5]: http://www.mobygames.com/game/stronghold/screenshots&#xD;&#xA;  [6]: http://www.mobygames.com/game/atari-st/sapiens/screenshots/gameShotId,96117/" />
  <row Id="37606" PostHistoryTypeId="2" PostId="16330" RevisionGUID="b20e2705-c3a0-461e-8250-492e9f5a8ac7" CreationDate="2011-08-23T13:41:28.017" UserId="6172" Text="Take a look at [Construct 2][1] which is an HTML5 game engine (disclosure, I work for Scirra!).  A lot of HTML5 engines use Flash for sounds etc, ours is pure HTML5.&#xD;&#xA;&#xD;&#xA;There is a free edition available as well, anyway thought it was worth adding to the list!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.scirra.com" />
  <row Id="37607" PostHistoryTypeId="16" PostId="16330" RevisionGUID="007c833f-c30a-4553-9fd7-0651793b071d" CreationDate="2011-08-23T13:41:28.017" UserId="6172" />
  <row Id="37608" PostHistoryTypeId="5" PostId="16322" RevisionGUID="45e73a9f-9a22-4e57-a284-3c1fb95afd41" CreationDate="2011-08-23T14:01:41.247" UserId="2188" Comment=" + wikilink" Text="I tend to build games with strong stories, which usually involves quite an indepth world environment. Typically I develope typical 2.5 over head view JRPG style (think Zelda, Final Fantasy 3, etc) because I have it stuck in my head that you can only achieve world depth using this style. &#xD;&#xA;&#xD;&#xA;This question is limited to the 2D environment. Can this be achieved in a 2D side scroller? Can a user experience the world when only seeing it from the side? Can he/she explore villages in this manner? Any examples would be great.&#xD;&#xA;&#xD;&#xA;The closest thing that comes to my mind at the moment is [Castle Crashers][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Castle_Crashers" />
  <row Id="37609" PostHistoryTypeId="24" PostId="16322" RevisionGUID="45e73a9f-9a22-4e57-a284-3c1fb95afd41" CreationDate="2011-08-23T14:01:41.247" Comment="Proposed by 2188 approved by 14 edit id of 665" />
  <row Id="37610" PostHistoryTypeId="2" PostId="16331" RevisionGUID="1a2cd1b3-2bcb-4061-81a2-5102922ff5c7" CreationDate="2011-08-23T14:13:14.583" UserId="9437" Text="[Xform Game Development](http://xformgamedevelopment.blogspot.com/)&#xD;&#xA;&#xD;&#xA;Dutch browser game developer. Posts about all kind of things in their development process:&#xD;&#xA;&#xD;&#xA;- programming&#xD;&#xA;- art (2d and 3d)&#xD;&#xA;- management&#xD;&#xA;- internships&#xD;&#xA;- marketing&#xD;&#xA;- test days&#xD;&#xA;&#xD;&#xA;Interesting and fun to read!" />
  <row Id="37611" PostHistoryTypeId="16" PostId="16331" RevisionGUID="f9f24916-953d-40a2-b303-2e9881977b2e" CreationDate="2011-08-23T14:13:14.583" UserId="9437" />
  <row Id="37612" PostHistoryTypeId="5" PostId="16301" RevisionGUID="26b18d7d-3db7-4705-b2a6-5ec98987b2d9" CreationDate="2011-08-23T15:05:00.550" UserId="9415" Comment="added 434 characters in body" Text="Many of the sprite sheets online have non-uniform sized rectangles as the animation frames and often use a portion of the image for credits, etc., this makes it hard for a game engine to correctly clip the sheets.  &#xD;&#xA;&#xD;&#xA;Is there any tool that can help you quickly define frames in a sheet, export animation data which the game engine would use?&#xD;&#xA;&#xD;&#xA;**EDIT:** Here's a list of what I've found by googling:&#xD;&#xA;&#xD;&#xA; - **Sprite Vortex** ([http://spritevortex.codeplex.com/][1]): It can auto-detect frames. There has been some crashes and is still buggy, otherwise it's a very good option. When you are exporting, make sure you click the root item instead of individual animation in the tree view to export all animation definitions. &#xD;&#xA;&#xD;&#xA; - **darkFunction Editor** ([http://darkfunction.com/][2]): By double-clicking a sprite, it will automatically make a frame. Still some manual work but works great so far.&#xD;&#xA;&#xD;&#xA; - **Spritimator** ([http://www.google.com/search?q=spritimator&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t][3]): Saw this used by a tutorial, but the author's webpage seems down at the moment. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://spritevortex.codeplex.com/&#xD;&#xA;  [2]: http://darkfunction.com/&#xD;&#xA;  [3]: http://www.google.com/search?q=spritimator&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t" />
  <row Id="37613" PostHistoryTypeId="2" PostId="16332" RevisionGUID="d5508ca7-1748-428c-9e4e-9ea4875bc68c" CreationDate="2011-08-23T15:18:21.407" UserId="9439" Text="I played the game a lot on the Snes, and a little in the Arcade, and I know that era of videogames well cause I was a kid and I loved em... And I'm pretty sure the AI was absolutely unadaptative. I, myself, didn't see any kind of learning at all, but maybe someone from Capcom could prove me wrong...?" />
  <row Id="37614" PostHistoryTypeId="2" PostId="16333" RevisionGUID="f5a26e88-50e1-42ca-a27e-c1785dea6d1b" CreationDate="2011-08-23T15:28:56.663" UserId="9245" Text="I think you will need to find the nearest &quot;free&quot; rectangle to a warp tile, where the player can fit.&#xD;&#xA;&#xD;&#xA;There is a similar question on stackoverflow. [Click to see](http://stackoverflow.com/questions/3067883/what-is-an-efficient-way-to-find-a-non-colliding-rectangle-nearest-to-a-location &quot;non-colliding rectangle nearest to a location&quot;)." />
  <row Id="37615" PostHistoryTypeId="2" PostId="16334" RevisionGUID="e799df10-a20b-45ad-80fb-1c0ec03177a3" CreationDate="2011-08-23T15:35:11.647" UserId="3051" Text="As someone who, more than once, beat the (SNES version of the) game on the hardest difficulty level with one repeated move (M. Bison's Psycho Crusher), I feel I can safely say it did not learn from strategies.&#xD;&#xA;&#xD;&#xA;Though, this question does remind me of a something I read in Ernest Adams' *[Fundamentals of Game Design][1]*:&#xD;&#xA;&#xD;&#xA;&gt; Most current video games do not, in fact, contain much real AI. The&#xD;&#xA;&gt; point of video games is to entertain, not to simulate intelligence in&#xD;&#xA;&gt; depth, so they usually contain just enough AI to make the player feel&#xD;&#xA;&gt; as if the software is reasonably smart. The players&amp;mdash;who are already&#xD;&#xA;&gt; immersed in the make-believe world anyway&amp;mdash;are often happy to give the&#xD;&#xA;&gt; game credit for intelligence that it doesn't really possess.&#xD;&#xA;&#xD;&#xA;[Source][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Fundamentals-Game-Design-2nd-ebook/dp/B003FJ64H6/&#xD;&#xA;  [2]: http://books.google.com/books?id=-BCrex2U1XMC&amp;lpg=PA18&amp;ots=DfxnT8nLMj&amp;dq=ernest%20adams%20game%20ai&amp;pg=PA18#v=onepage&amp;q&amp;f=false" />
  <row Id="37616" PostHistoryTypeId="25" PostId="16328" RevisionGUID="c573cf54-9d96-4a22-ab15-3e0977c15e4a" CreationDate="2011-08-23T15:37:44.833" Comment="http://twitter.com/#!/StackGameDev/status/106027349258158080" />
  <row Id="37617" PostHistoryTypeId="5" PostId="16334" RevisionGUID="7e128090-f687-449a-ac62-a3dcc408ba04" CreationDate="2011-08-23T15:42:03.390" UserId="3051" Comment="Slight grammar fix" Text="As someone who, more than once, beat the (SNES version of the) game on the hardest difficulty level with one repeated move (M. Bison's Psycho Crusher), I feel I can safely say it did not learn from strategies.&#xD;&#xA;&#xD;&#xA;Though, this question does remind me of something I read in Ernest Adams' *[Fundamentals of Game Design][1]*:&#xD;&#xA;&#xD;&#xA;&gt; Most current video games do not, in fact, contain much real AI. The&#xD;&#xA;&gt; point of video games is to entertain, not to simulate intelligence in&#xD;&#xA;&gt; depth, so they usually contain just enough AI to make the player feel&#xD;&#xA;&gt; as if the software is reasonably smart. The players&amp;mdash;who are already&#xD;&#xA;&gt; immersed in the make-believe world anyway&amp;mdash;are often happy to give the&#xD;&#xA;&gt; game credit for intelligence that it doesn't really possess.&#xD;&#xA;&#xD;&#xA;[Source][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Fundamentals-Game-Design-2nd-ebook/dp/B003FJ64H6/&#xD;&#xA;  [2]: http://books.google.com/books?id=-BCrex2U1XMC&amp;lpg=PA18&amp;ots=DfxnT8nLMj&amp;dq=ernest%20adams%20game%20ai&amp;pg=PA18#v=onepage&amp;q&amp;f=false" />
  <row Id="37618" PostHistoryTypeId="2" PostId="16335" RevisionGUID="9ec7720d-f3a1-4669-b5c5-9c3cf57d353e" CreationDate="2011-08-23T15:50:57.517" UserId="6588" Text="I am right now investigating HTML5 engines, and my top choices are LimeJS and EaselJS. I'm kinda preferring the latter just because I'm not a fan of Closure and LimeJS is built on top of that JavaScript framework, but that bias isn't entirely rational." />
  <row Id="37619" PostHistoryTypeId="16" PostId="16335" RevisionGUID="7471d65a-4f12-4073-95db-acc835ab1299" CreationDate="2011-08-23T15:50:57.517" UserId="6588" />
  <row Id="37620" PostHistoryTypeId="5" PostId="16327" RevisionGUID="b7e999b8-0981-4c0e-bf14-65d621dbbc3f" CreationDate="2011-08-23T15:53:37.167" UserId="51" Comment="the bold was unreadable.  Also broke up some paragraphs." Text="I'm working on a realtime multiplayer game that will require a database (for features such as player profiles, friends, unlocks, news, etc.) This is a standard PC game (not browser-based) and will use a client-server architecture. I am new to using databases, and have done some research over the past few days when I stumbled upon the heated debate: RDBMS vs NoSQL. Currently I am leaning towards NoSQL but after reading about the uses for each (RDBMS and NoSQL), I'm tempted to use both. I know that may seem strange, but let me explain my situation:&#xD;&#xA;&#xD;&#xA;My team has a shared webhosting package that offers unlimited mySQL storage and bandwidth, the only caveat being that we can only have 25 connections open at one time (shared hosting rule). I am intending on using this for my website (a typical usage no doubt) in order to post news updates, support community features (like comments, uploading fan art, etc.) and the like. That's all fine and good - but! this is where things get interesting... I want to display this same information that is posted on my website, in-game. This means using mySQL for both my website and my game. In addition to news posts and the like, I plan on using it in-game for things like chat and a server list. I am concerned about that 25-connection-rule mostly.&#xD;&#xA;&#xD;&#xA;Which leads me to ask Question #1: Will this work and is there a better alternative?&#xD;&#xA;&#xD;&#xA;Now besides this, I have read about how well NoSQL performs and is suited for realtime games (I could be wrong, I've walked through a huge RDBMS vs NoSQL flame war to get here and probably am burned). Basically, I would like to use MongoDB for all of my game object data. &#xD;&#xA;&#xD;&#xA;And again, it will be helpful if I provide some context: I have found a host (MongoLab) which offers a 240MB MongoDB package for free, which I intend on using until it's necessary to upgrade. Given 240MB, I've calculated that I will be able to store roughly 60,000 players (if each player is roughly 4KB and we ignore other things that might be stored). The storage space, and having to pay for more in the future (should our game be successful) is not a problem. The only reason I currently intend on using MongoDB for all of my game object data is because of how often this game object data will be accessed (such as whenever a player is killed, picks up an item, fires a gun, etc.) I also like the straight forward schema-free documents (which make it easier to map game object data). I should note that, at one time, there will only ever be one server writing to a player's profile in the database (the server the player is in). &#xD;&#xA;&#xD;&#xA;I intend on using the same MongoDB in my website, to display player profile** information (I'm not concerned with complete consistency, some delay from in-game updates is fine).&#xD;&#xA;Which leads me to my second question, Question #2: Is this a good idea or is there something better I should do?&#xD;&#xA;&#xD;&#xA;The game will have a start up experience similar to this:&#xD;&#xA;&#xD;&#xA; 1. Client logs in (MongoDB)&#xD;&#xA; 2. Client is at in-game home page w/ chat rooms (MySQL)&#xD;&#xA; 3. Client goes to server list (MySQL)&#xD;&#xA; 4. Client connects to a server and plays in it&#xD;&#xA;&#xD;&#xA; 5. Server communicates updates for all players (MongoDB)&#xD;&#xA;&#xD;&#xA;This is just the way I imagined it would work.  Does this look good to you, or do you have suggestions on how this plan can be improved?" />
  <row Id="37621" PostHistoryTypeId="2" PostId="16336" RevisionGUID="4aea6fae-3256-4e0e-b1cd-0f5d214479fe" CreationDate="2011-08-23T16:09:32.727" UserId="7067" Text="How can I embed a video in a XNA application?&#xD;&#xA;I'm developing a card game with XNA C# and I need to send webcam video between four machines.&#xD;&#xA;Could anyone give me some tips about that?" />
  <row Id="37622" PostHistoryTypeId="1" PostId="16336" RevisionGUID="4aea6fae-3256-4e0e-b1cd-0f5d214479fe" CreationDate="2011-08-23T16:09:32.727" UserId="7067" Text="XNA Webcam video" />
  <row Id="37623" PostHistoryTypeId="3" PostId="16336" RevisionGUID="4aea6fae-3256-4e0e-b1cd-0f5d214479fe" CreationDate="2011-08-23T16:09:32.727" UserId="7067" Text="&lt;xna&gt;&lt;c#&gt;&lt;video&gt;" />
  <row Id="37624" PostHistoryTypeId="2" PostId="16337" RevisionGUID="fdcad200-3380-46e8-a616-f92e4edbf37a" CreationDate="2011-08-23T17:19:29.663" UserId="5651" Text="My suggestion is to have your game communicate to a web service that you created that itself deals with querying the database.  At that point, it's very simple to try different kinds of databases by &quot;switching&quot; web service implementations (your web service interface always stays the same so your game doesn't break) and decide which one is right for you.  &#xD;&#xA;&#xD;&#xA;It's also a lot more secure to not expose your database to the internet directly." />
  <row Id="37625" PostHistoryTypeId="2" PostId="16338" RevisionGUID="0431e29a-ab5b-44f1-99f8-0b431a20ca45" CreationDate="2011-08-23T17:42:31.383" UserId="6843" Text="Do you trust your 60,000 users per database?   If not, you should nix the &quot;database access from the client&quot; idea, unless your level of expertise in the security of the database software is top-notch, and you are confident that you can accommodate any issues that result.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37626" PostHistoryTypeId="2" PostId="16339" RevisionGUID="8b69a812-6161-4b8b-950d-3d5812c42a07" CreationDate="2011-08-23T17:47:59.910" UserId="2332" Text="I believe the general solution to this is to capture the webcam images and apply it to a Texture2D. This is known as rendering to a texture. You can find more information here: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Render_to_texture.php&#xD;&#xA;&#xD;&#xA;Be warned that that tutorial is made for XNA 3.1 so it might need a bit of work porting it to XNA 4.0 code.&#xD;&#xA;&#xD;&#xA;I've found a few webcam components/image capture facilities that are written in C# so they can be used along with the XNA framework:&#xD;&#xA;&#xD;&#xA;http://stackoverflow.com/questions/1789684/webcam-calling-in-xna - This SO question provides a few answers and even some techniques to apply the webcam stream to an image (although it's a very dirty way in my opinion). &#xD;&#xA;&#xD;&#xA;http://forums.create.msdn.com/forums/p/1467/9530.aspx#9530 - This forum post provides an XNA specific Webcam component that allows you to capture the images to a texture. I believe this to be fairly buggy, but the code should provide you with a good starting point.&#xD;&#xA;&#xD;&#xA;Hope that helps!" />
  <row Id="37627" PostHistoryTypeId="5" PostId="16327" RevisionGUID="68f3b88c-8476-4948-8865-3994536d7857" CreationDate="2011-08-23T17:55:40.650" UserId="51" Comment="missed an end bold marker" Text="I'm working on a realtime multiplayer game that will require a database (for features such as player profiles, friends, unlocks, news, etc.) This is a standard PC game (not browser-based) and will use a client-server architecture. I am new to using databases, and have done some research over the past few days when I stumbled upon the heated debate: RDBMS vs NoSQL. Currently I am leaning towards NoSQL but after reading about the uses for each (RDBMS and NoSQL), I'm tempted to use both. I know that may seem strange, but let me explain my situation:&#xD;&#xA;&#xD;&#xA;My team has a shared webhosting package that offers unlimited mySQL storage and bandwidth, the only caveat being that we can only have 25 connections open at one time (shared hosting rule). I am intending on using this for my website (a typical usage no doubt) in order to post news updates, support community features (like comments, uploading fan art, etc.) and the like. That's all fine and good - but! this is where things get interesting... I want to display this same information that is posted on my website, in-game. This means using mySQL for both my website and my game. In addition to news posts and the like, I plan on using it in-game for things like chat and a server list. I am concerned about that 25-connection-rule mostly.&#xD;&#xA;&#xD;&#xA;Which leads me to ask Question #1: Will this work and is there a better alternative?&#xD;&#xA;&#xD;&#xA;Now besides this, I have read about how well NoSQL performs and is suited for realtime games (I could be wrong, I've walked through a huge RDBMS vs NoSQL flame war to get here and probably am burned). Basically, I would like to use MongoDB for all of my game object data. &#xD;&#xA;&#xD;&#xA;And again, it will be helpful if I provide some context: I have found a host (MongoLab) which offers a 240MB MongoDB package for free, which I intend on using until it's necessary to upgrade. Given 240MB, I've calculated that I will be able to store roughly 60,000 players (if each player is roughly 4KB and we ignore other things that might be stored). The storage space, and having to pay for more in the future (should our game be successful) is not a problem. The only reason I currently intend on using MongoDB for all of my game object data is because of how often this game object data will be accessed (such as whenever a player is killed, picks up an item, fires a gun, etc.) I also like the straight forward schema-free documents (which make it easier to map game object data). I should note that, at one time, there will only ever be one server writing to a player's profile in the database (the server the player is in). &#xD;&#xA;&#xD;&#xA;I intend on using the same MongoDB in my website, to display player profile information (I'm not concerned with complete consistency, some delay from in-game updates is fine).&#xD;&#xA;Which leads me to my second question, Question #2: Is this a good idea or is there something better I should do?&#xD;&#xA;&#xD;&#xA;The game will have a start up experience similar to this:&#xD;&#xA;&#xD;&#xA; 1. Client logs in (MongoDB)&#xD;&#xA; 2. Client is at in-game home page w/ chat rooms (MySQL)&#xD;&#xA; 3. Client goes to server list (MySQL)&#xD;&#xA; 4. Client connects to a server and plays in it&#xD;&#xA;&#xD;&#xA; 5. Server communicates updates for all players (MongoDB)&#xD;&#xA;&#xD;&#xA;This is just the way I imagined it would work.  Does this look good to you, or do you have suggestions on how this plan can be improved?" />
  <row Id="37628" PostHistoryTypeId="2" PostId="16340" RevisionGUID="7d9b4531-daae-41da-ba53-3c77d4999e0a" CreationDate="2011-08-23T18:16:16.377" UserId="9441" Text="Can anyone please help me out with a small test game I'm creating. I'm basically creating this game to learn a few things about HTML5 and so far it's all been good. I've been able to create a canvas with a air balloon that can fly and drops to the bottom when it's not. Now I want the air balloon to be able to stop on another image, which I've called &quot;level1&quot;. If someone could perhaps have a look at it, view the source and suggest how I would do this, I would appreciate it.&#xD;&#xA;&#xD;&#xA;Or perhaps using images isn't the most efficient way to create a level. If it isn't then please say. Thanks again. :)   &#xD;&#xA;&#xD;&#xA;[Here's the game.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://tehwebz.com/html5/game.php" />
  <row Id="37629" PostHistoryTypeId="1" PostId="16340" RevisionGUID="7d9b4531-daae-41da-ba53-3c77d4999e0a" CreationDate="2011-08-23T18:16:16.377" UserId="9441" Text="HTML5 collision with images" />
  <row Id="37630" PostHistoryTypeId="3" PostId="16340" RevisionGUID="7d9b4531-daae-41da-ba53-3c77d4999e0a" CreationDate="2011-08-23T18:16:16.377" UserId="9441" Text="&lt;collision-detection&gt;&lt;javascript&gt;&lt;html5&gt;" />
  <row Id="37631" PostHistoryTypeId="25" PostId="16336" RevisionGUID="5de64a96-2229-46cf-88b4-bce2fe763afd" CreationDate="2011-08-23T18:37:44.403" Comment="http://twitter.com/#!/StackGameDev/status/106072646902493185" />
  <row Id="37632" PostHistoryTypeId="2" PostId="16341" RevisionGUID="ef6bbb06-3007-43d6-abb6-c03f5bb73470" CreationDate="2011-08-23T19:41:57.060" UserId="5473" Text="If your &quot;level1&quot; sprite is fairly simple, you can emulate this by create a number of bounding boxes around/over it, check when the balloon penetrates these bounding boxes, and push it back to a safe distance.&#xD;&#xA;&#xD;&#xA;Else look into &quot;pixel-perfect collision detection&quot;." />
  <row Id="37633" PostHistoryTypeId="2" PostId="16342" RevisionGUID="1c2f9cc5-617f-407d-8aa8-e8f4561a77e7" CreationDate="2011-08-23T19:55:48.193" UserId="587" Text="I've used [Crafty.js][1] in a simple project and I liked that. You should take a look at it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://craftyjs.com/" />
  <row Id="37634" PostHistoryTypeId="16" PostId="16342" RevisionGUID="4c45cea7-91f8-4414-9803-cf78252f7e65" CreationDate="2011-08-23T19:55:48.193" UserId="587" />
  <row Id="37635" PostHistoryTypeId="2" PostId="16343" RevisionGUID="e72660e6-74e9-495a-87a6-9598787ba1b9" CreationDate="2011-08-23T20:16:03.627" UserId="5275" Text="I've taken the A* Algorithm from this example [XNA Pathfinder Example][1] so that it will be able to plot a path for a moving goal.&#xD;&#xA;&#xD;&#xA;The issue I'm having is that it will go in the right general direction but it will keep going back and forth in a line. I've changed the method so that it calculates a new path every half a second, clear out the previous points from the list and adds the new points to and from what I have debugged I can't find any issue with the points being added to the queue, to be honest I don't have the foggiest idea what is going wrong :/&#xD;&#xA;&#xD;&#xA;This is the field where the waypoints are being held for the character &#xD;&#xA;&#xD;&#xA;    private Queue&lt;Vector2&gt; waypoints = new Queue&lt;Vector2&gt;();&#xD;&#xA;&#xD;&#xA;This section is in the update loop and deals with the plotting a new path and laying out the new one onto the list mentioned above.&#xD;&#xA;&#xD;&#xA;                timer += gameTime.ElapsedGameTime;&#xD;&#xA;    &#xD;&#xA;                if (timer.Seconds &gt;= 0.5)&#xD;&#xA;                {&#xD;&#xA;                    timer = TimeSpan.Zero;&#xD;&#xA;                    pathFinder.NewPath(position);&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if (pathFinder.SearchStatus == SearchStatus.PathFound)&#xD;&#xA;                {&#xD;&#xA;                    waypoints.Clear();&#xD;&#xA;                    foreach (Point point in pathFinder.FinalPath())&#xD;&#xA;                    {&#xD;&#xA;                        Waypoints.Enqueue(level.MapToWorld(point, true));&#xD;&#xA;                    }&#xD;&#xA;                    moving = true;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This section is where the waypoints are either taken off or used to set the new position of the character.&#xD;&#xA;&#xD;&#xA;                    if (moving)&#xD;&#xA;                    {&#xD;&#xA;                        // If we have any waypoints, the first one on the list is where &#xD;&#xA;                        // we want to go&#xD;&#xA;                        if (waypoints.Count &gt;= 1)&#xD;&#xA;                        {&#xD;&#xA;                            destination = waypoints.Peek();&#xD;&#xA;                        }&#xD;&#xA;    &#xD;&#xA;                        // If we’re at the destination and there is at least one waypoint in &#xD;&#xA;                        // the list, get rid of the first one since we’re there now&#xD;&#xA;                        if (AtDestination &amp;&amp; waypoints.Count &gt;= 1)&#xD;&#xA;                        {&#xD;&#xA;                            waypoints.Dequeue();&#xD;&#xA;                        }&#xD;&#xA;                        if (!AtDestination)&#xD;&#xA;                        {&#xD;&#xA;                            direction = -(position - destination);&#xD;&#xA;                            //This scales the vector to 1, we'll use move Speed and elapsed Time &#xD;&#xA;                            //to find the how far the tank moves&#xD;&#xA;                            direction.Normalize();&#xD;&#xA;                            position = position + (direction * MoveSpeed * elapsedTime);&#xD;&#xA;                        }                  &#xD;&#xA;                     }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: http://create.msdn.com/en-US/education/catalog/sample/pathfinding&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37636" PostHistoryTypeId="1" PostId="16343" RevisionGUID="e72660e6-74e9-495a-87a6-9598787ba1b9" CreationDate="2011-08-23T20:16:03.627" UserId="5275" Text="Pathfinder not acting correctly" />
  <row Id="37637" PostHistoryTypeId="3" PostId="16343" RevisionGUID="e72660e6-74e9-495a-87a6-9598787ba1b9" CreationDate="2011-08-23T20:16:03.627" UserId="5275" Text="&lt;c#&gt;&lt;ai&gt;" />
  <row Id="37638" PostHistoryTypeId="25" PostId="562" RevisionGUID="7bab08e6-b2fe-4a8d-93a7-06ad4b215f1a" CreationDate="2011-08-23T21:37:45.367" Comment="http://twitter.com/#!/StackGameDev/status/106117948699197440" />
  <row Id="37639" PostHistoryTypeId="2" PostId="16344" RevisionGUID="38802c20-675c-4c64-a7b4-5940bdfbc336" CreationDate="2011-08-23T22:20:19.740" UserId="8390" Text="Your character should check for a new destination only when it has reached the current destination. &#xD;&#xA;At this point if your target has changed you should recalc the path.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm afraid with the AtDestination calcs. I'd like to see how you determine it." />
  <row Id="37640" PostHistoryTypeId="2" PostId="16345" RevisionGUID="46ad480e-e52f-4d32-9443-e78bd1e98497" CreationDate="2011-08-23T22:44:22.887" UserId="159" Text="I hate to link to an existing answer, but the one I posted here might be useful: http://gamedev.stackexchange.com/questions/15957/wise-approach-to-becoming-good-at-c-xna/15960#15960&#xD;&#xA;&#xD;&#xA;&gt; Start by making something simple. Maybe a static sprite that moves&#xD;&#xA;&gt; across the screen when you press certain buttons. Add some objects to&#xD;&#xA;&gt; play with collision. Then when you feel comfortable with that work on&#xD;&#xA;&gt; sprite animations, and a simple camera. It really isn't hard.&#xD;&#xA;&gt; &#xD;&#xA;&gt; If you want a jump start, look at something like [Flat Red Ball][1].&#xD;&#xA;&gt; It is simple 2.5D game engine that might help. If you want to make&#xD;&#xA;&gt; your own, look at [this tile engine series][2]. It will show you stuff&#xD;&#xA;&gt; like how to make a camera, animations, collision, and the rest. There&#xD;&#xA;&gt; is also [this 2d tutorial series][3]. I don't have a nice playlist for&#xD;&#xA;&gt; it so you will have to search youtube for the different parts. For&#xD;&#xA;&gt; even more resources, check out the [ever-growing list of samples][4]&#xD;&#xA;&gt; on the App Hub site.&#xD;&#xA;&gt; &#xD;&#xA;&gt; If you really want to take classes, I can vouch for&#xD;&#xA;&gt; http://LearnVisualStudio.net. I know a few people who have taken them,&#xD;&#xA;&gt; and have seen the content. It is presented nicely and easy to follow.&#xD;&#xA;&gt; &#xD;&#xA;&gt; When in doubt, come back here and ask questions. The people here are&#xD;&#xA;&gt; very responsive and helpful. If you need help on general&#xD;&#xA;&gt; C#/programming concepts try http://stackoverflow.com. It is another&#xD;&#xA;&gt; wonderful resource.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.flatredball.com&#xD;&#xA;  [2]: http://www.youtube.com/view_play_list?p=0A865073DA96A7DA&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=caLSZStt050&#xD;&#xA;  [4]: http://create.msdn.com/en-US/education/catalog/" />
  <row Id="37641" PostHistoryTypeId="5" PostId="16324" RevisionGUID="bc9c1697-069c-4c63-938d-fba4ecb99561" CreationDate="2011-08-23T23:43:05.677" UserId="2698" Comment="Modified class name" Text="You need a list of points and a list of balloons&#xD;&#xA;&#xD;&#xA;    class Path &#xD;&#xA;    {&#xD;&#xA;       List&lt;Vector2&gt; Points;&#xD;&#xA;       float[] Lengths;&#xD;&#xA;       Vector2[] Directions;&#xD;&#xA;    &#xD;&#xA;       void Build()&#xD;&#xA;       {&#xD;&#xA;           Lengths = new float[Points.Count-1];&#xD;&#xA;           Directions = new float[Points.Count-1];&#xD;&#xA;           for (int i=0; i&lt;Points.Count-1;i++)&#xD;&#xA;           {&#xD;&#xA;                Directions[i] = Points[i+1] - Points[i];&#xD;&#xA;                Lengths[i] = Directions[i].Length();&#xD;&#xA;                Directions[i].Normalize();&#xD;&#xA;           }  &#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    class Balloon&#xD;&#xA;    {&#xD;&#xA;         Vector2 Position;&#xD;&#xA;         float StagePos;&#xD;&#xA;         int StageIndex;&#xD;&#xA;         Path Path;&#xD;&#xA;         float Speed;&#xD;&#xA;    &#xD;&#xA;         void Update(float Seconds)&#xD;&#xA;         {&#xD;&#xA;             if (StageIndex!=Path.Points.Count-1)&#xD;&#xA;             {&#xD;&#xA;                 StagePos += Speed * Seconds;&#xD;&#xA;                 while (StagePos&gt;Path.Lengths[StageIndex])&#xD;&#xA;                 {&#xD;&#xA;                     StagePos -= Path.Lengths[StageIndex]; &#xD;&#xA;                     StageIndex++;              &#xD;&#xA;                     if (StageIndex == Path.Points.Count-1) &#xD;&#xA;                     {&#xD;&#xA;                         Position = Path.Points[StageIndex];&#xD;&#xA;                         return;&#xD;&#xA;                     }&#xD;&#xA;                 }&#xD;&#xA;                 Position = Path.Points[StageIndex] + Directions[StageIndex] * StagePos;&#xD;&#xA;             }&#xD;&#xA;         }    &#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="37642" PostHistoryTypeId="2" PostId="16346" RevisionGUID="23734b7f-0247-407c-8729-8a2f583df1e6" CreationDate="2011-08-24T00:34:01.770" UserId="5904" Text="If you have a road made up of tiles with a single path (&quot;pipeline&quot; as you called it), then you don't need boids, avoidance, AI, or really anything super special. Just have each balloon move in the natural direction of the road tile. For example, given a starting tile with only one non-sand tile to touch, you can figure out which direction to move -- it is the direction that is &quot;not here, not where I was, and not sand&quot;. Since your road has only two possible directions of flow, once the initial direction and tile are established, the algorithm will solve the problem.&#xD;&#xA;&#xD;&#xA;The balloons will appear to follow each other simply because there isn't anywhere else to go. If they all move at a constant speed, then no collisions are possible. Even if they don't move at a constant speed, the &quot;not here, not where I was, and not sand&quot; can be have &quot;and make sure there is enough space for me&quot; appended.&#xD;&#xA;&#xD;&#xA;You could generalize a little and use the tile's image as a method of extracting direction. For example, an L shaped road stripe means either &quot;if you're going south, then turn east&quot; or &quot;if you're going west, turn north&quot;.&#xD;&#xA;&#xD;&#xA;This system breaks down when you decision making to do, i.e. more than a single path that can be taken, but from your screenshot and description of the problem, that doesn't seem to be an issue. If it is a requirement for your application, then definitely invest in a more AI-centric approach." />
  <row Id="37643" PostHistoryTypeId="25" PostId="16327" RevisionGUID="45d35b86-2538-4921-885c-b557f85a60c0" CreationDate="2011-08-24T00:37:45.620" Comment="http://twitter.com/#!/StackGameDev/status/106163249384398848" />
  <row Id="37644" PostHistoryTypeId="4" PostId="16312" RevisionGUID="549ddcdc-0d0a-47fc-8249-56e9b87e90e8" CreationDate="2011-08-24T00:53:32.957" UserId="6181" Comment="More descriptive title" Text="How to get object to lose less velocity as its speed increases" />
  <row Id="37645" PostHistoryTypeId="24" PostId="16312" RevisionGUID="549ddcdc-0d0a-47fc-8249-56e9b87e90e8" CreationDate="2011-08-24T00:53:32.957" Comment="Proposed by 6181 approved by 51 edit id of 666" />
  <row Id="37646" PostHistoryTypeId="2" PostId="16347" RevisionGUID="ccd197e6-64bd-4a45-909d-ca60f5317b39" CreationDate="2011-08-24T03:32:03.857" UserId="9450" Text="http://www.opengl.org/wiki/GluProject_and_gluUnProject_code" />
  <row Id="37647" PostHistoryTypeId="25" PostId="16340" RevisionGUID="472b337c-ca9a-46d7-a901-bec75f9c07d4" CreationDate="2011-08-24T03:37:45.607" Comment="http://twitter.com/#!/StackGameDev/status/106208547443982336" />
  <row Id="37648" PostHistoryTypeId="2" PostId="16348" RevisionGUID="18ecc354-e50c-4898-8f0e-22c4914cfa0f" CreationDate="2011-08-24T04:50:17.423" UserId="9433" Text="&#xD;&#xA;I am getting difficulty in loading 3D models and textures in Qt creator 2.1 while using obj files through arrays method.I am using openGL ES 1.1 to build the applications for symbian devices.It would be really helpful if someone could provide me the examples or material showing how to load 3D models and textures in Qt using openGL ES 1.1 through arrays method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;regards&#xD;&#xA;&#xD;&#xA;hurr[i]cane" />
  <row Id="37649" PostHistoryTypeId="1" PostId="16348" RevisionGUID="18ecc354-e50c-4898-8f0e-22c4914cfa0f" CreationDate="2011-08-24T04:50:17.423" UserId="9433" Text="How to load 3D models and textures in Qt creator 2.1 using obj files" />
  <row Id="37650" PostHistoryTypeId="3" PostId="16348" RevisionGUID="18ecc354-e50c-4898-8f0e-22c4914cfa0f" CreationDate="2011-08-24T04:50:17.423" UserId="9433" Text="&lt;opengl-es&gt;&lt;qt&gt;" />
  <row Id="37651" PostHistoryTypeId="2" PostId="16349" RevisionGUID="37415bd7-6b9f-4ef9-8e72-265db6e6d487" CreationDate="2011-08-24T06:25:57.393" UserId="9451" Text="I have basic experience in Python, and I want to know which is the best library to use in development. I was looking originally at Pygame but found it a bit lacking in tutorials. Are there any good ones for Pygame? And if not, is there any nice alternative to the Pygame library, or Python itself?" />
  <row Id="37652" PostHistoryTypeId="1" PostId="16349" RevisionGUID="37415bd7-6b9f-4ef9-8e72-265db6e6d487" CreationDate="2011-08-24T06:25:57.393" UserId="9451" Text="Basic developing in python?" />
  <row Id="37653" PostHistoryTypeId="3" PostId="16349" RevisionGUID="37415bd7-6b9f-4ef9-8e72-265db6e6d487" CreationDate="2011-08-24T06:25:57.393" UserId="9451" Text="&lt;python&gt;&lt;pygame&gt;" />
  <row Id="37654" PostHistoryTypeId="25" PostId="16343" RevisionGUID="68825713-6296-4472-b28f-4d782a9ed745" CreationDate="2011-08-24T06:37:45.953" Comment="http://twitter.com/#!/StackGameDev/status/106253846409527296" />
  <row Id="37655" PostHistoryTypeId="5" PostId="16312" RevisionGUID="8b484842-d964-438a-8381-53e70a4b31da" CreationDate="2011-08-24T07:01:03.530" UserId="20" Comment="minor spelling and formatting changes, removed collision-detection and algorithm tag" Text="I'm developing a game in Flash and I need a little help. It can be considered a math problem.&#xD;&#xA;&#xD;&#xA;My object is flying with speed `X` and my object can collide with stones. When it collides with a stone, I need my object to break the stone and continue, but with less velocity.&#xD;&#xA;It's easy to hard-code it and write something like: `myVelocity -= 10;`, but my main problem is that I want it to lose *less* velocity the higher the initial velocity is.&#xD;&#xA;&#xD;&#xA;For example: If the velocity is 300 I want it to lose 10 and if it was 200 I want it to lose 20.&#xD;&#xA;&#xD;&#xA;Can this be done with some kind of formula? " />
  <row Id="37656" PostHistoryTypeId="6" PostId="16312" RevisionGUID="8b484842-d964-438a-8381-53e70a4b31da" CreationDate="2011-08-24T07:01:03.530" UserId="20" Comment="minor spelling and formatting changes, removed collision-detection and algorithm tag" Text="&lt;physics&gt;&lt;math&gt;&lt;2d-physics&gt;" />
  <row Id="37657" PostHistoryTypeId="2" PostId="16350" RevisionGUID="f0f1ce1c-bd41-4af5-a3d7-e5616311e707" CreationDate="2011-08-24T07:16:55.210" UserId="5508" Text="I always found [Pyglet][1] to be a very nice alternative to PyGame. To me it felt more Pythonic and came with an good [programming guide][2] (next to the API documentation, of course) that almost always helped me get along.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pyglet.org/&#xD;&#xA;  [2]: http://www.pyglet.org/doc/programming_guide/index.html" />
  <row Id="37658" PostHistoryTypeId="5" PostId="11809" RevisionGUID="b97f4545-92d4-4843-a77b-68fc93322a85" CreationDate="2011-08-24T07:28:09.180" UserId="9255" Comment="Editing for readability (no = number)" Text="There is a square grid in which there are empty and filled blocks. A number of contiguous blocks form an object. My bot can find out the status of it's neighbouring 8 blocks (whether they are filled or not). It can move to a neighbouring position if there is no filled block over there.&#xD;&#xA;&#xD;&#xA;I have 2 questions&#xD;&#xA;&#xD;&#xA;First one :  &#xD;&#xA;&#xD;&#xA;My code works for the case when there are no tight spaces (i.e., when objects have at least 2 empty blocks between them). But, in the case when there can be a single space between 2 blocks, since my bot has no way of knowing if the neighbouring filled blocks belong to the same or different objects, it fails to encircle the object.&#xD;&#xA;&#xD;&#xA;Is there a way to get around this problem?&#xD;&#xA;&#xD;&#xA;The other question :  &#xD;&#xA;&#xD;&#xA;What would be the best search strategy for this? I've been thinking of assigning rewards to neighbouring spaces on the basis of how many unvisited spaces it will allow me to visit if I visit that neigbouring space, but a much simpler strategy seems to be :&#xD;&#xA;keep going right till you hit the wall, the go up and keep going left, then up and right ....&#xD;&#xA;Is there a catch to this approach?&#xD;&#xA;" />
  <row Id="37659" PostHistoryTypeId="4" PostId="11809" RevisionGUID="b97f4545-92d4-4843-a77b-68fc93322a85" CreationDate="2011-08-24T07:28:09.180" UserId="9255" Comment="Editing for readability (no = number)" Text="encircling and counting number of objects in a grid" />
  <row Id="37660" PostHistoryTypeId="24" PostId="11809" RevisionGUID="b97f4545-92d4-4843-a77b-68fc93322a85" CreationDate="2011-08-24T07:28:09.180" Comment="Proposed by 9255 approved by 51 edit id of 667" />
  <row Id="37661" PostHistoryTypeId="2" PostId="16351" RevisionGUID="acce3d99-5c9a-42e7-9e7e-a2c69c6dd222" CreationDate="2011-08-24T08:03:29.570" UserId="3656" Text="There's also the original [Cocos 2D][1], as well as [Panda 3D][2].&#xD;&#xA;&#xD;&#xA;Haven't done a lot of game programming in Python. I just know that if you want to try anything more than the absolute basics with audio in Python that you should avoid pygame like the plague, or at least find an alternate sound module.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cocos2d.org/&#xD;&#xA;  [2]: http://www.panda3d.org/" />
  <row Id="37662" PostHistoryTypeId="2" PostId="16352" RevisionGUID="e11487e6-f7b4-47d8-b8c4-e4fb8cea01a4" CreationDate="2011-08-24T08:21:21.330" UserId="696" Text="I started XNA as an existing professional C# developer so it's a bit different but I found the [samples in the educational catalog][1] at [create.msdn.com][2] really useful.&#xD;&#xA;&#xD;&#xA;They've got samples of most of the things you'll probably want to do.&#xD;&#xA;If videos are more your thing, they've got [lots of those too][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/&#xD;&#xA;  [2]: http://create.msdn.com&#xD;&#xA;  [3]: http://channel9.msdn.com/Blogs/The-XNA-Show" />
  <row Id="37663" PostHistoryTypeId="25" PostId="16326" RevisionGUID="52a5a4e1-7cb6-4b4d-888e-62a9d77ece99" CreationDate="2011-08-24T09:37:46.690" Comment="http://twitter.com/#!/StackGameDev/status/106299149523226624" />
  <row Id="37664" PostHistoryTypeId="2" PostId="16353" RevisionGUID="e597efc1-298f-43c2-8433-b66dfeb2d76d" CreationDate="2011-08-24T11:15:41.373" UserId="9453" Text="I was at a similar position to you a few months back except I've done game development before so was looking to refresh things.&#xD;&#xA;&#xD;&#xA;i found the following site very useful for getting me up and running again with simple 2D sprite displaying.&#xD;&#xA;&#xD;&#xA;http://www.xnadevelopment.com/tutorials.shtml&#xD;&#xA;" />
  <row Id="37665" PostHistoryTypeId="2" PostId="16354" RevisionGUID="49c6c5c3-2300-4bce-b04a-0f2385e748ca" CreationDate="2011-08-24T11:39:55.113" UserId="6422" Text="An easy way to encircle an object is to just 'stick your left hand out' and walk forwards, keeping your hand on the object.&#xD;&#xA;&#xD;&#xA;So, for your bot, you need to keep track of its direction, then if the tile to the left (relative to its current direction) is free then turn left and move forward.&#xD;&#xA;If its not free, and ahead is free then move forwards, and if ahead isn't free then turn right." />
  <row Id="37666" PostHistoryTypeId="2" PostId="16355" RevisionGUID="938a20c6-64cc-41c8-ab89-1475bfebf04f" CreationDate="2011-08-24T11:43:00.983" UserId="1101" Text="&gt; we can only have 25 connections open at one time (shared hosting rule).&#xD;&#xA;&#xD;&#xA;That's more than enough for your game. The problem is that if your website uses multiple connections, you could run out. You need to configure your web server to only use a small number of them, leaving the rest for your game server. Your game server doesn't really need more than 1 connection, but might benefit from having a handful.&#xD;&#xA;&#xD;&#xA;&gt; Now besides this, I have read about how well NoSQL performs and is suited for realtime games (I could be wrong, I've walked through a huge RDBMS vs NoSQL flame war to get here and probably am burned). Basically, I would like to use MongoDB for all of my game object data.&#xD;&#xA;&#xD;&#xA;It's a bit of a false argument, because *neither* system is fast enough to use as the main store for a fast-paced realtime game - you really need to keep and manipulate the values in memory. So you only hit the database when you absolutely have to, which might just be to save the whole character every so often (eg. once a minute), at which point the speed differences become negligible.&#xD;&#xA;&#xD;&#xA;The funny thing is, if you tweak MongoDB for top speed, you can just about get it to a point where it would be fast enough for you to perform synchronous writes from within a reasonably fast-paced game, but this would be at the cost of data integrity because the writes are buffered. This means you lose that data in the event of a crash, so there was little point performing the write at all, and it's *still* slower than if you just performed the edit in memory and saved it later, so you get the worst of both worlds.&#xD;&#xA;&#xD;&#xA;&gt; The only reason I currently intend on using MongoDB for all of my game object data is because of how often this game object data will be accessed (such as whenever a player is killed, picks up an item, fires a gun, etc.)&#xD;&#xA;&#xD;&#xA;Ask yourself why you need to write to the database when a player fires a gun. Why can't that just be handled in-memory on the game server? If your game crashes, and later restarts, and the player finds out they have 3 bullets more than they expected to have, is that a critical business problem?&#xD;&#xA;&#xD;&#xA;&gt; I also like the straight forward schema-free documents (which make it easier to map game object data).&#xD;&#xA;&#xD;&#xA;This is a much better reason to choose a NOSQL approach than the performance issue. &#xD;&#xA;&#xD;&#xA;&gt; I intend on using the same MongoDB in my website, to display player profile information (I'm not concerned with complete consistency, some delay from in-game updates is fine).&#xD;&#xA;&#xD;&#xA;That's fine, and sensible. Later on you might want to use a separate instance, so that web reads aren't contesting with game reads and writes, but that problem is a trivial one to solve compared to the problem of getting popular enough for this to be a problem.&#xD;&#xA;&#xD;&#xA;Personally I would just pick one of the two databases, based on which one would be less work for me, and standardise on that - but there's no reason you can't keep with two if you like." />
  <row Id="37667" PostHistoryTypeId="2" PostId="16356" RevisionGUID="05e8d28d-2490-4dd0-aa08-f05a3d92f842" CreationDate="2011-08-24T11:53:34.880" UserId="9318" Text="Ok, so i have created my first &quot;game&quot; and it uses a lot of java's collections. for example, i have a bunch of monsters in a HashSet which sometimes gives me the fabled java.util.ConcurrentModificationException when i try to modify the HashSet.&#xD;&#xA;&#xD;&#xA;Basically im getting these exceptions when im within a for loop and then some other part of the system find it suitable to add or remove an element to/from the collection.&#xD;&#xA;&#xD;&#xA;My options as far as i know is:&#xD;&#xA;&#xD;&#xA;&gt; 1) Use a Thread Safe collection or use Collections.asSynchronizedCollection().&#xD;&#xA;&#xD;&#xA;&gt; 2) Only work on copies of the collection when looping through it.&#xD;&#xA;&#xD;&#xA;My question thus becomes. Is there any other methods more widely deployed solutions in the gamedevelopment world that handle's these issues?&#xD;&#xA;&#xD;&#xA;As an example, i thought ive read somewhere that queues are more heavily used instead of collections and that work is done on input and output queues. &lt;-- any elaboration on this would also be appreciated!&#xD;&#xA;&#xD;&#xA;Thanks for your time!" />
  <row Id="37668" PostHistoryTypeId="1" PostId="16356" RevisionGUID="05e8d28d-2490-4dd0-aa08-f05a3d92f842" CreationDate="2011-08-24T11:53:34.880" UserId="9318" Text="Java collections and managing simultaneous operations / concurrency (java.util.ConcurrentModificationException)" />
  <row Id="37669" PostHistoryTypeId="3" PostId="16356" RevisionGUID="05e8d28d-2490-4dd0-aa08-f05a3d92f842" CreationDate="2011-08-24T11:53:34.880" UserId="9318" Text="&lt;java&gt;&lt;design-patterns&gt;" />
  <row Id="37670" PostHistoryTypeId="2" PostId="16357" RevisionGUID="80b37aff-393f-4ca8-9359-2eb4d06a7263" CreationDate="2011-08-24T12:24:55.343" UserId="674" Text="There is a few concepts that might help you in Java:&#xD;&#xA;&#xD;&#xA; 1. **Synchronized methods.** A method can be made synchronous by adding the `synchronized` statement to its definition. This has two effects: it is not possible that two calls on the same method of the same object instance to interleave anymore, and it guarantees that any further call will benefit of the changes made during the previous call.&lt;br/&gt;&lt;br/&gt;More on that here: [Synchronized Methods][1]&#xD;&#xA;&#xD;&#xA; 2. **Synchronized statements.** A statement block that makes a particular object synchronous. Could be useful in your case, by synchronizing your `HashMap`.&lt;br/&gt;&lt;br/&gt;More on that here: [Intrinsic Locks and Synchronization][2]&#xD;&#xA;&#xD;&#xA; 3. **Concurrent collections.** The `java.util.concurrent` package defines collections with atomic operations (i.e. operations that are guaranteed to be executed fully before giving time to another thread). That might help you avoiding the need of synchronization.&lt;br/&gt;&lt;br/&gt;More on that here: [Concurrent Collections][3]&#xD;&#xA;&#xD;&#xA; 4. **There's more.** There is a lot of tools to help you dealing with concurrency issues in Java. Specialized thread wrappers like Executors, Lock objects, Atomic variables, a thread-safe PRNG, and more. All of those are described in the Java lesson on Concurrency.&#xD;&#xA;&#xD;&#xA;In general, the Java lesson on concurrency cover all you need to know about threading and synchronization. It can be found [here][4]. It is a must-read to start dealing efficiently with this difficult problem. You'll also understand more deeply what are the issues that can come with synchronization, like [deadlocks][5] and [starvation][6], as well as to avoid it.&#xD;&#xA;&#xD;&#xA;I hope this helped!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://download.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html&#xD;&#xA;  [2]: http://download.oracle.com/javase/tutorial/essential/concurrency/locksync.html&#xD;&#xA;  [3]: http://download.oracle.com/javase/tutorial/essential/concurrency/collections.html&#xD;&#xA;  [4]: http://download.oracle.com/javase/tutorial/essential/concurrency/index.html&#xD;&#xA;  [5]: http://download.oracle.com/javase/tutorial/essential/concurrency/deadlock.html&#xD;&#xA;  [6]: http://download.oracle.com/javase/tutorial/essential/concurrency/starvelive.html" />
  <row Id="37671" PostHistoryTypeId="5" PostId="16301" RevisionGUID="10251ee0-5194-4874-95cd-aa37f40c7954" CreationDate="2011-08-24T12:28:21.123" UserId="9415" Comment="deleted 884 characters in body" Text="Many of the sprite sheets online have non-uniform sized rectangles as the animation frames and often use a portion of the image for credits, etc., this makes it hard for a game engine to correctly clip the sheets.  &#xD;&#xA;&#xD;&#xA;Is there any tool that can help you quickly define frames in a sheet, export animation data which the game engine would use? " />
  <row Id="37672" PostHistoryTypeId="2" PostId="16358" RevisionGUID="0f690ca0-41a3-47f5-8524-6659af2cf49f" CreationDate="2011-08-24T12:28:33.383" UserId="5908" Text="I'm programming a Side-Scroller, and i've reached the point where i should program the enemy behaviour. I don't know what should i choose between hard-coding the enemy ships behaviour or using a scripting language.&#xD;&#xA;&#xD;&#xA;Going with the hardcode way, all different kind of enemies would be different classes derived from an abstract `EnemyShip` class with a virtual function redefined for each of them, going with the scripting instead i could do just a base class and a script manager which moves the ships as needed.&#xD;&#xA;&#xD;&#xA;What should i do?&#xD;&#xA;" />
  <row Id="37673" PostHistoryTypeId="1" PostId="16358" RevisionGUID="0f690ca0-41a3-47f5-8524-6659af2cf49f" CreationDate="2011-08-24T12:28:33.383" UserId="5908" Text="3D Side-Scrolling Shooter: to use or not to use LUA scripting?" />
  <row Id="37674" PostHistoryTypeId="3" PostId="16358" RevisionGUID="0f690ca0-41a3-47f5-8524-6659af2cf49f" CreationDate="2011-08-24T12:28:33.383" UserId="5908" Text="&lt;ai&gt;&lt;scripting&gt;&lt;side-scroller&gt;" />
  <row Id="37675" PostHistoryTypeId="2" PostId="16359" RevisionGUID="66a582da-da4c-40d9-862f-e3d933227a5a" CreationDate="2011-08-24T12:29:36.083" UserId="9415" Text="*[Moved from question body]* Here's a list of what I've found by googling:&#xD;&#xA;&#xD;&#xA; - **Sprite Vortex** ([http://spritevortex.codeplex.com/][1]): It can auto-detect frames. There has been some crashes and is still buggy, otherwise it's a very good option. When you are exporting, make sure you click the root item instead of individual animation in the tree view to export all animation definitions. &#xD;&#xA;&#xD;&#xA; - **darkFunction Editor** ([http://darkfunction.com/][2]): By double-clicking a sprite, it will automatically make a frame. Still some manual work but works great so far.&#xD;&#xA;&#xD;&#xA; - **Spritimator** ([http://www.google.com/search?q=spritimator&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t][3]): Saw this used by a tutorial, but the author's webpage seems down at the moment. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://spritevortex.codeplex.com/&#xD;&#xA;  [2]: http://darkfunction.com/&#xD;&#xA;  [3]: http://www.google.com/search?q=spritimator&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t" />
  <row Id="37676" PostHistoryTypeId="25" PostId="16356" RevisionGUID="b3724a08-d9bc-485b-b1d4-2082bbabbe03" CreationDate="2011-08-24T12:37:46.663" Comment="http://twitter.com/#!/StackGameDev/status/106344447222104064" />
  <row Id="37677" PostHistoryTypeId="2" PostId="16360" RevisionGUID="f015c187-15fd-4d36-92fa-109555fd202d" CreationDate="2011-08-24T12:41:08.100" UserId="5125" Text="If you want a lot of different behaviours, go with LUA.&#xD;&#xA;&#xD;&#xA;If your behaviours can be determined by some boolean (Aggressive, follows target, ... ...) go without.&#xD;&#xA;&#xD;&#xA;Between the two I'd go without also (say 16 enemies and 4 bosses for example I'd hardcode all that).&#xD;&#xA;&#xD;&#xA;My two cents are that scripting is usually for scripters, not for coders so if you feel comportable with the language used, stick to that language, if you don't (and maybe you will want to add enemies months and months after the developpement was finished) you might want to go with a scripting language as it is defenitely more secure than breaking up old code..." />
  <row Id="37678" PostHistoryTypeId="2" PostId="16361" RevisionGUID="20707455-9cb5-4dd9-84f9-ba0f909a2545" CreationDate="2011-08-24T12:41:18.303" UserId="9456" Text="this could help you:&#xD;&#xA;&#xD;&#xA;https://github.com/Gornova/EscapeIn60Seconds&#xD;&#xA;&#xD;&#xA;I've doing that for LD21, here the game itself: &#xD;&#xA;&#xD;&#xA;http://www.kongregate.com/games/Gornova81/escape-in-60-seconds" />
  <row Id="37679" PostHistoryTypeId="5" PostId="16360" RevisionGUID="3d883f35-ee39-40b3-b17c-4da5e80058dc" CreationDate="2011-08-24T12:47:37.110" UserId="5125" Comment="edited body" Text="If you want a lot of different behaviours, go with LUA.&#xD;&#xA;&#xD;&#xA;If your behaviours can be determined by some boolean (Aggressive, follows target, ... ...) go without.&#xD;&#xA;&#xD;&#xA;Between the two I'd go without also (say 16 enemies and 4 bosses for example I'd hardcode all that).&#xD;&#xA;&#xD;&#xA;My two cents are that scripting is usually for scripters, not for coders so if you feel comfortable with the language used, stick to that language, if you don't (and maybe you will want to add enemies months and months after the developpement was finished) you might want to go with a scripting language as it is defenitely more secure than breaking up old code..." />
  <row Id="37680" PostHistoryTypeId="2" PostId="16362" RevisionGUID="87dda61d-9e12-4f12-9311-3ae02788737f" CreationDate="2011-08-24T13:06:26.553" UserId="5275" Text="I'm looking for a good beginners book on the subject. Something that focuses on 2D games would be preferableable." />
  <row Id="37681" PostHistoryTypeId="1" PostId="16362" RevisionGUID="87dda61d-9e12-4f12-9311-3ae02788737f" CreationDate="2011-08-24T13:06:26.553" UserId="5275" Text="Games Development book on physics" />
  <row Id="37682" PostHistoryTypeId="3" PostId="16362" RevisionGUID="87dda61d-9e12-4f12-9311-3ae02788737f" CreationDate="2011-08-24T13:06:26.553" UserId="5275" Text="&lt;physics&gt;" />
  <row Id="37683" PostHistoryTypeId="2" PostId="16363" RevisionGUID="6452b303-2242-449f-a288-911b78945731" CreationDate="2011-08-24T13:11:45.953" UserId="2897" Text="The root of your trouble lies in the necessity to add or remove elements while iterating over collection. You should keep these things to a minimum, but sometimes it just can't be avoided. &#xD;&#xA;&#xD;&#xA;Working on copies is often not an option due to performance reasons; and usage of concurrency for removal of the elements in the collection being iterated will work like killing a horse while riding it.&#xD;&#xA;&#xD;&#xA;So there are two another options: &#xD;&#xA;&#xD;&#xA; 1. The most usable option: add a queue of objects to add|remove, and process them out of your loop.&#xD;&#xA; 2. If you only need to remove a current object of an iteration phase, it is possible to use an indexed collection with a for loop, and then remove current element while adjusting loop counter. Or just loop backwards.&#xD;&#xA;&#xD;&#xA;Just for clarity, example for the first approach:&#xD;&#xA;&#xD;&#xA;    while ((objectToRemove = objectsToRemove.Pop()) != null)&#xD;&#xA;    {&#xD;&#xA;        allGameObjects.Remove(objectToRemove);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    foreach(var gameObject in allGameObjects)&#xD;&#xA;    {&#xD;&#xA;       // process your objects here as always, but if you need to&#xD;&#xA;       // add or remove an object, push it to the appropriate queue. &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And example for the second approach:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; allGameObjects.Count; i++)&#xD;&#xA;    {                &#xD;&#xA;       // to remove an object, do something like&#xD;&#xA;       allGameObjects.RemoveAt(i--);&#xD;&#xA;    }" />
  <row Id="37684" PostHistoryTypeId="5" PostId="16363" RevisionGUID="53d0e9df-73f0-46fe-b663-a9a1cdc64d3b" CreationDate="2011-08-24T13:20:17.987" UserId="2897" Comment="added 1 characters in body" Text="The root of your trouble lies in the necessity to add or remove elements while iterating over collection. You should keep these things to a minimum, but sometimes it just can't be avoided. &#xD;&#xA;&#xD;&#xA;Working on copies is often not an option due to performance reasons; and usage of concurrency for removal of the elements in the collection being iterated, will work like killing a horse while riding it.&#xD;&#xA;&#xD;&#xA;So there are two another options: &#xD;&#xA;&#xD;&#xA; 1. The most usable option: add a queue of objects to add|remove, and process them out of your loop.&#xD;&#xA; 2. If you only need to remove a current object of an iteration phase, it is possible to use an indexed collection with a for loop, and then remove current element while adjusting loop counter. Or just loop backwards.&#xD;&#xA;&#xD;&#xA;Just for clarity, example for the first approach:&#xD;&#xA;&#xD;&#xA;    while ((objectToRemove = objectsToRemove.Pop()) != null)&#xD;&#xA;    {&#xD;&#xA;        allGameObjects.Remove(objectToRemove);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    foreach(var gameObject in allGameObjects)&#xD;&#xA;    {&#xD;&#xA;       // process your objects here as always, but if you need to&#xD;&#xA;       // add or remove an object, push it to the appropriate queue. &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And example for the second approach:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; allGameObjects.Count; i++)&#xD;&#xA;    {                &#xD;&#xA;       // to remove an object, do something like&#xD;&#xA;       allGameObjects.RemoveAt(i--);&#xD;&#xA;    }" />
  <row Id="37685" PostHistoryTypeId="2" PostId="16364" RevisionGUID="1aedd7e2-628b-40fc-bb7a-73332c8e1dc5" CreationDate="2011-08-24T13:24:15.650" UserId="9458" Text="Andrew,&#xD;&#xA;&#xD;&#xA;Having sold similar technology to Bioware a few years ago, I thought I would chime in.&#xD;&#xA;&#xD;&#xA;You may want to join our beta program and have a look at our database. Here at NuoDB we are developing the next generation relational database for the cloud.  Here is a brief description of the problems we solve:  &#xD;&#xA;&#xD;&#xA;1) How to scale a SQL database elastically on a large number of machines.&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;2) How to manage a large number of databases on a large number of machines running on the cloud &#xD;&#xA; &#xD;&#xA;Specifically, under the direction of our founder Jim Starkey (http://en.wikipedia.org/wiki/Jim_Starkey), we have revolutionized traditional relational database technology using our proprietary code base to offer the following benefits:&#xD;&#xA; &#xD;&#xA;* A fully scalable transactional distributed SQL database specifically designed for the cloud&#xD;&#xA; &#xD;&#xA;* Full support for ACID transactions using multi version concurrency control.&#xD;&#xA; &#xD;&#xA;* Efficiently manage a large number of databases running on a large number nodes.&#xD;&#xA; &#xD;&#xA;* Elastic scale-out/Scale-in on heterogeneous networks of commodity shared-nothing machines&#xD;&#xA; &#xD;&#xA;* Near zero administration costs for your DBA's&#xD;&#xA; &#xD;&#xA;As we are currently accepting applications to our Early Adopters Beta program,  I was wondering if we could have a more detailed discussion of your possible interest.&#xD;&#xA;&#xD;&#xA;Please contact me directly for more information or to request a presentation.&#xD;&#xA; &#xD;&#xA;Regards,&#xD;&#xA;&#xD;&#xA;Mark&#xD;&#xA;&#xD;&#xA;mlenkei@nuodb.com" />
  <row Id="37686" PostHistoryTypeId="2" PostId="16365" RevisionGUID="77877146-0d9c-41e8-a621-3aa88c96dc14" CreationDate="2011-08-24T13:31:33.860" UserId="8578" Text="[http://www.amazon.com/Mathematics-Physics-Programmers-Charles-Development/dp/1584503300][1]&#xD;&#xA;The Game Development program at my college uses this book for the first year of math/physics.  There are a great deal of books on the subject, but this one is quite good IMHO.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Mathematics-Physics-Programmers-Charles-Development/dp/1584503300" />
  <row Id="37687" PostHistoryTypeId="2" PostId="16366" RevisionGUID="4681cc2d-5766-4994-be54-89bc7601e7ac" CreationDate="2011-08-24T13:33:57.400" UserId="2287" Text="I am going to make a recommendation based on what I have read and how I started. Now I am assuming that when you say _beginner_ you mean a _beginner_ in physics engines and not programming. I won't write details as you can get that from the Amazon reviews.&#xD;&#xA;&#xD;&#xA;[Game Physics Engine Development][1]&#xD;&#xA;&#xD;&#xA;This book was a very good introductory book for me. Although like every book, it has shortcomings (some code does not work as expected but that's fine, forces you to think even more!)&#xD;&#xA;&#xD;&#xA;[Real-Time Collision Detection][2]&#xD;&#xA;&#xD;&#xA;Absolutely wonderful book/reference but a little more advanced. You can start with this book if you like. It depends on what your _beginner_ level really is.&#xD;&#xA;&#xD;&#xA;[Game Physics][3]&#xD;&#xA;&#xD;&#xA;This is not for beginners, but it is something to keep in mind. All of Eberly's book's are math heavy but once you understand the full subject, his books, in my opinion become indispensable simply because there are a rare few people knowledgeable enough to delve into that much detail.&#xD;&#xA;&#xD;&#xA;It is not going to be an easy ride. Physics is one of the tougher topics in game development. Good luck!&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Game-Physics-Engine-Development-Second/dp/0123819768/ref=sr_1_4?ie=UTF8&amp;qid=1314192307&amp;sr=8-4&#xD;&#xA;  [2]: http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/ref=sr_1_8?ie=UTF8&amp;qid=1314192307&amp;sr=8-8&#xD;&#xA;  [3]: http://www.amazon.com/Game-Physics-Second-David-Eberly/dp/0123749034/ref=sr_1_1?ie=UTF8&amp;qid=1314192307&amp;sr=8-1" />
  <row Id="37688" PostHistoryTypeId="2" PostId="16367" RevisionGUID="d6230ade-5d5a-4747-95b7-b46548106a53" CreationDate="2011-08-24T13:44:31.353" UserId="1636" Text="Okay, so I found a couple books all with more that 2d physics but, the physics of 2d as well so I don't think it would hurt anything to have more than you need to just in case. &#xD;&#xA;&#xD;&#xA;[Physics for Game Programmers][1](java examples)&#xD;&#xA;which looks to be the best balance of the bunch. amounts to something like physics 101 and has java code examples&#xD;&#xA;&#xD;&#xA;[Game Physics][2] (c++ examples)&#xD;&#xA;This seems to be even more geared towards some hardcore 3d development than anything else and uses OpenGL (bonus)&#xD;&#xA;&#xD;&#xA;[Physics for Game Developers][3] (c++ windows api)&#xD;&#xA;This book while apparently a bit more easily accessible is the most error prone of the bunch. But its like $5 so with that in mind I don't think you would be too much of a bad investment. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.amazon.com/Physics-Game-Programmers-Grant-Palmer/dp/159059472X&#xD;&#xA;  [2]: http://www.amazon.com/Physics-Morgan-Kaufmann-Interactive-Technology/dp/product-description/1558607404&#xD;&#xA;  [3]: http://www.amazon.com/Physics-Game-Developers-David-Bourg/dp/0596000065" />
  <row Id="37689" PostHistoryTypeId="4" PostId="5260" RevisionGUID="9b61ccc1-15db-427c-a227-697ffd5e65f6" CreationDate="2011-08-24T14:15:11.297" UserId="7630" Comment="title edited to the form of a question, to fit with Meta SO's discussions on quality" Text="What are the implications of not owning the IP of a character graphic in my game?" />
  <row Id="37690" PostHistoryTypeId="24" PostId="5260" RevisionGUID="9b61ccc1-15db-427c-a227-697ffd5e65f6" CreationDate="2011-08-24T14:15:11.297" Comment="Proposed by 7630 approved by 51 edit id of 668" />
  <row Id="37691" PostHistoryTypeId="4" PostId="10212" RevisionGUID="4fc55eed-d50f-4972-ba9f-5d6b72883d24" CreationDate="2011-08-24T14:15:18.753" UserId="7630" Comment="title edited to the form of a question, to fit with Meta SO's discussions on quality" Text="Can I get around a Pokemon copyright with new art and minor changes?" />
  <row Id="37692" PostHistoryTypeId="24" PostId="10212" RevisionGUID="4fc55eed-d50f-4972-ba9f-5d6b72883d24" CreationDate="2011-08-24T14:15:18.753" Comment="Proposed by 7630 approved by 51 edit id of 669" />
  <row Id="37693" PostHistoryTypeId="5" PostId="11370" RevisionGUID="286ea105-48c6-40f1-b468-613cac2a2b90" CreationDate="2011-08-24T14:15:38.097" UserId="7630" Comment="grammar, changed title into a proper question" Text="The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game.&#xD;&#xA;&#xD;&#xA;When I attempted doing this method with my GLM(model loading library by nate robins) model, I get a segmentation fault in the debug, so I figured that it doesnt like the coordinate variables of the model.&#xD;&#xA;&#xD;&#xA;If i use blender to export my model as a collision file, what type of file should I use?&#xD;&#xA;&#xD;&#xA;I have heard of a .bullet exporter, but i dont know hot to integrate this python script into my Blender 2.5 program." />
  <row Id="37694" PostHistoryTypeId="4" PostId="11370" RevisionGUID="286ea105-48c6-40f1-b468-613cac2a2b90" CreationDate="2011-08-24T14:15:38.097" UserId="7630" Comment="grammar, changed title into a proper question" Text="How can I get my meshes to work with Bullet Physics?" />
  <row Id="37695" PostHistoryTypeId="24" PostId="11370" RevisionGUID="286ea105-48c6-40f1-b468-613cac2a2b90" CreationDate="2011-08-24T14:15:38.097" Comment="Proposed by 7630 approved by 51 edit id of 670" />
  <row Id="37696" PostHistoryTypeId="2" PostId="16368" RevisionGUID="5d940600-5354-4545-ab80-e1348b59030e" CreationDate="2011-08-24T14:24:24.600" UserId="118" Text="I'd go LUA every time. The fact is, even if you aren't a scripter, it's simply easier to change a text file and run the game (especially if you can do this runtime) than changing something and waiting to compile.&#xD;&#xA;&#xD;&#xA;And then you get the added bonus of learning LUA, making it easy for people to mod, etc. etc. etc.&#xD;&#xA;&#xD;&#xA;There are more articles on how to do this than you can ever read, so, just go with LUA, you only win ;)&#xD;&#xA;&#xD;&#xA;P.S. When I say LUA I mean any scripting language. LUA is just the de-facto industry standard." />
  <row Id="37697" PostHistoryTypeId="5" PostId="16362" RevisionGUID="407d282c-bf03-4fca-bbe9-87ab8dd14d40" CreationDate="2011-08-24T14:49:57.833" UserId="953" Comment="Fixed grammar, made title a question" Text="I'm looking for a good beginners' book on the subject of physics in game development. Something that focuses on 2D games would be preferable." />
  <row Id="37698" PostHistoryTypeId="4" PostId="16362" RevisionGUID="407d282c-bf03-4fca-bbe9-87ab8dd14d40" CreationDate="2011-08-24T14:49:57.833" UserId="953" Comment="Fixed grammar, made title a question" Text="What is a good book on physics for game development?" />
  <row Id="37699" PostHistoryTypeId="2" PostId="16369" RevisionGUID="20e84105-6a5e-4dd6-acde-01c9070592ca" CreationDate="2011-08-24T14:53:49.690" UserId="1868" Text="I think you need to combine two methods here. First check the bounding boxes of the platforms and the balloon. If the bounding boxes overlap, you have to do more accurate checking.&#xD;&#xA;&#xD;&#xA;For the second step you have at least two options. You can check the bitmap of the ship (ctx.getImageData etc) against the platform. I guess here you could use the alpha value of each pixel. This is probably better option if you have organic looking levels/platforms.&#xD;&#xA;&#xD;&#xA;Other option for the second step is to define simple geometric shapes representing the balloon and level. A circle for top, a triangle for ropes and a box for the basket and level. There are several tutorials online how to check collision between these basic shapes." />
  <row Id="37700" PostHistoryTypeId="2" PostId="16370" RevisionGUID="aaeefbae-0a33-4ea1-99fa-71c2d5a068f2" CreationDate="2011-08-24T15:17:41.367" UserId="8781" Text="**[Games By Design][1]** - Christopher Park (Arcen Games)&#xD;&#xA;&#xD;&#xA;Most of the content is related to the development of his games, AI War and A Valley Without Wind, but there is some general game design commentary also. He has a fascinating series of articles where he discusses the design behind the unique AI of AI War, which even if you haven't played the game is a good read for anyone interested in AI.&#xD;&#xA;&#xD;&#xA;  [1]: http://christophermpark.blogspot.com/" />
  <row Id="37701" PostHistoryTypeId="16" PostId="16370" RevisionGUID="119848ac-49fb-4130-80f8-00c00185ed4c" CreationDate="2011-08-24T15:17:41.367" UserId="8781" />
  <row Id="37702" PostHistoryTypeId="5" PostId="15774" RevisionGUID="0fc78a7f-631b-4340-bee2-fc4c97a34966" CreationDate="2011-08-24T15:19:36.420" UserId="5125" Comment="added 933 characters in body" Text="When I did mobile games we first developed a 'gold' version (ie. a fully functionnal game) and then we split it up in 3 major versions (big screen, middle sized and small screen).&#xD;&#xA;These ones was further converted into 11 versions: demanding graphics (read takes much memory / cpu) vs low profile etc. (there were a couple 'special platform versions too).&#xD;&#xA;&#xD;&#xA;The biggest problem was (that was my job among others) to isolate the platforms needed and determine those versions and how to create them (ie. big-screen but Low profile should be a downgraded version of big screen / hi profile or should it be middle sized screen / lo profile made big screen?).&#xD;&#xA;&#xD;&#xA;Of course we coded with this in mind so games were very loosely attached to the screen size.&#xD;&#xA;&#xD;&#xA;HTH&#xD;&#xA;&#xD;&#xA;[edit] What I meant was that you need to split up your target platforms in different qualities (ie. 1 core, 2 cores, 1 core but twice as fast ...)&#xD;&#xA;Then decide how many virtual targets you want (for example &quot;only one&quot; or &quot;Low, Mid, Hi&quot;)&#xD;&#xA;Then place all platforms in their respective 'quality' and for Each quality, take the lowest denominator and 'port' the code so it complies with those requirements (ie. works and is fast enough).&#xD;&#xA;&#xD;&#xA;It might seem that you must do this with quite much guesswork but you can already find the worst quality with the worst platform.&#xD;&#xA;I'd choose every next quality at least &quot;twice as good&quot; as the former, this would probably not generate more than say 3-4 &quot;qualities&quot;.&#xD;&#xA;If the code is ported from a gold version, any platform not performing good enough could just be retrograded to a lower 'quality' to make it speed up.&#xD;&#xA;Any new platform could also quite easily be placed in the right quality." />
  <row Id="37703" PostHistoryTypeId="2" PostId="16371" RevisionGUID="31c79f30-b87a-4db6-8bc8-68b26e61c82f" CreationDate="2011-08-24T15:23:25.353" UserId="8578" Text="Overview&#xD;&#xA;--------&#xD;&#xA;&#xD;&#xA;The game is a multiplayer simple real time strategy housed in a Flash application.  Players run the Flash client, and are connected to a server written in another language (the language is irrelevant).  Players compete against one another in games of 2~8 players.&#xD;&#xA;&#xD;&#xA;My aim is create some way for people to create an AI agent to play in the same realm against human players, or other AI agents.  Akin to the Broodwar AI competitions, but in a much simpler game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;The current model&#xD;&#xA;-----------------&#xD;&#xA;&#xD;&#xA; has players logging in to the lobby. Games seeking players are listed in the lobby.  Once the game acquires the amount of players required to start (defined by the host at game room creation time), the players are then pushed into a game, and leave the lobby.  Games then run through to completion; players who disconnect are left stagnant until destroyed or they login again and are reconnected to the game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;In a perfect world&#xD;&#xA;------------------&#xD;&#xA;&#xD;&#xA;the flash client (Using an MVC type model) would be able to interface in some way with the users AI agent, handing data to the agent, and receiving commands from the agent.  In this way the user could observe the game in the flash client while in play, as well as choose games for the agent to participate in.  This model would be ideal for debugging purposes, as to not interrupt play on crash, and since commands can only be sent (with malformed commands being ignored, with an error callback) users could pick out major bugs quickly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;However&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;flash is a prissy little nitwit when it comes to communicating client side to client side.  The only _realistic_ options I can see would be to create a second client interface in another language (say .Net) that would be used to interface the AI agent, the player would then login to the flash client and enter games/observe in the above mentioned manner.  OR the flash client would create a second socket pointed at the local host.  A suitable API would be created to manage the communication protocol (as a DLL or similair) that would handle all data values of the game, and sending commands.  This API would be extended by the users AI agent, and the player would login to the flash client and join/observe games.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;The Big Question:&#xD;&#xA;-----------------&#xD;&#xA;From experience or observations, what would be the most suitable model for this type of a system?  I have no qualms with either, but due to the long timeframe of implementing each system (I work alone) I'd rather start off on the right path, and end up with an easy to use model.  Any suggestions at all are very welcome!&#xD;&#xA;" />
  <row Id="37704" PostHistoryTypeId="1" PostId="16371" RevisionGUID="31c79f30-b87a-4db6-8bc8-68b26e61c82f" CreationDate="2011-08-24T15:23:25.353" UserId="8578" Text="Connecting an AI Agent to a Flash Game" />
  <row Id="37705" PostHistoryTypeId="3" PostId="16371" RevisionGUID="31c79f30-b87a-4db6-8bc8-68b26e61c82f" CreationDate="2011-08-24T15:23:25.353" UserId="8578" Text="&lt;flash&gt;&lt;ai&gt;&lt;network&gt;&lt;api&gt;&lt;socket&gt;" />
  <row Id="37706" PostHistoryTypeId="25" PostId="571" RevisionGUID="b7c75a7e-7424-4cb4-b39c-b774b19dba49" CreationDate="2011-08-24T15:37:47.187" Comment="http://twitter.com/#!/StackGameDev/status/106389747525615616" />
  <row Id="37707" PostHistoryTypeId="2" PostId="16372" RevisionGUID="e10b64d0-a284-4d58-8c5b-42be0ad9aef3" CreationDate="2011-08-24T15:40:05.513" UserId="953" Text="Others have addressed the legal issues: copyrights cover code and artwork, not concepts; trademarks cover things like the Pokemon names; and patents can probably cover game mechanics, but that's unlikely to get you in trouble.&#xD;&#xA;&#xD;&#xA;The issue I'm concerned with is the ethical one. This would be plagiarism. Ask yourself why you want to do this. Is it to learn to develop games? Then you should probably start with a smaller concept. Is it to make money? Then you are exploiting the creative work of Game Freak, essentially stealing their concepts for your own gain. Is it to demonstrate your own skills? Then you should do something original that will earn more recognition, instead of having people see you as a copier. Is it because you enjoy Pokemon and want to make a fun game? Recognize that your Pokemon clone will probably be much poorer than Pokemon, and that you've got a much better chance of success with an original idea.&#xD;&#xA;&#xD;&#xA;In a comment, you ask &quot;What's wrong&quot; with cloning a complex game. It's unethical, and the reason you're asking about copyright is that you recognize that fact. If it's for personal education, go ahead, but there's little point in releasing such a thing." />
  <row Id="37708" PostHistoryTypeId="16" PostId="16362" RevisionGUID="462ec583-d5c3-4f54-a6af-e5ab26c62485" CreationDate="2011-08-24T15:48:10.850" UserId="51" />
  <row Id="37709" PostHistoryTypeId="16" PostId="16365" RevisionGUID="9267fd1a-62f8-485a-82b8-a97705d64f53" CreationDate="2011-08-24T15:48:10.850" UserId="51" />
  <row Id="37710" PostHistoryTypeId="16" PostId="16366" RevisionGUID="ff84ea66-9e69-4ef9-8b4c-ba30c2aaa4ca" CreationDate="2011-08-24T15:48:10.850" UserId="51" />
  <row Id="37711" PostHistoryTypeId="16" PostId="16367" RevisionGUID="602ae10b-19d6-4aac-a66d-23b8a8a6b46d" CreationDate="2011-08-24T15:48:10.850" UserId="51" />
  <row Id="37712" PostHistoryTypeId="6" PostId="16362" RevisionGUID="f1ddae20-df04-4388-bfcc-a11339a6e11b" CreationDate="2011-08-24T15:48:20.460" UserId="51" Comment="edited tags" Text="&lt;physics&gt;&lt;books&gt;" />
  <row Id="37713" PostHistoryTypeId="16" PostId="16349" RevisionGUID="94e032fc-3f64-4425-aa7c-43cd16066876" CreationDate="2011-08-24T16:18:29.677" UserId="14" />
  <row Id="37714" PostHistoryTypeId="16" PostId="16350" RevisionGUID="709f9868-a287-437a-82e9-0a8bc05589a0" CreationDate="2011-08-24T16:18:29.677" UserId="14" />
  <row Id="37715" PostHistoryTypeId="16" PostId="16351" RevisionGUID="d39829a0-69a6-46c5-97b2-ebce907fb5be" CreationDate="2011-08-24T16:18:29.677" UserId="14" />
  <row Id="37716" PostHistoryTypeId="16" PostId="14650" RevisionGUID="482b808f-93b0-4271-9de8-6e78cf0e99a8" CreationDate="2011-08-24T16:18:53.670" UserId="14" />
  <row Id="37717" PostHistoryTypeId="16" PostId="14651" RevisionGUID="177b9b25-a8ef-4441-9a7f-b9682da5833f" CreationDate="2011-08-24T16:18:53.670" UserId="14" />
  <row Id="37718" PostHistoryTypeId="16" PostId="14700" RevisionGUID="8e33075b-f2fa-44c2-97cf-cb904ac42781" CreationDate="2011-08-24T16:18:53.670" UserId="14" />
  <row Id="37719" PostHistoryTypeId="16" PostId="16361" RevisionGUID="ab7508e4-cf71-4c54-97a6-879a7c8a4705" CreationDate="2011-08-24T16:18:53.670" UserId="14" />
  <row Id="37720" PostHistoryTypeId="2" PostId="16373" RevisionGUID="c912ea51-8197-4352-b4dd-b580183f7b87" CreationDate="2011-08-24T16:32:51.697" UserId="5497" Text="Just a thought: couldn't this question itself potentially be evidence in a copyright-related trial? If I represented Nintendo, I know I would present evidence that portrayed you as negatively as possible. Asking how much you can get away with seems inherently sketchy to me. It suggests you intend to ride Pokemon's design coattails for easy profit, which isn't a good idea." />
  <row Id="37721" PostHistoryTypeId="2" PostId="16374" RevisionGUID="88cb5e28-4b92-4540-8c5d-8d00275ba7ef" CreationDate="2011-08-24T18:15:57.490" UserId="3995" Text="if a Vertex looks like this:&#xD;&#xA;&#xD;&#xA;    struct vertex {&#xD;&#xA;        vec3 point;&#xD;&#xA;        vertex [] connected;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Can I tell if this makes a solid shape with no holes? (e.g a sphere or a cube, NOT a sphere with a side missing for example)" />
  <row Id="37722" PostHistoryTypeId="1" PostId="16374" RevisionGUID="88cb5e28-4b92-4540-8c5d-8d00275ba7ef" CreationDate="2011-08-24T18:15:57.490" UserId="3995" Text="Can i tell if a Vertex Tree is a solid shape?" />
  <row Id="37723" PostHistoryTypeId="3" PostId="16374" RevisionGUID="88cb5e28-4b92-4540-8c5d-8d00275ba7ef" CreationDate="2011-08-24T18:15:57.490" UserId="3995" Text="&lt;c++&gt;&lt;3d&gt;&lt;math&gt;&lt;3d-meshes&gt;" />
  <row Id="37724" PostHistoryTypeId="5" PostId="16374" RevisionGUID="9b80fcc9-1c65-453f-9e9d-07f19ee71120" CreationDate="2011-08-24T18:21:01.973" UserId="3995" Comment="added 84 characters in body" Text="if a Vertex looks like this:&#xD;&#xA;&#xD;&#xA;    struct vertex {&#xD;&#xA;        vec3 point;&#xD;&#xA;        vertex [] connected;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Can I tell if this makes a solid shape with no holes? (e.g a sphere or a cube, NOT a sphere with a side missing for example)&#xD;&#xA;&#xD;&#xA;(if i can see the back of a face from outside of the shape then it is not solid)" />
  <row Id="37725" PostHistoryTypeId="2" PostId="16375" RevisionGUID="1c6cd7e2-04c5-48c2-95cc-0fe92c7bb4ca" CreationDate="2011-08-24T18:26:27.173" UserId="20" Text="You could probably use [flash.net.LocalConnection](http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7c7e.html) for this. This would allow you to implement an API where other flash files can connect to and run commands locally.&#xD;&#xA;&#xD;&#xA;What this means is, that you'll have your game client (running in the browser) which exposes methods through `LocalConnection`. Somebody that implements an A.I. for your client could either run an Adobe AIR application, or another SWF file in the browser that connects to your `LocalConnection` and issues commands over it.&#xD;&#xA;&#xD;&#xA;This could get cumbersome with lots of exposed methods and requires really good documentation, so that somebody can work with your API.&#xD;&#xA;&#xD;&#xA;Another option would be to expose a RESTful web API, that any client can connect to. So the A.I. could be implemented in any language that can issue an HTTP-request." />
  <row Id="37726" PostHistoryTypeId="2" PostId="16376" RevisionGUID="c83bac0c-4736-473e-a09b-ed31fb914c81" CreationDate="2011-08-24T18:29:33.830" UserId="4894" Text="This is quite a tricky question. &#xD;&#xA;&#xD;&#xA;My idea to test if an object has no hole is to check all edges and make sure they all belong to 2 different triangles. If an edge only belong to one triangle, it means it's a border of the whole surface, meaning there's a hole. &#xD;&#xA;&#xD;&#xA;This could be harder if you have different vertex at the same position (for example to have different texture coordinates per face). " />
  <row Id="37727" PostHistoryTypeId="25" PostId="16362" RevisionGUID="5bf06b2b-4ebf-449c-add4-aa58a291cdce" CreationDate="2011-08-24T18:37:48.373" Comment="http://twitter.com/#!/StackGameDev/status/106435051629187073" />
  <row Id="37728" PostHistoryTypeId="2" PostId="16377" RevisionGUID="c0a5990b-7d04-484f-840b-b4fdb8b2090b" CreationDate="2011-08-24T19:45:07.787" UserId="9462" Text="I have developed a 2D engine which has a real lot of technology stuffed into it, but as I'm a programmer and a bad artist, I don't have any content to use for engine demos.&#xD;&#xA;&#xD;&#xA;For example, if I need a set of 2D images used for making a forest level (trees, leaves, various plants, ground, sky, all in the same style)...&#xD;&#xA;&#xD;&#xA;- Where should I start searching? I have tried hours of googling already but all I can find are usually pretty crappy, often even unrelated sprite sheets&#xD;&#xA;&#xD;&#xA;- How much money is usually paid for something like the above example (forest level art), and in general 2D art? I'm very unexperienced in the topic of game content art and fear that I could get scammed on pretty bad" />
  <row Id="37729" PostHistoryTypeId="1" PostId="16377" RevisionGUID="c0a5990b-7d04-484f-840b-b4fdb8b2090b" CreationDate="2011-08-24T19:45:07.787" UserId="9462" Text="Where and how to obtain/buy good-looking 2D art sets" />
  <row Id="37730" PostHistoryTypeId="3" PostId="16377" RevisionGUID="c0a5990b-7d04-484f-840b-b4fdb8b2090b" CreationDate="2011-08-24T19:45:07.787" UserId="9462" Text="&lt;2d&gt;&lt;graphics&gt;&lt;art&gt;" />
  <row Id="37731" PostHistoryTypeId="2" PostId="16378" RevisionGUID="91eb4ea8-0e1e-4e62-8823-d5ff94499f55" CreationDate="2011-08-24T19:52:35.590" UserId="587" Text="This article from Karnak Games is really helpful: http://karnakgames.com/wp/2011/01/how-to-outsource-art-for-your-game-using-freelancing-sites/" />
  <row Id="37732" PostHistoryTypeId="2" PostId="16379" RevisionGUID="f5627951-47c6-4042-83d0-edbe22f63e73" CreationDate="2011-08-24T19:56:27.353" UserId="5125" Text="I'm not saying this is the only solution but a google &quot;buy pixel art&quot; gives as second answer [devianart][1].&#xD;&#xA;Other links gives other sites where you can contact pixel artists and even sites where pixel artists search for work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://browse.deviantart.com/digitalart/pixelart/" />
  <row Id="37733" PostHistoryTypeId="2" PostId="16380" RevisionGUID="001cf68d-a401-49bc-ad6b-26ed04a8d4f0" CreationDate="2011-08-24T19:59:59.323" UserId="9366" Text="A good collection of completely free 2D and 3D art, all by the same artist with the same look and feel:&#xD;&#xA;&#xD;&#xA;http://www.reinerstilesets.de/" />
  <row Id="37734" PostHistoryTypeId="16" PostId="16380" RevisionGUID="1ab83f5e-073d-4875-9164-40d75641a255" CreationDate="2011-08-24T19:59:59.323" UserId="9366" />
  <row Id="37735" PostHistoryTypeId="2" PostId="16381" RevisionGUID="c5c4bec1-e11a-4a72-8f95-7643c64f567f" CreationDate="2011-08-24T20:01:21.600" UserId="9366" Text="A good collection of completely free 2D and 3D art, all by the same artist with the same look and feel:&#xD;&#xA;&#xD;&#xA;http://www.reinerstilesets.de/" />
  <row Id="37736" PostHistoryTypeId="2" PostId="16382" RevisionGUID="123e236d-8853-48e5-9333-6de0bc4df82e" CreationDate="2011-08-24T20:42:04.310" UserId="9463" Text="I'm working on a tool for character customization (e.g. starting from a base model, a player can control his fatness), so I'm looking for ideas, techniques or other regarding this topic.&#xD;&#xA;&#xD;&#xA;After some research I thought to this technique: starting from two models (one standard human and one fat human, both with the same data, like vertices and triangles), then creating a new model by storing data about the two original mesh (e.g. store vertex data of the second mesh as color data), and controlling their interpolation with a shader.&#xD;&#xA;&#xD;&#xA;What do you think about this idea? Suggestions?" />
  <row Id="37737" PostHistoryTypeId="1" PostId="16382" RevisionGUID="123e236d-8853-48e5-9333-6de0bc4df82e" CreationDate="2011-08-24T20:42:04.310" UserId="9463" Text="Character customization" />
  <row Id="37738" PostHistoryTypeId="3" PostId="16382" RevisionGUID="123e236d-8853-48e5-9333-6de0bc4df82e" CreationDate="2011-08-24T20:42:04.310" UserId="9463" Text="&lt;graphics-programming&gt;" />
  <row Id="37739" PostHistoryTypeId="2" PostId="16383" RevisionGUID="c236253c-b593-4b79-8b7b-3456221e49e5" CreationDate="2011-08-24T20:56:34.350" UserId="5473" Text="You might want to have a look at Elder Scrolls: Oblivion, in particular the character creation screen. They do a lot with modifiable anatomies there. Each race has its own anthropometric norms and ranges. [Anthropometrics][1] is the study of the particular measurements / proportions of individual physical characteristics (phenotypes) of individual human beings, comparatively speaking. It's a good place to start doing some research into exactly *what* varies between individuals.&#xD;&#xA;&#xD;&#xA;Your idea sounds good, although I think simply interpolating between just two meshes may not give you enough variation.&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Anthropometry" />
  <row Id="37740" PostHistoryTypeId="5" PostId="16377" RevisionGUID="74b81158-a89b-4ba5-a594-e8acc3a29dd0" CreationDate="2011-08-24T20:57:53.957" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Where can I find free sprites and images?](http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I have developed a 2D engine which has a real lot of technology stuffed into it, but as I'm a programmer and a bad artist, I don't have any content to use for engine demos.&#xD;&#xA;&#xD;&#xA;For example, if I need a set of 2D images used for making a forest level (trees, leaves, various plants, ground, sky, all in the same style)...&#xD;&#xA;&#xD;&#xA;- Where should I start searching? I have tried hours of googling already but all I can find are usually pretty crappy, often even unrelated sprite sheets&#xD;&#xA;&#xD;&#xA;- How much money is usually paid for something like the above example (forest level art), and in general 2D art? I'm very unexperienced in the topic of game content art and fear that I could get scammed on pretty bad" />
  <row Id="37741" PostHistoryTypeId="10" PostId="16377" RevisionGUID="7d2afcc8-96f2-4e45-be52-1c995737035b" CreationDate="2011-08-24T20:57:52.990" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37742" PostHistoryTypeId="4" PostId="16382" RevisionGUID="9a8f0094-95c4-4519-ba9d-f88fc3f69169" CreationDate="2011-08-24T21:00:11.003" UserId="51" Comment="title -&gt; question" Text="What techniques could I use to give players the ability to control certain features, e.g. fatness?" />
  <row Id="37743" PostHistoryTypeId="2" PostId="16384" RevisionGUID="fd3cd1d9-6e7e-44ec-b380-ccf26a53459e" CreationDate="2011-08-24T21:09:24.360" UserId="5020" Text="Option 1 is only relevant if the problem relates to threading, and the majority of ConcurrentModificationExceptions don't. Vigil gives some useful options; there's one which he hasn't mentioned, and that's to mark objects as deleted.&#xD;&#xA;&#xD;&#xA;In other words, you give the object a field isDeleted; you ignore deleted objects in calculations; and on one of your loops you use the `remove()` method of the `Iterator` when it returns a deleted object." />
  <row Id="37744" PostHistoryTypeId="25" PostId="16382" RevisionGUID="733e8c3d-8686-4516-b15f-817b8a653178" CreationDate="2011-08-24T21:37:48.960" Comment="http://twitter.com/#!/StackGameDev/status/106480350896734208" />
  <row Id="37745" PostHistoryTypeId="2" PostId="16385" RevisionGUID="5c1fe653-824f-49dc-8f5b-2dd33afec295" CreationDate="2011-08-24T21:40:57.207" UserId="9033" Text="I would create two models for every attribute you want morphed, much like your original idea of having a fat and skinny model.&#xD;&#xA;&#xD;&#xA;Using 'nose' as an example, have a 'nose' slider and you interpolate between the two nose meshes for your result.  This way you could have as many variations of modifiable attributes.&#xD;&#xA;&#xD;&#xA;Depending on your language, I would then dynamically create a final model by assembling the interpolated body pieces together.  You could then save this model if you want to use it between game plays, or it may be better / simpler to just save the various interpolation values and recreate the final model each time you load the game.&#xD;&#xA;&#xD;&#xA;Stitching together the final model may be difficult if the perimeter vertices of the two models aren't the exact same." />
  <row Id="37746" PostHistoryTypeId="5" PostId="16385" RevisionGUID="a3f187a3-5e4c-46cf-bdc8-833b398eaa5a" CreationDate="2011-08-24T21:47:41.633" UserId="9033" Comment="added 307 characters in body" Text="I would create two models for every attribute you want morphed, much like your original idea of having a fat and skinny model.&#xD;&#xA;&#xD;&#xA;Using 'nose' as an example, have a 'nose' slider and you interpolate between the two nose meshes for your result.  This way you could have many variations of modifiable attributes.&#xD;&#xA;&#xD;&#xA;Depending on your language, I would then dynamically create a final model by assembling the interpolated body pieces together.  You could then save this model if you want to use it between game plays, or it may be better / simpler to just save the various interpolation values and recreate the final model each time you load the game.&#xD;&#xA;&#xD;&#xA;Stitching together the final model may be difficult if the perimeter vertices of the two models aren't the exact same.&#xD;&#xA;&#xD;&#xA;[Edit] You may have to define reference vertices by name / id to know where to stitch the nose (for example).  If you have a head size attribute, the location of the nose will vary.  But if you knew nose vertice 'xxx' maps to head vertice 'yyy' you could shape the nose to fit the new head size exactly." />
  <row Id="37747" PostHistoryTypeId="2" PostId="16386" RevisionGUID="7be82157-61c3-4b5d-a6ce-b49b384f371b" CreationDate="2011-08-24T22:04:46.623" UserId="1101" Text="You talk about &quot;multithreading difficulties&quot; but what difficulties are you actually talking about? In a way you're citing a phantom problem which may not even exist. The real challenge is one you make for yourself - if you are absolutely determined to get every last drop of power out of a piece of hardware, that does involve using the hardware to best effect, but that also widens the gap between the most powerful machine and the least powerful. The implication of this is that if you have a game that really makes the most of a PS3 (for example), you can't really run it on a cheap cellphone anyway, so your problem is no longer &quot;how can I get 1 program to work across very different hardware&quot; but becomes &quot;how can I implement 1 game idea several different ways so that it works on differently powered hardware&quot;. The threading issue becomes less relevant then.&#xD;&#xA;&#xD;&#xA;&gt; While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different platforms (desktop / mobile).&#xD;&#xA;&#xD;&#xA;Easy development of games - sure. Optimal multithreading, no. But you don't *need* multithreading to make games. To make high performance ones, it certainly helps. But many great games run in a single thread.&#xD;&#xA;&#xD;&#xA;&gt; What is the best way to tackle developing in this way (given any cross-platform threading API) considering the following:&#xD;&#xA;&#xD;&#xA;&gt;  -  different numbers of cores&#xD;&#xA;&gt;  -  vastly different processing capabilities per core&#xD;&#xA;&gt;  -  A generally different systems architecture with eg. different latencies for cache, RAM , and I/O access&#xD;&#xA;&#xD;&#xA;Instead of trying to assign systems to threads, assign tasks to threads. Give each task the data it needs to run and farm the tasks off to whichever hardware is available. Hardware with more cores will complete the tasks more quickly and be able to render more rapidly. Decomposition of game features into discrete tasks is quite a complex matter and often not worth the effort unless you are very sure that you need the performance, so most won't even attempt it.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37748" PostHistoryTypeId="2" PostId="16387" RevisionGUID="223007aa-ee7f-400f-824e-341e92ec39f2" CreationDate="2011-08-24T22:12:51.907" UserId="9469" Text="I wrote a little 4 spatial dimension game, it's a 4d Snake. The rule are the same as the game for the old nokia cell phone, eat the food, don't cross yourself, don't go out of the borders.&#xD;&#xA;&#xD;&#xA;What do you think of the idea?&#xD;&#xA;How do I make a better graphic of the UI? do you have any suggestion?  &#xD;&#xA;like this actually seem a DOS game...&#xD;&#xA;&#xD;&#xA;Here is a little explanatory video:  &#xD;&#xA;http://www.youtube.com/watch?v=8IUnqm8j4BE  &#xD;&#xA;And here there is a new version I did with OpenGL and C++:  &#xD;&#xA;http://www.youtube.com/watch?v=NaeqUp3jbls&#xD;&#xA;&#xD;&#xA;Moreover I have a question, which from the two representation above you like more? Or better do you have any idea how to represent the 4 dimension at the best?&#xD;&#xA;&#xD;&#xA;btw any comment/suggestion/question is appreciatied, about the UI, the game concept ecc...&#xD;&#xA;&#xD;&#xA; " />
  <row Id="37749" PostHistoryTypeId="1" PostId="16387" RevisionGUID="223007aa-ee7f-400f-824e-341e92ec39f2" CreationDate="2011-08-24T22:12:51.907" UserId="9469" Text="4 Spatial Dimensional Game Snake4d" />
  <row Id="37750" PostHistoryTypeId="3" PostId="16387" RevisionGUID="223007aa-ee7f-400f-824e-341e92ec39f2" CreationDate="2011-08-24T22:12:51.907" UserId="9469" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="37751" PostHistoryTypeId="2" PostId="16388" RevisionGUID="3d817f5d-c94d-4841-aab4-894386defd49" CreationDate="2011-08-24T22:17:16.413" UserId="2581" Text="&gt; I get the feeling that the only way to do this is evaluate how many&#xD;&#xA;&gt; threads may be run per each device you intend to support, and find out&#xD;&#xA;&gt; what the lowest common denominator is.&#xD;&#xA;&#xD;&#xA;Not necessarily - there may be hope for a more dynamic solution, but this depends on the actual problem you are trying to solve (if any).  You're a bit vague in your question, so my answer has to be vague as well.&#xD;&#xA;&#xD;&#xA;If the grouping of platforms you are intending to run on have the capability for hardware enumeration via an API, you can use that interface to detect the maximum number of threads the system can handle, and use that as a basis for how many threads your application should create.  The only challenge here is finding those APIs; whether or not you go to the OS level, or search for a third-party library, or a cross-platform SDK/API is up to you and depends on the platforms you are trying to support.&#xD;&#xA;&#xD;&#xA;&gt; What is the best way to tackle developing in this way (given any&#xD;&#xA;&gt; cross-platform threading API) considering the following:&#xD;&#xA;&gt; &#xD;&#xA;&gt;     different numbers of cores&#xD;&#xA;&gt;     vastly different processing capabilities per core&#xD;&#xA;&gt;     A generally different systems architecture with eg. different&#xD;&#xA;&gt; latencies for cache, RAM , and I/O access&#xD;&#xA;&#xD;&#xA;In my opinion, none of those things should be your concern.  Your concern should be building your game.  If you hit a bottleneck and decide that it would be better to spawn a separate thread for a specific processor-intensive task, then spawn the thread and let the OS and other lower-level software decide how to manipulate the hardware to handle the threading.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37752" PostHistoryTypeId="2" PostId="16389" RevisionGUID="57dee005-4a0e-4263-8af3-87f41d3d73b9" CreationDate="2011-08-24T22:17:48.507" UserId="1101" Text="Ownership gives someone the right to decide who can use something. Allowing someone to use property you own is called a licence. If you get a licence to use the item that they own, you can use it. If you don't, you can't. Any exceptions to that will depend on the precise legal issues in your country, their country, and the relative skills of your lawyers. But the only way you will be sure about what you can use is to either (a) own it, or (b) get a licence from the owner that tells you exactly what you can do with it." />
  <row Id="37753" PostHistoryTypeId="2" PostId="16390" RevisionGUID="0d641b88-5bc9-425e-a44d-3dde05d14b45" CreationDate="2011-08-24T22:43:15.437" UserId="9282" Text="I make a `MenuScene` when my Game loads, which grabs some intro text from `levelData` and displays it and a button to start playing the level. When the `MenuScene` is created and displayed in `onLoadComplete()` it's fine. However when I display it again when advancing the level (`levelData` is loaded with new data and the `MenuScene` reset) it freezes, showing the game at the point the level was beaten. The menu is not displayed at all. I'm just calling&#xD;&#xA;&#xD;&#xA;    loadIntro();&#xD;&#xA;    this.mScene.setChildScene(this.mIntroScene, false, true, true);&#xD;&#xA;    this.mEngine.stop();&#xD;&#xA;&#xD;&#xA;to display the `MenuScene` (the same both times, it works the first time but not the second), where `loadIntro()` is&#xD;&#xA;&#xD;&#xA;    private void loadIntro() {&#xD;&#xA;                this.mIntroScene = new MenuScene(this.mCamera);&#xD;&#xA; &#xD;&#xA;                final TextMenuItem intro = new TextMenuItem(-1, mFont, levelData.getIntroText());&#xD;&#xA;                intro.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;                intro.setSize(400, 150);&#xD;&#xA;                this.mIntroScene.addMenuItem(intro);&#xD;&#xA; &#xD;&#xA;                final SpriteMenuItem startMenuItem = new SpriteMenuItem(MENU_START, this.mMenuStartTextureRegion);&#xD;&#xA;                startMenuItem.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;                this.mIntroScene.addMenuItem(startMenuItem);&#xD;&#xA; &#xD;&#xA;                this.mIntroScene.buildAnimations();&#xD;&#xA;                this.mIntroScene.setBackgroundEnabled(false);&#xD;&#xA;                this.mIntroScene.setOnMenuItemClickListener(this);&#xD;&#xA; &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;What am I doing wrong?" />
  <row Id="37754" PostHistoryTypeId="1" PostId="16390" RevisionGUID="0d641b88-5bc9-425e-a44d-3dde05d14b45" CreationDate="2011-08-24T22:43:15.437" UserId="9282" Text="Why does my game freeze when I try and display a menu?" />
  <row Id="37755" PostHistoryTypeId="3" PostId="16390" RevisionGUID="0d641b88-5bc9-425e-a44d-3dde05d14b45" CreationDate="2011-08-24T22:43:15.437" UserId="9282" Text="&lt;android&gt;&lt;andengine&gt;" />
  <row Id="37756" PostHistoryTypeId="2" PostId="16391" RevisionGUID="e3482fd2-1965-4d56-a982-c03a69fd3bcc" CreationDate="2011-08-24T22:59:00.120" UserId="9468" Text="I'm trying to replicate the glowing outline effect in the Left 4 Dead game. The effect causes an objects outline to glow, even when the object is occluded. Here is a screenshot of the effect:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;I'm somewhat able to replicate this effect in my OpenGL based program. This is what I'm currently doing:&#xD;&#xA;&#xD;&#xA; - Create a color and depth texture that is half the screen size for rendering the glowing objects&#xD;&#xA; - Clear the glow color/depth textures. Color is cleared to black.&#xD;&#xA; - For each glowing object, render it to the glow texture as a solid color&#xD;&#xA; - Perform a separable gaussian blur on the glow texture&#xD;&#xA; - Render the full resolution scene as normal&#xD;&#xA; - Additively blend the glow texture with the normal scene, but use the glow depth texture to mask out the object, leaving just the blurred outline.&#xD;&#xA;&#xD;&#xA;Here is a screenshot of my approach:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;Here is the fragment shader that combines the glow texture with the scene:&#xD;&#xA;&#xD;&#xA;    uniform sampler2D glowColorTex;&#xD;&#xA;    uniform sampler2D glowDepthTex;&#xD;&#xA;    uniform sampler2D sceneColorTex;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    	vec2 uv = gl_TexCoord[0].st;&#xD;&#xA;    &#xD;&#xA;    	vec4 color = texture2D( sceneColorTex, uv);&#xD;&#xA;    &#xD;&#xA;    	float depth = texture2D( glowDepthTex, uv).r;&#xD;&#xA;    	if(depth == 1.0) {&#xD;&#xA;    		color += 2.0 * texture2D( glowColorTex, uv);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	gl_FragColor = color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As you can see, it seems to work for the most part, but the aliasing on the outline is really bad.&#xD;&#xA;&#xD;&#xA;Does anybody have any suggestions for smoothing the inner edge of the outline?&#xD;&#xA;&#xD;&#xA;Should I be sampling the neighboring depth values of each pixel and scale the glow based on the number of depth values that equal 1.0?&#xD;&#xA;&#xD;&#xA;Or is there a better approach that will produce smoother results?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/jORxW.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/ABKpM.jpg" />
  <row Id="37757" PostHistoryTypeId="1" PostId="16391" RevisionGUID="e3482fd2-1965-4d56-a982-c03a69fd3bcc" CreationDate="2011-08-24T22:59:00.120" UserId="9468" Text="Suggestions for glowing outline effect" />
  <row Id="37758" PostHistoryTypeId="3" PostId="16391" RevisionGUID="e3482fd2-1965-4d56-a982-c03a69fd3bcc" CreationDate="2011-08-24T22:59:00.120" UserId="9468" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;glsl&gt;&lt;glow&gt;" />
  <row Id="37759" PostHistoryTypeId="5" PostId="16391" RevisionGUID="218f13bb-be26-43e1-9f1c-76656fa97978" CreationDate="2011-08-24T23:19:03.163" UserId="51" Comment="deleted 20 characters in body; edited title" Text="I'm trying to replicate the glowing outline effect in the Left 4 Dead game. The effect causes an objects outline to glow, even when the object is occluded. Here is a screenshot of the effect:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;I'm somewhat able to replicate this effect in my OpenGL based program. This is what I'm currently doing:&#xD;&#xA;&#xD;&#xA; - Create a color and depth texture that is half the screen size for rendering the glowing objects&#xD;&#xA; - Clear the glow color/depth textures. Color is cleared to black.&#xD;&#xA; - For each glowing object, render it to the glow texture as a solid color&#xD;&#xA; - Perform a separable gaussian blur on the glow texture&#xD;&#xA; - Render the full resolution scene as normal&#xD;&#xA; - Additively blend the glow texture with the normal scene, but use the glow depth texture to mask out the object, leaving just the blurred outline.&#xD;&#xA;&#xD;&#xA;Here is a screenshot of my approach:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;Here is the fragment shader that combines the glow texture with the scene:&#xD;&#xA;&#xD;&#xA;    uniform sampler2D glowColorTex;&#xD;&#xA;    uniform sampler2D glowDepthTex;&#xD;&#xA;    uniform sampler2D sceneColorTex;&#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    	vec2 uv = gl_TexCoord[0].st;&#xD;&#xA;    &#xD;&#xA;    	vec4 color = texture2D( sceneColorTex, uv);&#xD;&#xA;    &#xD;&#xA;    	float depth = texture2D( glowDepthTex, uv).r;&#xD;&#xA;    	if(depth == 1.0) {&#xD;&#xA;    		color += 2.0 * texture2D( glowColorTex, uv);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	gl_FragColor = color;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As you can see, it seems to work for the most part, but the aliasing on the outline is really bad.&#xD;&#xA;&#xD;&#xA;Does anybody have any suggestions for smoothing the inner edge of the outline?&#xD;&#xA;&#xD;&#xA;Should I be sampling the neighboring depth values of each pixel and scale the glow based on the number of depth values that equal 1.0?&#xD;&#xA;&#xD;&#xA;Or is there a better approach that will produce smoother results?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/jORxW.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/ABKpM.jpg" />
  <row Id="37760" PostHistoryTypeId="4" PostId="16391" RevisionGUID="218f13bb-be26-43e1-9f1c-76656fa97978" CreationDate="2011-08-24T23:19:03.163" UserId="51" Comment="deleted 20 characters in body; edited title" Text="How can I reduce aliasing in my outline glow effect?" />
  <row Id="37761" PostHistoryTypeId="25" PostId="16391" RevisionGUID="ad19a207-366a-4dd0-8c13-0bf8a981c3df" CreationDate="2011-08-25T00:37:48.853" Comment="http://twitter.com/#!/StackGameDev/status/106525650013274112" />
  <row Id="37762" PostHistoryTypeId="2" PostId="16392" RevisionGUID="1f0f7b09-7f09-43ee-971b-67426d41e92a" CreationDate="2011-08-25T00:49:22.113" UserId="7831" Text="Maybe instead of checking it against the low-resolution depth buffer you might use the stencil test. When rendering the normal scene, you just render the object into the stencil buffer and then render the glow texture (with the complete glowing object) only where the stencil buffer is not set, therefore masking out the high-resolution object." />
  <row Id="37763" PostHistoryTypeId="5" PostId="16392" RevisionGUID="c97c1986-0d01-4e8b-8bae-ec956fe7ac22" CreationDate="2011-08-25T00:54:45.897" UserId="7831" Comment="added 140 characters in body" Text="Maybe instead of checking it against the low-resolution depth buffer you might use the stencil test. When rendering the normal scene, you just render the object that should glow into the stencil buffer (without depth-testing, I think) and then blend the complete glow texture in, but configure the stencil-test to only pass where the stencil buffer is not set, therefore masking out the high-resolution object.&#xD;&#xA;&#xD;&#xA;This way you get the exact silhouette of the original object, whereas a smoothing of the edges would only lead to approximate results, but maybe these would suffice for you." />
  <row Id="37764" PostHistoryTypeId="2" PostId="16393" RevisionGUID="a4300de4-4395-44cb-b3a5-0ed7bfbc4384" CreationDate="2011-08-25T02:43:59.557" UserId="9021" Text="Can anybody help me how to use the box2d joint's in android or provide me any tutorial.I am trying to googled but getting iphone tutorial's.I need for android.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Jubin Mehta " />
  <row Id="37765" PostHistoryTypeId="1" PostId="16393" RevisionGUID="a4300de4-4395-44cb-b3a5-0ed7bfbc4384" CreationDate="2011-08-25T02:43:59.557" UserId="9021" Text="Box2d joint's tutorial for android" />
  <row Id="37766" PostHistoryTypeId="3" PostId="16393" RevisionGUID="a4300de4-4395-44cb-b3a5-0ed7bfbc4384" CreationDate="2011-08-25T02:43:59.557" UserId="9021" Text="&lt;android&gt;&lt;box2d&gt;&lt;cocos2d&gt;" />
  <row Id="37774" PostHistoryTypeId="25" PostId="16374" RevisionGUID="b74221a8-9dde-4620-be15-39a17b5ee2fb" CreationDate="2011-08-25T03:37:49.277" Comment="http://twitter.com/#!/StackGameDev/status/106570950962724864" />
  <row Id="37775" PostHistoryTypeId="2" PostId="16401" RevisionGUID="bad4c4d7-9816-440e-a8b0-c6002f359a2b" CreationDate="2011-08-25T03:38:35.660" UserId="9471" Text="I'm working on a TCP turn multiplayer game.&#xD;&#xA;&#xD;&#xA;I've read many tutorials and stuff, and they all said to use Async IO, but, none of than give practical examples on how to do it.&#xD;&#xA;&#xD;&#xA;I was thinking that in every TCP data stream sent, the client would have to send who is he, and what he's doing. Is it really necessary? What's the best way to deal with host identifying? If I should deal with this at all...&#xD;&#xA;&#xD;&#xA;Should I check in every message if he's who he's claiming to be?&#xD;&#xA;There's any comprehensive game packet analysis avaiable on the web? I think I would learn much from this kind of source.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Julio Rodrigues" />
  <row Id="37776" PostHistoryTypeId="1" PostId="16401" RevisionGUID="bad4c4d7-9816-440e-a8b0-c6002f359a2b" CreationDate="2011-08-25T03:38:35.660" UserId="9471" Text="Network Message Format Specification" />
  <row Id="37777" PostHistoryTypeId="3" PostId="16401" RevisionGUID="bad4c4d7-9816-440e-a8b0-c6002f359a2b" CreationDate="2011-08-25T03:38:35.660" UserId="9471" Text="&lt;network&gt;" />
  <row Id="37779" PostHistoryTypeId="2" PostId="16403" RevisionGUID="d4be8c91-67fe-4c0f-8684-b6fff226f1d3" CreationDate="2011-08-25T04:30:50.223" UserId="9472" Text="A little hobby project - online multiplayer trading card game, which is based of an actual TCG, *the name of it is mentioned right on the mockup at the bottom, right corner*. &#xD;&#xA;&#xD;&#xA;So trying to create a database for the game. This mockup doesn't contain all of the tables though. Later on when this part of the database is finished I'll add the other tables for deck management, and so on(*regarding which I was already suggested in my other [post][1]*).&#xD;&#xA;&#xD;&#xA;Also the **abilityRules**, **allyRules**, etc... Those are special columns that, at the moment, will only serve as the holder for each of the cards' rules in plain text, but in the future(very distant) I want to add some kind of **Rules Engine** and it will read off the script files that will replace the plain text inside the *name***Rules** column for each card to actually decide for the player what he can do next each step.&#xD;&#xA;&#xD;&#xA;Thoughts, questions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Mockup][2] (latest)&#xD;&#xA;&#xD;&#xA;[Suggested mockup from the other post][3] (link to post above)&#xD;&#xA;&#xD;&#xA;I used `tcgbrowser.com` website as the reference by the way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/16055/database-structure-for-a-trading-cards-video-game-tcg&#xD;&#xA;  [2]: http://img14.imageshack.us/img14/4848/schemawb.png&#xD;&#xA;  [3]: http://img803.imageshack.us/img803/7203/iwydz.png&#xD;&#xA;  [4]: http://www.tcgbrowser.com/" />
  <row Id="37780" PostHistoryTypeId="1" PostId="16403" RevisionGUID="d4be8c91-67fe-4c0f-8684-b6fff226f1d3" CreationDate="2011-08-25T04:30:50.223" UserId="9472" Text="Does this table schema for an online trading card game looks plausible?" />
  <row Id="37781" PostHistoryTypeId="3" PostId="16403" RevisionGUID="d4be8c91-67fe-4c0f-8684-b6fff226f1d3" CreationDate="2011-08-25T04:30:50.223" UserId="9472" Text="&lt;xna&gt;&lt;c#&gt;&lt;databases&gt;" />
  <row Id="37782" PostHistoryTypeId="5" PostId="16403" RevisionGUID="8befe6be-1e0f-470d-8b67-9a3e261badfa" CreationDate="2011-08-25T04:36:21.713" UserId="9472" Comment="deleted 45 characters in body" Text="A little hobby project - online multiplayer trading card game, which is based of an actual TCG, *the name of it is mentioned right on the mockup at the bottom, right corner*. &#xD;&#xA;&#xD;&#xA;This mockup doesn't contain all of the tables though. Later on when this part of the database is finished I'll add the other tables for deck management, and so on(*regarding which I was already suggested in my other [post][1]*).&#xD;&#xA;&#xD;&#xA;Also the **abilityRules**, **allyRules**, etc... Those are special columns that, at the moment, will only serve as holders for each of the cards' rules(descriptions) in plain text, but in the future(very distant) I want to add some kind of **Rules Engine** and it will read off the script files that will replace the plain text inside the *name***Rules** column for each card type(ability, ally,...) to actually decide for the player what he can do next each step.&#xD;&#xA;&#xD;&#xA;Thoughts, questions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Mockup][2] (latest)&#xD;&#xA;&#xD;&#xA;[Suggested mockup from the other post][3] (link to post above)&#xD;&#xA;&#xD;&#xA;I used `tcgbrowser.com` website as the reference by the way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/16055/database-structure-for-a-trading-cards-video-game-tcg&#xD;&#xA;  [2]: http://img14.imageshack.us/img14/4848/schemawb.png&#xD;&#xA;  [3]: http://img803.imageshack.us/img803/7203/iwydz.png&#xD;&#xA;  [4]: http://www.tcgbrowser.com/" />
  <row Id="37783" PostHistoryTypeId="6" PostId="16403" RevisionGUID="155cda16-b3f4-4e1c-95af-d23a3a16c8c0" CreationDate="2011-08-25T04:47:00.493" UserId="9472" Comment="edited tags" Text="&lt;xna&gt;&lt;c#&gt;&lt;scripting&gt;&lt;databases&gt;" />
  <row Id="37784" PostHistoryTypeId="5" PostId="16403" RevisionGUID="155cda16-b3f4-4e1c-95af-d23a3a16c8c0" CreationDate="2011-08-25T04:47:00.493" UserId="9472" Comment="edited tags" Text="A little hobby project - online multiplayer trading card game, which is based of an actual TCG, *the name of it is mentioned right on the mockup at the bottom, right corner*. &#xD;&#xA;&#xD;&#xA;This mockup doesn't contain all of the tables though. Later on when this part of the database is finished I'll add the other tables for deck management, and so on(*regarding which I was already suggested in my other [post][1]*).&#xD;&#xA;&#xD;&#xA;Also the **abilityRules**, **allyRules**, etc... Those are special columns that, at the moment, will only serve as holders for each of the cards' rules(descriptions) in plain text, but in the future(very distant) I want to add some kind of **Rules Engine** and it will read off the script files that will replace the plain text inside the *name***Rules** column for each card type(ability, ally,...) to actually decide for the player what he can do next each step.&#xD;&#xA;&#xD;&#xA;Thoughts, questions? There must be flaws in this. I don't even have any idea if normalization was done properly here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Mockup][2] (latest)&#xD;&#xA;&#xD;&#xA;[Suggested mockup from the other post][3] (link to post above)&#xD;&#xA;&#xD;&#xA;I used `tcgbrowser.com` website as the reference by the way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/16055/database-structure-for-a-trading-cards-video-game-tcg&#xD;&#xA;  [2]: http://img14.imageshack.us/img14/4848/schemawb.png&#xD;&#xA;  [3]: http://img803.imageshack.us/img803/7203/iwydz.png&#xD;&#xA;  [4]: http://www.tcgbrowser.com/" />
  <row Id="37785" PostHistoryTypeId="2" PostId="16404" RevisionGUID="c1fab93b-1b5b-4f1d-af2a-8cf4545b972a" CreationDate="2011-08-25T04:56:57.943" UserId="3689" Text="im learning SDL , i like to create Rectangle surface with color  &#xD;&#xA;that is not image . here is my code that compiles fine but dosnt work :  &#xD;&#xA;im passing the function this params:  &#xD;&#xA;&#xD;&#xA;    SDL_Surface*  m_screen = SDL_SetVideoMode(SCREEN_WIDTH,SCREEN_HEIGHT,SCREEN_BPP,SDL_SWSURFACE);&#xD;&#xA;    SDL_FillRect(m_screen,&amp;m_screen-&gt;clip_rect,SDL_MapRGB(m_screen-&gt;format,0xFF, 0xFF, 0xFF));&#xD;&#xA;    ...&#xD;&#xA;    Button button(m_screen,0,0,50,50,255,0,0)&#xD;&#xA;    ...&#xD;&#xA;    ...&#xD;&#xA;    Button::Button(SDL_Surface* screen,int x,int y,int w,int h,int R, int G, int B)&#xD;&#xA;          {&#xD;&#xA;          SDL_Rect box;&#xD;&#xA;          SDL_Surface * ButtonSurface;&#xD;&#xA;          ButtonSurface = NULL ;&#xD;&#xA;          Uint32 rmask, gmask, bmask, amask;&#xD;&#xA;          #if SDL_BYTEORDER == SDL_BIG_ENDIAN&#xD;&#xA;             rmask = 0xff000000;&#xD;&#xA;             gmask = 0x00ff0000;&#xD;&#xA;             bmask = 0x0000ff00;&#xD;&#xA;             amask = 0x000000ff;&#xD;&#xA;          #else&#xD;&#xA;             rmask = 0x000000ff;&#xD;&#xA;             gmask = 0x0000ff00;&#xD;&#xA;             bmask = 0x00ff0000;&#xD;&#xA;             amask = 0xff000000;&#xD;&#xA;          #endif&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;          &#xD;&#xA;          box.x = x;&#xD;&#xA;          box.y = y;&#xD;&#xA;          box.w = w;&#xD;&#xA;          box.h = h;&#xD;&#xA;    &#xD;&#xA;          ButtonSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, box.w,box.h, 32,&#xD;&#xA;                                        rmask, gmask, bmask, amask);&#xD;&#xA;    &#xD;&#xA;          if(ButtonSurface == NULL)&#xD;&#xA;          {&#xD;&#xA;             LOG_MSG(&quot;Button::Button Button failed&quot;);&#xD;&#xA;    &#xD;&#xA;          }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;          SDL_FillRect(screen,&amp;box,SDL_MapRGB ( ButtonSurface-&gt;format, R, G, B ));&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;          //ut.ApplySurface(0,0,ButtonSurface,screen);&#xD;&#xA;          SDL_BlitSurface(ButtonSurface,NULL,screen,&amp;box);&#xD;&#xA;       }&#xD;&#xA;&#xD;&#xA;what im doing here wrong ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37786" PostHistoryTypeId="1" PostId="16404" RevisionGUID="c1fab93b-1b5b-4f1d-af2a-8cf4545b972a" CreationDate="2011-08-25T04:56:57.943" UserId="3689" Text="SDL beginner: create Rectangle surface filled with color" />
  <row Id="37787" PostHistoryTypeId="3" PostId="16404" RevisionGUID="c1fab93b-1b5b-4f1d-af2a-8cf4545b972a" CreationDate="2011-08-25T04:56:57.943" UserId="3689" Text="&lt;c++&gt;&lt;sdl&gt;" />
  <row Id="37788" PostHistoryTypeId="2" PostId="16405" RevisionGUID="83e85d42-cc0d-480d-9e38-9b76eb732276" CreationDate="2011-08-25T05:26:04.360" UserId="3644" Text="Let me try answering that from positions of RTS (think of it as TBS where each turn is 100msec).&#xD;&#xA;&#xD;&#xA;There is separate thread for receiving and sending messages, it has it's own buffer and is black-box to the rest of the game (the game should know nothing about protocol and format). The game sends commands to networking unit and receives complete commands as they are available and verified to be complete.&#xD;&#xA;&#xD;&#xA;When networking unit receives a new message it appends it to buffer and checks if buffer has a complete command. That is why each message has a header specifying contents length and CRC. That is ASync part of it.&#xD;&#xA;&#xD;&#xA;How to identify the host? That depends on your network layout, is peer-to-peer or centralized server or .. ? If you trust your clients to do the computations (not advised for serious gaming) then there's no host at all, Everyone trusts everyone to supply valid data. If you have a separate host (could be running as stand-alone task on one of players machines) - it does all the computations and clients act as terminals, doing only View-Controller roles." />
  <row Id="37789" PostHistoryTypeId="25" PostId="16358" RevisionGUID="a3f6b05f-a52e-407c-b65a-1331841135f5" CreationDate="2011-08-25T06:37:50.217" Comment="http://twitter.com/#!/StackGameDev/status/106616254365831168" />
  <row Id="37790" PostHistoryTypeId="5" PostId="16393" RevisionGUID="55497257-2c97-4920-8b5b-19b235c5793d" CreationDate="2011-08-25T06:44:50.773" UserId="20" Comment="spelling" Text="Can anybody help me how to use the Box2d joints in android or provide any tutorials? I tried to google but only got iPhone tutorials. I need some for android." />
  <row Id="37791" PostHistoryTypeId="2" PostId="16406" RevisionGUID="8dd2c724-6a15-4594-806c-18e5eb1ec955" CreationDate="2011-08-25T08:07:58.357" UserId="5019" Text="You should also consider if they're able to sell the artwork at a later stage. What if your game is a success and they decide to sell your characters to a rival company. Or hold you to ransom for your sequels. Contracts for these things need to be very, very specific; there's no room for ambiguity within a contract like that, if the terms can be interpreted in more than one way then you could have a fight on your hands in the future. &#xD;&#xA;And as greyfade said, the only way to do that the contract is clear, concise and far to both parties is hire a lawyer yourself to go through the contract. It's money well spent." />
  <row Id="37792" PostHistoryTypeId="2" PostId="16407" RevisionGUID="8da71141-6d11-4f3e-aab7-bce193b1b390" CreationDate="2011-08-25T08:11:37.230" UserId="674" Text="So your goal is to provide an interface for developers to plug their AI on your game system. Depending on how much freedom you want to provide to those developers, you have several options.&#xD;&#xA;&#xD;&#xA; 1. For the largest freedom, do not provide anything but a comprehensive **documentation of your network protocol** as well as a set of IP to connect to (and maybe a test server).&#xD;&#xA;&#xD;&#xA; Using that approach, third-party developers are free to develop an AI in any language they are the most comfortable with, as soon as it supports sockets. On the downside, your server have to be quite secure and stable to avoid cheating and attacks. But that should be the case anyway.&#xD;&#xA;&#xD;&#xA; 2. For almost as much freedom, provides **a library** that allows to connect and interact with your game server. If you want to stick to Flash, you can give the developers an SWC. This way, they could create their own Flash app, that connects and interact with your game server using your library.&#xD;&#xA;&#xD;&#xA; This is maybe more flexible, since you can update the library when changing your network protocol, without breaking the third-party applications (or at least, with giving them a quite easy way to update, compared to a random change in the protocol).&#xD;&#xA;&#xD;&#xA; 3. You could also set up your game client so it will be able to read **client-side scripts**. For example, you could use [LUA][1]. This way, you are really sandboxing the third-party code on your very own game client, and you keep all control over the API you'll be providing.&#xD;&#xA;&#xD;&#xA;If you'd like to specify your request more deeply, I'd be happy to update the answer with more details.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/lua-alchemy/" />
  <row Id="37793" PostHistoryTypeId="5" PostId="16363" RevisionGUID="7829d99b-7887-4374-90e7-77909b812bfe" CreationDate="2011-08-25T09:01:01.120" UserId="2897" Comment="added 1760 characters in body" Text="The root of your trouble lies in the necessity to add or remove elements while iterating over collection. You should keep these things to a minimum, but sometimes it just can't be avoided.&#xD;&#xA;&#xD;&#xA;Making copies every time you want to iterate a collection is often not an option due to performance reasons. &#xD;&#xA;&#xD;&#xA;Now there are two possibilities: your loop and your adds|removals are either on the different threads or on the same thread. &#xD;&#xA;&#xD;&#xA;**If it's the multithreaded case**, Tyn gave you pointers on what to do. One simple solution would be to synchronize all access to the collection, using some object as the monitor. It may be slow if your collection is large, because threads wanting to add or remove something will be blocked while waiting for iteration to complete:&#xD;&#xA;&#xD;&#xA;    // For loop&#xD;&#xA;    synchronized (lockObject) &#xD;&#xA;    {  &#xD;&#xA;        for (...) // Iterations here&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    //Now when other thread wants to add or remove something, &#xD;&#xA;    // it needs to synchronize too:&#xD;&#xA;    &#xD;&#xA;    // Somewhere on the other thread&#xD;&#xA;    synchronized (lockObject) &#xD;&#xA;    {  &#xD;&#xA;        gameObjects.add(...);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;You can use ConcurrentHashMap, but be prepared to face the consequences. I can remember only that its iterators sometimes reflect adds or removals occured since the iterator construction and sometimes they don't, but there should be plenty of other subtle things, maybe like &quot;get&quot; operation placing a memory barrier. So if you add and remove things very rarely, it may be better to use a &quot;copy on write&quot; approach. &#xD;&#xA;&#xD;&#xA;Funny thing is, unless your threaded operations with objects on the loop are slow as hell (and usually they shouldn't be), it may actually be faster to keep them single-threaded. I deduced that if there is a bunch of monsters with some petty Update() functions, and you want to process their little functions on different threads, you're in for a trouble :) So keep in mind that multithreading just for the sake of it eats up your CPU with context swaps and supply you with livelocks and starvation issues here and there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**If it's the single thread case**, then removal of the elements in the collection being iterated won't work, so there are two another options: &#xD;&#xA;&#xD;&#xA; 1. The most usable option: add a queue of objects to add|remove, and process them out of your loop.&#xD;&#xA; 2. If you only need to remove a current object of an iteration phase, it is possible to use an indexed collection with a for loop, and then remove current element while adjusting loop counter. Or just loop backwards.&#xD;&#xA;&#xD;&#xA;Just for clarity, example for the first approach:&#xD;&#xA;&#xD;&#xA;    while ((objectToRemove = objectsToRemove.Pop()) != null)&#xD;&#xA;    {&#xD;&#xA;        allGameObjects.Remove(objectToRemove);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    foreach(var gameObject in allGameObjects)&#xD;&#xA;    {&#xD;&#xA;       // process your objects here as always, but if you need to&#xD;&#xA;       // add or remove an object, push it to the appropriate queue. &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And example for the second approach:&#xD;&#xA;&#xD;&#xA;    for (int i = 0; i &lt; allGameObjects.Count; i++)&#xD;&#xA;    {                &#xD;&#xA;       // to remove an object, do something like&#xD;&#xA;       allGameObjects.RemoveAt(i--);&#xD;&#xA;    }" />
  <row Id="37794" PostHistoryTypeId="2" PostId="16408" RevisionGUID="2c5d8ba4-0fcd-4cf9-a8e0-a2dd32360c36" CreationDate="2011-08-25T09:09:23.547" UserId="5473" Text="In SDL, whenever you're not seeing things drawing, or in drawing in completely the wrong color, eg. white, your first thought should be, &quot;What is wrong with my colour formats?&quot;. You'll want to check your bpp depth as well. I think due to changes from prior versions of SDL (could be wrong here) some sources say this is *bits* per pixel, others think it's *bytes* per pixel. In SDL 1.2.14, it's supposed to be bytes per pixel IIRC.&#xD;&#xA;&#xD;&#xA;Are you calling this in a loop? Nothing will happen if you're not calling it in a loop -- of course -- your app will just quit immediately. Sorry, had to ask.&#xD;&#xA;&#xD;&#xA;Best advice I can give you is go and follow [LazyFoo][1]'s SDL Tutorials... each time I had something wrong in regards to the basics, that's where I headed (after looking at a bunch of other references), and it always solved the problem. Write minimal test cases based on his examples and you should be A for away.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.lazyfoo.net" />
  <row Id="37795" PostHistoryTypeId="2" PostId="16409" RevisionGUID="cd0b4135-22bb-4474-9dd5-f19805615758" CreationDate="2011-08-25T09:28:54.203" UserId="9475" Text="I have an arrow image. I want to stretch this image between of two points. I am retrieving points from touch location so it i snot fixed. When user will touch on iPad arrow image will be appear and arrow image will be shown until the touch end appear.So if user touches on point A and it is moving to Point B arrow image will be stretched upto Point B and so on.&#xD;&#xA;&#xD;&#xA;How will I stretch image within points?&#xD;&#xA;" />
  <row Id="37796" PostHistoryTypeId="1" PostId="16409" RevisionGUID="cd0b4135-22bb-4474-9dd5-f19805615758" CreationDate="2011-08-25T09:28:54.203" UserId="9475" Text="stretching and rotating of image in between of points in cocos2d" />
  <row Id="37797" PostHistoryTypeId="3" PostId="16409" RevisionGUID="cd0b4135-22bb-4474-9dd5-f19805615758" CreationDate="2011-08-25T09:28:54.203" UserId="9475" Text="&lt;cocos2d-iphone&gt;&lt;ipad&gt;" />
  <row Id="37798" PostHistoryTypeId="25" PostId="16371" RevisionGUID="02b35825-2d29-4e61-883e-a22014525472" CreationDate="2011-08-25T09:37:50.740" Comment="http://twitter.com/#!/StackGameDev/status/106661553192972289" />
  <row Id="37799" PostHistoryTypeId="5" PostId="16409" RevisionGUID="795ce057-d9af-467e-bdf5-350b5434d255" CreationDate="2011-08-25T09:50:13.700" UserId="20" Comment="tried to improve title and spelling" Text="I have an arrow image. I want to stretch this image between two given points. I'm retrieving the points from touch locations, so they aren't fixed. When the user touches the iPad, the arrow image should appear and be shown until the touch ends. So if the user touches point A and is moving his finger to point B, the arrow image will be stretched from point A to point B and so on.&#xD;&#xA;&#xD;&#xA;How can I achieve that?&#xD;&#xA;" />
  <row Id="37800" PostHistoryTypeId="4" PostId="16409" RevisionGUID="795ce057-d9af-467e-bdf5-350b5434d255" CreationDate="2011-08-25T09:50:13.700" UserId="20" Comment="tried to improve title and spelling" Text="How to stretch and rotate an image between two points in cocos2d?" />
  <row Id="37801" PostHistoryTypeId="5" PostId="16386" RevisionGUID="4df17c41-72d5-4387-9456-326bcb7bd07b" CreationDate="2011-08-25T10:06:57.430" UserId="1101" Comment="addee citations and further reading" Text="You talk about &quot;multithreading difficulties&quot; but what difficulties are you actually talking about? In a way you're citing a phantom problem which may not even exist. The real challenge is one you make for yourself - if you are absolutely determined to get every last drop of power out of a piece of hardware, that does involve using the hardware to best effect, but that also widens the gap between the most powerful machine and the least powerful. The implication of this is that if you have a game that really makes the most of a PS3 (for example), you can't really run it on a cheap cellphone anyway, so your problem is no longer &quot;how can I get 1 program to work across very different hardware&quot; but becomes &quot;how can I implement 1 game idea several different ways so that it works on differently powered hardware&quot;. The threading issue becomes less relevant then.&#xD;&#xA;&#xD;&#xA;&gt; While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different platforms (desktop / mobile).&#xD;&#xA;&#xD;&#xA;Easy development of games - sure. Optimal multithreading, no. But you don't *need* multithreading to make games. To make high performance ones, it certainly helps. But many great games run in a single thread.&#xD;&#xA;&#xD;&#xA;&gt; What is the best way to tackle developing in this way (given any cross-platform threading API) considering the following:&#xD;&#xA;&#xD;&#xA;&gt;  -  different numbers of cores&#xD;&#xA;&gt;  -  vastly different processing capabilities per core&#xD;&#xA;&gt;  -  A generally different systems architecture with eg. different latencies for cache, RAM , and I/O access&#xD;&#xA;&#xD;&#xA;Instead of trying to assign systems to threads, assign tasks to threads. Give each task the data it needs to run and farm the tasks off to whichever hardware is available. Usually you'll have some sort of thread pool to abstract away the various cores or processors, and a task manager which has a queue of tasks and yields them up to the various threads when the thread signals that it is finished the previous task and is ready for a new one. Hardware with more cores will obviously complete the tasks more quickly and be able to render more rapidly. Specialising this system to work optimally on systems with different characteristics becomes an advanced optimisation problem, but can be based on certain heuristics (eg. a task which doesn't need to return much data can easily be pushed to a different processor but one with a lot of data to return might need to be kept local).&#xD;&#xA;&#xD;&#xA;However, decomposition of game features into discrete tasks is quite a complex matter and often not worth the effort unless you are very sure that you need the performance, so most won't even attempt it.&#xD;&#xA;&#xD;&#xA;Some further reading:&#xD;&#xA;&#xD;&#xA;http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php - see the 'data parallel' section. With this model the data is split across several identical tasks and farmed out to individual threads.&#xD;&#xA;&#xD;&#xA;http://software.intel.com/en-us/articles/designing-the-framework-of-a-parallel-game-engine/ - quite dense, describes things at the OS level rather than the game level.&#xD;&#xA;&#xD;&#xA;http://drdobbs.com/high-performance-computing/216500409 - not game specific, but completely relevant in terms of telling you how you need to divide up the tasks.&#xD;&#xA;&#xD;&#xA;http://www.itfgaming.com/news/tech-focus-crysis-2-and-the-future-of-cryengine-3 - half-way down this interview is an anecdote about how they migrated to a task based system." />
  <row Id="37802" PostHistoryTypeId="2" PostId="16410" RevisionGUID="93a4edf7-ce89-4beb-9e99-6117c92c9db3" CreationDate="2011-08-25T11:23:55.497" UserId="7328" Text="I'm writeing this code in c++ since I'm working with cocos2d-x but you just have to translate this code to Obj-c:&#xD;&#xA;&#xD;&#xA;	ccPoint a,b;&#xD;&#xA;&#xD;&#xA;	image-&gt;setposition(ccp((a.x + b.x) / 2, (a.y + b.y)/2));&#xD;&#xA;	image-&gt;setrotation(atan2(a.y-b.y,a.x-b.x));&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37803" PostHistoryTypeId="2" PostId="16411" RevisionGUID="cae9513f-8c81-4917-811a-6bbb280e4f6e" CreationDate="2011-08-25T11:30:43.083" UserId="9477" Text="First you need to compute the distance between points A and B, then you have stretch the arrow to this value. After that compute the angle between A and B, and rotate arrow with this.&#xD;&#xA;&#xD;&#xA;The last operation is positioning the arrow. If origin of the picture is in the center, you must place it at the (A+B)/2  point." />
  <row Id="37804" PostHistoryTypeId="2" PostId="16412" RevisionGUID="5ab2825f-b722-446e-b735-3103286d34d1" CreationDate="2011-08-25T11:31:31.877" UserId="9455" Text="I was thinking of developing a game in Flash, as a hobby / educational project.&#xD;&#xA;&#xD;&#xA;However, I was hopuing I could make it run on a smartphone, but  afriend who develops in Flash says that in their experience things will move really slowly on the likes of an iPad when the Flash packager is used. So slowly uo can't use it commercially for fast-moving games.&#xD;&#xA;&#xD;&#xA;Has anyone else experienced this slowness? Is there a way around it or is the technology just not there yet?" />
  <row Id="37805" PostHistoryTypeId="1" PostId="16412" RevisionGUID="5ab2825f-b722-446e-b735-3103286d34d1" CreationDate="2011-08-25T11:31:31.877" UserId="9455" Text="Is slow animation a serious issue for Flash games packed for iOS and other mobile devices?" />
  <row Id="37806" PostHistoryTypeId="3" PostId="16412" RevisionGUID="5ab2825f-b722-446e-b735-3103286d34d1" CreationDate="2011-08-25T11:31:31.877" UserId="9455" Text="&lt;flash&gt;&lt;performance&gt;&lt;platform&gt;" />
  <row Id="37807" PostHistoryTypeId="5" PostId="16410" RevisionGUID="4ac0bcd2-b0f0-4e55-b1c2-28be92df1e5f" CreationDate="2011-08-25T11:58:19.277" UserId="7328" Comment="added 159 characters in body" Text="I'm writeing this code in c++ since I'm working with cocos2d-x but you just have to translate this code to Obj-c:&#xD;&#xA;&#xD;&#xA;	ccPoint a,b;&#xD;&#xA;&#xD;&#xA;	image-&gt;setposition(ccp((a.x + b.x) / 2, (a.y + b.y)/2));&#xD;&#xA;	image-&gt;setrotation(atan2(a.y-b.y,a.x-b.x));&#xD;&#xA;        &#xD;&#xA;    float dist = sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y));&#xD;&#xA;    dist = dist / image-&gt;boundingbox().size.width;&#xD;&#xA;&#xD;&#xA;    image-&gt;setscale(dist);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37808" PostHistoryTypeId="2" PostId="16413" RevisionGUID="ffd72fb9-342a-4a0e-88ce-dce8b963e185" CreationDate="2011-08-25T12:04:26.760" UserId="20" Text="I'm currently using Flash to prototype a game for iOS and performance is decent. It's nowhere near the speed of a native implementation and is also slower than flash running on the desktop. But that's what has to be expected...&#xD;&#xA;&#xD;&#xA;The term &quot;commercial&quot; doesn't indicate how much load your game will put on the CPU. Also &quot;fast-moving&quot; isn't a problem if your logic is simple and you're not overly excessive with graphics and animations.&#xD;&#xA;&#xD;&#xA;Since flash code all runs on the CPU (unless you make use of the new 3D APIs), you're limited to what the CPU at hand can offer and this is *much* less than any modern desktop CPU. If you design your game in a way that respects these constraints, I see no problem in a Flash game on a mobile device." />
  <row Id="37809" PostHistoryTypeId="5" PostId="16412" RevisionGUID="1423ca22-aa72-48ba-9426-ad2ad0465d81" CreationDate="2011-08-25T12:07:34.200" UserId="20" Comment="changed title, minor spelling changes" Text="I was thinking of developing a game in Flash, as a hobby/educational project.&#xD;&#xA;&#xD;&#xA;However, I was hoping I could make it run on a smartphone, but a friend who develops in Flash says that in their experience things will move really slow on the likes of an iPad when the Flash packager is used. So slowly that you can't use it commercially for fast-moving games.&#xD;&#xA;&#xD;&#xA;Has anyone else experienced this slowness? Is there a way around it or is the technology just not there yet?" />
  <row Id="37810" PostHistoryTypeId="4" PostId="16412" RevisionGUID="1423ca22-aa72-48ba-9426-ad2ad0465d81" CreationDate="2011-08-25T12:07:34.200" UserId="20" Comment="changed title, minor spelling changes" Text="Can Flash games packed for iOS and other mobile devices achieve reasonable performance?" />
  <row Id="37811" PostHistoryTypeId="25" PostId="16409" RevisionGUID="b75b2f26-8d19-494a-964e-d3f63edcdd70" CreationDate="2011-08-25T12:37:51.053" Comment="http://twitter.com/#!/StackGameDev/status/106706853903351810" />
  <row Id="37812" PostHistoryTypeId="2" PostId="16414" RevisionGUID="f4ec5d23-a6d8-4801-853b-937b084c2f86" CreationDate="2011-08-25T13:42:18.250" UserId="9481" Text="i am new android game development and i will start develop new Android Game.So please suggest me which framework is best for demo example and free for used for creating new game." />
  <row Id="37813" PostHistoryTypeId="1" PostId="16414" RevisionGUID="f4ec5d23-a6d8-4801-853b-937b084c2f86" CreationDate="2011-08-25T13:42:18.250" UserId="9481" Text="Which Framework is best for Android Game Development?" />
  <row Id="37814" PostHistoryTypeId="3" PostId="16414" RevisionGUID="f4ec5d23-a6d8-4801-853b-937b084c2f86" CreationDate="2011-08-25T13:42:18.250" UserId="9481" Text="&lt;android&gt;" />
  <row Id="37815" PostHistoryTypeId="17" PostId="16415" RevisionGUID="67432524-f03e-4df7-8bd3-b54cc59aac50" CreationDate="2011-08-25T14:41:00.307" UserId="-1" Comment="from http://stackoverflow.com/questions/7181206/xna-texture2d-getdata-runtime-error" Text="" />
  <row Id="37816" PostHistoryTypeId="2" PostId="16415" RevisionGUID="ae51c139-002f-4c23-aeb7-8759aeafcf47" CreationDate="2011-08-24T19:34:32.047" UserId="9484" UserDisplayName="Bjørn Moholt" Text="I am trying to get the colors of the top left pixel in an image, I use this code: &#xD;&#xA;&#xD;&#xA;     using (FileStream stream = File.OpenRead(animationFile))&#xD;&#xA;     {&#xD;&#xA;         animation = Texture2D.FromStream(graphicsDevice, stream);&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;     Color[] animationData = new Color[1];&#xD;&#xA;     animation.GetData&lt;Color&gt;(animationData, 0, 1);  &#xD;&#xA;&#xD;&#xA;When i run it I get an System.Argument exception saying: The date passed in is too large or too small for this resource&quot;&#xD;&#xA;&#xD;&#xA;Anyone know what I'm doing wrong?&#xD;&#xA;&#xD;&#xA;Edit: Added code where i load the texture, I have also tried using the Content.Load method, but the result was the same.&#xD;&#xA;" />
  <row Id="37817" PostHistoryTypeId="1" PostId="16415" RevisionGUID="ae51c139-002f-4c23-aeb7-8759aeafcf47" CreationDate="2011-08-24T19:34:32.047" UserId="9484" UserDisplayName="Bjørn Moholt" Text="XNA: Texture2D.GetData runtime error" />
  <row Id="37818" PostHistoryTypeId="3" PostId="16415" RevisionGUID="ae51c139-002f-4c23-aeb7-8759aeafcf47" CreationDate="2011-08-24T19:34:32.047" UserId="9484" UserDisplayName="Bjørn Moholt" Text="&lt;c#&gt;&lt;xna&gt;" />
  <row Id="37819" PostHistoryTypeId="2" PostId="16416" RevisionGUID="a5a2e611-59ad-4638-826f-a8109c9bd454" CreationDate="2011-08-25T14:59:24.943" UserId="9483" Text="This isn't a game development question _per se_, but here goes...&#xD;&#xA;&#xD;&#xA;I have a 50x50 pixel space in which I need to draw five lines: X and Y axes, and one line for each of a `steepest`, `average`, and `flattest` slope.&#xD;&#xA;&#xD;&#xA;I'm working with (Java) code that was handed down to me with no documentation or commentary and I've never worked with drawing on a canvas before. Here's the code for a box that measured 175x75 px. This needs to be adapted for a 50x50 area as described above.&#xD;&#xA;&#xD;&#xA;		DrawingArea canvas = new DrawingArea(175, 75);&#xD;&#xA;		canvasContainer.add(canvas);&#xD;&#xA;		Rectangle rectangle = new Rectangle(0, 0, 174, 75);&#xD;&#xA;		canvas.add(rectangle);&#xD;&#xA;		Line slopeMainLineX = new Line(5, 70, 170, 70);&#xD;&#xA;		slopeMainLineX.setStrokeOpacity(0.5);&#xD;&#xA;		canvas.add(slopeMainLineX);&#xD;&#xA;		Line slopeMainLineY = new Line(40, 70, 40, 0);&#xD;&#xA;		slopeMainLineY.setStrokeOpacity(0.5);&#xD;&#xA;		canvas.add(slopeMainLineY);&#xD;&#xA;		steepestLine = new Line(40, 70, 0, 0);&#xD;&#xA;		steepestLine.setStrokeWidth(3);&#xD;&#xA;		canvas.add(steepestLine);&#xD;&#xA;		avgSlopeLine = new Line(40, 70, 0, 0);&#xD;&#xA;		avgSlopeLine.setStrokeWidth(2);&#xD;&#xA;		canvas.add(avgSlopeLine);&#xD;&#xA;		flattestLine = new Line(40, 70, 0, 0);&#xD;&#xA;		flattestLine.setStrokeWidth(1);&#xD;&#xA;		canvas.add(flattestLine);&#xD;&#xA;&#xD;&#xA;		int steepestAngle = Math.round(site.getSlope().getMax());&#xD;&#xA;		int averageAngle = Math.round(site.getSlope().getAvg());&#xD;&#xA;		int flatestAngle = Math.round(site.getSlope().getMin());&#xD;&#xA;		&#xD;&#xA;		double xPointSteepestAngle = 40 + 120 * Math.cos(steepestAngle*0.0174532925);&#xD;&#xA;		double yPointSteepestAngle = 70 + 120 * Math.sin(steepestAngle*0.0174532925);&#xD;&#xA;		double xPointAverageAngle = 40 + 120 * Math.cos(averageAngle*0.0174532925);&#xD;&#xA;		double yPointAverageAngle = 70 + 120 * Math.sin(averageAngle*0.0174532925);&#xD;&#xA;		double xPointFlatestAngle = 40 + 120 * Math.cos(flatestAngle*0.0174532925);&#xD;&#xA;		double yPointFlatestAngle = 70 + 120 * Math.sin(flatestAngle*0.0174532925);&#xD;&#xA;&#xD;&#xA;		steepestLine.setX2((int) xPointSteepestAngle);&#xD;&#xA;		steepestLine.setY2(70 - ((int) yPointSteepestAngle - 70));&#xD;&#xA;		&#xD;&#xA;		avgSlopeLine.setX2((int) xPointAverageAngle);&#xD;&#xA;		avgSlopeLine.setY2(70 - ((int) yPointAverageAngle - 70));&#xD;&#xA;		&#xD;&#xA;		flatestLine.setX2((int) xPointFlatestAngle);&#xD;&#xA;		flatestLine.setY2(70 - ((int) yPointFlatestAngle - 70));&#xD;&#xA;&#xD;&#xA;I'm completely lost here, so any help would be greatly appreciated." />
  <row Id="37820" PostHistoryTypeId="1" PostId="16416" RevisionGUID="a5a2e611-59ad-4638-826f-a8109c9bd454" CreationDate="2011-08-25T14:59:24.943" UserId="9483" Text="Drawing slope lines in a confined space" />
  <row Id="37821" PostHistoryTypeId="3" PostId="16416" RevisionGUID="a5a2e611-59ad-4638-826f-a8109c9bd454" CreationDate="2011-08-25T14:59:24.943" UserId="9483" Text="&lt;java&gt;&lt;canvas&gt;" />
  <row Id="37822" PostHistoryTypeId="2" PostId="16417" RevisionGUID="3e83bf46-87e0-43b7-9e3c-a308b219ace4" CreationDate="2011-08-25T15:11:19.073" UserId="9478" Text="Im trying to create a body of a irregular 2D sprite Farseer 3.3.1. &#xD;&#xA;The regular shapes that body factory provides is not that I want. Is there a way that one can create irregular objects? Could it be done with using **BodyFactory.CreateCompoundPolygon** method?" />
  <row Id="37823" PostHistoryTypeId="1" PostId="16417" RevisionGUID="3e83bf46-87e0-43b7-9e3c-a308b219ace4" CreationDate="2011-08-25T15:11:19.073" UserId="9478" Text="Create a body of a irregular 2D sprite in Farseer" />
  <row Id="37824" PostHistoryTypeId="3" PostId="16417" RevisionGUID="3e83bf46-87e0-43b7-9e3c-a308b219ace4" CreationDate="2011-08-25T15:11:19.073" UserId="9478" Text="&lt;xna&gt;&lt;c#&gt;&lt;sprites&gt;&lt;xna-4.0&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="37825" PostHistoryTypeId="2" PostId="16418" RevisionGUID="f5de5a7e-a999-42de-b3ee-57efbdc37569" CreationDate="2011-08-25T15:23:42.660" UserId="8349" Text="I've not tried it myself, but [libGDX](http://code.google.com/p/libgdx/) looks decent and highly active." />
  <row Id="37826" PostHistoryTypeId="25" PostId="16412" RevisionGUID="1199010c-2860-4ac4-b826-9149930e34c7" CreationDate="2011-08-25T15:37:51.993" Comment="http://twitter.com/#!/StackGameDev/status/106752157012865025" />
  <row Id="37830" PostHistoryTypeId="2" PostId="16420" RevisionGUID="1f3a01c5-057b-4eae-8aee-0dc1d5a3b31c" CreationDate="2011-08-25T15:46:59.833" UserId="7548" Text="Is it possible to use a separate thread for the game action?  I'm wondering if the menu being activated is consuming the current thread (this is a guess based on my experience in programming applications in Java that use menus).&#xD;&#xA;&#xD;&#xA;I suspect that what's going on is that you have one main thread, and that by activating the menu your code is temporarily halted while the user decides what to do with the menu.&#xD;&#xA;" />
  <row Id="37831" PostHistoryTypeId="2" PostId="16421" RevisionGUID="67b32a22-7264-40f5-a277-3bbe46004570" CreationDate="2011-08-25T15:50:56.160" UserId="159" Text="I don't know why that error is getting thrown, but here is a solutions that works.&#xD;&#xA;&#xD;&#xA;    Color[] animationData  = new Color[1];&#xD;&#xA;    animation.GetData&lt;Color&gt;(0,new Rectangle(0,0,1,1),c, 0, 1);&#xD;&#xA;&#xD;&#xA;We are creating a 1x1 rectangle, and only sampling data from that." />
  <row Id="37832" PostHistoryTypeId="2" PostId="16422" RevisionGUID="007e50bd-658a-4df9-a3d7-81c6fbed1624" CreationDate="2011-08-25T15:51:55.153" UserId="9366" Text="This isn't necessarily an answer, but whenever I have network architecture questions, I refer to this wonderful document about how Unreal Engine does it:&#xD;&#xA;&#xD;&#xA;http://udn.epicgames.com/Three/NetworkingOverview.html&#xD;&#xA;&#xD;&#xA;It's way more than you need, but it's a great read and you'll likely be able to use concepts from it." />
  <row Id="37833" PostHistoryTypeId="2" PostId="16423" RevisionGUID="f22aa455-ebff-4075-b17e-07081be1900f" CreationDate="2011-08-25T15:58:08.753" UserId="853" Text="So I'm teaching myself GLSL and am trying to figure out why it's suppose to be faster the the fixed function pipeline. &#xD;&#xA;&#xD;&#xA;The reason I am having a problem is that from my understand , the shaders you create are replacing sections of the pipeline that were there before. So, how's is simply providing your own version speeding things up?&#xD;&#xA;&#xD;&#xA;The only thing I can think is if you tried to supply say your own lighting equation before, you would have to do the calculation on the CPU, but now you can do the calculations on the GPU which will be faster. &#xD;&#xA;&#xD;&#xA;Am I understanding this correctly?" />
  <row Id="37834" PostHistoryTypeId="1" PostId="16423" RevisionGUID="f22aa455-ebff-4075-b17e-07081be1900f" CreationDate="2011-08-25T15:58:08.753" UserId="853" Text="Why is programmable pipeline( GLSL ) faster than fixed pipeline?" />
  <row Id="37835" PostHistoryTypeId="3" PostId="16423" RevisionGUID="f22aa455-ebff-4075-b17e-07081be1900f" CreationDate="2011-08-25T15:58:08.753" UserId="853" Text="&lt;opengl&gt;&lt;glsl&gt;" />
  <row Id="37837" PostHistoryTypeId="5" PostId="16423" RevisionGUID="8f183177-e5d2-4a9f-b5b4-60f5d9bfafa0" CreationDate="2011-08-25T16:08:37.410" UserId="853" Comment="added 1 characters in body" Text="So I'm teaching myself GLSL and am trying to figure out why it's suppose to be faster than the fixed function pipeline. &#xD;&#xA;&#xD;&#xA;The reason I am having a problem is that from my understanding , the shaders you create are replacing sections of the pipeline that were there before. So, how's simply providing your own version speeding things up?&#xD;&#xA;&#xD;&#xA;The only thing I can think is if you tried to supply say your own lighting equation before, you would have to do the calculation on the CPU, but now you can do the calculations on the GPU which will be faster. &#xD;&#xA;&#xD;&#xA;Am I understanding this correctly?" />
  <row Id="37838" PostHistoryTypeId="2" PostId="16424" RevisionGUID="397ceab4-1554-4ba0-8678-f1f585ca696c" CreationDate="2011-08-25T16:10:33.367" UserId="1141" Text="Replace some constants, it might help understanding what happens:&#xD;&#xA;&#xD;&#xA;    0.0174532925 =&gt; Math.PI / 180.0&#xD;&#xA;    175 =&gt; MyCanvas.width&#xD;&#xA;    75 =&gt; MyCanvas.height&#xD;&#xA;    174 =&gt; MyCanvas.width - 1&#xD;&#xA;    74 =&gt; MyCanvas.height - 1&#xD;&#xA;    5 =&gt; MyCanvas.padding&#xD;&#xA;    70 =&gt; MyCanvas.height - MyCanvas.padding&#xD;&#xA;    40 =&gt; (MyCanvas.height - MyCanvas.padding) / 2 + MyCanvas.padding&#xD;&#xA;    120 =&gt; MyCanvas.slopeLineLength /* About 50 */&#xD;&#xA;&#xD;&#xA;Alternatively, to make the horizontal line centered, replace the following value:&#xD;&#xA;&#xD;&#xA;    40 =&gt; MyCanvas.height / 2 /* 37.5 in original, not 40.0 */&#xD;&#xA;&#xD;&#xA;Finally, you can calculate the slope line length instead of setting it (to about 50 if you don't want the lines to be too long):&#xD;&#xA;&#xD;&#xA;    120 =&gt; Math.sqrt(&#xD;&#xA;                       (MyCanvas.height / 2 - MyCanvas.padding)&#xD;&#xA;                       * (MyCanvas.height / 2 - MyCanvas.padding)&#xD;&#xA;                     + (MyCanvas.height - MyCanvas.padding * 2) &#xD;&#xA;                       * (MyCanvas.height - MyCanvas.padding * 2))&#xD;&#xA;" />
  <row Id="37839" PostHistoryTypeId="5" PostId="16401" RevisionGUID="249ab9c9-80eb-4fef-b0e8-1edd65d35a46" CreationDate="2011-08-25T16:15:52.000" UserId="9471" Comment="added 48 characters in body" Text="I'm working on a TCP turn multiplayer game.&#xD;&#xA;&#xD;&#xA;I've read many tutorials and stuff, and they all said to use Async IO, but, none of than give practical examples on how to do it.&#xD;&#xA;&#xD;&#xA;I was thinking that in every TCP data stream sent, the client would have to send who is he, and what he's doing. Is it really necessary? What's the best way to deal with host identifying? If I should deal with this at all...&#xD;&#xA;&#xD;&#xA;Should I check in every message if he's who he's claiming to be?&#xD;&#xA;There's any comprehensive game packet analysis avaiable on the web? I think I would learn much from this kind of source.&#xD;&#xA;&#xD;&#xA;EDIT: I'm doing a server/many-clients model.&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;Julio Rodrigues" />
  <row Id="37840" PostHistoryTypeId="5" PostId="16424" RevisionGUID="2e59ac98-7caf-427a-afd7-149fb1e16d7f" CreationDate="2011-08-25T16:16:53.707" UserId="1141" Comment="deleted 2 characters in body" Text="Replace some constants, it might help understanding what happens:&#xD;&#xA;&#xD;&#xA;    0.0174532925 =&gt; Math.PI / 180.0&#xD;&#xA;    175 =&gt; MyCanvas.width&#xD;&#xA;    75 =&gt; MyCanvas.height&#xD;&#xA;    174 =&gt; MyCanvas.width - 1&#xD;&#xA;    74 =&gt; MyCanvas.height - 1&#xD;&#xA;    5 =&gt; MyCanvas.padding&#xD;&#xA;    70 =&gt; MyCanvas.height - MyCanvas.padding&#xD;&#xA;    40 =&gt; (MyCanvas.height - MyCanvas.padding) / 2 + MyCanvas.padding&#xD;&#xA;    120 =&gt; MyCanvas.slopeLineLength /* About 50 */&#xD;&#xA;&#xD;&#xA;Alternatively, to make the horizontal line centered, replace the following value:&#xD;&#xA;&#xD;&#xA;    40 =&gt; MyCanvas.height / 2 /* 37.5 in original, not 40.0 */&#xD;&#xA;&#xD;&#xA;Finally, you can calculate the slope line length instead of setting it (to about 50 if you don't want the lines to be too long):&#xD;&#xA;&#xD;&#xA;    120 =&gt; Math.sqrt(&#xD;&#xA;                       (MyCanvas.height / 2 - MyCanvas.padding)&#xD;&#xA;                       * (MyCanvas.height / 2 - MyCanvas.padding)&#xD;&#xA;                     + (MyCanvas.width - MyCanvas.padding * 2) &#xD;&#xA;                       * (MyCanvas.width - MyCanvas.padding * 2))&#xD;&#xA;" />
  <row Id="37841" PostHistoryTypeId="2" PostId="16425" RevisionGUID="fbe3a9c3-d2d0-4ede-898b-b1f1e866da77" CreationDate="2011-08-25T16:54:42.663" UserId="118" Text="I haven't used Farseer, but I have used Box2D. In Box2D, [the polygon must be convex](http://www.emanueleferonato.com/2008/12/19/understanding-custom-polygons-in-box2d/). To get away with non-convex polygons, you had to triangulate them.&#xD;&#xA;&#xD;&#xA;There are a number of [triangulation algorithms](http://en.wikipedia.org/wiki/Polygon_triangulation) out there. *I think* we used the [Ear Clipping](http://code.google.com/p/libgdx/source/browse/trunk/gdx/src/com/badlogic/gdx/math/EarClippingTriangulator.java) algorithm." />
  <row Id="37842" PostHistoryTypeId="12" PostId="16423" RevisionGUID="b8de1297-0544-4a95-b71c-86a5d955d4e7" CreationDate="2011-08-25T17:17:38.360" UserId="853" Text="[{&quot;Id&quot;:853,&quot;DisplayName&quot;:&quot;Joey Green&quot;}]" />
  <row Id="37843" PostHistoryTypeId="13" PostId="16423" RevisionGUID="77712641-3f82-4a1f-90ab-e0732af4ca0d" CreationDate="2011-08-25T17:17:52.790" UserId="853" Text="[{&quot;Id&quot;:853,&quot;DisplayName&quot;:&quot;Joey Green&quot;}]" />
  <row Id="37844" PostHistoryTypeId="2" PostId="16426" RevisionGUID="a347cb3b-b461-47d9-9058-efed51fa1692" CreationDate="2011-08-25T17:26:26.173" UserId="9282" Text="I use the following chunk of code to make bullets that fire towards the player's ship:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    public void onTimePassed(final TimerHandler pTimerHandler)&#xD;&#xA;    {&#xD;&#xA;    	pTimerHandler.reset();&#xD;&#xA;    	if(spawnBullets){&#xD;&#xA;    		for(int i = 0; i &lt; enemies.size(); i++){&#xD;&#xA;    			if(enemies.get(i).isShooter()){&#xD;&#xA;    				//shoot from this enemy to ship&#xD;&#xA;    				final Vector2 v = new Vector2(ship.getX() - enemies.get(i).getSprite().getX(),ship.getY() - enemies.get(i).getSprite().getY());&#xD;&#xA;    				v.nor();&#xD;&#xA;    				v.mul(BULLET_SPEED);&#xD;&#xA;    				createEnemyBullet(enemies.get(i).getSprite().getX(),enemies.get(i).getSprite().getY(), v);&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This works fine if the enemy is stationary, i.e. just a `Sprite` with no `Body`, but when the enemy is moving, my game completely freezes up. Sometimes it will happen immediately (on the first attempt to fire), or sometimes 1 or 2 bullets later.&#xD;&#xA;&#xD;&#xA;It gets through this code (a log output after `createEnemyBullet` works fine), but locks up somewhere before anything else happens. Disabling this section of code makes the problem go away. What could be going wrong?" />
  <row Id="37845" PostHistoryTypeId="1" PostId="16426" RevisionGUID="a347cb3b-b461-47d9-9058-efed51fa1692" CreationDate="2011-08-25T17:26:26.173" UserId="9282" Text="Why does this code work for a stationary object, but not a moving one?" />
  <row Id="37846" PostHistoryTypeId="3" PostId="16426" RevisionGUID="a347cb3b-b461-47d9-9058-efed51fa1692" CreationDate="2011-08-25T17:26:26.173" UserId="9282" Text="&lt;android&gt;&lt;andengine&gt;" />
  <row Id="37847" PostHistoryTypeId="2" PostId="16427" RevisionGUID="2ee2966c-3968-43bc-9d72-ee366ab863ef" CreationDate="2011-08-25T17:29:04.330" UserId="2897" Text="Shaders you create aren't going to be your own version of fixed-function pipeline(FFP), but a custom vertex- and pixel-manipulating operations to achieve something cool and complex. &#xD;&#xA;&#xD;&#xA;Many things you do via programmable pipeline(PP) will work faster than their possible FFP implementations, because PP reduces the number of passes or amount of combiner and cubemap magic to render these hypothetical things in FFP. &#xD;&#xA;&#xD;&#xA;Imagine implementing such a common thing as per-pixel lighting in FFP with only interpolated vertex data and sample texture in your hands. It's not even possible to do it &quot;honestly&quot;, only hacks for special cases depending on faithful precalculated cubemaps and some serious blending. With PP it becomes a matter of colorizing a dot product between light direction and vertex normal. &#xD;&#xA;&#xD;&#xA;All in all, PP turns slow and impossible into fast and possible. But if you decide to write a shader to implement the same algorithms used in FFP, you would find out that FFP will be slightly faster because it has very hardware-optimised microcode." />
  <row Id="37848" PostHistoryTypeId="12" PostId="16427" RevisionGUID="f85cf6fd-eb17-430a-8b0d-fc70a75f97ac" CreationDate="2011-08-25T17:30:00.787" UserId="2897" Text="[{&quot;Id&quot;:2897,&quot;DisplayName&quot;:&quot;Vigil&quot;}]" />
  <row Id="37849" PostHistoryTypeId="5" PostId="16427" RevisionGUID="c1090113-c27e-4d8b-886c-0cc44b0bcc17" CreationDate="2011-08-25T17:34:17.850" UserId="2897" Comment="deleted 12 characters in body" Text="Shaders you create aren't going to be your own version of fixed-function pipeline(FFP), but a custom vertex- and pixel-manipulating operations to achieve something cool and complex. &#xD;&#xA;&#xD;&#xA;Many things you do via programmable pipeline(PP) will work faster than their possible FFP implementations, because PP reduces the number of passes or amount of combiner and cubemap magic required to render these hypothetical things in FFP. &#xD;&#xA;&#xD;&#xA;Imagine implementing such a common thing as per-pixel lighting in FFP with only interpolated vertex data and sample texture in your hands. It's not even possible to do it &quot;honestly&quot;, only hacks for special cases depending on faithful precalculated cubemaps and some serious blending. With PP it becomes a matter of colorizing a dot product between light direction and vertex normal. &#xD;&#xA;&#xD;&#xA;All in all, PP turns slow and impossible into fast and possible. But if you decide to write a shader to implement the same algorithms used in FFP, you would find out that FFP will be slightly faster because it's very hardware-optimised." />
  <row Id="37850" PostHistoryTypeId="2" PostId="16428" RevisionGUID="de313e44-963c-4527-8e49-36a5cfc7535b" CreationDate="2011-08-25T17:37:18.983" UserId="7328" Text="The main reason I could think of is a phase in fixed pipeline, that your program doesn't need it. for example image a game where all lights are static, you can easily implement a shader that doesn't even try calculating for dynamic light. in this case you shader runs faster than a precompiled shader that is checking some equations for dynamic light (a general purpose shader). there are other examples too, you can easily think of many aspect that should be considered for a fixed pipeline but you can ignore implementing in your own GLSL codes." />
  <row Id="37851" PostHistoryTypeId="13" PostId="16427" RevisionGUID="8936fe61-dab3-4eca-be37-0fb7a8ff9d98" CreationDate="2011-08-25T17:37:57.253" UserId="2897" Text="[{&quot;Id&quot;:2897,&quot;DisplayName&quot;:&quot;Vigil&quot;}]" />
  <row Id="37852" PostHistoryTypeId="5" PostId="16424" RevisionGUID="0bb83729-5260-4c3f-95e4-8e7d1ed40884" CreationDate="2011-08-25T17:52:08.047" UserId="1141" Comment="added 234 characters in body" Text="Replace some constants, it might help understanding what happens:&#xD;&#xA;&#xD;&#xA;    0.0174532925 =&gt; Math.PI / 180.0&#xD;&#xA;    175 =&gt; MyCanvas.width&#xD;&#xA;    75 =&gt; MyCanvas.height&#xD;&#xA;    174 =&gt; MyCanvas.width - 1&#xD;&#xA;    74 =&gt; MyCanvas.height - 1&#xD;&#xA;    5 =&gt; MyCanvas.padding&#xD;&#xA;    170 =&gt; MyCanvas.width - MyCanvas.padding&#xD;&#xA;    70 =&gt; MyCanvas.height - MyCanvas.padding&#xD;&#xA;    40 =&gt; (MyCanvas.height - MyCanvas.padding) / 2 + MyCanvas.padding&#xD;&#xA;    120 =&gt; MyCanvas.slopeLineLength /* About 40 */&#xD;&#xA;&#xD;&#xA;Alternatively, to make the horizontal line centered, replace the following value:&#xD;&#xA;&#xD;&#xA;    40 =&gt; MyCanvas.height / 2 /* 37.5 in original, not 40.0 */&#xD;&#xA;&#xD;&#xA;&lt;s&gt;Finally, you can calculate the slope line length instead of setting it (to about 50 if you don't want the lines to be too long):&#xD;&#xA;&#xD;&#xA;    120 =&gt; Math.sqrt(&#xD;&#xA;                       (MyCanvas.height / 2 - MyCanvas.padding)&#xD;&#xA;                       * (MyCanvas.height / 2 - MyCanvas.padding)&#xD;&#xA;                     + (MyCanvas.width - MyCanvas.padding * 2) &#xD;&#xA;                       * (MyCanvas.width - MyCanvas.padding * 2))&#xD;&#xA;&lt;/s&gt;&#xD;&#xA;&#xD;&#xA;EDIT: Scratch the last part, obvious brain fart on my side. You should just pick a value between `(MyCanvas.height - 2 * MyCanvas.padding) / 2` and `(MyCanvas.width - 2 * MyCanvas.padding)` for `MyCanvas.slopeLineLength`.&#xD;&#xA;" />
  <row Id="37853" PostHistoryTypeId="2" PostId="16429" RevisionGUID="ef3b5563-6591-4d78-bdd5-ffb2bb7fe739" CreationDate="2011-08-25T18:16:49.417" UserId="8957" Text="I'm having a problem with the Farseer Physics Engine, where in a tiled environment, my object will at times interact with corners of others objects, even if they align perfectly.&#xD;&#xA;&#xD;&#xA;![Tiling Physics using Farseer][1]&#xD;&#xA;&#xD;&#xA;You can try it [here][2]. Controls are A for Left, D for Right. Don't mind the tile textures have rounding, the objects are still perfectly square in the simulation.&#xD;&#xA;&#xD;&#xA;I've read about people suggesting that you calculate and create one larger object, using Marching Squares or something similar. This is not an option however, as I'd like each tile to have different physical qualities, like different friction and restitution.&#xD;&#xA;&#xD;&#xA;My question is, what exactly is causing it, is it float precision issues or something else? And is there a way to fix it, without breaking the whole physics engine?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/eSHOX.png&#xD;&#xA;  [2]: http://dl.dropbox.com/u/992656/permanent/farseer.physics.tiling.issue.zip" />
  <row Id="37854" PostHistoryTypeId="1" PostId="16429" RevisionGUID="ef3b5563-6591-4d78-bdd5-ffb2bb7fe739" CreationDate="2011-08-25T18:16:49.417" UserId="8957" Text="Tiling Physics using Farseer" />
  <row Id="37855" PostHistoryTypeId="3" PostId="16429" RevisionGUID="ef3b5563-6591-4d78-bdd5-ffb2bb7fe739" CreationDate="2011-08-25T18:16:49.417" UserId="8957" Text="&lt;xna&gt;&lt;2d-physics&gt;&lt;farseer-physics-engine&gt;" />
  <row Id="37856" PostHistoryTypeId="25" PostId="16423" RevisionGUID="881fddd9-db0e-40cd-a518-9fcecd32732c" CreationDate="2011-08-25T18:37:52.643" Comment="http://twitter.com/#!/StackGameDev/status/106797454363594752" />
  <row Id="37857" PostHistoryTypeId="4" PostId="15588" RevisionGUID="7f7e0d48-9dc8-4825-a0b2-11a8d177af15" CreationDate="2011-08-25T18:49:13.857" UserId="2921" Comment="fixed the title" Text="Objective-C to Java conversion for porting iPhone apps to Android?" />
  <row Id="37858" PostHistoryTypeId="24" PostId="15588" RevisionGUID="7f7e0d48-9dc8-4825-a0b2-11a8d177af15" CreationDate="2011-08-25T18:49:13.857" Comment="Proposed by 2921 approved by 51 edit id of 672" />
  <row Id="37859" PostHistoryTypeId="2" PostId="16430" RevisionGUID="76055594-ec6c-46e9-a2f6-80831dd7af8a" CreationDate="2011-08-25T18:55:09.777" UserId="9491" Text="I'm doing HTML5 Canvas development and currently have a large viewport (on the left) and a map (on the right).&#xD;&#xA;&#xD;&#xA;http://imgur.com/a/X27RW&#xD;&#xA;&#xD;&#xA;I need to show on the map what is currently being viewed in the left. And I'm at a lost on how to calculate this.&#xD;&#xA;&#xD;&#xA;I am manipulating the main viewport via a transformation matrix. like [1, 0, 0, 1, 0, 0]&#xD;&#xA;&#xD;&#xA;This is decently common functionality in different games and apps. So I assume there are resources on how to do it. But I haven't been able to find any." />
  <row Id="37860" PostHistoryTypeId="1" PostId="16430" RevisionGUID="76055594-ec6c-46e9-a2f6-80831dd7af8a" CreationDate="2011-08-25T18:55:09.777" UserId="9491" Text="How do I show the current view from the viewport on my map?" />
  <row Id="37861" PostHistoryTypeId="3" PostId="16430" RevisionGUID="76055594-ec6c-46e9-a2f6-80831dd7af8a" CreationDate="2011-08-25T18:55:09.777" UserId="9491" Text="&lt;maps&gt;&lt;canvas&gt;" />
  <row Id="37862" PostHistoryTypeId="2" PostId="16431" RevisionGUID="71c8ab85-1883-4d2e-a13b-c92db7dd4c08" CreationDate="2011-08-25T19:23:00.790" UserId="9486" Text="I'm going to assume the following:&#xD;&#xA;&#xD;&#xA; - you wish to do something like you posted in Picture Nr. 2.&#xD;&#xA; - you have the relative position of the viewport in Space (x,y)&#xD;&#xA; - the map on the right is static and depicts the entire space&#xD;&#xA;&#xD;&#xA;I'll call the Main (left) Camera/viewport &quot;View&quot;, the right one &quot;Map&quot; and the red Rectangle marking the position on the Map as &quot;Rect&quot;. and I'll use some pseudo language as I'm no HTML5 Expert.&#xD;&#xA;&#xD;&#xA;    Rect.left   = (View.x / TotalSpaceWidth) * Map.Width&#xD;&#xA;    Rect.top    = (View.y / TotalSpaceHeight) * Map.Height&#xD;&#xA;    Rect.right  = Rect.left + View.Width / TotalSpaceWidth&#xD;&#xA;    Rect.bottom = Rect.top - View.Height / TotalSpaceHeight&#xD;&#xA;&#xD;&#xA;If your Map on the right is not Static, you will need to adjust the above by the corresponding offsets.&#xD;&#xA;&#xD;&#xA;To incorporate rotations, simply rotate the Rect by the given angle.&#xD;&#xA;&#xD;&#xA;I hope this was what you were looking for&#xD;&#xA;" />
  <row Id="37863" PostHistoryTypeId="2" PostId="16432" RevisionGUID="c2493a88-0084-46e7-91b5-610921c5d1e0" CreationDate="2011-08-25T19:59:28.237" UserId="9384" Text="I showed my friend a demo of what I was doing with the farseer physics engine on the windows phone and he wanted to know if farseer would be good for a game he wants to develop. It's a tile based game so I said I don't think farseer would be the best choice (correct me if i'm wrong).&#xD;&#xA;&#xD;&#xA;Are there any tile game engines for windows phone? Think tile based like the original Zelda." />
  <row Id="37864" PostHistoryTypeId="1" PostId="16432" RevisionGUID="c2493a88-0084-46e7-91b5-610921c5d1e0" CreationDate="2011-08-25T19:59:28.237" UserId="9384" Text="Tile based game engine for WP7?" />
  <row Id="37865" PostHistoryTypeId="3" PostId="16432" RevisionGUID="c2493a88-0084-46e7-91b5-610921c5d1e0" CreationDate="2011-08-25T19:59:28.237" UserId="9384" Text="&lt;engine&gt;&lt;tiles&gt;&lt;windows-phone-7&gt;" />
  <row Id="37866" PostHistoryTypeId="2" PostId="16433" RevisionGUID="c0a817d5-830d-4ab8-b413-e86b51b7e3a2" CreationDate="2011-08-25T20:19:58.560" UserId="7831" Text="That's it exactly, your shaders are replacing parts of the pipeline. But often your shaders are specialized towards a specific effect you want to achieve and don't handle every possible special feature that might be activated, therefore being simpler than a shader that emulates the complete fixed-function pipeline. Whereas the fixed-function path has to take into acount many things and OpenGL features you might just not want to use (or haven't even heard about).&#xD;&#xA;&#xD;&#xA;And the days where you had the fixed-function done in special hardware (opposite to a fully programmable hardware) are over, what probably happens when you use the fixed-function pipeline is, that your driver just loads its own special shaders that implement the fixed-function paths. But these might be very complex, to provide each and every feature the fixed-function pipeline offers." />
  <row Id="37867" PostHistoryTypeId="6" PostId="16430" RevisionGUID="7528bd4a-7c1c-4476-83d1-811ad19ddd3e" CreationDate="2011-08-25T21:09:29.400" UserId="9255" Comment="added html5 tag" Text="&lt;maps&gt;&lt;html5&gt;&lt;canvas&gt;" />
  <row Id="37868" PostHistoryTypeId="24" PostId="16430" RevisionGUID="7528bd4a-7c1c-4476-83d1-811ad19ddd3e" CreationDate="2011-08-25T21:09:29.400" Comment="Proposed by 9255 approved by 51 edit id of 673" />
  <row Id="37869" PostHistoryTypeId="5" PostId="15776" RevisionGUID="9711996d-e92a-4bf9-9d08-d3500d507ef7" CreationDate="2011-08-25T21:23:41.873" UserId="5473" Comment="added 20 characters in body; edited tags" Text="ForPlay is lauded as a pretty amazing accomplishment by Google's own. But I'm holding off on making any solid judgements as yet...&#xD;&#xA;&#xD;&#xA;I'm wondering if anyone has used this and has found any major flaws? I'd like to know what these are. Considering that the code is written in Java and is compiled for Flash, Android and HTML5 additionally, I'm wondering how it performs on those platforms as compared with games written natively for those platforms -- if anyone has done any comparisons in this regard.&#xD;&#xA;&#xD;&#xA;For those who are unaware of what ForPlay (now renamed PlayN) is, see the [repository][1] and this [video][2].&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/forplay/&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=F_sbusEUz5w" />
  <row Id="37870" PostHistoryTypeId="6" PostId="15776" RevisionGUID="9711996d-e92a-4bf9-9d08-d3500d507ef7" CreationDate="2011-08-25T21:23:41.873" UserId="5473" Comment="added 20 characters in body; edited tags" Text="&lt;gwt-game&gt;&lt;playn&gt;" />
  <row Id="37871" PostHistoryTypeId="2" PostId="16434" RevisionGUID="b52ce3b3-527c-4e03-892a-e6fc14d5a231" CreationDate="2011-08-25T21:25:46.913" UserId="2289" Text="I'm a beginner to OpenGL and GLSL especially, and I'm having a lot of trouble getting textures to display via shaders. My shader code compiles without any warnings or errors, but I seem completely unable to render my texture. Here's my current, simplified code (written in D, but should function almost exactly as it looks as if it were in C++):&#xD;&#xA;&#xD;&#xA;    int main(string[] argv) {&#xD;&#xA;        try {&#xD;&#xA;            ilInit();&#xD;&#xA;            iluInit();&#xD;&#xA;            ilutInit();                 // GOTCHA: These two calls need to be in order!&#xD;&#xA;            ilutRenderer(ILUT_OPENGL);  //&#xD;&#xA;            glfwInit();&#xD;&#xA;            if(SDL_Init(SDL_INIT_VIDEO) &gt; 0) writeln(&quot;ERROR&quot;);&#xD;&#xA;        &#xD;&#xA;            // Create an OpenGL context and window.&#xD;&#xA;            const int VWIDTH = 1600;&#xD;&#xA;            const int VHEIGHT = 900;&#xD;&#xA;            const int WIDTH = 1280;&#xD;&#xA;            const int HEIGHT = 720;&#xD;&#xA;            glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 8);&#xD;&#xA;            glfwOpenWindowHint(GLFW_AUX_BUFFERS, 1);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);&#xD;&#xA;            glfwOpenWindow(WIDTH, HEIGHT, 8, 8, 8, 8, 0, 0, GLFW_WINDOW /+ GLFW_FULLSCREEN +/);&#xD;&#xA;&#xD;&#xA;            GL.bindClassicVersions(true);&#xD;&#xA;            GL.bindModernVersions(true, GLVersion.GL33);&#xD;&#xA;            GL.bindExtensions(true);    // Returns GL_INVALID_ENUM&#xD;&#xA;&#xD;&#xA;            glMatrixMode(GL_PROJECTION);&#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glOrtho(0, VWIDTH, 0, VHEIGHT, -100, 100);&#xD;&#xA;            glMatrixMode(GL_MODELVIEW);&#xD;&#xA;            glLoadIdentity(); &#xD;&#xA;&#xD;&#xA;            // Set clear color&#xD;&#xA;            glClearColor(0, 0, 0, 0);&#xD;&#xA;&#xD;&#xA;            // Set GL enables/disables&#xD;&#xA;            glShadeModel(GL_SMOOTH);                                // Enables smooth shading&#xD;&#xA;            glEnable(GL_TEXTURE_2D);                                // Enable 2D texturing&#xD;&#xA;            glEnable(GL_BLEND);                                     // Enable alpha blending&#xD;&#xA;            glDisable(GL_DEPTH_TEST);                               // Disable depth testing&#xD;&#xA;            glDisable(GL_CULL_FACE);                                // Disable face culling&#xD;&#xA;            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;            //glDepthFunc(GL_LEQUAL);                                 // The depth test type&#xD;&#xA;&#xD;&#xA;            // Initialize and compile shaders&#xD;&#xA;            GLuint vertShaderId, fragShaderId;&#xD;&#xA;            vertShaderId = glCreateShader(GL_VERTEX_SHADER);&#xD;&#xA;            fragShaderId = glCreateShader(GL_FRAGMENT_SHADER);&#xD;&#xA;        &#xD;&#xA;            immutable(GLchar)* vertShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    in vec3 vertex;&#xD;&#xA;    in vec2 texCoord;&#xD;&#xA;&#xD;&#xA;    out vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragmentTexCoord = texCoord;&#xD;&#xA;        gl_Position = vec4(vertex, 1.0);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;            immutable(GLchar)* fragShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    uniform sampler2D firstTexture;&#xD;&#xA;    in vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    layout(location = 0, index = 0) out vec4 fragColor;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        //fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;        fragColor = vec4(1, 0, 0, 1);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;&#xD;&#xA;            glShaderSource(vertShaderId, 1, &amp;vertShaderSrc, null);&#xD;&#xA;            glShaderSource(fragShaderId, 1, &amp;fragShaderSrc, null);&#xD;&#xA;&#xD;&#xA;            glCompileShader(vertShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(vertShaderId);&#xD;&#xA;            glCompileShader(fragShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(fragShaderId);&#xD;&#xA;&#xD;&#xA;            GLuint programId = glCreateProgram();&#xD;&#xA;&#xD;&#xA;            glAttachShader(programId, vertShaderId);&#xD;&#xA;            glAttachShader(programId, fragShaderId);&#xD;&#xA;&#xD;&#xA;            glLinkProgram(programId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(programId);&#xD;&#xA;&#xD;&#xA;            glUseProgram(programId);&#xD;&#xA;            checkGLError();&#xD;&#xA;&#xD;&#xA;            // Load texture&#xD;&#xA;            auto texture = new Texture2d(r&quot;res/test.png&quot;);&#xD;&#xA;            texture.load();&#xD;&#xA;&#xD;&#xA;            bool running = true;&#xD;&#xA;            clearGLError();&#xD;&#xA;            while(running) {&#xD;&#xA;                // Clear viewport&#xD;&#xA;                glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;                // Bind texture ID&#xD;&#xA;                glActiveTexture(GL_TEXTURE0);&#xD;&#xA;                glBindTexture(GL_TEXTURE_2D, texture.textureId);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Set texture uniform value&#xD;&#xA;                auto loc = glGetUniformLocation(programId, &quot;firstTexture&quot;);&#xD;&#xA;                checkGLError();&#xD;&#xA;                glUniform1i(loc, 0);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Render&#xD;&#xA;                glBegin(GL_QUADS);&#xD;&#xA;                    glVertex2d(-1, -1); glTexCoord2d(0, 0);&#xD;&#xA;                    glVertex2d( 1, -1); glTexCoord2d(1, 0);&#xD;&#xA;                    glVertex2d( 1,  1); glTexCoord2d(1, 1);&#xD;&#xA;                    glVertex2d(-1,  1); glTexCoord2d(0, 1);&#xD;&#xA;                glEnd();&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Swap front and back rendering buffers&#xD;&#xA;                glfwSwapBuffers();&#xD;&#xA;&#xD;&#xA;                // Add a tiny delay if no work is being done in the loop.&#xD;&#xA;                //glfwSleep(double.epsilon);&#xD;&#xA;&#xD;&#xA;                // Check if ESC key was pressed or window was closed&#xD;&#xA;                running = !glfwGetKey(GLFW_KEY_ESC) &amp;&amp; glfwGetWindowParam(GLFW_OPENED);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        catch(Throwable t) {&#xD;&#xA;            Logger.log(Severity.Error, t.msg);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm guessing it's something simple I've overlooked due to being new. Any help would be appreciated!" />
  <row Id="37872" PostHistoryTypeId="1" PostId="16434" RevisionGUID="b52ce3b3-527c-4e03-892a-e6fc14d5a231" CreationDate="2011-08-25T21:25:46.913" UserId="2289" Text="GLSL woes involving texturing" />
  <row Id="37873" PostHistoryTypeId="3" PostId="16434" RevisionGUID="b52ce3b3-527c-4e03-892a-e6fc14d5a231" CreationDate="2011-08-25T21:25:46.913" UserId="2289" Text="&lt;opengl&gt;&lt;glsl&gt;" />
  <row Id="37874" PostHistoryTypeId="2" PostId="16435" RevisionGUID="b139c3e8-0027-4c8e-8003-7f532b49ab5d" CreationDate="2011-08-25T21:32:50.860" UserId="9486" Text="One thing I noticed is that you commented out the actual color finding procedure:&#xD;&#xA;&#xD;&#xA;        //fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;        fragColor = vec4(1, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37875" PostHistoryTypeId="2" PostId="16436" RevisionGUID="9de40369-430e-4410-8ea7-765f4c1b736d" CreationDate="2011-08-25T21:33:06.727" UserId="8390" Text="you can optimize your collisions shapes, this scene can be done with only four rectangles.&#xD;&#xA;&#xD;&#xA;you can join correlative boxes to make one bigger.&#xD;&#xA;&#xD;&#xA;this video shows it http://www.youtube.com/watch?v=eyhGckHgkkE&#xD;&#xA;&#xD;&#xA;when it is adding boxes you can see a light blue rectangle with the optimized shape." />
  <row Id="37876" PostHistoryTypeId="25" PostId="16415" RevisionGUID="c81d331b-2d69-4e81-ab32-d6ede5accf18" CreationDate="2011-08-25T21:37:53.397" Comment="http://twitter.com/#!/StackGameDev/status/106842759159226368" />
  <row Id="37877" PostHistoryTypeId="5" PostId="16430" RevisionGUID="06a73ce4-fa4c-4190-8033-8a9f5cb2fd5a" CreationDate="2011-08-25T21:37:57.233" UserId="9491" Comment="added 91 characters in body" Text="I'm doing HTML5 Canvas development and currently have a large viewport (on the left) and a map (on the right).&#xD;&#xA;&#xD;&#xA;http://imgur.com/a/X27RW (The first screenshot is what is currently there. The second is an example of what I want)&#xD;&#xA;&#xD;&#xA;I need to show on the map what is currently being viewed in the left. And I'm at a lost on how to calculate this.&#xD;&#xA;&#xD;&#xA;I am manipulating the main viewport via a transformation matrix. like [1, 0, 0, 1, 0, 0]&#xD;&#xA;&#xD;&#xA;This is decently common functionality in different games and apps. So I assume there are resources on how to do it. But I haven't been able to find any." />
  <row Id="37878" PostHistoryTypeId="5" PostId="16434" RevisionGUID="2a36d742-3210-414b-9d1d-2dfec81a1296" CreationDate="2011-08-25T21:42:44.700" UserId="2289" Comment="deleted 41 characters in body" Text="I'm a beginner to OpenGL and GLSL especially, and I'm having a lot of trouble getting textures to display via shaders. My shader code compiles without any warnings or errors, but I seem completely unable to render my texture. Here's my current, simplified code (written in D, but should function almost exactly as it looks as if it were in C++):&#xD;&#xA;&#xD;&#xA;    int main(string[] argv) {&#xD;&#xA;        try {&#xD;&#xA;            ilInit();&#xD;&#xA;            iluInit();&#xD;&#xA;            ilutInit();                 // GOTCHA: These two calls need to be in order!&#xD;&#xA;            ilutRenderer(ILUT_OPENGL);  //&#xD;&#xA;            glfwInit();&#xD;&#xA;            if(SDL_Init(SDL_INIT_VIDEO) &gt; 0) writeln(&quot;ERROR&quot;);&#xD;&#xA;        &#xD;&#xA;            // Create an OpenGL context and window.&#xD;&#xA;            const int VWIDTH = 1600;&#xD;&#xA;            const int VHEIGHT = 900;&#xD;&#xA;            const int WIDTH = 1280;&#xD;&#xA;            const int HEIGHT = 720;&#xD;&#xA;            glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 8);&#xD;&#xA;            glfwOpenWindowHint(GLFW_AUX_BUFFERS, 1);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);&#xD;&#xA;            glfwOpenWindow(WIDTH, HEIGHT, 8, 8, 8, 8, 0, 0, GLFW_WINDOW /+ GLFW_FULLSCREEN +/);&#xD;&#xA;&#xD;&#xA;            GL.bindClassicVersions(true);&#xD;&#xA;            GL.bindModernVersions(true, GLVersion.GL33);&#xD;&#xA;            GL.bindExtensions(true);    // Returns GL_INVALID_ENUM&#xD;&#xA;&#xD;&#xA;            glMatrixMode(GL_PROJECTION);&#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glOrtho(0, VWIDTH, 0, VHEIGHT, -100, 100);&#xD;&#xA;            glMatrixMode(GL_MODELVIEW);&#xD;&#xA;            glLoadIdentity(); &#xD;&#xA;&#xD;&#xA;            // Set clear color&#xD;&#xA;            glClearColor(0, 0, 0, 0);&#xD;&#xA;&#xD;&#xA;            // Set GL enables/disables&#xD;&#xA;            glShadeModel(GL_SMOOTH);                                // Enables smooth shading&#xD;&#xA;            glEnable(GL_TEXTURE_2D);                                // Enable 2D texturing&#xD;&#xA;            glEnable(GL_BLEND);                                     // Enable alpha blending&#xD;&#xA;            glDisable(GL_DEPTH_TEST);                               // Disable depth testing&#xD;&#xA;            glDisable(GL_CULL_FACE);                                // Disable face culling&#xD;&#xA;            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;            //glDepthFunc(GL_LEQUAL);                                 // The depth test type&#xD;&#xA;&#xD;&#xA;            // Initialize and compile shaders&#xD;&#xA;            GLuint vertShaderId, fragShaderId;&#xD;&#xA;            vertShaderId = glCreateShader(GL_VERTEX_SHADER);&#xD;&#xA;            fragShaderId = glCreateShader(GL_FRAGMENT_SHADER);&#xD;&#xA;        &#xD;&#xA;            immutable(GLchar)* vertShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    in vec3 vertex;&#xD;&#xA;    in vec2 texCoord;&#xD;&#xA;&#xD;&#xA;    out vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragmentTexCoord = texCoord;&#xD;&#xA;        gl_Position = vec4(vertex, 1.0);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;            immutable(GLchar)* fragShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    uniform sampler2D firstTexture;&#xD;&#xA;    in vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    layout(location = 0, index = 0) out vec4 fragColor;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;&#xD;&#xA;            glShaderSource(vertShaderId, 1, &amp;vertShaderSrc, null);&#xD;&#xA;            glShaderSource(fragShaderId, 1, &amp;fragShaderSrc, null);&#xD;&#xA;&#xD;&#xA;            glCompileShader(vertShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(vertShaderId);&#xD;&#xA;            glCompileShader(fragShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(fragShaderId);&#xD;&#xA;&#xD;&#xA;            GLuint programId = glCreateProgram();&#xD;&#xA;&#xD;&#xA;            glAttachShader(programId, vertShaderId);&#xD;&#xA;            glAttachShader(programId, fragShaderId);&#xD;&#xA;&#xD;&#xA;            glLinkProgram(programId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(programId);&#xD;&#xA;&#xD;&#xA;            glUseProgram(programId);&#xD;&#xA;            checkGLError();&#xD;&#xA;&#xD;&#xA;            // Load texture&#xD;&#xA;            auto texture = new Texture2d(r&quot;res/test.png&quot;);&#xD;&#xA;            texture.load();&#xD;&#xA;&#xD;&#xA;            bool running = true;&#xD;&#xA;            clearGLError();&#xD;&#xA;            while(running) {&#xD;&#xA;                // Clear viewport&#xD;&#xA;                glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;                // Bind texture ID&#xD;&#xA;                glActiveTexture(GL_TEXTURE0);&#xD;&#xA;                glBindTexture(GL_TEXTURE_2D, texture.textureId);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Set texture uniform value&#xD;&#xA;                auto loc = glGetUniformLocation(programId, &quot;firstTexture&quot;);&#xD;&#xA;                checkGLError();&#xD;&#xA;                glUniform1i(loc, 0);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Render&#xD;&#xA;                glBegin(GL_QUADS);&#xD;&#xA;                    glVertex2d(-1, -1); glTexCoord2d(0, 0);&#xD;&#xA;                    glVertex2d( 1, -1); glTexCoord2d(1, 0);&#xD;&#xA;                    glVertex2d( 1,  1); glTexCoord2d(1, 1);&#xD;&#xA;                    glVertex2d(-1,  1); glTexCoord2d(0, 1);&#xD;&#xA;                glEnd();&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Swap front and back rendering buffers&#xD;&#xA;                glfwSwapBuffers();&#xD;&#xA;&#xD;&#xA;                // Add a tiny delay if no work is being done in the loop.&#xD;&#xA;                //glfwSleep(double.epsilon);&#xD;&#xA;&#xD;&#xA;                // Check if ESC key was pressed or window was closed&#xD;&#xA;                running = !glfwGetKey(GLFW_KEY_ESC) &amp;&amp; glfwGetWindowParam(GLFW_OPENED);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        catch(Throwable t) {&#xD;&#xA;            Logger.log(Severity.Error, t.msg);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm guessing it's something simple I've overlooked due to being new. Any help would be appreciated!" />
  <row Id="37879" PostHistoryTypeId="5" PostId="16426" RevisionGUID="a95685ce-35b8-4976-8d3e-9aee496d8633" CreationDate="2011-08-25T21:44:48.893" UserId="9282" Comment="added 1218 characters in body" Text="I use the following chunk of code to make bullets that fire towards the player's ship:&#xD;&#xA;&#xD;&#xA;    @Override&#xD;&#xA;    public void onTimePassed(final TimerHandler pTimerHandler)&#xD;&#xA;    {&#xD;&#xA;    	pTimerHandler.reset();&#xD;&#xA;    	if(spawnBullets){&#xD;&#xA;    		for(int i = 0; i &lt; enemies.size(); i++){&#xD;&#xA;    			if(enemies.get(i).isShooter()){&#xD;&#xA;    				//shoot from this enemy to ship&#xD;&#xA;    				final Vector2 v = new Vector2(ship.getX() - enemies.get(i).getSprite().getX(),ship.getY() - enemies.get(i).getSprite().getY());&#xD;&#xA;    				v.nor();&#xD;&#xA;    				v.mul(BULLET_SPEED);&#xD;&#xA;    				createEnemyBullet(enemies.get(i).getSprite().getX(),enemies.get(i).getSprite().getY(), v);&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This works fine if the enemy is stationary, i.e. just a `Sprite` with no `Body`, but when the enemy is moving, my game completely freezes up. Sometimes it will happen immediately (on the first attempt to fire), or sometimes 1 or 2 bullets later.&#xD;&#xA;&#xD;&#xA;It gets through this code (a log output after `createEnemyBullet` works fine), but locks up somewhere before anything else happens. Disabling this section of code makes the problem go away. What could be going wrong?&#xD;&#xA;&#xD;&#xA;###Edit&#xD;&#xA;&#xD;&#xA;Here is `createEnemyBullet()`:&#xD;&#xA;&#xD;&#xA;    private void createEnemyBullet(float x, float y, Vector2 v){&#xD;&#xA;    	//remove old bullet&#xD;&#xA;    	if(enemyBullets[enemyBulletCounter] != null){&#xD;&#xA;    		makeBulletExplosion(bullets[i].getX(),bullets[i].getY());&#xD;&#xA;    		mScene.detachChild(bullets[i]);&#xD;&#xA;    		mBulletPhysicsWorld.destroyBody(bulletsPhysical[i]);&#xD;&#xA;    		bullets[i] = null;&#xD;&#xA;    	}&#xD;&#xA;    	//create new bullet &#xD;&#xA;    	enemyBullets[enemyBulletCounter] = new AnimatedSprite(x +8, y +8, this.mEnemyBulletTextureRegion); //Nasty magic number, oh well&#xD;&#xA;    	enemyBulletsBody[enemyBulletCounter] = PhysicsFactory.createCircleBody(this.mBulletPhysicsWorld, enemyBullets[enemyBulletCounter], BodyType.KinematicBody, BULLET_FIXTURE_DEF);&#xD;&#xA;    &#xD;&#xA;    	enemyBullets[enemyBulletCounter].animate(55);&#xD;&#xA;    	enemyBulletsBody[enemyBulletCounter].setLinearVelocity(v);&#xD;&#xA;    &#xD;&#xA;    	this.mBulletPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(enemyBullets[enemyBulletCounter], enemyBulletsBody[enemyBulletCounter], true, true));&#xD;&#xA;    	this.mScene.attachChild(enemyBullets[enemyBulletCounter]);&#xD;&#xA;    	//update counter&#xD;&#xA;    	enemyBulletCounter = enemyBulletCounter &lt; ENEMY_BULLET_MAX -1 ? enemyBulletCounter + 1 : 0;&#xD;&#xA;    }" />
  <row Id="37880" PostHistoryTypeId="2" PostId="16437" RevisionGUID="235d7fb4-149d-46de-b051-a9b1facaaaee" CreationDate="2011-08-25T21:47:22.507" UserId="9496" Text="I wonder if any &quot;ZOTAC Zbox mini PC&quot; will be enough for Blender or DX9/DX10 game programming tasks? Is the new CryEngine 3 Sandbox editor will be enough ION2 Nvidia graphics processor?&#xD;&#xA;&#xD;&#xA;Whether the computer is enough for the same task? : ZOTAC ZBOX HD-ND22? It has an Intel Celeron SU2300 (dual-core) (1.2 GHz) processor." />
  <row Id="37881" PostHistoryTypeId="1" PostId="16437" RevisionGUID="235d7fb4-149d-46de-b051-a9b1facaaaee" CreationDate="2011-08-25T21:47:22.507" UserId="9496" Text="Whether the computer is enough for Blender or DX9/DX10 game programming tasks? : ZOTAC ZBOX HD-ND22" />
  <row Id="37882" PostHistoryTypeId="3" PostId="16437" RevisionGUID="235d7fb4-149d-46de-b051-a9b1facaaaee" CreationDate="2011-08-25T21:47:22.507" UserId="9496" Text="&lt;graphics&gt;&lt;performance&gt;&lt;hardware&gt;&lt;pc&gt;" />
  <row Id="37883" PostHistoryTypeId="5" PostId="16421" RevisionGUID="5ea82177-47f8-4444-ad2a-44a81950c0fd" CreationDate="2011-08-25T21:50:27.960" UserId="159" Comment="added 2083 characters in body" Text="I don't know why that error is getting thrown, but here is a solutions that works.&#xD;&#xA;&#xD;&#xA;    Color[] animationData  = new Color[1];&#xD;&#xA;    animation.GetData&lt;Color&gt;(0,new Rectangle(0,0,1,1),c, 0, 1);&#xD;&#xA;&#xD;&#xA;We are creating a 1x1 rectangle, and only sampling data from that.&#xD;&#xA;&#xD;&#xA;**update**&#xD;&#xA;&#xD;&#xA;Ok, I have had some time you look into this more, and I *think* there *may* be a bug in the framework. When you are doing `Texture2D.GetData&lt;T&gt;(T[] data, int start, int length)` it is just an overload for `Texture2D.GetData&lt;T&gt;(int level, Rectangle? rect, T[] data, int start, int length)` and passes in *null* for the rectangle. If you manually do that (ie. pass in null instead of the 1x1 rectangle) you get the same error. &#xD;&#xA;&#xD;&#xA;Now, follow the chain down, and it eventually calls &#xD;&#xA;&#xD;&#xA;    private unsafe void CopyData&lt;T&gt;(int level, Rectangle? rect, T[] data, int startIndex, int elementCount,...)&#xD;&#xA;&#xD;&#xA;This method is way to long to post here (over 220 lines of code in ILSpy), and since I don't have the whole picture it is hard to figure out. However, this little bit is interesting.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    tagRECT* ptr2 = null;&#xD;&#xA;    Rectangle rectangle = default(Rectangle);&#xD;&#xA;    if (rect.HasValue)&#xD;&#xA;    {&#xD;&#xA;      rectangle = rect.Value;&#xD;&#xA;      ptr2 = ref rectangle;&#xD;&#xA;      if (ptr2 != null)&#xD;&#xA;      {&#xD;&#xA;        *(int*)(ptr2 + 8 / sizeof(tagRECT)) = *(int*)(ptr2 + 8 / sizeof(tagRECT)) + *(int*)ptr2;&#xD;&#xA;        *(int*)(ptr2 + 12 / sizeof(tagRECT)) = *(int*)(ptr2 + 12 / sizeof(tagRECT)) + *(int*)(ptr2 + 4 / sizeof(tagRECT));&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;See how `ptr2` is only defined if you passed in a value for the rectangle? Further down the trail (if I followed the correct code path)&#xD;&#xA;&#xD;&#xA;	num5 = &lt;Module&gt;.D3DXLoadSurfaceFromSurface(ptr3, null, (tagRECT*)ptr2, ptr5, null, (tagRECT*)ptr2, 1, 0);&#xD;&#xA;&#xD;&#xA;and then later we are doing some recursion based on `if num5&gt;=0`. Which recursive cal is actually determined on some other logic I haven't worked out, but I don't think that part matters...famous last words, right? :)&#xD;&#xA;&#xD;&#xA;So all that to say this, I don't think that the Rectangle passed is is *supposed* to be null. A few places in the code it looks like they are trying to force the rectangle to have a value of the texture size. Perhaps it isn't working.&#xD;&#xA;&#xD;&#xA;Take all of that with several grains of salt. I am in not way qualified as a low level GFX programmer. Maybe someone else here can answer for certain.&#xD;&#xA;" />
  <row Id="37885" PostHistoryTypeId="12" PostId="16435" RevisionGUID="56ba64b4-927d-4857-a96d-4d22d8b4b37d" CreationDate="2011-08-25T22:05:36.500" UserId="9486" Text="[{&quot;Id&quot;:9486,&quot;DisplayName&quot;:&quot;Michael Kissner&quot;}]" />
  <row Id="37886" PostHistoryTypeId="13" PostId="16435" RevisionGUID="73f89d5b-f069-40ba-99d7-0cf045c9f63f" CreationDate="2011-08-25T22:07:25.563" UserId="9486" Text="[{&quot;Id&quot;:9486,&quot;DisplayName&quot;:&quot;Michael Kissner&quot;}]" />
  <row Id="37887" PostHistoryTypeId="12" PostId="16435" RevisionGUID="38507214-4d19-40cc-b15a-3477ba58a105" CreationDate="2011-08-25T22:07:32.067" UserId="9486" Text="[{&quot;Id&quot;:9486,&quot;DisplayName&quot;:&quot;Michael Kissner&quot;}]" />
  <row Id="37888" PostHistoryTypeId="13" PostId="16435" RevisionGUID="aeec3e54-09e6-4824-83f1-456f1690f007" CreationDate="2011-08-25T22:07:43.597" UserId="9486" Text="[{&quot;Id&quot;:9486,&quot;DisplayName&quot;:&quot;Michael Kissner&quot;}]" />
  <row Id="37890" PostHistoryTypeId="10" PostId="16437" RevisionGUID="b6652b6a-e45e-4c59-a9cd-daae558f7018" CreationDate="2011-08-25T22:58:49.940" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="37891" PostHistoryTypeId="2" PostId="16439" RevisionGUID="4724f0ad-1863-451b-85ef-2d47be21929c" CreationDate="2011-08-25T23:08:36.617" UserId="159" Text="Farseer is a physics engine, **not** a game engine. Which one is he looking for?&#xD;&#xA;&#xD;&#xA;If he is looking for a game engine check out http://flatredball.com. Alliteratively, if he is looking for something help create the maps, check out http://tide.codeplex.com. It has a UI for laying down tiles, and a &quot;engine&quot; component to draw them in your game.&#xD;&#xA;&#xD;&#xA;If he wanted, he could even mix the two. Use FRB for the screen management, GUI, etc... and use tIDE to help draw the maps. There is really no reason why that can't be done." />
  <row Id="37892" PostHistoryTypeId="2" PostId="16440" RevisionGUID="6f93f8d8-9a87-4e1c-bef1-96135190d6e7" CreationDate="2011-08-25T23:31:35.877" UserId="1101" Text="In theoretical terms the programmable pipeline is slower than the fixed function pipeline. No general purpose processor can compete with a special case processor. The original fixed function pipeline was little more than a bunch of logic gates in a line which is as fast as theoretically possible.&#xD;&#xA;&#xD;&#xA;However, these days the programmable pipeline is the norm. So the hardware is instead geared towards the programmable pipeline. Having lost the initial efficiencies of having a circuit specifically created for one certain data flow, it must accommodate the most common case, which is the shader-based approach. However for backwards compatibility options, the fixed function pipeline is still made available - but the cost is that the old fixed functions have to be transated into shaders, which may well incur a cost. This would explain the performance difference." />
  <row Id="37893" PostHistoryTypeId="2" PostId="16441" RevisionGUID="65817e9c-eeff-499d-b7cc-e439b6d3cca0" CreationDate="2011-08-26T00:27:03.290" UserId="9366" Text="Hmm... I suspect it might have something to do with your circle and not the tiles beneath it. Try making the ground using a single hull and see if you get the same results. If not, it's the tiles like you suspect. If so, your circle isn't as round as you might think it is." />
  <row Id="37894" PostHistoryTypeId="25" PostId="16429" RevisionGUID="5b225796-7f4c-498e-90f5-db6ae4923430" CreationDate="2011-08-26T00:37:54.287" Comment="http://twitter.com/#!/StackGameDev/status/106888062205837313" />
  <row Id="37895" PostHistoryTypeId="5" PostId="16434" RevisionGUID="a9b5fb63-ccc1-43c0-8e71-6fd5bcffb34a" CreationDate="2011-08-26T00:45:01.360" UserId="2289" Comment="added 70 characters in body" Text="I'm a beginner to OpenGL and GLSL especially, and I'm having a lot of trouble getting textures to display via shaders. My shader code compiles without any warnings or errors, but I seem completely unable to render my texture. In fact, nothing's being rendered at all; I'm getting a black screen. Here's my current, simplified code (written in D, but should function almost exactly as it looks as if it were in C++):&#xD;&#xA;&#xD;&#xA;    int main(string[] argv) {&#xD;&#xA;        try {&#xD;&#xA;            ilInit();&#xD;&#xA;            iluInit();&#xD;&#xA;            ilutInit();                 // GOTCHA: These two calls need to be in order!&#xD;&#xA;            ilutRenderer(ILUT_OPENGL);  //&#xD;&#xA;            glfwInit();&#xD;&#xA;            if(SDL_Init(SDL_INIT_VIDEO) &gt; 0) writeln(&quot;ERROR&quot;);&#xD;&#xA;        &#xD;&#xA;            // Create an OpenGL context and window.&#xD;&#xA;            const int VWIDTH = 1600;&#xD;&#xA;            const int VHEIGHT = 900;&#xD;&#xA;            const int WIDTH = 1280;&#xD;&#xA;            const int HEIGHT = 720;&#xD;&#xA;            glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 8);&#xD;&#xA;            glfwOpenWindowHint(GLFW_AUX_BUFFERS, 1);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);&#xD;&#xA;            glfwOpenWindow(WIDTH, HEIGHT, 8, 8, 8, 8, 0, 0, GLFW_WINDOW /+ GLFW_FULLSCREEN +/);&#xD;&#xA;&#xD;&#xA;            GL.bindClassicVersions(true);&#xD;&#xA;            GL.bindModernVersions(true, GLVersion.GL33);&#xD;&#xA;            GL.bindExtensions(true);    // Returns GL_INVALID_ENUM&#xD;&#xA;&#xD;&#xA;            glMatrixMode(GL_PROJECTION);&#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glOrtho(0, VWIDTH, 0, VHEIGHT, -100, 100);&#xD;&#xA;            glMatrixMode(GL_MODELVIEW);&#xD;&#xA;            glLoadIdentity(); &#xD;&#xA;&#xD;&#xA;            // Set clear color&#xD;&#xA;            glClearColor(0, 0, 0, 0);&#xD;&#xA;&#xD;&#xA;            // Set GL enables/disables&#xD;&#xA;            glShadeModel(GL_SMOOTH);                                // Enables smooth shading&#xD;&#xA;            glEnable(GL_TEXTURE_2D);                                // Enable 2D texturing&#xD;&#xA;            glEnable(GL_BLEND);                                     // Enable alpha blending&#xD;&#xA;            glDisable(GL_DEPTH_TEST);                               // Disable depth testing&#xD;&#xA;            glDisable(GL_CULL_FACE);                                // Disable face culling&#xD;&#xA;            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;            //glDepthFunc(GL_LEQUAL);                                 // The depth test type&#xD;&#xA;&#xD;&#xA;            // Initialize and compile shaders&#xD;&#xA;            GLuint vertShaderId, fragShaderId;&#xD;&#xA;            vertShaderId = glCreateShader(GL_VERTEX_SHADER);&#xD;&#xA;            fragShaderId = glCreateShader(GL_FRAGMENT_SHADER);&#xD;&#xA;        &#xD;&#xA;            immutable(GLchar)* vertShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    in vec3 vertex;&#xD;&#xA;    in vec2 texCoord;&#xD;&#xA;&#xD;&#xA;    out vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragmentTexCoord = texCoord;&#xD;&#xA;        gl_Position = vec4(vertex, 1.0);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;            immutable(GLchar)* fragShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    uniform sampler2D firstTexture;&#xD;&#xA;    in vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    layout(location = 0, index = 0) out vec4 fragColor;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;&#xD;&#xA;            glShaderSource(vertShaderId, 1, &amp;vertShaderSrc, null);&#xD;&#xA;            glShaderSource(fragShaderId, 1, &amp;fragShaderSrc, null);&#xD;&#xA;&#xD;&#xA;            glCompileShader(vertShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(vertShaderId);&#xD;&#xA;            glCompileShader(fragShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(fragShaderId);&#xD;&#xA;&#xD;&#xA;            GLuint programId = glCreateProgram();&#xD;&#xA;&#xD;&#xA;            glAttachShader(programId, vertShaderId);&#xD;&#xA;            glAttachShader(programId, fragShaderId);&#xD;&#xA;&#xD;&#xA;            glLinkProgram(programId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(programId);&#xD;&#xA;&#xD;&#xA;            glUseProgram(programId);&#xD;&#xA;            checkGLError();&#xD;&#xA;&#xD;&#xA;            // Load texture&#xD;&#xA;            auto texture = new Texture2d(r&quot;res/test.png&quot;);&#xD;&#xA;            texture.load();&#xD;&#xA;&#xD;&#xA;            bool running = true;&#xD;&#xA;            clearGLError();&#xD;&#xA;            while(running) {&#xD;&#xA;                // Clear viewport&#xD;&#xA;                glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;                // Bind texture ID&#xD;&#xA;                glActiveTexture(GL_TEXTURE0);&#xD;&#xA;                glBindTexture(GL_TEXTURE_2D, texture.textureId);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Set texture uniform value&#xD;&#xA;                auto loc = glGetUniformLocation(programId, &quot;firstTexture&quot;);&#xD;&#xA;                checkGLError();&#xD;&#xA;                glUniform1i(loc, 0);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Render&#xD;&#xA;                glBegin(GL_QUADS);&#xD;&#xA;                    glVertex2d(-1, -1); glTexCoord2d(0, 0);&#xD;&#xA;                    glVertex2d( 1, -1); glTexCoord2d(1, 0);&#xD;&#xA;                    glVertex2d( 1,  1); glTexCoord2d(1, 1);&#xD;&#xA;                    glVertex2d(-1,  1); glTexCoord2d(0, 1);&#xD;&#xA;                glEnd();&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Swap front and back rendering buffers&#xD;&#xA;                glfwSwapBuffers();&#xD;&#xA;&#xD;&#xA;                // Add a tiny delay if no work is being done in the loop.&#xD;&#xA;                //glfwSleep(double.epsilon);&#xD;&#xA;&#xD;&#xA;                // Check if ESC key was pressed or window was closed&#xD;&#xA;                running = !glfwGetKey(GLFW_KEY_ESC) &amp;&amp; glfwGetWindowParam(GLFW_OPENED);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        catch(Throwable t) {&#xD;&#xA;            Logger.log(Severity.Error, t.msg);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm guessing it's something simple I've overlooked due to being new. Any help would be appreciated!" />
  <row Id="37896" PostHistoryTypeId="25" PostId="16322" RevisionGUID="0f940cd9-5775-4564-a558-22dd15c73ddd" CreationDate="2011-08-26T03:37:55.037" Comment="http://twitter.com/#!/StackGameDev/status/106933362253504512" />
  <row Id="37897" PostHistoryTypeId="5" PostId="16405" RevisionGUID="9a516dcc-b750-4e4f-98d0-4514de7fab37" CreationDate="2011-08-26T05:20:19.030" UserId="3644" Comment="added 694 characters in body" Text="Let me try answering that from positions of RTS (think of it as TBS where each turn is 100msec).&#xD;&#xA;&#xD;&#xA;There is separate thread for receiving and sending messages, it has it's own buffer and is black-box to the rest of the game (the game should know nothing about protocol and format). The game sends commands to networking unit and receives complete commands as they are available and verified to be complete.&#xD;&#xA;&#xD;&#xA;When networking unit receives a new message it appends it to buffer and checks if buffer has a complete command. That is why each message has a header specifying contents length and CRC. That is ASync part of it.&#xD;&#xA;&#xD;&#xA;How to identify the host? That depends on your network layout, is peer-to-peer or centralized server or .. ? If you trust your clients to do the computations (not advised for serious gaming) then there's no host at all, Everyone trusts everyone to supply valid data. If you have a separate host (could be running as stand-alone task on one of players machines) - it does all the computations and clients act as terminals, doing only View-Controller roles.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;We use TCP module from OverbyteICS (that is one more layer between the networking module and Net) and it does it for us, each time new connection is made it is assigned new &quot;stream&quot;. So when message arrives we know the &quot;stream&quot; who sent it, but in networking module we keep remap table, so that in lobby all players have UIDs and in game all players are IDs 1..8 (again, game knows nothing about networking UIDs). &#xD;&#xA;&#xD;&#xA;As for specific details I can't say how it's made inside OverbyteICS, but we have possibility to launch local server and 1-8 clients on the same PC (all having same IP 127.0.0.1) and they are all distinct in game, so this means OverbyteICS takes care of that." />
  <row Id="37898" PostHistoryTypeId="2" PostId="16442" RevisionGUID="1649226c-4ca7-42c5-ae1e-39c3b764b558" CreationDate="2011-08-26T05:46:04.250" UserId="9332" Text="Everyone.. &#xD;&#xA;I have experience in only physics base game in cocos2d. &#xD;&#xA;And wonder to look some turn base game after that i decide to make in ios. &#xD;&#xA; &#xD;&#xA;I want to develop one turn based game in cocoa touch (ios). Two players play this game in different devices which connect from bluetooth and also from game centre which player online there..&#xD;&#xA;&#xD;&#xA;And wants to know about how to synchronise two device with bluetooth connection..&#xD;&#xA;&#xD;&#xA;I requset to all please tell me the any blog tutorial or doc file or sample code which help me more as per my knowledge..&#xD;&#xA;&#xD;&#xA;Thanks.." />
  <row Id="37899" PostHistoryTypeId="1" PostId="16442" RevisionGUID="1649226c-4ca7-42c5-ae1e-39c3b764b558" CreationDate="2011-08-26T05:46:04.250" UserId="9332" Text="Turn Based game for two players which play in different devices in ios" />
  <row Id="37900" PostHistoryTypeId="3" PostId="16442" RevisionGUID="1649226c-4ca7-42c5-ae1e-39c3b764b558" CreationDate="2011-08-26T05:46:04.250" UserId="9332" Text="&lt;network&gt;&lt;ios&gt;&lt;game-center&gt;" />
  <row Id="37901" PostHistoryTypeId="2" PostId="16443" RevisionGUID="e0218a6c-c4b0-41a8-9656-41e980c46764" CreationDate="2011-08-26T06:30:33.283" UserId="159" Text="I sort of got it. Maybe with some tweaking you can get it the rest of the way.&#xD;&#xA;&#xD;&#xA;first in the **Update**, I get the amount to rotate by&#xD;&#xA;&#xD;&#xA;    var ks = Keyboard.GetState();&#xD;&#xA;    &#xD;&#xA;    if (ks.IsKeyDown(Keys.Down))&#xD;&#xA;        xAxis += 1f;&#xD;&#xA;    if (ks.IsKeyDown(Keys.Up))&#xD;&#xA;        xAxis -= 1f;&#xD;&#xA;    &#xD;&#xA;    Xtransform = Matrix.CreateRotationX(MathHelper.ToRadians(xAxis));&#xD;&#xA;&#xD;&#xA;then create an effect and apply the transformation. The `Matrix.CreateOrthographicOffCenter` is just to position our camera. It is assuming a 800x600 screen. We then multiply it by our rotation transform.&#xD;&#xA;&#xD;&#xA;    BasicEffect e = new BasicEffect(GraphicsDevice);&#xD;&#xA;    e.World = Matrix.Identity;&#xD;&#xA;    e.View = Matrix.Identity;&#xD;&#xA;    e.TextureEnabled = true;&#xD;&#xA;    e.Texture = sprite;&#xD;&#xA;    e.Projection = Matrix.CreateOrthographicOffCenter(0, 800, 600, 0, 0, 1) * Xtransform;&#xD;&#xA;&#xD;&#xA;Now in **Draw** just apply the effect to the SpriteBatch.Begin method (using the 4th overload). I say it sort of works because it only rotates TOWARDS the screen. It disappears when you rotate away.  The picture below shows what it looks like before (top) and after (bottom). This is what you wanted, right? I know it just looks squished, but it is a 2d texture. It isn't meant to bend that way :)&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/QwZE4.png" />
  <row Id="37902" PostHistoryTypeId="2" PostId="16444" RevisionGUID="659c2b19-06d7-47e1-9182-ad34b0732edc" CreationDate="2011-08-26T06:35:57.190" UserId="9497" Text="I'm just getting started build my first game with XNA (I'm experienced with C# but not games).&#xD;&#xA;&#xD;&#xA;I'm building a pretty simple top down 2d shooter. I read this tutorial on using a color based collision system and it sounded really cool to me. http://www.xnadevelopment.com/tutorials/theroadnottaken/theroadnottaken.shtml&#xD;&#xA;&#xD;&#xA;It means I can quickly make levels just using any graphics program and not have to define my scenery (walls, trees etc) in terms of collision boxes etc right?&#xD;&#xA;&#xD;&#xA;However I can see that going down this path means that perhaps the calculation for determining whether fast moving objects like bullets intersect walls etc becomes more difficult potentially because you cant' do basic geometry intersection type calcs.&#xD;&#xA;&#xD;&#xA;Is that right? Am I going to regret going in this direction if my game gets more complex over time? Worth just investing in the creation of a level editor to define my scenery in terms of geometry?&#xD;&#xA;&#xD;&#xA;Any advice for a noob very much appreciated!" />
  <row Id="37903" PostHistoryTypeId="1" PostId="16444" RevisionGUID="659c2b19-06d7-47e1-9182-ad34b0732edc" CreationDate="2011-08-26T06:35:57.190" UserId="9497" Text="Am I going to regret using a color based collision detection system?" />
  <row Id="37904" PostHistoryTypeId="3" PostId="16444" RevisionGUID="659c2b19-06d7-47e1-9182-ad34b0732edc" CreationDate="2011-08-26T06:35:57.190" UserId="9497" Text="&lt;xna&gt;&lt;collision-detection&gt;&lt;geometry&gt;" />
  <row Id="37905" PostHistoryTypeId="25" PostId="16401" RevisionGUID="a34f3f80-2741-4e59-9e87-b92c44ba8f72" CreationDate="2011-08-26T06:37:55.037" Comment="http://twitter.com/#!/StackGameDev/status/106978661332295680" />
  <row Id="37906" PostHistoryTypeId="5" PostId="16435" RevisionGUID="4e3c16db-22fd-453f-9671-48d91c043846" CreationDate="2011-08-26T06:45:37.817" UserId="9486" Comment="added 151 characters in body" Text="One thing I noticed is that you commented out the actual color finding procedure:&#xD;&#xA;&#xD;&#xA;        //fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;        fragColor = vec4(1, 0, 0, 1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another Problem:&#xD;&#xA;&#xD;&#xA;        glVertex2d(-1, -1); glTexCoord2d(0, 0);&#xD;&#xA;should be:&#xD;&#xA;&#xD;&#xA;        glTexCoord2d(0, 0); glVertex2d(-1, -1); &#xD;&#xA;in all the lines" />
  <row Id="37909" PostHistoryTypeId="2" PostId="16446" RevisionGUID="11b0e46e-3e48-4347-89de-4d208693287b" CreationDate="2011-08-26T07:16:51.133" UserId="1693" Text="I'm trying to use direct2d to render images off-screen using [WindowsAPICodePack][1]. This is easily achieved using WicBitmapRenderTarget but sadly it's not hardware accelerated.&#xD;&#xA;&#xD;&#xA;So I'm trying this route:&#xD;&#xA;&#xD;&#xA; 1. Create direct3d device&#xD;&#xA; 2. Create texture2d&#xD;&#xA; 3. Use texture surface to create render target using [CreateDxgiSurfaceRenderTarget][2]&#xD;&#xA; 4. Draw some shapes&#xD;&#xA;&#xD;&#xA;While this renders the image it appears GPU isn't being used at all while CPU is used heavily.&#xD;&#xA;&#xD;&#xA;Am I doing something wrong? Is there a way to check whether hardware or software rendering is used?&#xD;&#xA;&#xD;&#xA;Code sample:&#xD;&#xA;&#xD;&#xA;    var device =  D3DDevice1.CreateDevice1(&#xD;&#xA;                    null,&#xD;&#xA;                    DriverType.Hardware,&#xD;&#xA;                    null,&#xD;&#xA;                    CreateDeviceOptions.SupportBgra&#xD;&#xA;                    ,FeatureLevel.Ten&#xD;&#xA;                    );&#xD;&#xA;&#xD;&#xA;     var txd = new Texture2DDescription();&#xD;&#xA;                txd.Width = 256;&#xD;&#xA;                txd.Height = 256;&#xD;&#xA;                txd.MipLevels = 1;&#xD;&#xA;                txd.ArraySize = 1;&#xD;&#xA;                txd.Format = Format.B8G8R8A8UNorm; //DXGI_FORMAT_R32G32B32A32_FLOAT;&#xD;&#xA;                txd.SampleDescription = new SampleDescription(1,0);&#xD;&#xA;                txd.Usage = Usage.Default;&#xD;&#xA;                txd.BindingOptions = BindingOptions.RenderTarget | BindingOptions.ShaderResource;&#xD;&#xA;                txd.MiscellaneousResourceOptions = MiscellaneousResourceOptions.None;&#xD;&#xA;                txd.CpuAccessOptions = CpuAccessOptions.None;&#xD;&#xA;                                &#xD;&#xA;                var tx = device.CreateTexture2D(txd);&#xD;&#xA;&#xD;&#xA;                var srfc = tx.GraphicsSurface;&#xD;&#xA;&#xD;&#xA;                var d2dFactory = D2DFactory.CreateFactory();&#xD;&#xA;&#xD;&#xA;                var renderTargetProperties = new RenderTargetProperties&#xD;&#xA;                {&#xD;&#xA;                    PixelFormat = new PixelFormat(Format.Unknown, AlphaMode.Premultiplied),&#xD;&#xA;                    DpiX = 96,&#xD;&#xA;                    DpiY = 96,&#xD;&#xA;                    RenderTargetType = RenderTargetType.Default,&#xD;&#xA;                };&#xD;&#xA;                &#xD;&#xA;                using(var renderTarget = d2dFactory.CreateGraphicsSurfaceRenderTarget(srfc, renderTargetProperties))&#xD;&#xA;                {&#xD;&#xA;                    renderTarget.BeginDraw();&#xD;&#xA;                    var clearColor = new ColorF(1f,1f,1f,1f);&#xD;&#xA;                    renderTarget.Clear(clearColor);&#xD;&#xA;                    using (var strokeBrush = renderTarget.CreateSolidColorBrush(new ColorF(0.2f,0.2f,0.2f,1f)))&#xD;&#xA;                    {&#xD;&#xA;                        for (var i = 0; i &lt; 100000; i++)&#xD;&#xA;                        {&#xD;&#xA;                            renderTarget.DrawEllipse(new Ellipse(new Point2F(i, i), 10, 10), strokeBrush, 2);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    var hr = renderTarget.EndDraw();&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;  [1]: http://archive.msdn.microsoft.com/WindowsAPICodePack&#xD;&#xA;  [2]: http://msdn.microsoft.com/en-us/library/dd370966%28v=VS.85%29.aspx#writing_to_a_direct3d_surface_with_a_dxgi_surface_render_target" />
  <row Id="37910" PostHistoryTypeId="1" PostId="16446" RevisionGUID="11b0e46e-3e48-4347-89de-4d208693287b" CreationDate="2011-08-26T07:16:51.133" UserId="1693" Text="Direct2d off-screen rendering and hardware acceleration" />
  <row Id="37911" PostHistoryTypeId="3" PostId="16446" RevisionGUID="11b0e46e-3e48-4347-89de-4d208693287b" CreationDate="2011-08-26T07:16:51.133" UserId="1693" Text="&lt;c#&gt;&lt;.net&gt;&lt;directx10&gt;" />
  <row Id="37912" PostHistoryTypeId="2" PostId="16447" RevisionGUID="b750f74b-84c1-46a6-bab2-1fb1df1f5657" CreationDate="2011-08-26T07:41:39.487" UserId="20" Text="You're spot on with your observations regarding the capabilities of a bitmap based collision approach.&#xD;&#xA;&#xD;&#xA;This method provides a really easy way to edit your levels with any program that can output a bitmap (any image editing program). This system is also really flexible when you want to define different types of ground. Say `green` is for mud, and `red` is a solid underground. You then easily query the current pixel and determine the type of underground the player stands on. Even ramps (gradients from ground type A to B) are possible without much problems.&#xD;&#xA;&#xD;&#xA;Problems arise with collision detection. It's easy to detect an intersection with another object (just do a pixel-test), but it's hard (computationally expensive) to find out what orientation the object you collided with has. This is especially important when you need a [surface normal to deflect objects correctly][1].&#xD;&#xA;&#xD;&#xA;Also really fast moving objects can be an issue, especially if you have thin (eg. 1 pixel wide) objects to collide with. There's this [question][2] that covers this topic already.&#xD;&#xA;&#xD;&#xA;In the end it all depends on what kind of game you want to create and what resolution (in terms of collision detection/resolving) you need. The bitmap based approach works best, when a large portion of your world is static. But it also allows you to implement stuff like [destructible levels][3] quite easily.&#xD;&#xA;&#xD;&#xA;Since you didn't mention the type of game you want to create, it's now up to you to decide weather or not a bitmap-based collision approach would be beneficial for your game. Good luck.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2853/how-do-i-calculate-the-angle-of-the-slope-at-a-point-on-a-2d-bitmap-terrain&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2942/whats-the-most-efficient-way-to-find-the-intersection-point-of-a-missile-and-a-b&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/6721/implementing-a-2d-destructible-landscape-like-worms" />
  <row Id="37914" PostHistoryTypeId="25" PostId="16317" RevisionGUID="96384398-dc76-4b5d-a199-b378fce83e57" CreationDate="2011-08-26T09:37:55.057" Comment="http://twitter.com/#!/StackGameDev/status/107023960847286272" />
  <row Id="37918" PostHistoryTypeId="2" PostId="16449" RevisionGUID="7404e34c-451b-48e2-b292-0a5b55a19b49" CreationDate="2011-08-26T11:32:44.770" UserId="5125" Text="I'm looking for an (easy to use) &quot;3D painting&quot; program, a program that lets me load up a UV-mapped mesh, some textures and lets me 'paint' with those different textures.&#xD;&#xA;&#xD;&#xA;Exactly like all those terrain painting programs (Unity 3D has one integrated for example) but for a generic mesh, not just a height map.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Cheap is better of course but ease to use is the most important.&#xD;&#xA;Script support is a big plus though.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="37919" PostHistoryTypeId="1" PostId="16449" RevisionGUID="7404e34c-451b-48e2-b292-0a5b55a19b49" CreationDate="2011-08-26T11:32:44.770" UserId="5125" Text="3D painting program" />
  <row Id="37920" PostHistoryTypeId="3" PostId="16449" RevisionGUID="7404e34c-451b-48e2-b292-0a5b55a19b49" CreationDate="2011-08-26T11:32:44.770" UserId="5125" Text="&lt;3d&gt;&lt;painting&gt;" />
  <row Id="37922" PostHistoryTypeId="2" PostId="16450" RevisionGUID="47e7ad91-d159-4381-a8de-246c118acadc" CreationDate="2011-08-26T11:41:50.407" UserId="5473" Text="It's really easy to do on-surface painting with Blender (either 2.49b which has the better documentation, or 2.5 which has the vastly improved interface) is pretty good for this. I would check out the &quot;Johnny Blender&quot; tutorials on youtube for Blender in general, though I'm not sure if he covers this particular topic. &#xD;&#xA;&#xD;&#xA;And of course, it's totally free, and supports scripting through python, and there are tons of export scripts and so on out there for different formats eg. FBX." />
  <row Id="37923" PostHistoryTypeId="5" PostId="16450" RevisionGUID="b647fccd-f639-4b27-bc62-85599d4a36bd" CreationDate="2011-08-26T11:52:39.533" UserId="5473" Comment="deleted 25 characters in body" Text="It's really easy to do on-surface painting with Blender: either 2.49b which has the better documentation, or 2.5 which has the vastly improved interface. I would check out the &quot;Johnny Blender&quot; tutorials on youtube for Blender in general, though I'm not sure if the guy who made them covers this particular topic. &#xD;&#xA;&#xD;&#xA;And of course, it's totally free, and supports scripting through python, and there are tons of export scripts and so on out there for different formats eg. FBX." />
  <row Id="37924" PostHistoryTypeId="2" PostId="16451" RevisionGUID="25eb29f7-1327-464d-93fb-0b4a1fd9f141" CreationDate="2011-08-26T12:09:56.213" UserId="1141" Text="Try out [Sculptris][1] - free, easy to use, and can be used to create high-quality organic models as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.pixologic.com/sculptris/" />
  <row Id="37925" PostHistoryTypeId="5" PostId="16447" RevisionGUID="c08fca60-017a-4aff-bb93-5802949e0f50" CreationDate="2011-08-26T12:33:53.513" UserId="20" Comment="fixed typo" Text="You're spot on with your observations regarding the capabilities of a bitmap based collision approach.&#xD;&#xA;&#xD;&#xA;This method provides a really easy way to edit your levels with any program that can output a bitmap (any image editing program). This system is also really flexible when you want to define different types of ground. Say `green` for mud, and `red` for a solid underground. You then easily query the current pixel and determine the type of underground the player stands on. Even ramps (gradients from ground type A to B) are possible without much problems.&#xD;&#xA;&#xD;&#xA;Problems arise with collision detection. It's easy to detect an intersection with another object (just do a pixel-test), but it's hard (computationally expensive) to find out what orientation the object you collided with has. This is especially important when you need a [surface normal to deflect objects correctly][1].&#xD;&#xA;&#xD;&#xA;Also really fast moving objects can be an issue, especially if you have thin (eg. 1 pixel wide) objects to collide with. There's this [question][2] that covers this topic already.&#xD;&#xA;&#xD;&#xA;In the end it all depends on what kind of game you want to create and what resolution (in terms of collision detection/resolving) you need. The bitmap based approach works best, when a large portion of your world is static. But it also allows you to implement stuff like [destructible levels][3] quite easily.&#xD;&#xA;&#xD;&#xA;Since you didn't mention the type of game you want to create, it's now up to you to decide whether or not a bitmap-based collision approach would be beneficial for your game. Good luck.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/2853/how-do-i-calculate-the-angle-of-the-slope-at-a-point-on-a-2d-bitmap-terrain&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/2942/whats-the-most-efficient-way-to-find-the-intersection-point-of-a-missile-and-a-b&#xD;&#xA;  [3]: http://gamedev.stackexchange.com/questions/6721/implementing-a-2d-destructible-landscape-like-worms" />
  <row Id="37926" PostHistoryTypeId="25" PostId="16444" RevisionGUID="c1da5b22-acdf-4c9c-86d3-596127bfa481" CreationDate="2011-08-26T12:37:55.240" Comment="http://twitter.com/#!/StackGameDev/status/107069258059616257" />
  <row Id="37927" PostHistoryTypeId="2" PostId="16452" RevisionGUID="9dca7a76-374e-4321-b49c-05c9e7df5fd3" CreationDate="2011-08-26T13:20:23.017" UserId="1808" Text="I'm about to start writing an iOS game and I'm going to use mainly C++/C for the core gameplay logic. &#xD;&#xA;&#xD;&#xA;I really like pre-allocating everything in the game and try to avoid any dynamic allocations as much as possible. With my own C++/C code it's not a big deal. However there are some ObjC libraries which I'd like to re-use and I'm not sure to inject my custom memory allocator to Cocoa based classes. &#xD;&#xA;&#xD;&#xA;Is there any central 'inject point' in Cocoa where I can do that?" />
  <row Id="37928" PostHistoryTypeId="1" PostId="16452" RevisionGUID="9dca7a76-374e-4321-b49c-05c9e7df5fd3" CreationDate="2011-08-26T13:20:23.017" UserId="1808" Text="iOS custom memory allocator" />
  <row Id="37929" PostHistoryTypeId="3" PostId="16452" RevisionGUID="9dca7a76-374e-4321-b49c-05c9e7df5fd3" CreationDate="2011-08-26T13:20:23.017" UserId="1808" Text="&lt;ios&gt;&lt;objective-c&gt;&lt;memory-efficiency&gt;" />
  <row Id="37933" PostHistoryTypeId="2" PostId="16454" RevisionGUID="cafb63b4-51dd-41f1-a85c-4bf9cd45d0b5" CreationDate="2011-08-26T13:52:44.040" UserId="7620" Text="I recently created a game ([LD21](http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&amp;uid=2443)) that uses a geometry shader to convert points into textured triangles/culling. Since I was under the impression that the support for #330 was widespread I only wrote #330 shaders, but it seems that a lot of not so old hardware only support #130 (according to GLView)&#xD;&#xA;&#xD;&#xA;Now, since I'm only familiar with the #330 core functionality I am having trouble rewriting my shaders to #130. The fragment shader was quite trivial to rewrite, but I've only managed to get my vertex and geometry shader down to #150.&#xD;&#xA;&#xD;&#xA;So, is it possible to rewrite the shaders, or would it require a lot of changes in my rendering engine?&#xD;&#xA;&#xD;&#xA;#Geometry shader&#xD;&#xA;    #version 150&#xD;&#xA;    layout(points) in;&#xD;&#xA;    layout(triangle_strip, max_vertices = 4) out;&#xD;&#xA;    uniform mat4 oMatrix;&#xD;&#xA;    in VertexData&#xD;&#xA;    {&#xD;&#xA;    	vec4 position;&#xD;&#xA;    	vec4 texcoord;&#xD;&#xA;    	vec4 size;&#xD;&#xA;    } vert;&#xD;&#xA;    &#xD;&#xA;    out vec2 gTexCoord;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    	if(vert.position.x&gt;-4f &amp;&amp; vert.position.x&lt;4f &amp;&amp; vert.position.y&gt;-2f &amp;&amp; vert.position.y&lt;2f)&#xD;&#xA;    	{&#xD;&#xA;    		gTexCoord=vec2(vert.texcoord.z,vert.texcoord.y);&#xD;&#xA;    		gl_Position = vert.position + vec4(vert.size.x,vert.size.y,0,0);&#xD;&#xA;    		EmitVertex();&#xD;&#xA;    &#xD;&#xA;    		gTexCoord=vec2(vert.texcoord.x,vert.texcoord.y);&#xD;&#xA;    		gl_Position = vert.position + vec4(0.0,vert.size.y,0,0);&#xD;&#xA;    		EmitVertex();&#xD;&#xA;    	&#xD;&#xA;    		gTexCoord=vec2(vert.texcoord.z,vert.texcoord.w);&#xD;&#xA;    		gl_Position = vert.position + vec4(vert.size.x,0.0,0,0);&#xD;&#xA;    		EmitVertex();&#xD;&#xA;    &#xD;&#xA;    		gTexCoord=vec2(vert.texcoord.x,vert.texcoord.w);&#xD;&#xA;    		gl_Position = vert.position;&#xD;&#xA;    		EmitVertex();&#xD;&#xA;    &#xD;&#xA;    		EndPrimitive();&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;#Vertex shader&#xD;&#xA;    #version 150&#xD;&#xA;    #extension GL_ARB_explicit_attrib_location : enable&#xD;&#xA;    &#xD;&#xA;    layout (location = 0) in vec2 position;&#xD;&#xA;    layout (location = 1) in vec4 textureCoord;&#xD;&#xA;    layout (location = 2) in vec2 size;&#xD;&#xA;    uniform mat4 oMatrix;&#xD;&#xA;    uniform vec2 offset;&#xD;&#xA;    out VertexData&#xD;&#xA;    {&#xD;&#xA;    	vec4 position;&#xD;&#xA;    	vec4 texcoord;&#xD;&#xA;    	vec4 size;&#xD;&#xA;    } outData;&#xD;&#xA;    &#xD;&#xA;    void main()&#xD;&#xA;    {&#xD;&#xA;    	outData.position = oMatrix * vec4(position.x+offset.x,position.y+offset.y,0,1);&#xD;&#xA;    	outData.texcoord = textureCoord;&#xD;&#xA;    	outData.size = oMatrix * vec4(size.x,size.y,0,0);&#xD;&#xA;    }&#xD;&#xA;" />
  <row Id="37934" PostHistoryTypeId="1" PostId="16454" RevisionGUID="cafb63b4-51dd-41f1-a85c-4bf9cd45d0b5" CreationDate="2011-08-26T13:52:44.040" UserId="7620" Text="GLSL - Rewriting shaders from 3.3 to 3.0" />
  <row Id="37935" PostHistoryTypeId="3" PostId="16454" RevisionGUID="cafb63b4-51dd-41f1-a85c-4bf9cd45d0b5" CreationDate="2011-08-26T13:52:44.040" UserId="7620" Text="&lt;opengl&gt;&lt;glsl&gt;" />
  <row Id="37937" PostHistoryTypeId="4" PostId="16454" RevisionGUID="fca646ac-c54f-445b-900b-d67bec59e32f" CreationDate="2011-08-26T14:03:01.137" UserId="7620" Comment="edited title" Text="GLSL - Rewriting shaders from #330 to #130" />
  <row Id="37939" PostHistoryTypeId="17" PostId="16455" RevisionGUID="0f644e6e-3b19-4f8e-bbad-0fe944679d54" CreationDate="2011-08-26T14:31:04.963" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/28771/is-tetris-public-domain" Text="" />
  <row Id="37940" PostHistoryTypeId="17" PostId="16456" RevisionGUID="74ad6d94-fc18-487c-b42c-39ca7c343f5d" CreationDate="2011-08-26T14:31:04.963" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/28771/is-tetris-public-domain" Text="" />
  <row Id="37941" PostHistoryTypeId="17" PostId="16457" RevisionGUID="e94c2925-6f80-4163-a28f-7843659963ff" CreationDate="2011-08-26T14:31:04.963" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/28771/is-tetris-public-domain" Text="" />
  <row Id="37942" PostHistoryTypeId="17" PostId="16458" RevisionGUID="19844dba-2f06-45e4-81bb-ff1dd00b6ad3" CreationDate="2011-08-26T14:31:04.963" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/28771/is-tetris-public-domain" Text="" />
  <row Id="37943" PostHistoryTypeId="2" PostId="16456" RevisionGUID="e9e90d22-0e7f-4ea5-a02e-5c9393514d8b" CreationDate="2011-08-26T14:27:29.647" UserDisplayName="Florent Ducellier" Text="Tetris has been programmed in 1984 and sold commercially ever since.&#xD;&#xA;Since his author is not dead yet (I think), and certainly not dead for 70 years, it's definitely not in the public domain.&#xD;&#xA;&#xD;&#xA;It's not an abandon-ware either because there's at least one company that claims to have the rights and wants to make money out of it.&#xD;&#xA;Now, as to who really owns the rights, that's highly questionable, as you can see in the [Wikipedia article][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Tetris#History" />
  <row Id="37944" PostHistoryTypeId="2" PostId="16457" RevisionGUID="2b36cf0e-fe44-442f-b8b7-d5dae4522316" CreationDate="2011-08-26T14:28:35.590" UserDisplayName="Thrillho" Text="The game, name, and all associated works of Tetris are owned and trademarked by [The Tetris Company][1].&#xD;&#xA;&#xD;&#xA;The concept of [tetrominos][2], however, are not owned by anyone. Though The Tetris Company's website indicates the term 'Tetriminos' is in fact trademarked.&#xD;&#xA;&#xD;&#xA;Whether you can create a clone of Tetris under another name is certainly up for debate. Recently a 'Tetris-clone' named Blockles was removed after [litigation from the Tetris Company was brought against it][3]. I have not been able to find the game in question to see just how close to the original Tetris game it was.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.tetris.com/&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Tetromino&#xD;&#xA;  [3]: http://www.businesswire.com/news/home/20090910006464/en/Resolution-Litigation-%E2%80%9CBlockles%E2%80%9D-Announced-Tetris-Holding-LLC" />
  <row Id="37945" PostHistoryTypeId="2" PostId="16458" RevisionGUID="2bea7231-b5af-4037-a557-56b8ffa0e14e" CreationDate="2011-08-26T14:30:42.013" UserDisplayName="Powerlord" Text="Game concepts cannot be copyrighted (or patented).  If a clone is close enough to the original, the creator can be sued.  However, they must be extremely close to the original." />
  <row Id="37946" PostHistoryTypeId="2" PostId="16455" RevisionGUID="a51f198f-65b9-4b59-913c-2eddeb364cf0" CreationDate="2011-08-26T14:03:28.033" UserDisplayName="Friend" Text="is the concept for Tetris in the public domain or is there someone who is still collecting royalties on the concept? I mean, if I were to write a variant of Tetris would I owe somebody some money?&#xD;&#xA;Thanks." />
  <row Id="37947" PostHistoryTypeId="1" PostId="16455" RevisionGUID="a51f198f-65b9-4b59-913c-2eddeb364cf0" CreationDate="2011-08-26T14:03:28.033" UserDisplayName="Friend" Text="Is Tetris public domain?" />
  <row Id="37948" PostHistoryTypeId="3" PostId="16455" RevisionGUID="a51f198f-65b9-4b59-913c-2eddeb364cf0" CreationDate="2011-08-26T14:03:28.033" UserDisplayName="Friend" Text="&lt;untagged&gt;" />
  <row Id="37949" PostHistoryTypeId="6" PostId="16455" RevisionGUID="c84f518b-7b3c-4104-9843-9c48c85e9c56" CreationDate="2011-08-26T14:32:49.187" UserId="6558" Comment="edited tags" Text="&lt;legal&gt;" />
  <row Id="37950" PostHistoryTypeId="5" PostId="16442" RevisionGUID="a93e86af-545b-41d5-9fb9-198e71475edb" CreationDate="2011-08-26T14:36:38.410" UserId="953" Comment="corrected grammar and syntax." Text="I only have experience in physics-based games in cocos2d.&#xD;&#xA;&#xD;&#xA;I want to develop a turn-based game in Cocoa Touch (iOS). Two players will play this game on different devices which connect via Bluetooth or Game Center.&#xD;&#xA;&#xD;&#xA;I'd like to know how to synchronise two devices through a Bluetooth connection.&#xD;&#xA;&#xD;&#xA;Please tell me of any blog tutorial, guide, or sample code which will help.&#xD;&#xA;&#xD;&#xA;Thanks!" />
  <row Id="37951" PostHistoryTypeId="4" PostId="16442" RevisionGUID="a93e86af-545b-41d5-9fb9-198e71475edb" CreationDate="2011-08-26T14:36:38.410" UserId="953" Comment="corrected grammar and syntax." Text="How do I make a turn based game for two players who play with different devices on iOS?" />
  <row Id="37952" PostHistoryTypeId="2" PostId="16459" RevisionGUID="799fbaf1-7b18-42d8-9e49-44e8255f13d2" CreationDate="2011-08-26T14:40:41.437" UserId="7831" Text="First of all, you won't be able to use `struct`s for varying data (changed by 1.50), but you still can use `in` and `out` instead of `attribute` and `varying`. Additionally you have to write into the builtin variable `gl_Position` in the vertex shader (changed by 1.40). So in your vertex shader substitute the declaration of `outData` with something similar to&#xD;&#xA;&#xD;&#xA;    out vec4 texcoord;&#xD;&#xA;    out vec4 vSize;       //size already used&#xD;&#xA;&#xD;&#xA;and use `gl_Position` instead of `outData.position`.&#xD;&#xA;&#xD;&#xA;I'm not sure if the ARB_explicit_attrib_location extension is already core, so maybe you have to add &#xD;&#xA;&#xD;&#xA;    #extension ARB_explicit_attrib_location : require&#xD;&#xA;&#xD;&#xA;to use the `layout` syntax or just set the attribute locations in the application by calling `glBindAttribLocation` before linking the shader, if this extension is not supprted.&#xD;&#xA;&#xD;&#xA;In the geometry shader change the decralation of vert to something like&#xD;&#xA;&#xD;&#xA;    in vec4 texcoord[];      //names have to match vertex shader, of course&#xD;&#xA;    in vec4 vSize[];&#xD;&#xA;&#xD;&#xA;Although you only get a single input (as you're using points), they still have to be arrays, I think (although always index with `[0]`, when used). Change the use of `vert.position` to `gl_PositionIn[0]`.&#xD;&#xA;&#xD;&#xA;Next, I think the `layout` syntax for the geometry shader has been introduced in 1.50, so you might have to set the geometry shader layout in the application by means of `glProgramParameteri`.&#xD;&#xA;&#xD;&#xA;I have to admit, that I have not much practical experience with geometry shaders or the modern syntax, as I still sit on 2.1 hardware, but all these changes can be deduced by looking into the respective [specifications](http://www.opengl.org/documentation/specs/). Just look at the shader info logs if compilation (or linking) fails to gain some hints about what could be wrong.&#xD;&#xA;&#xD;&#xA;The missing of the `layout` syntax in both the vertex and the geometry shader are the only things that might require some small additions to your application code, but I'm not completely sure if they are really unsupprted, so try them last." />
  <row Id="37953" PostHistoryTypeId="5" PostId="2000" RevisionGUID="5a056a9f-15a0-48fa-a4b1-0dfc80ae30fc" CreationDate="2011-08-26T14:42:15.317" UserId="8400" Comment="corrected spelling, removed signature" Text="Another possibility to generate asteroids dynamically would be to take a predetermined form from a set, and modify a random number of times the edges: you take an edge, choose a point on this edge (near the middle), and move it along the perpendicular direction, towards the outside or the inside. You replace your initial edge with the two edges resulting of the use of the point:   &#xD;&#xA;&#xD;&#xA;`A---------B`   become    &#xD;&#xA;&#xD;&#xA;    A--     --B     &#xD;&#xA;       --C--&#xD;&#xA;&#xD;&#xA;You can do this a number of times, on initial or resulting edges. This is a simple fractal/recursive modification of the edges. (As with all recursive modification, the size of variation should go down with the depth.)" />
  <row Id="37954" PostHistoryTypeId="24" PostId="2000" RevisionGUID="5a056a9f-15a0-48fa-a4b1-0dfc80ae30fc" CreationDate="2011-08-26T14:42:15.317" Comment="Proposed by 8400 approved by 1430 edit id of 674" />
  <row Id="37955" PostHistoryTypeId="5" PostId="16442" RevisionGUID="34006209-4ddd-4e69-ba9d-3972e0d21837" CreationDate="2011-08-26T14:45:16.593" UserId="1198" Comment="deleted 11 characters in body" Text="I only have experience in physics-based games in cocos2d.&#xD;&#xA;&#xD;&#xA;I want to develop a turn-based game in Cocoa Touch (iOS). Two players will play this game on different devices which connect via Bluetooth or Game Center.&#xD;&#xA;&#xD;&#xA;I'd like to know how to synchronise two devices through a Bluetooth connection.&#xD;&#xA;&#xD;&#xA;Please tell me of any blog tutorial, guide, or sample code which will help." />
  <row Id="37956" PostHistoryTypeId="5" PostId="16459" RevisionGUID="e6d5be51-c05b-4cc6-bb81-cd390d709af2" CreationDate="2011-08-26T14:45:45.267" UserId="7831" Comment="added 163 characters in body" Text="First of all, you won't be able to use `struct`s for varying data (changed by 1.50), but you still can use `in` and `out` instead of `attribute` and `varying`. Additionally you have to write into the builtin variable `gl_Position` in the vertex shader (changed by 1.40). So in your vertex shader substitute the declaration of `outData` with something similar to&#xD;&#xA;&#xD;&#xA;    out vec4 texcoord;&#xD;&#xA;    out vec4 vSize;       //size already used&#xD;&#xA;&#xD;&#xA;and use `gl_Position` instead of `outData.position`.&#xD;&#xA;&#xD;&#xA;I'm not sure if the ARB_explicit_attrib_location extension is already core, so maybe you have to add &#xD;&#xA;&#xD;&#xA;    #extension ARB_explicit_attrib_location : require&#xD;&#xA;&#xD;&#xA;to use the `layout` syntax or just set the attribute locations in the application by calling `glBindAttribLocation` before linking the shader, if this extension is not supprted.&#xD;&#xA;&#xD;&#xA;In the geometry shader change the decralation of vert to something like&#xD;&#xA;&#xD;&#xA;    in vec4 texcoord[];      //names have to match vertex shader, of course&#xD;&#xA;    in vec4 vSize[];&#xD;&#xA;&#xD;&#xA;Although you only get a single input (as you're using points), they still have to be arrays, I think (although always index with `[0]`, when used). Change the use of `vert.position` to `gl_PositionIn[0]`.&#xD;&#xA;&#xD;&#xA;Next, I think the `layout` syntax for the geometry shader has been introduced in 1.50, so you might have to set the geometry shader layout in the application by means of `glProgramParameteri`.&#xD;&#xA;&#xD;&#xA;I have to admit, that I have not much practical experience with geometry shaders or the modern syntax, as I still sit on 2.1 hardware, but all these changes can be deduced by looking into the respective [specifications](http://www.opengl.org/documentation/specs/). Just look at the shader info logs if compilation (or linking) fails to gain some hints about what could be wrong.&#xD;&#xA;&#xD;&#xA;The missing of the `layout` syntax in both the vertex and the geometry shader are the only things that might require some small additions to your application code, but I'm not completely sure if they are really unsupprted, so try them last.&#xD;&#xA;&#xD;&#xA;Also, feel free to update your question if I missed anything and the shaders still don't work, maybe this time with some error messages from the GLSL compiler." />
  <row Id="37957" PostHistoryTypeId="2" PostId="16460" RevisionGUID="d267a60d-4587-4c2a-a608-2bd3f6d5942d" CreationDate="2011-08-26T14:52:39.653" UserId="1386" Text="This is all highly theoretical, and there may be some flaws with this approach but you may be able to use [categories (Mac Developer Tips)][1] to override [NSObjects (Apple Developer)][2] alloc and dealloc methods.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://macdevelopertips.com/objective-c/objective-c-categories.html&#xD;&#xA;  [2]: http://developer.apple.com/library/ios//#/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html" />
  <row Id="37958" PostHistoryTypeId="5" PostId="16460" RevisionGUID="18f98538-a4cf-4c66-b78f-9bb1b29f7b9b" CreationDate="2011-08-26T14:58:11.813" UserId="1386" Comment="deleted 48 characters in body" Text="This is all highly theoretical but you may be able to use [categories (Mac Developer Tips)][1] to override [NSObjects (Apple Developer)][2] alloc and dealloc methods.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://macdevelopertips.com/objective-c/objective-c-categories.html&#xD;&#xA;  [2]: http://developer.apple.com/library/ios//#/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html" />
  <row Id="37959" PostHistoryTypeId="2" PostId="16461" RevisionGUID="8942e251-911e-4eff-bbe4-647c638dceb6" CreationDate="2011-08-26T15:07:39.073" UserId="1141" Text="If you want to implement gravity on a slightly bigger scale, you can use this kind of calculation each loop:&#xD;&#xA;&#xD;&#xA;    for each object in the scene&#xD;&#xA;      for each other_object in the scene not equal to object&#xD;&#xA;        if object.mass * other_object.mass / object.distanceSquaredBetweenCenterOfMasses(other_object) &lt; epsilon&#xD;&#xA;          abort the calculation for this pair&#xD;&#xA;        if object.mass is much, much bigger than other_object.mass&#xD;&#xA;          abort the calculation for this pair&#xD;&#xA;        force = gravitational_constant&#xD;&#xA;                * object.mass * other_object.mass&#xD;&#xA;                / object.distanceSquaredBetweenCenterOfMasses(other_object)&#xD;&#xA;        object.addForceAtCenterOfMass(force * object.normalizedDirectionalVectorTo(other_object))&#xD;&#xA;      end for loop&#xD;&#xA;    end for loop&#xD;&#xA;&#xD;&#xA;For even bigger (galactic) scales, gravity alone won't suffice to create &quot;real&quot; motion though. The interaction of star systems is to a significant and very visible extent dictated by Navier-Stokes equations for fluid dynamics, and you'll have to keep the finite speed of light - and thus, gravity - in mind too." />
  <row Id="37960" PostHistoryTypeId="2" PostId="16462" RevisionGUID="1eb35cf0-f024-41dc-bc6e-9859c70ea18d" CreationDate="2011-08-26T15:19:06.910" UserId="1101" Text="Async IO is just a general term for handling input and output. How to actually implement that depends entirely on the platform and language you're using. Usually the result is that you just set up a connection and then you have callbacks which get called when data arrives on the connection.&#xD;&#xA;&#xD;&#xA;&gt;I was thinking that in every TCP data stream sent, the client would have to send who is he, and what he's doing. Is it really necessary?&#xD;&#xA;&#xD;&#xA;No, it's not necessary. TCP is a connection based protocol, between 2 end-points. For as long as the connection is up, you know it's the same person on the other end, so they only need to identify themselves once.&#xD;&#xA;&#xD;&#xA;&gt; What's the best way to deal with host identifying?&#xD;&#xA;&#xD;&#xA;You can get the host's IP address and port from the network API you use, when connected. Again, how to do this depends on the API. A remote IP address and port pair is a unique identifier for incoming TCP connections." />
  <row Id="37961" PostHistoryTypeId="2" PostId="16463" RevisionGUID="324dd0aa-a33c-4849-bcb0-1731b6c1804e" CreationDate="2011-08-26T15:26:38.850" UserId="1743" Text="Is there a good (accepted) method for &quot;fixing&quot; the cycle time within an HTML5 canvas game implementation?&#xD;&#xA;&#xD;&#xA;The game that I have been working on runs far quicker in Google Chrome than in other browsers such as Firefox, Opera, or IE9.  To be honest, it kind of reminds me of running a game from the early 90's on a brand new machine." />
  <row Id="37962" PostHistoryTypeId="1" PostId="16463" RevisionGUID="324dd0aa-a33c-4849-bcb0-1731b6c1804e" CreationDate="2011-08-26T15:26:38.850" UserId="1743" Text="Commonizing cycle time across different browsers for HTML5" />
  <row Id="37963" PostHistoryTypeId="3" PostId="16463" RevisionGUID="324dd0aa-a33c-4849-bcb0-1731b6c1804e" CreationDate="2011-08-26T15:26:38.850" UserId="1743" Text="&lt;html5&gt;&lt;canvas&gt;&lt;cycle-time&gt;" />
  <row Id="37964" PostHistoryTypeId="2" PostId="16464" RevisionGUID="47e15036-9723-45f1-adc1-ad94ba52d3c6" CreationDate="2011-08-26T15:37:44.243" UserId="8376" Text="It sounds like you're looking for framerate-independent animation. If you're using a faster machine and your animations hang around for a certain number of frames, they'll appear to be moving faster. If your animations however are set to last for a certain number of milliseconds (framerate independent) then everything should appear the same on each machine.&#xD;&#xA;&#xD;&#xA;There are exceptions to this, such as if the machine is very slow and the cycle time is longer than the expected duration of more than one frame in the animation, you may need to skip frames which can make things look not so nice.&#xD;&#xA;&#xD;&#xA;Some searching revealed [this example](http://codeutopia.net/blog/2009/08/21/using-canvas-to-do-bitmap-sprite-animation-in-javascript/). Of note is the prototype for the Animation class, where the update function takes a time delta since the previous frame.&#xD;&#xA;&#xD;&#xA;This framerate independent approach should be applied to all other concepts in the game as well such as character movement. Consider your standard walking speed to be in terms of pixels (at the current resolution) per second rather than pixels per frame." />
  <row Id="37965" PostHistoryTypeId="25" PostId="16455" RevisionGUID="cfd7925b-2c57-4d1e-b34f-fdd64872a600" CreationDate="2011-08-26T15:37:56.037" Comment="http://twitter.com/#!/StackGameDev/status/107114561089449987" />
  <row Id="37966" PostHistoryTypeId="2" PostId="16465" RevisionGUID="7ffbd92f-ddb4-453e-863f-12f749d2062c" CreationDate="2011-08-26T15:57:08.957" UserId="5275" Text="I've been modifying a pathfinding example from [XNA Pathfinding example][1] as described in my previous question [Link to question here][2]  I had an issue where the character moved kept moving back and forth in a line. John McD suggestion made the brilliant I alert the way that the Heuristic calculation so that any nodes on the existing path had a lower value.&#xD;&#xA;&#xD;&#xA;From what I've debugged in the project the new calculation seems to work fine, despite that the problem still persists. I was wondering if I implemented the Heuristic method wrong.&#xD;&#xA;&#xD;&#xA;This is the method which houses the A* algorithm     &#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// This Method looks at everything in the open list and chooses the next &#xD;&#xA;    /// path to visit based on which search type is currently selected.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    /// &lt;param name=&quot;result&quot;&gt;The node to be visited&lt;/param&gt;&#xD;&#xA;    /// &lt;returns&gt;Whether or not SelectNodeToVisit found a node to examine&#xD;&#xA;    /// &lt;/returns&gt;&#xD;&#xA;    private bool SelectNodeToVisit(out SearchNode result)&#xD;&#xA;    {&#xD;&#xA;        result = new SearchNode();&#xD;&#xA;        bool success = false;&#xD;&#xA;        float smallestCost = float.PositiveInfinity;&#xD;&#xA;        float currentCost = 0f;&#xD;&#xA;&#xD;&#xA;        if (openList.Count &gt; 0)&#xD;&#xA;        {&#xD;&#xA;            foreach (SearchNode node in openList)&#xD;&#xA;            {&#xD;&#xA;                currentCost = Heuristic(node);&#xD;&#xA;                // The heuristic value gives us our optimistic estimate &#xD;&#xA;                // for the path length, while any path with the same &#xD;&#xA;                // heuristic value is equally ‘good’ in this case we’re &#xD;&#xA;                // favoring paths that have the same heuristic value &#xD;&#xA;                // but are longer.&#xD;&#xA;                if (currentCost &lt;= smallestCost)&#xD;&#xA;                {&#xD;&#xA;                    if (currentCost &lt; smallestCost)&#xD;&#xA;                    {&#xD;&#xA;                        success = true;&#xD;&#xA;                        result = node;&#xD;&#xA;                        smallestCost = currentCost;&#xD;&#xA;                    }&#xD;&#xA;                    else if (currentCost == smallestCost &amp;&amp;&#xD;&#xA;                        node.DistanceTraveled &gt; result.DistanceTraveled)&#xD;&#xA;                    {&#xD;&#xA;                        success = true;&#xD;&#xA;                        result = node;&#xD;&#xA;                        smallestCost = currentCost;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        return success;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the method which does the new Heuristic calculation&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// Generates an optimistic estimate of the total path length to the goal &#xD;&#xA;    /// from the given position.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    /// &lt;param name=&quot;location&quot;&gt;Location to examine&lt;/param&gt;&#xD;&#xA;    /// &lt;returns&gt;Path length estimate&lt;/returns&gt;&#xD;&#xA;    private float Heuristic(SearchNode location)&#xD;&#xA;    {&#xD;&#xA;        int Nodecost = 10;&#xD;&#xA;&#xD;&#xA;        foreach (Point point in Currentpath)&#xD;&#xA;        {&#xD;&#xA;            if (location.Position == point)&#xD;&#xA;                Nodecost = 7;&#xD;&#xA;        }&#xD;&#xA;        return location.DistanceTraveled + location.DistanceToGoal + Nodecost;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/pathfinding&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/16343/pathfinder-not-acting-correctly&#xD;&#xA;" />
  <row Id="37967" PostHistoryTypeId="1" PostId="16465" RevisionGUID="7ffbd92f-ddb4-453e-863f-12f749d2062c" CreationDate="2011-08-26T15:57:08.957" UserId="5275" Text="Heuristic Calculation for pathfinder" />
  <row Id="37968" PostHistoryTypeId="3" PostId="16465" RevisionGUID="7ffbd92f-ddb4-453e-863f-12f749d2062c" CreationDate="2011-08-26T15:57:08.957" UserId="5275" Text="&lt;c#&gt;&lt;ai&gt;" />
  <row Id="37969" PostHistoryTypeId="2" PostId="16466" RevisionGUID="403d69b4-84a3-47e0-97aa-20b6d66c71c8" CreationDate="2011-08-26T16:08:59.317" UserId="259" Text="A proper frame-rate independent newtonian physics integration:&#xD;&#xA;&#xD;&#xA;    Vector forces = 0.0f;&#xD;&#xA;&#xD;&#xA;    // gravity&#xD;&#xA;    forces += down * m_gravityConstant; // 9.8m/s/s on earth&#xD;&#xA;&#xD;&#xA;    // left/right movement&#xD;&#xA;    forces += right * m_movementConstant * controlInput; // where input is scaled -1..1&#xD;&#xA;&#xD;&#xA;    // add other forces in for taste - usual suspects include air resistence&#xD;&#xA;    // proportional to the square of velocity, against the direction of movement. &#xD;&#xA;    // this has the effect of capping max speed.&#xD;&#xA;&#xD;&#xA;    Vector acceleration = forces / m_massConstant; &#xD;&#xA;    m_velocity += acceleration * timeStep;&#xD;&#xA;    m_position += velocity * timeStep;&#xD;&#xA;&#xD;&#xA;Tweak gravityConstant, movementConstant and massConstant until it feels right. It is an intuitive thing and can take a while to get feeling great. &#xD;&#xA;&#xD;&#xA;It's easy to extend the forces vector to add new gameplay - for instance add a force away from any nearby explosion, or towards black holes." />
  <row Id="37970" PostHistoryTypeId="2" PostId="16467" RevisionGUID="4ff9d8e4-9db3-444b-8d5e-ad32e83a318d" CreationDate="2011-08-26T16:23:16.523" UserId="51" Text="How you synchronize the games is going to be very different from game to game.&#xD;&#xA;&#xD;&#xA;You just need to figure out what both clients are going to need to send across, package that up, and send it.  There are some turn-based game helpers in iOS 5 that you can use to send messages back and forth." />
  <row Id="37971" PostHistoryTypeId="5" PostId="16465" RevisionGUID="9695c18e-0c93-48a1-b164-9ecdac3498bb" CreationDate="2011-08-26T16:26:02.293" UserId="5275" Comment="added 1396 characters in body" Text="I've been modifying a pathfinding example from [XNA Pathfinding example][1] as described in my previous question [Link to question here][2]  I had an issue where the character moved kept moving back and forth in a line. John McD suggestion made the brilliant I alert the way that the Heuristic calculation so that any nodes on the existing path had a lower value.&#xD;&#xA;&#xD;&#xA;From what I've debugged in the project the new calculation seems to work fine, despite that the problem still persists. I was wondering if I implemented the Heuristic method wrong.&#xD;&#xA;&#xD;&#xA;This is the method which houses the A* algorithm     &#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// This Method looks at everything in the open list and chooses the next &#xD;&#xA;    /// path to visit based on which search type is currently selected.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    /// &lt;param name=&quot;result&quot;&gt;The node to be visited&lt;/param&gt;&#xD;&#xA;    /// &lt;returns&gt;Whether or not SelectNodeToVisit found a node to examine&#xD;&#xA;    /// &lt;/returns&gt;&#xD;&#xA;    private bool SelectNodeToVisit(out SearchNode result)&#xD;&#xA;    {&#xD;&#xA;        result = new SearchNode();&#xD;&#xA;        bool success = false;&#xD;&#xA;        float smallestCost = float.PositiveInfinity;&#xD;&#xA;        float currentCost = 0f;&#xD;&#xA;&#xD;&#xA;        if (openList.Count &gt; 0)&#xD;&#xA;        {&#xD;&#xA;            foreach (SearchNode node in openList)&#xD;&#xA;            {&#xD;&#xA;                currentCost = Heuristic(node);&#xD;&#xA;                // The heuristic value gives us our optimistic estimate &#xD;&#xA;                // for the path length, while any path with the same &#xD;&#xA;                // heuristic value is equally ‘good’ in this case we’re &#xD;&#xA;                // favoring paths that have the same heuristic value &#xD;&#xA;                // but are longer.&#xD;&#xA;                if (currentCost &lt;= smallestCost)&#xD;&#xA;                {&#xD;&#xA;                    if (currentCost &lt; smallestCost)&#xD;&#xA;                    {&#xD;&#xA;                        success = true;&#xD;&#xA;                        result = node;&#xD;&#xA;                        smallestCost = currentCost;&#xD;&#xA;                    }&#xD;&#xA;                    else if (currentCost == smallestCost &amp;&amp;&#xD;&#xA;                        node.DistanceTraveled &gt; result.DistanceTraveled)&#xD;&#xA;                    {&#xD;&#xA;                        success = true;&#xD;&#xA;                        result = node;&#xD;&#xA;                        smallestCost = currentCost;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        return success;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the method which does the new Heuristic calculation&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// Generates an optimistic estimate of the total path length to the goal &#xD;&#xA;    /// from the given position.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    /// &lt;param name=&quot;location&quot;&gt;Location to examine&lt;/param&gt;&#xD;&#xA;    /// &lt;returns&gt;Path length estimate&lt;/returns&gt;&#xD;&#xA;    private float Heuristic(SearchNode location)&#xD;&#xA;    {&#xD;&#xA;        int Nodecost = 10;&#xD;&#xA;&#xD;&#xA;        foreach (Point point in Currentpath)&#xD;&#xA;        {&#xD;&#xA;            if (location.Position == point)&#xD;&#xA;                Nodecost = 7;&#xD;&#xA;        }&#xD;&#xA;        return location.DistanceTraveled + location.DistanceToGoal + Nodecost;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is the method which adds the point to their respective list once &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// &lt;summary&gt;&#xD;&#xA;    /// This method find the next path node to visit, puts that node on the &#xD;&#xA;    /// closed list and adds any nodes adjacent to the visited node to the &#xD;&#xA;    /// open list.&#xD;&#xA;    /// &lt;/summary&gt;&#xD;&#xA;    private void DoSearchStep(TileMap tileMap)&#xD;&#xA;    {&#xD;&#xA;        SearchNode newOpenListNode;&#xD;&#xA;&#xD;&#xA;        bool foundNewNode = SelectNodeToVisit(out newOpenListNode);&#xD;&#xA;        if (foundNewNode)&#xD;&#xA;        {&#xD;&#xA;            Point currentPos = newOpenListNode.Position;&#xD;&#xA;            foreach (Point point in level.OpenMapTiles(currentPos, tileMap))&#xD;&#xA;            {   &#xD;&#xA;                SearchNode mapTile = new SearchNode(point,&#xD;&#xA;                    StepDistanceToEnd(point),&#xD;&#xA;                    newOpenListNode.DistanceTraveled + 1);&#xD;&#xA;                if (!InList(openList, point) &amp;&amp;&#xD;&#xA;                    !InList(closedList, point))&#xD;&#xA;                {&#xD;&#xA;                    openList.Add(mapTile);&#xD;&#xA;                    paths[point] = newOpenListNode.Position;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            if (currentPos == endPlace)&#xD;&#xA;            {&#xD;&#xA;                searchStatus = SearchStatus.PathFound;&#xD;&#xA;            }&#xD;&#xA;            openList.Remove(newOpenListNode);&#xD;&#xA;            closedList.Add(newOpenListNode);&#xD;&#xA;        }&#xD;&#xA;        else&#xD;&#xA;        {&#xD;&#xA;            searchStatus = SearchStatus.NoPath;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: http://create.msdn.com/en-US/education/catalog/sample/pathfinding&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/16343/pathfinder-not-acting-correctly&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37972" PostHistoryTypeId="2" PostId="16468" RevisionGUID="de84e1cf-35d9-4631-a13b-1f465c2fb594" CreationDate="2011-08-26T16:32:47.783" UserId="9509" Text="How would you implement movement on a camera in order to always move it on X and Z coordinates, and if the camera has pitch yaw or roll it still moves only in those coordinates and doesn't fly up?" />
  <row Id="37973" PostHistoryTypeId="1" PostId="16468" RevisionGUID="de84e1cf-35d9-4631-a13b-1f465c2fb594" CreationDate="2011-08-26T16:32:47.783" UserId="9509" Text="Move camera on X and Z only" />
  <row Id="37974" PostHistoryTypeId="3" PostId="16468" RevisionGUID="de84e1cf-35d9-4631-a13b-1f465c2fb594" CreationDate="2011-08-26T16:32:47.783" UserId="9509" Text="&lt;xna&gt;&lt;c#&gt;&lt;camera&gt;&lt;movement&gt;" />
  <row Id="37975" PostHistoryTypeId="2" PostId="16469" RevisionGUID="2820fb8f-4dbd-4d3a-bd25-4d8835f149b9" CreationDate="2011-08-26T16:39:26.857" UserId="9366" Text="Wait...&#xD;&#xA;&#xD;&#xA;    node.DistanceTraveled &gt; result.DistanceTraveled&#xD;&#xA;&#xD;&#xA;shouldn't that be:&#xD;&#xA;&#xD;&#xA;    node.DistanceTraveled &lt; result.DistanceTraveled&#xD;&#xA;&#xD;&#xA;Otherwise it's trying to pick tiles with a slightly longer path, no?" />
  <row Id="37976" PostHistoryTypeId="2" PostId="16470" RevisionGUID="a48896ca-3141-4890-a648-2a1c8d33b221" CreationDate="2011-08-26T16:48:51.510" UserId="159" Text="Yes, the &quot;sense of direction&quot; goes get messed up, but only because of how you are thinking about it.&#xD;&#xA;&#xD;&#xA;Take your mouse, rotate it 90* to the left, and then get your cursor to move to the top of the screen. Notice how you need to move your mouse to your left to get the cursor to move up? That is because your mouse doesn't change what &quot;UP&quot; is when you rotate it. You can do the same thing by leaving your mouse alone and rotating *yourself* around your desk. Move to the side. see how your mouse is rotated, but it isn't, right? you moved :)&#xD;&#xA;&#xD;&#xA;I guess an easier way to think about it is two people are standing facing each other. The one says &quot;Move Left&quot; so the other one does. &quot;No, not your left, **my** left&quot;.&#xD;&#xA;&#xD;&#xA;OK, so how do you code around it? Well, unless there is some API I haven't heard about all you need to do is calculate the desired movement vector based off the current rotation.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="37977" PostHistoryTypeId="2" PostId="16471" RevisionGUID="4110c151-de7d-479d-a57e-146f35716cb6" CreationDate="2011-08-26T17:02:04.810" UserId="7328" Text="you can achieve it using a dummy box, create a dummy box and attach camera as it's child. then whenever you want to move camera, you just have to move the dummy box, if you want to rotate camera left and right you also have to rotate the dummy box but for other axis rotations you will have to rotate camera itself." />
  <row Id="37978" PostHistoryTypeId="5" PostId="16434" RevisionGUID="94233749-d61d-469e-9eb1-908b41a69808" CreationDate="2011-08-26T17:13:41.167" UserId="2289" Comment="Made suggested code corrections" Text="I'm a beginner to OpenGL and GLSL especially, and I'm having a lot of trouble getting textures to display via shaders. My shader code compiles without any warnings or errors, but I seem completely unable to render my texture. In fact, nothing's being rendered at all; I'm getting a black screen. Here's my current, simplified code (written in D, but should function almost exactly as it looks as if it were in C++):&#xD;&#xA;&#xD;&#xA;    int main(string[] argv) {&#xD;&#xA;        try {&#xD;&#xA;            ilInit();&#xD;&#xA;            iluInit();&#xD;&#xA;            ilutInit();                 // GOTCHA: These two calls need to be in order!&#xD;&#xA;            ilutRenderer(ILUT_OPENGL);  //&#xD;&#xA;            glfwInit();&#xD;&#xA;            if(SDL_Init(SDL_INIT_VIDEO) &gt; 0) writeln(&quot;ERROR&quot;);&#xD;&#xA;        &#xD;&#xA;            // Create an OpenGL context and window.&#xD;&#xA;            const int VWIDTH = 1600;&#xD;&#xA;            const int VHEIGHT = 900;&#xD;&#xA;            const int WIDTH = 1280;&#xD;&#xA;            const int HEIGHT = 720;&#xD;&#xA;            glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 8);&#xD;&#xA;            glfwOpenWindowHint(GLFW_AUX_BUFFERS, 1);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);&#xD;&#xA;            glfwOpenWindow(WIDTH, HEIGHT, 8, 8, 8, 8, 0, 0, GLFW_WINDOW /+ GLFW_FULLSCREEN +/);&#xD;&#xA;&#xD;&#xA;            GL.bindClassicVersions(true);&#xD;&#xA;            GL.bindModernVersions(true, GLVersion.GL33);&#xD;&#xA;            GL.bindExtensions(true);    // Returns GL_INVALID_ENUM&#xD;&#xA;&#xD;&#xA;            glMatrixMode(GL_PROJECTION);&#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glOrtho(0, VWIDTH, 0, VHEIGHT, -100, 100);&#xD;&#xA;            glMatrixMode(GL_MODELVIEW);&#xD;&#xA;            glLoadIdentity(); &#xD;&#xA;&#xD;&#xA;            // Set clear color&#xD;&#xA;            glClearColor(0.392, 0.584, 0.929, 1);&#xD;&#xA;&#xD;&#xA;            // Set GL enables/disables&#xD;&#xA;            glShadeModel(GL_SMOOTH);                                // Enables smooth shading&#xD;&#xA;            glEnable(GL_TEXTURE_2D);                                // Enable 2D texturing&#xD;&#xA;            glEnable(GL_BLEND);                                     // Enable alpha blending&#xD;&#xA;            glDisable(GL_DEPTH_TEST);                               // Disable depth testing&#xD;&#xA;            glDisable(GL_CULL_FACE);                                // Disable face culling&#xD;&#xA;            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;            //glDepthFunc(GL_LEQUAL);                                 // The depth test type&#xD;&#xA;&#xD;&#xA;            // Initialize and compile shaders&#xD;&#xA;            GLuint vertShaderId, fragShaderId;&#xD;&#xA;            vertShaderId = glCreateShader(GL_VERTEX_SHADER);&#xD;&#xA;            fragShaderId = glCreateShader(GL_FRAGMENT_SHADER);&#xD;&#xA;        &#xD;&#xA;            immutable(GLchar)* vertShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    in vec3 vertex;&#xD;&#xA;    in vec2 texCoord;&#xD;&#xA;&#xD;&#xA;    out vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragmentTexCoord = texCoord;&#xD;&#xA;        gl_Position = vec4(vertex, 1.0);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;            immutable(GLchar)* fragShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    uniform sampler2D firstTexture;&#xD;&#xA;    in vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    layout(location = 0, index = 0) out vec4 fragColor;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;&#xD;&#xA;            glShaderSource(vertShaderId, 1, &amp;vertShaderSrc, null);&#xD;&#xA;            glShaderSource(fragShaderId, 1, &amp;fragShaderSrc, null);&#xD;&#xA;&#xD;&#xA;            glCompileShader(vertShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(vertShaderId);&#xD;&#xA;            glCompileShader(fragShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(fragShaderId);&#xD;&#xA;&#xD;&#xA;            GLuint programId = glCreateProgram();&#xD;&#xA;&#xD;&#xA;            glAttachShader(programId, vertShaderId);&#xD;&#xA;            glAttachShader(programId, fragShaderId);&#xD;&#xA;&#xD;&#xA;            glLinkProgram(programId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(programId);&#xD;&#xA;&#xD;&#xA;            glUseProgram(programId);&#xD;&#xA;            checkGLError();&#xD;&#xA;&#xD;&#xA;            // Load texture&#xD;&#xA;            auto texture = new Texture2d(r&quot;res/test.png&quot;);&#xD;&#xA;            texture.load();&#xD;&#xA;&#xD;&#xA;            bool running = true;&#xD;&#xA;            clearGLError();&#xD;&#xA;            while(running) {&#xD;&#xA;                // Clear viewport&#xD;&#xA;                glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;                // Bind texture ID&#xD;&#xA;                glActiveTexture(GL_TEXTURE0);&#xD;&#xA;                glBindTexture(GL_TEXTURE_2D, texture.textureId);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Set texture uniform value&#xD;&#xA;                auto loc = glGetUniformLocation(programId, &quot;firstTexture&quot;);&#xD;&#xA;                checkGLError();&#xD;&#xA;                glUniform1i(loc, 0);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Render&#xD;&#xA;                glBegin(GL_QUADS);&#xD;&#xA;                    glTexCoord2d(0, 0); glVertex2d(-0.8, -0.8);&#xD;&#xA;                    glTexCoord2d(1, 0); glVertex2d( 0.8, -0.8);&#xD;&#xA;                    glTexCoord2d(1, 1); glVertex2d( 0.8,  0.8);&#xD;&#xA;                    glTexCoord2d(0, 1); glVertex2d(-0.8,  0.8);&#xD;&#xA;                glEnd();&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Swap front and back rendering buffers&#xD;&#xA;                glfwSwapBuffers();&#xD;&#xA;&#xD;&#xA;                // Add a tiny delay if no work is being done in the loop.&#xD;&#xA;                //glfwSleep(double.epsilon);&#xD;&#xA;&#xD;&#xA;                // Check if ESC key was pressed or window was closed&#xD;&#xA;                running = !glfwGetKey(GLFW_KEY_ESC) &amp;&amp; glfwGetWindowParam(GLFW_OPENED);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        catch(Throwable t) {&#xD;&#xA;            Logger.log(Severity.Error, t.msg);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm guessing it's something simple I've overlooked due to being new. Any help would be appreciated!" />
  <row Id="37979" PostHistoryTypeId="25" PostId="16463" RevisionGUID="cc762c5a-1011-47cc-a918-9147b4e8430c" CreationDate="2011-08-26T18:37:55.947" Comment="http://twitter.com/#!/StackGameDev/status/107159859828506625" />
  <row Id="37980" PostHistoryTypeId="2" PostId="16472" RevisionGUID="5369dff5-efac-450a-b22d-86572681b3fc" CreationDate="2011-08-26T19:04:56.293" UserId="8954" Text="There is a reason why 4D games aren't practical." />
  <row Id="37981" PostHistoryTypeId="2" PostId="16473" RevisionGUID="196d9ddf-bd91-4c67-85fd-606740f883bf" CreationDate="2011-08-26T19:10:14.240" UserId="9366" Text="Whenever I have network architecture questions, I refer to this wonderful document about how the Unreal Engine does it:&#xD;&#xA;&#xD;&#xA;http://udn.epicgames.com/Three/NetworkingOverview.html&#xD;&#xA;&#xD;&#xA;It's likely more than you need, but it's a great read and you'll likely be able to use concepts from it." />
  <row Id="37982" PostHistoryTypeId="2" PostId="16474" RevisionGUID="9f135cb2-f827-4c7e-b2c1-68b988b074a9" CreationDate="2011-08-26T19:21:03.257" UserId="9513" Text="How do you or your company require designers to deliver their assets to coders?  Do they deliver a PSD?  A series of 24-bit PNGs?&#xD;&#xA;&#xD;&#xA;If you are a coder, what would you include in a best-practice guideline to designers?  If you are a designer, what questions would you like to see answered in such a document?&#xD;&#xA;&#xD;&#xA;Here are some ideas:&#xD;&#xA;&#xD;&#xA; * Generally:&#xD;&#xA;  * include designs for mouse-over and mouse-down states for all&#xD;&#xA;   buttons and other interactive elements, as well as the normal state.&#xD;&#xA;  * for toggle buttons, this can also include different states for&#xD;&#xA;   both *selected* and *unselected* modes, for 6 states total: normal,&#xD;&#xA;   over, down.&#xD;&#xA;  * in drop-downs, lists, etc, please design a selected and unselected&#xD;&#xA;   state for *each* item, if appropriate, especially where the content&#xD;&#xA;   varies.&#xD;&#xA;  * Flash is strictly an sRGB colorspace.  If creating assets for&#xD;&#xA;   Flash, make sure that your deliverables look how you expect it in&#xD;&#xA;   sRGB.&#xD;&#xA; * If delivering assets as a PSD, please:&#xD;&#xA;   * label all layers clearly.&#xD;&#xA;   * make sure that the dimensions of your document exactly match the&#xD;&#xA;   dimensions of the application&#xD;&#xA;&#xD;&#xA;What else would you include in a Visual Asset Delivery Best Practices document?&#xD;&#xA;" />
  <row Id="37983" PostHistoryTypeId="1" PostId="16474" RevisionGUID="9f135cb2-f827-4c7e-b2c1-68b988b074a9" CreationDate="2011-08-26T19:21:03.257" UserId="9513" Text="Visual Asset Delivery" />
  <row Id="37984" PostHistoryTypeId="3" PostId="16474" RevisionGUID="9f135cb2-f827-4c7e-b2c1-68b988b074a9" CreationDate="2011-08-26T19:21:03.257" UserId="9513" Text="&lt;flash&gt;&lt;actionscript-3&gt;&lt;gui&gt;&lt;user-experience&gt;" />
  <row Id="37985" PostHistoryTypeId="5" PostId="16452" RevisionGUID="4ecd52e5-740d-421a-9504-0fd443a92e42" CreationDate="2011-08-26T19:21:49.870" UserId="1808" Comment="added 4 characters in body" Text="I'm about to start writing an iOS game and I'm going to use mainly C++/C for the core gameplay logic. &#xD;&#xA;&#xD;&#xA;I really like pre-allocating everything in the game and try to avoid any dynamic allocations as much as possible. With my own C++/C code it's not a big deal. However there are some ObjC libraries which I'd like to re-use and I'm not sure how to inject my custom memory allocator to Cocoa based classes. &#xD;&#xA;&#xD;&#xA;Is there any central 'inject point' in Cocoa where I can do that?" />
  <row Id="37986" PostHistoryTypeId="2" PostId="16475" RevisionGUID="62df7ffa-1641-4ca2-8775-269836aecb71" CreationDate="2011-08-26T19:38:59.293" UserId="3051" Text="Some thoughts:&#xD;&#xA;&#xD;&#xA;Your first video refers to Time when introducing your fourth dimension.  *Time is not a spatial dimension* and, therefore, is a metaphor that will only serve to confuse your audience.  &#xD;&#xA;&#xD;&#xA;From a quick Google search, I wasn't able to find any useful information about how to render 4 spatial dimensions onto a 2D screen but there must be some out there. The math behind 3D -&gt; 2D is a right about at the limits of my mathematics mastery so I can't begin to postulate any effective ways to render an additional dimension. But, there's likely someone working on such research right now somewhere; you'll just need to find it.&#xD;&#xA;&#xD;&#xA;The complexity of understanding movement between 4 dimensions is likely going to be beyond the grasp of much of your audience unless you spend a lot of time adjusting and catering to players through prototyping and playtesting.  The difficulty of this dimensional leap is somewhat facetiously (but still applicably) addressed in [this XKCD comic][1].&#xD;&#xA;&#xD;&#xA;I'm not sure if you've heard of a game called [Miegakure][2].  It's a 4D platformer in which the player can shift between which 3 of the 4 spatial dimensions are visible/accessible.  Unfortunately, the game is not yet released but there are some demo videos available on the game's site.  Perhaps its approach to 4 dimensions could be helpful to you.&#xD;&#xA;&#xD;&#xA;Good luck!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xkcd.com/721/&#xD;&#xA;  [2]: http://marctenbosch.com/miegakure/" />
  <row Id="37987" PostHistoryTypeId="2" PostId="16476" RevisionGUID="7631e0c0-ecef-4a20-821c-6b8f438e3991" CreationDate="2011-08-26T19:54:52.010" UserId="998" Text="I'm looking for __the most__ capable C++ model loading API.&#xD;&#xA;&#xD;&#xA;So far I've found tons of ply, obj, and other such file format loaders.  But the libraries I've found tend to load just __one__ model type, and this requires you to learn quite a few api interfaces?&#xD;&#xA;&#xD;&#xA;Is there One API To Load Them All, One API To Parse Them, One API To Bring Them All, And In the Vertex Buffer, Bind Them?" />
  <row Id="37988" PostHistoryTypeId="1" PostId="16476" RevisionGUID="7631e0c0-ecef-4a20-821c-6b8f438e3991" CreationDate="2011-08-26T19:54:52.010" UserId="998" Text="C++ Model loading API?" />
  <row Id="37989" PostHistoryTypeId="3" PostId="16476" RevisionGUID="7631e0c0-ecef-4a20-821c-6b8f438e3991" CreationDate="2011-08-26T19:54:52.010" UserId="998" Text="&lt;c++&gt;&lt;models&gt;&lt;loading&gt;" />
  <row Id="37990" PostHistoryTypeId="2" PostId="16477" RevisionGUID="ee5b355e-2986-4b29-bec5-3ad861deece6" CreationDate="2011-08-26T20:03:11.097" UserId="4306" Text="They emailed me.&#xD;&#xA;&#xD;&#xA;&gt; 3DS Max and Maya both use substance materials: http://usa.autodesk.com/adsk/servlet/u/gsearch/results?siteID=123112&amp;catID=123155&amp;id=2088334&amp;qt=substance&lt;br /&gt; Take a look there for vids and tutorials.&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;Unfortunately unity cannot import settings for substances edited in Max Maya at present, so you need to set them in both or use a dummy material in the source 3D package - I hope that helps!" />
  <row Id="37991" PostHistoryTypeId="2" PostId="16478" RevisionGUID="1099d090-6282-4063-8fc2-0f49a6832afa" CreationDate="2011-08-26T20:09:36.540" UserId="7328" Text="as a coder I just ask them what assets are the going to create, and then create a sample asset of those properties. give them the code and let them play with my app until they think output is good enough." />
  <row Id="37992" PostHistoryTypeId="2" PostId="16479" RevisionGUID="23c84366-5ad8-4cb9-b792-bbd4592a3ef4" CreationDate="2011-08-26T20:10:59.493" UserId="4306" Text="There is [mudbox][1]. It's [free][2] if you're a student (non-commercial).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://usa.autodesk.com/adsk/servlet/pc/index?id=13565063&amp;siteID=123112&#xD;&#xA;  [2]: http://students.autodesk.com/" />
  <row Id="37993" PostHistoryTypeId="2" PostId="16480" RevisionGUID="3bf65fc6-7274-414c-9b09-8e2666a3505c" CreationDate="2011-08-26T20:19:59.397" UserId="8376" Text="[Assimp](http://assimp.sourceforge.net/) seems to be a good choice and I will be testing this with my next project. It supports a [huge](http://assimp.sourceforge.net/main_features_formats.html) array of formats including supporting bones and animations. Not just for model loading, but for changing from format to format, computing vertex and face normals, splitting meshes, and triangulating polygons. It is available under the BSD license." />
  <row Id="37994" PostHistoryTypeId="2" PostId="16481" RevisionGUID="fb42af18-5e33-48e4-97bd-f07721078631" CreationDate="2011-08-26T20:27:27.420" UserId="4306" Text="I used to use the BGE until I found that unity can build to lots of different platforms. What platforms does the BGE support?" />
  <row Id="37995" PostHistoryTypeId="1" PostId="16481" RevisionGUID="fb42af18-5e33-48e4-97bd-f07721078631" CreationDate="2011-08-26T20:27:27.420" UserId="4306" Text="To what platforms can the blender game engine build to?" />
  <row Id="37996" PostHistoryTypeId="3" PostId="16481" RevisionGUID="fb42af18-5e33-48e4-97bd-f07721078631" CreationDate="2011-08-26T20:27:27.420" UserId="4306" Text="&lt;blender-game-engine&gt;" />
  <row Id="37997" PostHistoryTypeId="2" PostId="16482" RevisionGUID="1e0f34ec-d032-4375-aa75-fd0165d6d86a" CreationDate="2011-08-26T20:32:50.953" UserId="-1" Text="" />
  <row Id="37998" PostHistoryTypeId="2" PostId="16483" RevisionGUID="03589561-1533-4825-bfff-4b4f77c90283" CreationDate="2011-08-26T20:32:50.953" UserId="-1" Text="" />
  <row Id="37999" PostHistoryTypeId="6" PostId="16481" RevisionGUID="f8b4de4e-bc16-4f2b-b9ef-61168158f074" CreationDate="2011-08-26T20:34:01.170" UserId="4306" Comment="edited tags" Text="&lt;blender&gt;&lt;blender-game-engine&gt;" />
  <row Id="38000" PostHistoryTypeId="2" PostId="16484" RevisionGUID="bb73b83a-77b4-46f6-b5d9-8520cafba00d" CreationDate="2011-08-26T20:52:13.943" UserId="7946" Text="Principally, this is a follow-up-question to [a problem from a few weeks ago][1], even though this is about the algorithm in general without application to my actual problem.&#xD;&#xA;&#xD;&#xA;The algorithm basically searches through all lines in the picture, starting from the top left of it, until it finds a pixel that is a border. In pseudo-C++:&#xD;&#xA;&#xD;&#xA;    int start = 0;&#xD;&#xA;    for(int i=0; i&lt;amount_of_pixels; ++i)&#xD;&#xA;    {&#xD;&#xA;       if(pixels[i] == border)&#xD;&#xA;       {&#xD;&#xA;          start = i;&#xD;&#xA;          break;&#xD;&#xA;       }&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;When it finds one, it starts the marching squares algorithm and finds the contour to whatever object the pixel belongs to.&#xD;&#xA;&#xD;&#xA;Let's say I have something like this:&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;Where everything except the color white is a border.&#xD;&#xA;&#xD;&#xA;And have found the contour points of the first blob: &#xD;&#xA;&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;For the general algorithm it's over. It found a contour and has done its job. How can I move on to the other two blobs to find their contours as well?&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/14971/2d-finding-largest-possible-straight-lines-around-body&#xD;&#xA;  [2]: http://i.stack.imgur.com/SIYLa.png&#xD;&#xA;  [3]: http://i.stack.imgur.com/c1jGS.png" />
  <row Id="38001" PostHistoryTypeId="1" PostId="16484" RevisionGUID="bb73b83a-77b4-46f6-b5d9-8520cafba00d" CreationDate="2011-08-26T20:52:13.943" UserId="7946" Text="Marching squares: Finding multiple contours within one source field?" />
  <row Id="38002" PostHistoryTypeId="3" PostId="16484" RevisionGUID="bb73b83a-77b4-46f6-b5d9-8520cafba00d" CreationDate="2011-08-26T20:52:13.943" UserId="7946" Text="&lt;2d&gt;&lt;marching-squares&gt;" />
  <row Id="38003" PostHistoryTypeId="2" PostId="16485" RevisionGUID="72044c38-605e-4ca8-80a1-21fb4d082665" CreationDate="2011-08-26T21:11:32.027" UserId="5824" Text="Could you simply erase the polygon it's found by drawing it in the background colour and repeat until there's nothing left?" />
  <row Id="38004" PostHistoryTypeId="2" PostId="16486" RevisionGUID="6cd10b66-262c-4ec5-b0d0-d4ef5d6740ec" CreationDate="2011-08-26T21:33:06.280" UserId="4524" Text="There are many algorithms that can be used for collision detection. In many cases we check for an overlap in coordinates of an entity.&#xD;&#xA;&#xD;&#xA;If we make a triangle a,b and c. We have 2 entities at a and b heading for a collision at c but each of them are moving at exactly the same time, what kind of algorithm could work?&#xD;&#xA;&#xD;&#xA;It seems more like a chess game where you would have to predict every move that the other entity would have to make, if they swerve to the left to avoid a collision will they also run the chance to collide. Is it possible or is it too complex? Would it work for thousands and millions of entities in the same search space?" />
  <row Id="38005" PostHistoryTypeId="1" PostId="16486" RevisionGUID="6cd10b66-262c-4ec5-b0d0-d4ef5d6740ec" CreationDate="2011-08-26T21:33:06.280" UserId="4524" Text="Is it possible to have concurrent collision detection where every entity acts at exactly the same time?" />
  <row Id="38006" PostHistoryTypeId="3" PostId="16486" RevisionGUID="6cd10b66-262c-4ec5-b0d0-d4ef5d6740ec" CreationDate="2011-08-26T21:33:06.280" UserId="4524" Text="&lt;collision-detection&gt;&lt;physics&gt;&lt;algorithm&gt;&lt;logic&gt;" />
  <row Id="38007" PostHistoryTypeId="25" PostId="16476" RevisionGUID="93302a58-2b4f-4dfe-827a-73bd5c972e8a" CreationDate="2011-08-26T21:37:56.037" Comment="http://twitter.com/#!/StackGameDev/status/107205157338615809" />
  <row Id="38008" PostHistoryTypeId="2" PostId="16487" RevisionGUID="abe98259-4ec6-42fa-9712-84ed9ef76b76" CreationDate="2011-08-26T21:44:23.063" UserId="4524" Text="Windows, linux and mac. Although google may have helped a little, I think you might find more answers here: http://blenderartists.org/forum/forumdisplay.php?34-Game-Engine&#xD;&#xA;&#xD;&#xA;I think it is better to use Blender to make the assets and Unity as a game engine. I only use Blender as a hobby for modelling and scripting but I think Unity will provide a better base for game development. It helps that there is a free indie version and this year they created a steam like store where you could sell a game making distribution that much easier. Sometimes the blender game engine does not play so nicely with some graphics cards, you might find evidence of this frustration in the forums. " />
  <row Id="38009" PostHistoryTypeId="5" PostId="8964" RevisionGUID="1f648ac4-9546-4763-939e-e07b8719f876" CreationDate="2011-08-26T21:53:01.803" UserId="4306" Comment="added 45 characters in body" Text="iOS is an operating system for mobile devices created by Apple Inc. It runs on the iPhone, iPad, and iPod touch." />
  <row Id="38010" PostHistoryTypeId="24" PostId="8964" RevisionGUID="1f648ac4-9546-4763-939e-e07b8719f876" CreationDate="2011-08-26T21:53:01.803" Comment="Proposed by 4306 approved by 51 edit id of 675" />
  <row Id="38011" PostHistoryTypeId="5" PostId="16483" RevisionGUID="6c558e2e-6927-4198-9ebf-331d6543c11c" CreationDate="2011-08-26T21:53:04.440" UserId="4306" Comment="added 62 characters in body" Text="The blender game engine is the game engine built into blender." />
  <row Id="38012" PostHistoryTypeId="24" PostId="16483" RevisionGUID="6c558e2e-6927-4198-9ebf-331d6543c11c" CreationDate="2011-08-26T21:53:04.440" Comment="Proposed by 4306 approved by 51 edit id of 676" />
  <row Id="38013" PostHistoryTypeId="2" PostId="16488" RevisionGUID="01977d70-19aa-441c-9fd0-c28797bd7f77" CreationDate="2011-08-26T22:15:50.750" UserId="37" Text="I'm trying to get access to the keyboard state in XNA from an embedded JavaScript runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'd like to do something similar to the following, but I can't seem to figure out how to get from &quot;Left&quot; to Keys.Left, in one line, for all 100+ keys or so.&#xD;&#xA;&#xD;&#xA;    js.SetParameter(&quot;XNA_Keyboard&quot;, new {&#xD;&#xA;        keyDown = (Func&lt;string, bool&gt;)((name) =&gt; {&#xD;&#xA;            return keyboardState.IsKeyDown(Keys[name]); // ! Can't index keys enum by name&#xD;&#xA;        }),&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;Is there some kind of reflection that will make this easier?&#xD;&#xA;" />
  <row Id="38014" PostHistoryTypeId="1" PostId="16488" RevisionGUID="01977d70-19aa-441c-9fd0-c28797bd7f77" CreationDate="2011-08-26T22:15:50.750" UserId="37" Text="How do I check if a key is down in XNA when I'm only given a string that has the key's name?" />
  <row Id="38015" PostHistoryTypeId="3" PostId="16488" RevisionGUID="01977d70-19aa-441c-9fd0-c28797bd7f77" CreationDate="2011-08-26T22:15:50.750" UserId="37" Text="&lt;xna&gt;&lt;c#&gt;&lt;metaprogramming&gt;&lt;reflection&gt;" />
  <row Id="38016" PostHistoryTypeId="2" PostId="16489" RevisionGUID="4a874e12-8eb9-4162-8db0-e9306b5bb2bf" CreationDate="2011-08-26T22:35:39.280" UserId="4568" Text="Are there any industry respected certifications for game or graphics developers?" />
  <row Id="38017" PostHistoryTypeId="1" PostId="16489" RevisionGUID="4a874e12-8eb9-4162-8db0-e9306b5bb2bf" CreationDate="2011-08-26T22:35:39.280" UserId="4568" Text="Game/graphics development certification" />
  <row Id="38018" PostHistoryTypeId="3" PostId="16489" RevisionGUID="4a874e12-8eb9-4162-8db0-e9306b5bb2bf" CreationDate="2011-08-26T22:35:39.280" UserId="4568" Text="&lt;jobs&gt;" />
  <row Id="38019" PostHistoryTypeId="2" PostId="16490" RevisionGUID="81ba2c7f-0911-4199-b392-df374ec60aa4" CreationDate="2011-08-26T22:51:02.690" UserId="8957" Text="    js.SetParameter(&quot;XNA_Keyboard&quot;, new {&#xD;&#xA;        keyDown = (Func&lt;string, bool&gt;)((name) =&gt; {&#xD;&#xA;            return keyboardState.IsKeyDown((Keys)Enum.Parse(typeof(Keys), name, false)); // ! Can't index keys enum by name&#xD;&#xA;        }),&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;That should do the trick, assuming the names match the C# ones." />
  <row Id="38020" PostHistoryTypeId="5" PostId="16434" RevisionGUID="d57df1b8-6b51-44e9-8cf0-7806ce74b198" CreationDate="2011-08-26T23:26:42.437" UserId="2289" Comment="edited body" Text="I'm a beginner to OpenGL and GLSL especially, and I'm having a lot of trouble getting textures to display via shaders. My shader code compiles without any warnings or errors, but I seem completely unable to render my texture. In fact, nothing's being rendered at all; I'm getting a blank screen. Here's my current, simplified code (written in D, but should function almost exactly as it looks as if it were in C++):&#xD;&#xA;&#xD;&#xA;    int main(string[] argv) {&#xD;&#xA;        try {&#xD;&#xA;            ilInit();&#xD;&#xA;            iluInit();&#xD;&#xA;            ilutInit();                 // GOTCHA: These two calls need to be in order!&#xD;&#xA;            ilutRenderer(ILUT_OPENGL);  //&#xD;&#xA;            glfwInit();&#xD;&#xA;            if(SDL_Init(SDL_INIT_VIDEO) &gt; 0) writeln(&quot;ERROR&quot;);&#xD;&#xA;        &#xD;&#xA;            // Create an OpenGL context and window.&#xD;&#xA;            const int VWIDTH = 1600;&#xD;&#xA;            const int VHEIGHT = 900;&#xD;&#xA;            const int WIDTH = 1280;&#xD;&#xA;            const int HEIGHT = 720;&#xD;&#xA;            glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 8);&#xD;&#xA;            glfwOpenWindowHint(GLFW_AUX_BUFFERS, 1);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);&#xD;&#xA;            glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);&#xD;&#xA;            glfwOpenWindow(WIDTH, HEIGHT, 8, 8, 8, 8, 0, 0, GLFW_WINDOW /+ GLFW_FULLSCREEN +/);&#xD;&#xA;&#xD;&#xA;            GL.bindClassicVersions(true);&#xD;&#xA;            GL.bindModernVersions(true, GLVersion.GL33);&#xD;&#xA;            GL.bindExtensions(true);    // Returns GL_INVALID_ENUM&#xD;&#xA;&#xD;&#xA;            glMatrixMode(GL_PROJECTION);&#xD;&#xA;            glLoadIdentity();&#xD;&#xA;            glOrtho(0, VWIDTH, 0, VHEIGHT, -100, 100);&#xD;&#xA;            glMatrixMode(GL_MODELVIEW);&#xD;&#xA;            glLoadIdentity(); &#xD;&#xA;&#xD;&#xA;            // Set clear color&#xD;&#xA;            glClearColor(0.392, 0.584, 0.929, 1);&#xD;&#xA;&#xD;&#xA;            // Set GL enables/disables&#xD;&#xA;            glShadeModel(GL_SMOOTH);                                // Enables smooth shading&#xD;&#xA;            glEnable(GL_TEXTURE_2D);                                // Enable 2D texturing&#xD;&#xA;            glEnable(GL_BLEND);                                     // Enable alpha blending&#xD;&#xA;            glDisable(GL_DEPTH_TEST);                               // Disable depth testing&#xD;&#xA;            glDisable(GL_CULL_FACE);                                // Disable face culling&#xD;&#xA;            glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);&#xD;&#xA;            //glDepthFunc(GL_LEQUAL);                                 // The depth test type&#xD;&#xA;&#xD;&#xA;            // Initialize and compile shaders&#xD;&#xA;            GLuint vertShaderId, fragShaderId;&#xD;&#xA;            vertShaderId = glCreateShader(GL_VERTEX_SHADER);&#xD;&#xA;            fragShaderId = glCreateShader(GL_FRAGMENT_SHADER);&#xD;&#xA;        &#xD;&#xA;            immutable(GLchar)* vertShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    in vec3 vertex;&#xD;&#xA;    in vec2 texCoord;&#xD;&#xA;&#xD;&#xA;    out vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragmentTexCoord = texCoord;&#xD;&#xA;        gl_Position = vec4(vertex, 1.0);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;            immutable(GLchar)* fragShaderSrc = toStringz(&quot;#version 330&#xD;&#xA;    uniform sampler2D firstTexture;&#xD;&#xA;    in vec2 fragmentTexCoord;&#xD;&#xA;&#xD;&#xA;    layout(location = 0, index = 0) out vec4 fragColor;&#xD;&#xA;&#xD;&#xA;    void main(void) {&#xD;&#xA;        fragColor = texture2D(firstTexture, fragmentTexCoord);&#xD;&#xA;    }&#xD;&#xA;    &quot;);&#xD;&#xA;&#xD;&#xA;            glShaderSource(vertShaderId, 1, &amp;vertShaderSrc, null);&#xD;&#xA;            glShaderSource(fragShaderId, 1, &amp;fragShaderSrc, null);&#xD;&#xA;&#xD;&#xA;            glCompileShader(vertShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(vertShaderId);&#xD;&#xA;            glCompileShader(fragShaderId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(fragShaderId);&#xD;&#xA;&#xD;&#xA;            GLuint programId = glCreateProgram();&#xD;&#xA;&#xD;&#xA;            glAttachShader(programId, vertShaderId);&#xD;&#xA;            glAttachShader(programId, fragShaderId);&#xD;&#xA;&#xD;&#xA;            glLinkProgram(programId);&#xD;&#xA;            tge.shader.Shader.checkCompileLog(programId);&#xD;&#xA;&#xD;&#xA;            glUseProgram(programId);&#xD;&#xA;            checkGLError();&#xD;&#xA;&#xD;&#xA;            // Load texture&#xD;&#xA;            auto texture = new Texture2d(r&quot;res/test.png&quot;);&#xD;&#xA;            texture.load();&#xD;&#xA;&#xD;&#xA;            bool running = true;&#xD;&#xA;            clearGLError();&#xD;&#xA;            while(running) {&#xD;&#xA;                // Clear viewport&#xD;&#xA;                glClear(GL_COLOR_BUFFER_BIT);&#xD;&#xA;&#xD;&#xA;                // Bind texture ID&#xD;&#xA;                glActiveTexture(GL_TEXTURE0);&#xD;&#xA;                glBindTexture(GL_TEXTURE_2D, texture.textureId);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Set texture uniform value&#xD;&#xA;                auto loc = glGetUniformLocation(programId, &quot;firstTexture&quot;);&#xD;&#xA;                checkGLError();&#xD;&#xA;                glUniform1i(loc, 0);&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Render&#xD;&#xA;                glBegin(GL_QUADS);&#xD;&#xA;                    glTexCoord2d(0, 0); glVertex2d(-0.8, -0.8);&#xD;&#xA;                    glTexCoord2d(1, 0); glVertex2d( 0.8, -0.8);&#xD;&#xA;                    glTexCoord2d(1, 1); glVertex2d( 0.8,  0.8);&#xD;&#xA;                    glTexCoord2d(0, 1); glVertex2d(-0.8,  0.8);&#xD;&#xA;                glEnd();&#xD;&#xA;                checkGLError();&#xD;&#xA;&#xD;&#xA;                // Swap front and back rendering buffers&#xD;&#xA;                glfwSwapBuffers();&#xD;&#xA;&#xD;&#xA;                // Add a tiny delay if no work is being done in the loop.&#xD;&#xA;                //glfwSleep(double.epsilon);&#xD;&#xA;&#xD;&#xA;                // Check if ESC key was pressed or window was closed&#xD;&#xA;                running = !glfwGetKey(GLFW_KEY_ESC) &amp;&amp; glfwGetWindowParam(GLFW_OPENED);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        catch(Throwable t) {&#xD;&#xA;            Logger.log(Severity.Error, t.msg);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return 0;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm guessing it's something simple I've overlooked due to being new. Any help would be appreciated!" />
  <row Id="38021" PostHistoryTypeId="2" PostId="16491" RevisionGUID="a38cf3ec-5204-496f-8ba1-586c4812ed91" CreationDate="2011-08-26T23:31:53.980" UserId="111" Text="For many games I recommend implementing game logic that updates in fixed time intervals. When updating your game, measure how much time has elapsed and then run as many game ticks as needed to update your game state to the current time.&#xD;&#xA;&#xD;&#xA;pseudo code:&#xD;&#xA;&#xD;&#xA;    var gameSimulatedTime = 0;&#xD;&#xA;    var tickTime = 1000/60; // game logic runs at 60 ticks per second&#xD;&#xA;    update() {&#xD;&#xA;        var newWallTime = (new Date()).getTime();&#xD;&#xA;        var deltaTime = newWallTime - gameSimulatedTime;&#xD;&#xA;        if (deltaTime &gt; 1000) // If over 1 second has elapsed, ignore and only update 1 frame.&#xD;&#xA;            gameSimulatedTime = newWallTime-1;&#xD;&#xA;        &#xD;&#xA;        while (gameSimulatedTime &lt; newWallTime) {&#xD;&#xA;          gameSimulatedTime += tickTime;&#xD;&#xA;          updateGameStateByOneTick();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Notes: &#xD;&#xA;&#xD;&#xA; - If you browse away and come back, and or have very low frame rate, the logic squelches the huge update and just updates one frame.&#xD;&#xA; - Game time is never lost.. If wall time has progressed for 1.5 ticks worth of time and then another 1.5 ticks worth the logic will correctly update the game for 3 ticks.&#xD;&#xA;&#xD;&#xA;Pros: &#xD;&#xA;&#xD;&#xA; - Even at low frame rates the game will update deterministically&#xD;&#xA; - Some game logic is easier to implement in a simple &quot;one step at a time&quot; manner, instead of dealing with e.g. 17.490823ms of elapsed time.&#xD;&#xA;&#xD;&#xA;Cons:&#xD;&#xA;&#xD;&#xA; - Game logic may be run many times over each visual frame. If computation is expensive (e.g. A* pathfinding) it may be preferable to update only once and provide the amount of time that should be accounted for.&#xD;&#xA; - The discrete updates can cause beat patterns if e.g. the visual update is running at 45fps and game logic at 60fps. The game logic would update one tick, two ticks, one tick, two ticks, ... for each visual frame. In practice this often isn't that perceptible. Based on how expensive your update logic is, you can make the tickTime very small and greatly reduce this, e.g. tickTime = 1000/120 or even 1000/240.&#xD;&#xA;&#xD;&#xA;If these Cons are _real_ issues for your game, then move to more complicated update methods." />
  <row Id="38022" PostHistoryTypeId="2" PostId="16492" RevisionGUID="99c40287-e96e-402b-ab99-6727c780cc29" CreationDate="2011-08-26T23:50:38.147" UserId="7367" Text="&#xD;&#xA;For the US, there's [GuildHall at SMU][1]. They offer both a Master's Degree and a certification. The only difference being the Masters have to write a thesis; and [Full Sail][2]&#xD;&#xA;&#xD;&#xA;For international persons, as Ray Dey commented, a good portfolio is all I can suggest.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://guildhall.smu.edu/&#xD;&#xA;  [2]: http://www.fullsail.edu/" />
  <row Id="38023" PostHistoryTypeId="2" PostId="16493" RevisionGUID="c62d26ff-7f71-4a89-aacd-7591832306e2" CreationDate="2011-08-26T23:53:26.927" UserId="1929" Text="You can always use a Wordpress installation for it. It has an image gallery, and allows you to upload images and tag/categorize them (if you use one image per post)." />
  <row Id="38024" PostHistoryTypeId="2" PostId="16494" RevisionGUID="5a5afdfd-9262-41b6-9899-57563a3a39d8" CreationDate="2011-08-27T00:14:31.433" UserId="9514" Text="What's the best way to program a rhythm based game in XNA? (Some sort of game like Dance Dance Revolution) Would you use the built in GameTime? What logic would you use to make sure the game constantly stays in sync to the music? Any tips would be much appreciated! &#xD;&#xA;&#xD;&#xA;What I am basically asking is how you would keep the gameplay in sync with the music. For example in DDR how would I correctly sync the arrows to the beat of the music?" />
  <row Id="38025" PostHistoryTypeId="1" PostId="16494" RevisionGUID="5a5afdfd-9262-41b6-9899-57563a3a39d8" CreationDate="2011-08-27T00:14:31.433" UserId="9514" Text="XNA Rhythm(Music) Based Game" />
  <row Id="38026" PostHistoryTypeId="3" PostId="16494" RevisionGUID="5a5afdfd-9262-41b6-9899-57563a3a39d8" CreationDate="2011-08-27T00:14:31.433" UserId="9514" Text="&lt;xna&gt;&lt;game-design&gt;&lt;music&gt;" />
  <row Id="38027" PostHistoryTypeId="2" PostId="16495" RevisionGUID="f7d6b31e-0c3c-44f4-b7f3-54ed049f3007" CreationDate="2011-08-27T00:24:14.910" UserId="4235" Text="In your second paragraph, you bring up the issue of simultaneous movement. This is how objects move in the real world (obviously), and if you're interested in physical accuracy you would need to solve your collisions by taking this into account. However, this can very quickly become expensive, so most games perform collision detection by moving objects sequentially (move A then B or B then A, then check for collision). The unrealistic nature of sequential detection tends to be a non-issue and greatly simplifies the computation. &#xD;&#xA;&#xD;&#xA;In the third paragraph, you bring up the types of movement the objects might perform on their way to location C. Since the movement step for most games is fairly small, simplifications and restrictions on an object's movement are often employed so that calculations become much easier. An example would be the stipulation that during a single time step, objects are only allowed to move with a constant velocity and cannot rotate. &#xD;&#xA;&#xD;&#xA;So, overall, I'd say that the answer to your question is that simultaneous, complex motions of objects *can* probably be simulated by a computer depending upon exactly what they're doing, but it is unlikely that such computations are feasible or necessary to perform in a real-time application. Using a simplified movement model with a sequential movement of objects greatly simplifies the calculations and still looks correct under most circumstances. &#xD;&#xA;" />
  <row Id="38028" PostHistoryTypeId="2" PostId="16496" RevisionGUID="009908ba-0948-4335-8bac-ed003409540d" CreationDate="2011-08-27T00:35:22.513" UserId="3637" Text="Here's another nice [Gamasatura][1] article.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamasutra.com/view/feature/3015/pool_hall_lessons_fast_accurate_.php" />
  <row Id="38029" PostHistoryTypeId="25" PostId="16494" RevisionGUID="e4a7bac2-24ee-438c-92f3-e0f20184d309" CreationDate="2011-08-27T00:37:55.853" Comment="http://twitter.com/#!/StackGameDev/status/107250455800840192" />
  <row Id="38030" PostHistoryTypeId="2" PostId="16497" RevisionGUID="64ce63a2-4120-4c8d-855a-59ad7972ff16" CreationDate="2011-08-27T02:55:59.560" UserId="4306" Text="How did the creators of TF2 make the glow on the payload cart visible through walls? Is it possible to implement this in Unity?" />
  <row Id="38031" PostHistoryTypeId="1" PostId="16497" RevisionGUID="64ce63a2-4120-4c8d-855a-59ad7972ff16" CreationDate="2011-08-27T02:55:59.560" UserId="4306" Text="How'd they do it: TF2 payload cart glow?" />
  <row Id="38032" PostHistoryTypeId="3" PostId="16497" RevisionGUID="64ce63a2-4120-4c8d-855a-59ad7972ff16" CreationDate="2011-08-27T02:55:59.560" UserId="4306" Text="&lt;graphics&gt;&lt;shaders&gt;&lt;glow&gt;" />
  <row Id="38033" PostHistoryTypeId="2" PostId="16498" RevisionGUID="6ded32bd-eb07-4bbf-9c39-bef96681a085" CreationDate="2011-08-27T03:27:15.767" UserId="-1" Text="" />
  <row Id="38034" PostHistoryTypeId="2" PostId="16499" RevisionGUID="e599aa07-7916-42dd-8c14-84bc5c6f04da" CreationDate="2011-08-27T03:27:15.767" UserId="-1" Text="" />
  <row Id="38035" PostHistoryTypeId="25" PostId="16497" RevisionGUID="52105fb0-c307-4772-bcc7-7c651c5d41a0" CreationDate="2011-08-27T03:37:55.763" Comment="http://twitter.com/#!/StackGameDev/status/107295754640556032" />
  <row Id="38036" PostHistoryTypeId="2" PostId="16500" RevisionGUID="4346c808-e0d8-4cd1-b277-e4ec73a715a9" CreationDate="2011-08-27T03:54:59.487" UserId="3128" Text="I already have the basics of ambient occlusion down.  I have a raycaster and am capable of shooting rays about a hemisphere uniformly.  It seems like those are the basics of what are needed for radiosity but I don't know where to go from there.  Do I find how much light comes from each face?  (I'm making my game out of cubes like minecraft)  After that what do I do? " />
  <row Id="38037" PostHistoryTypeId="1" PostId="16500" RevisionGUID="4346c808-e0d8-4cd1-b277-e4ec73a715a9" CreationDate="2011-08-27T03:54:59.487" UserId="3128" Text="Can someone explain radiosity lighting to me?" />
  <row Id="38038" PostHistoryTypeId="3" PostId="16500" RevisionGUID="4346c808-e0d8-4cd1-b277-e4ec73a715a9" CreationDate="2011-08-27T03:54:59.487" UserId="3128" Text="&lt;lighting&gt;&lt;minecraft&gt;&lt;radiosity&gt;&lt;global-illumination&gt;" />
  <row Id="38039" PostHistoryTypeId="5" PostId="16499" RevisionGUID="d8e13925-509b-41ce-89bc-0391da8ea6bd" CreationDate="2011-08-27T04:20:08.297" UserId="4306" Comment="added 165 characters in body" Text="3D software made by Autodesk for animation, modeling, simulation, visual effects, rendering, matchmoving, and compositing on a highly extensible production platform." />
  <row Id="38040" PostHistoryTypeId="24" PostId="16499" RevisionGUID="d8e13925-509b-41ce-89bc-0391da8ea6bd" CreationDate="2011-08-27T04:20:08.297" Comment="Proposed by 4306 approved by 51 edit id of 677" />
  <row Id="38041" PostHistoryTypeId="25" PostId="16488" RevisionGUID="5b70b002-2d20-44da-a045-b7948566f4cc" CreationDate="2011-08-27T06:37:55.717" Comment="http://twitter.com/#!/StackGameDev/status/107341051483791360" />
  <row Id="38042" PostHistoryTypeId="2" PostId="16501" RevisionGUID="e3374f8d-d34e-4de3-991a-58fa1386d80c" CreationDate="2011-08-27T07:13:39.453" UserId="2187" Text="Indeed, that is all you need for radiosity. There are two different (but equal) formulations. The first is to &quot;radiate&quot; or shoot light from each patch (in your case probably a face), and the other is to &quot;gather&quot; or receive light into each patch. If you iteratively do this enough times, you get radiosity.&#xD;&#xA;&#xD;&#xA;The first step is to figure out where light originates from because in either method there must be a light source. If you are going to do the gather method, I must warn you that it does not handle point lights very well. You must seed patches with light (calculate it separately) or you get odd results. In the radiate method you emit from the point lights as normal but ignore them as receivers from other patches. &#xD;&#xA;&#xD;&#xA;You can stop after any number of bounces (or iterations), but the more you do, the better the solution. You have an easy time of patch creation as you can consider each side of your cubes as a patch. If you want something more detailed you can subdivide those faces even farther. &#xD;&#xA;&#xD;&#xA;In a radiating example, this could be used as a basis for your loop:&#xD;&#xA;&#xD;&#xA;    while(!done) {&#xD;&#xA;       foreach Patch a {&#xD;&#xA;         a.shootRays(n);&#xD;&#xA;         foreach ray r {&#xD;&#xA;           Patch b = r.firstIntersectingPatch();&#xD;&#xA;           float modifier = 1 / ((distance(a,b)^2)&#xD;&#xA;           b.incidentLight += (a.exidentLight / n) * modifier; &#xD;&#xA;         } &#xD;&#xA;       }&#xD;&#xA;      foreach Patch a {&#xD;&#xA;        float modifier = a.absorption;&#xD;&#xA;        a.exidentLight = (a.incidentLight * a.absorption) + a.emission;&#xD;&#xA;        a.incidentLight = 0;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      done = goodEnough() ? true : false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For a gather method, you would have the slightly different first loop:&#xD;&#xA;&#xD;&#xA;          foreach Patch a {&#xD;&#xA;             a.shootRays(n);&#xD;&#xA;             foreach ray r {&#xD;&#xA;               Patch b = r.firstIntersectingPatch();&#xD;&#xA;               float modifier = 1 / ((distance(a,b)^2)&#xD;&#xA;               a.incidentLight += b.exidentLight * modifier; &#xD;&#xA;             } &#xD;&#xA;             a.incidentLight /= n;&#xD;&#xA;           }&#xD;&#xA;&#xD;&#xA;The first modifier is used for per patch modification of the incoming light. The most common use would be falloff from distance as I did above. The second modifier is for global modification of incoming light like material absorption. The a.emission variable would be 0 for most patches. &#xD;&#xA;&#xD;&#xA;Only those that are light sources (or directly affected by point light sources if you are using a gather method as noted above) should have non 0 emission values. &#xD;&#xA;&#xD;&#xA;The goodEnough() function could be many things. It could be just counting the number of iterations, or it could be looking at the total amount of light in the scene, or it could be some other test you devise. This part is really up to you and what you think looks good enough but still finishes in a reasonable amount of time. &#xD;&#xA;&#xD;&#xA;The more rays you shoot, the more accurate your solution but the slower the process. The same goes for number of patches and number of iterations through the loop. How you store the final light value is up to you. It could be in a texture, or stored as a value in your cubes, but I don't think this would be feasible to do in real-time with a decent number of patches.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38043" PostHistoryTypeId="2" PostId="16502" RevisionGUID="c33cd12d-8d6f-482e-91c0-534b3ff282a8" CreationDate="2011-08-27T08:33:07.300" UserId="4443" Text="The artists were able to keep the raw assets in any format they wanted. They would then export the files to a specific format, either from a plugin to Max/Maya that we made that would dump the data out in our format or simply saving as a PNG for photoshop and the like with the quality settings varying from project to project (ie, from target platform to target platform).&#xD;&#xA;&#xD;&#xA;The files would then be processed into their load-time format by an asset compilation tool for faster load times.&#xD;&#xA;&#xD;&#xA;However, this was just the way we did it. I would imagine alot of examples would follow along this line and there may have been guidelines above and beyond what I was aware of that an art director might have placed on top of the technical limitations depending on styles of art, but in general I think you will find the basic 'Artists keep it in a raw format and export it to a game engine specific format that is then further processed' as fairly standard at most large and even mid level game companies." />
  <row Id="38044" PostHistoryTypeId="2" PostId="16503" RevisionGUID="34c2d67f-3a0e-4d12-af1b-81a09b3c2c09" CreationDate="2011-08-27T08:39:11.200" UserId="2239" Text="In XNA it should be simple as the mediaplayer class can report its position while playing back something, use that position (at least that's what I did when I did a 2D scene playback that had to sync perfectly to a music track). It can also be set, so you can do decently accurate scrubbing." />
  <row Id="38045" PostHistoryTypeId="25" PostId="16486" RevisionGUID="5dff7e5c-cc15-462b-8c04-ccb4b7880fdc" CreationDate="2011-08-27T09:37:55.643" Comment="http://twitter.com/#!/StackGameDev/status/107386350352863232" />
  <row Id="38046" PostHistoryTypeId="2" PostId="16504" RevisionGUID="a222f645-3929-4015-b686-15185570f82f" CreationDate="2011-08-27T10:02:45.090" UserId="3794" Text="On the link bellow you will find one of the most excellent explanations of radiosity: &#xD;&#xA;&#xD;&#xA; - **[http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm][1]**&#xD;&#xA;&#xD;&#xA;It is worth reading even if you know it well. So funny :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm" />
  <row Id="38047" PostHistoryTypeId="2" PostId="16505" RevisionGUID="0c3e2675-15bb-4167-a828-aa5a2803a9bd" CreationDate="2011-08-27T10:37:40.157" UserId="9519" Text="What is the usual method of storing 3D models, textures, sounds and scripts (e.g. Lua files) during development and in a release? I am developing a game with my friends in mainly C++; in the prototyping phase we only had a single texture that was saved as a C header with the GIMP, but of course, this approach does not scale well and increases compilation times greatly.&#xD;&#xA;&#xD;&#xA;Under Windows, the usual practice is to just dump them to the `%PROGRAMFILES%` subdirectory in which the game executable resides, perhaps arranging them in an appropriate tree structure. However, on Linux the picture seems a lot more complicated. The executable usually resides in `/usr/bin`, whereas applications store their other files in `/usr/share`, and I think it would be an extremely bad practice to put non-executables in `/usr/bin`. However, the directory structure during development is totally different.&#xD;&#xA;&#xD;&#xA;I could come up with two different possible solutions:&#xD;&#xA;&#xD;&#xA; - Let the executable find the asset files relative to itself, and install the game to `/opt`. Then place symlinks to `/usr/bin`. During development, the relative path of the assets to the binaries is the same as during deployment.&#xD;&#xA; - Access the files with an absolute path which is defined as a preprocessor symbol. Let the build process (in our case, raw `Makefile`s) take care of defining it as it is fit.&#xD;&#xA;&#xD;&#xA;Both approaches seem somewhat inelegant to me in one aspect or another. Is there a common practice in the game development industry about this?&#xD;&#xA;&#xD;&#xA;The only relevant questions I could find were http://gamedev.stackexchange.com/questions/14504/determining-the-location-of-installed-on-disk-game-assets and http://gamedev.stackexchange.com/questions/2309/directory-paths-for-resources-and-assets, but those did not address the problem of running &quot;from the source tree&quot;." />
  <row Id="38048" PostHistoryTypeId="1" PostId="16505" RevisionGUID="0c3e2675-15bb-4167-a828-aa5a2803a9bd" CreationDate="2011-08-27T10:37:40.157" UserId="9519" Text="Finding asset files in Linux games" />
  <row Id="38049" PostHistoryTypeId="3" PostId="16505" RevisionGUID="0c3e2675-15bb-4167-a828-aa5a2803a9bd" CreationDate="2011-08-27T10:37:40.157" UserId="9519" Text="&lt;assets&gt;&lt;linux&gt;&lt;filesystem&gt;" />
  <row Id="38050" PostHistoryTypeId="2" PostId="16506" RevisionGUID="4c3b9891-93b7-45cd-a01d-17ea7c7f644c" CreationDate="2011-08-27T11:50:05.827" UserId="9393" Text="I am very new to game programming and I am in my first project. I have come to a point that I need expert advice:&#xD;&#xA;&#xD;&#xA;Now for the game physics to be able to work on objects, it needs to know each object's position and its orientation in 3D space. As part of the simulation and due to objects moves (position change) and changes orientation (rotation).&#xD;&#xA;&#xD;&#xA;Does this mean that rotation and translation calculation are done twice ? One in physics and the other is done using glTranslate and glRotate before drawing the object ?&#xD;&#xA;&#xD;&#xA;IMO this should not happen. Also calculating translation and rotation in physics part will cause them to use the CPU instead of the GPU which will affect performance.&#xD;&#xA;&#xD;&#xA;How is this done by experts and what advice do you give about efficient game architecture to handle such situations?" />
  <row Id="38051" PostHistoryTypeId="1" PostId="16506" RevisionGUID="4c3b9891-93b7-45cd-a01d-17ea7c7f644c" CreationDate="2011-08-27T11:50:05.827" UserId="9393" Text="OpenGL vs physics?" />
  <row Id="38052" PostHistoryTypeId="3" PostId="16506" RevisionGUID="4c3b9891-93b7-45cd-a01d-17ea7c7f644c" CreationDate="2011-08-27T11:50:05.827" UserId="9393" Text="&lt;opengl&gt;&lt;physics&gt;" />
  <row Id="38053" PostHistoryTypeId="25" PostId="16505" RevisionGUID="cd709b4a-12e9-4a1b-822f-3a59025714cd" CreationDate="2011-08-27T12:37:55.693" Comment="http://twitter.com/#!/StackGameDev/status/107431649876254720" />
  <row Id="38054" PostHistoryTypeId="2" PostId="16507" RevisionGUID="0aed14e7-a868-41d0-bdaf-4190e63d6ef4" CreationDate="2011-08-27T12:43:27.260" UserId="5473" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. This about applications across the board which use 3D rendering technologies like OpenGL, it's competitors, and it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, it is used in everything from military to medical applications, covering things as broad as modelling sales statistics, air traffic simulations, simulations of chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for that solution, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words what I am saying is that physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations." />
  <row Id="38055" PostHistoryTypeId="5" PostId="16507" RevisionGUID="55c7f395-769f-45c1-8b22-f030e1e4ba6b" CreationDate="2011-08-27T12:51:00.040" UserId="5473" Comment="added 915 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on applications across the spectrum which use 3D rendering technologies like OpenGL, it's competitors, and it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for that solution, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words what I am saying is that physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations. Thus my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline: you push in triangles and material data, it pumps out your 3D world as moving image." />
  <row Id="38056" PostHistoryTypeId="5" PostId="16507" RevisionGUID="5439b8bc-73b1-49e4-9c20-f38a5455695d" CreationDate="2011-08-27T12:58:14.803" UserId="5473" Comment="added 915 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on applications across the spectrum which use 3D rendering technologies like OpenGL, it's competitors, and it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for that solution, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words what I am saying is that physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;At a more fundamental level, in any case, your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline: you push in triangles and material data, it pumps out your 3D world as moving image." />
  <row Id="38057" PostHistoryTypeId="5" PostId="16507" RevisionGUID="bbf6b662-adfb-4c77-a477-843fc1f5128b" CreationDate="2011-08-27T13:03:33.720" UserId="5473" Comment="added 9 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for that solution, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline: you push in triangles and material data, it pumps out your 3D world as moving image." />
  <row Id="38058" PostHistoryTypeId="5" PostId="16507" RevisionGUID="8409c806-968a-41c1-affa-7a78937e9aa8" CreationDate="2011-08-27T13:09:51.180" UserId="5473" Comment="added 9 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for that solution, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run. This is one of the reasons that voxel technologies are seeing a huge resurgence of interest; they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline: you push in triangles and material data, it pumps out your 3D world as moving image." />
  <row Id="38059" PostHistoryTypeId="5" PostId="16507" RevisionGUID="5e92a857-6299-492a-977a-5393e306e04b" CreationDate="2011-08-27T13:15:15.743" UserId="5473" Comment="added 9 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline: you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38061" PostHistoryTypeId="5" PostId="16507" RevisionGUID="f810f025-c477-40d9-85d9-d56b19d84fba" CreationDate="2011-08-27T13:22:05.793" UserId="5473" Comment="added 9 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA;&#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline (CUDA is an exception): you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38064" PostHistoryTypeId="5" PostId="16507" RevisionGUID="a9a1e224-2221-493b-a9f0-227d57226c0d" CreationDate="2011-08-27T13:28:30.450" UserId="5473" Comment="added 134 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The mathematics surrounding physics (in particular, issues like collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering. Not only that, but not every game uses / has used physics, particularly in 3D, traditionally.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run. Even Nvidia's PhysX requires complex, concave polyhedra to be decomposed down into simpler convex polyhedra, for physics simulation.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA; &#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline (CUDA is an exception): you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38065" PostHistoryTypeId="2" PostId="16511" RevisionGUID="8d0d357b-2b06-42fb-8181-2cd20664ed39" CreationDate="2011-08-27T13:37:39.273" UserId="1957" Text="I was wondering what kind of technologies were used in FPS games to move bots around the level. I know the pathfinding is done using waypoints or navigation meshes but how do the bots actually rotate and move over those paths? Is something like opensteer used for that, if so, which particular parts?" />
  <row Id="38066" PostHistoryTypeId="1" PostId="16511" RevisionGUID="8d0d357b-2b06-42fb-8181-2cd20664ed39" CreationDate="2011-08-27T13:37:39.273" UserId="1957" Text="Techniques for bot movement in (first person) shooter games" />
  <row Id="38067" PostHistoryTypeId="3" PostId="16511" RevisionGUID="8d0d357b-2b06-42fb-8181-2cd20664ed39" CreationDate="2011-08-27T13:37:39.273" UserId="1957" Text="&lt;ai&gt;&lt;first-person-shooter&gt;&lt;behavior&gt;" />
  <row Id="38068" PostHistoryTypeId="2" PostId="16512" RevisionGUID="dcb6a5f9-ad84-43b1-8070-6c29a1238490" CreationDate="2011-08-27T13:48:59.697" UserId="5473" Text="(Optional) The navigation mesh approach is just an extension of the waypoints approach, that allows &quot;wandering&quot;. In other words, you can use your navigation mesh to get back to a waypoint graph, by taking the centroid of each polygon in the navigation mesh. (If you are pre-generating the navigation mesh, you can just store the original source points; this way you don't have to recalculate the centroids later).&#xD;&#xA;&#xD;&#xA;(Mandatory) Now once you have nothing but waypoints, you are basically doing a graph search for the shortest path between A and Z. A is where the entity in question is; it wants to know how to fulfill some goal, and that goal generally has a physical location associated with it, which is Z. Now use something like A* for your shortest-path search, within that waypoint graph. Now move your entity post-haste from A to Z, by moving A-&gt;B, C-&gt;D and so on to Z. This should be a simple matter of moving your entity along a straight line in each instance." />
  <row Id="38069" PostHistoryTypeId="5" PostId="16512" RevisionGUID="92c5e1dd-c4da-43f0-acaf-9fdd342f70c4" CreationDate="2011-08-27T13:55:33.837" UserId="5473" Comment="added 14 characters in body" Text="(Optional) The navigation mesh approach is just an extension of the waypoints approach, that allows &quot;wandering&quot;. In other words, you can use your navigation mesh to get back to a waypoint graph, by taking the centroid of each polygon in the navigation mesh. (If you are pre-generating the navigation mesh, you can just store the original source points; this way you don't have to recalculate the centroids later).&#xD;&#xA;&#xD;&#xA;(Mandatory) Now once you have nothing but a waypoint graph, you need to do a search for the shortest path between A and Z. A is where the entity in question is; it wants to know how to fulfill some goal, and that goal generally has a physical location associated with it, which is Z. Now apply something like the A* algorithm for shortest-path search, to that waypoint graph. The output will be a single linear list of nodes indicating the shortest path to your destination, {A..Z}. Now move your entity: This should be a simple matter of moving your entity along a straight line betwen A-&gt;B, B-&gt;C etc. to Z. Each time you reach another node in the path, fire off an event (or whatever) and then start moving to the next one until Z is reached." />
  <row Id="38070" PostHistoryTypeId="5" PostId="16512" RevisionGUID="fc5e0609-4364-4862-bf2e-16360d01aaa6" CreationDate="2011-08-27T14:01:20.067" UserId="5473" Comment="added 14 characters in body" Text="(Optional) The navigation mesh approach is just an extension of the waypoints approach, that allows &quot;wandering&quot;. In other words, you can use your navigation mesh to get back to a waypoint graph, by taking the centroid of each polygon in the navigation mesh. (If you are pre-generating the navigation mesh, you can just store the original source points; this way you don't have to recalculate the centroids later).&#xD;&#xA;&#xD;&#xA;(Mandatory) Now once you have nothing but a waypoint graph, you need to do a search for the shortest path between A and Z. A is where the entity in question is; it wants to know how to fulfill some goal, and that goal generally has a physical location associated with it, which is Z. Now apply something like the A* algorithm for shortest-path search, to that waypoint graph. The output will be a single linear list of nodes indicating the shortest path to your destination, {A..Z}. Now move your entity: This should be a simple matter of moving your entity along a straight line betwen A-&gt;B, B-&gt;C etc. to Z. Each time you reach another node in the path, fire off an event (or whatever) and then start moving to the next one until Z is reached.&#xD;&#xA;&#xD;&#xA;Rotation? Well just like in real life, you turn around to face where you're going, don't you? So have the entity rotate before she heads off toward the next node. You can even begin her moving slowly at first while she's rotating, to look more fluid." />
  <row Id="38073" PostHistoryTypeId="5" PostId="16507" RevisionGUID="42f8c8b1-a49c-488c-b920-fd4e497a24cf" CreationDate="2011-08-27T14:30:15.120" UserId="5473" Comment="deleted 94 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The nature of the mathematics and data structures surrounding physics operations (particularly collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is an imaginative space. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run. Even Nvidia's PhysX requires complex, concave polyhedra to be decomposed down into simpler convex polyhedra, for physics simulation.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA; &#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline (CUDA is an exception): you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38074" PostHistoryTypeId="5" PostId="16507" RevisionGUID="ff422b59-d61b-41aa-98f6-751e02c4dbe6" CreationDate="2011-08-27T15:13:39.997" UserId="5473" Comment="added 8 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The nature of the mathematics and data structures surrounding physics operations (particularly collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is a product of the imagination. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run. Even Nvidia's PhysX requires complex, concave polyhedra to be decomposed down into simpler convex polyhedra, for physics simulation.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA; &#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline (CUDA is an exception): you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38075" PostHistoryTypeId="5" PostId="16507" RevisionGUID="465ffb73-d116-4a95-ad17-80153f92e0e9" CreationDate="2011-08-27T15:31:33.720" UserId="5473" Comment="added 6 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The nature of the mathematics and data structures surrounding physics operations (particularly collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is a product of the imagination. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the difficulties of issues such as collision detection between convex polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run. Even Nvidia's PhysX requires complex, concave polyhedra to be decomposed down into simpler convex polyhedra, for physics simulation.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA; &#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline (CUDA/OpenCl are exceptions): you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38076" PostHistoryTypeId="25" PostId="16506" RevisionGUID="19111922-fe43-4f23-ba73-bd62f531466a" CreationDate="2011-08-27T15:37:55.950" Comment="http://twitter.com/#!/StackGameDev/status/107476947763863553" />
  <row Id="38077" PostHistoryTypeId="16" PostId="16449" RevisionGUID="6fea4a0a-ba2c-42ca-944e-026892cf1c68" CreationDate="2011-08-27T15:48:43.520" UserId="51" />
  <row Id="38078" PostHistoryTypeId="16" PostId="16450" RevisionGUID="356bfb76-988a-4994-a6ef-af0624c5671e" CreationDate="2011-08-27T15:48:43.520" UserId="51" />
  <row Id="38079" PostHistoryTypeId="16" PostId="16451" RevisionGUID="8b694872-66a2-4113-9fbc-b895b9e7d467" CreationDate="2011-08-27T15:48:43.520" UserId="51" />
  <row Id="38080" PostHistoryTypeId="16" PostId="16479" RevisionGUID="d11d9cf1-1b7c-4284-a444-88d3508ff0ed" CreationDate="2011-08-27T15:48:43.520" UserId="51" />
  <row Id="38081" PostHistoryTypeId="5" PostId="16449" RevisionGUID="35908046-d7b3-4e11-bda7-0cd152b8111c" CreationDate="2011-08-27T15:49:07.280" UserId="51" Comment="deleted 9 characters in body; edited title" Text="I'm looking for an (easy to use) &quot;3D painting&quot; program, a program that lets me load up a UV-mapped mesh, some textures and lets me 'paint' with those different textures.&#xD;&#xA;&#xD;&#xA;Exactly like all those terrain painting programs (Unity 3D has one integrated for example) but for a generic mesh, not just a height map.&#xD;&#xA;&#xD;&#xA;Cheap is better of course but ease to use is the most important.&#xD;&#xA;&#xD;&#xA;Script support is a big plus though.&#xD;&#xA;" />
  <row Id="38082" PostHistoryTypeId="4" PostId="16449" RevisionGUID="35908046-d7b3-4e11-bda7-0cd152b8111c" CreationDate="2011-08-27T15:49:07.280" UserId="51" Comment="deleted 9 characters in body; edited title" Text="What are some easy to use 3D painting programs?" />
  <row Id="38083" PostHistoryTypeId="4" PostId="16494" RevisionGUID="bb045481-a79c-442d-b265-5a7da52e61a0" CreationDate="2011-08-27T15:49:59.917" UserId="51" Comment="edited title" Text="How do you keep the gameplay and music in sync in a rhythm game?" />
  <row Id="38084" PostHistoryTypeId="4" PostId="16474" RevisionGUID="15a3ffb6-5fd2-4d08-b9a0-5f5c10ab3480" CreationDate="2011-08-27T15:51:14.967" UserId="51" Comment="edited title" Text="What standards should designers/artists follow when giving UI assets to coders?" />
  <row Id="38085" PostHistoryTypeId="4" PostId="16489" RevisionGUID="abfe5706-87b7-4b88-9d0e-bfc562bd3623" CreationDate="2011-08-27T15:52:17.277" UserId="51" Comment="edited title" Text="Are there any game/graphics development certifications?" />
  <row Id="38086" PostHistoryTypeId="2" PostId="16513" RevisionGUID="977bc25b-06c6-4ada-94f5-00087776e741" CreationDate="2011-08-27T16:23:29.880" UserId="8578" Text="Realistically you could have every certification known to man, and you will probably get a job.  But in the same respect you could have never stepped foot in a school, and have some amazing demos with your name on it, and get the same job, if not a better one.&#xD;&#xA;&#xD;&#xA;Ideally, both is best.&#xD;&#xA;&#xD;&#xA;I'm studying at a college in Canada for a diploma in Game Development.  So they do exist." />
  <row Id="38087" PostHistoryTypeId="2" PostId="16514" RevisionGUID="fec8b771-7375-4a01-b73d-7a20e098f9ec" CreationDate="2011-08-27T16:28:11.307" UserId="5899" Text="[Here][1] there is a document that explains the AI bot techniques employed in Quake III Arena game&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://dev.johnstevenson.co.uk/bots/20585341-The-Quake-III-Arena-Bot.pdf" />
  <row Id="38088" PostHistoryTypeId="5" PostId="16492" RevisionGUID="2a3aa1c7-079e-499f-8ff6-3bfa1fedfbf9" CreationDate="2011-08-27T16:41:09.473" UserId="7367" Comment="added 122 characters in body" Text="For the US, there's [GuildHall at SMU][1]. They offer both a Master's Degree and a certification. The only difference being the Masters have to write a thesis; and [Full Sail][2]&#xD;&#xA;&#xD;&#xA;For international persons, as Ray Dey commented, a good portfolio is all I can suggest.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Just remembered: There's an industry respected program at [DigiPen][3] as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://guildhall.smu.edu/&#xD;&#xA;  [2]: http://www.fullsail.edu/&#xD;&#xA;  [3]: http://www.digipen.edu/" />
  <row Id="38089" PostHistoryTypeId="2" PostId="16515" RevisionGUID="7e14d464-2425-4943-bac6-c3d652c07bbb" CreationDate="2011-08-27T16:46:49.187" UserId="7367" Text="As a student I can't give proper advice as to what is done in the industry, however, when working on a group project the programmers were &quot;in charge&quot; and told the artists exactly what they needed. In addition to the guidelines provided at the beginning of the project they were also expected to follow the requirements provided by the programmers.&#xD;&#xA;&#xD;&#xA;There was a lot of going back and forth when an artist didn't understand that the color R:254, G:0 B:254 was COMPLETELY DIFFERENT from the required R:255 G:0 B:255, was therefore unusable, and they had to start over." />
  <row Id="38091" PostHistoryTypeId="16" PostId="16507" RevisionGUID="0d413930-b565-4b96-a2f5-114756984c36" CreationDate="2011-08-27T16:57:43.427" UserId="5473" />
  <row Id="38092" PostHistoryTypeId="5" PostId="16507" RevisionGUID="0d413930-b565-4b96-a2f5-114756984c36" CreationDate="2011-08-27T16:57:43.427" UserId="5473" Comment="deleted 5 characters in body" Text="There are a number of reasons why rendering and physics pipelines have traditionally been kept discrete. Bear in mind as I list these, that this is not just about games. Your question touches on any application that uses a 3D rendering technology like OpenGL, it's competitors, or it's forerunners.&#xD;&#xA;&#xD;&#xA; - Not every application that use 3D, needs physics. Remember that OpenGL wasn't just built for games, its usage covers everything from medical simulations to modelling sales statistics, air traffic simulations to complex chemical reactions, and so on and so forth.&#xD;&#xA; - Any system which serves too many purposes becomes diluted in terms of efficiency. A graphic pipeline has to be *incredibly* fast. The moment you start introducing points where that pipeline has to interface with other subsystems such as the main system memory (where your code resides), you are going to experience order-of-magnitude reductions in efficiency. The hardware on your graphics card is very specifically narrowed down and ultra-optimised for *pushing pixels*, at great cost and many years of highly competitive research.&#xD;&#xA;&#xD;&#xA; - The nature of the mathematics and data structures surrounding physics operations (particularly collision detection and resolution, without which there really *is no physics*) is largely different from the mathematics required for rendering.&#xD;&#xA; - There are solutions that deal with physics in hardware. But unlike the way in which we render, the way in which we perform physics in any given situation differs widely. The most fundamental indication of this is that Newtonian physics is not one-size fits all; there are other ways of modelling physics mathematically that are more appropriate in other situations, such as Hamiltonian mechanics. And in games particularly, every individual game may choose to model its physics differently, whether in 2D or 3D. These need not even reflect real-world physics! -- because a game is a product of the imagination. In other words, physics are ultimately part of your game dynamic, and that may change from game to game -- let alone all of the other solutions to which technologies like OpenGL are applied.&#xD;&#xA; - Accurately simulating physics on a vertex-by-vertex level is, for the most part, not presently a viable option. Given the high poly counts of models in most games, and the inherent difficulty of collision detection involving concave polyhedra, it is not as simple as just calculating physics off the model provided. For many if not most 3D games, bounding volumes in the form of cylinders or boxes are used to simplify collision detection, where that sort of level of collision detection is even required. Given current technology, the level of processing involved wouldn't leave much room for the rest of your game logic to run. Even Nvidia's PhysX requires complex, concave polyhedra to be decomposed down into simpler convex polyhedra, for physics simulation.&#xD;&#xA;&#xD;&#xA; - Your graphics card is producing *perspective* with the transformations it performs. That is different from the transformations performed in physics, which have nothing to do with perspective as such -- it is simply calculating basic positions and orientations in your world. If you know about MVC, you will understand that there is a distinct difference between the data you hold in your application, and how your *present* that data.&#xD;&#xA; &#xD;&#xA;The computer technology industry is driven by need, and while visualisation is an almost universal need, physics simulations are by no means universal either as a requirement or in terms of their respective implementations.&#xD;&#xA;&#xD;&#xA;So my advice is, stop worrying about going against the grain and start focusing on how to do the two things you need to do: rendering and physics. You aren't going to get at the data in your graphics card's processing pipeline (CUDA/OpenCl are exceptions): you push in triangles and material data, it pumps out your 3D world as moving image.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As a final aside, your question is not without sense. The desire for a combined basis for physics and rendering, and the fact that floating-point math can be much slower than fixed point, shows us why voxel technologies are seeing a huge resurgence of interest: they simplify the entire world down to grid-positioned, axis-aligned convex polyhedra. This vastly improves performance, by reducing the amount of floating-point vector math needed for physical operations, as you are now working primarily in a spatially-subdividable, instanceable, integer-indexed grid. This same grid can be used for both rendering and physics, particularly as you may use different grid resolutions for these two distinct subsystems (when using an octree-based solution such as SVOs)." />
  <row Id="38093" PostHistoryTypeId="2" PostId="16517" RevisionGUID="26f9059e-7f56-4af1-925b-5a1cfa90ec76" CreationDate="2011-08-27T17:00:02.597" UserId="8390" Text="You can use as a base those midi trackers for xna:&#xD;&#xA;&#xD;&#xA;http://xnasfxrsynth.codeplex.com/&#xD;&#xA;&#xD;&#xA;http://sharpmod.codeplex.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this way you can do a perfect sync with the notes in an easy way.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38094" PostHistoryTypeId="5" PostId="2285" RevisionGUID="48c36cdd-0bac-4a24-94aa-bf6c93146f83" CreationDate="2011-08-27T17:32:26.013" UserId="1488" Comment="deleted 9 characters in body" Text="&gt; **Possible Duplicate:**  &#xD;&#xA;&gt; [Where to advertise my game?](http://gamedev.stackexchange.com/questions/1639/where-to-advertise-my-game)  &#xD;&#xA;&#xD;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xD;&#xA;&#xD;&#xA;Let's say I have developed a game and I want to &quot;get it out there&quot;.  What I have in mind is open-source, non-commercial games.&#xD;&#xA;&#xD;&#xA;What websites do you know of where you can promote your newly developed game, rather than simply posting it on your blog?  I am looking for websites such as [GameProjects][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gameprojects.com/" />
  <row Id="38096" PostHistoryTypeId="2" PostId="16519" RevisionGUID="b13eaf01-797c-493a-b544-829edd50b5bd" CreationDate="2011-08-27T17:57:45.727" UserId="9528" Text="[Titanium Desktop]:http://www.appcelerator.com/products/titanium-desktop-application-development/&#xD;&#xA;&#xD;&#xA;[Titanium Desktop] offers a HTML5 Javascript plataform for making native apps for Windows,&#xD;&#xA;the only disadvantage is that the source code of the app stays totally open for anyone to edit or see." />
  <row Id="38097" PostHistoryTypeId="2" PostId="16520" RevisionGUID="bc037b2f-f760-45d9-a684-7326a789438a" CreationDate="2011-08-27T18:04:10.853" UserId="9529" Text="You can probably start here to figure out the nuts and bolts of the game and then go from there to start working on your own.&#xD;&#xA;&#xD;&#xA;Development resources for the game:&#xD;&#xA;http://www.minecraftwiki.net/wiki/Development_Resources" />
  <row Id="38098" PostHistoryTypeId="5" PostId="16519" RevisionGUID="89d6d4ac-c407-40b7-a819-0f432914a6d8" CreationDate="2011-08-27T18:24:23.490" UserId="9528" Comment="added 5 characters in body" Text="[Titanium Desktop]:http://www.appcelerator.com/products/titanium-desktop-application-development/&#xD;&#xA;&#xD;&#xA;[Titanium Desktop] offers a HTML5 CSS3 Javascript plataform for making native apps for Windows,&#xD;&#xA;the only disadvantage is that the source code of the app stays totally open for anyone to edit or see." />
  <row Id="38099" PostHistoryTypeId="25" PostId="16511" RevisionGUID="4654fae5-6c3b-40d9-9c7a-1fd9696fe78c" CreationDate="2011-08-27T18:37:55.870" Comment="http://twitter.com/#!/StackGameDev/status/107522246750371843" />
  <row Id="38100" PostHistoryTypeId="4" PostId="11168" RevisionGUID="4053ebbf-e37d-4f57-b3dd-b5f8f4da0d73" CreationDate="2011-08-27T18:38:00.150" UserId="165" Comment="Title grammar" Text="What is Minecraft's database?" />
  <row Id="38101" PostHistoryTypeId="24" PostId="11168" RevisionGUID="4053ebbf-e37d-4f57-b3dd-b5f8f4da0d73" CreationDate="2011-08-27T18:38:00.150" Comment="Proposed by 165 approved by 51 edit id of 678" />
  <row Id="38103" PostHistoryTypeId="2" PostId="16521" RevisionGUID="72603232-b5c6-4cd5-b3bc-8e9716a62d5e" CreationDate="2011-08-27T19:49:26.103" UserId="8219" Text="I found [this article][1] on implementing an input pipeline for Android, but I don't really understand how it works. I also don't completely understand the programming concept of a pipeline or a pool either. Could someone explain these concepts and how they work as this input pipeline?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game" />
  <row Id="38104" PostHistoryTypeId="1" PostId="16521" RevisionGUID="72603232-b5c6-4cd5-b3bc-8e9716a62d5e" CreationDate="2011-08-27T19:49:26.103" UserId="8219" Text="How does an Input Pipeline work?" />
  <row Id="38105" PostHistoryTypeId="3" PostId="16521" RevisionGUID="72603232-b5c6-4cd5-b3bc-8e9716a62d5e" CreationDate="2011-08-27T19:49:26.103" UserId="8219" Text="&lt;android&gt;&lt;input&gt;&lt;pipeline&gt;" />
  <row Id="38106" PostHistoryTypeId="25" PostId="16521" RevisionGUID="ba0b7854-8980-4b02-be03-32cb47c1249f" CreationDate="2011-08-27T21:37:56.793" Comment="http://twitter.com/#!/StackGameDev/status/107567549771821056" />
  <row Id="38107" PostHistoryTypeId="2" PostId="16522" RevisionGUID="a64c9198-f16d-4a1e-8708-895f99aadc7a" CreationDate="2011-08-27T21:56:44.080" UserId="744" Text="`../lib/programname` or `../share/programname/`, relative to the `dirname(3)` of `argv[0]`, depending on if the assets are architecture-dependent or not.&#xD;&#xA;&#xD;&#xA;This is the same standard as all other Linux (and most non-Mac Unix) programs.&#xD;&#xA;&#xD;&#xA;If you want to run from &quot;the source tree&quot;,&#xD;&#xA;&#xD;&#xA; 1. You should get a real build system and do a build, because you never &quot;run from the source tree&quot;, you run a built executable, which your build system spit out somewhere, and it can copy or link assets into place just as easily.&#xD;&#xA; 2. If your build system is too crappy, just also check `.` or `./assets`, etc., and then look into a new build system later in development." />
  <row Id="38108" PostHistoryTypeId="5" PostId="16501" RevisionGUID="4d6a8792-4df8-4c67-8563-e95330fe63d0" CreationDate="2011-08-27T22:05:36.413" UserId="2187" Comment="fixed use of second modifier, before it wasn't actually used anywhere!" Text="Indeed, that is all you need for radiosity. There are two different (but equal) formulations. The first is to &quot;radiate&quot; or shoot light from each patch (in your case probably a face), and the other is to &quot;gather&quot; or receive light into each patch. If you iteratively do this enough times, you get radiosity.&#xD;&#xA;&#xD;&#xA;The first step is to figure out where light originates from because in either method there must be a light source. If you are going to do the gather method, I must warn you that it does not handle point lights very well. You must seed patches with light (calculate it separately) or you get odd results. In the radiate method you emit from the point lights as normal but ignore them as receivers from other patches. &#xD;&#xA;&#xD;&#xA;You can stop after any number of bounces (or iterations), but the more you do, the better the solution. You have an easy time of patch creation as you can consider each side of your cubes as a patch. If you want something more detailed you can subdivide those faces even farther. &#xD;&#xA;&#xD;&#xA;In a radiating example, this could be used as a basis for your loop:&#xD;&#xA;&#xD;&#xA;    while(!done) {&#xD;&#xA;       foreach Patch a {&#xD;&#xA;         a.shootRays(n);&#xD;&#xA;         foreach ray r {&#xD;&#xA;           Patch b = r.firstIntersectingPatch();&#xD;&#xA;           float modifier = 1 / ((distance(a,b)^2)&#xD;&#xA;           b.incidentLight += (a.exidentLight / n) * modifier; &#xD;&#xA;         } &#xD;&#xA;       }&#xD;&#xA;      foreach Patch a {&#xD;&#xA;        float modifier = a.absorption;&#xD;&#xA;        a.exidentLight = (a.incidentLight * modifier) + a.emission;&#xD;&#xA;        a.incidentLight = 0;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      done = goodEnough() ? true : false;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For a gather method, you would have the slightly different first loop:&#xD;&#xA;&#xD;&#xA;          foreach Patch a {&#xD;&#xA;             a.shootRays(n);&#xD;&#xA;             foreach ray r {&#xD;&#xA;               Patch b = r.firstIntersectingPatch();&#xD;&#xA;               float modifier = 1 / ((distance(a,b)^2)&#xD;&#xA;               a.incidentLight += b.exidentLight * modifier; &#xD;&#xA;             } &#xD;&#xA;             a.incidentLight /= n;&#xD;&#xA;           }&#xD;&#xA;&#xD;&#xA;The first modifier is used for per patch modification of the incoming light. The most common use would be falloff from distance as I did above. The second modifier is for global modification of incoming light like material absorption. The a.emission variable would be 0 for most patches. &#xD;&#xA;&#xD;&#xA;Only those that are light sources (or directly affected by point light sources if you are using a gather method as noted above) should have non 0 emission values. &#xD;&#xA;&#xD;&#xA;The goodEnough() function could be many things. It could be just counting the number of iterations, or it could be looking at the total amount of light in the scene, or it could be some other test you devise. This part is really up to you and what you think looks good enough but still finishes in a reasonable amount of time. &#xD;&#xA;&#xD;&#xA;The more rays you shoot, the more accurate your solution but the slower the process. The same goes for number of patches and number of iterations through the loop. How you store the final light value is up to you. It could be in a texture, or stored as a value in your cubes, but I don't think this would be feasible to do in real-time with a decent number of patches.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38109" PostHistoryTypeId="2" PostId="16523" RevisionGUID="8af1d324-3e8b-441b-9187-6759b6c3cbd8" CreationDate="2011-08-27T22:23:36.033" UserId="2231" Text="You should use MACROs.&#xD;&#xA;&#xD;&#xA;With g++ you can use the -D option to give a macro a value. You can then use the DATADIR macro (for example) in your code to refer to a directory.&#xD;&#xA;&#xD;&#xA;In the developing phase you can set DATADIR as &quot;.&quot; because you have everything in one directory.&#xD;&#xA;At release time (i.e. while compiling the release version) you just set DATADIR as &quot;/usr/share/mycoolgames&quot; or whatever and you are done with it.&#xD;&#xA;&#xD;&#xA;This is basically the same way used in a more standardized way by the GNU autotools (i.e. automake and autoconf).&#xD;&#xA;Actually the autotools generate a config.h file which contains the macro definitions (a file that you have to include in your own code) instead of passing a value to the g++ -D parameter but I think you got the picture now.&#xD;&#xA;&#xD;&#xA;Try to resist the urge to use environment variables: they are just not very used for this purpose and also it's not a very elegant way to solve this problem." />
  <row Id="38110" PostHistoryTypeId="5" PostId="16522" RevisionGUID="530e4843-6474-4e70-bf7f-1abfd1899978" CreationDate="2011-08-27T22:27:54.863" UserId="744" Comment="added 151 characters in body" Text="`../lib/programname` or `../share/programname/`, relative to the `dirname(3)` of `argv[0]`, depending on if the assets are architecture-dependent or not.&#xD;&#xA;&#xD;&#xA;This is the same standard as all other Linux (and most non-Mac Unix) programs.&#xD;&#xA;&#xD;&#xA;If you want to run from &quot;the source tree&quot;,&#xD;&#xA;&#xD;&#xA; 1. You should get a real build system and do a build, because you never &quot;run from the source tree&quot;, you run a built executable, which your build system spit out somewhere, and it can copy or link assets into place just as easily.&#xD;&#xA; 2. If your build system is too crappy, just also check `.` or `./assets`, etc., and then look into a new build system later in development.&#xD;&#xA;&#xD;&#xA;Unlike happy_emi says, you should definitely provide a way to override this with environment variables. It is exactly what they are intended for." />
  <row Id="38111" PostHistoryTypeId="25" PostId="1576" RevisionGUID="5e1485d3-42e0-4347-9d53-771ec09983fd" CreationDate="2011-08-28T00:37:57.613" Comment="http://twitter.com/#!/StackGameDev/status/107612850167611392" />
  <row Id="38112" PostHistoryTypeId="2" PostId="16524" RevisionGUID="3a413ae0-7740-4905-b212-931e6ae32b10" CreationDate="2011-08-28T01:27:16.163" UserId="9531" Text="I need to implement a scrolling background on a glSurfaceView in Android. The background should scroll as the character moves. Some good tutorials in this direction is much appreciated." />
  <row Id="38113" PostHistoryTypeId="1" PostId="16524" RevisionGUID="3a413ae0-7740-4905-b212-931e6ae32b10" CreationDate="2011-08-28T01:27:16.163" UserId="9531" Text="android game background scroll" />
  <row Id="38114" PostHistoryTypeId="3" PostId="16524" RevisionGUID="3a413ae0-7740-4905-b212-931e6ae32b10" CreationDate="2011-08-28T01:27:16.163" UserId="9531" Text="&lt;opengl&gt;&lt;android&gt;" />
  <row Id="38119" PostHistoryTypeId="5" PostId="16479" RevisionGUID="93dec92a-2c64-4e8c-82b5-f2d0760d93f4" CreationDate="2011-08-28T03:01:33.107" UserId="4306" Comment="deleted 1 characters in body" Text="There's [mudbox][1]. It's [free][2] if you're a student (non-commercial).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://usa.autodesk.com/adsk/servlet/pc/index?id=13565063&amp;siteID=123112&#xD;&#xA;  [2]: http://students.autodesk.com/" />
  <row Id="38120" PostHistoryTypeId="25" PostId="16500" RevisionGUID="b039d133-5f21-4fee-9225-a32411ae73d2" CreationDate="2011-08-28T03:37:58.227" Comment="http://twitter.com/#!/StackGameDev/status/107658152023031808" />
  <row Id="38122" PostHistoryTypeId="25" PostId="16474" RevisionGUID="cc8c5511-9232-449d-898f-d37a78e3f5ee" CreationDate="2011-08-28T06:37:59.603" Comment="http://twitter.com/#!/StackGameDev/status/107703456999022594" />
  <row Id="38123" PostHistoryTypeId="2" PostId="16526" RevisionGUID="fff3a5f5-1445-458e-a212-f349191df333" CreationDate="2011-08-28T08:36:54.183" UserId="1588" Text="http://playthisthing.com &quot;Everything Cool in Games -- OUT of the Mainstream&quot;" />
  <row Id="38124" PostHistoryTypeId="16" PostId="16526" RevisionGUID="dd5fc211-692e-483e-8190-956ff07da488" CreationDate="2011-08-28T08:36:54.183" UserId="1588" />
  <row Id="38125" PostHistoryTypeId="2" PostId="16527" RevisionGUID="8e29d19d-49b8-4bd4-b45e-ef51545cde5e" CreationDate="2011-08-28T09:10:20.533" UserId="8185" Text="What's the best way to go about this? I've never coded using two languages before, let alone for an android phone" />
  <row Id="38126" PostHistoryTypeId="1" PostId="16527" RevisionGUID="8e29d19d-49b8-4bd4-b45e-ef51545cde5e" CreationDate="2011-08-28T09:10:20.533" UserId="8185" Text="Creating an Android Game using Java and c++" />
  <row Id="38127" PostHistoryTypeId="3" PostId="16527" RevisionGUID="8e29d19d-49b8-4bd4-b45e-ef51545cde5e" CreationDate="2011-08-28T09:10:20.533" UserId="8185" Text="&lt;c++&gt;&lt;android&gt;&lt;java&gt;" />
  <row Id="38128" PostHistoryTypeId="2" PostId="16528" RevisionGUID="b9ac16ca-5493-460c-b2d5-fe0c49be22a6" CreationDate="2011-08-28T09:27:29.313" UserId="8376" Text="Using the [Android NDK](http://developer.android.com/sdk/ndk/overview.html) you can build a native library in C/C++ and by exporting the functions as native you can call your functions as if it was standard Java code once you've initialised the library. There's plenty of tutorials available on getting started with the NDK as well as samples provided by Google.&#xD;&#xA;&#xD;&#xA;It's important to note that the NDK isn't necessary for a lot of purposes, see the FAQ:&#xD;&#xA;&#xD;&#xA;&gt; When to Develop in Native Code&#xD;&#xA;&#xD;&#xA;&gt;The NDK will not benefit most applications. As a developer, you need to balance its benefits against its drawbacks; notably, using native code does not result in an automatic performance increase, but always increases application complexity. In general, you should only use native code if it is essential to your application, not just because you prefer to program in C/C++.&#xD;&#xA;&#xD;&#xA;&gt;Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on. Simply re-coding a method to run in C usually does not result in a large performance increase. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need. The NDK can, however, can be an effective way to reuse a large corpus of existing C/C++ code.&#xD;&#xA;&#xD;&#xA;As for developing on an Android device, I would suggest downloading the SDK (and NDK if your application requires), getting the emulator working, and having a go at the [tutorials](http://developer.android.com/resources/browser.html?tag=tutorial), reading the [technical articles](http://developer.android.com/resources/browser.html?tag=article) for best practices, and making sure you understand the [application fundamentals](http://developer.android.com/guide/topics/fundamentals.html)." />
  <row Id="38129" PostHistoryTypeId="2" PostId="16529" RevisionGUID="c980192f-2e21-4261-b3a3-0e1bb37c1702" CreationDate="2011-08-28T09:35:00.710" UserId="9536" Text="I am now trying to learn game development in UDK and Unity3d, just trying both out, and try to get an idea how they work, and for now im mostly focusing on the PC games..&#xD;&#xA;&#xD;&#xA;I want to know, how hard(technically, not legal/licensing stuff) is it to port a PC game that i made in UDK/Unity to another platform such as PS3/Xbox360? is there some kind of option where we can just select the target platform from a combo box and press deploy? or do we need to modify the game for each platform? just give me a rough idea on how it works.." />
  <row Id="38130" PostHistoryTypeId="1" PostId="16529" RevisionGUID="c980192f-2e21-4261-b3a3-0e1bb37c1702" CreationDate="2011-08-28T09:35:00.710" UserId="9536" Text="Porting games made for PC to console in UDK/Unity3d" />
  <row Id="38131" PostHistoryTypeId="3" PostId="16529" RevisionGUID="c980192f-2e21-4261-b3a3-0e1bb37c1702" CreationDate="2011-08-28T09:35:00.710" UserId="9536" Text="&lt;engine&gt;&lt;unity&gt;&lt;udk&gt;&lt;porting&gt;" />
  <row Id="38132" PostHistoryTypeId="25" PostId="16454" RevisionGUID="5c225627-33a7-42b5-963d-52fbcc7f1468" CreationDate="2011-08-28T09:37:59.567" Comment="http://twitter.com/#!/StackGameDev/status/107748754261680128" />
  <row Id="38133" PostHistoryTypeId="2" PostId="16530" RevisionGUID="16397406-7d92-4937-92b3-b5592925cecd" CreationDate="2011-08-28T10:05:20.960" UserId="5473" Text="The more pertinent question is, does anything in the real world happen simultaneuously? That all depends on what division of time you go down to; seconds, milliseconds, nanoseconds, picoseconds and so on. Eventually you will reach a point where things *aren't* happening simultaneously, because the degree to which you can subdivide time is infinite. This would also also be the case with any theoretical computer system, even one designed for that purpose, due to the fact that no matter how high a timing resolution you specify as a parameter for your hardware design, *there is always a higher resolution*.&#xD;&#xA;&#xD;&#xA;Modern collision detection systems work, both inside and outside of the field of games, because it doesn't matter, so long as the collisions happen at what is *perceptually* the same time. The human brain has it's limits to what it can perceive as continuous. Generally frame rates in games don't need to exceed about 60fps for this reason -- same as a flourescent lights running at 50-60Hz AC. And 60Hz is, from what I understand, well above the limits of our rate-of-perception, in order to appear continuous even in worst-case scenarios." />
  <row Id="38134" PostHistoryTypeId="6" PostId="16486" RevisionGUID="c7c50c94-075c-467d-b3d2-4e3cd3c85fb7" CreationDate="2011-08-28T10:06:26.370" UserId="5473" Comment="edited tags" Text="&lt;collision-detection&gt;&lt;physics&gt;&lt;algorithm&gt;&lt;logic&gt;&lt;timing&gt;" />
  <row Id="38135" PostHistoryTypeId="2" PostId="16531" RevisionGUID="6874e857-04ef-4b0e-9892-0cc8b00359fe" CreationDate="2011-08-28T10:18:58.407" UserId="5473" Text="UDK and Unity can deploy to both the consoles you mentioned. Of course even in the best case, there are always going to be tweaks needed here and there since different platforms support different things (shader tech, controller types, and so on) and since optimisation may need to be done independently for the different platforms. There may be a few tweaks, or a mountain of them depending on the solution and platforms you intend to support. But yes, that's part of the point of both UDK and Unity. What you'll pay to support console platforms is a whole other matter." />
  <row Id="38136" PostHistoryTypeId="6" PostId="2770" RevisionGUID="7161e7c1-66b2-45c9-9097-1ac820dda002" CreationDate="2011-08-28T10:36:02.933" UserId="5473" Comment="edited tags" Text="&lt;ai&gt;&lt;shoot-em-up&gt;&lt;evolution&gt;" />
  <row Id="38137" PostHistoryTypeId="6" PostId="9500" RevisionGUID="f2d84313-199b-42c0-99a7-eb508b5a4b90" CreationDate="2011-08-28T10:36:40.967" UserId="5473" Comment="edited tags" Text="&lt;android&gt;&lt;programming&gt;&lt;ai&gt;&lt;evolution&gt;" />
  <row Id="38138" PostHistoryTypeId="6" PostId="14516" RevisionGUID="7f332580-7b10-4cb9-a790-9213ba243dee" CreationDate="2011-08-28T10:38:23.070" UserId="5473" Comment="edited tags" Text="&lt;architecture&gt;&lt;actionscript-3&gt;&lt;gameloop&gt;&lt;timing&gt;" />
  <row Id="38139" PostHistoryTypeId="6" PostId="6266" RevisionGUID="6ecbcf24-790f-4015-86e8-08c1330530a9" CreationDate="2011-08-28T10:39:42.833" UserId="5473" Comment="edited tags" Text="&lt;balance&gt;&lt;strategy&gt;&lt;extension&gt;&lt;evolution&gt;" />
  <row Id="38140" PostHistoryTypeId="2" PostId="16532" RevisionGUID="d4549f07-d7bc-449a-83e6-491fbb381d7b" CreationDate="2011-08-28T10:47:22.930" UserId="-1" Text="" />
  <row Id="38141" PostHistoryTypeId="2" PostId="16533" RevisionGUID="2a68cd9b-e08a-4367-8b8d-5d1c22157bb2" CreationDate="2011-08-28T10:47:22.930" UserId="-1" Text="" />
  <row Id="38142" PostHistoryTypeId="2" PostId="16534" RevisionGUID="63042db0-634c-4e6e-85a9-b78d58969f97" CreationDate="2011-08-28T10:48:18.610" UserId="8126" Text="If you are asking for a technical way: I'm a very, very noob game developer, but this is how I implemented my AchievmentManager (I think it's the observer pattern):&#xD;&#xA;&#xD;&#xA;    Class BaseAchievement{&#xD;&#xA;&#xD;&#xA;    public abstract boolean checkAchieved(Game game);&#xD;&#xA;&#xD;&#xA;    public abstract String getName();&#xD;&#xA;&#xD;&#xA;    //etc. etc.&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;Manager:&#xD;&#xA;&#xD;&#xA;    Class AchievementManager&#xD;&#xA;    {&#xD;&#xA;    public void notifyScoreUpdated(Game game){&#xD;&#xA;       for(ScoreListener s : scoreListeners)&#xD;&#xA;       {&#xD;&#xA;             boolean achieved = s.checkAchieved(game);&#xD;&#xA;             if(achieved) unlockAchievement(s.getName());&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void notifyPlayerMoved(Game game){&#xD;&#xA;       for(MoveListener m : moveListeners)&#xD;&#xA;       {&#xD;&#xA;             boolean achieved = m.checkAchieved(game);&#xD;&#xA;             if(achieved) unlockAchievement(m.getName());&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    public void unlockAchievement(String name){&#xD;&#xA;        //bla bla bla&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    }" />
  <row Id="38143" PostHistoryTypeId="2" PostId="16535" RevisionGUID="40c95c72-b8a3-462b-af84-d6ceb5853bde" CreationDate="2011-08-28T12:31:54.043" UserId="9538" Text="As well as the reasons given above, arcade games are also another reason. Usually an arcade game will loop the menu/intro until a coin is inserted to start a game, however when ported to home consoles, the coins are no longer needed so it looks for a button input instead." />
  <row Id="38144" PostHistoryTypeId="25" PostId="16527" RevisionGUID="6dc50a3a-510b-46ab-8e28-65756af8a4eb" CreationDate="2011-08-28T12:37:59.487" Comment="http://twitter.com/#!/StackGameDev/status/107794052468056064" />
  <row Id="38145" PostHistoryTypeId="2" PostId="16536" RevisionGUID="e3fc3539-4527-46a5-a013-46437b7b8dc8" CreationDate="2011-08-28T12:42:20.543" UserId="2897" Text="Farseer uses an iterative solver, so when your wheel starts colliding with another rectangle at high velocity, from time to time you'll see bumps since it's a &quot;perfect align&quot; to us, not to a physics simulation, with iterations things like these will never be &quot;pixel-perfect&quot;.&#xD;&#xA;&#xD;&#xA;You will have to convert rectangles to Edge/Loop shapes and then model different physical qualities with hacks like creating artificial tile bounds and then changing properties when character enters a bounding box, but not every physical quality can be emulated that way.&#xD;&#xA;&#xD;&#xA;Sooner or later you'll end up writing your own tile-based physics instead of Farseer. If your game doesn't have lots of complex physics puzzles, it will be simpler to abandon Farseer completely and roll your own tile-based physics." />
  <row Id="38146" PostHistoryTypeId="2" PostId="16537" RevisionGUID="6ad89c8a-e56d-4669-bf47-20dec7d0585e" CreationDate="2011-08-28T13:13:05.010" UserId="18" Text="I haven't looked at the code in depth but the basic idea is that input events are asynchronous in Android, meaning they could happen at any time. You don't want to interrupt your main loop code to process input events because it could slow down your game and might alter your game state in unexpected ways. &#xD;&#xA;&#xD;&#xA;The traditional approach used in the [Lunar Lander](http://developer.android.com/resources/samples/LunarLander/index.html) sample is to have a synchronized block around the main loop and around each of your input handlers to ensure that they'd never happen at the same time. This might be a valid approach for a small game but as your game gets more complicated you'll find that it's not very efficient and it might not work correctly. &#xD;&#xA;&#xD;&#xA;The article suggests a better approach of storing the input events in a queue, and processing them at a known point in your main loop. Input handlers simply push the event (after wrapping them in an InputObject that describe them) to the end of the queue, and they are later processed in the processInput method in the game thread.&#xD;&#xA;&#xD;&#xA;The author of the article actually uses two queues, an input queue and an input object pool. The input object pool in the main activity is used because we don't want to keep creating new input objects every time we get an input event. This is bad because input events happen frequently and creating a lot of object will cause the garbage collector to run often, which makes your game choppy and unresponsive. The better approach is to create a pool of object once (basically a queue) and take objects from the queue when you need them and return them to the queue when you're done. That's what the queue in the main activity is for. The other queue is an input queue in the game thread which actually contains the input events received and which is processed game loop using the processInput method.&#xD;&#xA;&#xD;&#xA;The pool queue will always have a fixed number of objects (specified by the INPUT_QUEUE_SIZE constant which can be 30 for example) which are allocated in the createInputObjectPool method when the activity is created, while the input queue will have a variable number of input events which are fed by the activity and returned back to the pool queue once they are processed using the returnToPool method. These queues are [ArrayBlockingQueue](http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ArrayBlockingQueue.html)s which are normal queues (first in first out) implemented using an array (as opposed to linked list for example) that would block, in circumstances where a normal queue would overflow and underflow, until the queue is ready for the operation." />
  <row Id="38147" PostHistoryTypeId="17" PostId="16538" RevisionGUID="7e315a38-0e71-447b-b841-b63e8234d4ae" CreationDate="2011-08-28T14:15:51.087" UserId="-1" Comment="from http://gaming.stackexchange.com/questions/28428/adding-a-custom-mob-into-minecraft" Text="" />
  <row Id="38148" PostHistoryTypeId="2" PostId="16538" RevisionGUID="e8c393ff-c911-4b7c-a723-ec66e32198f7" CreationDate="2011-08-21T17:04:49.633" UserDisplayName="Ash" Text="Basically decided to make my own mob, I have:&#xD;&#xA;&#xD;&#xA; - Created my mob's entity class&#xD;&#xA; - Created my mobs model class&#xD;&#xA; - Drawn the model&#xD;&#xA; - Added the function call for addMapping within the EntityList class&#xD;&#xA;&#xD;&#xA;I'm stuck on what to do next. I've tried finding the code that deals with passive animal spawning in the world, however I can't seem to find it.&#xD;&#xA;&#xD;&#xA;Help greatly appreciated.&#xD;&#xA;" />
  <row Id="38149" PostHistoryTypeId="1" PostId="16538" RevisionGUID="e8c393ff-c911-4b7c-a723-ec66e32198f7" CreationDate="2011-08-21T17:04:49.633" UserDisplayName="Ash" Text="Adding a custom mob into Minecraft" />
  <row Id="38150" PostHistoryTypeId="3" PostId="16538" RevisionGUID="e8c393ff-c911-4b7c-a723-ec66e32198f7" CreationDate="2011-08-21T17:04:49.633" UserDisplayName="Ash" Text="&lt;minecraft&gt;" />
  <row Id="38151" PostHistoryTypeId="2" PostId="16539" RevisionGUID="13c350ec-a230-44aa-b069-687af0b2a69a" CreationDate="2011-08-28T15:06:25.570" UserId="2268" Text="I have had trouble getting the money together to buy a tablet, and it would cheer me up to know what kind of tablet the artists were using to create classic games like Super Mario World and Sonic The Hedgehog. Part of me feels that maybe there is a way to make games without 2000+ pressure sensitivity levels. Does anyone know which models were widely used by console developers at the height of 2d gaming, and what their specs were?" />
  <row Id="38152" PostHistoryTypeId="1" PostId="16539" RevisionGUID="13c350ec-a230-44aa-b069-687af0b2a69a" CreationDate="2011-08-28T15:06:25.570" UserId="2268" Text="What kind of tablet did developers use back in the day?" />
  <row Id="38153" PostHistoryTypeId="3" PostId="16539" RevisionGUID="13c350ec-a230-44aa-b069-687af0b2a69a" CreationDate="2011-08-28T15:06:25.570" UserId="2268" Text="&lt;art&gt;" />
  <row Id="38154" PostHistoryTypeId="2" PostId="16540" RevisionGUID="4aaec2e0-af53-4692-8982-e11d3540bd59" CreationDate="2011-08-28T15:35:15.577" UserId="5473" Text="I doubt they did. The majority of the true old school art (80's to early 90's) was done with a plain old mouse and pixel-pushing (raster) software like Deluxe Paint (now known as Cosmigo Pro-Motion).&#xD;&#xA;&#xD;&#xA;As for when tablets did become really widespread and usable in the sense you know them today (perhaps mid 90's onward), Wacom was pretty much a big name throughout.&#xD;&#xA;&#xD;&#xA;You can be sure that even the lowest end of what you buy *new* today will be better (and better supported in terms of drivers) than what they used back then. If I were to buy a new tablet now, I wouldn't go for anything too fancy, I reckon a Wacom Intuos 4 would be fine, IIRC there's a b5 size one that has what most artists need." />
  <row Id="38155" PostHistoryTypeId="25" PostId="16489" RevisionGUID="eeb3984c-a297-446b-888d-75daedaf4204" CreationDate="2011-08-28T15:37:59.907" Comment="http://twitter.com/#!/StackGameDev/status/107839352192770049" />
  <row Id="38156" PostHistoryTypeId="2" PostId="16541" RevisionGUID="29630eb4-033d-43fe-985b-272775dc04c9" CreationDate="2011-08-28T16:34:44.013" UserId="2132" Text="I am doing a simple 4X strategy game in space where each node is a point-of-interest (a planet, an asteroid and etc.). &#xD;&#xA;&#xD;&#xA;To randomly generate a map, I would follow the steps below&#xD;&#xA;&#xD;&#xA;1. Decide how many type of each nodes the map will have (perhaps, say, 5 Earth-like planets, 10 barren planets etc.)&#xD;&#xA;&#xD;&#xA;2. Place each type of node on the map.&#xD;&#xA;&#xD;&#xA;For step 2 I would like to have an even spread of each node type. So for example, I would start by placing all the earth-like planets. If I simply do a rand(map.width, map.height) to determine the position, I may end up all the earth-like planets clustering together, which will give advantage to the player who starts in that area.&#xD;&#xA;&#xD;&#xA;Are there any methods, such as using different graph functions or noise function, which could generate a sequence of (x,y) coordinates which are spread out from each other. Likewise, are there any ways to generates coordinates which are close to each other?&#xD;&#xA;" />
  <row Id="38157" PostHistoryTypeId="1" PostId="16541" RevisionGUID="29630eb4-033d-43fe-985b-272775dc04c9" CreationDate="2011-08-28T16:34:44.013" UserId="2132" Text="Random map generation - strategies for scattering/clustering random nodes" />
  <row Id="38158" PostHistoryTypeId="3" PostId="16541" RevisionGUID="29630eb4-033d-43fe-985b-272775dc04c9" CreationDate="2011-08-28T16:34:44.013" UserId="2132" Text="&lt;random&gt;" />
  <row Id="38159" PostHistoryTypeId="2" PostId="16542" RevisionGUID="99029450-3776-4c7e-8ba3-facf7250785c" CreationDate="2011-08-28T16:39:39.183" UserId="8376" Text="Are you sure that it is not garbage collection happening? You can check the logs in [DDMS](http://developer.android.com/guide/developing/debugging/ddms.html) to see when garbage collection happens. If it's the first time then it's indicative of some object being allocated (or falling out of scope) or textures being allocated.&#xD;&#xA;&#xD;&#xA;If you don't see any garbage collection happening then the next step is to profile the function to see exactly which line it hangs on and then figure out what's happening or edit the question so that we can offer suggestions.&#xD;&#xA;&#xD;&#xA;While not specifically helpful for your problem but useful for game development on Android in general, you might also like to have a look at the Android [Traceview](http://developer.android.com/guide/developing/debugging/debugging-tracing.html) program that lets you profile which calls are taking a long time so that you can optimise them.&#xD;&#xA;&#xD;&#xA;![Screenshot of Traceview][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/45ghk.png" />
  <row Id="38161" PostHistoryTypeId="2" PostId="16544" RevisionGUID="04aaf050-2abe-4192-b926-b8a68ed0e7d4" CreationDate="2011-08-28T17:15:18.977" UserId="6877" Text="In addition to Nick, Wacom is the only brand that can be suggested with eyes closed &amp; they have low price models.&#xD;&#xA;&#xD;&#xA;I own 2 Wacom tablets, on was brought on way back, 3-4 or more years back. The point is it still acts like brand new. Unless you break the pen(which can be brought separately), the touch surface shows no sign of age.&#xD;&#xA;&#xD;&#xA;Few months back I had another Wacom Bamboo. I suggest you to go for this one. Its not expensive. I have heard a lot of high profile artist still use their old Wacom table, cause it still works so well and they don't want to shit to something else for no reason. &#xD;&#xA;&#xD;&#xA;Intuos are high end artist model.See the feature list. If you don't need any of those that it offers, then simple go for Bamboo series. It wont disappointing you. A little more now will come back to you as a rare service in the long run." />
  <row Id="38162" PostHistoryTypeId="5" PostId="16533" RevisionGUID="151ff365-9552-4010-84a2-96fa23010dbb" CreationDate="2011-08-28T17:23:30.850" UserId="5473" Comment="added 53 characters in body" Text="Evolution of in-game entities, environments or rules." />
  <row Id="38163" PostHistoryTypeId="24" PostId="16533" RevisionGUID="151ff365-9552-4010-84a2-96fa23010dbb" CreationDate="2011-08-28T17:23:30.850" Comment="Proposed by 5473 approved by 51 edit id of 679" />
  <row Id="38164" PostHistoryTypeId="5" PostId="16539" RevisionGUID="76a7455e-bb83-4a0f-a25e-4c41331982eb" CreationDate="2011-08-28T17:23:41.397" UserId="3505" Comment="Fixed misunderstanding-prone choice of word." Text="I have had trouble getting the money together to buy a digitizing tablet, and it would cheer me up to know what kind of digitizing tablet the artists were using to create classic games like Super Mario World and Sonic The Hedgehog. Part of me feels that maybe there is a way to make games without 2000+ pressure sensitivity levels. Does anyone know which models were widely used by console developers at the height of 2d gaming, and what their specs were?" />
  <row Id="38165" PostHistoryTypeId="4" PostId="16539" RevisionGUID="76a7455e-bb83-4a0f-a25e-4c41331982eb" CreationDate="2011-08-28T17:23:41.397" UserId="3505" Comment="Fixed misunderstanding-prone choice of word." Text="What kind of digitizing tablet did developers use back in the day?" />
  <row Id="38166" PostHistoryTypeId="6" PostId="16539" RevisionGUID="76a7455e-bb83-4a0f-a25e-4c41331982eb" CreationDate="2011-08-28T17:23:41.397" UserId="3505" Comment="Fixed misunderstanding-prone choice of word." Text="&lt;art&gt;&lt;hardware&gt;" />
  <row Id="38167" PostHistoryTypeId="24" PostId="16539" RevisionGUID="76a7455e-bb83-4a0f-a25e-4c41331982eb" CreationDate="2011-08-28T17:23:41.397" Comment="Proposed by 3505 approved by 51 edit id of 680" />
  <row Id="38170" PostHistoryTypeId="5" PostId="16135" RevisionGUID="3ef156a5-bc0c-4314-9332-a2f1a626cff2" CreationDate="2011-08-28T17:26:12.297" UserId="51" Comment="appended answer 16543 as supplemental" Text="I saw this [checkers game][1] and I wondered how the A.I. was implemented.&#xD;&#xA;&#xD;&#xA;How should I implement an A.I. for [checkers][2] (draughts, dama, dame)? Are there any known algorithms?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=zPi0hELfGY8&amp;amp;feature=related&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Draughts&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Very thnaks full to all. I m very wonder to see this [Tic Tac Toe][1] game tutorial blog post.&#xD;&#xA;&#xD;&#xA;So, i want [dama game][2] algorithm open source code and blog post..  Is there any helpful link or any doc file..? please let me know..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.iphonedevsdk.com/forum/iphone-sdk-game-development/13001-tic-tac-toe-tutorial-walkthrough.html&#xD;&#xA;  [2]: http://www.youtube.com/watch?feature=related&amp;hl=en-GB&amp;v=abdfSTLtZrg&amp;amp=" />
  <row Id="38175" PostHistoryTypeId="2" PostId="16545" RevisionGUID="e92a8037-8f99-46de-b942-24f094eed25f" CreationDate="2011-08-28T17:29:52.300" UserId="5473" Text="The best way to ensure even distribution is to treat each node as a sort of physical particle. First do a random distribution across a continous (floating point) plane. By then applying forces between each distinct pair of individual particles on the plane, you'll find they slowly spread apart. In a sense it's like collision resolution, only there is no actual contact to speak of. Once you have applied this on a floating point plane, it is a simple matter to convert that plane (&quot;rasterize&quot; it) back into an integer-indexed grid.&#xD;&#xA;&#xD;&#xA;Obviously you may want to apply some sort of forces from the edges of the square plane as well, or else you may find a lot of particles &quot;washing up on the shores&quot;." />
  <row Id="38176" PostHistoryTypeId="6" PostId="16541" RevisionGUID="80157611-1419-4ea6-be6d-7c19f7a221fc" CreationDate="2011-08-28T17:33:17.753" UserId="5473" Comment="edited tags" Text="&lt;physics&gt;&lt;procedural-generation&gt;&lt;random&gt;&lt;procedural&gt;" />
  <row Id="38177" PostHistoryTypeId="5" PostId="16545" RevisionGUID="967e4c47-63e3-4346-b3cb-9f5f5883c76a" CreationDate="2011-08-28T17:34:53.040" UserId="5473" Comment="added 261 characters in body" Text="The best way to ensure even distribution is to treat each node as a sort of physical particle. First do a random distribution across a continous (floating point) plane. By then applying forces between each distinct pair of individual particles on the plane, you'll find they slowly spread apart. In a sense it's like collision resolution, only there is no actual contact to speak of. Once you have applied this on a floating point plane, it is a simple matter to convert that plane (&quot;rasterize&quot; it) back into an integer-indexed grid. You simply do this from a integer-indexed grid to start with, but it might be a little more difficult to get things &quot;nice&quot; -- this depends on how high the resolution of your grid is... the higher, the better, in this case.&#xD;&#xA;&#xD;&#xA;Obviously you may want to apply some sort of forces from the edges of the square plane as well, or else you may find a lot of particles &quot;washing up on the shores&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you want to ensure the opposite, i.e. that clustering *does* occur, then look into &quot;standard&quot; or &quot;gaussian&quot; distribution. This is why randomly generated starfields often look fake; they use pure random distribution rather than a more naturalistic distribution model." />
  <row Id="38178" PostHistoryTypeId="2" PostId="16546" RevisionGUID="39b90764-761e-4da7-a6df-51ca7036fdea" CreationDate="2011-08-28T17:39:07.983" UserId="7548" Text="The problem you're facing is that random selection doesn't discriminate, and can mean that it's a less-than-ideal fit for what you need to do.  But, there is an easy way to work around this:&#xD;&#xA;&#xD;&#xA;1. Split up your space into sectors (e.g., if you have an area of 100 by 100, and you need to generate 100 of these solar systems, then split your area into a 10 by 10 grid of sectors)&#xD;&#xA;&#xD;&#xA;2. Loop through each Sector&#xD;&#xA;&#xD;&#xA;3. Randomly determine the number of planets for the current Solar System (e.g., for a range of 3 to 7 planets, just acquire a random number between 0 and 4 then add 3 to it) in the current Sector (if you have more than one solar system in a sector, this is where you'd set up another loop)&#xD;&#xA;&#xD;&#xA;4. Randomly assign your planets within the current Solar System identified by your loop (you can also use random numbers to increase the minimum distances between the planets)&#xD;&#xA;&#xD;&#xA;You may also wish to define an &quot;out of bounds&quot; area around the edge of each sector to prevent planets from neighbouring sectors from making direct contact with each other (just in case they were effectively randomly located side-by-side).  _Of course, you could also just ignore this and leave it in as an intentional bug for marketing purposes that players will hopefully write about in forums (free advertising, yay!), wink, wink._&#xD;&#xA;" />
  <row Id="38179" PostHistoryTypeId="5" PostId="16545" RevisionGUID="f544ff2f-a442-465c-86d0-0038715a1117" CreationDate="2011-08-28T17:39:55.093" UserId="5473" Comment="added 261 characters in body" Text="The best way to ensure even distribution is to treat each node as a sort of physical particle. First do a random distribution across a continous (floating point) xy plane. By applying forces of repulsion between each distinct pair of individual particles on the plane, you'll find they slowly spread apart. In a sense it's like collision resolution, only there is no actual contact to speak of. It's then a simple matter to convert that plane (&quot;rasterize&quot; it) back into an integer-indexed grid. You can simply do this from a integer-indexed grid to start with, but it might be a little more difficult to get things &quot;nice&quot; -- this depends on how high the resolution of your grid is... the higher, the better, in this case.&#xD;&#xA;&#xD;&#xA;Obviously you may want to apply some sort of forces from the edges of the square plane as well, or else you may find a lot of particles &quot;washing up on the shores&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you want to ensure the opposite, i.e. that clustering *does* occur, then look into &quot;standard&quot; or &quot;gaussian&quot; distribution. This is why randomly generated starfields often look fake; they use pure random distribution rather than a more naturalistic distribution model." />
  <row Id="38180" PostHistoryTypeId="6" PostId="16541" RevisionGUID="cbcf8c9e-d622-4e3a-a20d-e7263ebe61d7" CreationDate="2011-08-28T17:43:53.493" UserId="5473" Comment="edited tags" Text="&lt;physics&gt;&lt;math&gt;&lt;procedural-generation&gt;&lt;random&gt;&lt;procedural&gt;" />
  <row Id="38181" PostHistoryTypeId="2" PostId="16547" RevisionGUID="322d9f7c-8e59-4a2a-b1ed-2acd4002904e" CreationDate="2011-08-28T17:55:44.860" UserId="9543" Text="I'm moving from Flash to C++, and am wondering if there are any tools out there that would let me author animation much like Flash does.&#xD;&#xA;&#xD;&#xA;Basically I want a GUI that lets me layout sprites and specify keyframes + easing for position, size, rotation, etc., then later be able to load and play these animations from my own code.&#xD;&#xA;&#xD;&#xA;I've found a couple promising projects for UI interface animation, but I suspect since they're built for UI they're not optimized for game playback.&#xD;&#xA;&#xD;&#xA;I've also found a bunch of animation libraries, but nothing that also provides a GUI for creating the animations.&#xD;&#xA;&#xD;&#xA;Being able to animate textures would also be a plus." />
  <row Id="38182" PostHistoryTypeId="1" PostId="16547" RevisionGUID="322d9f7c-8e59-4a2a-b1ed-2acd4002904e" CreationDate="2011-08-28T17:55:44.860" UserId="9543" Text="Is there a 2d animation authoring GUI for creating C++ games?" />
  <row Id="38183" PostHistoryTypeId="3" PostId="16547" RevisionGUID="322d9f7c-8e59-4a2a-b1ed-2acd4002904e" CreationDate="2011-08-28T17:55:44.860" UserId="9543" Text="&lt;c++&gt;&lt;flash&gt;&lt;animation&gt;" />
  <row Id="38184" PostHistoryTypeId="2" PostId="16548" RevisionGUID="7ce3d7c2-8f13-4533-9ace-3b0a509d7903" CreationDate="2011-08-28T18:00:40.660" UserId="5473" Text="Author? I think not. Your authoring tools are going to be separate, generally speaking. Having said that, paid solutions like Torque may offer nice IDEs for authoring purposes. As for ease of coding, its not going to be as simple to integrate with the resources, although  Allegro, Torque2D, HGE and others may at least provide the sort of 2D game-related foundations you're looking for in terms of their codebases (such as managing animation and all the rest once your resources are imported). Unlike Flash, C++ obviously doesn't do an all in one, i.e. executable and resources all packaged up into one nice file from the same single development environment." />
  <row Id="38185" PostHistoryTypeId="5" PostId="16548" RevisionGUID="04db55bf-8438-46e3-b6cb-7493ad141e91" CreationDate="2011-08-28T18:05:45.907" UserId="5473" Comment="added 131 characters in body" Text="[Torque 2D][1] is the only such I've heard of for C++ development. Other paid solutions may offer similar. But in general, you'll find that C++ doesn't do a magical all-in-one the way Flash does, i.e. executable and resources all packaged up into one nice file from the same single development environment. Once you move into the world of C++, building custom tools is going to become a necessary part of developing your games.&#xD;&#xA;&#xD;&#xA;As for ease of coding, its not going to be as simple to integrate with the resources, although Allegro, Torque2D, HGE and others may at least provide the sort of 2D game-related foundations you're looking for in terms of their codebases, such as managing animation and all the rest once your resources are imported.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com/products/torque-2d" />
  <row Id="38186" PostHistoryTypeId="5" PostId="16548" RevisionGUID="38b8fdde-c9dc-4302-8ccf-423ce416bbe8" CreationDate="2011-08-28T18:10:47.553" UserId="5473" Comment="added 131 characters in body" Text="[Torque 2D][1] is the only such I've heard of for C++ development. Other paid solutions may offer similar. But in general, you'll find that C++ doesn't do a magical all-in-one the way Flash does, i.e. executable and resources all nicely packaged up into one file from the same single development environment. Once you move into the world of C++, building custom tools is going to become a necessary part of developing your games.&#xD;&#xA;&#xD;&#xA;As for ease of coding, its not going to be as simple to integrate with the resources, although Allegro, Torque2D, HGE and others may at least provide the sort of 2D game-related foundations you're looking for in terms of their codebases, such as resource loading,  animation etc.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com/products/torque-2d" />
  <row Id="38187" PostHistoryTypeId="5" PostId="16548" RevisionGUID="d6d6c933-c842-4436-9d9c-b435c7976a87" CreationDate="2011-08-28T18:18:03.627" UserId="5473" Comment="added 315 characters in body" Text="[Torque 2D][1] is the only such I've heard of for C++ development, and I am not sure it offers anything like Flash's level of control in terms of timeline animation. Other paid solutions may offer similar. But in general, you'll find that C++ doesn't do a magical all-in-one the way Flash does, i.e. executable and resources all nicely packaged up into one file from the same single development environment. Once you move into the world of C++, building custom tools is going to become a necessary part of developing your games.&#xD;&#xA;&#xD;&#xA;As for ease of coding, its not going to be as simple to integrate with the resources, although Allegro, Torque2D, HGE and others may at least provide the sort of 2D game-related foundations you're looking for in terms of their codebases, such as resource loading,  animation etc.&#xD;&#xA;&#xD;&#xA;If you don't have your sights solidly set on C++, you may want to look into Unity. It can be pretty expensive, but you can use it for free. It has an excellent IDE, and I understand it has timeline functionality.&#xD;&#xA;&#xD;&#xA;As for texture animation, the best I could suggest would be something like Cosmigo Pro-Motion, Allegro Sprite Editor or Pixen (Mac only) that are built for pixelling and (2D) sprite animation.&#xD;&#xA;&#xD;&#xA;  [1]: http://www.garagegames.com/products/torque-2d" />
  <row Id="38188" PostHistoryTypeId="5" PostId="16546" RevisionGUID="901681f0-54cb-4ecb-b508-22d9092c6bdf" CreationDate="2011-08-28T18:36:07.393" UserId="7548" Comment="added 85 characters in body" Text="The problem you're facing is that random selection doesn't discriminate, and that can mean that it's a less-than-ideal fit for what you need to do.  But, there is at least one easy way to work around this:&#xD;&#xA;&#xD;&#xA;1. Split up your space into sectors (e.g., if you have an area of 100 by 100, and you need to generate 100 of these solar systems, then split your area into a 10 by 10 grid of sectors)&#xD;&#xA;&#xD;&#xA;2. Loop through each Sector and repeat step 3 (which will, in turn, repeat step 4 multiple times)&#xD;&#xA;&#xD;&#xA;3. Randomly determine the number of planets for the current solar system (e.g., for a range of 3 to 7 planets, just acquire a random number ranging from 0 to 4, and add 3) in the current Sector (if you have more than one solar system in a sector, this is where you'd set up another loop)&#xD;&#xA;&#xD;&#xA;4. Randomly assign your planets within the current Solar System identified by your loop (you can also use random numbers to increase the minimum distances between the planets); this is where you'd decide the types of planets, which could also be randomly determined with a variety of weights or whatever method you prefer to use&#xD;&#xA;&#xD;&#xA;You may also wish to define an &quot;out of bounds&quot; area around the edge of each sector to prevent planets from neighbouring sectors from making direct contact with each other (just in case they were effectively randomly located side-by-side).  _Of course, you could also just ignore this and leave it in as an intentional bug for marketing purposes that players will hopefully write about in forums (free advertising, yay!), wink, wink._&#xD;&#xA;" />
  <row Id="38189" PostHistoryTypeId="25" PostId="16541" RevisionGUID="44bcd1db-797e-443b-9918-b3189fc94749" CreationDate="2011-08-28T18:37:59.770" Comment="http://twitter.com/#!/StackGameDev/status/107884651070242816" />
  <row Id="38190" PostHistoryTypeId="5" PostId="16546" RevisionGUID="12d59678-71cb-4280-80b1-2b5940771627" CreationDate="2011-08-28T18:41:28.990" UserId="7548" Comment="added 85 characters in body" Text="The problem you're facing is that random selection doesn't discriminate, and that can mean that it's a less-than-ideal fit for what you need to do.  But, there is at least one easy way to work around this:&#xD;&#xA;&#xD;&#xA;1. Split up your space into sectors (e.g., if you have an area of 100 by 100, and you need to generate 100 of these solar systems, then split your area into a 10 by 10 grid of sectors)&#xD;&#xA;&#xD;&#xA;2. Loop through each Sector and repeat step 3 (which will, in turn, repeat step 4 multiple times)&#xD;&#xA;&#xD;&#xA;3. Randomly determine the number of planets for the current solar system (e.g., for a range of 3 to 7 planets, just acquire a random number ranging from 0 to 4, and add 3) in the current Sector (if you have more than one solar system in a sector, this is where you'd set up another loop)&#xD;&#xA;&#xD;&#xA;4. Randomly assign your planets within the current Solar System identified by your loop (you can also use random numbers to increase the minimum distances between the planets); this is where you'd decide the types of planets, which could also be randomly determined with a variety of weights or whatever method you prefer to use&#xD;&#xA;&#xD;&#xA;You may also wish to define an &quot;out of bounds&quot; area around the edge of each sector to prevent planets from neighbouring sectors from making direct contact with each other (just in case they were effectively randomly located side-by-side), or...&#xD;&#xA;&#xD;&#xA;Another solution could be at the point of deciding the location of each solar system and/or each planet, to just run a quick proximity check against neighbouring sectors and adjust accordingly (e.g., move away from the edge by a minimum distance plus a random distance).&#xD;&#xA;" />
  <row Id="38191" PostHistoryTypeId="2" PostId="16549" RevisionGUID="76ce2dd9-cc4c-49b1-a4b1-e6059d29dda1" CreationDate="2011-08-28T18:43:07.920" UserId="6605" Text="Found the problem. It was hidden in some legacy NDK code ported from the iOS version. Previously I was loading and unloading textures in the native code. In the destructor in question there was a glDeleteTextures call that was removing the texture. I'm not sure why it didn't cause a problem on the first reload, but it now works" />
  <row Id="38192" PostHistoryTypeId="4" PostId="16538" RevisionGUID="5e863666-acea-434f-ad1c-3669c16f3381" CreationDate="2011-08-28T20:46:54.760" UserId="14" Comment="edited title" Text="How do I add a custom mob to Minecraft?" />
  <row Id="38193" PostHistoryTypeId="25" PostId="16547" RevisionGUID="46595a73-fa34-44d3-b85c-e3890f8e8a54" CreationDate="2011-08-28T21:38:00.107" Comment="http://twitter.com/#!/StackGameDev/status/107929950526521345" />
  <row Id="38194" PostHistoryTypeId="17" PostId="16550" RevisionGUID="830e7425-6faa-4d7c-a304-841b3e0f162e" CreationDate="2011-08-28T22:29:10.483" UserId="-1" Comment="from http://stackoverflow.com/questions/7224349/xna-how-to-list-which-sprites-and-vertices-are-currently-visible-in-the-rendere" Text="" />
  <row Id="38195" PostHistoryTypeId="2" PostId="16550" RevisionGUID="4889ad78-ab7c-4d9d-9b89-dcc9b41d2dd5" CreationDate="2011-08-28T22:18:56.427" UserId="9552" UserDisplayName="timemirror" Text="Just starting out using XNA to draw 3D scenes and have a question about determining which objects are currently visible.&#xD;&#xA;&#xD;&#xA;If I load many 1000s of sprites and shapes in a scene.. then render the current view from a camera.. is it possible to actually find which (eg to list to a text file) the IDs of those visible objects?&#xD;&#xA;&#xD;&#xA;I guess another way to ask this is to say... how do you get a list of which objects (eg sprites) which are being drawn in the current viewport?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38196" PostHistoryTypeId="1" PostId="16550" RevisionGUID="4889ad78-ab7c-4d9d-9b89-dcc9b41d2dd5" CreationDate="2011-08-28T22:18:56.427" UserId="9552" UserDisplayName="timemirror" Text="XNA - how to list which sprites and vertices are currently visible in the rendered output?" />
  <row Id="38197" PostHistoryTypeId="3" PostId="16550" RevisionGUID="4889ad78-ab7c-4d9d-9b89-dcc9b41d2dd5" CreationDate="2011-08-28T22:18:56.427" UserId="9552" UserDisplayName="timemirror" Text="&lt;xna&gt;&lt;sprites&gt;" />
  <row Id="38198" PostHistoryTypeId="2" PostId="16551" RevisionGUID="b8699b2f-f8b9-469f-ba11-16c54ba6a1c3" CreationDate="2011-08-28T23:00:39.003" UserId="9545" Text="Does anyone know of any good tile sets for hex-based maps that are available for use? The tiles from Battle for Wesnoth seem to be under a license that would allow others to use them in their games, but the game I'm developing is on a scale where a hex would be about equivalent to the area that a person would stand on, whereas the Wesnoth tiles are on a larger scale (for example, there are forest tiles with multiple trees on the hex). Are there any other games or other sources that have hex tile graphics available?" />
  <row Id="38199" PostHistoryTypeId="1" PostId="16551" RevisionGUID="b8699b2f-f8b9-469f-ba11-16c54ba6a1c3" CreationDate="2011-08-28T23:00:39.003" UserId="9545" Text="Available Hexagon Tile Sets" />
  <row Id="38200" PostHistoryTypeId="3" PostId="16551" RevisionGUID="b8699b2f-f8b9-469f-ba11-16c54ba6a1c3" CreationDate="2011-08-28T23:00:39.003" UserId="9545" Text="&lt;tiles&gt;" />
  <row Id="38201" PostHistoryTypeId="2" PostId="16552" RevisionGUID="1bb640c4-e693-44ef-9cf3-4e90c437ed29" CreationDate="2011-08-28T23:24:38.200" UserId="8390" Text="You can check if the object's bounding is inside of the camera frustum.&#xD;&#xA;&#xD;&#xA;you have the class BoundingFrustum that can manage intersections with BoundingBoxes or BoundingSpheres.&#xD;&#xA;&#xD;&#xA; " />
  <row Id="38202" PostHistoryTypeId="2" PostId="16553" RevisionGUID="e6d18031-07dd-4f88-8dc5-a4272ce9d46b" CreationDate="2011-08-29T00:33:16.830" UserId="163" Text="To go along with @Blau's answer, here is the MSDN documentation for BoundingFrustrum and related classes/methods:  &#xD;&#xA;[http://msdn.microsoft.com/en-us/library/bb313876.aspx][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/bb313876.aspx" />
  <row Id="38203" PostHistoryTypeId="25" PostId="16538" RevisionGUID="555c0453-8f54-4834-9aed-c9a06a793b1d" CreationDate="2011-08-29T00:38:00.007" Comment="http://twitter.com/#!/StackGameDev/status/107975248120516608" />
  <row Id="38204" PostHistoryTypeId="5" PostId="1807" RevisionGUID="15267f8d-1ba5-4bf6-8230-b4399c9b9de6" CreationDate="2011-08-29T01:22:46.913" UserId="1163" Comment="added 23 characters in body" Text="What would the algorithm be for generating/drawing the asteroid shapes from the [original Asteroids game][1]? Is it even an algorithm? Or would they be hard coded shapes?&#xD;&#xA;&#xD;&#xA;Here is a screenshot to jog your memory.&#xD;&#xA;&#xD;&#xA;![Screenshot from Asteroids game][2]&#xD;&#xA;&#xD;&#xA;**EDIT** - Also found this:&#xD;&#xA;&#xD;&#xA;![alt text][3]&#xD;&#xA;&#xD;&#xA;from the article [Edge - The Making of Asteroids][4]. Interesting read, but does not mention any specifics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Asteroids_(video_game)&#xD;&#xA;  [2]: http://www.heinzwerner.de/emu_asteroids.jpg&#xD;&#xA;  [3]: http://www.next-gen.biz/files/images/feature_article/2009/05/asteroids4.jpg&#xD;&#xA;  [4]:http://www.next-gen.biz/features/making-asteroids" />
  <row Id="38205" PostHistoryTypeId="25" PostId="16551" RevisionGUID="5328a229-3523-4329-84bc-1127d6b89186" CreationDate="2011-08-29T03:37:59.587" Comment="http://twitter.com/#!/StackGameDev/status/108020545731297281" />
  <row Id="38206" PostHistoryTypeId="6" PostId="16551" RevisionGUID="c7cd4167-40da-47b3-8d74-7e54b7b5f4f7" CreationDate="2011-08-29T05:54:50.233" UserId="2897" Comment="edited tags" Text="&lt;tiles&gt;&lt;assets&gt;&lt;free&gt;" />
  <row Id="38207" PostHistoryTypeId="25" PostId="16550" RevisionGUID="01f4b9de-9c22-4172-b7dd-48f7e581a61d" CreationDate="2011-08-29T06:38:00.487" Comment="http://twitter.com/#!/StackGameDev/status/108065847632867328" />
  <row Id="38208" PostHistoryTypeId="17" PostId="16554" RevisionGUID="041782cb-0cb8-44cd-ae76-301636f5a19b" CreationDate="2011-08-29T06:56:38.023" UserId="-1" Comment="from http://stackoverflow.com/questions/7224194/simple-if-statment-causing-spritebatch-draw-not-to-execute-xna" Text="" />
  <row Id="38209" PostHistoryTypeId="2" PostId="16554" RevisionGUID="7e29b8d4-855b-44c5-a8a3-d54ebc0c8fe3" CreationDate="2011-08-28T21:47:47.197" UserDisplayName="hmjohnny" Text="I've been working sometime on trying to get an inventory system for my game to work properly and I'm running into a very simple problem that I cannot figure out. It seems to me that I am missing something because I have an a draw method called after an if statement and the method never seems to execute.  I never see the sprite on screen.  For that matter I have tried to stop the program on that line of code in the debugger and it never executes at all despite the conditions for the statement being true.&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;     public void Draw(SpriteBatch spriteBatch, Texture2D texture, Texture2D itemTexture, Vector2 location, int sizeX, int sizeY)&#xD;&#xA;        {&#xD;&#xA;           &#xD;&#xA;            //draw to the screen&#xD;&#xA;            destinationRectangle = new Rectangle((int)location.X, (int)location.Y - speed , sizeX, sizeY);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;                spriteBatch.Begin();&#xD;&#xA;                spriteBatch.Draw(texture, destinationRectangle, Color.White);&#xD;&#xA;                 if (count &gt; 0)&#xD;&#xA;                           spriteBatch.Draw(itemTexture, new Vector2(destinationRectangle.X + 50, destinationRectangle.Y), Color.White);&#xD;&#xA;                spriteBatch.End();&#xD;&#xA;&#xD;&#xA;As you can see the statement: if(count &gt; 0) is the problem.  When the object is picked up the count increases by 1.  I know that the value equals 1 but the if statement never validates as true.&#xD;&#xA;&#xD;&#xA;Here is the Draw method in the Game class:&#xD;&#xA;&#xD;&#xA;    protected override void Draw(GameTime gameTime)&#xD;&#xA;        {&#xD;&#xA;            GraphicsDevice.Clear(Color.CornflowerBlue);&#xD;&#xA;&#xD;&#xA;            // TODO: Add your drawing code here&#xD;&#xA;&#xD;&#xA;             spriteBatch.Begin();&#xD;&#xA;             spriteBatch.Draw(background, new Rectangle(0, 0, 800, 480), Color.White);&#xD;&#xA;             spriteBatch.End();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;             item.Draw(spriteBatch, new Vector2(285, 225), 50, 50);&#xD;&#xA;             animatedSprite.Draw(spriteBatch, new Vector2(350, 100));&#xD;&#xA;&#xD;&#xA;             drawInventoryScreen.Draw(spriteBatch, inventory, apple, new Vector2(0, 480), 800, 200);&#xD;&#xA;&#xD;&#xA;            &#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can see as well that I call the inventory screen draw method last as to make sure it gets drawn on top of any other sprites.  Can anyone make sense of this for me?  Is there something about the way the spritebatch class works that is stopping my code?&#xD;&#xA;&#xD;&#xA;Thanks " />
  <row Id="38210" PostHistoryTypeId="1" PostId="16554" RevisionGUID="7e29b8d4-855b-44c5-a8a3-d54ebc0c8fe3" CreationDate="2011-08-28T21:47:47.197" UserDisplayName="hmjohnny" Text="Simple if statment causing spritebatch.Draw() not to execute -XNA" />
  <row Id="38211" PostHistoryTypeId="3" PostId="16554" RevisionGUID="7e29b8d4-855b-44c5-a8a3-d54ebc0c8fe3" CreationDate="2011-08-28T21:47:47.197" UserDisplayName="hmjohnny" Text="&lt;xna&gt;" />
  <row Id="38212" PostHistoryTypeId="2" PostId="16555" RevisionGUID="c9ee1fd5-dbe2-4a13-9cfe-d4ba4240b6f3" CreationDate="2011-08-29T07:12:46.450" UserId="5771" Text="If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics card supports them?&#xD;&#xA;&#xD;&#xA;I want to ensure that my game works on 9.3 level hardware but don't have such a card to test it on. If I accidentally use higher features in my code, will setting the feature level lower when creating the device prevent those features from working even though my physical graphics card supports them?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38213" PostHistoryTypeId="1" PostId="16555" RevisionGUID="c9ee1fd5-dbe2-4a13-9cfe-d4ba4240b6f3" CreationDate="2011-08-29T07:12:46.450" UserId="5771" Text="Direct3D11 feature level" />
  <row Id="38214" PostHistoryTypeId="3" PostId="16555" RevisionGUID="c9ee1fd5-dbe2-4a13-9cfe-d4ba4240b6f3" CreationDate="2011-08-29T07:12:46.450" UserId="5771" Text="&lt;directx&gt;&lt;directx11&gt;" />
  <row Id="38215" PostHistoryTypeId="5" PostId="16544" RevisionGUID="0ba49b01-b204-4460-838c-b716122fbfd4" CreationDate="2011-08-29T08:07:19.137" UserId="20" Comment="minor spelling changes" Text="In addition to Nick, Wacom is the only brand that can be suggested with eyes closed &amp; they have low price models.&#xD;&#xA;&#xD;&#xA;I own 2 Wacom tablets, one I bought 3-4 or more years ago. The point is it still acts like brand new. Unless you break the pen (which can be bought separately), the touch surface shows no sign of age.&#xD;&#xA;&#xD;&#xA;A few months back I bought another Wacom Bamboo. I suggest you to go for this one, as it's not expensive. I have heard a lot of high profile artist that still use their old Wacom tablet, cause it still works so well and they don't want to shift to something else for no reason. &#xD;&#xA;&#xD;&#xA;Intuos are high-end artist models. See the feature list. If you don't need any of these, then simply go for the Bamboo series. It wont disappoint you. Paying a little more now will come back to you as a rare service in the long run." />
  <row Id="38216" PostHistoryTypeId="25" PostId="16555" RevisionGUID="9a70bd6a-78ec-45d1-adf5-c29c400c6148" CreationDate="2011-08-29T09:38:01.113" Comment="http://twitter.com/#!/StackGameDev/status/108111148343246848" />
  <row Id="38217" PostHistoryTypeId="5" PostId="16530" RevisionGUID="6e1f324f-6580-467f-9ad2-788590fd4a98" CreationDate="2011-08-29T09:42:40.500" UserId="5473" Comment="added 133 characters in body" Text="The more pertinent question is, does anything in the real world happen simultaneuously? That all depends on what division of time you go down to; seconds, milliseconds, nanoseconds, picoseconds and so on. Eventually you will reach a point where things *aren't* happening simultaneously, because the degree to which you can subdivide time is infinite. This would also also be the case with any theoretical computer system, even one designed for that purpose, due to the fact that no matter how high a timing resolution you specify as a parameter for your hardware design, *there is always a higher resolution*.&#xD;&#xA;&#xD;&#xA;Modern collision detection systems work, both inside and outside of the field of games, because it doesn't matter, so long as the collisions happen at what is *perceptually* the same time. The human brain has it's limits to what it can perceive as continuous. Generally frame rates in games don't need to exceed about 60fps for this reason -- same as a flourescent lights running at 50-60Hz AC. And 60Hz is, from what I understand, well above the limits of our rate-of-perception, in order to appear continuous even in worst-case scenarios.&#xD;&#xA;&#xD;&#xA;EDIT: This post describes the practical realities, however see Martin Sojka's comment re the theory of time divisibility, below. Thanks Martin!" />
  <row Id="38218" PostHistoryTypeId="2" PostId="16556" RevisionGUID="4a35f56d-b965-4c9d-b8af-a9069aa044cf" CreationDate="2011-08-29T09:50:10.587" UserId="9549" Text="    Hello i want to check collision detection between two bitmaps but i am not getting how to do it. i read several queries and tutorials but didnt get properly. i want to check by their width and height. i have implemented some logic also but not getting where i am doing wrong&#xD;&#xA;&#xD;&#xA;    public boolean collision(){&#xD;&#xA;    		for(int i=0; i&lt;9; i++){&#xD;&#xA;    			for(int j=0; j&lt;14; j++){&#xD;&#xA;    				if(frog.getX() &lt; x + getX() || frog.getY() &lt; y + getY() || frog.getX() &gt; x || frog.getY() &gt; y){&#xD;&#xA;    				//if(other.getWidth() &gt; x &amp;&amp; other.getWidth() &lt; x + width &amp;&amp; &gt;other.getHeight() &gt; y &amp;&amp; other.getHeight() &lt; y + height);&#xD;&#xA;    					frog.frogShiftDown();&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		return true;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    public void draw(Canvas canvas){&#xD;&#xA;    		canvas.drawBitmap(bmp, x, y,null);&#xD;&#xA;    		carmove();&#xD;&#xA;    		collision();&#xD;&#xA;    	}" />
  <row Id="38219" PostHistoryTypeId="1" PostId="16556" RevisionGUID="4a35f56d-b965-4c9d-b8af-a9069aa044cf" CreationDate="2011-08-29T09:50:10.587" UserId="9549" Text="Collision detection problem" />
  <row Id="38220" PostHistoryTypeId="3" PostId="16556" RevisionGUID="4a35f56d-b965-4c9d-b8af-a9069aa044cf" CreationDate="2011-08-29T09:50:10.587" UserId="9549" Text="&lt;android&gt;&lt;collision-detection&gt;" />
  <row Id="38221" PostHistoryTypeId="2" PostId="16557" RevisionGUID="669673bf-89d4-476b-89c0-e114d0ff59ae" CreationDate="2011-08-29T10:04:46.287" UserId="5473" Text="This is a problem with many, many sources across the web (if you want to do a search its called &quot;bounding box collision detection&quot; / &quot;bounding box overlap&quot;)&#xD;&#xA;&#xD;&#xA;Here's [one source][1]. (You only need the first box of code they provide.)&#xD;&#xA;&#xD;&#xA;Here's [another][2].&#xD;&#xA;&#xD;&#xA;And [another][3]...&#xD;&#xA;&#xD;&#xA;...and [another][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/collision-detection-r735&#xD;&#xA;  [2]: http://www.gamebanana.com/tuts/8486&#xD;&#xA;  [3]: http://forums.elysianshadows.com/viewtopic.php?f=13&amp;t=5767&#xD;&#xA;  [4]: http://www.gamedev.net/topic/423383-bounding-box-box-intersection/" />
  <row Id="38222" PostHistoryTypeId="5" PostId="16557" RevisionGUID="d4f99096-7cf9-4b61-aca5-0d4d8b088507" CreationDate="2011-08-29T10:17:15.790" UserId="5473" Comment="added 191 characters in body" Text="This is a problem with many, many sources across the web (if you want to do a search its called &quot;bounding box collision detection&quot; / &quot;bounding box overlap&quot;)&#xD;&#xA;&#xD;&#xA;Here's [one source][1]. (You only need the first box of code they provide.)&#xD;&#xA;&#xD;&#xA;Here's [another][2].&#xD;&#xA;&#xD;&#xA;And [another][3]...&#xD;&#xA;&#xD;&#xA;...and [another][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/collision-detection-r735&#xD;&#xA;  [2]: http://www.gamebanana.com/tuts/8486&#xD;&#xA;  [3]: http://forums.elysianshadows.com/viewtopic.php?f=13&amp;t=5767&#xD;&#xA;  [4]: http://www.gamedev.net/topic/423383-bounding-box-box-intersection/&#xD;&#xA;&#xD;&#xA;With more background on what you are trying to do (i.e. are you detecting your collisions in a grid like tic-tac-toe, or are you doing them in a continuous space?) we can debug your code." />
  <row Id="38223" PostHistoryTypeId="2" PostId="16558" RevisionGUID="fa927086-0037-4738-933f-b1f3b5a2f4b8" CreationDate="2011-08-29T10:38:24.103" UserId="1141" Text="You can use a simple [Poisson-disk distribution algorithm][1] to get a &quot;blue noise&quot; distribution. This results in points in the plane which are roughly spaced equally apart from each other. This works not only in your 2D example but in 3D as well, and also in non-Euclidean spaces, but the calculations can quickly become unwieldy.&#xD;&#xA;&#xD;&#xA;The basic idea of those algorithms is that you start with a first &quot;seed&quot; point, then work yourself outwards adding random or pseudo-random points in the annulus between the max and min distances you'd like to have from the point onward and eliminate those which lie too near to each other. Your algorithm then works outwards in such a manner, until either the amount of points needed is added (which gives you a roughly circular point cloud), or the space available is filled.&#xD;&#xA;&#xD;&#xA;A fast and elegant *alternative* algorithm for generation of 2D such noise, as well as a short discussion of the properties thereof, can be found in &quot;[A Spatial Data Structure for Fast Poisson-Disk Sample Generation][2]&quot; by Daniel Dunbar and Greg Humphreys of the University of Virginia.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://devmag.org.za/2009/05/03/poisson-disk-sampling/&#xD;&#xA;  [2]: http://www.cs.virginia.edu/~gfx/pubs/antimony/antimony.pdf" />
  <row Id="38224" PostHistoryTypeId="5" PostId="16557" RevisionGUID="2244feab-325e-45a2-b005-9fd76c618623" CreationDate="2011-08-29T11:38:51.430" UserId="5473" Comment="added 1335 characters in body" Text="This is a problem with many, many sources across the web (if you want to do a search its called &quot;bounding box collision detection&quot; / &quot;bounding box overlap&quot;)&#xD;&#xA;&#xD;&#xA;Here's [one source][1]. (You only need the first box of code they provide.)&#xD;&#xA;&#xD;&#xA;Here's [another][2].&#xD;&#xA;&#xD;&#xA;And [another][3]...&#xD;&#xA;&#xD;&#xA;...and [another][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/collision-detection-r735&#xD;&#xA;  [2]: http://www.gamebanana.com/tuts/8486&#xD;&#xA;  [3]: http://forums.elysianshadows.com/viewtopic.php?f=13&amp;t=5767&#xD;&#xA;  [4]: http://www.gamedev.net/topic/423383-bounding-box-box-intersection/&#xD;&#xA;&#xD;&#xA;With more background on what you are trying to do (i.e. are you detecting your collisions in a grid like tic-tac-toe, or are you doing them in a continuous space?) we can debug your code.&#xD;&#xA;&#xD;&#xA;EDIT: Okay, so you're doing a Frogger remake.&#xD;&#xA;&#xD;&#xA;I'm going to describe this as pseudocode; I don't know what language you're using. If you understand the concepts as I explain them, you should be able to write the code.&#xD;&#xA;&#xD;&#xA;Create a list called &quot;cars&quot;.&#xD;&#xA;&#xD;&#xA;    Every time a car is created at the edge of the screen, put that car into &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Every time a car is deleted at the edge of the scree, remove that car from your &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Keep a reference to your frog (you are already doing this, i.e. your variable called &quot;frog&quot;)&#xD;&#xA;&#xD;&#xA;    frog.left = frog.x&#xD;&#xA;    frog.top = frog.y&#xD;&#xA;    frog.right = frog.x+frog.width&#xD;&#xA;    frog.bottom = frog.y+frog.height&#xD;&#xA;&#xD;&#xA;    For each car in cars&#xD;&#xA;       car.left = car.x&#xD;&#xA;       car.top = car.y&#xD;&#xA;       car.right = car.x+frog.width&#xD;&#xA;       car.bottom = car.y+frog.height&#xD;&#xA;       if car.left is between frog.left and frog.right OR frog.left is between car.left and car.right&#xD;&#xA;          horizontalOverlap = true&#xD;&#xA;       if car.top is between frog.top and frog.bottom OR frog.top is between car.top and car.bottom&#xD;&#xA;          verticalOverlap = true&#xD;&#xA;&#xD;&#xA;    if horizontalOverlap and verticalOverlap&#xD;&#xA;       splatFrog&#xD;&#xA;          &#xD;&#xA;HTH. Draw your two boxes representing the current car and your frog, on a piece of paper, and you will see what is going on. The algorithm is checking overlap first along the x axis, then along the y axis. If there is overlap on both axes, then the car is on top of the frog (or vice versa), so the frog must DIE.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38225" PostHistoryTypeId="5" PostId="16557" RevisionGUID="de8db181-e3dc-41d7-8836-7736e5451050" CreationDate="2011-08-29T11:44:11.520" UserId="5473" Comment="added 4 characters in body" Text="This is a problem with many, many sources across the web (if you want to do a search its called &quot;bounding box collision detection&quot; / &quot;bounding box overlap&quot;)&#xD;&#xA;&#xD;&#xA;Here's [one source][1]. (You only need the first box of code they provide.)&#xD;&#xA;&#xD;&#xA;Here's [another][2].&#xD;&#xA;&#xD;&#xA;And [another][3]...&#xD;&#xA;&#xD;&#xA;...and [another][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/collision-detection-r735&#xD;&#xA;  [2]: http://www.gamebanana.com/tuts/8486&#xD;&#xA;  [3]: http://forums.elysianshadows.com/viewtopic.php?f=13&amp;t=5767&#xD;&#xA;  [4]: http://www.gamedev.net/topic/423383-bounding-box-box-intersection/&#xD;&#xA;&#xD;&#xA;With more background on what you are trying to do (i.e. are you detecting your collisions in a grid like tic-tac-toe, or are you doing them in a continuous space?) we can debug your code.&#xD;&#xA;&#xD;&#xA;EDIT: Okay, so you're doing a Frogger remake.&#xD;&#xA;&#xD;&#xA;I'm going to describe this as pseudocode; I don't know what language you're using. If you understand the concepts as I explain them, you should be able to write the code.&#xD;&#xA;&#xD;&#xA;Create a list called &quot;cars&quot;.&#xD;&#xA;&#xD;&#xA;    Every time a car is created at the edge of the screen, put that car into &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Every time a car is deleted at the edge of the screen, remove that car from your &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Keep a reference to your frog (you are already doing this, i.e. your variable called &quot;frog&quot;)&#xD;&#xA;&#xD;&#xA;    frog.left = frog.x&#xD;&#xA;    frog.top = frog.y&#xD;&#xA;    frog.right = frog.x+frog.width&#xD;&#xA;    frog.bottom = frog.y+frog.height&#xD;&#xA;&#xD;&#xA;    For each car in cars&#xD;&#xA;       car.left = car.x&#xD;&#xA;       car.top = car.y&#xD;&#xA;       car.right = car.x+frog.width&#xD;&#xA;       car.bottom = car.y+frog.height&#xD;&#xA;       if car.left is between frog.left and frog.right OR frog.left is between car.left and car.right&#xD;&#xA;          horizontalOverlap = true&#xD;&#xA;       if car.top is between frog.top and frog.bottom OR frog.top is between car.top and car.bottom&#xD;&#xA;          verticalOverlap = true&#xD;&#xA;&#xD;&#xA;    if horizontalOverlap and verticalOverlap&#xD;&#xA;       explode frog&#xD;&#xA;       lives = lives - 1&#xD;&#xA;       place new frog back at start point (usually bottom of screen)&#xD;&#xA;          &#xD;&#xA;HTH. Draw your two boxes representing the current car and your frog, on a piece of paper, and you will see what is going on. The algorithm is checking overlap first along the x axis, then along the y axis. If there is overlap on both axes, then the car is on top of the frog (or vice versa), so the frog must explode.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38226" PostHistoryTypeId="5" PostId="16557" RevisionGUID="810e0daa-fa63-4f12-9903-39432cea56f3" CreationDate="2011-08-29T11:49:37.507" UserId="5473" Comment="added 4 characters in body" Text="This is a problem with many, many sources across the web (if you want to do a search its called &quot;bounding box collision detection&quot; / &quot;bounding box overlap&quot;)&#xD;&#xA;&#xD;&#xA;Here's [one source][1]. (You only need the first box of code they provide.)&#xD;&#xA;&#xD;&#xA;Here's [another][2].&#xD;&#xA;&#xD;&#xA;And [another][3]...&#xD;&#xA;&#xD;&#xA;...and [another][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/collision-detection-r735&#xD;&#xA;  [2]: http://www.gamebanana.com/tuts/8486&#xD;&#xA;  [3]: http://forums.elysianshadows.com/viewtopic.php?f=13&amp;t=5767&#xD;&#xA;  [4]: http://www.gamedev.net/topic/423383-bounding-box-box-intersection/&#xD;&#xA;&#xD;&#xA;With more background on what you are trying to do (i.e. are you detecting your collisions in a grid like tic-tac-toe, or are you doing them in a continuous space?) we can debug your code.&#xD;&#xA;&#xD;&#xA;EDIT: Okay, so you're doing a Frogger remake.&#xD;&#xA;&#xD;&#xA;I'm going to describe this as pseudocode; I don't know what language you're using. If you understand the concepts as I explain them, you should be able to write the code.&#xD;&#xA;&#xD;&#xA;Create a list called &quot;cars&quot;.&#xD;&#xA;&#xD;&#xA;    Every time a car is created at the edge of the screen, put that car into &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Every time a car is deleted at the edge of the screen, remove that car from your &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Keep a reference to your frog (you are already doing this, i.e. your variable called &quot;frog&quot;)&#xD;&#xA;&#xD;&#xA;    frog.left = frog.x&#xD;&#xA;    frog.top = frog.y&#xD;&#xA;    frog.right = frog.x+frog.width&#xD;&#xA;    frog.bottom = frog.y+frog.height&#xD;&#xA;&#xD;&#xA;    For each car in cars&#xD;&#xA;       car.left = car.x&#xD;&#xA;       car.top = car.y&#xD;&#xA;       car.right = car.x+frog.width&#xD;&#xA;       car.bottom = car.y+frog.height&#xD;&#xA;       if ((car.left is between frog.left and frog.right) or (frog.left is between car.left and car.right))&#xD;&#xA;          horizontalOverlap = true&#xD;&#xA;       if ((car.top is between frog.top and frog.bottom) or (frog.top is between car.top and car.bottom))&#xD;&#xA;          verticalOverlap = true&#xD;&#xA;&#xD;&#xA;    if (horizontalOverlap and verticalOverlap)&#xD;&#xA;       explode frog&#xD;&#xA;       if lives == 0&#xD;&#xA;          end game&#xD;&#xA;       else&#xD;&#xA;          lives = lives - 1&#xD;&#xA;          place new frog back at start point (usually bottom of screen)&#xD;&#xA;          &#xD;&#xA;HTH. Draw your two boxes representing the current car and your frog, on a piece of paper, and you will see what is going on. The algorithm is checking overlap first along the x axis, then along the y axis. If there is overlap on both axes, then the car is on top of the frog (or vice versa), so the frog must explode.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38227" PostHistoryTypeId="5" PostId="16556" RevisionGUID="e2d73faf-a447-44d9-9827-2d4595ab1b2c" CreationDate="2011-08-29T11:51:12.950" UserId="7369" Comment="The question itself was also in code. This put it in just one line and required a long horizontal scroll." Text="Hello I want to check collision detection between two bitmaps but I am not getting how to do it. I read several queries and tutorials but didnt get properly. I want to check by their width and height. I have implemented some logic also but not getting where I am doing wrong&#xD;&#xA;&#xD;&#xA;    public boolean collision(){&#xD;&#xA;    		for(int i=0; i&lt;9; i++){&#xD;&#xA;    			for(int j=0; j&lt;14; j++){&#xD;&#xA;    				if(frog.getX() &lt; x + getX() || frog.getY() &lt; y + getY() || frog.getX() &gt; x || frog.getY() &gt; y){&#xD;&#xA;    				//if(other.getWidth() &gt; x &amp;&amp; other.getWidth() &lt; x + width &amp;&amp; &gt;other.getHeight() &gt; y &amp;&amp; other.getHeight() &lt; y + height);&#xD;&#xA;    					frog.frogShiftDown();&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		return true;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    public void draw(Canvas canvas){&#xD;&#xA;    		canvas.drawBitmap(bmp, x, y,null);&#xD;&#xA;    		carmove();&#xD;&#xA;    		collision();&#xD;&#xA;    	}" />
  <row Id="38228" PostHistoryTypeId="24" PostId="16556" RevisionGUID="e2d73faf-a447-44d9-9827-2d4595ab1b2c" CreationDate="2011-08-29T11:51:12.950" Comment="Proposed by 7369 approved by 20 edit id of 681" />
  <row Id="38229" PostHistoryTypeId="5" PostId="16557" RevisionGUID="28b54c04-746b-4286-a176-f9cf48d16769" CreationDate="2011-08-29T11:54:52.337" UserId="5473" Comment="added 4 characters in body" Text="This is a problem with many, many sources across the web (if you want to do a search its called &quot;bounding box collision detection&quot; / &quot;bounding box overlap&quot;)&#xD;&#xA;&#xD;&#xA;Here's [one source][1]. (You only need the first box of code they provide.)&#xD;&#xA;&#xD;&#xA;Here's [another][2].&#xD;&#xA;&#xD;&#xA;And [another][3]...&#xD;&#xA;&#xD;&#xA;...and [another][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.gamedev.net/page/resources/_/reference/programming/game-programming/collision-detection/collision-detection-r735&#xD;&#xA;  [2]: http://www.gamebanana.com/tuts/8486&#xD;&#xA;  [3]: http://forums.elysianshadows.com/viewtopic.php?f=13&amp;t=5767&#xD;&#xA;  [4]: http://www.gamedev.net/topic/423383-bounding-box-box-intersection/&#xD;&#xA;&#xD;&#xA;With more background on what you are trying to do (i.e. are you detecting your collisions in a grid like tic-tac-toe, or are you doing them in a continuous space?) we can debug your code.&#xD;&#xA;&#xD;&#xA;EDIT: Okay, so you're doing a Frogger remake.&#xD;&#xA;&#xD;&#xA;I'm going to describe this as pseudocode; I don't know what language you're using. If you understand the concepts as I explain them, you should be able to write the code.&#xD;&#xA;&#xD;&#xA;Create a list called &quot;cars&quot;.&#xD;&#xA;&#xD;&#xA;    Every time a car is created at the edge of the screen, put that car into &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Every time a car is deleted at the edge of the screen, remove that car from your &quot;cars&quot; array.&#xD;&#xA;    &#xD;&#xA;    Keep a reference to your frog (you are already doing this, i.e. your variable called &quot;frog&quot;)&#xD;&#xA;&#xD;&#xA;    frog.left = frog.x&#xD;&#xA;    frog.top = frog.y&#xD;&#xA;    frog.right = frog.x+frog.width&#xD;&#xA;    frog.bottom = frog.y+frog.height&#xD;&#xA;&#xD;&#xA;    For each car in cars&#xD;&#xA;       car.left = car.x&#xD;&#xA;       car.top = car.y&#xD;&#xA;       car.right = car.x+frog.width&#xD;&#xA;       car.bottom = car.y+frog.height&#xD;&#xA;       if ((car.left is between frog.left and frog.right) or (frog.left is between car.left and car.right))&#xD;&#xA;          horizontalOverlap = true&#xD;&#xA;       if ((car.top is between frog.top and frog.bottom) or (frog.top is between car.top and car.bottom))&#xD;&#xA;          verticalOverlap = true&#xD;&#xA;&#xD;&#xA;       if (horizontalOverlap and verticalOverlap)&#xD;&#xA;          explode frog&#xD;&#xA;          if lives == 0&#xD;&#xA;             end game&#xD;&#xA;          else&#xD;&#xA;             lives = lives - 1&#xD;&#xA;             place new frog back at start point (usually bottom of screen)&#xD;&#xA;          &#xD;&#xA;HTH. Draw your two boxes representing the current car and your frog, on a piece of paper, and you will see what is going on. The algorithm is checking overlap first along the x axis, then along the y axis. If there is overlap on both axes, then the car is on top of the frog (or vice versa), so the frog must explode.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38230" PostHistoryTypeId="25" PostId="16539" RevisionGUID="a27338eb-543e-4095-8d18-043c3d5882e2" CreationDate="2011-08-29T12:38:00.400" Comment="http://twitter.com/#!/StackGameDev/status/108156444695724032" />
  <row Id="38231" PostHistoryTypeId="2" PostId="16559" RevisionGUID="faf454aa-8b3b-4e1e-b777-90fefbb4cf5e" CreationDate="2011-08-29T13:29:01.323" UserId="1101" Text="The standards should be, &quot;whatever the code department needs, within reason&quot;. This may involve the coders writing exporter plugins for artists. But there is no standard way of distributing art since there is no standard way of consuming or using art. It's just down to what the technology pipeline requires.&#xD;&#xA;&#xD;&#xA;However, as some rough guidelines:&#xD;&#xA;&#xD;&#xA;  - First, ask what they want. If they want a certain texture format, eg. DDS or whatever, ask and they'll say so. Check to see if you can export in this format, and if not, confer with the team to decide on how to proceed. Maybe they'll need you to install a converter, or maybe they'll let you supply the images in a different format.&#xD;&#xA;  - Make sure you have a consistent storage system for your assets that corresponds to the game's data. At some point you will be asked to redo assets, and therefore you will need to quickly find individual assets when told about a problem in-game.&#xD;&#xA;  - Use common sense. Use lossless formats when they won't be too large for little gain. Use lossy formats when they are much smaller and don't lose you significant image quality. Keep lossless versions around in your own control system so that if lossy versions are unusable, you can still generate a lossless one.&#xD;&#xA;  - When producing GUI elements, again, ASK how the system works. Don't waste your time producing mouse off/over/down/focused images when the system probably does not support all those, and might well implement some of them directly via hue shifts or alpha or whatever. Don't produce a precisely-sized dialog when it turns out they use a nine-slice system to allow dynamic sizing. Ask exactly what format they use, then supply it.&#xD;&#xA;  - Don't render text onto a background unless you have confirmed this is the right thing to do. eg. If asked to produce OK and Cancel buttons, that usually means you make ONE button and then the code will render the words 'OK' and 'Cancel' over the top. When that game is translated into French later, this means someone just has to change the 'Cancel' string to 'Annuler' and you don't have to go back and produce another set of buttons.&#xD;&#xA;  - When producing any asset type for the first time, deliver one to the intended recipient and get them to verify the format and dimensions are correct. You don't want to crank out 20 buttons and find out that they are all wrong.&#xD;&#xA;  - Establish texture sizes and overall budgets before delivering textures - coders hate it when you deliver 2048x2048 textures for something that only ever takes up 10 pixels on screen. Similarly, if the colour is uniform across the whole texture, you do not need 2048x2048, or even 128x128 - you need 1x1. More generally, deliver the smallest asset that delivers the visual quality you need.&#xD;&#xA;  - Establish consistent and descriptive naming conventions. If you generate buttons in off/selected/on states, name them quit_button_on.png, quit_button_selected.png, quit_button_off.png, etc., and repeat this across all buttons you ever make. If you generate several asset types for one object (eg. mesh, anims, textures), name them similarly if appropriate. I've known several artists who don't understand why coders have such an OCD attitude towards file names - it's because arbitrary file names waste our time. It becomes harder to find the right assets in a directory of hundreds. It becomes hard to flick from one to the next and back again easily to verify size changes and labelling is correct. It's difficult to know whether it's the code or the art which is wrong when something looks incorrect on screen but the debugger lists the texture only as &quot;aaa34_345b.dds&quot;.&#xD;&#xA;  - Do what the programmer wants - but make him help you do it. If saving in the relevant format is a burden, or checking the texture budget is impractical for you, or they want all assets in a special archive format that only one obscure piece of software can use... get him or her to write tools and plugins to help. A week spent on appropriate art tools can save both the artist and the programmer much more than a week of effort later. Don't let your code team skimp on tools.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38232" PostHistoryTypeId="2" PostId="16560" RevisionGUID="1e275c75-deb1-4032-829e-6e4637369059" CreationDate="2011-08-29T13:58:54.227" UserId="2897" Text="Think of feature levels as rulesets defining what hardware abilities of a video card you are allowed to use.&#xD;&#xA;&#xD;&#xA;So when you create a D3D11Device with D3D_FEATURE_LEVEL_9_3, you can still benefit from &quot;software&quot; D3D11 features which happen on driver and API level without involving hardware, such as better multi-threaded rendering, but your D3D11-capable video card will only give you the hardware abilities of a D3D9.3-capable video card. So geometry shaders and other fancy things will be unavailable, and runtime error will pop up when you try to use them.&#xD;&#xA;&#xD;&#xA;This way your code will run on an real old D3D9.3 video card while being relatively easy portable to a higher-level device. Check [this link][1] to see how device capabilities correspond to different feature levels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476876%28v=vs.85%29.aspx" />
  <row Id="38233" PostHistoryTypeId="2" PostId="16561" RevisionGUID="289b2b18-8d73-4fea-846e-1c325716046f" CreationDate="2011-08-29T13:59:32.917" UserId="5473" Text="It depends on what sort of graphics you want to learn and how good you want to be. Using tutorial sites to gain a technical understanding of your tools is very helpful, to start, BUT to improve your artistic ability, it's best to mix it up with those who have similar goals.&#xD;&#xA;&#xD;&#xA;Places like wayofthepixel.net, forums.cgsociety.org and deviantart.com are good places to get ideas, have have your work critted, and to view and crit the work of others, which as certain people I know would say, &quot;Serves to increase your visual literacy.&quot; *Ahem*." />
  <row Id="38234" PostHistoryTypeId="5" PostId="16545" RevisionGUID="8150219b-6ef1-4195-8978-1d33e841a244" CreationDate="2011-08-29T14:04:03.163" UserId="5473" Comment="added 152 characters in body" Text="The best way to ensure even distribution is to treat each node as a sort of physical particle. First do a random distribution across a continous (floating point) xy plane. By applying forces of repulsion between each distinct pair of individual particles on the plane, you'll find they slowly spread apart. In a sense it's like collision resolution, only there is no actual contact to speak of. It's then a simple matter to convert that plane (&quot;rasterize&quot; it) back into an integer-indexed grid. You can simply do this from a integer-indexed grid to start with, but it might be a little more difficult to get things &quot;nice&quot; -- this depends on how high the resolution of your grid is... the higher, the better, in this case.&#xD;&#xA;&#xD;&#xA;Obviously you may want to apply some sort of forces from the edges of the square plane as well, or else you may find a lot of particles &quot;washing up on the shores&quot;. Alternatively you can create a field much larger than you need, then take a snapshot of a small area of that -- this avoids the aforementioned problem.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you want to ensure the opposite, i.e. that clustering *does* occur, then look into &quot;standard&quot; or &quot;gaussian&quot; distribution. This is why randomly generated starfields often look fake; they use pure random distribution rather than a more naturalistic distribution model." />
  <row Id="38235" PostHistoryTypeId="5" PostId="16561" RevisionGUID="641bd5c0-51ae-477d-b050-19743e4fc4aa" CreationDate="2011-08-29T14:10:13.767" UserId="5473" Comment="deleted 5 characters in body" Text="It depends on what sort of graphics you want to learn and how good you want to be. Using tutorial sites to gain a technical understanding of your tools is very helpful, to start, BUT to improve your artistic ability, it's best to mix it up with those who have similar goals.&#xD;&#xA;&#xD;&#xA;Places like wayofthepixel.net, forums.cgsociety.org and deviantart.com are good places to get ideas, have your work critted, and to view and crit the work of others, which as certain people I know would say, &quot;Serves to increase your visual literacy.&quot; *Ahem*." />
  <row Id="38236" PostHistoryTypeId="2" PostId="16562" RevisionGUID="caad0126-4b46-4c96-b752-55131e4841d0" CreationDate="2011-08-29T14:16:35.677" UserId="8390" Text="	&#xD;&#xA;hexart.com/graphic_depository.html &#xD;&#xA;&#xD;&#xA;i don't know if are good, but seems to be free for games" />
  <row Id="38237" PostHistoryTypeId="2" PostId="16563" RevisionGUID="244ad225-61ae-493c-bb54-22ad52615b4b" CreationDate="2011-08-29T14:24:22.903" UserId="4306" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **simplicity.** *don't* overload me with technical terms&#xD;&#xA; 2. **accuracy.** it has to actually work&#xD;&#xA; 3. **code and algorithms** that I can use. preferably based in C or C#&#xD;&#xA; 4. **images.**&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38238" PostHistoryTypeId="1" PostId="16563" RevisionGUID="244ad225-61ae-493c-bb54-22ad52615b4b" CreationDate="2011-08-29T14:24:22.903" UserId="4306" Text="How does one generate a voxel terrain?" />
  <row Id="38239" PostHistoryTypeId="3" PostId="16563" RevisionGUID="244ad225-61ae-493c-bb54-22ad52615b4b" CreationDate="2011-08-29T14:24:22.903" UserId="4306" Text="&lt;unity&gt;&lt;terrain-rendering&gt;&lt;voxels&gt;" />
  <row Id="38240" PostHistoryTypeId="5" PostId="16556" RevisionGUID="bc0f621e-abc7-4d16-856c-2af489953183" CreationDate="2011-08-29T14:28:15.610" UserId="7630" Comment="title edited to the form of a question, to fit with Meta SO's discussions on quality" Text="I want to check collision detection between two bitmaps but I am not getting how to do it. I read several queries and tutorials but didnt get properly. I want to check by their width and height. I have implemented some logic also but not getting where I am doing wrong&#xD;&#xA;&#xD;&#xA;    public boolean collision(){&#xD;&#xA;    		for(int i=0; i&lt;9; i++){&#xD;&#xA;    			for(int j=0; j&lt;14; j++){&#xD;&#xA;    				if(frog.getX() &lt; x + getX() || frog.getY() &lt; y + getY() || frog.getX() &gt; x || frog.getY() &gt; y){&#xD;&#xA;    				//if(other.getWidth() &gt; x &amp;&amp; other.getWidth() &lt; x + width &amp;&amp; &gt;other.getHeight() &gt; y &amp;&amp; other.getHeight() &lt; y + height);&#xD;&#xA;    					frog.frogShiftDown();&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    		return true;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    public void draw(Canvas canvas){&#xD;&#xA;    		canvas.drawBitmap(bmp, x, y,null);&#xD;&#xA;    		carmove();&#xD;&#xA;    		collision();&#xD;&#xA;    	}" />
  <row Id="38241" PostHistoryTypeId="4" PostId="16556" RevisionGUID="bc0f621e-abc7-4d16-856c-2af489953183" CreationDate="2011-08-29T14:28:15.610" UserId="7630" Comment="title edited to the form of a question, to fit with Meta SO's discussions on quality" Text="What is wrong with my collision detection code?" />
  <row Id="38242" PostHistoryTypeId="24" PostId="16556" RevisionGUID="bc0f621e-abc7-4d16-856c-2af489953183" CreationDate="2011-08-29T14:28:15.610" Comment="Proposed by 7630 approved by 51 edit id of 682" />
  <row Id="38243" PostHistoryTypeId="10" PostId="16554" RevisionGUID="d7e03fcf-aead-4a60-a95d-d9207f4ec5e5" CreationDate="2011-08-29T14:30:11.300" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="38244" PostHistoryTypeId="5" PostId="16524" RevisionGUID="595e9bbb-be7e-441e-ae8c-a22dc55023bc" CreationDate="2011-08-29T14:31:42.953" UserId="-1" Comment="insert duplicate link" Text="&gt; **Possible Duplicate:**  &#xA;&gt; [Android game scrolling background](http://gamedev.stackexchange.com/questions/8127/android-game-scrolling-background)  &#xA;&#xA;&lt;!-- End of automatically inserted text --&gt;&#xA;&#xA;I need to implement a scrolling background on a glSurfaceView in Android. The background should scroll as the character moves. Some good tutorials in this direction is much appreciated." />
  <row Id="38245" PostHistoryTypeId="10" PostId="16524" RevisionGUID="046c1fc0-7997-4bfe-b8bf-2d2826cdee20" CreationDate="2011-08-29T14:31:41.610" UserId="51" CloseReasonId="1" Text="[{&quot;Id&quot;:20,&quot;DisplayName&quot;:&quot;bummzack&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="38246" PostHistoryTypeId="5" PostId="16560" RevisionGUID="56c77c46-7046-48d4-8bda-4fdb33725d7f" CreationDate="2011-08-29T14:38:44.753" UserId="2897" Comment="deleted 1 characters in body" Text="Think of feature levels as rulesets defining what hardware abilities of a video card you are allowed to use.&#xD;&#xA;&#xD;&#xA;So when you create a D3D11Device with D3D_FEATURE_LEVEL_9_3, you can still benefit from &quot;software&quot; D3D11 features which happen on driver and API level without involving hardware, such as better multi-threaded rendering, but your D3D11-capable video card will only give you the hardware abilities of a D3D9.3-capable video card. So geometry shaders and other fancy things will be unavailable, and runtime error will pop up when you try to use them.&#xD;&#xA;&#xD;&#xA;This way your code will run on an real old D3D9.3 video card while being relatively easy to port to a higher-level device. Check [this link][1] to see how device capabilities correspond to different feature levels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476876%28v=vs.85%29.aspx" />
  <row Id="38247" PostHistoryTypeId="2" PostId="16564" RevisionGUID="a1f8c935-db51-4867-8cb1-d35953290844" CreationDate="2011-08-29T14:39:18.450" UserId="5473" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there's going to be a few technical terms here.&#xD;&#xA;&#xD;&#xA;You also won't get **accuracy** because people here aren't being paid by you to build your game for you. What that means is they are going to explain to you how to go about architecting such a game; they are not going to write the code for you and hand it to you on a silver platter. No algorithm or code is constructed just for *your* particular game, sorry. You'll have to find things that are similar enough, and then make them work for you. That's how the rest of us get by.&#xD;&#xA;&#xD;&#xA;Based on the way you state your demands to those who roam these forums, I do wonder whether you've ever written anything larger than a simple Flash game. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly on the spatial side of things, that means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;To construct pieces of your world at a macro-scale, you will need to use more standard 3D vector approaches. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). Now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so." />
  <row Id="38248" PostHistoryTypeId="5" PostId="16564" RevisionGUID="71b223b0-eff0-432c-8d8c-0be901f53b53" CreationDate="2011-08-29T14:45:23.377" UserId="5473" Comment="added 408 characters in body" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there's going to be a few technical terms here.&#xD;&#xA;&#xD;&#xA;You also won't get **accuracy** because people here aren't being paid by you to build your game for you. What that means is they *might* explain to you how to go about architecting such a game; they are not going to write the code for you, nor find it on the web for you, and then hand it to you on a silver platter. No algorithm or code is constructed just for *your* particular game, sorry. You'll have to find things that are similar enough, and then make them work for you. That's how the rest of us get by.&#xD;&#xA;&#xD;&#xA;Based on the way you state your demands to those who roam these forums, I do wonder whether you've ever written anything larger than a simple Flash game. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, lets proceed to a basic description of a voxel engine's requirements.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;To construct pieces of your world at a macro-scale, you will need to use more standard 3D vector approaches. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). Now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock." />
  <row Id="38249" PostHistoryTypeId="5" PostId="16563" RevisionGUID="8750e0ed-c2b4-49b8-98a9-42a2ee831658" CreationDate="2011-08-29T14:49:33.143" UserId="4306" Comment="added 28 characters in body" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **simplicity.** *don't* overload me with technical terms&#xD;&#xA; 2. **accuracy.** it has to actually work&#xD;&#xA; 3. **code and algorithms** that have already been made or made by you. preferably based in C or C#&#xD;&#xA; 4. **images.**&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38250" PostHistoryTypeId="5" PostId="16564" RevisionGUID="13f1dc18-ebd6-434d-b39c-d3647b91251f" CreationDate="2011-08-29T14:53:46.473" UserId="5473" Comment="added 40 characters in body" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there's going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, lets proceed to a basic description of a voxel engine's requirements.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;To construct pieces of your world at a macro-scale, you will need to use more standard 3D vector-based approaches. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock." />
  <row Id="38251" PostHistoryTypeId="5" PostId="16563" RevisionGUID="ce5b54b7-cdaa-41d9-8e15-92f4be28fd65" CreationDate="2011-08-29T14:55:24.320" UserId="4306" Comment="added 28 characters in body" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **code and algorithms** Is there any open source? preferably based in C or C#&#xD;&#xA; 2. **simplicity.** Explain it. I am a beginner with algorithms but I'm very accustomed with object oriented programming&#xD;&#xA; 4. **images.**&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38252" PostHistoryTypeId="5" PostId="16564" RevisionGUID="9d7715c3-2c6d-431a-af18-071f38f2c330" CreationDate="2011-08-29T14:59:38.183" UserId="5473" Comment="deleted 16 characters in body" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there's going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, lets proceed to a basic description of a voxel engine's requirements.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38253" PostHistoryTypeId="5" PostId="16562" RevisionGUID="faff7796-fa48-4e70-9ee5-cf79b57f208a" CreationDate="2011-08-29T15:01:23.153" UserId="2698" Comment="added 47 characters in body" Text="[HEX A.R.T. Graphics Depository](http://www.hexart.com/graphic_depository.html)&#xD;&#xA;&#xD;&#xA;I don't know if it's any good, but seems to be free for games." />
  <row Id="38254" PostHistoryTypeId="5" PostId="16564" RevisionGUID="6d845333-2260-4546-9dbb-07107e53458b" CreationDate="2011-08-29T15:05:02.703" UserId="5473" Comment="added 8 characters in body" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there's going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;(Disclaimer for the above -- in fact, your voxels do not need to be meshes. Many modern implementations, such as Dungeon Keeper and Minecraft, use cubic meshes for voxels. Certain older implementations, such as Comanche, or the 1990s remake of Lords of Midnight, considered each voxel as an individual, collidable point in space rather than a collection of points. These latter are what would be considered &quot;true&quot; voxels.)&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38255" PostHistoryTypeId="5" PostId="16564" RevisionGUID="a9f023ad-96cd-4377-9b34-df03a687442b" CreationDate="2011-08-29T15:16:03.367" UserId="5473" Comment="added 144 characters in body" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there's going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;(Disclaimer for the above -- in fact, your voxels do not need to be meshes. Many modern implementations, such as Dungeon Keeper and Minecraft, use cubic meshes for voxels. Certain older implementations, such as Comanche, or the 1990s remake of Lords of Midnight, considered each voxel as an individual, collidable point in space rather than a collection of points. These latter are what would be considered &quot;true&quot; voxels. Because they are much simpler, you can have many more of them in your world, and you can thus make them smaller, which is generally favourable.)&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space, using vectors. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Lastly, in order to have material &quot;flows&quot; (as Vigil hinted at in his comment on sand), you will need to look into fluid dynamics and cellular automata. These were used by the author of Dwarf Fortress, Tarn Adams, in what is essentially also a voxel world (albeit the voxels are much larger in this case, comparable to Dungeon Keeper, the principle remains the same).&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38256" PostHistoryTypeId="5" PostId="16560" RevisionGUID="a2baafe2-60af-49d4-ac0e-fe1de29d7eb8" CreationDate="2011-08-29T15:19:09.680" UserId="2897" Comment="deleted 1 characters in body" Text="Think of feature levels as rulesets defining what hardware abilities of a video card you are allowed to use.&#xD;&#xA;&#xD;&#xA;So when you create a D3D11Device with D3D_FEATURE_LEVEL_9_3, you can still benefit from &quot;software&quot; D3D11 features which happen on driver and API level without involving hardware, such as better multi-threaded rendering, but your D3D11-capable video card will only give you the hardware abilities of a D3D9.3-capable video card. So geometry shaders and other fancy things will be unavailable, and runtime error will pop up when you try to use them.&#xD;&#xA;&#xD;&#xA;This way your code will run on a real old D3D9.3 video card while being relatively easy to port to a higher-level device. Check [this link][1] to see how device capabilities correspond to different feature levels.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://msdn.microsoft.com/en-us/library/ff476876%28v=vs.85%29.aspx" />
  <row Id="38257" PostHistoryTypeId="6" PostId="16563" RevisionGUID="d5d98dbd-bb64-4a5e-9557-5b09a4767775" CreationDate="2011-08-29T15:21:00.600" UserId="5473" Comment="edited tags" Text="&lt;unity&gt;&lt;procedural-generation&gt;&lt;terrain-rendering&gt;&lt;voxels&gt;&lt;csg&gt;" />
  <row Id="38258" PostHistoryTypeId="10" PostId="7228" RevisionGUID="95f84f20-ca97-4f99-8811-36c1ce68a112" CreationDate="2011-08-29T15:24:56.160" UserId="51" CloseReasonId="7" Text="[{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="38259" PostHistoryTypeId="2" PostId="16565" RevisionGUID="c818db9e-f372-467a-8d0e-99f7d8245f95" CreationDate="2011-08-29T15:25:36.023" UserId="-1" Text="" />
  <row Id="38260" PostHistoryTypeId="2" PostId="16566" RevisionGUID="979669b2-8413-4ac1-a7a7-c588908bf9e8" CreationDate="2011-08-29T15:25:36.023" UserId="-1" Text="" />
  <row Id="38261" PostHistoryTypeId="5" PostId="16563" RevisionGUID="17349ca2-96a0-4b1d-abdd-fd2fd6297d6e" CreationDate="2011-08-29T15:34:08.720" UserId="4306" Comment="added 63 characters in body" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **code and algorithms.** Is there any open source? preferably based in C or C#&#xD;&#xA; 2. **explain it.** I am a beginner with algorithms but I'm very familiar with object oriented programming&#xD;&#xA; 4. **images/illustrations.** No, not screenshots of other engines.&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;*Edit.* No, I'm not trying to make a minecraft clone.&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38262" PostHistoryTypeId="25" PostId="16563" RevisionGUID="40c57d1b-3104-44e0-ae72-b221cdb08b10" CreationDate="2011-08-29T15:38:02.050" Comment="http://twitter.com/#!/StackGameDev/status/108201747629080576" />
  <row Id="38263" PostHistoryTypeId="5" PostId="16564" RevisionGUID="019f6945-316a-4763-b11f-3e0fb7d8d831" CreationDate="2011-08-29T15:38:57.993" UserId="5473" Comment="added 2 characters in body" Text="Your best answer won't work on **simplicity** because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there are going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;(Disclaimer for the above -- in fact, your voxels do not need to be meshes. Many modern implementations, such as Dungeon Keeper and Minecraft, use cubic meshes for voxels. Certain older implementations, such as Comanche, or the 1990s remake of Lords of Midnight, considered each voxel as an individual, collidable point in space rather than a collection of points. These latter are what would be considered &quot;true&quot; voxels. Because they are much simpler, you can have many more of them in your world, and you can thus make them smaller, which is generally favourable.)&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space, using vectors. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Lastly, in order to have material &quot;flows&quot; (as Vigil hinted at in his comment on sand), you will need to look into fluid dynamics and cellular automata. These were used by the author of Dwarf Fortress, Tarn Adams, in what is essentially also a voxel world (albeit the voxels are much larger in this case, comparable to Dungeon Keeper, the principle remains the same).&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38264" PostHistoryTypeId="5" PostId="16563" RevisionGUID="3a47adf8-8833-4048-8907-d29b14e5aca2" CreationDate="2011-08-29T15:43:48.173" UserId="4306" Comment="added 2 characters in body" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **code and algorithms.** Is there any open source? preferably based in C or C#&#xD;&#xA; 2. **explain it.** I am a beginner with algorithms but I'm very familiar with object oriented programming&#xD;&#xA; 4. **diagrams/illustrations.** No, not screenshots of other engines.&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;*Edit.* No, I'm not trying to make a minecraft clone.&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38265" PostHistoryTypeId="2" PostId="16567" RevisionGUID="39ed1bb1-ab00-4a02-b8fe-128a2cb6d5d3" CreationDate="2011-08-29T15:48:44.920" UserId="-1" Text="" />
  <row Id="38266" PostHistoryTypeId="2" PostId="16568" RevisionGUID="ce2de612-03fe-46e2-83b2-bd5a75ec2344" CreationDate="2011-08-29T15:48:44.920" UserId="-1" Text="" />
  <row Id="38267" PostHistoryTypeId="6" PostId="15635" RevisionGUID="d437b56a-43f2-41a4-b2fa-48a7604c3218" CreationDate="2011-08-29T15:57:39.740" UserId="4306" Comment="edited tags; deleted 43 characters in body" Text="&lt;unity&gt;&lt;optimization&gt;&lt;terrain-rendering&gt;&lt;terrain&gt;&lt;heightmap&gt;" />
  <row Id="38268" PostHistoryTypeId="5" PostId="15635" RevisionGUID="d437b56a-43f2-41a4-b2fa-48a7604c3218" CreationDate="2011-08-29T15:57:39.740" UserId="4306" Comment="edited tags; deleted 43 characters in body" Text="How can I make **extremely** huge terrains in Unity? It seems like I can set width and length to large values. But the Heightmap resolution only goes up to 4097 and the Detail resolution only goes up to 4048.&#xD;&#xA;&#xD;&#xA;Any ideas?" />
  <row Id="38269" PostHistoryTypeId="5" PostId="16564" RevisionGUID="e178ee7d-51db-4ead-bcae-f4d9c75bedcd" CreationDate="2011-08-29T16:10:41.470" UserId="5473" Comment="added 512 characters in body" Text="**Answer to your main question first**&#xD;&#xA;&#xD;&#xA;To generate a voxel terrain, a common method is to generate a heightmap using Perlin noise. I won't explain heightmaps here, it should be easy enough to research further. But basically its a texture representing different heights by the darkness or lightness of the pixels in the texture. This is used to generate something more interesting than a flat terrain, generally.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**What you'll need to construct your own voxel-based game** &#xD;&#xA;&#xD;&#xA;This is here to clarify that the voxel road is not an easy one, at least not at present. A lot research is once again going into voxel engines of late, toward rendering and physics applications.&#xD;&#xA;&#xD;&#xA;**Simplicity** may be a problem, because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there are going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, your &quot;generation of a voxel terrain&quot; requires a context in which to work, since voxel engines aren't exactly widespread. Lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;(Disclaimer for the above -- in fact, your voxels do not need to be meshes. Many modern implementations, such as Dungeon Keeper and Minecraft, use cubic meshes for voxels. Certain older implementations, such as Comanche, or the 1990s remake of Lords of Midnight, considered each voxel as an individual, collidable point in space rather than a collection of points. These latter are what would be considered &quot;true&quot; voxels. Because they are much simpler, you can have many more of them in your world, and you can thus make them smaller, which is generally favourable.)&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space, using vectors. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Lastly, in order to have material &quot;flows&quot; (as Vigil hinted at in his comment on sand), you will need to look into fluid dynamics and cellular automata. These were used by the author of Dwarf Fortress, Tarn Adams, in what is essentially also a voxel world (albeit the voxels are much larger in this case, comparable to Dungeon Keeper, the principle remains the same).&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38270" PostHistoryTypeId="5" PostId="16568" RevisionGUID="940dead2-bfce-4543-a58c-836ca1521cce" CreationDate="2011-08-29T16:11:29.437" UserId="4306" Comment="added 78 characters in body" Text="The terrain rendering tag is used for questions about the creation of terrain." />
  <row Id="38271" PostHistoryTypeId="24" PostId="16568" RevisionGUID="940dead2-bfce-4543-a58c-836ca1521cce" CreationDate="2011-08-29T16:11:29.437" Comment="Proposed by 4306 approved by 14 edit id of 684" />
  <row Id="38272" PostHistoryTypeId="5" PostId="16566" RevisionGUID="b5725657-1e6d-468c-b51f-ef67fad47e8e" CreationDate="2011-08-29T16:11:31.170" UserId="5473" Comment="added 284 characters in body" Text="Constructive Solid Geometry. The practice of intersecting one volume with another and performing logical AND, NAND, OR, XOR operations to determine a resultant volume. It is used as an umbrella term also for CPG, Constructive Planar Geometry, which describes similar operations in 2D." />
  <row Id="38273" PostHistoryTypeId="24" PostId="16566" RevisionGUID="b5725657-1e6d-468c-b51f-ef67fad47e8e" CreationDate="2011-08-29T16:11:31.170" Comment="Proposed by 5473 approved by 14 edit id of 683" />
  <row Id="38274" PostHistoryTypeId="5" PostId="16564" RevisionGUID="48328553-6e9b-47e4-aa03-4ae44fbca61c" CreationDate="2011-08-29T16:16:13.167" UserId="5473" Comment="added 512 characters in body" Text="**Answer to your main question first**&#xD;&#xA;&#xD;&#xA;To generate a voxel terrain, a common method is to generate a heightmap using Perlin noise. I won't explain heightmaps here, it should be easy enough to research further. But basically its a monochrome image representing different heights by the darkness or lightness of the pixels in the image. This is used to generate something more interesting than a flat terrain, generally.&#xD;&#xA;&#xD;&#xA;You'll look at individual pixels in this heightmap to create &quot;stacks&quot; of voxels up to different heights (z-axis) in different (x,y) locations, according to the brightness of that pixel in the heightmap image. Because a Perlin noise image is smooth (no sharp edges of light against dark), you will have smoothly rolling terrain as a result.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**What you'll need to construct your own voxel-based game** &#xD;&#xA;&#xD;&#xA;I include this section because the voxel road is not an easy one, at least not at present. Lately, a lot of research is once again being put into voxel engines by the big players, toward rendering and physics applications.&#xD;&#xA;&#xD;&#xA;**Simplicity** may be a problem, because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there are going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, your &quot;generation of a voxel terrain&quot; requires a context in which to work, since voxel engines aren't exactly widespread. Lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;(Disclaimer for the above -- in fact, your voxels do not need to be meshes. Many modern implementations, such as Dungeon Keeper and Minecraft, use cubic meshes for voxels. Certain older implementations, such as Comanche, or the 1990s remake of Lords of Midnight, considered each voxel as an individual, collidable point in space rather than a collection of points. These latter are what would be considered &quot;true&quot; voxels. Because they are much simpler, you can have many more of them in your world, and you can thus make them smaller, which is generally favourable.)&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space, using vectors. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Lastly, in order to have material &quot;flows&quot; (as Vigil hinted at in his comment on sand), you will need to look into fluid dynamics and cellular automata. These were used by the author of Dwarf Fortress, Tarn Adams, in what is essentially also a voxel world (albeit the voxels are much larger in this case, comparable to Dungeon Keeper, the principle remains the same).&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38275" PostHistoryTypeId="5" PostId="16563" RevisionGUID="dd1a0251-b05e-43db-8bee-e894eca51e03" CreationDate="2011-08-29T16:18:58.943" UserId="4306" Comment="deleted 26 characters in body" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **code and algorithms.** preferably based in C or C#&#xD;&#xA; 2. **explain it.** I am a beginner with algorithms but I'm very familiar with object oriented programming&#xD;&#xA; 4. **diagrams/illustrations.** No, not screenshots of other engines.&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;*Edit.* No, I'm not trying to make a minecraft clone.&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38276" PostHistoryTypeId="5" PostId="16126" RevisionGUID="d6a78749-a971-4eec-848a-b90e5573ace8" CreationDate="2011-08-29T16:23:45.143" UserId="4306" Comment="deleted 4 characters in body" Text="Personally, I think that it's really annoying when I go to a friend's FB profile or my profile and I see all is this: &lt;br /&gt;&#xD;&#xA;&#xD;&#xA;![Spamage!][1]&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;Nevertheless, I think that it is a huge marketing tool that can make your game grow extremely fast. I've seen few games on the iOS that use FB and twitter in their game. One game I've seen that does it the best is [Haypi Kingdom][2], it only posts to your wall when you level up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/tuhd0.png&#xD;&#xA;  [2]: http://haypi.com/" />
  <row Id="38277" PostHistoryTypeId="5" PostId="16564" RevisionGUID="bac55e71-0d13-474d-82a8-509371398137" CreationDate="2011-08-29T16:24:23.063" UserId="5473" Comment="deleted 169 characters in body" Text="**Answer to your main question first**&#xD;&#xA;&#xD;&#xA;To generate a voxel terrain, a common method is to generate a heightmap using Perlin noise. A heightmap is basically a monochrome image representing different heights by the darkness or lightness of its pixels.&#xD;&#xA;&#xD;&#xA;You'll look at individual pixels in this heightmap to create &quot;stacks&quot; of voxels up to different heights (z-axis) in different (x,y) locations, according to the brightness of that pixel in the heightmap image. Because a Perlin noise image is smooth (no sharp edges of light against dark), you will have smoothly rolling terrain as a result.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**What you'll need to construct your own voxel-based game** &#xD;&#xA;&#xD;&#xA;I include this section because the voxel road is not an easy one, at least not at present. Lately, a lot of research is once again being put into voxel engines by the big players, toward rendering and physics applications.&#xD;&#xA;&#xD;&#xA;**Simplicity** may be a problem, because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there are going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, your &quot;generation of a voxel terrain&quot; requires a context in which to work, since voxel engines aren't exactly widespread. Lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;You use cubic meshes as the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules.&#xD;&#xA;&#xD;&#xA;(Disclaimer for the above -- in fact, your voxels do not need to be meshes. Many modern implementations, such as Dungeon Keeper and Minecraft, use cubic meshes for voxels. Certain older implementations, such as Comanche, or the 1990s remake of Lords of Midnight, considered each voxel as an individual, collidable point in space rather than a collection of points. These latter are what would be considered &quot;true&quot; voxels. Because they are much simpler, you can have many more of them in your world, and you can thus make them smaller, which is generally favourable.)&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space, using vectors. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Lastly, in order to have material &quot;flows&quot; (as Vigil hinted at in his comment on sand), you will need to look into fluid dynamics and cellular automata. These were used by the author of Dwarf Fortress, Tarn Adams, in what is essentially also a voxel world (albeit the voxels are much larger in this case, comparable to Dungeon Keeper, the principle remains the same).&#xD;&#xA;&#xD;&#xA;Re your request for **images**, I assume you mean screenshots of voxel engines? If so, type in &quot;voxels&quot; in google image search. If you mean **diagrams** assisting the explanation, do make note of that in your question." />
  <row Id="38278" PostHistoryTypeId="5" PostId="16564" RevisionGUID="941da19f-35f8-44d7-82e7-7a1f45848891" CreationDate="2011-08-29T16:31:38.753" UserId="5473" Comment="deleted 169 characters in body" Text="**Answer to your main question first**&#xD;&#xA;&#xD;&#xA;To generate a voxel terrain, a common method is to generate a heightmap using Perlin noise. A heightmap is basically a monochrome image representing different heights by the darkness or lightness of its pixels.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;You'll look at individual pixels in this heightmap to create &quot;stacks&quot; of voxels up to different heights (z-axis) in different (x,y) locations, according to the brightness of that pixel in the heightmap image. Because a Perlin noise image is smooth (no sharp edges of light against dark), you will have smoothly rolling terrain as a result.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**What you'll need to construct your own voxel-based game** &#xD;&#xA;&#xD;&#xA;I include this section because the voxel road is not an easy one, at least not at present. Lately, a lot of research is once again being put into voxel engines by the big players, toward rendering and physics applications.&#xD;&#xA;&#xD;&#xA;**Simplicity** may be a problem, because dynamically constructing a world out of raw voxels is a procedural approach to world construction and this **not inherently simple**. So sorry, there are going to be a few technical terms here. Writing a voxel engine is a pretty serious undertaking and requires knowledge across multiple areas of game engine development, particularly in terms of spatial concepts, and this means understanding 3D vector math, matrices and basic calculus to some reasonable level.&#xD;&#xA;&#xD;&#xA;Having said that, your &quot;generation of a voxel terrain&quot; requires a context in which to work, since voxel engines aren't exactly widespread. Lets proceed to a basic description of how a voxel engine works.&#xD;&#xA;&#xD;&#xA;Voxels are the basic building blocks of your world. Their positions are defined by an integer-indexed 3D grid (array) rather than a continuous floating-point space (as used in vector-based 3D games). These will be the &quot;atoms&quot; of your world. They could be 3 feet high as in games like Minecraft, or they could be smaller than your virtual character's eye could actually see, unless clustered together in large numbers -- a bit more like molecules. There are two kinds:&#xD;&#xA;&#xD;&#xA;- Cubic mesh based voxels ([example][2]) -- these are a newer sort, used for simplicity and easily usable in conjunction with modern graphics tech. Used in games like MineCrat and Dungeon Keeper.&#xD;&#xA;- Point voxels ([example][3], [example][4]) -- the original voxel. Each is an individual, collidable point in space, although it may be surrounded by a spherical bounding volume. They are simpler, so you can have many more of them in your world, and you can thus make them smaller, which is generally favourable. Two games that used these were Comanche and the 1990s remake of Lords of Midnight.&#xD;&#xA;&#xD;&#xA;Either way, your approach to manipulating voxels in your world is much the same, as follows.&#xD;&#xA;&#xD;&#xA;To construct and move objects in your world, you will need the mathematical tools mentioned above. For example, to create a wall: Construct a box of the appropriate dimensions in 3D space, using vectors. Use matrix math to transform your box to the rotation and position you desire in your 3d world (in continuous vector space). For a voxel engine, the additional step is to now use a 3D point-in-polyhedron algorithm to determine which of your voxels fall inside that rotated space.&#xD;&#xA;&#xD;&#xA;Essentially, this is the way you would construct most objects in your world. Beyond that, you could write your own tools to &quot;model&quot; a character in the way you might in say, Maya or 3DS Max. But since you are modelling you character out of voxels instead of points, edges and faces, your methods will be substantially different. If you decided to then rotate these objects in your world, you would need to similarly use matrix transformations to do so.&#xD;&#xA;&#xD;&#xA;Destructible terrain is as simple as either removing one voxel at a time according to some method of your choosing, or using CSG (Constructive Solid Geometry) operations on large volumes of voxels to remove them according to some predefined volume; for example, if shooting a laser beam through a rock, you might use a cylindrical volume to subtract the voxels here the beam is shooting through the rock.&#xD;&#xA;&#xD;&#xA;Lastly, in order to have material &quot;flows&quot; (as Vigil hinted at in his comment on sand), you will need to look into fluid dynamics and cellular automata. These were used by the author of Dwarf Fortress, Tarn Adams, in what is essentially also a voxel world (albeit the voxels are much larger in this case, comparable to Dungeon Keeper, the principle remains the same).&#xD;&#xA;&#xD;&#xA;I won't be sitting and constructing special diagrams explaining all this. I think this description gives you enough to go ahead and research.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/XCvkZ.jpg&#xD;&#xA;  [2]: http://www.youtube.com/watch?v=jNqtwGc-NRE&amp;feature=related&#xD;&#xA;  [3]: http://www.youtube.com/watch?v=PwtKI_Cx6Dw&amp;feature=related&#xD;&#xA;  [4]: http://www.youtube.com/watch?v=TjmRPjnWJ5g" />
  <row Id="38280" PostHistoryTypeId="2" PostId="16569" RevisionGUID="95e4cd62-eb1e-472b-9545-cf5d85f9a30d" CreationDate="2011-08-29T17:24:19.067" UserId="7881" Text="The best way to generate interesting voxel terrain is with a Perlin noise density map. Rather than using a 2D Perlin noise map defining the height of a 3D world, use a 3D Perlin noise map. Weight the map so that the values closer to the bottom will be more likely solid, and the values closer to the top will definitely be air. This gives your world height, but also allows for overhangs and caves, similar to [Minecraft terrain][1], as this side-view of a slice of terrain shows:&#xD;&#xA;&#xD;&#xA;![World with overhangs][2]&#xD;&#xA;&#xD;&#xA;From here you can test for floating islands, or add cave systems using fractal noise:&#xD;&#xA;&#xD;&#xA;![World with cave system][3]&#xD;&#xA;&#xD;&#xA;The above pictures and cave system ideas are from [this excellent blog post][4]. You can learn all about Perlin noise [here][5], and there is some sample code to get you started [here][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1&#xD;&#xA;  [2]: http://i.stack.imgur.com/SqVOx.jpg&#xD;&#xA;  [3]: http://i.stack.imgur.com/R8iFU.jpg&#xD;&#xA;  [4]: http://accidentalnoise.sourceforge.net/minecraftworlds.html&#xD;&#xA;  [5]: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm&#xD;&#xA;  [6]: http://www.gutgames.com/post/Perlin-Noise.aspx" />
  <row Id="38281" PostHistoryTypeId="2" PostId="16570" RevisionGUID="86b67a68-c189-4acd-9116-472abb0438d3" CreationDate="2011-08-29T17:34:00.173" UserId="5925" Text="I know this is a common question, but I can't find an answer to it that isn't written using a huge game library sadly.&#xD;&#xA;&#xD;&#xA;I'm trying to write a scrollable tile system, which allows the user to move around it (from an arial perspective). I have this partially working, but it doesn't work as expected.&#xD;&#xA;&#xD;&#xA;Could anyone help me out with this please, or link to where I can find a tutorial which doesn't use a huge **java** library?&#xD;&#xA;&#xD;&#xA;Thanks" />
  <row Id="38282" PostHistoryTypeId="1" PostId="16570" RevisionGUID="86b67a68-c189-4acd-9116-472abb0438d3" CreationDate="2011-08-29T17:34:00.173" UserId="5925" Text="Scrolling tile system" />
  <row Id="38283" PostHistoryTypeId="3" PostId="16570" RevisionGUID="86b67a68-c189-4acd-9116-472abb0438d3" CreationDate="2011-08-29T17:34:00.173" UserId="5925" Text="&lt;java&gt;&lt;tiles&gt;" />
  <row Id="38284" PostHistoryTypeId="5" PostId="16570" RevisionGUID="fe614bd5-c793-453d-9a30-3f4cf9fd5dfe" CreationDate="2011-08-29T18:07:36.517" UserId="5925" Comment="added 201 characters in body" Text="I know this is a common question, but I can't find an answer to it that isn't written using a huge game library sadly.&#xD;&#xA;&#xD;&#xA;I'm trying to write a scrollable tile system, which allows the user to move around it (from an arial perspective). I have this partially working, but it doesn't work as expected.&#xD;&#xA;&#xD;&#xA;Could anyone help me out with this please, or link to where I can find a tutorial which doesn't use a huge **java** library?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:: http://thepb.in/private/L5elnMb3PU&#xD;&#xA;This is a concise example of the problem, you seem to move a lot faster when the player should be 'in the center' (Please ignore the loop for redrawing)" />
  <row Id="38286" PostHistoryTypeId="2" PostId="16571" RevisionGUID="215898ce-a315-4370-9bf7-90d39f56efc6" CreationDate="2011-08-29T18:24:07.300" UserId="159" Text="Are there any recommended blogs or whitepapers that talk about making the AI in an RPG game feel more real? (Specifically in turn based combat.)&#xD;&#xA;&#xD;&#xA;I know something must be out there, but I am only finding papers that talk about algorithms  behind the AI. I am looking more along the lines of &quot;this is what makes a computer opponent feel alive&quot;. Taking risks, going easy, retreating, etc...." />
  <row Id="38287" PostHistoryTypeId="1" PostId="16571" RevisionGUID="215898ce-a315-4370-9bf7-90d39f56efc6" CreationDate="2011-08-29T18:24:07.300" UserId="159" Text="What makes a computer opponent feel alive?" />
  <row Id="38288" PostHistoryTypeId="3" PostId="16571" RevisionGUID="215898ce-a315-4370-9bf7-90d39f56efc6" CreationDate="2011-08-29T18:24:07.300" UserId="159" Text="&lt;ai&gt;&lt;game-mechanics&gt;" />
  <row Id="38289" PostHistoryTypeId="2" PostId="16572" RevisionGUID="4b20ffb9-6907-49e6-a960-e0a15d8c7c48" CreationDate="2011-08-29T18:34:41.300" UserId="5473" Text="Okay. I'll give you a simple model of how this should work, rather than staring at your code.&#xD;&#xA;&#xD;&#xA;Let's say your screen res is 1024x768. Your tiles are 256x256 -- huge tiles, I know, but we're just working on the principles here. So your screen covers 4 tiles across and 3 down.&#xD;&#xA;&#xD;&#xA;When you first run your program, the tile you're currently focused should be at the top left of your screen (0,0). It stretches down to (256, 256) on your screen.There are two tiles directly below it, and 3 directly to the right. Lets assume you have no offset yet, then the tile at the top left of your screen will be tiles[0,0].&#xD;&#xA;&#xD;&#xA;Now, lets say your whole grid is 8x6 tiles. That means it's 2 screens across by 2 down. Starting from the top left of your map, you would be able to scroll right 7 times (8 minus 1), and down 5 times (6 minus 1), before the bottom-right-most square of the map would be at the top left of your screen -- with black (empty spaace) all around it -- the empty space around your array's bottom-right-most tile, AKA tiles[7,5]. Got it?&#xD;&#xA;&#xD;&#xA;If you scrolled up and left from here, what would happen? Well, if you coded things right, you'd see some black (empty) space, because now you're looking at regions outside your array, such as tiles[-1,-1] etc., which obviously don't exist because in Java there are no negatively-indexed arrays. (As long as you make sure you never try to reference the array with a negative number, it will behave as I've described -- you'll see black, gray or whatever your background colour is, if you scroll out-of-bounds).&#xD;&#xA;&#xD;&#xA;Okay. Now next up what you have is a Camera. From our human point of view, the map isn't moving, but the camera is. It has an x and a y value. And unlike the array, this camera can have any index you like, even (-42, -80). These are your offsets into (or outside of!) the map. So in my original example where you first run your program, that's when the camera offset is (0,0). If you set it to (0,1), you would now have shifted your *view* one cell down, meaning you could no longer see tiles[0,0], but instead you would have tiles[0,1] in the top left of your screen. If you shifted your camera up instead, by setting it to (0,-1), you would see tiles[0,0] at the middle left of your screen, and black &quot;void&quot; above tiles[0,0] (and it's 3 neighbours to the right which are also on your screen).&#xD;&#xA;&#xD;&#xA;So whats the relationship between Camera and background? Well, the camera's just a marker, really. It doesn't physically move, but since everything in life is relative, it may as well be. What's really moving are your background tiles. Whatever the camera's offset is, *you're moving the background by negative (minus one times) the value in x and y*. And that's the key. The camera simply notes the offsets, but it's the map tiles, as you draw them, that move accordingly. And as for the map array in memory? -- That stays exactly the same, of course.&#xD;&#xA;&#xD;&#xA;How do you prevent yourself getting an array out-of-bounds error, then, when you move your camera so far to the left that it goes off the map? Well, you just need to make sure that if your *minus one times camera offset* produces either a negative x or a negative y, that you DO NOT try to index into the array to determine what type of tile it is, and this what graphic to draw. In these cases, you simply *do nothing*." />
  <row Id="38290" PostHistoryTypeId="25" PostId="16556" RevisionGUID="b9bf2c39-45e9-4832-81b8-d69d12390a31" CreationDate="2011-08-29T18:38:02.433" Comment="http://twitter.com/#!/StackGameDev/status/108247048658239488" />
  <row Id="38291" PostHistoryTypeId="5" PostId="16572" RevisionGUID="b9c385bb-9b81-4c6c-8d94-8aeba677c11b" CreationDate="2011-08-29T18:40:53.320" UserId="5473" Comment="added 655 characters in body" Text="Okay. I'll give you a simple model of how this should work, rather than staring at your code.&#xD;&#xA;&#xD;&#xA;Let's say your screen res is 1024x768. Your tiles are 256x256 -- huge tiles, I know, but we're just working on the principles here. So your screen covers 4 tiles across and 3 down.&#xD;&#xA;&#xD;&#xA;When you first run your program, the tile you're currently focused should be at the top left of your screen (0,0). It stretches down to (256, 256) on your screen.There are two tiles directly below it, and 3 directly to the right, because of the size of your screen and your tiles. Lets assume you have no offset yet, then the tile at the top left of your screen will be tiles[0,0].&#xD;&#xA;&#xD;&#xA;Now, lets say your whole grid is 8x6 tiles. That means it's 2 screens across by 2 down. Starting from the top left of your map, you would be able to scroll right 7 times (8 minus 1), and down 5 times (6 minus 1), before the bottom-right-most square of the map would be at the top left of your screen -- with black (empty spaace) all around it -- the empty space around your array's bottom-right-most tile, AKA tiles[7,5]. Got it?&#xD;&#xA;&#xD;&#xA;If you scrolled up and left from here, what would happen? Well, if you coded things right, you'd see some black (empty) space, because now you're looking at regions outside your array, such as tiles[-1,-1] etc., which obviously don't exist because in Java there are no negatively-indexed arrays. (As long as you make sure you never try to reference the array with a negative number, it will behave as I've described -- you'll see black, gray or whatever your background colour is, if you scroll out-of-bounds).&#xD;&#xA;&#xD;&#xA;Okay. Now next up what you have is a Camera. From our human point of view, the map isn't moving, but the camera is. It has an x and a y value. And unlike the array, this camera can have any index you like, even (-42, -80). These are your offsets into (or outside of!) the map. So in my original example where you first run your program, that's when the camera offset is (0,0). If you set it to (0,1), you would now have shifted your *view* one cell down, meaning you could no longer see tiles[0,0], but instead you would have tiles[0,1] in the top left of your screen. If you shifted your camera up instead, by setting it to (0,-1), you would see tiles[0,0] at the middle left of your screen, and black &quot;void&quot; above tiles[0,0] (and it's 3 neighbours to the right which are also on your screen).&#xD;&#xA;&#xD;&#xA;So whats the relationship between Camera and background? Well, the Camera's just a marker, really. It doesn't physically move, but since everything in life is relative, it may as well be. What's really moving are your background tiles. *You move the background by negative (minus one times) each of the Camera's x and y values*. And that's the key. The camera simply notes the offsets and wraps the idea of a movable camera up in an easy-to-use-and-understand sort of way, but it's the map tiles, as you draw them, that *actually* move accordingly. And as for the map array in memory? -- That stays exactly the same, of course, since it's just a model of the world, and that doesn't change just because the view changes.&#xD;&#xA;&#xD;&#xA;How do you prevent yourself getting an array out-of-bounds error, then, when you move your camera so far to the left that it goes off the map? Well, you just need to make sure that if your *minus one times camera offset* produces either a negative x or a negative y, that you DO NOT try to index into the array to determine what type of tile it is, and this what graphic to draw. In these cases, you simply *do nothing*. Otherwise you will Java will throw an NPE.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This should get you started. There is other stuff, like offsetting the view by one-half of screen's width and one-half of a screen's height, so that whatever coordinate you push into the camera, instead of that tile being visible at the top left of the screen, it will be visible in the centre (for example; it could be anywhere you want it but centring is the most useful). And then the smooth scrolling we mentioned. But I think the above gives you enough to chew on for now?" />
  <row Id="38292" PostHistoryTypeId="5" PostId="16572" RevisionGUID="34f54005-2119-4b69-8206-1db4e8581f86" CreationDate="2011-08-29T18:49:49.757" UserId="5473" Comment="added 655 characters in body" Text="Okay. I'm going to go back to basics and give you a simple model of how this should work, rather than staring at your code.&#xD;&#xA;&#xD;&#xA;Let's say your screen res is 1024x768. Your tiles are 256x256 -- huge tiles, I know, but we're just working on the principles here. So your screen covers 4 tiles across and 3 down.&#xD;&#xA;&#xD;&#xA;When you first run your program, the tile you're currently focused should be at the top left of your screen (0,0). It stretches down to (256, 256) on your screen.There are two tiles directly below it, and 3 directly to the right, because of the size of your screen and your tiles. Lets assume you have no offset yet, then the tile at the top left of your screen will be tiles[0,0].&#xD;&#xA;&#xD;&#xA;Now, lets say your whole grid is 8x6 tiles. That means it's 2 screens across by 2 down. Starting from the top left of your map, you would be able to scroll right 7 times (8 minus 1), and down 5 times (6 minus 1), before the bottom-right-most square of the map would be at the top left of your screen -- with black (empty spaace) all around it -- the empty space around your array's bottom-right-most tile, AKA tiles[7,5]. Got it?&#xD;&#xA;&#xD;&#xA;If you scrolled up and left from here, what would happen? Well, if you coded things right, you'd see some black (empty) space, because now you're looking at regions outside your array, such as tiles[-1,-1] etc., which obviously don't exist because in Java there are no negatively-indexed arrays. (As long as you make sure you never try to reference the array with a negative number, it will behave as I've described -- you'll see black, gray or whatever your background colour is, if you scroll out-of-bounds).&#xD;&#xA;&#xD;&#xA;Okay. Now next up what you have is a Camera. From our human point of view, the map isn't moving, but the camera is. It has an x and a y value. And unlike the array, this camera can have any index you like, even (-42, -80). These are your offsets into (or outside of!) the map. So in my original example where you first run your program, that's when the camera offset is (0,0). If you set it to (0,1), you would now have shifted your *view* one cell down, meaning you could no longer see tiles[0,0], but instead you would have tiles[0,1] in the top left of your screen. If you shifted your camera up instead, by setting it to (0,-1), you would see tiles[0,0] at the middle left of your screen, and black &quot;void&quot; above tiles[0,0] (and it's 3 neighbours to the right which are also on your screen).&#xD;&#xA;&#xD;&#xA;So whats the relationship between Camera and background? Well, the Camera's just a marker, really. It doesn't physically move, but since everything in life is relative, it may as well be. What's really moving are your background tiles. *You move the background by negative (minus one times) each of the Camera's x and y values*. And that's the key. The camera simply notes the offsets and wraps the idea of a movable camera up in an easy-to-use-and-understand sort of way, but it's the map tiles, as you draw them, that *actually* move accordingly. And as for the map array in memory? -- That stays exactly the same, of course, since it's just a model of the world, and that doesn't change just because the view changes.&#xD;&#xA;&#xD;&#xA;How do you prevent yourself getting an array out-of-bounds error, then, when you move your camera so far to the left that it goes off the map? Well, you just need to make sure that if your *minus one times camera offset* produces either a negative x or a negative y, that you DO NOT try to index into the array to determine what type of tile it is, and this what graphic to draw. In these cases, you simply *do nothing*. Otherwise you will Java will throw an NPE.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This should get you started. There is other stuff, like offsetting the view by one-half of screen's width and one-half of a screen's height, so that whatever coordinate you push into the camera, instead of that tile being visible at the top left of the screen, it will be visible in the centre (for example; it could be anywhere you want it but centring is the most useful). And then the smooth scrolling we mentioned. But I think the above gives you enough to chew on for now?&#xD;&#xA;&#xD;&#xA;One last thing. Although I mention pixel sizes in this example, for now they just aren't important. What's important is only your tile offsets. Again, you should not be thinking in terms of pixels right now, that will come later when you look at smooth scrolling. The only place in your code where pixels should come in is literally where you draw your tiles on screen each render update, something like&#xD;&#xA;&#xD;&#xA;    for (y = camera.y; y &lt;  camera.y + screenHeightInTiles; y++)&#xD;&#xA;    {&#xD;&#xA;       for (x = camera.x; x &lt;  camera.x + screenWidthInTiles; x++)&#xD;&#xA;       {&#xD;&#xA;           drawTileAt(x*tileWidth, y*tileWidth); //&lt;-- this is the only place you're working with pixels, i.e. tileHeight and tileWidth (if they're not exactly the same)&#xD;&#xA;       }&#xD;&#xA;    }" />
  <row Id="38293" PostHistoryTypeId="2" PostId="16573" RevisionGUID="726f3449-1d39-4de0-bb6e-b0d43ad70173" CreationDate="2011-08-29T19:21:27.383" UserId="3175" Text="Don't always make it respond to your action X with action Y.  As you evaluate each potential action add a random fudge factor so the AI doesn't always pick the same option but it chooses something reasonable.&#xD;&#xA;&#xD;&#xA;Evaluate if an attack has a reasonable chance of succeeding or at least doing meaningful damage.  Too many games simply have scripted attack routes that a human can learn and use to ambush the AI over and over." />
  <row Id="38294" PostHistoryTypeId="5" PostId="16489" RevisionGUID="c0f99b79-6e18-43c7-96dd-9df24b414f56" CreationDate="2011-08-29T19:21:32.367" UserId="4568" Comment="added 200 characters in body; edited tags" Text="Are there any industry respected certifications for game or graphics developers?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;I am thinking of professional certifications similar to Microsoft Certified Professional Developer (MCPD) or  Cisco Certified Network Associate (CCNA), but specific to game development.&#xD;&#xA;" />
  <row Id="38295" PostHistoryTypeId="6" PostId="16489" RevisionGUID="c0f99b79-6e18-43c7-96dd-9df24b414f56" CreationDate="2011-08-29T19:21:32.367" UserId="4568" Comment="added 200 characters in body; edited tags" Text="&lt;education&gt;&lt;jobs&gt;" />
  <row Id="38296" PostHistoryTypeId="2" PostId="16574" RevisionGUID="baacaf11-6942-4fd0-b47e-9f6b8fc0e099" CreationDate="2011-08-29T19:41:06.977" UserId="259" Text="Mistakes. Nothing is worse than an AI opponent who can headshot you from fifteen miles away, or always picks the perfect winning strategy. It breaks the immersion and makes it apparent that you're playing a routine. Mistakes can make the AI seem more human. &#xD;&#xA;&#xD;&#xA;Many FPS games force the AI to miss with its first few shots, warning the player that the AI is there, before going for the kill. &#xD;&#xA;&#xD;&#xA;Strategy games could sometimes select a suboptimial strategy, or when evaluating threats may purposefully ignore some proportion of them.&#xD;&#xA;&#xD;&#xA;A racing game I worked on calculated when the player was nearby, and then rolled a dice to make the AI cars in front of him understeer through the corner or blow a tyre. It was praised for its realistic AI.&#xD;&#xA;&#xD;&#xA;However creating imperfect AI is still something of a challenge. You have to make convincing mistakes, at a convincing rate, rather than perform perfect action after perfect action until making a ridiculous blunder. That can be even worse than playing just a perfect AI. For instance, the programmer working on the racing AI above spent a lot of time on modelling how a car understeers, and what inputs the AI needs to make to cause a convincing understeer. As always, playtesting is vital.&#xD;&#xA;&#xD;&#xA;Here's a good article on what goes into producing these kind of mistakes:&#xD;&#xA;http://www.gamasutra.com/view/feature/3947/intelligent_mistakes_how_to_.php&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38297" PostHistoryTypeId="2" PostId="16575" RevisionGUID="d10917d7-cd5a-4897-9e1c-6768800a314e" CreationDate="2011-08-29T20:27:08.807" UserId="3794" Text="I do recommend this google IO talk it is about google doodle pacman. At cca 18:00 they start to speak about personality of ghosts in pacman. It is really stuning how simply you can put personalities into the simple path finding.&#xD;&#xA;&#xD;&#xA;[Google I/O 2011: The Secrets of Google Pac-Man: A Game Show][1]&#xD;&#xA;&#xD;&#xA;Whole video is worth watching. I really recommend it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.youtube.com/watch?v=ttavBa4giPc&amp;feature=player_detailpage#t=1075s" />
  <row Id="38298" PostHistoryTypeId="2" PostId="16576" RevisionGUID="de66c003-540d-4cff-a952-8ad0cb954dc3" CreationDate="2011-08-29T20:35:14.470" UserId="9557" Text="view = Matrix.CreateLookAt(cameraPosition, cameraPosition + cameraForward, Vector3.Up);&#xD;&#xA;&#xD;&#xA;that second argument for the createlookat() is a camera target.&#xD;&#xA;&#xD;&#xA; im cyurrently working on my first 3d rts also and the way i have it set up&#xD;&#xA;is my camera controls move a vector3 &quot;target&quot; which is set as my cameras target&#xD;&#xA;and the in my update() after controls:&#xD;&#xA; &#xD;&#xA;&quot;cameraposition = new vectors3(target.x,target.y + zoom, target.z-zoom)&quot;&#xD;&#xA;&#xD;&#xA;where zoom is a variable that changes with the scroll wheel&#xD;&#xA;&#xD;&#xA;and if you want to add in camera rotation you just apply some trig to the x/z&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;if (keyboardstatecurrent.IsKeyDown(Keys.Up))&#xD;&#xA;                target = new Vector3(target.X + (float)(camSpeed * Math.Cos(CamRotation)), target.Y, target.Z + (float)(camSpeed * Math.Sin(CamRotation)));&#xD;&#xA;            &#xD;&#xA;if (keyboardstatecurrent.IsKeyDown(Keys.Down))&#xD;&#xA;                target = new Vector3(target.X - (float)(camSpeed * Math.Cos(CamRotation)), target.Y, target.Z - (float)(camSpeed * Math.Sin(CamRotation)));&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA; if (keyboardstatecurrent.IsKeyDown(Keys.Left))&#xD;&#xA;                CamRotation = CamRotation + 0.1;&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;if (keyboardstatecurrent.IsKeyDown(Keys.Right))&#xD;&#xA;                CamRotation = CamRotation - 0.1;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Camrotation is initialized as =0 and is in radians.&#xD;&#xA;&#xD;&#xA;hope this helps&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            cameraposition = new Vector3(target.X - (float)(Zoom * Math.Cos(CamRotation)), target.Y + Zoom, target.Z - (float)(Zoom * Math.Sin(CamRotation)));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38299" PostHistoryTypeId="2" PostId="16577" RevisionGUID="debbddf1-3834-4b8a-beb6-e827f9cbc2ae" CreationDate="2011-08-29T21:18:20.067" UserId="5044" Text="I'm currently looking at the options regarding how to do a strategic map for a web application.&#xD;&#xA;&#xD;&#xA;My goals here are :&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;a synthethic view of what's happening in a stelar system &lt;/li&gt;&#xD;&#xA;&lt;li&gt;the ability to management movements (through displaying trajectories of some ships and planets/star(s))&lt;/li&gt;&#xD;&#xA;&lt;li&gt;the development should'nt take years, since we're few on the project&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;The usability challenges at hands are IMHO:&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;scale issues: both in terms of ships/planets/stars volumes and distance. In the end, I guess markers/symbols are the way to go&lt;/li&gt;&#xD;&#xA;&lt;li&gt;density of information: there could be much there&lt;/li&gt;&#xD;&#xA;&lt;li&gt;frequent updates of the map needed (every 30 seconds or so, would be better if partial reload/refresh possible)&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;Options I'm aware of:&#xD;&#xA;&lt;p&gt;&lt;strong&gt;use of a table, through the background image and cells images&lt;/strong&gt;&lt;/p&gt;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt; + easy to do on my own&lt;/li&gt;&#xD;&#xA;&lt;li&gt;+ partial refresh possible (ajax on a per cell basis)&lt;/li&gt;&#xD;&#xA;&lt;li&gt; - very low resolution =&gt; looks poor&lt;/li&gt;&lt;/ul&gt;&#xD;&#xA;&lt;p&gt;&lt;strong&gt;JavaScript map drawing&lt;/strong&gt;&lt;/p&gt;&#xD;&#xA;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt; + looks very powerful&lt;/li&gt;&#xD;&#xA;&lt;li&gt; - big work needed (I haven't found pre existing plugin/library/framework doing this, whereas I'm not a JavaScript guru)&lt;/li&gt;&#xD;&#xA;&lt;li&gt; - way to go unclear: canvas or dom manipulation?&lt;/li&gt;&lt;/ul&gt;&#xD;&#xA;&lt;p&gt;&lt;strong&gt;use of svg pictures&lt;/strong&gt;&lt;/p&gt;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;+ resolution amazing&lt;/li&gt;&#xD;&#xA;&lt;li&gt;+ http://raphaeljs.com/ to the rescue&lt;/li&gt;&#xD;&#xA;&lt;li&gt;- I don't know much about svg&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&lt;p&gt;&lt;strong&gt;CSS3&lt;/strong&gt;&lt;/p&gt;&#xD;&#xA;&lt;ul&gt;&#xD;&#xA;&lt;li&gt;I'm rather clueless about it, what about performance/cross browser support and the like...&lt;/li&gt;&#xD;&#xA;&lt;/ul&gt;&#xD;&#xA;&#xD;&#xA;As a side note, I don't want to bother too much for IE.&#xD;&#xA;&#xD;&#xA;Did I miss something obvious? What would you suggest?&#xD;&#xA;&#xD;&#xA;thanks in advance&#xD;&#xA;best&#xD;&#xA;&#xD;&#xA;BTW, a related topic but more focused on svg: http://gamedev.stackexchange.com/questions/4306/is-svg-a-viable-technology-choice-for-web-based-game" />
  <row Id="38300" PostHistoryTypeId="1" PostId="16577" RevisionGUID="debbddf1-3834-4b8a-beb6-e827f9cbc2ae" CreationDate="2011-08-29T21:18:20.067" UserId="5044" Text="Best way to do a strategic map for a 4X space game on a web page?" />
  <row Id="38301" PostHistoryTypeId="3" PostId="16577" RevisionGUID="debbddf1-3834-4b8a-beb6-e827f9cbc2ae" CreationDate="2011-08-29T21:18:20.067" UserId="5044" Text="&lt;performance&gt;&lt;web&gt;" />
  <row Id="38302" PostHistoryTypeId="5" PostId="15733" RevisionGUID="dd32608e-679b-4070-ac1e-eee1d703c4b5" CreationDate="2011-08-29T21:24:15.857" UserId="14" Comment="edited body" Text="The first question is where are you looking? If you are interested in a particular studio, outside of industry sites the best place to find jobs for the studios is on their own site.&#xD;&#xA;&#xD;&#xA;In my experience (from just looking around, speaking to people) the industry has no shortage of applicants. Because of that, there is no real need to expend extra resources paying a premium to get listed on various jobs sites. People interested in their companies will already be checking their website.&#xD;&#xA;&#xD;&#xA;Finally, the experience issue. The positions that you see advertised on these sites are generally *not* for entry-level positions.&#xD;&#xA;&#xD;&#xA; - Larger game companies (like the ones you listed) get tons of entry level resumes sent to them from a variety of people. There is little financial incentive to advertise that they are looking for entry level people. &#xD;&#xA;  - *Also, I've yet to meet a recruiter that wasn't ok with having my resume on file. It's generally understood that companies need fresh blood.*&#xD;&#xA;&#xD;&#xA; - What isn't always known, is if they have any place to fit the higher experience people (at their right pay grades and all) so it's beneficial to advertise it. Also, these people are generally harder to find, and might be otherwise employed.&#xD;&#xA;  - *These people are less likely to shoot resume's into the dark.*&#xD;&#xA;&#xD;&#xA;Of course, making a cool demo never hurts.&#xD;&#xA;&#xD;&#xA;For more information on applying for a job in the games industry, I turn to Sloperama: http://www.sloperama.com/advice/jobapp.htm" />
  <row Id="38303" PostHistoryTypeId="6" PostId="16306" RevisionGUID="07710c4e-53d9-4773-b369-4551e3edd41d" CreationDate="2011-08-29T21:30:10.920" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;java&gt;&lt;data-structure&gt;&lt;platform-games&gt;" />
  <row Id="38304" PostHistoryTypeId="6" PostId="15575" RevisionGUID="624d0dc7-cae9-4335-9066-e0c4e715056b" CreationDate="2011-08-29T21:31:17.750" UserId="14" Comment="edited tags" Text="&lt;2d&gt;&lt;java&gt;&lt;collision-detection&gt;&lt;sprites&gt;" />
  <row Id="38305" PostHistoryTypeId="25" PostId="16571" RevisionGUID="b8a947e8-a9b1-4ae2-95ad-feddb9a9397b" CreationDate="2011-08-29T21:38:03.043" Comment="http://twitter.com/#!/StackGameDev/status/108292350912102400" />
  <row Id="38307" PostHistoryTypeId="6" PostId="16577" RevisionGUID="8c0da4dd-dbc4-48d0-b387-0d62b225c5e1" CreationDate="2011-08-29T21:51:05.967" UserId="5044" Comment="edited tags" Text="&lt;maps&gt;&lt;performance&gt;&lt;web&gt;" />
  <row Id="38308" PostHistoryTypeId="5" PostId="16576" RevisionGUID="e06f2e9c-0b78-490b-ab3b-4e5254f9b699" CreationDate="2011-08-29T22:08:07.613" UserId="51" Comment="code formatting" Text="    view = Matrix.CreateLookAt(cameraPosition, cameraPosition + cameraForward, Vector3.Up);&#xD;&#xA;&#xD;&#xA;that second argument for the createlookat() is a camera target.&#xD;&#xA;&#xD;&#xA; im currently working on my first 3d rts also and the way i have it set up&#xD;&#xA;is my camera controls move a vector3 &quot;target&quot; which is set as my cameras target&#xD;&#xA;and the in my update() after controls:&#xD;&#xA; &#xD;&#xA;    &quot;cameraposition = new vectors3(target.x,target.y + zoom, target.z-zoom)&quot;&#xD;&#xA;&#xD;&#xA;where zoom is a variable that changes with the scroll wheel&#xD;&#xA;&#xD;&#xA;and if you want to add in camera rotation you just apply some trig to the x/z&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;    if (keyboardstatecurrent.IsKeyDown(Keys.Up))&#xD;&#xA;        target = new Vector3(target.X + (float)(camSpeed * Math.Cos(CamRotation)), target.Y, target.Z + (float)(camSpeed * Math.Sin(CamRotation)));&#xD;&#xA;                &#xD;&#xA;    if (keyboardstatecurrent.IsKeyDown(Keys.Down))&#xD;&#xA;        target = new Vector3(target.X - (float)(camSpeed * Math.Cos(CamRotation)), target.Y, target.Z - (float)(camSpeed * Math.Sin(CamRotation)));&#xD;&#xA;               &#xD;&#xA;    if (keyboardstatecurrent.IsKeyDown(Keys.Left))&#xD;&#xA;        CamRotation = CamRotation + 0.1;&#xD;&#xA;    &#xD;&#xA;    if (keyboardstatecurrent.IsKeyDown(Keys.Right))&#xD;&#xA;        CamRotation = CamRotation - 0.1;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Camrotation is initialized as 0 and is in radians.&#xD;&#xA;&#xD;&#xA;            cameraposition = new Vector3(target.X - (float)(Zoom * Math.Cos(CamRotation)), target.Y + Zoom, target.Z - (float)(Zoom * Math.Sin(CamRotation)));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38309" PostHistoryTypeId="2" PostId="16578" RevisionGUID="3090147d-2b66-485c-ab35-abf4fb57c182" CreationDate="2011-08-29T22:38:59.720" UserId="8781" Text="One thing I see suggested a lot is to have the AI communicate its &quot;thoughts&quot; to the player in some way. This is often done in first-person shooters by having the enemies (unrealistically) shout out their plans to the player (i.e. &quot;flank him!&quot;, &quot;he's over there!&quot;, etc.).&#xD;&#xA;&#xD;&#xA;At the end of the day, players know they're playing against an AI, so anything smart that the AI does without first informing the player can just be dismissed as cheating." />
  <row Id="38310" PostHistoryTypeId="2" PostId="16579" RevisionGUID="03d9fac5-934f-4011-af77-192aec9c4a9f" CreationDate="2011-08-29T23:41:55.187" UserId="6388" Text="Bachelor of Games Graduate here, to give some obvious insights :P&#xD;&#xA;&#xD;&#xA;Here's a list of some simple concepts that make you're opponent more vivid:&#xD;&#xA;&#xD;&#xA;1. Intent  &#xD;&#xA;Give the player some way of divining the 'intent' of the AI. This could be as simple as having them yell out &quot;Quantity over Quality&quot; before attempting an accurate headshot attack, &quot;Flank him&quot; while attempting to get behind you, or &quot;Take the leader, nothing else matters&quot; before attacking the protagonist. You could also get more complex, for example, have them give some sign language to their teammates, then change the behaviour of those teammates.&#xD;&#xA;&#xD;&#xA;2. Desperation  &#xD;&#xA;As the opponent gets closer to death, you can give them a sense of desperation. Change their tactics at certain health milestones. Make their later stages more panicky, with greater risk taking on their part (going for the hail mary, rather than slow chipping). Visually communicate this as well (more exaggerated animations, pulsing veins, etc).&#xD;&#xA;&#xD;&#xA;3. Go out with a Bang.  &#xD;&#xA;Give them a death that makes the fight with them something worth repeating. Grunts keel over animatedly. Bosses soliloquise. If it's a proud character, make them refuse to give you the kill, and deal the last of their damage to themselves. You get the drift." />
  <row Id="38311" PostHistoryTypeId="2" PostId="16580" RevisionGUID="f04c997c-0701-4a6d-aa04-d238d17441ce" CreationDate="2011-08-29T23:45:26.600" UserId="744" Text="&lt;a href=&quot;http://usa.autodesk.com/adsk/servlet/item?siteID=123112&amp;id=17208050&quot;&gt;Autodesk offers professional certifications in Maya and 3D Studio Max&lt;/a&gt;, if by &quot;graphics development&quot; you mean 3D modeling and not graphics programming. But this says little about artistic skill.&#xD;&#xA;&#xD;&#xA;Programming certificates are a joke, inside or outside game development.&#xD;&#xA;&#xD;&#xA;Stuff like CCNA is useful if you're a large company with a giant Cisco network and need to hire five mediocre guys to keep it working but don't really want to expend a lot of resources hiring. It works because an expert at replugging cables doesn't really give you much benefit over a novice at replugging cables.&#xD;&#xA;&#xD;&#xA;There is no equivalent scenario for game development, nor for programming. Good programmers are dozens of times more valuable than mediocre programmers. Good designers are infinitely more valuable than mediocre ones." />
  <row Id="38312" PostHistoryTypeId="2" PostId="16581" RevisionGUID="9be8bef9-fb4d-42bd-b1a8-c493a4a53f3d" CreationDate="2011-08-30T00:12:16.327" UserId="2897" Text="I don't know about any such blogs, but since a tactical turn-based RPGs is my second favorite genre right after roguelikes, I'll write you a blog post. From my experience, it was not a difficulty of tactical AI in a RPG or RTS which often put me off, but its opposite: AI's complete short-sightedness and absence of team decisions. Human will never play like this.&#xD;&#xA;&#xD;&#xA;Back then, when I still viewed JRPGs as a pinnacle of game design, I once tried to make a &quot;typical japanese TRPG&quot; with heavy focus on tactical turn-based combat like Final Fantasy Tactics. As always, it became just a tech demo for pathfinding and AI, so I'll share my thoughts on the subject. &#xD;&#xA;&#xD;&#xA;Most of these TRPGs don't bother with AI much. Player's fun out there comes not from a complex tactical or strategical challenge, but from general farming and abusing AI in a funny way. So it doesn't matter much that their AIs do things no human would ever do. Usually it's sufficient to have a stupid AI and balance it out with game design in way that it never needs to see more than one move in advance and only use best short-term moves. Of course it never feels real, but who cares? This just feels wrong, I want to believe it is possible to create fun based on a battling complex AI actions instead of farming and steamrolling. Unnecessary maybe, and time-consuming as well, but possible.&#xD;&#xA;&#xD;&#xA;Remembering original Final Fantasy Tactics and its hardcore mod FFT 1.3, I set the following goals for human-like and fun to play AI:&#xD;&#xA;&#xD;&#xA;  - AI must create a challenge, but a fun challenge and not a &quot;human full search&quot; challenge. This fun challenge should be often expected by player via overall context of a current mission. Usually thats where scripts come into play creating a one trick pony AI.&#xD;&#xA;  - AI should be clever, but not deep Minimax clever. Different types of AI should have different flaws, just like different human personalities would. It's a rare thing to encounter in games, Advance Wars had scripted personalities for generals, for example, but units can have them too.&#xD;&#xA;  - AI must avoid looking dumb when it is not intended. Obscene stupidity completely ruins any illusion of intelligence, always winning strategies do so as well. And loopholes created by careless scripting, those are the worst.&#xD;&#xA;&#xD;&#xA;I thought that I will tackle #1 with emergent behaviours, #2 with different personalities and human-like &quot;semi-random&quot; strategy choice, #3 with keeping hard-coding to a minimum and a careful testing. &#xD;&#xA;&#xD;&#xA;So what are these behaviours I'm what talking about, is it a scripted sequence of abilities to use? A top ability from a weighted list? Nope, what I had in mind was a combination of a *desired intelligence*, *personality type* and a *role* derived from currently available abilities and weapons. You can describe this combination as a &quot;stupid berserking damage dealer&quot; or &quot;smart defensive healer&quot;. So AI specializations, like classes or professions, e.g. an Archer AI which uses bow to shoot arrows with some set of predefined generic archer ability combos like Take Aim or Arrow Shower, become logically emergent instead of hard-coded. &#xD;&#xA;&#xD;&#xA;Basically, it is important to detect and operate on these roles: damage dealer, damage soaker, disabler, skirmisher, healer, buffer/debuffer, area of effect'er; usually, one character will perform at least two of these roles.&#xD;&#xA;&#xD;&#xA;To make a tactical fun out of this we want for behaviours to handle several cases solidly:&#xD;&#xA;&#xD;&#xA;*Simplest case.* A lot of weak goblins ambush our heroes. Perceived threat is obvious, goblins will try to overwhelm player with each goblin having a stupid berserk personality with some primitive melee abilities, perceived weakness is also obvious, like baiting goblins to a single armored and fire-resistant character, then casting a series of fire-based AoE spells in that general direction. Find a damage soaker, find an AoE'er, specialize the damage soaker for AoE'er damage type, send the damage soaker to the goblin mass, cast a damaging AoE spell when goblins group around.&#xD;&#xA;&#xD;&#xA;*Usual case to test out simple team interactions.* Player encounters a knight, an archer, a mage and a cleric. Perceived threat is now more complex, various interactions become available. YOu can already see possible roles and its combinations. Cleric will buff and heal, mage will dish out complex but high-damaging magic things, knight will either charge someone or defend a mage, archer will help knight by sniping those who try to run away from him or making his defence strategy more comple, this will depend on knight's choice. Personalities for enemies may be decided randomly turning the same encounter into unique experience. Player will have to decide what is the best strategy with units he currently has, and if AI would try to do the same on the other side of the screen, it would be interesting. &#xD;&#xA; &#xD;&#xA;*Complex case to test out team interactions and strategic planning.* There is a battle where you confront a gang of four assasins (clever careful damage dealer+skirmisher). Few in numbers, with menacing appearance, their perceived threat lies in skillful and deadly attack, and perceived weakness is that it's easy to reduce overall strength with just a single assasin killed. So naturally they're clever, they use abilities that work well with each other and can focus fire player's most dangerous characters; seriously injured ones retreat, heal and buff themselves to rejoin the battle. Obviously, player will try to nuke one of them first, and assasins will have to soft-counter this easy strategy, so it will be a less dominant. &#xD;&#xA;&#xD;&#xA;*Hard case for lots of strategy.* There are several squads of enemies with each squad leader deciding best local tactical moves, and then a best global strategic decision is selected to benefit all squads.&#xD;&#xA;&#xD;&#xA;*Impossible case.* Add a general to decide a strategy, and have squad leaders implement it to the best of the squads abilities.&#xD;&#xA;&#xD;&#xA;It's a lot of letters already, so long story short, implementation was a mess and I never got past a &quot;hard case&quot;, but even then this approach to a fun tactics felt doable. I started with FSMs but had to abandon that approach quickly, it became an entangled mess of states and transitions impossible to debug. After a while I settled with semi-autonomous ability perception based characters as in &quot;sense-think-act&quot; paradigm with behaviour trees for possible individual actions, a global strategy affecting possible team actions based on possible individual actions, also a bastardized version of something like N-Gram statistical prediction was tossed in. &#xD;&#xA;&#xD;&#xA;**How does it worked?** Surprisingly well, AI even read my mind several times, but I grew tired and abandoned it since there were more than enough convincing flaws:&#xD;&#xA;&#xD;&#xA;  - The biggest flaw was that sometimes the entire AI operation was just weird and chaotic, even though I punished quick change of strategies. Probably either strategy logic or wrong personalities were a culprit, but I never found out. Yep, code architecture was horrible.&#xD;&#xA;  - Fine-tuning desired scenario by a careful selection of available abilities and personalities is tedious. &#xD;&#xA;  - Ability tagging for roles should be done very careful, or some wacky combos would appear.&#xD;&#xA;  - Same for personality tagging, but instead of wacky combos you would see careful casters buffing for frontal assault.&#xD;&#xA;  - It was hard to decide on a &quot;cleverness&quot; level for a given ability.&#xD;&#xA;  - Some seemingly stupid decions which were required for a level-design like &quot;hold this castle wall no matter what&quot; had to be implemented in a hackish way. &#xD;&#xA;  - Planning for units to perform a time-based attack was also a hack. &#xD;&#xA;&#xD;&#xA;I guess my approach was mediocre at best, if not outright bad, and AI was buggy and pain in the ass to develop further, but even then I had some really fun time playing against it, almost as if playing with a distracted kid, which is still better than Tactics Ogre :)" />
  <row Id="38313" PostHistoryTypeId="25" PostId="16529" RevisionGUID="b2dc8ea0-4510-48c9-8463-a3b183b4e57a" CreationDate="2011-08-30T00:38:04.730" Comment="http://twitter.com/#!/StackGameDev/status/108337657356095490" />
  <row Id="38314" PostHistoryTypeId="2" PostId="16582" RevisionGUID="fc5e8285-e9b9-460d-8a24-8b0223673a89" CreationDate="2011-08-30T01:29:55.223" UserId="7728" Text="Others have talked about AI, logic, planning, and the importance of making mistakes.  And all of these are good and useful in the development of AI.&#xD;&#xA;&#xD;&#xA;But the question was about what makes a computer opponent feel alive, and that isn't achievable through AI.  It just isn't.  Players don't judge a character in a game based upon their strategic level choices;  they judge it based on much smaller things.&#xD;&#xA;&#xD;&#xA;To make a computer opponent feel alive, what you need is a comprehensive set of high-quality animations and sounds (vocals, especially) for the opponent.  The player can't see the AI.  He can't hear it, he can't experience it, he can't know what the opponent is thinking.  The appearance of &quot;this character is a living entity&quot; is presented to the player entirely through the animations playing on the character, and the sounds being produced by the character (which again, will mostly be vocals).&#xD;&#xA;&#xD;&#xA;It's important for the character to react to stimuli around him;  to look at things nearby, to touch objects nearby (when appropriate to do so), to appear startled when surprised, and to show other emotions when appropriate.&#xD;&#xA;&#xD;&#xA;When talking about these things, it's important to minimise repeats.  If the character uses the same &quot;attack&quot; animation every time he attacks, he's never going to feel alive.  If he plays a single looping &quot;idle&quot; animation when he's not doing anything else, he's not going to feel alive.  If he says the same voice quip twice (especially consecutively), that breaks the illusion that the character is alive.&#xD;&#xA;&#xD;&#xA;And that's pretty much it.  If the opponent that you're trying to make seem alive is physically present in your game, then your success at making them seem alive will mostly be determined by the graphics and sound shown to the player.  &#xD;&#xA;&#xD;&#xA;If the opponent that you're trying to make seem &quot;alive&quot; isn't actually present in the game, as is the case in Chess and StarCraft, then feel free to disregard this reply;  your best bet is to follow the AI-focused replies." />
  <row Id="38315" PostHistoryTypeId="2" PostId="16583" RevisionGUID="f0df019d-fb56-4e69-b770-3c15430f4aed" CreationDate="2011-08-30T01:36:24.330" UserId="9547" Text="Im new to making minecraft mods I'm wondering what do to get started&#xD;&#xA;&#xD;&#xA;I already know java if your wondering" />
  <row Id="38316" PostHistoryTypeId="1" PostId="16583" RevisionGUID="f0df019d-fb56-4e69-b770-3c15430f4aed" CreationDate="2011-08-30T01:36:24.330" UserId="9547" Text="Minecraft mods how to get started making mods" />
  <row Id="38317" PostHistoryTypeId="3" PostId="16583" RevisionGUID="f0df019d-fb56-4e69-b770-3c15430f4aed" CreationDate="2011-08-30T01:36:24.330" UserId="9547" Text="&lt;minecraft&gt;&lt;mods&gt;" />
  <row Id="38318" PostHistoryTypeId="2" PostId="16584" RevisionGUID="faf805a7-424f-4215-92ea-5e84345e5a3d" CreationDate="2011-08-30T01:46:37.153" UserId="9040" Text="Download [MCP][1], aka the Minecraft Coder Pack. This is how all the mods were released, and I've used it a couple of times, albeit for simple mods.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://mcp.ocean-labs.de/index.php/Main_Page" />
  <row Id="38319" PostHistoryTypeId="5" PostId="16583" RevisionGUID="dff85489-8f45-4878-939b-90ac6a71e7a2" CreationDate="2011-08-30T01:56:15.437" UserId="51" Comment="deleted 25 characters in body; edited title" Text="I'm new to making minecraft mods and I'm wondering what I need to do to get started." />
  <row Id="38320" PostHistoryTypeId="4" PostId="16583" RevisionGUID="dff85489-8f45-4878-939b-90ac6a71e7a2" CreationDate="2011-08-30T01:56:15.437" UserId="51" Comment="deleted 25 characters in body; edited title" Text="How do you make Minecraft mods?" />
  <row Id="38321" PostHistoryTypeId="2" PostId="16585" RevisionGUID="64b42185-e087-4ccb-b35c-2c4daaf3b494" CreationDate="2011-08-30T03:25:41.640" UserId="8508" Text="Could someone please explain how it would be possible to create a sphere vertices, indices and texture coordinates? There is a surprising lack of documentation on how to do so and it is something that I am interested in learning. &#xD;&#xA;&#xD;&#xA;I have tried the obvious, googling, looking on gamedev.net, etc. However, nothing covers the generations of spherical points, indexing them, and texturing." />
  <row Id="38322" PostHistoryTypeId="1" PostId="16585" RevisionGUID="64b42185-e087-4ccb-b35c-2c4daaf3b494" CreationDate="2011-08-30T03:25:41.640" UserId="8508" Text="Generate a sphere" />
  <row Id="38323" PostHistoryTypeId="3" PostId="16585" RevisionGUID="64b42185-e087-4ccb-b35c-2c4daaf3b494" CreationDate="2011-08-30T03:25:41.640" UserId="8508" Text="&lt;rendering&gt;&lt;procedural-generation&gt;&lt;geometry&gt;&lt;generated&gt;" />
  <row Id="38324" PostHistoryTypeId="25" PostId="16583" RevisionGUID="b5b51f8e-f4c2-45c6-a45f-cb491c4bdfc3" CreationDate="2011-08-30T03:38:05.407" Comment="http://twitter.com/#!/StackGameDev/status/108382956938211330" />
  <row Id="38326" PostHistoryTypeId="2" PostId="16587" RevisionGUID="23c4d9ba-aed9-418a-9976-8149ad2127e6" CreationDate="2011-08-30T05:56:11.870" UserId="3818" Text="I'd like to create a very simple 2D board game for Android, it would be a concept/mockup so I can see how the game works out. &#xD;&#xA;&#xD;&#xA;Let's for the sake of this question that it's a clone of Othello - board game with score display, clickable game pieces/spots on a square grid and some animations.&#xD;&#xA;&#xD;&#xA;I have to choose 3 approaches:&#xD;&#xA;&#xD;&#xA;* do it all myself, draw the game on Canvas - I've done one game this way, and it took some time to code it. Then, that was a casual action game and the animations would be hard to implement.&#xD;&#xA;&#xD;&#xA;* implement it with Android widgets - I'd use RelativeLayout/TableLayout; the pieces will be ImageViews - this way I'd get the animations for free with Android tween animations. This would be the quickest of all three solutions timewise, but I might run into some problems that may be a deal breaker.&#xD;&#xA;&#xD;&#xA;* use a proper game engine. That will take time to learn how to use it, which I view as the biggest disadvantage as I do mostly business apps, not games. And I don't know which one to choose from.&#xD;&#xA;&#xD;&#xA;I really only want to throw this together in the shortest amount of time to see how it works, so I don't want to invest a lot of time to do it in the most &quot;correct&quot; way - that I'll do later if the concept works." />
  <row Id="38327" PostHistoryTypeId="1" PostId="16587" RevisionGUID="23c4d9ba-aed9-418a-9976-8149ad2127e6" CreationDate="2011-08-30T05:56:11.870" UserId="3818" Text="What would be the simplest way to create a 2D board game for Android?" />
  <row Id="38328" PostHistoryTypeId="3" PostId="16587" RevisionGUID="23c4d9ba-aed9-418a-9976-8149ad2127e6" CreationDate="2011-08-30T05:56:11.870" UserId="3818" Text="&lt;android&gt;" />
  <row Id="38329" PostHistoryTypeId="25" PostId="16585" RevisionGUID="47e63a4a-f296-4b81-87c1-81ec9a180ef2" CreationDate="2011-08-30T06:38:05.020" Comment="http://twitter.com/#!/StackGameDev/status/108428253823377408" />
  <row Id="38330" PostHistoryTypeId="2" PostId="16588" RevisionGUID="db795002-9b52-45f5-aa7e-9be58b7f3ee7" CreationDate="2011-08-30T06:54:52.347" UserId="4129" Text="I am trying to draw spheres using a billboard, so I have a normal map with a z component that I am sampling in my fragment shader.  I just need to add this z component to the depth of my fragment to get proper 3D spheres...&#xD;&#xA;&#xD;&#xA;How do you determine the current fragment's z-depth, add my offset and then set `gl_FragDepth`? &#xD;&#xA;&#xD;&#xA;I've found lots of confusing contradictory hints and partially working bits of code all over the 'net, but no definitive clear answer." />
  <row Id="38331" PostHistoryTypeId="1" PostId="16588" RevisionGUID="db795002-9b52-45f5-aa7e-9be58b7f3ee7" CreationDate="2011-08-30T06:54:52.347" UserId="4129" Text="computing gl_FragDepth" />
  <row Id="38332" PostHistoryTypeId="3" PostId="16588" RevisionGUID="db795002-9b52-45f5-aa7e-9be58b7f3ee7" CreationDate="2011-08-30T06:54:52.347" UserId="4129" Text="&lt;glsl&gt;&lt;depth-buffer&gt;" />
  <row Id="38333" PostHistoryTypeId="5" PostId="16587" RevisionGUID="2896ff9e-d228-4da0-a6dd-cfaf4f5e8dc4" CreationDate="2011-08-30T06:56:18.697" UserId="3818" Comment="added one more option" Text="I'd like to create a very simple 2D board game for Android, it would be a concept/mockup so I can see how the game works out. &#xD;&#xA;&#xD;&#xA;Let's for the sake of this question that it's a clone of Othello - board game with score display, clickable game pieces/spots on a square grid and some animations.&#xD;&#xA;&#xD;&#xA;I have to choose from these approaches:&#xD;&#xA;&#xD;&#xA;* do it all myself, draw the game on Canvas - I've done one game this way, and it took some time to code it. Then, that was a casual action game and the animations would be hard to implement.&#xD;&#xA;&#xD;&#xA;* implement it with Android widgets - I'd use RelativeLayout/TableLayout; the pieces will be ImageViews - this way I'd get the animations for free with Android tween animations. This would be the quickest of all solutions timewise, but I might run into some problems that may be a deal breaker.&#xD;&#xA;&#xD;&#xA;* use AppInventor - it may do the task, but don't know anything about it, this approach would also require some time to go through the tutorials.&#xD;&#xA;&#xD;&#xA;* use a proper game engine. That will take time to learn how to use it, which I view as the biggest disadvantage as I do mostly business apps, not games. And I don't know which one to choose from.&#xD;&#xA;&#xD;&#xA;I really only want to throw this together in the shortest amount of time to see how it works, so I don't want to invest a lot of time to do it in the most &quot;correct&quot; way - that I'll do later if the concept works." />
  <row Id="38334" PostHistoryTypeId="2" PostId="16589" RevisionGUID="6af78ba9-3329-4467-bbdb-3f741d949cac" CreationDate="2011-08-30T07:13:39.567" UserId="4129" Text="There are two general approaches:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The leftmost is termed the uv-sphere and the rightmost an icosphere.&#xD;&#xA;&#xD;&#xA;Here is an excellent article on producing an icosphere: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html&#xD;&#xA;&#xD;&#xA;&gt; The uv-sphere looks like a globe. For many purposes it is perfectly&#xD;&#xA;&gt; fine, but for some use cases, e.g. if you want to deform the sphere,&#xD;&#xA;&gt; it is disadvantageous that the density of vertices is greater around&#xD;&#xA;&gt; the poles. Here the icosphere is better, its vertices are distributed&#xD;&#xA;&gt; evenly.&#xD;&#xA;&#xD;&#xA;You may also find this interesting: http://kiwi.atmos.colostate.edu/BUGS/geodesic/text.html it describes an approach to organising the faces into zones.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kSSSF.png" />
  <row Id="38335" PostHistoryTypeId="4" PostId="16585" RevisionGUID="63327975-1e5e-419f-a449-852393c57adc" CreationDate="2011-08-30T07:33:41.257" UserId="51" Comment="edited title" Text="How do you programmatically generate a sphere?" />
  <row Id="38336" PostHistoryTypeId="2" PostId="16590" RevisionGUID="50052f17-f442-418c-a27f-f39afb403a94" CreationDate="2011-08-30T07:49:08.017" UserId="7970" Text="I'm thinking of making a spot the difference game. But immediately I have stumbled. I'm thinking of saved a &quot;difference area&quot; in the form of a x,x coordination. However, because on a smartphone it will be difficult selecting the exact pixel that sites at the given coord, i need a way of checking if the &quot;area&quot; is with the &quot;touch area&quot;. I hope that makes sense. I've attached an image to help you understand&#xD;&#xA;&#xD;&#xA;![Image 1][1]&#xD;&#xA;&#xD;&#xA;In this example the correct &quot;difference point&quot; is at -180,-140. A user could touch anything within 5 pixels of that and that will be marked as a correct answer. So touching -177, -147 would be also correct. How would i programmatically work out all the corrds within a 5 pixels radius of the correct &quot;difference point&quot;.&#xD;&#xA;&#xD;&#xA;Feel free to grammatically edit this post, english isn't my strong point.&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/WszJR.png&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38337" PostHistoryTypeId="1" PostId="16590" RevisionGUID="50052f17-f442-418c-a27f-f39afb403a94" CreationDate="2011-08-30T07:49:08.017" UserId="7970" Text="Spot the difference game design help" />
  <row Id="38338" PostHistoryTypeId="3" PostId="16590" RevisionGUID="50052f17-f442-418c-a27f-f39afb403a94" CreationDate="2011-08-30T07:49:08.017" UserId="7970" Text="&lt;game-design&gt;&lt;math&gt;" />
  <row Id="38339" PostHistoryTypeId="2" PostId="16591" RevisionGUID="3efff9a7-9557-470b-92dc-c046049d56e7" CreationDate="2011-08-30T07:50:12.523" UserId="4894" Text="For a board game, my personal choice would go to creating a custom View, drawing the game on a Canvas. &#xD;&#xA;&#xD;&#xA;As it's a board game, this would be efficient enough, and would'nt require as much animation as an action game. &#xD;&#xA;&#xD;&#xA;My second choice would go to a &quot;proper&quot; game engine, probably based on OpenGL. If you already programmed a game using Canvas, it shouldn't be too hard to understand how to use a game engine (besides most of them have good tutorials and documentation). " />
  <row Id="38340" PostHistoryTypeId="2" PostId="16592" RevisionGUID="c48f6222-2431-488b-994a-ce74e29029cb" CreationDate="2011-08-30T07:52:37.820" UserId="4129" Text="If your 'click' event gives you a 2D point on the screen:&#xD;&#xA;&#xD;&#xA; - A 2D point is inside a circle if its distance from the center of the circle is less than the circle's radius.&#xD;&#xA;&#xD;&#xA;And if it gives you a 'hit circle', then:&#xD;&#xA;&#xD;&#xA; - Two circles intersect if the distance between their centers is less than the sum of their radii." />
  <row Id="38341" PostHistoryTypeId="2" PostId="16593" RevisionGUID="8278a054-5db5-4b86-aef8-f2e1688b622d" CreationDate="2011-08-30T07:53:08.993" UserId="20" Text="If it's just for a prototype, I'd say go with the approach you're most familiar with or the one you think you'll get some fast results (that's usually the same as the one you're most familiar with :))&#xD;&#xA;&#xD;&#xA;After the prototype is done, I suggest you switch to a game-engine. GUI-Frameworks for business apps might work for some games, but in the long run you'll benefit from the game engine. Also: You should switch tech to implement your real game, so you don't get tempted to just turn your prototype into the real game. This could be an excellent way to learn about a game engine." />
  <row Id="38342" PostHistoryTypeId="2" PostId="16594" RevisionGUID="9e90de62-56c7-4d67-a0ee-5533ce9ab7cb" CreationDate="2011-08-30T07:54:16.420" UserId="4894" Text="What you need is to know the geometric distance between the user's touch (T) and your &quot;difference point&quot; (D). &#xD;&#xA;&#xD;&#xA;    distance = squareroot((T.x - D.x)² + (T.y - D.y)²)&#xD;&#xA;&#xD;&#xA;Then as another answer said, just check if the distance is less than the circle's radius, 5 pixels in your example. " />
  <row Id="38343" PostHistoryTypeId="2" PostId="16595" RevisionGUID="aa72be4a-0703-45be-b68b-be58d5569e96" CreationDate="2011-08-30T08:22:13.627" UserId="20" Text="Before you roll your own map, I'd have a look at existing map frameworks. [OpenLayers][1] seems to be a good candidate that already has a lot of your requirements implemented.&#xD;&#xA;&#xD;&#xA;If that doesn't fit your needs, you could still implement it yourself. SVG is particularly interesting, because you get an infinite level of zoom (given your assets are vector-graphics).&#xD;&#xA;&#xD;&#xA;You're going to need JavaScript for the refresh code and dynamic positioning of elements anyway, so there's no way around JavaScript. Usually you'll use `canvas` to draw graphics, but you could use DOM elements (and CSS3) or SVG for your drawing. There's this question that lists some [JavaScript libraries for game-dev][2].&#xD;&#xA;&#xD;&#xA;Another interesting API is [Paper.js][3] which allows you to draw vector-graphics and images using a JavaScript API.&#xD;&#xA;&#xD;&#xA;In the end it highly depends on your requirements. A zoomable map will look best with SVG but requires you to create your assets as SVG graphics. An existing framework like OpenLayers is probably the best way to get something on screen fast though.&#xD;&#xA;&#xD;&#xA;  [1]: http://openlayers.org/&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/4277/what-are-good-js-libraries-for-game-dev-html5&#xD;&#xA;  [3]: http://paperjs.org/" />
  <row Id="38344" PostHistoryTypeId="2" PostId="16596" RevisionGUID="260d8a0f-e2cd-45f9-9d1e-9b9fd0724003" CreationDate="2011-08-30T08:39:32.723" UserId="2188" Text="I don't understand why you and the present answers make it much more complicated then it actually is. Calculating the distance from the difference? Nonsense.&#xD;&#xA;&#xD;&#xA;Your difference should be a rectangular image, having a width and an height: you check if the touch happened within that rectangle. You may also decide to check a larger rectangle if your images are too small.&#xD;&#xA;&#xD;&#xA;Don't forget (regardless of the method you choose) to avoid overlapping differences!" />
  <row Id="38345" PostHistoryTypeId="5" PostId="16589" RevisionGUID="775d844a-94d0-4df8-b6d1-7889e5e16029" CreationDate="2011-08-30T08:39:41.990" UserId="4129" Comment="added 245 characters in body" Text="There are two general approaches:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The leftmost is termed the uv-sphere and the rightmost an icosphere.&#xD;&#xA;&#xD;&#xA;GLUT tends to use the uv approach: look at the function `glutSolidSphere()` in the [freeglut sourcecode][2].&#xD;&#xA;&#xD;&#xA;Here is an excellent article on producing an icosphere: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html&#xD;&#xA;&#xD;&#xA;&gt; The uv-sphere looks like a globe. For many purposes it is perfectly&#xD;&#xA;&gt; fine, but for some use cases, e.g. if you want to deform the sphere,&#xD;&#xA;&gt; it is disadvantageous that the density of vertices is greater around&#xD;&#xA;&gt; the poles. Here the icosphere is better, its vertices are distributed&#xD;&#xA;&gt; evenly.&#xD;&#xA;&#xD;&#xA;You may also find this interesting: http://kiwi.atmos.colostate.edu/BUGS/geodesic/text.html it describes an approach to organising the faces into zones.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kSSSF.png&#xD;&#xA;  [2]: http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut/src/freeglut_geometry.c?revision=926&amp;view=markup" />
  <row Id="38346" PostHistoryTypeId="2" PostId="16597" RevisionGUID="af8e178c-5029-4de8-963d-379a15ec8218" CreationDate="2011-08-30T08:42:58.470" UserId="9574" Text="Often, we think of &quot;how do we create A.I.?&quot;&#xD;&#xA;&#xD;&#xA;That is skipping the big question, &quot;What IS A.I. ?&quot;&#xD;&#xA;&#xD;&#xA;This talk from TED.com that I watched some years ago, shared a very inspiring approach to the definition of Artificial Intelligent.&#xD;&#xA;&#xD;&#xA;If you want your players to feel that the enemies are &quot;intelligent&quot; then this will provide a high-level answer, and essentially a whole new way of thinking about A.I., which is the &quot;ability to predict&quot;&#xD;&#xA;&#xD;&#xA;http://www.ted.com/talks/jeff_hawkins_on_how_brain_science_will_change_computing.html&#xD;&#xA;" />
  <row Id="38347" PostHistoryTypeId="5" PostId="16590" RevisionGUID="c05b2ddb-6421-4c5c-9048-9a2295eca7ab" CreationDate="2011-08-30T09:07:45.820" UserId="20" Comment="some spelling and formatting changes, changed tags" Text="I'm thinking of making a *spot the difference* game. But immediately I stumbled over a problem. I'm thinking of storing a &quot;difference area&quot; in the form of a `x,y` coordinate. However, because on a smartphone it will be difficult selecting the exact pixel at that location, I need a way of checking if the &quot;area&quot; is within the &quot;touch area&quot;. I hope that makes sense. I've attached an image to help you understand&#xD;&#xA;&#xD;&#xA;![touch coordinate point][1]&#xD;&#xA;&#xD;&#xA;In this example the &quot;difference point&quot; is located at `-180,-140`. A user could touch anything within 5 pixels of that and that will be marked as a correct answer. So touching `-177, -147` would also be correct. How can I check if the touch-coordinates are within a 5 pixels radius of the correct &quot;difference point&quot;?&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/WszJR.png&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38348" PostHistoryTypeId="6" PostId="16590" RevisionGUID="c05b2ddb-6421-4c5c-9048-9a2295eca7ab" CreationDate="2011-08-30T09:07:45.820" UserId="20" Comment="some spelling and formatting changes, changed tags" Text="&lt;math&gt;&lt;coordinates&gt;&lt;touch&gt;" />
  <row Id="38349" PostHistoryTypeId="25" PostId="16590" RevisionGUID="75af9867-850f-4bab-bd68-642f8cdce33b" CreationDate="2011-08-30T09:38:05.553" Comment="http://twitter.com/#!/StackGameDev/status/108473556370853888" />
  <row Id="38350" PostHistoryTypeId="2" PostId="16598" RevisionGUID="171dae42-2d7b-4e7a-b3ac-0359e28bd5bd" CreationDate="2011-08-30T09:48:16.100" UserId="7779" Text="[Binpress][1] has a few [complete sources for iPhone games][2] that could be useful both for learning and getting started quickly &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.binpress.com&#xD;&#xA;  [2]: http://www.binpress.com/browse/objective-c" />
  <row Id="38351" PostHistoryTypeId="16" PostId="16598" RevisionGUID="dd093dfa-96be-4e96-abb9-f04ef6458010" CreationDate="2011-08-30T09:48:16.100" UserId="7779" />
  <row Id="38352" PostHistoryTypeId="6" PostId="5573" RevisionGUID="587283af-5065-42cc-943f-16835a37222b" CreationDate="2011-08-30T09:49:34.223" UserId="5473" Comment="edited tags" Text="&lt;2d&gt;&lt;collision-detection&gt;&lt;math&gt;&lt;geometry&gt;&lt;csg&gt;" />
  <row Id="38353" PostHistoryTypeId="5" PostId="16589" RevisionGUID="99697684-7ec0-43f1-b90a-caf09054dee5" CreationDate="2011-08-30T09:53:46.607" UserId="4129" Comment="added 119 characters in body" Text="There are two general approaches:&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;The leftmost is termed the uv-sphere and the rightmost an icosphere.&#xD;&#xA;&#xD;&#xA;GLUT tends to use the uv approach: look at the function `glutSolidSphere()` in the [freeglut sourcecode][2].&#xD;&#xA;&#xD;&#xA;Here is an excellent article on producing an icosphere: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html&#xD;&#xA;&#xD;&#xA;&gt; The uv-sphere looks like a globe. For many purposes it is perfectly&#xD;&#xA;&gt; fine, but for some use cases, e.g. if you want to deform the sphere,&#xD;&#xA;&gt; it is disadvantageous that the density of vertices is greater around&#xD;&#xA;&gt; the poles. Here the icosphere is better, its vertices are distributed&#xD;&#xA;&gt; evenly.&#xD;&#xA;&#xD;&#xA;You may also find this interesting: http://kiwi.atmos.colostate.edu/BUGS/geodesic/text.html it describes an approach to organising the faces into zones.&#xD;&#xA;&#xD;&#xA;http://vterrain.org/Textures/spherical.html gives an excellent description of how you might choose to texture them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/kSSSF.png&#xD;&#xA;  [2]: http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut/src/freeglut_geometry.c?revision=926&amp;view=markup" />
  <row Id="38354" PostHistoryTypeId="2" PostId="16599" RevisionGUID="fab4f749-9266-41fd-8958-559b0e895103" CreationDate="2011-08-30T09:59:17.703" UserId="5676" Text="To me, &quot;feeling alive&quot; means that the character act as you would think it would in real life.&#xD;&#xA;&#xD;&#xA;People in real life have needs, motivations, fears, flaws. They talk, they react with each other if it is a group, they flee because they care for their own life. &#xD;&#xA;&#xD;&#xA;If they are military or trained, they have tactics.&#xD;&#xA;&#xD;&#xA;So maybe you should check in the field of human behavior, so in social sciences, not in computer sciences.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38355" PostHistoryTypeId="5" PostId="16599" RevisionGUID="cd7b74ed-39ea-4ef3-b4ba-5badee5c84f9" CreationDate="2011-08-30T10:46:55.380" UserId="5676" Comment="deleted 1 characters in body" Text="To me, &quot;feeling alive&quot; means that the character act as you would think it would in real life.&#xD;&#xA;&#xD;&#xA;People in real life have needs, motivations, fears, flaws. They talk, they react with each other if it is a group, they flee because they care for their own life. &#xD;&#xA;&#xD;&#xA;If they are military or trained, they have tactics.&#xD;&#xA;&#xD;&#xA;So maybe you should check in the field of human behavior, so in human sciences, not in computer sciences.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38356" PostHistoryTypeId="2" PostId="16600" RevisionGUID="7a0d7460-e8d0-4430-80cf-af51c8018a94" CreationDate="2011-08-30T10:47:29.263" UserId="9580" Text="I've been building a rogue-like for more than a year now, and so far I've only ever implemented very simple monster behaviour - such as moving toward the player when he's in the line of sight, and attacking.&#xD;&#xA;&#xD;&#xA;I would like to implement fleeing behaviour for certain monsters that realize they're outmatched.&#xD;&#xA;&#xD;&#xA;I have these priority based behaviour types for monsters:&#xD;&#xA;&#xD;&#xA;* Flee&#xD;&#xA;* Attack/Defend&#xD;&#xA;* Investigate (event)&#xD;&#xA;* Socialize / Explore / Patrol&#xD;&#xA;&#xD;&#xA;The only code I have for fleeing is a flood fill routine which attempts to find tiles which &quot;look&quot; like they are doorways leading to corridors. The question is, how can I improve this to stop it from finding such tiles that deceptively look like doorways, but actually lead to dead ends?" />
  <row Id="38357" PostHistoryTypeId="1" PostId="16600" RevisionGUID="7a0d7460-e8d0-4430-80cf-af51c8018a94" CreationDate="2011-08-30T10:47:29.263" UserId="9580" Text="How to prevent fleeing monster from backing himself into a dead end?" />
  <row Id="38358" PostHistoryTypeId="3" PostId="16600" RevisionGUID="7a0d7460-e8d0-4430-80cf-af51c8018a94" CreationDate="2011-08-30T10:47:29.263" UserId="9580" Text="&lt;c++&gt;&lt;ai&gt;" />
  <row Id="38359" PostHistoryTypeId="6" PostId="16600" RevisionGUID="1cdda17e-088c-484d-b3f2-319ebb8a1706" CreationDate="2011-08-30T10:54:21.407" UserId="9580" Comment="edited tags" Text="&lt;c++&gt;&lt;2d&gt;&lt;ai&gt;&lt;tiles&gt;" />
  <row Id="38360" PostHistoryTypeId="2" PostId="16601" RevisionGUID="6ef4ecdb-1f44-4398-a544-aa8768a20f9f" CreationDate="2011-08-30T10:56:49.630" UserId="9573" Text="Basically, a dead end is a path where you can't go back to your starting point without turning back, so I think checking for that may be a simple solution, maybe not the best.&#xD;&#xA;&#xD;&#xA;Another solution coming to my mind would be to mark dead end entry tiles with a flag." />
  <row Id="38361" PostHistoryTypeId="2" PostId="16602" RevisionGUID="6760bfe0-9397-4bbb-a200-b8525c2d0134" CreationDate="2011-08-30T10:57:44.870" UserId="1101" Text="If your flood fill extends further, it will necessarily distinguish between dead ends and exits that lead further. The bigger the area you search, the more accurate it will be.&#xD;&#xA;&#xD;&#xA;Alternatively, during the creation of your levels, you may want to annotate exits, so that they can be explicitly searched for. Find the nearest one and plot a path to it. Plotting paths can be done with the A* algorithm.&#xD;&#xA;&#xD;&#xA;Another way of using the A* algorithm would be to pick a random point elsewhere in the level and plot a path to it. If it's reachable, that path would constitute an escape route. If it's not, you can try a different point. Ideally, you would attempt to plot a path to the exit from the level, as that would definitely be a viable escape route." />
  <row Id="38362" PostHistoryTypeId="2" PostId="16603" RevisionGUID="506e3229-4ac1-43db-b643-48d7fe5e8a11" CreationDate="2011-08-30T11:43:18.937" UserId="1141" Text="If the points don't have to be locally uniform, but should be globally uniform, and don't have to follow any set pattern, you can use a variant of dart-throwing algorithm to distribute *n* points on a sphere with radius *r*, on average *dist* points apart. These values are then roughly:&#xD;&#xA;&#xD;&#xA;1. If you want to have a specific amount of vertices:&#xD;&#xA;* *n* = (desired amount of vertices)&#xD;&#xA;* *dist* = 2 × *r* × √(*π* / *n*)&#xD;&#xA;2. If you want to have a specific average distance between the vertices:&#xD;&#xA;* *n* = 4 × *π* × (*r* / *dist*)&lt;sup&gt;2&lt;/sup&gt;&#xD;&#xA;* *dist* = (desired average distance)&#xD;&#xA;&#xD;&#xA;In the simplest case, you can then uniformly pick points at random by picking two uniformly distributed variables *u* and *v* from (0, 1) and calculating the polar coordinates from them according to the formulas *θ* = 2 × *π* × *u* and *ϕ* = arc cos (2 × *v* - 1); then dismissing any points which lie too near to the already picked points. For a slightly more complex and significantly better-performing algorithm, see &quot;[Dart Throwing on Surfaces][1]&quot; by Cline, Jeschke, White, Razdan and Wonka.&#xD;&#xA;&#xD;&#xA;After you picked your first four points (assuming no three of them are *degenerate*, that is - they don't lie on the same great circle, but that's highly unlikely), you can create four faces between them, and each time you add a new point, you can split the face it belongs to accordingly into three sub-faces.&#xD;&#xA;&#xD;&#xA;For texturing purposes you can then map the points to a cube map.&#xD;&#xA;&#xD;&#xA;  [1]: http://peterwonka.net/Publications/2009.EGF.Cline.PoissonOnSurfaces.pdf" />
  <row Id="38363" PostHistoryTypeId="2" PostId="16604" RevisionGUID="cb2b3e5b-0a74-4ae9-9a40-b4f17cde8ea6" CreationDate="2011-08-30T11:51:27.810" UserId="6362" Text="I´ve got some questions regarding the loading of tile maps.&#xD;&#xA;I´ve got a world with several buildings in it that guide the user to a new map. This map can be a small room, but also a big area.&#xD;&#xA;To change the map it seems straight forward to change the current tilegrid to the tilegrid of the new map. &#xD;&#xA;&#xD;&#xA;But this seems pretty inefficient in some cases;&#xD;&#xA;&#xD;&#xA; - User enters building from world map&#xD;&#xA; - Small building map is loaded&#xD;&#xA; - User exists building, enter world again&#xD;&#xA;&#xD;&#xA; This scenario causes the entire world map to be loaded again. &#xD;&#xA;I could just hold the previous map in a variable to prevent it from needing to be loaded again. But what if the new map has several other passages, or is a big map itself. Then I would need to hold a big amount of data.&#xD;&#xA;&#xD;&#xA;I was thinking of loading only tiles that are in a certain radius of the players viewport. But entering new maps would still cause the entire viewport area to be loaded again.&#xD;&#xA;&#xD;&#xA;Is there a way how this type of thing is generally done?" />
  <row Id="38364" PostHistoryTypeId="1" PostId="16604" RevisionGUID="cb2b3e5b-0a74-4ae9-9a40-b4f17cde8ea6" CreationDate="2011-08-30T11:51:27.810" UserId="6362" Text="Loading tilemaps, entering buildings, chopping big maps" />
  <row Id="38365" PostHistoryTypeId="3" PostId="16604" RevisionGUID="cb2b3e5b-0a74-4ae9-9a40-b4f17cde8ea6" CreationDate="2011-08-30T11:51:27.810" UserId="6362" Text="&lt;loading&gt;&lt;tilemap&gt;" />
  <row Id="38366" PostHistoryTypeId="2" PostId="16605" RevisionGUID="868d1b6e-953d-4e88-a62c-d9a3f9c8ffb7" CreationDate="2011-08-30T12:15:06.540" UserId="7831" Text="According to the GLSL specification (both 1.10 and 4.20) `gl_FragCoord` holds the window relative coordinates of the fragment, from which `z` is the depth that gets written into the depth buffer (if not changing `gl_FragDepth`). So you can just write&#xD;&#xA;&#xD;&#xA;    gl_FragDepth = gl_FragCoord.z + depthFromTexture;" />
  <row Id="38367" PostHistoryTypeId="2" PostId="16606" RevisionGUID="2db6428c-fbdb-47de-9463-76c76eb93bdb" CreationDate="2011-08-30T12:15:50.000" UserId="9573" Text="Of course you don't want to blit you entire world, you can :&#xD;&#xA;&#xD;&#xA; - Use a chunked file format to store your maps, that way you can optimize how many informations you have in memory.&#xD;&#xA; - Have a world, and keep the world informations while you're in the building, see the interiors as some &quot;instance&quot;.&#xD;&#xA; - Stay simple and calculate a square size you must draw, it's a pretty efficient way.&#xD;&#xA;&#xD;&#xA;You have to find the fair middle between the performance you want to achieve and the quantity of memory you want to use.&#xD;&#xA;&#xD;&#xA;But keep in mind that the tiles have been made in order to save memory, loading and freeing tilesets is not that heavy, maybe your system is different or your graphics lib is too slow for the resolution you choosed, you maybe should give more informations, for example did you made some measures ?" />
  <row Id="38368" PostHistoryTypeId="25" PostId="16604" RevisionGUID="1561f3b5-b48d-44f4-ba2a-88f82bbaf110" CreationDate="2011-08-30T12:38:06.183" Comment="http://twitter.com/#!/StackGameDev/status/108518855780990976" />
  <row Id="38369" PostHistoryTypeId="5" PostId="16579" RevisionGUID="fe57934a-3dc1-4d16-a916-d7debc666360" CreationDate="2011-08-30T13:08:50.640" UserId="165" Comment="removed degree statement, and grammar fixes" Text="Here's a list of some simple concepts that can make your opponent more vivid:&#xD;&#xA;&#xD;&#xA;1. Intent  &#xD;&#xA;Give the player some way of divining the 'intent' of the AI. This could be as simple as having them yell out &quot;Quantity over Quality&quot; before attempting an accurate headshot attack, &quot;Flank him&quot; while attempting to get behind you, or &quot;Take the leader, nothing else matters&quot; before attacking the protagonist. You could also get more complex, for example, have them give some sign language to their teammates, then change the behaviour of those teammates.&#xD;&#xA;&#xD;&#xA;2. Desperation  &#xD;&#xA;As the opponent gets closer to death, you can give them a sense of desperation. Change their tactics at certain health milestones. Make their later stages more panicky, with greater risk taking on their part (going for the hail mary, rather than slow chipping). Visually communicate this as well (more exaggerated animations, pulsing veins, etc).&#xD;&#xA;&#xD;&#xA;3. Go out with a Bang.  &#xD;&#xA;Give them a death that makes the fight with them something worth repeating. Grunts keel over animatedly. Bosses soliloquize. If it's a proud character, make them refuse to give you the kill, and deal the last of their damage to themselves. You get the drift." />
  <row Id="38370" PostHistoryTypeId="24" PostId="16579" RevisionGUID="fe57934a-3dc1-4d16-a916-d7debc666360" CreationDate="2011-08-30T13:08:50.640" Comment="Proposed by 165 approved by 20 edit id of 685" />
  <row Id="38371" PostHistoryTypeId="2" PostId="16607" RevisionGUID="fa9a827d-513b-44a6-9286-85b079113cd7" CreationDate="2011-08-30T13:44:28.283" UserId="7144" Text="In my experience, LUA can be great for small scripts that control a single entity's behaviour.  Not needing to compile the scripts means that you can iterate on the behaviour very quickly, making small adjustments and reloading the script to immediately see the new behaviour.  When you start getting into complex logic, however, it is invaluable to have the structure that is enforced in languages like C++.  Having a compiler and a debugger to catch problems can save you a lot of time.&#xD;&#xA;&#xD;&#xA;In your case, it sounds like you are thinking of having your AI *driven* by your compiled language (i.e. at a high level, managing the game state and the entities therein in C++ or some similar language), with the behavioural logic for individual ship types in LUA.  That seems like a sensible way to go.  I would not, however, try to have the entire game's state handled by LUA - it could make it incredibly difficult to debug." />
  <row Id="38372" PostHistoryTypeId="2" PostId="16608" RevisionGUID="253d728a-27ca-4c84-9f12-c23f5ab073fd" CreationDate="2011-08-30T13:49:06.263" UserId="6519" Text="I'm wondering if anyone can guide me with following problem...&#xD;&#xA;Each fruit has different chance to be called out.&#xD;&#xA;&#xD;&#xA;    Apple - 80% &#xD;&#xA;    Orange - 10%&#xD;&#xA;    Banana - 10%&#xD;&#xA;&#xD;&#xA;Each time a user click on the random image, only 1 fruit will come out with above weight.&#xD;&#xA;I have no idea how I can calcuate to get that result. Pseudo code example is fine for me.&#xD;&#xA;" />
  <row Id="38373" PostHistoryTypeId="1" PostId="16608" RevisionGUID="253d728a-27ca-4c84-9f12-c23f5ab073fd" CreationDate="2011-08-30T13:49:06.263" UserId="6519" Text="How to get the result of random item with different possibility?" />
  <row Id="38374" PostHistoryTypeId="3" PostId="16608" RevisionGUID="253d728a-27ca-4c84-9f12-c23f5ab073fd" CreationDate="2011-08-30T13:49:06.263" UserId="6519" Text="&lt;math&gt;" />
  <row Id="38375" PostHistoryTypeId="2" PostId="16609" RevisionGUID="c10d5ec0-201e-44a5-80ec-e3d15cd2231c" CreationDate="2011-08-30T14:34:43.363" UserId="8390" Text="    int TotalWeight = 100;&#xD;&#xA;    int[] ItemWeights = new int[] {80, 10, 10};&#xD;&#xA;    enum Items {Apple, Orange, Banana}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Items GetRandomItem()&#xD;&#xA;    {&#xD;&#xA;        int random = Random.Next(TotalWeight);&#xD;&#xA;        int i=0;  &#xD;&#xA;     &#xD;&#xA;        while (random &gt; ItemWeights[i])&#xD;&#xA;        {&#xD;&#xA;            random -= ItemWeights[i];&#xD;&#xA;            i++;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return (Items) i;&#xD;&#xA;     } " />
  <row Id="38376" PostHistoryTypeId="2" PostId="16610" RevisionGUID="a11c8303-7d0f-41de-8b7e-7d5422f53070" CreationDate="2011-08-30T14:35:02.273" UserId="587" Text="Randomize a number between 1 and 100, then:&#xD;&#xA;&#xD;&#xA;    n &lt;= 80: show Apple&#xD;&#xA;    n &gt; 80 and n &lt;= 90: show Orange&#xD;&#xA;    n &gt; 90 and n &lt;= 100: show Banana&#xD;&#xA;" />
  <row Id="38377" PostHistoryTypeId="2" PostId="16611" RevisionGUID="837d3634-5c43-44cc-bfb1-64d5447a452e" CreationDate="2011-08-30T15:13:06.563" UserId="9587" Text="I am not a gamer, perhaps because I find that all games seem the same. It is as if the huge potential that I imagined from games never came to be, and they are stuck in a rut. But I was watching a video about game development and the guy said that all games fit into 4 or 5 basic types. My question is, if that's all they could think of, and most games do not appeal to me, could it be that no one is thinking outside the box?&#xD;&#xA;&#xD;&#xA;Furthermore, whenever I encounter gamers, I find they are vastly different people than me. Often they seem petty and mean and terribly concerned about their confidence level. I don't want to use a device as a confidence-booster. I want to use life experiences as confidence boosters. Could it be that gaming companies are manipulating specific personality types in a direction that does not benefit those gamers, but boosts the companies' profits?" />
  <row Id="38378" PostHistoryTypeId="1" PostId="16611" RevisionGUID="837d3634-5c43-44cc-bfb1-64d5447a452e" CreationDate="2011-08-30T15:13:06.563" UserId="9587" Text="If there are only 4 or 5 types of games, what's next?" />
  <row Id="38379" PostHistoryTypeId="3" PostId="16611" RevisionGUID="837d3634-5c43-44cc-bfb1-64d5447a452e" CreationDate="2011-08-30T15:13:06.563" UserId="9587" Text="&lt;game-design&gt;" />
  <row Id="38380" PostHistoryTypeId="2" PostId="16612" RevisionGUID="bcc33ddb-01fa-4261-b342-3ceaaa517521" CreationDate="2011-08-30T15:26:46.340" UserId="9471" Text="Man, what kind of question is this?&#xD;&#xA;&#xD;&#xA;Of course you can fit all games in 4 or 5 basic types as you can fit movies in 4 or 5 basic types, as you can fit anything in the world in 4 or 5 basic types. But that's not a thing that make games poor, rather, you're just generalizing all the games in 4 or 5 genres and not noticing their peculiar differences and inovations.&#xD;&#xA;&#xD;&#xA;Nowadays there's many kind of gamers, from the really nerd ones to the &quot;FIFA and Kinect&quot; players, that have a stable social life, are married and have kids, no problems with their confidence at all. Again, you're just generalizing.&#xD;&#xA;&#xD;&#xA;By any means game companies could do that, the whole market grew organically, if people don't want to play/buy these games, them this companies wouldn't exist.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38381" PostHistoryTypeId="25" PostId="16608" RevisionGUID="19eb6ed7-7e51-4e45-9905-2139be305e25" CreationDate="2011-08-30T15:38:05.663" Comment="http://twitter.com/#!/StackGameDev/status/108564152812969984" />
  <row Id="38382" PostHistoryTypeId="5" PostId="15700" RevisionGUID="d9291c15-852e-403f-ba23-6d130ef710e5" CreationDate="2011-08-30T15:38:14.403" UserId="4546" Comment="addressed concerns from comments" Text="A terrain heightmap texture is a regular grid of point samples, which indicate the height at that particular location on the terrain. When you want to create such a heightmap from a function `f(vec2)`, you evaluate the function with the position of each of the grid points of the terrain to get the value at those points, and let that be the color value in the texture.&#xD;&#xA;&#xD;&#xA;If the function expects the coordinate in a different space (other scale, offset, range) than the pixel coordinates of your texture, you need to map the pixel coordinates into the coordinate range you wish to invoke the function with.&#xD;&#xA;&#xD;&#xA;The output values might have the wrong scale or offset, so you might need to compensate for those by offsetting and scaling the returned value to fit inside the range of values your texture component expects (0 through 255 for a typical 8-bit component):&#xD;&#xA;&#xD;&#xA;    foreach (y in [0..height))&#xD;&#xA;      foreach (x in [0..width))&#xD;&#xA;        vec2 p = transform_pixel_position_to_parameter(x, y);&#xD;&#xA;        tex(x,y) = height_offset + height_scale * f(p);" />
  <row Id="38383" PostHistoryTypeId="2" PostId="16613" RevisionGUID="401bdac5-40e4-43aa-adb2-728fdf2ee013" CreationDate="2011-08-30T16:16:20.993" UserId="2897" Text="This question is too open-ended and phylophical. &quot;What can change the nature of a game? — Game has no nature. It starts out as nothing and becomes whatever game developer makes of himself&quot; :) If you find that all games are the same, try playing something outside of a generic &quot;i want to be a dragon&quot; or &quot;i am a Spess Muhreen&quot; range.&#xD;&#xA;&#xD;&#xA;There are as many types of games as you want to distinguish. For general convenience there are basic types used to quickly estabilish what kind of game we're dealing with, but they have pretty vague limits. Thing is, while possibilities are limitless, this box everyone tries to think in is called &quot;fun&quot;, and it is big, but not indefinitely big: there are only small finite number of main principles fit to engage player in a good gaming experience. &#xD;&#xA;&#xD;&#xA;It's not like we have all these principles crystallized and set in stone like Aristotle's Poetics or something, but they are clearly here. There is no reason to think outside this &quot;box of fun&quot; unless you want an unplayable game. So then again, if games don't appeal to you, you're either playing the wrong games or it's finally _that_ time, where you stop playing games and start doing something else.&#xD;&#xA;&#xD;&#xA;For the second part... Wait... Good heavens, now it all makes sense! Of course it's the evil AE and Passivizzard conspiring against mind-controlled gamers forcing them to buy game after game, so companies can develop any shovelware they want without fear of bankruptcy. This mind control also seem to deteriorate one's confidence level, so hapless gamers are forced to pwn noobs all day to gain back some bits of self-respect. Quick, we need to do something, where is my Che Guevara T-shirt?" />
  <row Id="38384" PostHistoryTypeId="2" PostId="16614" RevisionGUID="ef33d8ae-70ad-4ded-8471-0157f4d1748d" CreationDate="2011-08-30T16:45:41.483" UserId="3056" Text="I'd like to know how many shadow casting lights are supported in modern games, such as Uncharted 2, Crysis 2, Modern Warfare 2, Halo: Reach, etc. Do they all limit themselves to just a couple of shadow casting lights, or do the numbers vary wildly?" />
  <row Id="38385" PostHistoryTypeId="1" PostId="16614" RevisionGUID="ef33d8ae-70ad-4ded-8471-0157f4d1748d" CreationDate="2011-08-30T16:45:41.483" UserId="3056" Text="How many shadow casting lights are in modern games?" />
  <row Id="38386" PostHistoryTypeId="3" PostId="16614" RevisionGUID="ef33d8ae-70ad-4ded-8471-0157f4d1748d" CreationDate="2011-08-30T16:45:41.483" UserId="3056" Text="&lt;performance&gt;&lt;lighting&gt;&lt;shadows&gt;" />
  <row Id="38387" PostHistoryTypeId="2" PostId="16615" RevisionGUID="a15519d0-58f9-4b04-b8d1-4cb73d40faba" CreationDate="2011-08-30T17:33:11.973" UserId="9221" Text="Few years I tried to make a simple 3D game - billiards. Completed like 50%, stuck with physics. Basically, I only need to calculate balls rolling over flat surface, but it would be nice to make something more flexible.&#xD;&#xA;I know all the formulas and laws (most of them, anyway). the problem is I have no idea of how to make good physics engine architecture-wise.&#xD;&#xA;I tried google and other forums but didn't find what I was looking for. The only suggestion was to look at open-source engine, but I'm not that good a programmer to make heads or tails out of it..." />
  <row Id="38388" PostHistoryTypeId="1" PostId="16615" RevisionGUID="a15519d0-58f9-4b04-b8d1-4cb73d40faba" CreationDate="2011-08-30T17:33:11.973" UserId="9221" Text="Want to develop my own primitive physics engine, don't know how to start with it's high-level architecture. Suggestions?" />
  <row Id="38389" PostHistoryTypeId="3" PostId="16615" RevisionGUID="a15519d0-58f9-4b04-b8d1-4cb73d40faba" CreationDate="2011-08-30T17:33:11.973" UserId="9221" Text="&lt;architecture&gt;&lt;physics-engine&gt;" />
  <row Id="38390" PostHistoryTypeId="2" PostId="16616" RevisionGUID="8a6ea289-1bfb-4494-bd2e-728c1ab6361d" CreationDate="2011-08-30T17:34:07.633" UserId="1139" Text="[PlayN][1] is a multiplatform 2D game framework that targets Android in addition to HTML5, Flash and JVM. It is somewhat new, but was used to write the HTML5 implementation of Angry Birds, and has a reasonably active community.&#xD;&#xA;&#xD;&#xA;  [1]: http://code.google.com/p/playn" />
  <row Id="38391" PostHistoryTypeId="16" PostId="16616" RevisionGUID="e2a3d57d-e3e5-487d-8b00-636bce9506bf" CreationDate="2011-08-30T17:34:07.633" UserId="1139" />
  <row Id="38392" PostHistoryTypeId="6" PostId="16588" RevisionGUID="48c43b7c-97cb-4457-b591-d3063cb24ac3" CreationDate="2011-08-30T17:50:19.557" UserId="4129" Comment="edited tags" Text="&lt;opengl&gt;&lt;glsl&gt;&lt;depth-buffer&gt;" />
  <row Id="38393" PostHistoryTypeId="2" PostId="16617" RevisionGUID="12cbf54b-8918-4f9e-b0cc-a12ece38c111" CreationDate="2011-08-30T18:17:51.330" UserId="8240" Text="&gt; I just need to add this z component to the depth of my fragment to get proper 3D spheres...&#xD;&#xA;&#xD;&#xA;First of all, this *will not work*. Unless your spheres are very small (relative to the camera), simply adding to the depth will not create a proper impostor. If the sphere is towards the edge of the screen, then you will not get a proper visualization effect. A sphere becomes oblong towards the edge of the screen, and the &quot;up&quot; direction for a particular point on the sphere isn't the same everywhere.&#xD;&#xA;&#xD;&#xA;You have to use ray tracing to render a proper sphere impostor for spheres of a decent size. And if your spheres are always too small to notice, then you won't notice the lack of depth bias either.&#xD;&#xA;&#xD;&#xA;Also, I'm not sure what good biasing the depth will do. It will certainly make interpenetrations more realistic, but that's about it. The bump-mapped lighting will do far more for your visuals than bumping the depth of the fragment.&#xD;&#xA;&#xD;&#xA;However, if you insist on doing this without raytracing (a version *with* raytracing is [available here][1]), the first step is to take the current Z value and transform it back into clip-space. This will help linearize it. [This has been asked and answered.][2] That gets us back to clip space. But you need to take that clip-space position and go back to camera space. So you need the inverse projection matrix. Given that, you do this:&#xD;&#xA;&#xD;&#xA;     vec4 cameraSpacePosition = invProjMat * vec4(0, 0, clipDepth, gl_FragCoord.z);&#xD;&#xA;&#xD;&#xA;Next, you bias the camera space Z position with a *camera space* offset. It's important that the offset be in camera space; otherwise, it doesn't work.&#xD;&#xA;&#xD;&#xA;Once you have that, you just perform the transformation back to window space:&#xD;&#xA;&#xD;&#xA;    cameraSpacePosition.z += bias;&#xD;&#xA;    vec4 clipPos = projMat * vec4(cameraSpacePosition, 1.0);&#xD;&#xA;    float ndcDepth = clipPos.z / clipPos.w;&#xD;&#xA;    gl_FragDepth = ((gl_DepthRange.diff * ndcDepth) +&#xD;&#xA;        gl_DepthRange.near + gl_DepthRange.far) / 2.0;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.arcsynthesis.org/gltut/Illumination/Tut13%20Deceit%20in%20Depth.html&#xD;&#xA;  [2]: http://stackoverflow.com/questions/6408851/draw-the-depth-value-in-opengl-using-shaders/6409229#6409229" />
  <row Id="38394" PostHistoryTypeId="2" PostId="16618" RevisionGUID="94793527-5adc-44a2-a069-0d879420773f" CreationDate="2011-08-30T18:20:54.443" UserId="998" Text="In D3D11, they still have the ability to make [16 bit and 32 bit](http://msdn.microsoft.com/en-us/library/ff476453(VS.85).aspx) index buffers.&#xD;&#xA;&#xD;&#xA;Few models will use more than the max (20k tri) that a USHORT index buffer can handle, but will I really pay a bad performance cost for always using an INT (32 bit) format?&#xD;&#xA;&#xD;&#xA;Memory savings aren't that much (2 bytes per index!).  For a 20k tri model, that's only 40 kB of memory we're saving for using the USHORT (compared with probably a lot more for just the vertex data for that same model).&#xD;&#xA;&#xD;&#xA;Is it really worth ever using USHORT index buffers then, or is this just a holdover from when computers had less memory in the 90's?" />
  <row Id="38395" PostHistoryTypeId="1" PostId="16618" RevisionGUID="94793527-5adc-44a2-a069-0d879420773f" CreationDate="2011-08-30T18:20:54.443" UserId="998" Text="Using 16 bit index buffers - USHORT vs UINT" />
  <row Id="38396" PostHistoryTypeId="3" PostId="16618" RevisionGUID="94793527-5adc-44a2-a069-0d879420773f" CreationDate="2011-08-30T18:20:54.443" UserId="998" Text="&lt;index-buffers&gt;" />
  <row Id="38397" PostHistoryTypeId="2" PostId="16619" RevisionGUID="b97358f1-6258-487d-865d-348c75ef6825" CreationDate="2011-08-30T18:29:22.410" UserId="9594" Text="[Reposting this question from stackoverflow, as it was pointed out that it fits better here.]&#xD;&#xA;&#xD;&#xA;I'm currently porting my 2D game engine to Java. I looked at some of the game libraries pointed at here on stackoverflow. However, the ones I looked at were rather simplistic and didn't even state if they supported things like alpha transparency, so I decided to port my C++ renderer for which I had already written out the logic.&#xD;&#xA;&#xD;&#xA;This renderer is a pure software renderer which uses tiling to avoid needless re-rendering. I optimized its scrolling performance by creating an &quot;offscreen buffer&quot; a little larger than my output pane, and blitting this offscreen buffer onto my output on every frame. This way, I could avoid redrawing tiles needlessly just because I scrolled a pixel on the map.&#xD;&#xA;&#xD;&#xA;I used Java's AWT to implement it, using a large BufferedImage for the offscreen buffer. The CPU usage is okay(around twice of what I had in C++), but there's an odd problem with continuous scrolling, where every second or so, the renderer will lag out for around 0.2 seconds.&#xD;&#xA;&#xD;&#xA;Since there's nothing in my own code that would occur in these periods, and since the spikes disappear if I don't draw my offscreen buffer onto the main view, I can only conclude that Java is doing some internal optimization of its own. However, I'm not sure what it does, nor do I know which of my own optimizations I would have to remove to get rid of the spikes. Also, it might be that java AWT wasn't made with continuous, high FPS scrolling in mind, and that's entirely unusable for this purpose.&#xD;&#xA;&#xD;&#xA;Is there some way for me to get rid of these spikes?&#xD;&#xA;" />
  <row Id="38398" PostHistoryTypeId="1" PostId="16619" RevisionGUID="b97358f1-6258-487d-865d-348c75ef6825" CreationDate="2011-08-30T18:29:22.410" UserId="9594" Text="Is Java AWT suitable for 2d game rendering?" />
  <row Id="38399" PostHistoryTypeId="3" PostId="16619" RevisionGUID="b97358f1-6258-487d-865d-348c75ef6825" CreationDate="2011-08-30T18:29:22.410" UserId="9594" Text="&lt;2d&gt;&lt;java&gt;" />
  <row Id="38400" PostHistoryTypeId="25" PostId="16618" RevisionGUID="8288b417-de12-46e0-ae8b-eca141fa817b" CreationDate="2011-08-30T18:38:05.807" Comment="http://twitter.com/#!/StackGameDev/status/108609452663521280" />
  <row Id="38401" PostHistoryTypeId="5" PostId="16360" RevisionGUID="35e4a715-68b9-4067-bdbe-e271c418f14c" CreationDate="2011-08-30T18:39:24.150" UserId="8240" Comment="Lua isn't an acronym. Also, misspellings." Text="If you want a lot of different behaviors, go with Lua.&#xD;&#xA;&#xD;&#xA;If your behaviors can be determined by some boolean (Aggressive, follows target, ... ...) go without.&#xD;&#xA;&#xD;&#xA;Between the two I'd go without also (say 16 enemies and 4 bosses for example I'd hardcode all that).&#xD;&#xA;&#xD;&#xA;My two cents are that scripting is usually for scripters, not for coders so if you feel comfortable with the language used, stick to that language, if you don't (and maybe you will want to add enemies months and months after the development was finished) you might want to go with a scripting language as it is definitely more secure than breaking up old code..." />
  <row Id="38402" PostHistoryTypeId="24" PostId="16360" RevisionGUID="35e4a715-68b9-4067-bdbe-e271c418f14c" CreationDate="2011-08-30T18:39:24.150" Comment="Proposed by 8240 approved by 51 edit id of 686" />
  <row Id="38403" PostHistoryTypeId="10" PostId="16611" RevisionGUID="17a37ea4-d20b-4c5f-8489-3b9b3647638b" CreationDate="2011-08-30T18:42:13.350" UserId="51" CloseReasonId="4" Text="[{&quot;Id&quot;:953,&quot;DisplayName&quot;:&quot;Gregory Weir&quot;},{&quot;Id&quot;:51,&quot;DisplayName&quot;:&quot;Tetrad&quot;}]" />
  <row Id="38404" PostHistoryTypeId="2" PostId="16620" RevisionGUID="b18ceab4-23f3-451a-bb3b-da03e37fdcf9" CreationDate="2011-08-30T18:44:49.080" UserId="3974" Text="One thing I've done in the past is add a cornered state to the enemy. Put yourself in the shoes of the fleeing enemy. It is scared, it is hurt, it is fleeing and trying to just get away! Perfect mindset to get yourself cornered, which can be really fun for the player.&#xD;&#xA;&#xD;&#xA;Once cornered, the enemy can do different things, ideally depending on the personality of the enemy itself:&#xD;&#xA;&#xD;&#xA; 1. They can cower and duck into the corner and wait for death. Only really works if you can convey those emotions. A single-character rogue-like enemy probably can't convey that without text or something. From here, the player could decide to leave the enemy alone, showing compassion. Could be really neat if the enemy then becomes passive. Or if healed, even become an ally of the player.&#xD;&#xA; 2. They could go into a blind rage and launch a last-ditch attack against the player, or unleash some kind of escape spell or skill; such as a squid squirting ink, or a lizard playing dead.&#xD;&#xA;&#xD;&#xA;These are really more interesting than avoiding the corner in the first place. And are probably faster to compute, which will let you spend those cycles elsewhere.&#xD;&#xA;&#xD;&#xA;But if you MUST avoid the corners at least a little, the best way I've found is to discourage walking down tight lanes. Simply check a the 8 spaces that are 2 spaces away from the enemy. Such that if the enemy is on space (9,9) check spaces: (7,7)(11,11)(7,11)(11,7)(7,9)(9,7)(9,11) and (11,9). If any of these are open, check the 4 spaces around that space too. Weight movement in those directions according to the number of spaces you see. In a rogue-like, the walls are rarely even that far away, and this will encourage the enemy to stay in the same room.&#xD;&#xA;&#xD;&#xA;Nothing is more annoying than an enemy that runs off down a long corridor, regardless of that corridors termination, and leaves the player to have to chase it down." />
  <row Id="38405" PostHistoryTypeId="5" PostId="16358" RevisionGUID="b2b37aaf-3727-4e76-b5af-b5c0dc7bd2b4" CreationDate="2011-08-30T18:58:42.327" UserId="51" Comment="added 3 characters in body; edited title" Text="I'm programming a Side-Scroller, and I've reached the point where I need to program the enemy behaviour. I don't know what I should choose between hard-coding the enemy ships' behaviour or using a scripting language.&#xD;&#xA;&#xD;&#xA;Going with the hardcoded way, all different kind of enemies would be different classes derived from an abstract `EnemyShip` class with a virtual function redefined for each of them. Going with the scripting instead I could do just a base class and a script manager which moves the ships as needed.&#xD;&#xA;&#xD;&#xA;What should I do?&#xD;&#xA;" />
  <row Id="38406" PostHistoryTypeId="4" PostId="16358" RevisionGUID="b2b37aaf-3727-4e76-b5af-b5c0dc7bd2b4" CreationDate="2011-08-30T18:58:42.327" UserId="51" Comment="added 3 characters in body; edited title" Text="3D Side-Scrolling Shooter: to use or not to use Lua scripting?" />
  <row Id="38407" PostHistoryTypeId="2" PostId="16621" RevisionGUID="7e9b31d7-cbec-4264-953d-6e2b37d79446" CreationDate="2011-08-30T19:01:31.430" UserId="2897" Text="I haven't played MW2 and Halo, but Crysis 2 and Uncharted 2 don't have lots of dynamic shadow-casting lights at the same time. I can remember mostly 2 shadow casters at the same time; naturally they wanted to keep shadow resolve quick. Generally shadows are expensive to compute, so most games will have 2-4 shadow-casting lights with several non-shadow-casting lights nearby, then shadow resolve will switch between them depending on light’s screen presence. Two shadow casters are enough for a nice visual, especially when you're targeting consoles with limited resources and have to do other lighting parts quick and beautiful, which means lots of pre-computed stuff. &#xD;&#xA;&#xD;&#xA;I'm sure there are papers on Crysis 2 and Uncharted 2 lighting somewhere, but here is a pretty generic guess mentioning most modern techniques: detailed character shading via lighting baked into AO and diffuse maps, cascade shadows for global light source and several dynamic lights per pass via some spatial screen partitioning and a normal buffer, with the rest of the lighting baked into vertexes through some form of PRT.&#xD;&#xA;&#xD;&#xA;That's not a very useful info for *your game*, you know. Number of shadow-casting lights depends on the approach to lighting, which in turn depends on lots of things like a renderer's architecture, expected scene complexity, chosen shadow maps for a global light, desired post-effects and overall &quot;heaviness&quot; of the shaders. &#xD;&#xA;&#xD;&#xA;Also keep in mind that dynamic lights, shadow-casting or not, aren't the biggest part of overall lighting scheme, there are other important points to consider like character lighting/shading, opaque/alpha blend geometry and various post-processing effects. " />
  <row Id="38408" PostHistoryTypeId="5" PostId="16620" RevisionGUID="521c740c-a843-4682-aada-069606297045" CreationDate="2011-08-30T19:11:29.673" UserId="3974" Comment="deleted 2 characters in body" Text="One thing I've done in the past is add a cornered state to the enemy. Put yourself in the shoes of the fleeing enemy. It is scared, it is hurt, it is fleeing and trying to just get away! Perfect mindset to get yourself cornered, which can be really fun for the player.&#xD;&#xA;&#xD;&#xA;Once cornered, the enemy can do different things, ideally depending on the personality of the enemy itself:&#xD;&#xA;&#xD;&#xA; 1. They can cower and duck into the corner and wait for death. Only really works if you can convey those emotions. A single-character rogue-like enemy probably can't convey that without text or something. From here, the player could decide to leave the enemy alone, showing compassion. Could be really neat if the enemy then becomes passive. Or if healed, even become an ally of the player.&#xD;&#xA; 2. They could go into a blind rage and launch a last-ditch attack against the player, or unleash some kind of escape spell or skill; such as a squid squirting ink, or a lizard playing dead.&#xD;&#xA;&#xD;&#xA;These are really more interesting than avoiding the corner in the first place. And are probably faster to compute, which will let you spend those cycles elsewhere.&#xD;&#xA;&#xD;&#xA;But if you MUST avoid the corners at least a little, the best way I've found is to discourage walking down tight lanes. Simply check the 8 spaces that are 2 spaces away from the enemy. Such that if the enemy is on space (9,9) check spaces: (7,7)(11,11)(7,11)(11,7)(7,9)(9,7)(9,11) and (11,9). If any of these are open, check the 4 spaces around that space too. Weight movement in those directions according to the number of spaces you see. In a rogue-like, the walls are rarely even that far away, and this will encourage the enemy to stay in the same room.&#xD;&#xA;&#xD;&#xA;Nothing is more annoying than an enemy that runs off down a long corridor, regardless of that corridors termination, and leaves the player to have to chase it down." />
  <row Id="38409" PostHistoryTypeId="2" PostId="16622" RevisionGUID="2bdd78d3-2847-43e4-9d3f-6bf6a595b2f7" CreationDate="2011-08-30T19:13:34.740" UserId="9134" Text="It's not just about memory; some hardware just flat-out cannot support 32-bit indexes and must run the vertex pipeline in software if you use them.  It's getting rarer, but you can still get the occasional nasty surprise when you come across one.  16-bit indexes can also run faster in general, which can be important if you're under performance pressure, but you'll need to benchmark and weigh the benefit of extra perf from 16-bit indexes vs the tradeoff of possibly needing to split a model because there isn't one single answer to that one that's correct in all situations." />
  <row Id="38410" PostHistoryTypeId="5" PostId="16613" RevisionGUID="3ce373ea-1351-4a68-beb3-2ce1ca2a8f5c" CreationDate="2011-08-30T19:23:33.120" UserId="2897" Comment="deleted 1 characters in body" Text="This question is too open-ended and phylophical. &quot;What can change the nature of a game? — Game has no nature. It starts out as nothing and becomes whatever game developer makes of himself&quot; :) If you find that all games are the same, try playing something outside of a generic &quot;i want to be a dragon&quot; or &quot;i am a Spess Muhreen&quot; range.&#xD;&#xA;&#xD;&#xA;There are as many types of games as you want to distinguish. For general convenience there are basic types used to quickly estabilish what kind of game we're dealing with, but they have pretty vague limits. Thing is, while possibilities are limitless, this box everyone tries to think in is called &quot;fun&quot;, and it is big, but not indefinitely big: there are only small finite number of main principles fit to engage player in a good gaming experience. &#xD;&#xA;&#xD;&#xA;It's not like we have all these principles crystallized and set in stone like Aristotle's Poetics or something, but they are clearly here. There is no reason to think outside this &quot;box of fun&quot; unless you want an unplayable game. So then again, if games don't appeal to you, you're either playing the wrong games or it's finally _that_ time, when you stop playing games and start doing something else.&#xD;&#xA;&#xD;&#xA;For the second part... Wait... Good heavens, now it all makes sense! Of course it's the evil AE and Passivizzard conspiring against mind-controlled gamers forcing them to buy game after game, so companies can develop any shovelware they want without fear of bankruptcy. This mind control also seem to deteriorate one's confidence level, so hapless gamers are forced to pwn noobs all day to gain back some bits of self-respect. Quick, we need to do something, where is my Che Guevara T-shirt?" />
  <row Id="38411" PostHistoryTypeId="2" PostId="16623" RevisionGUID="3d6361bd-a6ce-4552-a873-19a9e824b9f2" CreationDate="2011-08-30T19:28:50.740" UserId="6558" Text="While memory and CPU speeds have improved over the years, games are still often pushing the limits of hardware and software.  If you're loading 100 such models, that's a savings of 40 megabytes of memory saved.  In certain situations, it's worth it to save as much memory as possible. That might be enough for you to load another model, or enough to cram in a few more sound effects, or another song.  For most AAA games, this sort of savings is vital to making things better than the competition.&#xD;&#xA;&#xD;&#xA;Of course, it's all game dependent, and for plenty of projects, not really worth it.  But if you want to push the hardware as far as it'll go, you'll want to find ways to save as much memory as possible, so you have room to add more cool stuff." />
  <row Id="38412" PostHistoryTypeId="5" PostId="16571" RevisionGUID="96dfe54b-e974-494c-99ad-33c250f3e4ad" CreationDate="2011-08-30T20:16:54.827" UserId="159" Comment="added 93 characters in body" Text="Are there any recommended blogs or whitepapers that talk about making the AI in an RPG game feel more real? (Specifically in turn based combat.)&#xD;&#xA;&#xD;&#xA;I know something must be out there, but I am only finding papers that talk about algorithms  behind the AI. I am looking more along the lines of &quot;this is what makes a computer opponent feel alive&quot;. Taking risks, going easy, retreating, etc....&#xD;&#xA;&#xD;&#xA;___&#xD;&#xA;So many awesome answers, and I wish I could accept several of them. Thanks everyone!" />
  <row Id="38413" PostHistoryTypeId="5" PostId="15365" RevisionGUID="8d0c970e-bcdb-428b-9e20-b189575f5ff0" CreationDate="2011-08-30T20:37:51.243" UserId="2061" Comment="added 2 characters in body" Text="SC2 maps do not have the ability to connect to databases or web services - this could easily be abused.  SoTiS can do it using a [separate application][3], but most maps do not use this.&#xD;&#xA;&#xD;&#xA;The only persistent storage SC2 maps are [the bank files][1], XML files saved with the extension `.SC2Bank` in your SC2 data folder.  *All* player stats, settings, etc. from that map are stored in that map's bank file.&#xD;&#xA;&#xD;&#xA;The maps usually do not actually keep track of global records - rather, they keep track locally of the best records seen so far.  Every time a game is started, everyone's individual leaderboards are combined and overwritten with the combined leaderboard.  This causes the leaderboard records to spread very quickly, much like a computer virus.&#xD;&#xA;&#xD;&#xA;For example, if my top-3-players list consists of having seen player A with score 300, player B with 200, and C with 100; and you've seen player D with 400, A with 350 (he improved his score!) and E with 50; then when we play with each other, both of our high-score lists will be overwritten with player D with 400, A with 350, and B with 200.  There are a few more kinks to work through (ex. usernames are not unique, so you also need to propagate some sort of unique ID), but otherwise this solution works well.&#xD;&#xA;&#xD;&#xA;Of course, since the high-scores are stored locally, it will always be possible for someone to hack the scores.  The only reason stats-hacking is not more widespread than it currently is is that the [bank signature][2] algorithm has not been reverse-engineered and publically released by anyone yet.&#xD;&#xA;&#xD;&#xA;[1]: http://www.hiveworkshop.com/forums/starcraft-ii-editor-help-zone-647/sc2-bank-files-critics-167005/&#xD;&#xA;[2]: http://www.sc2mapster.com/wiki/galaxy/triggers/verify-bank/r3/&#xD;&#xA;[3]: http://www.playsotis.com/index.php?option=com_kunena&amp;func=view&amp;catid=7&amp;id=16342&amp;Itemid=210" />
  <row Id="38414" PostHistoryTypeId="5" PostId="16623" RevisionGUID="08f5353b-72d6-45de-830c-08edca242701" CreationDate="2011-08-30T21:05:55.743" UserId="6558" Comment="fixed some incorrect maths" Text="While memory and CPU speeds have improved over the years, games are still often pushing the limits of hardware and software.  If you're loading 100 such models, that's a savings of 4 megabytes of memory saved.  In certain situations, it's worth it to save as much memory as possible. That might be enough for you to load another model, or enough to cram in a few more sound effects, or another song.  For most AAA games, this sort of savings is vital to making things better than the competition.&#xD;&#xA;&#xD;&#xA;Of course, it's all game dependent, and for plenty of projects, not really worth it.  But if you want to push the hardware as far as it'll go, you'll want to find ways to save as much memory as possible, so you have room to add more cool stuff." />
  <row Id="38415" PostHistoryTypeId="2" PostId="16624" RevisionGUID="f368eb48-2b83-4568-bbd8-f8682b9a2bf0" CreationDate="2011-08-30T21:18:50.890" UserId="4345" Text="I'm going to write an answer instead of a comment.&#xD;&#xA;&#xD;&#xA;Looking at your CreateBullet method:&#xD;&#xA;You are creating two new objects for each new bullet: AnimatedSprite and CircleBody&#xD;&#xA;You will have many short-lived instances of them. Better to recycle them. Have an object pool of both classes and initialize them as invisible/disabled.&#xD;&#xA;Each time a new bullet is requested just retrieve an unused object from each pool, initialize them and activate them. Bullets objects that are destroyed are returned to the pool for reuse.&#xD;&#xA;&#xD;&#xA;A brute force &quot;debugging&quot; tip:&#xD;&#xA;To narrow the line causing the issue. Print to console between each line. This is not pretty, but will quickly show which line causes the hanging.&#xD;&#xA;&#xD;&#xA;You also said the code works fine, if the enemy has no physical body. Could it be that you spawn new bullets inside the enemies body? That might trip the collision resolution of the physics engine." />
  <row Id="38416" PostHistoryTypeId="25" PostId="16619" RevisionGUID="f875431e-b671-440b-a860-58d0d0900314" CreationDate="2011-08-30T21:38:06.130" Comment="http://twitter.com/#!/StackGameDev/status/108654751129935872" />
  <row Id="38417" PostHistoryTypeId="2" PostId="16625" RevisionGUID="1d56d170-3cc9-4d33-bc98-3049b80aef56" CreationDate="2011-08-30T23:11:25.000" UserId="1929" Text="When I'm creating games, I really love the coding part -- designing, developing the main functionality and &quot;core&quot; part of the game. However, most of my games are reasonably small/easy in terms of coding, but require a lot of content -- whether graphics, levels, sounds, puzzles, story narrative, etc.&#xD;&#xA;&#xD;&#xA;I find development speeds through the coding parts, but nearly halts when it comes to content creation -- it's tough, sometimes boring work.&#xD;&#xA;&#xD;&#xA;**What can I do to make content creation quicker and more interesting/fun?** I'm already integrating content into a working game, and building/using tools as much as possible to quickly assemble my content." />
  <row Id="38418" PostHistoryTypeId="1" PostId="16625" RevisionGUID="1d56d170-3cc9-4d33-bc98-3049b80aef56" CreationDate="2011-08-30T23:11:25.000" UserId="1929" Text="Getting Past &quot;Boring&quot; Content Creation" />
  <row Id="38419" PostHistoryTypeId="3" PostId="16625" RevisionGUID="1d56d170-3cc9-4d33-bc98-3049b80aef56" CreationDate="2011-08-30T23:11:25.000" UserId="1929" Text="&lt;process&gt;" />
  <row Id="38420" PostHistoryTypeId="2" PostId="16626" RevisionGUID="953c2e38-eafe-44be-96c9-d76a39c3a294" CreationDate="2011-08-30T23:35:34.663" UserId="8240" Text="If making levels and puzzles bores you, then perhaps you should stick to being a programmer and stop making games. Level and puzzle design is the very *meat* of game design. It is what separates a good game from a crappy game.&#xD;&#xA;&#xD;&#xA;If that's not enjoyable to you, then you need a new profession." />
  <row Id="38421" PostHistoryTypeId="2" PostId="16627" RevisionGUID="3bbe98c3-dac9-4c61-b161-79bca69d2875" CreationDate="2011-08-30T23:38:51.290" UserId="159" Text="This really wont help make it fun, but what about using free assets you can find online? &#xD;&#xA;&#xD;&#xA;[Where can I find free sprites and images?][1]  &#xD;&#xA;[Where can I find free music for my game?][2]  &#xD;&#xA;For making levels, what if you could generate them via code? This wont work for all types, for it does for some games.  &#xD;&#xA;&#xD;&#xA;If you just can't stay motivated through it, what about paying someone to do it, or teaming up with somebody? For me, I do all the coding and a good fried of mine does the art, story line, etc...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game" />
  <row Id="38422" PostHistoryTypeId="5" PostId="16625" RevisionGUID="5acb4ec9-07ba-46fc-95b0-ac0036b1b9be" CreationDate="2011-08-30T23:41:45.980" UserId="1929" Comment="added 302 characters in body" Text="When I'm creating games, I really love the coding part -- designing, developing the main functionality and &quot;core&quot; part of the game. However, most of my games are reasonably small/easy in terms of coding, but require a lot of content -- whether graphics, levels, sounds, puzzles, story narrative, etc.&#xD;&#xA;&#xD;&#xA;I find development speeds through the coding parts, but nearly halts when it comes to content creation -- it's tough, sometimes boring work.&#xD;&#xA;&#xD;&#xA;**What can I do to make content creation quicker and more interesting/fun?** I'm already integrating content into a working game, and building/using tools as much as possible to quickly assemble my content.&#xD;&#xA;&#xD;&#xA;**Edit:** my question is not about learning any particular labor-/time-intensive skills like drawing assets or picking out sound effects; it's about that psychological hurdle when you have to just sit down and grind out the rest of your game, even if it's not the most fun thing in the world to do." />
  <row Id="38423" PostHistoryTypeId="2" PostId="16628" RevisionGUID="105b3978-2006-4190-89eb-2c426c9a14ef" CreationDate="2011-08-30T23:49:17.963" UserId="9366" Text="I always come across this blocker when I'm making games, particularly graphics, sound and music, so I'm going to focus this answer on graphics, sound, and music.&#xD;&#xA;&#xD;&#xA;Finding art or an artist has been hard for me. Then Google Sketchup came along and changed the playing field for me (at least on the graphics front). There are thousands, if not millions of models that you can use for free from [Google's 3D Warehouse][1]. All of the models on Google Sketchup can be used for non-commercial purposes:&#xD;&#xA;&#xD;&#xA;&gt; &quot;For the avoidance of doubt, you may modify, distribute, and create&#xD;&#xA;&gt; derivative works of Content uploaded by other users in 3D Warehouse&quot; -&#xD;&#xA;&gt; http://sketchup.google.com/intl/en/3dwh/tos.html&#xD;&#xA;&#xD;&#xA;FYI: I try to contact all of the modellers, thank them for their wonderful work, and tell them where I will be using it. I'd recommend you do the same.&#xD;&#xA;&#xD;&#xA;Now... you may be thinking: &quot;But I might want to make money one day!&quot;. And that brings me to my next point:&#xD;&#xA;&#xD;&#xA;My game is presently free and open-source. This lets me use free resources like Google Sketchup and open-source music and sound clips. There are significantly fewer restrictions on content that you find if your project is open-source (or strictly closed source among you and your friends).&#xD;&#xA;&#xD;&#xA;If I get to a point where I think my game is pretty awesome and I want to start selling it, all I have to do is freeze the open-source portion of the project (yes, sorry guys), pay an artist or two to change all the art &amp; sound, add some new features to make it &quot;better&quot; than the free version, and away I go.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://sketchup.google.com/3dwarehouse/" />
  <row Id="38424" PostHistoryTypeId="2" PostId="16629" RevisionGUID="afa3056f-c8c0-4c64-95c6-cf07fbc2b005" CreationDate="2011-08-30T23:54:22.967" UserId="9547" Text="I was wondering how can I get started with game design &amp; developement because Im not really good at any programming languages that used to make games" />
  <row Id="38425" PostHistoryTypeId="1" PostId="16629" RevisionGUID="afa3056f-c8c0-4c64-95c6-cf07fbc2b005" CreationDate="2011-08-30T23:54:22.967" UserId="9547" Text="How to get started being a game designer" />
  <row Id="38426" PostHistoryTypeId="3" PostId="16629" RevisionGUID="afa3056f-c8c0-4c64-95c6-cf07fbc2b005" CreationDate="2011-08-30T23:54:22.967" UserId="9547" Text="&lt;game-design&gt;" />
  <row Id="38427" PostHistoryTypeId="2" PostId="16630" RevisionGUID="5371d3d9-045a-4fac-ba3d-c98853eebc28" CreationDate="2011-08-31T00:16:30.997" UserId="9312" Text="Use in-game editors, mod tools, map editors, or for something really basic try something like [Stencyl][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://www.stencyl.com" />
  <row Id="38428" PostHistoryTypeId="2" PostId="16631" RevisionGUID="30250d30-b113-4796-947a-acf8e54aed25" CreationDate="2011-08-31T00:19:51.677" UserId="6558" Text="Board games.  Or card games.  Or games that don't require computers at all.  In some ways, these are easier than computer games, because you don't have to spend time in the code if you want to change the rules, you just change them.  It's quick and easy to make a game using tokens or random craft stuff, and all you'd need is friends to play test the game.  Ideally, friends who like board games or whatnot (if you don't have any such friends, search for a local board game group or similar)" />
  <row Id="38429" PostHistoryTypeId="25" PostId="16625" RevisionGUID="6aa4aab0-edd7-482d-a730-139f5a815d14" CreationDate="2011-08-31T00:38:05.717" Comment="http://twitter.com/#!/StackGameDev/status/108700048614895617" />
  <row Id="38430" PostHistoryTypeId="2" PostId="16632" RevisionGUID="33344d1a-b813-4efb-9d4d-4f084e5cfbe4" CreationDate="2011-08-31T00:51:50.873" UserId="1929" Text="There's a great post on [Zen Habits][1] about this. If you can force yourself to sit down and work on whatever it is, even if just for 5-10 minutes, that will break your barriers and get you moving on your project.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://zenhabits.net/tada/" />
  <row Id="38431" PostHistoryTypeId="2" PostId="16633" RevisionGUID="65a1276a-d55b-4273-8b50-2c0314db091b" CreationDate="2011-08-31T00:56:28.450" UserId="6362" Text="Gamemaker is a very nice tool that doesn't require alot (if any) coding. It has a nice built in drop and drag system that will get you familiar with the basics; variables, functions etc. As you progress you can move over to inline coding at your own pace." />
  <row Id="38432" PostHistoryTypeId="5" PostId="16563" RevisionGUID="6ebaea97-446d-4ad8-bfe5-10b7d9283ca9" CreationDate="2011-08-31T01:18:00.943" UserId="4306" Comment="added 81 characters in body" Text="A few days ago I found something called voxel terrains and I think that they're pretty cool.  But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on [wikipedia][1] that voxels are like 3d pixels or volumetric pixels.&#xD;&#xA;&#xD;&#xA;After I make the voxel terrain, how can I take these voxels and create a **destroyable/diggable** voxel based terrain in Unity?&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I will pick the best answer based on:&#xD;&#xA;&#xD;&#xA; 1. **code and algorithms.** preferably based in C or C#&#xD;&#xA; 2. **explain it.** I am a beginner with algorithms but I'm very familiar with object oriented programming&#xD;&#xA; 4. **diagrams/illustrations.** No, not screenshots of other engines.&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;I know that this is a complicating subject. But, thanks for any help!&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;*Edit.* No, I'm not trying to make a minecraft clone.&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Voxel" />
  <row Id="38433" PostHistoryTypeId="5" PostId="16627" RevisionGUID="eefa4f2f-a79a-45d8-ab30-8f38769fd843" CreationDate="2011-08-31T01:34:54.457" UserId="159" Comment="added 241 characters in body" Text="This really wont help make it fun, but what about using free assets you can find online? &#xD;&#xA;&#xD;&#xA;[Where can I find free sprites and images?][1]  &#xD;&#xA;[Where can I find free music for my game?][2]  &#xD;&#xA;For making levels, what if you could generate them via code? This wont work for all types, for it does for some games.  &#xD;&#xA;&#xD;&#xA;If you just can't stay motivated through it, what about paying someone to do it, or teaming up with somebody? For me, I do all the coding and a good fried of mine does the art, story line, etc...&#xD;&#xA;&#xD;&#xA;What about breaking it up into more manageable pieces? Maybe tell yourself you will do 2-3 levels per week, and if it takes you 3-4 weeks to do them so be it. At least you finished! I find this helps me a lot on mundane programming tasks. &#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/20/where-can-i-find-free-sprites-and-images&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/14/where-can-i-find-free-music-for-my-game" />
  <row Id="38434" PostHistoryTypeId="2" PostId="16634" RevisionGUID="39cd446b-c4e6-44ed-9b8c-1f4d2d50dfa3" CreationDate="2011-08-31T01:44:59.413" UserId="7191" Text="Perhaps you can attempt to create textures and sound through programming? Via [procedural textures][1], [Generative music][2] and [dynamically composing sound][3], you could not only create a style that's specific to your games, but &quot;program your art&quot;. Seems like that's the best way to program AND create content. &#xD;&#xA;&#xD;&#xA;You can always use the procedural content as a starting point too. Have your code create a level, and you can fill in the details. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Clearly this totally depends on the type of games you make, but I'm sure it could make some of the more tedious aspects more enjoyable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://en.wikipedia.org/wiki/Procedural_texture&#xD;&#xA;  [2]: http://en.wikipedia.org/wiki/Generative_music&#xD;&#xA;  [3]: http://www.google.com/patents?id=JJN7AAAAEBAJ&amp;printsec=frontcover&amp;dq=5315057&amp;hl=en&amp;ei=pEhETq2CJcfJswbVqrC3Bw&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1&amp;ved=0CCkQ6AEwAA" />
  <row Id="38435" PostHistoryTypeId="2" PostId="16635" RevisionGUID="4abc3714-a7f7-4060-9b5f-63c094029e7d" CreationDate="2011-08-31T01:47:56.603" UserId="9601" Text="You could try to learn a programming language; there are many great free tutorials on the web. You could also use something like Game Maker, as omgnoseat mentioned. You could also try to find a friend who'd be willing to help you code the games, and have you design graphics or something, and work as a small team..&#xD;&#xA;&#xD;&#xA;You weren't very specific, about what parts of game development you need help with, and what you're good at." />
  <row Id="38436" PostHistoryTypeId="2" PostId="16636" RevisionGUID="c99aa259-b179-464c-9808-e328829fad39" CreationDate="2011-08-31T02:32:49.930" UserId="73" Text="The video shows an EA representative talking about how a programmer can get into the industry by showing some demos (in fact, he shows a physics demo presented by a candidate who wanted a job at EA). The demo shown depicts kind of a ragtime doll made of yellow cobblestones.&#xD;&#xA;&#xD;&#xA;I don't remember if I watched on YouTube or Vimeo and I frankly cannot find it after a few hours of work. I just remember the fact that it was taken at a GDC or a SIGGRAPH convention.&#xD;&#xA;&#xD;&#xA;Thanks in advance. I'm really frustrated because I'd love to show this video to some fellow developers (coders)." />
  <row Id="38437" PostHistoryTypeId="1" PostId="16636" RevisionGUID="c99aa259-b179-464c-9808-e328829fad39" CreationDate="2011-08-31T02:32:49.930" UserId="73" Text="What's the URL of the video showing an EA representative talking about game programming?" />
  <row Id="38438" PostHistoryTypeId="3" PostId="16636" RevisionGUID="c99aa259-b179-464c-9808-e328829fad39" CreationDate="2011-08-31T02:32:49.930" UserId="73" Text="&lt;programming&gt;&lt;game-industry&gt;&lt;video&gt;&lt;youtube&gt;&lt;vimeo&gt;" />
  <row Id="38439" PostHistoryTypeId="2" PostId="16637" RevisionGUID="074e8332-2155-430f-b635-93cd98417ab7" CreationDate="2011-08-31T02:45:22.157" UserId="9602" Text="When I was younger I used to play games a lot for hours. I would say I got addicted to them. Now I'm a software developer and was wondering if games are explicitly designed to be addicting?&#xD;&#xA;&#xD;&#xA;Game developers are interested in keeping their users playing as long as possible. I've read about Operant Conditioning and Virtual Skinner Boxes. According to psychologists, most games use a fixed reward system to get the player hooked at first. For example, you can level up pretty fast in beginning. Then reward frequency gradually drops, but player keeps playing because they are hooked. In the end, you switch to variable reward frequency, which means rewards occur randomly and rarely. By this stage, the player might not even enjoy the game, but still play in order to get his reward fix and the resulting good feeling from it. This is very similar to how rats are conditioned in Skinner boxes. &#xD;&#xA;&#xD;&#xA;Rewards can be in the form of social status recognition in the game world, working hard for a virtual item therefore giving it great value when acquiring it, feeling in control and power that are not met in the real world, escaping to somewhere else, being able measure progress to some goal and getting instant feedback. If the player abstains from the game, a punishment is applied, i.e losing social status or items. After a while, the rewards will be associated with the game itself and therefore even the sight of the game can evoke craving, much like in case of Pavlov's dog&#xD;&#xA;&#xD;&#xA;In addition, there is another research which states that the immersive nature of video games, the rich visual stimulus from realistic graphics, the complex thinking required for playing, great autonomy and fast feedback loop can result in increased dopamine levels in the brain. Combined with an effective rewarding system, games can stimulate the feel good centres of the brain. This means that after several sessions, the player needs to play longer in order to achieve the same dopamine levels as before. Some even experience euphoric feeling and relief from withdrawal when they play. They replace real world with game world and focus on in-game motivations only. Players may stop showering for long time, have reduced hygiene, become socially isolated, drop out of school, become overweight, withdraw from their family, have dreams about the game, think and plan about the game while doing other activities, stop doing not game related activities, have trouble concentrating.&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;&#xD;&#xA;http://www.cracked.com/article_18461_5-creepy-ways-video-games-are-trying-to-get-you-addicted.html&#xD;&#xA;&#xD;&#xA;http://www.betabunny.com/behaviorism/Conditioning.htm&#xD;&#xA;&#xD;&#xA;http://www.world-science.net/exclusives/081111_gaming.htm" />
  <row Id="38440" PostHistoryTypeId="1" PostId="16637" RevisionGUID="074e8332-2155-430f-b635-93cd98417ab7" CreationDate="2011-08-31T02:45:22.157" UserId="9602" Text="Are games designed to be addiciting?" />
  <row Id="38441" PostHistoryTypeId="3" PostId="16637" RevisionGUID="074e8332-2155-430f-b635-93cd98417ab7" CreationDate="2011-08-31T02:45:22.157" UserId="9602" Text="&lt;game-design&gt;" />
  <row Id="38442" PostHistoryTypeId="2" PostId="16638" RevisionGUID="1595ba8d-797e-4212-a4f3-7e4b1d64677a" CreationDate="2011-08-31T03:11:44.883" UserId="6388" Text="&lt;h2&gt;Short Answer&lt;/h2&gt;&#xD;&#xA;Some games are designed purely to be addictive, without regards to any depth to gameplay or aesthetics/narrative.&#xD;&#xA;Other times addictiveness is merely a happy side-product of well designed gameplay.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;h2&gt;Long Answer&lt;/h2&gt;&#xD;&#xA;&#xD;&#xA;In terms of games as a money-making industry, the design of a game vis-a-vis its addictiveness depends entirely on the payment structure of the game.&#xD;&#xA;&#xD;&#xA;For instance, Zynga is a well-known producer of facebook games such as Farmville. Addictiveness to the product is very desirable for them, as they work off the freemium payment model, whereby you can play for free, but to speed things up or get the good stuff, you need to make a per-item payment. For them, the more you play the game, the more likely you are to give them money.&#xD;&#xA;Addictiveness is so important to this model that there are in fact credible rumors that Zynga has psycho-analysts on payroll to analyse and help increase the addictive qualities of their products.&#xD;&#xA;&#xD;&#xA;On the other hand, consider a game like Quake. You pay to purchase the game. From that point on, you pay no more money, but the longer you play, the more you actually diminish their profits, via an increased maintenance cost (releasing fixes and patches) and server costs (for hosting the servers. I can't remember if quake had public-dedicated servers or only official ones, but you get my point).&#xD;&#xA;From their perspective, as long as you buy the sequel, if you bought it day one and didn't play it longer than an hour, mission accomplished.&#xD;&#xA;&#xD;&#xA;However, throwing a spanner into the works is this idea of &quot;community&quot;. If you keep people playing, but more importantly **talking about** your game, you can command a greater control of the mindshare. This is very important for selling merchandise, increasing hype and thus sales of sequels/spinoffs, and generating goodwill. Thus, the moderate costs of maintaining a game and it's community can lead to a massive payout for future endeavours.&#xD;&#xA;" />
  <row Id="38443" PostHistoryTypeId="2" PostId="16639" RevisionGUID="458bc7d0-b622-4c82-9130-3e102c2b9b22" CreationDate="2011-08-31T03:31:57.477" UserId="6388" Text="&lt;h2&gt;Mediums of Experimentation&lt;/h2&gt;&#xD;&#xA;Analogue mediums are great for getting started. Mediums such as card games, board game and pen-and-paper RPGs like Dungeons and Dragons require no computer skills, and teach you some universal truths to game design that carry across all mediums.  &#xD;&#xA;&#xD;&#xA;If you're gung-ho on being digital, try map making first. I'd suggest downloading the Unreal Development Kit, and getting used to it's mapping tool (UnrealEd).  &#xD;&#xA;Once you're comfortable with that, you can explore Kismet, which is a graphical, node-based programming tool for UnrealEd. You can program interactions without having to write a line of code.  &#xD;&#xA;&#xD;&#xA;Ultimately, though, knowledge of a simple scripting language such as Lua or Python will help in your designing a great deal, if for no other reasons than to help you structure your thoughts logically. They're easing enough to pick up, and a wealth of free resources exist to teach you.&#xD;&#xA;&#xD;&#xA;&lt;hr/&gt;&#xD;&#xA;&lt;h2&gt; Progression of Design Expertise &lt;/h2&gt;  &#xD;&#xA;When learning any art form (I consider Game Design to be an art), there are 4 stages of progress one should always undergo:&#xD;&#xA; &#xD;&#xA;1. **Study and understand existing designs**. By expressing an interest in designing games, you've likely already done this for a while. Essentially, just look at existing games, new and retro, and try to divine the reasoning behind design choices.&#xD;&#xA;&#xD;&#xA;2. **Recreate**. Take an existing game, and go through the process of designing it from scratch. Compare your final piece to the original product, and try to understand the reasons behind any disparities.  &#xD;&#xA;This is important for developing an appreciation for more subtle aspects of design that often go unnoticed, yet can make the difference between a good game, and a great one.&#xD;&#xA;&#xD;&#xA;3. **Modify**. Take an existing design, and modify it somehow (ideally to improve upon it, but keeping it at the same final quality is also okay).  &#xD;&#xA;Design a Magic the Gathering card that is unique, yet balanced and powerful.  &#xD;&#xA;Think of how you could improve tetris or space invaders.    &#xD;&#xA;Modify De_dust2 to add a greater emphasis on teamwork.  &#xD;&#xA;Whatever changes you make, the effect of said changes should be intentional.&#xD;&#xA;&#xD;&#xA;4. **Original Design**. Using your experience modify games, make a new one from scratch.  &#xD;&#xA;  Write an original DnD campaign in a new setting.  &#xD;&#xA;  Create your own MTG-esque card game from scratch.  &#xD;&#xA;  Design a boardgame using an under-utilised theme with appropriate original mechanics.&#xD;&#xA;  Make your own map for CSS or TF2 or UT2k4 from scratch." />
  <row Id="38444" PostHistoryTypeId="2" PostId="16640" RevisionGUID="4f598b1e-ded8-4f96-afdb-1adccdd0a207" CreationDate="2011-08-31T03:36:11.640" UserId="9603" Text="My problem is, whenever I start programming a clone of a game (for practice) or my own game or some other problem I stop somewhere in the middle of the development, because I lost interest in it.&#xD;&#xA;&#xD;&#xA;How do you keep up the interest in developing a game, or developing in general?" />
  <row Id="38445" PostHistoryTypeId="1" PostId="16640" RevisionGUID="4f598b1e-ded8-4f96-afdb-1adccdd0a207" CreationDate="2011-08-31T03:36:11.640" UserId="9603" Text="How to get a game done?" />
  <row Id="38446" PostHistoryTypeId="3" PostId="16640" RevisionGUID="4f598b1e-ded8-4f96-afdb-1adccdd0a207" CreationDate="2011-08-31T03:36:11.640" UserId="9603" Text="&lt;programming&gt;&lt;motivation&gt;" />
  <row Id="38447" PostHistoryTypeId="2" PostId="16641" RevisionGUID="9a53cc24-a431-4289-bef5-0b206c7c25f8" CreationDate="2011-08-31T03:37:05.383" UserId="4306" Text="After doing some research, I found out about the marching cubes algorithm and &quot;metaballs&quot;. How exactly do they differ?" />
  <row Id="38448" PostHistoryTypeId="1" PostId="16641" RevisionGUID="9a53cc24-a431-4289-bef5-0b206c7c25f8" CreationDate="2011-08-31T03:37:05.383" UserId="4306" Text="What is the difference between the marching cubes algorithm and metaballs?" />
  <row Id="38449" PostHistoryTypeId="3" PostId="16641" RevisionGUID="9a53cc24-a431-4289-bef5-0b206c7c25f8" CreationDate="2011-08-31T03:37:05.383" UserId="4306" Text="&lt;algorithm&gt;&lt;3d-meshes&gt;&lt;procedural-generation&gt;" />
  <row Id="38450" PostHistoryTypeId="25" PostId="16614" RevisionGUID="01a6e080-4fb8-48f2-b84c-34f73efaad86" CreationDate="2011-08-31T03:38:05.640" Comment="http://twitter.com/#!/StackGameDev/status/108745346183729152" />
  <row Id="38452" PostHistoryTypeId="2" PostId="16642" RevisionGUID="bb4bb12d-e9da-4c6f-80bf-f8173dacedce" CreationDate="2011-08-31T03:46:23.307" UserId="4306" Text="I try to find some easier part to make. Like if I can't figure out how to make something or don't wan't to, I shift gears and model or write a shader, etc.&#xD;&#xA;&#xD;&#xA;See [this][1] and [this][2] other post.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://gamedev.stackexchange.com/questions/85/how-can-i-effectively-manage-a-hobby-game-project&#xD;&#xA;  [2]: http://gamedev.stackexchange.com/questions/16625/getting-past-boring-content-creation" />
  <row Id="38453" PostHistoryTypeId="2" PostId="16643" RevisionGUID="bf0b0425-ad72-4ea7-95a0-1b35391aa586" CreationDate="2011-08-31T04:12:21.563" UserId="825" Text="I'm not sure if the exact video you're looking for is included in this collection, but the link below includes 23 different lectures by EA employees on various aspects of game development:&#xD;&#xA;&#xD;&#xA;[Electronic Arts: Game Development Lectures][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://academicearth.org/courses/electronic-arts-game-development&#xD;&#xA;&#xD;&#xA;If nothing else, at least hopefully you can find something interesting and worthwhile in one of those videos.  Good luck!" />
  <row Id="38454" PostHistoryTypeId="2" PostId="16644" RevisionGUID="4892cea2-fabe-489a-81e3-4d42c658a033" CreationDate="2011-08-31T04:32:56.993" UserId="6998" Text="We are using JSON right now and want to move to a binary format for some types of messages between client and server.&#xD;&#xA;&#xD;&#xA;Should I just read structs into the socket?  Use proticol buffers/thrift?&#xD;&#xA;&#xD;&#xA;How should I represent arrays of data?&#xD;&#xA;&#xD;&#xA;What should the interface look like for packing/unpacking data?" />
  <row Id="38455" PostHistoryTypeId="1" PostId="16644" RevisionGUID="4892cea2-fabe-489a-81e3-4d42c658a033" CreationDate="2011-08-31T04:32:56.993" UserId="6998" Text="What are the best ways to serialize and unserialize network messages for C/C++ multiplayer game?" />
  <row Id="38456" PostHistoryTypeId="3" PostId="16644" RevisionGUID="4892cea2-fabe-489a-81e3-4d42c658a033" CreationDate="2011-08-31T04:32:56.993" UserId="6998" Text="&lt;network&gt;&lt;multiplayer&gt;" />
  <row Id="38457" PostHistoryTypeId="2" PostId="16645" RevisionGUID="f0cfa7a1-0641-404c-bf3d-add86a62bbf2" CreationDate="2011-08-31T04:41:55.990" UserId="2132" Text="You have to identify the problem before you can solve it. Why do you lose interest? &#xD;&#xA;&#xD;&#xA;For me, it usually happens because I am spending so much time on the framework, and after weeks, I couldn't even get a single gameplay element up. &#xD;&#xA;&#xD;&#xA;One way I find to improve my motivation is to do iterative prototyping, or some form of Test Driven Development. Usually that involves automating test cases, but as games are graphics intensive, you can't automate screens and animations as tests, but your game logic could be automated.&#xD;&#xA;&#xD;&#xA;For the parts which can't be automated, basically I'll plan a couple of milestones for the game. Milestone 1 probably would be render a sprite on the screen and get WASD to work, for example. Gradually, I will add more features, and refactor. &#xD;&#xA;&#xD;&#xA;It's a form of divide and conquer. Break into small chuncks, work on the one you are comfortable with, then integrate. Rinse and repeat. Eventually you may see a better way of re-arranging stuff, and you can refactor your code. It's messy not to have an architecture up front, but usually when getting started in programming it's hard to visualize the architecture till you have some years of experience." />
  <row Id="38458" PostHistoryTypeId="2" PostId="16646" RevisionGUID="86d49ef6-3d79-4130-8072-0af93ea37542" CreationDate="2011-08-31T04:57:04.620" UserId="953" Text="The two are totally different. Marching cubes is a conversion algorithm, while metaballs are mathematical constructs that can be used to represent certain 3D models.&#xD;&#xA;&#xD;&#xA;Marching cubes is a technique that lets you convert a non-polygonal 3D model (such as one represented by voxels) to a polygonal one. It works by examining cube-shaped chunks of the model and representing each chunk with a certain pre-defined arrangement of polygons based on which corners of the cube are solid.&#xD;&#xA;&#xD;&#xA;Metaballs provide a non-polygonal way of defining 3D models mathematically as a set of 3D points (the metaballs) that sort of glob together as if they were made of magnetic goo. Metaball models tend to do well at curvy surfaces and not very well at sharp, angular, or flat ones.&#xD;&#xA;&#xD;&#xA;Marching cubes can be used to convert a metaball model into a polygonal one that's easy to render using your everyday 3D card.&#xD;&#xA;&#xD;&#xA;Wikipedia's articles on the topics are decent." />
  <row Id="38460" PostHistoryTypeId="25" PostId="16644" RevisionGUID="c2c82dff-d615-4b90-907e-15cb50173c59" CreationDate="2011-08-31T06:38:05.533" Comment="http://twitter.com/#!/StackGameDev/status/108790644440449025" />
  <row Id="38461" PostHistoryTypeId="2" PostId="16648" RevisionGUID="167d0be5-da96-4fb2-a370-98c8148b4531" CreationDate="2011-08-31T07:07:28.643" UserId="9608" Text="Try tool like Game Salad.&#xD;&#xA;&#xD;&#xA;www.GameSalad.com&#xD;&#xA;&#xD;&#xA;You need not have ANY programming knowledge, its so easy to use tool.&#xD;&#xA;&#xD;&#xA;Hope you will find it useful." />
  <row Id="38462" PostHistoryTypeId="2" PostId="16649" RevisionGUID="dcf8fd7d-b250-491e-a919-489eb620245b" CreationDate="2011-08-31T07:39:30.523" UserId="9609" Text="While I cannot be sure without looking at your code, it sounds like your problem is the garbage collector.&#xD;&#xA;In Java, you have major and minor garbage collections taking place every now and then. The minor use up some of your cpu but wont bug you too much. The major collections can be a real problem for real time apps such as games since they will actually pause everything while they are running.&#xD;&#xA;&#xD;&#xA;There are two options to solve this. First you can tweak the JVM to make sure less major collections take place.&#xD;&#xA;Secondly (and recommended), you can make sure you do not leave too much garbage. Simply check where in your app you create a lot of objects(in my games those are usually the vector3 classes) and make sure you reuse them as much as possible (especially in inner loops etc)." />
  <row Id="38463" PostHistoryTypeId="2" PostId="16650" RevisionGUID="5e15bc1e-18d9-4407-b8fb-77e7a46d27f1" CreationDate="2011-08-31T07:45:36.990" UserId="5497" Text="As a designer, I tend to think of people as collections of stats and variables. When you pose your question, I can easily picture [Pong_Dev_Interest] decreasing and [Spa_Inv_Dev_Interest] increasing. When the difference between the two is greater than [Dev_Project_Inertia] (somewhat related to [Dev_Completion_Desire]), activity on [Pong_Dev] halts and [Spa_Inv_Dev] starts.&#xD;&#xA;&#xD;&#xA;In English: You fail to complete the project because your raw desire to see a finished product is overridden by your lack of interest in the current project. If you *really* want to finish one, the only solution is to pick one (I'd go with your pong clone) and *finish it*. Say to yourself &quot;Self, I know that maybe I could have refined that clone some more but gosh darn it sure feels good to kick a project out the door&quot;. Then keep working.&#xD;&#xA;&#xD;&#xA;When you are bored, keep working. When it's going great, keep working. When it's falling to crap, keep working! Persevere! Be the Little Dev That Could! I believe in you!&#xD;&#xA;&#xD;&#xA;Ahem. Got a bit overexuberant there. But you get the drift.&#xD;&#xA;&#xD;&#xA;I am following my own advice daily. I got my environment and actors working, built in my win and loss conditions and created the objects the Player will use. I'm basically ready to start doing some level design and my interest tanked. But I do some every day. *Every* day. One day I will be done.&#xD;&#xA;&#xD;&#xA;And it will feel so goooooood.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38464" PostHistoryTypeId="2" PostId="16651" RevisionGUID="b4cef35a-1a0a-454d-b926-7329dc56119a" CreationDate="2011-08-31T07:55:53.390" UserId="9611" Text="Assuming...&#xD;&#xA;&#xD;&#xA; 1. you are talking about converting to a buffer of bytes&#xD;&#xA; 2. You are using UDP and performance is a concern&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Try to avoid wasting space in your packet for defining structure.&#xD;&#xA;I.E. send, at minimum, a byte to denote the type of packet, then just assume each packet received follows the predefined structure for that type of packet&#xD;&#xA;&#xD;&#xA;&gt; Should I just read structs into the socket? Use proticol&#xD;&#xA;&gt; buffers/thrift?&#xD;&#xA;&#xD;&#xA;- Yes, read the whole struct IF you NEED the whole struct&#xD;&#xA;- No, make the packet structure yourself, This will surely be smaller than serialization using these methods; you should know exactly what data the packet should include&#xD;&#xA;&#xD;&#xA;&gt; How should I represent arrays of data?&#xD;&#xA;&#xD;&#xA; - As arrays of data. When receiving continue reading the buffer until end of data to avoid sending a Count of the array's elements&#xD;&#xA;&#xD;&#xA;&gt; What should the interface look like for packing/unpacking data?&#xD;&#xA;&#xD;&#xA;- You could easily setup a bunch of methods to convert basic types to bytes, from there build on these methods to convert custom types as well. The specifics on *how* to do this could be found almost anywhere I'm sure (I use C# personally)&#xD;&#xA;&#xD;&#xA;One last thing, packet size *is* a concern, especially for a snapshot: size = packetSize x entities x  connectedPlayers;&#xD;&#xA;So you might have 60 x 10 x 16 = 9,600 bytes per packet&#xD;&#xA;Then sending this 20 times a second: = 192,000 bps = 187 KBps. This is obviously a high bandwith upload speed. Thus the need to minimize each of the factors contributing to packet size where possible.&#xD;&#xA;&#xD;&#xA;This article has helped me immensely:&#xD;&#xA;[Valve Multiplayer Networking][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking" />
  <row Id="38465" PostHistoryTypeId="2" PostId="16652" RevisionGUID="977c6832-73e4-4421-851b-ee7a0749f93f" CreationDate="2011-08-31T07:56:14.060" UserId="6188" Text="... or better yet, removing the need to search the map altogether.&#xD;&#xA;&#xD;&#xA;I'm either looking for suggestions on how to optimize my code, or a change in design.&#xD;&#xA;&#xD;&#xA;In my component-based entity system, the Entity is comprised of Attribute and Behavior objects. The Behavior objects are just stored in an std::vector; they are no issue, I just call their update function.&#xD;&#xA;&#xD;&#xA;Attributes, I store in a map of `&lt;std::string, Attribute&gt;` and they represent the path of communication between Behaviors (Behaviors never interact directly). When a Behavior needs an attribute it searches its Entity's map.&#xD;&#xA;&#xD;&#xA;That's a bit problematic for Behaviors that access that information a few times a second, like the Rendering behavior (draws the Entity on-screen). Rendering needs to read the Position, the Orientation, and a few other things, and it needs to do that a few times a second.&#xD;&#xA;&#xD;&#xA;How can I solve this issue? It should also be noted that the base classes Entity, Attribute, and Behavior are written in C++, but their implementations in Python. " />
  <row Id="38466" PostHistoryTypeId="1" PostId="16652" RevisionGUID="977c6832-73e4-4421-851b-ee7a0749f93f" CreationDate="2011-08-31T07:56:14.060" UserId="6188" Text="Searching a map fewer times" />
  <row Id="38467" PostHistoryTypeId="3" PostId="16652" RevisionGUID="977c6832-73e4-4421-851b-ee7a0749f93f" CreationDate="2011-08-31T07:56:14.060" UserId="6188" Text="&lt;c++&gt;&lt;python&gt;&lt;component-based&gt;&lt;optimization&gt;" />
  <row Id="38468" PostHistoryTypeId="2" PostId="16653" RevisionGUID="5ca7f83b-8973-4c1d-a52c-383322e3eae8" CreationDate="2011-08-31T08:03:10.690" UserId="5473" Text="Before I say anything else -- Is this causing problems? Because if its not causing problems, don't prematurely optimise it. I'm sorry if you already knew that, but it had to be said. If you don't know the old Knuth saying, I'll note it here for you.&#xD;&#xA;&#xD;&#xA;Otherwise... Too much indirection is very often going to be a problem in real-time simulations. If you overarchitect things, this is the kind of wall you may well hit. You already know what the problem is; I guess it's time to make decisions about where it is *really* necessary to have that level of indirection. With entity systems, it is better to keep things very simple, as in terms of game logic this is &quot;the metal&quot; so to speak. Better to keep all that metal really close together.&#xD;&#xA;&#xD;&#xA;The only other solution I can suggest is to use a much more efficient data structure... if that is possible in your case.&#xD;&#xA;&#xD;&#xA;Why, if I may ask, is it a problem for your Behaviours (which are I think what I and I others would call entity components) to talk directly to one another?&#xD;&#xA;&#xD;&#xA;I can suggest an article: [Coding Cowboy -- Evolve Your Hieararchy][1]. It should give you a bit of insight into how simple this can be, and has been in many games. In the article, the author is referring to the development of the early Tony Hawk games in particular.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" />
  <row Id="38469" PostHistoryTypeId="2" PostId="16654" RevisionGUID="43f98dbd-e2b4-4eb1-add1-7be8f292cb04" CreationDate="2011-08-31T08:09:14.173" UserId="1510" Text="I know this is only partially game development related, but couldnt find another place to ask.&#xD;&#xA;&#xD;&#xA;How can i convert an autocad dwg or dxf file to a more 'common' format like OBJ, FBX, 3DS, etc. ?&#xD;&#xA;&#xD;&#xA;i tried directly using autocad LT but the export options dont have any other format.s&#xD;&#xA;&#xD;&#xA;free and oss solutions preferred." />
  <row Id="38470" PostHistoryTypeId="1" PostId="16654" RevisionGUID="43f98dbd-e2b4-4eb1-add1-7be8f292cb04" CreationDate="2011-08-31T08:09:14.173" UserId="1510" Text="Convert DWG to OBJ, FBX" />
  <row Id="38471" PostHistoryTypeId="3" PostId="16654" RevisionGUID="43f98dbd-e2b4-4eb1-add1-7be8f292cb04" CreationDate="2011-08-31T08:09:14.173" UserId="1510" Text="&lt;3d&gt;&lt;file-format&gt;" />
  <row Id="38472" PostHistoryTypeId="4" PostId="16654" RevisionGUID="c9288495-bd16-4748-aff6-497d2dc3a0d7" CreationDate="2011-08-31T08:18:31.077" UserId="1510" Comment="edited title" Text="Convert Autocad DWG to OBJ, FBX or similar" />
  <row Id="38473" PostHistoryTypeId="5" PostId="16653" RevisionGUID="7c39fefc-7c90-4d00-af79-8db087f7bf30" CreationDate="2011-08-31T08:26:37.580" UserId="5473" Comment="added 919 characters in body" Text="Before I say anything else -- Is this causing problems? Because if its not causing problems, don't prematurely optimise it. I'm sorry if you already knew that, but it had to be said. If you don't know the old Knuth saying, I'll note it here for you.&#xD;&#xA;&#xD;&#xA;Otherwise... Too much indirection is very often going to be a problem in real-time simulations. If you overarchitect things, this is the kind of wall you may well hit. You already know what the problem is; I guess it's time to make decisions about where it is *really* necessary to have that level of indirection. With entity systems, it is better to keep things very simple, as in terms of game logic this is &quot;the metal&quot; so to speak. Better to keep all that metal really close together.&#xD;&#xA;&#xD;&#xA;The only other solution I can suggest is to use a much more efficient data structure... if that is possible in your case.&#xD;&#xA;&#xD;&#xA;Why, if I may ask, is it a problem for your Behaviours (which are I think what I and I others would call entity components) to talk directly to one another?&#xD;&#xA;&#xD;&#xA;I can suggest an article: [Coding Cowboy -- Evolve Your Hieararchy][1]. It should give you a bit of insight into how simple this can be, and has been in many games. In the article, the author is referring to the development of the early Tony Hawk games in particular.&#xD;&#xA;&#xD;&#xA;EDIT: (In response to your 1st and 2nd comments) No, they wouldn't have to query the entity. That's the problem! You give each component a fixed reference to any component it depends on, from the time that these dependencies are injected. For example, a pathfinding component is going to need to reference the spatial component; without that, it cannot know where it is and thus cannot pathfind. So you either inject all these components into your entity in the right order at the start (usually your entity factories will do this), or you build an intelligent system into every entity to recheck all dependencies on a new component addition, and set fixed refs between them. But the fixed references are a necessity, otherwise you will face exactly the problem you are facing now -- no matter how you look at it, lookups have a cost and they do not belong at this point in your architecture, in any real-time game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" />
  <row Id="38474" PostHistoryTypeId="5" PostId="16653" RevisionGUID="36e95c91-2fc1-4ace-af8d-5b4344369a2d" CreationDate="2011-08-31T08:31:53.873" UserId="5473" Comment="added 919 characters in body" Text="Before I say anything else -- Is this causing problems? Because if its not causing problems, don't prematurely optimise it. I'm sorry if you already knew that, but it had to be said. If you don't know the old Knuth saying, I'll note it here for you.&#xD;&#xA;&#xD;&#xA;Otherwise... Too much indirection is very often going to be a problem in real-time simulations. If you overarchitect things, this is the kind of wall you may well hit. You already know what the problem is; I guess it's time to make decisions about where it is *really* necessary to have that level of indirection. With entity systems, it is better to keep things very simple, as in terms of game logic this is &quot;the metal&quot; so to speak. Better to keep all that metal really close together.&#xD;&#xA;&#xD;&#xA;The only other solution I can suggest is to use a much more efficient data structure... if that is possible in your case.&#xD;&#xA;&#xD;&#xA;Why, if I may ask, is it a problem for your Behaviours (which are I think what I and I others would call entity components) to talk directly to one another?&#xD;&#xA;&#xD;&#xA;I can suggest an article: [Coding Cowboy -- Evolve Your Hieararchy][1]. It should give you a bit of insight into how simple this can be, and has been in many games. In the article, the author is referring to the development of the early Tony Hawk games in particular.&#xD;&#xA;&#xD;&#xA;EDIT: (In response to your 1st and 2nd comments) No, they wouldn't have to query the entity. That's the problem! Every individual EntityComponent *has to* have fixed references to other EntityComponents which it bears relevance to, or which bear relevance to it (depending on how you look at things). You problem is you're doing a lookup on every update. What I'm saying is you are meant to do this only *once*: You give each component a fixed reference to any component it depends on, from the time that these dependencies are injected, meaning, for example, that a pathfinding component is going to need to reference the spatial component; without it, it cannot know where it sits in space, and thus cannot pathfind. So you either inject all these components into your entity in the right order on entity creation (usually your entity factories will do this), or you build an intelligent system into your base entity class that rechecks all dependencies on every new component addition, and set fixed refs between them. But the fixed references are a necessity, otherwise you will face exactly the problem you are facing now -- no matter how you look at it, lookups have a cost and they do not belong at this point in your architecture, in any real-time game.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" />
  <row Id="38475" PostHistoryTypeId="25" PostId="16652" RevisionGUID="c1c92ec3-16c4-4c38-a32d-e95cfc5d9b68" CreationDate="2011-08-31T09:38:05.840" Comment="http://twitter.com/#!/StackGameDev/status/108835943045283840" />
  <row Id="38476" PostHistoryTypeId="2" PostId="16655" RevisionGUID="d4c18ff4-adb0-4db4-901c-391330114419" CreationDate="2011-08-31T10:37:16.383" UserId="8373" Text="I don't know if I'm just not looking in the right place, but I can't find ID3D10EffectShaderResourceVariable::SetResourceArray anywhere in SlimDX. &#xD;&#xA;&#xD;&#xA;Anyone have any idea how I should be calling this?" />
  <row Id="38477" PostHistoryTypeId="1" PostId="16655" RevisionGUID="d4c18ff4-adb0-4db4-901c-391330114419" CreationDate="2011-08-31T10:37:16.383" UserId="8373" Text="ID3D10EffectShaderResourceVariable::SetResourceArray in SlimDX" />
  <row Id="38478" PostHistoryTypeId="3" PostId="16655" RevisionGUID="d4c18ff4-adb0-4db4-901c-391330114419" CreationDate="2011-08-31T10:37:16.383" UserId="8373" Text="&lt;slimdx&gt;&lt;directx10&gt;" />
  <row Id="38479" PostHistoryTypeId="2" PostId="16656" RevisionGUID="a5f9e9e4-ab68-4f21-b510-6c8ad0389803" CreationDate="2011-08-31T10:43:24.207" UserId="1101" Text="Swap the map for a hash_map or an unordered_map (whatever your compiler supports)." />
  <row Id="38480" PostHistoryTypeId="2" PostId="16657" RevisionGUID="3789ef23-2104-4855-9d03-6919742b54bf" CreationDate="2011-08-31T11:31:11.493" UserId="8498" Text="I'm writing a game that needs to save a lot of detailed data (exact trajectories of some entities) to an external file. I want to save drive space and bandwidth by compressing it, but I've never done this, so I don't know if there is a preferred way to do it.&#xD;&#xA;&#xD;&#xA;Of course the compression-decompression should not affect the speed of the game too much." />
  <row Id="38481" PostHistoryTypeId="1" PostId="16657" RevisionGUID="3789ef23-2104-4855-9d03-6919742b54bf" CreationDate="2011-08-31T11:31:11.493" UserId="8498" Text="Compressing game save data" />
  <row Id="38482" PostHistoryTypeId="3" PostId="16657" RevisionGUID="3789ef23-2104-4855-9d03-6919742b54bf" CreationDate="2011-08-31T11:31:11.493" UserId="8498" Text="&lt;compression&gt;" />
  <row Id="38483" PostHistoryTypeId="2" PostId="16658" RevisionGUID="f2578dda-37bf-4bf3-9d94-7c6ad925fef6" CreationDate="2011-08-31T12:03:58.380" UserId="5006" Text="When all else fails, there's always the option of finding a partner who is interested in content creation.  If you have friends that play the type of game you're making perhaps one of them is interested.&#xD;&#xA;&#xD;&#xA;Game enthusiasts who aren't necessarily programmers are likely your best bet.  It doesn't even have to be people who've worked with game creation, many people with a deep love of games have the potential to create great content depending on their other talents (e.g. a writer, artist, someone who really loves puzzles, etc)." />
  <row Id="38484" PostHistoryTypeId="2" PostId="16659" RevisionGUID="6bf9a6a4-9ce2-452a-b2b1-ca1ebef259e8" CreationDate="2011-08-31T12:15:47.830" UserId="9016" Text="The [zlib](http://zlib.net/) library has bindings for most programming languages, and is quite fast. However, you should compare various comperssion algorithms, because one algorithm may achieve better compression rates on *your* kind of data than on the general case." />
  <row Id="38485" PostHistoryTypeId="25" PostId="16657" RevisionGUID="0bb4e5fe-1243-409d-986a-504ad5b896f0" CreationDate="2011-08-31T12:38:06.030" Comment="http://twitter.com/#!/StackGameDev/status/108881244485468160" />
  <row Id="38486" PostHistoryTypeId="2" PostId="16660" RevisionGUID="cbd1b916-472f-4efa-a5c1-dba0ab86f98f" CreationDate="2011-08-31T12:59:30.990" UserId="9619" Text="I've been looking into web services for making multiplayer games and was just wondering how feasible would it be?&#xD;&#xA;&#xD;&#xA;What I would like to do is make a simple MMORPG that uses a turn based fighting system, are there any inherent limitations with web services which would make this difficult and not worth my time?&#xD;&#xA;&#xD;&#xA;Also out of curiosity would a faster paced multiplayer game be workable using web services? Something like a top/down shooter similar in pace to games like asteroid?&#xD;&#xA;&#xD;&#xA;Thanks for nay help!" />
  <row Id="38487" PostHistoryTypeId="1" PostId="16660" RevisionGUID="cbd1b916-472f-4efa-a5c1-dba0ab86f98f" CreationDate="2011-08-31T12:59:30.990" UserId="9619" Text="Using a web service for multiplayer games?" />
  <row Id="38488" PostHistoryTypeId="3" PostId="16660" RevisionGUID="cbd1b916-472f-4efa-a5c1-dba0ab86f98f" CreationDate="2011-08-31T12:59:30.990" UserId="9619" Text="&lt;network&gt;&lt;multiplayer&gt;&lt;mmo&gt;&lt;web&gt;" />
  <row Id="38489" PostHistoryTypeId="2" PostId="16661" RevisionGUID="098d79e6-34c1-40fc-bc2b-e55a0a66851d" CreationDate="2011-08-31T13:01:23.190" UserId="6422" Text="One, possibly extreme way of compressing data is to record only the steps/inputs used to create it. Something like what ModNation Racer does (curse those long loading times as it re-creates the track). (Google for videos of the track editor in ModNation Racer).&#xD;&#xA;&#xD;&#xA;i.e. if i was storing some terrain, i'd store all the manipulations starting from a flat plain. i.e. apply the volcano shaped brush with this force, here. Apply the terrain smoothing operation over this area, with this force. Add my predefined object here. Using bezier-curve-like curves with 'key-frames' to construct an entire track/flight path/whatever." />
  <row Id="38490" PostHistoryTypeId="2" PostId="16662" RevisionGUID="75a854ac-c4ac-408e-b913-4af9d41c6c75" CreationDate="2011-08-31T13:03:30.457" UserId="9617" Text="If you don't know how to correctly structure a game, you should start learning how to abstract their elements into game-independant blocks. &#xD;&#xA;This may help you in many ways (besides being interesting), such as: experience dividing abstractions from implementations, a better exploiting of inheritance and interface design, or just how to put the game into multiple files for it to look pro (or to provide a fexibility of implementations by the use of dynamic link libraries or other interface uses). Sooner or later you'll realize that everything can be done and then you will find yourself without that motivation problem anymore (you just do it).&#xD;&#xA;&#xD;&#xA;I had the same problem when I got stuck at first, but the best solution is to keep moving, or you can stall forever until something resets you somehow (and it may take too long). It doesn't matter if you just code 2 lines some days, but every day you have at least to open the project and try to improve something (it's a neverending task but that's not the problem). &#xD;&#xA;&#xD;&#xA;If at some point the program doesn't work, you should undo what you did last (keep a backup use an svn or at least a .rar with the name of the date) to a point it did work, and try to do it again, or work on other changes you need to do until you want to try again. &#xD;&#xA;&#xD;&#xA;At first you should try to fix the error with the help of the debugger, but I don't know if your language even supports a debugger... but if you by chance use C++ or something like that (which I would recommend if you want to make games), you should make better use of your debugger as it will help you a lot for finding the error fast in a single run. &#xD;&#xA;&#xD;&#xA;Reading about game programming is also a good thing to keep on the topic if you don't want to work on anything in particular. There are some good books and articles about game engines and design you can find online.&#xD;&#xA;&#xD;&#xA;You won't be able to do anything if you don't practice. Trying to find a bug can be very frustrating at first but then you learn that it's actually easy if you know how to do it. This is something you learn how to avoid with the time, by coding in a way your changes don't impact in the whole program, decreasing the amount of places on where to look for the error. If every time it gets difficult you give up, then every next time you think on making a game you will give up before starting. Just learn how to overcome the bad moment by overcoming it :P If you don't pass through that moment in which you lose motivation, your laziness will win, and you will lose, that's how it works, until you learn how to regain motivation without much effort.&#xD;&#xA;&#xD;&#xA;PS I was wondering... what are you using to make the game? " />
  <row Id="38491" PostHistoryTypeId="5" PostId="16661" RevisionGUID="8c69031a-92d8-4066-bcbd-b93dc87431d8" CreationDate="2011-08-31T13:06:53.667" UserId="6422" Comment="added 194 characters in body" Text="One, possibly extreme way of compressing data is to record only the steps/inputs used to create it. Something like what ModNation Racer does (curse those long loading times as it re-creates the track). (Google for videos of the track editor in ModNation Racer).&#xD;&#xA;&#xD;&#xA;i.e. if i was storing some terrain, i'd store all the manipulations starting from a flat plain. i.e. apply the volcano shaped brush with this force, here. Apply the terrain smoothing operation over this area, with this force. Add my predefined object here. Using bezier-curve-like curves with 'key-frames' to construct an entire track/flight path/whatever.&#xD;&#xA;&#xD;&#xA;Many other games do this sort of thing not just for level loading, but for gameplay too, by making the game deterministic, sending only player inputs (i think PixelJunk Shooter 2 does this)." />
  <row Id="38492" PostHistoryTypeId="5" PostId="6468" RevisionGUID="fc5b9918-8f43-42f8-96ec-c9d5838a380f" CreationDate="2011-08-31T13:30:14.360" UserId="3974" Comment="edited body" Text="The problems with an MMO can be broken down into 4 major groups. All of which can be solved. Or at least reduced somewhat. However, you'll have to sacrifice your personal vision of the game to do it, in most cases.&#xD;&#xA;&#xD;&#xA;**Content**&#xD;&#xA;&#xD;&#xA;There are many ways to solve the Content problem. The obvious one is collecting a ton of talented people and paying them to make the content. However, this isn't the only way. It can be done on the cheap/slow through various channels. The most elegant is the user-generated model. Some examples of user-generated content in MMOs are the recent lego universe MMO (however in very limited scope) and, of course, second life.&#xD;&#xA;&#xD;&#xA;But you can take this much further. Kingdom of loathing is a fine example of a system that would lend itself well to user-generated content. (they chose not to do that) Enemies consist of a static hand-drawn image, and various stats and attacks that come from a pool of possible attacks. Each of these elements could be user generated. Finding unique ways to get the users to make your weapons, armor, spells, enemies, cities, countryside, attacks, and even quests and NPCs is a perfectly viable way to source your content. You simply need to bear in mind that this content will never be particularly on-point with a story. It will be what the users want it to be.&#xD;&#xA;&#xD;&#xA;For 3D? Look towards games like Spore.&#xD;&#xA;&#xD;&#xA;**Billing**&#xD;&#xA;&#xD;&#xA;Yes, billing can be a terribly expensive proposition. However, there are ways to make this easier. Such as paypal. Yes, you'll be asking your users to all have paypal to play, but it certainly doesn't have to stay as paypal only if the game takes off.&#xD;&#xA;&#xD;&#xA;**Programming**&#xD;&#xA;&#xD;&#xA;The trick with any MMO is to build systems that accept any data. Don't program spells. Program a universal spell system that accepts data from a database or file to create spells. Don't program quests, program the tools you use to make quests.&#xD;&#xA;&#xD;&#xA;Start very simple. Get the core mechanics in place. Consider using an already existing platform. But go about it smartly.&#xD;&#xA;&#xD;&#xA;Maybe open source?&#xD;&#xA;&#xD;&#xA;**Hosting**&#xD;&#xA;&#xD;&#xA;No matter what, this will cost you. But it doesn't have to start costing you right away. If you are willing to languish in obscurity for a few years, you can slowly build a passionate following and use the money you do make to upgrade. Keep the game simple. Don't ask too much from your hardware. And push off as much as you can to the users.&#xD;&#xA;&#xD;&#xA;Pioneer something in bit-torrent and validate through multiple peers responding. You might be able to eliminate the server entirely. Or at least relegate it only doing very important things. However, I don't know of anyone out there doing this." />
  <row Id="38493" PostHistoryTypeId="6" PostId="16644" RevisionGUID="81984135-a478-4261-94e2-950fc3cbe729" CreationDate="2011-08-31T14:30:29.280" UserId="4564" Comment="added tags" Text="&lt;c++&gt;&lt;network&gt;&lt;multiplayer&gt;&lt;c&gt;" />
  <row Id="38494" PostHistoryTypeId="24" PostId="16644" RevisionGUID="81984135-a478-4261-94e2-950fc3cbe729" CreationDate="2011-08-31T14:30:29.280" Comment="Proposed by 4564 approved by 1430 edit id of 687" />
  <row Id="38495" PostHistoryTypeId="2" PostId="16663" RevisionGUID="4be019d0-21e7-432b-8f2b-d2e9c390fc32" CreationDate="2011-08-31T14:43:48.790" UserId="9616" Text="I can create an Action with parameters using an Actiondefintion.&#xD;&#xA;&#xD;&#xA;![enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But how can I create an Eventdefinition ? I'd like to make an Event that is 'called' when a Unit, that is saved in a variable, dies. Like an Event called 'My unit dies'.&#xD;&#xA;&#xD;&#xA;![enter image description here][2]&#xD;&#xA;&#xD;&#xA;The  desired behavior is the following:&#xD;&#xA;&#xD;&#xA;- Called when a unit defined in a variable dies&#xD;&#xA;- the deceased unit should be returned by 'Triggering Unit()'&#xD;&#xA;- the owning player of the deceased unit should be returned by 'Triggering Player()'&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope you get my point,&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;  [1]: http://i.stack.imgur.com/Uqur0.jpg&#xD;&#xA;  [2]: http://i.stack.imgur.com/kGfq0.jpg" />
  <row Id="38496" PostHistoryTypeId="1" PostId="16663" RevisionGUID="4be019d0-21e7-432b-8f2b-d2e9c390fc32" CreationDate="2011-08-31T14:43:48.790" UserId="9616" Text="Starcraft II Galaxy Editor - Eventdefinition" />
  <row Id="38497" PostHistoryTypeId="3" PostId="16663" RevisionGUID="4be019d0-21e7-432b-8f2b-d2e9c390fc32" CreationDate="2011-08-31T14:43:48.790" UserId="9616" Text="&lt;modification&gt;&lt;starcraft-2&gt;&lt;map-editor&gt;" />
  <row Id="38498" PostHistoryTypeId="2" PostId="16664" RevisionGUID="468fb132-7c78-4bd8-8538-5c2e9ca735e4" CreationDate="2011-08-31T14:49:11.167" UserId="8781" Text="The developer of [Brogue][1] wrote an interesting article about how he uses what he calls &quot;Dijkstra Maps&quot; to accomplish this and other things:&#xD;&#xA;[http://roguebasin.roguelikedevelopment.org/index.php/The_Incredible_Power_of_Dijkstra_Maps][2]&#xD;&#xA;&#xD;&#xA;Basically, you run a variant of Dijkstra's algorithm to set a weight to every cell in your map. If you calculate one of these based on your player location, it provides a map of the quickest route from the player (or somewhere near the player) to any other point on the map. The global minimum will be the furthest point away from the player, which will necessarily be somewhere that wasn't blocked by a dead end.&#xD;&#xA;&#xD;&#xA;It's probably not the most efficient solution, but on roguelike-sized maps it seems to perform fine, and there are a lot of other cool applications for it that he mentions in the article.&#xD;&#xA;&#xD;&#xA;  [1]: http://sites.google.com/site/broguegame/home&#xD;&#xA;  [2]: http://roguebasin.roguelikedevelopment.org/index.php/The_Incredible_Power_of_Dijkstra_Maps" />
  <row Id="38499" PostHistoryTypeId="4" PostId="9881" RevisionGUID="2348f716-fcec-44ba-8e26-85b2a221334b" CreationDate="2011-08-31T15:21:08.463" UserId="5473" Comment="Meaninglessly redundant title changed." Text="Weird beat detection" />
  <row Id="38500" PostHistoryTypeId="24" PostId="9881" RevisionGUID="2348f716-fcec-44ba-8e26-85b2a221334b" CreationDate="2011-08-31T15:21:08.463" Comment="Proposed by 5473 approved by -1 edit id of 688" />
  <row Id="38501" PostHistoryTypeId="4" PostId="9881" RevisionGUID="0836d8d5-aab4-4477-8e73-f9c048d709f1" CreationDate="2011-08-31T15:21:08.603" UserId="1430" Comment="Meaninglessly redundant title changed." Text="Why is this beat detection code failing to register some beats properly?" />
  <row Id="38502" PostHistoryTypeId="2" PostId="16665" RevisionGUID="86f3b5e0-994d-4f01-b3aa-ec26c8ec68ca" CreationDate="2011-08-31T15:32:17.627" UserId="9622" Text="I'm developing a 2D RPG game, like Zelda. I've developed a first version, for studies.&#xD;&#xA;Now, I'd like rewrite it, in better way, with a different language.&#xD;&#xA;&#xD;&#xA;*My first question:* ***which language ? XNA or Java ?***&#xD;&#xA;&#xD;&#xA;Then, it is about the gameplay. The character has strength, agility, willpower, constitution, dexterity and concentration and has to fight monsters. Typical.&#xD;&#xA;&#xD;&#xA;But I'm a noob, and I would like advice for creating the game system that the characteristics for damages, level-up, resistance, and so on. The one I used in the first version was not balanced.&#xD;&#xA;&#xD;&#xA;So, ***what kind of system can I use ?***&#xD;&#xA;&#xD;&#xA;Any help would be grateful.&#xD;&#xA;&#xD;&#xA;P.S.: I posted this second question in the Role Play Forum, and they sent me here.&#xD;&#xA;(Sorry for my English, I'm not a English speaker)&#xD;&#xA;" />
  <row Id="38503" PostHistoryTypeId="1" PostId="16665" RevisionGUID="86f3b5e0-994d-4f01-b3aa-ec26c8ec68ca" CreationDate="2011-08-31T15:32:17.627" UserId="9622" Text="Game system for RPG video game in development" />
  <row Id="38504" PostHistoryTypeId="3" PostId="16665" RevisionGUID="86f3b5e0-994d-4f01-b3aa-ec26c8ec68ca" CreationDate="2011-08-31T15:32:17.627" UserId="9622" Text="&lt;2d&gt;&lt;character&gt;&lt;gameplay&gt;" />
  <row Id="38505" PostHistoryTypeId="25" PostId="16640" RevisionGUID="6d3b80bf-3885-45f4-8f5c-376ab7b312b2" CreationDate="2011-08-31T15:38:07.433" Comment="http://twitter.com/#!/StackGameDev/status/108926549033623554" />
  <row Id="38506" PostHistoryTypeId="2" PostId="16666" RevisionGUID="82e1a40a-7a93-4bc2-8918-47ddc9daa0f4" CreationDate="2011-08-31T15:39:34.990" UserId="9623" Text="What is procedure to convert 2d path to 3d one. Maybe it's a silly question, but for example.. &#xD;&#xA;&#xD;&#xA;Let's assume that I have some route direction (path) from point A to point B. And I have all X and Y coordinates of that path. Is it possible to convert that to 3d path, so for example to animate car driving along that path but in 3D. I don't need code or something, only confirmation is that possible and what kind of calculations or similar I need for that, so I will google it :)&#xD;&#xA;&#xD;&#xA;Thank you in advance!" />
  <row Id="38507" PostHistoryTypeId="1" PostId="16666" RevisionGUID="82e1a40a-7a93-4bc2-8918-47ddc9daa0f4" CreationDate="2011-08-31T15:39:34.990" UserId="9623" Text="Converting 2d path to 3d path" />
  <row Id="38508" PostHistoryTypeId="3" PostId="16666" RevisionGUID="82e1a40a-7a93-4bc2-8918-47ddc9daa0f4" CreationDate="2011-08-31T15:39:34.990" UserId="9623" Text="&lt;2d&gt;&lt;3d&gt;&lt;path-finding&gt;" />
  <row Id="38509" PostHistoryTypeId="2" PostId="16667" RevisionGUID="e204c4b9-8735-41a1-a7fa-c46e7014e28c" CreationDate="2011-08-31T15:43:02.257" UserId="4894" Text="Converting a path from 2D to 3D can be fairly easy, you just have to assume that your car is on a flat plane. Then for each point on the 2D path (x, y), you create a point in 3D (x, y, z) where the third component is 0. &#xD;&#xA;&#xD;&#xA;According to your 3D engine, the nul component will be y or z, but the idea is the same. " />
  <row Id="38510" PostHistoryTypeId="2" PostId="16668" RevisionGUID="647f1120-ba40-448f-b74a-0c9666ba14c8" CreationDate="2011-08-31T15:47:55.873" UserId="9617" Text="You have to consider that GPUs when fetching the data for feeding into the vertex shaders requires a lot of small calls because they can only cache a few triangles at the same time, and fetching data from the VRAM is a very slow operation. So I suppose that if you use half the bytes for the indices, the GPU will be able to fetch twice the indices for the cache to render triangles. &#xD;&#xA;&#xD;&#xA;4MB Can be a small amount of memory for storage space, but if you have to make a complex call to only process a few bytes from them it may affect performance in a noticeable way. Nowadays video cards are powerful enough to make it irrelevant in games which don't have to process a lot of geometry, you... could do some benchmarks rendering a model with both index sizes if you really want to know. &#xD;&#xA;&#xD;&#xA;Loading times are also faster with 16 bit indices, and actually every write or read, unless you can effectively control memory alignment and proper paging. So it's not just about the memory it requires but how much it takes to handle it. If you are working with dynamic buffers that need to be moved over the bus to the GPU at some point between grames, then you should use 16 bit indices when possible. If you are rendering even smaller geometries, you can batch many indices in a single 16 bit index buffer for them all to get copied to the GPU in a single call.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38511" PostHistoryTypeId="2" PostId="16669" RevisionGUID="e7277685-9fcb-4d8e-9662-982e61a85909" CreationDate="2011-08-31T15:48:34.433" UserId="3884" Text="What is the current state-of-the-art to network real-time strategy games?&#xD;&#xA;&#xD;&#xA;I seem to recall that a few years ago, some AAA titles only transmitted the player inputs (Starcraft 1, Age of Empires). Since this requires you to keep everything else totally deterministic, is this still a viable option? Synchronizing random number generators seems feasible, but what about subtle differences in FPU implementations etc..?&#xD;&#xA;&#xD;&#xA;Or are strategy games using something closer to action-game networking, where individual entities are transmitted instead (with some form of prediction and (delta) compression)?&#xD;&#xA;&#xD;&#xA;If so, how are volatile items like projectiles treated?&#xD;&#xA;&#xD;&#xA;What about client/server versus peer-to-peer? I'm guessing that all this is strongly interrelated.&#xD;&#xA;&#xD;&#xA;Thank you for your time!" />
  <row Id="38512" PostHistoryTypeId="1" PostId="16669" RevisionGUID="e7277685-9fcb-4d8e-9662-982e61a85909" CreationDate="2011-08-31T15:48:34.433" UserId="3884" Text="Networking in real-time strategy games" />
  <row Id="38513" PostHistoryTypeId="3" PostId="16669" RevisionGUID="e7277685-9fcb-4d8e-9662-982e61a85909" CreationDate="2011-08-31T15:48:34.433" UserId="3884" Text="&lt;algorithm&gt;&lt;network&gt;&lt;strategy&gt;" />
  <row Id="38514" PostHistoryTypeId="2" PostId="16670" RevisionGUID="623865ef-5378-4419-815a-7a386cbb392b" CreationDate="2011-08-31T15:52:45.853" UserId="2897" Text="Your car is driving on some map, I presume, so use your X and Y to sample Z at this point of the map via ray intersection with map mesh triangles. Just google &quot;ray intersections&quot; for hundreds of examples. Then add some offset reflecting car's height to it, and you're done." />
  <row Id="38515" PostHistoryTypeId="5" PostId="16665" RevisionGUID="670dc0a6-73f0-4bb3-9e4f-293d8e00259c" CreationDate="2011-08-31T15:55:54.617" UserId="51" Comment="removed language question, removed extra stuff at the end." Text="I'm developing a 2D RPG game, like Zelda. I've developed a first version, for studies.&#xD;&#xA;Now, I'd like rewrite it in better way&#xD;&#xA;&#xD;&#xA;The character has strength, agility, willpower, constitution, dexterity and concentration and has to fight monsters. Typical.&#xD;&#xA;&#xD;&#xA;But I'm a noob, and I would like advice for creating the game system that the characteristics for damages, level-up, resistance, and so on. The one I used in the first version was not balanced.&#xD;&#xA;&#xD;&#xA;So, ***what kind of system can I use ?***" />
  <row Id="38516" PostHistoryTypeId="4" PostId="16665" RevisionGUID="670dc0a6-73f0-4bb3-9e4f-293d8e00259c" CreationDate="2011-08-31T15:55:54.617" UserId="51" Comment="removed language question, removed extra stuff at the end." Text="What kind of system can I use to balance an RPG?" />
  <row Id="38517" PostHistoryTypeId="6" PostId="16665" RevisionGUID="670dc0a6-73f0-4bb3-9e4f-293d8e00259c" CreationDate="2011-08-31T15:55:54.617" UserId="51" Comment="removed language question, removed extra stuff at the end." Text="&lt;2d&gt;&lt;game-design&gt;&lt;character&gt;&lt;gameplay&gt;" />
  <row Id="38518" PostHistoryTypeId="5" PostId="16666" RevisionGUID="6bd1e209-b3c5-4d22-aa1e-d7e30c19b95c" CreationDate="2011-08-31T15:58:18.267" UserId="51" Comment="deleted 25 characters in body" Text="What is the procedure to convert 2d path to 3d one. Maybe it's a silly question, but for example:&#xD;&#xA;&#xD;&#xA;Let's assume that I have a path from point A to point B. And I have all X and Y coordinates of that path. Is it possible to convert that to a 3d path, so for example to animate a car driving along that path but in 3D. " />
  <row Id="38519" PostHistoryTypeId="2" PostId="16671" RevisionGUID="4d65ba84-82dd-40e9-a20a-00cc277c9cd1" CreationDate="2011-08-31T16:22:05.393" UserId="5473" Text="There are as many different ways to write the numbers as there are drops in the ocean. The best approach I could suggest would be to look at games (or recall games you've played) until you find one where you feel the numbers work well... your preference is going to be based on your past gaming experiences, as much as anything else. Even a statistician game developer has to have an idea for how the game rules need to &quot;feel&quot;, because games are for people to enjoy, not for number-crunchers to crunch.&#xD;&#xA;&#xD;&#xA;Once you've found one or two that you think work well in this sense (could be anything: a pen &amp; paper RPG, a card game, a computer game) then research how they did it by googling and asking questions about that individual game on forums like this one and gaming.stackexchange.com (because the players may in fact have a better idea of how the numbers work, than anyone else). Gradually it will become clear to you why the numbers work, and why you like the feel of the game, and how to implement similar yourself." />
  <row Id="38520" PostHistoryTypeId="2" PostId="16672" RevisionGUID="667e5d4c-8ebb-4ce5-8556-38cac656e69f" CreationDate="2011-08-31T16:32:20.210" UserId="159" Text="I ran across a (now defunct) site a while ago, and there were a series of posts about this topic. &#xD;&#xA;&#xD;&#xA;[In part 1][1], the author talks about the basic formulas, and how different stats equate to damage, health, MP, and so on.&#xD;&#xA;&#xD;&#xA;[Part 2][2] is much smaller, and all you really need is to grab the word doc he links to in the post. It is a small document that goes deeper into the concepts talked about in part 1. He provides the base stat formulas, how to calculate attack damage, and some other examples. From what I have seen it is quite balanced. &#xD;&#xA;&#xD;&#xA;The only thing I don't like about his approach, is how fast everything scales up. I just tweaked the math a bit to fit my taste.&#xD;&#xA;&#xD;&#xA;___&#xD;&#xA;&#xD;&#xA;I just realized that since the site is no longer maintained it could be taken down. For posterity sake, I [mirrored the document][3] on my own site. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://xnafantasy.wordpress.com/2009/01/20/rpg-mechanics-part-i/&#xD;&#xA;  [2]: http://xnafantasy.wordpress.com/2009/03/02/combat-mechanics-extended/&#xD;&#xA;  [3]: http://jotato.net/files/rpgmechanics.doc" />
  <row Id="38521" PostHistoryTypeId="2" PostId="16673" RevisionGUID="f0ab32b0-4697-45b2-9aa7-43e331b455a9" CreationDate="2011-08-31T16:34:02.287" UserId="9366" Text="This is a great read, and will answer a lot of your questions:&#xD;&#xA;&#xD;&#xA;http://udn.epicgames.com/Three/NetworkingOverview.html&#xD;&#xA;&#xD;&#xA;In my strategy/tower defence game, I am using a client/server model and am able to keep everything deterministic so far. The client only sends the server requests to do stuff (but doesn't ever actually **do** anything), and the server sends updates, creations, and deletions down to the clients when things change. Even though my game is currently deterministic, I never trust my clients to do anything right, the server is the boss and has full control over the game. The client is just a dumb terminal.&#xD;&#xA;&#xD;&#xA;To make everything really simple, I am using a combination of Reflection and Eventing to keep my entities completely in the dark about the networking side of things. I also use the concept of an Actor and a &quot;Force&quot; (as opposed to an Actor and Pawn in an FPS like Unreal). This allows for really nice encapsulation and a place to store the Force's money and stuff." />
  <row Id="38522" PostHistoryTypeId="2" PostId="16674" RevisionGUID="31edf636-1486-48ca-8cbf-c5a5111337b4" CreationDate="2011-08-31T16:45:08.833" UserId="1883" Text="http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php &#xD;&#xA;This is still how networking is done in RTS games. P2P is also the normal way of handling connections. &#xD;&#xA;Using a lock timestep model however results in the irritating case of desync and cheating handling. There is good way of recovering when a desync happens and all RTS games simply says &quot;Quit the match&quot;. Bug tracing desync errors is also a nightmare." />
  <row Id="38523" PostHistoryTypeId="2" PostId="16675" RevisionGUID="7cb3b1cf-333d-4897-bf0d-3062e7244124" CreationDate="2011-08-31T16:51:15.737" UserId="5610" Text="    glPushAttrib(GL_ALL_ATTRIB_BITS);&#xD;&#xA;    glBindTexture(GL_TEXTURE_2D, 0);&#xD;&#xA;    &#xD;&#xA;    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboId);&#xD;&#xA;    gl::drawFilled(mesh_);&#xD;&#xA;    //glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);&#xD;&#xA;    &#xD;&#xA;    glAssert();&#xD;&#xA;    glPopAttrib();&#xD;&#xA;    glAssert(); // &lt;= crashes here&#xD;&#xA;&#xD;&#xA;If I uncomment the line `//glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);` it works, how come?" />
  <row Id="38524" PostHistoryTypeId="1" PostId="16675" RevisionGUID="7cb3b1cf-333d-4897-bf0d-3062e7244124" CreationDate="2011-08-31T16:51:15.737" UserId="5610" Text="Framebufferobject crashes when I do pop without resetting the framebuffer to the original" />
  <row Id="38525" PostHistoryTypeId="3" PostId="16675" RevisionGUID="7cb3b1cf-333d-4897-bf0d-3062e7244124" CreationDate="2011-08-31T16:51:15.737" UserId="5610" Text="&lt;c++&gt;&lt;opengl&gt;" />
  <row Id="38526" PostHistoryTypeId="2" PostId="16676" RevisionGUID="01663aa6-10b8-4d42-b154-4516c925af0e" CreationDate="2011-08-31T17:00:54.690" UserId="9626" Text="I was thinking of learning about making games, so I thought of an idea about making a game on a play, since the content is already there. I actually found well parsed Ls of Shakespeare's plays. I thought of a few rather simple game-play elements, but none seem fun. I know that this game probably will not be much fun, but I could try to make it fun.&#xD;&#xA;&#xD;&#xA;It will be a 2d game and i will use pygame." />
  <row Id="38527" PostHistoryTypeId="1" PostId="16676" RevisionGUID="01663aa6-10b8-4d42-b154-4516c925af0e" CreationDate="2011-08-31T17:00:54.690" UserId="9626" Text="What can be a game-play element in a game with Shakespeare's plays as the main theme?" />
  <row Id="38528" PostHistoryTypeId="3" PostId="16676" RevisionGUID="01663aa6-10b8-4d42-b154-4516c925af0e" CreationDate="2011-08-31T17:00:54.690" UserId="9626" Text="&lt;game-design&gt;&lt;pygame&gt;" />
  <row Id="38529" PostHistoryTypeId="5" PostId="16676" RevisionGUID="3821623f-7785-424b-ba1a-2b18ffa5c449" CreationDate="2011-08-31T17:16:09.707" UserId="9626" Comment="added little more information and fixed typo" Text="I was thinking of learning about making games, so I thought of an idea about making a game on a play, since the content is already there. I actually found well parsed XMLs of Shakespeare's plays. I thought of a few rather simple game-play elements, but none seem fun. I know that this game probably will not be much fun, but I could try to make it fun.&#xD;&#xA;What I may be able to do right now is make an application which 'enacts' the whole play. You can skip right to any act or a scene in an act etc.&#xD;&#xA;It will be a 2d game and i will use pygame." />
  <row Id="38530" PostHistoryTypeId="5" PostId="16676" RevisionGUID="3c9b4249-6798-4479-86d1-30f896feefa1" CreationDate="2011-08-31T17:22:42.083" UserId="9626" Comment="more info" Text="I was thinking of learning about making games, so I thought of an idea about making a game on a play, since the content is already there. I actually found well parsed XMLs of Shakespeare's plays. I thought of a few rather simple game-play elements, but none seem fun. I thought of a 'word shooter' but it wouldn't be much fun since there are so many speech lines. Then I thought of a game where you have to match which of the characters currently on the screen said a particular dialog. &#xD;&#xA;&#xD;&#xA;I know that this game probably will not be much fun, but I could try to make it fun.&#xD;&#xA;What I may be able to do right now is make an application which 'enacts' the whole play. You can skip right to any act or a scene in an act etc.&#xD;&#xA;It will be a 2d game and i will use pygame." />
  <row Id="38531" PostHistoryTypeId="2" PostId="16677" RevisionGUID="ae715146-0437-499a-979a-11525003c190" CreationDate="2011-08-31T17:28:19.823" UserId="9586" Text="I make my money in C# :) Generally in that language I like to decouple everything to the high heavens using interfaces. This has served me well in enterprise code but in writing games in C# I find myself tending towards inheritance due to being able to define some default behaviors for base classes. I feel dirty doing this though, like Im disobeying some architecture god who once said &quot;favor composition over inheritance&quot;. I know its not black and white but I also feel like i could use interfaces with a bit more work and achieve roughly the same thing.&#xD;&#xA;&#xD;&#xA;What do other people do? Is inheritance the right approach for games or should I refactor in some interfaces?&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38532" PostHistoryTypeId="1" PostId="16677" RevisionGUID="ae715146-0437-499a-979a-11525003c190" CreationDate="2011-08-31T17:28:19.823" UserId="9586" Text="Inheritance vs Composition" />
  <row Id="38533" PostHistoryTypeId="3" PostId="16677" RevisionGUID="ae715146-0437-499a-979a-11525003c190" CreationDate="2011-08-31T17:28:19.823" UserId="9586" Text="&lt;c#&gt;&lt;architecture&gt;" />
  <row Id="38534" PostHistoryTypeId="2" PostId="16678" RevisionGUID="c957b500-67fb-475f-be83-8f7456f8c10a" CreationDate="2011-08-31T17:34:35.353" UserId="5473" Text="Inheritance in games is actually one of the worst things you can do -- in particular in regards to entities. Read [this][1] for why. Composition over inheritance takes you a long way with games. As for other areas of your engine, it doesn't really matter. Say for example you are making a call to some sort of external network service, then you can inherit one generic type Service to eg. HTTPService and SocketService -- very much as in the enterprise apps you're used to.&#xD;&#xA;&#xD;&#xA;  [1]: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/&#xD;&#xA;&#xD;&#xA;Unless your game is really simple, you *will* want to use an component-based entity (CBE) architecture. The general idea is that with entities, the reason they are so commonly composed rather than inherited is because *you cannot know until runtime what capabilities a given entity will have*. For example, take the player's ship in a space shooter. You don't know until some point during the gameplay, what weapons, armour, systems (i.e. components) that player is going to pick up, purchase, sell, lose, have destroyed, etc. So the only realistic way to model this is through object composition. The plus side in this scenario is that you can also have fully customisable enemies, built in the same way, rather than enemies that are always exactly the same every time you see that enemy type. So with CBEs, you might see a Martian Freighter and think, &quot;Ah it only has tiny lasers, I'll take it down&quot;, and usually that would be true but when you get in range suddenly you realise it has a big-ass wormhole gun. Surprise surprise!" />
  <row Id="38536" PostHistoryTypeId="25" PostId="16677" RevisionGUID="17a0df4f-7b93-4069-a286-1664af2b4aab" CreationDate="2011-08-31T18:38:08.293" Comment="http://twitter.com/#!/StackGameDev/status/108971850188599297" />
  <row Id="38537" PostHistoryTypeId="2" PostId="16679" RevisionGUID="2cd6661d-e45c-4115-867d-49cae09a006a" CreationDate="2011-08-31T18:40:11.453" UserId="8572" Text="I always ask myself the same question and there are a couple of things you can do to motivate yourself (a lot of them already posted here). What works well for me is something I heard at one of the Indie Talks at this year's GDC, I think it was the guy making the Monaco game :-)&#xD;&#xA;&#xD;&#xA;First, find a project that's well in your line of experience. I.e. don't start out to make a FPS if you don't even know the basics of OpenGL/DirectX. (unless you're using a game engine but that's not the point here ;-))&#xD;&#xA;&#xD;&#xA;Then, make yourself a list of things to do and milestones you like to achieve, so you always know where to go. The TODOs is the important part. **Define your tasks such that each task can easily be done on a day or in a couple of hours**. So when you start out coding, designing, modeling etc. you already see the light at the end of the tunnel. Nothing is more depressing than designing and coding your big Game Engine for a month without getting nearer to the finishing line. Break down big tasks into smaller ones. Finishing a task quickly is really rewarding and keeps you going. For example, this was my task list for a small space shooter game at one time :&#xD;&#xA;&#xD;&#xA;* Sound Effects&#xD;&#xA;* Music&#xD;&#xA;* Remodel Ship&#xD;&#xA;* Remodel Rockets&#xD;&#xA;* Colission Detection between shots and player/enemy&#xD;&#xA;* Make enemies shoot&#xD;&#xA;* Title Screen&#xD;&#xA;* Score/Lives/Energy Whatever Overlay&#xD;&#xA;&#xD;&#xA;All these tasks were easy to do and once they work in the game, you can iterate on those areas and polish them.&#xD;&#xA;&#xD;&#xA;And hey, I finished a small game. It's not pretty but it's basically done which was really rewarding in the end :-)&#xD;&#xA;" />
  <row Id="38538" PostHistoryTypeId="2" PostId="16680" RevisionGUID="b24cf39e-0551-48ad-a9a2-eb4f012d8586" CreationDate="2011-08-31T18:43:24.833" UserId="9627" Text="recently im trying to create a isometric game for facebook pretty much like Empires and Allies in facebook , i have used as3isolib to create the game , the user interactions are almost ready , but im stuck in designing the database for it .&#xD;&#xA;&#xD;&#xA;i tried to search online but i could'not find any source or sample db designs for it ,,, i have big problem in design db in the way that can handle the different item types , like , housing , research labs , units , their staus and so on, let's say when we build a house it would have different levels to be completed , or different building has different product , and some item's product is still a product , like military house which produce soldiers ... if any body can guid me or a sample design i'll really appreciate it . Thanks." />
  <row Id="38539" PostHistoryTypeId="1" PostId="16680" RevisionGUID="b24cf39e-0551-48ad-a9a2-eb4f012d8586" CreationDate="2011-08-31T18:43:24.833" UserId="9627" Text="database design for a game like &quot;Empires and Alies&quot; in facebook" />
  <row Id="38540" PostHistoryTypeId="3" PostId="16680" RevisionGUID="b24cf39e-0551-48ad-a9a2-eb4f012d8586" CreationDate="2011-08-31T18:43:24.833" UserId="9627" Text="&lt;databases&gt;" />
  <row Id="38541" PostHistoryTypeId="2" PostId="16681" RevisionGUID="1ab1a633-052b-4cf9-b1b6-b08b45fa476d" CreationDate="2011-08-31T18:46:17.280" UserId="495" Text="[meant to be left as a comment to anon's answer, which was deleted as I posted it. He mentioned that he had all this functionality working, then split the single file code into multiple files, only for everything to fall apart]&#xD;&#xA;&#xD;&#xA;Re: refactoring, stuff can happen, even to pros. Sometimes even with good tools like Git, a merge can fail so instead of feature A and feature B both working, neither work! The only choice is to go back to A and try again. Luckily version control will save this code for you; if you don't use real version control, at least do it manually by zipping your dev folder regularly -- HD space is cheap! In conclusion, go back to what works and refactor in smaller steps, making sure the game still works at each step. It is really depressing to clean up code only to see everything fall apart. Just revert to old code." />
  <row Id="38542" PostHistoryTypeId="2" PostId="16682" RevisionGUID="43f55faa-32c3-4c8e-9732-bf8c2e1ca1a3" CreationDate="2011-08-31T18:48:02.880" UserId="5473" Text="How about these as options...&#xD;&#xA;&#xD;&#xA;a) Break down the story and have the player have to say the right things at the right parts. If he doesn't, something funny (and usually painful) happens down the line. It may not be immediately afterward, so for example (if the player knows the play) and MacBeth asked the wrong questions of the witches for example, he might not be warned, &quot;Beware the ides of March!&quot; and so he gets axed at some inopportune moment because he's out playing croquet on the ides of March... or something like that. You get the idea.&#xD;&#xA;&#xD;&#xA;b) Have the story play through linearly. But insert extra bits in between parts of the actual story, things that might have happened to the main character(s), and play those bits out. interactively. So for example after some speech in Othello, he's ravenously hungry and you have to help him find the kitchens or he comes to an ignoble end.&#xD;&#xA;&#xD;&#xA;Traditional stories are linear, that's why they tend not to translate too well to an interactive experience. It's the interactiveness that makes things fun. However, the best value you're going to get from Shakespeare's plays comes from his excellent stories and characters. Basically if you view a story as a linear sequence of events i.e. a linear graph, then in case (a) you are allowing branchings in that graph, but those branchings immediately lead to a cut scene detailing the consequences of failure (i.e. of choosing the wrong action). Whereas with (b), you are lengthening the graph by inserting extra &quot;pieces&quot; of interactive story in between the main (and mandatory) parts of the graph. In this latter case, wrong choices need not be fatal, they can just be for fun, because it doesn't affect the outcomes of each part of the main storyline." />
  <row Id="38543" PostHistoryTypeId="5" PostId="16682" RevisionGUID="9ca2561f-368b-4aed-b602-c8ce0e36b6ef" CreationDate="2011-08-31T18:57:26.203" UserId="5473" Comment="added 57 characters in body" Text="How about these as options (both implemented as some kind of point-click adventure)...&#xD;&#xA;&#xD;&#xA;a) Break down the story and have the player have to say the right things at the right parts. If he doesn't, something funny (and usually painful) happens down the line. It may not be immediately afterward, so for example (if the player knows the play) and MacBeth asked the wrong questions of the witches for example, he might not be warned, &quot;Beware the ides of March!&quot; and so he gets axed at some inopportune moment because he's out playing croquet on the ides of March... or something like that. You get the idea.&#xD;&#xA;&#xD;&#xA;b) Have the story play through linearly. But insert extra bits in between parts of the actual story, things that might have happened to the main character(s), and play those bits out. interactively. So for example after some speech in Othello, he's ravenously hungry and you have to help him find the kitchens or he comes to an ignoble end.&#xD;&#xA;&#xD;&#xA;Traditional stories are linear, that's why they tend not to translate too well to an interactive experience. It's the interactiveness that makes things fun. However, the best value you're going to get from Shakespeare's plays comes from his excellent stories and characters. Basically if you view a story as a linear sequence of events i.e. a linear graph, then in case (a) you are allowing branchings in that graph, but those branchings immediately lead to a cut scene detailing the consequences of failure (i.e. of choosing the wrong action). Whereas with (b), you are lengthening the graph by inserting extra &quot;pieces&quot; of interactive story in between the main (and mandatory) parts of the graph. In this latter case, wrong choices need not be fatal, they can just be for fun, because it doesn't affect the outcomes of each part of the main storyline." />
  <row Id="38544" PostHistoryTypeId="2" PostId="16683" RevisionGUID="a4aaee3e-2967-40e8-98db-4052babcf337" CreationDate="2011-08-31T18:57:52.607" UserId="9033" Text="How about a 'Find the Item' game where you hide an item somewhere in the play / act / scene.  You have a time scroller so you can go back and forward through the play enactment looking for that item hidden somewhere in one scene.  And/or you could have multiple items flashed to the player before the game begins and he has to find as many as he can in a time limit.  Have multiple decoy items, or have all items selectable so you can click any item for an answer.&#xD;&#xA;&#xD;&#xA;There there's an obvious 'tomato throw' game.  Try to hit the actors by launching tomatoes at them, or target non-actors too, depending on the objective.&#xD;&#xA;&#xD;&#xA;'Shakespeare Hero' - Have the words come at you while they are being spoken/presented, and either type them as a typing test, or click them to a certain rhythm (ha, can't really see how this would work, but it would be funny!)&#xD;&#xA;&#xD;&#xA;'Mystery' - Have the player watch a scene, and ask her a question afterwords.  The question could be about the written content (ie: Who said &quot;....&quot;), or have the actors 'randomly' doing quirky things not related to the play, such as scratching, sitting, sneezing, etc, then quiz them on who did what." />
  <row Id="38545" PostHistoryTypeId="2" PostId="16684" RevisionGUID="b3cfdfba-584f-405d-835f-babdfc04738a" CreationDate="2011-08-31T19:00:00.013" UserId="2897" Text="It's not that hard to build a somewhat working RPG game mechanic, especially when there are so many inspirations around like pen and paper RPGs with Dungeons and Dragons being the prime example. But to balance your system, that's a different story. There are several facets of balance even for a simple RPG:&#xD;&#xA;&#xD;&#xA;  1. Are there overpowered or useless character development strategies? Like choosing level up stats|abilities in a way which guarantees more &quot;gain&quot; than all other ways.&#xD;&#xA;  2. Are there overpowered or useless character equipment|abilities|whatever else interchangeable on a character? Leveled comparison of course, so it's cracked wooden club versus rusted iron dagger and Gae Bolg versus Excalibur. Note the cost/benefit ratio.&#xD;&#xA;  3. Overall, is there one approach in a subsystem which is always better or worse than the others? Like one battle tactics which can ~always perform better than all another tactics.&#xD;&#xA;  4. Is the difficulty curve and challenge level appropriate?&#xD;&#xA;&#xD;&#xA;I created a completely fluid system for a TRPG once where one could have any crazy combinations of abilities, stats and overall behaviour, so it was impossible to balance it manually very well. But we have an edge against pen-and-papers — ability to run lots of simulations on our fancy machines and not in our minds, so let's tackle those problems one by one. I won't give useless implementation specifics, just a general approach I've used:&#xD;&#xA;&#xD;&#xA;1. Perturbate all gains for a level and assign each perturbation to some of your RPG role. Like if character gained +5 STR and Shield Bash ability, it becomes a fighter type. That'll be easier if your RPG have rigid classes. Then take snapshots of resulting character statistics and abilities per level and compare them one to another within those archetypes. That way you can see if one way of developing &quot;fighter&quot; is better than the other. Even on that stage you may notice that, for example, mages gain some unintended edge over fighters.&#xD;&#xA;&#xD;&#xA;2. Build a combat simulator. Take one of your snapshots from a previous step and equip it with an item. Clone that shapshot and equip it with another item with the same &quot;level range&quot;. Now run them through a combat simulator against enemy of that item's &quot;level range&quot; many times and check results. You may want to take abilities into account, then don't use fighter snapshot with &quot;Spear Thrust&quot; ability to test a mace.&#xD;&#xA;&#xD;&#xA;3. Simulate that subsystem, e.g. tactical combat. That's the most difficult step, since you'll have to emulate a real player with some form of AI. It needs to know most typical combos, so tag your abilities like &quot;damage&quot;, &quot;stun&quot;, &quot;slow&quot;, e.t.c., and define combos in terms &quot;stun-&gt;slow-&gt;damage over time-&gt;damage nuke&quot;.  Things will be easier if you introduce &quot;turns&quot; even if your game is real-time. Take your typical combat situations and run them with your snapshots with equipment and abilities appropriate to &quot;situation level&quot;. Note which snapshots of the same type perform better than others, and which combos resulted in a complete devastation of enemy. Take your results with grain of salt, keep in mind that it's your combat AI fighting, not a player. So you may want to use several types of said AI, and playtest your balance changes yourself.&#xD;&#xA;&#xD;&#xA;4. The biggest problem is that players can be progamers or complete casuals, and you'll have to decide on your &quot;homogenized target audience&quot;. You can test out challenge level by taking average leveled snapshots and average equipment for current game stage, and testing them agains current game map enemies. &quot;Average&quot; here depends on a target audience. Difficulty curve is not that simple, it's mostly subjective feeling, so you'll have to playtest it with your target audience." />
  <row Id="38546" PostHistoryTypeId="5" PostId="16684" RevisionGUID="1f53b111-528b-4b4a-b556-c35a70ce98bf" CreationDate="2011-08-31T19:13:13.717" UserId="2897" Comment="corrected some words." Text="It's not that hard to build a somewhat working RPG game mechanic, especially when there are so many inspirations around like pen and paper RPGs with Dungeons and Dragons being the prime example. But to balance your system, that's a different story. There are several facets of balance even for a simple RPG:&#xD;&#xA;&#xD;&#xA;  1. Are there overpowered or useless character development strategies? Like choosing level up stats|abilities in a way which guarantees more &quot;gain&quot; than all other ways.&#xD;&#xA;  2. Are there overpowered or useless character equipment|abilities|whatever else interchangeable on a character? Leveled comparison of course, so it's cracked wooden club versus rusted iron dagger and Gae Bolg versus Excalibur. Note the cost/benefit ratio.&#xD;&#xA;  3. Overall, is there one approach in a subsystem which is always better or worse than the others? Like one battle tactics which can ~always perform better than all another tactics.&#xD;&#xA;  4. Is the difficulty curve and challenge level appropriate?&#xD;&#xA;&#xD;&#xA;I created a completely fluid system for a TRPG once where one could have any crazy combinations of abilities, stats and overall behaviour, so it was impossible to balance it manually very well. But we have an edge against pen-and-papers — ability to run lots of simulations on our fancy machines and not in our minds, so let's tackle those problems one by one. I won't give useless implementation specifics, just a general approach I've used:&#xD;&#xA;&#xD;&#xA;1. Perturbate all gains for a level and assign each perturbation to some of your RPG role. Like if character gained +5 STR and Shield Bash ability, it becomes a fighter type. That'll be easier if your RPG have rigid classes. Then take snapshots of resulting character statistics and abilities per level and compare them one to another within those archetypes. That way you can see if one way of developing &quot;fighter&quot; is better than the other. Even on that stage you may notice that, for example, mages gain some unintended edge over fighters.&#xD;&#xA;&#xD;&#xA;2. Build a combat simulator. Take one of your snapshots from a previous step and equip it with an item. Clone that shapshot and equip it with another item with the same &quot;level range&quot;. Now run them through a combat simulator against enemy of that item's &quot;level range&quot; many times and check results. You may want to take abilities into account, then don't use fighter snapshot with &quot;Spear Thrust&quot; ability to test a mace.&#xD;&#xA;&#xD;&#xA;3. Simulate that subsystem, e.g. tactical combat. That's the most difficult step, since you'll have to emulate a real player with some form of AI. It needs to know most typical combos, so tag your abilities like &quot;damage&quot;, &quot;stun&quot;, &quot;slow&quot;, e.t.c., and define combos in terms &quot;stun-&gt;slow-&gt;damage over time-&gt;damage nuke&quot;.  Things will be easier if you introduce &quot;turns&quot; even if your game is real-time. Take your typical combat situations and run them with your snapshots with equipment and abilities appropriate to &quot;situation level&quot;. Note which snapshots of the same type perform better than others, and which combos resulted in a complete devastation of enemy. Take your results with grain of salt, keep in mind that it's your combat AI fighting, not a player. So you may want to use several types of said AI, and playtest your balance changes yourself.&#xD;&#xA;&#xD;&#xA;4. The biggest problem is that players can be progamers or complete casuals, and you'll have to decide on your &quot;homogenized target audience&quot;. You can test out challenge level by taking average leveled snapshots and average equipment for current game stage, and testing them agains current game map enemies. &quot;Average&quot; here depends on a target audience. Difficulty curve is not that simple, it's mostly subjective feeling, so you'll have to playtest it with your target audience.&#xD;&#xA;&#xD;&#xA;After all that, use your game designer's instincts over data and make a balance which feels balanced to you. Also a very important note: don't make a bunch of balance changes at once. Try to do a small change, test it, then introduce another change.&#xD;&#xA;&#xD;&#xA;As you can see, there is a big room for a failure here. So you may want to stop striving for a perfect balance, I mean, if game's going to be imbalanced, try to make it fun to abuse, like Morrowind :)" />
  <row Id="38547" PostHistoryTypeId="2" PostId="16685" RevisionGUID="9ea5a2b4-b381-4b91-ac6b-78fb457b3ca3" CreationDate="2011-08-31T19:33:05.207" UserId="9629" Text="I'm writing a browser game in php and Sql. I'm also using Javascript - Ajax and Mysql.&#xD;&#xA;&#xD;&#xA;I'm stack on the battle system because I want to Synchronize the turns of the players in the battle.&#xD;&#xA;&#xD;&#xA;What I doing is to put two players on a battle. So from the first turn a countDown of 60sec will start.&#xD;&#xA;What I am thinking is to use a server function to check the countdown, not to the client side. This because I think that in that case a bad synchronization will came, instead if it is the server to count down.&#xD;&#xA;&#xD;&#xA;But.. how can I let the server do all this stuff?" />
  <row Id="38548" PostHistoryTypeId="1" PostId="16685" RevisionGUID="9ea5a2b4-b381-4b91-ac6b-78fb457b3ca3" CreationDate="2011-08-31T19:33:05.207" UserId="9629" Text="Synchronize turn based browser game" />
  <row Id="38549" PostHistoryTypeId="3" PostId="16685" RevisionGUID="9ea5a2b4-b381-4b91-ac6b-78fb457b3ca3" CreationDate="2011-08-31T19:33:05.207" UserId="9629" Text="&lt;server&gt;&lt;client-server&gt;&lt;browser-based-games&gt;&lt;turn-based&gt;" />
  <row Id="38550" PostHistoryTypeId="5" PostId="16588" RevisionGUID="0239ad5c-99ca-4213-97e2-7eb92921a06c" CreationDate="2011-08-31T19:36:58.093" UserId="4129" Comment="added 90 characters in body" Text="I am trying to draw spheres using a billboard, so I have a normal map with a z component that I am sampling in my fragment shader.  I just need to add this z component to the depth of my fragment to get proper 3D spheres...&#xD;&#xA;&#xD;&#xA;How do you determine the current fragment's z-depth, add my offset and then set `gl_FragDepth`? &#xD;&#xA;&#xD;&#xA;I've found lots of confusing contradictory hints and partially working bits of code all over the 'net, but no definitive clear answer.&#xD;&#xA;&#xD;&#xA;***UPDATE***&#xD;&#xA;&#xD;&#xA;final result (no shadowing) http://www.youtube.com/watch?v=88idbFlvQV0" />
  <row Id="38551" PostHistoryTypeId="5" PostId="16668" RevisionGUID="0e9f8a42-fb1b-4448-9a75-df09085a68ce" CreationDate="2011-08-31T19:48:22.483" UserId="9617" Comment="edited body" Text="You have to consider that GPUs when fetching the data for feeding into the vertex shaders requires a lot of small calls because they can only cache a few triangles at the same time, and fetching data from the VRAM is a very slow operation. So I suppose that if you use half the bytes for the indices, the GPU will be able to fetch twice the indices for the cache to render triangles. &#xD;&#xA;&#xD;&#xA;4MB Can be a small amount of memory for storage space, but if you have to make a complex call to only process a few bytes from them it may affect performance in a noticeable way. Nowadays video cards are powerful enough to make it irrelevant in games which don't have to process a lot of geometry, you... could do some benchmarks rendering a model with both index sizes if you really want to know. &#xD;&#xA;&#xD;&#xA;Loading times are also faster with 16 bit indices, and actually every write or read, unless you can effectively control memory alignment and proper paging. So it's not just about the memory it requires but how much it takes to handle it. If you are working with dynamic buffers that need to be moved over the bus to the GPU at some point between Frames, then you should use 16 bit indices when possible. If you are rendering even smaller geometries, you can batch many indices in a single 16 bit index buffer for them all to get copied to the GPU in a single call.&#xD;&#xA;&#xD;&#xA;" />
  <row Id="38552" PostHistoryTypeId="2" PostId="16686" RevisionGUID="52909da2-0b25-47c2-aae7-bd505e5ce41a" CreationDate="2011-08-31T21:26:31.323" UserId="9632" Text="I am not a php programmer (.NET developer), but if you're using Ajax it seems to me that the best thing to do is to use javascript to keep track of a client side counter. Then every 5 or 10 seconds or so you could make an ajax call to get the official server time to see how many seconds have actually passed and update your counter accordingly.&#xD;&#xA;&#xD;&#xA;On the server side whenever a request comes in you could check to see how long it has been since the other client has made a request. If one of the clients haven't responded in a while then you can assume that client has closed their browser and instead of updating the counter you can notify the client that's still connected of this status change." />
  <row Id="38553" PostHistoryTypeId="25" PostId="16685" RevisionGUID="4bb1a40b-4b0b-419b-ae5e-6746c5879898" CreationDate="2011-08-31T21:38:08.593" Comment="http://twitter.com/#!/StackGameDev/status/109017150114631680" />
  <row Id="38554" PostHistoryTypeId="2" PostId="16687" RevisionGUID="f10ebbf1-4a43-4e8a-a99b-e08b48a7c3f0" CreationDate="2011-08-31T21:50:05.450" UserId="6215" Text="I have written some GLSL and Cg shaders a couple years back. I am starting another graphics engine project and I want to choose my technologies carefully so that my code will be accessible years down the road. &#xD;&#xA;&#xD;&#xA;It seems to me that GLSL and Cg and HLSL are just slightly different syntaxes. Are there any other alternatives to these shader languages? &#xD;&#xA;&#xD;&#xA;Another question I have is whether these languages are still relevant for using newer techniques. I can't answer this for myself until I actually get around to learning and trying to implement these techniques. But what I'd like to get a feeling for is which languages and toolkits are being used by those who are currently on the cutting edge. " />
  <row Id="38555" PostHistoryTypeId="1" PostId="16687" RevisionGUID="f10ebbf1-4a43-4e8a-a99b-e08b48a7c3f0" CreationDate="2011-08-31T21:50:05.450" UserId="6215" Text="Which are the most futureproof languages for graphics (shader) programming?" />
  <row Id="38556" PostHistoryTypeId="3" PostId="16687" RevisionGUID="f10ebbf1-4a43-4e8a-a99b-e08b48a7c3f0" CreationDate="2011-08-31T21:50:05.450" UserId="6215" Text="&lt;opengl&gt;&lt;shaders&gt;&lt;languages&gt;" />
  <row Id="38557" PostHistoryTypeId="2" PostId="16688" RevisionGUID="619cf76a-2ef8-44e4-9786-abaa43fa4bf8" CreationDate="2011-08-31T21:50:46.747" UserId="7831" Text="I would suppose the FBO manages some of its own state (there are some pushed/popped states whose values depend on the framebuffer binding) and it gets somehow messed up when you pop these and the framebuffer has suddenly changed. Maybe it's a driver fault where they didn't integrate the FBOs correctly with the rare case of intermediate state pushes/pops (which are quite old and deprecated anyway).&#xD;&#xA;&#xD;&#xA;But don't use `glPush/glPopAttrib` anyway, it's quite slow, as you surely don't need to push **every** state. Don't do that just out of laziness." />
  <row Id="38558" PostHistoryTypeId="5" PostId="16687" RevisionGUID="d5596edc-17f7-4bed-81a7-ea7300039b5a" CreationDate="2011-08-31T21:57:27.810" UserId="6215" Comment="added 343 characters in body" Text="I have written some GLSL and Cg shaders a couple years back. I am starting another graphics engine project and I want to choose my technologies carefully so that my code will be accessible years down the road. &#xD;&#xA;&#xD;&#xA;It seems to me that GLSL and Cg and HLSL are just slightly different syntaxes. Are there any other alternatives to these shader languages? It used to be I only cared about my code compiling correctly on ATI and nVidia hardware (their drivers, to be accurate) but these days I'd like it to function well on Intel's integrated solutions as well. From what I know since all vendors support OpenGL, GLSL should work, and HLSL is its counterpart for DirectX, so there shouldn't be problems there either. What about Cg? &#xD;&#xA;&#xD;&#xA;Another question I have is whether these languages are still relevant for using newer techniques. I think they are, but maybe what I don't know is that nobody uses Cg anymore because it's gone out of style, or whatever. When I get around to learning and implementing these techniques myself, I'll surely find out all about the ins and outs, but I'd like to get a feeling for which languages and toolkits are being used NOW by those who are on the cutting edge, so I don't end up building my framework on software that will become obsolete. " />
  <row Id="38559" PostHistoryTypeId="2" PostId="16689" RevisionGUID="b9733b65-aab7-4144-ae2c-586c5025681f" CreationDate="2011-08-31T22:33:43.443" UserId="9016" Text="GLSL and CG/HLSL are **completely** different, not just *slightly*. CG and HLSL were developed in parallel, and CG was nvidia's effort to create a standard shader language. The ARB rejected it in favour of GLSL.&#xD;&#xA;&#xD;&#xA;CG is used because it supports OpenGL **and** DirectX.&#xD;&#xA;&#xD;&#xA;All three shader languages are under active development:&#xD;&#xA;&#xD;&#xA;* The current GLSL 4.20 specification came out this August.&#xD;&#xA;* I can't find any dates for the current HLSL, but the current revision supports Shader Model 5, which came out with DirectX 11, which came out in October 2009.&#xD;&#xA;* The current CG toolkit was released in February 2011, the first version from 3.0 in July 2011." />
  <row Id="38560" PostHistoryTypeId="2" PostId="16690" RevisionGUID="fa9e32ac-cfea-4842-a66f-ee7b6c38fd1a" CreationDate="2011-08-31T23:27:13.543" UserId="9134" Text="Thinking about your target platform is the right approach, and modern Intels actually have a quite good (for Intel) GLSL compiler.  If you need to run on downlevel Intels you'll have to re-evaluate (I actually went back to ARB ASM recently for that very reason).&#xD;&#xA;&#xD;&#xA;Beware of NVIDIA - their GLSL compiler will even accept some HLSL syntax/keywords, and if you only ever develop or test on NVIDIA you stand a real danger of producing something that will only ever work on NVIDIA.&#xD;&#xA;&#xD;&#xA;I like HLSL a lot.  One of the key differences is that whereas with GLSL the driver vendor must provide the compiler, with HLSL the compiler is provided by Microsoft as part of your DirectX install.  That way you get to be certain that all of your users are on a standard baseline so far as the compiler is concerned, and can rule out one possible source of bugs or variations.  The Effects framework makes things much easier for managing shaders in your program, although Microsoft are downplaying this a little in D3D11 (it's provided as source only which you must compile yourself and I'm not certain of the redistribution legalities)." />
  <row Id="38561" PostHistoryTypeId="2" PostId="16691" RevisionGUID="63b9244d-5b82-4b4e-86a1-02555d19961d" CreationDate="2011-08-31T23:28:35.493" UserId="3128" Text="Does radiosity work with skylight (directional light)? From reading online it sounds like it was intended to work with point lights but I would really like to make it work with skylight if possible.&#xD;&#xA;&#xD;&#xA;If I did misunderstand how would I make this work with skylight? &#xD;&#xA;&#xD;&#xA;The form factor attenuates for distance, area, and orientation of the patches. It doesn't seem like that would all apply in skylight.&#xD;&#xA;&#xD;&#xA;I have a primitive implementation of radiosity in the cpu using ray casting.&#xD;&#xA;&#xD;&#xA;Any help is greatly appreciated. " />
  <row Id="38562" PostHistoryTypeId="1" PostId="16691" RevisionGUID="63b9244d-5b82-4b4e-86a1-02555d19961d" CreationDate="2011-08-31T23:28:35.493" UserId="3128" Text="Does radiosity work with skylight?" />
  <row Id="38563" PostHistoryTypeId="3" PostId="16691" RevisionGUID="63b9244d-5b82-4b4e-86a1-02555d19961d" CreationDate="2011-08-31T23:28:35.493" UserId="3128" Text="&lt;lighting&gt;&lt;radiosity&gt;&lt;global-illumination&gt;" />
</posthistory>